From c2a76f1e47475fabb9b47316ac30f6752a38afe3 Mon Sep 17 00:00:00 2001 From: Michalcin Date: Fri, 5 Nov 2021 16:33:29 +0100 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit ea5508384ed04d70759a826a74ff0131cb110dd4 Merge: 9e70af869f 49e8defda1 Author: Michalcin Date: Fri Nov 5 16:23:57 2021 +0100 Merge branch '2.0.x' of https://github.com/MarlinFirmware/Marlin into MarlinFirmware-2.0.x commit 49e8defda11c0c62098d86e4ced947468cd2f289 Author: Scott Lahteine Date: Mon Oct 4 22:16:15 2021 -0500 🔨 Move Creality 4.2.2 warning commit e5c4e77eb06ca01ec062c32f96c0315e2666139a Author: Sebastien BLAISOT Date: Tue Nov 2 06:49:21 2021 +0100 🐛 Fix NEOPIXEL2_SEPARATE default color (#23057) commit 8dd3f38ae9ccdb051ed073a11dd9200b9d7e2ffe Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue Nov 2 12:34:53 2021 +1300 🩹 Fill gaps in pinsDebug_list (#23051) commit 044a7db370d278b91cea194d4a00d6e4c652c4a7 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue Nov 2 12:36:22 2021 +1300 🐛 Fix Y_SERIAL_RX_PIN for FYSETC S6 (#23055) commit 8cecc626c6a40e1667a10908042101248c5668dd Author: Robby Candra Date: Tue Nov 2 10:29:23 2021 +0700 🎨 Fix redefine warnings (#23061) commit ee26fd0e0559d7f2d86b11b5552eaf9c9ff3174c Author: tombrazier <68918209+tombrazier@users.noreply.github.com> Date: Mon Oct 25 22:29:40 2021 +0100 🚸 Default T0 for M569, M906, M913 (#23020) commit a7ea6b59255ee5405b0118d78a5d7bdf69a8eb68 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue Oct 26 10:02:29 2021 +1300 ⚡️ Add'l PCINTs for Mega Extended (#23019) commit 2b8a804997b18c49126868f5301702e2bf8eeaa6 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun Oct 24 23:14:02 2021 -0700 ✨ Octopus Pro V1.0 with STM32F429ZGT6 (#23008) commit 908335367edba11eff8e457c511482db8a36dfcf Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Mon Oct 18 00:51:01 2021 -0700 ✨ BTT Octopus Pro V1.0 (STM32F446ZET6) (#22971) commit a7415a052ebf57c0a0a30cf97973b86c2065958d Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon Oct 25 19:12:07 2021 +1300 🐛 Fix børken E_DUAL_STEPPER_DRIVERS (#23017) commit f51e07b19636cbbfc9511073e41e5a98cd7c5625 Author: Miguel Risco-Castillo Date: Mon Oct 25 01:08:15 2021 -0500 🐛 Fix Ender-3 V2 Enhanced SetFlow (#23016) commit 5f35c539ce38a6d6715ce77005b387a0b87ac822 Author: Lefteris Garyfalakis <46350667+lefterisgar@users.noreply.github.com> Date: Mon Oct 25 09:06:13 2021 +0300 🚸 E3V2 Enhanced cosmetic fixes (#23009) commit 59503c6bbbcea81dcbe3e5ffa9ac175a01e7a2dc Author: Scott Lahteine Date: Tue Sep 28 05:59:03 2021 -0500 🎨 Apply F() to E3V2 titles, popups commit 0309fce1fd12cfe0259f67f9d2381d08041ae525 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Mon Oct 25 01:39:48 2021 -0400 ✨ Creality v2.4.S1 (Ender 7) board (#23010) commit f6d211f77941d2df03db9493c8ad6b39c511ee63 Author: Dennis Date: Mon Oct 25 07:35:11 2021 +0200 🐛 Fix JyersUI current positions (scaling) (#23005) commit f179e25cc640135f968ffb12a12fdf4bd0b14212 Author: Scott Lahteine Date: Sun Oct 24 23:32:34 2021 -0500 🐛 More explicit allocation of solenoids In reference to #22887 commit 5b478cd5f6b6eae0343acbf169976f97b1ba5609 Author: tombrazier <68918209+tombrazier@users.noreply.github.com> Date: Fri Oct 22 21:56:05 2021 +0100 🐛 Fix probe temp compensation maths (#23004) commit e852732ea8e71d7e969520d0bcd4f242dc6755b2 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Fri Oct 22 17:57:30 2021 +1300 🐛 Fix E3V2 width/height defines (#22994) commit c9718e1ec0570a96bd104cd4bbefed57cc613d5d Author: Augusto Zanellato Date: Tue Oct 19 17:24:22 2021 +0200 ✨ Eryone Ery32 mini (STM32F103VET6) board (#22956) commit 30158424e993919b9a4d8fe4b14793df3affe7ff Author: Scott Lahteine Date: Tue Oct 19 05:53:34 2021 -0500 🔨 Fix older GCC CXXFLAGS warning commit 5f6d9e9f42d0cf5126f763e8a8f4f617cb8fcc8f Author: Scott Lahteine Date: Tue Oct 19 05:51:49 2021 -0500 🎨 Fix pinsDebug_list warnings commit b108741a8e2ba426f006a4c4bb562aa126eb400d Author: Scott Lahteine Date: Tue Oct 19 04:03:03 2021 -0500 💡 Sub-include pins labels commit b4904cc53e3a8a97fe8047ebe918bc8ea474e120 Author: Scott Lahteine Date: Tue Oct 19 02:56:44 2021 -0500 🔨 Delete after encrypt. Lerdge encrypt only once commit 2c6fe45847e0ada1b873bbc302cce2c51325902b Author: Scott Lahteine Date: Tue Oct 19 02:49:35 2021 -0500 🔨 Update 'pio vscode init' detection commit fed72e4607b864d8048ae87b08063f0ac6f1eaed Author: Scott Lahteine Date: Tue Oct 19 11:17:36 2021 -0500 🔨 Use pull_request_target for check-pr commit c3a4e6b3c8b581ac458618507177eb81dfedd7a1 Author: Scott Lahteine Date: Mon Oct 18 01:49:35 2021 -0500 ✅ Warn about dummy thermistors commit 5bfc5c10103c9f6067d8e1969d8a9c1f1384b9cd Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Mon Oct 18 02:03:01 2021 -0400 Fix JyersUI ZOffset Multiplication (#22975) commit 1112d66fefedafacf32027fd7b44f11b1546306d Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Mon Oct 18 02:01:28 2021 -0400 Fix Tool Change Park (#22968) commit 61b574f2cea9f23603a3c0250b6bd11934fa3d60 Author: Scott Lahteine Date: Sun Oct 17 19:26:31 2021 -0500 🔨 Improve 'mftest' error message commit 522cdd52727383e9a2e4f0295b85ae6e2d94aacf Author: Scott Lahteine Date: Sun Oct 17 16:56:01 2021 -0500 🔧 Safety feature warnings commit 641bae625b659cc5eba13c20c174de5fff7caa98 Author: Scott Lahteine Date: Fri Oct 15 15:07:47 2021 -0500 💡 Update old gnu.org links commit d10e20d6d2faaea04df81dca682290a2aa081fee Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Fri Oct 15 15:56:59 2021 -0400 ✨ Add option EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN (#22960) commit b18aa933d14f9761d74b19be79db64e21356c563 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed Oct 13 14:28:45 2021 +1300 🐛 Fix G33 homing current (#22909) commit 0f519ebf854cdb0fd3d00828ca7a4b4d09c8d610 Author: mks-viva <1224833100@qq.com> Date: Tue Oct 12 20:01:18 2021 -0500 ✨ MKS Eagle (STM32F407VET6) board (#22897) commit 031f17b4f3dfca4a66384d40ce48b7d33315c75a Author: Minims Date: Sun Oct 10 01:10:21 2021 +0200 🩹 Adjust GTR 1.0 ST7920 display delay (#22904) commit 036f763eaaff571f07c7829e0f5a61b645e86269 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu Oct 7 09:42:59 2021 +1300 🎨 Define Octopus allocated endstop pins (#22882) Co-authored-by: Scott Lahteine commit d137f307ebea8c8832ecbef239ed08e188c5369b Author: Scott Lahteine Date: Mon Oct 4 22:19:05 2021 -0500 🎨 Tweak FORCE_INLINE commit 66048a5f27aa3ad9ecb2b407ada13fb87e86ebe9 Author: Mark Date: Tue Oct 5 12:23:02 2021 +0800 ✨ ESP32 Panda_ZHU and Panda_M4 (#22644) commit b8c32e24d86fff280621ab3f274511dd30669b93 Author: Scott Lahteine Date: Sat Oct 2 02:33:14 2021 -0500 🎨 Rename MarlinUI::zoffset_overlay commit 99d51af90facd02365d0ae91091303d7879f304d Author: Scott Lahteine Date: Tue Oct 5 21:35:31 2021 -0500 🔨 Port libsdl2_net required for macOS simulator commit f47ece0725d93cde7fde52b66d14b5ec551c46c2 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:06:39 2021 -0700 🐛 Fix MKS Robin Pro 1.0 LCD reset pin (#22937) commit 975089a954460b10279bdbf60f08c9604c4f7d08 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 19:05:37 2021 -0700 🔧 Remove obsolete G34 sanity check (#22929) commit 995230f5971995e41b97d14273f2dd3693ead6be Author: George Fu Date: Wed Oct 13 09:32:54 2021 +0800 🐛 Fix FYSETC Cheetah v2.0 build (#22926) commit adf7072fa846312d473a993ffc62ec3082b37c46 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 12 18:26:42 2021 -0700 🐛 Fix SKR Mini E3 V2 I2C-based EEPROM (#22919) Followup to #20609 commit 40cb7cf8d6e31cf768a946e3248618256c021fb6 Author: Scott Lahteine Date: Mon Oct 4 18:58:20 2021 -0500 🔨 Add 'opt_find' to find matching options commit d0c0630c1f91cb43dc23c1ed9e4c166d284785eb Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon Oct 4 19:12:19 2021 +1300 🩹 Fix EXTRUDER 0 compile warning (#22868) commit 11c829fb28a4fdc37ae86e6ac674589331f0712d Author: Sebastien Andrivet Date: Mon Oct 4 08:06:49 2021 +0200 🐛 Fix ExtUI Pause messages (#22874) commit e0dda615012a99e1ad591972b4bbc5238e7361a9 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon Oct 4 18:25:45 2021 +1300 🐛 Fix Arduino IDE compile error (#22877) commit a185ce22cf6e4fb15250815c5c39318606a7e65a Author: Scott Lahteine Date: Sat Oct 2 22:08:11 2021 -0500 Marlin 2.0.9.2 commit 2a4ee1a482278abb830c0f5180bfa7571c00c9f7 Author: Scott Lahteine Date: Sat Oct 2 21:54:07 2021 -0500 MKS Robin pins updates commit 3a82b8a25195f448018e7a2267d9916814434c65 Author: Cytown Date: Sat Jun 26 03:50:09 2021 +0800 🎨 Power-off tone followup (#22222) commit 765b2b43f6ea80920a3eb85be64f77ed8fe9dcbd Author: Scott Lahteine Date: Sat Oct 2 21:51:52 2021 -0500 🎨 FTDI Eve Touch UI spinner enqueue string commit 2e602b9b88e75a261d8d1a71c0857ce47f5e92fa Author: Steven Haigh Date: Thu Sep 30 02:22:46 2021 +1000 🚑️ Fix DWIN_CompletedLeveling (#22851) Co-authored-by: Scott Lahteine commit 5d3e75905d9316853462321bac7b43f635366768 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Wed Sep 29 04:20:03 2021 +0300 🐛 E3V2 Mesh Viewer followup (#22850) commit eacb660e4b1008245361d8db6054ef30ccf031fa Author: Scott Lahteine Date: Tue Sep 28 02:39:11 2021 -0500 🎨 Condense reverse-protection code commit 021ceeba0b0ccadd7246d5e2da56df7868349206 Author: Scott Lahteine Date: Tue Sep 28 01:07:51 2021 -0500 ⚡️ Handle shared enable pins (#22824) commit 25a131b9421c81245e1d9094fc85476349baf941 Author: Miguel Risco-Castillo Date: Mon Sep 27 14:47:47 2021 -0500 ✨ E3V2 (Enhanced) Mesh Viewer (#22844) commit b4c025a451580cdc15f9506e923c4ffe5afdde90 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Tue Sep 28 03:08:29 2021 +0800 🚸 Fix MKS LVGL UI temperature set interface (#22848, #22842) commit 604a01cd1a87850a5fe2fde1a204a9c313863db3 Author: espr14 Date: Mon Sep 27 21:05:52 2021 +0200 🎨 steps_to_mm => mm_per_step (#22847) commit 064f91e9b0e71b55dda7dea86881863190c37516 Author: Tanguy Pruvot Date: Mon Sep 27 21:01:47 2021 +0200 🚸 TFT backlight PWM / brightness (#22841) commit 34c9f649252f173b9c046dcab56d86e0526ed163 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue Sep 28 04:17:00 2021 +1300 🔧 Sanity-check BLTOUCH_SET_5V_MODE on 5V pins (#22840) Co-authored-by: Scott Lahteine commit 060b705dab5ad7eaf0f1babd6113d5908b485db9 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun Sep 26 04:59:29 2021 +0200 🩹 Fix M412_report formatting (#22834) commit 262cd757fc4b91592932d4335878bc0aaf45af20 Author: Scott Lahteine Date: Sat Sep 25 02:27:07 2021 -0500 🎨 Updated string macros commit dc4d2165f2175a5f0f2e492b3a4f3f4cecf15ead Author: Steve Wills Date: Fri Sep 24 22:12:43 2021 -0400 🐛 Add 'static' to fix 'duplicates' (#22826) commit bcd2a483da49030ae5f1837474c95b027f915340 Author: Manuel McLure Date: Fri Sep 24 19:08:07 2021 -0700 🐛 Fix M420 / M851 reports (#22829) Followup to 79c72ed821 commit d338872e8571e45c961d768b1d5068bff20e9daf Author: Scott Lahteine Date: Thu Sep 23 11:09:43 2021 -0500 🐛 Fix reset_hotend_offsets commit 2c30b75268a0cb7791c00b91579db6ab42b3dd28 Author: Scott Lahteine Date: Thu Sep 23 10:01:37 2021 -0500 🎨 Various multi-axis patches (#22823) commit 3deb54d0fde6bb84310e78ce3b70296041552af1 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Thu Sep 23 15:53:48 2021 +0800 ⚡️ Improve LVGL touch driver (#22817) commit 9ae6351a026d9b91813e8f1c3e7749e7f8cab790 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu Sep 23 18:58:52 2021 +1200 🐛 Fix anycubic_i3mega_lcd debug macros (#22820) commit b7f95dc8d4903122db3692fc7540a593983f1af1 Author: Scott Lahteine Date: Thu Sep 23 00:51:35 2021 -0500 🩹 Add MarlinSPI to more HALs commit 99647fa9403ef3c9f419000cb0be6667105f8aaf Author: Scott Lahteine Date: Wed Sep 22 00:19:26 2021 -0500 🎨 Less use of undef for RAMPS pins commit ea3df942137362e6916b51f8152389f1d6ac3415 Author: Scott Lahteine Date: Tue Sep 21 06:25:13 2021 -0500 🎨 Fix L64xx enable, clean up conditionals commit a37580e4e837b1de576a7b529f56d225fa6a6dde Author: Scott Lahteine Date: Mon Sep 20 18:44:35 2021 -0500 🩹 Remove extra #include, misc. style commit b3fd03198af688bbd7b3d74500c441007bcf890d Author: Dan Royer Date: Mon Sep 20 13:42:33 2021 -0700 ✨ Polargraph / Makelangelo kinematics (#22790) commit 71b8a22d96735791789aeceed4877b2f1edfdb3d Author: Lefteris Garyfalakis <46350667+lefterisgar@users.noreply.github.com> Date: Mon Sep 20 03:26:46 2021 +0300 🌐 Update Greek language (#22799) commit 669b68497cc0194fb963dfe8066e556f6ada03e4 Author: Scott Lahteine Date: Sun Sep 19 19:25:01 2021 -0500 🌐 Skip non-essential translations commit 6014dd9c7b06917a251506afcf9acf11a54c26a6 Author: Scott Lahteine Date: Tue Sep 21 02:42:01 2021 -0500 🔨 Improve pins_set script commit 5a54ba8316357c8bc4233bede1b29d5f62521fd0 Author: Scott Lahteine Date: Sun Sep 19 18:58:12 2021 -0500 🔨 Case-insensitive tests list commit be8e8260e2969ce80a1ff51a39deed23aba0e6d1 Author: Scott Lahteine Date: Sun Sep 19 18:40:56 2021 -0500 🌐 Reduce language file sizes commit 5d8ca7c9445dac3d8bb52eafd9c45826e9c3387b Author: Tanguy Pruvot Date: Sun Sep 19 05:16:29 2021 +0200 🐛 STM32 ADC followup (#22798) commit 0e8e215d4e173e6d742b6aa198859e1a6cf50089 Author: Tanguy Pruvot Date: Sun Sep 19 01:27:58 2021 +0200 🚸 Wake up TFT for some events (#22788) commit 6cf95509cd1483b52076322679e2426550fdf1df Author: Scott Lahteine Date: Sat Sep 18 18:24:39 2021 -0500 🎨 Replace some infrequently-used macros commit ded719cc1481c8b67a4015a0077294ba7640d20d Author: Scott Lahteine Date: Sat Sep 18 18:22:15 2021 -0500 📝 Update some pins comments commit 2630eefcc462b200c7bf748735387e7b055f300e Author: Steven Haigh Date: Sat Sep 18 16:33:18 2021 +1000 🐛 STM32 ADC Resolution = 12 bit (or ADC_RESOLUTION) (#22789) commit 2b54a9c0ff0351f92b7e835f7c8dafe6f9cc5390 Author: Scott Lahteine Date: Fri Sep 17 19:09:54 2021 -0500 🚸 Move fade item up commit bb1eb39ecbe2edfecb171b3e4f689b0413c5bf60 Author: Scott Lahteine Date: Mon Apr 12 17:08:57 2021 -0500 🚸 Better bed position commit 8b818f4ae561d6ef1ba708a78cc0ed5cb5054358 Author: Scott Lahteine Date: Fri Sep 17 18:58:55 2021 -0500 💬 Add non-translated STR_DONE commit 4d113c2efd1e17171b87f46053fb574842832a96 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Thu Sep 16 19:48:24 2021 +0800 🚸 Fix and improve MKS LVGL UI (#22783) Co-authored-by: makerbase <4164049@qq.com> Co-authored-by: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Co-authored-by: Scott Lahteine commit ab9609146f903a6490b0658405ba2b19199a99b6 Author: Scott Lahteine Date: Thu Sep 16 04:36:26 2021 -0500 💡 Adjust headers, formatting commit e7a25a45e6199118cb5d56a7d5fede82c3be31d7 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Thu Sep 16 03:46:16 2021 -0400 ✨ Improve pause/filament change for ExtUI (#22655) commit 023eaabc1ced8ff6daa52a6e1904bf68935254ae Author: Scott Lahteine Date: Wed Sep 15 21:12:39 2021 -0500 🔧 Add MANUAL_FEEDRATE sanity-check commit 03d7fbd755899d2ad549498f88f5376fe0cb60ae Author: Scott Lahteine Date: Thu Sep 16 01:15:01 2021 -0500 🎨 Handle more pre-defined pins in pins_postprocess (#22771) commit 89898181bd2e92b420228021c12308fdb4314221 Author: Miguel Risco-Castillo Date: Sat Sep 25 05:59:43 2021 -0500 🐛 E3V2 Brightness followup (#22821) Co-authored-by: Scott Lahteine commit e705a7724eace3970a1792933e1f614d07cc2667 Author: Scott Lahteine Date: Wed Sep 15 19:48:29 2021 -0500 🎨 Consolidate Ender-3 V2 DWIN common code (#22778) commit 5b593da04d6f87e79ee99430ed6d15a5e9e0d799 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Sep 15 13:51:52 2021 -0700 ✏️ Fix TFT field names (#22776) commit 9c4f9bc62a3a53af150dee8a69f65c56c033e65a Author: mks-viva <1224833100@qq.com> Date: Wed Sep 15 14:47:23 2021 -0500 🐛 Fix MKS Monster8 EEPROM issue (serial timer) (#22777) commit 84d1619127b19e9b6f159331d9dcb0b88398732c Author: Miguel Risco-Castillo Date: Wed Sep 15 01:44:28 2021 -0500 🩹 Fix DWIN Enhanced Tune menu during homing (#22773) Co-authored-by: Scott Lahteine commit 1386e78369067bda6e5dcd8eb32779d68e854e9f Author: Dakkaron Date: Wed Sep 15 02:00:48 2021 +0200 ✨ M282 - Detach Servo (#22760) commit 224371dfc6ba8de61d0255714b942df04c445da7 Author: Tanguy Pruvot Date: Tue Sep 14 04:07:08 2021 +0200 ✨ TFT Screen/Backlight Sleep (#22617) commit 033043218e6a55da72631aee6f2fc28f000f261e Author: Scott Lahteine Date: Mon Sep 13 18:46:30 2021 -0500 🔖 Configurations version 02000902 commit fcbd99d941bc680e6409998fdd4882eab5dba992 Author: Desuuuu Date: Fri Sep 10 12:15:08 2021 +0200 🎨 Use ExtUI API where applicable commit 209e5c27cab7ff337c5235aa885ef0891db41335 Author: Roman Moravčík Date: Tue Sep 14 00:10:30 2021 +0200 🌐 Update Slovak language (#22752) commit 92eb819aee1ac9581299339ebbb98356b0875a88 Author: Scott Lahteine Date: Mon Sep 13 16:38:51 2021 -0500 🐛 Fix old spindle/laser options commit de4eed33e49b889b9a29e417c991e4564bbe634c Author: Scott Lahteine Date: Mon Sep 13 16:28:12 2021 -0500 🔧 SPINDLE_LASER_PWM => SPINDLE_LASER_USE_PWM commit 59ad93560e337c622e6fa738489de3647844aec5 Author: Scott Lahteine Date: Sun Sep 12 21:41:24 2021 -0500 🐛 Fix CUSTOM_MENU_MAIN_SCRIPT_DONE Fix #22762 commit 50e52c0fdb8bba2e6b7d7a8463cc5349dc9daee9 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Sun Sep 12 22:39:52 2021 -0400 🐛 Fix ENABLED => EITHER typo (#22756) commit e679fafaaf6f59b4252b8abcf260e7d879cc1db5 Author: mks-viva <1224833100@qq.com> Date: Sun Sep 12 21:30:09 2021 -0500 ✨ MKS Robin Nano V1.3 (STM32F407VET6) (#22749) commit 6de25804ebff7f78da0a5e304073a97e8fca24bf Author: Scott Lahteine Date: Sun Sep 12 21:21:35 2021 -0500 🎨 Tweak custom menu item code commit ded8ee0a1dc2f4f6e47cf1ae61b705648cb6ccd1 Author: Scott Lahteine Date: Sun Sep 12 19:37:33 2021 -0500 📌 Creality 4.3.1 board variants (#22704) Co-authored-by: Chico commit 44d54a0d010c78ba43ebcf5283c30505e76e6098 Author: Luc Van Daele Date: Mon Sep 13 02:35:37 2021 +0200 🚸 G33 R and O options (#22707) commit 6e1c997a0a808602c25ea66ecca4c83fb14603de Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Mon Sep 13 11:03:24 2021 +1200 🐛 Fix Trigorilla Pro HAL/STM32 build offset (#22761) commit 17c9450f0c0ff96405ba8f60873adebd3aca91ff Author: Scott Lahteine Date: Sat Sep 11 15:41:42 2021 -0500 🎨 Apply more HAS_DELTA_SENSORLESS_PROBING commit d6a87aa75ba4ae20c4843b98341b3e6214cb3a7d Author: Scott Lahteine Date: Sat Sep 11 02:47:53 2021 -0500 🐛 No probe enum for DELTA + SENSORLESS_PROBING Fix #22729 commit 64acb9fe787c087bda466ca6189111785b30b448 Author: Scott Lahteine Date: Sat Sep 11 02:15:05 2021 -0500 🩹 Warn about user feedback requirement commit 22bf774d61cb013029279cb1516a1685bbb67181 Author: Scott Lahteine Date: Sat Sep 11 00:48:20 2021 -0500 🐛 Fix LPC1768 SD-based EEPROM debug Fixes #22746 commit e2a790b759f282232f07b5ef22218ec2d9b9ad6c Author: Marcio T Date: Fri Sep 10 19:03:46 2021 -0600 🚸 Enhance FTDI Eve Touch UI file select dialog (#22742) commit ee1c1034e5fc77509d10c4d9d4b3436b6cdc9768 Author: Scott Lahteine Date: Fri Sep 10 19:47:03 2021 -0500 🩹 Fix TOUCH_UI_FTDI_EVE warnings commit b661795ae5af15d773b9c148abe1c8005799dac4 Author: Scott Lahteine Date: Thu Sep 9 04:57:05 2021 -0500 🎨 Fewer serial macros commit 6d96c221bd8c3c6119870c6d90dc976c9e81dde2 Author: Scott Lahteine Date: Tue Sep 7 18:06:10 2021 -0500 🎨 Standardize G-code reporting commit a596faf4e5e4b47e50c9d2337a2b9d71fefa3719 Author: tome9111991 <57866234+tome9111991@users.noreply.github.com> Date: Sun Sep 12 21:56:40 2021 +0200 🐛 Fix JyersUI for LPC176x (#22745) Co-authored-by: Scott Lahteine commit 3ee27e7e353b0a08ff114a8c805491a39e59f4d1 Author: Scott Lahteine Date: Fri Sep 10 18:49:57 2021 -0500 🐛 Followup to JyersUI commit 6cf2cf7bd4bba98dbcb73fca43c14953b977da9a Author: Miguel Risco-Castillo Date: Tue Sep 7 02:15:24 2021 -0500 ✨ Ender-3 V2 CrealityUI Enhanced (#21942, #22728, #22733) Co-authored-by: Scott Lahteine commit 54416f780d892ba3ea42c522e5d5d7c0cf94acb4 Author: Jyers <76993396+Jyers@users.noreply.github.com> Date: Mon Sep 6 21:06:27 2021 -0700 ✨ Ender-3 V2 with Jyers UI (#22422) commit 9d73fcb959e04839084abb78e9286a778a07ec5d Author: mrv96 Date: Tue Sep 7 02:51:04 2021 +0200 ✨Add DGUS_LCD_UI_RELOADED (#21931) commit f434915ad67f3c92a2f88869861715c1334330e2 Author: Scott Lahteine Date: Mon Sep 6 17:38:47 2021 -0500 🚸 Show ExtUI message for PID_STARTED commit bbce951666fbe7994df6bd9d376d6cc583083d8d Author: Scott Lahteine Date: Mon Sep 6 16:33:24 2021 -0500 🎨 Misc. code cleanup commit 8a4fec946081b985d61932da30ccf416fc7719a0 Author: Scott Lahteine Date: Mon Sep 6 15:34:12 2021 -0500 🎨 Misc. Spindle/Laser (etc.) cleanup commit 3a835162323e8f23e3b1d5b96a4ec9e27bb16605 Author: Scott Lahteine Date: Sun Sep 5 21:23:56 2021 -0500 🚸 Per-hotend Watch items commit 03344a094739670074e3220564bd16a902df0fca Author: Scott Lahteine Date: Fri Aug 27 16:12:08 2021 -0500 🎨 MarlinUI for E3V2 tweaks commit 72d7bbbbf67b53100c66f203c0b0f7ef9124f57f Author: Scott Lahteine Date: Sun Sep 5 20:32:29 2021 -0500 🔧 Sanity checks for Ender 3 V2 commit 253f91765d839cb7b688eaed1586d20c51795722 Author: dotdash32 Date: Sun Sep 5 17:21:25 2021 -0700 🎨 Use largest default ST9720 delays (#22713) Co-authored-by: Scott Lahteine commit 4c7f8696ab2d12c915203f08973fb5c6ba53e5d6 Author: Dan Date: Sun Sep 5 13:32:09 2021 -0700 ✨ Protoneer CNC-Shield 3.00 (#22715) commit f94de97cdbdf799d39933897858b8ff1ac69e6dc Author: Justin Nesselrotte Date: Sun Sep 5 14:21:45 2021 -0600 ✨ Index Pick-and-Place board Rev.3 (#22647) Co-authored-by: Gonçalo Pereira Co-authored-by: Scott Lahteine commit bae19a3737952a4c39f2ebb62a060d6b8a0d0b1b Author: Tanguy Pruvot Date: Sat Sep 4 01:20:32 2021 +0200 🌐 Update "Homing" for some languages (#22706) commit cc3abcd2c50247dd934d49b91cc3b9460f1dc1a7 Author: Scott Lahteine Date: Fri Sep 3 17:26:36 2021 -0500 🩹 Fix 'ms' warning commit 9e18a543fa02bb103fd2ec35e7a26085227ce720 Author: Thomas White Date: Fri Sep 3 12:30:24 2021 +0800 ✨ Homing submenu option (#22692) commit 13bccd8441d26deb12fbbe82b8c45aaadd778c1d Author: Elliott Indiran Date: Thu Sep 2 20:41:41 2021 -0700 📝 Update PID_PARAMS_PER_HOTEND comment (#22694) Co-authored-by: Scott Lahteine commit 5af3dbdb308b8af3fb5fc53507dcb12779e121e3 Author: Tanguy Pruvot Date: Fri Sep 3 05:08:40 2021 +0200 🐛 Fix Mixing code typos (#22697) commit 9f43452fbd8421ad93f6b84499c821ef899c77c4 Author: DvoraNoob <62312359+DvoraNoob@users.noreply.github.com> Date: Wed Sep 1 21:29:20 2021 -0300 🚸 MKS UI extrusion speed/steps config (#22656) commit 61364906b3237749be02bc17cd8e05f250a74a43 Author: Tanguy Pruvot Date: Thu Sep 2 01:55:36 2021 +0200 🔨 Enhance Lerdge pins, TFTs, and variants (#22658) commit 105fd73c2868132ae687d5fd6b6102a0fc235e3c Author: Tanguy Pruvot Date: Thu Sep 2 01:45:17 2021 +0200 🩹 Allow M42 S0/1 analogWrite on PWM pins (STM32) (#22631) commit b4b69c0de376095e13d302088fa72393128eeedc Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Wed Sep 1 22:33:24 2021 +1200 🐛 BTT Octopus X MAX pin for IDEX (#22654) commit a37be7236bef7067949e1e3e76c0fa7d104ccecc Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Tue Aug 31 03:36:00 2021 -0400 ✨ GT2560 V4.x A20 (#22664) commit bba7c0069fec0e72a500abe96995e3439ba4d89f Author: Scott Lahteine Date: Sun Aug 29 20:44:55 2021 -0500 ✨ Creality3D CR-30 PrintMill commit 8916b05cb46e310e261902301afd0ae2b301159e Author: Scott Lahteine Date: Sun Aug 29 20:54:51 2021 -0500 🎨 Tweak pins, comment formatting commit 99028376e694cb3e50181f0c09e614a15f4783e5 Author: Scott Lahteine Date: Sun Aug 29 20:54:17 2021 -0500 ⏪️ Clean up Info Menu commit c2796fbf3bf9464943392043c87eaabbcdda615d Author: Scott Lahteine Date: Sun Aug 29 20:52:48 2021 -0500 🌐 Tweak language selection commit 37777a78bfface664094318cc53ec161e9eb985f Author: Scott Lahteine Date: Thu Aug 19 19:16:46 2021 -0500 🐛 Followup to CrealityUI cleanup Followup to #22586 commit 0da0aa9b2ecf7ef2820509255c6ba7a245a9c63c Author: Scott Lahteine Date: Fri Dec 11 18:15:36 2020 -0600 ⚡️ Add PROBE_PT_LAST_STOW commit 9ffd3ed2e40d943db731d27f5c26c76adbd31904 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue Aug 31 19:26:12 2021 +1200 🔧 Set Z_PROBE_OFFSET_RANGE_MIN/MAX for MBL (#22663) commit 1176c108600e4d45e3b4e836a585e51e68167414 Author: Scott Lahteine Date: Tue Aug 31 02:23:49 2021 -0500 🩹 Clean up BTT_SKR_CR6 Fixes #22665 commit 2e9f819d5f7533752965fe01ed1e7f030e6a71a3 Author: Jason Smith Date: Tue Aug 31 00:00:59 2021 -0700 🚸 Improve Tramming Wizard usability (#22672) commit 19353fc98c984a7ebc752d99c1034a3dd01ffa8d Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue Aug 31 15:40:49 2021 +1200 ⏪️ Revert MAX31865 recent changes (#22660) commit b21d62543fd1e1e10b5d69cc86fd7f386001176a Author: Christian Schuster Date: Tue Aug 31 02:32:02 2021 +0200 🩹 Fix LPC176x M43 formatting (#22680) commit a42ecb843e17ce52c4f4a27dc7be5441c966da19 Author: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> Date: Tue Aug 31 02:30:14 2021 +0200 🌐 Update Hungarian language (#22678) commit 93ff2cb08685e679f5f7d70e52b07f4640f082c6 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Aug 31 00:05:11 2021 +0200 🌐 Update Italian language (#22645) commit 086fa0f0a738e7a3b97ea15b2b3decf41e197882 Author: Scott Lahteine Date: Mon Aug 30 17:02:12 2021 -0500 🔨 Fix HAL/STM32 F103Zx builds (#22610) commit 5e97f37a78f1e91e37d3ede5fe225288c03d0309 Author: Scott Lahteine Date: Sun Aug 29 23:06:24 2021 -0500 🎨 screws_tilt_adjust_pos => tramming_points commit c14b162b9e213eceaa20f5251c742100d605a79e Author: Scott Lahteine Date: Sun Aug 29 23:02:53 2021 -0500 🌐 MSG_PROBING_MESH => MSG_PROBING_POINT commit 61c000d96f184388f5f42d7501895138fc328eba Author: Scott Lahteine Date: Sun Aug 29 20:04:14 2021 -0500 🔨 Three columns in mftest menu commit c06a183f28ea4d40ea7757d441a46cc733cd6a12 Author: Marcio T Date: Sun Aug 29 16:05:30 2021 -0600 ⚡️ Fix, enhance FTDI Eve Touch UI (#22619) commit d1db17c6f5e024d148ef4d0b5fea0d89e24ff3e5 Author: Marcio T Date: Sun Aug 29 16:03:10 2021 -0600 ⚡️ Enhance and fix FTDI Eve Touch UI file select (#22651) commit d336a4d71b8315e7b4d62395b6d6d87306b58ae9 Author: Scott Lahteine Date: Sun Aug 29 15:15:53 2021 -0500 🐛 Fix SDSUPPORT for SKR CR-6 (#22668) Co-authored-by: Sebastiaan Dammann commit 796309c9035ca21df64388d27e65b4c3a64436a8 Author: Scott Lahteine Date: Sun Aug 29 13:57:47 2021 -0500 ⚡️ Improve G2/G3 arc handling (#22599) commit 53df1dfe4d8bae533812b8ccd8ed90cd9dc041d9 Author: Scott Lahteine Date: Sat Aug 28 17:46:22 2021 -0500 🩹 Sensorless homing tweak commit 6769718264d5786028e633aab96f346fedaef8f5 Author: Scott Lahteine Date: Sun Aug 29 13:51:57 2021 -0500 🎨 Update more EXP Headers commit 7704d844198deb50feb74326f94385c67eb44aba Author: Scott Lahteine Date: Sat Aug 28 15:27:52 2021 -0500 🎨 EXP headers, ST7920 delays (#22641) commit 9b0e196ba2fab7fb1afcbed80e702e1f26dd806e Author: Scott Lahteine Date: Fri Aug 27 17:23:08 2021 -0500 📝 AlephObjects => LulzBot commit fd594ab176260adf4e3bd04b6f7fb8bbaded85b0 Author: Tanguy Pruvot Date: Fri Aug 27 23:06:45 2021 +0200 🔨 Set Longer3D timers in variant (#22632) commit 8cadcf6bb61d5605244c1cb926b9269650ddf402 Author: Tanguy Pruvot Date: Thu Aug 26 01:08:27 2021 +0200 🩹 Tweak startup message (#22633) commit 22fdfa96292a2cd2490920b031567a0fab5eb22a Author: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Thu Aug 26 01:05:06 2021 +0200 🔨 Melzi with OptiBoot build (#22630) commit a0ebe7c8ff846e94755c86cda076abc839388132 Author: Jin <3448324+jinhong-@users.noreply.github.com> Date: Thu Aug 26 06:33:08 2021 +0800 🩹 Use in MAX31865 lib (#22618) commit 125c5bc345615cdf0dfdb329473370a20d503721 Author: Ryan V1 <55478432+V1EngineeringInc@users.noreply.github.com> Date: Tue Aug 24 20:34:10 2021 -0700 🐛 Fix Multi-Endstop stepping (#22625) commit 95f27cf33970a332442ab3393c1e5e2b700a14be Author: Scott Lahteine Date: Tue Aug 24 18:07:41 2021 -0500 🎨 EXP1/2 headers and pins cleanup (#22628) commit 02ae4bc9b94512c0b4e32c7b017eea834098e15f Author: Scott Lahteine Date: Tue Aug 24 14:55:12 2021 -0500 ✨ New board TH3D_EZBOARD_LITE_V2 (#22621) commit 6bf2be66ed22b1662d6eaad54697ad0d02fc062e Author: Scott Lahteine Date: Mon Aug 23 19:42:15 2021 -0500 🎨 Define FYSETC S6 and TH3D EZBoard EXP1/2 pins commit d8ef23eda7fc5391057c8375988426fdfdf77b27 Author: Chris Pepper Date: Sun Aug 22 22:47:37 2021 +0100 🐛 Fix LPC176x M43 Pins Debugging (#22611) commit 73ef26a106e618aa9fd4ffce2c8779a214f9facd Author: Scott Lahteine Date: Sun Aug 22 05:25:07 2021 -0500 ✨ MarlinUI for Ender 3 v2 DWIN LCD (#22594) Co-Authored-By: Taylor Talkington commit d51e70083dbc57563ef8bc2a816a72db2696d053 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun Aug 22 11:05:39 2021 +1200 ✨ BOARD_RUMBA32_BTT (#22607) commit dc5ae16861e8240d379f0c3e54e4fbe5772cbbce Author: Scott Lahteine Date: Sat Aug 21 18:00:55 2021 -0500 🎨 Misc code and spacing cleanup commit 0aa87af82f90be409e85e9c6f2792e912396a709 Author: Scott Lahteine Date: Sat Aug 21 15:07:52 2021 -0500 🎨 Tweak TMC software serial pins commit 0be98b98a78692ca4c899413eaf0026843559511 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat Aug 21 12:19:02 2021 -0700 ⬆️ TMCStepper 0.7.3 (#22608) commit f7ce107ac6fe6891c98367b08d7963b9fce59715 Author: Fjederhaek Date: Sat Aug 21 00:45:05 2021 +0200 🐛 Update H-bot / Core for 6-axis (#22600) Followup to #19112 commit 3f772df56830aa990cbafab72ae13d81bf8e4e76 Author: Scott Lahteine Date: Fri Aug 20 15:40:17 2021 -0500 🌐 Update menu titles, add more IJK (#22605) Followup to #19112 commit caa6ec051917f60c8f8a8fb3079844e57ba8086f Author: Scott Lahteine Date: Thu Aug 19 17:38:05 2021 -0500 🐛 Show bed size as 'work:' in M115 Fixes #22598 commit 30665737dcd4296727154159b174164a5104e6a2 Author: Scott Lahteine Date: Sat Jul 24 21:41:09 2021 -0500 🎨 Fix some formatting, F() versus PSTR() commit 0c401bddad7eecc4acf6960cd31726e1fc31572b Author: mks-viva <1224833100@qq.com> Date: Fri Jul 9 17:59:36 2021 -0500 ✨ MKS MINI12864 V3 for MKS Robin Nano V2/3 (#22285) commit eb0d80cb196f6735db80897f4623a548555e16dd Author: Scott Lahteine Date: Fri Aug 13 16:32:25 2021 -0500 🎨 Update MKSPWC, some other pins (#22557) commit e62486a6109f0ff9c22140d717c6a73e484d19e2 Author: charlespick <17918019+charlespick@users.noreply.github.com> Date: Wed Jul 28 14:09:33 2021 -0700 ✨ M76 Host Pause Feature (#21738) commit 51d954a4fd455c92ac7be7cf73f6fdae1baf2727 Author: chendo Date: Fri Jul 23 13:53:00 2021 +1000 ✨ D576 Buffer Monitoring (#19674) commit 416234f43a347394d639fbacc3183891d7b0bb50 Author: Scott Lahteine Date: Wed Aug 18 20:12:41 2021 -0500 ✨ Add TEMP_SENSOR_BOARD (#22279, #22342, #22343, #22344, #22350) commit 9ddb4de70ac23685b98ce0e2b25f3d24ae87c7b6 Author: Katelyn Schiesser Date: Sun Jul 11 22:13:58 2021 -0700 ♻️ Consolidate PSU_CONTROL (#22304) commit 9741be59668582b976514e61b1514ac496eafe38 Author: Cytown Date: Thu Jun 24 00:40:32 2021 +0800 ✨ Power-off confirm / beep options (#22191) commit ecb625a666c48db25d81cea597951dae25f6b2ac Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Thu Aug 5 00:45:49 2021 -0400 ✨ Mixer Presets (#21562) commit de7f6c425bcfce4f3c35a1a5a6fbf79fcf10d700 Author: Scott Lahteine Date: Tue Aug 17 06:18:19 2021 -0500 ♻️ Clean up CrealityUI and MarlinUI (#22586) commit 718227a94c0cb163a73f0f288be6f7b864b7127a Author: Scott Lahteine Date: Wed Aug 18 14:54:56 2021 -0500 📌 Disregard TMCStepper 0.7.2 commit bb12ebcca616742b3459a8176b54a2139dc39c43 Author: Tanguy Pruvot Date: Wed Aug 18 05:39:08 2021 +0200 🐛 Fix STM32 delay, double reset in FSMC TFT init (#22584) commit 2e14bf15ddd4023a88b9e4f6d182d081389824b9 Author: Tanguy Pruvot Date: Wed Aug 18 05:37:27 2021 +0200 🐛 Fix Longer3D PWM/timer pins (#22583) commit 11070b79a3aceb600c260cb8eb0758f46b7b4784 Author: Jason Smith Date: Tue Aug 17 20:35:12 2021 -0700 ⚡️ Simplify PROBING_STEPPERS_OFF (#22581) commit 4219ae91067c4de8c13712f10598b4f9647486bd Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Aug 17 20:27:21 2021 -0700 ⏪️ Revert ABL G29 feedrate (#22574) Reverts 9130f58 commit f803d74bc9602192f99053ff86731dd2d6c778f5 Author: Scott Lahteine Date: Sun Aug 15 21:31:00 2021 -0500 💚 Update STM32F103RET6_creality test path commit f0bca66d45f5efc8310edf938ee662f091ef10b8 Author: Scott Lahteine Date: Sun Aug 15 19:02:08 2021 -0500 🐛 Fix LCD_COL_X_RJ Followup to #22471 commit b3c8d9bec8bcd15d8ff7b3261e287309b08ad9d5 Author: Tanguy Pruvot Date: Fri Aug 13 05:40:52 2021 +0200 🚸 Fewer CRs in settings report (#22560) commit 4a7d3a336b7bcb2412557e9f971b9ccce5e77326 Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Fri Aug 13 12:26:26 2021 +0800 🐛 Fix some BTT SKR2 pins (#22558) commit 65e39116cb1f2cc914125654bb4f83b12892fb55 Author: Scott Lahteine Date: Wed Aug 11 18:19:55 2021 -0500 🔨 Use zip link for MarlinSimUI commit 0c97a2afdc700caa5f55e6d148df25ece8576900 Author: Tanguy Pruvot Date: Thu Aug 12 00:58:28 2021 +0200 🐛 Fix M575 port index output (#22553) commit 9c19d4705ebd67e6769853d86b6237086a5426aa Author: Scott Lahteine Date: Tue Aug 10 23:49:56 2021 -0500 🎨 Tweak M73 condition commit be55401e3c30d5e53a5b8ae985f2c40605e1cf27 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Thu Aug 12 11:06:09 2021 +1200 🚸 Better error for MOTHERBOARD not defined (#22551) commit c612b56bc101ce66d45e85b255bf74e85df7bc4f Author: luzpaz Date: Tue Aug 3 20:02:34 2021 -0400 🐛 Spellcheck comments (#22496) codespell -q 3 --builtin=clear,rare,informal,code -S ./Marlin/src/lcd/language -L alo,amin,endcode,stdio,uint commit 8385be25cd83e595f7ffbbd6dd2ec3e22a963753 Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Sun Aug 1 00:42:26 2021 -0300 🔨 Fix (RRF E3) RX/TX buffer size override (#22475) commit 2a323d0a8ebea712183b65aa76f1ac9f39692133 Author: Miguel Risco-Castillo Date: Wed Aug 11 21:00:47 2021 -0500 🐛 Fix Ender-3 v2 language init (#22550) commit c544711f14fe65638508cfc2408e870f74b8a5c6 Author: Scott Lahteine Date: Sat Jul 31 05:32:13 2021 -0500 🚚 Relocate and adjust DWIN E3V2 (#22471) commit a348f8e02cae7c296700e25155775a1604537413 Author: Scott Lahteine Date: Fri Jul 30 19:39:38 2021 -0500 🔨 Fix: BIGTREE_E3_RRF doesn't use user RX/TX sizes Fixes #22466. Regression from #22377. commit 42d9b4c91f35ac07097bf387755ca7d0248dea5b Author: ellensp Date: Fri Jul 30 11:25:06 2021 +1200 📝 Document DGUS display options (#22443) commit 7d0efb452a7b0da2ce81a5c13ed444e0507aa33e Author: Scott Lahteine Date: Fri Aug 13 18:49:27 2021 -0500 🎨 Update HAL/STM32 wrappers Followup to #22537 commit 418743cf6aaf3372ff1ec6610028db7cbcd9fc94 Author: Scott Lahteine Date: Tue Aug 10 02:53:28 2021 -0500 🚸 Set M122 interval only with S0 or Pn commit eafd0ed7656586d6eef4364afb314d46c5a4428d Author: Scott Lahteine Date: Tue Aug 10 02:39:50 2021 -0500 🐛 Use delete [] for new [] commit 0c0f84b6598ddcf5187706ab20ccdf944eeb2f31 Author: Scott Lahteine Date: Mon Aug 9 16:07:15 2021 -0500 🐛 Fix CoreXY plus extra axes See #22490 commit 166324fc7b12119d5deded9ff51188bd6cba3173 Author: Marcio T Date: Wed Jul 14 21:13:08 2021 -0600 🐛 Fix and improve FTDI Eve Touch UI (#22361, #22439, #22459, #22468, #22500, #22530) commit 3924545912f3379f291355797a361c9e58c3840f Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Sun Aug 8 19:45:51 2021 +1200 ✨ Zonestar ZM3E2, ZM3E4 V1, ZM3E4 V2 (#22498) commit 86e78410d6e1a36c74d9ab502a622fa2825931d3 Author: Tanguy Pruvot Date: Mon Aug 9 04:37:27 2021 +0200 🚑️ Init FastIO before anything else (#22508) commit 157c60c93bb79ff2e35dd5c6877da75615008884 Author: Scott Lahteine Date: Sun Jul 25 02:12:48 2021 -0500 🌐 Level Corners => Bed Tramming commit d7f3228ec6170c64a4caf64b965a8a59c528258e Author: George Fu Date: Sun Jul 25 16:40:43 2021 +0800 🔨 Fix FYSETC S6 envs (#22421) Co-authored-by: Scott Lahteine commit c56ac0c34a0cad9177e87951aae4071d73cdac68 Author: Scott Lahteine Date: Sun Jul 25 02:19:30 2021 -0500 🎨 Misc. Cleanup commit e71fa2b64982fa949125e3056308b6bc010de3ee Author: Scott Lahteine Date: Sun Jul 25 03:58:16 2021 -0500 🎨 Add DWIN_StatusChanged_P commit fefde2a6448c5e5296095fe1525dc76cfe2238b0 Author: Scott Lahteine Date: Thu Aug 5 23:24:20 2021 -0500 🐛 Fix fan index for Singlenozzle, chamber fan Fixes #22512 Followup to #19152, #19519 commit a668a9d302ff92f413360aff664675f52ed99650 Author: Scott Lahteine Date: Sun Aug 8 21:31:10 2021 -0500 🏗️ Define HAL_STM32 for HAL/STM32 (#22537) commit e3c294dc9b379d80d59857c07428534ae33c408b Author: Jason Smith Date: Sun Aug 8 19:25:17 2021 -0700 🐛 Fix some Simulator on Windows issues (#22516) commit dc677050492fffc91e4c6d6ab08edc3c5ba04f97 Author: Chris Pepper Date: Thu Jul 22 01:01:23 2021 +0100 ✨ Simulator HAL and build targets (#22418) commit e0fa6ed4f84f892d987221bb28f6cfd0d536c32a Author: mks-viva <1224833100@qq.com> Date: Sat Aug 7 22:17:43 2021 -0500 📌 MKS pins for PSU_CONTROL (#22528) commit a4cd654e485e9b69f88ee8c50f331d635c228704 Author: ellensp <530024+ellensp@users.noreply.github.com> Date: Sat Aug 7 08:54:02 2021 +1200 🐛 Fix MKS 'USB Flash MSC' environments (#22515) commit 06b963d9eae9e9ea5f2eec2f71635d6bf9fd194c Author: mks-viva <1224833100@qq.com> Date: Sat Jul 31 00:47:30 2021 -0500 ✨ MKS Monster8 board (#22455) commit a36a6685aec273ff7753f0055466199436abe91b Author: Scott Lahteine Date: Mon Aug 2 17:08:35 2021 -0500 🐛 Fix up endstop flags (#22487, #22525) commit 83b8a0f2acef4c5cb01a075aac9a911688a97433 Author: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Mon Aug 2 07:13:57 2021 +0200 🐛 Followup to 6 linear axes (#22482) commit 1866f51d08a6bc07a30e23fee0a1cdb4da0ef246 Author: Grayson Date: Sat Jul 31 22:55:22 2021 -0500 🐛 Fix G38 with probe on Z_MIN (#22452) commit 4b2fdbeeb1329144e3a0d19c0f8458a8b4b86d82 Author: Scott Lahteine Date: Sun Aug 1 14:28:53 2021 -0500 ✨ M256 LCD brightness (#22478) commit eeac85642ff4e4539773f1aeeb43c8bcfe4e520c Author: Tanguy Pruvot Date: Sun Aug 1 21:43:31 2021 +0200 🔨 Offset/encrypt/rename for Maple STM32F1 (#22477) commit 0bbe85d3e7944beb12240078cde841fbd1ee3edf Author: Scott Lahteine Date: Thu Aug 5 00:19:21 2021 -0500 🚸 Fix BLTouch spelling commit 0af762d609f4aa9ae7b6ebbf4cca46c46f0ddbf4 Author: Tanguy Pruvot Date: Thu Aug 5 06:47:31 2021 +0200 🚸 Prevent M42 unintended pin change to output (#22493) commit b567717762a0fe652d717981a5cb2156bb687818 Author: Scott Lahteine Date: Wed Aug 4 16:37:02 2021 -0500 🐛 Prevent ABL G29 setting a funky feedrate See #22472 commit 2b2a8355c9ac2c9361c8e21b533ad772a0756d28 Author: Tanguy Pruvot Date: Wed Aug 4 08:14:54 2021 +0200 🐛 Fix Longer3D STM32 boot, add Maple test (#22473) commit ac64d6915f9914948cf76d7b530406329801fd3a Author: Scott Lahteine Date: Wed Aug 4 17:01:42 2021 -0500 🐛 Fix report_a_position ABC criteria commit 1bee38a1c1fb43732f47ce6c9546fd90ac51903c Author: Tanguy Pruvot Date: Fri Aug 6 22:51:10 2021 +0200 🎨 Fix "'EEPROM' unused" warning (#22511) commit 4e54fa2320b260c76f9dbe3f1baf9927251152c6 Author: Scott Lahteine Date: Sun Aug 8 01:24:15 2021 -0500 💚 Fix tests for new sanity-checks commit eba0ae4ee13d89713a81e6ace1b3446466b8a203 Author: Scott Lahteine Date: Sat Aug 7 16:06:51 2021 -0500 🔧 Sanity-check DEFAULT_EJERK with LIN_ADVANCE See #20649 commit d49a26bcc6af6bc27534edb187a3aa846bd8e72f Author: Scott Lahteine Date: Sat Aug 7 15:59:00 2021 -0500 🔧 Sanity-check Mixing plus Disable Inactive Extruder See #22166 commit a2759bc245ffcb965daf2c2a34e25515b684872a Author: Scott Lahteine Date: Tue Aug 3 18:29:20 2021 -0500 🐛 Allow SKR Pro CONTROLLER_FAN_PIN override Followup to #22411 commit f642d8b79e5eb1dc7ee63ff0a1c133ffa0cf63fd Author: Bob Anthony <42719046+bob-anthony@users.noreply.github.com> Date: Tue Aug 3 23:45:08 2021 -0500 🐛 Fix extra E move in toolchange with ..._NO_RETURN (#22504) commit bc773e9c9629fdb8a9ba4b08132ea8b6bb1e4ce9 Author: ellensp Date: Sun Aug 1 19:09:29 2021 +1200 🐛 Fix sprintf_P compile error (Maple) (#22479) commit ffde28428893452bd315bed8780bdeb23ce3f282 Author: Scott Lahteine Date: Sat Jul 31 23:27:10 2021 -0500 🎨 Adjust settings.cpp indent commit e3b05dd6c2fb53ca33aafd1805b9d8f3035a439c Author: Tanguy Pruvot Date: Sat Jul 31 06:49:12 2021 +0200 🔨 Update Longer and Chitu envs (#22467) commit 8e84d24737c8571173834041c1a570c76716ef16 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Sun Aug 1 06:00:18 2021 +0300 🐛 Fix custom menus on MKS UI (#22470) commit 981191660d705f56fb2e8662b06e1d745f2e6fc0 Author: Scott Lahteine Date: Fri Jul 30 23:05:53 2021 -0500 🐛 Fix custom menus on TFT LVGL Fixes #21423. Regression from #18177. commit 245b6e0884e9f421230520789bd72f49b20e4720 Author: Scott Lahteine Date: Fri Jul 30 22:43:58 2021 -0500 ✅ Custom logging for MBL commit c7530719615b37eb7f901135b4fb2d94ad30dda8 Author: ellensp Date: Sat Jul 31 12:50:22 2021 +1200 🐛 Fix DGUS displays compile (#22464) commit 22ef6362ae3180e4265f5063045b530efbd5ae14 Author: Scott Lahteine Date: Fri Jul 30 19:39:38 2021 -0500 🔨 Fix: BIGTREE_E3_RRF doesn't use user RX/TX sizes (#22475) Fixes #22466. Regression from #22377. commit 80f8ec94aad435b0b1f3758ca013d4dc085e0e05 Author: Scott Lahteine Date: Wed Jul 28 23:24:30 2021 -0500 🔧 HAS_CUSTOM_PROBE_PIN => USES_Z_MIN_PROBE_PIN commit 381c5908b4f0a24d7fad7becfd2f72f4e5056814 Author: mks-viva <1224833100@qq.com> Date: Wed Jul 28 21:56:22 2021 -0500 📺 MKS MINI12864 V3 for Robin E3P, etc. (#22453) commit fbb5732dee4ba9f803ac873206421877f8ba7b9f Author: ellensp Date: Wed Jul 28 16:28:15 2021 +1200 🐛 SAV_3DGLCD conditionals (#22447) commit 90ed772590ac634e605797effee3ef5f13dc2243 Author: George Fu Date: Fri Jul 30 09:09:38 2021 +0800 ⚡️ Larger FYSETC S6 I2C EEPROM size (#22424) commit 3e559d5c1ca2cbdbb904de779ed9bb6029880890 Author: Scott Lahteine Date: Thu Jul 29 23:40:27 2021 -0500 🎨 abs => ABS commit eb8649ba42f86159bd51b1ee366bd3291c05aafc Author: Marcio T Date: Fri Jul 23 16:02:39 2021 -0600 📺 Fix and optimize FTDI Eve Touch Interface (#22427) commit 99f917c02225e4a610d02807a4335d36bad7ef03 Author: vyacheslav-shubin Date: Wed Jul 28 22:55:04 2021 +0300 🐛 Reset workDirDepth in cdroot() (#22441) commit 55cf3bd5eed67e72e9359dff152615035816afd7 Author: borland1 Date: Wed Jul 28 15:45:32 2021 -0700 🐛 Fix LCD Menu MBL Z-Offset Adjustment (#22450) commit 776ededca44d6a04c4c23afe82a42065b966aee8 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Jul 28 12:56:26 2021 -0700 🐛 Fix SKR Pro bad directive (#22438) commit b16a72a7e6a725e4e5d65f48580a900f2c8652b0 Author: Tanguy Pruvot Date: Wed Jul 28 06:30:41 2021 +0200 🐛 Fix Longer3D SDSS / SD_SS (#22444) commit f9809ca75aff3434fffaf26bba04106a973bb73e Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat Jul 24 17:08:47 2021 -0400 🐛 Fix delta calibrate manual move scale (#22430) commit e402f43c028852c880e1acfb2632550daa949d0e Author: Scott Lahteine Date: Sat Jul 24 15:55:45 2021 -0500 🎨 NULL => nullptr commit 2aad79fa15d5a51180270ed1afa44c7065576283 Author: Scott Lahteine Date: Sun Jul 25 02:07:34 2021 -0500 🐛 Fix some board names commit 89e84fec61da126a7d59cad41f354d6219407034 Author: tome9111991 <57866234+tome9111991@users.noreply.github.com> Date: Fri Jul 23 23:47:38 2021 +0200 📝 SKR E3 Turbo custom cable description (#22426) commit 8d34a99d8f02881c5a1e670255c1a413cc668cfb Author: Luke Harrison Date: Wed Jul 21 07:43:33 2021 +0200 🔧 Octopus SPI display pins, fix USB build env (#22412) commit 15cf97f0d5afa9d3590f0066fba48c98fbdf1fb7 Author: luzpaz Date: Sun Aug 8 03:26:54 2021 -0400 🎨 Spellcheck code (#22531) commit c158d8023e38313eeccad4fb3e54f1b2cd3a65a3 Author: ellensp Date: Wed Jul 28 09:05:44 2021 +1200 💚 Specify compatible Teensy @4.12 (#22448) commit bc68664c3b198599c4ea4095313f79e78c01396a Author: Tanguy Pruvot Date: Mon Aug 9 04:37:27 2021 +0200 🚑️ Init FastIO before anything else (#22508) commit 924e4f95c8676aea02b5c33cb230b8ea9d84546a Author: Scott Lahteine Date: Wed Aug 4 16:48:06 2021 -0500 🚸 Ask for bed leveling on bug form commit 35df24e1cbf5b71166580f28389a7c4bd7f54120 Author: Scott Lahteine Date: Thu Jul 29 23:41:48 2021 -0500 🐛 One-based G35 point index output commit 74b0133bc911676bf8af6cc2f8a43429993faf64 Author: Scott Lahteine Date: Thu Jul 29 19:55:04 2021 -0500 🐛 Fix 5-axis no extruder compile Fixes #22446 commit 12581bcc44f959b9aa015f082ac9069113a4939f Author: Scott Lahteine Date: Thu Jul 29 19:34:49 2021 -0500 🐛 Fix 3-point leveling position See #22457. Fixes a G29 regression from #19112. commit c7c56ac45f9120b7d972d21427312e5282f82606 Author: Scott Lahteine Date: Thu Jul 29 22:59:33 2021 -0500 🐛 Fix PAUSE_MESSAGE_PAUSING=>PARKING Fixes #22250. Regression from #17460. commit 603b65e843b98a5d2d7f8c8f64be3980656c0522 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Mon Jul 19 05:39:01 2021 +0300 ✨ Laser support for TFT GLCD (#22391) commit 2e5e5c4a1d54cb33eb08f1591c69e8275acf6411 Author: Scott Lahteine Date: Tue Jul 20 23:35:56 2021 -0500 🎨 BTT SKR Pro pins auto-assign (#22411) Co-authored-by: MarkusThur <83773817+MarkusThur@users.noreply.github.com> commit bcc31f68c660b6bc8a7599a3dd951c0b4f06edc3 Author: Scott Lahteine Date: Thu Jul 29 22:23:06 2021 -0500 🐛 Fix PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED Fixes #22295. Regression from #20241. commit f8f68f9259cc486fd36147f4f9d1e474940510dd Author: ellensp Date: Thu Jul 22 09:31:11 2021 +1200 🎨 MKS Hardware Test followup (#22414) Co-authored-by: Scott Lahteine commit 7773504afa546884f533fabefa1497547431bcdf Author: Katelyn Schiesser Date: Tue Jul 20 12:20:28 2021 -0700 ♻️ Refactor STM32 ini files (#22377) Co-authored-by: Scott Lahteine commit 6b73b6c966b1a31a1fc2ce67f827265ff3777189 Author: VTXtruder <87478332+VTXtruder@users.noreply.github.com> Date: Tue Jul 20 23:27:19 2021 -0400 ✨ Chitu3D V9 board (#22401) Co-authored-by: Scott Lahteine commit 29dde9be2b9fb52641d4fa804b097852f69e68f4 Author: Tanguy Pruvot Date: Sun Jul 18 00:16:57 2021 +0200 🐛 Fix Longer3D build environment (#22378) commit b6cb56f396e58b95d7e3f7750f388373bfbd01dd Author: ellensp Date: Thu Jul 15 14:07:46 2021 +1200 🔨 More HAL/STM32 targets (#22358, #22369) commit 8283f1577a8ea24a4607c74c7ccf8d3292d3d3bc Author: ellensp Date: Wed Jul 21 07:44:15 2021 +1200 🐛 Fix STATUS_COMBINE_HEATERS compile (#22405) commit 0e9eb5f6cef2e01fac961dd49c39e5b136cde985 Author: Mike La Spina Date: Sun Jul 18 20:11:24 2021 -0500 🐛 Fix Ammeter display on DOGM (#22384) commit 61d0b082989d506b7e0716a792c104389cd6d8c1 Author: Katelyn Schiesser Date: Sat Jul 17 23:10:13 2021 -0700 🎨 Prefer DELAY_NS over DELAY_CYCLES (#22382) commit b57f73a4883fc732b0c413e45d8614791bad4298 Author: Scott Lahteine Date: Sat Jul 17 03:10:54 2021 -0500 🎨 Add MMU2 enabled() accessor commit 40b99d8084b235625ffe8701ce859219d52838c5 Author: Yash <76577754+yash-fn@users.noreply.github.com> Date: Tue Jul 20 14:51:41 2021 -0500 🐛 Fix G2/G3 angular motion calculation (#22407) commit c944e4fc6009cfc6e11f97b63f6ea817b8470071 Author: vyacheslav-shubin Date: Tue Jul 20 23:12:08 2021 +0300 🩹 Init var to suppress invalid warning (#22396) commit eebab93358427b3b95b4d38dedbbb8aaaba977b8 Author: Katelyn Schiesser Date: Sun Jul 18 18:24:27 2021 -0700 🐛 Ensure Software SPI pins for Max Thermocouple (#22389) commit 0074ea5e0bc5d9abd24fd872fc6117ae491b7be7 Author: Scott Lahteine Date: Sun Jul 18 19:56:28 2021 -0500 🐛 Change font for selected language (#22381) commit e190684fe6ae4bf1a885508dbf39a6477ad274a5 Author: Roxy-3D Date: Mon Jul 19 18:59:06 2021 -0600 🐛 Fix UBL G29 J - Vector3 regression commit 69c1e79c302e936d15957a98795afc8d57495ab6 Author: Katelyn Schiesser Date: Tue Jul 20 13:13:25 2021 -0700 🐛 Fix BTC_SAMPLE_RES sanity check (#22394) commit b3a3d81406ab94ff4fcbffa6179b9e52309f712e Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Jul 20 12:54:02 2021 -0700 🎨 Fix unused lambda warning (#22399) commit f1161a9a5f104ba2d06eb84c4241290e614a7d2b Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Mon Jul 19 05:21:51 2021 +0300 🐛 Fix MKS UI compile (#22388, #22395) Co-authored-by: Scott Lahteine commit 95f0970d85c2b32b6ef0efe4860e8aa25cdcb04d Author: squiddity Date: Sat Jul 17 22:50:39 2021 -0700 🐛 Fix M913 typos (#22385) commit 31a3cc6278cd10c67ba9a24a907e6dcc7fbd3498 Author: Scott Lahteine Date: Sun Jul 18 00:45:17 2021 -0500 🐛 No translated serial strings commit 6e7c20e78e1036140d9e076f71759e35f91300e2 Author: mks-viva <1224833100@qq.com> Date: Thu Jul 15 20:57:34 2021 -0500 ✨ MKS Mini12864 v3 for Robin E3/E3D (#22368) commit 165ae139d51b617295c2302f39c09edb0f0b0dd6 Author: Cytown Date: Sat Jun 26 03:50:09 2021 +0800 🎨 Power-off tone followup (#22222) commit 42eb2347d4c9cc64220322e10046ad275ec7a04e Author: Scott Lahteine Date: Fri Jul 9 22:24:43 2021 -0500 🎨 Strip trailing whitespace commit 3ab67898070c4422e454627e2836ab3b821bcf55 Author: mks-viva <1224833100@qq.com> Date: Fri Jul 9 17:59:36 2021 -0500 ✨ MKS MINI12864 V3 for MKS Robin Nano V2/3 (#22285) commit 5054dc6ea2883095f081971cb267090b7756db97 Author: Katelyn Schiesser Date: Tue Jul 6 17:36:41 2021 -0700 🐛 Redundant Temp Sensor followup (#22196) commit ee54cd4bd7e36284e4bc974e297834fb31ed466e Author: lujios <83166168+lujios@users.noreply.github.com> Date: Tue Jul 13 02:19:29 2021 +0200 ⚡️ Improve Sensorless homing/probing for G28, G33 (#21899) commit 399a240f846842bb0b0e72db9b1a3b2d85ccb29b Author: Cytown Date: Wed Jun 30 01:58:11 2021 +0800 🚸 Retain power during Pause (#22227) commit fef76a76a3275cf59bdf085b29d7d02168e61903 Author: Scott Lahteine Date: Wed Jul 14 19:44:51 2021 -0500 🔨 Consolidate STM32 extra_scripts (#22365) commit a5459a68a69d255456b477dd134cba88a8d4f06f Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Jul 14 00:03:24 2021 -0700 💡 Update FLYmaker comments, URL (#22355) commit b44d4746c8c039effc7513c6a5ca2917e9a18691 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Jul 14 15:55:24 2021 -0700 🩹 FLYmaker FLY Mini followup (#22364) Followup to #22355, #22356. commit 6f9194eb295daf9d4ccd0671d8f36d37bee6b8e5 Author: ellensp Date: Wed Jul 14 18:57:26 2021 +1200 ✨ FLY Mini for stm32duino (#22356) commit 6b2370fd7c323471acfdcdcbe0ecc622c0b16ebe Author: Krzysztof Błażewicz Date: Wed Jul 7 04:10:40 2021 +0200 ✨ DWIN LCD for BTT SKR Mini E3 (#22288) commit ee640816968b95ee14c3eaafbc0572df9f4dcee1 Author: Mihai Date: Wed Jul 7 07:10:35 2021 +0300 ✨ Enable 'M20 L' with LONG_FILENAME_HOST_SUPPORT (#22271) commit a35c234ce1f75b042c23402fda0426a7257c388b Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Thu Jul 8 00:41:33 2021 -0400 🐛 Fix redundant heater / sensor pin assignments (#22309) commit 5026797310b19618150d6010fd9cc4b57aae9a49 Author: Mike La Spina Date: Mon Jul 12 00:22:08 2021 -0500 🏗️ Allow headless Flow Meter (#22234) commit 8334e92b6f0e0fe640bb85757409a45d7f4abcb7 Author: Victor Oliveira Date: Wed Jul 14 02:34:18 2021 -0300 ✨ MSC Support for STM32 + SDIO boards -> SKR 2 (#22354) commit 8cf15e85463361289820b240d0de527d47852992 Author: Katelyn Schiesser Date: Wed Jul 14 16:56:02 2021 -0700 🎨 Call millis() once in manage_inactivity (#22363) commit 7ae099f2be7e8a54e50b7e34ee5f3a5ad4343ea9 Author: Skruppy Date: Fri Jul 9 04:55:34 2021 +0200 🐛 Fix AVR DELAY_US int overflow (#22268) commit 6d191d12c9dbf1bf0844445ff02797ff98028b32 Author: Scott Lahteine Date: Tue Jun 29 16:25:37 2021 -0500 🔨 Clean up build scripts (#22264) * Add 10K to marlin_blackSTM32F407VET6 (typo?) * Document custom build scripts. * Add a Robin common build script. * Extraneous .ldscript specifiers commit e213246ab998239c21bbc55983b79f28b4f848ce Author: bilsef Date: Thu Jul 15 18:59:52 2021 -0700 ✨ M115: Axis Count (#22219) commit 650e1dd1d22c2dde6b2e09b38b64769d32be578e Author: Scott Lahteine Date: Wed Jul 14 18:51:58 2021 -0500 🎨 Minor cleanup of TFT/FSMC pins commit 87cc3873212918c30cf6a0b94ad52e93248f56c7 Author: Taylor Talkington Date: Thu Jul 15 17:32:40 2021 -0400 🐛 Fix Filament Change menu (#22370) Followup to #22277 commit a7cfdeef212cba0a3a2523e3ccdcb6e786710b5a Author: Katelyn Schiesser Date: Wed Jul 7 21:45:15 2021 -0700 🐛 Fix Einsy RAMBo FAN1_PIN (#22305) commit 3750ab5c8b9fb4ffe106feaa03c42785e23b3dee Author: Scott Lahteine Date: Sat Jul 17 00:21:17 2021 -0500 📝 Tom's 3D Forums discontinued commit a0704cb14ff6805a1d3eef470cf2bba87de72afc Author: ellensp Date: Wed Jul 14 12:32:21 2021 +1200 🐛 Define MT_DET_PIN_INVERTING for MKS_ROBIN_NANO_V3 (#22348) commit cad2f69687c1720a1ddb5be14732c2325eab527b Author: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Date: Tue Jul 13 08:17:28 2021 +0800 ✨ MKS Robin Nano v3 + TFT_LVGL_UI + WiFi module (#22109) commit 31fbec9a00f49818b6a82c283349167c40260cc2 Author: mks-viva <1224833100@qq.com> Date: Tue Jul 13 19:14:34 2021 -0500 🐛 Fix Robin Nano V3 X_DIAG_PIN (#22340) commit b1c5afaf3c2a821aef2e43a3abb07fc70b2fb261 Author: Scott Lahteine Date: Wed Jul 14 02:14:55 2021 -0500 🐛 Fix SD pins for MKS Robin Lite commit bc459a76f40a86e0c25e75d3e3b4054a3db98436 Author: Scott Lahteine Date: Mon Jul 12 22:52:17 2021 -0500 🐛 TM3D fixes and improvements Co-Authored-By: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> commit dd8ac689c300b418f39b0df3a4ca90a291f7aa30 Author: Marcio T Date: Mon Jul 12 18:35:00 2021 -0600 ⚡️ Fixes to FTDI Eve Touch UI (#22347) commit 24f0613b9f14cd5a88bde851597104a1c6997abd Author: ellensp Date: Mon Jul 12 17:15:48 2021 +1200 🎨 Optional Custom Button description (#22336) commit 00b27b1aa7d5ec1700d24101eb011c2ad076aac3 Author: Mike La Spina Date: Sun Jul 11 20:45:47 2021 -0500 🔨 Update LPC176x platform to 0.2.8 (#22333) commit f76b063e58624d477c17a082d471aea3ef7b3197 Author: Scott Lahteine Date: Sun Jul 11 18:25:51 2021 -0500 🚸 M666: Fix value filter, add report (#22337) In reference to #22325 commit c746b1a2ae3573895b24fbc8c37015736469f39c Author: Scott Lahteine Date: Sun Jul 11 13:18:16 2021 -0500 🚸 Limit LCD delta endstop adjustment like M666 In reference to #22325 commit be13220e32c2a79761224e16925436b9ae87bf48 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Fri Jul 9 19:24:14 2021 -0400 📺 ExtUI pause state response (#22164) commit 78c2eb6876c6d54a4b3a65763e94d4bf5fade985 Author: Scott Lahteine Date: Fri Jul 9 17:09:58 2021 -0500 🎨 Check flags without ENABLED commit fea4e06484cb7072ffcdc61d32c0f6efe033d0b7 Author: Tanguy Pruvot Date: Fri Jul 9 23:07:55 2021 +0200 🌐 Update French language (#22323) commit 91f11e0d419ebabaef1ea5260998c4e553dd7d1c Author: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> Date: Thu Jul 8 06:44:07 2021 +0200 🌐 Update Hungarian language (#22307) commit 573b8a62d9c189576b79773b9c54606c387d634a Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Sat Jul 10 04:06:10 2021 +0800 🐛 Fixes for BTT Octopus (#22314) commit eafb94e72d99c9c906bfd806c87684243e193aeb Author: Skruppy Date: Sat Jul 10 01:25:47 2021 +0200 🐛 Fix HAS_KILL && SOFT_RESET_ON_KILL soft reset button logic (#22269) commit 69b44c2309d859865d4724cb8e323a13ba535d3c Author: Scott Lahteine Date: Fri Jul 9 16:02:27 2021 -0500 📌 Require U8glib-HAL@~0.5.0 (#22324) commit e9a1c10b34b5a23815285ee068112395dca17fbe Author: Katelyn Schiesser Date: Thu Jul 8 21:48:11 2021 -0700 🐛 Fix manage_heaters recursion on servo move (#22313) Followup to e297748b22 commit 304a926b0a2c5f9edb8adac93557758115d6b004 Author: Scott Lahteine Date: Tue Jul 6 20:42:38 2021 -0500 👷 Bump date on /Version.h commit 1bb61f27e98029f19abab5deaeedcbf062887bc9 Author: Marcio T Date: Tue Jul 6 19:32:08 2021 -0600 📺 Assorted small FTDI Eve Touch UI fixes (#22273) commit 091bdb79e685a6401d371e4c1ca362d3350fa0e1 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Wed Jul 7 03:55:31 2021 +0300 🌐 Update Russian and Ukrainian (#22290) commit 968c3b7e4ec5bb606a6e77595a56c131c88b99cc Author: Scott Lahteine Date: Tue Jul 6 19:54:02 2021 -0500 ♻️ Fix up and use YESNO_ITEM macros commit ed14d14819625a98753aa715821339e4f5a0ec73 Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Tue Jul 6 21:50:01 2021 -0300 🐛 Fix Maple / STM32 serial buffer (#22292) commit cae391bb484f5e141de07335f7bf97a91aa5e297 Author: George Fu Date: Wed Jul 7 08:40:11 2021 +0800 🔨 FYSETC S6 small bootloader target (#22207) Co-authored-by: Scott Lahteine commit 2753b4eeaadbc4cd1596cb4c5e0fecd17c132f5a Author: Cytown Date: Fri Jul 2 08:37:44 2021 +0800 🚸 Filament Change add confirm step (#22277) commit 6d05da0e5e7413fc906dfc5852ba819a6556f1de Author: ellensp Date: Fri Jul 2 09:27:27 2021 +1200 🐛 Fix Arduino IDE build (TOUCH_UI_FTDI_EVE includes) (#22276) Co-authored-by: Scott Lahteine commit 4235e23c7b0b62c6962624e1375605a6b5e575be Author: Scott Lahteine Date: Wed Jun 30 21:58:25 2021 -0500 📝 Update Z_SAFE_HOMING description commit cd01421ac32041c7f775ec37dd8d00b29a5d335b Author: Glought Date: Tue Jun 29 10:35:22 2021 -0700 🚸 Sanity-check Slim LCD menus with Probe Offset Wizard (#22259) commit aa13c7845812a3bd025437f03a5cf376eb975ee4 Author: Katelyn Schiesser Date: Tue Jun 29 10:30:55 2021 -0700 🐛 Fix ExtUI 'lcd_clicked' definition (#22257) commit b1c5dd985e6cfc46c0cb0aa70c7dd681a2e9d3d5 Author: Katelyn Schiesser Date: Mon Jun 28 18:43:05 2021 -0700 🐛 Fix PTC/BTC whole number tests (#22255) commit 3109a297d6e48d31ac2a23aedf0b919b63e2df4d Author: tome9111991 <57866234+tome9111991@users.noreply.github.com> Date: Mon Jun 28 19:08:37 2021 +0200 ✨ Ender-3 V2 Display for SKR E3 Turbo (#22229) commit b878127ea04cc72334eb35ce0dca39ccf7d73a68 Author: Scott Lahteine Date: Sun Jun 27 11:54:33 2021 -0500 Marlin 2.0.9.1 commit 6ea6556d0989f6ef08ef169f513760c062de35bb Author: Katelyn Schiesser Date: Sun Jun 27 22:30:11 2021 -0700 🐛 Use setTargetHotend in menus (#22247) commit 2b37a71eba99101aa79c59148d73f85ac0bc4e0f Author: Scott Lahteine Date: Sun Jun 27 00:33:44 2021 -0500 ♻️ Refactor status screen timeout commit e3ae76d76d10427d95e0926781ca1153043936c1 Author: Cytown Date: Sun Jun 27 00:21:34 2021 +0800 🚸 Expand box in draw_boxed_string (#22209) commit b24508907e0e270eec764543997ac568da28a7ba Author: Katelyn Schiesser Date: Sun Jun 27 21:02:11 2021 -0700 🐛 No HOTEND_LOOP with EXTRUDERS 0 (#22245) commit ec3daadf4372df419f906145aed8a37056619169 Author: Sébastien Gariépy <46988275+BeePerNet@users.noreply.github.com> Date: Sun Jun 27 17:44:49 2021 -0400 🌐 MSG_MOVE_100MM (#22242) commit ae76011e751c01711a877c60a678b82115179ac7 Author: Cytown Date: Mon Jun 28 01:39:09 2021 +0800 🐛 Fix wide glyph characters display (#22237) commit 34066c1717cf03039d3a80ca99dc487550a22645 Author: Scott Lahteine Date: Sun Jun 27 11:54:28 2021 -0500 📝 Update probe heating value commit 19fe3d5e79863f817daadbefe74dbcfc01ab301c Author: ellensp Date: Wed Jun 23 06:42:24 2021 +1200 🚸 MarlinUI Move Z >= 1000 (#22192) commit ec518e6e7bc57ec3b41441acb751aa363792bfd6 Author: Scott Lahteine Date: Sat Jun 26 14:28:50 2021 -0500 🎨 Small tweak, ms => now commit 003ce25acfd64a83696609eed95699c7c7dff061 Author: Scott Lahteine Date: Sat Jun 26 14:01:47 2021 -0500 🎨 Format onboard_sd.cpp commit 3e5d867276e4e8bf80657ecd2f8a73ccf38eb73f Author: ellensp Date: Sun Jun 27 06:28:56 2021 +1200 🐛 Fix Z_MULTI_ENDSTOPS + NUM_Z_STEPPER_DRIVERS 4 compile (#22203) commit b1bcb387fa191250c916b14f19ebc1753d0ae30c Author: cr20-123 <66994235+cr20-123@users.noreply.github.com> Date: Sat Jun 26 14:17:18 2021 -0400 ✨ Update/extend Quiet Probing (#22205) commit 0fbd8c52bbec83e4bd0b6f772d42a495c36076a1 Author: ellensp Date: Sun Jun 27 04:32:51 2021 +1200 🔧 Fix E.S.T. sanity-check errors (#22224) commit 08895e6cb046614c2e13c2df024c0fb460b7ba9f Author: Marcio T Date: Fri Jun 25 22:38:27 2021 -0600 🎨 Fix and improve FTDI Eve Touch UI (#22223) commit 38e775496aff8c9c3af3f60b33b0ede2820c490b Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Jun 25 14:12:21 2021 -0700 📝 Update TMC SPI endstops comment (#22221) commit 47631167f9ee6a67f655e32fadd7a88c5ad18ddc Author: Scott Lahteine Date: Fri Jun 25 14:44:51 2021 -0500 🐛 Trigger existing endstops on G38 hit commit 185e0dc7b7db2d6030810cb27d50cbaade658d2f Author: bwspath Date: Thu Jun 24 22:27:54 2021 +0200 🐛 Fix Octopus build on case-sensitive FS (#22206) commit bcf6ca59dff2f858f410ed995c9c91e20b465852 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Tue Jun 22 21:48:56 2021 +0300 🌐 Update Russian language (#22193) commit 1ba694cebb8cb392b89adfedec0898b236755a37 Author: Marcio T Date: Mon Jun 21 15:38:28 2021 -0600 🎨 Fix and enhance FTDI Eve Touch UI (#22189) commit 906fa05bd69ee5de18e4c083bda408699e296676 Author: Scott Lahteine Date: Mon Jun 21 16:31:41 2021 -0500 🐛🌐 Fix extra axis translations commit 651f15f833d84a40d983fa7825b782fef731d8e8 Author: Scott Lahteine Date: Mon Jun 21 16:24:50 2021 -0500 🎨 Cosmetic cleanup commit ef41c1f452c03eff94a2dc693e25db4af2c07d94 Author: Katelyn Schiesser Date: Mon Jun 21 13:36:06 2021 -0700 🐛 Fix IJK axis references, E stepper indices (#22176) Co-authored-by: Scott Lahteine commit 8050813d32402336eabf43152dd0e0ef76a54247 Author: Grumpy Date: Tue Jun 22 08:12:39 2021 +1200 🐛 Fix dual Neopixels (#22174) commit 25e7e2fce05531b40a4753d138e7e00266f00efd Author: ellensp Date: Tue Jun 22 08:09:21 2021 +1200 🐛 Fix heater display options/compile (#22185) commit a0f7f0e9e21b23577695609519d7216dd2f37c43 Author: Scott Lahteine Date: Sun Jun 20 22:49:57 2021 -0500 🐛 Fix compact sensitive pins array (#22184) commit f3e0bc7a4b35ec0af3734029b170527f65f5c824 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Mon Jun 21 06:48:06 2021 +0300 🌐 Update Ukrainian language (#22183) commit 49ff1e837ace76c852baf11dbf8ff4f38df43f32 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon Jun 21 05:45:26 2021 +0200 🌐 Update Italian language (#22182) commit 4f8191b4818b97bd20eb9db2042dc07c97cce6cc Author: Katelyn Schiesser Date: Sat Jun 19 11:44:28 2021 -0700 🐛 Redundant Temp Sensor followup (#22173) commit 927a1a17384b649c2cd56fc2ded7aba8392b3781 Author: Scott Lahteine Date: Sun Jun 20 01:19:09 2021 -0500 🐛 Fix LCD define typos commit f2f23e80974b271a30cbf9de3397f0e58d9de7fb Author: Scott Lahteine Date: Sat Jun 19 14:09:09 2021 -0500 🎨 Cosmetic changes for G28 commit cce585f6ca2235d0a534e8f3043d6d502b3bd93b Author: Scott Lahteine Date: Fri Jun 18 13:12:55 2021 -0500 🐛 Define 'HEAD' axes for Markforged Fixes #22167 commit 5bfb465ab4735aa3d5fa6c8d359331e0f2399902 Author: Ari-SSO <85907917+Ari-SSO@users.noreply.github.com> Date: Thu Jun 17 21:34:40 2021 -0300 🚸 Include 'H' value in M412 report (#22138) Co-authored-by: Scott Lahteine commit ce7bbafb8fafde75fee64e526700f9551e5564de Author: Katelyn Schiesser Date: Wed Jun 16 23:15:16 2021 -0700 💡 Add G28 L description (#22144) commit 5ffc4bfe3a14cf8e280d78a11b0c19d06c20ace4 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Jun 17 17:39:48 2021 -0700 🐛 TFT encoder pin for BTT GTR (#22162) commit 3ecc99e95d8c25bec2342d2ec65d49a081ef4de8 Author: Mike La Spina Date: Thu Jun 17 22:46:59 2021 -0500 🐛 Fix Air Assist (#22159) Co-authored-by: Scott Lahteine commit f22c5d3cc6f42c955f212afa6c668469f7938193 Author: gjdodd <31553294+gjdodd@users.noreply.github.com> Date: Fri Jun 18 01:37:27 2021 +0100 🩹 Extruders 0 patch for PWM Motor Current (#22163) commit d8df8e0eed63c4b56f9b1221569d38654eff4948 Author: Victor Oliveira Date: Thu Jun 17 02:58:48 2021 -0300 🐛 Fix env validation for 1280/2560 boards (#22150) Co-authored-by: Scott Lahteine commit e38958f256e698ab5afd3b775d1fe1e2d93fcb65 Author: Victor Oliveira Date: Thu Jun 17 02:49:42 2021 -0300 🐛 Fix MKS Robin E3 build (#22149) commit d7c77403fd8373c7b4bfb6a4fa6d6f25c1ff9feb Author: Scott Lahteine Date: Tue Jun 15 00:44:32 2021 -0500 Marlin 2.0.9 commit c8898b5ca0db66c66a51f9d711591ab51a41fcc7 Author: ellensp Date: Tue Jun 15 11:45:54 2021 +1200 ✨ Redundant Part Cooling Fan (#21888) Co-authored-by: Scott Lahteine commit 781257bc64d74b31d7730e473ef6ca09454462aa Author: Scott Lahteine Date: Mon Jun 14 18:44:27 2021 -0500 🐛 Prevent stepper sleep during long UBL idle (#22137) commit dec083dcc122ce2e3df2a41a1297aabadcd11484 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Mon Jun 14 23:52:42 2021 +0200 ⚡️ Home Z (and maybe XY) at the start of G35 (#22060) commit cdd95074935074c4afa1f467ef16c9e9c0325bfa Author: ellensp Date: Tue Jun 15 09:43:50 2021 +1200 🚑️ Prevent BFT unaligned compressed data corruption (#22134) commit dba877311e28829dae24da30807b430bfba19faa Author: Bo Herrmannsen Date: Mon Jun 14 11:28:13 2021 +0200 ✨ Extruder with Dual Stepper Drivers (#21403) commit 31fd3be6eba02e96f1e093990d5f8ef09dad617b Author: Victor Oliveira Date: Mon Jun 14 04:24:49 2021 -0300 🔥 Remove Chitu default Touch Calibration (#22133) commit 2b4284df81db484649b42ddf291031fb6c8e5c58 Author: Victor Oliveira Date: Mon Jun 14 02:39:16 2021 -0300 ✨ MULTI_VOLUME for Color UI and MarlinUI (#22004) commit d84e2d6e2908f34b08613b95c28726f5c330134a Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Jun 13 23:08:46 2021 -0400 🎨 ExtUI "user click" and other tweaks (#22122) Co-authored-by: Scott Lahteine commit 56355159c66af615ef1a778a3c786e70cd4289b5 Author: Victor Oliveira Date: Sun Jun 13 22:47:38 2021 -0300 🐛 Include common TFT driver macros (#22125) commit a7135d429b1f0f7811610732b023064a85bd367e Author: Katelyn Schiesser Date: Sun Jun 13 18:43:43 2021 -0700 🐛 Fix UBL 'R' parameter and adjust 'P' (#22129) commit 3b0a40cd5d46c1a3f8c7a7bb2ae93a3f274cfd2f Author: Sola <42537573+solawc@users.noreply.github.com> Date: Mon Jun 14 09:31:38 2021 +0800 🐛 Fix ExtUI/DGUS Celsius display (#22121) commit 83c74802f89be2c3252a710960aee7bcf4469afe Author: Scott Lahteine Date: Sun Jun 13 20:19:43 2021 -0500 🎨 General cleanup of extui/dgus In relation to #22121 commit adc17933cddcd21b359708f3db4b08ace23331ab Author: Victor Oliveira Date: Sun Jun 13 21:01:53 2021 -0300 🔨 Fix Serial+MSC for _USB envs (#22116) commit 68c52673d6a9cae0e1b9d8e36df1bf31a833a7e5 Author: Katelyn Schiesser Date: Sun Jun 13 14:56:18 2021 -0700 🐛 Use whole PROBE_TEMP_COMPENSATION values (#22130) commit 2aa35577f279ef189fb8ff9cb921d1d79e426987 Author: Scott Lahteine Date: Sun Jun 13 15:43:33 2021 -0500 🏗️ Refactor build encrypt / rename (#22124) commit 14ffc66c45d73f9e62a4180aa2dc4bf3079a84e4 Author: Scott Lahteine Date: Sat Jun 12 16:28:30 2021 -0500 🩹 Use `#pragma once` in pins files commit 2ea0832e0fb20b5c210bcaa9315b8182b5ca8359 Author: Scott Lahteine Date: Sat Jun 12 12:31:24 2021 -0500 📝 Number SKR EXP headers commit ab050878e91c8e7002836d85e286817d8dec774a Author: Scott Lahteine Date: Sat Jun 12 12:30:29 2021 -0500 🎨 Clean up LPC1768 SPI init commit 707a04022e658bd7d3224af71545f1a6cc712af7 Author: Scott Lahteine Date: Sat Jun 12 11:40:35 2021 -0500 🔨 Remove obsolete ON_BOARD_SPI_DEVICE commit d12c35779355044fab117c739c70ea78dcedfe2f Author: mrv96 Date: Sat Jun 12 18:19:37 2021 +0200 🔨 Robin Nano V3 overridable POWER_LOSS_PIN (#22123) commit ddf8668e16aeac2ed487e8784c218e1cbd2880d5 Author: Scott Lahteine Date: Fri Jun 11 19:29:59 2021 -0500 📝 Describe G12 XYZ commit 3491e49c5f4d9bb5cce260ef51269b715761b4d5 Author: Victor Oliveira Date: Fri Jun 11 18:13:22 2021 -0300 🐛 Fix boot / SD for STM32 (F103Rx) boards (#22087) commit d322e495b296be5ad6922d419a4cba2ef08b697c Author: Katelyn Schiesser Date: Fri Jun 11 13:51:29 2021 -0700 ✨ More flexible redundant temp sensor (#22085) commit 5d80f7006a32bbf4b56dcb2c88388782a8e26ffa Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Jun 10 14:09:29 2021 -0700 🔨 Envs for BTT SKR Mini with RET6 (512K) (#22050) commit 3e7a9e5d2011eb7315e8765f2a8c3267fd2d3363 Author: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> Date: Thu Jun 10 23:05:07 2021 +0200 🌐 Update Hungarian language (#22083) commit 33e8769226f0d994a73dea33cec3e1488cc8f249 Author: grauerfuchs <42082416+grauerfuchs@users.noreply.github.com> Date: Thu Jun 10 17:04:18 2021 -0400 🔨 MightyBoard envs for A.B.M. (#22100) commit 59842edbcb46b6cc8f30807bdc9ef5fbe79bd7fa Author: Radek <46979052+radek8@users.noreply.github.com> Date: Thu Jun 10 19:51:07 2021 +0200 🔧 EEPROM options for BTT SKR 1.4 (#22092) commit 507e1e436e7f45078c61e79026d64c55598fd707 Author: Marcio T Date: Thu Jun 10 02:17:39 2021 -0600 🎨 Fix and improve FTDI Eve Touch UI (#22093) commit b27447ef484b86d573e7ba60960df2f008df37d4 Author: ellensp Date: Thu Jun 10 19:09:52 2021 +1200 🔧 Enforce BLTouch settings (#22086) commit c9a3ba99be5e45b880387aa28577c10a9875b459 Author: Scott Lahteine Date: Thu Jun 10 02:05:04 2021 -0500 🎨 Adjust some conditionals commit 967942460ecfa952cd39b055cf9fd6cb968f51ea Author: Scott Lahteine Date: Tue Jun 8 19:55:27 2021 -0500 ⚡️ Optimize Sensitive Pins array (except STM32) (#22080) commit bfa257902ec4b0c96e642b4ee54f6e75de546255 Author: Kyle Repinski Date: Tue Jun 8 18:56:16 2021 -0500 🐛 Fix small/huge I2C EEPROM address (#22081) commit 3f103c91f0e206bf3911bcc884d1dfaa8f2dd38b Author: Scott Lahteine Date: Tue Jun 8 07:51:28 2021 -0500 🎨 Laser Ammeter followup (#22079) Followup to #21835 commit 2fd9971f413bf4d34da5c3de9fc57c31ebcf6a4f Author: Mike La Spina Date: Mon Jun 7 14:15:09 2021 -0500 Add Laser Based I2C Ammeter Feature (#21835) commit a3063a939243acefec606909ce8982fdabd848c4 Author: ellensp Date: Tue Jun 8 07:09:12 2021 +1200 expose hidden BLTOUCH setting changes (#22069) commit d8a02bbbdba39e3fcc6519d7fa8ddbc36f4ea967 Author: Marcio T Date: Sun Jun 6 22:26:42 2021 -0600 🎨 Reorganize FTDI Touch UI variants (#22066) commit 76d4a395d1a3d9d24f308ce6deb19c8767f04105 Author: ellensp Date: Sun Jun 6 21:21:14 2021 +1200 🩹 Fallback ID for MKS TS35 V2.0 (#22031) commit c515bfb5fbb860d13daea84dfde6cb9d54662d20 Author: 7FM <41307817+7FM@users.noreply.github.com> Date: Sun Jun 6 09:56:24 2021 +0200 👽️ Include in STM32 (for now) (#22054) commit 83430be580071acd35617e99f0fb23814993d04b Author: ellensp Date: Sun Jun 6 19:50:14 2021 +1200 📦️ Malyan M200 with HAL/STM32 (#22052) commit 9bd9f91722f9ae917a98bf8c148cadc84e885a6e Author: George Fu Date: Sun Jun 6 14:37:52 2021 +0800 📌 Update FYSETC E4 to espressif32@2.1.0 (#22049) commit e6ef43e51a90e25ecbe24e766d32c046a9dbbdf3 Author: Victor Oliveira Date: Sun Jun 6 02:59:19 2021 -0300 ⚰️ Remove obsolete CUSTOM_SPI_PINS (#22058) commit 16bca67f2deaf1d53bd7c1d3515ffbfb01a65ef8 Author: ellensp Date: Sun Jun 6 12:16:40 2021 +1200 🔧 Check G29_RETRY_AND_RECOVER requirements (#21921) commit d65eea550caf12edaa678bde375864060cc68713 Author: Scott Lahteine Date: Sat Jun 5 17:08:10 2021 -0500 🔧 FOAMCUTTER_XYUV moved to custom config commit 46080b367af8fbdef0628fc21243fd115007a2b5 Author: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Fri Jun 11 22:53:23 2021 +0200 ✏️ Six Linear Axes followup (Fix M503) (#22112) commit 317afae37c5927ec6c4e6118a9e4d64dd8b757e3 Author: Marcio T Date: Thu Jun 10 02:08:42 2021 -0600 ✏️ Six Linear Axes followup (typos) (#22094) commit 930a6082362c3bef59aee27d72f0611b72ccbded Author: ellensp Date: Wed Jun 9 10:43:39 2021 +1200 🎨 IJK auto-allocation (#22075) commit 6e3c45580ce415bb27774bc0b707fec7da54943b Author: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Mon Jun 7 06:23:23 2021 +0200 ✏️ Six Linear Axes followup (Hybrid Threshold init) (#22068) commit e3df7d7bc8188994cc49879da9556222db935252 Author: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Sun Jun 6 08:30:39 2021 +0200 ✏️ Followup to Six Linear Axes (#22056) commit c1fca911036af3ca868caea7556a630044ae4a77 Author: DerAndere <26200979+DerAndere1@users.noreply.github.com> Date: Sat Jun 5 09:18:47 2021 +0200 🏗️ Support for up to 6 linear axes (#19112) Co-authored-by: Scott Lahteine commit d3c56a76e73f8e126f1cf579f552e671efa9005b Author: Scott Lahteine Date: Tue Jun 1 20:23:37 2021 -0500 ♻️ Patches for Zero Extruders (with TMC) commit 4194cdda5bb01171b2523038d568de670a8f0461 Author: Scott Lahteine Date: Mon May 24 16:38:57 2021 -0500 ♻️ Refactor Linear / Logical / Distinct Axes (#21953) * More patches supporting EXTRUDERS 0 * Extend types in prep for more axes commit f5f999d7bf56c03fd95455902e75cff873139500 Author: Marcio T Date: Fri Jun 4 23:35:05 2021 -0600 📺 Fix and enhance FTDI EVE Touch UI (#22047) commit b4b607681c19aff8c067f70c970f9ae755b1e059 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Jun 4 21:56:18 2021 -0700 ✨ BigTreeTech Octopus V1.1 (#22042) commit 1e75eba27bd439d805d9de3e3c2194c2bfc3e42e Author: ellensp Date: Sat Jun 5 16:51:17 2021 +1200 🐛 Fix STM3R / BEAST envs (#22028) commit f3f3d202accf2c36e348c5e08fae82981d74c872 Author: Victor Oliveira Date: Sat Jun 5 01:49:00 2021 -0300 📦️ STM32F103RE_btt(_USB) with HAL/STM32 (#22040) commit c90fa530db2e6c98cfc8329ef36eda837b5ecc30 Author: Scott Lahteine Date: Fri Jun 4 23:44:16 2021 -0500 ✨ Update G34 for 4x Z steppers (#22039) commit aeb8097cbc2b946cffe9813b5c8805c6943fd87d Author: Taylor Talkington Date: Sat Jun 5 00:01:06 2021 -0400 🐛 Fix M140 print job timer autostart (#22046) commit 04bea727877c931777d69b718482630c40bd86fe Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat Jun 5 03:02:37 2021 +0200 🐛 Fix MMU compile with >5 EXTRUDERS (#22036) commit ce95f56ac8755eff188001e12c88e01ae8e65f0e Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Fri Jun 4 00:38:10 2021 -0300 🔨 MKS Robin E3 for HAL/STM32 (#21927) commit aff45fd455dd34f06f7211e0ff29d4f4dd93c7a8 Author: Scott Lahteine Date: Thu Jun 3 03:23:10 2021 -0500 ✏️ Remove whitespace commit c8f28d9d0906261749f8beabc645503fadb0cbc9 Author: ellensp Date: Thu Jun 3 20:10:04 2021 +1200 🐛 Fix Creality v4 servo timer (#22021) Followup to #21999 commit f3697e5e02cd9debb170f69250a1ac37bc338852 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Jun 3 17:51:22 2021 -0700 🔨 Consolidate BTT linker scripts followup (#22038) commit 557ba20ff4f57f0311f92e74b20a031c1ffb3520 Author: Scott Lahteine Date: Thu Jun 3 02:55:30 2021 -0500 🔨 Consolidate BTT linker scripts Originally from #22022 commit dd0e5c26d15a188dca9f7c772f8058bffdda108c Author: ellensp Date: Thu Jun 3 19:40:16 2021 +1200 🐛 Fix env:STM32F103RE maple/unified split-up (#22019) Followup to #21999 commit c9a3f41152d1cc5145993920f2594aef8e745089 Author: Scott Lahteine Date: Wed Jun 2 17:09:47 2021 -0500 📝 Update G61 comment commit d13ffa0aba6e31095d08bd3ccbc1c970e1fb2a59 Author: ellensp Date: Wed Jun 2 18:42:15 2021 +1200 🔨 Creality v4 with STM32 HAL (#21999) - New STM32 env for Creality V4 boards. - Separate Libmaple targets into their own `ini` file. - Temporarily remove unusable targets from `pins.h`. Co-authored-by: ellensp Co-authored-by: Scott Lahteine commit fb0be2960408c08de09ecba4253c65f50e01b275 Author: Scott Lahteine Date: Tue Jun 1 23:24:20 2021 -0500 🔨 Move FLY_MINI env to stm32f1.ini commit 7ca155077503cb2c62bf5ed739f9c6a2280a1cd9 Author: hannesweisbach Date: Wed Jun 2 06:20:47 2021 +0200 ✨ TMC Driver distinct baudrates (#22008) commit 665a71b471476b7eaebe910d4412c5f39f26932c Author: Scott Lahteine Date: Tue Jun 1 22:46:35 2021 -0500 🔧 Treat TPARA like SCARA in mfconfig commit 9268a4b28c485a2efeffccabab42defbd1c2cbaf Author: Roman Moravčík Date: Wed Jun 2 04:10:15 2021 +0200 🌐 Update Slovak language (#22000) commit 529bbfad10ca13a9d11af84302b7a92a14250d34 Author: Krzysztof Błażewicz Date: Mon May 31 08:44:38 2021 +0200 ⚗️ 32-bit float constants (STM32F1) (#21996) commit e7945c227762a66840b0d9eb3c4aa9e40ff7641b Author: Scott Lahteine Date: Fri Jun 11 18:33:07 2021 -0500 🐛 Fix Z endstop enum Followup to 92dea8e6cc commit 5ee91c73ed17cbb49899a7d91fce9377fd6e4599 Author: Scott Lahteine Date: Sun Jun 6 03:49:23 2021 -0500 👷 Add caching to CI workflow commit 2116e4202b064c6cafef70d54ed50edf00b79e44 Author: hannesweisbach Date: Sat Jun 5 06:38:43 2021 +0200 🐛 Fix Probe Temp Calibration compile (#22032) commit 19521d16cd9838345f404196e62bf6a2e2719b39 Author: Taylor Talkington Date: Sat Jun 5 00:01:06 2021 -0400 🐛 Fix M140 print job timer autostart (#22046) commit 057302b93636f276e8fe188f3fbd23d087e68a00 Author: Victor Oliveira Date: Thu Jun 3 18:52:25 2021 -0300 👽️ Fix usb-host-msc-cdc-msc issue (#22025) commit d62619c9c8e4e92ea8e1d0fdfdca923df1d94140 Author: Scott Lahteine Date: Wed Jun 2 19:38:34 2021 -0500 📌 Use U8glib-HAL@~0.4.5 commit 9c80a89597ceb397f079a2bae47c15f32a195165 Author: Scott Lahteine Date: Wed Jun 2 15:34:31 2021 -0500 🎨 Reorganize BTT_E3_RRF_IDEX_BOARD commit 00834ef03dc9a58e7b2c1b1333276e0c65399a5f Author: Scott Lahteine Date: Wed Jun 2 15:34:03 2021 -0500 🎨 Clean up stops, sdss pins commit 5b7b065b96e6920171a50aace7e77ec8f735915d Author: Scott Lahteine Date: Sat May 29 16:01:38 2021 -0500 Marlin 2.0.8.2 commit a739af823f63bf5cfafb22a62d5f7b4d9ba4073e Author: Timo Date: Sat May 29 14:00:39 2021 -0700 ✨ Malyan M180 (#21992) commit 493eb446b74cdc7ab99315dfc129ecc86fbc343d Author: Pascal de Bruijn Date: Thu May 20 13:35:38 2021 +0200 ✨ MEDIA_MENU_AT_TOP for MarlinUI (#21925) commit 1b45b3802ac62c3b1e47213b847d9eb772ba1f4b Author: charlespick Date: Thu May 20 04:06:26 2021 -0700 ✨ Independent baud rates (#21949) Co-authored-by: Scott Lahteine commit 7898307d783f13e3d1947c61b3cc573f5973f69a Author: Krzysztof Błażewicz Date: Sat May 29 20:48:56 2021 +0200 🌐 Update Polish language (#21993) commit 8da8aa140fb7b57623144b222b5ff31816b2f84a Author: ellensp Date: Thu May 27 22:13:43 2021 +1200 🥅 Add MESH_EDIT_MENU sanity check (#21922) commit 4572af2bce25fc4959746f1088981c410cafee1b Author: Andy Barratt Date: Thu May 27 03:07:13 2021 +0100 🚸 cap:HOST_ACTION_COMMANDS (#21987) commit 6dc17f0e6ea3b88f109d683a4b223d6a733ad1e5 Author: Allen Bauer Date: Tue May 25 17:08:10 2021 -0700 🐛 Fix BTT002 variant MMU2 serial pins 🧩 (#21980) commit 3fcf3f69ca495722b0f47a69435e033f8895ae82 Author: ellensp Date: Wed May 26 11:38:23 2021 +1200 ♻️ LEDs refactor and extend (#21962) Co-authored-by: Scott Lahteine commit a9fd2769f3f26e7e61a908a0ef2c079f1d06baab Author: LawnMo <81721212+LawnMo@users.noreply.github.com> Date: Tue May 25 00:53:48 2021 +0200 🩹 Fix multi_volume + SDIO onboard compile (#21975) commit 9adaf92674751542e76e31738d2915992c57a40f Author: LawnMo <81721212+LawnMo@users.noreply.github.com> Date: Mon May 24 09:21:21 2021 +0200 🩹 Improved SKR2 12864 LCD Delays (#21956) commit e75c3b6c54e9e8b4b48009a0ccc58ed7069f612a Author: Scott Lahteine Date: Sun May 23 21:33:22 2021 -0500 🎨 Macros for optional arguments (#21969) commit 61f2bb122844aa0607f6d53aa37f843123931af6 Author: ellensp Date: Mon May 24 13:29:19 2021 +1200 ⚡️ PIO filters for M117, M300 and M414 (#21972) commit d1502f74eaae94b6bff61b45c8481db39956ac2b Author: Scott Lahteine Date: Sat May 22 17:56:31 2021 -0500 🎨 Null heating message method commit 83f9413196fbb842764eba33a975cec8d524e973 Author: Scott Lahteine Date: Sat May 22 17:41:29 2021 -0500 🐛 Fix Selena Compact probe pin commit cdc3e18d994f120219ec8683246a81ac31cca75b Author: Scott Lahteine Date: Fri May 28 19:47:06 2021 -0500 Use another PR close action commit 55a6315862cfafccfc939cf1b1f064f748c82d54 Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Mon May 24 14:57:45 2021 +0800 🐛 Fix Octopus HS USB (#21961) commit cf447a54428345903fe9f4c9497a4f32dfa72b08 Author: gjdodd <31553294+gjdodd@users.noreply.github.com> Date: Mon May 24 07:54:10 2021 +0100 🐛 Fix flowmeter calculation (#21959) commit 7597b4fb40a6e936267a57c74264fcf6c5bd1fc5 Author: Scott Lahteine Date: Sat May 22 21:12:53 2021 -0500 🎨 Apply shorthand and cleanups commit 7cd0f2a32aef86b361e9bef7ec3c30a944b7d153 Author: Scott Lahteine Date: Sat May 22 21:08:57 2021 -0500 🎨 pause => pause_heaters commit 4dae5890e99c73686b7e1ee08857487a0acfeb28 Author: Scott Lahteine Date: Sun May 23 01:09:46 2021 -0500 ♻️ Refactor, comment endstop/probe enums commit 738ae4be331b8d580cb22b7ec6e33ab095e3e81c Author: Danol Date: Sun May 23 00:35:07 2021 +0200 🐛 Fix wrong Z_ENDSTOP flag bit (#21963) Bug introduced in #18424 commit e5736110216893362937b70472e7da2c3859a28c Author: Scott Lahteine Date: Sat May 22 17:02:21 2021 -0500 🎨 Combine M104/M109 and M140/M190 code commit f60965a1078fec01c6bc0f438c4e019547253d5e Author: Scott Lahteine Date: Fri May 21 23:03:49 2021 -0500 📝 Update ExtUI example commit 3995e8373c88fce34d9a524686302ec132f0d2e3 Author: Scott Lahteine Date: Fri May 21 22:55:13 2021 -0500 🎨 Shorten lcd relative paths commit ddc82b84e25e981d12bab0d74af95b1e0476248b Author: Scott Lahteine Date: Fri May 21 22:45:54 2021 -0500 📝 Document diveToFile, printListing commit 87a943756a36fe7f1e3422868dcfa35d5dd54518 Author: Scott Lahteine Date: Fri May 21 08:23:09 2021 -0500 🎨 Move HAS_EXTRUDERS commit 8e28731f96d3f2a8dd5d1bb8262eafddc7e0aa05 Author: Scott Lahteine Date: Fri May 21 08:24:38 2021 -0500 🎨 Update a condition commit cdbd438a041427580eaea0a9fbe570864aed70d0 Author: Scott Lahteine Date: Fri May 21 08:25:54 2021 -0500 🎨 Rename all/no axis enums commit 3220c49f1be88f8ee2845e5a01a6132eba966208 Author: Scott Lahteine Date: Fri May 21 00:26:54 2021 -0500 Add a test for SAVED_POSITIONS commit 94e67a036a614f5f43bf2e79d26c9d62a2ffb505 Author: Scott Lahteine Date: Thu May 20 21:47:05 2021 -0500 🐛 Fix compile with PREVENT_COLD_EXTRUSION off commit c977e820743a6589b0c82159473b36e60fae7254 Author: Scott Lahteine Date: Thu May 20 17:12:18 2021 -0500 🎨 MULTI_MANUAL => MULTI_E_MANUAL commit 9878a5ab5883f2b3112c1f67ab392538afd7520f Author: Moonglow Date: Thu May 20 14:09:10 2021 +0300 🐛 Fix Toshiba FlashAir (SDCARD_COMMANDS_SPLIT) (#21944) commit 2de914c38ce373f37c925b20af270a2e4c647356 Author: Scott Lahteine Date: Wed May 19 23:07:09 2021 -0500 🎨 Move switch sensor strings commit 49b05ba9891bc7add47d32a9ca947fe7eb9f4555 Author: Scott Lahteine Date: Wed May 19 00:21:34 2021 -0500 🎨 Flags for homing directions commit 85fa8c55c9415ec044a96eedc800fedfa6b02439 Author: Scott Lahteine Date: Tue May 18 23:30:49 2021 -0500 🐛 Fix DELTA with SENSORLESS_PROBING commit 57eef65d9cabb6b7cc4c7937c8a9a095fc39313b Author: Scott Lahteine Date: Tue May 18 22:56:05 2021 -0500 ♻️ Refactor axis homing/trusted state bits commit 894c954e8f2e56e7a556a71200c8465ba3507deb Author: Scott Lahteine Date: Tue May 18 22:53:52 2021 -0500 ♻️ Minimize endstop bits commit 046bac67693ec00ff2d2adf00aabe5cd396963c6 Author: Scott Lahteine Date: Tue May 18 22:52:41 2021 -0500 ✅ Fix tests for EXTRUDERS 0 commit 765720e98ba3cc970e42f8bf730da056c59ac2fe Author: Scott Lahteine Date: Tue May 18 22:52:10 2021 -0500 ♻️ Simplify TMC utilities for more axes commit 26a244325b48e5cf3e23518f9cd895491305050e Author: Scott Lahteine Date: Tue May 18 22:51:19 2021 -0500 ♻️ Refactor axis counts and loops commit f7d28ce1d6d17621f86fd179770645723e5ae272 Author: Scott Lahteine Date: Tue May 18 22:46:59 2021 -0500 🎨 Misc cleanup and fixes commit c85633b47f0b3c92055e725b9162acdeebd1ef79 Author: Scott Lahteine Date: Mon May 17 21:17:22 2021 -0500 🎨 Use defined strings commit 6861b1ec827b30a4493099ebee1e49adbb48e8a5 Author: Alvaro Segura Del Barco Date: Sat May 22 14:52:41 2021 -0600 🐛 Fix Teensy PINS_DEBUGGING compile (#21958) Followup to 84a11cfedc commit 003cb20b9fcf98bd80501d20634b41863ebf4dee Author: Roger D. Winans Date: Sat May 22 00:14:25 2021 -0400 📝 Add Configurations section to README (#21955) Co-authored-by: Scott Lahteine commit f1f622de01780418a3fe510f3f9be7237372831e Author: Scott Lahteine Date: Wed May 19 22:02:28 2021 -0500 Fix 'G29 K' value commit dbb8f3db090e234ab17df986ccb29d2b4e7a4361 Author: ellensp Date: Tue May 18 14:16:47 2021 +1200 Fix EEPROM_CHITCHAT (#21934) Fix #21929 commit 5d7c72db5a57086e721ce0370c7a4ac75a47a978 Author: ellensp Date: Tue May 18 11:22:33 2021 +1200 Fix envs using mks_encrypt.py (#21933) Fix #21928 commit 755adb8973aa69ca6f0832e606060eaca065b88c Author: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com> Date: Sat May 15 18:33:10 2021 -0700 Update Configurations URL (2.0.8.1) commit 09774291384c8f301dffa274cf08ddd199b17c31 Author: ekef <62036680+ekef@users.noreply.github.com> Date: Sun May 16 02:22:30 2021 +0300 Fix MKS Robin E3 BLTOUCH and Fan PWM timer conflicts (#21889) commit 1dfa6cbc809d93a685c75f8b88ee3b9173aaeaa9 Author: Scott Lahteine Date: Sat May 15 14:56:27 2021 -0500 Marlin 2.0.8.1 commit e3998dc3dfae6bb52851374b3ba2e61cc3bc6661 Author: Luu Lac <45380455+shitcreek@users.noreply.github.com> Date: Sat May 15 15:02:20 2021 -0500 M154 Position Auto-Report (#18427) Co-authored-by: Scott Lahteine commit b6e1838fa6e905bcc4beab665d1e69b4eb35bce9 Author: Moonglow Date: Sat May 15 06:30:16 2021 +0300 Fix MKS UI missing font select condition (#21905) commit 908caba7353cc321736cdf3fab61ea58163ee87e Author: ondrada <82547068+ondrada@users.noreply.github.com> Date: Sat May 15 05:29:17 2021 +0200 Fix G29_RETRY_AND_RECOVER dependency (#21907) Co-authored-by: Scott Lahteine commit 121f3b1096bf0fcc0317df842a389a7f8afc2e3e Author: Scott Lahteine Date: Fri May 14 00:17:04 2021 -0500 🐛 Fix RR collision with MM (#21902) commit 9e373617dc599130daf7b0204c5281237a6cc590 Author: Jamie Date: Fri May 14 00:14:13 2021 -0500 ✨ Instant Freeze/Resume Function (#17462) Co-authored-by: Scott Lahteine commit 5298fa357c18c8bceb9552bcc4fd7543ee21b70f Author: ellensp Date: Fri May 14 08:19:12 2021 +1200 Fix nextion compile error (#21884) commit 2c15bc5d3971571ad6e19e82436d2b8bd6f7f1d5 Author: Alexander D. Kanevskiy Date: Thu May 13 23:10:48 2021 +0300 Fix compilation failure in M1001 (#21897) commit 159f9c85a63c8454f32effbef2fff99ffb1ab9c0 Author: Scott Lahteine Date: Thu May 13 01:14:37 2021 -0500 🔧 Improve SD_DETECT_STATE default (#21885) commit 1d1f3187523ed6519bbb5fdbc16279ba785f4950 Author: Victor Oliveira Date: Wed May 12 20:10:31 2021 -0300 Update Robin Pro TFT Pins (#21879, #21900) commit 40a9d82ae99a3b7b0ecf0a95efedd13bb6faecfb Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed May 12 01:26:19 2021 -0700 ✨ BigTreeTech Octopus (STM32F446ZET6) (#21826, #21882, #21883, #21901) commit 72c28d34627b985ed093932d8cf0e963c74aabd1 Author: Elton Law Date: Wed May 12 03:21:55 2021 -0400 🐛 Fix G5 IJ with Motion Mode (#21858) commit ed224ca7d89ed01d3e8284f409e1281086b9ef2d Author: vyacheslav-shubin Date: Wed May 12 10:17:06 2021 +0300 🩹 G60-G61 Save E position (#21810) commit 02e131b5fd8fda69dd376e8bdd2e0aaa25f8faff Author: Scott Lahteine Date: Tue May 11 10:47:32 2021 -0500 :art: Misc. code cleanup commit 5afb5e03b0feba47feb6090e1ac19468d73e8693 Author: Scott Lahteine Date: Tue May 11 04:01:21 2021 -0500 :art: Additional utility macros commit 52a23b969bc65a76f5dc9bbfeb94738deebf3f6a Author: Scott Lahteine Date: Tue May 11 04:05:18 2021 -0500 :art: Better error message for bad array sizes commit afcc7ea22bd8f4a451efd415142048f3ee1b71cc Author: Scott Lahteine Date: Fri May 14 23:09:38 2021 -0500 Synchronize tests and actions commit c463b818193bd078288df988fb56f53d48a329f5 Author: Victor Oliveira Date: Tue May 11 12:44:54 2021 -0300 BTT SKR Mini E3 for HAL/STM32 (#21488) commit f688c7d20d907bcb88400787f5cb204acb78be61 Author: Scott Lahteine Date: Tue May 11 08:30:16 2021 -0500 Simplify macro expansion with recursion (#21859) commit 0167bba3712328d7d205116ba020e659033dc120 Author: Scott Lahteine Date: Tue May 11 02:59:54 2021 -0500 Fix L64xx init for Z4 commit 7004fb702d1eafa9a962855568f4296d9e4c25c2 Author: Scott Lahteine Date: Sun May 9 22:04:14 2021 -0500 Use adafruit/Adafruit NeoPixel@~1.8.0 commit 2f2dd3322d9538f8afadedb8db52c274602a579f Author: ellensp Date: Tue May 11 09:33:43 2021 +1200 update FLSUN_HISPEED env to flsun_hispeedv1 (#21510) commit 31d3a781a8fd0c4701e86951d286056e974871d4 Author: tobuh <32395668+tobuh@users.noreply.github.com> Date: Mon May 10 14:24:35 2021 +0200 Fix and improve Power-Loss Recovery (#21779, #21894) Co-authored-by: Scott Lahteine commit a7fd6b68beffd8871173fad2b45cc51985c5f5a5 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun May 9 01:52:53 2021 -0700 Unify BTT Motor Expansion Options (#21823) commit 6a1e78e614fcdb0d9a329719c735330db7eb8060 Author: Scott Lahteine Date: Sun May 9 03:50:51 2021 -0500 Optimize G-code flag parameters (#21849) commit 770edea5777ed1f0ba2a3062448a26b77124f971 Author: charlespick Date: Sat May 8 20:46:35 2021 -0700 Update Advanced Pause description (#21829) Co-authored-by: Scott Lahteine commit 08a51b282071f13a71874eefff06ebaacc03d6a5 Author: Victor Oliveira Date: Sat May 8 23:05:47 2021 -0300 🐛 Fix Lerdge USB Flash Drive envs (#21847) commit ac11c689f7f2214876806dc4a0ecb572eb031b6f Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Sun May 9 10:02:16 2021 +0800 Capacitive Touch Screen (GT911) for SKR SE BX (#21843) Co-authored-by: Msq001 Co-authored-by: Scott Lahteine commit f3e199fcd23dc626b5fc661c540d69c4258152ec Author: Scott Lahteine Date: Sat May 8 19:00:47 2021 -0500 Fix TFT typo commit ffcbe6857099ea4647cb5f2c5c3e09f3a3db437a Author: Scott Lahteine Date: Sat May 8 17:34:21 2021 -0500 Move temp errors calling kill() out of ISR (#21832) commit 06e965e29c1e553347e595f0421ea4b788bb36ad Author: sanek88lbl <42996016+sanek88lbl@users.noreply.github.com> Date: Sun May 9 01:06:21 2021 +0300 Lerdge K EEPROM and TFT (#21812) Co-authored-by: Scott Lahteine commit e865cc0249f88edc0c0eb1efcb68b450ad90c107 Author: Antonino Di Guardo <64427768+digant73@users.noreply.github.com> Date: Sat May 8 11:27:02 2021 +0000 Always prompt in M125 if host-prompt (as with Ext UI) (#21828) Co-authored-by: Scott Lahteine commit 5d8d03da030488e1773e24acd9f595dd7ce0bcbd Author: Scott Lahteine Date: Sat May 8 06:00:59 2021 -0500 Update SKR 1.3 touch pins commit 0b3da61ac7dabeea233149d3c7a5768c1f629043 Author: Scott Lahteine Date: Sun May 2 03:29:29 2021 -0500 TFT pins for BTT GTR V1 Proposed in #21772 commit a24eb691fbf60ed6a16b4f3c51258a7a9d4033aa Author: Scott Lahteine Date: Sat May 8 05:49:06 2021 -0500 Better opt_set comment of old val commit c5c8ef436c470ed4b8f1cc227e3a0a33373747d0 Author: Scott Lahteine Date: Sat May 8 04:35:35 2021 -0500 Signal SD completion later (#21840) commit 83309c1ac825fa863f660f37d0218c6305ad7845 Author: Adrian DC Date: Sat May 8 08:46:21 2021 +0200 Fix E3V2 Control Menu icon/text order (#21838) Fixes #21837 commit ec2f4f512eb9af1bc182e2d31c18f33cbcee68a9 Author: charlespick Date: Fri May 7 23:44:34 2021 -0700 Active MMU slot indicator (#21842) commit ad991734c474c122244007b9f940197fb78fb9b8 Author: Scott Lahteine Date: Sat May 8 01:41:40 2021 -0500 Add and apply REPEAT_1 macro commit 03184e1c31ac106ac2b44d279d7efb2df34a58cf Author: Scott Lahteine Date: Fri May 7 22:54:06 2021 -0500 Distinct enumerated MF states commit cca5844ba9ddf44d3ff53fdd6115d80f806ba9ac Author: Scott Lahteine Date: Fri May 7 22:39:34 2021 -0500 Misc. code cleanup commit 45d3866f97c590e6e14a0b58cc1a1ff524a7864c Author: Scott Lahteine Date: Fri May 7 22:36:36 2021 -0500 Misc Power Loss cleanup commit 94edfc0a8f0c62a8f59cafde746b6834e87b00aa Author: Scott Lahteine Date: Fri May 7 00:55:39 2021 -0500 Let M421 C select any point Fixing #21147 commit 9fa9eebe51f2dc910d348122417393b61915d4b9 Author: ellensp Date: Fri May 7 17:31:45 2021 +1200 Support a third serial port (#21784) commit 4518506559930cc0ac4f90ae3704c1a6d76eaf23 Author: Scott Lahteine Date: Thu May 6 22:39:34 2021 -0500 Serial and pins debug cleanup - Rename some AVR / DUE / ESP32 serial types - Reduce two #error to one static_assert - Update AVR/DUE error messages commit c1fb84e1a650713f4abb8cfdb1b244c54b49b587 Author: Scott Lahteine Date: Thu May 6 19:34:15 2021 -0500 Reformat features.ini commit ea34aa2d3ee1df06e8a750d0aa641cc0b54181b0 Author: Scott Lahteine Date: Wed May 5 04:24:42 2021 -0500 Add MKS_LCD12864B commit d6cb657c8503baaa735ff639df79b6e961f10bc6 Author: sanek88lbl <42996016+sanek88lbl@users.noreply.github.com> Date: Thu May 6 14:10:18 2021 +0300 Patches for CASE_LIGHT_USE_RGB_LED (#21811) Co-authored-by: Scott Lahteine commit 0df9f30f14ec6aad493895d0dddf2ac6dd6745a3 Author: Luu Lac <45380455+shitcreek@users.noreply.github.com> Date: Thu May 6 04:52:18 2021 -0500 TFT SPI for BTT SKR v1.3 (#21794) commit d3e902af7628af6ea34c97da359130f2ed0c4368 Author: Scott Lahteine Date: Thu May 6 04:17:59 2021 -0500 Move ExtUI subfolders up a level (#21820) commit 0b3420a012ab537a4b251e6285ec21892ff9a571 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Sun May 2 17:38:55 2021 -0400 UBL Mesh Wizard (#21556, #21791) Co-authored-by: Scott Lahteine commit 5cf0975913d32cd12a02825d81e7d7d211230cb0 Author: ellensp Date: Thu May 6 18:54:02 2021 +1200 Simplify / undef extra endstops (#21808) Co-authored-by: Scott Lahteine commit db90a180c24dfcc37e6dd88e8520c9b4d26a69b7 Author: Scott Lahteine Date: Wed May 5 06:32:54 2021 -0500 Cleanup, hex formatting, includes commit d174d610bd310017489aac8f0d5d615f7e08e7c2 Author: Scott Lahteine Date: Sun May 2 21:32:21 2021 -0500 Temperature cleanup commit e69e56ea528851edf54af24bf87db9553a15446c Author: Scott Lahteine Date: Sat May 1 21:14:58 2021 -0500 Use ststm32@~12.1 commit 0c66c713b6e780ac292353351829df8710b5ac60 Author: Scott Lahteine Date: Fri May 7 22:37:31 2021 -0500 Debounce for Power-Loss pin commit 95230c97928490ef9a41dd6a4a1bfef0275ffafc Author: Scott Lahteine Date: Thu May 6 01:51:19 2021 -0500 Use SERIAL_ECHOLNPAIR for resend commit 7eea0ac6de13463b0c4c9269428fc0b712fb30cb Author: Scott Lahteine Date: Thu May 6 04:38:16 2021 -0500 Tweak SKR pins comments commit b19a1f602aacc93d10cd12b8d5775a5e58cb7d28 Author: Victor Oliveira Date: Wed May 12 19:57:43 2021 -0300 Fix multi volume config typo (#21880) commit 789235b925972eeb6510e17131ea9661b24b8005 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun May 9 22:58:36 2021 +0200 🐛 Fix excessive MMU2 timeout (#21855) commit 00722c3294d7cfe28c723d49807e2e507bbcccb8 Author: Scott Lahteine Date: Wed May 12 02:51:25 2021 -0500 📝 Fix version reference commit cb4e3889ece8fd07030f4c2eeaa781679cd8414e Author: Scott Lahteine Date: Mon May 10 22:47:34 2021 -0500 Update Chart.js to 2.9.4 Addressing CVE-2020-7746 commit 76ec7040f1209ea9e0f0132782be62f3054601bb Author: hannesweisbach Date: Thu May 6 03:13:21 2021 +0200 Allow undefined [XYZ]_ENABLE_PIN (for sensitive pins) (#21801) commit b41365b495a4a358969e366ceb9ba1aa1616ac69 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed May 5 18:11:54 2021 -0700 Split up SKR V2 Rev A / B (#21805) commit 6e18af6f8158841bd35df0f2449e4963efbe8d60 Author: ManuelMcLure Date: Wed May 5 17:59:56 2021 -0700 Only look for target disk during Upload (#21804) commit 12bc28bc8ca47ffdbf78b7ed350af9ca0cb58308 Author: Scott Lahteine Date: Wed May 5 17:22:46 2021 -0500 Echo LCD message to serial in kill commit 3fa3be1f3103d70f4ae11ec6383984305dd95b1b Author: ellensp Date: Thu May 6 18:43:16 2021 +1200 Fix MMU2 compile with include (#21809) commit a4687015115a8838bfbb5494491ca7a7ab8a0448 Author: Scott Lahteine Date: Wed May 5 06:32:54 2021 -0500 Cleanup, hex formatting commit f67cd073283d3e49ca162bb03e160b260e1fb078 Author: Scott Lahteine Date: Mon May 3 20:55:05 2021 -0500 Pause and PLR refinements - Move `pause_print` argument `unload_length` after `show_lcd` so it's next to `DXC_ARGS`. - Tweak the position and conditions of PLR save in `resume_print`. - Add `Nozzle::park_mode_0_height` accessor to get the raised Z height. - Remove extraneous `recovery.save` from `dwin.cpp`. - Move PLR `info.volumetric...` to `flag`. - Remove some G-code spaces in PLR code - Document `pause.h` function declarations. commit 5cbdf51b4a8551893a3692c413aacef65541e71d Author: Scott Lahteine Date: Mon May 3 20:09:21 2021 -0500 Apply SBI/CBI/TEST in HAL commit 7378afc6d81ec77d6b0b3bb12dd3dde5e3f5b3b5 Author: Victor Oliveira Date: Sun May 2 23:37:54 2021 -0300 Prevent watchdog reset in setup() (#21776) Cause `manage_heaters` to only reset the watchdog and return until `setup()` is completed. Co-authored-by: Scott Lahteine commit 7957408497cc6e9e3c9be9058a7843732b91b582 Author: Scott Lahteine Date: Tue May 4 19:20:18 2021 -0500 Add token to check-pr commit 53fc13ba7fa46f108be19ccde206dd46741e07be Author: Scott Lahteine Date: Tue May 4 01:47:42 2021 -0500 Fix flush_and_request_resend commit a0ea7cbf26b7fcfc4ee85c6365262d9ceeec003d Author: Victor Oliveira Date: Sun May 2 19:05:15 2021 -0300 Fix bad DELTA probe move (#21781) commit 6310e023a7c42018b628ee4e1c80a1d94508fa3b Author: Victor Oliveira Date: Sun May 2 18:06:44 2021 -0300 Fix bad call to 'diskIODriver' (#21775) commit 5f594ce5d3ce197d21ba1baaed6253f5e36a4fec Author: Scott Lahteine Date: Sun May 2 15:55:20 2021 -0500 Fix parser temperature rounding commit 64a7dfbe7d76a4d05663e597fbaeeecb95069a66 Author: Scott Lahteine Date: Sun May 2 03:02:24 2021 -0500 SOFT_RESET_VIA_SERIAL sanity-check commit 5d0e94c11c74a5a8bf44e1b890e99dd9bc416635 Author: Ken Sanislo Date: Sun May 2 00:09:23 2021 -0700 Allow Creality V4 SERVO0 and PROBE pin overrides (#21770) commit 0ca1170b6d42333798980363d0ac006d81c62ee8 Author: Elton Law Date: Sun May 2 03:06:55 2021 -0400 Allow disable of POWER_TIMEOUT (#21771) Co-authored-by: Scott Lahteine commit addc91a409dc85b8ca9e5ab99ffde97970fc1b4e Author: vyacheslav-shubin Date: Sun May 2 04:28:49 2021 +0300 ExtUI event for PID tuning start (#21734) commit 450f329f0518ff70eaafeaea40cae6f490139dfa Author: Mike La Spina Date: Sat May 1 19:59:45 2021 -0500 Laser Cutter Air Assist (#21753) commit 1f72b4f65b777c11fa18512e146a6d9a9c62b1b5 Author: Scott Lahteine Date: Sat May 1 19:32:21 2021 -0500 Define 'filelist' for dgus/origin commit 50195ec990ffc749a4eec2ee1eb6400aa7701298 Author: ellensp Date: Sun May 2 12:42:38 2021 +1200 Add missing ExtUI method (#21763) Fixes #21761 commit 2d9557cf40f2285718edb8b0096e390d76fa67ac Author: Sebastiaan Dammann Date: Sun May 2 02:38:31 2021 +0200 Fix Z raise in filament load M701 (#21762) Fixes #21750 commit 5625ceec7d2bb85d4186e884392e531ef3c61a41 Author: tobuh <32395668+tobuh@users.noreply.github.com> Date: Sat May 1 10:46:26 2021 +0200 Fix Power-Loss Save on Pause (#21749) commit 888e9cb60bc98b740b01a54ad07238d217915931 Author: hartmannathan <59230071+hartmannathan@users.noreply.github.com> Date: Sat May 1 04:43:32 2021 -0400 Comment correction (#21729) commit d00f6cbe12bfc5313365e9ac4294e74dbbedfb57 Author: ellensp Date: Sat May 1 20:21:18 2021 +1200 Fix Singlenozzle Standby issues (#21759) Fixes #21758 Co-authored-by: Scott Lahteine commit 8abef30a75eaa952db62d701826d5bdf827fe206 Author: ellensp Date: Sat May 1 16:15:16 2021 +1200 Fix SDCARD_CONNECTION default for BTT SKR (#21755) commit 158b26b875a05fb3727774e091fdb1cf6c4c0583 Author: Scott Lahteine Date: Sat May 1 20:06:49 2021 -0500 Fix undefined abl_points commit d92decb77479822945e3a01b4a83ad377a004301 Author: Scott Lahteine Date: Thu Apr 29 09:12:53 2021 -0500 Marlin 2.0.8 commit af9d3c027ee808a1f7f1bbf23bd5cd6085f649a5 Author: Scott Lahteine Date: Fri Apr 30 08:30:31 2021 -0500 MKS Robin flash address commit 47c148628eed8d1d34dbce2eeac803741aa58091 Author: Scott Lahteine Date: Thu Apr 15 17:27:18 2021 -0500 Restore workflows commit e7c2a3a1da4f05ba47af9382d67bc87e37b04d3b Author: Nikolay March Date: Fri Apr 30 12:45:43 2021 +0300 Sanity-check for COREnn backlash (#21731) commit d32575ee74181775f66d614f10a61a4d514f944f Author: lujios <83166168+lujios@users.noreply.github.com> Date: Fri Apr 30 11:38:30 2021 +0200 Fix compile with DISTINCT_E_FACTORS + SLIM_LCD_MENUS (#21733) Co-authored-by: Scott Lahteine commit f6b0398ca83cbfc983f5bfdc88bcc479d483c785 Author: Scott Lahteine Date: Fri Apr 30 03:21:59 2021 -0500 Heater error status commit d5c6762332da048e121a50b823e90019286f50fa Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Apr 30 01:07:18 2021 -0700 Fix BTT E3 RRF and SKR V2 (Generic PIO) (#21741) Follow-up to #21655 commit a1154b226d2baf813d1864450ad4d370909d0579 Author: David Date: Fri Apr 30 08:51:26 2021 +0200 Fix Thermal Runaway false-alarm in M303, add HeaterWatch::check (#21743) Co-authored-by: Scott Lahteine commit 731a01890584c0d763eb2560a20b50ad8f7c3492 Author: Scott Lahteine Date: Wed Apr 28 02:04:07 2021 -0500 Silence warning in gcode_D commit f45f4a8d54382f7a11afdf3f1c8fd7d50b58e3a6 Merge: dd1503d5a8 e306abaf8a Author: Scott Lahteine Date: Thu Apr 29 08:50:28 2021 -0500 Merge branch 'bugfix_no_dates' into prepare_release_2073 commit e306abaf8af20e630685d766aad990f324f4cee6 Author: David Date: Wed Apr 28 11:08:21 2021 +0200 Color UI Move Screen for 320x240 TFT (#21708) commit bc28aed5b1bbc431b8e52be71c7464618995ae75 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Apr 27 17:21:13 2021 -0700 Clean up TFT comments (#21723) commit 93afb029946cedc06c1a3250c1e6108cf67a253a Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Apr 27 05:16:19 2021 -0700 BTT SKR V2 probe and chamber pins (#21717) commit 0db64af9b242e2eb1b9f876a5320f0d9c6b8afdb Author: Scott Lahteine Date: Tue Apr 27 04:49:21 2021 -0500 Rename, clean up boards/variants (#21655) * Consolidate variant scripts * Rename Marlin-local boards * Simplify variants where possible * Rename variants * CHITU_F103 and MEEB_3DP: Maple platform `platformio-build-stm32f1.py` uses the 'board' name, not 'board_build.variant' so folder names match 'board' and not `board_build.variant`. commit 4da3f45f416266edeedb309cadd2d6f1e3c12a83 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Apr 27 00:22:09 2021 -0700 BTT SKR V2.0 / Stepper Driver Anti-Reverse Protection (#21503) commit 8a8aeba17c09080814e62377221fd75db8a4b513 Author: Adrian DC Date: Tue Apr 27 06:42:28 2021 +0200 Fix E3V2 Advanced Settings with PLR off (#21700) Fixes #21534 commit e640d9246d9c4ed26edd55d518f5a4074afdd7ee Author: Marcio T Date: Mon Apr 26 22:40:59 2021 -0600 FTDI EVE Touch UI fixes (#21706) commit 81d7a6b81d2171915bf5cfa4f14255e683743959 Author: ellensp Date: Tue Apr 27 16:36:39 2021 +1200 Use temp_info_t for temp_redundant (#21715) Fixes #21712 Co-authored-by: Scott Lahteine commit 08537dc89114287c3b65a51498268ccf8876d52d Author: Victor Oliveira Date: Mon Apr 26 21:30:34 2021 -0300 Remove compiler flag merge-constants (#21711) commit c2741affe9ce6edcfc0d35558ddf924c86d42e34 Author: Sebastiaan Dammann Date: Tue Apr 27 01:32:13 2021 +0200 Make Cancel Objects reporting optional (#21698) commit 301cc85fec0e4704b97cb1396cc79250b9382b20 Author: hartmannathan <59230071+hartmannathan@users.noreply.github.com> Date: Mon Apr 26 19:30:26 2021 -0400 typo (#21710) commit 3433bfc3bd40a056d6072dcd93c998227c0c16c2 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Mon Apr 26 19:22:27 2021 -0400 Help users confused by "bed size" (#21714) commit 62ec696caefc7fe7bed7143d7c8c34c10726cb20 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun Apr 25 21:34:42 2021 -0700 Fix "continuous" typo (#21701) commit 0d0ec3ec89003974443be99aa13740598c7048d1 Author: Scott Lahteine Date: Sun Apr 25 23:33:52 2021 -0500 Prettier output from opt scripts (#21707) commit 1d4c2454bcb425c68bcc1578d47d9045dfce1df4 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Sun Apr 25 21:55:15 2021 -0400 Fix relocated LiquidCrystal library (#21699) Followup to 770e539859 commit 0fb606fa0a8f8e2eddd5c11a51b8ce9f9437a5dd Author: Scott Lahteine Date: Sun Apr 25 17:17:02 2021 -0500 whitespace commit 0ec489d6f2ab63cef50240e072c972b77eb573e9 Author: Scott Lahteine Date: Sun Apr 25 04:15:13 2021 -0500 Fix HMI_HomeOffN axis Followup to #21534 commit 7e3cf82a4066fe51126eab926119f47e26df9b1b Author: pinchies Date: Sun Apr 25 18:48:20 2021 +1000 Fix usage, commentary of MANUAL_PROBE_START_Z, Z_AFTER_PROBING (#21692) Co-authored-by: Scott Lahteine commit 84e8d4c60373c722daed16fd18375b87cac26fa9 Author: Miguel Risco-Castillo Date: Sat Apr 24 18:50:44 2021 -0500 E3V2 DWIN Advanced Settings (#21534) Co-authored-by: Scott Lahteine commit 8373bd1b71de84a6d288ae467f7bdade600a45a4 Author: Scott Lahteine Date: Sat Apr 24 15:22:38 2021 -0500 Use Adafruit LiquidCrystal commit 6202b2d324b86d4ad789b5aa298ae86677233fa1 Author: Scott Lahteine Date: Sat Apr 24 02:29:20 2021 -0500 Remove extra platform_packages line commit e46f81af220ffa7f74380d2995f6c2cfe090b825 Author: Scott Lahteine Date: Sat Apr 24 15:22:50 2021 -0500 Add INO to .editorconfig commit 888cabff271b4ab39d7e6cc395aa4a820b4a8233 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Sat Apr 24 06:35:02 2021 -0400 Sanity check MIXING_EXTRUDER + DISTINCT_E_FACTORS (#21689) commit c6b6437761e95fadebe243af88917a150684371a Author: Scott Lahteine Date: Sat Apr 24 05:28:50 2021 -0500 Drop Deviot workaround commit 183062947250fb3c50b47e7dcdaaa70708289850 Author: Scott Lahteine Date: Sat Apr 24 05:20:55 2021 -0500 Use temperature accessors commit 12ca73947be14cada4bc2b37bd24fc39d36c2ae9 Author: Nikolay March Date: Sat Apr 24 12:38:00 2021 +0300 Backlash Compensation for COREnn (#21612) Co-authored-by: Scott Lahteine commit c39c17c1b5c041a1c90004b09b31571dd9f51f6b Author: fedetony <45215920+fedetony@users.noreply.github.com> Date: Sat Apr 24 09:53:52 2021 +0200 Soft Reset via Serial or post-kill button click (#21652) Co-authored-by: Scott Lahteine commit 27a26fcfeb114df99dda83e6b9c2b49806c5f738 Author: Ramiro Polla Date: Sat Apr 24 09:52:34 2021 +0200 Avoid + 0.0f in menu items (#21642) commit 48d5fae514b230e1692eefb791b32608f33ce935 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Sat Apr 24 10:42:44 2021 +0300 Fix Bed Tramming 5th point (#21646) commit 3153080301a7058cabfc94abb2b39e0dba9ba0b3 Author: Scott Lahteine Date: Sat Apr 24 01:29:30 2021 -0500 Move last bootscreen delay to end of setup (#21665) commit 309d82b6aab028a3ff22c6cf55444be5cdc891d1 Author: Ryan Finnie Date: Fri Apr 23 23:26:17 2021 -0700 Clean up / improve generate_version script (#21674) commit b9715c5a03b657fdb16640dc26a0ef176a961925 Author: vyacheslav-shubin Date: Sat Apr 24 09:16:14 2021 +0300 ExtUI::onPostprocessSettings (#21683) commit 3ae05572582272780f78a8e5083c2268a1cb88da Author: Sebastiaan Dammann Date: Sat Apr 24 08:01:17 2021 +0200 Prevent extrusion on M600 un-park (#21670) Fixes #21669 commit 02b6c0e88112613225ef953720b8fcc7708145f8 Author: unknownlamer <72777654+unknownlamer@users.noreply.github.com> Date: Sat Apr 24 01:59:31 2021 -0400 MCP4451 Digipot Support for Azteeg X5 GT (#21680) commit cf5ea1ccdc47d68455185d71e045f96d58decfdb Author: ellensp Date: Sat Apr 24 17:11:11 2021 +1200 Fix MP_SCARA compile (#21686) commit 011a3445004b880de9eb185bb031878f3a45cf69 Author: Jim Hyslop Date: Sat Apr 24 01:08:46 2021 -0400 Don't display service prompt unless needed (#21654) commit 1570005683663973ae2869c5526b8eef73df9203 Author: Victor Oliveira Date: Fri Apr 23 22:29:15 2021 -0300 Fix Celsius precision, current temp accessors (#21678) commit 899fcf51e6efe322153cf6afd75752b5b313700d Author: Scott Lahteine Date: Fri Apr 23 20:19:23 2021 -0500 Add whole-degree accessors, simplify some temperature-related features (#21685) commit 7d5714fedd3a32a73218123ae17be08a98e3a3ef Author: Scott Lahteine Date: Fri Apr 23 19:36:43 2021 -0500 Let compiler do Temperature inlining commit 9f22aaea2f896a290c28ccd2aa1cabdc1e9f97bf Author: Scott Lahteine Date: Fri Apr 23 19:06:55 2021 -0500 Clean up formatting, wrap macros commit 4ab19e788205b22f99ffc25d22f4aeacb9aeeb8b Author: Scott Lahteine Date: Fri Apr 23 19:14:49 2021 -0500 Update temperature types commit ecc419fce0289be66f4163c7d4796eaab35a8759 Author: Scott Lahteine Date: Fri Apr 23 19:14:58 2021 -0500 Nextion cleanup commit d5e62a8255c9e7c373f52e0d9988c1a354fbf613 Author: Scott Lahteine Date: Fri Apr 23 19:09:35 2021 -0500 Use configured temp window for Chiron commit 5859860a0248e2a42f2a395af3a4aa5971b077ad Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Fri Apr 23 07:43:28 2021 +0800 Enable Purge More / Resume with EP + Host Prompt (#21671) Co-authored-by: Msq001 commit b8aeaa3bf49b856aead82bd96e8b3272638e143a Author: Mike La Spina Date: Thu Apr 22 18:19:41 2021 -0500 M10-M11 Air Evacuation for Spindle/Laser (#21668) Co-authored-by: Scott Lahteine commit a866a8f2fba8a18e34fe911c3acccfcc83432ef2 Author: Scott Lahteine Date: Tue Apr 20 19:16:27 2021 -0500 Fix Chiron typos, file nav commit 214324aaa2b65ef22be820de66d7e48c6208fbd9 Author: Scott Lahteine Date: Tue Apr 20 16:36:19 2021 -0500 Fix mfconfig 'copying' message commit 181e1280afc9b2c0067f06329b558120abe84025 Author: Axel Sepúlveda Date: Tue Apr 20 06:14:21 2021 -0400 Fix Grand Central SD dependency (#21660) Co-authored-by: Scott Lahteine commit 2316fb2d056d3dd71d2a3f2cf9da6746b4d655ef Author: Scott Lahteine Date: Tue Apr 20 05:11:43 2021 -0500 Extra dependency script logging commit 81ab75675917febaf5ae61b613833bb2f0060539 Author: Scott Lahteine Date: Tue Apr 20 00:44:19 2021 -0500 Changes supporting "Prussia3D" MK3 (#21617) commit c50a9ef055c17a44c1c9d099e7b313a7e4e1050f Author: Scott Lahteine Date: Sun Apr 18 19:01:51 2021 -0500 Update mftest help commit 3d3c0591e8ce19dec31ee585dded20f1d144d1ed Author: Scott Lahteine Date: Mon Apr 19 13:30:21 2021 -0500 Trigorilla Pro: Allow for swapped Z-stops commit e0f60c3811114730418973da49cf4bf80d369382 Author: Scott Lahteine Date: Mon Apr 19 00:07:57 2021 -0500 Update realtime, DLP comments commit 59e55ea6fb1614c83e67c237b5ea8eaec387c448 Author: Nick Date: Mon Apr 19 05:04:38 2021 +0100 Support new style Anycubic Chiron TFT (#21597) commit df36d759fc18e3249eae445d6b2eaef5ddd64d2e Author: Scott Lahteine Date: Sun Apr 18 22:46:43 2021 -0500 Skip preflight checks only (#21658) Followup to e8af38cc2d commit fe24aa22544aac060ab5b3ec3043c343c1e7f4fb Author: Scott Lahteine Date: Sun Apr 18 18:24:08 2021 -0500 More detailed serial config error commit 1a442702841efb5937da350ccd71a6c33d4c1b8d Author: Scott Lahteine Date: Sun Apr 18 17:12:56 2021 -0500 Fix CHDK warning commit a860f7f5f762d07af186a58c9c9e4bdceceb7650 Author: Scott Lahteine Date: Sun Apr 18 14:17:37 2021 -0500 BTT E3 RRF Support commit e5fc3f3a62998be5a07f3e86d4d3aea2d25b9a44 Author: Scott Lahteine Date: Sat Apr 17 19:52:23 2021 -0500 Disable assert() by default commit 276fd6b0771cd400053519a6c78b7fa71b7f384b Author: Scott Lahteine Date: Sun Apr 18 14:07:30 2021 -0500 Misc. pio cleanup commit 27754a76dcecc11d428a8fb182c443e4d115433c Author: Scott Lahteine Date: Sat Apr 17 14:19:33 2021 -0500 Skip scripts during 'platformio init' (#21643) commit b586b6411967ffcfd3f3dedc0097aee6bc81ee8c Author: fedetony <45215920+fedetony@users.noreply.github.com> Date: Sat Apr 17 10:54:43 2021 +0200 Fix Realtime Reporting with G-code Motion Modes (#21630) commit 9c86eef98b11a140d944e90bff7f36ae144e3b57 Author: Scott Lahteine Date: Sat Apr 17 02:03:16 2021 -0500 Leave Hybrid Threshold as-is for now Reverting 253ee0c407 commit db054ba757ba8485698953bffad0bbfa7102e237 Author: Scott Lahteine Date: Fri Apr 16 09:30:39 2021 -0500 Better chopper defaults commit 2e726c46c87ea1707203b9019d14cf82872be9e8 Author: MangaValk Date: Fri Apr 16 15:02:31 2021 +0200 Tool sensors (#17239) commit 791edd0cec6df6bdd69dfedd8acca4f60c394212 Author: Scott Lahteine Date: Wed Apr 14 00:26:57 2021 -0500 Use itoa for sprintf int commit e4760ea2b055492f836bcb1ad151f8e7ad357649 Author: Scott Lahteine Date: Fri Apr 16 04:28:16 2021 -0500 Drop extraneous inlines commit 61ee5b1d7636a4b29ae19bd137c819a1a1019c14 Author: Scott Lahteine Date: Fri Apr 16 04:04:07 2021 -0500 Init pwm_thrs to 0 when HYBRID_THRESHOLD is off (#21623) commit b6ce7a9f740e4305cf4651b52fc962ea0430958a Author: Luca Zimmermann Date: Fri Apr 16 11:01:50 2021 +0200 Always swap with PRIME_FIRST_USED disabled (#21622) commit 99fa641a24b543a01fd16e56835ac6d0c8fc2f99 Author: Scott Lahteine Date: Fri Apr 16 02:50:45 2021 -0500 SDIO cleanup commit c67e115f61deaf896455bfb41961fbe7f1d4398f Author: Scott Lahteine Date: Fri Apr 16 02:43:59 2021 -0500 Revert experimental NAN patch Hold changes from #21575 (24a095c) for more testing. commit 027a5a872de56c462b260386b0e5cd2aa88c577e Author: fedetony <45215920+fedetony@users.noreply.github.com> Date: Fri Apr 16 08:59:28 2021 +0200 Realtime Reporting, S000, P000, R000 (#19330) commit 973f65f80c0909b8fb9d49fef57fc2004a45c907 Author: Scott Lahteine Date: Thu Apr 15 20:06:08 2021 -0500 Use celsius_t for temperature accessors commit 643f04681c1de61d1718279b7af9d8e3f6386761 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Thu Apr 15 17:45:30 2021 +0800 Fix MKS H43 compile (#21619) commit 713e606b28b93631386678a94353ee433c45bce9 Author: Andrea Date: Thu Apr 15 11:37:37 2021 +0200 Fix Custom Menu audio and return (#21616) commit ce18713f577a4cd2d7165062f93ffb4fcd4a13dd Author: Scott Lahteine Date: Wed Apr 14 05:54:12 2021 -0500 Add E1 for RAMPS 1.4.4 / AGC commit 761d283d6df8201b712e8ff679c628fc3686f25a Author: XDA-Bam <1209896+XDA-Bam@users.noreply.github.com> Date: Wed Apr 14 11:42:04 2021 +0200 Space-separate scrolling Status Message (#21523) Co-authored-by: Scott Lahteine commit 4512bcd72ce5822048b22aa1a9ca1c54fc499ecb Author: Scott Lahteine Date: Tue Apr 13 23:23:06 2021 -0500 Use sq commit 47dbea9334c4e1f37c1fbe0f6f3727a15e23e70c Author: Scott Lahteine Date: Tue Apr 13 23:22:57 2021 -0500 Fix long acceleration overflow commit 326b1c122506d864b18f146e95cb47485bf1b364 Author: Scott Lahteine Date: Tue Apr 13 21:34:21 2021 -0500 Misc. formatting, serial out commit e26eebfb2fc2ca1013c5d0e01d4d491b17c638ae Author: Marcio T Date: Tue Apr 13 17:31:12 2021 -0600 Enhance and fix FTDI Eve Touch UI (#21607) commit 107dd313bdfed5f908ff755b122287667b67a51c Author: Victor Oliveira Date: Tue Apr 13 19:34:19 2021 -0300 Multi-Volume. Select Media for LVGL (#21344) commit 02a99e3f0bad36f91cc4f7ee19b6e6dec3b13132 Author: gmarsh Date: Tue Apr 13 17:17:52 2021 -0300 Fix and improve Power Monitor (#21551) commit 896123513e44952109524d60f4cf806d600bef50 Author: Scott Lahteine Date: Tue Apr 13 15:07:25 2021 -0500 Followup to sprintf cleanup commit 562f3e43bc3522583b524baeeaaf6088f4aa3d71 Author: Scott Lahteine Date: Tue Apr 13 04:00:39 2021 -0500 Add fan percent accessors commit ed477abbd5fb8d2a6a3dcf5b3ec4e5b68b2f4555 Author: Scott Lahteine Date: Tue Apr 13 03:49:20 2021 -0500 More MKS UI sprintf commit 21518fbd4e9c077da21059b795f6537f79d5b14e Author: Veisen Date: Tue Apr 13 10:09:21 2021 +0200 Fix ANYCUBIC_LCD_I3MEGA compile (#21585) commit 52f928700ac58902b99b234bfbea0ea61bfa54a3 Author: Scott Lahteine Date: Mon Apr 12 23:40:32 2021 -0500 Remove extraneous MKS UI sprintf commit c96340980a5439f4db1cc86b1290acf6f975bd5e Author: pinchies Date: Tue Apr 13 12:14:34 2021 +1000 Fix Flash size (512KB) for STM32F103ZE (#21590) commit 8384582116819dceaf596d47c179b15e9a557741 Author: ellensp Date: Tue Apr 13 14:02:21 2021 +1200 Fix Max Temperature not enforced (#21592) commit ac5b39b3540f3751b37e0554c6cc584399bec5a7 Author: Scott Lahteine Date: Mon Apr 12 20:58:34 2021 -0500 Blocking move followup commit 0f7161785ee2324de7198d9abf142964ee8f190f Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Apr 13 03:28:13 2021 +0200 Chamber Fan mode 3 (#21594) commit 49fba5a82a488ff1eb6731fd9a0157e9fc9a2497 Author: Scott Lahteine Date: Mon Apr 12 20:15:41 2021 -0500 Add 'blocking move' comments commit fb7bdabb70d77d29c25427b5e4df4a1976d26e63 Author: espr14 Date: Tue Apr 13 03:10:21 2021 +0200 Fix Resume Print with UBL (#21564) Co-authored-by: Scott Lahteine commit 5ab64708c5604e43f8079d7eda3bbb40d01d6c79 Author: Scott Lahteine Date: Mon Apr 12 19:34:31 2021 -0500 Update old-style axis indexes commit f14d0e098382d4ac001d7b897cdee4739ffed239 Author: Mike La Spina Date: Mon Apr 12 17:52:18 2021 -0500 Tweak cooler / flowmeter icons (#21573) commit ca84e5b1f2c5f7e0f0ffe3090456f23d85a45a8f Author: Ramiro Polla Date: Tue Apr 13 00:39:22 2021 +0200 Add 'jump relaxing' compile flag to AVR targets (#21566) commit c66cbf0d691ceea773366caca48bf9e955613c2f Author: Scott Lahteine Date: Mon Apr 12 16:49:53 2021 -0500 Reduce math library code size by 3.4KB (#21575) commit f69ce3e02bfd6bbac483085a74126068a9cf384e Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Mon Apr 12 00:32:28 2021 +0300 MKS LVGL UI: Fix icon layout (#21595) commit 2251038ab857ec2a6dc4f7d4605321ffebfabd5f Author: Scott Lahteine Date: Sat Apr 10 20:09:15 2021 -0500 Clean up, update some variants commit 42d63258e951a1eb0609637686869d9fc0faf7b7 Author: Scott Lahteine Date: Thu Apr 8 15:43:16 2021 -0500 tick() => isr() to spotlight interrupt-time commit d34a143d8277c57d4df1b7a19985e05f23d86b21 Author: Scott Lahteine Date: Sat Apr 10 18:27:15 2021 -0500 EXP2_01_PIN for BTT BTT002 1.0 commit 4e9eb9583031cddee2913af0dbf6b720051a9fae Author: ellensp Date: Sun Apr 11 08:35:45 2021 +1200 Followup to "no status for serial::write" (#21577) commit 9a31702a7513985c416f327c8c7089679952915b Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Sat Apr 10 16:44:36 2021 +0800 Fix M114 E / R broken by `LIN_ADVANCE` (#21579) commit 34f7142323080aac77444894b7bd3dfd64b0e752 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Sat Apr 10 04:29:59 2021 +0800 Fix manual move with MKS H43 (#21511) Co-authored-by: Scott Lahteine commit 00ea75ce822506765c1fc1af0445a910e530bc47 Author: Ramiro Polla Date: Fri Apr 9 04:05:31 2021 +0200 Drop return value from Serial::write() (#21567) commit 6d9aaf8de5b2b7739de8b87565b9b8efc92434d2 Author: Ramiro Polla Date: Fri Apr 9 04:03:34 2021 +0200 Macros to eliminate 'f + 0.0' (#21568) commit a82b3955bb7e62ca745077ad589f46db1561ad1a Author: ellensp Date: Fri Apr 9 13:36:48 2021 +1200 Check for old Marlin files mixed in (#21574) commit c9a7fd1722764f2b790a38f2c7ee0c4d00d77c17 Author: Victor Oliveira Date: Thu Apr 8 22:35:21 2021 -0300 Delay U8glib init using U8glib-HAL 0.4.4 (#21496) Co-authored-by: Scott Lahteine commit 1bd35072cbf45b2b5574dc6a05f411b00238e120 Author: Scott Lahteine Date: Wed Apr 7 15:43:07 2021 -0500 Fix axis char printing commit c8c83e9f52fffcac09e8f29200596753aadd5c55 Author: ellensp Date: Thu Apr 8 08:02:09 2021 +1200 Sanity Check newer Configs too (#21550) Co-authored-by: Scott Lahteine commit ab2441c0887211b82fa473c4a7e7425f7ddfb104 Author: Radim Karniš <57687985+radimkarnis@users.noreply.github.com> Date: Wed Apr 7 21:41:38 2021 +0200 Park Magnetic Switching Toolhead at the very end (#21552) commit 2c73964b2b78f5af60d166d1c8becf8569d647fb Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Tue Apr 6 10:40:50 2021 +0800 BTT SKR-SE-BX (STM32H743IIT6 ARM Cortex M7) and BIQU_BX_TFT70 (#21536) commit ee21e31a17fd6853c2a219c2259693f303d379c8 Author: Scott Lahteine Date: Mon Apr 5 21:27:05 2021 -0500 getHighESpeed => autotemp_task commit 93dfd411fc6b2929a0486846805e854caa5ded0a Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Tue Apr 6 04:55:00 2021 +0300 Cast celsius to int for MKS LVGL UI (#21502) commit c197ecc99b59d17b4db1d4b46361b036d12fc961 Author: Victor Oliveira Date: Mon Apr 5 22:46:21 2021 -0300 Fix Rumba32 variant for Marlin (#21497) commit c2c73215b2f2b46a1a06110c6bbcfcfedcf30b41 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Tue Apr 6 04:39:57 2021 +0300 MKS LVGL UI: Display/edit fan percentage (#21544) Co-authored-by: Scott Lahteine commit 1ba0ed8121f4ccbd9e89f45b84792366d884798a Author: Mike La Spina Date: Mon Apr 5 16:34:31 2021 -0500 Make DELAY_NS round up on AVR (#21546) commit c5ab0a66b74e442a212953050ba1b55c8d2f39be Author: Scott Lahteine Date: Mon Apr 5 15:34:51 2021 -0500 write_command changes input commit f3510db3679ce53ec08b5d9da3e951866b3017d5 Author: Scott Lahteine Date: Fri Apr 2 14:30:13 2021 -0500 Fix CardReader string args commit c46c2c4f3c0887b89ea3966d7e3cb32c10c94c6d Author: Marcio T Date: Sun Apr 4 17:58:03 2021 -0600 Touch UI Bed Mesh Screen refactor, enhancements (#21521) - Split mesh view and edit screen into two screens - The editor now live-updates the graphics - Added Touch UI mesh progress feedback to `G26` - Show positive / negative mesh values in different colors commit 0b5c25aa7ca6159e3773117d07aa065e1bff61b1 Author: vyacheslav-shubin Date: Mon Apr 5 02:52:16 2021 +0300 Fix FAT delete of items with long name (#21528) commit ba5644376c51be7f126c10b37c726ee22c867c6d Author: Scott Lahteine Date: Sun Apr 4 18:07:16 2021 -0500 misc. pointer formatting commit c4379db8fc6db46e79b3e5d518b5fb05383a7ae0 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Apr 4 18:35:58 2021 -0400 Revert "Optimized string-to-number functions" (#21532) This reverts #21484 commit cdd2450a9745f7fa065f0125b4c80b32b07ca66c Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Apr 4 17:55:34 2021 -0400 Fix Hotend-abort-on-idle Check (#21535) commit 84445b82e4d9acd8055a75fbc7cbde1e32aed6ac Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun Apr 4 23:45:56 2021 +0200 Update Italian language (#21537) commit 05d7d3787260a3f019b93f512b09edd356fb5869 Author: Scott Lahteine Date: Thu Mar 18 22:49:04 2021 -0500 Suppress redundant serial errors commit a8f8201c90db4bdb01175e2cbd41c27f9309ed86 Author: XDA-Bam <1209896+XDA-Bam@users.noreply.github.com> Date: Sat Apr 3 02:11:22 2021 +0200 Update u8g / AVR display timing defaults (#21518) commit 7297cc13b0db1344ffc1fc6716c89da09d0238e3 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Fri Apr 2 20:06:43 2021 -0400 GT2560 V3 followup (#21512) commit 4f174afc1a302f959c3483605f0e2caa259488fa Author: Scott Lahteine Date: Fri Apr 2 14:22:43 2021 -0500 Remove extraneous 'extern' hints (#21516) commit 96bdc4c8307bdbb5d9c8d696a14f7a4cee3cbbad Author: Scott Lahteine Date: Thu Apr 1 21:54:34 2021 -0500 Requiring PIO >= 5.0.3 commit 9fbce867ee1b76732f306772fa6d3a727eab7b65 Author: Scott Lahteine Date: Thu Apr 1 21:53:19 2021 -0500 Split up platformio.ini (#21507) commit fea48359415f5590dd87e13238189d20e9b61ff3 Author: Mike La Spina Date: Thu Apr 1 19:29:49 2021 -0500 Followup to Laser Flow Meter (#21498) commit 47a13263f6358c4a2803573e671de296f97b2ca2 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Fri Apr 2 08:19:22 2021 +0800 MKS H43 fix, cleanup (#21500) Followup to #21485 commit 82e6a2ed62d255b54f733f6568a9abde23ea36de Author: Marcio T Date: Thu Apr 1 18:12:00 2021 -0600 G26 Hilbert Curve followup (#21480) commit b1be96e40e0cd070b7f9e1e349fcd1f2c7ca31f1 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Thu Apr 1 19:05:02 2021 -0400 Board IDs for G2560 Rev B, G2560 v4, GTM32 VD (#21499) commit a4d5f96e9aececde7dc2749444f82e20f9db3551 Author: Scott Lahteine Date: Thu Apr 1 17:59:57 2021 -0500 Replace 'const float &' with 'const_float_t' (#21505) commit a4f16230120a5210371230e3f685b8e7c2943915 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Wed Mar 31 15:34:17 2021 +0800 MKS H43 fix, cleanup (#21485) Co-authored-by: Scott Lahteine commit fe99bb4b9b97b385f6c75592afac0ccf47643724 Author: Scott Lahteine Date: Tue Mar 30 23:57:57 2021 -0500 Update UBL param commit 259115bb3f75fb6cf99e19fce230a327d8afd094 Author: Scott Lahteine Date: Tue Mar 30 23:16:29 2021 -0500 Move apply_rotation_xyz into matrix_3x3 commit a572e2ed123d3ee23c1964c9e933c11ea55a0a50 Author: Scott Lahteine Date: Tue Mar 30 21:54:34 2021 -0500 Put ABL state into a class commit 5ad7118aeaa9c277df8efc5ad3a8a1d0c8e2b99c Author: Marcio T Date: Tue Mar 30 20:23:43 2021 -0600 FTDI Touch UI fix and reorganize (#21487) commit 16af2148b9fbd89d7294042a2459789138555ecd Author: Ramiro Polla Date: Wed Mar 31 04:20:33 2021 +0200 Optimized string-to-number functions (#21484) commit e787cdd1cb092c82b34a84181fbb6bae69ce5279 Author: Marco van Wieringen Date: Wed Mar 31 03:11:33 2021 +0200 Fix FYSETC_S6 heaters pins (#21483) When adding support FYSETC Spider board the S6 pins file was broken. commit 2b0fcc79c55ff1dfa5dbe13a9eb52b9811498e80 Author: Scott Lahteine Date: Mon Mar 29 22:38:33 2021 -0500 Serial flags followup Followup to #21318 commit 4e77fe50a473a4491924b9815554405530a8fdf6 Author: Scott Lahteine Date: Mon Mar 29 21:10:55 2021 -0500 Adjust microsteps alignment commit 9902e6fb9f1f50a4396fc7d1a2f834c600331a89 Author: Victor Oliveira Date: Mon Mar 29 23:52:30 2021 -0300 Fix and add STM32 SDIO DMA (#21476) commit f18da95d38499f70f6f652165ac380b02185c752 Author: X-Ryl669 Date: Tue Mar 30 04:36:01 2021 +0200 Flags for MarlinSerial instance features (#21318) commit 368fcaee549b16425c6eb60679798ba100b0226d Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Mar 30 04:14:11 2021 +0200 Generalize MMU (#21469) commit badbb4a500f1a583e059b1085f533f6454ead023 Author: Ste Date: Tue Mar 30 04:07:21 2021 +0200 Align temp settings (#21329) commit b96c3a063fd5c9b334e7f38a52f3b55bf46beebb Author: Ramiro Polla Date: Tue Mar 30 03:56:44 2021 +0200 Optimize BLTouch code for size (#21477) commit 84a2746d059ea83f5ca81bf671499d4037abb81c Author: Scott Lahteine Date: Mon Mar 29 20:00:57 2021 -0500 Improve uncrust script commit 2059c6e4d06f12905256584682d95fe80dea075e Author: Scott Lahteine Date: Mon Mar 29 20:36:37 2021 -0500 Apply pointer formatting commit bf3fce3550009bafe0e7ea3cbe4511f2a23cf8f6 Author: ellensp Date: Mon Mar 29 22:43:07 2021 +1300 GT2560 Rev.A Plus Z Max Pin with BLTouch (#21375) commit 19078966d966bd471cb07b6d89726e5d15e21d05 Author: George Fu Date: Mon Mar 29 17:38:28 2021 +0800 FYSETC Spider board (#21458) commit f734f79f5bfbfe27c389b9c278cc278182ef122d Author: Scott Lahteine Date: Mon Mar 29 03:32:34 2021 -0500 reduced verbiage commit 627331aa684cae1ea15f0c38f67d4eeaf51fbb93 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Mon Mar 29 11:19:38 2021 +0300 Fix MKS LVGL UI Main screen / print buttons (#21468) commit 3ed4503c302693e209eb85f96d9c8a6c43f9692d Author: Scott Lahteine Date: Mon Mar 29 01:49:35 2021 -0500 Adjust mfconfig script commit f1986545daab5ca661b400f27d2b3762c7276f38 Author: Mike La Spina Date: Mon Mar 29 01:41:56 2021 -0500 Laser Coolant Flow Meter / Safety Shutdown (#21431) Co-authored-by: Scott Lahteine commit 9f48314cb469cfa27571224dc03310248e585ea3 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Sun Mar 28 20:27:02 2021 -0400 YHCB2004 pins followup (#21472) commit 7c275285eaa6802614aae5533262065d6b406551 Author: Marcio T Date: Sat Mar 27 21:57:12 2021 -0600 Refactor Hilbert curve. Enhance Touch UI Bed Level Screen. (#21453) commit 4ffb95a73639c0d0e8c0797278fde6639596e3c5 Author: Leoric Date: Fri Mar 26 23:41:55 2021 +0300 MKS UI: Monitor state when idle (#21452) Co-authored-by: Scott Lahteine commit 943a8ebdc688d43455238f1e53da8db5ac7b65a8 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Thu Mar 25 21:44:35 2021 -0400 Fix for YHCB2004 (#21450) commit 8d73a6c4e2e99015a27d82c9344869a5e4ca7019 Author: Tomas Rimkus Date: Fri Mar 26 01:16:45 2021 +0100 Avoid watchdog reset in all wired EEPROMs (#21436) Co-authored-by: Scott Lahteine commit e817db62a45da3e5353aa311541863108b0163b5 Author: Scott Lahteine Date: Thu Mar 25 16:49:04 2021 -0500 Apply TMC UART to STM32, simplify commit 85eb179acff1b66d5ce52622a26f2a4d070048ca Author: Scott Lahteine Date: Thu Mar 25 16:19:03 2021 -0500 Define HW serial ports needed for TMC UART (#21446) commit 3d70b645b613be63b697dd9c45089e396eac565d Author: Ramiro Polla Date: Thu Mar 25 04:56:48 2021 +0100 Optimize LSF for size, efficiency (#21443) commit c83b6217f9cc66cdc82dd12b3f69c1d6d6be7729 Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Thu Mar 25 00:40:48 2021 -0300 Followup to SDIO patch (#21440) commit a97f6c4c749406cb0c27800f70000ce2a96a9051 Author: espr14 Date: Thu Mar 25 04:39:29 2021 +0100 Endstops always on in G28 (#21441) commit 710b1bcb6d5d9b887ade1640f5a16c60727bc3e1 Author: espr14 Date: Thu Mar 25 04:39:10 2021 +0100 Endstops always on after delta homing (#21442) commit b4617e7904aa0b90ddcaf0edffb82ea27af2d5d4 Author: Scott Lahteine Date: Sat Mar 20 22:39:13 2021 -0500 Tweak disabled variant options commit a9f022dacfddbd04610eca3ccf5aecc5b62c7536 Author: Scott Lahteine Date: Sat Mar 20 22:43:47 2021 -0500 Update common-cxxflags.py comment commit 5ff4476ccb092eb85f79997933ea579d81a4704b Author: Scott Lahteine Date: Mon Mar 22 23:58:03 2021 -0500 Comment, clean up some PlatformIO scripts commit 98a6015d3a535860fd2241e4dd84102c672e94b9 Author: Martijn Bosgraaf Date: Wed Mar 24 18:21:11 2021 +0100 Extend M106/M107 for better laser module support (#16082) Co-authored-by: Scott Lahteine commit 05b281ad9e5ab2587c2aa62a33c5f260787be03f Author: Bryan Hunwardsen Date: Wed Mar 24 10:05:46 2021 -0700 SKR E3 Mini V2.0 Fan Bug Fix (#21079) Co-authored-by: Scott Lahteine commit 3c9ffa77f984a9d41f9fc26ab66eac457b68abf0 Author: Miguel Risco-Castillo Date: Wed Mar 24 10:12:57 2021 -0500 Ender 3 V2 Status Line (#21369) Co-authored-by: Scott Lahteine commit 2a32d14dc4afd3c80aec45a3711706f255b5b8e2 Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Wed Mar 24 11:30:19 2021 -0300 Fix SDIO buffer alignment (#21396) commit e087271d48a033edb9fdeb5094ae704e367aebf7 Author: kpishere Date: Wed Mar 24 10:14:11 2021 -0400 Misc build fixes (#21413) Co-authored-by: Scott Lahteine commit 375404290d5c78d1781e6158b868257d50512b3c Author: Ramiro Polla Date: Wed Mar 24 13:45:43 2021 +0100 Update Anet V1.0 display timing (#21425) commit 5c8f7c7ea319d02223d291ead8a03ed815eb02c5 Author: Ramiro Polla Date: Wed Mar 24 13:32:08 2021 +0100 Optimize MarlinSettings with template methods (#21426) commit c6774812fa15756c226c879dba4d77f1dff0429a Author: Scott Lahteine Date: Wed Mar 24 05:40:28 2021 -0500 More IntelliSense-friendly declarations commit af13128430ccc9f19901d522152dbdff3f2d9c27 Author: Scott Lahteine Date: Wed Mar 24 03:28:48 2021 -0500 Group UBL parameters, add comments commit 6b7a92035cf1a044daae727bb701018ae7fd22b1 Author: Scott Lahteine Date: Tue Mar 23 23:54:23 2021 -0500 Misc LCD cleanup commit 9e8b158ee13434683f4b9d62d661daae36c0be1e Author: Scott Lahteine Date: Tue Mar 23 23:58:53 2021 -0500 Tweak mf helper scripts commit 3226e12037a21ad62d4220b83ee57aa04e5785d7 Author: Scott Lahteine Date: Wed Mar 24 04:11:43 2021 -0500 Add typedef celsius_t (#21374) commit 2a011779e93f09974153b176cff394eed8cd554a Author: Scott Lahteine Date: Tue Mar 23 10:55:30 2021 -0500 Max temp/target followup commit faa1118ca7ff53e548e82c72e93600ed17ea3bca Author: Scott Lahteine Date: Fri Mar 19 16:41:47 2021 -0500 MKS / E3V2 LCD code cleanup commit 3341e4f88ca8a461aa51fe1663a07bdd91127c91 Author: Scott Lahteine Date: Fri Mar 19 16:39:05 2021 -0500 Add typedef extra_fan_t commit 976403d10de60e95c5892ebe6a9292b2ed292134 Author: Scott Lahteine Date: Fri Mar 19 16:34:10 2021 -0500 Improve max temp / target commit ff729744e5f56ff86d7e6c92dd2df16995a3be00 Author: borland1 Date: Tue Mar 23 06:21:11 2021 -0700 Main / Config Custom Submenus (#18177) Co-authored-by: Scott Lahteine commit d924adef75670ecd5a21d4553d212ffbb362a46d Author: Scott Lahteine Date: Tue Mar 23 05:54:41 2021 -0500 Followup to UBL Hilbert commit dca4c2904e39bdd14f9c7c4745f50f8029a1bb07 Author: ellensp Date: Tue Mar 23 19:47:07 2021 +1300 Check NOZZLE_CLEAN_FEATURE settings (#21332) Co-authored-by: Scott Lahteine commit e806c3376a2a2cbd863d6ae67fef45f32734762a Author: Marcio T Date: Tue Mar 23 00:45:51 2021 -0600 UBL - Hilbert space-filling curve probing sequence (#21387) commit c9674cd80947b7c424da28232d6172b600d98112 Author: Scott Lahteine Date: Tue Mar 23 01:03:32 2021 -0500 Minor process_subcommands_now followup commit 259d8f19b327c94921caa8584bf6c50cab696a74 Author: mihtjel Date: Tue Mar 23 07:00:22 2021 +0100 Fix macros that call macros crashing (#21383) When macros call macros, the null termination should remain in place until the macro is completed, and only then put back. Otherwise, the macro handler interprets this as setting the macro called to a new value. commit 9a1c4f91fe920afb05fef4c82ddb23476c05e3de Author: Sola <42537573+solawc@users.noreply.github.com> Date: Tue Mar 23 13:58:52 2021 +0800 Fix MKS H43 sensorless homing (#21388) commit 4bdc303f6c634bc446d6d2d44dad6c8e00dc4bed Author: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> Date: Tue Mar 23 06:57:50 2021 +0100 Update Hungarian language (#21407) commit 5b0dc4d325b99ff8e030bdde7af2ceeefa822f04 Author: Marcio T Date: Mon Mar 22 23:51:03 2021 -0600 Mesh Editor for FTDI Eve Touch UI (#21381) commit 39c30d6fd619cb8b57e7f4a750b3da1862fc8f6d Author: Scott Lahteine Date: Wed Mar 17 23:55:55 2021 -0500 HAL eeprom cleanup commit e50af65a1b82e804ca66faf6da7bd1e89d5b10f5 Author: Scott Lahteine Date: Thu Mar 18 15:59:48 2021 -0500 Fix bool++ warning commit c4d757c6f7c502a04305448eef66dca15919f5f0 Author: ellensp Date: Fri Mar 19 18:05:30 2021 +1300 Fix preflight motherboard target check (#21372) Co-authored-by: Scott Lahteine commit ac4f3c0c7ee665d2e374edbc89f93de2aee82697 Author: Skorpi08 Date: Fri Mar 19 02:51:19 2021 +0100 Nextion TFT touch screen (#21324) Co-authored-by: Scott Lahteine commit 107cc1f6a1cef0e32d9f7e739cb0b91027221b5b Author: Scott Lahteine Date: Thu Mar 18 00:11:06 2021 -0500 Followup to planner cleanup commit f49dc906555b127c7832273fbfe1526f36cde329 Author: Scott Lahteine Date: Wed Mar 17 21:26:25 2021 -0500 Move web-ui out of Marlin root folder commit 7cfaa50148270aa9d5cf2580944601ea2aee021b Author: Scott Lahteine Date: Wed Mar 17 21:36:10 2021 -0500 Revert "Fix small wired EEPROM (#21337)" Reverting commit cc3e878f90 pending further investigation. commit dec9b9ad2feb8eb9c351eb73a52ffbc14e651953 Author: Scott Lahteine Date: Wed Mar 17 02:48:21 2021 -0500 Minor E3 V2 dwin cleanup commit 7973b954b4689dc6c89b842a29f8bd6c3fb3be1b Author: Scott Lahteine Date: Tue Mar 16 15:12:28 2021 -0500 E1+ Autotemp and Planner comments commit e0711d87a08b6b11349ee7cf2ff101a8f9bc25bb Author: Scott Lahteine Date: Wed Mar 17 19:23:36 2021 -0500 Un-pause fans on STOP commit 3bbcfb0185dcb6dce7d342932f0a84b25cd80392 Author: Scott Lahteine Date: Wed Mar 17 19:24:07 2021 -0500 Update setup() description commit 86a8e8970a78a307351c6a2a9d47a9862e73a357 Author: Scott Lahteine Date: Wed Mar 17 02:39:26 2021 -0500 mftest: usage with error commit f5d612b21394a19398eb15db1b5a7d48085041ab Author: Scott Lahteine Date: Tue Mar 16 17:33:10 2021 -0500 Detect extra ENVS in preflight checks (#21361) commit a2d2e19f84042e4941cc21f37c9b8d9ba71d6049 Author: K.3D <40525619+KA8888@users.noreply.github.com> Date: Mon Mar 15 17:02:40 2021 +0100 KRATOS32 / K.32 board and LCD controllers (#21334) commit 35c32602f499532789921558aff0ee5a4abbbeb6 Author: X-Ryl669 Date: Mon Mar 15 02:23:41 2021 +0100 Teensy USB / serial followup (#21316) commit 0d04dcd9aedc0e8648c62b5cbffc52deb3828028 Author: Victor Oliveira Date: Sun Mar 14 14:14:09 2021 -0300 Script to generate Marlin TFT Images (#21340) commit f6f5ed166fd625475c3262a497be66cf58643fbf Author: X-Ryl669 Date: Sun Mar 14 18:11:11 2021 +0100 Fix build with Meatpack only on 2nd port (#21336) Co-authored-by: Scott Lahteine commit b644aca98c637ab12ffa8ec2dc5f63d58ca7f251 Author: Scott Lahteine Date: Sun Mar 14 11:43:20 2021 -0500 Fix small wired EEPROM (#21337) Co-Authored-By: jafal99 <26922965+jafal99@users.noreply.github.com> commit e5ab4a7283b485ee465fcecf67679a86fc66c576 Author: XDA-Bam <1209896+XDA-Bam@users.noreply.github.com> Date: Sun Mar 14 17:42:25 2021 +0100 Update display timing for SKR Pro (#21346) commit f36eb4646b23e65e36f0b476bed0177d6230d06d Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat Mar 13 08:37:49 2021 -0500 Custom menu items confirm option (#21338) Co-authored-by: Scott Lahteine commit 0c3eb04a37ce2cae46b0b2ae2ba058f89166d27d Author: Victor Oliveira Date: Sat Mar 13 08:01:02 2021 -0300 No extra build folder for st/jlink upload (#21341) commit 09233129a833a3a0a4a56b1d182c3cebe4ebbe44 Author: Scott Lahteine Date: Fri Mar 12 07:34:44 2021 -0600 Tweak opt_set, opt_enable commit 2480c82d76d58bf45b16e288501ba16146249fe5 Author: Scott Lahteine Date: Fri Mar 12 09:25:41 2021 -0600 Add M207/8/9 reporting (#21335) commit 7fb04b3656207a3e02bb0e9635d1f191d38f1d0f Author: Scott Lahteine Date: Sat Mar 6 01:09:13 2021 -0600 MarlinSerial cleanup commit 166d4a26f34d45a211e947d279e9f23c6d2f3c96 Author: Scott Lahteine Date: Fri Mar 12 08:34:22 2021 -0600 Pause SD queue early on M25 (#21317) commit b6169a957d8b003553fb7ea889bbfaffd2f7813f Author: Scott Lahteine Date: Fri Mar 12 07:14:33 2021 -0600 Fix MarlinSerial typo commit ead6d99069bdc533468ebd8a75043ee3e02f8ce3 Author: Scott Lahteine Date: Fri Mar 12 06:54:42 2021 -0600 Clean up, optimize ExtUI/TFT code (#21333) commit 59a9be5f5a3a4818943e12100fe352faffa31ac7 Author: X-Ryl669 Date: Fri Mar 12 12:25:30 2021 +0100 Undef unused 2nd serial option(s) (#21331) Co-authored-by: Scott Lahteine commit d81838e9fa5669984c4364a90680da1b49649d11 Author: Evgeny Z Date: Fri Mar 12 05:12:24 2021 +0300 Lerdge-X I²C EEPROM pins, size (#21322) commit 894688c547c5a7f880bca628dfe235967134e230 Author: ellensp Date: Thu Mar 11 11:02:35 2021 +1300 Fix password menu stickiness before first auth (#21295) commit 059e6514cac69cb7a33b6fe71fc8f0130cff5e9d Author: Evgeny Z Date: Thu Mar 11 00:02:29 2021 +0300 Lerdge-K TMC 2208/9 UART pins (#21299) commit a729999f559c65f9e56941c48cc141df846b493a Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Mar 10 12:57:54 2021 -0800 Fix LERDGE 'extends' env references (#21305) Co-authored-by: Scott Lahteine commit f332cca4a78cf045f3795e28e586597f5039782d Author: Cal1sto <47449942+Cal1sto@users.noreply.github.com> Date: Wed Mar 10 21:37:22 2021 +0100 Fix TouchMI stow in G34 (#21291) commit 242ef2b2b4f02740e95cb518c0d084e1c2bcce7e Author: X-Ryl669 Date: Wed Mar 10 21:22:20 2021 +0100 Fix MeatPack with per-serial-port instances (#21306) commit 5c0f90994908746ba92f67f6e2aa67f261c04028 Author: Scott Lahteine Date: Wed Mar 10 12:35:26 2021 -0600 Tricked-out declaration commit 633491833cf3df2ea2ecd9545bb33172e93ca12e Author: Scott Lahteine Date: Wed Mar 10 12:05:27 2021 -0600 Update MEATPACK test commit b713ca26387348acb70fdd0c211a3b7bf6cd9886 Author: Scott Lahteine Date: Wed Mar 10 12:05:05 2021 -0600 Number serial from 1 to match settings commit 46246c8db6b42d48aa1452866e2f326abb21bed7 Author: Scott Lahteine Date: Wed Mar 10 11:35:19 2021 -0600 Clean up spaces and words commit e1cca6d97b19b624395ea25f646c219572ceda6a Author: Scott Lahteine Date: Wed Mar 10 11:33:29 2021 -0600 Fix serial index types commit 01f3dc6d41bbcc11441f8bfc6e4d33dddcfdf99a Author: Scott Lahteine Date: Wed Mar 10 11:31:32 2021 -0600 Add binary file transfer test commit 0e1a1959deb6f892e547c7ce5ab5e044ea1db38b Author: Victor Mateus Oliveira Date: Tue Mar 9 20:21:49 2021 -0300 fix meat pack internal buffer for multi serial commit 6c704021617d84665930df136e5d70afd855f9d5 Author: Chris Date: Wed Mar 10 00:06:00 2021 +0100 Fix LPC + TMC boot loop (#21298) commit 6652c7c4358093ddc228fe23c75d8aea7be9f374 Author: X-Ryl669 Date: Tue Mar 9 10:20:37 2021 +0100 Distinguish serial index from mask (#21287) commit 7f3208ba794fba3edafc111330dbf37d2536a84c Author: Victor Oliveira Date: Mon Mar 8 22:59:35 2021 -0300 Host Keepalive followup (#21290) Followup to #21283 Co-authored-by: Scott Lahteine commit b680ddc66cc160898bb11ce1caa0bf9fbd32921d Author: ellensp Date: Mon Mar 8 23:14:18 2021 +1300 CUSTOM_USER_BUTTONS followup (#21284) Followup to #18389 commit 7a5a6ca53fbd1b46eca32e1e4050228db887d14b Author: Victor Oliveira Date: Mon Mar 8 04:11:37 2021 -0300 Fix Host Keepalive serial target (#21283) Co-authored-by: Scott Lahteine commit b80ec493ede395bfda160abebbb559b8f149c813 Author: ellensp Date: Mon Mar 8 17:06:33 2021 +1300 M303 followup (#21282) Followup to f2ed18d150 commit d4a601457840af4ad4eb5c97ab95c73e05461571 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat Mar 6 20:55:37 2021 -0800 Extend Heater Overshoot Options (#21273) Co-authored-by: Scott Lahteine commit 6ee61c8380837340a8ab83edf1aa48f7f6d0a1b4 Author: ellensp Date: Sun Mar 7 16:43:43 2021 +1300 Update obsolete debug define (#21276) commit db4d9b7fcfadcb5d9a797e8421530e1c33e75e57 Author: Mike La Spina Date: Sat Mar 6 14:13:28 2021 -0600 Cooler (for Laser) - M143, M193 (#21255) commit 95136abc47919a272541f3e5402093ee09223ba9 Author: Scott Lahteine Date: Sat Mar 6 10:16:18 2021 -0600 Fix DGUS include paths Followup to #20609 commit 5b586ea4d8dbd7f44589ec580fd55a1ef6edffe8 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Sat Mar 6 23:04:05 2021 +0800 MKS H43 fixup (#21267) Co-authored-by: makerbase <4164049@qq.com> Co-authored-by: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Co-authored-by: Scott Lahteine commit 05a124930ea97bf7e0f5d52d2b1707882ac76fab Author: ellensp Date: Sun Mar 7 02:19:15 2021 +1300 Fix Creality DWIN - Broken (bool)Serial ? (#21272) Co-authored-by: ellensp commit 423c4e4636b271dc3ea1ec66dfcb2fc8025bc451 Author: Scott Lahteine Date: Sat Mar 6 06:57:51 2021 -0600 Pins/tests followup commit 6c6beeee70393a0e82125b80cc89ba578dc5fe2c Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat Mar 6 01:50:26 2021 -0800 Pins/tests followup (#21268) Missing commit from #21254 Co-authored-by: Scott Lahteine commit 74457dc989bd3adcf5ff707b83aa4e9caead86e9 Author: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> Date: Sat Mar 6 09:00:10 2021 +0100 Update Hungarian language (#21266) commit 34b76c6f8047cff871d08132b104f1e46929bc05 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sat Mar 6 08:56:43 2021 +0100 Link to bugfix tree (#21263) commit 35355d1f1b88d9e4304916730839e5dc9347c902 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Mar 5 23:53:44 2021 -0800 Tweak/Consolidate followup (#21261) commit 7c37a828219d7ba809f889beaf4713a472420268 Author: Scott Lahteine Date: Fri Mar 5 04:30:52 2021 -0600 Tweak tests, consolidate pins target validation (#21254) commit 5a01cdb81c988209a661b8594cba10b2e14e5889 Author: Victor Oliveira Date: Thu Mar 4 20:39:08 2021 -0300 Fix multi-serial CRC error crash (#21249) commit 6cfd190107e5a4aa3ad07dc1049b0bae1a101ce5 Author: Tanguy Pruvot Date: Fri Mar 5 00:34:38 2021 +0100 Followup to MP_SCARA/TPARA patches (#21248) commit 10ec13b2c32f6b6920b244a5e972d4fcd2348fa4 Author: Scott Lahteine Date: Thu Mar 4 16:36:44 2021 -0600 Remove extra G42 commit 8a3d0b23cf410c5d8ff6e8690af7b0b48b71a1e0 Author: Oleksii Zelivianskyi <50808386+alexeyzel@users.noreply.github.com> Date: Thu Mar 4 11:33:02 2021 +0200 Correct fan pins for MKS Robin Nano v3 (#21238) commit c90927cf54203ee4ffcd1623fbbd6432d3feb854 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Mar 4 01:32:02 2021 -0800 SMUFF => SMuFF (#21243) commit f187a5304b4b610810c9ee7704769b1404d610b5 Author: Scott Lahteine Date: Thu Mar 4 03:15:32 2021 -0600 Implement G42, after all commit d5b09fdbf5d349c07612f6bfe8006f2fd2da1f06 Author: Scott Lahteine Date: Thu Mar 4 03:21:15 2021 -0600 MK2_MULTIPLEXER dependency commit c8b73b00be179911d304f6146e58dcfabebf318d Author: Scott Lahteine Date: Wed Mar 3 20:48:58 2021 -0600 Update some py scripts commit ee74cee5d468965b4ffaad8a181a140672ce16c9 Author: Scott Lahteine Date: Wed Mar 3 20:48:05 2021 -0600 Parking Extruder solenoid fix/cleanup commit 99eedf77b5ffd898d903f3cfed47c47043be330a Author: Scott Lahteine Date: Wed Mar 3 20:41:58 2021 -0600 Fix teensy35 tests commit d61e7dd68559d93de56e74b5cc5241193d4194a7 Author: Scott Lahteine Date: Wed Mar 3 17:57:24 2021 -0600 TPARA followup commit 864d27d46079bb002a5ead776e056b48cf843f63 Author: Axel Date: Wed Mar 3 20:46:32 2021 -0300 TPARA - 3DOF robot arm IK (#21005) Co-authored-by: Scott Lahteine commit 3c86eb18a5965cb491774b1fb5e7d745d9c48946 Author: Scott Lahteine Date: Wed Mar 3 00:11:50 2021 -0600 misc. cleanup commit c4fe07275197f758e05e85170cb2ca140e4e7dc5 Author: Scott Lahteine Date: Wed Mar 3 00:15:56 2021 -0600 Improve opt_set (etc.) used for tests commit 0e61b4a98240848c00e99b2c7007cfbe00bf65ce Author: Sola <42537573+solawc@users.noreply.github.com> Date: Wed Mar 3 10:58:42 2021 +0800 Fix MKS H43 compile (#21240) commit 92da7659f496afb036de67733d5ff50f0b77b23e Author: Scott Lahteine Date: Mon Mar 1 19:39:43 2021 -0600 Trust XY after Quiet Probing short sleep (#21237) commit be8b5472615daad6a53694eb215e46c7a9377303 Author: Scott Lahteine Date: Mon Mar 1 07:10:00 2021 -0600 Fix some config builds commit ef57a3e5851e1120b1c98a8f92d98ee904eaf1fd Author: Scott Lahteine Date: Mon Mar 1 05:39:31 2021 -0600 build_all_examples -c -s, silent mftest commit b71f1e1edd44af5f199088a056c11ae48fcd02bd Author: Scott Lahteine Date: Mon Mar 1 05:48:39 2021 -0600 Better mftest order commit f3db2551a6c1b32ba4a694f2ff81e23ba298165c Author: MoellerDi Date: Mon Mar 1 15:03:41 2021 +0100 G-code Digital Buttons (#18389) Co-Authored-By: android444 <24375898+android444@users.noreply.github.com> Co-authored-by: Scott Lahteine commit 7eace53eb703bad12c8a82e7602e7ed782b46340 Author: Scott Lahteine Date: Mon Mar 1 06:15:06 2021 -0600 Fewer warnings commit c6e82160e41196d6ca679a5dd89b777423f15548 Author: Scott Lahteine Date: Mon Mar 1 06:03:36 2021 -0600 POWER_LOSS_ZHOME_POS followup commit c8cd824be2984397118d0b3baca6d7cde157711b Author: Nick Date: Mon Mar 1 10:23:10 2021 +0000 Safe Z homing for Power Loss Recovery (#16909) commit 854ab04ee448f275ccd1b3d3a477210e4b0de91e Author: Ilya Date: Sun Feb 28 23:33:07 2021 -0800 Default microsteps to axis first stepper (#21230) commit 4e6ed4319845e0cea4e1a3af2baa66272e95b563 Author: Marcio T Date: Sun Feb 28 19:52:59 2021 -0700 Minor FTDI EVE Touch UI fixes (#21232) commit 2d4a1cd428896e6ff64097d372dc6bbf49d622a6 Author: Stephan Date: Mon Mar 1 03:16:22 2021 +0100 Filament Runout handling for Mixing Extruder (#20327) Co-authored-by: Scott Lahteine commit fd5f1f1f5d3a25f73105c35eb3eaaac73d868e7e Author: Scott Lahteine Date: Sun Feb 28 19:50:17 2021 -0600 Filament sensor cleanup commit fbb30a25701e800deee1ca8296225712bca615af Author: Scott Lahteine Date: Sun Feb 28 19:43:46 2021 -0600 Serial macros cleanup commit 043bd34e2bcb5e2dbac750d6dc07e6cff3889ee6 Author: Roman Moravčík Date: Sun Feb 28 23:12:27 2021 +0100 Update Slovak language (#21224) commit e4a67c849643aff28ad14dc61a5e8bf69ca42701 Author: Fabio Viappiani Date: Sun Feb 28 23:09:15 2021 +0100 Fix TERN typo (#21229) commit 0a097b7a1e709bdae6d56203adb70edb26862c39 Author: Scott Lahteine Date: Sat Feb 27 23:51:56 2021 -0600 Tweaks to build scripts commit 4343de3ee2cfae6d885746716ca4f200794c474f Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun Feb 28 05:41:16 2021 +0100 [SAMD51] Respect serial buffer size (#21194) commit 3f34916c57988429c503b7b17e59c147968ca7e6 Author: Scott Lahteine Date: Sat Feb 27 22:38:57 2021 -0600 Tweaks to build scripts commit 0e6e7b060853f14985092de6a1173718639fb262 Author: Scott Lahteine Date: Sat Feb 27 16:26:49 2021 -0600 whitespace commit 334bafc9c1507cfd7120eebdf6fd243f89242606 Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Sun Feb 28 01:32:34 2021 -0300 ST STM32 platform version 12 (#21219) commit 8eedec04a1f2db6fe4477561904538b03a2b87d7 Author: RudolphRiedel <31180093+RudolphRiedel@users.noreply.github.com> Date: Sun Feb 28 02:39:32 2021 +0100 Two additional EVE displays (#18839) commit 5aa9cc82a8a016fc76f2d9980674705ca14b69b9 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Sun Feb 28 07:35:32 2021 +0800 MKS H43 controller (#20609) commit 6183cd07312abd419208d7730df6683ae415563b Author: LinFor Date: Sun Feb 28 01:06:48 2021 +0300 RGB Caselight (#20341) commit 971fb8729a5351b692c56b0c6245bdf2567679d7 Author: jbuck2005 <59450931+jbuck2005@users.noreply.github.com> Date: Sat Feb 27 16:54:43 2021 -0500 SPEED => FEEDRATE (#21217) commit 124fb331cc93985d84775bb3eca09aa4cfd8e9d0 Author: Evgeny Z Date: Sat Feb 27 22:50:44 2021 +0300 Apply AUTO_POWER_CONTROL later in setup() (#21193) Co-authored-by: Scott Lahteine commit d20375c185feddcb5635c86b3ec8a8fb683af9e3 Author: Kachidoki Date: Sat Feb 27 20:45:12 2021 +0100 Duplicate fan speed in M106/7 IDEX Duplication Mode (#21208) commit fff95b71730594e712bf8665cac3a28a883c81ce Author: Arjan Mels <43108771+arjanmels@users.noreply.github.com> Date: Sat Feb 27 20:32:57 2021 +0100 Fix M876 when called from EP (#21210) commit 130dfbe11c77ee643d7c6636aaf157f0fa17559b Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat Feb 27 20:24:36 2021 +0100 [SAMD51] Postmortem Debugging not implemented (#21211) commit 68e50a725a1464577a1b387822462fe67075d40a Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat Feb 27 20:23:00 2021 +0100 [SMUFF] Use EXTRUDERS for extended commands (#21212) commit 3f9fe2dac47abcf794c48f153f73fd25d144b935 Author: X-Ryl669 Date: Sat Feb 27 20:16:33 2021 +0100 Fix G-code Queue merge (#21213) commit e1283b8a86c20c2f8f67e6f6428c1f53ae71048f Author: X-Ryl669 Date: Sat Feb 27 20:13:04 2021 +0100 G-code Queue followup (#21214) commit 653608e9314ad668f6246d4b9ab7e834b6adb1c7 Author: Alexander D. Kanevskiy Date: Sat Feb 27 02:03:11 2021 +0200 Fix preflight complex extend handling (#21191) commit 80aac1b711d70cd63fb348983c6747201c3dd959 Author: X-Ryl669 Date: Sat Feb 27 00:59:28 2021 +0100 Make F_CPU a compile-time constant (#21051) commit b428a53b7ae680e103b084875e1043c4b832a2c4 Author: Victor Oliveira Date: Fri Feb 26 20:36:22 2021 -0300 Fix GTR / SKR PRO + USB Flash Drive build (#21197) commit 94d16372218af606f5718d5690af2e6c72fc5077 Author: Victor Oliveira Date: Fri Feb 26 20:33:34 2021 -0300 More LERDGE envs followup (#21205) commit 3a5ac12321a2b92c8638d22b9cc141a66a1b0fa7 Author: Fabio Viappiani Date: Sat Feb 27 00:10:50 2021 +0100 Fix M355 with NEOPIXEL (#21200) commit c9d757fc0e81841b34c428baa7950af4225b9c8d Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Fri Feb 26 20:01:11 2021 -0300 Init (stow) BLTouch before X/Y homing (#21192) commit 532dbb80641ab1c3e11226dc7f3e9e29a0c3daee Author: X-Ryl669 Date: Fri Feb 26 23:54:46 2021 +0100 Fix and improve G-code queue (#21122) Co-authored-by: Scott Lahteine commit adf26fd69ecea53252cfe8d2e4600431c4cf0eb9 Author: Scott Lahteine Date: Thu Feb 25 10:24:58 2021 -0600 Chamber followup commit 13dee4d059a27dc2208939d5c657024094decd23 Author: Vi B-P Date: Thu Feb 25 11:23:17 2021 -0500 Preheat Menu shortcut option (#20350) commit fc09581aa39279ebac8c7467b175436b592c2712 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Thu Feb 25 17:09:00 2021 +0100 Combine Z_AFTER_DEACTIVATE with UNKNOWN_Z_NO_RAISE (#20444) Co-authored-by: Scott Lahteine commit 52c539ecedd02922d2a26d8a7b76b68fe8ccdc0f Author: Victor Oliveira Date: Thu Feb 25 12:23:30 2021 -0300 Zero Endstops followup (#21188) commit 5fdab77cc22fdf4610f6e0f4ade64565522283ab Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Thu Feb 25 16:21:17 2021 +0100 Fix LEVEL_CORNERS_USE_PROBE with BLTOUCH_HS_MODE (#21161) commit 00ceeeae7a083de25c24c27d1e03bb18c25f345d Author: Scott Lahteine Date: Thu Feb 25 09:14:24 2021 -0600 Eryone Thinker V2 (#21190) Co-Authored-By: Bryan Joshua Pedini commit 7240c2172bec3e800ce004c886f8535d41afdbc3 Author: Katelyn Schiesser Date: Thu Feb 25 06:28:27 2021 -0800 PROBING_HEATERS_OFF sub-option WAIT_FOR_HOTEND (#20835) commit f3d15b995c81739ebfb4b55eab91d3af9292aa44 Author: ellensp Date: Fri Feb 26 03:15:55 2021 +1300 Preflight checks for PlatformIO builds (#21068) Co-authored-by: Alexander D. Kanevskiy commit b71af6a50f179fbe6a0cd1d84896f9740bad2720 Author: Katelyn Schiesser Date: Thu Feb 25 06:14:24 2021 -0800 Use 'H' value for UBL G29 z-clearance (#21114) commit 362776c38de7ba8740d221c18f06332d6ae4e85d Author: Scott Lahteine Date: Thu Feb 25 05:15:49 2021 -0600 Tweak case light comment commit e6bf89e82b93f0db21d714a526bc183a9a7d4cd3 Author: deirdreobyrne Date: Thu Feb 25 10:49:34 2021 +0000 Allow Zero Endstops (e.g., for CNC) (#21120) Co-authored-by: Scott Lahteine commit 19c38f1a8a8b637f43cd86490f2cb626c5d6b1bf Author: Tanguy Pruvot Date: Thu Feb 25 11:35:18 2021 +0100 Add BOARD_PREINIT (for Longer3D open drain pins) (#21159) commit ac5f2a93005816c8c40fc376286c88a4d0756ac0 Author: Scott Lahteine Date: Thu Feb 25 01:56:11 2021 -0600 Update BLTOUCH_HS_MODE comment commit 088b5cfec240f04f3073dd58ac9394c568d06dfe Author: Nick Date: Thu Feb 25 07:38:01 2021 +0000 Fix Anycubic Chiron TFT SD menu (#21183) commit b33afb790e460333033b9da65a0f765f8e4125d6 Author: X-Ryl669 Date: Thu Feb 25 08:26:56 2021 +0100 Let libmaple accept RX/TX_BUFFER_SIZE (#21177) commit 73332f4df1c88944e5b9ebc9a0c9e2abcb617035 Author: X-Ryl669 Date: Thu Feb 25 08:23:29 2021 +0100 Combined LPC / Serial fixes (#21178) Co-authored-by: Scott Lahteine commit 7cb286bb6e28fec1e202a6e0b4b77204e58802c4 Author: Scott Lahteine Date: Thu Feb 25 00:56:15 2021 -0600 Expose more env builds in PlatformIO extension commit e9d62822bd2b3e8625911e7d982c1e7ee1d3aff7 Author: Victor Oliveira Date: Wed Feb 24 21:36:55 2021 -0300 Fix MKS Robin Nano V3 I2C pins (#21174) commit 8d05a823e96fe43209243591739eca106296fadb Author: Ken Sanislo Date: Wed Feb 24 16:26:51 2021 -0800 Chamber Heater PID (#21156) Co-authored-by: Scott Lahteine commit c051a2ecaeb37df8f5dd76e3feb71bdb3f7f66fc Author: Nick Date: Wed Feb 24 02:13:24 2021 +0000 Fix Chiron TFT serial comms (#21152) commit dc0247c57e7bf3edf6cefed8620158a97151b84c Author: Scott Lahteine Date: Tue Feb 23 16:09:54 2021 -0600 Outdent UBL code commit 8fca59f63b833570706a948e1dd33fa687aa9255 Author: Scott Lahteine Date: Tue Feb 23 16:08:00 2021 -0600 G92, subcodes flag cleanup commit 1ab1c62f032dbe1976839b8af5d40a06ca9af5bc Author: Marcio T Date: Mon Feb 22 21:38:54 2021 -0700 FTDI Touch UI followup (#21167) commit a19c79d71400a9b9eb22e34372476fd3ce27362e Author: Marcio T Date: Sun Feb 21 03:05:59 2021 -0700 Enhance and fix FTDI Touch UI (#21148) commit dc11874abe4f683d3a436693c0ec5900c2c2afbc Author: X-Ryl669 Date: Sun Feb 21 03:22:20 2021 +0100 Postmortem Debugging to serial port (#20492) commit 61753bb5e3d9035182a4a0a214c3f0ebbd180023 Author: kpishere Date: Sat Feb 20 21:20:55 2021 -0500 Fix SPI on SMART RAMPS with mega2560 (#21128) commit 3f1a8c2a1c835c7a5a38f9b78c263d7aa9fb8f2e Author: ellensp Date: Sun Feb 21 15:14:47 2021 +1300 Fix G29 missing defines (#21145) Co-authored-by: ellensp commit bdb67b4397f648c012a87a0e741c69a19082c6e1 Author: espr14 Date: Thu Feb 18 06:22:29 2021 +0100 Fix cleaning_buffer_counter check (#21115) commit c4fcf8bfd70fea25d28fb8c7025b0f9c2496aaa5 Author: Scott Lahteine Date: Wed Feb 17 17:04:51 2021 -0600 Fixes for MP_SCARA (#21113) Co-Authored-By: svsergo <52426708+svsergo@users.noreply.github.com> commit 7e8b02145c093a9a3d0f304893706caeff0f6c34 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Tue Feb 16 22:23:54 2021 -0500 YHCB2004 followup (#21111) commit a09d7a59b4d70f3171202bacff48db48553e39ff Author: Scott Lahteine Date: Tue Feb 16 21:13:53 2021 -0600 Fix IDEX broken endstop test (#21110) commit 27721c564fab391b2f67b2fb34a6c5112de6fad4 Author: jbuck2005 <59450931+jbuck2005@users.noreply.github.com> Date: Tue Feb 16 21:30:54 2021 -0500 Note FAN2_PIN silkscreen label (#21087) commit 2e040d03dffac181def5a6962ec5826e6e0b6aee Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Tue Feb 16 21:29:55 2021 -0500 GT2560 v4.1B, YHCB2004 SPI character LCD (#21091) Co-authored-by: Scott Lahteine commit 27248161525a4e2c9256e99e5b533c09349fe4a4 Author: ellensp Date: Wed Feb 17 15:28:03 2021 +1300 Swap Trigorilla Pro Z_MIN / MAX endstop pins (#21095) commit 03396922abecd5c6cfee0bd0fe32a72c6f230d2e Author: X-Ryl669 Date: Wed Feb 17 01:41:00 2021 +0100 Fix/improve configs build script (#21086) commit b4a3013c281e6b35b2a4be8904a0b1a288d71fd4 Author: Allen Bauer Date: Tue Feb 16 15:35:31 2021 -0800 BTT002 pins for FYSETC mini12864 (#21096) commit 903c2915edce0e0f48bd0870acccf468598978ec Author: ellensp Date: Wed Feb 17 11:59:38 2021 +1300 Fix "BUTTON_CLICK redefined" warning (#21098) commit 3ca2195ed098b7d34002a5eb4e115b77d0a1fc23 Author: jbuck2005 <59450931+jbuck2005@users.noreply.github.com> Date: Mon Feb 15 07:03:44 2021 -0500 Update platform ststm32 to 11.0 (#20928) commit c759b2d2a655886474092b48254ffb786610b6a3 Author: X-Ryl669 Date: Mon Feb 15 12:48:11 2021 +0100 Script to download & build Configurations (#20992) Co-authored-by: Scott Lahteine commit adbe1522566508e84a8ecf2b219c224da784e42b Author: ellensp Date: Tue Feb 16 00:15:08 2021 +1300 EXP headers for RAMPS 1.x (#21054) Co-authored-by: Scott Lahteine commit 38838538175f362c7969d00a6d1e9fcb5d0d7395 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon Feb 15 11:45:38 2021 +0100 Fix MMU2 compile error (#21065) commit ead41ac4910c1ea85a00a2f2bd0c1de57111239a Author: ellensp Date: Mon Feb 15 23:42:33 2021 +1300 Fix remaining time divide-by-zero (#21080) commit 8a35c9a1a0c8b61e1e1c81188a3980d784d92e5c Author: Steven Haigh Date: Mon Feb 15 11:21:47 2021 +1100 E3V2 Status Area followup (#21072) commit 10da0f92a038c9f31d683919784a5f1b281137e6 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Feb 14 17:45:36 2021 -0500 E3V2 DWIN live movement (#21035) commit ca79af7a46a317f3ee7821889e8f12568f2ade13 Author: InsanityAutomation Date: Wed Feb 10 07:34:37 2021 -0500 Use configuration website, fix edit color commit ba4ce638583489e003f1d6cfb9129d7610af3ddc Author: Scott Lahteine Date: Sun Feb 14 16:25:28 2021 -0600 Fix a board comment commit f31a8f40864b9eccd2798c12741942f418cf130a Author: Scott Lahteine Date: Sat Feb 13 21:51:26 2021 -0600 anet_et4_openblt.py => openblt.py commit 9c47a9256d6bf8962eae778705276378e48452b5 Author: Scott Lahteine Date: Sat Feb 13 21:50:19 2021 -0600 Coolant Control sanity-checks commit 8ec86b810d96e1692efa8253714957d3f95ae313 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun Feb 14 04:04:22 2021 +0100 Don't create unused Serial Port instances (#21066) Co-authored-by: Scott Lahteine commit 69fcd9210fb5d6c64e756f71a92be5a9c4df27db Author: Scott Lahteine Date: Sat Feb 13 19:06:55 2021 -0600 Allow mftest -t to select by number commit b95e60dbbd416745a69d6392737e31f5a9a06b4d Author: Scott Lahteine Date: Sat Feb 13 19:05:28 2021 -0600 Update helpful links commit 8bca8e5ba03f34cdf8a3a98a0f0fb614013d749f Author: Scott Lahteine Date: Fri Feb 12 19:33:19 2021 -0600 Minor serial code cleanup commit 92b5f06bf9b8d0af7680b8489c201d0d422ff2d8 Author: X-Ryl669 Date: Fri Feb 12 15:33:27 2021 +0100 Use -g3 to include macros in debug symbols (#21052) commit 4316522146bd761e1ddc3a77972f615c2c37fd9c Author: X-Ryl669 Date: Fri Feb 12 14:49:07 2021 +0100 Improve Delay test report (#21047) commit c0d1fd14f8f634caff5ee80e27711f0d98db85f1 Author: kpishere Date: Fri Feb 12 06:00:41 2021 -0500 Fix AZSMZ_12864 on SMART RAMPS (#21056) commit f740226a821cc17d075b537b76cd9c5cb7668e35 Author: Jyers <76993396+Jyers@users.noreply.github.com> Date: Fri Feb 12 05:55:06 2021 -0500 Improved Ender 3 V2 display status area (#20983) Co-authored-by: Scott Lahteine commit 54f401506ba06ad9a8cc2cc26636865f05f29244 Author: kpishere Date: Fri Feb 12 05:42:31 2021 -0500 Support SMART RAMPS 1.4 with Mega2560 (#21059) commit 4d75c2e0f9e813effe59c2a36220037a0247a3f9 Author: Scott Lahteine Date: Fri Feb 12 03:52:21 2021 -0600 Ender 3 V2 DWIN cleanup (#21061) commit 7361fbfe28cb3d739a5a92a6796821811745fcab Author: Michael Telatynski <7t3chguy@googlemail.com> Date: Fri Feb 12 00:32:31 2021 +0000 Improve probe preheat behavior (#21033) Co-authored-by: InsanityAutomation Co-authored-by: Scott Lahteine commit 897291c470e6b39dd2ee3de152f4a6b330be1994 Author: Scott Lahteine Date: Wed Feb 10 02:57:27 2021 -0600 chmod and paths commit 6320928795fe2ff241fb5e087c39a84e070e02ed Author: Scott Lahteine Date: Mon Feb 8 21:31:26 2021 -0600 Reheat bed first commit 9acd2e176d77d2e69a93e008c0e508f37787fc8f Author: Scott Lahteine Date: Mon Feb 8 21:27:00 2021 -0600 Ender 3 V2 DWIN cleanup (#21026) commit c7efb2d964e8fd35170fe91de1b13789e62ddc3d Author: Scott Lahteine Date: Sun Feb 7 18:16:43 2021 -0600 Update M808 comment commit 41ab63897f2340318868789cd5187dd8762c3758 Author: JoAnn Manges Date: Mon Feb 8 20:51:57 2021 -0500 MAX Thermocouples rework (#20447) Co-authored-by: Scott Lahteine commit 77f48d2bad99c713fecf0ca54933eec960f5891f Author: X-Ryl669 Date: Mon Feb 8 07:37:24 2021 +0100 Serial refactor. Default 8-bit ECHO to int, not char (#20985) Co-authored-by: Scott Lahteine commit 897d29ea31111eee651cb3bbf2bd4ede1ed5311a Author: Arjan Mels <43108771+arjanmels@users.noreply.github.com> Date: Mon Feb 8 05:47:08 2021 +0100 Fix STM32F1 emergency parser (#21011) commit 13f0e4729c3e926c7858285d6e7fa1aa5d5858e6 Author: Alexander D. Kanevskiy Date: Mon Feb 8 06:44:49 2021 +0200 Allow SERVO0_PIN override on Creality Melzi (#21007) commit 86fd38ef4294fae2aed0a02fd66fd449f9a20d98 Author: Scott Lahteine Date: Sun Feb 7 20:43:18 2021 -0600 Fix animated boot screen commit 127a4ada939ceaff4d7dce58ff5317c7c8527c2c Author: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Date: Mon Feb 8 10:36:57 2021 +0800 Fix: Unsupported use of %f in printf (#21001) commit 1aae6395c6f3d243525c37fc721790619c1a2f54 Author: ellensp Date: Mon Feb 8 15:36:04 2021 +1300 Fix mini12864 v2.1 + PSU control + NeoPixel backlight (#21021) commit 1bf469411af2557e9c93bcd139dd918c5c938f75 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Sun Feb 7 20:45:14 2021 -0300 Fix LVGL "more" menu user items (#21004) Co-authored-by: Scott Lahteine commit 47b872f5d00678be751891e4a6baa4f9eb494811 Author: Scott Lahteine Date: Sun Feb 7 16:58:06 2021 -0600 Fix TEMP_0_TR_ENABLE, rename temp conditions (#21016) commit 80c1be919f46aa02205d4fad2d48d571566925e6 Author: Simon Jouet Date: Sun Feb 7 22:56:39 2021 +0000 Fix ESP32 I2S init placement (#21019) commit 243c8b4e1a9859a9801936ad943688fb1e106baa Author: Chris Pepper Date: Sun Feb 7 20:46:24 2021 +0000 Improve RPi host kernel panic mitigation It was still possible to cause a Kernel panic, this additional 500ms delay before disconnect appears to mitigate it completely. commit d7fbb1512a20d805459ea7733fb55984c9f65139 Author: Scott Lahteine Date: Mon Dec 14 00:24:01 2020 -0600 Melzi, comments cleanup commit 8416edd127dbb986e6852827849350fd2b331c5f Author: Marcio Teixeira Date: Wed Feb 3 10:03:48 2021 -0700 Refactor FTDI EVE Touch Screen (#20987) commit 77966135e81a3f6667de63a04527dc27d1f7fc9a Author: X-Ryl669 Date: Sat Feb 6 05:43:51 2021 +0100 Fix ARM delay function (#20901) commit 6054052248597c44c12402960d95844cb560e63f Author: Scott Lahteine Date: Fri Feb 5 18:47:53 2021 -0600 Use 'false' commit bbb49c43e1bee1f6f5869c7c7cb23bb55c4811fd Author: Chris Pepper Date: Fri Feb 5 22:43:36 2021 +0000 Mitigate RPi hosts kernel panic on M997 Work around M997 sometimes causing a kernel panic on the host when sent from a Raspbery Pi, the root cause is currently unknown. commit 9437c72ef648ad161ec56162401b5c4aa5f55d7f Author: ellensp Date: Sat Feb 6 02:07:10 2021 +1300 Fix MKS SGen-L DOGLCD_MOSI pin for FYSETC_MINI_12864 LCD (#20998) commit bb511195b8867616438d4c600c14e6678c0728a0 Author: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> Date: Fri Feb 5 13:28:30 2021 +0100 Update Hungarian language (#20996) commit 582458998f4dd91d05a99425aa665ed45816d069 Author: Scott Lahteine Date: Thu Feb 4 23:22:42 2021 -0600 Use serial shorthand commit bb5c643dfb34a9605a3d175876cc00d266cab609 Author: Scott Lahteine Date: Thu Feb 4 19:37:59 2021 -0600 Nybbles & Bits commit bf631046c095e989de27423e21a8377a95438fad Author: Scott Lahteine Date: Thu Feb 4 19:18:31 2021 -0600 Fix some serial char, echo Co-Authored-By: X-Ryl669 <3277165+X-Ryl669@users.noreply.github.com> commit 0d7c02d2c6f19024427da95f58866957331fd4ea Author: Victor Oliveira Date: Thu Feb 4 18:31:46 2021 -0300 Re-calibrate touch after EEPROM reset, if needed (#20934) commit 129e9151da069a528cc29a2f8f5ea1efb80de2f1 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Tue Feb 2 19:04:23 2021 -0300 Add "more" menu in LVGL interface (#20940) Co-authored-by: Scott Lahteine commit 4771379302bcf7a783f5f7898fecfda3a234c04a Author: Scott Lahteine Date: Tue Feb 2 16:00:02 2021 -0600 Evaluate ANY_SERIAL_IS in place commit 62a65d3fdcc01682fd134535d0c35faba93bf548 Author: ellensp Date: Wed Feb 3 10:00:41 2021 +1300 Note (MarlinUI) limit on PREHEAT settings (#20966) Co-authored-by: Scott Lahteine commit 032152c41d4a6671ba7ef661a02e5d7a7630e67f Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Feb 2 21:57:30 2021 +0100 Update a UBL comment (#20931) commit da80fd782c37ace9cdb2e79886104ef92017d641 Author: Victor Oliveira Date: Tue Feb 2 17:55:11 2021 -0300 STM32 Shared Media - USB Mass Storage Device (#20956) commit 460cdf4c094a7d5dcd98f3082e90450e3df6a4bc Author: Tanguy Pruvot Date: Tue Feb 2 21:33:07 2021 +0100 Multi-language pertains to Color UI (#20972) commit 0badef42d58d04eec4aad0a91033e45fcead5e73 Author: Victor Oliveira Date: Tue Feb 2 17:31:51 2021 -0300 Touch Calibration Screen auto-save option (#20971) commit 811b3d0f08e7552f644ba4e9d27f870ab221bd7a Author: Victor Oliveira Date: Tue Feb 2 17:31:01 2021 -0300 Include ui_common for MARLIN_LOGO_FULL_SIZE (#20963) commit 8de850fd07ecffdf31f07500aa959f8170ff5747 Author: ellensp Date: Wed Feb 3 09:30:19 2021 +1300 Fix host_response_handler compile (#20962) commit 1e5995335c8a7b64640c5173573beebbfd3cc029 Author: X-Ryl669 Date: Mon Feb 1 01:18:39 2021 +0100 LVGL UI G-code console (#20755) commit 4153b6a30b0fdf1c215cc488db384bfa24a43720 Author: Tanguy Pruvot Date: Mon Feb 1 01:15:14 2021 +0100 Refresh screen on M22 (detach) (#20958) commit c631fb79d555e6b3322e3ce6b344fad65aead473 Author: X-Ryl669 Date: Mon Feb 1 01:11:50 2021 +0100 Fix AutoReporter implementation (#20959) commit 9ae204df9cb95ace1b38bf9c97ac3b4f77f05083 Author: X-Ryl669 Date: Mon Feb 1 00:21:27 2021 +0100 Serial refactor followup (#20932) commit e7658ec5f5689a4d37cc60d89d73d03f7bdb3bd1 Author: zeleps <39417467+zeleps@users.noreply.github.com> Date: Mon Feb 1 00:50:12 2021 +0200 Init serial ports first (#20944) commit b3656c387fcaa5b428c3b6d86ad4b95252a24d1a Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sun Jan 31 23:47:16 2021 +0100 Remove extra G29 V newlines (#20955) commit 164199614c4614144d4b4abc455adc6393d9167a Author: ConstantijnCrijnen <43953114+ConstantijnCrijnen@users.noreply.github.com> Date: Sat Jan 30 07:07:35 2021 +0100 Language selection auto-save option (#20915) commit 219f92c4cadaa380767945ad07f401d168b4c4bb Author: ellensp Date: Sat Jan 30 18:44:32 2021 +1300 KILL, BEEPER pins for LCD_FOR_MELZI (#20924) commit 0e37370b0cbaf972f43743820974b10bfc691f0d Author: ellensp Date: Sat Jan 30 18:41:45 2021 +1300 Fix G28_STR (#20925) commit 845b99feb7043887e6c1a3d377416797a7775b6b Author: rafaljot Date: Fri Jan 29 06:22:18 2021 +0100 MPX_ARM_MINI board (Mingda MD-16) (#20711) commit 4b9f2f13b18fd53b3f500777233ce1c8788043c6 Author: Scott Lahteine Date: Thu Jan 28 20:40:20 2021 -0600 AutoReport class (Temperature, Cardreader) (#20913) commit b44de74b9171b8a753839348c28dcd731f83f244 Author: X-Ryl669 Date: Fri Jan 29 02:59:16 2021 +0100 Optimize serial output code for size (#20911) commit 59d16eb18916ba9514acc825c83fca42e1f6fc2e Author: George Fu Date: Fri Jan 29 09:52:49 2021 +0800 FYSETC Cheetah 2.0 (#20897) commit c7004d100cb13bd3fab0d6cf5b59b4a30853f067 Author: ellensp Date: Fri Jan 29 14:44:52 2021 +1300 Fix undefined G28_STR (#20912) commit 07a3ed1d7eea03a0a87fc2736b50c7be2385f0b1 Author: ellensp Date: Fri Jan 29 14:44:16 2021 +1300 Fix LED_CONTROL_MENU compile (#20914) commit cc545a73a17ea5e2f5681fce1e250e4e9b3a8bf5 Author: Scott Lahteine Date: Thu Jan 28 02:19:12 2021 -0600 Serial refactor followup commit efa1e563696aeed4d5668c231f0c1e7b3ffffcbc Author: X-Ryl669 Date: Thu Jan 28 09:02:06 2021 +0100 Refactor serial class with templates (#20783) commit 8da8e7d17b09ac8e47fea4e1b231d952a3d639f4 Author: ellensp Date: Thu Jan 28 20:47:12 2021 +1300 Meatpack::report_state on serial port init (#20903) Co-authored-by: Scott Lahteine commit b10b76e882b3f07a53e6da13b7735d1ef012bb17 Author: ellensp Date: Thu Jan 28 20:46:17 2021 +1300 MeatPack followup - unused command (#20893) commit be058430b4c354d14a6f79bd1ec2a0f19e3896ec Author: Scott Lahteine Date: Wed Jan 27 15:22:55 2021 -0600 Remove extra cast commit 7a559e47332b19da66e9b0247dfeca9be599466f Author: Scott Mudge <19617165+scottmudge@users.noreply.github.com> Date: Wed Jan 27 16:18:20 2021 -0500 MeatPack followup (#20896) commit 5fb8818ae520e8868feea977acb8dd3e0fab1335 Author: ellensp Date: Thu Jan 28 10:11:25 2021 +1300 ZONESTAR_LCD warning for RAMPS / ReARM (#20702) commit cdefc19129d838448139a2147bda35115d689fa4 Author: ConstantijnCrijnen <43953114+ConstantijnCrijnen@users.noreply.github.com> Date: Tue Jan 26 09:30:31 2021 +0100 Configure / disable PRINTCOUNTER save interval (#20856) Co-authored-by: Scott Lahteine commit 918894fd849cbd1c69711c5af0fdf359bd6ee7dd Author: Scott Lahteine Date: Tue Jan 26 02:15:05 2021 -0600 Custom G26 FR followup commit 1bc65be70f3c25cb13d898913be12b6784b057a6 Author: Scott Lahteine Date: Mon Jan 25 23:53:30 2021 -0600 Custom G26 FR followup commit b9d19291feaf162eb88ab33cad592f3c6d9e854f Author: ScrewThisBanana <71625822+ScrewThisBanana@users.noreply.github.com> Date: Tue Jan 26 04:14:26 2021 +0100 Adding custom move feedrate for G26 Travel moves, Original #20729 (#20879) * Adding custom move feedrate for G26 This commit adds an additional configuration parameter that can be used to specify the movement speed during the G26 validation pattern command during moves without extrusion. Closes MarlinFirmware/Marlin#20615 commit 2aaff47c9dc2927dc275e3e43c19b5ce4a82d07c Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon Jan 25 15:58:52 2021 +0100 Clean up MMU2 code (#20794) Co-authored-by: Scott Lahteine commit a582d1dc2fa7221193bc5b9b8da3e31f763f08dd Author: Rockman18 Date: Mon Jan 25 15:50:39 2021 +0100 Init KILL, SUICIDE, PSU earlier (#20810) commit 5acd8f36a447e5b4020eea8acfb52854bd790580 Author: Gabriele Besta <48332305+bg-master@users.noreply.github.com> Date: Mon Jan 25 15:39:24 2021 +0100 "Move … code" followup (#20869) Fix regression from #20832 commit efaff241455e879b2bb7f3e499f3cadca1bcbb70 Author: Scott Lahteine Date: Mon Jan 25 08:32:58 2021 -0600 Apply SEC_TO_MS and other fixes commit b059c9e5c07e49f7d97f1f1c72786a5e153a6c6a Author: Scott Lahteine Date: Mon Jan 25 04:56:54 2021 -0600 Reformat abortSDPrinting commit 82122fe9cd2be275662c6fa66d2605959659fa1b Author: Alexander D. Kanevskiy Date: Mon Jan 25 09:53:48 2021 +0200 Fix sign warning (#20872) commit 3beb6a9df3b18c431ca42f42252be06a3a585541 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Mon Jan 25 08:52:45 2021 +0100 Cosmetic changes (2) (#20876) commit a576ab83e9c321a22e533bf5e582e646b44944e2 Author: ellensp Date: Mon Jan 25 20:51:54 2021 +1300 "Move … code" followup (#20868) Fix regression from #20832 commit 70ee5e94fdfb17ec8eccce315f196818640da98b Author: Kairali Date: Mon Jan 25 12:48:31 2021 +0500 "Move … code" followup (#20874) Fix regression from #20832 commit 69da8719cf8be61a628f66a9d5b941ae7cf4b14b Author: Tanguy Pruvot Date: Mon Jan 25 08:44:39 2021 +0100 Graphical TFT fixes, cleanup (#20861) Co-authored-by: Scott Lahteine commit 4ce87eeb9198608b398c6cac021f52bcfac80e8a Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Mon Jan 25 08:11:34 2021 +0100 🧻 Cosmetic changes (#20859) commit 24a801b660acd6d0ce4b02a326dbb9a3f92a48c2 Author: Scott Lahteine Date: Sun Jan 24 21:20:51 2021 -0600 🛠Fix deps script version regex commit 786bba39ff58519e42e655b3360da480a710f945 Author: Scott Lahteine Date: Sun Jan 24 20:13:02 2021 -0600 Fix Ender 3 V2 DWIN manual move (#20837) commit bed027f41f0b2d1cc6ff0d01a1b811b6007b9400 Author: Jason Smith Date: Sun Jan 24 13:24:16 2021 -0800 Fix LiquidCrystal CI failures (#20873) Fix incorrect dependency syntax for LPC. Disambiguate LiquidCrystal library names. commit 17a4ef6730c9ba4af8dcefaff90575c1cd6519b0 Author: Roxy-3D Date: Sun Jan 24 07:47:22 2021 -0700 Revert "Adding custom move feedrate for G26 (#20729)" (#20870) This reverts commit 14567f3459d23f6cad0ab055a839b8f2652de979. commit 56383d3ca04898396288002f9d33f0d9a6db53c0 Author: ellensp Date: Sun Jan 24 19:43:23 2021 +1300 MeatPack serial encoding (#20802) Co-authored-by: Scott Lahteine commit 60c9a9e6546261056956a44366850ff7e1c6f3ad Author: Tanguy Pruvot Date: Sat Jan 23 06:23:35 2021 +0100 lcd_put_wchar_max for COLOR_UI (#20838) Co-Authored-By: Victor Oliveira commit 5398bfab3648c249c8af58e23b42220b9e753795 Author: ScrewThisBanana <71625822+ScrewThisBanana@users.noreply.github.com> Date: Sat Jan 23 04:02:22 2021 +0100 Adding custom move feedrate for G26 (#20729) * Adding custom move feedrate for G26 This commit adds an additional configuration parameter that can be used to specify the movement speed during the G26 validation pattern command during moves without extrusion. Closes MarlinFirmware/Marlin#20615 * Fixing missing default 'G26_XY_FEEDRATE_MOVE' value This commit adds a default 'G26_XY_FEEDRATE_MOVE' value (max movement speed / 1.5) in the G26.cpp - same behaviour as the default 'G26_XY_FEEDRATE' value * Adding comment describing functionality in G26.cpp * Renaming 'G26_XY_FEEDRATE_MOVE' to 'G26_XY_FEEDRATE_TRAVEL' Configuration parameter renamed for better readability and consistency MarlinFirmware/Marlin#20615 * Setting 'G26_XY_FEEDRATE_TRAVEL' to a safer value, aligned comments Changed default value for 'G26_XY_FEEDRATE_TRAVEL' from 150 mm/s to 100 mm/s for safety purposes, comment alignment MarlinFirmware/Marlin#20615 commit a8a6040b7873f77ca411ab951dc4d8492b4c402c Author: Scott Lahteine Date: Fri Jan 22 20:51:58 2021 -0600 🛠 Replace lib_deps for custom_marlin.FEATURE (#20858) commit 22db4c04480fa1645d419df153f343ad7d1804f0 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Fri Jan 22 22:58:08 2021 +0100 "Move … code" followup (#20852) Fix regression from #20832 commit 7bbf958e5cfbeb65d2cd263ff71b54a176f79139 Author: Scott Lahteine Date: Fri Jan 22 15:15:01 2021 -0600 Add labels, condition for BTT GTR M5 pins (#20772) Co-Authored-By: NAPCAL <47440988+NAPCAL@users.noreply.github.com> commit 0b7de80a6ff38a4ca78a50f58d2c211cdfe1a0e7 Author: Scott Lahteine Date: Fri Jan 22 15:01:19 2021 -0600 Move common strings (#20846) commit de37fbffa3b35451d5c6b7e38402cfcfc0fcbd4a Author: Scott Lahteine Date: Thu Jan 21 17:30:47 2021 -0600 Fix undefined E_LBL commit f4a3db8db81fd6a1eb13a9707dd47ee089398ba4 Author: Jason Smith Date: Thu Jan 21 02:14:24 2021 -0800 Ender 3 V2: Sync reset E in manual move (#20806) commit c409a6df5e954e1103f841232feb49a0e2d82757 Author: Jason Smith Date: Thu Jan 21 01:44:03 2021 -0800 Fix ANYCUBIC_LCD_CHIRON compilation (#20807) Co-authored-by: Scott Lahteine commit 71be210795831ac1b478f7bfff09c33bd8a24499 Author: Scott Lahteine Date: Thu Jan 21 03:40:07 2021 -0600 Move some MarlinCore and MarlinUI code (#20832) commit 67942622f1ffd17fb0cf8170f817dbb494e4016b Author: Katelyn Schiesser Date: Thu Jan 21 01:30:15 2021 -0800 Increase filament runout distance edit limit (#20828) commit 5252a32de4e305ffb876eb0f8e454968a31fa4c2 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Jan 20 23:28:38 2021 -0800 USB Flash Drive env hints for ABM (#20592) commit 5e5c0d65f3bce3bf6f795901e1c6aeb1af78d4d2 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Jan 20 23:26:12 2021 -0800 Lerdge K/S/X support for Flash Drive (#20593) commit 3dde2722bdf2717e190feaecfc146af7d0cd3777 Author: Scott Lahteine Date: Wed Jan 20 18:52:06 2021 -0600 MarlinUI multi-language support (#20725) commit befcdeb74d35a83898c1d70999fbedbeb2778b66 Author: Scott Lahteine Date: Wed Jan 20 18:49:07 2021 -0600 Keep G29 N on the DL commit 0c62fd02b03d505f26ae63d15898e3d18abc5663 Author: ellensp Date: Thu Jan 21 13:18:22 2021 +1300 More PlatformIO source filters (#20822) commit 8d2f1851eb0dac28e5792c759713a2b210a726fc Author: Tanguy Pruvot Date: Wed Jan 20 23:52:09 2021 +0100 PSTR alias followup (#20831) commit b355f4605eb177c7f9f4b3503dcafa91e85c2607 Author: Scott Lahteine Date: Tue Jan 19 20:58:50 2021 -0600 Move singlenozzle temp/fan (#20829) commit f6c4c269378efec6f85f43efea82591b07f304ba Author: devin122 Date: Tue Jan 19 21:57:12 2021 -0500 Fix reporting of TMC_S2VSA/B (#20730) commit c3341512949d0d95e59e8423e0ba9f464da36005 Author: ellensp Date: Wed Jan 20 15:55:57 2021 +1300 USE_M73_REMAINING_TIME sanity-check (#20751) commit faf4cb1b748f234ac9527c25446180dc34ba7480 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Wed Jan 20 03:55:01 2021 +0100 MMU2 serial followup (#20811) commit ccbff12d6ae8f49810c14049dec96256e38cbe2f Author: Scott Lahteine Date: Tue Jan 19 19:19:10 2021 -0600 Fix SINGLENOZZLE compile commit a02e8844154aebe5999ea866411f4201aa4eaa73 Author: EmilGustafsson Date: Tue Jan 19 23:52:04 2021 +0100 Swedish language for MarlinUI (#20826) commit 1fdf283e5daf4593449b8b97b3a01547d7ee9604 Author: Rockman18 Date: Tue Jan 19 23:27:57 2021 +0100 Fix MKS UI manual move (#20813) commit 910059adcba0ec9bc7c326bb9a240f3d56feec9f Author: Rockman18 Date: Tue Jan 19 23:26:25 2021 +0100 Fix, consolidate PSTR aliases (#20812) Co-authored-by: Jason Smith Co-authored-by: Scott Lahteine commit a8bd376fd4988203cf5857ad432419fee5601417 Author: Katelyn Schiesser Date: Mon Jan 18 19:59:18 2021 -0800 Raise Z on exit from 'Level Bed Corners' (#20817) commit c69f9b9883e4a23e10513404985aedcb7bde10b8 Author: Scott Lahteine Date: Mon Jan 18 21:53:32 2021 -0600 Clean up whitespace, headings commit 69b873b766689563a964fff16c4ab3e2ffa8507d Author: Scott Lahteine Date: Sun Jan 17 15:44:45 2021 -0600 OS-native targets for "mftest -a" commit 6162560b6991317c44cd639e5e43418fbd81f248 Author: Scott Lahteine Date: Sun Jan 17 12:08:40 2021 -0600 Internal G29N for G28+G29 (#20800) commit f101e1925779d4d44f89804eeb9cb62a4eaf999e Author: George Fu Date: Sun Jan 17 14:46:57 2021 +0800 FYSETC_242 OLED 12864 for S6 (#20767) commit 7836b85c967da464de8f5cfcaf7ad235bf33610e Author: Scott Lahteine Date: Sat Jan 16 23:15:43 2021 -0600 Reduce some G-code strings commit 522c78b5e6f2faf23e6cbdf928362d784145c29d Author: zeleps <39417467+zeleps@users.noreply.github.com> Date: Sun Jan 17 07:08:48 2021 +0200 Fix Tramming Wizard behavior (#20796) commit aabd40a7a28c5562e8bf0ffe8821d244ea4a1595 Author: Scott Lahteine Date: Sat Jan 16 20:43:24 2021 -0600 Optimize some G-code strings commit e351ea2ee8ef2f588ef13f2ae12cdb02446b1929 Author: Scott Lahteine Date: Sat Jan 16 20:43:46 2021 -0600 Apply bool to some MKS UI commit efc396bd0521bcdfd56e32dbc6d52f9a26cd3849 Author: Scott Lahteine Date: Sat Jan 16 19:03:06 2021 -0600 General cleanup, use _BV commit ae53998a88e47edf22ab6ceb38b193df2f63cda5 Author: ellensp Date: Sun Jan 17 17:34:54 2021 +1300 Fix Trigorilla Pro STOP pins (#20801) commit d814d8f954c9b25fbb324f45ee019ed3ff89ef03 Author: Alexander D. Kanevskiy Date: Sun Jan 17 03:51:08 2021 +0200 NEOPIXEL overridable on BTT SKR (#20797) commit 63e3117510f47f2df9d9d2fb83c7d9ffcc6c3ccc Author: Martin <34376785+G4Cab@users.noreply.github.com> Date: Sun Jan 17 02:49:34 2021 +0100 4 / 5 digits for some edit items (#20793) commit cab93c2ad857c79da30ca36aba34f63a07fe6a2e Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun Jan 17 02:20:35 2021 +0100 Update Italian language (#20789) commit 3acf86510d5db124f7443fbe654265636566f84d Author: ellensp Date: Sat Jan 16 19:50:25 2021 +1300 Fix Ender-3 V2 DWIN LPC signed warnings (#20786) commit 418524b1bece25b33f603fa9d0b5de0a6ae479ae Author: RFBomb Date: Sat Jan 16 01:43:38 2021 -0500 Configurable Corner Leveling point order (#20733) commit a5d2180bf5fa201acedf9ee746c6443794e659e7 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat Jan 16 03:38:34 2021 +0100 MMU2 as standard serial device (#20771) commit 0364ae49082428e821d813c80823fea99122a3fe Author: Marcio Teixeira Date: Fri Jan 15 12:59:27 2021 -0700 Improve filament runout handling in FTDI EVE Touch UI - On filament runout, take the user to the tune menu where they can initiate a filament change or resume the print. commit a7c97182f7bb25239b041eac2db1719117ca7c12 Author: Marcio T Date: Fri Jan 15 08:11:52 2021 -0700 Fix compatibility macros commit 1e7426e549186d2fecec6274aab993fd6b9704bf Author: Marcio Teixeira Date: Thu Jan 14 08:48:29 2021 -0700 Silence unused parameter warnings commit fd6501207f881eb2ca167e2255b85ffa19dd3fe9 Author: Jelmer van der Stel Date: Sat Jan 16 00:23:04 2021 +0100 Fix Ender 3 V2 encoder (#20784) commit 7f8188ccb6eef61c5c4cd291a051c8db7747cb3f Author: EvilGremlin Date: Thu Jan 14 11:33:50 2021 +0300 ESP32 Tone Generator (#20704) commit f5341da94d2193c4c767cc52fd6ca8dd03d063ad Author: vitaliy172 <68148475+vitaliy172@users.noreply.github.com> Date: Thu Jan 14 10:21:28 2021 +0200 Update Ukrainian language (#20668) commit a588f69f1639ad3339f970ed136beeca0d91f11d Author: Scott Lahteine Date: Thu Jan 14 00:43:47 2021 -0600 MKS prelim. cleanup (2) commit 86bf374fc4e57cad7104f9a4369090ec8b8a42b6 Author: Scott Lahteine Date: Thu Jan 14 00:23:56 2021 -0600 More MKS UI prelim. cleanup commit a3d6442d02741035e6e5bc6ee61fcb92483fba7e Author: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Date: Thu Jan 14 12:41:09 2021 +0800 MKS WiFi for TFT_LVGL_UI (#20191) commit 62d20c8b3711d736fc27aace84ab12ae56c4ea77 Author: Scott Lahteine Date: Tue Jan 12 22:32:12 2021 -0600 Ignore M22 during SD print commit 726e2e9bc09b9311bfd33e523301f90f118f321d Author: Scott Lahteine Date: Wed Jan 6 21:32:30 2021 -0600 Move WRITE_FAN commit eedd9c2bda27f3f31cc9c18253b05dfd1f39b14e Author: Scott Lahteine Date: Tue Jan 12 21:48:34 2021 -0600 whitespace commit 5c181562f6235ecd53333cec0d0ba63e3d6cac31 Author: Scott Lahteine Date: Tue Jan 12 21:02:35 2021 -0600 MKS UI prelim. cleanup (#20763) commit 104aceb44ac91dfd06e3ebe5b3053f2ab97b4d8d Author: Scott Lahteine Date: Tue Jan 12 20:43:52 2021 -0600 Rotary encoder cleanup (#20753) commit bee794e5983d4f1ab404ea9a195b4102d5fa9eed Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Wed Jan 13 02:38:51 2021 +0100 Fix comments (#20759) commit 483804bafdabed6783c9c2ed7ab9a1b48796a3db Author: Scott Lahteine Date: Tue Jan 12 18:08:16 2021 -0600 Ok to use C++11 'auto' commit 55709b9d2cebdea036761925c8f42da305c4efd3 Author: Johan van der Vyver <9843081+jvandervyver@users.noreply.github.com> Date: Wed Jan 13 02:05:49 2021 +0200 Multi-platform DWIN_CREALITY_LCD support (#20738) Co-authored-by: Scott Lahteine commit 8eb32cef2433e8cbbc4b89a27eff27886cb7b95c Author: devin122 Date: Mon Jan 11 02:46:17 2021 -0500 Fix TMC220x short circuit (#20731) commit 92f847c8f784bdcdd7e111e8105d11e980bd67c2 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Mon Jan 11 07:59:42 2021 +0200 Fixes for TFTGLCD (#20734) commit be3caa468699169d55d0c129747dcef3d79add4a Author: Victor Oliveira Date: Mon Jan 11 00:55:16 2021 -0300 NO_SD_DETECT option (#20741) commit fa6a2f52e24817d2fa2332745b9c9c4a1ad6f57f Author: Scott Lahteine Date: Sun Jan 10 21:49:19 2021 -0600 Fix joystick include commit 7e188c48e1f711cd1f7148100ddf0af607b0df70 Author: Scott Lahteine Date: Thu Jan 7 18:26:43 2021 -0600 Tweak STM32F1 pin r/w/t commit 928cd1b8ab84c3f55faeb1a53d79f61129cb2207 Author: Scott Lahteine Date: Fri Jan 8 15:07:35 2021 -0600 Clean up some includes commit 4145d85ef15836cda43fa4ef8e5134817d67e33b Author: Scott Lahteine Date: Sun Jan 10 21:37:51 2021 -0600 Update Slovak glyphs commit 9901b4e9f1baeff96e4d2befc53682cf21d641ca Author: Mike La Spina Date: Sun Jan 10 06:01:25 2021 -0600 Laser Test Fire (#20452) commit 4e46de66d3d9fe35ed78d165cc83541c8e07f9fc Author: Anthony Rich <6941856+antman2@users.noreply.github.com> Date: Sun Jan 10 21:50:09 2021 +1000 Wanhao One+ SD detect pin (#20724) commit 7c7d28345ed5e4b37c1322d2a3c364257fc31ccf Author: Scott Lahteine Date: Sat Jan 2 16:20:49 2021 -0600 Optimize some G76 strings commit 8690f4862df25ba35f3c0aa807d968a9c08973f4 Author: Dmitry Katsubo Date: Sat Jan 9 01:55:36 2021 +0100 Fix misc. warnings (#20715) commit c9a9c00f61e1d20198aba532adceba0a49185d12 Author: Scott Lahteine Date: Fri Jan 8 18:51:54 2021 -0600 Fix Python 2.7 compatibility Fix regression from #20692 commit 6a60d47b9020e3073960dfaec63eee32de26bcb1 Author: Markus Date: Sat Jan 9 01:42:08 2021 +0100 Up to 6 Tramming points (#20720) commit f19a1833bd7c0276225f4ba773abdf7fe7bdc298 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Fri Jan 8 00:55:57 2021 +0100 Fix M48 output (#20713) commit 074d3f626633dc9e5f80e2cdaf379c504a876551 Author: TheCodeExorcist <63008968+TheCodeExorcist@users.noreply.github.com> Date: Thu Jan 7 04:13:15 2021 +0100 Improved MKS Robin support (#19333) commit 92eee0386f3cf425d67abfe21bfee89de20fa9a8 Author: Java Date: Thu Jan 7 07:57:11 2021 +0500 Preheat before Power Loss Recovery homing (#20697) commit 32caeecffba04ee59c525f0c134b0a46082eb191 Author: Scott Lahteine Date: Tue Jan 5 21:03:13 2021 -0600 Custom build_flags by feature (#20692) commit 5ef0475dc5cd8caecaef7e4fe5398b49b8558874 Author: wilbur4321 Date: Tue Jan 5 15:03:45 2021 -0800 Multi-Z stepper inverting (#20678) Co-authored-by: Scott Lahteine commit aa5ac6c3b2c8592842fab314a64b1ff3f75df4e8 Author: ellensp Date: Wed Jan 6 01:23:56 2021 +1300 Fix Azteeg X3 macro typo (#20681) commit fd7e34312a8fc10d929ff65b65e79b7f7bc24ee6 Author: ellensp Date: Wed Jan 6 01:22:51 2021 +1300 Define SANGUINOLOLU 1.1 enable pins (#20682) commit d10c7347300e08a0961f6cc79128585e0b19cda7 Author: ellensp Date: Wed Jan 6 01:21:08 2021 +1300 No BTN_ENC_EN on Anet 10 (#20684) commit c64a5a4b8fda56d3d057158440cccfe0e1fe5e51 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Jan 5 13:18:09 2021 +0100 Temperature report followup (#20687) Co-authored-by: Scott Lahteine commit e3cd293f4e726673cde29325aa9b13cf62990a50 Author: FanDjango <51046875+FanDjango@users.noreply.github.com> Date: Tue Jan 5 06:57:58 2021 +0100 Adjustable precision in M105 temperature report (#20602) Co-authored-by: Scott Lahteine commit d324f3b16a1f7898268b20614f3cf257657c3526 Author: zeleps <39417467+zeleps@users.noreply.github.com> Date: Tue Jan 5 07:48:42 2021 +0200 Don't apply hotend_offset.z to Z soft endstops (#20675) Co-authored-by: Scott Lahteine commit 01c9d49f091b12e6bafec3c79bb183524b62c508 Author: Scott Lahteine Date: Mon Jan 4 23:35:56 2021 -0600 Indent tool_change_prime commit cc1b8c2d0b303430349272765230d907d2ed3994 Author: Scott Lahteine Date: Mon Jan 4 23:09:35 2021 -0600 Clarify solenoid active / magnet-on state commit ed7698efaa5d5b0bd1dae1e79b6605e687c3639a Author: FanDjango <51046875+FanDjango@users.noreply.github.com> Date: Tue Jan 5 03:32:52 2021 +0100 Defer "quiet probing" till the last Z bump (#20610) commit efe2859227a94e3aa8d0903766c8870481ecb152 Author: Scott Lahteine Date: Mon Jan 4 19:01:45 2021 -0600 Solenoid cleanups Followups to #20473 ahead of #20675 commit 4b4498be9392c8bd9671890d053983d10645ce63 Author: Scott Lahteine Date: Mon Jan 4 18:18:18 2021 -0600 Remove untranslated strings commit eff2330ce148474639c07ccffe274ddc60233b70 Author: Scott Lahteine Date: Mon Jan 4 17:51:46 2021 -0600 G34/M422 cleanup commit 8884b1f9a6c0b8127f9a17ec8aae24d06c0e1114 Author: Scott Lahteine Date: Sun Jan 3 22:23:13 2021 -0600 Move duplication_e_mask commit bb747bcd621664b4b90dbc3f1f13f4f06d509478 Author: Scott Lahteine Date: Sun Jan 3 22:22:21 2021 -0600 Fix delayed_move_time elapsed test commit b1f0671541cdbc537726c7fbee1d4e312a8799c7 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Jan 3 23:07:29 2021 -0500 Fix IDEX reboot on travel after G28 X (#20654) commit abeefaac7fbc35ce6932e34740ed610c2db69e0d Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Jan 3 22:59:48 2021 -0500 Fix SD SPI Speed override, FTDI mesh edit (#20657) Co-authored-by: Scott Lahteine commit 90c04ee15d3ba3e686e33dafaa95c1e1f91f7870 Author: Scott Lahteine Date: Sun Jan 3 21:45:31 2021 -0600 Rename FTDI EVE screen data structs commit d3d8fd6d9b05fe10602faead46c3f26088e76df2 Author: Marcio T Date: Sun Jan 3 20:39:15 2021 -0700 Fix thermal error protection, reporting (#20655) commit c6c5cc7246b87abb36aa1008aab9a6fc2ebc29eb Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon Jan 4 00:43:31 2021 +0100 Update Italian language (#20663) commit d5465f1ad8d5ac75bced9ecc9be277f15e521c21 Author: Scott Lahteine Date: Sun Jan 3 07:16:50 2021 -0600 Creality 4.2.10 board (#20647) commit 3f8a83b2857e1f73217eac4d0e5aee04b9ce70b6 Author: Scott Lahteine Date: Sat Jan 2 19:01:09 2021 -0600 Add ALL_AXES manual move for UBL mesh editing Co-Authored-By: Jason Smith <20053467+sjasonsmith@users.noreply.github.com> #20620 commit 385152b3d2983c980cab571b7a7da04c09255430 Author: Scott Lahteine Date: Sat Jan 2 18:40:52 2021 -0600 Animated boot followup commit 66c69aef6a471b1f165e2fdfa62c09c2593f71e6 Author: ellensp Date: Sun Jan 3 13:37:47 2021 +1300 Homing code followup (#20632) Patching a87e5197cfb2f302c3eea9271b4c25c49df3ab6b commit f4f152bd0179e041447a9d7bafb1fed410986426 Author: Scott Lahteine Date: Sat Jan 2 15:51:51 2021 -0600 Improved bootscreen animation commit eaeb9d1b2092cccf91c6434629fc25fbfab6fc61 Author: Scott Lahteine Date: Wed Dec 30 19:13:47 2020 -0600 Document, adjust some homing code commit a42755a061808199d8f0f8491605d1e0bf4d31fd Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sat Jan 2 09:53:34 2021 +0100 Fix a comment (#20629) commit 5d35e3ccf56e67240904125655cf9d07ab20cbd9 Author: ellensp Date: Sat Jan 2 21:51:35 2021 +1300 Check for misplaced configs on build (#20599) Co-authored-by: Scott Lahteine commit 7ef03a761bc528f5bb8bfac01178bd45d7e89e77 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sat Jan 2 09:33:31 2021 +0100 Assisted Tramming improvements (#20298) commit f570791e1957af9a044c9852f9fb132e6a9409dd Author: ellensp Date: Sat Jan 2 21:06:50 2021 +1300 Fix //action prefix (#20600) commit 25152a8cefcdae546b7ab86d3a04e65facbbc495 Author: Jason Smith Date: Fri Jan 1 18:08:10 2021 -0800 Fix UBL mesh edit delta moves (#20620) Co-authored-by: Scott Lahteine commit 14b7eb1c5a42bef7d15650c8abfcf791c1130bb4 Author: Jason Smith Date: Fri Jan 1 12:56:59 2021 -0800 Fix CHAMBER_FAN_MODE 0 build (#20621) commit 3b4c5f982c90194db4d28bf93a7826b362ae42ee Author: zeleps <39417467+zeleps@users.noreply.github.com> Date: Fri Jan 1 22:54:44 2021 +0200 Fix PARKING_EXTRUDER homing with solenoid (#20473) commit 2c58d0881b4f1f03d2173ba0e258d6d2b8b1bf37 Author: Victor Oliveira Date: Fri Jan 1 17:31:15 2021 -0300 Prefix SD SPI pins (SCK, MISO, MOSI, SS) (#20606) Co-authored-by: Scott Lahteine commit 7a748bd565f8b95dfcdb5f2706d5d0a255b0ebe3 Author: Scott Lahteine Date: Wed Dec 30 22:00:36 2020 -0600 SPI and pins cleanup commit cf996949faf8b6f7dbc5f7ec2aad34e4ff1f9f61 Author: Victor Oliveira Date: Tue Dec 29 02:26:35 2020 -0300 Support 4.3" (480x272) Color UI display (#20334) commit 79672d51f665e5fb30058b368443a83094e8c2e7 Author: Victor Oliveira Date: Tue Dec 29 02:16:38 2020 -0300 USB FD via native USB Host + MSC (#20571) commit c3dc74bba0045ef09a0ba49493d84c5a12888351 Author: Scott Lahteine Date: Mon Dec 28 23:10:48 2020 -0600 Pins, comment cleanup commit f539e319f0812039c4af5d4300bfc21fc5f910bb Author: Tanguy Pruvot Date: Tue Dec 29 05:13:56 2020 +0100 Clarify sanity-check for custom status bitmap (#20588) commit eda5a884c64ef0646d90b8744dabbe43adc4c619 Author: Victor Oliveira Date: Tue Dec 29 01:07:11 2020 -0300 LVGL G-code preview. Legacy MKS WiFi Cura plugin compatibility (#20589) commit 7b33ceebbbfd02459e939be1831cb3a92cb422ac Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Mon Dec 28 19:56:37 2020 -0800 Apply SHOW_BOOTSCREEN to TFT_COLOR_UI (#20586) commit 8aa453d75b07caa0fcd764501521cb8bc2c1db71 Author: Scott Lahteine Date: Sun Dec 27 23:49:15 2020 -0600 Menu item index followup commit ed1c0b71df0a079def84742148f3dcf60e459c1a Author: Victor Oliveira Date: Mon Dec 28 02:39:52 2020 -0300 Fix Change Filament menu actions (#20565) Co-authored-by: Scott Lahteine commit 63f083db969ec5ae7e8959323bed82f5728d4e7a Author: Victor Oliveira Date: Mon Dec 28 02:15:01 2020 -0300 Fix LVGL_UI G-code preview (#20564) commit a74d4609af0777d711d1f97ab7caba9fdd63543e Author: Victor Oliveira Date: Mon Dec 28 02:14:08 2020 -0300 Use ADC_RESOLUTION 12 for all STM32 (#20562) commit 427a2fca4dc27d039f39a2b96d063e56aa593ae6 Author: Victor Oliveira Date: Mon Dec 28 02:11:36 2020 -0300 Fix Menu Mixer for Color UI (#20566) commit 910908fb32ca1d097527ab527c820448f875e757 Author: Victor Oliveira Date: Mon Dec 28 02:08:06 2020 -0300 Better defaults, compatibility for SDIO + STM32 (#20570) commit a8800d5b0a7b204b8b988d633898babd9cb31532 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun Dec 27 19:10:53 2020 -0800 Small / Large Boot Screen option for TFT_COLOR_UI (#20578) commit adca49e432e78487806ea1c1b1976238707a8e51 Author: Scott Lahteine Date: Sun Dec 27 21:00:07 2020 -0600 Remove URL scheme commit 214f6cb6e39dc3d066a00cba9e116d5698a28674 Author: Scott Lahteine Date: Sun Dec 27 20:50:16 2020 -0600 Allow define HOMING_FEEDRATE_(XY|Z) commit 3395d10e82b1536da9eb2c36afb6525bf0b9fe86 Author: Scott Lahteine Date: Wed Dec 23 22:41:52 2020 -0600 General cleanup commit 2e93923e2403c2062d69122f0ca9b3919d0a5ea0 Author: Jason Smith Date: Sun Dec 27 18:49:15 2020 -0800 Validate defined probe points (#20572) commit 892e83e8723ecd395b334c554fd13faa32534e04 Author: Scott Lahteine Date: Sun Dec 27 16:23:18 2020 -0600 Init tare pin once commit 10482ca49c898a1cefcdeb480573d015f0d0c3ee Author: Scott Lahteine Date: Sun Dec 27 16:21:01 2020 -0600 Add probe_switch_activated commit 9947072d2d57534a7d3020534c662cc326b3102d Author: Scott Lahteine Date: Sun Dec 27 16:15:15 2020 -0600 Remove CREALITY_TOUCH commit 6d3e22dd4a8b69e20e88f07c76358ecb0f921cd1 Author: Scott Lahteine Date: Sun Dec 27 16:26:18 2020 -0600 Fix some comments commit e3d7603d546578cc673e7e35a426214f3ad564bd Author: Ashammaru Date: Sun Dec 27 02:01:54 2020 +0100 Fix SPINDLE_LASER_FREQUENCY (#20509) commit f9dd484381d9aa53267ecefc8db2e87f9e27c8fa Author: Mike La Spina Date: Wed Dec 23 22:50:24 2020 -0600 Cutter Power in percent format (#20410) Co-authored-by: Scott Lahteine Co-authored-by: Jason Smith Co-authored-by: Luu Lac <45380455+shitcreek@users.noreply.github.com> commit 48bf80d190a95bfdfe720b9408a65ba00a70ce29 Author: Vi B-P Date: Wed Dec 23 23:43:33 2020 -0500 Apply NO_MOTION_BEFORE_HOMING to joystick motion (#20462) Co-authored-by: Scott Lahteine commit 089bfad4902506346020b25c0a4e3126ede1db41 Author: Scott Lahteine Date: Wed Dec 23 22:23:45 2020 -0600 Fix, clean up FTDI EVE Touch UI (#20466) Co-Authored-By: Marcio T. commit f1bf1e1835b77f8f2d81c3abc7fcd2fb8745e1d0 Author: Jason Smith Date: Wed Dec 23 19:35:21 2020 -0800 Fix ST7920 timing for Rumba32, Fysetc S6 (#20556) commit 35e1917655225ef4399e8257fc04f97898ae1dd7 Author: Victor Oliveira Date: Thu Dec 24 00:34:09 2020 -0300 Fix DOGM status message scrolling (#20557) commit 121d4bf52ad209ac3330e7494e180938516a98f0 Author: Scott Lahteine Date: Wed Dec 23 20:22:58 2020 -0600 Add "End Repeat Loops" menu item commit fadc8a1944600f849a660f8b52439524b7d768b2 Author: Victor Oliveira Date: Wed Dec 23 23:01:21 2020 -0300 LVGL and Classic UI for STM32 (#20552) commit a5dd4028ac258cb4ac1d6c2b0836ef393a1ee923 Author: Scott Lahteine Date: Wed Dec 23 19:57:49 2020 -0600 Move BTT_SKR_CR6 commit a510c16838b1d19771d7b1a2dcea1df55e424a92 Author: ubik2 Date: Wed Dec 23 16:19:48 2020 -0800 Add OPTIMIZED_MESH_STORAGE option (for UBL) (#20371) Co-authored-by: Scott Lahteine commit 156b5f4749ba9e525f495c3f91de43d3c3723fe2 Author: LinFor Date: Thu Dec 24 01:37:17 2020 +0300 Remaining Time for FTDI EVE, bp for ExtUI (#20549) Co-authored-by: Scott Lahteine commit fa89a7b0bc1051c9133dd748e16127a50c8b190e Author: Scott Lahteine Date: Wed Dec 23 15:33:34 2020 -0600 Apply ENABLED in ExiUI / FTDI commit a24298f6253b56c25889d34b2843f05b4cbd44a6 Author: Darren Peter Date: Wed Dec 23 07:21:02 2020 +0000 Support ANET_FULL_GRAPHICS_LCD_ALT_WIRING on BTT SKR 1.4 (#20427) commit ec83a964841313c65402910d674e4822439a8dac Author: Sebastiaan Dammann Date: Wed Dec 23 08:02:27 2020 +0100 Probe Activation Switch followup (#20550) commit a03ebfda52436199ce1e5674894229e02c841ff4 Author: BsCmOD <64871957+BsCmOD@users.noreply.github.com> Date: Wed Dec 23 08:01:18 2020 +0100 Enhanced Italian language (#20551) commit 323bf477383233909d3a13af84c3f9cb36b591ef Author: LinFor Date: Wed Dec 23 09:51:59 2020 +0300 FTDI EVE: Cyrillic font, some minor fixes (#20517) commit ad15890a81169f03517eb7738563c5e1ad691fd5 Author: yysh12 Date: Wed Dec 23 00:12:20 2020 -0600 Improve plan_arc circle detection (#20440) Co-authored-by: Scott Lahteine commit 60aeed99c6377efbf522caa85dec2404f14bba16 Author: wmariz <11435639+wmariz@users.noreply.github.com> Date: Wed Dec 23 03:10:56 2020 -0300 Refactor 'Level Corners with Probe' (#20460) Co-authored-by: Scott Lahteine commit c529209c8fd8fecfd6e2fcc0be4468e401a36768 Author: Jan Krajdl Date: Tue Dec 22 15:27:14 2020 +0100 Support RGBW on PCA9632 (#20455) Co-authored-by: Scott Lahteine commit be3e45d759e52bf99d2851a2f7707bb7899b457b Author: Tanguy Pruvot Date: Tue Dec 22 14:01:24 2020 +0100 Fix G28 leveling state, UBL compile (#20499) commit 7c8cff0d3c0aea31ac43132bb8e883d579422977 Author: Victor Oliveira Date: Tue Dec 22 09:57:11 2020 -0300 Unify FYSETC F6 1.3 / 1.4 (#20507) Co-authored-by: Scott Lahteine commit 256e94980e797dc0309efa8ea412a896b037232d Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Tue Dec 22 14:56:00 2020 +0200 STM32F1xx support for TFTGLCD (#20515) commit aa65c6e477c778e59cde1c646fbe5fb44cfa8508 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Dec 22 04:51:29 2020 -0800 Anet ET4 / ET4P and Anet TFT28 / TFT35 (#20280) commit 59b5cb6fe266c060339b78050e2f6dd19203c2e4 Author: Sean McGroty Date: Tue Dec 22 07:25:12 2020 -0500 Creality v4.3.1 (Ender 6) board (#20512) commit a33c689c402186edd26092381e58272380a20b28 Author: X-Ryl669 Date: Tue Dec 22 13:17:06 2020 +0100 Improve Touch Calibration screen (#20524) commit 30d98396317c3c39a89aa85e63ac8c2433198e76 Author: Jason Smith Date: Tue Dec 22 04:02:25 2020 -0800 Overrides to prevent STM32 timer conflicts (#20545) commit f0b7f2702919f8d84ea93bf2b9ffa6e95937cab3 Author: Chris Pepper Date: Tue Dec 22 11:59:25 2020 +0000 Fix UBL mesh inset Z position (#20538) commit a1313c7066a2048f44d3867390227c6b8cd096aa Author: Jason Smith Date: Tue Dec 22 03:49:34 2020 -0800 Improve STM32 timer conflict messages (#20544) commit 31c84d4559f763cbe2777c0682b72d6cf35e9027 Author: LinFor Date: Tue Dec 22 09:31:14 2020 +0300 FTDI EVE custom user menus (#20518) commit 076f12e82d59d336d5eabd20caaa35856e7799e9 Author: LinFor Date: Tue Dec 22 03:30:03 2020 +0300 12-bit ADC resolution for STM32 (#20519) commit 231e5a5eedfbfa37c7551217de0cc43061a180df Author: LinFor Date: Tue Dec 22 03:06:27 2020 +0300 Add Tune -> Advanced Settings to FTDI EVE (#20532) commit 350dc4ca05bcfa0f8b7a822000ecba0964438778 Author: Scott Lahteine Date: Mon Dec 21 17:48:03 2020 -0600 Tweak FTDI spacing commit ff2f6cb110060ef2555c73e993b58391bff76608 Author: Scott Lahteine Date: Sat Dec 12 20:47:18 2020 -0600 Robin pins followup commit b667722184342d3e1b420d7d4eba076cb645af37 Author: LinFor Date: Tue Dec 22 02:45:00 2020 +0300 Fix some Russian (#20529) commit bc3f2f246f6bd478a618073ebc8bdd7dc35b2236 Author: cr20-123 <66994235+cr20-123@users.noreply.github.com> Date: Mon Dec 21 18:43:45 2020 -0500 Fix G34 compile with bed leveling disabled (#20537) commit 28548e7ea204e41b2a32cd5bb1242b401d42c459 Author: Sebastiaan Dammann Date: Sun Dec 20 18:10:03 2020 +0100 Add BTT SKR CR6 board (#20522) commit 023ef753b9c6cb04ecad32436ddf93b1cc14fc71 Author: Scott Lahteine Date: Mon Dec 21 17:36:15 2020 -0600 Clean up some pins commit b799d0d0736ee733d9e1ec7baed8c11e47579233 Author: Dick Streefland Date: Mon Dec 21 08:49:00 2020 +0100 Apply HOME_AFTER_DEACTIVATE for 'G28 O' (#20525) commit be6e1ccba2c5f08ca7dca1a258dae97888278fec Author: Dick Streefland Date: Mon Dec 21 08:47:49 2020 +0100 Get E3V2 DWIN `MACHINE_SIZE` from config (#20526) commit 2a58aa2181103f6c097896613a2ef8d4ee978ed2 Author: Scott Lahteine Date: Sun Dec 20 00:38:10 2020 -0600 Fix PIO typo commit 525cdeae190e099bf1d7e4b89840f4d41cac3282 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Sun Dec 20 08:33:23 2020 +0200 Update Russian and Ukrainian languages (#20508) commit c831aabe14608bbc68e60128e0d90483c98fec4d Author: Scott Lahteine Date: Sun Dec 20 00:27:04 2020 -0600 Languages cleanup commit 642110b0726f956105b45b3c27b6ad1b9b65ae88 Author: Foxies Date: Sun Dec 20 07:17:24 2020 +0100 Migrate Hispeedv1 (QQS-Pro) to HAL/STM32 (#20354) commit 56e2f391751bb45d237d9118fba5f5486ab0b0fd Author: Jason Smith Date: Sat Dec 19 21:55:57 2020 -0800 Fix Creality EEPROM watchdog freq. (#20510) commit 3e26e23e60c64498f341e0d9d2ebbe3c41cdd5bc Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat Dec 19 23:11:43 2020 -0500 Probe Tare, Probe Activation Switch (#20379) Co-authored-by: Scott Lahteine Co-authored-by: Victor Mateus Oliveira Co-authored-by: Jason Smith commit 588fec647482492ece2a5c666937e936b4b42b63 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat Dec 19 23:02:38 2020 -0500 Minimum temp options for Probing and G12 Nozzle Clean (#20383) Co-authored-by: Jason Smith Co-authored-by: Scott Lahteine commit 87fbb8933016ebe7db64c019e0649bca7567e488 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat Dec 19 19:48:31 2020 -0800 Let boards set Default TMC Slave Addresses (#20498) Co-authored-by: Scott Lahteine commit a4701fbd3e78c8c84b9ac54092330072c82d0a24 Author: Scott Lahteine Date: Tue Dec 8 20:22:30 2020 -0600 Tweaks for pins_BTT_SKR_common.h commit e02fd232ba6f6217f896ff82038ea6c2acfc77c2 Author: Scott Lahteine Date: Fri Dec 18 21:13:37 2020 -0600 Rename QUIET_PROBING commit f7f531e59de9c8daa1bff70535cb4a4bc8dcc7ed Author: Tanguy Pruvot Date: Fri Dec 18 23:21:00 2020 +0100 DOGM: Slow down touchscreen calibration (#20454) commit 51e3d8f08b22af0a86d506e6c612e25f43b9b341 Author: Victor Oliveira Date: Fri Dec 18 19:18:04 2020 -0300 MKS Robin Nano V3 and STM32F4x0Vx Variant (#20430) commit 02b65de6a2cd4778c1b2f3293bed7cd9a732c0ef Author: grauerfuchs <42082416+grauerfuchs@users.noreply.github.com> Date: Thu Dec 17 18:22:59 2020 -0500 Fix and optimize MightyBoard (#20493) commit c3a1cd10abc8ec0336f52abf2822f2707b92f3a8 Author: Jason Smith Date: Thu Dec 17 04:18:07 2020 -0800 Balance CI tests (#20485) commit e5d094d2bd243fe3fcbe5feda5186352e452ab40 Author: nb-rapidia <43864438+nb-rapidia@users.noreply.github.com> Date: Thu Dec 17 04:13:07 2020 -0800 Make M220 B / R a standard feature (#20355) commit d6efe75251de748adb23526f0a7ec8507da75318 Author: ellensp Date: Fri Dec 18 01:05:25 2020 +1300 Fix ZoneStar LCD 2004 buttons (#20489) commit f50abfcb1bb336fd827e7d3de63dd3dd7183a6f3 Author: rafaljot Date: Thu Dec 17 13:02:05 2020 +0100 Homing feedrates as XYZ array (#20426) Co-authored-by: Scott Lahteine commit bee6b8af8fedb1e406e095fafdb848b182d94d32 Author: Scott Lahteine Date: Wed Dec 16 22:18:40 2020 -0600 Use homing_feedrate function commit 1b6db623a76fd16a8e2d48c2a8128e4dfb988b11 Author: Tanguy Pruvot Date: Wed Dec 16 07:46:10 2020 +0100 Update French language (#20472) commit a45603a344ad47418c0efd0aa2a035d29ca8c254 Author: Scott Lahteine Date: Wed Dec 16 00:41:55 2020 -0600 Update Hungarian language Co-Authored-By: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> commit fa9463528db87652e1b9865bdf03d56eaa551d93 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Wed Dec 16 07:35:13 2020 +0100 Update Italian language (#20480) commit 82b6044dbb643fdb5be7d75bffab02284e7ab03b Author: Scott Lahteine Date: Tue Dec 15 00:53:53 2020 -0600 Trust STM32 gcc versions commit be7aab204feced145e915022ab94ac9d35220668 Author: Scott Lahteine Date: Tue Dec 15 01:00:28 2020 -0600 Update some LCD includes commit f82b3f0f51b3e5f2633b0c964daf8cf24e29e44b Author: Scott Lahteine Date: Tue Dec 15 00:44:00 2020 -0600 Update some pins errors commit 3d7680a42649d393e99257dadb39f9deae65b01e Author: Sebastiaan Dammann Date: Mon Dec 14 21:29:59 2020 +0100 Creality v4.5.3 (CR-6 SE, CR-6 MAX) (#20468) commit 878305671b78271acd5b1c8365a486b7d94942a9 Author: JoAnn Manges Date: Tue Dec 15 01:16:50 2020 -0500 Fix RESTORE_LEVELING_AFTER_G28 (#20471) commit 46d2dc9beee8f9e16c1db1725dd32c2bd9c0657a Author: Scott Lahteine Date: Mon Dec 14 21:27:05 2020 -0600 Please install the EditorConfig plugin commit e188b3e28c009d0583453dedadbf4863288ec27a Author: Scott Lahteine Date: Mon Dec 14 21:06:56 2020 -0600 Auto-check followup commit a59164d5c833a6b6c4a4028c1500bc18363a3cc3 Author: kisslorand <50251547+kisslorand@users.noreply.github.com> Date: Tue Dec 15 05:04:45 2020 +0200 Fix M1001 auto-check logic (#20456) commit 0b0eb6a11929cd64f7bf324b2fec601bb5be2760 Author: Jason Smith Date: Mon Dec 14 19:02:46 2020 -0800 Trust that script -x flags will always be set (#20453) commit e6b3c740690c14110a3277f9540ed5e8257d7c8c Author: Scott Lahteine Date: Sat Dec 5 20:10:13 2020 -0600 Always enable leveling after G28 commit 20bd54f6d37ea1c94e8bcf4d4d92bc11eba91401 Author: Scott Lahteine Date: Sat Dec 5 19:56:16 2020 -0600 Preheat before leveling commit 6599e4ea53eabf6eeb372e19b4960b61341a20b5 Author: Scott Lahteine Date: Mon Dec 14 20:34:15 2020 -0600 Fix formatting commit 5617d64119694219b1e54d92f0b02d50e86fbb07 Author: Chris Pepper Date: Mon Dec 14 22:36:25 2020 +0000 LPC176x framework update (#20469) commit b81a9e54a30d5e3a66f0ebf668bae47e8e7c5a3c Author: Scott Lahteine Date: Sun Dec 13 01:50:02 2020 -0600 SHORT_MANUAL_Z_MOVE => FINE_MANUAL_MOVE commit cbe27daafbadb34d7351c60b1d818cde064faf85 Author: Scott Lahteine Date: Sun Dec 13 01:53:21 2020 -0600 Adjust planner debugging commit 430855fdca57731eefdf630779fb0a2d9527710c Author: FanDjango <51046875+FanDjango@users.noreply.github.com> Date: Sun Dec 13 02:18:33 2020 +0100 Probe Offset Wizard followupBack to PROBE_PT_RAISE/separate STOW, make "PROBING" msg appear (#20439) * Go back to always use PROBE_PT_RAISE with a discrete stow. This ensures a raise above the bed, while stowing prior to exiting the wizard. * Fix issue preventing text while moving to X/Y position Co-authored-by: FanDjango commit e9bde7e6fce626540353657a9835f16b8121ee82 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sat Dec 12 20:03:28 2020 +0100 Improve ASSISTED_TRAMMING_WIZARD probe stowing (#20437) * When BLTOUCH_HS_MODE enabled, stow pin before user interaction * For all probes, ensure probe stows at end of wizard commit 5aebc9fb0c11d672edadec9a9beffddf1781b1b9 Author: ellensp Date: Sun Dec 13 07:59:17 2020 +1300 Add HAS_PIN_27_BOARD for CREALITY_V4 (#20446) Co-authored-by: ellensp commit d0c2b643f8b705ecce57f2efa9702ea034354589 Author: leodoener Date: Sat Dec 12 03:20:24 2020 +0100 Fix SDCARD_SORT_ALPHA on Ender 3 V2 (#20443) commit c0ad4718a4d488d5f1f951efa701d73eb52d5b36 Author: Scott Lahteine Date: Fri Dec 11 18:21:56 2020 -0600 Better animated boot screen commit 8f188adc32d438d98d3783e71defee53a15a14f5 Author: Jason Smith Date: Fri Dec 11 01:39:51 2020 -0800 SENSORLESS_PROBING sanity check followup (#20438) commit 74042d368edb473d9b1d6b7ee2800d87012d1b72 Author: FanDjango <51046875+FanDjango@users.noreply.github.com> Date: Fri Dec 11 09:06:57 2020 +0100 Probe offset wizard fixes (#20414) * STOW probe, reverting incorrect earlier change from #20344 * Adjust soft endstop disables, to ensure travel below bed functions properly Co-authored-by: FanDjango commit 2a5b32f109ecdb6aed53907015a0c36e4a61ad9f Author: elasticdotventures <35611074+elasticdotventures@users.noreply.github.com> Date: Fri Dec 11 18:33:29 2020 +1100 Z_SENSORLESS sanity checks (#20421) Co-authored-by: Jason Smith commit 0c383b858ffd8961a9f4b3f8ff28f095ca3788d8 Author: ellensp Date: Fri Dec 11 07:30:58 2020 +1300 Fix UBL Debug Messages (#20423) Co-authored-by: ellensp commit aecfd95592ae5cb37da254f732d4714c40b44b69 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Dec 10 10:27:02 2020 -0800 Clarify "not Interrupt-capable" error message (#20419) commit 9f740d18720d9a57486704e9ee969544f53dd251 Author: Victor Oliveira Date: Wed Dec 9 18:43:49 2020 -0300 MKS Robin Pins fixes for STM32 and STM32F1 (#20404) Co-authored-by: Scott Lahteine commit 70d393b5cd557fb8c8d314ffa5c73c62da923791 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Wed Dec 9 12:07:26 2020 -0500 Move ExtUI ABL mesh edit, limit to bilinear (#20381) * Move ExtUI call Co-authored-by: Scott Lahteine Co-authored-by: Victor Mateus Oliveira Co-authored-by: Sebastiaan Dammann commit f193cda03b1e70205406a8fea70f7345fd886c69 Author: Marcio T Date: Wed Dec 9 04:09:31 2020 -0700 Fixes and additions to FTDI EVE Touch UI (#20393) - Fixed name conflict with "SUBSCRIPT_TWO" - Fixed rendering bugs in "Leveling Menu" - Only show "Bed Mesh Screen" when UBL is enabled - Removed CocoaPress code from generic "Main Menu" - Removed CocoaPress code from LulzBot Bio "Status" screen - Moved generic "Move Axis" functionality into a base class - Added CocoaPress custom screens: - Status Screen - Unload Cartridge - Load Chocolate - Main Menu - Advanced Settings - XYZ Move (based on "Move Axis" base class) - Extrusion Move (based on "Move Axis" base class) - CocoaPress tweaks to "Temperature" screen - Fix FTDI EVE Touch UI compilation errors when not using leveling. commit e3e9982fec759e8cf13f8ac558723f63a43cead3 Author: Mike La Spina Date: Wed Dec 9 04:29:33 2020 -0600 Fix Spindle/Laser Control menu (#20347) commit 4ca3c0bc8634e68f47b96173bde83c0c08f95820 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Wed Dec 9 10:06:50 2020 +0100 Allow positive Z nozzle to probe offset (#20344) * Allow a positive value for z offset from nozzle to probe without sanity checks * Simplify menu_probe_offset.cpp (HOMING_Z_WITH_PROBE) * Add some more explanation to Configuration Files * Raise after probe_at_point as if homed Co-authored-by: Scott Lahteine Co-authored-by: Jason Smith commit 38bb3b86d2a0a5570736cb78930a429c9051217e Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Dec 8 22:12:42 2020 -0800 Clarify Delta & SCARA config location (#20403) commit ad7fe15154c370337ab49c91ef0e6c6f2686c08c Author: Scott Lahteine Date: Tue Dec 8 20:17:55 2020 -0600 Style, spacing, typo cleanup for recent changes commit 91e959955410e7de604c81dca73913b55459c2dd Author: Victor Oliveira Date: Tue Dec 8 02:26:39 2020 -0300 SPI TFT for STM32F4 boards (#20384) * fix pinsDebug for F1 boards * add MKS Robin PRO V2 board - development board * tft spi working with F4 boards * pins formating * sanity check for TFT on supported cores in STM32 * Fix tabs/spaces in pins file Co-authored-by: Jason Smith commit 47fd7fcaeaae38cdf97532ee9fea81095f338552 Author: ellensp Date: Tue Dec 8 09:57:00 2020 +1300 Allow BTT EXP-MOT be used with Displays that needs only EXP 1 (#20396) Co-authored-by: ellensp Co-authored-by: Victor Mateus Oliveira commit 50247fc89476fa9608444c422e8f25c6bdd9b503 Author: ellensp Date: Tue Dec 8 09:53:53 2020 +1300 Shorten Filament Load/Unload Strings to Fit on Graphical Displays (#20369) Co-authored-by: ellensp Co-authored-by: Victor Mateus Oliveira commit 37dd0fd2d64c9b8e7c4b2af2109caa72e33b03ce Author: Scott Lahteine Date: Mon Dec 7 05:53:15 2020 -0600 Fix auto#.g file handling, add NO_SD_AUTOSTART (#20071) commit 1932e70e723d3200cdf8564bf658938106ffdd8a Author: Scott Lahteine Date: Mon Dec 7 05:06:09 2020 -0600 More LPC P-string macros commit ea81790d486985c19f0ae5ffcd3a9453980eac35 Author: Scott Lahteine Date: Mon Dec 7 04:04:38 2020 -0600 Watch idle() depth over 5 commit 2384e5c9c9df27fe27732b6f0392b603a8933e9a Author: Scott Lahteine Date: Mon Dec 7 04:36:22 2020 -0600 Fix fileExists, use openFailed commit 72eda1d3ae64c48eb0a3098caeab35b6b192b333 Author: Victor Oliveira Date: Sun Dec 6 17:36:36 2020 -0300 Avoid invalid memory optimizations (#20389) When building for AVR, merge-all-constants can incorrectly combine constants stored in flash with constants stored in RAM. These have different access requirements, leading to undefined behavior during execution. Co-authored-by: ellensp commit 3a73f04fd3e5d4561859f308f3ae6c1127739fb7 Author: Scott Lahteine Date: Sat Dec 5 23:05:03 2020 -0600 G28 followup commit 107834f899eddcfe263b0698077ab392aa865a35 Author: Scott Lahteine Date: Sat Dec 5 19:14:15 2020 -0600 G28 tweaks commit b6cd7aaf1789a23558af73caaea9165eba3527b4 Author: Scott Lahteine Date: Sat Dec 5 19:25:34 2020 -0600 Fix STM32F1 SERIAL_GET_TX_BUFFER_FREE commit 4b6fa1b54d13eed0c40b1594ed97a229b79b4f98 Author: Scott Lahteine Date: Sat Dec 5 19:57:50 2020 -0600 Move G29 3-point startup earlier commit 284cc8f62d64bf08b737da07225689ced8b88385 Author: Scott Lahteine Date: Thu Nov 5 16:45:22 2020 -0600 ExtUI homing / leveling additions commit ef35fc60c1d59fbf929eceddb669ef93bac13318 Author: Scott Lahteine Date: Sat Dec 5 18:21:56 2020 -0600 Use 'nearby' for 'near' commit ec2843bcf3fa944817f5faff0fb752923f5e622a Author: Scott Lahteine Date: Sat Dec 5 18:18:28 2020 -0600 Creality 4.5.2 format and fix commit 8a18bb844011db5631e633e9a56b85bbbb10c7aa Author: LinFor Date: Sun Dec 6 03:19:17 2020 +0300 Fix FYSETC S6 I2C EEPROM size (#20340) Both V1.2 and V2.0 boards have a 24LC16, which is a 2kB EEPROM. Co-authored-by: PingWin Co-authored-by: Jason Smith commit 21b15a0a09891498fa4602806d6dccdd87dfc0af Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat Dec 5 15:23:58 2020 -0600 Add Creality 4.5.2 board (#20378) Co-authored-by: Jason Smith commit c400c54b86d8f55850518dac12f748e62f795db4 Author: Jason Smith Date: Fri Dec 4 22:02:58 2020 -0800 Suspend Servos for STM32+NeoPixel (#19963) commit 1a618b1b312802039622784c418666a88b6403c5 Author: Jason Smith Date: Fri Dec 4 21:58:39 2020 -0800 Fix TMC_HOME_PHASE divide by zero (#20368) commit a09d096b876556b0793782e87c1e942c6e97b499 Author: Scott Lahteine Date: Fri Dec 4 23:56:20 2020 -0600 Improved Longer3D LKx Pro board (#20372) Co-authored-by: mrv96 commit c88a7935d6a57d6eafbfcd2da9f6d09a87e5e363 Author: Tanguy Pruvot Date: Sat Dec 5 05:29:55 2020 +0100 Don’t use near keyword as variable name (#20374) commit 43bbf04764e03a355fddd08c6e379167fa3ea41c Author: Belin Fieldson Date: Fri Dec 4 03:49:30 2020 -0700 Loosen E on pause for fila-manipulation (#20346) Co-authored-by: Scott Lahteine commit 10b8737c7dec74e5688bd60197cfbb85e5213d68 Author: Jason Smith Date: Thu Dec 3 19:33:46 2020 -0800 Fix MESH_BED_LEVELING w/o SEGMENT_LEVELED_MOVES (#20363) commit dab29dddc34b3cc74cdf83d0ebb6ca2503194340 Author: Victor Oliveira Date: Thu Dec 3 14:23:48 2020 -0300 Require minimum PlatformIO version (#20361) Co-authored-by: Scott Lahteine Co-authored-by: Jason Smith commit 20ea00e7f61202d520d2897dff7fa8549cb1ab73 Author: Scott Lahteine Date: Thu Dec 3 05:52:39 2020 -0600 Consolidate common pin includes commit 6a8ab8f1e6141d3e6e24ef5c1431e833324301db Author: ellensp Date: Thu Dec 3 23:44:33 2020 +1300 Fix up start, monitor baud (#20326) commit eba293771588e13c668bcb56da29c17a06fae72b Author: yysh12 Date: Thu Dec 3 04:40:39 2020 -0600 Fix circle arc condition (#20322) commit 07954edadc198e6603b9714e5349da94e30de2b0 Author: Jason Smith Date: Wed Dec 2 03:23:34 2020 -0800 Permit SD EEPROM emulation on E3V2 (#20353) commit 1c695e130e7ae8893511041f51d6189fc657dc65 Author: Jason Smith Date: Wed Dec 2 01:31:06 2020 -0800 Fix E3V2 DWIN Jerk Menu (#20352) * Fix E3V2 DWIN build without CLASSIC_JERK * Fix jerk edits applying to wrong index commit f42d15437b7037709d22c95ee00ce7e9ed38bb3b Author: Luu Lac <45380455+shitcreek@users.noreply.github.com> Date: Tue Dec 1 23:52:09 2020 -0600 Help hosts when password-locked (#20348) commit 564e2e865c88ebe1751e36d807594f16689549f4 Author: Mathias Rasmussen Date: Wed Dec 2 06:51:04 2020 +0100 Update to STM32 v10, optimize build (#20325) commit c76f1794872a312d58ec5a9dae3999681241c854 Author: Scott Lahteine Date: Tue Dec 1 21:53:23 2020 -0600 Level Bed Corners is a sub-menu commit 29a962320c3fab8dee7bf6b36b5b0841c78288e8 Author: Scott Lahteine Date: Tue Dec 1 16:14:30 2020 -0600 Tweak to EEPROM safe delay commit e927ef94a66a17ceae611fd8b3b2787531308958 Author: Jason Smith Date: Tue Dec 1 00:29:21 2020 -0800 Fix E3V2 Control Menu when returning from Info (#20338) commit f929123a7b10e8bfcaafdc09f7a3368cb2e41bdb Author: Jason Smith Date: Mon Nov 30 22:25:44 2020 -0800 Prevent Watchdog reset writing Creality 4.x EEPROM (#20328) commit d34bbee30431b4ae3b243706e69df6d14cbc0d2b Author: Jason Smith Date: Mon Nov 30 04:44:34 2020 -0800 Increase E3V2 DWIN steps/mm range to 999.9 (#20324) commit 74c509d36e796d1459361f031a47e9fbf9980ef4 Author: Scott Lahteine Date: Sun Nov 29 20:49:42 2020 -0600 General cleanup commit 448cf2c3574ad5f406355a7b2f75a509ee0a92ba Author: Scott Lahteine Date: Sun Nov 29 19:06:40 2020 -0600 Adjust axis homed / trusted methods (#20323) commit f22b677906a4c410de39060136f344ac2ba0fe06 Author: Jason Smith Date: Sun Nov 29 13:00:08 2020 -0800 Leveling Fade Height default setting (#20316) commit 272265c6364913b7797045a0cd01a83563873c7a Author: Jason Smith Date: Sun Nov 29 12:57:05 2020 -0800 Fix STM32F1 'freeMemory()' warnings (#20319) commit a8ba3c4e2ef3d4f521009181aef59166d36c9a40 Author: Alexander D. Kanevskiy Date: Sun Nov 29 22:55:18 2020 +0200 SKR E3 Turbo Controller Fan (#20320) commit 523bc7d355c2a288100b086bfb2b8067cc42e6d5 Author: yysh12 Date: Sun Nov 29 14:50:54 2020 -0600 Arc Direction followup for circles (#20314) commit 1dd17d857ed5ba7f07a55115484d1143ebec3c39 Author: Thomas Niccolo Reyes Date: Sat Nov 28 05:26:19 2020 +0800 Fix M73 LCD code typo (#20300) commit a54b07d3aeb44fefd231923e99459de410457b09 Author: Sergey1560 <53866542+Sergey1560@users.noreply.github.com> Date: Fri Nov 27 09:00:25 2020 +0300 Group related homing options (#20283) Co-authored-by: Scott Lahteine commit f63a7b978d3602d214c7396df6f46c4c41187668 Author: yysh12 Date: Thu Nov 26 23:29:07 2020 -0600 Fix G2/G3 arcs > 180° (#20292) commit 04483dd30756c566652a2b5a0fd45c535dedac8c Author: ellensp Date: Fri Nov 27 17:50:21 2020 +1300 Fix BTT GTR 1.0 endstop/DIAG pins (#20296) commit 3c5c36de50ddba782161b8a246821505db4801b6 Author: BsCmOD <64871957+BsCmOD@users.noreply.github.com> Date: Fri Nov 27 04:25:18 2020 +0100 FIX TMC menu message (#20294) commit deb8df8efff82aa010b82b40d78eda615ffb6c0b Author: Scott Lahteine Date: Thu Nov 26 21:18:40 2020 -0600 M808 Repeat Markers (#20084) commit 3231741cd2f55c9b18acd37353d46c364a0ebf4d Author: Štěpán Dalecký <36531759+daleckystepan@users.noreply.github.com> Date: Thu Nov 26 22:21:48 2020 +0100 [WIP] Fix Probe::offset_xy (#20290) Co-authored-by: Jason Smith commit 747bde7e648ddd7cf8404b5d7ce551804a4dc9e6 Author: wmariz <11435639+wmariz@users.noreply.github.com> Date: Thu Nov 26 10:58:19 2020 -0300 Level Corners with Probe option (#20241) commit 7c9c897dac11287cbb7fc702030d233610b07274 Author: Scott Lahteine Date: Wed Nov 25 22:28:42 2020 -0600 Optimize emergency parser check commit fc1deea2b86f433449700d4919f5c4c95e810e81 Author: Scott Lahteine Date: Wed Nov 25 23:36:22 2020 -0600 No auto debug for EEPROM_CHITCHAT commit 7421282d9a3209c8ccd68f20e2726cad5729b8b6 Author: Scott Lahteine Date: Thu Nov 26 03:47:07 2020 -0600 Finish HAL/STM32 cpp wrappers commit 9d5a391b547bc39161b5a1060068b4819aa3f8f5 Author: mks-viva <1224833100@qq.com> Date: Thu Nov 26 16:36:29 2020 +0800 MKS Robin E3 / E3D v1.1 (#20216) commit 6ec6d1d39d61a57c4a85ded4b6a7a23738f61b2c Author: Scott Lahteine Date: Thu Nov 26 01:08:12 2020 -0600 Tweak some pin errors commit e2c57f6d47b3a871ea09cf82a50bf8d6c333183e Author: Jason Smith Date: Wed Nov 25 22:37:18 2020 -0800 Retire HAL for STM32F4 / F7 (#20153) commit 664e9d6dfe6cec01c5e125f78ecd3df7b0143fb0 Author: Scott Lahteine Date: Wed Nov 25 21:40:56 2020 -0600 Reduce warnings, extern "C" cleanup (#20279) commit 0c24347cdb95ba571c0038fd76decf039ac43d67 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Thu Nov 26 04:38:00 2020 +0100 Probe Offset Wizard improvements (#20239) commit c86ede8cfb8012fdb35cb995e4ccd7d35e71ea8c Author: Victor Oliveira Date: Wed Nov 25 02:39:49 2020 -0300 Fix COLOR_UI without TOUCH_SCREEN_CALIBRATION (#20269) commit 38a62f0d5b0a1c27128e7338a4f850d441fba106 Author: Victor Oliveira Date: Wed Nov 25 01:08:35 2020 -0300 add missing header to use HAS_SD_HOST_DRIVE (#20270) commit 27b2e2d3e7a62ff74d50e62055807723c3d093e6 Author: Scott Lahteine Date: Tue Nov 24 18:29:11 2020 -0600 Update TOUCH_UI_LULZBOT_BIO wrappers commit 4e940ffcc21d63bfa5ffa16c900b2d16ff3a6210 Author: Scott Lahteine Date: Tue Nov 24 17:53:26 2020 -0600 Cosmetic G29 ABL tweak commit 109c08e9e5ae89c4f878b53902ee98c817c62333 Author: Scott Lahteine Date: Tue Nov 24 17:38:13 2020 -0600 Consistent Probe XY offset type commit 03cdfafc2ad5a7f12dca7829e173ecb65d2e0112 Author: Jason Smith Date: Tue Nov 24 14:27:59 2020 -0800 No Z_MULTI_ENDSTOPS when HOMING_Z_WITH_PROBE (#20254) commit 6cca5a9f9252f6b23cc53a968164ab0987893dc3 Author: pseudex Date: Tue Nov 24 23:20:06 2020 +0100 Allow cold Filament Load/Unload with M302 P1 (#20262) Co-authored-by: Scott Lahteine commit 629f0e21c946a4c36e5754ba4fc2186283b2fc2d Author: ellensp Date: Wed Nov 25 11:14:22 2020 +1300 Set "lcd_move_e" index to fix the label (#20263) commit a711e22b1784cd5ed2100be7b948b90925569cc8 Author: rdhoggattjr <64983896+rdhoggattjr@users.noreply.github.com> Date: Mon Nov 23 23:02:54 2020 -0600 LCD position in current units (#20145) commit 82663c7d114b89d90e3a28cc03ed3a52faa096f2 Author: Jason Smith Date: Mon Nov 23 03:07:43 2020 -0800 Fix Z4 in ENABLE/DISABLE_AXIS_Z (#20256) This was accidentally broken in PR #20218 commit 8cd25f35c25a31efd54255af102b4104e880dadb Author: Jason Smith Date: Sun Nov 22 16:47:52 2020 -0800 Fix dummy thermistors for Bed, Chamber, Probe (#20247) commit 300a944af6c2aa325a41fa19f2bff44ee7bccb66 Author: Scott Lahteine Date: Sun Nov 22 18:44:17 2020 -0600 Allow Status Message without LCD (#20246) commit 5e57e60692ec6760532650dbf008290aac3021d5 Author: Jason Smith Date: Sun Nov 22 16:20:33 2020 -0800 Fix UBL manual mesh adjust behavior (#20248) commit 28cd6eca888172de9fdef0a7c2cfec4da8f1e9d5 Author: Scott Lahteine Date: Sat Nov 21 23:00:17 2020 -0600 Hide docker droppings commit 82c1bac4e36f485830bd1f715f80203904857d5f Author: Scott Lahteine Date: Sun Nov 1 20:30:58 2020 -0600 Move core conditionals earlier commit 08717ef11721c6f37349af3c6ca6cc6802d9d3ec Author: Scott Lahteine Date: Sat Nov 21 22:32:56 2020 -0600 Put "$3" on all tests commit 56c0608e4dc850857983317a551a2b8a7a8fd40e Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sun Nov 22 01:21:43 2020 +0100 Clear menu history for browse media on insert (#20236) Co-authored-by: Scott Lahteine commit 9c9fd8714e936f42cc085f0c49d25b8f8c782bb5 Author: Kurt Haenen Date: Sun Nov 22 00:56:56 2020 +0100 Proper pullup/pulldown configurability (#20242) Co-authored-by: Scott Lahteine commit 69b61fef671d29ac6e27e4484f4e5b614b2c29f5 Author: Victor Oliveira Date: Sat Nov 21 20:16:03 2020 -0300 Fix Load Filament wait (#20243) commit add6b836dfadcd51b3bdaa77861e5bb48fc2a6c5 Author: Orel <37673727+0r31@users.noreply.github.com> Date: Sat Nov 21 23:27:06 2020 +0100 Skip unnecessary (costly) SW Stepper Enable (#20218) Co-authored-by: Jason Smith Co-authored-by: Scott Lahteine commit a95a41ef7376cd1252ffcba7819d36ad94d3c8f1 Author: Gurmeet Athwal Date: Sat Nov 21 13:17:04 2020 +0530 BTN_ENC_EN for many boards (#19890) Enables CHECK_ENCODER_ACTIVE_SIGNAL for many more boards. Co-authored-by: Scott Lahteine Co-authored-by: Jason Smith commit f3805edbd69a9ef53b1fdcfa37dbd5f66e44c053 Author: Scott Lahteine Date: Fri Nov 20 21:25:51 2020 -0600 Power-Loss cleanup commit 7f91ff07c4c29cd82ad7bb28c5245b04235adfbd Author: Simone Primarosa Date: Sat Nov 21 03:36:19 2020 +0100 Superscript substitution (#20219) Co-authored-by: Scott Lahteine commit d5e13f255d8b8d6af6c241c82bedc14aa88de01d Author: Simone Primarosa Date: Sat Nov 21 02:53:04 2020 +0100 Fix bad SET_FAST_PWM_FREQ calls (#20227) commit 9ebe05064686d7d4f444c642920ea30ca5ce81f4 Author: Kurt Haenen Date: Sat Nov 21 02:48:53 2020 +0100 Fix backward Filament (Presence) Sensor pulls (#20228) Co-authored-by: Kurt Haenen Co-authored-by: Scott Lahteine commit 7f84a7a85e48307c72198d7574b59f760abf5d8b Author: Scott Lahteine Date: Fri Nov 20 17:41:01 2020 -0600 Printrboard labels commit 264e921d3f87ec8c9407e0ce73869c55561ba213 Author: Victor Oliveira Date: Fri Nov 20 10:46:18 2020 -0300 SINGLE_TOUCH_NAVIGATION Follow Up (#20213) commit 7ad127668dcd15fad58384f6f0d8c92d2a3c3013 Author: Victor Oliveira Date: Thu Nov 19 23:09:33 2020 -0300 Missing header to use suicide() on LVGL UI (#20214) commit 35d3e74267a3916328524599a07b177471e386b7 Author: Ajtak Date: Fri Nov 20 01:25:27 2020 +0100 Longer LK Pro / Alfawise PRO board (#20185) commit 2abde8a068ff74227eb10ea137a5e4febec77f25 Author: Orel <37673727+0r31@users.noreply.github.com> Date: Fri Nov 20 01:08:21 2020 +0100 Fix DAC setDrvPct (#20205) commit afd3ee264bdef29bd67a4be2648c5fe0f71b3184 Author: Vitaliy Date: Fri Nov 20 04:49:12 2020 +0500 Windows LPC Upload for non-admins (#20208) Co-authored-by: Victor Mateus Oliveira Co-authored-by: Scott Lahteine commit 2e193b9a29d4fcf20abeee83fb332f199a6fe7bf Author: Scott Lahteine Date: Thu Nov 19 17:41:16 2020 -0600 Fix Z label commit 48c2065a17acf3d8a1843edda6dafa48c8a74c86 Author: Scott Lahteine Date: Thu Nov 19 17:37:43 2020 -0600 MKS WiFi strings commit 7729a0c3bb43951d136946cd74c778d5f926ae3e Author: Scott Lahteine Date: Thu Nov 19 17:28:45 2020 -0600 More MKS WiFi commit f1b32b808fb7349c32d0a3ea84acdd9275985669 Author: Scott Lahteine Date: Thu Nov 19 15:51:53 2020 -0600 MKS WiFi preliminary changes commit 5ef1d053eb1db92c8f245efe900f677851c4ad7e Author: Till Date: Thu Nov 19 21:07:47 2020 +0100 Add Thermistor 20-21 notes (#19246) commit 0264841dc44abbe536409a1f298904de0d6976fa Author: Victor Oliveira Date: Thu Nov 19 16:47:49 2020 -0300 Reduce RAM usage for TFT Color UI on SGen-L V2 (#20209) commit 40071c3fb9e299e389115636bfcd3b81650433df Author: Maciej Rutkowski Date: Thu Nov 19 11:49:44 2020 +0100 Fix GTR NeoPixel pin with FYSETC Mini12864 (#20203) commit d92f69f137eec0efe794a747b7fe076359bbc13d Author: ellensp Date: Thu Nov 19 19:09:51 2020 +1300 Remaining Time followup (#20199) commit 15febdfe074e8b60a8650ce57fce327c4997371e Author: Victor Oliveira Date: Thu Nov 19 03:05:05 2020 -0300 Fix Filament Change menu item labels (#20201) commit 1040f14da41003beee687317c3ad90c39c869b8a Author: Victor Oliveira Date: Thu Nov 19 02:32:33 2020 -0300 Abort print on media removal (#20200) commit 11f08804d16ad0747afa87aa701e0b0e706406de Author: JoAnn Manges Date: Wed Nov 18 21:12:03 2020 -0800 Use RTD for MAX31865 reading (#20188) commit 29d45b1144ad93cac238d2a638b4dae5e3426e98 Author: bosd Date: Thu Nov 19 02:32:52 2020 +0100 Fix broken #include (#20193) commit bd38e59479c17d3e7c385d9c32c62303ab74c6cc Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Wed Nov 18 08:27:21 2020 +0100 SMUFF (MMU2 clone) support (#19912) commit b6d2671260aed4cb52d57d8dddf24e487c6bcdee Author: Scott Lahteine Date: Wed Nov 18 00:13:17 2020 -0600 USB Media Host followup Restore HAS_SHARED_MEDIA commit 5f9ccb361aaa74de15d4408b154f2d6511877444 Author: Jason Smith Date: Tue Nov 17 21:59:48 2020 -0800 Use MANUAL_PROBE_START_Z for UBL manual probing (#20160) commit ef51bd16dc8e4b28ea048b333e6de65d506cc273 Author: Philippe Cayrol <58492957+phcay@users.noreply.github.com> Date: Wed Nov 18 06:56:51 2020 +0100 Better edit range for Linear Advance K (#20155) commit 125ad2003d141778100ebb26f9785488af9546b6 Author: Thomas Niccolo Reyes Date: Wed Nov 18 13:49:56 2020 +0800 Remaining Time for Prusa-style LCD layout (#20148) Co-authored-by: Scott Lahteine commit ccac37613b6f541bc93ee62acb3b1c2022db3bcb Author: Victor Oliveira Date: Wed Nov 18 02:48:14 2020 -0300 Improve USB Media Host conditions (#20176) Co-authored-by: Scott Lahteine commit 292e83466e356ae4a21bd5c85745535d50e332f6 Author: Foxies Date: Wed Nov 18 05:32:34 2020 +0100 FLSun Hispeedv1 Board update (#19959) Co-authored-by: Scott Lahteine commit 172cc0dd03c796e08651e8df755e0fad2a3f3856 Author: Thomas Niccolo Reyes Date: Wed Nov 18 12:30:32 2020 +0800 Open File Browser on Media Insert (option) (#20151) Co-authored-by: Scott Lahteine commit 26d3caf97c5cf97f75758b975f3a6d4333142970 Author: wmariz <11435639+wmariz@users.noreply.github.com> Date: Wed Nov 18 00:54:21 2020 -0300 Probe Wizard XY position (#20167) commit 7848096acbfdbc5e5da97eceeccf86ea388038d5 Author: Jason Smith Date: Tue Nov 17 19:11:13 2020 -0800 Fix NAN mesh entries with ABL_BILINEAR_SUBDIVISION (#20143) commit 18869c666f6820338bfb95d38c96bee634602db2 Author: Victor Oliveira Date: Tue Nov 17 23:07:34 2020 -0300 COLOR_UI without TOUCH_SCREEN 👍🏻 (#20178) commit 1c81a126c5a8a7f12efabca40ed4278477eb2db2 Author: Costas Basdekis Date: Wed Nov 18 02:04:28 2020 +0000 Local testing via Makefile & Docker (#19981) commit 180fe914b61d111449d4af3836d5498d6b2e0ff4 Author: Victor Oliveira Date: Tue Nov 17 21:44:53 2020 -0300 Prevent #div0 error (#20183) commit dc644df9bcca737a95cfd68281ce3e74e25c2ee4 Author: Victor Oliveira Date: Tue Nov 17 17:32:30 2020 -0300 Reduce RAM usage for TFT Color UI on SGen-L (#20179) commit 550306d1b67e66dea37f460f725202f75f0e1f89 Author: Roman Moravčík Date: Tue Nov 17 21:30:06 2020 +0100 Update Slovak language (#20181) commit 78eb12958a6a6d0e86b95d2c6c50b821806173e7 Author: 石立枫 <49380822+FLYmaker@users.noreply.github.com> Date: Tue Nov 17 19:35:02 2020 +0800 Add FLY_CDY board (#19979) Co-authored-by: FLYmaker Co-authored-by: Scott Lahteine Co-authored-by: Scott Lahteine Co-authored-by: Jason Smith commit cc9df782ceaed830acd7e105a628ab3523b22516 Author: ellensp Date: Tue Nov 17 21:45:43 2020 +1300 add ethernet to src filter (#20136) Co-authored-by: ellensp commit 562c41af4edde5c69b3ac0ed08eb1e96aa31c946 Author: Victor Oliveira Date: Tue Nov 17 05:45:01 2020 -0300 Use intptr types (simulator) (#20142) commit b5e7b8e29ed94ac6e3649c592a894fe12e354652 Author: Jason Smith Date: Tue Nov 17 00:40:37 2020 -0800 Allow overriding servo pin for MKS Robin Mini (#20158) commit 2979504b9ca00286aceb0614befd952e0724c80b Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Nov 17 00:37:37 2020 -0800 Multi-Hotend Preheat Fixes (#20165) * Return to Status Screen on Multi-Hotend Preheat All Co-authored-by: Victor Oliveira <81722+rhapsodv@users.noreply.github.com> commit a01fab662c7ac908c002c2a56d1166502a012114 Author: Jason Smith Date: Mon Nov 16 12:56:59 2020 -0800 Allow dummy thermistors without pin definitions (#20159) commit daa2a04fc9ca7abed3a58306b2627f84a89ddbbc Author: FanDjango <51046875+FanDjango@users.noreply.github.com> Date: Mon Nov 16 21:56:05 2020 +0100 Guards for large BLOCK_BUFFER_SIZE (>=128) (#20130) Co-authored-by: Scott Lahteine commit 983bb8906339e1d5ae2892b1ff63922ab8bb51b5 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Mon Nov 16 00:56:05 2020 -0500 Update IDEX menus, add post-M605 event G-code (#20133) Co-authored-by: Scott Lahteine commit 3d9b45300061ac748cc15fc95e748f8df1b792d6 Author: Victor Oliveira Date: Sun Nov 15 19:39:58 2020 -0300 Add Touch Calibration screen (#20049) commit 90f647b6be031c55773d22bebf93b6c80aae3a5e Author: Scott Lahteine Date: Sat Nov 14 18:27:16 2020 -0600 Fix some LCD/serial strings commit 7f7c27be305a7fd658e61124d23383b8e2f18a66 Author: Scott Lahteine Date: Sat Nov 14 18:09:17 2020 -0600 Add parser.is_command(letter, code) commit 2b63a1b4e1daafd8743735eea3152da5ee3551ab Author: Minims Date: Sat Nov 14 03:13:36 2020 +0100 BTT Motor Expansion for SKR Pro (#20123) commit 90f3d1f7a6d06eefa17aef2eadc70b6f2f721d4c Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Nov 13 18:10:50 2020 -0800 UTF Filenames followup (#20135) commit 65a5eb47b3fdf93643181a29ec4098d4817976fe Author: phcay <58492957+phcay@users.noreply.github.com> Date: Sat Nov 14 02:24:08 2020 +0100 Fix extraneous Linear Advance DIR change (#20131) commit 6b5ddfe235c4bbbc454a2c52dcf154e774bd0f4c Author: Luu Lac <45380455+shitcreek@users.noreply.github.com> Date: Fri Nov 13 18:48:59 2020 -0600 Fix "autotune" LCD message (#20127) commit 2f57b1d5294779bffcef726b2b77bf4990479064 Author: Scott Lahteine Date: Fri Nov 13 18:47:34 2020 -0600 Optimize M360 commit 7e535022ab6ba90ae8ad042493cc518166c521ee Author: Scott Lahteine Date: Fri Nov 13 18:27:31 2020 -0600 Fix compile warnings, serial alias commit cb1d2de838f9c13679b4e297e22b068a3b8da272 Author: Scott Lahteine Date: Fri Nov 13 18:28:06 2020 -0600 .gitignore for native / simulation commit 96acbb250610d7f7fd98b8930ea13df9e718b10d Author: Scott Lahteine Date: Fri Nov 13 00:45:26 2020 -0600 LCD_FIRST_TOOL status bitmaps commit 030f745b088c43e7ef09041e830a2b7fc7657cc2 Author: Gonçalo Pereira Date: Fri Nov 13 07:23:05 2020 +0000 Typo in MMU2 serial protocol description (#19949) commit dc949f5488b696cd9dc0e57a316c125eb385b9f3 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Thu Nov 12 23:54:18 2020 -0500 G34 Z stepper locking (#20091) Co-authored-by: Scott Lahteine commit 7b745345f732e05855d15552b811954de3d03f7f Author: LinFor Date: Fri Nov 13 07:49:19 2020 +0300 Fix UTF filename scroll (#20121) Co-authored-by: Scott Lahteine commit 3ee61e2084ce589481830f1dbbfc9c1627bddfe9 Author: Jason Smith Date: Thu Nov 12 20:26:49 2020 -0800 UTF longname followup (#20115) commit 26a1cd9a00cd532c5a61655d59af17d61a1951de Author: Scott Lahteine Date: Wed Nov 11 16:58:09 2020 -0600 Terse sanity messages commit 27c74d2f7294030f702d2ea023110a9072a70e06 Author: Scott Lahteine Date: Wed Nov 11 16:58:34 2020 -0600 Add HOME_Z_FIRST option (#20113) commit a5ee22baa25cb994b02b203de9996da4f452c524 Author: LinFor Date: Thu Nov 12 01:27:45 2020 +0300 Fix MAX6675 SPI init, conflicts (#20086) commit 02c3c314fece3cc0e8b5b4f9b9fd6cf3573ae53f Author: JoAnn Manges Date: Wed Nov 11 16:52:35 2020 -0500 Fix MAX31865 on SPI (PT100/1000) support (#20074) commit 012745b218578051a7a4e841d1b84f13ef13a38f Author: Hebezo Date: Wed Nov 11 22:16:19 2020 +0100 Option to ignore SD at startup (#20099) Co-authored-by: Scott Lahteine commit d4b86322a97348619d6289b2c7980f1c9fbe2a89 Author: Scott Lahteine Date: Wed Nov 11 14:39:12 2020 -0600 M32 followup commit ac74786c2be127d9ab77e1f556f3847c07c74335 Author: ellensp Date: Thu Nov 12 09:35:13 2020 +1300 Fix compile with PLR, no fan (#20096) commit cf43c9901fdb4e4e30b95a8fb537215a3353738e Author: Davidsg33k Date: Wed Nov 11 13:30:36 2020 -0700 400 Z steps-per-mm (#20104) commit 3030bf4274313d8b9724b0a8f2c920dfe1f08bf4 Author: LinFor Date: Wed Nov 11 23:14:39 2020 +0300 Handle UTF in long filenames (#20087) Co-authored-by: Scott Lahteine commit dc144fb9101969b56c5a149193fc22ad29b34f00 Author: Costas Basdekis Date: Wed Nov 11 06:39:23 2020 +0000 Distinct runout states (#19965) Co-authored-by: Scott Lahteine commit 45b242d5f78a7f19d0462f359c703ac4eb06be5c Author: Costas Basdekis Date: Wed Nov 11 02:13:29 2020 +0000 Fix Linux GPIO logging (#20093) Co-authored-by: Scott Lahteine commit 42b37da1e77b1776f07a55745605e7d920739bcf Author: ellensp Date: Wed Nov 11 15:06:42 2020 +1300 BTT driver expansion for SKR 1.3/1.4 (#20088) Co-authored-by: Scott Lahteine commit 8eb5950ebd51faf00fff438ef0b5557a55fd8d02 Author: Speaka <48431623+Speaka@users.noreply.github.com> Date: Wed Nov 11 02:41:21 2020 +0100 Tramming Wizard wait position (#20063) commit ccb5e3405262cb582882288872bf8ec8857b84c4 Author: Victor Oliveira Date: Tue Nov 10 22:39:34 2020 -0300 Fix UI compile issues (#20092) commit ee48fc6544bcf916bd1c4ac24831648b33835194 Author: Jason Smith Date: Tue Nov 10 01:32:08 2020 -0800 Fix Arduino DUE compilation (#20058) commit 2365df532f45070bc5cd4af01b5d11c606d8287f Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Tue Nov 10 10:27:34 2020 +0100 What if 8 was 9? (#20076) commit 24c2ce6a87d6b95216ab43ef3edc2b95f630ca70 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Tue Nov 10 10:26:45 2020 +0100 Update issues/support link (#20077) Co-authored-by: Scott Lahteine commit 791fba3187330693ab133b099692561e0310d775 Author: Gustavo Alvarez <462213+sl1pkn07@users.noreply.github.com> Date: Tue Nov 10 10:22:08 2020 +0100 Fix SKR E3 DIP pin CLCD_SPI_CS (#20078) commit 367c447ff82a5faf836a7c7da81e7c662b21596f Author: Tanguy Pruvot Date: Tue Nov 10 10:21:05 2020 +0100 Fix 320x240 touch buttons Y (#20079) commit ca730314e7fdd332f5879b5629f4f56d5be65e28 Author: Scott Lahteine Date: Mon Nov 9 18:53:19 2020 -0600 Ability to disable M32 commit b2d6b8c5671ec55fff7aa12da71b23fda772b8b7 Author: Scott Lahteine Date: Mon Nov 9 01:17:37 2020 -0600 Simplified temp sensor conditionals commit 170ba87648f3c81fc9828a497b39db26f04f6d56 Author: Hebezo Date: Mon Nov 9 01:37:41 2020 +0100 Add POWER_OFF_DELAY option (#19987) Co-authored-by: Scott Lahteine commit 44f689320bf98c3a134ca49a640a99c75fe43674 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Mon Nov 9 01:31:14 2020 +0100 Use extra G35 BLTouch HS Mode clearance in Tramming Wizard (#20057) Co-authored-by: Scott Lahteine commit 7da62cc9f7a37641d163edc9d6c21ed1a4780786 Author: Alexander D. Kanevskiy Date: Sun Nov 8 10:20:07 2020 +0200 POWER_LOSS_PIN for BTT SKR mini MZ / E3 2.0 (#20069) commit 841f0d57781388b189de1018d8d78b79dc32b6cb Author: Jason Smith Date: Sun Nov 8 00:15:30 2020 -0800 Fix tool-change servo index for E2 and up (#20060) commit 367e717aebd68d55b528bd1927b73017ed20f6a9 Author: Scott Lahteine Date: Sat Nov 7 18:28:29 2020 -0600 Add alternative TERN macros commit 5bf82b34c6b3b22ca8530115f48db4c91518eb71 Author: Scott Lahteine Date: Sat Nov 7 17:55:31 2020 -0600 Temperature 'autostart' => 'auto_job' commit 734dd1c293ee78a44c59e582fbd8583335f5bf0c Author: Scott Lahteine Date: Sat Nov 7 17:43:47 2020 -0600 MSG_AUTOSTART => MSG_RUN_AUTO_FILES commit 4052ef709758216c63a4044cfd01201e7948010c Author: Albert van Osch Date: Sat Nov 7 23:59:19 2020 +0100 Zonestar Z8 XM2 support (#19991) commit dfb6dd2ad279094ee78bdbde716818584543fe07 Author: Scott Lahteine Date: Sat Nov 7 16:53:37 2020 -0600 Apply some pins formatting commit 426d555f6e371aec701424796c656084179faa59 Author: Scott Lahteine Date: Sat Nov 7 16:20:19 2020 -0600 TFT cleanup commit b129652597cd44ef7f662e63282ec04fb6c78473 Author: LinFor Date: Sat Nov 7 12:37:45 2020 +0300 Fix Endstop Interrupts with SPI endstops, sanity checks (#20051) Co-authored-by: Scott Lahteine commit ec5b2aab15c314de9fed8669ec3316202dbe75fb Author: Speaka <48431623+Speaka@users.noreply.github.com> Date: Sat Nov 7 10:20:27 2020 +0100 Tramming Wizard submenu option (#20000) Co-authored-by: Scott Lahteine commit af5cf823eaee255fbcc6b7a7c746a8e1a651cc02 Author: Victor Oliveira Date: Sat Nov 7 06:00:29 2020 -0300 Color UI single touch menu navigation (#20053) commit 7e94079b5b1b5cd0d3bf2034348b628909ca4332 Author: Darren Horrocks Date: Sat Nov 7 08:43:51 2020 +0000 Optimized (non-optiboot) Melzi env (#20021) Co-authored-by: Scott Lahteine commit d81c1961c24037c6f2652d8165fe180add7907f5 Author: Darren Horrocks Date: Sat Nov 7 08:42:14 2020 +0000 Anet 1.0 alternative graphical LCD wiring (#20022) commit 45e0dd1966ca21d07d2cd10846b1109f417857de Author: Scott Lahteine Date: Sat Nov 7 02:38:39 2020 -0600 Add 'mfconfig' script used to manage configs commit a1ec49fedac3c0a5871cb92ce96da025fe333c30 Author: Jason Smith Date: Fri Nov 6 22:48:17 2020 -0800 Sanity-check illegal native USB (#20047) Co-authored-by: Scott Lahteine commit 3afa6e526bbf286ebd24a50b1962b27667a5225f Author: Jason Smith Date: Fri Nov 6 21:51:52 2020 -0800 STM32F1 cleanup, incl. SoftwareSerial removal (#20046) commit ecabbb6974524d500d28f618d2b3eb006422b4bc Author: Jason Smith Date: Fri Nov 6 21:49:53 2020 -0800 Fix FYSETC S6 timer conflict (#20044) commit 989ef47bde66bb7ff9072b650d6ab3ae42c919ee Author: George Fu Date: Sat Nov 7 13:48:52 2020 +0800 FYSETC E4 board support (#20032) commit 5a918e2b2e546ffdee06ed8778e0f6d33f5dd358 Author: Scott Lahteine Date: Fri Nov 6 23:46:46 2020 -0600 Update some file headers commit 2dd1522e30257efc092b5ffdf7a5a9c41cd8a16c Author: Victor Oliveira Date: Sat Nov 7 00:07:15 2020 -0300 Standardize Marlin SPI (part 1) (#19989) commit e49f267c4ae6d8f7b500f85da4c3414b2a01d3b6 Author: Scott Lahteine Date: Fri Nov 6 20:16:30 2020 -0600 Use nullptr commit afed97bf0eb2ee2db61f813b8133f1274a641f94 Author: Mauro Date: Sat Nov 7 02:28:41 2020 +0100 Fix E4d@box pins, stepper i2s (#20055) commit 9ba113bc05d9306e7560803d022f3052c0760007 Author: Scott Lahteine Date: Fri Nov 6 19:09:29 2020 -0600 Clean up corrected urls commit 35d7618117b7ecb4f1aa21d1c3cd17a55ebb1ffe Author: Marc Jovaní González Date: Fri Nov 6 01:16:08 2020 +0100 Add Spanish translations (#20020) commit 10c8647c1b4d902dfa15bbe02a4a0ba990406f50 Author: Jason Smith Date: Thu Nov 5 16:15:29 2020 -0800 Fix 0 extruders & bed compile (#20030) commit 1767a3bd7072059e620d054af4a0b8d8fb30a04e Author: Sergey1560 <53866542+Sergey1560@users.noreply.github.com> Date: Fri Nov 6 03:13:21 2020 +0300 Don't close diveDir in fileExists (#20035) commit 5082106145caadc0952c00f7830179354562ad9e Author: Jason Smith Date: Thu Nov 5 16:10:18 2020 -0800 Fix BTT002 PeripheralPins PWM assignments (#20036) commit b643a07b669430403147195951e22deddde7c969 Author: Scott Lahteine Date: Thu Nov 5 17:16:27 2020 -0600 Comment, spacing cleanup commit dd92c79339bcc19a4ea403ce1f03e75c8f6b8dd5 Author: Josh Schroeder Date: Wed Nov 4 22:15:25 2020 -0500 Wiring warning for ANET_FULL_GRAPHICS_LCD on SKR 1.4 (#20011) commit b767a82bd8f174c9d934c37f80ebd9716425b306 Author: Victor Date: Wed Nov 4 23:15:19 2020 +0200 FAST_PWM for STM32 (#20025) commit 67d58ccb98445f9bb491b96b82436004e5468708 Author: Scott Lahteine Date: Wed Nov 4 15:08:31 2020 -0600 HAL support for 8s watchdog commit bbfac75f1942500dbeb2dbbba908a721bd8156de Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Nov 3 15:27:09 2020 -0800 Add note about TMC2225/6 (#20002) commit 930aad6d31c983675ca011e9fcbb67750dd64b2f Author: Victor Oliveira Date: Tue Nov 3 20:25:33 2020 -0300 Better Classic UI touch resolution (#20004) commit 65383dd6166db2e3f9ba9d6ca1a0b5debc8e5f39 Author: Victor Oliveira Date: Tue Nov 3 20:21:15 2020 -0300 Show un-mounted media slot (#20005) commit 2ae8014da703787568ba57454885a290ec5f3635 Author: Scott Lahteine Date: Tue Nov 3 17:17:37 2020 -0600 DWIN cleanup, preserve Z offset commit b79e2d1e8d975f20a5fd426a54910682fad43179 Author: Victor Oliveira Date: Mon Nov 2 23:22:14 2020 -0300 Add a filament runout note (#19973) Co-authored-by: Scott Lahteine commit 172996f2b3142c68544d5fe9feb33ebcb89d5eff Author: Victor Oliveira Date: Sun Nov 1 23:38:10 2020 -0300 Fix STM32 HW Serial + EP compile (#19990) commit 3c512648daf1c2134c03be2a7dd9f7a776f08c8e Author: Victor Oliveira Date: Sun Nov 1 23:15:06 2020 -0300 Increase SPI Speed on LPC. Color and Classic UI for MKS SGEN L. (#19945) commit e335e7437903b85aba4ed2da873f2be9b99495e3 Author: Alexander D. Kanevskiy Date: Mon Nov 2 01:44:46 2020 +0200 Y-center GLCD status logo, reorganize (#19954) Co-authored-by: Scott Lahteine commit 5c90d0d0ae1f3706fd6ede91bbc868a641fe39e1 Author: Victor Oliveira Date: Sun Nov 1 07:42:53 2020 -0300 Reset calibration screen touch timer on click (#19951) commit 95fb749923cc1693cf15b087ba316e2a474520ba Author: Scott Lahteine Date: Sun Nov 1 04:40:59 2020 -0600 Clean up SPI and ST7920 defines (#19956) commit d9a47ec075ba5b1324ac847beda6891843e6e654 Author: Jason Smith Date: Sun Nov 1 01:39:30 2020 -0700 Get STM32 clock rates from framework (#19978) Co-authored-by: Scott Lahteine commit c9c17b886375338d8812bb7c7b7a9b68ce883f09 Author: Alexander Semion Date: Sun Nov 1 01:42:05 2020 +0300 Add SPINDLE_SERVO option (#19971) commit 2a61ce80b8d63997415d9ba71f842f6ce20fc3c4 Author: Victor Oliveira Date: Sat Oct 31 19:14:10 2020 -0300 Put PIO "debug" build in the corner (#19975) commit 3eaeaa8af3d08c1a7e23df310d98626329a4737d Author: Nick Date: Sat Oct 31 21:54:31 2020 +0000 Fix Chiron probe low point (#19962) commit 261e8df837f63d8ab1e10a97db7afaecba990a69 Author: Scott Lahteine Date: Sat Oct 31 16:28:33 2020 -0500 Cutter power cleanup commit d18ab2d206e5d6d4f6a5da4627553d1bbdca768e Author: Julien Lirochon Date: Sat Oct 31 19:45:10 2020 +0100 Fix SpindleLaser::cpwr_to_pct() maths (#19970) commit 08f2735e86c336525b7a73efdbaea38b073f8095 Author: Scott Lahteine Date: Sat Oct 31 16:12:35 2020 -0500 Cutter enable inline at full power Co-Authored-By: Luu Lac <45380455+shitcreek@users.noreply.github.com> commit aec215aaf3c8f82397607e81225b4aa3a6276d02 Author: thinkyhead Date: Fri Oct 30 00:10:04 2020 +0000 Fix bilinear_line_to_destination definition See #19431 commit 4b08e06fa67e52f5a589f64fe4b5b3116a5f93c5 Author: Orel <37673727+0r31@users.noreply.github.com> Date: Fri Oct 30 02:02:29 2020 +0100 Rename, adjust Dagoma F5 (#19947) commit 2774b70fbf8e62e3bc3b7a0efb23a1c1d8ff12d2 Author: Scott Lahteine Date: Thu Oct 29 17:33:59 2020 -0500 gcode_D EEPROM size, cleanup Fixes #19920 Co-Authored-By: Orel <37673727+0r31@users.noreply.github.com> commit 3dbe4ac59395048c98f6cd76bdaada7fac807f64 Author: Victor Date: Fri Oct 30 00:17:04 2020 +0200 FAST_PWM for STM32F1 (#19952) commit ba28660acb9c6c8373354b0289f9b12936a1bbe5 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Thu Oct 29 22:27:01 2020 +0100 Update Italian language (#19953) commit cec907536178aff81913c0f5f5a262349e6a151b Author: Victor Oliveira Date: Thu Oct 29 04:01:25 2020 -0300 PIO env for MKS Nano boards in STM32 (#19905) commit 176cb29eabaf11cc3f96e16cb70043be2dd3b7e6 Author: Marcio Teixeira Date: Wed Oct 28 11:23:46 2020 -0600 Improvement and fixes to FTDI touch UI - Fixed incorrect LCD text string - Fixed incorrect refresh of filament change screens - Allow host control via touch UI - Updates to leveling menu - Modified ExtUI::isPrinting() to check if the job timer is running - Added ExtUI method to check whether a host print is paused commit 3cb7128116626794ab69985c2f5639b2bfe73542 Author: Scott Lahteine Date: Thu Oct 29 01:14:02 2020 -0500 Tweak code formatting commit 88e88743b9d9f79da8f5b758a2ac140ee3ad3291 Author: Victor Oliveira Date: Thu Oct 29 02:52:50 2020 -0300 Color UI for MKS SGen-L V2 (#19919) commit e6092ad1463d0131a0fedf00d1cff7f568f84eb3 Author: Scott Lahteine Date: Thu Oct 29 00:49:03 2020 -0500 .bin and .woff are binary commit 59914df5b7a5cd63c7445a9897cda5ad3872649c Author: Scott Lahteine Date: Thu Oct 29 00:48:50 2020 -0500 Fix comments, spacing commit 67fbee389ed08bd2c46ce1fe93e1477202c04121 Author: Scott Lahteine Date: Thu Oct 29 00:14:55 2020 -0500 Add a note about substitution chars commit b590cee35a61452aab9bf6fda10900e6aca165a5 Author: Victor Oliveira Date: Thu Oct 29 01:47:12 2020 -0300 Keep SPI active on LPC176x (#19932) commit 0c81d86cd4a9d5f056b1b2e72c2af0e6d62d9d9f Author: Victor Oliveira Date: Thu Oct 29 01:45:10 2020 -0300 Permit spaces in dependencies g++ path (#19929) commit d6e93bb9c7ffdfd791676a2fc83a7fce16d2ac7b Author: Alexander Fomichev Date: Wed Oct 28 05:59:22 2020 +0300 Generalize BTT SKR E3-DIP version (#19910) commit 2bb94b4329aba90bec065d8e299b95a132abd9dc Author: ellensp Date: Wed Oct 28 15:57:32 2020 +1300 AZTEEG X5 mini LED pins (#19909) commit fa0614516a51d06bfddbc9c3a142a67fe16d74e5 Author: Gurmeet Athwal Date: Wed Oct 28 08:25:49 2020 +0530 Update ExtUI path in config comment (#19908) commit d08511c5dc0ec8a7377cb456588f2caa9a99bacd Author: Victor Oliveira Date: Tue Oct 27 23:54:30 2020 -0300 Color UI circular task queue (#19918) commit 2a4cdf5a5dba07d7297b0ec61d418d9f19fff20b Author: Jason Smith Date: Tue Oct 27 19:40:12 2020 -0700 Fix LCD menus + DAC (#19907) commit f5f6170858258e2ba5b46b4e9b3ec2fa07fab9f3 Author: Orel <37673727+0r31@users.noreply.github.com> Date: Wed Oct 28 03:37:10 2020 +0100 Fix DAC-related bugs (#19921) Co-authored-by: Scott Lahteine commit d7d1ef82284eec8fa961b4f67447de59dc53b5d2 Author: Lucas Seiki Oshiro Date: Tue Oct 27 22:41:12 2020 -0300 "Sound: ON/OFF" menu item (#19901) Co-authored-by: Scott Lahteine commit d4669dbf6af9519ae5b553605e7a26a774c6a512 Author: Speaka <48431623+Speaka@users.noreply.github.com> Date: Tue Oct 27 23:25:01 2020 +0100 Fix G35 PROGMEM strings (#19926) commit f43f71646e0dc161168be7f425870746b32df922 Author: Scott Lahteine Date: Tue Oct 27 17:21:38 2020 -0500 Archim test matching env commit aecf545446981a5087f58e5dff4420f8aba1576d Author: Scott Lahteine Date: Tue Oct 27 16:21:03 2020 -0500 Fix Archim 1, add Archim 1&2 tests commit 3b42e0263ab18d9a19dff6b0fa00413b192fa61c Author: Victor Oliveira Date: Tue Oct 27 17:16:35 2020 -0300 Keep watchdog refreshed in LVGL init (#19900) commit 5a74114e23dae75aa426ee861b34cdcf4f44643c Author: Victor Oliveira Date: Tue Oct 27 17:09:19 2020 -0300 Fix some LVGL bugs (#19904) commit 3bab0fccc2f32504db23b61b05405b79cdce7d3d Author: Marcio Teixeira Date: Tue Oct 27 11:13:05 2020 -0600 Fix NO_WORKSPACE_OFFSETS compile commit 2a8fdb8ee46559e7d6850f5a7a1c2ea435cb23cb Author: Scott Lahteine Date: Sun Oct 25 04:19:51 2020 -0500 Followup for BTN_ENC_EN commit 6c103b72a2d0c638f8d3b0d8eb6c77074bff3ced Author: Scott Lahteine Date: Sat Oct 24 17:13:10 2020 -0500 Clean up comments, USB flash, NULLs commit ea9e28bb6973566a53bca56ec5a2e5d37b29b8ff Author: Scott Lahteine Date: Sun Oct 25 04:07:00 2020 -0500 Format Nucleo F767ZI pins commit c94afc759207845b83b5348e3019801295c868a7 Author: ellensp Date: Sun Oct 25 21:46:21 2020 +1300 Fix PASSWORD compile w/out LCD (#19888) commit 80909e4424d152613a8f5f0991b9d0e73aeadf3a Author: René Pasold Date: Sun Oct 25 09:43:21 2020 +0100 Support Fysetc Mini 12864 + GT2560 A(+) (#19878) commit c59f64ce49819ed4175995d2089bb1084b872899 Author: ellensp Date: Sun Oct 25 13:46:27 2020 +1300 Use LiquidCrystal_I2C@1.1.4 for RA_CONTROL_PANEL (#19875) commit e232f930181b3bfcfcbd5f2cc95b86e8ce374578 Author: Jason Smith Date: Sat Oct 24 17:44:46 2020 -0700 Update ZMIB_V2 env names (#19886) commit 62d578de9e296126610b5ce59f64a36e9660dd17 Author: Jason Smith Date: Sat Oct 24 17:43:42 2020 -0700 Ignore NativeEthernet on AT90USB1286 (#19885) commit a625fee0354064c375810b18068f7640246f965b Author: Gurmeet Athwal Date: Sun Oct 25 06:11:52 2020 +0530 Add 'BTN_ENC_EN' for SKR V1.4 with DOGM (#19796) commit b586a30e7b0c22b962014a6fcc6041582a6d17ed Author: Victor Oliveira Date: Sat Oct 24 19:28:31 2020 -0300 More LVGL UI code reduction (#19879) commit 676354f1d1e5dd9dceeb81be835cde0b1c851cd5 Author: Nick Date: Sat Oct 24 22:48:29 2020 +0100 Fix Anycubic Chiron "Ready" detection (#19880) Co-authored-by: Scott Lahteine commit e44a97a09632ce56277f2df7e1a14a62043a0a78 Author: Victor Oliveira Date: Sat Oct 24 18:25:14 2020 -0300 Update PIO dependencies script commit 35597ae3367d65671b2ae6d544a1158da62593af Author: Victor Oliveira Date: Sat Oct 24 01:37:45 2020 -0300 More MKS UI cleanup, optimization (#19869) Co-authored-by: Scott Lahteine commit c3e8b462844f88118b8d0582844b8c8636ceb51c Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Oct 23 21:29:58 2020 -0700 Fix Chitu V5/V6 FAN2 pins (#19874) commit d3ee5d7dfe14ebea6041073724f08f679d827a75 Author: Scott Lahteine Date: Fri Oct 23 19:25:22 2020 -0500 Fix warning in gcode_D commit 2fed3982d6a0babd43efe5083a55439e06878c14 Author: Scott Lahteine Date: Fri Oct 23 14:52:59 2020 -0500 Pins post-process header (#19860) commit f9b04af650be066d981bc09f3511552760d65c67 Author: Scott Lahteine Date: Thu Oct 22 22:31:48 2020 -0500 Case light brightness cleanup (#19856) Co-authored-by: Chris commit b1b2ecba6cca8275f7c813582e7da6d67a02a7ba Author: Scott Lahteine Date: Thu Oct 22 20:54:11 2020 -0500 Shorten a method name commit 6601ca7a22f1f34365d5811be1d6649b3805e265 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Fri Oct 23 03:46:48 2020 +0200 Fix Chopper Timing extra axis defaults (#19850) commit 1b510007362531915713cfd5c792f360d1d1e412 Author: Scott Lahteine Date: Thu Oct 22 20:22:17 2020 -0500 Slim down MKS UI code (#19843) commit 994cda3b6b3334869c27f0e98198cce5b6ef32e6 Author: George Fu Date: Thu Oct 22 19:29:29 2020 +0800 Fix TMC serial port for FYSETC AIO_II (#19842) commit 2becb5ebf706a3143f6e108ed3aa22d868e282d0 Author: ManuelMcLure Date: Thu Oct 22 04:27:33 2020 -0700 Configure TMC interpolation per driver (#19828) commit 32433fae61a25cf7f1d652429d46bcd574ba6efd Author: Foxies Date: Thu Oct 22 02:00:57 2020 +0200 FLSUN Delta QQS-Pro pins (#19793) commit 99ce660aed96e371172c452381727080d877c866 Author: Scott Lahteine Date: Wed Oct 21 15:03:11 2020 -0500 Add power-on/off G-code options (#19837) Co-authored-by: Chris commit 01b9badb518059d82d3474857c7dda5e41814a03 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Oct 21 12:14:19 2020 -0700 BigTreeTech SKR Mini MZ V1 (#19818) commit f27b61cb0ff55335469ce100d234d6528c159af2 Author: Mauro Date: Wed Oct 21 20:51:14 2020 +0200 Fresh Web GUI (based on bootstrap.js) (#19812) commit 52bc509fcf40ffaa7a5dc0c1bc465c81dc3cb56d Author: TheMichalcinOfficial <73078661+TheMichalcinOfficial@users.noreply.github.com> Date: Wed Oct 21 20:44:55 2020 +0200 Support for Ramps-S v1.2 (#19815) commit 29849607931589c5cc9e0541563e72c333a3cc52 Author: Scott Lahteine Date: Wed Oct 21 12:45:27 2020 -0500 General cleanup, mostly MKS UI (#19825) commit e32bdf6a93b37ce1ec913ada29b38506e3d2ca8b Author: Scott Lahteine Date: Tue Oct 20 22:36:22 2020 -0500 ESP32: i2s_init requires I2S_STEPPER_STREAM commit 35d75c354e99c99d8c9877f958d932667214edb1 Author: uwedamm <46942357+uwedamm@users.noreply.github.com> Date: Wed Oct 21 03:26:07 2020 +0200 Fix G2/G3 P E and Z motion (#19797) Co-authored-by: Scott Lahteine commit 9f85a159550bd5da92b03db2eee38dfa28cd0e4b Author: Tanguy Pruvot Date: Tue Oct 20 22:06:06 2020 +0200 Longer3D: LONGER_LK_TFT28 now set by config (#19817) commit b1b8161447b0bc835fc563fab64faacef1e90965 Author: ellensp Date: Wed Oct 21 09:01:46 2020 +1300 Handle dependent Stepper Driver defaults later (#19820) Co-authored-by: Scott Lahteine commit c6f17ac01e222bd0dc9869921fde543a9edc110f Author: bilsef Date: Tue Oct 20 12:35:29 2020 -0700 Teensy 4.1 Ethernet support (#19801) commit 53a4b8fa335fd8e827dc65a4e347a2d356bdf60c Author: Scott Lahteine Date: Mon Oct 19 20:38:24 2020 -0500 Misc. cleanup, serial strings commit a90b90e98d49447417fe51419a9518de0c582bf2 Author: Scott Lahteine Date: Mon Oct 19 00:25:51 2020 -0500 Tweak a host prompt call commit ff9a27ee9fc862d8592f9bec86cbe7deccc21515 Author: Scott Lahteine Date: Mon Oct 19 04:24:57 2020 -0500 Use PGM serial strings commit cf0a817db1c881c44e644e140211a5fb55b591c3 Author: ellensp Date: Mon Oct 19 21:16:02 2020 +1300 Ensure A4988 for unspecified driver type (#19798) Co-authored-by: Scott Lahteine commit e00745c548b0e82ec72c788fce83b97532af1864 Author: Scott Lahteine Date: Mon Oct 19 00:37:32 2020 -0500 Document M125 P commit af956bbb32d2aa149cd13adde8ff64250f3365ae Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Oct 18 16:53:12 2020 -0400 Apply home offsets to probing, Z Safe Homing (#19423) Co-authored-by: Scott Lahteine commit 4343a96fac83e5fb259e09cf42cb757522e20fa0 Author: Scott Lahteine Date: Sun Oct 18 00:20:25 2020 -0500 ABM Teensy 3.6 build commit 9124f1d7c8c586bc05286c153b849df2ac3b66fb Author: Jago Strong-Wright Date: Sun Oct 18 04:35:19 2020 +0100 Distinct Chopper Timing settings (#19781) Co-authored-by: Scott Lahteine commit 32ca42ead33cd628d0962dd95f406738218eff5d Author: Sten Uusvali <31988255+nuevocampo@users.noreply.github.com> Date: Sat Oct 17 14:11:22 2020 -0700 Fix M503 output for M907 motor current (#19777) Co-authored-by: Scott Lahteine commit 25bb249ac6896b91df3b69e40134b37a607189d1 Author: Curtis Jenkins Date: Sat Oct 17 16:05:50 2020 -0400 Fix Smoothieboard digipots i2c pin (#19784) commit 332adafa238e9065afa3077fce0952a4cd3b1a76 Author: Scott Lahteine Date: Fri Oct 16 20:48:52 2020 -0500 MarlinUI followup commit a44aae268ac3cc184596f3fd031455128cb6688c Author: Scott Lahteine Date: Fri Oct 16 20:38:23 2020 -0500 Starting fan followup commit 52c090dfbe92514fc2a48951583d50da59b819a4 Author: Victor Oliveira Date: Fri Oct 16 22:05:45 2020 -0300 Fix starting fan with bad material preset index (#19773) commit 141f6825ced85578cfba2dace1e14c938c2bc0e0 Author: Scott Lahteine Date: Fri Oct 16 19:36:25 2020 -0500 Rename ultralcd => marlinui commit fff5649b6a4efaf54faac3f3f0cc1f0ee2922a83 Author: Scott Lahteine Date: Fri Oct 16 19:54:59 2020 -0500 touch_ms followup commit 34c16bb3959e6cbd16649ea56a9b001bce91a457 Author: arminth Date: Sat Oct 17 00:07:34 2020 +0200 Provide FYSETC F6 13 LCD pins for HD44780 (#19769) commit cedc5d340f852a6ebe1cea17cc75731567410052 Author: Jason Smith Date: Fri Oct 16 15:04:10 2020 -0700 LCD conditionals followup (#19766) commit 3becc3ad6396b6683500cfa349bd88a2e6558ad1 Author: nb-rapidia <43864438+nb-rapidia@users.noreply.github.com> Date: Fri Oct 16 14:59:55 2020 -0700 Fix IDEX layer shift and DIR states (#19756) Co-authored-by: Scott Lahteine commit 19498040efffc92bb16e5ebfffed496542416801 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Sat Oct 17 00:21:21 2020 +0300 Fix HAL/STM32 FastIO for analog pins (#19735) commit 060b2f49894c0759a98b4ff99f8fb1c7cc779396 Author: Victor Oliveira Date: Fri Oct 16 18:19:48 2020 -0300 Fix Color UI external_control, wait_for_release (#19771) Co-authored-by: Scott Lahteine commit 2ecc3bb5608cf7e9e4e58ccd469a7ecff442a572 Author: Victor Oliveira Date: Fri Oct 16 18:11:00 2020 -0300 Handle M410 in the main task (#19752) commit d5340675aecb28eea03e491e1ccd19a8b3a9a05b Author: Jason Smith Date: Fri Oct 16 14:04:51 2020 -0700 Fix SAMD Serial name macro (#19765) commit dea995e19f980e624ce06f184a0be505615a99ed Author: mks-viva <1224833100@qq.com> Date: Fri Oct 16 15:16:09 2020 +0800 Update MKS SGen-L V2 RGB LED pins (#19762) commit 473abe8eb4ea4231a8476e022421d891fee4377d Author: Andreas Setterlind Date: Fri Oct 16 09:06:05 2020 +0200 Add ESP32 160MHz to README (#19748) commit 386e643179f5b7533ef027a6f27ba257401ee144 Author: Jason Smith Date: Fri Oct 16 00:04:55 2020 -0700 Fix NUCLEO_F767ZI build, add tests (#19746) commit 1fa19e1fc27b9ee6a6556903cd9bd134915a9b48 Author: Victor Oliveira Date: Fri Oct 16 04:03:45 2020 -0300 Sanity check unsupported EP (#19745) commit 13720ce6b2acb8da0922f84207f08aa3e035b11c Author: Victor Oliveira Date: Thu Oct 15 20:38:27 2020 -0300 Fix TOUCH_SCREEN + TFT_LVGL_UI compile (#19754) commit 02b668baf58e6ebf488cf453aaffcef1a87cd773 Author: Victor Oliveira Date: Thu Oct 15 16:15:11 2020 -0300 Update Probe Offset Wizard for Color UI (#19742) commit 57dc1a06490bfe84f39a85f34e90f7f50b3a77cc Author: rlojek Date: Thu Oct 15 20:44:57 2020 +0200 Fix ADVANCED_PAUSE && !PREVENT_COLD_EXTRUSION (#19740) commit 8ae8e1e4558237f9721e2ef82571dbed76b82747 Author: Peter Hall <33176108+IamPete1@users.noreply.github.com> Date: Thu Oct 15 19:18:43 2020 +0100 Default LASER_POWER_INLINE to OFF (#19727) commit 7905aa64fa8845e8af2208d20b8075d3a579e2f6 Author: Scott Lahteine Date: Thu Oct 15 03:00:27 2020 -0500 TFT Presets, Generic options, Sanity checks (#19723) commit d81abf1d5048957d96441a371488f1af30bfabb4 Author: Jason Smith Date: Wed Oct 14 11:50:03 2020 -0700 Fix SET_SOFT_ENDSTOP_LOOSE w/out soft endstops (#19734) commit 6a5799fc7d3b2b596dc3a171d821d4c2f80726ec Author: Jason Smith Date: Wed Oct 14 11:48:46 2020 -0700 Revert at90usb1286 conditional (#19733) commit 3e4d9aa9bbf863bccbfb3c498ef0e9b81d9412c4 Author: Jason Smith Date: Wed Oct 14 11:44:03 2020 -0700 Fix digipot compilation (#19731) commit 2004080c9d32a3fa07c5814179a3ed3de9492942 Author: Jason Smith Date: Wed Oct 14 11:43:36 2020 -0700 Fix mega2560ext environment (#19730) commit 70dc2ee9bb87bf0c4703afe45dac0a5a84a186d7 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 13 16:13:25 2020 -0700 If needed, home before G34 (#19713) commit 7825fc63a0b098f9d5a80b3ee5014549b4ce1c88 Author: Victor Oliveira Date: Tue Oct 13 20:12:34 2020 -0300 Watchdog Refresh for LVGL Asset Load (#19724) commit 33b2f0700e47eaaed5eab23fa06c86a42d2184c8 Author: Jason Smith Date: Tue Oct 13 16:03:09 2020 -0700 Add NUCLEO-F767ZI dev board (#19373) Co-authored-by: Lorenzo Delana commit 647981ef4467910671169e2489bd3fafd76b05c8 Author: Scott Lahteine Date: Tue Oct 13 14:54:56 2020 -0500 Simple bool in soft_endstops_t commit 252fd66b7696e93879d943e3419144972902e8c1 Author: Victor Oliveira Date: Tue Oct 13 13:58:50 2020 -0300 TFT followup fixes (#19710) commit 1ef1ea0b3ecd8cdf1fffc2ce6db9eb1777e2c4d2 Author: Scott Lahteine Date: Mon Oct 12 17:48:50 2020 -0500 Move @section temperature commit 14fe7ee414c672530b36420182539abfd53c7839 Author: Victor Oliveira Date: Mon Oct 12 20:01:03 2020 -0300 Fix UTF8 handling for Color UI (#19708) commit bd221944384941c13c851e81a4160871b719f39a Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Mon Oct 12 14:52:56 2020 -0700 Sanity-check mutually-exclusive G34 features (#19706) commit ea65e10dc7bf3ba5a6bd966bcebf3238eaec7ca1 Author: Earle F. Philhower, III Date: Mon Oct 12 14:48:04 2020 -0700 Add loose soft endstop state, apply to UBL fine-tune (#19681) Co-authored-by: Scott Lahteine commit 48a24202efb1a4105a937624eb03d1c3d4ae70a4 Author: Jason Smith Date: Mon Oct 12 14:39:31 2020 -0700 Add D100 Watchdog Test (#19697) commit 9b1ed45b3e02f7cecec53a2d0ba317e9add6308d Author: Victor Oliveira Date: Mon Oct 12 18:38:07 2020 -0300 TFT Refactoring (#19192) * split tft folder in two: tft for color ui; tft_io for shared tft code * after the files got moved, now the code was moved to the right place * classic ui using TFT IO init lcd codes * feature to compile tft_io when enabled * compiling fix * lvgl spi tft working with tft io init codes * there is no need for separeted fsmc and spi class in lvgl anymore, as tft io handle everything * remove debug * base for TFT rotation and mirroring API, and ILI9488 support * ST7796S rotate and mirror support * ST7789V rotate and mirror support * ST7735 rotate and mirror support * ILI9341 rotate and mirror support * ILI9328 rotate and mirror support * R61505 rotate and mirror support * MKS TFT definitions * more configs for mks tfts * update config * naming typo * to configure the user interface * ANYCUBIC_TFT35 * tft configs * support for SSD1963 * tft display types * updated conditionals lcd; first board fully working with the new code - all 3 ui! * compatiblity * changed name * move classic ui file name * rename TURN -> ROTATE * GRAPHICAL_TFT_ROTATE_180 deprecated * first fsmc board fully working - chitu v5 * mks robin nano v1.2 + tft 35 ok! * right pin name * anycubic tft tested in a TRIGORILLA_PRO * chitu v6 * nano 32 tft orientation * mks tft43 * mks tft43 rotation * fixed LONGER LK tft setup * GRAPHICAL_TFT_UPSCALE defined by the display type * better offsets defaults * Update Configuration.h * Update tft_fsmc.cpp * Update Conditionals_LCD.h * Tweak comments * update nano tests * Revert "update nano tests" This reverts commit a071ebbfad30e28855a4a5695ec8a726542a1a65. * default tft * outdated comments * to not break non-vscode builds * upscale tft 35 * support tft 180 rotation for color ui * Each TFT Driver is responsible for its default color mode. * use auto detect in mks displays, because some of them could be shipped with diferent drivers * extra s * unused code * wrong -1 * missing mirror options * Smaller regex pattern * Comment updates * Clean up old defines * Apply pins formatting * GRAPHICAL_TFT_ROTATE_180 => TFT_ROTATE_180 * MKS_ROBIN_TFT_V1_1R * merge fix * correct resolution * auto is default, dont need be there, and it will allow the user to configure it even for named displays * to not use rotation with MKS_ROBIN_TFT_V1_1R * i like () in macros * avoid sleepy commits * default for st7789 is rgb * nano follow up * to allow ili9328 rotation * default is rgb * boards merge follow up * to match bootloader orientation * HAS_TOUCH_XPT2046 is not hal specific anymore * lets not forget LPC * 180 rotation for ili9328 and R61505 * Clean up whitespace Co-authored-by: Scott Lahteine Co-authored-by: Scott Lahteine commit f163f1940d32414545928f82bb9112738ffcfe06 Author: Scott Lahteine Date: Mon Oct 12 00:59:30 2020 -0500 Fix screen click reading too often (#19696) Co-authored-by: andreibobirica <39415547+andreibobirica@users.noreply.github.com> commit fdcd28a0ec923a609f16cd0221db2821cd39dae6 Author: Jason Smith Date: Sun Oct 11 22:40:39 2020 -0700 Allow MAX31865 resistance values configuration (#19695) commit d2863466ace64b8bfde1d5eadf9e24e312b0d31e Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Oct 11 22:34:27 2020 -0400 G34 Mechanical Gantry Calibration (like Prusa M915) (#18972) Co-authored-by: Scott Lahteine commit 5047979340534dd7c1c95c25d2144828608ee682 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Mon Oct 12 04:30:18 2020 +0200 Add REPORT_TRAMMING_MM option (#19682) Co-authored-by: Scott Lahteine commit 7ab74d22c4cb00a6f8f578efa88184b04dfdb401 Author: Jason Smith Date: Sun Oct 11 17:42:50 2020 -0700 Fix motion compile w/out probe-oriented settings (#19684) commit c1729330c56b27cbdcc904d4faf88dfe80fc60ce Author: Victor Oliveira Date: Sun Oct 11 21:31:21 2020 -0300 Option to prevent (extra) Watchdog init on STM32 (#19693) commit 2dafba1ad29b6caae1dd25f95d82c1e54951327c Author: Victor Oliveira Date: Sun Oct 11 21:26:16 2020 -0300 Implement wait_for_user for Color UI (#19694) commit 67e0e6d5adfcfd4835b9b93c8147730ee32b18f4 Author: Jason Smith Date: Sun Oct 11 17:23:23 2020 -0700 Fix I2C_ADDRESS sign warning (#19685) commit 8b4f82cd078e267843b1ac80a3293f6d63adb19d Author: Jason Smith Date: Sun Oct 11 17:06:57 2020 -0700 Fix various errors, warnings in example config builds (#19686) Co-authored-by: Scott Lahteine commit 2c7b5fe1f29c4ded109cdece6e6290b61d429df4 Author: Jason Smith Date: Sun Oct 11 16:13:01 2020 -0700 Fix at90usb1286 build (#19687) * Skip check for USBCON during dependency detection * Ignore incompatible Teensy_ADC library, which requires Teensy >= 3 * Add IS_AT90USB Co-authored-by: Scott Lahteine commit a30e8baf3e4b4780d2e94a8663f85bb163eb7cf7 Author: Scott Lahteine Date: Sun Oct 11 14:58:35 2020 -0500 Digipots refactor / cleanup (#19690) commit 2e01eb91890a21bc631fa045afedcf4c2ba5a2a7 Author: Scott Lahteine Date: Sat Oct 10 12:07:00 2020 -0500 Save PLR on resume from pause (#19676) Co-Authored-By: shahab <32130261+SHBnik@users.noreply.github.com> commit 2adac87c45ad3a096758e0348444c778e673e0c2 Author: Victor Oliveira Date: Sat Oct 10 13:47:28 2020 -0300 Restore correct STM32 port-bits code (#19678) commit 72f9fdc05f4b5e49e3b56fde8a7fc65f6e3bf50b Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Sat Oct 10 13:01:46 2020 +0300 Fixes for TFTGLCD Panel, FastIO (#19614) commit cbed6f4241bfcc2532c7fb109d945c4425632f45 Author: ellensp Date: Sat Oct 10 22:39:12 2020 +1300 HAS_CHARACTER_LCD => HAS_MARLINUI_HD44780 (#19673) commit 50de8bd6fb926636f41376d31f58e6bb2c9ab553 Author: Victor Oliveira Date: Sat Oct 10 01:35:41 2020 -0300 Keep HAL tasks running during PID Autotune (#19671) commit 7e09160ba3d129c9af6e399e1c3e4e92384cb8e7 Author: Scott Lahteine Date: Fri Oct 9 16:50:17 2020 -0500 Batch appercase hex values commit 3facf34f5f7dc14093e4948a7350cf4edcb9a20a Author: Scott Lahteine Date: Fri Oct 9 16:42:23 2020 -0500 Optional `M42`/`M226`; Add more features filters (#19664) commit 2553a18f4012b653de6a06c2485284f8d6d899bc Author: Victor Oliveira Date: Fri Oct 9 08:25:23 2020 -0300 Support for Debug Codes - Dnnn (#19225) Co-authored-by: Scott Lahteine commit 0b13608badfc08783335cef44e89994bf22ef3fb Author: 石立枫 <49380822+FLYmaker@users.noreply.github.com> Date: Fri Oct 9 19:09:27 2020 +0800 Support for FLY MINI (#19185) commit 8143d7082988dce8a6a913fd509f67f2b670d4a4 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Oct 9 00:52:06 2020 -0700 Fix touch ifndefs (#19661) commit 92bbf3ba18053c3bab3a47e8f7b160207c265753 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Fri Oct 9 09:51:25 2020 +0200 Update Italian language (#19654) commit 5441ee5a7a9882bff66d1ceeceaebb72b5100733 Author: Samantaz Fox Date: Fri Oct 9 01:40:54 2020 +0200 Fix and improve Makefile / CMake (#19640) commit fde169d3ef05488dc64381ecc0305a58133cc611 Author: Scott Lahteine Date: Thu Oct 8 16:59:54 2020 -0500 Permit touch calibration override commit 3516c3f936367b875b8e5829024769f5bbf10737 Author: Scott Lahteine Date: Thu Oct 8 15:17:19 2020 -0500 Use 0xFF (not 'ff') for byte transfer commit e6de60d04ea3ee7c1cb29b8d6e698e9c763ed196 Author: ellensp Date: Thu Oct 8 20:30:31 2020 +1300 Apply env:mega2560ext to relevant boards (#19624) commit cd839a251f5f283ca0e7c1a9fb155beb43d53965 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Thu Oct 8 03:43:08 2020 +0200 Update PROBE_OFFSET_WIZARD comment (#19652) commit fadee1b46b59364bede10aba99da0e0d3727f86d Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Wed Oct 7 20:01:01 2020 +0200 More accessible PROBE_OFFSET_WIZARD (#19647) commit 3e9c6c6297594c9bc738b9ef8a6bd98848529337 Author: ellensp Date: Thu Oct 8 07:00:08 2020 +1300 Restore ° to 6x9 small info font (#19645) commit 45385e737c9d61cc0d510ddb477f59262215a860 Author: Scott Lahteine Date: Tue Oct 6 19:42:03 2020 -0500 Chamber vent/fan followup commit c86e14c6ff80d363818f3b61b413b8d8cc49941d Author: Scott Lahteine Date: Tue Oct 6 19:17:18 2020 -0500 Fix small font section directive, mixer warning commit b5da52007b666bf4a2b50f1c585851ea337c6120 Author: Scott Lahteine Date: Tue Oct 6 01:28:08 2020 -0500 Update language fonts commit 22ef4fe26cf937087f997cd7ec001e625ee6ab8d Author: ladismrkolj Date: Wed Oct 7 01:36:01 2020 +0200 Add Chamber servo vent, auto fan (#19519) commit ebca2efb243df4b534e8e4bcaaf2a151702de42a Author: signetica <66766598+signetica@users.noreply.github.com> Date: Tue Oct 6 15:58:28 2020 -0600 Fix Ender-3 V2 DWIN Stop SD Print (#19642) Co-authored-by: Scott Lahteine commit 61d500462cbdd309dd39a43e7c0249739ab60fac Author: Scott Lahteine Date: Tue Oct 6 02:59:51 2020 -0500 Improve retract / unretract labels commit 6002dc634e56b50a47b272169ba009018de2f4f5 Author: Scott Lahteine Date: Mon Oct 5 01:09:32 2020 -0500 Trailing whitespace commit 563bd0178903c22a9fa6b165179e31c9cd2a0d65 Author: Scott Lahteine Date: Mon Oct 5 01:07:41 2020 -0500 Sync config to examples commit cc863ba378cfebfdf7237a6cd730b00faafa0f4c Author: Mathew Winters Date: Mon Oct 5 18:31:20 2020 +1300 Z Probe Offset Wizard (#18866) commit fb28e0cba9a96b8526a0c97c52f1512d66794b84 Author: Cory Ory Date: Mon Oct 5 01:51:21 2020 +0100 Allow bypass for cold E movement (#19606) commit cd33062a81c8cb4995be1a266f9d004cd2b0c026 Author: Ryan V1 <55478432+V1EngineeringInc@users.noreply.github.com> Date: Sun Oct 4 15:41:41 2020 -0700 Fix Archim1 stepper timing (with new variant) (#19596) commit 1ac7cf2ab6cfc2f978287fa31443b31f55e7a675 Author: Scott Lahteine Date: Sun Oct 4 17:29:12 2020 -0500 Add HAS_FAST_MOVES commit 53b7ad3a9279b6b6297bd4345a63315559c4dbb7 Author: ellensp Date: Mon Oct 5 10:47:06 2020 +1300 Fix Z_AFTER_HOMING without probe (#19607) commit 01c161d380093d4a9763df5daa7221f738ddd6ed Author: Scott Lahteine Date: Sun Oct 4 15:45:13 2020 -0500 Move SF_ARC_FIX option commit af4c2dab8d9ed912ad5446bc532eef94ca311a52 Author: Speaka <48431623+Speaka@users.noreply.github.com> Date: Sun Oct 4 21:50:12 2020 +0200 Fix German translation purging/unloading (#19615) commit 2a755d68d9acb705fc15750d1c19201aeed625a7 Author: Scott Lahteine Date: Sun Oct 4 14:46:55 2020 -0500 Shared singlenozzle item commit 770f2b1e02e3f7debcb76441fc6a6e6b3231cf31 Author: Scott Lahteine Date: Sun Oct 4 14:29:02 2020 -0500 Fix Tune/Fan edit items - Fixes #19617 - Followup to #18400 commit 85c6ffb364eb6ca7c991b7a83a7a209ec5157ddd Author: Ryan V1 <55478432+V1EngineeringInc@users.noreply.github.com> Date: Fri Oct 2 15:31:33 2020 -0700 Fix 'bossac' upload on Windows (#19545) commit bf3f7ae5b958a71de07604ffd45d87c7b5ece3bc Author: Marcio T Date: Fri Oct 2 16:30:32 2020 -0600 Touch UI support for X2, Y2 and Z2 (#19538) commit 98046776693df30554f1fb1899ce1d90f92c44aa Author: ellensp Date: Sat Oct 3 11:28:08 2020 +1300 Fix wrappers on HAL/STM32F1 .cpp files (#19581) Co-authored-by: Scott Lahteine commit c5614c85299926f4b44540e7234514510225ef75 Author: ellensp Date: Sat Oct 3 11:19:43 2020 +1300 Fix TEMP_ADC_PROBE support for STM32F1 (#19582) Co-authored-by: ellensp commit 6bafa69f8fcd943fc822e18f9b66a584970c60c6 Author: Andreas Setterlind Date: Sat Oct 3 00:16:55 2020 +0200 Add Configurations repo info to config/README.md (#19583) Co-authored-by: Scott Lahteine commit a2c4c4a9166e0009c33ab5b48f50a99d489067f9 Author: ellensp Date: Sat Oct 3 11:12:17 2020 +1300 Fix compile of MMU2 with S-mode disabled (#19584) commit de42ef017f171c026b64a9896871521b23928522 Author: bilsef Date: Fri Oct 2 15:08:50 2020 -0700 Fix onboard SD card support for Teensy 3.6 & 4.1 (#19593) commit 69917690f3ca522f927b9dd000f59c65a8d2149f Author: Scott Lahteine Date: Fri Oct 2 17:05:45 2020 -0500 Adjust HAL platform defines, comments commit 02b17886c947c155d4add6be83b50ba2993e8e6f Author: Scott Lahteine Date: Fri Oct 2 17:04:23 2020 -0500 Replace tabs with spaces commit 0507df61b2940014f9b2ad57d32cb77a5deb632c Author: Victor Oliveira Date: Thu Oct 1 22:52:42 2020 -0300 Minor SPI fixes, systick_callback for STM32F1 HAL compatibility (#19565) commit 0af95b188ac68cc42024dcbbca1e21fb34957eb4 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Fri Oct 2 01:17:11 2020 +0200 G35 workaround for Pronterface "feature" (#19577) commit bf3b36ae6a6dd66dc5988de7e3c3c6548618b93e Author: Stéphane <43587190+stef-ladefense@users.noreply.github.com> Date: Fri Oct 2 01:09:39 2020 +0200 Fix Anycubic i3 Mega target temperature display (#19572) Also includes a workaround for missing (probably un-fetched) long name in file listing commit 58ce9a85c18a4fed10836be38bf280cfbdf06ade Author: Ilya Date: Thu Oct 1 15:51:11 2020 -0700 No move on Park = No move on Resume (#19569) commit dc5f86e0393d9d659ee09f66182a479c7b656255 Author: Roman Moravčík Date: Fri Oct 2 00:47:24 2020 +0200 Update Slovak language (#19561) commit 46c8775542c0ba474c7b2bca7d03beef21b9d4ef Author: Victor Oliveira Date: Wed Sep 30 22:14:19 2020 -0300 Fix Buzzer (pin) init for uninitialized FastIO (#19559) commit 059d966d7b6bdb84d29c09afc2038d227724a479 Author: Victor Oliveira Date: Wed Sep 30 22:06:32 2020 -0300 Fix Move Screen with disabled Touch (#19558) commit 2069ab3a15cfb578b6ee0c16ccfa1c8bf75cff83 Author: Nick Date: Tue Sep 29 00:53:40 2020 +0100 Anycubic Chiron full feature support (#19505) commit bb90bc6165820e38d2fa8717f1fd9c301e7c1fe2 Author: Scott Lahteine Date: Sun Sep 27 16:51:16 2020 -0500 Fix up E3 DWIN Power Panic commit de4f882a2288ce19fede72ba1c4b4224044547e5 Author: Scott Lahteine Date: Mon Sep 28 16:36:22 2020 -0500 Fetch longname when a file exists commit 9aff5cb0952be9d95224d5dcac975fea7fc02b86 Author: Scott Lahteine Date: Mon Sep 28 16:37:00 2020 -0500 Add extra CardReader debugging commit 782b9ce69eba1b5360184c6914a2803031258ecd Author: Scott Lahteine Date: Mon Sep 28 15:52:21 2020 -0500 Improve Power-Loss Recovery (#19540) commit 806c908091130fc11f05bdef9ec2614b96c93e85 Author: Scott Lahteine Date: Mon Sep 28 15:46:12 2020 -0500 Fix diveToFile with open Dir object (#19539) * Fix CardReader diveToFile * Add CardReader::fileExists commit 04a712daccbda49bc528e3418c6d16d5a13d6d51 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Mon Sep 28 21:53:50 2020 +0200 Multi-line comments cleanup (#19535) commit 3453d2d17a4744bd5a06be682baee993f3d996e2 Author: Pavel Melnikov Date: Mon Sep 28 16:55:46 2020 +0700 Change "Fr" on LCD to ">>" (#18830) commit 25bf561aedc076495fc20e29f7b21d3fe8634838 Author: Scott Lahteine Date: Mon Sep 28 04:39:29 2020 -0500 Default E3 V2 to English commit ad3c475dd154eb79d99a363381fc170dd81c55e1 Author: Scott Lahteine Date: Mon Sep 28 03:57:09 2020 -0500 Tweaks to git helpers commit 85573909d180913225aeac067d1fc172e1becf02 Author: Scott Lahteine Date: Mon Sep 28 03:55:04 2020 -0500 Update configs to 020007 commit 63e6437d661689688c20c3c02323ce37b6af6ce0 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Mon Sep 28 09:52:38 2020 +0300 MarlinUI for SPI/I2C TFT-GLCD character-based display bridge (#19375) commit 58deab191524dbc230c6a1680204a39ff8880d66 Author: Scott Lahteine Date: Mon Sep 28 01:13:27 2020 -0500 Rename LCD conditionals (#19533) commit ac900b17e01515d811a8cb0d53088add3f3e695f Author: Scott Lahteine Date: Mon Sep 28 01:10:36 2020 -0500 Prettier INI commit a11ba513899e8c4ed0400657635f18a37d1c650b Author: Scott Lahteine Date: Mon Sep 28 01:01:35 2020 -0500 Menu tweak commit 5cd004defe1ac7fd0ab98f6f702041575172b4e3 Author: Scott Lahteine Date: Mon Sep 28 01:01:52 2020 -0500 Update AnyCubic deps commit 03a5c7f52ad10da0b5143ca8356703826af8247a Author: Emperor Date: Mon Sep 28 04:38:30 2020 +0200 Thermistor: Kis3d Silicone heater + precision cast plate (#19528) commit 717de1e703356ab14ad946962b1fed8186ee0b92 Author: Tanguy Pruvot Date: Mon Sep 28 04:28:48 2020 +0200 Working LCD_USE_DMA_FSMC (#19522) commit 33f291d769a030c037ecfd5c898c5787f8cbe693 Author: Siana Gearz Date: Mon Sep 28 04:25:35 2020 +0200 Fix Allen Key Probe pin test (#19520) commit 7f93173659dd31f87599c7ef4f9352bccdeecd95 Author: Victor Oliveira Date: Sun Sep 27 23:22:08 2020 -0300 LVGL followup fixing "C", etc. (#19517) commit 46483512709d265c9bbf5a42e2d28b12f64f0edc Author: Scott Lahteine Date: Sun Sep 27 16:50:53 2020 -0500 CardReader cleanup commit 4bd1ecf8a72ff23e768d4f355190c9199b73a8e4 Author: Scott Lahteine Date: Sun Sep 27 16:48:03 2020 -0500 E3 DWIN: "No Media" message commit 584c836918e46fd318fe9ff908610bdd61c8fab4 Author: Scott Lahteine Date: Sun Sep 27 16:46:26 2020 -0500 E3 DWIN: General cleanup commit ac0511f02af0ca97b8a975b4cce2c3cce4ddb325 Author: Scott Lahteine Date: Sun Sep 27 16:51:59 2020 -0500 Allow M524 between M23 and M24 commit 32b854a98bd10fb28eaead42eb7edc92b28c0d23 Author: Scott Lahteine Date: Fri Sep 25 16:47:14 2020 -0500 Drop extra Bed PID commit 943a594ba0f2ccbe6494c15ebe67d1a634a7a604 Author: Scott Lahteine Date: Sun Sep 27 02:01:56 2020 -0500 Tweak MMU beeps, misc. cleanup commit def328eec1b553ef5e4bab8e9b65d1250d693e7f Author: Trocololo Date: Sat Sep 26 03:28:01 2020 +0200 MMU2 S Mode spins the BMG gears during C0 (#19429) commit e26edbc623e66efb2b4260d64004650b02365230 Author: Victor Oliveira Date: Fri Sep 25 22:05:23 2020 -0300 Allow ColorUI color customization (#19484) commit d06e526dc28f28e2394099280891b1739b04d547 Author: Victor Oliveira Date: Fri Sep 25 21:58:45 2020 -0300 Fix MBL "Click to continue" on Color UI touchscreen (#19514) commit 9a2de1570c3dd69e6feaf75331475619faf1ea50 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Sep 25 17:49:36 2020 -0700 SKR E3 Turbo followup (#19513) commit 3065e4f94100c6d99d148a049046a965574a7761 Author: Luke Harrison Date: Sat Sep 26 02:48:24 2020 +0200 Fix SKR 1.4 thermistor pin comments (#19510) commit 0fedd768193ba559bbca296bcaadbc3a8020908c Author: ellensp Date: Sat Sep 26 12:47:22 2020 +1200 Fix MKS Robin undefined pins error (#19507) commit fd83407991c7fba4f67c9bae79767c03ed61f839 Author: Victor Oliveira Date: Fri Sep 25 21:45:01 2020 -0300 Escape the M33 string arg (#19515) commit 3d521a2e34a4ed8057f22b809b0869126669ac9f Author: Victor Oliveira Date: Fri Sep 25 16:58:28 2020 -0300 TFT: No timeout on Move Screen (#19426) commit affb5e53dff42421f19d40e461d69fa4696bcbfa Author: Scott Lahteine Date: Thu Sep 24 21:46:13 2020 -0500 Sanity check old serial names commit d6b1563655343e4c4b4635f4748eb580a6f33526 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Sep 24 19:19:04 2020 -0700 BigTreeTech SKR E3 Turbo (#19500) commit 9d02cedfed0c68a4872cbfdb74d098b29a4cc547 Author: Jason Smith Date: Thu Sep 24 18:28:48 2020 -0700 Fix and improve STM32F1 serial (#19464) commit 449a31dea9b1280edb1ced9223e33177199ea766 Author: Scott Lahteine Date: Wed Sep 23 21:36:39 2020 -0500 Fix some pin inits commit bfa6cd36937d32bd2a7a47a5f66ec73b9bba4e11 Author: Scott Lahteine Date: Wed Sep 23 21:36:31 2020 -0500 HAL/serial followup commit f588d50d578aac370c28db9411bfcbd82ebca73e Author: Scott Lahteine Date: Wed Sep 23 19:45:33 2020 -0500 HAL and serial cleanup Co-Authored-By: Jason Smith <20053467+sjasonsmith@users.noreply.github.com> commit 27c067612c416e0eefa5ea6f8bea9cfe074599b4 Author: Scott Lahteine Date: Wed Sep 23 17:40:00 2020 -0500 Whitespace cleanup commit a3a5b334c488b4c5ae196757094c80a35bf28c13 Author: ellensp Date: Thu Sep 24 09:03:07 2020 +1200 Define UART pins for LPC debug based on LPC_PINCFG_UART (#19475) commit cbaba010f2e16fa2f4e6ff0bd6e9b43d97599b0c Author: ellensp Date: Thu Sep 24 08:44:15 2020 +1200 Preserve brightness in EEPROM validate (#19485) Co-authored-by: Scott Lahteine commit 8b69d697ddcd92adec8c5ab7a81ab95a9773f234 Author: Scott Lahteine Date: Wed Sep 23 15:33:54 2020 -0500 Teensy pins cleanup commit 632ac54440194b52830d4bb85af93c8e1298ab43 Author: Jason Smith Date: Wed Sep 23 13:07:34 2020 -0700 MKS Robin Mini uses ONBOARD_SPI_DEVICE (#19460) commit 873b5db13dc1064d83a60b55622139aa14886ed5 Author: Victor Oliveira Date: Wed Sep 23 17:06:36 2020 -0300 Include pins.h in dependencies script (#19468) commit 1978a29678391695fa6cf8127b35817af9703953 Author: Marcio T Date: Tue Sep 22 20:01:01 2020 -0600 New Touch UI buttons (#19465) commit f34ea44d73b7466b5b2c00d9d5eabb693a0271e2 Author: Jason Smith Date: Tue Sep 22 18:36:31 2020 -0700 Catch a TMC address conflict early (#19458) commit bc081473f20df8748171fbe96e36524a0467292d Author: Scott Lahteine Date: Tue Sep 22 19:58:06 2020 -0500 Fix up tests, warnings commit 0b18034055c5e14263e2e1a622da9ad102bf25f1 Author: Scott Lahteine Date: Tue Sep 22 17:51:59 2020 -0500 Fix Teensy 4.1 include commit d1eeb692c108b387342ab653ce29eb4a3cf56487 Author: Jason Smith Date: Tue Sep 22 15:36:59 2020 -0700 Update board/teensy comment (#19456) commit 05680a4662d7a62264d2003ac23f6b8a6a9df91d Author: makerbase <4164049@qq.com> Date: Wed Sep 23 04:57:17 2020 +0800 MKS SGEN L V2 adaptable heaters/fans (#19462) commit a08217a33cffbb25574c3f455a598421ccff57ee Author: Victor Oliveira Date: Tue Sep 22 17:44:17 2020 -0300 Define ::softSPI (#19419) commit 5ccb2c62a9c221ab4af0565d49a453969fc6b7c3 Author: riodoro1 Date: Tue Sep 22 22:08:14 2020 +0200 Fix up K8800 pins (#19476) commit 9dd49b6c6aff0d022cfcfdaacb3be6693b37f602 Author: Chris Pepper Date: Mon Sep 21 16:19:09 2020 +0100 Update pins_ANET_10.h commit b52a2176fe3241ddfd88b67e8023e7f5141fd1a1 Author: Jason Smith Date: Sun Sep 20 20:30:20 2020 -0700 Replace Serial with Serial1 in pins files (#19459) commit d2a36b38ca4a8c15edcbe85439cdb67b44631889 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Mon Sep 21 05:29:34 2020 +0200 Optional menu item for Assisted Tramming (#19447) commit 33788c840588e704c6e2e991e038facb972f314f Author: makerbase <4164049@qq.com> Date: Mon Sep 21 09:55:02 2020 +0800 Add MKS Robin E3P, improve LVGL UI (#19442) commit 32cd5a3dc4a65a6b67b11cec296a0c43b541e624 Author: Scott Lahteine Date: Sun Sep 20 19:08:08 2020 -0500 Add HAS_ROTARY_ENCODER commit ee1232051c718834567acb7df93f385c1c5227a4 Author: Scott Lahteine Date: Sun Sep 20 19:07:59 2020 -0500 Cleanup before MKS changes commit b3890d385c60e39681e4b1f2cf5669ba36c15fa5 Author: Scott Lahteine Date: Sun Sep 20 18:29:08 2020 -0500 Add multi-extruder condition commit 5a35595a3a910e7bcba850b801a4056fa656e4be Author: Scott Lahteine Date: Sun Sep 20 18:24:05 2020 -0500 Whitespace cleanup commit 584a8cd1a8b26d4546ab8036b26a130915cfc129 Author: enigmaquip Date: Sat Sep 19 09:19:45 2020 -0600 Fix Creality DWIN Control menu icons (#19441) commit 7a0d6552928ea885b76c4eac7bbb95fd1187fa9b Author: ellensp Date: Sun Sep 20 03:18:42 2020 +1200 Ultratronics Pro SPI pins (#19444) commit 2f483a25e96edac215cd3d62b1e386240091bc91 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sat Sep 19 17:17:24 2020 +0200 Optional Host Start menu item (#19443) commit 7735be367face5bf5cb62c28f9b66aaaeda67da8 Author: Marcio T Date: Sat Sep 19 08:23:56 2020 -0600 Fix case light brightness save/load (#19436) commit a50633d8e0e84bace52d35fabd4e222fcb732a79 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat Sep 19 10:20:15 2020 -0400 Fix compile for Taz Pro (#19424) commit dc7e2965d60593aeadcb4ca9bc7f51fb2d0041ca Author: Scott Lahteine Date: Sat Sep 19 07:56:01 2020 -0500 Change some dwin defines commit 9065a8da894bd95df9de2ed031bdaf292d7b12df Author: Cole Markham Date: Sat Sep 19 08:14:34 2020 -0500 Fix CoreXY compile with backlash cal. (#19422) commit 9d60047018663309013e26bec73767b5dd4b91c0 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Sep 18 02:45:56 2020 -0700 Fix missing include (#19418) Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com> commit 9d5f978d00fc12052813311a832cff248c8b3b84 Author: Victor Oliveira Date: Thu Sep 17 08:52:21 2020 -0300 Move screen for Color UI (#19386) commit 23376b8a31872e7eb3bc67f3b1cdc57e6aaa53ed Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Thu Sep 17 07:36:21 2020 -0400 Host Action: Start (#19398) commit 70c58719101b1b9cb320716633bc79e40a77ba2c Author: jahartley <52391697+jahartley@users.noreply.github.com> Date: Thu Sep 17 07:01:10 2020 -0400 Expose JOYSTICK_DEBUG to the general user (#19394) Co-authored-by: Scott Lahteine commit 9d1b1cf0733a6facabda53f2d7ddba2361724c6c Author: Victor Oliveira Date: Thu Sep 17 07:52:47 2020 -0300 Fix MKS UI SPI flash typo (#19410) commit 90dea98a144ead5c4daacd18810da6e9dfb08794 Author: Marcio Teixeira Date: Mon Sep 14 16:32:54 2020 -0600 Add warning to ExtUI Bed Mesh Screen. (#19397) - Show a warning on the Mesh Bed Leveling screen if some points aren't probed. commit 9cdb8ca244dcbea0c6d33b2ae40f9d7f059bf4c7 Author: deram Date: Thu Sep 17 13:41:13 2020 +0300 SHOW_REMAINING_TIME for HD44780 character LCD (#19416) commit 7e56e6c4eaaad6ec8a841b5459761c2e1f7bbaec Author: cosmoderp <36945803+cosmoderp@users.noreply.github.com> Date: Thu Sep 17 06:35:04 2020 -0400 E3 V2 DWIN: Z-Offset, cleanup, versatility (#19384) Co-authored-by: Scott Lahteine commit c407c08b0b9528ce60da6b0749044d7c2231eb87 Author: enigmaquip Date: Thu Sep 17 02:17:47 2020 -0600 Add more DWIN commands, docs (#19395) commit 08a7dedbc929150d2fa7df5cdd8d8442f2cf238f Author: tovam Date: Thu Sep 17 10:07:03 2020 +0200 Fix missing spaces in info menu (#19404) commit 68c98811a16c6e858521dbe26e8be72c854aff6e Author: Jason Smith Date: Thu Sep 17 01:06:01 2020 -0700 Demo and test multiple PID defaults (#19413) commit 07f13c28ee1a588b6f90d67259f5efb9985c86c4 Author: Scott Lahteine Date: Wed Sep 16 05:52:01 2020 -0500 MarlinUI percent methods for all commit fbd812ebb346284398618c1d413e37041b27f4dc Author: Scott Lahteine Date: Wed Sep 16 06:56:48 2020 -0500 More DWIN cleanup commit 34d0b5de90ecb24e5830f9db537ba3f9c5b1111e Author: Scott Lahteine Date: Wed Sep 16 04:35:30 2020 -0500 E3 V2 DWIN cleanup commit d3f88a2482dba02d7152994cd27e778e46728f8f Author: Victor Oliveira Date: Mon Sep 14 19:16:19 2020 -0300 Only set up SPI pins as needed (#19372) commit 8debad803ca524c53d39334e0eac80d7d2303b3f Author: Zachary Annand Date: Mon Sep 14 03:28:21 2020 -0500 More strict STATIC_ITEM_N (#19378) commit 9aceb3711bff4b09b4629cbe974bcf9bbb78b4b9 Author: Marcio T Date: Mon Sep 14 02:25:20 2020 -0600 Add missing FTDI EVE menu source (#19382) commit 8e3ac54de3e28925f1d7b9f0d6e32be144bf19e1 Author: Scott Lahteine Date: Mon Sep 14 02:48:45 2020 -0500 Allow E3 V2 DWIN without EEPROM, POWER_LOSS_RECOVERY commit 2877dc9794e8ecef454434574f7e701f563b90a1 Author: Scott Lahteine Date: Thu Sep 10 22:02:18 2020 -0500 M115 strings commit c6e35ce066ebb717b3a2a550f615270bea1e77c7 Author: Scott Lahteine Date: Thu Sep 10 20:44:13 2020 -0500 Always show Compiled: commit 7742e70865a6fe629e59d97f87aeb5530f791716 Author: Scott Lahteine Date: Fri Sep 11 23:05:27 2020 -0500 Better choice of code Followup to #19344 commit 4fdfdaf2e6ee22d154e3e052ebe412437b34ca86 Author: ellensp Date: Mon Sep 14 16:58:39 2020 +1200 Improve temperature runaway, idle timeout (#19339) Co-authored-by: Scott Lahteine commit 2396b4e27fcf9d5dfbb526e2ad4b95994630519e Author: Scott Lahteine Date: Sun Sep 13 18:06:14 2020 -0500 heater_ind_t => heater_id_t commit a941faccb0f8ed5826e990976ac18119f73841e8 Author: mmajoor Date: Sun Sep 13 06:33:55 2020 +0200 Allow SWD debug on Robin Nano (#19345) commit 196a72b29e2e82c90a9a5f19d6263e9b05fc7aa9 Author: Marcio T Date: Sat Sep 12 22:32:00 2020 -0600 Touch UI "Leveling" menu, misc. fixes (#19349) commit c1dcbab932f02c4e759dc514633b185f460f2e5b Author: ellensp Date: Sun Sep 13 16:01:03 2020 +1200 Fix extra string substitution bug (#19351) commit 4d146672669550483d9d2692a1c6e5f5ac719295 Author: ManuelMcLure Date: Sat Sep 12 20:59:20 2020 -0700 Read from backup TMC StealthChop state (#19364) commit c517c2ea653aa44e0756a45c503ab5f07d750172 Author: Jason Smith Date: Sat Sep 12 19:52:46 2020 -0700 Fix EXP2 pin define for MKS SGEN_L (#19369) commit ee32e3eb40404b17e257caf2c8b90cdc809df559 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun Sep 13 04:51:20 2020 +0200 Update Italian language (#19365) commit 09d1bf37e7eb161dea98fda7c4a9bd6c6e20843c Author: Jesse S Date: Sat Sep 12 19:50:15 2020 -0700 Highlight Creality DWIN menu icons (#19368) commit bf6ce68ed18ca3e9744e60d2026df45f28e076bb Author: Neskik Date: Sat Sep 12 05:51:19 2020 +0200 M872 wait for probe temperature (#19344) commit ad5e73d772bd0c57525536e9d5c09d7fd93d6334 Author: Haxk20 <16738302+Haxk20@users.noreply.github.com> Date: Sat Sep 12 02:53:06 2020 +0200 Fix Print Stats appearance (#19348) commit 26492ff0ea041c677697abee2a3f526988d0f781 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Sep 11 00:12:49 2020 -0700 Fix Creality RET6 env - RE (#19340) commit ade9476721fb88fcdc23a770aebbbae32db10583 Author: Scott Lahteine Date: Thu Sep 10 17:34:41 2020 -0500 Clean up W25QXXFlash class commit a2a53406c89228f5cf4313b4776b6005df1c4337 Author: Scott Lahteine Date: Thu Sep 10 20:52:00 2020 -0500 Use F() for Ender 3 V2 DWIN commit 5e3d051b6a96b9666a67eb7af91d6aad23a9c2b7 Author: Scott Lahteine Date: Thu Sep 10 18:06:29 2020 -0500 Translate encoder comments commit e48b283e3955c3863b51732aa3a229c9a198c1e6 Author: riodoro1 Date: Fri Sep 11 00:06:37 2020 +0200 Fix missing BOARD_K8800 (#19331) commit 3adb07aa00171de79ce15bfb6f22a08e1a67d39a Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Thu Sep 10 23:47:58 2020 +0200 Fix "too cold" in M600 (#19332) commit 136b7a53054e821e422bfcb86d4efb95f4ab3c34 Author: Scott Lahteine Date: Thu Sep 10 02:50:38 2020 -0500 Warning if SDCARD_READONLY should be disabled commit d6bbcd020b7f13e5b26f2563f95a99a646240691 Author: Scott Lahteine Date: Wed Sep 9 17:56:01 2020 -0500 General cleanup commit 42619a3a81fe8201640a9e636494dcef05a3e6b2 Author: Victor Oliveira Date: Thu Sep 10 02:41:26 2020 -0300 LPC: Finish DMA transfer, use HW SPI class (#19191) commit 8393c6a63d030bd9b3ae9578a74086678186e42a Author: Victor Oliveira Date: Thu Sep 10 00:46:50 2020 -0300 Raise STM32F1 UART IRQ Priority, add error handling (#19301) (Error handling for Overrun, Framing and Parity.) commit 13f2915b650a33918ca9f6c8b569fa2b475045e6 Author: Zachary Annand Date: Wed Sep 9 22:04:10 2020 -0500 Fix Separate Neopixel menu labels (#19303) commit f7885bbddef3e70a87917a1bbfbd75a7f4c9c65c Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Sep 9 19:59:42 2020 -0700 Warn in platformio.ini about RCT6 512K (#19312) commit ba6659f6bebf51533aecd717be76f1bc2ccb3d08 Author: Marcio Teixeira Date: Tue Sep 8 14:31:20 2020 -0600 Fix ExtUI SD sorting, compile issues commit 2af9e2f759a8950497a00d7152fefb6203c15f48 Author: makerbase <4164049@qq.com> Date: Thu Sep 10 10:48:42 2020 +0800 MKS Gen L V2.1 (#19314) commit e6cf9591701ca615650af3e969ce7a44b48a6a60 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Sep 9 19:23:01 2020 -0700 Fix compile with Danish, Basque (#19325) commit ea39d3c45e0a9076f2cd74702af96b2a9d3c43cc Author: bilsef Date: Wed Sep 9 16:57:20 2020 -0700 Support for Teensy 4 (#19311) commit a8904d25baf979a79983db1937db4e46295fea05 Author: Scott Lahteine Date: Tue Sep 8 22:14:59 2020 -0500 Minor HAL cleanup commit 784016a25ec8dd45adc3cd38eca34137125d6797 Author: Jason Smith Date: Mon Sep 7 19:41:48 2020 -0700 Update HAL/STM32 platform to 8.0 (#18496) commit 5fcfecc56e6263dd1cb77376b5fd0fb439ff6bd7 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Sep 8 04:29:45 2020 +0200 Make M600 heat up the nozzle. Reset runout on fail. (#19298) Co-authored-by: Scott Lahteine commit 09a5014b3c6f3860d80da0c05195b4b527fb6ae6 Author: Jason Smith Date: Mon Sep 7 15:07:53 2020 -0700 TFT is neither "graphical" nor "character" (#19297) commit f5dc18730c2e1925d37018e04f835d0a826d5265 Author: Victor Oliveira Date: Mon Sep 7 05:17:35 2020 -0300 Sanity-check BABYSTEP_DISPLAY_TOTAL with ColorUI (#19284) commit 0bd7a2fc7eaf547d9e225a2e83d2a853a89e6118 Author: Kadah Date: Mon Sep 7 01:15:42 2020 -0700 Fix M166 Gradient Mix for DELTA (#19285) commit b186ab90a2caa40887d3d64c65286d45087e2dda Author: Zachary Annand Date: Mon Sep 7 02:59:31 2020 -0500 Separate Neopixel followup (#19287) commit c360705e6a72cd0fee4770c7ff668af5f2dd5d53 Author: Scott Lahteine Date: Sun Sep 6 21:40:58 2020 -0500 Clean up LCD conditionals, DWIN commit 9172271c7f2e563877707aa55dc92ee2ce2c11ec Author: Scott Lahteine Date: Sun Sep 6 22:51:53 2020 -0500 Whitespace cleanup commit a1860ed68019d004d290912ed38f29f1d0a4c2aa Author: Jason Smith Date: Sun Sep 6 18:10:25 2020 -0700 Adjust GTR PeripheralPins to avoid timer conflicts (#19183) commit 643f1925150b8c2a72a3e6ffa19bc63f1255e20a Author: Victor Oliveira Date: Sun Sep 6 22:04:20 2020 -0300 STM32F1 EP with USB_COMPOSITE (#19281) commit a8db9f52ecdc52d6b5e4860b164d3bcab4981ae2 Author: Zachary Annand Date: Sun Sep 6 20:00:24 2020 -0500 Menu items for Separate NeoPixel (#19280) commit 83dba77955d7b70e933a108055216e42a394c892 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun Sep 6 15:51:19 2020 -0700 Clarify disabling StallGuard for axes (#19263) commit e79af802b1d1eb52016d27c975df55446a0c01e6 Author: Marcio T Date: Sun Sep 6 16:37:16 2020 -0600 Touch UI long filenames fixes (#19262) * Improvements to FTDI DLCache functionality. * Better handling of long file names in Touch UI - Long file names now truncated and shown with ellipsis. - Increased display cache buffer to allow for longer filenames. - Visual error message when display cache is exceeded. commit 3a1145b999145903dffcf63a226ecce2fe305037 Author: cosmoderp <36945803+cosmoderp@users.noreply.github.com> Date: Sun Sep 6 18:34:08 2020 -0400 Fix Ender 3 V2 (DWIN) buffer overrun (#19268) commit 24fbfae0fdb08e5ab970c4b1f6d76d35ad26269b Author: Victor Oliveira Date: Sun Sep 6 19:29:43 2020 -0300 Fix STM32F1 SPI device init, MKS_LCD12864 (#19271) commit 563bd5b5bca129e16c61750d1485d303fc3df6b4 Author: Victor Oliveira Date: Sun Sep 6 19:23:36 2020 -0300 Emergency Parser for STM32F1 (#19279) commit c1d9e8d5714e4036575629648273d90e1b6bd88a Author: Scott Lahteine Date: Fri Sep 4 13:50:08 2020 -0500 SD card debugging commit f7cb9455c86cc6410964fe8237f295e7eabab707 Author: Scott Lahteine Date: Fri Sep 4 19:57:07 2020 -0500 No 'ls' if media isn't mounted commit d94b5b5ad062f1979452fe8c939ecc8ff8801cb6 Author: Scott Lahteine Date: Fri Sep 4 14:15:06 2020 -0500 Fix Creality V4 SD Detect commit e2625db1ddfa508fbb3652cb11d7cf71948ab7d1 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Sep 3 21:15:45 2020 -0700 Tweak ESP32 Wifi sanity-check message (#19257) commit 47753d8a016be3a2a8d5c82a5d49c692396b904a Author: Victor Sokolov Date: Fri Sep 4 05:12:53 2020 +0400 MarkForged kinematics (#19235) commit 94809feac7cd59f7f504fd248ba9256e8d301c75 Author: Greg Nutt Date: Thu Sep 3 18:52:14 2020 -0400 Smoothieboard GLCD w/ SD support (#19241) commit 6a511b6ea7ba9a7509afda36e020c85522a4a553 Author: Victor Oliveira Date: Thu Sep 3 19:46:05 2020 -0300 Only show "SD Init Fail" with detectable media (#19236) commit ffba220ae821edc74ef5f71d0e1bfc590af4e2fb Author: Zachary Annand Date: Thu Sep 3 17:43:52 2020 -0500 Separate Neopixel followup (#19250) commit 43e40524c479c72247bb79b0fc19c7ea3de3f6b5 Author: Tanguy Pruvot Date: Fri Sep 4 00:40:29 2020 +0200 Fix Longer3D TFT defines, disable DMA (#19251) commit 4f1a14532b51d614afcdcba8b46b3d88f0439a3f Author: Scott Lahteine Date: Thu Sep 3 16:52:31 2020 -0500 Hide multi-step G29 on Ender 3 V2 commit c113984b3240ff5110cc53f0614a08ad8f9bddc4 Author: ManuelMcLure Date: Tue Sep 1 23:32:52 2020 -0700 Fix UBL 'G29 I' for large meshes (#19231) commit edba363d54c601dfe4d607f8fe71911ff338f891 Author: makerbase <4164049@qq.com> Date: Wed Sep 2 07:20:16 2020 +0800 MKS SGEN L V2 (#18822) commit 919ea2a76d9d454e91a1b552953b3a6ce4bf33af Author: Victor Oliveira Date: Tue Sep 1 19:09:28 2020 -0300 Fail SD mount without SPI re-init (#19226) commit 755a4440e7d50ea7c35f64289355d21d3316db60 Author: Stéphane <43587190+stef-ladefense@users.noreply.github.com> Date: Wed Sep 2 00:05:52 2020 +0200 Fix Anycubic LCDs / Trigorilla 1.4 pins (#19220) commit c7335bcd4d0a83cfe74a2ae601a6c19aeb056e30 Author: Zachary Annand Date: Tue Sep 1 17:03:28 2020 -0500 Separate Neopixel followup (#19224) commit 881bb7bf0a9f36f9c8a5ba0c5e75db7b086ec4d1 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Sep 1 23:59:29 2020 +0200 Delete old LCD strings (#19227) commit 2212bf85b7550faa81deefd1e2a8a7ff943fcba6 Author: Stéphane <43587190+stef-ladefense@users.noreply.github.com> Date: Tue Sep 1 05:27:42 2020 +0200 Fix Anycubic I3 Mega (S) original screen % display (#19210) commit 0c85e2838c54642b15a4ebc40d454f1fcca8be0f Author: Ludy Date: Tue Sep 1 05:23:28 2020 +0200 Update German, fix Mix component index (#19206) commit 7967590682602a8a878a9374a2e1b6fddee8cbd5 Author: Martin <34376785+G4Cab@users.noreply.github.com> Date: Tue Sep 1 01:56:58 2020 +0200 Permit touch params override w/ Robin nano (#19196) commit df7e35ccd7f40ff2999a45754fbc5e531ea7f528 Author: Zachary Annand Date: Mon Aug 31 16:06:24 2020 -0500 Separate Neopixels followup (#19179) commit 414136f33afc431642e189f574c12e8ec23d9e28 Author: ellensp Date: Tue Sep 1 08:05:42 2020 +1200 Fix 'cmd' array warning (#19193) commit ee572856e9b2b5bd2b07bb5c079500959fdd4bf9 Author: Scott Lahteine Date: Thu Aug 27 16:38:02 2020 -0500 Add set_all_homed commit 7d2e4481c73ef427d424f696f59e746f904c0176 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Thu Aug 27 23:05:53 2020 +0200 Mark axes not-homed with HOME_AFTER_DEACTIVATE (#18907) commit d10f7eae31f1c4628611e1052085de6301c8369c Author: Scott Lahteine Date: Thu Aug 27 14:48:42 2020 -0500 set_axis_not_trusted => set_axis_never_homed commit 757ab484ac7e0ecb6124bccbb6afcbe95f65bb4d Author: Zachary Annand Date: Thu Aug 27 14:18:16 2020 -0500 Independent Neopixel option (#19115) commit d62933fba577b1cad7364e41ea1dfcfe96b33e71 Author: Scott Lahteine Date: Thu Aug 27 14:01:56 2020 -0500 Fix Creality V4 probe pin commit a6829838c68bf0a8228971a091642484bbe65c06 Author: Scott Lahteine Date: Thu Aug 27 14:01:36 2020 -0500 Fix small typø commit fd1731a7b9b73e6809886864b6468b298c448a78 Author: Scott Lahteine Date: Thu Aug 27 12:22:47 2020 -0500 Allocate sufficient MSG_MOVE_Z_DIST buffer See #19158 commit 9419331500605aea050534ca469f703a6fc31640 Author: Victor Oliveira Date: Thu Aug 27 13:29:07 2020 -0300 One MARLIN_DEV_MODE warning per rebuild (#19163) commit 8a24c33151525fc617db76fa5010cbd186d23082 Author: George Fu Date: Thu Aug 27 08:41:15 2020 +0800 FYSETC S6 2.0 (#19140) commit f5e94cd7f1fcf380c6f286e1ae9183754937c794 Author: thordarsen <50306469+thordarsen@users.noreply.github.com> Date: Wed Aug 26 06:23:56 2020 -0400 Fix SINGLENOZZLE fan speed bug (#19152) commit 7769f19bf5cd42ec71d40cb01b63618268924d15 Author: ellensp Date: Wed Aug 26 22:14:54 2020 +1200 Fix NEOPIXEL_STARTUP_TEST last delay (#19156) commit 3b4779fa15679392c11787ace0d5c1ae6306f731 Author: Victor Oliveira Date: Wed Aug 26 07:13:58 2020 -0300 TFT (plus Hardware SPI) for LPC (#19139) commit 5059586fc39d38b6e07e2bced4a595154a7fc777 Author: Scott Lahteine Date: Wed Aug 26 02:15:43 2020 -0500 Prusa => Průša commit 8670f475b8cb309ad2a068d2c1fc648bd2c19087 Author: Colin Godsey Date: Wed Aug 26 00:32:56 2020 -0600 Direct Stepping update (#19135) commit 1b129ede4ea60cd8e033d7beb422abc75da68ea4 Author: Marcio Teixeira Date: Mon Aug 24 08:56:19 2020 -0600 Fixes to FTDI Touch UI (#19134) - Fix unused variable warning - Fix for filament runout sound - Fix for developer menu access - Fix compilation error when using CALIBRATION_GCODE - Remove material labels in change filament screen - Add decimals to status screen Z coordinate - Add more descriptive message on heater timeout commit 6844ef21d469c41b5319a75dbcd57b1ad7a1586a Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Aug 25 22:44:15 2020 -0700 Add Einsy Rambo Filament Runout Pin (#19136) commit 6043f5d5d0bea2752e4d0030775466d45b2c2ce7 Author: Jason Smith Date: Tue Aug 25 22:43:33 2020 -0700 Fix SD pins for SKR Pro and GTR (#19047) commit 0070a0642ba8fb6a68c998dc10cf2df00172c972 Author: Scott Lahteine Date: Tue Aug 25 23:57:48 2020 -0500 Warn about MARLIN_DEV_MODE commit 9bf6ddd4f1e34f78e80e01b252e48b0968d45636 Author: Scott Lahteine Date: Tue Aug 25 23:34:53 2020 -0500 No COM_PIN needed for DWIN commit 0decb50fcd8b5a87534f2f28dc446d7c950e17f0 Author: ellensp Date: Wed Aug 26 01:16:43 2020 +1200 LEDs followup (#19133) commit 40b89456af556d60cfff79c27a3fd50d3edf689f Author: Victor Oliveira Date: Mon Aug 24 15:23:32 2020 -0300 Color UI + Robin Nano test (#19118) commit 008362cd77e9e856f2846d89981742e3e748221b Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon Aug 24 16:54:25 2020 +0200 Fix auto-power in PID autotune (#19119) commit 9d2241efe75e7183f13eae861c7adca550cce736 Author: Scott Lahteine Date: Sun Aug 23 23:57:51 2020 -0500 Minor cleanup w/r/t LEDs commit f473145d42f0c340501215475c4476c0789a13ed Author: Oleksii Zelivianskyi <50808386+alexeyzel@users.noreply.github.com> Date: Mon Aug 24 06:13:49 2020 +0300 TFT32 for MKS Robin Nano 1.2 (#19031) commit b93a4bae45268885bbc3f1f4fe947d724a8c6505 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sun Aug 23 12:08:47 2020 +0200 Feedrate comment (#19116) commit 42604cf4b261e5b91feeb857098f5f15de49ad88 Author: Scott Lahteine Date: Sun Aug 23 03:14:11 2020 -0500 Neopixel => NeoPixel commit 19a237bbb0c40a8e9e1eead65e6ee1312c6dc1a4 Author: Scott Lahteine Date: Sun Aug 23 02:45:58 2020 -0500 Fix up conditions, comments commit ba3b995e58ba33c796a4e5e0e6cb6086bb8acfbc Author: Scott Lahteine Date: Sun Aug 23 02:07:42 2020 -0500 Fix DUET_SMART_EFFECTOR commit e7b730528efb4067e41d30eb45a633b4404c8e0f Author: Scott Lahteine Date: Sun Aug 23 00:12:03 2020 -0500 Consistent static/value item macros commit db04bcb7273389d145ed4e54eb949d897f7d3c1c Author: Scott Lahteine Date: Sat Aug 22 17:28:44 2020 -0500 Fix probing margin sanity-check commit f3d0b49928d633766d3bbc4320c41ed7d3e6e51d Author: Scott Lahteine Date: Sat Aug 22 16:40:22 2020 -0500 PGMSTR constexpr => const commit fe89f5fdff3d2d78fcb37e77b91680d48ce41cb0 Author: Mathew Winters Date: Sun Aug 23 09:20:37 2020 +1200 NOZZLE_CLEAN_NO_Y (#18870) commit 05d2bb0df595273644eba176160fc8c4f5f3fbd2 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sat Aug 22 09:04:28 2020 +0200 Change XY_PROBE_SPEED format to (x*60) (#18997) commit 98ec7b61a963cb7bd18e8a6c93514c90aad60448 Author: Scott Lahteine Date: Sat Aug 22 01:22:14 2020 -0500 Reformat pins files commit 8565f1e681e6b14cb8a2a06c7d459302ad6184bb Author: mmajoor Date: Sat Aug 22 07:35:39 2020 +0200 Permit ST7789V orientation override (#19044) commit 3aa5b457681db7bceb1d21c6b509e18ce5166888 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat Aug 22 06:49:39 2020 +0200 Prefer Servo AVR timer4 over 3 (#19025) commit e02fb4a862f7de3d581864944be81b30f83eda5d Author: Greg Nutt Date: Sat Aug 22 00:47:25 2020 -0400 DIGIPOT_I2C pins for SMOOTHIEBOARD (#19098) commit ee19e1d3ffd38ddbf9675a3731ea10725be0905e Author: Steven Haigh Date: Sat Aug 22 14:44:21 2020 +1000 Translatable strings on Ender-3 V2 DWIN (#19053) Co-authored-by: Scott Lahteine commit fe1e880ffe2ead1bee5734cc563d2f493a9ac871 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat Aug 22 06:13:43 2020 +0200 HIGH/LOW naming of pin state settings (#19089) commit a5dc42c47cf40d8c8d55403a7b14330151402d8e Author: Scott Lahteine Date: Fri Aug 21 22:50:45 2020 -0500 Update copy_marlin_variant_to_framework.py commit 070412a6a5faf60b29ac3b64ce362193efeb9431 Author: mmajoor Date: Sat Aug 22 05:04:31 2020 +0200 GRAPHICAL_TFT_ROTATE_180 for ST7789V (#19042) commit 0ffd5aa743abb2d952c501f07c56f022583c20c6 Author: Victor Oliveira Date: Sat Aug 22 00:03:32 2020 -0300 CI with PIO-dev (#19058) commit 744f74506fb64aa4f5fa0542b5a86e8cffab2a56 Author: Scott Lahteine Date: Fri Aug 21 21:59:59 2020 -0500 More menu header fu commit 46744e8433b224f30bf55584f384c40354a56062 Author: ellensp Date: Sat Aug 22 14:56:18 2020 +1200 Creality3D v4.2.7 (#19088) commit 038945110f6ce5c2ed62ab21276cc731aa6376b8 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat Aug 22 04:20:30 2020 +0200 Optional homing in LCD Repeatability Test (#19104) commit 7852b060381948b8f94f07b7b627de059cea766a Author: Scott Lahteine Date: Fri Aug 21 20:26:16 2020 -0500 Menu headers followup commit dded56c4bbe62c0ce998e9573af470db5876fe75 Author: Victor Oliveira Date: Fri Aug 21 20:54:21 2020 -0300 Emulated DOGM via HAL TFT, XPT IO (#19017) commit 7dea6c53eda17a10705727982f3f71d94aa40c36 Author: Scott Lahteine Date: Fri Aug 21 05:21:55 2020 -0500 Remove extraneous defines commit fd0a3df315a5597357acdee72e4978548e969053 Author: Scott Lahteine Date: Fri Aug 21 05:21:34 2020 -0500 Header for individual menus commit a1bdc1974aa9021a0cad8a76878a3eb8b1b39af7 Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Sat Aug 22 06:06:51 2020 +0800 Broadcast SD Print Completion (#19102) commit 24636eb7f1ab40769ee6c1f2fcb77a3aeb68fa86 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Aug 21 15:04:32 2020 -0700 Fix M512 comment (#19108) commit 737a5453d9ec6ceb7b3b1e6767aa5cfb64cbc4b2 Author: Scott Lahteine Date: Fri Aug 21 16:22:53 2020 -0500 Allow 'ghtp' to set a specific remote commit f860152a35696b196c780184550e5b47004e1e33 Author: Scott Lahteine Date: Fri Aug 21 02:52:05 2020 -0500 Fix up mixer menu display commit 87d2c471db8f93ba6bb4e2406b1ca84818dec6a4 Author: Scott Lahteine Date: Fri Aug 21 02:42:50 2020 -0500 Apply specific menu item types commit ca54d67814dd552b20f4eb8d51501ad9ea0a4f26 Author: Scott Lahteine Date: Fri Aug 21 02:41:33 2020 -0500 Fix Select Screen cancel destination commit 615af841f0521f38cb605432a1755e07710e3286 Author: Scott Lahteine Date: Thu Aug 20 00:08:06 2020 -0500 Update some comments commit c43d264d3e52dd9cc926518333ad1a1fcc0b5dfe Author: Scott Lahteine Date: Thu Aug 20 02:47:16 2020 -0500 Add custom_verbose, custom_gcc deps flags commit d1aed522803db945841472087df3040f3dc897d4 Author: Scott Lahteine Date: Thu Aug 20 01:38:22 2020 -0500 Move ExtUI displays to sub-folder (#19070) commit 7e7e870eae769af80517afdab3259cd73a734ff5 Author: Scott Lahteine Date: Thu Aug 13 20:03:49 2020 -0500 Config adjustments commit f7dade8c2c83257df8cc0e32d84334e400161aaf Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Thu Aug 20 03:11:20 2020 +0200 Configurable number of M106 fans (#18883) commit 24139c6ff0cc1dc4034b193e9f96605fa02c3353 Author: ellensp Date: Thu Aug 20 12:18:39 2020 +1200 Env mega2560ext adds pins 70-85 (#19022) commit 16c1e8049157fd1b824529759108d567984b89a7 Author: Steven Haigh Date: Thu Aug 20 09:58:18 2020 +1000 Default Filament Runout Sensor enabled state (#19013) commit 5a7979b435d82d16eb946152a1af67e28caa9076 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Wed Aug 19 09:59:37 2020 +0200 Fix __ARM__ / __arm__ typo (#19063) commit 349bddc652d7b6986c9613152de52da5bb58fb5a Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Wed Aug 19 10:58:41 2020 +0300 "SD init fail" status error (#19064) commit acc90ad09fc0ddad0adb44cfba834c68f52069dc Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Wed Aug 19 09:49:46 2020 +0200 Fix PSU on for PID autotune (#19066) commit 7a750156ef37de5ab1c185e5fb553c3640621873 Author: Scott Lahteine Date: Wed Aug 19 00:49:23 2020 -0500 Creality DWIN cleanup commit 8075eafe91e5eff3922a076fbd52a8034ce320ba Author: Scott Lahteine Date: Wed Aug 19 01:49:38 2020 -0500 Creality DWIN simple beeper commit 58975fc8b54234eb093ad6b6f85c8ecc3201a04f Author: ellensp Date: Sun Aug 16 15:57:07 2020 +1200 Checks for CR10_STOCKDISPLAY with Creality v4 (#19019) commit 8320c435892a9e2dc7a55d30e3b7c679ba605b82 Author: Julius Mumme Date: Sun Aug 16 05:50:28 2020 +0200 Fix IS_PROBE_PIN macro (#19024) commit 73d1a98ce6b3525d1bd69c36767f0584bfbea8ec Author: Victor Oliveira Date: Sat Aug 15 21:38:13 2020 -0300 Update build script for PIO 4.4 (#19034) commit f9f514a46c8b4ea1ee06844eaab0739231056f96 Author: Scott Lahteine Date: Fri Aug 14 08:45:48 2020 -0500 Fix ExtUI base methods commit 16f2f2bce79505d0b8e605f542d7c4b859e2083a Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Fri Aug 14 15:41:44 2020 +0200 Let laser/spindle use free AVR servo timers (#19011) commit 8258a76c9b119fe86768c1c0bfacd92f9d986533 Author: Robby Candra Date: Fri Aug 14 20:38:00 2020 +0700 Wait for hotend temp before Resume move (#19009) commit c9ddbaa2c0bbd83df213043b17216e940da51dca Author: Tommy Hartmann Date: Fri Aug 14 15:35:53 2020 +0200 ENDER2_STOCKDISPLAY for BTT SKR 1.4 (and Turbo) (#19002) commit a99c844296045bb75841217e625016674600b6b2 Author: ellensp Date: Sat Aug 15 01:25:45 2020 +1200 Add option to arrange Neopixel sets in series (#18992) commit 492f49c06afcdf949d7d0d725d77d978c9e30550 Author: Scott Lahteine Date: Fri Aug 14 06:26:18 2020 -0500 Unhide /src folders in Sublime commit 80480ae9197f529cc5eee51236b83ace39f10d12 Author: Scott Lahteine Date: Fri Aug 14 00:32:59 2020 -0500 M80 followup commit 1327eaa83b03f0356d7bfc25c1720813c27c3eee Author: Scott Lahteine Date: Fri Aug 14 00:16:12 2020 -0500 Do runout.reset after EEPROM read commit eee101b9dd35f3bbfee7d941e8b6f82baba408d9 Author: Scott Lahteine Date: Thu Aug 13 21:30:12 2020 -0500 Clean up M80/M81, DWIN commit 77ab354a5a957ea75c2d433fc17ccdec6bddaddb Author: Scott Lahteine Date: Thu Aug 13 21:17:48 2020 -0500 Fix touch test commit 1801eb6393452899aa614a2229e5c88c539a1d35 Author: Scott Lahteine Date: Thu Aug 13 00:47:09 2020 -0500 config-labels.py needs py3 commit 28d6dc38af2667f850189610ba2496d1f0cbaea0 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Fri Aug 14 05:37:57 2020 +0200 Fix 'sync_plan_position' call (#19016) commit dc6e3d083ea0dfe787652b2c9ffb96bdb25cd908 Author: Tanguy Pruvot Date: Fri Aug 14 05:32:01 2020 +0200 TFT: Restore ILI9341 colors and reversed logic (#19010) Followup to #18877, #18901, #18817 commit 4e7c5f19fe86ec2d77146ad5212f939c53dc5e42 Author: Victor Oliveira Date: Thu Aug 13 20:31:59 2020 -0300 Optimize LVGL with HAL TFT IO (SPI and FSMC) (#18974) commit 3dfbdbc66cb6e6f668a961ec130d768332099877 Author: Scott Lahteine Date: Wed Aug 12 16:46:51 2020 -0500 String interpolation for 2-digit numbers (#18998) commit 95f373448d7ed3505968fefd5ddcfec9215cd899 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Tue Aug 11 10:11:40 2020 +0200 Mention units for MANUAL_FEEDRATE (#18993) commit 648b253f414723d030ce3efa2eecdfe65079fea5 Author: Robby Candra Date: Tue Aug 11 08:25:35 2020 +0700 EVENT_GCODE_SD_STOP => ABORT (#18978) commit 3e2b272239f03266843a020b6857a78e0a501565 Author: Anders Sahlman <57940217+AndersSahlman@users.noreply.github.com> Date: Tue Aug 11 03:21:48 2020 +0200 MKS Robin new 320x240 TFT Color UI support (#18985) commit 489143f1608a99b91d92a1d3e9f01239c9c1211f Author: Scott Lahteine Date: Mon Aug 10 20:03:13 2020 -0500 Add'l CI/git script tweaks, fixes commit 3eafce4683ef78cb6b8e12c34e234427b03ae587 Author: Marcio T Date: Mon Aug 10 19:06:19 2020 -0600 For FTDI800 compatibility, remove VERTEX_FORMAT dependency (#18982) commit b23da503faa62b984c7519368125db4b71aaa77c Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Mon Aug 10 21:04:40 2020 -0400 Fix Ender-3 V2 DWIN with manual mesh, host prompt (#18981) commit cae4c76b56ae1d5623a2c1abd228c5d97e39f4bc Author: Scott Lahteine Date: Mon Aug 10 01:44:11 2020 -0500 Fix scripts using gawk and wget commit 069993e880637dcbf2f795daa598b6d025bcedcb Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon Aug 10 03:48:57 2020 +0200 Fix DISABLE_[XYZE] code (#18970) Co-authored-by: Scott Lahteine commit a13834b9f94480d06c2b95cb4cb975bc26950117 Author: ftk Date: Mon Aug 10 01:19:35 2020 +0300 Remaining Time for LIGHTWEIGHT_UI (#18875) commit c82ff17d3b44c802c0f51249bd8460edf0a2e0d4 Author: Scott Lahteine Date: Sun Aug 9 15:57:59 2020 -0500 Followup for SPI Flash commit ca8fbbc2bea7b73146b2b53af9f8f0678fa998ed Author: Scott Lahteine Date: Sun Aug 9 15:55:11 2020 -0500 Shorthand values for M575 B commit b94b3e6315ea621bcfc6fc23d146bd63a572ed78 Author: cbaugher Date: Sun Aug 9 15:46:47 2020 -0500 Tool-change Z move followup (#18963) commit ab61bcafa33b8bf458bbdb43856516eb99bc033d Author: Scott Lahteine Date: Sat Aug 8 20:13:15 2020 -0500 Password followup commit 9e44df9c5f6431eeb777b2e5d2abb566384d2926 Author: sherwin-dc <59867245+sherwin-dc@users.noreply.github.com> Date: Sun Aug 9 09:00:42 2020 +0800 Password via G-code and MarlinUI (#18399) Co-authored-by: Scott Lahteine commit 438a9bb4aa38e68832ffaf9b7e203dcc67d6cd67 Author: Victor Oliveira Date: Sat Aug 8 21:24:31 2020 -0300 W25QXX SPI Flash support (#18897) Co-authored-by: Scott Lahteine commit 6f686b18011c21e0458743470246840aba2d87ad Author: Victor Oliveira Date: Sat Aug 8 20:45:34 2020 -0300 Marlin Color UI for STM32F1 (SPI) (#18958) commit d7d3827f4752e7b02d6ec7f8ead511113af289f4 Author: Victor Oliveira Date: Sat Aug 8 20:40:12 2020 -0300 Fix compiler search in non-default PIO installs (#18960) commit ad30383b46bc366042165ccf8464ceaa9b6648ee Author: Scott Lahteine Date: Sat Aug 8 18:21:44 2020 -0500 Fix up STATIC_ITEM (#18962) commit 9af3b06fc2a52a19c97151b8d783547eba5d4364 Author: Victor Oliveira Date: Sat Aug 8 02:32:30 2020 -0300 Marlin Color UI (FSMC) for STM32F1 (#18952) commit f3959607418929e56f8036d2c9833a7e0540c4b8 Author: Scott Lahteine Date: Sat Aug 8 00:14:02 2020 -0500 Patch hex_print commit 02eb4bd80673b6ccc3c5bf5ece148c1309a367c9 Author: Scott Lahteine Date: Mon Jul 27 18:09:52 2020 -0500 General cleanup commit 24f0c9da11e5617ee01d52c942713146f40e758b Author: Scott Lahteine Date: Fri Aug 7 20:37:55 2020 -0500 Clean up whitespace commit 3dc0f9c0b4afe33467fca831b3e95042fdcf2421 Author: Scott Lahteine Date: Fri Aug 7 20:51:40 2020 -0500 configuration_store => settings commit 8af8ef4404545141eae2554e71f21daa9570e18a Author: Scott Lahteine Date: Fri Aug 7 19:30:35 2020 -0500 Use uintptr_t for pointer-to-int commit 7a8e99de7d922155f5d29c05249c27de7a39521f Author: cbaugher Date: Fri Aug 7 18:06:25 2020 -0500 Fix Z height after tool change (#18951) commit 8d6a263c1c56918005786db7649b1fd3c044565d Author: ellensp Date: Sat Aug 8 10:59:09 2020 +1200 HW PWM sanity checks for SPINDLE_LASER_FREQUENCY (#18947) commit cb18b858d4b073ce0fe84fc31ffbe20fb529fc17 Author: wmariz <11435639+wmariz@users.noreply.github.com> Date: Fri Aug 7 19:03:59 2020 -0300 ZoneStar Z6FB (#18918) Co-authored-by: Scott Lahteine commit cd977c70ca7c4a292b1adb75ad7a6222b7c7a190 Author: Victor Oliveira Date: Fri Aug 7 03:55:15 2020 -0300 Fix / optimize FSMC init (#18941) commit 57c3b0e0b714b7d26a58842a0970a482814d3fa4 Author: Victor Oliveira Date: Fri Aug 7 03:53:43 2020 -0300 Fix LVGL "C" brace (#18942) commit 0e70d8bacbe8110633657615913e4e42e4ddf633 Author: Victor Oliveira Date: Thu Aug 6 22:52:01 2020 -0300 Followup fixes to LVGL for Chitu (#18940) commit 8f0cd470aebeceaac815155e71333f2e473c97b8 Author: Victor Oliveira Date: Thu Aug 6 19:33:42 2020 -0300 Apply PIO-supported custom_option for deps (#18935) commit 48ddaf35fb3ace9e088a8830843cc6636a6fa821 Author: Radek <46979052+radek8@users.noreply.github.com> Date: Fri Aug 7 00:21:55 2020 +0200 Increase Manual E Move Feedrate to 2mm/s (#18937) commit 9493682e49298c20f47954d05b022f88aa355d09 Author: Victor Oliveira Date: Thu Aug 6 10:15:19 2020 -0300 MKS Robin Nano CI Tests (#18927) commit da6e5ce3db40877e437b91ac4c5f5708e88a3afa Author: Scott Lahteine Date: Thu Aug 6 08:14:00 2020 -0500 Optimize G-code / feature dependencies (#18919) commit f4894b7140ed44d93888292d3f16615bdceefdce Author: Marco Burato Date: Thu Aug 6 12:38:18 2020 +0200 More Anycubic + Trigorilla mappings, ExtUI (#18903) commit 7d3be90159c30699df5392dcae9d305268137fd9 Author: Scott Lahteine Date: Thu Aug 6 04:19:56 2020 -0500 Conditions cleanup commit 76eff2471868bbcff31cd2c698f570a25bee2033 Author: Scott Lahteine Date: Wed Aug 5 23:21:41 2020 -0500 Simple rename of hex_print commit e8dc7cad185d2d31132dc1ddd8a7e06bf2733659 Author: Scott Lahteine Date: Thu Aug 6 00:49:15 2020 -0500 General cleanup commit 4201a48ecfb30a5442f4fc9f811ff3e0ae2c84af Author: Victor Oliveira Date: Thu Aug 6 00:44:30 2020 -0300 Request files needed to test a PR (#18925) commit c0d031cd1ed403a5a7deddb5301a8b94e5c71b1c Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Aug 5 20:42:03 2020 -0700 Add Chitu 3D V6 2nd Filament Runout pin (#18922) commit 1a50260ebdc66aa091c12b62a7bc56ade930d3ba Author: Victor Oliveira Date: Thu Aug 6 00:40:08 2020 -0300 Followup to LVGL patch (#18920) commit 38a24ce6c9371af3c5c4ee2c267e0392c12fa89d Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Thu Aug 6 05:38:23 2020 +0200 Move Cancel Object menu, fix canceled item index (#18930) commit a0a87c2b81860d0e449f19a094f02d1864706fc5 Author: Victor Oliveira Date: Tue Aug 4 06:50:05 2020 -0300 SPI Flash data compression (#18879) commit a100306b002e3ea33752c3ba64fbb23eb0c050de Author: Scott Lahteine Date: Tue Aug 4 03:21:19 2020 -0500 Followup to #18906 Z_AFTER_DEACTIVATE commit 17bbcce52b53eb36c327e3547a497abe1e20c1be Author: Claus Näveke Date: Tue Aug 4 10:02:08 2020 +0200 Make ili9341 rotatable (e.g., Anycubic Predator) (#18877) commit 0b2bd123ef1e438ea613306c8f4b06d078ed6b59 Author: Jeff Eberl Date: Mon Aug 3 23:37:08 2020 -0600 Change include to (#18880) commit ea53abbca75c65a39168d3e116a0d877170ea627 Author: Roman Moravčík Date: Tue Aug 4 07:32:47 2020 +0200 Update Slovak language (#18884) commit 7f69f8e680ba9af12a90ec576b22b9ace6eb6226 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Aug 4 07:32:25 2020 +0200 Update Italian language (#18886) commit 301569bee6ffe77b23154ad4d155972c37993ee3 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Tue Aug 4 07:31:45 2020 +0200 Add Z_AFTER_DEACTIVATE to account for gravity (#18906) commit e82e94be5b8641a601e77ca36994e89aa3843df5 Author: Victor Oliveira Date: Tue Aug 4 01:41:23 2020 -0300 Fix MKS Nano v1.2 FSMC display (#18901) commit 0c07e7a96f18861e597097d9cdafbcdcac76c34c Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Mon Aug 3 20:39:29 2020 -0700 Assisted Tramming requires a probe (#18912) commit 7dd7d6dda657d8a5d2655467e39e538974b6738a Author: Scott Lahteine Date: Mon Aug 3 21:55:37 2020 -0500 Move scaled TFT / touch defines (#18915) commit 3bb1f0a7dfbfece9bc46fa622e11b0d4aaf49b4a Author: Scott Lahteine Date: Sun Aug 2 20:34:24 2020 -0500 Clean up some PeripheralPins commit a0d25379b2333fbd0e0d186549cc48653b267a0c Author: Claus Näveke Date: Mon Aug 3 03:17:43 2020 +0200 No mks_robin extra_scripts in Trigorilla build (#18872) commit 643b31a6a1d60afb3347d1b3d412e54024c8ad2e Author: ellensp Date: Mon Aug 3 13:16:12 2020 +1200 Fix Spindle/Laser PWM DC (#18871) commit 0e2013d24405435bccc8bfa509bd10d4ee5119f3 Author: FLYmaker <49380822+FLYmaker@users.noreply.github.com> Date: Mon Aug 3 09:13:57 2020 +0800 Fix FLYF407ZG pins (#18865) commit e6c95762bac1e574b1e36a3c2e45a834d1f345fa Author: Sebastien Andrivet Date: Mon Aug 3 03:10:16 2020 +0200 Fix Duplicator i3 Plus pin diagram (#18862) commit b66df5fa3c464b20cad088e279edf1e14e3ea305 Author: Slats <2580606+mslattery@users.noreply.github.com> Date: Sun Aug 2 21:00:06 2020 -0400 Translated DWIN screen titles (#18893) Co-authored-by: Scott Lahteine commit afb51d1de35cb634a44e1271ccd7cdd5df73b6cf Author: Scott Lahteine Date: Thu Jul 30 02:27:52 2020 -0500 Repair config order commit db290201eabfc42161281cbd4e360eda81acd391 Author: Scott Lahteine Date: Thu Jul 30 02:07:29 2020 -0500 Add monitor_flags commit ed5ae0a2f755ab58b4893aa371406b330fec543e Author: Scott Lahteine Date: Tue Jul 28 18:13:20 2020 -0500 Update include_tree commit 8f8b0d84ae4457f4d3e08fb0ac193faa4d231d33 Author: Alexander Gavrilenko Date: Thu Jul 30 09:43:19 2020 +0300 Support for TFT & Touch Screens (#18130) commit 3fbc002bad8e6d96c1df9f1ed6429041b0b96c8e Author: Victor Oliveira Date: Thu Jul 30 00:04:47 2020 -0300 SanityCheck: No Adafruit NeoPixel for STM32F1 (#18833) commit 60cc56b31c9b040e9940ab037292901ed4ceaf9c Author: ellensp Date: Thu Jul 30 14:26:18 2020 +1200 No HEATER_0_PIN needed with 0 EXTRUDERS (#18827) commit fc12ffcb30a5a579d33bf30e5a8d9368f62f49c8 Author: Victor Oliveira Date: Wed Jul 29 23:25:07 2020 -0300 SPI Emulated DOGM (like FSMC_GRAPHICAL_TFT, but SPI) (#18817) commit 0c1bf01cf7b69002f4f630dbb3507c561976b2ab Author: Scott Lahteine Date: Wed Jul 29 20:50:10 2020 -0500 In G28 Z is sort-of known commit bb21d79321a90de84b1f90e7fe302e64cf98a16d Author: Scott Lahteine Date: Wed Jul 29 20:43:35 2020 -0500 Fix UNKNOWN_Z_NO_RAISE in G28 Bug introduced in 73fc0778b86 commit c63c069d58ec6ffe095635fdf579c356d3262f14 Author: Diego von Deschwanden <68632259+Diegovd@users.noreply.github.com> Date: Thu Jul 30 02:04:37 2020 +0200 Fix URLs to websites and resources (#18844) commit 513d3172cb7d50bfa99507ec540f268ba73bf8ee Author: Scott Lahteine Date: Wed Jul 29 15:44:05 2020 -0500 Update keypad link commit 5c699ab406e0031b04de6305f7f558e67916c9c6 Author: lethalwallabies <54120706+lethalwallabies@users.noreply.github.com> Date: Wed Jul 29 21:49:07 2020 +0200 Typo fix (#18856) commit a87114fbfa0e8b0142c4a78adb0a01297747135a Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Wed Jul 29 21:35:31 2020 +0200 Clarify Nozzle-to-Probe offset (#18828) Co-authored-by: Scott Lahteine commit 29e900977fb51c279ae18054c63f4d190ba4d428 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Wed Jul 29 04:28:58 2020 +0200 Fix Cancel Objects index display (zero-based) (#18841) commit 796471a7c6d6cad02c9ae929f8be6e40094a4763 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Wed Jul 29 04:19:46 2020 +0200 [SAMD51] ES Interrupt parity with other HALs (#18836) commit 524613b610b423720235466f1ff06d176b18d648 Author: Victor Oliveira Date: Tue Jul 28 23:15:17 2020 -0300 DISABLE_DEBUG required to free Robin nano Z_DIR_PIN (#18832) commit b765bfa5a5d8d196690baecebfa91cfd256fd1f8 Author: MoellerDi Date: Wed Jul 29 03:19:12 2020 +0200 Fix NEOPIXEL_LED compile w/out PRINTER_EVENT_LEDS (#18824) commit c0d8542a85ca4c98a3be17fe792e37169393695c Author: natemason Date: Wed Jul 29 09:18:02 2020 +0800 Add TEMP_PROBE_PIN for Einsy Rambo (#18823) commit 36ef9327efd339f925ef0de07801fd0a4a42e59b Author: Scott Lahteine Date: Tue Jul 28 03:10:00 2020 -0500 Keep -std=gnu++11 in stm32 build_unflags commit f2205b1725ed42e26fdd3645938e64dff79b9a14 Author: Diego von Deschwanden <68632259+Diegovd@users.noreply.github.com> Date: Tue Jul 28 08:04:44 2020 +0200 Update more external links (#18819) commit 25c75777799e45fd3c8f7274c913ac5c74d74f1d Author: Victor Tseng Date: Tue Jul 28 09:15:14 2020 +0800 Fix DELTA + TMC sensorless homing + SPI endstops (#18811) commit 9ece3cfdafd6a1cc575ed72bdddaa991d018c307 Author: Victor Tseng Date: Tue Jul 28 09:13:27 2020 +0800 Fix garbled print_xyz output (#18810) commit c5108687c5b409ef09360ad3fa77fe560a91e757 Author: ellensp Date: Tue Jul 28 13:12:30 2020 +1200 Fix WiFi / ESP32 sanity check (#18808) commit e52bfeb491b55eb2f622ac205919bc33732e86fe Author: Scott Lahteine Date: Sun Jul 26 19:49:14 2020 -0500 Config for Anycubic Mega TFT commit dd1503d5a8fe9be4ef24c992c3d9e7413f83583a Merge: e9618f1ba2 082fce5e3e Author: Scott Lahteine Date: Thu Apr 29 08:11:03 2021 -0500 Merge remote-tracking branch 'upstream/bugfix-2.0.x' into prepare_release_2073 commit 082fce5e3e68c7b8657201e5de5adba0e4f86a33 Author: thinkyhead Date: Thu Apr 29 00:34:04 2021 +0000 [cron] Bump distribution date (2021-04-29) commit 2e0a1f1afff71a29e5fb5eb99c509d0de5384087 Author: David Date: Wed Apr 28 11:08:21 2021 +0200 Color UI Move Screen for 320x240 TFT (#21708) commit f7f88b7187624d8687a79f674993648557b94ba2 Author: thinkyhead Date: Wed Apr 28 00:34:25 2021 +0000 [cron] Bump distribution date (2021-04-28) commit f04b2a939087f2f6cc04c42a11f8589d82253433 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Apr 27 17:21:13 2021 -0700 Clean up TFT comments (#21723) commit 516fe131bea242be903d0ec6d90a8f6f209ef173 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Apr 27 05:16:19 2021 -0700 BTT SKR V2 probe and chamber pins (#21717) commit ee016e605cda97f3934b78994b390ce99ea35f04 Author: Scott Lahteine Date: Tue Apr 27 04:49:21 2021 -0500 Rename, clean up boards/variants (#21655) * Consolidate variant scripts * Rename Marlin-local boards * Simplify variants where possible * Rename variants * CHITU_F103 and MEEB_3DP: Maple platform `platformio-build-stm32f1.py` uses the 'board' name, not 'board_build.variant' so folder names match 'board' and not `board_build.variant`. commit 69d85cce2da20b88784db68324c228db212af071 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Apr 27 00:22:09 2021 -0700 BTT SKR V2.0 / Stepper Driver Anti-Reverse Protection (#21503) commit fe7f5ca7f4448238f2878efd26ac8dcefe950808 Author: Adrian DC Date: Tue Apr 27 06:42:28 2021 +0200 Fix E3V2 Advanced Settings with PLR off (#21700) Fixes #21534 commit 9c7344487a04940c845d9c39215f0d28ac26208f Author: Marcio T Date: Mon Apr 26 22:40:59 2021 -0600 FTDI EVE Touch UI fixes (#21706) commit 5f9aac2027c241056c83d497054be91c64b086e7 Author: ellensp Date: Tue Apr 27 16:36:39 2021 +1200 Use temp_info_t for temp_redundant (#21715) Fixes #21712 Co-authored-by: Scott Lahteine commit 43fc1bd21c5171e324047e147ce41d0bcae5e3df Author: thinkyhead Date: Tue Apr 27 00:35:59 2021 +0000 [cron] Bump distribution date (2021-04-27) commit a981c33baddb240fb0a48e6c702b9ce6f1128dae Author: Victor Oliveira Date: Mon Apr 26 21:30:34 2021 -0300 Remove compiler flag merge-constants (#21711) commit 36ec7ab150f784f257addcfc2ece753d1a638855 Author: Sebastiaan Dammann Date: Tue Apr 27 01:32:13 2021 +0200 Make Cancel Objects reporting optional (#21698) commit 5301ec618be01dd2794d8f3e420f6172b34dad22 Author: hartmannathan <59230071+hartmannathan@users.noreply.github.com> Date: Mon Apr 26 19:30:26 2021 -0400 typo (#21710) commit a0a24e9380a5b4d7070b8c5cd261efd3de517fe2 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Mon Apr 26 19:22:27 2021 -0400 Help users confused by "bed size" (#21714) commit e9618f1ba25c0560f490ce831e10d1906fa686b1 Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Wed Mar 24 11:30:19 2021 -0300 Fix SDIO buffer alignment (#21396) commit 40d789ce18e48e9328e3a4d144b889048b809ca5 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun Apr 25 21:34:42 2021 -0700 Fix "continuous" typo (#21701) commit 641bca87bc9391a01a9de06e8d597dda5908590e Author: Scott Lahteine Date: Sun Apr 25 23:33:52 2021 -0500 Prettier output from opt scripts (#21707) commit 5ad473fc6246ddcddf6c5e0920bc7d4d389fd718 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Sun Apr 25 21:55:15 2021 -0400 Fix relocated LiquidCrystal library (#21699) Followup to 770e539859 commit 7aeb6b52005e739e60ddbcd9feca52633f1e2bd3 Author: thinkyhead Date: Mon Apr 26 00:36:31 2021 +0000 [cron] Bump distribution date (2021-04-26) commit e250f6a2756975e0949fc3deb26a777e0e14d5bb Author: Scott Lahteine Date: Sun Apr 25 17:17:02 2021 -0500 whitespace commit 0f9e096d6e0cf7fb20fc81c0f92cd95e66deccb0 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun Apr 25 13:06:27 2021 -0700 Update Issue Templates (#21702) commit e59192b9ea6f6fd7fa66192e363c69589c86e652 Author: Scott Lahteine Date: Sun Apr 25 04:15:13 2021 -0500 Fix HMI_HomeOffN axis Followup to #21534 commit a1ee5124d3673077e7812c00f883fca7179b30bd Author: pinchies Date: Sun Apr 25 18:48:20 2021 +1000 Fix usage, commentary of MANUAL_PROBE_START_Z, Z_AFTER_PROBING (#21692) Co-authored-by: Scott Lahteine commit a280077820c932fdb5a308bdfe64eb329e8ffe39 Author: thinkyhead Date: Sun Apr 25 00:36:37 2021 +0000 [cron] Bump distribution date (2021-04-25) commit 13f3ccb85da31e2e48a22f79568c93d7ba52f3bc Author: Miguel Risco-Castillo Date: Sat Apr 24 18:50:44 2021 -0500 E3V2 DWIN Advanced Settings (#21534) Co-authored-by: Scott Lahteine commit 770e5398592f2683e6057d44248a9d29bc21c547 Author: Scott Lahteine Date: Sat Apr 24 15:22:38 2021 -0500 Use Adafruit LiquidCrystal commit 993f9f3efd4e4d4feeeb676f110de2ca72a20622 Author: Scott Lahteine Date: Sat Apr 24 02:29:20 2021 -0500 Remove extra platform_packages line commit f3c7b61f29525d37d6c5bcd97873fd8261674a17 Author: Scott Lahteine Date: Sat Apr 24 15:22:50 2021 -0500 Add INO to .editorconfig commit 3b8f83a5aec737afd721e8f864f5e8ce5d0e5db7 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Sat Apr 24 06:35:02 2021 -0400 Sanity check MIXING_EXTRUDER + DISTINCT_E_FACTORS (#21689) commit 836c4e01981bffc5101ba2e6b47ba9910b4bce85 Author: Scott Lahteine Date: Sat Apr 24 05:28:50 2021 -0500 Drop Deviot workaround commit dfcccb63a1f3d8098ebfef8c64753f735bcf0b0d Author: Scott Lahteine Date: Sat Apr 24 05:20:55 2021 -0500 Use temperature accessors commit 6f5800bd74e3e2e7db372c4fc4b51a36a7b7b351 Author: Nikolay March Date: Sat Apr 24 12:38:00 2021 +0300 Backlash Compensation for COREnn (#21612) Co-authored-by: Scott Lahteine commit d3a2c6a0b47fba8f560ff9ea60e73eb2610ff527 Author: fedetony <45215920+fedetony@users.noreply.github.com> Date: Sat Apr 24 09:53:52 2021 +0200 Soft Reset via Serial or post-kill button click (#21652) Co-authored-by: Scott Lahteine commit 7a8e3cc258bf75be1bfb7d7e43cb3f2f1aabad5b Author: Ramiro Polla Date: Sat Apr 24 09:52:34 2021 +0200 Avoid + 0.0f in menu items (#21642) commit e7f26cabfe1121dfbb9b561e0538c2bae45c4bf5 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Sat Apr 24 10:42:44 2021 +0300 Fix Bed Tramming 5th point (#21646) commit a29aefc9c0c02c23862fded29e3f950ead339238 Author: Scott Lahteine Date: Sat Apr 24 01:29:30 2021 -0500 Move last bootscreen delay to end of setup (#21665) commit a73dce4a56447cc9d81224ef9e19a42114765e25 Author: Ryan Finnie Date: Fri Apr 23 23:26:17 2021 -0700 Clean up / improve generate_version script (#21674) commit f424da498a8fabf19a7bdabe23c6d843cd4a5191 Author: vyacheslav-shubin Date: Sat Apr 24 09:16:14 2021 +0300 ExtUI::onPostprocessSettings (#21683) commit 8b5e7429d7b874e9a9d1a6afbba74c11b36813ba Author: Sebastiaan Dammann Date: Sat Apr 24 08:01:17 2021 +0200 Prevent extrusion on M600 un-park (#21670) Fixes #21669 commit 5dfe28db2a68c2765ff6742fe7e53e11174e43b5 Author: unknownlamer <72777654+unknownlamer@users.noreply.github.com> Date: Sat Apr 24 01:59:31 2021 -0400 MCP4451 Digipot Support for Azteeg X5 GT (#21680) commit 949d2d9e50d34d7b2111a6c23e153687f59a1b2d Author: ellensp Date: Sat Apr 24 17:11:11 2021 +1200 Fix MP_SCARA compile (#21686) commit 0fe30d14a810a43f930c4558eab6ec1842515614 Author: Jim Hyslop Date: Sat Apr 24 01:08:46 2021 -0400 Don't display service prompt unless needed (#21654) commit 46f272b66945e4f2fb6e191b83cebeaa57e496f5 Author: Victor Oliveira Date: Fri Apr 23 22:29:15 2021 -0300 Fix Celsius precision, current temp accessors (#21678) commit c4620bb5285438e41fa4c39229aa2a39859877ca Author: Scott Lahteine Date: Fri Apr 23 20:19:23 2021 -0500 Add whole-degree accessors, simplify some temperature-related features (#21685) commit 384e09aa7c7866974ff232d1e771e51e89ea0a02 Author: thinkyhead Date: Sat Apr 24 00:54:41 2021 +0000 [cron] Bump distribution date (2021-04-24) commit 54ad22a4553404e6c777bd0d4794e7edba23152f Author: Scott Lahteine Date: Fri Apr 23 19:36:43 2021 -0500 Let compiler do Temperature inlining commit 3bddbb1110b6ca13a291de426553839b99cae102 Author: Scott Lahteine Date: Fri Apr 23 19:06:55 2021 -0500 Clean up formatting, wrap macros commit 72e3d2492f2085efe9c5fb0b33d67c24baf8a4bc Author: Scott Lahteine Date: Fri Apr 23 19:14:49 2021 -0500 Update temperature types commit 51a61c5431aa9153eb7c580214ec0f310b2abb8e Author: Scott Lahteine Date: Fri Apr 23 19:14:58 2021 -0500 Nextion cleanup commit 4e10f4689994201a2d27c54f59366096c92d4797 Author: Scott Lahteine Date: Fri Apr 23 19:09:35 2021 -0500 Use configured temp window for Chiron commit 392d01555d8f4ae85cf7194d41f21b84938d71cb Author: Scott Lahteine Date: Thu Apr 22 19:38:05 2021 -0500 'issue_body' obsolete in templates commit a729cdcfdd558d91d977edf70a43d2008586693c Author: thinkyhead Date: Fri Apr 23 00:34:45 2021 +0000 [cron] Bump distribution date (2021-04-23) commit a58276c4c1a7dbcac815a65473d1d0f8f36d5978 Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Fri Apr 23 07:43:28 2021 +0800 Enable Purge More / Resume with EP + Host Prompt (#21671) Co-authored-by: Msq001 commit f075dd0db3496d99c84fcf77242f60731982184c Author: Mike La Spina Date: Thu Apr 22 18:19:41 2021 -0500 M10-M11 Air Evacuation for Spindle/Laser (#21668) Co-authored-by: Scott Lahteine commit 4d34d16bd83f9961f062f662e528d5bebd5aab7d Author: thinkyhead Date: Thu Apr 22 00:41:44 2021 +0000 [cron] Bump distribution date (2021-04-22) commit 57d0f0ce2e8103a6c518741a44f58afd08ec4da9 Author: Scott Lahteine Date: Tue Apr 20 19:16:27 2021 -0500 Fix Chiron typos, file nav commit 778b8a45e9ca770c7d717bf403a52b51dc123098 Author: thinkyhead Date: Wed Apr 21 00:34:13 2021 +0000 [cron] Bump distribution date (2021-04-21) commit 3c46a4062eb9da5a58d46b7ee59afe0b2409e472 Author: Scott Lahteine Date: Tue Apr 20 16:36:19 2021 -0500 Fix mfconfig 'copying' message commit 2a7ba427dd840297c9cc253e3ffef6d3ae5ec0f0 Author: Axel Sepúlveda Date: Tue Apr 20 06:14:21 2021 -0400 Fix Grand Central SD dependency (#21660) Co-authored-by: Scott Lahteine commit d87a71bd044a186deebdeeed57ac916e56c8ac86 Author: Scott Lahteine Date: Tue Apr 20 05:11:43 2021 -0500 Extra dependency script logging commit 6bb10b189897dcaef5a6da496dfd4f1631689f1b Author: Scott Lahteine Date: Tue Apr 20 00:44:19 2021 -0500 Changes supporting "Prussia3D" MK3 (#21617) commit f52351d116550c22b0a761a94ca7476494064af7 Author: Scott Lahteine Date: Sun Apr 18 19:01:51 2021 -0500 Update mftest help commit 7d7200474202925d61c3c06703fd7291fa20a53d Author: thinkyhead Date: Tue Apr 20 00:34:39 2021 +0000 [cron] Bump distribution date (2021-04-20) commit 09de17fb599051a2037aa70ca18098a901351360 Author: Scott Lahteine Date: Mon Apr 19 13:30:21 2021 -0500 Trigorilla Pro: Allow for swapped Z-stops commit 2c2984fd29b2ac6cf7a4301541e903e52179cfed Author: Scott Lahteine Date: Mon Apr 19 00:07:57 2021 -0500 Update realtime, DLP comments commit d5143c2c1503225c291dfb9092b3bd11fc2fe156 Author: Nick Date: Mon Apr 19 05:04:38 2021 +0100 Support new style Anycubic Chiron TFT (#21597) commit 59fd6428ae77a153082d8e1dd49c081b79a81a93 Author: Scott Lahteine Date: Sun Apr 18 22:46:43 2021 -0500 Skip preflight checks only (#21658) Followup to e8af38cc2d commit 07c5a4fa040428e99c60d3b54e9374a59ec381df Author: thinkyhead Date: Mon Apr 19 00:34:55 2021 +0000 [cron] Bump distribution date (2021-04-19) commit 550a806d77201e9a228efd587a92af4adaf648b7 Author: Scott Lahteine Date: Sun Apr 18 18:24:08 2021 -0500 More detailed serial config error commit dc6c977766a28c26075ff2b5268b3ee1c9660035 Author: Scott Lahteine Date: Sun Apr 18 17:12:56 2021 -0500 Fix CHDK warning commit 86397df32d78087c148c0a3c0a002a17b75b4dde Author: Scott Lahteine Date: Sun Apr 18 14:17:37 2021 -0500 BTT E3 RRF Support commit 8e60b19662c3c05c935ce76f95a39a40747a1180 Author: Scott Lahteine Date: Sat Apr 17 19:52:23 2021 -0500 Disable assert() by default commit c508c2213ee5b0ed130238c058b7cc91beaea654 Author: Scott Lahteine Date: Sun Apr 18 14:07:30 2021 -0500 Misc. pio cleanup commit 89f7a19691e75695421d704b086357818edc02c0 Author: Scott Lahteine Date: Sat Apr 17 21:22:23 2021 -0500 Fix check-pr action commit 5d8727a59c0b6a38e7c2cbd73feec3e76036db44 Author: thinkyhead Date: Sun Apr 18 00:34:57 2021 +0000 [cron] Bump distribution date (2021-04-18) commit e8af38cc2df433536e6fc584efc251f62e826999 Author: Scott Lahteine Date: Sat Apr 17 14:19:33 2021 -0500 Skip scripts during 'platformio init' (#21643) commit b8cf818dac851f6d57de49f6f45cdfe2da884a00 Author: fedetony <45215920+fedetony@users.noreply.github.com> Date: Sat Apr 17 10:54:43 2021 +0200 Fix Realtime Reporting with G-code Motion Modes (#21630) commit bca4652c5e48415cf478da229a253a2106da3e59 Author: Scott Lahteine Date: Sat Apr 17 02:03:16 2021 -0500 Leave Hybrid Threshold as-is for now Reverting 253ee0c407 commit 3c4308b7b6c3560f9b880869faa56990cf42676e Author: thinkyhead Date: Sat Apr 17 00:33:21 2021 +0000 [cron] Bump distribution date (2021-04-17) commit 464b2242e246f47fb3b16b00a12d3d0a80a5f0b1 Author: Scott Lahteine Date: Fri Apr 16 09:30:39 2021 -0500 Better chopper defaults commit 553487cc8ab348939c6033910c0aa11d230b2ad6 Author: MangaValk Date: Fri Apr 16 15:02:31 2021 +0200 Tool sensors (#17239) commit 73f6426114d3f307d741d0e9ab8258a8cb103ff1 Author: Scott Lahteine Date: Wed Apr 14 00:26:57 2021 -0500 Use itoa for sprintf int commit 07cac80fb028f26fd2b1badfea069c80938dfd0c Author: Scott Lahteine Date: Fri Apr 16 04:28:16 2021 -0500 Drop extraneous inlines commit 253ee0c407120526b821c0f3251bda0afb69d934 Author: Scott Lahteine Date: Fri Apr 16 04:04:07 2021 -0500 Init pwm_thrs to 0 when HYBRID_THRESHOLD is off (#21623) commit 2d1d628340a6b4dd38ae808e6423438fa153de57 Author: Luca Zimmermann Date: Fri Apr 16 11:01:50 2021 +0200 Always swap with PRIME_FIRST_USED disabled (#21622) commit c6c6c5618669665669e3040821d0b662701bcf3a Author: Scott Lahteine Date: Fri Apr 16 02:50:45 2021 -0500 SDIO cleanup commit 528b9bd8729656d7ebcd3dc7898ceddc2f377354 Author: Scott Lahteine Date: Fri Apr 16 02:43:59 2021 -0500 Revert experimental NAN patch Hold changes from #21575 (24a095c) for more testing. commit 32dba5e0c735166d3bb54783efbf0d5d1b275b66 Author: fedetony <45215920+fedetony@users.noreply.github.com> Date: Fri Apr 16 08:59:28 2021 +0200 Realtime Reporting, S000, P000, R000 (#19330) commit 58cc4b7043a9ff3b60df6c8f08591cb58213fbab Author: Scott Lahteine Date: Thu Apr 15 20:06:08 2021 -0500 Use celsius_t for temperature accessors commit 795253a9d5abe4136b449938fcaf2dba778af536 Author: thinkyhead Date: Fri Apr 16 00:32:47 2021 +0000 [cron] Bump distribution date (2021-04-16) commit c0673dbdf14eb7cd74bfdc0417cc8290b98fc00a Author: Scott Lahteine Date: Thu Apr 15 17:27:18 2021 -0500 Keep 'confirmed bug' open commit 3cdf363cceda864d9ca4e48b2328adc474fe14fa Author: Sola <42537573+solawc@users.noreply.github.com> Date: Thu Apr 15 17:45:30 2021 +0800 Fix MKS H43 compile (#21619) commit 63673d3ce088935d8f4931698df627fc916e458c Author: Andrea Date: Thu Apr 15 11:37:37 2021 +0200 Fix Custom Menu audio and return (#21616) commit 2d8ee3a496fc3e7b6edaa925a3b087ad5074f2ee Author: thinkyhead Date: Thu Apr 15 00:34:28 2021 +0000 [cron] Bump distribution date (2021-04-15) commit 0561d5bea3ee7774d0b63cf505005afdb56b644a Author: Scott Lahteine Date: Wed Apr 14 05:54:12 2021 -0500 Add E1 for RAMPS 1.4.4 / AGC commit cc5297d637d2a0a784e336210c366baf250785d0 Author: XDA-Bam <1209896+XDA-Bam@users.noreply.github.com> Date: Wed Apr 14 11:42:04 2021 +0200 Space-separate scrolling Status Message (#21523) Co-authored-by: Scott Lahteine commit 1595fdb54b1f10f2e3e01393d6b7aceb09f96b6d Author: Scott Lahteine Date: Tue Apr 13 23:23:06 2021 -0500 Use sq commit d705a5b45efa4c7a47650fc2c187ff1d025db8fa Author: Scott Lahteine Date: Tue Apr 13 23:22:57 2021 -0500 Fix long acceleration overflow commit 0e9836649eef298c6fd84e7585cee5d84898c939 Author: Scott Lahteine Date: Tue Apr 13 21:34:21 2021 -0500 Misc. formatting, serial out commit 4849d313fd418832f591fbbc2236bc9d02a843d2 Author: thinkyhead Date: Wed Apr 14 00:32:34 2021 +0000 [cron] Bump distribution date (2021-04-14) commit 3ec5cd312beb3077b661129144e214c83a232d69 Author: Marcio T Date: Tue Apr 13 17:31:12 2021 -0600 Enhance and fix FTDI Eve Touch UI (#21607) commit 138340ee99a852bc116e2a436932bed074624fde Author: Victor Oliveira Date: Tue Apr 13 19:34:19 2021 -0300 Multi-Volume. Select Media for LVGL (#21344) commit a5f0075a600b6cc607e7e3b2d7c2571d39c91280 Author: gmarsh Date: Tue Apr 13 17:17:52 2021 -0300 Fix and improve Power Monitor (#21551) commit 84c79d753156a396fca43dd62cd693454efac882 Author: Scott Lahteine Date: Tue Apr 13 15:07:25 2021 -0500 Followup to sprintf cleanup commit fd99ea09ecb41bc1dfc5e4109e0d6c7de1f87424 Author: Scott Lahteine Date: Tue Apr 13 04:00:39 2021 -0500 Add fan percent accessors commit 4e314ef6d4b29ea453431b5a37416dee39163c66 Author: Scott Lahteine Date: Tue Apr 13 03:49:20 2021 -0500 More MKS UI sprintf commit 776c1e66db9e86e70b976fb80560bb658431c782 Author: Veisen Date: Tue Apr 13 10:09:21 2021 +0200 Fix ANYCUBIC_LCD_I3MEGA compile (#21585) commit e0ed57db67ff191452f00808dc696c80dd8e03f7 Author: Scott Lahteine Date: Mon Apr 12 23:40:32 2021 -0500 Remove extraneous MKS UI sprintf commit 41eb5813e05451e6634d73551913acc44a0448ea Author: pinchies Date: Tue Apr 13 12:14:34 2021 +1000 Fix Flash size (512KB) for STM32F103ZE (#21590) commit 5fb3ee610140c9895be5495d84b6d853514e5e2d Author: ellensp Date: Tue Apr 13 14:02:21 2021 +1200 Fix Max Temperature not enforced (#21592) commit 3517fbdcbdbb3ba790b0aac55e3ffb03e94f3307 Author: Scott Lahteine Date: Mon Apr 12 20:58:34 2021 -0500 Blocking move followup commit 7f56538602d5cfeb20da143e896e74c881d94d29 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Apr 13 03:28:13 2021 +0200 Chamber Fan mode 3 (#21594) commit 4044ed8783c71dd66d64737173ca31c8a0ea0f5a Author: Scott Lahteine Date: Mon Apr 12 20:15:41 2021 -0500 Add 'blocking move' comments commit a5d6f6ac9880090d2412bbea0027885b95c98ea2 Author: espr14 Date: Tue Apr 13 03:10:21 2021 +0200 Fix Resume Print with UBL (#21564) Co-authored-by: Scott Lahteine commit 41c55a30cd6ef2834ad82e1edcf6cac2434770f5 Author: thinkyhead Date: Tue Apr 13 00:45:21 2021 +0000 [cron] Bump distribution date (2021-04-13) commit 4a1d2d816c4dff8b3c3e472f7b8022362e1ad109 Author: Scott Lahteine Date: Mon Apr 12 19:34:31 2021 -0500 Update old-style axis indexes commit 1e357b3c74b6c2fa0642484f0cfa5efbe32e802d Author: Mike La Spina Date: Mon Apr 12 17:52:18 2021 -0500 Tweak cooler / flowmeter icons (#21573) commit f69da7d00dc69d4234068fd16a33167e0f85f460 Author: Ramiro Polla Date: Tue Apr 13 00:39:22 2021 +0200 Add 'jump relaxing' compile flag to AVR targets (#21566) commit 24a095c5c14b60bcbffc2807d2c8cc8e9af46e90 Author: Scott Lahteine Date: Mon Apr 12 16:49:53 2021 -0500 Reduce math library code size by 3.4KB (#21575) commit 1742fb86555a33fdcda1468a00a64690e957685a Author: thinkyhead Date: Mon Apr 12 00:36:20 2021 +0000 [cron] Bump distribution date (2021-04-12) commit 76cc736755c757ea12b93427ec09ae8a8183419f Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Mon Apr 12 00:32:28 2021 +0300 MKS LVGL UI: Fix icon layout (#21595) commit c35e271dba2f608cb72f48357a1d36a8bfa66a12 Author: Scott Lahteine Date: Sat Apr 10 20:09:15 2021 -0500 Clean up, update some variants commit 6ab7baa413b520fde11f588e288b391b39bf4cd8 Author: Scott Lahteine Date: Thu Apr 8 15:43:16 2021 -0500 tick() => isr() to spotlight interrupt-time commit 1114bdbb042469f66f31a94e4b8a46d40c22c21b Author: thinkyhead Date: Sun Apr 11 00:37:24 2021 +0000 [cron] Bump distribution date (2021-04-11) commit f86423972fa5ca9769df34142fbcc9854d1a13fa Author: Scott Lahteine Date: Sat Apr 10 18:27:15 2021 -0500 EXP2_01_PIN for BTT BTT002 1.0 commit 62f992af23b0dd3160db049aa83e541fe164630a Author: ellensp Date: Sun Apr 11 08:35:45 2021 +1200 Followup to "no status for serial::write" (#21577) commit 37e671612ee224b97e0500a33b887df675e580ec Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Sat Apr 10 16:44:36 2021 +0800 Fix M114 E / R broken by `LIN_ADVANCE` (#21579) commit 3b3a3fa84563c6a806e38c9be3c47a0bbbd8a630 Author: thinkyhead Date: Sat Apr 10 00:34:56 2021 +0000 [cron] Bump distribution date (2021-04-10) commit 4cba40f9fd9ea7dae24dbf7aef89091e88f99126 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Sat Apr 10 04:29:59 2021 +0800 Fix manual move with MKS H43 (#21511) Co-authored-by: Scott Lahteine commit 8048d1411f994499ef9ca82079efb03a54211cfa Author: Ramiro Polla Date: Fri Apr 9 04:05:31 2021 +0200 Drop return value from Serial::write() (#21567) commit 1a2cbe100c279b0dd12a70f5e9179a6f9b555e32 Author: Ramiro Polla Date: Fri Apr 9 04:03:34 2021 +0200 Macros to eliminate 'f + 0.0' (#21568) commit 19320a1f8f3e502b745648df672a82bd6b6298dc Author: ellensp Date: Fri Apr 9 13:36:48 2021 +1200 Check for old Marlin files mixed in (#21574) commit 7124326808271b4050615c909914ef52185f594a Author: Victor Oliveira Date: Thu Apr 8 22:35:21 2021 -0300 Delay U8glib init using U8glib-HAL 0.4.4 (#21496) Co-authored-by: Scott Lahteine commit ecd5ae890f890c4bedd5c913ddba688c3687573d Author: thinkyhead Date: Fri Apr 9 00:32:51 2021 +0000 [cron] Bump distribution date (2021-04-09) commit aa2601bb9e361d429a6110a3ced31a1a5a0f86dc Author: thinkyhead Date: Thu Apr 8 00:37:38 2021 +0000 [cron] Bump distribution date (2021-04-08) commit 3e1b9e11d73fab93e44ede6768d0c51638e6bced Author: ellensp Date: Thu Apr 8 08:02:09 2021 +1200 Sanity Check newer Configs too (#21550) Co-authored-by: Scott Lahteine commit 1879eede0d2910cac58f2a90b95989ff4531fa6e Author: Scott Lahteine Date: Wed Apr 7 15:43:07 2021 -0500 Fix axis char printing commit facbbba7894675ee9f9593785f45d4b86ecb2db3 Author: ellensp Date: Thu Apr 8 08:02:09 2021 +1200 Sanity Check newer Configs too (#21550) Co-authored-by: Scott Lahteine commit d61bc2d136cd18081f2e6a76d10c7cd90b4b80e1 Author: Radim Karniš <57687985+radimkarnis@users.noreply.github.com> Date: Wed Apr 7 21:41:38 2021 +0200 Park Magnetic Switching Toolhead at the very end (#21552) commit 5ab220fa7680925628a26b2685a1d145e695842a Author: thinkyhead Date: Wed Apr 7 00:34:41 2021 +0000 [cron] Bump distribution date (2021-04-07) commit b483a8d652c18626d57b5a38c78fdd2caa6e91c3 Author: BigTreeTech <38851044+bigtreetech@users.noreply.github.com> Date: Tue Apr 6 10:40:50 2021 +0800 BTT SKR-SE-BX (STM32H743IIT6 ARM Cortex M7) and BIQU_BX_TFT70 (#21536) commit ed14731146006442f1cc4045b70cefdec00aaa8f Author: Scott Lahteine Date: Mon Apr 5 21:27:05 2021 -0500 getHighESpeed => autotemp_task commit 746eae15f36e4211a22d53b8e12e82edb55a13e5 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Tue Apr 6 04:55:00 2021 +0300 Cast celsius to int for MKS LVGL UI (#21502) commit 121b606f9c264995c2c2aa9c215f15d3b3ddb218 Author: Victor Oliveira Date: Mon Apr 5 22:46:21 2021 -0300 Fix Rumba32 variant for Marlin (#21497) commit 61af08d4993014935a3a378952cd5562ee4e2e14 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Tue Apr 6 04:39:57 2021 +0300 MKS LVGL UI: Display/edit fan percentage (#21544) Co-authored-by: Scott Lahteine commit a6105ef37f8a9682b7c33834fc37363f425fd16d Author: thinkyhead Date: Tue Apr 6 00:35:12 2021 +0000 [cron] Bump distribution date (2021-04-06) commit 993609b5aae9145d49f42b99de6330c379debbe9 Author: Mike La Spina Date: Mon Apr 5 16:34:31 2021 -0500 Make DELAY_NS round up on AVR (#21546) commit e3116eed2e488543766cd61e4658363a0d2bd34f Author: Scott Lahteine Date: Mon Apr 5 15:34:51 2021 -0500 write_command changes input commit 98d6c751d3484b1a3d30cefaa692b4f993d81abd Author: Scott Lahteine Date: Fri Apr 2 14:30:13 2021 -0500 Fix CardReader string args commit 916574932167a1bdf76cc90d3e75b69ea87985f2 Author: thinkyhead Date: Mon Apr 5 00:36:21 2021 +0000 [cron] Bump distribution date (2021-04-05) commit 75b790376d1b20e0345efc2b8d2a58e9b201f9d3 Author: Marcio T Date: Sun Apr 4 17:58:03 2021 -0600 Touch UI Bed Mesh Screen refactor, enhancements (#21521) - Split mesh view and edit screen into two screens - The editor now live-updates the graphics - Added Touch UI mesh progress feedback to `G26` - Show positive / negative mesh values in different colors commit 8da8bf7e879835a14c045fdfe947c81008027a17 Author: vyacheslav-shubin Date: Mon Apr 5 02:52:16 2021 +0300 Fix FAT delete of items with long name (#21528) commit 8b6718c6320c32abe0fa1de56a033aca54ff0b76 Author: Scott Lahteine Date: Sun Apr 4 18:07:16 2021 -0500 misc. pointer formatting commit 98b2b45264c142053b6ddb015472d4fe2a08c78d Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Apr 4 18:35:58 2021 -0400 Revert "Optimized string-to-number functions" (#21532) This reverts #21484 commit dda2f58588a0a2fca45aa7cc673f9af020163959 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Apr 4 17:55:34 2021 -0400 Fix Hotend-abort-on-idle Check (#21535) commit c4b69fcdddfe7a626d8277b175851379b699b92b Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Apr 4 17:55:34 2021 -0400 Fix Hotend-abort-on-idle Check (#21535) commit a628559258524164f8fd51e3fcb12e3ff4d81e6d Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun Apr 4 23:45:56 2021 +0200 Update Italian language (#21537) commit 895e40190b8710d62bd4a87bb68cdeda43bdac1d Author: Scott Lahteine Date: Thu Mar 18 22:49:04 2021 -0500 Suppress redundant serial errors commit c442485137cac378f7ed8fc56a18f4466e3a461b Author: thinkyhead Date: Sun Apr 4 00:35:49 2021 +0000 [cron] Bump distribution date (2021-04-04) commit dd76a50683358732ec3c1a9dadeef479d42d3c94 Author: thinkyhead Date: Sat Apr 3 00:33:51 2021 +0000 [cron] Bump distribution date (2021-04-03) commit 9d0e82788a754367cd16d6e1faf21a9bede2e957 Author: XDA-Bam <1209896+XDA-Bam@users.noreply.github.com> Date: Sat Apr 3 02:11:22 2021 +0200 Update u8g / AVR display timing defaults (#21518) commit d0d5003f45eacfba6101ad57fd86d6c25f9691d8 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Fri Apr 2 20:06:43 2021 -0400 GT2560 V3 followup (#21512) commit c2b72c0e73a59c7b0915253c775eb6253032f0b0 Author: Scott Lahteine Date: Fri Apr 2 14:22:43 2021 -0500 Remove extraneous 'extern' hints (#21516) commit 9d0b6c5730e55298b6a94fb07542502a147e84f3 Author: Scott Lahteine Date: Thu Apr 1 21:54:34 2021 -0500 Requiring PIO >= 5.0.3 commit 3229100025dc428d5038eca753c70f3c831d6336 Author: Scott Lahteine Date: Thu Apr 1 21:53:19 2021 -0500 Split up platformio.ini (#21507) commit 0dde8f89682245eba48e553fd62bf0deb1f10e88 Author: thinkyhead Date: Fri Apr 2 01:13:58 2021 +0000 [cron] Bump distribution date (2021-04-02) commit 235ba926021709e293f33b7229690406761298e4 Author: Mike La Spina Date: Thu Apr 1 19:29:49 2021 -0500 Followup to Laser Flow Meter (#21498) commit 6747d350a53ff78be2e7679cb3e9afec0d9aca52 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Fri Apr 2 08:19:22 2021 +0800 MKS H43 fix, cleanup (#21500) Followup to #21485 commit 45c1432946547cef4cbe9ac832394ff68526687d Author: Marcio T Date: Thu Apr 1 18:12:00 2021 -0600 G26 Hilbert Curve followup (#21480) commit 05b39623b0490f0c49593b10bcc04d4b0f10851d Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Thu Apr 1 19:05:02 2021 -0400 Board IDs for G2560 Rev B, G2560 v4, GTM32 VD (#21499) commit 62f37669dc506a6e579389ca549ce5993548944d Author: Scott Lahteine Date: Thu Apr 1 17:59:57 2021 -0500 Replace 'const float &' with 'const_float_t' (#21505) commit 600ef1e47cf905bec1e76b35f3912863ade4fff0 Author: thinkyhead Date: Thu Apr 1 00:34:23 2021 +0000 [cron] Bump distribution date (2021-04-01) commit 4d17613050e7d77bb1bf229f9682743f3924caf4 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Wed Mar 31 15:34:17 2021 +0800 MKS H43 fix, cleanup (#21485) Co-authored-by: Scott Lahteine commit bfdd1f4662f74c9db1cb62cc4f134d4e66a2da4f Author: Scott Lahteine Date: Tue Mar 30 23:57:57 2021 -0500 Update UBL param commit be775ed72db983ea150669ad6e0e094285b2fec2 Author: Scott Lahteine Date: Tue Mar 30 23:16:29 2021 -0500 Move apply_rotation_xyz into matrix_3x3 commit 8d083eb2488c6e4bd19bec8090b1673d60d2da2a Author: Scott Lahteine Date: Tue Mar 30 21:54:34 2021 -0500 Put ABL state into a class commit 7573524a1437faa7cecdd9e5611f61db667923ef Author: Marcio T Date: Tue Mar 30 20:23:43 2021 -0600 FTDI Touch UI fix and reorganize (#21487) commit 20d2061f22790bb30cf3b934bef2be54d931293e Author: Ramiro Polla Date: Wed Mar 31 04:20:33 2021 +0200 Optimized string-to-number functions (#21484) commit df297b6ca3bac1b65a36cf6af685cd7b11c34639 Author: Marco van Wieringen Date: Wed Mar 31 03:11:33 2021 +0200 Fix FYSETC_S6 heaters pins (#21483) When adding support FYSETC Spider board the S6 pins file was broken. commit 6175802693390509e812c31ba134949a4b6eaf6a Author: thinkyhead Date: Wed Mar 31 00:29:24 2021 +0000 [cron] Bump distribution date (2021-03-31) commit 0f2309054520f4186502a6ebd84042713359ac8a Author: Scott Lahteine Date: Mon Mar 29 22:38:33 2021 -0500 Serial flags followup Followup to #21318 commit f43b250ed2f32bf2423e234b1c40d655bf4c484c Author: Scott Lahteine Date: Mon Mar 29 21:10:55 2021 -0500 Adjust microsteps alignment commit 6e0b79a33b7e6d5405be6d0ae5b16e5f3fd62fac Author: Victor Oliveira Date: Mon Mar 29 23:52:30 2021 -0300 Fix and add STM32 SDIO DMA (#21476) commit 139c14948621adcaa227bcef67765a5228039cd3 Author: X-Ryl669 Date: Tue Mar 30 04:36:01 2021 +0200 Flags for MarlinSerial instance features (#21318) commit 3f7cd45df4b7159e92b37eb561fe4d7980d031af Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Mar 30 04:14:11 2021 +0200 Generalize MMU (#21469) commit c298095000ac0ff5213dea2348b432779ad894ef Author: Ste Date: Tue Mar 30 04:07:21 2021 +0200 Align temp settings (#21329) commit d30b5481f5373559bc152d48a48ebabc5304acff Author: Ramiro Polla Date: Tue Mar 30 03:56:44 2021 +0200 Optimize BLTouch code for size (#21477) commit f587a4e3f30324789a50acc107047e430be1a172 Author: Scott Lahteine Date: Mon Mar 29 20:00:57 2021 -0500 Improve uncrust script commit 3b73b115ca9366f0155986b717d4c85c31ed2f80 Author: Scott Lahteine Date: Mon Mar 29 20:36:37 2021 -0500 Apply pointer formatting commit 71e789943ea28ff7fddb1eb07295e75460703cb7 Author: thinkyhead Date: Tue Mar 30 00:32:47 2021 +0000 [cron] Bump distribution date (2021-03-30) commit 1caf8a1f5b1aaaca01e10af2a918a264ed549a1b Author: ellensp Date: Mon Mar 29 22:43:07 2021 +1300 GT2560 Rev.A Plus Z Max Pin with BLTouch (#21375) commit 1d3f28da2e9e7ecbecc4a25fffb120645a5b6ae1 Author: George Fu Date: Mon Mar 29 17:38:28 2021 +0800 FYSETC Spider board (#21458) commit 86ba0cde35537dd9a7c0978beb7dcc059b3e72f7 Author: Scott Lahteine Date: Mon Mar 29 03:32:34 2021 -0500 reduced verbiage commit a335cf2edf66db08ab12d3800784b58ad992f6a9 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Mon Mar 29 11:19:38 2021 +0300 Fix MKS LVGL UI Main screen / print buttons (#21468) commit 33ccf1b9310ad2f1100d67346404a2e91a7b205a Author: Scott Lahteine Date: Mon Mar 29 01:49:35 2021 -0500 Adjust mfconfig script commit ccdbffbf3f599f0860c643647ce6c40f1eb5a4cd Author: Mike La Spina Date: Mon Mar 29 01:41:56 2021 -0500 Laser Coolant Flow Meter / Safety Shutdown (#21431) Co-authored-by: Scott Lahteine commit 8f509b0ae0827510a32d39e3788bc43a8ab7a2fd Author: thinkyhead Date: Mon Mar 29 00:45:48 2021 +0000 [cron] Bump distribution date (2021-03-29) commit 001c77d1f7b5f9d6069494a5cb7aae976231fd09 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Sun Mar 28 20:27:02 2021 -0400 YHCB2004 pins followup (#21472) commit c45b91aa94c7008e3fd8ea297df57948af9158a3 Author: Marcio T Date: Sat Mar 27 21:57:12 2021 -0600 Refactor Hilbert curve. Enhance Touch UI Bed Level Screen. (#21453) commit 5d0e6c21aa54d5b6439dfa2f57daadd2be973505 Author: thinkyhead Date: Sun Mar 28 00:34:16 2021 +0000 [cron] Bump distribution date (2021-03-28) commit 5991836e1fdd73f7a668cfc4221bfe3017a2580d Author: thinkyhead Date: Sat Mar 27 00:32:48 2021 +0000 [cron] Bump distribution date (2021-03-27) commit 532df198da6a9cadb441a1993b4b482e69e317ce Author: Leoric Date: Fri Mar 26 23:41:55 2021 +0300 MKS UI: Monitor state when idle (#21452) Co-authored-by: Scott Lahteine commit 241d2e3fa38aad0396d29a339def244bc23ea47b Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Thu Mar 25 21:44:35 2021 -0400 Fix for YHCB2004 (#21450) commit c55d53daa649c93d71a314726fd287c056975a23 Author: thinkyhead Date: Fri Mar 26 00:31:14 2021 +0000 [cron] Bump distribution date (2021-03-26) commit 8a67846872d1748611c0a32a246310df7ffc4d6a Author: Tomas Rimkus Date: Fri Mar 26 01:16:45 2021 +0100 Avoid watchdog reset in all wired EEPROMs (#21436) Co-authored-by: Scott Lahteine commit 704b8cd83c507675d6f71621e1c35172779ac9d1 Author: Scott Lahteine Date: Thu Mar 25 16:49:04 2021 -0500 Apply TMC UART to STM32, simplify commit 84b961cb20a4f0b2c1ad67a71d6c507a12f9da2a Author: Scott Lahteine Date: Thu Mar 25 16:19:03 2021 -0500 Define HW serial ports needed for TMC UART (#21446) commit 8bf6b190ff074ae9aa76734389cf7612a1e0fb0c Author: Ramiro Polla Date: Thu Mar 25 04:56:48 2021 +0100 Optimize LSF for size, efficiency (#21443) commit 69c6ffa90b017d31bf70dc174c716232ca2752ee Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Thu Mar 25 00:40:48 2021 -0300 Followup to SDIO patch (#21440) commit e989bf3b0ed79156c094f6e298b5ff326a53e3fb Author: espr14 Date: Thu Mar 25 04:39:29 2021 +0100 Endstops always on in G28 (#21441) commit cfdeab70cdacc9949eadc23b91d8e7c2a1fe63d8 Author: espr14 Date: Thu Mar 25 04:39:10 2021 +0100 Endstops always on after delta homing (#21442) commit de1161536bb25743266564d0ecba2554ccbef48e Author: MarlinFirmware Date: Thu Mar 25 00:27:01 2021 +0000 [cron] Bump distribution date (2021-03-25) commit 589bb921aeaac73c5056d7adfa157412b5ebe273 Author: Scott Lahteine Date: Sat Mar 20 22:39:13 2021 -0500 Tweak disabled variant options commit b59a4331fa05c41ea2004f959ae3d75a36bc5dd5 Author: Scott Lahteine Date: Sat Mar 20 22:43:47 2021 -0500 Update common-cxxflags.py comment commit 832059967c4cfbd48d82282c2e700b8d4b805492 Author: Scott Lahteine Date: Mon Mar 22 23:58:03 2021 -0500 Comment, clean up some PlatformIO scripts commit 30e7e2c2766d7dbbe0144344287994f1969dfadd Author: Martijn Bosgraaf Date: Wed Mar 24 18:21:11 2021 +0100 Extend M106/M107 for better laser module support (#16082) Co-authored-by: Scott Lahteine commit 3ae892bf91566abcda3b3d54577175b5f50683ea Author: Bryan Hunwardsen Date: Wed Mar 24 10:05:46 2021 -0700 SKR E3 Mini V2.0 Fan Bug Fix (#21079) Co-authored-by: Scott Lahteine commit 930752d46e6aacb484ea89dacae6baf823d78d62 Author: Miguel Risco-Castillo Date: Wed Mar 24 10:12:57 2021 -0500 Ender 3 V2 Status Line (#21369) Co-authored-by: Scott Lahteine commit d172c71376d3adf199e8de90593a135e6f49e427 Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Wed Mar 24 11:30:19 2021 -0300 Fix SDIO buffer alignment (#21396) commit fd8207dd9a1368c6bb75acd5fead76e6fbc0830f Author: kpishere Date: Wed Mar 24 10:14:11 2021 -0400 Misc build fixes (#21413) Co-authored-by: Scott Lahteine commit e7596d92c79134e342e2a3d5e6981fc562925231 Author: Ramiro Polla Date: Wed Mar 24 13:45:43 2021 +0100 Update Anet V1.0 display timing (#21425) commit 3ced55aa930076c912bad5df2ec5b4376a0eaba9 Author: Ramiro Polla Date: Wed Mar 24 13:32:08 2021 +0100 Optimize MarlinSettings with template methods (#21426) commit 2d2291d00eab6159de24eb7ff74001b1d6dd29e4 Author: Scott Lahteine Date: Wed Mar 24 05:40:28 2021 -0500 More IntelliSense-friendly declarations commit da4b6896f7e4f102d8c2164e7aecf22cf2922fe2 Author: Scott Lahteine Date: Wed Mar 24 03:28:48 2021 -0500 Group UBL parameters, add comments commit 8fca37f3737e66150c1ed5b5793e2c48dd108b23 Author: Scott Lahteine Date: Tue Mar 23 23:54:23 2021 -0500 Misc LCD cleanup commit 155dea6f14d18f6b0f272cb2718ba4c28f3afe1d Author: Scott Lahteine Date: Tue Mar 23 23:58:53 2021 -0500 Tweak mf helper scripts commit e5ff55a1be7646b6159e6dedac50bfbe57e6dfa0 Author: Scott Lahteine Date: Wed Mar 24 04:11:43 2021 -0500 Add typedef celsius_t (#21374) commit 07c24e72ac0deba0a9229a3cbcd8694279b102ab Author: MarlinFirmware Date: Wed Mar 24 00:13:49 2021 +0000 [cron] Bump distribution date (2021-03-24) commit a8ea6e646301756f138373112479713f0dfbe4dc Author: Scott Lahteine Date: Tue Mar 23 10:55:30 2021 -0500 Max temp/target followup commit 58f0330d3f51115dbc8cda792105fe66d4c61241 Author: Scott Lahteine Date: Fri Mar 19 16:41:47 2021 -0500 MKS / E3V2 LCD code cleanup commit f7aaa2e1c758dae56fb0d3dbb743a1c5c04245d2 Author: Scott Lahteine Date: Fri Mar 19 16:39:05 2021 -0500 Add typedef extra_fan_t commit cfa6c7d45ba72d1a0b26e6308191e008dcd0d9c9 Author: Scott Lahteine Date: Fri Mar 19 16:34:10 2021 -0500 Improve max temp / target commit df1ef496d1a88996cb1156fe933df59c6aaecbac Author: borland1 Date: Tue Mar 23 06:21:11 2021 -0700 Main / Config Custom Submenus (#18177) Co-authored-by: Scott Lahteine commit e3a12c3c28c2b6c4882eaa6549c6053b4d38953e Author: Scott Lahteine Date: Thu Mar 18 15:59:48 2021 -0500 Fix bool++ warning commit dd92c8e927ba6146b06f486ef5356ea30cd87f6e Author: Scott Lahteine Date: Tue Mar 23 05:54:41 2021 -0500 Followup to UBL Hilbert commit 10c14bcc05a85d3f012d90f9963d97c72b1296d6 Author: ellensp Date: Tue Mar 23 19:47:07 2021 +1300 Check NOZZLE_CLEAN_FEATURE settings (#21332) Co-authored-by: Scott Lahteine commit eee726ec7dfa774677e86d84573e04524eff64be Author: Marcio T Date: Tue Mar 23 00:45:51 2021 -0600 UBL - Hilbert space-filling curve probing sequence (#21387) commit 22fc59ab5973aa91cc2fed68792dce521cc70c93 Author: Scott Lahteine Date: Tue Mar 23 01:03:32 2021 -0500 Minor process_subcommands_now followup commit 50a6ffa9528d7d7419855cce631f95a7e19d5d6a Author: mihtjel Date: Tue Mar 23 07:00:22 2021 +0100 Fix macros that call macros crashing (#21383) When macros call macros, the null termination should remain in place until the macro is completed, and only then put back. Otherwise, the macro handler interprets this as setting the macro called to a new value. commit 2b621eb45d1b904165c414ee1711ad121c0a1c53 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Tue Mar 23 13:58:52 2021 +0800 Fix MKS H43 sensorless homing (#21388) commit c44ff3eb3d90a17bb7c1c87b6a8c710da63e942d Author: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> Date: Tue Mar 23 06:57:50 2021 +0100 Update Hungarian language (#21407) commit 3e7d830f570ece878f18732072de1b34156cdd66 Author: Marcio T Date: Mon Mar 22 23:51:03 2021 -0600 Mesh Editor for FTDI Eve Touch UI (#21381) commit 26db51fa9ddee1c99d62c36322b7cfb3aab68483 Author: thinkyhead Date: Tue Mar 23 00:13:33 2021 +0000 [cron] Bump distribution date (2021-03-23) commit fb9502e0fbb1e6114da1f1f9a18f69e457d95fab Author: thinkyhead Date: Mon Mar 22 00:13:40 2021 +0000 [cron] Bump distribution date (2021-03-22) commit d0ea2b286739379ff2524ecc1c8dcbb057e98c0b Author: thinkyhead Date: Sun Mar 21 00:14:12 2021 +0000 [cron] Bump distribution date (2021-03-21) commit 5573d98ecca3d721b9fe6259dcab96783416ce5a Author: thinkyhead Date: Sat Mar 20 00:13:15 2021 +0000 [cron] Bump distribution date (2021-03-20) commit 38b44e3fc9cb96866f9c25058667888ae43cfc0c Author: Scott Lahteine Date: Wed Mar 17 23:55:55 2021 -0500 HAL eeprom cleanup commit d4ab2024f50152f06223c3ab63a7a93b95b4b887 Author: Scott Lahteine Date: Thu Mar 18 15:59:48 2021 -0500 Fix bool++ warning commit 790bba155639cff44ca950639f4d685c16998bf5 Author: ellensp Date: Fri Mar 19 18:05:30 2021 +1300 Fix preflight motherboard target check (#21372) Co-authored-by: Scott Lahteine commit b51aed8aa54f41cc5897485d3b34b019ce38343d Author: Skorpi08 Date: Fri Mar 19 02:51:19 2021 +0100 Nextion TFT touch screen (#21324) Co-authored-by: Scott Lahteine commit 1f52112d72a1b05ce673581f4d5e9b9ac06ff795 Author: thinkyhead Date: Fri Mar 19 00:13:41 2021 +0000 [cron] Bump distribution date (2021-03-19) commit ad907a51e245a908024ff2736f95455d89e9571d Author: Scott Lahteine Date: Thu Mar 18 00:11:06 2021 -0500 Followup to planner cleanup commit 6673359d89f5f4194e0de2451e195421bccefd1e Author: Scott Lahteine Date: Wed Mar 17 21:26:25 2021 -0500 Move web-ui out of Marlin root folder commit 560448afeddfdea568d74c5be4e48c8b7f5886c7 Author: Scott Lahteine Date: Wed Mar 17 21:36:10 2021 -0500 Revert "Fix small wired EEPROM (#21337)" Reverting commit cc3e878f90 pending further investigation. commit deaefbf1dcb823f22a8f9edd3fbba069ef9257b9 Author: Scott Lahteine Date: Wed Mar 17 02:48:21 2021 -0500 Minor E3 V2 dwin cleanup commit 9823a37362c86f8f722c01af2147075d70234ada Author: Scott Lahteine Date: Tue Mar 16 15:12:28 2021 -0500 E1+ Autotemp and Planner comments commit 15bda88d0494a12d41e523c9c57dbe1d6cf8eeb2 Author: Scott Lahteine Date: Wed Mar 17 19:23:36 2021 -0500 Un-pause fans on STOP commit de73b9b9345f0d10291d56a801bfc0d8d61a9cf3 Author: Scott Lahteine Date: Wed Mar 17 19:24:07 2021 -0500 Update setup() description commit 2fc854eda06446c919c46a8e1cd323d5d0e7ad87 Author: thinkyhead Date: Thu Mar 18 00:15:21 2021 +0000 [cron] Bump distribution date (2021-03-18) commit 60607ed18d47ae5a7a51d92f468b044d76bd3187 Author: Scott Lahteine Date: Wed Mar 17 02:39:26 2021 -0500 mftest: usage with error commit 546e56ef3d28787035e53ec3f55d243c459edaca Author: thinkyhead Date: Wed Mar 17 00:13:28 2021 +0000 [cron] Bump distribution date (2021-03-17) commit dc78e0a2500d17b770e6a3a71730f1047c8a0056 Author: Scott Lahteine Date: Tue Mar 16 17:33:10 2021 -0500 Detect extra ENVS in preflight checks (#21361) commit 5ffa6f3331569c8fa0266c1395d7a6a8cf5515f9 Author: thinkyhead Date: Tue Mar 16 00:13:07 2021 +0000 [cron] Bump distribution date (2021-03-16) commit 1a23ffd7768483914485f9ea569c5813613eef92 Author: K.3D <40525619+KA8888@users.noreply.github.com> Date: Mon Mar 15 17:02:40 2021 +0100 KRATOS32 / K.32 board and LCD controllers (#21334) commit c07f99d5e406ef82376ad3baeb246d3e78c9a7e3 Author: X-Ryl669 Date: Mon Mar 15 02:23:41 2021 +0100 Teensy USB / serial followup (#21316) commit ae8be31247ef0731036935d25b4d571a7f1733a8 Author: thinkyhead Date: Mon Mar 15 00:13:36 2021 +0000 [cron] Bump distribution date (2021-03-15) commit 4f6910c131cda52b187f2caa42c9cf2ce0885a5d Author: Victor Oliveira Date: Sun Mar 14 14:14:09 2021 -0300 Script to generate Marlin TFT Images (#21340) commit d787cd307680c5c4f155ad4643c1137db56bb006 Author: X-Ryl669 Date: Sun Mar 14 18:11:11 2021 +0100 Fix build with Meatpack only on 2nd port (#21336) Co-authored-by: Scott Lahteine commit cc3e878f90b38bcd9116c1b4e8ff31a4209299e9 Author: Scott Lahteine Date: Sun Mar 14 11:43:20 2021 -0500 Fix small wired EEPROM (#21337) Co-Authored-By: jafal99 <26922965+jafal99@users.noreply.github.com> commit b9b9a3115a064acefae1386fcffd6c19a1aa6ead Author: XDA-Bam <1209896+XDA-Bam@users.noreply.github.com> Date: Sun Mar 14 17:42:25 2021 +0100 Update display timing for SKR Pro (#21346) commit b9065195f1babf00ee453c39410206af90a525ae Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun Mar 14 09:41:24 2021 -0700 Auto-label Feature Requests (#21348) commit 36d3b6aa95b454a7463651e12494b5b33a8b10bf Author: thinkyhead Date: Sun Mar 14 00:13:50 2021 +0000 [cron] Bump distribution date (2021-03-14) commit 911cd1a6d3883716986e7f3cf92fa4266de20d57 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sat Mar 13 08:37:49 2021 -0500 Custom menu items confirm option (#21338) Co-authored-by: Scott Lahteine commit da84b59ee4bfda6b878ec55b9684722a1946a14d Author: Victor Oliveira Date: Sat Mar 13 08:01:02 2021 -0300 No extra build folder for st/jlink upload (#21341) commit aba28ef0bc7e4b84b1cf9355e7ac99e4610fd63d Author: Scott Lahteine Date: Sat Mar 13 04:57:47 2021 -0600 Enhance workflows commit 11343bb0ea8d41d5e4a26c30e2f6e30876b079f6 Author: thinkyhead Date: Sat Mar 13 00:16:55 2021 +0000 [cron] Bump distribution date (2021-03-13) commit e9f7003b70331533c5d782bb3eb77f106ef89137 Author: Scott Lahteine Date: Thu Mar 11 23:43:48 2021 -0600 Change issue templates to YML commit 3107d8a0f4e71bc7853d78d026912582cf185adc Author: Scott Lahteine Date: Fri Mar 12 07:34:44 2021 -0600 Tweak opt_set, opt_enable commit 7f1fa0d1ff28cea68f5982eafab816b438c2ccdb Author: Scott Lahteine Date: Fri Mar 12 09:25:41 2021 -0600 Add M207/8/9 reporting (#21335) commit 604c5dedf473cc962e3a0e52eb82bb18b75da1f2 Author: Scott Lahteine Date: Sat Mar 6 01:09:13 2021 -0600 MarlinSerial cleanup commit 71f261726381e07fa92f2aac07e8253779a4f487 Author: Scott Lahteine Date: Fri Mar 12 08:34:22 2021 -0600 Pause SD queue early on M25 (#21317) commit 8532c2b9b6a228f5884951b28612d28233734a07 Author: Scott Lahteine Date: Fri Mar 12 07:14:33 2021 -0600 Fix MarlinSerial typo commit 1affbe2100c32f79d469b059be3eddd364a80431 Author: Scott Lahteine Date: Fri Mar 12 06:54:42 2021 -0600 Clean up, optimize ExtUI/TFT code (#21333) commit 9dc2712c47f9ce6e5eb0c388a3d50a3a28574c27 Author: X-Ryl669 Date: Fri Mar 12 12:25:30 2021 +0100 Undef unused 2nd serial option(s) (#21331) Co-authored-by: Scott Lahteine commit d3d1f82f731a8aa1c777ee2bd9decbf5d351f0ca Author: Scott Lahteine Date: Fri Mar 12 00:44:25 2021 -0600 Add emojis commit 2439c447793c87431174fcdc5407b63d5d936dda Author: Scott Lahteine Date: Thu Mar 11 23:49:34 2021 -0600 Emojis and donate link commit 6e1024737d0f74cdc7aed99a9275e071283fe4b7 Author: Evgeny Z Date: Fri Mar 12 05:12:24 2021 +0300 Lerdge-X I²C EEPROM pins, size (#21322) commit 03a41021def9513d4a77caf3c82a0733b7686193 Author: thinkyhead Date: Fri Mar 12 00:13:16 2021 +0000 [cron] Bump distribution date (2021-03-12) commit 19b94ec3252114ac54bb268bed44679588593729 Author: Scott Lahteine Date: Thu Mar 11 11:23:14 2021 -0600 Remove one label at a time commit b9fa72d5821c30289edfcd3acd2df440fe15fa25 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Mar 11 07:55:42 2021 -0800 Token for "Clean Closed" action (#21320) commit a73cff8e4fa5c856859093d54b9427d889049734 Author: thinkyhead Date: Thu Mar 11 00:13:08 2021 +0000 [cron] Bump distribution date (2021-03-11) commit 8857fc6c4b7dda4bd4a0907050c81183d989c0e9 Author: ellensp Date: Thu Mar 11 11:02:35 2021 +1300 Fix password menu stickiness before first auth (#21295) commit f671e6d1382c0d275e96b3ad67e4fb326cc8807a Author: Evgeny Z Date: Thu Mar 11 00:02:29 2021 +0300 Lerdge-K TMC 2208/9 UART pins (#21299) commit 4d6ebf95fced1393d13f1cf4b43fe789754e3141 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Mar 10 12:57:54 2021 -0800 Fix LERDGE 'extends' env references (#21305) Co-authored-by: Scott Lahteine commit 8c512191b2f3c3c937ce12da25b8203b464dfc6d Author: Cal1sto <47449942+Cal1sto@users.noreply.github.com> Date: Wed Mar 10 21:37:22 2021 +0100 Fix TouchMI stow in G34 (#21291) commit f147a8990a68503cd5eb2bb0fc7b26b7c00efe91 Author: X-Ryl669 Date: Wed Mar 10 21:22:20 2021 +0100 Fix MeatPack with per-serial-port instances (#21306) commit 048f6b4731366c8e843edac0adff1872e9e6763b Author: Scott Lahteine Date: Wed Mar 10 12:35:26 2021 -0600 Tricked-out declaration commit 9cba3c87ef4ed7155db1a6e0e1664405c92af1e2 Author: Scott Lahteine Date: Wed Mar 10 12:05:27 2021 -0600 Update MEATPACK test commit dbd28eecc9cd4b5954a4fd1ed0c02bd9788c279b Author: Scott Lahteine Date: Wed Mar 10 12:05:05 2021 -0600 Number serial from 1 to match settings commit 2c62886c719c67c9ed9a3d0741020a004633a109 Author: Scott Lahteine Date: Wed Mar 10 11:35:19 2021 -0600 Clean up spaces and words commit fe0b7700335470f03f5b5b8404b126efca8afbb6 Author: Scott Lahteine Date: Wed Mar 10 11:33:29 2021 -0600 Fix serial index types commit b75e682c502c572426cc6aa8110fe5869413e8d0 Author: Scott Lahteine Date: Wed Mar 10 11:31:32 2021 -0600 Add binary file transfer test commit bb6d718e19c7c0e6db743b0bc615b17f121f0073 Author: Victor Mateus Oliveira Date: Tue Mar 9 20:21:49 2021 -0300 fix meat pack internal buffer for multi serial commit 28a136d7f432546b765efd450eb45960c1ad2c2a Author: thinkyhead Date: Wed Mar 10 00:13:12 2021 +0000 [cron] Bump distribution date (2021-03-10) commit 10ec5c7f340cb10590fa4defe594726bc9473e91 Author: Chris Date: Wed Mar 10 00:06:00 2021 +0100 Fix LPC + TMC boot loop (#21298) commit 55c31fbe9a70710c6a209d40b7d0165d081dcdd0 Author: X-Ryl669 Date: Tue Mar 9 10:20:37 2021 +0100 Distinguish serial index from mask (#21287) commit 2f1fd4bbaab08e7fee2c405226dd7453de958b5b Author: Victor Oliveira Date: Mon Mar 8 22:59:35 2021 -0300 Host Keepalive followup (#21290) Followup to #21283 Co-authored-by: Scott Lahteine commit 18a10c0db1f63b263157fe584697b720b5339a0d Author: thinkyhead Date: Tue Mar 9 00:13:12 2021 +0000 [cron] Bump distribution date (2021-03-09) commit aad0f517b45c03da54b75f8cac00a4a91e86f520 Author: ellensp Date: Mon Mar 8 23:14:18 2021 +1300 CUSTOM_USER_BUTTONS followup (#21284) Followup to #18389 commit 1b9ff68f8ce59a2b142bbabd0fad3d3b377b5997 Author: Victor Oliveira Date: Mon Mar 8 04:11:37 2021 -0300 Fix Host Keepalive serial target (#21283) Co-authored-by: Scott Lahteine commit aa054471f2eac02a75ac411181dd4ca71f9fab74 Author: ellensp Date: Mon Mar 8 17:06:33 2021 +1300 M303 followup (#21282) Followup to f2ed18d150 commit f2ff75f3a2f978061932c20e915aa1cddcc66167 Author: thinkyhead Date: Mon Mar 8 00:18:19 2021 +0000 [cron] Bump distribution date (2021-03-08) commit 5dc8f5cfabbfcc6803cad1edd3ea469b29b0834a Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat Mar 6 20:55:37 2021 -0800 Extend Heater Overshoot Options (#21273) Co-authored-by: Scott Lahteine commit ced1bb9404ee44a9b7f2f870a4d66a559418c2a0 Author: ellensp Date: Sun Mar 7 16:43:43 2021 +1300 Update obsolete debug define (#21276) commit 9f14127fd6f839d706084bf1faa15d466aa47ede Author: thinkyhead Date: Sun Mar 7 00:14:45 2021 +0000 [cron] Bump distribution date (2021-03-07) commit b95e548ddbcbc1c088eabc17992d0a06f82ac167 Author: Mike La Spina Date: Sat Mar 6 14:13:28 2021 -0600 Cooler (for Laser) - M143, M193 (#21255) commit 87bef13a4c9c1c7f3a670f906c106bc868ab12f2 Author: Scott Lahteine Date: Sat Mar 6 10:16:18 2021 -0600 Fix DGUS include paths Followup to #20609 commit 72cc5a49e6fdcf7246b6bded66a4b4fc043054a3 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Sat Mar 6 23:04:05 2021 +0800 MKS H43 fixup (#21267) Co-authored-by: makerbase <4164049@qq.com> Co-authored-by: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Co-authored-by: Scott Lahteine commit b26516b3ac7cd7d15a751af4b299a38ac8ac7a57 Author: Scott Lahteine Date: Tue Feb 2 15:05:12 2021 -0600 Clean up labels on close commit a94fa7b4768d3e7a5ab6c580de96160f697753db Author: ellensp Date: Sun Mar 7 02:19:15 2021 +1300 Fix Creality DWIN - Broken (bool)Serial ? (#21272) Co-authored-by: ellensp commit 43b712d42b14014eeb820e6f38285a64e7b872db Author: Scott Lahteine Date: Sat Mar 6 06:57:51 2021 -0600 Pins/tests followup commit 2c5967925f5a09db2522d1611efd225dbd3990dd Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat Mar 6 01:50:26 2021 -0800 Pins/tests followup (#21268) Missing commit from #21254 Co-authored-by: Scott Lahteine commit 4182cf3e9e935ff90701a497ee34ca8ebef263c4 Author: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> Date: Sat Mar 6 09:00:10 2021 +0100 Update Hungarian language (#21266) commit a1796ecace74680434237507548d40cef15564ad Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Sat Mar 6 08:56:43 2021 +0100 Link to bugfix tree (#21263) commit 3eb8e26174efd20797addced921069050d1a344f Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Mar 5 23:53:44 2021 -0800 Tweak/Consolidate followup (#21261) commit d05bf563a21e023f91d0637e3e9012df7c0d1d01 Author: thinkyhead Date: Sat Mar 6 00:12:57 2021 +0000 [cron] Bump distribution date (2021-03-06) commit 3ea56ba4c72fb1e9c4bb4a896b8cf87361a48f4b Author: Scott Lahteine Date: Fri Mar 5 04:30:52 2021 -0600 Tweak tests, consolidate pins target validation (#21254) commit f56929d0df85a7a05b28c06aaf0a45aec286a71f Author: thinkyhead Date: Fri Mar 5 00:17:19 2021 +0000 [cron] Bump distribution date (2021-03-05) commit 101f09aabde0a903051eab12653b1f7dc042bed4 Author: Victor Oliveira Date: Thu Mar 4 20:39:08 2021 -0300 Fix multi-serial CRC error crash (#21249) commit a0d312396adb089d31b1d4c1379d86dcd5b734ee Author: Tanguy Pruvot Date: Fri Mar 5 00:34:38 2021 +0100 Followup to MP_SCARA/TPARA patches (#21248) commit 6903a2ffc50c01d05c761d0b3384bad076e537c1 Author: Scott Lahteine Date: Thu Mar 4 16:36:44 2021 -0600 Remove extra G42 commit 8dee12ff05fedf183d690e53fa936d4e6987a5f6 Author: Oleksii Zelivianskyi <50808386+alexeyzel@users.noreply.github.com> Date: Thu Mar 4 11:33:02 2021 +0200 Correct fan pins for MKS Robin Nano v3 (#21238) commit 9299f4e98a95066c232d4657ff6d7c6acbb72fe0 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Mar 4 01:32:02 2021 -0800 SMUFF => SMuFF (#21243) commit 6225870aa917e81c35a910653f0f482998a6e5c7 Author: Scott Lahteine Date: Thu Mar 4 03:15:32 2021 -0600 Implement G42, after all commit dad486c01b34d78ab3a62b8815a3f9f48406d775 Author: Scott Lahteine Date: Thu Mar 4 03:21:15 2021 -0600 MK2_MULTIPLEXER dependency commit 0b7e8576147bb3a1b5b6cf6a9c4afcd8ea8958a2 Author: Scott Lahteine Date: Wed Mar 3 20:48:58 2021 -0600 Update some py scripts commit 431f6bf3a53f8e20ef6b74e6714d14bb23f70cc7 Author: Scott Lahteine Date: Wed Mar 3 20:48:05 2021 -0600 Parking Extruder solenoid fix/cleanup commit 9372aa99af062933332a24131e7648c0afba64af Author: Scott Lahteine Date: Wed Mar 3 20:41:58 2021 -0600 Fix teensy35 tests commit 81c29ecc7e819ac806899136916f27129f4ca42a Author: thinkyhead Date: Thu Mar 4 00:17:17 2021 +0000 [cron] Bump distribution date (2021-03-04) commit dd388aedfda25796c86b532605b26b1e598ce410 Author: Scott Lahteine Date: Wed Mar 3 17:57:24 2021 -0600 TPARA followup commit a46e0257252bcd50f4c7acb04215f3ad2a92047c Author: Axel Date: Wed Mar 3 20:46:32 2021 -0300 TPARA - 3DOF robot arm IK (#21005) Co-authored-by: Scott Lahteine commit fd270ddc6c5b4d78437d590ae8066326850555d7 Author: Scott Lahteine Date: Wed Mar 3 00:11:50 2021 -0600 misc. cleanup commit 369ffe518d0b90bd9caa457a710014710b5046db Author: Scott Lahteine Date: Wed Mar 3 00:15:56 2021 -0600 Improve opt_set (etc.) used for tests commit 0afa4cc9573565b4fdb8a24f85bd0ab41c3d1721 Author: Sola <42537573+solawc@users.noreply.github.com> Date: Wed Mar 3 10:58:42 2021 +0800 Fix MKS H43 compile (#21240) commit 872f0314055596990b873426da8695526e394e1a Author: thinkyhead Date: Wed Mar 3 00:15:08 2021 +0000 [cron] Bump distribution date (2021-03-03) commit 35791c6371dad924f9a3f0fb3aebacfd298ecc35 Author: Scott Lahteine Date: Mon Mar 1 19:39:43 2021 -0600 Trust XY after Quiet Probing short sleep (#21237) commit 2f97505b93f3550707cbaa05f6118de86670f57e Author: Scott Lahteine Date: Mon Mar 1 19:38:45 2021 -0600 Trust XY after Quiet Probing short sleep (#21237) commit 137f70b1221ceb3218d7ed0a61939f650568302b Author: thinkyhead Date: Tue Mar 2 00:11:00 2021 +0000 [cron] Bump distribution date (2021-03-02) commit dfa33082bbe7cdf2888349a301cfd6636430cd0a Author: Scott Lahteine Date: Mon Mar 1 07:10:00 2021 -0600 Fix some config builds commit b2bc85f6f657ddfeedb8fc5c608fc039c064b2aa Author: Scott Lahteine Date: Mon Mar 1 05:39:31 2021 -0600 build_all_examples -c -s, silent mftest commit 21372c3d4e0593a9c1652c24b81d5339e750a440 Author: Scott Lahteine Date: Mon Mar 1 05:48:39 2021 -0600 Better mftest order commit 7ee9aefed73cabd7cb649b2b119110e8f9d27a14 Author: MoellerDi Date: Mon Mar 1 15:03:41 2021 +0100 G-code Digital Buttons (#18389) Co-Authored-By: android444 <24375898+android444@users.noreply.github.com> Co-authored-by: Scott Lahteine commit 8c9a59c29e5cf8158e09123730d45e7a7ac29ecd Author: Scott Lahteine Date: Mon Mar 1 06:15:06 2021 -0600 Fewer warnings commit 28404f9e87aea01489c32372ed6a6835ee1bf252 Author: Scott Lahteine Date: Mon Mar 1 06:03:36 2021 -0600 POWER_LOSS_ZHOME_POS followup commit e66e51fa6d92cce79ade66893639a333ca53e88a Author: Nick Date: Mon Mar 1 10:23:10 2021 +0000 Safe Z homing for Power Loss Recovery (#16909) commit 2b9842e094c3a99f73f28cd21ceced4c3a523956 Author: Ilya Date: Sun Feb 28 23:33:07 2021 -0800 Default microsteps to axis first stepper (#21230) commit f52cba6aff5e8e3675070a965e8b74adc810d728 Author: Marcio T Date: Sun Feb 28 19:52:59 2021 -0700 Minor FTDI EVE Touch UI fixes (#21232) commit 713de872ce055bd10bd59b4f811136b0ec0cfbae Author: Stephan Date: Mon Mar 1 03:16:22 2021 +0100 Filament Runout handling for Mixing Extruder (#20327) Co-authored-by: Scott Lahteine commit 1aa421efe54eef40a5ba2ba7706908a4ca384586 Author: Scott Lahteine Date: Sun Feb 28 19:50:17 2021 -0600 Filament sensor cleanup commit dd42831cba7334c5d106ba435bdb41b6135971bb Author: Scott Lahteine Date: Sun Feb 28 19:43:46 2021 -0600 Serial macros cleanup commit f0b662ff58a68511dbd704550bb7f358c5cbb4a4 Author: thinkyhead Date: Mon Mar 1 00:13:41 2021 +0000 [cron] Bump distribution date (2021-03-01) commit e8ca077f30d3bb3dfc81971ec1051cce8bf335ec Author: Roman Moravčík Date: Sun Feb 28 23:12:27 2021 +0100 Update Slovak language (#21224) commit 2328f8b9b888844a7e12812155743c8098e5c339 Author: Fabio Viappiani Date: Sun Feb 28 23:09:15 2021 +0100 Fix TERN typo (#21229) commit 680172a084caba61ebb0524e407f2c476eaa6e63 Author: Scott Lahteine Date: Sat Feb 27 23:51:56 2021 -0600 Tweaks to build scripts commit 254b25296b37cdb170e32a5530348907e7b8c9fc Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun Feb 28 05:41:16 2021 +0100 [SAMD51] Respect serial buffer size (#21194) commit 903d0b91fc28b1198e7b90131f94f02a7c3f1530 Author: Scott Lahteine Date: Sat Feb 27 22:38:57 2021 -0600 Tweaks to build scripts commit 54ccfcc7053bfa57dfe88abca5e420e72548c99c Author: Scott Lahteine Date: Sat Feb 27 16:26:49 2021 -0600 whitespace commit dfacd260bb9ba1257d64bb1377627286c43675e1 Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Sun Feb 28 01:32:34 2021 -0300 ST STM32 platform version 12 (#21219) commit 04b83d50a29b96b746a0a1d0889960bad32aee54 Author: RudolphRiedel <31180093+RudolphRiedel@users.noreply.github.com> Date: Sun Feb 28 02:39:32 2021 +0100 Two additional EVE displays (#18839) commit 123658569357e6a287a0cf97b7a11f9b819063c7 Author: thinkyhead Date: Sun Feb 28 00:13:36 2021 +0000 [cron] Bump distribution date (2021-02-28) commit c76008bd6a7bc0f88fec7fa58f11cfec88ab366f Author: Sola <42537573+solawc@users.noreply.github.com> Date: Sun Feb 28 07:35:32 2021 +0800 MKS H43 controller (#20609) commit e0aa9ce372710d2bd1147ab0779072e6a02b61c9 Author: LinFor Date: Sun Feb 28 01:06:48 2021 +0300 RGB Caselight (#20341) commit ee7701c15bc91f7a05f973e03624fb14815f5027 Author: jbuck2005 <59450931+jbuck2005@users.noreply.github.com> Date: Sat Feb 27 16:54:43 2021 -0500 SPEED => FEEDRATE (#21217) commit 6e1c133e33861b710f6b85e9e50447d08642b287 Author: Evgeny Z Date: Sat Feb 27 22:50:44 2021 +0300 Apply AUTO_POWER_CONTROL later in setup() (#21193) Co-authored-by: Scott Lahteine commit 969268166eafa09e2ddc8f0eece35178a89fc46b Author: Kachidoki Date: Sat Feb 27 20:45:12 2021 +0100 Duplicate fan speed in M106/7 IDEX Duplication Mode (#21208) commit 83a156ef47be2f8e43e346bacbbcff809e4127bb Author: Arjan Mels <43108771+arjanmels@users.noreply.github.com> Date: Sat Feb 27 20:32:57 2021 +0100 Fix M876 when called from EP (#21210) commit 6136959a6a0a5cb2b5fb303822ac0fc4867433a7 Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat Feb 27 20:24:36 2021 +0100 [SAMD51] Postmortem Debugging not implemented (#21211) commit 4f840c211c02f4ccf4cb50ebe7a0371a9fcdc55b Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sat Feb 27 20:23:00 2021 +0100 [SMUFF] Use EXTRUDERS for extended commands (#21212) commit db5967472b13cca8ea1fd778e46607032f7953e5 Author: X-Ryl669 Date: Sat Feb 27 20:16:33 2021 +0100 Fix G-code Queue merge (#21213) commit e65a84f6eae04824873cbaf39f005c6251d8ccdd Author: X-Ryl669 Date: Sat Feb 27 20:13:04 2021 +0100 G-code Queue followup (#21214) commit 526924559f3922101b11213bd9deba36d1472ae5 Author: thinkyhead Date: Sat Feb 27 00:12:45 2021 +0000 [cron] Bump distribution date (2021-02-27) commit 24623d398c9a3489af88100e5158ec4a590ab577 Author: Alexander D. Kanevskiy Date: Sat Feb 27 02:03:11 2021 +0200 Fix preflight complex extend handling (#21191) commit 56462cf082e8bf2bae6cb288c5daa4b77289cfb0 Author: X-Ryl669 Date: Sat Feb 27 00:59:28 2021 +0100 Make F_CPU a compile-time constant (#21051) commit f384f81253fbd70d3d0cee799ab8fc5de80b63b3 Author: Victor Oliveira Date: Fri Feb 26 20:36:22 2021 -0300 Fix GTR / SKR PRO + USB Flash Drive build (#21197) commit 427b5d61f46ce0e751e09c841ae62ddeec3df1ac Author: Victor Oliveira Date: Fri Feb 26 20:33:34 2021 -0300 More LERDGE envs followup (#21205) commit e27fba0c0629f9c5c3b90ba0f597de246ca28de7 Author: Fabio Viappiani Date: Sat Feb 27 00:10:50 2021 +0100 Fix M355 with NEOPIXEL (#21200) commit 7a1ec7856361790ec5a76d70698ace798dfa43b5 Author: ldursw <37294448+ldursw@users.noreply.github.com> Date: Fri Feb 26 20:01:11 2021 -0300 Init (stow) BLTouch before X/Y homing (#21192) commit ec42be346d5c0d072feb8a1b63ef2fdbd6dc1e98 Author: X-Ryl669 Date: Fri Feb 26 23:54:46 2021 +0100 Fix and improve G-code queue (#21122) Co-authored-by: Scott Lahteine commit ccf990a0d79869d7d0fef9bc667f04b691771b7e Author: thinkyhead Date: Fri Feb 26 00:12:56 2021 +0000 [cron] Bump distribution date (2021-02-26) commit fd77251fdd3aed6d44f8fb0e3424d5237bc8e2d9 Author: Scott Lahteine Date: Thu Feb 25 10:24:58 2021 -0600 Chamber followup commit f7d9305786927a1d95903464af3480fd64049034 Author: Vi B-P Date: Thu Feb 25 11:23:17 2021 -0500 Preheat Menu shortcut option (#20350) commit bcda46e3f3435a1f87d224be2f81778c1855deb7 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Thu Feb 25 17:09:00 2021 +0100 Combine Z_AFTER_DEACTIVATE with UNKNOWN_Z_NO_RAISE (#20444) Co-authored-by: Scott Lahteine commit 7fc75fc48263690cd8dd64686213d6a42d0795e6 Author: Victor Oliveira Date: Thu Feb 25 12:23:30 2021 -0300 Zero Endstops followup (#21188) commit 45fff07a4cfd2442b8bcbb6a081eaeb1fd5810f8 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Thu Feb 25 16:21:17 2021 +0100 Fix LEVEL_CORNERS_USE_PROBE with BLTOUCH_HS_MODE (#21161) commit 08d54b3d78824111dbe3fca894c4d50aec53586c Author: Scott Lahteine Date: Thu Feb 25 09:14:24 2021 -0600 Eryone Thinker V2 (#21190) Co-Authored-By: Bryan Joshua Pedini commit 735c1b6183739152eeddade4c06c17e3b0de38bc Author: Katelyn Schiesser Date: Thu Feb 25 06:28:27 2021 -0800 PROBING_HEATERS_OFF sub-option WAIT_FOR_HOTEND (#20835) commit bb1039d4c91b7bfd282cd5b2b86e1466db80ba28 Author: ellensp Date: Fri Feb 26 03:15:55 2021 +1300 Preflight checks for PlatformIO builds (#21068) Co-authored-by: Alexander D. Kanevskiy commit a21d4c06aeb38b2b93bcfa21bd5773105d8df9be Author: Katelyn Schiesser Date: Thu Feb 25 06:14:24 2021 -0800 Use 'H' value for UBL G29 z-clearance (#21114) commit 12468f5e9f22588660e17572292157bd2a86ef19 Author: Scott Lahteine Date: Thu Feb 25 05:15:49 2021 -0600 Tweak case light comment commit 468e437390afdb1de7059e7f9049d0b30c312024 Author: deirdreobyrne Date: Thu Feb 25 10:49:34 2021 +0000 Allow Zero Endstops (e.g., for CNC) (#21120) Co-authored-by: Scott Lahteine commit d167af4c388df18601380a7edcd5bd6d221458c0 Author: Tanguy Pruvot Date: Thu Feb 25 11:35:18 2021 +0100 Add BOARD_PREINIT (for Longer3D open drain pins) (#21159) commit 3061a31c92fd5c24172279d411c97587633adb64 Author: Scott Lahteine Date: Thu Feb 25 01:56:11 2021 -0600 Update BLTOUCH_HS_MODE comment commit 73e354b7a02d1a88bd1a97a484be2744353a7e83 Author: Nick Date: Thu Feb 25 07:38:01 2021 +0000 Fix Anycubic Chiron TFT SD menu (#21183) commit 0cc03f912cf0a7f0923bdcf8ee6981e03da15fde Author: X-Ryl669 Date: Thu Feb 25 08:26:56 2021 +0100 Let libmaple accept RX/TX_BUFFER_SIZE (#21177) commit f003e52009ba649f95463a115253d6dadcf361e6 Author: X-Ryl669 Date: Thu Feb 25 08:23:29 2021 +0100 Combined LPC / Serial fixes (#21178) Co-authored-by: Scott Lahteine commit 13c4eef63752387b1a90b0b0c3834bcf276a5ac8 Author: Scott Lahteine Date: Thu Feb 25 00:56:15 2021 -0600 Expose more env builds in PlatformIO extension commit d5b06624fb2b14b57a9621d7b86caf9f1c5dbfb9 Author: Victor Oliveira Date: Wed Feb 24 21:36:55 2021 -0300 Fix MKS Robin Nano V3 I2C pins (#21174) commit a3a10b62f21cfbedfd001746faa46ac55d248b36 Author: Ken Sanislo Date: Wed Feb 24 16:26:51 2021 -0800 Chamber Heater PID (#21156) Co-authored-by: Scott Lahteine commit 03160719eb3d9ed31115956946826cb3b08babbc Author: thinkyhead Date: Thu Feb 25 00:12:36 2021 +0000 [cron] Bump distribution date (2021-02-25) commit b276a7fd172638ea3b8fe0a601a41d76f1e8cb8d Author: Nick Date: Wed Feb 24 02:13:24 2021 +0000 Fix Chiron TFT serial comms (#21152) commit 37e2250992a2b65ef41b314403b5dc9d8a5fbbd7 Author: thinkyhead Date: Wed Feb 24 00:12:40 2021 +0000 [cron] Bump distribution date (2021-02-24) commit bdb8c07bb22bed1ca78f4b7d14651a8e04828e82 Author: Scott Lahteine Date: Tue Feb 23 16:09:54 2021 -0600 Outdent UBL code commit 27f9437d3141635e290b11109b5f6d0929962194 Author: Scott Lahteine Date: Tue Feb 23 16:08:00 2021 -0600 G92, subcodes flag cleanup commit ba301fd800173ccdf9703e1e8bdb702720c6a872 Author: Marcio T Date: Mon Feb 22 21:38:54 2021 -0700 FTDI Touch UI followup (#21167) commit 53d7ae4e9b652ca217b58bd0837dbf38cf2d572f Author: thinkyhead Date: Tue Feb 23 00:12:43 2021 +0000 [cron] Bump distribution date (2021-02-23) commit 7a027be25594ae79166b2612c17cf0db3aa29ddf Author: thinkyhead Date: Mon Feb 22 00:12:47 2021 +0000 [cron] Bump distribution date (2021-02-22) commit ece06c26a92cd545a3cc1b15aea7b5a222f7faf9 Author: Marcio T Date: Sun Feb 21 03:05:59 2021 -0700 Enhance and fix FTDI Touch UI (#21148) commit 8d2885377435e423eaa187b52f33ce5d12fb03be Author: X-Ryl669 Date: Sun Feb 21 03:22:20 2021 +0100 Postmortem Debugging to serial port (#20492) commit fb8b421aac943fe3bf8f25789c52dcd97580c818 Author: kpishere Date: Sat Feb 20 21:20:55 2021 -0500 Fix SPI on SMART RAMPS with mega2560 (#21128) commit b3ecede429d90e1a493b02e31b2c1d67411ce5da Author: ellensp Date: Sun Feb 21 15:14:47 2021 +1300 Fix G29 missing defines (#21145) Co-authored-by: ellensp commit b8d7925d0d69e9b2d41a2e72e47668830d9a5351 Author: thinkyhead Date: Sun Feb 21 00:13:04 2021 +0000 [cron] Bump distribution date (2021-02-21) commit 95e0ed2826e0c9d2f121acb145eb97927fc6190a Author: thinkyhead Date: Sat Feb 20 00:12:21 2021 +0000 [cron] Bump distribution date (2021-02-20) commit 11e11b87678755b483c18f5287c5f2ec967eb09e Author: thinkyhead Date: Fri Feb 19 00:12:24 2021 +0000 [cron] Bump distribution date (2021-02-19) commit a4c73860a12ae67083a294b8c2eaad78c11c5081 Author: espr14 Date: Thu Feb 18 06:22:29 2021 +0100 Fix cleaning_buffer_counter check (#21115) commit 241297b6d663b3257fba0e86fe858cff034b0872 Author: thinkyhead Date: Thu Feb 18 00:12:54 2021 +0000 [cron] Bump distribution date (2021-02-18) commit 65e24f812f2c0d038434fb312fc531d664c123da Author: Scott Lahteine Date: Wed Feb 17 17:04:51 2021 -0600 Fixes for MP_SCARA (#21113) Co-Authored-By: svsergo <52426708+svsergo@users.noreply.github.com> commit fd455be55cca886d5518ff7efeaee007802abbe1 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Tue Feb 16 22:23:54 2021 -0500 YHCB2004 followup (#21111) commit 7e172bf456ea52ce1a4206d1184e18745515039d Author: Scott Lahteine Date: Tue Feb 16 21:13:53 2021 -0600 Fix IDEX broken endstop test (#21110) commit a211dc03b3f1ac776a5bc849ec871a01589d3fc9 Author: jbuck2005 <59450931+jbuck2005@users.noreply.github.com> Date: Tue Feb 16 21:30:54 2021 -0500 Note FAN2_PIN silkscreen label (#21087) commit 490d4a504a40a70e1a51c4758d37ec6116272b38 Author: Vert <45634861+Vertabreak@users.noreply.github.com> Date: Tue Feb 16 21:29:55 2021 -0500 GT2560 v4.1B, YHCB2004 SPI character LCD (#21091) Co-authored-by: Scott Lahteine commit c076a7f7a261fec08abcbfd9801a34c29b19ba86 Author: ellensp Date: Wed Feb 17 15:28:03 2021 +1300 Swap Trigorilla Pro Z_MIN / MAX endstop pins (#21095) commit 7b23f41fd4c5b109752490b203a1fe8a92070843 Author: X-Ryl669 Date: Wed Feb 17 01:41:00 2021 +0100 Fix/improve configs build script (#21086) commit f2b9becd7eeda76dd0d3b3318b5e38c1f7508e6d Author: thinkyhead Date: Wed Feb 17 00:12:26 2021 +0000 [cron] Bump distribution date (2021-02-17) commit f298cde47e0f81ab37c799ee33a130ad5ed8f5b0 Author: Allen Bauer Date: Tue Feb 16 15:35:31 2021 -0800 BTT002 pins for FYSETC mini12864 (#21096) commit 28fa18874b435b6753a1d6ebce9a07f175dd46a2 Author: ellensp Date: Wed Feb 17 11:59:38 2021 +1300 Fix "BUTTON_CLICK redefined" warning (#21098) commit e699f9cbf6a73cc8db9d40a44e44064890a6e233 Author: thinkyhead Date: Tue Feb 16 00:12:28 2021 +0000 [cron] Bump distribution date (2021-02-16) commit 31a434b9d79bb771d2410a5ce02dea0d577a8c93 Author: jbuck2005 <59450931+jbuck2005@users.noreply.github.com> Date: Mon Feb 15 07:03:44 2021 -0500 Update platform ststm32 to 11.0 (#20928) commit d86910ce9482295c5dcb113862678f85fc266616 Author: X-Ryl669 Date: Mon Feb 15 12:48:11 2021 +0100 Script to download & build Configurations (#20992) Co-authored-by: Scott Lahteine commit 79ee2fa20a8288b9f208f2cfc7ce995069f17c5b Author: ellensp Date: Tue Feb 16 00:15:08 2021 +1300 EXP headers for RAMPS 1.x (#21054) Co-authored-by: Scott Lahteine commit 9e0fc442105b6d23827bd767a811552a1804e9ed Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Mon Feb 15 11:45:38 2021 +0100 Fix MMU2 compile error (#21065) commit 35e9c131d63dca39b5c6de8abe64bfdd89b3c640 Author: ellensp Date: Mon Feb 15 23:42:33 2021 +1300 Fix remaining time divide-by-zero (#21080) commit e27a2a96a034a2e0b1e6b48c68ddec9651956a27 Author: Steven Haigh Date: Mon Feb 15 11:21:47 2021 +1100 E3V2 Status Area followup (#21072) commit 29fa369f71d4486880b81644daae62006321ea20 Author: thinkyhead Date: Mon Feb 15 00:12:40 2021 +0000 [cron] Bump distribution date (2021-02-15) commit db82a25177d0add09883c5475a248cb062e5eda3 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Feb 14 17:45:36 2021 -0500 E3V2 DWIN live movement (#21035) commit b2f77bb0507fd5cd7029d3bed207b5a52f7c9fe4 Author: InsanityAutomation Date: Wed Feb 10 07:34:37 2021 -0500 Use configuration website, fix edit color commit d9e79fd7286ba150906574afb237c0a8a380df9c Author: Scott Lahteine Date: Sun Feb 14 16:25:28 2021 -0600 Fix a board comment commit 52e8d8db54cfc89b41735dd25e57ecd830a9260e Author: Scott Lahteine Date: Sat Feb 13 21:51:26 2021 -0600 anet_et4_openblt.py => openblt.py commit cbf325a6b887e3b195b0309adc57b1038a42525d Author: Scott Lahteine Date: Sat Feb 13 21:50:19 2021 -0600 Coolant Control sanity-checks commit 8fd88eee2be991c18c5e6beecbdceb174c21012c Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Sun Feb 14 04:04:22 2021 +0100 Don't create unused Serial Port instances (#21066) Co-authored-by: Scott Lahteine commit 98a27bff0d49abcf45c3cb27bcde6909e49c21a8 Author: Scott Lahteine Date: Sat Feb 13 19:06:55 2021 -0600 Allow mftest -t to select by number commit 00985cffea749e4bd7c14fbffb483c69ed44716c Author: Scott Lahteine Date: Sat Feb 13 19:05:28 2021 -0600 Update helpful links commit 0fe1051101a1c982c28cdf7c0f6fb8b2d3cb0446 Author: thinkyhead Date: Sun Feb 14 00:12:44 2021 +0000 [cron] Bump distribution date (2021-02-14) commit fd2477923cd77f2b049b07badbfb6eb0b544325c Author: Scott Lahteine Date: Fri Feb 12 19:33:19 2021 -0600 Minor serial code cleanup commit d4fb3728991eb32296baf84f7577ccdc10eb608f Author: thinkyhead Date: Sat Feb 13 00:12:10 2021 +0000 [cron] Bump distribution date (2021-02-13) commit ce1ec227048ec7af26f6bfd58148268fa2189882 Author: X-Ryl669 Date: Fri Feb 12 15:33:27 2021 +0100 Use -g3 to include macros in debug symbols (#21052) commit 03789c4d970c335fdeaa6cd856f36798ad015220 Author: X-Ryl669 Date: Fri Feb 12 14:49:07 2021 +0100 Improve Delay test report (#21047) commit e0ca244623ea106c3bfdb9b576dfd52487d43abd Author: kpishere Date: Fri Feb 12 06:00:41 2021 -0500 Fix AZSMZ_12864 on SMART RAMPS (#21056) commit 3c41f108df202089ef4e01daaa0b2a4c8bdb63ee Author: Jyers <76993396+Jyers@users.noreply.github.com> Date: Fri Feb 12 05:55:06 2021 -0500 Improved Ender 3 V2 display status area (#20983) Co-authored-by: Scott Lahteine commit 7069d03ab272d7f5e1108d78794180e22d5a9785 Author: kpishere Date: Fri Feb 12 05:42:31 2021 -0500 Support SMART RAMPS 1.4 with Mega2560 (#21059) commit 01215f5015d04ac37c6ec230323772737a983948 Author: Scott Lahteine Date: Fri Feb 12 03:52:21 2021 -0600 Ender 3 V2 DWIN cleanup (#21061) commit 42d00b13df5af260adf44213e5fae0f7e04681ec Author: Michael Telatynski <7t3chguy@googlemail.com> Date: Fri Feb 12 00:32:31 2021 +0000 Improve probe preheat behavior (#21033) Co-authored-by: InsanityAutomation Co-authored-by: Scott Lahteine commit 1f21a499d4f14fe9be62bf16620ccc83b6f03285 Author: thinkyhead Date: Fri Feb 12 00:12:23 2021 +0000 [cron] Bump distribution date (2021-02-12) commit 274c729fd3c771950fc45cd5b81e6f9eb15c4f35 Author: thinkyhead Date: Thu Feb 11 00:12:23 2021 +0000 [cron] Bump distribution date (2021-02-11) commit 9d24ee8daf0773ca1870a5c156a253458cc2ee1b Author: Scott Lahteine Date: Wed Feb 10 02:57:27 2021 -0600 chmod and paths commit dd5e0f724a26c5a7fea8b3a017a19933f62739c1 Author: thinkyhead Date: Wed Feb 10 00:12:10 2021 +0000 [cron] Bump distribution date (2021-02-10) commit 653d73ff074c2d8f6cfafb95a7ddf53dae50be4e Author: Scott Lahteine Date: Mon Feb 8 21:31:26 2021 -0600 Reheat bed first commit 662d81c801eaa6323ef8f5c99fb2d2206812a0ce Author: Scott Lahteine Date: Mon Feb 8 21:27:00 2021 -0600 Ender 3 V2 DWIN cleanup (#21026) commit 187602dfaf744615e715c540b9e2d4f01d308224 Author: Scott Lahteine Date: Sun Feb 7 18:16:43 2021 -0600 Update M808 comment commit 8707ae23e22d40e7f818cf77e7ec89038fdaacf7 Author: JoAnn Manges Date: Mon Feb 8 20:51:57 2021 -0500 MAX Thermocouples rework (#20447) Co-authored-by: Scott Lahteine commit 0127763ade586d70183974062e296d3971091dd2 Author: thinkyhead Date: Tue Feb 9 00:12:14 2021 +0000 [cron] Bump distribution date (2021-02-09) commit e7c711996bd3080f5e343eff5556736cbf2e2416 Author: X-Ryl669 Date: Mon Feb 8 07:37:24 2021 +0100 Serial refactor. Default 8-bit ECHO to int, not char (#20985) Co-authored-by: Scott Lahteine commit 1e726fe405cb8e218398a42bb14ca571e25466b5 Author: Arjan Mels <43108771+arjanmels@users.noreply.github.com> Date: Mon Feb 8 05:47:08 2021 +0100 Fix STM32F1 emergency parser (#21011) commit 24e18a9fbd567e0ed9e0633a50ebc7f599ef5cd5 Author: Alexander D. Kanevskiy Date: Mon Feb 8 06:44:49 2021 +0200 Allow SERVO0_PIN override on Creality Melzi (#21007) commit 5f824c5708191f8d170a735e1a2ab2257fdc9e54 Author: Scott Lahteine Date: Sun Feb 7 20:43:18 2021 -0600 Fix animated boot screen commit 57e4b82b66e0d98a370e1928a64840d2a9d5f501 Author: MKS-Sean <56996910+MKS-Sean@users.noreply.github.com> Date: Mon Feb 8 10:36:57 2021 +0800 Fix: Unsupported use of %f in printf (#21001) commit 6dcb77f7b59ce894bbb1ffec9064681155a3da4b Author: ellensp Date: Mon Feb 8 15:36:04 2021 +1300 Fix mini12864 v2.1 + PSU control + NeoPixel backlight (#21021) commit 42761acf4fd3c7c0d40f0351053db6b73eabaa55 Author: thinkyhead Date: Mon Feb 8 00:15:33 2021 +0000 [cron] Bump distribution date (2021-02-08) commit 01756b6b021118e82d109f9c5996846b10caed62 Author: Malderin <52313714+Malderin@users.noreply.github.com> Date: Sun Feb 7 20:45:14 2021 -0300 Fix LVGL "more" menu user items (#21004) Co-authored-by: Scott Lahteine commit b35bfeb1c3f1271016227a1d79dcb552e67e3cb9 Author: Scott Lahteine Date: Sun Feb 7 16:58:06 2021 -0600 Fix TEMP_0_TR_ENABLE, rename temp conditions (#21016) commit af4e8b171c01f5620b2aca011115cdbc712be259 Author: Simon Jouet Date: Sun Feb 7 22:56:39 2021 +0000 Fix ESP32 I2S init placement (#21019) commit 5233e6676294b010ff85fca352baa7296f45645a Author: Chris Pepper Date: Sun Feb 7 20:46:24 2021 +0000 Improve RPi host kernel panic mitigation It was still possible to cause a Kernel panic, this additional 500ms delay before disconnect appears to mitigate it completely. commit 52c246ae19549b5d99cd9a8e26cd7c8a1f0458b2 Author: Scott Lahteine Date: Mon Dec 14 00:24:01 2020 -0600 Melzi, comments cleanup commit e34f27929549a601a2efe13bb0f5e2b3ebe2c30f Author: thinkyhead Date: Sun Feb 7 00:12:48 2021 +0000 [cron] Bump distribution date (2021-02-07) commit ee66d9ccf9772206d151cf821b5adff2081423bb Author: Marcio Teixeira Date: Wed Feb 3 10:03:48 2021 -0700 Refactor FTDI EVE Touch Screen (#20987) commit 1c19af2c8fd95ff6da86c9f8eb18166805ea0097 Author: X-Ryl669 Date: Sat Feb 6 05:43:51 2021 +0100 Fix ARM delay function (#20901) commit 10aaab6350cb5e54ea8376f36a5598d99f936b26 Author: Scott Lahteine Date: Fri Feb 5 18:47:53 2021 -0600 Use 'false' commit 62f060a38984ce37454ff57094c289b0fb55d92e Author: thinkyhead Date: Sat Feb 6 00:12:05 2021 +0000 [cron] Bump distribution date (2021-02-06) commit 004bed8a7fc3ff9feb73a0ea9794635b50073c27 Author: Chris Pepper Date: Fri Feb 5 22:43:36 2021 +0000 Mitigate RPi hosts kernel panic on M997 Work around M997 sometimes causing a kernel panic on the host when sent from a Raspbery Pi, the root cause is currently unknown. commit a9712330686609325a32c936250942a81a242e4f Author: ellensp Date: Sat Feb 6 02:07:10 2021 +1300 Fix MKS SGen-L DOGLCD_MOSI pin for FYSETC_MINI_12864 LCD (#20998) commit 67ae845b3c4c2aa1d451a878f635ddab5ac13654 Author: Zs.Antal <45710979+AntoszHUN@users.noreply.github.com> Date: Fri Feb 5 13:28:30 2021 +0100 Update Hungarian language (#20996) commit 708ea3d0bb82f067424c75636c28a549aa3d3b06 Author: Scott Lahteine Date: Thu Feb 4 23:22:42 2021 -0600 Use serial shorthand commit 49564e5310184079c53ff322cd27e35e22877017 Author: Scott Lahteine Date: Thu Feb 4 19:37:59 2021 -0600 Nybbles & Bits commit 604afd52d11f45c21194ff5679c829b57e5387e6 Author: Scott Lahteine Date: Thu Feb 4 19:18:31 2021 -0600 Fix some serial char, echo Co-Authored-By: X-Ryl669 <3277165+X-Ryl669@users.noreply.github.com> commit 6dac71e6180a55cfb5f395de7ff3315b6f343957 Author: thinkyhead Date: Fri Feb 5 00:12:11 2021 +0000 [cron] Bump distribution date (2021-02-05) commit d58bbd5da1591dea0386170ba4831c549ac7eb9d Author: Victor Oliveira Date: Thu Feb 4 18:31:46 2021 -0300 Re-calibrate touch after EEPROM reset, if needed (#20934) commit 5ee1087959f88dc60386ff3caa21e75d9e20b128 Author: Scott Lahteine Date: Tue Jan 12 22:32:12 2021 -0600 Ignore M22 during SD print commit 6596a50c90dff2eca5c51140a3e17b124d001394 Author: Scott Lahteine Date: Mon Jan 11 15:06:55 2021 -0600 Fix PR template, lock action Co-Authored-By: Jason Smith <20053467+sjasonsmith@users.noreply.github.com> commit 730833f96c253b9b29b4ce9612fa6841ca481328 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Mon Jan 11 07:59:42 2021 +0200 Fixes for TFTGLCD (#20734) commit f74015b4e57677cd033e116dab2331478edbe2ec Author: Scott Lahteine Date: Mon Dec 14 00:32:32 2020 -0600 Fix TEMP_0_TR_ENABLE commit eb254ef70bcd699c7774dd434fb0d4728d2f731f Author: Jason Smith Date: Fri Dec 4 21:58:39 2020 -0800 Fix TMC_HOME_PHASE divide by zero (#20368) commit 3327568142f0294fa2b6e69b8b6567fa345ad205 Author: Luu Lac <45380455+shitcreek@users.noreply.github.com> Date: Tue Dec 1 23:52:09 2020 -0600 Help hosts when password-locked (#20348) commit 65983b42886e08e29f6281e243a0f33923487a93 Author: ellensp Date: Wed Nov 25 11:14:22 2020 +1300 Set "lcd_move_e" index to fix the label (#20263) commit 1d631b72801174b29e2d5cb2115022a194ed303b Author: Simone Primarosa Date: Sat Nov 21 02:53:04 2020 +0100 Fix bad SET_FAST_PWM_FREQ calls (#20227) commit 072b15784f79c51cf4aed9b6272dfdba8160b452 Author: phcay <58492957+phcay@users.noreply.github.com> Date: Sat Nov 14 02:24:08 2020 +0100 Fix extraneous Linear Advance DIR change (#20131) commit ba2939b1dc55c04f879ce96e9af990287b4468d2 Author: thinkyhead Date: Fri Oct 30 00:10:04 2020 +0000 Fix bilinear_line_to_destination definition See #19431 commit ee7476a0bfcfd9c894fe99398f456a4fe2426209 Author: Jason Smith Date: Tue Oct 27 15:48:06 2020 -0700 Update "Bug Report" template (#19906) commit 88a2ac92d5792de3de005b3b97d7bb561946c148 Author: Scott Lahteine Date: Wed Oct 14 23:55:20 2020 -0500 Marlin 2.0.7.2 commit 3ccb3801f2117f94f3d0f99db10d29679efa03ac Author: Jason Smith Date: Fri Oct 16 14:04:51 2020 -0700 Fix SAMD Serial name macro (#19765) commit cc7fbabc96f06bda089a5b2f467f028fbe8a72e7 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Sat Oct 17 00:21:21 2020 +0300 Fix HAL/STM32 FastIO for analog pins (#19735) commit 28a9708ddb33233a87d4882c4c9d126474aa3fbc Author: Scott Lahteine Date: Wed Oct 21 18:08:57 2020 -0500 Don't define IS_ULTIPANEL empty commit d896dedf9b6d557229ee14e477b6f5c36c4e4965 Author: Jason Smith Date: Tue Oct 13 16:03:09 2020 -0700 Add NUCLEO-F767ZI dev board (#19373) Co-authored-by: Lorenzo Delana commit 00709017e205cd5698b9f50f74d9cb188ae2f129 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Tue Oct 13 16:13:25 2020 -0700 If needed, home before G34 (#19713) commit b7d9b059520a32fe1ddb7ae3f0ce224841e9b21d Author: Victor Oliveira Date: Tue Oct 13 13:58:50 2020 -0300 TFT followup fixes (#19710) commit f7f1224941ef0220603106f4a1b6b4ceabdfd196 Author: Victor Oliveira Date: Tue Oct 13 20:12:34 2020 -0300 Watchdog Refresh for LVGL Asset Load (#19724) commit fd8d83b7c84bf6e0121eba10e697b058ac7b858d Author: Jason Smith Date: Wed Oct 14 11:43:36 2020 -0700 Fix mega2560ext environment (#19730) commit 52fc0b896d182b14545c5f4557105cc9768b2294 Author: thinkyhead Date: Thu Oct 15 00:15:10 2020 +0000 [cron] Bump distribution date (2020-10-15) commit ba045d68522ba4b71c8c067ae8ab29f9a62dad71 Author: thinkyhead Date: Wed Oct 14 00:15:03 2020 +0000 [cron] Bump distribution date (2020-10-14) commit 54bdcb46912a8feb92d186aa3efcbd9c5e9cef0b Author: Jason Smith Date: Wed Oct 14 11:50:03 2020 -0700 Fix SET_SOFT_ENDSTOP_LOOSE w/out soft endstops (#19734) commit 2a2666326bc460e3aca04bfddbcbf4f099ea096d Author: Scott Lahteine Date: Tue Oct 13 14:54:56 2020 -0500 Simple bool in soft_endstops_t commit 3bba5d55bfa1ab062cbdc92980918fd6706c8970 Author: thinkyhead Date: Tue Oct 13 00:15:19 2020 +0000 [cron] Bump distribution date (2020-10-13) commit 5d07d83e78ded40f9e23449cbd702beeac2b0e8f Author: thinkyhead Date: Mon Oct 12 00:15:08 2020 +0000 [cron] Bump distribution date (2020-10-12) commit 37f97bc013326b78e18956a6ad680a6ff017d933 Author: Jason Smith Date: Sun Oct 11 17:06:57 2020 -0700 Fix various errors, warnings in example config builds (#19686) Co-authored-by: Scott Lahteine commit 6d31bbe2bfe313b7fd4fe97a9e5c850f9af1e184 Author: thinkyhead Date: Sun Oct 11 00:15:24 2020 +0000 [cron] Bump distribution date (2020-10-11) commit e2e1776a147547199d14cf59eb595f125582eb7c Author: Victor Oliveira Date: Sat Oct 10 13:47:28 2020 -0300 Restore correct STM32 port-bits code (#19678) commit bd196e7efcf9b8c037f9b81d37166891f0618021 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Sat Oct 10 13:01:46 2020 +0300 Fixes for TFTGLCD Panel, FastIO (#19614) commit dffe7b90727e9d5f589a594b9a33807254fd8ca2 Author: Earle F. Philhower, III Date: Mon Oct 12 14:48:04 2020 -0700 Add loose soft endstop state, apply to UBL fine-tune (#19681) Co-authored-by: Scott Lahteine commit 2b326ebc843c7951e7953b6036a6102e5013ab27 Author: Jason Smith Date: Mon Oct 12 14:39:31 2020 -0700 Add D100 Watchdog Test (#19697) commit f4ff6a673f4036c9bffb18fb0788057d70f7ccc6 Author: Jason Smith Date: Sun Oct 11 22:40:39 2020 -0700 Allow MAX31865 resistance values configuration (#19695) commit cc915a25ed9af89684d398e72153d6abb24253b2 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Mon Oct 12 04:30:18 2020 +0200 Add REPORT_TRAMMING_MM option (#19682) Co-authored-by: Scott Lahteine commit 600870f22b24b0ca7c880d445a5be6f72def512a Author: Jason Smith Date: Sun Oct 11 17:42:50 2020 -0700 Fix motion compile w/out probe-oriented settings (#19684) commit 04882e2f34cc494457be9ad39bcdadb398d0111a Author: Jason Smith Date: Sun Oct 11 17:23:23 2020 -0700 Fix I2C_ADDRESS sign warning (#19685) commit c6cf3da2761d5402608184fdc1fb88518c1f9492 Author: Jason Smith Date: Sun Oct 11 17:06:57 2020 -0700 Fix various errors, warnings in example config builds (#19686) Co-authored-by: Scott Lahteine commit 8a5c3782b8c74900c4943648f6eec3bb57ef161f Author: Jason Smith Date: Sun Oct 11 16:13:01 2020 -0700 Fix at90usb1286 build (#19687) * Skip check for USBCON during dependency detection * Ignore incompatible Teensy_ADC library, which requires Teensy >= 3 * Add IS_AT90USB Co-authored-by: Scott Lahteine commit beb17d88552b4d25b6f51f01bbfa90da8ca3d51b Author: Scott Lahteine Date: Sun Oct 11 14:58:35 2020 -0500 Digipots refactor / cleanup (#19690) commit 4ee717f7c43a22bab05797c6bbe60aa1ef1d7b94 Author: Scott Lahteine Date: Sat Oct 10 12:07:00 2020 -0500 Save PLR on resume from pause (#19676) Co-Authored-By: shahab <32130261+SHBnik@users.noreply.github.com> commit e680196c59dadfa1187a18db43da42db55844ffb Author: Victor Oliveira Date: Sat Oct 10 13:47:28 2020 -0300 Restore correct STM32 port-bits code (#19678) commit ce92abfe4789c42123c171eaab410fd7c2f13e70 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Sat Oct 10 13:01:46 2020 +0300 Fixes for TFTGLCD Panel, FastIO (#19614) commit 50410aaeaa351ca0d18dd8a6bf1960f340db8c88 Author: Victor Oliveira Date: Mon Oct 12 20:01:03 2020 -0300 Fix UTF8 handling for Color UI (#19708) commit 35c40bc376f0a684ec47baf69b7f787b16a6cca9 Author: Victor Oliveira Date: Sun Oct 11 21:26:16 2020 -0300 Implement wait_for_user for Color UI (#19694) commit aae644c5072c70c4774102a5545a156a8f228ae3 Author: Victor Oliveira Date: Sun Oct 11 21:31:21 2020 -0300 Option to prevent (extra) Watchdog init on STM32 (#19693) commit ce830f8a710b92ed999c2f2d55fb860f0571e88f Author: Scott Lahteine Date: Mon Oct 12 00:59:30 2020 -0500 Fix screen click reading too often (#19696) Co-authored-by: andreibobirica <39415547+andreibobirica@users.noreply.github.com> commit d3d423a322eb781822cb25a93287f05d563e21fa Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Mon Oct 12 14:52:56 2020 -0700 Sanity-check mutually-exclusive G34 features (#19706) commit 8b060a3902f6c05c9079c1919eea80558c7fe4f1 Author: InsanityAutomation <38436470+InsanityAutomation@users.noreply.github.com> Date: Sun Oct 11 22:34:27 2020 -0400 G34 Mechanical Gantry Calibration (like Prusa M915) (#18972) Co-authored-by: Scott Lahteine commit faae9007475ac5367a297500516acf03658c72d8 Author: Victor Oliveira Date: Mon Oct 12 18:38:07 2020 -0300 TFT Refactoring (#19192) * split tft folder in two: tft for color ui; tft_io for shared tft code * after the files got moved, now the code was moved to the right place * classic ui using TFT IO init lcd codes * feature to compile tft_io when enabled * compiling fix * lvgl spi tft working with tft io init codes * there is no need for separeted fsmc and spi class in lvgl anymore, as tft io handle everything * remove debug * base for TFT rotation and mirroring API, and ILI9488 support * ST7796S rotate and mirror support * ST7789V rotate and mirror support * ST7735 rotate and mirror support * ILI9341 rotate and mirror support * ILI9328 rotate and mirror support * R61505 rotate and mirror support * MKS TFT definitions * more configs for mks tfts * update config * naming typo * to configure the user interface * ANYCUBIC_TFT35 * tft configs * support for SSD1963 * tft display types * updated conditionals lcd; first board fully working with the new code - all 3 ui! * compatiblity * changed name * move classic ui file name * rename TURN -> ROTATE * GRAPHICAL_TFT_ROTATE_180 deprecated * first fsmc board fully working - chitu v5 * mks robin nano v1.2 + tft 35 ok! * right pin name * anycubic tft tested in a TRIGORILLA_PRO * chitu v6 * nano 32 tft orientation * mks tft43 * mks tft43 rotation * fixed LONGER LK tft setup * GRAPHICAL_TFT_UPSCALE defined by the display type * better offsets defaults * Update Configuration.h * Update tft_fsmc.cpp * Update Conditionals_LCD.h * Tweak comments * update nano tests * Revert "update nano tests" This reverts commit a071ebbfad30e28855a4a5695ec8a726542a1a65. * default tft * outdated comments * to not break non-vscode builds * upscale tft 35 * support tft 180 rotation for color ui * Each TFT Driver is responsible for its default color mode. * use auto detect in mks displays, because some of them could be shipped with diferent drivers * extra s * unused code * wrong -1 * missing mirror options * Smaller regex pattern * Comment updates * Clean up old defines * Apply pins formatting * GRAPHICAL_TFT_ROTATE_180 => TFT_ROTATE_180 * MKS_ROBIN_TFT_V1_1R * merge fix * correct resolution * auto is default, dont need be there, and it will allow the user to configure it even for named displays * to not use rotation with MKS_ROBIN_TFT_V1_1R * i like () in macros * avoid sleepy commits * default for st7789 is rgb * nano follow up * to allow ili9328 rotation * default is rgb * boards merge follow up * to match bootloader orientation * HAS_TOUCH_XPT2046 is not hal specific anymore * lets not forget LPC * 180 rotation for ili9328 and R61505 * Clean up whitespace Co-authored-by: Scott Lahteine Co-authored-by: Scott Lahteine commit 11662bf2b65e0762e7ed7c95522a15477215c013 Author: Scott Lahteine Date: Sat Oct 10 01:17:34 2020 -0500 Marlin 2.0.7.1 commit 887e2637c020c3f9422471c7b7d09c44507a4317 Author: Serhiy-K <52166448+Serhiy-K@users.noreply.github.com> Date: Sat Oct 10 13:01:46 2020 +0300 Fixes for TFTGLCD Panel, FastIO (#19614) commit 958f05e4b4cb82f16b1981c5659177312c3a63da Author: ellensp Date: Sat Oct 10 22:39:12 2020 +1300 HAS_CHARACTER_LCD => HAS_MARLINUI_HD44780 (#19673) commit 9126a2e654df0bbea7bd511b6a993a5a24e0f0f6 Author: thinkyhead Date: Sat Oct 10 00:14:40 2020 +0000 [cron] Bump distribution date (2020-10-10) commit 5070fae231d5019249f37e882c25f1e1d7f5761b Author: Scott Lahteine Date: Fri Oct 9 16:50:17 2020 -0500 Batch appercase hex values commit 454f9d631986b19add31ea172552e5567bac856e Author: Scott Lahteine Date: Fri Oct 9 16:42:23 2020 -0500 Optional `M42`/`M226`; Add more features filters (#19664) commit 59b6b32e6e8b3746843ddc94390b9e6c80d993f3 Author: Victor Oliveira Date: Fri Oct 9 08:25:23 2020 -0300 Support for Debug Codes - Dnnn (#19225) Co-authored-by: Scott Lahteine commit 6d9709e20de11d874b567ab24fb02f17163537da Author: 石立枫 <49380822+FLYmaker@users.noreply.github.com> Date: Fri Oct 9 19:09:27 2020 +0800 Support for FLY MINI (#19185) commit 7a484959d52f4835d40eddbfc3bf54c51a6b6952 Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Fri Oct 9 00:52:06 2020 -0700 Fix touch ifndefs (#19661) commit 78060f55e653b118dd27ab29f71d698720d0fe4c Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Fri Oct 9 09:51:25 2020 +0200 Update Italian language (#19654) commit 3fca19fbab92766f57f27b13a76af711b661b843 Author: thinkyhead Date: Fri Oct 9 00:14:12 2020 +0000 [cron] Bump distribution date (2020-10-09) commit b8700e0aa801a016a66ff1d268871c458aa4f47b Author: Samantaz Fox Date: Fri Oct 9 01:40:54 2020 +0200 Fix and improve Makefile / CMake (#19640) commit d66bc5cec2ac4844809bb50995e05a0d074240df Author: Scott Lahteine Date: Thu Oct 8 16:59:54 2020 -0500 Permit touch calibration override commit fb28c6041ad219416e13564e86228c1ba12a79db Author: Scott Lahteine Date: Thu Oct 8 15:17:19 2020 -0500 Use 0xFF (not 'ff') for byte transfer commit 0f9d57e03ad0032d7a307b3fb826761c50ceb8d7 Author: ellensp Date: Thu Oct 8 20:30:31 2020 +1300 Apply env:mega2560ext to relevant boards (#19624) commit 32377849da8230f88d395a5d6b60321cbbd69f39 Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Thu Oct 8 03:43:08 2020 +0200 Update PROBE_OFFSET_WIZARD comment (#19652) commit 0975c487f0e636e7279864f2e81990cd58378e50 Author: thinkyhead Date: Thu Oct 8 00:12:06 2020 +0000 [cron] Bump distribution date (2020-10-08) commit d07ad63016b0e1d58a767a531fd578e85b42f9cf Author: qwewer0 <57561110+qwewer0@users.noreply.github.com> Date: Wed Oct 7 20:01:01 2020 +0200 More accessible PROBE_OFFSET_WIZARD (#19647) commit 1a5a3cf2538618c4a7ff16bef4e6f1700ca7afcb Author: ellensp Date: Thu Oct 8 07:00:08 2020 +1300 Restore ° to 6x9 small info font (#19645) commit 6f6901180c46033d8b5948b3932c08320336a606 Author: Scott Lahteine Date: Tue Oct 6 19:42:03 2020 -0500 Chamber vent/fan followup commit 9cc6297292ac8eda0b3ad884b8cb7f8c61db5a50 Author: Scott Lahteine Date: Tue Oct 6 19:17:18 2020 -0500 Fix small font section directive, mixer warning commit cf53bc2dd281330cbb0946a395fd1e1da4a954fd Author: thinkyhead Date: Wed Oct 7 00:14:42 2020 +0000 [cron] Bump distribution date (2020-10-07) commit f4f4ea05e1a366345c7c1431417e7f0cbcff6b7f Author: Scott Lahteine Date: Tue Oct 6 01:28:08 2020 -0500 Update language fonts commit 2b845e5a756da015c427d8bd64a412472bec60ba Author: ladismrkolj Date: Wed Oct 7 01:36:01 2020 +0200 Add Chamber servo vent, auto fan (#19519) commit 6fcbf114541a336038a83026024b6503680da0b7 Author: signetica <66766598+signetica@users.noreply.github.com> Date: Tue Oct 6 15:58:28 2020 -0600 Fix Ender-3 V2 DWIN Stop SD Print (#19642) Co-authored-by: Scott Lahteine commit 8a69147adfc8bd64f998c3f92c6467e2500ce11b Author: Scott Lahteine Date: Tue Oct 6 02:59:51 2020 -0500 Improve retract / unretract labels commit f8ceedea5cfbc717198b3fa8b1118b5cbcb0b85f Author: thinkyhead Date: Tue Oct 6 00:14:30 2020 +0000 [cron] Bump distribution date (2020-10-06) commit a4e4226578eb02eb9636317094db3dca941d3e1c Author: Scott Lahteine Date: Mon Oct 5 01:09:32 2020 -0500 Trailing whitespace commit e76fd6bd33a5e8a8554e1e1e080987921a99eae8 Author: Scott Lahteine Date: Mon Oct 5 01:07:41 2020 -0500 Sync config to examples commit 437bee418bff550a59738a6b4c9b5e7eddf0fc2a Author: Mathew Winters Date: Mon Oct 5 18:31:20 2020 +1300 Z Probe Offset Wizard (#18866) commit 31238de93740870c6a5c2ac212ba931f0ebe39f5 Author: Cory Ory Date: Mon Oct 5 01:51:21 2020 +0100 Allow bypass for cold E movement (#19606) commit cb8c99c4f889508486ab72990fd688830837b1a2 Author: thinkyhead Date: Mon Oct 5 00:14:33 2020 +0000 [cron] Bump distribution date (2020-10-05) commit 2fe81d0cb2de37408e5391311204cdf2bd7476d6 Author: Ryan V1 <55478432+V1EngineeringInc@users.noreply.github.com> Date: Sun Oct 4 15:41:41 2020 -0700 Fix Archim1 stepper timing (with new variant) (#19596) commit fb7d7ee7b41fc609aac4a892dc4a77a066f50ccd Author: Scott Lahteine Date: Sun Oct 4 17:29:12 2020 -0500 Add HAS_FAST_MOVES commit d99fdcf526dac82a15a4e8520750d28a2d113485 Author: ellensp Date: Mon Oct 5 10:47:06 2020 +1300 Fix Z_AFTER_HOMING without probe (#19607) commit e4d2234a04378b26f80c27829b96e5a67465738e Author: Scott Lahteine Date: Sun Oct 4 15:45:13 2020 -0500 Move SF_ARC_FIX option commit bea919da6eaebe84c7a3071888e797b76a0ae7c1 Author: Speaka <48431623+Speaka@users.noreply.github.com> Date: Sun Oct 4 21:50:12 2020 +0200 Fix German translation purging/unloading (#19615) commit 2fb22cc11613388f7f46242fba2de57e4eb6d277 Author: Scott Lahteine Date: Sun Oct 4 14:46:55 2020 -0500 Shared singlenozzle item commit d4b6542ce117da15a9f40e8d19d467e801d0f710 Author: Scott Lahteine Date: Sun Oct 4 14:29:02 2020 -0500 Fix Tune/Fan edit items - Fixes #19617 - Followup to #18400 commit 7d47ee732e568ea382a185f87cfed2ecf223ddbd Author: thinkyhead Date: Sun Oct 4 00:14:30 2020 +0000 [cron] Bump distribution date (2020-10-04) commit 6ceacd62f9c3bf1e590e139f70a385bebb33dc42 Author: thinkyhead Date: Sat Oct 3 00:14:05 2020 +0000 [cron] Bump distribution date (2020-10-03) commit 2ce6741731cb93f5300bf9a29753256e0c29a3c3 Author: Ryan V1 <55478432+V1EngineeringInc@users.noreply.github.com> Date: Fri Oct 2 15:31:33 2020 -0700 Fix 'bossac' upload on Windows (#19545) commit 2213eb33172009c53deb2d8e959c9acd60d4561d Author: Marcio T Date: Fri Oct 2 16:30:32 2020 -0600 Touch UI support for X2, Y2 and Z2 (#19538) commit b9475900822a4c60f1f9635799a5c1c7f733b478 Author: ellensp Date: Sat Oct 3 11:28:08 2020 +1300 Fix wrappers on HAL/STM32F1 .cpp files (#19581) Co-authored-by: Scott Lahteine commit 20bcaa78f6467b26acf70e0ec448860cd729fb6a Author: ellensp Date: Sat Oct 3 11:19:43 2020 +1300 Fix TEMP_ADC_PROBE support for STM32F1 (#19582) Co-authored-by: ellensp commit 9834a36a178be6b0b0469c4dd4d94480b5d32f16 Author: ellensp Date: Sat Oct 3 11:12:17 2020 +1300 Fix compile of MMU2 with S-mode disabled (#19584) commit 90801f8815bb0512836e3191af6e614f18db2522 Author: bilsef Date: Fri Oct 2 15:08:50 2020 -0700 Fix onboard SD card support for Teensy 3.6 & 4.1 (#19593) commit 4d1357e318dbfd420646449a82d584136eb18e6d Author: Scott Lahteine Date: Fri Oct 2 17:05:45 2020 -0500 Adjust HAL platform defines, comments commit 8d090cbdbb17d7729e9ca43db0651a8719f2796a Author: Scott Lahteine Date: Fri Oct 2 17:04:23 2020 -0500 Replace tabs with spaces commit ec5b78d18b1dbf941456b10a20816ec453423beb Author: Victor Oliveira Date: Thu Oct 1 22:52:42 2020 -0300 Minor SPI fixes, systick_callback for STM32F1 HAL compatibility (#19565) commit d33317eadb3df9d2d314533412a30e262391eb97 Author: thinkyhead Date: Fri Oct 2 00:13:10 2020 +0000 [cron] Bump distribution date (2020-10-02) commit f8375a3ea2eaafc4483e79eb483afed8cb206071 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Fri Oct 2 01:17:11 2020 +0200 G35 workaround for Pronterface "feature" (#19577) commit 5a02959d181648d9e733458d0cf9291bc8309de7 Author: Stéphane <43587190+stef-ladefense@users.noreply.github.com> Date: Fri Oct 2 01:09:39 2020 +0200 Fix Anycubic i3 Mega target temperature display (#19572) Also includes a workaround for missing (probably un-fetched) long name in file listing commit cc123bc6579d3b114664e349c4dc185befd43501 Author: Ilya Date: Thu Oct 1 15:51:11 2020 -0700 No move on Park = No move on Resume (#19569) commit 4f6a0605bf10e93318036fcbdad7a2eb5bd15254 Author: Roman Moravčík Date: Fri Oct 2 00:47:24 2020 +0200 Update Slovak language (#19561) commit b89700ed3571121a755e347f9c54b1689bd719f0 Author: Victor Oliveira Date: Wed Sep 30 22:14:19 2020 -0300 Fix Buzzer (pin) init for uninitialized FastIO (#19559) commit ca853fbe19eff2f73e5f953b25e1b567bb363c96 Author: Victor Oliveira Date: Wed Sep 30 22:06:32 2020 -0300 Fix Move Screen with disabled Touch (#19558) commit 1ba2548fb256777209431b4425fe6109671e7919 Author: thinkyhead Date: Thu Oct 1 00:14:15 2020 +0000 [cron] Bump distribution date (2020-10-01) commit 1332be77a5540aa89839c08f6ac4f0b5307e312c Author: thinkyhead Date: Wed Sep 30 00:13:59 2020 +0000 [cron] Bump distribution date (2020-09-30) commit a7f334387c98a0209433d98c44269fdb0356ab54 Author: Victor Oliveira Date: Sat Oct 10 01:35:41 2020 -0300 Keep HAL tasks running during PID Autotune (#19671) commit e8177735a00d1d7bb20b439544d3324fe01cfe7e Author: Scott Lahteine Date: Mon Sep 28 21:02:09 2020 -0500 Marlin 2.0.7 commit aac0326f7fa928ae9b0dc6cd68888c1f1d3ddbfa Merge: a52afd2aeb 41774ec9de Author: Scott Lahteine Date: Mon Sep 28 20:59:49 2020 -0500 Merge bugfix-2.0.x into 2.0.x commit a52afd2aebeb1029f80f175489e66a310de4197d Author: Jason Smith Date: Thu Sep 17 04:35:10 2020 -0700 Update stale issue message and parameters (#19412) * Update stale issue bot * Update close-stale.yml * Update close-stale.yml Co-authored-by: Scott Lahteine commit 9913333c33d234264a9072630e8b5ffbf07bad7e Author: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Thu Sep 3 21:27:59 2020 -0700 Auto-label Feature Requests (#19258) commit ca194ca52ee63fe319305a79e396b8b013b4c935 Author: Scott Lahteine Date: Thu Aug 27 22:19:41 2020 -0500 Version 2.0.6.1 commit b90e7c421f2ed0629fd1f389a639bba61c5b4c25 Merge: 96e29cd7e5 6ac8f5abb7 Author: Scott Lahteine Date: Thu Aug 27 22:17:50 2020 -0500 Merge remote-tracking branch 'upstream/bugfix-2.0.x' into 2.0.x commit 96e29cd7e5aa91fad72788251caf6ffd38df4624 Author: Julius Mumme Date: Sun Aug 16 05:50:28 2020 +0200 Fix IS_PROBE_PIN macro (#19024) commit fd9c6983d30f70171d9d9a9c55962689fa4cdd85 Author: ellensp Date: Sat Aug 8 10:59:09 2020 +1200 HW PWM sanity checks for SPINDLE_LASER_FREQUENCY (#18947) commit da144dcf3b7f79e143837384bb54af3d8523dc8b Author: Roman Moravčík Date: Tue Aug 4 07:32:47 2020 +0200 Update Slovak language (#18884) commit 1d92badecddb91b2b2952b77aecda854239647cb Author: Giuliano Zaro <3684609+GMagician@users.noreply.github.com> Date: Tue Aug 4 07:32:25 2020 +0200 Update Italian language (#18886) commit 242064fa994275c69147d1fd6da2cecb7977da08 Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Thu Aug 6 05:38:23 2020 +0200 Move Cancel Object menu, fix canceled item index (#18930) commit ad2d1b6e31de9d5ea08be61f7f323a1758c3e76a Author: cbaugher Date: Fri Aug 7 18:06:25 2020 -0500 Fix Z height after tool change (#18951) commit 978e0e49c715f41024406fd7795e753986e81e20 Author: Claus Näveke Date: Mon Aug 3 03:17:43 2020 +0200 No mks_robin extra_scripts in Trigorilla build (#18872) commit 02a500dc937da09595d10612e77b05d87a4a099f Author: ellensp Date: Mon Aug 3 13:16:12 2020 +1200 Fix Spindle/Laser PWM DC (#18871) commit fa5ca8678cced97fe63ece21bb01c169afdf4c71 Author: FLYmaker <49380822+FLYmaker@users.noreply.github.com> Date: Mon Aug 3 09:13:57 2020 +0800 Fix FLYF407ZG pins (#18865) commit 01359cff6b5884873114e4cff4322fedee73d848 Author: Sebastien Andrivet Date: Mon Aug 3 03:10:16 2020 +0200 Fix Duplicator i3 Plus pin diagram (#18862) commit 37b56d6347e2b53751a80eb9892ffda3b2c59ee3 Author: Scott Lahteine Date: Thu Jul 30 02:07:29 2020 -0500 Add monitor_flags commit ad59adfe24e57b242408e0de4e567512559c1bea Author: Scott Lahteine Date: Tue Jul 28 18:13:20 2020 -0500 Update include_tree commit 121cd42c41f3208327c93d84fa32a95f27dde227 Author: Scott Lahteine Date: Wed Jul 29 20:50:10 2020 -0500 In G28 Z is sort-of known commit cf1c57a04d36f91a30ba32449f02c04ad87183a5 Author: Scott Lahteine Date: Wed Jul 29 20:43:35 2020 -0500 Fix UNKNOWN_Z_NO_RAISE in G28 Bug introduced in 73fc0778b86 commit 5804761b5d18b9e99abd705d0f14306e7a94b93a Author: swissnorp <67485708+swissnorp@users.noreply.github.com> Date: Wed Jul 29 04:28:58 2020 +0200 Fix Cancel Objects index display (zero-based) (#18841) commit 3dd21a2770d14555bb5f5a0b44dc1dbc3ae276c0 Author: natemason Date: Wed Jul 29 09:18:02 2020 +0800 Add TEMP_PROBE_PIN for Einsy Rambo (#18823) commit b160e8b93f610e4c3b2da620815fdc3f69c43e06 Author: MoellerDi Date: Wed Jul 29 03:19:12 2020 +0200 Fix NEOPIXEL_LED compile w/out PRINTER_EVENT_LEDS (#18824) commit de37196760e1c41489293d23fbb826e51dd4f163 Author: Victor Oliveira Date: Tue Jul 28 23:15:17 2020 -0300 DISABLE_DEBUG required to free Robin nano Z_DIR_PIN (#18832) commit 84b96d3d4743567c5c24d0434e16dc053e6cca3f Merge: 92076c6560 5d14c3712f Author: Scott Lahteine Date: Mon Jul 27 20:16:34 2020 -0500 Hotfix for first round of post-release hiccups commit 92076c65601de5fdfe0facf32dd60c57aab05747 Author: Scott Lahteine Date: Sun Jul 26 20:03:06 2020 -0500 Marlin Release 2.0.6 commit 5e5daf1ff2b0d33fa2742f9a4f164fe8b5fd50b2 Merge: 8b637e436c de68b3753f Author: Scott Lahteine Date: Sun Jul 26 20:01:40 2020 -0500 Merge remote-tracking branch 'upstream/bugfix-2.0.x' into release_206 commit 8b637e436c775c7566820eb1defd00bb209d06b4 Author: Scott Lahteine Date: Thu Jul 23 20:59:43 2020 -0500 Update links, README, contributing, etc. commit b73ac40fa3abde7a10eb9d2708cd8d01b83d9de3 Author: Chris Pepper Date: Tue Jul 14 15:15:19 2020 +0100 LPC fix NeoPixel fork commit 7ed66d06a086d326c77fa4ae968167dda5ec5e17 Author: Scott Lahteine Date: Sun Jul 12 22:35:13 2020 -0500 LiquidCrystal@1.0.0 for LPC commit c1b237920430c0944df9db6c9050977211745820 Author: Scott Lahteine Date: Sat Jul 11 07:38:19 2020 -0500 Specify supported library versions commit 5e0958edbf8abab0588ed9db866952f67c2dd4fc Author: Scott Lahteine Date: Sat Jul 11 07:14:54 2020 -0500 Fix pid_debug_flag commit 5513e67512481024e0d571d84487f7c636996803 Author: Scott Lahteine Date: Wed Jul 8 19:36:09 2020 -0500 2.0.5.4 : Use ststm32 < 6.2 commit 354a9e5970c4a873a5b32d825da177d072df6b61 Author: Scott Lahteine Date: Wed Jul 8 04:38:35 2020 -0500 Lock threads updated commit ee4910c5d7e1ef66afb5a99eb9f1a6b6f6255a9a Author: Scott Lahteine Date: Sun Jul 5 19:56:33 2020 -0500 Temporarily use patched lock-threads commit 697ef2636e561f89d941b5c1e1f6a76c7868eabf Author: Scott Lahteine Date: Sun Jul 5 15:45:14 2020 -0500 Add CI for pushed commits Co-Authored-By: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com> commit 481b8ff2d91d8c1fb66ed3975a3a054c81b77425 Author: Scott Lahteine Date: Sun Jul 5 15:23:07 2020 -0500 Limit actions to main commit 7bf89f2b9f9e55b518d6b18841a860321711aaf1 Author: Scott Lahteine Date: Sat Jul 4 17:28:23 2020 -0500 Two lock-closed per day commit ed7110838e60379835d537e620006020fbae2513 Author: Scott Lahteine Date: Thu Jul 2 18:10:33 2020 -0500 Patch Bad PR action commit 842dea4bd5c35a5b2774f2687c8a021bb81f6ac9 Author: Scott Lahteine Date: Tue Jun 30 18:18:58 2020 -0500 Updated lock / unlock actions commit a73e61078de06599b3bd58a4b1f705c7b6f72b24 Author: Scott Lahteine Date: Tue Jun 23 19:58:00 2020 -0500 Add Close / Lock actions commit c352aeb32ea80f628755f2d28ad6fde6f1cb7be9 Author: Daniel Aléxis Date: Tue Jun 9 21:27:57 2020 +0100 Remove "dev" branch reference (for now) (#18242) commit e4d8336175ee09b28d23220f446d07451ca3de43 Author: Mathias Gartner <36887952+MathiasGartner@users.noreply.github.com> Date: Sat May 2 23:15:49 2020 +0200 Fix XYZ types multiplication/division (#17826) commit 0518dec60d0931745efa2812fa388f33d68cfa29 Author: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com> Date: Wed Apr 1 12:16:01 2020 -0700 Correct link to Configurations (#17370) commit 015c4e6fbdd28f5c4cb5fc987d4f4ae513b1c13d Author: Scott Lahteine Date: Tue Mar 31 14:40:06 2020 -0500 Version 2.0.5.3 commit 0f9a14dfda3814953c0e10e8afce4321e2311564 Merge: 7124b2164d e7f020f3f2 Author: Scott Lahteine Date: Tue Mar 31 14:43:42 2020 -0500 Merge latest patches commit 7124b2164d5c863ed1013df57a424739420003fc Author: Scott Lahteine Date: Tue Mar 24 16:22:12 2020 -0500 Version 2.0.5.2 commit efc19260a73c317124d4e7575f1aa9330a8ab927 Merge: d37bfa3b4e 68face848a Author: Scott Lahteine Date: Tue Mar 24 17:10:53 2020 -0500 Merge patches from bugfix-2.0.x commit d37bfa3b4e4e95804f942b69831dc36b54c53215 Author: Scott Lahteine Date: Mon Mar 16 17:52:41 2020 -0500 Version 2.0.5.1 Release commit 129b1bb8d4eadf6e24b19ed4ef7f50e45a95e508 Merge: 8dbbcfd382 f6e80d576d Author: Scott Lahteine Date: Mon Mar 16 17:50:43 2020 -0500 Merge nightly patches commit 8dbbcfd382356eb5d16b8bfa75c713bbc1de1631 Author: Scott Lahteine Date: Sat Mar 14 00:49:12 2020 -0500 Version 2.0.5 Release commit fa48fbb9b8825ac0e51a43b931e6637a9f25b52c Merge: d6e767e36b 8b2d55e345 Author: Scott Lahteine Date: Sat Mar 14 00:35:11 2020 -0500 Merge bugfix-2.0.x into 2.0.x commit d6e767e36be5852a32526c08d9ade974b18f6546 Author: Scott Lahteine Date: Wed Feb 26 13:00:26 2020 -0600 Version 2.0.4.4 Release commit b29aae6c0c9e133b09f33fda2eb730d2d8480e54 Merge: 1955eea1b8 9f8ee31144 Author: Scott Lahteine Date: Thu Feb 27 04:14:33 2020 -0600 Merge 'bugfix-2.0.x' into 2.0.x commit 1955eea1b8f13697259e0e2403d47279d2d1ac6a Author: Scott Lahteine Date: Mon Feb 24 06:13:18 2020 -0600 Version 2.0.4.3 Release commit 42fa9fc57041b5b1bc00fc2dca5ab1075af2e9cc Author: Scott Lahteine Date: Mon Feb 24 10:58:54 2020 -0600 Fix card_eof error commit 130d0395d069c2b68537342ce3e4a781002749bf Author: Marcio T Date: Mon Feb 24 09:42:12 2020 -0700 Restore tabs in Makefile (#16944) commit c5f1ff9ee16017350f545292dca681a742eb3e65 Author: Marcio T Date: Mon Feb 24 09:40:12 2020 -0700 Allow Z_SAFE_HOMING_POINT outside bed (#16945) commit 089cc68a04087a07ea6b08187d332b24b65b3abe Merge: 2b759b9e8d a254354e68 Author: Scott Lahteine Date: Mon Feb 24 06:12:15 2020 -0600 Merge nightly patches commit 2b759b9e8d950179ae8bde5596946aeb00739724 Author: Scott Lahteine Date: Sat Feb 22 19:26:52 2020 -0600 Suppress "packed member" warning commit 5f27f7de47191c5cd2a6f4c2f0b65748ef13c268 Author: Scott Lahteine Date: Sat Feb 22 18:49:59 2020 -0600 Version 2.0.4.2 Release commit 282f4678cd98f77fbe807571d3cfeba47391e4f8 Merge: c41f3f8582 2471a8bb91 Author: Scott Lahteine Date: Sat Feb 22 18:47:09 2020 -0600 Merge nightly patches commit c41f3f8582735603959c433edd14956a1bfcb9bc Author: Scott Lahteine Date: Sat Feb 22 02:58:05 2020 -0600 Version 2.0.4.1 Release commit 8670df08a299a322f64a7ae259c34c6acd6ef85e Author: Scott Lahteine Date: Sat Feb 22 02:52:59 2020 -0600 CoreXY Babystepping hotfix commit 730690ea03f61db2f35baf4095b50b4abf1b83bb Author: Scott Lahteine Date: Sat Feb 22 02:52:21 2020 -0600 Hotfix for Babystepping commit 3543873da72fe00e23ceb73cde24186e649768d3 Author: Scott Lahteine Date: Fri Feb 21 07:24:58 2020 -0600 Use moves_free in ok_to_send commit c505626c4215d3aa90a561a55465d06ebb27ed9e Author: thinkyhead Date: Sat Feb 22 00:03:47 2020 +0000 [cron] Bump distribution date (2020-02-22) commit 7e8505fc119543e8de6322e79fed239272aa1c6e Author: Scott Lahteine Date: Fri Feb 21 08:38:14 2020 -0600 Version 2.0.4 Release commit f9aec2685cd4ad81e6a21ba3eff0f5ee9dfb465f Merge: dd6a7ca197 5d16497bed Author: Scott Lahteine Date: Fri Feb 21 08:37:02 2020 -0600 Merge remote-tracking branch 'upstream/bugfix-2.0.x' into 2.0.x commit dd6a7ca197cf07a9ce7c4df9ddf55b885b1e2151 Author: Scott Lahteine Date: Mon Feb 10 16:33:21 2020 -0600 Fix out-of-order M0 after SD printing Fixes #14774 Co-Authored-By: tol2cj commit 62b9d7dc73e34437ebfe52ad7324b37698569275 Author: Scott Lahteine Date: Wed Feb 5 00:47:24 2020 -0600 Direct link to version configs commit d83382eb55043806655b85f8a33e1db545440d4f Author: Scott Lahteine Date: Tue Feb 4 09:41:26 2020 -0600 Add "PR Bad Target" workflow action commit 4c76314c26bed103d3976affb2e4bfcf419aac50 Author: Scott Lahteine Date: Mon Feb 3 19:31:41 2020 -0600 Scheduled action to bump the date on bugfix-2.0.x commit 64ab254f26c03f48fe2252f3deea8b7ff39ecde0 Author: Scott Lahteine Date: Mon Feb 3 18:06:04 2020 -0600 Use a different Configurations branch for CI commit e6a7be922b300bc68030a5d301743ac30d6d1834 Author: Scott Lahteine Date: Thu Jan 30 18:18:46 2020 -0600 Version 2.0.3 commit 1525c2530ec8c952978b9a5a313bab8812b6f43b Merge: 016e4c0193 dabf393920 Author: Scott Lahteine Date: Fri Jan 31 04:23:45 2020 -0600 Merge commit 'dabf3939209fd8ea7f6a6327d764c16743aa22aa' into look_at_201 commit 016e4c01934b78672af3552b8bf2d655aa23752d Author: Scott Lahteine Date: Mon Jan 27 05:34:56 2020 -0600 Version 2.0.2 commit be642610ae7829f24a08cb2cb53603a9a7049a2f Merge: ee17051933 8bd6b60a01 Author: Scott Lahteine Date: Fri Jan 31 04:22:09 2020 -0600 Merge commit '8bd6b60a0141fa892984f2d5b61f06eadbbf9a5f' into look_at_201 commit ee170519334d4e2c2aed28437dd94ca298923a18 Author: Scott Lahteine Date: Tue Dec 24 00:06:32 2019 -0600 Version 2.0.1 commit 0673f335e121a588d4cf074126b5e0d8cd527426 Merge: ac7ee4b94a 1c9ccce520 Author: Scott Lahteine Date: Tue Dec 24 00:05:04 2019 -0600 Merge remote-tracking branch 'upstream/bugfix-2.0.x' into 2.0.x commit ac7ee4b94a200590a566fd6979f4738976de12b6 Author: Scott Lahteine Date: Sun Dec 1 13:56:18 2019 -0600 Release version 2.0.0 --- .editorconfig | 4 +- .github/ISSUE_TEMPLATE/bug_report.yml | 169 + .github/ISSUE_TEMPLATE/config.yml | 20 + .github/ISSUE_TEMPLATE/feature_request.yml | 44 + .github/pull_request_template.md | 22 +- .github/workflows/bump-date.yml | 36 + .github/workflows/check-pr.yml | 33 + .github/workflows/clean-closed.yml | 39 + .github/workflows/close-stale.yml | 28 + .github/workflows/lock-closed.yml | 32 + .github/workflows/test-builds.yml | 60 +- .github/workflows/unlock-reopened.yml | 22 + .gitignore | 29 +- Marlin/Configuration.h | 642 +- Marlin/Configuration_adv.h | 1022 +- Marlin/Makefile | 8 +- Marlin/Version.h | 4 +- Marlin/src/HAL/AVR/HAL.cpp | 11 +- Marlin/src/HAL/AVR/HAL.h | 44 +- Marlin/src/HAL/AVR/HAL_SPI.cpp | 15 +- Marlin/src/HAL/AVR/MarlinSPI.h | 26 + Marlin/src/HAL/AVR/MarlinSerial.cpp | 41 +- Marlin/src/HAL/AVR/MarlinSerial.h | 58 +- Marlin/src/HAL/AVR/eeprom.cpp | 6 +- Marlin/src/HAL/AVR/endstop_interrupts.h | 46 +- Marlin/src/HAL/AVR/fastio.cpp | 12 +- Marlin/src/HAL/AVR/fastio.h | 4 +- Marlin/src/HAL/AVR/inc/SanityCheck.h | 11 +- Marlin/src/HAL/AVR/pinsDebug.h | 34 +- Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h | 3 + Marlin/src/HAL/AVR/pinsDebug_plus_70.h | 3 + Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp | 6 +- Marlin/src/HAL/DUE/DebugMonitor.cpp | 342 - Marlin/src/HAL/DUE/HAL.cpp | 24 +- Marlin/src/HAL/DUE/HAL.h | 50 +- Marlin/src/HAL/DUE/HAL_MinSerial.cpp | 91 + Marlin/src/HAL/DUE/HAL_SPI.cpp | 56 +- Marlin/src/HAL/DUE/MarlinSPI.h | 26 + Marlin/src/HAL/DUE/MarlinSerial.cpp | 9 +- Marlin/src/HAL/DUE/MarlinSerial.h | 13 +- Marlin/src/HAL/DUE/MarlinSerialUSB.cpp | 29 +- Marlin/src/HAL/DUE/MarlinSerialUSB.h | 35 +- .../dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp | 3 +- .../dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp | 3 +- .../HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp | 2 +- .../dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp | 3 +- .../DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h | 2 +- Marlin/src/HAL/DUE/eeprom_flash.cpp | 59 +- Marlin/src/HAL/DUE/eeprom_wired.cpp | 7 +- Marlin/src/HAL/DUE/endstop_interrupts.h | 6 + Marlin/src/HAL/DUE/fastio.h | 2 +- Marlin/src/HAL/DUE/inc/SanityCheck.h | 2 +- Marlin/src/HAL/DUE/pinsDebug.h | 6 +- Marlin/src/HAL/DUE/usb/arduino_due_x.h | 2 +- Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp | 18 +- Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h | 4 +- Marlin/src/HAL/DUE/usb/udd.h | 8 +- Marlin/src/HAL/DUE/usb/udi_cdc.c | 4 +- Marlin/src/HAL/DUE/usb/udi_cdc.h | 4 +- Marlin/src/HAL/DUE/usb/udi_cdc_conf.h | 2 +- Marlin/src/HAL/DUE/usb/udi_msc.c | 10 +- Marlin/src/HAL/DUE/usb/uotghs_device_due.c | 46 +- Marlin/src/HAL/DUE/usb/usb_protocol_msc.h | 2 +- Marlin/src/HAL/DUE/usb/usb_task.c | 4 +- .../src/HAL/ESP32/FlushableHardwareSerial.cpp | 7 +- .../src/HAL/ESP32/FlushableHardwareSerial.h | 8 +- Marlin/src/HAL/ESP32/HAL.cpp | 35 +- Marlin/src/HAL/ESP32/HAL.h | 18 +- Marlin/src/HAL/ESP32/HAL_SPI.cpp | 10 +- Marlin/src/HAL/ESP32/MarlinSPI.h | 26 + Marlin/src/HAL/ESP32/WebSocketSerial.cpp | 4 +- Marlin/src/HAL/ESP32/WebSocketSerial.h | 8 +- Marlin/src/HAL/ESP32/endstop_interrupts.h | 6 + Marlin/src/HAL/ESP32/esp32.csv | 6 + Marlin/src/HAL/ESP32/fastio.h | 20 +- Marlin/src/HAL/ESP32/i2s.cpp | 5 +- Marlin/src/HAL/ESP32/inc/SanityCheck.h | 6 +- Marlin/src/HAL/ESP32/spi_pins.h | 3 + Marlin/src/HAL/ESP32/watchdog.h | 2 +- Marlin/src/HAL/ESP32/wifi.cpp | 2 +- Marlin/src/HAL/HAL.h | 6 - Marlin/src/HAL/LINUX/HAL.cpp | 2 + Marlin/src/HAL/LINUX/HAL.h | 10 +- Marlin/src/HAL/LINUX/MarlinSPI.h | 26 + Marlin/src/HAL/LINUX/hardware/Gpio.h | 2 +- Marlin/src/HAL/LINUX/hardware/Heater.cpp | 2 +- Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp | 2 +- Marlin/src/HAL/LINUX/hardware/Timer.h | 2 +- Marlin/src/HAL/LINUX/inc/SanityCheck.h | 8 +- Marlin/src/HAL/LINUX/include/pinmapping.cpp | 37 - Marlin/src/HAL/LINUX/include/pinmapping.h | 26 +- Marlin/src/HAL/LINUX/include/serial.h | 2 +- Marlin/src/HAL/LINUX/main.cpp | 8 +- Marlin/src/HAL/LINUX/pinsDebug.h | 4 + Marlin/src/HAL/LPC1768/DebugMonitor.cpp | 322 - Marlin/src/HAL/LPC1768/HAL.cpp | 11 +- Marlin/src/HAL/LPC1768/HAL.h | 58 +- Marlin/src/HAL/LPC1768/HAL_MinSerial.cpp | 51 + Marlin/src/HAL/LPC1768/HAL_SPI.cpp | 28 +- Marlin/src/HAL/LPC1768/MarlinSerial.cpp | 53 +- Marlin/src/HAL/LPC1768/MarlinSerial.h | 20 +- Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp | 45 +- Marlin/src/HAL/LPC1768/eeprom_wired.cpp | 12 +- Marlin/src/HAL/LPC1768/endstop_interrupts.h | 33 + .../src/HAL/LPC1768/inc/Conditionals_post.h | 1 - Marlin/src/HAL/LPC1768/inc/SanityCheck.h | 22 +- Marlin/src/HAL/LPC1768/main.cpp | 14 +- Marlin/src/HAL/LPC1768/pinsDebug.h | 12 +- Marlin/src/HAL/LPC1768/tft/tft_spi.cpp | 45 +- Marlin/src/HAL/LPC1768/tft/xpt2046.cpp | 2 +- Marlin/src/HAL/LPC1768/tft/xpt2046.h | 2 +- .../u8g/u8g_com_HAL_LPC1768_hw_spi.cpp | 2 +- .../u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp | 2 +- .../u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp | 4 +- .../u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp | 2 +- .../u8g/u8g_com_HAL_LPC1768_sw_spi.cpp | 2 +- Marlin/src/HAL/LPC1768/upload_extra_script.py | 172 +- Marlin/src/HAL/LPC1768/usb_serial.cpp | 4 +- Marlin/src/HAL/NATIVE_SIM/HAL.h | 217 + Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h | 26 + Marlin/src/HAL/NATIVE_SIM/fastio.h | 111 + .../src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h | 22 + .../src/HAL/NATIVE_SIM/inc/Conditionals_adv.h | 31 + .../HAL/NATIVE_SIM/inc/Conditionals_post.h | 22 + Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h | 43 + Marlin/src/HAL/NATIVE_SIM/pinsDebug.h | 61 + Marlin/src/HAL/NATIVE_SIM/servo_private.h | 80 + Marlin/src/HAL/NATIVE_SIM/spi_pins.h | 55 + Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h | 64 + Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h | 80 + Marlin/src/HAL/NATIVE_SIM/timers.h | 91 + .../HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp | 52 + .../src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h | 37 + Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h | 44 + Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h | 43 + .../HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp | 52 + .../src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h | 46 + .../NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp | 171 + .../src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp | 215 + Marlin/src/HAL/NATIVE_SIM/watchdog.h | 27 + Marlin/src/HAL/SAMD51/HAL.cpp | 35 +- Marlin/src/HAL/SAMD51/HAL.h | 38 +- Marlin/src/HAL/SAMD51/HAL_SPI.cpp | 4 +- Marlin/src/HAL/SAMD51/MarlinSPI.h | 26 + Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.cpp | 6 +- Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.h | 2 +- Marlin/src/HAL/SAMD51/QSPIFlash.h | 1 - Marlin/src/HAL/SAMD51/eeprom_wired.cpp | 5 +- Marlin/src/HAL/SAMD51/endstop_interrupts.h | 142 +- Marlin/src/HAL/SAMD51/fastio.h | 2 +- Marlin/src/HAL/SAMD51/inc/SanityCheck.h | 7 +- Marlin/src/HAL/SAMD51/pinsDebug.h | 3 +- Marlin/src/HAL/SAMD51/timers.cpp | 2 +- Marlin/src/HAL/STM32/HAL.cpp | 41 +- Marlin/src/HAL/STM32/HAL.h | 58 +- Marlin/src/HAL/STM32/HAL_MinSerial.cpp | 154 + Marlin/src/HAL/STM32/HAL_SPI.cpp | 52 +- Marlin/src/HAL/STM32/MarlinSPI.cpp | 7 +- Marlin/src/HAL/STM32/MarlinSerial.cpp | 53 +- Marlin/src/HAL/STM32/MarlinSerial.h | 9 +- .../src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp | 508 +- Marlin/src/HAL/STM32/Servo.cpp | 8 +- Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp | 85 + Marlin/src/HAL/STM32/eeprom_flash.cpp | 32 +- Marlin/src/HAL/STM32/eeprom_if_iic.cpp | 56 + Marlin/src/HAL/STM32/eeprom_sdcard.cpp | 7 +- Marlin/src/HAL/STM32/eeprom_sram.cpp | 6 +- Marlin/src/HAL/STM32/eeprom_wired.cpp | 17 +- Marlin/src/HAL/STM32/endstop_interrupts.h | 6 + Marlin/src/HAL/STM32/fast_pwm.cpp | 7 +- Marlin/src/HAL/STM32/fastio.cpp | 8 +- Marlin/src/HAL/STM32/fastio.h | 1 + Marlin/src/HAL/STM32/inc/Conditionals_adv.h | 11 +- Marlin/src/HAL/STM32/inc/SanityCheck.h | 10 +- Marlin/src/HAL/STM32/msc_sd.cpp | 58 +- Marlin/src/HAL/STM32/pinsDebug.h | 6 +- Marlin/src/HAL/STM32/spi_pins.h | 3 + Marlin/src/HAL/STM32/tft/gt911.cpp | 204 + Marlin/src/HAL/STM32/tft/gt911.h | 120 + Marlin/src/HAL/STM32/tft/tft_fsmc.cpp | 17 +- Marlin/src/HAL/STM32/tft/tft_ltdc.cpp | 389 + Marlin/src/HAL/STM32/tft/tft_ltdc.h | 155 + Marlin/src/HAL/STM32/tft/tft_spi.cpp | 25 +- Marlin/src/HAL/STM32/tft/xpt2046.cpp | 9 +- Marlin/src/HAL/STM32/tft/xpt2046.h | 2 +- Marlin/src/HAL/STM32/timers.cpp | 8 +- Marlin/src/HAL/STM32/timers.h | 3 - Marlin/src/HAL/STM32/usb_host.cpp | 14 +- Marlin/src/HAL/STM32/usb_serial.cpp | 10 +- Marlin/src/HAL/STM32/usb_serial.h | 3 + Marlin/src/HAL/STM32/watchdog.cpp | 7 +- Marlin/src/HAL/STM32F1/HAL.cpp | 51 +- Marlin/src/HAL/STM32F1/HAL.h | 69 +- Marlin/src/HAL/STM32F1/HAL_MinSerial.cpp | 118 + Marlin/src/HAL/STM32F1/HAL_SPI.cpp | 6 +- Marlin/src/HAL/STM32F1/MarlinSerial.cpp | 17 +- Marlin/src/HAL/STM32F1/MarlinSerial.h | 28 +- Marlin/src/HAL/STM32F1/SPI.cpp | 4 +- Marlin/src/HAL/STM32F1/SPI.h | 4 +- Marlin/src/HAL/STM32F1/build_flags.py | 1 + .../STM32F1/dogm/u8g_com_stm32duino_swspi.cpp | 6 +- Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp | 9 +- Marlin/src/HAL/STM32F1/eeprom_flash.cpp | 4 +- Marlin/src/HAL/STM32F1/eeprom_if_iic.cpp | 2 +- Marlin/src/HAL/STM32F1/eeprom_wired.cpp | 11 +- Marlin/src/HAL/STM32F1/endstop_interrupts.h | 6 + Marlin/src/HAL/STM32F1/inc/SanityCheck.h | 6 +- Marlin/src/HAL/STM32F1/msc_sd.cpp | 40 +- Marlin/src/HAL/STM32F1/msc_sd.h | 2 +- Marlin/src/HAL/STM32F1/onboard_sd.cpp | 359 +- Marlin/src/HAL/STM32F1/onboard_sd.h | 8 +- Marlin/src/HAL/STM32F1/pinsDebug.h | 10 +- Marlin/src/HAL/STM32F1/sdio.cpp | 4 + Marlin/src/HAL/STM32F1/spi_pins.h | 3 + Marlin/src/HAL/STM32F1/tft/tft_spi.cpp | 60 +- Marlin/src/HAL/STM32F1/tft/xpt2046.cpp | 2 +- Marlin/src/HAL/STM32F1/tft/xpt2046.h | 2 +- Marlin/src/HAL/STM32F1/timers.h | 10 +- Marlin/src/HAL/TEENSY31_32/HAL.cpp | 10 +- Marlin/src/HAL/TEENSY31_32/HAL.h | 28 +- Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp | 14 +- Marlin/src/HAL/TEENSY31_32/MarlinSPI.h | 26 + Marlin/src/HAL/TEENSY31_32/eeprom.cpp | 18 +- .../src/HAL/TEENSY31_32/endstop_interrupts.h | 6 + Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h | 6 +- Marlin/src/HAL/TEENSY35_36/HAL.cpp | 9 +- Marlin/src/HAL/TEENSY35_36/HAL.h | 27 +- Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp | 14 +- Marlin/src/HAL/TEENSY35_36/MarlinSPI.h | 26 + Marlin/src/HAL/TEENSY35_36/eeprom.cpp | 6 +- .../src/HAL/TEENSY35_36/endstop_interrupts.h | 6 + Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h | 6 +- Marlin/src/HAL/TEENSY35_36/pinsDebug.h | 3 + Marlin/src/HAL/TEENSY40_41/HAL.cpp | 11 +- Marlin/src/HAL/TEENSY40_41/HAL.h | 34 +- Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp | 16 +- Marlin/src/HAL/TEENSY40_41/MarlinSPI.h | 26 + Marlin/src/HAL/TEENSY40_41/eeprom.cpp | 14 +- .../src/HAL/TEENSY40_41/endstop_interrupts.h | 6 + Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h | 6 +- Marlin/src/HAL/TEENSY40_41/pinsDebug.h | 4 + Marlin/src/HAL/platforms.h | 5 + Marlin/src/HAL/shared/Delay.cpp | 176 + Marlin/src/HAL/shared/Delay.h | 241 +- Marlin/src/HAL/shared/HAL_MinSerial.cpp | 33 + Marlin/src/HAL/shared/HAL_MinSerial.h | 79 + Marlin/src/HAL/shared/HAL_SPI.h | 6 +- Marlin/src/HAL/shared/Marduino.h | 4 + Marlin/src/HAL/shared/backtrace/backtrace.cpp | 32 +- Marlin/src/HAL/shared/backtrace/backtrace.h | 3 + Marlin/src/HAL/shared/backtrace/unwarm.h | 2 +- Marlin/src/HAL/shared/backtrace/unwarmbytab.h | 2 +- Marlin/src/HAL/shared/backtrace/unwarmmem.cpp | 2 +- Marlin/src/HAL/shared/backtrace/unwarmmem.h | 2 +- Marlin/src/HAL/shared/backtrace/unwinder.cpp | 2 +- Marlin/src/HAL/shared/backtrace/unwinder.h | 4 +- .../src/HAL/shared/backtrace/unwmemaccess.cpp | 72 +- .../src/HAL/shared/backtrace/unwmemaccess.h | 2 +- .../shared/cpu_exception/exception_arm.cpp | 379 + .../shared/cpu_exception/exception_hook.cpp | 28 + .../HAL/shared/cpu_exception/exception_hook.h | 54 + Marlin/src/HAL/shared/eeprom_api.h | 6 +- Marlin/src/HAL/shared/eeprom_if.h | 2 +- Marlin/src/HAL/shared/eeprom_if_i2c.cpp | 48 +- Marlin/src/HAL/shared/eeprom_if_spi.cpp | 61 +- Marlin/src/MarlinCore.cpp | 747 +- Marlin/src/MarlinCore.h | 53 +- Marlin/src/core/boards.h | 146 +- Marlin/src/core/bug_on.h | 39 + Marlin/src/core/debug_out.h | 23 +- Marlin/src/core/debug_section.h | 6 +- Marlin/src/core/drivers.h | 12 +- Marlin/src/core/language.h | 230 +- Marlin/src/core/macros.h | 225 +- Marlin/src/core/multi_language.h | 65 +- Marlin/src/core/serial.cpp | 54 +- Marlin/src/core/serial.h | 438 +- Marlin/src/core/serial_base.h | 223 +- Marlin/src/core/serial_hook.h | 213 +- Marlin/src/core/types.h | 629 +- Marlin/src/core/utility.cpp | 24 +- Marlin/src/core/utility.h | 13 +- Marlin/src/feature/ammeter.cpp | 54 + Marlin/src/feature/ammeter.h | 39 + Marlin/src/feature/babystep.cpp | 2 +- Marlin/src/feature/babystep.h | 2 +- Marlin/src/feature/backlash.cpp | 55 +- Marlin/src/feature/backlash.h | 4 +- Marlin/src/feature/bedlevel/abl/abl.cpp | 56 +- Marlin/src/feature/bedlevel/abl/abl.h | 2 +- Marlin/src/feature/bedlevel/bedlevel.cpp | 38 +- Marlin/src/feature/bedlevel/bedlevel.h | 4 +- Marlin/src/feature/bedlevel/hilbert_curve.cpp | 110 + Marlin/src/feature/bedlevel/hilbert_curve.h | 32 + .../bedlevel/mbl/mesh_bed_leveling.cpp | 10 +- .../feature/bedlevel/mbl/mesh_bed_leveling.h | 43 +- Marlin/src/feature/bedlevel/ubl/ubl.cpp | 421 +- Marlin/src/feature/bedlevel/ubl/ubl.h | 487 +- Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 2876 ++--- .../src/feature/bedlevel/ubl/ubl_motion.cpp | 147 +- Marlin/src/feature/binary_stream.h | 48 +- Marlin/src/feature/bltouch.cpp | 8 +- Marlin/src/feature/bltouch.h | 32 +- Marlin/src/feature/cancel_object.cpp | 9 +- Marlin/src/feature/caselight.cpp | 40 +- Marlin/src/feature/caselight.h | 30 +- Marlin/src/feature/closedloop.cpp | 1 + Marlin/src/feature/controllerfan.cpp | 36 +- Marlin/src/feature/cooler.cpp | 48 + Marlin/src/feature/cooler.h | 109 + Marlin/src/feature/dac/dac_dac084s085.cpp | 42 +- Marlin/src/feature/dac/dac_mcp4728.cpp | 14 +- Marlin/src/feature/dac/stepper_dac.cpp | 20 +- Marlin/src/feature/dac/stepper_dac.h | 2 +- .../src/feature/digipot/digipot_mcp4451.cpp | 3 + Marlin/src/feature/direct_stepping.cpp | 7 +- Marlin/src/feature/e_parser.h | 154 +- Marlin/src/feature/encoder_i2c.cpp | 163 +- Marlin/src/feature/encoder_i2c.h | 14 +- Marlin/src/feature/ethernet.cpp | 4 +- Marlin/src/feature/fanmux.h | 4 +- Marlin/src/feature/filwidth.h | 2 +- Marlin/src/feature/fwretract.cpp | 111 +- Marlin/src/feature/fwretract.h | 15 +- Marlin/src/feature/host_actions.cpp | 37 +- Marlin/src/feature/hotend_idle.cpp | 4 +- Marlin/src/feature/joystick.cpp | 15 +- Marlin/src/feature/joystick.h | 16 +- Marlin/src/feature/leds/leds.cpp | 79 +- Marlin/src/feature/leds/leds.h | 100 +- Marlin/src/feature/leds/neopixel.cpp | 80 +- Marlin/src/feature/leds/neopixel.h | 74 +- Marlin/src/feature/leds/pca9533.cpp | 4 +- Marlin/src/feature/leds/pca9632.cpp | 8 +- .../src/feature/leds/printer_event_leds.cpp | 31 +- Marlin/src/feature/leds/printer_event_leds.h | 21 +- Marlin/src/feature/leds/tempstat.cpp | 6 +- Marlin/src/feature/max7219.cpp | 6 +- Marlin/src/feature/max7219.h | 7 + Marlin/src/feature/meatpack.cpp | 31 +- Marlin/src/feature/meatpack.h | 92 +- Marlin/src/feature/mixing.cpp | 43 +- Marlin/src/feature/mixing.h | 27 +- Marlin/src/feature/mmu/mmu.cpp | 10 +- Marlin/src/feature/mmu/mmu.h | 1 + Marlin/src/feature/mmu/mmu2.cpp | 145 +- Marlin/src/feature/mmu/mmu2.h | 13 +- Marlin/src/feature/password/password.cpp | 11 +- Marlin/src/feature/password/password.h | 4 +- Marlin/src/feature/pause.cpp | 151 +- Marlin/src/feature/pause.h | 46 +- Marlin/src/feature/power.cpp | 215 +- Marlin/src/feature/power.h | 25 +- Marlin/src/feature/power_monitor.cpp | 9 +- Marlin/src/feature/power_monitor.h | 22 +- Marlin/src/feature/powerloss.cpp | 271 +- Marlin/src/feature/powerloss.h | 66 +- Marlin/src/feature/probe_temp_comp.cpp | 108 +- Marlin/src/feature/probe_temp_comp.h | 48 +- Marlin/src/feature/repeat.cpp | 9 +- Marlin/src/feature/runout.cpp | 37 +- Marlin/src/feature/runout.h | 124 +- Marlin/src/feature/solenoid.cpp | 40 +- Marlin/src/feature/spindle_laser.cpp | 61 +- Marlin/src/feature/spindle_laser.h | 101 +- Marlin/src/feature/stepper_driver_safety.cpp | 117 + Marlin/src/feature/stepper_driver_safety.h | 28 + Marlin/src/feature/tmc_util.cpp | 289 +- Marlin/src/feature/tmc_util.h | 25 +- Marlin/src/feature/tramming.h | 6 +- Marlin/src/feature/twibus.cpp | 6 +- Marlin/src/gcode/bedlevel/G26.cpp | 603 +- Marlin/src/gcode/bedlevel/G35.cpp | 30 +- Marlin/src/gcode/bedlevel/M420.cpp | 34 +- Marlin/src/gcode/bedlevel/abl/G29.cpp | 501 +- Marlin/src/gcode/bedlevel/mbl/G29.cpp | 58 +- Marlin/src/gcode/bedlevel/ubl/G29.cpp | 13 +- Marlin/src/gcode/bedlevel/ubl/M421.cpp | 30 +- Marlin/src/gcode/calibrate/G28.cpp | 198 +- Marlin/src/gcode/calibrate/G33.cpp | 115 +- Marlin/src/gcode/calibrate/G34.cpp | 10 +- Marlin/src/gcode/calibrate/G34_M422.cpp | 163 +- Marlin/src/gcode/calibrate/G425.cpp | 285 +- Marlin/src/gcode/calibrate/G76_M192_M871.cpp | 49 +- Marlin/src/gcode/calibrate/M100.cpp | 90 +- Marlin/src/gcode/calibrate/M12.cpp | 1 + Marlin/src/gcode/calibrate/M425.cpp | 47 +- Marlin/src/gcode/calibrate/M48.cpp | 18 +- Marlin/src/gcode/calibrate/M665.cpp | 87 +- Marlin/src/gcode/calibrate/M666.cpp | 90 +- Marlin/src/gcode/calibrate/M852.cpp | 36 +- Marlin/src/gcode/config/M200-M205.cpp | 199 +- Marlin/src/gcode/config/M217.cpp | 73 +- Marlin/src/gcode/config/M218.cpp | 29 +- Marlin/src/gcode/config/M220.cpp | 2 +- Marlin/src/gcode/config/M221.cpp | 4 +- Marlin/src/gcode/config/M281.cpp | 46 +- Marlin/src/gcode/config/M301.cpp | 64 +- Marlin/src/gcode/config/M302.cpp | 4 +- Marlin/src/gcode/config/M304.cpp | 13 +- Marlin/src/gcode/config/M305.cpp | 10 +- Marlin/src/gcode/config/M309.cpp | 53 + Marlin/src/gcode/config/M43.cpp | 22 +- Marlin/src/gcode/config/M575.cpp | 20 +- Marlin/src/gcode/config/M92.cpp | 104 +- Marlin/src/gcode/control/M10-M11.cpp | 44 + Marlin/src/gcode/control/M111.cpp | 10 +- Marlin/src/gcode/control/M17_M18_M84.cpp | 204 +- Marlin/src/gcode/control/M211.cpp | 22 +- Marlin/src/gcode/control/M280.cpp | 51 +- Marlin/src/gcode/control/M282.cpp | 45 + Marlin/src/gcode/control/M3-M5.cpp | 8 +- Marlin/src/gcode/control/M350_M351.cpp | 8 +- Marlin/src/gcode/control/M42.cpp | 36 +- Marlin/src/gcode/control/M605.cpp | 67 +- Marlin/src/gcode/control/M7-M9.cpp | 36 +- Marlin/src/gcode/control/M80_M81.cpp | 32 +- Marlin/src/gcode/control/M993_M994.cpp | 4 +- Marlin/src/gcode/control/M997.cpp | 6 + Marlin/src/gcode/control/M999.cpp | 2 +- Marlin/src/gcode/control/T.cpp | 4 +- Marlin/src/gcode/eeprom/M500-M504.cpp | 6 +- Marlin/src/gcode/feature/L6470/M122.cpp | 14 +- Marlin/src/gcode/feature/L6470/M906.cpp | 164 +- Marlin/src/gcode/feature/L6470/M916-918.cpp | 30 +- Marlin/src/gcode/feature/advance/M900.cpp | 23 +- Marlin/src/gcode/feature/camera/M240.cpp | 15 +- Marlin/src/gcode/feature/caselight/M355.cpp | 2 +- Marlin/src/gcode/feature/clean/G12.cpp | 1 + .../src/gcode/feature/controllerfan/M710.cpp | 26 +- .../src/gcode/feature/digipot/M907-M910.cpp | 60 +- .../src/gcode/feature/filwidth/M404-M407.cpp | 4 +- .../src/gcode/feature/fwretract/G10_G11.cpp | 11 +- .../src/gcode/feature/fwretract/M207-M209.cpp | 35 +- Marlin/src/gcode/feature/leds/M150.cpp | 27 +- Marlin/src/gcode/feature/leds/M7219.cpp | 2 +- Marlin/src/gcode/feature/mixing/M166.cpp | 8 +- .../src/gcode/feature/network/M552-M554.cpp | 38 +- .../src/gcode/feature/password/M510-M512.cpp | 2 +- Marlin/src/gcode/feature/pause/G27.cpp | 1 - Marlin/src/gcode/feature/pause/G60.cpp | 10 +- Marlin/src/gcode/feature/pause/G61.cpp | 50 +- Marlin/src/gcode/feature/pause/M125.cpp | 7 +- Marlin/src/gcode/feature/pause/M600.cpp | 20 +- Marlin/src/gcode/feature/pause/M603.cpp | 18 + Marlin/src/gcode/feature/pause/M701_M702.cpp | 21 +- .../src/gcode/feature/power_monitor/M430.cpp | 8 +- Marlin/src/gcode/feature/powerloss/M1000.cpp | 17 +- Marlin/src/gcode/feature/powerloss/M413.cpp | 25 +- Marlin/src/gcode/feature/prusa_MMU2/M403.cpp | 2 +- Marlin/src/gcode/feature/runout/M412.cpp | 23 +- Marlin/src/gcode/feature/trinamic/M122.cpp | 26 +- Marlin/src/gcode/feature/trinamic/M569.cpp | 247 +- Marlin/src/gcode/feature/trinamic/M906.cpp | 215 +- .../src/gcode/feature/trinamic/M911-M914.cpp | 408 +- Marlin/src/gcode/gcode.cpp | 215 +- Marlin/src/gcode/gcode.h | 536 +- Marlin/src/gcode/gcode_d.cpp | 379 +- Marlin/src/gcode/geometry/G17-G19.cpp | 2 +- Marlin/src/gcode/geometry/G53-G59.cpp | 6 +- Marlin/src/gcode/geometry/G92.cpp | 106 +- Marlin/src/gcode/geometry/M206_M428.cpp | 37 +- Marlin/src/gcode/host/M110.cpp | 2 +- Marlin/src/gcode/host/M113.cpp | 8 +- Marlin/src/gcode/host/M114.cpp | 63 +- Marlin/src/gcode/host/M115.cpp | 40 +- Marlin/src/gcode/host/M118.cpp | 8 +- Marlin/src/gcode/host/M154.cpp | 40 + Marlin/src/gcode/host/M360.cpp | 14 +- Marlin/src/gcode/host/M876.cpp | 1 + Marlin/src/gcode/lcd/M0_M1.cpp | 9 +- Marlin/src/gcode/lcd/M117.cpp | 6 + Marlin/src/gcode/lcd/M145.cpp | 25 +- Marlin/src/gcode/lcd/M250.cpp | 11 +- Marlin/src/gcode/lcd/M256.cpp | 44 + Marlin/src/gcode/lcd/M414.cpp | 7 + Marlin/src/gcode/lcd/M73.cpp | 28 +- Marlin/src/gcode/lcd/M995.cpp | 6 +- Marlin/src/gcode/motion/G0_G1.cpp | 21 +- Marlin/src/gcode/motion/G2_G3.cpp | 257 +- Marlin/src/gcode/motion/G6.cpp | 1 + Marlin/src/gcode/motion/M290.cpp | 28 +- Marlin/src/gcode/parser.cpp | 122 +- Marlin/src/gcode/parser.h | 113 +- Marlin/src/gcode/probe/G30.cpp | 2 +- Marlin/src/gcode/probe/G38.cpp | 6 +- Marlin/src/gcode/probe/M851.cpp | 41 +- Marlin/src/gcode/probe/M951.cpp | 14 +- Marlin/src/gcode/queue.cpp | 491 +- Marlin/src/gcode/queue.h | 152 +- Marlin/src/gcode/scara/M360-M364.cpp | 2 +- Marlin/src/gcode/sd/M1001.cpp | 19 +- Marlin/src/gcode/sd/M20.cpp | 2 +- Marlin/src/gcode/sd/M24_M25.cpp | 23 +- Marlin/src/gcode/sd/M27.cpp | 4 +- Marlin/src/gcode/sd/M28_M29.cpp | 2 +- Marlin/src/gcode/sd/M32.cpp | 2 +- Marlin/src/gcode/sd/M524.cpp | 2 +- Marlin/src/gcode/sd/M808.cpp | 2 +- Marlin/src/gcode/stats/M31.cpp | 3 +- Marlin/src/gcode/stats/M75-M78.cpp | 45 +- Marlin/src/gcode/temp/M104_M109.cpp | 90 +- Marlin/src/gcode/temp/M105.cpp | 6 +- Marlin/src/gcode/temp/M106_M107.cpp | 64 +- Marlin/src/gcode/temp/M140_M190.cpp | 77 +- Marlin/src/gcode/temp/M141_M191.cpp | 12 - Marlin/src/gcode/temp/M143_M193.cpp | 67 + Marlin/src/gcode/temp/M303.cpp | 44 +- Marlin/src/gcode/units/M149.cpp | 7 + Marlin/src/gcode/units/M82_M83.cpp | 6 + Marlin/src/inc/Conditionals_LCD.h | 494 +- Marlin/src/inc/Conditionals_adv.h | 515 +- Marlin/src/inc/Conditionals_post.h | 1866 ++-- Marlin/src/inc/MarlinConfigPre.h | 2 +- Marlin/src/inc/SanityCheck.h | 1636 ++- Marlin/src/inc/Version.h | 18 +- Marlin/src/inc/Warnings.cpp | 482 + Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp | 22 + Marlin/src/lcd/HD44780/marlinui_HD44780.cpp | 176 +- Marlin/src/lcd/HD44780/marlinui_HD44780.h | 5 + Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp | 360 +- Marlin/src/lcd/buttons.h | 70 +- Marlin/src/lcd/dogm/HAL_LCD_class_defines.h | 86 +- Marlin/src/lcd/dogm/HAL_LCD_com_defines.h | 7 +- Marlin/src/lcd/dogm/dogm_Bootscreen.h | 4 + Marlin/src/lcd/dogm/dogm_Statusscreen.h | 234 +- .../lcd/dogm/fontdata/fontdata_6x9_marlin.h | 2 +- .../lcd/dogm/fontdata/fontdata_ISO10646_1.h | 6 +- Marlin/src/lcd/dogm/fontdata/langdata.h | 23 + Marlin/src/lcd/dogm/fontdata/langdata_an.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_bg.h | 23 +- Marlin/src/lcd/dogm/fontdata/langdata_ca.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_cz.h | 25 +- Marlin/src/lcd/dogm/fontdata/langdata_da.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_de.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_el.h | 27 +- .../{langdata_el_gr.h => langdata_el_CY.h} | 27 +- Marlin/src/lcd/dogm/fontdata/langdata_en.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_es.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_eu.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_fi.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_fr.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_gl.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_hr.h | 17 +- Marlin/src/lcd/dogm/fontdata/langdata_hu.h | 9 +- Marlin/src/lcd/dogm/fontdata/langdata_it.h | 7 +- .../src/lcd/dogm/fontdata/langdata_jp_kana.h | 31 +- Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h | 219 +- Marlin/src/lcd/dogm/fontdata/langdata_nl.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_pl.h | 19 +- Marlin/src/lcd/dogm/fontdata/langdata_pt.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_ro.h | 7 +- Marlin/src/lcd/dogm/fontdata/langdata_ru.h | 15 +- Marlin/src/lcd/dogm/fontdata/langdata_sk.h | 21 +- Marlin/src/lcd/dogm/fontdata/langdata_test.h | 13 +- Marlin/src/lcd/dogm/fontdata/langdata_tr.h | 13 +- Marlin/src/lcd/dogm/fontdata/langdata_uk.h | 23 +- Marlin/src/lcd/dogm/fontdata/langdata_vi.h | 97 +- Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h | 719 +- Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h | 605 +- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 174 +- Marlin/src/lcd/dogm/marlinui_DOGM.h | 10 +- Marlin/src/lcd/dogm/status/ammeter.h | 68 + Marlin/src/lcd/dogm/status/bed.h | 11 +- Marlin/src/lcd/dogm/status/cooler.h | 119 + Marlin/src/lcd/dogm/status/hotend.h | 307 +- Marlin/src/lcd/dogm/status_screen_DOGM.cpp | 257 +- .../lcd/dogm/status_screen_lite_ST7920.cpp | 57 +- Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp | 5 +- .../lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp | 2 +- .../lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp | 2 +- .../dogm/u8g_dev_tft_upscale_from_128x64.cpp | 69 +- Marlin/src/lcd/dogm/u8g_fontutf8.h | 5 +- .../dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp | 86 +- .../lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h | 2 +- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 3693 ------ Marlin/src/lcd/dwin/e3v2/dwin.h | 375 - Marlin/src/lcd/{dwin => }/e3v2/README.md | 0 .../dwin_lcd.cpp => e3v2/common/dwin_api.cpp} | 165 +- .../dwin_lcd.h => e3v2/common/dwin_api.h} | 135 +- Marlin/src/lcd/e3v2/common/dwin_color.h | 44 + Marlin/src/lcd/e3v2/common/dwin_font.h | 38 + Marlin/src/lcd/e3v2/common/dwin_set.h | 138 + .../common/encoder.cpp} | 41 +- .../common/encoder.h} | 11 +- Marlin/src/lcd/e3v2/creality/dwin.cpp | 4303 +++++++ Marlin/src/lcd/e3v2/creality/dwin.h | 253 + Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp | 83 + Marlin/src/lcd/e3v2/creality/dwin_lcd.h | 47 + Marlin/src/lcd/e3v2/enhanced/dwin.cpp | 3655 ++++++ Marlin/src/lcd/e3v2/enhanced/dwin.h | 290 + Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp | 160 + Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h | 83 + Marlin/src/lcd/e3v2/enhanced/dwinui.cpp | 453 + Marlin/src/lcd/e3v2/enhanced/dwinui.h | 485 + Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp | 75 + Marlin/src/lcd/e3v2/enhanced/lockscreen.h | 45 + Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp | 75 + Marlin/src/lcd/e3v2/enhanced/meshviewer.h | 28 + Marlin/src/lcd/e3v2/jyersui/README.md | 7 + Marlin/src/lcd/e3v2/jyersui/dwin.cpp | 5065 +++++++++ Marlin/src/lcd/e3v2/jyersui/dwin.h | 245 + Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp | 64 + Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h | 34 + Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp | 62 + Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h | 80 + Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp | 180 + Marlin/src/lcd/e3v2/marlinui/dwin_string.h | 1006 ++ .../src/lcd/e3v2/marlinui/lcdprint_dwin.cpp | 191 + Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h | 30 + Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h | 146 + Marlin/src/lcd/e3v2/marlinui/ui_common.cpp | 591 + .../lcd/e3v2/marlinui/ui_status_480x272.cpp | 391 + .../extui/anycubic_chiron/FileNavigator.cpp | 258 + .../{lib => }/anycubic_chiron/FileNavigator.h | 45 +- .../extui/{lib => }/anycubic_chiron/Tunes.cpp | 6 +- .../extui/{lib => }/anycubic_chiron/Tunes.h | 2 +- .../chiron_extui.cpp} | 24 +- .../lcd/extui/anycubic_chiron/chiron_tft.cpp | 976 ++ .../lcd/extui/anycubic_chiron/chiron_tft.h | 89 + .../anycubic_chiron/chiron_tft_defs.h | 49 +- .../anycubic_extui.cpp} | 22 +- .../anycubic_i3mega/anycubic_i3mega_lcd.cpp | 276 +- .../anycubic_i3mega/anycubic_i3mega_lcd.h | 82 +- .../lcd/extui/{lib => }/dgus/DGUSDisplay.cpp | 84 +- .../lcd/extui/{lib => }/dgus/DGUSDisplay.h | 29 +- .../lcd/extui/{lib => }/dgus/DGUSDisplayDef.h | 13 +- .../{lib => }/dgus/DGUSScreenHandler.cpp | 689 +- Marlin/src/lcd/extui/dgus/DGUSScreenHandler.h | 76 + .../lcd/extui/{lib => }/dgus/DGUSVPVariable.h | 0 .../{dgus_lcd.cpp => dgus/dgus_extui.cpp} | 40 +- .../{lib => }/dgus/fysetc/DGUSDisplayDef.cpp | 240 +- .../{lib => }/dgus/fysetc/DGUSDisplayDef.h | 4 +- .../extui/dgus/fysetc/DGUSScreenHandler.cpp | 427 + .../dgus => dgus/fysetc}/DGUSScreenHandler.h | 82 +- .../{lib => }/dgus/hiprecy/DGUSDisplayDef.cpp | 284 +- .../{lib => }/dgus/hiprecy/DGUSDisplayDef.h | 4 +- .../extui/dgus/hiprecy/DGUSScreenHandler.cpp | 420 + .../extui/dgus/hiprecy/DGUSScreenHandler.h | 240 + .../src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp | 802 ++ .../src/lcd/extui/dgus/mks/DGUSDisplayDef.h | 712 ++ .../lcd/extui/dgus/mks/DGUSScreenHandler.cpp | 2030 ++++ .../lcd/extui/dgus/mks/DGUSScreenHandler.h | 315 + .../{lib => }/dgus/origin/DGUSDisplayDef.cpp | 227 +- .../{lib => }/dgus/origin/DGUSDisplayDef.h | 48 +- .../extui/dgus/origin/DGUSScreenHandler.cpp | 423 + .../lcd/extui/dgus/origin/DGUSScreenHandler.h | 240 + .../lcd/extui/dgus_reloaded/DGUSDisplay.cpp | 407 + .../src/lcd/extui/dgus_reloaded/DGUSDisplay.h | 171 + .../lcd/extui/dgus_reloaded/DGUSRxHandler.cpp | 1045 ++ .../lcd/extui/dgus_reloaded/DGUSRxHandler.h | 122 + .../extui/dgus_reloaded/DGUSScreenHandler.cpp | 540 + .../extui/dgus_reloaded/DGUSScreenHandler.h | 151 + .../extui/dgus_reloaded/DGUSSetupHandler.cpp | 209 + .../extui/dgus_reloaded/DGUSSetupHandler.h | 42 + .../lcd/extui/dgus_reloaded/DGUSTxHandler.cpp | 618 ++ .../lcd/extui/dgus_reloaded/DGUSTxHandler.h | 126 + .../extui/dgus_reloaded/config/DGUS_Addr.h | 173 + .../dgus_reloaded/config/DGUS_Constants.h | 96 + .../extui/dgus_reloaded/config/DGUS_Control.h | 50 + .../extui/dgus_reloaded/config/DGUS_Data.h | 148 + .../extui/dgus_reloaded/config/DGUS_Screen.h | 52 + .../definition/DGUS_ScreenAddrList.cpp | 240 + .../definition/DGUS_ScreenAddrList.h | 32 + .../definition/DGUS_ScreenSetup.cpp | 57 + .../definition/DGUS_ScreenSetup.h | 31 + .../extui/dgus_reloaded/definition/DGUS_VP.h | 40 + .../dgus_reloaded/definition/DGUS_VPList.cpp | 368 + .../dgus_reloaded/definition/DGUS_VPList.h | 26 + .../dgus_reloaded/dgus_reloaded_extui.cpp | 142 + .../src/lcd/extui/{ => example}/example.cpp | 23 +- .../archim2-flash/flash_storage.cpp | 20 +- .../archim2-flash/flash_storage.h | 2 +- .../archim2-flash/media_file_reader.cpp | 8 +- .../archim2-flash/media_file_reader.h | 12 +- .../bioprinter/advanced_settings.cpp} | 9 +- .../bioprinter/advanced_settings.h | 32 + .../bioprinter/confirm_home_e.cpp} | 9 +- .../bioprinter/confirm_home_e.h | 32 + .../bioprinter/confirm_home_xyz.cpp} | 9 +- .../bioprinter/confirm_home_xyz.h | 32 + .../bioprinter/main_menu.cpp} | 27 +- .../ftdi_eve_touch_ui/bioprinter/main_menu.h | 32 + .../bioprinter/printing_dialog_box.cpp} | 18 +- .../bioprinter/printing_dialog_box.h | 44 + .../ftdi_eve_touch_ui/bioprinter/screens.h | 105 + .../bioprinter/status_screen.cpp} | 17 +- .../bioprinter/status_screen.h | 56 + .../bioprinter/tune_menu.cpp} | 11 +- .../ftdi_eve_touch_ui/bioprinter/tune_menu.h | 35 + .../bioprinter/ui_landscape.h} | 1 - .../bioprinter/ui_portrait.h} | 1 - .../cocoa_press/advanced_settings_menu.cpp} | 23 +- .../cocoa_press/advanced_settings_menu.h | 32 + .../cocoa_press}/cocoa_press_ui.h | 14 +- .../cocoa_press/leveling_menu.cpp | 91 + .../cocoa_press/leveling_menu.h | 32 + .../cocoa_press/load_chocolate.cpp | 218 + .../cocoa_press/load_chocolate.h | 47 + .../cocoa_press/main_menu.cpp} | 65 +- .../ftdi_eve_touch_ui/cocoa_press/main_menu.h | 33 + .../cocoa_press/move_e_screen.cpp} | 25 +- .../cocoa_press/move_e_screen.h | 33 + .../cocoa_press/move_xyz_screen.cpp} | 15 +- .../cocoa_press/move_xyz_screen.h | 33 + .../cocoa_press/preheat_menu.cpp} | 27 +- .../cocoa_press/preheat_menu.h | 31 + .../cocoa_press/preheat_screen.cpp} | 61 +- .../cocoa_press/preheat_screen.h | 46 + .../ftdi_eve_touch_ui/cocoa_press/screens.h | 134 + .../cocoa_press/status_screen.cpp} | 50 +- .../cocoa_press/status_screen.h} | 87 +- .../{lib => }/ftdi_eve_touch_ui/compat.h | 8 +- .../{lib => }/ftdi_eve_touch_ui/config.h | 6 +- .../ftdi_eve_touch_ui/ftdi_eve_extui.cpp | 160 + .../ftdi_eve_lib/LICENSE.txt | 0 .../ftdi_eve_touch_ui/ftdi_eve_lib/README.md | 0 .../ftdi_eve_lib/basic/boards.h | 281 + .../ftdi_eve_lib/basic/commands.cpp | 92 +- .../ftdi_eve_lib/basic/commands.h | 15 +- .../ftdi_eve_lib/basic/constants.h | 1 + .../ftdi_eve_lib/basic/display_list.h | 4 +- .../ftdi_eve_lib/basic/ftdi_basic.h | 0 .../ftdi_eve_lib/basic/registers_ft800.h | 0 .../ftdi_eve_lib/basic/registers_ft810.h | 0 .../ftdi_eve_lib/basic/resolutions.h | 65 +- .../ftdi_eve_lib/basic/spi.cpp | 4 +- .../ftdi_eve_lib/basic/spi.h | 4 +- .../ftdi_eve_touch_ui/ftdi_eve_lib/compat.h | 32 +- .../ftdi_eve_lib/extended/adjuster_widget.cpp | 60 + .../ftdi_eve_lib/extended/adjuster_widget.h | 40 + .../ftdi_eve_lib/extended/arrows.cpp | 52 + .../ftdi_eve_lib/extended/arrows.h | 28 + .../ftdi_eve_lib/extended/bitmap_info.h | 0 .../extended/circular_progress.cpp | 108 + .../ftdi_eve_lib/extended/circular_progress.h | 27 + .../extended/command_processor.cpp | 12 + .../ftdi_eve_lib/extended/command_processor.h | 31 +- .../ftdi_eve_lib/extended/dl_cache.cpp | 12 +- .../ftdi_eve_lib/extended/dl_cache.h | 0 .../ftdi_eve_lib/extended/event_loop.cpp | 8 +- .../ftdi_eve_lib/extended/event_loop.h | 0 .../ftdi_eve_lib/extended/ftdi_extended.h | 4 + .../ftdi_eve_lib/extended/grid_layout.h | 55 +- .../ftdi_eve_lib/extended}/poly_ui.h | 8 +- .../ftdi_eve_lib/extended/polygon.h | 2 +- .../ftdi_eve_lib/extended/rgb_t.h | 0 .../ftdi_eve_lib/extended/screen_types.cpp | 9 +- .../ftdi_eve_lib/extended/screen_types.h | 18 +- .../ftdi_eve_lib/extended/sound_list.h | 2 +- .../ftdi_eve_lib/extended/sound_player.cpp | 6 +- .../ftdi_eve_lib/extended/sound_player.h | 2 +- .../ftdi_eve_lib/extended/text_box.cpp | 96 +- .../ftdi_eve_lib/extended/text_box.h | 4 +- .../ftdi_eve_lib/extended/text_ellipsis.cpp | 41 +- .../ftdi_eve_lib/extended/text_ellipsis.h | 2 +- .../ftdi_eve_lib/extended/tiny_timer.cpp | 0 .../ftdi_eve_lib/extended/tiny_timer.h | 2 +- .../ftdi_eve_lib/extended/unicode/README.txt | 0 .../extended/unicode/cyrillic_char_set.cpp | 0 .../extended/unicode/cyrillic_char_set.h | 0 .../unicode/cyrillic_char_set_bitmap_31.h | 2529 +++++ .../extended/unicode/font_bitmaps.cpp | 0 .../extended/unicode/font_bitmaps.h | 0 .../cyrillic_char_set_bitmap_31.png | Bin .../cyrillic_char_set_bitmap_31.svg | 0 .../unicode/font_bitmaps/romfont_31.pbm | Bin .../unicode/font_bitmaps/romfont_31.png | Bin .../western_char_set_bitmap_31.png | Bin .../western_char_set_bitmap_31.svg | 0 .../extended/unicode/font_size_t.cpp | 0 .../extended/unicode/font_size_t.h | 0 .../extended/unicode/standard_char_set.cpp | 0 .../extended/unicode/standard_char_set.h | 0 .../ftdi_eve_lib/extended/unicode/unicode.cpp | 37 +- .../ftdi_eve_lib/extended/unicode/unicode.h | 16 +- .../extended/unicode/western_char_set.cpp | 0 .../extended/unicode/western_char_set.h | 0 .../unicode/western_char_set_bitmap_31.h | 0 .../ftdi_eve_lib/ftdi_eve_lib.h | 0 .../ftdi_eve_lib/scripts/file2cpp.py | 47 + .../ftdi_eve_lib/scripts/font2cpp.py} | 0 .../ftdi_eve_lib/scripts/img2cpp.py | 113 + .../ftdi_eve_lib/scripts}/svg2cpp.py | 4 +- .../generic}/about_screen.cpp | 44 +- .../ftdi_eve_touch_ui/generic/about_screen.h | 33 + .../generic}/advanced_settings_menu.cpp | 11 +- .../generic/advanced_settings_menu.h | 32 + .../generic}/alert_dialog_box.cpp | 23 +- .../generic/alert_dialog_box.h | 39 + .../generic}/backlash_compensation_screen.cpp | 7 +- .../generic/backlash_compensation_screen.h | 32 + .../base_numeric_adjustment_screen.cpp | 59 +- .../generic/base_numeric_adjustment_screen.h | 87 + .../generic}/base_screen.cpp | 17 +- .../ftdi_eve_touch_ui/generic/base_screen.h | 43 + .../generic/bed_mesh_base.cpp} | 211 +- .../ftdi_eve_touch_ui/generic/bed_mesh_base.h | 46 + .../generic/bed_mesh_edit_screen.cpp | 200 + .../generic/bed_mesh_edit_screen.h | 50 + .../generic/bed_mesh_view_screen.cpp | 165 + .../generic/bed_mesh_view_screen.h | 47 + .../generic}/boot_screen.cpp | 14 +- .../ftdi_eve_touch_ui/generic/boot_screen.h | 35 + .../generic}/case_light_screen.cpp | 7 +- .../generic/case_light_screen.h | 31 + .../generic}/change_filament_screen.cpp | 67 +- .../generic/change_filament_screen.h | 51 + .../confirm_abort_print_dialog_box.cpp | 9 +- .../generic/confirm_abort_print_dialog_box.h | 32 + .../confirm_auto_calibration_dialog_box.cpp | 7 +- .../confirm_auto_calibration_dialog_box.h | 32 + .../confirm_erase_flash_dialog_box.cpp | 7 +- .../generic/confirm_erase_flash_dialog_box.h | 32 + .../confirm_start_print_dialog_box.cpp | 21 +- .../generic/confirm_start_print_dialog_box.h | 42 + .../confirm_user_request_alert_box.cpp | 31 +- .../generic/confirm_user_request_alert_box.h | 34 + .../generic}/custom_user_menus.cpp | 16 +- .../generic/custom_user_menus.h | 31 + .../generic}/default_acceleration_screen.cpp | 7 +- .../generic/default_acceleration_screen.h | 32 + .../generic}/developer_menu.cpp | 7 +- .../generic/developer_menu.h | 32 + .../generic}/dialog_box_base_class.cpp | 23 +- .../generic/dialog_box_base_class.h | 39 + .../generic}/display_tuning_screen.cpp | 7 +- .../generic/display_tuning_screen.h | 32 + .../generic}/endstop_state_screen.cpp | 21 +- .../generic/endstop_state_screen.h | 35 + .../generic}/feedrate_percent_screen.cpp | 7 +- .../generic/feedrate_percent_screen.h | 32 + .../generic}/filament_menu.cpp | 9 +- .../ftdi_eve_touch_ui/generic/filament_menu.h | 32 + .../generic}/filament_runout_screen.cpp | 9 +- .../generic/filament_runout_screen.h | 32 + .../generic/files_screen.cpp | 286 + .../ftdi_eve_touch_ui/generic/files_screen.h | 68 + .../generic/flow_percent_screen.cpp} | 32 +- .../generic/flow_percent_screen.h | 31 + .../generic}/interface_settings_screen.cpp | 90 +- .../generic/interface_settings_screen.h | 67 + .../generic}/interface_sounds_screen.cpp | 67 +- .../generic/interface_sounds_screen.h | 55 + .../generic}/jerk_screen.cpp | 7 +- .../ftdi_eve_touch_ui/generic/jerk_screen.h | 32 + .../generic}/junction_deviation_screen.cpp | 13 +- .../generic/junction_deviation_screen.h | 32 + .../generic}/kill_screen.cpp | 7 +- .../ftdi_eve_touch_ui/generic/kill_screen.h | 33 + .../generic}/language_menu.cpp | 8 +- .../ftdi_eve_touch_ui/generic/language_menu.h | 32 + .../generic/leveling_menu.cpp | 140 + .../ftdi_eve_touch_ui/generic/leveling_menu.h | 32 + .../generic}/linear_advance_screen.cpp | 7 +- .../generic/linear_advance_screen.h | 32 + .../generic}/lock_screen.cpp | 32 +- .../ftdi_eve_touch_ui/generic/lock_screen.h | 53 + .../generic}/main_menu.cpp | 25 +- .../ftdi_eve_touch_ui/generic/main_menu.h | 33 + .../generic}/max_acceleration_screen.cpp | 7 +- .../generic/max_acceleration_screen.h | 32 + .../generic}/max_velocity_screen.cpp | 7 +- .../generic/max_velocity_screen.h | 32 + .../generic}/media_player_screen.cpp | 7 +- .../generic/media_player_screen.h | 40 + .../generic}/move_axis_screen.cpp | 62 +- .../generic/move_axis_screen.h | 49 + .../generic}/nozzle_offsets_screen.cpp | 7 +- .../generic/nozzle_offsets_screen.h | 33 + .../generic}/nudge_nozzle_screen.cpp | 47 +- .../generic/nudge_nozzle_screen.h | 44 + .../generic}/restore_failsafe_dialog_box.cpp | 7 +- .../generic/restore_failsafe_dialog_box.h | 32 + .../generic}/save_settings_dialog_box.cpp | 11 +- .../generic/save_settings_dialog_box.h | 39 + .../extui/ftdi_eve_touch_ui/generic/screens.h | 224 + .../generic/spinner_dialog_box.cpp | 108 + .../generic/spinner_dialog_box.h | 48 + .../generic}/statistics_screen.cpp | 9 +- .../generic/statistics_screen.h | 32 + .../generic}/status_screen.cpp | 29 +- .../ftdi_eve_touch_ui/generic/status_screen.h | 47 + .../stepper_bump_sensitivity_screen.cpp | 11 +- .../generic/stepper_bump_sensitivity_screen.h | 32 + .../generic}/stepper_current_screen.cpp | 7 +- .../generic/stepper_current_screen.h | 32 + .../generic}/steps_screen.cpp | 7 +- .../ftdi_eve_touch_ui/generic/steps_screen.h | 32 + .../generic}/stress_test_screen.cpp | 31 +- .../generic/stress_test_screen.h | 48 + .../generic}/string_format.cpp | 53 +- .../generic}/string_format.h | 8 +- .../generic}/temperature_screen.cpp | 20 +- .../generic/temperature_screen.h | 32 + .../generic}/touch_calibration_screen.cpp | 7 +- .../generic/touch_calibration_screen.h | 34 + .../generic}/touch_registers_screen.cpp | 7 +- .../generic/touch_registers_screen.h | 32 + .../generic}/tune_menu.cpp | 24 +- .../ftdi_eve_touch_ui/generic/tune_menu.h | 35 + .../generic}/widget_demo_screen.cpp | 7 +- .../generic/widget_demo_screen.h | 34 + .../generic/z_offset_screen.cpp | 111 + .../generic/z_offset_screen.h | 43 + .../ftdi_eve_touch_ui/language/language.cpp | 10 +- .../ftdi_eve_touch_ui/language/language.h | 0 .../ftdi_eve_touch_ui/language/language_en.h | 19 +- .../ftdi_eve_touch_ui/pin_mappings.h | 8 +- .../lcd/extui/ftdi_eve_touch_ui/screen_data.h | 69 + .../lcd/extui/ftdi_eve_touch_ui/screens.cpp | 126 + .../src/lcd/extui/ftdi_eve_touch_ui/screens.h | 50 + .../ftdi_eve_touch_ui/theme/bitmaps.h | 94 +- .../theme/bootscreen_logo_portrait.h | 1 - .../ftdi_eve_touch_ui/theme/colors.h | 10 + .../{lib => }/ftdi_eve_touch_ui/theme/fonts.h | 2 +- .../theme/marlin_bootscreen_landscape.h | 1 - .../theme/marlin_bootscreen_portrait.h | 1 - .../ftdi_eve_touch_ui/theme/sounds.cpp | 4 +- .../ftdi_eve_touch_ui/theme/sounds.h | 2 +- .../{lib => }/ftdi_eve_touch_ui/theme/theme.h | 0 .../lib/anycubic_chiron/FileNavigator.cpp | 164 - .../extui/lib/anycubic_chiron/chiron_tft.cpp | 885 -- .../extui/lib/anycubic_chiron/chiron_tft.h | 77 - .../ftdi_eve_lib/basic/boards.h | 184 - .../unicode/cyrillic_char_set_bitmap_31.h | 2529 ----- .../ftdi_eve_lib/extras/circular_progress.h | 105 - .../lib/ftdi_eve_touch_ui/marlin_events.cpp | 184 - .../screens/cocoa_press_load_chocolate.cpp | 101 - .../screens/cocoa_press_unload_cartridge.cpp | 101 - .../screens/files_screen.cpp | 264 - .../screens/leveling_menu.cpp | 121 - .../ftdi_eve_touch_ui/screens/screen_data.h | 97 - .../lib/ftdi_eve_touch_ui/screens/screens.cpp | 139 - .../lib/ftdi_eve_touch_ui/screens/screens.h | 911 -- .../lcd/extui/lib/mks_ui/draw_number_key.cpp | 770 -- .../lcd/extui/lib/mks_ui/draw_ready_print.cpp | 198 - .../extui/lib/mks_ui/tft_lvgl_configuration.h | 69 - .../{malyan_lcd.cpp => malyan/malyan.cpp} | 193 +- Marlin/src/lcd/extui/malyan/malyan.h | 53 + Marlin/src/lcd/extui/malyan/malyan_extui.cpp | 167 + .../{lib => }/mks_ui/SPIFlashStorage.cpp | 24 +- .../extui/{lib => }/mks_ui/SPIFlashStorage.h | 16 +- .../lcd/extui/{lib => }/mks_ui/SPI_TFT.cpp | 10 +- .../src/lcd/extui/{lib => }/mks_ui/SPI_TFT.h | 9 +- .../lcd/extui/{lib => }/mks_ui/draw_about.cpp | 5 +- .../lcd/extui/{lib => }/mks_ui/draw_about.h | 4 +- .../mks_ui/draw_acceleration_settings.cpp | 24 +- .../mks_ui/draw_acceleration_settings.h | 4 +- .../mks_ui/draw_advance_settings.cpp | 11 +- .../{lib => }/mks_ui/draw_advance_settings.h | 4 +- .../draw_auto_level_offset_settings.cpp | 13 +- .../mks_ui/draw_auto_level_offset_settings.h | 4 +- .../{lib => }/mks_ui/draw_baby_stepping.cpp | 42 +- .../{lib => }/mks_ui/draw_baby_stepping.h | 8 +- .../{lib => }/mks_ui/draw_change_speed.cpp | 7 +- .../{lib => }/mks_ui/draw_change_speed.h | 10 +- .../{lib => }/mks_ui/draw_cloud_bind.cpp | 27 +- .../extui/{lib => }/mks_ui/draw_cloud_bind.h | 14 +- .../extui/{lib => }/mks_ui/draw_dialog.cpp | 142 +- .../lcd/extui/{lib => }/mks_ui/draw_dialog.h | 17 +- .../{lib => }/mks_ui/draw_eeprom_settings.cpp | 5 +- .../{lib => }/mks_ui/draw_eeprom_settings.h | 4 +- .../mks_ui/draw_encoder_settings.cpp | 5 +- .../{lib => }/mks_ui/draw_encoder_settings.h | 4 +- .../{lib => }/mks_ui/draw_error_message.cpp | 9 +- .../{lib => }/mks_ui/draw_error_message.h | 4 +- .../extui/{lib => }/mks_ui/draw_extrusion.cpp | 117 +- .../extui/{lib => }/mks_ui/draw_extrusion.h | 14 +- .../lcd/extui/{lib => }/mks_ui/draw_fan.cpp | 66 +- .../src/lcd/extui/{lib => }/mks_ui/draw_fan.h | 6 +- .../{lib => }/mks_ui/draw_filament_change.cpp | 51 +- .../{lib => }/mks_ui/draw_filament_change.h | 8 +- .../mks_ui/draw_filament_settings.cpp | 15 +- .../{lib => }/mks_ui/draw_filament_settings.h | 4 +- .../lcd/extui/{lib => }/mks_ui/draw_gcode.cpp | 21 +- .../lcd/extui/{lib => }/mks_ui/draw_gcode.h | 4 +- .../lcd/extui/{lib => }/mks_ui/draw_home.cpp | 7 +- .../lcd/extui/{lib => }/mks_ui/draw_home.h | 4 +- .../draw_homing_sensitivity_settings.cpp | 27 +- .../mks_ui/draw_homing_sensitivity_settings.h | 4 +- .../{lib => }/mks_ui/draw_jerk_settings.cpp | 15 +- .../{lib => }/mks_ui/draw_jerk_settings.h | 4 +- .../extui/{lib => }/mks_ui/draw_keyboard.cpp | 85 +- .../extui/{lib => }/mks_ui/draw_keyboard.h | 4 +- .../extui/{lib => }/mks_ui/draw_language.cpp | 5 +- .../extui/{lib => }/mks_ui/draw_language.h | 4 +- .../{lib => }/mks_ui/draw_level_settings.cpp | 9 +- .../{lib => }/mks_ui/draw_level_settings.h | 4 +- .../{lib => }/mks_ui/draw_machine_para.cpp | 5 +- .../{lib => }/mks_ui/draw_machine_para.h | 4 +- .../mks_ui/draw_machine_settings.cpp | 5 +- .../{lib => }/mks_ui/draw_machine_settings.h | 4 +- .../{lib => }/mks_ui/draw_manuaLevel.cpp | 13 +- .../extui/{lib => }/mks_ui/draw_manuaLevel.h | 4 +- .../mks_ui/draw_max_feedrate_settings.cpp | 17 +- .../mks_ui/draw_max_feedrate_settings.h | 4 +- .../lcd/extui/mks_ui/draw_media_select.cpp | 73 + .../src/lcd/extui/mks_ui/draw_media_select.h | 33 + .../lcd/extui/{lib => }/mks_ui/draw_more.cpp | 21 +- .../lcd/extui/{lib => }/mks_ui/draw_more.h | 6 +- .../{lib => }/mks_ui/draw_motor_settings.cpp | 5 +- .../{lib => }/mks_ui/draw_motor_settings.h | 4 +- .../{lib => }/mks_ui/draw_move_motor.cpp | 35 +- .../extui/{lib => }/mks_ui/draw_move_motor.h | 6 +- .../src/lcd/extui/mks_ui/draw_number_key.cpp | 540 + .../extui/{lib => }/mks_ui/draw_number_key.h | 4 +- .../extui/{lib => }/mks_ui/draw_operation.cpp | 15 +- .../extui/{lib => }/mks_ui/draw_operation.h | 4 +- .../{lib => }/mks_ui/draw_pause_message.cpp | 9 +- .../{lib => }/mks_ui/draw_pause_message.h | 2 +- .../{lib => }/mks_ui/draw_pause_position.cpp | 13 +- .../{lib => }/mks_ui/draw_pause_position.h | 4 +- .../extui/{lib => }/mks_ui/draw_preHeat.cpp | 181 +- .../lcd/extui/{lib => }/mks_ui/draw_preHeat.h | 12 +- .../{lib => }/mks_ui/draw_print_file.cpp | 20 +- .../extui/{lib => }/mks_ui/draw_print_file.h | 18 +- .../extui/{lib => }/mks_ui/draw_printing.cpp | 101 +- .../extui/{lib => }/mks_ui/draw_printing.h | 22 +- .../src/lcd/extui/mks_ui/draw_ready_print.cpp | 249 + .../extui/{lib => }/mks_ui/draw_ready_print.h | 15 +- .../lcd/extui/{lib => }/mks_ui/draw_set.cpp | 9 +- .../src/lcd/extui/{lib => }/mks_ui/draw_set.h | 4 +- .../{lib => }/mks_ui/draw_step_settings.cpp | 17 +- .../{lib => }/mks_ui/draw_step_settings.h | 4 +- .../mks_ui/draw_tmc_current_settings.cpp | 19 +- .../mks_ui/draw_tmc_current_settings.h | 5 +- .../mks_ui/draw_tmc_step_mode_settings.cpp | 67 +- .../mks_ui/draw_tmc_step_mode_settings.h | 4 +- .../lcd/extui/{lib => }/mks_ui/draw_tool.cpp | 21 +- .../lcd/extui/{lib => }/mks_ui/draw_tool.h | 4 +- .../mks_ui/draw_touch_calibration.cpp | 19 +- .../{lib => }/mks_ui/draw_touch_calibration.h | 6 +- .../draw_tramming_pos_settings.cpp} | 47 +- .../draw_tramming_pos_settings.h} | 4 +- .../lcd/extui/{lib => }/mks_ui/draw_ui.cpp | 379 +- .../src/lcd/extui/{lib => }/mks_ui/draw_ui.h | 106 +- .../lcd/extui/{lib => }/mks_ui/draw_wifi.cpp | 5 +- .../lcd/extui/{lib => }/mks_ui/draw_wifi.h | 9 +- .../extui/{lib => }/mks_ui/draw_wifi_list.cpp | 3 +- .../extui/{lib => }/mks_ui/draw_wifi_list.h | 10 +- .../{lib => }/mks_ui/draw_wifi_settings.cpp | 3 +- .../{lib => }/mks_ui/draw_wifi_settings.h | 4 +- .../extui/{lib => }/mks_ui/draw_wifi_tips.cpp | 5 +- .../extui/{lib => }/mks_ui/draw_wifi_tips.h | 5 +- .../extui/{lib => }/mks_ui/gb2312_puhui16.cpp | 5 +- .../extui/{lib => }/mks_ui/irq_overrid.cpp | 20 +- .../mks_hardware.cpp} | 388 +- .../mks_hardware.h} | 18 +- .../extui/{lib => }/mks_ui/pic_manager.cpp | 46 +- .../lcd/extui/{lib => }/mks_ui/pic_manager.h | 66 +- .../{lib => }/mks_ui/printer_operation.cpp | 69 +- .../{lib => }/mks_ui/printer_operation.h | 6 +- .../extui/{lib => }/mks_ui/tft_Language_en.h | 68 +- .../extui/{lib => }/mks_ui/tft_Language_fr.h | 13 +- .../extui/{lib => }/mks_ui/tft_Language_it.h | 13 +- .../extui/{lib => }/mks_ui/tft_Language_ru.h | 25 +- .../{lib => }/mks_ui/tft_Language_s_cn.h | 17 +- .../extui/{lib => }/mks_ui/tft_Language_sp.h | 15 +- .../{lib => }/mks_ui/tft_Language_t_cn.h | 17 +- .../mks_ui/tft_lvgl_configuration.cpp | 121 +- .../lcd/extui/mks_ui/tft_lvgl_configuration.h | 69 + .../{lib => }/mks_ui/tft_multi_language.cpp | 216 +- .../{lib => }/mks_ui/tft_multi_language.h | 17 +- Marlin/src/lcd/extui/mks_ui/wifiSerial.h | 44 + .../src/lcd/extui/mks_ui/wifiSerial_STM32.cpp | 354 + .../src/lcd/extui/mks_ui/wifiSerial_STM32.h | 63 + .../wifiSerial_STM32F1.cpp} | 25 +- .../wifiSerial_STM32F1.h} | 39 +- .../extui/{lib => }/mks_ui/wifi_module.cpp | 876 +- .../lcd/extui/{lib => }/mks_ui/wifi_module.h | 80 +- .../extui/{lib => }/mks_ui/wifi_upload.cpp | 33 +- .../lcd/extui/{lib => }/mks_ui/wifi_upload.h | 0 .../src/lcd/extui/nextion/FileNavigator.cpp | 174 + Marlin/src/lcd/extui/nextion/FileNavigator.h | 53 + .../src/lcd/extui/nextion/nextion_extui.cpp | 121 + Marlin/src/lcd/extui/nextion/nextion_tft.cpp | 737 ++ Marlin/src/lcd/extui/nextion/nextion_tft.h | 62 + .../src/lcd/extui/nextion/nextion_tft_defs.h | 63 + Marlin/src/lcd/extui/ui_api.cpp | 494 +- Marlin/src/lcd/extui/ui_api.h | 137 +- Marlin/src/lcd/fontutils.cpp | 24 +- Marlin/src/lcd/fontutils.h | 22 + Marlin/src/lcd/language/language_an.h | 351 +- Marlin/src/lcd/language/language_bg.h | 234 +- Marlin/src/lcd/language/language_ca.h | 344 +- Marlin/src/lcd/language/language_cz.h | 1038 +- Marlin/src/lcd/language/language_da.h | 295 +- Marlin/src/lcd/language/language_de.h | 1149 +- Marlin/src/lcd/language/language_el.h | 327 +- Marlin/src/lcd/language/language_el_CY.h | 38 + Marlin/src/lcd/language/language_el_gr.h | 317 +- Marlin/src/lcd/language/language_en.h | 1312 +-- Marlin/src/lcd/language/language_es.h | 1069 +- Marlin/src/lcd/language/language_eu.h | 541 +- Marlin/src/lcd/language/language_fi.h | 179 +- Marlin/src/lcd/language/language_fr.h | 1114 +- Marlin/src/lcd/language/language_gl.h | 1097 +- Marlin/src/lcd/language/language_hr.h | 232 +- Marlin/src/lcd/language/language_hu.h | 1221 +- Marlin/src/lcd/language/language_it.h | 1267 ++- Marlin/src/lcd/language/language_jp_kana.h | 411 +- Marlin/src/lcd/language/language_ko_KR.h | 138 +- Marlin/src/lcd/language/language_nl.h | 338 +- Marlin/src/lcd/language/language_pl.h | 974 +- Marlin/src/lcd/language/language_pt.h | 256 +- Marlin/src/lcd/language/language_pt_br.h | 868 +- Marlin/src/lcd/language/language_ro.h | 1117 +- Marlin/src/lcd/language/language_ru.h | 1640 +-- Marlin/src/lcd/language/language_sk.h | 1265 ++- Marlin/src/lcd/language/language_sv.h | 1231 +- Marlin/src/lcd/language/language_test.h | 204 +- Marlin/src/lcd/language/language_tr.h | 1030 +- Marlin/src/lcd/language/language_uk.h | 1580 +-- Marlin/src/lcd/language/language_vi.h | 790 +- Marlin/src/lcd/language/language_zh_CN.h | 1121 +- Marlin/src/lcd/language/language_zh_TW.h | 888 +- Marlin/src/lcd/lcdprint.cpp | 22 +- Marlin/src/lcd/lcdprint.h | 35 +- Marlin/src/lcd/marlinui.cpp | 2068 ++-- Marlin/src/lcd/marlinui.h | 254 +- Marlin/src/lcd/menu/game/brickout.cpp | 4 +- Marlin/src/lcd/menu/game/game.h | 16 +- Marlin/src/lcd/menu/game/snake.cpp | 4 +- Marlin/src/lcd/menu/game/types.h | 2 +- Marlin/src/lcd/menu/menu.cpp | 32 +- Marlin/src/lcd/menu/menu.h | 35 +- Marlin/src/lcd/menu/menu_advanced.cpp | 168 +- Marlin/src/lcd/menu/menu_backlash.cpp | 24 +- Marlin/src/lcd/menu/menu_bed_corners.cpp | 41 +- Marlin/src/lcd/menu/menu_bed_leveling.cpp | 21 +- Marlin/src/lcd/menu/menu_configuration.cpp | 141 +- Marlin/src/lcd/menu/menu_custom.cpp | 129 - Marlin/src/lcd/menu/menu_delta_calibrate.cpp | 24 +- Marlin/src/lcd/menu/menu_filament.cpp | 21 +- Marlin/src/lcd/menu/menu_info.cpp | 26 +- Marlin/src/lcd/menu/menu_item.h | 40 +- Marlin/src/lcd/menu/menu_led.cpp | 35 +- Marlin/src/lcd/menu/menu_main.cpp | 273 +- Marlin/src/lcd/menu/menu_media.cpp | 29 +- Marlin/src/lcd/menu/menu_mmu2.cpp | 4 +- Marlin/src/lcd/menu/menu_motion.cpp | 144 +- Marlin/src/lcd/menu/menu_password.cpp | 15 +- Marlin/src/lcd/menu/menu_power_monitor.cpp | 2 +- Marlin/src/lcd/menu/menu_probe_offset.cpp | 10 +- Marlin/src/lcd/menu/menu_spindle_laser.cpp | 12 +- Marlin/src/lcd/menu/menu_temperature.cpp | 100 +- Marlin/src/lcd/menu/menu_tmc.cpp | 175 +- Marlin/src/lcd/menu/menu_tramming.cpp | 36 +- Marlin/src/lcd/menu/menu_tune.cpp | 14 +- Marlin/src/lcd/menu/menu_ubl.cpp | 126 +- .../src/lcd/tft/bitmaps/btn_42x39_rounded.bmp | Bin 0 -> 5046 bytes Marlin/src/lcd/tft/canvas.cpp | 2 +- .../lcd/tft/images/btn_rounded_42x39x4.cpp | 69 + Marlin/src/lcd/tft/tft.h | 3 + Marlin/src/lcd/tft/tft_color.h | 14 +- Marlin/src/lcd/tft/tft_image.cpp | 2 + Marlin/src/lcd/tft/tft_image.h | 3 + Marlin/src/lcd/tft/tft_queue.h | 2 +- Marlin/src/lcd/tft/tft_string.cpp | 30 +- Marlin/src/lcd/tft/touch.cpp | 90 +- Marlin/src/lcd/tft/touch.h | 25 +- Marlin/src/lcd/tft/ui_1024x600.cpp | 920 ++ Marlin/src/lcd/tft/ui_1024x600.h | 43 + Marlin/src/lcd/tft/ui_320x240.cpp | 452 +- Marlin/src/lcd/tft/ui_480x320.cpp | 113 +- Marlin/src/lcd/tft/ui_common.cpp | 32 +- Marlin/src/lcd/tft/ui_common.h | 14 +- Marlin/src/lcd/tft_io/st7796s.h | 36 +- Marlin/src/lcd/tft_io/tft_ids.h | 34 + Marlin/src/lcd/tft_io/tft_io.cpp | 69 +- Marlin/src/lcd/tft_io/tft_io.h | 39 +- Marlin/src/lcd/tft_io/touch_calibration.cpp | 15 +- Marlin/src/lcd/tft_io/touch_calibration.h | 5 +- Marlin/src/lcd/thermistornames.h | 2 + Marlin/src/lcd/touch/touch_buttons.cpp | 52 +- Marlin/src/lcd/touch/touch_buttons.h | 14 +- Marlin/src/libs/BL24CXX.cpp | 19 +- Marlin/src/libs/L64XX/L64XX_Marlin.cpp | 249 +- Marlin/src/libs/L64XX/L64XX_Marlin.h | 4 +- Marlin/src/libs/MAX31865.cpp | 500 + Marlin/src/libs/MAX31865.h | 131 + Marlin/src/libs/W25Qxx.cpp | 86 +- Marlin/src/libs/W25Qxx.h | 10 +- Marlin/src/libs/autoreport.h | 7 +- Marlin/src/libs/bresenham.h | 4 +- Marlin/src/libs/buzzer.h | 2 +- Marlin/src/libs/duration_t.h | 7 +- Marlin/src/libs/hex_print.cpp | 2 +- Marlin/src/libs/least_squares_fit.cpp | 26 +- Marlin/src/libs/least_squares_fit.h | 12 +- Marlin/src/libs/nozzle.cpp | 40 +- Marlin/src/libs/nozzle.h | 5 +- Marlin/src/libs/numtostr.cpp | 45 +- Marlin/src/libs/numtostr.h | 50 +- Marlin/src/libs/softspi.h | 10 +- Marlin/src/libs/stopwatch.cpp | 2 +- Marlin/src/libs/vector_3.cpp | 30 +- Marlin/src/libs/vector_3.h | 41 +- Marlin/src/module/delta.cpp | 55 +- Marlin/src/module/delta.h | 21 +- Marlin/src/module/endstops.cpp | 558 +- Marlin/src/module/endstops.h | 110 +- Marlin/src/module/motion.cpp | 1883 ++-- Marlin/src/module/motion.h | 341 +- Marlin/src/module/planner.cpp | 1107 +- Marlin/src/module/planner.h | 259 +- Marlin/src/module/planner_bezier.cpp | 22 +- Marlin/src/module/planner_bezier.h | 2 +- Marlin/src/module/polargraph.cpp | 47 + Marlin/src/module/polargraph.h | 33 + Marlin/src/module/printcounter.cpp | 22 +- Marlin/src/module/probe.cpp | 288 +- Marlin/src/module/probe.h | 78 +- Marlin/src/module/scara.cpp | 295 +- Marlin/src/module/scara.h | 27 +- Marlin/src/module/servo.cpp | 12 +- Marlin/src/module/servo.h | 3 +- Marlin/src/module/settings.cpp | 1899 ++-- Marlin/src/module/settings.h | 44 +- Marlin/src/module/stepper.cpp | 644 +- Marlin/src/module/stepper.h | 172 +- Marlin/src/module/stepper/L64xx.cpp | 21 + Marlin/src/module/stepper/L64xx.h | 60 + Marlin/src/module/stepper/TMC26X.cpp | 18 + Marlin/src/module/stepper/TMC26X.h | 24 + Marlin/src/module/stepper/indirection.cpp | 4 +- Marlin/src/module/stepper/indirection.h | 314 +- Marlin/src/module/stepper/trinamic.cpp | 216 +- Marlin/src/module/stepper/trinamic.h | 109 +- Marlin/src/module/temperature.cpp | 2378 ++-- Marlin/src/module/temperature.h | 595 +- Marlin/src/module/thermistor/thermistor_1.h | 2 +- Marlin/src/module/thermistor/thermistor_10.h | 2 +- .../src/module/thermistor/thermistor_1010.h | 2 +- .../src/module/thermistor/thermistor_1047.h | 2 +- Marlin/src/module/thermistor/thermistor_11.h | 2 +- Marlin/src/module/thermistor/thermistor_110.h | 2 +- Marlin/src/module/thermistor/thermistor_12.h | 2 +- Marlin/src/module/thermistor/thermistor_13.h | 2 +- Marlin/src/module/thermistor/thermistor_147.h | 2 +- Marlin/src/module/thermistor/thermistor_15.h | 2 +- Marlin/src/module/thermistor/thermistor_17.h | 2 +- Marlin/src/module/thermistor/thermistor_18.h | 2 +- Marlin/src/module/thermistor/thermistor_2.h | 2 +- Marlin/src/module/thermistor/thermistor_20.h | 2 +- .../src/module/thermistor/thermistor_2000.h | 60 + Marlin/src/module/thermistor/thermistor_201.h | 2 +- Marlin/src/module/thermistor/thermistor_202.h | 2 +- Marlin/src/module/thermistor/thermistor_21.h | 2 +- Marlin/src/module/thermistor/thermistor_22.h | 2 +- Marlin/src/module/thermistor/thermistor_23.h | 2 +- Marlin/src/module/thermistor/thermistor_3.h | 2 +- Marlin/src/module/thermistor/thermistor_30.h | 2 +- Marlin/src/module/thermistor/thermistor_331.h | 2 +- Marlin/src/module/thermistor/thermistor_332.h | 2 +- Marlin/src/module/thermistor/thermistor_4.h | 2 +- Marlin/src/module/thermistor/thermistor_5.h | 2 +- Marlin/src/module/thermistor/thermistor_501.h | 2 +- Marlin/src/module/thermistor/thermistor_502.h | 2 +- Marlin/src/module/thermistor/thermistor_503.h | 2 +- Marlin/src/module/thermistor/thermistor_51.h | 2 +- Marlin/src/module/thermistor/thermistor_512.h | 2 +- Marlin/src/module/thermistor/thermistor_52.h | 2 +- Marlin/src/module/thermistor/thermistor_55.h | 2 +- Marlin/src/module/thermistor/thermistor_6.h | 2 +- Marlin/src/module/thermistor/thermistor_60.h | 2 +- Marlin/src/module/thermistor/thermistor_61.h | 4 +- Marlin/src/module/thermistor/thermistor_66.h | 2 +- Marlin/src/module/thermistor/thermistor_666.h | 2 +- Marlin/src/module/thermistor/thermistor_67.h | 2 +- Marlin/src/module/thermistor/thermistor_7.h | 2 +- Marlin/src/module/thermistor/thermistor_70.h | 2 +- Marlin/src/module/thermistor/thermistor_71.h | 2 +- Marlin/src/module/thermistor/thermistor_75.h | 2 +- Marlin/src/module/thermistor/thermistor_8.h | 2 +- Marlin/src/module/thermistor/thermistor_9.h | 2 +- Marlin/src/module/thermistor/thermistor_99.h | 3 +- Marlin/src/module/thermistor/thermistor_998.h | 2 +- Marlin/src/module/thermistor/thermistor_999.h | 2 +- Marlin/src/module/thermistor/thermistors.h | 436 +- Marlin/src/module/tool_change.cpp | 275 +- Marlin/src/module/tool_change.h | 24 +- Marlin/src/pins/esp32/env_validate.h | 26 + Marlin/src/pins/esp32/pins_E4D.h | 15 +- Marlin/src/pins/esp32/pins_ESP32.h | 4 +- Marlin/src/pins/esp32/pins_FYSETC_E4.h | 9 +- Marlin/src/pins/esp32/pins_MRR_ESPA.h | 9 +- Marlin/src/pins/esp32/pins_MRR_ESPE.h | 11 +- Marlin/src/pins/esp32/pins_PANDA_M4.h | 38 + Marlin/src/pins/esp32/pins_PANDA_ZHU.h | 61 + Marlin/src/pins/esp32/pins_PANDA_common.h | 98 + Marlin/src/pins/linux/pins_RAMPS_LINUX.h | 70 +- Marlin/src/pins/lpc1768/env_validate.h | 30 + Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h | 21 +- Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h | 4 +- Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h | 10 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h | 85 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h | 253 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h | 306 +- Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h | 114 +- Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h | 34 +- Marlin/src/pins/lpc1768/pins_MKS_SBASE.h | 31 +- Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h | 191 +- Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h | 24 +- Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h | 48 +- Marlin/src/pins/lpc1769/env_validate.h | 26 + Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h | 4 +- Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h | 8 +- .../pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h | 6 +- .../src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h | 117 +- .../pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h | 8 +- .../src/pins/lpc1769/pins_COHESION3D_MINI.h | 4 +- .../src/pins/lpc1769/pins_COHESION3D_REMIX.h | 7 +- Marlin/src/pins/lpc1769/pins_FLY_CDY.h | 20 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN.h | 23 +- Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h | 174 +- Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h | 6 +- Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h | 105 +- Marlin/src/pins/mega/env_validate.h | 32 + Marlin/src/pins/mega/pins_CHEAPTRONIC.h | 4 +- Marlin/src/pins/mega/pins_CHEAPTRONICv2.h | 4 +- Marlin/src/pins/mega/pins_CNCONTROLS_11.h | 5 +- Marlin/src/pins/mega/pins_CNCONTROLS_12.h | 5 +- Marlin/src/pins/mega/pins_CNCONTROLS_15.h | 5 +- Marlin/src/pins/mega/pins_EINSTART-S.h | 5 +- Marlin/src/pins/mega/pins_ELEFU_3.h | 4 +- Marlin/src/pins/mega/pins_GT2560_REV_A.h | 8 +- Marlin/src/pins/mega/pins_GT2560_REV_B.h | 30 + Marlin/src/pins/mega/pins_GT2560_V3.h | 82 +- Marlin/src/pins/mega/pins_GT2560_V3_A20.h | 4 +- Marlin/src/pins/mega/pins_GT2560_V3_MC2.h | 6 +- Marlin/src/pins/mega/pins_GT2560_V4.h | 30 + Marlin/src/pins/mega/pins_GT2560_V4_A20.h | 43 + Marlin/src/pins/mega/pins_HJC2560C_REV2.h | 10 +- Marlin/src/pins/mega/pins_INTAMSYS40.h | 4 +- Marlin/src/pins/mega/pins_LEAPFROG.h | 5 +- Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h | 4 +- Marlin/src/pins/mega/pins_MALYAN_M180.h | 100 + Marlin/src/pins/mega/pins_MEGACONTROLLER.h | 6 +- Marlin/src/pins/mega/pins_MEGATRONICS.h | 4 +- Marlin/src/pins/mega/pins_MEGATRONICS_2.h | 4 +- Marlin/src/pins/mega/pins_MEGATRONICS_3.h | 33 +- Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h | 25 +- Marlin/src/pins/mega/pins_OVERLORD.h | 8 +- Marlin/src/pins/mega/pins_PICA.h | 13 +- Marlin/src/pins/mega/pins_PICAOLD.h | 1 + .../pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h | 77 + Marlin/src/pins/mega/pins_SILVER_GATE.h | 5 +- Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h | 4 +- Marlin/src/pins/pins.h | 271 +- Marlin/src/pins/pinsDebug.h | 135 +- Marlin/src/pins/pinsDebug_list.h | 644 +- Marlin/src/pins/pins_postprocess.h | 727 +- Marlin/src/pins/rambo/env_validate.h | 26 + Marlin/src/pins/rambo/pins_EINSY_RAMBO.h | 38 +- Marlin/src/pins/rambo/pins_EINSY_RETRO.h | 15 +- Marlin/src/pins/rambo/pins_MINIRAMBO.h | 12 +- Marlin/src/pins/rambo/pins_RAMBO.h | 49 +- Marlin/src/pins/rambo/pins_RAMBO_THINKERV2.h | 60 + Marlin/src/pins/rambo/pins_SCOOVO_X9H.h | 4 +- Marlin/src/pins/ramps/env_validate.h | 35 + Marlin/src/pins/ramps/pins_3DRAG.h | 143 +- Marlin/src/pins/ramps/pins_AZTEEG_X3.h | 9 +- Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h | 7 +- Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h | 6 +- Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h | 94 +- Marlin/src/pins/ramps/pins_COPYMASTER_3D.h | 8 +- Marlin/src/pins/ramps/pins_DAGOMA_F5.h | 14 +- .../src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h | 5 +- Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h | 13 +- .../src/pins/ramps/pins_FORMBOT_TREX2PLUS.h | 28 +- Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h | 13 +- Marlin/src/pins/ramps/pins_FYSETC_F6_13.h | 28 +- Marlin/src/pins/ramps/pins_FYSETC_F6_14.h | 17 +- Marlin/src/pins/ramps/pins_K8200.h | 2 +- Marlin/src/pins/ramps/pins_K8400.h | 25 +- Marlin/src/pins/ramps/pins_K8600.h | 40 +- Marlin/src/pins/ramps/pins_K8800.h | 4 +- Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h | 44 +- Marlin/src/pins/ramps/pins_MKS_BASE_10.h | 2 +- Marlin/src/pins/ramps/pins_MKS_BASE_14.h | 2 +- Marlin/src/pins/ramps/pins_MKS_BASE_15.h | 2 +- Marlin/src/pins/ramps/pins_MKS_BASE_16.h | 2 +- Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h | 2 +- Marlin/src/pins/ramps/pins_MKS_GEN_13.h | 69 +- Marlin/src/pins/ramps/pins_ORTUR_4.h | 45 +- Marlin/src/pins/ramps/pins_RAMPS.h | 326 +- Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h | 6 +- Marlin/src/pins/ramps/pins_RAMPS_OLD.h | 10 +- Marlin/src/pins/ramps/pins_RAMPS_PLUS.h | 27 +- Marlin/src/pins/ramps/pins_RAMPS_S_12.h | 4 +- Marlin/src/pins/ramps/pins_RIGIDBOARD.h | 38 +- Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h | 4 +- Marlin/src/pins/ramps/pins_RUMBA.h | 34 +- Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h | 15 +- Marlin/src/pins/ramps/pins_TRIGORILLA_13.h | 13 +- Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h | 7 +- Marlin/src/pins/ramps/pins_TT_OSCAR.h | 39 +- Marlin/src/pins/ramps/pins_ULTIMAIN_2.h | 5 +- Marlin/src/pins/ramps/pins_ULTIMAKER.h | 4 +- Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h | 4 +- Marlin/src/pins/ramps/pins_ZRIB_V20.h | 2 +- Marlin/src/pins/ramps/pins_ZRIB_V52.h | 3 +- Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h | 11 +- Marlin/src/pins/sam/env_validate.h | 33 + Marlin/src/pins/sam/pins_ADSK.h | 22 +- Marlin/src/pins/sam/pins_ALLIGATOR_R2.h | 14 +- Marlin/src/pins/sam/pins_ARCHIM2.h | 4 +- Marlin/src/pins/sam/pins_CNCONTROLS_15D.h | 5 +- Marlin/src/pins/sam/pins_DUE3DOM.h | 13 +- Marlin/src/pins/sam/pins_DUE3DOM_MINI.h | 39 +- Marlin/src/pins/sam/pins_KRATOS32.h | 179 + Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h | 10 +- Marlin/src/pins/sam/pins_RADDS.h | 10 +- Marlin/src/pins/sam/pins_RAMPS4DUE.h | 7 +- Marlin/src/pins/sam/pins_RAMPS_DUO.h | 15 +- Marlin/src/pins/sam/pins_RAMPS_FD_V1.h | 10 +- Marlin/src/pins/sam/pins_RAMPS_SMART.h | 27 +- Marlin/src/pins/sam/pins_RURAMPS4D_11.h | 19 +- Marlin/src/pins/sam/pins_RURAMPS4D_13.h | 19 +- Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h | 23 +- Marlin/src/pins/samd/pins_RAMPS_144.h | 125 +- Marlin/src/pins/sanguino/env_validate.h | 42 + Marlin/src/pins/sanguino/pins_ANET_10.h | 30 +- Marlin/src/pins/sanguino/pins_AZTEEG_X1.h | 2 +- .../src/pins/sanguino/pins_GEN3_MONOLITHIC.h | 5 +- Marlin/src/pins/sanguino/pins_GEN3_PLUS.h | 5 +- Marlin/src/pins/sanguino/pins_GEN6.h | 5 +- Marlin/src/pins/sanguino/pins_GEN7_12.h | 5 +- Marlin/src/pins/sanguino/pins_GEN7_14.h | 5 +- Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h | 5 +- Marlin/src/pins/sanguino/pins_MELZI.h | 17 +- .../src/pins/sanguino/pins_MELZI_CREALITY.h | 38 +- Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h | 2 +- Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h | 15 +- Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h | 17 +- Marlin/src/pins/sanguino/pins_MELZI_V2.h | 20 +- Marlin/src/pins/sanguino/pins_OMCA_A.h | 2 +- .../src/pins/sanguino/pins_SANGUINOLOLU_11.h | 28 +- Marlin/src/pins/sanguino/pins_SETHI.h | 5 +- Marlin/src/pins/sanguino/pins_STB_11.h | 2 +- Marlin/src/pins/sanguino/pins_ZMIB_V2.h | 12 +- Marlin/src/pins/sensitive_pins.h | 345 +- Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h | 1 - Marlin/src/pins/stm32f0/pins_MALYAN_M300.h | 1 - Marlin/src/pins/stm32f1/env_validate.h | 26 + Marlin/src/pins/stm32f1/pins_BEAST.h | 30 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h | 22 +- Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h | 27 +- .../pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h | 11 +- .../pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h | 5 + .../stm32f1/pins_BTT_SKR_MINI_E3_common.h | 90 +- .../pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h | 2 +- .../src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h | 130 +- .../src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h | 83 +- Marlin/src/pins/stm32f1/pins_CHITU3D.h | 42 +- Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h | 167 +- Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h | 174 +- Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h | 36 + Marlin/src/pins/stm32f1/pins_CHITU3D_common.h | 177 + Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h | 36 + Marlin/src/pins/stm32f1/pins_CREALITY_V4.h | 95 +- Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h | 96 +- Marlin/src/pins/stm32f1/pins_CREALITY_V427.h | 1 + Marlin/src/pins/stm32f1/pins_CREALITY_V431.h | 20 +- Marlin/src/pins/stm32f1/pins_CREALITY_V452.h | 3 +- Marlin/src/pins/stm32f1/pins_CREALITY_V453.h | 3 +- Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h | 5 +- .../src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h | 195 + Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h | 53 +- Marlin/src/pins/stm32f1/pins_FLY_MINI.h | 126 +- Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h | 4 +- Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h | 76 +- .../pins/stm32f1/pins_FYSETC_CHEETAH_V12.h | 7 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI.h | 22 +- Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h | 22 +- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h | 29 +- Marlin/src/pins/stm32f1/pins_GTM32_PRO_VD.h | 30 + Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h | 24 +- .../src/pins/stm32f1/pins_JGAURORA_A5S_A1.h | 47 +- Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h | 73 +- Marlin/src/pins/stm32f1/pins_MALYAN_M200.h | 8 +- .../pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h | 31 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h | 53 +- .../pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h | 2 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h | 132 +- .../src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h | 2 +- .../pins/stm32f1/pins_MKS_ROBIN_E3_common.h | 142 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h | 25 +- .../src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h | 12 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h | 22 +- Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h | 180 +- .../src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h | 108 +- .../pins/stm32f1/pins_MKS_ROBIN_NANO_common.h | 210 + Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h | 88 +- Marlin/src/pins/stm32f1/pins_MORPHEUS.h | 6 +- Marlin/src/pins/stm32f1/pins_STM32F1R.h | 4 +- Marlin/src/pins/stm32f1/pins_STM3R_MINI.h | 6 +- Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h | 57 +- Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h | 235 + Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h | 356 + Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h | 329 + Marlin/src/pins/stm32f4/env_validate.h | 28 + Marlin/src/pins/stm32f4/pins_ANET_ET4.h | 25 +- Marlin/src/pins/stm32f4/pins_ANET_ET4P.h | 1 - Marlin/src/pins/stm32f4/pins_ARMED.h | 15 +- .../src/pins/stm32f4/pins_BLACK_STM32F407VE.h | 7 +- .../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 161 +- Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h | 379 + Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h | 205 +- .../pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h | 39 + .../src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h | 35 + .../src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h | 35 + .../pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 549 + .../pins/stm32f4/pins_BTT_SKR_PRO_common.h | 304 +- .../pins/stm32f4/pins_BTT_SKR_V2_0_REV_A.h | 29 + .../pins/stm32f4/pins_BTT_SKR_V2_0_REV_B.h | 26 + .../pins/stm32f4/pins_BTT_SKR_V2_0_common.h | 526 + Marlin/src/pins/stm32f4/pins_FLYF407ZG.h | 136 +- .../pins/stm32f4/pins_FYSETC_CHEETAH_V20.h | 119 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6.h | 164 +- Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h | 1 - Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h | 123 + Marlin/src/pins/stm32f4/pins_INDEX_REV03.h | 157 + Marlin/src/pins/stm32f4/pins_LERDGE_K.h | 167 +- Marlin/src/pins/stm32f4/pins_LERDGE_S.h | 101 +- Marlin/src/pins/stm32f4/pins_LERDGE_X.h | 81 +- Marlin/src/pins/stm32f4/pins_MKS_EAGLE.h | 35 + Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h | 385 + Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h | 6 +- .../stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h | 45 + .../src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h | 293 +- .../stm32f4/pins_MKS_ROBIN_NANO_V3_common.h | 375 + .../src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h | 219 +- Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h | 1 - Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h | 67 + Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h | 3 - Marlin/src/pins/stm32f4/pins_RUMBA32_common.h | 30 +- .../src/pins/stm32f4/pins_STEVAL_3DP001V1.h | 13 +- .../pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h | 261 + Marlin/src/pins/stm32f4/pins_VAKE403D.h | 23 +- Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h | 16 +- Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h | 236 + Marlin/src/pins/teensy2/env_validate.h | 28 + Marlin/src/pins/teensy2/pins_5DPRINT.h | 4 +- Marlin/src/pins/teensy2/pins_BRAINWAVE.h | 2 +- Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h | 4 +- Marlin/src/pins/teensy2/pins_PRINTRBOARD.h | 12 +- .../src/pins/teensy2/pins_PRINTRBOARD_REVF.h | 12 +- Marlin/src/pins/teensy2/pins_SAV_MKI.h | 4 +- Marlin/src/pins/teensy2/pins_TEENSY2.h | 4 +- Marlin/src/pins/teensy2/pins_TEENSYLU.h | 4 + Marlin/src/sd/Sd2Card.cpp | 63 +- Marlin/src/sd/Sd2Card.h | 127 +- Marlin/src/sd/Sd2Card_sdio.h | 34 +- Marlin/src/sd/SdBaseFile.cpp | 211 +- Marlin/src/sd/SdBaseFile.h | 64 +- Marlin/src/sd/SdFatConfig.h | 2 +- Marlin/src/sd/SdFatStructs.h | 8 +- Marlin/src/sd/SdFatUtil.cpp | 2 +- Marlin/src/sd/SdFile.cpp | 6 +- Marlin/src/sd/SdFile.h | 9 +- Marlin/src/sd/SdVolume.cpp | 16 +- Marlin/src/sd/SdVolume.h | 35 +- Marlin/src/sd/cardreader.cpp | 338 +- Marlin/src/sd/cardreader.h | 157 +- Marlin/src/sd/disk_io_driver.h | 67 + .../sd/usb_flashdrive/Sd2Card_FlashDrive.cpp | 40 +- .../sd/usb_flashdrive/Sd2Card_FlashDrive.h | 32 +- .../src/sd/usb_flashdrive/lib-uhs2/README.txt | 5 +- Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp | 14 +- .../src/sd/usb_flashdrive/lib-uhs2/UsbCore.h | 22 +- .../usb_flashdrive/lib-uhs2/confdescparser.h | 2 +- .../sd/usb_flashdrive/lib-uhs2/masstorage.cpp | 10 +- .../sd/usb_flashdrive/lib-uhs2/masstorage.h | 5 +- .../src/sd/usb_flashdrive/lib-uhs2/max3421e.h | 2 +- .../src/sd/usb_flashdrive/lib-uhs2/printhex.h | 12 +- .../src/sd/usb_flashdrive/lib-uhs2/settings.h | 2 +- .../sd/usb_flashdrive/lib-uhs2/usbhost.cpp | 6 +- .../src/sd/usb_flashdrive/lib-uhs2/usbhost.h | 4 +- .../src/sd/usb_flashdrive/lib-uhs3/README.txt | 4 +- .../lib-uhs3/UHS_host/UHS_UsbCore.h | 2 +- .../lib-uhs3/UHS_host/UHS_host_INLINE.h | 16 +- .../lib-uhs3/UHS_host/UHS_macros.h | 2 +- .../lib-uhs3/UHS_host/UHS_printhex.h | 12 +- .../lib-uhs3/UHS_host/UHS_usbhost.h | 14 +- .../UHS_host/USB_HOST_SHIELD/UHS_max3421e.h | 12 +- .../USB_HOST_SHIELD/USB_HOST_SHIELD.h | 10 +- .../USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h | 12 +- .../lib-uhs3/UHS_host/macro_logic.h | 2 +- README.md | 139 +- buildroot/bin/build_all_examples | 101 + buildroot/bin/build_example | 29 + buildroot/bin/generate_version | 60 +- buildroot/{share/git => bin}/mftest | 132 +- buildroot/bin/opt_disable | 12 +- buildroot/bin/opt_enable | 12 +- buildroot/bin/opt_find | 33 + buildroot/bin/opt_set | 17 +- buildroot/bin/pins_set | 14 +- buildroot/{tests => bin}/run_tests | 16 +- buildroot/bin/uncrust | 11 +- .../share/PlatformIO/boards/fysetc_f6.json | 34 - ...{LERDGE.json => marlin_BTT_SKR_SE_BX.json} | 41 +- ...Btt002.json => marlin_BigTree_BTT002.json} | 2 +- ...GTR_v1.json => marlin_BigTree_GTR_v1.json} | 2 +- .../marlin_BigTree_Octopus_Pro_v1_F429.json | 50 + .../boards/marlin_BigTree_Octopus_v1.json | 35 + ...R_Pro.json => marlin_BigTree_SKR_Pro.json} | 2 +- ...CHITU_F103.json => marlin_CHITU_F103.json} | 3 +- ...20.json => marlin_FYSETC_CHEETAH_V20.json} | 5 +- .../{MEEB_3DP.json => marlin_MEEB_3DP.json} | 2 +- ...VE.json => marlin_STEVAL_STM32F401VE.json} | 5 +- ...GT6.json => marlin_STM32F407VGT6_CCM.json} | 0 ...YF407ZG.json => marlin_STM32F407ZGT6.json} | 5 +- .../{archim.json => marlin_archim.json} | 2 +- ...90usb1286.json => marlin_at90usb1286.json} | 0 ...T6.json => marlin_blackSTM32F407VET6.json} | 4 +- .../boards/marlin_index_mobo_rev03.json | 51 + ...malyanM200.json => marlin_malyanM200.json} | 0 ...anM200v2.json => marlin_malyanM200v2.json} | 0 ...I_512K.ld => STM32F103RE_SKR_MINI_512K.ld} | 0 ...RE_SKR_E3_DIP.ld => ZONESTAR_ZM3E_256K.ld} | 2 +- .../ldscripts/ZONESTAR_ZM3E_512K.ld | 14 + .../PlatformIO/ldscripts/eryone_ery32_mini.ld | 14 + .../scripts/SAMD51_grandcentral_m4.py | 19 + .../PlatformIO/scripts/STEVAL__F401XX.py | 9 - .../scripts/STM32F103RC_MEEB_3DP.py | 11 +- .../scripts/STM32F103RC_SKR_MINI.py | 20 - .../PlatformIO/scripts/STM32F103RC_fysetc.py | 22 +- .../scripts/STM32F103RE_SKR_E3_DIP.py | 16 - .../PlatformIO/scripts/STM32F103VE_longer.py | 33 - .../scripts/STM32F1_create_variant.py | 22 +- .../share/PlatformIO/scripts/add_nanolib.py | 3 + .../PlatformIO/scripts/anet_et4_openblt.py | 14 - .../share/PlatformIO/scripts/chitu_crypt.py | 29 +- .../PlatformIO/scripts/common-cxxflags.py | 33 +- .../PlatformIO/scripts/common-dependencies.h | 11 +- .../PlatformIO/scripts/common-dependencies.py | 104 +- .../copy_marlin_variant_to_framework.py | 58 - .../share/PlatformIO/scripts/creality.py | 17 - .../share/PlatformIO/scripts/custom_board.py | 16 + .../PlatformIO/scripts/download_mks_assets.py | 23 +- buildroot/share/PlatformIO/scripts/exc.S | 104 + .../scripts/fix_framework_weakness.py | 32 + .../share/PlatformIO/scripts/fly_mini.py | 16 - .../PlatformIO/scripts/fysetc_cheetah_v20.py | 9 - .../scripts/generic_create_variant.py | 53 +- .../jgaurora_a5s_a1_with_bootloader.py | 51 +- buildroot/share/PlatformIO/scripts/lerdge.py | 71 +- buildroot/share/PlatformIO/scripts/marlin.py | 71 + .../share/PlatformIO/scripts/mks_encrypt.py | 32 - .../share/PlatformIO/scripts/mks_robin.py | 44 +- .../share/PlatformIO/scripts/mks_robin_e3.py | 45 +- .../share/PlatformIO/scripts/mks_robin_e3p.py | 45 +- .../PlatformIO/scripts/mks_robin_lite.py | 45 +- .../PlatformIO/scripts/mks_robin_lite3.py | 45 +- .../PlatformIO/scripts/mks_robin_mini.py | 45 +- .../PlatformIO/scripts/mks_robin_nano.py | 45 +- .../PlatformIO/scripts/mks_robin_nano35.py | 45 +- .../share/PlatformIO/scripts/mks_robin_pro.py | 44 +- .../PlatformIO/scripts/offset_and_rename.py | 61 + buildroot/share/PlatformIO/scripts/openblt.py | 18 + buildroot/share/PlatformIO/scripts/pioutil.py | 8 + .../PlatformIO/scripts/preflight-checks.py | 101 + .../share/PlatformIO/scripts/random-bin.py | 4 + buildroot/share/PlatformIO/scripts/robin.py | 12 + .../share/PlatformIO/scripts/simulator.py | 52 + .../PlatformIO/scripts/stm32_bootloader.py | 30 - .../PlatformIO/scripts/stm32_serialbuffer.py | 59 + .../{archim => MARLIN_ARCHIM}/.gitignore | 0 .../build_gcc/Makefile | 0 .../build_gcc/debug.mk | 0 .../build_gcc/gcc.mk | 0 .../build_gcc/libvariant_arduino_due_x.mk | 0 .../build_gcc/release.mk | 0 .../debug_scripts/gcc/arduino_due_x_flash.gdb | 0 .../debug_scripts/gcc/arduino_due_x_sram.gdb | 0 .../debug_scripts/iar/arduino_due_flash.mac | 0 .../debug_scripts/iar/arduino_due_sram.mac | 0 .../libsam_sam3x8e_gcc_rel.a | Bin .../libsam_sam3x8e_gcc_rel.a.txt | 0 .../linker_scripts/gcc/flash.ld | 0 .../linker_scripts/gcc/sram.ld | 0 .../linker_scripts/iar/flash.icf | 0 .../linker_scripts/iar/sram.icf | 0 .../{archim => MARLIN_ARCHIM}/pins_arduino.h | 0 .../{archim => MARLIN_ARCHIM}/variant.cpp | 0 .../{archim => MARLIN_ARCHIM}/variant.h | 0 .../PeripheralPins.c | 52 +- .../PinNamesVar.h | 0 .../MARLIN_BIGTREE_BTT002/hal_conf_extra.h | 52 + .../ldscript.ld | 2 +- .../variant.cpp | 0 .../variant.h | 7 +- .../MARLIN_BIGTREE_E3_RRF/PeripheralPins.c | 363 + .../PinNamesVar.h | 0 .../hal_conf_extra.h | 6 +- .../ldscript.ld | 2 +- .../variant.cpp | 0 .../variants/MARLIN_BIGTREE_E3_RRF/variant.h | 292 + .../PeripheralPins.c | 81 +- .../PinNamesVar.h | 0 .../MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h | 52 + .../ldscript.ld | 2 +- .../variant.cpp | 0 .../variant.h | 4 +- .../PeripheralPins.c | 433 + .../PinNamesVar.h | 30 + .../hal_conf_extra.h | 7 +- .../ldscript.ld | 209 + .../variant.cpp | 233 + .../variant.h | 216 + .../PeripheralPins.c | 435 + .../MARLIN_BIGTREE_OCTOPUS_V1/PinNamesVar.h | 30 + .../hal_conf_extra.h | 7 +- .../MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld | 187 + .../MARLIN_BIGTREE_OCTOPUS_V1/variant.cpp | 239 + .../MARLIN_BIGTREE_OCTOPUS_V1/variant.h | 216 + .../PeripheralPins.c | 2 - .../PinNamesVar.h | 0 .../hal_conf_extra.h | 52 + .../MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld | 204 + .../MARLIN_BIGTREE_SKR_PRO_11/variant.cpp | 260 + .../variant.h | 4 +- .../MARLIN_BTT_SKR_SE_BX/PeripheralPins.c | 473 + .../MARLIN_BTT_SKR_SE_BX/PinNamesVar.h | 50 + .../MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h | 479 + .../variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld | 208 + .../variants/MARLIN_BTT_SKR_SE_BX/variant.cpp | 332 + .../variants/MARLIN_BTT_SKR_SE_BX/variant.h | 222 + .../variants/MARLIN_F103Rx/PeripheralPins.c | 423 + .../variants/MARLIN_F103Rx/PinNamesVar.h | 30 + .../variants/MARLIN_F103Rx/ldscript.ld | 200 + .../variants/MARLIN_F103Rx/variant.cpp | 152 + .../variants/MARLIN_F103Rx/variant.h | 175 + .../MARLIN_F103VE_LONGER/PeripheralPins.c | 264 + .../MARLIN_F103VE_LONGER/PinNamesVar.h | 32 + .../MARLIN_F103VE_LONGER/hal_conf_custom.h | 320 + .../variants/MARLIN_F103VE_LONGER/ldscript.ld | 189 + .../variants/MARLIN_F103VE_LONGER/variant.cpp | 249 + .../variants/MARLIN_F103VE_LONGER/variant.h | 175 + .../variants/MARLIN_F103Vx/PeripheralPins.c | 168 +- .../variants/MARLIN_F103Vx/ldscript.ld | 2 +- .../variants/MARLIN_F103Vx/variant.h | 8 +- .../variants/MARLIN_F103Zx/PeripheralPins.c | 158 +- .../variants/MARLIN_F103Zx/PinNamesVar.h | 3 +- .../variants/MARLIN_F103Zx/hal_conf_custom.h | 48 +- .../variants/MARLIN_F103Zx/ldscript.ld | 2 +- .../variants/MARLIN_F407VE/hal_conf_custom.h | 74 +- .../variants/MARLIN_F407VE/ldscript.ld | 2 +- .../variants/MARLIN_F407VE/variant.h | 2 +- .../variants/MARLIN_F446VE/PeripheralPins.c | 426 + .../variants/MARLIN_F446VE/PinNamesVar.h | 30 + .../variants/MARLIN_F446VE/ldscript.ld | 184 + .../variants/MARLIN_F446VE/variant.cpp | 212 + .../variants/MARLIN_F446VE/variant.h | 186 + .../variants/MARLIN_F4x7Vx/PeripheralPins.c | 270 +- .../variants/MARLIN_F4x7Vx/hal_conf_extra.h | 75 +- .../variants/MARLIN_F4x7Vx/ldscript.ld | 8 +- .../variants/MARLIN_F4x7Vx/variant.h | 8 +- .../PeripheralPins.c | 0 .../PinNamesVar.h | 0 .../ldscript.ld | 2 +- .../variant.cpp | 0 .../variant.h | 3 +- .../PeripheralPins.c | 46 +- .../PinNamesVar.h | 0 .../hal_conf_custom.h | 73 +- .../ldscript.ld | 4 +- .../variant.cpp | 0 .../variant.h | 2 +- .../MARLIN_FYSETC_S6/PeripheralPins.c | 306 +- .../variants/MARLIN_FYSETC_S6/ldscript.ld | 6 +- .../PeripheralPins.c | 36 +- .../variants/MARLIN_LERDGE/PinNamesVar.h | 50 + .../MARLIN_LERDGE/ldscript.ld} | 8 +- .../{LERDGE => MARLIN_LERDGE}/variant.cpp | 0 .../{LERDGE => MARLIN_LERDGE}/variant.h | 50 +- .../pins_arduino.h | 16 +- .../MARLIN_STEVAL_F401VE/PeripheralPins.c | 260 + .../PinNamesVar.h | 0 .../hal_conf_custom.h | 71 +- .../ldscript.ld | 2 +- .../variant.cpp | 0 .../variant.h | 0 .../PeripheralPins.c | 314 + .../MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h | 50 + .../hal_conf_extra.h | 496 + .../MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld | 203 + .../MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp | 177 + .../MARLIN_TH3D_EZBOARD_LITE_V2/variant.h | 148 + .../variants/MEEB_3DP/ld/mem-flash.inc | 5 - .../variants/STEVAL_F401VE/PeripheralPins.c | 274 - .../board.cpp | 0 .../board/board.h | 0 .../ld/common.inc | 0 .../ld/extra_libs.inc | 0 .../marlin_CHITU_F103/ld/flash.ld} | 0 .../ld/stm32f103z_dfu.ld | 0 .../ld/stm32f103zc.ld | 0 .../ld/stm32f103zd.ld | 0 .../ld/stm32f103ze.ld | 0 .../ld/vector_symbols.inc | 0 .../pins_arduino.h | 0 .../variant.h | 0 .../wirish/boards.cpp | 2 +- .../wirish/boards_setup.cpp | 0 .../wirish/start.S | 0 .../wirish/start_c.c | 0 .../wirish/syscalls.c | 0 .../{MEEB_3DP => marlin_MEEB_3DP}/board.cpp | 0 .../board/board.h | 0 .../ld/bootloader.ld | 0 .../ld/common.inc | 0 .../ld/extra_libs.inc | 0 .../{MEEB_3DP => marlin_MEEB_3DP}/ld/flash.ld | 0 .../{MEEB_3DP => marlin_MEEB_3DP}/ld/jtag.ld | 0 .../variants/marlin_MEEB_3DP/ld/mem-flash.inc | 5 + .../ld/mem-jtag.inc | 0 .../ld/mem-ram.inc | 0 .../{MEEB_3DP => marlin_MEEB_3DP}/ld/ram.ld | 0 .../ld/stm32f103rb.ld | 0 .../ld/stm32f103rb_bootloader.ld | 0 .../ld/stm32f103rc.ld | 0 .../ld/stm32f103rc_bootloader.ld | 0 .../ld/stm32f103re.ld | 0 .../ld/vector_symbols.inc | 0 .../pins_arduino.h | 0 .../{MEEB_3DP => marlin_MEEB_3DP}/variant.h | 0 .../wirish/boards.cpp | 2 +- .../wirish/boards_setup.cpp | 0 .../wirish/start.S | 0 .../wirish/start_c.c | 0 .../wirish/syscalls.c | 0 buildroot/share/extras/header.h | 2 +- buildroot/share/fonts/buildhzk.py | 64 + buildroot/share/fonts/genallfont.sh | 8 +- buildroot/share/fonts/genpages.c | 4 +- buildroot/share/fonts/marlin-10x20.bdf | 4104 +++++++ buildroot/share/fonts/marlin-12x24.bdf | 4558 ++++++++ buildroot/share/fonts/marlin-14x28.bdf | 5078 +++++++++ buildroot/share/fonts/marlin-16x32.bdf | 5492 +++++++++ buildroot/share/fonts/marlin-20x40.bdf | 6458 +++++++++++ buildroot/share/fonts/marlin-24x48.bdf | 6462 +++++++++++ buildroot/share/fonts/marlin-28x56.bdf | 7311 ++++++++++++ buildroot/share/fonts/marlin-32x64.bdf | 9870 +++++++++++++++++ buildroot/share/fonts/marlin-8x16.bdf | 3701 ++++++ buildroot/share/fonts/uxggenpages.sh | 2 +- buildroot/share/git/mfconfig | 30 +- buildroot/share/git/mfqp | 5 +- buildroot/share/scripts/config-labels.py | 3 +- .../scripts/createTemperatureLookupMarlin.py | 5 +- .../share/scripts/findMissingTranslations.sh | 40 +- buildroot/share/scripts/g29_auto.py | 2 +- buildroot/share/scripts/gen-tft-image.py | 64 + buildroot/share/vscode/auto_build.py | 7 +- .../create_custom_upload_command_CDC.py | 10 +- .../create_custom_upload_command_DFU.py | 3 +- buildroot/tests/{ARMED-tests => ARMED} | 4 +- buildroot/tests/BIGTREE_BTT002 | 26 + buildroot/tests/BIGTREE_BTT002-tests | 20 - buildroot/tests/BIGTREE_GTR_V1_0 | 39 + buildroot/tests/BIGTREE_GTR_V1_0-tests | 60 - .../tests/BIGTREE_GTR_V1_0_usb_flash_drive | 24 + buildroot/tests/BIGTREE_SKR_PRO | 33 + buildroot/tests/BIGTREE_SKR_PRO-tests | 41 - buildroot/tests/BTT_SKR_SE_BX | 18 + buildroot/tests/{DUE-tests => DUE} | 36 +- .../tests/{DUE_archim-tests => DUE_archim} | 0 .../tests/{FLYF407ZG-tests => FLYF407ZG} | 5 +- .../tests/{FYSETC_F6-tests => FYSETC_F6} | 43 +- .../tests/{FYSETC_S6-tests => FYSETC_S6} | 5 +- buildroot/tests/Index_Mobo_Rev03 | 13 + buildroot/tests/LERDGEK | 18 + buildroot/tests/{LERDGEX-tests => LERDGEX} | 3 +- buildroot/tests/{LPC1768-tests => LPC1768} | 37 +- buildroot/tests/{LPC1769-tests => LPC1769} | 20 +- .../{NUCLEO_F767ZI-tests => NUCLEO_F767ZI} | 5 +- .../tests/{REMRAM_V1-tests => REMRAM_V1} | 0 ...entral_m4-tests => SAMD51_grandcentral_m4} | 22 +- ...F070CB_malyan-tests => STM32F070CB_malyan} | 3 +- ...F070RB_malyan-tests => STM32F070RB_malyan} | 0 ...F103CB_malyan-tests => STM32F103CB_malyan} | 0 ...{STM32F103RC_btt-tests => STM32F103RC_btt} | 11 +- ...03RC_btt_USB-tests => STM32F103RC_btt_USB} | 4 +- buildroot/tests/STM32F103RC_btt_USB_maple | 17 + buildroot/tests/STM32F103RC_btt_maple | 20 + ..._fysetc-tests => STM32F103RC_fysetc_maple} | 0 ...TM32F103RC_meeb-tests => STM32F103RC_meeb} | 9 +- .../tests/{STM32F103RE-tests => STM32F103RE} | 6 +- buildroot/tests/STM32F103RET6_creality | 38 + buildroot/tests/STM32F103RET6_creality-tests | 30 - buildroot/tests/STM32F103RE_btt | 19 + buildroot/tests/STM32F103RE_btt-tests | 21 - ...03RE_btt_USB-tests => STM32F103RE_btt_USB} | 9 +- buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple | 14 + ...F103VE_longer-tests => STM32F103VE_longer} | 0 buildroot/tests/STM32F103VE_longer_maple | 23 + ...F401VE_STEVAL-tests => STM32F401VE_STEVAL} | 3 +- ...32F407VE_black-tests => STM32F407VE_black} | 0 ...{at90usb1286_cdc-tests => at90usb1286_cdc} | 0 ...{at90usb1286_dfu-tests => at90usb1286_dfu} | 0 buildroot/tests/chitu_f103 | 16 + buildroot/tests/esp32 | 30 + buildroot/tests/esp32-tests | 41 - ...ora_a5s_a1-tests => jgaurora_a5s_a1_maple} | 0 .../{linux_native-tests => linux_native} | 3 +- .../tests/{malyan_M300-tests => malyan_M300} | 0 buildroot/tests/{mega1280-tests => mega1280} | 23 +- buildroot/tests/{mega2560-tests => mega2560} | 138 +- .../{mks_robin_stm32-tests => mks_robin} | 0 ..._robin_lite-tests => mks_robin_lite_maple} | 6 +- .../{mks_robin-tests => mks_robin_maple} | 3 +- .../{mks_robin_mini-tests => mks_robin_mini} | 4 +- ...in_nano35_stm32-tests => mks_robin_nano35} | 37 +- ...in_nano35-tests => mks_robin_nano35_maple} | 10 +- ...ks_robin_pro-tests => mks_robin_pro_maple} | 12 +- buildroot/tests/{rambo-tests => rambo} | 97 +- buildroot/tests/{rumba32-tests => rumba32} | 18 +- .../{sanguino1284p-tests => sanguino1284p} | 6 +- .../{sanguino644p-tests => sanguino644p} | 0 buildroot/tests/{teensy31-tests => teensy31} | 17 +- buildroot/tests/{teensy35-tests => teensy35} | 54 +- buildroot/tests/{teensy41-tests => teensy41} | 45 +- .../web-ui/data}/www/bootstrap.min.css | 0 .../web-ui/data}/www/bootstrap.min.js | 0 .../web-ui/data}/www/bootstrap4-toggle.min.js | 0 .../web-ui/data}/www/chart.lineargauge.js | 0 buildroot/web-ui/data/www/chart.min.js | 7 + .../web-ui/data}/www/filesaver.min.js | 0 .../web-ui/data}/www/index-ie.html | 0 .../web-ui/data}/www/index.html | 0 .../web-ui/data}/www/jquery-3.5.1.slim.min.js | 0 .../web-ui/data}/www/jquery.browser.min.js | 0 .../web-ui/data}/www/marlin-logo-dark.png | Bin .../web-ui/data}/www/marlinui.eot | Bin .../web-ui/data}/www/marlinui.svg | 0 .../web-ui/data}/www/marlinui.ttf | Bin .../web-ui/data}/www/marlinui.woff | Bin .../web-ui/data}/www/moment.min.js | 0 .../web-ui/data}/www/webmarlin-class.js | 0 .../web-ui/data}/www/webmarlin-font.css | 0 .../web-ui/data}/www/webmarlin.css | 0 .../web-ui/data}/www/webmarlin.js | 0 config/README.md | 8 +- data/www/chart.min.js | 7 - docs/Queue.md | 59 + docs/Serial.md | 46 +- ini/avr.ini | 175 + ini/due.ini | 43 + ini/esp32.ini | 39 + ini/features.ini | 234 + ini/lpc176x.ini | 44 + ini/native.ini | 133 + ini/samd51.ini | 26 + ini/stm32-common.ini | 40 + ini/stm32f0.ini | 54 + ini/stm32f1-maple.ini | 421 + ini/stm32f1.ini | 421 + ini/stm32f4.ini | 559 + ini/stm32f7.ini | 39 + ini/stm32h7.ini | 41 + ini/teensy.ini | 51 + platformio.ini | 1478 +-- 1967 files changed, 180527 insertions(+), 59125 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/workflows/bump-date.yml create mode 100644 .github/workflows/check-pr.yml create mode 100644 .github/workflows/clean-closed.yml create mode 100644 .github/workflows/close-stale.yml create mode 100644 .github/workflows/lock-closed.yml create mode 100644 .github/workflows/unlock-reopened.yml create mode 100644 Marlin/src/HAL/AVR/MarlinSPI.h delete mode 100644 Marlin/src/HAL/DUE/DebugMonitor.cpp create mode 100644 Marlin/src/HAL/DUE/HAL_MinSerial.cpp create mode 100644 Marlin/src/HAL/DUE/MarlinSPI.h create mode 100644 Marlin/src/HAL/ESP32/MarlinSPI.h create mode 100644 Marlin/src/HAL/ESP32/esp32.csv create mode 100644 Marlin/src/HAL/LINUX/MarlinSPI.h delete mode 100644 Marlin/src/HAL/LPC1768/DebugMonitor.cpp create mode 100644 Marlin/src/HAL/LPC1768/HAL_MinSerial.cpp create mode 100644 Marlin/src/HAL/NATIVE_SIM/HAL.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/fastio.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_adv.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_post.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/pinsDebug.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/servo_private.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/spi_pins.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/timers.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp create mode 100644 Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp create mode 100644 Marlin/src/HAL/NATIVE_SIM/watchdog.h create mode 100644 Marlin/src/HAL/SAMD51/MarlinSPI.h create mode 100644 Marlin/src/HAL/STM32/HAL_MinSerial.cpp create mode 100644 Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp create mode 100644 Marlin/src/HAL/STM32/eeprom_if_iic.cpp create mode 100644 Marlin/src/HAL/STM32/tft/gt911.cpp create mode 100644 Marlin/src/HAL/STM32/tft/gt911.h create mode 100644 Marlin/src/HAL/STM32/tft/tft_ltdc.cpp create mode 100644 Marlin/src/HAL/STM32/tft/tft_ltdc.h create mode 100644 Marlin/src/HAL/STM32F1/HAL_MinSerial.cpp create mode 100644 Marlin/src/HAL/TEENSY31_32/MarlinSPI.h create mode 100644 Marlin/src/HAL/TEENSY35_36/MarlinSPI.h create mode 100644 Marlin/src/HAL/TEENSY40_41/MarlinSPI.h create mode 100644 Marlin/src/HAL/shared/Delay.cpp create mode 100644 Marlin/src/HAL/shared/HAL_MinSerial.cpp create mode 100644 Marlin/src/HAL/shared/HAL_MinSerial.h create mode 100644 Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp create mode 100644 Marlin/src/HAL/shared/cpu_exception/exception_hook.cpp create mode 100644 Marlin/src/HAL/shared/cpu_exception/exception_hook.h create mode 100644 Marlin/src/core/bug_on.h create mode 100644 Marlin/src/feature/ammeter.cpp create mode 100644 Marlin/src/feature/ammeter.h create mode 100644 Marlin/src/feature/bedlevel/hilbert_curve.cpp create mode 100644 Marlin/src/feature/bedlevel/hilbert_curve.h create mode 100644 Marlin/src/feature/cooler.cpp create mode 100644 Marlin/src/feature/cooler.h create mode 100644 Marlin/src/feature/stepper_driver_safety.cpp create mode 100644 Marlin/src/feature/stepper_driver_safety.h mode change 100755 => 100644 Marlin/src/gcode/bedlevel/G35.cpp create mode 100644 Marlin/src/gcode/config/M309.cpp create mode 100644 Marlin/src/gcode/control/M10-M11.cpp create mode 100644 Marlin/src/gcode/control/M282.cpp create mode 100644 Marlin/src/gcode/host/M154.cpp create mode 100644 Marlin/src/gcode/lcd/M256.cpp create mode 100644 Marlin/src/gcode/temp/M143_M193.cpp create mode 100644 Marlin/src/inc/Warnings.cpp create mode 100644 Marlin/src/lcd/dogm/fontdata/langdata.h rename Marlin/src/lcd/dogm/fontdata/{langdata_el_gr.h => langdata_el_CY.h} (86%) create mode 100644 Marlin/src/lcd/dogm/status/ammeter.h create mode 100644 Marlin/src/lcd/dogm/status/cooler.h delete mode 100644 Marlin/src/lcd/dwin/e3v2/dwin.cpp delete mode 100644 Marlin/src/lcd/dwin/e3v2/dwin.h rename Marlin/src/lcd/{dwin => }/e3v2/README.md (100%) rename Marlin/src/lcd/{dwin/dwin_lcd.cpp => e3v2/common/dwin_api.cpp} (74%) rename Marlin/src/lcd/{dwin/dwin_lcd.h => e3v2/common/dwin_api.h} (57%) create mode 100644 Marlin/src/lcd/e3v2/common/dwin_color.h create mode 100644 Marlin/src/lcd/e3v2/common/dwin_font.h create mode 100644 Marlin/src/lcd/e3v2/common/dwin_set.h rename Marlin/src/lcd/{dwin/e3v2/rotary_encoder.cpp => e3v2/common/encoder.cpp} (88%) rename Marlin/src/lcd/{dwin/e3v2/rotary_encoder.h => e3v2/common/encoder.h} (91%) create mode 100644 Marlin/src/lcd/e3v2/creality/dwin.cpp create mode 100644 Marlin/src/lcd/e3v2/creality/dwin.h create mode 100644 Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp create mode 100644 Marlin/src/lcd/e3v2/creality/dwin_lcd.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwinui.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/dwinui.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/lockscreen.h create mode 100644 Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp create mode 100644 Marlin/src/lcd/e3v2/enhanced/meshviewer.h create mode 100644 Marlin/src/lcd/e3v2/jyersui/README.md create mode 100644 Marlin/src/lcd/e3v2/jyersui/dwin.cpp create mode 100644 Marlin/src/lcd/e3v2/jyersui/dwin.h create mode 100644 Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp create mode 100644 Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h create mode 100644 Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp create mode 100644 Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h create mode 100644 Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp create mode 100644 Marlin/src/lcd/e3v2/marlinui/dwin_string.h create mode 100644 Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp create mode 100644 Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h create mode 100644 Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h create mode 100644 Marlin/src/lcd/e3v2/marlinui/ui_common.cpp create mode 100644 Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp create mode 100644 Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp rename Marlin/src/lcd/extui/{lib => }/anycubic_chiron/FileNavigator.h (61%) rename Marlin/src/lcd/extui/{lib => }/anycubic_chiron/Tunes.cpp (94%) rename Marlin/src/lcd/extui/{lib => }/anycubic_chiron/Tunes.h (99%) rename Marlin/src/lcd/extui/{anycubic_chiron_lcd.cpp => anycubic_chiron/chiron_extui.cpp} (86%) create mode 100644 Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp create mode 100644 Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h rename Marlin/src/lcd/extui/{lib => }/anycubic_chiron/chiron_tft_defs.h (75%) rename Marlin/src/lcd/extui/{anycubic_i3mega_lcd.cpp => anycubic_i3mega/anycubic_extui.cpp} (86%) rename Marlin/src/lcd/extui/{lib => }/anycubic_i3mega/anycubic_i3mega_lcd.cpp (78%) rename Marlin/src/lcd/extui/{lib => }/anycubic_i3mega/anycubic_i3mega_lcd.h (50%) rename Marlin/src/lcd/extui/{lib => }/dgus/DGUSDisplay.cpp (79%) rename Marlin/src/lcd/extui/{lib => }/dgus/DGUSDisplay.h (84%) rename Marlin/src/lcd/extui/{lib => }/dgus/DGUSDisplayDef.h (85%) rename Marlin/src/lcd/extui/{lib => }/dgus/DGUSScreenHandler.cpp (52%) create mode 100644 Marlin/src/lcd/extui/dgus/DGUSScreenHandler.h rename Marlin/src/lcd/extui/{lib => }/dgus/DGUSVPVariable.h (100%) rename Marlin/src/lcd/extui/{dgus_lcd.cpp => dgus/dgus_extui.cpp} (85%) rename Marlin/src/lcd/extui/{lib => }/dgus/fysetc/DGUSDisplayDef.cpp (64%) rename Marlin/src/lcd/extui/{lib => }/dgus/fysetc/DGUSDisplayDef.h (99%) create mode 100644 Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp rename Marlin/src/lcd/extui/{lib/dgus => dgus/fysetc}/DGUSScreenHandler.h (75%) rename Marlin/src/lcd/extui/{lib => }/dgus/hiprecy/DGUSDisplayDef.cpp (59%) rename Marlin/src/lcd/extui/{lib => }/dgus/hiprecy/DGUSDisplayDef.h (99%) create mode 100644 Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h create mode 100644 Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp create mode 100644 Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h create mode 100644 Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h rename Marlin/src/lcd/extui/{lib => }/dgus/origin/DGUSDisplayDef.cpp (54%) rename Marlin/src/lcd/extui/{lib => }/dgus/origin/DGUSDisplayDef.h (90%) create mode 100644 Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h create mode 100644 Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp rename Marlin/src/lcd/extui/{ => example}/example.cpp (87%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp (95%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/archim2-flash/flash_storage.h (97%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp (93%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h (87%) rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp => ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp} (97%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp => ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp} (92%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp => ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp} (92%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp => ftdi_eve_touch_ui/bioprinter/main_menu.cpp} (86%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp => ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp} (91%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp => ftdi_eve_touch_ui/bioprinter/status_screen.cpp} (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp => ftdi_eve_touch_ui/bioprinter/tune_menu.cpp} (93%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bio_printer_ui_landscape.h => ftdi_eve_touch_ui/bioprinter/ui_landscape.h} (99%) rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bio_printer_ui_portrait.h => ftdi_eve_touch_ui/bioprinter/ui_portrait.h} (99%) rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/cocoa_press_advanced_settings_menu.cpp => ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp} (86%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/cocoa_press}/cocoa_press_ui.h (84%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/cocoa_press_main_menu.cpp => ftdi_eve_touch_ui/cocoa_press/main_menu.cpp} (51%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp => ftdi_eve_touch_ui/cocoa_press/move_e_screen.cpp} (76%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_e_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/cocoa_press_move_xyz_screen.cpp => ftdi_eve_touch_ui/cocoa_press/move_xyz_screen.cpp} (90%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_xyz_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_menu.cpp => ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp} (88%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp => ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp} (71%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp => ftdi_eve_touch_ui/cocoa_press/status_screen.cpp} (89%) rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/spinner_dialog_box.cpp => ftdi_eve_touch_ui/cocoa_press/status_screen.h} (52%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/compat.h (92%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/config.h (94%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/LICENSE.txt (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/README.md (100%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp (91%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h (96%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/constants.h (99%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/display_list.h (99%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/ftdi_basic.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft800.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft810.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h (71%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp (98%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h (98%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h (86%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.h rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/bitmap_info.h (100%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.h rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.cpp (82%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h (93%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp (92%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp (96%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h (95%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h (60%) rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras => ftdi_eve_touch_ui/ftdi_eve_lib/extended}/poly_ui.h (99%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h (97%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/rgb_t.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp (91%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h (92%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h (97%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp (94%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h (97%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp (54%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h (92%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp (80%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.h (95%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.cpp (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h (97%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/README.txt (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.cpp (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.h (100%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.png (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.svg (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.pbm (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.png (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.png (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.svg (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp (87%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h (86%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.cpp (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set_bitmap_31.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/ftdi_eve_lib/ftdi_eve_lib.h (100%) create mode 100755 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/bitmap2cpp.py => ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py} (100%) mode change 100644 => 100755 create mode 100755 Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras => ftdi_eve_touch_ui/ftdi_eve_lib/scripts}/svg2cpp.py (98%) rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/about_screen.cpp (78%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/advanced_settings_menu.cpp (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/alert_dialog_box.cpp (80%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/backlash_compensation_screen.cpp (97%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/backlash_compensation_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/base_numeric_adjustment_screen.cpp (88%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/base_screen.cpp (91%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp => ftdi_eve_touch_ui/generic/bed_mesh_base.cpp} (54%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_base.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/boot_screen.cpp (95%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/case_light_screen.cpp (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/change_filament_screen.cpp (84%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/confirm_abort_print_dialog_box.cpp (92%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_abort_print_dialog_box.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/confirm_auto_calibration_dialog_box.cpp (94%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/confirm_erase_flash_dialog_box.cpp (95%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_erase_flash_dialog_box.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/confirm_start_print_dialog_box.cpp (82%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_start_print_dialog_box.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/confirm_user_request_alert_box.cpp (78%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/custom_user_menus.cpp (91%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/default_acceleration_screen.cpp (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/default_acceleration_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/developer_menu.cpp (98%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/dialog_box_base_class.cpp (84%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/display_tuning_screen.cpp (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/display_tuning_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/endstop_state_screen.cpp (95%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/feedrate_percent_screen.cpp (95%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/feedrate_percent_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/filament_menu.cpp (94%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/filament_runout_screen.cpp (92%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens/z_offset_screen.cpp => ftdi_eve_touch_ui/generic/flow_percent_screen.cpp} (62%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/flow_percent_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/interface_settings_screen.cpp (81%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/interface_sounds_screen.cpp (70%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/jerk_screen.cpp (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/jerk_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/junction_deviation_screen.cpp (90%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/junction_deviation_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/kill_screen.cpp (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/language_menu.cpp (95%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/linear_advance_screen.cpp (97%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/linear_advance_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/lock_screen.cpp (89%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/main_menu.cpp (89%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/max_acceleration_screen.cpp (97%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_acceleration_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/max_velocity_screen.cpp (97%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/media_player_screen.cpp (98%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/move_axis_screen.cpp (66%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/nozzle_offsets_screen.cpp (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nozzle_offsets_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/nudge_nozzle_screen.cpp (70%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nudge_nozzle_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/restore_failsafe_dialog_box.cpp (95%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/save_settings_dialog_box.cpp (91%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/statistics_screen.cpp (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/status_screen.cpp (95%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/stepper_bump_sensitivity_screen.cpp (92%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_bump_sensitivity_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/stepper_current_screen.cpp (97%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_current_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/steps_screen.cpp (97%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/steps_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/stress_test_screen.cpp (82%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/string_format.cpp (54%) rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/string_format.h (82%) rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/temperature_screen.cpp (92%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/touch_calibration_screen.cpp (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_calibration_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/touch_registers_screen.cpp (97%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/tune_menu.cpp (90%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.h rename Marlin/src/lcd/extui/{lib/ftdi_eve_touch_ui/screens => ftdi_eve_touch_ui/generic}/widget_demo_screen.cpp (97%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/widget_demo_screen.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.h rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/language/language.cpp (91%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/language/language.h (100%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/language/language_en.h (92%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/pin_mappings.h (96%) create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp create mode 100644 Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/theme/bitmaps.h (58%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h (99%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/theme/colors.h (96%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/theme/fonts.h (98%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h (99%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h (99%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/theme/sounds.cpp (99%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/theme/sounds.h (99%) rename Marlin/src/lcd/extui/{lib => }/ftdi_eve_touch_ui/theme/theme.h (100%) delete mode 100644 Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp delete mode 100644 Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp delete mode 100644 Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.h delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_unload_cartridge.cpp delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/leveling_menu.cpp delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screen_data.h delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp delete mode 100644 Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h delete mode 100644 Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp delete mode 100644 Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp delete mode 100644 Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.h rename Marlin/src/lcd/extui/{malyan_lcd.cpp => malyan/malyan.cpp} (69%) create mode 100644 Marlin/src/lcd/extui/malyan/malyan.h create mode 100644 Marlin/src/lcd/extui/malyan/malyan_extui.cpp rename Marlin/src/lcd/extui/{lib => }/mks_ui/SPIFlashStorage.cpp (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/SPIFlashStorage.h (89%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/SPI_TFT.cpp (89%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/SPI_TFT.h (90%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_about.cpp (95%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_about.h (94%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_acceleration_settings.cpp (84%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_acceleration_settings.h (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_advance_settings.cpp (94%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_advance_settings.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_auto_level_offset_settings.cpp (88%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_auto_level_offset_settings.h (90%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_baby_stepping.cpp (82%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_baby_stepping.h (87%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_change_speed.cpp (98%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_change_speed.h (86%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_cloud_bind.cpp (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_cloud_bind.h (79%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_dialog.cpp (82%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_dialog.h (87%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_eeprom_settings.cpp (96%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_eeprom_settings.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_encoder_settings.cpp (96%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_encoder_settings.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_error_message.cpp (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_error_message.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_extrusion.cpp (62%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_extrusion.h (82%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_fan.cpp (68%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_fan.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_filament_change.cpp (69%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_filament_change.h (87%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_filament_settings.cpp (89%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_filament_settings.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_gcode.cpp (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_gcode.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_home.cpp (96%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_home.h (94%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_homing_sensitivity_settings.cpp (81%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_homing_sensitivity_settings.h (90%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_jerk_settings.cpp (87%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_jerk_settings.h (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_keyboard.cpp (79%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_keyboard.h (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_language.cpp (98%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_language.h (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_level_settings.cpp (90%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_level_settings.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_machine_para.cpp (96%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_machine_para.h (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_machine_settings.cpp (96%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_machine_settings.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_manuaLevel.cpp (90%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_manuaLevel.h (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_max_feedrate_settings.cpp (85%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_max_feedrate_settings.h (91%) create mode 100644 Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp create mode 100644 Marlin/src/lcd/extui/mks_ui/draw_media_select.h rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_more.cpp (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_more.h (90%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_motor_settings.cpp (97%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_motor_settings.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_move_motor.cpp (89%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_move_motor.h (91%) create mode 100644 Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_number_key.h (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_operation.cpp (95%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_operation.h (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_pause_message.cpp (90%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_pause_message.h (94%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_pause_position.cpp (88%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_pause_position.h (92%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_preHeat.cpp (57%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_preHeat.h (85%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_print_file.cpp (97%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_print_file.h (79%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_printing.cpp (74%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_printing.h (76%) create mode 100644 Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_ready_print.h (82%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_set.cpp (96%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_set.h (94%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_step_settings.cpp (85%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_step_settings.h (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_tmc_current_settings.cpp (90%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_tmc_current_settings.h (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_tmc_step_mode_settings.cpp (67%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_tmc_step_mode_settings.h (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_tool.cpp (85%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_tool.h (94%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_touch_calibration.cpp (88%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_touch_calibration.h (87%) rename Marlin/src/lcd/extui/{lib/mks_ui/draw_manual_level_pos_settings.cpp => mks_ui/draw_tramming_pos_settings.cpp} (76%) rename Marlin/src/lcd/extui/{lib/mks_ui/draw_manual_level_pos_settings.h => mks_ui/draw_tramming_pos_settings.h} (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_ui.cpp (84%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_ui.h (87%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_wifi.cpp (97%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_wifi.h (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_wifi_list.cpp (99%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_wifi_list.h (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_wifi_settings.cpp (99%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_wifi_settings.h (93%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_wifi_tips.cpp (95%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/draw_wifi_tips.h (95%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/gb2312_puhui16.cpp (97%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/irq_overrid.cpp (78%) rename Marlin/src/lcd/extui/{lib/mks_ui/mks_hardware_test.cpp => mks_ui/mks_hardware.cpp} (78%) rename Marlin/src/lcd/extui/{lib/mks_ui/mks_hardware_test.h => mks_ui/mks_hardware.h} (79%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/pic_manager.cpp (94%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/pic_manager.h (71%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/printer_operation.cpp (72%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/printer_operation.h (91%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_Language_en.h (97%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_Language_fr.h (97%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_Language_it.h (97%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_Language_ru.h (97%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_Language_s_cn.h (98%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_Language_sp.h (96%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_Language_t_cn.h (98%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_lvgl_configuration.cpp (86%) create mode 100644 Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_multi_language.cpp (96%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/tft_multi_language.h (98%) create mode 100644 Marlin/src/lcd/extui/mks_ui/wifiSerial.h create mode 100644 Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp create mode 100644 Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h rename Marlin/src/lcd/extui/{lib/mks_ui/wifiSerial.cpp => mks_ui/wifiSerial_STM32F1.cpp} (85%) rename Marlin/src/lcd/extui/{lib/mks_ui/wifiSerial.h => mks_ui/wifiSerial_STM32F1.h} (73%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/wifi_module.cpp (65%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/wifi_module.h (77%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/wifi_upload.cpp (97%) rename Marlin/src/lcd/extui/{lib => }/mks_ui/wifi_upload.h (100%) create mode 100644 Marlin/src/lcd/extui/nextion/FileNavigator.cpp create mode 100644 Marlin/src/lcd/extui/nextion/FileNavigator.h create mode 100644 Marlin/src/lcd/extui/nextion/nextion_extui.cpp create mode 100644 Marlin/src/lcd/extui/nextion/nextion_tft.cpp create mode 100644 Marlin/src/lcd/extui/nextion/nextion_tft.h create mode 100644 Marlin/src/lcd/extui/nextion/nextion_tft_defs.h create mode 100644 Marlin/src/lcd/language/language_el_CY.h delete mode 100644 Marlin/src/lcd/menu/menu_custom.cpp create mode 100644 Marlin/src/lcd/tft/bitmaps/btn_42x39_rounded.bmp create mode 100644 Marlin/src/lcd/tft/images/btn_rounded_42x39x4.cpp create mode 100644 Marlin/src/lcd/tft/ui_1024x600.cpp create mode 100644 Marlin/src/lcd/tft/ui_1024x600.h create mode 100644 Marlin/src/lcd/tft_io/tft_ids.h create mode 100644 Marlin/src/libs/MAX31865.cpp create mode 100644 Marlin/src/libs/MAX31865.h create mode 100644 Marlin/src/module/polargraph.cpp create mode 100644 Marlin/src/module/polargraph.h create mode 100644 Marlin/src/module/thermistor/thermistor_2000.h create mode 100644 Marlin/src/pins/esp32/env_validate.h create mode 100644 Marlin/src/pins/esp32/pins_PANDA_M4.h create mode 100644 Marlin/src/pins/esp32/pins_PANDA_ZHU.h create mode 100644 Marlin/src/pins/esp32/pins_PANDA_common.h create mode 100644 Marlin/src/pins/lpc1768/env_validate.h create mode 100644 Marlin/src/pins/lpc1769/env_validate.h create mode 100644 Marlin/src/pins/mega/env_validate.h create mode 100644 Marlin/src/pins/mega/pins_GT2560_REV_B.h create mode 100644 Marlin/src/pins/mega/pins_GT2560_V4.h create mode 100644 Marlin/src/pins/mega/pins_GT2560_V4_A20.h create mode 100644 Marlin/src/pins/mega/pins_MALYAN_M180.h create mode 100644 Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h create mode 100644 Marlin/src/pins/rambo/env_validate.h create mode 100755 Marlin/src/pins/rambo/pins_RAMBO_THINKERV2.h create mode 100644 Marlin/src/pins/ramps/env_validate.h create mode 100644 Marlin/src/pins/sam/env_validate.h create mode 100644 Marlin/src/pins/sam/pins_KRATOS32.h create mode 100644 Marlin/src/pins/sanguino/env_validate.h create mode 100644 Marlin/src/pins/stm32f1/env_validate.h create mode 100755 Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h create mode 100644 Marlin/src/pins/stm32f1/pins_CHITU3D_common.h create mode 100644 Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h create mode 100644 Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h create mode 100644 Marlin/src/pins/stm32f1/pins_GTM32_PRO_VD.h create mode 100644 Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h create mode 100644 Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h create mode 100644 Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h create mode 100644 Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h create mode 100644 Marlin/src/pins/stm32f4/env_validate.h create mode 100644 Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h create mode 100644 Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h create mode 100644 Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h create mode 100644 Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h create mode 100644 Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h create mode 100644 Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_A.h create mode 100644 Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_B.h create mode 100644 Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h create mode 100644 Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h create mode 100644 Marlin/src/pins/stm32f4/pins_INDEX_REV03.h create mode 100644 Marlin/src/pins/stm32f4/pins_MKS_EAGLE.h create mode 100644 Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h create mode 100644 Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h create mode 100644 Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h create mode 100644 Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h create mode 100644 Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h create mode 100644 Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h create mode 100644 Marlin/src/pins/teensy2/env_validate.h create mode 100644 Marlin/src/sd/disk_io_driver.h create mode 100755 buildroot/bin/build_all_examples create mode 100755 buildroot/bin/build_example rename buildroot/{share/git => bin}/mftest (72%) create mode 100755 buildroot/bin/opt_find rename buildroot/{tests => bin}/run_tests (79%) delete mode 100644 buildroot/share/PlatformIO/boards/fysetc_f6.json rename buildroot/share/PlatformIO/boards/{LERDGE.json => marlin_BTT_SKR_SE_BX.json} (58%) rename buildroot/share/PlatformIO/boards/{BigTree_Btt002.json => marlin_BigTree_BTT002.json} (96%) rename buildroot/share/PlatformIO/boards/{BigTree_GTR_v1.json => marlin_BigTree_GTR_v1.json} (96%) create mode 100644 buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_Pro_v1_F429.json create mode 100644 buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_v1.json rename buildroot/share/PlatformIO/boards/{BigTree_SKR_Pro.json => marlin_BigTree_SKR_Pro.json} (95%) rename buildroot/share/PlatformIO/boards/{CHITU_F103.json => marlin_CHITU_F103.json} (93%) rename buildroot/share/PlatformIO/boards/{FYSETC_CHEETAH_V20.json => marlin_FYSETC_CHEETAH_V20.json} (92%) rename buildroot/share/PlatformIO/boards/{MEEB_3DP.json => marlin_MEEB_3DP.json} (97%) rename buildroot/share/PlatformIO/boards/{STEVAL_STM32F401VE.json => marlin_STEVAL_STM32F401VE.json} (92%) rename buildroot/share/PlatformIO/boards/{genericSTM32F407VGT6.json => marlin_STM32F407VGT6_CCM.json} (100%) rename buildroot/share/PlatformIO/boards/{FLYF407ZG.json => marlin_STM32F407ZGT6.json} (94%) rename buildroot/share/PlatformIO/boards/{archim.json => marlin_archim.json} (97%) rename buildroot/share/PlatformIO/boards/{at90usb1286.json => marlin_at90usb1286.json} (100%) rename buildroot/share/PlatformIO/boards/{blackSTM32F407VET6.json => marlin_blackSTM32F407VET6.json} (93%) create mode 100644 buildroot/share/PlatformIO/boards/marlin_index_mobo_rev03.json rename buildroot/share/PlatformIO/boards/{malyanM200.json => marlin_malyanM200.json} (100%) rename buildroot/share/PlatformIO/boards/{malyanM200v2.json => marlin_malyanM200v2.json} (100%) rename buildroot/share/PlatformIO/ldscripts/{STM32F103RC_SKR_MINI_512K.ld => STM32F103RE_SKR_MINI_512K.ld} (100%) rename buildroot/share/PlatformIO/ldscripts/{STM32F103RE_SKR_E3_DIP.ld => ZONESTAR_ZM3E_256K.ld} (84%) create mode 100644 buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld create mode 100644 buildroot/share/PlatformIO/ldscripts/eryone_ery32_mini.ld create mode 100644 buildroot/share/PlatformIO/scripts/SAMD51_grandcentral_m4.py delete mode 100644 buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py delete mode 100644 buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py delete mode 100644 buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py delete mode 100644 buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py delete mode 100644 buildroot/share/PlatformIO/scripts/anet_et4_openblt.py delete mode 100644 buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py delete mode 100644 buildroot/share/PlatformIO/scripts/creality.py create mode 100644 buildroot/share/PlatformIO/scripts/custom_board.py create mode 100644 buildroot/share/PlatformIO/scripts/exc.S create mode 100644 buildroot/share/PlatformIO/scripts/fix_framework_weakness.py delete mode 100644 buildroot/share/PlatformIO/scripts/fly_mini.py delete mode 100644 buildroot/share/PlatformIO/scripts/fysetc_cheetah_v20.py create mode 100644 buildroot/share/PlatformIO/scripts/marlin.py delete mode 100644 buildroot/share/PlatformIO/scripts/mks_encrypt.py mode change 100755 => 100644 buildroot/share/PlatformIO/scripts/mks_robin_mini.py mode change 100755 => 100644 buildroot/share/PlatformIO/scripts/mks_robin_nano.py create mode 100644 buildroot/share/PlatformIO/scripts/offset_and_rename.py create mode 100644 buildroot/share/PlatformIO/scripts/openblt.py create mode 100644 buildroot/share/PlatformIO/scripts/pioutil.py create mode 100644 buildroot/share/PlatformIO/scripts/preflight-checks.py create mode 100644 buildroot/share/PlatformIO/scripts/robin.py create mode 100644 buildroot/share/PlatformIO/scripts/simulator.py delete mode 100644 buildroot/share/PlatformIO/scripts/stm32_bootloader.py create mode 100644 buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/.gitignore (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/Makefile (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/debug.mk (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/gcc.mk (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/libvariant_arduino_due_x.mk (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/build_gcc/release.mk (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/debug_scripts/gcc/arduino_due_x_flash.gdb (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/debug_scripts/gcc/arduino_due_x_sram.gdb (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/debug_scripts/iar/arduino_due_flash.mac (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/debug_scripts/iar/arduino_due_sram.mac (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/libsam_sam3x8e_gcc_rel.a (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/libsam_sam3x8e_gcc_rel.a.txt (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/linker_scripts/gcc/flash.ld (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/linker_scripts/gcc/sram.ld (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/linker_scripts/iar/flash.icf (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/linker_scripts/iar/sram.icf (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/pins_arduino.h (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{archim => MARLIN_ARCHIM}/variant.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/PeripheralPins.c (95%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/PinNamesVar.h (100%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_BTT002}/ldscript.ld (99%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_BTT002}/variant.h (98%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PeripheralPins.c rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_E3_RRF}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_E3_RRF}/hal_conf_extra.h (89%) rename buildroot/share/PlatformIO/variants/{BIGTREE_BTT002 => MARLIN_BIGTREE_E3_RRF}/ldscript.ld (99%) rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_E3_RRF}/variant.cpp (100%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/PeripheralPins.c (93%) rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_GTR_V1}/PinNamesVar.h (100%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/ldscript.ld (99%) rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_GTR_V1}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_GTR_V1}/variant.h (98%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PinNamesVar.h rename buildroot/share/PlatformIO/variants/{BIGTREE_GTR_V1 => MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429}/hal_conf_extra.h (87%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PinNamesVar.h rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_OCTOPUS_V1}/hal_conf_extra.h (87%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_SKR_PRO_11}/PeripheralPins.c (99%) rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_BIGTREE_SKR_PRO_11}/PinNamesVar.h (100%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.cpp rename buildroot/share/PlatformIO/variants/{BIGTREE_SKR_PRO_1v1 => MARLIN_BIGTREE_SKR_PRO_11}/variant.h (98%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PinNamesVar.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h create mode 100755 buildroot/share/PlatformIO/variants/MARLIN_F103Rx/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103Rx/PinNamesVar.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103Rx/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PinNamesVar.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F446VE/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F446VE/PinNamesVar.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F446VE/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/PeripheralPins.c (100%) rename buildroot/share/PlatformIO/variants/{LERDGE => MARLIN_FLY_F407ZG}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/ldscript.ld (99%) rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{FLY_F407ZG => MARLIN_FLY_F407ZG}/variant.h (98%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/PeripheralPins.c (87%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/hal_conf_custom.h (92%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/ldscript.ld (98%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{FYSETC_CHEETAH_V20 => MARLIN_FYSETC_CHEETAH_V20}/variant.h (99%) rename buildroot/share/PlatformIO/variants/{LERDGE => MARLIN_LERDGE}/PeripheralPins.c (96%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PinNamesVar.h rename buildroot/share/PlatformIO/{ldscripts/lerdge.ld => variants/MARLIN_LERDGE/ldscript.ld} (95%) rename buildroot/share/PlatformIO/variants/{LERDGE => MARLIN_LERDGE}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{LERDGE => MARLIN_LERDGE}/variant.h (83%) rename buildroot/share/PlatformIO/variants/{megaextendedpins => MARLIN_MEGA_EXTENDED}/pins_arduino.h (95%) mode change 100755 => 100644 create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PeripheralPins.c rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/PinNamesVar.h (100%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/hal_conf_custom.h (92%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/ldscript.ld (99%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/variant.cpp (100%) rename buildroot/share/PlatformIO/variants/{STEVAL_F401VE => MARLIN_STEVAL_F401VE}/variant.h (100%) create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PeripheralPins.c create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h create mode 100755 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp create mode 100644 buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.h delete mode 100644 buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-flash.inc delete mode 100644 buildroot/share/PlatformIO/variants/STEVAL_F401VE/PeripheralPins.c rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/board.cpp (100%) mode change 100755 => 100644 rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/board/board.h (100%) mode change 100755 => 100644 rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/common.inc (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/extra_libs.inc (100%) rename buildroot/share/PlatformIO/{ldscripts/chitu_f103.ld => variants/marlin_CHITU_F103/ld/flash.ld} (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/stm32f103z_dfu.ld (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/stm32f103zc.ld (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/stm32f103zd.ld (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/stm32f103ze.ld (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/ld/vector_symbols.inc (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/pins_arduino.h (100%) mode change 100755 => 100644 rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/variant.h (100%) mode change 100755 => 100644 rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/boards.cpp (99%) mode change 100755 => 100644 rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/boards_setup.cpp (100%) mode change 100755 => 100644 rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/start.S (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/start_c.c (100%) rename buildroot/share/PlatformIO/variants/{CHITU_F103 => marlin_CHITU_F103}/wirish/syscalls.c (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/board.cpp (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/board/board.h (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/bootloader.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/common.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/extra_libs.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/flash.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/jtag.ld (100%) create mode 100644 buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-flash.inc rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/mem-jtag.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/mem-ram.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/ram.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rb.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rb_bootloader.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rc.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103rc_bootloader.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/stm32f103re.ld (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/ld/vector_symbols.inc (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/pins_arduino.h (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/variant.h (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/boards.cpp (99%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/boards_setup.cpp (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/start.S (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/start_c.c (100%) rename buildroot/share/PlatformIO/variants/{MEEB_3DP => marlin_MEEB_3DP}/wirish/syscalls.c (100%) create mode 100644 buildroot/share/fonts/buildhzk.py create mode 100644 buildroot/share/fonts/marlin-10x20.bdf create mode 100644 buildroot/share/fonts/marlin-12x24.bdf create mode 100644 buildroot/share/fonts/marlin-14x28.bdf create mode 100644 buildroot/share/fonts/marlin-16x32.bdf create mode 100644 buildroot/share/fonts/marlin-20x40.bdf create mode 100644 buildroot/share/fonts/marlin-24x48.bdf create mode 100644 buildroot/share/fonts/marlin-28x56.bdf create mode 100644 buildroot/share/fonts/marlin-32x64.bdf create mode 100644 buildroot/share/fonts/marlin-8x16.bdf create mode 100644 buildroot/share/scripts/gen-tft-image.py rename buildroot/tests/{ARMED-tests => ARMED} (75%) create mode 100755 buildroot/tests/BIGTREE_BTT002 delete mode 100755 buildroot/tests/BIGTREE_BTT002-tests create mode 100755 buildroot/tests/BIGTREE_GTR_V1_0 delete mode 100755 buildroot/tests/BIGTREE_GTR_V1_0-tests create mode 100755 buildroot/tests/BIGTREE_GTR_V1_0_usb_flash_drive create mode 100755 buildroot/tests/BIGTREE_SKR_PRO delete mode 100755 buildroot/tests/BIGTREE_SKR_PRO-tests create mode 100755 buildroot/tests/BTT_SKR_SE_BX rename buildroot/tests/{DUE-tests => DUE} (67%) rename buildroot/tests/{DUE_archim-tests => DUE_archim} (100%) rename buildroot/tests/{FLYF407ZG-tests => FLYF407ZG} (64%) rename buildroot/tests/{FYSETC_F6-tests => FYSETC_F6} (64%) rename buildroot/tests/{FYSETC_S6-tests => FYSETC_S6} (70%) create mode 100755 buildroot/tests/Index_Mobo_Rev03 create mode 100755 buildroot/tests/LERDGEK rename buildroot/tests/{LERDGEX-tests => LERDGEX} (80%) rename buildroot/tests/{LPC1768-tests => LPC1768} (52%) rename buildroot/tests/{LPC1769-tests => LPC1769} (83%) rename buildroot/tests/{NUCLEO_F767ZI-tests => NUCLEO_F767ZI} (69%) rename buildroot/tests/{REMRAM_V1-tests => REMRAM_V1} (100%) rename buildroot/tests/{SAMD51_grandcentral_m4-tests => SAMD51_grandcentral_m4} (72%) rename buildroot/tests/{STM32F070CB_malyan-tests => STM32F070CB_malyan} (75%) rename buildroot/tests/{STM32F070RB_malyan-tests => STM32F070RB_malyan} (100%) rename buildroot/tests/{STM32F103CB_malyan-tests => STM32F103CB_malyan} (100%) rename buildroot/tests/{STM32F103RC_btt-tests => STM32F103RC_btt} (54%) rename buildroot/tests/{STM32F103RC_btt_USB-tests => STM32F103RC_btt_USB} (75%) create mode 100755 buildroot/tests/STM32F103RC_btt_USB_maple create mode 100755 buildroot/tests/STM32F103RC_btt_maple rename buildroot/tests/{STM32F103RC_fysetc-tests => STM32F103RC_fysetc_maple} (100%) rename buildroot/tests/{STM32F103RC_meeb-tests => STM32F103RC_meeb} (56%) rename buildroot/tests/{STM32F103RE-tests => STM32F103RE} (73%) create mode 100755 buildroot/tests/STM32F103RET6_creality delete mode 100755 buildroot/tests/STM32F103RET6_creality-tests create mode 100755 buildroot/tests/STM32F103RE_btt delete mode 100755 buildroot/tests/STM32F103RE_btt-tests rename buildroot/tests/{STM32F103RE_btt_USB-tests => STM32F103RE_btt_USB} (76%) create mode 100755 buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple rename buildroot/tests/{STM32F103VE_longer-tests => STM32F103VE_longer} (100%) create mode 100755 buildroot/tests/STM32F103VE_longer_maple rename buildroot/tests/{STM32F401VE_STEVAL-tests => STM32F401VE_STEVAL} (76%) rename buildroot/tests/{STM32F407VE_black-tests => STM32F407VE_black} (100%) rename buildroot/tests/{at90usb1286_cdc-tests => at90usb1286_cdc} (100%) rename buildroot/tests/{at90usb1286_dfu-tests => at90usb1286_dfu} (100%) create mode 100755 buildroot/tests/chitu_f103 create mode 100755 buildroot/tests/esp32 delete mode 100755 buildroot/tests/esp32-tests rename buildroot/tests/{jgaurora_a5s_a1-tests => jgaurora_a5s_a1_maple} (100%) rename buildroot/tests/{linux_native-tests => linux_native} (80%) rename buildroot/tests/{malyan_M300-tests => malyan_M300} (100%) rename buildroot/tests/{mega1280-tests => mega1280} (76%) rename buildroot/tests/{mega2560-tests => mega2560} (53%) rename buildroot/tests/{mks_robin_stm32-tests => mks_robin} (100%) rename buildroot/tests/{mks_robin_lite-tests => mks_robin_lite_maple} (65%) rename buildroot/tests/{mks_robin-tests => mks_robin_maple} (82%) rename buildroot/tests/{mks_robin_mini-tests => mks_robin_mini} (71%) rename buildroot/tests/{mks_robin_nano35_stm32-tests => mks_robin_nano35} (55%) rename buildroot/tests/{mks_robin_nano35-tests => mks_robin_nano35_maple} (86%) rename buildroot/tests/{mks_robin_pro-tests => mks_robin_pro_maple} (55%) rename buildroot/tests/{rambo-tests => rambo} (60%) rename buildroot/tests/{rumba32-tests => rumba32} (63%) rename buildroot/tests/{sanguino1284p-tests => sanguino1284p} (83%) rename buildroot/tests/{sanguino644p-tests => sanguino644p} (100%) rename buildroot/tests/{teensy31-tests => teensy31} (78%) rename buildroot/tests/{teensy35-tests => teensy35} (71%) rename buildroot/tests/{teensy41-tests => teensy41} (77%) rename {data => buildroot/web-ui/data}/www/bootstrap.min.css (100%) rename {data => buildroot/web-ui/data}/www/bootstrap.min.js (100%) rename {data => buildroot/web-ui/data}/www/bootstrap4-toggle.min.js (100%) rename {data => buildroot/web-ui/data}/www/chart.lineargauge.js (100%) create mode 100755 buildroot/web-ui/data/www/chart.min.js rename {data => buildroot/web-ui/data}/www/filesaver.min.js (100%) rename {data => buildroot/web-ui/data}/www/index-ie.html (100%) rename {data => buildroot/web-ui/data}/www/index.html (100%) rename {data => buildroot/web-ui/data}/www/jquery-3.5.1.slim.min.js (100%) rename {data => buildroot/web-ui/data}/www/jquery.browser.min.js (100%) rename {data => buildroot/web-ui/data}/www/marlin-logo-dark.png (100%) rename {data => buildroot/web-ui/data}/www/marlinui.eot (100%) rename {data => buildroot/web-ui/data}/www/marlinui.svg (100%) rename {data => buildroot/web-ui/data}/www/marlinui.ttf (100%) rename {data => buildroot/web-ui/data}/www/marlinui.woff (100%) rename {data => buildroot/web-ui/data}/www/moment.min.js (100%) rename {data => buildroot/web-ui/data}/www/webmarlin-class.js (100%) rename {data => buildroot/web-ui/data}/www/webmarlin-font.css (100%) rename {data => buildroot/web-ui/data}/www/webmarlin.css (100%) rename {data => buildroot/web-ui/data}/www/webmarlin.js (100%) delete mode 100644 data/www/chart.min.js create mode 100644 docs/Queue.md create mode 100644 ini/avr.ini create mode 100644 ini/due.ini create mode 100644 ini/esp32.ini create mode 100644 ini/features.ini create mode 100644 ini/lpc176x.ini create mode 100644 ini/native.ini create mode 100644 ini/samd51.ini create mode 100644 ini/stm32-common.ini create mode 100644 ini/stm32f0.ini create mode 100644 ini/stm32f1-maple.ini create mode 100644 ini/stm32f1.ini create mode 100644 ini/stm32f4.ini create mode 100644 ini/stm32f7.ini create mode 100644 ini/stm32h7.ini create mode 100644 ini/teensy.ini diff --git a/.editorconfig b/.editorconfig index a0fa3eff170e..b8f6ef7f8e32 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,10 +4,10 @@ root = true [{*.patch,syntax_test_*}] trim_trailing_whitespace = false -[{*.c,*.cpp,*.h}] +[{*.c,*.cpp,*.h,*.ino}] charset = utf-8 -[{*.c,*.cpp,*.h,Makefile}] +[{*.c,*.cpp,*.h,*.ino,Makefile}] trim_trailing_whitespace = true insert_final_newline = true end_of_line = lf diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 000000000000..0e6028a31df7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,169 @@ +name: 🪲 Report a bug +description: Create a bug report to help improve Marlin Firmware +title: "[BUG] (bug summary)" +body: + - type: markdown + attributes: + value: > + Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose). + + - type: markdown + attributes: + value: | + **Thank you for reporting a bug in Marlin Firmware!** + + ## Before Reporting a Bug + + - Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect. + + - Test with the [`bugfix-2.0.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.0.x.zip) to see whether the issue still exists. + + ## Instructions + + Please follow the instructions below. Failure to do so may result in your issue being closed. See [Contributing to Marlin](https://github.com/MarlinFirmware/Marlin/blob/2.0.x/.github/contributing.md) for additional guidelines. + + 1. Provide a good title starting with [BUG]. + 2. Fill out all sections of this bug report form. + 3. Always attach configuration files so we can build and test your setup. + + - type: dropdown + attributes: + label: Did you test the latest `bugfix-2.0.x` code? + description: >- + Always try the latest code to make sure the issue you are reporting is not already fixed. To download + the latest code just [click this link](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.0.x.zip). + options: + - Yes, and the problem still exists. + - No, but I will test it now! + validations: + required: true + + - type: markdown + attributes: + value: | + # Bug Details + + - type: textarea + attributes: + label: Bug Description + description: >- + Describe the bug in this section. Tell us what you were trying to do and what + happened that you did not expect. Provide a clear and concise description of the + problem and include as many details as possible. + placeholder: | + Marlin doesn't work. + validations: + required: true + + - type: input + attributes: + label: Bug Timeline + description: Is this a new bug or an old issue? When did it first start? + + - type: textarea + attributes: + label: Expected behavior + description: >- + What did you expect to happen? + placeholder: I expected it to move left. + + - type: textarea + attributes: + label: Actual behavior + description: What actually happened instead? + placeholder: It moved right instead of left. + + - type: textarea + attributes: + label: Steps to Reproduce + description: >- + Please describe the steps needed to reproduce the issue. + placeholder: | + 1. [First Step] ... + 2. [Second Step] ... + 3. [and so on] ... + + - type: markdown + attributes: + value: | + # Your Setup + + - type: input + attributes: + label: Version of Marlin Firmware + description: "See the About Menu on the LCD or the output of `M115`. NOTE: For older releases we only patch critical bugs." + validations: + required: true + + - type: input + attributes: + label: Printer model + description: Creality Ender 3, Prusa mini, or Kossel Delta? + + - type: input + attributes: + label: Electronics + description: Stock electronics, upgrade board, or something else? + + - type: input + attributes: + label: Add-ons + description: Please list any hardware add-ons that could be involved. + + - type: dropdown + attributes: + label: Bed Leveling + description: What kind of bed leveling compensation are you using? + options: + - UBL Bilinear mesh + - ABL Bilinear mesh + - ABL Linear grid + - ABL 3-point + - MBL Manual Bed Leveling + - No Bed Leveling + + - type: dropdown + attributes: + label: Your Slicer + description: Do you use Slic3r, Prusa Slicer, Simplify3D, IdeaMaker...? + options: + - Slic3r + - Simplify3D + - Prusa Slicer + - IdeaMaker + - Cura + - Other (explain below) + + - type: dropdown + attributes: + label: Host Software + description: Do you use OctoPrint, Repetier Host, Pronterface...? + options: + - SD Card (headless) + - Repetier Host + - OctoPrint + - Pronterface + - Cura + - Same as my slicer + - Other (explain below) + + - type: markdown + attributes: + value: >- + ## Other things to include + + Please also be sure to include these items to help with troubleshooting: + + * **A ZIP file** containing your `Configuration.h` and `Configuration_adv.h`. + (Please don't paste lengthy configuration text here.) + * **Log output** from the host. (`M111 S247` for maximum logging.) + * **Images or videos** demonstrating the problem, if it helps to make it clear. + * **A G-Code file** that exposes the problem, if not affecting _all_ G-code. + + If you've made any other modifications to the firmware, please describe them in detail in the space provided. + + When pasting formatted text into the box below don't forget to put ` ``` ` (on its own line) before and after to make it readable. + + - type: textarea + attributes: + label: Additional information & file uploads diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000000..3f5d6fe5517d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,20 @@ +blank_issues_enabled: false +contact_links: + - name: 📖 Marlin Documentation + url: http://marlinfw.org/ + about: Lots of documentation on installing and using Marlin. + - name: 👤 MarlinFirmware Facebook group + url: https://www.facebook.com/groups/1049718498464482 + about: Please ask and answer questions here. + - name: 🕹 Marlin on Discord + url: https://discord.gg/n5NJ59y + about: Join the Discord server for support and discussion. + - name: 🔗 Marlin Discussion Forum + url: http://forums.reprap.org/list.php?415 + about: A searchable web forum hosted by RepRap dot org. + - name: 📺 Marlin Videos on YouTube + url: https://www.youtube.com/results?search_query=marlin+firmware + about: Tutorials and more from Marlin users all around the world. Great for new users! + - name: 💸 Want to donate? + url: https://www.thinkyhead.com/donate-to-marlin + about: Please take a look at the various options to support Marlin Firmware's development financially! diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 000000000000..df1938ccd84a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,44 @@ +name: ✨ Request a feature +description: Request a new Marlin Firmware feature +title: "[FR] (feature summary)" +labels: 'T: Feature Request' +body: + - type: markdown + attributes: + value: > + Do you want to ask a question? Are you looking for support? Please use one of the [support links](https://github.com/MarlinFirmware/Marlin/issues/new/choose). + + - type: markdown + attributes: + value: > + **Thank you for requesting a new Marlin Firmware feature!** + + ## Before Requesting a Feature + + - Read and understand Marlin's [Code of Conduct](https://github.com/MarlinFirmware/Marlin/blob/master/.github/code_of_conduct.md). You are expected to comply with it, including treating everyone with respect. + + - Check the latest [`bugfix-2.0.x` branch](https://github.com/MarlinFirmware/Marlin/archive/bugfix-2.0.x.zip) to see if the feature already exists. + + - Before you proceed with your request, please consider if it is necessary to make it into a firmware feature, or if it may be better suited for a slicer or host feature. + + - type: textarea + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear description of the problem (e.g., "I need X but Marlin can't do it [...]"). + + - type: textarea + attributes: + label: Are you looking for hardware support? + description: Tell us the printer, board, or peripheral that needs support. + + - type: textarea + attributes: + label: Describe the feature you want + description: A clear description of the feature and how you think it should work. + validations: + required: true + + - type: textarea + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d82fb0f9e37b..cd5158b3ce8c 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,23 +1,33 @@ -### Requirements + ### Description +### Requirements + + + ### Benefits - + ### Configurations - + ### Related Issues - + diff --git a/.github/workflows/bump-date.yml b/.github/workflows/bump-date.yml new file mode 100644 index 000000000000..a1942777d1ae --- /dev/null +++ b/.github/workflows/bump-date.yml @@ -0,0 +1,36 @@ +# +# bump-date.yml +# Bump the distribution date once per day +# + +name: Bump Distribution Date + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + bump_date: + name: Bump Distribution Date + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-latest + + steps: + + - name: Check out bugfix-2.0.x + uses: actions/checkout@v2 + with: + ref: bugfix-2.0.x + + - name: Bump Distribution Date + run: | + # Inline Bump Script + DIST=$( date +"%Y-%m-%d" ) + eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \ + eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \ + git config user.name "${GITHUB_ACTOR}" && \ + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \ + git add . && \ + git commit -m "[cron] Bump distribution date ($DIST)" && \ + git push diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml new file mode 100644 index 000000000000..93a110f270d3 --- /dev/null +++ b/.github/workflows/check-pr.yml @@ -0,0 +1,33 @@ +# +# check-pr.yml +# Close PRs directed at release branches +# + +name: PR Bad Target + +on: + pull_request_target: + types: [opened] + branches: + - 1.0.x + - 1.1.x + - 2.0.x + +jobs: + bad_target: + name: PR Bad Target + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-latest + + steps: + - uses: superbrothers/close-pull-request@v3 + with: + comment: > + Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases. + + Please redo this PR starting with the `bugfix-2.0.x` branch and be careful to target `bugfix-2.0.x` when resubmitting the PR. + + It may help to set your fork's default branch to `bugfix-2.0.x`. + + See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions. diff --git a/.github/workflows/clean-closed.yml b/.github/workflows/clean-closed.yml new file mode 100644 index 000000000000..befec4498f25 --- /dev/null +++ b/.github/workflows/clean-closed.yml @@ -0,0 +1,39 @@ +# +# clean-closed.yml +# Remove obsolete labels when an Issue or PR is closed +# + +name: Clean Closed + +on: + pull_request: + types: [closed] + issues: + types: [closed] + +jobs: + remove_label: + runs-on: ubuntu-latest + + strategy: + matrix: + label: + - "S: Don't Merge" + - "S: Hold for 2.1" + - "S: Please Merge" + - "S: Please Test" + - "help wanted" + - "Needs: Discussion" + - "Needs: Documentation" + - "Needs: More Data" + - "Needs: Patch" + - "Needs: Testing" + - "Needs: Work" + + steps: + - uses: actions/checkout@v2 + - name: Remove Labels + uses: actions-ecosystem/action-remove-labels@v1 + with: + github_token: ${{ github.token }} + labels: ${{ matrix.label }} diff --git a/.github/workflows/close-stale.yml b/.github/workflows/close-stale.yml new file mode 100644 index 000000000000..f017907d2934 --- /dev/null +++ b/.github/workflows/close-stale.yml @@ -0,0 +1,28 @@ +# +# close-stale.yml +# Close open issues after a period of inactivity +# + +name: Close Stale Issues + +on: + schedule: + - cron: "22 1 * * *" + +jobs: + stale: + name: Close Stale Issues + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.' + days-before-stale: 60 + days-before-close: 10 + stale-issue-label: 'stale-closing-soon' + exempt-all-assignees: true + exempt-issue-labels: 'Bug: Confirmed !,T: Feature Request,Needs: Discussion,Needs: Documentation,Needs: More Data,Needs: Patch,Needs: Work,Needs: Testing,help wanted,no-locking' diff --git a/.github/workflows/lock-closed.yml b/.github/workflows/lock-closed.yml new file mode 100644 index 000000000000..81145688288b --- /dev/null +++ b/.github/workflows/lock-closed.yml @@ -0,0 +1,32 @@ +# +# lock-closed.yml +# Lock closed issues after a period of inactivity +# + +name: Lock Closed Issues + +on: + schedule: + - cron: '0 1/13 * * *' + +jobs: + lock: + name: Lock Closed Issues + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-latest + + steps: + - uses: dessant/lock-threads@v2 + with: + github-token: ${{ github.token }} + process-only: 'issues' + issue-lock-inactive-days: '60' + issue-exclude-created-before: '2017-07-01T00:00:00Z' + issue-exclude-labels: 'no-locking' + issue-lock-labels: '' + issue-lock-comment: > + This issue has been automatically locked since there + has not been any recent activity after it was closed. + Please open a new issue for related bugs. + issue-lock-reason: '' diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index 7549e3defcbb..f5ce466d9051 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -56,28 +56,33 @@ jobs: # STM32F1 (Maple) Environments - - STM32F103RC_btt - - STM32F103RC_btt_USB - - STM32F103RE_btt - - STM32F103RE_btt_USB - - STM32F103RC_fysetc + #- STM32F103RC_btt_maple + - STM32F103RC_btt_USB_maple + - STM32F103RC_fysetc_maple - STM32F103RC_meeb - - jgaurora_a5s_a1 - - STM32F103VE_longer - - mks_robin - - mks_robin_lite - - mks_robin_pro - - STM32F103RET6_creality - - mks_robin_nano35 + - jgaurora_a5s_a1_maple + - STM32F103VE_longer_maple + #- mks_robin_maple + - mks_robin_lite_maple + - mks_robin_pro_maple + #- mks_robin_nano35_maple + #- STM32F103RET6_creality_maple + - STM32F103VE_ZM3E4V2_USB_maple # STM32 (ST) Environments + - STM32F103RC_btt + #- STM32F103RC_btt_USB + - STM32F103RE_btt + - STM32F103RE_btt_USB + - STM32F103RET6_creality + - STM32F103VE_longer - STM32F407VE_black - STM32F401VE_STEVAL - BIGTREE_BTT002 - BIGTREE_SKR_PRO - BIGTREE_GTR_V1_0 - - mks_robin_stm32 + - mks_robin - ARMED - FYSETC_S6 - STM32F070CB_malyan @@ -86,9 +91,13 @@ jobs: - FLYF407ZG - rumba32 - LERDGEX - - mks_robin_nano35_stm32 + - LERDGEK + - mks_robin_nano35 - NUCLEO_F767ZI - REMRAM_V1 + - BTT_SKR_SE_BX + - chitu_f103 + - Index_Mobo_Rev03 # Put lengthy tests last @@ -98,12 +107,30 @@ jobs: # Non-working environment tests #- at90usb1286_cdc #- STM32F103CB_malyan + #- STM32F103RE #- mks_robin_mini steps: + - name: Check out the PR + uses: actions/checkout@v2 + + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Cache PlatformIO + uses: actions/cache@v2 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + - name: Select Python 3.7 - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax. architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified @@ -113,9 +140,6 @@ jobs: pip install -U https://github.com/platformio/platformio-core/archive/develop.zip platformio update - - name: Check out the PR - uses: actions/checkout@v2 - - name: Run ${{ matrix.test-platform }} Tests run: | make tests-single-ci TEST_TARGET=${{ matrix.test-platform }} diff --git a/.github/workflows/unlock-reopened.yml b/.github/workflows/unlock-reopened.yml new file mode 100644 index 000000000000..614ef3fab297 --- /dev/null +++ b/.github/workflows/unlock-reopened.yml @@ -0,0 +1,22 @@ +# +# unlock-reopened.yml +# Unlock an issue whenever it is re-opened +# + +name: "Unlock reopened issue" + +on: + issues: + types: [reopened] + +jobs: + unlock: + name: Unlock Reopened + if: github.repository == 'MarlinFirmware/Marlin' + + runs-on: ubuntu-latest + + steps: + - uses: OSDKDev/unlock-issues@v1.1 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.gitignore b/.gitignore index f7d49cc1ed28..bc603ba38b0d 100755 --- a/.gitignore +++ b/.gitignore @@ -122,29 +122,6 @@ tags .gcc-flags.json /lib/ -# Workaround for Deviot+platformio quirks -Marlin/lib -Marlin/platformio.ini -Marlin/*/platformio.ini -Marlin/*/*/platformio.ini -Marlin/*/*/*/platformio.ini -Marlin/*/*/*/*/platformio.ini -Marlin/.travis.yml -Marlin/*/.travis.yml -Marlin/*/*/.travis.yml -Marlin/*/*/*/.travis.yml -Marlin/*/*/*/*/.travis.yml -Marlin/.gitignore -Marlin/*/.gitignore -Marlin/*/*/.gitignore -Marlin/*/*/*/.gitignore -Marlin/*/*/*/*/.gitignore -Marlin/readme.txt -Marlin/*/readme.txt -Marlin/*/*/readme.txt -Marlin/*/*/*/readme.txt -Marlin/*/*/*/*/readme.txt - # Secure Credentials Configuration_Secure.h @@ -166,7 +143,11 @@ vc-fileutils.settings .vscode/launch.json .vscode/*.db -# cmake +#Simulation +imgui.ini +eeprom.dat + +#cmake CMakeLists.txt src/CMakeLists.txt CMakeListsPrivate.txt diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 9934714252a3..97756453fd75 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -35,37 +35,36 @@ * * Advanced settings can be found in Configuration_adv.h */ -#define CONFIGURATION_H_VERSION 020008 +#define CONFIGURATION_H_VERSION 02000902 //=========================================================================== //============================= Getting Started ============================= //=========================================================================== /** - * Here are some standard links for getting your machine calibrated: + * Here are some useful links to help get your machine configured and calibrated: * - * https://reprap.org/wiki/Calibration - * https://youtu.be/wAL9d7FgInk - * http://calculator.josefprusa.cz - * https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide - * https://www.thingiverse.com/thing:5573 - * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap - * https://www.thingiverse.com/thing:298812 + * Example Configs: https://github.com/MarlinFirmware/Configurations/branches/all + * + * Průša Calculator: https://blog.prusaprinters.org/calculator_3416/ + * + * Calibration Guides: https://reprap.org/wiki/Calibration + * https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide + * https://sites.google.com/site/repraplogphase/calibration-of-your-reprap + * https://youtu.be/wAL9d7FgInk + * + * Calibration Objects: https://www.thingiverse.com/thing:5573 + * https://www.thingiverse.com/thing:1278865 */ //=========================================================================== -//============================= DELTA Printer =============================== +//========================== DELTA / SCARA / TPARA ========================== //=========================================================================== -// For a Delta printer, start with one of the configuration files in the config/examples/delta directory -// from https://github.com/MarlinFirmware/Configurations/branches/all and customize for your machine. // - -//=========================================================================== -//============================= SCARA Printer =============================== -//=========================================================================== -// For a SCARA printer, start with one of the configuration files in the config/examples/SCARA directory -// from https://github.com/MarlinFirmware/Configurations/branches/all and customize for your machine. +// Download configurations from the link above and customize for your machine. +// Examples are located in config/examples/delta, .../SCARA, and .../TPARA. // +//=========================================================================== // @section info @@ -106,14 +105,9 @@ #define SERIAL_PORT 0 /** - * Select a secondary serial port on the board to use for communication with the host. - * Currently Ethernet (-2) is only supported on Teensy 4.1 boards. - * :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7] - */ -//#define SERIAL_PORT_2 -1 - -/** - * This setting determines the communication speed of the printer. + * Serial Port Baud Rate + * This is the default communication speed for all serial ports. + * Set the baud rate defaults for additional serial ports below. * * 250000 works in most cases, but you might try a lower speed if * you commonly experience drop-outs during host printing. @@ -122,6 +116,23 @@ * :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] */ #define BAUDRATE 250000 +//#define BAUD_RATE_GCODE // Enable G-code M575 to set the baud rate + +/** + * Select a secondary serial port on the board to use for communication with the host. + * Currently Ethernet (-2) is only supported on Teensy 4.1 boards. + * :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +//#define SERIAL_PORT_2 -1 +//#define BAUDRATE_2 250000 // Enable to override BAUDRATE + +/** + * Select a third serial port on the board to use for communication with the host. + * Currently only supported for AVR, DUE, LPC1768/9 and STM32/STM32F1 + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + */ +//#define SERIAL_PORT_3 1 +//#define BAUDRATE_3 250000 // Enable to override BAUDRATE // Enable the Bluetooth serial interface on AT90USB devices //#define BLUETOOTH @@ -138,6 +149,45 @@ // Choose your own or use a service like https://www.uuidgenerator.net/version4 //#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" +/** + * Define the number of coordinated linear axes. + * See https://github.com/DerAndere1/Marlin/wiki + * Each linear axis gets its own stepper control and endstop: + * + * Steppers: *_STEP_PIN, *_ENABLE_PIN, *_DIR_PIN, *_ENABLE_ON + * Endstops: *_STOP_PIN, USE_*MIN_PLUG, USE_*MAX_PLUG + * Axes: *_MIN_POS, *_MAX_POS, INVERT_*_DIR + * Planner: DEFAULT_AXIS_STEPS_PER_UNIT, DEFAULT_MAX_FEEDRATE + * DEFAULT_MAX_ACCELERATION, AXIS_RELATIVE_MODES, + * MICROSTEP_MODES, MANUAL_FEEDRATE + * + * :[3, 4, 5, 6] + */ +//#define LINEAR_AXES 3 + +/** + * Axis codes for additional axes: + * This defines the axis code that is used in G-code commands to + * reference a specific axis. + * 'A' for rotational axis parallel to X + * 'B' for rotational axis parallel to Y + * 'C' for rotational axis parallel to Z + * 'U' for secondary linear axis parallel to X + * 'V' for secondary linear axis parallel to Y + * 'W' for secondary linear axis parallel to Z + * Regardless of the settings, firmware-internal axis IDs are + * I (AXIS4), J (AXIS5), K (AXIS6). + */ +#if LINEAR_AXES >= 4 + #define AXIS4_NAME 'A' // :['A', 'B', 'C', 'U', 'V', 'W'] +#endif +#if LINEAR_AXES >= 5 + #define AXIS5_NAME 'B' // :['A', 'B', 'C', 'U', 'V', 'W'] +#endif +#if LINEAR_AXES >= 6 + #define AXIS6_NAME 'C' // :['A', 'B', 'C', 'U', 'V', 'W'] +#endif + // @section extruder // This defines the number of extruders @@ -161,11 +211,11 @@ * Multi-Material Unit * Set to one of these predefined models: * - * PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version) - * PRUSA_MMU2 : Průša MMU2 - * PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5) - * SMUFF_EMU_MMU2 : Technik Gegg SMUFF (Průša MMU2 emulation mode) - * SMUFF_EMU_MMU2S : Technik Gegg SMUFF (Průša MMU2S emulation mode) + * PRUSA_MMU1 : Průša MMU1 (The "multiplexer" version) + * PRUSA_MMU2 : Průša MMU2 + * PRUSA_MMU2S : Průša MMU2S (Requires MK3S extruder with motion sensor, EXTRUDERS = 5) + * EXTENDABLE_EMU_MMU2 : MMU with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware) + * EXTENDABLE_EMU_MMU2S : MMUS with configurable number of filaments (ERCF, SMuFF or similar with Průša MMU2 compatible firmware) * * Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. * See additional options in Configuration_adv.h. @@ -210,7 +260,6 @@ #define PARKING_EXTRUDER_PARKING_X { -78, 184 } // X positions for parking the extruders #define PARKING_EXTRUDER_GRAB_DISTANCE 1 // (mm) Distance to move beyond the parking point to grab the extruder - //#define MANUAL_SOLENOID_CONTROL // Manual control of docking solenoids with M380 S / M381 #if ENABLED(PARKING_EXTRUDER) @@ -292,6 +341,7 @@ #define MIXING_VIRTUAL_TOOLS 16 // Use the Virtual Tool method with M163 and M164 //#define DIRECT_MIXING_IN_G1 // Allow ABCDHI mix factors in G1 movement commands //#define GRADIENT_MIX // Support for gradient mixing with M166 and LCD + //#define MIXING_PRESETS // Assign 8 default V-tool presets for 2 or 3 MIXING_STEPPERS #if ENABLED(GRADIENT_MIX) //#define GRADIENT_VTOOL // Add M166 T to use a V-tool index as a Gradient alias #endif @@ -316,6 +366,9 @@ //#define PSU_NAME "Power Supply" #if ENABLED(PSU_CONTROL) + //#define MKS_PWC // Using the MKS PWC add-on + //#define PS_OFF_CONFIRM // Confirm dialog when power off + //#define PS_OFF_SOUND // Beep 1s when power off #define PSU_ACTIVE_STATE LOW // Set 'LOW' for ATX, 'HIGH' for X-Box //#define PSU_DEFAULT_OFF // Keep power off until enabled directly with M80 @@ -330,8 +383,10 @@ #define AUTO_POWER_E_FANS #define AUTO_POWER_CONTROLLERFAN #define AUTO_POWER_CHAMBER_FAN + #define AUTO_POWER_COOLER_FAN //#define AUTO_POWER_E_TEMP 50 // (°C) Turn on PSU if any extruder is over this temperature //#define AUTO_POWER_CHAMBER_TEMP 30 // (°C) Turn on PSU if the chamber is over this temperature + //#define AUTO_POWER_COOLER_TEMP 26 // (°C) Turn on PSU if the cooler is over this temperature #define POWER_TIMEOUT 30 // (s) Turn off power if the machine is idle for this duration //#define POWER_OFF_DELAY 60 // (s) Delay of poweroff after M81 command. Useful to let fans run for extra time. #endif @@ -343,70 +398,93 @@ // @section temperature /** - * --NORMAL IS 4.7kohm PULLUP!-- 1kohm pullup can be used on hotend sensor, using correct resistor and table + * --NORMAL IS 4.7kΩ PULLUP!-- 1kΩ pullup can be used on hotend sensor, using correct resistor and table * * Temperature sensors available: * - * -5 : PT100 / PT1000 with MAX31865 (only for sensors 0-1) - * -3 : thermocouple with MAX31855 (only for sensors 0-1) - * -2 : thermocouple with MAX6675 (only for sensors 0-1) - * -4 : thermocouple with AD8495 - * -1 : thermocouple with AD595 + * SPI RTD/Thermocouple Boards - IMPORTANT: Read the NOTE below! + * ------- + * -5 : MAX31865 with Pt100/Pt1000, 2, 3, or 4-wire (only for sensors 0-1) + * NOTE: You must uncomment/set the MAX31865_*_OHMS_n defines below. + * -3 : MAX31855 with Thermocouple, -200°C to +700°C (only for sensors 0-1) + * -2 : MAX6675 with Thermocouple, 0°C to +700°C (only for sensors 0-1) + * + * NOTE: Ensure TEMP_n_CS_PIN is set in your pins file for each TEMP_SENSOR_n using an SPI Thermocouple. By default, + * Hardware SPI on the default serial bus is used. If you have also set TEMP_n_SCK_PIN and TEMP_n_MISO_PIN, + * Software SPI will be used on those ports instead. You can force Hardware SPI on the default bus in the + * Configuration_adv.h file. At this time, separate Hardware SPI buses for sensors are not supported. + * + * Analog Themocouple Boards + * ------- + * -4 : AD8495 with Thermocouple + * -1 : AD595 with Thermocouple + * + * Analog Thermistors - 4.7kΩ pullup - Normal + * ------- + * 1 : 100kΩ EPCOS - Best choice for EPCOS thermistors + * 331 : 100kΩ Same as #1, but 3.3V scaled for MEGA + * 332 : 100kΩ Same as #1, but 3.3V scaled for DUE + * 2 : 200kΩ ATC Semitec 204GT-2 + * 202 : 200kΩ Copymaster 3D + * 3 : ???Ω Mendel-parts thermistor + * 4 : 10kΩ Generic Thermistor !! DO NOT use for a hotend - it gives bad resolution at high temp. !! + * 5 : 100kΩ ATC Semitec 104GT-2/104NT-4-R025H42G - Used in ParCan, J-Head, and E3D, SliceEngineering 300°C + * 501 : 100kΩ Zonestar - Tronxy X3A + * 502 : 100kΩ Zonestar - used by hot bed in Zonestar Průša P802M + * 512 : 100kΩ RPW-Ultra hotend + * 6 : 100kΩ EPCOS - Not as accurate as table #1 (created using a fluke thermocouple) + * 7 : 100kΩ Honeywell 135-104LAG-J01 + * 71 : 100kΩ Honeywell 135-104LAF-J01 + * 8 : 100kΩ Vishay 0603 SMD NTCS0603E3104FXT + * 9 : 100kΩ GE Sensing AL03006-58.2K-97-G1 + * 10 : 100kΩ RS PRO 198-961 + * 11 : 100kΩ Keenovo AC silicone mats, most Wanhao i3 machines - beta 3950, 1% + * 12 : 100kΩ Vishay 0603 SMD NTCS0603E3104FXT (#8) - calibrated for Makibox hot bed + * 13 : 100kΩ Hisens up to 300°C - for "Simple ONE" & "All In ONE" hotend - beta 3950, 1% + * 15 : 100kΩ Calibrated for JGAurora A5 hotend + * 18 : 200kΩ ATC Semitec 204GT-2 Dagoma.Fr - MKS_Base_DKU001327 + * 22 : 100kΩ GTM32 Pro vB - hotend - 4.7kΩ pullup to 3.3V and 220Ω to analog input + * 23 : 100kΩ GTM32 Pro vB - bed - 4.7kΩ pullup to 3.3v and 220Ω to analog input + * 30 : 100kΩ Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K - beta 3950 + * 60 : 100kΩ Maker's Tool Works Kapton Bed Thermistor - beta 3950 + * 61 : 100kΩ Formbot/Vivedino 350°C Thermistor - beta 3950 + * 66 : 4.7MΩ Dyze Design High Temperature Thermistor + * 67 : 500kΩ SliceEngineering 450°C Thermistor + * 70 : 100kΩ bq Hephestos 2 + * 75 : 100kΩ Generic Silicon Heat Pad with NTC100K MGB18-104F39050L32 + * 2000 : 100kΩ Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor + * + * Analog Thermistors - 1kΩ pullup - Atypical, and requires changing out the 4.7kΩ pullup for 1kΩ. + * ------- (but gives greater accuracy and more stable PID) + * 51 : 100kΩ EPCOS (1kΩ pullup) + * 52 : 200kΩ ATC Semitec 204GT-2 (1kΩ pullup) + * 55 : 100kΩ ATC Semitec 104GT-2 - Used in ParCan & J-Head (1kΩ pullup) + * + * Analog Thermistors - 10kΩ pullup - Atypical + * ------- + * 99 : 100kΩ Found on some Wanhao i3 machines with a 10kΩ pull-up resistor + * + * Analog RTDs (Pt100/Pt1000) + * ------- + * 110 : Pt100 with 1kΩ pullup (atypical) + * 147 : Pt100 with 4.7kΩ pullup + * 1010 : Pt1000 with 1kΩ pullup (atypical) + * 1047 : Pt1000 with 4.7kΩ pullup (E3D) + * 20 : Pt100 with circuit in the Ultimainboard V2.x with mainboard ADC reference voltage = INA826 amplifier-board supply voltage. + * NOTE: (1) Must use an ADC input with no pullup. (2) Some INA826 amplifiers are unreliable at 3.3V so consider using sensor 147, 110, or 21. + * 21 : Pt100 with circuit in the Ultimainboard V2.x with 3.3v ADC reference voltage (STM32, LPC176x....) and 5V INA826 amplifier board supply. + * NOTE: ADC pins are not 5V tolerant. Not recommended because it's possible to damage the CPU by going over 500°C. + * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x + * + * Custom/Dummy/Other Thermal Sensors + * ------ * 0 : not used - * 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) - * 331 : (3.3V scaled thermistor 1 table for MEGA) - * 332 : (3.3V scaled thermistor 1 table for DUE) - * 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) - * 202 : 200k thermistor - Copymaster 3D - * 3 : Mendel-parts thermistor (4.7k pullup) - * 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! - * 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan, J-Head, and E3D) (4.7k pullup) - * 501 : 100K Zonestar (Tronxy X3A) Thermistor - * 502 : 100K Zonestar Thermistor used by hot bed in Zonestar Průša P802M - * 512 : 100k RPW-Ultra hotend thermistor (4.7k pullup) - * 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) - * 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) - * 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) - * 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) - * 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) - * 10 : 100k RS thermistor 198-961 (4.7k pullup) - * 11 : 100k beta 3950 1% thermistor (Used in Keenovo AC silicone mats and most Wanhao i3 machines) (4.7k pullup) - * 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) - * 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" - * 15 : 100k thermistor calibration for JGAurora A5 hotend - * 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 - * 20 : Pt100 with circuit in the Ultimainboard V2.x with mainboard ADC reference voltage = INA826 amplifier-board supply voltage. - * NOTES: (1) Must use an ADC input with no pullup. (2) Some INA826 amplifiers are unreliable at 3.3V so consider using sensor 147, 110, or 21. - * 21 : Pt100 with circuit in the Ultimainboard V2.x with 3.3v ADC reference voltage (STM32, LPC176x....) and 5V INA826 amplifier board supply. - * NOTE: ADC pins are not 5V tolerant. Not recommended because it's possible to damage the CPU by going over 500°C. - * 22 : 100k (hotend) with 4.7k pullup to 3.3V and 220R to analog input (as in GTM32 Pro vB) - * 23 : 100k (bed) with 4.7k pullup to 3.3v and 220R to analog input (as in GTM32 Pro vB) - * 30 : Kis3d Silicone heating mat 200W/300W with 6mm precision cast plate (EN AW 5083) NTC100K / B3950 (4.7k pullup) - * 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x - * 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 - * 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup - * 66 : 4.7M High Temperature thermistor from Dyze Design - * 67 : 450C thermistor from SliceEngineering - * 70 : the 100K thermistor found in the bq Hephestos 2 - * 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor - * 99 : 100k thermistor with a 10K pull-up resistor (found on some Wanhao i3 machines) - * - * 1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. - * (but gives greater accuracy and more stable PID) - * 51 : 100k thermistor - EPCOS (1k pullup) - * 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) - * 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup) - * - * 1047 : Pt1000 with 4k7 pullup (E3D) - * 1010 : Pt1000 with 1k pullup (non standard) - * 147 : Pt100 with 4k7 pullup - * 110 : Pt100 with 1k pullup (non standard) - * * 1000 : Custom - Specify parameters in Configuration_adv.h * - * Use these for Testing or Development purposes. NEVER for production machine. + * !!! Use these for Testing or Development purposes. NEVER for production machine. !!! * 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. * 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below. + * */ #define TEMP_SENSOR_0 5 #define TEMP_SENSOR_1 0 @@ -419,6 +497,9 @@ #define TEMP_SENSOR_BED 5 #define TEMP_SENSOR_PROBE 0 #define TEMP_SENSOR_CHAMBER 0 +#define TEMP_SENSOR_COOLER 0 +#define TEMP_SENSOR_BOARD 0 +#define TEMP_SENSOR_REDUNDANT 0 // Dummy thermistor constant temperature readings, for use with 998 and 999 #define DUMMY_THERMISTOR_998_VALUE 25 @@ -426,22 +507,37 @@ // Resistor values when using MAX31865 sensors (-5) on TEMP_SENSOR_0 / 1 //#define MAX31865_SENSOR_OHMS_0 100 // (Ω) Typically 100 or 1000 (PT100 or PT1000) -//#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for AdaFruit PT100; 4300 for AdaFruit PT1000 +//#define MAX31865_CALIBRATION_OHMS_0 430 // (Ω) Typically 430 for Adafruit PT100; 4300 for Adafruit PT1000 //#define MAX31865_SENSOR_OHMS_1 100 //#define MAX31865_CALIBRATION_OHMS_1 430 -// Use temp sensor 1 as a redundant sensor with sensor 0. If the readings -// from the two sensors differ too much the print will be aborted. -//#define TEMP_SENSOR_1_AS_REDUNDANT -#define MAX_REDUNDANT_TEMP_SENSOR_DIFF 10 +#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 +#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_RESIDENCY_TIME 10 // (seconds) Time to wait for hotend to "settle" in M109 -#define TEMP_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer -#define TEMP_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target +#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190 +#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target -#define TEMP_BED_RESIDENCY_TIME 10 // (seconds) Time to wait for bed to "settle" in M190 -#define TEMP_BED_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer -#define TEMP_BED_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target +#define TEMP_CHAMBER_RESIDENCY_TIME 10 // (seconds) Time to wait for chamber to "settle" in M191 +#define TEMP_CHAMBER_WINDOW 1 // (°C) Temperature proximity for the "temperature reached" timer +#define TEMP_CHAMBER_HYSTERESIS 3 // (°C) Temperature proximity considered "close enough" to the target + +/** + * Redundant Temperature Sensor (TEMP_SENSOR_REDUNDANT) + * + * Use a temp sensor as a redundant sensor for another reading. Select an unused temperature sensor, and another + * sensor you'd like it to be redundant for. If the two thermistors differ by TEMP_SENSOR_REDUNDANT_MAX_DIFF (°C), + * the print will be aborted. Whichever sensor is selected will have its normal functions disabled; i.e. selecting + * the Bed sensor (-1) will disable bed heating/monitoring. + * + * For selecting source/target use: COOLER, PROBE, BOARD, CHAMBER, BED, E0, E1, E2, E3, E4, E5, E6, E7 + */ +#if TEMP_SENSOR_REDUNDANT + #define TEMP_SENSOR_REDUNDANT_SOURCE E1 // The sensor that will provide the redundant reading. + #define TEMP_SENSOR_REDUNDANT_TARGET E0 // The sensor that we are providing a redundant reading for. + #define TEMP_SENSOR_REDUNDANT_MAX_DIFF 10 // (°C) Temperature difference that will trigger a print abort. +#endif // Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. @@ -454,6 +550,7 @@ #define HEATER_6_MINTEMP 5 #define HEATER_7_MINTEMP 5 #define BED_MINTEMP 5 +#define CHAMBER_MINTEMP 5 // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. @@ -467,6 +564,17 @@ #define HEATER_6_MAXTEMP 275 #define HEATER_7_MAXTEMP 275 #define BED_MAXTEMP 150 +#define CHAMBER_MAXTEMP 60 + +/** + * Thermal Overshoot + * During heatup (and printing) the temperature can often "overshoot" the target by many degrees + * (especially before PID tuning). Setting the target temperature too close to MAXTEMP guarantees + * a MAXTEMP shutdown! Use these values to forbid temperatures being set too close to MAXTEMP. + */ +#define HOTEND_OVERSHOOT 15 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT +#define BED_OVERSHOOT 10 // (°C) Forbid temperatures over MAXTEMP - OVERSHOOT +#define COOLER_OVERSHOOT 2 // (°C) Forbid temperatures closer than OVERSHOOT //=========================================================================== //============================= PID Settings ================================ @@ -486,8 +594,8 @@ // Set/get with gcode: M301 E[extruder number, 0-2] #if ENABLED(PID_PARAMS_PER_HOTEND) - // Specify between 1 and HOTENDS values per array. - // If fewer than EXTRUDER values are provided, the last element will be repeated. + // Specify up to one value per hotend here, according to your setup. + // If there are fewer values, the last one applies to the remaining hotends. #define DEFAULT_Kp_LIST { 22.20, 22.20 } #define DEFAULT_Ki_LIST { 1.08, 1.08 } #define DEFAULT_Kd_LIST { 114.00, 114.00 } @@ -540,7 +648,51 @@ // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles. #endif // PIDTEMPBED -#if EITHER(PIDTEMP, PIDTEMPBED) +//=========================================================================== +//==================== PID > Chamber Temperature Control ==================== +//=========================================================================== + +/** + * PID Chamber Heating + * + * If this option is enabled set PID constants below. + * If this option is disabled, bang-bang will be used and CHAMBER_LIMIT_SWITCHING will enable + * hysteresis. + * + * The PID frequency will be the same as the extruder PWM. + * If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, + * which is fine for driving a square wave into a resistive load and does not significantly + * impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 200W + * heater. If your configuration is significantly different than this and you don't understand + * the issues involved, don't use chamber PID until someone else verifies that your hardware works. + */ +//#define PIDTEMPCHAMBER +//#define CHAMBER_LIMIT_SWITCHING + +/** + * Max Chamber Power + * Applies to all forms of chamber control (PID, bang-bang, and bang-bang with hysteresis). + * When set to any value below 255, enables a form of PWM to the chamber heater that acts like a divider + * so don't use it unless you are OK with PWM on your heater. (See the comment on enabling PIDTEMPCHAMBER) + */ +#define MAX_CHAMBER_POWER 255 // limits duty cycle to chamber heater; 255=full current + +#if ENABLED(PIDTEMPCHAMBER) + #define MIN_CHAMBER_POWER 0 + //#define PID_CHAMBER_DEBUG // Sends debug data to the serial port. + + // Lasko "MyHeat Personal Heater" (200w) modified with a Fotek SSR-10DA to control only the heating element + // and placed inside the small Creality printer enclosure tent. + // + #define DEFAULT_chamberKp 37.04 + #define DEFAULT_chamberKi 1.40 + #define DEFAULT_chamberKd 655.17 + // M309 P37.04 I1.04 D655.17 + + // FIND YOUR OWN: "M303 E-2 C8 S50" to run autotune on the chamber at 50 degreesC for 8 cycles. +#endif // PIDTEMPCHAMBER + +#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER) //#define PID_DEBUG // Sends debug data to the serial port. Use 'M303 D' to toggle activation. //#define PID_OPENLOOP // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX //#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay @@ -587,6 +739,7 @@ #define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders #define THERMAL_PROTECTION_BED // Enable thermal protection for the heated bed #define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber +#define THERMAL_PROTECTION_COOLER // Enable thermal protection for the laser cooling //=========================================================================== //============================= Mechanical Settings ========================= @@ -604,6 +757,16 @@ //#define COREZY //#define MARKFORGED_XY // MarkForged. See https://reprap.org/forum/read.php?152,504042 +// Enable for a belt style printer with endless "Z" motion +//#define BELTPRINTER + +// Enable for Polargraph Kinematics +//#define POLARGRAPH +#if ENABLED(POLARGRAPH) + #define POLARGRAPH_MAX_BELT_LEN 1035.0 + #define POLAR_SEGMENTS_PER_SECOND 5 +#endif + //=========================================================================== //============================== Endstop Settings =========================== //=========================================================================== @@ -616,20 +779,32 @@ #define USE_XMIN_PLUG #define USE_YMIN_PLUG #define USE_ZMIN_PLUG +//#define USE_IMIN_PLUG +//#define USE_JMIN_PLUG +//#define USE_KMIN_PLUG //#define USE_XMAX_PLUG //#define USE_YMAX_PLUG //#define USE_ZMAX_PLUG +//#define USE_IMAX_PLUG +//#define USE_JMAX_PLUG +//#define USE_KMAX_PLUG // Enable pullup for all endstops to prevent a floating state #define ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS) // Disable ENDSTOPPULLUPS to set pullups individually - //#define ENDSTOPPULLUP_XMAX - //#define ENDSTOPPULLUP_YMAX - //#define ENDSTOPPULLUP_ZMAX //#define ENDSTOPPULLUP_XMIN //#define ENDSTOPPULLUP_YMIN #define ENDSTOPPULLUP_ZMIN + //#define ENDSTOPPULLUP_IMIN + //#define ENDSTOPPULLUP_JMIN + //#define ENDSTOPPULLUP_KMIN + //#define ENDSTOPPULLUP_XMAX + //#define ENDSTOPPULLUP_YMAX + //#define ENDSTOPPULLUP_ZMAX + //#define ENDSTOPPULLUP_IMAX + //#define ENDSTOPPULLUP_JMAX + //#define ENDSTOPPULLUP_KMAX #define ENDSTOPPULLUP_ZMIN_PROBE #endif @@ -637,22 +812,34 @@ //#define ENDSTOPPULLDOWNS #if DISABLED(ENDSTOPPULLDOWNS) // Disable ENDSTOPPULLDOWNS to set pulldowns individually - //#define ENDSTOPPULLDOWN_XMAX - //#define ENDSTOPPULLDOWN_YMAX - //#define ENDSTOPPULLDOWN_ZMAX //#define ENDSTOPPULLDOWN_XMIN //#define ENDSTOPPULLDOWN_YMIN //#define ENDSTOPPULLDOWN_ZMIN + //#define ENDSTOPPULLDOWN_IMIN + //#define ENDSTOPPULLDOWN_JMIN + //#define ENDSTOPPULLDOWN_KMIN + //#define ENDSTOPPULLDOWN_XMAX + //#define ENDSTOPPULLDOWN_YMAX + //#define ENDSTOPPULLDOWN_ZMAX + //#define ENDSTOPPULLDOWN_IMAX + //#define ENDSTOPPULLDOWN_JMAX + //#define ENDSTOPPULLDOWN_KMAX //#define ENDSTOPPULLDOWN_ZMIN_PROBE #endif // Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup). -#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. #define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. -#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop. +#define Z_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define I_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define J_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define K_MIN_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. #define X_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. #define Y_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. #define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define I_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define J_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. +#define K_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop. #define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe. /** @@ -681,6 +868,9 @@ //#define Z2_DRIVER_TYPE A4988 //#define Z3_DRIVER_TYPE A4988 //#define Z4_DRIVER_TYPE A4988 +//#define I_DRIVER_TYPE A4988 +//#define J_DRIVER_TYPE A4988 +//#define K_DRIVER_TYPE A4988 #define E0_DRIVER_TYPE A4988 //#define E1_DRIVER_TYPE A4988 //#define E2_DRIVER_TYPE A4988 @@ -734,14 +924,14 @@ /** * Default Axis Steps Per Unit (steps/mm) * Override with M92 - * X, Y, Z, E0 [, E1[, E2...]] + * X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]] */ #define DEFAULT_AXIS_STEPS_PER_UNIT { 98.9, 100.4, 397.47, 412.9 } /** * Default Max Feed Rate (mm/s) * Override with M203 - * X, Y, Z, E0 [, E1[, E2...]] + * X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]] */ #define DEFAULT_MAX_FEEDRATE { 120, 120, 5, 40 } @@ -754,7 +944,7 @@ * Default Max Acceleration (change/s) change = mm/s * (Maximum start speed for accelerated moves) * Override with M201 - * X, Y, Z, E0 [, E1[, E2...]] + * X, Y, Z [, I [, J [, K]]], E0 [, E1[, E2...]] */ #define DEFAULT_MAX_ACCELERATION { 300, 300, 100, 10000 } @@ -788,6 +978,9 @@ #define DEFAULT_XJERK 10.0 #define DEFAULT_YJERK 10.0 #define DEFAULT_ZJERK 0.3 + //#define DEFAULT_IJERK 0.3 + //#define DEFAULT_JJERK 0.3 + //#define DEFAULT_KJERK 0.3 //#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves @@ -871,7 +1064,6 @@ * or (with LCD_BED_LEVELING) the LCD controller. */ //#define PROBE_MANUALLY -//#define MANUAL_PROBE_START_Z 0.2 /** * A Fix-Mounted Probe either doesn't deploy or needs manual deployment. @@ -928,7 +1120,7 @@ #endif // Duet Smart Effector (for delta printers) - https://bit.ly/2ul5U7J -// When the pin is defined you can use M672 to set/reset the probe sensivity. +// When the pin is defined you can use M672 to set/reset the probe sensitivity. //#define DUET_SMART_EFFECTOR #if ENABLED(DUET_SMART_EFFECTOR) #define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin @@ -993,13 +1185,13 @@ #define PROBING_MARGIN 10 // X and Y axis travel speed (mm/min) between probes -#define XY_PROBE_SPEED (50*60) +#define XY_PROBE_FEEDRATE (50*60) // Feedrate (mm/min) for the first approach when double-probing (MULTIPLE_PROBING == 2) -#define Z_PROBE_SPEED_FAST (4*60) +#define Z_PROBE_FEEDRATE_FAST (4*60) // Feedrate (mm/min) for the "accurate" probe of each point -#define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2) +#define Z_PROBE_FEEDRATE_SLOW (Z_PROBE_FEEDRATE_FAST / 2) /** * Probe Activation Switch @@ -1084,9 +1276,11 @@ //#define PROBING_HEATERS_OFF // Turn heaters off when probing #if ENABLED(PROBING_HEATERS_OFF) //#define WAIT_FOR_BED_HEATER // Wait for bed to heat back up between probes (to improve accuracy) + //#define WAIT_FOR_HOTEND // Wait for hotend to heat back up between probes (to improve accuracy & prevent cold extrude) #endif //#define PROBING_FANS_OFF // Turn fans off when probing -//#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing +//#define PROBING_ESTEPPERS_OFF // Turn all extruder steppers off when probing +//#define PROBING_STEPPERS_OFF // Turn all steppers off (unless needed to hold position) when probing (including extruders) //#define DELAY_BEFORE_PROBING 200 // (ms) To prevent vibrations from triggering piezo sensors // Require minimum nozzle and/or bed temperature for probing @@ -1102,12 +1296,18 @@ #define Y_ENABLE_ON 0 #define Z_ENABLE_ON 0 #define E_ENABLE_ON 0 // For all extruders +//#define I_ENABLE_ON 0 +//#define J_ENABLE_ON 0 +//#define K_ENABLE_ON 0 // Disable axis steppers immediately when they're not being stepped. // WARNING: When motors turn off there is a chance of losing position accuracy! #define DISABLE_X false #define DISABLE_Y false #define DISABLE_Z false +//#define DISABLE_I false +//#define DISABLE_J false +//#define DISABLE_K false // Turn off the display blinking that warns about possible accuracy reduction //#define DISABLE_REDUCED_ACCURACY_WARNING @@ -1123,6 +1323,9 @@ #define INVERT_X_DIR false #define INVERT_Y_DIR false #define INVERT_Z_DIR true +//#define INVERT_I_DIR false +//#define INVERT_J_DIR false +//#define INVERT_K_DIR false // @section extruder @@ -1140,7 +1343,13 @@ //#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed. Also enable HOME_AFTER_DEACTIVATE for extra safety. //#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated. Also enable NO_MOTION_BEFORE_HOMING for extra safety. -//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off. + +/** + * Set Z_IDLE_HEIGHT if the Z-Axis moves on its own when steppers are disabled. + * - Use a low value (i.e., Z_MIN_POS) if the nozzle falls down to the bed. + * - Use a large value (i.e., Z_MAX_POS) if the bed falls down, away from the nozzle. + */ +//#define Z_IDLE_HEIGHT Z_HOME_POS #define Z_HOMING_HEIGHT 4 // (mm) Minimal Z height before homing (G28) for Z clearance above the bed, clamps, ... // Be sure to have this much clearance over your Z_MAX_POS to prevent grinding. @@ -1152,10 +1361,13 @@ #define X_HOME_DIR -1 #define Y_HOME_DIR -1 #define Z_HOME_DIR -1 +//#define I_HOME_DIR -1 +//#define J_HOME_DIR -1 +//#define K_HOME_DIR -1 // @section machine -// The size of the print bed +// The size of the printable area #define X_BED_SIZE 200 #define Y_BED_SIZE 200 @@ -1166,6 +1378,12 @@ #define X_MAX_POS 290 #define Y_MAX_POS 255 #define Z_MAX_POS 180 +//#define I_MIN_POS 0 +//#define I_MAX_POS 50 +//#define J_MIN_POS 0 +//#define J_MAX_POS 50 +//#define K_MIN_POS 0 +//#define K_MAX_POS 50 /** * Software Endstops @@ -1182,6 +1400,9 @@ #define MIN_SOFTWARE_ENDSTOP_X #define MIN_SOFTWARE_ENDSTOP_Y #define MIN_SOFTWARE_ENDSTOP_Z + #define MIN_SOFTWARE_ENDSTOP_I + #define MIN_SOFTWARE_ENDSTOP_J + #define MIN_SOFTWARE_ENDSTOP_K #endif // Max software endstops constrain movement within maximum coordinate bounds @@ -1190,6 +1411,9 @@ #define MAX_SOFTWARE_ENDSTOP_X #define MAX_SOFTWARE_ENDSTOP_Y #define MAX_SOFTWARE_ENDSTOP_Z + #define MAX_SOFTWARE_ENDSTOP_I + #define MAX_SOFTWARE_ENDSTOP_J + #define MAX_SOFTWARE_ENDSTOP_K #endif #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) @@ -1217,6 +1441,8 @@ #define FIL_RUNOUT_STATE LOW // Pin state indicating that filament is NOT present. #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + //#define WATCH_ALL_RUNOUT_SENSORS // Execute runout script on any triggering sensor, not only for the active extruder. + // This is automatically enabled for MIXING_EXTRUDERs. // Override individually if the runout sensors vary //#define FIL_RUNOUT1_STATE LOW @@ -1251,8 +1477,9 @@ //#define FIL_RUNOUT8_PULLUP //#define FIL_RUNOUT8_PULLDOWN - // Set one or more commands to execute on filament runout. - // (After 'M412 H' Marlin will ask the host to handle the process.) + // Commands to execute on filament runout. + // With multiple runout sensors use the %c placeholder for the current tool in commands (e.g., "M600 T%c") + // NOTE: After 'M412 H1' the host handles filament runout and this script does not apply. #define FILAMENT_RUNOUT_SCRIPT "M600" // After a runout is detected, continue printing this length of filament @@ -1336,6 +1563,11 @@ */ //#define DEBUG_LEVELING_FEATURE +#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL, PROBE_MANUALLY) + // Set a height for the start of manual adjustment + #define MANUAL_PROBE_START_Z 0.2 // (mm) Comment out to use the last-measured height +#endif + #if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL) // Gradually reduce leveling correction until a set height is reached, // at which point movement will be level to the machine's XY plane. @@ -1405,12 +1637,16 @@ #define GRID_MAX_POINTS_X 10 // Don't use more than 15 points per axis, implementation limited. #define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X + //#define UBL_HILBERT_CURVE // Use Hilbert distribution for less travel when probing multiple points + #define UBL_MESH_EDIT_MOVES_Z // Sophisticated users prefer no movement of nozzle #define UBL_SAVE_ACTIVE_ON_M500 // Save the currently active mesh in the current slot on M500 //#define UBL_Z_RAISE_WHEN_OFF_MESH 2.5 // When the nozzle is off the mesh, this value is used // as the Z-Height correction value. + //#define UBL_MESH_WIZARD // Run several commands in a row to get a complete mesh + #elif ENABLED(MESH_BED_LEVELING) //=========================================================================== @@ -1488,16 +1724,17 @@ //#define MANUAL_X_HOME_POS 0 //#define MANUAL_Y_HOME_POS 0 //#define MANUAL_Z_HOME_POS 0 +//#define MANUAL_I_HOME_POS 0 +//#define MANUAL_J_HOME_POS 0 +//#define MANUAL_K_HOME_POS 0 -// Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. -// -// With this feature enabled: -// -// - Allow Z homing only after X and Y homing AND stepper drivers still enabled. -// - If stepper drivers time out, it will need X and Y homing again before Z homing. -// - Move the Z probe (or nozzle) to a defined XY point before Z Homing. -// - Prevent Z homing when the Z probe is outside bed area. -// +/** + * Use "Z Safe Homing" to avoid homing with a Z probe outside the bed area. + * + * - Moves the Z probe (or nozzle) to a defined XY point before Z homing. + * - Allows Z homing only when XY positions are known and trusted. + * - If stepper drivers sleep, XY homing may be required again before Z homing. + */ #define Z_SAFE_HOMING #if ENABLED(Z_SAFE_HOMING) @@ -1618,12 +1855,14 @@ // #define PREHEAT_1_LABEL "PLA" #define PREHEAT_1_TEMP_HOTEND 210 -#define PREHEAT_1_TEMP_BED 65 +#define PREHEAT_1_TEMP_BED 70 +#define PREHEAT_1_TEMP_CHAMBER 35 #define PREHEAT_1_FAN_SPEED 0 // Value from 0 to 255 #define PREHEAT_2_LABEL "ABS" #define PREHEAT_2_TEMP_HOTEND 240 #define PREHEAT_2_TEMP_BED 110 +#define PREHEAT_2_TEMP_CHAMBER 35 #define PREHEAT_2_FAN_SPEED 0 // Value from 0 to 255 /** @@ -1728,11 +1967,20 @@ /** * Print Job Timer * - * Automatically start and stop the print job timer on M104/M109/M190. + * Automatically start and stop the print job timer on M104/M109/M140/M190/M141/M191. + * The print job timer will only be stopped if the bed/chamber target temp is + * below BED_MINTEMP/CHAMBER_MINTEMP. * - * M104 (hotend, no wait) - high temp = none, low temp = stop timer - * M109 (hotend, wait) - high temp = start timer, low temp = stop timer - * M190 (bed, wait) - high temp = start timer, low temp = none + * M104 (hotend, no wait) - high temp = none, low temp = stop timer + * M109 (hotend, wait) - high temp = start timer, low temp = stop timer + * M140 (bed, no wait) - high temp = none, low temp = stop timer + * M190 (bed, wait) - high temp = start timer, low temp = none + * M141 (chamber, no wait) - high temp = none, low temp = stop timer + * M191 (chamber, wait) - high temp = start timer, low temp = none + * + * For M104/M109, high temp is anything over EXTRUDE_MINTEMP / 2. + * For M140/M190, high temp is anything over BED_MINTEMP. + * For M141/M191, high temp is anything over CHAMBER_MINTEMP. * * The timer can also be controlled with the following commands: * @@ -1801,10 +2049,10 @@ * * Select the language to display on the LCD. These languages are available: * - * en, an, bg, ca, cz, da, de, el, el_gr, es, eu, fi, fr, gl, hr, hu, it, + * en, an, bg, ca, cz, da, de, el, el_CY, es, eu, fi, fr, gl, hr, hu, it, * jp_kana, ko_KR, nl, pl, pt, pt_br, ro, ru, sk, sv, tr, uk, vi, zh_CN, zh_TW * - * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el_gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)' } + * :{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek (Greece)', 'el_CY':'Greek (Cyprus)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)' } */ #define LCD_LANGUAGE en @@ -1916,6 +2164,7 @@ // Add individual axis homing items (Home X, Home Y, and Home Z) to the LCD menu. // #define INDIVIDUAL_AXIS_HOMING_MENU +//#define INDIVIDUAL_AXIS_HOMING_SUBMENU // // SPEAKER/BUZZER @@ -1948,6 +2197,14 @@ // //#define REPRAP_DISCOUNT_SMART_CONTROLLER +// +// GT2560 (YHCB2004) LCD Display +// +// Requires Testato, Koepel softwarewire library and +// Andriy Golovnya's LiquidCrystal_AIP31068 library. +// +//#define YHCB2004 + // // Original RADDS LCD Display+Encoder+SDCardReader // http://doku.radds.org/dokumentation/lcd-display/ @@ -2100,6 +2357,11 @@ #define ST7920_DELAY_1 DELAY_NS(200) #define ST7920_DELAY_2 DELAY_NS(400) #define ST7920_DELAY_3 DELAY_NS(200) +// +// K.3D Full Graphic Smart Controller +// +//#define K3D_FULL_GRAPHIC_SMART_CONTROLLER + // // ReprapWorld Graphical LCD // https://reprapworld.com/?products_details&products_id/1218 @@ -2161,11 +2423,17 @@ // //#define MKS_MINI_12864 +// +// MKS MINI12864 V3 is an alias for FYSETC_MINI_12864_2_1. Type A/B. NeoPixel RGB Backlight. +// +//#define MKS_MINI_12864_V3 + // // MKS LCD12864A/B with graphic controller and SD support. Follows MKS_MINI_12864 pinout. // https://www.aliexpress.com/item/33018110072.html // -//#define MKS_LCD12864 +//#define MKS_LCD12864A +//#define MKS_LCD12864B // // FYSETC variant of the MINI12864 graphic controller with SD support @@ -2237,7 +2505,7 @@ //#define OLED_PANEL_TINYBOY2 // -// MKS OLED 1.3" 128×64 FULL GRAPHICS CONTROLLER +// MKS OLED 1.3" 128×64 Full Graphics Controller // https://reprap.org/wiki/MKS_12864OLED // // Tiny, but very sharp OLED display @@ -2246,7 +2514,7 @@ //#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller // -// Zonestar OLED 128×64 FULL GRAPHICS CONTROLLER +// Zonestar OLED 128×64 Full Graphics Controller // //#define ZONESTAR_12864LCD // Graphical (DOGM) with ST7920 controller //#define ZONESTAR_12864OLED // 1.3" OLED with SH1106 controller (default) @@ -2263,10 +2531,15 @@ //#define OVERLORD_OLED // -// FYSETC OLED 2.42" 128×64 FULL GRAPHICS CONTROLLER with WS2812 RGB +// FYSETC OLED 2.42" 128×64 Full Graphics Controller with WS2812 RGB // Where to find : https://www.aliexpress.com/item/4000345255731.html //#define FYSETC_242_OLED_12864 // Uses the SSD1309 controller +// +// K.3D SSD1309 OLED 2.42" 128×64 Full Graphics Controller +// +//#define K3D_242_OLED_CONTROLLER // Software SPI + //============================================================================= //========================== Extensible UI Displays =========================== //============================================================================= @@ -2275,10 +2548,42 @@ // DGUS Touch Display with DWIN OS. (Choose one.) // ORIGIN : https://www.aliexpress.com/item/32993409517.html // FYSETC : https://www.aliexpress.com/item/32961471929.html +// MKS : https://www.aliexpress.com/item/1005002008179262.html +// +// Flash display with DGUS Displays for Marlin: +// - Format the SD card to FAT32 with an allocation size of 4kb. +// - Download files as specified for your type of display. +// - Plug the microSD card into the back of the display. +// - Boot the display and wait for the update to complete. +// +// ORIGIN (Marlin DWIN_SET) +// - Download https://github.com/coldtobi/Marlin_DGUS_Resources +// - Copy the downloaded DWIN_SET folder to the SD card. +// +// FYSETC (Supplier default) +// - Download https://github.com/FYSETC/FYSTLCD-2.0 +// - Copy the downloaded SCREEN folder to the SD card. +// +// HIPRECY (Supplier default) +// - Download https://github.com/HiPrecy/Touch-Lcd-LEO +// - Copy the downloaded DWIN_SET folder to the SD card. +// +// MKS (MKS-H43) (Supplier default) +// - Download https://github.com/makerbase-mks/MKS-H43 +// - Copy the downloaded DWIN_SET folder to the SD card. +// +// RELOADED (T5UID1) +// - Download https://github.com/Desuuuu/DGUS-reloaded/releases +// - Copy the downloaded DWIN_SET folder to the SD card. // //#define DGUS_LCD_UI_ORIGIN //#define DGUS_LCD_UI_FYSETC //#define DGUS_LCD_UI_HIPRECY +//#define DGUS_LCD_UI_MKS +//#define DGUS_LCD_UI_RELOADED +#if ENABLED(DGUS_LCD_UI_MKS) + #define USE_MKS_GREEN_UI +#endif // // Touch-screen LCD for Malyan M200/M300 printers @@ -2304,6 +2609,14 @@ //#define ANYCUBIC_LCD_DEBUG #endif +// +// 320x240 Nextion 2.8" serial TFT Resistive Touch Screen NX3224T028 +// +//#define NEXTION_TFT +#if ENABLED(NEXTION_TFT) + #define LCD_SERIAL_PORT 1 // Default is 1 for Nextion +#endif + // // Third-party or vendor-customized controller interfaces. // Sources should be installed in 'src/lcd/extui'. @@ -2389,6 +2702,11 @@ // //#define ANET_ET5_TFT35 +// +// 1024x600, 7", RGB Stock Display from BIQU-BX +// +//#define BIQU_BX_TFT70 + // // Generic TFT with detailed options // @@ -2405,6 +2723,7 @@ //#define TFT_RES_320x240 //#define TFT_RES_480x272 //#define TFT_RES_480x320 + //#define TFT_RES_1024x600 #endif /** @@ -2445,13 +2764,31 @@ //#define DWIN_CREALITY_LCD // -// ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8 +// Ender-3 v2 OEM display, enhanced. +// +//#define DWIN_CREALITY_LCD_ENHANCED + +// +// Ender-3 v2 OEM display with enhancements by Jacob Myers +// +//#define DWIN_CREALITY_LCD_JYERSUI + +// +// MarlinUI for Creality's DWIN display (and others) +// +//#define DWIN_MARLINUI_PORTRAIT +//#define DWIN_MARLINUI_LANDSCAPE + +// +// Touch Screen Settings // //#define TOUCH_SCREEN #if ENABLED(TOUCH_SCREEN) #define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens #define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus + //#define TOUCH_IDLE_SLEEP 300 // (secs) Turn off the TFT backlight if set (5mn) + #define TOUCH_SCREEN_CALIBRATION //#define TOUCH_CALIBRATION_X 12316 @@ -2559,7 +2896,7 @@ //#define NEOPIXEL_LED #if ENABLED(NEOPIXEL_LED) #define NEOPIXEL_TYPE NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h) - #define NEOPIXEL_PIN 4 // LED driving pin + //#define NEOPIXEL_PIN 4 // LED driving pin //#define NEOPIXEL2_TYPE NEOPIXEL_TYPE //#define NEOPIXEL2_PIN 5 #define NEOPIXEL_PIXELS 30 // Number of LEDs in the strip. (Longest strip when NEOPIXEL2_SEPARATE is disabled.) @@ -2577,9 +2914,11 @@ //#define NEOPIXEL2_INSERIES // Default behavior is NeoPixel 2 in parallel #endif - // Use a single NeoPixel LED for static (background) lighting - //#define NEOPIXEL_BKGD_LED_INDEX 0 // Index of the LED to use - //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W + // Use some of the NeoPixel LEDs for static (background) lighting + //#define NEOPIXEL_BKGD_INDEX_FIRST 0 // Index of the first background LED + //#define NEOPIXEL_BKGD_INDEX_LAST 5 // Index of the last background LED + //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W + //#define NEOPIXEL_BKGD_ALWAYS_ON // Keep the backlight on when other NeoPixels are off #endif /** @@ -2604,9 +2943,9 @@ * Set this manually if there are extra servos needing manual control. * Set to 0 to turn off servo support. */ -//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command +//#define NUM_SERVOS 3 // Note: Servo index starts with 0 for M280-M282 commands -// (ms) Delay before the next move will start, to give the servo time to reach its target angle. +// (ms) Delay before the next move will start, to give the servo time to reach its target angle. // 300ms is a good value but you can try less delay. // If the servo can't reach the requested position, increase it. #define SERVO_DELAY { 300 } @@ -2616,3 +2955,6 @@ // Edit servo angles with M281 and save to EEPROM with M500 //#define EDITABLE_SERVO_ANGLES + +// Disable servo with M282 to reduce power consumption, noise, and heat when not in use +//#define SERVO_DETACH_GCODE diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index e063812af524..ae54499f6125 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -30,7 +30,7 @@ * * Basic settings can be found in Configuration.h */ -#define CONFIGURATION_ADV_H_VERSION 020008 +#define CONFIGURATION_ADV_H_VERSION 02000902 //=========================================================================== //============================= Thermal Settings ============================ @@ -113,10 +113,45 @@ #define CHAMBER_BETA 3950 // Beta value #endif -// -// Hephestos 2 24V heated bed upgrade kit. -// https://store.bq.com/en/heated-bed-kit-hephestos2 -// +#if TEMP_SENSOR_COOLER == 1000 + #define COOLER_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define COOLER_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define COOLER_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_PROBE == 1000 + #define PROBE_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define PROBE_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define PROBE_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_BOARD == 1000 + #define BOARD_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define BOARD_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define BOARD_BETA 3950 // Beta value +#endif + +#if TEMP_SENSOR_REDUNDANT == 1000 + #define REDUNDANT_PULLUP_RESISTOR_OHMS 4700 // Pullup resistor + #define REDUNDANT_RESISTANCE_25C_OHMS 100000 // Resistance at 25C + #define REDUNDANT_BETA 3950 // Beta value +#endif + +/** + * Configuration options for MAX Thermocouples (-2, -3, -5). + * FORCE_HW_SPI: Ignore SCK/MOSI/MISO pins and just use the CS pin & default SPI bus. + * MAX31865_WIRES: Set the number of wires for the probe connected to a MAX31865 board, 2-4. Default: 2 + * MAX31865_50HZ: Enable 50Hz filter instead of the default 60Hz. + */ +//#define TEMP_SENSOR_FORCE_HW_SPI +//#define MAX31865_SENSOR_WIRES_0 2 +//#define MAX31865_SENSOR_WIRES_1 2 +//#define MAX31865_50HZ_FILTER + +/** + * Hephestos 2 24V heated bed upgrade kit. + * https://store.bq.com/en/heated-bed-kit-hephestos2 + */ //#define HEPHESTOS2_HEATED_BED_KIT #if ENABLED(HEPHESTOS2_HEATED_BED_KIT) #undef TEMP_SENSOR_BED @@ -137,17 +172,21 @@ // // Heated Chamber options // +#if DISABLED(PIDTEMPCHAMBER) + #define CHAMBER_CHECK_INTERVAL 5000 // (ms) Interval between checks in bang-bang control + #if ENABLED(CHAMBER_LIMIT_SWITCHING) + #define CHAMBER_HYSTERESIS 2 // (°C) Only set the relevant heater state when ABS(T-target) > CHAMBER_HYSTERESIS + #endif +#endif + #if TEMP_SENSOR_CHAMBER - #define CHAMBER_MINTEMP 5 - #define CHAMBER_MAXTEMP 60 - #define TEMP_CHAMBER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target - //#define CHAMBER_LIMIT_SWITCHING - //#define HEATER_CHAMBER_PIN 44 // Chamber heater on/off pin + //#define HEATER_CHAMBER_PIN P2_04 // Required heater on/off pin (example: SKR 1.4 Turbo HE1 plug) //#define HEATER_CHAMBER_INVERTING false + //#define FAN1_PIN -1 // Remove the fan signal on pin P2_04 (example: SKR 1.4 Turbo HE1 plug) //#define CHAMBER_FAN // Enable a fan on the chamber #if ENABLED(CHAMBER_FAN) - #define CHAMBER_FAN_MODE 2 // Fan control mode: 0=Static; 1=Linear increase when temp is higher than target; 2=V-shaped curve. + #define CHAMBER_FAN_MODE 2 // Fan control mode: 0=Static; 1=Linear increase when temp is higher than target; 2=V-shaped curve; 3=similar to 1 but fan is always on. #if CHAMBER_FAN_MODE == 0 #define CHAMBER_FAN_BASE 255 // Chamber fan PWM (0-255) #elif CHAMBER_FAN_MODE == 1 @@ -156,6 +195,9 @@ #elif CHAMBER_FAN_MODE == 2 #define CHAMBER_FAN_BASE 128 // Minimum chamber fan PWM (0-255) #define CHAMBER_FAN_FACTOR 25 // PWM increase per °C difference from target + #elif CHAMBER_FAN_MODE == 3 + #define CHAMBER_FAN_BASE 128 // Base chamber fan PWM (0-255) + #define CHAMBER_FAN_FACTOR 25 // PWM increase per °C above target #endif #endif @@ -169,6 +211,51 @@ #endif #endif +// +// Laser Cooler options +// +#if TEMP_SENSOR_COOLER + #define COOLER_MINTEMP 8 // (°C) + #define COOLER_MAXTEMP 26 // (°C) + #define COOLER_DEFAULT_TEMP 16 // (°C) + #define TEMP_COOLER_HYSTERESIS 1 // (°C) Temperature proximity considered "close enough" to the target + #define COOLER_PIN 8 // Laser cooler on/off pin used to control power to the cooling element (e.g., TEC, External chiller via relay) + #define COOLER_INVERTING false + #define TEMP_COOLER_PIN 15 // Laser/Cooler temperature sensor pin. ADC is required. + #define COOLER_FAN // Enable a fan on the cooler, Fan# 0,1,2,3 etc. + #define COOLER_FAN_INDEX 0 // FAN number 0, 1, 2 etc. e.g. + #if ENABLED(COOLER_FAN) + #define COOLER_FAN_BASE 100 // Base Cooler fan PWM (0-255); turns on when Cooler temperature is above the target + #define COOLER_FAN_FACTOR 25 // PWM increase per °C above target + #endif +#endif + +// +// Motherboard Sensor options +// +#if TEMP_SENSOR_BOARD + #define THERMAL_PROTECTION_BOARD // Halt the printer if the board sensor leaves the temp range below. + #define BOARD_MINTEMP 8 // (°C) + #define BOARD_MAXTEMP 70 // (°C) + #ifndef TEMP_BOARD_PIN + //#define TEMP_BOARD_PIN -1 // Board temp sensor pin, if not set in pins file. + #endif +#endif + +// +// Laser Coolant Flow Meter +// +//#define LASER_COOLANT_FLOW_METER +#if ENABLED(LASER_COOLANT_FLOW_METER) + #define FLOWMETER_PIN 20 // Requires an external interrupt-enabled pin (e.g., RAMPS 2,3,18,19,20,21) + #define FLOWMETER_PPL 5880 // (pulses/liter) Flow meter pulses-per-liter on the input pin + #define FLOWMETER_INTERVAL 1000 // (ms) Flow rate calculation interval in milliseconds + #define FLOWMETER_SAFETY // Prevent running the laser without the minimum flow rate set below + #if ENABLED(FLOWMETER_SAFETY) + #define FLOWMETER_MIN_LITERS_PER_MINUTE 1.5 // (liters/min) Minimum flow required when enabled + #endif +#endif + /** * Thermal Protection provides additional protection to your printer from damage * and fire. Marlin always includes safe min and max temperature ranges which @@ -238,6 +325,20 @@ #define WATCH_CHAMBER_TEMP_INCREASE 2 // Degrees Celsius #endif +/** + * Thermal Protection parameters for the laser cooler. + */ +#if ENABLED(THERMAL_PROTECTION_COOLER) + #define THERMAL_PROTECTION_COOLER_PERIOD 10 // Seconds + #define THERMAL_PROTECTION_COOLER_HYSTERESIS 3 // Degrees Celsius + + /** + * Laser cooling watch settings (M143/M193). + */ + #define WATCH_COOLER_TEMP_PERIOD 60 // Seconds + #define WATCH_COOLER_TEMP_INCREASE 3 // Degrees Celsius +#endif + #if ENABLED(PIDTEMP) // Add an experimental additional term to the heater power, proportional to the extrusion speed. // A well-chosen Kc value should add just enough power to melt the increased material volume. @@ -331,7 +432,7 @@ * High Temperature Thermistor Support * * Thermistors able to support high temperature tend to have a hard time getting - * good readings at room and lower temperatures. This means HEATER_X_RAW_LO_TEMP + * good readings at room and lower temperatures. This means TEMP_SENSOR_X_RAW_LO_TEMP * will probably be caught when the heating element first turns on during the * preheating process, which will trigger a min_temp_error as a safety measure * and force stop everything. @@ -397,16 +498,20 @@ */ //#define USE_CONTROLLER_FAN #if ENABLED(USE_CONTROLLER_FAN) - //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan - //#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered - //#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled. - #define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.) - #define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled - #define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled - #define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors - //#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings + //#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan + //#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered + //#define CONTROLLER_FAN_IGNORE_Z // Ignore Z stepper. Useful when stepper timeout is disabled. + #define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.) + #define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled + #define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled + #define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors + + // Use TEMP_SENSOR_BOARD as a trigger for enabling the controller fan + //#define CONTROLLER_FAN_MIN_BOARD_TEMP 40 // (°C) Turn on the fan if the board reaches this temperature + + //#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings #if ENABLED(CONTROLLER_FAN_EDITABLE) - #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu + #define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu #endif #endif @@ -460,6 +565,11 @@ //#define USE_OCR2A_AS_TOP #endif +/** + * Use one of the PWM fans as a redundant part-cooling fan + */ +//#define REDUNDANT_PART_COOLING_FAN 2 // Index of the fan to sync with FAN 0. + // @section extruder /** @@ -483,11 +593,15 @@ #define E6_AUTO_FAN_PIN -1 #define E7_AUTO_FAN_PIN -1 #define CHAMBER_AUTO_FAN_PIN -1 +#define COOLER_AUTO_FAN_PIN -1 +#define COOLER_FAN_PIN -1 #define EXTRUDER_AUTO_FAN_TEMPERATURE 30 #define EXTRUDER_AUTO_FAN_SPEED 255 // 255 == full speed #define CHAMBER_AUTO_FAN_TEMPERATURE 30 #define CHAMBER_AUTO_FAN_SPEED 255 +#define COOLER_AUTO_FAN_TEMPERATURE 18 +#define COOLER_AUTO_FAN_SPEED 255 /** * Part-Cooling Fan Multiplexer @@ -509,12 +623,17 @@ #define INVERT_CASE_LIGHT false // Set true if Case Light is ON when pin is LOW #define CASE_LIGHT_DEFAULT_ON true // Set default power-up state on #define CASE_LIGHT_DEFAULT_BRIGHTNESS 105 // Set default power-up brightness (0-255, requires PWM pin) - //#define CASE_LIGHT_MAX_PWM 128 // Limit pwm - //#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu //#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting. - //#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light, requires NEOPIXEL_LED. - #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) - #define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } + //#define CASE_LIGHT_MAX_PWM 128 // Limit PWM duty cycle (0-255) + //#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu + #if ENABLED(NEOPIXEL_LED) + //#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light + #endif + #if EITHER(RGB_LED, RGBW_LED) + //#define CASE_LIGHT_USE_RGB_LED // Use RGB / RGBW LED as case light + #endif + #if EITHER(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED) + #define CASE_LIGHT_DEFAULT_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White } #endif #endif @@ -596,6 +715,12 @@ #endif #endif +// Drive the E axis with two synchronized steppers +//#define E_DUAL_STEPPER_DRIVERS +#if ENABLED(E_DUAL_STEPPER_DRIVERS) + //#define INVERT_E1_VS_E0_DIR // Enable if the E motors need opposite DIR states +#endif + /** * Dual X Carriage * @@ -659,7 +784,7 @@ * the position of the toolhead relative to the workspace. */ -//#define SENSORLESS_BACKOFF_MM { 2, 2 } // (mm) Backoff from endstops before sensorless homing +//#define SENSORLESS_BACKOFF_MM { 2, 2, 0 } // (mm) Backoff from endstops before sensorless homing #define HOMING_BUMP_MM { 5, 5, 2 } // (mm) Backoff from endstops after first bump #define HOMING_BUMP_DIVISOR { 2, 2, 4 } // Re-Bump Speed Divisor (Divides the Homing Feedrate) @@ -730,8 +855,8 @@ /** * Use "HIGH SPEED" mode for probing. * Danger: Disable if your probe sometimes fails. Only suitable for stable well-adjusted systems. - * This feature was designed for Delta's with very fast Z moves however higher speed cartesians may function - * If the machine cannot raise the probe fast enough after a trigger, it may enter a fault state. + * This feature was designed for Deltabots with very fast Z moves; however, higher speed Cartesians + * might be able to use it. If the machine can't raise Z fast enough the BLTouch may go into ALARM. */ //#define BLTOUCH_HS_MODE @@ -843,6 +968,9 @@ #define INVERT_X_STEP_PIN false #define INVERT_Y_STEP_PIN false #define INVERT_Z_STEP_PIN false +#define INVERT_I_STEP_PIN false +#define INVERT_J_STEP_PIN false +#define INVERT_K_STEP_PIN false #define INVERT_E_STEP_PIN false /** @@ -854,11 +982,11 @@ #define DISABLE_INACTIVE_X true #define DISABLE_INACTIVE_Y true #define DISABLE_INACTIVE_Z true // Set 'false' if the nozzle could fall onto your printed part! +#define DISABLE_INACTIVE_I true +#define DISABLE_INACTIVE_J true +#define DISABLE_INACTIVE_K true #define DISABLE_INACTIVE_E true -// If the Nozzle or Bed falls when the Z stepper is disabled, set its resting position here. -//#define Z_AFTER_DEACTIVATE Z_HOME_POS - // Default Minimum Feedrates for printing and travel moves #define DEFAULT_MINIMUMFEEDRATE 0.0 // (mm/s) Minimum feedrate. Set with M205 S. #define DEFAULT_MINTRAVELFEEDRATE 0.0 // (mm/s) Minimum travel feedrate. Set with M205 T. @@ -897,9 +1025,12 @@ #if ENABLED(BACKLASH_COMPENSATION) // Define values for backlash distance and correction. // If BACKLASH_GCODE is enabled these values are the defaults. - #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) + #define BACKLASH_DISTANCE_MM { 0, 0, 0 } // (mm) One value for each linear axis #define BACKLASH_CORRECTION 0.0 // 0.0 = no correction; 1.0 = full correction + // Add steps for motor direction changes on CORE kinematics + //#define CORE_BACKLASH + // Set BACKLASH_SMOOTHING_MM to spread backlash correction over multiple segments // to reduce print artifacts. (Enabling this is costly in memory and computation!) //#define BACKLASH_SMOOTHING_MM 3 // (mm) @@ -917,7 +1048,7 @@ // increments while checking for the contact to be broken. #define BACKLASH_MEASUREMENT_LIMIT 0.5 // (mm) #define BACKLASH_MEASUREMENT_RESOLUTION 0.005 // (mm) - #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_SPEED_SLOW // (mm/min) + #define BACKLASH_MEASUREMENT_FEEDRATE Z_PROBE_FEEDRATE_SLOW // (mm/min) #endif #endif #endif @@ -965,6 +1096,13 @@ #define CALIBRATION_MEASURE_LEFT #define CALIBRATION_MEASURE_BACK + //#define CALIBRATION_MEASURE_IMIN + //#define CALIBRATION_MEASURE_IMAX + //#define CALIBRATION_MEASURE_JMIN + //#define CALIBRATION_MEASURE_JMAX + //#define CALIBRATION_MEASURE_KMIN + //#define CALIBRATION_MEASURE_KMAX + // Probing at the exact top center only works if the center is flat. If // probing on a screwhead or hollow washer, probe near the edges. //#define CALIBRATION_MEASURE_AT_TOP_EDGES @@ -1058,7 +1196,7 @@ // @section lcd -#if EITHER(IS_ULTIPANEL, EXTENSIBLE_UI) +#if ANY(HAS_LCD_MENU, EXTENSIBLE_UI, HAS_DWIN_E3V2) #define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel #define FINE_MANUAL_MOVE 0.025 // (mm) Smallest manual move (< 0.1mm) applying to Z on most machines #if IS_ULTIPANEL @@ -1137,6 +1275,9 @@ #endif #endif + // Insert a menu for preheating at the top level to allow for quick access + //#define PREHEAT_SHORTCUT_MENU_ITEM + #endif // HAS_LCD_MENU #if HAS_DISPLAY @@ -1163,11 +1304,14 @@ //#define LCD_SHOW_E_TOTAL #endif -#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) && ANY(HAS_MARLINUI_U8GLIB, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, EXTENSIBLE_UI) - //#define SHOW_REMAINING_TIME // Display estimated time to completion - #if ENABLED(SHOW_REMAINING_TIME) - //#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation - //#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time +// LCD Print Progress options +#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) + #if ANY(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, IS_DWIN_MARLINUI) + //#define SHOW_REMAINING_TIME // Display estimated time to completion + #if ENABLED(SHOW_REMAINING_TIME) + //#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation + //#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time + #endif #endif #if EITHER(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI) @@ -1223,6 +1367,8 @@ //#define BROWSE_MEDIA_ON_INSERT // Open the file browser when media is inserted + //#define MEDIA_MENU_AT_TOP // Force the media menu to be listed on the top of the main menu + #define EVENT_GCODE_SD_ABORT "G28XY" // G-code to run on SD Abort Print (e.g., "G28XY" or "G27") #if ENABLED(PRINTER_EVENT_LEDS) @@ -1241,7 +1387,6 @@ #if ENABLED(POWER_LOSS_RECOVERY) #define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500) //#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss - //#define POWER_LOSS_RECOVER_ZHOME // Z homing is needed for proper recovery. 99.9% of the time this should be disabled! //#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS) //#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module. //#define POWER_LOSS_STATE HIGH // State of pin indicating power loss @@ -1253,6 +1398,12 @@ // Without a POWER_LOSS_PIN the following option helps reduce wear on the SD card, // especially with "vase mode" printing. Set too high and vases cannot be continued. #define POWER_LOSS_MIN_Z_CHANGE 0.05 // (mm) Minimum Z change before saving power-loss data + + // Enable if Z homing is needed for proper recovery. 99.9% of the time this should be disabled! + //#define POWER_LOSS_RECOVER_ZHOME + #if ENABLED(POWER_LOSS_RECOVER_ZHOME) + //#define POWER_LOSS_ZHOME_POS { 0, 0 } // Safe XY position to home Z while avoiding objects on the bed + #endif #endif /** @@ -1398,6 +1549,15 @@ // Enable if SD detect is rendered useless (e.g., by using an SD extender) //#define NO_SD_DETECT + // Multiple volume support - EXPERIMENTAL. + //#define MULTI_VOLUME + #if ENABLED(MULTI_VOLUME) + #define VOLUME_SD_ONBOARD + #define VOLUME_USB_FLASH_DRIVE + #define DEFAULT_VOLUME SV_SD_ONBOARD + #define DEFAULT_SHARED_VOLUME SV_USB_FLASH_DRIVE + #endif + #endif // SDSUPPORT /** @@ -1419,16 +1579,10 @@ * printing performance versus fast display updates. */ #if HAS_MARLINUI_U8GLIB - // Show SD percentage next to the progress bar - //#define DOGM_SD_PERCENT - // Save many cycles by drawing a hollow frame or no frame on the Info Screen //#define XYZ_NO_FRAME #define XYZ_HOLLOW_FRAME - // Enable to save many cycles by drawing a hollow frame on Menu Screens - #define MENU_HOLLOW_FRAME - // A bigger font is available for edit items. Costs 3120 bytes of PROGMEM. // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. //#define USE_BIG_EDIT_FONT @@ -1437,9 +1591,6 @@ // Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese. //#define USE_SMALL_INFOFONT - // Swap the CW/CCW indicators in the graphics overlay - //#define OVERLAY_GFX_REVERSE - /** * ST7920-based LCDs can emulate a 16 x 4 character display using * the ST7920 character-generator for very fast screen updates. @@ -1470,11 +1621,13 @@ */ //#define STATUS_COMBINE_HEATERS // Use combined heater images instead of separate ones //#define STATUS_HOTEND_NUMBERLESS // Use plain hotend icons instead of numbered ones (with 2+ hotends) - #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM) + #define STATUS_HOTEND_INVERTED // Show solid nozzle bitmaps when heating (Requires STATUS_HOTEND_ANIM for numbered hotends) #define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating #define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating #define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating //#define STATUS_CUTTER_ANIM // Use a second bitmap to indicate spindle / laser active + //#define STATUS_COOLER_ANIM // Use a second bitmap to indicate laser cooling + //#define STATUS_FLOWMETER_ANIM // Use multiple bitmaps to indicate coolant flow //#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap //#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap //#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames @@ -1489,6 +1642,17 @@ #endif // HAS_MARLINUI_U8GLIB +#if HAS_MARLINUI_U8GLIB || IS_DWIN_MARLINUI + // Show SD percentage next to the progress bar + //#define SHOW_SD_PERCENT + + // Enable to save many cycles by drawing a hollow frame on Menu Screens + #define MENU_HOLLOW_FRAME + + // Swap the CW/CCW indicators in the graphics overlay + //#define OVERLAY_GFX_REVERSE +#endif + // // Additional options for DGUS / DWIN displays // @@ -1502,12 +1666,12 @@ #define DGUS_UPDATE_INTERVAL_MS 500 // (ms) Interval between automatic screen updates - #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY) + #if ANY(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_MKS, DGUS_LCD_UI_HIPRECY) #define DGUS_PRINT_FILENAME // Display the filename during printing #define DGUS_PREHEAT_UI // Display a preheat screen during heatup - #if ENABLED(DGUS_LCD_UI_FYSETC) - //#define DGUS_UI_MOVE_DIS_OPTION // Disabled by default for UI_FYSETC + #if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_MKS) + //#define DGUS_UI_MOVE_DIS_OPTION // Disabled by default for FYSETC and MKS #else #define DGUS_UI_MOVE_DIS_OPTION // Enabled by default for UI_HIPRECY #endif @@ -1526,10 +1690,35 @@ #endif #endif // HAS_DGUS_LCD +// +// Additional options for AnyCubic Chiron TFT displays +// +#if ENABLED(ANYCUBIC_LCD_CHIRON) + // By default the type of panel is automatically detected. + // Enable one of these options if you know the panel type. + //#define CHIRON_TFT_STANDARD + //#define CHIRON_TFT_NEW + + // Enable the longer Anycubic powerup startup tune + //#define AC_DEFAULT_STARTUP_TUNE + + /** + * Display Folders + * By default the file browser lists all G-code files (including those in subfolders) in a flat list. + * Enable this option to display a hierarchical file browser. + * + * NOTES: + * - Without this option it helps to enable SDCARD_SORT_ALPHA so files are sorted before/after folders. + * - When used with the "new" panel, folder names will also have '.gcode' appended to their names. + * This hack is currently required to force the panel to show folders. + */ + #define AC_SD_FOLDER_VIEW +#endif + // // Specify additional languages for the UI. Default specified by LCD_LANGUAGE. // -#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE) +#if ANY(DOGLCD, TFT_COLOR_UI, TOUCH_UI_FTDI_EVE, IS_DWIN_MARLINUI) //#define LCD_LANGUAGE_2 fr //#define LCD_LANGUAGE_3 de //#define LCD_LANGUAGE_4 es @@ -1548,8 +1737,10 @@ //#define LCD_4DSYSTEMS_4DLCD_FT843 // 4D Systems 4.3" (480x272) //#define LCD_HAOYU_FT800CB // Haoyu with 4.3" or 5" (480x272) //#define LCD_HAOYU_FT810CB // Haoyu with 5" (800x480) - //#define LCD_ALEPHOBJECTS_CLCD_UI // Aleph Objects Color LCD UI + //#define LCD_LULZBOT_CLCD_UI // LulzBot Color LCD UI //#define LCD_FYSETC_TFT81050 // FYSETC with 5" (800x480) + //#define LCD_EVE3_50G // Matrix Orbital 5.0", 800x480, BT815 + //#define LCD_EVE2_50G // Matrix Orbital 5.0", 800x480, FT813 // Correct the resolution if not using the stock TFT panel. //#define TOUCH_UI_320x240 @@ -1557,8 +1748,8 @@ //#define TOUCH_UI_800x480 // Mappings for boards with a standard RepRapDiscount Display connector - //#define AO_EXP1_PINMAP // AlephObjects CLCD UI EXP1 mapping - //#define AO_EXP2_PINMAP // AlephObjects CLCD UI EXP2 mapping + //#define AO_EXP1_PINMAP // LulzBot CLCD UI EXP1 mapping + //#define AO_EXP2_PINMAP // LulzBot CLCD UI EXP2 mapping //#define CR10_TFT_PINMAP // Rudolph Riedel's CR10 pin mapping //#define S6_TFT_PINMAP // FYSETC S6 pin mapping //#define F6_TFT_PINMAP // FYSETC F6 pin mapping @@ -1819,30 +2010,30 @@ //#define USE_TEMP_EXT_COMPENSATION // Probe temperature calibration generates a table of values starting at PTC_SAMPLE_START - // (e.g. 30), in steps of PTC_SAMPLE_RES (e.g. 5) with PTC_SAMPLE_COUNT (e.g. 10) samples. + // (e.g., 30), in steps of PTC_SAMPLE_RES (e.g., 5) with PTC_SAMPLE_COUNT (e.g., 10) samples. - //#define PTC_SAMPLE_START 30.0f - //#define PTC_SAMPLE_RES 5.0f - //#define PTC_SAMPLE_COUNT 10U + //#define PTC_SAMPLE_START 30 // (°C) + //#define PTC_SAMPLE_RES 5 // (°C) + //#define PTC_SAMPLE_COUNT 10 // Bed temperature calibration builds a similar table. - //#define BTC_SAMPLE_START 60.0f - //#define BTC_SAMPLE_RES 5.0f - //#define BTC_SAMPLE_COUNT 10U + //#define BTC_SAMPLE_START 60 // (°C) + //#define BTC_SAMPLE_RES 5 // (°C) + //#define BTC_SAMPLE_COUNT 10 // The temperature the probe should be at while taking measurements during bed temperature // calibration. - //#define BTC_PROBE_TEMP 30.0f + //#define BTC_PROBE_TEMP 30 // (°C) - // Height above Z=0.0f to raise the nozzle. Lowering this can help the probe to heat faster. - // Note: the Z=0.0f offset is determined by the probe offset which can be set using M851. - //#define PTC_PROBE_HEATING_OFFSET 0.5f + // Height above Z=0.0 to raise the nozzle. Lowering this can help the probe to heat faster. + // Note: the Z=0.0 offset is determined by the probe offset which can be set using M851. + //#define PTC_PROBE_HEATING_OFFSET 0.5 // Height to raise the Z-probe between heating and taking the next measurement. Some probes // may fail to untrigger if they have been triggered for a long time, which can be solved by // increasing the height the probe is raised to. - //#define PTC_PROBE_RAISE 15U + //#define PTC_PROBE_RAISE 15 // If the probe is outside of the defined range, use linear extrapolation using the closest // point and the PTC_LINEAR_EXTRAPOLATION'th next point. E.g. if set to 4 it will use data[0] @@ -1861,20 +2052,23 @@ // // G2/G3 Arc Support // -#define ARC_SUPPORT // Disable this feature to save ~3226 bytes +#define ARC_SUPPORT // Requires ~3226 bytes #if ENABLED(ARC_SUPPORT) - #define MM_PER_ARC_SEGMENT 1 // (mm) Length (or minimum length) of each arc segment - //#define ARC_SEGMENTS_PER_R 1 // Max segment length, MM_PER = Min - #define MIN_ARC_SEGMENTS 24 // Minimum number of segments in a complete circle - //#define ARC_SEGMENTS_PER_SEC 50 // Use feedrate to choose segment length (with MM_PER_ARC_SEGMENT as the minimum) - #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections - //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles - //#define CNC_WORKSPACE_PLANES // Allow G2/G3 to operate in XY, ZX, or YZ planes - //#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure + #define MIN_ARC_SEGMENT_MM 0.1 // (mm) Minimum length of each arc segment + #define MAX_ARC_SEGMENT_MM 1.0 // (mm) Maximum length of each arc segment + #define MIN_CIRCLE_SEGMENTS 72 // Minimum number of segments in a complete circle + //#define ARC_SEGMENTS_PER_SEC 50 // Use the feedrate to choose the segment length + #define N_ARC_CORRECTION 25 // Number of interpolated segments between corrections + //#define ARC_P_CIRCLES // Enable the 'P' parameter to specify complete circles + //#define SF_ARC_FIX // Enable only if using SkeinForge with "Arc Point" fillet procedure #endif -// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes. -#define BEZIER_CURVE_SUPPORT +// G5 Bézier Curve Support with XYZE destination and IJPQ offsets +#define BEZIER_CURVE_SUPPORT // Requires ~2666 bytes + +#if EITHER(ARC_SUPPORT, BEZIER_CURVE_SUPPORT) + //#define CNC_WORKSPACE_PLANES // Allow G2/G3/G5 to operate in XY, ZX, or YZ planes +#endif /** * Direct Stepping @@ -1957,7 +2151,7 @@ // @section motion // The number of linear moves that can be in the planner at once. -// The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g. 8, 16, 32) +// The value of BLOCK_BUFFER_SIZE must be a power of 2 (e.g., 8, 16, 32) #if BOTH(SDSUPPORT, DIRECT_STEPPING) #define BLOCK_BUFFER_SIZE 8 #elif ENABLED(SDSUPPORT) @@ -1993,9 +2187,6 @@ //#define SERIAL_XON_XOFF #endif -// Add M575 G-code to change the baud rate -//#define BAUD_RATE_GCODE - #if ENABLED(SDSUPPORT) // Enable this option to collect and display the maximum // RX queue usage after transferring a file to SD. @@ -2006,6 +2197,12 @@ //#define SERIAL_STATS_DROPPED_RX #endif +// Monitor RX buffer usage +// Dump an error to the serial port if the serial receive buffer overflows. +// If you see these errors, increase the RX_BUFFER_SIZE value. +// Not supported on all platforms. +//#define RX_BUFFER_MONITOR + /** * Emergency Command Parser * @@ -2016,6 +2213,26 @@ */ //#define EMERGENCY_PARSER +/** + * Realtime Reporting (requires EMERGENCY_PARSER) + * + * - Report position and state of the machine (like Grbl). + * - Auto-report position during long moves. + * - Useful for CNC/LASER. + * + * Adds support for commands: + * S000 : Report State and Position while moving. + * P000 : Instant Pause / Hold while moving. + * R000 : Resume from Pause / Hold. + * + * - During Hold all Emergency Parser commands are available, as usual. + * - Enable NANODLP_Z_SYNC and NANODLP_ALL_AXIS for move command end-state reports. + */ +//#define REALTIME_REPORTING_COMMANDS +#if ENABLED(REALTIME_REPORTING_COMMANDS) + //#define FULL_REPORT_TO_HOST_FEATURE // Auto-report the machine status like Grbl CNC +#endif + // Bad Serial-connections can miss a received command by sending an 'ok' // Therefore some clients abort after 30 seconds in a timeout. // Some other clients start sending commands while receiving a 'wait'. @@ -2090,6 +2307,20 @@ //#define EVENT_GCODE_AFTER_TOOLCHANGE "G12X" // Extra G-code to run after tool-change #endif + /** + * Extra G-code to run while executing tool-change commands. Can be used to use an additional + * stepper motor (I axis, see option LINEAR_AXES in Configuration.h) to drive the tool-changer. + */ + //#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0 + //#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1 + //#define EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN // Always execute above G-code sequences. Use with caution! + + /** + * Tool Sensors detect when tools have been picked up or dropped. + * Requires the pins TOOL_SENSOR1_PIN, TOOL_SENSOR2_PIN, etc. + */ + //#define TOOL_SENSOR + /** * Retract and prime filament on tool-change to reduce * ooze and stringing and to get cleaner transitions. @@ -2148,14 +2379,15 @@ #endif // HAS_MULTI_EXTRUDER /** - * Advanced Pause - * Experimental feature for filament change support and for parking the nozzle when paused. - * Adds the GCode M600 for initiating filament change. - * If PARK_HEAD_ON_PAUSE enabled, adds the GCode M125 to pause printing and park the nozzle. + * Advanced Pause for Filament Change + * - Adds the G-code M600 Filament Change to initiate a filament change. + * - This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + * + * Requirements: + * - For Filament Change parking enable and configure NOZZLE_PARK_FEATURE. + * - For user interaction enable an LCD display, HOST_PROMPT_SUPPORT, or EMERGENCY_PARSER. * - * Requires an LCD display. - * Requires NOZZLE_PARK_FEATURE. - * This feature is required for the default FILAMENT_RUNOUT_SCRIPT. + * Enable PARK_HEAD_ON_PAUSE to add the G-code M125 Pause and Park. */ #define ADVANCED_PAUSE_FEATURE #if ENABLED(ADVANCED_PAUSE_FEATURE) @@ -2194,6 +2426,8 @@ #define PAUSE_PARK_NOZZLE_TIMEOUT 45 // (seconds) Time limit before the nozzle is turned off for safety. #define FILAMENT_CHANGE_ALERT_BEEPS 10 // Number of alert beeps to play when a response is needed. #define PAUSE_PARK_NO_STEPPER_TIMEOUT // Enable for XYZ steppers to stay powered on during filament change. + //#define FILAMENT_CHANGE_RESUME_ON_INSERT // Automatically continue / load filament when runout sensor is triggered again. + //#define PAUSE_REHEAT_FAST_RESUME // Reduce number of waits by not prompting again post-timeout before continuing. //#define PARK_HEAD_ON_PAUSE // Park the nozzle during pause and filament change. //#define HOME_BEFORE_FILAMENT_CHANGE // If needed, home before parking for filament change @@ -2221,7 +2455,7 @@ #if AXIS_DRIVER_TYPE_X2(TMC26X) #define X2_MAX_CURRENT 1000 #define X2_SENSE_RESISTOR 91 - #define X2_MICROSTEPS 16 + #define X2_MICROSTEPS X_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_Y(TMC26X) @@ -2233,7 +2467,7 @@ #if AXIS_DRIVER_TYPE_Y2(TMC26X) #define Y2_MAX_CURRENT 1000 #define Y2_SENSE_RESISTOR 91 - #define Y2_MICROSTEPS 16 + #define Y2_MICROSTEPS Y_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_Z(TMC26X) @@ -2245,19 +2479,37 @@ #if AXIS_DRIVER_TYPE_Z2(TMC26X) #define Z2_MAX_CURRENT 1000 #define Z2_SENSE_RESISTOR 91 - #define Z2_MICROSTEPS 16 + #define Z2_MICROSTEPS Z_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_Z3(TMC26X) #define Z3_MAX_CURRENT 1000 #define Z3_SENSE_RESISTOR 91 - #define Z3_MICROSTEPS 16 + #define Z3_MICROSTEPS Z_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_Z4(TMC26X) #define Z4_MAX_CURRENT 1000 #define Z4_SENSE_RESISTOR 91 - #define Z4_MICROSTEPS 16 + #define Z4_MICROSTEPS Z_MICROSTEPS + #endif + + #if AXIS_DRIVER_TYPE_I(TMC26X) + #define I_MAX_CURRENT 1000 + #define I_SENSE_RESISTOR 91 + #define I_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_J(TMC26X) + #define J_MAX_CURRENT 1000 + #define J_SENSE_RESISTOR 91 + #define J_MICROSTEPS 16 + #endif + + #if AXIS_DRIVER_TYPE_K(TMC26X) + #define K_MAX_CURRENT 1000 + #define K_SENSE_RESISTOR 91 + #define K_MICROSTEPS 16 #endif #if AXIS_DRIVER_TYPE_E0(TMC26X) @@ -2269,43 +2521,43 @@ #if AXIS_DRIVER_TYPE_E1(TMC26X) #define E1_MAX_CURRENT 1000 #define E1_SENSE_RESISTOR 91 - #define E1_MICROSTEPS 16 + #define E1_MICROSTEPS E0_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_E2(TMC26X) #define E2_MAX_CURRENT 1000 #define E2_SENSE_RESISTOR 91 - #define E2_MICROSTEPS 16 + #define E2_MICROSTEPS E0_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_E3(TMC26X) #define E3_MAX_CURRENT 1000 #define E3_SENSE_RESISTOR 91 - #define E3_MICROSTEPS 16 + #define E3_MICROSTEPS E0_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_E4(TMC26X) #define E4_MAX_CURRENT 1000 #define E4_SENSE_RESISTOR 91 - #define E4_MICROSTEPS 16 + #define E4_MICROSTEPS E0_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_E5(TMC26X) #define E5_MAX_CURRENT 1000 #define E5_SENSE_RESISTOR 91 - #define E5_MICROSTEPS 16 + #define E5_MICROSTEPS E0_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_E6(TMC26X) #define E6_MAX_CURRENT 1000 #define E6_SENSE_RESISTOR 91 - #define E6_MICROSTEPS 16 + #define E6_MICROSTEPS E0_MICROSTEPS #endif #if AXIS_DRIVER_TYPE_E7(TMC26X) #define E7_MAX_CURRENT 1000 #define E7_SENSE_RESISTOR 91 - #define E7_MICROSTEPS 16 + #define E7_MICROSTEPS E0_MICROSTEPS #endif #endif // TMC26X @@ -2350,7 +2602,7 @@ #if AXIS_IS_TMC(X2) #define X2_CURRENT 800 #define X2_CURRENT_HOME X2_CURRENT - #define X2_MICROSTEPS 16 + #define X2_MICROSTEPS X_MICROSTEPS #define X2_RSENSE 0.11 #define X2_CHAIN_POS -1 //#define X2_INTERPOLATE true @@ -2368,7 +2620,7 @@ #if AXIS_IS_TMC(Y2) #define Y2_CURRENT 800 #define Y2_CURRENT_HOME Y2_CURRENT - #define Y2_MICROSTEPS 16 + #define Y2_MICROSTEPS Y_MICROSTEPS #define Y2_RSENSE 0.11 #define Y2_CHAIN_POS -1 //#define Y2_INTERPOLATE true @@ -2386,7 +2638,7 @@ #if AXIS_IS_TMC(Z2) #define Z2_CURRENT 800 #define Z2_CURRENT_HOME Z2_CURRENT - #define Z2_MICROSTEPS 16 + #define Z2_MICROSTEPS Z_MICROSTEPS #define Z2_RSENSE 0.11 #define Z2_CHAIN_POS -1 //#define Z2_INTERPOLATE true @@ -2395,7 +2647,7 @@ #if AXIS_IS_TMC(Z3) #define Z3_CURRENT 800 #define Z3_CURRENT_HOME Z3_CURRENT - #define Z3_MICROSTEPS 16 + #define Z3_MICROSTEPS Z_MICROSTEPS #define Z3_RSENSE 0.11 #define Z3_CHAIN_POS -1 //#define Z3_INTERPOLATE true @@ -2404,12 +2656,39 @@ #if AXIS_IS_TMC(Z4) #define Z4_CURRENT 800 #define Z4_CURRENT_HOME Z4_CURRENT - #define Z4_MICROSTEPS 16 + #define Z4_MICROSTEPS Z_MICROSTEPS #define Z4_RSENSE 0.11 #define Z4_CHAIN_POS -1 //#define Z4_INTERPOLATE true #endif + #if AXIS_IS_TMC(I) + #define I_CURRENT 800 + #define I_CURRENT_HOME I_CURRENT + #define I_MICROSTEPS 16 + #define I_RSENSE 0.11 + #define I_CHAIN_POS -1 + //#define I_INTERPOLATE true + #endif + + #if AXIS_IS_TMC(J) + #define J_CURRENT 800 + #define J_CURRENT_HOME J_CURRENT + #define J_MICROSTEPS 16 + #define J_RSENSE 0.11 + #define J_CHAIN_POS -1 + //#define J_INTERPOLATE true + #endif + + #if AXIS_IS_TMC(K) + #define K_CURRENT 800 + #define K_CURRENT_HOME K_CURRENT + #define K_MICROSTEPS 16 + #define K_RSENSE 0.11 + #define K_CHAIN_POS -1 + //#define K_INTERPOLATE true + #endif + #if AXIS_IS_TMC(E0) #define E0_CURRENT 800 #define E0_MICROSTEPS 16 @@ -2420,7 +2699,7 @@ #if AXIS_IS_TMC(E1) #define E1_CURRENT 800 - #define E1_MICROSTEPS 16 + #define E1_MICROSTEPS E0_MICROSTEPS #define E1_RSENSE 0.11 #define E1_CHAIN_POS -1 //#define E1_INTERPOLATE true @@ -2428,7 +2707,7 @@ #if AXIS_IS_TMC(E2) #define E2_CURRENT 800 - #define E2_MICROSTEPS 16 + #define E2_MICROSTEPS E0_MICROSTEPS #define E2_RSENSE 0.11 #define E2_CHAIN_POS -1 //#define E2_INTERPOLATE true @@ -2436,7 +2715,7 @@ #if AXIS_IS_TMC(E3) #define E3_CURRENT 800 - #define E3_MICROSTEPS 16 + #define E3_MICROSTEPS E0_MICROSTEPS #define E3_RSENSE 0.11 #define E3_CHAIN_POS -1 //#define E3_INTERPOLATE true @@ -2444,7 +2723,7 @@ #if AXIS_IS_TMC(E4) #define E4_CURRENT 800 - #define E4_MICROSTEPS 16 + #define E4_MICROSTEPS E0_MICROSTEPS #define E4_RSENSE 0.11 #define E4_CHAIN_POS -1 //#define E4_INTERPOLATE true @@ -2452,7 +2731,7 @@ #if AXIS_IS_TMC(E5) #define E5_CURRENT 800 - #define E5_MICROSTEPS 16 + #define E5_MICROSTEPS E0_MICROSTEPS #define E5_RSENSE 0.11 #define E5_CHAIN_POS -1 //#define E5_INTERPOLATE true @@ -2460,7 +2739,7 @@ #if AXIS_IS_TMC(E6) #define E6_CURRENT 800 - #define E6_MICROSTEPS 16 + #define E6_MICROSTEPS E0_MICROSTEPS #define E6_RSENSE 0.11 #define E6_CHAIN_POS -1 //#define E6_INTERPOLATE true @@ -2468,7 +2747,7 @@ #if AXIS_IS_TMC(E7) #define E7_CURRENT 800 - #define E7_MICROSTEPS 16 + #define E7_MICROSTEPS E0_MICROSTEPS #define E7_RSENSE 0.11 #define E7_CHAIN_POS -1 //#define E7_INTERPOLATE true @@ -2485,6 +2764,10 @@ //#define Y2_CS_PIN -1 //#define Z2_CS_PIN -1 //#define Z3_CS_PIN -1 + //#define Z4_CS_PIN -1 + //#define I_CS_PIN -1 + //#define J_CS_PIN -1 + //#define K_CS_PIN -1 //#define E0_CS_PIN -1 //#define E1_CS_PIN -1 //#define E2_CS_PIN -1 @@ -2524,6 +2807,9 @@ //#define Z2_SLAVE_ADDRESS 0 //#define Z3_SLAVE_ADDRESS 0 //#define Z4_SLAVE_ADDRESS 0 + //#define I_SLAVE_ADDRESS 0 + //#define J_SLAVE_ADDRESS 0 + //#define K_SLAVE_ADDRESS 0 //#define E0_SLAVE_ADDRESS 0 //#define E1_SLAVE_ADDRESS 0 //#define E2_SLAVE_ADDRESS 0 @@ -2548,6 +2834,9 @@ */ #define STEALTHCHOP_XY #define STEALTHCHOP_Z + #define STEALTHCHOP_I + #define STEALTHCHOP_J + #define STEALTHCHOP_K #define STEALTHCHOP_E /** @@ -2566,22 +2855,22 @@ * { , , hysteresis_start[1..8] } */ #define CHOPPER_TIMING CHOPPER_DEFAULT_12V // All axes (override below) - //#define CHOPPER_TIMING_X CHOPPER_DEFAULT_12V // For X Axes (override below) - //#define CHOPPER_TIMING_X2 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_Y CHOPPER_DEFAULT_12V // For Y Axes (override below) - //#define CHOPPER_TIMING_Y2 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_Z CHOPPER_DEFAULT_12V // For Z Axes (override below) - //#define CHOPPER_TIMING_Z2 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_Z3 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_Z4 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_E CHOPPER_DEFAULT_12V // For Extruders (override below) - //#define CHOPPER_TIMING_E1 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_E2 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_E3 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_E4 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_E5 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_E6 CHOPPER_DEFAULT_12V - //#define CHOPPER_TIMING_E7 CHOPPER_DEFAULT_12V + //#define CHOPPER_TIMING_X CHOPPER_TIMING // For X Axes (override below) + //#define CHOPPER_TIMING_X2 CHOPPER_TIMING_X + //#define CHOPPER_TIMING_Y CHOPPER_TIMING // For Y Axes (override below) + //#define CHOPPER_TIMING_Y2 CHOPPER_TIMING_Y + //#define CHOPPER_TIMING_Z CHOPPER_TIMING // For Z Axes (override below) + //#define CHOPPER_TIMING_Z2 CHOPPER_TIMING_Z + //#define CHOPPER_TIMING_Z3 CHOPPER_TIMING_Z + //#define CHOPPER_TIMING_Z4 CHOPPER_TIMING_Z + //#define CHOPPER_TIMING_E CHOPPER_TIMING // For Extruders (override below) + //#define CHOPPER_TIMING_E1 CHOPPER_TIMING_E + //#define CHOPPER_TIMING_E2 CHOPPER_TIMING_E + //#define CHOPPER_TIMING_E3 CHOPPER_TIMING_E + //#define CHOPPER_TIMING_E4 CHOPPER_TIMING_E + //#define CHOPPER_TIMING_E5 CHOPPER_TIMING_E + //#define CHOPPER_TIMING_E6 CHOPPER_TIMING_E + //#define CHOPPER_TIMING_E7 CHOPPER_TIMING_E /** * Monitor Trinamic drivers @@ -2619,6 +2908,9 @@ #define Z2_HYBRID_THRESHOLD 3 #define Z3_HYBRID_THRESHOLD 3 #define Z4_HYBRID_THRESHOLD 3 + #define I_HYBRID_THRESHOLD 3 + #define J_HYBRID_THRESHOLD 3 + #define K_HYBRID_THRESHOLD 3 #define E0_HYBRID_THRESHOLD 30 #define E1_HYBRID_THRESHOLD 30 #define E2_HYBRID_THRESHOLD 30 @@ -2644,7 +2936,7 @@ * * It is recommended to set HOMING_BUMP_MM to { 0, 0, 0 }. * - * SPI_ENDSTOPS *** Beta feature! *** TMC2130 Only *** + * SPI_ENDSTOPS *** Beta feature! *** TMC2130/TMC5160 Only *** * Poll the driver through SPI to determine load when homing. * Removes the need for a wire from DIAG1 to an endstop pin. * @@ -2665,6 +2957,9 @@ //#define Z2_STALL_SENSITIVITY Z_STALL_SENSITIVITY //#define Z3_STALL_SENSITIVITY Z_STALL_SENSITIVITY //#define Z4_STALL_SENSITIVITY Z_STALL_SENSITIVITY + //#define I_STALL_SENSITIVITY 8 + //#define J_STALL_SENSITIVITY 8 + //#define K_STALL_SENSITIVITY 8 //#define SPI_ENDSTOPS // TMC2130 only //#define IMPROVE_HOMING_RELIABILITY #endif @@ -2689,7 +2984,7 @@ /** * Enable M122 debugging command for TMC stepper drivers. - * M122 S0/1 will enable continous reporting. + * M122 S0/1 will enable continuous reporting. */ //#define TMC_DEBUG @@ -2743,138 +3038,165 @@ #endif #if AXIS_IS_L64XX(X2) - #define X2_MICROSTEPS 128 - #define X2_OVERCURRENT 2000 - #define X2_STALLCURRENT 1500 - #define X2_MAX_VOLTAGE 127 - #define X2_CHAIN_POS -1 - #define X2_SLEW_RATE 1 + #define X2_MICROSTEPS X_MICROSTEPS + #define X2_OVERCURRENT 2000 + #define X2_STALLCURRENT 1500 + #define X2_MAX_VOLTAGE 127 + #define X2_CHAIN_POS -1 + #define X2_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(Y) - #define Y_MICROSTEPS 128 - #define Y_OVERCURRENT 2000 - #define Y_STALLCURRENT 1500 - #define Y_MAX_VOLTAGE 127 - #define Y_CHAIN_POS -1 - #define Y_SLEW_RATE 1 + #define Y_MICROSTEPS 128 + #define Y_OVERCURRENT 2000 + #define Y_STALLCURRENT 1500 + #define Y_MAX_VOLTAGE 127 + #define Y_CHAIN_POS -1 + #define Y_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(Y2) - #define Y2_MICROSTEPS 128 - #define Y2_OVERCURRENT 2000 - #define Y2_STALLCURRENT 1500 - #define Y2_MAX_VOLTAGE 127 - #define Y2_CHAIN_POS -1 - #define Y2_SLEW_RATE 1 + #define Y2_MICROSTEPS Y_MICROSTEPS + #define Y2_OVERCURRENT 2000 + #define Y2_STALLCURRENT 1500 + #define Y2_MAX_VOLTAGE 127 + #define Y2_CHAIN_POS -1 + #define Y2_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(Z) - #define Z_MICROSTEPS 128 - #define Z_OVERCURRENT 2000 - #define Z_STALLCURRENT 1500 - #define Z_MAX_VOLTAGE 127 - #define Z_CHAIN_POS -1 - #define Z_SLEW_RATE 1 + #define Z_MICROSTEPS 128 + #define Z_OVERCURRENT 2000 + #define Z_STALLCURRENT 1500 + #define Z_MAX_VOLTAGE 127 + #define Z_CHAIN_POS -1 + #define Z_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(Z2) - #define Z2_MICROSTEPS 128 - #define Z2_OVERCURRENT 2000 - #define Z2_STALLCURRENT 1500 - #define Z2_MAX_VOLTAGE 127 - #define Z2_CHAIN_POS -1 - #define Z2_SLEW_RATE 1 + #define Z2_MICROSTEPS Z_MICROSTEPS + #define Z2_OVERCURRENT 2000 + #define Z2_STALLCURRENT 1500 + #define Z2_MAX_VOLTAGE 127 + #define Z2_CHAIN_POS -1 + #define Z2_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(Z3) - #define Z3_MICROSTEPS 128 - #define Z3_OVERCURRENT 2000 - #define Z3_STALLCURRENT 1500 - #define Z3_MAX_VOLTAGE 127 - #define Z3_CHAIN_POS -1 - #define Z3_SLEW_RATE 1 + #define Z3_MICROSTEPS Z_MICROSTEPS + #define Z3_OVERCURRENT 2000 + #define Z3_STALLCURRENT 1500 + #define Z3_MAX_VOLTAGE 127 + #define Z3_CHAIN_POS -1 + #define Z3_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(Z4) - #define Z4_MICROSTEPS 128 - #define Z4_OVERCURRENT 2000 - #define Z4_STALLCURRENT 1500 - #define Z4_MAX_VOLTAGE 127 - #define Z4_CHAIN_POS -1 - #define Z4_SLEW_RATE 1 + #define Z4_MICROSTEPS Z_MICROSTEPS + #define Z4_OVERCURRENT 2000 + #define Z4_STALLCURRENT 1500 + #define Z4_MAX_VOLTAGE 127 + #define Z4_CHAIN_POS -1 + #define Z4_SLEW_RATE 1 + #endif + + #if AXIS_DRIVER_TYPE_I(L6470) + #define I_MICROSTEPS 128 + #define I_OVERCURRENT 2000 + #define I_STALLCURRENT 1500 + #define I_MAX_VOLTAGE 127 + #define I_CHAIN_POS -1 + #define I_SLEW_RATE 1 + #endif + + #if AXIS_DRIVER_TYPE_J(L6470) + #define J_MICROSTEPS 128 + #define J_OVERCURRENT 2000 + #define J_STALLCURRENT 1500 + #define J_MAX_VOLTAGE 127 + #define J_CHAIN_POS -1 + #define J_SLEW_RATE 1 + #endif + + #if AXIS_DRIVER_TYPE_K(L6470) + #define K_MICROSTEPS 128 + #define K_OVERCURRENT 2000 + #define K_STALLCURRENT 1500 + #define K_MAX_VOLTAGE 127 + #define K_CHAIN_POS -1 + #define K_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(E0) - #define E0_MICROSTEPS 128 - #define E0_OVERCURRENT 2000 - #define E0_STALLCURRENT 1500 - #define E0_MAX_VOLTAGE 127 - #define E0_CHAIN_POS -1 - #define E0_SLEW_RATE 1 + #define E0_MICROSTEPS 128 + #define E0_OVERCURRENT 2000 + #define E0_STALLCURRENT 1500 + #define E0_MAX_VOLTAGE 127 + #define E0_CHAIN_POS -1 + #define E0_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(E1) - #define E1_MICROSTEPS 128 - #define E1_OVERCURRENT 2000 - #define E1_STALLCURRENT 1500 - #define E1_MAX_VOLTAGE 127 - #define E1_CHAIN_POS -1 - #define E1_SLEW_RATE 1 + #define E1_MICROSTEPS E0_MICROSTEPS + #define E1_OVERCURRENT 2000 + #define E1_STALLCURRENT 1500 + #define E1_MAX_VOLTAGE 127 + #define E1_CHAIN_POS -1 + #define E1_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(E2) - #define E2_MICROSTEPS 128 - #define E2_OVERCURRENT 2000 - #define E2_STALLCURRENT 1500 - #define E2_MAX_VOLTAGE 127 - #define E2_CHAIN_POS -1 - #define E2_SLEW_RATE 1 + #define E2_MICROSTEPS E0_MICROSTEPS + #define E2_OVERCURRENT 2000 + #define E2_STALLCURRENT 1500 + #define E2_MAX_VOLTAGE 127 + #define E2_CHAIN_POS -1 + #define E2_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(E3) - #define E3_MICROSTEPS 128 - #define E3_OVERCURRENT 2000 - #define E3_STALLCURRENT 1500 - #define E3_MAX_VOLTAGE 127 - #define E3_CHAIN_POS -1 - #define E3_SLEW_RATE 1 + #define E3_MICROSTEPS E0_MICROSTEPS + #define E3_OVERCURRENT 2000 + #define E3_STALLCURRENT 1500 + #define E3_MAX_VOLTAGE 127 + #define E3_CHAIN_POS -1 + #define E3_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(E4) - #define E4_MICROSTEPS 128 - #define E4_OVERCURRENT 2000 - #define E4_STALLCURRENT 1500 - #define E4_MAX_VOLTAGE 127 - #define E4_CHAIN_POS -1 - #define E4_SLEW_RATE 1 + #define E4_MICROSTEPS E0_MICROSTEPS + #define E4_OVERCURRENT 2000 + #define E4_STALLCURRENT 1500 + #define E4_MAX_VOLTAGE 127 + #define E4_CHAIN_POS -1 + #define E4_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(E5) - #define E5_MICROSTEPS 128 - #define E5_OVERCURRENT 2000 - #define E5_STALLCURRENT 1500 - #define E5_MAX_VOLTAGE 127 - #define E5_CHAIN_POS -1 - #define E5_SLEW_RATE 1 + #define E5_MICROSTEPS E0_MICROSTEPS + #define E5_OVERCURRENT 2000 + #define E5_STALLCURRENT 1500 + #define E5_MAX_VOLTAGE 127 + #define E5_CHAIN_POS -1 + #define E5_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(E6) - #define E6_MICROSTEPS 128 - #define E6_OVERCURRENT 2000 - #define E6_STALLCURRENT 1500 - #define E6_MAX_VOLTAGE 127 - #define E6_CHAIN_POS -1 - #define E6_SLEW_RATE 1 + #define E6_MICROSTEPS E0_MICROSTEPS + #define E6_OVERCURRENT 2000 + #define E6_STALLCURRENT 1500 + #define E6_MAX_VOLTAGE 127 + #define E6_CHAIN_POS -1 + #define E6_SLEW_RATE 1 #endif #if AXIS_IS_L64XX(E7) - #define E7_MICROSTEPS 128 - #define E7_OVERCURRENT 2000 - #define E7_STALLCURRENT 1500 - #define E7_MAX_VOLTAGE 127 - #define E7_CHAIN_POS -1 - #define E7_SLEW_RATE 1 + #define E7_MICROSTEPS E0_MICROSTEPS + #define E7_OVERCURRENT 2000 + #define E7_STALLCURRENT 1500 + #define E7_MAX_VOLTAGE 127 + #define E7_CHAIN_POS -1 + #define E7_SLEW_RATE 1 #endif /** @@ -3004,16 +3326,30 @@ //#define SPINDLE_FEATURE //#define LASER_FEATURE #if EITHER(SPINDLE_FEATURE, LASER_FEATURE) - #define SPINDLE_LASER_ACTIVE_STATE LOW // Set to "HIGH" if the on/off function is active HIGH - #define SPINDLE_LASER_PWM true // Set to "true" if your controller supports setting the speed/power - #define SPINDLE_LASER_PWM_INVERT false // Set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_ACTIVE_STATE LOW // Set to "HIGH" if SPINDLE_LASER_ENA_PIN is active HIGH + + #define SPINDLE_LASER_USE_PWM // Enable if your controller supports setting the speed/power + #if ENABLED(SPINDLE_LASER_USE_PWM) + #define SPINDLE_LASER_PWM_INVERT false // Set to "true" if the speed/power goes up when you want it to go slower + #define SPINDLE_LASER_FREQUENCY 2500 // (Hz) Spindle/laser frequency (only on supported HALs: AVR and LPC) + #endif - #define SPINDLE_LASER_FREQUENCY 2500 // (Hz) Spindle/laser frequency (only on supported HALs: AVR and LPC) + //#define AIR_EVACUATION // Cutter Vacuum / Laser Blower motor control with G-codes M10-M11 + #if ENABLED(AIR_EVACUATION) + #define AIR_EVACUATION_ACTIVE LOW // Set to "HIGH" if the on/off function is active HIGH + //#define AIR_EVACUATION_PIN 42 // Override the default Cutter Vacuum or Laser Blower pin + #endif - //#define SPINDLE_SERVO // A servo converting an angle to spindle power + //#define AIR_ASSIST // Air Assist control with G-codes M8-M9 + #if ENABLED(AIR_ASSIST) + #define AIR_ASSIST_ACTIVE LOW // Active state on air assist pin + //#define AIR_ASSIST_PIN 44 // Override the default Air Assist pin + #endif + + //#define SPINDLE_SERVO // A servo converting an angle to spindle power #ifdef SPINDLE_SERVO - #define SPINDLE_SERVO_NR 0 // Index of servo used for spindle control - #define SPINDLE_SERVO_MIN 10 // Minimum angle for servo spindle + #define SPINDLE_SERVO_NR 0 // Index of servo used for spindle control + #define SPINDLE_SERVO_MIN 10 // Minimum angle for servo spindle #endif /** @@ -3052,17 +3388,21 @@ * Speed/Power = (PWMDC / 255 * 100 - SPEED_POWER_INTERCEPT) / SPEED_POWER_SLOPE * PWMDC = (spdpwr - SPEED_POWER_MIN) / (SPEED_POWER_MAX - SPEED_POWER_MIN) / SPEED_POWER_SLOPE */ - #define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage - #define SPEED_POWER_MIN 5000 // (RPM) - #define SPEED_POWER_MAX 30000 // (RPM) SuperPID router controller 0 - 30,000 RPM - #define SPEED_POWER_STARTUP 25000 // (RPM) M3/M4 speed/power default (with no arguments) + #if ENABLED(SPINDLE_LASER_USE_PWM) + #define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage + #define SPEED_POWER_MIN 5000 // (RPM) + #define SPEED_POWER_MAX 30000 // (RPM) SuperPID router controller 0 - 30,000 RPM + #define SPEED_POWER_STARTUP 25000 // (RPM) M3/M4 speed/power default (with no arguments) + #endif #else - #define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage - #define SPEED_POWER_MIN 0 // (%) 0-100 - #define SPEED_POWER_MAX 100 // (%) 0-100 - #define SPEED_POWER_STARTUP 80 // (%) M3/M4 speed/power default (with no arguments) + #if ENABLED(SPINDLE_LASER_USE_PWM) + #define SPEED_POWER_INTERCEPT 0 // (%) 0-100 i.e., Minimum power percentage + #define SPEED_POWER_MIN 0 // (%) 0-100 + #define SPEED_POWER_MAX 100 // (%) 0-100 + #define SPEED_POWER_STARTUP 80 // (%) M3/M4 speed/power default (with no arguments) + #endif // Define the minimum and maximum test pulse time values for a laser test fire function #define LASER_TEST_PULSE_MIN 1 // Used with Laser Control Menu @@ -3142,8 +3482,30 @@ #define SPINDLE_LASER_POWERDOWN_DELAY 50 // (ms) Delay to allow the spindle to stop #endif + + // + // Laser I2C Ammeter (High precision INA226 low/high side module) + // + //#define I2C_AMMETER + #if ENABLED(I2C_AMMETER) + #define I2C_AMMETER_IMAX 0.1 // (Amps) Calibration value for the expected current range + #define I2C_AMMETER_SHUNT_RESISTOR 0.1 // (Ohms) Calibration shunt resistor value + #endif + #endif -#endif +#endif // SPINDLE_FEATURE || LASER_FEATURE + +/** + * Synchronous Laser Control with M106/M107 + * + * Marlin normally applies M106/M107 fan speeds at a time "soon after" processing + * a planner block. This is too inaccurate for a PWM/TTL laser attached to the fan + * header (as with some add-on laser kits). Enable this option to set fan/laser + * speeds with much more exact timing for improved print fidelity. + * + * NOTE: This option sacrifices some cooling fan speed options. + */ +//#define LASER_SYNCHRONOUS_M106_M107 /** * Coolant Control @@ -3204,13 +3566,27 @@ */ //#define POWER_MONITOR_CURRENT // Monitor the system current //#define POWER_MONITOR_VOLTAGE // Monitor the system voltage -#if EITHER(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE) - #define POWER_MONITOR_VOLTS_PER_AMP 0.05000 // Input voltage to the MCU analog pin per amp - DO NOT apply more than ADC_VREF! - #define POWER_MONITOR_CURRENT_OFFSET -1 // Offset value for current sensors with linear function output - #define POWER_MONITOR_VOLTS_PER_VOLT 0.11786 // Input voltage to the MCU analog pin per volt - DO NOT apply more than ADC_VREF! + +#if ENABLED(POWER_MONITOR_CURRENT) + #define POWER_MONITOR_VOLTS_PER_AMP 0.05000 // Input voltage to the MCU analog pin per amp - DO NOT apply more than ADC_VREF! + #define POWER_MONITOR_CURRENT_OFFSET 0 // Offset (in amps) applied to the calculated current #define POWER_MONITOR_FIXED_VOLTAGE 13.6 // Voltage for a current sensor with no voltage sensor (for power display) #endif +#if ENABLED(POWER_MONITOR_VOLTAGE) + #define POWER_MONITOR_VOLTS_PER_VOLT 0.077933 // Input voltage to the MCU analog pin per volt - DO NOT apply more than ADC_VREF! + #define POWER_MONITOR_VOLTAGE_OFFSET 0 // Offset (in volts) applied to the calculated voltage +#endif + +/** + * Stepper Driver Anti-SNAFU Protection + * + * If the SAFE_POWER_PIN is defined for your board, Marlin will check + * that stepper drivers are properly plugged in before applying power. + * Disable protection if your stepper drivers don't support the feature. + */ +//#define DISABLE_DRIVER_SAFE_POWER_PROTECT + /** * CNC Coordinate Systems * @@ -3224,6 +3600,11 @@ */ #define AUTO_REPORT_TEMPERATURES +/** + * Auto-report position with M154 S + */ +//#define AUTO_REPORT_POSITION + /** * Include capabilities in M115 output */ @@ -3293,7 +3674,7 @@ #define PROPORTIONAL_FONT_RATIO 1.0 /** - * Spend 28 bytes of SRAM to optimize the GCode parser + * Spend 28 bytes of SRAM to optimize the G-code parser */ #define FASTER_GCODE_PARSER @@ -3301,7 +3682,9 @@ //#define GCODE_QUOTED_STRINGS // Support for quoted string parameters #endif -//#define MEATPACK // Support for MeatPack G-code compression (https://github.com/scottmudge/OctoPrint-MeatPack) +// Support for MeatPack G-code compression (https://github.com/scottmudge/OctoPrint-MeatPack) +//#define MEATPACK_ON_SERIAL_PORT_1 +//#define MEATPACK_ON_SERIAL_PORT_2 //#define GCODE_CASE_INSENSITIVE // Accept G-code sent to the firmware in lowercase @@ -3345,27 +3728,96 @@ * User-defined menu items to run custom G-code. * Up to 25 may be defined, but the actual number is LCD-dependent. */ -//#define CUSTOM_USER_MENUS -#if ENABLED(CUSTOM_USER_MENUS) - //#define CUSTOM_USER_MENU_TITLE "Custom Commands" - #define USER_SCRIPT_DONE "M117 User Script Done" - #define USER_SCRIPT_AUDIBLE_FEEDBACK - //#define USER_SCRIPT_RETURN // Return to status screen after a script - #define USER_DESC_1 "Home & UBL Info" - #define USER_GCODE_1 "G28\nG29W" +// Custom Menu: Main Menu +//#define CUSTOM_MENU_MAIN +#if ENABLED(CUSTOM_MENU_MAIN) + //#define CUSTOM_MENU_MAIN_TITLE "Custom Commands" + #define CUSTOM_MENU_MAIN_SCRIPT_DONE "M117 User Script Done" + #define CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK + //#define CUSTOM_MENU_MAIN_SCRIPT_RETURN // Return to status screen after a script + #define CUSTOM_MENU_MAIN_ONLY_IDLE // Only show custom menu when the machine is idle + + #define MAIN_MENU_ITEM_1_DESC "Home & UBL Info" + #define MAIN_MENU_ITEM_1_GCODE "G28\nG29 W" + //#define MAIN_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action + + #define MAIN_MENU_ITEM_2_DESC "Preheat for " PREHEAT_1_LABEL + #define MAIN_MENU_ITEM_2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + //#define MAIN_MENU_ITEM_2_CONFIRM + + //#define MAIN_MENU_ITEM_3_DESC "Preheat for " PREHEAT_2_LABEL + //#define MAIN_MENU_ITEM_3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + //#define MAIN_MENU_ITEM_3_CONFIRM + + //#define MAIN_MENU_ITEM_4_DESC "Heat Bed/Home/Level" + //#define MAIN_MENU_ITEM_4_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + //#define MAIN_MENU_ITEM_4_CONFIRM + + //#define MAIN_MENU_ITEM_5_DESC "Home & Info" + //#define MAIN_MENU_ITEM_5_GCODE "G28\nM503" + //#define MAIN_MENU_ITEM_5_CONFIRM +#endif - #define USER_DESC_2 "Preheat for " PREHEAT_1_LABEL - #define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) +// Custom Menu: Configuration Menu +//#define CUSTOM_MENU_CONFIG +#if ENABLED(CUSTOM_MENU_CONFIG) + //#define CUSTOM_MENU_CONFIG_TITLE "Custom Commands" + #define CUSTOM_MENU_CONFIG_SCRIPT_DONE "M117 Wireless Script Done" + #define CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK + //#define CUSTOM_MENU_CONFIG_SCRIPT_RETURN // Return to status screen after a script + #define CUSTOM_MENU_CONFIG_ONLY_IDLE // Only show custom menu when the machine is idle + + #define CONFIG_MENU_ITEM_1_DESC "Wifi ON" + #define CONFIG_MENU_ITEM_1_GCODE "M118 [ESP110] WIFI-STA pwd=12345678" + //#define CONFIG_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action + + #define CONFIG_MENU_ITEM_2_DESC "Bluetooth ON" + #define CONFIG_MENU_ITEM_2_GCODE "M118 [ESP110] BT pwd=12345678" + //#define CONFIG_MENU_ITEM_2_CONFIRM + + //#define CONFIG_MENU_ITEM_3_DESC "Radio OFF" + //#define CONFIG_MENU_ITEM_3_GCODE "M118 [ESP110] OFF pwd=12345678" + //#define CONFIG_MENU_ITEM_3_CONFIRM + + //#define CONFIG_MENU_ITEM_4_DESC "Wifi ????" + //#define CONFIG_MENU_ITEM_4_GCODE "M118 ????" + //#define CONFIG_MENU_ITEM_4_CONFIRM + + //#define CONFIG_MENU_ITEM_5_DESC "Wifi ????" + //#define CONFIG_MENU_ITEM_5_GCODE "M118 ????" + //#define CONFIG_MENU_ITEM_5_CONFIRM +#endif - #define USER_DESC_3 "Preheat for " PREHEAT_2_LABEL - #define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) +/** + * User-defined buttons to run custom G-code. + * Up to 25 may be defined. + */ +//#define CUSTOM_USER_BUTTONS +#if ENABLED(CUSTOM_USER_BUTTONS) + //#define BUTTON1_PIN -1 + #if PIN_EXISTS(BUTTON1) + #define BUTTON1_HIT_STATE LOW // State of the triggered button. NC=LOW. NO=HIGH. + #define BUTTON1_WHEN_PRINTING false // Button allowed to trigger during printing? + #define BUTTON1_GCODE "G28" + #define BUTTON1_DESC "Homing" // Optional string to set the LCD status + #endif - #define USER_DESC_4 "Heat Bed/Home/Level" - #define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29" + //#define BUTTON2_PIN -1 + #if PIN_EXISTS(BUTTON2) + #define BUTTON2_HIT_STATE LOW + #define BUTTON2_WHEN_PRINTING false + #define BUTTON2_GCODE "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND) + #define BUTTON2_DESC "Preheat for " PREHEAT_1_LABEL + #endif - #define USER_DESC_5 "Home & Info" - #define USER_GCODE_5 "G28\nM503" + //#define BUTTON3_PIN -1 + #if PIN_EXISTS(BUTTON3) + #define BUTTON3_HIT_STATE LOW + #define BUTTON3_WHEN_PRINTING false + #define BUTTON3_GCODE "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND) + #define BUTTON3_DESC "Preheat for " PREHEAT_2_LABEL + #endif #endif /** @@ -3384,6 +3836,7 @@ */ //#define HOST_ACTION_COMMANDS #if ENABLED(HOST_ACTION_COMMANDS) + //#define HOST_PAUSE_M76 //#define HOST_PROMPT_SUPPORT //#define HOST_START_MENU_ITEM // Add a menu item that tells the host to start #endif @@ -3394,6 +3847,9 @@ * Implement M486 to allow Marlin to skip objects */ //#define CANCEL_OBJECTS +#if ENABLED(CANCEL_OBJECTS) + #define CANCEL_OBJECTS_REPORTING // Emit the current object as a status message +#endif /** * I2C position encoders for closed loop control. @@ -3470,7 +3926,7 @@ */ #define I2CPE_MIN_UPD_TIME_MS 4 // (ms) Minimum time between encoder checks. - // Use a rolling average to identify persistant errors that indicate skips, as opposed to vibration and noise. + // Use a rolling average to identify persistent errors that indicate skips, as opposed to vibration and noise. #define I2CPE_ERR_ROLLING_AVERAGE #endif // I2C_POSITION_ENCODERS @@ -3515,6 +3971,16 @@ #define GANTRY_CALIBRATION_COMMANDS_POST "G28" // G28 highly recommended to ensure an accurate position #endif +/** + * Instant freeze / unfreeze functionality + * Specified pin has pullup and connecting to ground will instantly pause motion. + * Potentially useful for emergency stop that allows being resumed. + */ +//#define FREEZE_FEATURE +#if ENABLED(FREEZE_FEATURE) + //#define FREEZE_PIN 41 // Override the default (KILL) pin here +#endif + /** * MAX7219 Debug Matrix * @@ -3551,14 +4017,13 @@ /** * NanoDLP Sync support * - * Add support for Synchronized Z moves when using with NanoDLP. G0/G1 axis moves will output "Z_move_comp" - * string to enable synchronization with DLP projector exposure. This change will allow to use - * [[WaitForDoneMessage]] instead of populating your gcode with M400 commands + * Support for Synchronized Z moves when used with NanoDLP. G0/G1 axis moves will + * output a "Z_move_comp" string to enable synchronization with DLP projector exposure. + * This feature allows you to use [[WaitForDoneMessage]] instead of M400 commands. */ //#define NANODLP_Z_SYNC #if ENABLED(NANODLP_Z_SYNC) - //#define NANODLP_ALL_AXIS // Enables "Z_move_comp" output on any axis move. - // Default behavior is limited to Z axis only. + //#define NANODLP_ALL_AXIS // Send a "Z_move_comp" report for any axis move (not just Z). #endif /** @@ -3726,3 +4191,24 @@ // Enable Marlin dev mode which adds some special commands //#define MARLIN_DEV_MODE + +#if ENABLED(MARLIN_DEV_MODE) + /** + * D576 - Buffer Monitoring + * To help diagnose print quality issues stemming from empty command buffers. + */ + //#define BUFFER_MONITORING +#endif + +/** + * Postmortem Debugging captures misbehavior and outputs the CPU status and backtrace to serial. + * When running in the debugger it will break for debugging. This is useful to help understand + * a crash from a remote location. Requires ~400 bytes of SRAM and 5Kb of flash. + */ +//#define POSTMORTEM_DEBUGGING + +/** + * Software Reset options + */ +//#define SOFT_RESET_VIA_SERIAL // 'KILL' and '^X' commands will soft-reset the controller +//#define SOFT_RESET_ON_KILL // Use a digital button to soft-reset the controller after KILL diff --git a/Marlin/Makefile b/Marlin/Makefile index 49cb960b92fe..d09e5828f5b2 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -110,7 +110,7 @@ LIQUID_TWI2 ?= 0 WIRE ?= 0 # This defines if Tone is needed (i.e SPEAKER is defined in Configuration.h) -# Disabling this (and SPEAKER) saves approximatively 350 bytes of memory. +# Disabling this (and SPEAKER) saves approximately 350 bytes of memory. TONE ?= 1 # This defines if U8GLIB is needed (may require RELOC_WORKAROUND) @@ -219,7 +219,7 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1111) else ifeq ($(HARDWARE_MOTHERBOARD),1112) # MKS GEN L else ifeq ($(HARDWARE_MOTHERBOARD),1113) -# zrib V2.0 control board (Chinese knock off RAMPS replica) +# zrib V2.0 control board (Chinese RAMPS replica) else ifeq ($(HARDWARE_MOTHERBOARD),1114) # BigTreeTech or BIQU KFB2.0 else ifeq ($(HARDWARE_MOTHERBOARD),1115) @@ -323,6 +323,8 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1203) else ifeq ($(HARDWARE_MOTHERBOARD),1204) # abee Scoovo X9H else ifeq ($(HARDWARE_MOTHERBOARD),1205) +# Rambo ThinkerV2 +else ifeq ($(HARDWARE_MOTHERBOARD),1206) # # Other ATmega1280, ATmega2560 @@ -991,5 +993,5 @@ clean: .PHONY: all build elf hex eep lss sym program coff extcoff clean depend sizebefore sizeafter -# Automaticaly include the dependency files created by gcc +# Automatically include the dependency files created by gcc -include ${patsubst %.o, %.d, ${OBJ}} diff --git a/Marlin/Version.h b/Marlin/Version.h index eb2f9f9a14d4..bd3bb0ae5fbc 100644 --- a/Marlin/Version.h +++ b/Marlin/Version.h @@ -28,7 +28,7 @@ /** * Marlin release version identifier */ -//#define SHORT_BUILD_VERSION "bugfix-2.0.x" +//#define SHORT_BUILD_VERSION "2.0.9.2" /** * Verbose version identifier which should contain a reference to the location @@ -41,7 +41,7 @@ * here we define this default string as the date where the latest release * version was tagged. */ -//#define STRING_DISTRIBUTION_DATE "2019-07-10" +//#define STRING_DISTRIBUTION_DATE "2021-09-03" /** * Defines a generic printer name to be output to the LCD after booting Marlin. diff --git a/Marlin/src/HAL/AVR/HAL.cpp b/Marlin/src/HAL/AVR/HAL.cpp index 4c45a5d78e65..708583b262a6 100644 --- a/Marlin/src/HAL/AVR/HAL.cpp +++ b/Marlin/src/HAL/AVR/HAL.cpp @@ -25,7 +25,7 @@ #include "HAL.h" #ifdef USBCON - DefaultSerial MSerial(false, Serial); + DefaultSerial1 MSerial0(false, Serial); #ifdef BLUETOOTH BTSerial btSerial(false, bluetoothSerial); #endif @@ -58,6 +58,15 @@ void HAL_init() { #endif } +void HAL_reboot() { + #if ENABLED(USE_WATCHDOG) + while (1) { /* run out the watchdog */ } + #else + void (*resetFunc)() = 0; // Declare resetFunc() at address 0 + resetFunc(); // Jump to address 0 + #endif +} + #if ENABLED(SDSUPPORT) #include "../../sd/SdFatUtil.h" diff --git a/Marlin/src/HAL/AVR/HAL.h b/Marlin/src/HAL/AVR/HAL.h index 5e22ac0836e2..a22daf9b5c88 100644 --- a/Marlin/src/HAL/AVR/HAL.h +++ b/Marlin/src/HAL/AVR/HAL.h @@ -39,6 +39,19 @@ #include #include +// +// Default graphical display delays +// +#if F_CPU >= 20000000 + #define CPU_ST7920_DELAY_1 150 + #define CPU_ST7920_DELAY_2 0 + #define CPU_ST7920_DELAY_3 150 +#elif F_CPU == 16000000 + #define CPU_ST7920_DELAY_1 125 + #define CPU_ST7920_DELAY_2 0 + #define CPU_ST7920_DELAY_3 188 +#endif + #ifndef pgm_read_ptr // Compatibility for avr-libc 1.8.0-4.1 included with Ubuntu for // Windows Subsystem for Linux on Windows 10 as of 10/18/2019 @@ -83,38 +96,45 @@ typedef int8_t pin_t; // Serial ports #ifdef USBCON #include "../../core/serial_hook.h" - typedef ForwardSerial0Type< decltype(Serial) > DefaultSerial; - extern DefaultSerial MSerial; + typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1; + extern DefaultSerial1 MSerial0; #ifdef BLUETOOTH - typedef ForwardSerial0Type< decltype(bluetoothSerial) > BTSerial; + typedef ForwardSerial1Class< decltype(bluetoothSerial) > BTSerial; extern BTSerial btSerial; #endif - #define MYSERIAL0 TERN(BLUETOOTH, btSerial, MSerial) + #define MYSERIAL1 TERN(BLUETOOTH, btSerial, MSerial0) #else #if !WITHIN(SERIAL_PORT, -1, 3) - #error "SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "SERIAL_PORT must be from 0 to 3, or -1 for USB Serial." #endif - #define MYSERIAL0 customizedSerial1 + #define MYSERIAL1 customizedSerial1 #ifdef SERIAL_PORT_2 #if !WITHIN(SERIAL_PORT_2, -1, 3) - #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration." + #error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial." + #endif + #define MYSERIAL2 customizedSerial2 + #endif + + #ifdef SERIAL_PORT_3 + #if !WITHIN(SERIAL_PORT_3, -1, 3) + #error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial." #endif - #define MYSERIAL1 customizedSerial2 + #define MYSERIAL3 customizedSerial3 #endif #endif #ifdef MMU2_SERIAL_PORT #if !WITHIN(MMU2_SERIAL_PORT, -1, 3) - #error "MMU2_SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "MMU2_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial." #endif #define MMU2_SERIAL mmuSerial #endif #ifdef LCD_SERIAL_PORT #if !WITHIN(LCD_SERIAL_PORT, -1, 3) - #error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "LCD_SERIAL_PORT must be from 0 to 3, or -1 for USB Serial." #endif #define LCD_SERIAL lcdSerial #if HAS_DGUS_LCD @@ -135,7 +155,7 @@ void HAL_init(); inline void HAL_clear_reset_source() { MCUSR = 0; } inline uint8_t HAL_get_reset_source() { return MCUSR; } -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); #if GCC_VERSION <= 50000 #pragma GCC diagnostic push @@ -179,7 +199,7 @@ inline void HAL_adc_init() { #define GET_PIN_MAP_INDEX(pin) pin #define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval) -#define HAL_SENSITIVE_PINS 0, 1 +#define HAL_SENSITIVE_PINS 0, 1, #ifdef __AVR_AT90USB1286__ #define JTAG_DISABLE() do{ MCUCR = 0x80; MCUCR = 0x80; }while(0) diff --git a/Marlin/src/HAL/AVR/HAL_SPI.cpp b/Marlin/src/HAL/AVR/HAL_SPI.cpp index 3e5572e559fa..8784bb07b30e 100644 --- a/Marlin/src/HAL/AVR/HAL_SPI.cpp +++ b/Marlin/src/HAL/AVR/HAL_SPI.cpp @@ -34,7 +34,9 @@ #include "../../inc/MarlinConfig.h" void spiBegin() { - OUT_WRITE(SD_SS_PIN, HIGH); + #if PIN_EXISTS(SD_SS) + OUT_WRITE(SD_SS_PIN, HIGH); + #endif SET_OUTPUT(SD_SCK_PIN); SET_INPUT(SD_MISO_PIN); SET_OUTPUT(SD_MOSI_PIN); @@ -74,7 +76,8 @@ void spiBegin() { #elif defined(PRR0) PRR0 #endif - , PRSPI); + , PRSPI + ); SPCR = _BV(SPE) | _BV(MSTR) | (spiRate >> 1); SPSR = spiRate & 1 || spiRate == 6 ? 0 : _BV(SPI2X); @@ -88,7 +91,7 @@ void spiBegin() { } /** SPI read data */ - void spiRead(uint8_t* buf, uint16_t nbyte) { + void spiRead(uint8_t *buf, uint16_t nbyte) { if (nbyte-- == 0) return; SPDR = 0xFF; for (uint16_t i = 0; i < nbyte; i++) { @@ -107,7 +110,7 @@ void spiBegin() { } /** SPI send block */ - void spiSendBlock(uint8_t token, const uint8_t* buf) { + void spiSendBlock(uint8_t token, const uint8_t *buf) { SPDR = token; for (uint16_t i = 0; i < 512; i += 2) { while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } @@ -215,7 +218,7 @@ void spiBegin() { } // Soft SPI read data - void spiRead(uint8_t* buf, uint16_t nbyte) { + void spiRead(uint8_t *buf, uint16_t nbyte) { for (uint16_t i = 0; i < nbyte; i++) buf[i] = spiRec(); } @@ -242,7 +245,7 @@ void spiBegin() { } // Soft SPI send block - void spiSendBlock(uint8_t token, const uint8_t* buf) { + void spiSendBlock(uint8_t token, const uint8_t *buf) { spiSend(token); for (uint16_t i = 0; i < 512; i++) spiSend(buf[i]); diff --git a/Marlin/src/HAL/AVR/MarlinSPI.h b/Marlin/src/HAL/AVR/MarlinSPI.h new file mode 100644 index 000000000000..0c447ba4cb3d --- /dev/null +++ b/Marlin/src/HAL/AVR/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/AVR/MarlinSerial.cpp b/Marlin/src/HAL/AVR/MarlinSerial.cpp index 265acfae921d..cd8bf5e6903b 100644 --- a/Marlin/src/HAL/AVR/MarlinSerial.cpp +++ b/Marlin/src/HAL/AVR/MarlinSerial.cpp @@ -454,7 +454,7 @@ void MarlinSerial::flush() { } template -size_t MarlinSerial::write(const uint8_t c) { +void MarlinSerial::write(const uint8_t c) { if (Cfg::TX_SIZE == 0) { _written = true; @@ -480,7 +480,7 @@ size_t MarlinSerial::write(const uint8_t c) { // location". This makes sure flush() won't return until the bytes // actually got written B_TXC = 1; - return 1; + return; } const uint8_t i = (tx_buffer.head + 1) & (Cfg::TX_SIZE - 1); @@ -510,7 +510,6 @@ size_t MarlinSerial::write(const uint8_t c) { // Enable TX ISR - Non atomic, but it will eventually enable TX ISR B_UDRIE = 1; } - return 1; } template @@ -566,9 +565,9 @@ ISR(SERIAL_REGNAME(USART, SERIAL_PORT, _UDRE_vect)) { MarlinSerial>::_tx_udr_empty_irq(); } -// Because of the template definition above, it's required to instantiate the template to have all method generated +// Because of the template definition above, it's required to instantiate the template to have all methods generated template class MarlinSerial< MarlinSerialCfg >; -MSerialT customizedSerial1(MSerialT::HasEmergencyParser); +MSerialT1 customizedSerial1(MSerialT1::HasEmergencyParser); #ifdef SERIAL_PORT_2 @@ -583,7 +582,24 @@ MSerialT customizedSerial1(MSerialT::HasEmergencyParser); template class MarlinSerial< MarlinSerialCfg >; MSerialT2 customizedSerial2(MSerialT2::HasEmergencyParser); -#endif + +#endif // SERIAL_PORT_2 + +#ifdef SERIAL_PORT_3 + + // Hookup ISR handlers + ISR(SERIAL_REGNAME(USART, SERIAL_PORT_3, _RX_vect)) { + MarlinSerial>::store_rxd_char(); + } + + ISR(SERIAL_REGNAME(USART, SERIAL_PORT_3, _UDRE_vect)) { + MarlinSerial>::_tx_udr_empty_irq(); + } + + template class MarlinSerial< MarlinSerialCfg >; + MSerialT3 customizedSerial3(MSerialT3::HasEmergencyParser); + +#endif // SERIAL_PORT_3 #ifdef MMU2_SERIAL_PORT @@ -595,9 +611,10 @@ MSerialT customizedSerial1(MSerialT::HasEmergencyParser); MarlinSerial>::_tx_udr_empty_irq(); } - template class MarlinSerial< MarlinSerialCfg >; - MSerialT3 mmuSerial(MSerialT3::HasEmergencyParser); -#endif + template class MarlinSerial< MMU2SerialCfg >; + MSerialMMU2 mmuSerial(MSerialMMU2::HasEmergencyParser); + +#endif // MMU2_SERIAL_PORT #ifdef LCD_SERIAL_PORT @@ -610,7 +627,7 @@ MSerialT customizedSerial1(MSerialT::HasEmergencyParser); } template class MarlinSerial< LCDSerialCfg >; - MSerialT4 lcdSerial(MSerialT4::HasEmergencyParser); + MSerialLCD lcdSerial(MSerialLCD::HasEmergencyParser); #if HAS_DGUS_LCD template @@ -623,13 +640,13 @@ MSerialT customizedSerial1(MSerialT::HasEmergencyParser); } #endif -#endif +#endif // LCD_SERIAL_PORT #endif // !USBCON && (UBRRH || UBRR0H || UBRR1H || UBRR2H || UBRR3H) // For AT90USB targets use the UART for BT interfacing #if defined(USBCON) && ENABLED(BLUETOOTH) - MSerialT5 bluetoothSerial(false); + MSerialBT bluetoothSerial(false); #endif #endif // __AVR__ diff --git a/Marlin/src/HAL/AVR/MarlinSerial.h b/Marlin/src/HAL/AVR/MarlinSerial.h index 2834dbed35ac..0565c7b9db9e 100644 --- a/Marlin/src/HAL/AVR/MarlinSerial.h +++ b/Marlin/src/HAL/AVR/MarlinSerial.h @@ -210,7 +210,7 @@ static int read(); static void flush(); static ring_buffer_pos_t available(); - static size_t write(const uint8_t c); + static void write(const uint8_t c); static void flushTX(); #if HAS_DGUS_LCD static ring_buffer_pos_t get_tx_buffer_free(); @@ -238,66 +238,60 @@ static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED); }; - typedef Serial0Type< MarlinSerial< MarlinSerialCfg > > MSerialT; - extern MSerialT customizedSerial1; + typedef Serial1Class< MarlinSerial< MarlinSerialCfg > > MSerialT1; + extern MSerialT1 customizedSerial1; #ifdef SERIAL_PORT_2 - typedef Serial0Type< MarlinSerial< MarlinSerialCfg > > MSerialT2; + typedef Serial1Class< MarlinSerial< MarlinSerialCfg > > MSerialT2; extern MSerialT2 customizedSerial2; #endif + #ifdef SERIAL_PORT_3 + typedef Serial1Class< MarlinSerial< MarlinSerialCfg > > MSerialT3; + extern MSerialT3 customizedSerial3; + #endif + #endif // !USBCON #ifdef MMU2_SERIAL_PORT template struct MMU2SerialCfg { static constexpr int PORT = serial; + static constexpr unsigned int RX_SIZE = 32; + static constexpr unsigned int TX_SIZE = 32; static constexpr bool XONOFF = false; static constexpr bool EMERGENCYPARSER = false; static constexpr bool DROPPED_RX = false; static constexpr bool RX_FRAMING_ERRORS = false; static constexpr bool MAX_RX_QUEUED = false; - static constexpr unsigned int RX_SIZE = 32; - static constexpr unsigned int TX_SIZE = 32; static constexpr bool RX_OVERRUNS = false; }; - typedef Serial0Type< MarlinSerial< MMU2SerialCfg > > MSerialT3; - extern MSerial3 mmuSerial; + typedef Serial1Class< MarlinSerial< MMU2SerialCfg > > MSerialMMU2; + extern MSerialMMU2 mmuSerial; #endif #ifdef LCD_SERIAL_PORT template struct LCDSerialCfg { - static constexpr int PORT = serial; - static constexpr bool XONOFF = false; - static constexpr bool EMERGENCYPARSER = ENABLED(EMERGENCY_PARSER); - static constexpr bool DROPPED_RX = false; - static constexpr bool RX_FRAMING_ERRORS = false; - static constexpr bool MAX_RX_QUEUED = false; - #if HAS_DGUS_LCD - static constexpr unsigned int RX_SIZE = DGUS_RX_BUFFER_SIZE; - static constexpr unsigned int TX_SIZE = DGUS_TX_BUFFER_SIZE; - static constexpr bool RX_OVERRUNS = ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS); - #elif EITHER(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON) - static constexpr unsigned int RX_SIZE = 64; - static constexpr unsigned int TX_SIZE = 128; - static constexpr bool RX_OVERRUNS = false; - #else - static constexpr unsigned int RX_SIZE = 64; - static constexpr unsigned int TX_SIZE = 128; - static constexpr bool RX_OVERRUNS = false - #endif + static constexpr int PORT = serial; + static constexpr unsigned int RX_SIZE = TERN(HAS_DGUS_LCD, DGUS_RX_BUFFER_SIZE, 64); + static constexpr unsigned int TX_SIZE = TERN(HAS_DGUS_LCD, DGUS_TX_BUFFER_SIZE, 128); + static constexpr bool XONOFF = false; + static constexpr bool EMERGENCYPARSER = ENABLED(EMERGENCY_PARSER); + static constexpr bool DROPPED_RX = false; + static constexpr bool RX_FRAMING_ERRORS = false; + static constexpr bool MAX_RX_QUEUED = false; + static constexpr bool RX_OVERRUNS = BOTH(HAS_DGUS_LCD, SERIAL_STATS_RX_BUFFER_OVERRUNS); }; - - typedef Serial0Type< MarlinSerial< LCDSerialCfg > > MSerialT4; - extern MSerialT4 lcdSerial; + typedef Serial1Class< MarlinSerial< LCDSerialCfg > > MSerialLCD; + extern MSerialLCD lcdSerial; #endif // Use the UART for Bluetooth in AT90USB configurations #if defined(USBCON) && ENABLED(BLUETOOTH) - typedef Serial0Type MSerialT5; - extern MSerialT5 bluetoothSerial; + typedef Serial1Class MSerialBT; + extern MSerialBT bluetoothSerial; #endif diff --git a/Marlin/src/HAL/AVR/eeprom.cpp b/Marlin/src/HAL/AVR/eeprom.cpp index ee2a73e410ad..8d084dec7fdf 100644 --- a/Marlin/src/HAL/AVR/eeprom.cpp +++ b/Marlin/src/HAL/AVR/eeprom.cpp @@ -40,13 +40,13 @@ bool PersistentStore::access_start() { return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { uint8_t * const p = (uint8_t * const)pos; uint8_t v = *value; - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; diff --git a/Marlin/src/HAL/AVR/endstop_interrupts.h b/Marlin/src/HAL/AVR/endstop_interrupts.h index 9fd9c38b86ad..50f29c3356ce 100644 --- a/Marlin/src/HAL/AVR/endstop_interrupts.h +++ b/Marlin/src/HAL/AVR/endstop_interrupts.h @@ -168,6 +168,51 @@ void setup_endstop_interrupts() { pciSetup(Z_MIN_PIN); #endif #endif + #if HAS_I_MAX + #if (digitalPinToInterrupt(I_MAX_PIN) != NOT_AN_INTERRUPT) + _ATTACH(I_MAX_PIN); + #else + static_assert(digitalPinHasPCICR(I_MAX_PIN), "I_MAX_PIN is not interrupt-capable"); + pciSetup(I_MAX_PIN); + #endif + #elif HAS_I_MIN + #if (digitalPinToInterrupt(I_MIN_PIN) != NOT_AN_INTERRUPT) + _ATTACH(I_MIN_PIN); + #else + static_assert(digitalPinHasPCICR(I_MIN_PIN), "I_MIN_PIN is not interrupt-capable"); + pciSetup(I_MIN_PIN); + #endif + #endif + #if HAS_J_MAX + #if (digitalPinToInterrupt(J_MAX_PIN) != NOT_AN_INTERRUPT) + _ATTACH(J_MAX_PIN); + #else + static_assert(digitalPinHasPCICR(J_MAX_PIN), "J_MAX_PIN is not interrupt-capable"); + pciSetup(J_MAX_PIN); + #endif + #elif HAS_J_MIN + #if (digitalPinToInterrupt(J_MIN_PIN) != NOT_AN_INTERRUPT) + _ATTACH(J_MIN_PIN); + #else + static_assert(digitalPinHasPCICR(J_MIN_PIN), "J_MIN_PIN is not interrupt-capable"); + pciSetup(J_MIN_PIN); + #endif + #endif + #if HAS_K_MAX + #if (digitalPinToInterrupt(K_MAX_PIN) != NOT_AN_INTERRUPT) + _ATTACH(K_MAX_PIN); + #else + static_assert(digitalPinHasPCICR(K_MAX_PIN), "K_MAX_PIN is not interrupt-capable"); + pciSetup(K_MAX_PIN); + #endif + #elif HAS_K_MIN + #if (digitalPinToInterrupt(K_MIN_PIN) != NOT_AN_INTERRUPT) + _ATTACH(K_MIN_PIN); + #else + static_assert(digitalPinHasPCICR(K_MIN_PIN), "K_MIN_PIN is not interrupt-capable"); + pciSetup(K_MIN_PIN); + #endif + #endif #if HAS_X2_MAX #if (digitalPinToInterrupt(X2_MAX_PIN) != NOT_AN_INTERRUPT) _ATTACH(X2_MAX_PIN); @@ -256,6 +301,5 @@ void setup_endstop_interrupts() { pciSetup(Z_MIN_PROBE_PIN); #endif #endif - // If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI. } diff --git a/Marlin/src/HAL/AVR/fastio.cpp b/Marlin/src/HAL/AVR/fastio.cpp index b51d7f97686a..8af3ef805efa 100644 --- a/Marlin/src/HAL/AVR/fastio.cpp +++ b/Marlin/src/HAL/AVR/fastio.cpp @@ -241,7 +241,7 @@ uint8_t extDigitalRead(const int8_t pin) { * * DC values -1.0 to 1.0. Negative duty cycle inverts the pulse. */ -uint16_t set_pwm_frequency_hz(const float &hz, const float dca, const float dcb, const float dcc) { +uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb, const float dcc) { float count = 0; if (hz > 0 && (dca || dcb || dcc)) { count = float(F_CPU) / hz; // 1x prescaler, TOP for 16MHz base freq. @@ -267,11 +267,11 @@ uint16_t set_pwm_frequency_hz(const float &hz, const float dca, const float dcb, SET_WGM(5, FAST_PWM_ICRn); // Fast PWM with ICR5 as TOP //SERIAL_ECHOLNPGM("Timer 5 Settings:"); - //SERIAL_ECHOLNPAIR(" Prescaler=", prescaler); - //SERIAL_ECHOLNPAIR(" TOP=", ICR5); - //SERIAL_ECHOLNPAIR(" OCR5A=", OCR5A); - //SERIAL_ECHOLNPAIR(" OCR5B=", OCR5B); - //SERIAL_ECHOLNPAIR(" OCR5C=", OCR5C); + //SERIAL_ECHOLNPGM(" Prescaler=", prescaler); + //SERIAL_ECHOLNPGM(" TOP=", ICR5); + //SERIAL_ECHOLNPGM(" OCR5A=", OCR5A); + //SERIAL_ECHOLNPGM(" OCR5B=", OCR5B); + //SERIAL_ECHOLNPGM(" OCR5C=", OCR5C); } else { // Restore the default for Timer 5 diff --git a/Marlin/src/HAL/AVR/fastio.h b/Marlin/src/HAL/AVR/fastio.h index dd0163466110..f77d4f666c7d 100644 --- a/Marlin/src/HAL/AVR/fastio.h +++ b/Marlin/src/HAL/AVR/fastio.h @@ -284,8 +284,8 @@ enum ClockSource2 : char { * PWM availability macros */ -// Determine which harware PWMs are already in use -#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN) +// Determine which hardware PWMs are already in use +#define _PWM_CHK_FAN_B(P) (P == E0_AUTO_FAN_PIN || P == E1_AUTO_FAN_PIN || P == E2_AUTO_FAN_PIN || P == E3_AUTO_FAN_PIN || P == E4_AUTO_FAN_PIN || P == E5_AUTO_FAN_PIN || P == E6_AUTO_FAN_PIN || P == E7_AUTO_FAN_PIN || P == CHAMBER_AUTO_FAN_PIN || P == COOLER_AUTO_FAN_PIN) #if PIN_EXISTS(CONTROLLER_FAN) #define PWM_CHK_FAN_B(P) (_PWM_CHK_FAN_B(P) || P == CONTROLLER_FAN_PIN) #else diff --git a/Marlin/src/HAL/AVR/inc/SanityCheck.h b/Marlin/src/HAL/AVR/inc/SanityCheck.h index 731cf9286582..79809b8f618d 100644 --- a/Marlin/src/HAL/AVR/inc/SanityCheck.h +++ b/Marlin/src/HAL/AVR/inc/SanityCheck.h @@ -35,7 +35,7 @@ /** * Sanity checks for Spindle / Laser PWM */ -#if ENABLED(SPINDLE_LASER_PWM) +#if ENABLED(SPINDLE_LASER_USE_PWM) #include "../ServoTimers.h" // Needed to check timer availability (_useTimer3) #if SPINDLE_LASER_PWM_PIN == 4 || WITHIN(SPINDLE_LASER_PWM_PIN, 11, 13) #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by a system interrupt." @@ -43,7 +43,7 @@ #error "Counter/Timer for SPINDLE_LASER_PWM_PIN is used by the servo system." #endif #elif defined(SPINDLE_LASER_FREQUENCY) - #error "SPINDLE_LASER_FREQUENCY requires SPINDLE_LASER_PWM." + #error "SPINDLE_LASER_FREQUENCY requires SPINDLE_LASER_USE_PWM." #endif /** @@ -56,3 +56,10 @@ #if BOTH(HAS_TMC_SW_SERIAL, MONITOR_DRIVER_STATUS) #error "MONITOR_DRIVER_STATUS causes performance issues when used with SoftwareSerial-connected drivers. Disable MONITOR_DRIVER_STATUS or use hardware serial to continue." #endif + +/** + * Postmortem debugging + */ +#if ENABLED(POSTMORTEM_DEBUGGING) + #error "POSTMORTEM_DEBUGGING is not supported on AVR boards." +#endif diff --git a/Marlin/src/HAL/AVR/pinsDebug.h b/Marlin/src/HAL/AVR/pinsDebug.h index dac6b1b150bd..fcbb7af3e17e 100644 --- a/Marlin/src/HAL/AVR/pinsDebug.h +++ b/Marlin/src/HAL/AVR/pinsDebug.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -38,7 +41,7 @@ // portModeRegister takes a different argument #define digitalPinToTimer_DEBUG(p) digitalPinToTimer(p) #define digitalPinToBitMask_DEBUG(p) digitalPinToBitMask(p) - #define digitalPinToPort_DEBUG(p) digitalPinToPort_Teensy(p) + #define digitalPinToPort_DEBUG(p) digitalPinToPort(p) #define GET_PINMODE(pin) (*portModeRegister(pin) & digitalPinToBitMask_DEBUG(pin)) #elif AVR_ATmega2560_FAMILY_PLUS_70 // So we can access/display all the pins on boards using more than 70 @@ -235,9 +238,9 @@ static void print_is_also_tied() { SERIAL_ECHOPGM(" is also tied to this pin"); inline void com_print(const uint8_t N, const uint8_t Z) { const uint8_t *TCCRA = (uint8_t*)TCCR_A(N); - SERIAL_ECHOPGM(" COM"); - SERIAL_CHAR('0' + N, Z); - SERIAL_ECHOPAIR(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03)); + SERIAL_ECHOPGM(" COM", AS_DIGIT(N)); + SERIAL_CHAR(Z); + SERIAL_ECHOPGM(": ", int((*TCCRA >> (6 - Z * 2)) & 0x03)); } void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - WGM bit layout @@ -247,8 +250,8 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - uint8_t WGM = (((*TCCRB & _BV(WGM_2)) >> 1) | (*TCCRA & (_BV(WGM_0) | _BV(WGM_1)))); if (N == 4) WGM |= ((*TCCRB & _BV(WGM_3)) >> 1); - SERIAL_ECHOPGM(" TIMER"); - SERIAL_CHAR(T + '0', L); + SERIAL_ECHOPGM(" TIMER", AS_DIGIT(T)); + SERIAL_CHAR(L); SERIAL_ECHO_SP(3); if (N == 3) { @@ -259,22 +262,14 @@ void timer_prefix(uint8_t T, char L, uint8_t N) { // T - timer L - pwm N - const uint16_t *OCRVAL16 = (uint16_t*)OCR_VAL(T, L - 'A'); PWM_PRINT(*OCRVAL16); } - SERIAL_ECHOPAIR(" WGM: ", WGM); + SERIAL_ECHOPGM(" WGM: ", WGM); com_print(T,L); - SERIAL_ECHOPAIR(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) )); - - SERIAL_ECHOPGM(" TCCR"); - SERIAL_CHAR(T + '0'); - SERIAL_ECHOPAIR("A: ", *TCCRA); - - SERIAL_ECHOPGM(" TCCR"); - SERIAL_CHAR(T + '0'); - SERIAL_ECHOPAIR("B: ", *TCCRB); + SERIAL_ECHOPGM(" CS: ", (*TCCRB & (_BV(CS_0) | _BV(CS_1) | _BV(CS_2)) )); + SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "A: ", *TCCRA); + SERIAL_ECHOPGM(" TCCR", AS_DIGIT(T), "B: ", *TCCRB); const uint8_t *TMSK = (uint8_t*)TIMSK(T); - SERIAL_ECHOPGM(" TIMSK"); - SERIAL_CHAR(T + '0'); - SERIAL_ECHOPAIR(": ", *TMSK); + SERIAL_ECHOPGM(" TIMSK", AS_DIGIT(T), ": ", *TMSK); const uint8_t OCIE = L - 'A' + 1; if (N == 3) { if (WGM == 0 || WGM == 2 || WGM == 4 || WGM == 6) err_is_counter(); } @@ -401,3 +396,4 @@ static void pwm_details(uint8_t pin) { #endif #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) diff --git a/Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h b/Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h index 051972a861ad..582ae79ba787 100644 --- a/Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h +++ b/Marlin/src/HAL/AVR/pinsDebug_Teensyduino.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/Marlin/src/HAL/AVR/pinsDebug_plus_70.h b/Marlin/src/HAL/AVR/pinsDebug_plus_70.h index db3fdf1f767b..d9aa44c3cb15 100644 --- a/Marlin/src/HAL/AVR/pinsDebug_plus_70.h +++ b/Marlin/src/HAL/AVR/pinsDebug_plus_70.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp b/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp index cb95a48cccec..45b54379dba7 100644 --- a/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp +++ b/Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp @@ -62,10 +62,10 @@ #include "../shared/Marduino.h" #include "../shared/Delay.h" -#include +#include -uint8_t u8g_bitData, u8g_bitNotData, u8g_bitClock, u8g_bitNotClock; -volatile uint8_t *u8g_outData, *u8g_outClock; +static uint8_t u8g_bitData, u8g_bitNotData, u8g_bitClock, u8g_bitNotClock; +static volatile uint8_t *u8g_outData, *u8g_outClock; static void u8g_com_arduino_init_shift_out(uint8_t dataPin, uint8_t clockPin) { u8g_outData = portOutputRegister(digitalPinToPort(dataPin)); diff --git a/Marlin/src/HAL/DUE/DebugMonitor.cpp b/Marlin/src/HAL/DUE/DebugMonitor.cpp deleted file mode 100644 index 79759151d891..000000000000 --- a/Marlin/src/HAL/DUE/DebugMonitor.cpp +++ /dev/null @@ -1,342 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#ifdef ARDUINO_ARCH_SAM - -#include "../../core/macros.h" -#include "../../core/serial.h" - -#include "../shared/backtrace/unwinder.h" -#include "../shared/backtrace/unwmemaccess.h" - -#include - -// Debug monitor that dumps to the Programming port all status when -// an exception or WDT timeout happens - And then resets the board - -// All the Monitor routines must run with interrupts disabled and -// under an ISR execution context. That is why we cannot reuse the -// Serial interrupt routines or any C runtime, as we don't know the -// state we are when running them - -// A SW memory barrier, to ensure GCC does not overoptimize loops -#define sw_barrier() __asm__ volatile("": : :"memory"); - -// (re)initialize UART0 as a monitor output to 250000,n,8,1 -static void TXBegin() { - - // Disable UART interrupt in NVIC - NVIC_DisableIRQ( UART_IRQn ); - - // We NEED memory barriers to ensure Interrupts are actually disabled! - // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the ) - __DSB(); - __ISB(); - - // Disable clock - pmc_disable_periph_clk( ID_UART ); - - // Configure PMC - pmc_enable_periph_clk( ID_UART ); - - // Disable PDC channel - UART->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS; - - // Reset and disable receiver and transmitter - UART->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS; - - // Configure mode: 8bit, No parity, 1 bit stop - UART->UART_MR = UART_MR_CHMODE_NORMAL | US_MR_CHRL_8_BIT | US_MR_NBSTOP_1_BIT | UART_MR_PAR_NO; - - // Configure baudrate (asynchronous, no oversampling) to BAUDRATE bauds - UART->UART_BRGR = (SystemCoreClock / (BAUDRATE << 4)); - - // Enable receiver and transmitter - UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN; -} - -// Send character through UART with no interrupts -static void TX(char c) { - while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); }; - UART->UART_THR = c; -} - -// Send String through UART -static void TX(const char* s) { - while (*s) TX(*s++); -} - -static void TXDigit(uint32_t d) { - if (d < 10) TX((char)(d+'0')); - else if (d < 16) TX((char)(d+'A'-10)); - else TX('?'); -} - -// Send Hex number thru UART -static void TXHex(uint32_t v) { - TX("0x"); - for (uint8_t i = 0; i < 8; i++, v <<= 4) - TXDigit((v >> 28) & 0xF); -} - -// Send Decimal number thru UART -static void TXDec(uint32_t v) { - if (!v) { - TX('0'); - return; - } - - char nbrs[14]; - char *p = &nbrs[0]; - while (v != 0) { - *p++ = '0' + (v % 10); - v /= 10; - } - do { - p--; - TX(*p); - } while (p != &nbrs[0]); -} - -// Dump a backtrace entry -static bool UnwReportOut(void* ctx, const UnwReport* bte) { - int* p = (int*)ctx; - - (*p)++; - TX('#'); TXDec(*p); TX(" : "); - TX(bte->name?bte->name:"unknown"); TX('@'); TXHex(bte->function); - TX('+'); TXDec(bte->address - bte->function); - TX(" PC:");TXHex(bte->address); TX('\n'); - return true; -} - -#ifdef UNW_DEBUG - void UnwPrintf(const char* format, ...) { - char dest[256]; - va_list argptr; - va_start(argptr, format); - vsprintf(dest, format, argptr); - va_end(argptr); - TX(&dest[0]); - } -#endif - -/* Table of function pointers for passing to the unwinder */ -static const UnwindCallbacks UnwCallbacks = { - UnwReportOut, - UnwReadW, - UnwReadH, - UnwReadB - #ifdef UNW_DEBUG - , UnwPrintf - #endif -}; - -/** - * HardFaultHandler_C: - * This is called from the HardFault_HandlerAsm with a pointer the Fault stack - * as the parameter. We can then read the values from the stack and place them - * into local variables for ease of reading. - * We then read the various Fault Status and Address Registers to help decode - * cause of the fault. - * The function ends with a BKPT instruction to force control back into the debugger - */ -extern "C" -void HardFault_HandlerC(unsigned long *sp, unsigned long lr, unsigned long cause) { - - static const char* causestr[] = { - "NMI","Hard","Mem","Bus","Usage","Debug","WDT","RSTC" - }; - - UnwindFrame btf; - - // Dump report to the Programming port (interrupts are DISABLED) - TXBegin(); - TX("\n\n## Software Fault detected ##\n"); - TX("Cause: "); TX(causestr[cause]); TX('\n'); - - TX("R0 : "); TXHex(((unsigned long)sp[0])); TX('\n'); - TX("R1 : "); TXHex(((unsigned long)sp[1])); TX('\n'); - TX("R2 : "); TXHex(((unsigned long)sp[2])); TX('\n'); - TX("R3 : "); TXHex(((unsigned long)sp[3])); TX('\n'); - TX("R12 : "); TXHex(((unsigned long)sp[4])); TX('\n'); - TX("LR : "); TXHex(((unsigned long)sp[5])); TX('\n'); - TX("PC : "); TXHex(((unsigned long)sp[6])); TX('\n'); - TX("PSR : "); TXHex(((unsigned long)sp[7])); TX('\n'); - - // Configurable Fault Status Register - // Consists of MMSR, BFSR and UFSR - TX("CFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED28)))); TX('\n'); - - // Hard Fault Status Register - TX("HFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED2C)))); TX('\n'); - - // Debug Fault Status Register - TX("DFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED30)))); TX('\n'); - - // Auxiliary Fault Status Register - TX("AFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED3C)))); TX('\n'); - - // Read the Fault Address Registers. These may not contain valid values. - // Check BFARVALID/MMARVALID to see if they are valid values - // MemManage Fault Address Register - TX("MMAR : "); TXHex((*((volatile unsigned long *)(0xE000ED34)))); TX('\n'); - - // Bus Fault Address Register - TX("BFAR : "); TXHex((*((volatile unsigned long *)(0xE000ED38)))); TX('\n'); - - TX("ExcLR: "); TXHex(lr); TX('\n'); - TX("ExcSP: "); TXHex((unsigned long)sp); TX('\n'); - - btf.sp = ((unsigned long)sp) + 8*4; // The original stack pointer - btf.fp = btf.sp; - btf.lr = ((unsigned long)sp[5]); - btf.pc = ((unsigned long)sp[6]) | 1; // Force Thumb, as CORTEX only support it - - // Perform a backtrace - TX("\nBacktrace:\n\n"); - int ctr = 0; - UnwindStart(&btf, &UnwCallbacks, &ctr); - - // Disable all NVIC interrupts - NVIC->ICER[0] = 0xFFFFFFFF; - NVIC->ICER[1] = 0xFFFFFFFF; - - // Relocate VTOR table to default position - SCB->VTOR = 0; - - // Disable USB - otg_disable(); - - // Restart watchdog - WDT_Restart(WDT); - - // Reset controller - NVIC_SystemReset(); - for (;;) WDT_Restart(WDT); -} - -__attribute__((naked)) void NMI_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#0") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void HardFault_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#1") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void MemManage_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#2") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void BusFault_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#3") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void UsageFault_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#4") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void DebugMon_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#5") - A("b HardFault_HandlerC") - ); -} - -/* This is NOT an exception, it is an interrupt handler - Nevertheless, the framing is the same */ -__attribute__((naked)) void WDT_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#6") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void RSTC_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#7") - A("b HardFault_HandlerC") - ); -} - -#endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/DUE/HAL.cpp b/Marlin/src/HAL/DUE/HAL.cpp index 2ae70843f0c7..a3985652e71d 100644 --- a/Marlin/src/HAL/DUE/HAL.cpp +++ b/Marlin/src/HAL/DUE/HAL.cpp @@ -40,6 +40,8 @@ uint16_t HAL_adc_result; // Public functions // ------------------------ +TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial()); + // HAL initialization task void HAL_init() { // Initialize the USB stack @@ -47,6 +49,7 @@ void HAL_init() { OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up #endif usb_task_init(); + TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler } // HAL idle task @@ -74,6 +77,8 @@ uint8_t HAL_get_reset_source() { } } +void HAL_reboot() { rstc_start_software_reset(RSTC); } + void _delay_ms(const int delay_ms) { // Todo: port for Due? delay(delay_ms); @@ -102,11 +107,18 @@ uint16_t HAL_adc_get_result() { return HAL_adc_result; } -// Forward the default serial port -DefaultSerial MSerial(false, Serial); - -DefaultSerial1 MSerial1(false, Serial1); -DefaultSerial2 MSerial2(false, Serial2); -DefaultSerial3 MSerial3(false, Serial3); +// Forward the default serial ports +#if USING_HW_SERIAL0 + DefaultSerial1 MSerial0(false, Serial); +#endif +#if USING_HW_SERIAL1 + DefaultSerial2 MSerial1(false, Serial1); +#endif +#if USING_HW_SERIAL2 + DefaultSerial3 MSerial2(false, Serial2); +#endif +#if USING_HW_SERIAL3 + DefaultSerial4 MSerial3(false, Serial3); +#endif #endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/DUE/HAL.h b/Marlin/src/HAL/DUE/HAL.h index 78c8a800b9d6..92e26bcf4362 100644 --- a/Marlin/src/HAL/DUE/HAL.h +++ b/Marlin/src/HAL/DUE/HAL.h @@ -37,36 +37,44 @@ #include #include "../../core/serial_hook.h" -typedef ForwardSerial0Type< decltype(Serial) > DefaultSerial; -extern DefaultSerial MSerial; -typedef ForwardSerial0Type< decltype(Serial1) > DefaultSerial1; -typedef ForwardSerial0Type< decltype(Serial2) > DefaultSerial2; -typedef ForwardSerial0Type< decltype(Serial3) > DefaultSerial3; -extern DefaultSerial1 MSerial1; -extern DefaultSerial2 MSerial2; -extern DefaultSerial3 MSerial3; +typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1; +typedef ForwardSerial1Class< decltype(Serial1) > DefaultSerial2; +typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3; +typedef ForwardSerial1Class< decltype(Serial3) > DefaultSerial4; +extern DefaultSerial1 MSerial0; +extern DefaultSerial2 MSerial1; +extern DefaultSerial3 MSerial2; +extern DefaultSerial4 MSerial3; #define _MSERIAL(X) MSerial##X #define MSERIAL(X) _MSERIAL(X) -#define MSerial0 MSerial -// Define MYSERIAL0/1 before MarlinSerial includes! #if SERIAL_PORT == -1 || ENABLED(EMERGENCY_PARSER) - #define MYSERIAL0 customizedSerial1 + #define MYSERIAL1 customizedSerial1 #elif WITHIN(SERIAL_PORT, 0, 3) - #define MYSERIAL0 MSERIAL(SERIAL_PORT) + #define MYSERIAL1 MSERIAL(SERIAL_PORT) #else - #error "The required SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "The required SERIAL_PORT must be from 0 to 3, or -1 for USB Serial." #endif #ifdef SERIAL_PORT_2 #if SERIAL_PORT_2 == -1 || ENABLED(EMERGENCY_PARSER) - #define MYSERIAL1 customizedSerial2 + #define MYSERIAL2 customizedSerial2 #elif WITHIN(SERIAL_PORT_2, 0, 3) - #define MYSERIAL1 MSERIAL(SERIAL_PORT_2) + #define MYSERIAL2 MSERIAL(SERIAL_PORT_2) #else - #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration." + #error "SERIAL_PORT_2 must be from 0 to 3, or -1 for USB Serial." + #endif +#endif + +#ifdef SERIAL_PORT_3 + #if SERIAL_PORT_3 == -1 || ENABLED(EMERGENCY_PARSER) + #define MYSERIAL3 customizedSerial3 + #elif WITHIN(SERIAL_PORT_3, 0, 3) + #define MYSERIAL3 MSERIAL(SERIAL_PORT_3) + #else + #error "SERIAL_PORT_3 must be from 0 to 3, or -1 for USB Serial." #endif #endif @@ -74,17 +82,15 @@ extern DefaultSerial3 MSerial3; #if WITHIN(MMU2_SERIAL_PORT, 0, 3) #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) #else - #error "MMU2_SERIAL_PORT must be from 0 to 3. Please update your configuration." + #error "MMU2_SERIAL_PORT must be from 0 to 3." #endif #endif #ifdef LCD_SERIAL_PORT - #if LCD_SERIAL_PORT == -1 - #define LCD_SERIAL lcdSerial - #elif WITHIN(LCD_SERIAL_PORT, 0, 3) + #if WITHIN(LCD_SERIAL_PORT, 0, 3) #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT) #else - #error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "LCD_SERIAL_PORT must be from 0 to 3." #endif #endif @@ -114,7 +120,7 @@ void sei(); // Enable interrupts void HAL_clear_reset_source(); // clear reset reason uint8_t HAL_get_reset_source(); // get reset reason -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); // // ADC diff --git a/Marlin/src/HAL/DUE/HAL_MinSerial.cpp b/Marlin/src/HAL/DUE/HAL_MinSerial.cpp new file mode 100644 index 000000000000..93c4ed67d63c --- /dev/null +++ b/Marlin/src/HAL/DUE/HAL_MinSerial.cpp @@ -0,0 +1,91 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#ifdef ARDUINO_ARCH_SAM + +#include "../../inc/MarlinConfigPre.h" + +#if ENABLED(POSTMORTEM_DEBUGGING) + +#include "../shared/HAL_MinSerial.h" + +#include + +static void TXBegin() { + // Disable UART interrupt in NVIC + NVIC_DisableIRQ( UART_IRQn ); + + // We NEED memory barriers to ensure Interrupts are actually disabled! + // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the ) + __DSB(); + __ISB(); + + // Disable clock + pmc_disable_periph_clk( ID_UART ); + + // Configure PMC + pmc_enable_periph_clk( ID_UART ); + + // Disable PDC channel + UART->UART_PTCR = UART_PTCR_RXTDIS | UART_PTCR_TXTDIS; + + // Reset and disable receiver and transmitter + UART->UART_CR = UART_CR_RSTRX | UART_CR_RSTTX | UART_CR_RXDIS | UART_CR_TXDIS; + + // Configure mode: 8bit, No parity, 1 bit stop + UART->UART_MR = UART_MR_CHMODE_NORMAL | US_MR_CHRL_8_BIT | US_MR_NBSTOP_1_BIT | UART_MR_PAR_NO; + + // Configure baudrate (asynchronous, no oversampling) to BAUDRATE bauds + UART->UART_BRGR = (SystemCoreClock / (BAUDRATE << 4)); + + // Enable receiver and transmitter + UART->UART_CR = UART_CR_RXEN | UART_CR_TXEN; +} + +// A SW memory barrier, to ensure GCC does not overoptimize loops +#define sw_barrier() __asm__ volatile("": : :"memory"); +static void TX(char c) { + while (!(UART->UART_SR & UART_SR_TXRDY)) { WDT_Restart(WDT); sw_barrier(); }; + UART->UART_THR = c; +} + +void install_min_serial() { + HAL_min_serial_init = &TXBegin; + HAL_min_serial_out = &TX; +} + +#if DISABLED(DYNAMIC_VECTORTABLE) +extern "C" { + __attribute__((naked)) void JumpHandler_ASM() { + __asm__ __volatile__ ( + "b CommonHandler_ASM\n" + ); + } + void __attribute__((naked, alias("JumpHandler_ASM"))) HardFault_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"))) BusFault_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"))) UsageFault_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"))) MemManage_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"))) NMI_Handler(); +} +#endif + +#endif // POSTMORTEM_DEBUGGING +#endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/DUE/HAL_SPI.cpp b/Marlin/src/HAL/DUE/HAL_SPI.cpp index 342c37373538..c5e8f2433d7d 100644 --- a/Marlin/src/HAL/DUE/HAL_SPI.cpp +++ b/Marlin/src/HAL/DUE/HAL_SPI.cpp @@ -56,8 +56,8 @@ #pragma GCC optimize (3) typedef uint8_t (*pfnSpiTransfer)(uint8_t b); - typedef void (*pfnSpiRxBlock)(uint8_t* buf, uint32_t nbyte); - typedef void (*pfnSpiTxBlock)(const uint8_t* buf, uint32_t nbyte); + typedef void (*pfnSpiRxBlock)(uint8_t *buf, uint32_t nbyte); + typedef void (*pfnSpiTxBlock)(const uint8_t *buf, uint32_t nbyte); /* ---------------- Macros to be able to access definitions from asm */ #define _PORT(IO) DIO ## IO ## _WPORT @@ -240,7 +240,7 @@ } // all the others - static uint32_t spiDelayCyclesX4 = (F_CPU) / 1000000; // 4µs => 125khz + static uint16_t spiDelayNS = 4000; // 4000ns => 125khz static uint8_t spiTransferX(uint8_t b) { // using Mode 0 int bits = 8; @@ -249,12 +249,12 @@ b <<= 1; // little setup time WRITE(SD_SCK_PIN, HIGH); - __delay_4cycles(spiDelayCyclesX4); + DELAY_NS(spiDelayNS); b |= (READ(SD_MISO_PIN) != 0); WRITE(SD_SCK_PIN, LOW); - __delay_4cycles(spiDelayCyclesX4); + DELAY_NS(spiDelayNS); } while (--bits); return b; } @@ -270,7 +270,7 @@ static pfnSpiTransfer spiTransferTx = (pfnSpiTransfer)spiTransferX; // Block transfers run at ~8 .. ~10Mhz - Tx version (Rx data discarded) - static void spiTxBlock0(const uint8_t* ptr, uint32_t todo) { + static void spiTxBlock0(const uint8_t *ptr, uint32_t todo) { uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(SD_MOSI_PIN)) + 0x30; /* SODR of port */ uint32_t MOSI_MASK = PIN_MASK(SD_MOSI_PIN); uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SD_SCK_PIN)) + 0x30; /* SODR of port */ @@ -349,7 +349,7 @@ ); } - static void spiRxBlock0(uint8_t* ptr, uint32_t todo) { + static void spiRxBlock0(uint8_t *ptr, uint32_t todo) { uint32_t bin = 0; uint32_t work = 0; uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(SD_MISO_PIN))+0x3C, PIN_SHIFT(SD_MISO_PIN)); /* PDSR of port in bitband area */ @@ -425,19 +425,19 @@ ); } - static void spiTxBlockX(const uint8_t* buf, uint32_t todo) { + static void spiTxBlockX(const uint8_t *buf, uint32_t todo) { do { (void)spiTransferTx(*buf++); } while (--todo); } - static void spiRxBlockX(uint8_t* buf, uint32_t todo) { + static void spiRxBlockX(uint8_t *buf, uint32_t todo) { do { *buf++ = spiTransferRx(0xFF); } while (--todo); } - // Pointers to generic functions for block tranfers + // Pointers to generic functions for block transfers static pfnSpiTxBlock spiTxBlock = (pfnSpiTxBlock)spiTxBlockX; static pfnSpiRxBlock spiRxBlock = (pfnSpiRxBlock)spiRxBlockX; @@ -463,7 +463,7 @@ return b; } - void spiRead(uint8_t* buf, uint16_t nbyte) { + void spiRead(uint8_t *buf, uint16_t nbyte) { if (nbyte) { _SS_WRITE(LOW); WRITE(SD_MOSI_PIN, HIGH); // Output 1s 1 @@ -478,7 +478,7 @@ _SS_WRITE(HIGH); } - void spiSendBlock(uint8_t token, const uint8_t* buf) { + void spiSendBlock(uint8_t token, const uint8_t *buf) { _SS_WRITE(LOW); (void)spiTransferTx(token); spiTxBlock(buf, 512); @@ -510,7 +510,7 @@ spiRxBlock = (pfnSpiRxBlock)spiRxBlockX; break; default: - spiDelayCyclesX4 = ((F_CPU) / 1000000) >> (6 - spiRate); + spiDelayNS = 4000 >> (6 - spiRate); // spiRate of 2 gives the maximum error with current CPU spiTransferTx = (pfnSpiTransfer)spiTransferX; spiTransferRx = (pfnSpiTransfer)spiTransferX; spiTxBlock = (pfnSpiTxBlock)spiTxBlockX; @@ -594,18 +594,14 @@ SPI_Configure(SPI0, ID_SPI0, SPI_MR_MSTR | SPI_MR_MODFDIS | SPI_MR_PS); SPI_Enable(SPI0); - SET_OUTPUT(DAC0_SYNC); + SET_OUTPUT(DAC0_SYNC_PIN); #if HAS_MULTI_EXTRUDER - SET_OUTPUT(DAC1_SYNC); - WRITE(DAC1_SYNC, HIGH); + OUT_WRITE(DAC1_SYNC_PIN, HIGH); #endif - SET_OUTPUT(SPI_EEPROM1_CS); - SET_OUTPUT(SPI_EEPROM2_CS); - SET_OUTPUT(SPI_FLASH_CS); - WRITE(DAC0_SYNC, HIGH); - WRITE(SPI_EEPROM1_CS, HIGH); - WRITE(SPI_EEPROM2_CS, HIGH); - WRITE(SPI_FLASH_CS, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); + OUT_WRITE(SPI_EEPROM1_CS_PIN, HIGH); + OUT_WRITE(SPI_EEPROM2_CS_PIN, HIGH); + OUT_WRITE(SPI_FLASH_CS_PIN, HIGH); WRITE(SD_SS_PIN, HIGH); OUT_WRITE(SDSS, LOW); @@ -645,7 +641,7 @@ } // Read from SPI into buffer - void spiRead(uint8_t* buf, uint16_t nbyte) { + void spiRead(uint8_t *buf, uint16_t nbyte) { if (!nbyte) return; --nbyte; for (int i = 0; i < nbyte; i++) { @@ -668,7 +664,7 @@ //DELAY_US(1U); } - void spiSend(const uint8_t* buf, size_t nbyte) { + void spiSend(const uint8_t *buf, size_t nbyte) { if (!nbyte) return; --nbyte; for (size_t i = 0; i < nbyte; i++) { @@ -689,7 +685,7 @@ FLUSH_RX(); } - void spiSend(uint32_t chan, const uint8_t* buf, size_t nbyte) { + void spiSend(uint32_t chan, const uint8_t *buf, size_t nbyte) { if (!nbyte) return; --nbyte; for (size_t i = 0; i < nbyte; i++) { @@ -702,7 +698,7 @@ } // Write from buffer to SPI - void spiSendBlock(uint8_t token, const uint8_t* buf) { + void spiSendBlock(uint8_t token, const uint8_t *buf) { SPI0->SPI_TDR = (uint32_t)token | SPI_PCS(SPI_CHAN); WHILE_TX(0); //WHILE_RX(0); @@ -801,19 +797,19 @@ uint8_t spiRec() { return (uint8_t)spiTransfer(0xFF); } - void spiRead(uint8_t* buf, uint16_t nbyte) { + void spiRead(uint8_t *buf, uint16_t nbyte) { for (int i = 0; i < nbyte; i++) buf[i] = spiTransfer(0xFF); } void spiSend(uint8_t data) { spiTransfer(data); } - void spiSend(const uint8_t* buf, size_t nbyte) { + void spiSend(const uint8_t *buf, size_t nbyte) { for (uint16_t i = 0; i < nbyte; i++) spiTransfer(buf[i]); } - void spiSendBlock(uint8_t token, const uint8_t* buf) { + void spiSendBlock(uint8_t token, const uint8_t *buf) { spiTransfer(token); for (uint16_t i = 0; i < 512; i++) spiTransfer(buf[i]); diff --git a/Marlin/src/HAL/DUE/MarlinSPI.h b/Marlin/src/HAL/DUE/MarlinSPI.h new file mode 100644 index 000000000000..0c447ba4cb3d --- /dev/null +++ b/Marlin/src/HAL/DUE/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/DUE/MarlinSerial.cpp b/Marlin/src/HAL/DUE/MarlinSerial.cpp index 50b84c0b1d40..fe62ff5607d5 100644 --- a/Marlin/src/HAL/DUE/MarlinSerial.cpp +++ b/Marlin/src/HAL/DUE/MarlinSerial.cpp @@ -476,9 +476,9 @@ void MarlinSerial::flushTX() { // If not using the USB port as serial port -#if SERIAL_PORT >= 0 +#if defined(SERIAL_PORT) && SERIAL_PORT >= 0 template class MarlinSerial< MarlinSerialCfg >; - MSerialT customizedSerial1(MarlinSerialCfg::EMERGENCYPARSER); + MSerialT1 customizedSerial1(MarlinSerialCfg::EMERGENCYPARSER); #endif #if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0 @@ -486,4 +486,9 @@ void MarlinSerial::flushTX() { MSerialT2 customizedSerial2(MarlinSerialCfg::EMERGENCYPARSER); #endif +#if defined(SERIAL_PORT_3) && SERIAL_PORT_3 >= 0 + template class MarlinSerial< MarlinSerialCfg >; + MSerialT3 customizedSerial3(MarlinSerialCfg::EMERGENCYPARSER); +#endif + #endif // ARDUINO_ARCH_SAM diff --git a/Marlin/src/HAL/DUE/MarlinSerial.h b/Marlin/src/HAL/DUE/MarlinSerial.h index 7fc21264bba9..4a62e2834f7f 100644 --- a/Marlin/src/HAL/DUE/MarlinSerial.h +++ b/Marlin/src/HAL/DUE/MarlinSerial.h @@ -140,12 +140,17 @@ struct MarlinSerialCfg { static constexpr bool MAX_RX_QUEUED = ENABLED(SERIAL_STATS_MAX_RX_QUEUED); }; -#if SERIAL_PORT >= 0 - typedef Serial0Type< MarlinSerial< MarlinSerialCfg > > MSerialT; - extern MSerialT customizedSerial1; +#if defined(SERIAL_PORT) && SERIAL_PORT >= 0 + typedef Serial1Class< MarlinSerial< MarlinSerialCfg > > MSerialT1; + extern MSerialT1 customizedSerial1; #endif #if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0 - typedef Serial0Type< MarlinSerial< MarlinSerialCfg > > MSerialT2; + typedef Serial1Class< MarlinSerial< MarlinSerialCfg > > MSerialT2; extern MSerialT2 customizedSerial2; #endif + +#if defined(SERIAL_PORT_3) && SERIAL_PORT_3 >= 0 + typedef Serial1Class< MarlinSerial< MarlinSerialCfg > > MSerialT3; + extern MSerialT3 customizedSerial3; +#endif diff --git a/Marlin/src/HAL/DUE/MarlinSerialUSB.cpp b/Marlin/src/HAL/DUE/MarlinSerialUSB.cpp index d85aaf14b0c3..67c597da80c4 100644 --- a/Marlin/src/HAL/DUE/MarlinSerialUSB.cpp +++ b/Marlin/src/HAL/DUE/MarlinSerialUSB.cpp @@ -19,13 +19,13 @@ * along with this program. If not, see . * */ +#ifdef ARDUINO_ARCH_SAM /** * MarlinSerial_Due.cpp - Hardware serial library for Arduino DUE * Copyright (c) 2017 Eduardo José Tagle. All right reserved * Based on MarlinSerial for AVR, copyright (c) 2006 Nicholas Zambetti. All right reserved. */ -#ifdef ARDUINO_ARCH_SAM #include "../../inc/MarlinConfig.h" @@ -33,10 +33,6 @@ #include "MarlinSerialUSB.h" -#if ENABLED(EMERGENCY_PARSER) - #include "../../feature/e_parser.h" -#endif - // Imports from Atmel USB Stack/CDC implementation extern "C" { bool usb_task_cdc_isenabled(); @@ -69,7 +65,7 @@ int MarlinSerialUSB::peek() { pending_char = udi_cdc_getc(); - TERN_(EMERGENCY_PARSER, emergency_parser.update(emergency_state, (char)pending_char)); + TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast(this)->emergency_state, (char)pending_char)); return pending_char; } @@ -91,21 +87,19 @@ int MarlinSerialUSB::read() { int c = udi_cdc_getc(); - TERN_(EMERGENCY_PARSER, emergency_parser.update(emergency_state, (char)c)); + TERN_(EMERGENCY_PARSER, emergency_parser.update(static_cast(this)->emergency_state, (char)c)); return c; } -bool MarlinSerialUSB::available() { - /* If Pending chars */ - return pending_char >= 0 || - /* or USB CDC enumerated and configured on the PC side and some - bytes where sent to us */ - (usb_task_cdc_isenabled() && udi_cdc_is_rx_ready()); +int MarlinSerialUSB::available() { + if (pending_char > 0) return pending_char; + return pending_char == 0 || + // or USB CDC enumerated and configured on the PC side and some bytes where sent to us */ + (usb_task_cdc_isenabled() && udi_cdc_is_rx_ready()); } void MarlinSerialUSB::flush() { } -void MarlinSerialUSB::flushTX() { } size_t MarlinSerialUSB::write(const uint8_t c) { @@ -135,10 +129,13 @@ size_t MarlinSerialUSB::write(const uint8_t c) { // Preinstantiate #if SERIAL_PORT == -1 - MSerialT customizedSerial1(TERN0(EMERGENCY_PARSER, true)); + MSerialT1 customizedSerial1(TERN0(EMERGENCY_PARSER, true)); #endif #if SERIAL_PORT_2 == -1 - MSerialT customizedSerial2(TERN0(EMERGENCY_PARSER, true)); + MSerialT2 customizedSerial2(TERN0(EMERGENCY_PARSER, true)); +#endif +#if SERIAL_PORT_3 == -1 + MSerialT3 customizedSerial3(TERN0(EMERGENCY_PARSER, true)); #endif #endif // HAS_USB_SERIAL diff --git a/Marlin/src/HAL/DUE/MarlinSerialUSB.h b/Marlin/src/HAL/DUE/MarlinSerialUSB.h index 9643a8465a2b..6da1ef8c08f6 100644 --- a/Marlin/src/HAL/DUE/MarlinSerialUSB.h +++ b/Marlin/src/HAL/DUE/MarlinSerialUSB.h @@ -27,38 +27,39 @@ */ #include "../../inc/MarlinConfig.h" -#if HAS_USB_SERIAL - -#include #include "../../core/serial_hook.h" +#include struct MarlinSerialUSB { - static void begin(const long); - static void end(); - static int peek(); - static int read(); - static void flush(); - static void flushTX(); - static bool available(); - static size_t write(const uint8_t c); + void begin(const long); + void end(); + int peek(); + int read(); + void flush(); + int available(); + size_t write(const uint8_t c); #if ENABLED(SERIAL_STATS_DROPPED_RX) - FORCE_INLINE static uint32_t dropped() { return 0; } + FORCE_INLINE uint32_t dropped() { return 0; } #endif #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) - FORCE_INLINE static int rxMaxEnqueued() { return 0; } + FORCE_INLINE int rxMaxEnqueued() { return 0; } #endif }; -typedef Serial0Type MSerialT; #if SERIAL_PORT == -1 - extern MSerialT customizedSerial1; + typedef Serial1Class MSerialT1; + extern MSerialT1 customizedSerial1; #endif #if SERIAL_PORT_2 == -1 - extern MSerialT customizedSerial2; + typedef Serial1Class MSerialT2; + extern MSerialT2 customizedSerial2; #endif -#endif // HAS_USB_SERIAL +#if SERIAL_PORT_3 == -1 + typedef Serial1Class MSerialT3; + extern MSerialT3 customizedSerial3; +#endif diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp index d07da15ad80e..68f6a5c1a7cb 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_shared_hw_spi.cpp @@ -20,7 +20,6 @@ * */ - /** * Based on u8g_com_msp430_hw_spi.c * @@ -60,7 +59,7 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #include "../../../MarlinCore.h" diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp index 7df180cbaa82..65bfd4f4e2d4 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp @@ -59,9 +59,10 @@ #if ENABLED(U8GLIB_ST7920) +#include "../../../inc/MarlinConfig.h" #include "../../shared/Delay.h" -#include +#include #include "u8g_com_HAL_DUE_sw_spi_shared.h" diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp index 890546af58bb..2b13c182d023 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi.cpp @@ -64,7 +64,7 @@ #include "../../shared/Marduino.h" #include "../../shared/Delay.h" -#include +#include #if ENABLED(FYSETC_MINI_12864) #define SPISEND_SW_DUE u8g_spiSend_sw_DUE_mode_3 diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp index 615a386c3542..904924793b4c 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.cpp @@ -59,9 +59,10 @@ #if HAS_MARLINUI_U8GLIB +#include "../../../inc/MarlinConfig.h" #include "../../shared/Delay.h" -#include +#include #include "u8g_com_HAL_DUE_sw_spi_shared.h" diff --git a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h index f076c503cac2..45231fd091eb 100644 --- a/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h +++ b/Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_sw_spi_shared.h @@ -23,7 +23,7 @@ #include "../../../inc/MarlinConfigPre.h" #include "../../shared/Marduino.h" -#include +#include void u8g_SetPIOutput_DUE(u8g_t *u8g, uint8_t pin_index); void u8g_SetPILevel_DUE(u8g_t *u8g, uint8_t pin_index, uint8_t level); diff --git a/Marlin/src/HAL/DUE/eeprom_flash.cpp b/Marlin/src/HAL/DUE/eeprom_flash.cpp index 209a5161ae02..7ce4a84df531 100644 --- a/Marlin/src/HAL/DUE/eeprom_flash.cpp +++ b/Marlin/src/HAL/DUE/eeprom_flash.cpp @@ -135,11 +135,11 @@ static uint8_t buffer[256] = {0}, // The RAM buffer to accumulate writes #define DEBUG_OUT ENABLED(EE_EMU_DEBUG) #include "../../core/debug_out.h" -static void ee_Dump(const int page, const void* data) { +static void ee_Dump(const int page, const void *data) { #ifdef EE_EMU_DEBUG - const uint8_t* c = (const uint8_t*) data; + const uint8_t *c = (const uint8_t*) data; char buffer[80]; sprintf_P(buffer, PSTR("Page: %d (0x%04x)\n"), page, page); @@ -181,7 +181,7 @@ static void ee_Dump(const int page, const void* data) { * @param data (pointer to the data buffer) */ __attribute__ ((long_call, section (".ramfunc"))) -static bool ee_PageWrite(uint16_t page, const void* data) { +static bool ee_PageWrite(uint16_t page, const void *data) { uint16_t i; uint32_t addrflash = uint32_t(getFlashStorage(page)); @@ -200,9 +200,9 @@ static bool ee_PageWrite(uint16_t page, const void* data) { pageContents[i] = (((uint32_t*)data)[i]) | (~(pageContents[i] ^ ((uint32_t*)data)[i])); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM PageWrite ", page); - DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash); - DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0)); + DEBUG_ECHOLNPGM("EEPROM PageWrite ", page); + DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash); + DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0)); DEBUG_FLUSH(); // Get the page relative to the start of the EFC controller, and the EFC controller to use @@ -246,7 +246,7 @@ static bool ee_PageWrite(uint16_t page, const void* data) { __enable_irq(); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ", page); + DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ", page); return false; } @@ -271,7 +271,7 @@ static bool ee_PageWrite(uint16_t page, const void* data) { __enable_irq(); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Write failure for page ", page); + DEBUG_ECHOLNPGM("EEPROM Write failure for page ", page); return false; } @@ -287,14 +287,14 @@ static bool ee_PageWrite(uint16_t page, const void* data) { #ifdef EE_EMU_DEBUG DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Verify Write failure for page ", page); + DEBUG_ECHOLNPGM("EEPROM Verify Write failure for page ", page); ee_Dump( page, (uint32_t *)addrflash); ee_Dump(-page, data); // Calculate count of changed bits - uint32_t* p1 = (uint32_t*)addrflash; - uint32_t* p2 = (uint32_t*)data; + uint32_t *p1 = (uint32_t*)addrflash; + uint32_t *p2 = (uint32_t*)data; int count = 0; for (i =0; i> 2; i++) { if (p1[i] != p2[i]) { @@ -306,7 +306,7 @@ static bool ee_PageWrite(uint16_t page, const void* data) { } } } - DEBUG_ECHOLNPAIR("--> Differing bits: ", count); + DEBUG_ECHOLNPGM("--> Differing bits: ", count); #endif return false; @@ -326,9 +326,9 @@ static bool ee_PageErase(uint16_t page) { uint32_t addrflash = uint32_t(getFlashStorage(page)); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM PageErase ", page); - DEBUG_ECHOLNPAIR(" in FLASH address ", (uint32_t)addrflash); - DEBUG_ECHOLNPAIR(" base address ", (uint32_t)getFlashStorage(0)); + DEBUG_ECHOLNPGM("EEPROM PageErase ", page); + DEBUG_ECHOLNPGM(" in FLASH address ", (uint32_t)addrflash); + DEBUG_ECHOLNPGM(" base address ", (uint32_t)getFlashStorage(0)); DEBUG_FLUSH(); // Get the page relative to the start of the EFC controller, and the EFC controller to use @@ -371,7 +371,7 @@ static bool ee_PageErase(uint16_t page) { __enable_irq(); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Unlock failure for page ",page); + DEBUG_ECHOLNPGM("EEPROM Unlock failure for page ",page); return false; } @@ -395,7 +395,7 @@ static bool ee_PageErase(uint16_t page) { __enable_irq(); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Erase failure for page ",page); + DEBUG_ECHOLNPGM("EEPROM Erase failure for page ",page); return false; } @@ -411,7 +411,7 @@ static bool ee_PageErase(uint16_t page) { for (i = 0; i < PageSize >> 2; i++) { if (*aligned_src++ != 0xFFFFFFFF) { DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Verify Erase failure for page ",page); + DEBUG_ECHOLNPGM("EEPROM Verify Erase failure for page ",page); ee_Dump(page, (uint32_t *)addrflash); return false; } @@ -470,7 +470,7 @@ static uint8_t ee_Read(uint32_t address, bool excludeRAMBuffer=false) { for (int page = curPage - 1; page >= 0; --page) { // Get a pointer to the flash page - uint8_t* pflash = (uint8_t*)getFlashStorage(page + curGroup * PagesPerGroup); + uint8_t *pflash = (uint8_t*)getFlashStorage(page + curGroup * PagesPerGroup); uint16_t i = 0; while (i <= (PageSize - 4)) { /* (PageSize - 4) because otherwise, there is not enough room for data and headers */ @@ -550,7 +550,7 @@ static uint32_t ee_GetAddrRange(uint32_t address, bool excludeRAMBuffer=false) { for (int page = curPage - 1; page >= 0; --page) { // Get a pointer to the flash page - uint8_t* pflash = (uint8_t*)getFlashStorage(page + curGroup * PagesPerGroup); + uint8_t *pflash = (uint8_t*)getFlashStorage(page + curGroup * PagesPerGroup); uint16_t i = 0; while (i <= (PageSize - 4)) { /* (PageSize - 4) because otherwise, there is not enough room for data and headers */ @@ -589,7 +589,7 @@ static uint32_t ee_GetAddrRange(uint32_t address, bool excludeRAMBuffer=false) { } static bool ee_IsPageClean(int page) { - uint32_t* pflash = (uint32_t*) getFlashStorage(page); + uint32_t *pflash = (uint32_t*) getFlashStorage(page); for (uint16_t i = 0; i < (PageSize >> 2); ++i) if (*pflash++ != 0xFFFFFFFF) return false; return true; @@ -599,7 +599,7 @@ static bool ee_Flush(uint32_t overrideAddress = 0xFFFFFFFF, uint8_t overrideData // Check if RAM buffer has something to be written bool isEmpty = true; - uint32_t* p = (uint32_t*) &buffer[0]; + uint32_t *p = (uint32_t*) &buffer[0]; for (uint16_t j = 0; j < (PageSize >> 2); j++) { if (*p++ != 0xFFFFFFFF) { isEmpty = false; @@ -922,7 +922,7 @@ static void ee_Init() { if (curGroup >= GroupCount) curGroup = 0; DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Current Group: ",curGroup); + DEBUG_ECHOLNPGM("EEPROM Current Group: ",curGroup); DEBUG_FLUSH(); // Now, validate that all the other group pages are empty @@ -932,7 +932,7 @@ static void ee_Init() { for (int page = 0; page < PagesPerGroup; page++) { if (!ee_IsPageClean(grp * PagesPerGroup + page)) { DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on group ", grp); + DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on group ", grp); DEBUG_FLUSH(); ee_PageErase(grp * PagesPerGroup + page); } @@ -949,14 +949,14 @@ static void ee_Init() { } DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Active page: ", curPage); + DEBUG_ECHOLNPGM("EEPROM Active page: ", curPage); DEBUG_FLUSH(); // Make sure the pages following the first clean one are also clean for (int page = curPage + 1; page < PagesPerGroup; page++) { if (!ee_IsPageClean(curGroup * PagesPerGroup + page)) { DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM Page ", page, " not clean on active group ", curGroup); + DEBUG_ECHOLNPGM("EEPROM Page ", page, " not clean on active group ", curGroup); DEBUG_FLUSH(); ee_Dump(curGroup * PagesPerGroup + page, getFlashStorage(curGroup * PagesPerGroup + page)); ee_PageErase(curGroup * PagesPerGroup + page); @@ -976,14 +976,13 @@ bool PersistentStore::access_start() { ee_Init(); return true; } bool PersistentStore::access_finish() { ee_Flush(); return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { uint8_t * const p = (uint8_t * const)pos; uint8_t v = *value; - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! - if (v != ee_Read(uint32_t(p))) { + if (v != ee_Read(uint32_t(p))) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! ee_Write(uint32_t(p), v); - delay(2); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (ee_Read(uint32_t(p)) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; diff --git a/Marlin/src/HAL/DUE/eeprom_wired.cpp b/Marlin/src/HAL/DUE/eeprom_wired.cpp index b488c36f1666..557a2f2cffa5 100644 --- a/Marlin/src/HAL/DUE/eeprom_wired.cpp +++ b/Marlin/src/HAL/DUE/eeprom_wired.cpp @@ -42,14 +42,13 @@ bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { uint8_t * const p = (uint8_t * const)pos; uint8_t v = *value; - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); - delay(2); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; diff --git a/Marlin/src/HAL/DUE/endstop_interrupts.h b/Marlin/src/HAL/DUE/endstop_interrupts.h index 999ada512761..9c7e2104882e 100644 --- a/Marlin/src/HAL/DUE/endstop_interrupts.h +++ b/Marlin/src/HAL/DUE/endstop_interrupts.h @@ -64,4 +64,10 @@ void setup_endstop_interrupts() { TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); } diff --git a/Marlin/src/HAL/DUE/fastio.h b/Marlin/src/HAL/DUE/fastio.h index f375cb6b2977..a609210d8130 100644 --- a/Marlin/src/HAL/DUE/fastio.h +++ b/Marlin/src/HAL/DUE/fastio.h @@ -33,7 +33,7 @@ * For ARDUINO_ARCH_SAM * Note the code here was specifically crafted by disassembling what GCC produces * out of it, so GCC is able to optimize it out as much as possible to the least - * amount of instructions. Be very carefull if you modify them, as "clean code" + * amount of instructions. Be very careful if you modify them, as "clean code" * leads to less efficient compiled code!! */ diff --git a/Marlin/src/HAL/DUE/inc/SanityCheck.h b/Marlin/src/HAL/DUE/inc/SanityCheck.h index 26fb44f3980b..87b09cf29257 100644 --- a/Marlin/src/HAL/DUE/inc/SanityCheck.h +++ b/Marlin/src/HAL/DUE/inc/SanityCheck.h @@ -57,5 +57,5 @@ #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on this platform." + #error "TMC220x Software Serial is not supported on the DUE platform." #endif diff --git a/Marlin/src/HAL/DUE/pinsDebug.h b/Marlin/src/HAL/DUE/pinsDebug.h index a99ca8ecce90..f01c53c8ce06 100644 --- a/Marlin/src/HAL/DUE/pinsDebug.h +++ b/Marlin/src/HAL/DUE/pinsDebug.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -64,6 +67,7 @@ #define PRINT_PORT(p) #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define GET_ARRAY_PIN(p) pin_array[p].pin #define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL ? 1 : 0) @@ -86,7 +90,7 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input void pwm_details(int32_t pin) { if (pwm_status(pin)) { uint32_t chan = g_APinDescription[pin].ulPWMChannel; - SERIAL_ECHOPAIR("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY); + SERIAL_ECHOPGM("PWM = ", PWM_INTERFACE->PWM_CH_NUM[chan].PWM_CDTY); } } diff --git a/Marlin/src/HAL/DUE/usb/arduino_due_x.h b/Marlin/src/HAL/DUE/usb/arduino_due_x.h index d3b333fb349a..e7b6f3dcb303 100644 --- a/Marlin/src/HAL/DUE/usb/arduino_due_x.h +++ b/Marlin/src/HAL/DUE/usb/arduino_due_x.h @@ -71,7 +71,7 @@ /* ------------------------------------------------------------------------ */ /** - * \page arduino_due_x_board_info "Arduino Due/X - Board informations" + * \page arduino_due_x_board_info "Arduino Due/X - Board information" * This page lists several definition related to the board description. * */ diff --git a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp index d92d332c1efd..3dcbbaecd28f 100644 --- a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp +++ b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.cpp @@ -32,7 +32,7 @@ Ctrl_status sd_mmc_spi_test_unit_ready() { Ctrl_status sd_mmc_spi_read_capacity(uint32_t *nb_sector) { if (!IS_SD_INSERTED() || IS_SD_PRINTING() || IS_SD_FILE_OPEN() || !card.isMounted()) return CTRL_NO_PRESENT; - *nb_sector = card.getSd2Card().cardSize() - 1; + *nb_sector = card.diskIODriver()->cardSize() - 1; return CTRL_GOOD; } @@ -74,24 +74,24 @@ Ctrl_status sd_mmc_spi_usb_read_10(uint32_t addr, uint16_t nb_sector) { #endif // Start reading - if (!card.getSd2Card().readStart(addr)) + if (!card.diskIODriver()->readStart(addr)) return CTRL_FAIL; // For each specified sector while (nb_sector--) { // Read a sector - card.getSd2Card().readData(sector_buf); + card.diskIODriver()->readData(sector_buf); // RAM -> USB if (!udi_msc_trans_block(true, sector_buf, SD_MMC_BLOCK_SIZE, nullptr)) { - card.getSd2Card().readStop(); + card.diskIODriver()->readStop(); return CTRL_FAIL; } } // Stop reading - card.getSd2Card().readStop(); + card.diskIODriver()->readStop(); // Done return CTRL_GOOD; @@ -113,7 +113,7 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) { } #endif - if (!card.getSd2Card().writeStart(addr, nb_sector)) + if (!card.diskIODriver()->writeStart(addr, nb_sector)) return CTRL_FAIL; // For each specified sector @@ -121,16 +121,16 @@ Ctrl_status sd_mmc_spi_usb_write_10(uint32_t addr, uint16_t nb_sector) { // USB -> RAM if (!udi_msc_trans_block(false, sector_buf, SD_MMC_BLOCK_SIZE, nullptr)) { - card.getSd2Card().writeStop(); + card.diskIODriver()->writeStop(); return CTRL_FAIL; } // Write a sector - card.getSd2Card().writeData(sector_buf); + card.diskIODriver()->writeData(sector_buf); } // Stop writing - card.getSd2Card().writeStop(); + card.diskIODriver()->writeStop(); // Done return CTRL_GOOD; diff --git a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h index d77e4f95232b..553fd3c29a88 100644 --- a/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h +++ b/Marlin/src/HAL/DUE/usb/sd_mmc_spi_mem.h @@ -74,7 +74,7 @@ #define SD_MMC_REMOVING 2 -//---- CONTROL FONCTIONS ---- +//---- CONTROL FUNCTIONS ---- //! //! @brief This function initializes the hw/sw resources required to drive the SD_MMC_SPI. //!/ @@ -134,7 +134,7 @@ extern bool sd_mmc_spi_wr_protect(void); extern bool sd_mmc_spi_removal(void); -//---- ACCESS DATA FONCTIONS ---- +//---- ACCESS DATA FUNCTIONS ---- #if ACCESS_USB == true // Standard functions for open in read/write mode the device diff --git a/Marlin/src/HAL/DUE/usb/udd.h b/Marlin/src/HAL/DUE/usb/udd.h index 7ec8c03dee63..319d8842f744 100644 --- a/Marlin/src/HAL/DUE/usb/udd.h +++ b/Marlin/src/HAL/DUE/usb/udd.h @@ -90,7 +90,7 @@ typedef struct { //! This buffer must be word align for DATA IN phase (use prefix COMPILER_WORD_ALIGNED for buffer) uint8_t *payload; - //! Size of buffer to send or fill, and content the number of byte transfered + //! Size of buffer to send or fill, and content the number of byte transferred uint16_t payload_size; //! Callback called after reception of ZLP from setup request @@ -132,10 +132,10 @@ typedef void (*udd_callback_halt_cleared_t)(void); * * \param status UDD_EP_TRANSFER_OK, if transfer is complete * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted - * \param n number of data transfered + * \param n number of data transferred */ typedef void (*udd_callback_trans_t) (udd_ep_status_t status, - iram_size_t nb_transfered, udd_ep_id_t ep); + iram_size_t nb_transferred, udd_ep_id_t ep); /** * \brief Authorizes the VBUS event @@ -303,7 +303,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep, * The driver uses a specific DMA USB to transfer data * from internal RAM to endpoint, if this one is available. * When the transfer is finished or aborted (stall, reset, ...), the \a callback is called. - * The \a callback returns the transfer status and eventually the number of byte transfered. + * The \a callback returns the transfer status and eventually the number of byte transferred. * Note: The control endpoint is not authorized. * * \param ep The ID of the endpoint to use diff --git a/Marlin/src/HAL/DUE/usb/udi_cdc.c b/Marlin/src/HAL/DUE/usb/udi_cdc.c index cbe23dbb68fb..89debe57f130 100644 --- a/Marlin/src/HAL/DUE/usb/udi_cdc.c +++ b/Marlin/src/HAL/DUE/usb/udi_cdc.c @@ -162,7 +162,7 @@ static void udi_cdc_ctrl_state_notify(uint8_t port, udd_ep_id_t ep); * * \param status UDD_EP_TRANSFER_OK, if transfer finished * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted - * \param n number of data transfered + * \param n number of data transferred */ static void udi_cdc_serial_state_msg_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep); @@ -200,7 +200,7 @@ static void udi_cdc_data_received(udd_ep_status_t status, iram_size_t n, udd_ep_ * * \param status UDD_EP_TRANSFER_OK, if transfer finished * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted - * \param n number of data transfered + * \param n number of data transferred */ static void udi_cdc_data_sent(udd_ep_status_t status, iram_size_t n, udd_ep_id_t ep); diff --git a/Marlin/src/HAL/DUE/usb/udi_cdc.h b/Marlin/src/HAL/DUE/usb/udi_cdc.h index 0ecf7bb00e5e..b61845011aa2 100644 --- a/Marlin/src/HAL/DUE/usb/udi_cdc.h +++ b/Marlin/src/HAL/DUE/usb/udi_cdc.h @@ -675,11 +675,11 @@ iram_size_t udi_cdc_multi_write_buf(uint8_t port, const void* buf, iram_size_t s * - \code // Waits and gets a value on CDC line int udi_cdc_getc(void); // Reads a RAM buffer on CDC line - iram_size_t udi_cdc_read_buf(int* buf, iram_size_t size); + iram_size_t udi_cdc_read_buf(int *buf, iram_size_t size); // Puts a byte on CDC line int udi_cdc_putc(int value); // Writes a RAM buffer on CDC line - iram_size_t udi_cdc_write_buf(const int* buf, iram_size_t size); \endcode + iram_size_t udi_cdc_write_buf(const int *buf, iram_size_t size); \endcode * * \section udi_cdc_use_cases Advanced use cases * For more advanced use of the UDI CDC module, see the following use cases: diff --git a/Marlin/src/HAL/DUE/usb/udi_cdc_conf.h b/Marlin/src/HAL/DUE/usb/udi_cdc_conf.h index d406a87743f3..e61b8cbaadf4 100644 --- a/Marlin/src/HAL/DUE/usb/udi_cdc_conf.h +++ b/Marlin/src/HAL/DUE/usb/udi_cdc_conf.h @@ -106,7 +106,7 @@ extern "C" { */ //@{ # if UDI_CDC_PORT_NB > 2 -# error USBB, UDP, UDPHS and UOTGHS interfaces have not enought endpoints. +# error USBB, UDP, UDPHS and UOTGHS interfaces have not enough endpoints. # endif #define UDI_CDC_DATA_EP_IN_0 (1 | USB_EP_DIR_IN) // TX #define UDI_CDC_DATA_EP_OUT_0 (2 | USB_EP_DIR_OUT) // RX diff --git a/Marlin/src/HAL/DUE/usb/udi_msc.c b/Marlin/src/HAL/DUE/usb/udi_msc.c index b7c3bb5ea016..dd3404877210 100644 --- a/Marlin/src/HAL/DUE/usb/udi_msc.c +++ b/Marlin/src/HAL/DUE/usb/udi_msc.c @@ -173,7 +173,7 @@ static void udi_msc_cbw_wait(void); * * \param status UDD_EP_TRANSFER_OK, if transfer is finished * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted - * \param nb_received number of data transfered + * \param nb_received number of data transferred */ static void udi_msc_cbw_received(udd_ep_status_t status, iram_size_t nb_received, udd_ep_id_t ep); @@ -211,7 +211,7 @@ static void udi_msc_data_send(uint8_t * buffer, uint8_t buf_size); * * \param status UDD_EP_TRANSFER_OK, if transfer finish * \param status UDD_EP_TRANSFER_ABORT, if transfer aborted - * \param nb_sent number of data transfered + * \param nb_sent number of data transferred */ static void udi_msc_data_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep); @@ -244,7 +244,7 @@ void udi_msc_csw_send(void); * * \param status UDD_EP_TRANSFER_OK, if transfer is finished * \param status UDD_EP_TRANSFER_ABORT, if transfer is aborted - * \param nb_sent number of data transfered + * \param nb_sent number of data transferred */ static void udi_msc_csw_sent(udd_ep_status_t status, iram_size_t nb_sent, udd_ep_id_t ep); @@ -463,7 +463,7 @@ uint8_t udi_msc_getsetting(void) static void udi_msc_cbw_invalid(void) { if (!udi_msc_b_cbw_invalid) - return; // Don't re-stall endpoint if error reseted by setup + return; // Don't re-stall endpoint if error reset by setup udd_ep_set_halt(UDI_MSC_EP_OUT); // If stall cleared then re-stall it. Only Setup MSC Reset can clear it udd_ep_wait_stall_clear(UDI_MSC_EP_OUT, udi_msc_cbw_invalid); @@ -472,7 +472,7 @@ static void udi_msc_cbw_invalid(void) static void udi_msc_csw_invalid(void) { if (!udi_msc_b_cbw_invalid) - return; // Don't re-stall endpoint if error reseted by setup + return; // Don't re-stall endpoint if error reset by setup udd_ep_set_halt(UDI_MSC_EP_IN); // If stall cleared then re-stall it. Only Setup MSC Reset can clear it udd_ep_wait_stall_clear(UDI_MSC_EP_IN, udi_msc_csw_invalid); diff --git a/Marlin/src/HAL/DUE/usb/uotghs_device_due.c b/Marlin/src/HAL/DUE/usb/uotghs_device_due.c index e13232a39c7d..c7e8f8d99135 100644 --- a/Marlin/src/HAL/DUE/usb/uotghs_device_due.c +++ b/Marlin/src/HAL/DUE/usb/uotghs_device_due.c @@ -325,7 +325,7 @@ static void udd_sleep_mode(bool b_idle) /** * \name Control endpoint low level management routine. * - * This function performs control endpoint mangement. + * This function performs control endpoint management. * It handle the SETUP/DATA/HANDSHAKE phases of a control transaction. */ //@{ @@ -397,9 +397,9 @@ static void udd_ctrl_endofrequest(void); /** * \brief Main interrupt routine for control endpoint * - * This switchs control endpoint events to correct sub function. + * This switches control endpoint events to correct sub function. * - * \return \c 1 if an event about control endpoint is occured, otherwise \c 0. + * \return \c 1 if an event about control endpoint is occurred, otherwise \c 0. */ static bool udd_ctrl_interrupt(void); @@ -410,7 +410,7 @@ static bool udd_ctrl_interrupt(void); * \name Management of bulk/interrupt/isochronous endpoints * * The UDD manages the data transfer on endpoints: - * - Start data tranfer on endpoint with USB Device DMA + * - Start data transfer on endpoint with USB Device DMA * - Send a ZLP packet if requested * - Call callback registered to signal end of transfer * The transfer abort and stall feature are supported. @@ -431,7 +431,7 @@ typedef struct { uint8_t *buf; //! Size of buffer to send or fill iram_size_t buf_size; - //!< Size of data transfered + //!< Size of data transferred iram_size_t buf_cnt; //!< Size of data loaded (or prepared for DMA) last time iram_size_t buf_load; @@ -486,7 +486,7 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n #ifdef UDD_EP_DMA_SUPPORTED /** - * \brief Start the next transfer if necessary or complet the job associated. + * \brief Start the next transfer if necessary or complete the job associated. * * \param ep endpoint number without direction flag */ @@ -496,9 +496,9 @@ static void udd_ep_finish_job(udd_ep_job_t * ptr_job, bool b_abort, uint8_t ep_n /** * \brief Main interrupt routine for bulk/interrupt/isochronous endpoints * - * This switchs endpoint events to correct sub function. + * This switches endpoint events to correct sub function. * - * \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occured, otherwise \c 0. + * \return \c 1 if an event about bulk/interrupt/isochronous endpoints has occurred, otherwise \c 0. */ static bool udd_ep_interrupt(void); @@ -520,7 +520,7 @@ static bool udd_ep_interrupt(void); * * Note: * Here, the global interrupt mask is not clear when an USB interrupt is enabled - * because this one can not be occured during the USB ISR (=during INTX is masked). + * because this one can not be occurred during the USB ISR (=during INTX is masked). * See Technical reference $3.8.3 Masking interrupt requests in peripheral modules. */ #ifdef UHD_ENABLE @@ -787,7 +787,7 @@ void udd_attach(void) udd_sleep_mode(true); otg_unfreeze_clock(); - // This section of clock check can be improved with a chek of + // This section of clock check can be improved with a check of // USB clock source via sysclk() // Check USB clock because the source can be a PLL while (!Is_otg_clock_usable()); @@ -803,7 +803,7 @@ void udd_attach(void) #ifdef USB_DEVICE_HS_SUPPORT udd_enable_msof_interrupt(); #endif - // Reset following interupts flag + // Reset following interrupts flag udd_ack_reset(); udd_ack_sof(); udd_ack_msof(); @@ -902,7 +902,7 @@ bool udd_ep_alloc(udd_ep_id_t ep, uint8_t bmAttributes, } dbg_print("alloc(%x, %d) ", ep, MaxEndpointSize); - // Bank choise + // Bank choice switch (bmAttributes & USB_EP_TYPE_MASK) { case USB_EP_TYPE_ISOCHRONOUS: nb_bank = UDD_ISOCHRONOUS_NB_BANK(ep); @@ -1228,7 +1228,7 @@ bool udd_ep_wait_stall_clear(udd_ep_id_t ep, if (Is_udd_endpoint_stall_requested(ep) || ptr_job->stall_requested) { - // Endpoint halted then registes the callback + // Endpoint halted then registers the callback ptr_job->busy = true; ptr_job->call_nohalt = callback; } else { @@ -1386,7 +1386,7 @@ static void udd_ctrl_setup_received(void) // Decode setup request if (udc_process_setup() == false) { - // Setup request unknow then stall it + // Setup request unknown then stall it udd_ctrl_stall_data(); udd_ack_setup_received(0); return; @@ -1447,7 +1447,7 @@ static void udd_ctrl_in_sent(void) udd_ctrl_prev_payload_buf_cnt += udd_ctrl_payload_buf_cnt; if ((udd_g_ctrlreq.req.wLength == udd_ctrl_prev_payload_buf_cnt) || b_shortpacket) { - // All data requested are transfered or a short packet has been sent + // All data requested are transferred or a short packet has been sent // then it is the end of data phase. // Generate an OUT ZLP for handshake phase. udd_ctrl_send_zlp_out(); @@ -1516,7 +1516,7 @@ static void udd_ctrl_out_received(void) // End of SETUP request: // - Data IN Phase aborted, // - or last Data IN Phase hidden by ZLP OUT sending quiclky, - // - or ZLP OUT received normaly. + // - or ZLP OUT received normally. udd_ctrl_endofrequest(); } else { // Protocol error during SETUP request @@ -1544,7 +1544,7 @@ static void udd_ctrl_out_received(void) (udd_ctrl_prev_payload_buf_cnt + udd_ctrl_payload_buf_cnt))) { // End of reception because it is a short packet - // Before send ZLP, call intermediat calback + // Before send ZLP, call intermediate callback // in case of data receiv generate a stall udd_g_ctrlreq.payload_size = udd_ctrl_payload_buf_cnt; if (NULL != udd_g_ctrlreq.over_under_run) { @@ -1565,7 +1565,7 @@ static void udd_ctrl_out_received(void) if (udd_g_ctrlreq.payload_size == udd_ctrl_payload_buf_cnt) { // Overrun then request a new payload buffer if (!udd_g_ctrlreq.over_under_run) { - // No callback availabled to request a new payload buffer + // No callback available to request a new payload buffer udd_ctrl_stall_data(); // Ack reception of OUT to replace NAK by a STALL udd_ack_out_received(0); @@ -1805,7 +1805,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep) // transfer size of UDD_ENDPOINT_MAX_TRANS Bytes next_trans = UDD_ENDPOINT_MAX_TRANS; - // Set 0 to tranfer the maximum + // Set 0 to transfer the maximum udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(0); } else { udd_dma_ctrl = UOTGHS_DEVDMACONTROL_BUFF_LENGTH(next_trans); @@ -1850,7 +1850,7 @@ static void udd_ep_trans_done(udd_ep_id_t ep) } cpu_irq_restore(flags); - // Here a ZLP has been recieved + // Here a ZLP has been received // and the DMA transfer must be not started. // It is the end of transfer ptr_job->buf_size = ptr_job->buf_cnt; @@ -1991,13 +1991,13 @@ static bool udd_ep_interrupt(void) } dbg_print("dma%x: ", ep); udd_disable_endpoint_dma_interrupt(ep); - // Save number of data no transfered + // Save number of data no transferred nb_remaining = (udd_endpoint_dma_get_status(ep) & UOTGHS_DEVDMASTATUS_BUFF_COUNT_Msk) >> UOTGHS_DEVDMASTATUS_BUFF_COUNT_Pos; if (nb_remaining) { // Transfer no complete (short packet or ZLP) then: - // Update number of data transfered + // Update number of data transferred ptr_job->buf_cnt -= nb_remaining; // Set transfer complete to stop the transfer ptr_job->buf_size = ptr_job->buf_cnt; @@ -2056,7 +2056,7 @@ static bool udd_ep_interrupt(void) udd_disable_endpoint_interrupt(ep); Assert(ptr_job->stall_requested); - // A stall has been requested during backgound transfer + // A stall has been requested during background transfer ptr_job->stall_requested = false; udd_disable_endpoint_bank_autoswitch(ep); udd_enable_stall_handshake(ep); diff --git a/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h b/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h index 0fef30804662..e1e59237d823 100644 --- a/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h +++ b/Marlin/src/HAL/DUE/usb/usb_protocol_msc.h @@ -130,7 +130,7 @@ struct usb_msc_cbw { struct usb_msc_csw { le32_t dCSWSignature; //!< Must contain 'USBS' le32_t dCSWTag; //!< Same as dCBWTag - le32_t dCSWDataResidue; //!< Number of bytes not transfered + le32_t dCSWDataResidue; //!< Number of bytes not transferred uint8_t bCSWStatus; //!< Status code }; diff --git a/Marlin/src/HAL/DUE/usb/usb_task.c b/Marlin/src/HAL/DUE/usb/usb_task.c index 66bdb265d881..54a808d7f4f1 100644 --- a/Marlin/src/HAL/DUE/usb/usb_task.c +++ b/Marlin/src/HAL/DUE/usb/usb_task.c @@ -264,7 +264,7 @@ bool usb_task_extra_string(void) { ** Handle device requests that the ASF stack doesn't */ bool usb_task_other_requests(void) { - uint8_t* ptr = 0; + uint8_t *ptr = 0; uint16_t size = 0; if (Udd_setup_type() == USB_REQ_TYPE_VENDOR) { @@ -322,7 +322,7 @@ void usb_task_init(void) { char *sptr; // Patch in the filament diameter - sprintf_P(diam, PSTR("%d"), (int)((DEFAULT_NOMINAL_FILAMENT_DIA) * 1000.0)); + itoa((int)((DEFAULT_NOMINAL_FILAMENT_DIA) * 1000), diam, 10); // And copy it to the proper place, expanding it to unicode sptr = &diam[0]; diff --git a/Marlin/src/HAL/ESP32/FlushableHardwareSerial.cpp b/Marlin/src/HAL/ESP32/FlushableHardwareSerial.cpp index cc5a4fc476c4..145662215a9b 100644 --- a/Marlin/src/HAL/ESP32/FlushableHardwareSerial.cpp +++ b/Marlin/src/HAL/ESP32/FlushableHardwareSerial.cpp @@ -20,11 +20,10 @@ * */ -#include "FlushableHardwareSerial.h" - #ifdef ARDUINO_ARCH_ESP32 +#include "FlushableHardwareSerial.h" -Serial0Type flushableSerial(false, 0); +Serial1Class flushableSerial(false, 0); -#endif // ARDUINO_ARCH_ESP32 +#endif diff --git a/Marlin/src/HAL/ESP32/FlushableHardwareSerial.h b/Marlin/src/HAL/ESP32/FlushableHardwareSerial.h index 27df0be4b63b..012dda8626b0 100644 --- a/Marlin/src/HAL/ESP32/FlushableHardwareSerial.h +++ b/Marlin/src/HAL/ESP32/FlushableHardwareSerial.h @@ -21,9 +21,9 @@ */ #pragma once -#ifdef ARDUINO_ARCH_ESP32 - #include + +#include "../shared/Marduino.h" #include "../../core/serial_hook.h" class FlushableHardwareSerial : public HardwareSerial { @@ -31,6 +31,4 @@ class FlushableHardwareSerial : public HardwareSerial { FlushableHardwareSerial(int uart_nr) : HardwareSerial(uart_nr) {} }; -extern Serial0Type flushableSerial; - -#endif // ARDUINO_ARCH_ESP32 +extern Serial1Class flushableSerial; diff --git a/Marlin/src/HAL/ESP32/HAL.cpp b/Marlin/src/HAL/ESP32/HAL.cpp index 6ff1446b1c57..6a66d519b33c 100644 --- a/Marlin/src/HAL/ESP32/HAL.cpp +++ b/Marlin/src/HAL/ESP32/HAL.cpp @@ -28,6 +28,10 @@ #include #include +#if ENABLED(USE_ESP32_TASK_WDT) + #include +#endif + #if ENABLED(WIFISUPPORT) #include #include "wifi.h" @@ -41,7 +45,7 @@ #endif #if ENABLED(ESP3D_WIFISUPPORT) - DefaultSerial MSerial(false, Serial2Socket); + DefaultSerial1 MSerial0(false, Serial2Socket); #endif // ------------------------ @@ -90,10 +94,24 @@ volatile int numPWMUsed = 0, #endif -void HAL_init() { TERN_(I2S_STEPPER_STREAM, i2s_init()); } +#if ENABLED(USE_ESP32_EXIO) + HardwareSerial YSerial2(2); -void HAL_init_board() { + void Write_EXIO(uint8_t IO, uint8_t v) { + if (ISRS_ENABLED()) { + DISABLE_ISRS(); + YSerial2.write(0x80 | (((char)v) << 5) | (IO - 100)); + ENABLE_ISRS(); + } + else + YSerial2.write(0x80 | (((char)v) << 5) | (IO - 100)); + } +#endif +void HAL_init_board() { + #if ENABLED(USE_ESP32_TASK_WDT) + esp_task_wdt_init(10, true); + #endif #if ENABLED(ESP3D_WIFISUPPORT) esp3dlib.init(); #elif ENABLED(WIFISUPPORT) @@ -126,6 +144,14 @@ void HAL_init_board() { #endif #endif + // Initialize the i2s peripheral only if the I2S stepper stream is enabled. + // The following initialization is performed after Serial1 and Serial2 are defined as + // their native pins might conflict with the i2s stream even when they are remapped. + #if ENABLED(USE_ESP32_EXIO) + YSerial2.begin(460800 * 3, SERIAL_8N1, 16, 17); + #elif ENABLED(I2S_STEPPER_STREAM) + i2s_init(); + #endif } void HAL_idletask() { @@ -139,6 +165,8 @@ void HAL_clear_reset_source() { } uint8_t HAL_get_reset_source() { return rtc_get_reset_reason(1); } +void HAL_reboot() { ESP.restart(); } + void _delay_ms(int delay_ms) { delay(delay_ms); } // return free memory between end of heap (or end bss) and whatever is current @@ -183,6 +211,7 @@ void HAL_adc_init() { TERN_(HAS_TEMP_ADC_7, adc3_set_attenuation(get_channel(TEMP_7_PIN), ADC_ATTEN_11db)); TERN_(HAS_HEATED_BED, adc1_set_attenuation(get_channel(TEMP_BED_PIN), ADC_ATTEN_11db)); TERN_(HAS_TEMP_CHAMBER, adc1_set_attenuation(get_channel(TEMP_CHAMBER_PIN), ADC_ATTEN_11db)); + TERN_(HAS_TEMP_COOLER, adc1_set_attenuation(get_channel(TEMP_COOLER_PIN), ADC_ATTEN_11db)); TERN_(FILAMENT_WIDTH_SENSOR, adc1_set_attenuation(get_channel(FILWIDTH_PIN), ADC_ATTEN_11db)); // Note that adc2 is shared with the WiFi module, which has higher priority, so the conversion may fail. diff --git a/Marlin/src/HAL/ESP32/HAL.h b/Marlin/src/HAL/ESP32/HAL.h index 3dc27c64933c..bc0ce4e037cf 100644 --- a/Marlin/src/HAL/ESP32/HAL.h +++ b/Marlin/src/HAL/ESP32/HAL.h @@ -51,15 +51,15 @@ extern portMUX_TYPE spinlock; -#define MYSERIAL0 flushableSerial +#define MYSERIAL1 flushableSerial #if EITHER(WIFISUPPORT, ESP3D_WIFISUPPORT) #if ENABLED(ESP3D_WIFISUPPORT) - typedef ForwardSerial0Type< decltype(Serial2Socket) > DefaultSerial; - extern DefaultSerial MSerial; - #define MYSERIAL1 MSerial + typedef ForwardSerial1Class< decltype(Serial2Socket) > DefaultSerial1; + extern DefaultSerial1 MSerial0; + #define MYSERIAL2 MSerial0 #else - #define MYSERIAL1 webSocketSerial + #define MYSERIAL2 webSocketSerial #endif #endif @@ -101,7 +101,7 @@ void HAL_clear_reset_source(); // reset reason uint8_t HAL_get_reset_source(); -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); void _delay_ms(int delay); @@ -139,9 +139,13 @@ void HAL_adc_start_conversion(const uint8_t adc_pin); #define HAL_IDLETASK 1 #define BOARD_INIT() HAL_init_board(); void HAL_idletask(); -void HAL_init(); +inline void HAL_init() {} void HAL_init_board(); +#if ENABLED(USE_ESP32_EXIO) + void Write_EXIO(uint8_t IO, uint8_t v); +#endif + // // Delay in cycles (used by DELAY_NS / DELAY_US) // diff --git a/Marlin/src/HAL/ESP32/HAL_SPI.cpp b/Marlin/src/HAL/ESP32/HAL_SPI.cpp index 8ee837ba1567..868ab1b6712d 100644 --- a/Marlin/src/HAL/ESP32/HAL_SPI.cpp +++ b/Marlin/src/HAL/ESP32/HAL_SPI.cpp @@ -53,11 +53,9 @@ static SPISettings spiConfig; // ------------------------ void spiBegin() { - #if !PIN_EXISTS(SD_SS) - #error "SD_SS_PIN not defined!" + #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_SS) + OUT_WRITE(SD_SS_PIN, HIGH); #endif - - OUT_WRITE(SD_SS_PIN, HIGH); } void spiInit(uint8_t spiRate) { @@ -85,7 +83,7 @@ uint8_t spiRec() { return returnByte; } -void spiRead(uint8_t* buf, uint16_t nbyte) { +void spiRead(uint8_t *buf, uint16_t nbyte) { SPI.beginTransaction(spiConfig); SPI.transferBytes(0, buf, nbyte); SPI.endTransaction(); @@ -97,7 +95,7 @@ void spiSend(uint8_t b) { SPI.endTransaction(); } -void spiSendBlock(uint8_t token, const uint8_t* buf) { +void spiSendBlock(uint8_t token, const uint8_t *buf) { SPI.beginTransaction(spiConfig); SPI.transfer(token); SPI.writeBytes(const_cast(buf), 512); diff --git a/Marlin/src/HAL/ESP32/MarlinSPI.h b/Marlin/src/HAL/ESP32/MarlinSPI.h new file mode 100644 index 000000000000..0c447ba4cb3d --- /dev/null +++ b/Marlin/src/HAL/ESP32/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/ESP32/WebSocketSerial.cpp b/Marlin/src/HAL/ESP32/WebSocketSerial.cpp index 8825742d38fa..eb5b9d60395a 100644 --- a/Marlin/src/HAL/ESP32/WebSocketSerial.cpp +++ b/Marlin/src/HAL/ESP32/WebSocketSerial.cpp @@ -29,7 +29,7 @@ #include "wifi.h" #include -MSerialT webSocketSerial(false); +MSerialWebSocketT webSocketSerial(false); AsyncWebSocket ws("/ws"); // TODO Move inside the class. // RingBuffer impl @@ -137,7 +137,7 @@ size_t WebSocketSerial::write(const uint8_t c) { return ret; } -size_t WebSocketSerial::write(const uint8_t* buffer, size_t size) { +size_t WebSocketSerial::write(const uint8_t *buffer, size_t size) { size_t written = 0; for (size_t i = 0; i < size; i++) written += write(buffer[i]); diff --git a/Marlin/src/HAL/ESP32/WebSocketSerial.h b/Marlin/src/HAL/ESP32/WebSocketSerial.h index c68792c8c15d..6b3e419d10c5 100644 --- a/Marlin/src/HAL/ESP32/WebSocketSerial.h +++ b/Marlin/src/HAL/ESP32/WebSocketSerial.h @@ -54,7 +54,7 @@ class RingBuffer { ring_buffer_pos_t read(uint8_t *buffer); void flush(); ring_buffer_pos_t write(const uint8_t c); - ring_buffer_pos_t write(const uint8_t* buffer, ring_buffer_pos_t size); + ring_buffer_pos_t write(const uint8_t *buffer, ring_buffer_pos_t size); }; class WebSocketSerial: public Stream { @@ -70,7 +70,7 @@ class WebSocketSerial: public Stream { int read(); void flush(); size_t write(const uint8_t c); - size_t write(const uint8_t* buffer, size_t size); + size_t write(const uint8_t *buffer, size_t size); #if ENABLED(SERIAL_STATS_DROPPED_RX) FORCE_INLINE uint32_t dropped() { return 0; } @@ -81,5 +81,5 @@ class WebSocketSerial: public Stream { #endif }; -typedef Serial0Type MSerialT; -extern MSerialT webSocketSerial; +typedef Serial1Class MSerialWebSocketT; +extern MSerialWebSocketT webSocketSerial; diff --git a/Marlin/src/HAL/ESP32/endstop_interrupts.h b/Marlin/src/HAL/ESP32/endstop_interrupts.h index 743ccd99c904..4725df921b1a 100644 --- a/Marlin/src/HAL/ESP32/endstop_interrupts.h +++ b/Marlin/src/HAL/ESP32/endstop_interrupts.h @@ -59,4 +59,10 @@ void setup_endstop_interrupts() { TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); } diff --git a/Marlin/src/HAL/ESP32/esp32.csv b/Marlin/src/HAL/ESP32/esp32.csv new file mode 100644 index 000000000000..8f6e101f02ea --- /dev/null +++ b/Marlin/src/HAL/ESP32/esp32.csv @@ -0,0 +1,6 @@ +# Name, Type, SubType, Offset, Size, Flags +nvs, data, nvs, 0x9000, 0x5000, +otadata, data, ota, 0xe000, 0x2000, +app0, app, ota_0, 0x10000, 0x180000, +app1, app, ota_1, 0x190000, 0x180000, +spiffs, data, spiffs, 0x310000, 0xF0000, diff --git a/Marlin/src/HAL/ESP32/fastio.h b/Marlin/src/HAL/ESP32/fastio.h index 8db89dca12a1..c8e3f7e343e9 100644 --- a/Marlin/src/HAL/ESP32/fastio.h +++ b/Marlin/src/HAL/ESP32/fastio.h @@ -40,13 +40,19 @@ // Set pin as input with pullup mode #define _PULLUP(IO, v) pinMode(IO, v ? INPUT_PULLUP : INPUT) -// Read a pin wrapper -#define READ(IO) (IS_I2S_EXPANDER_PIN(IO) ? i2s_state(I2S_EXPANDER_PIN_INDEX(IO)) : digitalRead(IO)) - -// Write to a pin wrapper -#define WRITE(IO, v) (IS_I2S_EXPANDER_PIN(IO) ? i2s_write(I2S_EXPANDER_PIN_INDEX(IO), v) : digitalWrite(IO, v)) - -// Set pin as input wrapper +#if ENABLED(USE_ESP32_EXIO) + // Read a pin wrapper + #define READ(IO) digitalRead(IO) + // Write to a pin wrapper + #define WRITE(IO, v) (IO >= 100 ? Write_EXIO(IO, v) : digitalWrite(IO, v)) +#else + // Read a pin wrapper + #define READ(IO) (IS_I2S_EXPANDER_PIN(IO) ? i2s_state(I2S_EXPANDER_PIN_INDEX(IO)) : digitalRead(IO)) + // Write to a pin wrapper + #define WRITE(IO, v) (IS_I2S_EXPANDER_PIN(IO) ? i2s_write(I2S_EXPANDER_PIN_INDEX(IO), v) : digitalWrite(IO, v)) +#endif + +// Set pin as input wrapper (0x80 | (v << 5) | (IO - 100)) #define SET_INPUT(IO) _SET_INPUT(IO) // Set pin as input with pullup wrapper diff --git a/Marlin/src/HAL/ESP32/i2s.cpp b/Marlin/src/HAL/ESP32/i2s.cpp index e8f380654314..557ea319e671 100644 --- a/Marlin/src/HAL/ESP32/i2s.cpp +++ b/Marlin/src/HAL/ESP32/i2s.cpp @@ -23,6 +23,8 @@ #include "../../inc/MarlinConfigPre.h" +#if DISABLED(USE_ESP32_EXIO) + #include "i2s.h" #include "../shared/Marduino.h" @@ -139,7 +141,7 @@ static void IRAM_ATTR i2s_intr_handler_default(void *arg) { I2S0.int_clr.val = I2S0.int_st.val; //clear pending interrupt } -void stepperTask(void* parameter) { +void stepperTask(void *parameter) { uint32_t remaining = 0; while (1) { @@ -340,4 +342,5 @@ void i2s_push_sample() { dma.current[dma.rw_pos++] = i2s_port_data; } +#endif // !USE_ESP32_EXIO #endif // ARDUINO_ARCH_ESP32 diff --git a/Marlin/src/HAL/ESP32/inc/SanityCheck.h b/Marlin/src/HAL/ESP32/inc/SanityCheck.h index f57a6c591028..8bbc68d8715b 100644 --- a/Marlin/src/HAL/ESP32/inc/SanityCheck.h +++ b/Marlin/src/HAL/ESP32/inc/SanityCheck.h @@ -30,9 +30,13 @@ #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on this platform." + #error "TMC220x Software Serial is not supported on ESP32." #endif #if BOTH(WIFISUPPORT, ESP3D_WIFISUPPORT) #error "Only enable one WiFi option, either WIFISUPPORT or ESP3D_WIFISUPPORT." #endif + +#if ENABLED(POSTMORTEM_DEBUGGING) + #error "POSTMORTEM_DEBUGGING is not yet supported on ESP32." +#endif diff --git a/Marlin/src/HAL/ESP32/spi_pins.h b/Marlin/src/HAL/ESP32/spi_pins.h index cfe71eee4a75..58881f0ea7ec 100644 --- a/Marlin/src/HAL/ESP32/spi_pins.h +++ b/Marlin/src/HAL/ESP32/spi_pins.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/Marlin/src/HAL/ESP32/watchdog.h b/Marlin/src/HAL/ESP32/watchdog.h index b6c169e34742..43db8130763f 100644 --- a/Marlin/src/HAL/ESP32/watchdog.h +++ b/Marlin/src/HAL/ESP32/watchdog.h @@ -25,7 +25,7 @@ extern "C" { #endif - esp_err_t esp_task_wdt_reset(); + esp_err_t esp_task_wdt_reset(); #ifdef __cplusplus } diff --git a/Marlin/src/HAL/ESP32/wifi.cpp b/Marlin/src/HAL/ESP32/wifi.cpp index f4cf5a606a03..060f3bdb4874 100644 --- a/Marlin/src/HAL/ESP32/wifi.cpp +++ b/Marlin/src/HAL/ESP32/wifi.cpp @@ -59,7 +59,7 @@ void wifi_init() { MDNS.addService("http", "tcp", 80); - SERIAL_ECHOLNPAIR("Successfully connected to WiFi with SSID '" WIFI_SSID "', hostname: '" WIFI_HOSTNAME "', IP address: ", WiFi.localIP().toString().c_str()); + SERIAL_ECHOLNPGM("Successfully connected to WiFi with SSID '" WIFI_SSID "', hostname: '" WIFI_HOSTNAME "', IP address: ", WiFi.localIP().toString().c_str()); } #endif // WIFISUPPORT diff --git a/Marlin/src/HAL/HAL.h b/Marlin/src/HAL/HAL.h index 9eefda8fb1e2..0cd836af2b68 100644 --- a/Marlin/src/HAL/HAL.h +++ b/Marlin/src/HAL/HAL.h @@ -29,12 +29,6 @@ #include HAL_PATH(.,HAL.h) -#ifdef SERIAL_PORT_2 - #define NUM_SERIAL 2 -#else - #define NUM_SERIAL 1 -#endif - #define HAL_ADC_RANGE _BV(HAL_ADC_RESOLUTION) #ifndef I2C_ADDRESS diff --git a/Marlin/src/HAL/LINUX/HAL.cpp b/Marlin/src/HAL/LINUX/HAL.cpp index 771f1d2a087f..0b679170ef17 100644 --- a/Marlin/src/HAL/LINUX/HAL.cpp +++ b/Marlin/src/HAL/LINUX/HAL.cpp @@ -73,4 +73,6 @@ void HAL_pwm_init() { } +void HAL_reboot() { /* Reset the application state and GPIO */ } + #endif // __PLAT_LINUX__ diff --git a/Marlin/src/HAL/LINUX/HAL.h b/Marlin/src/HAL/LINUX/HAL.h index e4f4dd3fc36a..79639f4993ac 100644 --- a/Marlin/src/HAL/LINUX/HAL.h +++ b/Marlin/src/HAL/LINUX/HAL.h @@ -61,11 +61,11 @@ uint8_t _getc(); #define SHARED_SERVOS HAS_SERVOS extern MSerialT usb_serial; -#define MYSERIAL0 usb_serial +#define MYSERIAL1 usb_serial -#define ST7920_DELAY_1 DELAY_NS(600) -#define ST7920_DELAY_2 DELAY_NS(750) -#define ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // // Interrupts @@ -107,7 +107,7 @@ uint16_t HAL_adc_get_result(); inline void HAL_clear_reset_source(void) {} inline uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; } -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); // Reset the application state and GPIO /* ---------------- Delay in cycles */ FORCE_INLINE static void DELAY_CYCLES(uint64_t x) { diff --git a/Marlin/src/HAL/LINUX/MarlinSPI.h b/Marlin/src/HAL/LINUX/MarlinSPI.h new file mode 100644 index 000000000000..0c447ba4cb3d --- /dev/null +++ b/Marlin/src/HAL/LINUX/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/LINUX/hardware/Gpio.h b/Marlin/src/HAL/LINUX/hardware/Gpio.h index 2d9b1f29ebad..f946be648466 100644 --- a/Marlin/src/HAL/LINUX/hardware/Gpio.h +++ b/Marlin/src/HAL/LINUX/hardware/Gpio.h @@ -40,7 +40,7 @@ struct GpioEvent { pin_type pin_id; GpioEvent::Type event; - GpioEvent(uint64_t timestamp, pin_type pin_id, GpioEvent::Type event){ + GpioEvent(uint64_t timestamp, pin_type pin_id, GpioEvent::Type event) { this->timestamp = timestamp; this->pin_id = pin_id; this->event = event; diff --git a/Marlin/src/HAL/LINUX/hardware/Heater.cpp b/Marlin/src/HAL/LINUX/hardware/Heater.cpp index 70df8161829a..44f11986c98b 100644 --- a/Marlin/src/HAL/LINUX/hardware/Heater.cpp +++ b/Marlin/src/HAL/LINUX/hardware/Heater.cpp @@ -54,7 +54,7 @@ void Heater::update() { } void Heater::interrupt(GpioEvent ev) { - // ununsed + // unused } #endif // __PLAT_LINUX__ diff --git a/Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp b/Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp index c5b3ccc98656..e122ef3666c5 100644 --- a/Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp +++ b/Marlin/src/HAL/LINUX/hardware/LinearAxis.cpp @@ -51,7 +51,7 @@ void LinearAxis::update() { } void LinearAxis::interrupt(GpioEvent ev) { - if (ev.pin_id == step_pin && !Gpio::pin_map[enable_pin].value){ + if (ev.pin_id == step_pin && !Gpio::pin_map[enable_pin].value) { if (ev.event == GpioEvent::RISE) { last_update = ev.timestamp; position += -1 + 2 * Gpio::pin_map[dir_pin].value; diff --git a/Marlin/src/HAL/LINUX/hardware/Timer.h b/Marlin/src/HAL/LINUX/hardware/Timer.h index 757efdcdbd7e..1b3b800dca3d 100644 --- a/Marlin/src/HAL/LINUX/hardware/Timer.h +++ b/Marlin/src/HAL/LINUX/hardware/Timer.h @@ -52,7 +52,7 @@ class Timer { return (*(intptr_t*)timerid); } - static void handler(int sig, siginfo_t *si, void *uc){ + static void handler(int sig, siginfo_t *si, void *uc) { Timer* _this = (Timer*)si->si_value.sival_ptr; _this->avg_error += (Clock::nanos() - _this->start_time) - _this->period; //high_resolution_clock is also limited in precision, but best we have _this->avg_error /= 2; //very crude precision analysis (actually within +-500ns usually) diff --git a/Marlin/src/HAL/LINUX/inc/SanityCheck.h b/Marlin/src/HAL/LINUX/inc/SanityCheck.h index 84167c97a144..36d3190a3e08 100644 --- a/Marlin/src/HAL/LINUX/inc/SanityCheck.h +++ b/Marlin/src/HAL/LINUX/inc/SanityCheck.h @@ -26,7 +26,7 @@ */ // Emulating RAMPS -#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) +#if ENABLED(SPINDLE_LASER_USE_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" #endif @@ -35,5 +35,9 @@ #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on this platform." + #error "TMC220x Software Serial is not supported on LINUX." +#endif + +#if ENABLED(POSTMORTEM_DEBUGGING) + #error "POSTMORTEM_DEBUGGING is not yet supported on LINUX." #endif diff --git a/Marlin/src/HAL/LINUX/include/pinmapping.cpp b/Marlin/src/HAL/LINUX/include/pinmapping.cpp index 870ab3a96e5f..5823668cd50d 100644 --- a/Marlin/src/HAL/LINUX/include/pinmapping.cpp +++ b/Marlin/src/HAL/LINUX/include/pinmapping.cpp @@ -25,43 +25,6 @@ #include "../../../gcode/parser.h" -uint8_t analog_offset = NUM_DIGITAL_PINS - NUM_ANALOG_INPUTS; - -// Get the digital pin for an analog index -pin_t analogInputToDigitalPin(const int8_t p) { - return (WITHIN(p, 0, NUM_ANALOG_INPUTS) ? analog_offset + p : P_NC); -} - -// Return the index of a pin number -int16_t GET_PIN_MAP_INDEX(const pin_t pin) { - return pin; -} - -// Test whether the pin is valid -bool VALID_PIN(const pin_t p) { - return WITHIN(p, 0, NUM_DIGITAL_PINS); -} - -// Get the analog index for a digital pin -int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p) { - return (WITHIN(p, analog_offset, NUM_DIGITAL_PINS) ? p - analog_offset : P_NC); -} - -// Test whether the pin is PWM -bool PWM_PIN(const pin_t p) { - return false; -} - -// Test whether the pin is interruptable -bool INTERRUPT_PIN(const pin_t p) { - return false; -} - -// Get the pin number at the given index -pin_t GET_PIN_MAP_PIN(const int16_t ind) { - return ind; -} - int16_t PARSED_PIN_INDEX(const char code, const int16_t dval) { return parser.intval(code, dval); } diff --git a/Marlin/src/HAL/LINUX/include/pinmapping.h b/Marlin/src/HAL/LINUX/include/pinmapping.h index 98f4b812e873..cfac5e3b48e4 100644 --- a/Marlin/src/HAL/LINUX/include/pinmapping.h +++ b/Marlin/src/HAL/LINUX/include/pinmapping.h @@ -34,26 +34,32 @@ constexpr uint8_t NUM_ANALOG_INPUTS = 16; #define HAL_SENSITIVE_PINS +constexpr uint8_t analog_offset = NUM_DIGITAL_PINS - NUM_ANALOG_INPUTS; + // Get the digital pin for an analog index -pin_t analogInputToDigitalPin(const int8_t p); +constexpr pin_t analogInputToDigitalPin(const int8_t p) { + return (WITHIN(p, 0, NUM_ANALOG_INPUTS) ? analog_offset + p : P_NC); +} + +// Get the analog index for a digital pin +constexpr int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p) { + return (WITHIN(p, analog_offset, NUM_DIGITAL_PINS) ? p - analog_offset : P_NC); +} // Return the index of a pin number -int16_t GET_PIN_MAP_INDEX(const pin_t pin); +constexpr int16_t GET_PIN_MAP_INDEX(const pin_t pin) { return pin; } // Test whether the pin is valid -bool VALID_PIN(const pin_t p); - -// Get the analog index for a digital pin -int8_t DIGITAL_PIN_TO_ANALOG_PIN(const pin_t p); +constexpr bool VALID_PIN(const pin_t p) { return WITHIN(p, 0, NUM_DIGITAL_PINS); } // Test whether the pin is PWM -bool PWM_PIN(const pin_t p); +constexpr bool PWM_PIN(const pin_t p) { return false; } -// Test whether the pin is interruptable -bool INTERRUPT_PIN(const pin_t p); +// Test whether the pin is interruptible +constexpr bool INTERRUPT_PIN(const pin_t p) { return false; } // Get the pin number at the given index -pin_t GET_PIN_MAP_PIN(const int16_t ind); +constexpr pin_t GET_PIN_MAP_PIN(const int16_t ind) { return ind; } // Parse a G-code word into a pin index int16_t PARSED_PIN_INDEX(const char code, const int16_t dval); diff --git a/Marlin/src/HAL/LINUX/include/serial.h b/Marlin/src/HAL/LINUX/include/serial.h index 2585be25bf01..ebae066c3a57 100644 --- a/Marlin/src/HAL/LINUX/include/serial.h +++ b/Marlin/src/HAL/LINUX/include/serial.h @@ -115,4 +115,4 @@ struct HalSerial { volatile bool host_connected; }; -typedef Serial0Type MSerialT; +typedef Serial1Class MSerialT; diff --git a/Marlin/src/HAL/LINUX/main.cpp b/Marlin/src/HAL/LINUX/main.cpp index c409a83e5d55..f2af2ff33f52 100644 --- a/Marlin/src/HAL/LINUX/main.cpp +++ b/Marlin/src/HAL/LINUX/main.cpp @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -16,6 +19,7 @@ * along with this program. If not, see . * */ + #ifdef __PLAT_LINUX__ //#define GPIO_LOGGING // Full GPIO and Positional Logging @@ -105,8 +109,8 @@ int main() { std::thread write_serial (write_serial_thread); std::thread read_serial (read_serial_thread); - #ifdef MYSERIAL0 - MYSERIAL0.begin(BAUDRATE); + #ifdef MYSERIAL1 + MYSERIAL1.begin(BAUDRATE); SERIAL_ECHOLNPGM("x86_64 Initialized"); SERIAL_FLUSHTX(); #endif diff --git a/Marlin/src/HAL/LINUX/pinsDebug.h b/Marlin/src/HAL/LINUX/pinsDebug.h index 8f8543ef5984..7bfd97d024f7 100644 --- a/Marlin/src/HAL/LINUX/pinsDebug.h +++ b/Marlin/src/HAL/LINUX/pinsDebug.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -34,6 +37,7 @@ #define GET_ARRAY_PIN(p) pin_array[p].pin #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin // active ADC function/mode/code values for PINSEL registers diff --git a/Marlin/src/HAL/LPC1768/DebugMonitor.cpp b/Marlin/src/HAL/LPC1768/DebugMonitor.cpp deleted file mode 100644 index 783b10cfac16..000000000000 --- a/Marlin/src/HAL/LPC1768/DebugMonitor.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#ifdef TARGET_LPC1768 - -#include "../../core/macros.h" -#include "../../core/serial.h" -#include - -#include "../shared/backtrace/unwinder.h" -#include "../shared/backtrace/unwmemaccess.h" -#include "watchdog.h" -#include - - -// Debug monitor that dumps to the Programming port all status when -// an exception or WDT timeout happens - And then resets the board - -// All the Monitor routines must run with interrupts disabled and -// under an ISR execution context. That is why we cannot reuse the -// Serial interrupt routines or any C runtime, as we don't know the -// state we are when running them - -// A SW memory barrier, to ensure GCC does not overoptimize loops -#define sw_barrier() __asm__ volatile("": : :"memory"); - -// (re)initialize UART0 as a monitor output to 250000,n,8,1 -static void TXBegin() { -} - -// Send character through UART with no interrupts -static void TX(char c) { - _DBC(c); -} - -// Send String through UART -static void TX(const char* s) { - while (*s) TX(*s++); -} - -static void TXDigit(uint32_t d) { - if (d < 10) TX((char)(d+'0')); - else if (d < 16) TX((char)(d+'A'-10)); - else TX('?'); -} - -// Send Hex number thru UART -static void TXHex(uint32_t v) { - TX("0x"); - for (uint8_t i = 0; i < 8; i++, v <<= 4) - TXDigit((v >> 28) & 0xF); -} - -// Send Decimal number thru UART -static void TXDec(uint32_t v) { - if (!v) { - TX('0'); - return; - } - - char nbrs[14]; - char *p = &nbrs[0]; - while (v != 0) { - *p++ = '0' + (v % 10); - v /= 10; - } - do { - p--; - TX(*p); - } while (p != &nbrs[0]); -} - -// Dump a backtrace entry -static bool UnwReportOut(void* ctx, const UnwReport* bte) { - int* p = (int*)ctx; - - (*p)++; - TX('#'); TXDec(*p); TX(" : "); - TX(bte->name?bte->name:"unknown"); TX('@'); TXHex(bte->function); - TX('+'); TXDec(bte->address - bte->function); - TX(" PC:");TXHex(bte->address); TX('\n'); - return true; -} - -#ifdef UNW_DEBUG - void UnwPrintf(const char* format, ...) { - char dest[256]; - va_list argptr; - va_start(argptr, format); - vsprintf(dest, format, argptr); - va_end(argptr); - TX(&dest[0]); - } -#endif - -/* Table of function pointers for passing to the unwinder */ -static const UnwindCallbacks UnwCallbacks = { - UnwReportOut, - UnwReadW, - UnwReadH, - UnwReadB - #ifdef UNW_DEBUG - ,UnwPrintf - #endif -}; - - -/** - * HardFaultHandler_C: - * This is called from the HardFault_HandlerAsm with a pointer the Fault stack - * as the parameter. We can then read the values from the stack and place them - * into local variables for ease of reading. - * We then read the various Fault Status and Address Registers to help decode - * cause of the fault. - * The function ends with a BKPT instruction to force control back into the debugger - */ -extern "C" -void HardFault_HandlerC(unsigned long *sp, unsigned long lr, unsigned long cause) { - - static const char* causestr[] = { - "NMI","Hard","Mem","Bus","Usage","Debug","WDT","RSTC" - }; - - UnwindFrame btf; - - // Dump report to the Programming port (interrupts are DISABLED) - TXBegin(); - TX("\n\n## Software Fault detected ##\n"); - TX("Cause: "); TX(causestr[cause]); TX('\n'); - - TX("R0 : "); TXHex(((unsigned long)sp[0])); TX('\n'); - TX("R1 : "); TXHex(((unsigned long)sp[1])); TX('\n'); - TX("R2 : "); TXHex(((unsigned long)sp[2])); TX('\n'); - TX("R3 : "); TXHex(((unsigned long)sp[3])); TX('\n'); - TX("R12 : "); TXHex(((unsigned long)sp[4])); TX('\n'); - TX("LR : "); TXHex(((unsigned long)sp[5])); TX('\n'); - TX("PC : "); TXHex(((unsigned long)sp[6])); TX('\n'); - TX("PSR : "); TXHex(((unsigned long)sp[7])); TX('\n'); - - // Configurable Fault Status Register - // Consists of MMSR, BFSR and UFSR - TX("CFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED28)))); TX('\n'); - - // Hard Fault Status Register - TX("HFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED2C)))); TX('\n'); - - // Debug Fault Status Register - TX("DFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED30)))); TX('\n'); - - // Auxiliary Fault Status Register - TX("AFSR : "); TXHex((*((volatile unsigned long *)(0xE000ED3C)))); TX('\n'); - - // Read the Fault Address Registers. These may not contain valid values. - // Check BFARVALID/MMARVALID to see if they are valid values - // MemManage Fault Address Register - TX("MMAR : "); TXHex((*((volatile unsigned long *)(0xE000ED34)))); TX('\n'); - - // Bus Fault Address Register - TX("BFAR : "); TXHex((*((volatile unsigned long *)(0xE000ED38)))); TX('\n'); - - TX("ExcLR: "); TXHex(lr); TX('\n'); - TX("ExcSP: "); TXHex((unsigned long)sp); TX('\n'); - - btf.sp = ((unsigned long)sp) + 8*4; // The original stack pointer - btf.fp = btf.sp; - btf.lr = ((unsigned long)sp[5]); - btf.pc = ((unsigned long)sp[6]) | 1; // Force Thumb, as CORTEX only support it - - // Perform a backtrace - TX("\nBacktrace:\n\n"); - int ctr = 0; - UnwindStart(&btf, &UnwCallbacks, &ctr); - - // Disable all NVIC interrupts - NVIC->ICER[0] = 0xFFFFFFFF; - NVIC->ICER[1] = 0xFFFFFFFF; - - // Relocate VTOR table to default position - SCB->VTOR = 0; - - // Clear cause of reset to prevent entering smoothie bootstrap - HAL_clear_reset_source(); - - // Restart watchdog - #if ENABLED(USE_WATCHDOG) - //WDT_Restart(WDT); - watchdog_init(); - #endif - - // Reset controller - NVIC_SystemReset(); - - // Nothing below here is compiled because NVIC_SystemReset loops forever - - for (;;) { TERN_(USE_WATCHDOG, watchdog_init()); } -} - -extern "C" { -__attribute__((naked)) void NMI_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#0") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void HardFault_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#1") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void MemManage_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#2") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void BusFault_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#3") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void UsageFault_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#4") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void DebugMon_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#5") - A("b HardFault_HandlerC") - ); -} - -/* This is NOT an exception, it is an interrupt handler - Nevertheless, the framing is the same */ -__attribute__((naked)) void WDT_IRQHandler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#6") - A("b HardFault_HandlerC") - ); -} - -__attribute__((naked)) void RSTC_Handler() { - __asm__ __volatile__ ( - ".syntax unified" "\n\t" - A("tst lr, #4") - A("ite eq") - A("mrseq r0, msp") - A("mrsne r0, psp") - A("mov r1,lr") - A("mov r2,#7") - A("b HardFault_HandlerC") - ); -} -} -#endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/LPC1768/HAL.cpp b/Marlin/src/HAL/LPC1768/HAL.cpp index 27aa569faeea..cee9cfc5f744 100644 --- a/Marlin/src/HAL/LPC1768/HAL.cpp +++ b/Marlin/src/HAL/LPC1768/HAL.cpp @@ -29,7 +29,7 @@ #include "watchdog.h" #endif -DefaultSerial USBSerial(false, UsbSerial); +DefaultSerial1 USBSerial(false, UsbSerial); uint32_t HAL_adc_reading = 0; @@ -63,7 +63,12 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval) { return ind > -1 ? ind : dval; } -void flashFirmware(const int16_t) { NVIC_SystemReset(); } +void flashFirmware(const int16_t) { + delay(500); // Give OS time to disconnect + USB_Connect(false); // USB clear connection + delay(1000); // Give OS time to notice + HAL_reboot(); +} void HAL_clear_reset_source(void) { TERN_(USE_WATCHDOG, watchdog_clear_timeout_flag()); @@ -76,4 +81,6 @@ uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; } +void HAL_reboot() { NVIC_SystemReset(); } + #endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/LPC1768/HAL.h b/Marlin/src/HAL/LPC1768/HAL.h index 1dc4fe6ff9c3..f24124980433 100644 --- a/Marlin/src/HAL/LPC1768/HAL.h +++ b/Marlin/src/HAL/LPC1768/HAL.h @@ -50,38 +50,41 @@ extern "C" volatile uint32_t _millis; // // Default graphical display delays // -#ifndef ST7920_DELAY_1 - #define ST7920_DELAY_1 DELAY_NS(600) -#endif -#ifndef ST7920_DELAY_2 - #define ST7920_DELAY_2 DELAY_NS(750) -#endif -#ifndef ST7920_DELAY_3 - #define ST7920_DELAY_3 DELAY_NS(750) -#endif +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 -typedef ForwardSerial0Type< decltype(UsbSerial) > DefaultSerial; -extern DefaultSerial USBSerial; +typedef ForwardSerial1Class< decltype(UsbSerial) > DefaultSerial1; +extern DefaultSerial1 USBSerial; #define _MSERIAL(X) MSerial##X #define MSERIAL(X) _MSERIAL(X) -#define MSerial0 MSerial #if SERIAL_PORT == -1 - #define MYSERIAL0 USBSerial + #define MYSERIAL1 USBSerial #elif WITHIN(SERIAL_PORT, 0, 3) - #define MYSERIAL0 MSERIAL(SERIAL_PORT) + #define MYSERIAL1 MSERIAL(SERIAL_PORT) #else - #error "SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #endif #ifdef SERIAL_PORT_2 #if SERIAL_PORT_2 == -1 - #define MYSERIAL1 USBSerial + #define MYSERIAL2 USBSerial #elif WITHIN(SERIAL_PORT_2, 0, 3) - #define MYSERIAL1 MSERIAL(SERIAL_PORT_2) + #define MYSERIAL2 MSERIAL(SERIAL_PORT_2) + #else + #error "SERIAL_PORT_2 must be from 0 to 3. You can also use -1 if the board supports Native USB." + #endif +#endif + +#ifdef SERIAL_PORT_3 + #if SERIAL_PORT_3 == -1 + #define MYSERIAL3 USBSerial + #elif WITHIN(SERIAL_PORT_3, 0, 3) + #define MYSERIAL3 MSERIAL(SERIAL_PORT_3) #else - #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration." + #error "SERIAL_PORT_3 must be from 0 to 3. You can also use -1 if the board supports Native USB." #endif #endif @@ -91,7 +94,7 @@ extern DefaultSerial USBSerial; #elif WITHIN(MMU2_SERIAL_PORT, 0, 3) #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) #else - #error "MMU2_SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #endif #endif @@ -101,7 +104,10 @@ extern DefaultSerial USBSerial; #elif WITHIN(LCD_SERIAL_PORT, 0, 3) #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT) #else - #error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." + #endif + #if HAS_DGUS_LCD + #define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.available() #endif #endif @@ -150,17 +156,17 @@ int freeMemory(); using FilteredADC = LPC176x::ADC; extern uint32_t HAL_adc_reading; -[[gnu::always_inline]] inline void HAL_start_adc(const pin_t pin) { +[[gnu::always_inline]] inline void HAL_adc_start_conversion(const pin_t pin) { HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits } -[[gnu::always_inline]] inline uint16_t HAL_read_adc() { +[[gnu::always_inline]] inline uint16_t HAL_adc_get_result() { return HAL_adc_reading; } #define HAL_adc_init() #define HAL_ANALOG_SELECT(pin) FilteredADC::enable_channel(pin) -#define HAL_START_ADC(pin) HAL_start_adc(pin) -#define HAL_READ_ADC() HAL_read_adc() +#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin) +#define HAL_READ_ADC() HAL_adc_get_result() #define HAL_ADC_READY() (true) // Test whether the pin is valid @@ -186,7 +192,7 @@ constexpr pin_t GET_PIN_MAP_PIN(const int16_t index) { // Parse a G-code word into a pin index int16_t PARSED_PIN_INDEX(const char code, const int16_t dval); // P0.6 thru P0.9 are for the onboard SD card -#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09 +#define HAL_SENSITIVE_PINS P0_06, P0_07, P0_08, P0_09, #define HAL_IDLETASK 1 void HAL_idletask(); @@ -216,4 +222,4 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, void HAL_clear_reset_source(void); uint8_t HAL_get_reset_source(void); -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); diff --git a/Marlin/src/HAL/LPC1768/HAL_MinSerial.cpp b/Marlin/src/HAL/LPC1768/HAL_MinSerial.cpp new file mode 100644 index 000000000000..57065c49ac83 --- /dev/null +++ b/Marlin/src/HAL/LPC1768/HAL_MinSerial.cpp @@ -0,0 +1,51 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#ifdef TARGET_LPC1768 + +#include "../../inc/MarlinConfig.h" +#include "HAL.h" + +#if ENABLED(POSTMORTEM_DEBUGGING) + +#include "../shared/HAL_MinSerial.h" +#include + +static void TX(char c) { _DBC(c); } +void install_min_serial() { HAL_min_serial_out = &TX; } + +#if DISABLED(DYNAMIC_VECTORTABLE) +extern "C" { + __attribute__((naked)) void JumpHandler_ASM() { + __asm__ __volatile__ ( + "b CommonHandler_ASM\n" + ); + } + void __attribute__((naked, alias("JumpHandler_ASM"))) HardFault_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"))) BusFault_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"))) UsageFault_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"))) MemManage_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"))) NMI_Handler(); +} +#endif + +#endif // POSTMORTEM_DEBUGGING +#endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/LPC1768/HAL_SPI.cpp b/Marlin/src/HAL/LPC1768/HAL_SPI.cpp index dbc89a33f547..29f9b43afef0 100644 --- a/Marlin/src/HAL/LPC1768/HAL_SPI.cpp +++ b/Marlin/src/HAL/LPC1768/HAL_SPI.cpp @@ -66,11 +66,7 @@ #include - #ifndef HAL_SPI_SPEED - #define HAL_SPI_SPEED SPI_FULL_SPEED - #endif - - static uint8_t SPI_speed = HAL_SPI_SPEED; + static uint8_t SPI_speed = SPI_FULL_SPEED; static uint8_t spiTransfer(uint8_t b) { return swSpiTransfer(b, SPI_speed, SD_SCK_PIN, SD_MISO_PIN, SD_MOSI_PIN); @@ -93,12 +89,12 @@ void spiSend(uint8_t b) { (void)spiTransfer(b); } - void spiSend(const uint8_t* buf, size_t nbyte) { + void spiSend(const uint8_t *buf, size_t nbyte) { for (uint16_t i = 0; i < nbyte; i++) (void)spiTransfer(buf[i]); } - void spiSendBlock(uint8_t token, const uint8_t* buf) { + void spiSendBlock(uint8_t token, const uint8_t *buf) { (void)spiTransfer(token); for (uint16_t i = 0; i < 512; i++) (void)spiTransfer(buf[i]); @@ -106,15 +102,13 @@ #else - #ifndef HAL_SPI_SPEED - #ifdef SD_SPI_SPEED - #define HAL_SPI_SPEED SD_SPI_SPEED - #else - #define HAL_SPI_SPEED SPI_FULL_SPEED - #endif + #ifdef SD_SPI_SPEED + #define INIT_SPI_SPEED SD_SPI_SPEED + #else + #define INIT_SPI_SPEED SPI_FULL_SPEED #endif - void spiBegin() { spiInit(HAL_SPI_SPEED); } // Set up SCK, MOSI & MISO pins for SSP0 + void spiBegin() { spiInit(INIT_SPI_SPEED); } // Set up SCK, MOSI & MISO pins for SSP0 void spiInit(uint8_t spiRate) { #if SD_MISO_PIN == BOARD_SPI1_MISO_PIN @@ -135,13 +129,13 @@ void spiSend(uint8_t b) { doio(b); } - void spiSend(const uint8_t* buf, size_t nbyte) { + void spiSend(const uint8_t *buf, size_t nbyte) { for (uint16_t i = 0; i < nbyte; i++) doio(buf[i]); } void spiSend(uint32_t chan, byte b) {} - void spiSend(uint32_t chan, const uint8_t* buf, size_t nbyte) {} + void spiSend(uint32_t chan, const uint8_t *buf, size_t nbyte) {} // Read single byte from SPI uint8_t spiRec() { return doio(0xFF); } @@ -156,7 +150,7 @@ uint8_t spiTransfer(uint8_t b) { return doio(b); } // Write from buffer to SPI - void spiSendBlock(uint8_t token, const uint8_t* buf) { + void spiSendBlock(uint8_t token, const uint8_t *buf) { (void)spiTransfer(token); for (uint16_t i = 0; i < 512; i++) (void)spiTransfer(buf[i]); diff --git a/Marlin/src/HAL/LPC1768/MarlinSerial.cpp b/Marlin/src/HAL/LPC1768/MarlinSerial.cpp index c636a40a120c..f2aecf54a050 100644 --- a/Marlin/src/HAL/LPC1768/MarlinSerial.cpp +++ b/Marlin/src/HAL/LPC1768/MarlinSerial.cpp @@ -21,24 +21,51 @@ */ #ifdef TARGET_LPC1768 -#include "../../inc/MarlinConfigPre.h" #include "MarlinSerial.h" -#if ANY_SERIAL_IS(0) - MSerialT MSerial(true, LPC_UART0); - extern "C" void UART0_IRQHandler() { MSerial.IRQHandler(); } +#include "../../inc/MarlinConfig.h" + +#if USING_HW_SERIAL0 + MarlinSerial _MSerial0(LPC_UART0); + MSerialT MSerial0(true, _MSerial0); + extern "C" void UART0_IRQHandler() { _MSerial0.IRQHandler(); } +#endif +#if USING_HW_SERIAL1 + MarlinSerial _MSerial1((LPC_UART_TypeDef *) LPC_UART1); + MSerialT MSerial1(true, _MSerial1); + extern "C" void UART1_IRQHandler() { _MSerial1.IRQHandler(); } #endif -#if ANY_SERIAL_IS(1) - MSerialT MSerial1(true, (LPC_UART_TypeDef *) LPC_UART1); - extern "C" void UART1_IRQHandler() { MSerial1.IRQHandler(); } +#if USING_HW_SERIAL2 + MarlinSerial _MSerial2(LPC_UART2); + MSerialT MSerial2(true, _MSerial2); + extern "C" void UART2_IRQHandler() { _MSerial2.IRQHandler(); } #endif -#if ANY_SERIAL_IS(2) - MSerialT MSerial2(true, LPC_UART2); - extern "C" void UART2_IRQHandler() { MSerial2.IRQHandler(); } +#if USING_HW_SERIAL3 + MarlinSerial _MSerial3(LPC_UART3); + MSerialT MSerial3(true, _MSerial3); + extern "C" void UART3_IRQHandler() { _MSerial3.IRQHandler(); } #endif -#if ANY_SERIAL_IS(3) - MSerialT MSerial3(true, LPC_UART3); - extern "C" void UART3_IRQHandler() { MSerial3.IRQHandler(); } + +#if ENABLED(EMERGENCY_PARSER) + + bool MarlinSerial::recv_callback(const char c) { + // Need to figure out which serial port we are and react in consequence (Marlin does not have CONTAINER_OF macro) + if (false) {} + #if USING_HW_SERIAL0 + else if (this == &_MSerial0) emergency_parser.update(MSerial0.emergency_state, c); + #endif + #if USING_HW_SERIAL1 + else if (this == &_MSerial1) emergency_parser.update(MSerial1.emergency_state, c); + #endif + #if USING_HW_SERIAL2 + else if (this == &_MSerial2) emergency_parser.update(MSerial2.emergency_state, c); + #endif + #if USING_HW_SERIAL3 + else if (this == &_MSerial3) emergency_parser.update(MSerial3.emergency_state, c); + #endif + return true; + } + #endif #endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/LPC1768/MarlinSerial.h b/Marlin/src/HAL/LPC1768/MarlinSerial.h index de0f62f006d2..3e6848a1e3d0 100644 --- a/Marlin/src/HAL/LPC1768/MarlinSerial.h +++ b/Marlin/src/HAL/LPC1768/MarlinSerial.h @@ -46,16 +46,24 @@ class MarlinSerial : public HardwareSerial { void end() {} + uint8_t availableForWrite(void) { /* flushTX(); */ return TX_BUFFER_SIZE; } + #if ENABLED(EMERGENCY_PARSER) - bool recv_callback(const char c) override { - emergency_parser.update(static_cast *>(this)->emergency_state, c); - return true; // do not discard character - } + bool recv_callback(const char c) override; #endif }; -typedef Serial0Type MSerialT; -extern MSerialT MSerial; +// On LPC176x framework, HardwareSerial does not implement the same interface as Arduino's Serial, so overloads +// of 'available' and 'read' method are not used in this multiple inheritance scenario. +// Instead, use a ForwardSerial here that adapts the interface. +typedef ForwardSerial1Class MSerialT; +extern MSerialT MSerial0; extern MSerialT MSerial1; extern MSerialT MSerial2; extern MSerialT MSerial3; + +// Consequently, we can't use a RuntimeSerial either. The workaround would be to use +// a RuntimeSerial> type here. Ignore for now until it's actually required. +#if ENABLED(SERIAL_RUNTIME_HOOK) + #error "SERIAL_RUNTIME_HOOK is not yet supported for LPC176x." +#endif diff --git a/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp b/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp index 54a64ccd72f1..6570a599a485 100644 --- a/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/LPC1768/eeprom_sdcard.cpp @@ -1,10 +1,9 @@ /** * Marlin 3D Printer Firmware - * * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com - * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com - * Copyright (c) 2016 Victor Perez victor_pv@hotmail.com + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,12 +19,19 @@ * along with this program. If not, see . * */ + +/** + * Implementation of EEPROM settings in SD Card + */ + #ifdef TARGET_LPC1768 #include "../../inc/MarlinConfig.h" #if ENABLED(SDCARD_EEPROM_EMULATION) +//#define DEBUG_SD_EEPROM_EMULATION + #include "../shared/eeprom_api.h" #include @@ -38,9 +44,11 @@ FATFS fat_fs; FIL eeprom_file; bool eeprom_file_open = false; +#define EEPROM_FILENAME "eeprom.dat" #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE size_t(0x1000) // 4KiB of Emulated EEPROM #endif + size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } bool PersistentStore::access_start() { @@ -50,7 +58,7 @@ bool PersistentStore::access_start() { MSC_Release_Lock(); return false; } - FRESULT res = f_open(&eeprom_file, "eeprom.dat", FA_OPEN_ALWAYS | FA_WRITE | FA_READ); + FRESULT res = f_open(&eeprom_file, EEPROM_FILENAME, FA_OPEN_ALWAYS | FA_WRITE | FA_READ); if (res) MSC_Release_Lock(); if (res == FR_OK) { @@ -81,19 +89,20 @@ bool PersistentStore::access_finish() { // This extra chit-chat goes away soon, but is helpful for now // to see errors that are happening in read_data / write_data static void debug_rw(const bool write, int &pos, const uint8_t *value, const size_t size, const FRESULT s, const size_t total=0) { - PGM_P const rw_str = write ? PSTR("write") : PSTR("read"); - SERIAL_CHAR(' '); - serialprintPGM(rw_str); - SERIAL_ECHOLNPAIR("_data(", pos, ",", int(value), ",", int(size), ", ...)"); - if (total) { - SERIAL_ECHOPGM(" f_"); - serialprintPGM(rw_str); - SERIAL_ECHOPAIR("()=", int(s), "\n size=", int(size), "\n bytes_"); - serialprintPGM(write ? PSTR("written=") : PSTR("read=")); - SERIAL_ECHOLN(total); - } - else - SERIAL_ECHOLNPAIR(" f_lseek()=", int(s)); + #if ENABLED(DEBUG_SD_EEPROM_EMULATION) + PGM_P const rw_str = write ? PSTR("write") : PSTR("read"); + SERIAL_CHAR(' '); + SERIAL_ECHOPGM_P(rw_str); + SERIAL_ECHOLNPGM("_data(", pos, ",", *value, ",", size, ", ...)"); + if (total) { + SERIAL_ECHOPGM(" f_"); + SERIAL_ECHOPGM_P(rw_str); + SERIAL_ECHOPGM("()=", s, "\n size=", size, "\n bytes_"); + SERIAL_ECHOLNPGM_P(write ? PSTR("written=") : PSTR("read="), total); + } + else + SERIAL_ECHOLNPGM(" f_lseek()=", s); + #endif } // File function return codes for type FRESULT. This goes away soon, but diff --git a/Marlin/src/HAL/LPC1768/eeprom_wired.cpp b/Marlin/src/HAL/LPC1768/eeprom_wired.cpp index d94aba6119f1..f9286a74ac88 100644 --- a/Marlin/src/HAL/LPC1768/eeprom_wired.cpp +++ b/Marlin/src/HAL/LPC1768/eeprom_wired.cpp @@ -42,25 +42,22 @@ bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { uint8_t v = *value; - - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! uint8_t * const p = (uint8_t * const)pos; - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; } } - crc16(crc, &v, 1); pos++; value++; - }; - + } return false; } @@ -68,7 +65,6 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t do { // Read from external EEPROM const uint8_t c = eeprom_read_byte((uint8_t*)pos); - if (writing) *value = c; crc16(crc, &c, 1); pos++; diff --git a/Marlin/src/HAL/LPC1768/endstop_interrupts.h b/Marlin/src/HAL/LPC1768/endstop_interrupts.h index 126d6e7d5bb2..23bd0cc982b2 100644 --- a/Marlin/src/HAL/LPC1768/endstop_interrupts.h +++ b/Marlin/src/HAL/LPC1768/endstop_interrupts.h @@ -122,4 +122,37 @@ void setup_endstop_interrupts() { #endif _ATTACH(Z_MIN_PROBE_PIN); #endif + #if HAS_I_MAX + #if !LPC1768_PIN_INTERRUPT_M(I_MAX_PIN) + #error "I_MAX_PIN is not INTERRUPT-capable." + #endif + _ATTACH(I_MAX_PIN); + #elif HAS_I_MIN + #if !LPC1768_PIN_INTERRUPT_M(I_MIN_PIN) + #error "I_MIN_PIN is not INTERRUPT-capable." + #endif + _ATTACH(I_MIN_PIN); + #endif + #if HAS_J_MAX + #if !LPC1768_PIN_INTERRUPT_M(J_MAX_PIN) + #error "J_MAX_PIN is not INTERRUPT-capable." + #endif + _ATTACH(J_MAX_PIN); + #elif HAS_J_MIN + #if !LPC1768_PIN_INTERRUPT_M(J_MIN_PIN) + #error "J_MIN_PIN is not INTERRUPT-capable." + #endif + _ATTACH(J_MIN_PIN); + #endif + #if HAS_K_MAX + #if !LPC1768_PIN_INTERRUPT_M(K_MAX_PIN) + #error "K_MAX_PIN is not INTERRUPT-capable." + #endif + _ATTACH(K_MAX_PIN); + #elif HAS_K_MIN + #if !LPC1768_PIN_INTERRUPT_M(K_MIN_PIN) + #error "K_MIN_PIN is not INTERRUPT-capable." + #endif + _ATTACH(K_MIN_PIN); + #endif } diff --git a/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h b/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h index 94e4ce134170..be574a96e4ed 100644 --- a/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h +++ b/Marlin/src/HAL/LPC1768/inc/Conditionals_post.h @@ -30,6 +30,5 @@ // LPC1768 boards seem to lose steps when saving to EEPROM during print (issue #20785) // TODO: Which other boards are incompatible? #if defined(MCU_LPC1768) && PRINTCOUNTER_SAVE_INTERVAL > 0 - #warning "To prevent step loss, motion will pause for PRINTCOUNTER auto-save." #define PRINTCOUNTER_SYNC 1 #endif diff --git a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h index be64ea832eae..3ea054589ec3 100644 --- a/Marlin/src/HAL/LPC1768/inc/SanityCheck.h +++ b/Marlin/src/HAL/LPC1768/inc/SanityCheck.h @@ -31,7 +31,7 @@ /** * Detect an old pins file by checking for old ADC pins values. */ -#define _OLD_TEMP_PIN(P) PIN_EXISTS(P) && _CAT(P,_PIN) <= 7 && _CAT(P,_PIN) != 2 && _CAT(P,_PIN) != 3 +#define _OLD_TEMP_PIN(P) PIN_EXISTS(P) && _CAT(P,_PIN) <= 7 && !WITHIN(_CAT(P,_PIN), TERN(LPC1768_IS_SKRV1_3, 0, 2), 3) // Include P0_00 and P0_01 for SKR V1.3 board #if _OLD_TEMP_PIN(TEMP_BED) #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)." #elif _OLD_TEMP_PIN(TEMP_0) @@ -67,7 +67,7 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in * Test LPC176x-specific configuration values for errors at compile-time. */ -//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) +//#if ENABLED(SPINDLE_LASER_USE_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) // #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" //#endif @@ -92,7 +92,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #define ANY_TX(N,V...) DO(IS_TX##N,||,V) #define ANY_RX(N,V...) DO(IS_RX##N,||,V) -#if ANY_SERIAL_IS(0) +#if USING_HW_SERIAL0 #define IS_TX0(P) (P == P0_02) #define IS_RX0(P) (P == P0_03) #if IS_TX0(TMC_SW_MISO) || IS_RX0(TMC_SW_MOSI) @@ -106,7 +106,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #undef IS_RX0 #endif -#if ANY_SERIAL_IS(1) +#if USING_HW_SERIAL1 #define IS_TX1(P) (P == P0_15) #define IS_RX1(P) (P == P0_16) #define _IS_TX1_1 IS_TX1 @@ -127,7 +127,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #undef _IS_RX1_1 #endif -#if ANY_SERIAL_IS(2) +#if USING_HW_SERIAL2 #define IS_TX2(P) (P == P0_10) #define IS_RX2(P) (P == P0_11) #define _IS_TX2_1 IS_TX2 @@ -144,9 +144,9 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #error "Serial port pins (2) conflict with Z4 pins!" #elif ANY_RX(2, X_DIR_PIN, Y_DIR_PIN) #error "Serial port pins (2) conflict with other pins!" - #elif Y_HOME_DIR < 0 && IS_TX2(Y_STOP_PIN) + #elif Y_HOME_TO_MIN && IS_TX2(Y_STOP_PIN) #error "Serial port pins (2) conflict with Y endstop pin!" - #elif HAS_CUSTOM_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN) + #elif USES_Z_MIN_PROBE_PIN && IS_TX2(Z_MIN_PROBE_PIN) #error "Serial port pins (2) conflict with probe pin!" #elif ANY_TX(2, X_ENABLE_PIN, Y_ENABLE_PIN) || ANY_RX(2, X_DIR_PIN, Y_DIR_PIN) #error "Serial port pins (2) conflict with X/Y stepper pins!" @@ -161,7 +161,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #undef _IS_RX2_1 #endif -#if ANY_SERIAL_IS(3) +#if USING_HW_SERIAL3 #define PIN_IS_TX3(P) (PIN_EXISTS(P) && P##_PIN == P0_00) #define PIN_IS_RX3(P) (P##_PIN == P0_01) #if PIN_IS_TX3(X_MIN) || PIN_IS_RX3(X_MAX) @@ -237,7 +237,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #define PIN_IS_SCL2(P) (P##_PIN == P0_11) #if PIN_IS_SDA2(Y_STOP) #error "i2c SDA2 overlaps with Y endstop pin!" - #elif HAS_CUSTOM_PROBE_PIN && PIN_IS_SDA2(Z_MIN_PROBE) + #elif USES_Z_MIN_PROBE_PIN && PIN_IS_SDA2(Z_MIN_PROBE) #error "i2c SDA2 overlaps with Z probe pin!" #elif PIN_IS_SDA2(X_ENABLE) || PIN_IS_SDA2(Y_ENABLE) #error "i2c SDA2 overlaps with X/Y ENABLE pin!" @@ -270,7 +270,7 @@ static_assert(DISABLED(BAUD_RATE_GCODE), "BAUD_RATE_GCODE is not yet supported o #endif #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) - #error "SERIAL_STATS_MAX_RX_QUEUED is not supported on this platform." + #error "SERIAL_STATS_MAX_RX_QUEUED is not supported on LPC176x." #elif ENABLED(SERIAL_STATS_DROPPED_RX) - #error "SERIAL_STATS_DROPPED_RX is not supported on this platform." + #error "SERIAL_STATS_DROPPED_RX is not supported on LPX176x." #endif diff --git a/Marlin/src/HAL/LPC1768/main.cpp b/Marlin/src/HAL/LPC1768/main.cpp index f41a57637639..ef0dc42c78ca 100644 --- a/Marlin/src/HAL/LPC1768/main.cpp +++ b/Marlin/src/HAL/LPC1768/main.cpp @@ -46,6 +46,8 @@ extern "C" { void SysTick_Callback() { disk_timerproc(); } +TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial()); + void HAL_init() { // Init LEDs @@ -115,17 +117,15 @@ void HAL_init() { PinCfg.Pinmode = 2; // no pull-up/pull-down PINSEL_ConfigPin(&PinCfg); // now set CLKOUT_EN bit - LPC_SC->CLKOUTCFG |= (1<<8); + SBI(LPC_SC->CLKOUTCFG, 8); #endif USB_Init(); // USB Initialization - USB_Connect(FALSE); // USB clear connection + USB_Connect(false); // USB clear connection delay(1000); // Give OS time to notice - USB_Connect(TRUE); + USB_Connect(true); - #if HAS_SD_HOST_DRIVE - MSC_SD_Init(0); // Enable USB SD card access - #endif + TERN_(HAS_SD_HOST_DRIVE, MSC_SD_Init(0)); // Enable USB SD card access const millis_t usb_timeout = millis() + 2000; while (!USB_Configuration && PENDING(millis(), usb_timeout)) { @@ -137,6 +137,8 @@ void HAL_init() { } HAL_timer_init(); + + TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler } // HAL idle task diff --git a/Marlin/src/HAL/LPC1768/pinsDebug.h b/Marlin/src/HAL/LPC1768/pinsDebug.h index f80551604fa1..a2f5c123a260 100644 --- a/Marlin/src/HAL/LPC1768/pinsDebug.h +++ b/Marlin/src/HAL/LPC1768/pinsDebug.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -33,8 +36,9 @@ #define PRINT_PORT(p) #define GET_ARRAY_PIN(p) pin_array[p].pin #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) -#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%d.%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0) -#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin +#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("P%d_%02d"), LPC176x::pin_port(p), LPC176x::pin_bit(p)); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR("_A%d "), LPC176x::pin_get_adc_channel(pin)); SERIAL_ECHO(buffer); }while(0) +#define MULTI_NAME_PAD 17 // space needed to be pretty if not first name assigned to a pin // pins that will cause hang/reset/disconnect in M43 Toggle and Watch utilities #ifndef M43_NEVER_TOUCH @@ -48,6 +52,4 @@ bool GET_PINMODE(const pin_t pin) { return LPC176x::gpio_direction(pin); } -bool GET_ARRAY_IS_DIGITAL(const pin_t pin) { - return (!LPC176x::pin_has_adc(pin) || !LPC176x::pin_adc_enabled(pin)); -} +#define GET_ARRAY_IS_DIGITAL(x) ((bool) pin_array[x].is_digital) diff --git a/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp b/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp index a2cb66ab5bfd..a9847b2d2fa0 100644 --- a/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp +++ b/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp @@ -26,39 +26,22 @@ #include "tft_spi.h" -//TFT_SPI tft; - SPIClass TFT_SPI::SPIx(1); -#define TFT_CS_H WRITE(TFT_CS_PIN, HIGH) -#define TFT_CS_L WRITE(TFT_CS_PIN, LOW) - -#define TFT_DC_H WRITE(TFT_DC_PIN, HIGH) -#define TFT_DC_L WRITE(TFT_DC_PIN, LOW) - -#define TFT_RST_H WRITE(TFT_RESET_PIN, HIGH) -#define TFT_RST_L WRITE(TFT_RESET_PIN, LOW) - -#define TFT_BLK_H WRITE(TFT_BACKLIGHT_PIN, HIGH) -#define TFT_BLK_L WRITE(TFT_BACKLIGHT_PIN, LOW) - void TFT_SPI::Init() { #if PIN_EXISTS(TFT_RESET) - SET_OUTPUT(TFT_RESET_PIN); - TFT_RST_H; + OUT_WRITE(TFT_RESET_PIN, HIGH); delay(100); #endif #if PIN_EXISTS(TFT_BACKLIGHT) - SET_OUTPUT(TFT_BACKLIGHT_PIN); - TFT_BLK_H; + OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); #endif SET_OUTPUT(TFT_DC_PIN); SET_OUTPUT(TFT_CS_PIN); - - TFT_DC_H; - TFT_CS_H; + WRITE(TFT_DC_PIN, HIGH); + WRITE(TFT_CS_PIN, HIGH); /** * STM32F1 APB2 = 72MHz, APB1 = 36MHz, max SPI speed of this MCU if 18Mhz @@ -97,7 +80,7 @@ void TFT_SPI::Init() { void TFT_SPI::DataTransferBegin(uint16_t DataSize) { SPIx.setDataSize(DataSize); SPIx.begin(); - TFT_CS_L; + WRITE(TFT_CS_PIN, LOW); } uint32_t TFT_SPI::GetID() { @@ -116,7 +99,7 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) { SPIx.setDataSize(DATASIZE_8BIT); SPIx.setClock(SPI_CLOCK_DIV64); SPIx.begin(); - TFT_CS_L; + WRITE(TFT_CS_PIN, LOW); WriteReg(Reg); LOOP_L_N(i, 4) { @@ -131,21 +114,15 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) { return data >> 7; } -bool TFT_SPI::isBusy() { - return false; -} +bool TFT_SPI::isBusy() { return false; } -void TFT_SPI::Abort() { - DataTransferEnd(); -} +void TFT_SPI::Abort() { DataTransferEnd(); } -void TFT_SPI::Transmit(uint16_t Data) { - SPIx.transfer(Data); -} +void TFT_SPI::Transmit(uint16_t Data) { SPIx.transfer(Data); } void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) { - DataTransferBegin(DATASIZE_16BIT); //16 - TFT_DC_H; + DataTransferBegin(DATASIZE_16BIT); + WRITE(TFT_DC_PIN, HIGH); SPIx.dmaSend(Data, Count, MemoryIncrease); DataTransferEnd(); } diff --git a/Marlin/src/HAL/LPC1768/tft/xpt2046.cpp b/Marlin/src/HAL/LPC1768/tft/xpt2046.cpp index cf14405484ff..9c1e158981da 100644 --- a/Marlin/src/HAL/LPC1768/tft/xpt2046.cpp +++ b/Marlin/src/HAL/LPC1768/tft/xpt2046.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if HAS_TFT_XPT2046 || HAS_TOUCH_BUTTONS +#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS #include "xpt2046.h" #include diff --git a/Marlin/src/HAL/LPC1768/tft/xpt2046.h b/Marlin/src/HAL/LPC1768/tft/xpt2046.h index 65602bda0f40..aba0799e445f 100644 --- a/Marlin/src/HAL/LPC1768/tft/xpt2046.h +++ b/Marlin/src/HAL/LPC1768/tft/xpt2046.h @@ -54,7 +54,7 @@ enum XPTCoordinate : uint8_t { XPT2046_Z2 = 0x40 | XPT2046_CONTROL | XPT2046_DFR_MODE, }; -#if !defined(XPT2046_Z1_THRESHOLD) +#ifndef XPT2046_Z1_THRESHOLD #define XPT2046_Z1_THRESHOLD 10 #endif diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp index b1eea13d5747..0118f92847de 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_hw_spi.cpp @@ -59,7 +59,7 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #include "../../shared/HAL_SPI.h" #ifndef LCD_SPI_SPEED diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp index 6f7efba4ae20..bf76eaf0f491 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp @@ -79,7 +79,7 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #define I2C_SLA (0x3C*2) //#define I2C_CMD_MODE 0x080 diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp index 592e27f6c006..ce7b33801931 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp @@ -59,14 +59,14 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #include "../../shared/HAL_SPI.h" #include "../../shared/Delay.h" void spiBegin(); void spiInit(uint8_t spiRate); void spiSend(uint8_t b); -void spiSend(const uint8_t* buf, size_t n); +void spiSend(const uint8_t *buf, size_t n); static uint8_t rs_last_state = 255; diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp index 61211d9d881c..039fa6769bbe 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp @@ -59,7 +59,7 @@ #if ENABLED(U8GLIB_ST7920) -#include +#include #include #include "../../shared/Delay.h" #include "../../shared/HAL_SPI.h" diff --git a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp index 7f38ec54aff7..3308d03e79f9 100644 --- a/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp +++ b/Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_sw_spi.cpp @@ -71,7 +71,7 @@ #include #include -#include +#include uint8_t swSpiTransfer_mode_0(uint8_t b, const uint8_t spi_speed, const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin ) { diff --git a/Marlin/src/HAL/LPC1768/upload_extra_script.py b/Marlin/src/HAL/LPC1768/upload_extra_script.py index 1daaa883ed6b..fb3aaef7cd38 100755 --- a/Marlin/src/HAL/LPC1768/upload_extra_script.py +++ b/Marlin/src/HAL/LPC1768/upload_extra_script.py @@ -8,9 +8,7 @@ target_filename = "FIRMWARE.CUR" target_drive = "REARM" -import os -import getpass -import platform +import os,getpass,platform current_OS = platform.system() Import("env") @@ -22,102 +20,104 @@ def print_error(e): 'or copy the firmware (.pio/build/%s/firmware.bin) manually to the appropriate disk\n' \ %(e, env.get('PIOENV'))) -try: - # - # Find a disk for upload - # - upload_disk = 'Disk not found' - target_file_found = False - target_drive_found = False - if current_OS == 'Windows': +def before_upload(source, target, env): + try: # - # platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:' - # Windows - doesn't care about the disk's name, only cares about the drive letter - import subprocess - from ctypes import windll - import string + # Find a disk for upload + # + upload_disk = 'Disk not found' + target_file_found = False + target_drive_found = False + if current_OS == 'Windows': + # + # platformio.ini will accept this for a Windows upload port designation: 'upload_port = L:' + # Windows - doesn't care about the disk's name, only cares about the drive letter + import subprocess,string + from ctypes import windll - # getting list of drives - # https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python - drives = [] - bitmask = windll.kernel32.GetLogicalDrives() - for letter in string.ascii_uppercase: - if bitmask & 1: - drives.append(letter) - bitmask >>= 1 + # getting list of drives + # https://stackoverflow.com/questions/827371/is-there-a-way-to-list-all-the-available-drive-letters-in-python + drives = [] + bitmask = windll.kernel32.GetLogicalDrives() + for letter in string.ascii_uppercase: + if bitmask & 1: + drives.append(letter) + bitmask >>= 1 - for drive in drives: - final_drive_name = drive + ':\\' - # print ('disc check: {}'.format(final_drive_name)) - try: - volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT)) - except Exception as e: - print ('error:{}'.format(e)) - continue - else: - if target_drive in volume_info and not target_file_found: # set upload if not found target file yet - target_drive_found = True - upload_disk = final_drive_name - if target_filename in volume_info: - if not target_file_found: + for drive in drives: + final_drive_name = drive + ':\\' + # print ('disc check: {}'.format(final_drive_name)) + try: + volume_info = str(subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT)) + except Exception as e: + print ('error:{}'.format(e)) + continue + else: + if target_drive in volume_info and not target_file_found: # set upload if not found target file yet + target_drive_found = True upload_disk = final_drive_name - target_file_found = True + if target_filename in volume_info: + if not target_file_found: + upload_disk = final_drive_name + target_file_found = True - elif current_OS == 'Linux': - # - # platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive' - # - drives = os.listdir(os.path.join(os.sep, 'media', getpass.getuser())) - if target_drive in drives: # If target drive is found, use it. - target_drive_found = True - upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), target_drive) + os.sep - else: + elif current_OS == 'Linux': + # + # platformio.ini will accept this for a Linux upload port designation: 'upload_port = /media/media_name/drive' + # + drives = os.listdir(os.path.join(os.sep, 'media', getpass.getuser())) + if target_drive in drives: # If target drive is found, use it. + target_drive_found = True + upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), target_drive) + os.sep + else: + for drive in drives: + try: + files = os.listdir(os.path.join(os.sep, 'media', getpass.getuser(), drive)) + except: + continue + else: + if target_filename in files: + upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), drive) + os.sep + target_file_found = True + break + # + # set upload_port to drive if found + # + + if target_file_found or target_drive_found: + env.Replace( + UPLOAD_FLAGS="-P$UPLOAD_PORT" + ) + + elif current_OS == 'Darwin': # MAC + # + # platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive' + # + drives = os.listdir('/Volumes') # human readable names + if target_drive in drives and not target_file_found: # set upload if not found target file yet + target_drive_found = True + upload_disk = '/Volumes/' + target_drive + '/' for drive in drives: try: - files = os.listdir(os.path.join(os.sep, 'media', getpass.getuser(), drive)) + filenames = os.listdir('/Volumes/' + drive + '/') # will get an error if the drive is protected except: continue else: - if target_filename in files: - upload_disk = os.path.join(os.sep, 'media', getpass.getuser(), drive) + os.sep + if target_filename in filenames: + if not target_file_found: + upload_disk = '/Volumes/' + drive + '/' target_file_found = True - break - # - # set upload_port to drive if found - # - if target_file_found or target_drive_found: - env.Replace( - UPLOAD_FLAGS="-P$UPLOAD_PORT" - ) - - elif current_OS == 'Darwin': # MAC # - # platformio.ini will accept this for a OSX upload port designation: 'upload_port = /media/media_name/drive' + # Set upload_port to drive if found # - drives = os.listdir('/Volumes') # human readable names - if target_drive in drives and not target_file_found: # set upload if not found target file yet - target_drive_found = True - upload_disk = '/Volumes/' + target_drive + '/' - for drive in drives: - try: - filenames = os.listdir('/Volumes/' + drive + '/') # will get an error if the drive is protected - except: - continue - else: - if target_filename in filenames: - if not target_file_found: - upload_disk = '/Volumes/' + drive + '/' - target_file_found = True + if target_file_found or target_drive_found: + env.Replace(UPLOAD_PORT=upload_disk) + print('\nUpload disk: ', upload_disk, '\n') + else: + print_error('Autodetect Error') - # - # Set upload_port to drive if found - # - if target_file_found or target_drive_found: - env.Replace(UPLOAD_PORT=upload_disk) - print('\nUpload disk: ', upload_disk, '\n') - else: - print_error('Autodetect Error') + except Exception as e: + print_error(str(e)) -except Exception as e: - print_error(str(e)) +env.AddPreAction("upload", before_upload) diff --git a/Marlin/src/HAL/LPC1768/usb_serial.cpp b/Marlin/src/HAL/LPC1768/usb_serial.cpp index d225ce418860..3c1fce54f95f 100644 --- a/Marlin/src/HAL/LPC1768/usb_serial.cpp +++ b/Marlin/src/HAL/LPC1768/usb_serial.cpp @@ -29,8 +29,8 @@ EmergencyParser::State emergency_state; -bool CDC_RecvCallback(const char buffer) { - emergency_parser.update(emergency_state, buffer); +bool CDC_RecvCallback(const char c) { + emergency_parser.update(emergency_state, c); return true; } diff --git a/Marlin/src/HAL/NATIVE_SIM/HAL.h b/Marlin/src/HAL/NATIVE_SIM/HAL.h new file mode 100644 index 000000000000..235c24808cb4 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/HAL.h @@ -0,0 +1,217 @@ +/** + * Marlin 3D Printer Firmware + * + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com + * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define CPU_32_BIT +#define HAL_IDLETASK +void HAL_idletask(); + +#define F_CPU 100000000 +#define SystemCoreClock F_CPU +#include +#include + +#undef min +#undef max + +#include +#include "pinmapping.h" + +void _printf (const char *format, ...); +void _putc(uint8_t c); +uint8_t _getc(); + +//extern "C" volatile uint32_t _millis; + +//arduino: Print.h +#define DEC 10 +#define HEX 16 +#define OCT 8 +#define BIN 2 +//arduino: binary.h (weird defines) +#define B01 1 +#define B10 2 + +#include "../shared/Marduino.h" +#include "../shared/math_32bit.h" +#include "../shared/HAL_SPI.h" +#include "fastio.h" +#include "watchdog.h" +#include "serial.h" + +#define SHARED_SERVOS HAS_SERVOS + +extern MSerialT serial_stream_0; +extern MSerialT serial_stream_1; +extern MSerialT serial_stream_2; +extern MSerialT serial_stream_3; + +#define _MSERIAL(X) serial_stream_##X +#define MSERIAL(X) _MSERIAL(X) + +#if WITHIN(SERIAL_PORT, 0, 3) + #define MYSERIAL1 MSERIAL(SERIAL_PORT) +#else + #error "SERIAL_PORT must be from 0 to 3. Please update your configuration." +#endif + +#ifdef SERIAL_PORT_2 + #if WITHIN(SERIAL_PORT_2, 0, 3) + #define MYSERIAL2 MSERIAL(SERIAL_PORT_2) + #else + #error "SERIAL_PORT_2 must be from 0 to 3. Please update your configuration." + #endif +#endif + +#ifdef MMU2_SERIAL_PORT + #if WITHIN(MMU2_SERIAL_PORT, 0, 3) + #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) + #else + #error "MMU2_SERIAL_PORT must be from 0 to 3. Please update your configuration." + #endif +#endif + +#ifdef LCD_SERIAL_PORT + #if WITHIN(LCD_SERIAL_PORT, 0, 3) + #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT) + #else + #error "LCD_SERIAL_PORT must be from 0 to 3. Please update your configuration." + #endif +#endif + + +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 + +// +// Interrupts +// +#define CRITICAL_SECTION_START() +#define CRITICAL_SECTION_END() +#define ISRS_ENABLED() +#define ENABLE_ISRS() +#define DISABLE_ISRS() + +inline void HAL_init() {} + +// Utility functions +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" +int freeMemory(); +#pragma GCC diagnostic pop + +// ADC +#define HAL_ADC_VREF 5.0 +#define HAL_ADC_RESOLUTION 10 +#define HAL_ANALOG_SELECT(ch) HAL_adc_enable_channel(ch) +#define HAL_START_ADC(ch) HAL_adc_start_conversion(ch) +#define HAL_READ_ADC() HAL_adc_get_result() +#define HAL_ADC_READY() true + +void HAL_adc_init(); +void HAL_adc_enable_channel(const uint8_t ch); +void HAL_adc_start_conversion(const uint8_t ch); +uint16_t HAL_adc_get_result(); + +// Reset source +inline void HAL_clear_reset_source(void) {} +inline uint8_t HAL_get_reset_source(void) { return RST_POWER_ON; } + +/* ---------------- Delay in cycles */ + +#define DELAY_CYCLES(x) Kernel::delayCycles(x) +#define SYSTEM_YIELD() Kernel::yield() + +// Maple Compatibility +typedef void (*systickCallback_t)(void); +void systick_attach_callback(systickCallback_t cb); +extern volatile uint32_t systick_uptime_millis; + +// Marlin uses strstr in constexpr context, this is not supported, workaround by defining constexpr versions of the required functions. +#define strstr(a, b) strstr_constexpr((a), (b)) + +constexpr inline std::size_t strlen_constexpr(const char* str) { + // https://github.com/gcc-mirror/gcc/blob/5c7634a0e5f202935aa6c11b6ea953b8bf80a00a/libstdc%2B%2B-v3/include/bits/char_traits.h#L329 + if (str != nullptr) { + std::size_t i = 0; + while (str[i] != '\0') { + ++i; + } + + return i; + } + + return 0; +} + +constexpr inline int strncmp_constexpr(const char* lhs, const char* rhs, std::size_t count) { + // https://github.com/gcc-mirror/gcc/blob/13b9cbfc32fe3ac4c81c4dd9c42d141c8fb95db4/libstdc%2B%2B-v3/include/bits/char_traits.h#L655 + if (lhs == nullptr || rhs == nullptr) { + return rhs != nullptr ? -1 : 1; + } + + for (std::size_t i = 0; i < count; ++i) { + if (lhs[i] != rhs[i]) { + return lhs[i] < rhs[i] ? -1 : 1; + } else if (lhs[i] == '\0') { + return 0; + } + } + + return 0; +} + +constexpr inline const char* strstr_constexpr(const char* str, const char* target) { + // https://github.com/freebsd/freebsd/blob/master/sys/libkern/strstr.c + if (char c = target != nullptr ? *target++ : '\0'; c != '\0' && str != nullptr) { + std::size_t len = strlen_constexpr(target); + do { + char sc = {}; + do { + if ((sc = *str++) == '\0') { + return nullptr; + } + } while (sc != c); + } while (strncmp_constexpr(str, target, len) != 0); + --str; + } + + return str; +} + +constexpr inline char* strstr_constexpr(char* str, const char* target) { + // https://github.com/freebsd/freebsd/blob/master/sys/libkern/strstr.c + if (char c = target != nullptr ? *target++ : '\0'; c != '\0' && str != nullptr) { + std::size_t len = strlen_constexpr(target); + do { + char sc = {}; + do { + if ((sc = *str++) == '\0') { + return nullptr; + } + } while (sc != c); + } while (strncmp_constexpr(str, target, len) != 0); + --str; + } + return str; +} diff --git a/Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h b/Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h new file mode 100644 index 000000000000..b5cc6f02a45a --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com + * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/NATIVE_SIM/fastio.h b/Marlin/src/HAL/NATIVE_SIM/fastio.h new file mode 100644 index 000000000000..de8013b1e542 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/fastio.h @@ -0,0 +1,111 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Fast I/O Routines for X86_64 + */ + +#include "../shared/Marduino.h" +#include + +#define SET_DIR_INPUT(IO) Gpio::setDir(IO, 1) +#define SET_DIR_OUTPUT(IO) Gpio::setDir(IO, 0) + +#define SET_MODE(IO, mode) Gpio::setMode(IO, mode) + +#define WRITE_PIN_SET(IO) Gpio::set(IO) +#define WRITE_PIN_CLR(IO) Gpio::clear(IO) + +#define READ_PIN(IO) Gpio::get(IO) +#define WRITE_PIN(IO,V) Gpio::set(IO, V) + +/** + * Magic I/O routines + * + * Now you can simply SET_OUTPUT(STEP); WRITE(STEP, HIGH); WRITE(STEP, LOW); + * + * Why double up on these macros? see http://gcc.gnu.org/onlinedocs/cpp/Stringification.html + */ + +/// Read a pin +#define _READ(IO) READ_PIN(IO) + +/// Write to a pin +#define _WRITE(IO,V) WRITE_PIN(IO,V) + +/// toggle a pin +#define _TOGGLE(IO) _WRITE(IO, !READ(IO)) + +/// set pin as input +#define _SET_INPUT(IO) SET_DIR_INPUT(IO) + +/// set pin as output +#define _SET_OUTPUT(IO) SET_DIR_OUTPUT(IO) + +/// set pin as input with pullup mode +#define _PULLUP(IO,V) pinMode(IO, (V) ? INPUT_PULLUP : INPUT) + +/// set pin as input with pulldown mode +#define _PULLDOWN(IO,V) pinMode(IO, (V) ? INPUT_PULLDOWN : INPUT) + +// hg42: all pins can be input or output (I hope) +// hg42: undefined pins create compile error (IO, is no pin) +// hg42: currently not used, but was used by pinsDebug + +/// check if pin is an input +#define _IS_INPUT(IO) (IO >= 0) + +/// check if pin is an output +#define _IS_OUTPUT(IO) (IO >= 0) + +/// Read a pin wrapper +#define READ(IO) _READ(IO) + +/// Write to a pin wrapper +#define WRITE(IO,V) _WRITE(IO,V) + +/// toggle a pin wrapper +#define TOGGLE(IO) _TOGGLE(IO) + +/// set pin as input wrapper +#define SET_INPUT(IO) _SET_INPUT(IO) +/// set pin as input with pullup wrapper +#define SET_INPUT_PULLUP(IO) do{ _SET_INPUT(IO); _PULLUP(IO, HIGH); }while(0) +/// set pin as input with pulldown wrapper +#define SET_INPUT_PULLDOWN(IO) do{ _SET_INPUT(IO); _PULLDOWN(IO, HIGH); }while(0) +/// set pin as output wrapper - reads the pin and sets the output to that value +#define SET_OUTPUT(IO) do{ _WRITE(IO, _READ(IO)); _SET_OUTPUT(IO); }while(0) +// set pin as PWM +#define SET_PWM(IO) SET_OUTPUT(IO) + +/// check if pin is an input wrapper +#define IS_INPUT(IO) _IS_INPUT(IO) +/// check if pin is an output wrapper +#define IS_OUTPUT(IO) _IS_OUTPUT(IO) + +// Shorthand +#define OUT_WRITE(IO,V) do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0) + +// digitalRead/Write wrappers +#define extDigitalRead(IO) digitalRead(IO) +#define extDigitalWrite(IO,V) digitalWrite(IO,V) diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h new file mode 100644 index 000000000000..1ac02f118285 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_LCD.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_adv.h b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_adv.h new file mode 100644 index 000000000000..69b6b4848f6e --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_adv.h @@ -0,0 +1,31 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// Add strcmp_P if missing +#ifndef strcmp_P + #define strcmp_P(a, b) strcmp((a), (b)) +#endif + +#ifndef strcat_P + #define strcat_P(dest, src) strcat((dest), (src)) +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_post.h b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_post.h new file mode 100644 index 000000000000..1ac02f118285 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/inc/Conditionals_post.h @@ -0,0 +1,22 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once diff --git a/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h b/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h new file mode 100644 index 000000000000..2d7bef23a36d --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/inc/SanityCheck.h @@ -0,0 +1,43 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Test X86_64-specific configuration values for errors at compile-time. + */ + +// Emulating RAMPS +#if ENABLED(SPINDLE_LASER_USE_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) + #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" +#endif + +#if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY + #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on LINUX." +#endif + +#if HAS_TMC_SW_SERIAL + #error "TMC220x Software Serial is not supported on LINUX." +#endif + +#if ENABLED(POSTMORTEM_DEBUGGING) + #error "POSTMORTEM_DEBUGGING is not yet supported on LINUX." +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h b/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h new file mode 100644 index 000000000000..aa90eb39a330 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/pinsDebug.h @@ -0,0 +1,61 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Support routines for X86_64 + */ +#pragma once + +/** + * Translation of routines & variables used by pinsDebug.h + */ + +#define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS +#define pwm_details(pin) pin = pin // do nothing // print PWM details +#define pwm_status(pin) false //Print a pin's PWM status. Return true if it's currently a PWM pin. +#define IS_ANALOG(P) (DIGITAL_PIN_TO_ANALOG_PIN(P) >= 0 ? 1 : 0) +#define digitalRead_mod(p) digitalRead(p) +#define PRINT_PORT(p) +#define GET_ARRAY_PIN(p) pin_array[p].pin +#define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) +#define MULTI_NAME_PAD 16 // space needed to be pretty if not first name assigned to a pin + +// active ADC function/mode/code values for PINSEL registers +inline constexpr int8_t ADC_pin_mode(pin_t pin) { + return (-1); +} + +inline int8_t get_pin_mode(pin_t pin) { + if (!VALID_PIN(pin)) return -1; + return 0; +} + +inline bool GET_PINMODE(pin_t pin) { + int8_t pin_mode = get_pin_mode(pin); + if (pin_mode == -1 || pin_mode == ADC_pin_mode(pin)) // found an invalid pin or active analog pin + return false; + + return (Gpio::getMode(pin) != 0); //input/output state +} + +inline bool GET_ARRAY_IS_DIGITAL(pin_t pin) { + return (!IS_ANALOG(pin) || get_pin_mode(pin) != ADC_pin_mode(pin)); +} diff --git a/Marlin/src/HAL/NATIVE_SIM/servo_private.h b/Marlin/src/HAL/NATIVE_SIM/servo_private.h new file mode 100644 index 000000000000..06be1893f6eb --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/servo_private.h @@ -0,0 +1,80 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * servo.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2 + * Copyright (c) 2009 Michael Margolis. All right reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * Based on "servo.h - Interrupt driven Servo library for Arduino using 16 bit timers - + * Version 2 Copyright (c) 2009 Michael Margolis. All right reserved. + * + * The only modification was to update/delete macros to match the LPC176x. + * + */ + +#include + +// Macros +//values in microseconds +#define MIN_PULSE_WIDTH 544 // the shortest pulse sent to a servo +#define MAX_PULSE_WIDTH 2400 // the longest pulse sent to a servo +#define DEFAULT_PULSE_WIDTH 1500 // default pulse width when servo is attached +#define REFRESH_INTERVAL 20000 // minimum time to refresh servos in microseconds + +#define MAX_SERVOS 4 + +#define INVALID_SERVO 255 // flag indicating an invalid servo index + + +// Types + +typedef struct { + uint8_t nbr : 8 ; // a pin number from 0 to 254 (255 signals invalid pin) + uint8_t isActive : 1 ; // true if this channel is enabled, pin not pulsed if false +} ServoPin_t; + +typedef struct { + ServoPin_t Pin; + unsigned int pulse_width; // pulse width in microseconds +} ServoInfo_t; + +// Global variables + +extern uint8_t ServoCount; +extern ServoInfo_t servo_info[MAX_SERVOS]; diff --git a/Marlin/src/HAL/NATIVE_SIM/spi_pins.h b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h new file mode 100644 index 000000000000..a5138e0ccbe8 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/spi_pins.h @@ -0,0 +1,55 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../core/macros.h" +#include "../../inc/MarlinConfigPre.h" + +#if BOTH(HAS_MARLINUI_U8GLIB, SDSUPPORT) && (LCD_PINS_D4 == SD_SCK_PIN || LCD_PINS_ENABLE == SD_MOSI_PIN || DOGLCD_SCK == SD_SCK_PIN || DOGLCD_MOSI == SD_MOSI_PIN) + #define LPC_SOFTWARE_SPI // If the SD card and LCD adapter share the same SPI pins, then software SPI is currently + // needed due to the speed and mode required for communicating with each device being different. + // This requirement can be removed if the SPI access to these devices is updated to use + // spiBeginTransaction. +#endif + +// Onboard SD +//#define SD_SCK_PIN P0_07 +//#define SD_MISO_PIN P0_08 +//#define SD_MOSI_PIN P0_09 +//#define SD_SS_PIN P0_06 + +// External SD +#ifndef SD_SCK_PIN + #define SD_SCK_PIN 50 +#endif +#ifndef SD_MISO_PIN + #define SD_MISO_PIN 51 +#endif +#ifndef SD_MOSI_PIN + #define SD_MOSI_PIN 52 +#endif +#ifndef SD_SS_PIN + #define SD_SS_PIN 53 +#endif +#ifndef SDSS + #define SDSS SD_SS_PIN +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h b/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h new file mode 100644 index 000000000000..b3e622f19ac4 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/tft/tft_spi.h @@ -0,0 +1,64 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../inc/MarlinConfig.h" + +#ifndef LCD_READ_ID + #define LCD_READ_ID 0x04 // Read display identification information (0xD3 on ILI9341) +#endif +#ifndef LCD_READ_ID4 + #define LCD_READ_ID4 0xD3 // Read display identification information (0xD3 on ILI9341) +#endif + +#define DATASIZE_8BIT 8 +#define DATASIZE_16BIT 16 +#define TFT_IO_DRIVER TFT_SPI + +#define DMA_MINC_ENABLE 1 +#define DMA_MINC_DISABLE 0 + +class TFT_SPI { +private: + static uint32_t ReadID(uint16_t Reg); + static void Transmit(uint16_t Data); + static void TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count); + +public: + // static SPIClass SPIx; + + static void Init(); + static uint32_t GetID(); + static bool isBusy(); + static void Abort(); + + static void DataTransferBegin(uint16_t DataWidth = DATASIZE_16BIT); + static void DataTransferEnd(); + static void DataTransferAbort(); + + static void WriteData(uint16_t Data); + static void WriteReg(uint16_t Reg); + + static void WriteSequence(uint16_t *Data, uint16_t Count); + // static void WriteMultiple(uint16_t Color, uint16_t Count); + static void WriteMultiple(uint16_t Color, uint32_t Count); +}; diff --git a/Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h b/Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h new file mode 100644 index 000000000000..9ef1816c7b16 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/tft/xpt2046.h @@ -0,0 +1,80 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(TOUCH_BUTTONS_HW_SPI) + #include +#endif + +#ifndef TOUCH_MISO_PIN + #define TOUCH_MISO_PIN SD_MISO_PIN +#endif +#ifndef TOUCH_MOSI_PIN + #define TOUCH_MOSI_PIN SD_MOSI_PIN +#endif +#ifndef TOUCH_SCK_PIN + #define TOUCH_SCK_PIN SD_SCK_PIN +#endif +#ifndef TOUCH_CS_PIN + #define TOUCH_CS_PIN SD_SS_PIN +#endif +#ifndef TOUCH_INT_PIN + #define TOUCH_INT_PIN -1 +#endif + +#define XPT2046_DFR_MODE 0x00 +#define XPT2046_SER_MODE 0x04 +#define XPT2046_CONTROL 0x80 + +enum XPTCoordinate : uint8_t { + XPT2046_X = 0x10 | XPT2046_CONTROL | XPT2046_DFR_MODE, + XPT2046_Y = 0x50 | XPT2046_CONTROL | XPT2046_DFR_MODE, + XPT2046_Z1 = 0x30 | XPT2046_CONTROL | XPT2046_DFR_MODE, + XPT2046_Z2 = 0x40 | XPT2046_CONTROL | XPT2046_DFR_MODE, +}; + +#if !defined(XPT2046_Z1_THRESHOLD) + #define XPT2046_Z1_THRESHOLD 10 +#endif + +class XPT2046 { +private: + static bool isBusy() { return false; } + + static uint16_t getRawData(const XPTCoordinate coordinate); + static bool isTouched(); + + static inline void DataTransferBegin(); + static inline void DataTransferEnd(); + #if ENABLED(TOUCH_BUTTONS_HW_SPI) + static uint16_t HardwareIO(uint16_t data); + #endif + static uint16_t SoftwareIO(uint16_t data); + static uint16_t IO(uint16_t data = 0); + +public: + #if ENABLED(TOUCH_BUTTONS_HW_SPI) + static SPIClass SPIx; + #endif + + static void Init(); + static bool getRawPoint(int16_t *x, int16_t *y); +}; diff --git a/Marlin/src/HAL/NATIVE_SIM/timers.h b/Marlin/src/HAL/NATIVE_SIM/timers.h new file mode 100644 index 000000000000..c61eb29e76cf --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/timers.h @@ -0,0 +1,91 @@ +/** + * Marlin 3D Printer Firmware + * + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * HAL timers for Linux X86_64 + */ + +#include + +// ------------------------ +// Defines +// ------------------------ + +#define FORCE_INLINE __attribute__((always_inline)) inline + +typedef uint64_t hal_timer_t; +#define HAL_TIMER_TYPE_MAX 0xFFFFFFFFFFFFFFFF + +#define HAL_TIMER_RATE ((SystemCoreClock) / 4) // frequency of timers peripherals + +#ifndef STEP_TIMER_NUM + #define STEP_TIMER_NUM 0 // Timer Index for Stepper +#endif +#ifndef PULSE_TIMER_NUM + #define PULSE_TIMER_NUM STEP_TIMER_NUM +#endif +#ifndef TEMP_TIMER_NUM + #define TEMP_TIMER_NUM 1 // Timer Index for Temperature +#endif +#ifndef SYSTICK_TIMER_NUM + #define SYSTICK_TIMER_NUM 2 // Timer Index for Systick +#endif +#define SYSTICK_TIMER_FREQUENCY 1000 + +#define TEMP_TIMER_RATE 1000000 +#define TEMP_TIMER_FREQUENCY 1000 // temperature interrupt frequency + +#define STEPPER_TIMER_RATE HAL_TIMER_RATE // frequency of stepper timer (HAL_TIMER_RATE / STEPPER_TIMER_PRESCALE) +#define STEPPER_TIMER_TICKS_PER_US ((STEPPER_TIMER_RATE) / 1000000) // stepper timer ticks per µs +#define STEPPER_TIMER_PRESCALE (CYCLES_PER_MICROSECOND / STEPPER_TIMER_TICKS_PER_US) + +#define PULSE_TIMER_RATE STEPPER_TIMER_RATE // frequency of pulse timer +#define PULSE_TIMER_PRESCALE STEPPER_TIMER_PRESCALE +#define PULSE_TIMER_TICKS_PER_US STEPPER_TIMER_TICKS_PER_US + +#define ENABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_enable_interrupt(STEP_TIMER_NUM) +#define DISABLE_STEPPER_DRIVER_INTERRUPT() HAL_timer_disable_interrupt(STEP_TIMER_NUM) +#define STEPPER_ISR_ENABLED() HAL_timer_interrupt_enabled(STEP_TIMER_NUM) + +#define ENABLE_TEMPERATURE_INTERRUPT() HAL_timer_enable_interrupt(TEMP_TIMER_NUM) +#define DISABLE_TEMPERATURE_INTERRUPT() HAL_timer_disable_interrupt(TEMP_TIMER_NUM) + +#ifndef HAL_STEP_TIMER_ISR + #define HAL_STEP_TIMER_ISR() extern "C" void TIMER0_IRQHandler() +#endif +#ifndef HAL_TEMP_TIMER_ISR + #define HAL_TEMP_TIMER_ISR() extern "C" void TIMER1_IRQHandler() +#endif + +void HAL_timer_init(); +void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency); + +void HAL_timer_set_compare(const uint8_t timer_num, const hal_timer_t compare); +hal_timer_t HAL_timer_get_compare(const uint8_t timer_num); +hal_timer_t HAL_timer_get_count(const uint8_t timer_num); + +void HAL_timer_enable_interrupt(const uint8_t timer_num); +void HAL_timer_disable_interrupt(const uint8_t timer_num); +bool HAL_timer_interrupt_enabled(const uint8_t timer_num); + +#define HAL_timer_isr_prologue(TIMER_NUM) +#define HAL_timer_isr_epilogue(TIMER_NUM) diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp new file mode 100644 index 000000000000..745454394aae --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.cpp @@ -0,0 +1,52 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +// adapted from I2C/master/master.c example +// https://www-users.cs.york.ac.uk/~pcc/MCP/HAPR-Course-web/CMSIS/examples/html/master_8c_source.html + +#ifdef __PLAT_NATIVE_SIM__ + +#include + +#ifdef __cplusplus + extern "C" { +#endif + +uint8_t u8g_i2c_start(const uint8_t sla) { + return 1; +} + +void u8g_i2c_init(const uint8_t clock_option) { +} + +uint8_t u8g_i2c_send_byte(uint8_t data) { + return 1; +} + +void u8g_i2c_stop() { +} + +#ifdef __cplusplus + } +#endif + +#endif // __PLAT_NATIVE_SIM__ diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h new file mode 100644 index 000000000000..6d5f91d3ba45 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_I2C_routines.h @@ -0,0 +1,37 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#ifdef __cplusplus + extern "C" { +#endif + +void u8g_i2c_init(const uint8_t clock_options); +//uint8_t u8g_i2c_wait(uint8_t mask, uint8_t pos); +uint8_t u8g_i2c_start(uint8_t sla); +uint8_t u8g_i2c_send_byte(uint8_t data); +void u8g_i2c_stop(); + +#ifdef __cplusplus + } +#endif + diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h new file mode 100644 index 000000000000..44ffbfeb90e5 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_defines.h @@ -0,0 +1,44 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +void usleep(uint64_t microsec); +// The following are optional depending on the platform. + +// definitions of HAL specific com and device drivers. +uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); +uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + +// connect U8g com generic com names to the desired driver +#define U8G_COM_SW_SPI u8g_com_sw_spi_fn +#define U8G_COM_ST7920_SW_SPI u8g_com_ST7920_sw_spi_fn + +// let these default for now +#define U8G_COM_HW_SPI u8g_com_null_fn +#define U8G_COM_ST7920_HW_SPI u8g_com_null_fn +#define U8G_COM_SSD_I2C u8g_com_null_fn +#define U8G_COM_PARALLEL u8g_com_null_fn +#define U8G_COM_T6963 u8g_com_null_fn +#define U8G_COM_FAST_PARALLEL u8g_com_null_fn +#define U8G_COM_UC_I2C u8g_com_null_fn + + diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h new file mode 100644 index 000000000000..297361cd448f --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_delay.h @@ -0,0 +1,43 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * LCD delay routines - used by all the drivers. + * + * These are based on the LPC1768 routines. + * + * Couldn't just call exact copies because the overhead + * results in a one microsecond delay taking about 4µS. + */ + +#ifdef __cplusplus + extern "C" { +#endif + +void U8g_delay(int msec); +void u8g_MicroDelay(); +void u8g_10MicroDelay(); + +#ifdef __cplusplus + } +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp new file mode 100644 index 000000000000..3b5acc1656cd --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.cpp @@ -0,0 +1,52 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Low level pin manipulation routines - used by all the drivers. + * + * These are based on the LPC1768 pinMode, digitalRead & digitalWrite routines. + * + * Couldn't just call exact copies because the overhead killed the LCD update speed + * With an intermediate level the softspi was running in the 10-20kHz range which + * resulted in using about about 25% of the CPU's time. + */ + +#ifdef __PLAT_NATIVE_SIM__ + +#include "../fastio.h" +#include "LCD_pin_routines.h" + +#ifdef __cplusplus + extern "C" { +#endif +void u8g_SetPinOutput(uint8_t internal_pin_number){SET_DIR_OUTPUT(internal_pin_number);} +void u8g_SetPinInput(uint8_t internal_pin_number){SET_DIR_INPUT(internal_pin_number);} +void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status){WRITE_PIN(pin, pin_status);} +uint8_t u8g_GetPinLevel(uint8_t pin){return READ_PIN(pin);} +void usleep(uint64_t microsec){ +assert(false); // why we here? +} +#ifdef __cplusplus + } +#endif + +#endif // __PLAT_NATIVE_SIM__ diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h new file mode 100644 index 000000000000..c27c84e8c398 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/LCD_pin_routines.h @@ -0,0 +1,46 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Low level pin manipulation routines - used by all the drivers. + * + * These are based on the LPC1768 pinMode, digitalRead & digitalWrite routines. + * + * Couldn't just call exact copies because the overhead killed the LCD update speed + * With an intermediate level the softspi was running in the 10-20kHz range which + * resulted in using about about 25% of the CPU's time. + */ + + +#ifdef __cplusplus + extern "C" { +#endif + +void u8g_SetPinOutput(uint8_t internal_pin_number); +void u8g_SetPinInput(uint8_t internal_pin_number); +void u8g_SetPinLevel(uint8_t pin, uint8_t pin_status); +uint8_t u8g_GetPinLevel(uint8_t pin); + +#ifdef __cplusplus + } +#endif diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp new file mode 100644 index 000000000000..c77c3d30f09a --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_st7920_sw_spi.cpp @@ -0,0 +1,171 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on u8g_com_st7920_hw_spi.c + * + * Universal 8bit Graphics Library + * + * Copyright (c) 2011, olikraus@gmail.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __PLAT_NATIVE_SIM__ + +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(U8GLIB_ST7920) + +#include +#include "../../shared/Delay.h" + +#undef SPI_SPEED +#define SPI_SPEED 6 +#define SPI_DELAY_CYCLES (1 + SPI_SPEED * 10) + +static pin_t SCK_pin_ST7920_HAL, MOSI_pin_ST7920_HAL_HAL; +static uint8_t SPI_speed = 0; + +static uint8_t swSpiTransfer(uint8_t b, const uint8_t spi_speed, const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin) { + for (uint8_t i = 0; i < 8; i++) { + WRITE_PIN(mosi_pin, !!(b & 0x80)); + DELAY_CYCLES(SPI_SPEED); + WRITE_PIN(sck_pin, HIGH); + DELAY_CYCLES(SPI_SPEED); + b <<= 1; + if (miso_pin >= 0 && READ_PIN(miso_pin)) b |= 1; + WRITE_PIN(sck_pin, LOW); + DELAY_CYCLES(SPI_SPEED); + } + return b; +} + +static uint8_t swSpiInit(const uint8_t spiRate, const pin_t sck_pin, const pin_t mosi_pin) { + WRITE_PIN(mosi_pin, HIGH); + WRITE_PIN(sck_pin, LOW); + return spiRate; +} + +static void u8g_com_st7920_write_byte_sw_spi(uint8_t rs, uint8_t val) { + static uint8_t rs_last_state = 255; + if (rs != rs_last_state) { + // Transfer Data (FA) or Command (F8) + swSpiTransfer(rs ? 0x0FA : 0x0F8, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL); + rs_last_state = rs; + DELAY_US(40); // Give the controller time to process the data: 20 is bad, 30 is OK, 40 is safe + } + swSpiTransfer(val & 0x0F0, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL); + swSpiTransfer(val << 4, SPI_speed, SCK_pin_ST7920_HAL, -1, MOSI_pin_ST7920_HAL_HAL); +} +#ifdef __cplusplus + extern "C" { +#endif + +uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { + switch (msg) { + case U8G_COM_MSG_INIT: + SCK_pin_ST7920_HAL = u8g->pin_list[U8G_PI_SCK]; + MOSI_pin_ST7920_HAL_HAL = u8g->pin_list[U8G_PI_MOSI]; + + u8g_SetPIOutput(u8g, U8G_PI_CS); + u8g_SetPIOutput(u8g, U8G_PI_SCK); + u8g_SetPIOutput(u8g, U8G_PI_MOSI); + u8g_Delay(5); + + SPI_speed = swSpiInit(SPI_SPEED, SCK_pin_ST7920_HAL, MOSI_pin_ST7920_HAL_HAL); + + u8g_SetPILevel(u8g, U8G_PI_CS, 0); + u8g_SetPILevel(u8g, U8G_PI_SCK, 0); + u8g_SetPILevel(u8g, U8G_PI_MOSI, 0); + + u8g->pin_list[U8G_PI_A0_STATE] = 0; /* initial RS state: command mode */ + break; + + case U8G_COM_MSG_STOP: + break; + + case U8G_COM_MSG_RESET: + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val); + break; + + case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */ + u8g->pin_list[U8G_PI_A0_STATE] = arg_val; + break; + + case U8G_COM_MSG_CHIP_SELECT: + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_CS]) u8g_SetPILevel(u8g, U8G_PI_CS, arg_val); //note: the st7920 has an active high chip select + break; + + case U8G_COM_MSG_WRITE_BYTE: + u8g_com_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], arg_val); + break; + + case U8G_COM_MSG_WRITE_SEQ: { + uint8_t *ptr = (uint8_t*) arg_ptr; + while (arg_val > 0) { + u8g_com_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++); + arg_val--; + } + } + break; + + case U8G_COM_MSG_WRITE_SEQ_P: { + uint8_t *ptr = (uint8_t*) arg_ptr; + while (arg_val > 0) { + u8g_com_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++); + arg_val--; + } + } + break; + } + return 1; +} +#ifdef __cplusplus + } +#endif + +#endif // U8GLIB_ST7920 +#endif // TARGET_LPC1768 diff --git a/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp new file mode 100644 index 000000000000..085954803cf2 --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/u8g/u8g_com_sw_spi.cpp @@ -0,0 +1,215 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on u8g_com_std_sw_spi.c + * + * Universal 8bit Graphics Library + * + * Copyright (c) 2015, olikraus@gmail.com + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, this list + * of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, this + * list of conditions and the following disclaimer in the documentation and/or other + * materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifdef __PLAT_NATIVE_SIM__ + +#include "../../../inc/MarlinConfig.h" + +#if HAS_MARLINUI_U8GLIB && DISABLED(U8GLIB_ST7920) + +#undef SPI_SPEED +#define SPI_SPEED 2 // About 2 MHz + +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + +uint8_t swSpiTransfer_mode_0(uint8_t b, const uint8_t spi_speed, const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin ) { + LOOP_L_N(i, 8) { + if (spi_speed == 0) { + WRITE_PIN(mosi_pin, !!(b & 0x80)); + WRITE_PIN(sck_pin, HIGH); + b <<= 1; + if (miso_pin >= 0 && READ_PIN(miso_pin)) b |= 1; + WRITE_PIN(sck_pin, LOW); + } + else { + const uint8_t state = (b & 0x80) ? HIGH : LOW; + LOOP_L_N(j, spi_speed) + WRITE_PIN(mosi_pin, state); + + LOOP_L_N(j, spi_speed + (miso_pin >= 0 ? 0 : 1)) + WRITE_PIN(sck_pin, HIGH); + + b <<= 1; + if (miso_pin >= 0 && READ_PIN(miso_pin)) b |= 1; + + LOOP_L_N(j, spi_speed) + WRITE_PIN(sck_pin, LOW); + } + } + + return b; +} + +uint8_t swSpiTransfer_mode_3(uint8_t b, const uint8_t spi_speed, const pin_t sck_pin, const pin_t miso_pin, const pin_t mosi_pin ) { + + LOOP_L_N(i, 8) { + const uint8_t state = (b & 0x80) ? HIGH : LOW; + if (spi_speed == 0) { + WRITE_PIN(sck_pin, LOW); + WRITE_PIN(mosi_pin, state); + WRITE_PIN(mosi_pin, state); // need some setup time + WRITE_PIN(sck_pin, HIGH); + } + else { + LOOP_L_N(j, spi_speed + (miso_pin >= 0 ? 0 : 1)) + WRITE_PIN(sck_pin, LOW); + + LOOP_L_N(j, spi_speed) + WRITE_PIN(mosi_pin, state); + + LOOP_L_N(j, spi_speed) + WRITE_PIN(sck_pin, HIGH); + } + b <<= 1; + if (miso_pin >= 0 && READ_PIN(miso_pin)) b |= 1; + } + + return b; +} + +static uint8_t SPI_speed = 0; + +static uint8_t swSpiInit(const uint8_t spi_speed, const uint8_t clk_pin, const uint8_t mosi_pin) { + return spi_speed; +} + +static void u8g_sw_spi_shift_out(uint8_t dataPin, uint8_t clockPin, uint8_t val) { + #if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) + swSpiTransfer_mode_3(val, SPI_speed, clockPin, -1, dataPin); + #else + swSpiTransfer_mode_0(val, SPI_speed, clockPin, -1, dataPin); + #endif +} + +uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) { + switch (msg) { + case U8G_COM_MSG_INIT: + u8g_SetPIOutput(u8g, U8G_PI_SCK); + u8g_SetPIOutput(u8g, U8G_PI_MOSI); + u8g_SetPIOutput(u8g, U8G_PI_CS); + u8g_SetPIOutput(u8g, U8G_PI_A0); + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPIOutput(u8g, U8G_PI_RESET); + SPI_speed = swSpiInit(SPI_SPEED, u8g->pin_list[U8G_PI_SCK], u8g->pin_list[U8G_PI_MOSI]); + u8g_SetPILevel(u8g, U8G_PI_SCK, 0); + u8g_SetPILevel(u8g, U8G_PI_MOSI, 0); + break; + + case U8G_COM_MSG_STOP: + break; + + case U8G_COM_MSG_RESET: + if (U8G_PIN_NONE != u8g->pin_list[U8G_PI_RESET]) u8g_SetPILevel(u8g, U8G_PI_RESET, arg_val); + break; + + case U8G_COM_MSG_CHIP_SELECT: + #if EITHER(FYSETC_MINI_12864, MKS_MINI_12864) // LCD SPI is running mode 3 while SD card is running mode 0 + if (arg_val) { // SCK idle state needs to be set to the proper idle state before + // the next chip select goes active + u8g_SetPILevel(u8g, U8G_PI_SCK, 1); // Set SCK to mode 3 idle state before CS goes active + u8g_SetPILevel(u8g, U8G_PI_CS, LOW); + } + else { + u8g_SetPILevel(u8g, U8G_PI_CS, HIGH); + u8g_SetPILevel(u8g, U8G_PI_SCK, 0); // Set SCK to mode 0 idle state after CS goes inactive + } + #else + u8g_SetPILevel(u8g, U8G_PI_CS, !arg_val); + #endif + break; + + case U8G_COM_MSG_WRITE_BYTE: + u8g_sw_spi_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], arg_val); + break; + + case U8G_COM_MSG_WRITE_SEQ: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + u8g_sw_spi_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], *ptr++); + arg_val--; + } + } + break; + + case U8G_COM_MSG_WRITE_SEQ_P: { + uint8_t *ptr = (uint8_t *)arg_ptr; + while (arg_val > 0) { + u8g_sw_spi_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], u8g_pgm_read(ptr)); + ptr++; + arg_val--; + } + } + break; + + case U8G_COM_MSG_ADDRESS: /* define cmd (arg_val = 0) or data mode (arg_val = 1) */ + u8g_SetPILevel(u8g, U8G_PI_A0, arg_val); + break; + } + return 1; +} + +#ifdef __cplusplus + } +#endif + +#elif !ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI, HAS_MARLINUI_HD44780) && HAS_MARLINUI_U8GLIB + #include + uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {return 0;} +#endif // HAS_MARLINUI_U8GLIB && !U8GLIB_ST7920 +#endif // __PLAT_NATIVE_SIM__ diff --git a/Marlin/src/HAL/NATIVE_SIM/watchdog.h b/Marlin/src/HAL/NATIVE_SIM/watchdog.h new file mode 100644 index 000000000000..4e404c3887da --- /dev/null +++ b/Marlin/src/HAL/NATIVE_SIM/watchdog.h @@ -0,0 +1,27 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define WDT_TIMEOUT 4000000 // 4 second timeout + +void watchdog_init(); +void HAL_watchdog_refresh(); diff --git a/Marlin/src/HAL/SAMD51/HAL.cpp b/Marlin/src/HAL/SAMD51/HAL.cpp index a413c4cd80e7..8baad31bc751 100644 --- a/Marlin/src/HAL/SAMD51/HAL.cpp +++ b/Marlin/src/HAL/SAMD51/HAL.cpp @@ -25,8 +25,21 @@ #include #ifdef ADAFRUIT_GRAND_CENTRAL_M4 - DefaultSerial MSerial(false, Serial); - DefaultSerial1 MSerial1(false, Serial1); + #if USING_HW_SERIALUSB + DefaultSerial1 MSerial0(false, Serial); + #endif + #if USING_HW_SERIAL0 + DefaultSerial2 MSerial1(false, Serial1); + #endif + #if USING_HW_SERIAL1 + DefaultSerial3 MSerial2(false, Serial2); + #endif + #if USING_HW_SERIAL2 + DefaultSerial4 MSerial3(false, Serial3); + #endif + #if USING_HW_SERIAL3 + DefaultSerial5 MSerial4(false, Serial4); + #endif #endif // ------------------------ @@ -44,6 +57,7 @@ #define GET_PROBE_ADC() TERN(HAS_TEMP_PROBE, PIN_TO_ADC(TEMP_PROBE_PIN), -1) #define GET_BED_ADC() TERN(HAS_TEMP_ADC_BED, PIN_TO_ADC(TEMP_BED_PIN), -1) #define GET_CHAMBER_ADC() TERN(HAS_TEMP_ADC_CHAMBER, PIN_TO_ADC(TEMP_CHAMBER_PIN), -1) +#define GET_COOLER_ADC() TERN(HAS_TEMP_ADC_COOLER, PIN_TO_ADC(TEMP_COOLER_PIN), -1) #define GET_FILAMENT_WIDTH_ADC() TERN(FILAMENT_WIDTH_SENSOR, PIN_TO_ADC(FILWIDTH_PIN), -1) #define GET_BUTTONS_ADC() TERN(HAS_ADC_BUTTONS, PIN_TO_ADC(ADC_KEYPAD_PIN), -1) @@ -53,6 +67,7 @@ || GET_PROBE_ADC() == n \ || GET_BED_ADC() == n \ || GET_CHAMBER_ADC() == n \ + || GET_COOLER_ADC() == n \ || GET_FILAMENT_WIDTH_ADC() == n \ || GET_BUTTONS_ADC() == n \ ) @@ -83,7 +98,7 @@ // Struct must be 32 bits aligned because of DMA accesses but fields needs to be 8 bits packed typedef struct __attribute__((aligned(4), packed)) { ADC_INPUTCTRL_Type INPUTCTRL; - } HAL_DMA_DAC_Registers; // DMA transfered registers + } HAL_DMA_DAC_Registers; // DMA transferred registers #endif @@ -131,6 +146,9 @@ uint16_t HAL_adc_result; #if GET_CHAMBER_ADC() == 0 TEMP_CHAMBER_PIN, #endif + #if GET_COOLER_ADC() == 0 + TEMP_COOLER_PIN, + #endif #if GET_FILAMENT_WIDTH_ADC() == 0 FILWIDTH_PIN, #endif @@ -171,6 +189,9 @@ uint16_t HAL_adc_result; #if GET_CHAMBER_ADC() == 1 TEMP_CHAMBER_PIN, #endif + #if GET_COOLER_ADC() == 1 + TEMP_COOLER_PIN, + #endif #if GET_FILAMENT_WIDTH_ADC() == 1 FILWIDTH_PIN, #endif @@ -219,6 +240,9 @@ uint16_t HAL_adc_result; #if GET_CHAMBER_ADC() == 0 { PIN_TO_INPUTCTRL(TEMP_CHAMBER_PIN) }, #endif + #if GET_COOLER_ADC() == 0 + { PIN_TO_INPUTCTRL(TEMP_COOLER_PIN) }, + #endif #if GET_FILAMENT_WIDTH_ADC() == 0 { PIN_TO_INPUTCTRL(FILWIDTH_PIN) }, #endif @@ -268,6 +292,9 @@ uint16_t HAL_adc_result; #if GET_CHAMBER_ADC() == 1 { PIN_TO_INPUTCTRL(TEMP_CHAMBER_PIN) }, #endif + #if GET_COOLER_ADC() == 1 + { PIN_TO_INPUTCTRL(TEMP_COOLER_PIN) }, + #endif #if GET_FILAMENT_WIDTH_ADC() == 1 { PIN_TO_INPUTCTRL(FILWIDTH_PIN) }, #endif @@ -409,6 +436,8 @@ uint8_t HAL_get_reset_source() { } #pragma pop_macro("WDT") +void HAL_reboot() { NVIC_SystemReset(); } + extern "C" { void * _sbrk(int incr); diff --git a/Marlin/src/HAL/SAMD51/HAL.h b/Marlin/src/HAL/SAMD51/HAL.h index f28583c771be..491c3f82c4a6 100644 --- a/Marlin/src/HAL/SAMD51/HAL.h +++ b/Marlin/src/HAL/SAMD51/HAL.h @@ -32,52 +32,56 @@ #include "MarlinSerial_AGCM4.h" // Serial ports - typedef ForwardSerial0Type< decltype(Serial) > DefaultSerial; - extern DefaultSerial MSerial; - typedef ForwardSerial0Type< decltype(Serial1) > DefaultSerial1; - extern DefaultSerial1 MSerial1; - - // MYSERIAL0 required before MarlinSerial includes! + typedef ForwardSerial1Class< decltype(Serial) > DefaultSerial1; + typedef ForwardSerial1Class< decltype(Serial1) > DefaultSerial2; + typedef ForwardSerial1Class< decltype(Serial2) > DefaultSerial3; + typedef ForwardSerial1Class< decltype(Serial3) > DefaultSerial4; + typedef ForwardSerial1Class< decltype(Serial4) > DefaultSerial5; + extern DefaultSerial1 MSerial0; + extern DefaultSerial2 MSerial1; + extern DefaultSerial3 MSerial2; + extern DefaultSerial4 MSerial3; + extern DefaultSerial5 MSerial4; #define __MSERIAL(X) MSerial##X #define _MSERIAL(X) __MSERIAL(X) #define MSERIAL(X) _MSERIAL(INCREMENT(X)) #if SERIAL_PORT == -1 - #define MYSERIAL0 MSerial + #define MYSERIAL1 MSerial0 #elif WITHIN(SERIAL_PORT, 0, 3) - #define MYSERIAL0 MSERIAL(SERIAL_PORT) + #define MYSERIAL1 MSERIAL(SERIAL_PORT) #else - #error "SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #endif #ifdef SERIAL_PORT_2 #if SERIAL_PORT_2 == -1 - #define MYSERIAL1 MSerial + #define MYSERIAL2 MSerial0 #elif WITHIN(SERIAL_PORT_2, 0, 3) - #define MYSERIAL1 MSERIAL(SERIAL_PORT_2) + #define MYSERIAL2 MSERIAL(SERIAL_PORT_2) #else - #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration." + #error "SERIAL_PORT_2 must be from 0 to 3. You can also use -1 if the board supports Native USB." #endif #endif #ifdef MMU2_SERIAL_PORT #if MMU2_SERIAL_PORT == -1 - #define MMU2_SERIAL MSerial + #define MMU2_SERIAL MSerial0 #elif WITHIN(MMU2_SERIAL_PORT, 0, 3) #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) #else - #error "MMU2_SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "MMU2_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #endif #endif #ifdef LCD_SERIAL_PORT #if LCD_SERIAL_PORT == -1 - #define LCD_SERIAL MSerial + #define LCD_SERIAL MSerial0 #elif WITHIN(LCD_SERIAL_PORT, 0, 3) #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT) #else - #error "LCD_SERIAL_PORT must be from -1 to 3. Please update your configuration." + #error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB." #endif #endif @@ -103,7 +107,7 @@ typedef int8_t pin_t; void HAL_clear_reset_source(); // clear reset reason uint8_t HAL_get_reset_source(); // get reset reason -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); // // ADC diff --git a/Marlin/src/HAL/SAMD51/HAL_SPI.cpp b/Marlin/src/HAL/SAMD51/HAL_SPI.cpp index c3acd38237c6..77f4d5ecd513 100644 --- a/Marlin/src/HAL/SAMD51/HAL_SPI.cpp +++ b/Marlin/src/HAL/SAMD51/HAL_SPI.cpp @@ -103,7 +103,7 @@ * @param nbyte Number of bytes to receive. * @return Nothing */ - void spiRead(uint8_t* buf, uint16_t nbyte) { + void spiRead(uint8_t *buf, uint16_t nbyte) { if (nbyte == 0) return; memset(buf, 0xFF, nbyte); sdSPI.beginTransaction(spiConfig); @@ -132,7 +132,7 @@ * * @details Uses DMA */ - void spiSendBlock(uint8_t token, const uint8_t* buf) { + void spiSendBlock(uint8_t token, const uint8_t *buf) { sdSPI.beginTransaction(spiConfig); sdSPI.transfer(token); sdSPI.transfer((uint8_t*)buf, nullptr, 512); diff --git a/Marlin/src/HAL/SAMD51/MarlinSPI.h b/Marlin/src/HAL/SAMD51/MarlinSPI.h new file mode 100644 index 000000000000..0c447ba4cb3d --- /dev/null +++ b/Marlin/src/HAL/SAMD51/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.cpp b/Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.cpp index 3f43585cf242..a16ea2f75821 100644 --- a/Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.cpp +++ b/Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.cpp @@ -27,7 +27,7 @@ #include "../../inc/MarlinConfig.h" -#if ANY_SERIAL_IS(1) +#if USING_HW_SERIAL1 UartT Serial2(false, &sercom4, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX); void SERCOM4_0_Handler() { Serial2.IrqHandler(); } void SERCOM4_1_Handler() { Serial2.IrqHandler(); } @@ -35,7 +35,7 @@ void SERCOM4_3_Handler() { Serial2.IrqHandler(); } #endif -#if ANY_SERIAL_IS(2) +#if USING_HW_SERIAL2 UartT Serial3(false, &sercom1, PIN_SERIAL3_RX, PIN_SERIAL3_TX, PAD_SERIAL3_RX, PAD_SERIAL3_TX); void SERCOM1_0_Handler() { Serial3.IrqHandler(); } void SERCOM1_1_Handler() { Serial3.IrqHandler(); } @@ -43,7 +43,7 @@ void SERCOM1_3_Handler() { Serial3.IrqHandler(); } #endif -#if ANY_SERIAL_IS(3) +#if USING_HW_SERIAL3 UartT Serial4(false, &sercom5, PIN_SERIAL4_RX, PIN_SERIAL4_TX, PAD_SERIAL4_RX, PAD_SERIAL4_TX); void SERCOM5_0_Handler() { Serial4.IrqHandler(); } void SERCOM5_1_Handler() { Serial4.IrqHandler(); } diff --git a/Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.h b/Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.h index b7293415d136..ac5a3793983e 100644 --- a/Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.h +++ b/Marlin/src/HAL/SAMD51/MarlinSerial_AGCM4.h @@ -22,7 +22,7 @@ #include "../../core/serial_hook.h" -typedef Serial0Type UartT; +typedef Serial1Class UartT; extern UartT Serial2; extern UartT Serial3; diff --git a/Marlin/src/HAL/SAMD51/QSPIFlash.h b/Marlin/src/HAL/SAMD51/QSPIFlash.h index db4abec91caf..58822fe05f3e 100644 --- a/Marlin/src/HAL/SAMD51/QSPIFlash.h +++ b/Marlin/src/HAL/SAMD51/QSPIFlash.h @@ -25,7 +25,6 @@ * * Derived from Adafruit_SPIFlash class with no SdFat references */ - #pragma once #include diff --git a/Marlin/src/HAL/SAMD51/eeprom_wired.cpp b/Marlin/src/HAL/SAMD51/eeprom_wired.cpp index d9a0225a7ae4..3481fe539c3e 100644 --- a/Marlin/src/HAL/SAMD51/eeprom_wired.cpp +++ b/Marlin/src/HAL/SAMD51/eeprom_wired.cpp @@ -41,12 +41,13 @@ bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { const uint8_t v = *value; uint8_t * const p = (uint8_t * const)pos; - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); - delay(2); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; diff --git a/Marlin/src/HAL/SAMD51/endstop_interrupts.h b/Marlin/src/HAL/SAMD51/endstop_interrupts.h index daac7733875b..61a06c0d4b42 100644 --- a/Marlin/src/HAL/SAMD51/endstop_interrupts.h +++ b/Marlin/src/HAL/SAMD51/endstop_interrupts.h @@ -47,80 +47,38 @@ #include "../../module/endstops.h" -#define MATCH_EILINE(P1,P2) (P1 != P2 && PIN_TO_EILINE(P1) == PIN_TO_EILINE(P2)) -#if HAS_X_MAX - #define MATCH_X_MAX_EILINE(P) MATCH_EILINE(P, X_MAX_PIN) -#else - #define MATCH_X_MAX_EILINE(P) false -#endif -#if HAS_X_MIN - #define MATCH_X_MIN_EILINE(P) MATCH_EILINE(P, X_MIN_PIN) -#else - #define MATCH_X_MIN_EILINE(P) false -#endif -#if HAS_Y_MAX - #define MATCH_Y_MAX_EILINE(P) MATCH_EILINE(P, Y_MAX_PIN) -#else - #define MATCH_Y_MAX_EILINE(P) false -#endif -#if HAS_Y_MIN - #define MATCH_Y_MIN_EILINE(P) MATCH_EILINE(P, Y_MIN_PIN) -#else - #define MATCH_Y_MIN_EILINE(P) false -#endif -#if HAS_Z_MAX - #define MATCH_Z_MAX_EILINE(P) MATCH_EILINE(P, Z_MAX_PIN) -#else - #define MATCH_Z_MAX_EILINE(P) false -#endif -#if HAS_Z_MIN - #define MATCH_Z_MIN_EILINE(P) MATCH_EILINE(P, Z_MIN_PIN) -#else - #define MATCH_Z_MIN_EILINE(P) false -#endif -#if HAS_Z2_MAX - #define MATCH_Z2_MAX_EILINE(P) MATCH_EILINE(P, Z2_MAX_PIN) -#else - #define MATCH_Z2_MAX_EILINE(P) false -#endif -#if HAS_Z2_MIN - #define MATCH_Z2_MIN_EILINE(P) MATCH_EILINE(P, Z2_MIN_PIN) -#else - #define MATCH_Z2_MIN_EILINE(P) false -#endif -#if HAS_Z3_MAX - #define MATCH_Z3_MAX_EILINE(P) MATCH_EILINE(P, Z3_MAX_PIN) -#else - #define MATCH_Z3_MAX_EILINE(P) false -#endif -#if HAS_Z3_MIN - #define MATCH_Z3_MIN_EILINE(P) MATCH_EILINE(P, Z3_MIN_PIN) -#else - #define MATCH_Z3_MIN_EILINE(P) false -#endif -#if HAS_Z4_MAX - #define MATCH_Z4_MAX_EILINE(P) MATCH_EILINE(P, Z4_MAX_PIN) -#else - #define MATCH_Z4_MAX_EILINE(P) false -#endif -#if HAS_Z4_MIN - #define MATCH_Z4_MIN_EILINE(P) MATCH_EILINE(P, Z4_MIN_PIN) -#else - #define MATCH_Z4_MIN_EILINE(P) false -#endif -#if HAS_Z_MIN_PROBE_PIN - #define MATCH_Z_MIN_PROBE_EILINE(P) MATCH_EILINE(P, Z_MIN_PROBE_PIN) -#else - #define MATCH_Z_MIN_PROBE_EILINE(P) false -#endif -#define AVAILABLE_EILINE(P) (PIN_TO_EILINE(P) != -1 \ - && !MATCH_X_MAX_EILINE(P) && !MATCH_X_MIN_EILINE(P) \ - && !MATCH_Y_MAX_EILINE(P) && !MATCH_Y_MIN_EILINE(P) \ - && !MATCH_Z_MAX_EILINE(P) && !MATCH_Z_MIN_EILINE(P) \ - && !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \ - && !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \ - && !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \ - && !MATCH_Z_MIN_PROBE_EILINE(P)) +#define MATCH_EILINE(P1,P2) (P1 != P2 && PIN_TO_EILINE(P1) == PIN_TO_EILINE(P2)) +#define MATCH_X_MAX_EILINE(P) TERN0(HAS_X_MAX, DEFER4(MATCH_EILINE)(P, X_MAX_PIN)) +#define MATCH_X_MIN_EILINE(P) TERN0(HAS_X_MIN, DEFER4(MATCH_EILINE)(P, X_MIN_PIN)) +#define MATCH_Y_MAX_EILINE(P) TERN0(HAS_Y_MAX, DEFER4(MATCH_EILINE)(P, Y_MAX_PIN)) +#define MATCH_Y_MIN_EILINE(P) TERN0(HAS_Y_MIN, DEFER4(MATCH_EILINE)(P, Y_MIN_PIN)) +#define MATCH_Z_MAX_EILINE(P) TERN0(HAS_Z_MAX, DEFER4(MATCH_EILINE)(P, Z_MAX_PIN)) +#define MATCH_Z_MIN_EILINE(P) TERN0(HAS_Z_MIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PIN)) +#define MATCH_I_MAX_EILINE(P) TERN0(HAS_I_MAX, DEFER4(MATCH_EILINE)(P, I_MAX_PIN)) +#define MATCH_I_MIN_EILINE(P) TERN0(HAS_I_MIN, DEFER4(MATCH_EILINE)(P, I_MIN_PIN)) +#define MATCH_J_MAX_EILINE(P) TERN0(HAS_J_MAX, DEFER4(MATCH_EILINE)(P, J_MAX_PIN)) +#define MATCH_J_MIN_EILINE(P) TERN0(HAS_J_MIN, DEFER4(MATCH_EILINE)(P, J_MIN_PIN)) +#define MATCH_K_MAX_EILINE(P) TERN0(HAS_K_MAX, DEFER4(MATCH_EILINE)(P, K_MAX_PIN)) +#define MATCH_K_MIN_EILINE(P) TERN0(HAS_K_MIN, DEFER4(MATCH_EILINE)(P, K_MIN_PIN)) +#define MATCH_Z2_MAX_EILINE(P) TERN0(HAS_Z2_MAX, DEFER4(MATCH_EILINE)(P, Z2_MAX_PIN)) +#define MATCH_Z2_MIN_EILINE(P) TERN0(HAS_Z2_MIN, DEFER4(MATCH_EILINE)(P, Z2_MIN_PIN)) +#define MATCH_Z3_MAX_EILINE(P) TERN0(HAS_Z3_MAX, DEFER4(MATCH_EILINE)(P, Z3_MAX_PIN)) +#define MATCH_Z3_MIN_EILINE(P) TERN0(HAS_Z3_MIN, DEFER4(MATCH_EILINE)(P, Z3_MIN_PIN)) +#define MATCH_Z4_MAX_EILINE(P) TERN0(HAS_Z4_MAX, DEFER4(MATCH_EILINE)(P, Z4_MAX_PIN)) +#define MATCH_Z4_MIN_EILINE(P) TERN0(HAS_Z4_MIN, DEFER4(MATCH_EILINE)(P, Z4_MIN_PIN)) +#define MATCH_Z_MIN_PROBE_EILINE(P) TERN0(HAS_Z_MIN_PROBE_PIN, DEFER4(MATCH_EILINE)(P, Z_MIN_PROBE_PIN)) + +#define AVAILABLE_EILINE(P) ( PIN_TO_EILINE(P) != -1 \ + && !MATCH_X_MAX_EILINE(P) && !MATCH_X_MIN_EILINE(P) \ + && !MATCH_Y_MAX_EILINE(P) && !MATCH_Y_MIN_EILINE(P) \ + && !MATCH_Z_MAX_EILINE(P) && !MATCH_Z_MIN_EILINE(P) \ + && !MATCH_I_MAX_EILINE(P) && !MATCH_I_MIN_EILINE(P) \ + && !MATCH_J_MAX_EILINE(P) && !MATCH_J_MIN_EILINE(P) \ + && !MATCH_K_MAX_EILINE(P) && !MATCH_K_MIN_EILINE(P) \ + && !MATCH_Z2_MAX_EILINE(P) && !MATCH_Z2_MIN_EILINE(P) \ + && !MATCH_Z3_MAX_EILINE(P) && !MATCH_Z3_MIN_EILINE(P) \ + && !MATCH_Z4_MAX_EILINE(P) && !MATCH_Z4_MIN_EILINE(P) \ + && !MATCH_Z_MIN_PROBE_EILINE(P) ) // One ISR for all EXT-Interrupts void endstop_ISR() { endstops.update(); } @@ -205,4 +163,40 @@ void setup_endstop_interrupts() { #endif _ATTACH(Z_MIN_PROBE_PIN); #endif + #if HAS_I_MAX + #if !AVAILABLE_EILINE(I_MAX_PIN) + #error "I_MAX_PIN has no EXTINT line available." + #endif + attachInterrupt(I_MAX_PIN, endstop_ISR, CHANGE); + #endif + #if HAS_I_MIN + #if !AVAILABLE_EILINE(I_MIN_PIN) + #error "I_MIN_PIN has no EXTINT line available." + #endif + attachInterrupt(I_MIN_PIN, endstop_ISR, CHANGE); + #endif + #if HAS_J_MAX + #if !AVAILABLE_EILINE(J_MAX_PIN) + #error "J_MAX_PIN has no EXTINT line available." + #endif + attachInterrupt(J_MAX_PIN, endstop_ISR, CHANGE); + #endif + #if HAS_J_MIN + #if !AVAILABLE_EILINE(J_MIN_PIN) + #error "J_MIN_PIN has no EXTINT line available." + #endif + attachInterrupt(J_MIN_PIN, endstop_ISR, CHANGE); + #endif + #if HAS_K_MAX + #if !AVAILABLE_EILINE(K_MAX_PIN) + #error "K_MAX_PIN has no EXTINT line available." + #endif + attachInterrupt(K_MAX_PIN, endstop_ISR, CHANGE); + #endif + #if HAS_K_MIN + #if !AVAILABLE_EILINE(K_MIN_PIN) + #error "K_MIN_PIN has no EXTINT line available." + #endif + attachInterrupt(K_MIN_PIN, endstop_ISR, CHANGE); + #endif } diff --git a/Marlin/src/HAL/SAMD51/fastio.h b/Marlin/src/HAL/SAMD51/fastio.h index a95b7cac0ce9..79aede579044 100644 --- a/Marlin/src/HAL/SAMD51/fastio.h +++ b/Marlin/src/HAL/SAMD51/fastio.h @@ -131,7 +131,7 @@ */ #define PWM_PIN(P) (WITHIN(P, 2, 13) || WITHIN(P, 22, 23) || WITHIN(P, 44, 45) || P == 48) - // Return fullfilled ADCx->INPUTCTRL.reg + // Return fulfilled ADCx->INPUTCTRL.reg #define PIN_TO_INPUTCTRL(P) ( (PIN_TO_AIN(P) == 0) ? ADC_INPUTCTRL_MUXPOS_AIN0 \ : (PIN_TO_AIN(P) == 1) ? ADC_INPUTCTRL_MUXPOS_AIN1 \ : (PIN_TO_AIN(P) == 2) ? ADC_INPUTCTRL_MUXPOS_AIN2 \ diff --git a/Marlin/src/HAL/SAMD51/inc/SanityCheck.h b/Marlin/src/HAL/SAMD51/inc/SanityCheck.h index 5d610acac85c..38c6dd9e08de 100644 --- a/Marlin/src/HAL/SAMD51/inc/SanityCheck.h +++ b/Marlin/src/HAL/SAMD51/inc/SanityCheck.h @@ -31,7 +31,8 @@ #error "No custom SD drive cable defined for this board." #endif -#if defined(MAX6675_SCK_PIN) && defined(MAX6675_DO_PIN) && (MAX6675_SCK_PIN == SCK1 || MAX6675_DO_PIN == MISO1) +#if (defined(TEMP_0_SCK_PIN) && defined(TEMP_0_MISO_PIN) && (TEMP_0_SCK_PIN == SCK1 || TEMP_0_MISO_PIN == MISO1)) || \ + (defined(TEMP_1_SCK_PIN) && defined(TEMP_1_MISO_PIN) && (TEMP_1_SCK_PIN == SCK1 || TEMP_1_MISO_PIN == MISO1)) #error "OnBoard SPI BUS can't be shared with other devices." #endif @@ -50,3 +51,7 @@ #if ENABLED(FAST_PWM_FAN) || SPINDLE_LASER_FREQUENCY #error "Features requiring Hardware PWM (FAST_PWM_FAN, SPINDLE_LASER_FREQUENCY) are not yet supported on SAMD51." #endif + +#if ENABLED(POSTMORTEM_DEBUGGING) + #error "POSTMORTEM_DEBUGGING is not yet supported on AGCM4." +#endif diff --git a/Marlin/src/HAL/SAMD51/pinsDebug.h b/Marlin/src/HAL/SAMD51/pinsDebug.h index 81376db79add..f0a46fd7c567 100644 --- a/Marlin/src/HAL/SAMD51/pinsDebug.h +++ b/Marlin/src/HAL/SAMD51/pinsDebug.h @@ -26,6 +26,7 @@ #define PRINT_PORT(p) do{ SERIAL_ECHOPGM(" Port: "); sprintf_P(buffer, PSTR("%c%02ld"), 'A' + g_APinDescription[p].ulPort, g_APinDescription[p].ulPin); SERIAL_ECHO(buffer); }while (0) #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define GET_ARRAY_PIN(p) pin_array[p].pin #define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL) @@ -47,7 +48,7 @@ bool GET_PINMODE(int8_t pin) { // 1: output, 0: input void pwm_details(int32_t pin) { if (pwm_status(pin)) { //uint32_t chan = g_APinDescription[pin].ulPWMChannel TODO when fast pwm is operative; - //SERIAL_ECHOPAIR("PWM = ", duty); + //SERIAL_ECHOPGM("PWM = ", duty); } } diff --git a/Marlin/src/HAL/SAMD51/timers.cpp b/Marlin/src/HAL/SAMD51/timers.cpp index 5c55d324079a..7a535299db9a 100644 --- a/Marlin/src/HAL/SAMD51/timers.cpp +++ b/Marlin/src/HAL/SAMD51/timers.cpp @@ -107,7 +107,7 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) { tc->COUNT32.INTENCLR.reg = TC_INTENCLR_OVF; // disable overflow interrupt // TCn clock setup - const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceeded by TCC ones + const uint8_t clockID = GCLK_CLKCTRL_IDs[TCC_INST_NUM + timer_num]; // TC clock are preceded by TCC ones GCLK->PCHCTRL[clockID].bit.CHEN = false; SYNC(GCLK->PCHCTRL[clockID].bit.CHEN); GCLK->PCHCTRL[clockID].reg = GCLK_PCHCTRL_GEN_GCLK0 | GCLK_PCHCTRL_CHEN; // 120MHz startup code programmed diff --git a/Marlin/src/HAL/STM32/HAL.cpp b/Marlin/src/HAL/STM32/HAL.cpp index 06744f16b832..a04a24c1123c 100644 --- a/Marlin/src/HAL/STM32/HAL.cpp +++ b/Marlin/src/HAL/STM32/HAL.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "HAL.h" #include "usb_serial.h" @@ -29,7 +31,7 @@ #include "../shared/Delay.h" #ifdef USBCON - DefaultSerial MSerial(false, SerialUSB); + DefaultSerial1 MSerial0(false, SerialUSB); #endif #if ENABLED(SRAM_EEPROM_EMULATION) @@ -57,20 +59,15 @@ uint16_t HAL_adc_result; // Public functions // ------------------------ -// Needed for DELAY_NS() / DELAY_US() on CORTEX-M7 -#if (defined(__arm__) || defined(__thumb__)) && __CORTEX_M == 7 - // HAL pre-initialization task - // Force the preinit function to run between the premain() and main() function - // of the STM32 arduino core - __attribute__((constructor (102))) - void HAL_preinit() { - enableCycleCounter(); - } -#endif +TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial()); // HAL initialization task void HAL_init() { - FastIO_init(); + // Ensure F_CPU is a constant expression. + // If the compiler breaks here, it means that delay code that should compute at compile time will not work. + // So better safe than sorry here. + constexpr int cpuFreq = F_CPU; + UNUSED(cpuFreq); #if ENABLED(SDSUPPORT) && DISABLED(SDIO_SUPPORT) && (defined(SDSS) && SDSS != -1) OUT_WRITE(SDSS, HIGH); // Try to set SDSS inactive before any other SPI users start up @@ -94,8 +91,14 @@ void HAL_init() { USB_Hook_init(); #endif - #if HAS_SD_HOST_DRIVE - MSC_SD_init(); // Enable USB SD card access + TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the min serial handler + + TERN_(HAS_SD_HOST_DRIVE, MSC_SD_init()); // Enable USB SD card access + + #if PIN_EXISTS(USB_CONNECT) + OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection + delay(1000); // Give OS time to notice + WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING); #endif } @@ -134,6 +137,8 @@ uint8_t HAL_get_reset_source() { ; } +void HAL_reboot() { NVIC_SystemReset(); } + void _delay_ms(const int delay_ms) { delay(delay_ms); } extern "C" { @@ -148,8 +153,8 @@ extern "C" { void HAL_adc_start_conversion(const uint8_t adc_pin) { HAL_adc_result = analogRead(adc_pin); } uint16_t HAL_adc_get_result() { return HAL_adc_result; } -// Reset the system (to initiate a firmware flash) -void flashFirmware(const int16_t) { NVIC_SystemReset(); } +// Reset the system to initiate a firmware flash +void flashFirmware(const int16_t) { HAL_reboot(); } // Maple Compatibility volatile uint32_t systick_uptime_millis = 0; @@ -160,4 +165,4 @@ void HAL_SYSTICK_Callback() { if (systick_user_callback) systick_user_callback(); } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/HAL.h b/Marlin/src/HAL/STM32/HAL.h index 8f6c0a5990d8..a68e8a8c0e4a 100644 --- a/Marlin/src/HAL/STM32/HAL.h +++ b/Marlin/src/HAL/STM32/HAL.h @@ -37,54 +37,71 @@ #include +// +// Default graphical display delays +// +#define CPU_ST7920_DELAY_1 300 +#define CPU_ST7920_DELAY_2 40 +#define CPU_ST7920_DELAY_3 340 + +// +// Serial Ports +// #ifdef USBCON #include #include "../../core/serial_hook.h" - typedef ForwardSerial0Type< decltype(SerialUSB) > DefaultSerial; - extern DefaultSerial MSerial; + typedef ForwardSerial1Class< decltype(SerialUSB) > DefaultSerial1; + extern DefaultSerial1 MSerial0; #endif -// ------------------------ -// Defines -// ------------------------ #define _MSERIAL(X) MSerial##X #define MSERIAL(X) _MSERIAL(X) #if SERIAL_PORT == -1 - #define MYSERIAL0 MSerial + #define MYSERIAL1 MSerial0 #elif WITHIN(SERIAL_PORT, 1, 6) - #define MYSERIAL0 MSERIAL(SERIAL_PORT) + #define MYSERIAL1 MSERIAL(SERIAL_PORT) #else - #error "SERIAL_PORT must be -1 or from 1 to 6. Please update your configuration." + #error "SERIAL_PORT must be from 1 to 6. You can also use -1 if the board supports Native USB." #endif #ifdef SERIAL_PORT_2 #if SERIAL_PORT_2 == -1 - #define MYSERIAL1 MSerial + #define MYSERIAL2 MSerial0 #elif WITHIN(SERIAL_PORT_2, 1, 6) - #define MYSERIAL1 MSERIAL(SERIAL_PORT_2) + #define MYSERIAL2 MSERIAL(SERIAL_PORT_2) #else - #error "SERIAL_PORT_2 must be -1 or from 1 to 6. Please update your configuration." + #error "SERIAL_PORT_2 must be from 1 to 6. You can also use -1 if the board supports Native USB." + #endif +#endif + +#ifdef SERIAL_PORT_3 + #if SERIAL_PORT_3 == -1 + #define MYSERIAL3 MSerial0 + #elif WITHIN(SERIAL_PORT_3, 1, 6) + #define MYSERIAL3 MSERIAL(SERIAL_PORT_3) + #else + #error "SERIAL_PORT_3 must be from 1 to 6. You can also use -1 if the board supports Native USB." #endif #endif #ifdef MMU2_SERIAL_PORT #if MMU2_SERIAL_PORT == -1 - #define MMU2_SERIAL MSerial + #define MMU2_SERIAL MSerial0 #elif WITHIN(MMU2_SERIAL_PORT, 1, 6) #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) #else - #error "MMU2_SERIAL_PORT must be -1 or from 1 to 6. Please update your configuration." + #error "MMU2_SERIAL_PORT must be from 1 to 6. You can also use -1 if the board supports Native USB." #endif #endif #ifdef LCD_SERIAL_PORT #if LCD_SERIAL_PORT == -1 - #define LCD_SERIAL MSerial + #define LCD_SERIAL MSerial0 #elif WITHIN(LCD_SERIAL_PORT, 1, 6) #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT) #else - #error "LCD_SERIAL_PORT must be -1 or from 1 to 6. Please update your configuration." + #error "LCD_SERIAL_PORT must be from 1 to 6. You can also use -1 if the board supports Native USB." #endif #if HAS_DGUS_LCD #define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite() @@ -144,7 +161,7 @@ void HAL_clear_reset_source(); // Reset reason uint8_t HAL_get_reset_source(); -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); void _delay_ms(const int delay); @@ -166,8 +183,13 @@ static inline int freeMemory() { #define HAL_ANALOG_SELECT(pin) pinMode(pin, INPUT) +#ifdef ADC_RESOLUTION + #define HAL_ADC_RESOLUTION ADC_RESOLUTION +#else + #define HAL_ADC_RESOLUTION 12 +#endif + #define HAL_ADC_VREF 3.3 -#define HAL_ADC_RESOLUTION ADC_RESOLUTION // 12 #define HAL_START_ADC(pin) HAL_adc_start_conversion(pin) #define HAL_READ_ADC() HAL_adc_result #define HAL_ADC_READY() true @@ -185,6 +207,7 @@ uint16_t HAL_adc_get_result(); #ifdef STM32F1xx #define JTAG_DISABLE() AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_JTAGDISABLE) #define JTAGSWD_DISABLE() AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_DISABLE) + #define JTAGSWD_RESET() AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_RESET); // Reset: FULL SWD+JTAG #endif #define PLATFORM_M997_SUPPORT @@ -194,6 +217,7 @@ void flashFirmware(const int16_t); typedef void (*systickCallback_t)(void); void systick_attach_callback(systickCallback_t cb); void HAL_SYSTICK_Callback(); + extern volatile uint32_t systick_uptime_millis; #define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment diff --git a/Marlin/src/HAL/STM32/HAL_MinSerial.cpp b/Marlin/src/HAL/STM32/HAL_MinSerial.cpp new file mode 100644 index 000000000000..29826a890de4 --- /dev/null +++ b/Marlin/src/HAL/STM32/HAL_MinSerial.cpp @@ -0,0 +1,154 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * Copyright (c) 2017 Victor Perez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../platforms.h" + +#ifdef HAL_STM32 + +#include "../../inc/MarlinConfigPre.h" + +#if ENABLED(POSTMORTEM_DEBUGGING) + +#include "../shared/HAL_MinSerial.h" +#include "watchdog.h" + +/* Instruction Synchronization Barrier */ +#define isb() __asm__ __volatile__ ("isb" : : : "memory") + +/* Data Synchronization Barrier */ +#define dsb() __asm__ __volatile__ ("dsb" : : : "memory") + +// Dumb mapping over the registers of a USART device on STM32 +struct USARTMin { + volatile uint32_t SR; + volatile uint32_t DR; + volatile uint32_t BRR; + volatile uint32_t CR1; + volatile uint32_t CR2; +}; + +#if WITHIN(SERIAL_PORT, 1, 6) + // Depending on the CPU, the serial port is different for USART1 + static const uintptr_t regsAddr[] = { + TERN(STM32F1xx, 0x40013800, 0x40011000), // USART1 + 0x40004400, // USART2 + 0x40004800, // USART3 + 0x40004C00, // UART4_BASE + 0x40005000, // UART5_BASE + 0x40011400 // USART6 + }; + static USARTMin * regs = (USARTMin*)regsAddr[SERIAL_PORT - 1]; +#endif + +static void TXBegin() { + #if !WITHIN(SERIAL_PORT, 1, 6) + #warning "Using POSTMORTEM_DEBUGGING requires a physical U(S)ART hardware in case of severe error." + #warning "Disabling the severe error reporting feature currently because the used serial port is not a HW port." + #else + // This is common between STM32F1/STM32F2 and STM32F4 + const int nvicUART[] = { /* NVIC_USART1 */ 37, /* NVIC_USART2 */ 38, /* NVIC_USART3 */ 39, /* NVIC_UART4 */ 52, /* NVIC_UART5 */ 53, /* NVIC_USART6 */ 71 }; + int nvicIndex = nvicUART[SERIAL_PORT - 1]; + + struct NVICMin { + volatile uint32_t ISER[32]; + volatile uint32_t ICER[32]; + }; + + NVICMin *nvicBase = (NVICMin*)0xE000E100; + SBI32(nvicBase->ICER[nvicIndex >> 5], nvicIndex & 0x1F); + + // We NEED memory barriers to ensure Interrupts are actually disabled! + // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the ) + dsb(); + isb(); + + // Example for USART1 disable: (RCC->APB2ENR &= ~(RCC_APB2ENR_USART1EN)) + // Too difficult to reimplement here, let's query the STM32duino macro here + #if SERIAL_PORT == 1 + __HAL_RCC_USART1_CLK_DISABLE(); + __HAL_RCC_USART1_CLK_ENABLE(); + #elif SERIAL_PORT == 2 + __HAL_RCC_USART2_CLK_DISABLE(); + __HAL_RCC_USART2_CLK_ENABLE(); + #elif SERIAL_PORT == 3 + __HAL_RCC_USART3_CLK_DISABLE(); + __HAL_RCC_USART3_CLK_ENABLE(); + #elif SERIAL_PORT == 4 + __HAL_RCC_UART4_CLK_DISABLE(); // BEWARE: UART4 and not USART4 here + __HAL_RCC_UART4_CLK_ENABLE(); + #elif SERIAL_PORT == 5 + __HAL_RCC_UART5_CLK_DISABLE(); // BEWARE: UART5 and not USART5 here + __HAL_RCC_UART5_CLK_ENABLE(); + #elif SERIAL_PORT == 6 + __HAL_RCC_USART6_CLK_DISABLE(); + __HAL_RCC_USART6_CLK_ENABLE(); + #endif + + uint32_t brr = regs->BRR; + regs->CR1 = 0; // Reset the USART + regs->CR2 = 0; // 1 stop bit + + // If we don't touch the BRR (baudrate register), we don't need to recompute. + regs->BRR = brr; + + regs->CR1 = _BV(3) | _BV(13); // 8 bits, no parity, 1 stop bit (TE | UE) + #endif +} + +// A SW memory barrier, to ensure GCC does not overoptimize loops +#define sw_barrier() __asm__ volatile("": : :"memory"); +static void TX(char c) { + #if WITHIN(SERIAL_PORT, 1, 6) + constexpr uint32_t usart_sr_txe = _BV(7); + while (!(regs->SR & usart_sr_txe)) { + TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); + sw_barrier(); + } + regs->DR = c; + #else + // Let's hope a mystical guru will fix this, one day by writing interrupt-free USB CDC ACM code (or, at least, by polling the registers since interrupt will be queued but will never trigger) + // For now, it's completely lost to oblivion. + #endif +} + +void install_min_serial() { + HAL_min_serial_init = &TXBegin; + HAL_min_serial_out = &TX; +} + +#if DISABLED(DYNAMIC_VECTORTABLE) && DISABLED(STM32F0xx) // Cortex M0 can't jump to a symbol that's too far from the current function, so we work around this in exception_arm.cpp +extern "C" { + __attribute__((naked)) void JumpHandler_ASM() { + __asm__ __volatile__ ( + "b CommonHandler_ASM\n" + ); + } + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) HardFault_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) BusFault_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) UsageFault_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) MemManage_Handler(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) NMI_Handler(); +} +#endif + +#endif // POSTMORTEM_DEBUGGING +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/HAL_SPI.cpp b/Marlin/src/HAL/STM32/HAL_SPI.cpp index eef480777bb7..8ee476164785 100644 --- a/Marlin/src/HAL/STM32/HAL_SPI.cpp +++ b/Marlin/src/HAL/STM32/HAL_SPI.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -45,24 +47,36 @@ static SPISettings spiConfig; #include "../shared/Delay.h" void spiBegin(void) { - OUT_WRITE(SD_SS_PIN, HIGH); + #if PIN_EXISTS(SD_SS) + OUT_WRITE(SD_SS_PIN, HIGH); + #endif OUT_WRITE(SD_SCK_PIN, HIGH); SET_INPUT(SD_MISO_PIN); OUT_WRITE(SD_MOSI_PIN, HIGH); } - static uint16_t delay_STM32_soft_spi; + // Use function with compile-time value so we can actually reach the desired frequency + // Need to adjust this a little bit: on a 72MHz clock, we have 14ns/clock + // and we'll use ~3 cycles to jump to the method and going back, so it'll take ~40ns from the given clock here + #define CALLING_COST_NS (3U * 1000000000U) / (F_CPU) + void (*delaySPIFunc)(); + void delaySPI_125() { DELAY_NS(125 - CALLING_COST_NS); } + void delaySPI_250() { DELAY_NS(250 - CALLING_COST_NS); } + void delaySPI_500() { DELAY_NS(500 - CALLING_COST_NS); } + void delaySPI_1000() { DELAY_NS(1000 - CALLING_COST_NS); } + void delaySPI_2000() { DELAY_NS(2000 - CALLING_COST_NS); } + void delaySPI_4000() { DELAY_NS(4000 - CALLING_COST_NS); } void spiInit(uint8_t spiRate) { // Use datarates Marlin uses switch (spiRate) { - case SPI_FULL_SPEED: delay_STM32_soft_spi = 125; break; // desired: 8,000,000 actual: ~1.1M - case SPI_HALF_SPEED: delay_STM32_soft_spi = 125; break; // desired: 4,000,000 actual: ~1.1M - case SPI_QUARTER_SPEED:delay_STM32_soft_spi = 250; break; // desired: 2,000,000 actual: ~890K - case SPI_EIGHTH_SPEED: delay_STM32_soft_spi = 500; break; // desired: 1,000,000 actual: ~590K - case SPI_SPEED_5: delay_STM32_soft_spi = 1000; break; // desired: 500,000 actual: ~360K - case SPI_SPEED_6: delay_STM32_soft_spi = 2000; break; // desired: 250,000 actual: ~210K - default: delay_STM32_soft_spi = 4000; break; // desired: 125,000 actual: ~123K + case SPI_FULL_SPEED: delaySPIFunc = &delaySPI_125; break; // desired: 8,000,000 actual: ~1.1M + case SPI_HALF_SPEED: delaySPIFunc = &delaySPI_125; break; // desired: 4,000,000 actual: ~1.1M + case SPI_QUARTER_SPEED:delaySPIFunc = &delaySPI_250; break; // desired: 2,000,000 actual: ~890K + case SPI_EIGHTH_SPEED: delaySPIFunc = &delaySPI_500; break; // desired: 1,000,000 actual: ~590K + case SPI_SPEED_5: delaySPIFunc = &delaySPI_1000; break; // desired: 500,000 actual: ~360K + case SPI_SPEED_6: delaySPIFunc = &delaySPI_2000; break; // desired: 250,000 actual: ~210K + default: delaySPIFunc = &delaySPI_4000; break; // desired: 125,000 actual: ~123K } SPI.begin(); } @@ -75,9 +89,9 @@ static SPISettings spiConfig; WRITE(SD_SCK_PIN, LOW); WRITE(SD_MOSI_PIN, b & 0x80); - DELAY_NS(delay_STM32_soft_spi); + delaySPIFunc(); WRITE(SD_SCK_PIN, HIGH); - DELAY_NS(delay_STM32_soft_spi); + delaySPIFunc(); b <<= 1; // little setup time b |= (READ(SD_MISO_PIN) != 0); @@ -153,11 +167,9 @@ static SPISettings spiConfig; } spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0); - #if ENABLED(CUSTOM_SPI_PINS) - SPI.setMISO(SD_MISO_PIN); - SPI.setMOSI(SD_MOSI_PIN); - SPI.setSCLK(SD_SCK_PIN); - #endif + SPI.setMISO(SD_MISO_PIN); + SPI.setMOSI(SD_MOSI_PIN); + SPI.setSCLK(SD_SCK_PIN); SPI.begin(); } @@ -183,7 +195,7 @@ static SPISettings spiConfig; * * @details Uses DMA */ - void spiRead(uint8_t* buf, uint16_t nbyte) { + void spiRead(uint8_t *buf, uint16_t nbyte) { if (nbyte == 0) return; memset(buf, 0xFF, nbyte); SPI.transfer(buf, nbyte); @@ -208,7 +220,7 @@ static SPISettings spiConfig; * * @details Use DMA */ - void spiSendBlock(uint8_t token, const uint8_t* buf) { + void spiSendBlock(uint8_t token, const uint8_t *buf) { uint8_t rxBuf[512]; SPI.transfer(token); SPI.transfer((uint8_t*)buf, &rxBuf, 512); @@ -216,4 +228,4 @@ static SPISettings spiConfig; #endif // SOFTWARE_SPI -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/MarlinSPI.cpp b/Marlin/src/HAL/STM32/MarlinSPI.cpp index 5086b4178461..7078d210dc4c 100644 --- a/Marlin/src/HAL/STM32/MarlinSPI.cpp +++ b/Marlin/src/HAL/STM32/MarlinSPI.cpp @@ -19,7 +19,10 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../platforms.h" + +#if defined(HAL_STM32) && !defined(STM32H7xx) #include "MarlinSPI.h" @@ -165,4 +168,4 @@ uint8_t MarlinSPI::dmaSend(const void * transmitBuf, uint16_t length, bool minc) return 1; } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 && !STM32H7xx diff --git a/Marlin/src/HAL/STM32/MarlinSerial.cpp b/Marlin/src/HAL/STM32/MarlinSerial.cpp index cfb13f5bb561..37a8f40fd0b1 100644 --- a/Marlin/src/HAL/STM32/MarlinSerial.cpp +++ b/Marlin/src/HAL/STM32/MarlinSerial.cpp @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -16,7 +19,10 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" #include "MarlinSerial.h" @@ -28,7 +34,6 @@ #ifndef USART4 #define USART4 UART4 #endif - #ifndef USART5 #define USART5 UART5 #endif @@ -38,22 +43,38 @@ MSerialT MSerial ## ser_num (true, USART ## ser_num, &_rx_complete_irq_ ## ser_num); \ void _rx_complete_irq_ ## ser_num (serial_t * obj) { MSerial ## ser_num ._rx_complete_irq(obj); } -#define DECLARE_SERIAL_PORT_EXP(ser_num) DECLARE_SERIAL_PORT(ser_num) - -#if defined(SERIAL_PORT) && SERIAL_PORT >= 0 - DECLARE_SERIAL_PORT_EXP(SERIAL_PORT) +#if USING_HW_SERIAL1 + DECLARE_SERIAL_PORT(1) #endif - -#if defined(SERIAL_PORT_2) && SERIAL_PORT_2 >= 0 - DECLARE_SERIAL_PORT_EXP(SERIAL_PORT_2) +#if USING_HW_SERIAL2 + DECLARE_SERIAL_PORT(2) #endif - -#if defined(MMU2_SERIAL_PORT) && MMU2_SERIAL_PORT >= 0 - DECLARE_SERIAL_PORT_EXP(MMU2_SERIAL_PORT) +#if USING_HW_SERIAL3 + DECLARE_SERIAL_PORT(3) #endif - -#if defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT >= 0 - DECLARE_SERIAL_PORT_EXP(LCD_SERIAL_PORT) +#if USING_HW_SERIAL4 + DECLARE_SERIAL_PORT(4) +#endif +#if USING_HW_SERIAL5 + DECLARE_SERIAL_PORT(5) +#endif +#if USING_HW_SERIAL6 + DECLARE_SERIAL_PORT(6) +#endif +#if USING_HW_SERIAL7 + DECLARE_SERIAL_PORT(7) +#endif +#if USING_HW_SERIAL8 + DECLARE_SERIAL_PORT(8) +#endif +#if USING_HW_SERIAL9 + DECLARE_SERIAL_PORT(9) +#endif +#if USING_HW_SERIAL10 + DECLARE_SERIAL_PORT(10) +#endif +#if USING_HW_SERIALLP1 + DECLARE_SERIAL_PORT(LP1) #endif void MarlinSerial::begin(unsigned long baud, uint8_t config) { @@ -86,4 +107,4 @@ void MarlinSerial::_rx_complete_irq(serial_t *obj) { } } -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/MarlinSerial.h b/Marlin/src/HAL/STM32/MarlinSerial.h index 8cc4f0dd4cb8..bf861fb8a79a 100644 --- a/Marlin/src/HAL/STM32/MarlinSerial.h +++ b/Marlin/src/HAL/STM32/MarlinSerial.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -29,20 +32,20 @@ typedef void (*usart_rx_callback_t)(serial_t * obj); struct MarlinSerial : public HardwareSerial { - MarlinSerial(void* peripheral, usart_rx_callback_t rx_callback) : + MarlinSerial(void *peripheral, usart_rx_callback_t rx_callback) : HardwareSerial(peripheral), _rx_callback(rx_callback) { } void begin(unsigned long baud, uint8_t config); inline void begin(unsigned long baud) { begin(baud, SERIAL_8N1); } - void _rx_complete_irq(serial_t* obj); + void _rx_complete_irq(serial_t *obj); protected: usart_rx_callback_t _rx_callback; }; -typedef Serial0Type MSerialT; +typedef Serial1Class MSerialT; extern MSerialT MSerial1; extern MSerialT MSerial2; extern MSerialT MSerial3; diff --git a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp index fc9b960c1c49..54e1820c78e6 100644 --- a/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp +++ b/Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp @@ -19,7 +19,10 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -28,301 +31,296 @@ #include #include -#if NONE(STM32F103xE, STM32F103xG, STM32F4xx, STM32F7xx) - #error "ERROR - Only STM32F103xE, STM32F103xG, STM32F4xx or STM32F7xx CPUs supported" +// use local drivers +#if defined(STM32F103xE) || defined(STM32F103xG) + #include + #include +#elif defined(STM32F4xx) + #include + #include + #include + #include +#elif defined(STM32F7xx) + #include + #include + #include + #include +#else + #error "SDIO only supported with STM32F103xE, STM32F103xG, STM32F4xx, or STM32F7xx." #endif -#if HAS_SD_HOST_DRIVE - - // use USB drivers - - extern "C" { int8_t SD_MSC_Read(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len); - int8_t SD_MSC_Write(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len); - extern SD_HandleTypeDef hsd; - } - - bool SDIO_Init() { - return hsd.State == HAL_SD_STATE_READY; // return pass/fail status - } - - bool SDIO_ReadBlock(uint32_t block, uint8_t *src) { - int8_t status = SD_MSC_Read(0, (uint8_t*)src, block, 1); // read one 512 byte block - return (bool) status; - } +// Fixed +#define SDIO_D0_PIN PC8 +#define SDIO_D1_PIN PC9 +#define SDIO_D2_PIN PC10 +#define SDIO_D3_PIN PC11 +#define SDIO_CK_PIN PC12 +#define SDIO_CMD_PIN PD2 + +SD_HandleTypeDef hsd; // create SDIO structure +// F4 supports one DMA for RX and another for TX, but Marlin will never +// do read and write at same time, so we use the same DMA for both. +DMA_HandleTypeDef hdma_sdio; + +/* + SDIO_INIT_CLK_DIV is 118 + SDIO clock frequency is 48MHz / (TRANSFER_CLOCK_DIV + 2) + SDIO init clock frequency should not exceed 400KHz = 48MHz / (118 + 2) + + Default TRANSFER_CLOCK_DIV is 2 (118 / 40) + Default SDIO clock frequency is 48MHz / (2 + 2) = 12 MHz + This might be too fast for stable SDIO operations + + MKS Robin board seems to have stable SDIO with BusWide 1bit and ClockDiv 8 i.e. 4.8MHz SDIO clock frequency + Additional testing is required as there are clearly some 4bit initialization problems +*/ + +#ifndef USBD_OK + #define USBD_OK 0 +#endif - bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) { - int8_t status = SD_MSC_Write(0, (uint8_t*)src, block, 1); // write one 512 byte block - return (bool) status; - } +// Target Clock, configurable. Default is 18MHz, from STM32F1 +#ifndef SDIO_CLOCK + #define SDIO_CLOCK 18000000 // 18 MHz +#endif -#else // !USBD_USE_CDC_COMPOSITE +// SDIO retries, configurable. Default is 3, from STM32F1 +#ifndef SDIO_READ_RETRIES + #define SDIO_READ_RETRIES 3 +#endif - // use local drivers - #if defined(STM32F103xE) || defined(STM32F103xG) - #include - #include - #elif defined(STM32F4xx) - #include - #include - #include - #include - #elif defined(STM32F7xx) - #include - #include - #include - #include - #else - #error "ERROR - Only STM32F103xE, STM32F103xG, STM32F4xx or STM32F7xx CPUs supported" +// SDIO Max Clock (naming from STM Manual, don't change) +#define SDIOCLK 48000000 + +static uint32_t clock_to_divider(uint32_t clk) { + // limit the SDIO master clock to 8/3 of PCLK2. See STM32 Manuals + // Also limited to no more than 48Mhz (SDIOCLK). + const uint32_t pclk2 = HAL_RCC_GetPCLK2Freq(); + clk = min(clk, (uint32_t)(pclk2 * 8 / 3)); + clk = min(clk, (uint32_t)SDIOCLK); + // Round up divider, so we don't run the card over the speed supported, + // and subtract by 2, because STM32 will add 2, as written in the manual: + // SDIO_CK frequency = SDIOCLK / [CLKDIV + 2] + return pclk2 / clk + (pclk2 % clk != 0) - 2; +} + +void go_to_transfer_speed() { + /* Default SDIO peripheral configuration for SD card initialization */ + hsd.Init.ClockEdge = hsd.Init.ClockEdge; + hsd.Init.ClockBypass = hsd.Init.ClockBypass; + hsd.Init.ClockPowerSave = hsd.Init.ClockPowerSave; + hsd.Init.BusWide = hsd.Init.BusWide; + hsd.Init.HardwareFlowControl = hsd.Init.HardwareFlowControl; + hsd.Init.ClockDiv = clock_to_divider(SDIO_CLOCK); + + /* Initialize SDIO peripheral interface with default configuration */ + SDIO_Init(hsd.Instance, hsd.Init); +} + +void SD_LowLevel_Init(void) { + uint32_t tempreg; + + __HAL_RCC_GPIOC_CLK_ENABLE(); //enable GPIO clocks + __HAL_RCC_GPIOD_CLK_ENABLE(); //enable GPIO clocks + + GPIO_InitTypeDef GPIO_InitStruct; + + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = 1; //GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + + #if DISABLED(STM32F1xx) + GPIO_InitStruct.Alternate = GPIO_AF12_SDIO; #endif - SD_HandleTypeDef hsd; // create SDIO structure - - /* - SDIO_INIT_CLK_DIV is 118 - SDIO clock frequency is 48MHz / (TRANSFER_CLOCK_DIV + 2) - SDIO init clock frequency should not exceed 400KHz = 48MHz / (118 + 2) - - Default TRANSFER_CLOCK_DIV is 2 (118 / 40) - Default SDIO clock frequency is 48MHz / (2 + 2) = 12 MHz - This might be too fast for stable SDIO operations + GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_12; // D0 & SCK + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - MKS Robin board seems to have stable SDIO with BusWide 1bit and ClockDiv 8 i.e. 4.8MHz SDIO clock frequency - Additional testing is required as there are clearly some 4bit initialization problems - */ - - #ifndef USBD_OK - #define USBD_OK 0 + #if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // define D1-D3 only if have a four bit wide SDIO bus + GPIO_InitStruct.Pin = GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11; // D1-D3 + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); #endif - // Target Clock, configurable. Default is 18MHz, from STM32F1 - #ifndef SDIO_CLOCK - #define SDIO_CLOCK 18000000 /* 18 MHz */ - #endif + // Configure PD.02 CMD line + GPIO_InitStruct.Pin = GPIO_PIN_2; + HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); - // SDIO retries, configurable. Default is 3, from STM32F1 - #ifndef SDIO_READ_RETRIES - #define SDIO_READ_RETRIES 3 + // Setup DMA + #if defined(STM32F1xx) + hdma_sdio.Init.Mode = DMA_NORMAL; + hdma_sdio.Instance = DMA2_Channel4; + HAL_NVIC_EnableIRQ(DMA2_Channel4_5_IRQn); + #elif defined(STM32F4xx) + hdma_sdio.Init.Mode = DMA_PFCTRL; + hdma_sdio.Instance = DMA2_Stream3; + hdma_sdio.Init.Channel = DMA_CHANNEL_4; + hdma_sdio.Init.FIFOMode = DMA_FIFOMODE_ENABLE; + hdma_sdio.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL; + hdma_sdio.Init.MemBurst = DMA_MBURST_INC4; + hdma_sdio.Init.PeriphBurst = DMA_PBURST_INC4; + HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn); #endif - - // SDIO Max Clock (naming from STM Manual, don't change) - #define SDIOCLK 48000000 - - static uint32_t clock_to_divider(uint32_t clk) { - // limit the SDIO master clock to 8/3 of PCLK2. See STM32 Manuals - // Also limited to no more than 48Mhz (SDIOCLK). - const uint32_t pclk2 = HAL_RCC_GetPCLK2Freq(); - clk = min(clk, (uint32_t)(pclk2 * 8 / 3)); - clk = min(clk, (uint32_t)SDIOCLK); - // Round up divider, so we don't run the card over the speed supported, - // and subtract by 2, because STM32 will add 2, as written in the manual: - // SDIO_CK frequency = SDIOCLK / [CLKDIV + 2] - return pclk2 / clk + (pclk2 % clk != 0) - 2; - } - - void go_to_transfer_speed() { - SD_InitTypeDef Init; - - /* Default SDIO peripheral configuration for SD card initialization */ - Init.ClockEdge = hsd.Init.ClockEdge; - Init.ClockBypass = hsd.Init.ClockBypass; - Init.ClockPowerSave = hsd.Init.ClockPowerSave; - Init.BusWide = hsd.Init.BusWide; - Init.HardwareFlowControl = hsd.Init.HardwareFlowControl; - Init.ClockDiv = clock_to_divider(SDIO_CLOCK); - - /* Initialize SDIO peripheral interface with default configuration */ - SDIO_Init(hsd.Instance, Init); - } - - void SD_LowLevel_Init(void) { - uint32_t tempreg; - + HAL_NVIC_EnableIRQ(SDIO_IRQn); + hdma_sdio.Init.PeriphInc = DMA_PINC_DISABLE; + hdma_sdio.Init.MemInc = DMA_MINC_ENABLE; + hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; + hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; + hdma_sdio.Init.Priority = DMA_PRIORITY_LOW; + __HAL_LINKDMA(&hsd, hdmarx, hdma_sdio); + __HAL_LINKDMA(&hsd, hdmatx, hdma_sdio); + + #if defined(STM32F1xx) + __HAL_RCC_SDIO_CLK_ENABLE(); + __HAL_RCC_DMA2_CLK_ENABLE(); + #else + __HAL_RCC_SDIO_FORCE_RESET(); + delay(2); + __HAL_RCC_SDIO_RELEASE_RESET(); + delay(2); __HAL_RCC_SDIO_CLK_ENABLE(); - __HAL_RCC_GPIOC_CLK_ENABLE(); //enable GPIO clocks - __HAL_RCC_GPIOD_CLK_ENABLE(); //enable GPIO clocks - - GPIO_InitTypeDef GPIO_InitStruct; - - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = 1; //GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; - - #if DISABLED(STM32F1xx) - GPIO_InitStruct.Alternate = GPIO_AF12_SDIO; - #endif - - GPIO_InitStruct.Pin = GPIO_PIN_8 | GPIO_PIN_12; // D0 & SCK - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - #if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // define D1-D3 only if have a four bit wide SDIO bus - GPIO_InitStruct.Pin = GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11; // D1-D3 - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - #endif - - // Configure PD.02 CMD line - GPIO_InitStruct.Pin = GPIO_PIN_2; - HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); - - #if DISABLED(STM32F1xx) - // TODO: use __HAL_RCC_SDIO_RELEASE_RESET() and __HAL_RCC_SDIO_CLK_ENABLE(); - RCC->APB2RSTR &= ~RCC_APB2RSTR_SDIORST_Msk; // take SDIO out of reset - RCC->APB2ENR |= RCC_APB2RSTR_SDIORST_Msk; // enable SDIO clock - // Enable the DMA2 Clock - #endif - - //Initialize the SDIO (with initial <400Khz Clock) - tempreg = 0; //Reset value - tempreg |= SDIO_CLKCR_CLKEN; // Clock enabled - tempreg |= SDIO_INIT_CLK_DIV; // Clock Divider. Clock = 48000 / (118 + 2) = 400Khz - // Keep the rest at 0 => HW_Flow Disabled, Rising Clock Edge, Disable CLK ByPass, Bus Width = 0, Power save Disable - SDIO->CLKCR = tempreg; - - // Power up the SDIO - SDIO_PowerState_ON(SDIO); - } + __HAL_RCC_DMA2_FORCE_RESET(); + delay(2); + __HAL_RCC_DMA2_RELEASE_RESET(); + delay(2); + __HAL_RCC_DMA2_CLK_ENABLE(); + #endif - void HAL_SD_MspInit(SD_HandleTypeDef *hsd) { // application specific init - UNUSED(hsd); // Prevent unused argument(s) compilation warning - __HAL_RCC_SDIO_CLK_ENABLE(); // turn on SDIO clock + //Initialize the SDIO (with initial <400Khz Clock) + tempreg = 0; //Reset value + tempreg |= SDIO_CLKCR_CLKEN; // Clock enabled + tempreg |= SDIO_INIT_CLK_DIV; // Clock Divider. Clock = 48000 / (118 + 2) = 400Khz + // Keep the rest at 0 => HW_Flow Disabled, Rising Clock Edge, Disable CLK ByPass, Bus Width = 0, Power save Disable + SDIO->CLKCR = tempreg; + + // Power up the SDIO + SDIO_PowerState_ON(SDIO); + hsd.Instance = SDIO; +} + +void HAL_SD_MspInit(SD_HandleTypeDef *hsd) { // application specific init + UNUSED(hsd); // Prevent unused argument(s) compilation warning + __HAL_RCC_SDIO_CLK_ENABLE(); // turn on SDIO clock +} + +bool SDIO_Init() { + uint8_t retryCnt = SDIO_READ_RETRIES; + + bool status; + hsd.Instance = SDIO; + hsd.State = HAL_SD_STATE_RESET; + + SD_LowLevel_Init(); + + uint8_t retry_Cnt = retryCnt; + for (;;) { + TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); + status = (bool) HAL_SD_Init(&hsd); + if (!status) break; + if (!--retry_Cnt) return false; // return failing status if retries are exhausted } - bool SDIO_Init() { - uint8_t retryCnt = SDIO_READ_RETRIES; - - bool status; - hsd.Instance = SDIO; - hsd.State = HAL_SD_STATE_RESET; + go_to_transfer_speed(); - SD_LowLevel_Init(); - - uint8_t retry_Cnt = retryCnt; + #if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // go to 4 bit wide mode if pins are defined + retry_Cnt = retryCnt; for (;;) { TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); - status = (bool) HAL_SD_Init(&hsd); - if (!status) break; - if (!--retry_Cnt) return false; // return failing status if retries are exhausted + if (!HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B)) break; // some cards are only 1 bit wide so a pass here is not required + if (!--retry_Cnt) break; } - - go_to_transfer_speed(); - - #if PINS_EXIST(SDIO_D1, SDIO_D2, SDIO_D3) // go to 4 bit wide mode if pins are defined + if (!retry_Cnt) { // wide bus failed, go back to one bit wide mode + hsd.State = (HAL_SD_StateTypeDef) 0; // HAL_SD_STATE_RESET + SD_LowLevel_Init(); retry_Cnt = retryCnt; for (;;) { TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); - if (!HAL_SD_ConfigWideBusOperation(&hsd, SDIO_BUS_WIDE_4B)) break; // some cards are only 1 bit wide so a pass here is not required - if (!--retry_Cnt) break; - } - if (!retry_Cnt) { // wide bus failed, go back to one bit wide mode - hsd.State = (HAL_SD_StateTypeDef) 0; // HAL_SD_STATE_RESET - SD_LowLevel_Init(); - retry_Cnt = retryCnt; - for (;;) { - TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); - status = (bool) HAL_SD_Init(&hsd); - if (!status) break; - if (!--retry_Cnt) return false; // return failing status if retries are exhausted - } + status = (bool) HAL_SD_Init(&hsd); + if (!status) break; + if (!--retry_Cnt) return false; // return failing status if retries are exhausted } - #endif + go_to_transfer_speed(); + } + #endif - return true; - } - /* - void init_SDIO_pins(void) { - GPIO_InitTypeDef GPIO_InitStruct = {0}; - - // SDIO GPIO Configuration - // PC8 ------> SDIO_D0 - // PC12 ------> SDIO_CK - // PD2 ------> SDIO_CMD - - GPIO_InitStruct.Pin = GPIO_PIN_8; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF12_SDIO; - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + return true; +} - GPIO_InitStruct.Pin = GPIO_PIN_12; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF12_SDIO; - HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); +static bool SDIO_ReadWriteBlock_DMA(uint32_t block, const uint8_t *src, uint8_t *dst) { + if (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) return false; - GPIO_InitStruct.Pin = GPIO_PIN_2; - GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; - GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; - GPIO_InitStruct.Alternate = GPIO_AF12_SDIO; - HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); + TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); + + HAL_StatusTypeDef ret; + if (src) { + hdma_sdio.Init.Direction = DMA_MEMORY_TO_PERIPH; + HAL_DMA_Init(&hdma_sdio); + ret = HAL_SD_WriteBlocks_DMA(&hsd, (uint8_t *)src, block, 1); + } + else { + hdma_sdio.Init.Direction = DMA_PERIPH_TO_MEMORY; + HAL_DMA_Init(&hdma_sdio); + ret = HAL_SD_ReadBlocks_DMA(&hsd, (uint8_t *)dst, block, 1); } - */ - //bool SDIO_init() { return (bool) (SD_SDIO_Init() ? 1 : 0);} - //bool SDIO_Init_C() { return (bool) (SD_SDIO_Init() ? 1 : 0);} - bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) { - hsd.Instance = SDIO; - uint8_t retryCnt = SDIO_READ_RETRIES; + if (ret != HAL_OK) { + HAL_DMA_Abort_IT(&hdma_sdio); + HAL_DMA_DeInit(&hdma_sdio); + return false; + } - bool status; - for (;;) { - TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); - status = (bool) HAL_SD_ReadBlocks(&hsd, (uint8_t*)dst, block, 1, 1000); // read one 512 byte block with 500mS timeout - status |= (bool) HAL_SD_GetCardState(&hsd); // make sure all is OK - if (!status) break; // return passing status - if (!--retryCnt) break; // return failing status if retries are exhausted + millis_t timeout = millis() + 500; + // Wait the transfer + while (hsd.State != HAL_SD_STATE_READY) { + if (ELAPSED(millis(), timeout)) { + HAL_DMA_Abort_IT(&hdma_sdio); + HAL_DMA_DeInit(&hdma_sdio); + return false; } - return status; + } - /* - return (bool) ((status_read | status_card) ? 1 : 0); + while (__HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TC_FLAG_INDEX(&hdma_sdio)) != 0 + || __HAL_DMA_GET_FLAG(&hdma_sdio, __HAL_DMA_GET_TE_FLAG_INDEX(&hdma_sdio)) != 0) { /* nada */ } - if (SDIO_GetCardState() != SDIO_CARD_TRANSFER) return false; - if (blockAddress >= SdCard.LogBlockNbr) return false; - if ((0x03 & (uint32_t)data)) return false; // misaligned data + HAL_DMA_Abort_IT(&hdma_sdio); + HAL_DMA_DeInit(&hdma_sdio); - if (SdCard.CardType != CARD_SDHC_SDXC) { blockAddress *= 512U; } + timeout = millis() + 500; + while (HAL_SD_GetCardState(&hsd) != HAL_SD_CARD_TRANSFER) if (ELAPSED(millis(), timeout)) return false; - if (!SDIO_CmdReadSingleBlock(blockAddress)) { - SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS); - dma_disable(SDIO_DMA_DEV, SDIO_DMA_CHANNEL); - return false; - } + return true; +} - while (!SDIO_GET_FLAG(SDIO_STA_DATAEND | SDIO_STA_TRX_ERROR_FLAGS)) {} +bool SDIO_ReadBlock(uint32_t block, uint8_t *dst) { + uint8_t retries = SDIO_READ_RETRIES; + while (retries--) if (SDIO_ReadWriteBlock_DMA(block, nullptr, dst)) return true; + return false; +} - dma_disable(SDIO_DMA_DEV, SDIO_DMA_CHANNEL); +bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) { + uint8_t retries = SDIO_READ_RETRIES; + while (retries--) if (SDIO_ReadWriteBlock_DMA(block, src, nullptr)) return true; + return false; +} - if (SDIO->STA & SDIO_STA_RXDAVL) { - while (SDIO->STA & SDIO_STA_RXDAVL) (void)SDIO->FIFO; - SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS | SDIO_ICR_DATA_FLAGS); - return false; - } +bool SDIO_IsReady() { + return hsd.State == HAL_SD_STATE_READY; +} - if (SDIO_GET_FLAG(SDIO_STA_TRX_ERROR_FLAGS)) { - SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS | SDIO_ICR_DATA_FLAGS); - return false; - } - SDIO_CLEAR_FLAG(SDIO_ICR_CMD_FLAGS | SDIO_ICR_DATA_FLAGS); - */ +uint32_t SDIO_GetCardSize() { + return (uint32_t)(hsd.SdCard.BlockNbr) * (hsd.SdCard.BlockSize); +} - return true; - } +#if defined(STM32F1xx) + #define DMA_IRQ_HANDLER DMA2_Channel4_5_IRQHandler +#elif defined(STM32F4xx) + #define DMA_IRQ_HANDLER DMA2_Stream3_IRQHandler +#else + #error "Unknown STM32 architecture." +#endif - bool SDIO_WriteBlock(uint32_t block, const uint8_t *src) { - hsd.Instance = SDIO; - uint8_t retryCnt = SDIO_READ_RETRIES; - bool status; - for (;;) { - status = (bool) HAL_SD_WriteBlocks(&hsd, (uint8_t*)src, block, 1, 500); // write one 512 byte block with 500mS timeout - status |= (bool) HAL_SD_GetCardState(&hsd); // make sure all is OK - if (!status) break; // return passing status - if (!--retryCnt) break; // return failing status if retries are exhausted - } - return status; - } +extern "C" void SDIO_IRQHandler(void) { HAL_SD_IRQHandler(&hsd); } +extern "C" void DMA_IRQ_HANDLER(void) { HAL_DMA_IRQHandler(&hdma_sdio); } -#endif // !USBD_USE_CDC_COMPOSITE #endif // SDIO_SUPPORT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/Servo.cpp b/Marlin/src/HAL/STM32/Servo.cpp index 1cf117a05694..a00186e0e79e 100644 --- a/Marlin/src/HAL/STM32/Servo.cpp +++ b/Marlin/src/HAL/STM32/Servo.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -37,7 +39,7 @@ static_assert(COUNT(servoDelay) == NUM_SERVOS, "SERVO_DELAY must be an array NUM // This allows all timer interrupt priorities to be managed from a single location in the HAL. static uint32_t servo_interrupt_priority = NVIC_EncodePriority(NVIC_GetPriorityGrouping(), TIM_IRQ_PRIO, TIM_IRQ_SUBPRIO); -// This must be called after the STM32 Servo class has intialized the timer. +// This must be called after the STM32 Servo class has initialized the timer. // It may only be needed after the first call to attach(), but it is possible // that is is necessary after every detach() call. To be safe this is currently // called after every call to attach(). @@ -107,4 +109,4 @@ void libServo::setInterruptPriority(uint32_t preemptPriority, uint32_t subPriori } #endif // HAS_SERVOS -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp b/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp new file mode 100644 index 000000000000..f30b3dedb203 --- /dev/null +++ b/Marlin/src/HAL/STM32/eeprom_bl24cxx.cpp @@ -0,0 +1,85 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../platforms.h" + +#ifdef HAL_STM32 + +/** + * PersistentStore for Arduino-style EEPROM interface + * with simple implementations supplied by Marlin. + */ + +#include "../../inc/MarlinConfig.h" + +#if ENABLED(IIC_BL24CXX_EEPROM) + +#include "../shared/eeprom_if.h" +#include "../shared/eeprom_api.h" + +// +// PersistentStore +// + +#ifndef MARLIN_EEPROM_SIZE + #error "MARLIN_EEPROM_SIZE is required for IIC_BL24CXX_EEPROM." +#endif + +size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } + +bool PersistentStore::access_start() { eeprom_init(); return true; } +bool PersistentStore::access_finish() { return true; } + +bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; + while (size--) { + uint8_t v = *value; + uint8_t * const p = (uint8_t * const)pos; + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! + eeprom_write_byte(p, v); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes + if (eeprom_read_byte(p) != v) { + SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); + return true; + } + } + crc16(crc, &v, 1); + pos++; + value++; + } + return false; +} + +bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing/*=true*/) { + do { + uint8_t * const p = (uint8_t * const)pos; + uint8_t c = eeprom_read_byte(p); + if (writing) *value = c; + crc16(crc, &c, 1); + pos++; + value++; + } while (--size); + return false; +} + +#endif // IIC_BL24CXX_EEPROM +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_flash.cpp b/Marlin/src/HAL/STM32/eeprom_flash.cpp index 633a286dc8dd..252b057362c9 100644 --- a/Marlin/src/HAL/STM32/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32/eeprom_flash.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -28,6 +30,10 @@ #include "../shared/eeprom_api.h" +// Better: "utility/stm32_eeprom.h", but only after updating stm32duino to 2.0.0 +// Use EEPROM.h for compatibility, for now. +#include + /** * The STM32 HAL supports chips that deal with "pages" and some with "sectors" and some that * even have multiple "banks" of flash. @@ -48,7 +54,7 @@ #include "stm32_def.h" #define DEBUG_OUT ENABLED(EEPROM_CHITCHAT) - #include "src/core/debug_out.h" + #include "../../core/debug_out.h" #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x1000 // 4KB @@ -100,6 +106,8 @@ size_t PersistentStore::capacity() { return MARLIN_EEPROM_SIZE; } bool PersistentStore::access_start() { + EEPROM.begin(); // Avoid STM32 EEPROM.h warning (do nothing) + #if ENABLED(FLASH_EEPROM_LEVELING) if (current_slot == -1 || eeprom_data_written) { @@ -117,7 +125,7 @@ bool PersistentStore::access_start() { address += sizeof(uint32_t); } if (current_slot == -1) { - // We didn't find anything, so we'll just intialize to empty + // We didn't find anything, so we'll just initialize to empty for (int i = 0; i < MARLIN_EEPROM_SIZE; i++) ram_eeprom[i] = EMPTY_UINT8; current_slot = EEPROM_SLOTS; } @@ -125,7 +133,7 @@ bool PersistentStore::access_start() { // load current settings uint8_t *eeprom_data = (uint8_t *)SLOT_ADDRESS(current_slot); for (int i = 0; i < MARLIN_EEPROM_SIZE; i++) ram_eeprom[i] = eeprom_data[i]; - DEBUG_ECHOLNPAIR("EEPROM loaded from slot ", current_slot, "."); + DEBUG_ECHOLNPGM("EEPROM loaded from slot ", current_slot, "."); } eeprom_data_written = false; } @@ -171,9 +179,9 @@ bool PersistentStore::access_finish() { ENABLE_ISRS(); TERN_(HAS_PAUSE_SERVO_OUTPUT, RESUME_SERVO_OUTPUT()); if (status != HAL_OK) { - DEBUG_ECHOLNPAIR("HAL_FLASHEx_Erase=", status); - DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError()); - DEBUG_ECHOLNPAIR("SectorError=", SectorError); + DEBUG_ECHOLNPGM("HAL_FLASHEx_Erase=", status); + DEBUG_ECHOLNPGM("GetError=", HAL_FLASH_GetError()); + DEBUG_ECHOLNPGM("SectorError=", SectorError); LOCK_FLASH(); return false; } @@ -196,9 +204,9 @@ bool PersistentStore::access_finish() { offset += sizeof(uint32_t); } else { - DEBUG_ECHOLNPAIR("HAL_FLASH_Program=", status); - DEBUG_ECHOLNPAIR("GetError=", HAL_FLASH_GetError()); - DEBUG_ECHOLNPAIR("address=", address); + DEBUG_ECHOLNPGM("HAL_FLASH_Program=", status); + DEBUG_ECHOLNPGM("GetError=", HAL_FLASH_GetError()); + DEBUG_ECHOLNPGM("address=", address); success = false; break; } @@ -208,7 +216,7 @@ bool PersistentStore::access_finish() { if (success) { eeprom_data_written = false; - DEBUG_ECHOLNPAIR("EEPROM saved to slot ", current_slot, "."); + DEBUG_ECHOLNPGM("EEPROM saved to slot ", current_slot, "."); } return success; @@ -266,4 +274,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // FLASH_EEPROM_EMULATION -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_if_iic.cpp b/Marlin/src/HAL/STM32/eeprom_if_iic.cpp new file mode 100644 index 000000000000..ad8712c0c075 --- /dev/null +++ b/Marlin/src/HAL/STM32/eeprom_if_iic.cpp @@ -0,0 +1,56 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../platforms.h" + +#ifdef HAL_STM32 + +/** + * Platform-independent Arduino functions for I2C EEPROM. + * Enable USE_SHARED_EEPROM if not supplied by the framework. + */ + +#include "../../inc/MarlinConfig.h" + +#if ENABLED(IIC_BL24CXX_EEPROM) + +#include "../../libs/BL24CXX.h" +#include "../shared/eeprom_if.h" + +void eeprom_init() { BL24CXX::init(); } + +// ------------------------ +// Public functions +// ------------------------ + +void eeprom_write_byte(uint8_t *pos, uint8_t value) { + const unsigned eeprom_address = (unsigned)pos; + return BL24CXX::writeOneByte(eeprom_address, value); +} + +uint8_t eeprom_read_byte(uint8_t *pos) { + const unsigned eeprom_address = (unsigned)pos; + return BL24CXX::readOneByte(eeprom_address); +} + +#endif // IIC_BL24CXX_EEPROM +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_sdcard.cpp b/Marlin/src/HAL/STM32/eeprom_sdcard.cpp index f811468fb484..473b656f9a3c 100644 --- a/Marlin/src/HAL/STM32/eeprom_sdcard.cpp +++ b/Marlin/src/HAL/STM32/eeprom_sdcard.cpp @@ -19,7 +19,10 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../platforms.h" + +#ifdef HAL_STM32 /** * Implementation of EEPROM settings in SD Card @@ -88,4 +91,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, const size_t size, uin } #endif // SDCARD_EEPROM_EMULATION -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_sram.cpp b/Marlin/src/HAL/STM32/eeprom_sram.cpp index 135bcabde9aa..687e7f55c226 100644 --- a/Marlin/src/HAL/STM32/eeprom_sram.cpp +++ b/Marlin/src/HAL/STM32/eeprom_sram.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -65,4 +67,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // SRAM_EEPROM_EMULATION -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/eeprom_wired.cpp b/Marlin/src/HAL/STM32/eeprom_wired.cpp index ad54c12c471f..cf0468151e5e 100644 --- a/Marlin/src/HAL/STM32/eeprom_wired.cpp +++ b/Marlin/src/HAL/STM32/eeprom_wired.cpp @@ -20,7 +20,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -43,25 +45,22 @@ bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { uint8_t v = *value; - - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! uint8_t * const p = (uint8_t * const)pos; - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; } } - crc16(crc, &v, 1); pos++; value++; - }; - + } return false; } @@ -78,4 +77,4 @@ bool PersistentStore::read_data(int &pos, uint8_t *value, size_t size, uint16_t } #endif // USE_WIRED_EEPROM -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/endstop_interrupts.h b/Marlin/src/HAL/STM32/endstop_interrupts.h index fdff8cc644cd..90870881fe66 100644 --- a/Marlin/src/HAL/STM32/endstop_interrupts.h +++ b/Marlin/src/HAL/STM32/endstop_interrupts.h @@ -46,4 +46,10 @@ void setup_endstop_interrupts() { TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); } diff --git a/Marlin/src/HAL/STM32/fast_pwm.cpp b/Marlin/src/HAL/STM32/fast_pwm.cpp index 42eecb5e1a96..917e12615f1d 100644 --- a/Marlin/src/HAL/STM32/fast_pwm.cpp +++ b/Marlin/src/HAL/STM32/fast_pwm.cpp @@ -19,7 +19,10 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfigPre.h" @@ -56,4 +59,4 @@ void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255 } #endif // NEEDS_HARDWARE_PWM -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/fastio.cpp b/Marlin/src/HAL/STM32/fastio.cpp index 0d55579d8886..b34555b8c841 100644 --- a/Marlin/src/HAL/STM32/fastio.cpp +++ b/Marlin/src/HAL/STM32/fastio.cpp @@ -20,15 +20,17 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" -GPIO_TypeDef* FastIOPortMap[LastPort + 1]; +GPIO_TypeDef* FastIOPortMap[LastPort + 1] = { 0 }; void FastIO_init() { LOOP_L_N(i, NUM_DIGITAL_PINS) FastIOPortMap[STM_PORT(digitalPin[i])] = get_GPIO_Port(STM_PORT(digitalPin[i])); } -#endif +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/fastio.h b/Marlin/src/HAL/STM32/fastio.h index 17751c44dd8d..4a489544716f 100644 --- a/Marlin/src/HAL/STM32/fastio.h +++ b/Marlin/src/HAL/STM32/fastio.h @@ -38,6 +38,7 @@ extern GPIO_TypeDef * FastIOPortMap[]; // ------------------------ void FastIO_init(); // Must be called before using fast io macros +#define FASTIO_INIT() FastIO_init() // ------------------------ // Defines diff --git a/Marlin/src/HAL/STM32/inc/Conditionals_adv.h b/Marlin/src/HAL/STM32/inc/Conditionals_adv.h index 672d405d6b84..451c94f25d1f 100644 --- a/Marlin/src/HAL/STM32/inc/Conditionals_adv.h +++ b/Marlin/src/HAL/STM32/inc/Conditionals_adv.h @@ -21,6 +21,15 @@ */ #pragma once -#if defined(USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE) +#if BOTH(SDSUPPORT, USBD_USE_CDC_MSC) && DISABLED(NO_SD_HOST_DRIVE) #define HAS_SD_HOST_DRIVE 1 #endif + +// Fix F_CPU not being a compile-time constant in STSTM32 framework +#ifdef BOARD_F_CPU + #undef F_CPU + #define F_CPU BOARD_F_CPU +#endif + +// The Sensitive Pins array is not optimizable +#define RUNTIME_ONLY_ANALOG_TO_DIGITAL diff --git a/Marlin/src/HAL/STM32/inc/SanityCheck.h b/Marlin/src/HAL/STM32/inc/SanityCheck.h index 4df75a050558..0f1a2acaa41c 100644 --- a/Marlin/src/HAL/STM32/inc/SanityCheck.h +++ b/Marlin/src/HAL/STM32/inc/SanityCheck.h @@ -24,7 +24,7 @@ /** * Test STM32-specific configuration values for errors at compile-time. */ -//#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) +//#if ENABLED(SPINDLE_LASER_USE_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11) // #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector" //#endif @@ -47,11 +47,11 @@ #endif #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) - #error "SERIAL_STATS_MAX_RX_QUEUED is not supported on this platform." + #error "SERIAL_STATS_MAX_RX_QUEUED is not supported on STM32." #elif ENABLED(SERIAL_STATS_DROPPED_RX) - #error "SERIAL_STATS_DROPPED_RX is not supported on this platform." + #error "SERIAL_STATS_DROPPED_RX is not supported on STM32." #endif -#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) && NOT_TARGET(STM32F4xx, STM32F1xx) - #error "TFT_COLOR_UI, TFT_LVGL_UI and TFT_CLASSIC_UI are currently only supported on STM32F4 and STM32F1 hardware." +#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) && NOT_TARGET(STM32H7xx, STM32F4xx, STM32F1xx) + #error "TFT_COLOR_UI, TFT_LVGL_UI and TFT_CLASSIC_UI are currently only supported on STM32H7, STM32F4 and STM32F1 hardware." #endif diff --git a/Marlin/src/HAL/STM32/msc_sd.cpp b/Marlin/src/HAL/STM32/msc_sd.cpp index 63ce7808f183..4f85af0d446a 100644 --- a/Marlin/src/HAL/STM32/msc_sd.cpp +++ b/Marlin/src/HAL/STM32/msc_sd.cpp @@ -13,71 +13,88 @@ * along with this program. If not, see . * */ +#include "../platforms.h" + +#ifdef HAL_STM32 + #include "../../inc/MarlinConfigPre.h" -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && HAS_SD_HOST_DRIVE +#if HAS_SD_HOST_DRIVE -#include "msc_sd.h" #include "../shared/Marduino.h" +#include "msc_sd.h" #include "usbd_core.h" + +#include "../../sd/cardreader.h" + #include #include #define BLOCK_SIZE 512 #define PRODUCT_ID 0x29 -#include "../../sd/cardreader.h" - class Sd2CardUSBMscHandler : public USBMscHandler { public: + DiskIODriver* diskIODriver() { + #if ENABLED(MULTI_VOLUME) + #if SHARED_VOLUME_IS(SD_ONBOARD) + return &card.media_driver_sdcard; + #elif SHARED_VOLUME_IS(USB_FLASH_DRIVE) + return &card.media_driver_usbFlash; + #endif + #else + return card.diskIODriver(); + #endif + } + bool GetCapacity(uint32_t *pBlockNum, uint16_t *pBlockSize) { - *pBlockNum = card.getSd2Card().cardSize(); + *pBlockNum = diskIODriver()->cardSize(); *pBlockSize = BLOCK_SIZE; return true; } bool Write(uint8_t *pBuf, uint32_t blkAddr, uint16_t blkLen) { - auto sd2card = card.getSd2Card(); + auto sd2card = diskIODriver(); // single block if (blkLen == 1) { watchdog_refresh(); - sd2card.writeBlock(blkAddr, pBuf); + sd2card->writeBlock(blkAddr, pBuf); return true; } - // multi block optmization - sd2card.writeStart(blkAddr, blkLen); + // multi block optimization + sd2card->writeStart(blkAddr, blkLen); while (blkLen--) { watchdog_refresh(); - sd2card.writeData(pBuf); + sd2card->writeData(pBuf); pBuf += BLOCK_SIZE; } - sd2card.writeStop(); + sd2card->writeStop(); return true; } bool Read(uint8_t *pBuf, uint32_t blkAddr, uint16_t blkLen) { - auto sd2card = card.getSd2Card(); + auto sd2card = diskIODriver(); // single block if (blkLen == 1) { watchdog_refresh(); - sd2card.readBlock(blkAddr, pBuf); + sd2card->readBlock(blkAddr, pBuf); return true; } - // multi block optmization - sd2card.readStart(blkAddr); + // multi block optimization + sd2card->readStart(blkAddr); while (blkLen--) { watchdog_refresh(); - sd2card.readData(pBuf); + sd2card->readData(pBuf); pBuf += BLOCK_SIZE; } - sd2card.readStop(); + sd2card->readStop(); return true; } bool IsReady() { - return card.isMounted(); + return diskIODriver()->isReady(); } }; @@ -105,8 +122,9 @@ USBMscHandler *pSingleMscHandler = &usbMscHandler; void MSC_SD_init() { USBDevice.end(); delay(200); - USBDevice.begin(); USBDevice.registerMscHandlers(1, &pSingleMscHandler, Marlin_STORAGE_Inquirydata); + USBDevice.begin(); } -#endif // __STM32F1__ && HAS_SD_HOST_DRIVE +#endif // HAS_SD_HOST_DRIVE +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/pinsDebug.h b/Marlin/src/HAL/STM32/pinsDebug.h index 048f788e3d08..73d850fc4313 100644 --- a/Marlin/src/HAL/STM32/pinsDebug.h +++ b/Marlin/src/HAL/STM32/pinsDebug.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -109,6 +112,7 @@ const XrefInfo pin_xref[] PROGMEM = { #define VALID_PIN(ANUM) ((ANUM) >= 0 && (ANUM) < NUMBER_PINS_TOTAL) #define digitalRead_mod(Ard_num) extDigitalRead(Ard_num) // must use Arduino pin numbers when doing reads #define PRINT_PIN(Q) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define PRINT_PORT(ANUM) port_print(ANUM) #define DIGITAL_PIN_TO_ANALOG_PIN(ANUM) -1 // will report analog pin number in the print port routine #define GET_PIN_MAP_PIN_M43(Index) pin_xref[Index].Ard_num @@ -236,7 +240,7 @@ void pwm_details(const pin_t Ard_num) { if (over_7) pin_number -= 8; uint8_t alt_func = (alt_all >> (4 * pin_number)) & 0x0F; - SERIAL_ECHOPAIR("Alt Function: ", alt_func); + SERIAL_ECHOPGM("Alt Function: ", alt_func); if (alt_func < 10) SERIAL_CHAR(' '); SERIAL_ECHOPGM(" - "); switch (alt_func) { diff --git a/Marlin/src/HAL/STM32/spi_pins.h b/Marlin/src/HAL/STM32/spi_pins.h index e2052c5c7704..7f341a8c253f 100644 --- a/Marlin/src/HAL/STM32/spi_pins.h +++ b/Marlin/src/HAL/STM32/spi_pins.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/Marlin/src/HAL/STM32/tft/gt911.cpp b/Marlin/src/HAL/STM32/tft/gt911.cpp new file mode 100644 index 000000000000..92e14edb2057 --- /dev/null +++ b/Marlin/src/HAL/STM32/tft/gt911.cpp @@ -0,0 +1,204 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../../platforms.h" + +#ifdef HAL_STM32 + +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(TFT_TOUCH_DEVICE_GT911) + +#include "gt911.h" +#include "pinconfig.h" + +SW_IIC::SW_IIC(uint16_t sda, uint16_t scl) { + scl_pin = scl; + sda_pin = sda; +} + +// Software I2C hardware io init +void SW_IIC::init() { + OUT_WRITE(scl_pin, HIGH); + OUT_WRITE(sda_pin, HIGH); +} + +// Software I2C start signal +void SW_IIC::start() { + write_sda(HIGH); // SDA = 1 + write_scl(HIGH); // SCL = 1 + iic_delay(2); + write_sda(LOW); // SDA = 0 + iic_delay(1); + write_scl(LOW); // SCL = 0 // keep SCL low, avoid false stop caused by level jump caused by SDA switching IN/OUT +} + +// Software I2C stop signal +void SW_IIC::stop() { + write_scl(LOW); // SCL = 0 + iic_delay(2); + write_sda(LOW); // SDA = 0 + iic_delay(2); + write_scl(HIGH); // SCL = 1 + iic_delay(2); + write_sda(HIGH); // SDA = 1 +} + +// Software I2C sends ACK or NACK signal +void SW_IIC::send_ack(bool ack) { + write_sda(ack ? LOW : HIGH); // SDA = !ack + iic_delay(2); + write_scl(HIGH); // SCL = 1 + iic_delay(2); + write_scl(LOW); // SCL = 0 +} + +// Software I2C read ACK or NACK signal +bool SW_IIC::read_ack() { + bool error = 0; + set_sda_in(); + + iic_delay(2); + + write_scl(HIGH); // SCL = 1 + error = read_sda(); + + iic_delay(2); + + write_scl(LOW); // SCL = 0 + + set_sda_out(); + return error; +} + +void SW_IIC::send_byte(uint8_t txd) { + LOOP_L_N(i, 8) { + write_sda(txd & 0x80); // write data bit + txd <<= 1; + iic_delay(1); + write_scl(HIGH); // SCL = 1 + iic_delay(2); + write_scl(LOW); // SCL = 0 + iic_delay(1); + } + + read_ack(); // wait ack +} + +uint8_t SW_IIC::read_byte(bool ack) { + uint8_t data = 0; + + set_sda_in(); + LOOP_L_N(i, 8) { + write_scl(HIGH); // SCL = 1 + iic_delay(1); + data <<= 1; + if (read_sda()) data++; + write_scl(LOW); // SCL = 0 + iic_delay(2); + } + set_sda_out(); + + send_ack(ack); + + return data; +} + +GT911_REG_MAP GT911::reg; +SW_IIC GT911::sw_iic = SW_IIC(GT911_SW_I2C_SDA_PIN, GT911_SW_I2C_SCL_PIN); + +void GT911::write_reg(uint16_t reg, uint8_t reg_len, uint8_t* w_data, uint8_t w_len) { + sw_iic.start(); + sw_iic.send_byte(gt911_slave_address); // Set IIC Slave address + LOOP_L_N(i, reg_len) { // Set reg address + uint8_t r = (reg >> (8 * (reg_len - 1 - i))) & 0xFF; + sw_iic.send_byte(r); + } + + LOOP_L_N(i, w_len) { // Write data to reg + sw_iic.send_byte(w_data[i]); + } + sw_iic.stop(); +} + +void GT911::read_reg(uint16_t reg, uint8_t reg_len, uint8_t* r_data, uint8_t r_len) { + sw_iic.start(); + sw_iic.send_byte(gt911_slave_address); // Set IIC Slave address + LOOP_L_N(i, reg_len) { // Set reg address + uint8_t r = (reg >> (8 * (reg_len - 1 - i))) & 0xFF; + sw_iic.send_byte(r); + } + + sw_iic.start(); + sw_iic.send_byte(gt911_slave_address + 1); // Set read mode + + LOOP_L_N(i, r_len) { + r_data[i] = sw_iic.read_byte(1); // Read data from reg + } + sw_iic.stop(); +} + +void GT911::Init() { + OUT_WRITE(GT911_RST_PIN, LOW); + OUT_WRITE(GT911_INT_PIN, LOW); + delay(20); + WRITE(GT911_RST_PIN, HIGH); + SET_INPUT(GT911_INT_PIN); + + sw_iic.init(); + + uint8_t clear_reg = 0x0000; + write_reg(0x814E, 2, &clear_reg, 2); // Reset to 0 for start +} + +bool GT911::getFirstTouchPoint(int16_t *x, int16_t *y) { + read_reg(0x814E, 2, ®.REG.status, 1); + + if (reg.REG.status & 0x80) { + uint8_t clear_reg = 0x00; + write_reg(0x814E, 2, &clear_reg, 1); // Reset to 0 for start + read_reg(0x8150, 2, reg.map + 2, 8 * (reg.REG.status & 0x0F)); + + // First touch point + *x = ((reg.REG.point[0].xh & 0x0F) << 8) | reg.REG.point[0].xl; + *y = ((reg.REG.point[0].yh & 0x0F) << 8) | reg.REG.point[0].yl; + return true; + } + return false; +} + +bool GT911::getPoint(int16_t *x, int16_t *y) { + static bool touched = 0; + static int16_t read_x = 0, read_y = 0; + static millis_t next_time = 0; + + if (ELAPSED(millis(), next_time)) { + touched = getFirstTouchPoint(&read_x, &read_y); + next_time = millis() + 20; + } + + *x = read_x; + *y = read_y; + return touched; +} + +#endif // TFT_TOUCH_DEVICE_GT911 +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/gt911.h b/Marlin/src/HAL/STM32/tft/gt911.h new file mode 100644 index 000000000000..752a554d98ed --- /dev/null +++ b/Marlin/src/HAL/STM32/tft/gt911.h @@ -0,0 +1,120 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../inc/MarlinConfig.h" + +#define GT911_SLAVE_ADDRESS 0xBA + +#if !PIN_EXISTS(GT911_RST) + #error "GT911_RST_PIN is not defined." +#elif !PIN_EXISTS(GT911_INT) + #error "GT911_INT_PIN is not defined." +#elif !PIN_EXISTS(GT911_SW_I2C_SCL) + #error "GT911_SW_I2C_SCL_PIN is not defined." +#elif !PIN_EXISTS(GT911_SW_I2C_SDA) + #error "GT911_SW_I2C_SDA_PIN is not defined." +#endif + +class SW_IIC { + private: + uint16_t scl_pin; + uint16_t sda_pin; + void write_scl(bool level) + { + WRITE(scl_pin, level); + } + void write_sda(bool level) + { + WRITE(sda_pin, level); + } + bool read_sda() + { + return READ(sda_pin); + } + void set_sda_out() + { + SET_OUTPUT(sda_pin); + } + void set_sda_in() + { + SET_INPUT_PULLUP(sda_pin); + } + static void iic_delay(uint8_t t) + { + delayMicroseconds(t); + } + + public: + SW_IIC(uint16_t sda, uint16_t scl); + // setSCL/SDA have to be called before begin() + void setSCL(uint16_t scl) + { + scl_pin = scl; + }; + void setSDA(uint16_t sda) + { + sda_pin = sda; + }; + void init(); // Initialize the IO port of IIC + void start(); // Send IIC start signal + void stop(); // Send IIC stop signal + void send_byte(uint8_t txd); // IIC sends a byte + uint8_t read_byte(bool ack); // IIC reads a byte + void send_ack(bool ack); // IIC sends ACK or NACK signal + bool read_ack(); +}; + +typedef struct __attribute__((__packed__)) { + uint8_t xl; + uint8_t xh; + uint8_t yl; + uint8_t yh; + uint8_t sizel; + uint8_t sizeh; + uint8_t reserved; + uint8_t track_id; +} GT911_POINT; + +typedef union __attribute__((__packed__)) { + uint8_t map[42]; + struct { + uint8_t status; // 0x814E + uint8_t track_id; // 0x814F + + GT911_POINT point[5]; // [0]:0x8150 - 0x8157 / [1]:0x8158 - 0x815F / [2]:0x8160 - 0x8167 / [3]:0x8168 - 0x816F / [4]:0x8170 - 0x8177 + } REG; +} GT911_REG_MAP; + +class GT911 { + private: + static const uint8_t gt911_slave_address = GT911_SLAVE_ADDRESS; + static GT911_REG_MAP reg; + static SW_IIC sw_iic; + static void write_reg(uint16_t reg, uint8_t reg_len, uint8_t* w_data, uint8_t w_len); + static void read_reg(uint16_t reg, uint8_t reg_len, uint8_t* r_data, uint8_t r_len); + + public: + static void Init(); + static bool getFirstTouchPoint(int16_t *x, int16_t *y); + static bool getPoint(int16_t *x, int16_t *y); +}; diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index 87ca2dbbe18a..e68b3c126939 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -19,7 +19,10 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../../platforms.h" + +#ifdef HAL_STM32 #include "../../../inc/MarlinConfig.h" @@ -34,16 +37,6 @@ LCD_CONTROLLER_TypeDef *TFT_FSMC::LCD; void TFT_FSMC::Init() { uint32_t controllerAddress; - - #if PIN_EXISTS(TFT_RESET) - OUT_WRITE(TFT_RESET_PIN, HIGH); - HAL_Delay(100); - #endif - - #if PIN_EXISTS(TFT_BACKLIGHT) - OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); - #endif - FSMC_NORSRAM_TimingTypeDef Timing, ExtTiming; uint32_t NSBank = (uint32_t)pinmap_peripheral(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS); @@ -178,4 +171,4 @@ void TFT_FSMC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Cou } #endif // HAS_FSMC_TFT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp b/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp new file mode 100644 index 000000000000..66cfd65995dd --- /dev/null +++ b/Marlin/src/HAL/STM32/tft/tft_ltdc.cpp @@ -0,0 +1,389 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../../platforms.h" + +#ifdef HAL_STM32 + +#include "../../../inc/MarlinConfig.h" + +#if HAS_LTDC_TFT + +#include "tft_ltdc.h" +#include "pinconfig.h" + +#define FRAME_BUFFER_ADDRESS 0XC0000000 // SDRAM address + +#define SDRAM_TIMEOUT ((uint32_t)0xFFFF) +#define REFRESH_COUNT ((uint32_t)0x02A5) // SDRAM refresh counter + +#define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000) +#define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001) +#define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002) +#define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004) +#define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000) +#define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008) +#define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020) +#define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030) +#define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000) +#define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000) +#define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200) + +void SDRAM_Initialization_Sequence(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command) { + + __IO uint32_t tmpmrd =0; + /* Step 1: Configure a clock configuration enable command */ + Command->CommandMode = FMC_SDRAM_CMD_CLK_ENABLE; + Command->CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; + Command->AutoRefreshNumber = 1; + Command->ModeRegisterDefinition = 0; + /* Send the command */ + HAL_SDRAM_SendCommand(hsdram, Command, SDRAM_TIMEOUT); + + /* Step 2: Insert 100 us minimum delay */ + /* Inserted delay is equal to 1 ms due to systick time base unit (ms) */ + HAL_Delay(1); + + /* Step 3: Configure a PALL (precharge all) command */ + Command->CommandMode = FMC_SDRAM_CMD_PALL; + Command->CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; + Command->AutoRefreshNumber = 1; + Command->ModeRegisterDefinition = 0; + /* Send the command */ + HAL_SDRAM_SendCommand(hsdram, Command, SDRAM_TIMEOUT); + + /* Step 4 : Configure a Auto-Refresh command */ + Command->CommandMode = FMC_SDRAM_CMD_AUTOREFRESH_MODE; + Command->CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; + Command->AutoRefreshNumber = 8; + Command->ModeRegisterDefinition = 0; + /* Send the command */ + HAL_SDRAM_SendCommand(hsdram, Command, SDRAM_TIMEOUT); + + /* Step 5: Program the external memory mode register */ + tmpmrd = (uint32_t)(SDRAM_MODEREG_BURST_LENGTH_1 | + SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL | + SDRAM_MODEREG_CAS_LATENCY_2 | + SDRAM_MODEREG_OPERATING_MODE_STANDARD | + SDRAM_MODEREG_WRITEBURST_MODE_SINGLE); + + Command->CommandMode = FMC_SDRAM_CMD_LOAD_MODE; + Command->CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; + Command->AutoRefreshNumber = 1; + Command->ModeRegisterDefinition = tmpmrd; + /* Send the command */ + HAL_SDRAM_SendCommand(hsdram, Command, SDRAM_TIMEOUT); + + /* Step 6: Set the refresh rate counter */ + /* Set the device refresh rate */ + HAL_SDRAM_ProgramRefreshRate(hsdram, REFRESH_COUNT); +} + +void SDRAM_Config() { + + __HAL_RCC_SYSCFG_CLK_ENABLE(); + __HAL_RCC_FMC_CLK_ENABLE(); + + SDRAM_HandleTypeDef hsdram; + FMC_SDRAM_TimingTypeDef SDRAM_Timing; + FMC_SDRAM_CommandTypeDef command; + + /* Configure the SDRAM device */ + hsdram.Instance = FMC_SDRAM_DEVICE; + hsdram.Init.SDBank = FMC_SDRAM_BANK1; + hsdram.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_9; + hsdram.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_13; + hsdram.Init.MemoryDataWidth = FMC_SDRAM_MEM_BUS_WIDTH_16; + hsdram.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4; + hsdram.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_2; + hsdram.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE; + hsdram.Init.SDClockPeriod = FMC_SDRAM_CLOCK_PERIOD_2; + hsdram.Init.ReadBurst = FMC_SDRAM_RBURST_ENABLE; + hsdram.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0; + + /* Timing configuration for 100Mhz as SDRAM clock frequency (System clock is up to 200Mhz) */ + SDRAM_Timing.LoadToActiveDelay = 2; + SDRAM_Timing.ExitSelfRefreshDelay = 8; + SDRAM_Timing.SelfRefreshTime = 6; + SDRAM_Timing.RowCycleDelay = 6; + SDRAM_Timing.WriteRecoveryTime = 2; + SDRAM_Timing.RPDelay = 2; + SDRAM_Timing.RCDDelay = 2; + + /* Initialize the SDRAM controller */ + if (HAL_SDRAM_Init(&hsdram, &SDRAM_Timing) != HAL_OK) + { + /* Initialization Error */ + } + + /* Program the SDRAM external device */ + SDRAM_Initialization_Sequence(&hsdram, &command); +} + +void LTDC_Config() { + + __HAL_RCC_LTDC_CLK_ENABLE(); + __HAL_RCC_DMA2D_CLK_ENABLE(); + + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct; + + /* The PLL3R is configured to provide the LTDC PCLK clock */ + /* PLL3_VCO Input = HSE_VALUE / PLL3M = 25Mhz / 5 = 5 Mhz */ + /* PLL3_VCO Output = PLL3_VCO Input * PLL3N = 5Mhz * 160 = 800 Mhz */ + /* PLLLCDCLK = PLL3_VCO Output/PLL3R = 800Mhz / 16 = 50Mhz */ + /* LTDC clock frequency = PLLLCDCLK = 50 Mhz */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LTDC; + PeriphClkInitStruct.PLL3.PLL3M = 5; + PeriphClkInitStruct.PLL3.PLL3N = 160; + PeriphClkInitStruct.PLL3.PLL3FRACN = 0; + PeriphClkInitStruct.PLL3.PLL3P = 2; + PeriphClkInitStruct.PLL3.PLL3Q = 2; + PeriphClkInitStruct.PLL3.PLL3R = (800 / LTDC_LCD_CLK); + PeriphClkInitStruct.PLL3.PLL3VCOSEL = RCC_PLL3VCOWIDE; + PeriphClkInitStruct.PLL3.PLL3RGE = RCC_PLL3VCIRANGE_2; + HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct); + + LTDC_HandleTypeDef hltdc_F; + LTDC_LayerCfgTypeDef pLayerCfg; + + /* LTDC Initialization -------------------------------------------------------*/ + + /* Polarity configuration */ + /* Initialize the horizontal synchronization polarity as active low */ + hltdc_F.Init.HSPolarity = LTDC_HSPOLARITY_AL; + /* Initialize the vertical synchronization polarity as active low */ + hltdc_F.Init.VSPolarity = LTDC_VSPOLARITY_AL; + /* Initialize the data enable polarity as active low */ + hltdc_F.Init.DEPolarity = LTDC_DEPOLARITY_AL; + /* Initialize the pixel clock polarity as input pixel clock */ + hltdc_F.Init.PCPolarity = LTDC_PCPOLARITY_IPC; + + /* Timing configuration */ + hltdc_F.Init.HorizontalSync = (LTDC_LCD_HSYNC - 1); + hltdc_F.Init.VerticalSync = (LTDC_LCD_VSYNC - 1); + hltdc_F.Init.AccumulatedHBP = (LTDC_LCD_HSYNC + LTDC_LCD_HBP - 1); + hltdc_F.Init.AccumulatedVBP = (LTDC_LCD_VSYNC + LTDC_LCD_VBP - 1); + hltdc_F.Init.AccumulatedActiveH = (TFT_HEIGHT + LTDC_LCD_VSYNC + LTDC_LCD_VBP - 1); + hltdc_F.Init.AccumulatedActiveW = (TFT_WIDTH + LTDC_LCD_HSYNC + LTDC_LCD_HBP - 1); + hltdc_F.Init.TotalHeigh = (TFT_HEIGHT + LTDC_LCD_VSYNC + LTDC_LCD_VBP + LTDC_LCD_VFP - 1); + hltdc_F.Init.TotalWidth = (TFT_WIDTH + LTDC_LCD_HSYNC + LTDC_LCD_HBP + LTDC_LCD_HFP - 1); + + /* Configure R,G,B component values for LCD background color : all black background */ + hltdc_F.Init.Backcolor.Blue = 0; + hltdc_F.Init.Backcolor.Green = 0; + hltdc_F.Init.Backcolor.Red = 0; + + hltdc_F.Instance = LTDC; + + /* Layer0 Configuration ------------------------------------------------------*/ + + /* Windowing configuration */ + pLayerCfg.WindowX0 = 0; + pLayerCfg.WindowX1 = TFT_WIDTH; + pLayerCfg.WindowY0 = 0; + pLayerCfg.WindowY1 = TFT_HEIGHT; + + /* Pixel Format configuration*/ + pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565; + + /* Start Address configuration : frame buffer is located at SDRAM memory */ + pLayerCfg.FBStartAdress = (uint32_t)(FRAME_BUFFER_ADDRESS); + + /* Alpha constant (255 == totally opaque) */ + pLayerCfg.Alpha = 255; + + /* Default Color configuration (configure A,R,G,B component values) : no background color */ + pLayerCfg.Alpha0 = 0; /* fully transparent */ + pLayerCfg.Backcolor.Blue = 0; + pLayerCfg.Backcolor.Green = 0; + pLayerCfg.Backcolor.Red = 0; + + /* Configure blending factors */ + pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA; + pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA; + + /* Configure the number of lines and number of pixels per line */ + pLayerCfg.ImageWidth = TFT_WIDTH; + pLayerCfg.ImageHeight = TFT_HEIGHT; + + /* Configure the LTDC */ + if (HAL_LTDC_Init(&hltdc_F) != HAL_OK) + { + /* Initialization Error */ + } + + /* Configure the Layer*/ + if (HAL_LTDC_ConfigLayer(&hltdc_F, &pLayerCfg, 0) != HAL_OK) + { + /* Initialization Error */ + } +} + +uint16_t TFT_LTDC::x_min = 0; +uint16_t TFT_LTDC::x_max = 0; +uint16_t TFT_LTDC::y_min = 0; +uint16_t TFT_LTDC::y_max = 0; +uint16_t TFT_LTDC::x_cur = 0; +uint16_t TFT_LTDC::y_cur = 0; +uint8_t TFT_LTDC::reg = 0; +volatile uint16_t* TFT_LTDC::framebuffer = (volatile uint16_t* )FRAME_BUFFER_ADDRESS; + +void TFT_LTDC::Init() { + + // SDRAM pins init + for (uint16_t i = 0; PinMap_SDRAM[i].pin != NC; i++) + pinmap_pinout(PinMap_SDRAM[i].pin, PinMap_SDRAM); + + // SDRAM peripheral config + SDRAM_Config(); + + // LTDC pins init + for (uint16_t i = 0; PinMap_LTDC[i].pin != NC; i++) + pinmap_pinout(PinMap_LTDC[i].pin, PinMap_LTDC); + + // LTDC peripheral config + LTDC_Config(); +} + +uint32_t TFT_LTDC::GetID() { + return 0xABAB; +} + +uint32_t TFT_LTDC::ReadID(tft_data_t Reg) { + return 0xABAB; +} + +bool TFT_LTDC::isBusy() { + return false; +} + +uint16_t TFT_LTDC::ReadPoint(uint16_t x, uint16_t y) { + return framebuffer[(TFT_WIDTH * y) + x]; +} + +void TFT_LTDC::DrawPoint(uint16_t x, uint16_t y, uint16_t color) { + framebuffer[(TFT_WIDTH * y) + x] = color; +} + +void TFT_LTDC::DrawRect(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t color) { + + if (sx == ex || sy == ey) return; + + uint16_t offline = TFT_WIDTH - (ex - sx); + uint32_t addr = (uint32_t)&framebuffer[(TFT_WIDTH * sy) + sx]; + + CBI(DMA2D->CR, 0); + DMA2D->CR = 3 << 16; + DMA2D->OPFCCR = 0X02; + DMA2D->OOR = offline; + DMA2D->OMAR = addr; + DMA2D->NLR = (ey - sy) | ((ex - sx) << 16); + DMA2D->OCOLR = color; + SBI(DMA2D->CR, 0); + + uint32_t timeout = 0; + while (!TEST(DMA2D->ISR, 1)) { + timeout++; + if (timeout > 0x1FFFFF) break; + } + SBI(DMA2D->IFCR, 1); +} + +void TFT_LTDC::DrawImage(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t *colors) { + + if (sx == ex || sy == ey) return; + + uint16_t offline = TFT_WIDTH - (ex - sx); + uint32_t addr = (uint32_t)&framebuffer[(TFT_WIDTH * sy) + sx]; + + CBI(DMA2D->CR, 0); + DMA2D->CR = 0 << 16; + DMA2D->FGPFCCR = 0X02; + DMA2D->FGOR = 0; + DMA2D->OOR = offline; + DMA2D->FGMAR = (uint32_t)colors; + DMA2D->OMAR = addr; + DMA2D->NLR = (ey - sy) | ((ex - sx) << 16); + SBI(DMA2D->CR, 0); + + uint32_t timeout = 0; + while (!TEST(DMA2D->ISR, 1)) { + timeout++; + if (timeout > 0x1FFFFF) break; + } + SBI(DMA2D->IFCR, 1); +} + +void TFT_LTDC::WriteData(uint16_t data) { + switch (reg) { + case 0x01: x_cur = x_min = data; return; + case 0x02: x_max = data; return; + case 0x03: y_cur = y_min = data; return; + case 0x04: y_max = data; return; + } + Transmit(data); +} + +void TFT_LTDC::Transmit(tft_data_t Data) { + DrawPoint(x_cur, y_cur, Data); + x_cur++; + if (x_cur > x_max) { + x_cur = x_min; + y_cur++; + if (y_cur > y_max) y_cur = y_min; + } +} + +void TFT_LTDC::WriteReg(uint16_t Reg) { + reg = Reg; +} + +void TFT_LTDC::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) { + + while (x_cur != x_min && Count) { + Transmit(*Data); + if (MemoryIncrease == DMA_PINC_ENABLE) Data++; + Count--; + } + + uint16_t width = x_max - x_min + 1; + uint16_t height = Count / width; + uint16_t x_end_cnt = Count - (width * height); + + if (height) { + if (MemoryIncrease == DMA_PINC_ENABLE) { + DrawImage(x_min, y_cur, x_min + width, y_cur + height, Data); + Data += width * height; + } else { + DrawRect(x_min, y_cur, x_min + width, y_cur + height, *Data); + } + y_cur += height; + } + + while (x_end_cnt) { + Transmit(*Data); + if (MemoryIncrease == DMA_PINC_ENABLE) Data++; + x_end_cnt--; + } +} + +#endif // HAS_LTDC_TFT +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/tft_ltdc.h b/Marlin/src/HAL/STM32/tft/tft_ltdc.h new file mode 100644 index 000000000000..7b63d6929b31 --- /dev/null +++ b/Marlin/src/HAL/STM32/tft/tft_ltdc.h @@ -0,0 +1,155 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../inc/MarlinConfig.h" + +#ifdef STM32H7xx + #include "stm32h7xx_hal.h" +#else + #error "LTDC TFT is currently only supported on STM32H7 hardware." +#endif + +#define DATASIZE_8BIT SPI_DATASIZE_8BIT +#define DATASIZE_16BIT SPI_DATASIZE_16BIT +#define TFT_IO_DRIVER TFT_LTDC + +#define TFT_DATASIZE DATASIZE_16BIT +typedef uint16_t tft_data_t; + +class TFT_LTDC { + private: + static volatile uint16_t *framebuffer; + static uint16_t x_min, x_max, y_min, y_max, x_cur, y_cur; + static uint8_t reg; + + static uint32_t ReadID(tft_data_t Reg); + + static uint16_t ReadPoint(uint16_t x, uint16_t y); + static void DrawPoint(uint16_t x, uint16_t y, uint16_t color); + static void DrawRect(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t color); + static void DrawImage(uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey, uint16_t *colors); + static void Transmit(tft_data_t Data); + static void TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count); + + public: + static void Init(); + static uint32_t GetID(); + static bool isBusy(); + static void Abort() { /*__HAL_DMA_DISABLE(&DMAtx);*/ } + + static void DataTransferBegin(uint16_t DataWidth = TFT_DATASIZE) {} + static void DataTransferEnd() {}; + + static void WriteData(uint16_t Data); + static void WriteReg(uint16_t Reg); + + static void WriteSequence(uint16_t *Data, uint16_t Count) { TransmitDMA(DMA_PINC_ENABLE, Data, Count); } + static void WriteMultiple(uint16_t Color, uint16_t Count) { static uint16_t Data; Data = Color; TransmitDMA(DMA_PINC_DISABLE, &Data, Count); } + static void WriteMultiple(uint16_t Color, uint32_t Count) { + static uint16_t Data; Data = Color; + while (Count > 0) { + TransmitDMA(DMA_MINC_DISABLE, &Data, Count > 0xFFFF ? 0xFFFF : Count); + Count = Count > 0xFFFF ? Count - 0xFFFF : 0; + } + } +}; + +const PinMap PinMap_LTDC[] = { + {PF_10, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_DE + {PG_7, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_CLK + {PI_9, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_VSYNC + {PI_10, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_HSYNC + + {PG_6, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_R7 + {PH_12, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_R6 + {PH_11, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_R5 + {PH_10, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_R4 + {PH_9, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_R3 + + {PI_2, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_G7 + {PI_1, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_G6 + {PI_0, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_G5 + {PH_15, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_G4 + {PH_14, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_G3 + {PH_13, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_G2 + + {PI_7, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_B7 + {PI_6, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_B6 + {PI_5, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_B5 + {PI_4, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_B4 + {PG_11, LTDC, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_LTDC)}, // LCD_B3 + {NC, NP, 0} +}; + +const PinMap PinMap_SDRAM[] = { + {PC_0, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_SDNWE + {PC_2, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_SDNE0 + {PC_3, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_SDCKE0 + {PE_0, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_NBL0 + {PE_1, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_NBL1 + {PF_11, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_SDNRAS + {PG_8, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_SDCLK + {PG_15, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_SDNCAS + {PG_4, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_BA0 + {PG_5, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_BA1 + {PD_14, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D0 + {PD_15, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D1 + {PD_0, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D2 + {PD_1, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D3 + {PE_7, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D4 + {PE_8, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D5 + {PE_9, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D6 + {PE_10, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D7 + {PE_11, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D8 + {PE_12, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D9 + {PE_13, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D10 + {PE_14, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D11 + {PE_15, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D12 + {PD_8, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D13 + {PD_9, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D14 + {PD_10, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_D15 + {PF_0, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A0 + {PF_1, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A1 + {PF_2, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A2 + {PF_3, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A3 + {PF_4, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A4 + {PF_5, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A5 + {PF_12, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A6 + {PF_13, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A7 + {PF_14, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A8 + {PF_15, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A9 + {PG_0, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A10 + {PG_1, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A11 + {PG_2, FMC_Bank1_R, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_FMC)}, // FMC_A12 + {NC, NP, 0} +}; + +const PinMap PinMap_QUADSPI[] = { + {PB_2, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_CLK + {PB_10, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_NCS + {PF_6, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO3 + {PF_7, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QUADSPI)}, // QUADSPI_BK1_IO2 + {PF_8, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_IO0 + {PF_9, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_IO1 + {NC, NP, 0} +}; diff --git a/Marlin/src/HAL/STM32/tft/tft_spi.cpp b/Marlin/src/HAL/STM32/tft/tft_spi.cpp index 3cb797d5f2a9..790513e7edd9 100644 --- a/Marlin/src/HAL/STM32/tft/tft_spi.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_spi.cpp @@ -19,7 +19,10 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../../platforms.h" + +#ifdef HAL_STM32 #include "../../../inc/MarlinConfig.h" @@ -125,12 +128,20 @@ void TFT_SPI::DataTransferBegin(uint16_t DataSize) { WRITE(TFT_CS_PIN, LOW); } +#ifdef TFT_DEFAULT_DRIVER + #include "../../../lcd/tft_io/tft_ids.h" +#endif + uint32_t TFT_SPI::GetID() { uint32_t id; id = ReadID(LCD_READ_ID); - - if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) + if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) { id = ReadID(LCD_READ_ID4); + #ifdef TFT_DEFAULT_DRIVER + if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) + id = TFT_DEFAULT_DRIVER; + #endif + } return id; } @@ -207,12 +218,12 @@ void TFT_SPI::Transmit(uint16_t Data) { while ((SPIx.Instance->SR & SPI_FLAG_BSY) == SPI_FLAG_BSY) {} if (TFT_MISO_PIN != TFT_MOSI_PIN) - __HAL_SPI_CLEAR_OVRFLAG(&SPIx); /* Clear overrun flag in 2 Lines communication mode because received is not read */ + __HAL_SPI_CLEAR_OVRFLAG(&SPIx); // Clear overrun flag in 2 Lines communication mode because received is not read } void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) { // Wait last dma finish, to start another - while(isBusy()) { } + while (isBusy()) { /* nada */ } DMAtx.Init.MemInc = MemoryIncrease; HAL_DMA_Init(&DMAtx); @@ -225,11 +236,11 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun HAL_DMA_Start(&DMAtx, (uint32_t)Data, (uint32_t)&(SPIx.Instance->DR), Count); __HAL_SPI_ENABLE(&SPIx); - SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); /* Enable Tx DMA Request */ + SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request HAL_DMA_PollForTransfer(&DMAtx, HAL_DMA_FULL_TRANSFER, HAL_MAX_DELAY); Abort(); } #endif // HAS_SPI_TFT -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/xpt2046.cpp b/Marlin/src/HAL/STM32/tft/xpt2046.cpp index 04294e669c55..cf4a8f18e9ac 100644 --- a/Marlin/src/HAL/STM32/tft/xpt2046.cpp +++ b/Marlin/src/HAL/STM32/tft/xpt2046.cpp @@ -19,11 +19,14 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../../platforms.h" + +#ifdef HAL_STM32 #include "../../../inc/MarlinConfig.h" -#if HAS_TFT_XPT2046 || HAS_TOUCH_BUTTONS +#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS #include "xpt2046.h" #include "pinconfig.h" @@ -167,4 +170,4 @@ uint16_t XPT2046::SoftwareIO(uint16_t data) { } #endif // HAS_TFT_XPT2046 -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/tft/xpt2046.h b/Marlin/src/HAL/STM32/tft/xpt2046.h index 5b8acf4b87af..2cff3e29d05b 100644 --- a/Marlin/src/HAL/STM32/tft/xpt2046.h +++ b/Marlin/src/HAL/STM32/tft/xpt2046.h @@ -56,7 +56,7 @@ enum XPTCoordinate : uint8_t { XPT2046_Z2 = 0x40 | XPT2046_CONTROL | XPT2046_DFR_MODE, }; -#if !defined(XPT2046_Z1_THRESHOLD) +#ifndef XPT2046_Z1_THRESHOLD #define XPT2046_Z1_THRESHOLD 10 #endif diff --git a/Marlin/src/HAL/STM32/timers.cpp b/Marlin/src/HAL/STM32/timers.cpp index e8e18a47d48b..9b69323ef543 100644 --- a/Marlin/src/HAL/STM32/timers.cpp +++ b/Marlin/src/HAL/STM32/timers.cpp @@ -19,7 +19,9 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -74,7 +76,7 @@ #elif defined(STM32F401xC) || defined(STM32F401xE) #define MCU_STEP_TIMER 9 #define MCU_TEMP_TIMER 10 -#elif defined(STM32F4xx) || defined(STM32F7xx) +#elif defined(STM32F4xx) || defined(STM32F7xx) || defined(STM32H7xx) #define MCU_STEP_TIMER 6 // STM32F401 has no TIM6, TIM7, or TIM8 #define MCU_TEMP_TIMER 14 // TIM7 is consumed by Software Serial if used. #endif @@ -319,4 +321,4 @@ static constexpr bool verify_no_timer_conflicts() { // when hovering over it, making it easy to identify the conflicting timers. static_assert(verify_no_timer_conflicts(), "One or more timer conflict detected. Examine \"timers_in_use\" to help identify conflict."); -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/timers.h b/Marlin/src/HAL/STM32/timers.h index 464982430358..7a35e432102d 100644 --- a/Marlin/src/HAL/STM32/timers.h +++ b/Marlin/src/HAL/STM32/timers.h @@ -21,15 +21,12 @@ */ #pragma once -#include #include "../../inc/MarlinConfig.h" // ------------------------ // Defines // ------------------------ -#define FORCE_INLINE __attribute__((always_inline)) inline - // STM32 timers may be 16 or 32 bit. Limiting HAL_TIMER_TYPE_MAX to 16 bits // avoids issues with STM32F0 MCUs, which seem to pause timers if UINT32_MAX // is written to the register. STM32F4 timers do not manifest this issue, diff --git a/Marlin/src/HAL/STM32/usb_host.cpp b/Marlin/src/HAL/STM32/usb_host.cpp index ed743361e681..d77f0b28e964 100644 --- a/Marlin/src/HAL/STM32/usb_host.cpp +++ b/Marlin/src/HAL/STM32/usb_host.cpp @@ -20,7 +20,9 @@ * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfig.h" @@ -87,9 +89,9 @@ void USBHost::setUsbTaskState(uint8_t state) { capacity = info.capacity.block_nbr / 2000; block_size = info.capacity.block_size; block_count = info.capacity.block_nbr; - // SERIAL_ECHOLNPAIR("info.capacity.block_nbr : %ld\n", info.capacity.block_nbr); - // SERIAL_ECHOLNPAIR("info.capacity.block_size: %d\n", info.capacity.block_size); - // SERIAL_ECHOLNPAIR("capacity : %d MB\n", capacity); + //SERIAL_ECHOLNPGM("info.capacity.block_nbr : %ld\n", info.capacity.block_nbr); + //SERIAL_ECHOLNPGM("info.capacity.block_size: %d\n", info.capacity.block_size); + //SERIAL_ECHOLNPGM("capacity : %d MB\n", capacity); } }; @@ -110,8 +112,8 @@ uint8_t BulkStorage::Read(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t bl } uint8_t BulkStorage::Write(uint8_t lun, uint32_t addr, uint16_t bsize, uint8_t blocks, const uint8_t * buf) { - return USBH_MSC_Write(&hUsbHost, lun, addr, const_cast (buf), blocks) != USBH_OK; + return USBH_MSC_Write(&hUsbHost, lun, addr, const_cast(buf), blocks) != USBH_OK; } #endif // USE_OTG_USB_HOST && USBHOST -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/usb_serial.cpp b/Marlin/src/HAL/STM32/usb_serial.cpp index 705d649ff58c..b607275db5bb 100644 --- a/Marlin/src/HAL/STM32/usb_serial.cpp +++ b/Marlin/src/HAL/STM32/usb_serial.cpp @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -16,7 +19,10 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfigPre.h" @@ -51,4 +57,4 @@ void USB_Hook_init() { } #endif // EMERGENCY_PARSER && USBD_USE_CDC -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32/usb_serial.h b/Marlin/src/HAL/STM32/usb_serial.h index ca61b9ed239f..3edb6fd6185c 100644 --- a/Marlin/src/HAL/STM32/usb_serial.h +++ b/Marlin/src/HAL/STM32/usb_serial.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/Marlin/src/HAL/STM32/watchdog.cpp b/Marlin/src/HAL/STM32/watchdog.cpp index aad0a79a0cb2..1eccdec4985d 100644 --- a/Marlin/src/HAL/STM32/watchdog.cpp +++ b/Marlin/src/HAL/STM32/watchdog.cpp @@ -19,7 +19,10 @@ * along with this program. If not, see . * */ -#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + +#include "../platforms.h" + +#ifdef HAL_STM32 #include "../../inc/MarlinConfigPre.h" @@ -46,4 +49,4 @@ void HAL_watchdog_refresh() { } #endif // USE_WATCHDOG -#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC +#endif // HAL_STM32 diff --git a/Marlin/src/HAL/STM32F1/HAL.cpp b/Marlin/src/HAL/STM32F1/HAL.cpp index c1e29a843c11..df1ba33d4ade 100644 --- a/Marlin/src/HAL/STM32F1/HAL.cpp +++ b/Marlin/src/HAL/STM32F1/HAL.cpp @@ -84,7 +84,32 @@ #if defined(SERIAL_USB) && !HAS_SD_HOST_DRIVE USBSerial SerialUSB; - DefaultSerial MSerial(false, SerialUSB); + DefaultSerial1 MSerial0(true, SerialUSB); + + #if ENABLED(EMERGENCY_PARSER) + #include "../libmaple/usb/stm32f1/usb_reg_map.h" + #include "libmaple/usb_cdcacm.h" + // The original callback is not called (no way to retrieve address). + // That callback detects a special STM32 reset sequence: this functionality is not essential + // as M997 achieves the same. + void my_rx_callback(unsigned int, void*) { + // max length of 16 is enough to contain all emergency commands + uint8 buf[16]; + + //rx is usbSerialPart.endpoints[2] + uint16 len = usb_get_ep_rx_count(USB_CDCACM_RX_ENDP); + uint32 total = usb_cdcacm_data_available(); + + if (len == 0 || total == 0 || !WITHIN(total, len, COUNT(buf))) + return; + + // cannot get character by character due to bug in composite_cdcacm_peek_ex + len = usb_cdcacm_peek(buf, total); + + for (uint32 i = 0; i < len; i++) + emergency_parser.update(MSerial0.emergency_state, buf[i + total - len]); + } + #endif #endif uint16_t HAL_adc_result; @@ -107,6 +132,9 @@ const uint8_t adc_pins[] = { #if HAS_TEMP_CHAMBER TEMP_CHAMBER_PIN, #endif + #if HAS_TEMP_COOLER + TEMP_COOLER_PIN, + #endif #if HAS_TEMP_ADC_1 TEMP_1_PIN, #endif @@ -164,6 +192,9 @@ enum TempPinIndex : char { #if HAS_TEMP_CHAMBER TEMP_CHAMBER, #endif + #if HAS_TEMP_COOLER + TEMP_COOLER_PIN, + #endif #if HAS_TEMP_ADC_1 TEMP_1, #endif @@ -222,7 +253,7 @@ static void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) { reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */ reg_value = (reg_value | ((uint32_t)0x5FA << SCB_AIRCR_VECTKEY_Pos) | - (PriorityGroupTmp << 8)); /* Insert write key and priorty group */ + (PriorityGroupTmp << 8)); /* Insert write key & priority group */ SCB->AIRCR = reg_value; } @@ -247,6 +278,8 @@ static void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) { } } #endif +TERN_(POSTMORTEM_DEBUGGING, extern void install_min_serial()); + void HAL_init() { NVIC_SetPriorityGrouping(0x3); #if PIN_EXISTS(LED) @@ -254,12 +287,15 @@ void HAL_init() { #endif #if HAS_SD_HOST_DRIVE MSC_SD_init(); + #elif BOTH(SERIAL_USB, EMERGENCY_PARSER) + usb_cdcacm_set_hooks(USB_CDCACM_HOOK_RX, my_rx_callback); #endif #if PIN_EXISTS(USB_CONNECT) OUT_WRITE(USB_CONNECT_PIN, !USB_CONNECT_INVERTING); // USB clear connection delay(1000); // Give OS time to notice - OUT_WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING); + WRITE(USB_CONNECT_PIN, USB_CONNECT_INVERTING); #endif + TERN_(POSTMORTEM_DEBUGGING, install_min_serial()); // Install the minimal serial handler } // HAL idle task @@ -355,6 +391,9 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) { #if HAS_TEMP_CHAMBER case TEMP_CHAMBER_PIN: pin_index = TEMP_CHAMBER; break; #endif + #if HAS_TEMP_COOLER + case TEMP_COOLER_PIN: pin_index = TEMP_COOLER; break; + #endif #if HAS_TEMP_ADC_1 case TEMP_1_PIN: pin_index = TEMP_1; break; #endif @@ -398,7 +437,7 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) { case POWER_MONITOR_VOLTAGE_PIN: pin_index = POWERMON_VOLTS; break; #endif } - HAL_adc_result = (HAL_adc_results[(int)pin_index] >> 2) & 0x3FF; // shift to get 10 bits only. + HAL_adc_result = HAL_adc_results[(int)pin_index] >> (12 - HAL_ADC_RESOLUTION); // shift out unused bits } uint16_t HAL_adc_get_result() { return HAL_adc_result; } @@ -414,6 +453,8 @@ void analogWrite(pin_t pin, int pwm_val8) { analogWrite(uint8_t(pin), pwm_val8); } -void flashFirmware(const int16_t) { nvic_sys_reset(); } +void HAL_reboot() { nvic_sys_reset(); } + +void flashFirmware(const int16_t) { HAL_reboot(); } #endif // __STM32F1__ diff --git a/Marlin/src/HAL/STM32F1/HAL.h b/Marlin/src/HAL/STM32F1/HAL.h index 30bf60b6e8a1..3bdfb9703c64 100644 --- a/Marlin/src/HAL/STM32F1/HAL.h +++ b/Marlin/src/HAL/STM32F1/HAL.h @@ -36,7 +36,6 @@ #include "fastio.h" #include "watchdog.h" - #include #include @@ -52,8 +51,15 @@ // Defines // ------------------------ +// +// Default graphical display delays +// +#define CPU_ST7920_DELAY_1 300 +#define CPU_ST7920_DELAY_2 40 +#define CPU_ST7920_DELAY_3 340 + #ifndef STM32_FLASH_SIZE - #if EITHER(MCU_STM32F103RE, MCU_STM32F103VE) + #if ANY(MCU_STM32F103RE, MCU_STM32F103VE, MCU_STM32F103ZE) #define STM32_FLASH_SIZE 512 #else #define STM32_FLASH_SIZE 256 @@ -61,13 +67,12 @@ #endif #ifdef SERIAL_USB - typedef ForwardSerial0Type< USBSerial > DefaultSerial; - extern DefaultSerial MSerial; - - #if !HAS_SD_HOST_DRIVE - #define UsbSerial MSerial - #else + typedef ForwardSerial1Class< USBSerial > DefaultSerial1; + extern DefaultSerial1 MSerial0; + #if HAS_SD_HOST_DRIVE #define UsbSerial MarlinCompositeSerial + #else + #define UsbSerial MSerial0 #endif #endif @@ -81,24 +86,33 @@ #endif #if SERIAL_PORT == -1 - #define MYSERIAL0 UsbSerial + #define MYSERIAL1 UsbSerial #elif WITHIN(SERIAL_PORT, 1, NUM_UARTS) - #define MYSERIAL0 MSERIAL(SERIAL_PORT) -#elif NUM_UARTS == 5 - #error "SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration." + #define MYSERIAL1 MSERIAL(SERIAL_PORT) #else - #error "SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration." + #define MYSERIAL1 MSERIAL(1) // dummy port + static_assert(false, "SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") #endif #ifdef SERIAL_PORT_2 #if SERIAL_PORT_2 == -1 - #define MYSERIAL1 UsbSerial + #define MYSERIAL2 UsbSerial #elif WITHIN(SERIAL_PORT_2, 1, NUM_UARTS) - #define MYSERIAL1 MSERIAL(SERIAL_PORT_2) - #elif NUM_UARTS == 5 - #error "SERIAL_PORT_2 must be -1 or from 1 to 5. Please update your configuration." + #define MYSERIAL2 MSERIAL(SERIAL_PORT_2) #else - #error "SERIAL_PORT_2 must be -1 or from 1 to 3. Please update your configuration." + #define MYSERIAL2 MSERIAL(1) // dummy port + static_assert(false, "SERIAL_PORT_2 must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") + #endif +#endif + +#ifdef SERIAL_PORT_3 + #if SERIAL_PORT_3 == -1 + #define MYSERIAL3 UsbSerial + #elif WITHIN(SERIAL_PORT_3, 1, NUM_UARTS) + #define MYSERIAL3 MSERIAL(SERIAL_PORT_3) + #else + #define MYSERIAL3 MSERIAL(1) // dummy port + static_assert(false, "SERIAL_PORT_3 must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") #endif #endif @@ -107,10 +121,9 @@ #define MMU2_SERIAL UsbSerial #elif WITHIN(MMU2_SERIAL_PORT, 1, NUM_UARTS) #define MMU2_SERIAL MSERIAL(MMU2_SERIAL_PORT) - #elif NUM_UARTS == 5 - #error "MMU2_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration." #else - #error "MMU2_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration." + #define MMU2_SERIAL MSERIAL(1) // dummy port + static_assert(false, "MMU2_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") #endif #endif @@ -119,10 +132,9 @@ #define LCD_SERIAL UsbSerial #elif WITHIN(LCD_SERIAL_PORT, 1, NUM_UARTS) #define LCD_SERIAL MSERIAL(LCD_SERIAL_PORT) - #elif NUM_UARTS == 5 - #error "LCD_SERIAL_PORT must be -1 or from 1 to 5. Please update your configuration." #else - #error "LCD_SERIAL_PORT must be -1 or from 1 to 3. Please update your configuration." + #define LCD_SERIAL MSERIAL(1) // dummy port + static_assert(false, "LCD_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.") #endif #if HAS_DGUS_LCD #define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite() @@ -195,7 +207,7 @@ void HAL_clear_reset_source(); // Reset reason uint8_t HAL_get_reset_source(); -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); void _delay_ms(const int delay); @@ -225,8 +237,13 @@ static inline int freeMemory() { void HAL_adc_init(); +#ifdef ADC_RESOLUTION + #define HAL_ADC_RESOLUTION ADC_RESOLUTION +#else + #define HAL_ADC_RESOLUTION 12 +#endif + #define HAL_ADC_VREF 3.3 -#define HAL_ADC_RESOLUTION 10 #define HAL_START_ADC(pin) HAL_adc_start_conversion(pin) #define HAL_READ_ADC() HAL_adc_result #define HAL_ADC_READY() true diff --git a/Marlin/src/HAL/STM32F1/HAL_MinSerial.cpp b/Marlin/src/HAL/STM32F1/HAL_MinSerial.cpp new file mode 100644 index 000000000000..0fc3d014d484 --- /dev/null +++ b/Marlin/src/HAL/STM32F1/HAL_MinSerial.cpp @@ -0,0 +1,118 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * Copyright (c) 2017 Victor Perez + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#ifdef __STM32F1__ + +#include "../../inc/MarlinConfigPre.h" + +#if ENABLED(POSTMORTEM_DEBUGGING) + +#include "../shared/HAL_MinSerial.h" +#include "watchdog.h" + +#include +#include +#include + +/* Instruction Synchronization Barrier */ +#define isb() __asm__ __volatile__ ("isb" : : : "memory") + +/* Data Synchronization Barrier */ +#define dsb() __asm__ __volatile__ ("dsb" : : : "memory") + +static void TXBegin() { + #if !WITHIN(SERIAL_PORT, 1, 6) + #warning "Using POSTMORTEM_DEBUGGING requires a physical U(S)ART hardware in case of severe error." + #warning "Disabling the severe error reporting feature currently because the used serial port is not a HW port." + #else + // We use MYSERIAL1 here, so we need to figure out how to get the linked register + struct usart_dev* dev = MYSERIAL1.c_dev(); + + // Or use this if removing libmaple + // int irq = dev->irq_num; + // int nvicUART[] = { NVIC_USART1 /* = 37 */, NVIC_USART2 /* = 38 */, NVIC_USART3 /* = 39 */, NVIC_UART4 /* = 52 */, NVIC_UART5 /* = 53 */ }; + // Disabling irq means setting the bit in the NVIC ICER register located at + // Disable UART interrupt in NVIC + nvic_irq_disable(dev->irq_num); + + // Use this if removing libmaple + //SBI(NVIC_BASE->ICER[1], irq - 32); + + // We NEED memory barriers to ensure Interrupts are actually disabled! + // ( https://dzone.com/articles/nvic-disabling-interrupts-on-arm-cortex-m-and-the ) + dsb(); + isb(); + + rcc_clk_disable(dev->clk_id); + rcc_clk_enable(dev->clk_id); + + usart_reg_map *regs = dev->regs; + regs->CR1 = 0; // Reset the USART + regs->CR2 = 0; // 1 stop bit + + // If we don't touch the BRR (baudrate register), we don't need to recompute. Else we would need to call + usart_set_baud_rate(dev, 0, BAUDRATE); + + regs->CR1 = (USART_CR1_TE | USART_CR1_UE); // 8 bits, no parity, 1 stop bit + #endif +} + +// A SW memory barrier, to ensure GCC does not overoptimize loops +#define sw_barrier() __asm__ volatile("": : :"memory"); +static void TX(char c) { + #if WITHIN(SERIAL_PORT, 1, 6) + struct usart_dev* dev = MYSERIAL1.c_dev(); + while (!(dev->regs->SR & USART_SR_TXE)) { + TERN_(USE_WATCHDOG, HAL_watchdog_refresh()); + sw_barrier(); + } + dev->regs->DR = c; + #endif +} + +void install_min_serial() { + HAL_min_serial_init = &TXBegin; + HAL_min_serial_out = &TX; +} + +#if DISABLED(DYNAMIC_VECTORTABLE) && DISABLED(STM32F0xx) // Cortex M0 can't branch to a symbol that's too far, so we have a specific hack for them +extern "C" { + __attribute__((naked)) void JumpHandler_ASM() { + __asm__ __volatile__ ( + "b CommonHandler_ASM\n" + ); + } + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __exc_hardfault(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __exc_busfault(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __exc_usagefault(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __exc_memmanage(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __exc_nmi(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __stm32reservedexception7(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __stm32reservedexception8(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __stm32reservedexception9(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __stm32reservedexception10(); + void __attribute__((naked, alias("JumpHandler_ASM"), nothrow)) __stm32reservedexception13(); +} +#endif + +#endif // POSTMORTEM_DEBUGGING +#endif // __STM32F1__ diff --git a/Marlin/src/HAL/STM32F1/HAL_SPI.cpp b/Marlin/src/HAL/STM32F1/HAL_SPI.cpp index 7e876f765fb2..abb348d743c5 100644 --- a/Marlin/src/HAL/STM32F1/HAL_SPI.cpp +++ b/Marlin/src/HAL/STM32F1/HAL_SPI.cpp @@ -123,7 +123,7 @@ uint8_t spiRec() { * * @details Uses DMA */ -void spiRead(uint8_t* buf, uint16_t nbyte) { +void spiRead(uint8_t *buf, uint16_t nbyte) { SPI.dmaTransfer(0, const_cast(buf), nbyte); } @@ -146,7 +146,7 @@ void spiSend(uint8_t b) { * * @details Use DMA */ -void spiSendBlock(uint8_t token, const uint8_t* buf) { +void spiSendBlock(uint8_t token, const uint8_t *buf) { SPI.send(token); SPI.dmaSend(const_cast(buf), 512); } @@ -160,7 +160,7 @@ uint8_t spiRec(uint32_t chan) { return SPI.transfer(0xFF); } void spiSend(uint32_t chan, byte b) { SPI.send(b); } // Write buffer to specified SPI channel -void spiSend(uint32_t chan, const uint8_t* buf, size_t n) { +void spiSend(uint32_t chan, const uint8_t *buf, size_t n) { for (size_t p = 0; p < n; p++) spiSend(chan, buf[p]); } diff --git a/Marlin/src/HAL/STM32F1/MarlinSerial.cpp b/Marlin/src/HAL/STM32F1/MarlinSerial.cpp index c404e81b35e8..6dabcde51ead 100644 --- a/Marlin/src/HAL/STM32F1/MarlinSerial.cpp +++ b/Marlin/src/HAL/STM32F1/MarlinSerial.cpp @@ -60,7 +60,7 @@ static inline __always_inline void my_usart_irq(ring_buffer *rb, ring_buffer *wb } else if (srflags & USART_SR_ORE) { // overrun and empty data, just do a dummy read to clear ORE - // and prevent a raise condition where a continous interrupt stream (due to ORE set) occurs + // and prevent a raise condition where a continuous interrupt stream (due to ORE set) occurs // (see chapter "Overrun error" ) in STM32 reference manual regs->DR; } @@ -134,12 +134,12 @@ constexpr bool IsSerialClassAllowed(const HardwareSerial&) { return false; } // If you encounter this error, replace SerialX with MSerialX, for example MSerial3. // Non-TMC ports were already validated in HAL.h, so do not require verbose error messages. -#ifdef MYSERIAL0 - CHECK_CFG_SERIAL(MYSERIAL0); -#endif #ifdef MYSERIAL1 CHECK_CFG_SERIAL(MYSERIAL1); #endif +#ifdef MYSERIAL2 + CHECK_CFG_SERIAL(MYSERIAL2); +#endif #ifdef LCD_SERIAL CHECK_CFG_SERIAL(LCD_SERIAL); #endif @@ -167,6 +167,15 @@ constexpr bool IsSerialClassAllowed(const HardwareSerial&) { return false; } #if AXIS_HAS_HW_SERIAL(Z4) CHECK_AXIS_SERIAL(Z4); #endif +#if AXIS_HAS_HW_SERIAL(I) + CHECK_AXIS_SERIAL(I); +#endif +#if AXIS_HAS_HW_SERIAL(J) + CHECK_AXIS_SERIAL(J); +#endif +#if AXIS_HAS_HW_SERIAL(K) + CHECK_AXIS_SERIAL(K); +#endif #if AXIS_HAS_HW_SERIAL(E0) CHECK_AXIS_SERIAL(E0); #endif diff --git a/Marlin/src/HAL/STM32F1/MarlinSerial.h b/Marlin/src/HAL/STM32F1/MarlinSerial.h index 4c0bf0e10025..dda32fe7a2ef 100644 --- a/Marlin/src/HAL/STM32F1/MarlinSerial.h +++ b/Marlin/src/HAL/STM32F1/MarlinSerial.h @@ -28,10 +28,6 @@ #include "../../inc/MarlinConfigPre.h" #include "../../core/serial_hook.h" -#if HAS_TFT_LVGL_UI - extern "C" { extern char public_buf_m[100]; } -#endif - // Increase priority of serial interrupts, to reduce overflow errors #define UART_IRQ_PRIO 1 @@ -49,31 +45,9 @@ struct MarlinSerial : public HardwareSerial { nvic_irq_set_priority(c_dev()->irq_num, UART_IRQ_PRIO); } #endif - - #if HAS_TFT_LVGL_UI - // Hook the serial write method to capture the output of GCode command sent via LCD - uint32_t current_wpos; - void (*line_callback)(void *, const char * msg); - void *user_pointer; - - void set_hook(void (*hook)(void *, const char *), void * that) { line_callback = hook; user_pointer = that; current_wpos = 0; } - - size_t write(uint8_t c) { - if (line_callback) { - if (c == '\n' || current_wpos == sizeof(public_buf_m) - 1) { // End of line, probably end of command anyway - public_buf_m[current_wpos] = 0; - line_callback(user_pointer, public_buf_m); - current_wpos = 0; - } - else - public_buf_m[current_wpos++] = c; - } - return HardwareSerial::write(c); - } - #endif }; -typedef Serial0Type MSerialT; +typedef Serial1Class MSerialT; extern MSerialT MSerial1; extern MSerialT MSerial2; diff --git a/Marlin/src/HAL/STM32F1/SPI.cpp b/Marlin/src/HAL/STM32F1/SPI.cpp index c0a35b88d1a2..8bfa3d236a7c 100644 --- a/Marlin/src/HAL/STM32F1/SPI.cpp +++ b/Marlin/src/HAL/STM32F1/SPI.cpp @@ -363,8 +363,8 @@ uint16_t SPIClass::transfer16(uint16_t data) const { /** * Roger Clark and Victor Perez, 2015 * Performs a DMA SPI transfer with at least a receive buffer. - * If a TX buffer is not provided, FF is sent over and over for the lenght of the transfer. - * On exit TX buffer is not modified, and RX buffer cotains the received data. + * If a TX buffer is not provided, FF is sent over and over for the length of the transfer. + * On exit TX buffer is not modified, and RX buffer contains the received data. * Still in progress. */ void SPIClass::dmaTransferSet(const void *transmitBuf, void *receiveBuf) { diff --git a/Marlin/src/HAL/STM32F1/SPI.h b/Marlin/src/HAL/STM32F1/SPI.h index 828644f1ddb5..2467432e0718 100644 --- a/Marlin/src/HAL/STM32F1/SPI.h +++ b/Marlin/src/HAL/STM32F1/SPI.h @@ -138,8 +138,8 @@ class SPISettings { spi_dev *spi_d; dma_channel spiRxDmaChannel, spiTxDmaChannel; dma_dev* spiDmaDev; - void (*receiveCallback)() = NULL; - void (*transmitCallback)() = NULL; + void (*receiveCallback)() = nullptr; + void (*transmitCallback)() = nullptr; friend class SPIClass; }; diff --git a/Marlin/src/HAL/STM32F1/build_flags.py b/Marlin/src/HAL/STM32F1/build_flags.py index c51fd4fa58fd..d0848d1c6438 100755 --- a/Marlin/src/HAL/STM32F1/build_flags.py +++ b/Marlin/src/HAL/STM32F1/build_flags.py @@ -11,6 +11,7 @@ "-fsigned-char", "-fno-move-loop-invariants", "-fno-strict-aliasing", + "-fsingle-precision-constant", "--specs=nano.specs", "--specs=nosys.specs", diff --git a/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp b/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp index 784a80c29fd3..26ea1ea19af9 100644 --- a/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp +++ b/Marlin/src/HAL/STM32F1/dogm/u8g_com_stm32duino_swspi.cpp @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -16,13 +19,14 @@ * along with this program. If not, see . * */ + #ifdef __STM32F1__ #include "../../../inc/MarlinConfig.h" #if BOTH(HAS_MARLINUI_U8GLIB, FORCE_SOFT_SPI) -#include +#include #include "../../shared/HAL_SPI.h" #ifndef LCD_SPI_SPEED diff --git a/Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp b/Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp index a6395698aae7..4e25bc69da4e 100644 --- a/Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp +++ b/Marlin/src/HAL/STM32F1/eeprom_bl24cxx.cpp @@ -19,14 +19,13 @@ * along with this program. If not, see . * */ +#ifdef __STM32F1__ /** * PersistentStore for Arduino-style EEPROM interface * with simple implementations supplied by Marlin. */ -#ifdef __STM32F1__ - #include "../../inc/MarlinConfig.h" #if ENABLED(IIC_BL24CXX_EEPROM) @@ -48,13 +47,11 @@ bool PersistentStore::access_start() { eeprom_init(); return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { - size_t written = 0; + uint16_t written = 0; while (size--) { uint8_t v = *value; uint8_t * const p = (uint8_t * const)pos; - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { diff --git a/Marlin/src/HAL/STM32F1/eeprom_flash.cpp b/Marlin/src/HAL/STM32F1/eeprom_flash.cpp index dfcaaaf29ff3..e7d9dd29e2c5 100644 --- a/Marlin/src/HAL/STM32F1/eeprom_flash.cpp +++ b/Marlin/src/HAL/STM32F1/eeprom_flash.cpp @@ -48,8 +48,8 @@ static uint8_t ram_eeprom[MARLIN_EEPROM_SIZE] __attribute__((aligned(4))) = {0}; static bool eeprom_dirty = false; bool PersistentStore::access_start() { - const uint32_t* source = reinterpret_cast(EEPROM_PAGE0_BASE); - uint32_t* destination = reinterpret_cast(ram_eeprom); + const uint32_t *source = reinterpret_cast(EEPROM_PAGE0_BASE); + uint32_t *destination = reinterpret_cast(ram_eeprom); static_assert(0 == (MARLIN_EEPROM_SIZE) % 4, "MARLIN_EEPROM_SIZE is corrupted. (Must be a multiple of 4.)"); // Ensure copying as uint32_t is safe constexpr size_t eeprom_size_u32 = (MARLIN_EEPROM_SIZE) / 4; diff --git a/Marlin/src/HAL/STM32F1/eeprom_if_iic.cpp b/Marlin/src/HAL/STM32F1/eeprom_if_iic.cpp index ccc3fc537f1a..78b7af0b0418 100644 --- a/Marlin/src/HAL/STM32F1/eeprom_if_iic.cpp +++ b/Marlin/src/HAL/STM32F1/eeprom_if_iic.cpp @@ -40,7 +40,7 @@ void eeprom_init() { BL24CXX::init(); } // Public functions // ------------------------ -void eeprom_write_byte(uint8_t *pos, unsigned char value) { +void eeprom_write_byte(uint8_t *pos, uint8_t value) { const unsigned eeprom_address = (unsigned)pos; return BL24CXX::writeOneByte(eeprom_address, value); } diff --git a/Marlin/src/HAL/STM32F1/eeprom_wired.cpp b/Marlin/src/HAL/STM32F1/eeprom_wired.cpp index 16cfc24af6f6..bc48eef34fa3 100644 --- a/Marlin/src/HAL/STM32F1/eeprom_wired.cpp +++ b/Marlin/src/HAL/STM32F1/eeprom_wired.cpp @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -44,7 +47,7 @@ bool PersistentStore::access_start() { SET_OUTPUT(BOARD_SPI1_SCK_PIN); SET_OUTPUT(BOARD_SPI1_MOSI_PIN); SET_INPUT(BOARD_SPI1_MISO_PIN); - SET_OUTPUT(SPI_EEPROM1_CS); + SET_OUTPUT(SPI_EEPROM1_CS_PIN); #endif spiInit(0); #endif @@ -52,13 +55,13 @@ bool PersistentStore::access_start() { } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { uint8_t * const p = (uint8_t * const)pos; uint8_t v = *value; - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; diff --git a/Marlin/src/HAL/STM32F1/endstop_interrupts.h b/Marlin/src/HAL/STM32F1/endstop_interrupts.h index bcb07d991d75..4d7edb9496c1 100644 --- a/Marlin/src/HAL/STM32F1/endstop_interrupts.h +++ b/Marlin/src/HAL/STM32F1/endstop_interrupts.h @@ -71,4 +71,10 @@ void setup_endstop_interrupts() { TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); } diff --git a/Marlin/src/HAL/STM32F1/inc/SanityCheck.h b/Marlin/src/HAL/STM32F1/inc/SanityCheck.h index 8d4c54ec0fd4..2846155c351d 100644 --- a/Marlin/src/HAL/STM32F1/inc/SanityCheck.h +++ b/Marlin/src/HAL/STM32F1/inc/SanityCheck.h @@ -34,12 +34,12 @@ #endif #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) - #error "SERIAL_STATS_MAX_RX_QUEUED is not supported on this platform." + #error "SERIAL_STATS_MAX_RX_QUEUED is not supported on the STM32F1 platform." #elif ENABLED(SERIAL_STATS_DROPPED_RX) - #error "SERIAL_STATS_DROPPED_RX is not supported on this platform." + #error "SERIAL_STATS_DROPPED_RX is not supported on the STM32F1 platform." #endif -#if ENABLED(NEOPIXEL_LED) +#if ENABLED(NEOPIXEL_LED) && DISABLED(MKS_MINI_12864_V3) #error "NEOPIXEL_LED (Adafruit NeoPixel) is not supported for HAL/STM32F1. Comment out this line to proceed at your own risk!" #endif diff --git a/Marlin/src/HAL/STM32F1/msc_sd.cpp b/Marlin/src/HAL/STM32F1/msc_sd.cpp index 548a6dbc57c4..f490c83ed829 100644 --- a/Marlin/src/HAL/STM32F1/msc_sd.cpp +++ b/Marlin/src/HAL/STM32F1/msc_sd.cpp @@ -13,17 +13,20 @@ * along with this program. If not, see . * */ +#ifdef __STM32F1__ + #include "../../inc/MarlinConfigPre.h" -#if defined(__STM32F1__) && HAS_SD_HOST_DRIVE +#if HAS_SD_HOST_DRIVE #include "msc_sd.h" #include "SPI.h" +#include "usb_reg_map.h" #define PRODUCT_ID 0x29 USBMassStorage MarlinMSC; -Serial0Type MarlinCompositeSerial(true); +Serial1Class MarlinCompositeSerial(true); #include "../../inc/MarlinConfig.h" @@ -41,14 +44,28 @@ Serial0Type MarlinCompositeSerial(true); #endif #if ENABLED(EMERGENCY_PARSER) - void (*real_rx_callback)(void); - void my_rx_callback(void) { - real_rx_callback(); - int len = MarlinCompositeSerial.available(); - while (len-- > 0) // >0 because available() may return a negative value - emergency_parser.update(MarlinCompositeSerial.emergency_state, MarlinCompositeSerial.peek()); + // The original callback is not called (no way to retrieve address). + // That callback detects a special STM32 reset sequence: this functionality is not essential + // as M997 achieves the same. + void my_rx_callback(unsigned int, void*) { + // max length of 16 is enough to contain all emergency commands + uint8 buf[16]; + + //rx is usbSerialPart.endpoints[2] + uint16 len = usb_get_ep_rx_count(usbSerialPart.endpoints[2].address); + uint32 total = composite_cdcacm_data_available(); + + if (len == 0 || total == 0 || !WITHIN(total, len, COUNT(buf))) + return; + + // cannot get character by character due to bug in composite_cdcacm_peek_ex + len = composite_cdcacm_peek(buf, total); + + for (uint32 i = 0; i < len; i++) + emergency_parser.update(MarlinCompositeSerial.emergency_state, buf[i+total-len]); } + #endif void MSC_SD_init() { @@ -73,10 +90,9 @@ void MSC_SD_init() { MarlinCompositeSerial.registerComponent(); USBComposite.begin(); #if ENABLED(EMERGENCY_PARSER) - //rx is usbSerialPart.endpoints[2] - real_rx_callback = usbSerialPart.endpoints[2].callback; - usbSerialPart.endpoints[2].callback = my_rx_callback; + composite_cdcacm_set_hooks(USBHID_CDCACM_HOOK_RX, my_rx_callback); #endif } -#endif // __STM32F1__ && HAS_SD_HOST_DRIVE +#endif // HAS_SD_HOST_DRIVE +#endif // __STM32F1__ diff --git a/Marlin/src/HAL/STM32F1/msc_sd.h b/Marlin/src/HAL/STM32F1/msc_sd.h index 151287f7a7e2..f4636bdff702 100644 --- a/Marlin/src/HAL/STM32F1/msc_sd.h +++ b/Marlin/src/HAL/STM32F1/msc_sd.h @@ -21,6 +21,6 @@ #include "../../core/serial_hook.h" extern USBMassStorage MarlinMSC; -extern Serial0Type MarlinCompositeSerial; +extern Serial1Class MarlinCompositeSerial; void MSC_SD_init(); diff --git a/Marlin/src/HAL/STM32F1/onboard_sd.cpp b/Marlin/src/HAL/STM32F1/onboard_sd.cpp index 6092aea32054..df98c2c057af 100644 --- a/Marlin/src/HAL/STM32F1/onboard_sd.cpp +++ b/Marlin/src/HAL/STM32F1/onboard_sd.cpp @@ -38,8 +38,8 @@ #define SPI_CLOCK_MAX SPI_BAUD_PCLK_DIV_2 #endif -#define CS_LOW() WRITE(ONBOARD_SD_CS_PIN, LOW) /* Set OnboardSPI cs low */ -#define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) /* Set OnboardSPI cs high */ +#define CS_LOW() WRITE(ONBOARD_SD_CS_PIN, LOW) // Set OnboardSPI cs low +#define CS_HIGH() WRITE(ONBOARD_SD_CS_PIN, HIGH) // Set OnboardSPI cs high #define FCLK_FAST() ONBOARD_SD_SPI.setClockDivider(SPI_CLOCK_MAX) #define FCLK_SLOW() ONBOARD_SD_SPI.setClockDivider(SPI_BAUD_PCLK_DIV_256) @@ -49,32 +49,32 @@ ---------------------------------------------------------------------------*/ /* MMC/SD command */ -#define CMD0 (0) /* GO_IDLE_STATE */ -#define CMD1 (1) /* SEND_OP_COND (MMC) */ -#define ACMD41 (0x80+41) /* SEND_OP_COND (SDC) */ -#define CMD8 (8) /* SEND_IF_COND */ -#define CMD9 (9) /* SEND_CSD */ -#define CMD10 (10) /* SEND_CID */ -#define CMD12 (12) /* STOP_TRANSMISSION */ -#define ACMD13 (0x80+13) /* SD_STATUS (SDC) */ -#define CMD16 (16) /* SET_BLOCKLEN */ -#define CMD17 (17) /* READ_SINGLE_BLOCK */ -#define CMD18 (18) /* READ_MULTIPLE_BLOCK */ -#define CMD23 (23) /* SET_BLOCK_COUNT (MMC) */ -#define ACMD23 (0x80+23) /* SET_WR_BLK_ERASE_COUNT (SDC) */ -#define CMD24 (24) /* WRITE_BLOCK */ -#define CMD25 (25) /* WRITE_MULTIPLE_BLOCK */ -#define CMD32 (32) /* ERASE_ER_BLK_START */ -#define CMD33 (33) /* ERASE_ER_BLK_END */ -#define CMD38 (38) /* ERASE */ -#define CMD48 (48) /* READ_EXTR_SINGLE */ -#define CMD49 (49) /* WRITE_EXTR_SINGLE */ -#define CMD55 (55) /* APP_CMD */ -#define CMD58 (58) /* READ_OCR */ - -static volatile DSTATUS Stat = STA_NOINIT; /* Physical drive status */ +#define CMD0 (0) // GO_IDLE_STATE +#define CMD1 (1) // SEND_OP_COND (MMC) +#define ACMD41 (0x80+41) // SEND_OP_COND (SDC) +#define CMD8 (8) // SEND_IF_COND +#define CMD9 (9) // SEND_CSD +#define CMD10 (10) // SEND_CID +#define CMD12 (12) // STOP_TRANSMISSION +#define ACMD13 (0x80+13) // SD_STATUS (SDC) +#define CMD16 (16) // SET_BLOCKLEN +#define CMD17 (17) // READ_SINGLE_BLOCK +#define CMD18 (18) // READ_MULTIPLE_BLOCK +#define CMD23 (23) // SET_BLOCK_COUNT (MMC) +#define ACMD23 (0x80+23) // SET_WR_BLK_ERASE_COUNT (SDC) +#define CMD24 (24) // WRITE_BLOCK +#define CMD25 (25) // WRITE_MULTIPLE_BLOCK +#define CMD32 (32) // ERASE_ER_BLK_START +#define CMD33 (33) // ERASE_ER_BLK_END +#define CMD38 (38) // ERASE +#define CMD48 (48) // READ_EXTR_SINGLE +#define CMD49 (49) // WRITE_EXTR_SINGLE +#define CMD55 (55) // APP_CMD +#define CMD58 (58) // READ_OCR + +static volatile DSTATUS Stat = STA_NOINIT; // Physical drive status static volatile UINT timeout; -static BYTE CardType; /* Card type flags */ +static BYTE CardType; // Card type flags /*-----------------------------------------------------------------------*/ /* Send/Receive data to the MMC (Platform dependent) */ @@ -82,7 +82,7 @@ static BYTE CardType; /* Card type flags */ /* Exchange a byte */ static BYTE xchg_spi ( - BYTE dat /* Data to send */ + BYTE dat // Data to send ) { BYTE returnByte = ONBOARD_SD_SPI.transfer(dat); return returnByte; @@ -90,18 +90,18 @@ static BYTE xchg_spi ( /* Receive multiple byte */ static void rcvr_spi_multi ( - BYTE *buff, /* Pointer to data buffer */ - UINT btr /* Number of bytes to receive (16, 64 or 512) */ + BYTE *buff, // Pointer to data buffer + UINT btr // Number of bytes to receive (16, 64 or 512) ) { ONBOARD_SD_SPI.dmaTransfer(0, const_cast(buff), btr); } #if _DISKIO_WRITE - /* Send multiple bytes */ + // Send multiple bytes static void xmit_spi_multi ( - const BYTE *buff, /* Pointer to the data */ - UINT btx /* Number of bytes to send (multiple of 16) */ + const BYTE *buff, // Pointer to the data + UINT btx // Number of bytes to send (multiple of 16) ) { ONBOARD_SD_SPI.dmaSend(const_cast(buff), btx); } @@ -112,16 +112,15 @@ static void rcvr_spi_multi ( /* Wait for card ready */ /*-----------------------------------------------------------------------*/ -static int wait_ready ( /* 1:Ready, 0:Timeout */ - UINT wt /* Timeout [ms] */ +static int wait_ready ( // 1:Ready, 0:Timeout + UINT wt // Timeout [ms] ) { BYTE d; - timeout = millis() + wt; do { d = xchg_spi(0xFF); - /* This loop takes a while. Insert rot_rdq() here for multitask environment. */ - } while (d != 0xFF && (timeout > millis())); /* Wait for card goes ready or timeout */ + // This loop takes a while. Insert rot_rdq() here for multitask environment. + } while (d != 0xFF && (timeout > millis())); // Wait for card goes ready or timeout return (d == 0xFF) ? 1 : 0; } @@ -131,21 +130,21 @@ static int wait_ready ( /* 1:Ready, 0:Timeout */ /*-----------------------------------------------------------------------*/ static void deselect() { - CS_HIGH(); /* CS = H */ - xchg_spi(0xFF); /* Dummy clock (force DO hi-z for multiple slave SPI) */ + CS_HIGH(); // CS = H + xchg_spi(0xFF); // Dummy clock (force DO hi-z for multiple slave SPI) } /*-----------------------------------------------------------------------*/ /* Select card and wait for ready */ /*-----------------------------------------------------------------------*/ -static int select() { /* 1:OK, 0:Timeout */ - CS_LOW(); /* CS = L */ - xchg_spi(0xFF); /* Dummy clock (force DO enabled) */ +static int select() { // 1:OK, 0:Timeout + CS_LOW(); // CS = L + xchg_spi(0xFF); // Dummy clock (force DO enabled) - if (wait_ready(500)) return 1; /* Leading busy check: Wait for card ready */ + if (wait_ready(500)) return 1; // Leading busy check: Wait for card ready - deselect(); /* Timeout */ + deselect(); // Timeout return 0; } @@ -153,16 +152,18 @@ static int select() { /* 1:OK, 0:Timeout */ /* Control SPI module (Platform dependent) */ /*-----------------------------------------------------------------------*/ -static void power_on() { /* Enable SSP module and attach it to I/O pads */ +// Enable SSP module and attach it to I/O pads +static void sd_power_on() { ONBOARD_SD_SPI.setModule(ONBOARD_SPI_DEVICE); ONBOARD_SD_SPI.begin(); ONBOARD_SD_SPI.setBitOrder(MSBFIRST); ONBOARD_SD_SPI.setDataMode(SPI_MODE0); - OUT_WRITE(ONBOARD_SD_CS_PIN, HIGH); /* Set CS# high */ + CS_HIGH(); } -static void power_off() { /* Disable SPI function */ - select(); /* Wait for card ready */ +// Disable SPI function +static void sd_power_off() { + select(); // Wait for card ready deselect(); } @@ -170,23 +171,23 @@ static void power_off() { /* Disable SPI function */ /* Receive a data packet from the MMC */ /*-----------------------------------------------------------------------*/ -static int rcvr_datablock ( /* 1:OK, 0:Error */ - BYTE *buff, /* Data buffer */ - UINT btr /* Data block length (byte) */ +static int rcvr_datablock ( // 1:OK, 0:Error + BYTE *buff, // Data buffer + UINT btr // Data block length (byte) ) { BYTE token; timeout = millis() + 200; - do { /* Wait for DataStart token in timeout of 200ms */ + do { // Wait for DataStart token in timeout of 200ms token = xchg_spi(0xFF); - /* This loop will take a while. Insert rot_rdq() here for multitask environment. */ + // This loop will take a while. Insert rot_rdq() here for multitask environment. } while ((token == 0xFF) && (timeout > millis())); - if (token != 0xFE) return 0; /* Function fails if invalid DataStart token or timeout */ + if (token != 0xFE) return 0; // Function fails if invalid DataStart token or timeout - rcvr_spi_multi(buff, btr); /* Store trailing data to the buffer */ - xchg_spi(0xFF); xchg_spi(0xFF); /* Discard CRC */ + rcvr_spi_multi(buff, btr); // Store trailing data to the buffer + xchg_spi(0xFF); xchg_spi(0xFF); // Discard CRC - return 1; /* Function succeeded */ + return 1; // Function succeeded } /*-----------------------------------------------------------------------*/ @@ -195,25 +196,25 @@ static int rcvr_datablock ( /* 1:OK, 0:Error */ #if _DISKIO_WRITE - static int xmit_datablock ( /* 1:OK, 0:Failed */ - const BYTE *buff, /* Ponter to 512 byte data to be sent */ - BYTE token /* Token */ + static int xmit_datablock( // 1:OK, 0:Failed + const BYTE *buff, // Pointer to 512 byte data to be sent + BYTE token // Token ) { BYTE resp; - if (!wait_ready(500)) return 0; /* Leading busy check: Wait for card ready to accept data block */ + if (!wait_ready(500)) return 0; // Leading busy check: Wait for card ready to accept data block - xchg_spi(token); /* Send token */ - if (token == 0xFD) return 1; /* Do not send data if token is StopTran */ + xchg_spi(token); // Send token + if (token == 0xFD) return 1; // Do not send data if token is StopTran - xmit_spi_multi(buff, 512); /* Data */ - xchg_spi(0xFF); xchg_spi(0xFF); /* Dummy CRC */ + xmit_spi_multi(buff, 512); // Data + xchg_spi(0xFF); xchg_spi(0xFF); // Dummy CRC - resp = xchg_spi(0xFF); /* Receive data resp */ + resp = xchg_spi(0xFF); // Receive data resp - return (resp & 0x1F) == 0x05 ? 1 : 0; /* Data was accepted or not */ + return (resp & 0x1F) == 0x05 ? 1 : 0; // Data was accepted or not - /* Busy check is done at next transmission */ + // Busy check is done at next transmission } #endif // _DISKIO_WRITE @@ -222,43 +223,43 @@ static int rcvr_datablock ( /* 1:OK, 0:Error */ /* Send a command packet to the MMC */ /*-----------------------------------------------------------------------*/ -static BYTE send_cmd ( /* Return value: R1 resp (bit7==1:Failed to send) */ - BYTE cmd, /* Command index */ - DWORD arg /* Argument */ +static BYTE send_cmd( // Return value: R1 resp (bit7==1:Failed to send) + BYTE cmd, // Command index + DWORD arg // Argument ) { BYTE n, res; - if (cmd & 0x80) { /* Send a CMD55 prior to ACMD */ + if (cmd & 0x80) { // Send a CMD55 prior to ACMD cmd &= 0x7F; res = send_cmd(CMD55, 0); if (res > 1) return res; } - /* Select the card and wait for ready except to stop multiple block read */ + // Select the card and wait for ready except to stop multiple block read if (cmd != CMD12) { deselect(); if (!select()) return 0xFF; } - /* Send command packet */ - xchg_spi(0x40 | cmd); /* Start + command index */ - xchg_spi((BYTE)(arg >> 24)); /* Argument[31..24] */ - xchg_spi((BYTE)(arg >> 16)); /* Argument[23..16] */ - xchg_spi((BYTE)(arg >> 8)); /* Argument[15..8] */ - xchg_spi((BYTE)arg); /* Argument[7..0] */ - n = 0x01; /* Dummy CRC + Stop */ - if (cmd == CMD0) n = 0x95; /* Valid CRC for CMD0(0) */ - if (cmd == CMD8) n = 0x87; /* Valid CRC for CMD8(0x1AA) */ + // Send command packet + xchg_spi(0x40 | cmd); // Start + command index + xchg_spi((BYTE)(arg >> 24)); // Argument[31..24] + xchg_spi((BYTE)(arg >> 16)); // Argument[23..16] + xchg_spi((BYTE)(arg >> 8)); // Argument[15..8] + xchg_spi((BYTE)arg); // Argument[7..0] + n = 0x01; // Dummy CRC + Stop + if (cmd == CMD0) n = 0x95; // Valid CRC for CMD0(0) + if (cmd == CMD8) n = 0x87; // Valid CRC for CMD8(0x1AA) xchg_spi(n); - /* Receive command resp */ - if (cmd == CMD12) xchg_spi(0xFF); /* Diacard following one byte when CMD12 */ - n = 10; /* Wait for response (10 bytes max) */ + // Receive command response + if (cmd == CMD12) xchg_spi(0xFF); // Discard the following byte when CMD12 + n = 10; // Wait for response (10 bytes max) do res = xchg_spi(0xFF); while ((res & 0x80) && --n); - return res; /* Return received response */ + return res; // Return received response } /*-------------------------------------------------------------------------- @@ -270,49 +271,52 @@ static BYTE send_cmd ( /* Return value: R1 resp (bit7==1:Failed to send) */ /*-----------------------------------------------------------------------*/ DSTATUS disk_initialize ( - BYTE drv /* Physical drive number (0) */ + BYTE drv // Physical drive number (0) ) { BYTE n, cmd, ty, ocr[4]; - if (drv) return STA_NOINIT; /* Supports only drive 0 */ - power_on(); /* Initialize SPI */ + if (drv) return STA_NOINIT; // Supports only drive 0 + sd_power_on(); // Initialize SPI - if (Stat & STA_NODISK) return Stat; /* Is a card existing in the soket? */ + if (Stat & STA_NODISK) return Stat; // Is a card existing in the soket? FCLK_SLOW(); - for (n = 10; n; n--) xchg_spi(0xFF); /* Send 80 dummy clocks */ + for (n = 10; n; n--) xchg_spi(0xFF); // Send 80 dummy clocks ty = 0; - if (send_cmd(CMD0, 0) == 1) { /* Put the card SPI state */ - timeout = millis() + 1000; /* Initialization timeout = 1 sec */ - if (send_cmd(CMD8, 0x1AA) == 1) { /* Is the catd SDv2? */ - for (n = 0; n < 4; n++) ocr[n] = xchg_spi(0xFF); /* Get 32 bit return value of R7 resp */ - if (ocr[2] == 0x01 && ocr[3] == 0xAA) { /* Does the card support 2.7-3.6V? */ - while ((timeout > millis()) && send_cmd(ACMD41, 1UL << 30)) ; /* Wait for end of initialization with ACMD41(HCS) */ - if ((timeout > millis()) && send_cmd(CMD58, 0) == 0) { /* Check CCS bit in the OCR */ + if (send_cmd(CMD0, 0) == 1) { // Put the card SPI state + timeout = millis() + 1000; // Initialization timeout = 1 sec + if (send_cmd(CMD8, 0x1AA) == 1) { // Is the catd SDv2? + for (n = 0; n < 4; n++) ocr[n] = xchg_spi(0xFF); // Get 32 bit return value of R7 resp + if (ocr[2] == 0x01 && ocr[3] == 0xAA) { // Does the card support 2.7-3.6V? + while ((timeout > millis()) && send_cmd(ACMD41, 1UL << 30)); // Wait for end of initialization with ACMD41(HCS) + if ((timeout > millis()) && send_cmd(CMD58, 0) == 0) { // Check CCS bit in the OCR for (n = 0; n < 4; n++) ocr[n] = xchg_spi(0xFF); - ty = (ocr[0] & 0x40) ? CT_SD2 | CT_BLOCK : CT_SD2; /* Check if the card is SDv2 */ + ty = (ocr[0] & 0x40) ? CT_SD2 | CT_BLOCK : CT_SD2; // Check if the card is SDv2 } } - } else { /* Not an SDv2 card */ - if (send_cmd(ACMD41, 0) <= 1) { /* SDv1 or MMCv3? */ - ty = CT_SD1; cmd = ACMD41; /* SDv1 (ACMD41(0)) */ - } else { - ty = CT_MMC; cmd = CMD1; /* MMCv3 (CMD1(0)) */ + } + else { // Not an SDv2 card + if (send_cmd(ACMD41, 0) <= 1) { // SDv1 or MMCv3? + ty = CT_SD1; cmd = ACMD41; // SDv1 (ACMD41(0)) + } + else { + ty = CT_MMC; cmd = CMD1; // MMCv3 (CMD1(0)) } - while ((timeout > millis()) && send_cmd(cmd, 0)) ; /* Wait for the card leaves idle state */ - if (!(timeout > millis()) || send_cmd(CMD16, 512) != 0) /* Set block length: 512 */ + while ((timeout > millis()) && send_cmd(cmd, 0)); // Wait for the card leaves idle state + if (!(timeout > millis()) || send_cmd(CMD16, 512) != 0) // Set block length: 512 ty = 0; } } - CardType = ty; /* Card type */ + CardType = ty; // Card type deselect(); - if (ty) { /* OK */ - FCLK_FAST(); /* Set fast clock */ - Stat &= ~STA_NOINIT; /* Clear STA_NOINIT flag */ - } else { /* Failed */ - power_off(); + if (ty) { // OK + FCLK_FAST(); // Set fast clock + Stat &= ~STA_NOINIT; // Clear STA_NOINIT flag + } + else { // Failed + sd_power_off(); Stat = STA_NOINIT; } @@ -324,10 +328,10 @@ DSTATUS disk_initialize ( /*-----------------------------------------------------------------------*/ DSTATUS disk_status ( - BYTE drv /* Physical drive number (0) */ + BYTE drv // Physical drive number (0) ) { - if (drv) return STA_NOINIT; /* Supports only drive 0 */ - return Stat; /* Return disk status */ + if (drv) return STA_NOINIT; // Supports only drive 0 + return Stat; // Return disk status } /*-----------------------------------------------------------------------*/ @@ -335,28 +339,28 @@ DSTATUS disk_status ( /*-----------------------------------------------------------------------*/ DRESULT disk_read ( - BYTE drv, /* Physical drive number (0) */ - BYTE *buff, /* Pointer to the data buffer to store read data */ - DWORD sector, /* Start sector number (LBA) */ - UINT count /* Number of sectors to read (1..128) */ + BYTE drv, // Physical drive number (0) + BYTE *buff, // Pointer to the data buffer to store read data + DWORD sector, // Start sector number (LBA) + UINT count // Number of sectors to read (1..128) ) { BYTE cmd; - if (drv || !count) return RES_PARERR; /* Check parameter */ - if (Stat & STA_NOINIT) return RES_NOTRDY; /* Check if drive is ready */ - if (!(CardType & CT_BLOCK)) sector *= 512; /* LBA ot BA conversion (byte addressing cards) */ + if (drv || !count) return RES_PARERR; // Check parameter + if (Stat & STA_NOINIT) return RES_NOTRDY; // Check if drive is ready + if (!(CardType & CT_BLOCK)) sector *= 512; // LBA ot BA conversion (byte addressing cards) FCLK_FAST(); - cmd = count > 1 ? CMD18 : CMD17; /* READ_MULTIPLE_BLOCK : READ_SINGLE_BLOCK */ + cmd = count > 1 ? CMD18 : CMD17; // READ_MULTIPLE_BLOCK : READ_SINGLE_BLOCK if (send_cmd(cmd, sector) == 0) { do { if (!rcvr_datablock(buff, 512)) break; buff += 512; } while (--count); - if (cmd == CMD18) send_cmd(CMD12, 0); /* STOP_TRANSMISSION */ + if (cmd == CMD18) send_cmd(CMD12, 0); // STOP_TRANSMISSION } deselect(); - return count ? RES_ERROR : RES_OK; /* Return result */ + return count ? RES_ERROR : RES_OK; // Return result } /*-----------------------------------------------------------------------*/ @@ -366,36 +370,36 @@ DRESULT disk_read ( #if _DISKIO_WRITE DRESULT disk_write( - BYTE drv, /* Physical drive number (0) */ - const BYTE *buff, /* Ponter to the data to write */ - DWORD sector, /* Start sector number (LBA) */ - UINT count /* Number of sectors to write (1..128) */ + BYTE drv, // Physical drive number (0) + const BYTE *buff, // Pointer to the data to write + DWORD sector, // Start sector number (LBA) + UINT count // Number of sectors to write (1..128) ) { - if (drv || !count) return RES_PARERR; /* Check parameter */ - if (Stat & STA_NOINIT) return RES_NOTRDY; /* Check drive status */ - if (Stat & STA_PROTECT) return RES_WRPRT; /* Check write protect */ + if (drv || !count) return RES_PARERR; // Check parameter + if (Stat & STA_NOINIT) return RES_NOTRDY; // Check drive status + if (Stat & STA_PROTECT) return RES_WRPRT; // Check write protect FCLK_FAST(); - if (!(CardType & CT_BLOCK)) sector *= 512; /* LBA ==> BA conversion (byte addressing cards) */ + if (!(CardType & CT_BLOCK)) sector *= 512; // LBA ==> BA conversion (byte addressing cards) - if (count == 1) { /* Single sector write */ - if ((send_cmd(CMD24, sector) == 0) /* WRITE_BLOCK */ + if (count == 1) { // Single sector write + if ((send_cmd(CMD24, sector) == 0) // WRITE_BLOCK && xmit_datablock(buff, 0xFE)) { count = 0; } } - else { /* Multiple sector write */ - if (CardType & CT_SDC) send_cmd(ACMD23, count); /* Predefine number of sectors */ - if (send_cmd(CMD25, sector) == 0) { /* WRITE_MULTIPLE_BLOCK */ + else { // Multiple sector write + if (CardType & CT_SDC) send_cmd(ACMD23, count); // Predefine number of sectors + if (send_cmd(CMD25, sector) == 0) { // WRITE_MULTIPLE_BLOCK do { if (!xmit_datablock(buff, 0xFC)) break; buff += 512; } while (--count); - if (!xmit_datablock(0, 0xFD)) count = 1; /* STOP_TRAN token */ + if (!xmit_datablock(0, 0xFD)) count = 1; // STOP_TRAN token } } deselect(); - return count ? RES_ERROR : RES_OK; /* Return result */ + return count ? RES_ERROR : RES_OK; // Return result } #endif // _DISKIO_WRITE @@ -407,9 +411,9 @@ DRESULT disk_read ( #if _DISKIO_IOCTL DRESULT disk_ioctl ( - BYTE drv, /* Physical drive number (0) */ - BYTE cmd, /* Control command code */ - void *buff /* Pointer to the conrtol data */ + BYTE drv, // Physical drive number (0) + BYTE cmd, // Control command code + void *buff // Pointer to the conrtol data ) { DRESULT res; BYTE n, csd[16], *ptr = (BYTE *)buff; @@ -420,22 +424,23 @@ DRESULT disk_read ( UINT dc; #endif - if (drv) return RES_PARERR; /* Check parameter */ - if (Stat & STA_NOINIT) return RES_NOTRDY; /* Check if drive is ready */ + if (drv) return RES_PARERR; // Check parameter + if (Stat & STA_NOINIT) return RES_NOTRDY; // Check if drive is ready res = RES_ERROR; FCLK_FAST(); switch (cmd) { - case CTRL_SYNC: /* Wait for end of internal write process of the drive */ + case CTRL_SYNC: // Wait for end of internal write process of the drive if (select()) res = RES_OK; break; - case GET_SECTOR_COUNT: /* Get drive capacity in unit of sector (DWORD) */ + case GET_SECTOR_COUNT: // Get drive capacity in unit of sector (DWORD) if ((send_cmd(CMD9, 0) == 0) && rcvr_datablock(csd, 16)) { - if ((csd[0] >> 6) == 1) { /* SDC ver 2.00 */ + if ((csd[0] >> 6) == 1) { // SDC ver 2.00 csize = csd[9] + ((WORD)csd[8] << 8) + ((DWORD)(csd[7] & 63) << 16) + 1; *(DWORD*)buff = csize << 10; - } else { /* SDC ver 1.XX or MMC ver 3 */ + } + else { // SDC ver 1.XX or MMC ver 3 n = (csd[5] & 15) + ((csd[10] & 128) >> 7) + ((csd[9] & 3) << 1) + 2; csize = (csd[8] >> 6) + ((WORD)csd[7] << 2) + ((WORD)(csd[6] & 3) << 10) + 1; *(DWORD*)buff = csize << (n - 9); @@ -444,21 +449,23 @@ DRESULT disk_read ( } break; - case GET_BLOCK_SIZE: /* Get erase block size in unit of sector (DWORD) */ - if (CardType & CT_SD2) { /* SDC ver 2.00 */ - if (send_cmd(ACMD13, 0) == 0) { /* Read SD status */ + case GET_BLOCK_SIZE: // Get erase block size in unit of sector (DWORD) + if (CardType & CT_SD2) { // SDC ver 2.00 + if (send_cmd(ACMD13, 0) == 0) { // Read SD status xchg_spi(0xFF); - if (rcvr_datablock(csd, 16)) { /* Read partial block */ - for (n = 64 - 16; n; n--) xchg_spi(0xFF); /* Purge trailing data */ + if (rcvr_datablock(csd, 16)) { // Read partial block + for (n = 64 - 16; n; n--) xchg_spi(0xFF); // Purge trailing data *(DWORD*)buff = 16UL << (csd[10] >> 4); res = RES_OK; } } - } else { /* SDC ver 1.XX or MMC */ - if ((send_cmd(CMD9, 0) == 0) && rcvr_datablock(csd, 16)) { /* Read CSD */ - if (CardType & CT_SD1) { /* SDC ver 1.XX */ + } + else { // SDC ver 1.XX or MMC + if ((send_cmd(CMD9, 0) == 0) && rcvr_datablock(csd, 16)) { // Read CSD + if (CardType & CT_SD1) { // SDC ver 1.XX *(DWORD*)buff = (((csd[10] & 63) << 1) + ((WORD)(csd[11] & 128) >> 7) + 1) << ((csd[13] >> 6) - 1); - } else { /* MMC */ + } + else { // MMC *(DWORD*)buff = ((WORD)((csd[10] & 124) >> 2) + 1) * (((csd[11] & 3) << 3) + ((csd[11] & 224) >> 5) + 1); } res = RES_OK; @@ -466,47 +473,47 @@ DRESULT disk_read ( } break; - case CTRL_TRIM: /* Erase a block of sectors (used when _USE_TRIM in ffconf.h is 1) */ - if (!(CardType & CT_SDC)) break; /* Check if the card is SDC */ - if (disk_ioctl(drv, MMC_GET_CSD, csd)) break; /* Get CSD */ - if (!(csd[0] >> 6) && !(csd[10] & 0x40)) break; /* Check if sector erase can be applied to the card */ - dp = (DWORD *)buff; st = dp[0]; ed = dp[1]; /* Load sector block */ + case CTRL_TRIM: // Erase a block of sectors (used when _USE_TRIM in ffconf.h is 1) + if (!(CardType & CT_SDC)) break; // Check if the card is SDC + if (disk_ioctl(drv, MMC_GET_CSD, csd)) break; // Get CSD + if (!(csd[0] >> 6) && !(csd[10] & 0x40)) break; // Check if sector erase can be applied to the card + dp = (DWORD *)buff; st = dp[0]; ed = dp[1]; // Load sector block if (!(CardType & CT_BLOCK)) { st *= 512; ed *= 512; } - if (send_cmd(CMD32, st) == 0 && send_cmd(CMD33, ed) == 0 && send_cmd(CMD38, 0) == 0 && wait_ready(30000)) { /* Erase sector block */ - res = RES_OK; /* FatFs does not check result of this command */ + if (send_cmd(CMD32, st) == 0 && send_cmd(CMD33, ed) == 0 && send_cmd(CMD38, 0) == 0 && wait_ready(30000)) { // Erase sector block + res = RES_OK; // FatFs does not check result of this command } break; - /* Following commands are never used by FatFs module */ + // The following commands are never used by FatFs module - case MMC_GET_TYPE: /* Get MMC/SDC type (BYTE) */ + case MMC_GET_TYPE: // Get MMC/SDC type (BYTE) *ptr = CardType; res = RES_OK; break; - case MMC_GET_CSD: /* Read CSD (16 bytes) */ - if (send_cmd(CMD9, 0) == 0 && rcvr_datablock(ptr, 16)) { /* READ_CSD */ + case MMC_GET_CSD: // Read CSD (16 bytes) + if (send_cmd(CMD9, 0) == 0 && rcvr_datablock(ptr, 16)) { res = RES_OK; } break; - case MMC_GET_CID: /* Read CID (16 bytes) */ - if (send_cmd(CMD10, 0) == 0 && rcvr_datablock(ptr, 16)) { /* READ_CID */ + case MMC_GET_CID: // Read CID (16 bytes) + if (send_cmd(CMD10, 0) == 0 && rcvr_datablock(ptr, 16)) { res = RES_OK; } break; - case MMC_GET_OCR: /* Read OCR (4 bytes) */ - if (send_cmd(CMD58, 0) == 0) { /* READ_OCR */ + case MMC_GET_OCR: // Read OCR (4 bytes) + if (send_cmd(CMD58, 0) == 0) { for (n = 4; n; n--) *ptr++ = xchg_spi(0xFF); res = RES_OK; } break; - case MMC_GET_SDSTAT: /* Read SD status (64 bytes) */ - if (send_cmd(ACMD13, 0) == 0) { /* SD_STATUS */ + case MMC_GET_SDSTAT: // Read SD status (64 bytes) + if (send_cmd(ACMD13, 0) == 0) { xchg_spi(0xFF); if (rcvr_datablock(ptr, 64)) res = RES_OK; } diff --git a/Marlin/src/HAL/STM32F1/onboard_sd.h b/Marlin/src/HAL/STM32F1/onboard_sd.h index 1dc7ec5b3bfa..f228d068c9db 100644 --- a/Marlin/src/HAL/STM32F1/onboard_sd.h +++ b/Marlin/src/HAL/STM32F1/onboard_sd.h @@ -7,8 +7,8 @@ #pragma once #define _DISKIO_WRITE 1 /* 1: Enable disk_write function */ -#define _DISKIO_IOCTL 1 /* 1: Enable disk_ioctl fucntion */ -#define _DISKIO_ISDIO 0 /* 1: Enable iSDIO control fucntion */ +#define _DISKIO_IOCTL 1 /* 1: Enable disk_ioctl function */ +#define _DISKIO_ISDIO 0 /* 1: Enable iSDIO control function */ typedef unsigned char BYTE; typedef unsigned short WORD; @@ -48,7 +48,7 @@ DRESULT disk_read(BYTE pdrv, BYTE* buff, DWORD sector, UINT count); DRESULT disk_write(BYTE pdrv, const BYTE* buff, DWORD sector, UINT count); #endif #if _DISKIO_IOCTL - DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void* buff); + DRESULT disk_ioctl(BYTE pdrv, BYTE cmd, void *buff); #endif /* Disk Status Bits (DSTATUS) */ @@ -56,7 +56,7 @@ DRESULT disk_read(BYTE pdrv, BYTE* buff, DWORD sector, UINT count); #define STA_NODISK 0x02 /* No medium in the drive */ #define STA_PROTECT 0x04 /* Write protected */ -/* Command code for disk_ioctrl fucntion */ +/* Command code for disk_ioctrl function */ /* Generic command (Used by FatFs) */ #define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */ diff --git a/Marlin/src/HAL/STM32F1/pinsDebug.h b/Marlin/src/HAL/STM32F1/pinsDebug.h index 8e7a3d8135fd..27f4b6732bfb 100644 --- a/Marlin/src/HAL/STM32F1/pinsDebug.h +++ b/Marlin/src/HAL/STM32F1/pinsDebug.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -19,15 +22,15 @@ #pragma once /** - * Support routines for STM32GENERIC (Maple) + * Support routines for MAPLE_STM32F1 */ /** * Translation of routines & variables used by pinsDebug.h */ -#ifndef BOARD_NR_GPIO_PINS // Only in STM32GENERIC (Maple) - #error "Expected BOARD_NR_GPIO_PINS not found" +#ifndef BOARD_NR_GPIO_PINS // Only in MAPLE_STM32F1 + #error "Expected BOARD_NR_GPIO_PINS not found" #endif #include "fastio.h" @@ -41,6 +44,7 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS]; #define pwm_status(pin) PWM_PIN(pin) #define digitalRead_mod(p) extDigitalRead(p) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%3hd "), int16_t(p)); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define PRINT_PORT(p) print_port(p) #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define MULTI_NAME_PAD 21 // space needed to be pretty if not first name assigned to a pin diff --git a/Marlin/src/HAL/STM32F1/sdio.cpp b/Marlin/src/HAL/STM32F1/sdio.cpp index ffa6db1206ae..6e41d2cbf1b4 100644 --- a/Marlin/src/HAL/STM32F1/sdio.cpp +++ b/Marlin/src/HAL/STM32F1/sdio.cpp @@ -184,6 +184,10 @@ bool SDIO_WriteBlock(uint32_t blockAddress, const uint8_t *data) { inline uint32_t SDIO_GetCardState() { return SDIO_CmdSendStatus(SdCard.RelCardAdd << 16U) ? (SDIO_GetResponse(SDIO_RESP1) >> 9U) & 0x0FU : SDIO_CARD_ERROR; } +// No F1 board with SDIO + MSC using Maple, that I aware of... +bool SDIO_IsReady() { return true; } +uint32_t SDIO_GetCardSize() { return 0; } + // ------------------------ // SD Commands and Responses // ------------------------ diff --git a/Marlin/src/HAL/STM32F1/spi_pins.h b/Marlin/src/HAL/STM32F1/spi_pins.h index 7d650ffe373f..3d3c8f8d2f18 100644 --- a/Marlin/src/HAL/STM32F1/spi_pins.h +++ b/Marlin/src/HAL/STM32F1/spi_pins.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp b/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp index 1095389946ad..9bf6bbb32bc7 100644 --- a/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp +++ b/Marlin/src/HAL/STM32F1/tft/tft_spi.cpp @@ -26,36 +26,20 @@ #include "tft_spi.h" -// TFT_SPI tft; - SPIClass TFT_SPI::SPIx(1); -#define TFT_CS_H OUT_WRITE(TFT_CS_PIN, HIGH) -#define TFT_CS_L OUT_WRITE(TFT_CS_PIN, LOW) - -#define TFT_DC_H OUT_WRITE(TFT_DC_PIN, HIGH) -#define TFT_DC_L OUT_WRITE(TFT_DC_PIN, LOW) - -#define TFT_RST_H OUT_WRITE(TFT_RST_PIN, HIGH) -#define TFT_RST_L OUT_WRITE(TFT_RST_PIN, LOW) - -#define TFT_BLK_H OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH) -#define TFT_BLK_L OUT_WRITE(TFT_BACKLIGHT_PIN, LOW) - void TFT_SPI::Init() { #if PIN_EXISTS(TFT_RESET) - // OUT_WRITE(TFT_RESET_PIN, HIGH); - TFT_RST_H; + OUT_WRITE(TFT_RST_PIN, HIGH); delay(100); #endif #if PIN_EXISTS(TFT_BACKLIGHT) - // OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); - TFT_BLK_H; + OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); #endif - TFT_DC_H; - TFT_CS_H; + OUT_WRITE(TFT_DC_PIN, HIGH); + OUT_WRITE(TFT_CS_PIN, HIGH); /** * STM32F1 APB2 = 72MHz, APB1 = 36MHz, max SPI speed of this MCU if 18Mhz @@ -87,15 +71,23 @@ void TFT_SPI::Init() { void TFT_SPI::DataTransferBegin(uint16_t DataSize) { SPIx.setDataSize(DataSize); SPIx.begin(); - TFT_CS_L; + OUT_WRITE(TFT_CS_PIN, LOW); } +#ifdef TFT_DEFAULT_DRIVER + #include "../../../lcd/tft_io/tft_ids.h" +#endif + uint32_t TFT_SPI::GetID() { uint32_t id; id = ReadID(LCD_READ_ID); - - if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) + if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) { id = ReadID(LCD_READ_ID4); + #ifdef TFT_DEFAULT_DRIVER + if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF) + id = TFT_DEFAULT_DRIVER; + #endif + } return id; } @@ -121,28 +113,16 @@ uint32_t TFT_SPI::ReadID(uint16_t Reg) { #endif } -bool TFT_SPI::isBusy() { - return false; -} +bool TFT_SPI::isBusy() { return false; } -void TFT_SPI::Abort() { - DataTransferEnd(); -} +void TFT_SPI::Abort() { DataTransferEnd(); } -void TFT_SPI::Transmit(uint16_t Data) { - SPIx.send(Data); -} +void TFT_SPI::Transmit(uint16_t Data) { SPIx.send(Data); } void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Count) { DataTransferBegin(); - TFT_DC_H; - if (MemoryIncrease == DMA_MINC_ENABLE) { - SPIx.dmaSend(Data, Count, true); - } - else { - SPIx.dmaSend(Data, Count, false); - } - + OUT_WRITE(TFT_DC_PIN, HIGH); + SPIx.dmaSend(Data, Count, MemoryIncrease == DMA_MINC_ENABLE); DataTransferEnd(); } diff --git a/Marlin/src/HAL/STM32F1/tft/xpt2046.cpp b/Marlin/src/HAL/STM32F1/tft/xpt2046.cpp index 98371c5ffb85..ac9ad072aa05 100644 --- a/Marlin/src/HAL/STM32F1/tft/xpt2046.cpp +++ b/Marlin/src/HAL/STM32F1/tft/xpt2046.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if HAS_TFT_XPT2046 || HAS_TOUCH_BUTTONS +#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS #include "xpt2046.h" #include diff --git a/Marlin/src/HAL/STM32F1/tft/xpt2046.h b/Marlin/src/HAL/STM32F1/tft/xpt2046.h index 65602bda0f40..aba0799e445f 100644 --- a/Marlin/src/HAL/STM32F1/tft/xpt2046.h +++ b/Marlin/src/HAL/STM32F1/tft/xpt2046.h @@ -54,7 +54,7 @@ enum XPTCoordinate : uint8_t { XPT2046_Z2 = 0x40 | XPT2046_CONTROL | XPT2046_DFR_MODE, }; -#if !defined(XPT2046_Z1_THRESHOLD) +#ifndef XPT2046_Z1_THRESHOLD #define XPT2046_Z1_THRESHOLD 10 #endif diff --git a/Marlin/src/HAL/STM32F1/timers.h b/Marlin/src/HAL/STM32F1/timers.h index 3e2e7775f1e3..c89d55a134b4 100644 --- a/Marlin/src/HAL/STM32F1/timers.h +++ b/Marlin/src/HAL/STM32F1/timers.h @@ -25,9 +25,10 @@ * HAL for stm32duino.com based on Libmaple and compatible (STM32F1) */ -#include +#include "../../inc/MarlinConfig.h" +#include "HAL.h" + #include -#include "../../core/boards.h" // ------------------------ // Defines @@ -37,7 +38,6 @@ * TODO: Check and confirm what timer we will use for each Temps and stepper driving. * We should probable drive temps with PWM. */ -#define FORCE_INLINE __attribute__((always_inline)) inline typedef uint16_t hal_timer_t; #define HAL_TIMER_TYPE_MAX 0xFFFF @@ -80,7 +80,7 @@ typedef uint16_t hal_timer_t; //#define TEMP_TIMER_NUM 4 // 2->4, Timer 2 for Stepper Current PWM #endif -#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE) +#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_E3_DIP, BTT_SKR_MINI_E3_V1_2, MKS_ROBIN_LITE, MKS_ROBIN_E3D, MKS_ROBIN_E3) // SKR Mini E3 boards use PA8 as FAN_PIN, so TIMER 1 is used for Fan PWM. #ifdef STM32_HIGH_DENSITY #define SERVO0_TIMER_NUM 8 // tone.cpp uses Timer 4 @@ -166,7 +166,7 @@ FORCE_INLINE static void HAL_timer_set_compare(const uint8_t timer_num, const ha case STEP_TIMER_NUM: // NOTE: WE have set ARPE = 0, which means the Auto reload register is not preloaded // and there is no need to use any compare, as in the timer mode used, setting ARR to the compare value - // will result in exactly the same effect, ie trigerring an interrupt, and on top, set counter to 0 + // will result in exactly the same effect, ie triggering an interrupt, and on top, set counter to 0 timer_set_reload(STEP_TIMER_DEV, compare); // We reload direct ARR as needed during counting up break; case TEMP_TIMER_NUM: diff --git a/Marlin/src/HAL/TEENSY31_32/HAL.cpp b/Marlin/src/HAL/TEENSY31_32/HAL.cpp index 51636d29bf14..f08cf799e9e8 100644 --- a/Marlin/src/HAL/TEENSY31_32/HAL.cpp +++ b/Marlin/src/HAL/TEENSY31_32/HAL.cpp @@ -31,7 +31,13 @@ #include -DefaultSerial MSerial(false); +#define _IMPLEMENT_SERIAL(X) DefaultSerial##X MSerial##X(false, Serial##X) +#define IMPLEMENT_SERIAL(X) _IMPLEMENT_SERIAL(X) +#if WITHIN(SERIAL_PORT, 0, 3) + IMPLEMENT_SERIAL(SERIAL_PORT); +#else + #error "SERIAL_PORT must be from 0 to 3." +#endif USBSerialType USBSerial(false, SerialUSB); uint16_t HAL_adc_result; @@ -72,6 +78,8 @@ uint8_t HAL_get_reset_source() { return 0; } +void HAL_reboot() { _reboot_Teensyduino_(); } + extern "C" { extern char __bss_end; extern char __heap_start; diff --git a/Marlin/src/HAL/TEENSY31_32/HAL.h b/Marlin/src/HAL/TEENSY31_32/HAL.h index 5273b3863774..aa195845fb17 100644 --- a/Marlin/src/HAL/TEENSY31_32/HAL.h +++ b/Marlin/src/HAL/TEENSY31_32/HAL.h @@ -34,12 +34,11 @@ #include "fastio.h" #include "watchdog.h" - #include -#define ST7920_DELAY_1 DELAY_NS(600) -#define ST7920_DELAY_2 DELAY_NS(750) -#define ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 //#undef MOTHERBOARD //#define MOTHERBOARD BOARD_TEENSY31_32 @@ -51,19 +50,26 @@ #endif #include "../../core/serial_hook.h" -typedef Serial0Type DefaultSerial; -extern DefaultSerial MSerial; -typedef ForwardSerial0Type USBSerialType; + +#define Serial0 Serial +#define _DECLARE_SERIAL(X) \ + typedef ForwardSerial1Class DefaultSerial##X; \ + extern DefaultSerial##X MSerial##X +#define DECLARE_SERIAL(X) _DECLARE_SERIAL(X) + +typedef ForwardSerial1Class USBSerialType; extern USBSerialType USBSerial; #define _MSERIAL(X) MSerial##X #define MSERIAL(X) _MSERIAL(X) -#define MSerial0 MSerial #if SERIAL_PORT == -1 - #define MYSERIAL0 USBSerial + #define MYSERIAL1 USBSerial #elif WITHIN(SERIAL_PORT, 0, 3) - #define MYSERIAL0 MSERIAL(SERIAL_PORT) + DECLARE_SERIAL(SERIAL_PORT); + #define MYSERIAL1 MSERIAL(SERIAL_PORT) +#else + #error "The required SERIAL_PORT must be from 0 to 3, or -1 for Native USB." #endif #define HAL_SERVO_LIB libServo @@ -88,7 +94,7 @@ void HAL_clear_reset_source(); // Get the reason for the reset uint8_t HAL_get_reset_source(); -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); } diff --git a/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp b/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp index dce236ef6bd0..415c69222986 100644 --- a/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp +++ b/Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp @@ -21,11 +21,12 @@ */ #ifdef __MK20DX256__ +#include "../../inc/MarlinConfig.h" #include "HAL.h" + #include #include #include "spi_pins.h" -#include "../../core/macros.h" static SPISettings spiConfig; @@ -35,10 +36,9 @@ static SPISettings spiConfig; // Initialize SPI bus void spiBegin() { - #if !PIN_EXISTS(SD_SS) - #error "SD_SS_PIN not defined!" + #if PIN_EXISTS(SD_SS) + OUT_WRITE(SD_SS_PIN, HIGH); #endif - OUT_WRITE(SD_SS_PIN, HIGH); SET_OUTPUT(SD_SCK_PIN); SET_INPUT(SD_MISO_PIN); SET_OUTPUT(SD_MOSI_PIN); @@ -64,7 +64,7 @@ void spiInit(uint8_t spiRate) { case SPI_EIGHTH_SPEED: clock = 1250000; break; case SPI_SPEED_5: clock = 625000; break; case SPI_SPEED_6: clock = 312500; break; - default: clock = 4000000; // Default from the SPI libarary + default: clock = 4000000; // Default from the SPI library } spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0); SPI.begin(); @@ -82,7 +82,7 @@ uint8_t spiRec() { } // SPI read data -void spiRead(uint8_t* buf, uint16_t nbyte) { +void spiRead(uint8_t *buf, uint16_t nbyte) { SPI.beginTransaction(spiConfig); SPI.transfer(buf, nbyte); SPI.endTransaction(); @@ -107,7 +107,7 @@ void spiSend(uint8_t b) { } // SPI send block -void spiSendBlock(uint8_t token, const uint8_t* buf) { +void spiSendBlock(uint8_t token, const uint8_t *buf) { SPI.beginTransaction(spiConfig); SPDR = token; for (uint16_t i = 0; i < 512; i += 2) { diff --git a/Marlin/src/HAL/TEENSY31_32/MarlinSPI.h b/Marlin/src/HAL/TEENSY31_32/MarlinSPI.h new file mode 100644 index 000000000000..0c447ba4cb3d --- /dev/null +++ b/Marlin/src/HAL/TEENSY31_32/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/TEENSY31_32/eeprom.cpp b/Marlin/src/HAL/TEENSY31_32/eeprom.cpp index f2ae5dd534ec..d1ff9408229f 100644 --- a/Marlin/src/HAL/TEENSY31_32/eeprom.cpp +++ b/Marlin/src/HAL/TEENSY31_32/eeprom.cpp @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -16,16 +19,17 @@ * along with this program. If not, see . * */ -#ifdef __MK20DX256__ -#include "../../inc/MarlinConfig.h" - -#if USE_WIRED_EEPROM +#ifdef __MK20DX256__ /** * HAL PersistentStore for Teensy 3.2 (MK20DX256) */ +#include "../../inc/MarlinConfig.h" + +#if USE_WIRED_EEPROM + #include "../shared/eeprom_api.h" #include @@ -38,13 +42,13 @@ bool PersistentStore::access_start() { return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { uint8_t * const p = (uint8_t * const)pos; uint8_t v = *value; - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; diff --git a/Marlin/src/HAL/TEENSY31_32/endstop_interrupts.h b/Marlin/src/HAL/TEENSY31_32/endstop_interrupts.h index 999ada512761..9c7e2104882e 100644 --- a/Marlin/src/HAL/TEENSY31_32/endstop_interrupts.h +++ b/Marlin/src/HAL/TEENSY31_32/endstop_interrupts.h @@ -64,4 +64,10 @@ void setup_endstop_interrupts() { TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); } diff --git a/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h b/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h index 3932ee6a76c1..1efa76b1e9df 100644 --- a/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h +++ b/Marlin/src/HAL/TEENSY31_32/inc/SanityCheck.h @@ -34,5 +34,9 @@ #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on this platform." + #error "TMC220x Software Serial is not supported on Teensy 3.1/3.2." +#endif + +#if ENABLED(POSTMORTEM_DEBUGGING) + #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.1/3.2." #endif diff --git a/Marlin/src/HAL/TEENSY35_36/HAL.cpp b/Marlin/src/HAL/TEENSY35_36/HAL.cpp index 547681de5f12..046c00b56ed5 100644 --- a/Marlin/src/HAL/TEENSY35_36/HAL.cpp +++ b/Marlin/src/HAL/TEENSY35_36/HAL.cpp @@ -31,7 +31,12 @@ #include -DefaultSerial MSerial(false); +#define _IMPLEMENT_SERIAL(X) DefaultSerial##X MSerial##X(false, Serial##X) +#define IMPLEMENT_SERIAL(X) _IMPLEMENT_SERIAL(X) +#if WITHIN(SERIAL_PORT, 0, 3) + IMPLEMENT_SERIAL(SERIAL_PORT); +#endif + USBSerialType USBSerial(false, SerialUSB); uint16_t HAL_adc_result, HAL_adc_select; @@ -81,6 +86,8 @@ uint8_t HAL_get_reset_source() { return 0; } +void HAL_reboot() { _reboot_Teensyduino_(); } + extern "C" { extern char __bss_end; extern char __heap_start; diff --git a/Marlin/src/HAL/TEENSY35_36/HAL.h b/Marlin/src/HAL/TEENSY35_36/HAL.h index 94c514bf6275..0093294a2aa5 100644 --- a/Marlin/src/HAL/TEENSY35_36/HAL.h +++ b/Marlin/src/HAL/TEENSY35_36/HAL.h @@ -37,9 +37,9 @@ #include #include -#define ST7920_DELAY_1 DELAY_NS(600) -#define ST7920_DELAY_2 DELAY_NS(750) -#define ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // ------------------------ // Defines @@ -54,19 +54,26 @@ #endif #include "../../core/serial_hook.h" -typedef Serial0Type DefaultSerial; -extern DefaultSerial MSerial; -typedef ForwardSerial0Type USBSerialType; + +#define Serial0 Serial +#define _DECLARE_SERIAL(X) \ + typedef ForwardSerial1Class DefaultSerial##X; \ + extern DefaultSerial##X MSerial##X +#define DECLARE_SERIAL(X) _DECLARE_SERIAL(X) + +typedef ForwardSerial1Class USBSerialType; extern USBSerialType USBSerial; #define _MSERIAL(X) MSerial##X #define MSERIAL(X) _MSERIAL(X) -#define MSerial0 MSerial #if SERIAL_PORT == -1 - #define MYSERIAL0 USBSerial + #define MYSERIAL1 USBSerial #elif WITHIN(SERIAL_PORT, 0, 3) - #define MYSERIAL0 MSERIAL(SERIAL_PORT) + #define MYSERIAL1 MSERIAL(SERIAL_PORT) + DECLARE_SERIAL(SERIAL_PORT); +#else + #error "SERIAL_PORT must be from 0 to 3, or -1 for Native USB." #endif #define HAL_SERVO_LIB libServo @@ -94,7 +101,7 @@ void HAL_clear_reset_source(); // Reset reason uint8_t HAL_get_reset_source(); -inline void HAL_reboot() {} // reboot the board or restart the bootloader +void HAL_reboot(); FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); } diff --git a/Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp b/Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp index 84852cd3580d..d80f57b2c436 100644 --- a/Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp +++ b/Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp @@ -26,19 +26,19 @@ #if defined(__MK64FX512__) || defined(__MK66FX1M0__) +#include "../../inc/MarlinConfig.h" #include "HAL.h" + #include #include #include "spi_pins.h" -#include "../../core/macros.h" static SPISettings spiConfig; void spiBegin() { - #if !PIN_EXISTS(SD_SS) - #error "SD_SS_PIN not defined!" + #if PIN_EXISTS(SD_SS) + OUT_WRITE(SD_SS_PIN, HIGH); #endif - OUT_WRITE(SD_SS_PIN, HIGH); SET_OUTPUT(SD_SCK_PIN); SET_INPUT(SD_MISO_PIN); SET_OUTPUT(SD_MOSI_PIN); @@ -64,7 +64,7 @@ void spiInit(uint8_t spiRate) { case SPI_SPEED_5: clock = 625000; break; case SPI_SPEED_6: clock = 312500; break; default: - clock = 4000000; // Default from the SPI libarary + clock = 4000000; // Default from the SPI library } spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0); SPI.begin(); @@ -80,7 +80,7 @@ uint8_t spiRec() { //return SPDR; } -void spiRead(uint8_t* buf, uint16_t nbyte) { +void spiRead(uint8_t *buf, uint16_t nbyte) { SPI.beginTransaction(spiConfig); SPI.transfer(buf, nbyte); SPI.endTransaction(); @@ -103,7 +103,7 @@ void spiSend(uint8_t b) { //while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } } -void spiSendBlock(uint8_t token, const uint8_t* buf) { +void spiSendBlock(uint8_t token, const uint8_t *buf) { SPI.beginTransaction(spiConfig); SPDR = token; for (uint16_t i = 0; i < 512; i += 2) { diff --git a/Marlin/src/HAL/TEENSY35_36/MarlinSPI.h b/Marlin/src/HAL/TEENSY35_36/MarlinSPI.h new file mode 100644 index 000000000000..0c447ba4cb3d --- /dev/null +++ b/Marlin/src/HAL/TEENSY35_36/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/TEENSY35_36/eeprom.cpp b/Marlin/src/HAL/TEENSY35_36/eeprom.cpp index 8cd6b4ff41d7..b80e93b536a5 100644 --- a/Marlin/src/HAL/TEENSY35_36/eeprom.cpp +++ b/Marlin/src/HAL/TEENSY35_36/eeprom.cpp @@ -42,13 +42,13 @@ bool PersistentStore::access_start() { return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { uint8_t * const p = (uint8_t * const)pos; uint8_t v = *value; - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; diff --git a/Marlin/src/HAL/TEENSY35_36/endstop_interrupts.h b/Marlin/src/HAL/TEENSY35_36/endstop_interrupts.h index 87e6a7507abc..a30024888535 100644 --- a/Marlin/src/HAL/TEENSY35_36/endstop_interrupts.h +++ b/Marlin/src/HAL/TEENSY35_36/endstop_interrupts.h @@ -63,4 +63,10 @@ void setup_endstop_interrupts() { TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); } diff --git a/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h b/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h index ee80e42696fa..eef2850550eb 100644 --- a/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h +++ b/Marlin/src/HAL/TEENSY35_36/inc/SanityCheck.h @@ -34,5 +34,9 @@ #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on this platform." + #error "TMC220x Software Serial is not supported on Teensy 3.5/3.6." +#endif + +#if ENABLED(POSTMORTEM_DEBUGGING) + #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 3.5/3.6." #endif diff --git a/Marlin/src/HAL/TEENSY35_36/pinsDebug.h b/Marlin/src/HAL/TEENSY35_36/pinsDebug.h index e529fa93be16..7a2e1d6e592e 100644 --- a/Marlin/src/HAL/TEENSY35_36/pinsDebug.h +++ b/Marlin/src/HAL/TEENSY35_36/pinsDebug.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or diff --git a/Marlin/src/HAL/TEENSY40_41/HAL.cpp b/Marlin/src/HAL/TEENSY40_41/HAL.cpp index 26449d7eb298..ccc8c2659c65 100644 --- a/Marlin/src/HAL/TEENSY40_41/HAL.cpp +++ b/Marlin/src/HAL/TEENSY40_41/HAL.cpp @@ -26,13 +26,18 @@ #ifdef __IMXRT1062__ +#include "../../inc/MarlinConfig.h" #include "HAL.h" + #include "../shared/Delay.h" #include "timers.h" - #include -DefaultSerial MSerial(false); +#define _IMPLEMENT_SERIAL(X) DefaultSerial##X MSerial##X(false, Serial##X) +#define IMPLEMENT_SERIAL(X) _IMPLEMENT_SERIAL(X) +#if WITHIN(SERIAL_PORT, 0, 3) + IMPLEMENT_SERIAL(SERIAL_PORT); +#endif USBSerialType USBSerial(false, SerialUSB); uint16_t HAL_adc_result, HAL_adc_select; @@ -116,6 +121,8 @@ uint8_t HAL_get_reset_source() { return 0; } +void HAL_reboot() { _reboot_Teensyduino_(); } + #define __bss_end _ebss extern "C" { diff --git a/Marlin/src/HAL/TEENSY40_41/HAL.h b/Marlin/src/HAL/TEENSY40_41/HAL.h index 6aa1e521a48b..ea51f15ba1b5 100644 --- a/Marlin/src/HAL/TEENSY40_41/HAL.h +++ b/Marlin/src/HAL/TEENSY40_41/HAL.h @@ -41,9 +41,9 @@ #include "../../feature/ethernet.h" #endif -//#define ST7920_DELAY_1 DELAY_NS(600) -//#define ST7920_DELAY_2 DELAY_NS(750) -//#define ST7920_DELAY_3 DELAY_NS(750) +#define CPU_ST7920_DELAY_1 600 +#define CPU_ST7920_DELAY_2 750 +#define CPU_ST7920_DELAY_3 750 // ------------------------ // Defines @@ -56,32 +56,36 @@ #endif #include "../../core/serial_hook.h" -typedef Serial0Type DefaultSerial; -extern DefaultSerial MSerial; -typedef ForwardSerial0Type USBSerialType; +#define Serial0 Serial +#define _DECLARE_SERIAL(X) \ + typedef ForwardSerial1Class DefaultSerial##X; \ + extern DefaultSerial##X MSerial##X +#define DECLARE_SERIAL(X) _DECLARE_SERIAL(X) + +typedef ForwardSerial1Class USBSerialType; extern USBSerialType USBSerial; #define _MSERIAL(X) MSerial##X #define MSERIAL(X) _MSERIAL(X) -#define MSerial0 MSerial #if SERIAL_PORT == -1 - #define MYSERIAL0 SerialUSB + #define MYSERIAL1 SerialUSB #elif WITHIN(SERIAL_PORT, 0, 8) - #define MYSERIAL0 MSERIAL(SERIAL_PORT) + DECLARE_SERIAL(SERIAL_PORT); + #define MYSERIAL1 MSERIAL(SERIAL_PORT) #else - #error "The required SERIAL_PORT must be from -1 to 8. Please update your configuration." + #error "The required SERIAL_PORT must be from 0 to 8, or -1 for Native USB." #endif #ifdef SERIAL_PORT_2 #if SERIAL_PORT_2 == -1 - #define MYSERIAL1 usbSerial + #define MYSERIAL2 usbSerial #elif SERIAL_PORT_2 == -2 - #define MYSERIAL1 ethernet.telnetClient + #define MYSERIAL2 ethernet.telnetClient #elif WITHIN(SERIAL_PORT_2, 0, 8) - #define MYSERIAL1 MSERIAL(SERIAL_PORT_2) + #define MYSERIAL2 MSERIAL(SERIAL_PORT_2) #else - #error "SERIAL_PORT_2 must be from -2 to 8. Please update your configuration." + #error "SERIAL_PORT_2 must be from 0 to 8, or -1 for Native USB, or -2 for Ethernet." #endif #endif @@ -117,6 +121,8 @@ void HAL_clear_reset_source(); // Reset reason uint8_t HAL_get_reset_source(); +void HAL_reboot(); + FORCE_INLINE void _delay_ms(const int delay_ms) { delay(delay_ms); } #if GCC_VERSION <= 50000 diff --git a/Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp b/Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp index 8c93049027ab..9dcb812faf0c 100644 --- a/Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp +++ b/Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp @@ -26,11 +26,12 @@ #ifdef __IMXRT1062__ +#include "../../inc/MarlinConfig.h" #include "HAL.h" + #include #include #include "spi_pins.h" -#include "../../core/macros.h" static SPISettings spiConfig; @@ -50,12 +51,9 @@ static SPISettings spiConfig; // ------------------------ void spiBegin() { - #ifndef SD_SS_PIN - #error "SD_SS_PIN is not defined!" + #if PIN_EXISTS(SD_SS) + OUT_WRITE(SD_SS_PIN, HIGH); #endif - - OUT_WRITE(SD_SS_PIN, HIGH); - //SET_OUTPUT(SD_SCK_PIN); //SET_INPUT(SD_MISO_PIN); //SET_OUTPUT(SD_MOSI_PIN); @@ -81,7 +79,7 @@ void spiInit(uint8_t spiRate) { case SPI_SPEED_5: clock = 625000; break; case SPI_SPEED_6: clock = 312500; break; default: - clock = 4000000; // Default from the SPI libarary + clock = 4000000; // Default from the SPI library } spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0); SPI.begin(); @@ -97,7 +95,7 @@ uint8_t spiRec() { //return SPDR; } -void spiRead(uint8_t* buf, uint16_t nbyte) { +void spiRead(uint8_t *buf, uint16_t nbyte) { SPI.beginTransaction(spiConfig); SPI.transfer(buf, nbyte); SPI.endTransaction(); @@ -120,7 +118,7 @@ void spiSend(uint8_t b) { //while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } } -void spiSendBlock(uint8_t token, const uint8_t* buf) { +void spiSendBlock(uint8_t token, const uint8_t *buf) { SPI.beginTransaction(spiConfig); SPDR = token; for (uint16_t i = 0; i < 512; i += 2) { diff --git a/Marlin/src/HAL/TEENSY40_41/MarlinSPI.h b/Marlin/src/HAL/TEENSY40_41/MarlinSPI.h new file mode 100644 index 000000000000..0c447ba4cb3d --- /dev/null +++ b/Marlin/src/HAL/TEENSY40_41/MarlinSPI.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +using MarlinSPI = SPIClass; diff --git a/Marlin/src/HAL/TEENSY40_41/eeprom.cpp b/Marlin/src/HAL/TEENSY40_41/eeprom.cpp index fe2de388a7a0..3cd376edce62 100644 --- a/Marlin/src/HAL/TEENSY40_41/eeprom.cpp +++ b/Marlin/src/HAL/TEENSY40_41/eeprom.cpp @@ -22,14 +22,14 @@ */ #ifdef __IMXRT1062__ -#include "../../inc/MarlinConfig.h" - -#if USE_WIRED_EEPROM - /** * HAL PersistentStore for Teensy 4.0 (IMXRT1062DVL6A) / 4.1 (IMXRT1062DVJ6A) */ +#include "../../inc/MarlinConfig.h" + +#if USE_WIRED_EEPROM + #include "../shared/eeprom_api.h" #include @@ -42,13 +42,13 @@ bool PersistentStore::access_start() { return true; } bool PersistentStore::access_finish() { return true; } bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) { + uint16_t written = 0; while (size--) { uint8_t * const p = (uint8_t * const)pos; uint8_t v = *value; - // EEPROM has only ~100,000 write cycles, - // so only write bytes that have changed! - if (v != eeprom_read_byte(p)) { + if (v != eeprom_read_byte(p)) { // EEPROM has only ~100,000 write cycles, so only write bytes that have changed! eeprom_write_byte(p, v); + if (++written & 0x7F) delay(2); else safe_delay(2); // Avoid triggering watchdog during long EEPROM writes if (eeprom_read_byte(p) != v) { SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE); return true; diff --git a/Marlin/src/HAL/TEENSY40_41/endstop_interrupts.h b/Marlin/src/HAL/TEENSY40_41/endstop_interrupts.h index a05e911668a7..4c3ddec9f1f1 100644 --- a/Marlin/src/HAL/TEENSY40_41/endstop_interrupts.h +++ b/Marlin/src/HAL/TEENSY40_41/endstop_interrupts.h @@ -63,4 +63,10 @@ void setup_endstop_interrupts() { TERN_(HAS_Z4_MAX, _ATTACH(Z4_MAX_PIN)); TERN_(HAS_Z4_MIN, _ATTACH(Z4_MIN_PIN)); TERN_(HAS_Z_MIN_PROBE_PIN, _ATTACH(Z_MIN_PROBE_PIN)); + TERN_(HAS_I_MAX, _ATTACH(I_MAX_PIN)); + TERN_(HAS_I_MIN, _ATTACH(I_MIN_PIN)); + TERN_(HAS_J_MAX, _ATTACH(J_MAX_PIN)); + TERN_(HAS_J_MIN, _ATTACH(J_MIN_PIN)); + TERN_(HAS_K_MAX, _ATTACH(K_MAX_PIN)); + TERN_(HAS_K_MIN, _ATTACH(K_MIN_PIN)); } diff --git a/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h b/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h index fbfe7b0fc3d4..3d2668d749bc 100644 --- a/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h +++ b/Marlin/src/HAL/TEENSY40_41/inc/SanityCheck.h @@ -34,5 +34,9 @@ #endif #if HAS_TMC_SW_SERIAL - #error "TMC220x Software Serial is not supported on this platform." + #error "TMC220x Software Serial is not supported on Teensy 4.0/4.1." +#endif + +#if ENABLED(POSTMORTEM_DEBUGGING) + #error "POSTMORTEM_DEBUGGING is not yet supported on Teensy 4.0/4.1." #endif diff --git a/Marlin/src/HAL/TEENSY40_41/pinsDebug.h b/Marlin/src/HAL/TEENSY40_41/pinsDebug.h index 4ad62d00fea5..94b85ea56861 100644 --- a/Marlin/src/HAL/TEENSY40_41/pinsDebug.h +++ b/Marlin/src/HAL/TEENSY40_41/pinsDebug.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -30,6 +33,7 @@ #define PRINT_PORT(p) #define PRINT_ARRAY_NAME(x) do{ sprintf_P(buffer, PSTR("%-" STRINGIFY(MAX_NAME_LENGTH) "s"), pin_array[x].name); SERIAL_ECHO(buffer); }while(0) #define PRINT_PIN(p) do{ sprintf_P(buffer, PSTR("%02d"), p); SERIAL_ECHO(buffer); }while(0) +#define PRINT_PIN_ANALOG(p) do{ sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); SERIAL_ECHO(buffer); }while(0) #define GET_ARRAY_PIN(p) pin_array[p].pin #define GET_ARRAY_IS_DIGITAL(p) pin_array[p].is_digital #define VALID_PIN(pin) (pin >= 0 && pin < (int8_t)NUMBER_PINS_TOTAL ? 1 : 0) diff --git a/Marlin/src/HAL/platforms.h b/Marlin/src/HAL/platforms.h index e0617bdf7fa5..28fe28e1094f 100644 --- a/Marlin/src/HAL/platforms.h +++ b/Marlin/src/HAL/platforms.h @@ -38,11 +38,16 @@ #elif defined(__STM32F1__) || defined(TARGET_STM32F1) #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32F1/NAME) #elif defined(ARDUINO_ARCH_STM32) + #ifndef HAL_STM32 + #define HAL_STM32 + #endif #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32/NAME) #elif defined(ARDUINO_ARCH_ESP32) #define HAL_PATH(PATH, NAME) XSTR(PATH/ESP32/NAME) #elif defined(__PLAT_LINUX__) #define HAL_PATH(PATH, NAME) XSTR(PATH/LINUX/NAME) +#elif defined(__PLAT_NATIVE_SIM__) + #define HAL_PATH(PATH, NAME) XSTR(PATH/NATIVE_SIM/NAME) #elif defined(__SAMD51__) #define HAL_PATH(PATH, NAME) XSTR(PATH/SAMD51/NAME) #else diff --git a/Marlin/src/HAL/shared/Delay.cpp b/Marlin/src/HAL/shared/Delay.cpp new file mode 100644 index 000000000000..32543c6d0abf --- /dev/null +++ b/Marlin/src/HAL/shared/Delay.cpp @@ -0,0 +1,176 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "Delay.h" + +#include "../../inc/MarlinConfig.h" + +#if defined(__arm__) || defined(__thumb__) + + static uint32_t ASM_CYCLES_PER_ITERATION = 4; // Initial bet which will be adjusted in calibrate_delay_loop + + // Simple assembler loop counting down + void delay_asm(uint32_t cy) { + cy = _MAX(cy / ASM_CYCLES_PER_ITERATION, 1U); // Zero is forbidden here + __asm__ __volatile__( + A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax + L("1") + A("subs %[cnt],#1") + A("bne 1b") + : [cnt]"+r"(cy) // output: +r means input+output + : // input: + : "cc" // clobbers: + ); + } + + // We can't use CMSIS since it's not available on all platform, so fallback to hardcoded register values + #define HW_REG(X) *(volatile uint32_t *)(X) + #define _DWT_CTRL 0xE0001000 + #define _DWT_CYCCNT 0xE0001004 // CYCCNT is 32bits, takes 37s or so to wrap. + #define _DEM_CR 0xE000EDFC + #define _LAR 0xE0001FB0 + + // Use hardware cycle counter instead, it's much safer + void delay_dwt(uint32_t count) { + // Reuse the ASM_CYCLES_PER_ITERATION variable to avoid wasting another useless variable + uint32_t start = HW_REG(_DWT_CYCCNT) - ASM_CYCLES_PER_ITERATION, elapsed; + do { + elapsed = HW_REG(_DWT_CYCCNT) - start; + } while (elapsed < count); + } + + // Pointer to asm function, calling the functions has a ~20 cycles overhead + DelayImpl DelayCycleFnc = delay_asm; + + void calibrate_delay_loop() { + // Check if we have a working DWT implementation in the CPU (see https://developer.arm.com/documentation/ddi0439/b/Data-Watchpoint-and-Trace-Unit/DWT-Programmers-Model) + if (!HW_REG(_DWT_CTRL)) { + // No DWT present, so fallback to plain old ASM nop counting + // Unfortunately, we don't exactly know how many iteration it'll take to decrement a counter in a loop + // It depends on the CPU architecture, the code current position (flash vs SRAM) + // So, instead of wild guessing and making mistake, instead + // compute it once for all + ASM_CYCLES_PER_ITERATION = 1; + // We need to fetch some reference clock before waiting + cli(); + uint32_t start = micros(); + delay_asm(1000); // On a typical CPU running in MHz, waiting 1000 "unknown cycles" means it'll take between 1ms to 6ms, that's perfectly acceptable + uint32_t end = micros(); + sei(); + uint32_t expectedCycles = (end - start) * ((F_CPU) / 1000000UL); // Convert microseconds to cycles + // Finally compute the right scale + ASM_CYCLES_PER_ITERATION = (uint32_t)(expectedCycles / 1000); + + // No DWT present, likely a Cortex M0 so NOP counting is our best bet here + DelayCycleFnc = delay_asm; + } + else { + // Enable DWT counter + // From https://stackoverflow.com/a/41188674/1469714 + HW_REG(_DEM_CR) = HW_REG(_DEM_CR) | 0x01000000; // Enable trace + #if __CORTEX_M == 7 + HW_REG(_LAR) = 0xC5ACCE55; // Unlock access to DWT registers, see https://developer.arm.com/documentation/ihi0029/e/ section B2.3.10 + #endif + HW_REG(_DWT_CYCCNT) = 0; // Clear DWT cycle counter + HW_REG(_DWT_CTRL) = HW_REG(_DWT_CTRL) | 1; // Enable DWT cycle counter + + // Then calibrate the constant offset from the counter + ASM_CYCLES_PER_ITERATION = 0; + uint32_t s = HW_REG(_DWT_CYCCNT); + uint32_t e = HW_REG(_DWT_CYCCNT); // (e - s) contains the number of cycle required to read the cycle counter + delay_dwt(0); + uint32_t f = HW_REG(_DWT_CYCCNT); // (f - e) contains the delay to call the delay function + the time to read the cycle counter + ASM_CYCLES_PER_ITERATION = (f - e) - (e - s); + + // Use safer DWT function + DelayCycleFnc = delay_dwt; + } + } + + #if ENABLED(MARLIN_DEV_MODE) + void dump_delay_accuracy_check() { + auto report_call_time = [](PGM_P const name, PGM_P const unit, const uint32_t cycles, const uint32_t total, const bool do_flush=true) { + SERIAL_ECHOPGM("Calling "); + SERIAL_ECHOPGM_P(name); + SERIAL_ECHOLNPGM(" for ", cycles); + SERIAL_ECHOPGM_P(unit); + SERIAL_ECHOLNPGM(" took: ", total); + SERIAL_ECHOPGM_P(unit); + if (do_flush) SERIAL_FLUSHTX(); + }; + + uint32_t s, e; + + SERIAL_ECHOLNPGM("Computed delay calibration value: ", ASM_CYCLES_PER_ITERATION); + SERIAL_FLUSH(); + // Display the results of the calibration above + constexpr uint32_t testValues[] = { 1, 5, 10, 20, 50, 100, 150, 200, 350, 500, 750, 1000 }; + for (auto i : testValues) { + s = micros(); DELAY_US(i); e = micros(); + report_call_time(PSTR("delay"), PSTR("us"), i, e - s); + } + + if (HW_REG(_DWT_CTRL)) { + for (auto i : testValues) { + s = HW_REG(_DWT_CYCCNT); DELAY_CYCLES(i); e = HW_REG(_DWT_CYCCNT); + report_call_time(PSTR("runtime delay"), PSTR("cycles"), i, e - s); + } + + // Measure the delay to call a real function compared to a function pointer + s = HW_REG(_DWT_CYCCNT); delay_dwt(1); e = HW_REG(_DWT_CYCCNT); + report_call_time(PSTR("delay_dwt"), PSTR("cycles"), 1, e - s); + + static PGMSTR(dcd, "DELAY_CYCLES directly "); + + s = HW_REG(_DWT_CYCCNT); DELAY_CYCLES( 1); e = HW_REG(_DWT_CYCCNT); + report_call_time(dcd, PSTR("cycles"), 1, e - s, false); + + s = HW_REG(_DWT_CYCCNT); DELAY_CYCLES( 5); e = HW_REG(_DWT_CYCCNT); + report_call_time(dcd, PSTR("cycles"), 5, e - s, false); + + s = HW_REG(_DWT_CYCCNT); DELAY_CYCLES(10); e = HW_REG(_DWT_CYCCNT); + report_call_time(dcd, PSTR("cycles"), 10, e - s, false); + + s = HW_REG(_DWT_CYCCNT); DELAY_CYCLES(20); e = HW_REG(_DWT_CYCCNT); + report_call_time(dcd, PSTR("cycles"), 20, e - s, false); + + s = HW_REG(_DWT_CYCCNT); DELAY_CYCLES(50); e = HW_REG(_DWT_CYCCNT); + report_call_time(dcd, PSTR("cycles"), 50, e - s, false); + + s = HW_REG(_DWT_CYCCNT); DELAY_CYCLES(100); e = HW_REG(_DWT_CYCCNT); + report_call_time(dcd, PSTR("cycles"), 100, e - s, false); + + s = HW_REG(_DWT_CYCCNT); DELAY_CYCLES(200); e = HW_REG(_DWT_CYCCNT); + report_call_time(dcd, PSTR("cycles"), 200, e - s, false); + } + } + #endif // MARLIN_DEV_MODE + + +#else + + void calibrate_delay_loop() {} + #if ENABLED(MARLIN_DEV_MODE) + void dump_delay_accuracy_check() { SERIAL_ECHOPGM_P(PSTR("N/A on this platform")); } + #endif + +#endif diff --git a/Marlin/src/HAL/shared/Delay.h b/Marlin/src/HAL/shared/Delay.h index a48f3f79cfd0..04df35d88d6a 100644 --- a/Marlin/src/HAL/shared/Delay.h +++ b/Marlin/src/HAL/shared/Delay.h @@ -21,6 +21,8 @@ */ #pragma once +#include "../../inc/MarlinConfigPre.h" + /** * Busy wait delay cycles routines: * @@ -31,131 +33,176 @@ #include "../../core/macros.h" -#if defined(__arm__) || defined(__thumb__) - - #if __CORTEX_M == 7 - - // Cortex-M3 through M7 can use the cycle counter of the DWT unit - // https://www.anthonyvh.com/2017/05/18/cortex_m-cycle_counter/ - - FORCE_INLINE static void enableCycleCounter() { - CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk; +void calibrate_delay_loop(); - #if __CORTEX_M == 7 - DWT->LAR = 0xC5ACCE55; // Unlock DWT on the M7 - #endif +#if defined(__arm__) || defined(__thumb__) - DWT->CYCCNT = 0; - DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk; - } + // We want to have delay_cycle function with the lowest possible overhead, so we adjust at the function at runtime based on the current CPU best feature + typedef void (*DelayImpl)(uint32_t); + extern DelayImpl DelayCycleFnc; - FORCE_INLINE volatile uint32_t getCycleCount() { return DWT->CYCCNT; } + // I've measured 36 cycles on my system to call the cycle waiting method, but it shouldn't change much to have a bit more margin, it only consume a bit more flash + #define TRIP_POINT_FOR_CALLING_FUNCTION 40 - FORCE_INLINE static void DELAY_CYCLES(const uint32_t x) { - const uint32_t endCycles = getCycleCount() + x; - while (PENDING(getCycleCount(), endCycles)) {} + // A simple recursive template class that output exactly one 'nop' of code per recursion + template struct NopWriter { + FORCE_INLINE static void build() { + __asm__ __volatile__("nop"); + NopWriter::build(); } + }; + // End the loop + template <> struct NopWriter<0> { FORCE_INLINE static void build() {} }; + + namespace Private { + // Split recursing template in 2 different class so we don't reach the maximum template instantiation depth limit + template struct Helper { + FORCE_INLINE static void build() { + DelayCycleFnc(N - 2); // Approximative cost of calling the function (might be off by one or 2 cycles) + } + }; - #else - - // https://blueprints.launchpad.net/gcc-arm-embedded/+spec/delay-cycles - - #define nop() __asm__ __volatile__("nop;\n\t":::) + template struct Helper { + FORCE_INLINE static void build() { + NopWriter::build(); + } + }; - FORCE_INLINE static void __delay_4cycles(uint32_t cy) { // +1 cycle - #if ARCH_PIPELINE_RELOAD_CYCLES < 2 - #define EXTRA_NOP_CYCLES A("nop") - #else - #define EXTRA_NOP_CYCLES "" - #endif + template <> struct Helper { + FORCE_INLINE static void build() {} + }; - __asm__ __volatile__( - A(".syntax unified") // is to prevent CM0,CM1 non-unified syntax - L("1") - A("subs %[cnt],#1") - EXTRA_NOP_CYCLES - A("bne 1b") - : [cnt]"+r"(cy) // output: +r means input+output - : // input: - : "cc" // clobbers: - ); + } + // Select a behavior based on the constexpr'ness of the parameter + // If called with a compile-time parameter, then write as many NOP as required to reach the asked cycle count + // (there is some tripping point here to start looping when it's more profitable than gruntly executing NOPs) + // If not called from a compile-time parameter, fallback to a runtime loop counting version instead + template + struct SmartDelay { + FORCE_INLINE SmartDelay(int) { + if (Cycles == 0) return; + Private::Helper::build(); } + }; + // Runtime version below. There is no way this would run under less than ~TRIP_POINT_FOR_CALLING_FUNCTION cycles + template + struct SmartDelay { + FORCE_INLINE SmartDelay(int v) { DelayCycleFnc(v); } + }; - // Delay in cycles - FORCE_INLINE static void DELAY_CYCLES(uint32_t x) { - - if (__builtin_constant_p(x)) { - #define MAXNOPS 4 - - if (x <= (MAXNOPS)) { - switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); } - } - else { // because of +1 cycle inside delay_4cycles - const uint32_t rem = (x - 1) % (MAXNOPS); - switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); } - if ((x = (x - 1) / (MAXNOPS))) - __delay_4cycles(x); // if need more then 4 nop loop is more optimal - } - #undef MAXNOPS - } - else if ((x >>= 2)) - __delay_4cycles(x); - } - #undef nop + #define DELAY_CYCLES(X) do { SmartDelay _smrtdly_X(X); } while(0) - #endif + // For delay in microseconds, no smart delay selection is required, directly call the delay function + // Teensy compiler is too old and does not accept smart delay compile-time / run-time selection correctly + #define DELAY_US(x) DelayCycleFnc((x) * ((F_CPU) / 1000000UL)) #elif defined(__AVR__) - - #define nop() __asm__ __volatile__("nop;\n\t":::) - - FORCE_INLINE static void __delay_4cycles(uint8_t cy) { - __asm__ __volatile__( - L("1") - A("dec %[cnt]") - A("nop") - A("brne 1b") - : [cnt] "+r"(cy) // output: +r means input+output - : // input: - : "cc" // clobbers: - ); + FORCE_INLINE static void __delay_up_to_3c(uint8_t cycles) { + switch (cycles) { + case 3: + __asm__ __volatile__(A("RJMP .+0") A("NOP")); + break; + case 2: + __asm__ __volatile__(A("RJMP .+0")); + break; + case 1: + __asm__ __volatile__(A("NOP")); + break; + } } // Delay in cycles - FORCE_INLINE static void DELAY_CYCLES(uint16_t x) { - - if (__builtin_constant_p(x)) { - #define MAXNOPS 4 - - if (x <= (MAXNOPS)) { - switch (x) { case 4: nop(); case 3: nop(); case 2: nop(); case 1: nop(); } + FORCE_INLINE static void DELAY_CYCLES(uint16_t cycles) { + if (__builtin_constant_p(cycles)) { + if (cycles <= 3) { + __delay_up_to_3c(cycles); + } + else if (cycles == 4) { + __delay_up_to_3c(2); + __delay_up_to_3c(2); } else { - const uint32_t rem = (x) % (MAXNOPS); - switch (rem) { case 3: nop(); case 2: nop(); case 1: nop(); } - if ((x = (x) / (MAXNOPS))) - __delay_4cycles(x); // if need more then 4 nop loop is more optimal + cycles -= 1 + 4; // Compensate for the first LDI (1) and the first round (4) + __delay_up_to_3c(cycles % 4); + + cycles /= 4; + // The following code burns [1 + 4 * (rounds+1)] cycles + uint16_t dummy; + __asm__ __volatile__( + // "manually" load counter from constants, otherwise the compiler may optimize this part away + A("LDI %A[rounds], %[l]") // 1c + A("LDI %B[rounds], %[h]") // 1c (compensating the non branching BRCC) + L("1") + A("SBIW %[rounds], 1") // 2c + A("BRCC 1b") // 2c when branching, else 1c (end of loop) + : // Outputs ... + [rounds] "=w" (dummy) // Restrict to a wo (=) 16 bit register pair (w) + : // Inputs ... + [l] "M" (cycles%256), // Restrict to 0..255 constant (M) + [h] "M" (cycles/256) // Restrict to 0..255 constant (M) + :// Clobbers ... + "cc" // Indicate we are modifying flags like Carry (cc) + ); } - - #undef MAXNOPS } - else if ((x >>= 2)) - __delay_4cycles(x); + else { + __asm__ __volatile__( + L("1") + A("SBIW %[cycles], 4") // 2c + A("BRCC 1b") // 2c when branching, else 1c (end of loop) + : [cycles] "+w" (cycles) // output: Restrict to a rw (+) 16 bit register pair (w) + : // input: - + : "cc" // clobbers: We are modifying flags like Carry (cc) + ); + } } - #undef nop -#elif defined(__PLAT_LINUX__) || defined(ESP32) + // Delay in microseconds + #define DELAY_US(x) DELAY_CYCLES((x) * ((F_CPU) / 1000000UL)) + +#elif defined(ESP32) || defined(__PLAT_LINUX__) || defined(__PLAT_NATIVE_SIM__) - // specified inside platform + // DELAY_CYCLES specified inside platform + // Delay in microseconds + #define DELAY_US(x) DELAY_CYCLES((x) * ((F_CPU) / 1000000UL)) #else #error "Unsupported MCU architecture" #endif -// Delay in nanoseconds -#define DELAY_NS(x) DELAY_CYCLES((x) * ((F_CPU) / 1000000UL) / 1000UL) +/************************************************************** + * Delay in nanoseconds. Requires the F_CPU macro. + * These macros follow avr-libc delay conventions. + * + * For AVR there are three possible operation modes, due to its + * slower clock speeds and thus coarser delay resolution. For + * example, when F_CPU = 16000000 the resolution is 62.5ns. + * + * Round up (default) + * Round up the delay according to the CPU clock resolution. + * e.g., 100 will give a delay of 2 cycles (125ns). + * + * Round down (DELAY_NS_ROUND_DOWN) + * Round down the delay according to the CPU clock resolution. + * e.g., 100 will be rounded down to 1 cycle (62.5ns). + * + * Nearest (DELAY_NS_ROUND_CLOSEST) + * Round the delay to the nearest number of clock cycles. + * e.g., 165 will be rounded up to 3 cycles (187.5ns) because + * it's closer to the requested delay than 2 cycle (125ns). + */ -// Delay in microseconds -#define DELAY_US(x) DELAY_CYCLES((x) * ((F_CPU) / 1000000UL)) +#ifndef __AVR__ + #undef DELAY_NS_ROUND_DOWN + #undef DELAY_NS_ROUND_CLOSEST +#endif + +#if ENABLED(DELAY_NS_ROUND_DOWN) + #define DELAY_NS(x) DELAY_CYCLES((x) * ((F_CPU) / 1000000UL) / 1000UL) // floor +#elif ENABLED(DELAY_NS_ROUND_CLOSEST) + #define DELAY_NS(x) DELAY_CYCLES(((x) * ((F_CPU) / 1000000UL) + 500) / 1000UL) // round +#else + #define DELAY_NS(x) DELAY_CYCLES(((x) * ((F_CPU) / 1000000UL) + 999) / 1000UL) // "ceil" +#endif diff --git a/Marlin/src/HAL/shared/HAL_MinSerial.cpp b/Marlin/src/HAL/shared/HAL_MinSerial.cpp new file mode 100644 index 000000000000..9dda5fdf8c67 --- /dev/null +++ b/Marlin/src/HAL/shared/HAL_MinSerial.cpp @@ -0,0 +1,33 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "HAL_MinSerial.h" + +#if ENABLED(POSTMORTEM_DEBUGGING) + +void HAL_min_serial_init_default() {} +void HAL_min_serial_out_default(char ch) { SERIAL_CHAR(ch); } +void (*HAL_min_serial_init)() = &HAL_min_serial_init_default; +void (*HAL_min_serial_out)(char) = &HAL_min_serial_out_default; + +bool MinSerial::force_using_default_output = false; + +#endif diff --git a/Marlin/src/HAL/shared/HAL_MinSerial.h b/Marlin/src/HAL/shared/HAL_MinSerial.h new file mode 100644 index 000000000000..3089b8aa0618 --- /dev/null +++ b/Marlin/src/HAL/shared/HAL_MinSerial.h @@ -0,0 +1,79 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../core/serial.h" +#include + +// Serial stuff here +// Inside an exception handler, the CPU state is not safe, we can't expect the handler to resume +// and the software to continue. UART communication can't rely on later callback/interrupt as it might never happen. +// So, you need to provide some method to send one byte to the usual UART with the interrupts disabled +// By default, the method uses SERIAL_CHAR but it's 100% guaranteed to break (couldn't be worse than nothing...)7 +extern void (*HAL_min_serial_init)(); +extern void (*HAL_min_serial_out)(char ch); + +struct MinSerial { + static bool force_using_default_output; + // Serial output + static void TX(char ch) { + if (force_using_default_output) + SERIAL_CHAR(ch); + else + HAL_min_serial_out(ch); + } + // Send String through UART + static void TX(const char *s) { while (*s) TX(*s++); } + // Send a digit through UART + static void TXDigit(uint32_t d) { + if (d < 10) TX((char)(d+'0')); + else if (d < 16) TX((char)(d+'A'-10)); + else TX('?'); + } + + // Send Hex number through UART + static void TXHex(uint32_t v) { + TX("0x"); + for (uint8_t i = 0; i < 8; i++, v <<= 4) + TXDigit((v >> 28) & 0xF); + } + + // Send Decimal number through UART + static void TXDec(uint32_t v) { + if (!v) { + TX('0'); + return; + } + + char nbrs[14]; + char *p = &nbrs[0]; + while (v != 0) { + *p++ = '0' + (v % 10); + v /= 10; + } + do { + p--; + TX(*p); + } while (p != &nbrs[0]); + } + static void init() { if (!force_using_default_output) HAL_min_serial_init(); } +}; diff --git a/Marlin/src/HAL/shared/HAL_SPI.h b/Marlin/src/HAL/shared/HAL_SPI.h index 59af5548064c..6611f9ec4e0f 100644 --- a/Marlin/src/HAL/shared/HAL_SPI.h +++ b/Marlin/src/HAL/shared/HAL_SPI.h @@ -71,10 +71,10 @@ void spiSend(uint8_t b); uint8_t spiRec(); // Read from SPI into buffer -void spiRead(uint8_t* buf, uint16_t nbyte); +void spiRead(uint8_t *buf, uint16_t nbyte); // Write token and then write from 512 byte buffer to SPI (for SD card) -void spiSendBlock(uint8_t token, const uint8_t* buf); +void spiSendBlock(uint8_t token, const uint8_t *buf); // Begin SPI transaction, set clock, bit order, data mode void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode); @@ -87,7 +87,7 @@ void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode); void spiSend(uint32_t chan, byte b); // Write buffer to specified SPI channel -void spiSend(uint32_t chan, const uint8_t* buf, size_t n); +void spiSend(uint32_t chan, const uint8_t *buf, size_t n); // Read single byte from specified SPI channel uint8_t spiRec(uint32_t chan); diff --git a/Marlin/src/HAL/shared/Marduino.h b/Marlin/src/HAL/shared/Marduino.h index d0ee6ecc9d43..ddc3451fbebe 100644 --- a/Marlin/src/HAL/shared/Marduino.h +++ b/Marlin/src/HAL/shared/Marduino.h @@ -82,4 +82,8 @@ #define UNUSED(x) ((void)(x)) #endif +#ifndef FORCE_INLINE + #define FORCE_INLINE __attribute__((always_inline)) inline +#endif + #include "progmem.h" diff --git a/Marlin/src/HAL/shared/backtrace/backtrace.cpp b/Marlin/src/HAL/shared/backtrace/backtrace.cpp index 6cf5e055e151..ad88de8385ac 100644 --- a/Marlin/src/HAL/shared/backtrace/backtrace.cpp +++ b/Marlin/src/HAL/shared/backtrace/backtrace.cpp @@ -25,30 +25,32 @@ #include "unwinder.h" #include "unwmemaccess.h" -#include "../../../core/serial.h" +#include "../HAL_MinSerial.h" #include // Dump a backtrace entry -static bool UnwReportOut(void* ctx, const UnwReport* bte) { +static bool UnwReportOut(void *ctx, const UnwReport *bte) { int *p = (int*)ctx; (*p)++; - SERIAL_CHAR('#'); SERIAL_PRINT(*p, DEC); SERIAL_ECHOPGM(" : "); - SERIAL_ECHOPGM(bte->name ? bte->name : "unknown"); SERIAL_ECHOPGM("@0x"); SERIAL_PRINT(bte->function, HEX); - SERIAL_CHAR('+'); SERIAL_PRINT(bte->address - bte->function,DEC); - SERIAL_ECHOPGM(" PC:"); SERIAL_PRINT(bte->address,HEX); SERIAL_CHAR('\n'); + const uint32_t a = bte->address, f = bte->function; + MinSerial::TX('#'); MinSerial::TXDec(*p); MinSerial::TX(" : "); + MinSerial::TX(bte->name?:"unknown"); MinSerial::TX('@'); MinSerial::TXHex(f); + MinSerial::TX('+'); MinSerial::TXDec(a - f); + MinSerial::TX(" PC:"); MinSerial::TXHex(a); + MinSerial::TX('\n'); return true; } #ifdef UNW_DEBUG - void UnwPrintf(const char* format, ...) { + void UnwPrintf(const char *format, ...) { char dest[256]; va_list argptr; va_start(argptr, format); vsprintf(dest, format, argptr); va_end(argptr); - TX(&dest[0]); + MinSerial::TX(&dest[0]); } #endif @@ -63,10 +65,10 @@ static const UnwindCallbacks UnwCallbacks = { #endif }; +// Perform a backtrace to the serial port void backtrace() { - UnwindFrame btf; - uint32_t sp = 0, lr = 0, pc = 0; + unsigned long sp = 0, lr = 0, pc = 0; // Capture the values of the registers to perform the traceback __asm__ __volatile__ ( @@ -79,6 +81,12 @@ void backtrace() { :: ); + backtrace_ex(sp, lr, pc); +} + +void backtrace_ex(unsigned long sp, unsigned long lr, unsigned long pc) { + UnwindFrame btf; + // Fill the traceback structure btf.sp = sp; btf.fp = btf.sp; @@ -86,7 +94,7 @@ void backtrace() { btf.pc = pc | 1; // Force Thumb, as CORTEX only support it // Perform a backtrace - SERIAL_ERROR_MSG("Backtrace:"); + MinSerial::TX("Backtrace:"); int ctr = 0; UnwindStart(&btf, &UnwCallbacks, &ctr); } @@ -95,4 +103,4 @@ void backtrace() { void backtrace() {} -#endif +#endif // __arm__ || __thumb__ diff --git a/Marlin/src/HAL/shared/backtrace/backtrace.h b/Marlin/src/HAL/shared/backtrace/backtrace.h index fccadedaa543..5d2ba601a071 100644 --- a/Marlin/src/HAL/shared/backtrace/backtrace.h +++ b/Marlin/src/HAL/shared/backtrace/backtrace.h @@ -23,3 +23,6 @@ // Perform a backtrace to the serial port void backtrace(); + +// Perform a backtrace to the serial port +void backtrace_ex(unsigned long sp, unsigned long lr, unsigned long pc); diff --git a/Marlin/src/HAL/shared/backtrace/unwarm.h b/Marlin/src/HAL/shared/backtrace/unwarm.h index 86dc98c073e1..edae90650e29 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarm.h +++ b/Marlin/src/HAL/shared/backtrace/unwarm.h @@ -4,7 +4,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/backtrace/unwarmbytab.h b/Marlin/src/HAL/shared/backtrace/unwarmbytab.h index e2f80db2a5b8..53aeca259439 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarmbytab.h +++ b/Marlin/src/HAL/shared/backtrace/unwarmbytab.h @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/backtrace/unwarmmem.cpp b/Marlin/src/HAL/shared/backtrace/unwarmmem.cpp index a40d8540ec38..24023200e155 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarmmem.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwarmmem.cpp @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/backtrace/unwarmmem.h b/Marlin/src/HAL/shared/backtrace/unwarmmem.h index 1340bbdf0a25..eb4579a76107 100644 --- a/Marlin/src/HAL/shared/backtrace/unwarmmem.h +++ b/Marlin/src/HAL/shared/backtrace/unwarmmem.h @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/backtrace/unwinder.cpp b/Marlin/src/HAL/shared/backtrace/unwinder.cpp index 0f88e2a7f75b..aedfa2404d65 100644 --- a/Marlin/src/HAL/shared/backtrace/unwinder.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwinder.cpp @@ -28,7 +28,7 @@ extern "C" const UnwTabEntry __exidx_end[]; // Detect if unwind information is present or not static int HasUnwindTableInfo() { - // > 16 because there are default entries we can't supress + // > 16 because there are default entries we can't suppress return ((char*)(&__exidx_end) - (char*)(&__exidx_start)) > 16 ? 1 : 0; } diff --git a/Marlin/src/HAL/shared/backtrace/unwinder.h b/Marlin/src/HAL/shared/backtrace/unwinder.h index 157808d540da..9280e2f36e89 100644 --- a/Marlin/src/HAL/shared/backtrace/unwinder.h +++ b/Marlin/src/HAL/shared/backtrace/unwinder.h @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. **************************************************************************/ @@ -114,7 +114,7 @@ typedef struct { * report function maybe called again in future. If false is returned, * unwinding will stop with UnwindStart() returning UNWIND_TRUNCATED. */ -typedef bool (*UnwindReportFunc)(void* data, const UnwReport* bte); +typedef bool (*UnwindReportFunc)(void *data, const UnwReport *bte); /** Structure that holds memory callback function pointers. */ diff --git a/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp b/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp index 5ca46f98865b..2bde1e208d95 100644 --- a/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp +++ b/Marlin/src/HAL/shared/backtrace/unwmemaccess.cpp @@ -41,27 +41,16 @@ #define START_FLASH_ADDR 0x00000000 #define END_FLASH_ADDR 0x00080000 -#elif 0 - - // For STM32F103CBT6 - // SRAM (0x20000000 - 0x20005000) (20kb) - // FLASH (0x00000000 - 0x00020000) (128kb) - // - #define START_SRAM_ADDR 0x20000000 - #define END_SRAM_ADDR 0x20005000 - #define START_FLASH_ADDR 0x00000000 - #define END_FLASH_ADDR 0x00020000 - #elif defined(__STM32F1__) || defined(STM32F1xx) || defined(STM32F0xx) // For STM32F103ZET6/STM32F103VET6/STM32F0xx // SRAM (0x20000000 - 0x20010000) (64kb) - // FLASH (0x00000000 - 0x00080000) (512kb) + // FLASH (0x08000000 - 0x08080000) (512kb) // #define START_SRAM_ADDR 0x20000000 #define END_SRAM_ADDR 0x20010000 - #define START_FLASH_ADDR 0x00000000 - #define END_FLASH_ADDR 0x00080000 + #define START_FLASH_ADDR 0x08000000 + #define END_FLASH_ADDR 0x08080000 #elif defined(STM32F4) || defined(STM32F4xx) @@ -142,20 +131,57 @@ #define START_FLASH_ADDR 0x00000000 #define END_FLASH_ADDR 0x00100000 +#else + // Generic ARM code, that's testing if an access to the given address would cause a fault or not + // It can't guarantee an address is in RAM or Flash only, but we usually don't care + + #define NVIC_FAULT_STAT 0xE000ED28 // Configurable Fault Status Reg. + #define NVIC_CFG_CTRL 0xE000ED14 // Configuration Control Register + #define NVIC_FAULT_STAT_BFARV 0x00008000 // BFAR is valid + #define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore bus fault in NMI/fault + #define HW_REG(X) (*((volatile unsigned long *)(X))) + + static bool validate_addr(uint32_t read_address) { + bool works = true; + uint32_t intDisabled = 0; + // Read current interrupt state + __asm__ __volatile__ ("MRS %[result], PRIMASK\n\t" : [result]"=r"(intDisabled) :: ); // 0 is int enabled, 1 for disabled + + // Clear bus fault indicator first (write 1 to clear) + HW_REG(NVIC_FAULT_STAT) |= NVIC_FAULT_STAT_BFARV; + // Ignore bus fault interrupt + HW_REG(NVIC_CFG_CTRL) |= NVIC_CFG_CTRL_BFHFNMIGN; + // Disable interrupts if not disabled previously + if (!intDisabled) __asm__ __volatile__ ("CPSID f"); + // Probe address + *(volatile uint32_t*)read_address; + // Check if a fault happened + if ((HW_REG(NVIC_FAULT_STAT) & NVIC_FAULT_STAT_BFARV) != 0) + works = false; + // Enable interrupts again if previously disabled + if (!intDisabled) __asm__ __volatile__ ("CPSIE f"); + // Enable fault interrupt flag + HW_REG(NVIC_CFG_CTRL) &= ~NVIC_CFG_CTRL_BFHFNMIGN; + + return works; + } + #endif -static bool validate_addr(uint32_t addr) { +#ifdef START_SRAM_ADDR + static bool validate_addr(uint32_t addr) { - // Address must be in SRAM range - if (addr >= START_SRAM_ADDR && addr < END_SRAM_ADDR) - return true; + // Address must be in SRAM range + if (addr >= START_SRAM_ADDR && addr < END_SRAM_ADDR) + return true; - // Or in FLASH range - if (addr >= START_FLASH_ADDR && addr < END_FLASH_ADDR) - return true; + // Or in FLASH range + if (addr >= START_FLASH_ADDR && addr < END_FLASH_ADDR) + return true; - return false; -} + return false; + } +#endif bool UnwReadW(const uint32_t a, uint32_t *v) { if (!validate_addr(a)) diff --git a/Marlin/src/HAL/shared/backtrace/unwmemaccess.h b/Marlin/src/HAL/shared/backtrace/unwmemaccess.h index 562ab3f05da9..b911e343dc46 100644 --- a/Marlin/src/HAL/shared/backtrace/unwmemaccess.h +++ b/Marlin/src/HAL/shared/backtrace/unwmemaccess.h @@ -5,7 +5,7 @@ * This program is PUBLIC DOMAIN. * This means that there is no copyright and anyone is able to take a copy * for free and use it as they wish, with or without modifications, and in - * any context, commerically or otherwise. The only limitation is that I + * any context, commercially or otherwise. The only limitation is that I * don't guarantee that the software is fit for any purpose or accept any * liability for its use or misuse - this software is without warranty. *************************************************************************** diff --git a/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp b/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp new file mode 100644 index 000000000000..0f0f7c480727 --- /dev/null +++ b/Marlin/src/HAL/shared/cpu_exception/exception_arm.cpp @@ -0,0 +1,379 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * Copyright (c) 2020 Cyril Russo + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/*************************************************************************** + * ARM CPU Exception handler + ***************************************************************************/ + +#if defined(__arm__) || defined(__thumb__) + + +/* + On ARM CPUs exception handling is quite powerful. + + By default, upon a crash, the CPU enters the handlers that have a higher priority than any other interrupts, + so, in effect, no (real) interrupt can "interrupt" the handler (it's acting like if interrupts were disabled). + + If the handler is not called as re-entrant (that is, if the crash is not happening inside an interrupt or an handler), + then it'll patch the return address to a dumping function (resume_from_fault) and save the crash state. + The CPU will exit the handler and, as such, re-allow the other interrupts, and jump to the dumping function. + In this function, the usual serial port (USB / HW) will be used to dump the crash (no special configuration required). + + The only case where it requires hardware UART is when it's crashing in an interrupt or a crash handler. + In that case, instead of returning to the resume_from_fault function (and thus, re-enabling interrupts), + it jumps to this function directly (so with interrupts disabled), after changing the behavior of the serial output + wrapper to use the HW uart (and in effect, calling MinSerial::init which triggers a warning if you are using + a USB serial port). + + In the case you have a USB serial port, this part will be disabled, and only that part (so that's the reason for + the warning). + This means that you can't have a crash report if the crash happens in an interrupt or an handler if you are using + a USB serial port since it's physically impossible. + You will get a crash report in all other cases. +*/ + +#include "exception_hook.h" +#include "../backtrace/backtrace.h" +#include "../HAL_MinSerial.h" + +#define HW_REG(X) (*((volatile unsigned long *)(X))) + +// Default function use the CPU VTOR register to get the vector table. +// Accessing the CPU VTOR register is done in assembly since it's the only way that's common to all current tool +unsigned long get_vtor() { return HW_REG(0xE000ED08); } // Even if it looks like an error, it is not an error +void * hook_get_hardfault_vector_address(unsigned vtor) { return (void*)(vtor + 0x03); } +void * hook_get_memfault_vector_address(unsigned vtor) { return (void*)(vtor + 0x04); } +void * hook_get_busfault_vector_address(unsigned vtor) { return (void*)(vtor + 0x05); } +void * hook_get_usagefault_vector_address(unsigned vtor) { return (void*)(vtor + 0x06); } +void * hook_get_reserved_vector_address(unsigned vtor) { return (void*)(vtor + 0x07); } + +// Common exception frame for ARM, should work for all ARM CPU +// Described here (modified for convenience): https://interrupt.memfault.com/blog/cortex-m-fault-debug +struct __attribute__((packed)) ContextStateFrame { + uint32_t r0; + uint32_t r1; + uint32_t r2; + uint32_t r3; + uint32_t r12; + uint32_t lr; + uint32_t pc; + uint32_t xpsr; +}; + +struct __attribute__((packed)) ContextSavedFrame { + uint32_t R0; + uint32_t R1; + uint32_t R2; + uint32_t R3; + uint32_t R12; + uint32_t LR; + uint32_t PC; + uint32_t XPSR; + + uint32_t CFSR; + uint32_t HFSR; + uint32_t DFSR; + uint32_t AFSR; + uint32_t MMAR; + uint32_t BFAR; + + uint32_t ESP; + uint32_t ELR; +}; + +#if DISABLED(STM32F0xx) + extern "C" + __attribute__((naked)) void CommonHandler_ASM() { + __asm__ __volatile__ ( + // Bit 2 of LR tells which stack pointer to use (either main or process, only main should be used anyway) + "tst lr, #4\n" + "ite eq\n" + "mrseq r0, msp\n" + "mrsne r0, psp\n" + // Save the LR in use when being interrupted + "mov r1, lr\n" + // Get the exception number from the ICSR register + "ldr r2, =0xE000ED00\n" + "ldr r2, [r2, #4]\n" + "b CommonHandler_C\n" + ); + } +#else // Cortex M0 does not support conditional mov and testing with a constant, so let's have a specific handler for it + extern "C" + __attribute__((naked)) void CommonHandler_ASM() { + __asm__ __volatile__ ( + ".syntax unified\n" + // Save the LR in use when being interrupted + "mov r1, lr\n" + // Get the exception number from the ICSR register + "ldr r2, =0xE000ED00\n" + "ldr r2, [r2, #4]\n" + "movs r0, #4\n" + "tst r1, r0\n" + "beq _MSP\n" + "mrs r0, psp\n" + "b CommonHandler_C\n" + "_MSP:\n" + "mrs r0, msp\n" + "b CommonHandler_C\n" + ); + } + + #if DISABLED(DYNAMIC_VECTORTABLE) // Cortex M0 requires the handler's address to be within 32kB to the actual function to be able to branch to it + extern "C" { + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __exc_hardfault(); + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __exc_busfault(); + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __exc_usagefault(); + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __exc_memmanage(); + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __exc_nmi(); + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __stm32reservedexception7(); + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __stm32reservedexception8(); + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __stm32reservedexception9(); + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __stm32reservedexception10(); + void __attribute__((naked, alias("CommonHandler_ASM"), nothrow)) __stm32reservedexception13(); + } + //TODO When going off from libmaple, you'll need to replace those by the one from STM32/HAL_MinSerial.cpp + #endif +#endif + +// Must be a macro to avoid creating a function frame +#define HALT_IF_DEBUGGING() \ + do { \ + if (HW_REG(0xE000EDF0) & _BV(0)) { \ + __asm("bkpt 1"); \ + } \ +} while (0) + +// Resume from a fault (if possible) so we can still use interrupt based code for serial output +// In that case, we will not jump back to the faulty code, but instead to a dumping code and then a +// basic loop with watchdog calling or manual resetting +static ContextSavedFrame savedFrame; +static uint8_t lastCause; +bool resume_from_fault() { + static const char* causestr[] = { "Thread", "Rsvd", "NMI", "Hard", "Mem", "Bus", "Usage", "7", "8", "9", "10", "SVC", "Dbg", "13", "PendSV", "SysTk", "IRQ" }; + // Reinit the serial link (might only work if implemented in each of your boards) + MinSerial::init(); + + MinSerial::TX("\n\n## Software Fault detected ##\n"); + MinSerial::TX("Cause: "); MinSerial::TX(causestr[min(lastCause, (uint8_t)16)]); MinSerial::TX('\n'); + + MinSerial::TX("R0 : "); MinSerial::TXHex(savedFrame.R0); MinSerial::TX('\n'); + MinSerial::TX("R1 : "); MinSerial::TXHex(savedFrame.R1); MinSerial::TX('\n'); + MinSerial::TX("R2 : "); MinSerial::TXHex(savedFrame.R2); MinSerial::TX('\n'); + MinSerial::TX("R3 : "); MinSerial::TXHex(savedFrame.R3); MinSerial::TX('\n'); + MinSerial::TX("R12 : "); MinSerial::TXHex(savedFrame.R12); MinSerial::TX('\n'); + MinSerial::TX("LR : "); MinSerial::TXHex(savedFrame.LR); MinSerial::TX('\n'); + MinSerial::TX("PC : "); MinSerial::TXHex(savedFrame.PC); MinSerial::TX('\n'); + MinSerial::TX("PSR : "); MinSerial::TXHex(savedFrame.XPSR); MinSerial::TX('\n'); + + // Configurable Fault Status Register + // Consists of MMSR, BFSR and UFSR + MinSerial::TX("CFSR : "); MinSerial::TXHex(savedFrame.CFSR); MinSerial::TX('\n'); + + // Hard Fault Status Register + MinSerial::TX("HFSR : "); MinSerial::TXHex(savedFrame.HFSR); MinSerial::TX('\n'); + + // Debug Fault Status Register + MinSerial::TX("DFSR : "); MinSerial::TXHex(savedFrame.DFSR); MinSerial::TX('\n'); + + // Auxiliary Fault Status Register + MinSerial::TX("AFSR : "); MinSerial::TXHex(savedFrame.AFSR); MinSerial::TX('\n'); + + // Read the Fault Address Registers. These may not contain valid values. + // Check BFARVALID/MMARVALID to see if they are valid values + // MemManage Fault Address Register + MinSerial::TX("MMAR : "); MinSerial::TXHex(savedFrame.MMAR); MinSerial::TX('\n'); + + // Bus Fault Address Register + MinSerial::TX("BFAR : "); MinSerial::TXHex(savedFrame.BFAR); MinSerial::TX('\n'); + + MinSerial::TX("ExcLR: "); MinSerial::TXHex(savedFrame.ELR); MinSerial::TX('\n'); + MinSerial::TX("ExcSP: "); MinSerial::TXHex(savedFrame.ESP); MinSerial::TX('\n'); + + // The stack pointer is pushed by 8 words upon entering an exception, so we need to revert this + backtrace_ex(savedFrame.ESP + 8*4, savedFrame.LR, savedFrame.PC); + + // Call the last resort function here + hook_last_resort_func(); + + const uint32_t start = millis(), end = start + 100; // 100ms should be enough + // We need to wait for the serial buffers to be output but we don't know for how long + // So we'll just need to refresh the watchdog for a while and then stop for the system to reboot + uint32_t last = start; + while (PENDING(last, end)) { + watchdog_refresh(); + while (millis() == last) { /* nada */ } + last = millis(); + MinSerial::TX('.'); + } + + // Reset now by reinstantiating the bootloader's vector table + HW_REG(0xE000ED08) = 0; + // Restart watchdog + #if DISABLED(USE_WATCHDOG) + // No watchdog, let's perform ARMv7 reset instead by writing to AIRCR register with VECTKEY set to SYSRESETREQ + HW_REG(0xE000ED0C) = (HW_REG(0xE000ED0C) & 0x0000FFFF) | 0x05FA0004; + #endif + + while(1) {} // Bad luck, nothing worked +} + +// Make sure the compiler does not optimize the frame argument away +extern "C" +__attribute__((optimize("O0"))) +void CommonHandler_C(ContextStateFrame * frame, unsigned long lr, unsigned long cause) { + + // If you are using it'll stop here + HALT_IF_DEBUGGING(); + + // Save the state to backtrace later on (don't call memcpy here since the stack can be corrupted) + savedFrame.R0 = frame->r0; + savedFrame.R1 = frame->r1; + savedFrame.R2 = frame->r2; + savedFrame.R3 = frame->r3; + savedFrame.R12 = frame->r12; + savedFrame.LR = frame->lr; + savedFrame.PC = frame->pc; + savedFrame.XPSR= frame->xpsr; + lastCause = cause & 0x1FF; + + volatile uint32_t &CFSR = HW_REG(0xE000ED28); + savedFrame.CFSR = CFSR; + savedFrame.HFSR = HW_REG(0xE000ED2C); + savedFrame.DFSR = HW_REG(0xE000ED30); + savedFrame.AFSR = HW_REG(0xE000ED3C); + savedFrame.MMAR = HW_REG(0xE000ED34); + savedFrame.BFAR = HW_REG(0xE000ED38); + savedFrame.ESP = (unsigned long)frame; // Even on return, this should not be overwritten by the CPU + savedFrame.ELR = lr; + + // First check if we can resume from this exception to our own handler safely + // If we can, then we don't need to disable interrupts and the usual serial code + // can be used + + //const uint32_t non_usage_fault_mask = 0x0000FFFF; + //const bool non_usage_fault_occurred = (CFSR & non_usage_fault_mask) != 0; + // the bottom 8 bits of the xpsr hold the exception number of the + // executing exception or 0 if the processor is in Thread mode + const bool faulted_from_exception = ((frame->xpsr & 0xFF) != 0); + if (!faulted_from_exception) { // Not sure about the non_usage_fault, we want to try anyway, don't we ? && !non_usage_fault_occurred) + // Try to resume to our handler here + CFSR |= CFSR; // The ARM programmer manual says you must write to 1 all fault bits to clear them so this instruction is correct + // The frame will not be valid when returning anymore, let's clean it + savedFrame.CFSR = 0; + + frame->pc = (uint32_t)resume_from_fault; // Patch where to return to + frame->lr = 0xDEADBEEF; // If our handler returns (it shouldn't), let's make it trigger an exception immediately + frame->xpsr = _BV(24); // Need to clean the PSR register to thumb II only + MinSerial::force_using_default_output = true; + return; // The CPU will resume in our handler hopefully, and we'll try to use default serial output + } + + // Sorry, we need to emergency code here since the fault is too dangerous to recover from + MinSerial::force_using_default_output = false; + resume_from_fault(); +} + +void hook_cpu_exceptions() { + #if ENABLED(DYNAMIC_VECTORTABLE) + // On ARM 32bits CPU, the vector table is like this: + // 0x0C => Hardfault + // 0x10 => MemFault + // 0x14 => BusFault + // 0x18 => UsageFault + + // Unfortunately, it's usually run from flash, and we can't write to flash here directly to hook our instruction + // We could set an hardware breakpoint, and hook on the fly when it's being called, but this + // is hard to get right and would probably break debugger when attached + + // So instead, we'll allocate a new vector table filled with the previous value except + // for the fault we are interested in. + // Now, comes the issue to figure out what is the current vector table size + // There is nothing telling us what is the vector table as it's per-cpu vendor specific. + // BUT: we are being called at the end of the setup, so we assume the setup is done + // Thus, we can read the current vector table until we find an address that's not in flash, and it would mark the + // end of the vector table (skipping the fist entry obviously) + // The position of the program in flash is expected to be at 0x08xxx xxxx on all known platform for ARM and the + // flash size is available via register 0x1FFFF7E0 on STM32 family, but it's not the case for all ARM boards + // (accessing this register might trigger a fault if it's not implemented). + + // So we'll simply mask the top 8 bits of the first handler as an hint of being in the flash or not -that's poor and will + // probably break if the flash happens to be more than 128MB, but in this case, we are not magician, we need help from outside. + + unsigned long *vecAddr = (unsigned long*)get_vtor(); + SERIAL_ECHOPGM("Vector table addr: "); + SERIAL_PRINTLN(get_vtor(), PrintBase::Hex); + + #ifdef VECTOR_TABLE_SIZE + uint32_t vec_size = VECTOR_TABLE_SIZE; + alignas(128) static unsigned long vectable[VECTOR_TABLE_SIZE] ; + #else + #ifndef IS_IN_FLASH + #define IS_IN_FLASH(X) (((unsigned long)X & 0xFF000000) == 0x08000000) + #endif + + // When searching for the end of the vector table, this acts as a limit not to overcome + #ifndef VECTOR_TABLE_SENTINEL + #define VECTOR_TABLE_SENTINEL 80 + #endif + + // Find the vector table size + uint32_t vec_size = 1; + while (IS_IN_FLASH(vecAddr[vec_size]) && vec_size < VECTOR_TABLE_SENTINEL) + vec_size++; + + // We failed to find a valid vector table size, let's abort hooking up + if (vec_size == VECTOR_TABLE_SENTINEL) return; + // Poor method that's wasting RAM here, but allocating with malloc and alignment would be worst + // 128 bytes alignment is required for writing the VTOR register + alignas(128) static unsigned long vectable[VECTOR_TABLE_SENTINEL]; + + SERIAL_ECHOPGM("Detected vector table size: "); + SERIAL_PRINTLN(vec_size, PrintBase::Hex); + #endif + + uint32_t defaultFaultHandler = vecAddr[(unsigned)7]; + // Copy the current vector table into the new table + for (uint32_t i = 0; i < vec_size; i++) { + vectable[i] = vecAddr[i]; + // Replace all default handler by our own handler + if (vectable[i] == defaultFaultHandler) + vectable[i] = (unsigned long)&CommonHandler_ASM; + } + + // Let's hook now with our functions + vectable[(unsigned long)hook_get_hardfault_vector_address(0)] = (unsigned long)&CommonHandler_ASM; + vectable[(unsigned long)hook_get_memfault_vector_address(0)] = (unsigned long)&CommonHandler_ASM; + vectable[(unsigned long)hook_get_busfault_vector_address(0)] = (unsigned long)&CommonHandler_ASM; + vectable[(unsigned long)hook_get_usagefault_vector_address(0)] = (unsigned long)&CommonHandler_ASM; + + // Finally swap with our own vector table + // This is supposed to be atomic, but let's do that with interrupt disabled + + HW_REG(0xE000ED08) = (unsigned long)vectable | _BV32(29); // 29th bit is for telling the CPU the table is now in SRAM (should be present already) + + SERIAL_ECHOLNPGM("Installed fault handlers"); + #endif +} + +#endif // __arm__ || __thumb__ diff --git a/Marlin/src/HAL/shared/cpu_exception/exception_hook.cpp b/Marlin/src/HAL/shared/cpu_exception/exception_hook.cpp new file mode 100644 index 000000000000..93e80f3e8524 --- /dev/null +++ b/Marlin/src/HAL/shared/cpu_exception/exception_hook.cpp @@ -0,0 +1,28 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "exception_hook.h" + +void * __attribute__((weak)) hook_get_hardfault_vector_address(unsigned) { return 0; } +void * __attribute__((weak)) hook_get_memfault_vector_address(unsigned) { return 0; } +void * __attribute__((weak)) hook_get_busfault_vector_address(unsigned) { return 0; } +void * __attribute__((weak)) hook_get_usagefault_vector_address(unsigned) { return 0; } +void __attribute__((weak)) hook_last_resort_func() {} diff --git a/Marlin/src/HAL/shared/cpu_exception/exception_hook.h b/Marlin/src/HAL/shared/cpu_exception/exception_hook.h new file mode 100644 index 000000000000..70d943470457 --- /dev/null +++ b/Marlin/src/HAL/shared/cpu_exception/exception_hook.h @@ -0,0 +1,54 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/* Here is the expected behavior of a system producing a CPU exception with this hook installed: + 1. Before the system is crashed + 1.1 Upon validation (not done yet in this code, but we could be using DEBUG flags here to allow/disallow hooking) + 1.2 Install the hook by overwriting the vector table exception handler with the hooked function + 2. Upon system crash (for example, by a dereference of a NULL pointer or anything else) + 2.1 The CPU triggers its exception and jump into the vector table for the exception type + 2.2 Instead of finding the default handler, it finds the updated pointer to our hook + 2.3 The CPU jumps into our hook function (likely a naked function to keep all information about crash point intact) + 2.4 The hook (naked) function saves the important registers (stack pointer, program counter, current mode) and jumps to a common exception handler (in C) + 2.5 The common exception handler dumps the registers on the serial link and perform a backtrace around the crashing point + 2.6 Once the backtrace is performed the last resort function is called (platform specific). + On some platform with a LCD screen, this might display the crash information as a QR code or as text for the + user to capture by taking a picture + 2.7 The CPU is reset and/or halted by triggering a debug breakpoint if a debugger is attached */ + +// Hook into CPU exception interrupt table to call the backtracing code upon an exception +// Most platform will simply do nothing here, but those who can will install/overwrite the default exception handler +// with a more performant exception handler +void hook_cpu_exceptions(); + +// Some platform might deal without a hard fault handler, in that case, return 0 in your platform here or skip implementing it +void * __attribute__((weak)) hook_get_hardfault_vector_address(unsigned base_address); +// Some platform might deal without a memory management fault handler, in that case, return 0 in your platform here or skip implementing it +void * __attribute__((weak)) hook_get_memfault_vector_address(unsigned base_address); +// Some platform might deal without a bus fault handler, in that case, return 0 in your platform here or skip implementing it +void * __attribute__((weak)) hook_get_busfault_vector_address(unsigned base_address); +// Some platform might deal without a usage fault handler, in that case, return 0 in your platform here or skip implementing it +void * __attribute__((weak)) hook_get_usagefault_vector_address(unsigned base_address); + +// Last resort function that can be called after the exception handler was called. +void __attribute__((weak)) hook_last_resort_func(); diff --git a/Marlin/src/HAL/shared/eeprom_api.h b/Marlin/src/HAL/shared/eeprom_api.h index 6445f7a4aae4..1f38639930dc 100644 --- a/Marlin/src/HAL/shared/eeprom_api.h +++ b/Marlin/src/HAL/shared/eeprom_api.h @@ -45,11 +45,11 @@ class PersistentStore { // Read one or more bytes of data and update the CRC // Return 'true' on read error - static bool read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing=true); + static bool read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing=true); // Write one or more bytes of data // Return 'true' on write error - static inline bool write_data(const int pos, const uint8_t* value, const size_t size=sizeof(uint8_t)) { + static inline bool write_data(const int pos, const uint8_t *value, const size_t size=sizeof(uint8_t)) { int data_pos = pos; uint16_t crc = 0; return write_data(data_pos, value, size, &crc); @@ -61,7 +61,7 @@ class PersistentStore { // Read one or more bytes of data // Return 'true' on read error - static inline bool read_data(const int pos, uint8_t* value, const size_t size=1) { + static inline bool read_data(const int pos, uint8_t *value, const size_t size=1) { int data_pos = pos; uint16_t crc = 0; return read_data(data_pos, value, size, &crc); diff --git a/Marlin/src/HAL/shared/eeprom_if.h b/Marlin/src/HAL/shared/eeprom_if.h index e44da801dfbf..e496de2a03c6 100644 --- a/Marlin/src/HAL/shared/eeprom_if.h +++ b/Marlin/src/HAL/shared/eeprom_if.h @@ -25,5 +25,5 @@ // EEPROM // void eeprom_init(); -void eeprom_write_byte(uint8_t *pos, unsigned char value); +void eeprom_write_byte(uint8_t *pos, uint8_t value); uint8_t eeprom_read_byte(uint8_t *pos); diff --git a/Marlin/src/HAL/shared/eeprom_if_i2c.cpp b/Marlin/src/HAL/shared/eeprom_if_i2c.cpp index cc22bf7d986f..6b559e234b4c 100644 --- a/Marlin/src/HAL/shared/eeprom_if_i2c.cpp +++ b/Marlin/src/HAL/shared/eeprom_if_i2c.cpp @@ -30,9 +30,21 @@ #if ENABLED(I2C_EEPROM) #include "eeprom_if.h" -#include -void eeprom_init() { Wire.begin(); } +#if ENABLED(SOFT_I2C_EEPROM) + #include + SlowSoftWire Wire = SlowSoftWire(I2C_SDA_PIN, I2C_SCL_PIN, true); +#else + #include +#endif + +void eeprom_init() { + Wire.begin( + #if PINS_EXIST(I2C_SCL, I2C_SDA) && DISABLED(SOFT_I2C_EEPROM) + uint8_t(I2C_SDA_PIN), uint8_t(I2C_SCL_PIN) + #endif + ); +} #if ENABLED(USE_SHARED_EEPROM) @@ -49,12 +61,28 @@ static constexpr uint8_t eeprom_device_address = I2C_ADDRESS(EEPROM_DEVICE_ADDRE // Public functions // ------------------------ -void eeprom_write_byte(uint8_t *pos, unsigned char value) { +#define SMALL_EEPROM (MARLIN_EEPROM_SIZE <= 2048) + +// Combine Address high bits into the device address on <=16Kbit (2K) and >512Kbit (64K) EEPROMs. +// Note: MARLIN_EEPROM_SIZE is specified in bytes, whereas EEPROM model numbers refer to bits. +// e.g., The "16" in BL24C16 indicates a 16Kbit (2KB) size. +static uint8_t _eeprom_calc_device_address(uint8_t * const pos) { + const unsigned eeprom_address = (unsigned)pos; + return (SMALL_EEPROM || MARLIN_EEPROM_SIZE > 65536) + ? uint8_t(eeprom_device_address | ((eeprom_address >> (SMALL_EEPROM ? 8 : 16)) & 0x07)) + : eeprom_device_address; +} + +static void _eeprom_begin(uint8_t * const pos) { const unsigned eeprom_address = (unsigned)pos; + Wire.beginTransmission(_eeprom_calc_device_address(pos)); + if (!SMALL_EEPROM) + Wire.write(uint8_t((eeprom_address >> 8) & 0xFF)); // Address High, if needed + Wire.write(uint8_t(eeprom_address & 0xFF)); // Address Low +} - Wire.beginTransmission(eeprom_device_address); - Wire.write(int(eeprom_address >> 8)); // MSB - Wire.write(int(eeprom_address & 0xFF)); // LSB +void eeprom_write_byte(uint8_t *pos, uint8_t value) { + _eeprom_begin(pos); Wire.write(value); Wire.endTransmission(); @@ -64,13 +92,9 @@ void eeprom_write_byte(uint8_t *pos, unsigned char value) { } uint8_t eeprom_read_byte(uint8_t *pos) { - const unsigned eeprom_address = (unsigned)pos; - - Wire.beginTransmission(eeprom_device_address); - Wire.write(int(eeprom_address >> 8)); // MSB - Wire.write(int(eeprom_address & 0xFF)); // LSB + _eeprom_begin(pos); Wire.endTransmission(); - Wire.requestFrom(eeprom_device_address, (byte)1); + Wire.requestFrom(_eeprom_calc_device_address(pos), (byte)1); return Wire.available() ? Wire.read() : 0xFF; } diff --git a/Marlin/src/HAL/shared/eeprom_if_spi.cpp b/Marlin/src/HAL/shared/eeprom_if_spi.cpp index a341fef9de97..72c35addcb45 100644 --- a/Marlin/src/HAL/shared/eeprom_if_spi.cpp +++ b/Marlin/src/HAL/shared/eeprom_if_spi.cpp @@ -43,44 +43,41 @@ void eeprom_init() {} #define EEPROM_WRITE_DELAY 7 #endif -uint8_t eeprom_read_byte(uint8_t* pos) { - uint8_t v; - uint8_t eeprom_temp[3]; - - // set read location - // begin transmission from device - eeprom_temp[0] = CMD_READ; - eeprom_temp[1] = ((unsigned)pos>>8) & 0xFF; // addr High - eeprom_temp[2] = (unsigned)pos& 0xFF; // addr Low - WRITE(SPI_EEPROM1_CS, HIGH); - WRITE(SPI_EEPROM1_CS, LOW); +static void _eeprom_begin(uint8_t * const pos, const uint8_t cmd) { + const uint8_t eeprom_temp[3] = { + cmd, + (unsigned(pos) >> 8) & 0xFF, // Address High + unsigned(pos) & 0xFF // Address Low + }; + WRITE(SPI_EEPROM1_CS_PIN, HIGH); // Usually free already + WRITE(SPI_EEPROM1_CS_PIN, LOW); // Activate the Bus spiSend(SPI_CHAN_EEPROM1, eeprom_temp, 3); + // Leave the Bus in-use +} + +uint8_t eeprom_read_byte(uint8_t *pos) { + _eeprom_begin(pos, CMD_READ); // Set read location and begin transmission + + const uint8_t v = spiRec(SPI_CHAN_EEPROM1); // After READ a value sits on the Bus + + WRITE(SPI_EEPROM1_CS_PIN, HIGH); // Done with device - v = spiRec(SPI_CHAN_EEPROM1); - WRITE(SPI_EEPROM1_CS, HIGH); return v; } -void eeprom_write_byte(uint8_t* pos, uint8_t value) { - uint8_t eeprom_temp[3]; - - /*write enable*/ - eeprom_temp[0] = CMD_WREN; - WRITE(SPI_EEPROM1_CS, LOW); - spiSend(SPI_CHAN_EEPROM1, eeprom_temp, 1); - WRITE(SPI_EEPROM1_CS, HIGH); - delay(1); - - /*write addr*/ - eeprom_temp[0] = CMD_WRITE; - eeprom_temp[1] = ((unsigned)pos>>8) & 0xFF; //addr High - eeprom_temp[2] = (unsigned)pos & 0xFF; //addr Low - WRITE(SPI_EEPROM1_CS, LOW); - spiSend(SPI_CHAN_EEPROM1, eeprom_temp, 3); +void eeprom_write_byte(uint8_t *pos, uint8_t value) { + const uint8_t eeprom_temp = CMD_WREN; + WRITE(SPI_EEPROM1_CS_PIN, LOW); + spiSend(SPI_CHAN_EEPROM1, &eeprom_temp, 1); // Write Enable + + WRITE(SPI_EEPROM1_CS_PIN, HIGH); // Done with the Bus + delay(1); // For a small amount of time + + _eeprom_begin(pos, CMD_WRITE); // Set write address and begin transmission - spiSend(SPI_CHAN_EEPROM1, value); - WRITE(SPI_EEPROM1_CS, HIGH); - delay(EEPROM_WRITE_DELAY); // wait for page write to complete + spiSend(SPI_CHAN_EEPROM1, value); // Send the value to be written + WRITE(SPI_EEPROM1_CS_PIN, HIGH); // Done with the Bus + delay(EEPROM_WRITE_DELAY); // Give page write time to complete } #endif // USE_SHARED_EEPROM diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 16111936da81..1b9c8885b1fb 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -30,12 +30,9 @@ #include "MarlinCore.h" -#if ENABLED(MARLIN_DEV_MODE) - #warning "WARNING! Disable MARLIN_DEV_MODE for the final build!" -#endif - #include "HAL/shared/Delay.h" #include "HAL/shared/esp_wifi.h" +#include "HAL/shared/cpu_exception/exception_hook.h" #ifdef ARDUINO #include @@ -67,20 +64,21 @@ #endif #if HAS_TFT_LVGL_UI - #include "lcd/extui/lib/mks_ui/tft_lvgl_configuration.h" - #include "lcd/extui/lib/mks_ui/draw_ui.h" - #include "lcd/extui/lib/mks_ui/mks_hardware_test.h" + #include "lcd/extui/mks_ui/tft_lvgl_configuration.h" + #include "lcd/extui/mks_ui/draw_ui.h" + #include "lcd/extui/mks_ui/mks_hardware.h" #include #endif -#if ENABLED(DWIN_CREALITY_LCD) - #include "lcd/dwin/e3v2/dwin.h" - #include "lcd/dwin/dwin_lcd.h" - #include "lcd/dwin/e3v2/rotary_encoder.h" -#endif - -#if ENABLED(EXTENSIBLE_UI) - #include "lcd/extui/ui_api.h" +#if HAS_DWIN_E3V2 + #include "lcd/e3v2/common/encoder.h" + #if ENABLED(DWIN_CREALITY_LCD) + #include "lcd/e3v2/creality/dwin.h" + #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "lcd/e3v2/enhanced/dwin.h" + #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #include "lcd/e3v2/jyersui/dwin.h" + #endif #endif #if HAS_ETHERNET @@ -135,7 +133,7 @@ #include "module/servo.h" #endif -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "feature/dac/stepper_dac.h" #endif @@ -166,6 +164,8 @@ #if ENABLED(DELTA) #include "module/delta.h" +#elif ENABLED(POLARGRAPH) + #include "module/polargraph.h" #elif IS_SCARA #include "module/scara.h" #endif @@ -210,9 +210,7 @@ #include "feature/fanmux.h" #endif -#if DO_SWITCH_EXTRUDER || ANY(SWITCHING_NOZZLE, PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER, ELECTROMAGNETIC_SWITCHING_TOOLHEAD, SWITCHING_TOOLHEAD) - #include "module/tool_change.h" -#endif +#include "module/tool_change.h" #if ENABLED(USE_CONTROLLER_FAN) #include "feature/controllerfan.h" @@ -230,6 +228,18 @@ #include "feature/password/password.h" #endif +#if ENABLED(DGUS_LCD_UI_MKS) + #include "lcd/extui/dgus/DGUSScreenHandler.h" +#endif + +#if HAS_DRIVER_SAFE_POWER_PROTECT + #include "feature/stepper_driver_safety.h" +#endif + +#if ENABLED(PSU_CONTROL) + #include "feature/power.h" +#endif + PGMSTR(M112_KILL_STR, "M112 Shutdown"); MarlinState marlin_state = MF_INITIALIZING; @@ -276,67 +286,37 @@ bool wait_for_heatup = true; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnarrowing" +#ifndef RUNTIME_ONLY_ANALOG_TO_DIGITAL + template + constexpr pin_t OnlyPins<_SP_END, D...>::table[sizeof...(D)]; +#endif + bool pin_is_protected(const pin_t pin) { - static const pin_t sensitive_pins[] PROGMEM = SENSITIVE_PINS; - LOOP_L_N(i, COUNT(sensitive_pins)) { - pin_t sensitive_pin; - memcpy_P(&sensitive_pin, &sensitive_pins[i], sizeof(pin_t)); - if (pin == sensitive_pin) return true; + #ifdef RUNTIME_ONLY_ANALOG_TO_DIGITAL + static const pin_t sensitive_pins[] PROGMEM = { SENSITIVE_PINS }; + const size_t pincount = COUNT(sensitive_pins); + #else + static constexpr size_t pincount = OnlyPins::size; + static const pin_t (&sensitive_pins)[pincount] PROGMEM = OnlyPins::table; + #endif + LOOP_L_N(i, pincount) { + const pin_t * const pptr = &sensitive_pins[i]; + if (pin == (sizeof(pin_t) == 2 ? (pin_t)pgm_read_word(pptr) : (pin_t)pgm_read_byte(pptr))) return true; } return false; } #pragma GCC diagnostic pop -void enable_e_steppers() { - #define _ENA_E(N) ENABLE_AXIS_E##N(); - REPEAT(E_STEPPERS, _ENA_E) -} - -void enable_all_steppers() { - TERN_(AUTO_POWER_CONTROL, powerManager.power_on()); - ENABLE_AXIS_X(); - ENABLE_AXIS_Y(); - ENABLE_AXIS_Z(); - enable_e_steppers(); - - TERN_(EXTENSIBLE_UI, ExtUI::onSteppersEnabled()); -} - -void disable_e_steppers() { - #define _DIS_E(N) DISABLE_AXIS_E##N(); - REPEAT(E_STEPPERS, _DIS_E) -} - -void disable_e_stepper(const uint8_t e) { - #define _CASE_DIS_E(N) case N: DISABLE_AXIS_E##N(); break; - switch (e) { - REPEAT(EXTRUDERS, _CASE_DIS_E) - } -} - -void disable_all_steppers() { - DISABLE_AXIS_X(); - DISABLE_AXIS_Y(); - DISABLE_AXIS_Z(); - disable_e_steppers(); - - TERN_(EXTENSIBLE_UI, ExtUI::onSteppersDisabled()); -} - /** - * A Print Job exists when the timer is running or SD printing + * A Print Job exists when the timer is running or SD is printing */ -bool printJobOngoing() { - return print_job_timer.isRunning() || IS_SD_PRINTING(); -} +bool printJobOngoing() { return print_job_timer.isRunning() || IS_SD_PRINTING(); } /** - * Printing is active when the print job timer is running + * Printing is active when a job is underway but not paused */ -bool printingIsActive() { - return !did_pause_print && (print_job_timer.isRunning() || IS_SD_PRINTING()); -} +bool printingIsActive() { return !did_pause_print && printJobOngoing(); } /** * Printing is paused according to SD or host indicators @@ -361,7 +341,7 @@ void startOrResumeJob() { inline void abortSDPrinting() { IF_DISABLED(NO_SD_AUTOSTART, card.autofile_cancel()); - card.endFilePrint(TERN_(SD_RESORT, true)); + card.abortFilePrintNow(TERN_(SD_RESORT, true)); queue.clear(); quickstop_stepper(); @@ -384,9 +364,10 @@ void startOrResumeJob() { } inline void finishSDPrinting() { - if (queue.enqueue_one_P(PSTR("M1001"))) { - marlin_state = MF_RUNNING; + if (queue.enqueue_one_P(PSTR("M1001"))) { // Keep trying until it gets queued + marlin_state = MF_RUNNING; // Signal to stop trying TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine()); + TERN_(DGUS_LCD_UI_MKS, ScreenHandler.SDPrintingFinished()); } } @@ -400,27 +381,26 @@ void startOrResumeJob() { * - Check if CHDK_PIN needs to go LOW * - Check for KILL button held down * - Check for HOME button held down + * - Check for CUSTOM USER button held down * - Check if cooling fan needs to be switched on * - Check if an idle but hot extruder needs filament extruded (EXTRUDER_RUNOUT_PREVENT) * - Pulse FET_SAFETY_PIN if it exists */ -inline void manage_inactivity(const bool ignore_stepper_queue=false) { +inline void manage_inactivity(const bool no_stepper_sleep=false) { - if (queue.length < BUFSIZE) queue.get_available_commands(); + queue.get_available_commands(); const millis_t ms = millis(); - // Prevent steppers timing-out in the middle of M600 - // unless PAUSE_PARK_NO_STEPPER_TIMEOUT is disabled - const bool parked_or_ignoring = ignore_stepper_queue + // Prevent steppers timing-out + const bool do_reset_timeout = no_stepper_sleep || TERN0(PAUSE_PARK_NO_STEPPER_TIMEOUT, did_pause_print); // Reset both the M18/M84 activity timeout and the M85 max 'kill' timeout - if (parked_or_ignoring) gcode.reset_stepper_timeout(ms); + if (do_reset_timeout) gcode.reset_stepper_timeout(ms); if (gcode.stepper_max_timed_out(ms)) { - SERIAL_ERROR_START(); - SERIAL_ECHOLNPAIR(STR_KILL_INACTIVE_TIME, parser.command_ptr); + SERIAL_ERROR_MSG(STR_KILL_INACTIVE_TIME, parser.command_ptr); kill(); } @@ -433,15 +413,18 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { // activity timeout and the M85 max 'kill' timeout if (planner.has_blocks_queued()) gcode.reset_stepper_timeout(ms); - else if (!parked_or_ignoring && gcode.stepper_inactive_timeout()) { + else if (!do_reset_timeout && gcode.stepper_inactive_timeout()) { if (!already_shutdown_steppers) { already_shutdown_steppers = true; // L6470 SPI will consume 99% of free time without this // Individual axes will be disabled if configured - if (ENABLED(DISABLE_INACTIVE_X)) DISABLE_AXIS_X(); - if (ENABLED(DISABLE_INACTIVE_Y)) DISABLE_AXIS_Y(); - if (ENABLED(DISABLE_INACTIVE_Z)) DISABLE_AXIS_Z(); - if (ENABLED(DISABLE_INACTIVE_E)) disable_e_steppers(); + TERN_(DISABLE_INACTIVE_X, stepper.disable_axis(X_AXIS)); + TERN_(DISABLE_INACTIVE_Y, stepper.disable_axis(Y_AXIS)); + TERN_(DISABLE_INACTIVE_Z, stepper.disable_axis(Z_AXIS)); + TERN_(DISABLE_INACTIVE_I, stepper.disable_axis(I_AXIS)); + TERN_(DISABLE_INACTIVE_J, stepper.disable_axis(J_AXIS)); + TERN_(DISABLE_INACTIVE_K, stepper.disable_axis(K_AXIS)); + TERN_(DISABLE_INACTIVE_E, stepper.disable_e_steppers()); TERN_(AUTO_BED_LEVELING_UBL, ubl.steppers_were_disabled()); } @@ -450,7 +433,8 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { already_shutdown_steppers = false; } - #if PIN_EXISTS(CHDK) // Check if pin should be set to LOW (after M240 set it HIGH) + #if ENABLED(PHOTO_GCODE) && PIN_EXISTS(CHDK) + // Check if CHDK should be set to LOW (after M240 set it HIGH) extern millis_t chdk_timeout; if (chdk_timeout && ELAPSED(ms, chdk_timeout)) { chdk_timeout = 0; @@ -479,12 +463,15 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { } #endif + #if HAS_FREEZE_PIN + Stepper::frozen = !READ(FREEZE_PIN); + #endif + #if HAS_HOME // Handle a standalone HOME button constexpr millis_t HOME_DEBOUNCE_DELAY = 1000UL; static millis_t next_home_key_ms; // = 0 if (!IS_SD_PRINTING() && !READ(HOME_PIN)) { // HOME_PIN goes LOW when pressed - const millis_t ms = millis(); if (ELAPSED(ms, next_home_key_ms)) { next_home_key_ms = ms + HOME_DEBOUNCE_DELAY; LCD_MESSAGEPGM(MSG_AUTO_HOME); @@ -493,27 +480,176 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { } #endif + #if ENABLED(CUSTOM_USER_BUTTONS) + // Handle a custom user button if defined + const bool printer_not_busy = !printingIsActive(); + #define HAS_CUSTOM_USER_BUTTON(N) (PIN_EXISTS(BUTTON##N) && defined(BUTTON##N##_HIT_STATE) && defined(BUTTON##N##_GCODE)) + #define HAS_BETTER_USER_BUTTON(N) HAS_CUSTOM_USER_BUTTON(N) && defined(BUTTON##N##_DESC) + #define _CHECK_CUSTOM_USER_BUTTON(N, CODE) do{ \ + constexpr millis_t CUB_DEBOUNCE_DELAY_##N = 250UL; \ + static millis_t next_cub_ms_##N; \ + if (BUTTON##N##_HIT_STATE == READ(BUTTON##N##_PIN) \ + && (ENABLED(BUTTON##N##_WHEN_PRINTING) || printer_not_busy)) { \ + if (ELAPSED(ms, next_cub_ms_##N)) { \ + next_cub_ms_##N = ms + CUB_DEBOUNCE_DELAY_##N; \ + CODE; \ + queue.inject_P(PSTR(BUTTON##N##_GCODE)); \ + TERN_(HAS_LCD_MENU, ui.quick_feedback()); \ + } \ + } \ + }while(0) + + #define CHECK_CUSTOM_USER_BUTTON(N) _CHECK_CUSTOM_USER_BUTTON(N, NOOP) + #define CHECK_BETTER_USER_BUTTON(N) _CHECK_CUSTOM_USER_BUTTON(N, if (strlen(BUTTON##N##_DESC)) LCD_MESSAGEPGM_P(PSTR(BUTTON##N##_DESC))) + + #if HAS_BETTER_USER_BUTTON(1) + CHECK_BETTER_USER_BUTTON(1); + #elif HAS_CUSTOM_USER_BUTTON(1) + CHECK_CUSTOM_USER_BUTTON(1); + #endif + #if HAS_BETTER_USER_BUTTON(2) + CHECK_BETTER_USER_BUTTON(2); + #elif HAS_CUSTOM_USER_BUTTON(2) + CHECK_CUSTOM_USER_BUTTON(2); + #endif + #if HAS_BETTER_USER_BUTTON(3) + CHECK_BETTER_USER_BUTTON(3); + #elif HAS_CUSTOM_USER_BUTTON(3) + CHECK_CUSTOM_USER_BUTTON(3); + #endif + #if HAS_BETTER_USER_BUTTON(4) + CHECK_BETTER_USER_BUTTON(4); + #elif HAS_CUSTOM_USER_BUTTON(4) + CHECK_CUSTOM_USER_BUTTON(4); + #endif + #if HAS_BETTER_USER_BUTTON(5) + CHECK_BETTER_USER_BUTTON(5); + #elif HAS_CUSTOM_USER_BUTTON(5) + CHECK_CUSTOM_USER_BUTTON(5); + #endif + #if HAS_BETTER_USER_BUTTON(6) + CHECK_BETTER_USER_BUTTON(6); + #elif HAS_CUSTOM_USER_BUTTON(6) + CHECK_CUSTOM_USER_BUTTON(6); + #endif + #if HAS_BETTER_USER_BUTTON(7) + CHECK_BETTER_USER_BUTTON(7); + #elif HAS_CUSTOM_USER_BUTTON(7) + CHECK_CUSTOM_USER_BUTTON(7); + #endif + #if HAS_BETTER_USER_BUTTON(8) + CHECK_BETTER_USER_BUTTON(8); + #elif HAS_CUSTOM_USER_BUTTON(8) + CHECK_CUSTOM_USER_BUTTON(8); + #endif + #if HAS_BETTER_USER_BUTTON(9) + CHECK_BETTER_USER_BUTTON(9); + #elif HAS_CUSTOM_USER_BUTTON(9) + CHECK_CUSTOM_USER_BUTTON(9); + #endif + #if HAS_BETTER_USER_BUTTON(10) + CHECK_BETTER_USER_BUTTON(10); + #elif HAS_CUSTOM_USER_BUTTON(10) + CHECK_CUSTOM_USER_BUTTON(10); + #endif + #if HAS_BETTER_USER_BUTTON(11) + CHECK_BETTER_USER_BUTTON(11); + #elif HAS_CUSTOM_USER_BUTTON(11) + CHECK_CUSTOM_USER_BUTTON(11); + #endif + #if HAS_BETTER_USER_BUTTON(12) + CHECK_BETTER_USER_BUTTON(12); + #elif HAS_CUSTOM_USER_BUTTON(12) + CHECK_CUSTOM_USER_BUTTON(12); + #endif + #if HAS_BETTER_USER_BUTTON(13) + CHECK_BETTER_USER_BUTTON(13); + #elif HAS_CUSTOM_USER_BUTTON(13) + CHECK_CUSTOM_USER_BUTTON(13); + #endif + #if HAS_BETTER_USER_BUTTON(14) + CHECK_BETTER_USER_BUTTON(14); + #elif HAS_CUSTOM_USER_BUTTON(14) + CHECK_CUSTOM_USER_BUTTON(14); + #endif + #if HAS_BETTER_USER_BUTTON(15) + CHECK_BETTER_USER_BUTTON(15); + #elif HAS_CUSTOM_USER_BUTTON(15) + CHECK_CUSTOM_USER_BUTTON(15); + #endif + #if HAS_BETTER_USER_BUTTON(16) + CHECK_BETTER_USER_BUTTON(16); + #elif HAS_CUSTOM_USER_BUTTON(16) + CHECK_CUSTOM_USER_BUTTON(16); + #endif + #if HAS_BETTER_USER_BUTTON(17) + CHECK_BETTER_USER_BUTTON(17); + #elif HAS_CUSTOM_USER_BUTTON(17) + CHECK_CUSTOM_USER_BUTTON(17); + #endif + #if HAS_BETTER_USER_BUTTON(18) + CHECK_BETTER_USER_BUTTON(18); + #elif HAS_CUSTOM_USER_BUTTON(18) + CHECK_CUSTOM_USER_BUTTON(18); + #endif + #if HAS_BETTER_USER_BUTTON(19) + CHECK_BETTER_USER_BUTTON(19); + #elif HAS_CUSTOM_USER_BUTTON(19) + CHECK_CUSTOM_USER_BUTTON(19); + #endif + #if HAS_BETTER_USER_BUTTON(20) + CHECK_BETTER_USER_BUTTON(20); + #elif HAS_CUSTOM_USER_BUTTON(20) + CHECK_CUSTOM_USER_BUTTON(20); + #endif + #if HAS_BETTER_USER_BUTTON(21) + CHECK_BETTER_USER_BUTTON(21); + #elif HAS_CUSTOM_USER_BUTTON(21) + CHECK_CUSTOM_USER_BUTTON(21); + #endif + #if HAS_BETTER_USER_BUTTON(22) + CHECK_BETTER_USER_BUTTON(22); + #elif HAS_CUSTOM_USER_BUTTON(22) + CHECK_CUSTOM_USER_BUTTON(22); + #endif + #if HAS_BETTER_USER_BUTTON(23) + CHECK_BETTER_USER_BUTTON(23); + #elif HAS_CUSTOM_USER_BUTTON(23) + CHECK_CUSTOM_USER_BUTTON(23); + #endif + #if HAS_BETTER_USER_BUTTON(24) + CHECK_BETTER_USER_BUTTON(24); + #elif HAS_CUSTOM_USER_BUTTON(24) + CHECK_CUSTOM_USER_BUTTON(24); + #endif + #if HAS_BETTER_USER_BUTTON(25) + CHECK_BETTER_USER_BUTTON(25); + #elif HAS_CUSTOM_USER_BUTTON(25) + CHECK_CUSTOM_USER_BUTTON(25); + #endif + #endif + TERN_(USE_CONTROLLER_FAN, controllerFan.update()); // Check if fan should be turned on to cool stepper drivers down - TERN_(AUTO_POWER_CONTROL, powerManager.check()); + TERN_(AUTO_POWER_CONTROL, powerManager.check(!ui.on_status_screen() || printJobOngoing() || printingIsPaused())); TERN_(HOTEND_IDLE_TIMEOUT, hotend_idle.check()); #if ENABLED(EXTRUDER_RUNOUT_PREVENT) - if (thermalManager.degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP + if (thermalManager.degHotend(active_extruder) > (EXTRUDER_RUNOUT_MINTEMP) && ELAPSED(ms, gcode.previous_move_ms + SEC_TO_MS(EXTRUDER_RUNOUT_SECONDS)) && !planner.has_blocks_queued() ) { #if ENABLED(SWITCHING_EXTRUDER) bool oldstatus; switch (active_extruder) { - default: oldstatus = E0_ENABLE_READ(); ENABLE_AXIS_E0(); break; + default: oldstatus = stepper.AXIS_IS_ENABLED(E_AXIS, 0); stepper.ENABLE_EXTRUDER(0); break; #if E_STEPPERS > 1 - case 2: case 3: oldstatus = E1_ENABLE_READ(); ENABLE_AXIS_E1(); break; + case 2: case 3: oldstatus = stepper.AXIS_IS_ENABLED(E_AXIS, 1); stepper.ENABLE_EXTRUDER(1); break; #if E_STEPPERS > 2 - case 4: case 5: oldstatus = E2_ENABLE_READ(); ENABLE_AXIS_E2(); break; + case 4: case 5: oldstatus = stepper.AXIS_IS_ENABLED(E_AXIS, 2); stepper.ENABLE_EXTRUDER(2); break; #if E_STEPPERS > 3 - case 6: case 7: oldstatus = E3_ENABLE_READ(); ENABLE_AXIS_E3(); break; + case 6: case 7: oldstatus = stepper.AXIS_IS_ENABLED(E_AXIS, 3); stepper.ENABLE_EXTRUDER(3); break; #endif // E_STEPPERS > 3 #endif // E_STEPPERS > 2 #endif // E_STEPPERS > 1 @@ -522,7 +658,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { bool oldstatus; switch (active_extruder) { default: - #define _CASE_EN(N) case N: oldstatus = E##N##_ENABLE_READ(); ENABLE_AXIS_E##N(); break; + #define _CASE_EN(N) case N: oldstatus = stepper.AXIS_IS_ENABLED(E_AXIS, N); stepper.ENABLE_EXTRUDER(N); break; REPEAT(E_STEPPERS, _CASE_EN); } #endif @@ -536,17 +672,17 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { #if ENABLED(SWITCHING_EXTRUDER) switch (active_extruder) { - default: oldstatus = E0_ENABLE_WRITE(oldstatus); break; + default: if (oldstatus) stepper.ENABLE_EXTRUDER(0); else stepper.DISABLE_EXTRUDER(0); break; #if E_STEPPERS > 1 - case 2: case 3: oldstatus = E1_ENABLE_WRITE(oldstatus); break; + case 2: case 3: if (oldstatus) stepper.ENABLE_EXTRUDER(1); else stepper.DISABLE_EXTRUDER(1); break; #if E_STEPPERS > 2 - case 4: case 5: oldstatus = E2_ENABLE_WRITE(oldstatus); break; + case 4: case 5: if (oldstatus) stepper.ENABLE_EXTRUDER(2); else stepper.DISABLE_EXTRUDER(2); break; #endif // E_STEPPERS > 2 #endif // E_STEPPERS > 1 } #else // !SWITCHING_EXTRUDER switch (active_extruder) { - #define _CASE_RESTORE(N) case N: E##N##_ENABLE_WRITE(oldstatus); break; + #define _CASE_RESTORE(N) case N: if (oldstatus) stepper.ENABLE_EXTRUDER(N); else stepper.DISABLE_EXTRUDER(N); break; REPEAT(E_STEPPERS, _CASE_RESTORE); } #endif // !SWITCHING_EXTRUDER @@ -612,14 +748,14 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) { * - Update the Průša MMU2 * - Handle Joystick jogging */ -void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) { +void idle(bool no_stepper_sleep/*=false*/) { #if ENABLED(MARLIN_DEV_MODE) static uint16_t idle_depth = 0; - if (++idle_depth > 5) SERIAL_ECHOLNPAIR("idle() call depth: ", idle_depth); + if (++idle_depth > 5) SERIAL_ECHOLNPGM("idle() call depth: ", idle_depth); #endif // Core Marlin activities - manage_inactivity(TERN_(ADVANCED_PAUSE_FEATURE, no_stepper_sleep)); + manage_inactivity(no_stepper_sleep); // Manage Heaters (and Watchdog) thermalManager.manage_heater(); @@ -630,6 +766,9 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) { // Return if setup() isn't completed if (marlin_state == MF_INITIALIZING) goto IDLE_DONE; + // TODO: Still causing errors + (void)check_tool_sensor_stats(active_extruder, true); + // Handle filament runout sensors TERN_(HAS_FILAMENT_SENSOR, runout.run()); @@ -641,22 +780,20 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) { // Handle Power-Loss Recovery #if ENABLED(POWER_LOSS_RECOVERY) && PIN_EXISTS(POWER_LOSS) - if (printJobOngoing()) recovery.outage(); + if (IS_SD_PRINTING()) recovery.outage(); #endif // Run StallGuard endstop checks #if ENABLED(SPI_ENDSTOPS) - if (endstops.tmc_spi_homing.any - && TERN1(IMPROVE_HOMING_RELIABILITY, ELAPSED(millis(), sg_guard_period)) - ) LOOP_L_N(i, 4) // Read SGT 4 times per idle loop - if (endstops.tmc_spi_homing_check()) break; + if (endstops.tmc_spi_homing.any && TERN1(IMPROVE_HOMING_RELIABILITY, ELAPSED(millis(), sg_guard_period))) + LOOP_L_N(i, 4) if (endstops.tmc_spi_homing_check()) break; // Read SGT 4 times per idle loop #endif // Handle SD Card insert / remove TERN_(SDSUPPORT, card.manage_media()); // Handle USB Flash Drive insert / remove - TERN_(USB_FLASH_DRIVE_SUPPORT, Sd2Card::idle()); + TERN_(USB_FLASH_DRIVE_SUPPORT, card.diskIODriver()->idle()); // Announce Host Keepalive state (if any) TERN_(HOST_KEEPALIVE_FEATURE, gcode.host_keepalive()); @@ -668,7 +805,7 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) { TERN_(USE_BEEPER, buzzer.tick()); // Handle UI input / draw events - TERN(DWIN_CREALITY_LCD, DWIN_Update(), ui.update()); + TERN(HAS_DWIN_E3V2_BASIC, DWIN_Update(), ui.update()); // Run i2c Position Encoders #if ENABLED(I2C_POSITION_ENCODERS) @@ -689,6 +826,8 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) { if (!gcode.autoreport_paused) { TERN_(AUTO_REPORT_TEMPERATURES, thermalManager.auto_reporter.tick()); TERN_(AUTO_REPORT_SD_STATUS, card.auto_reporter.tick()); + TERN_(AUTO_REPORT_POSITION, position_auto_reporter.tick()); + TERN_(BUFFER_MONITORING, queue.auto_report_buffer_statistics()); } #endif @@ -718,18 +857,19 @@ void kill(PGM_P const lcd_error/*=nullptr*/, PGM_P const lcd_component/*=nullptr TERN_(HAS_CUTTER, cutter.kill()); // Full cutter shutdown including ISR control - SERIAL_ERROR_MSG(STR_ERR_KILLED); + // Echo the LCD message to serial for extra context + if (lcd_error) { SERIAL_ECHO_START(); SERIAL_ECHOLNPGM_P(lcd_error); } - #if HAS_DISPLAY + #if EITHER(HAS_DISPLAY, DWIN_CREALITY_LCD_ENHANCED) ui.kill_screen(lcd_error ?: GET_TEXT(MSG_KILLED), lcd_component ?: NUL_STR); #else - UNUSED(lcd_error); - UNUSED(lcd_component); + UNUSED(lcd_error); UNUSED(lcd_component); #endif - #if HAS_TFT_LVGL_UI - lv_draw_error_message(lcd_error); - #endif + TERN_(HAS_TFT_LVGL_UI, lv_draw_error_message(lcd_error)); + + // "Error:Printer halted. kill() called!" + SERIAL_ERROR_MSG(STR_ERR_KILLED); #ifdef ACTION_ON_KILL host_action_kill(); @@ -754,26 +894,28 @@ void minkill(const bool steppers_off/*=false*/) { TERN_(HAS_CUTTER, cutter.kill()); // Reiterate cutter shutdown // Power off all steppers (for M112) or just the E steppers - steppers_off ? disable_all_steppers() : disable_e_steppers(); + steppers_off ? stepper.disable_all_steppers() : stepper.disable_e_steppers(); - TERN_(PSU_CONTROL, PSU_OFF()); + TERN_(PSU_CONTROL, powerManager.power_off()); TERN_(HAS_SUICIDE, suicide()); - #if HAS_KILL + #if EITHER(HAS_KILL, SOFT_RESET_ON_KILL) - // Wait for kill to be released - while (kill_state()) watchdog_refresh(); + // Wait for both KILL and ENC to be released + while (TERN0(HAS_KILL, kill_state()) || TERN0(SOFT_RESET_ON_KILL, ui.button_pressed())) + watchdog_refresh(); - // Wait for kill to be pressed - while (!kill_state()) watchdog_refresh(); + // Wait for either KILL or ENC to be pressed again + while (TERN1(HAS_KILL, !kill_state()) && TERN1(SOFT_RESET_ON_KILL, !ui.button_pressed())) + watchdog_refresh(); - void (*resetFunc)() = 0; // Declare resetFunc() at address 0 - resetFunc(); // Jump to address 0 + // Reboot the board + HAL_reboot(); #else - for (;;) watchdog_refresh(); // Wait for reset + for (;;) watchdog_refresh(); // Wait for RESET button or power-cycle #endif } @@ -787,11 +929,11 @@ void stop() { print_job_timer.stop(); - #if ENABLED(PROBING_FANS_OFF) - if (thermalManager.fans_paused) thermalManager.set_fans_paused(false); // put things back the way they were + #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) + thermalManager.set_fans_paused(false); // Un-pause fans for safety #endif - if (IsRunning()) { + if (!IsStopped()) { SERIAL_ERROR_MSG(STR_ERR_STOPPED); LCD_MESSAGEPGM(MSG_STOPPED); safe_delay(350); // allow enough time for messages to get out before stopping @@ -824,6 +966,15 @@ inline void tmc_standby_setup() { #if PIN_EXISTS(Z4_STDBY) SET_INPUT_PULLDOWN(Z4_STDBY_PIN); #endif + #if PIN_EXISTS(I_STDBY) + SET_INPUT_PULLDOWN(I_STDBY_PIN); + #endif + #if PIN_EXISTS(J_STDBY) + SET_INPUT_PULLDOWN(J_STDBY_PIN); + #endif + #if PIN_EXISTS(K_STDBY) + SET_INPUT_PULLDOWN(K_STDBY_PIN); + #endif #if PIN_EXISTS(E0_STDBY) SET_INPUT_PULLDOWN(E0_STDBY_PIN); #endif @@ -851,25 +1002,101 @@ inline void tmc_standby_setup() { } /** - * Marlin entry-point: Set up before the program loop - * - Set up the kill pin, filament runout, power hold - * - Start the serial port + * Marlin Firmware entry-point. Abandon Hope All Ye Who Enter Here. + * Setup before the program loop: + * + * - Call any special pre-init set for the board + * - Put TMC drivers into Low Power Standby mode + * - Init the serial ports (so setup can be debugged) + * - Set up the kill and suicide pins + * - Prepare (disable) board JTAG and Debug ports + * - Init serial for a connected MKS TFT with WiFi + * - Install Marlin custom Exception Handlers, if set. + * - Init Marlin's HAL interfaces (for SPI, i2c, etc.) + * - Init some optional hardware and features: + * • MAX Thermocouple pins + * • Duet Smart Effector + * • Filament Runout Sensor + * • TMC220x Stepper Drivers (Serial) + * • PSU control + * • Power-loss Recovery + * • L64XX Stepper Drivers (SPI) + * • Stepper Driver Reset: DISABLE + * • TMC Stepper Drivers (SPI) + * • Run BOARD_INIT if defined + * • ESP WiFi + * - Get the Reset Reason and report it * - Print startup messages and diagnostics - * - Get EEPROM or default settings - * - Initialize managers for: - * • temperature - * • planner - * • watchdog - * • stepper - * • photo pin - * • servos - * • LCD controller - * • Digipot I2C - * • Z probe sled - * • status LEDs - * • Max7219 + * - Calibrate the HAL DELAY for precise timing + * - Init the buzzer, possibly a custom timer + * - Init more optional hardware: + * • Color LED illumination + * • Neopixel illumination + * • Controller Fan + * • Creality DWIN LCD (show boot image) + * • Tare the Probe if possible + * - Mount the (most likely external) SD Card + * - Load settings from EEPROM (or use defaults) + * - Init the Ethernet Port + * - Init Touch Buttons (for emulated DOGLCD) + * - Adjust the (certainly wrong) current position by the home offset + * - Init the Planner::position (steps) based on current (native) position + * - Initialize more managers and peripherals: + * • Temperatures + * • Print Job Timer + * • Endstops and Endstop Interrupts + * • Stepper ISR - Kind of Important! + * • Servos + * • Servo-based Probe + * • Photograph Pin + * • Laser/Spindle tool Power / PWM + * • Coolant Control + * • Bed Probe + * • Stepper Driver Reset: ENABLE + * • Digipot I2C - Stepper driver current control + * • Stepper DAC - Stepper driver current control + * • Solenoid (probe, or for other use) + * • Home Pin + * • Custom User Buttons + * • Red/Blue Status LEDs + * • Case Light + * • Prusa MMU filament changer + * • Fan Multiplexer + * • Mixing Extruder + * • BLTouch Probe + * • I2C Position Encoders + * • Custom I2C Bus handlers + * • Enhanced tools or extruders: + * • Switching Extruder + * • Switching Nozzle + * • Parking Extruder + * • Magnetic Parking Extruder + * • Switching Toolhead + * • Electromagnetic Switching Toolhead + * • Watchdog Timer - Also Kind of Important! + * • Closed Loop Controller + * - Run Startup Commands, if defined + * - Tell host to close Host Prompts + * - Test Trinamic driver connections + * - Init Prusa MMU2 filament changer + * - Init and test BL24Cxx EEPROM + * - Init Creality DWIN encoder, show faux progress bar + * - Reset Status Message / Show Service Messages + * - Init MAX7219 LED Matrix + * - Init Direct Stepping (Klipper-style motion control) + * - Init TFT LVGL UI (with 3D Graphics) + * - Apply Password Lock - Hold for Authentication + * - Open Touch Screen Calibration screen, if not calibrated + * - Set Marlin to RUNNING State */ void setup() { + #ifdef FASTIO_INIT + FASTIO_INIT(); + #endif + + #ifdef BOARD_PREINIT + BOARD_PREINIT(); // Low-level init (before serial init) + #endif tmc_standby_setup(); // TMC Low Power Standby pins must be set early or they're not usable @@ -877,8 +1104,7 @@ void setup() { auto log_current_ms = [&](PGM_P const msg) { SERIAL_ECHO_START(); SERIAL_CHAR('['); SERIAL_ECHO(millis()); SERIAL_ECHOPGM("] "); - serialprintPGM(msg); - SERIAL_EOL(); + SERIAL_ECHOLNPGM_P(msg); }; #define SETUP_LOG(M) log_current_ms(PSTR(M)) #else @@ -886,14 +1112,25 @@ void setup() { #endif #define SETUP_RUN(C) do{ SETUP_LOG(STRINGIFY(C)); C; }while(0) - MYSERIAL0.begin(BAUDRATE); + MYSERIAL1.begin(BAUDRATE); millis_t serial_connect_timeout = millis() + 1000UL; - while (!MYSERIAL0.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + while (!MYSERIAL1.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } #if HAS_MULTI_SERIAL && !HAS_ETHERNET - MYSERIAL1.begin(BAUDRATE); + #ifndef BAUDRATE_2 + #define BAUDRATE_2 BAUDRATE + #endif + MYSERIAL2.begin(BAUDRATE_2); serial_connect_timeout = millis() + 1000UL; - while (!MYSERIAL1.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + while (!MYSERIAL2.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + #ifdef SERIAL_PORT_3 + #ifndef BAUDRATE_3 + #define BAUDRATE_3 BAUDRATE + #endif + MYSERIAL3.begin(BAUDRATE_3); + serial_connect_timeout = millis() + 1000UL; + while (!MYSERIAL3.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + #endif #endif SERIAL_ECHOLNPGM("start"); @@ -907,47 +1144,45 @@ void setup() { #endif #endif + #if HAS_FREEZE_PIN + SETUP_LOG("FREEZE_PIN"); + SET_INPUT_PULLUP(FREEZE_PIN); + #endif + #if HAS_SUICIDE SETUP_LOG("SUICIDE_PIN"); - OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING); + OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_STATE); #endif - #if ENABLED(PSU_CONTROL) - SETUP_LOG("PSU_CONTROL"); - powersupply_on = ENABLED(PSU_DEFAULT_OFF); - if (ENABLED(PSU_DEFAULT_OFF)) PSU_OFF(); else PSU_ON(); + #ifdef JTAGSWD_RESET + SETUP_LOG("JTAGSWD_RESET"); + JTAGSWD_RESET(); #endif #if EITHER(DISABLE_DEBUG, DISABLE_JTAG) + delay(10); // Disable any hardware debug to free up pins for IO #if ENABLED(DISABLE_DEBUG) && defined(JTAGSWD_DISABLE) + SETUP_LOG("JTAGSWD_DISABLE"); JTAGSWD_DISABLE(); #elif defined(JTAG_DISABLE) + SETUP_LOG("JTAG_DISABLE"); JTAG_DISABLE(); #else #error "DISABLE_(DEBUG|JTAG) is not supported for the selected MCU/Board." #endif #endif - #if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) - mks_esp_wifi_init(); - WIFISERIAL.begin(WIFI_BAUDRATE); - serial_connect_timeout = millis() + 1000UL; - while (/*!WIFISERIAL && */PENDING(millis(), serial_connect_timeout)) { /*nada*/ } - #endif + TERN_(DYNAMIC_VECTORTABLE, hook_cpu_exceptions()); // If supported, install Marlin exception handlers at runtime SETUP_RUN(HAL_init()); - // Init and disable SPI thermocouples - #if HEATER_0_USES_MAX6675 - OUT_WRITE(MAX6675_SS_PIN, HIGH); // Disable + // Init and disable SPI thermocouples; this is still needed + #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0)) + OUT_WRITE(TEMP_0_CS_PIN, HIGH); // Disable #endif - #if HEATER_1_USES_MAX6675 - OUT_WRITE(MAX6675_SS2_PIN, HIGH); // Disable - #endif - - #if HAS_L64XX - SETUP_RUN(L64xxManager.init()); // Set up SPI, init drivers + #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1)) + OUT_WRITE(TEMP_1_CS_PIN, HIGH); #endif #if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD) @@ -958,12 +1193,21 @@ void setup() { SETUP_RUN(runout.setup()); #endif + #if HAS_TMC220x + SETUP_RUN(tmc_serial_begin()); + #endif + + #if ENABLED(PSU_CONTROL) + SETUP_LOG("PSU_CONTROL"); + powerManager.init(); + #endif + #if ENABLED(POWER_LOSS_RECOVERY) SETUP_RUN(recovery.setup()); #endif - #if HAS_TMC220x - SETUP_RUN(tmc_serial_begin()); + #if HAS_L64XX + SETUP_RUN(L64xxManager.init()); // Set up SPI, init drivers #endif #if HAS_STEPPER_RESET @@ -993,18 +1237,18 @@ void setup() { if (mcu & RST_SOFTWARE) SERIAL_ECHOLNPGM(STR_SOFTWARE_RESET); HAL_clear_reset_source(); - serialprintPGM(GET_TEXT(MSG_MARLIN)); - SERIAL_CHAR(' '); - SERIAL_ECHOLNPGM(SHORT_BUILD_VERSION); - SERIAL_EOL(); + SERIAL_ECHOLNPGM("Marlin " SHORT_BUILD_VERSION); #if defined(STRING_DISTRIBUTION_DATE) && defined(STRING_CONFIG_H_AUTHOR) SERIAL_ECHO_MSG( " Last Updated: " STRING_DISTRIBUTION_DATE " | Author: " STRING_CONFIG_H_AUTHOR ); #endif - SERIAL_ECHO_MSG("Compiled: " __DATE__); - SERIAL_ECHO_MSG(STR_FREE_MEMORY, freeMemory(), STR_PLANNER_BUFFER_BYTES, (int)sizeof(block_t) * (BLOCK_BUFFER_SIZE)); + SERIAL_ECHO_MSG(" Compiled: " __DATE__); + SERIAL_ECHO_MSG(STR_FREE_MEMORY, freeMemory(), STR_PLANNER_BUFFER_BYTES, sizeof(block_t) * (BLOCK_BUFFER_SIZE)); + + // Some HAL need precise delay adjustment + calibrate_delay_loop(); // Init buzzer pin(s) #if USE_BEEPER @@ -1027,20 +1271,26 @@ void setup() { // UI must be initialized before EEPROM // (because EEPROM code calls the UI). - #if ENABLED(DWIN_CREALITY_LCD) - delay(800); // Required delay (since boot?) - SERIAL_ECHOPGM("\nDWIN handshake "); - if (DWIN_Handshake()) SERIAL_ECHOLNPGM("ok."); else SERIAL_ECHOLNPGM("error."); - DWIN_Frame_SetDir(1); // Orientation 90° - DWIN_UpdateLCD(); // Show bootscreen (first image) + #if HAS_DWIN_E3V2_BASIC + SETUP_RUN(DWIN_Startup()); #else SETUP_RUN(ui.init()); - #if HAS_WIRED_LCD && ENABLED(SHOW_BOOTSCREEN) + #if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN) SETUP_RUN(ui.show_bootscreen()); + const millis_t bootscreen_ms = millis(); #endif SETUP_RUN(ui.reset_status()); // Load welcome message early. (Retained if no errors exist.) #endif + #if PIN_EXISTS(SAFE_POWER) + #if HAS_DRIVER_SAFE_POWER_PROTECT + SETUP_RUN(stepper_driver_backward_check()); + #else + SETUP_LOG("SAFE_POWER"); + OUT_WRITE(SAFE_POWER_PIN, HIGH); + #endif + #endif + #if ENABLED(PROBE_TARE) SETUP_RUN(probe.tare_init()); #endif @@ -1057,7 +1307,7 @@ void setup() { #endif #if HAS_TOUCH_BUTTONS - SETUP_RUN(touch.init()); + SETUP_RUN(touchBt.init()); #endif TERN_(HAS_M206_COMMAND, current_position += home_offset); // Init current position based on home_offset @@ -1107,7 +1357,7 @@ void setup() { SETUP_RUN(digipot_i2c.init()); #endif - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC SETUP_RUN(stepper_dac.init()); #endif @@ -1119,26 +1369,99 @@ void setup() { SET_INPUT_PULLUP(HOME_PIN); #endif + #if ENABLED(CUSTOM_USER_BUTTONS) + #define INIT_CUSTOM_USER_BUTTON_PIN(N) do{ SET_INPUT(BUTTON##N##_PIN); WRITE(BUTTON##N##_PIN, !BUTTON##N##_HIT_STATE); }while(0) + + #if HAS_CUSTOM_USER_BUTTON(1) + INIT_CUSTOM_USER_BUTTON_PIN(1); + #endif + #if HAS_CUSTOM_USER_BUTTON(2) + INIT_CUSTOM_USER_BUTTON_PIN(2); + #endif + #if HAS_CUSTOM_USER_BUTTON(3) + INIT_CUSTOM_USER_BUTTON_PIN(3); + #endif + #if HAS_CUSTOM_USER_BUTTON(4) + INIT_CUSTOM_USER_BUTTON_PIN(4); + #endif + #if HAS_CUSTOM_USER_BUTTON(5) + INIT_CUSTOM_USER_BUTTON_PIN(5); + #endif + #if HAS_CUSTOM_USER_BUTTON(6) + INIT_CUSTOM_USER_BUTTON_PIN(6); + #endif + #if HAS_CUSTOM_USER_BUTTON(7) + INIT_CUSTOM_USER_BUTTON_PIN(7); + #endif + #if HAS_CUSTOM_USER_BUTTON(8) + INIT_CUSTOM_USER_BUTTON_PIN(8); + #endif + #if HAS_CUSTOM_USER_BUTTON(9) + INIT_CUSTOM_USER_BUTTON_PIN(9); + #endif + #if HAS_CUSTOM_USER_BUTTON(10) + INIT_CUSTOM_USER_BUTTON_PIN(10); + #endif + #if HAS_CUSTOM_USER_BUTTON(11) + INIT_CUSTOM_USER_BUTTON_PIN(11); + #endif + #if HAS_CUSTOM_USER_BUTTON(12) + INIT_CUSTOM_USER_BUTTON_PIN(12); + #endif + #if HAS_CUSTOM_USER_BUTTON(13) + INIT_CUSTOM_USER_BUTTON_PIN(13); + #endif + #if HAS_CUSTOM_USER_BUTTON(14) + INIT_CUSTOM_USER_BUTTON_PIN(14); + #endif + #if HAS_CUSTOM_USER_BUTTON(15) + INIT_CUSTOM_USER_BUTTON_PIN(15); + #endif + #if HAS_CUSTOM_USER_BUTTON(16) + INIT_CUSTOM_USER_BUTTON_PIN(16); + #endif + #if HAS_CUSTOM_USER_BUTTON(17) + INIT_CUSTOM_USER_BUTTON_PIN(17); + #endif + #if HAS_CUSTOM_USER_BUTTON(18) + INIT_CUSTOM_USER_BUTTON_PIN(18); + #endif + #if HAS_CUSTOM_USER_BUTTON(19) + INIT_CUSTOM_USER_BUTTON_PIN(19); + #endif + #if HAS_CUSTOM_USER_BUTTON(20) + INIT_CUSTOM_USER_BUTTON_PIN(20); + #endif + #if HAS_CUSTOM_USER_BUTTON(21) + INIT_CUSTOM_USER_BUTTON_PIN(21); + #endif + #if HAS_CUSTOM_USER_BUTTON(22) + INIT_CUSTOM_USER_BUTTON_PIN(22); + #endif + #if HAS_CUSTOM_USER_BUTTON(23) + INIT_CUSTOM_USER_BUTTON_PIN(23); + #endif + #if HAS_CUSTOM_USER_BUTTON(24) + INIT_CUSTOM_USER_BUTTON_PIN(24); + #endif + #if HAS_CUSTOM_USER_BUTTON(25) + INIT_CUSTOM_USER_BUTTON_PIN(25); + #endif + #endif + #if PIN_EXISTS(STAT_LED_RED) OUT_WRITE(STAT_LED_RED_PIN, LOW); // OFF #endif - #if PIN_EXISTS(STAT_LED_BLUE) OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // OFF #endif #if ENABLED(CASE_LIGHT_ENABLE) - #if DISABLED(CASE_LIGHT_USE_NEOPIXEL) - if (PWM_PIN(CASE_LIGHT_PIN)) SET_PWM(CASE_LIGHT_PIN); else SET_OUTPUT(CASE_LIGHT_PIN); - #endif - SETUP_RUN(caselight.update_brightness()); + SETUP_RUN(caselight.init()); #endif #if HAS_PRUSA_MMU1 - SETUP_LOG("Prusa MMU1"); - SET_OUTPUT(E_MUX0_PIN); - SET_OUTPUT(E_MUX1_PIN); - SET_OUTPUT(E_MUX2_PIN); + SETUP_RUN(mmu_init()); #endif #if HAS_FANMUX @@ -1178,19 +1501,13 @@ void setup() { #endif #endif - #if ENABLED(MAGNETIC_PARKING_EXTRUDER) - SETUP_RUN(mpe_settings_init()); - #endif - #if ENABLED(PARKING_EXTRUDER) SETUP_RUN(pe_solenoid_init()); - #endif - - #if ENABLED(SWITCHING_TOOLHEAD) + #elif ENABLED(MAGNETIC_PARKING_EXTRUDER) + SETUP_RUN(mpe_settings_init()); + #elif ENABLED(SWITCHING_TOOLHEAD) SETUP_RUN(swt_init()); - #endif - - #if ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) SETUP_RUN(est_init()); #endif @@ -1212,7 +1529,11 @@ void setup() { #endif #if HAS_TRINAMIC_CONFIG && DISABLED(PSU_DEFAULT_OFF) - SETUP_RUN(test_tmc_connection(true, true, true, true)); + SETUP_RUN(test_tmc_connection()); + #endif + + #if HAS_DRIVER_SAFE_POWER_PROTECT + SETUP_RUN(stepper_driver_backward_report()); #endif #if HAS_PRUSA_MMU2 @@ -1225,13 +1546,15 @@ void setup() { SERIAL_ECHO_TERNARY(err, "BL24CXX Check ", "failed", "succeeded", "!\n"); #endif - #if ENABLED(DWIN_CREALITY_LCD) + #if HAS_DWIN_E3V2_BASIC Encoder_Configuration(); HMI_Init(); + HMI_SetLanguageCache(); HMI_StartFrame(true); + DWIN_StatusChanged_P(GET_TEXT(WELCOME_MSG)); #endif - #if HAS_SERVICE_INTERVALS && DISABLED(DWIN_CREALITY_LCD) + #if HAS_SERVICE_INTERVALS && !HAS_DWIN_E3V2_BASIC ui.reset_status(true); // Show service messages or keep current status #endif @@ -1250,6 +1573,14 @@ void setup() { SETUP_RUN(tft_lvgl_init()); #endif + #if BOTH(HAS_WIRED_LCD, SHOW_BOOTSCREEN) + const millis_t elapsed = millis() - bootscreen_ms; + #if ENABLED(MARLIN_DEV_MODE) + SERIAL_ECHOLNPGM("elapsed=", elapsed); + #endif + SETUP_RUN(ui.bootscreen_completion(elapsed)); + #endif + #if ENABLED(PASSWORD_ON_STARTUP) SETUP_RUN(password.lock_machine()); // Will not proceed until correct password provided #endif diff --git a/Marlin/src/MarlinCore.h b/Marlin/src/MarlinCore.h index d43d46bbd8e1..c3698d616da0 100644 --- a/Marlin/src/MarlinCore.h +++ b/Marlin/src/MarlinCore.h @@ -23,10 +23,6 @@ #include "inc/MarlinConfig.h" -#ifdef DEBUG_GCODE_PARSER - #include "gcode/parser.h" -#endif - #include #include #include @@ -34,42 +30,34 @@ void stop(); // Pass true to keep steppers from timing out -void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep=false)); -inline void idle_no_sleep() { idle(TERN_(ADVANCED_PAUSE_FEATURE, true)); } +void idle(bool no_stepper_sleep=false); +inline void idle_no_sleep() { idle(true); } #if ENABLED(G38_PROBE_TARGET) extern uint8_t G38_move; // Flag to tell the ISR that G38 is in progress, and the type extern bool G38_did_trigger; // Flag from the ISR to indicate the endstop changed #endif -/** - * The axis order in all axis related arrays is X, Y, Z, E - */ -void enable_e_steppers(); -void enable_all_steppers(); -void disable_e_stepper(const uint8_t e); -void disable_e_steppers(); -void disable_all_steppers(); - void kill(PGM_P const lcd_error=nullptr, PGM_P const lcd_component=nullptr, const bool steppers_off=false); void minkill(const bool steppers_off=false); // Global State of the firmware enum MarlinState : uint8_t { - MF_INITIALIZING = 0, - MF_RUNNING = _BV(0), - MF_PAUSED = _BV(1), - MF_WAITING = _BV(2), - MF_STOPPED = _BV(3), - MF_SD_COMPLETE = _BV(4), - MF_KILLED = _BV(7) + MF_INITIALIZING = 0, + MF_STOPPED, + MF_KILLED, + MF_RUNNING, + MF_SD_COMPLETE, + MF_PAUSED, + MF_WAITING, }; extern MarlinState marlin_state; -inline bool IsRunning() { return marlin_state == MF_RUNNING; } -inline bool IsStopped() { return marlin_state != MF_RUNNING; } +inline bool IsRunning() { return marlin_state >= MF_RUNNING; } +inline bool IsStopped() { return marlin_state == MF_STOPPED; } bool printingIsActive(); +bool printJobOngoing(); bool printingIsPaused(); void startOrResumeJob(); @@ -80,25 +68,10 @@ extern bool wait_for_heatup; void wait_for_user_response(millis_t ms=0, const bool no_sleep=false); #endif -#if ENABLED(PSU_CONTROL) - extern bool powersupply_on; - #define PSU_PIN_ON() do{ OUT_WRITE(PS_ON_PIN, PSU_ACTIVE_STATE); powersupply_on = true; }while(0) - #define PSU_PIN_OFF() do{ OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE); powersupply_on = false; }while(0) - #if ENABLED(AUTO_POWER_CONTROL) - #define PSU_ON() powerManager.power_on() - #define PSU_OFF() powerManager.power_off() - #define PSU_OFF_SOON() powerManager.power_off_soon() - #else - #define PSU_ON() PSU_PIN_ON() - #define PSU_OFF() PSU_PIN_OFF() - #define PSU_OFF_SOON PSU_OFF - #endif -#endif - bool pin_is_protected(const pin_t pin); #if HAS_SUICIDE - inline void suicide() { OUT_WRITE(SUICIDE_PIN, SUICIDE_PIN_INVERTING); } + inline void suicide() { OUT_WRITE(SUICIDE_PIN, SUICIDE_PIN_STATE); } #endif #if HAS_KILL diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index afb6887766cf..82c68f317126 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -68,8 +68,8 @@ #define BOARD_MKS_GEN_13 1112 // MKS GEN v1.3 or 1.4 #define BOARD_MKS_GEN_L 1113 // MKS GEN L #define BOARD_KFB_2 1114 // BigTreeTech or BIQU KFB2.0 -#define BOARD_ZRIB_V20 1115 // zrib V2.0 control board (Chinese knock off RAMPS replica) -#define BOARD_ZRIB_V52 1116 // zrib V5.2 control board (Chinese knock off RAMPS replica) +#define BOARD_ZRIB_V20 1115 // zrib V2.0 (Chinese RAMPS replica) +#define BOARD_ZRIB_V52 1116 // zrib V5.2 (Chinese RAMPS replica) #define BOARD_FELIX2 1117 // Felix 2.0+ Electronics Board (RAMPS like) #define BOARD_RIGIDBOARD 1118 // Invent-A-Part RigidBoard #define BOARD_RIGIDBOARD_V2 1119 // Invent-A-Part RigidBoard V2 @@ -87,7 +87,7 @@ #define BOARD_FORMBOT_RAPTOR 1131 // Formbot Raptor #define BOARD_FORMBOT_RAPTOR2 1132 // Formbot Raptor 2 #define BOARD_BQ_ZUM_MEGA_3D 1133 // bq ZUM Mega 3D -#define BOARD_MAKEBOARD_MINI 1134 // MakeBoard Mini v2.1.2 is a control board sold by MicroMake +#define BOARD_MAKEBOARD_MINI 1134 // MakeBoard Mini v2.1.2 by MicroMake #define BOARD_TRIGORILLA_13 1135 // TriGorilla Anycubic version 1.3-based on RAMPS EFB #define BOARD_TRIGORILLA_14 1136 // ... Ver 1.4 #define BOARD_TRIGORILLA_14_11 1137 // ... Rev 1.1 (new servo pin order) @@ -126,6 +126,7 @@ #define BOARD_EINSY_RAMBO 1203 // Einsy Rambo #define BOARD_EINSY_RETRO 1204 // Einsy Retro #define BOARD_SCOOVO_X9H 1205 // abee Scoovo X9H +#define BOARD_RAMBO_THINKERV2 1206 // ThinkerV2 // // Other ATmega1280, ATmega2560 @@ -145,17 +146,22 @@ #define BOARD_ELEFU_3 1311 // Elefu Ra Board (v3) #define BOARD_LEAPFROG 1312 // Leapfrog #define BOARD_MEGACONTROLLER 1313 // Mega controller -#define BOARD_GT2560_REV_A 1314 // Geeetech GT2560 Rev. A -#define BOARD_GT2560_REV_A_PLUS 1315 // Geeetech GT2560 Rev. A+ (with auto level probe) -#define BOARD_GT2560_V3 1316 // Geeetech GT2560 Rev B for A10(M/D) -#define BOARD_GT2560_V3_MC2 1317 // Geeetech GT2560 Rev B for Mecreator2 -#define BOARD_GT2560_V3_A20 1318 // Geeetech GT2560 Rev B for A20(M/D) -#define BOARD_EINSTART_S 1319 // Einstart retrofit -#define BOARD_WANHAO_ONEPLUS 1320 // Wanhao 0ne+ i3 Mini -#define BOARD_LEAPFROG_XEED2015 1321 // Leapfrog Xeed 2015 -#define BOARD_PICA_REVB 1322 // PICA Shield (original version) -#define BOARD_PICA 1323 // PICA Shield (rev C or later) -#define BOARD_INTAMSYS40 1324 // Intamsys 4.0 (Funmat HT) +#define BOARD_GT2560_REV_A 1314 // Geeetech GT2560 Rev A +#define BOARD_GT2560_REV_A_PLUS 1315 // Geeetech GT2560 Rev A+ (with auto level probe) +#define BOARD_GT2560_REV_B 1316 // Geeetech GT2560 Rev B +#define BOARD_GT2560_V3 1317 // Geeetech GT2560 Rev B for A10(M/T/D) +#define BOARD_GT2560_V4 1318 // Geeetech GT2560 Rev B for A10(M/T/D) +#define BOARD_GT2560_V3_MC2 1319 // Geeetech GT2560 Rev B for Mecreator2 +#define BOARD_GT2560_V3_A20 1320 // Geeetech GT2560 Rev B for A20(M/T/D) +#define BOARD_EINSTART_S 1321 // Einstart retrofit +#define BOARD_WANHAO_ONEPLUS 1322 // Wanhao 0ne+ i3 Mini +#define BOARD_LEAPFROG_XEED2015 1323 // Leapfrog Xeed 2015 +#define BOARD_PICA_REVB 1324 // PICA Shield (original version) +#define BOARD_PICA 1325 // PICA Shield (rev C or later) +#define BOARD_INTAMSYS40 1326 // Intamsys 4.0 (Funmat HT) +#define BOARD_MALYAN_M180 1327 // Malyan M180 Mainboard Version 2 (no display function, direct gcode only) +#define BOARD_GT2560_V4_A20 1328 // Geeetech GT2560 Rev B for A20(M/T/D) +#define BOARD_PROTONEER_CNC_SHIELD_V3 1329 // Mega controller & Protoneer CNC Shield V3.00 // // ATmega1281, ATmega2561 @@ -173,8 +179,8 @@ #define BOARD_MELZI 1502 // Melzi #define BOARD_MELZI_V2 1503 // Melzi V2 #define BOARD_MELZI_MAKR3D 1504 // Melzi with ATmega1284 (MaKr3d version) -#define BOARD_MELZI_CREALITY 1505 // Melzi Creality3D board (for CR-10 etc) -#define BOARD_MELZI_MALYAN 1506 // Melzi Malyan M150 board +#define BOARD_MELZI_CREALITY 1505 // Melzi Creality3D (for CR-10 etc) +#define BOARD_MELZI_MALYAN 1506 // Melzi Malyan M150 #define BOARD_MELZI_TRONXY 1507 // Tronxy X5S #define BOARD_STB_11 1508 // STB V1.1 #define BOARD_AZTEEG_X1 1509 // Azteeg X1 @@ -193,8 +199,8 @@ #define BOARD_GEN7_12 1605 // Gen7 v1.1, v1.2 #define BOARD_GEN7_13 1606 // Gen7 v1.3 #define BOARD_GEN7_14 1607 // Gen7 v1.4 -#define BOARD_OMCA_A 1608 // Alpha OMCA board -#define BOARD_OMCA 1609 // Final OMCA board +#define BOARD_OMCA_A 1608 // Alpha OMCA +#define BOARD_OMCA 1609 // Final OMCA #define BOARD_SETHI 1610 // Sethi 3D_1 // @@ -225,7 +231,7 @@ #define BOARD_SELENA_COMPACT 2008 // Selena Compact (Power outputs: Hotend0, Hotend1, Bed0, Bed1, Fan0, Fan1) #define BOARD_BIQU_B300_V1_0 2009 // BIQU B300_V1.0 (Power outputs: Hotend0, Fan, Bed, SPI Driver) #define BOARD_MKS_SGEN_L 2010 // MKS-SGen-L (Power outputs: Hotend0, Hotend1, Bed, Fan) -#define BOARD_GMARSH_X6_REV1 2011 // GMARSH X6 board, revision 1 prototype +#define BOARD_GMARSH_X6_REV1 2011 // GMARSH X6, revision 1 prototype #define BOARD_BTT_SKR_V1_1 2012 // BigTreeTech SKR v1.1 (Power outputs: Hotend0, Hotend1, Fan, Bed) #define BOARD_BTT_SKR_V1_3 2013 // BigTreeTech SKR v1.3 (Power outputs: Hotend0, Hotend1, Fan, Bed) #define BOARD_BTT_SKR_V1_4 2014 // BigTreeTech SKR v1.4 (Power outputs: Hotend0, Hotend1, Fan, Bed) @@ -245,7 +251,7 @@ #define BOARD_BTT_SKR_V1_4_TURBO 2508 // BigTreeTech SKR v1.4 TURBO (Power outputs: Hotend0, Hotend1, Fan, Bed) #define BOARD_MKS_SGEN_L_V2 2509 // MKS SGEN_L V2 (Power outputs: Hotend0, Hotend1, Bed, Fan) #define BOARD_BTT_SKR_E3_TURBO 2510 // BigTreeTech SKR E3 Turbo (Power outputs: Hotend0, Hotend1, Bed, Fan0, Fan1) -#define BOARD_FLY_CDY 2511 // FLY_CDY (Power outputs: Hotend0, Hotend1, Hotend2, Bed, Fan0, Fan1, Fan2) +#define BOARD_FLY_CDY 2511 // FLYmaker FLY CDY (Power outputs: Hotend0, Hotend1, Hotend2, Bed, Fan0, Fan1, Fan2) // // SAM3X8E ARM Cortex M3 @@ -278,6 +284,7 @@ #define BOARD_ARCHIM2 3024 // UltiMachine Archim2 (with TMC2130 drivers) #define BOARD_ALLIGATOR 3025 // Alligator Board R2 #define BOARD_CNCONTROLS_15D 3026 // Cartesio CN Controls V15 on DUE +#define BOARD_KRATOS32 3027 // K.3D Kratos32 (Arduino Due Shield) // // SAM3X8C ARM Cortex M3 @@ -316,7 +323,7 @@ #define BOARD_BTT_SKR_MINI_V1_1 4023 // BigTreeTech SKR Mini v1.1 (STM32F103RC) #define BOARD_BTT_SKR_MINI_E3_V1_0 4024 // BigTreeTech SKR Mini E3 (STM32F103RC) #define BOARD_BTT_SKR_MINI_E3_V1_2 4025 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC) -#define BOARD_BTT_SKR_MINI_E3_V2_0 4026 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC) +#define BOARD_BTT_SKR_MINI_E3_V2_0 4026 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC / STM32F103RE) #define BOARD_BTT_SKR_MINI_MZ_V1_0 4027 // BigTreeTech SKR Mini MZ V1.0 (STM32F103RC) #define BOARD_BTT_SKR_E3_DIP 4028 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE) #define BOARD_BTT_SKR_CR6 4029 // BigTreeTech SKR CR6 v1.0 (STM32F103RE) @@ -327,18 +334,29 @@ #define BOARD_LONGER3D_LK 4034 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6 #define BOARD_CCROBOT_MEEB_3DP 4035 // ccrobot-online.com MEEB_3DP (STM32F103RC) #define BOARD_CHITU3D_V5 4036 // Chitu3D TronXY X5SA V5 Board -#define BOARD_CHITU3D_V6 4037 // Chitu3D TronXY X5SA V5 Board -#define BOARD_CREALITY_V4 4038 // Creality v4.x (STM32F103RE) -#define BOARD_CREALITY_V427 4039 // Creality v4.2.7 (STM32F103RE) -#define BOARD_CREALITY_V4210 4040 // Creality v4.2.10 (STM32F103RE) as found in the CR-30 -#define BOARD_CREALITY_V431 4041 // Creality v4.3.1 (STM32F103RE) -#define BOARD_CREALITY_V452 4042 // Creality v4.5.2 (STM32F103RE) -#define BOARD_CREALITY_V453 4043 // Creality v4.5.3 (STM32F103RE) -#define BOARD_TRIGORILLA_PRO 4044 // Trigorilla Pro (STM32F103ZET6) -#define BOARD_FLY_MINI 4045 // FLY MINI (STM32F103RCT6) -#define BOARD_FLSUN_HISPEED 4046 // FLSUN HiSpeedV1 (STM32F103VET6) -#define BOARD_BEAST 4047 // STM32F103RET6 Libmaple-based controller -#define BOARD_MINGDA_MPX_ARM_MINI 4048 // STM32F103ZET6 Mingda MD-16 +#define BOARD_CHITU3D_V6 4037 // Chitu3D TronXY X5SA V6 Board +#define BOARD_CHITU3D_V9 4038 // Chitu3D TronXY X5SA V9 Board +#define BOARD_CREALITY_V4 4039 // Creality v4.x (STM32F103RE) +#define BOARD_CREALITY_V427 4040 // Creality v4.2.7 (STM32F103RE) +#define BOARD_CREALITY_V4210 4041 // Creality v4.2.10 (STM32F103RE) as found in the CR-30 +#define BOARD_CREALITY_V431 4042 // Creality v4.3.1 (STM32F103RE) +#define BOARD_CREALITY_V431_A 4043 // Creality v4.3.1a (STM32F103RE) +#define BOARD_CREALITY_V431_B 4044 // Creality v4.3.1b (STM32F103RE) +#define BOARD_CREALITY_V431_C 4045 // Creality v4.3.1c (STM32F103RE) +#define BOARD_CREALITY_V431_D 4046 // Creality v4.3.1d (STM32F103RE) +#define BOARD_CREALITY_V452 4047 // Creality v4.5.2 (STM32F103RE) +#define BOARD_CREALITY_V453 4048 // Creality v4.5.3 (STM32F103RE) +#define BOARD_CREALITY_V24S1 4049 // Creality v2.4.S1 (STM32F103RE) v101 as found in the Ender 7 +#define BOARD_TRIGORILLA_PRO 4050 // Trigorilla Pro (STM32F103ZET6) +#define BOARD_FLY_MINI 4051 // FLYmaker FLY MINI (STM32F103RCT6) +#define BOARD_FLSUN_HISPEED 4052 // FLSUN HiSpeedV1 (STM32F103VET6) +#define BOARD_BEAST 4053 // STM32F103RET6 Libmaple-based controller +#define BOARD_MINGDA_MPX_ARM_MINI 4054 // STM32F103ZET6 Mingda MD-16 +#define BOARD_GTM32_PRO_VD 4055 // STM32F103VET6 controller +#define BOARD_ZONESTAR_ZM3E2 4056 // Zonestar ZM3E2 (STM32F103RCT6) +#define BOARD_ZONESTAR_ZM3E4 4057 // Zonestar ZM3E4 V1 (STM32F103VCT6) +#define BOARD_ZONESTAR_ZM3E4V2 4058 // Zonestar ZM3E4 V2 (STM32F103VCT6) +#define BOARD_ERYONE_ERY32_MINI 4059 // Eryone Ery32 mini (STM32F103VET6) // // ARM Cortex-M4F @@ -355,26 +373,39 @@ #define BOARD_RUMBA32_V1_0 4201 // RUMBA32 STM32F446VET6 based controller from Aus3D #define BOARD_RUMBA32_V1_1 4202 // RUMBA32 STM32F446VET6 based controller from Aus3D #define BOARD_RUMBA32_MKS 4203 // RUMBA32 STM32F446VET6 based controller from Makerbase -#define BOARD_BLACK_STM32F407VE 4204 // BLACK_STM32F407VE -#define BOARD_BLACK_STM32F407ZE 4205 // BLACK_STM32F407ZE -#define BOARD_STEVAL_3DP001V1 4206 // STEVAL-3DP001V1 3D PRINTER BOARD -#define BOARD_BTT_SKR_PRO_V1_1 4207 // BigTreeTech SKR Pro v1.1 (STM32F407ZG) -#define BOARD_BTT_SKR_PRO_V1_2 4208 // BigTreeTech SKR Pro v1.2 (STM32F407ZG) -#define BOARD_BTT_BTT002_V1_0 4209 // BigTreeTech BTT002 v1.0 (STM32F407VG) -#define BOARD_BTT_GTR_V1_0 4210 // BigTreeTech GTR v1.0 (STM32F407IGT) -#define BOARD_LERDGE_K 4211 // Lerdge K (STM32F407ZG) -#define BOARD_LERDGE_S 4212 // Lerdge S (STM32F407VE) -#define BOARD_LERDGE_X 4213 // Lerdge X (STM32F407VE) -#define BOARD_VAKE403D 4214 // VAkE 403D (STM32F446VET6) -#define BOARD_FYSETC_S6 4215 // FYSETC S6 board -#define BOARD_FYSETC_S6_V2_0 4216 // FYSETC S6 v2.0 board -#define BOARD_FLYF407ZG 4217 // FLYF407ZG board (STM32F407ZG) -#define BOARD_MKS_ROBIN2 4218 // MKS_ROBIN2 (STM32F407ZE) -#define BOARD_MKS_ROBIN_PRO_V2 4219 // MKS Robin Pro V2 (STM32F407VE) -#define BOARD_MKS_ROBIN_NANO_V3 4220 // MKS Robin Nano V3 (STM32F407VG) -#define BOARD_ANET_ET4 4221 // ANET ET4 V1.x (STM32F407VGT6) -#define BOARD_ANET_ET4P 4222 // ANET ET4P V1.x (STM32F407VGT6) -#define BOARD_FYSETC_CHEETAH_V20 4223 // FYSETC Cheetah V2.0 +#define BOARD_RUMBA32_BTT 4204 // RUMBA32 STM32F446VET6 based controller from BIGTREETECH +#define BOARD_BLACK_STM32F407VE 4205 // BLACK_STM32F407VE +#define BOARD_BLACK_STM32F407ZE 4206 // BLACK_STM32F407ZE +#define BOARD_STEVAL_3DP001V1 4207 // STEVAL-3DP001V1 3D PRINTER BOARD +#define BOARD_BTT_SKR_PRO_V1_1 4208 // BigTreeTech SKR Pro v1.1 (STM32F407ZGT6) +#define BOARD_BTT_SKR_PRO_V1_2 4209 // BigTreeTech SKR Pro v1.2 (STM32F407ZGT6) +#define BOARD_BTT_BTT002_V1_0 4210 // BigTreeTech BTT002 v1.0 (STM32F407VGT6) +#define BOARD_BTT_E3_RRF 4211 // BigTreeTech E3 RRF (STM32F407VGT6) +#define BOARD_BTT_SKR_V2_0_REV_A 4212 // BigTreeTech SKR v2.0 Rev A (STM32F407VGT6) +#define BOARD_BTT_SKR_V2_0_REV_B 4213 // BigTreeTech SKR v2.0 Rev B (STM32F407VGT6) +#define BOARD_BTT_GTR_V1_0 4214 // BigTreeTech GTR v1.0 (STM32F407IGT) +#define BOARD_BTT_OCTOPUS_V1_0 4215 // BigTreeTech Octopus v1.0 (STM32F446ZET6) +#define BOARD_BTT_OCTOPUS_V1_1 4216 // BigTreeTech Octopus v1.1 (STM32F446ZET6) +#define BOARD_BTT_OCTOPUS_PRO_V1_0 4217 // BigTreeTech Octopus Pro v1.0 (STM32F446ZET6/STM32F429ZGT6) +#define BOARD_LERDGE_K 4218 // Lerdge K (STM32F407ZG) +#define BOARD_LERDGE_S 4219 // Lerdge S (STM32F407VE) +#define BOARD_LERDGE_X 4220 // Lerdge X (STM32F407VE) +#define BOARD_VAKE403D 4221 // VAkE 403D (STM32F446VET6) +#define BOARD_FYSETC_S6 4222 // FYSETC S6 (STM32F446VET6) +#define BOARD_FYSETC_S6_V2_0 4223 // FYSETC S6 v2.0 (STM32F446VET6) +#define BOARD_FYSETC_SPIDER 4224 // FYSETC Spider (STM32F446VET6) +#define BOARD_FLYF407ZG 4225 // FLYmaker FLYF407ZG (STM32F407ZG) +#define BOARD_MKS_ROBIN2 4226 // MKS_ROBIN2 (STM32F407ZE) +#define BOARD_MKS_ROBIN_PRO_V2 4227 // MKS Robin Pro V2 (STM32F407VE) +#define BOARD_MKS_ROBIN_NANO_V3 4228 // MKS Robin Nano V3 (STM32F407VG) +#define BOARD_MKS_MONSTER8 4229 // MKS Monster8 (STM32F407VGT6) +#define BOARD_ANET_ET4 4230 // ANET ET4 V1.x (STM32F407VGT6) +#define BOARD_ANET_ET4P 4231 // ANET ET4P V1.x (STM32F407VGT6) +#define BOARD_FYSETC_CHEETAH_V20 4232 // FYSETC Cheetah V2.0 +#define BOARD_TH3D_EZBOARD_LITE_V2 4233 // TH3D EZBoard Lite v2.0 +#define BOARD_INDEX_REV03 4234 // Index PnP Controller REV03 (STM32F407VET6/VGT6) +#define BOARD_MKS_ROBIN_NANO_V1_3_F4 4235 // MKS Robin Nano V1.3 and MKS Robin Nano-S V1.3 (STM32F407VET6) +#define BOARD_MKS_EAGLE 4236 // MKS Eagle (STM32F407VET6) // // ARM Cortex M7 @@ -384,16 +415,19 @@ #define BOARD_TEENSY41 5001 // Teensy 4.1 #define BOARD_T41U5XBB 5002 // T41U5XBB Teensy 4.1 breakout board #define BOARD_NUCLEO_F767ZI 5003 // ST NUCLEO-F767ZI Dev Board +#define BOARD_BTT_SKR_SE_BX 5004 // BigTreeTech SKR SE BX (STM32H743II) // // Espressif ESP32 WiFi // #define BOARD_ESPRESSIF_ESP32 6000 // Generic ESP32 -#define BOARD_MRR_ESPA 6001 // MRR ESPA board based on ESP32 (native pins only) -#define BOARD_MRR_ESPE 6002 // MRR ESPE board based on ESP32 (with I2S stepper stream) +#define BOARD_MRR_ESPA 6001 // MRR ESPA based on ESP32 (native pins only) +#define BOARD_MRR_ESPE 6002 // MRR ESPE based on ESP32 (with I2S stepper stream) #define BOARD_E4D_BOX 6003 // E4d@BOX #define BOARD_FYSETC_E4 6004 // FYSETC E4 +#define BOARD_PANDA_ZHU 6005 // Panda_ZHU +#define BOARD_PANDA_M4 6006 // Panda_M4 // // SAMD51 ARM Cortex M4 @@ -415,5 +449,3 @@ #define _MB_1(B) (defined(BOARD_##B) && MOTHERBOARD==BOARD_##B) #define MB(V...) DO(MB,||,V) - -#define IS_MELZI MB(MELZI, MELZI_CREALITY, MELZI_MAKR3D, MELZI_MALYAN, MELZI_TRONXY, MELZI_V2) diff --git a/Marlin/src/core/bug_on.h b/Marlin/src/core/bug_on.h new file mode 100644 index 000000000000..7f1243ed40b6 --- /dev/null +++ b/Marlin/src/core/bug_on.h @@ -0,0 +1,39 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Copyright (c) 2021 X-Ryl669 [https://blog.cyril.by] + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// We need SERIAL_ECHOPGM and macros.h +#include "serial.h" + +#if ENABLED(POSTMORTEM_DEBUGGING) + // Useful macro for stopping the CPU on an unexpected condition + // This is used like SERIAL_ECHOPGM, that is: a key-value call of the local variables you want + // to dump to the serial port before stopping the CPU. + // \/ Don't replace by SERIAL_ECHOPGM since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building + #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": "); SERIAL_ECHOLNPGM(V); SERIAL_FLUSHTX(); *(char*)0 = 42; } while(0) +#elif ENABLED(MARLIN_DEV_MODE) + // Don't stop the CPU here, but at least dump the bug on the serial port + // \/ Don't replace by SERIAL_ECHOPGM since ONLY_FILENAME cannot be transformed to a PGM string on Arduino and it breaks building + #define BUG_ON(V...) do { SERIAL_ECHO(ONLY_FILENAME); SERIAL_ECHO(__LINE__); SERIAL_ECHOLNPGM(": BUG!"); SERIAL_ECHOLNPGM(V); SERIAL_FLUSHTX(); } while(0) +#else + // Release mode, let's ignore the bug + #define BUG_ON(V...) NOOP +#endif diff --git a/Marlin/src/core/debug_out.h b/Marlin/src/core/debug_out.h index 6ae1b9d8bb97..4e30a5306e9e 100644 --- a/Marlin/src/core/debug_out.h +++ b/Marlin/src/core/debug_out.h @@ -27,7 +27,6 @@ // #undef DEBUG_SECTION -#undef DEBUG_PRINT_P #undef DEBUG_ECHO_START #undef DEBUG_ERROR_START #undef DEBUG_CHAR @@ -37,12 +36,10 @@ #undef DEBUG_ECHOLN #undef DEBUG_ECHOPGM #undef DEBUG_ECHOLNPGM -#undef DEBUG_ECHOPAIR -#undef DEBUG_ECHOPAIR_P +#undef DEBUG_ECHOPGM_P +#undef DEBUG_ECHOLNPGM_P #undef DEBUG_ECHOPAIR_F #undef DEBUG_ECHOPAIR_F_P -#undef DEBUG_ECHOLNPAIR -#undef DEBUG_ECHOLNPAIR_P #undef DEBUG_ECHOLNPAIR_F #undef DEBUG_ECHOLNPAIR_F_P #undef DEBUG_ECHO_MSG @@ -59,7 +56,6 @@ #include "debug_section.h" #define DEBUG_SECTION(N,S,D) SectionLog N(PSTR(S),D) - #define DEBUG_PRINT_P(P) serialprintPGM(P) #define DEBUG_ECHO_START SERIAL_ECHO_START #define DEBUG_ERROR_START SERIAL_ERROR_START #define DEBUG_CHAR SERIAL_CHAR @@ -69,12 +65,12 @@ #define DEBUG_ECHOLN SERIAL_ECHOLN #define DEBUG_ECHOPGM SERIAL_ECHOPGM #define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM - #define DEBUG_ECHOPAIR SERIAL_ECHOPAIR - #define DEBUG_ECHOPAIR_P SERIAL_ECHOPAIR_P + #define DEBUG_ECHOPGM SERIAL_ECHOPGM + #define DEBUG_ECHOPGM_P SERIAL_ECHOPGM_P #define DEBUG_ECHOPAIR_F SERIAL_ECHOPAIR_F #define DEBUG_ECHOPAIR_F_P SERIAL_ECHOPAIR_F_P - #define DEBUG_ECHOLNPAIR SERIAL_ECHOLNPAIR - #define DEBUG_ECHOLNPAIR_P SERIAL_ECHOLNPAIR_P + #define DEBUG_ECHOLNPGM SERIAL_ECHOLNPGM + #define DEBUG_ECHOLNPGM_P SERIAL_ECHOLNPGM_P #define DEBUG_ECHOLNPAIR_F SERIAL_ECHOLNPAIR_F #define DEBUG_ECHOLNPAIR_F_P SERIAL_ECHOLNPAIR_F_P #define DEBUG_ECHO_MSG SERIAL_ECHO_MSG @@ -89,7 +85,6 @@ #else #define DEBUG_SECTION(...) NOOP - #define DEBUG_PRINT_P(P) NOOP #define DEBUG_ECHO_START() NOOP #define DEBUG_ERROR_START() NOOP #define DEBUG_CHAR(...) NOOP @@ -99,12 +94,10 @@ #define DEBUG_ECHOLN(...) NOOP #define DEBUG_ECHOPGM(...) NOOP #define DEBUG_ECHOLNPGM(...) NOOP - #define DEBUG_ECHOPAIR(...) NOOP - #define DEBUG_ECHOPAIR_P(...) NOOP + #define DEBUG_ECHOPGM_P(...) NOOP + #define DEBUG_ECHOLNPGM_P(...) NOOP #define DEBUG_ECHOPAIR_F(...) NOOP #define DEBUG_ECHOPAIR_F_P(...) NOOP - #define DEBUG_ECHOLNPAIR(...) NOOP - #define DEBUG_ECHOLNPAIR_P(...) NOOP #define DEBUG_ECHOLNPAIR_F(...) NOOP #define DEBUG_ECHOLNPAIR_F_P(...) NOOP #define DEBUG_ECHO_MSG(...) NOOP diff --git a/Marlin/src/core/debug_section.h b/Marlin/src/core/debug_section.h index 7f39bc7424e7..ef1511e6f082 100644 --- a/Marlin/src/core/debug_section.h +++ b/Marlin/src/core/debug_section.h @@ -38,12 +38,12 @@ class SectionLog { bool debug; void echo_msg(PGM_P const pre) { - serialprintPGM(pre); + SERIAL_ECHOPGM_P(pre); if (the_msg) { SERIAL_CHAR(' '); - serialprintPGM(the_msg); + SERIAL_ECHOPGM_P(the_msg); } SERIAL_CHAR(' '); - print_xyz(current_position); + print_pos(current_position); } }; diff --git a/Marlin/src/core/drivers.h b/Marlin/src/core/drivers.h index 3a0e620923ad..0a76410274bb 100644 --- a/Marlin/src/core/drivers.h +++ b/Marlin/src/core/drivers.h @@ -60,6 +60,9 @@ #define AXIS_DRIVER_TYPE_X(T) _AXIS_DRIVER_TYPE(X,T) #define AXIS_DRIVER_TYPE_Y(T) _AXIS_DRIVER_TYPE(Y,T) #define AXIS_DRIVER_TYPE_Z(T) _AXIS_DRIVER_TYPE(Z,T) +#define AXIS_DRIVER_TYPE_I(T) _AXIS_DRIVER_TYPE(I,T) +#define AXIS_DRIVER_TYPE_J(T) _AXIS_DRIVER_TYPE(J,T) +#define AXIS_DRIVER_TYPE_K(T) _AXIS_DRIVER_TYPE(K,T) #define AXIS_DRIVER_TYPE_X2(T) (EITHER(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE) && _AXIS_DRIVER_TYPE(X2,T)) #define AXIS_DRIVER_TYPE_Y2(T) (ENABLED(Y_DUAL_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Y2,T)) @@ -83,6 +86,7 @@ #define HAS_E_DRIVER(T) (0 RREPEAT2(E_STEPPERS, _OR_ADTE, T)) #define HAS_DRIVER(T) ( AXIS_DRIVER_TYPE_X(T) || AXIS_DRIVER_TYPE_Y(T) || AXIS_DRIVER_TYPE_Z(T) \ + || AXIS_DRIVER_TYPE_I(T) || AXIS_DRIVER_TYPE_J(T) || AXIS_DRIVER_TYPE_K(T) \ || AXIS_DRIVER_TYPE_X2(T) || AXIS_DRIVER_TYPE_Y2(T) || AXIS_DRIVER_TYPE_Z2(T) \ || AXIS_DRIVER_TYPE_Z3(T) || AXIS_DRIVER_TYPE_Z4(T) || HAS_E_DRIVER(T) ) @@ -153,9 +157,11 @@ #define _OR_EAH(N,T) || AXIS_HAS_##T(E##N) #define E_AXIS_HAS(T) (0 _OR_EAH(0,T) _OR_EAH(1,T) _OR_EAH(2,T) _OR_EAH(3,T) _OR_EAH(4,T) _OR_EAH(5,T) _OR_EAH(6,T) _OR_EAH(7,T)) -#define ANY_AXIS_HAS(T) ( AXIS_HAS_##T(X) || AXIS_HAS_##T(Y) || AXIS_HAS_##T(Z) \ - || AXIS_HAS_##T(X2) || AXIS_HAS_##T(Y2) || AXIS_HAS_##T(Z2) \ - || AXIS_HAS_##T(Z3) || AXIS_HAS_##T(Z4) || E_AXIS_HAS(T) ) +#define ANY_AXIS_HAS(T) ( AXIS_HAS_##T(X) || AXIS_HAS_##T(X2) \ + || AXIS_HAS_##T(Y) || AXIS_HAS_##T(Y2) \ + || AXIS_HAS_##T(Z) || AXIS_HAS_##T(Z2) || AXIS_HAS_##T(Z3) || AXIS_HAS_##T(Z4) \ + || AXIS_HAS_##T(I) || AXIS_HAS_##T(J) || AXIS_HAS_##T(K) \ + || E_AXIS_HAS(T) ) #if ANY_AXIS_HAS(STEALTHCHOP) #define HAS_STEALTHCHOP 1 diff --git a/Marlin/src/core/language.h b/Marlin/src/core/language.h index 923ad903cb55..03bffb8bd9ad 100644 --- a/Marlin/src/core/language.h +++ b/Marlin/src/core/language.h @@ -48,8 +48,8 @@ // cz Czech // da Danish // de German -// el Greek -// el_gr Greek (Greece) +// el Greek (Greece) +// el_CY Greek (Cyprus) // en English // es Spanish // eu Basque-Euskera @@ -130,7 +130,9 @@ #define STR_COUNT_A " Count A:" #define STR_WATCHDOG_FIRED "Watchdog timeout. Reset required." #define STR_ERR_KILLED "Printer halted. kill() called!" +#define STR_FLOWMETER_FAULT "Coolant flow fault. Flowmeter safety is active. Attention required." #define STR_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)" +#define STR_ERR_SERIAL_MISMATCH "Serial status mismatch" #define STR_BUSY_PROCESSING "busy: processing" #define STR_BUSY_PAUSED_FOR_USER "busy: paused for user" #define STR_BUSY_PAUSED_FOR_INPUT "busy: paused for input" @@ -138,25 +140,7 @@ #define STR_RESEND "Resend: " #define STR_UNKNOWN_COMMAND "Unknown command: \"" #define STR_ACTIVE_EXTRUDER "Active Extruder: " -#define STR_X_MIN "x_min" -#define STR_X_MAX "x_max" -#define STR_X2_MIN "x2_min" -#define STR_X2_MAX "x2_max" -#define STR_Y_MIN "y_min" -#define STR_Y_MAX "y_max" -#define STR_Y2_MIN "y2_min" -#define STR_Y2_MAX "y2_max" -#define STR_Z_MIN "z_min" -#define STR_Z_MAX "z_max" -#define STR_Z2_MIN "z2_min" -#define STR_Z2_MAX "z2_max" -#define STR_Z3_MIN "z3_min" -#define STR_Z3_MAX "z3_max" -#define STR_Z4_MIN "z4_min" -#define STR_Z4_MAX "z4_max" -#define STR_Z_PROBE "z_probe" -#define STR_PROBE_EN "probe_en" -#define STR_FILAMENT_RUNOUT_SENSOR "filament" + #define STR_PROBE_OFFSET "Probe Offset" #define STR_SKEW_MIN "min_skew_factor: " #define STR_SKEW_MAX "max_skew_factor: " @@ -174,15 +158,14 @@ #define STR_OFF "OFF" #define STR_ENDSTOP_HIT "TRIGGERED" #define STR_ENDSTOP_OPEN "open" -#define STR_HOTEND_OFFSET "Hotend offsets:" #define STR_DUPLICATION_MODE "Duplication mode: " -#define STR_SOFT_ENDSTOPS "Soft endstops: " #define STR_SOFT_MIN " Min: " #define STR_SOFT_MAX " Max: " #define STR_SAVED_POS "Position saved" #define STR_RESTORING_POS "Restoring position" #define STR_INVALID_POS_SLOT "Invalid slot. Total: " +#define STR_DONE "Done." #define STR_SD_CANT_OPEN_SUBDIR "Cannot open subdir " #define STR_SD_INIT_FAIL "No SD card" @@ -221,7 +204,7 @@ // temperature.cpp strings #define STR_PID_AUTOTUNE_START "PID Autotune start" -#define STR_PID_BAD_EXTRUDER_NUM "PID Autotune failed! Bad extruder number" +#define STR_PID_BAD_HEATER_ID "PID Autotune failed! Bad heater id" #define STR_PID_TEMP_TOO_HIGH "PID Autotune failed! Temperature too high" #define STR_PID_TIMEOUT "PID Autotune failed! timeout" #define STR_BIAS " bias: " @@ -246,6 +229,11 @@ #define STR_HEATER_BED "bed" #define STR_HEATER_CHAMBER "chamber" +#define STR_COOLER "cooler" +#define STR_MOTHERBOARD "motherboard" +#define STR_PROBE "probe" +#define STR_REDUNDANT "redundant " +#define STR_LASER_TEMP "laser temperature" #define STR_STOPPED_HEATER ", system stopped! Heater_ID: " #define STR_REDUNDANCY "Heater switched off. Temperature difference between temp sensors is too high !" @@ -273,17 +261,87 @@ #define STR_REMINDER_SAVE_SETTINGS "Remember to save!" #define STR_PASSWORD_SET "Password is " -// LCD Menu Messages +// Settings Report Strings +#define STR_Z_AUTO_ALIGN "Z Auto-Align" +#define STR_BACKLASH_COMPENSATION "Backlash compensation" +#define STR_S_SEG_PER_SEC "S" +#define STR_DELTA_SETTINGS "Delta (L R H S XYZ ABC)" +#define STR_SCARA_SETTINGS "SCARA" +#define STR_POLARGRAPH_SETTINGS "Polargraph" +#define STR_SCARA_P_T_Z "P T Z" +#define STR_ENDSTOP_ADJUSTMENT "Endstop adjustment" +#define STR_SKEW_FACTOR "Skew Factor" +#define STR_FILAMENT_SETTINGS "Filament settings" +#define STR_MAX_ACCELERATION "Max Acceleration (units/s2)" +#define STR_MAX_FEEDRATES "Max feedrates (units/s)" +#define STR_ACCELERATION_P_R_T "Acceleration (units/s2) (P R T)" +#define STR_TOOL_CHANGING "Tool-changing" +#define STR_HOTEND_OFFSETS "Hotend offsets" +#define STR_SERVO_ANGLES "Servo Angles" +#define STR_HOTEND_PID "Hotend PID" +#define STR_BED_PID "Bed PID" +#define STR_CHAMBER_PID "Chamber PID" +#define STR_STEPS_PER_UNIT "Steps per unit" +#define STR_LINEAR_ADVANCE "Linear Advance" +#define STR_CONTROLLER_FAN "Controller Fan" +#define STR_STEPPER_MOTOR_CURRENTS "Stepper motor currents" +#define STR_RETRACT_S_F_Z "Retract (S F Z)" +#define STR_RECOVER_S_F "Recover (S F)" +#define STR_AUTO_RETRACT_S "Auto-Retract (S)" +#define STR_FILAMENT_LOAD_UNLOAD "Filament load/unload" +#define STR_POWER_LOSS_RECOVERY "Power-loss recovery" +#define STR_FILAMENT_RUNOUT_SENSOR "Filament runout sensor" +#define STR_DRIVER_STEPPING_MODE "Driver stepping mode" +#define STR_STEPPER_DRIVER_CURRENT "Stepper driver current" +#define STR_HYBRID_THRESHOLD "Hybrid Threshold" +#define STR_STALLGUARD_THRESHOLD "StallGuard threshold" +#define STR_HOME_OFFSET "Home offset" +#define STR_SOFT_ENDSTOPS "Soft endstops" +#define STR_MATERIAL_HEATUP "Material heatup parameters" +#define STR_LCD_CONTRAST "LCD Contrast" +#define STR_LCD_BRIGHTNESS "LCD Brightness" +#define STR_UI_LANGUAGE "UI Language" +#define STR_Z_PROBE_OFFSET "Z-Probe Offset" +#define STR_TEMPERATURE_UNITS "Temperature Units" +#define STR_USER_THERMISTORS "User thermistors" -#define LANGUAGE_DATA_INCL_(M) STRINGIFY_(fontdata/langdata_##M.h) -#define LANGUAGE_DATA_INCL(M) LANGUAGE_DATA_INCL_(M) +// +// Endstop Names used by Endstops::report_states +// +#define STR_X_MIN "x_min" +#define STR_X_MAX "x_max" +#define STR_X2_MIN "x2_min" +#define STR_X2_MAX "x2_max" -#define LANGUAGE_INCL_(M) STRINGIFY_(../lcd/language/language_##M.h) -#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M) +#if HAS_Y_AXIS + #define STR_Y_MIN "y_min" + #define STR_Y_MAX "y_max" + #define STR_Y2_MIN "y2_min" + #define STR_Y2_MAX "y2_max" +#endif + +#if HAS_Z_AXIS + #define STR_Z_MIN "z_min" + #define STR_Z_MAX "z_max" + #define STR_Z2_MIN "z2_min" + #define STR_Z2_MAX "z2_max" + #define STR_Z3_MIN "z3_min" + #define STR_Z3_MAX "z3_max" + #define STR_Z4_MIN "z4_min" + #define STR_Z4_MAX "z4_max" +#endif +#define STR_Z_PROBE "z_probe" +#define STR_PROBE_EN "probe_en" +#define STR_FILAMENT "filament" + +// General axis names #define STR_X "X" #define STR_Y "Y" #define STR_Z "Z" +#define STR_I AXIS4_STR +#define STR_J AXIS5_STR +#define STR_K AXIS6_STR #define STR_E "E" #if IS_KINEMATIC #define STR_A "A" @@ -303,8 +361,114 @@ #define LCD_STR_A STR_A #define LCD_STR_B STR_B #define LCD_STR_C STR_C +#define LCD_STR_I STR_I +#define LCD_STR_J STR_J +#define LCD_STR_K STR_K #define LCD_STR_E STR_E +// Extra Axis and Endstop Names +#if LINEAR_AXES >= 4 + #if AXIS4_NAME == 'A' + #define AXIS4_STR "A" + #define STR_I_MIN "a_min" + #define STR_I_MAX "a_max" + #elif AXIS4_NAME == 'B' + #define AXIS4_STR "B" + #define STR_I_MIN "b_min" + #define STR_I_MAX "b_max" + #elif AXIS4_NAME == 'C' + #define AXIS4_STR "C" + #define STR_I_MIN "c_min" + #define STR_I_MAX "c_max" + #elif AXIS4_NAME == 'U' + #define AXIS4_STR "U" + #define STR_I_MIN "u_min" + #define STR_I_MAX "u_max" + #elif AXIS4_NAME == 'V' + #define AXIS4_STR "V" + #define STR_I_MIN "v_min" + #define STR_I_MAX "v_max" + #elif AXIS4_NAME == 'W' + #define AXIS4_STR "W" + #define STR_I_MIN "w_min" + #define STR_I_MAX "w_max" + #else + #define AXIS4_STR "A" + #define STR_I_MIN "a_min" + #define STR_I_MAX "a_max" + #endif +#else + #define AXIS4_STR "" +#endif + +#if LINEAR_AXES >= 5 + #if AXIS5_NAME == 'A' + #define AXIS5_STR "A" + #define STR_J_MIN "a_min" + #define STR_J_MAX "a_max" + #elif AXIS5_NAME == 'B' + #define AXIS5_STR "B" + #define STR_J_MIN "b_min" + #define STR_J_MAX "b_max" + #elif AXIS5_NAME == 'C' + #define AXIS5_STR "C" + #define STR_J_MIN "c_min" + #define STR_J_MAX "c_max" + #elif AXIS5_NAME == 'U' + #define AXIS5_STR "U" + #define STR_J_MIN "u_min" + #define STR_J_MAX "u_max" + #elif AXIS5_NAME == 'V' + #define AXIS5_STR "V" + #define STR_J_MIN "v_min" + #define STR_J_MAX "v_max" + #elif AXIS5_NAME == 'W' + #define AXIS5_STR "W" + #define STR_J_MIN "w_min" + #define STR_J_MAX "w_max" + #else + #define AXIS5_STR "B" + #define STR_J_MIN "b_min" + #define STR_J_MAX "b_max" + #endif +#else + #define AXIS5_STR "" +#endif + +#if LINEAR_AXES >= 6 + #if AXIS6_NAME == 'A' + #define AXIS6_STR "A" + #define STR_K_MIN "a_min" + #define STR_K_MAX "a_max" + #elif AXIS6_NAME == 'B' + #define AXIS6_STR "B" + #define STR_K_MIN "b_min" + #define STR_K_MAX "b_max" + #elif AXIS6_NAME == 'C' + #define AXIS6_STR "C" + #define STR_K_MIN "c_min" + #define STR_K_MAX "c_max" + #elif AXIS6_NAME == 'U' + #define AXIS6_STR "U" + #define STR_K_MIN "u_min" + #define STR_K_MAX "u_max" + #elif AXIS6_NAME == 'V' + #define AXIS6_STR "V" + #define STR_K_MIN "v_min" + #define STR_K_MAX "v_max" + #elif AXIS6_NAME == 'W' + #define AXIS6_STR "W" + #define STR_K_MIN "w_min" + #define STR_K_MAX "w_max" + #else + #define AXIS6_STR "C" + #define STR_K_MIN "c_min" + #define STR_K_MAX "c_max" + #endif +#else + #define AXIS6_STR "" +#endif + #if EITHER(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL) // Custom characters defined in the first 8 characters of the LCD @@ -382,6 +546,14 @@ #define LCD_STR_E6 "E" LCD_STR_N6 #define LCD_STR_E7 "E" LCD_STR_N7 +// Include localized LCD Menu Messages + +#define LANGUAGE_DATA_INCL_(M) STRINGIFY_(fontdata/langdata_##M.h) +#define LANGUAGE_DATA_INCL(M) LANGUAGE_DATA_INCL_(M) + +#define LANGUAGE_INCL_(M) STRINGIFY_(../lcd/language/language_##M.h) +#define LANGUAGE_INCL(M) LANGUAGE_INCL_(M) + // Use superscripts, if possible. Evaluated at point of use. #define SUPERSCRIPT_TWO TERN(NOT_EXTENDED_ISO10646_1_5X7, "^2", "²") #define SUPERSCRIPT_THREE TERN(NOT_EXTENDED_ISO10646_1_5X7, "^3", "³") diff --git a/Marlin/src/core/macros.h b/Marlin/src/core/macros.h index 905b85d56da4..22c3767e1dc8 100644 --- a/Marlin/src/core/macros.h +++ b/Marlin/src/core/macros.h @@ -33,23 +33,32 @@ #define _AXIS(A) (A##_AXIS) -#define _XMIN_ 100 -#define _YMIN_ 200 -#define _ZMIN_ 300 -#define _XMAX_ 101 -#define _YMAX_ 201 -#define _ZMAX_ 301 -#define _XDIAG_ 102 -#define _YDIAG_ 202 -#define _ZDIAG_ 302 -#define _E0DIAG_ 400 -#define _E1DIAG_ 401 -#define _E2DIAG_ 402 -#define _E3DIAG_ 403 -#define _E4DIAG_ 404 -#define _E5DIAG_ 405 -#define _E6DIAG_ 406 -#define _E7DIAG_ 407 +#define _XMIN_ 0x11 +#define _YMIN_ 0x12 +#define _ZMIN_ 0x13 +#define _IMIN_ 0x14 +#define _JMIN_ 0x15 +#define _KMIN_ 0x16 +#define _XMAX_ 0x21 +#define _YMAX_ 0x22 +#define _ZMAX_ 0x23 +#define _IMAX_ 0x24 +#define _JMAX_ 0x25 +#define _KMAX_ 0x26 +#define _XDIAG_ 0x31 +#define _YDIAG_ 0x32 +#define _ZDIAG_ 0x33 +#define _IDIAG_ 0x34 +#define _JDIAG_ 0x35 +#define _KDIAG_ 0x36 +#define _E0DIAG_ 0xE0 +#define _E1DIAG_ 0xE1 +#define _E2DIAG_ 0xE2 +#define _E3DIAG_ 0xE3 +#define _E4DIAG_ 0xE4 +#define _E5DIAG_ 0xE5 +#define _E6DIAG_ 0xE6 +#define _E7DIAG_ 0xE7 #define _FORCE_INLINE_ __attribute__((__always_inline__)) __inline__ #define FORCE_INLINE __attribute__((always_inline)) inline @@ -61,6 +70,8 @@ #define _O2 __attribute__((optimize("O2"))) #define _O3 __attribute__((optimize("O3"))) +#define IS_CONSTEXPR(...) __builtin_constant_p(__VA_ARGS__) // Only valid solution with C++14. Should use std::is_constant_evaluated() in C++20 instead + #ifndef UNUSED #define UNUSED(x) ((void)(x)) #endif @@ -102,6 +113,7 @@ #define RADIANS(d) ((d)*float(M_PI)/180.0f) #define DEGREES(r) ((r)*180.0f/float(M_PI)) #define HYPOT2(x,y) (sq(x)+sq(y)) +#define NORMSQ(x,y,z) (sq(x)+sq(y)+sq(z)) #define CIRCLE_AREA(R) (float(M_PI) * sq(float(R))) #define CIRCLE_CIRC(R) (2 * float(M_PI) * float(R)) @@ -128,20 +140,20 @@ #define NOLESS(v, n) \ do{ \ - __typeof__(n) _n = (n); \ + __typeof__(v) _n = (n); \ if (_n > v) v = _n; \ }while(0) #define NOMORE(v, n) \ do{ \ - __typeof__(n) _n = (n); \ + __typeof__(v) _n = (n); \ if (_n < v) v = _n; \ }while(0) #define LIMIT(v, n1, n2) \ do{ \ - __typeof__(n1) _n1 = (n1); \ - __typeof__(n2) _n2 = (n2); \ + __typeof__(v) _n1 = (n1); \ + __typeof__(v) _n2 = (n2); \ if (_n1 > v) v = _n1; \ else if (_n2 < v) v = _n2; \ }while(0) @@ -184,14 +196,26 @@ #define DISABLED(V...) DO(DIS,&&,V) #define COUNT_ENABLED(V...) DO(ENA,+,V) -#define TERN(O,A,B) _TERN(_ENA_1(O),B,A) // OPTION converted to '0' or '1' -#define TERN0(O,A) _TERN(_ENA_1(O),0,A) // OPTION converted to A or '0' -#define TERN1(O,A) _TERN(_ENA_1(O),1,A) // OPTION converted to A or '1' -#define TERN_(O,A) _TERN(_ENA_1(O),,A) // OPTION converted to A or '' +#define TERN(O,A,B) _TERN(_ENA_1(O),B,A) // OPTION ? 'A' : 'B' +#define TERN0(O,A) _TERN(_ENA_1(O),0,A) // OPTION ? 'A' : '0' +#define TERN1(O,A) _TERN(_ENA_1(O),1,A) // OPTION ? 'A' : '1' +#define TERN_(O,A) _TERN(_ENA_1(O),,A) // OPTION ? 'A' : '' #define _TERN(E,V...) __TERN(_CAT(T_,E),V) // Prepend 'T_' to get 'T_0' or 'T_1' #define __TERN(T,V...) ___TERN(_CAT(_NO,T),V) // Prepend '_NO' to get '_NOT_0' or '_NOT_1' #define ___TERN(P,V...) THIRD(P,V) // If first argument has a comma, A. Else B. +#define _OPTARG(A...) , A +#define OPTARG(O,A...) TERN_(O,DEFER4(_OPTARG)(A)) +#define _OPTCODE(A) A; +#define OPTCODE(O,A) TERN_(O,DEFER4(_OPTCODE)(A)) + +// Macros to avoid 'f + 0.0' which is not always optimized away. Minus included for symmetry. +// Compiler flags -fno-signed-zeros -ffinite-math-only also cover 'f * 1.0', 'f - f', etc. +#define PLUS_TERN0(O,A) _TERN(_ENA_1(O),,+ (A)) // OPTION ? '+ (A)' : '' +#define MINUS_TERN0(O,A) _TERN(_ENA_1(O),,- (A)) // OPTION ? '- (A)' : '' +#define SUM_TERN(O,B,A) ((B) PLUS_TERN0(O,A)) // ((B) (OPTION ? '+ (A)' : '')) +#define DIFF_TERN(O,B,A) ((B) MINUS_TERN0(O,A)) // ((B) (OPTION ? '- (A)' : '')) + #define IF_ENABLED TERN_ #define IF_DISABLED(O,A) TERN(O,,A) @@ -227,7 +251,47 @@ memcpy(&a[0],&b[0],_MIN(sizeof(a),sizeof(b))); \ }while(0) +#define CODE_11( A,B,C,D,E,F,G,H,I,J,K,...) A; B; C; D; E; F; G; H; I; J; K +#define CODE_10( A,B,C,D,E,F,G,H,I,J,...) A; B; C; D; E; F; G; H; I; J +#define CODE_9( A,B,C,D,E,F,G,H,I,...) A; B; C; D; E; F; G; H; I +#define CODE_8( A,B,C,D,E,F,G,H,...) A; B; C; D; E; F; G; H +#define CODE_7( A,B,C,D,E,F,G,...) A; B; C; D; E; F; G +#define CODE_6( A,B,C,D,E,F,...) A; B; C; D; E; F +#define CODE_5( A,B,C,D,E,...) A; B; C; D; E +#define CODE_4( A,B,C,D,...) A; B; C; D +#define CODE_3( A,B,C,...) A; B; C +#define CODE_2( A,B,...) A; B +#define CODE_1( A,...) A +#define CODE_0(...) +#define _CODE_N(N,V...) CODE_##N(V) +#define CODE_N(N,V...) _CODE_N(N,V) + +#define GANG_16(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,...) A B C D E F G H I J K L M N O P +#define GANG_15(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,...) A B C D E F G H I J K L M N O +#define GANG_14(A,B,C,D,E,F,G,H,I,J,K,L,M,N,...) A B C D E F G H I J K L M N +#define GANG_13(A,B,C,D,E,F,G,H,I,J,K,L,M...) A B C D E F G H I J K L M +#define GANG_12(A,B,C,D,E,F,G,H,I,J,K,L...) A B C D E F G H I J K L +#define GANG_11(A,B,C,D,E,F,G,H,I,J,K,...) A B C D E F G H I J K +#define GANG_10(A,B,C,D,E,F,G,H,I,J,...) A B C D E F G H I J +#define GANG_9( A,B,C,D,E,F,G,H,I,...) A B C D E F G H I +#define GANG_8( A,B,C,D,E,F,G,H,...) A B C D E F G H +#define GANG_7( A,B,C,D,E,F,G,...) A B C D E F G +#define GANG_6( A,B,C,D,E,F,...) A B C D E F +#define GANG_5( A,B,C,D,E,...) A B C D E +#define GANG_4( A,B,C,D,...) A B C D +#define GANG_3( A,B,C,...) A B C +#define GANG_2( A,B,...) A B +#define GANG_1( A,...) A +#define GANG_0(...) +#define _GANG_N(N,V...) GANG_##N(V) +#define GANG_N(N,V...) _GANG_N(N,V) +#define GANG_N_1(N,K) _GANG_N(N,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K) + // Macros for initializing arrays +#define LIST_20(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T +#define LIST_19(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S +#define LIST_18(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R +#define LIST_17(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q #define LIST_16(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P #define LIST_15(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N,O #define LIST_14(A,B,C,D,E,F,G,H,I,J,K,L,M,N,...) A,B,C,D,E,F,G,H,I,J,K,L,M,N @@ -244,10 +308,13 @@ #define LIST_3( A,B,C,...) A,B,C #define LIST_2( A,B,...) A,B #define LIST_1( A,...) A +#define LIST_0(...) #define _LIST_N(N,V...) LIST_##N(V) #define LIST_N(N,V...) _LIST_N(N,V) +#define LIST_N_1(N,K) _LIST_N(N,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K,K) #define ARRAY_N(N,V...) { _LIST_N(N,V) } +#define ARRAY_N_1(N,K) { LIST_N_1(N,K) } #define _JOIN_1(O) (O) #define JOIN_N(N,C,V...) (DO(JOIN,C,LIST_N(N,V))) @@ -291,8 +358,12 @@ #define HYPOT(x,y) SQRT(HYPOT2(x,y)) // Use NUM_ARGS(__VA_ARGS__) to get the number of variadic arguments -#define _NUM_ARGS(_,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT -#define NUM_ARGS(V...) _NUM_ARGS(0,V,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0) +#define _NUM_ARGS(_,n,m,l,k,j,i,h,g,f,e,d,c,b,a,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT +#define NUM_ARGS(V...) _NUM_ARGS(0,V,40,39,38,37,36,35,34,33,32,31,30,29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0) + +// Use TWO_ARGS(__VA_ARGS__) to get whether there are 1, 2, or >2 arguments +#define _TWO_ARGS(_,n,m,l,k,j,i,h,g,f,e,d,c,b,a,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT +#define TWO_ARGS(V...) _TWO_ARGS(0,V,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,1,0) #ifdef __cplusplus @@ -315,12 +386,28 @@ #endif + // Allow manipulating enumeration value like flags without ugly cast everywhere + #define ENUM_FLAGS(T) \ + FORCE_INLINE constexpr T operator&(T x, T y) { return static_cast(static_cast(x) & static_cast(y)); } \ + FORCE_INLINE constexpr T operator|(T x, T y) { return static_cast(static_cast(x) | static_cast(y)); } \ + FORCE_INLINE constexpr T operator^(T x, T y) { return static_cast(static_cast(x) ^ static_cast(y)); } \ + FORCE_INLINE constexpr T operator~(T x) { return static_cast(~static_cast(x)); } \ + FORCE_INLINE T & operator&=(T &x, T y) { return x &= y; } \ + FORCE_INLINE T & operator|=(T &x, T y) { return x |= y; } \ + FORCE_INLINE T & operator^=(T &x, T y) { return x ^= y; } + // C++11 solution that is standard compliant. is not available on all platform namespace Private { template struct enable_if { }; template struct enable_if { typedef _Tp type; }; + + template struct is_same { enum { value = false }; }; + template struct is_same { enum { value = true }; }; + + template struct first_type_of { typedef T type; }; + template struct first_type_of { typedef T type; }; } - // C++11 solution using SFINAE to detect the existance of a member in a class at compile time. + // C++11 solution using SFINAE to detect the existence of a member in a class at compile time. // It creates a HasMember structure containing 'value' set to true if the member exists #define HAS_MEMBER_IMPL(Member) \ namespace Private { \ @@ -341,33 +428,66 @@ #define CALL_IF_EXISTS(Return, That, Method, ...) \ static_cast(Private::Call_ ## Method(That, ##__VA_ARGS__)) + // Compile-time string manipulation + namespace CompileTimeString { + // Simple compile-time parser to find the position of the end of a string + constexpr const char* findStringEnd(const char *str) { + return *str ? findStringEnd(str + 1) : str; + } + + // Check whether a string contains a specific character + constexpr bool contains(const char *str, const char ch) { + return *str == ch ? true : (*str ? contains(str + 1, ch) : false); + } + // Find the last position of the specific character (should be called with findStringEnd) + constexpr const char* findLastPos(const char *str, const char ch) { + return *str == ch ? (str + 1) : findLastPos(str - 1, ch); + } + // Compile-time evaluation of the last part of a file path + // Typically used to shorten the path to file in compiled strings + // CompileTimeString::baseName(__FILE__) returns "macros.h" and not /path/to/Marlin/src/core/macros.h + constexpr const char* baseName(const char *str) { + return contains(str, '/') ? findLastPos(findStringEnd(str), '/') : str; + } + + // Find the first occurrence of a character in a string (or return the last position in the string) + constexpr const char* findFirst(const char *str, const char ch) { + return *str == ch || *str == 0 ? (str + 1) : findFirst(str + 1, ch); + } + // Compute the string length at compile time + constexpr unsigned stringLen(const char *str) { + return *str == 0 ? 0 : 1 + stringLen(str + 1); + } + } + + #define ONLY_FILENAME CompileTimeString::baseName(__FILE__) + /** Get the templated type name. This does not depends on RTTI, but on the preprocessor, so it should be quite safe to use even on old compilers. + WARNING: DO NOT RENAME THIS FUNCTION (or change the text inside the function to match what the preprocessor will generate) + The name is chosen very short since the binary will store "const char* gtn(T*) [with T = YourTypeHere]" so avoid long function name here */ + template + inline const char* gtn(T*) { + // It works on GCC by instantiating __PRETTY_FUNCTION__ and parsing the result. So the syntax here is very limited to GCC output + constexpr unsigned verboseChatLen = sizeof("const char* gtn(T*) [with T = ") - 1; + static char templateType[sizeof(__PRETTY_FUNCTION__) - verboseChatLen] = {}; + __builtin_memcpy(templateType, __PRETTY_FUNCTION__ + verboseChatLen, sizeof(__PRETTY_FUNCTION__) - verboseChatLen - 2); + return templateType; + } + #else - #define MIN_2(a,b) ((a)<(b)?(a):(b)) - #define MIN_3(a,V...) MIN_2(a,MIN_2(V)) - #define MIN_4(a,V...) MIN_2(a,MIN_3(V)) - #define MIN_5(a,V...) MIN_2(a,MIN_4(V)) - #define MIN_6(a,V...) MIN_2(a,MIN_5(V)) - #define MIN_7(a,V...) MIN_2(a,MIN_6(V)) - #define MIN_8(a,V...) MIN_2(a,MIN_7(V)) - #define MIN_9(a,V...) MIN_2(a,MIN_8(V)) - #define MIN_10(a,V...) MIN_2(a,MIN_9(V)) #define __MIN_N(N,V...) MIN_##N(V) #define _MIN_N(N,V...) __MIN_N(N,V) - #define _MIN(V...) _MIN_N(NUM_ARGS(V), V) + #define _MIN_N_REF() _MIN_N + #define _MIN(V...) EVAL(_MIN_N(TWO_ARGS(V),V)) + #define MIN_2(a,b) ((a)<(b)?(a):(b)) + #define MIN_3(a,V...) MIN_2(a,DEFER2(_MIN_N_REF)()(TWO_ARGS(V),V)) - #define MAX_2(a,b) ((a)>(b)?(a):(b)) - #define MAX_3(a,V...) MAX_2(a,MAX_2(V)) - #define MAX_4(a,V...) MAX_2(a,MAX_3(V)) - #define MAX_5(a,V...) MAX_2(a,MAX_4(V)) - #define MAX_6(a,V...) MAX_2(a,MAX_5(V)) - #define MAX_7(a,V...) MAX_2(a,MAX_6(V)) - #define MAX_8(a,V...) MAX_2(a,MAX_7(V)) - #define MAX_9(a,V...) MAX_2(a,MAX_8(V)) - #define MAX_10(a,V...) MAX_2(a,MAX_9(V)) #define __MAX_N(N,V...) MAX_##N(V) #define _MAX_N(N,V...) __MAX_N(N,V) - #define _MAX(V...) _MAX_N(NUM_ARGS(V), V) + #define _MAX_N_REF() _MAX_N + #define _MAX(V...) EVAL(_MAX_N(TWO_ARGS(V),V)) + #define MAX_2(a,b) ((a)>(b)?(a):(b)) + #define MAX_3(a,V...) MAX_2(a,DEFER2(_MAX_N_REF)()(TWO_ARGS(V),V)) #endif @@ -388,6 +508,11 @@ #define INC_13 14 #define INC_14 15 #define INC_15 16 +#define INC_16 17 +#define INC_17 18 +#define INC_18 19 +#define INC_19 20 +#define INC_20 21 #define INCREMENT_(n) INC_##n #define INCREMENT(n) INCREMENT_(n) @@ -402,6 +527,9 @@ #define ADD8(N) ADD4(ADD4(N)) #define ADD9(N) ADD4(ADD5(N)) #define ADD10(N) ADD5(ADD5(N)) +#define SUM(A,B) _CAT(ADD,A)(B) +#define DOUBLE_(n) ADD##n(n) +#define DOUBLE(n) DOUBLE_(n) // Macros for subtracting #define DEC_0 0 @@ -510,6 +638,7 @@ // Repeat a macro passing S...N-1. #define REPEAT_S(S,N,OP) EVAL(_REPEAT(S,SUB##S(N),OP)) #define REPEAT(N,OP) REPEAT_S(0,N,OP) +#define REPEAT_1(N,OP) REPEAT_S(1,INCREMENT(N),OP) // Repeat a macro passing 0...N-1 plus additional arguments. #define REPEAT2_S(S,N,OP,V...) EVAL(_REPEAT2(S,SUB##S(N),OP,V)) diff --git a/Marlin/src/core/multi_language.h b/Marlin/src/core/multi_language.h index 5a26edf8d453..2106f946ac73 100644 --- a/Marlin/src/core/multi_language.h +++ b/Marlin/src/core/multi_language.h @@ -1,28 +1,35 @@ -/******************** - * multi_language.h * - ********************/ - -/**************************************************************************** - * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ #pragma once +/******************************************************* + * multi_language.h * + * By Marcio Teixeira 2019 for Aleph Objects * + *******************************************************/ + #include "../inc/MarlinConfigPre.h" typedef const char Language_Str[]; +#define LSTR PROGMEM Language_Str #ifdef LCD_LANGUAGE_5 #define NUM_LANGUAGES 5 @@ -36,21 +43,17 @@ typedef const char Language_Str[]; #define NUM_LANGUAGES 1 #endif -// Setting the unused languages equal to each other allows -// the compiler to optimize away the conditionals - +// Set unused languages equal to each other so the +// compiler can optimize away the conditionals. #ifndef LCD_LANGUAGE_2 #define LCD_LANGUAGE_2 LCD_LANGUAGE #endif - #ifndef LCD_LANGUAGE_3 #define LCD_LANGUAGE_3 LCD_LANGUAGE_2 #endif - #ifndef LCD_LANGUAGE_4 #define LCD_LANGUAGE_4 LCD_LANGUAGE_3 #endif - #ifndef LCD_LANGUAGE_5 #define LCD_LANGUAGE_5 LCD_LANGUAGE_4 #endif @@ -61,11 +64,11 @@ typedef const char Language_Str[]; #if NUM_LANGUAGES > 1 #define HAS_MULTI_LANGUAGE 1 #define GET_TEXT(MSG) ( \ - ui.language == 0 ? GET_LANG(LCD_LANGUAGE )::MSG : \ - ui.language == 1 ? GET_LANG(LCD_LANGUAGE_2)::MSG : \ - ui.language == 2 ? GET_LANG(LCD_LANGUAGE_3)::MSG : \ + ui.language == 4 ? GET_LANG(LCD_LANGUAGE_5)::MSG : \ ui.language == 3 ? GET_LANG(LCD_LANGUAGE_4)::MSG : \ - GET_LANG(LCD_LANGUAGE_5)::MSG ) + ui.language == 2 ? GET_LANG(LCD_LANGUAGE_3)::MSG : \ + ui.language == 1 ? GET_LANG(LCD_LANGUAGE_2)::MSG : \ + GET_LANG(LCD_LANGUAGE )::MSG ) #define MAX_LANG_CHARSIZE _MAX(GET_LANG(LCD_LANGUAGE )::CHARSIZE, \ GET_LANG(LCD_LANGUAGE_2)::CHARSIZE, \ GET_LANG(LCD_LANGUAGE_3)::CHARSIZE, \ @@ -75,7 +78,7 @@ typedef const char Language_Str[]; #define GET_TEXT(MSG) GET_LANG(LCD_LANGUAGE)::MSG #define MAX_LANG_CHARSIZE LANG_CHARSIZE #endif -#define GET_TEXT_F(MSG) (const __FlashStringHelper*)GET_TEXT(MSG) +#define GET_TEXT_F(MSG) FPSTR(GET_TEXT(MSG)) #define GET_LANGUAGE_NAME(INDEX) GET_LANG(LCD_LANGUAGE_##INDEX)::LANGUAGE #define LANG_CHARSIZE GET_TEXT(CHARSIZE) diff --git a/Marlin/src/core/serial.cpp b/Marlin/src/core/serial.cpp index 365f28ba55bf..8c9f4a8e4d16 100644 --- a/Marlin/src/core/serial.cpp +++ b/Marlin/src/core/serial.cpp @@ -36,20 +36,37 @@ PGMSTR(X_LBL, "X:"); PGMSTR(Y_LBL, "Y:"); PGMSTR(Z_LBL, "Z:"); PGMST PGMSTR(SP_A_STR, " A"); PGMSTR(SP_B_STR, " B"); PGMSTR(SP_C_STR, " C"); PGMSTR(SP_X_STR, " X"); PGMSTR(SP_Y_STR, " Y"); PGMSTR(SP_Z_STR, " Z"); PGMSTR(SP_E_STR, " E"); PGMSTR(SP_X_LBL, " X:"); PGMSTR(SP_Y_LBL, " Y:"); PGMSTR(SP_Z_LBL, " Z:"); PGMSTR(SP_E_LBL, " E:"); +PGMSTR(I_STR, AXIS4_STR); PGMSTR(J_STR, AXIS5_STR); PGMSTR(K_STR, AXIS6_STR); +PGMSTR(I_LBL, AXIS4_STR ":"); PGMSTR(J_LBL, AXIS5_STR ":"); PGMSTR(K_LBL, AXIS6_STR ":"); +PGMSTR(SP_I_STR, " " AXIS4_STR); PGMSTR(SP_J_STR, " " AXIS5_STR); PGMSTR(SP_K_STR, " " AXIS6_STR); +PGMSTR(SP_I_LBL, " " AXIS4_STR ":"); PGMSTR(SP_J_LBL, " " AXIS5_STR ":"); PGMSTR(SP_K_LBL, " " AXIS6_STR ":"); +// Hook Meatpack if it's enabled on the first leaf +#if ENABLED(MEATPACK_ON_SERIAL_PORT_1) + SerialLeafT1 mpSerial1(false, _SERIAL_LEAF_1); +#endif +#if ENABLED(MEATPACK_ON_SERIAL_PORT_2) + SerialLeafT2 mpSerial2(false, _SERIAL_LEAF_2); +#endif +#if ENABLED(MEATPACK_ON_SERIAL_PORT_3) + SerialLeafT3 mpSerial3(false, _SERIAL_LEAF_3); +#endif + +// Step 2: For multiserial, handle the second serial port as well #if HAS_MULTI_SERIAL - #ifdef SERIAL_CATCHALL - SerialOutputT multiSerial(MYSERIAL, SERIAL_CATCHALL); - #else - #if HAS_ETHERNET - // Runtime checking of the condition variable - ConditionalSerial serialOut1(ethernet.have_telnet_client, MYSERIAL1, false); // Takes reference here - #else - // Don't pay for runtime checking a true variable, instead use the output directly - #define serialOut1 MYSERIAL1 - #endif - SerialOutputT multiSerial(MYSERIAL0, serialOut1); + #if HAS_ETHERNET + // We need a definition here + SerialLeafT2 msSerial2(ethernet.have_telnet_client, MYSERIAL2, false); #endif + + #define __S_LEAF(N) ,SERIAL_LEAF_##N + #define _S_LEAF(N) __S_LEAF(N) + + SerialOutputT multiSerial( SERIAL_LEAF_1 REPEAT_S(2, INCREMENT(NUM_SERIAL), _S_LEAF) ); + + #undef __S_LEAF + #undef _S_LEAF + #endif void serialprintPGM(PGM_P str) { @@ -59,15 +76,6 @@ void serialprintPGM(PGM_P str) { void serial_echo_start() { static PGMSTR(echomagic, "echo:"); serialprintPGM(echomagic); } void serial_error_start() { static PGMSTR(errormagic, "Error:"); serialprintPGM(errormagic); } -void serial_echopair_PGM(PGM_P const s_P, const char *v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, char v) { serialprintPGM(s_P); SERIAL_CHAR(v); } -void serial_echopair_PGM(PGM_P const s_P, int v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, long v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, float v) { serialprintPGM(s_P); SERIAL_DECIMAL(v); } -void serial_echopair_PGM(PGM_P const s_P, double v) { serialprintPGM(s_P); SERIAL_DECIMAL(v); } -void serial_echopair_PGM(PGM_P const s_P, unsigned int v) { serialprintPGM(s_P); SERIAL_ECHO(v); } -void serial_echopair_PGM(PGM_P const s_P, unsigned long v) { serialprintPGM(s_P); SERIAL_ECHO(v); } - void serial_spaces(uint8_t count) { count *= (PROPORTIONAL_FONT_RATIO); while (count--) SERIAL_CHAR(' '); } void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post/*=nullptr*/) { @@ -86,8 +94,10 @@ void print_bin(uint16_t val) { } } -void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) { +void print_pos(LINEAR_AXIS_ARGS(const_float_t), PGM_P const prefix/*=nullptr*/, PGM_P const suffix/*=nullptr*/) { if (prefix) serialprintPGM(prefix); - SERIAL_ECHOPAIR_P(SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z); + SERIAL_ECHOPGM_P( + LIST_N(DOUBLE(LINEAR_AXES), SP_X_STR, x, SP_Y_STR, y, SP_Z_STR, z, SP_I_STR, i, SP_J_STR, j, SP_K_STR, k) + ); if (suffix) serialprintPGM(suffix); else SERIAL_EOL(); } diff --git a/Marlin/src/core/serial.h b/Marlin/src/core/serial.h index 4c0c32f7d8af..05d80a48298d 100644 --- a/Marlin/src/core/serial.h +++ b/Marlin/src/core/serial.h @@ -24,13 +24,22 @@ #include "../inc/MarlinConfig.h" #include "serial_hook.h" +#if HAS_MEATPACK + #include "../feature/meatpack.h" +#endif + // Commonly-used strings in serial output -extern const char NUL_STR[], SP_P_STR[], SP_T_STR[], +extern const char NUL_STR[], + SP_X_STR[], SP_Y_STR[], SP_Z_STR[], + SP_A_STR[], SP_B_STR[], SP_C_STR[], SP_E_STR[], + SP_X_LBL[], SP_Y_LBL[], SP_Z_LBL[], SP_E_LBL[], + SP_I_STR[], SP_J_STR[], SP_K_STR[], + SP_I_LBL[], SP_J_LBL[], SP_K_LBL[], + SP_P_STR[], SP_T_STR[], X_STR[], Y_STR[], Z_STR[], E_STR[], + I_STR[], J_STR[], K_STR[], X_LBL[], Y_LBL[], Z_LBL[], E_LBL[], - SP_A_STR[], SP_B_STR[], SP_C_STR[], - SP_X_STR[], SP_Y_STR[], SP_Z_STR[], SP_E_STR[], - SP_X_LBL[], SP_Y_LBL[], SP_Z_LBL[], SP_E_LBL[]; + I_LBL[], J_LBL[], K_LBL[]; // // Debugging flags for use by M111 @@ -58,224 +67,199 @@ extern uint8_t marlin_debug_flags; // // Serial redirection // -typedef int8_t serial_index_t; -#define SERIAL_ALL 0x7F +// Step 1: Find out what the first serial leaf is +#if HAS_MULTI_SERIAL && defined(SERIAL_CATCHALL) + #define _SERIAL_LEAF_1 MYSERIAL +#else + #define _SERIAL_LEAF_1 MYSERIAL1 +#endif + +// Hook Meatpack if it's enabled on the first leaf +#if ENABLED(MEATPACK_ON_SERIAL_PORT_1) + typedef MeatpackSerial SerialLeafT1; + extern SerialLeafT1 mpSerial1; + #define SERIAL_LEAF_1 mpSerial1 +#else + #define SERIAL_LEAF_1 _SERIAL_LEAF_1 +#endif + +// Step 2: For multiserial wrap all serial ports in a single +// interface with the ability to output to multiple serial ports. #if HAS_MULTI_SERIAL - #define _PORT_REDIRECT(n,p) REMEMBER(n,multiSerial.portMask,p) - #define SERIAL_ASSERT(P) if(multiSerial.portMask!=(P)){ debugger(); } + #define _PORT_REDIRECT(n,p) REMEMBER(n,multiSerial.portMask,p) + #define _PORT_RESTORE(n,p) RESTORE(n) + #define SERIAL_ASSERT(P) if (multiSerial.portMask!=(P)) { debugger(); } + // If we have a catchall, use that directly #ifdef SERIAL_CATCHALL - typedef MultiSerial SerialOutputT; + #define _SERIAL_LEAF_2 SERIAL_CATCHALL + #elif HAS_ETHERNET + typedef ConditionalSerial SerialLeafT2; // We need to create an instance here + extern SerialLeafT2 msSerial2; + #define _SERIAL_LEAF_2 msSerial2 + #else + #define _SERIAL_LEAF_2 MYSERIAL2 // Don't create a useless instance here, directly use the existing instance + #endif + + // Nothing complicated here + #define _SERIAL_LEAF_3 MYSERIAL3 + + // Hook Meatpack if it's enabled on the second leaf + #if ENABLED(MEATPACK_ON_SERIAL_PORT_2) + typedef MeatpackSerial SerialLeafT2; + extern SerialLeafT2 mpSerial2; + #define SERIAL_LEAF_2 mpSerial2 + #else + #define SERIAL_LEAF_2 _SERIAL_LEAF_2 + #endif + + // Hook Meatpack if it's enabled on the third leaf + #if ENABLED(MEATPACK_ON_SERIAL_PORT_3) + typedef MeatpackSerial SerialLeafT3; + extern SerialLeafT3 mpSerial3; + #define SERIAL_LEAF_3 mpSerial3 #else - typedef MultiSerial, decltype(MYSERIAL1)), 0> SerialOutputT; + #define SERIAL_LEAF_3 _SERIAL_LEAF_3 #endif - extern SerialOutputT multiSerial; - #define SERIAL_IMPL multiSerial + + #define __S_MULTI(N) decltype(SERIAL_LEAF_##N), + #define _S_MULTI(N) __S_MULTI(N) + + typedef MultiSerial< REPEAT_1(NUM_SERIAL, _S_MULTI) 0> SerialOutputT; + + #undef __S_MULTI + #undef _S_MULTI + + extern SerialOutputT multiSerial; + #define SERIAL_IMPL multiSerial #else - #define _PORT_REDIRECT(n,p) NOOP - #define SERIAL_ASSERT(P) NOOP - #define SERIAL_IMPL MYSERIAL0 + #define _PORT_REDIRECT(n,p) NOOP + #define _PORT_RESTORE(n) NOOP + #define SERIAL_ASSERT(P) NOOP + #define SERIAL_IMPL SERIAL_LEAF_1 #endif #define SERIAL_OUT(WHAT, V...) (void)SERIAL_IMPL.WHAT(V) -#define PORT_REDIRECT(p) _PORT_REDIRECT(1,p) -#define SERIAL_PORTMASK(P) _BV(P) +#define PORT_REDIRECT(p) _PORT_REDIRECT(1,p) +#define PORT_RESTORE() _PORT_RESTORE(1) +#define SERIAL_PORTMASK(P) SerialMask::from(P) -#define SERIAL_ECHO(x) SERIAL_OUT(print, x) -#define SERIAL_ECHO_F(V...) SERIAL_OUT(print, V) -#define SERIAL_ECHOLN(x) SERIAL_OUT(println, x) -#define SERIAL_PRINT(x,b) SERIAL_OUT(print, x, b) -#define SERIAL_PRINTLN(x,b) SERIAL_OUT(println, x, b) -#define SERIAL_FLUSH() SERIAL_OUT(flush) +// +// SERIAL_CHAR - Print one or more individual chars +// +inline void SERIAL_CHAR(char a) { SERIAL_IMPL.write(a); } +template +void SERIAL_CHAR(char a, Args ... args) { SERIAL_IMPL.write(a); SERIAL_CHAR(args ...); } -#ifdef ARDUINO_ARCH_STM32 - #define SERIAL_FLUSHTX() SERIAL_OUT(flush) -#elif TX_BUFFER_SIZE > 0 - #define SERIAL_FLUSHTX() SERIAL_OUT(flushTX) -#else - #define SERIAL_FLUSHTX() -#endif +/** + * SERIAL_ECHO - Print a single string or value. + * Any numeric parameter (including char) is printed as a base-10 number. + * A string pointer or literal will be output as a string. + * + * NOTE: Use SERIAL_CHAR to print char as a single character. + */ +template +void SERIAL_ECHO(T x) { SERIAL_IMPL.print(x); } + +// Wrapper for ECHO commands to interpret a char +typedef struct SerialChar { char c; SerialChar(char n) : c(n) { } } serial_char_t; +inline void SERIAL_ECHO(serial_char_t x) { SERIAL_IMPL.write(x.c); } +#define AS_CHAR(C) serial_char_t(C) +#define AS_DIGIT(C) AS_CHAR('0' + (C)) + +// SERIAL_ECHO_F prints a floating point value with optional precision +inline void SERIAL_ECHO_F(EnsureDouble x, int digit=2) { SERIAL_IMPL.print(x, digit); } -// Print up to 10 chars from a list -#define __CHAR_N(N,V...) _CHAR_##N(V) -#define _CHAR_N(N,V...) __CHAR_N(N,V) -#define _CHAR_1(c) SERIAL_OUT(write, c) -#define _CHAR_2(a,b) do{ _CHAR_1(a); _CHAR_1(b); }while(0) -#define _CHAR_3(a,V...) do{ _CHAR_1(a); _CHAR_2(V); }while(0) -#define _CHAR_4(a,V...) do{ _CHAR_1(a); _CHAR_3(V); }while(0) -#define _CHAR_5(a,V...) do{ _CHAR_1(a); _CHAR_4(V); }while(0) -#define _CHAR_6(a,V...) do{ _CHAR_1(a); _CHAR_5(V); }while(0) -#define _CHAR_7(a,V...) do{ _CHAR_1(a); _CHAR_6(V); }while(0) -#define _CHAR_8(a,V...) do{ _CHAR_1(a); _CHAR_7(V); }while(0) -#define _CHAR_9(a,V...) do{ _CHAR_1(a); _CHAR_8(V); }while(0) -#define _CHAR_10(a,V...) do{ _CHAR_1(a); _CHAR_9(V); }while(0) - -#define SERIAL_CHAR(V...) _CHAR_N(NUM_ARGS(V),V) - -// Print up to 12 pairs of values. Odd elements auto-wrapped in PSTR(). -#define __SEP_N(N,V...) _SEP_##N(V) -#define _SEP_N(N,V...) __SEP_N(N,V) -#define _SEP_1(PRE) SERIAL_ECHOPGM(PRE) -#define _SEP_2(PRE,V) serial_echopair_PGM(PSTR(PRE),V) -#define _SEP_3(a,b,c) do{ _SEP_2(a,b); SERIAL_ECHOPGM(c); }while(0) -#define _SEP_4(a,b,V...) do{ _SEP_2(a,b); _SEP_2(V); }while(0) -#define _SEP_5(a,b,V...) do{ _SEP_2(a,b); _SEP_3(V); }while(0) -#define _SEP_6(a,b,V...) do{ _SEP_2(a,b); _SEP_4(V); }while(0) -#define _SEP_7(a,b,V...) do{ _SEP_2(a,b); _SEP_5(V); }while(0) -#define _SEP_8(a,b,V...) do{ _SEP_2(a,b); _SEP_6(V); }while(0) -#define _SEP_9(a,b,V...) do{ _SEP_2(a,b); _SEP_7(V); }while(0) -#define _SEP_10(a,b,V...) do{ _SEP_2(a,b); _SEP_8(V); }while(0) -#define _SEP_11(a,b,V...) do{ _SEP_2(a,b); _SEP_9(V); }while(0) -#define _SEP_12(a,b,V...) do{ _SEP_2(a,b); _SEP_10(V); }while(0) -#define _SEP_13(a,b,V...) do{ _SEP_2(a,b); _SEP_11(V); }while(0) -#define _SEP_14(a,b,V...) do{ _SEP_2(a,b); _SEP_12(V); }while(0) -#define _SEP_15(a,b,V...) do{ _SEP_2(a,b); _SEP_13(V); }while(0) -#define _SEP_16(a,b,V...) do{ _SEP_2(a,b); _SEP_14(V); }while(0) -#define _SEP_17(a,b,V...) do{ _SEP_2(a,b); _SEP_15(V); }while(0) -#define _SEP_18(a,b,V...) do{ _SEP_2(a,b); _SEP_16(V); }while(0) -#define _SEP_19(a,b,V...) do{ _SEP_2(a,b); _SEP_17(V); }while(0) -#define _SEP_20(a,b,V...) do{ _SEP_2(a,b); _SEP_18(V); }while(0) -#define _SEP_21(a,b,V...) do{ _SEP_2(a,b); _SEP_19(V); }while(0) -#define _SEP_22(a,b,V...) do{ _SEP_2(a,b); _SEP_20(V); }while(0) -#define _SEP_23(a,b,V...) do{ _SEP_2(a,b); _SEP_21(V); }while(0) -#define _SEP_24(a,b,V...) do{ _SEP_2(a,b); _SEP_22(V); }while(0) - -#define SERIAL_ECHOPAIR(V...) _SEP_N(NUM_ARGS(V),V) - -// Print up to 12 pairs of values. Odd elements must be PSTR pointers. -#define __SEP_N_P(N,V...) _SEP_##N##_P(V) -#define _SEP_N_P(N,V...) __SEP_N_P(N,V) -#define _SEP_1_P(PRE) serialprintPGM(PRE) -#define _SEP_2_P(PRE,V) serial_echopair_PGM(PRE,V) -#define _SEP_3_P(a,b,c) do{ _SEP_2_P(a,b); serialprintPGM(c); }while(0) -#define _SEP_4_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_2_P(V); }while(0) -#define _SEP_5_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_3_P(V); }while(0) -#define _SEP_6_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_4_P(V); }while(0) -#define _SEP_7_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_5_P(V); }while(0) -#define _SEP_8_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_6_P(V); }while(0) -#define _SEP_9_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_7_P(V); }while(0) -#define _SEP_10_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_8_P(V); }while(0) -#define _SEP_11_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_9_P(V); }while(0) -#define _SEP_12_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_10_P(V); }while(0) -#define _SEP_13_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_11_P(V); }while(0) -#define _SEP_14_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_12_P(V); }while(0) -#define _SEP_15_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_13_P(V); }while(0) -#define _SEP_16_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_14_P(V); }while(0) -#define _SEP_17_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_15_P(V); }while(0) -#define _SEP_18_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_16_P(V); }while(0) -#define _SEP_19_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_17_P(V); }while(0) -#define _SEP_20_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_18_P(V); }while(0) -#define _SEP_21_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_19_P(V); }while(0) -#define _SEP_22_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_20_P(V); }while(0) -#define _SEP_23_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_21_P(V); }while(0) -#define _SEP_24_P(a,b,V...) do{ _SEP_2_P(a,b); _SEP_22_P(V); }while(0) - -#define SERIAL_ECHOPAIR_P(V...) _SEP_N_P(NUM_ARGS(V),V) - -// Print up to 12 pairs of values followed by newline -#define __SELP_N(N,V...) _SELP_##N(V) -#define _SELP_N(N,V...) __SELP_N(N,V) -#define _SELP_1(PRE) SERIAL_ECHOLNPGM(PRE) -#define _SELP_2(PRE,V) do{ serial_echopair_PGM(PSTR(PRE),V); SERIAL_EOL(); }while(0) -#define _SELP_3(a,b,c) do{ _SEP_2(a,b); SERIAL_ECHOLNPGM(c); }while(0) -#define _SELP_4(a,b,V...) do{ _SEP_2(a,b); _SELP_2(V); }while(0) -#define _SELP_5(a,b,V...) do{ _SEP_2(a,b); _SELP_3(V); }while(0) -#define _SELP_6(a,b,V...) do{ _SEP_2(a,b); _SELP_4(V); }while(0) -#define _SELP_7(a,b,V...) do{ _SEP_2(a,b); _SELP_5(V); }while(0) -#define _SELP_8(a,b,V...) do{ _SEP_2(a,b); _SELP_6(V); }while(0) -#define _SELP_9(a,b,V...) do{ _SEP_2(a,b); _SELP_7(V); }while(0) -#define _SELP_10(a,b,V...) do{ _SEP_2(a,b); _SELP_8(V); }while(0) -#define _SELP_11(a,b,V...) do{ _SEP_2(a,b); _SELP_9(V); }while(0) -#define _SELP_12(a,b,V...) do{ _SEP_2(a,b); _SELP_10(V); }while(0) -#define _SELP_13(a,b,V...) do{ _SEP_2(a,b); _SELP_11(V); }while(0) -#define _SELP_14(a,b,V...) do{ _SEP_2(a,b); _SELP_12(V); }while(0) -#define _SELP_15(a,b,V...) do{ _SEP_2(a,b); _SELP_13(V); }while(0) -#define _SELP_16(a,b,V...) do{ _SEP_2(a,b); _SELP_14(V); }while(0) -#define _SELP_17(a,b,V...) do{ _SEP_2(a,b); _SELP_15(V); }while(0) -#define _SELP_18(a,b,V...) do{ _SEP_2(a,b); _SELP_16(V); }while(0) -#define _SELP_19(a,b,V...) do{ _SEP_2(a,b); _SELP_17(V); }while(0) -#define _SELP_20(a,b,V...) do{ _SEP_2(a,b); _SELP_18(V); }while(0) -#define _SELP_21(a,b,V...) do{ _SEP_2(a,b); _SELP_19(V); }while(0) -#define _SELP_22(a,b,V...) do{ _SEP_2(a,b); _SELP_20(V); }while(0) -#define _SELP_23(a,b,V...) do{ _SEP_2(a,b); _SELP_21(V); }while(0) -#define _SELP_24(a,b,V...) do{ _SEP_2(a,b); _SELP_22(V); }while(0) -#define _SELP_25(a,b,V...) do{ _SEP_2(a,b); _SELP_23(V); }while(0) -#define _SELP_26(a,b,V...) do{ _SEP_2(a,b); _SELP_24(V); }while(0) -#define _SELP_27(a,b,V...) do{ _SEP_2(a,b); _SELP_25(V); }while(0) -#define _SELP_28(a,b,V...) do{ _SEP_2(a,b); _SELP_26(V); }while(0) -#define _SELP_29(a,b,V...) do{ _SEP_2(a,b); _SELP_27(V); }while(0) -#define _SELP_30(a,b,V...) do{ _SEP_2(a,b); _SELP_28(V); }while(0) // Eat two args, pass the rest up - -#define SERIAL_ECHOLNPAIR(V...) _SELP_N(NUM_ARGS(V),V) - -// Print up to 12 pairs of values followed by newline -#define __SELP_N_P(N,V...) _SELP_##N##_P(V) -#define _SELP_N_P(N,V...) __SELP_N_P(N,V) -#define _SELP_1_P(PRE) serialprintPGM(PRE) -#define _SELP_2_P(PRE,V) do{ serial_echopair_PGM(PRE,V); SERIAL_EOL(); }while(0) -#define _SELP_3_P(a,b,c) do{ _SEP_2_P(a,b); serialprintPGM(c); }while(0) -#define _SELP_4_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_2_P(V); }while(0) -#define _SELP_5_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_3_P(V); }while(0) -#define _SELP_6_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_4_P(V); }while(0) -#define _SELP_7_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_5_P(V); }while(0) -#define _SELP_8_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_6_P(V); }while(0) -#define _SELP_9_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_7_P(V); }while(0) -#define _SELP_10_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_8_P(V); }while(0) -#define _SELP_11_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_9_P(V); }while(0) -#define _SELP_12_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_10_P(V); }while(0) -#define _SELP_13_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_11_P(V); }while(0) -#define _SELP_14_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_12_P(V); }while(0) -#define _SELP_15_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_13_P(V); }while(0) -#define _SELP_16_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_14_P(V); }while(0) -#define _SELP_17_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_15_P(V); }while(0) -#define _SELP_18_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_16_P(V); }while(0) -#define _SELP_19_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_17_P(V); }while(0) -#define _SELP_20_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_18_P(V); }while(0) -#define _SELP_21_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_19_P(V); }while(0) -#define _SELP_22_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_20_P(V); }while(0) -#define _SELP_23_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_21_P(V); }while(0) -#define _SELP_24_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_22_P(V); }while(0) -#define _SELP_25_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_23_P(V); }while(0) -#define _SELP_26_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_24_P(V); }while(0) -#define _SELP_27_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_25_P(V); }while(0) -#define _SELP_28_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_26_P(V); }while(0) -#define _SELP_29_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_27_P(V); }while(0) -#define _SELP_30_P(a,b,V...) do{ _SEP_2_P(a,b); _SELP_28_P(V); }while(0) // Eat two args, pass the rest up - -#define SERIAL_ECHOLNPAIR_P(V...) _SELP_N_P(NUM_ARGS(V),V) - -// Print up to 20 comma-separated pairs of values -#define __SLST_N(N,V...) _SLST_##N(V) -#define _SLST_N(N,V...) __SLST_N(N,V) -#define _SLST_1(a) SERIAL_ECHO(a) -#define _SLST_2(a,b) do{ SERIAL_ECHO(a); SERIAL_ECHOPAIR(", ",b); }while(0) -#define _SLST_3(a,b,c) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_1(c); }while(0) -#define _SLST_4(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_2(V); }while(0) -#define _SLST_5(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_3(V); }while(0) -#define _SLST_6(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_4(V); }while(0) -#define _SLST_7(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_5(V); }while(0) -#define _SLST_8(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_6(V); }while(0) -#define _SLST_9(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_7(V); }while(0) -#define _SLST_10(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_8(V); }while(0) -#define _SLST_11(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_9(V); }while(0) -#define _SLST_12(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_10(V); }while(0) -#define _SLST_13(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_11(V); }while(0) -#define _SLST_14(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_12(V); }while(0) -#define _SLST_15(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_13(V); }while(0) -#define _SLST_16(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_14(V); }while(0) -#define _SLST_17(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_15(V); }while(0) -#define _SLST_18(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_16(V); }while(0) -#define _SLST_19(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_17(V); }while(0) -#define _SLST_20(a,b,V...) do{ SERIAL_ECHO(a); _SEP_2(", ",b); _SLST_18(V); }while(0) // Eat two args, pass the rest up - -#define SERIAL_ECHOLIST(pre,V...) do{ SERIAL_ECHOPGM(pre); _SLST_N(NUM_ARGS(V),V); }while(0) -#define SERIAL_ECHOLIST_N(N,V...) _SLST_N(N,LIST_N(N,V)) - -#define SERIAL_ECHOPGM_P(P) (serialprintPGM(P)) -#define SERIAL_ECHOLNPGM_P(P) (serialprintPGM(P "\n")) - -#define SERIAL_ECHOPGM(S) (serialprintPGM(PSTR(S))) -#define SERIAL_ECHOLNPGM(S) (serialprintPGM(PSTR(S "\n"))) +template +void SERIAL_ECHOLN(T x) { SERIAL_IMPL.println(x); } + +// SERIAL_PRINT works like SERIAL_ECHO but allow to specify the encoding base of the number printed +template +void SERIAL_PRINT(T x, U y) { SERIAL_IMPL.print(x, y); } + +template +void SERIAL_PRINTLN(T x, PrintBase y) { SERIAL_IMPL.println(x, y); } + +// Flush the serial port +inline void SERIAL_FLUSH() { SERIAL_IMPL.flush(); } +inline void SERIAL_FLUSHTX() { SERIAL_IMPL.flushTX(); } + +// Print a single PROGMEM string to serial +void serialprintPGM(PGM_P str); + +// +// SERIAL_ECHOPGM... macros are used to output string-value pairs. +// + +// Print up to 20 pairs of values. Odd elements must be literal strings. +#define __SEP_N(N,V...) _SEP_##N(V) +#define _SEP_N(N,V...) __SEP_N(N,V) +#define _SEP_N_REF() _SEP_N +#define _SEP_1(s) serialprintPGM(PSTR(s)); +#define _SEP_2(s,v) serial_echopair_PGM(PSTR(s),v); +#define _SEP_3(s,v,V...) _SEP_2(s,v); DEFER2(_SEP_N_REF)()(TWO_ARGS(V),V); +#define SERIAL_ECHOPGM(V...) do{ EVAL(_SEP_N(TWO_ARGS(V),V)); }while(0) + +// Print up to 20 pairs of values followed by newline. Odd elements must be literal strings. +#define __SELP_N(N,V...) _SELP_##N(V) +#define _SELP_N(N,V...) __SELP_N(N,V) +#define _SELP_N_REF() _SELP_N +#define _SELP_1(s) serialprintPGM(PSTR(s "\n")); +#define _SELP_2(s,v) serial_echopair_PGM(PSTR(s),v); SERIAL_EOL(); +#define _SELP_3(s,v,V...) _SEP_2(s,v); DEFER2(_SELP_N_REF)()(TWO_ARGS(V),V); +#define SERIAL_ECHOLNPGM(V...) do{ EVAL(_SELP_N(TWO_ARGS(V),V)); }while(0) + +// Print up to 20 pairs of values. Odd elements must be PSTR pointers. +#define __SEP_N_P(N,V...) _SEP_##N##_P(V) +#define _SEP_N_P(N,V...) __SEP_N_P(N,V) +#define _SEP_N_P_REF() _SEP_N_P +#define _SEP_1_P(p) serialprintPGM(p); +#define _SEP_2_P(p,v) serial_echopair_PGM(p,v); +#define _SEP_3_P(p,v,V...) _SEP_2_P(p,v); DEFER2(_SEP_N_P_REF)()(TWO_ARGS(V),V); +#define SERIAL_ECHOPGM_P(V...) do{ EVAL(_SEP_N_P(TWO_ARGS(V),V)); }while(0) + +// Print up to 20 pairs of values followed by newline. Odd elements must be PSTR pointers. +#define __SELP_N_P(N,V...) _SELP_##N##_P(V) +#define _SELP_N_P(N,V...) __SELP_N_P(N,V) +#define _SELP_N_P_REF() _SELP_N_P +#define _SELP_1_P(p) { serialprintPGM(p); SERIAL_EOL(); } +#define _SELP_2_P(p,v) { serial_echopair_PGM(p,v); SERIAL_EOL(); } +#define _SELP_3_P(p,v,V...) { _SEP_2_P(p,v); DEFER2(_SELP_N_P_REF)()(TWO_ARGS(V),V); } +#define SERIAL_ECHOLNPGM_P(V...) do{ EVAL(_SELP_N_P(TWO_ARGS(V),V)); }while(0) + +#ifdef AllowDifferentTypeInList + + inline void SERIAL_ECHOLIST_IMPL() {} + template + void SERIAL_ECHOLIST_IMPL(T && t) { SERIAL_IMPL.print(t); } + + template + void SERIAL_ECHOLIST_IMPL(T && t, Args && ... args) { + SERIAL_IMPL.print(t); + serialprintPGM(PSTR(", ")); + SERIAL_ECHOLIST_IMPL(args...); + } + + template + void SERIAL_ECHOLIST(PGM_P const str, Args && ... args) { + SERIAL_IMPL.print(str); + SERIAL_ECHOLIST_IMPL(args...); + } + +#else // Optimization if the listed type are all the same (seems to be the case in the codebase so use that instead) + + template + void SERIAL_ECHOLIST(PGM_P const str, Args && ... args) { + serialprintPGM(str); + typename Private::first_type_of::type values[] = { args... }; + constexpr size_t argsSize = sizeof...(args); + for (size_t i = 0; i < argsSize; i++) { + if (i) serialprintPGM(PSTR(", ")); + SERIAL_IMPL.print(values[i]); + } + } + +#endif #define SERIAL_ECHOPAIR_F_P(P,V...) do{ serialprintPGM(P); SERIAL_ECHO_F(V); }while(0) #define SERIAL_ECHOLNPAIR_F_P(V...) do{ SERIAL_ECHOPAIR_F_P(V); SERIAL_EOL(); }while(0) @@ -287,8 +271,8 @@ typedef int8_t serial_index_t; #define SERIAL_ERROR_START() serial_error_start() #define SERIAL_EOL() SERIAL_CHAR('\n') -#define SERIAL_ECHO_MSG(V...) do{ SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(V); }while(0) -#define SERIAL_ERROR_MSG(V...) do{ SERIAL_ERROR_START(); SERIAL_ECHOLNPAIR(V); }while(0) +#define SERIAL_ECHO_MSG(V...) do{ SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(V); }while(0) +#define SERIAL_ERROR_MSG(V...) do{ SERIAL_ERROR_START(); SERIAL_ECHOLNPGM(V); }while(0) #define SERIAL_ECHO_SP(C) serial_spaces(C) @@ -303,19 +287,19 @@ typedef int8_t serial_index_t; // // Functions for serial printing from PROGMEM. (Saves loads of SRAM.) // -void serial_echopair_PGM(PGM_P const s_P, const char *v); -void serial_echopair_PGM(PGM_P const s_P, char v); -void serial_echopair_PGM(PGM_P const s_P, int v); -void serial_echopair_PGM(PGM_P const s_P, unsigned int v); -void serial_echopair_PGM(PGM_P const s_P, long v); -void serial_echopair_PGM(PGM_P const s_P, unsigned long v); -void serial_echopair_PGM(PGM_P const s_P, float v); -void serial_echopair_PGM(PGM_P const s_P, double v); -inline void serial_echopair_PGM(PGM_P const s_P, uint8_t v) { serial_echopair_PGM(s_P, (int)v); } +inline void serial_echopair_PGM(PGM_P const s_P, serial_char_t v) { serialprintPGM(s_P); SERIAL_CHAR(v.c); } + +inline void serial_echopair_PGM(PGM_P const s_P, float v) { serialprintPGM(s_P); SERIAL_DECIMAL(v); } +inline void serial_echopair_PGM(PGM_P const s_P, double v) { serialprintPGM(s_P); SERIAL_DECIMAL(v); } +inline void serial_echopair_PGM(PGM_P const s_P, const char *v) { serialprintPGM(s_P); SERIAL_ECHO(v); } + +// Default implementation for types without a specialization. Handles integers. +template +void serial_echopair_PGM(PGM_P const s_P, T v) { serialprintPGM(s_P); SERIAL_ECHO(v); } + inline void serial_echopair_PGM(PGM_P const s_P, bool v) { serial_echopair_PGM(s_P, (int)v); } inline void serial_echopair_PGM(PGM_P const s_P, void *v) { serial_echopair_PGM(s_P, (uintptr_t)v); } -void serialprintPGM(PGM_P str); void serial_echo_start(); void serial_error_start(); void serial_ternary(const bool onoff, PGM_P const pre, PGM_P const on, PGM_P const off, PGM_P const post=nullptr); @@ -325,11 +309,11 @@ void serialprint_truefalse(const bool tf); void serial_spaces(uint8_t count); void print_bin(const uint16_t val); -void print_xyz(const float &x, const float &y, const float &z, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr); +void print_pos(LINEAR_AXIS_ARGS(const_float_t), PGM_P const prefix=nullptr, PGM_P const suffix=nullptr); -inline void print_xyz(const xyz_pos_t &xyz, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr) { - print_xyz(xyz.x, xyz.y, xyz.z, prefix, suffix); +inline void print_pos(const xyz_pos_t &xyz, PGM_P const prefix=nullptr, PGM_P const suffix=nullptr) { + print_pos(LINEAR_AXIS_ELEM(xyz), prefix, suffix); } -#define SERIAL_POS(SUFFIX,VAR) do { print_xyz(VAR, PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n")); }while(0) -#define SERIAL_XYZ(PREFIX,V...) do { print_xyz(V, PSTR(PREFIX), nullptr); }while(0) +#define SERIAL_POS(SUFFIX,VAR) do { print_pos(VAR, PSTR(" " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n")); }while(0) +#define SERIAL_XYZ(PREFIX,V...) do { print_pos(V, PSTR(PREFIX), nullptr); }while(0) diff --git a/Marlin/src/core/serial_base.h b/Marlin/src/core/serial_base.h index f52fa11202e7..a5abd67d8727 100644 --- a/Marlin/src/core/serial_base.h +++ b/Marlin/src/core/serial_base.h @@ -27,20 +27,64 @@ #include "../feature/e_parser.h" #endif -#ifndef DEC - #define DEC 10 - #define HEX 16 - #define OCT 8 - #define BIN 2 -#endif +// Used in multiple places +// You can build it but not manipulate it. +// There are only few places where it's required to access the underlying member: GCodeQueue, SerialMask and MultiSerial +struct serial_index_t { + // A signed index, where -1 is a special case meaning no action (neither output or input) + int8_t index; + + // Check if the index is within the range [a ... b] + constexpr inline bool within(const int8_t a, const int8_t b) const { return WITHIN(index, a, b); } + constexpr inline bool valid() const { return WITHIN(index, 0, 7); } // At most, 8 bits + + // Construction is either from an index + constexpr serial_index_t(const int8_t index) : index(index) {} + + // Default to "no index" + constexpr serial_index_t() : index(-1) {} +}; + +// In order to catch usage errors in code, we make the base to encode number explicit +// If given a number (and not this enum), the compiler will reject the overload, falling back to the (double, digit) version +// We don't want hidden conversion of the first parameter to double, so it has to be as hard to do for the compiler as creating this enum +enum class PrintBase { + Dec = 10, + Hex = 16, + Oct = 8, + Bin = 2 +}; + +// A simple feature list enumeration +enum class SerialFeature { + None = 0x00, + MeatPack = 0x01, //!< Enabled when Meatpack is present + BinaryFileTransfer = 0x02, //!< Enabled for BinaryFile transfer support (in the future) + Virtual = 0x04, //!< Enabled for virtual serial port (like Telnet / Websocket / ...) + Hookable = 0x08, //!< Enabled if the serial class supports a setHook method +}; +ENUM_FLAGS(SerialFeature); // flushTX is not implemented in all HAL, so use SFINAE to call the method where it is. -CALL_IF_EXISTS_IMPL(void, flushTX ); +CALL_IF_EXISTS_IMPL(void, flushTX); CALL_IF_EXISTS_IMPL(bool, connected, true); +CALL_IF_EXISTS_IMPL(SerialFeature, features, SerialFeature::None); -// Using Curiously Recurring Template Pattern here to avoid virtual table cost when compiling. -// Since the real serial class is known at compile time, this results in compiler writing a completely -// efficient code +// A simple forward struct to prevent the compiler from selecting print(double, int) as a default overload +// for any type other than double/float. For double/float, a conversion exists so the call will be invisible. +struct EnsureDouble { + double a; + operator double() { return a; } + // If the compiler breaks on ambiguity here, it's likely because print(X, base) is called with X not a double/float, and + // a base that's not a PrintBase value. This code is made to detect the error. You MUST set a base explicitly like this: + // SERIAL_PRINT(v, PrintBase::Hex) + EnsureDouble(double a) : a(a) {} + EnsureDouble(float a) : a(a) {} +}; + +// Using Curiously-Recurring Template Pattern here to avoid virtual table cost when compiling. +// Since the real serial class is known at compile time, this results in the compiler writing +// a completely efficient code. template struct SerialBase { #if ENABLED(EMERGENCY_PARSER) @@ -52,79 +96,134 @@ struct SerialBase { SerialBase(const bool) {} #endif + #define SerialChild static_cast(this) + // Static dispatch methods below: // The most important method here is where it all ends to: - size_t write(uint8_t c) { return static_cast(this)->write(c); } + void write(uint8_t c) { SerialChild->write(c); } + // Called when the parser finished processing an instruction, usually build to nothing - void msgDone() { static_cast(this)->msgDone(); } - // Called upon initialization - void begin(const long baudRate) { static_cast(this)->begin(baudRate); } - // Called upon destruction - void end() { static_cast(this)->end(); } + void msgDone() const { SerialChild->msgDone(); } + + // Called on initialization + void begin(const long baudRate) { SerialChild->begin(baudRate); } + + // Called on destruction + void end() { SerialChild->end(); } + /** Check for available data from the port @param index The port index, usually 0 */ - bool available(uint8_t index = 0) { return static_cast(this)->available(index); } + int available(serial_index_t index=0) const { return SerialChild->available(index); } + /** Read a value from the port @param index The port index, usually 0 */ - int read(uint8_t index = 0) { return static_cast(this)->read(index); } + int read(serial_index_t index=0) { return SerialChild->read(index); } + + /** Combine the features of this serial instance and return it + @param index The port index, usually 0 */ + SerialFeature features(serial_index_t index=0) const { return static_cast(this)->features(index); } + + // Check if the serial port has a feature + bool has_feature(serial_index_t index, SerialFeature flag) const { return (features(index) & flag) != SerialFeature::None; } + // Check if the serial port is connected (usually bypassed) - bool connected() { return static_cast(this)->connected(); } + bool connected() const { return SerialChild->connected(); } + // Redirect flush - void flush() { static_cast(this)->flush(); } + void flush() { SerialChild->flush(); } + // Not all implementation have a flushTX, so let's call them only if the child has the implementation - void flushTX() { CALL_IF_EXISTS(void, static_cast(this), flushTX); } + void flushTX() { CALL_IF_EXISTS(void, SerialChild, flushTX); } // Glue code here - FORCE_INLINE void write(const char* str) { while (*str) write(*str++); } - FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); } - FORCE_INLINE void print(const char* str) { write(str); } - NO_INLINE void print(char c, int base = 0) { print((long)c, base); } - NO_INLINE void print(unsigned char c, int base = 0) { print((unsigned long)c, base); } - NO_INLINE void print(int c, int base = DEC) { print((long)c, base); } - NO_INLINE void print(unsigned int c, int base = DEC) { print((unsigned long)c, base); } - void print(unsigned long c, int base = DEC) { printNumber(c, base); } - void print(double c, int digits = 2) { printFloat(c, digits); } - void print(long c, int base = DEC) { - if (!base) { - write(c); - return; - } - if (base == DEC && c < 0) { - write((uint8_t)'-'); c = -c; - } - printNumber(c, base); - } + void write(const char *str) { while (*str) write(*str++); } + void write(const uint8_t *buffer, size_t size) { while (size--) write(*buffer++); } + void print(char *str) { write(str); } + void print(const char *str) { write(str); } + // No default argument to avoid ambiguity + + // Define print for every fundamental integer type, to ensure that all redirect properly + // to the correct underlying implementation. + + // Prints are performed with a single size, to avoid needing multiple print functions. + // The fixed integer size used for prints will be the larger of long or a pointer. + #if __LONG_WIDTH__ >= __INTPTR_WIDTH__ + typedef long int_fixed_print_t; + typedef unsigned long uint_fixed_print_t; + #else + typedef intptr_t int_fixed_print_t; + typedef uintptr_t uint_fixed_print_t; + + FORCE_INLINE void print(intptr_t c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(uintptr_t c, PrintBase base) { printNumber_unsigned(c, base); } + #endif + + FORCE_INLINE void print(char c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(short c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(int c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(long c, PrintBase base) { printNumber_signed(c, base); } + FORCE_INLINE void print(unsigned char c, PrintBase base) { printNumber_unsigned(c, base); } + FORCE_INLINE void print(unsigned short c, PrintBase base) { printNumber_unsigned(c, base); } + FORCE_INLINE void print(unsigned int c, PrintBase base) { printNumber_unsigned(c, base); } + FORCE_INLINE void print(unsigned long c, PrintBase base) { printNumber_unsigned(c, base); } + + + void print(EnsureDouble c, int digits) { printFloat(c, digits); } - NO_INLINE void println(const char s[]) { print(s); println(); } - NO_INLINE void println(char c, int base = 0) { print(c, base); println(); } - NO_INLINE void println(unsigned char c, int base = 0) { print(c, base); println(); } - NO_INLINE void println(int c, int base = DEC) { print(c, base); println(); } - NO_INLINE void println(unsigned int c, int base = DEC) { print(c, base); println(); } - NO_INLINE void println(long c, int base = DEC) { print(c, base); println(); } - NO_INLINE void println(unsigned long c, int base = DEC) { print(c, base); println(); } - NO_INLINE void println(double c, int digits = 2) { print(c, digits); println(); } - NO_INLINE void println() { write('\r'); write('\n'); } + // Forward the call to the former's method + + // Default implementation for anything without a specialization + // This handles integers since they are the most common + template + void print(T c) { print(c, PrintBase::Dec); } + + void print(float c) { print(c, 2); } + void print(double c) { print(c, 2); } + + void println(char *s) { print(s); println(); } + void println(const char *s) { print(s); println(); } + void println(float c, int digits) { print(c, digits); println(); } + void println(double c, int digits) { print(c, digits); println(); } + void println() { write('\r'); write('\n'); } + + // Default implementations for types without a specialization. Handles integers. + template + void println(T c, PrintBase base) { print(c, base); println(); } + + template + void println(T c) { println(c, PrintBase::Dec); } + + // Forward the call to the former's method + void println(float c) { println(c, 2); } + void println(double c) { println(c, 2); } // Print a number with the given base - void printNumber(unsigned long n, const uint8_t base) { - if (!base) { - write((uint8_t)n); - return; - } + NO_INLINE void printNumber_unsigned(uint_fixed_print_t n, PrintBase base) { if (n) { unsigned char buf[8 * sizeof(long)]; // Enough space for base 2 int8_t i = 0; while (n) { - buf[i++] = n % base; - n /= base; + buf[i++] = n % (uint_fixed_print_t)base; + n /= (uint_fixed_print_t)base; } while (i--) write((char)(buf[i] + (buf[i] < 10 ? '0' : 'A' - 10))); } else write('0'); } + NO_INLINE void printNumber_signed(int_fixed_print_t n, PrintBase base) { + if (base == PrintBase::Dec && n < 0) { + n = -n; // This works because all platforms Marlin's builds on are using 2-complement encoding for negative number + // On such CPU, changing the sign of a number is done by inverting the bits and adding one, so if n = 0x80000000 = -2147483648 then + // -n = 0x7FFFFFFF + 1 => 0x80000000 = 2147483648 (if interpreted as unsigned) or -2147483648 if interpreted as signed. + // On non 2-complement CPU, there would be no possible representation for 2147483648. + write('-'); + } + printNumber_unsigned((uint_fixed_print_t)n , base); + } + // Print a decimal number - void printFloat(double number, uint8_t digits) { + NO_INLINE void printFloat(double number, uint8_t digits) { // Handle negative numbers if (number < 0.0) { write('-'); @@ -139,7 +238,7 @@ struct SerialBase { // Extract the integer part of the number and print it unsigned long int_part = (unsigned long)number; double remainder = number - (double)int_part; - printNumber(int_part, 10); + printNumber_unsigned(int_part, PrintBase::Dec); // Print the decimal point, but only if there are digits beyond if (digits) { @@ -147,13 +246,13 @@ struct SerialBase { // Extract digits from the remainder one at a time while (digits--) { remainder *= 10.0; - int toPrint = int(remainder); - printNumber(toPrint, 10); + unsigned long toPrint = (unsigned long)remainder; + printNumber_unsigned(toPrint, PrintBase::Dec); remainder -= toPrint; } } } }; -// All serial instances will be built by chaining the features required for the function in a form of a template -// type definition +// All serial instances will be built by chaining the features required +// for the function in the form of a template type definition. diff --git a/Marlin/src/core/serial_hook.h b/Marlin/src/core/serial_hook.h index 45e64d779339..2019b389e497 100644 --- a/Marlin/src/core/serial_hook.h +++ b/Marlin/src/core/serial_hook.h @@ -23,6 +23,31 @@ #include "serial_base.h" +// A mask containing a bitmap of the serial port to act upon +// This is written to ensure a serial index is never used as a serial mask +class SerialMask { + uint8_t mask; + + // This constructor is private to ensure you can't convert an index to a mask + // The compiler will stop here if you are mixing index and mask in your code. + // If you need to, you'll have to use the explicit static "from" method here + SerialMask(const serial_index_t); + +public: + inline constexpr bool enabled(const SerialMask PortMask) const { return mask & PortMask.mask; } + inline constexpr SerialMask combine(const SerialMask other) const { return SerialMask(mask | other.mask); } + inline constexpr SerialMask operator<< (const int offset) const { return SerialMask(mask << offset); } + static inline SerialMask from(const serial_index_t index) { + if (index.valid()) return SerialMask(_BV(index.index)); + return SerialMask(0); // A invalid index mean no output + } + + constexpr SerialMask(const uint8_t mask) : mask(mask) {} + constexpr SerialMask(const SerialMask & other) : mask(other.mask) {} // Can't use = default here since not all framework support this + + static constexpr uint8_t All = 0xFF; +}; + // The most basic serial class: it dispatch to the base serial class with no hook whatsoever. This will compile to nothing but the base serial class template struct BaseSerial : public SerialBase< BaseSerial >, public SerialT { @@ -34,10 +59,15 @@ struct BaseSerial : public SerialBase< BaseSerial >, public SerialT { void msgDone() {} - bool available(uint8_t index) { return index == 0 && SerialT::available(); } - int read(uint8_t index) { return index == 0 ? SerialT::read() : -1; } + // We don't care about indices here, since if one can call us, it's the right index anyway + int available(serial_index_t) { return (int)SerialT::available(); } + int read(serial_index_t) { return (int)SerialT::read(); } bool connected() { return CALL_IF_EXISTS(bool, static_cast(this), connected);; } - // We have 2 implementation of the same method in both base class, let's say which one we want + void flushTX() { CALL_IF_EXISTS(void, static_cast(this), flushTX); } + + SerialFeature features(serial_index_t index) const { return CALL_IF_EXISTS(SerialFeature, static_cast(this), features, index); } + + // Two implementations of the same method exist in both base classes so indicate the right one using SerialT::available; using SerialT::read; using SerialT::begin; @@ -62,22 +92,24 @@ struct ConditionalSerial : public SerialBase< ConditionalSerial > { bool & condition; SerialT & out; NO_INLINE size_t write(uint8_t c) { if (condition) return out.write(c); return 0; } - void flush() { if (condition) out.flush(); } - void begin(long br) { out.begin(br); } - void end() { out.end(); } + void flush() { if (condition) out.flush(); } + void begin(long br) { out.begin(br); } + void end() { out.end(); } void msgDone() {} - bool connected() { return CALL_IF_EXISTS(bool, &out, connected); } + bool connected() { return CALL_IF_EXISTS(bool, &out, connected); } + void flushTX() { CALL_IF_EXISTS(void, &out, flushTX); } - bool available(uint8_t index) { return index == 0 && out.available(); } - int read(uint8_t index) { return index == 0 ? out.read() : -1; } - using BaseClassT::available; - using BaseClassT::read; + int available(serial_index_t) { return (int)out.available(); } + int read(serial_index_t) { return (int)out.read(); } + int available() { return (int)out.available(); } + int read() { return (int)out.read(); } + SerialFeature features(serial_index_t index) const { return CALL_IF_EXISTS(SerialFeature, &out, features, index); } ConditionalSerial(bool & conditionVariable, SerialT & out, const bool e) : BaseClassT(e), condition(conditionVariable), out(out) {} }; -// A simple foward class that taking a reference to an existing serial instance (likely created in their respective framework) +// A simple forward class that taking a reference to an existing serial instance (likely created in their respective framework) template struct ForwardSerial : public SerialBase< ForwardSerial > { typedef SerialBase< ForwardSerial > BaseClassT; @@ -91,16 +123,18 @@ struct ForwardSerial : public SerialBase< ForwardSerial > { void msgDone() {} // Existing instances implement Arduino's operator bool, so use that if it's available bool connected() { return Private::HasMember_connected::value ? CALL_IF_EXISTS(bool, &out, connected) : (bool)out; } + void flushTX() { CALL_IF_EXISTS(void, &out, flushTX); } - bool available(uint8_t index) { return index == 0 && out.available(); } - int read(uint8_t index) { return index == 0 ? out.read() : -1; } - bool available() { return out.available(); } - int read() { return out.read(); } + int available(serial_index_t) { return (int)out.available(); } + int read(serial_index_t) { return (int)out.read(); } + int available() { return (int)out.available(); } + int read() { return (int)out.read(); } + SerialFeature features(serial_index_t index) const { return CALL_IF_EXISTS(SerialFeature, &out, features, index); } ForwardSerial(const bool e, SerialT & out) : BaseClassT(e), out(out) {} }; -// A class that's can be hooked and unhooked at runtime, useful to capturing the output of the serial interface +// A class that can be hooked and unhooked at runtime, useful to capture the output of the serial interface template struct RuntimeSerial : public SerialBase< RuntimeSerial >, public SerialT { typedef SerialBase< RuntimeSerial > BaseClassT; @@ -120,8 +154,8 @@ struct RuntimeSerial : public SerialBase< RuntimeSerial >, public Seria if (eofHook) eofHook(userPointer); } - bool available(uint8_t index) { return index == 0 && SerialT::available(); } - int read(uint8_t index) { return index == 0 ? SerialT::read() : -1; } + int available(serial_index_t) { return (int)SerialT::available(); } + int read(serial_index_t) { return (int)SerialT::read(); } using SerialT::available; using SerialT::read; using SerialT::flush; @@ -131,12 +165,18 @@ struct RuntimeSerial : public SerialBase< RuntimeSerial >, public Seria using BaseClassT::print; using BaseClassT::println; - // Underlying implementation might use Arduino's bool operator bool connected() { - return Private::HasMember_connected::value ? CALL_IF_EXISTS(bool, static_cast(this), connected) : static_cast(this)->operator bool(); + return Private::HasMember_connected::value + ? CALL_IF_EXISTS(bool, static_cast(this), connected) + : static_cast(this)->operator bool(); } + void flushTX() { CALL_IF_EXISTS(void, static_cast(this), flushTX); } + + // Append Hookable for this class + SerialFeature features(serial_index_t index) const { return SerialFeature::Hookable | CALL_IF_EXISTS(SerialFeature, static_cast(this), features, index); } + void setHook(WriteHook writeHook = 0, EndOfMessageHook eofHook = 0, void * userPointer = 0) { // Order is important here as serial code can be called inside interrupts // When setting a hook, the user pointer must be set first so if writeHook is called as soon as it's set, it'll be valid @@ -152,60 +192,74 @@ struct RuntimeSerial : public SerialBase< RuntimeSerial >, public Seria // Forward constructor template - RuntimeSerial(const bool e, Args... args) : BaseClassT(e), SerialT(args...) {} + RuntimeSerial(const bool e, Args... args) : BaseClassT(e), SerialT(args...), writeHook(0), eofHook(0), userPointer(0) {} }; -// A class that's duplicating its output conditionally to 2 serial interface -template -struct MultiSerial : public SerialBase< MultiSerial > { - typedef SerialBase< MultiSerial > BaseClassT; +#define _S_CLASS(N) class Serial##N##T, +#define _S_NAME(N) Serial##N##T, - uint8_t portMask; - Serial0T & serial0; - Serial1T & serial1; +template < REPEAT(NUM_SERIAL, _S_CLASS) const uint8_t offset=0, const uint8_t step=1 > +struct MultiSerial : public SerialBase< MultiSerial< REPEAT(NUM_SERIAL, _S_NAME) offset, step > > { + typedef SerialBase< MultiSerial< REPEAT(NUM_SERIAL, _S_NAME) offset, step > > BaseClassT; - enum Masks { - FirstOutputMask = (1 << offset), - SecondOutputMask = (1 << (offset + 1)), - AllMask = FirstOutputMask | SecondOutputMask, - }; + #undef _S_CLASS + #undef _S_NAME - NO_INLINE size_t write(uint8_t c) { - size_t ret = 0; - if (portMask & FirstOutputMask) ret = serial0.write(c); - if (portMask & SecondOutputMask) ret = serial1.write(c) | ret; - return ret; + SerialMask portMask; + + #define _S_DECLARE(N) Serial##N##T & serial##N; + REPEAT(NUM_SERIAL, _S_DECLARE); + #undef _S_DECLARE + + static constexpr uint8_t Usage = _BV(step) - 1; // A bit mask containing 'step' bits + + #define _OUT_PORT(N) (Usage << (offset + (step * N))), + static constexpr uint8_t output[] = { REPEAT(NUM_SERIAL, _OUT_PORT) }; + #undef _OUT_PORT + + #define _OUT_MASK(N) | output[N] + static constexpr uint8_t ALL = 0 REPEAT(NUM_SERIAL, _OUT_MASK); + #undef _OUT_MASK + + NO_INLINE void write(uint8_t c) { + #define _S_WRITE(N) if (portMask.enabled(output[N])) serial##N.write(c); + REPEAT(NUM_SERIAL, _S_WRITE); + #undef _S_WRITE } NO_INLINE void msgDone() { - if (portMask & FirstOutputMask) serial0.msgDone(); - if (portMask & SecondOutputMask) serial1.msgDone(); + #define _S_DONE(N) if (portMask.enabled(output[N])) serial##N.msgDone(); + REPEAT(NUM_SERIAL, _S_DONE); + #undef _S_DONE } - bool available(uint8_t index) { - switch(index) { - case 0 + offset: return serial0.available(); - case 1 + offset: return serial1.available(); - default: return false; - } + int available(serial_index_t index) { + uint8_t pos = offset; + #define _S_AVAILABLE(N) if (index.within(pos, pos + step - 1)) return serial##N.available(index); else pos += step; + REPEAT(NUM_SERIAL, _S_AVAILABLE); + #undef _S_AVAILABLE + return false; } - NO_INLINE int read(uint8_t index) { - switch(index) { - case 0 + offset: return serial0.read(); - case 1 + offset: return serial1.read(); - default: return -1; - } + int read(serial_index_t index) { + uint8_t pos = offset; + #define _S_READ(N) if (index.within(pos, pos + step - 1)) return serial##N.read(index); else pos += step; + REPEAT(NUM_SERIAL, _S_READ); + #undef _S_READ + return -1; } void begin(const long br) { - if (portMask & FirstOutputMask) serial0.begin(br); - if (portMask & SecondOutputMask) serial1.begin(br); + #define _S_BEGIN(N) if (portMask.enabled(output[N])) serial##N.begin(br); + REPEAT(NUM_SERIAL, _S_BEGIN); + #undef _S_BEGIN } void end() { - if (portMask & FirstOutputMask) serial0.end(); - if (portMask & SecondOutputMask) serial1.end(); + #define _S_END(N) if (portMask.enabled(output[N])) serial##N.end(); + REPEAT(NUM_SERIAL, _S_END); + #undef _S_END } bool connected() { bool ret = true; - if (portMask & FirstOutputMask) ret = CALL_IF_EXISTS(bool, &serial0, connected); - if (portMask & SecondOutputMask) ret = ret && CALL_IF_EXISTS(bool, &serial1, connected); + #define _S_CONNECTED(N) if (portMask.enabled(output[N]) && !CALL_IF_EXISTS(bool, &serial##N, connected)) ret = false; + REPEAT(NUM_SERIAL, _S_CONNECTED); + #undef _S_CONNECTED return ret; } @@ -213,23 +267,40 @@ struct MultiSerial : public SerialBase< MultiSerial using BaseClassT::read; // Redirect flush - NO_INLINE void flush() { - if (portMask & FirstOutputMask) serial0.flush(); - if (portMask & SecondOutputMask) serial1.flush(); + NO_INLINE void flush() { + #define _S_FLUSH(N) if (portMask.enabled(output[N])) serial##N.flush(); + REPEAT(NUM_SERIAL, _S_FLUSH); + #undef _S_FLUSH + } + NO_INLINE void flushTX() { + #define _S_FLUSHTX(N) if (portMask.enabled(output[N])) CALL_IF_EXISTS(void, &serial0, flushTX); + REPEAT(NUM_SERIAL, _S_FLUSHTX); + #undef _S_FLUSHTX } - NO_INLINE void flushTX() { - if (portMask & FirstOutputMask) CALL_IF_EXISTS(void, &serial0, flushTX); - if (portMask & SecondOutputMask) CALL_IF_EXISTS(void, &serial1, flushTX); + + // Forward feature queries + SerialFeature features(serial_index_t index) const { + uint8_t pos = offset; + #define _S_FEATURES(N) if (index.within(pos, pos + step - 1)) return serial##N.features(index); else pos += step; + REPEAT(NUM_SERIAL, _S_FEATURES); + #undef _S_FEATURES + return SerialFeature::None; } - MultiSerial(Serial0T & serial0, Serial1T & serial1, int8_t mask = AllMask, const bool e = false) : - BaseClassT(e), - portMask(mask), serial0(serial0), serial1(serial1) {} + #define _S_REFS(N) Serial##N##T & serial##N, + #define _S_INIT(N) ,serial##N (serial##N) + + MultiSerial(REPEAT(NUM_SERIAL, _S_REFS) const SerialMask mask = ALL, const bool e = false) + : BaseClassT(e), portMask(mask) REPEAT(NUM_SERIAL, _S_INIT) {} + }; // Build the actual serial object depending on current configuration -#define Serial0Type TERN(SERIAL_RUNTIME_HOOK, RuntimeSerial, BaseSerial) -#define ForwardSerial0Type TERN(SERIAL_RUNTIME_HOOK, RuntimeSerial, ForwardSerial) +#define Serial1Class TERN(SERIAL_RUNTIME_HOOK, RuntimeSerial, BaseSerial) +#define ForwardSerial1Class TERN(SERIAL_RUNTIME_HOOK, RuntimeSerial, ForwardSerial) #ifdef HAS_MULTI_SERIAL - #define Serial1Type ConditionalSerial + #define Serial2Class ConditionalSerial + #if NUM_SERIAL >= 3 + #define Serial3Class ConditionalSerial + #endif #endif diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index 20519e1888b5..e11a6cd03e4d 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -27,7 +27,49 @@ #include "../inc/MarlinConfigPre.h" class __FlashStringHelper; -typedef const __FlashStringHelper *progmem_str; +typedef const __FlashStringHelper* FSTR_P; +#ifndef FPSTR + #define FPSTR(S) (reinterpret_cast(S)) +#endif +#define FTOP(S) (reinterpret_cast(S)) + +// +// Conditional type assignment magic. For example... +// +// typename IF<(MYOPT==12), int, float>::type myvar; +// +template +struct IF { typedef R type; }; +template +struct IF { typedef L type; }; + +#define LINEAR_AXIS_GANG(V...) GANG_N(LINEAR_AXES, V) +#define LINEAR_AXIS_CODE(V...) CODE_N(LINEAR_AXES, V) +#define LINEAR_AXIS_LIST(V...) LIST_N(LINEAR_AXES, V) +#define LINEAR_AXIS_ARRAY(V...) { LINEAR_AXIS_LIST(V) } +#define LINEAR_AXIS_ARGS(T...) LINEAR_AXIS_LIST(T x, T y, T z, T i, T j, T k) +#define LINEAR_AXIS_ELEM(O) LINEAR_AXIS_LIST(O.x, O.y, O.z, O.i, O.j, O.k) +#define LINEAR_AXIS_DEFS(T,V) LINEAR_AXIS_LIST(T x=V, T y=V, T z=V, T i=V, T j=V, T k=V) + +#define LOGICAL_AXIS_GANG(E,V...) LINEAR_AXIS_GANG(V) GANG_ITEM_E(E) +#define LOGICAL_AXIS_CODE(E,V...) LINEAR_AXIS_CODE(V) CODE_ITEM_E(E) +#define LOGICAL_AXIS_LIST(E,V...) LINEAR_AXIS_LIST(V) LIST_ITEM_E(E) +#define LOGICAL_AXIS_ARRAY(E,V...) { LOGICAL_AXIS_LIST(E,V) } +#define LOGICAL_AXIS_ARGS(T...) LOGICAL_AXIS_LIST(T e, T x, T y, T z, T i, T j, T k) +#define LOGICAL_AXIS_ELEM(O) LOGICAL_AXIS_LIST(O.e, O.x, O.y, O.z, O.i, O.j, O.k) +#define LOGICAL_AXIS_DECL(T,V) LOGICAL_AXIS_LIST(T e=V, T x=V, T y=V, T z=V, T i=V, T j=V, T k=V) + +#define LOGICAL_AXES_STRING LOGICAL_AXIS_GANG("E", "X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR) + +#if HAS_EXTRUDERS + #define LIST_ITEM_E(N) , N + #define CODE_ITEM_E(N) ; N + #define GANG_ITEM_E(N) N +#else + #define LIST_ITEM_E(N) + #define CODE_ITEM_E(N) + #define GANG_ITEM_E(N) +#endif // // Enumerated axis indices @@ -37,51 +79,84 @@ typedef const __FlashStringHelper *progmem_str; // - X_HEAD, Y_HEAD, and Z_HEAD should be used for Steppers on Core kinematics // enum AxisEnum : uint8_t { - X_AXIS = 0, A_AXIS = 0, - Y_AXIS = 1, B_AXIS = 1, - Z_AXIS = 2, C_AXIS = 2, - E_AXIS = 3, - X_HEAD = 4, Y_HEAD = 5, Z_HEAD = 6, - E0_AXIS = 3, - E1_AXIS, E2_AXIS, E3_AXIS, E4_AXIS, E5_AXIS, E6_AXIS, E7_AXIS, - ALL_AXES = 0xFE, NO_AXIS = 0xFF + + // Linear axes may be controlled directly or indirectly + LINEAR_AXIS_LIST(X_AXIS, Y_AXIS, Z_AXIS, I_AXIS, J_AXIS, K_AXIS) + + // Extruder axes may be considered distinctly + #define _EN_ITEM(N) , E##N##_AXIS + REPEAT(EXTRUDERS, _EN_ITEM) + #undef _EN_ITEM + + // Core also keeps toolhead directions + #if EITHER(IS_CORE, MARKFORGED_XY) + , X_HEAD, Y_HEAD, Z_HEAD + #endif + + // Distinct axes, including all E and Core + , NUM_AXIS_ENUMS + + // Most of the time we refer only to the single E_AXIS + #if HAS_EXTRUDERS + , E_AXIS = E0_AXIS + #endif + + // A, B, and C are for DELTA, SCARA, etc. + , A_AXIS = X_AXIS + #if LINEAR_AXES >= 2 + , B_AXIS = Y_AXIS + #endif + #if LINEAR_AXES >= 3 + , C_AXIS = Z_AXIS + #endif + + // To refer to all or none + , ALL_AXES_ENUM = 0xFE, NO_AXIS_ENUM = 0xFF }; +typedef IF<(NUM_AXIS_ENUMS > 8), uint16_t, uint8_t>::type axis_bits_t; + // -// Loop over XYZE axes +// Loop over axes // -#define LOOP_XYZ(VAR) LOOP_S_LE_N(VAR, X_AXIS, Z_AXIS) -#define LOOP_XYZE(VAR) LOOP_S_LE_N(VAR, X_AXIS, E_AXIS) -#define LOOP_XYZE_N(VAR) LOOP_S_L_N(VAR, X_AXIS, XYZE_N) #define LOOP_ABC(VAR) LOOP_S_LE_N(VAR, A_AXIS, C_AXIS) -#define LOOP_ABCE(VAR) LOOP_S_LE_N(VAR, A_AXIS, E_AXIS) -#define LOOP_ABCE_N(VAR) LOOP_S_L_N(VAR, A_AXIS, XYZE_N) +#define LOOP_LINEAR_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LINEAR_AXES) +#define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LOGICAL_AXES) +#define LOOP_DISTINCT_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, DISTINCT_AXES) // -// Conditional type assignment magic. For example... +// feedRate_t is just a humble float // -// typename IF<(MYOPT==12), int, float>::type myvar; +typedef float feedRate_t; + // -template -struct IF { typedef R type; }; -template -struct IF { typedef L type; }; +// celsius_t is the native unit of temperature. Signed to handle a disconnected thermistor value (-14). +// For more resolition (e.g., for a chocolate printer) this may later be changed to Celsius x 100 +// +typedef int16_t celsius_t; +typedef float celsius_float_t; // -// feedRate_t is just a humble float +// On AVR pointers are only 2 bytes so use 'const float &' for 'const float' // -typedef float feedRate_t; +#ifdef __AVR__ + typedef const float & const_float_t; +#else + typedef const float const_float_t; +#endif +typedef const_float_t const_feedRate_t; +typedef const_float_t const_celsius_float_t; // Conversion macros -#define MMM_TO_MMS(MM_M) feedRate_t(float(MM_M) / 60.0f) -#define MMS_TO_MMM(MM_S) (float(MM_S) * 60.0f) +#define MMM_TO_MMS(MM_M) feedRate_t(static_cast(MM_M) / 60.0f) +#define MMS_TO_MMM(MM_S) (static_cast(MM_S) * 60.0f) // // Coordinates structures for XY, XYZ, XYZE... // // Helpers -#define _RECIP(N) ((N) ? 1.0f / float(N) : 0.0f) +#define _RECIP(N) ((N) ? 1.0f / static_cast(N) : 0.0f) #define _ABS(N) ((N) < 0 ? -(N) : (N)) #define _LS(N) (N = (T)(uint32_t(N) << v)) #define _RS(N) (N = (T)(uint32_t(N) >> v)) @@ -169,7 +244,7 @@ void toNative(xyz_pos_t &raw); void toNative(xyze_pos_t &raw); // -// XY coordinates, counters, etc. +// Paired XY coordinates, counters, flags, etc. // template struct XYval { @@ -178,18 +253,34 @@ struct XYval { struct { T a, b; }; T pos[2]; }; + + // Set all to 0 + FI void reset() { x = y = 0; } + + // Setters taking struct types and arrays FI void set(const T px) { x = px; } - FI void set(const T px, const T py) { x = px; y = py; } - FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; } - FI void set(const T (&arr)[XYZ]) { x = arr[0]; y = arr[1]; } - FI void set(const T (&arr)[XYZE]) { x = arr[0]; y = arr[1]; } - #if XYZE_N > XYZE - FI void set(const T (&arr)[XYZE_N]) { x = arr[0]; y = arr[1]; } + #if HAS_Y_AXIS + FI void set(const T px, const T py) { x = px; y = py; } + FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; } #endif - FI void reset() { x = y = 0; } + #if LINEAR_AXES > XY + FI void set(const T (&arr)[LINEAR_AXES]) { x = arr[0]; y = arr[1]; } + #endif + #if LOGICAL_AXES > LINEAR_AXES + FI void set(const T (&arr)[LOGICAL_AXES]) { x = arr[0]; y = arr[1]; } + #if DISTINCT_AXES > LOGICAL_AXES + FI void set(const T (&arr)[DISTINCT_AXES]) { x = arr[0]; y = arr[1]; } + #endif + #endif + + // Length reduced to one dimension FI T magnitude() const { return (T)sqrtf(x*x + y*y); } + // Pointer to the data as a simple array FI operator T* () { return pos; } + // If any element is true then it's true FI operator bool() { return x || y; } + + // Explicit copy and copies with conversion FI XYval copy() const { return *this; } FI XYval ABS() const { return { T(_ABS(x)), T(_ABS(y)) }; } FI XYval asInt() { return { int16_t(x), int16_t(y) }; } @@ -198,20 +289,30 @@ struct XYval { FI XYval asLong() const { return { int32_t(x), int32_t(y) }; } FI XYval ROUNDL() { return { int32_t(LROUND(x)), int32_t(LROUND(y)) }; } FI XYval ROUNDL() const { return { int32_t(LROUND(x)), int32_t(LROUND(y)) }; } - FI XYval asFloat() { return { float(x), float(y) }; } - FI XYval asFloat() const { return { float(x), float(y) }; } + FI XYval asFloat() { return { static_cast(x), static_cast(y) }; } + FI XYval asFloat() const { return { static_cast(x), static_cast(y) }; } FI XYval reciprocal() const { return { _RECIP(x), _RECIP(y) }; } + + // Marlin workspace shifting is done with G92 and M206 FI XYval asLogical() const { XYval o = asFloat(); toLogical(o); return o; } FI XYval asNative() const { XYval o = asFloat(); toNative(o); return o; } + + // Cast to a type with more fields by making a new object FI operator XYZval() { return { x, y }; } FI operator XYZval() const { return { x, y }; } FI operator XYZEval() { return { x, y }; } FI operator XYZEval() const { return { x, y }; } - FI T& operator[](const int i) { return pos[i]; } - FI const T& operator[](const int i) const { return pos[i]; } + + // Accessor via an AxisEnum (or any integer) [index] + FI T& operator[](const int n) { return pos[n]; } + FI const T& operator[](const int n) const { return pos[n]; } + + // Assignment operator overrides do the expected thing FI XYval& operator= (const T v) { set(v, v ); return *this; } FI XYval& operator= (const XYZval &rs) { set(rs.x, rs.y); return *this; } FI XYval& operator= (const XYZEval &rs) { set(rs.x, rs.y); return *this; } + + // Override other operators to get intuitive behaviors FI XYval operator+ (const XYval &rs) const { XYval ls = *this; ls.x += rs.x; ls.y += rs.y; return ls; } FI XYval operator+ (const XYval &rs) { XYval ls = *this; ls.x += rs.x; ls.y += rs.y; return ls; } FI XYval operator- (const XYval &rs) const { XYval ls = *this; ls.x -= rs.x; ls.y -= rs.y; return ls; } @@ -248,6 +349,10 @@ struct XYval { FI XYval operator>>(const int &v) { XYval ls = *this; _RS(ls.x); _RS(ls.y); return ls; } FI XYval operator<<(const int &v) const { XYval ls = *this; _LS(ls.x); _LS(ls.y); return ls; } FI XYval operator<<(const int &v) { XYval ls = *this; _LS(ls.x); _LS(ls.y); return ls; } + FI const XYval operator-() const { XYval o = *this; o.x = -x; o.y = -y; return o; } + FI XYval operator-() { XYval o = *this; o.x = -x; o.y = -y; return o; } + + // Modifier operators FI XYval& operator+=(const XYval &rs) { x += rs.x; y += rs.y; return *this; } FI XYval& operator-=(const XYval &rs) { x -= rs.x; y -= rs.y; return *this; } FI XYval& operator*=(const XYval &rs) { x *= rs.x; y *= rs.y; return *this; } @@ -261,6 +366,8 @@ struct XYval { FI XYval& operator*=(const int &v) { x *= v; y *= v; return *this; } FI XYval& operator>>=(const int &v) { _RS(x); _RS(y); return *this; } FI XYval& operator<<=(const int &v) { _LS(x); _LS(y); return *this; } + + // Exact comparisons. For floats a "NEAR" operation may be better. FI bool operator==(const XYval &rs) { return x == rs.x && y == rs.y; } FI bool operator==(const XYZval &rs) { return x == rs.x && y == rs.y; } FI bool operator==(const XYZEval &rs) { return x == rs.x && y == rs.y; } @@ -273,224 +380,291 @@ struct XYval { FI bool operator!=(const XYval &rs) const { return !operator==(rs); } FI bool operator!=(const XYZval &rs) const { return !operator==(rs); } FI bool operator!=(const XYZEval &rs) const { return !operator==(rs); } - FI XYval operator-() { XYval o = *this; o.x = -x; o.y = -y; return o; } - FI const XYval operator-() const { XYval o = *this; o.x = -x; o.y = -y; return o; } }; // -// XYZ coordinates, counters, etc. +// Linear Axes coordinates, counters, flags, etc. // template struct XYZval { union { - struct { T x, y, z; }; - struct { T a, b, c; }; - T pos[3]; + struct { T LINEAR_AXIS_ARGS(); }; + struct { T LINEAR_AXIS_LIST(a, b, c, u, v, w); }; + T pos[LINEAR_AXES]; }; + + // Set all to 0 + FI void reset() { LINEAR_AXIS_GANG(x =, y =, z =, i =, j =, k =) 0; } + + // Setters taking struct types and arrays FI void set(const T px) { x = px; } FI void set(const T px, const T py) { x = px; y = py; } - FI void set(const T px, const T py, const T pz) { x = px; y = py; z = pz; } - FI void set(const XYval pxy, const T pz) { x = pxy.x; y = pxy.y; z = pz; } + FI void set(const XYval pxy) { x = pxy.x; y = pxy.y; } + FI void set(const XYval pxy, const T pz) { LINEAR_AXIS_CODE(x = pxy.x, y = pxy.y, z = pz, NOOP, NOOP, NOOP); } FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; } - FI void set(const T (&arr)[XYZ]) { x = arr[0]; y = arr[1]; z = arr[2]; } - FI void set(const T (&arr)[XYZE]) { x = arr[0]; y = arr[1]; z = arr[2]; } - #if XYZE_N > XYZE - FI void set(const T (&arr)[XYZE_N]) { x = arr[0]; y = arr[1]; z = arr[2]; } + #if HAS_Z_AXIS + FI void set(const T (&arr)[LINEAR_AXES]) { LINEAR_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5]); } + FI void set(LINEAR_AXIS_ARGS(const T)) { LINEAR_AXIS_CODE(a = x, b = y, c = z, u = i, v = j, w = k ); } + #endif + #if LOGICAL_AXES > LINEAR_AXES + FI void set(const T (&arr)[LOGICAL_AXES]) { LINEAR_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5]); } + FI void set(LOGICAL_AXIS_ARGS(const T)) { LINEAR_AXIS_CODE(a = x, b = y, c = z, u = i, v = j, w = k ); } + #if DISTINCT_AXES > LOGICAL_AXES + FI void set(const T (&arr)[DISTINCT_AXES]) { LINEAR_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5]); } + #endif + #endif + #if LINEAR_AXES >= 4 + FI void set(const T px, const T py, const T pz) { x = px; y = py; z = pz; } + #endif + #if LINEAR_AXES >= 5 + FI void set(const T px, const T py, const T pz, const T pi) { x = px; y = py; z = pz; i = pi; } #endif - FI void reset() { x = y = z = 0; } - FI T magnitude() const { return (T)sqrtf(x*x + y*y + z*z); } + #if LINEAR_AXES >= 6 + FI void set(const T px, const T py, const T pz, const T pi, const T pj) { x = px; y = py; z = pz; i = pi; j = pj; } + #endif + + // Length reduced to one dimension + FI T magnitude() const { return (T)sqrtf(LINEAR_AXIS_GANG(x*x, + y*y, + z*z, + i*i, + j*j, + k*k)); } + // Pointer to the data as a simple array FI operator T* () { return pos; } - FI operator bool() { return z || x || y; } + // If any element is true then it's true + FI operator bool() { return LINEAR_AXIS_GANG(x, || y, || z, || i, || j, || k); } + + // Explicit copy and copies with conversion FI XYZval copy() const { XYZval o = *this; return o; } - FI XYZval ABS() const { return { T(_ABS(x)), T(_ABS(y)), T(_ABS(z)) }; } - FI XYZval asInt() { return { int16_t(x), int16_t(y), int16_t(z) }; } - FI XYZval asInt() const { return { int16_t(x), int16_t(y), int16_t(z) }; } - FI XYZval asLong() { return { int32_t(x), int32_t(y), int32_t(z) }; } - FI XYZval asLong() const { return { int32_t(x), int32_t(y), int32_t(z) }; } - FI XYZval ROUNDL() { return { int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)) }; } - FI XYZval ROUNDL() const { return { int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)) }; } - FI XYZval asFloat() { return { float(x), float(y), float(z) }; } - FI XYZval asFloat() const { return { float(x), float(y), float(z) }; } - FI XYZval reciprocal() const { return { _RECIP(x), _RECIP(y), _RECIP(z) }; } + FI XYZval ABS() const { return LINEAR_AXIS_ARRAY(T(_ABS(x)), T(_ABS(y)), T(_ABS(z)), T(_ABS(i)), T(_ABS(j)), T(_ABS(k))); } + FI XYZval asInt() { return LINEAR_AXIS_ARRAY(int16_t(x), int16_t(y), int16_t(z), int16_t(i), int16_t(j), int16_t(k)); } + FI XYZval asInt() const { return LINEAR_AXIS_ARRAY(int16_t(x), int16_t(y), int16_t(z), int16_t(i), int16_t(j), int16_t(k)); } + FI XYZval asLong() { return LINEAR_AXIS_ARRAY(int32_t(x), int32_t(y), int32_t(z), int32_t(i), int32_t(j), int32_t(k)); } + FI XYZval asLong() const { return LINEAR_AXIS_ARRAY(int32_t(x), int32_t(y), int32_t(z), int32_t(i), int32_t(j), int32_t(k)); } + FI XYZval ROUNDL() { return LINEAR_AXIS_ARRAY(int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)), int32_t(LROUND(i)), int32_t(LROUND(j)), int32_t(LROUND(k))); } + FI XYZval ROUNDL() const { return LINEAR_AXIS_ARRAY(int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)), int32_t(LROUND(i)), int32_t(LROUND(j)), int32_t(LROUND(k))); } + FI XYZval asFloat() { return LINEAR_AXIS_ARRAY(static_cast(x), static_cast(y), static_cast(z), static_cast(i), static_cast(j), static_cast(k)); } + FI XYZval asFloat() const { return LINEAR_AXIS_ARRAY(static_cast(x), static_cast(y), static_cast(z), static_cast(i), static_cast(j), static_cast(k)); } + FI XYZval reciprocal() const { return LINEAR_AXIS_ARRAY(_RECIP(x), _RECIP(y), _RECIP(z), _RECIP(i), _RECIP(j), _RECIP(k)); } + + // Marlin workspace shifting is done with G92 and M206 FI XYZval asLogical() const { XYZval o = asFloat(); toLogical(o); return o; } FI XYZval asNative() const { XYZval o = asFloat(); toNative(o); return o; } + + // In-place cast to types having fewer fields FI operator XYval&() { return *(XYval*)this; } FI operator const XYval&() const { return *(const XYval*)this; } - FI operator XYZEval() const { return { x, y, z }; } - FI T& operator[](const int i) { return pos[i]; } - FI const T& operator[](const int i) const { return pos[i]; } - FI XYZval& operator= (const T v) { set(v, v, v ); return *this; } + + // Cast to a type with more fields by making a new object + FI operator XYZEval() const { return LINEAR_AXIS_ARRAY(x, y, z, i, j, k); } + + // Accessor via an AxisEnum (or any integer) [index] + FI T& operator[](const int n) { return pos[n]; } + FI const T& operator[](const int n) const { return pos[n]; } + + // Assignment operator overrides do the expected thing + FI XYZval& operator= (const T v) { set(ARRAY_N_1(LINEAR_AXES, v)); return *this; } FI XYZval& operator= (const XYval &rs) { set(rs.x, rs.y ); return *this; } - FI XYZval& operator= (const XYZEval &rs) { set(rs.x, rs.y, rs.z); return *this; } - FI XYZval operator+ (const XYval &rs) const { XYZval ls = *this; ls.x += rs.x; ls.y += rs.y; return ls; } - FI XYZval operator+ (const XYval &rs) { XYZval ls = *this; ls.x += rs.x; ls.y += rs.y; return ls; } - FI XYZval operator- (const XYval &rs) const { XYZval ls = *this; ls.x -= rs.x; ls.y -= rs.y; return ls; } - FI XYZval operator- (const XYval &rs) { XYZval ls = *this; ls.x -= rs.x; ls.y -= rs.y; return ls; } - FI XYZval operator* (const XYval &rs) const { XYZval ls = *this; ls.x *= rs.x; ls.y *= rs.y; return ls; } - FI XYZval operator* (const XYval &rs) { XYZval ls = *this; ls.x *= rs.x; ls.y *= rs.y; return ls; } - FI XYZval operator/ (const XYval &rs) const { XYZval ls = *this; ls.x /= rs.x; ls.y /= rs.y; return ls; } - FI XYZval operator/ (const XYval &rs) { XYZval ls = *this; ls.x /= rs.x; ls.y /= rs.y; return ls; } - FI XYZval operator+ (const XYZval &rs) const { XYZval ls = *this; ls.x += rs.x; ls.y += rs.y; ls.z += rs.z; return ls; } - FI XYZval operator+ (const XYZval &rs) { XYZval ls = *this; ls.x += rs.x; ls.y += rs.y; ls.z += rs.z; return ls; } - FI XYZval operator- (const XYZval &rs) const { XYZval ls = *this; ls.x -= rs.x; ls.y -= rs.y; ls.z -= rs.z; return ls; } - FI XYZval operator- (const XYZval &rs) { XYZval ls = *this; ls.x -= rs.x; ls.y -= rs.y; ls.z -= rs.z; return ls; } - FI XYZval operator* (const XYZval &rs) const { XYZval ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; return ls; } - FI XYZval operator* (const XYZval &rs) { XYZval ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; return ls; } - FI XYZval operator/ (const XYZval &rs) const { XYZval ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; } - FI XYZval operator/ (const XYZval &rs) { XYZval ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; } - FI XYZval operator+ (const XYZEval &rs) const { XYZval ls = *this; ls.x += rs.x; ls.y += rs.y; ls.z += rs.z; return ls; } - FI XYZval operator+ (const XYZEval &rs) { XYZval ls = *this; ls.x += rs.x; ls.y += rs.y; ls.z += rs.z; return ls; } - FI XYZval operator- (const XYZEval &rs) const { XYZval ls = *this; ls.x -= rs.x; ls.y -= rs.y; ls.z -= rs.z; return ls; } - FI XYZval operator- (const XYZEval &rs) { XYZval ls = *this; ls.x -= rs.x; ls.y -= rs.y; ls.z -= rs.z; return ls; } - FI XYZval operator* (const XYZEval &rs) const { XYZval ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; return ls; } - FI XYZval operator* (const XYZEval &rs) { XYZval ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; return ls; } - FI XYZval operator/ (const XYZEval &rs) const { XYZval ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; } - FI XYZval operator/ (const XYZEval &rs) { XYZval ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; } - FI XYZval operator* (const float &v) const { XYZval ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; } - FI XYZval operator* (const float &v) { XYZval ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; } - FI XYZval operator* (const int &v) const { XYZval ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; } - FI XYZval operator* (const int &v) { XYZval ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; return ls; } - FI XYZval operator/ (const float &v) const { XYZval ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; } - FI XYZval operator/ (const float &v) { XYZval ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; } - FI XYZval operator/ (const int &v) const { XYZval ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; } - FI XYZval operator/ (const int &v) { XYZval ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; return ls; } - FI XYZval operator>>(const int &v) const { XYZval ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); return ls; } - FI XYZval operator>>(const int &v) { XYZval ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); return ls; } - FI XYZval operator<<(const int &v) const { XYZval ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); return ls; } - FI XYZval operator<<(const int &v) { XYZval ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); return ls; } - FI XYZval& operator+=(const XYval &rs) { x += rs.x; y += rs.y; return *this; } - FI XYZval& operator-=(const XYval &rs) { x -= rs.x; y -= rs.y; return *this; } - FI XYZval& operator*=(const XYval &rs) { x *= rs.x; y *= rs.y; return *this; } - FI XYZval& operator/=(const XYval &rs) { x /= rs.x; y /= rs.y; return *this; } - FI XYZval& operator+=(const XYZval &rs) { x += rs.x; y += rs.y; z += rs.z; return *this; } - FI XYZval& operator-=(const XYZval &rs) { x -= rs.x; y -= rs.y; z -= rs.z; return *this; } - FI XYZval& operator*=(const XYZval &rs) { x *= rs.x; y *= rs.y; z *= rs.z; return *this; } - FI XYZval& operator/=(const XYZval &rs) { x /= rs.x; y /= rs.y; z /= rs.z; return *this; } - FI XYZval& operator+=(const XYZEval &rs) { x += rs.x; y += rs.y; z += rs.z; return *this; } - FI XYZval& operator-=(const XYZEval &rs) { x -= rs.x; y -= rs.y; z -= rs.z; return *this; } - FI XYZval& operator*=(const XYZEval &rs) { x *= rs.x; y *= rs.y; z *= rs.z; return *this; } - FI XYZval& operator/=(const XYZEval &rs) { x /= rs.x; y /= rs.y; z /= rs.z; return *this; } - FI XYZval& operator*=(const float &v) { x *= v; y *= v; z *= v; return *this; } - FI XYZval& operator*=(const int &v) { x *= v; y *= v; z *= v; return *this; } - FI XYZval& operator>>=(const int &v) { _RS(x); _RS(y); _RS(z); return *this; } - FI XYZval& operator<<=(const int &v) { _LS(x); _LS(y); _LS(z); return *this; } - FI bool operator==(const XYZEval &rs) { return x == rs.x && y == rs.y && z == rs.z; } + FI XYZval& operator= (const XYZEval &rs) { set(LINEAR_AXIS_ELEM(rs)); return *this; } + + // Override other operators to get intuitive behaviors + FI XYZval operator+ (const XYval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, NOOP , NOOP , NOOP , NOOP ); return ls; } + FI XYZval operator+ (const XYval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, NOOP , NOOP , NOOP , NOOP ); return ls; } + FI XYZval operator- (const XYval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, NOOP , NOOP , NOOP , NOOP ); return ls; } + FI XYZval operator- (const XYval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, NOOP , NOOP , NOOP , NOOP ); return ls; } + FI XYZval operator* (const XYval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, NOOP , NOOP , NOOP , NOOP ); return ls; } + FI XYZval operator* (const XYval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, NOOP , NOOP , NOOP , NOOP ); return ls; } + FI XYZval operator/ (const XYval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, NOOP , NOOP , NOOP , NOOP ); return ls; } + FI XYZval operator/ (const XYval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, NOOP , NOOP , NOOP , NOOP ); return ls; } + FI XYZval operator+ (const XYZval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k); return ls; } + FI XYZval operator+ (const XYZval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k); return ls; } + FI XYZval operator- (const XYZval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, ls.z -= rs.z, ls.i -= rs.i, ls.j -= rs.j, ls.k -= rs.k); return ls; } + FI XYZval operator- (const XYZval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, ls.z -= rs.z, ls.i -= rs.i, ls.j -= rs.j, ls.k -= rs.k); return ls; } + FI XYZval operator* (const XYZval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, ls.z *= rs.z, ls.i *= rs.i, ls.j *= rs.j, ls.k *= rs.k); return ls; } + FI XYZval operator* (const XYZval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, ls.z *= rs.z, ls.i *= rs.i, ls.j *= rs.j, ls.k *= rs.k); return ls; } + FI XYZval operator/ (const XYZval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, ls.z /= rs.z, ls.i /= rs.i, ls.j /= rs.j, ls.k /= rs.k); return ls; } + FI XYZval operator/ (const XYZval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, ls.z /= rs.z, ls.i /= rs.i, ls.j /= rs.j, ls.k /= rs.k); return ls; } + FI XYZval operator+ (const XYZEval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k); return ls; } + FI XYZval operator+ (const XYZEval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k); return ls; } + FI XYZval operator- (const XYZEval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, ls.z -= rs.z, ls.i -= rs.i, ls.j -= rs.j, ls.k -= rs.k); return ls; } + FI XYZval operator- (const XYZEval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, ls.z -= rs.z, ls.i -= rs.i, ls.j -= rs.j, ls.k -= rs.k); return ls; } + FI XYZval operator* (const XYZEval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, ls.z *= rs.z, ls.i *= rs.i, ls.j *= rs.j, ls.k *= rs.k); return ls; } + FI XYZval operator* (const XYZEval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, ls.z *= rs.z, ls.i *= rs.i, ls.j *= rs.j, ls.k *= rs.k); return ls; } + FI XYZval operator/ (const XYZEval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, ls.z /= rs.z, ls.i /= rs.i, ls.j /= rs.j, ls.k /= rs.k); return ls; } + FI XYZval operator/ (const XYZEval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, ls.z /= rs.z, ls.i /= rs.i, ls.j /= rs.j, ls.k /= rs.k); return ls; } + FI XYZval operator* (const float &v) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= v, ls.y *= v, ls.z *= v, ls.i *= v, ls.j *= v, ls.k *= v ); return ls; } + FI XYZval operator* (const float &v) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= v, ls.y *= v, ls.z *= v, ls.i *= v, ls.j *= v, ls.k *= v ); return ls; } + FI XYZval operator* (const int &v) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= v, ls.y *= v, ls.z *= v, ls.i *= v, ls.j *= v, ls.k *= v ); return ls; } + FI XYZval operator* (const int &v) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= v, ls.y *= v, ls.z *= v, ls.i *= v, ls.j *= v, ls.k *= v ); return ls; } + FI XYZval operator/ (const float &v) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= v, ls.y /= v, ls.z /= v, ls.i /= v, ls.j /= v, ls.k /= v ); return ls; } + FI XYZval operator/ (const float &v) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= v, ls.y /= v, ls.z /= v, ls.i /= v, ls.j /= v, ls.k /= v ); return ls; } + FI XYZval operator/ (const int &v) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= v, ls.y /= v, ls.z /= v, ls.i /= v, ls.j /= v, ls.k /= v ); return ls; } + FI XYZval operator/ (const int &v) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= v, ls.y /= v, ls.z /= v, ls.i /= v, ls.j /= v, ls.k /= v ); return ls; } + FI XYZval operator>>(const int &v) const { XYZval ls = *this; LINEAR_AXIS_CODE(_RS(ls.x), _RS(ls.y), _RS(ls.z), _RS(ls.i), _RS(ls.j), _RS(ls.k) ); return ls; } + FI XYZval operator>>(const int &v) { XYZval ls = *this; LINEAR_AXIS_CODE(_RS(ls.x), _RS(ls.y), _RS(ls.z), _RS(ls.i), _RS(ls.j), _RS(ls.k) ); return ls; } + FI XYZval operator<<(const int &v) const { XYZval ls = *this; LINEAR_AXIS_CODE(_LS(ls.x), _LS(ls.y), _LS(ls.z), _LS(ls.i), _LS(ls.j), _LS(ls.k) ); return ls; } + FI XYZval operator<<(const int &v) { XYZval ls = *this; LINEAR_AXIS_CODE(_LS(ls.x), _LS(ls.y), _LS(ls.z), _LS(ls.i), _LS(ls.j), _LS(ls.k) ); return ls; } + FI const XYZval operator-() const { XYZval o = *this; LINEAR_AXIS_CODE(o.x = -x, o.y = -y, o.z = -z, o.i = -i, o.j = -j, o.k = -k); return o; } + FI XYZval operator-() { XYZval o = *this; LINEAR_AXIS_CODE(o.x = -x, o.y = -y, o.z = -z, o.i = -i, o.j = -j, o.k = -k); return o; } + + // Modifier operators + FI XYZval& operator+=(const XYval &rs) { LINEAR_AXIS_CODE(x += rs.x, y += rs.y, NOOP, NOOP, NOOP, NOOP ); return *this; } + FI XYZval& operator-=(const XYval &rs) { LINEAR_AXIS_CODE(x -= rs.x, y -= rs.y, NOOP, NOOP, NOOP, NOOP ); return *this; } + FI XYZval& operator*=(const XYval &rs) { LINEAR_AXIS_CODE(x *= rs.x, y *= rs.y, NOOP, NOOP, NOOP, NOOP ); return *this; } + FI XYZval& operator/=(const XYval &rs) { LINEAR_AXIS_CODE(x /= rs.x, y /= rs.y, NOOP, NOOP, NOOP, NOOP ); return *this; } + FI XYZval& operator+=(const XYZval &rs) { LINEAR_AXIS_CODE(x += rs.x, y += rs.y, z += rs.z, i += rs.i, j += rs.j, k += rs.k); return *this; } + FI XYZval& operator-=(const XYZval &rs) { LINEAR_AXIS_CODE(x -= rs.x, y -= rs.y, z -= rs.z, i -= rs.i, j -= rs.j, k -= rs.k); return *this; } + FI XYZval& operator*=(const XYZval &rs) { LINEAR_AXIS_CODE(x *= rs.x, y *= rs.y, z *= rs.z, i *= rs.i, j *= rs.j, k *= rs.k); return *this; } + FI XYZval& operator/=(const XYZval &rs) { LINEAR_AXIS_CODE(x /= rs.x, y /= rs.y, z /= rs.z, i /= rs.i, j /= rs.j, k /= rs.k); return *this; } + FI XYZval& operator+=(const XYZEval &rs) { LINEAR_AXIS_CODE(x += rs.x, y += rs.y, z += rs.z, i += rs.i, j += rs.j, k += rs.k); return *this; } + FI XYZval& operator-=(const XYZEval &rs) { LINEAR_AXIS_CODE(x -= rs.x, y -= rs.y, z -= rs.z, i -= rs.i, j -= rs.j, k -= rs.k); return *this; } + FI XYZval& operator*=(const XYZEval &rs) { LINEAR_AXIS_CODE(x *= rs.x, y *= rs.y, z *= rs.z, i *= rs.i, j *= rs.j, k *= rs.k); return *this; } + FI XYZval& operator/=(const XYZEval &rs) { LINEAR_AXIS_CODE(x /= rs.x, y /= rs.y, z /= rs.z, i /= rs.i, j /= rs.j, k /= rs.k); return *this; } + FI XYZval& operator*=(const float &v) { LINEAR_AXIS_CODE(x *= v, y *= v, z *= v, i *= v, j *= v, k *= v); return *this; } + FI XYZval& operator*=(const int &v) { LINEAR_AXIS_CODE(x *= v, y *= v, z *= v, i *= v, j *= v, k *= v); return *this; } + FI XYZval& operator>>=(const int &v) { LINEAR_AXIS_CODE(_RS(x), _RS(y), _RS(z), _RS(i), _RS(j), _RS(k)); return *this; } + FI XYZval& operator<<=(const int &v) { LINEAR_AXIS_CODE(_LS(x), _LS(y), _LS(z), _LS(i), _LS(j), _LS(k)); return *this; } + + // Exact comparisons. For floats a "NEAR" operation may be better. + FI bool operator==(const XYZEval &rs) { return true LINEAR_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k); } + FI bool operator==(const XYZEval &rs) const { return true LINEAR_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k); } FI bool operator!=(const XYZEval &rs) { return !operator==(rs); } - FI bool operator==(const XYZEval &rs) const { return x == rs.x && y == rs.y && z == rs.z; } FI bool operator!=(const XYZEval &rs) const { return !operator==(rs); } - FI XYZval operator-() { XYZval o = *this; o.x = -x; o.y = -y; o.z = -z; return o; } - FI const XYZval operator-() const { XYZval o = *this; o.x = -x; o.y = -y; o.z = -z; return o; } }; // -// XYZE coordinates, counters, etc. +// Logical Axes coordinates, counters, etc. // template struct XYZEval { union { - struct{ T x, y, z, e; }; - struct{ T a, b, c; }; - T pos[4]; + struct { T LOGICAL_AXIS_ARGS(); }; + struct { T LOGICAL_AXIS_LIST(_e, a, b, c, u, v, w); }; + T pos[LOGICAL_AXES]; }; - FI void reset() { x = y = z = e = 0; } - FI T magnitude() const { return (T)sqrtf(x*x + y*y + z*z + e*e); } - FI operator T* () { return pos; } - FI operator bool() { return e || z || x || y; } - FI void set(const T px) { x = px; } - FI void set(const T px, const T py) { x = px; y = py; } - FI void set(const T px, const T py, const T pz) { x = px; y = py; z = pz; } - FI void set(const T px, const T py, const T pz, const T pe) { x = px; y = py; z = pz; e = pe; } - FI void set(const XYval pxy) { x = pxy.x; y = pxy.y; } - FI void set(const XYval pxy, const T pz) { x = pxy.x; y = pxy.y; z = pz; } - FI void set(const XYZval pxyz) { x = pxyz.x; y = pxyz.y; z = pxyz.z; } - FI void set(const XYval pxy, const T pz, const T pe) { x = pxy.x; y = pxy.y; z = pz; e = pe; } - FI void set(const XYval pxy, const XYval pze) { x = pxy.x; y = pxy.y; z = pze.z; e = pze.e; } - FI void set(const XYZval pxyz, const T pe) { x = pxyz.x; y = pxyz.y; z = pxyz.z; e = pe; } - FI void set(const T (&arr)[XY]) { x = arr[0]; y = arr[1]; } - FI void set(const T (&arr)[XYZ]) { x = arr[0]; y = arr[1]; z = arr[2]; } - FI void set(const T (&arr)[XYZE]) { x = arr[0]; y = arr[1]; z = arr[2]; e = arr[3]; } - #if XYZE_N > XYZE - FI void set(const T (&arr)[XYZE_N]) { x = arr[0]; y = arr[1]; z = arr[2]; e = arr[3]; } + // Reset all to 0 + FI void reset() { LOGICAL_AXIS_GANG(e =, x =, y =, z =, i =, j =, k =) 0; } + + // Setters taking struct types and arrays + FI void set(const T px) { x = px; } + FI void set(const T px, const T py) { x = px; y = py; } + FI void set(const XYval pxy) { x = pxy.x; y = pxy.y; } + FI void set(const XYZval pxyz) { set(LINEAR_AXIS_ELEM(pxyz)); } + #if HAS_Z_AXIS + FI void set(LINEAR_AXIS_ARGS(const T)) { LINEAR_AXIS_CODE(a = x, b = y, c = z, u = i, v = j, w = k); } + #endif + #if LOGICAL_AXES > LINEAR_AXES + FI void set(const XYval pxy, const T pe) { set(pxy); e = pe; } + FI void set(const XYZval pxyz, const T pe) { set(pxyz); e = pe; } + FI void set(LOGICAL_AXIS_ARGS(const T)) { LOGICAL_AXIS_CODE(_e = e, a = x, b = y, c = z, u = i, v = j, w = k); } + #endif + #if LINEAR_AXES >= 4 + FI void set(const T px, const T py, const T pz) { x = px; y = py; z = pz; } #endif - FI XYZEval copy() const { return *this; } - FI XYZEval ABS() const { return { T(_ABS(x)), T(_ABS(y)), T(_ABS(z)), T(_ABS(e)) }; } - FI XYZEval asInt() { return { int16_t(x), int16_t(y), int16_t(z), int16_t(e) }; } - FI XYZEval asInt() const { return { int16_t(x), int16_t(y), int16_t(z), int16_t(e) }; } - FI XYZEval asLong() { return { int32_t(x), int32_t(y), int32_t(z), int32_t(e) }; } - FI XYZEval asLong() const { return { int32_t(x), int32_t(y), int32_t(z), int32_t(e) }; } - FI XYZEval ROUNDL() { return { int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)), int32_t(LROUND(e)) }; } - FI XYZEval ROUNDL() const { return { int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)), int32_t(LROUND(e)) }; } - FI XYZEval asFloat() { return { float(x), float(y), float(z), float(e) }; } - FI XYZEval asFloat() const { return { float(x), float(y), float(z), float(e) }; } - FI XYZEval reciprocal() const { return { _RECIP(x), _RECIP(y), _RECIP(z), _RECIP(e) }; } - FI XYZEval asLogical() const { XYZEval o = asFloat(); toLogical(o); return o; } - FI XYZEval asNative() const { XYZEval o = asFloat(); toNative(o); return o; } - FI operator XYval&() { return *(XYval*)this; } - FI operator const XYval&() const { return *(const XYval*)this; } - FI operator XYZval&() { return *(XYZval*)this; } - FI operator const XYZval&() const { return *(const XYZval*)this; } - FI T& operator[](const int i) { return pos[i]; } - FI const T& operator[](const int i) const { return pos[i]; } - FI XYZEval& operator= (const T v) { set(v, v, v, v); return *this; } - FI XYZEval& operator= (const XYval &rs) { set(rs.x, rs.y); return *this; } - FI XYZEval& operator= (const XYZval &rs) { set(rs.x, rs.y, rs.z); return *this; } - FI XYZEval operator+ (const XYval &rs) const { XYZEval ls = *this; ls.x += rs.x; ls.y += rs.y; return ls; } - FI XYZEval operator+ (const XYval &rs) { XYZEval ls = *this; ls.x += rs.x; ls.y += rs.y; return ls; } - FI XYZEval operator- (const XYval &rs) const { XYZEval ls = *this; ls.x -= rs.x; ls.y -= rs.y; return ls; } - FI XYZEval operator- (const XYval &rs) { XYZEval ls = *this; ls.x -= rs.x; ls.y -= rs.y; return ls; } - FI XYZEval operator* (const XYval &rs) const { XYZEval ls = *this; ls.x *= rs.x; ls.y *= rs.y; return ls; } - FI XYZEval operator* (const XYval &rs) { XYZEval ls = *this; ls.x *= rs.x; ls.y *= rs.y; return ls; } - FI XYZEval operator/ (const XYval &rs) const { XYZEval ls = *this; ls.x /= rs.x; ls.y /= rs.y; return ls; } - FI XYZEval operator/ (const XYval &rs) { XYZEval ls = *this; ls.x /= rs.x; ls.y /= rs.y; return ls; } - FI XYZEval operator+ (const XYZval &rs) const { XYZEval ls = *this; ls.x += rs.x; ls.y += rs.y; ls.z += rs.z; return ls; } - FI XYZEval operator+ (const XYZval &rs) { XYZEval ls = *this; ls.x += rs.x; ls.y += rs.y; ls.z += rs.z; return ls; } - FI XYZEval operator- (const XYZval &rs) const { XYZEval ls = *this; ls.x -= rs.x; ls.y -= rs.y; ls.z -= rs.z; return ls; } - FI XYZEval operator- (const XYZval &rs) { XYZEval ls = *this; ls.x -= rs.x; ls.y -= rs.y; ls.z -= rs.z; return ls; } - FI XYZEval operator* (const XYZval &rs) const { XYZEval ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; return ls; } - FI XYZEval operator* (const XYZval &rs) { XYZEval ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; return ls; } - FI XYZEval operator/ (const XYZval &rs) const { XYZEval ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; } - FI XYZEval operator/ (const XYZval &rs) { XYZEval ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; return ls; } - FI XYZEval operator+ (const XYZEval &rs) const { XYZEval ls = *this; ls.x += rs.x; ls.y += rs.y; ls.z += rs.z; ls.e += rs.e; return ls; } - FI XYZEval operator+ (const XYZEval &rs) { XYZEval ls = *this; ls.x += rs.x; ls.y += rs.y; ls.z += rs.z; ls.e += rs.e; return ls; } - FI XYZEval operator- (const XYZEval &rs) const { XYZEval ls = *this; ls.x -= rs.x; ls.y -= rs.y; ls.z -= rs.z; ls.e -= rs.e; return ls; } - FI XYZEval operator- (const XYZEval &rs) { XYZEval ls = *this; ls.x -= rs.x; ls.y -= rs.y; ls.z -= rs.z; ls.e -= rs.e; return ls; } - FI XYZEval operator* (const XYZEval &rs) const { XYZEval ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; ls.e *= rs.e; return ls; } - FI XYZEval operator* (const XYZEval &rs) { XYZEval ls = *this; ls.x *= rs.x; ls.y *= rs.y; ls.z *= rs.z; ls.e *= rs.e; return ls; } - FI XYZEval operator/ (const XYZEval &rs) const { XYZEval ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; ls.e /= rs.e; return ls; } - FI XYZEval operator/ (const XYZEval &rs) { XYZEval ls = *this; ls.x /= rs.x; ls.y /= rs.y; ls.z /= rs.z; ls.e /= rs.e; return ls; } - FI XYZEval operator* (const float &v) const { XYZEval ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.e *= v; return ls; } - FI XYZEval operator* (const float &v) { XYZEval ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.e *= v; return ls; } - FI XYZEval operator* (const int &v) const { XYZEval ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.e *= v; return ls; } - FI XYZEval operator* (const int &v) { XYZEval ls = *this; ls.x *= v; ls.y *= v; ls.z *= v; ls.e *= v; return ls; } - FI XYZEval operator/ (const float &v) const { XYZEval ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; ls.e /= v; return ls; } - FI XYZEval operator/ (const float &v) { XYZEval ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; ls.e /= v; return ls; } - FI XYZEval operator/ (const int &v) const { XYZEval ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; ls.e /= v; return ls; } - FI XYZEval operator/ (const int &v) { XYZEval ls = *this; ls.x /= v; ls.y /= v; ls.z /= v; ls.e /= v; return ls; } - FI XYZEval operator>>(const int &v) const { XYZEval ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); _RS(ls.e); return ls; } - FI XYZEval operator>>(const int &v) { XYZEval ls = *this; _RS(ls.x); _RS(ls.y); _RS(ls.z); _RS(ls.e); return ls; } - FI XYZEval operator<<(const int &v) const { XYZEval ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _LS(ls.e); return ls; } - FI XYZEval operator<<(const int &v) { XYZEval ls = *this; _LS(ls.x); _LS(ls.y); _LS(ls.z); _LS(ls.e); return ls; } - FI XYZEval& operator+=(const XYval &rs) { x += rs.x; y += rs.y; return *this; } - FI XYZEval& operator-=(const XYval &rs) { x -= rs.x; y -= rs.y; return *this; } - FI XYZEval& operator*=(const XYval &rs) { x *= rs.x; y *= rs.y; return *this; } - FI XYZEval& operator/=(const XYval &rs) { x /= rs.x; y /= rs.y; return *this; } - FI XYZEval& operator+=(const XYZval &rs) { x += rs.x; y += rs.y; z += rs.z; return *this; } - FI XYZEval& operator-=(const XYZval &rs) { x -= rs.x; y -= rs.y; z -= rs.z; return *this; } - FI XYZEval& operator*=(const XYZval &rs) { x *= rs.x; y *= rs.y; z *= rs.z; return *this; } - FI XYZEval& operator/=(const XYZval &rs) { x /= rs.x; y /= rs.y; z /= rs.z; return *this; } - FI XYZEval& operator+=(const XYZEval &rs) { x += rs.x; y += rs.y; z += rs.z; e += rs.e; return *this; } - FI XYZEval& operator-=(const XYZEval &rs) { x -= rs.x; y -= rs.y; z -= rs.z; e -= rs.e; return *this; } - FI XYZEval& operator*=(const XYZEval &rs) { x *= rs.x; y *= rs.y; z *= rs.z; e *= rs.e; return *this; } - FI XYZEval& operator/=(const XYZEval &rs) { x /= rs.x; y /= rs.y; z /= rs.z; e /= rs.e; return *this; } - FI XYZEval& operator*=(const T &v) { x *= v; y *= v; z *= v; e *= v; return *this; } - FI XYZEval& operator>>=(const int &v) { _RS(x); _RS(y); _RS(z); _RS(e); return *this; } - FI XYZEval& operator<<=(const int &v) { _LS(x); _LS(y); _LS(z); _LS(e); return *this; } - FI bool operator==(const XYZval &rs) { return x == rs.x && y == rs.y && z == rs.z; } - FI bool operator!=(const XYZval &rs) { return !operator==(rs); } - FI bool operator==(const XYZval &rs) const { return x == rs.x && y == rs.y && z == rs.z; } - FI bool operator!=(const XYZval &rs) const { return !operator==(rs); } - FI XYZEval operator-() { return { -x, -y, -z, -e }; } - FI const XYZEval operator-() const { return { -x, -y, -z, -e }; } + #if LINEAR_AXES >= 5 + FI void set(const T px, const T py, const T pz, const T pi) { x = px; y = py; z = pz; i = pi; } + #endif + #if LINEAR_AXES >= 6 + FI void set(const T px, const T py, const T pz, const T pi, const T pj) { x = px; y = py; z = pz; i = pi; j = pj; } + #endif + + // Length reduced to one dimension + FI T magnitude() const { return (T)sqrtf(LOGICAL_AXIS_GANG(+ e*e, + x*x, + y*y, + z*z, + i*i, + j*j, + k*k)); } + // Pointer to the data as a simple array + FI operator T* () { return pos; } + // If any element is true then it's true + FI operator bool() { return 0 LOGICAL_AXIS_GANG(|| e, || x, || y, || z, || i, || j, || k); } + + // Explicit copy and copies with conversion + FI XYZEval copy() const { XYZEval o = *this; return o; } + FI XYZEval ABS() const { return LOGICAL_AXIS_ARRAY(T(_ABS(e)), T(_ABS(x)), T(_ABS(y)), T(_ABS(z)), T(_ABS(i)), T(_ABS(j)), T(_ABS(k))); } + FI XYZEval asInt() { return LOGICAL_AXIS_ARRAY(int16_t(e), int16_t(x), int16_t(y), int16_t(z), int16_t(i), int16_t(j), int16_t(k)); } + FI XYZEval asInt() const { return LOGICAL_AXIS_ARRAY(int16_t(e), int16_t(x), int16_t(y), int16_t(z), int16_t(i), int16_t(j), int16_t(k)); } + FI XYZEval asLong() { return LOGICAL_AXIS_ARRAY(int32_t(e), int32_t(x), int32_t(y), int32_t(z), int32_t(i), int32_t(j), int32_t(k)); } + FI XYZEval asLong() const { return LOGICAL_AXIS_ARRAY(int32_t(e), int32_t(x), int32_t(y), int32_t(z), int32_t(i), int32_t(j), int32_t(k)); } + FI XYZEval ROUNDL() { return LOGICAL_AXIS_ARRAY(int32_t(LROUND(e)), int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)), int32_t(LROUND(i)), int32_t(LROUND(j)), int32_t(LROUND(k))); } + FI XYZEval ROUNDL() const { return LOGICAL_AXIS_ARRAY(int32_t(LROUND(e)), int32_t(LROUND(x)), int32_t(LROUND(y)), int32_t(LROUND(z)), int32_t(LROUND(i)), int32_t(LROUND(j)), int32_t(LROUND(k))); } + FI XYZEval asFloat() { return LOGICAL_AXIS_ARRAY(static_cast(e), static_cast(x), static_cast(y), static_cast(z), static_cast(i), static_cast(j), static_cast(k)); } + FI XYZEval asFloat() const { return LOGICAL_AXIS_ARRAY(static_cast(e), static_cast(x), static_cast(y), static_cast(z), static_cast(i), static_cast(j), static_cast(k)); } + FI XYZEval reciprocal() const { return LOGICAL_AXIS_ARRAY(_RECIP(e), _RECIP(x), _RECIP(y), _RECIP(z), _RECIP(i), _RECIP(j), _RECIP(k)); } + + // Marlin workspace shifting is done with G92 and M206 + FI XYZEval asLogical() const { XYZEval o = asFloat(); toLogical(o); return o; } + FI XYZEval asNative() const { XYZEval o = asFloat(); toNative(o); return o; } + + // In-place cast to types having fewer fields + FI operator XYval&() { return *(XYval*)this; } + FI operator const XYval&() const { return *(const XYval*)this; } + FI operator XYZval&() { return *(XYZval*)this; } + FI operator const XYZval&() const { return *(const XYZval*)this; } + + // Accessor via an AxisEnum (or any integer) [index] + FI T& operator[](const int n) { return pos[n]; } + FI const T& operator[](const int n) const { return pos[n]; } + + // Assignment operator overrides do the expected thing + FI XYZEval& operator= (const T v) { set(LIST_N_1(LINEAR_AXES, v)); return *this; } + FI XYZEval& operator= (const XYval &rs) { set(rs.x, rs.y); return *this; } + FI XYZEval& operator= (const XYZval &rs) { set(LINEAR_AXIS_ELEM(rs)); return *this; } + + // Override other operators to get intuitive behaviors + FI XYZEval operator+ (const XYval &rs) const { XYZEval ls = *this; ls.x += rs.x; ls.y += rs.y; return ls; } + FI XYZEval operator+ (const XYval &rs) { XYZEval ls = *this; ls.x += rs.x; ls.y += rs.y; return ls; } + FI XYZEval operator- (const XYval &rs) const { XYZEval ls = *this; ls.x -= rs.x; ls.y -= rs.y; return ls; } + FI XYZEval operator- (const XYval &rs) { XYZEval ls = *this; ls.x -= rs.x; ls.y -= rs.y; return ls; } + FI XYZEval operator* (const XYval &rs) const { XYZEval ls = *this; ls.x *= rs.x; ls.y *= rs.y; return ls; } + FI XYZEval operator* (const XYval &rs) { XYZEval ls = *this; ls.x *= rs.x; ls.y *= rs.y; return ls; } + FI XYZEval operator/ (const XYval &rs) const { XYZEval ls = *this; ls.x /= rs.x; ls.y /= rs.y; return ls; } + FI XYZEval operator/ (const XYval &rs) { XYZEval ls = *this; ls.x /= rs.x; ls.y /= rs.y; return ls; } + FI XYZEval operator+ (const XYZval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k); return ls; } + FI XYZEval operator+ (const XYZval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k); return ls; } + FI XYZEval operator- (const XYZval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, ls.z -= rs.z, ls.i -= rs.i, ls.j -= rs.j, ls.k -= rs.k); return ls; } + FI XYZEval operator- (const XYZval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x -= rs.x, ls.y -= rs.y, ls.z -= rs.z, ls.i -= rs.i, ls.j -= rs.j, ls.k -= rs.k); return ls; } + FI XYZEval operator* (const XYZval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, ls.z *= rs.z, ls.i *= rs.i, ls.j *= rs.j, ls.k *= rs.k); return ls; } + FI XYZEval operator* (const XYZval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x *= rs.x, ls.y *= rs.y, ls.z *= rs.z, ls.i *= rs.i, ls.j *= rs.j, ls.k *= rs.k); return ls; } + FI XYZEval operator/ (const XYZval &rs) const { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, ls.z /= rs.z, ls.i /= rs.i, ls.j /= rs.j, ls.k /= rs.k); return ls; } + FI XYZEval operator/ (const XYZval &rs) { XYZval ls = *this; LINEAR_AXIS_CODE(ls.x /= rs.x, ls.y /= rs.y, ls.z /= rs.z, ls.i /= rs.i, ls.j /= rs.j, ls.k /= rs.k); return ls; } + FI XYZEval operator+ (const XYZEval &rs) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e += rs.e, ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k); return ls; } + FI XYZEval operator+ (const XYZEval &rs) { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e += rs.e, ls.x += rs.x, ls.y += rs.y, ls.z += rs.z, ls.i += rs.i, ls.j += rs.j, ls.k += rs.k); return ls; } + FI XYZEval operator- (const XYZEval &rs) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e -= rs.e, ls.x -= rs.x, ls.y -= rs.y, ls.z -= rs.z, ls.i -= rs.i, ls.j -= rs.j, ls.k -= rs.k); return ls; } + FI XYZEval operator- (const XYZEval &rs) { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e -= rs.e, ls.x -= rs.x, ls.y -= rs.y, ls.z -= rs.z, ls.i -= rs.i, ls.j -= rs.j, ls.k -= rs.k); return ls; } + FI XYZEval operator* (const XYZEval &rs) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e *= rs.e, ls.x *= rs.x, ls.y *= rs.y, ls.z *= rs.z, ls.i *= rs.i, ls.j *= rs.j, ls.k *= rs.k); return ls; } + FI XYZEval operator* (const XYZEval &rs) { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e *= rs.e, ls.x *= rs.x, ls.y *= rs.y, ls.z *= rs.z, ls.i *= rs.i, ls.j *= rs.j, ls.k *= rs.k); return ls; } + FI XYZEval operator/ (const XYZEval &rs) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e /= rs.e, ls.x /= rs.x, ls.y /= rs.y, ls.z /= rs.z, ls.i /= rs.i, ls.j /= rs.j, ls.k /= rs.k); return ls; } + FI XYZEval operator/ (const XYZEval &rs) { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e /= rs.e, ls.x /= rs.x, ls.y /= rs.y, ls.z /= rs.z, ls.i /= rs.i, ls.j /= rs.j, ls.k /= rs.k); return ls; } + FI XYZEval operator* (const float &v) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e *= v, ls.x *= v, ls.y *= v, ls.z *= v, ls.i *= v, ls.j *= v, ls.k *= v ); return ls; } + FI XYZEval operator* (const float &v) { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e *= v, ls.x *= v, ls.y *= v, ls.z *= v, ls.i *= v, ls.j *= v, ls.k *= v ); return ls; } + FI XYZEval operator* (const int &v) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e *= v, ls.x *= v, ls.y *= v, ls.z *= v, ls.i *= v, ls.j *= v, ls.k *= v ); return ls; } + FI XYZEval operator* (const int &v) { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e *= v, ls.x *= v, ls.y *= v, ls.z *= v, ls.i *= v, ls.j *= v, ls.k *= v ); return ls; } + FI XYZEval operator/ (const float &v) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e /= v, ls.x /= v, ls.y /= v, ls.z /= v, ls.i /= v, ls.j /= v, ls.k /= v ); return ls; } + FI XYZEval operator/ (const float &v) { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e /= v, ls.x /= v, ls.y /= v, ls.z /= v, ls.i /= v, ls.j /= v, ls.k /= v ); return ls; } + FI XYZEval operator/ (const int &v) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e /= v, ls.x /= v, ls.y /= v, ls.z /= v, ls.i /= v, ls.j /= v, ls.k /= v ); return ls; } + FI XYZEval operator/ (const int &v) { XYZEval ls = *this; LOGICAL_AXIS_CODE(ls.e /= v, ls.x /= v, ls.y /= v, ls.z /= v, ls.i /= v, ls.j /= v, ls.k /= v ); return ls; } + FI XYZEval operator>>(const int &v) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(_RS(ls.e), _RS(ls.x), _RS(ls.y), _RS(ls.z), _RS(ls.i), _RS(ls.j), _RS(ls.k) ); return ls; } + FI XYZEval operator>>(const int &v) { XYZEval ls = *this; LOGICAL_AXIS_CODE(_RS(ls.e), _RS(ls.x), _RS(ls.y), _RS(ls.z), _RS(ls.i), _RS(ls.j), _RS(ls.k) ); return ls; } + FI XYZEval operator<<(const int &v) const { XYZEval ls = *this; LOGICAL_AXIS_CODE(_LS(ls.e), _LS(ls.x), _LS(ls.y), _LS(ls.z), _LS(ls.i), _LS(ls.j), _LS(ls.k) ); return ls; } + FI XYZEval operator<<(const int &v) { XYZEval ls = *this; LOGICAL_AXIS_CODE(_LS(ls.e), _LS(ls.x), _LS(ls.y), _LS(ls.z), _LS(ls.i), _LS(ls.j), _LS(ls.k) ); return ls; } + FI const XYZEval operator-() const { return LOGICAL_AXIS_ARRAY(-e, -x, -y, -z, -i, -j, -k); } + FI XYZEval operator-() { return LOGICAL_AXIS_ARRAY(-e, -x, -y, -z, -i, -j, -k); } + + // Modifier operators + FI XYZEval& operator+=(const XYval &rs) { x += rs.x; y += rs.y; return *this; } + FI XYZEval& operator-=(const XYval &rs) { x -= rs.x; y -= rs.y; return *this; } + FI XYZEval& operator*=(const XYval &rs) { x *= rs.x; y *= rs.y; return *this; } + FI XYZEval& operator/=(const XYval &rs) { x /= rs.x; y /= rs.y; return *this; } + FI XYZEval& operator+=(const XYZval &rs) { LINEAR_AXIS_CODE(x += rs.x, y += rs.y, z += rs.z, i += rs.i, j += rs.j, k += rs.k); return *this; } + FI XYZEval& operator-=(const XYZval &rs) { LINEAR_AXIS_CODE(x -= rs.x, y -= rs.y, z -= rs.z, i -= rs.i, j -= rs.j, k -= rs.k); return *this; } + FI XYZEval& operator*=(const XYZval &rs) { LINEAR_AXIS_CODE(x *= rs.x, y *= rs.y, z *= rs.z, i *= rs.i, j *= rs.j, k *= rs.k); return *this; } + FI XYZEval& operator/=(const XYZval &rs) { LINEAR_AXIS_CODE(x /= rs.x, y /= rs.y, z /= rs.z, i /= rs.i, j /= rs.j, k /= rs.k); return *this; } + FI XYZEval& operator+=(const XYZEval &rs) { LOGICAL_AXIS_CODE(e += rs.e, x += rs.x, y += rs.y, z += rs.z, i += rs.i, j += rs.j, k += rs.k); return *this; } + FI XYZEval& operator-=(const XYZEval &rs) { LOGICAL_AXIS_CODE(e -= rs.e, x -= rs.x, y -= rs.y, z -= rs.z, i -= rs.i, j -= rs.j, k -= rs.k); return *this; } + FI XYZEval& operator*=(const XYZEval &rs) { LOGICAL_AXIS_CODE(e *= rs.e, x *= rs.x, y *= rs.y, z *= rs.z, i *= rs.i, j *= rs.j, k *= rs.k); return *this; } + FI XYZEval& operator/=(const XYZEval &rs) { LOGICAL_AXIS_CODE(e /= rs.e, x /= rs.x, y /= rs.y, z /= rs.z, i /= rs.i, j /= rs.j, k /= rs.k); return *this; } + FI XYZEval& operator*=(const T &v) { LOGICAL_AXIS_CODE(e *= v, x *= v, y *= v, z *= v, i *= v, j *= v, k *= v); return *this; } + FI XYZEval& operator>>=(const int &v) { LOGICAL_AXIS_CODE(_RS(e), _RS(x), _RS(y), _RS(z), _RS(i), _RS(j), _RS(k)); return *this; } + FI XYZEval& operator<<=(const int &v) { LOGICAL_AXIS_CODE(_LS(e), _LS(x), _LS(y), _LS(z), _LS(i), _LS(j), _LS(k)); return *this; } + + // Exact comparisons. For floats a "NEAR" operation may be better. + FI bool operator==(const XYZval &rs) { return true LINEAR_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k); } + FI bool operator==(const XYZval &rs) const { return true LINEAR_AXIS_GANG(&& x == rs.x, && y == rs.y, && z == rs.z, && i == rs.i, && j == rs.j, && k == rs.k); } + FI bool operator!=(const XYZval &rs) { return !operator==(rs); } + FI bool operator!=(const XYZval &rs) const { return !operator==(rs); } }; #undef _RECIP @@ -498,6 +672,3 @@ struct XYZEval { #undef _LS #undef _RS #undef FI - -const xyze_char_t axis_codes { 'X', 'Y', 'Z', 'E' }; -#define XYZ_CHAR(A) ((char)('X' + A)) diff --git a/Marlin/src/core/utility.cpp b/Marlin/src/core/utility.cpp index f99956816778..8aeec89f020b 100644 --- a/Marlin/src/core/utility.cpp +++ b/Marlin/src/core/utility.cpp @@ -79,9 +79,9 @@ void safe_delay(millis_t ms) { #if HAS_BED_PROBE #if !HAS_PROBE_XY_OFFSET - SERIAL_ECHOPAIR("Probe Offset X0 Y0 Z", probe.offset.z, " ("); + SERIAL_ECHOPGM("Probe Offset X0 Y0 Z", probe.offset.z, " ("); #else - SERIAL_ECHOPAIR_P(PSTR("Probe Offset X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR, probe.offset.z); + SERIAL_ECHOPGM_P(PSTR("Probe Offset X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR, probe.offset.z); if (probe.offset_xy.x > 0) SERIAL_ECHOPGM(" (Right"); else if (probe.offset_xy.x < 0) @@ -92,9 +92,9 @@ void safe_delay(millis_t ms) { SERIAL_ECHOPGM(" (Aligned With"); if (probe.offset_xy.y > 0) - serialprintPGM(ENABLED(IS_SCARA) ? PSTR("-Distal") : PSTR("-Back")); + SERIAL_ECHOPGM_P(ENABLED(IS_SCARA) ? PSTR("-Distal") : PSTR("-Back")); else if (probe.offset_xy.y < 0) - serialprintPGM(ENABLED(IS_SCARA) ? PSTR("-Proximal") : PSTR("-Front")); + SERIAL_ECHOPGM_P(ENABLED(IS_SCARA) ? PSTR("-Proximal") : PSTR("-Front")); else if (probe.offset_xy.x != 0) SERIAL_ECHOPGM("-Center"); @@ -102,7 +102,7 @@ void safe_delay(millis_t ms) { #endif - serialprintPGM(probe.offset.z < 0 ? PSTR("Below") : probe.offset.z > 0 ? PSTR("Above") : PSTR("Same Z as")); + SERIAL_ECHOPGM_P(probe.offset.z < 0 ? PSTR("Below") : probe.offset.z > 0 ? PSTR("Above") : PSTR("Same Z as")); SERIAL_ECHOLNPGM(" Nozzle)"); #endif @@ -119,13 +119,13 @@ void safe_delay(millis_t ms) { SERIAL_ECHOLNPGM(" (enabled)"); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) if (planner.z_fade_height) - SERIAL_ECHOLNPAIR("Z Fade: ", planner.z_fade_height); + SERIAL_ECHOLNPGM("Z Fade: ", planner.z_fade_height); #endif #if ABL_PLANAR - SERIAL_ECHOPGM("ABL Adjustment X"); - LOOP_XYZ(a) { + SERIAL_ECHOPGM("ABL Adjustment"); + LOOP_LINEAR_AXES(a) { const float v = planner.get_axis_position_mm(AxisEnum(a)) - current_position[a]; - SERIAL_CHAR(' ', XYZ_CHAR(a)); + SERIAL_CHAR(' ', AXIS_CHAR(a)); if (v > 0) SERIAL_CHAR('+'); SERIAL_DECIMAL(v); } @@ -140,7 +140,7 @@ void safe_delay(millis_t ms) { SERIAL_ECHO(ftostr43sign(rz, '+')); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) if (planner.z_fade_height) { - SERIAL_ECHOPAIR(" (", ftostr43sign(rz * planner.fade_scaling_factor_for_z(current_position.z), '+')); + SERIAL_ECHOPGM(" (", ftostr43sign(rz * planner.fade_scaling_factor_for_z(current_position.z), '+')); SERIAL_CHAR(')'); } #endif @@ -156,10 +156,10 @@ void safe_delay(millis_t ms) { SERIAL_ECHOPGM("Mesh Bed Leveling"); if (planner.leveling_active) { SERIAL_ECHOLNPGM(" (enabled)"); - SERIAL_ECHOPAIR("MBL Adjustment Z", ftostr43sign(mbl.get_z(current_position), '+')); + SERIAL_ECHOPGM("MBL Adjustment Z", ftostr43sign(mbl.get_z(current_position), '+')); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) if (planner.z_fade_height) { - SERIAL_ECHOPAIR(" (", ftostr43sign( + SERIAL_ECHOPGM(" (", ftostr43sign( mbl.get_z(current_position, planner.fade_scaling_factor_for_z(current_position.z)), '+' )); SERIAL_CHAR(')'); diff --git a/Marlin/src/core/utility.h b/Marlin/src/core/utility.h index 645a4be80735..d248091ce575 100644 --- a/Marlin/src/core/utility.h +++ b/Marlin/src/core/utility.h @@ -25,8 +25,7 @@ #include "../core/types.h" #include "../core/millis_t.h" -// Delay that ensures heaters and watchdog are kept alive -void safe_delay(millis_t ms); +void safe_delay(millis_t ms); // Delay ensuring that temperatures are updated and the watchdog is kept alive. #if ENABLED(SERIAL_OVERRUN_PROTECTION) void serial_delay(const millis_t ms); @@ -34,7 +33,7 @@ void safe_delay(millis_t ms); inline void serial_delay(const millis_t) {} #endif -#if GRID_MAX_POINTS_X && GRID_MAX_POINTS_Y +#if (GRID_MAX_POINTS_X) && (GRID_MAX_POINTS_Y) // 16x16 bit arrays template @@ -77,3 +76,11 @@ class restorer { // Converts from an uint8_t in the range of 0-255 to an uint8_t // in the range 0-100 while avoiding rounding artifacts constexpr uint8_t ui8_to_percent(const uint8_t i) { return (int(i) * 100 + 127) / 255; } + +const xyze_char_t axis_codes LOGICAL_AXIS_ARRAY('E', 'X', 'Y', 'Z', AXIS4_NAME, AXIS5_NAME, AXIS6_NAME); + +#if LINEAR_AXES <= XYZ + #define AXIS_CHAR(A) ((char)('X' + A)) +#else + #define AXIS_CHAR(A) axis_codes[A] +#endif diff --git a/Marlin/src/feature/ammeter.cpp b/Marlin/src/feature/ammeter.cpp new file mode 100644 index 000000000000..71b84f1121a0 --- /dev/null +++ b/Marlin/src/feature/ammeter.cpp @@ -0,0 +1,54 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../inc/MarlinConfig.h" + +#if ENABLED(I2C_AMMETER) + +#include "ammeter.h" + +#ifndef I2C_AMMETER_IMAX + #define I2C_AMMETER_IMAX 0.500 // Calibration range 500 Milliamps +#endif + +INA226 ina; + +Ammeter ammeter; + +float Ammeter::scale; +float Ammeter::current; + +void Ammeter::init() { + ina.begin(); + ina.configure(INA226_AVERAGES_16, INA226_BUS_CONV_TIME_1100US, INA226_SHUNT_CONV_TIME_1100US, INA226_MODE_SHUNT_BUS_CONT); + ina.calibrate(I2C_AMMETER_SHUNT_RESISTOR, I2C_AMMETER_IMAX); +} + +float Ammeter::read() { + scale = 1; + current = ina.readShuntCurrent(); + if (current <= 0.0001f) current = 0; // Clean up least-significant-bit amplification errors + if (current < 0.1f) scale = 1000; + return current * scale; +} + +#endif // I2C_AMMETER diff --git a/Marlin/src/feature/ammeter.h b/Marlin/src/feature/ammeter.h new file mode 100644 index 000000000000..86f09bb9a197 --- /dev/null +++ b/Marlin/src/feature/ammeter.h @@ -0,0 +1,39 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../inc/MarlinConfigPre.h" + +#include +#include + +class Ammeter { +private: + static float scale; + +public: + static float current; + static void init(); + static float read(); +}; + +extern Ammeter ammeter; diff --git a/Marlin/src/feature/babystep.cpp b/Marlin/src/feature/babystep.cpp index b07688146110..54ad9588f445 100644 --- a/Marlin/src/feature/babystep.cpp +++ b/Marlin/src/feature/babystep.cpp @@ -50,7 +50,7 @@ void Babystep::step_axis(const AxisEnum axis) { } } -void Babystep::add_mm(const AxisEnum axis, const float &mm) { +void Babystep::add_mm(const AxisEnum axis, const_float_t mm) { add_steps(axis, mm * planner.settings.axis_steps_per_mm[axis]); } diff --git a/Marlin/src/feature/babystep.h b/Marlin/src/feature/babystep.h index f85e5909cad4..f8037678ca16 100644 --- a/Marlin/src/feature/babystep.h +++ b/Marlin/src/feature/babystep.h @@ -61,7 +61,7 @@ class Babystep { #endif static void add_steps(const AxisEnum axis, const int16_t distance); - static void add_mm(const AxisEnum axis, const float &mm); + static void add_mm(const AxisEnum axis, const_float_t mm); static inline bool has_steps() { return steps[BS_AXIS_IND(X_AXIS)] || steps[BS_AXIS_IND(Y_AXIS)] || steps[BS_AXIS_IND(Z_AXIS)]; diff --git a/Marlin/src/feature/backlash.cpp b/Marlin/src/feature/backlash.cpp index b848214f0c46..b646e19f15ab 100644 --- a/Marlin/src/feature/backlash.cpp +++ b/Marlin/src/feature/backlash.cpp @@ -60,13 +60,27 @@ Backlash backlash; * spread over multiple segments, smoothing out artifacts even more. */ -void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const uint8_t dm, block_t * const block) { - static uint8_t last_direction_bits; - uint8_t changed_dir = last_direction_bits ^ dm; - // Ignore direction change if no steps are taken in that direction - if (da == 0) CBI(changed_dir, X_AXIS); - if (db == 0) CBI(changed_dir, Y_AXIS); - if (dc == 0) CBI(changed_dir, Z_AXIS); +void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const axis_bits_t dm, block_t * const block) { + static axis_bits_t last_direction_bits; + axis_bits_t changed_dir = last_direction_bits ^ dm; + // Ignore direction change unless steps are taken in that direction + #if DISABLED(CORE_BACKLASH) || ENABLED(MARKFORGED_XY) + if (!da) CBI(changed_dir, X_AXIS); + if (!db) CBI(changed_dir, Y_AXIS); + if (!dc) CBI(changed_dir, Z_AXIS); + #elif CORE_IS_XY + if (!(da + db)) CBI(changed_dir, X_AXIS); + if (!(da - db)) CBI(changed_dir, Y_AXIS); + if (!dc) CBI(changed_dir, Z_AXIS); + #elif CORE_IS_XZ + if (!(da + dc)) CBI(changed_dir, X_AXIS); + if (!(da - dc)) CBI(changed_dir, Z_AXIS); + if (!db) CBI(changed_dir, Y_AXIS); + #elif CORE_IS_YZ + if (!(db + dc)) CBI(changed_dir, Y_AXIS); + if (!(db - dc)) CBI(changed_dir, Z_AXIS); + if (!da) CBI(changed_dir, X_AXIS); + #endif last_direction_bits ^= changed_dir; if (correction == 0) return; @@ -90,7 +104,7 @@ void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const const float f_corr = float(correction) / 255.0f; - LOOP_XYZ(axis) { + LOOP_LINEAR_AXES(axis) { if (distance_mm[axis]) { const bool reversing = TEST(dm,axis); @@ -105,18 +119,35 @@ void Backlash::add_correction_steps(const int32_t &da, const int32_t &db, const // Take up a portion of the residual_error in this segment, but only when // the current segment travels in the same direction as the correction if (reversing == (error_correction < 0)) { - if (segment_proportion == 0) - segment_proportion = _MIN(1.0f, block->millimeters / smoothing_mm); + if (segment_proportion == 0) segment_proportion = _MIN(1.0f, block->millimeters / smoothing_mm); error_correction = CEIL(segment_proportion * error_correction); } else error_correction = 0; // Don't take up any backlash in this segment, as it would subtract steps } #endif - // Making a correction reduces the residual error and adds block steps + + // This correction reduces the residual error and adds block steps if (error_correction) { block->steps[axis] += ABS(error_correction); - residual_error[axis] -= error_correction; + #if ENABLED(CORE_BACKLASH) + switch (axis) { + case CORE_AXIS_1: + //block->steps[CORE_AXIS_2] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_2]; + //SERIAL_ECHOLNPGM("CORE_AXIS_1 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis], + // " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction); + break; + case CORE_AXIS_2: + //block->steps[CORE_AXIS_1] += influence_distance_mm[axis] * planner.settings.axis_steps_per_mm[CORE_AXIS_1];; + //SERIAL_ECHOLNPGM("CORE_AXIS_2 dir change. distance=", distance_mm[axis], " r.err=", residual_error[axis], + // " da=", da, " db=", db, " block->steps[axis]=", block->steps[axis], " err_corr=", error_correction); + break; + case NORMAL_AXIS: break; + } + residual_error[axis] = 0; // No residual_error needed for next CORE block, I think... + #else + residual_error[axis] -= error_correction; + #endif } } } diff --git a/Marlin/src/feature/backlash.h b/Marlin/src/feature/backlash.h index 49857f1f99d0..4d4e2940382c 100644 --- a/Marlin/src/feature/backlash.h +++ b/Marlin/src/feature/backlash.h @@ -35,7 +35,7 @@ class Backlash { static float smoothing_mm; #endif - static inline void set_correction(const float &v) { correction = _MAX(0, _MIN(1.0, v)) * all_on; } + static inline void set_correction(const_float_t v) { correction = _MAX(0, _MIN(1.0, v)) * all_on; } static inline float get_correction() { return float(ui8_to_percent(correction)) / 100.0f; } #else static constexpr uint8_t correction = (BACKLASH_CORRECTION) * 0xFF; @@ -71,7 +71,7 @@ class Backlash { return has_measurement(X_AXIS) || has_measurement(Y_AXIS) || has_measurement(Z_AXIS); } - void add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const uint8_t dm, block_t * const block); + void add_correction_steps(const int32_t &da, const int32_t &db, const int32_t &dc, const axis_bits_t dm, block_t * const block); }; extern Backlash backlash; diff --git a/Marlin/src/feature/bedlevel/abl/abl.cpp b/Marlin/src/feature/bedlevel/abl/abl.cpp index 3fb0cfc3583e..ece748198195 100644 --- a/Marlin/src/feature/bedlevel/abl/abl.cpp +++ b/Marlin/src/feature/bedlevel/abl/abl.cpp @@ -47,11 +47,11 @@ static void extrapolate_one_point(const uint8_t x, const uint8_t y, const int8_t if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM("Extrapolate ["); if (x < 10) DEBUG_CHAR(' '); - DEBUG_ECHO((int)x); + DEBUG_ECHO(x); DEBUG_CHAR(xdir ? (xdir > 0 ? '+' : '-') : ' '); DEBUG_CHAR(' '); if (y < 10) DEBUG_CHAR(' '); - DEBUG_ECHO((int)y); + DEBUG_ECHO(y); DEBUG_CHAR(ydir ? (ydir > 0 ? '+' : '-') : ' '); DEBUG_ECHOLNPGM("]"); } @@ -85,9 +85,9 @@ static void extrapolate_one_point(const uint8_t x, const uint8_t y, const int8_t //#define EXTRAPOLATE_FROM_EDGE #if ENABLED(EXTRAPOLATE_FROM_EDGE) - #if GRID_MAX_POINTS_X < GRID_MAX_POINTS_Y + #if (GRID_MAX_POINTS_X) < (GRID_MAX_POINTS_Y) #define HALF_IN_X - #elif GRID_MAX_POINTS_Y < GRID_MAX_POINTS_X + #elif (GRID_MAX_POINTS_Y) < (GRID_MAX_POINTS_X) #define HALF_IN_Y #endif #endif @@ -98,23 +98,23 @@ static void extrapolate_one_point(const uint8_t x, const uint8_t y, const int8_t */ void extrapolate_unprobed_bed_level() { #ifdef HALF_IN_X - constexpr uint8_t ctrx2 = 0, xlen = GRID_MAX_POINTS_X - 1; + constexpr uint8_t ctrx2 = 0, xend = GRID_MAX_POINTS_X - 1; #else - constexpr uint8_t ctrx1 = (GRID_MAX_POINTS_X - 1) / 2, // left-of-center - ctrx2 = (GRID_MAX_POINTS_X) / 2, // right-of-center - xlen = ctrx1; + constexpr uint8_t ctrx1 = (GRID_MAX_CELLS_X) / 2, // left-of-center + ctrx2 = (GRID_MAX_POINTS_X) / 2, // right-of-center + xend = ctrx1; #endif #ifdef HALF_IN_Y - constexpr uint8_t ctry2 = 0, ylen = GRID_MAX_POINTS_Y - 1; + constexpr uint8_t ctry2 = 0, yend = GRID_MAX_POINTS_Y - 1; #else - constexpr uint8_t ctry1 = (GRID_MAX_POINTS_Y - 1) / 2, // top-of-center - ctry2 = (GRID_MAX_POINTS_Y) / 2, // bottom-of-center - ylen = ctry1; + constexpr uint8_t ctry1 = (GRID_MAX_CELLS_Y) / 2, // top-of-center + ctry2 = (GRID_MAX_POINTS_Y) / 2, // bottom-of-center + yend = ctry1; #endif - LOOP_LE_N(xo, xlen) - LOOP_LE_N(yo, ylen) { + LOOP_LE_N(xo, xend) + LOOP_LE_N(yo, yend) { uint8_t x2 = ctrx2 + xo, y2 = ctry2 + yo; #ifndef HALF_IN_X const uint8_t x1 = ctrx1 - xo; @@ -143,8 +143,8 @@ void print_bilinear_leveling_grid() { #if ENABLED(ABL_BILINEAR_SUBDIVISION) - #define ABL_GRID_POINTS_VIRT_X (GRID_MAX_POINTS_X - 1) * (BILINEAR_SUBDIVISIONS) + 1 - #define ABL_GRID_POINTS_VIRT_Y (GRID_MAX_POINTS_Y - 1) * (BILINEAR_SUBDIVISIONS) + 1 + #define ABL_GRID_POINTS_VIRT_X GRID_MAX_CELLS_X * (BILINEAR_SUBDIVISIONS) + 1 + #define ABL_GRID_POINTS_VIRT_Y GRID_MAX_CELLS_Y * (BILINEAR_SUBDIVISIONS) + 1 #define ABL_TEMP_POINTS_X (GRID_MAX_POINTS_X + 2) #define ABL_TEMP_POINTS_Y (GRID_MAX_POINTS_Y + 2) float z_values_virt[ABL_GRID_POINTS_VIRT_X][ABL_GRID_POINTS_VIRT_Y]; @@ -161,7 +161,7 @@ void print_bilinear_leveling_grid() { #define LINEAR_EXTRAPOLATION(E, I) ((E) * 2 - (I)) float bed_level_virt_coord(const uint8_t x, const uint8_t y) { uint8_t ep = 0, ip = 1; - if (x > GRID_MAX_POINTS_X + 1 || y > GRID_MAX_POINTS_Y + 1) { + if (x > (GRID_MAX_POINTS_X) + 1 || y > (GRID_MAX_POINTS_Y) + 1) { // The requested point requires extrapolating two points beyond the mesh. // These values are only requested for the edges of the mesh, which are always an actual mesh point, // and do not require interpolation. When interpolation is not needed, this "Mesh + 2" point is @@ -171,8 +171,8 @@ void print_bilinear_leveling_grid() { } if (!x || x == ABL_TEMP_POINTS_X - 1) { if (x) { - ep = GRID_MAX_POINTS_X - 1; - ip = GRID_MAX_POINTS_X - 2; + ep = (GRID_MAX_POINTS_X) - 1; + ip = GRID_MAX_CELLS_X - 1; } if (WITHIN(y, 1, ABL_TEMP_POINTS_Y - 2)) return LINEAR_EXTRAPOLATION( @@ -187,8 +187,8 @@ void print_bilinear_leveling_grid() { } if (!y || y == ABL_TEMP_POINTS_Y - 1) { if (y) { - ep = GRID_MAX_POINTS_Y - 1; - ip = GRID_MAX_POINTS_Y - 2; + ep = (GRID_MAX_POINTS_Y) - 1; + ip = GRID_MAX_CELLS_Y - 1; } if (WITHIN(x, 1, ABL_TEMP_POINTS_X - 2)) return LINEAR_EXTRAPOLATION( @@ -213,7 +213,7 @@ void print_bilinear_leveling_grid() { ) * 0.5f; } - static float bed_level_virt_2cmr(const uint8_t x, const uint8_t y, const float &tx, const float &ty) { + static float bed_level_virt_2cmr(const uint8_t x, const uint8_t y, const_float_t tx, const_float_t ty) { float row[4], column[4]; LOOP_L_N(i, 4) { LOOP_L_N(j, 4) { @@ -336,11 +336,11 @@ float bilinear_z_offset(const xy_pos_t &raw) { /* static float last_offset = 0; if (ABS(last_offset - offset) > 0.2) { - SERIAL_ECHOLNPAIR("Sudden Shift at x=", rel.x, " / ", bilinear_grid_spacing.x, " -> thisg.x=", thisg.x); - SERIAL_ECHOLNPAIR(" y=", rel.y, " / ", bilinear_grid_spacing.y, " -> thisg.y=", thisg.y); - SERIAL_ECHOLNPAIR(" ratio.x=", ratio.x, " ratio.y=", ratio.y); - SERIAL_ECHOLNPAIR(" z1=", z1, " z2=", z2, " z3=", z3, " z4=", z4); - SERIAL_ECHOLNPAIR(" L=", L, " R=", R, " offset=", offset); + SERIAL_ECHOLNPGM("Sudden Shift at x=", rel.x, " / ", bilinear_grid_spacing.x, " -> thisg.x=", thisg.x); + SERIAL_ECHOLNPGM(" y=", rel.y, " / ", bilinear_grid_spacing.y, " -> thisg.y=", thisg.y); + SERIAL_ECHOLNPGM(" ratio.x=", ratio.x, " ratio.y=", ratio.y); + SERIAL_ECHOLNPGM(" z1=", z1, " z2=", z2, " z3=", z3, " z4=", z4); + SERIAL_ECHOLNPGM(" L=", L, " R=", R, " offset=", offset); } last_offset = offset; //*/ @@ -356,7 +356,7 @@ float bilinear_z_offset(const xy_pos_t &raw) { * Prepare a bilinear-leveled linear move on Cartesian, * splitting the move where it crosses grid borders. */ - void bilinear_line_to_destination(const feedRate_t &scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) { + void bilinear_line_to_destination(const_feedRate_t scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) { // Get current and destination cells for this line xy_int_t c1 { CELL_INDEX(x, current_position.x), CELL_INDEX(y, current_position.y) }, c2 { CELL_INDEX(x, destination.x), CELL_INDEX(y, destination.y) }; diff --git a/Marlin/src/feature/bedlevel/abl/abl.h b/Marlin/src/feature/bedlevel/abl/abl.h index bbe2411dc346..3d54c55695e8 100644 --- a/Marlin/src/feature/bedlevel/abl/abl.h +++ b/Marlin/src/feature/bedlevel/abl/abl.h @@ -37,7 +37,7 @@ void refresh_bed_level(); #endif #if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES) - void bilinear_line_to_destination(const feedRate_t &scaled_fr_mm_s, uint16_t x_splits=0xFFFF, uint16_t y_splits=0xFFFF); + void bilinear_line_to_destination(const_feedRate_t scaled_fr_mm_s, uint16_t x_splits=0xFFFF, uint16_t y_splits=0xFFFF); #endif #define _GET_MESH_X(I) float(bilinear_start.x + (I) * bilinear_grid_spacing.x) diff --git a/Marlin/src/feature/bedlevel/bedlevel.cpp b/Marlin/src/feature/bedlevel/bedlevel.cpp index 0e0b87e8905b..8e03632de44d 100644 --- a/Marlin/src/feature/bedlevel/bedlevel.cpp +++ b/Marlin/src/feature/bedlevel/bedlevel.cpp @@ -98,7 +98,7 @@ TemporaryBedLevelingState::TemporaryBedLevelingState(const bool enable) : saved( #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - void set_z_fade_height(const float zfh, const bool do_report/*=true*/) { + void set_z_fade_height(const_float_t zfh, const bool do_report/*=true*/) { if (planner.z_fade_height == zfh) return; @@ -160,7 +160,7 @@ void reset_bed_level() { #ifndef SCAD_MESH_OUTPUT LOOP_L_N(x, sx) { serial_spaces(precision + (x < 10 ? 3 : 2)); - SERIAL_ECHO(int(x)); + SERIAL_ECHO(x); } SERIAL_EOL(); #endif @@ -172,7 +172,7 @@ void reset_bed_level() { SERIAL_ECHOPGM(" ["); // open sub-array #else if (y < 10) SERIAL_CHAR(' '); - SERIAL_ECHO(int(y)); + SERIAL_ECHO(y); #endif LOOP_L_N(x, sx) { SERIAL_CHAR(' '); @@ -196,7 +196,7 @@ void reset_bed_level() { #endif } #ifdef SCAD_MESH_OUTPUT - SERIAL_CHAR(' ', ']'); // close sub-array + SERIAL_ECHOPGM(" ]"); // close sub-array if (y < sy - 1) SERIAL_CHAR(','); #endif SERIAL_EOL(); @@ -213,27 +213,27 @@ void reset_bed_level() { void _manual_goto_xy(const xy_pos_t &pos) { + // Get the resting Z position for after the XY move #ifdef MANUAL_PROBE_START_Z - constexpr float startz = _MAX(0, MANUAL_PROBE_START_Z); - #if MANUAL_PROBE_HEIGHT > 0 - do_blocking_move_to_xy_z(pos, MANUAL_PROBE_HEIGHT); - do_blocking_move_to_z(startz); - #else - do_blocking_move_to_xy_z(pos, startz); - #endif - #elif MANUAL_PROBE_HEIGHT > 0 - const float prev_z = current_position.z; - do_blocking_move_to_xy_z(pos, MANUAL_PROBE_HEIGHT); - do_blocking_move_to_z(prev_z); + constexpr float finalz = _MAX(0, MANUAL_PROBE_START_Z); // If a MANUAL_PROBE_START_Z value is set, always respect it #else - do_blocking_move_to_xy(pos); + #warning "It's recommended to set some MANUAL_PROBE_START_Z value for manual leveling." + #endif + #if Z_CLEARANCE_BETWEEN_MANUAL_PROBES > 0 // A probe/obstacle clearance exists so there is a raise: + #ifndef MANUAL_PROBE_START_Z + const float finalz = current_position.z; // - Use the current Z for starting-Z if no MANUAL_PROBE_START_Z was provided + #endif + do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_MANUAL_PROBES); // - Raise Z, then move to the new XY + do_blocking_move_to_z(finalz); // - Lower down to the starting Z height, ready for adjustment! + #elif defined(MANUAL_PROBE_START_Z) // A starting-Z was provided, but there's no raise: + do_blocking_move_to_xy_z(pos, finalz); // - Move in XY then down to the starting Z height, ready for adjustment! + #else // Zero raise and no starting Z height either: + do_blocking_move_to_xy(pos); // - Move over with no raise, ready for adjustment! #endif - - current_position = pos; TERN_(LCD_BED_LEVELING, ui.wait_for_move = false); } -#endif +#endif // MESH_BED_LEVELING || PROBE_MANUALLY #endif // HAS_LEVELING diff --git a/Marlin/src/feature/bedlevel/bedlevel.h b/Marlin/src/feature/bedlevel/bedlevel.h index a33f08ad0ee1..63f032eee87b 100644 --- a/Marlin/src/feature/bedlevel/bedlevel.h +++ b/Marlin/src/feature/bedlevel/bedlevel.h @@ -24,7 +24,7 @@ #include "../../inc/MarlinConfigPre.h" #if EITHER(RESTORE_LEVELING_AFTER_G28, ENABLE_LEVELING_AFTER_G28) - #define G28_L0_ENSURES_LEVELING_OFF 1 + #define CAN_SET_LEVELING_AFTER_G28 1 #endif #if ENABLED(PROBE_MANUALLY) @@ -38,7 +38,7 @@ void set_bed_leveling_enabled(const bool enable=true); void reset_bed_level(); #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - void set_z_fade_height(const float zfh, const bool do_report=true); + void set_z_fade_height(const_float_t zfh, const bool do_report=true); #endif #if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY) diff --git a/Marlin/src/feature/bedlevel/hilbert_curve.cpp b/Marlin/src/feature/bedlevel/hilbert_curve.cpp new file mode 100644 index 000000000000..7474123e3fe1 --- /dev/null +++ b/Marlin/src/feature/bedlevel/hilbert_curve.cpp @@ -0,0 +1,110 @@ +/********************* + * hilbert_curve.cpp * + *********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2021 - SynDaver Labs, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../../inc/MarlinConfig.h" + +#if ENABLED(UBL_HILBERT_CURVE) + +#include "bedlevel.h" +#include "hilbert_curve.h" + +constexpr int8_t to_fix(int8_t v) { return v * 2; } +constexpr int8_t to_int(int8_t v) { return v / 2; } +constexpr uint8_t log2(uint8_t n) { return (n > 1) ? 1 + log2(n >> 1) : 0; } +constexpr uint8_t order(uint8_t n) { return uint8_t(log2(n - 1)) + 1; } +constexpr uint8_t ord = order(_MAX(GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y)); +constexpr uint8_t dim = _BV(ord); + +static inline bool eval_candidate(int8_t x, int8_t y, hilbert_curve::callback_ptr func, void *data) { + // The print bed likely has fewer points than the full Hilbert + // curve, so cull unnecessary points + return x < (GRID_MAX_POINTS_X) && y < (GRID_MAX_POINTS_Y) ? func(x, y, data) : false; +} + +bool hilbert_curve::hilbert(int8_t x, int8_t y, int8_t xi, int8_t xj, int8_t yi, int8_t yj, uint8_t n, hilbert_curve::callback_ptr func, void *data) { + /** + * Hilbert space-filling curve implementation + * + * x and y : coordinates of the bottom left corner + * xi and xj : i and j components of the unit x vector of the frame + * yi and yj : i and j components of the unit y vector of the frame + * + * From: http://www.fundza.com/algorithmic/space_filling/hilbert/basics/index.html + */ + if (n) + return hilbert(x, y, yi/2, yj/2, xi/2, xj/2, n-1, func, data) || + hilbert(x+xi/2, y+xj/2, xi/2, xj/2, yi/2, yj/2, n-1, func, data) || + hilbert(x+xi/2+yi/2, y+xj/2+yj/2, xi/2, xj/2, yi/2, yj/2, n-1, func, data) || + hilbert(x+xi/2+yi, y+xj/2+yj, -yi/2, -yj/2, -xi/2, -xj/2, n-1, func, data); + else + return eval_candidate(to_int(x+(xi+yi)/2), to_int(y+(xj+yj)/2), func, data); +} + +/** + * Calls func(x, y, data) for all points in the Hilbert curve. + * If that function returns true, the search is terminated. + */ +bool hilbert_curve::search(hilbert_curve::callback_ptr func, void *data) { + return hilbert(to_fix(0), to_fix(0),to_fix(dim), to_fix(0), to_fix(0), to_fix(dim), ord, func, data); +} + +/* Helper function for starting the search at a particular point */ + +typedef struct { + uint8_t x, y; + bool found_1st; + hilbert_curve::callback_ptr func; + void *data; +} search_from_t; + +static bool search_from_helper(uint8_t x, uint8_t y, void *data) { + search_from_t *d = (search_from_t *) data; + if (d->x == x && d->y == y) + d->found_1st = true; + return d->found_1st ? d->func(x, y, d->data) : false; +} + +/** + * Same as search, except start at a specific grid intersection point. + */ +bool hilbert_curve::search_from(uint8_t x, uint8_t y, hilbert_curve::callback_ptr func, void *data) { + search_from_t d; + d.x = x; + d.y = y; + d.found_1st = false; + d.func = func; + d.data = data; + // Call twice to allow search to wrap back to the beginning and picked up points prior to the start. + return search(search_from_helper, &d) || search(search_from_helper, &d); +} + +/** + * Like search_from, but takes a bed position and starts from the nearest + * point on the Hilbert curve. + */ +bool hilbert_curve::search_from_closest(const xy_pos_t &pos, hilbert_curve::callback_ptr func, void *data) { + // Find closest grid intersection + const uint8_t grid_x = LROUND(constrain(float(pos.x - (MESH_MIN_X)) / (MESH_X_DIST), 0, (GRID_MAX_POINTS_X) - 1)); + const uint8_t grid_y = LROUND(constrain(float(pos.y - (MESH_MIN_Y)) / (MESH_Y_DIST), 0, (GRID_MAX_POINTS_Y) - 1)); + return search_from(grid_x, grid_y, func, data); +} + +#endif // UBL_HILBERT_CURVE diff --git a/Marlin/src/feature/bedlevel/hilbert_curve.h b/Marlin/src/feature/bedlevel/hilbert_curve.h new file mode 100644 index 000000000000..a5dce8a22d60 --- /dev/null +++ b/Marlin/src/feature/bedlevel/hilbert_curve.h @@ -0,0 +1,32 @@ +/******************* + * hilbert_curve.h * + *******************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2021 - SynDaver Labs, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +class hilbert_curve { + public: + typedef bool (*callback_ptr)(uint8_t x, uint8_t y, void *data); + static bool search(callback_ptr func, void *data); + static bool search_from(uint8_t x, uint8_t y, callback_ptr func, void *data); + static bool search_from_closest(const xy_pos_t &pos, callback_ptr func, void *data); + private: + static bool hilbert(int8_t x, int8_t y, int8_t xi, int8_t xj, int8_t yi, int8_t yj, uint8_t n, callback_ptr func, void *data); +}; diff --git a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp index ec5b95c108b8..51cf28f89005 100644 --- a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp +++ b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.cpp @@ -61,13 +61,13 @@ * Prepare a mesh-leveled linear move in a Cartesian setup, * splitting the move where it crosses mesh borders. */ - void mesh_bed_leveling::line_to_destination(const feedRate_t &scaled_fr_mm_s, uint8_t x_splits, uint8_t y_splits) { + void mesh_bed_leveling::line_to_destination(const_feedRate_t scaled_fr_mm_s, uint8_t x_splits, uint8_t y_splits) { // Get current and destination cells for this line xy_int8_t scel = cell_indexes(current_position), ecel = cell_indexes(destination); - NOMORE(scel.x, GRID_MAX_POINTS_X - 2); - NOMORE(scel.y, GRID_MAX_POINTS_Y - 2); - NOMORE(ecel.x, GRID_MAX_POINTS_X - 2); - NOMORE(ecel.y, GRID_MAX_POINTS_Y - 2); + NOMORE(scel.x, GRID_MAX_CELLS_X - 1); + NOMORE(scel.y, GRID_MAX_CELLS_Y - 1); + NOMORE(ecel.x, GRID_MAX_CELLS_X - 1); + NOMORE(ecel.y, GRID_MAX_CELLS_Y - 1); // Start and end in the same cell? No split needed. if (scel == ecel) { diff --git a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h index ade7a931401a..cc5469577189 100644 --- a/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h +++ b/Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h @@ -32,8 +32,8 @@ enum MeshLevelingState : char { MeshReset // G29 S5 }; -#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / float(GRID_MAX_POINTS_X - 1)) -#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / float(GRID_MAX_POINTS_Y - 1)) +#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / (GRID_MAX_CELLS_X)) +#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y)) #define _GET_MESH_X(I) mbl.index_to_xpos[I] #define _GET_MESH_Y(J) mbl.index_to_ypos[J] #define Z_VALUES_ARR mbl.z_values @@ -56,56 +56,54 @@ class mesh_bed_leveling { return false; } - static void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; } + static void set_z(const int8_t px, const int8_t py, const_float_t z) { z_values[px][py] = z; } static inline void zigzag(const int8_t index, int8_t &px, int8_t &py) { px = index % (GRID_MAX_POINTS_X); py = index / (GRID_MAX_POINTS_X); - if (py & 1) px = (GRID_MAX_POINTS_X - 1) - px; // Zig zag + if (py & 1) px = (GRID_MAX_POINTS_X) - 1 - px; // Zig zag } - static void set_zigzag_z(const int8_t index, const float &z) { + static void set_zigzag_z(const int8_t index, const_float_t z) { int8_t px, py; zigzag(index, px, py); set_z(px, py, z); } - static int8_t cell_index_x(const float &x) { + static int8_t cell_index_x(const_float_t x) { int8_t cx = (x - (MESH_MIN_X)) * RECIPROCAL(MESH_X_DIST); - return constrain(cx, 0, (GRID_MAX_POINTS_X) - 2); + return constrain(cx, 0, GRID_MAX_CELLS_X - 1); } - static int8_t cell_index_y(const float &y) { + static int8_t cell_index_y(const_float_t y) { int8_t cy = (y - (MESH_MIN_Y)) * RECIPROCAL(MESH_Y_DIST); - return constrain(cy, 0, (GRID_MAX_POINTS_Y) - 2); + return constrain(cy, 0, GRID_MAX_CELLS_Y - 1); } - static inline xy_int8_t cell_indexes(const float &x, const float &y) { + static inline xy_int8_t cell_indexes(const_float_t x, const_float_t y) { return { cell_index_x(x), cell_index_y(y) }; } static inline xy_int8_t cell_indexes(const xy_pos_t &xy) { return cell_indexes(xy.x, xy.y); } - static int8_t probe_index_x(const float &x) { + static int8_t probe_index_x(const_float_t x) { int8_t px = (x - (MESH_MIN_X) + 0.5f * (MESH_X_DIST)) * RECIPROCAL(MESH_X_DIST); - return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1; + return WITHIN(px, 0, (GRID_MAX_POINTS_X) - 1) ? px : -1; } - static int8_t probe_index_y(const float &y) { + static int8_t probe_index_y(const_float_t y) { int8_t py = (y - (MESH_MIN_Y) + 0.5f * (MESH_Y_DIST)) * RECIPROCAL(MESH_Y_DIST); - return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1; + return WITHIN(py, 0, (GRID_MAX_POINTS_Y) - 1) ? py : -1; } - static inline xy_int8_t probe_indexes(const float &x, const float &y) { + static inline xy_int8_t probe_indexes(const_float_t x, const_float_t y) { return { probe_index_x(x), probe_index_y(y) }; } static inline xy_int8_t probe_indexes(const xy_pos_t &xy) { return probe_indexes(xy.x, xy.y); } - static float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) { + static float calc_z0(const_float_t a0, const_float_t a1, const_float_t z1, const_float_t a2, const_float_t z2) { const float delta_z = (z2 - z1) / (a2 - a1), delta_a = a0 - a1; return z1 + delta_a * delta_z; } static float get_z(const xy_pos_t &pos - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - , const float &factor=1.0f - #endif + OPTARG(ENABLE_LEVELING_FADE_HEIGHT, const_float_t factor=1.0f) ) { #if DISABLED(ENABLE_LEVELING_FADE_HEIGHT) constexpr float factor = 1.0f; @@ -114,13 +112,14 @@ class mesh_bed_leveling { const float x1 = index_to_xpos[ind.x], x2 = index_to_xpos[ind.x+1], y1 = index_to_xpos[ind.y], y2 = index_to_xpos[ind.y+1], z1 = calc_z0(pos.x, x1, z_values[ind.x][ind.y ], x2, z_values[ind.x+1][ind.y ]), - z2 = calc_z0(pos.x, x1, z_values[ind.x][ind.y+1], x2, z_values[ind.x+1][ind.y+1]); + z2 = calc_z0(pos.x, x1, z_values[ind.x][ind.y+1], x2, z_values[ind.x+1][ind.y+1]), + zf = calc_z0(pos.y, y1, z1, y2, z2); - return z_offset + calc_z0(pos.y, y1, z1, y2, z2) * factor; + return z_offset + zf * factor; } #if IS_CARTESIAN && DISABLED(SEGMENT_LEVELED_MOVES) - static void line_to_destination(const feedRate_t &scaled_fr_mm_s, uint8_t x_splits=0xFF, uint8_t y_splits=0xFF); + static void line_to_destination(const_feedRate_t scaled_fr_mm_s, uint8_t x_splits=0xFF, uint8_t y_splits=0xFF); #endif }; diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index 513d9a912135..00cb5ed7382e 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -24,234 +24,279 @@ #if ENABLED(AUTO_BED_LEVELING_UBL) - #include "../bedlevel.h" +#include "../bedlevel.h" - unified_bed_leveling ubl; +unified_bed_leveling ubl; - #include "../../../MarlinCore.h" - #include "../../../gcode/gcode.h" +#include "../../../MarlinCore.h" +#include "../../../gcode/gcode.h" - #include "../../../module/settings.h" - #include "../../../module/planner.h" - #include "../../../module/motion.h" - #include "../../../module/probe.h" +#include "../../../module/settings.h" +#include "../../../module/planner.h" +#include "../../../module/motion.h" +#include "../../../module/probe.h" +#include "../../../module/temperature.h" - #if ENABLED(EXTENSIBLE_UI) - #include "../../../lcd/extui/ui_api.h" - #endif +#if ENABLED(EXTENSIBLE_UI) + #include "../../../lcd/extui/ui_api.h" +#endif - #include "math.h" +#include "math.h" - void unified_bed_leveling::echo_name() { SERIAL_ECHOPGM("Unified Bed Leveling"); } +void unified_bed_leveling::echo_name() { SERIAL_ECHOPGM("Unified Bed Leveling"); } - void unified_bed_leveling::report_current_mesh() { - if (!leveling_is_valid()) return; - SERIAL_ECHO_MSG(" G29 I999"); - GRID_LOOP(x, y) - if (!isnan(z_values[x][y])) { - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR(" M421 I", int(x), " J", int(y)); - SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z_values[x][y], 4); - serial_delay(75); // Prevent Printrun from exploding - } +void unified_bed_leveling::report_current_mesh() { + if (!leveling_is_valid()) return; + SERIAL_ECHO_MSG(" G29 I999"); + GRID_LOOP(x, y) + if (!isnan(z_values[x][y])) { + SERIAL_ECHO_START(); + SERIAL_ECHOPGM(" M421 I", x, " J", y); + SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z_values[x][y], 4); + serial_delay(75); // Prevent Printrun from exploding + } +} + +void unified_bed_leveling::report_state() { + echo_name(); + SERIAL_ECHO_TERNARY(planner.leveling_active, " System v" UBL_VERSION " ", "", "in", "active\n"); + serial_delay(50); +} + +int8_t unified_bed_leveling::storage_slot; + +float unified_bed_leveling::z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; + +#define _GRIDPOS(A,N) (MESH_MIN_##A + N * (MESH_##A##_DIST)) + +const float +unified_bed_leveling::_mesh_index_to_xpos[GRID_MAX_POINTS_X] PROGMEM = ARRAY_N(GRID_MAX_POINTS_X, + _GRIDPOS(X, 0), _GRIDPOS(X, 1), _GRIDPOS(X, 2), _GRIDPOS(X, 3), + _GRIDPOS(X, 4), _GRIDPOS(X, 5), _GRIDPOS(X, 6), _GRIDPOS(X, 7), + _GRIDPOS(X, 8), _GRIDPOS(X, 9), _GRIDPOS(X, 10), _GRIDPOS(X, 11), + _GRIDPOS(X, 12), _GRIDPOS(X, 13), _GRIDPOS(X, 14), _GRIDPOS(X, 15) +), +unified_bed_leveling::_mesh_index_to_ypos[GRID_MAX_POINTS_Y] PROGMEM = ARRAY_N(GRID_MAX_POINTS_Y, + _GRIDPOS(Y, 0), _GRIDPOS(Y, 1), _GRIDPOS(Y, 2), _GRIDPOS(Y, 3), + _GRIDPOS(Y, 4), _GRIDPOS(Y, 5), _GRIDPOS(Y, 6), _GRIDPOS(Y, 7), + _GRIDPOS(Y, 8), _GRIDPOS(Y, 9), _GRIDPOS(Y, 10), _GRIDPOS(Y, 11), + _GRIDPOS(Y, 12), _GRIDPOS(Y, 13), _GRIDPOS(Y, 14), _GRIDPOS(Y, 15) +); + +volatile int16_t unified_bed_leveling::encoder_diff; + +unified_bed_leveling::unified_bed_leveling() { reset(); } + +void unified_bed_leveling::reset() { + const bool was_enabled = planner.leveling_active; + set_bed_leveling_enabled(false); + storage_slot = -1; + ZERO(z_values); + #if ENABLED(EXTENSIBLE_UI) + GRID_LOOP(x, y) ExtUI::onMeshUpdate(x, y, 0); + #endif + if (was_enabled) report_current_position(); +} + +void unified_bed_leveling::invalidate() { + set_bed_leveling_enabled(false); + set_all_mesh_points_to_value(NAN); +} + +void unified_bed_leveling::set_all_mesh_points_to_value(const_float_t value) { + GRID_LOOP(x, y) { + z_values[x][y] = value; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, value)); } - - void unified_bed_leveling::report_state() { - echo_name(); - SERIAL_ECHO_TERNARY(planner.leveling_active, " System v" UBL_VERSION " ", "", "in", "active\n"); - serial_delay(50); +} + +#if ENABLED(OPTIMIZED_MESH_STORAGE) + + constexpr float mesh_store_scaling = 1000; + constexpr int16_t Z_STEPS_NAN = INT16_MAX; + + void unified_bed_leveling::set_store_from_mesh(const bed_mesh_t &in_values, mesh_store_t &stored_values) { + auto z_to_store = [](const_float_t z) { + if (isnan(z)) return Z_STEPS_NAN; + const int32_t z_scaled = TRUNC(z * mesh_store_scaling); + if (z_scaled == Z_STEPS_NAN || !WITHIN(z_scaled, INT16_MIN, INT16_MAX)) + return Z_STEPS_NAN; // If Z is out of range, return our custom 'NaN' + return int16_t(z_scaled); + }; + GRID_LOOP(x, y) stored_values[x][y] = z_to_store(in_values[x][y]); } - int8_t unified_bed_leveling::storage_slot; - - float unified_bed_leveling::z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; - - #define _GRIDPOS(A,N) (MESH_MIN_##A + N * (MESH_##A##_DIST)) - - const float - unified_bed_leveling::_mesh_index_to_xpos[GRID_MAX_POINTS_X] PROGMEM = ARRAY_N(GRID_MAX_POINTS_X, - _GRIDPOS(X, 0), _GRIDPOS(X, 1), _GRIDPOS(X, 2), _GRIDPOS(X, 3), - _GRIDPOS(X, 4), _GRIDPOS(X, 5), _GRIDPOS(X, 6), _GRIDPOS(X, 7), - _GRIDPOS(X, 8), _GRIDPOS(X, 9), _GRIDPOS(X, 10), _GRIDPOS(X, 11), - _GRIDPOS(X, 12), _GRIDPOS(X, 13), _GRIDPOS(X, 14), _GRIDPOS(X, 15) - ), - unified_bed_leveling::_mesh_index_to_ypos[GRID_MAX_POINTS_Y] PROGMEM = ARRAY_N(GRID_MAX_POINTS_Y, - _GRIDPOS(Y, 0), _GRIDPOS(Y, 1), _GRIDPOS(Y, 2), _GRIDPOS(Y, 3), - _GRIDPOS(Y, 4), _GRIDPOS(Y, 5), _GRIDPOS(Y, 6), _GRIDPOS(Y, 7), - _GRIDPOS(Y, 8), _GRIDPOS(Y, 9), _GRIDPOS(Y, 10), _GRIDPOS(Y, 11), - _GRIDPOS(Y, 12), _GRIDPOS(Y, 13), _GRIDPOS(Y, 14), _GRIDPOS(Y, 15) - ); - - volatile int16_t unified_bed_leveling::encoder_diff; - - unified_bed_leveling::unified_bed_leveling() { reset(); } - - void unified_bed_leveling::reset() { - const bool was_enabled = planner.leveling_active; - set_bed_leveling_enabled(false); - storage_slot = -1; - ZERO(z_values); - #if ENABLED(EXTENSIBLE_UI) - GRID_LOOP(x, y) ExtUI::onMeshUpdate(x, y, 0); - #endif - if (was_enabled) report_current_position(); + void unified_bed_leveling::set_mesh_from_store(const mesh_store_t &stored_values, bed_mesh_t &out_values) { + auto store_to_z = [](const int16_t z_scaled) { + return z_scaled == Z_STEPS_NAN ? NAN : z_scaled / mesh_store_scaling; + }; + GRID_LOOP(x, y) out_values[x][y] = store_to_z(stored_values[x][y]); } - void unified_bed_leveling::invalidate() { - set_bed_leveling_enabled(false); - set_all_mesh_points_to_value(NAN); +#endif // OPTIMIZED_MESH_STORAGE + +static void serial_echo_xy(const uint8_t sp, const int16_t x, const int16_t y) { + SERIAL_ECHO_SP(sp); + SERIAL_CHAR('('); + if (x < 100) { SERIAL_CHAR(' '); if (x < 10) SERIAL_CHAR(' '); } + SERIAL_ECHO(x); + SERIAL_CHAR(','); + if (y < 100) { SERIAL_CHAR(' '); if (y < 10) SERIAL_CHAR(' '); } + SERIAL_ECHO(y); + SERIAL_CHAR(')'); + serial_delay(5); +} + +static void serial_echo_column_labels(const uint8_t sp) { + SERIAL_ECHO_SP(7); + LOOP_L_N(i, GRID_MAX_POINTS_X) { + if (i < 10) SERIAL_CHAR(' '); + SERIAL_ECHO(i); + SERIAL_ECHO_SP(sp); } + serial_delay(10); +} - void unified_bed_leveling::set_all_mesh_points_to_value(const float value) { - GRID_LOOP(x, y) { - z_values[x][y] = value; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, value)); - } +/** + * Produce one of these mesh maps: + * 0: Human-readable + * 1: CSV format for spreadsheet import + * 2: TODO: Display on Graphical LCD + * 4: Compact Human-Readable + */ +void unified_bed_leveling::display_map(const uint8_t map_type) { + const bool was = gcode.set_autoreport_paused(true); + + constexpr uint8_t eachsp = 1 + 6 + 1, // [-3.567] + twixt = eachsp * (GRID_MAX_POINTS_X) - 9 * 2; // Leading 4sp, Coordinates 9sp each + + const bool human = !(map_type & 0x3), csv = map_type == 1, lcd = map_type == 2, comp = map_type & 0x4; + + SERIAL_ECHOPGM("\nBed Topography Report"); + if (human) { + SERIAL_ECHOLNPGM(":\n"); + serial_echo_xy(4, MESH_MIN_X, MESH_MAX_Y); + serial_echo_xy(twixt, MESH_MAX_X, MESH_MAX_Y); + SERIAL_EOL(); + serial_echo_column_labels(eachsp - 2); + } + else { + SERIAL_ECHOPGM(" for "); + SERIAL_ECHOPGM_P(csv ? PSTR("CSV:\n") : PSTR("LCD:\n")); } - #if ENABLED(OPTIMIZED_MESH_STORAGE) + // Add XY probe offset from extruder because probe.probe_at_point() subtracts them when + // moving to the XY position to be measured. This ensures better agreement between + // the current Z position after G28 and the mesh values. + const xy_int8_t curr = closest_indexes(xy_pos_t(current_position) + probe.offset_xy); - constexpr float mesh_store_scaling = 1000; - constexpr int16_t Z_STEPS_NAN = INT16_MAX; + if (!lcd) SERIAL_EOL(); + for (int8_t j = (GRID_MAX_POINTS_Y) - 1; j >= 0; j--) { - void unified_bed_leveling::set_store_from_mesh(const bed_mesh_t &in_values, mesh_store_t &stored_values) { - auto z_to_store = [](const float &z) { - if (isnan(z)) return Z_STEPS_NAN; - const int32_t z_scaled = TRUNC(z * mesh_store_scaling); - if (z_scaled == Z_STEPS_NAN || !WITHIN(z_scaled, INT16_MIN, INT16_MAX)) - return Z_STEPS_NAN; // If Z is out of range, return our custom 'NaN' - return int16_t(z_scaled); - }; - GRID_LOOP(x, y) stored_values[x][y] = z_to_store(in_values[x][y]); + // Row Label (J index) + if (human) { + if (j < 10) SERIAL_CHAR(' '); + SERIAL_ECHO(j); + SERIAL_ECHOPGM(" |"); } - void unified_bed_leveling::set_mesh_from_store(const mesh_store_t &stored_values, bed_mesh_t &out_values) { - auto store_to_z = [](const int16_t z_scaled) { - return z_scaled == Z_STEPS_NAN ? NAN : z_scaled / mesh_store_scaling; - }; - GRID_LOOP(x, y) out_values[x][y] = store_to_z(stored_values[x][y]); - } + // Row Values (I indexes) + LOOP_L_N(i, GRID_MAX_POINTS_X) { - #endif // OPTIMIZED_MESH_STORAGE + // Opening Brace or Space + const bool is_current = i == curr.x && j == curr.y; + if (human) SERIAL_CHAR(is_current ? '[' : ' '); - static void serial_echo_xy(const uint8_t sp, const int16_t x, const int16_t y) { - SERIAL_ECHO_SP(sp); - SERIAL_CHAR('('); - if (x < 100) { SERIAL_CHAR(' '); if (x < 10) SERIAL_CHAR(' '); } - SERIAL_ECHO(x); - SERIAL_CHAR(','); - if (y < 100) { SERIAL_CHAR(' '); if (y < 10) SERIAL_CHAR(' '); } - SERIAL_ECHO(y); - SERIAL_CHAR(')'); - serial_delay(5); - } + // Z Value at current I, J + const float f = z_values[i][j]; + if (lcd) { + // TODO: Display on Graphical LCD + } + else if (isnan(f)) + SERIAL_ECHOPGM_P(human ? PSTR(" . ") : PSTR("NAN")); + else if (human || csv) { + if (human && f >= 0.0) SERIAL_CHAR(f > 0 ? '+' : ' '); // Display sign also for positive numbers (' ' for 0) + SERIAL_ECHO_F(f, 3); // Positive: 5 digits, Negative: 6 digits + } + if (csv && i < (GRID_MAX_POINTS_X) - 1) SERIAL_CHAR('\t'); - static void serial_echo_column_labels(const uint8_t sp) { - SERIAL_ECHO_SP(7); - LOOP_L_N(i, GRID_MAX_POINTS_X) { - if (i < 10) SERIAL_CHAR(' '); - SERIAL_ECHO((int)i); - SERIAL_ECHO_SP(sp); + // Closing Brace or Space + if (human) SERIAL_CHAR(is_current ? ']' : ' '); + + SERIAL_FLUSHTX(); + idle_no_sleep(); } - serial_delay(10); + if (!lcd) SERIAL_EOL(); + + // A blank line between rows (unless compact) + if (j && human && !comp) SERIAL_ECHOLNPGM(" |"); } - /** - * Produce one of these mesh maps: - * 0: Human-readable - * 1: CSV format for spreadsheet import - * 2: TODO: Display on Graphical LCD - * 4: Compact Human-Readable - */ - void unified_bed_leveling::display_map(const int map_type) { - const bool was = gcode.set_autoreport_paused(true); + if (human) { + serial_echo_column_labels(eachsp - 2); + SERIAL_EOL(); + serial_echo_xy(4, MESH_MIN_X, MESH_MIN_Y); + serial_echo_xy(twixt, MESH_MAX_X, MESH_MIN_Y); + SERIAL_EOL(); + SERIAL_EOL(); + } - constexpr uint8_t eachsp = 1 + 6 + 1, // [-3.567] - twixt = eachsp * (GRID_MAX_POINTS_X) - 9 * 2; // Leading 4sp, Coordinates 9sp each + gcode.set_autoreport_paused(was); +} - const bool human = !(map_type & 0x3), csv = map_type == 1, lcd = map_type == 2, comp = map_type & 0x4; +bool unified_bed_leveling::sanity_check() { + uint8_t error_flag = 0; - SERIAL_ECHOPGM("\nBed Topography Report"); - if (human) { - SERIAL_ECHOLNPGM(":\n"); - serial_echo_xy(4, MESH_MIN_X, MESH_MAX_Y); - serial_echo_xy(twixt, MESH_MAX_X, MESH_MAX_Y); - SERIAL_EOL(); - serial_echo_column_labels(eachsp - 2); - } - else { - SERIAL_ECHOPGM(" for "); - serialprintPGM(csv ? PSTR("CSV:\n") : PSTR("LCD:\n")); - } + if (settings.calc_num_meshes() < 1) { + SERIAL_ECHOLNPGM("?Mesh too big for EEPROM."); + error_flag++; + } - // Add XY probe offset from extruder because probe.probe_at_point() subtracts them when - // moving to the XY position to be measured. This ensures better agreement between - // the current Z position after G28 and the mesh values. - const xy_int8_t curr = closest_indexes(xy_pos_t(current_position) + probe.offset_xy); + return !!error_flag; +} - if (!lcd) SERIAL_EOL(); - for (int8_t j = GRID_MAX_POINTS_Y - 1; j >= 0; j--) { +#if ENABLED(UBL_MESH_WIZARD) - // Row Label (J index) - if (human) { - if (j < 10) SERIAL_CHAR(' '); - SERIAL_ECHO(j); - SERIAL_ECHOPGM(" |"); + /** + * M1004: UBL Mesh Wizard - One-click mesh creation with or without a probe + */ + void GcodeSuite::M1004() { + + #define ALIGN_GCODE TERN(Z_STEPPER_AUTO_ALIGN, "G34", "") + #define PROBE_GCODE TERN(HAS_BED_PROBE, "G29P1\nG29P3", "G29P4R") + + #if HAS_HOTEND + if (parser.seenval('H')) { // Handle H# parameter to set Hotend temp + const celsius_t hotend_temp = parser.value_int(); // Marlin never sends itself F or K, always C + thermalManager.setTargetHotend(hotend_temp, 0); + thermalManager.wait_for_hotend(false); } + #endif - // Row Values (I indexes) - LOOP_L_N(i, GRID_MAX_POINTS_X) { - - // Opening Brace or Space - const bool is_current = i == curr.x && j == curr.y; - if (human) SERIAL_CHAR(is_current ? '[' : ' '); - - // Z Value at current I, J - const float f = z_values[i][j]; - if (lcd) { - // TODO: Display on Graphical LCD - } - else if (isnan(f)) - serialprintPGM(human ? PSTR(" . ") : PSTR("NAN")); - else if (human || csv) { - if (human && f >= 0.0) SERIAL_CHAR(f > 0 ? '+' : ' '); // Display sign also for positive numbers (' ' for 0) - SERIAL_ECHO_F(f, 3); // Positive: 5 digits, Negative: 6 digits - } - if (csv && i < GRID_MAX_POINTS_X - 1) SERIAL_CHAR('\t'); - - // Closing Brace or Space - if (human) SERIAL_CHAR(is_current ? ']' : ' '); - - SERIAL_FLUSHTX(); - idle_no_sleep(); + #if HAS_HEATED_BED + if (parser.seenval('B')) { // Handle B# parameter to set Bed temp + const celsius_t bed_temp = parser.value_int(); // Marlin never sends itself F or K, always C + thermalManager.setTargetBed(bed_temp); + thermalManager.wait_for_bed(false); } - if (!lcd) SERIAL_EOL(); + #endif - // A blank line between rows (unless compact) - if (j && human && !comp) SERIAL_ECHOLNPGM(" |"); - } + process_subcommands_now_P(G28_STR); // Home + process_subcommands_now_P(PSTR(ALIGN_GCODE "\n" // Align multi z axis if available + PROBE_GCODE "\n" // Build mesh with available hardware + "G29P3\nG29P3")); // Ensure mesh is complete by running smart fill twice - if (human) { - serial_echo_column_labels(eachsp - 2); - SERIAL_EOL(); - serial_echo_xy(4, MESH_MIN_X, MESH_MIN_Y); - serial_echo_xy(twixt, MESH_MAX_X, MESH_MIN_Y); - SERIAL_EOL(); - SERIAL_EOL(); + if (parser.seenval('S')) { + char umw_gcode[32]; + sprintf_P(umw_gcode, PSTR("G29S%i"), parser.value_int()); + queue.inject(umw_gcode); } - gcode.set_autoreport_paused(was); + process_subcommands_now_P(PSTR("G29A\nG29F10\n" // Set UBL Active & Fade 10 + "M140S0\nM104S0\n" // Turn off heaters + "M500")); // Store settings } - bool unified_bed_leveling::sanity_check() { - uint8_t error_flag = 0; - - if (settings.calc_num_meshes() < 1) { - SERIAL_ECHOLNPGM("?Mesh too big for EEPROM."); - error_flag++; - } - - return !!error_flag; - } +#endif // UBL_MESH_WIZARD #endif // AUTO_BED_LEVELING_UBL diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.h b/Marlin/src/feature/bedlevel/ubl/ubl.h index 876063c8787c..ffabadd990b3 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.h +++ b/Marlin/src/feature/bedlevel/ubl/ubl.h @@ -32,289 +32,278 @@ #define UBL_OK false #define UBL_ERR true -enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP }; +enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP, CLOSEST }; // External references struct mesh_index_pair; -#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / float(GRID_MAX_POINTS_X - 1)) -#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / float(GRID_MAX_POINTS_Y - 1)) +#define MESH_X_DIST (float(MESH_MAX_X - (MESH_MIN_X)) / (GRID_MAX_CELLS_X)) +#define MESH_Y_DIST (float(MESH_MAX_Y - (MESH_MIN_Y)) / (GRID_MAX_CELLS_Y)) #if ENABLED(OPTIMIZED_MESH_STORAGE) typedef int16_t mesh_store_t[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; #endif -class unified_bed_leveling { - private: - - static int g29_verbose_level, - g29_phase_value, - g29_repetition_cnt, - g29_storage_slot, - g29_map_type; - static bool g29_c_flag; - static float g29_card_thickness, - g29_constant; - static xy_pos_t g29_pos; - static xy_bool_t xy_seen; - - #if HAS_BED_PROBE - static int g29_grid_size; - #endif +typedef struct { + bool C_seen; + int8_t KLS_storage_slot; + uint8_t R_repetition, + V_verbosity, + P_phase, + T_map_type; + float B_shim_thickness, + C_constant; + xy_pos_t XY_pos; + xy_bool_t XY_seen; + #if HAS_BED_PROBE + uint8_t J_grid_size; + #endif +} G29_parameters_t; - #if IS_NEWPANEL - static void move_z_with_encoder(const float &multiplier); - static float measure_point_with_encoder(); - static float measure_business_card_thickness(); - static void manually_probe_remaining_mesh(const xy_pos_t&, const float&, const float&, const bool) _O0; - static void fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) _O0; - #endif +class unified_bed_leveling { +private: + + static G29_parameters_t param; + + #if IS_NEWPANEL + static void move_z_with_encoder(const_float_t multiplier); + static float measure_point_with_encoder(); + static float measure_business_card_thickness(); + static void manually_probe_remaining_mesh(const xy_pos_t&, const_float_t , const_float_t , const bool) _O0; + static void fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) _O0; + #endif + + static bool G29_parse_parameters() _O0; + static void shift_mesh_height(); + static void probe_entire_mesh(const xy_pos_t &near, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) _O0; + static void tilt_mesh_based_on_3pts(const_float_t z1, const_float_t z2, const_float_t z3); + static void tilt_mesh_based_on_probed_grid(const bool do_ubl_mesh_map); + static bool smart_fill_one(const uint8_t x, const uint8_t y, const int8_t xdir, const int8_t ydir); + static inline bool smart_fill_one(const xy_uint8_t &pos, const xy_uint8_t &dir) { + return smart_fill_one(pos.x, pos.y, dir.x, dir.y); + } + static void smart_fill_mesh(); + + #if ENABLED(UBL_DEVEL_DEBUGGING) + static void g29_what_command(); + static void g29_eeprom_dump(); + static void g29_compare_current_mesh_to_stored_mesh(); + #endif + +public: + + static void echo_name(); + static void report_current_mesh(); + static void report_state(); + static void save_ubl_active_state_and_disable(); + static void restore_ubl_active_state_and_leave(); + static void display_map(const uint8_t) _O0; + static mesh_index_pair find_closest_mesh_point_of_type(const MeshPointType, const xy_pos_t&, const bool=false, MeshFlags *done_flags=nullptr) _O0; + static mesh_index_pair find_furthest_invalid_mesh_point() _O0; + static void reset(); + static void invalidate(); + static void set_all_mesh_points_to_value(const_float_t value); + static void adjust_mesh_to_mean(const bool cflag, const_float_t value); + static bool sanity_check(); + + static void G29() _O0; // O0 for no optimization + static void smart_fill_wlsf(const_float_t ) _O2; // O2 gives smaller code than Os on A2560 + + static int8_t storage_slot; + + static bed_mesh_t z_values; + #if ENABLED(OPTIMIZED_MESH_STORAGE) + static void set_store_from_mesh(const bed_mesh_t &in_values, mesh_store_t &stored_values); + static void set_mesh_from_store(const mesh_store_t &stored_values, bed_mesh_t &out_values); + #endif + static const float _mesh_index_to_xpos[GRID_MAX_POINTS_X], + _mesh_index_to_ypos[GRID_MAX_POINTS_Y]; + + #if HAS_LCD_MENU + static bool lcd_map_control; + static void steppers_were_disabled(); + #else + static inline void steppers_were_disabled() {} + #endif + + static volatile int16_t encoder_diff; // Volatile because buttons may change it at interrupt time + + unified_bed_leveling(); + + FORCE_INLINE static void set_z(const int8_t px, const int8_t py, const_float_t z) { z_values[px][py] = z; } + + static int8_t cell_index_x_raw(const_float_t x) { + return FLOOR((x - (MESH_MIN_X)) * RECIPROCAL(MESH_X_DIST)); + } + + static int8_t cell_index_y_raw(const_float_t y) { + return FLOOR((y - (MESH_MIN_Y)) * RECIPROCAL(MESH_Y_DIST)); + } + + static int8_t cell_index_x_valid(const_float_t x) { + return WITHIN(cell_index_x_raw(x), 0, GRID_MAX_CELLS_X - 1); + } + + static int8_t cell_index_y_valid(const_float_t y) { + return WITHIN(cell_index_y_raw(y), 0, GRID_MAX_CELLS_Y - 1); + } + + static int8_t cell_index_x(const_float_t x) { + return constrain(cell_index_x_raw(x), 0, GRID_MAX_CELLS_X - 1); + } + + static int8_t cell_index_y(const_float_t y) { + return constrain(cell_index_y_raw(y), 0, GRID_MAX_CELLS_Y - 1); + } + + static inline xy_int8_t cell_indexes(const_float_t x, const_float_t y) { + return { cell_index_x(x), cell_index_y(y) }; + } + static inline xy_int8_t cell_indexes(const xy_pos_t &xy) { return cell_indexes(xy.x, xy.y); } + + static int8_t closest_x_index(const_float_t x) { + const int8_t px = (x - (MESH_MIN_X) + (MESH_X_DIST) * 0.5) * RECIPROCAL(MESH_X_DIST); + return WITHIN(px, 0, (GRID_MAX_POINTS_X) - 1) ? px : -1; + } + static int8_t closest_y_index(const_float_t y) { + const int8_t py = (y - (MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * RECIPROCAL(MESH_Y_DIST); + return WITHIN(py, 0, (GRID_MAX_POINTS_Y) - 1) ? py : -1; + } + static inline xy_int8_t closest_indexes(const xy_pos_t &xy) { + return { closest_x_index(xy.x), closest_y_index(xy.y) }; + } + + /** + * z2 --| + * z0 | | + * | | + (z2-z1) + * z1 | | | + * ---+-------------+--------+-- --| + * a1 a0 a2 + * |<---delta_a---------->| + * + * calc_z0 is the basis for all the Mesh Based correction. It is used to + * find the expected Z Height at a position between two known Z-Height locations. + * + * It is fairly expensive with its 4 floating point additions and 2 floating point + * multiplications. + */ + FORCE_INLINE static float calc_z0(const_float_t a0, const_float_t a1, const_float_t z1, const_float_t a2, const_float_t z2) { + return z1 + (z2 - z1) * (a0 - a1) / (a2 - a1); + } + + #ifdef UBL_Z_RAISE_WHEN_OFF_MESH + #define _UBL_OUTER_Z_RAISE UBL_Z_RAISE_WHEN_OFF_MESH + #else + #define _UBL_OUTER_Z_RAISE NAN + #endif + + /** + * z_correction_for_x_on_horizontal_mesh_line is an optimization for + * the case where the printer is making a vertical line that only crosses horizontal mesh lines. + */ + static inline float z_correction_for_x_on_horizontal_mesh_line(const_float_t rx0, const int x1_i, const int yi) { + if (!WITHIN(x1_i, 0, (GRID_MAX_POINTS_X) - 1) || !WITHIN(yi, 0, (GRID_MAX_POINTS_Y) - 1)) { + + if (DEBUGGING(LEVELING)) { + if (WITHIN(x1_i, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("yi"); else DEBUG_ECHOPGM("x1_i"); + DEBUG_ECHOLNPGM(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0, ",x1_i=", x1_i, ",yi=", yi, ")"); + } - static bool g29_parameter_parsing() _O0; - static void shift_mesh_height(); - static void probe_entire_mesh(const xy_pos_t &near, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) _O0; - static void tilt_mesh_based_on_3pts(const float &z1, const float &z2, const float &z3); - static void tilt_mesh_based_on_probed_grid(const bool do_ubl_mesh_map); - static bool smart_fill_one(const uint8_t x, const uint8_t y, const int8_t xdir, const int8_t ydir); - static inline bool smart_fill_one(const xy_uint8_t &pos, const xy_uint8_t &dir) { - return smart_fill_one(pos.x, pos.y, dir.x, dir.y); + // The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN. + return _UBL_OUTER_Z_RAISE; } - static void smart_fill_mesh(); - - #if ENABLED(UBL_DEVEL_DEBUGGING) - static void g29_what_command(); - static void g29_eeprom_dump(); - static void g29_compare_current_mesh_to_stored_mesh(); - #endif - - public: - - static void echo_name(); - static void report_current_mesh(); - static void report_state(); - static void save_ubl_active_state_and_disable(); - static void restore_ubl_active_state_and_leave(); - static void display_map(const int) _O0; - static mesh_index_pair find_closest_mesh_point_of_type(const MeshPointType, const xy_pos_t&, const bool=false, MeshFlags *done_flags=nullptr) _O0; - static mesh_index_pair find_furthest_invalid_mesh_point() _O0; - static void reset(); - static void invalidate(); - static void set_all_mesh_points_to_value(const float value); - static void adjust_mesh_to_mean(const bool cflag, const float value); - static bool sanity_check(); - - static void G29() _O0; // O0 for no optimization - static void smart_fill_wlsf(const float &) _O2; // O2 gives smaller code than Os on A2560 - - static int8_t storage_slot; - - static bed_mesh_t z_values; - #if ENABLED(OPTIMIZED_MESH_STORAGE) - static void set_store_from_mesh(const bed_mesh_t &in_values, mesh_store_t &stored_values); - static void set_mesh_from_store(const mesh_store_t &stored_values, bed_mesh_t &out_values); - #endif - static const float _mesh_index_to_xpos[GRID_MAX_POINTS_X], - _mesh_index_to_ypos[GRID_MAX_POINTS_Y]; - - #if HAS_LCD_MENU - static bool lcd_map_control; - static void steppers_were_disabled(); - #else - static inline void steppers_were_disabled() {} - #endif - - static volatile int16_t encoder_diff; // Volatile because buttons may changed it at interrupt time - - unified_bed_leveling(); - FORCE_INLINE static void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; } + const float xratio = (rx0 - mesh_index_to_xpos(x1_i)) * RECIPROCAL(MESH_X_DIST), + z1 = z_values[x1_i][yi]; - static int8_t cell_index_x_raw(const float &x) { - return FLOOR((x - (MESH_MIN_X)) * RECIPROCAL(MESH_X_DIST)); - } - - static int8_t cell_index_y_raw(const float &y) { - return FLOOR((y - (MESH_MIN_Y)) * RECIPROCAL(MESH_Y_DIST)); - } + return z1 + xratio * (z_values[_MIN(x1_i, (GRID_MAX_POINTS_X) - 2) + 1][yi] - z1); // Don't allow x1_i+1 to be past the end of the array + // If it is, it is clamped to the last element of the + // z_values[][] array and no correction is applied. + } - static int8_t cell_index_x_valid(const float &x) { - return WITHIN(cell_index_x_raw(x), 0, (GRID_MAX_POINTS_X - 2)); - } + // + // See comments above for z_correction_for_x_on_horizontal_mesh_line + // + static inline float z_correction_for_y_on_vertical_mesh_line(const_float_t ry0, const int xi, const int y1_i) { + if (!WITHIN(xi, 0, (GRID_MAX_POINTS_X) - 1) || !WITHIN(y1_i, 0, (GRID_MAX_POINTS_Y) - 1)) { - static int8_t cell_index_y_valid(const float &y) { - return WITHIN(cell_index_y_raw(y), 0, (GRID_MAX_POINTS_Y - 2)); - } + if (DEBUGGING(LEVELING)) { + if (WITHIN(xi, 0, (GRID_MAX_POINTS_X) - 1)) DEBUG_ECHOPGM("y1_i"); else DEBUG_ECHOPGM("xi"); + DEBUG_ECHOLNPGM(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0, ", xi=", xi, ", y1_i=", y1_i, ")"); + } - static int8_t cell_index_x(const float &x) { - return constrain(cell_index_x_raw(x), 0, (GRID_MAX_POINTS_X) - 2); + // The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN. + return _UBL_OUTER_Z_RAISE; } - static int8_t cell_index_y(const float &y) { - return constrain(cell_index_y_raw(y), 0, (GRID_MAX_POINTS_Y) - 2); - } + const float yratio = (ry0 - mesh_index_to_ypos(y1_i)) * RECIPROCAL(MESH_Y_DIST), + z1 = z_values[xi][y1_i]; - static inline xy_int8_t cell_indexes(const float &x, const float &y) { - return { cell_index_x(x), cell_index_y(y) }; - } - static inline xy_int8_t cell_indexes(const xy_pos_t &xy) { return cell_indexes(xy.x, xy.y); } + return z1 + yratio * (z_values[xi][_MIN(y1_i, (GRID_MAX_POINTS_Y) - 2) + 1] - z1); // Don't allow y1_i+1 to be past the end of the array + // If it is, it is clamped to the last element of the + // z_values[][] array and no correction is applied. + } - static int8_t closest_x_index(const float &x) { - const int8_t px = (x - (MESH_MIN_X) + (MESH_X_DIST) * 0.5) * RECIPROCAL(MESH_X_DIST); - return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1; - } - static int8_t closest_y_index(const float &y) { - const int8_t py = (y - (MESH_MIN_Y) + (MESH_Y_DIST) * 0.5) * RECIPROCAL(MESH_Y_DIST); - return WITHIN(py, 0, GRID_MAX_POINTS_Y - 1) ? py : -1; - } - static inline xy_int8_t closest_indexes(const xy_pos_t &xy) { - return { closest_x_index(xy.x), closest_y_index(xy.y) }; - } + /** + * This is the generic Z-Correction. It works anywhere within a Mesh Cell. It first + * does a linear interpolation along both of the bounding X-Mesh-Lines to find the + * Z-Height at both ends. Then it does a linear interpolation of these heights based + * on the Y position within the cell. + */ + static float get_z_correction(const_float_t rx0, const_float_t ry0) { + const int8_t cx = cell_index_x(rx0), cy = cell_index_y(ry0); // return values are clamped /** - * z2 --| - * z0 | | - * | | + (z2-z1) - * z1 | | | - * ---+-------------+--------+-- --| - * a1 a0 a2 - * |<---delta_a---------->| - * - * calc_z0 is the basis for all the Mesh Based correction. It is used to - * find the expected Z Height at a position between two known Z-Height locations. - * - * It is fairly expensive with its 4 floating point additions and 2 floating point - * multiplications. + * Check if the requested location is off the mesh. If so, and + * UBL_Z_RAISE_WHEN_OFF_MESH is specified, that value is returned. */ - FORCE_INLINE static float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) { - return z1 + (z2 - z1) * (a0 - a1) / (a2 - a1); - } - #ifdef UBL_Z_RAISE_WHEN_OFF_MESH - #define _UBL_OUTER_Z_RAISE UBL_Z_RAISE_WHEN_OFF_MESH - #else - #define _UBL_OUTER_Z_RAISE NAN + if (!WITHIN(rx0, MESH_MIN_X, MESH_MAX_X) || !WITHIN(ry0, MESH_MIN_Y, MESH_MAX_Y)) + return UBL_Z_RAISE_WHEN_OFF_MESH; #endif - /** - * z_correction_for_x_on_horizontal_mesh_line is an optimization for - * the case where the printer is making a vertical line that only crosses horizontal mesh lines. - */ - static inline float z_correction_for_x_on_horizontal_mesh_line(const float &rx0, const int x1_i, const int yi) { - if (!WITHIN(x1_i, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(yi, 0, GRID_MAX_POINTS_Y - 1)) { - - if (DEBUGGING(LEVELING)) { - if (WITHIN(x1_i, 0, GRID_MAX_POINTS_X - 1)) DEBUG_ECHOPGM("yi"); else DEBUG_ECHOPGM("x1_i"); - DEBUG_ECHOLNPAIR(" out of bounds in z_correction_for_x_on_horizontal_mesh_line(rx0=", rx0, ",x1_i=", x1_i, ",yi=", yi, ")"); - } - - // The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN. - return _UBL_OUTER_Z_RAISE; - } - - const float xratio = (rx0 - mesh_index_to_xpos(x1_i)) * RECIPROCAL(MESH_X_DIST), - z1 = z_values[x1_i][yi]; - - return z1 + xratio * (z_values[_MIN(x1_i, GRID_MAX_POINTS_X - 2) + 1][yi] - z1); // Don't allow x1_i+1 to be past the end of the array - // If it is, it is clamped to the last element of the - // z_values[][] array and no correction is applied. - } - - // - // See comments above for z_correction_for_x_on_horizontal_mesh_line - // - static inline float z_correction_for_y_on_vertical_mesh_line(const float &ry0, const int xi, const int y1_i) { - if (!WITHIN(xi, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(y1_i, 0, GRID_MAX_POINTS_Y - 1)) { - - if (DEBUGGING(LEVELING)) { - if (WITHIN(xi, 0, GRID_MAX_POINTS_X - 1)) DEBUG_ECHOPGM("y1_i"); else DEBUG_ECHOPGM("xi"); - DEBUG_ECHOLNPAIR(" out of bounds in z_correction_for_y_on_vertical_mesh_line(ry0=", ry0, ", xi=", xi, ", y1_i=", y1_i, ")"); - } - - // The requested location is off the mesh. Return UBL_Z_RAISE_WHEN_OFF_MESH or NAN. - return _UBL_OUTER_Z_RAISE; - } - - const float yratio = (ry0 - mesh_index_to_ypos(y1_i)) * RECIPROCAL(MESH_Y_DIST), - z1 = z_values[xi][y1_i]; - - return z1 + yratio * (z_values[xi][_MIN(y1_i, GRID_MAX_POINTS_Y - 2) + 1] - z1); // Don't allow y1_i+1 to be past the end of the array - // If it is, it is clamped to the last element of the - // z_values[][] array and no correction is applied. - } + const uint8_t mx = _MIN(cx, (GRID_MAX_POINTS_X) - 2) + 1, my = _MIN(cy, (GRID_MAX_POINTS_Y) - 2) + 1; + const float z1 = calc_z0(rx0, mesh_index_to_xpos(cx), z_values[cx][cy], mesh_index_to_xpos(cx + 1), z_values[mx][cy]); + const float z2 = calc_z0(rx0, mesh_index_to_xpos(cx), z_values[cx][my], mesh_index_to_xpos(cx + 1), z_values[mx][my]); + float z0 = calc_z0(ry0, mesh_index_to_ypos(cy), z1, mesh_index_to_ypos(cy + 1), z2); - /** - * This is the generic Z-Correction. It works anywhere within a Mesh Cell. It first - * does a linear interpolation along both of the bounding X-Mesh-Lines to find the - * Z-Height at both ends. Then it does a linear interpolation of these heights based - * on the Y position within the cell. - */ - static float get_z_correction(const float &rx0, const float &ry0) { - const int8_t cx = cell_index_x(rx0), cy = cell_index_y(ry0); // return values are clamped - - /** - * Check if the requested location is off the mesh. If so, and - * UBL_Z_RAISE_WHEN_OFF_MESH is specified, that value is returned. - */ - #ifdef UBL_Z_RAISE_WHEN_OFF_MESH - if (!WITHIN(rx0, MESH_MIN_X, MESH_MAX_X) || !WITHIN(ry0, MESH_MIN_Y, MESH_MAX_Y)) - return UBL_Z_RAISE_WHEN_OFF_MESH; - #endif - - const float z1 = calc_z0(rx0, - mesh_index_to_xpos(cx), z_values[cx][cy], - mesh_index_to_xpos(cx + 1), z_values[_MIN(cx, GRID_MAX_POINTS_X - 2) + 1][cy]); - - const float z2 = calc_z0(rx0, - mesh_index_to_xpos(cx), z_values[cx][_MIN(cy, GRID_MAX_POINTS_Y - 2) + 1], - mesh_index_to_xpos(cx + 1), z_values[_MIN(cx, GRID_MAX_POINTS_X - 2) + 1][_MIN(cy, GRID_MAX_POINTS_Y - 2) + 1]); - - float z0 = calc_z0(ry0, - mesh_index_to_ypos(cy), z1, - mesh_index_to_ypos(cy + 1), z2); - - if (DEBUGGING(MESH_ADJUST)) { - DEBUG_ECHOPAIR(" raw get_z_correction(", rx0); - DEBUG_CHAR(','); DEBUG_ECHO(ry0); - DEBUG_ECHOPAIR_F(") = ", z0, 6); - DEBUG_ECHOLNPAIR_F(" >>>---> ", z0, 6); - } + if (isnan(z0)) { // if part of the Mesh is undefined, it will show up as NAN + z0 = 0.0; // in ubl.z_values[][] and propagate through the + // calculations. If our correction is NAN, we throw it out + // because part of the Mesh is undefined and we don't have the + // information we need to complete the height correction. - if (isnan(z0)) { // if part of the Mesh is undefined, it will show up as NAN - z0 = 0.0; // in ubl.z_values[][] and propagate through the - // calculations. If our correction is NAN, we throw it out - // because part of the Mesh is undefined and we don't have the - // information we need to complete the height correction. - - if (DEBUGGING(MESH_ADJUST)) { - DEBUG_ECHOPAIR("??? Yikes! NAN in get_z_correction(", rx0); - DEBUG_CHAR(','); - DEBUG_ECHO(ry0); - DEBUG_CHAR(')'); - DEBUG_EOL(); - } - } - return z0; + if (DEBUGGING(MESH_ADJUST)) DEBUG_ECHOLNPGM("??? Yikes! NAN in "); } - static inline float get_z_correction(const xy_pos_t &pos) { return get_z_correction(pos.x, pos.y); } - static inline float mesh_index_to_xpos(const uint8_t i) { - return i < GRID_MAX_POINTS_X ? pgm_read_float(&_mesh_index_to_xpos[i]) : MESH_MIN_X + i * (MESH_X_DIST); - } - static inline float mesh_index_to_ypos(const uint8_t i) { - return i < GRID_MAX_POINTS_Y ? pgm_read_float(&_mesh_index_to_ypos[i]) : MESH_MIN_Y + i * (MESH_Y_DIST); + if (DEBUGGING(MESH_ADJUST)) { + DEBUG_ECHOPGM("get_z_correction(", rx0, ", ", ry0); + DEBUG_ECHOLNPAIR_F(") => ", z0, 6); } - #if UBL_SEGMENTED - static bool line_to_destination_segmented(const feedRate_t &scaled_fr_mm_s); - #else - static void line_to_destination_cartesian(const feedRate_t &scaled_fr_mm_s, const uint8_t e); - #endif - - static inline bool mesh_is_valid() { - GRID_LOOP(x, y) if (isnan(z_values[x][y])) return false; - return true; - } + return z0; + } + static inline float get_z_correction(const xy_pos_t &pos) { return get_z_correction(pos.x, pos.y); } + + static inline float mesh_index_to_xpos(const uint8_t i) { + return i < (GRID_MAX_POINTS_X) ? pgm_read_float(&_mesh_index_to_xpos[i]) : MESH_MIN_X + i * (MESH_X_DIST); + } + static inline float mesh_index_to_ypos(const uint8_t i) { + return i < (GRID_MAX_POINTS_Y) ? pgm_read_float(&_mesh_index_to_ypos[i]) : MESH_MIN_Y + i * (MESH_Y_DIST); + } + + #if UBL_SEGMENTED + static bool line_to_destination_segmented(const_feedRate_t scaled_fr_mm_s); + #else + static void line_to_destination_cartesian(const_feedRate_t scaled_fr_mm_s, const uint8_t e); + #endif + + static inline bool mesh_is_valid() { + GRID_LOOP(x, y) if (isnan(z_values[x][y])) return false; + return true; + } }; // class unified_bed_leveling diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 41d2a363593d..750c63f7c64b 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -24,1232 +24,1298 @@ #if ENABLED(AUTO_BED_LEVELING_UBL) - #include "../bedlevel.h" - - #include "../../../MarlinCore.h" - #include "../../../HAL/shared/eeprom_api.h" - #include "../../../libs/hex_print.h" - #include "../../../module/settings.h" - #include "../../../lcd/marlinui.h" - #include "../../../module/stepper.h" - #include "../../../module/planner.h" - #include "../../../module/motion.h" - #include "../../../module/probe.h" - #include "../../../gcode/gcode.h" - #include "../../../libs/least_squares_fit.h" +#include "../bedlevel.h" - #if HAS_MULTI_HOTEND - #include "../../../module/tool_change.h" - #endif +#include "../../../MarlinCore.h" +#include "../../../HAL/shared/eeprom_api.h" +#include "../../../libs/hex_print.h" +#include "../../../module/settings.h" +#include "../../../lcd/marlinui.h" +#include "../../../module/stepper.h" +#include "../../../module/planner.h" +#include "../../../module/motion.h" +#include "../../../module/probe.h" +#include "../../../gcode/gcode.h" +#include "../../../libs/least_squares_fit.h" - #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) - #include "../../../core/debug_out.h" +#if HAS_MULTI_HOTEND + #include "../../../module/tool_change.h" +#endif - #if ENABLED(EXTENSIBLE_UI) - #include "../../../lcd/extui/ui_api.h" - #endif +#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) +#include "../../../core/debug_out.h" - #include +#if ENABLED(EXTENSIBLE_UI) + #include "../../../lcd/extui/ui_api.h" +#endif - #define UBL_G29_P31 +#if ENABLED(UBL_HILBERT_CURVE) + #include "../hilbert_curve.h" +#endif - #if HAS_LCD_MENU +#include - bool unified_bed_leveling::lcd_map_control = false; +#define UBL_G29_P31 - void unified_bed_leveling::steppers_were_disabled() { - if (lcd_map_control) { - lcd_map_control = false; - ui.defer_status_screen(false); - } +#if HAS_LCD_MENU + + bool unified_bed_leveling::lcd_map_control = false; + + void unified_bed_leveling::steppers_were_disabled() { + if (lcd_map_control) { + lcd_map_control = false; + ui.defer_status_screen(false); } + } - void ubl_map_screen(); + void ubl_map_screen(); - #endif +#endif - #define SIZE_OF_LITTLE_RAISE 1 - #define BIG_RAISE_NOT_NEEDED 0 +#define SIZE_OF_LITTLE_RAISE 1 +#define BIG_RAISE_NOT_NEEDED 0 + +/** + * G29: Unified Bed Leveling by Roxy + * + * Parameters understood by this leveling system: + * + * A Activate Activate the Unified Bed Leveling system. + * + * B # Business Use the 'Business Card' mode of the Manual Probe subsystem with P2. + * Note: A non-compressible Spark Gap feeler gauge is recommended over a business card. + * In this mode of G29 P2, a business or index card is used as a shim that the nozzle can + * grab onto as it is lowered. In principle, the nozzle-bed distance is the same when the + * same resistance is felt in the shim. You can omit the numerical value on first invocation + * of G29 P2 B to measure shim thickness. Subsequent use of 'B' will apply the previously- + * measured thickness by default. + * + * C Continue G29 P1 C continues the generation of a partially-constructed Mesh without invalidating + * previous measurements. + * + * C G29 P2 C tells the Manual Probe subsystem to not use the current nozzle + * location in its search for the closest unmeasured Mesh Point. Instead, attempt to + * start at one end of the uprobed points and Continue sequentially. + * + * G29 P3 C specifies the Constant for the fill. Otherwise, uses a "reasonable" value. + * + * C Current G29 Z C uses the Current location (instead of bed center or nearest edge). + * + * D Disable Disable the Unified Bed Leveling system. + * + * E Stow_probe Stow the probe after each sampled point. + * + * F # Fade Fade the amount of Mesh Based Compensation over a specified height. At the + * specified height, no correction is applied and natural printer kenimatics take over. If no + * number is specified for the command, 10mm is assumed to be reasonable. + * + * H # Height With P2, 'H' specifies the Height to raise the nozzle after each manual probe of the bed. + * If omitted, the nozzle will raise by Z_CLEARANCE_BETWEEN_PROBES. + * + * H # Offset With P4, 'H' specifies the Offset above the mesh height to place the nozzle. + * If omitted, Z_CLEARANCE_BETWEEN_PROBES will be used. + * + * I # Invalidate Invalidate the specified number of Mesh Points near the given 'X' 'Y'. If X or Y are omitted, + * the nozzle location is used. If no 'I' value is given, only the point nearest to the location + * is invalidated. Use 'T' to produce a map afterward. This command is useful to invalidate a + * portion of the Mesh so it can be adjusted using other UBL tools. When attempting to invalidate + * an isolated bad mesh point, the 'T' option shows the nozzle position in the Mesh with (#). You + * can move the nozzle around and use this feature to select the center of the area (or cell) to + * invalidate. + * + * J # Grid Perform a Grid Based Leveling of the current Mesh using a grid with n points on a side. + * Not specifying a grid size will invoke the 3-Point leveling function. + * + * L Load Load Mesh from the previously activated location in the EEPROM. + * + * L # Load Load Mesh from the specified location in the EEPROM. Set this location as activated + * for subsequent Load and Store operations. + * + * The P or Phase commands are used for the bulk of the work to setup a Mesh. In general, your Mesh will + * start off being initialized with a G29 P0 or a G29 P1. Further refinement of the Mesh happens with + * each additional Phase that processes it. + * + * P0 Phase 0 Zero Mesh Data and turn off the Mesh Compensation System. This reverts the + * 3D Printer to the same state it was in before the Unified Bed Leveling Compensation + * was turned on. Setting the entire Mesh to Zero is a special case that allows + * a subsequent G or T leveling operation for backward compatibility. + * + * P1 Phase 1 Invalidate entire Mesh and continue with automatic generation of the Mesh data using + * the Z-Probe. Usually the probe can't reach all areas that the nozzle can reach. For delta + * printers only the areas where the probe and nozzle can both reach will be automatically probed. + * + * Unreachable points will be handled in Phase 2 and Phase 3. + * + * Use 'C' to leave the previous mesh intact and automatically probe needed points. This allows you + * to invalidate parts of the Mesh but still use Automatic Probing. + * + * The 'X' and 'Y' parameters prioritize where to try and measure points. If omitted, the current + * probe position is used. + * + * Use 'T' (Topology) to generate a report of mesh generation. + * + * P1 will suspend Mesh generation if the controller button is held down. Note that you may need + * to press and hold the switch for several seconds if moves are underway. + * + * P2 Phase 2 Probe unreachable points. + * + * Use 'H' to set the height between Mesh points. If omitted, Z_CLEARANCE_BETWEEN_PROBES is used. + * Smaller values will be quicker. Move the nozzle down till it barely touches the bed. Make sure the + * nozzle is clean and unobstructed. Use caution and move slowly. This can damage your printer! + * (Uses SIZE_OF_LITTLE_RAISE mm if the nozzle is moving less than BIG_RAISE_NOT_NEEDED mm.) + * + * The 'H' value can be negative if the Mesh dips in a large area. Press and hold the + * controller button to terminate the current Phase 2 command. You can then re-issue "G29 P 2" + * with an 'H' parameter more suitable for the area you're manually probing. Note that the command + * tries to start in a corner of the bed where movement will be predictable. Override the distance + * calculation location with the X and Y parameters. You can print a Mesh Map (G29 T) to see where + * the mesh is invalidated and where the nozzle needs to move to complete the command. Use 'C' to + * indicate that the search should be based on the current position. + * + * The 'B' parameter for this command is described above. It places the manual probe subsystem into + * Business Card mode where the thickness of a business card is measured and then used to accurately + * set the nozzle height in all manual probing for the duration of the command. A Business card can + * be used, but you'll get better results with a flexible Shim that doesn't compress. This makes it + * easier to produce similar amounts of force and get more accurate measurements. Google if you're + * not sure how to use a shim. + * + * The 'T' (Map) parameter helps track Mesh building progress. + * + * NOTE: P2 requires an LCD controller! + * + * P3 Phase 3 Fill the unpopulated regions of the Mesh with a fixed value. There are two different paths to + * go down: + * + * - If a 'C' constant is specified, the closest invalid mesh points to the nozzle will be filled, + * and a repeat count can then also be specified with 'R'. + * + * - Leaving out 'C' invokes Smart Fill, which scans the mesh from the edges inward looking for + * invalid mesh points. Adjacent points are used to determine the bed slope. If the bed is sloped + * upward from the invalid point, it takes the value of the nearest point. If sloped downward, it's + * replaced by a value that puts all three points in a line. This version of G29 P3 is a quick, easy + * and (usually) safe way to populate unprobed mesh regions before continuing to G26 Mesh Validation + * Pattern. Note that this populates the mesh with unverified values. Pay attention and use caution. + * + * P4 Phase 4 Fine tune the Mesh. The Delta Mesh Compensation System assumes the existence of + * an LCD Panel. It is possible to fine tune the mesh without an LCD Panel using + * G42 and M421. See the UBL documentation for further details. + * + * Phase 4 is meant to be used with G26 Mesh Validation to fine tune the mesh by direct editing + * of Mesh Points. Raise and lower points to fine tune the mesh until it gives consistently reliable + * adhesion. + * + * P4 moves to the closest Mesh Point (and/or the given X Y), raises the nozzle above the mesh height + * by the given 'H' offset (or default 0), and waits while the controller is used to adjust the nozzle + * height. On click the displayed height is saved in the mesh. + * + * Start Phase 4 at a specific location with X and Y. Adjust a specific number of Mesh Points with + * the 'R' (Repeat) parameter. (If 'R' is left out, the whole matrix is assumed.) This command can be + * terminated early (e.g., after editing the area of interest) by pressing and holding the encoder button. + * + * The general form is G29 P4 [R points] [X position] [Y position] + * + * The H [offset] parameter is useful if a shim is used to fine-tune the mesh. For a 0.4mm shim the + * command would be G29 P4 H0.4. The nozzle is moved to the shim height, you adjust height to the shim, + * and on click the height minus the shim thickness will be saved in the mesh. + * + * !!Use with caution, as a very poor mesh could cause the nozzle to crash into the bed!! + * + * NOTE: P4 is not available unless you have LCD support enabled! + * + * P5 Phase 5 Find Mean Mesh Height and Standard Deviation. Typically, it is easier to use and + * work with the Mesh if it is Mean Adjusted. You can specify a C parameter to + * Correct the Mesh to a 0.00 Mean Height. Adding a C parameter will automatically + * execute a G29 P6 C . + * + * P6 Phase 6 Shift Mesh height. The entire Mesh's height is adjusted by the height specified + * with the C parameter. Being able to adjust the height of a Mesh is useful tool. It + * can be used to compensate for poorly calibrated Z-Probes and other errors. Ideally, + * you should have the Mesh adjusted for a Mean Height of 0.00 and the Z-Probe measuring + * 0.000 at the Z Home location. + * + * Q Test Load specified Test Pattern to assist in checking correct operation of system. This + * command is not anticipated to be of much value to the typical user. It is intended + * for developers to help them verify correct operation of the Unified Bed Leveling System. + * + * R # Repeat Repeat this command the specified number of times. If no number is specified the + * command will be repeated GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y times. + * + * S Store Store the current Mesh in the Activated area of the EEPROM. It will also store the + * current state of the Unified Bed Leveling system in the EEPROM. + * + * S # Store Store the current Mesh at the specified location in EEPROM. Activate this location + * for subsequent Load and Store operations. Valid storage slot numbers begin at 0 and + * extend to a limit related to the available EEPROM storage. + * + * S -1 Store Print the current Mesh as G-code that can be used to restore the mesh anytime. + * + * T Topology Display the Mesh Map Topology. + * 'T' can be used alone (e.g., G29 T) or in combination with most of the other commands. + * This option works with all Phase commands (e.g., G29 P4 R 5 T X 50 Y100 C -.1 O) + * This parameter can also specify a Map Type. T0 (the default) is user-readable. T1 + * is suitable to paste into a spreadsheet for a 3D graph of the mesh. + * + * U Unlevel Perform a probe of the outer perimeter to assist in physically leveling unlevel beds. + * Only used for G29 P1 T U. This speeds up the probing of the edge of the bed. Useful + * when the entire bed doesn't need to be probed because it will be adjusted. + * + * V # Verbosity Set the verbosity level (0-4) for extra details. (Default 0) + * + * X # X Location for this command + * + * Y # Y Location for this command + * + * With UBL_DEVEL_DEBUGGING: + * + * K # Kompare Kompare current Mesh with stored Mesh #, replacing current Mesh with the result. + * This command literally performs a diff between two Meshes. + * + * Q-1 Dump EEPROM Dump the UBL contents stored in EEPROM as HEX format. Useful for developers to help + * verify correct operation of the UBL. + * + * W What? Display valuable UBL data. + * + * + * Release Notes: + * You MUST do M502, M500 to initialize the storage. Failure to do this will cause all + * kinds of problems. Enabling EEPROM Storage is required. + * + * When you do a G28 and G29 P1 to automatically build your first mesh, you are going to notice that + * UBL probes points increasingly further from the starting location. (The starting location defaults + * to the center of the bed.) In contrast, ABL and MBL follow a zigzag pattern. The spiral pattern is + * especially better for Delta printers, since it populates the center of the mesh first, allowing for + * a quicker test print to verify settings. You don't need to populate the entire mesh to use it. + * After all, you don't want to spend a lot of time generating a mesh only to realize the resolution + * or probe offsets are incorrect. Mesh-generation gathers points starting closest to the nozzle unless + * an (X,Y) coordinate pair is given. + * + * Unified Bed Leveling uses a lot of EEPROM storage to hold its data, and it takes some effort to get + * the mesh just right. To prevent this valuable data from being destroyed as the EEPROM structure + * evolves, UBL stores all mesh data at the end of EEPROM. + * + * UBL is founded on Edward Patel's Mesh Bed Leveling code. A big 'Thanks!' to him and the creators of + * 3-Point and Grid Based leveling. Combining their contributions we now have the functionality and + * features of all three systems combined. + */ - int unified_bed_leveling::g29_verbose_level, - unified_bed_leveling::g29_phase_value, - unified_bed_leveling::g29_repetition_cnt, - unified_bed_leveling::g29_storage_slot = 0, - unified_bed_leveling::g29_map_type; - bool unified_bed_leveling::g29_c_flag; - float unified_bed_leveling::g29_card_thickness = 0, - unified_bed_leveling::g29_constant = 0; - xy_bool_t unified_bed_leveling::xy_seen; - xy_pos_t unified_bed_leveling::g29_pos; +G29_parameters_t unified_bed_leveling::param; - #if HAS_BED_PROBE - int unified_bed_leveling::g29_grid_size; - #endif +void unified_bed_leveling::G29() { - /** - * G29: Unified Bed Leveling by Roxy - * - * Parameters understood by this leveling system: - * - * A Activate Activate the Unified Bed Leveling system. - * - * B # Business Use the 'Business Card' mode of the Manual Probe subsystem with P2. - * Note: A non-compressible Spark Gap feeler gauge is recommended over a business card. - * In this mode of G29 P2, a business or index card is used as a shim that the nozzle can - * grab onto as it is lowered. In principle, the nozzle-bed distance is the same when the - * same resistance is felt in the shim. You can omit the numerical value on first invocation - * of G29 P2 B to measure shim thickness. Subsequent use of 'B' will apply the previously- - * measured thickness by default. - * - * C Continue G29 P1 C continues the generation of a partially-constructed Mesh without invalidating - * previous measurements. - * - * C G29 P2 C tells the Manual Probe subsystem to not use the current nozzle - * location in its search for the closest unmeasured Mesh Point. Instead, attempt to - * start at one end of the uprobed points and Continue sequentially. - * - * G29 P3 C specifies the Constant for the fill. Otherwise, uses a "reasonable" value. - * - * C Current G29 Z C uses the Current location (instead of bed center or nearest edge). - * - * D Disable Disable the Unified Bed Leveling system. - * - * E Stow_probe Stow the probe after each sampled point. - * - * F # Fade Fade the amount of Mesh Based Compensation over a specified height. At the - * specified height, no correction is applied and natural printer kenimatics take over. If no - * number is specified for the command, 10mm is assumed to be reasonable. - * - * H # Height With P2, 'H' specifies the Height to raise the nozzle after each manual probe of the bed. - * If omitted, the nozzle will raise by Z_CLEARANCE_BETWEEN_PROBES. - * - * H # Offset With P4, 'H' specifies the Offset above the mesh height to place the nozzle. - * If omitted, Z_CLEARANCE_BETWEEN_PROBES will be used. - * - * I # Invalidate Invalidate the specified number of Mesh Points near the given 'X' 'Y'. If X or Y are omitted, - * the nozzle location is used. If no 'I' value is given, only the point nearest to the location - * is invalidated. Use 'T' to produce a map afterward. This command is useful to invalidate a - * portion of the Mesh so it can be adjusted using other UBL tools. When attempting to invalidate - * an isolated bad mesh point, the 'T' option shows the nozzle position in the Mesh with (#). You - * can move the nozzle around and use this feature to select the center of the area (or cell) to - * invalidate. - * - * J # Grid Perform a Grid Based Leveling of the current Mesh using a grid with n points on a side. - * Not specifying a grid size will invoke the 3-Point leveling function. - * - * L Load Load Mesh from the previously activated location in the EEPROM. - * - * L # Load Load Mesh from the specified location in the EEPROM. Set this location as activated - * for subsequent Load and Store operations. - * - * The P or Phase commands are used for the bulk of the work to setup a Mesh. In general, your Mesh will - * start off being initialized with a G29 P0 or a G29 P1. Further refinement of the Mesh happens with - * each additional Phase that processes it. - * - * P0 Phase 0 Zero Mesh Data and turn off the Mesh Compensation System. This reverts the - * 3D Printer to the same state it was in before the Unified Bed Leveling Compensation - * was turned on. Setting the entire Mesh to Zero is a special case that allows - * a subsequent G or T leveling operation for backward compatibility. - * - * P1 Phase 1 Invalidate entire Mesh and continue with automatic generation of the Mesh data using - * the Z-Probe. Usually the probe can't reach all areas that the nozzle can reach. For delta - * printers only the areas where the probe and nozzle can both reach will be automatically probed. - * - * Unreachable points will be handled in Phase 2 and Phase 3. - * - * Use 'C' to leave the previous mesh intact and automatically probe needed points. This allows you - * to invalidate parts of the Mesh but still use Automatic Probing. - * - * The 'X' and 'Y' parameters prioritize where to try and measure points. If omitted, the current - * probe position is used. - * - * Use 'T' (Topology) to generate a report of mesh generation. - * - * P1 will suspend Mesh generation if the controller button is held down. Note that you may need - * to press and hold the switch for several seconds if moves are underway. - * - * P2 Phase 2 Probe unreachable points. - * - * Use 'H' to set the height between Mesh points. If omitted, Z_CLEARANCE_BETWEEN_PROBES is used. - * Smaller values will be quicker. Move the nozzle down till it barely touches the bed. Make sure the - * nozzle is clean and unobstructed. Use caution and move slowly. This can damage your printer! - * (Uses SIZE_OF_LITTLE_RAISE mm if the nozzle is moving less than BIG_RAISE_NOT_NEEDED mm.) - * - * The 'H' value can be negative if the Mesh dips in a large area. Press and hold the - * controller button to terminate the current Phase 2 command. You can then re-issue "G29 P 2" - * with an 'H' parameter more suitable for the area you're manually probing. Note that the command - * tries to start in a corner of the bed where movement will be predictable. Override the distance - * calculation location with the X and Y parameters. You can print a Mesh Map (G29 T) to see where - * the mesh is invalidated and where the nozzle needs to move to complete the command. Use 'C' to - * indicate that the search should be based on the current position. - * - * The 'B' parameter for this command is described above. It places the manual probe subsystem into - * Business Card mode where the thickness of a business card is measured and then used to accurately - * set the nozzle height in all manual probing for the duration of the command. A Business card can - * be used, but you'll get better results with a flexible Shim that doesn't compress. This makes it - * easier to produce similar amounts of force and get more accurate measurements. Google if you're - * not sure how to use a shim. - * - * The 'T' (Map) parameter helps track Mesh building progress. - * - * NOTE: P2 requires an LCD controller! - * - * P3 Phase 3 Fill the unpopulated regions of the Mesh with a fixed value. There are two different paths to - * go down: - * - * - If a 'C' constant is specified, the closest invalid mesh points to the nozzle will be filled, - * and a repeat count can then also be specified with 'R'. - * - * - Leaving out 'C' invokes Smart Fill, which scans the mesh from the edges inward looking for - * invalid mesh points. Adjacent points are used to determine the bed slope. If the bed is sloped - * upward from the invalid point, it takes the value of the nearest point. If sloped downward, it's - * replaced by a value that puts all three points in a line. This version of G29 P3 is a quick, easy - * and (usually) safe way to populate unprobed mesh regions before continuing to G26 Mesh Validation - * Pattern. Note that this populates the mesh with unverified values. Pay attention and use caution. - * - * P4 Phase 4 Fine tune the Mesh. The Delta Mesh Compensation System assumes the existence of - * an LCD Panel. It is possible to fine tune the mesh without an LCD Panel using - * G42 and M421. See the UBL documentation for further details. - * - * Phase 4 is meant to be used with G26 Mesh Validation to fine tune the mesh by direct editing - * of Mesh Points. Raise and lower points to fine tune the mesh until it gives consistently reliable - * adhesion. - * - * P4 moves to the closest Mesh Point (and/or the given X Y), raises the nozzle above the mesh height - * by the given 'H' offset (or default 0), and waits while the controller is used to adjust the nozzle - * height. On click the displayed height is saved in the mesh. - * - * Start Phase 4 at a specific location with X and Y. Adjust a specific number of Mesh Points with - * the 'R' (Repeat) parameter. (If 'R' is left out, the whole matrix is assumed.) This command can be - * terminated early (e.g., after editing the area of interest) by pressing and holding the encoder button. - * - * The general form is G29 P4 [R points] [X position] [Y position] - * - * The H [offset] parameter is useful if a shim is used to fine-tune the mesh. For a 0.4mm shim the - * command would be G29 P4 H0.4. The nozzle is moved to the shim height, you adjust height to the shim, - * and on click the height minus the shim thickness will be saved in the mesh. - * - * !!Use with caution, as a very poor mesh could cause the nozzle to crash into the bed!! - * - * NOTE: P4 is not available unless you have LCD support enabled! - * - * P5 Phase 5 Find Mean Mesh Height and Standard Deviation. Typically, it is easier to use and - * work with the Mesh if it is Mean Adjusted. You can specify a C parameter to - * Correct the Mesh to a 0.00 Mean Height. Adding a C parameter will automatically - * execute a G29 P6 C . - * - * P6 Phase 6 Shift Mesh height. The entire Mesh's height is adjusted by the height specified - * with the C parameter. Being able to adjust the height of a Mesh is useful tool. It - * can be used to compensate for poorly calibrated Z-Probes and other errors. Ideally, - * you should have the Mesh adjusted for a Mean Height of 0.00 and the Z-Probe measuring - * 0.000 at the Z Home location. - * - * Q Test Load specified Test Pattern to assist in checking correct operation of system. This - * command is not anticipated to be of much value to the typical user. It is intended - * for developers to help them verify correct operation of the Unified Bed Leveling System. - * - * R # Repeat Repeat this command the specified number of times. If no number is specified the - * command will be repeated GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y times. - * - * S Store Store the current Mesh in the Activated area of the EEPROM. It will also store the - * current state of the Unified Bed Leveling system in the EEPROM. - * - * S # Store Store the current Mesh at the specified location in EEPROM. Activate this location - * for subsequent Load and Store operations. Valid storage slot numbers begin at 0 and - * extend to a limit related to the available EEPROM storage. - * - * S -1 Store Print the current Mesh as G-code that can be used to restore the mesh anytime. - * - * T Topology Display the Mesh Map Topology. - * 'T' can be used alone (e.g., G29 T) or in combination with most of the other commands. - * This option works with all Phase commands (e.g., G29 P4 R 5 T X 50 Y100 C -.1 O) - * This parameter can also specify a Map Type. T0 (the default) is user-readable. T1 - * is suitable to paste into a spreadsheet for a 3D graph of the mesh. - * - * U Unlevel Perform a probe of the outer perimeter to assist in physically leveling unlevel beds. - * Only used for G29 P1 T U. This speeds up the probing of the edge of the bed. Useful - * when the entire bed doesn't need to be probed because it will be adjusted. - * - * V # Verbosity Set the verbosity level (0-4) for extra details. (Default 0) - * - * X # X Location for this command - * - * Y # Y Location for this command - * - * With UBL_DEVEL_DEBUGGING: - * - * K # Kompare Kompare current Mesh with stored Mesh #, replacing current Mesh with the result. - * This command literally performs a diff between two Meshes. - * - * Q-1 Dump EEPROM Dump the UBL contents stored in EEPROM as HEX format. Useful for developers to help - * verify correct operation of the UBL. - * - * W What? Display valuable UBL data. - * - * - * Release Notes: - * You MUST do M502, M500 to initialize the storage. Failure to do this will cause all - * kinds of problems. Enabling EEPROM Storage is required. - * - * When you do a G28 and G29 P1 to automatically build your first mesh, you are going to notice that - * UBL probes points increasingly further from the starting location. (The starting location defaults - * to the center of the bed.) In contrast, ABL and MBL follow a zigzag pattern. The spiral pattern is - * especially better for Delta printers, since it populates the center of the mesh first, allowing for - * a quicker test print to verify settings. You don't need to populate the entire mesh to use it. - * After all, you don't want to spend a lot of time generating a mesh only to realize the resolution - * or probe offsets are incorrect. Mesh-generation gathers points starting closest to the nozzle unless - * an (X,Y) coordinate pair is given. - * - * Unified Bed Leveling uses a lot of EEPROM storage to hold its data, and it takes some effort to get - * the mesh just right. To prevent this valuable data from being destroyed as the EEPROM structure - * evolves, UBL stores all mesh data at the end of EEPROM. - * - * UBL is founded on Edward Patel's Mesh Bed Leveling code. A big 'Thanks!' to him and the creators of - * 3-Point and Grid Based leveling. Combining their contributions we now have the functionality and - * features of all three systems combined. - */ + bool probe_deployed = false; + if (G29_parse_parameters()) return; // Abort on parameter error - void unified_bed_leveling::G29() { + const uint8_t p_val = parser.byteval('P'); + const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J'); + #if HAS_MULTI_HOTEND + const uint8_t old_tool_index = active_extruder; + #endif - bool probe_deployed = false; - if (g29_parameter_parsing()) return; // Abort on parameter error + // Check for commands that require the printer to be homed + if (may_move) { + planner.synchronize(); + // Send 'N' to force homing before G29 (internal only) + if (axes_should_home() || parser.seen_test('N')) gcode.home_all_axes(); + TERN_(HAS_MULTI_HOTEND, if (active_extruder) tool_change(0)); + } - const int8_t p_val = parser.intval('P', -1); - const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen('J'); - TERN_(HAS_MULTI_HOTEND, const uint8_t old_tool_index = active_extruder); + // Invalidate one or more nearby mesh points, possibly all. + if (parser.seen('I')) { + uint8_t count = parser.has_value() ? parser.value_byte() : 1; + bool invalidate_all = count >= GRID_MAX_POINTS; + if (!invalidate_all) { + while (count--) { + if ((count & 0x0F) == 0x0F) idle(); + const mesh_index_pair closest = find_closest_mesh_point_of_type(REAL, param.XY_pos); + // No more REAL mesh points to invalidate? Assume the user meant + // to invalidate the ENTIRE mesh, which can't be done with + // find_closest_mesh_point (which only returns REAL points). + if (closest.pos.x < 0) { invalidate_all = true; break; } + z_values[closest.pos.x][closest.pos.y] = NAN; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(closest.pos, 0.0f)); + } + } + if (invalidate_all) { + invalidate(); + SERIAL_ECHOPGM("Entire Mesh"); + } + else + SERIAL_ECHOPGM("Locations"); + SERIAL_ECHOLNPGM(" invalidated.\n"); + } - // Check for commands that require the printer to be homed - if (may_move) { - planner.synchronize(); - // Send 'N' to force homing before G29 (internal only) - if (axes_should_home() || parser.seen('N')) gcode.home_all_axes(); - TERN_(HAS_MULTI_HOTEND, if (active_extruder) tool_change(0)); + if (parser.seen('Q')) { + const int16_t test_pattern = parser.has_value() ? parser.value_int() : -99; + if (!WITHIN(test_pattern, -1, 2)) { + SERIAL_ECHOLNPGM("Invalid test_pattern value. (-1 to 2)\n"); + return; } + SERIAL_ECHOLNPGM("Loading test_pattern values.\n"); + switch (test_pattern) { - // Invalidate Mesh Points. This command is a little bit asymmetrical because - // it directly specifies the repetition count and does not use the 'R' parameter. - if (parser.seen('I')) { - uint8_t cnt = 0; - g29_repetition_cnt = parser.has_value() ? parser.value_int() : 1; - if (g29_repetition_cnt >= GRID_MAX_POINTS) { - set_all_mesh_points_to_value(NAN); - } - else { - while (g29_repetition_cnt--) { - if (cnt > 20) { cnt = 0; idle(); } - const mesh_index_pair closest = find_closest_mesh_point_of_type(REAL, g29_pos); - const xy_int8_t &cpos = closest.pos; - if (cpos.x < 0) { - // No more REAL mesh points to invalidate, so we ASSUME the user - // meant to invalidate the ENTIRE mesh, which cannot be done with - // find_closest_mesh_point loop which only returns REAL points. - set_all_mesh_points_to_value(NAN); - SERIAL_ECHOLNPGM("Entire Mesh invalidated.\n"); - break; // No more invalid Mesh Points to populate - } - z_values[cpos.x][cpos.y] = NAN; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(cpos, 0.0f)); - cnt++; + case -1: TERN_(UBL_DEVEL_DEBUGGING, g29_eeprom_dump()); break; + + case 0: + GRID_LOOP(x, y) { // Create a bowl shape similar to a poorly-calibrated Delta + const float p1 = 0.5f * (GRID_MAX_POINTS_X) - x, + p2 = 0.5f * (GRID_MAX_POINTS_Y) - y; + z_values[x][y] += 2.0f * HYPOT(p1, p2); + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); } - } - SERIAL_ECHOLNPGM("Locations invalidated.\n"); - } + break; - if (parser.seen('Q')) { - const int test_pattern = parser.has_value() ? parser.value_int() : -99; - if (!WITHIN(test_pattern, -1, 2)) { - SERIAL_ECHOLNPGM("Invalid test_pattern value. (-1 to 2)\n"); - return; - } - SERIAL_ECHOLNPGM("Loading test_pattern values.\n"); - switch (test_pattern) { + case 1: + LOOP_L_N(x, GRID_MAX_POINTS_X) { // Create a diagonal line several Mesh cells thick that is raised + z_values[x][x] += 9.999f; + z_values[x][x + (x < (GRID_MAX_POINTS_Y) - 1) ? 1 : -1] += 9.999f; // We want the altered line several mesh points thick + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onMeshUpdate(x, x, z_values[x][x]); + ExtUI::onMeshUpdate(x, (x + (x < (GRID_MAX_POINTS_Y) - 1) ? 1 : -1), z_values[x][x + (x < (GRID_MAX_POINTS_Y) - 1) ? 1 : -1]); + #endif - #if ENABLED(UBL_DEVEL_DEBUGGING) - case -1: - g29_eeprom_dump(); - break; - #endif + } + break; - case 0: - GRID_LOOP(x, y) { // Create a bowl shape similar to a poorly-calibrated Delta - const float p1 = 0.5f * (GRID_MAX_POINTS_X) - x, - p2 = 0.5f * (GRID_MAX_POINTS_Y) - y; - z_values[x][y] += 2.0f * HYPOT(p1, p2); + case 2: + // Allow the user to specify the height because 10mm is a little extreme in some cases. + for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++) // Create a rectangular raised area in + for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) { // the center of the bed + z_values[x][y] += parser.seen_test('C') ? param.C_constant : 9.99f; TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); } - break; - - case 1: - LOOP_L_N(x, GRID_MAX_POINTS_X) { // Create a diagonal line several Mesh cells thick that is raised - z_values[x][x] += 9.999f; - z_values[x][x + (x < (GRID_MAX_POINTS_Y) - 1) ? 1 : -1] += 9.999f; // We want the altered line several mesh points thick - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onMeshUpdate(x, x, z_values[x][x]); - ExtUI::onMeshUpdate(x, (x + (x < (GRID_MAX_POINTS_Y) - 1) ? 1 : -1), z_values[x][x + (x < (GRID_MAX_POINTS_Y) - 1) ? 1 : -1]); - #endif + break; + } + } - } - break; - - case 2: - // Allow the user to specify the height because 10mm is a little extreme in some cases. - for (uint8_t x = (GRID_MAX_POINTS_X) / 3; x < 2 * (GRID_MAX_POINTS_X) / 3; x++) // Create a rectangular raised area in - for (uint8_t y = (GRID_MAX_POINTS_Y) / 3; y < 2 * (GRID_MAX_POINTS_Y) / 3; y++) { // the center of the bed - z_values[x][y] += parser.seen('C') ? g29_constant : 9.99f; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); - } - break; - } + #if HAS_BED_PROBE + + if (parser.seen_test('J')) { + save_ubl_active_state_and_disable(); + tilt_mesh_based_on_probed_grid(param.J_grid_size == 0); // Zero size does 3-Point + restore_ubl_active_state_and_leave(); + #if ENABLED(UBL_G29_J_RECENTER) + do_blocking_move_to_xy(0.5f * ((MESH_MIN_X) + (MESH_MAX_X)), 0.5f * ((MESH_MIN_Y) + (MESH_MAX_Y))); + #endif + report_current_position(); + probe_deployed = true; } - #if HAS_BED_PROBE + #endif // HAS_BED_PROBE - if (parser.seen('J')) { - save_ubl_active_state_and_disable(); - tilt_mesh_based_on_probed_grid(g29_grid_size == 0); // Zero size does 3-Point - restore_ubl_active_state_and_leave(); - #if ENABLED(UBL_G29_J_RECENTER) - do_blocking_move_to_xy(0.5f * ((MESH_MIN_X) + (MESH_MAX_X)), 0.5f * ((MESH_MIN_Y) + (MESH_MAX_Y))); - #endif - report_current_position(); - probe_deployed = true; - } + if (parser.seen_test('P')) { + if (WITHIN(param.P_phase, 0, 1) && storage_slot == -1) { + storage_slot = 0; + SERIAL_ECHOLNPGM("Default storage slot 0 selected."); + } - #endif // HAS_BED_PROBE + switch (param.P_phase) { + case 0: + // + // Zero Mesh Data + // + reset(); + SERIAL_ECHOLNPGM("Mesh zeroed."); + break; - if (parser.seen('P')) { - if (WITHIN(g29_phase_value, 0, 1) && storage_slot == -1) { - storage_slot = 0; - SERIAL_ECHOLNPGM("Default storage slot 0 selected."); - } + #if HAS_BED_PROBE - switch (g29_phase_value) { - case 0: + case 1: { // - // Zero Mesh Data + // Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe // - reset(); - SERIAL_ECHOLNPGM("Mesh zeroed."); - break; - - #if HAS_BED_PROBE - - case 1: { - // - // Invalidate Entire Mesh and Automatically Probe Mesh in areas that can be reached by the probe - // - if (!parser.seen('C')) { - invalidate(); - SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh."); - } - if (g29_verbose_level > 1) { - SERIAL_ECHOPAIR("Probing around (", g29_pos.x); - SERIAL_CHAR(','); - SERIAL_DECIMAL(g29_pos.y); - SERIAL_ECHOLNPGM(").\n"); - } - const xy_pos_t near_probe_xy = g29_pos + probe.offset_xy; - probe_entire_mesh(near_probe_xy, parser.seen('T'), parser.seen('E'), parser.seen('U')); + if (!parser.seen_test('C')) { + invalidate(); + SERIAL_ECHOLNPGM("Mesh invalidated. Probing mesh."); + } + if (param.V_verbosity > 1) { + SERIAL_ECHOPGM("Probing around (", param.XY_pos.x); + SERIAL_CHAR(','); + SERIAL_DECIMAL(param.XY_pos.y); + SERIAL_ECHOLNPGM(").\n"); + } + probe_entire_mesh(param.XY_pos, parser.seen_test('T'), parser.seen_test('E'), parser.seen_test('U')); - report_current_position(); - probe_deployed = true; - } break; - - #endif // HAS_BED_PROBE - - case 2: { - #if HAS_LCD_MENU - // - // Manually Probe Mesh in areas that can't be reached by the probe - // - SERIAL_ECHOLNPGM("Manually probing unreachable points."); - do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES); - - if (parser.seen('C') && !xy_seen) { - - /** - * Use a good default location for the path. - * The flipped > and < operators in these comparisons is intentional. - * It should cause the probed points to follow a nice path on Cartesian printers. - * It may make sense to have Delta printers default to the center of the bed. - * Until that is decided, this can be forced with the X and Y parameters. - */ - g29_pos.set( - #if IS_KINEMATIC - X_HOME_POS, Y_HOME_POS - #else - probe.offset_xy.x > 0 ? X_BED_SIZE : 0, - probe.offset_xy.y < 0 ? Y_BED_SIZE : 0 - #endif - ); - } + report_current_position(); + probe_deployed = true; + } break; - if (parser.seen('B')) { - g29_card_thickness = parser.has_value() ? parser.value_float() : measure_business_card_thickness(); - if (ABS(g29_card_thickness) > 1.5f) { - SERIAL_ECHOLNPGM("?Error in Business Card measurement."); - return; - } - probe_deployed = true; - } + #endif // HAS_BED_PROBE - if (!position_is_reachable(g29_pos)) { - SERIAL_ECHOLNPGM("XY outside printable radius."); + case 2: { + #if HAS_LCD_MENU + // + // Manually Probe Mesh in areas that can't be reached by the probe + // + SERIAL_ECHOLNPGM("Manually probing unreachable points."); + do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES); + + if (parser.seen_test('C') && !param.XY_seen) { + + /** + * Use a good default location for the path. + * The flipped > and < operators in these comparisons is intentional. + * It should cause the probed points to follow a nice path on Cartesian printers. + * It may make sense to have Delta printers default to the center of the bed. + * Until that is decided, this can be forced with the X and Y parameters. + */ + param.XY_pos.set( + #if IS_KINEMATIC + X_HOME_POS, Y_HOME_POS + #else + probe.offset_xy.x > 0 ? X_BED_SIZE : 0, + probe.offset_xy.y < 0 ? Y_BED_SIZE : 0 + #endif + ); + } + + if (parser.seen('B')) { + param.B_shim_thickness = parser.has_value() ? parser.value_float() : measure_business_card_thickness(); + if (ABS(param.B_shim_thickness) > 1.5f) { + SERIAL_ECHOLNPGM("?Error in Business Card measurement."); return; } + probe_deployed = true; + } - const float height = parser.floatval('H', Z_CLEARANCE_BETWEEN_PROBES); - manually_probe_remaining_mesh(g29_pos, height, g29_card_thickness, parser.seen('T')); + if (!position_is_reachable(param.XY_pos)) { + SERIAL_ECHOLNPGM("XY outside printable radius."); + return; + } - SERIAL_ECHOLNPGM("G29 P2 finished."); + const float height = parser.floatval('H', Z_CLEARANCE_BETWEEN_PROBES); + manually_probe_remaining_mesh(param.XY_pos, height, param.B_shim_thickness, parser.seen_test('T')); - report_current_position(); + SERIAL_ECHOLNPGM("G29 P2 finished."); - #else + report_current_position(); - SERIAL_ECHOLNPGM("?P2 is only available when an LCD is present."); - return; + #else - #endif - } break; + SERIAL_ECHOLNPGM("?P2 is only available when an LCD is present."); + return; - case 3: { - /** - * Populate invalid mesh areas. Proceed with caution. - * Two choices are available: - * - Specify a constant with the 'C' parameter. - * - Allow 'G29 P3' to choose a 'reasonable' constant. - */ - - if (g29_c_flag) { - if (g29_repetition_cnt >= GRID_MAX_POINTS) { - set_all_mesh_points_to_value(g29_constant); - } - else { - while (g29_repetition_cnt--) { // this only populates reachable mesh points near - const mesh_index_pair closest = find_closest_mesh_point_of_type(INVALID, g29_pos); - const xy_int8_t &cpos = closest.pos; - if (cpos.x < 0) { - // No more REAL INVALID mesh points to populate, so we ASSUME - // user meant to populate ALL INVALID mesh points to value - GRID_LOOP(x, y) if (isnan(z_values[x][y])) z_values[x][y] = g29_constant; - break; // No more invalid Mesh Points to populate - } - else { - z_values[cpos.x][cpos.y] = g29_constant; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(cpos, g29_constant)); - } - } - } + #endif + } break; + + case 3: { + /** + * Populate invalid mesh areas. Proceed with caution. + * Two choices are available: + * - Specify a constant with the 'C' parameter. + * - Allow 'G29 P3' to choose a 'reasonable' constant. + */ + + if (param.C_seen) { + if (param.R_repetition >= GRID_MAX_POINTS) { + set_all_mesh_points_to_value(param.C_constant); } else { - const float cvf = parser.value_float(); - switch ((int)TRUNC(cvf * 10.0f) - 30) { // 3.1 -> 1 - #if ENABLED(UBL_G29_P31) - case 1: { - - // P3.1 use least squares fit to fill missing mesh values - // P3.10 zero weighting for distance, all grid points equal, best fit tilted plane - // P3.11 10X weighting for nearest grid points versus farthest grid points - // P3.12 100X distance weighting - // P3.13 1000X distance weighting, approaches simple average of nearest points - - const float weight_power = (cvf - 3.10f) * 100.0f, // 3.12345 -> 2.345 - weight_factor = weight_power ? POW(10.0f, weight_power) : 0; - smart_fill_wlsf(weight_factor); - } - break; - #endif - case 0: // P3 or P3.0 - default: // and anything P3.x that's not P3.1 - smart_fill_mesh(); // Do a 'Smart' fill using nearby known values - break; + while (param.R_repetition--) { // this only populates reachable mesh points near + const mesh_index_pair closest = find_closest_mesh_point_of_type(INVALID, param.XY_pos); + const xy_int8_t &cpos = closest.pos; + if (cpos.x < 0) { + // No more REAL INVALID mesh points to populate, so we ASSUME + // user meant to populate ALL INVALID mesh points to value + GRID_LOOP(x, y) if (isnan(z_values[x][y])) z_values[x][y] = param.C_constant; + break; // No more invalid Mesh Points to populate + } + else { + z_values[cpos.x][cpos.y] = param.C_constant; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(cpos, param.C_constant)); + } } } - break; } - - case 4: // Fine Tune (i.e., Edit) the Mesh - #if HAS_LCD_MENU - fine_tune_mesh(g29_pos, parser.seen('T')); - #else - SERIAL_ECHOLNPGM("?P4 is only available when an LCD is present."); - return; - #endif - break; - - case 5: adjust_mesh_to_mean(g29_c_flag, g29_constant); break; - - case 6: shift_mesh_height(); break; + else { + const float cvf = parser.value_float(); + switch ((int)TRUNC(cvf * 10.0f) - 30) { // 3.1 -> 1 + #if ENABLED(UBL_G29_P31) + case 1: { + + // P3.1 use least squares fit to fill missing mesh values + // P3.10 zero weighting for distance, all grid points equal, best fit tilted plane + // P3.11 10X weighting for nearest grid points versus farthest grid points + // P3.12 100X distance weighting + // P3.13 1000X distance weighting, approaches simple average of nearest points + + const float weight_power = (cvf - 3.10f) * 100.0f, // 3.12345 -> 2.345 + weight_factor = weight_power ? POW(10.0f, weight_power) : 0; + smart_fill_wlsf(weight_factor); + } + break; + #endif + case 0: // P3 or P3.0 + default: // and anything P3.x that's not P3.1 + smart_fill_mesh(); // Do a 'Smart' fill using nearby known values + break; + } + } + break; } - } - #if ENABLED(UBL_DEVEL_DEBUGGING) - - // - // Much of the 'What?' command can be eliminated. But until we are fully debugged, it is - // good to have the extra information. Soon... we prune this to just a few items - // - if (parser.seen('W')) g29_what_command(); + case 4: // Fine Tune (i.e., Edit) the Mesh + #if HAS_LCD_MENU + fine_tune_mesh(param.XY_pos, parser.seen_test('T')); + #else + SERIAL_ECHOLNPGM("?P4 is only available when an LCD is present."); + return; + #endif + break; - // - // When we are fully debugged, this may go away. But there are some valid - // use cases for the users. So we can wait and see what to do with it. - // + case 5: adjust_mesh_to_mean(param.C_seen, param.C_constant); break; - if (parser.seen('K')) // Kompare Current Mesh Data to Specified Stored Mesh - g29_compare_current_mesh_to_stored_mesh(); + case 6: shift_mesh_height(); break; + } + } - #endif // UBL_DEVEL_DEBUGGING + #if ENABLED(UBL_DEVEL_DEBUGGING) + // + // Much of the 'What?' command can be eliminated. But until we are fully debugged, it is + // good to have the extra information. Soon... we prune this to just a few items + // + if (parser.seen_test('W')) g29_what_command(); // - // Load a Mesh from the EEPROM + // When we are fully debugged, this may go away. But there are some valid + // use cases for the users. So we can wait and see what to do with it. // - if (parser.seen('L')) { // Load Current Mesh Data - g29_storage_slot = parser.has_value() ? parser.value_int() : storage_slot; + if (parser.seen('K')) // Kompare Current Mesh Data to Specified Stored Mesh + g29_compare_current_mesh_to_stored_mesh(); - int16_t a = settings.calc_num_meshes(); + #endif // UBL_DEVEL_DEBUGGING - if (!a) { - SERIAL_ECHOLNPGM("?EEPROM storage not available."); - return; - } - if (!WITHIN(g29_storage_slot, 0, a - 1)) { - SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1); - return; - } + // + // Load a Mesh from the EEPROM + // - settings.load_mesh(g29_storage_slot); - storage_slot = g29_storage_slot; + if (parser.seen('L')) { // Load Current Mesh Data + param.KLS_storage_slot = parser.has_value() ? (int8_t)parser.value_int() : storage_slot; - SERIAL_ECHOLNPGM("Done."); + int16_t a = settings.calc_num_meshes(); + + if (!a) { + SERIAL_ECHOLNPGM("?EEPROM storage not available."); + return; } - // - // Store a Mesh in the EEPROM - // + if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) { + SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1); + return; + } - if (parser.seen('S')) { // Store (or Save) Current Mesh Data - g29_storage_slot = parser.has_value() ? parser.value_int() : storage_slot; + settings.load_mesh(param.KLS_storage_slot); + storage_slot = param.KLS_storage_slot; - if (g29_storage_slot == -1) // Special case, the user wants to 'Export' the mesh to the - return report_current_mesh(); // host program to be saved on the user's computer + SERIAL_ECHOLNPGM(STR_DONE); + } - int16_t a = settings.calc_num_meshes(); + // + // Store a Mesh in the EEPROM + // - if (!a) { - SERIAL_ECHOLNPGM("?EEPROM storage not available."); - goto LEAVE; - } + if (parser.seen('S')) { // Store (or Save) Current Mesh Data + param.KLS_storage_slot = parser.has_value() ? (int8_t)parser.value_int() : storage_slot; - if (!WITHIN(g29_storage_slot, 0, a - 1)) { - SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1); - goto LEAVE; - } + if (param.KLS_storage_slot == -1) // Special case: 'Export' the mesh to the + return report_current_mesh(); // host so it can be saved in a file. - settings.store_mesh(g29_storage_slot); - storage_slot = g29_storage_slot; + int16_t a = settings.calc_num_meshes(); - SERIAL_ECHOLNPGM("Done."); + if (!a) { + SERIAL_ECHOLNPGM("?EEPROM storage not available."); + goto LEAVE; } - if (parser.seen('T')) - display_map(g29_map_type); + if (!WITHIN(param.KLS_storage_slot, 0, a - 1)) { + SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1); + goto LEAVE; + } - LEAVE: + settings.store_mesh(param.KLS_storage_slot); + storage_slot = param.KLS_storage_slot; - #if HAS_LCD_MENU - ui.reset_alert_level(); - ui.quick_feedback(); - ui.reset_status(); - ui.release(); - #endif + SERIAL_ECHOLNPGM(STR_DONE); + } - #ifdef Z_PROBE_END_SCRIPT - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT); - if (probe_deployed) { - planner.synchronize(); - gcode.process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); - } - #else - UNUSED(probe_deployed); - #endif + if (parser.seen_test('T')) + display_map(param.T_map_type); - TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index)); - return; - } + LEAVE: - void unified_bed_leveling::adjust_mesh_to_mean(const bool cflag, const float value) { - float sum = 0; - int n = 0; - GRID_LOOP(x, y) - if (!isnan(z_values[x][y])) { - sum += z_values[x][y]; - n++; - } + #if HAS_LCD_MENU + ui.reset_alert_level(); + ui.quick_feedback(); + ui.reset_status(); + ui.release(); + #endif - const float mean = sum / n; + #ifdef Z_PROBE_END_SCRIPT + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT); + if (probe_deployed) { + planner.synchronize(); + gcode.process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); + } + #else + UNUSED(probe_deployed); + #endif - // - // Sum the squares of difference from mean - // - float sum_of_diff_squared = 0; - GRID_LOOP(x, y) - if (!isnan(z_values[x][y])) - sum_of_diff_squared += sq(z_values[x][y] - mean); + TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index)); + return; +} - SERIAL_ECHOLNPAIR("# of samples: ", n); - SERIAL_ECHOLNPAIR_F("Mean Mesh Height: ", mean, 6); +/** + * M420 C + * G29 P5 C : Adjust Mesh To Mean (and subtract the given offset). + * Find the mean average and shift the mesh to center on that value. + */ +void unified_bed_leveling::adjust_mesh_to_mean(const bool cflag, const_float_t offset) { + float sum = 0; + uint8_t n = 0; + GRID_LOOP(x, y) + if (!isnan(z_values[x][y])) { + sum += z_values[x][y]; + n++; + } - const float sigma = SQRT(sum_of_diff_squared / (n + 1)); - SERIAL_ECHOLNPAIR_F("Standard Deviation: ", sigma, 6); + const float mean = sum / n; - if (cflag) - GRID_LOOP(x, y) - if (!isnan(z_values[x][y])) { - z_values[x][y] -= mean + value; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); - } - } + // + // Sum the squares of difference from mean + // + float sum_of_diff_squared = 0; + GRID_LOOP(x, y) + if (!isnan(z_values[x][y])) + sum_of_diff_squared += sq(z_values[x][y] - mean); - void unified_bed_leveling::shift_mesh_height() { + SERIAL_ECHOLNPGM("# of samples: ", n); + SERIAL_ECHOLNPAIR_F("Mean Mesh Height: ", mean, 6); + + const float sigma = SQRT(sum_of_diff_squared / (n + 1)); + SERIAL_ECHOLNPAIR_F("Standard Deviation: ", sigma, 6); + + if (cflag) GRID_LOOP(x, y) if (!isnan(z_values[x][y])) { - z_values[x][y] += g29_constant; + z_values[x][y] -= mean + offset; TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); } - } - - #if HAS_BED_PROBE - /** - * Probe all invalidated locations of the mesh that can be reached by the probe. - * This attempts to fill in locations closest to the nozzle's start location first. - */ - void unified_bed_leveling::probe_entire_mesh(const xy_pos_t &nearby, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) { - probe.deploy(); // Deploy before ui.capture() to allow for PAUSE_BEFORE_DEPLOY_STOW - - TERN_(HAS_LCD_MENU, ui.capture()); - - save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained - uint8_t count = GRID_MAX_POINTS; +} - mesh_index_pair best; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(best.pos, ExtUI::MESH_START)); - do { - if (do_ubl_mesh_map) display_map(g29_map_type); +/** + * G29 P6 C : Shift Mesh Height by a uniform constant. + */ +void unified_bed_leveling::shift_mesh_height() { + GRID_LOOP(x, y) + if (!isnan(z_values[x][y])) { + z_values[x][y] += param.C_constant; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); + } +} - const int point_num = (GRID_MAX_POINTS) - count + 1; - SERIAL_ECHOLNPAIR("Probing mesh point ", point_num, "/", int(GRID_MAX_POINTS), "."); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), point_num, int(GRID_MAX_POINTS))); +#if HAS_BED_PROBE + /** + * G29 P1 T V : Probe Entire Mesh + * Probe all invalidated locations of the mesh that can be reached by the probe. + * This attempts to fill in locations closest to the nozzle's start location first. + */ + void unified_bed_leveling::probe_entire_mesh(const xy_pos_t &nearby, const bool do_ubl_mesh_map, const bool stow_probe, const bool do_furthest) { + probe.deploy(); // Deploy before ui.capture() to allow for PAUSE_BEFORE_DEPLOY_STOW + + TERN_(HAS_LCD_MENU, ui.capture()); + + save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained + uint8_t count = GRID_MAX_POINTS; + + mesh_index_pair best; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(best.pos, ExtUI::G29_START)); + do { + if (do_ubl_mesh_map) display_map(param.T_map_type); + + const uint8_t point_num = (GRID_MAX_POINTS - count) + 1; + SERIAL_ECHOLNPGM("Probing mesh point ", point_num, "/", GRID_MAX_POINTS, "."); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), point_num, int(GRID_MAX_POINTS))); + + #if HAS_LCD_MENU + if (ui.button_pressed()) { + ui.quick_feedback(false); // Preserve button state for click-and-hold + SERIAL_ECHOLNPGM("\nMesh only partially populated.\n"); + ui.wait_for_release(); + ui.quick_feedback(); + ui.release(); + probe.stow(); // Release UI before stow to allow for PAUSE_BEFORE_DEPLOY_STOW + return restore_ubl_active_state_and_leave(); + } + #endif - #if HAS_LCD_MENU - if (ui.button_pressed()) { - ui.quick_feedback(false); // Preserve button state for click-and-hold - SERIAL_ECHOLNPGM("\nMesh only partially populated.\n"); - ui.wait_for_release(); - ui.quick_feedback(); - ui.release(); - probe.stow(); // Release UI before stow to allow for PAUSE_BEFORE_DEPLOY_STOW - return restore_ubl_active_state_and_leave(); - } + best = do_furthest + ? find_furthest_invalid_mesh_point() + : find_closest_mesh_point_of_type(INVALID, nearby, true); + + if (best.pos.x >= 0) { // mesh point found and is reachable by probe + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(best.pos, ExtUI::G29_POINT_START)); + const float measured_z = probe.probe_at_point( + best.meshpos(), + stow_probe ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity + ); + z_values[best.pos.x][best.pos.y] = measured_z; + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onMeshUpdate(best.pos, ExtUI::G29_POINT_FINISH); + ExtUI::onMeshUpdate(best.pos, measured_z); #endif + } + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. - best = do_furthest - ? find_furthest_invalid_mesh_point() - : find_closest_mesh_point_of_type(INVALID, nearby, true); - - if (best.pos.x >= 0) { // mesh point found and is reachable by probe - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(best.pos, ExtUI::PROBE_START)); - const float measured_z = probe.probe_at_point( - best.meshpos(), - stow_probe ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level - ); - z_values[best.pos.x][best.pos.y] = measured_z; - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onMeshUpdate(best.pos, ExtUI::PROBE_FINISH); - ExtUI::onMeshUpdate(best.pos, measured_z); - #endif - } - SERIAL_FLUSH(); // Prevent host M105 buffer overrun. - - } while (best.pos.x >= 0 && --count); + } while (best.pos.x >= 0 && --count); - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(best.pos, ExtUI::MESH_FINISH)); + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(best.pos, ExtUI::G29_FINISH)); - // Release UI during stow to allow for PAUSE_BEFORE_DEPLOY_STOW - TERN_(HAS_LCD_MENU, ui.release()); - probe.stow(); - TERN_(HAS_LCD_MENU, ui.capture()); + // Release UI during stow to allow for PAUSE_BEFORE_DEPLOY_STOW + TERN_(HAS_LCD_MENU, ui.release()); + probe.stow(); + TERN_(HAS_LCD_MENU, ui.capture()); - probe.move_z_after_probing(); + probe.move_z_after_probing(); - restore_ubl_active_state_and_leave(); + restore_ubl_active_state_and_leave(); - do_blocking_move_to_xy( - constrain(nearby.x - probe.offset_xy.x, MESH_MIN_X, MESH_MAX_X), - constrain(nearby.y - probe.offset_xy.y, MESH_MIN_Y, MESH_MAX_Y) - ); - } + do_blocking_move_to_xy( + constrain(nearby.x - probe.offset_xy.x, MESH_MIN_X, MESH_MAX_X), + constrain(nearby.y - probe.offset_xy.y, MESH_MIN_Y, MESH_MAX_Y) + ); + } - #endif // HAS_BED_PROBE +#endif // HAS_BED_PROBE +void set_message_with_feedback(PGM_P const msg_P) { #if HAS_LCD_MENU - - typedef void (*clickFunc_t)(); - - bool click_and_hold(const clickFunc_t func=nullptr) { - if (ui.button_pressed()) { - ui.quick_feedback(false); // Preserve button state for click-and-hold - const millis_t nxt = millis() + 1500UL; - while (ui.button_pressed()) { // Loop while the encoder is pressed. Uses hardware flag! - idle(); // idle, of course - if (ELAPSED(millis(), nxt)) { // After 1.5 seconds - ui.quick_feedback(); - if (func) (*func)(); - ui.wait_for_release(); - return true; - } + ui.set_status_P(msg_P); + ui.quick_feedback(); + #else + UNUSED(msg_P); + #endif +} + +#if HAS_LCD_MENU + + typedef void (*clickFunc_t)(); + + bool _click_and_hold(const clickFunc_t func=nullptr) { + if (ui.button_pressed()) { + ui.quick_feedback(false); // Preserve button state for click-and-hold + const millis_t nxt = millis() + 1500UL; + while (ui.button_pressed()) { // Loop while the encoder is pressed. Uses hardware flag! + idle(); // idle, of course + if (ELAPSED(millis(), nxt)) { // After 1.5 seconds + ui.quick_feedback(); + if (func) (*func)(); + ui.wait_for_release(); + return true; } } - serial_delay(15); - return false; } + serial_delay(15); + return false; + } - void unified_bed_leveling::move_z_with_encoder(const float &multiplier) { - ui.wait_for_release(); - while (!ui.button_pressed()) { - idle(); - gcode.reset_stepper_timeout(); // Keep steppers powered - if (encoder_diff) { - do_blocking_move_to_z(current_position.z + float(encoder_diff) * multiplier); - encoder_diff = 0; - } + void unified_bed_leveling::move_z_with_encoder(const_float_t multiplier) { + ui.wait_for_release(); + while (!ui.button_pressed()) { + idle(); + gcode.reset_stepper_timeout(); // Keep steppers powered + if (encoder_diff) { + do_blocking_move_to_z(current_position.z + float(encoder_diff) * multiplier); + encoder_diff = 0; } } + } - float unified_bed_leveling::measure_point_with_encoder() { - KEEPALIVE_STATE(PAUSED_FOR_USER); - move_z_with_encoder(0.01f); - return current_position.z; - } + float unified_bed_leveling::measure_point_with_encoder() { + KEEPALIVE_STATE(PAUSED_FOR_USER); + const float z_step = 0.01f; + move_z_with_encoder(z_step); + return current_position.z; + } - static void echo_and_take_a_measurement() { SERIAL_ECHOLNPGM(" and take a measurement."); } + static void echo_and_take_a_measurement() { SERIAL_ECHOLNPGM(" and take a measurement."); } - float unified_bed_leveling::measure_business_card_thickness() { - ui.capture(); - save_ubl_active_state_and_disable(); // Disable bed level correction for probing + float unified_bed_leveling::measure_business_card_thickness() { + ui.capture(); + save_ubl_active_state_and_disable(); // Disable bed level correction for probing - do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), MANUAL_PROBE_START_Z); - //, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f); - planner.synchronize(); + do_blocking_move_to(0.5f * (MESH_MAX_X - (MESH_MIN_X)), 0.5f * (MESH_MAX_Y - (MESH_MIN_Y)), MANUAL_PROBE_START_Z); + //, _MIN(planner.settings.max_feedrate_mm_s[X_AXIS], planner.settings.max_feedrate_mm_s[Y_AXIS]) * 0.5f); + planner.synchronize(); - SERIAL_ECHOPGM("Place shim under nozzle"); - LCD_MESSAGEPGM(MSG_UBL_BC_INSERT); - ui.return_to_status(); - echo_and_take_a_measurement(); + SERIAL_ECHOPGM("Place shim under nozzle"); + LCD_MESSAGEPGM(MSG_UBL_BC_INSERT); + ui.return_to_status(); + echo_and_take_a_measurement(); - const float z1 = measure_point_with_encoder(); - do_blocking_move_to_z(current_position.z + SIZE_OF_LITTLE_RAISE); - planner.synchronize(); + const float z1 = measure_point_with_encoder(); + do_blocking_move_to_z(current_position.z + SIZE_OF_LITTLE_RAISE); + planner.synchronize(); - SERIAL_ECHOPGM("Remove shim"); - LCD_MESSAGEPGM(MSG_UBL_BC_REMOVE); - echo_and_take_a_measurement(); + SERIAL_ECHOPGM("Remove shim"); + LCD_MESSAGEPGM(MSG_UBL_BC_REMOVE); + echo_and_take_a_measurement(); - const float z2 = measure_point_with_encoder(); - do_blocking_move_to_z(current_position.z + Z_CLEARANCE_BETWEEN_PROBES); + const float z2 = measure_point_with_encoder(); + do_blocking_move_to_z(current_position.z + Z_CLEARANCE_BETWEEN_PROBES); - const float thickness = ABS(z1 - z2); + const float thickness = ABS(z1 - z2); - if (g29_verbose_level > 1) { - SERIAL_ECHOPAIR_F("Business Card is ", thickness, 4); - SERIAL_ECHOLNPGM("mm thick."); - } + if (param.V_verbosity > 1) { + SERIAL_ECHOPAIR_F("Business Card is ", thickness, 4); + SERIAL_ECHOLNPGM("mm thick."); + } - restore_ubl_active_state_and_leave(); + restore_ubl_active_state_and_leave(); - return thickness; - } + return thickness; + } - void unified_bed_leveling::manually_probe_remaining_mesh(const xy_pos_t &pos, const float &z_clearance, const float &thick, const bool do_ubl_mesh_map) { - ui.capture(); + /** + * G29 P2 : Manually Probe Remaining Mesh Points. + * Move to INVALID points and + * NOTE: Blocks the G-code queue and captures Marlin UI during use. + */ + void unified_bed_leveling::manually_probe_remaining_mesh(const xy_pos_t &pos, const_float_t z_clearance, const_float_t thick, const bool do_ubl_mesh_map) { + ui.capture(); - save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained - do_blocking_move_to_xy_z(current_position, z_clearance); + save_ubl_active_state_and_disable(); // No bed level correction so only raw data is obtained + do_blocking_move_to_xy_z(current_position, z_clearance); - ui.return_to_status(); + ui.return_to_status(); - mesh_index_pair location; - const xy_int8_t &lpos = location.pos; - do { - location = find_closest_mesh_point_of_type(INVALID, pos); - // It doesn't matter if the probe can't reach the NAN location. This is a manual probe. - if (!location.valid()) continue; - - const xyz_pos_t ppos = { - mesh_index_to_xpos(lpos.x), - mesh_index_to_ypos(lpos.y), - Z_CLEARANCE_BETWEEN_PROBES - }; + mesh_index_pair location; + const xy_int8_t &lpos = location.pos; + do { + location = find_closest_mesh_point_of_type(INVALID, pos); + // It doesn't matter if the probe can't reach the NAN location. This is a manual probe. + if (!location.valid()) continue; - if (!position_is_reachable(ppos)) break; // SHOULD NOT OCCUR (find_closest_mesh_point only returns reachable points) + const xyz_pos_t ppos = { + mesh_index_to_xpos(lpos.x), + mesh_index_to_ypos(lpos.y), + z_clearance + }; - LCD_MESSAGEPGM(MSG_UBL_MOVING_TO_NEXT); + if (!position_is_reachable(ppos)) break; // SHOULD NOT OCCUR (find_closest_mesh_point only returns reachable points) - do_blocking_move_to(ppos); - do_z_clearance(z_clearance); + LCD_MESSAGEPGM(MSG_UBL_MOVING_TO_NEXT); - KEEPALIVE_STATE(PAUSED_FOR_USER); - ui.capture(); + do_blocking_move_to(ppos); + do_z_clearance(z_clearance); - if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing + KEEPALIVE_STATE(PAUSED_FOR_USER); + ui.capture(); - serialprintPGM(parser.seen('B') ? GET_TEXT(MSG_UBL_BC_INSERT) : GET_TEXT(MSG_UBL_BC_INSERT2)); + if (do_ubl_mesh_map) display_map(param.T_map_type); // Show user where we're probing - const float z_step = 0.01f; // existing behavior: 0.01mm per click, occasionally step - //const float z_step = planner.steps_to_mm[Z_AXIS]; // approx one step each click + if (parser.seen_test('B')) { + SERIAL_ECHOPGM("Place Shim & Measure"); + LCD_MESSAGEPGM(MSG_UBL_BC_INSERT); + } + else { + SERIAL_ECHOPGM("Measure"); + LCD_MESSAGEPGM(MSG_UBL_BC_INSERT2); + } - move_z_with_encoder(z_step); + const float z_step = 0.01f; // 0.01mm per encoder tick, occasionally step + move_z_with_encoder(z_step); - if (click_and_hold()) { - SERIAL_ECHOLNPGM("\nMesh only partially populated."); - do_z_clearance(Z_CLEARANCE_DEPLOY_PROBE); - return restore_ubl_active_state_and_leave(); - } + if (_click_and_hold([]{ + SERIAL_ECHOLNPGM("\nMesh only partially populated."); + do_z_clearance(Z_CLEARANCE_DEPLOY_PROBE); + })) return restore_ubl_active_state_and_leave(); - z_values[lpos.x][lpos.y] = current_position.z - thick; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location, z_values[lpos.x][lpos.y])); + // Store the Z position minus the shim height + z_values[lpos.x][lpos.y] = current_position.z - thick; - if (g29_verbose_level > 2) - SERIAL_ECHOLNPAIR_F("Mesh Point Measured at: ", z_values[lpos.x][lpos.y], 6); - SERIAL_FLUSH(); // Prevent host M105 buffer overrun. - } while (location.valid()); + // Tell the external UI to update + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location, z_values[lpos.x][lpos.y])); - if (do_ubl_mesh_map) display_map(g29_map_type); // show user where we're probing + if (param.V_verbosity > 2) + SERIAL_ECHOLNPAIR_F("Mesh Point Measured at: ", z_values[lpos.x][lpos.y], 6); + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. + } while (location.valid()); - restore_ubl_active_state_and_leave(); - do_blocking_move_to_xy_z(pos, Z_CLEARANCE_DEPLOY_PROBE); - } + if (do_ubl_mesh_map) display_map(param.T_map_type); // show user where we're probing - inline void set_message_with_feedback(PGM_P const msg_P) { - ui.set_status_P(msg_P); - ui.quick_feedback(); - } + restore_ubl_active_state_and_leave(); + do_blocking_move_to_xy_z(pos, Z_CLEARANCE_DEPLOY_PROBE); + } - void abort_fine_tune() { - ui.return_to_status(); - do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES); - set_message_with_feedback(GET_TEXT(MSG_EDITING_STOPPED)); - } + /** + * G29 P4 : Mesh Fine-Tuning. Go to point(s) and adjust values with the LCD. + * NOTE: Blocks the G-code queue and captures Marlin UI during use. + */ + void unified_bed_leveling::fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) { + if (!parser.seen_test('R')) // fine_tune_mesh() is special. If no repetition count flag is specified + param.R_repetition = 1; // do exactly one mesh location. Otherwise use what the parser decided. + + #if ENABLED(UBL_MESH_EDIT_MOVES_Z) + const float h_offset = parser.seenval('H') ? parser.value_linear_units() : MANUAL_PROBE_START_Z; + if (!WITHIN(h_offset, 0, 10)) { + SERIAL_ECHOLNPGM("Offset out of bounds. (0 to 10mm)\n"); + return; + } + #endif + + mesh_index_pair location; - void unified_bed_leveling::fine_tune_mesh(const xy_pos_t &pos, const bool do_ubl_mesh_map) { - if (!parser.seen('R')) // fine_tune_mesh() is special. If no repetition count flag is specified - g29_repetition_cnt = 1; // do exactly one mesh location. Otherwise use what the parser decided. + if (!position_is_reachable(pos)) { + SERIAL_ECHOLNPGM("(X,Y) outside printable radius."); + return; + } - #if ENABLED(UBL_MESH_EDIT_MOVES_Z) - const float h_offset = parser.seenval('H') ? parser.value_linear_units() : MANUAL_PROBE_START_Z; - if (!WITHIN(h_offset, 0, 10)) { - SERIAL_ECHOLNPGM("Offset out of bounds. (0 to 10mm)\n"); - return; - } - #endif + save_ubl_active_state_and_disable(); - mesh_index_pair location; + LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH); + ui.capture(); // Take over control of the LCD encoder - if (!position_is_reachable(pos)) { - SERIAL_ECHOLNPGM("(X,Y) outside printable radius."); - return; - } + do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance - save_ubl_active_state_and_disable(); + MeshFlags done_flags{0}; + const xy_int8_t &lpos = location.pos; - LCD_MESSAGEPGM(MSG_UBL_FINE_TUNE_MESH); - ui.capture(); // Take over control of the LCD encoder + #if IS_TFTGLCD_PANEL + ui.ubl_mesh_edit_start(0); // Change current screen before calling ui.ubl_plot + safe_delay(50); + #endif - do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); // Move to the given XY with probe clearance + do { + location = find_closest_mesh_point_of_type(SET_IN_BITMAP, pos, false, &done_flags); - MeshFlags done_flags{0}; - const xy_int8_t &lpos = location.pos; + if (lpos.x < 0) break; // Stop when there are no more reachable points - #if IS_TFTGLCD_PANEL - lcd_mesh_edit_setup(0); // Change current screen before calling ui.ubl_plot - safe_delay(50); - #endif + done_flags.mark(lpos); // Mark this location as 'adjusted' so a new + // location is used on the next loop + const xyz_pos_t raw = { + mesh_index_to_xpos(lpos.x), + mesh_index_to_ypos(lpos.y), + Z_CLEARANCE_BETWEEN_PROBES + }; - do { - location = find_closest_mesh_point_of_type(SET_IN_BITMAP, pos, false, &done_flags); + if (!position_is_reachable(raw)) break; // SHOULD NOT OCCUR (find_closest_mesh_point_of_type only returns reachable) - if (lpos.x < 0) break; // Stop when there are no more reachable points + do_blocking_move_to(raw); // Move the nozzle to the edit point with probe clearance - done_flags.mark(lpos); // Mark this location as 'adjusted' so a new - // location is used on the next loop - const xyz_pos_t raw = { - mesh_index_to_xpos(lpos.x), - mesh_index_to_ypos(lpos.y), - Z_CLEARANCE_BETWEEN_PROBES - }; + TERN_(UBL_MESH_EDIT_MOVES_Z, do_blocking_move_to_z(h_offset)); // Move Z to the given 'H' offset before editing - if (!position_is_reachable(raw)) break; // SHOULD NOT OCCUR (find_closest_mesh_point_of_type only returns reachable) + KEEPALIVE_STATE(PAUSED_FOR_USER); - do_blocking_move_to(raw); // Move the nozzle to the edit point with probe clearance + if (do_ubl_mesh_map) display_map(param.T_map_type); // Display the current point - TERN_(UBL_MESH_EDIT_MOVES_Z, do_blocking_move_to_z(h_offset)); // Move Z to the given 'H' offset before editing + #if IS_TFTGLCD_PANEL + ui.ubl_plot(lpos.x, lpos.y); // update plot screen + #endif - KEEPALIVE_STATE(PAUSED_FOR_USER); + ui.refresh(); - if (do_ubl_mesh_map) display_map(g29_map_type); // Display the current point + float new_z = z_values[lpos.x][lpos.y]; + if (isnan(new_z)) new_z = 0; // Invalid points begin at 0 + new_z = FLOOR(new_z * 1000) * 0.001f; // Chop off digits after the 1000ths place - #if IS_TFTGLCD_PANEL - ui.ubl_plot(lpos.x, lpos.y); // update plot screen - #endif + ui.ubl_mesh_edit_start(new_z); - ui.refresh(); + SET_SOFT_ENDSTOP_LOOSE(true); - float new_z = z_values[lpos.x][lpos.y]; - if (isnan(new_z)) new_z = 0; // Invalid points begin at 0 - new_z = FLOOR(new_z * 1000) * 0.001f; // Chop off digits after the 1000ths place + do { + idle_no_sleep(); + new_z = ui.ubl_mesh_value(); + TERN_(UBL_MESH_EDIT_MOVES_Z, do_blocking_move_to_z(h_offset + new_z)); // Move the nozzle as the point is edited + SERIAL_FLUSH(); // Prevent host M105 buffer overrun. + } while (!ui.button_pressed()); - lcd_mesh_edit_setup(new_z); + SET_SOFT_ENDSTOP_LOOSE(false); - SET_SOFT_ENDSTOP_LOOSE(true); + if (!lcd_map_control) ui.return_to_status(); // Just editing a single point? Return to status - do { - idle(); - new_z = lcd_mesh_edit(); - TERN_(UBL_MESH_EDIT_MOVES_Z, do_blocking_move_to_z(h_offset + new_z)); // Move the nozzle as the point is edited - SERIAL_FLUSH(); // Prevent host M105 buffer overrun. - } while (!ui.button_pressed()); + // Button held down? Abort editing + if (_click_and_hold([]{ + ui.return_to_status(); + do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES); + set_message_with_feedback(GET_TEXT(MSG_EDITING_STOPPED)); + })) break; - SET_SOFT_ENDSTOP_LOOSE(false); + // TODO: Disable leveling here so the Z value becomes the 'native' Z value. - if (!lcd_map_control) ui.return_to_status(); // Just editing a single point? Return to status + z_values[lpos.x][lpos.y] = new_z; // Save the updated Z value - if (click_and_hold(abort_fine_tune)) break; // Button held down? Abort editing + // TODO: Re-enable leveling here so Z is correctly based on the updated mesh. - z_values[lpos.x][lpos.y] = new_z; // Save the updated Z value - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location, new_z)); + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location, new_z)); - serial_delay(20); // No switch noise - ui.refresh(); + serial_delay(20); // No switch noise + ui.refresh(); - } while (lpos.x >= 0 && --g29_repetition_cnt > 0); + } while (lpos.x >= 0 && --param.R_repetition > 0); - if (do_ubl_mesh_map) display_map(g29_map_type); - restore_ubl_active_state_and_leave(); + if (do_ubl_mesh_map) display_map(param.T_map_type); + restore_ubl_active_state_and_leave(); - do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); + do_blocking_move_to_xy_z(pos, Z_CLEARANCE_BETWEEN_PROBES); - LCD_MESSAGEPGM(MSG_UBL_DONE_EDITING_MESH); - SERIAL_ECHOLNPGM("Done Editing Mesh"); + LCD_MESSAGEPGM(MSG_UBL_DONE_EDITING_MESH); + SERIAL_ECHOLNPGM("Done Editing Mesh"); - if (lcd_map_control) - ui.goto_screen(ubl_map_screen); - else - ui.return_to_status(); - } + if (lcd_map_control) + ui.goto_screen(ubl_map_screen); + else + ui.return_to_status(); + } - #endif // HAS_LCD_MENU +#endif // HAS_LCD_MENU - bool unified_bed_leveling::g29_parameter_parsing() { - bool err_flag = false; +/** + * Parse and validate most G29 parameters, store for use by G29 functions. + */ +bool unified_bed_leveling::G29_parse_parameters() { + bool err_flag = false; - TERN_(HAS_LCD_MENU, set_message_with_feedback(GET_TEXT(MSG_UBL_DOING_G29))); + set_message_with_feedback(GET_TEXT(MSG_UBL_DOING_G29)); - g29_constant = 0; - g29_repetition_cnt = 0; + param.C_constant = 0; + param.R_repetition = 0; - if (parser.seen('R')) { - g29_repetition_cnt = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS; - NOMORE(g29_repetition_cnt, GRID_MAX_POINTS); - if (g29_repetition_cnt < 1) { - SERIAL_ECHOLNPGM("?(R)epetition count invalid (1+).\n"); - return UBL_ERR; - } + if (parser.seen('R')) { + param.R_repetition = parser.has_value() ? parser.value_byte() : GRID_MAX_POINTS; + NOMORE(param.R_repetition, GRID_MAX_POINTS); + if (param.R_repetition < 1) { + SERIAL_ECHOLNPGM("?(R)epetition count invalid (1+).\n"); + return UBL_ERR; } + } - g29_verbose_level = parser.seen('V') ? parser.value_int() : 0; - if (!WITHIN(g29_verbose_level, 0, 4)) { - SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).\n"); - err_flag = true; - } + param.V_verbosity = parser.byteval('V'); + if (!WITHIN(param.V_verbosity, 0, 4)) { + SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4).\n"); + err_flag = true; + } - if (parser.seen('P')) { - const int pv = parser.value_int(); - #if !HAS_BED_PROBE - if (pv == 1) { - SERIAL_ECHOLNPGM("G29 P1 requires a probe.\n"); + if (parser.seen('P')) { + const uint8_t pv = parser.value_byte(); + #if !HAS_BED_PROBE + if (pv == 1) { + SERIAL_ECHOLNPGM("G29 P1 requires a probe.\n"); + err_flag = true; + } + else + #endif + { + param.P_phase = pv; + if (!WITHIN(param.P_phase, 0, 6)) { + SERIAL_ECHOLNPGM("?(P)hase value invalid (0-6).\n"); err_flag = true; } - else - #endif - { - g29_phase_value = pv; - if (!WITHIN(g29_phase_value, 0, 6)) { - SERIAL_ECHOLNPGM("?(P)hase value invalid (0-6).\n"); - err_flag = true; - } - } - } + } + } - if (parser.seen('J')) { - #if HAS_BED_PROBE - g29_grid_size = parser.has_value() ? parser.value_int() : 0; - if (g29_grid_size && !WITHIN(g29_grid_size, 2, 9)) { - SERIAL_ECHOLNPGM("?Invalid grid size (J) specified (2-9).\n"); - err_flag = true; - } - #else - SERIAL_ECHOLNPGM("G29 J action requires a probe.\n"); + if (parser.seen('J')) { + #if HAS_BED_PROBE + param.J_grid_size = parser.value_byte(); + if (param.J_grid_size && !WITHIN(param.J_grid_size, 2, 9)) { + SERIAL_ECHOLNPGM("?Invalid grid size (J) specified (2-9).\n"); err_flag = true; - #endif - } + } + #else + SERIAL_ECHOLNPGM("G29 J action requires a probe.\n"); + err_flag = true; + #endif + } - xy_seen.x = parser.seenval('X'); - float sx = xy_seen.x ? parser.value_float() : current_position.x; - xy_seen.y = parser.seenval('Y'); - float sy = xy_seen.y ? parser.value_float() : current_position.y; + param.XY_seen.x = parser.seenval('X'); + float sx = param.XY_seen.x ? parser.value_float() : current_position.x; + param.XY_seen.y = parser.seenval('Y'); + float sy = param.XY_seen.y ? parser.value_float() : current_position.y; - if (xy_seen.x != xy_seen.y) { - SERIAL_ECHOLNPGM("Both X & Y locations must be specified.\n"); - err_flag = true; - } + if (param.XY_seen.x != param.XY_seen.y) { + SERIAL_ECHOLNPGM("Both X & Y locations must be specified.\n"); + err_flag = true; + } - // If X or Y are not valid, use center of the bed values - if (!WITHIN(sx, X_MIN_BED, X_MAX_BED)) sx = X_CENTER; - if (!WITHIN(sy, Y_MIN_BED, Y_MAX_BED)) sy = Y_CENTER; + // If X or Y are not valid, use center of the bed values + // (for UBL_HILBERT_CURVE default to lower-left corner instead) + if (!COORDINATE_OKAY(sx, X_MIN_BED, X_MAX_BED)) sx = TERN(UBL_HILBERT_CURVE, 0, X_CENTER); + if (!COORDINATE_OKAY(sy, Y_MIN_BED, Y_MAX_BED)) sy = TERN(UBL_HILBERT_CURVE, 0, Y_CENTER); - if (err_flag) return UBL_ERR; + if (err_flag) return UBL_ERR; - g29_pos.set(sx, sy); + param.XY_pos.set(sx, sy); - /** - * Activate or deactivate UBL - * Note: UBL's G29 restores the state set here when done. - * Leveling is being enabled here with old data, possibly - * none. Error handling should disable for safety... - */ - if (parser.seen('A')) { - if (parser.seen('D')) { - SERIAL_ECHOLNPGM("?Can't activate and deactivate at the same time.\n"); - return UBL_ERR; - } - set_bed_leveling_enabled(true); - report_state(); - } - else if (parser.seen('D')) { - set_bed_leveling_enabled(false); - report_state(); + /** + * Activate or deactivate UBL + * Note: UBL's G29 restores the state set here when done. + * Leveling is being enabled here with old data, possibly + * none. Error handling should disable for safety... + */ + if (parser.seen_test('A')) { + if (parser.seen_test('D')) { + SERIAL_ECHOLNPGM("?Can't activate and deactivate at the same time.\n"); + return UBL_ERR; } + set_bed_leveling_enabled(true); + report_state(); + } + else if (parser.seen_test('D')) { + set_bed_leveling_enabled(false); + report_state(); + } - // Set global 'C' flag and its value - if ((g29_c_flag = parser.seen('C'))) - g29_constant = parser.value_float(); + // Set global 'C' flag and its value + if ((param.C_seen = parser.seen('C'))) + param.C_constant = parser.value_float(); - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - if (parser.seenval('F')) { - const float fh = parser.value_float(); - if (!WITHIN(fh, 0, 100)) { - SERIAL_ECHOLNPGM("?(F)ade height for Bed Level Correction not plausible.\n"); - return UBL_ERR; - } - set_z_fade_height(fh); + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + if (parser.seenval('F')) { + const float fh = parser.value_float(); + if (!WITHIN(fh, 0, 100)) { + SERIAL_ECHOLNPGM("?(F)ade height for Bed Level Correction not plausible.\n"); + return UBL_ERR; } - #endif - - g29_map_type = parser.intval('T'); - if (!WITHIN(g29_map_type, 0, 2)) { - SERIAL_ECHOLNPGM("Invalid map type.\n"); - return UBL_ERR; + set_z_fade_height(fh); } - return UBL_OK; + #endif + + param.T_map_type = parser.byteval('T'); + if (!WITHIN(param.T_map_type, 0, 2)) { + SERIAL_ECHOLNPGM("Invalid map type.\n"); + return UBL_ERR; } + return UBL_OK; +} - static uint8_t ubl_state_at_invocation = 0; +static uint8_t ubl_state_at_invocation = 0; +#if ENABLED(UBL_DEVEL_DEBUGGING) + static uint8_t ubl_state_recursion_chk = 0; +#endif + +void unified_bed_leveling::save_ubl_active_state_and_disable() { #if ENABLED(UBL_DEVEL_DEBUGGING) - static uint8_t ubl_state_recursion_chk = 0; + ubl_state_recursion_chk++; + if (ubl_state_recursion_chk != 1) { + SERIAL_ECHOLNPGM("save_ubl_active_state_and_disabled() called multiple times in a row."); + set_message_with_feedback(GET_TEXT(MSG_UBL_SAVE_ERROR)); + return; + } #endif + ubl_state_at_invocation = planner.leveling_active; + set_bed_leveling_enabled(false); +} - void unified_bed_leveling::save_ubl_active_state_and_disable() { - #if ENABLED(UBL_DEVEL_DEBUGGING) - ubl_state_recursion_chk++; - if (ubl_state_recursion_chk != 1) { - SERIAL_ECHOLNPGM("save_ubl_active_state_and_disabled() called multiple times in a row."); - TERN_(HAS_LCD_MENU, set_message_with_feedback(GET_TEXT(MSG_UBL_SAVE_ERROR))); - return; - } - #endif - ubl_state_at_invocation = planner.leveling_active; - set_bed_leveling_enabled(false); - } - - void unified_bed_leveling::restore_ubl_active_state_and_leave() { - TERN_(HAS_LCD_MENU, ui.release()); - #if ENABLED(UBL_DEVEL_DEBUGGING) - if (--ubl_state_recursion_chk) { - SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times."); - TERN_(HAS_LCD_MENU, set_message_with_feedback(GET_TEXT(MSG_UBL_RESTORE_ERROR))); - return; - } - #endif - set_bed_leveling_enabled(ubl_state_at_invocation); - } +void unified_bed_leveling::restore_ubl_active_state_and_leave() { + TERN_(HAS_LCD_MENU, ui.release()); + #if ENABLED(UBL_DEVEL_DEBUGGING) + if (--ubl_state_recursion_chk) { + SERIAL_ECHOLNPGM("restore_ubl_active_state_and_leave() called too many times."); + set_message_with_feedback(GET_TEXT(MSG_UBL_RESTORE_ERROR)); + return; + } + #endif + set_bed_leveling_enabled(ubl_state_at_invocation); +} - mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() { +mesh_index_pair unified_bed_leveling::find_furthest_invalid_mesh_point() { - bool found_a_NAN = false, found_a_real = false; + bool found_a_NAN = false, found_a_real = false; - mesh_index_pair farthest { -1, -1, -99999.99 }; + mesh_index_pair farthest { -1, -1, -99999.99 }; - GRID_LOOP(i, j) { - if (!isnan(z_values[i][j])) continue; // Skip valid mesh points + GRID_LOOP(i, j) { + if (!isnan(z_values[i][j])) continue; // Skip valid mesh points - // Skip unreachable points - if (!probe.can_reach(mesh_index_to_xpos(i), mesh_index_to_ypos(j))) - continue; + // Skip unreachable points + if (!probe.can_reach(mesh_index_to_xpos(i), mesh_index_to_ypos(j))) + continue; - found_a_NAN = true; + found_a_NAN = true; - xy_int8_t nearby { -1, -1 }; - float d1, d2 = 99999.9f; - GRID_LOOP(k, l) { - if (isnan(z_values[k][l])) continue; + xy_int8_t nearby { -1, -1 }; + float d1, d2 = 99999.9f; + GRID_LOOP(k, l) { + if (isnan(z_values[k][l])) continue; - found_a_real = true; + found_a_real = true; - // Add in a random weighting factor that scrambles the probing of the - // last half of the mesh (when every unprobed mesh point is one index - // from a probed location). + // Add in a random weighting factor that scrambles the probing of the + // last half of the mesh (when every unprobed mesh point is one index + // from a probed location). - d1 = HYPOT(i - k, j - l) + (1.0f / ((millis() % 47) + 13)); + d1 = HYPOT(i - k, j - l) + (1.0f / ((millis() % 47) + 13)); - if (d1 < d2) { // Invalid mesh point (i,j) is closer to the defined point (k,l) - d2 = d1; - nearby.set(i, j); - } + if (d1 < d2) { // Invalid mesh point (i,j) is closer to the defined point (k,l) + d2 = d1; + nearby.set(i, j); } + } + + // + // At this point d2 should have the near defined mesh point to invalid mesh point (i,j) + // - // - // At this point d2 should have the near defined mesh point to invalid mesh point (i,j) - // + if (found_a_real && nearby.x >= 0 && d2 > farthest.distance) { + farthest.pos = nearby; // Found an invalid location farther from the defined mesh point + farthest.distance = d2; + } + } // GRID_LOOP - if (found_a_real && nearby.x >= 0 && d2 > farthest.distance) { - farthest.pos = nearby; // Found an invalid location farther from the defined mesh point - farthest.distance = d2; - } - } // GRID_LOOP + if (!found_a_real && found_a_NAN) { // if the mesh is totally unpopulated, start the probing + farthest.pos.set((GRID_MAX_POINTS_X) / 2, (GRID_MAX_POINTS_Y) / 2); + farthest.distance = 1; + } + return farthest; +} - if (!found_a_real && found_a_NAN) { // if the mesh is totally unpopulated, start the probing - farthest.pos.set((GRID_MAX_POINTS_X) / 2, (GRID_MAX_POINTS_Y) / 2); - farthest.distance = 1; +#if ENABLED(UBL_HILBERT_CURVE) + + typedef struct { + MeshPointType type; + MeshFlags *done_flags; + bool probe_relative; + mesh_index_pair closest; + } find_closest_t; + + static bool test_func(uint8_t i, uint8_t j, void *data) { + find_closest_t *d = (find_closest_t*)data; + if ( d->type == CLOSEST || d->type == (isnan(ubl.z_values[i][j]) ? INVALID : REAL) + || (d->type == SET_IN_BITMAP && !d->done_flags->marked(i, j)) + ) { + // Found a Mesh Point of the specified type! + const xy_pos_t mpos = { ubl.mesh_index_to_xpos(i), ubl.mesh_index_to_ypos(j) }; + + // If using the probe as the reference there are some unreachable locations. + // Also for round beds, there are grid points outside the bed the nozzle can't reach. + // Prune them from the list and ignore them till the next Phase (manual nozzle probing). + + if (!(d->probe_relative ? probe.can_reach(mpos) : position_is_reachable(mpos))) + return false; + d->closest.pos.set(i, j); + return true; } - return farthest; + return false; } - mesh_index_pair unified_bed_leveling::find_closest_mesh_point_of_type(const MeshPointType type, const xy_pos_t &pos, const bool probe_relative/*=false*/, MeshFlags *done_flags/*=nullptr*/) { +#endif + +mesh_index_pair unified_bed_leveling::find_closest_mesh_point_of_type(const MeshPointType type, const xy_pos_t &pos, const bool probe_relative/*=false*/, MeshFlags *done_flags/*=nullptr*/) { + + #if ENABLED(UBL_HILBERT_CURVE) + + find_closest_t d; + d.type = type; + d.done_flags = done_flags; + d.probe_relative = probe_relative; + d.closest.invalidate(); + hilbert_curve::search_from_closest(pos, test_func, &d); + return d.closest; + + #else + mesh_index_pair closest; closest.invalidate(); closest.distance = -99999.9f; @@ -1260,7 +1326,7 @@ float best_so_far = 99999.99f; GRID_LOOP(i, j) { - if ( (type == (isnan(z_values[i][j]) ? INVALID : REAL)) + if ( type == CLOSEST || type == (isnan(z_values[i][j]) ? INVALID : REAL) || (type == SET_IN_BITMAP && !done_flags->marked(i, j)) ) { // Found a Mesh Point of the specified type! @@ -1289,495 +1355,497 @@ } // GRID_LOOP return closest; - } - /** - * 'Smart Fill': Scan from the outward edges of the mesh towards the center. - * If an invalid location is found, use the next two points (if valid) to - * calculate a 'reasonable' value for the unprobed mesh point. - */ + #endif +} - bool unified_bed_leveling::smart_fill_one(const uint8_t x, const uint8_t y, const int8_t xdir, const int8_t ydir) { - const float v = z_values[x][y]; - if (isnan(v)) { // A NAN... - const int8_t dx = x + xdir, dy = y + ydir; - const float v1 = z_values[dx][dy]; - if (!isnan(v1)) { // ...next to a pair of real values? - const float v2 = z_values[dx + xdir][dy + ydir]; - if (!isnan(v2)) { - z_values[x][y] = v1 < v2 ? v1 : v1 + v1 - v2; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); - return true; - } +/** + * 'Smart Fill': Scan from the outward edges of the mesh towards the center. + * If an invalid location is found, use the next two points (if valid) to + * calculate a 'reasonable' value for the unprobed mesh point. + */ + +bool unified_bed_leveling::smart_fill_one(const uint8_t x, const uint8_t y, const int8_t xdir, const int8_t ydir) { + const float v = z_values[x][y]; + if (isnan(v)) { // A NAN... + const int8_t dx = x + xdir, dy = y + ydir; + const float v1 = z_values[dx][dy]; + if (!isnan(v1)) { // ...next to a pair of real values? + const float v2 = z_values[dx + xdir][dy + ydir]; + if (!isnan(v2)) { + z_values[x][y] = v1 < v2 ? v1 : v1 + v1 - v2; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); + return true; } } - return false; } - - typedef struct { uint8_t sx, ex, sy, ey; bool yfirst; } smart_fill_info; - - void unified_bed_leveling::smart_fill_mesh() { - static const smart_fill_info - info0 PROGMEM = { 0, GRID_MAX_POINTS_X, 0, GRID_MAX_POINTS_Y - 2, false }, // Bottom of the mesh looking up - info1 PROGMEM = { 0, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y - 1, 0, false }, // Top of the mesh looking down - info2 PROGMEM = { 0, GRID_MAX_POINTS_X - 2, 0, GRID_MAX_POINTS_Y, true }, // Left side of the mesh looking right - info3 PROGMEM = { GRID_MAX_POINTS_X - 1, 0, 0, GRID_MAX_POINTS_Y, true }; // Right side of the mesh looking left - static const smart_fill_info * const info[] PROGMEM = { &info0, &info1, &info2, &info3 }; - - LOOP_L_N(i, COUNT(info)) { - const smart_fill_info *f = (smart_fill_info*)pgm_read_ptr(&info[i]); - const int8_t sx = pgm_read_byte(&f->sx), sy = pgm_read_byte(&f->sy), - ex = pgm_read_byte(&f->ex), ey = pgm_read_byte(&f->ey); - if (pgm_read_byte(&f->yfirst)) { - const int8_t dir = ex > sx ? 1 : -1; - for (uint8_t y = sy; y != ey; ++y) - for (uint8_t x = sx; x != ex; x += dir) - if (smart_fill_one(x, y, dir, 0)) break; - } - else { - const int8_t dir = ey > sy ? 1 : -1; - for (uint8_t x = sx; x != ex; ++x) - for (uint8_t y = sy; y != ey; y += dir) - if (smart_fill_one(x, y, 0, dir)) break; - } + return false; +} + +typedef struct { uint8_t sx, ex, sy, ey; bool yfirst; } smart_fill_info; + +void unified_bed_leveling::smart_fill_mesh() { + static const smart_fill_info + info0 PROGMEM = { 0, GRID_MAX_POINTS_X, 0, GRID_MAX_POINTS_Y - 2, false }, // Bottom of the mesh looking up + info1 PROGMEM = { 0, GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y - 1, 0, false }, // Top of the mesh looking down + info2 PROGMEM = { 0, GRID_MAX_POINTS_X - 2, 0, GRID_MAX_POINTS_Y, true }, // Left side of the mesh looking right + info3 PROGMEM = { GRID_MAX_POINTS_X - 1, 0, 0, GRID_MAX_POINTS_Y, true }; // Right side of the mesh looking left + static const smart_fill_info * const info[] PROGMEM = { &info0, &info1, &info2, &info3 }; + + LOOP_L_N(i, COUNT(info)) { + const smart_fill_info *f = (smart_fill_info*)pgm_read_ptr(&info[i]); + const int8_t sx = pgm_read_byte(&f->sx), sy = pgm_read_byte(&f->sy), + ex = pgm_read_byte(&f->ex), ey = pgm_read_byte(&f->ey); + if (pgm_read_byte(&f->yfirst)) { + const int8_t dir = ex > sx ? 1 : -1; + for (uint8_t y = sy; y != ey; ++y) + for (uint8_t x = sx; x != ex; x += dir) + if (smart_fill_one(x, y, dir, 0)) break; + } + else { + const int8_t dir = ey > sy ? 1 : -1; + for (uint8_t x = sx; x != ex; ++x) + for (uint8_t y = sy; y != ey; y += dir) + if (smart_fill_one(x, y, 0, dir)) break; } } +} - #if HAS_BED_PROBE +#if HAS_BED_PROBE - //#define VALIDATE_MESH_TILT + //#define VALIDATE_MESH_TILT - #include "../../../libs/vector_3.h" + #include "../../../libs/vector_3.h" - void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_3_pt_leveling) { - const float x_min = probe.min_x(), x_max = probe.max_x(), - y_min = probe.min_y(), y_max = probe.max_y(), - dx = (x_max - x_min) / (g29_grid_size - 1), - dy = (y_max - y_min) / (g29_grid_size - 1); + void unified_bed_leveling::tilt_mesh_based_on_probed_grid(const bool do_3_pt_leveling) { + const float x_min = probe.min_x(), x_max = probe.max_x(), + y_min = probe.min_y(), y_max = probe.max_y(), + dx = (x_max - x_min) / (param.J_grid_size - 1), + dy = (y_max - y_min) / (param.J_grid_size - 1); - xy_float_t points[3]; - probe.get_three_points(points); + xy_float_t points[3]; + probe.get_three_points(points); - float measured_z; - bool abort_flag = false; + float measured_z; + bool abort_flag = false; - #ifdef VALIDATE_MESH_TILT - float z1, z2, z3; // Needed for algorithm validation below - #endif + #ifdef VALIDATE_MESH_TILT + float z1, z2, z3; // Needed for algorithm validation below + #endif + + struct linear_fit_data lsf_results; + incremental_LSF_reset(&lsf_results); - struct linear_fit_data lsf_results; - incremental_LSF_reset(&lsf_results); + if (do_3_pt_leveling) { + SERIAL_ECHOLNPGM("Tilting mesh (1/3)"); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " 1/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); + + measured_z = probe.probe_at_point(points[0], PROBE_PT_RAISE, param.V_verbosity); + if (isnan(measured_z)) + abort_flag = true; + else { + measured_z -= get_z_correction(points[0]); + #ifdef VALIDATE_MESH_TILT + z1 = measured_z; + #endif + if (param.V_verbosity > 3) { + serial_spaces(16); + SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); + } + incremental_LSF(&lsf_results, points[0], measured_z); + } - if (do_3_pt_leveling) { - SERIAL_ECHOLNPGM("Tilting mesh (1/3)"); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " 1/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); + if (!abort_flag) { + SERIAL_ECHOLNPGM("Tilting mesh (2/3)"); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " 2/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); - measured_z = probe.probe_at_point(points[0], PROBE_PT_RAISE, g29_verbose_level); + measured_z = probe.probe_at_point(points[1], PROBE_PT_RAISE, param.V_verbosity); + #ifdef VALIDATE_MESH_TILT + z2 = measured_z; + #endif if (isnan(measured_z)) abort_flag = true; else { - measured_z -= get_z_correction(points[0]); - #ifdef VALIDATE_MESH_TILT - z1 = measured_z; - #endif - if (g29_verbose_level > 3) { + measured_z -= get_z_correction(points[1]); + if (param.V_verbosity > 3) { serial_spaces(16); - SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); - } - incremental_LSF(&lsf_results, points[0], measured_z); - } - - if (!abort_flag) { - SERIAL_ECHOLNPGM("Tilting mesh (2/3)"); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " 2/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); - - measured_z = probe.probe_at_point(points[1], PROBE_PT_RAISE, g29_verbose_level); - #ifdef VALIDATE_MESH_TILT - z2 = measured_z; - #endif - if (isnan(measured_z)) - abort_flag = true; - else { - measured_z -= get_z_correction(points[1]); - if (g29_verbose_level > 3) { - serial_spaces(16); - SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); - } - incremental_LSF(&lsf_results, points[1], measured_z); + SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } + incremental_LSF(&lsf_results, points[1], measured_z); } + } - if (!abort_flag) { - SERIAL_ECHOLNPGM("Tilting mesh (3/3)"); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); + if (!abort_flag) { + SERIAL_ECHOLNPGM("Tilting mesh (3/3)"); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " 3/3"), GET_TEXT(MSG_LCD_TILTING_MESH))); - measured_z = probe.probe_at_point(points[2], PROBE_PT_STOW, g29_verbose_level); - #ifdef VALIDATE_MESH_TILT - z3 = measured_z; - #endif - if (isnan(measured_z)) - abort_flag = true; - else { - measured_z -= get_z_correction(points[2]); - if (g29_verbose_level > 3) { - serial_spaces(16); - SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); - } - incremental_LSF(&lsf_results, points[2], measured_z); + measured_z = probe.probe_at_point(points[2], PROBE_PT_LAST_STOW, param.V_verbosity); + #ifdef VALIDATE_MESH_TILT + z3 = measured_z; + #endif + if (isnan(measured_z)) + abort_flag = true; + else { + measured_z -= get_z_correction(points[2]); + if (param.V_verbosity > 3) { + serial_spaces(16); + SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } + incremental_LSF(&lsf_results, points[2], measured_z); } + } - probe.stow(); - probe.move_z_after_probing(); + probe.stow(); + probe.move_z_after_probing(); - if (abort_flag) { - SERIAL_ECHOLNPGM("?Error probing point. Aborting operation."); - return; - } + if (abort_flag) { + SERIAL_ECHOLNPGM("?Error probing point. Aborting operation."); + return; } - else { // !do_3_pt_leveling - - bool zig_zag = false; - - const uint16_t total_points = sq(g29_grid_size); - uint16_t point_num = 1; - - xy_pos_t rpos; - LOOP_L_N(ix, g29_grid_size) { - rpos.x = x_min + ix * dx; - LOOP_L_N(iy, g29_grid_size) { - rpos.y = y_min + dy * (zig_zag ? g29_grid_size - 1 - iy : iy); - - if (!abort_flag) { - SERIAL_ECHOLNPAIR("Tilting mesh point ", point_num, "/", total_points, "\n"); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points)); - - measured_z = probe.probe_at_point(rpos, parser.seen('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, g29_verbose_level); // TODO: Needs error handling - - abort_flag = isnan(measured_z); - - #if ENABLED(DEBUG_LEVELING_FEATURE) - if (DEBUGGING(LEVELING)) { - const xy_pos_t lpos = rpos.asLogical(); - DEBUG_CHAR('('); - DEBUG_ECHO_F(rpos.x, 7); - DEBUG_CHAR(','); - DEBUG_ECHO_F(rpos.y, 7); - DEBUG_ECHOPAIR_F(") logical: (", lpos.x, 7); - DEBUG_CHAR(','); - DEBUG_ECHO_F(lpos.y, 7); - DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7); - DEBUG_ECHOPAIR_F(" correction: ", get_z_correction(rpos), 7); - } - #endif + } + else { // !do_3_pt_leveling + + bool zig_zag = false; + + const uint16_t total_points = sq(param.J_grid_size); + uint16_t point_num = 1; + + xy_pos_t rpos; + LOOP_L_N(ix, param.J_grid_size) { + rpos.x = x_min + ix * dx; + LOOP_L_N(iy, param.J_grid_size) { + rpos.y = y_min + dy * (zig_zag ? param.J_grid_size - 1 - iy : iy); + + if (!abort_flag) { + SERIAL_ECHOLNPGM("Tilting mesh point ", point_num, "/", total_points, "\n"); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_LCD_TILTING_MESH), point_num, total_points)); + + measured_z = probe.probe_at_point(rpos, parser.seen_test('E') ? PROBE_PT_STOW : PROBE_PT_RAISE, param.V_verbosity); // TODO: Needs error handling + + abort_flag = isnan(measured_z); + + #if ENABLED(DEBUG_LEVELING_FEATURE) + if (DEBUGGING(LEVELING)) { + const xy_pos_t lpos = rpos.asLogical(); + DEBUG_CHAR('('); + DEBUG_ECHO_F(rpos.x, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(rpos.y, 7); + DEBUG_ECHOPAIR_F(") logical: (", lpos.x, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(lpos.y, 7); + DEBUG_ECHOPAIR_F(") measured: ", measured_z, 7); + DEBUG_ECHOPAIR_F(" correction: ", get_z_correction(rpos), 7); + } + #endif - measured_z -= get_z_correction(rpos) /* + probe.offset.z */ ; + measured_z -= get_z_correction(rpos) /* + probe.offset.z */ ; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_F(" final >>>---> ", measured_z, 7); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_F(" final >>>---> ", measured_z, 7); - if (g29_verbose_level > 3) { - serial_spaces(16); - SERIAL_ECHOLNPAIR("Corrected_Z=", measured_z); - } - incremental_LSF(&lsf_results, rpos, measured_z); + if (param.V_verbosity > 3) { + serial_spaces(16); + SERIAL_ECHOLNPGM("Corrected_Z=", measured_z); } - - point_num++; + incremental_LSF(&lsf_results, rpos, measured_z); } - zig_zag ^= true; + point_num++; } - } - probe.stow(); - probe.move_z_after_probing(); - if (abort_flag || finish_incremental_LSF(&lsf_results)) { - SERIAL_ECHOPGM("Could not complete LSF!"); - return; + zig_zag ^= true; } + } + probe.stow(); + probe.move_z_after_probing(); - vector_3 normal = vector_3(lsf_results.A, lsf_results.B, 1).get_normal(); + if (abort_flag || finish_incremental_LSF(&lsf_results)) { + SERIAL_ECHOPGM("Could not complete LSF!"); + return; + } - if (g29_verbose_level > 2) { - SERIAL_ECHOPAIR_F("bed plane normal = [", normal.x, 7); - SERIAL_CHAR(','); - SERIAL_ECHO_F(normal.y, 7); - SERIAL_CHAR(','); - SERIAL_ECHO_F(normal.z, 7); - SERIAL_ECHOLNPGM("]"); - } + vector_3 normal = vector_3(lsf_results.A, lsf_results.B, 1).get_normal(); - matrix_3x3 rotation = matrix_3x3::create_look_at(vector_3(lsf_results.A, lsf_results.B, 1)); - - GRID_LOOP(i, j) { - float mx = mesh_index_to_xpos(i), - my = mesh_index_to_ypos(j), - mz = z_values[i][j]; - - if (DEBUGGING(LEVELING)) { - DEBUG_ECHOPAIR_F("before rotation = [", mx, 7); - DEBUG_CHAR(','); - DEBUG_ECHO_F(my, 7); - DEBUG_CHAR(','); - DEBUG_ECHO_F(mz, 7); - DEBUG_ECHOPGM("] ---> "); - DEBUG_DELAY(20); - } + if (param.V_verbosity > 2) { + SERIAL_ECHOPAIR_F("bed plane normal = [", normal.x, 7); + SERIAL_CHAR(','); + SERIAL_ECHO_F(normal.y, 7); + SERIAL_CHAR(','); + SERIAL_ECHO_F(normal.z, 7); + SERIAL_ECHOLNPGM("]"); + } - apply_rotation_xyz(rotation, mx, my, mz); + matrix_3x3 rotation = matrix_3x3::create_look_at(vector_3(lsf_results.A, lsf_results.B, 1)); - if (DEBUGGING(LEVELING)) { - DEBUG_ECHOPAIR_F("after rotation = [", mx, 7); - DEBUG_CHAR(','); - DEBUG_ECHO_F(my, 7); - DEBUG_CHAR(','); - DEBUG_ECHO_F(mz, 7); - DEBUG_ECHOLNPGM("]"); - DEBUG_DELAY(20); - } + GRID_LOOP(i, j) { + float mx = mesh_index_to_xpos(i), + my = mesh_index_to_ypos(j), + mz = z_values[i][j]; - z_values[i][j] = mz - lsf_results.D; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(i, j, z_values[i][j])); + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOPAIR_F("before rotation = [", mx, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(my, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(mz, 7); + DEBUG_ECHOPGM("] ---> "); + DEBUG_DELAY(20); } - if (DEBUGGING(LEVELING)) { - rotation.debug(PSTR("rotation matrix:\n")); - DEBUG_ECHOPAIR_F("LSF Results A=", lsf_results.A, 7); - DEBUG_ECHOPAIR_F(" B=", lsf_results.B, 7); - DEBUG_ECHOLNPAIR_F(" D=", lsf_results.D, 7); - DEBUG_DELAY(55); + rotation.apply_rotation_xyz(mx, my, mz); - DEBUG_ECHOPAIR_F("bed plane normal = [", normal.x, 7); + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOPAIR_F("after rotation = [", mx, 7); DEBUG_CHAR(','); - DEBUG_ECHO_F(normal.y, 7); + DEBUG_ECHO_F(my, 7); DEBUG_CHAR(','); - DEBUG_ECHO_F(normal.z, 7); + DEBUG_ECHO_F(mz, 7); DEBUG_ECHOLNPGM("]"); - DEBUG_EOL(); - - /** - * Use the code below to check the validity of the mesh tilting algorithm. - * 3-Point Mesh Tilt uses the same algorithm as grid-based tilting, but only - * three points are used in the calculation. This guarantees that each probed point - * has an exact match when get_z_correction() for that location is calculated. - * The Z error between the probed point locations and the get_z_correction() - * numbers for those locations should be 0. - */ - #ifdef VALIDATE_MESH_TILT - auto d_from = []{ DEBUG_ECHOPGM("D from "); }; - auto normed = [&](const xy_pos_t &pos, const float &zadd) { - return normal.x * pos.x + normal.y * pos.y + zadd; - }; - auto debug_pt = [](PGM_P const pre, const xy_pos_t &pos, const float &zadd) { - d_from(); serialprintPGM(pre); - DEBUG_ECHO_F(normed(pos, zadd), 6); - DEBUG_ECHOLNPAIR_F(" Z error = ", zadd - get_z_correction(pos), 6); - }; - debug_pt(PSTR("1st point: "), probe_pt[0], normal.z * z1); - debug_pt(PSTR("2nd point: "), probe_pt[1], normal.z * z2); - debug_pt(PSTR("3rd point: "), probe_pt[2], normal.z * z3); - d_from(); DEBUG_ECHOPGM("safe home with Z="); - DEBUG_ECHOLNPAIR_F("0 : ", normed(safe_homing_xy, 0), 6); - d_from(); DEBUG_ECHOPGM("safe home with Z="); - DEBUG_ECHOLNPAIR_F("mesh value ", normed(safe_homing_xy, get_z_correction(safe_homing_xy)), 6); - DEBUG_ECHOPAIR(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT); - DEBUG_ECHOLNPAIR_F(") = ", get_z_correction(safe_homing_xy), 6); - #endif - } // DEBUGGING(LEVELING) + DEBUG_DELAY(20); + } + z_values[i][j] = mz - lsf_results.D; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(i, j, z_values[i][j])); } - #endif // HAS_BED_PROBE + if (DEBUGGING(LEVELING)) { + rotation.debug(PSTR("rotation matrix:\n")); + DEBUG_ECHOPAIR_F("LSF Results A=", lsf_results.A, 7); + DEBUG_ECHOPAIR_F(" B=", lsf_results.B, 7); + DEBUG_ECHOLNPAIR_F(" D=", lsf_results.D, 7); + DEBUG_DELAY(55); + + DEBUG_ECHOPAIR_F("bed plane normal = [", normal.x, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(normal.y, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(normal.z, 7); + DEBUG_ECHOLNPGM("]"); + DEBUG_EOL(); + + /** + * Use the code below to check the validity of the mesh tilting algorithm. + * 3-Point Mesh Tilt uses the same algorithm as grid-based tilting, but only + * three points are used in the calculation. This guarantees that each probed point + * has an exact match when get_z_correction() for that location is calculated. + * The Z error between the probed point locations and the get_z_correction() + * numbers for those locations should be 0. + */ + #ifdef VALIDATE_MESH_TILT + auto d_from = []{ DEBUG_ECHOPGM("D from "); }; + auto normed = [&](const xy_pos_t &pos, const_float_t zadd) { + return normal.x * pos.x + normal.y * pos.y + zadd; + }; + auto debug_pt = [](PGM_P const pre, const xy_pos_t &pos, const_float_t zadd) { + d_from(); SERIAL_ECHOPGM_P(pre); + DEBUG_ECHO_F(normed(pos, zadd), 6); + DEBUG_ECHOLNPAIR_F(" Z error = ", zadd - get_z_correction(pos), 6); + }; + debug_pt(PSTR("1st point: "), probe_pt[0], normal.z * z1); + debug_pt(PSTR("2nd point: "), probe_pt[1], normal.z * z2); + debug_pt(PSTR("3rd point: "), probe_pt[2], normal.z * z3); + d_from(); DEBUG_ECHOPGM("safe home with Z="); + DEBUG_ECHOLNPAIR_F("0 : ", normed(safe_homing_xy, 0), 6); + d_from(); DEBUG_ECHOPGM("safe home with Z="); + DEBUG_ECHOLNPAIR_F("mesh value ", normed(safe_homing_xy, get_z_correction(safe_homing_xy)), 6); + DEBUG_ECHOPGM(" Z error = (", Z_SAFE_HOMING_X_POINT, ",", Z_SAFE_HOMING_Y_POINT); + DEBUG_ECHOLNPAIR_F(") = ", get_z_correction(safe_homing_xy), 6); + #endif + } // DEBUGGING(LEVELING) - #if ENABLED(UBL_G29_P31) - void unified_bed_leveling::smart_fill_wlsf(const float &weight_factor) { - - // For each undefined mesh point, compute a distance-weighted least squares fit - // from all the originally populated mesh points, weighted toward the point - // being extrapolated so that nearby points will have greater influence on - // the point being extrapolated. Then extrapolate the mesh point from WLSF. - - static_assert((GRID_MAX_POINTS_Y) <= 16, "GRID_MAX_POINTS_Y too big"); - uint16_t bitmap[GRID_MAX_POINTS_X] = { 0 }; - struct linear_fit_data lsf_results; - - SERIAL_ECHOPGM("Extrapolating mesh..."); - - const float weight_scaled = weight_factor * _MAX(MESH_X_DIST, MESH_Y_DIST); - - GRID_LOOP(jx, jy) if (!isnan(z_values[jx][jy])) SBI(bitmap[jx], jy); - - xy_pos_t ppos; - LOOP_L_N(ix, GRID_MAX_POINTS_X) { - ppos.x = mesh_index_to_xpos(ix); - LOOP_L_N(iy, GRID_MAX_POINTS_Y) { - ppos.y = mesh_index_to_ypos(iy); - if (isnan(z_values[ix][iy])) { - // undefined mesh point at (ppos.x,ppos.y), compute weighted LSF from original valid mesh points. - incremental_LSF_reset(&lsf_results); - xy_pos_t rpos; - LOOP_L_N(jx, GRID_MAX_POINTS_X) { - rpos.x = mesh_index_to_xpos(jx); - LOOP_L_N(jy, GRID_MAX_POINTS_Y) { - if (TEST(bitmap[jx], jy)) { - rpos.y = mesh_index_to_ypos(jy); - const float rz = z_values[jx][jy], - w = 1.0f + weight_scaled / (rpos - ppos).magnitude(); - incremental_WLSF(&lsf_results, rpos, rz, w); - } + } + +#endif // HAS_BED_PROBE + +#if ENABLED(UBL_G29_P31) + void unified_bed_leveling::smart_fill_wlsf(const_float_t weight_factor) { + + // For each undefined mesh point, compute a distance-weighted least squares fit + // from all the originally populated mesh points, weighted toward the point + // being extrapolated so that nearby points will have greater influence on + // the point being extrapolated. Then extrapolate the mesh point from WLSF. + + static_assert((GRID_MAX_POINTS_Y) <= 16, "GRID_MAX_POINTS_Y too big"); + uint16_t bitmap[GRID_MAX_POINTS_X] = { 0 }; + struct linear_fit_data lsf_results; + + SERIAL_ECHOPGM("Extrapolating mesh..."); + + const float weight_scaled = weight_factor * _MAX(MESH_X_DIST, MESH_Y_DIST); + + GRID_LOOP(jx, jy) if (!isnan(z_values[jx][jy])) SBI(bitmap[jx], jy); + + xy_pos_t ppos; + LOOP_L_N(ix, GRID_MAX_POINTS_X) { + ppos.x = mesh_index_to_xpos(ix); + LOOP_L_N(iy, GRID_MAX_POINTS_Y) { + ppos.y = mesh_index_to_ypos(iy); + if (isnan(z_values[ix][iy])) { + // undefined mesh point at (ppos.x,ppos.y), compute weighted LSF from original valid mesh points. + incremental_LSF_reset(&lsf_results); + xy_pos_t rpos; + LOOP_L_N(jx, GRID_MAX_POINTS_X) { + rpos.x = mesh_index_to_xpos(jx); + LOOP_L_N(jy, GRID_MAX_POINTS_Y) { + if (TEST(bitmap[jx], jy)) { + rpos.y = mesh_index_to_ypos(jy); + const float rz = z_values[jx][jy], + w = 1.0f + weight_scaled / (rpos - ppos).magnitude(); + incremental_WLSF(&lsf_results, rpos, rz, w); } } - if (finish_incremental_LSF(&lsf_results)) { - SERIAL_ECHOLNPGM("Insufficient data"); - return; - } - const float ez = -lsf_results.D - lsf_results.A * ppos.x - lsf_results.B * ppos.y; - z_values[ix][iy] = ez; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, z_values[ix][iy])); - idle(); // housekeeping } + if (finish_incremental_LSF(&lsf_results)) { + SERIAL_ECHOLNPGM("Insufficient data"); + return; + } + const float ez = -lsf_results.D - lsf_results.A * ppos.x - lsf_results.B * ppos.y; + z_values[ix][iy] = ez; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, z_values[ix][iy])); + idle(); // housekeeping } } - - SERIAL_ECHOLNPGM("done"); } - #endif // UBL_G29_P31 - #if ENABLED(UBL_DEVEL_DEBUGGING) - /** - * Much of the 'What?' command can be eliminated. But until we are fully debugged, it is - * good to have the extra information. Soon... we prune this to just a few items - */ - void unified_bed_leveling::g29_what_command() { - report_state(); - - if (storage_slot == -1) - SERIAL_ECHOPGM("No Mesh Loaded."); - else - SERIAL_ECHOPAIR("Mesh ", storage_slot, " Loaded."); - SERIAL_EOL(); - serial_delay(50); + SERIAL_ECHOLNPGM("done"); + } +#endif // UBL_G29_P31 - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - SERIAL_ECHOLNPAIR_F("Fade Height M420 Z", planner.z_fade_height, 4); - #endif +#if ENABLED(UBL_DEVEL_DEBUGGING) + /** + * Much of the 'What?' command can be eliminated. But until we are fully debugged, it is + * good to have the extra information. Soon... we prune this to just a few items + */ + void unified_bed_leveling::g29_what_command() { + report_state(); - adjust_mesh_to_mean(g29_c_flag, g29_constant); + if (storage_slot == -1) + SERIAL_ECHOPGM("No Mesh Loaded."); + else + SERIAL_ECHOPGM("Mesh ", storage_slot, " Loaded."); + SERIAL_EOL(); + serial_delay(50); - #if HAS_BED_PROBE - SERIAL_ECHOLNPAIR_F("Probe Offset M851 Z", probe.offset.z, 7); - #endif + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + SERIAL_ECHOLNPAIR_F("Fade Height M420 Z", planner.z_fade_height, 4); + #endif - SERIAL_ECHOLNPAIR("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50); - SERIAL_ECHOLNPAIR("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); serial_delay(50); - SERIAL_ECHOLNPAIR("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); serial_delay(50); - SERIAL_ECHOLNPAIR("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); serial_delay(50); - SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); serial_delay(50); - SERIAL_ECHOLNPAIR("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50); - SERIAL_ECHOLNPAIR("MESH_X_DIST ", MESH_X_DIST); - SERIAL_ECHOLNPAIR("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50); - - SERIAL_ECHOPGM("X-Axis Mesh Points at: "); - LOOP_L_N(i, GRID_MAX_POINTS_X) { - SERIAL_ECHO_F(LOGICAL_X_POSITION(mesh_index_to_xpos(i)), 3); - SERIAL_ECHOPGM(" "); - serial_delay(25); - } - SERIAL_EOL(); + adjust_mesh_to_mean(param.C_seen, param.C_constant); - SERIAL_ECHOPGM("Y-Axis Mesh Points at: "); - LOOP_L_N(i, GRID_MAX_POINTS_Y) { - SERIAL_ECHO_F(LOGICAL_Y_POSITION(mesh_index_to_ypos(i)), 3); - SERIAL_ECHOPGM(" "); - serial_delay(25); - } - SERIAL_EOL(); + #if HAS_BED_PROBE + SERIAL_ECHOLNPAIR_F("Probe Offset M851 Z", probe.offset.z, 7); + #endif - #if HAS_KILL - SERIAL_ECHOLNPAIR("Kill pin on :", int(KILL_PIN), " state:", int(kill_state())); - #endif + SERIAL_ECHOLNPGM("MESH_MIN_X " STRINGIFY(MESH_MIN_X) "=", MESH_MIN_X); serial_delay(50); + SERIAL_ECHOLNPGM("MESH_MIN_Y " STRINGIFY(MESH_MIN_Y) "=", MESH_MIN_Y); serial_delay(50); + SERIAL_ECHOLNPGM("MESH_MAX_X " STRINGIFY(MESH_MAX_X) "=", MESH_MAX_X); serial_delay(50); + SERIAL_ECHOLNPGM("MESH_MAX_Y " STRINGIFY(MESH_MAX_Y) "=", MESH_MAX_Y); serial_delay(50); + SERIAL_ECHOLNPGM("GRID_MAX_POINTS_X ", GRID_MAX_POINTS_X); serial_delay(50); + SERIAL_ECHOLNPGM("GRID_MAX_POINTS_Y ", GRID_MAX_POINTS_Y); serial_delay(50); + SERIAL_ECHOLNPGM("MESH_X_DIST ", MESH_X_DIST); + SERIAL_ECHOLNPGM("MESH_Y_DIST ", MESH_Y_DIST); serial_delay(50); + + SERIAL_ECHOPGM("X-Axis Mesh Points at: "); + LOOP_L_N(i, GRID_MAX_POINTS_X) { + SERIAL_ECHO_F(LOGICAL_X_POSITION(mesh_index_to_xpos(i)), 3); + SERIAL_ECHOPGM(" "); + serial_delay(25); + } + SERIAL_EOL(); - SERIAL_EOL(); - serial_delay(50); + SERIAL_ECHOPGM("Y-Axis Mesh Points at: "); + LOOP_L_N(i, GRID_MAX_POINTS_Y) { + SERIAL_ECHO_F(LOGICAL_Y_POSITION(mesh_index_to_ypos(i)), 3); + SERIAL_ECHOPGM(" "); + serial_delay(25); + } + SERIAL_EOL(); + + #if HAS_KILL + SERIAL_ECHOLNPGM("Kill pin on :", KILL_PIN, " state:", kill_state()); + #endif - #if ENABLED(UBL_DEVEL_DEBUGGING) - SERIAL_ECHOLNPAIR("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk); - serial_delay(50); + SERIAL_EOL(); + serial_delay(50); - SERIAL_ECHOLNPAIR("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index())); - serial_delay(50); + #if ENABLED(UBL_DEVEL_DEBUGGING) + SERIAL_ECHOLNPGM("ubl_state_at_invocation :", ubl_state_at_invocation, "\nubl_state_recursion_chk :", ubl_state_recursion_chk); + serial_delay(50); + + SERIAL_ECHOLNPGM("Meshes go from ", hex_address((void*)settings.meshes_start_index()), " to ", hex_address((void*)settings.meshes_end_index())); + serial_delay(50); - SERIAL_ECHOLNPAIR("sizeof(ubl) : ", (int)sizeof(ubl)); SERIAL_EOL(); - SERIAL_ECHOLNPAIR("z_value[][] size: ", (int)sizeof(z_values)); SERIAL_EOL(); - serial_delay(25); + SERIAL_ECHOLNPGM("sizeof(ubl) : ", sizeof(ubl)); SERIAL_EOL(); + SERIAL_ECHOLNPGM("z_value[][] size: ", sizeof(z_values)); SERIAL_EOL(); + serial_delay(25); - SERIAL_ECHOLNPAIR("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index()))); - serial_delay(50); + SERIAL_ECHOLNPGM("EEPROM free for UBL: ", hex_address((void*)(settings.meshes_end_index() - settings.meshes_start_index()))); + serial_delay(50); - SERIAL_ECHOLNPAIR("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n"); - serial_delay(25); - #endif // UBL_DEVEL_DEBUGGING + SERIAL_ECHOLNPGM("EEPROM can hold ", settings.calc_num_meshes(), " meshes.\n"); + serial_delay(25); + #endif // UBL_DEVEL_DEBUGGING - if (!sanity_check()) { - echo_name(); - SERIAL_ECHOLNPGM(" sanity checks passed."); - } + if (!sanity_check()) { + echo_name(); + SERIAL_ECHOLNPGM(" sanity checks passed."); } + } - /** - * When we are fully debugged, the EEPROM dump command will get deleted also. But - * right now, it is good to have the extra information. Soon... we prune this. - */ - void unified_bed_leveling::g29_eeprom_dump() { - uint8_t cccc; - - SERIAL_ECHO_MSG("EEPROM Dump:"); - persistentStore.access_start(); - for (uint16_t i = 0; i < persistentStore.capacity(); i += 16) { - if (!(i & 0x3)) idle(); - print_hex_word(i); - SERIAL_ECHOPGM(": "); - for (uint16_t j = 0; j < 16; j++) { - persistentStore.read_data(i + j, &cccc, sizeof(uint8_t)); - print_hex_byte(cccc); - SERIAL_CHAR(' '); - } - SERIAL_EOL(); + /** + * When we are fully debugged, the EEPROM dump command will get deleted also. But + * right now, it is good to have the extra information. Soon... we prune this. + */ + void unified_bed_leveling::g29_eeprom_dump() { + uint8_t cccc; + + SERIAL_ECHO_MSG("EEPROM Dump:"); + persistentStore.access_start(); + for (uint16_t i = 0; i < persistentStore.capacity(); i += 16) { + if (!(i & 0x3)) idle(); + print_hex_word(i); + SERIAL_ECHOPGM(": "); + for (uint16_t j = 0; j < 16; j++) { + persistentStore.read_data(i + j, &cccc, sizeof(uint8_t)); + print_hex_byte(cccc); + SERIAL_CHAR(' '); } SERIAL_EOL(); - persistentStore.access_finish(); } + SERIAL_EOL(); + persistentStore.access_finish(); + } - /** - * When we are fully debugged, this may go away. But there are some valid - * use cases for the users. So we can wait and see what to do with it. - */ - void unified_bed_leveling::g29_compare_current_mesh_to_stored_mesh() { - const int16_t a = settings.calc_num_meshes(); + /** + * When we are fully debugged, this may go away. But there are some valid + * use cases for the users. So we can wait and see what to do with it. + */ + void unified_bed_leveling::g29_compare_current_mesh_to_stored_mesh() { + const int16_t a = settings.calc_num_meshes(); - if (!a) { - SERIAL_ECHOLNPGM("?EEPROM storage not available."); - return; - } + if (!a) { + SERIAL_ECHOLNPGM("?EEPROM storage not available."); + return; + } - if (!parser.has_value() || !WITHIN(g29_storage_slot, 0, a - 1)) { - SERIAL_ECHOLNPAIR("?Invalid storage slot.\n?Use 0 to ", a - 1); - return; - } + if (!parser.has_value() || !WITHIN(parser.value_int(), 0, a - 1)) { + SERIAL_ECHOLNPGM("?Invalid storage slot.\n?Use 0 to ", a - 1); + return; + } - g29_storage_slot = parser.value_int(); + param.KLS_storage_slot = (int8_t)parser.value_int(); - float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; - settings.load_mesh(g29_storage_slot, &tmp_z_values); + float tmp_z_values[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; + settings.load_mesh(param.KLS_storage_slot, &tmp_z_values); - SERIAL_ECHOLNPAIR("Subtracting mesh in slot ", g29_storage_slot, " from current mesh."); + SERIAL_ECHOLNPGM("Subtracting mesh in slot ", param.KLS_storage_slot, " from current mesh."); - GRID_LOOP(x, y) { - z_values[x][y] -= tmp_z_values[x][y]; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); - } + GRID_LOOP(x, y) { + z_values[x][y] -= tmp_z_values[x][y]; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, z_values[x][y])); } + } - #endif // UBL_DEVEL_DEBUGGING +#endif // UBL_DEVEL_DEBUGGING #endif // AUTO_BED_LEVELING_UBL diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp index 8b7cd15a3c6d..f7e98c9fa77d 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../../../inc/MarlinConfig.h" #if ENABLED(AUTO_BED_LEVELING_UBL) @@ -37,7 +38,7 @@ #if !UBL_SEGMENTED - void unified_bed_leveling::line_to_destination_cartesian(const feedRate_t &scaled_fr_mm_s, const uint8_t extruder) { + void unified_bed_leveling::line_to_destination_cartesian(const_feedRate_t scaled_fr_mm_s, const uint8_t extruder) { /** * Much of the nozzle movement will be within the same cell. So we will do as little computation * as possible to determine if this is the case. If this move is within the same cell, we will @@ -113,20 +114,22 @@ const xy_float_t ad = sign * dist; const bool use_x_dist = ad.x > ad.y; - float on_axis_distance = use_x_dist ? dist.x : dist.y, - e_position = end.e - start.e, - z_position = end.z - start.z; + float on_axis_distance = use_x_dist ? dist.x : dist.y; - const float e_normalized_dist = e_position / on_axis_distance, // Allow divide by zero - z_normalized_dist = z_position / on_axis_distance; + const float z_normalized_dist = (end.z - start.z) / on_axis_distance; // Allow divide by zero + #if HAS_EXTRUDERS + const float e_normalized_dist = (end.e - start.e) / on_axis_distance; + const bool inf_normalized_flag = isinf(e_normalized_dist); + #endif xy_int8_t icell = istart; const float ratio = dist.y / dist.x, // Allow divide by zero c = start.y - ratio * start.x; - const bool inf_normalized_flag = isinf(e_normalized_dist), - inf_ratio_flag = isinf(ratio); + const bool inf_ratio_flag = isinf(ratio); + + xyze_pos_t dest; // Stores XYZE for segmented moves /** * Handle vertical lines that stay within one column. @@ -143,34 +146,36 @@ * For others the next X is the same so this can continue. * Calculate X at the next Y mesh line. */ - const float rx = inf_ratio_flag ? start.x : (next_mesh_line_y - c) / ratio; + dest.x = inf_ratio_flag ? start.x : (next_mesh_line_y - c) / ratio; - float z0 = z_correction_for_x_on_horizontal_mesh_line(rx, icell.x, icell.y) + float z0 = z_correction_for_x_on_horizontal_mesh_line(dest.x, icell.x, icell.y) * planner.fade_scaling_factor_for_z(end.z); // Undefined parts of the Mesh in z_values[][] are NAN. // Replace NAN corrections with 0.0 to prevent NAN propagation. if (isnan(z0)) z0 = 0.0; - const float ry = mesh_index_to_ypos(icell.y); + dest.y = mesh_index_to_ypos(icell.y); /** * Without this check, it's possible to generate a zero length move, as in the case where * the line is heading down, starting exactly on a mesh line boundary. Since this is rare * it might be fine to remove this check and let planner.buffer_segment() filter it out. */ - if (ry != start.y) { + if (dest.y != start.y) { if (!inf_normalized_flag) { // fall-through faster than branch - on_axis_distance = use_x_dist ? rx - start.x : ry - start.y; - e_position = start.e + on_axis_distance * e_normalized_dist; - z_position = start.z + on_axis_distance * z_normalized_dist; + on_axis_distance = use_x_dist ? dest.x - start.x : dest.y - start.y; + TERN_(HAS_EXTRUDERS, dest.e = start.e + on_axis_distance * e_normalized_dist); + dest.z = start.z + on_axis_distance * z_normalized_dist; } else { - e_position = end.e; - z_position = end.z; + TERN_(HAS_EXTRUDERS, dest.e = end.e); + dest.z = end.z; } - planner.buffer_segment(rx, ry, z_position + z0, e_position, scaled_fr_mm_s, extruder); + dest.z += z0; + planner.buffer_segment(dest, scaled_fr_mm_s, extruder); + } //else printf("FIRST MOVE PRUNED "); } @@ -188,12 +193,13 @@ */ if (iadd.y == 0) { // Horizontal line? icell.x += ineg.x; // Heading left? Just go to the left edge of the cell for the first move. + while (icell.x != iend.x + ineg.x) { icell.x += iadd.x; - const float rx = mesh_index_to_xpos(icell.x); - const float ry = ratio * rx + c; // Calculate Y at the next X mesh line + dest.x = mesh_index_to_xpos(icell.x); + dest.y = ratio * dest.x + c; // Calculate Y at the next X mesh line - float z0 = z_correction_for_y_on_vertical_mesh_line(ry, icell.x, icell.y) + float z0 = z_correction_for_y_on_vertical_mesh_line(dest.y, icell.x, icell.y) * planner.fade_scaling_factor_for_z(end.z); // Undefined parts of the Mesh in z_values[][] are NAN. @@ -205,19 +211,20 @@ * the line is heading left, starting exactly on a mesh line boundary. Since this is rare * it might be fine to remove this check and let planner.buffer_segment() filter it out. */ - if (rx != start.x) { + if (dest.x != start.x) { if (!inf_normalized_flag) { - on_axis_distance = use_x_dist ? rx - start.x : ry - start.y; - e_position = start.e + on_axis_distance * e_normalized_dist; // is based on X or Y because this is a horizontal move - z_position = start.z + on_axis_distance * z_normalized_dist; + on_axis_distance = use_x_dist ? dest.x - start.x : dest.y - start.y; + TERN_(HAS_EXTRUDERS, dest.e = start.e + on_axis_distance * e_normalized_dist); // Based on X or Y because the move is horizontal + dest.z = start.z + on_axis_distance * z_normalized_dist; } else { - e_position = end.e; - z_position = end.z; + TERN_(HAS_EXTRUDERS, dest.e = end.e); + dest.z = end.z; } - if (!planner.buffer_segment(rx, ry, z_position + z0, e_position, scaled_fr_mm_s, extruder)) - break; + dest.z += z0; + if (!planner.buffer_segment(dest, scaled_fr_mm_s, extruder)) break; + } //else printf("FIRST MOVE PRUNED "); } @@ -239,57 +246,65 @@ while (cnt) { const float next_mesh_line_x = mesh_index_to_xpos(icell.x + iadd.x), - next_mesh_line_y = mesh_index_to_ypos(icell.y + iadd.y), - ry = ratio * next_mesh_line_x + c, // Calculate Y at the next X mesh line - rx = (next_mesh_line_y - c) / ratio; // Calculate X at the next Y mesh line - // (No need to worry about ratio == 0. - // In that case, it was already detected - // as a vertical line move above.) - - if (neg.x == (rx > next_mesh_line_x)) { // Check if we hit the Y line first + next_mesh_line_y = mesh_index_to_ypos(icell.y + iadd.y); + + dest.y = ratio * next_mesh_line_x + c; // Calculate Y at the next X mesh line + dest.x = (next_mesh_line_y - c) / ratio; // Calculate X at the next Y mesh line + // (No need to worry about ratio == 0. + // In that case, it was already detected + // as a vertical line move above.) + + if (neg.x == (dest.x > next_mesh_line_x)) { // Check if we hit the Y line first // Yes! Crossing a Y Mesh Line next - float z0 = z_correction_for_x_on_horizontal_mesh_line(rx, icell.x - ineg.x, icell.y + iadd.y) + float z0 = z_correction_for_x_on_horizontal_mesh_line(dest.x, icell.x - ineg.x, icell.y + iadd.y) * planner.fade_scaling_factor_for_z(end.z); // Undefined parts of the Mesh in z_values[][] are NAN. // Replace NAN corrections with 0.0 to prevent NAN propagation. if (isnan(z0)) z0 = 0.0; + dest.y = next_mesh_line_y; + if (!inf_normalized_flag) { - on_axis_distance = use_x_dist ? rx - start.x : next_mesh_line_y - start.y; - e_position = start.e + on_axis_distance * e_normalized_dist; - z_position = start.z + on_axis_distance * z_normalized_dist; + on_axis_distance = use_x_dist ? dest.x - start.x : dest.y - start.y; + TERN_(HAS_EXTRUDERS, dest.e = start.e + on_axis_distance * e_normalized_dist); + dest.z = start.z + on_axis_distance * z_normalized_dist; } else { - e_position = end.e; - z_position = end.z; + TERN_(HAS_EXTRUDERS, dest.e = end.e); + dest.z = end.z; } - if (!planner.buffer_segment(rx, next_mesh_line_y, z_position + z0, e_position, scaled_fr_mm_s, extruder)) - break; + + dest.z += z0; + if (!planner.buffer_segment(dest, scaled_fr_mm_s, extruder)) break; + icell.y += iadd.y; cnt.y--; } else { // Yes! Crossing a X Mesh Line next - float z0 = z_correction_for_y_on_vertical_mesh_line(ry, icell.x + iadd.x, icell.y - ineg.y) + float z0 = z_correction_for_y_on_vertical_mesh_line(dest.y, icell.x + iadd.x, icell.y - ineg.y) * planner.fade_scaling_factor_for_z(end.z); // Undefined parts of the Mesh in z_values[][] are NAN. // Replace NAN corrections with 0.0 to prevent NAN propagation. if (isnan(z0)) z0 = 0.0; + dest.x = next_mesh_line_x; + if (!inf_normalized_flag) { - on_axis_distance = use_x_dist ? next_mesh_line_x - start.x : ry - start.y; - e_position = start.e + on_axis_distance * e_normalized_dist; - z_position = start.z + on_axis_distance * z_normalized_dist; + on_axis_distance = use_x_dist ? dest.x - start.x : dest.y - start.y; + TERN_(HAS_EXTRUDERS, dest.e = start.e + on_axis_distance * e_normalized_dist); + dest.z = start.z + on_axis_distance * z_normalized_dist; } else { - e_position = end.e; - z_position = end.z; + TERN_(HAS_EXTRUDERS, dest.e = end.e); + dest.z = end.z; } - if (!planner.buffer_segment(next_mesh_line_x, ry, z_position + z0, e_position, scaled_fr_mm_s, extruder)) - break; + dest.z += z0; + if (!planner.buffer_segment(dest, scaled_fr_mm_s, extruder)) break; + icell.x += iadd.x; cnt.x--; } @@ -309,6 +324,8 @@ #define DELTA_SEGMENT_MIN_LENGTH 0.25 // SCARA minimum segment size is 0.25mm #elif ENABLED(DELTA) #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND) + #elif ENABLED(POLARGRAPH) + #define DELTA_SEGMENT_MIN_LENGTH 0.10 // mm (still subject to DELTA_SEGMENTS_PER_SECOND) #else // CARTESIAN #ifdef LEVELED_SEGMENT_LENGTH #define DELTA_SEGMENT_MIN_LENGTH LEVELED_SEGMENT_LENGTH @@ -323,7 +340,7 @@ * Returns true if did NOT move, false if moved (requires current_position update). */ - bool _O2 unified_bed_leveling::line_to_destination_segmented(const feedRate_t &scaled_fr_mm_s) { + bool _O2 unified_bed_leveling::line_to_destination_segmented(const_feedRate_t scaled_fr_mm_s) { if (!position_is_reachable(destination)) // fail if moving outside reachable boundary return true; // did not move, so current_position still accurate @@ -335,7 +352,7 @@ #if IS_KINEMATIC const float seconds = cart_xy_mm / scaled_fr_mm_s; // Duration of XY move at requested rate - uint16_t segments = LROUND(delta_segments_per_second * seconds), // Preferred number of segments for distance @ feedrate + uint16_t segments = LROUND(segments_per_second * seconds), // Preferred number of segments for distance @ feedrate seglimit = LROUND(cart_xy_mm * RECIPROCAL(DELTA_SEGMENT_MIN_LENGTH)); // Number of segments at minimum segment length NOMORE(segments, seglimit); // Limit to minimum segment length (fewer segments) #else @@ -362,15 +379,11 @@ while (--segments) { raw += diff; planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, segment_xyz_mm - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif + OPTARG(SCARA_FEEDRATE_SCALING, inv_duration) ); } planner.buffer_line(destination, scaled_fr_mm_s, active_extruder, segment_xyz_mm - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif + OPTARG(SCARA_FEEDRATE_SCALING, inv_duration) ); return false; // Did not set current from destination } @@ -397,8 +410,8 @@ int8_t((raw.x - (MESH_MIN_X)) * RECIPROCAL(MESH_X_DIST)), int8_t((raw.y - (MESH_MIN_Y)) * RECIPROCAL(MESH_Y_DIST)) }; - LIMIT(icell.x, 0, (GRID_MAX_POINTS_X) - 1); - LIMIT(icell.y, 0, (GRID_MAX_POINTS_Y) - 1); + LIMIT(icell.x, 0, GRID_MAX_CELLS_X); + LIMIT(icell.y, 0, GRID_MAX_CELLS_Y); float z_x0y0 = z_values[icell.x ][icell.y ], // z at lower left corner z_x1y0 = z_values[icell.x+1][icell.y ], // z at upper left corner @@ -442,11 +455,9 @@ #endif ; - planner.buffer_line(raw.x, raw.y, raw.z + z_cxcy, raw.e, scaled_fr_mm_s, active_extruder, segment_xyz_mm - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif - ); + const float oldz = raw.z; raw.z += z_cxcy; + planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, segment_xyz_mm OPTARG(SCARA_FEEDRATE_SCALING, inv_duration) ); + raw.z = oldz; if (segments == 0) // done with last segment return false; // didn't set current from destination diff --git a/Marlin/src/feature/binary_stream.h b/Marlin/src/feature/binary_stream.h index 81d6e7184ba9..417e39c74507 100644 --- a/Marlin/src/feature/binary_stream.h +++ b/Marlin/src/feature/binary_stream.h @@ -24,32 +24,29 @@ #include "../inc/MarlinConfig.h" #define BINARY_STREAM_COMPRESSION - #if ENABLED(BINARY_STREAM_COMPRESSION) #include "../libs/heatshrink/heatshrink_decoder.h" + // STM32 (and others?) require a word-aligned buffer for SD card transfers via DMA + static __attribute__((aligned(sizeof(size_t)))) uint8_t decode_buffer[512] = {}; + static heatshrink_decoder hsd; #endif -inline bool bs_serial_data_available(const uint8_t index) { +inline bool bs_serial_data_available(const serial_index_t index) { return SERIAL_IMPL.available(index); } -inline int bs_read_serial(const uint8_t index) { +inline int bs_read_serial(const serial_index_t index) { return SERIAL_IMPL.read(index); } -#if ENABLED(BINARY_STREAM_COMPRESSION) - static heatshrink_decoder hsd; - static uint8_t decode_buffer[512] = {}; -#endif - class SDFileTransferProtocol { private: struct Packet { struct [[gnu::packed]] Open { - static bool validate(char* buffer, size_t length) { + static bool validate(char *buffer, size_t length) { return (length > sizeof(Open) && buffer[length - 1] == '\0'); } - static Open& decode(char* buffer) { + static Open& decode(char *buffer) { data = &buffer[2]; return *reinterpret_cast(buffer); } @@ -62,7 +59,7 @@ class SDFileTransferProtocol { }; }; - static bool file_open(char* filename) { + static bool file_open(char *filename) { if (!dummy_transfer) { card.mount(); card.openFileWrite(filename); @@ -74,7 +71,7 @@ class SDFileTransferProtocol { return true; } - static bool file_write(char* buffer, const size_t length) { + static bool file_write(char *buffer, const size_t length) { #if ENABLED(BINARY_STREAM_COMPRESSION) if (compression) { size_t total_processed = 0, processed_count = 0; @@ -145,15 +142,15 @@ class SDFileTransferProtocol { } } - static void process(uint8_t packet_type, char* buffer, const uint16_t length) { + static void process(uint8_t packet_type, char *buffer, const uint16_t length) { transfer_timeout = millis() + TIMEOUT; switch (static_cast(packet_type)) { case FileTransfer::QUERY: - SERIAL_ECHOPAIR("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH); + SERIAL_ECHOPGM("PFT:version:", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH); #if ENABLED(BINARY_STREAM_COMPRESSION) - SERIAL_ECHOLNPAIR(":compresion:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS); + SERIAL_ECHOLNPGM(":compression:heatshrink,", HEATSHRINK_STATIC_WINDOW_BITS, ",", HEATSHRINK_STATIC_LOOKAHEAD_BITS); #else - SERIAL_ECHOLNPGM(":compresion:none"); + SERIAL_ECHOLNPGM(":compression:none"); #endif break; case FileTransfer::OPEN: @@ -325,7 +322,7 @@ class BinaryStream { if (packet.header.checksum == packet.header_checksum) { // The SYNC control packet is a special case in that it doesn't require the stream sync to be correct if (static_cast(packet.header.protocol()) == Protocol::CONTROL && static_cast(packet.header.type()) == ProtocolControl::SYNC) { - SERIAL_ECHOLNPAIR("ss", sync, ",", buffer_size, ",", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH); + SERIAL_ECHOLNPGM("ss", sync, ",", buffer_size, ",", VERSION_MAJOR, ".", VERSION_MINOR, ".", VERSION_PATCH); stream_state = StreamState::PACKET_RESET; break; } @@ -340,7 +337,7 @@ class BinaryStream { stream_state = StreamState::PACKET_PROCESS; } else if (packet.header.sync == sync - 1) { // ok response must have been lost - SERIAL_ECHOLNPAIR("ok", packet.header.sync); // transmit valid packet received and drop the payload + SERIAL_ECHOLNPGM("ok", packet.header.sync); // transmit valid packet received and drop the payload stream_state = StreamState::PACKET_RESET; } else if (packet_retries) { @@ -352,8 +349,7 @@ class BinaryStream { } } else { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("Packet header(", packet.header.sync, "?) corrupt"); + SERIAL_ECHO_MSG("Packet header(", packet.header.sync, "?) corrupt"); stream_state = StreamState::PACKET_RESEND; } } @@ -387,8 +383,7 @@ class BinaryStream { stream_state = StreamState::PACKET_PROCESS; } else { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("Packet(", packet.header.sync, ") payload corrupt"); + SERIAL_ECHO_MSG("Packet(", packet.header.sync, ") payload corrupt"); stream_state = StreamState::PACKET_RESEND; } } @@ -398,7 +393,7 @@ class BinaryStream { packet_retries = 0; bytes_received += packet.header.size; - SERIAL_ECHOLNPAIR("ok", packet.header.sync); // transmit valid packet received + SERIAL_ECHOLNPGM("ok", packet.header.sync); // transmit valid packet received dispatch(); stream_state = StreamState::PACKET_RESET; break; @@ -406,9 +401,8 @@ class BinaryStream { if (packet_retries < MAX_RETRIES || MAX_RETRIES == 0) { packet_retries++; stream_state = StreamState::PACKET_RESET; - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("Resend request ", int(packet_retries)); - SERIAL_ECHOLNPAIR("rs", sync); + SERIAL_ECHO_MSG("Resend request ", packet_retries); + SERIAL_ECHOLNPGM("rs", sync); } else stream_state = StreamState::PACKET_ERROR; @@ -418,7 +412,7 @@ class BinaryStream { stream_state = StreamState::PACKET_RESEND; break; case StreamState::PACKET_ERROR: - SERIAL_ECHOLNPAIR("fe", packet.header.sync); + SERIAL_ECHOLNPGM("fe", packet.header.sync); reset(); // reset everything, resync required stream_state = StreamState::PACKET_RESET; break; diff --git a/Marlin/src/feature/bltouch.cpp b/Marlin/src/feature/bltouch.cpp index 48eaf9efc400..49a10f62b155 100644 --- a/Marlin/src/feature/bltouch.cpp +++ b/Marlin/src/feature/bltouch.cpp @@ -39,7 +39,7 @@ void stop(); #include "../core/debug_out.h" bool BLTouch::command(const BLTCommand cmd, const millis_t &ms) { - if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPAIR("BLTouch Command :", cmd); + if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("BLTouch Command :", cmd); MOVE_SERVO(Z_PROBE_SERVO_NR, cmd); safe_delay(_MAX(ms, (uint32_t)BLTOUCH_DELAY)); // BLTOUCH_DELAY is also the *minimum* delay return triggered(); @@ -64,7 +64,7 @@ void BLTouch::init(const bool set_voltage/*=false*/) { #else if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLNPAIR("last_written_mode - ", (int)last_written_mode); + DEBUG_ECHOLNPGM("last_written_mode - ", last_written_mode); DEBUG_ECHOLNPGM("config mode - " #if ENABLED(BLTOUCH_SET_5V_MODE) "BLTOUCH_SET_5V_MODE" @@ -175,7 +175,7 @@ bool BLTouch::status_proc() { _set_SW_mode(); // Incidentally, _set_SW_mode() will also RESET any active alarm const bool tr = triggered(); // If triggered in SW mode, the pin is up, it is STOWED - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("BLTouch is ", (int)tr); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch is ", tr); if (tr) _stow(); else _deploy(); // Turn off SW mode, reset any trigger, honor pin state return !tr; @@ -187,7 +187,7 @@ void BLTouch::mode_conv_proc(const bool M5V) { * BLTOUCH V3.0: This will set the mode (twice) and sadly, a STOW is needed at the end, because of the deploy * BLTOUCH V3.1: This will set the mode and store it in the eeprom. The STOW is not needed but does not hurt */ - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("BLTouch Set Mode - ", (int)M5V); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("BLTouch Set Mode - ", M5V); _deploy(); if (M5V) _set_5V_mode(); else _set_OD_mode(); _mode_store(); diff --git a/Marlin/src/feature/bltouch.h b/Marlin/src/feature/bltouch.h index 8bd41f03e404..9ecccb4256f4 100644 --- a/Marlin/src/feature/bltouch.h +++ b/Marlin/src/feature/bltouch.h @@ -74,33 +74,33 @@ class BLTouch { static bool last_written_mode; // Initialized by settings.load, 0 = Open Drain; 1 = 5V Drain // DEPLOY and STOW are wrapped for error handling - these are used by homing and by probing - FORCE_INLINE static bool deploy() { return deploy_proc(); } - FORCE_INLINE static bool stow() { return stow_proc(); } - FORCE_INLINE static bool status() { return status_proc(); } + static bool deploy() { return deploy_proc(); } + static bool stow() { return stow_proc(); } + static bool status() { return status_proc(); } // Native BLTouch commands ("Underscore"...), used in lcd menus and internally - FORCE_INLINE static void _reset() { command(BLTOUCH_RESET, BLTOUCH_RESET_DELAY); } + static void _reset() { command(BLTOUCH_RESET, BLTOUCH_RESET_DELAY); } - FORCE_INLINE static void _selftest() { command(BLTOUCH_SELFTEST, BLTOUCH_DELAY); } + static void _selftest() { command(BLTOUCH_SELFTEST, BLTOUCH_DELAY); } - FORCE_INLINE static void _set_SW_mode() { command(BLTOUCH_SW_MODE, BLTOUCH_DELAY); } - FORCE_INLINE static void _reset_SW_mode() { if (triggered()) _stow(); else _deploy(); } + static void _set_SW_mode() { command(BLTOUCH_SW_MODE, BLTOUCH_DELAY); } + static void _reset_SW_mode() { if (triggered()) _stow(); else _deploy(); } - FORCE_INLINE static void _set_5V_mode() { command(BLTOUCH_5V_MODE, BLTOUCH_SET5V_DELAY); } - FORCE_INLINE static void _set_OD_mode() { command(BLTOUCH_OD_MODE, BLTOUCH_SETOD_DELAY); } - FORCE_INLINE static void _mode_store() { command(BLTOUCH_MODE_STORE, BLTOUCH_MODE_STORE_DELAY); } + static void _set_5V_mode() { command(BLTOUCH_5V_MODE, BLTOUCH_SET5V_DELAY); } + static void _set_OD_mode() { command(BLTOUCH_OD_MODE, BLTOUCH_SETOD_DELAY); } + static void _mode_store() { command(BLTOUCH_MODE_STORE, BLTOUCH_MODE_STORE_DELAY); } - FORCE_INLINE static void _deploy() { command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); } - FORCE_INLINE static void _stow() { command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY); } + static void _deploy() { command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); } + static void _stow() { command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY); } - FORCE_INLINE static void mode_conv_5V() { mode_conv_proc(true); } - FORCE_INLINE static void mode_conv_OD() { mode_conv_proc(false); } + static void mode_conv_5V() { mode_conv_proc(true); } + static void mode_conv_OD() { mode_conv_proc(false); } static bool triggered(); private: - FORCE_INLINE static bool _deploy_query_alarm() { return command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); } - FORCE_INLINE static bool _stow_query_alarm() { return command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY) == STOW_ALARM; } + static bool _deploy_query_alarm() { return command(BLTOUCH_DEPLOY, BLTOUCH_DEPLOY_DELAY); } + static bool _stow_query_alarm() { return command(BLTOUCH_STOW, BLTOUCH_STOW_DELAY) == STOW_ALARM; } static void clear(); static bool command(const BLTCommand cmd, const millis_t &ms); diff --git a/Marlin/src/feature/cancel_object.cpp b/Marlin/src/feature/cancel_object.cpp index 853e765b660f..9d50bfc0d412 100644 --- a/Marlin/src/feature/cancel_object.cpp +++ b/Marlin/src/feature/cancel_object.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../inc/MarlinConfig.h" #if ENABLED(CANCEL_OBJECTS) @@ -43,7 +44,7 @@ void CancelObject::set_active_object(const int8_t obj) { else skipping = false; - #if HAS_DISPLAY + #if BOTH(HAS_STATUS_MESSAGE, CANCEL_OBJECTS_REPORTING) if (active_object >= 0) ui.status_printf_P(0, PSTR(S_FMT " %i"), GET_TEXT(MSG_PRINTING_OBJECT), int(active_object)); else @@ -66,10 +67,8 @@ void CancelObject::uncancel_object(const int8_t obj) { } void CancelObject::report() { - if (active_object >= 0) { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("Active Object: ", int(active_object)); - } + if (active_object >= 0) + SERIAL_ECHO_MSG("Active Object: ", active_object); if (canceled) { SERIAL_ECHO_START(); diff --git a/Marlin/src/feature/caselight.cpp b/Marlin/src/feature/caselight.cpp index 0eba102a04b2..1baef6d46845 100644 --- a/Marlin/src/feature/caselight.cpp +++ b/Marlin/src/feature/caselight.cpp @@ -38,18 +38,10 @@ CaseLight caselight; bool CaseLight::on = CASE_LIGHT_DEFAULT_ON; -#if ENABLED(CASE_LIGHT_USE_NEOPIXEL) - LEDColor CaseLight::color = - #ifdef CASE_LIGHT_NEOPIXEL_COLOR - CASE_LIGHT_NEOPIXEL_COLOR - #else - { 255, 255, 255, 255 } - #endif - ; -#endif - -#ifndef INVERT_CASE_LIGHT - #define INVERT_CASE_LIGHT false +#if CASE_LIGHT_IS_COLOR_LED + #include "leds/leds.h" + constexpr uint8_t init_case_light[] = CASE_LIGHT_DEFAULT_COLOR; + LEDColor CaseLight::color = { init_case_light[0], init_case_light[1], init_case_light[2] OPTARG(HAS_WHITE_LED, init_case_light[3]) }; #endif void CaseLight::update(const bool sflag) { @@ -68,20 +60,16 @@ void CaseLight::update(const bool sflag) { if (sflag && on) brightness = brightness_sav; // Restore last brightness for M355 S1 - const uint8_t i = on ? brightness : 0, n10ct = INVERT_CASE_LIGHT ? 255 - i : i; + const uint8_t i = on ? brightness : 0, n10ct = ENABLED(INVERT_CASE_LIGHT) ? 255 - i : i; + UNUSED(n10ct); #endif - #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) - - leds.set_color( - MakeLEDColor(color.r, color.g, color.b, color.w, n10ct), - false - ); - - #else // !CASE_LIGHT_USE_NEOPIXEL + #if CASE_LIGHT_IS_COLOR_LED + leds.set_color(LEDColor(color.r, color.g, color.b OPTARG(HAS_WHITE_LED, color.w), n10ct)); + #else // !CASE_LIGHT_IS_COLOR_LED #if CASELIGHT_USES_BRIGHTNESS - if (PWM_PIN(CASE_LIGHT_PIN)) + if (pin_is_pwm()) analogWrite(pin_t(CASE_LIGHT_PIN), ( #if CASE_LIGHT_MAX_PWM == 255 n10ct @@ -92,11 +80,15 @@ void CaseLight::update(const bool sflag) { else #endif { - const bool s = on ? !INVERT_CASE_LIGHT : INVERT_CASE_LIGHT; + const bool s = on ? TERN(INVERT_CASE_LIGHT, LOW, HIGH) : TERN(INVERT_CASE_LIGHT, HIGH, LOW); WRITE(CASE_LIGHT_PIN, s ? HIGH : LOW); } - #endif // !CASE_LIGHT_USE_NEOPIXEL + #endif // !CASE_LIGHT_IS_COLOR_LED + + #if ENABLED(CASE_LIGHT_USE_RGB_LED) + if (leds.lights_on) leds.update(); else leds.set_off(); + #endif } #endif // CASE_LIGHT_ENABLE diff --git a/Marlin/src/feature/caselight.h b/Marlin/src/feature/caselight.h index 2198c85f2a8e..b2e82f9b838f 100644 --- a/Marlin/src/feature/caselight.h +++ b/Marlin/src/feature/caselight.h @@ -21,30 +21,40 @@ */ #pragma once -#include "../inc/MarlinConfigPre.h" +#include "../inc/MarlinConfig.h" -#if ENABLED(CASE_LIGHT_USE_NEOPIXEL) - #include "leds/leds.h" +#if CASE_LIGHT_IS_COLOR_LED + #include "leds/leds.h" // for LEDColor #endif -#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) || ENABLED(CASE_LIGHT_USE_NEOPIXEL) +#if NONE(CASE_LIGHT_NO_BRIGHTNESS, CASE_LIGHT_IS_COLOR_LED) || ENABLED(CASE_LIGHT_USE_NEOPIXEL) #define CASELIGHT_USES_BRIGHTNESS 1 #endif class CaseLight { public: - #if CASELIGHT_USES_BRIGHTNESS + static bool on; + #if ENABLED(CASELIGHT_USES_BRIGHTNESS) static uint8_t brightness; #endif - static bool on; + + static bool pin_is_pwm() { return TERN0(NEED_CASE_LIGHT_PIN, PWM_PIN(CASE_LIGHT_PIN)); } + static bool has_brightness() { return TERN0(CASELIGHT_USES_BRIGHTNESS, TERN(CASE_LIGHT_USE_NEOPIXEL, true, pin_is_pwm())); } + + static void init() { + #if NEED_CASE_LIGHT_PIN + if (pin_is_pwm()) SET_PWM(CASE_LIGHT_PIN); else SET_OUTPUT(CASE_LIGHT_PIN); + #endif + update_brightness(); + } static void update(const bool sflag); static inline void update_brightness() { update(false); } - static inline void update_enabled() { update(true); } + static inline void update_enabled() { update(true); } -private: - #if ENABLED(CASE_LIGHT_USE_NEOPIXEL) - static LEDColor color; + #if ENABLED(CASE_LIGHT_IS_COLOR_LED) + private: + static LEDColor color; #endif }; diff --git a/Marlin/src/feature/closedloop.cpp b/Marlin/src/feature/closedloop.cpp index 8a97f0c0cd7b..1b9f711a6bbd 100644 --- a/Marlin/src/feature/closedloop.cpp +++ b/Marlin/src/feature/closedloop.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../inc/MarlinConfig.h" #if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) diff --git a/Marlin/src/feature/controllerfan.cpp b/Marlin/src/feature/controllerfan.cpp index 020646775253..5efddbb11169 100644 --- a/Marlin/src/feature/controllerfan.cpp +++ b/Marlin/src/feature/controllerfan.cpp @@ -25,7 +25,7 @@ #if ENABLED(USE_CONTROLLER_FAN) #include "controllerfan.h" -#include "../module/stepper/indirection.h" +#include "../module/stepper.h" #include "../module/temperature.h" ControllerFan controllerFan; @@ -54,31 +54,15 @@ void ControllerFan::update() { if (ELAPSED(ms, nextMotorCheck)) { nextMotorCheck = ms + 2500UL; // Not a time critical function, so only check every 2.5s - #define MOTOR_IS_ON(A,B) (A##_ENABLE_READ() == bool(B##_ENABLE_ON)) - #define _OR_ENABLED_E(N) || MOTOR_IS_ON(E##N,E) - - const bool motor_on = ( - ( DISABLED(CONTROLLER_FAN_IGNORE_Z) && - ( MOTOR_IS_ON(Z,Z) - || TERN0(HAS_Z2_ENABLE, MOTOR_IS_ON(Z2,Z)) - || TERN0(HAS_Z3_ENABLE, MOTOR_IS_ON(Z3,Z)) - || TERN0(HAS_Z4_ENABLE, MOTOR_IS_ON(Z4,Z)) - ) - ) || ( - DISABLED(CONTROLLER_FAN_USE_Z_ONLY) && - ( MOTOR_IS_ON(X,X) || MOTOR_IS_ON(Y,Y) - || TERN0(HAS_X2_ENABLE, MOTOR_IS_ON(X2,X)) - || TERN0(HAS_Y2_ENABLE, MOTOR_IS_ON(Y2,Y)) - #if E_STEPPERS - REPEAT(E_STEPPERS, _OR_ENABLED_E) - #endif - ) - ) - ); - - // If any of the drivers or the heated bed are enabled... - if (motor_on || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0)) - lastMotorOn = ms; //... set time to NOW so the fan will turn on + // If any triggers for the controller fan are true... + // - At least one stepper driver is enabled + // - The heated bed is enabled + // - TEMP_SENSOR_BOARD is reporting >= CONTROLLER_FAN_MIN_BOARD_TEMP + const ena_mask_t axis_mask = TERN(CONTROLLER_FAN_USE_Z_ONLY, _BV(Z_AXIS), ~TERN0(CONTROLLER_FAN_IGNORE_Z, _BV(Z_AXIS))); + if ( (stepper.axis_enabled.bits & axis_mask) + || TERN0(HAS_HEATED_BED, thermalManager.temp_bed.soft_pwm_amount > 0) + || TERN0(HAS_CONTROLLER_FAN_MIN_BOARD_TEMP, thermalManager.wholeDegBoard() >= CONTROLLER_FAN_MIN_BOARD_TEMP) + ) lastMotorOn = ms; //... set time to NOW so the fan will turn on // Fan Settings. Set fan > 0: // - If AutoMode is on and steppers have been enabled for CONTROLLERFAN_IDLE_TIME seconds. diff --git a/Marlin/src/feature/cooler.cpp b/Marlin/src/feature/cooler.cpp new file mode 100644 index 000000000000..e0f99777d19a --- /dev/null +++ b/Marlin/src/feature/cooler.cpp @@ -0,0 +1,48 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../inc/MarlinConfig.h" + +#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) + +#include "cooler.h" +Cooler cooler; + +#if HAS_COOLER + uint8_t Cooler::mode = 0; + uint16_t Cooler::capacity; + uint16_t Cooler::load; + bool Cooler::enabled = false; +#endif + +#if ENABLED(LASER_COOLANT_FLOW_METER) + bool Cooler::flowmeter = false; + millis_t Cooler::flowmeter_next_ms; // = 0 + volatile uint16_t Cooler::flowpulses; + float Cooler::flowrate; + #if ENABLED(FLOWMETER_SAFETY) + bool Cooler::flowsafety_enabled = true; + bool Cooler::flowfault = false; + #endif +#endif + +#endif // HAS_COOLER || LASER_COOLANT_FLOW_METER diff --git a/Marlin/src/feature/cooler.h b/Marlin/src/feature/cooler.h new file mode 100644 index 000000000000..9891514e23c9 --- /dev/null +++ b/Marlin/src/feature/cooler.h @@ -0,0 +1,109 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../inc/MarlinConfigPre.h" + +#ifndef FLOWMETER_PPL + #define FLOWMETER_PPL 5880 // Pulses per liter +#endif +#ifndef FLOWMETER_INTERVAL + #define FLOWMETER_INTERVAL 1000 // milliseconds +#endif + +// Cooling device + +class Cooler { +public: + static uint16_t capacity; // Cooling capacity in watts + static uint16_t load; // Cooling load in watts + + static bool enabled; + static void enable() { enabled = true; } + static void disable() { enabled = false; } + static void toggle() { enabled = !enabled; } + + static uint8_t mode; // 0 = CO2 Liquid cooling, 1 = Laser Diode TEC Heatsink Cooling + static void set_mode(const uint8_t m) { mode = m; } + + #if ENABLED(LASER_COOLANT_FLOW_METER) + static float flowrate; // Flow meter reading in liters-per-minute. + static bool flowmeter; // Flag to monitor the flow + static volatile uint16_t flowpulses; // Flowmeter IRQ pulse count + static millis_t flowmeter_next_ms; // Next time at which to calculate flow + + static void set_flowmeter(const bool sflag) { + if (flowmeter != sflag) { + flowmeter = sflag; + if (sflag) { + flowpulses = 0; + flowmeter_next_ms = millis() + FLOWMETER_INTERVAL; + } + } + } + + // To calculate flow we only need to count pulses + static void flowmeter_ISR() { flowpulses++; } + + // Enable / Disable the flow meter interrupt + static void flowmeter_interrupt_enable() { + attachInterrupt(digitalPinToInterrupt(FLOWMETER_PIN), flowmeter_ISR, RISING); + } + static void flowmeter_interrupt_disable() { + detachInterrupt(digitalPinToInterrupt(FLOWMETER_PIN)); + } + + // Enable / Disable the flow meter interrupt + static void flowmeter_enable() { set_flowmeter(true); flowpulses = 0; flowmeter_interrupt_enable(); } + static void flowmeter_disable() { set_flowmeter(false); flowmeter_interrupt_disable(); flowpulses = 0; } + + // Get the total flow (in liters per minute) since the last reading + static void calc_flowrate() { + // flowrate = (litres) * (seconds) = litres per minute + flowrate = (flowpulses / (float)FLOWMETER_PPL) * ((1000.0f / (float)FLOWMETER_INTERVAL) * 60.0f); + flowpulses = 0; + } + + // Userland task to update the flow meter + static void flowmeter_task(const millis_t ms=millis()) { + if (!flowmeter) // !! The flow meter must always be on !! + flowmeter_enable(); // Init and prime + if (ELAPSED(ms, flowmeter_next_ms)) { + calc_flowrate(); + flowmeter_next_ms = ms + FLOWMETER_INTERVAL; + } + } + + #if ENABLED(FLOWMETER_SAFETY) + static bool flowfault; // Flag that the cooler is in a fault state + static bool flowsafety_enabled; // Flag to disable the cutter if flow rate is too low + static void flowsafety_toggle() { flowsafety_enabled = !flowsafety_enabled; } + static bool check_flow_too_low() { + const bool too_low = flowsafety_enabled && flowrate < (FLOWMETER_MIN_LITERS_PER_MINUTE); + flowfault = too_low; + return too_low; + } + #endif + #endif +}; + +extern Cooler cooler; diff --git a/Marlin/src/feature/dac/dac_dac084s085.cpp b/Marlin/src/feature/dac/dac_dac084s085.cpp index 649aa5561bfa..b88aaf802bdf 100644 --- a/Marlin/src/feature/dac/dac_dac084s085.cpp +++ b/Marlin/src/feature/dac/dac_dac084s085.cpp @@ -20,35 +20,35 @@ void dac084s085::begin() { uint8_t externalDac_buf[] = { 0x20, 0x00 }; // all off // All SPI chip-select HIGH - SET_OUTPUT(DAC0_SYNC); + SET_OUTPUT(DAC0_SYNC_PIN); #if HAS_MULTI_EXTRUDER - SET_OUTPUT(DAC1_SYNC); + SET_OUTPUT(DAC1_SYNC_PIN); #endif cshigh(); spiBegin(); //init onboard DAC DELAY_US(2); - WRITE(DAC0_SYNC, LOW); + WRITE(DAC0_SYNC_PIN, LOW); DELAY_US(2); - WRITE(DAC0_SYNC, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); DELAY_US(2); - WRITE(DAC0_SYNC, LOW); + WRITE(DAC0_SYNC_PIN, LOW); spiSend(SPI_CHAN_DAC, externalDac_buf, COUNT(externalDac_buf)); - WRITE(DAC0_SYNC, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); #if HAS_MULTI_EXTRUDER //init Piggy DAC DELAY_US(2); - WRITE(DAC1_SYNC, LOW); + WRITE(DAC1_SYNC_PIN, LOW); DELAY_US(2); - WRITE(DAC1_SYNC, HIGH); + WRITE(DAC1_SYNC_PIN, HIGH); DELAY_US(2); - WRITE(DAC1_SYNC, LOW); + WRITE(DAC1_SYNC_PIN, LOW); spiSend(SPI_CHAN_DAC, externalDac_buf, COUNT(externalDac_buf)); - WRITE(DAC1_SYNC, HIGH); + WRITE(DAC1_SYNC_PIN, HIGH); #endif return; @@ -66,18 +66,18 @@ void dac084s085::setValue(const uint8_t channel, const uint8_t value) { cshigh(); if (channel > 3) { // DAC Piggy E1,E2,E3 - WRITE(DAC1_SYNC, LOW); + WRITE(DAC1_SYNC_PIN, LOW); DELAY_US(2); - WRITE(DAC1_SYNC, HIGH); + WRITE(DAC1_SYNC_PIN, HIGH); DELAY_US(2); - WRITE(DAC1_SYNC, LOW); + WRITE(DAC1_SYNC_PIN, LOW); } else { // DAC onboard X,Y,Z,E0 - WRITE(DAC0_SYNC, LOW); + WRITE(DAC0_SYNC_PIN, LOW); DELAY_US(2); - WRITE(DAC0_SYNC, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); DELAY_US(2); - WRITE(DAC0_SYNC, LOW); + WRITE(DAC0_SYNC_PIN, LOW); } DELAY_US(2); @@ -85,13 +85,13 @@ void dac084s085::setValue(const uint8_t channel, const uint8_t value) { } void dac084s085::cshigh() { - WRITE(DAC0_SYNC, HIGH); + WRITE(DAC0_SYNC_PIN, HIGH); #if HAS_MULTI_EXTRUDER - WRITE(DAC1_SYNC, HIGH); + WRITE(DAC1_SYNC_PIN, HIGH); #endif - WRITE(SPI_EEPROM1_CS, HIGH); - WRITE(SPI_EEPROM2_CS, HIGH); - WRITE(SPI_FLASH_CS, HIGH); + WRITE(SPI_EEPROM1_CS_PIN, HIGH); + WRITE(SPI_EEPROM2_CS_PIN, HIGH); + WRITE(SPI_FLASH_CS_PIN, HIGH); WRITE(SD_SS_PIN, HIGH); } diff --git a/Marlin/src/feature/dac/dac_mcp4728.cpp b/Marlin/src/feature/dac/dac_mcp4728.cpp index 4f33c4e0502a..6f5a9ee691ac 100644 --- a/Marlin/src/feature/dac/dac_mcp4728.cpp +++ b/Marlin/src/feature/dac/dac_mcp4728.cpp @@ -32,7 +32,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "dac_mcp4728.h" @@ -66,14 +66,14 @@ uint8_t MCP4728::analogWrite(const uint8_t channel, const uint16_t value) { } /** - * Write all input resistor values to EEPROM using SequencialWrite method. + * Write all input resistor values to EEPROM using SequentialWrite method. * This will update both input register and EEPROM value * This will also write current Vref, PowerDown, Gain settings to EEPROM */ uint8_t MCP4728::eepromWrite() { Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS)); Wire.write(SEQWRITE); - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { Wire.write(DAC_STEPPER_VREF << 7 | DAC_STEPPER_GAIN << 4 | highByte(dac_values[i])); Wire.write(lowByte(dac_values[i])); } @@ -81,7 +81,7 @@ uint8_t MCP4728::eepromWrite() { } /** - * Write Voltage reference setting to all input regiters + * Write Voltage reference setting to all input registers */ uint8_t MCP4728::setVref_all(const uint8_t value) { Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS)); @@ -89,7 +89,7 @@ uint8_t MCP4728::setVref_all(const uint8_t value) { return Wire.endTransmission(); } /** - * Write Gain setting to all input regiters + * Write Gain setting to all input registers */ uint8_t MCP4728::setGain_all(const uint8_t value) { Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS)); @@ -129,13 +129,13 @@ void MCP4728::setDrvPct(xyze_uint_t &pct) { } /** - * FastWrite input register values - All DAC ouput update. refer to DATASHEET 5.6.1 + * FastWrite input register values - All DAC output update. refer to DATASHEET 5.6.1 * DAC Input and PowerDown bits update. * No EEPROM update */ uint8_t MCP4728::fastWrite() { Wire.beginTransmission(I2C_ADDRESS(DAC_DEV_ADDRESS)); - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { Wire.write(highByte(dac_values[i])); Wire.write(lowByte(dac_values[i])); } diff --git a/Marlin/src/feature/dac/stepper_dac.cpp b/Marlin/src/feature/dac/stepper_dac.cpp index 5170a3551108..ff730e93c62c 100644 --- a/Marlin/src/feature/dac/stepper_dac.cpp +++ b/Marlin/src/feature/dac/stepper_dac.cpp @@ -26,7 +26,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "stepper_dac.h" #include "../../MarlinCore.h" // for SP_X_LBL... @@ -51,7 +51,7 @@ int StepperDAC::init() { mcp4728.setVref_all(DAC_STEPPER_VREF); mcp4728.setGain_all(DAC_STEPPER_GAIN); - if (mcp4728.getDrvPct(0) < 1 || mcp4728.getDrvPct(1) < 1 || mcp4728.getDrvPct(2) < 1 || mcp4728.getDrvPct(3) < 1 ) { + if (mcp4728.getDrvPct(0) < 1 || mcp4728.getDrvPct(1) < 1 || mcp4728.getDrvPct(2) < 1 || mcp4728.getDrvPct(3) < 1) { mcp4728.setDrvPct(dac_channel_pct); mcp4728.eepromWrite(); } @@ -77,7 +77,7 @@ static float dac_amps(int8_t n) { return mcp4728.getValue(dac_order[n]) * 0.125 uint8_t StepperDAC::get_current_percent(const AxisEnum axis) { return mcp4728.getDrvPct(dac_order[axis]); } void StepperDAC::set_current_percents(xyze_uint8_t &pct) { - LOOP_XYZE(i) dac_channel_pct[i] = pct[dac_order[i]]; + LOOP_LOGICAL_AXES(i) dac_channel_pct[i] = pct[dac_order[i]]; mcp4728.setDrvPct(dac_channel_pct); } @@ -85,10 +85,16 @@ void StepperDAC::print_values() { if (!dac_present) return; SERIAL_ECHO_MSG("Stepper current values in % (Amps):"); SERIAL_ECHO_START(); - SERIAL_ECHOPAIR_P( SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")")); - SERIAL_ECHOPAIR_P( SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")")); - SERIAL_ECHOPAIR_P( SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")")); - SERIAL_ECHOLNPAIR_P(SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")")); + SERIAL_ECHOPGM_P(SP_X_LBL, dac_perc(X_AXIS), PSTR(" ("), dac_amps(X_AXIS), PSTR(")")); + #if HAS_Y_AXIS + SERIAL_ECHOPGM_P(SP_Y_LBL, dac_perc(Y_AXIS), PSTR(" ("), dac_amps(Y_AXIS), PSTR(")")); + #endif + #if HAS_Z_AXIS + SERIAL_ECHOPGM_P(SP_Z_LBL, dac_perc(Z_AXIS), PSTR(" ("), dac_amps(Z_AXIS), PSTR(")")); + #endif + #if HAS_EXTRUDERS + SERIAL_ECHOLNPGM_P(SP_E_LBL, dac_perc(E_AXIS), PSTR(" ("), dac_amps(E_AXIS), PSTR(")")); + #endif } void StepperDAC::commit_eeprom() { diff --git a/Marlin/src/feature/dac/stepper_dac.h b/Marlin/src/feature/dac/stepper_dac.h index 6836335e9806..26a0f2f95cc8 100644 --- a/Marlin/src/feature/dac/stepper_dac.h +++ b/Marlin/src/feature/dac/stepper_dac.h @@ -34,7 +34,7 @@ class StepperDAC { static void set_current_value(const uint8_t channel, uint16_t val); static void print_values(); static void commit_eeprom(); - static uint8_t get_current_percent(AxisEnum axis); + static uint8_t get_current_percent(const AxisEnum axis); static void set_current_percents(xyze_uint8_t &pct); }; diff --git a/Marlin/src/feature/digipot/digipot_mcp4451.cpp b/Marlin/src/feature/digipot/digipot_mcp4451.cpp index 1b4cf43923a8..ba5ecdad050a 100644 --- a/Marlin/src/feature/digipot/digipot_mcp4451.cpp +++ b/Marlin/src/feature/digipot/digipot_mcp4451.cpp @@ -40,6 +40,9 @@ #elif MB(AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) #define DIGIPOT_I2C_FACTOR 113.5f #define DIGIPOT_I2C_MAX_CURRENT 2.0f +#elif MB(AZTEEG_X5_GT) + #define DIGIPOT_I2C_FACTOR 51.0f + #define DIGIPOT_I2C_MAX_CURRENT 3.0f #else #define DIGIPOT_I2C_FACTOR 106.7f #define DIGIPOT_I2C_MAX_CURRENT 2.5f diff --git a/Marlin/src/feature/direct_stepping.cpp b/Marlin/src/feature/direct_stepping.cpp index 9766d1464053..ce979145a12c 100644 --- a/Marlin/src/feature/direct_stepping.cpp +++ b/Marlin/src/feature/direct_stepping.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../inc/MarlinConfigPre.h" #if ENABLED(DIRECT_STEPPING) @@ -180,7 +181,7 @@ namespace DirectStepping { if (!page_states_dirty) return; page_states_dirty = false; - SERIAL_ECHO(Cfg::CONTROL_CHAR); + SERIAL_CHAR(Cfg::CONTROL_CHAR); constexpr int state_bits = 2; constexpr int n_bytes = Cfg::NUM_PAGES >> state_bits; volatile uint8_t bits_b[n_bytes] = { 0 }; @@ -192,10 +193,10 @@ namespace DirectStepping { uint8_t crc = 0; for (uint8_t i = 0 ; i < n_bytes ; i++) { crc ^= bits_b[i]; - SERIAL_ECHO(bits_b[i]); + SERIAL_CHAR(bits_b[i]); } - SERIAL_ECHO(crc); + SERIAL_CHAR(crc); SERIAL_EOL(); } diff --git a/Marlin/src/feature/e_parser.h b/Marlin/src/feature/e_parser.h index 659e516787fc..3723caa35eea 100644 --- a/Marlin/src/feature/e_parser.h +++ b/Marlin/src/feature/e_parser.h @@ -34,29 +34,39 @@ // External references extern bool wait_for_user, wait_for_heatup; +#if ENABLED(REALTIME_REPORTING_COMMANDS) + // From motion.h, which cannot be included here + void report_current_position_moving(); + void quickpause_stepper(); + void quickresume_stepper(); +#endif + +void HAL_reboot(); + class EmergencyParser { public: - // Currently looking for: M108, M112, M410, M876 - enum State : char { + // Currently looking for: M108, M112, M410, M876 S[0-9], S000, P000, R000 + enum State : uint8_t { EP_RESET, EP_N, EP_M, EP_M1, - EP_M10, - EP_M108, - EP_M11, - EP_M112, - EP_M4, - EP_M41, - EP_M410, + EP_M10, EP_M108, + EP_M11, EP_M112, + EP_M4, EP_M41, EP_M410, #if ENABLED(HOST_PROMPT_SUPPORT) - EP_M8, - EP_M87, - EP_M876, - EP_M876S, - EP_M876SN, + EP_M8, EP_M87, EP_M876, EP_M876S, EP_M876SN, + #endif + #if ENABLED(REALTIME_REPORTING_COMMANDS) + EP_S, EP_S0, EP_S00, EP_GRBL_STATUS, + EP_R, EP_R0, EP_R00, EP_GRBL_RESUME, + EP_P, EP_P0, EP_P00, EP_GRBL_PAUSE, + #endif + #if ENABLED(SOFT_RESET_VIA_SERIAL) + EP_ctrl, + EP_K, EP_KI, EP_KIL, EP_KILL, #endif EP_IGNORE // to '\n' }; @@ -71,7 +81,6 @@ class EmergencyParser { EmergencyParser() { enable(); } FORCE_INLINE static void enable() { enabled = true; } - FORCE_INLINE static void disable() { enabled = false; } FORCE_INLINE static void update(State &state, const uint8_t c) { @@ -79,21 +88,56 @@ class EmergencyParser { case EP_RESET: switch (c) { case ' ': case '\n': case '\r': break; - case 'N': state = EP_N; break; - case 'M': state = EP_M; break; - default: state = EP_IGNORE; + case 'N': state = EP_N; break; + case 'M': state = EP_M; break; + #if ENABLED(REALTIME_REPORTING_COMMANDS) + case 'S': state = EP_S; break; + case 'P': state = EP_P; break; + case 'R': state = EP_R; break; + #endif + #if ENABLED(SOFT_RESET_VIA_SERIAL) + case '^': state = EP_ctrl; break; + case 'K': state = EP_K; break; + #endif + default: state = EP_IGNORE; } break; case EP_N: switch (c) { case '0' ... '9': - case '-': case ' ': break; - case 'M': state = EP_M; break; - default: state = EP_IGNORE; + case '-': case ' ': break; + case 'M': state = EP_M; break; + #if ENABLED(REALTIME_REPORTING_COMMANDS) + case 'S': state = EP_S; break; + case 'P': state = EP_P; break; + case 'R': state = EP_R; break; + #endif + default: state = EP_IGNORE; } break; + #if ENABLED(REALTIME_REPORTING_COMMANDS) + case EP_S: state = (c == '0') ? EP_S0 : EP_IGNORE; break; + case EP_S0: state = (c == '0') ? EP_S00 : EP_IGNORE; break; + case EP_S00: state = (c == '0') ? EP_GRBL_STATUS : EP_IGNORE; break; + + case EP_R: state = (c == '0') ? EP_R0 : EP_IGNORE; break; + case EP_R0: state = (c == '0') ? EP_R00 : EP_IGNORE; break; + case EP_R00: state = (c == '0') ? EP_GRBL_RESUME : EP_IGNORE; break; + + case EP_P: state = (c == '0') ? EP_P0 : EP_IGNORE; break; + case EP_P0: state = (c == '0') ? EP_P00 : EP_IGNORE; break; + case EP_P00: state = (c == '0') ? EP_GRBL_PAUSE : EP_IGNORE; break; + #endif + + #if ENABLED(SOFT_RESET_VIA_SERIAL) + case EP_ctrl: state = (c == 'X') ? EP_KILL : EP_IGNORE; break; + case EP_K: state = (c == 'I') ? EP_KI : EP_IGNORE; break; + case EP_KI: state = (c == 'L') ? EP_KIL : EP_IGNORE; break; + case EP_KIL: state = (c == 'L') ? EP_KILL : EP_IGNORE; break; + #endif + case EP_M: switch (c) { case ' ': break; @@ -114,48 +158,34 @@ class EmergencyParser { } break; - case EP_M10: - state = (c == '8') ? EP_M108 : EP_IGNORE; - break; - - case EP_M11: - state = (c == '2') ? EP_M112 : EP_IGNORE; - break; - - case EP_M4: - state = (c == '1') ? EP_M41 : EP_IGNORE; - break; - - case EP_M41: - state = (c == '0') ? EP_M410 : EP_IGNORE; - break; + case EP_M10: state = (c == '8') ? EP_M108 : EP_IGNORE; break; + case EP_M11: state = (c == '2') ? EP_M112 : EP_IGNORE; break; + case EP_M4: state = (c == '1') ? EP_M41 : EP_IGNORE; break; + case EP_M41: state = (c == '0') ? EP_M410 : EP_IGNORE; break; #if ENABLED(HOST_PROMPT_SUPPORT) - case EP_M8: - state = (c == '7') ? EP_M87 : EP_IGNORE; - break; - case EP_M87: - state = (c == '6') ? EP_M876 : EP_IGNORE; - break; + case EP_M8: state = (c == '7') ? EP_M87 : EP_IGNORE; break; + case EP_M87: state = (c == '6') ? EP_M876 : EP_IGNORE; break; - case EP_M876: - switch (c) { - case ' ': break; - case 'S': state = EP_M876S; break; - default: state = EP_IGNORE; break; - } - break; + case EP_M876: + switch (c) { + case ' ': break; + case 'S': state = EP_M876S; break; + default: state = EP_IGNORE; break; + } + break; + + case EP_M876S: + switch (c) { + case ' ': break; + case '0' ... '9': + state = EP_M876SN; + M876_reason = uint8_t(c - '0'); + break; + } + break; - case EP_M876S: - switch (c) { - case ' ': break; - case '0' ... '9': - state = EP_M876SN; - M876_reason = (uint8_t)(c - '0'); - break; - } - break; #endif case EP_IGNORE: @@ -171,6 +201,14 @@ class EmergencyParser { #if ENABLED(HOST_PROMPT_SUPPORT) case EP_M876SN: host_response_handler(M876_reason); break; #endif + #if ENABLED(REALTIME_REPORTING_COMMANDS) + case EP_GRBL_STATUS: report_current_position_moving(); break; + case EP_GRBL_PAUSE: quickpause_stepper(); break; + case EP_GRBL_RESUME: quickresume_stepper(); break; + #endif + #if ENABLED(SOFT_RESET_VIA_SERIAL) + case EP_KILL: HAL_reboot(); break; + #endif default: break; } state = EP_RESET; diff --git a/Marlin/src/feature/encoder_i2c.cpp b/Marlin/src/feature/encoder_i2c.cpp index fa3cf1503f4d..bed24f0525b0 100644 --- a/Marlin/src/feature/encoder_i2c.cpp +++ b/Marlin/src/feature/encoder_i2c.cpp @@ -47,9 +47,9 @@ void I2CPositionEncoder::init(const uint8_t address, const AxisEnum axis) { encoderAxis = axis; i2cAddress = address; - initialized++; + initialized = true; - SERIAL_ECHOLNPAIR("Setting up encoder on ", axis_codes[encoderAxis], " axis, addr = ", address); + SERIAL_ECHOLNPGM("Setting up encoder on ", AS_CHAR(axis_codes[encoderAxis]), " axis, addr = ", address); position = get_position(); } @@ -67,7 +67,7 @@ void I2CPositionEncoder::update() { /* if (trusted) { //commented out as part of the note below trusted = false; - SERIAL_ECHOLMPAIR("Fault detected on ", axis_codes[encoderAxis], " axis encoder. Disengaging error correction until module is trusted again."); + SERIAL_ECHOLNPGM("Fault detected on ", AS_CHAR(axis_codes[encoderAxis]), " axis encoder. Disengaging error correction until module is trusted again."); } */ return; @@ -92,9 +92,9 @@ void I2CPositionEncoder::update() { if (millis() - lastErrorTime > I2CPE_TIME_TRUSTED) { trusted = true; - SERIAL_ECHOLNPAIR("Untrusted encoder module on ", axis_codes[encoderAxis], " axis has been fault-free for set duration, reinstating error correction."); + SERIAL_ECHOLNPGM("Untrusted encoder module on ", AS_CHAR(axis_codes[encoderAxis]), " axis has been fault-free for set duration, reinstating error correction."); - //the encoder likely lost its place when the error occured, so we'll reset and use the printer's + //the encoder likely lost its place when the error occurred, so we'll reset and use the printer's //idea of where it the axis is to re-initialize const float pos = planner.get_axis_position_mm(encoderAxis); int32_t positionInTicks = pos * get_ticks_unit(); @@ -103,10 +103,10 @@ void I2CPositionEncoder::update() { zeroOffset -= (positionInTicks - get_position()); #ifdef I2CPE_DEBUG - SERIAL_ECHOLNPAIR("Current position is ", pos); - SERIAL_ECHOLNPAIR("Position in encoder ticks is ", positionInTicks); - SERIAL_ECHOLNPAIR("New zero-offset of ", zeroOffset); - SERIAL_ECHOPAIR("New position reads as ", get_position()); + SERIAL_ECHOLNPGM("Current position is ", pos); + SERIAL_ECHOLNPGM("Position in encoder ticks is ", positionInTicks); + SERIAL_ECHOLNPGM("New zero-offset of ", zeroOffset); + SERIAL_ECHOPGM("New position reads as ", get_position()); SERIAL_CHAR('('); SERIAL_DECIMAL(mm_from_count(get_position())); SERIAL_ECHOLNPGM(")"); @@ -149,12 +149,12 @@ void I2CPositionEncoder::update() { const int32_t error = get_axis_error_steps(false); #endif - //SERIAL_ECHOLNPAIR("Axis error steps: ", error); + //SERIAL_ECHOLNPGM("Axis error steps: ", error); #ifdef I2CPE_ERR_THRESH_ABORT if (ABS(error) > I2CPE_ERR_THRESH_ABORT * planner.settings.axis_steps_per_mm[encoderAxis]) { //kill(PSTR("Significant Error")); - SERIAL_ECHOLNPAIR("Axis error over threshold, aborting!", error); + SERIAL_ECHOLNPGM("Axis error over threshold, aborting!", error); safe_delay(5000); } #endif @@ -172,8 +172,8 @@ void I2CPositionEncoder::update() { float sumP = 0; LOOP_L_N(i, I2CPE_ERR_PRST_ARRAY_SIZE) sumP += errPrst[i]; const int32_t errorP = int32_t(sumP * RECIPROCAL(I2CPE_ERR_PRST_ARRAY_SIZE)); - SERIAL_ECHO(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" : CORRECT ERR ", errorP * planner.steps_to_mm[encoderAxis], "mm"); + SERIAL_CHAR(axis_codes[encoderAxis]); + SERIAL_ECHOLNPGM(" : CORRECT ERR ", errorP * planner.mm_per_step[encoderAxis], "mm"); babystep.add_steps(encoderAxis, -LROUND(errorP)); errPrstIdx = 0; } @@ -192,8 +192,8 @@ void I2CPositionEncoder::update() { if (ABS(error) > I2CPE_ERR_CNT_THRESH * planner.settings.axis_steps_per_mm[encoderAxis]) { const millis_t ms = millis(); if (ELAPSED(ms, nextErrorCountTime)) { - SERIAL_ECHO(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" : LARGE ERR ", int(error), "; diffSum=", diffSum); + SERIAL_CHAR(axis_codes[encoderAxis]); + SERIAL_ECHOLNPGM(" : LARGE ERR ", error, "; diffSum=", diffSum); errorCount++; nextErrorCountTime = ms + I2CPE_ERR_CNT_DEBOUNCE_MS; } @@ -209,12 +209,11 @@ void I2CPositionEncoder::set_homed() { delay(10); zeroOffset = get_raw_count(); - homed++; - trusted++; + homed = trusted = true; #ifdef I2CPE_DEBUG - SERIAL_ECHO(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" axis encoder homed, offset of ", zeroOffset, " ticks."); + SERIAL_CHAR(axis_codes[encoderAxis]); + SERIAL_ECHOLNPGM(" axis encoder homed, offset of ", zeroOffset, " ticks."); #endif } } @@ -224,7 +223,7 @@ void I2CPositionEncoder::set_unhomed() { homed = trusted = false; #ifdef I2CPE_DEBUG - SERIAL_ECHO(axis_codes[encoderAxis]); + SERIAL_CHAR(axis_codes[encoderAxis]); SERIAL_ECHOLNPGM(" axis encoder unhomed."); #endif } @@ -232,7 +231,7 @@ void I2CPositionEncoder::set_unhomed() { bool I2CPositionEncoder::passes_test(const bool report) { if (report) { if (H != I2CPE_MAG_SIG_GOOD) SERIAL_ECHOPGM("Warning. "); - SERIAL_ECHO(axis_codes[encoderAxis]); + SERIAL_CHAR(axis_codes[encoderAxis]); serial_ternary(H == I2CPE_MAG_SIG_BAD, PSTR(" axis "), PSTR("magnetic strip "), PSTR("encoder ")); switch (H) { case I2CPE_MAG_SIG_GOOD: @@ -253,8 +252,8 @@ float I2CPositionEncoder::get_axis_error_mm(const bool report) { error = ABS(diff) > 10000 ? 0 : diff; // Huge error is a bad reading if (report) { - SERIAL_ECHO(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" axis target=", target, "mm; actual=", actual, "mm; err=", error, "mm"); + SERIAL_CHAR(axis_codes[encoderAxis]); + SERIAL_ECHOLNPGM(" axis target=", target, "mm; actual=", actual, "mm; err=", error, "mm"); } return error; @@ -263,7 +262,7 @@ float I2CPositionEncoder::get_axis_error_mm(const bool report) { int32_t I2CPositionEncoder::get_axis_error_steps(const bool report) { if (!active) { if (report) { - SERIAL_ECHO(axis_codes[encoderAxis]); + SERIAL_CHAR(axis_codes[encoderAxis]); SERIAL_ECHOLNPGM(" axis encoder not active!"); } return 0; @@ -288,8 +287,8 @@ int32_t I2CPositionEncoder::get_axis_error_steps(const bool report) { errorPrev = error; if (report) { - SERIAL_ECHO(axis_codes[encoderAxis]); - SERIAL_ECHOLNPAIR(" axis target=", target, "; actual=", encoderCountInStepperTicksScaled, "; err=", error); + SERIAL_CHAR(axis_codes[encoderAxis]); + SERIAL_ECHOLNPGM(" axis target=", target, "; actual=", encoderCountInStepperTicksScaled, "; err=", error); } if (suppressOutput) { @@ -328,7 +327,7 @@ int32_t I2CPositionEncoder::get_raw_count() { } bool I2CPositionEncoder::test_axis() { - //only works on XYZ cartesian machines for the time being + // Only works on XYZ Cartesian machines for the time being if (!(encoderAxis == X_AXIS || encoderAxis == Y_AXIS || encoderAxis == Z_AXIS)) return false; const float startPosition = soft_endstop.min[encoderAxis] + 10, @@ -338,7 +337,7 @@ bool I2CPositionEncoder::test_axis() { ec = false; xyze_pos_t startCoord, endCoord; - LOOP_XYZ(a) { + LOOP_LINEAR_AXES(a) { startCoord[a] = planner.get_axis_position_mm((AxisEnum)a); endCoord[a] = planner.get_axis_position_mm((AxisEnum)a); } @@ -346,9 +345,12 @@ bool I2CPositionEncoder::test_axis() { endCoord[encoderAxis] = endPosition; planner.synchronize(); - startCoord.e = planner.get_axis_position_mm(E_AXIS); - planner.buffer_line(startCoord, fr_mm_s, 0); - planner.synchronize(); + + #if HAS_EXTRUDERS + startCoord.e = planner.get_axis_position_mm(E_AXIS); + planner.buffer_line(startCoord, fr_mm_s, 0); + planner.synchronize(); + #endif // if the module isn't currently trusted, wait until it is (or until it should be if things are working) if (!trusted) { @@ -358,7 +360,7 @@ bool I2CPositionEncoder::test_axis() { } if (trusted) { // if trusted, commence test - endCoord.e = planner.get_axis_position_mm(E_AXIS); + TERN_(HAS_EXTRUDERS, endCoord.e = planner.get_axis_position_mm(E_AXIS)); planner.buffer_line(endCoord, fr_mm_s, 0); planner.synchronize(); } @@ -393,7 +395,7 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) { travelDistance = endDistance - startDistance; xyze_pos_t startCoord, endCoord; - LOOP_XYZ(a) { + LOOP_LINEAR_AXES(a) { startCoord[a] = planner.get_axis_position_mm((AxisEnum)a); endCoord[a] = planner.get_axis_position_mm((AxisEnum)a); } @@ -403,7 +405,7 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) { planner.synchronize(); LOOP_L_N(i, iter) { - startCoord.e = planner.get_axis_position_mm(E_AXIS); + TERN_(HAS_EXTRUDERS, startCoord.e = planner.get_axis_position_mm(E_AXIS)); planner.buffer_line(startCoord, fr_mm_s, 0); planner.synchronize(); @@ -412,7 +414,7 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) { //do_blocking_move_to(endCoord); - endCoord.e = planner.get_axis_position_mm(E_AXIS); + TERN_(HAS_EXTRUDERS, endCoord.e = planner.get_axis_position_mm(E_AXIS)); planner.buffer_line(endCoord, fr_mm_s, 0); planner.synchronize(); @@ -422,15 +424,15 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) { travelledDistance = mm_from_count(ABS(stopCount - startCount)); - SERIAL_ECHOLNPAIR("Attempted travel: ", travelDistance, "mm"); - SERIAL_ECHOLNPAIR(" Actual travel: ", travelledDistance, "mm"); + SERIAL_ECHOLNPGM("Attempted travel: ", travelDistance, "mm"); + SERIAL_ECHOLNPGM(" Actual travel: ", travelledDistance, "mm"); //Calculate new axis steps per unit old_steps_mm = planner.settings.axis_steps_per_mm[encoderAxis]; new_steps_mm = (old_steps_mm * travelDistance) / travelledDistance; - SERIAL_ECHOLNPAIR("Old steps/mm: ", old_steps_mm); - SERIAL_ECHOLNPAIR("New steps/mm: ", new_steps_mm); + SERIAL_ECHOLNPGM("Old steps/mm: ", old_steps_mm); + SERIAL_ECHOLNPGM("New steps/mm: ", new_steps_mm); //Save new value planner.settings.axis_steps_per_mm[encoderAxis] = new_steps_mm; @@ -447,7 +449,7 @@ void I2CPositionEncoder::calibrate_steps_mm(const uint8_t iter) { if (iter > 1) { total /= (float)iter; - SERIAL_ECHOLNPAIR("Average steps/mm: ", total); + SERIAL_ECHOLNPGM("Average steps/mm: ", total); } ec = oldec; @@ -498,9 +500,7 @@ void I2CPositionEncodersMgr::init() { encoders[i].set_active(encoders[i].passes_test(true)); - #if I2CPE_ENC_1_AXIS == E_AXIS - encoders[i].set_homed(); - #endif + TERN_(HAS_EXTRUDERS, if (I2CPE_ENC_1_AXIS == E_AXIS) encoders[i].set_homed()); #endif #if I2CPE_ENCODER_CNT > 1 @@ -529,9 +529,7 @@ void I2CPositionEncodersMgr::init() { encoders[i].set_active(encoders[i].passes_test(true)); - #if I2CPE_ENC_2_AXIS == E_AXIS - encoders[i].set_homed(); - #endif + TERN_(HAS_EXTRUDERS, if (I2CPE_ENC_2_AXIS == E_AXIS) encoders[i].set_homed()); #endif #if I2CPE_ENCODER_CNT > 2 @@ -558,11 +556,9 @@ void I2CPositionEncodersMgr::init() { encoders[i].set_ec_threshold(I2CPE_ENC_3_EC_THRESH); #endif - encoders[i].set_active(encoders[i].passes_test(true)); + encoders[i].set_active(encoders[i].passes_test(true)); - #if I2CPE_ENC_3_AXIS == E_AXIS - encoders[i].set_homed(); - #endif + TERN_(HAS_EXTRUDERS, if (I2CPE_ENC_3_AXIS == E_AXIS) encoders[i].set_homed()); #endif #if I2CPE_ENCODER_CNT > 3 @@ -591,9 +587,7 @@ void I2CPositionEncodersMgr::init() { encoders[i].set_active(encoders[i].passes_test(true)); - #if I2CPE_ENC_4_AXIS == E_AXIS - encoders[i].set_homed(); - #endif + TERN_(HAS_EXTRUDERS, if (I2CPE_ENC_4_AXIS == E_AXIS) encoders[i].set_homed()); #endif #if I2CPE_ENCODER_CNT > 4 @@ -622,9 +616,7 @@ void I2CPositionEncodersMgr::init() { encoders[i].set_active(encoders[i].passes_test(true)); - #if I2CPE_ENC_5_AXIS == E_AXIS - encoders[i].set_homed(); - #endif + TERN_(HAS_EXTRUDERS, if (I2CPE_ENC_5_AXIS == E_AXIS) encoders[i].set_homed()); #endif #if I2CPE_ENCODER_CNT > 5 @@ -653,9 +645,7 @@ void I2CPositionEncodersMgr::init() { encoders[i].set_active(encoders[i].passes_test(true)); - #if I2CPE_ENC_6_AXIS == E_AXIS - encoders[i].set_homed(); - #endif + TERN_(HAS_EXTRUDERS, if (I2CPE_ENC_6_AXIS == E_AXIS) encoders[i].set_homed()); #endif } @@ -667,8 +657,7 @@ void I2CPositionEncodersMgr::report_position(const int8_t idx, const bool units, else { if (noOffset) { const int32_t raw_count = encoders[idx].get_raw_count(); - SERIAL_ECHO(axis_codes[encoders[idx].get_axis()]); - SERIAL_CHAR(' '); + SERIAL_CHAR(axis_codes[encoders[idx].get_axis()], ' '); for (uint8_t j = 31; j > 0; j--) SERIAL_ECHO((bool)(0x00000001 & (raw_count >> j))); @@ -686,18 +675,18 @@ void I2CPositionEncodersMgr::change_module_address(const uint8_t oldaddr, const // First check 'new' address is not in use Wire.beginTransmission(I2C_ADDRESS(newaddr)); if (!Wire.endTransmission()) { - SERIAL_ECHOLNPAIR("?There is already a device with that address on the I2C bus! (", newaddr, ")"); + SERIAL_ECHOLNPGM("?There is already a device with that address on the I2C bus! (", newaddr, ")"); return; } // Now check that we can find the module on the oldaddr address Wire.beginTransmission(I2C_ADDRESS(oldaddr)); if (Wire.endTransmission()) { - SERIAL_ECHOLNPAIR("?No module detected at this address! (", oldaddr, ")"); + SERIAL_ECHOLNPGM("?No module detected at this address! (", oldaddr, ")"); return; } - SERIAL_ECHOLNPAIR("Module found at ", oldaddr, ", changing address to ", newaddr); + SERIAL_ECHOLNPGM("Module found at ", oldaddr, ", changing address to ", newaddr); // Change the modules address Wire.beginTransmission(I2C_ADDRESS(oldaddr)); @@ -723,7 +712,7 @@ void I2CPositionEncodersMgr::change_module_address(const uint8_t oldaddr, const // and enable it (it will likely have failed initialization on power-up, before the address change). const int8_t idx = idx_from_addr(newaddr); if (idx >= 0 && !encoders[idx].get_active()) { - SERIAL_ECHO(axis_codes[encoders[idx].get_axis()]); + SERIAL_CHAR(axis_codes[encoders[idx].get_axis()]); SERIAL_ECHOLNPGM(" axis encoder was not detected on printer startup. Trying again."); encoders[idx].set_active(encoders[idx].passes_test(true)); } @@ -733,11 +722,11 @@ void I2CPositionEncodersMgr::report_module_firmware(const uint8_t address) { // First check there is a module Wire.beginTransmission(I2C_ADDRESS(address)); if (Wire.endTransmission()) { - SERIAL_ECHOLNPAIR("?No module detected at this address! (", address, ")"); + SERIAL_ECHOLNPGM("?No module detected at this address! (", address, ")"); return; } - SERIAL_ECHOLNPAIR("Requesting version info from module at address ", address, ":"); + SERIAL_ECHOLNPGM("Requesting version info from module at address ", address, ":"); Wire.beginTransmission(I2C_ADDRESS(address)); Wire.write(I2CPE_SET_REPORT_MODE); @@ -748,7 +737,7 @@ void I2CPositionEncodersMgr::report_module_firmware(const uint8_t address) { if (Wire.requestFrom(I2C_ADDRESS(address), uint8_t(32))) { char c; while (Wire.available() > 0 && (c = (char)Wire.read()) > 0) - SERIAL_ECHO(c); + SERIAL_CHAR(c); SERIAL_EOL(); } @@ -784,13 +773,13 @@ int8_t I2CPositionEncodersMgr::parse() { else if (parser.seenval('I')) { if (!parser.has_value()) { - SERIAL_ECHOLNPAIR("?I seen, but no index specified! [0-", I2CPE_ENCODER_CNT - 1, "]"); + SERIAL_ECHOLNPGM("?I seen, but no index specified! [0-", I2CPE_ENCODER_CNT - 1, "]"); return I2CPE_PARSE_ERR; }; I2CPE_idx = parser.value_byte(); if (I2CPE_idx >= I2CPE_ENCODER_CNT) { - SERIAL_ECHOLNPAIR("?Index out of range. [0-", I2CPE_ENCODER_CNT - 1, "]"); + SERIAL_ECHOLNPGM("?Index out of range. [0-", I2CPE_ENCODER_CNT - 1, "]"); return I2CPE_PARSE_ERR; } @@ -821,11 +810,11 @@ int8_t I2CPositionEncodersMgr::parse() { void I2CPositionEncodersMgr::M860() { if (parse()) return; - const bool hasU = parser.seen('U'), hasO = parser.seen('O'); + const bool hasU = parser.seen_test('U'), hasO = parser.seen_test('O'); if (I2CPE_idx == 0xFF) { - LOOP_XYZE(i) { - if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) { + LOOP_LOGICAL_AXES(i) { + if (!I2CPE_anyaxis || parser.seen_test(axis_codes[i])) { const uint8_t idx = idx_from_axis(AxisEnum(i)); if ((int8_t)idx >= 0) report_position(idx, hasU, hasO); } @@ -851,7 +840,7 @@ void I2CPositionEncodersMgr::M861() { if (parse()) return; if (I2CPE_idx == 0xFF) { - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) { const uint8_t idx = idx_from_axis(AxisEnum(i)); if ((int8_t)idx >= 0) report_status(idx); @@ -879,7 +868,7 @@ void I2CPositionEncodersMgr::M862() { if (parse()) return; if (I2CPE_idx == 0xFF) { - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) { const uint8_t idx = idx_from_axis(AxisEnum(i)); if ((int8_t)idx >= 0) test_axis(idx); @@ -910,7 +899,7 @@ void I2CPositionEncodersMgr::M863() { const uint8_t iterations = constrain(parser.byteval('P', 1), 1, 10); if (I2CPE_idx == 0xFF) { - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) { const uint8_t idx = idx_from_axis(AxisEnum(i)); if ((int8_t)idx >= 0) calibrate_steps_mm(idx, iterations); @@ -958,14 +947,14 @@ void I2CPositionEncodersMgr::M864() { return; } else { - if (parser.seen('X')) newAddress = I2CPE_PRESET_ADDR_X; - else if (parser.seen('Y')) newAddress = I2CPE_PRESET_ADDR_Y; - else if (parser.seen('Z')) newAddress = I2CPE_PRESET_ADDR_Z; - else if (parser.seen('E')) newAddress = I2CPE_PRESET_ADDR_E; + if (parser.seen_test('X')) newAddress = I2CPE_PRESET_ADDR_X; + else if (parser.seen_test('Y')) newAddress = I2CPE_PRESET_ADDR_Y; + else if (parser.seen_test('Z')) newAddress = I2CPE_PRESET_ADDR_Z; + else if (parser.seen_test('E')) newAddress = I2CPE_PRESET_ADDR_E; else return; } - SERIAL_ECHOLNPAIR("Changing module at address ", I2CPE_addr, " to address ", newAddress); + SERIAL_ECHOLNPGM("Changing module at address ", I2CPE_addr, " to address ", newAddress); change_module_address(I2CPE_addr, newAddress); } @@ -986,7 +975,7 @@ void I2CPositionEncodersMgr::M865() { if (parse()) return; if (!I2CPE_addr) { - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) { const uint8_t idx = idx_from_axis(AxisEnum(i)); if ((int8_t)idx >= 0) report_module_firmware(encoders[idx].get_address()); @@ -1014,10 +1003,10 @@ void I2CPositionEncodersMgr::M865() { void I2CPositionEncodersMgr::M866() { if (parse()) return; - const bool hasR = parser.seen('R'); + const bool hasR = parser.seen_test('R'); if (I2CPE_idx == 0xFF) { - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) { const uint8_t idx = idx_from_axis(AxisEnum(i)); if ((int8_t)idx >= 0) { @@ -1055,7 +1044,7 @@ void I2CPositionEncodersMgr::M867() { const int8_t onoff = parser.seenval('S') ? parser.value_int() : -1; if (I2CPE_idx == 0xFF) { - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) { const uint8_t idx = idx_from_axis(AxisEnum(i)); if ((int8_t)idx >= 0) { @@ -1091,7 +1080,7 @@ void I2CPositionEncodersMgr::M868() { const float newThreshold = parser.seenval('T') ? parser.value_float() : -9999; if (I2CPE_idx == 0xFF) { - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) { const uint8_t idx = idx_from_axis(AxisEnum(i)); if ((int8_t)idx >= 0) { @@ -1125,7 +1114,7 @@ void I2CPositionEncodersMgr::M869() { if (parse()) return; if (I2CPE_idx == 0xFF) { - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (!I2CPE_anyaxis || parser.seen(axis_codes[i])) { const uint8_t idx = idx_from_axis(AxisEnum(i)); if ((int8_t)idx >= 0) report_error(idx); diff --git a/Marlin/src/feature/encoder_i2c.h b/Marlin/src/feature/encoder_i2c.h index 511e560ba0ce..50fb27a135ca 100644 --- a/Marlin/src/feature/encoder_i2c.h +++ b/Marlin/src/feature/encoder_i2c.h @@ -188,7 +188,7 @@ class I2CPositionEncoder { FORCE_INLINE void set_ec_method(const byte method) { ecMethod = method; } FORCE_INLINE float get_ec_threshold() { return ecThreshold; } - FORCE_INLINE void set_ec_threshold(const float newThreshold) { ecThreshold = newThreshold; } + FORCE_INLINE void set_ec_threshold(const_float_t newThreshold) { ecThreshold = newThreshold; } FORCE_INLINE int get_encoder_ticks_mm() { switch (type) { @@ -236,7 +236,7 @@ class I2CPositionEncodersMgr { static void report_status(const int8_t idx) { CHECK_IDX(); - SERIAL_ECHOLNPAIR("Encoder ", idx, ": "); + SERIAL_ECHOLNPGM("Encoder ", idx, ": "); encoders[idx].get_raw_count(); encoders[idx].passes_test(true); } @@ -261,32 +261,32 @@ class I2CPositionEncodersMgr { static void report_error_count(const int8_t idx, const AxisEnum axis) { CHECK_IDX(); - SERIAL_ECHOLNPAIR("Error count on ", axis_codes[axis], " axis is ", encoders[idx].get_error_count()); + SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(axis_codes[axis]), " axis is ", encoders[idx].get_error_count()); } static void reset_error_count(const int8_t idx, const AxisEnum axis) { CHECK_IDX(); encoders[idx].set_error_count(0); - SERIAL_ECHOLNPAIR("Error count on ", axis_codes[axis], " axis has been reset."); + SERIAL_ECHOLNPGM("Error count on ", AS_CHAR(axis_codes[axis]), " axis has been reset."); } static void enable_ec(const int8_t idx, const bool enabled, const AxisEnum axis) { CHECK_IDX(); encoders[idx].set_ec_enabled(enabled); - SERIAL_ECHOPAIR("Error correction on ", axis_codes[axis]); + SERIAL_ECHOPGM("Error correction on ", AS_CHAR(axis_codes[axis])); SERIAL_ECHO_TERNARY(encoders[idx].get_ec_enabled(), " axis is ", "en", "dis", "abled.\n"); } static void set_ec_threshold(const int8_t idx, const float newThreshold, const AxisEnum axis) { CHECK_IDX(); encoders[idx].set_ec_threshold(newThreshold); - SERIAL_ECHOLNPAIR("Error correct threshold for ", axis_codes[axis], " axis set to ", newThreshold, "mm."); + SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis set to ", newThreshold, "mm."); } static void get_ec_threshold(const int8_t idx, const AxisEnum axis) { CHECK_IDX(); const float threshold = encoders[idx].get_ec_threshold(); - SERIAL_ECHOLNPAIR("Error correct threshold for ", axis_codes[axis], " axis is ", threshold, "mm."); + SERIAL_ECHOLNPGM("Error correct threshold for ", AS_CHAR(axis_codes[axis]), " axis is ", threshold, "mm."); } static int8_t idx_from_axis(const AxisEnum axis) { diff --git a/Marlin/src/feature/ethernet.cpp b/Marlin/src/feature/ethernet.cpp index ff3ba76b892f..c5bfa932cb5b 100644 --- a/Marlin/src/feature/ethernet.cpp +++ b/Marlin/src/feature/ethernet.cpp @@ -124,7 +124,7 @@ void MarlinEthernet::check() { if (!Ethernet.localIP()) break; SERIAL_ECHOPGM("Successfully started telnet server with IP "); - MYSERIAL0.println(Ethernet.localIP()); + MYSERIAL1.println(Ethernet.localIP()); linkState = LINKED; break; @@ -147,7 +147,7 @@ void MarlinEthernet::check() { " | Author: " STRING_CONFIG_H_AUTHOR ); #endif - telnetClient.println("Compiled: " __DATE__); + telnetClient.println(" Compiled: " __DATE__); SERIAL_ECHOLNPGM("Client connected"); have_telnet_client = true; diff --git a/Marlin/src/feature/fanmux.h b/Marlin/src/feature/fanmux.h index b1b0c67a55e0..efb92cf1989c 100644 --- a/Marlin/src/feature/fanmux.h +++ b/Marlin/src/feature/fanmux.h @@ -25,5 +25,5 @@ * feature/fanmux.h - Cooling Fan Multiplexer support functions */ -extern void fanmux_switch(const uint8_t e); -extern void fanmux_init(); +void fanmux_switch(const uint8_t e); +void fanmux_init(); diff --git a/Marlin/src/feature/filwidth.h b/Marlin/src/feature/filwidth.h index ef3859df719a..e63d3d719ffb 100644 --- a/Marlin/src/feature/filwidth.h +++ b/Marlin/src/feature/filwidth.h @@ -78,7 +78,7 @@ class FilamentWidthSensor { static inline void update_measured_mm() { measured_mm = raw_to_mm(); } // Update ring buffer used to delay filament measurements - static inline void advance_e(const float &e_move) { + static inline void advance_e(const_float_t e_move) { // Increment counters with the E distance e_count += e_move; diff --git a/Marlin/src/feature/fwretract.cpp b/Marlin/src/feature/fwretract.cpp index 2a71af11d67d..4077d8d1c209 100644 --- a/Marlin/src/feature/fwretract.cpp +++ b/Marlin/src/feature/fwretract.cpp @@ -36,6 +36,8 @@ FWRetract fwretract; // Single instance - this calls the constructor #include "../module/planner.h" #include "../module/stepper.h" +#include "../gcode/gcode.h" + #if ENABLED(RETRACT_SYNC_MIXING) #include "mixing.h" #endif @@ -73,7 +75,7 @@ void FWRetract::reset() { LOOP_L_N(i, EXTRUDERS) { retracted[i] = false; - TERN_(HAS_MULTI_EXTRUDER, retracted_swap[i] = false); + E_TERN_(retracted_swap[i] = false); current_retract[i] = 0.0; } } @@ -89,11 +91,7 @@ void FWRetract::reset() { * Note: Auto-retract will apply the set Z hop in addition to any Z hop * included in the G-code. Use M207 Z0 to to prevent double hop. */ -void FWRetract::retract(const bool retracting - #if HAS_MULTI_EXTRUDER - , bool swapping/*=false*/ - #endif -) { +void FWRetract::retract(const bool retracting E_OPTARG(bool swapping/*=false*/)) { // Prevent two retracts or recovers in a row if (retracted[active_extruder] == retracting) return; @@ -108,20 +106,20 @@ void FWRetract::retract(const bool retracting #endif /* // debugging - SERIAL_ECHOLNPAIR( - "retracting ", retracting, + SERIAL_ECHOLNPGM( + "retracting ", AS_DIGIT(retracting), " swapping ", swapping, " active extruder ", active_extruder ); LOOP_L_N(i, EXTRUDERS) { - SERIAL_ECHOLNPAIR("retracted[", i, "] ", retracted[i]); + SERIAL_ECHOLNPGM("retracted[", i, "] ", AS_DIGIT(retracted[i])); #if HAS_MULTI_EXTRUDER - SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", retracted_swap[i]); + SERIAL_ECHOLNPGM("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i])); #endif } - SERIAL_ECHOLNPAIR("current_position.z ", current_position.z); - SERIAL_ECHOLNPAIR("current_position.e ", current_position.e); - SERIAL_ECHOLNPAIR("current_hop ", current_hop); + SERIAL_ECHOLNPGM("current_position.z ", current_position.z); + SERIAL_ECHOLNPGM("current_position.e ", current_position.e); + SERIAL_ECHOLNPGM("current_hop ", current_hop); //*/ const float base_retract = TERN1(RETRACT_SYNC_MIXING, (MIXING_STEPPERS)) @@ -183,19 +181,90 @@ void FWRetract::retract(const bool retracting #endif /* // debugging - SERIAL_ECHOLNPAIR("retracting ", retracting); - SERIAL_ECHOLNPAIR("swapping ", swapping); - SERIAL_ECHOLNPAIR("active_extruder ", active_extruder); + SERIAL_ECHOLNPGM("retracting ", AS_DIGIT(retracting)); + SERIAL_ECHOLNPGM("swapping ", AS_DIGIT(swapping)); + SERIAL_ECHOLNPGM("active_extruder ", active_extruder); LOOP_L_N(i, EXTRUDERS) { - SERIAL_ECHOLNPAIR("retracted[", i, "] ", retracted[i]); + SERIAL_ECHOLNPGM("retracted[", i, "] ", AS_DIGIT(retracted[i])); #if HAS_MULTI_EXTRUDER - SERIAL_ECHOLNPAIR("retracted_swap[", i, "] ", retracted_swap[i]); + SERIAL_ECHOLNPGM("retracted_swap[", i, "] ", AS_DIGIT(retracted_swap[i])); #endif } - SERIAL_ECHOLNPAIR("current_position.z ", current_position.z); - SERIAL_ECHOLNPAIR("current_position.e ", current_position.e); - SERIAL_ECHOLNPAIR("current_hop ", current_hop); + SERIAL_ECHOLNPGM("current_position.z ", current_position.z); + SERIAL_ECHOLNPGM("current_position.e ", current_position.e); + SERIAL_ECHOLNPGM("current_hop ", current_hop); //*/ } +//extern const char SP_Z_STR[]; + +/** + * M207: Set firmware retraction values + * + * S[+units] retract_length + * W[+units] swap_retract_length (multi-extruder) + * F[units/min] retract_feedrate_mm_s + * Z[units] retract_zraise + */ +void FWRetract::M207() { + if (!parser.seen("FSWZ")) return M207_report(); + if (parser.seenval('S')) settings.retract_length = parser.value_axis_units(E_AXIS); + if (parser.seenval('F')) settings.retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS)); + if (parser.seenval('Z')) settings.retract_zraise = parser.value_linear_units(); + if (parser.seenval('W')) settings.swap_retract_length = parser.value_axis_units(E_AXIS); +} + +void FWRetract::M207_report() { + SERIAL_ECHOLNPGM_P( + PSTR(" M207 S"), LINEAR_UNIT(settings.retract_length) + , PSTR(" W"), LINEAR_UNIT(settings.swap_retract_length) + , PSTR(" F"), LINEAR_UNIT(MMS_TO_MMM(settings.retract_feedrate_mm_s)) + , SP_Z_STR, LINEAR_UNIT(settings.retract_zraise) + ); +} + +/** + * M208: Set firmware un-retraction values + * + * S[+units] retract_recover_extra (in addition to M207 S*) + * W[+units] swap_retract_recover_extra (multi-extruder) + * F[units/min] retract_recover_feedrate_mm_s + * R[units/min] swap_retract_recover_feedrate_mm_s + */ +void FWRetract::M208() { + if (!parser.seen("FSRW")) return M208_report(); + if (parser.seen('S')) settings.retract_recover_extra = parser.value_axis_units(E_AXIS); + if (parser.seen('F')) settings.retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS)); + if (parser.seen('R')) settings.swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS)); + if (parser.seen('W')) settings.swap_retract_recover_extra = parser.value_axis_units(E_AXIS); +} + +void FWRetract::M208_report() { + SERIAL_ECHOLNPGM( + " M208 S", LINEAR_UNIT(settings.retract_recover_extra) + , " W", LINEAR_UNIT(settings.swap_retract_recover_extra) + , " F", LINEAR_UNIT(MMS_TO_MMM(settings.retract_recover_feedrate_mm_s)) + ); +} + +#if ENABLED(FWRETRACT_AUTORETRACT) + + /** + * M209: Enable automatic retract (M209 S1) + * For slicers that don't support G10/11, reversed extrude-only + * moves will be classified as retraction. + */ + void FWRetract::M209() { + if (!parser.seen('S')) return M209_report(); + if (MIN_AUTORETRACT <= MAX_AUTORETRACT) + enable_autoretract(parser.value_bool()); + } + + void FWRetract::M209_report() { + SERIAL_ECHOLNPGM(" M209 S", AS_DIGIT(autoretract_enabled)); + } + +#endif // FWRETRACT_AUTORETRACT + + #endif // FWRETRACT diff --git a/Marlin/src/feature/fwretract.h b/Marlin/src/feature/fwretract.h index 134851965dc4..d6d0432e3aa7 100644 --- a/Marlin/src/feature/fwretract.h +++ b/Marlin/src/feature/fwretract.h @@ -74,11 +74,16 @@ class FWRetract { #endif } - static void retract(const bool retracting - #if HAS_MULTI_EXTRUDER - , bool swapping = false - #endif - ); + static void retract(const bool retracting E_OPTARG(bool swapping=false)); + + static void M207_report(); + static void M207(); + static void M208_report(); + static void M208(); + #if ENABLED(FWRETRACT_AUTORETRACT) + static void M209_report(); + static void M209(); + #endif }; extern FWRetract fwretract; diff --git a/Marlin/src/feature/host_actions.cpp b/Marlin/src/feature/host_actions.cpp index c194fb7a5b47..62e60320f763 100644 --- a/Marlin/src/feature/host_actions.cpp +++ b/Marlin/src/feature/host_actions.cpp @@ -38,9 +38,9 @@ #endif void host_action(PGM_P const pstr, const bool eol) { - PORT_REDIRECT(SERIAL_ALL); + PORT_REDIRECT(SerialMask::All); SERIAL_ECHOPGM("//action:"); - serialprintPGM(pstr); + SERIAL_ECHOPGM_P(pstr); if (eol) SERIAL_EOL(); } @@ -78,30 +78,29 @@ void host_action(PGM_P const pstr, const bool eol) { PromptReason host_prompt_reason = PROMPT_NOT_DEFINED; void host_action_notify(const char * const message) { - PORT_REDIRECT(SERIAL_ALL); + PORT_REDIRECT(SerialMask::All); host_action(PSTR("notification "), false); SERIAL_ECHOLN(message); } void host_action_notify_P(PGM_P const message) { - PORT_REDIRECT(SERIAL_ALL); + PORT_REDIRECT(SerialMask::All); host_action(PSTR("notification "), false); - serialprintPGM(message); - SERIAL_EOL(); + SERIAL_ECHOLNPGM_P(message); } void host_action_prompt(PGM_P const ptype, const bool eol=true) { - PORT_REDIRECT(SERIAL_ALL); + PORT_REDIRECT(SerialMask::All); host_action(PSTR("prompt_"), false); - serialprintPGM(ptype); + SERIAL_ECHOPGM_P(ptype); if (eol) SERIAL_EOL(); } void host_action_prompt_plus(PGM_P const ptype, PGM_P const pstr, const char extra_char='\0') { host_action_prompt(ptype, false); - PORT_REDIRECT(SERIAL_ALL); + PORT_REDIRECT(SerialMask::All); SERIAL_CHAR(' '); - serialprintPGM(pstr); + SERIAL_ECHOPGM_P(pstr); if (extra_char != '\0') SERIAL_CHAR(extra_char); SERIAL_EOL(); } @@ -143,28 +142,20 @@ void host_action(PGM_P const pstr, const bool eol) { // - Dismissal of info // void host_response_handler(const uint8_t response) { - #ifdef DEBUG_HOST_ACTIONS - static PGMSTR(m876_prefix, "M876 Handle Re"); - serialprintPGM(m876_prefix); SERIAL_ECHOLNPAIR("ason: ", host_prompt_reason); - serialprintPGM(m876_prefix); SERIAL_ECHOLNPAIR("sponse: ", response); - #endif - PGM_P msg = PSTR("UNKNOWN STATE"); const PromptReason hpr = host_prompt_reason; host_prompt_reason = PROMPT_NOT_DEFINED; // Reset now ahead of logic switch (hpr) { case PROMPT_FILAMENT_RUNOUT: - msg = PSTR("FILAMENT_RUNOUT"); switch (response) { case 0: // "Purge More" button - #if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE) + #if BOTH(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE) pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // Simulate menu selection (menu exits, doesn't extrude more) #endif - filament_load_host_prompt(); // Initiate another host prompt. (NOTE: The loop in load_filament may also do this!) break; case 1: // "Continue" / "Disable Runout" button - #if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE) + #if BOTH(M600_PURGE_MORE_RESUMABLE, ADVANCED_PAUSE_FEATURE) pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; // Simulate menu selection #endif #if HAS_FILAMENT_SENSOR @@ -178,23 +169,17 @@ void host_action(PGM_P const pstr, const bool eol) { break; case PROMPT_USER_CONTINUE: TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); - msg = PSTR("FILAMENT_RUNOUT_CONTINUE"); break; case PROMPT_PAUSE_RESUME: - msg = PSTR("LCD_PAUSE_RESUME"); #if BOTH(ADVANCED_PAUSE_FEATURE, SDSUPPORT) extern const char M24_STR[]; queue.inject_P(M24_STR); #endif break; case PROMPT_INFO: - msg = PSTR("GCODE_INFO"); break; default: break; } - SERIAL_ECHOPGM("M876 Responding PROMPT_"); - serialprintPGM(msg); - SERIAL_EOL(); } #endif // HOST_PROMPT_SUPPORT diff --git a/Marlin/src/feature/hotend_idle.cpp b/Marlin/src/feature/hotend_idle.cpp index 7f8f20a04793..b962743ed045 100644 --- a/Marlin/src/feature/hotend_idle.cpp +++ b/Marlin/src/feature/hotend_idle.cpp @@ -34,6 +34,7 @@ #include "../module/temperature.h" #include "../module/motion.h" +#include "../module/planner.h" #include "../lcd/marlinui.h" extern HotendIdleProtection hotend_idle; @@ -43,7 +44,8 @@ millis_t HotendIdleProtection::next_protect_ms = 0; void HotendIdleProtection::check_hotends(const millis_t &ms) { bool do_prot = false; HOTEND_LOOP() { - if (thermalManager.degHotend(e) >= HOTEND_IDLE_MIN_TRIGGER) { + const bool busy = (TERN0(HAS_RESUME_CONTINUE, wait_for_user) || planner.has_blocks_queued()); + if (thermalManager.degHotend(e) >= (HOTEND_IDLE_MIN_TRIGGER) && !busy) { do_prot = true; break; } } diff --git a/Marlin/src/feature/joystick.cpp b/Marlin/src/feature/joystick.cpp index 3dca2eb2e9bd..7f91c1549b9e 100644 --- a/Marlin/src/feature/joystick.cpp +++ b/Marlin/src/feature/joystick.cpp @@ -68,13 +68,13 @@ Joystick joystick; void Joystick::report() { SERIAL_ECHOPGM("Joystick"); #if HAS_JOY_ADC_X - SERIAL_ECHOPAIR_P(SP_X_STR, JOY_X(x.raw)); + SERIAL_ECHOPGM_P(SP_X_STR, JOY_X(x.raw)); #endif #if HAS_JOY_ADC_Y - SERIAL_ECHOPAIR_P(SP_Y_STR, JOY_Y(y.raw)); + SERIAL_ECHOPGM_P(SP_Y_STR, JOY_Y(y.raw)); #endif #if HAS_JOY_ADC_Z - SERIAL_ECHOPAIR_P(SP_Z_STR, JOY_Z(z.raw)); + SERIAL_ECHOPGM_P(SP_Z_STR, JOY_Z(z.raw)); #endif #if HAS_JOY_ADC_EN SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)"); @@ -163,13 +163,8 @@ Joystick joystick; // norm_jog values of [-1 .. 1] maps linearly to [-feedrate .. feedrate] xyz_float_t move_dist{0}; float hypot2 = 0; - LOOP_XYZ(i) if (norm_jog[i]) { - move_dist[i] = seg_time * norm_jog[i] * - #if ENABLED(EXTENSIBLE_UI) - manual_feedrate_mm_s[i]; - #else - planner.settings.max_feedrate_mm_s[i]; - #endif + LOOP_LINEAR_AXES(i) if (norm_jog[i]) { + move_dist[i] = seg_time * norm_jog[i] * TERN(EXTENSIBLE_UI, manual_feedrate_mm_s, planner.settings.max_feedrate_mm_s)[i]; hypot2 += sq(move_dist[i]); } diff --git a/Marlin/src/feature/joystick.h b/Marlin/src/feature/joystick.h index e8e218b2f940..91bf6bdc00d2 100644 --- a/Marlin/src/feature/joystick.h +++ b/Marlin/src/feature/joystick.h @@ -32,11 +32,19 @@ class Joystick { friend class Temperature; private: - TERN_(HAS_JOY_ADC_X, static temp_info_t x); - TERN_(HAS_JOY_ADC_Y, static temp_info_t y); - TERN_(HAS_JOY_ADC_Z, static temp_info_t z); + #if HAS_JOY_ADC_X + static temp_info_t x; + #endif + #if HAS_JOY_ADC_Y + static temp_info_t y; + #endif + #if HAS_JOY_ADC_Z + static temp_info_t z; + #endif public: - TERN_(JOYSTICK_DEBUG, static void report()); + #if ENABLED(JOYSTICK_DEBUG) + static void report(); + #endif static void calculate(xyz_float_t &norm_jog); static void inject_jog_moves(); }; diff --git a/Marlin/src/feature/leds/leds.cpp b/Marlin/src/feature/leds/leds.cpp index ef9099fb2093..17e31afa5a73 100644 --- a/Marlin/src/feature/leds/leds.cpp +++ b/Marlin/src/feature/leds/leds.cpp @@ -42,14 +42,19 @@ #include "pca9533.h" #endif +#if ENABLED(CASE_LIGHT_USE_RGB_LED) + #include "../../feature/caselight.h" +#endif + #if ENABLED(LED_COLOR_PRESETS) - const LEDColor LEDLights::defaultLEDColor = MakeLEDColor( - LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, - LED_USER_PRESET_WHITE, LED_USER_PRESET_BRIGHTNESS + const LEDColor LEDLights::defaultLEDColor = LEDColor( + LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE + OPTARG(HAS_WHITE_LED, LED_USER_PRESET_WHITE) + OPTARG(NEOPIXEL_LED, LED_USER_PRESET_BRIGHTNESS) ); #endif -#if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS) +#if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS, CASE_LIGHT_IS_COLOR_LED) LEDColor LEDLights::color; bool LEDLights::lights_on; #endif @@ -71,34 +76,36 @@ void LEDLights::setup() { } void LEDLights::set_color(const LEDColor &incol - #if ENABLED(NEOPIXEL_LED) - , bool isSequence/*=false*/ - #endif + OPTARG(NEOPIXEL_IS_SEQUENTIAL, bool isSequence/*=false*/) ) { #if ENABLED(NEOPIXEL_LED) const uint32_t neocolor = LEDColorWhite() == incol ? neo.Color(NEO_WHITE) - : neo.Color(incol.r, incol.g, incol.b, incol.w); - static uint16_t nextLed = 0; + : neo.Color(incol.r, incol.g, incol.b OPTARG(HAS_WHITE_LED, incol.w)); + + #if ENABLED(NEOPIXEL_IS_SEQUENTIAL) + static uint16_t nextLed = 0; + #ifdef NEOPIXEL_BKGD_INDEX_FIRST + while (WITHIN(nextLed, NEOPIXEL_BKGD_INDEX_FIRST, NEOPIXEL_BKGD_INDEX_LAST)) { + neo.reset_background_color(); + if (++nextLed >= neo.pixels()) { nextLed = 0; return; } + } + #endif + #endif + + neo.set_brightness(incol.i); - #ifdef NEOPIXEL_BKGD_LED_INDEX - if (NEOPIXEL_BKGD_LED_INDEX == nextLed) { + #if ENABLED(NEOPIXEL_IS_SEQUENTIAL) + if (isSequence) { + neo.set_pixel_color(nextLed, neocolor); + neo.show(); if (++nextLed >= neo.pixels()) nextLed = 0; return; } #endif - neo.set_brightness(incol.i); - - if (isSequence) { - neo.set_pixel_color(nextLed, neocolor); - neo.show(); - if (++nextLed >= neo.pixels()) nextLed = 0; - return; - } - neo.set_color(neocolor); #endif @@ -114,12 +121,13 @@ void LEDLights::set_color(const LEDColor &incol // This variant uses 3-4 separate pins for the RGB(W) components. // If the pins can do PWM then their intensity will be set. - #define UPDATE_RGBW(C,c) do { \ - if (PWM_PIN(RGB_LED_##C##_PIN)) \ - analogWrite(pin_t(RGB_LED_##C##_PIN), incol.c); \ - else \ - WRITE(RGB_LED_##C##_PIN, incol.c ? HIGH : LOW); \ + #define _UPDATE_RGBW(C,c) do { \ + if (PWM_PIN(RGB_LED_##C##_PIN)) \ + analogWrite(pin_t(RGB_LED_##C##_PIN), c); \ + else \ + WRITE(RGB_LED_##C##_PIN, c ? HIGH : LOW); \ }while(0) + #define UPDATE_RGBW(C,c) _UPDATE_RGBW(C, TERN1(CASE_LIGHT_USE_RGB_LED, caselight.on) ? incol.c : 0) UPDATE_RGBW(R,r); UPDATE_RGBW(G,g); UPDATE_RGBW(B,b); #if ENABLED(RGBW_LED) UPDATE_RGBW(W,w); @@ -147,11 +155,13 @@ void LEDLights::set_color(const LEDColor &incol millis_t LEDLights::led_off_time; // = 0 void LEDLights::update_timeout(const bool power_on) { - const millis_t ms = millis(); - if (power_on) - reset_timeout(ms); - else if (ELAPSED(ms, led_off_time)) - set_off(); + if (lights_on) { + const millis_t ms = millis(); + if (power_on) + reset_timeout(ms); + else if (ELAPSED(ms, led_off_time)) + set_off(); + } } #endif @@ -159,9 +169,10 @@ void LEDLights::set_color(const LEDColor &incol #if ENABLED(NEOPIXEL2_SEPARATE) #if ENABLED(NEO2_COLOR_PRESETS) - const LEDColor LEDLights2::defaultLEDColor = MakeLEDColor( - NEO2_USER_PRESET_RED, NEO2_USER_PRESET_GREEN, NEO2_USER_PRESET_BLUE, - NEO2_USER_PRESET_WHITE, NEO2_USER_PRESET_BRIGHTNESS + const LEDColor LEDLights2::defaultLEDColor = LEDColor( + NEO2_USER_PRESET_RED, NEO2_USER_PRESET_GREEN, NEO2_USER_PRESET_BLUE + OPTARG(HAS_WHITE_LED2, NEO2_USER_PRESET_WHITE) + OPTARG(NEOPIXEL_LED, NEO2_USER_PRESET_BRIGHTNESS) ); #endif @@ -180,7 +191,7 @@ void LEDLights::set_color(const LEDColor &incol void LEDLights2::set_color(const LEDColor &incol) { const uint32_t neocolor = LEDColorWhite() == incol ? neo2.Color(NEO2_WHITE) - : neo2.Color(incol.r, incol.g, incol.b, incol.w); + : neo2.Color(incol.r, incol.g, incol.b OPTARG(HAS_WHITE_LED2, incol.w)); neo2.set_brightness(incol.i); neo2.set_color(neocolor); diff --git a/Marlin/src/feature/leds/leds.h b/Marlin/src/feature/leds/leds.h index 57b21d576c54..74964b51a8e4 100644 --- a/Marlin/src/feature/leds/leds.h +++ b/Marlin/src/feature/leds/leds.h @@ -29,60 +29,37 @@ #include -#if ENABLED(NEOPIXEL_LED) - #include "neopixel.h" -#endif - // A white component can be passed -#if ANY(RGBW_LED, NEOPIXEL_LED, PCA9632_RGBW) +#if EITHER(RGBW_LED, PCA9632_RGBW) #define HAS_WHITE_LED 1 #endif +#if ENABLED(NEOPIXEL_LED) + #define _NEOPIXEL_INCLUDE_ + #include "neopixel.h" + #undef _NEOPIXEL_INCLUDE_ +#endif + /** * LEDcolor type for use with leds.set_color */ typedef struct LEDColor { uint8_t r, g, b - #if HAS_WHITE_LED - , w - #if ENABLED(NEOPIXEL_LED) - , i - #endif - #endif + OPTARG(HAS_WHITE_LED, w) + OPTARG(NEOPIXEL_LED, i) ; LEDColor() : r(255), g(255), b(255) - #if HAS_WHITE_LED - , w(255) - #if ENABLED(NEOPIXEL_LED) - , i(NEOPIXEL_BRIGHTNESS) - #endif - #endif + OPTARG(HAS_WHITE_LED, w(255)) + OPTARG(NEOPIXEL_LED, i(NEOPIXEL_BRIGHTNESS)) {} - LEDColor(uint8_t r, uint8_t g, uint8_t b - #if HAS_WHITE_LED - , uint8_t w=0 - #if ENABLED(NEOPIXEL_LED) - , uint8_t i=NEOPIXEL_BRIGHTNESS - #endif - #endif - ) : r(r), g(g), b(b) - #if HAS_WHITE_LED - , w(w) - #if ENABLED(NEOPIXEL_LED) - , i(i) - #endif - #endif - {} + LEDColor(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED, uint8_t w=0) OPTARG(NEOPIXEL_LED, uint8_t i=NEOPIXEL_BRIGHTNESS)) + : r(r), g(g), b(b) OPTARG(HAS_WHITE_LED, w(w)) OPTARG(NEOPIXEL_LED, i(i)) {} LEDColor(const uint8_t (&rgbw)[4]) : r(rgbw[0]), g(rgbw[1]), b(rgbw[2]) - #if HAS_WHITE_LED - , w(rgbw[3]) - #if ENABLED(NEOPIXEL_LED) - , i(NEOPIXEL_BRIGHTNESS) - #endif - #endif + OPTARG(HAS_WHITE_LED, w(rgbw[3])) + OPTARG(NEOPIXEL_LED, i(NEOPIXEL_BRIGHTNESS)) {} LEDColor& operator=(const uint8_t (&rgbw)[4]) { @@ -109,17 +86,8 @@ typedef struct LEDColor { } LEDColor; /** - * Color helpers and presets + * Color presets */ -#if HAS_WHITE_LED - #if ENABLED(NEOPIXEL_LED) - #define MakeLEDColor(R,G,B,W,I) LEDColor(R, G, B, W, I) - #else - #define MakeLEDColor(R,G,B,W,I) LEDColor(R, G, B, W) - #endif -#else - #define MakeLEDColor(R,G,B,W,I) LEDColor(R, G, B) -#endif #define LEDColorOff() LEDColor( 0, 0, 0) #define LEDColorRed() LEDColor(255, 0, 0) @@ -147,25 +115,15 @@ class LEDLights { static void setup(); // init() static void set_color(const LEDColor &color - #if ENABLED(NEOPIXEL_LED) - , bool isSequence=false - #endif + OPTARG(NEOPIXEL_IS_SEQUENTIAL, bool isSequence=false) ); static inline void set_color(uint8_t r, uint8_t g, uint8_t b - #if HAS_WHITE_LED - , uint8_t w=0 - #endif - #if ENABLED(NEOPIXEL_LED) - , uint8_t i=NEOPIXEL_BRIGHTNESS - , bool isSequence=false - #endif + OPTARG(HAS_WHITE_LED, uint8_t w=0) + OPTARG(NEOPIXEL_LED, uint8_t i=NEOPIXEL_BRIGHTNESS) + OPTARG(NEOPIXEL_IS_SEQUENTIAL, bool isSequence=false) ) { - set_color(MakeLEDColor(r, g, b, w, i) - #if ENABLED(NEOPIXEL_LED) - , isSequence - #endif - ); + set_color(LEDColor(r, g, b OPTARG(HAS_WHITE_LED, w) OPTARG(NEOPIXEL_LED, i)) OPTARG(NEOPIXEL_IS_SEQUENTIAL, isSequence)); } static inline void set_off() { set_color(LEDColorOff()); } @@ -187,13 +145,15 @@ class LEDLights { static inline LEDColor get_color() { return lights_on ? color : LEDColorOff(); } #endif - #if EITHER(LED_CONTROL_MENU, PRINTER_EVENT_LEDS) + #if ANY(LED_CONTROL_MENU, PRINTER_EVENT_LEDS, CASE_LIGHT_IS_COLOR_LED) static LEDColor color; // last non-off color static bool lights_on; // the last set color was "on" #endif #if ENABLED(LED_CONTROL_MENU) static void toggle(); // swap "off" with color + #endif + #if EITHER(LED_CONTROL_MENU, CASE_LIGHT_USE_RGB_LED) static inline void update() { set_color(color); } #endif @@ -203,7 +163,7 @@ class LEDLights { public: static inline void reset_timeout(const millis_t &ms) { led_off_time = ms + LED_BACKLIGHT_TIMEOUT; - if (!lights_on) set_default(); + if (!lights_on) update(); } static void update_timeout(const bool power_on); #endif @@ -221,8 +181,14 @@ extern LEDLights leds; static void set_color(const LEDColor &color); - inline void set_color(uint8_t r, uint8_t g, uint8_t b, uint8_t w=0, uint8_t i=NEOPIXEL2_BRIGHTNESS) { - set_color(MakeLEDColor(r, g, b, w, i)); + static inline void set_color(uint8_t r, uint8_t g, uint8_t b + OPTARG(HAS_WHITE_LED, uint8_t w=0) + OPTARG(NEOPIXEL_LED, uint8_t i=NEOPIXEL_BRIGHTNESS) + ) { + set_color(LEDColor(r, g, b + OPTARG(HAS_WHITE_LED, w) + OPTARG(NEOPIXEL_LED, i) + )); } static inline void set_off() { set_color(LEDColorOff()); } diff --git a/Marlin/src/feature/leds/neopixel.cpp b/Marlin/src/feature/leds/neopixel.cpp index 27bbeb348c5d..2654e9a1df5a 100644 --- a/Marlin/src/feature/leds/neopixel.cpp +++ b/Marlin/src/feature/leds/neopixel.cpp @@ -28,7 +28,7 @@ #if ENABLED(NEOPIXEL_LED) -#include "neopixel.h" +#include "leds.h" #if EITHER(NEOPIXEL_STARTUP_TEST, NEOPIXEL2_STARTUP_TEST) #include "../../core/utility.h" @@ -37,17 +37,21 @@ Marlin_NeoPixel neo; int8_t Marlin_NeoPixel::neoindex; -Adafruit_NeoPixel Marlin_NeoPixel::adaneo1(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIXEL_TYPE + NEO_KHZ800) - #if CONJOINED_NEOPIXEL - , Marlin_NeoPixel::adaneo2(NEOPIXEL_PIXELS, NEOPIXEL2_PIN, NEOPIXEL2_TYPE + NEO_KHZ800) - #endif -; +Adafruit_NeoPixel Marlin_NeoPixel::adaneo1(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEOPIXEL_TYPE + NEO_KHZ800); +#if CONJOINED_NEOPIXEL + Adafruit_NeoPixel Marlin_NeoPixel::adaneo2(NEOPIXEL_PIXELS, NEOPIXEL2_PIN, NEOPIXEL2_TYPE + NEO_KHZ800); +#endif -#ifdef NEOPIXEL_BKGD_LED_INDEX +#ifdef NEOPIXEL_BKGD_INDEX_FIRST + + void Marlin_NeoPixel::set_background_color(uint8_t r, uint8_t g, uint8_t b, uint8_t w) { + for (int background_led = NEOPIXEL_BKGD_INDEX_FIRST; background_led <= NEOPIXEL_BKGD_INDEX_LAST; background_led++) + set_pixel_color(background_led, adaneo1.Color(r, g, b, w)); + } - void Marlin_NeoPixel::set_color_background() { - uint8_t background_color[4] = NEOPIXEL_BKGD_COLOR; - set_pixel_color(NEOPIXEL_BKGD_LED_INDEX, adaneo1.Color(background_color[0], background_color[1], background_color[2], background_color[3])); + void Marlin_NeoPixel::reset_background_color() { + constexpr uint8_t background_color[4] = NEOPIXEL_BKGD_COLOR; + set_background_color(background_color[0], background_color[1], background_color[2], background_color[3]); } #endif @@ -59,9 +63,10 @@ void Marlin_NeoPixel::set_color(const uint32_t color) { } else { for (uint16_t i = 0; i < pixels(); ++i) { - #ifdef NEOPIXEL_BKGD_LED_INDEX - if (i == NEOPIXEL_BKGD_LED_INDEX && color != 0x000000) { - set_color_background(); + #ifdef NEOPIXEL_BKGD_INDEX_FIRST + if (i == NEOPIXEL_BKGD_INDEX_FIRST && TERN(NEOPIXEL_BKGD_ALWAYS_ON, true, color != 0x000000)) { + reset_background_color(); + i += NEOPIXEL_BKGD_INDEX_LAST - (NEOPIXEL_BKGD_INDEX_FIRST); continue; } #endif @@ -90,35 +95,22 @@ void Marlin_NeoPixel::init() { safe_delay(500); set_color_startup(adaneo1.Color(0, 0, 255, 0)); // blue safe_delay(500); + #if HAS_WHITE_LED + set_color_startup(adaneo1.Color(0, 0, 0, 255)); // white + safe_delay(500); + #endif #endif - #ifdef NEOPIXEL_BKGD_LED_INDEX - set_color_background(); - #endif - - #if ENABLED(LED_USER_PRESET_STARTUP) - set_color(adaneo1.Color(LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, LED_USER_PRESET_WHITE)); - #else - set_color(adaneo1.Color(0, 0, 0, 0)); + #ifdef NEOPIXEL_BKGD_INDEX_FIRST + reset_background_color(); #endif -} -#if 0 -bool Marlin_NeoPixel::set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p) { - const uint32_t color = adaneo1.Color(r, g, b, w); - set_brightness(p); - #if DISABLED(NEOPIXEL_IS_SEQUENTIAL) - set_color(color); - return false; - #else - static uint16_t nextLed = 0; - set_pixel_color(nextLed, color); - show(); - if (++nextLed >= pixels()) nextLed = 0; - return true; - #endif + set_color(adaneo1.Color + TERN(LED_USER_PRESET_STARTUP, + (LED_USER_PRESET_RED, LED_USER_PRESET_GREEN, LED_USER_PRESET_BLUE, LED_USER_PRESET_WHITE), + (0, 0, 0, 0)) + ); } -#endif #if ENABLED(NEOPIXEL2_SEPARATE) @@ -158,13 +150,17 @@ bool Marlin_NeoPixel::set_led_color(const uint8_t r, const uint8_t g, const uint safe_delay(500); set_color_startup(adaneo.Color(0, 0, 255, 0)); // blue safe_delay(500); + #if HAS_WHITE_LED2 + set_color_startup(adaneo.Color(0, 0, 0, 255)); // white + safe_delay(500); + #endif #endif - #if ENABLED(NEO2_USER_PRESET_STARTUP) - set_color(adaneo.Color(NEO2_USER_PRESET_RED, NEO2_USER_PRESET_GREEN, NEO2_USER_PRESET_BLUE, NEO2_USER_PRESET_WHITE)); - #else - set_color(adaneo.Color(0, 0, 0, 0)); - #endif + set_color(adaneo.Color + TERN(NEO2_USER_PRESET_STARTUP, + (NEO2_USER_PRESET_RED, NEO2_USER_PRESET_GREEN, NEO2_USER_PRESET_BLUE, NEO2_USER_PRESET_WHITE), + (0, 0, 0, 0)) + ); } #endif // NEOPIXEL2_SEPARATE diff --git a/Marlin/src/feature/leds/neopixel.h b/Marlin/src/feature/leds/neopixel.h index acf2e7f54d3b..b2c16459f504 100644 --- a/Marlin/src/feature/leds/neopixel.h +++ b/Marlin/src/feature/leds/neopixel.h @@ -25,6 +25,10 @@ * NeoPixel support */ +#ifndef _NEOPIXEL_INCLUDE_ + #error "Always include 'leds.h' and not 'neopixel.h' directly." +#endif + // ------------------------ // Includes // ------------------------ @@ -38,24 +42,24 @@ // Defines // ------------------------ -#if defined(NEOPIXEL2_TYPE) && NEOPIXEL2_TYPE != NEOPIXEL_TYPE && DISABLED(NEOPIXEL2_SEPARATE) - #define MULTIPLE_NEOPIXEL_TYPES 1 -#endif +#define _NEO_IS_RGB(N) (N == NEO_RGB || N == NEO_RBG || N == NEO_GRB || N == NEO_GBR || N == NEO_BRG || N == NEO_BGR) -#if EITHER(MULTIPLE_NEOPIXEL_TYPES, NEOPIXEL2_INSERIES) - #define CONJOINED_NEOPIXEL 1 +#if !_NEO_IS_RGB(NEOPIXEL_TYPE) + #define HAS_WHITE_LED 1 #endif -#if NEOPIXEL_TYPE == NEO_RGB || NEOPIXEL_TYPE == NEO_RBG || NEOPIXEL_TYPE == NEO_GRB || NEOPIXEL_TYPE == NEO_GBR || NEOPIXEL_TYPE == NEO_BRG || NEOPIXEL_TYPE == NEO_BGR - #define NEOPIXEL_IS_RGB 1 +#if HAS_WHITE_LED + #define NEO_WHITE 0, 0, 0, 255 #else - #define NEOPIXEL_IS_RGBW 1 + #define NEO_WHITE 255, 255, 255 #endif -#if NEOPIXEL_IS_RGB - #define NEO_WHITE 255, 255, 255, 0 -#else - #define NEO_WHITE 0, 0, 0, 255 +#if defined(NEOPIXEL2_TYPE) && NEOPIXEL2_TYPE != NEOPIXEL_TYPE && DISABLED(NEOPIXEL2_SEPARATE) + #define MULTIPLE_NEOPIXEL_TYPES 1 +#endif + +#if EITHER(MULTIPLE_NEOPIXEL_TYPES, NEOPIXEL2_INSERIES) + #define CONJOINED_NEOPIXEL 1 #endif // ------------------------ @@ -64,11 +68,10 @@ class Marlin_NeoPixel { private: - static Adafruit_NeoPixel adaneo1 - #if CONJOINED_NEOPIXEL - , adaneo2 - #endif - ; + static Adafruit_NeoPixel adaneo1; + #if CONJOINED_NEOPIXEL + static Adafruit_NeoPixel adaneo2; + #endif public: static int8_t neoindex; @@ -78,8 +81,9 @@ class Marlin_NeoPixel { static void set_color(const uint32_t c); - #ifdef NEOPIXEL_BKGD_LED_INDEX - static void set_color_background(); + #ifdef NEOPIXEL_BKGD_INDEX_FIRST + static void set_background_color(uint8_t r, uint8_t g, uint8_t b, uint8_t w); + static void reset_background_color(); #endif static inline void begin() { @@ -93,9 +97,7 @@ class Marlin_NeoPixel { else adaneo1.setPixelColor(n, c); #else adaneo1.setPixelColor(n, c); - #if MULTIPLE_NEOPIXEL_TYPES - adaneo2.setPixelColor(n, c); - #endif + TERN_(MULTIPLE_NEOPIXEL_TYPES, adaneo2.setPixelColor(n, c)); #endif } @@ -112,7 +114,6 @@ class Marlin_NeoPixel { #if CONJOINED_NEOPIXEL adaneo2.show(); #else - IF_DISABLED(NEOPIXEL2_SEPARATE, adaneo1.setPin(NEOPIXEL2_PIN)); adaneo1.show(); adaneo1.setPin(NEOPIXEL_PIN); #endif @@ -120,15 +121,13 @@ class Marlin_NeoPixel { TERN_(HAS_PAUSE_SERVO_OUTPUT, RESUME_SERVO_OUTPUT()); } - #if 0 - bool set_led_color(const uint8_t r, const uint8_t g, const uint8_t b, const uint8_t w, const uint8_t p); - #endif - // Accessors - static inline uint16_t pixels() { TERN(NEOPIXEL2_INSERIES, return adaneo1.numPixels() * 2, return adaneo1.numPixels()); } + static inline uint16_t pixels() { return adaneo1.numPixels() * TERN1(NEOPIXEL2_INSERIES, 2); } + static inline uint8_t brightness() { return adaneo1.getBrightness(); } - static inline uint32_t Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w) { - return adaneo1.Color(r, g, b, w); + + static inline uint32_t Color(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED, uint8_t w)) { + return adaneo1.Color(r, g, b OPTARG(HAS_WHITE_LED, w)); } }; @@ -137,15 +136,12 @@ extern Marlin_NeoPixel neo; // Neo pixel channel 2 #if ENABLED(NEOPIXEL2_SEPARATE) - #if NEOPIXEL2_TYPE == NEO_RGB || NEOPIXEL2_TYPE == NEO_RBG || NEOPIXEL2_TYPE == NEO_GRB || NEOPIXEL2_TYPE == NEO_GBR || NEOPIXEL2_TYPE == NEO_BRG || NEOPIXEL2_TYPE == NEO_BGR + #if _NEO_IS_RGB(NEOPIXEL2_TYPE) #define NEOPIXEL2_IS_RGB 1 + #define NEO2_WHITE 255, 255, 255 #else #define NEOPIXEL2_IS_RGBW 1 - #endif - - #if NEOPIXEL2_IS_RGB - #define NEO2_WHITE 255, 255, 255, 0 - #else + #define HAS_WHITE_LED2 1 // A white component can be passed for NEOPIXEL2 #define NEO2_WHITE 0, 0, 0, 255 #endif @@ -172,11 +168,13 @@ extern Marlin_NeoPixel neo; // Accessors static inline uint16_t pixels() { return adaneo.numPixels();} static inline uint8_t brightness() { return adaneo.getBrightness(); } - static inline uint32_t Color(uint8_t r, uint8_t g, uint8_t b, uint8_t w) { - return adaneo.Color(r, g, b, w); + static inline uint32_t Color(uint8_t r, uint8_t g, uint8_t b OPTARG(HAS_WHITE_LED2, uint8_t w)) { + return adaneo.Color(r, g, b OPTARG(HAS_WHITE_LED2, w)); } }; extern Marlin_NeoPixel2 neo2; #endif // NEOPIXEL2_SEPARATE + +#undef _NEO_IS_RGB diff --git a/Marlin/src/feature/leds/pca9533.cpp b/Marlin/src/feature/leds/pca9533.cpp index 0fd4d6675771..914db21ba31c 100644 --- a/Marlin/src/feature/leds/pca9533.cpp +++ b/Marlin/src/feature/leds/pca9533.cpp @@ -36,7 +36,7 @@ void PCA9533_init() { PCA9533_reset(); } -static void PCA9533_writeAllRegisters(uint8_t psc0, uint8_t pwm0, uint8_t psc1, uint8_t pwm1, uint8_t ls0){ +static void PCA9533_writeAllRegisters(uint8_t psc0, uint8_t pwm0, uint8_t psc1, uint8_t pwm1, uint8_t ls0) { uint8_t data[6] = { PCA9533_REG_PSC0 | PCA9533_REGM_AI, psc0, pwm0, psc1, pwm1, ls0 }; Wire.beginTransmission(PCA9533_Addr >> 1); Wire.write(data, 6); @@ -44,7 +44,7 @@ static void PCA9533_writeAllRegisters(uint8_t psc0, uint8_t pwm0, uint8_t psc1, delayMicroseconds(1); } -static void PCA9533_writeRegister(uint8_t reg, uint8_t val){ +static void PCA9533_writeRegister(uint8_t reg, uint8_t val) { uint8_t data[2] = { reg, val }; Wire.beginTransmission(PCA9533_Addr >> 1); Wire.write(data, 2); diff --git a/Marlin/src/feature/leds/pca9632.cpp b/Marlin/src/feature/leds/pca9632.cpp index bb30e0b48b0e..abea98800451 100644 --- a/Marlin/src/feature/leds/pca9632.cpp +++ b/Marlin/src/feature/leds/pca9632.cpp @@ -93,9 +93,7 @@ static void PCA9632_WriteRegister(const byte addr, const byte regadd, const byte } static void PCA9632_WriteAllRegisters(const byte addr, const byte regadd, const byte vr, const byte vg, const byte vb - #if ENABLED(PCA9632_RGBW) - , const byte vw - #endif + OPTARG(PCA9632_RGBW, const byte vw) ) { #if DISABLED(PCA9632_NO_AUTO_INC) uint8_t data[4]; @@ -143,9 +141,7 @@ void PCA9632_set_led_color(const LEDColor &color) { ; PCA9632_WriteAllRegisters(PCA9632_ADDRESS,PCA9632_PWM0, color.r, color.g, color.b - #if ENABLED(PCA9632_RGBW) - , color.w - #endif + OPTARG(PCA9632_RGBW, color.w) ); PCA9632_WriteRegister(PCA9632_ADDRESS,PCA9632_LEDOUT, LEDOUT); } diff --git a/Marlin/src/feature/leds/printer_event_leds.cpp b/Marlin/src/feature/leds/printer_event_leds.cpp index 3a6b91a258b9..e6407a6320a5 100644 --- a/Marlin/src/feature/leds/printer_event_leds.cpp +++ b/Marlin/src/feature/leds/printer_event_leds.cpp @@ -40,17 +40,15 @@ PrinterEventLEDs printerEventLEDs; uint8_t PrinterEventLEDs::old_intensity = 0; - inline uint8_t pel_intensity(const float &start, const float ¤t, const float &target) { - if (uint16_t(start) == uint16_t(target)) return 255; - return (uint8_t)map(constrain(current, start, target), start, target, 0.f, 255.f); + inline uint8_t pel_intensity(const celsius_t start, const celsius_t current, const celsius_t target) { + if (start == target) return 255; + return (uint8_t)map(constrain(current, start, target), start, target, 0, 255); } - inline void pel_set_rgb(const uint8_t r, const uint8_t g, const uint8_t b) { + inline void pel_set_rgb(const uint8_t r, const uint8_t g, const uint8_t b OPTARG(HAS_WHITE_LED, const uint8_t w=0)) { leds.set_color( - MakeLEDColor(r, g, b, 0, neo.brightness()) - #if ENABLED(NEOPIXEL_IS_SEQUENTIAL) - , true - #endif + LEDColor(r, g, b OPTARG(HAS_WHITE_LED, w) OPTARG(NEOPIXEL_LED, neo.brightness())) + OPTARG(NEOPIXEL_IS_SEQUENTIAL, true) ); } @@ -58,7 +56,7 @@ PrinterEventLEDs printerEventLEDs; #if HAS_TEMP_HOTEND - void PrinterEventLEDs::onHotendHeating(const float &start, const float ¤t, const float &target) { + void PrinterEventLEDs::onHotendHeating(const celsius_t start, const celsius_t current, const celsius_t target) { const uint8_t blue = pel_intensity(start, current, target); if (blue != old_intensity) { old_intensity = blue; @@ -70,13 +68,26 @@ PrinterEventLEDs printerEventLEDs; #if HAS_HEATED_BED - void PrinterEventLEDs::onBedHeating(const float &start, const float ¤t, const float &target) { + void PrinterEventLEDs::onBedHeating(const celsius_t start, const celsius_t current, const celsius_t target) { const uint8_t red = pel_intensity(start, current, target); if (red != old_intensity) { old_intensity = red; pel_set_rgb(red, 0, 255); } } + +#endif + +#if HAS_HEATED_CHAMBER + + void PrinterEventLEDs::onChamberHeating(const celsius_t start, const celsius_t current, const celsius_t target) { + const uint8_t green = pel_intensity(start, current, target); + if (green != old_intensity) { + old_intensity = green; + pel_set_rgb(255, green, 255); + } + } + #endif #endif // PRINTER_EVENT_LEDS diff --git a/Marlin/src/feature/leds/printer_event_leds.h b/Marlin/src/feature/leds/printer_event_leds.h index 86ec292aa3da..b2201433d821 100644 --- a/Marlin/src/feature/leds/printer_event_leds.h +++ b/Marlin/src/feature/leds/printer_event_leds.h @@ -36,27 +36,26 @@ class PrinterEventLEDs { static bool leds_off_after_print; #endif - static inline void set_done() { - #if ENABLED(LED_COLOR_PRESETS) - leds.set_default(); - #else - leds.set_off(); - #endif - } + static inline void set_done() { TERN(LED_COLOR_PRESETS, leds.set_default(), leds.set_off()); } public: #if HAS_TEMP_HOTEND static inline LEDColor onHotendHeatingStart() { old_intensity = 0; return leds.get_color(); } - static void onHotendHeating(const float &start, const float ¤t, const float &target); + static void onHotendHeating(const celsius_t start, const celsius_t current, const celsius_t target); #endif #if HAS_HEATED_BED static inline LEDColor onBedHeatingStart() { old_intensity = 127; return leds.get_color(); } - static void onBedHeating(const float &start, const float ¤t, const float &target); + static void onBedHeating(const celsius_t start, const celsius_t current, const celsius_t target); #endif - #if HAS_TEMP_HOTEND || HAS_HEATED_BED - static inline void onHeatingDone() { leds.set_white(); } + #if HAS_HEATED_CHAMBER + static inline LEDColor onChamberHeatingStart() { old_intensity = 127; return leds.get_color(); } + static void onChamberHeating(const celsius_t start, const celsius_t current, const celsius_t target); + #endif + + #if HAS_TEMP_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER + static inline void onHeatingDone() { leds.set_white(); } static inline void onPidTuningDone(LEDColor c) { leds.set_color(c); } #endif diff --git a/Marlin/src/feature/leds/tempstat.cpp b/Marlin/src/feature/leds/tempstat.cpp index 880258f85245..967b9f4d815d 100644 --- a/Marlin/src/feature/leds/tempstat.cpp +++ b/Marlin/src/feature/leds/tempstat.cpp @@ -36,10 +36,10 @@ void handle_status_leds() { static millis_t next_status_led_update_ms = 0; if (ELAPSED(millis(), next_status_led_update_ms)) { next_status_led_update_ms += 500; // Update every 0.5s - float max_temp = TERN0(HAS_HEATED_BED, _MAX(thermalManager.degTargetBed(), thermalManager.degBed())); + celsius_t max_temp = TERN0(HAS_HEATED_BED, _MAX(thermalManager.degTargetBed(), thermalManager.wholeDegBed())); HOTEND_LOOP() - max_temp = _MAX(max_temp, thermalManager.degHotend(e), thermalManager.degTargetHotend(e)); - const int8_t new_red = (max_temp > 55.0) ? HIGH : (max_temp < 54.0 || old_red < 0) ? LOW : old_red; + max_temp = _MAX(max_temp, thermalManager.wholeDegHotend(e), thermalManager.degTargetHotend(e)); + const int8_t new_red = (max_temp > 55) ? HIGH : (max_temp < 54 || old_red < 0) ? LOW : old_red; if (new_red != old_red) { old_red = new_red; #if PIN_EXISTS(STAT_LED_RED) diff --git a/Marlin/src/feature/max7219.cpp b/Marlin/src/feature/max7219.cpp index ebcb56490d4f..e13c6f5b973c 100644 --- a/Marlin/src/feature/max7219.cpp +++ b/Marlin/src/feature/max7219.cpp @@ -127,10 +127,10 @@ uint8_t Max7219::suspended; // = 0; void Max7219::error(const char * const func, const int32_t v1, const int32_t v2/*=-1*/) { #if ENABLED(MAX7219_ERRORS) SERIAL_ECHOPGM("??? Max7219::"); - serialprintPGM(func); + SERIAL_ECHOPGM_P(func); SERIAL_CHAR('('); SERIAL_ECHO(v1); - if (v2 > 0) SERIAL_ECHOPAIR(", ", v2); + if (v2 > 0) SERIAL_ECHOPGM(", ", v2); SERIAL_CHAR(')'); SERIAL_EOL(); #else @@ -256,7 +256,7 @@ void Max7219::set(const uint8_t line, const uint8_t bits) { } // Draw a float with a decimal point and optional digits - void Max7219::print(const uint8_t start, const float value, const uint8_t pre_size, const uint8_t post_size, const bool leadzero=false) { + void Max7219::print(const uint8_t start, const_float_t value, const uint8_t pre_size, const uint8_t post_size, const bool leadzero=false) { if (pre_size) print(start, value, pre_size, leadzero, !!post_size); if (post_size) { const int16_t after = ABS(value) * (10 ^ post_size); diff --git a/Marlin/src/feature/max7219.h b/Marlin/src/feature/max7219.h index 8e98c9456c3f..3e5b62db2f75 100644 --- a/Marlin/src/feature/max7219.h +++ b/Marlin/src/feature/max7219.h @@ -100,6 +100,13 @@ class Max7219 { // Update a single native line on just one unit static void refresh_unit_line(const uint8_t line); + #if ENABLED(MAX7219_NUMERIC) + // Draw an integer with optional leading zeros and optional decimal point + void print(const uint8_t start, int16_t value, uint8_t size, const bool leadzero=false, bool dec=false); + // Draw a float with a decimal point and optional digits + void print(const uint8_t start, const_float_t value, const uint8_t pre_size, const uint8_t post_size, const bool leadzero=false); + #endif + // Set a single LED by XY coordinate static void led_set(const uint8_t x, const uint8_t y, const bool on); static void led_on(const uint8_t x, const uint8_t y); diff --git a/Marlin/src/feature/meatpack.cpp b/Marlin/src/feature/meatpack.cpp index cd6d8ce6b971..2edcd7478a5c 100644 --- a/Marlin/src/feature/meatpack.cpp +++ b/Marlin/src/feature/meatpack.cpp @@ -39,10 +39,9 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(MEATPACK) +#if HAS_MEATPACK #include "meatpack.h" -MeatPack meatpack; #define MeatPack_ProtocolVersion "PV01" //#define MP_DEBUG @@ -50,14 +49,6 @@ MeatPack meatpack; #define DEBUG_OUT ENABLED(MP_DEBUG) #include "../core/debug_out.h" -bool MeatPack::cmd_is_next = false; // A command is pending -uint8_t MeatPack::state = 0; // Configuration state OFF -uint8_t MeatPack::second_char = 0; // The unpacked 2nd character from an out-of-sequence packed pair -uint8_t MeatPack::cmd_count = 0, // Counts how many command bytes are received (need 2) - MeatPack::full_char_count = 0, // Counts how many full-width characters are to be received - MeatPack::char_out_count = 0; // Stores number of characters to be read out. -uint8_t MeatPack::char_out_buf[2]; // Output buffer for caching up to 2 characters - // The 15 most-common characters used in G-code, ~90-95% of all G-code uses these characters // Stored in SRAM for performance. uint8_t meatPackLookupTable[16] = { @@ -66,7 +57,9 @@ uint8_t meatPackLookupTable[16] = { '\0' // Unused. 0b1111 indicates a literal character }; -TERN_(MP_DEBUG, uint8_t chars_decoded = 0); // Log the first 64 bytes after each reset +#if ENABLED(MP_DEBUG) + uint8_t chars_decoded = 0; // Log the first 64 bytes after each reset +#endif void MeatPack::reset_state() { state = 0; @@ -110,7 +103,7 @@ void MeatPack::handle_rx_char_inner(const uint8_t c) { if (TEST(state, MPConfig_Bit_Active)) { // Is MeatPack active? if (!full_char_count) { // No literal characters to fetch? uint8_t buf[2] = { 0, 0 }; - register const uint8_t res = unpack_chars(c, buf); // Decode the byte into one or two characters. + const uint8_t res = unpack_chars(c, buf); // Decode the byte into one or two characters. if (res & kFirstCharIsLiteral) { // The 1st character couldn't be packed. ++full_char_count; // So the next stream byte is a full character. if (res & kSecondCharIsLiteral) ++full_char_count; // The 2nd character couldn't be packed. Another stream byte is a full character. @@ -147,9 +140,7 @@ void MeatPack::handle_output_char(const uint8_t c) { #if ENABLED(MP_DEBUG) if (chars_decoded < 1024) { ++chars_decoded; - DEBUG_ECHOPGM("RB: "); - MYSERIAL.print((char)c); - DEBUG_EOL(); + DEBUG_ECHOLNPGM("RB: ", AS_CHAR(c)); } #endif } @@ -181,7 +172,7 @@ void MeatPack::report_state() { SERIAL_ECHOPGM("[MP] "); SERIAL_ECHOPGM(MeatPack_ProtocolVersion " "); serialprint_onoff(TEST(state, MPConfig_Bit_Active)); - serialprintPGM(TEST(state, MPConfig_Bit_NoSpaces) ? PSTR(" NSP\n") : PSTR(" ESP\n")); + SERIAL_ECHOPGM_P(TEST(state, MPConfig_Bit_NoSpaces) ? PSTR(" NSP\n") : PSTR(" ESP\n")); } /** @@ -200,7 +191,7 @@ void MeatPack::handle_rx_char(const uint8_t c, const serial_index_t serial_ind) } if (cmd_is_next) { // Were two command bytes received? - PORT_REDIRECT(serial_ind); + PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); handle_command((MeatPack_Command)c); // Then the byte is a MeatPack command cmd_is_next = false; return; @@ -214,15 +205,15 @@ void MeatPack::handle_rx_char(const uint8_t c, const serial_index_t serial_ind) handle_rx_char_inner(c); // Other characters are passed on for MeatPack decoding } -uint8_t MeatPack::get_result_char(char* const __restrict out) { +uint8_t MeatPack::get_result_char(char * const __restrict out) { uint8_t res = 0; if (char_out_count) { res = char_out_count; char_out_count = 0; - for (register uint8_t i = 0; i < res; ++i) + for (uint8_t i = 0; i < res; ++i) out[i] = (char)char_out_buf[i]; } return res; } -#endif // MEATPACK +#endif // HAS_MEATPACK diff --git a/Marlin/src/feature/meatpack.h b/Marlin/src/feature/meatpack.h index 2641130bd880..a56e65b6cc30 100644 --- a/Marlin/src/feature/meatpack.h +++ b/Marlin/src/feature/meatpack.h @@ -49,6 +49,7 @@ #pragma once #include +#include "../core/serial_hook.h" /** * Commands sent to MeatPack to control its behavior. @@ -78,8 +79,6 @@ enum MeatPack_ConfigStateBits : uint8_t { }; class MeatPack { -private: - friend class GCodeQueue; // Utility definitions static const uint8_t kCommandByte = 0b11111111, @@ -91,17 +90,18 @@ class MeatPack { static const uint8_t kSpaceCharIdx = 11; static const char kSpaceCharReplace = 'E'; - static bool cmd_is_next; // A command is pending - static uint8_t state; // Configuration state - static uint8_t second_char; // Buffers a character if dealing with out-of-sequence pairs - static uint8_t cmd_count, // Counter of command bytes received (need 2) - full_char_count, // Counter for full-width characters to be received - char_out_count; // Stores number of characters to be read out. - static uint8_t char_out_buf[2]; // Output buffer for caching up to 2 characters + bool cmd_is_next; // A command is pending + uint8_t state; // Configuration state + uint8_t second_char; // Buffers a character if dealing with out-of-sequence pairs + uint8_t cmd_count, // Counter of command bytes received (need 2) + full_char_count, // Counter for full-width characters to be received + char_out_count; // Stores number of characters to be read out. + uint8_t char_out_buf[2]; // Output buffer for caching up to 2 characters +public: // Pass in a character rx'd by SD card or serial. Automatically parses command/ctrl sequences, // and will control state internally. - static void handle_rx_char(const uint8_t c, const serial_index_t serial_ind); + void handle_rx_char(const uint8_t c, const serial_index_t serial_ind); /** * After passing in rx'd char using above method, call this to get characters out. @@ -109,15 +109,67 @@ class MeatPack { * @param out [in] Output pointer for unpacked/processed data. * @return Number of characters returned. Range from 0 to 2. */ - static uint8_t get_result_char(char* const __restrict out); - - static void reset_state(); - static void report_state(); - static uint8_t unpacked_char(register const uint8_t in); - static uint8_t unpack_chars(const uint8_t pk, uint8_t* __restrict const chars_out); - static void handle_command(const MeatPack_Command c); - static void handle_output_char(const uint8_t c); - static void handle_rx_char_inner(const uint8_t c); + uint8_t get_result_char(char * const __restrict out); + + void reset_state(); + void report_state(); + uint8_t unpack_chars(const uint8_t pk, uint8_t* __restrict const chars_out); + void handle_command(const MeatPack_Command c); + void handle_output_char(const uint8_t c); + void handle_rx_char_inner(const uint8_t c); + + MeatPack() : cmd_is_next(false), state(0), second_char(0), cmd_count(0), full_char_count(0), char_out_count(0) {} }; -extern MeatPack meatpack; +// Implement the MeatPack serial class so it's transparent to rest of the code +template +struct MeatpackSerial : public SerialBase > { + typedef SerialBase< MeatpackSerial > BaseClassT; + + SerialT & out; + MeatPack meatpack; + + char serialBuffer[2]; + uint8_t charCount; + uint8_t readIndex; + + NO_INLINE void write(uint8_t c) { out.write(c); } + void flush() { out.flush(); } + void begin(long br) { out.begin(br); readIndex = 0; } + void end() { out.end(); } + + void msgDone() { out.msgDone(); } + // Existing instances implement Arduino's operator bool, so use that if it's available + bool connected() { return Private::HasMember_connected::value ? CALL_IF_EXISTS(bool, &out, connected) : (bool)out; } + void flushTX() { CALL_IF_EXISTS(void, &out, flushTX); } + SerialFeature features(serial_index_t index) const { return SerialFeature::MeatPack | CALL_IF_EXISTS(SerialFeature, &out, features, index); } + + + int available(serial_index_t index) { + if (charCount) return charCount; // The buffer still has data + if (out.available(index) <= 0) return 0; // No data to read + + // Don't read in read method, instead do it here, so we can make progress in the read method + const int r = out.read(index); + if (r == -1) return 0; // This is an error from the underlying serial code + meatpack.handle_rx_char((uint8_t)r, index); + charCount = meatpack.get_result_char(serialBuffer); + readIndex = 0; + + return charCount; + } + + int readImpl(const serial_index_t index) { + // Not enough char to make progress? + if (charCount == 0 && available(index) == 0) return -1; + + charCount--; + return serialBuffer[readIndex++]; + } + + int read(serial_index_t index) { return readImpl(index); } + int available() { return available(0); } + int read() { return readImpl(0); } + + MeatpackSerial(const bool e, SerialT & out) : BaseClassT(e), out(out) {} +}; diff --git a/Marlin/src/feature/mixing.cpp b/Marlin/src/feature/mixing.cpp index b002e9808adc..9ebc90127f43 100644 --- a/Marlin/src/feature/mixing.cpp +++ b/Marlin/src/feature/mixing.cpp @@ -106,11 +106,32 @@ void Mixer::reset_vtools() { MIXER_STEPPER_LOOP(i) color[t][i] = (i == 0) ? COLOR_A_MASK : 0; #endif + + // MIXING_PRESETS: Set a variety of obvious mixes as presets + #if ENABLED(MIXING_PRESETS) && WITHIN(MIXING_STEPPERS, 2, 3) + #if MIXING_STEPPERS == 2 + if (MIXING_VIRTUAL_TOOLS > 2) { collector[0] = 1; collector[1] = 1; mixer.normalize(2); } // 1:1 + if (MIXING_VIRTUAL_TOOLS > 3) { collector[0] = 3; mixer.normalize(3); } // 3:1 + if (MIXING_VIRTUAL_TOOLS > 4) { collector[0] = 1; collector[1] = 3; mixer.normalize(4); } // 1:3 + if (MIXING_VIRTUAL_TOOLS > 5) { collector[1] = 2; mixer.normalize(5); } // 1:2 + if (MIXING_VIRTUAL_TOOLS > 6) { collector[0] = 2; collector[1] = 1; mixer.normalize(6); } // 2:1 + if (MIXING_VIRTUAL_TOOLS > 7) { collector[0] = 3; collector[1] = 2; mixer.normalize(7); } // 3:2 + #else + if (MIXING_VIRTUAL_TOOLS > 3) { collector[0] = 1; collector[1] = 1; collector[2] = 1; mixer.normalize(3); } // 1:1:1 + if (MIXING_VIRTUAL_TOOLS > 4) { collector[1] = 3; collector[2] = 0; mixer.normalize(4); } // 1:3:0 + if (MIXING_VIRTUAL_TOOLS > 5) { collector[0] = 0; collector[2] = 1; mixer.normalize(5); } // 0:3:1 + if (MIXING_VIRTUAL_TOOLS > 6) { collector[1] = 1; mixer.normalize(6); } // 0:1:1 + if (MIXING_VIRTUAL_TOOLS > 7) { collector[0] = 1; collector[2] = 0; mixer.normalize(7); } // 1:1:0 + #endif + ZERO(collector); + #endif } // called at boot void Mixer::init() { + ZERO(collector); + reset_vtools(); #if HAS_MIXER_SYNC_CHANNEL @@ -119,8 +140,6 @@ void Mixer::init() { color[MIXER_AUTORETRACT_TOOL][i] = COLOR_A_MASK; #endif - ZERO(collector); - #if EITHER(HAS_DUAL_MIXING, GRADIENT_MIX) update_mix_from_vtool(); #endif @@ -135,11 +154,11 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*= cmax = _MAX(cmax, v); csum += v; } - //SERIAL_ECHOPAIR("Mixer::refresh_collector(", proportion, ", ", int(t), ") cmax=", cmax, " csum=", csum, " color"); + //SERIAL_ECHOPGM("Mixer::refresh_collector(", proportion, ", ", t, ") cmax=", cmax, " csum=", csum, " color"); const float inv_prop = proportion / csum; MIXER_STEPPER_LOOP(i) { c[i] = color[t][i] * inv_prop; - //SERIAL_ECHOPAIR(" [", int(t), "][", int(i), "] = ", int(color[t][i]), " (", c[i], ") "); + //SERIAL_ECHOPGM(" [", t, "][", i, "] = ", color[t][i], " (", c[i], ") "); } //SERIAL_EOL(); } @@ -150,19 +169,17 @@ void Mixer::refresh_collector(const float proportion/*=1.0*/, const uint8_t t/*= #include "../module/planner.h" gradient_t Mixer::gradient = { - false, // enabled - {0}, // color (array) - 0, 0, // start_z, end_z - 0, 1, // start_vtool, end_vtool - {0}, {0} // start_mix[], end_mix[] - #if ENABLED(GRADIENT_VTOOL) - , -1 // vtool_index - #endif + false, // enabled + {0}, // color (array) + 0, 0, // start_z, end_z + 0, 1, // start_vtool, end_vtool + {0}, {0} // start_mix[], end_mix[] + OPTARG(GRADIENT_VTOOL, -1) // vtool_index }; float Mixer::prev_z; // = 0 - void Mixer::update_gradient_for_z(const float z) { + void Mixer::update_gradient_for_z(const_float_t z) { if (z == prev_z) return; prev_z = z; diff --git a/Marlin/src/feature/mixing.h b/Marlin/src/feature/mixing.h index 7fe7062a7a52..f700c7b65b7d 100644 --- a/Marlin/src/feature/mixing.h +++ b/Marlin/src/feature/mixing.h @@ -61,9 +61,6 @@ enum MixTool { #define MAX_VTOOLS TERN(HAS_MIXER_SYNC_CHANNEL, 254, 255) static_assert(NR_MIXING_VIRTUAL_TOOLS <= MAX_VTOOLS, "MIXING_VIRTUAL_TOOLS must be <= " STRINGIFY(MAX_VTOOLS) "!"); -#define MIXER_BLOCK_FIELD mixer_comp_t b_color[MIXING_STEPPERS] -#define MIXER_POPULATE_BLOCK() mixer.populate_block(block->b_color) -#define MIXER_STEPPER_SETUP() mixer.stepper_setup(current_block->b_color) #define MIXER_STEPPER_LOOP(VAR) for (uint_fast8_t VAR = 0; VAR < MIXING_STEPPERS; VAR++) #if ENABLED(GRADIENT_MIX) @@ -73,9 +70,11 @@ static_assert(NR_MIXING_VIRTUAL_TOOLS <= MAX_VTOOLS, "MIXING_VIRTUAL_TOOLS must mixer_comp_t color[MIXING_STEPPERS]; // The current gradient color float start_z, end_z; // Region for gradient int8_t start_vtool, end_vtool; // Start and end virtual tools - mixer_perc_t start_mix[MIXING_STEPPERS], // Start and end mixes from those tools + mixer_perc_t start_mix[MIXING_STEPPERS], // Start and end mixes from those tools end_mix[MIXING_STEPPERS]; - TERN_(GRADIENT_VTOOL, int8_t vtool_index); // Use this virtual tool number as index + #if ENABLED(GRADIENT_VTOOL) + int8_t vtool_index; // Use this virtual tool number as index + #endif } gradient_t; #endif @@ -139,9 +138,9 @@ class Mixer { #ifdef MIXER_NORMALIZER_DEBUG SERIAL_ECHOPGM("Mix [ "); - SERIAL_ECHOLIST_N(MIXING_STEPPERS, int(mix[0]), int(mix[1]), int(mix[2]), int(mix[3]), int(mix[4]), int(mix[5])); + SERIAL_ECHOLIST_N(MIXING_STEPPERS, mix[0], mix[1], mix[2], mix[3], mix[4], mix[5]); SERIAL_ECHOPGM(" ] to Color [ "); - SERIAL_ECHOLIST_N(MIXING_STEPPERS, int(tcolor[0]), int(tcolor[1]), int(tcolor[2]), int(tcolor[3]), int(tcolor[4]), int(tcolor[5])); + SERIAL_ECHOLIST_N(MIXING_STEPPERS, tcolor[0], tcolor[1], tcolor[2], tcolor[3], tcolor[4], tcolor[5]); SERIAL_ECHOLNPGM(" ]"); #endif } @@ -153,10 +152,10 @@ class Mixer { MIXER_STEPPER_LOOP(i) mix[i] = mixer_perc_t(100.0f * color[j][i] / ctot); #ifdef MIXER_NORMALIZER_DEBUG - SERIAL_ECHOPAIR("V-tool ", int(j), " [ "); - SERIAL_ECHOLIST_N(MIXING_STEPPERS, int(color[j][0]), int(color[j][1]), int(color[j][2]), int(color[j][3]), int(color[j][4]), int(color[j][5])); + SERIAL_ECHOPGM("V-tool ", j, " [ "); + SERIAL_ECHOLIST_N(MIXING_STEPPERS, color[j][0], color[j][1], color[j][2], color[j][3], color[j][4], color[j][5]); SERIAL_ECHOPGM(" ] to Mix [ "); - SERIAL_ECHOLIST_N(MIXING_STEPPERS, int(mix[0]), int(mix[1]), int(mix[2]), int(mix[3]), int(mix[4]), int(mix[5])); + SERIAL_ECHOLIST_N(MIXING_STEPPERS, mix[0], mix[1], mix[2], mix[3], mix[4], mix[5]); SERIAL_ECHOLNPGM(" ]"); #endif } @@ -181,9 +180,9 @@ class Mixer { static float prev_z; // Update the current mix from the gradient for a given Z - static void update_gradient_for_z(const float z); + static void update_gradient_for_z(const_float_t z); static void update_gradient_for_planner_z(); - static inline void gradient_control(const float z) { + static inline void gradient_control(const_float_t z) { if (gradient.enabled) { if (z >= gradient.end_z) T(gradient.end_vtool); @@ -199,9 +198,9 @@ class Mixer { #ifdef MIXER_NORMALIZER_DEBUG SERIAL_ECHOPGM("Gradient [ "); - SERIAL_ECHOLIST_N(MIXING_STEPPERS, int(gradient.color[0]), int(gradient.color[1]), int(gradient.color[2]), int(gradient.color[3]), int(gradient.color[4]), int(gradient.color[5])); + SERIAL_ECHOLIST_N(MIXING_STEPPERS, gradient.color[0], gradient.color[1], gradient.color[2], gradient.color[3], gradient.color[4], gradient.color[5]); SERIAL_ECHOPGM(" ] to Mix [ "); - SERIAL_ECHOLIST_N(MIXING_STEPPERS, int(mix[0]), int(mix[1]), int(mix[2]), int(mix[3]), int(mix[4]), int(mix[5])); + SERIAL_ECHOLIST_N(MIXING_STEPPERS, mix[0], mix[1], mix[2], mix[3], mix[4], mix[5]); SERIAL_ECHOLNPGM(" ]"); #endif } diff --git a/Marlin/src/feature/mmu/mmu.cpp b/Marlin/src/feature/mmu/mmu.cpp index 9a448296bbe2..6340f3c3017b 100644 --- a/Marlin/src/feature/mmu/mmu.cpp +++ b/Marlin/src/feature/mmu/mmu.cpp @@ -24,11 +24,19 @@ #if HAS_PRUSA_MMU1 +#include "../MarlinCore.h" +#include "../module/planner.h" #include "../module/stepper.h" +void mmu_init() { + SET_OUTPUT(E_MUX0_PIN); + SET_OUTPUT(E_MUX1_PIN); + SET_OUTPUT(E_MUX2_PIN); +} + void select_multiplexed_stepper(const uint8_t e) { planner.synchronize(); - disable_e_steppers(); + stepper.disable_e_steppers(); WRITE(E_MUX0_PIN, TEST(e, 0) ? HIGH : LOW); WRITE(E_MUX1_PIN, TEST(e, 1) ? HIGH : LOW); WRITE(E_MUX2_PIN, TEST(e, 2) ? HIGH : LOW); diff --git a/Marlin/src/feature/mmu/mmu.h b/Marlin/src/feature/mmu/mmu.h index 10805c8e26b7..23742d00c61e 100644 --- a/Marlin/src/feature/mmu/mmu.h +++ b/Marlin/src/feature/mmu/mmu.h @@ -21,4 +21,5 @@ */ #pragma once +void mmu_init(); void select_multiplexed_stepper(const uint8_t e); diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index e3036947d576..3727c8c86dde 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -35,7 +35,7 @@ MMU2 mmu2; #include "../../libs/nozzle.h" #include "../../module/temperature.h" #include "../../module/planner.h" -#include "../../module/stepper/indirection.h" +#include "../../module/stepper.h" #include "../../MarlinCore.h" #if ENABLED(HOST_PROMPT_SUPPORT) @@ -62,36 +62,20 @@ MMU2 mmu2; #endif #define MMU_CMD_NONE 0 -#define MMU_CMD_T0 0x10 -#define MMU_CMD_T1 0x11 -#define MMU_CMD_T2 0x12 -#define MMU_CMD_T3 0x13 -#define MMU_CMD_T4 0x14 -#define MMU_CMD_L0 0x20 -#define MMU_CMD_L1 0x21 -#define MMU_CMD_L2 0x22 -#define MMU_CMD_L3 0x23 -#define MMU_CMD_L4 0x24 +#define MMU_CMD_T0 0x10 // up to supported filaments +#define MMU_CMD_L0 0x20 // up to supported filaments #define MMU_CMD_C0 0x30 #define MMU_CMD_U0 0x40 -#define MMU_CMD_E0 0x50 -#define MMU_CMD_E1 0x51 -#define MMU_CMD_E2 0x52 -#define MMU_CMD_E3 0x53 -#define MMU_CMD_E4 0x54 +#define MMU_CMD_E0 0x50 // up to supported filaments #define MMU_CMD_R0 0x60 -#define MMU_CMD_F0 0x70 -#define MMU_CMD_F1 0x71 -#define MMU_CMD_F2 0x72 -#define MMU_CMD_F3 0x73 -#define MMU_CMD_F4 0x74 +#define MMU_CMD_F0 0x70 // up to supported filaments #define MMU_REQUIRED_FW_BUILDNR TERN(MMU2_MODE_12V, 132, 126) #define MMU2_NO_TOOL 99 #define MMU_BAUD 115200 -bool MMU2::enabled, MMU2::ready, MMU2::mmu_print_saved; +bool MMU2::_enabled, MMU2::ready, MMU2::mmu_print_saved; #if HAS_PRUSA_MMU2S bool MMU2::mmu2s_triggered; #endif @@ -175,7 +159,7 @@ void MMU2::mmu_loop() { MMU2_COMMAND("S1"); // Read Version state = -2; } - else if (millis() > 3000000) { + else if (millis() > 30000) { // 30sec after reset disable MMU SERIAL_ECHOLNPGM("MMU not responding - DISABLED"); state = 0; } @@ -185,7 +169,7 @@ void MMU2::mmu_loop() { if (rx_ok()) { sscanf(rx_buffer, "%huok\n", &version); - DEBUG_ECHOLNPAIR("MMU => ", version, "\nMMU <= 'S2'"); + DEBUG_ECHOLNPGM("MMU => ", version, "\nMMU <= 'S2'"); MMU2_COMMAND("S2"); // Read Build Number state = -3; @@ -196,7 +180,7 @@ void MMU2::mmu_loop() { if (rx_ok()) { sscanf(rx_buffer, "%huok\n", &buildnr); - DEBUG_ECHOLNPAIR("MMU => ", buildnr); + DEBUG_ECHOLNPGM("MMU => ", buildnr); check_version(); @@ -233,9 +217,9 @@ void MMU2::mmu_loop() { if (rx_ok()) { sscanf(rx_buffer, "%hhuok\n", &finda); - DEBUG_ECHOLNPAIR("MMU => ", finda, "\nMMU - ENABLED"); + DEBUG_ECHOLNPGM("MMU => ", finda, "\nMMU - ENABLED"); - enabled = true; + _enabled = true; state = 1; TERN_(HAS_PRUSA_MMU2S, mmu2s_triggered = false); } @@ -243,18 +227,18 @@ void MMU2::mmu_loop() { case 1: if (cmd) { - if (WITHIN(cmd, MMU_CMD_T0, MMU_CMD_T4)) { + if (WITHIN(cmd, MMU_CMD_T0, MMU_CMD_T0 + EXTRUDERS - 1)) { // tool change int filament = cmd - MMU_CMD_T0; - DEBUG_ECHOLNPAIR("MMU <= T", filament); + DEBUG_ECHOLNPGM("MMU <= T", filament); tx_printf_P(PSTR("T%d\n"), filament); TERN_(MMU_EXTRUDER_SENSOR, mmu_idl_sens = 1); // enable idler sensor, if any state = 3; // wait for response } - else if (WITHIN(cmd, MMU_CMD_L0, MMU_CMD_L4)) { + else if (WITHIN(cmd, MMU_CMD_L0, MMU_CMD_L0 + EXTRUDERS - 1)) { // load int filament = cmd - MMU_CMD_L0; - DEBUG_ECHOLNPAIR("MMU <= L", filament); + DEBUG_ECHOLNPGM("MMU <= L", filament); tx_printf_P(PSTR("L%d\n"), filament); state = 3; // wait for response } @@ -271,10 +255,10 @@ void MMU2::mmu_loop() { MMU2_COMMAND("U0"); state = 3; // wait for response } - else if (WITHIN(cmd, MMU_CMD_E0, MMU_CMD_E4)) { + else if (WITHIN(cmd, MMU_CMD_E0, MMU_CMD_E0 + EXTRUDERS - 1)) { // eject filament int filament = cmd - MMU_CMD_E0; - DEBUG_ECHOLNPAIR("MMU <= E", filament); + DEBUG_ECHOLNPGM("MMU <= E", filament); tx_printf_P(PSTR("E%d\n"), filament); state = 3; // wait for response } @@ -284,12 +268,10 @@ void MMU2::mmu_loop() { MMU2_COMMAND("R0"); state = 3; // wait for response } - else if (WITHIN(cmd, MMU_CMD_F0, MMU_CMD_F4)) { + else if (WITHIN(cmd, MMU_CMD_F0, MMU_CMD_F0 + EXTRUDERS - 1)) { // filament type int filament = cmd - MMU_CMD_F0; - DEBUG_ECHOPAIR("MMU <= F", filament, " "); - DEBUG_ECHO_F(cmd_arg, DEC); - DEBUG_EOL(); + DEBUG_ECHOLNPGM("MMU <= F", filament, " ", cmd_arg); tx_printf_P(PSTR("F%d %d\n"), filament, cmd_arg); state = 3; // wait for response } @@ -380,7 +362,7 @@ bool MMU2::rx_start() { /** * Check if the data received ends with the given string. */ -bool MMU2::rx_str_P(const char* str) { +bool MMU2::rx_str_P(const char *str) { uint8_t i = strlen(rx_buffer); while (MMU2_SERIAL.available()) { @@ -412,7 +394,7 @@ bool MMU2::rx_str_P(const char* str) { /** * Transfer data to MMU, no argument */ -void MMU2::tx_str_P(const char* str) { +void MMU2::tx_str_P(const char *str) { clear_rx_buffer(); uint8_t len = strlen_P(str); LOOP_L_N(i, len) MMU2_SERIAL.write(pgm_read_byte(str++)); @@ -422,7 +404,7 @@ void MMU2::tx_str_P(const char* str) { /** * Transfer data to MMU, single argument */ -void MMU2::tx_printf_P(const char* format, int argument = -1) { +void MMU2::tx_printf_P(const char *format, int argument = -1) { clear_rx_buffer(); uint8_t len = sprintf_P(tx_buffer, format, argument); LOOP_L_N(i, len) MMU2_SERIAL.write(tx_buffer[i]); @@ -432,7 +414,7 @@ void MMU2::tx_printf_P(const char* format, int argument = -1) { /** * Transfer data to MMU, two arguments */ -void MMU2::tx_printf_P(const char* format, int argument1, int argument2) { +void MMU2::tx_printf_P(const char *format, int argument1, int argument2) { clear_rx_buffer(); uint8_t len = sprintf_P(tx_buffer, format, argument1, argument2); LOOP_L_N(i, len) MMU2_SERIAL.write(tx_buffer[i]); @@ -498,13 +480,13 @@ static void mmu2_not_responding() { */ void MMU2::tool_change(const uint8_t index) { - if (!enabled) return; + if (!_enabled) return; set_runout_valid(false); if (index != extruder) { - DISABLE_AXIS_E0(); + stepper.disable_extruder(); ui.status_printf_P(0, GET_TEXT(MSG_MMU2_LOADING_FILAMENT), int(index + 1)); command(MMU_CMD_T0 + index); @@ -513,9 +495,8 @@ static void mmu2_not_responding() { if (load_to_gears()) { extruder = index; // filament change is finished active_extruder = 0; - ENABLE_AXIS_E0(); - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(extruder)); + stepper.enable_extruder(); + SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, extruder); } ui.reset_status(); } @@ -530,8 +511,8 @@ static void mmu2_not_responding() { * Tx Same as T?, except nozzle doesn't have to be preheated. Tc must be placed after extruder nozzle is preheated to finish filament load. * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated. */ - void MMU2::tool_change(const char* special) { - if (!enabled) return; + void MMU2::tool_change(const char *special) { + if (!_enabled) return; set_runout_valid(false); @@ -550,13 +531,13 @@ static void mmu2_not_responding() { #if ENABLED(MMU2_MENUS) planner.synchronize(); const uint8_t index = mmu2_choose_filament(); - DISABLE_AXIS_E0(); + stepper.disable_extruder(); command(MMU_CMD_T0 + index); manage_response(true, true); if (load_to_gears()) { mmu_loop(); - ENABLE_AXIS_E0(); + stepper.enable_extruder(); extruder = index; active_extruder = 0; } @@ -580,12 +561,12 @@ static void mmu2_not_responding() { * Handle tool change */ void MMU2::tool_change(const uint8_t index) { - if (!enabled) return; + if (!_enabled) return; set_runout_valid(false); if (index != extruder) { - DISABLE_AXIS_E0(); + stepper.disable_extruder(); if (FILAMENT_PRESENT()) { DEBUG_ECHOLNPGM("Unloading\n"); mmu_loading_flag = false; @@ -601,9 +582,8 @@ static void mmu2_not_responding() { extruder = index; active_extruder = 0; - ENABLE_AXIS_E0(); - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(extruder)); + stepper.enable_extruder(); + SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, extruder); ui.reset_status(); } @@ -618,8 +598,8 @@ static void mmu2_not_responding() { * Tx Same as T?, except nozzle doesn't have to be preheated. Tc must be placed after extruder nozzle is preheated to finish filament load. * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated. */ - void MMU2::tool_change(const char* special) { - if (!enabled) return; + void MMU2::tool_change(const char *special) { + if (!_enabled) return; set_runout_valid(false); @@ -640,14 +620,14 @@ static void mmu2_not_responding() { #if ENABLED(MMU2_MENUS) planner.synchronize(); uint8_t index = mmu2_choose_filament(); - DISABLE_AXIS_E0(); + stepper.disable_extruder(); command(MMU_CMD_T0 + index); manage_response(true, true); mmu_continue_loading(); command(MMU_CMD_C0); mmu_loop(); - ENABLE_AXIS_E0(); + stepper.enable_extruder(); extruder = index; active_extruder = 0; #else @@ -667,7 +647,7 @@ static void mmu2_not_responding() { void MMU2::mmu_continue_loading() { for (uint8_t i = 0; i < MMU_LOADING_ATTEMPTS_NR; i++) { - DEBUG_ECHOLNPAIR("Additional load attempt #", i); + DEBUG_ECHOLNPGM("Additional load attempt #", i); if (FILAMENT_PRESENT()) break; command(MMU_CMD_C0); manage_response(true, true); @@ -685,21 +665,20 @@ static void mmu2_not_responding() { * Handle tool change */ void MMU2::tool_change(const uint8_t index) { - if (!enabled) return; + if (!_enabled) return; set_runout_valid(false); if (index != extruder) { - DISABLE_AXIS_E0(); + stepper.disable_extruder(); ui.status_printf_P(0, GET_TEXT(MSG_MMU2_LOADING_FILAMENT), int(index + 1)); command(MMU_CMD_T0 + index); manage_response(true, true); command(MMU_CMD_C0); extruder = index; //filament change is finished active_extruder = 0; - ENABLE_AXIS_E0(); - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(extruder)); + stepper.enable_extruder(); + SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, extruder); ui.reset_status(); } @@ -713,8 +692,8 @@ static void mmu2_not_responding() { * Tx Same as T?, except nozzle doesn't have to be preheated. Tc must be placed after extruder nozzle is preheated to finish filament load. * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated. */ - void MMU2::tool_change(const char* special) { - if (!enabled) return; + void MMU2::tool_change(const char *special) { + if (!_enabled) return; set_runout_valid(false); @@ -735,13 +714,13 @@ static void mmu2_not_responding() { #if ENABLED(MMU2_MENUS) planner.synchronize(); uint8_t index = mmu2_choose_filament(); - DISABLE_AXIS_E0(); + stepper.disable_extruder(); command(MMU_CMD_T0 + index); manage_response(true, true); command(MMU_CMD_C0); mmu_loop(); - ENABLE_AXIS_E0(); + stepper.enable_extruder(); extruder = index; active_extruder = 0; #else @@ -765,7 +744,7 @@ static void mmu2_not_responding() { * Set next command */ void MMU2::command(const uint8_t mmu_cmd) { - if (!enabled) return; + if (!_enabled) return; cmd = mmu_cmd; ready = false; } @@ -796,7 +775,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) { bool response = false; mmu_print_saved = false; xyz_pos_t resume_position; - int16_t resume_hotend_temp = thermalManager.degTargetHotend(active_extruder); + celsius_t resume_hotend_temp = thermalManager.degTargetHotend(active_extruder); KEEPALIVE_STATE(PAUSED_FOR_USER); @@ -854,7 +833,7 @@ void MMU2::manage_response(const bool move_axes, const bool turn_off_nozzle) { } void MMU2::set_filament_type(const uint8_t index, const uint8_t filamentType) { - if (!enabled) return; + if (!_enabled) return; cmd_arg = filamentType; command(MMU_CMD_F0 + index); @@ -913,7 +892,7 @@ void MMU2::filament_runout() { // Load filament into MMU2 void MMU2::load_filament(const uint8_t index) { - if (!enabled) return; + if (!_enabled) return; command(MMU_CMD_L0 + index); manage_response(false, false); @@ -925,7 +904,7 @@ void MMU2::load_filament(const uint8_t index) { */ bool MMU2::load_filament_to_nozzle(const uint8_t index) { - if (!enabled) return false; + if (!_enabled) return false; if (thermalManager.tooColdToExtrude(active_extruder)) { BUZZ(200, 404); @@ -933,7 +912,7 @@ bool MMU2::load_filament_to_nozzle(const uint8_t index) { return false; } - DISABLE_AXIS_E0(); + stepper.disable_extruder(); command(MMU_CMD_T0 + index); manage_response(true, true); @@ -961,7 +940,7 @@ void MMU2::load_to_nozzle() { bool MMU2::eject_filament(const uint8_t index, const bool recover) { - if (!enabled) return false; + if (!_enabled) return false; if (thermalManager.tooColdToExtrude(active_extruder)) { BUZZ(200, 404); @@ -971,7 +950,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) { LCD_MESSAGEPGM(MSG_MMU2_EJECTING_FILAMENT); - ENABLE_AXIS_E0(); + stepper.enable_extruder(); current_position.e -= MMU2_FILAMENTCHANGE_EJECT_FEED; line_to_current_position(MMM_TO_MMS(2500)); planner.synchronize(); @@ -983,7 +962,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) { BUZZ(200, 404); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("MMU2 Eject Recover"), CONTINUE_STR)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("MMU2 Eject Recover"))); - wait_for_user_response(); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); BUZZ(200, 404); BUZZ(200, 404); @@ -1000,7 +979,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) { BUZZ(200, 404); - DISABLE_AXIS_E0(); + stepper.disable_extruder(); return true; } @@ -1010,7 +989,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) { */ bool MMU2::unload() { - if (!enabled) return false; + if (!_enabled) return false; if (thermalManager.tooColdToExtrude(active_extruder)) { BUZZ(200, 404); @@ -1037,7 +1016,7 @@ bool MMU2::unload() { void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) { planner.synchronize(); - ENABLE_AXIS_E0(); + stepper.enable_extruder(); const E_Step* step = sequence; @@ -1046,7 +1025,7 @@ void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) { const feedRate_t fr_mm_m = pgm_read_float(&(step->feedRate)); DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("E step ", es, "/", fr_mm_m); + DEBUG_ECHOLNPGM("E step ", es, "/", fr_mm_m); current_position.e += es; line_to_current_position(MMM_TO_MMS(fr_mm_m)); @@ -1055,7 +1034,7 @@ void MMU2::execute_extruder_sequence(const E_Step * sequence, int steps) { step++; } - DISABLE_AXIS_E0(); + stepper.disable_extruder(); } #endif // HAS_PRUSA_MMU2 diff --git a/Marlin/src/feature/mmu/mmu2.h b/Marlin/src/feature/mmu/mmu2.h index 4326989a74b0..95338a518410 100644 --- a/Marlin/src/feature/mmu/mmu2.h +++ b/Marlin/src/feature/mmu/mmu2.h @@ -43,9 +43,10 @@ class MMU2 { static void init(); static void reset(); + static inline bool enabled() { return _enabled; } static void mmu_loop(); static void tool_change(const uint8_t index); - static void tool_change(const char* special); + static void tool_change(const char *special); static uint8_t get_current_tool(); static void set_filament_type(const uint8_t index, const uint8_t type); @@ -56,10 +57,10 @@ class MMU2 { static bool eject_filament(const uint8_t index, const bool recover); private: - static bool rx_str_P(const char* str); - static void tx_str_P(const char* str); - static void tx_printf_P(const char* format, const int argument); - static void tx_printf_P(const char* format, const int argument1, const int argument2); + static bool rx_str_P(const char *str); + static void tx_str_P(const char *str); + static void tx_printf_P(const char *format, const int argument); + static void tx_printf_P(const char *format, const int argument1, const int argument2); static void clear_rx_buffer(); static bool rx_ok(); @@ -88,7 +89,7 @@ class MMU2 { static void mmu_continue_loading(); #endif - static bool enabled, ready, mmu_print_saved; + static bool _enabled, ready, mmu_print_saved; static uint8_t cmd, cmd_arg, last_cmd, extruder; static int8_t state; diff --git a/Marlin/src/feature/password/password.cpp b/Marlin/src/feature/password/password.cpp index 90bb647118b5..4e841c243cf0 100644 --- a/Marlin/src/feature/password/password.cpp +++ b/Marlin/src/feature/password/password.cpp @@ -31,7 +31,7 @@ Password password; // public: -bool Password::is_set, Password::is_locked; +bool Password::is_set, Password::is_locked, Password::did_first_run; // = false uint32_t Password::value, Password::value_entry; // @@ -47,11 +47,14 @@ void Password::lock_machine() { // Authentication check // void Password::authentication_check() { - if (value_entry == value) + if (value_entry == value) { is_locked = false; - else + did_first_run = true; + } + else { + is_locked = true; SERIAL_ECHOLNPGM(STR_WRONG_PASSWORD); - + } TERN_(HAS_LCD_MENU, authentication_done()); } diff --git a/Marlin/src/feature/password/password.h b/Marlin/src/feature/password/password.h index 1382d6df405f..829d222e20b9 100644 --- a/Marlin/src/feature/password/password.h +++ b/Marlin/src/feature/password/password.h @@ -25,10 +25,10 @@ class Password { public: - static bool is_set, is_locked; + static bool is_set, is_locked, did_first_run; static uint32_t value, value_entry; - Password() { is_locked = false; } + Password() {} static void lock_machine(); static void authentication_check(); diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 5ab4f2b146b9..d54326116ef8 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -53,6 +53,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif #include "../lcd/marlinui.h" @@ -75,7 +77,7 @@ static xyze_pos_t resume_position; -#if HAS_LCD_MENU +#if M600_PURGE_MORE_RESUMABLE PauseMenuResponse pause_menu_response; PauseMode pause_mode = PAUSE_MODE_PAUSE_PRINT; #endif @@ -130,7 +132,7 @@ fil_change_settings_t fc_settings[EXTRUDERS]; */ static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=PAUSE_MODE_SAME) { DEBUG_SECTION(est, "ensure_safe_temperature", true); - DEBUG_ECHOLNPAIR("... wait:", int(wait), " mode:", int(mode)); + DEBUG_ECHOLNPGM("... wait:", wait, " mode:", mode); #if ENABLED(PREVENT_COLD_EXTRUSION) if (!DEBUGGING(DRYRUN) && thermalManager.targetTooColdToExtrude(active_extruder)) @@ -143,7 +145,7 @@ static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=P // Allow interruption by Emergency Parser M108 wait_for_heatup = TERN1(PREVENT_COLD_EXTRUSION, !thermalManager.allow_cold_extrude); - while (wait_for_heatup && ABS(thermalManager.degHotend(active_extruder) - thermalManager.degTargetHotend(active_extruder)) > TEMP_WINDOW) + while (wait_for_heatup && ABS(thermalManager.wholeDegHotend(active_extruder) - thermalManager.degTargetHotend(active_extruder)) > (TEMP_WINDOW)) idle(); wait_for_heatup = false; @@ -170,13 +172,13 @@ static bool ensure_safe_temperature(const bool wait=true, const PauseMode mode=P * * Returns 'true' if load was completed, 'false' for abort */ -bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=0*/, const int8_t max_beep_count/*=0*/, +bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load_length/*=0*/, const_float_t purge_length/*=0*/, const int8_t max_beep_count/*=0*/, const bool show_lcd/*=false*/, const bool pause_for_user/*=false*/, const PauseMode mode/*=PAUSE_MODE_PAUSE_PRINT*/ DXC_ARGS ) { DEBUG_SECTION(lf, "load_filament", true); - DEBUG_ECHOLNPAIR("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", int(max_beep_count), " showlcd:", int(show_lcd), " pauseforuser:", int(pause_for_user), " pausemode:", int(mode) DXC_SAY); + DEBUG_ECHOLNPGM("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " showlcd:", show_lcd, " pauseforuser:", pause_for_user, " pausemode:", mode DXC_SAY); if (!ensure_safe_temperature(false, mode)) { if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_STATUS, mode); @@ -191,19 +193,26 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; // LCD click or M108 will clear this + + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Load Filament"))); + #if ENABLED(HOST_PROMPT_SUPPORT) - const char tool = '0' - #if NUM_RUNOUT_SENSORS > 1 - + active_extruder - #endif - ; + const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, active_extruder); host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Load Filament T"), tool, CONTINUE_STR); #endif - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Load Filament"))); - while (wait_for_user) { impatient_beep(max_beep_count); + #if BOTH(FILAMENT_CHANGE_RESUME_ON_INSERT, FILAMENT_RUNOUT_SENSOR) + #if ENABLED(MULTI_FILAMENT_SENSOR) + #define _CASE_INSERTED(N) case N-1: if (READ(FIL_RUNOUT##N##_PIN) != FIL_RUNOUT##N##_STATE) wait_for_user = false; break; + switch (active_extruder) { + REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_INSERTED) + } + #else + if (READ(FIL_RUNOUT_PIN) != FIL_RUNOUT_STATE) wait_for_user = false; + #endif + #endif idle_no_sleep(); } } @@ -216,6 +225,8 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l set_duplication_enabled(false, DXC_ext); #endif + TERN_(BELTPRINTER, do_blocking_move_to_xy(0.00, 50.00)); + // Slow Load filament if (slow_load_length) unscaled_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE); @@ -241,8 +252,9 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_PURGE); - TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Filament Purging..."), CONTINUE_STR)); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Filament Purging..."))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_PURGE))); + TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_FILAMENT_CHANGE_PURGE), CONTINUE_STR)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Popup_Confirm(ICON_BLTouch, GET_TEXT(MSG_FILAMENT_CHANGE_PURGE), CONTINUE_STR)); wait_for_user = true; // A click or M108 breaks the purge_length loop for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count) unscaled_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE); @@ -259,20 +271,24 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l unscaled_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE); } - TERN_(HOST_PROMPT_SUPPORT, filament_load_host_prompt()); // Initiate another host prompt. (NOTE: host_response_handler may also do this!) + TERN_(HOST_PROMPT_SUPPORT, filament_load_host_prompt()); // Initiate another host prompt. - #if HAS_LCD_MENU + #if M600_PURGE_MORE_RESUMABLE if (show_lcd) { // Show "Purge More" / "Resume" menu and wait for reply KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = false; - ui.pause_show_message(PAUSE_MESSAGE_OPTION); + #if EITHER(HAS_LCD_MENU, DWIN_CREALITY_LCD_ENHANCED) + ui.pause_show_message(PAUSE_MESSAGE_OPTION); // Also sets PAUSE_RESPONSE_WAIT_FOR + #else + pause_menu_response = PAUSE_RESPONSE_WAIT_FOR; + #endif while (pause_menu_response == PAUSE_RESPONSE_WAIT_FOR) idle_no_sleep(); } #endif // Keep looping if "Purge More" was selected - } while (TERN0(HAS_LCD_MENU, show_lcd && pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE)); + } while (TERN0(M600_PURGE_MORE_RESUMABLE, pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE)); #endif TERN_(HOST_PROMPT_SUPPORT, host_action_prompt_end()); @@ -286,8 +302,8 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l * send current back to their board, potentially frying it. */ inline void disable_active_extruder() { - #if HAS_E_STEPPER_ENABLE - disable_e_stepper(active_extruder); + #if HAS_EXTRUDERS + stepper.DISABLE_EXTRUDER(active_extruder); safe_delay(100); #endif } @@ -302,21 +318,21 @@ inline void disable_active_extruder() { * * Returns 'true' if unload was completed, 'false' for abort */ -bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/, +bool unload_filament(const_float_t unload_length, const bool show_lcd/*=false*/, const PauseMode mode/*=PAUSE_MODE_PAUSE_PRINT*/ #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) - , const float &mix_multiplier/*=1.0*/ + , const_float_t mix_multiplier/*=1.0*/ #endif ) { DEBUG_SECTION(uf, "unload_filament", true); - DEBUG_ECHOLNPAIR("... unloadlen:", unload_length, " showlcd:", int(show_lcd), " mode:", int(mode) + DEBUG_ECHOLNPGM("... unloadlen:", unload_length, " showlcd:", show_lcd, " mode:", mode #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) , " mixmult:", mix_multiplier #endif ); #if !BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) - constexpr float mix_multiplier = 1.0; + constexpr float mix_multiplier = 1.0f; #endif if (!ensure_safe_temperature(false, mode)) { @@ -371,9 +387,9 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/, */ uint8_t did_pause_print = 0; -bool pause_print(const float &retract, const xyz_pos_t &park_point, const float &unload_length/*=0*/, const bool show_lcd/*=false*/ DXC_ARGS) { +bool pause_print(const_float_t retract, const xyz_pos_t &park_point, const bool show_lcd/*=false*/, const_float_t unload_length/*=0*/ DXC_ARGS) { DEBUG_SECTION(pp, "pause_print", true); - DEBUG_ECHOLNPAIR("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", int(show_lcd) DXC_SAY); + DEBUG_ECHOLNPGM("... park.x:", park_point.x, " y:", park_point.y, " z:", park_point.z, " unloadlen:", unload_length, " showlcd:", show_lcd DXC_SAY); UNUSED(show_lcd); @@ -394,7 +410,8 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float // Pause the print job and timer #if ENABLED(SDSUPPORT) - if (IS_SD_PRINTING()) { + const bool was_sd_printing = IS_SD_PRINTING(); + if (was_sd_printing) { card.pauseSDPrint(); ++did_pause_print; // Indicate SD pause also } @@ -405,6 +422,15 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float // Save current position resume_position = current_position; + // Will the nozzle be parking? + const bool do_park = !axes_should_home(); + + #if ENABLED(POWER_LOSS_RECOVERY) + // Save PLR info in case the power goes out while parked + const float park_raise = do_park ? nozzle.park_mode_0_height(park_point.z) - current_position.z : POWER_LOSS_ZRAISE; + if (was_sd_printing && recovery.enabled) recovery.save(true, park_raise, do_park); + #endif + // Wait for buffered blocks to complete planner.synchronize(); @@ -414,13 +440,12 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float // Initial retract before move to filament change position if (retract && thermalManager.hotEnoughToExtrude(active_extruder)) { - DEBUG_ECHOLNPAIR("... retract:", retract); + DEBUG_ECHOLNPGM("... retract:", retract); unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE); } - // Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos) - if (!axes_should_home()) - nozzle.park(0, park_point); + // If axes don't need to home then the nozzle can park + if (do_park) nozzle.park(0, park_point); // Park the nozzle by doing a Minimum Z Raise followed by an XY Move #if ENABLED(DUAL_X_CARRIAGE) const int8_t saved_ext = active_extruder; @@ -428,7 +453,8 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float set_duplication_enabled(false, DXC_ext); #endif - if (unload_length) // Unload the filament + // Unload the filament, if specified + if (unload_length) unload_filament(unload_length, show_lcd, PAUSE_MODE_CHANGE_FILAMENT); #if ENABLED(DUAL_X_CARRIAGE) @@ -456,16 +482,16 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float void show_continue_prompt(const bool is_reload) { DEBUG_SECTION(scp, "pause_print", true); - DEBUG_ECHOLNPAIR("... is_reload:", int(is_reload)); + DEBUG_ECHOLNPGM("... is_reload:", is_reload); ui.pause_show_message(is_reload ? PAUSE_MESSAGE_INSERT : PAUSE_MESSAGE_WAITING); SERIAL_ECHO_START(); - serialprintPGM(is_reload ? PSTR(_PMSG(STR_FILAMENT_CHANGE_INSERT) "\n") : PSTR(_PMSG(STR_FILAMENT_CHANGE_WAIT) "\n")); + SERIAL_ECHOPGM_P(is_reload ? PSTR(_PMSG(STR_FILAMENT_CHANGE_INSERT) "\n") : PSTR(_PMSG(STR_FILAMENT_CHANGE_WAIT) "\n")); } void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep_count/*=0*/ DXC_ARGS) { DEBUG_SECTION(wfc, "wait_for_confirmation", true); - DEBUG_ECHOLNPAIR("... is_reload:", is_reload, " maxbeep:", int(max_beep_count) DXC_SAY); + DEBUG_ECHOLNPGM("... is_reload:", is_reload, " maxbeep:", max_beep_count DXC_SAY); bool nozzle_timed_out = false; @@ -506,12 +532,14 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_HEATER_TIMEOUT))); - wait_for_user_response(0, true); // Wait for LCD click or M108 + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(0, true)); // Wait for LCD click or M108 TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_INFO, GET_TEXT(MSG_REHEATING))); TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged_P(GET_TEXT(MSG_REHEATING))); + TERN_(DWIN_CREALITY_LCD_ENHANCED, ui.set_status_P(GET_TEXT(MSG_REHEATING))); + // Re-enable the heaters if they timed out HOTEND_LOOP() thermalManager.reset_hotend_idle_timer(e); @@ -525,11 +553,14 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep const millis_t nozzle_timeout = SEC_TO_MS(PAUSE_PARK_NOZZLE_TIMEOUT); HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout); - TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Reheat Done"), CONTINUE_STR)); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Reheat finished."))); - wait_for_user = true; - nozzle_timed_out = false; + TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_REHEATDONE), CONTINUE_STR)); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_REHEATDONE))); + TERN_(DWIN_CREALITY_LCD_ENHANCED, ui.set_status_P(GET_TEXT(MSG_REHEATDONE))); + + IF_DISABLED(PAUSE_REHEAT_FAST_RESUME, wait_for_user = true); + + nozzle_timed_out = false; first_impatient_beep(max_beep_count); } idle_no_sleep(); @@ -559,12 +590,12 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep * - Send host action for resume, if configured * - Resume the current SD print job, if any */ -void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_length/*=0*/, const float &purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/, int16_t targetTemp/*=0*/ DXC_ARGS) { +void resume_print(const_float_t slow_load_length/*=0*/, const_float_t fast_load_length/*=0*/, const_float_t purge_length/*=ADVANCED_PAUSE_PURGE_LENGTH*/, const int8_t max_beep_count/*=0*/, const celsius_t targetTemp/*=0*/ DXC_ARGS) { DEBUG_SECTION(rp, "resume_print", true); - DEBUG_ECHOLNPAIR("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", int(max_beep_count), " targetTemp:", targetTemp DXC_SAY); + DEBUG_ECHOLNPGM("... slowlen:", slow_load_length, " fastlen:", fast_load_length, " purgelen:", purge_length, " maxbeep:", max_beep_count, " targetTemp:", targetTemp DXC_SAY); /* - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "start of resume_print()\ndual_x_carriage_mode:", dual_x_carriage_mode, "\nextruder_duplication_enabled:", extruder_duplication_enabled, "\nactive_extruder:", active_extruder, @@ -581,9 +612,8 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le thermalManager.reset_hotend_idle_timer(e); } - if (targetTemp > thermalManager.degTargetHotend(active_extruder)) { + if (targetTemp > thermalManager.degTargetHotend(active_extruder)) thermalManager.setTargetHotend(targetTemp, active_extruder); - } // Load the new filament load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out, PAUSE_MODE_SAME DXC_PASS); @@ -596,17 +626,19 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le ui.pause_show_message(PAUSE_MESSAGE_RESUME); // Check Temperature before moving hotend - ensure_safe_temperature(); + ensure_safe_temperature(DISABLED(BELTPRINTER)); // Retract to prevent oozing unscaled_e_move(-(PAUSE_PARK_RETRACT_LENGTH), feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE)); if (!axes_should_home()) { - // Move XY to starting position, then Z - do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE)); + // Move XY back to saved position + destination.set(resume_position.x, resume_position.y, current_position.z, current_position.e); + prepare_internal_move_to_destination(NOZZLE_PARK_XY_FEEDRATE); - // Move Z_AXIS to saved position - do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE)); + // Move Z back to saved position + destination.z = resume_position.z; + prepare_internal_move_to_destination(NOZZLE_PARK_Z_FEEDRATE); } // Unretract @@ -629,9 +661,6 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le // Set extruder to saved position planner.set_e_position_mm((destination.e = current_position.e = resume_position.e)); - // Write PLR now to update the z axis value - TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true)); - ui.pause_show_message(PAUSE_MESSAGE_STATUS); #ifdef ACTION_ON_RESUMED @@ -644,8 +673,16 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_INFO, PSTR("Resuming"), DISMISS_STR)); + // Resume the print job timer if it was running + if (print_job_timer.isPaused()) print_job_timer.start(); + #if ENABLED(SDSUPPORT) - if (did_pause_print) { card.startFileprint(); --did_pause_print; } + if (did_pause_print) { + --did_pause_print; + card.startOrResumeFilePrinting(); + // Write PLR now to update the z axis value + TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true)); + } #endif #if ENABLED(ADVANCED_PAUSE_FANS_PAUSE) && HAS_FAN @@ -654,11 +691,9 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le TERN_(HAS_FILAMENT_SENSOR, runout.reset()); - // Resume the print job timer if it was running - if (print_job_timer.isPaused()) print_job_timer.start(); - - TERN_(HAS_DISPLAY, ui.reset_status()); + TERN_(HAS_STATUS_MESSAGE, ui.reset_status()); TERN_(HAS_LCD_MENU, ui.return_to_status()); + TERN_(DWIN_CREALITY_LCD_ENHANCED, HMI_ReturnScreen()); } #endif // ADVANCED_PAUSE_FEATURE diff --git a/Marlin/src/feature/pause.h b/Marlin/src/feature/pause.h index 7e58d4564ebb..d2c45e44a5df 100644 --- a/Marlin/src/feature/pause.h +++ b/Marlin/src/feature/pause.h @@ -59,7 +59,7 @@ enum PauseMessage : char { PAUSE_MESSAGE_HEATING }; -#if HAS_LCD_MENU +#if M600_PURGE_MORE_RESUMABLE enum PauseMenuResponse : char { PAUSE_RESPONSE_WAIT_FOR, PAUSE_RESPONSE_EXTRUDE_MORE, @@ -85,19 +85,47 @@ extern uint8_t did_pause_print; #define DXC_SAY #endif -bool pause_print(const float &retract, const xyz_pos_t &park_point, const float &unload_length=0, const bool show_lcd=false DXC_PARAMS); +// Pause the print. If unload_length is set, do a Filament Unload +bool pause_print( + const_float_t retract, // (mm) Retraction length + const xyz_pos_t &park_point, // Parking XY Position and Z Raise + const bool show_lcd=false, // Set LCD status messages? + const_float_t unload_length=0 // (mm) Filament Change Unload Length - 0 to skip + DXC_PARAMS // Dual-X-Carriage extruder index +); -void wait_for_confirmation(const bool is_reload=false, const int8_t max_beep_count=0 DXC_PARAMS); +void wait_for_confirmation( + const bool is_reload=false, // Reload Filament? (otherwise Resume Print) + const int8_t max_beep_count=0 // Beep alert for attention + DXC_PARAMS // Dual-X-Carriage extruder index +); -void resume_print(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, - const int8_t max_beep_count=0, int16_t targetTemp=0 DXC_PARAMS); +void resume_print( + const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move + const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move + const_float_t extrude_length=ADVANCED_PAUSE_PURGE_LENGTH, // (mm) Purge length + const int8_t max_beep_count=0, // Beep alert for attention + const celsius_t targetTemp=0 // (°C) A target temperature for the hotend + DXC_PARAMS // Dual-X-Carriage extruder index +); -bool load_filament(const float &slow_load_length=0, const float &fast_load_length=0, const float &extrude_length=0, const int8_t max_beep_count=0, - const bool show_lcd=false, const bool pause_for_user=false, const PauseMode mode=PAUSE_MODE_PAUSE_PRINT DXC_PARAMS); +bool load_filament( + const_float_t slow_load_length=0, // (mm) Slow Load Length for finishing move + const_float_t fast_load_length=0, // (mm) Fast Load Length for initial move + const_float_t extrude_length=0, // (mm) Purge length + const int8_t max_beep_count=0, // Beep alert for attention + const bool show_lcd=false, // Set LCD status messages? + const bool pause_for_user=false, // Pause for user before returning? + const PauseMode mode=PAUSE_MODE_PAUSE_PRINT // Pause Mode to apply + DXC_PARAMS // Dual-X-Carriage extruder index +); -bool unload_filament(const float &unload_length, const bool show_lcd=false, const PauseMode mode=PAUSE_MODE_PAUSE_PRINT +bool unload_filament( + const_float_t unload_length, // (mm) Filament Unload Length - 0 to skip + const bool show_lcd=false, // Set LCD status messages? + const PauseMode mode=PAUSE_MODE_PAUSE_PRINT // Pause Mode to apply #if BOTH(FILAMENT_UNLOAD_ALL_EXTRUDERS, MIXING_EXTRUDER) - , const float &mix_multiplier=1.0 + , const_float_t mix_multiplier=1.0f // Extrusion multiplier (for a Mixing Extruder) #endif ); diff --git a/Marlin/src/feature/power.cpp b/Marlin/src/feature/power.cpp index d22247b46df4..8116bd2e446d 100644 --- a/Marlin/src/feature/power.cpp +++ b/Marlin/src/feature/power.cpp @@ -26,112 +26,181 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(AUTO_POWER_CONTROL) - #include "power.h" -#include "../module/temperature.h" -#include "../module/stepper/indirection.h" +#include "../module/stepper.h" #include "../MarlinCore.h" +#if ENABLED(PS_OFF_SOUND) + #include "../libs/buzzer.h" +#endif + #if defined(PSU_POWERUP_GCODE) || defined(PSU_POWEROFF_GCODE) #include "../gcode/gcode.h" #endif -#if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) - #include "controllerfan.h" -#endif +#if EITHER(PSU_CONTROL, AUTO_POWER_CONTROL) Power powerManager; +bool Power::psu_on; -millis_t Power::lastPowerOn; +#if ENABLED(AUTO_POWER_CONTROL) + #include "../module/temperature.h" -bool Power::is_power_needed() { - #if ENABLED(AUTO_POWER_FANS) - FANS_LOOP(i) if (thermalManager.fan_speed[i]) return true; + #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) + #include "controllerfan.h" #endif - #if ENABLED(AUTO_POWER_E_FANS) - HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true; + millis_t Power::lastPowerOn; +#endif + +/** + * Initialize pins & state for the power manager. + * + */ +void Power::init() { + psu_on = ENABLED(PSU_DEFAULT_OFF); // Set opposite state to get full power_off/on + TERN(PSU_DEFAULT_OFF, power_off(), power_on()); +} + +/** + * Power on if the power is currently off. + * Restores stepper drivers and processes any PSU_POWERUP_GCODE. + * + */ +void Power::power_on() { + #if ENABLED(AUTO_POWER_CONTROL) + const millis_t now = millis(); + lastPowerOn = now + !now; #endif - #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) - if (controllerFan.state()) return true; + if (psu_on) return; + + OUT_WRITE(PS_ON_PIN, PSU_ACTIVE_STATE); + psu_on = true; + safe_delay(PSU_POWERUP_DELAY); + restore_stepper_drivers(); + TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY)); + + #ifdef PSU_POWERUP_GCODE + GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWERUP_GCODE)); #endif +} - if (TERN0(AUTO_POWER_CHAMBER_FAN, thermalManager.chamberfan_speed)) - return true; +/** + * Power off if the power is currently on. + * Processes any PSU_POWEROFF_GCODE and makes a PS_OFF_SOUND if enabled. + * + */ +void Power::power_off() { + if (!psu_on) return; - // If any of the drivers or the bed are enabled... - if (X_ENABLE_READ() == X_ENABLE_ON || Y_ENABLE_READ() == Y_ENABLE_ON || Z_ENABLE_READ() == Z_ENABLE_ON - #if HAS_X2_ENABLE - || X2_ENABLE_READ() == X_ENABLE_ON - #endif - #if HAS_Y2_ENABLE - || Y2_ENABLE_READ() == Y_ENABLE_ON + #ifdef PSU_POWEROFF_GCODE + GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE)); + #endif + + #if ENABLED(PS_OFF_SOUND) + BUZZ(1000, 659); + #endif + + OUT_WRITE(PS_ON_PIN, !PSU_ACTIVE_STATE); + psu_on = false; +} + + +#if ENABLED(AUTO_POWER_CONTROL) + + #ifndef POWER_TIMEOUT + #define POWER_TIMEOUT 0 + #endif + + /** + * Check all conditions that would signal power needing to be on. + * + * @returns bool if power is needed + */ + bool Power::is_power_needed() { + + // If any of the stepper drivers are enabled... + if (stepper.axis_enabled.bits) return true; + + if (printJobOngoing() || printingIsPaused()) return true; + + #if ENABLED(AUTO_POWER_FANS) + FANS_LOOP(i) if (thermalManager.fan_speed[i]) return true; #endif - #if HAS_Z2_ENABLE - || Z2_ENABLE_READ() == Z_ENABLE_ON + + #if ENABLED(AUTO_POWER_E_FANS) + HOTEND_LOOP() if (thermalManager.autofan_speed[e]) return true; #endif - #if E_STEPPERS - #define _OR_ENABLED_E(N) || E##N##_ENABLE_READ() == E_ENABLE_ON - REPEAT(E_STEPPERS, _OR_ENABLED_E) + + #if BOTH(USE_CONTROLLER_FAN, AUTO_POWER_CONTROLLERFAN) + if (controllerFan.state()) return true; #endif - ) return true; - HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true; - if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true; + if (TERN0(AUTO_POWER_CHAMBER_FAN, thermalManager.chamberfan_speed)) + return true; - #if HAS_HOTEND && AUTO_POWER_E_TEMP - HOTEND_LOOP() if (thermalManager.degHotend(e) >= AUTO_POWER_E_TEMP) return true; - #endif + if (TERN0(AUTO_POWER_COOLER_FAN, thermalManager.coolerfan_speed)) + return true; - #if HAS_HEATED_CHAMBER && AUTO_POWER_CHAMBER_TEMP - if (thermalManager.degChamber() >= AUTO_POWER_CHAMBER_TEMP) return true; - #endif + #if HAS_HOTEND + HOTEND_LOOP() if (thermalManager.degTargetHotend(e) > 0 || thermalManager.temp_hotend[e].soft_pwm_amount > 0) return true; + #endif - return false; -} + if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed() > 0 || thermalManager.temp_bed.soft_pwm_amount > 0)) return true; -void Power::check() { - static millis_t nextPowerCheck = 0; - millis_t ms = millis(); - if (ELAPSED(ms, nextPowerCheck)) { - nextPowerCheck = ms + 2500UL; - if (is_power_needed()) - power_on(); - else if (!lastPowerOn || ELAPSED(ms, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT))) - power_off(); - } -} + #if HAS_HOTEND && AUTO_POWER_E_TEMP + HOTEND_LOOP() if (thermalManager.degHotend(e) >= (AUTO_POWER_E_TEMP)) return true; + #endif -void Power::power_on() { - lastPowerOn = millis(); - if (!powersupply_on) { - PSU_PIN_ON(); - safe_delay(PSU_POWERUP_DELAY); - restore_stepper_drivers(); - TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY)); - #ifdef PSU_POWERUP_GCODE - GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWERUP_GCODE)); + #if HAS_HEATED_CHAMBER && AUTO_POWER_CHAMBER_TEMP + if (thermalManager.degChamber() >= (AUTO_POWER_CHAMBER_TEMP)) return true; + #endif + + #if HAS_COOLER && AUTO_POWER_COOLER_TEMP + if (thermalManager.degCooler() >= (AUTO_POWER_COOLER_TEMP)) return true; #endif + + return false; } -} -void Power::power_off() { - if (powersupply_on) { - #ifdef PSU_POWEROFF_GCODE - GcodeSuite::process_subcommands_now_P(PSTR(PSU_POWEROFF_GCODE)); + /** + * Check if we should power off automatically (POWER_TIMEOUT elapsed, !is_power_needed). + * + * @param pause pause the 'timer' + */ + void Power::check(const bool pause) { + static millis_t nextPowerCheck = 0; + const millis_t now = millis(); + #if POWER_TIMEOUT > 0 + static bool _pause = false; + if (pause != _pause) { + lastPowerOn = now + !now; + _pause = pause; + } + if (pause) return; #endif - PSU_PIN_OFF(); + if (ELAPSED(now, nextPowerCheck)) { + nextPowerCheck = now + 2500UL; + if (is_power_needed()) + power_on(); + else if (!lastPowerOn || (POWER_TIMEOUT > 0 && ELAPSED(now, lastPowerOn + SEC_TO_MS(POWER_TIMEOUT)))) + power_off(); + } } -} -void Power::power_off_soon() { - #if POWER_OFF_DELAY - lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_DELAY); - #else - power_off(); + #if POWER_OFF_DELAY > 0 + + /** + * Power off with a delay. Power off is triggered by check() after the delay. + * + */ + void Power::power_off_soon() { + lastPowerOn = millis() - SEC_TO_MS(POWER_TIMEOUT) + SEC_TO_MS(POWER_OFF_DELAY); + } + #endif -} #endif // AUTO_POWER_CONTROL + +#endif // PSU_CONTROL || AUTO_POWER_CONTROL diff --git a/Marlin/src/feature/power.h b/Marlin/src/feature/power.h index 2462b9231b92..7f5a97e6df83 100644 --- a/Marlin/src/feature/power.h +++ b/Marlin/src/feature/power.h @@ -25,17 +25,32 @@ * power.h - power control */ -#include "../core/millis_t.h" +#if ENABLED(AUTO_POWER_CONTROL) + #include "../core/millis_t.h" +#endif class Power { public: - static void check(); + static bool psu_on; + + static void init(); static void power_on(); static void power_off(); + + #if ENABLED(AUTO_POWER_CONTROL) && POWER_OFF_DELAY > 0 static void power_off_soon(); - private: - static millis_t lastPowerOn; - static bool is_power_needed(); + #else + static inline void power_off_soon() { power_off(); } + #endif + + #if ENABLED(AUTO_POWER_CONTROL) + static void check(const bool pause); + + private: + static millis_t lastPowerOn; + static bool is_power_needed(); + + #endif }; extern Power powerManager; diff --git a/Marlin/src/feature/power_monitor.cpp b/Marlin/src/feature/power_monitor.cpp index 97c4a933637e..1937a54102a8 100644 --- a/Marlin/src/feature/power_monitor.cpp +++ b/Marlin/src/feature/power_monitor.cpp @@ -26,8 +26,11 @@ #include "power_monitor.h" -#include "../lcd/marlinui.h" -#include "../lcd/lcdprint.h" +#if HAS_LCD_MENU + #include "../lcd/marlinui.h" + #include "../lcd/lcdprint.h" +#endif + #include "../libs/numtostr.h" uint8_t PowerMonitor::flags; // = 0 @@ -54,7 +57,7 @@ PowerMonitor power_monitor; // Single instance - this calls the constructor } #endif - #if HAS_POWER_MONITOR_VREF + #if ENABLED(POWER_MONITOR_VOLTAGE) void PowerMonitor::draw_voltage() { const float volts = getVolts(); lcd_put_u8str(volts < 100 ? ftostr31ns(volts) : ui16tostr4rj((uint16_t)volts)); diff --git a/Marlin/src/feature/power_monitor.h b/Marlin/src/feature/power_monitor.h index f378ee2a107c..f6e0b292e30c 100644 --- a/Marlin/src/feature/power_monitor.h +++ b/Marlin/src/feature/power_monitor.h @@ -23,7 +23,7 @@ #include "../inc/MarlinConfig.h" -#define PM_SAMPLE_RANGE 1024 +#define PM_SAMPLE_RANGE HAL_ADC_RANGE #define PM_K_VALUE 6 #define PM_K_SCALE 6 @@ -35,7 +35,7 @@ struct pm_lpf_t { filter_buf = filter_buf - (filter_buf >> K_VALUE) + (uint32_t(sample) << K_SCALE); } void capture() { - value = filter_buf * (SCALE * (1.0f / (1UL << (PM_K_VALUE + PM_K_SCALE)))) + (POWER_MONITOR_CURRENT_OFFSET); + value = filter_buf * (SCALE * (1.0f / (1UL << (PM_K_VALUE + PM_K_SCALE)))); } void reset(uint16_t reset_value = 0) { filter_buf = uint32_t(reset_value) << (K_VALUE + K_SCALE); @@ -69,19 +69,15 @@ class PowerMonitor { }; #if ENABLED(POWER_MONITOR_CURRENT) - FORCE_INLINE static float getAmps() { return amps.value; } + FORCE_INLINE static float getAmps() { return amps.value + (POWER_MONITOR_CURRENT_OFFSET); } void add_current_sample(const uint16_t value) { amps.add_sample(value); } #endif - #if HAS_POWER_MONITOR_VREF - #if ENABLED(POWER_MONITOR_VOLTAGE) - FORCE_INLINE static float getVolts() { return volts.value; } - #else - FORCE_INLINE static float getVolts() { return POWER_MONITOR_FIXED_VOLTAGE; } // using a specified fixed valtage as the voltage measurement - #endif - #if ENABLED(POWER_MONITOR_VOLTAGE) - void add_voltage_sample(const uint16_t value) { volts.add_sample(value); } - #endif + #if ENABLED(POWER_MONITOR_VOLTAGE) + FORCE_INLINE static float getVolts() { return volts.value + (POWER_MONITOR_VOLTAGE_OFFSET); } + void add_voltage_sample(const uint16_t value) { volts.add_sample(value); } + #else + FORCE_INLINE static float getVolts() { return POWER_MONITOR_FIXED_VOLTAGE; } #endif #if HAS_POWER_MONITOR_WATTS @@ -98,7 +94,7 @@ class PowerMonitor { FORCE_INLINE static void set_current_display(const bool b) { SET_BIT_TO(flags, PM_DISP_BIT_I, b); } FORCE_INLINE static void toggle_current_display() { TBI(flags, PM_DISP_BIT_I); } #endif - #if HAS_POWER_MONITOR_VREF + #if ENABLED(POWER_MONITOR_VOLTAGE) static void draw_voltage(); FORCE_INLINE static bool voltage_display_enabled() { return TEST(flags, PM_DISP_BIT_V); } FORCE_INLINE static void set_voltage_display(const bool b) { SET_BIT_TO(flags, PM_DISP_BIT_V, b); } diff --git a/Marlin/src/feature/powerloss.cpp b/Marlin/src/feature/powerloss.cpp index be35ff8511e7..8db31daa4033 100644 --- a/Marlin/src/feature/powerloss.cpp +++ b/Marlin/src/feature/powerloss.cpp @@ -40,7 +40,7 @@ uint8_t PrintJobRecovery::queue_index_r; uint32_t PrintJobRecovery::cmd_sdpos, // = 0 PrintJobRecovery::sdpos[BUFSIZE]; -#if ENABLED(DWIN_CREALITY_LCD) +#if HAS_DWIN_E3V2_BASIC bool PrintJobRecovery::dwin_flag; // = false #endif @@ -66,9 +66,6 @@ PrintJobRecovery recovery; #ifndef POWER_LOSS_PURGE_LEN #define POWER_LOSS_PURGE_LEN 0 #endif -#ifndef POWER_LOSS_ZRAISE - #define POWER_LOSS_ZRAISE 2 // Move on loss with backup power, or on resume without it -#endif #if DISABLED(BACKUP_POWER_SUPPLY) #undef POWER_LOSS_RETRACT_LEN // No retract at outage without backup power @@ -140,14 +137,16 @@ void PrintJobRecovery::load() { * Set info fields that won't change */ void PrintJobRecovery::prepare() { - card.getAbsFilename(info.sd_filename); // SD filename + card.getAbsFilenameInCWD(info.sd_filename); // SD filename cmd_sdpos = 0; } /** * Save the current machine state to the power-loss recovery file */ -void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/) { +void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=POWER_LOSS_ZRAISE*/, const bool raised/*=false*/) { + + // We don't check IS_SD_PRINTING here so a save may occur during a pause #if SAVE_INFO_INTERVAL_MS > 0 static millis_t next_save_ms; // = 0 @@ -182,17 +181,15 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/ info.current_position = current_position; info.feedrate = uint16_t(MMS_TO_MMM(feedrate_mm_s)); info.zraise = zraise; + info.flag.raised = raised; // Was Z raised before power-off? TERN_(GCODE_REPEAT_MARKERS, info.stored_repeat = repeat); TERN_(HAS_HOME_OFFSET, info.home_offset = home_offset); TERN_(HAS_POSITION_SHIFT, info.position_shift = position_shift); - - #if HAS_MULTI_EXTRUDER - info.active_extruder = active_extruder; - #endif + E_TERN_(info.active_extruder = active_extruder); #if DISABLED(NO_VOLUMETRICS) - info.volumetric_enabled = parser.volumetric_enabled; + info.flag.volumetric_enabled = parser.volumetric_enabled; #if HAS_MULTI_EXTRUDER for (int8_t e = 0; e < EXTRUDERS; e++) info.filament_size[e] = planner.filament_size[e]; #else @@ -200,11 +197,11 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/ #endif #endif - #if EXTRUDERS - HOTEND_LOOP() info.target_temperature[e] = thermalManager.temp_hotend[e].target; + #if HAS_EXTRUDERS + HOTEND_LOOP() info.target_temperature[e] = thermalManager.degTargetHotend(e); #endif - TERN_(HAS_HEATED_BED, info.target_temperature_bed = thermalManager.temp_bed.target); + TERN_(HAS_HEATED_BED, info.target_temperature_bed = thermalManager.degTargetBed()); #if HAS_FAN COPY(info.fan_speed, thermalManager.fan_speed); @@ -240,7 +237,7 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/ #if ENABLED(BACKUP_POWER_SUPPLY) - void PrintJobRecovery::retract_and_lift(const float &zraise) { + void PrintJobRecovery::retract_and_lift(const_float_t zraise) { #if POWER_LOSS_RETRACT_LEN || POWER_LOSS_ZRAISE gcode.set_relative_mode(true); // Use relative coordinates @@ -254,7 +251,7 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/ // Raise the Z axis now if (zraise) { char cmd[20], str_1[16]; - sprintf_P(cmd, PSTR("G0 Z%s"), dtostrf(zraise, 1, 3, str_1)); + sprintf_P(cmd, PSTR("G0Z%s"), dtostrf(zraise, 1, 3, str_1)); gcode.process_subcommands_now(cmd); } #else @@ -290,8 +287,9 @@ void PrintJobRecovery::save(const bool force/*=false*/, const float zraise/*=0*/ constexpr float zraise = 0; #endif - // Save, including the limited Z raise - if (IS_SD_PRINTING()) save(true, zraise); + // Save the current position, distance that Z was (or should be) raised, + // and a flag whether the raise was already done here. + if (IS_SD_PRINTING()) save(true, zraise, ENABLED(BACKUP_POWER_SUPPLY)); // Disable all heaters to reduce power loss thermalManager.disable_all_heaters(); @@ -343,60 +341,107 @@ void PrintJobRecovery::resume() { #endif #if HAS_HEATED_BED - const int16_t bt = info.target_temperature_bed; + const celsius_t bt = info.target_temperature_bed; if (bt) { // Restore the bed temperature - sprintf_P(cmd, PSTR("M190 S%i"), bt); + sprintf_P(cmd, PSTR("M190S%i"), bt); gcode.process_subcommands_now(cmd); } #endif - // Restore all hotend temperatures + // Heat hotend enough to soften material #if HAS_HOTEND HOTEND_LOOP() { - const int16_t et = info.target_temperature[e]; + const celsius_t et = _MAX(info.target_temperature[e], 180); if (et) { #if HAS_MULTI_HOTEND - sprintf_P(cmd, PSTR("T%i S"), e); + sprintf_P(cmd, PSTR("T%iS"), e); gcode.process_subcommands_now(cmd); #endif - sprintf_P(cmd, PSTR("M109 S%i"), et); + sprintf_P(cmd, PSTR("M109S%i"), et); gcode.process_subcommands_now(cmd); } } #endif - // Reset E, raise Z, home XY... - #if Z_HOME_DIR > 0 + // Interpret the saved Z according to flags + const float z_print = info.current_position.z, + z_raised = z_print + info.zraise; + + // + // Home the axes that can safely be homed, and + // establish the current position as best we can. + // + + gcode.process_subcommands_now_P(PSTR("G92.9E0")); // Reset E to 0 - // If Z homing goes to max, just reset E and home all - gcode.process_subcommands_now_P(PSTR( - "G92.9 E0\n" - "G28R0" - )); + #if Z_HOME_TO_MAX - #else // "G92.9 E0 ..." + float z_now = z_raised; - // If a Z raise occurred at outage restore Z, otherwise raise Z now - sprintf_P(cmd, PSTR("G92.9 E0 " TERN(BACKUP_POWER_SUPPLY, "Z%s", "Z0\nG1Z%s")), dtostrf(info.zraise, 1, 3, str_1)); + // If Z homing goes to max then just move back to the "raised" position + sprintf_P(cmd, PSTR( + "G28R0\n" // Home all axes (no raise) + "G1Z%sF1200" // Move Z down to (raised) height + ), dtostrf(z_now, 1, 3, str_1)); gcode.process_subcommands_now(cmd); - // Home safely with no Z raise - gcode.process_subcommands_now_P(PSTR( - "G28R0" // No raise during G28 - #if IS_CARTESIAN && DISABLED(POWER_LOSS_RECOVER_ZHOME) - "XY" // Don't home Z on Cartesian unless overridden - #endif - )); + #elif DISABLED(BELTPRINTER) + + #if ENABLED(POWER_LOSS_RECOVER_ZHOME) && defined(POWER_LOSS_ZHOME_POS) + #define HOMING_Z_DOWN 1 + #else + #define HOME_XY_ONLY 1 + #endif + + float z_now = info.flag.raised ? z_raised : z_print; + + // Reset E to 0 and set Z to the real position + #if HOME_XY_ONLY + sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 3, str_1)); + gcode.process_subcommands_now(cmd); + #endif + + // Does Z need to be raised now? It should be raised before homing XY. + if (z_raised > z_now) { + z_now = z_raised; + sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1)); + gcode.process_subcommands_now(cmd); + } + + // Home XY with no Z raise, and also home Z here if Z isn't homing down below. + gcode.process_subcommands_now_P(PSTR("G28R0" TERN_(HOME_XY_ONLY, "XY"))); // No raise during G28 #endif - // Pretend that all axes are homed + #if HOMING_Z_DOWN + // Move to a safe XY position and home Z while avoiding the print. + constexpr xy_pos_t p = POWER_LOSS_ZHOME_POS; + sprintf_P(cmd, PSTR("G1X%sY%sF1000\nG28Z"), dtostrf(p.x, 1, 3, str_1), dtostrf(p.y, 1, 3, str_2)); + gcode.process_subcommands_now(cmd); + #endif + + // Mark all axes as having been homed (no effect on current_position) set_all_homed(); + #if HAS_LEVELING + // Restore Z fade and possibly re-enable bed leveling compensation. + // Leveling may already be enabled due to the ENABLE_LEVELING_AFTER_G28 option. + // TODO: Add a G28 parameter to leave leveling disabled. + sprintf_P(cmd, PSTR("M420S%cZ%s"), '0' + (char)info.flag.leveling, dtostrf(info.fade, 1, 1, str_1)); + gcode.process_subcommands_now(cmd); + + #if HOME_XY_ONLY + // The physical Z was adjusted at power-off so undo the M420S1 correction to Z with G92.9. + sprintf_P(cmd, PSTR("G92.9Z%s"), dtostrf(z_now, 1, 1, str_1)); + gcode.process_subcommands_now(cmd); + #endif + #endif + #if ENABLED(POWER_LOSS_RECOVER_ZHOME) - // Z has been homed so restore Z to ZsavedPos + POWER_LOSS_ZRAISE - sprintf_P(cmd, PSTR("G1 F500 Z%s"), dtostrf(info.current_position.z + POWER_LOSS_ZRAISE, 1, 3, str_1)); + // Z was homed down to the bed, so move up to the raised height. + z_now = z_raised; + sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_now, 1, 3, str_1)); gcode.process_subcommands_now(cmd); #endif @@ -404,23 +449,38 @@ void PrintJobRecovery::resume() { #if DISABLED(NO_VOLUMETRICS) #if HAS_MULTI_EXTRUDER for (int8_t e = 0; e < EXTRUDERS; e++) { - sprintf_P(cmd, PSTR("M200 T%i D%s"), e, dtostrf(info.filament_size[e], 1, 3, str_1)); + sprintf_P(cmd, PSTR("M200T%iD%s"), e, dtostrf(info.filament_size[e], 1, 3, str_1)); gcode.process_subcommands_now(cmd); } - if (!info.volumetric_enabled) { - sprintf_P(cmd, PSTR("M200 T%i D0"), info.active_extruder); + if (!info.flag.volumetric_enabled) { + sprintf_P(cmd, PSTR("M200T%iD0"), info.active_extruder); gcode.process_subcommands_now(cmd); } #else - if (info.volumetric_enabled) { - sprintf_P(cmd, PSTR("M200 D%s"), dtostrf(info.filament_size[0], 1, 3, str_1)); + if (info.flag.volumetric_enabled) { + sprintf_P(cmd, PSTR("M200D%s"), dtostrf(info.filament_size[0], 1, 3, str_1)); gcode.process_subcommands_now(cmd); } #endif #endif - // Select the previously active tool (with no_move) - #if HAS_MULTI_EXTRUDER + // Restore all hotend temperatures + #if HAS_HOTEND + HOTEND_LOOP() { + const celsius_t et = info.target_temperature[e]; + if (et) { + #if HAS_MULTI_HOTEND + sprintf_P(cmd, PSTR("T%iS"), e); + gcode.process_subcommands_now(cmd); + #endif + sprintf_P(cmd, PSTR("M109S%i"), et); + gcode.process_subcommands_now(cmd); + } + } + #endif + + // Restore the previously active tool (with no_move) + #if HAS_MULTI_EXTRUDER || HAS_MULTI_HOTEND sprintf_P(cmd, PSTR("T%i S"), info.active_extruder); gcode.process_subcommands_now(cmd); #endif @@ -430,13 +490,13 @@ void PrintJobRecovery::resume() { FANS_LOOP(i) { const int f = info.fan_speed[i]; if (f) { - sprintf_P(cmd, PSTR("M106 P%i S%i"), i, f); + sprintf_P(cmd, PSTR("M106P%iS%i"), i, f); gcode.process_subcommands_now(cmd); } } #endif - // Restore retract and hop state + // Restore retract and hop state from an active `G10` command #if ENABLED(FWRETRACT) LOOP_L_N(e, EXTRUDERS) { if (info.retract[e] != 0.0) { @@ -447,27 +507,18 @@ void PrintJobRecovery::resume() { fwretract.current_hop = info.retract_hop; #endif - #if HAS_LEVELING - // Restore leveling state before 'G92 Z' to ensure - // the Z stepper count corresponds to the native Z. - if (info.fade || info.flag.leveling) { - sprintf_P(cmd, PSTR("M420 S%i Z%s"), int(info.flag.leveling), dtostrf(info.fade, 1, 1, str_1)); - gcode.process_subcommands_now(cmd); - } - #endif - #if ENABLED(GRADIENT_MIX) memcpy(&mixer.gradient, &info.gradient, sizeof(info.gradient)); #endif // Un-retract if there was a retract at outage - #if POWER_LOSS_RETRACT_LEN - gcode.process_subcommands_now_P(PSTR("G1 E" STRINGIFY(POWER_LOSS_RETRACT_LEN) " F3000")); + #if ENABLED(BACKUP_POWER_SUPPLY) && POWER_LOSS_RETRACT_LEN > 0 + gcode.process_subcommands_now_P(PSTR("G1E" STRINGIFY(POWER_LOSS_RETRACT_LEN) "F3000")); #endif - // Additional purge if configured + // Additional purge on resume if configured #if POWER_LOSS_PURGE_LEN - sprintf_P(cmd, PSTR("G1 E%d F200"), (POWER_LOSS_PURGE_LEN) + (POWER_LOSS_RETRACT_LEN)); + sprintf_P(cmd, PSTR("G1 E%d F3000"), (POWER_LOSS_PURGE_LEN) + (POWER_LOSS_RETRACT_LEN)); gcode.process_subcommands_now(cmd); #endif @@ -475,36 +526,30 @@ void PrintJobRecovery::resume() { gcode.process_subcommands_now_P(PSTR("G12")); #endif - // Move back to the saved XY - sprintf_P(cmd, PSTR("G1 X%s Y%s F3000"), + // Move back over to the saved XY + sprintf_P(cmd, PSTR("G1X%sY%sF3000"), dtostrf(info.current_position.x, 1, 3, str_1), dtostrf(info.current_position.y, 1, 3, str_2) ); gcode.process_subcommands_now(cmd); - // Move back to the saved Z - dtostrf(info.current_position.z, 1, 3, str_1); - #if Z_HOME_DIR > 0 || ENABLED(POWER_LOSS_RECOVER_ZHOME) - sprintf_P(cmd, PSTR("G1 Z%s F200"), str_1); - #else - gcode.process_subcommands_now_P(PSTR("G1 Z0 F200")); - sprintf_P(cmd, PSTR("G92.9 Z%s"), str_1); - #endif + // Move back down to the saved Z for printing + sprintf_P(cmd, PSTR("G1Z%sF600"), dtostrf(z_print, 1, 3, str_1)); gcode.process_subcommands_now(cmd); // Restore the feedrate - sprintf_P(cmd, PSTR("G1 F%d"), info.feedrate); + sprintf_P(cmd, PSTR("G1F%d"), info.feedrate); gcode.process_subcommands_now(cmd); // Restore E position with G92.9 - sprintf_P(cmd, PSTR("G92.9 E%s"), dtostrf(info.current_position.e, 1, 3, str_1)); + sprintf_P(cmd, PSTR("G92.9E%s"), dtostrf(info.current_position.e, 1, 3, str_1)); gcode.process_subcommands_now(cmd); TERN_(GCODE_REPEAT_MARKERS, repeat = info.stored_repeat); TERN_(HAS_HOME_OFFSET, home_offset = info.home_offset); TERN_(HAS_POSITION_SHIFT, position_shift = info.position_shift); #if HAS_HOME_OFFSET || HAS_POSITION_SHIFT - LOOP_XYZ(i) update_workspace_offset((AxisEnum)i); + LOOP_LINEAR_AXES(i) update_workspace_offset((AxisEnum)i); #endif // Relative axis modes @@ -522,7 +567,7 @@ void PrintJobRecovery::resume() { char *fn = info.sd_filename; sprintf_P(cmd, M23_STR, fn); gcode.process_subcommands_now(cmd); - sprintf_P(cmd, PSTR("M24 S%ld T%ld"), resume_sdpos, info.print_job_elapsed); + sprintf_P(cmd, PSTR("M24S%ldT%ld"), resume_sdpos, info.print_job_elapsed); gcode.process_subcommands_now(cmd); TERN_(DEBUG_POWER_LOSS_RECOVERY, marlin_debug_flags = old_flags); @@ -531,22 +576,30 @@ void PrintJobRecovery::resume() { #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) void PrintJobRecovery::debug(PGM_P const prefix) { - DEBUG_PRINT_P(prefix); - DEBUG_ECHOLNPAIR(" Job Recovery Info...\nvalid_head:", int(info.valid_head), " valid_foot:", int(info.valid_foot)); + DEBUG_ECHOPGM_P(prefix); + DEBUG_ECHOLNPGM(" Job Recovery Info...\nvalid_head:", info.valid_head, " valid_foot:", info.valid_foot); if (info.valid_head) { if (info.valid_head == info.valid_foot) { DEBUG_ECHOPGM("current_position: "); - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (i) DEBUG_CHAR(','); DEBUG_DECIMAL(info.current_position[i]); } DEBUG_EOL(); - DEBUG_ECHOLNPAIR("zraise: ", info.zraise); + DEBUG_ECHOLNPGM("feedrate: ", info.feedrate); + + DEBUG_ECHOLNPGM("zraise: ", info.zraise, " ", info.flag.raised ? "(before)" : ""); + + #if ENABLED(GCODE_REPEAT_MARKERS) + DEBUG_ECHOLNPGM("repeat index: ", info.stored_repeat.index); + LOOP_L_N(i, info.stored_repeat.index) + DEBUG_ECHOLNPGM("..... sdpos: ", info.stored_repeat.marker.sdpos, " count: ", info.stored_repeat.marker.counter); + #endif #if HAS_HOME_OFFSET DEBUG_ECHOPGM("home_offset: "); - LOOP_XYZ(i) { + LOOP_LINEAR_AXES(i) { if (i) DEBUG_CHAR(','); DEBUG_DECIMAL(info.home_offset[i]); } @@ -555,17 +608,21 @@ void PrintJobRecovery::resume() { #if HAS_POSITION_SHIFT DEBUG_ECHOPGM("position_shift: "); - LOOP_XYZ(i) { + LOOP_LINEAR_AXES(i) { if (i) DEBUG_CHAR(','); DEBUG_DECIMAL(info.position_shift[i]); } DEBUG_EOL(); #endif - DEBUG_ECHOLNPAIR("feedrate: ", info.feedrate); - #if HAS_MULTI_EXTRUDER - DEBUG_ECHOLNPAIR("active_extruder: ", int(info.active_extruder)); + DEBUG_ECHOLNPGM("active_extruder: ", info.active_extruder); + #endif + + #if DISABLED(NO_VOLUMETRICS) + DEBUG_ECHOPGM("filament_size:"); + LOOP_L_N(i, EXTRUDERS) DEBUG_ECHOLNPGM(" ", info.filament_size[i]); + DEBUG_EOL(); #endif #if HAS_HOTEND @@ -578,21 +635,22 @@ void PrintJobRecovery::resume() { #endif #if HAS_HEATED_BED - DEBUG_ECHOLNPAIR("target_temperature_bed: ", info.target_temperature_bed); + DEBUG_ECHOLNPGM("target_temperature_bed: ", info.target_temperature_bed); #endif #if HAS_FAN DEBUG_ECHOPGM("fan_speed: "); FANS_LOOP(i) { - DEBUG_ECHO(int(info.fan_speed[i])); + DEBUG_ECHO(info.fan_speed[i]); if (i < FAN_COUNT - 1) DEBUG_CHAR(','); } DEBUG_EOL(); #endif #if HAS_LEVELING - DEBUG_ECHOLNPAIR("leveling: ", int(info.flag.leveling), " fade: ", info.fade); + DEBUG_ECHOLNPGM("leveling: ", info.flag.leveling ? "ON" : "OFF", " fade: ", info.fade); #endif + #if ENABLED(FWRETRACT) DEBUG_ECHOPGM("retract: "); for (int8_t e = 0; e < EXTRUDERS; e++) { @@ -600,13 +658,30 @@ void PrintJobRecovery::resume() { if (e < EXTRUDERS - 1) DEBUG_CHAR(','); } DEBUG_EOL(); - DEBUG_ECHOLNPAIR("retract_hop: ", info.retract_hop); + DEBUG_ECHOLNPGM("retract_hop: ", info.retract_hop); + #endif + + // Mixing extruder and gradient + #if BOTH(MIXING_EXTRUDER, GRADIENT_MIX) + DEBUG_ECHOLNPGM("gradient: ", info.gradient.enabled ? "ON" : "OFF"); #endif - DEBUG_ECHOLNPAIR("sd_filename: ", info.sd_filename); - DEBUG_ECHOLNPAIR("sdpos: ", info.sdpos); - DEBUG_ECHOLNPAIR("print_job_elapsed: ", info.print_job_elapsed); - DEBUG_ECHOLNPAIR("dryrun: ", int(info.flag.dryrun)); - DEBUG_ECHOLNPAIR("allow_cold_extrusion: ", int(info.flag.allow_cold_extrusion)); + + DEBUG_ECHOLNPGM("sd_filename: ", info.sd_filename); + DEBUG_ECHOLNPGM("sdpos: ", info.sdpos); + DEBUG_ECHOLNPGM("print_job_elapsed: ", info.print_job_elapsed); + + DEBUG_ECHOPGM("axis_relative:"); + if (TEST(info.axis_relative, REL_X)) DEBUG_ECHOPGM(" REL_X"); + if (TEST(info.axis_relative, REL_Y)) DEBUG_ECHOPGM(" REL_Y"); + if (TEST(info.axis_relative, REL_Z)) DEBUG_ECHOPGM(" REL_Z"); + if (TEST(info.axis_relative, REL_E)) DEBUG_ECHOPGM(" REL_E"); + if (TEST(info.axis_relative, E_MODE_ABS)) DEBUG_ECHOPGM(" E_MODE_ABS"); + if (TEST(info.axis_relative, E_MODE_REL)) DEBUG_ECHOPGM(" E_MODE_REL"); + DEBUG_EOL(); + + DEBUG_ECHOLNPGM("flag.dryrun: ", AS_DIGIT(info.flag.dryrun)); + DEBUG_ECHOLNPGM("flag.allow_cold_extrusion: ", AS_DIGIT(info.flag.allow_cold_extrusion)); + DEBUG_ECHOLNPGM("flag.volumetric_enabled: ", AS_DIGIT(info.flag.volumetric_enabled)); } else DEBUG_ECHOLNPGM("INVALID DATA"); diff --git a/Marlin/src/feature/powerloss.h b/Marlin/src/feature/powerloss.h index 25581e17230d..6a13c92df797 100644 --- a/Marlin/src/feature/powerloss.h +++ b/Marlin/src/feature/powerloss.h @@ -42,6 +42,10 @@ #define POWER_LOSS_STATE HIGH #endif +#ifndef POWER_LOSS_ZRAISE + #define POWER_LOSS_ZRAISE 2 +#endif + //#define DEBUG_POWER_LOSS_RECOVERY //#define SAVE_EACH_CMD_MODE //#define SAVE_INFO_INTERVAL_MS 0 @@ -52,25 +56,41 @@ typedef struct { // Machine state xyze_pos_t current_position; uint16_t feedrate; + float zraise; // Repeat information - TERN_(GCODE_REPEAT_MARKERS, Repeat stored_repeat); + #if ENABLED(GCODE_REPEAT_MARKERS) + Repeat stored_repeat; + #endif - TERN_(HAS_HOME_OFFSET, xyz_pos_t home_offset); - TERN_(HAS_POSITION_SHIFT, xyz_pos_t position_shift); - TERN_(HAS_MULTI_EXTRUDER, uint8_t active_extruder); + #if HAS_HOME_OFFSET + xyz_pos_t home_offset; + #endif + #if HAS_POSITION_SHIFT + xyz_pos_t position_shift; + #endif + #if HAS_MULTI_EXTRUDER + uint8_t active_extruder; + #endif #if DISABLED(NO_VOLUMETRICS) - bool volumetric_enabled; float filament_size[EXTRUDERS]; #endif - TERN_(HAS_HOTEND, int16_t target_temperature[HOTENDS]); - TERN_(HAS_HEATED_BED, int16_t target_temperature_bed); - TERN_(HAS_FAN, uint8_t fan_speed[FAN_COUNT]); + #if HAS_HOTEND + celsius_t target_temperature[HOTENDS]; + #endif + #if HAS_HEATED_BED + celsius_t target_temperature_bed; + #endif + #if HAS_FAN + uint8_t fan_speed[FAN_COUNT]; + #endif - TERN_(HAS_LEVELING, float fade); + #if HAS_LEVELING + float fade; + #endif #if ENABLED(FWRETRACT) float retract[EXTRUDERS], retract_hop; @@ -80,7 +100,9 @@ typedef struct { #if ENABLED(MIXING_EXTRUDER) //uint_fast8_t selected_vtool; //mixer_comp_t color[NR_MIXING_VIRTUAL_TOOLS][MIXING_STEPPERS]; - TERN_(GRADIENT_MIX, gradient_t gradient); + #if ENABLED(GRADIENT_MIX) + gradient_t gradient; + #endif #endif // SD Filename and position @@ -95,9 +117,15 @@ typedef struct { // Misc. Marlin flags struct { + bool raised:1; // Raised before saved bool dryrun:1; // M111 S8 bool allow_cold_extrusion:1; // M302 P1 - TERN_(HAS_LEVELING, bool leveling:1); + #if HAS_LEVELING + bool leveling:1; // M420 S + #endif + #if DISABLED(NO_VOLUMETRICS) + bool volumetric_enabled:1; // M200 S D + #endif } flag; uint8_t valid_foot; @@ -117,7 +145,7 @@ class PrintJobRecovery { static uint32_t cmd_sdpos, //!< SD position of the next command sdpos[BUFSIZE]; //!< SD positions of queued commands - #if ENABLED(DWIN_CREALITY_LCD) + #if HAS_DWIN_E3V2_BASIC static bool dwin_flag; #endif @@ -155,12 +183,18 @@ class PrintJobRecovery { static inline void cancel() { purge(); IF_DISABLED(NO_SD_AUTOSTART, card.autofile_begin()); } static void load(); - static void save(const bool force=ENABLED(SAVE_EACH_CMD_MODE), const float zraise=0); + static void save(const bool force=ENABLED(SAVE_EACH_CMD_MODE), const float zraise=POWER_LOSS_ZRAISE, const bool raised=false); #if PIN_EXISTS(POWER_LOSS) static inline void outage() { - if (enabled && READ(POWER_LOSS_PIN) == POWER_LOSS_STATE) - _outage(); + static constexpr uint8_t OUTAGE_THRESHOLD = 3; + static uint8_t outage_counter = 0; + if (enabled && READ(POWER_LOSS_PIN) == POWER_LOSS_STATE) { + outage_counter++; + if (outage_counter >= OUTAGE_THRESHOLD) _outage(); + } + else + outage_counter = 0; } #endif @@ -179,7 +213,7 @@ class PrintJobRecovery { static void write(); #if ENABLED(BACKUP_POWER_SUPPLY) - static void retract_and_lift(const float &zraise); + static void retract_and_lift(const_float_t zraise); #endif #if PIN_EXISTS(POWER_LOSS) diff --git a/Marlin/src/feature/probe_temp_comp.cpp b/Marlin/src/feature/probe_temp_comp.cpp index af8039d8b110..deae44756811 100644 --- a/Marlin/src/feature/probe_temp_comp.cpp +++ b/Marlin/src/feature/probe_temp_comp.cpp @@ -24,6 +24,8 @@ #if ENABLED(PROBE_TEMP_COMPENSATION) +//#define DEBUG_PTC // Print extra debug output with 'M871' + #include "probe_temp_comp.h" #include @@ -38,21 +40,17 @@ int16_t ProbeTempComp::z_offsets_probe[cali_info_init[TSI_PROBE].measurements], int16_t *ProbeTempComp::sensor_z_offsets[TSI_COUNT] = { ProbeTempComp::z_offsets_probe, ProbeTempComp::z_offsets_bed - #if ENABLED(USE_TEMP_EXT_COMPENSATION) - , ProbeTempComp::z_offsets_ext - #endif + OPTARG(USE_TEMP_EXT_COMPENSATION, ProbeTempComp::z_offsets_ext) }; const temp_calib_t ProbeTempComp::cali_info[TSI_COUNT] = { cali_info_init[TSI_PROBE], cali_info_init[TSI_BED] - #if ENABLED(USE_TEMP_EXT_COMPENSATION) - , cali_info_init[TSI_EXT] - #endif + OPTARG(USE_TEMP_EXT_COMPENSATION, cali_info_init[TSI_EXT]) }; constexpr xyz_pos_t ProbeTempComp::park_point; constexpr xy_pos_t ProbeTempComp::measure_point; -constexpr int ProbeTempComp::probe_calib_bed_temp; +constexpr celsius_t ProbeTempComp::probe_calib_bed_temp; uint8_t ProbeTempComp::calib_idx; // = 0 float ProbeTempComp::init_measurement; // = 0.0 @@ -71,29 +69,37 @@ bool ProbeTempComp::set_offset(const TempSensorID tsi, const uint8_t idx, const void ProbeTempComp::print_offsets() { LOOP_L_N(s, TSI_COUNT) { - float temp = cali_info[s].start_temp; + celsius_t temp = cali_info[s].start_temp; for (int16_t i = -1; i < cali_info[s].measurements; ++i) { - serialprintPGM(s == TSI_BED ? PSTR("Bed") : + SERIAL_ECHOPGM_P(s == TSI_BED ? PSTR("Bed") : #if ENABLED(USE_TEMP_EXT_COMPENSATION) s == TSI_EXT ? PSTR("Extruder") : #endif PSTR("Probe") ); - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " temp: ", temp, "C; Offset: ", i < 0 ? 0.0f : sensor_z_offsets[s][i], " um" ); - temp += cali_info[s].temp_res; + temp += cali_info[s].temp_resolution; } } + #if ENABLED(DEBUG_PTC) + float meas[4] = { 0, 0, 0, 0 }; + compensate_measurement(TSI_PROBE, 27.5, meas[0]); + compensate_measurement(TSI_PROBE, 32.5, meas[1]); + compensate_measurement(TSI_PROBE, 77.5, meas[2]); + compensate_measurement(TSI_PROBE, 82.5, meas[3]); + SERIAL_ECHOLNPGM("DEBUG_PTC 27.5:", meas[0], " 32.5:", meas[1], " 77.5:", meas[2], " 82.5:", meas[3]); + #endif } -void ProbeTempComp::prepare_new_calibration(const float &init_meas_z) { +void ProbeTempComp::prepare_new_calibration(const_float_t init_meas_z) { calib_idx = 0; init_measurement = init_meas_z; } -void ProbeTempComp::push_back_new_measurement(const TempSensorID tsi, const float &meas_z) { +void ProbeTempComp::push_back_new_measurement(const TempSensorID tsi, const_float_t meas_z) { switch (tsi) { case TSI_PROBE: case TSI_BED: @@ -114,19 +120,19 @@ bool ProbeTempComp::finish_calibration(const TempSensorID tsi) { } const uint8_t measurements = cali_info[tsi].measurements; - const float start_temp = cali_info[tsi].start_temp, - res_temp = cali_info[tsi].temp_res; + const celsius_t start_temp = cali_info[tsi].start_temp, + res_temp = cali_info[tsi].temp_resolution; int16_t * const data = sensor_z_offsets[tsi]; // Extrapolate float k, d; if (calib_idx < measurements) { - SERIAL_ECHOLNPAIR("Got ", calib_idx, " measurements. "); + SERIAL_ECHOLNPGM("Got ", calib_idx, " measurements. "); if (linear_regression(tsi, k, d)) { SERIAL_ECHOPGM("Applying linear extrapolation"); calib_idx--; for (; calib_idx < measurements; ++calib_idx) { - const float temp = start_temp + float(calib_idx) * res_temp; + const celsius_float_t temp = start_temp + float(calib_idx) * res_temp; data[calib_idx] = static_cast(k * temp + d); } } @@ -143,13 +149,13 @@ bool ProbeTempComp::finish_calibration(const TempSensorID tsi) { // Sanity check for (calib_idx = 0; calib_idx < measurements; ++calib_idx) { // Restrict the max. offset - if (abs(data[calib_idx]) > 2000) { + if (ABS(data[calib_idx]) > 2000) { SERIAL_ECHOLNPGM("!Invalid Z-offset detected (0-2)."); clear_offsets(tsi); return false; } // Restrict the max. offset difference between two probings - if (calib_idx > 0 && abs(data[calib_idx - 1] - data[calib_idx]) > 800) { + if (calib_idx > 0 && ABS(data[calib_idx - 1] - data[calib_idx]) > 800) { SERIAL_ECHOLNPGM("!Invalid Z-offset between two probings detected (0-0.8)."); clear_offsets(TSI_PROBE); return false; @@ -159,47 +165,46 @@ bool ProbeTempComp::finish_calibration(const TempSensorID tsi) { return true; } -void ProbeTempComp::compensate_measurement(const TempSensorID tsi, const float &temp, float &meas_z) { - if (WITHIN(temp, cali_info[tsi].start_temp, cali_info[tsi].end_temp)) - meas_z -= get_offset_for_temperature(tsi, temp); -} - -float ProbeTempComp::get_offset_for_temperature(const TempSensorID tsi, const float &temp) { +void ProbeTempComp::compensate_measurement(const TempSensorID tsi, const celsius_t temp, float &meas_z) { const uint8_t measurements = cali_info[tsi].measurements; - const float start_temp = cali_info[tsi].start_temp, - res_temp = cali_info[tsi].temp_res; + const celsius_t start_temp = cali_info[tsi].start_temp, + end_temp = cali_info[tsi].end_temp, + res_temp = cali_info[tsi].temp_resolution; const int16_t * const data = sensor_z_offsets[tsi]; - auto point = [&](uint8_t i) { - return xy_float_t({start_temp + i*res_temp, static_cast(data[i])}); + // Given a data index, return { celsius, zoffset } in the form { x, y } + auto tpoint = [&](uint8_t i) -> xy_float_t { + return xy_float_t({ static_cast(start_temp) + i * res_temp, i ? static_cast(data[i - 1]) : 0.0f }); }; - auto linear_interp = [](float x, xy_float_t p1, xy_float_t p2) { - return (p2.y - p1.y) / (p2.x - p2.y) * (x - p1.x) + p1.y; + // Interpolate Z based on a temperature being within a given range + auto linear_interp = [](const_float_t x, xy_float_t p1, xy_float_t p2) { + // zoffs1 + zoffset_per_toffset * toffset + return p1.y + (p2.y - p1.y) / (p2.x - p1.x) * (x - p1.x); }; - // Linear interpolation - uint8_t idx = static_cast((temp - start_temp) / res_temp); - - // offset in um + // offset in µm float offset = 0.0f; - #if !defined(PTC_LINEAR_EXTRAPOLATION) || PTC_LINEAR_EXTRAPOLATION <= 0 - if (idx < 0) + #if PTC_LINEAR_EXTRAPOLATION + if (temp < start_temp) + offset = linear_interp(temp, tpoint(0), tpoint(PTC_LINEAR_EXTRAPOLATION)); + else if (temp >= end_temp) + offset = linear_interp(temp, tpoint(measurements - PTC_LINEAR_EXTRAPOLATION), tpoint(measurements)); + #else + if (temp < start_temp) offset = 0.0f; - else if (idx > measurements - 2) + else if (temp >= end_temp) offset = static_cast(data[measurements - 1]); - #else - if (idx < 0) - offset = linear_interp(temp, point(0), point(PTC_LINEAR_EXTRAPOLATION)); - else if (idx > measurements - 2) - offset = linear_interp(temp, point(measurements - PTC_LINEAR_EXTRAPOLATION - 1), point(measurements - 1)); #endif - else - offset = linear_interp(temp, point(idx), point(idx + 1)); + else { + // Linear interpolation + const int8_t idx = static_cast((temp - start_temp) / res_temp); + offset = linear_interp(temp, tpoint(idx), tpoint(idx + 1)); + } - // return offset in mm - return offset / 1000.0f; + // convert offset to mm and apply it + meas_z -= offset / 1000.0f; } bool ProbeTempComp::linear_regression(const TempSensorID tsi, float &k, float &d) { @@ -207,17 +212,18 @@ bool ProbeTempComp::linear_regression(const TempSensorID tsi, float &k, float &d if (!WITHIN(calib_idx, 2, cali_info[tsi].measurements)) return false; - const float start_temp = cali_info[tsi].start_temp, - res_temp = cali_info[tsi].temp_res; + const celsius_t start_temp = cali_info[tsi].start_temp, + res_temp = cali_info[tsi].temp_resolution; const int16_t * const data = sensor_z_offsets[tsi]; float sum_x = start_temp, sum_x2 = sq(start_temp), sum_xy = 0, sum_y = 0; + float xi = static_cast(start_temp); LOOP_L_N(i, calib_idx) { - const float xi = start_temp + (i + 1) * res_temp, - yi = static_cast(data[i]); + const float yi = static_cast(data[i]); + xi += res_temp; sum_x += xi; sum_x2 += sq(xi); sum_xy += xi * yi; diff --git a/Marlin/src/feature/probe_temp_comp.h b/Marlin/src/feature/probe_temp_comp.h index 626dd87f945f..f24b9acd9b18 100644 --- a/Marlin/src/feature/probe_temp_comp.h +++ b/Marlin/src/feature/probe_temp_comp.h @@ -33,10 +33,10 @@ enum TempSensorID : uint8_t { }; typedef struct { - uint8_t measurements; // Max. number of measurements to be stored (35 - 80°C) - float temp_res, // Resolution in °C between measurements - start_temp, // Base measurement; z-offset == 0 - end_temp; + uint8_t measurements; // Max. number of measurements to be stored (35 - 80°C) + celsius_t temp_resolution, // Resolution in °C between measurements + start_temp, // Base measurement; z-offset == 0 + end_temp; } temp_calib_t; /** @@ -47,44 +47,44 @@ typedef struct { // Probe temperature calibration constants #ifndef PTC_SAMPLE_COUNT - #define PTC_SAMPLE_COUNT 10U + #define PTC_SAMPLE_COUNT 10 #endif #ifndef PTC_SAMPLE_RES - #define PTC_SAMPLE_RES 5.0f + #define PTC_SAMPLE_RES 5 #endif #ifndef PTC_SAMPLE_START - #define PTC_SAMPLE_START 30.0f + #define PTC_SAMPLE_START 30 #endif -#define PTC_SAMPLE_END ((PTC_SAMPLE_START) + (PTC_SAMPLE_COUNT) * (PTC_SAMPLE_RES)) +#define PTC_SAMPLE_END (PTC_SAMPLE_START + (PTC_SAMPLE_COUNT) * PTC_SAMPLE_RES) // Bed temperature calibration constants #ifndef BTC_PROBE_TEMP - #define BTC_PROBE_TEMP 30.0f + #define BTC_PROBE_TEMP 30 #endif #ifndef BTC_SAMPLE_COUNT - #define BTC_SAMPLE_COUNT 10U + #define BTC_SAMPLE_COUNT 10 #endif -#ifndef BTC_SAMPLE_STEP - #define BTC_SAMPLE_RES 5.0f +#ifndef BTC_SAMPLE_RES + #define BTC_SAMPLE_RES 5 #endif #ifndef BTC_SAMPLE_START - #define BTC_SAMPLE_START 60.0f + #define BTC_SAMPLE_START 60 #endif -#define BTC_SAMPLE_END ((BTC_SAMPLE_START) + (BTC_SAMPLE_COUNT) * (BTC_SAMPLE_RES)) +#define BTC_SAMPLE_END (BTC_SAMPLE_START + (BTC_SAMPLE_COUNT) * BTC_SAMPLE_RES) #ifndef PTC_PROBE_HEATING_OFFSET #define PTC_PROBE_HEATING_OFFSET 0.5f #endif #ifndef PTC_PROBE_RAISE - #define PTC_PROBE_RAISE 10.0f + #define PTC_PROBE_RAISE 10 #endif static constexpr temp_calib_t cali_info_init[TSI_COUNT] = { - { PTC_SAMPLE_COUNT, PTC_SAMPLE_RES, PTC_SAMPLE_START, PTC_SAMPLE_END }, // Probe - { BTC_SAMPLE_COUNT, BTC_SAMPLE_RES, BTC_SAMPLE_START, BTC_SAMPLE_END }, // Bed + { PTC_SAMPLE_COUNT, PTC_SAMPLE_RES, PTC_SAMPLE_START, PTC_SAMPLE_END }, // Probe + { BTC_SAMPLE_COUNT, BTC_SAMPLE_RES, BTC_SAMPLE_START, BTC_SAMPLE_END }, // Bed #if ENABLED(USE_TEMP_EXT_COMPENSATION) - { 20, 5, 180, 180 + 5 * 20 } // Extruder + { 20, 5, 180, 180 + 5 * 20 } // Extruder #endif }; @@ -100,8 +100,8 @@ class ProbeTempComp { static constexpr xy_pos_t measure_point = PTC_PROBE_POS; // Coordinates to probe //measure_point = { 12.0f, 7.3f }; // Coordinates for the MK52 magnetic heatbed - static constexpr int probe_calib_bed_temp = BED_MAX_TARGET, // Bed temperature while calibrating probe - bed_calib_probe_temp = BTC_PROBE_TEMP; // Probe temperature while calibrating bed + static constexpr celsius_t probe_calib_bed_temp = BED_MAX_TARGET, // Bed temperature while calibrating probe + bed_calib_probe_temp = BTC_PROBE_TEMP; // Probe temperature while calibrating bed static int16_t *sensor_z_offsets[TSI_COUNT], z_offsets_probe[cali_info_init[TSI_PROBE].measurements], // (µm) @@ -121,10 +121,10 @@ class ProbeTempComp { } static bool set_offset(const TempSensorID tsi, const uint8_t idx, const int16_t offset); static void print_offsets(); - static void prepare_new_calibration(const float &init_meas_z); - static void push_back_new_measurement(const TempSensorID tsi, const float &meas_z); + static void prepare_new_calibration(const_float_t init_meas_z); + static void push_back_new_measurement(const TempSensorID tsi, const_float_t meas_z); static bool finish_calibration(const TempSensorID tsi); - static void compensate_measurement(const TempSensorID tsi, const float &temp, float &meas_z); + static void compensate_measurement(const TempSensorID tsi, const celsius_t temp, float &meas_z); private: static uint8_t calib_idx; @@ -135,8 +135,6 @@ class ProbeTempComp { */ static float init_measurement; - static float get_offset_for_temperature(const TempSensorID tsi, const float &temp); - /** * Fit a linear function in measured temperature offsets * to allow generating values of higher temperatures. diff --git a/Marlin/src/feature/repeat.cpp b/Marlin/src/feature/repeat.cpp index d48157a84d41..165f71fd0fae 100644 --- a/Marlin/src/feature/repeat.cpp +++ b/Marlin/src/feature/repeat.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../inc/MarlinConfig.h" #if ENABLED(GCODE_REPEAT_MARKERS) @@ -43,7 +44,7 @@ void Repeat::add_marker(const uint32_t sdpos, const uint16_t count) { marker[index].sdpos = sdpos; marker[index].counter = count ?: -1; index++; - DEBUG_ECHOLNPAIR("Add Marker ", int(index), " at ", sdpos, " (", count, ")"); + DEBUG_ECHOLNPGM("Add Marker ", index, " at ", sdpos, " (", count, ")"); } } @@ -53,14 +54,14 @@ void Repeat::loop() { else { const uint8_t ind = index - 1; // Active marker's index if (!marker[ind].counter) { // Did its counter run out? - DEBUG_ECHOLNPAIR("Pass Marker ", int(index)); + DEBUG_ECHOLNPGM("Pass Marker ", index); index--; // Carry on. Previous marker on the next 'M808'. } else { card.setIndex(marker[ind].sdpos); // Loop back to the marker. if (marker[ind].counter > 0) // Ignore a negative (or zero) counter. --marker[ind].counter; // Decrement the counter. If zero this 'M808' will be skipped next time. - DEBUG_ECHOLNPAIR("Goto Marker ", int(index), " at ", marker[ind].sdpos, " (", marker[ind].counter, ")"); + DEBUG_ECHOLNPGM("Goto Marker ", index, " at ", marker[ind].sdpos, " (", marker[ind].counter, ")"); } } } @@ -69,7 +70,7 @@ void Repeat::cancel() { LOOP_L_N(i, index) marker[i].counter = 0; } void Repeat::early_parse_M808(char * const cmd) { if (is_command_M808(cmd)) { - DEBUG_ECHOLNPAIR("Parsing \"", cmd, "\""); + DEBUG_ECHOLNPGM("Parsing \"", cmd, "\""); parser.parse(cmd); if (parser.seen('L')) add_marker(card.getIndex(), parser.value_ushort()); diff --git a/Marlin/src/feature/runout.cpp b/Marlin/src/feature/runout.cpp index be769d2dc82f..1c5637835992 100644 --- a/Marlin/src/feature/runout.cpp +++ b/Marlin/src/feature/runout.cpp @@ -47,12 +47,12 @@ bool FilamentMonitorBase::enabled = true, #if HAS_FILAMENT_RUNOUT_DISTANCE float RunoutResponseDelayed::runout_distance_mm = FILAMENT_RUNOUT_DISTANCE_MM; - volatile float RunoutResponseDelayed::runout_mm_countdown[EXTRUDERS]; + volatile float RunoutResponseDelayed::runout_mm_countdown[NUM_RUNOUT_SENSORS]; #if ENABLED(FILAMENT_MOTION_SENSOR) uint8_t FilamentSensorEncoder::motion_detected; #endif #else - int8_t RunoutResponseDebounced::runout_count; // = 0 + int8_t RunoutResponseDebounced::runout_count[NUM_RUNOUT_SENSORS]; // = 0 #endif // @@ -68,9 +68,11 @@ bool FilamentMonitorBase::enabled = true, #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif -void event_filament_runout() { +void event_filament_runout(const uint8_t extruder) { if (did_pause_print) return; // Action already in progress. Purge triggered repeated runout. @@ -85,14 +87,11 @@ void event_filament_runout() { } #endif - TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getActiveTool())); + TERN_(EXTENSIBLE_UI, ExtUI::onFilamentRunout(ExtUI::getTool(extruder))); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_FilamentRunout(extruder)); - #if EITHER(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS) - const char tool = '0' - #if NUM_RUNOUT_SENSORS > 1 - + active_extruder - #endif - ; + #if ANY(HOST_PROMPT_SUPPORT, HOST_ACTION_COMMANDS, MULTI_FILAMENT_SENSOR) + const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, extruder); #endif //action:out_of_filament @@ -128,8 +127,22 @@ void event_filament_runout() { SERIAL_EOL(); #endif // HOST_ACTION_COMMANDS - if (run_runout_script) - queue.inject_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); + if (run_runout_script) { + #if MULTI_FILAMENT_SENSOR + char script[strlen(FILAMENT_RUNOUT_SCRIPT) + 1]; + sprintf_P(script, PSTR(FILAMENT_RUNOUT_SCRIPT), tool); + #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) + SERIAL_ECHOLNPGM("Runout Command: ", script); + #endif + queue.inject(script); + #else + #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) + SERIAL_ECHOPGM("Runout Command: "); + SERIAL_ECHOLNPGM(FILAMENT_RUNOUT_SCRIPT); + #endif + queue.inject_P(PSTR(FILAMENT_RUNOUT_SCRIPT)); + #endif + } } #endif // HAS_FILAMENT_SENSOR diff --git a/Marlin/src/feature/runout.h b/Marlin/src/feature/runout.h index 60154c5e43ef..918e65bb22e3 100644 --- a/Marlin/src/feature/runout.h +++ b/Marlin/src/feature/runout.h @@ -43,7 +43,7 @@ #define FILAMENT_RUNOUT_THRESHOLD 5 #endif -void event_filament_runout(); +void event_filament_runout(const uint8_t extruder); template class TFilamentMonitor; @@ -101,12 +101,12 @@ class TFilamentMonitor : public FilamentMonitorBase { #if HAS_FILAMENT_RUNOUT_DISTANCE static inline float& runout_distance() { return response.runout_distance_mm; } - static inline void set_runout_distance(const float &mm) { response.runout_distance_mm = mm; } + static inline void set_runout_distance(const_float_t mm) { response.runout_distance_mm = mm; } #endif // Handle a block completion. RunoutResponseDelayed uses this to // add up the length of filament moved while the filament is out. - static inline void block_completed(const block_t* const b) { + static inline void block_completed(const block_t * const b) { if (enabled) { response.block_completed(b); sensor.block_completed(b); @@ -119,11 +119,41 @@ class TFilamentMonitor : public FilamentMonitorBase { TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, cli()); // Prevent RunoutResponseDelayed::block_completed from accumulating here response.run(); sensor.run(); - const bool ran_out = response.has_run_out(); + const uint8_t runout_flags = response.has_run_out(); TERN_(HAS_FILAMENT_RUNOUT_DISTANCE, sei()); + #if MULTI_FILAMENT_SENSOR + #if ENABLED(WATCH_ALL_RUNOUT_SENSORS) + const bool ran_out = !!runout_flags; // any sensor triggers + uint8_t extruder = 0; + if (ran_out) { + uint8_t bitmask = runout_flags; + while (!(bitmask & 1)) { + bitmask >>= 1; + extruder++; + } + } + #else + const bool ran_out = TEST(runout_flags, active_extruder); // suppress non active extruders + uint8_t extruder = active_extruder; + #endif + #else + const bool ran_out = !!runout_flags; + uint8_t extruder = active_extruder; + #endif + + #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) + if (runout_flags) { + SERIAL_ECHOPGM("Runout Sensors: "); + LOOP_L_N(i, 8) SERIAL_ECHO('0' + TEST(runout_flags, i)); + SERIAL_ECHOPGM(" -> ", extruder); + if (ran_out) SERIAL_ECHOPGM(" RUN OUT"); + SERIAL_EOL(); + } + #endif + if (ran_out) { filament_ran_out = true; - event_filament_runout(); + event_filament_runout(extruder); planner.synchronize(); } } @@ -177,7 +207,7 @@ class FilamentSensorBase { // Return a bitmask of runout pin states static inline uint8_t poll_runout_pins() { #define _OR_RUNOUT(N) | (READ(FIL_RUNOUT##N##_PIN) ? _BV((N) - 1) : 0) - return (0 REPEAT_S(1, INCREMENT(NUM_RUNOUT_SENSORS), _OR_RUNOUT)); + return (0 REPEAT_1(NUM_RUNOUT_SENSORS, _OR_RUNOUT)); #undef _OR_RUNOUT } @@ -230,7 +260,7 @@ class FilamentSensorBase { change = old_state ^ new_state; old_state = new_state; - #ifdef FILAMENT_RUNOUT_SENSOR_DEBUG + #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) if (change) { SERIAL_ECHOPGM("Motion detected:"); LOOP_L_N(e, NUM_RUNOUT_SENSORS) @@ -243,7 +273,7 @@ class FilamentSensorBase { } public: - static inline void block_completed(const block_t* const b) { + static inline void block_completed(const block_t * const b) { // If the sensor wheel has moved since the last call to // this method reset the runout counter for the extruder. if (TEST(motion_detected, b->extruder)) @@ -266,30 +296,31 @@ class FilamentSensorBase { private: static inline bool poll_runout_state(const uint8_t extruder) { const uint8_t runout_states = poll_runout_states(); - #if NUM_RUNOUT_SENSORS == 1 - UNUSED(extruder); - #else + #if MULTI_FILAMENT_SENSOR if ( !TERN0(DUAL_X_CARRIAGE, idex_is_duplicating()) && !TERN0(MULTI_NOZZLE_DUPLICATION, extruder_duplication_enabled) ) return TEST(runout_states, extruder); // A specific extruder ran out + #else + UNUSED(extruder); #endif return !!runout_states; // Any extruder ran out } public: - static inline void block_completed(const block_t* const) {} + static inline void block_completed(const block_t * const) {} static inline void run() { - const bool out = poll_runout_state(active_extruder); - if (!out) filament_present(active_extruder); - #ifdef FILAMENT_RUNOUT_SENSOR_DEBUG - static bool was_out = false; - if (out != was_out) { - was_out = out; - SERIAL_ECHOPGM("Filament "); - serialprintPGM(out ? PSTR("OUT\n") : PSTR("IN\n")); - } - #endif + LOOP_L_N(s, NUM_RUNOUT_SENSORS) { + const bool out = poll_runout_state(s); + if (!out) filament_present(s); + #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) + static uint8_t was_out; // = 0 + if (out != TEST(was_out, s)) { + TBI(was_out, s); + SERIAL_ECHOLNPGM_P(PSTR("Filament Sensor "), '0' + s, out ? PSTR(" OUT") : PSTR(" IN")); + } + #endif + } } }; @@ -305,44 +336,44 @@ class FilamentSensorBase { // during a runout condition. class RunoutResponseDelayed { private: - static volatile float runout_mm_countdown[EXTRUDERS]; + static volatile float runout_mm_countdown[NUM_RUNOUT_SENSORS]; public: static float runout_distance_mm; static inline void reset() { - LOOP_L_N(i, EXTRUDERS) filament_present(i); + LOOP_L_N(i, NUM_RUNOUT_SENSORS) filament_present(i); } static inline void run() { - #ifdef FILAMENT_RUNOUT_SENSOR_DEBUG + #if ENABLED(FILAMENT_RUNOUT_SENSOR_DEBUG) static millis_t t = 0; const millis_t ms = millis(); if (ELAPSED(ms, t)) { t = millis() + 1000UL; - LOOP_L_N(i, EXTRUDERS) { - serialprintPGM(i ? PSTR(", ") : PSTR("Remaining mm: ")); - SERIAL_ECHO(runout_mm_countdown[i]); - } + LOOP_L_N(i, NUM_RUNOUT_SENSORS) + SERIAL_ECHOPGM_P(i ? PSTR(", ") : PSTR("Remaining mm: "), runout_mm_countdown[i]); SERIAL_EOL(); } #endif } - static inline bool has_run_out() { - return runout_mm_countdown[active_extruder] < 0; + static inline uint8_t has_run_out() { + uint8_t runout_flags = 0; + LOOP_L_N(i, NUM_RUNOUT_SENSORS) if (runout_mm_countdown[i] < 0) SBI(runout_flags, i); + return runout_flags; } static inline void filament_present(const uint8_t extruder) { runout_mm_countdown[extruder] = runout_distance_mm; } - static inline void block_completed(const block_t* const b) { + static inline void block_completed(const block_t * const b) { if (b->steps.x || b->steps.y || b->steps.z || did_pause_print) { // Allow pause purge move to re-trigger runout state // Only trigger on extrusion with XYZ movement to allow filament change and retract/recover. const uint8_t e = b->extruder; const int32_t steps = b->steps.e; - runout_mm_countdown[e] -= (TEST(b->direction_bits, E_AXIS) ? -steps : steps) * planner.steps_to_mm[E_AXIS_N(e)]; + runout_mm_countdown[e] -= (TEST(b->direction_bits, E_AXIS) ? -steps : steps) * planner.mm_per_step[E_AXIS_N(e)]; } } }; @@ -355,13 +386,28 @@ class FilamentSensorBase { class RunoutResponseDebounced { private: static constexpr int8_t runout_threshold = FILAMENT_RUNOUT_THRESHOLD; - static int8_t runout_count; + static int8_t runout_count[NUM_RUNOUT_SENSORS]; + public: - static inline void reset() { runout_count = runout_threshold; } - static inline void run() { if (runout_count >= 0) runout_count--; } - static inline bool has_run_out() { return runout_count < 0; } - static inline void block_completed(const block_t* const) { } - static inline void filament_present(const uint8_t) { runout_count = runout_threshold; } + static inline void reset() { + LOOP_L_N(i, NUM_RUNOUT_SENSORS) filament_present(i); + } + + static inline void run() { + LOOP_L_N(i, NUM_RUNOUT_SENSORS) if (runout_count[i] >= 0) runout_count[i]--; + } + + static inline uint8_t has_run_out() { + uint8_t runout_flags = 0; + LOOP_L_N(i, NUM_RUNOUT_SENSORS) if (runout_count[i] < 0) SBI(runout_flags, i); + return runout_flags; + } + + static inline void block_completed(const block_t * const) { } + + static inline void filament_present(const uint8_t extruder) { + runout_count[extruder] = runout_threshold; + } }; #endif // !HAS_FILAMENT_RUNOUT_DISTANCE diff --git a/Marlin/src/feature/solenoid.cpp b/Marlin/src/feature/solenoid.cpp index 623f223caa1b..b6795d1a1ef8 100644 --- a/Marlin/src/feature/solenoid.cpp +++ b/Marlin/src/feature/solenoid.cpp @@ -34,28 +34,12 @@ #include "../module/tool_change.h" #endif -#define HAS_SOLENOID(N) (HAS_SOLENOID_##N && (ENABLED(MANUAL_SOLENOID_CONTROL) || N < EXTRUDERS)) - // Used primarily with MANUAL_SOLENOID_CONTROL static void set_solenoid(const uint8_t num, const bool active) { const uint8_t value = active ? PE_MAGNET_ON_STATE : !PE_MAGNET_ON_STATE; + #define _SOL_CASE(N) case N: TERN_(HAS_SOLENOID_##N, OUT_WRITE(SOL##N##_PIN, value)); break; switch (num) { - case 0: OUT_WRITE(SOL0_PIN, value); break; - #if HAS_SOLENOID(1) - case 1: OUT_WRITE(SOL1_PIN, value); break; - #endif - #if HAS_SOLENOID(2) - case 2: OUT_WRITE(SOL2_PIN, value); break; - #endif - #if HAS_SOLENOID(3) - case 3: OUT_WRITE(SOL3_PIN, value); break; - #endif - #if HAS_SOLENOID(4) - case 4: OUT_WRITE(SOL4_PIN, value); break; - #endif - #if HAS_SOLENOID(5) - case 5: OUT_WRITE(SOL5_PIN, value); break; - #endif + REPEAT(8, _SOL_CASE) default: SERIAL_ECHO_MSG(STR_INVALID_SOLENOID); break; } @@ -67,25 +51,11 @@ static void set_solenoid(const uint8_t num, const bool active) { void enable_solenoid(const uint8_t num) { set_solenoid(num, true); } void disable_solenoid(const uint8_t num) { set_solenoid(num, false); } -void enable_solenoid_on_active_extruder() { enable_solenoid(active_extruder); } +void enable_solenoid_on_active_extruder() { } void disable_all_solenoids() { - disable_solenoid(0); - #if HAS_SOLENOID(1) - disable_solenoid(1); - #endif - #if HAS_SOLENOID(2) - disable_solenoid(2); - #endif - #if HAS_SOLENOID(3) - disable_solenoid(3); - #endif - #if HAS_SOLENOID(4) - disable_solenoid(4); - #endif - #if HAS_SOLENOID(5) - disable_solenoid(5); - #endif + #define _SOL_DISABLE(N) TERN_(HAS_SOLENOID_##N, disable_solenoid(N)); + REPEAT(8, _SOL_DISABLE) } #endif // EXT_SOLENOID || MANUAL_SOLENOID_CONTROL diff --git a/Marlin/src/feature/spindle_laser.cpp b/Marlin/src/feature/spindle_laser.cpp index 66c04a001c0a..ea6fc4990e95 100644 --- a/Marlin/src/feature/spindle_laser.cpp +++ b/Marlin/src/feature/spindle_laser.cpp @@ -34,6 +34,10 @@ #include "../module/servo.h" #endif +#if ENABLED(I2C_AMMETER) + #include "../feature/ammeter.h" +#endif + SpindleLaser cutter; uint8_t SpindleLaser::power; #if ENABLED(LASER_FEATURE) @@ -48,9 +52,9 @@ cutter_power_t SpindleLaser::menuPower, // Power s #endif #define SPINDLE_LASER_PWM_OFF TERN(SPINDLE_LASER_PWM_INVERT, 255, 0) -// -// Init the cutter to a safe OFF state -// +/** + * Init the cutter to a safe OFF state + */ void SpindleLaser::init() { #if ENABLED(SPINDLE_SERVO) MOVE_SERVO(SPINDLE_SERVO_NR, SPINDLE_SERVO_MIN); @@ -60,7 +64,7 @@ void SpindleLaser::init() { #if ENABLED(SPINDLE_CHANGE_DIR) OUT_WRITE(SPINDLE_DIR_PIN, SPINDLE_INVERT_DIR ? 255 : 0); // Init rotation to clockwise (M3) #endif - #if ENABLED(SPINDLE_LASER_PWM) + #if ENABLED(SPINDLE_LASER_USE_PWM) SET_PWM(SPINDLE_LASER_PWM_PIN); analogWrite(pin_t(SPINDLE_LASER_PWM_PIN), SPINDLE_LASER_PWM_OFF); // Set to lowest speed #endif @@ -68,11 +72,22 @@ void SpindleLaser::init() { set_pwm_frequency(pin_t(SPINDLE_LASER_PWM_PIN), SPINDLE_LASER_FREQUENCY); TERN_(MARLIN_DEV_MODE, frequency = SPINDLE_LASER_FREQUENCY); #endif + #if ENABLED(AIR_EVACUATION) + OUT_WRITE(AIR_EVACUATION_PIN, !AIR_EVACUATION_ACTIVE); // Init Vacuum/Blower OFF + #endif + #if ENABLED(AIR_ASSIST) + OUT_WRITE(AIR_ASSIST_PIN, !AIR_ASSIST_ACTIVE); // Init Air Assist OFF + #endif + #if ENABLED(I2C_AMMETER) + ammeter.init(); // Init I2C Ammeter + #endif } -#if ENABLED(SPINDLE_LASER_PWM) +#if ENABLED(SPINDLE_LASER_USE_PWM) /** * Set the cutter PWM directly to the given ocr value + * + * @param ocr Power value */ void SpindleLaser::_set_ocr(const uint8_t ocr) { #if NEEDS_HARDWARE_PWM && SPINDLE_LASER_FREQUENCY @@ -92,17 +107,21 @@ void SpindleLaser::init() { WRITE(SPINDLE_LASER_ENA_PIN, !SPINDLE_LASER_ACTIVE_STATE); // Cutter OFF _set_ocr(0); } -#endif +#endif // SPINDLE_LASER_USE_PWM -// -// Set cutter ON/OFF state (and PWM) to the given cutter power value -// +/** + * Apply power for laser/spindle + * + * Apply cutter power value for PWM, Servo, and on/off pin. + * + * @param opwr Power value. Range 0 to MAX. When 0 disable spindle/laser. + */ void SpindleLaser::apply_power(const uint8_t opwr) { static uint8_t last_power_applied = 0; if (opwr == last_power_applied) return; last_power_applied = opwr; power = opwr; - #if ENABLED(SPINDLE_LASER_PWM) + #if ENABLED(SPINDLE_LASER_USE_PWM) if (cutter.unitPower == 0 && CUTTER_UNIT_IS(RPM)) { ocr_off(); isReady = false; @@ -124,10 +143,10 @@ void SpindleLaser::apply_power(const uint8_t opwr) { } #if ENABLED(SPINDLE_CHANGE_DIR) - // - // Set the spindle direction and apply immediately - // Stop on direction change if SPINDLE_STOP_ON_DIR_CHANGE is enabled - // + /** + * Set the spindle direction and apply immediately + * Stop on direction change if SPINDLE_STOP_ON_DIR_CHANGE is enabled + */ void SpindleLaser::set_reverse(const bool reverse) { const bool dir_state = (reverse == SPINDLE_INVERT_DIR); // Forward (M3) HIGH when not inverted if (TERN0(SPINDLE_STOP_ON_DIR_CHANGE, enabled()) && READ(SPINDLE_DIR_PIN) != dir_state) disable(); @@ -135,4 +154,18 @@ void SpindleLaser::apply_power(const uint8_t opwr) { } #endif +#if ENABLED(AIR_EVACUATION) + // Enable / disable Cutter Vacuum or Laser Blower motor + void SpindleLaser::air_evac_enable() { WRITE(AIR_EVACUATION_PIN, AIR_EVACUATION_ACTIVE); } // Turn ON + void SpindleLaser::air_evac_disable() { WRITE(AIR_EVACUATION_PIN, !AIR_EVACUATION_ACTIVE); } // Turn OFF + void SpindleLaser::air_evac_toggle() { TOGGLE(AIR_EVACUATION_PIN); } // Toggle state +#endif + +#if ENABLED(AIR_ASSIST) + // Enable / disable air assist + void SpindleLaser::air_assist_enable() { WRITE(AIR_ASSIST_PIN, AIR_ASSIST_PIN); } // Turn ON + void SpindleLaser::air_assist_disable() { WRITE(AIR_ASSIST_PIN, !AIR_ASSIST_PIN); } // Turn OFF + void SpindleLaser::air_assist_toggle() { TOGGLE(AIR_ASSIST_PIN); } // Toggle state +#endif + #endif // HAS_CUTTER diff --git a/Marlin/src/feature/spindle_laser.h b/Marlin/src/feature/spindle_laser.h index d50bc7eb42d2..ba82c4d7319a 100644 --- a/Marlin/src/feature/spindle_laser.h +++ b/Marlin/src/feature/spindle_laser.h @@ -53,7 +53,7 @@ class SpindleLaser { min_pct = TERN(CUTTER_POWER_RELATIVE, 0, TERN(SPINDLE_FEATURE, round(100.0f * (SPEED_POWER_MIN) / (SPEED_POWER_MAX)), SPEED_POWER_MIN)), max_pct = TERN(SPINDLE_FEATURE, 100, SPEED_POWER_MAX); - static const inline uint8_t pct_to_ocr(const float pct) { return uint8_t(PCT_TO_PWM(pct)); } + static const inline uint8_t pct_to_ocr(const_float_t pct) { return uint8_t(PCT_TO_PWM(pct)); } // cpower = configured values (e.g., SPEED_POWER_MAX) @@ -123,7 +123,7 @@ class SpindleLaser { FORCE_INLINE static void refresh() { apply_power(power); } FORCE_INLINE static void set_power(const uint8_t upwr) { power = upwr; refresh(); } - #if ENABLED(SPINDLE_LASER_PWM) + #if ENABLED(SPINDLE_LASER_USE_PWM) private: @@ -132,54 +132,50 @@ class SpindleLaser { public: static void set_ocr(const uint8_t ocr); - static inline void set_ocr_power(const uint8_t ocr) { power = ocr; set_ocr(ocr); } + static inline void ocr_set_power(const uint8_t ocr) { power = ocr; set_ocr(ocr); } static void ocr_off(); - // Used to update output for power->OCR translation + + /** + * Update output for power->OCR translation + */ static inline uint8_t upower_to_ocr(const cutter_power_t upwr) { - return ( + return uint8_t( #if CUTTER_UNIT_IS(PWM255) - uint8_t(upwr) + upwr #elif CUTTER_UNIT_IS(PERCENT) pct_to_ocr(upwr) #else - uint8_t(pct_to_ocr(cpwr_to_pct(upwr))) + pct_to_ocr(cpwr_to_pct(upwr)) #endif ); } - // Correct power to configured range + /** + * Correct power to configured range + */ static inline cutter_power_t power_to_range(const cutter_power_t pwr) { - return power_to_range(pwr, ( - #if CUTTER_UNIT_IS(PWM255) - 0 - #elif CUTTER_UNIT_IS(PERCENT) - 1 - #elif CUTTER_UNIT_IS(RPM) - 2 - #else - #error "CUTTER_UNIT_IS(unknown)" - #endif - )); + return power_to_range(pwr, _CUTTER_POWER(CUTTER_POWER_UNIT)); } + static inline cutter_power_t power_to_range(const cutter_power_t pwr, const uint8_t pwrUnit) { if (pwr <= 0) return 0; cutter_power_t upwr; switch (pwrUnit) { - case 0: // PWM + case _CUTTER_POWER_PWM255: upwr = cutter_power_t( (pwr < pct_to_ocr(min_pct)) ? pct_to_ocr(min_pct) // Use minimum if set below : (pwr > pct_to_ocr(max_pct)) ? pct_to_ocr(max_pct) // Use maximum if set above : pwr ); break; - case 1: // PERCENT + case _CUTTER_POWER_PERCENT: upwr = cutter_power_t( (pwr < min_pct) ? min_pct // Use minimum if set below : (pwr > max_pct) ? max_pct // Use maximum if set above : pwr // PCT ); break; - case 2: // RPM + case _CUTTER_POWER_RPM: upwr = cutter_power_t( (pwr < SPEED_POWER_MIN) ? SPEED_POWER_MIN // Use minimum if set below : (pwr > SPEED_POWER_MAX) ? SPEED_POWER_MAX // Use maximum if set above @@ -190,14 +186,34 @@ class SpindleLaser { } return upwr; } + #endif // SPINDLE_LASER_USE_PWM - #endif // SPINDLE_LASER_PWM - + /** + * Enable/Disable spindle/laser + * @param enable true = enable; false = disable + */ static inline void set_enabled(const bool enable) { - set_power(enable ? TERN(SPINDLE_LASER_PWM, (power ?: (unitPower ? upower_to_ocr(cpwr_to_upwr(SPEED_POWER_STARTUP)) : 0)), 255) : 0); + uint8_t value = 0; + if (enable) { + #if ENABLED(SPINDLE_LASER_USE_PWM) + if (power) + value = power; + else if (unitPower) + value = upower_to_ocr(cpwr_to_upwr(SPEED_POWER_STARTUP)); + #else + value = 255; + #endif + } + set_power(value); } - // Wait for spindle to spin up or spin down + static inline void disable() { isReady = false; set_enabled(false); } + + /** + * Wait for spindle to spin up or spin down + * + * @param on true = state to on; false = state to off. + */ static inline void power_delay(const bool on) { #if DISABLED(LASER_POWER_INLINE) safe_delay(on ? SPINDLE_LASER_POWERUP_DELAY : SPINDLE_LASER_POWERDOWN_DELAY); @@ -212,13 +228,28 @@ class SpindleLaser { static bool is_reverse() { return false; } #endif - static inline void disable() { isReady = false; set_enabled(false); } + #if ENABLED(AIR_EVACUATION) + static void air_evac_enable(); // Turn On Cutter Vacuum or Laser Blower motor + static void air_evac_disable(); // Turn Off Cutter Vacuum or Laser Blower motor + static void air_evac_toggle(); // Toggle Cutter Vacuum or Laser Blower motor + static inline bool air_evac_state() { // Get current state + return (READ(AIR_EVACUATION_PIN) == AIR_EVACUATION_ACTIVE); + } + #endif - #if HAS_LCD_MENU + #if ENABLED(AIR_ASSIST) + static void air_assist_enable(); // Turn on air assist + static void air_assist_disable(); // Turn off air assist + static void air_assist_toggle(); // Toggle air assist + static inline bool air_assist_state() { // Get current state + return (READ(AIR_ASSIST_PIN) == AIR_ASSIST_ACTIVE); + } + #endif + #if HAS_LCD_MENU static inline void enable_with_dir(const bool reverse) { isReady = true; - const uint8_t ocr = TERN(SPINDLE_LASER_PWM, upower_to_ocr(menuPower), 255); + const uint8_t ocr = TERN(SPINDLE_LASER_USE_PWM, upower_to_ocr(menuPower), 255); if (menuPower) power = ocr; else @@ -231,7 +262,7 @@ class SpindleLaser { FORCE_INLINE static void enable_reverse() { enable_with_dir(true); } FORCE_INLINE static void enable_same_dir() { enable_with_dir(is_reverse()); } - #if ENABLED(SPINDLE_LASER_PWM) + #if ENABLED(SPINDLE_LASER_USE_PWM) static inline void update_from_mpower() { if (isReady) power = upower_to_ocr(menuPower); unitPower = menuPower; @@ -245,8 +276,8 @@ class SpindleLaser { * If not set defaults to 80% power */ static inline void test_fire_pulse() { - enable_forward(); // Turn Laser on (Spindle speak but same funct) TERN_(USE_BEEPER, buzzer.tone(30, 3000)); + enable_forward(); // Turn Laser on (Spindle speak but same funct) delay(testPulse); // Delay for time set by user in pulse ms menu screen. disable(); // Turn laser off } @@ -277,14 +308,14 @@ class SpindleLaser { isReady = false; unitPower = menuPower = 0; planner.laser_inline.status.isPlanned = false; - TERN(SPINDLE_LASER_PWM, inline_ocr_power, inline_power)(0); + TERN(SPINDLE_LASER_USE_PWM, inline_ocr_power, inline_power)(0); } } // Set the power for subsequent movement blocks static void inline_power(const cutter_power_t upwr) { unitPower = menuPower = upwr; - #if ENABLED(SPINDLE_LASER_PWM) + #if ENABLED(SPINDLE_LASER_USE_PWM) #if ENABLED(SPEED_POWER_RELATIVE) && !CUTTER_UNIT_IS(RPM) // relative mode does not turn laser off at 0, except for RPM planner.laser_inline.status.isEnabled = true; planner.laser_inline.power = upower_to_ocr(upwr); @@ -301,14 +332,14 @@ class SpindleLaser { static inline void inline_direction(const bool) { /* never */ } - #if ENABLED(SPINDLE_LASER_PWM) + #if ENABLED(SPINDLE_LASER_USE_PWM) static inline void inline_ocr_power(const uint8_t ocrpwr) { isReady = ocrpwr > 0; planner.laser_inline.status.isEnabled = ocrpwr > 0; planner.laser_inline.power = ocrpwr; } #endif - #endif // LASER_POWER_INLINE + #endif // LASER_POWER_INLINE static inline void kill() { TERN_(LASER_POWER_INLINE, inline_disable()); diff --git a/Marlin/src/feature/stepper_driver_safety.cpp b/Marlin/src/feature/stepper_driver_safety.cpp new file mode 100644 index 000000000000..c7da5d2ff7f6 --- /dev/null +++ b/Marlin/src/feature/stepper_driver_safety.cpp @@ -0,0 +1,117 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../inc/MarlinConfig.h" +#include "../lcd/marlinui.h" + +#if HAS_DRIVER_SAFE_POWER_PROTECT + +#include "stepper_driver_safety.h" + +static uint32_t axis_plug_backward = 0; + +void stepper_driver_backward_error(PGM_P str) { + SERIAL_ERROR_START(); + SERIAL_ECHOPGM_P(str); + SERIAL_ECHOLNPGM(" driver is backward!"); + ui.status_printf_P(2, PSTR(S_FMT S_FMT), str, GET_TEXT(MSG_DRIVER_BACKWARD)); +} + +void stepper_driver_backward_check() { + + OUT_WRITE(SAFE_POWER_PIN, LOW); + + #define _TEST_BACKWARD(AXIS, BIT) do { \ + SET_INPUT(AXIS##_ENABLE_PIN); \ + OUT_WRITE(AXIS##_STEP_PIN, false); \ + delay(20); \ + if (READ(AXIS##_ENABLE_PIN) == false) { \ + SBI(axis_plug_backward, BIT); \ + stepper_driver_backward_error(PSTR(STRINGIFY(AXIS))); \ + } \ + }while(0) + + #define TEST_BACKWARD(AXIS, BIT) TERN_(HAS_##AXIS##_ENABLE, _TEST_BACKWARD(AXIS, BIT)) + + TEST_BACKWARD(X, 0); + TEST_BACKWARD(X2, 1); + + TEST_BACKWARD(Y, 2); + TEST_BACKWARD(Y2, 3); + + TEST_BACKWARD(Z, 4); + TEST_BACKWARD(Z2, 5); + TEST_BACKWARD(Z3, 6); + TEST_BACKWARD(Z4, 7); + + TEST_BACKWARD(I, 8); + TEST_BACKWARD(J, 9); + TEST_BACKWARD(K, 10); + + TEST_BACKWARD(E0, 11); + TEST_BACKWARD(E1, 12); + TEST_BACKWARD(E2, 13); + TEST_BACKWARD(E3, 14); + TEST_BACKWARD(E4, 15); + TEST_BACKWARD(E5, 16); + TEST_BACKWARD(E6, 17); + TEST_BACKWARD(E7, 18); + + if (!axis_plug_backward) + WRITE(SAFE_POWER_PIN, HIGH); +} + +void stepper_driver_backward_report() { + if (!axis_plug_backward) return; + + auto _report_if_backward = [](PGM_P axis, uint8_t bit) { + if (TEST(axis_plug_backward, bit)) + stepper_driver_backward_error(axis); + }; + + #define REPORT_BACKWARD(axis, bit) TERN_(HAS_##axis##_ENABLE, _report_if_backward(PSTR(STRINGIFY(axis)), bit)) + + REPORT_BACKWARD(X, 0); + REPORT_BACKWARD(X2, 1); + + REPORT_BACKWARD(Y, 2); + REPORT_BACKWARD(Y2, 3); + + REPORT_BACKWARD(Z, 4); + REPORT_BACKWARD(Z2, 5); + REPORT_BACKWARD(Z3, 6); + REPORT_BACKWARD(Z4, 7); + + REPORT_BACKWARD(I, 8); + REPORT_BACKWARD(J, 9); + REPORT_BACKWARD(K, 10); + + REPORT_BACKWARD(E0, 11); + REPORT_BACKWARD(E1, 12); + REPORT_BACKWARD(E2, 13); + REPORT_BACKWARD(E3, 14); + REPORT_BACKWARD(E4, 15); + REPORT_BACKWARD(E5, 16); + REPORT_BACKWARD(E6, 17); + REPORT_BACKWARD(E7, 18); +} + +#endif // HAS_DRIVER_SAFE_POWER_PROTECT diff --git a/Marlin/src/feature/stepper_driver_safety.h b/Marlin/src/feature/stepper_driver_safety.h new file mode 100644 index 000000000000..46edf3390d77 --- /dev/null +++ b/Marlin/src/feature/stepper_driver_safety.h @@ -0,0 +1,28 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + + +#include "../inc/MarlinConfigPre.h" + +void stepper_driver_backward_check(); +void stepper_driver_backward_report(); diff --git a/Marlin/src/feature/tmc_util.cpp b/Marlin/src/feature/tmc_util.cpp index 8d0156883baa..97fedf13c59c 100644 --- a/Marlin/src/feature/tmc_util.cpp +++ b/Marlin/src/feature/tmc_util.cpp @@ -208,10 +208,10 @@ #if ENABLED(STOP_ON_ERROR) void report_driver_error(const TMC_driver_data &data) { SERIAL_ECHOPGM(" driver error detected: 0x"); - SERIAL_PRINTLN(data.drv_status, HEX); + SERIAL_PRINTLN(data.drv_status, PrintBase::Hex); if (data.is_ot) SERIAL_ECHOLNPGM("overtemperature"); if (data.is_s2g) SERIAL_ECHOLNPGM("coil short circuit"); - TERN_(TMC_DEBUG, tmc_report_all(true, true, true, true)); + TERN_(TMC_DEBUG, tmc_report_all()); kill(PSTR("Driver error")); } #endif @@ -226,17 +226,17 @@ SERIAL_ECHO(timestamp); SERIAL_ECHOPGM(": "); st.printLabel(); - SERIAL_ECHOLNPAIR(" driver overtemperature warning! (", st.getMilliamps(), "mA)"); + SERIAL_ECHOLNPGM(" driver overtemperature warning! (", st.getMilliamps(), "mA)"); } template void report_polled_driver_data(TMC &st, const TMC_driver_data &data) { const uint32_t pwm_scale = get_pwm_scale(st); st.printLabel(); - SERIAL_CHAR(':'); SERIAL_PRINT(pwm_scale, DEC); + SERIAL_CHAR(':'); SERIAL_ECHO(pwm_scale); #if ENABLED(TMC_DEBUG) #if HAS_TMCX1X0 || HAS_TMC220x - SERIAL_CHAR('/'); SERIAL_PRINT(data.cs_actual, DEC); + SERIAL_CHAR('/'); SERIAL_ECHO(data.cs_actual); #endif #if HAS_STALLGUARD SERIAL_CHAR('/'); @@ -257,7 +257,7 @@ #endif if (st.flag_otpw) SERIAL_CHAR('F'); // otpw Flag SERIAL_CHAR('|'); - if (st.otpw_count > 0) SERIAL_PRINT(st.otpw_count, DEC); + if (st.otpw_count > 0) SERIAL_ECHO(st.otpw_count); SERIAL_CHAR('\t'); } @@ -271,7 +271,7 @@ st.rms_current(I_rms); #if ENABLED(REPORT_CURRENT_CHANGE) st.printLabel(); - SERIAL_ECHOLNPAIR(" current decreased to ", I_rms); + SERIAL_ECHOLNPGM(" current decreased to ", I_rms); #endif } } @@ -417,6 +417,21 @@ } #endif + #if AXIS_IS_TMC(I) + if (monitor_tmc_driver(stepperI, need_update_error_counters, need_debug_reporting)) + step_current_down(stepperI); + #endif + + #if AXIS_IS_TMC(J) + if (monitor_tmc_driver(stepperJ, need_update_error_counters, need_debug_reporting)) + step_current_down(stepperJ); + #endif + + #if AXIS_IS_TMC(K) + if (monitor_tmc_driver(stepperK, need_update_error_counters, need_debug_reporting)) + step_current_down(stepperK); + #endif + #if AXIS_IS_TMC(E0) (void)monitor_tmc_driver(stepperE0, need_update_error_counters, need_debug_reporting); #endif @@ -546,13 +561,13 @@ }; template - static void print_vsense(TMC &st) { serialprintPGM(st.vsense() ? PSTR("1=.18") : PSTR("0=.325")); } + static void print_vsense(TMC &st) { SERIAL_ECHOPGM_P(st.vsense() ? PSTR("1=.18") : PSTR("0=.325")); } #if HAS_DRIVER(TMC2130) || HAS_DRIVER(TMC5130) static void _tmc_status(TMC2130Stepper &st, const TMC_debug_enum i) { switch (i) { - case TMC_PWM_SCALE: SERIAL_PRINT(st.PWM_SCALE(), DEC); break; - case TMC_SGT: SERIAL_PRINT(st.sgt(), DEC); break; + case TMC_PWM_SCALE: SERIAL_ECHO(st.PWM_SCALE()); break; + case TMC_SGT: SERIAL_ECHO(st.sgt()); break; case TMC_STEALTHCHOP: serialprint_truefalse(st.en_pwm_mode()); break; case TMC_INTERPOLATE: serialprint_truefalse(st.intpol()); break; default: break; @@ -563,9 +578,9 @@ static void _tmc_parse_drv_status(TMC2130Stepper &st, const TMC_drv_status_enum i) { switch (i) { case TMC_STALLGUARD: if (st.stallguard()) SERIAL_CHAR('*'); break; - case TMC_SG_RESULT: SERIAL_PRINT(st.sg_result(), DEC); break; + case TMC_SG_RESULT: SERIAL_ECHO(st.sg_result()); break; case TMC_FSACTIVE: if (st.fsactive()) SERIAL_CHAR('*'); break; - case TMC_DRV_CS_ACTUAL: SERIAL_PRINT(st.cs_actual(), DEC); break; + case TMC_DRV_CS_ACTUAL: SERIAL_ECHO(st.cs_actual()); break; default: break; } } @@ -580,13 +595,13 @@ static void _tmc_status(TMC2160Stepper &st, const TMC_debug_enum i) { switch (i) { - case TMC_PWM_SCALE: SERIAL_PRINT(st.PWM_SCALE(), DEC); break; - case TMC_SGT: SERIAL_PRINT(st.sgt(), DEC); break; + case TMC_PWM_SCALE: SERIAL_ECHO(st.PWM_SCALE()); break; + case TMC_SGT: SERIAL_ECHO(st.sgt()); break; case TMC_STEALTHCHOP: serialprint_truefalse(st.en_pwm_mode()); break; case TMC_GLOBAL_SCALER: { uint16_t value = st.GLOBAL_SCALER(); - SERIAL_PRINT(value ?: 256, DEC); + SERIAL_ECHO(value ? value : 256); SERIAL_ECHOPGM("/256"); } break; @@ -599,10 +614,10 @@ #if HAS_TMC220x static void _tmc_status(TMC2208Stepper &st, const TMC_debug_enum i) { switch (i) { - case TMC_PWM_SCALE_SUM: SERIAL_PRINT(st.pwm_scale_sum(), DEC); break; - case TMC_PWM_SCALE_AUTO: SERIAL_PRINT(st.pwm_scale_auto(), DEC); break; - case TMC_PWM_OFS_AUTO: SERIAL_PRINT(st.pwm_ofs_auto(), DEC); break; - case TMC_PWM_GRAD_AUTO: SERIAL_PRINT(st.pwm_grad_auto(), DEC); break; + case TMC_PWM_SCALE_SUM: SERIAL_ECHO(st.pwm_scale_sum()); break; + case TMC_PWM_SCALE_AUTO: SERIAL_ECHO(st.pwm_scale_auto()); break; + case TMC_PWM_OFS_AUTO: SERIAL_ECHO(st.pwm_ofs_auto()); break; + case TMC_PWM_GRAD_AUTO: SERIAL_ECHO(st.pwm_grad_auto()); break; case TMC_STEALTHCHOP: serialprint_truefalse(st.stealth()); break; case TMC_INTERPOLATE: serialprint_truefalse(st.intpol()); break; default: break; @@ -613,8 +628,8 @@ template static void _tmc_status(TMCMarlin &st, const TMC_debug_enum i) { switch (i) { - case TMC_SGT: SERIAL_PRINT(st.SGTHRS(), DEC); break; - case TMC_UART_ADDR: SERIAL_PRINT(st.get_address(), DEC); break; + case TMC_SGT: SERIAL_ECHO(st.SGTHRS()); break; + case TMC_UART_ADDR: SERIAL_ECHO(st.get_address()); break; default: TMC2208Stepper *parent = &st; _tmc_status(*parent, i); @@ -631,7 +646,7 @@ case TMC_T120: if (st.t120()) SERIAL_CHAR('*'); break; case TMC_S2VSA: if (st.s2vsa()) SERIAL_CHAR('*'); break; case TMC_S2VSB: if (st.s2vsb()) SERIAL_CHAR('*'); break; - case TMC_DRV_CS_ACTUAL: SERIAL_PRINT(st.cs_actual(), DEC); break; + case TMC_DRV_CS_ACTUAL: SERIAL_ECHO(st.cs_actual()); break; default: break; } } @@ -639,7 +654,7 @@ #if HAS_DRIVER(TMC2209) static void _tmc_parse_drv_status(TMC2209Stepper &st, const TMC_drv_status_enum i) { switch (i) { - case TMC_SG_RESULT: SERIAL_PRINT(st.SG_RESULT(), DEC); break; + case TMC_SG_RESULT: SERIAL_ECHO(st.SG_RESULT()); break; default: _tmc_parse_drv_status(static_cast(st), i); break; } } @@ -666,15 +681,15 @@ case TMC_RMS_CURRENT: SERIAL_ECHO(st.rms_current()); break; case TMC_MAX_CURRENT: SERIAL_PRINT((float)st.rms_current() * 1.41, 0); break; case TMC_IRUN: - SERIAL_PRINT(st.irun(), DEC); + SERIAL_ECHO(st.irun()); SERIAL_ECHOPGM("/31"); break; case TMC_IHOLD: - SERIAL_PRINT(st.ihold(), DEC); + SERIAL_ECHO(st.ihold()); SERIAL_ECHOPGM("/31"); break; case TMC_CS_ACTUAL: - SERIAL_PRINT(st.cs_actual(), DEC); + SERIAL_ECHO(st.cs_actual()); SERIAL_ECHOPGM("/31"); break; case TMC_VSENSE: print_vsense(st); break; @@ -694,11 +709,11 @@ #if ENABLED(MONITOR_DRIVER_STATUS) case TMC_OTPW_TRIGGERED: serialprint_truefalse(st.getOTPW()); break; #endif - case TMC_TOFF: SERIAL_PRINT(st.toff(), DEC); break; - case TMC_TBL: SERIAL_PRINT(st.blank_time(), DEC); break; - case TMC_HEND: SERIAL_PRINT(st.hysteresis_end(), DEC); break; - case TMC_HSTRT: SERIAL_PRINT(st.hysteresis_start(), DEC); break; - case TMC_MSCNT: SERIAL_PRINT(st.get_microstep_counter(), DEC); break; + case TMC_TOFF: SERIAL_ECHO(st.toff()); break; + case TMC_TBL: SERIAL_ECHO(st.blank_time()); break; + case TMC_HEND: SERIAL_ECHO(st.hysteresis_end()); break; + case TMC_HSTRT: SERIAL_ECHO(st.hysteresis_start()); break; + case TMC_MSCNT: SERIAL_ECHO(st.get_microstep_counter()); break; default: _tmc_status(st, i); break; } } @@ -714,18 +729,18 @@ case TMC_RMS_CURRENT: SERIAL_ECHO(st.rms_current()); break; case TMC_MAX_CURRENT: SERIAL_PRINT((float)st.rms_current() * 1.41, 0); break; case TMC_IRUN: - SERIAL_PRINT(st.cs(), DEC); + SERIAL_ECHO(st.cs()); SERIAL_ECHOPGM("/31"); break; - case TMC_VSENSE: serialprintPGM(st.vsense() ? PSTR("1=.165") : PSTR("0=.310")); break; + case TMC_VSENSE: SERIAL_ECHOPGM_P(st.vsense() ? PSTR("1=.165") : PSTR("0=.310")); break; case TMC_MICROSTEPS: SERIAL_ECHO(st.microsteps()); break; //case TMC_OTPW: serialprint_truefalse(st.otpw()); break; //case TMC_OTPW_TRIGGERED: serialprint_truefalse(st.getOTPW()); break; - case TMC_SGT: SERIAL_PRINT(st.sgt(), DEC); break; - case TMC_TOFF: SERIAL_PRINT(st.toff(), DEC); break; - case TMC_TBL: SERIAL_PRINT(st.blank_time(), DEC); break; - case TMC_HEND: SERIAL_PRINT(st.hysteresis_end(), DEC); break; - case TMC_HSTRT: SERIAL_PRINT(st.hysteresis_start(), DEC); break; + case TMC_SGT: SERIAL_ECHO(st.sgt()); break; + case TMC_TOFF: SERIAL_ECHO(st.toff()); break; + case TMC_TBL: SERIAL_ECHO(st.blank_time()); break; + case TMC_HEND: SERIAL_ECHO(st.hysteresis_end()); break; + case TMC_HSTRT: SERIAL_ECHO(st.hysteresis_start()); break; default: break; } } @@ -757,128 +772,148 @@ } } - static void tmc_debug_loop(const TMC_debug_enum i, const bool print_x, const bool print_y, const bool print_z, const bool print_e) { - if (print_x) { + static void tmc_debug_loop(const TMC_debug_enum n, LOGICAL_AXIS_ARGS(const bool)) { + if (x) { #if AXIS_IS_TMC(X) - tmc_status(stepperX, i); + tmc_status(stepperX, n); #endif #if AXIS_IS_TMC(X2) - tmc_status(stepperX2, i); + tmc_status(stepperX2, n); #endif } - if (print_y) { + if (TERN0(HAS_Y_AXIS, y)) { #if AXIS_IS_TMC(Y) - tmc_status(stepperY, i); + tmc_status(stepperY, n); #endif #if AXIS_IS_TMC(Y2) - tmc_status(stepperY2, i); + tmc_status(stepperY2, n); #endif } - if (print_z) { + if (TERN0(HAS_Z_AXIS, z)) { #if AXIS_IS_TMC(Z) - tmc_status(stepperZ, i); + tmc_status(stepperZ, n); #endif #if AXIS_IS_TMC(Z2) - tmc_status(stepperZ2, i); + tmc_status(stepperZ2, n); #endif #if AXIS_IS_TMC(Z3) - tmc_status(stepperZ3, i); + tmc_status(stepperZ3, n); #endif #if AXIS_IS_TMC(Z4) - tmc_status(stepperZ4, i); + tmc_status(stepperZ4, n); #endif } - if (print_e) { + #if AXIS_IS_TMC(I) + if (i) tmc_status(stepperI, n); + #endif + #if AXIS_IS_TMC(J) + if (j) tmc_status(stepperJ, n); + #endif + #if AXIS_IS_TMC(K) + if (k) tmc_status(stepperK, n); + #endif + + if (TERN0(HAS_EXTRUDERS, e)) { #if AXIS_IS_TMC(E0) - tmc_status(stepperE0, i); + tmc_status(stepperE0, n); #endif #if AXIS_IS_TMC(E1) - tmc_status(stepperE1, i); + tmc_status(stepperE1, n); #endif #if AXIS_IS_TMC(E2) - tmc_status(stepperE2, i); + tmc_status(stepperE2, n); #endif #if AXIS_IS_TMC(E3) - tmc_status(stepperE3, i); + tmc_status(stepperE3, n); #endif #if AXIS_IS_TMC(E4) - tmc_status(stepperE4, i); + tmc_status(stepperE4, n); #endif #if AXIS_IS_TMC(E5) - tmc_status(stepperE5, i); + tmc_status(stepperE5, n); #endif #if AXIS_IS_TMC(E6) - tmc_status(stepperE6, i); + tmc_status(stepperE6, n); #endif #if AXIS_IS_TMC(E7) - tmc_status(stepperE7, i); + tmc_status(stepperE7, n); #endif } SERIAL_EOL(); } - static void drv_status_loop(const TMC_drv_status_enum i, const bool print_x, const bool print_y, const bool print_z, const bool print_e) { - if (print_x) { + static void drv_status_loop(const TMC_drv_status_enum n, LOGICAL_AXIS_ARGS(const bool)) { + if (x) { #if AXIS_IS_TMC(X) - tmc_parse_drv_status(stepperX, i); + tmc_parse_drv_status(stepperX, n); #endif #if AXIS_IS_TMC(X2) - tmc_parse_drv_status(stepperX2, i); + tmc_parse_drv_status(stepperX2, n); #endif } - if (print_y) { + if (TERN0(HAS_Y_AXIS, y)) { #if AXIS_IS_TMC(Y) - tmc_parse_drv_status(stepperY, i); + tmc_parse_drv_status(stepperY, n); #endif #if AXIS_IS_TMC(Y2) - tmc_parse_drv_status(stepperY2, i); + tmc_parse_drv_status(stepperY2, n); #endif } - if (print_z) { + if (TERN0(HAS_Z_AXIS, z)) { #if AXIS_IS_TMC(Z) - tmc_parse_drv_status(stepperZ, i); + tmc_parse_drv_status(stepperZ, n); #endif #if AXIS_IS_TMC(Z2) - tmc_parse_drv_status(stepperZ2, i); + tmc_parse_drv_status(stepperZ2, n); #endif #if AXIS_IS_TMC(Z3) - tmc_parse_drv_status(stepperZ3, i); + tmc_parse_drv_status(stepperZ3, n); #endif #if AXIS_IS_TMC(Z4) - tmc_parse_drv_status(stepperZ4, i); + tmc_parse_drv_status(stepperZ4, n); #endif } - if (print_e) { + #if AXIS_IS_TMC(I) + if (i) tmc_parse_drv_status(stepperI, n); + #endif + #if AXIS_IS_TMC(J) + if (j) tmc_parse_drv_status(stepperJ, n); + #endif + #if AXIS_IS_TMC(K) + if (k) tmc_parse_drv_status(stepperK, n); + #endif + + if (TERN0(HAS_EXTRUDERS, e)) { #if AXIS_IS_TMC(E0) - tmc_parse_drv_status(stepperE0, i); + tmc_parse_drv_status(stepperE0, n); #endif #if AXIS_IS_TMC(E1) - tmc_parse_drv_status(stepperE1, i); + tmc_parse_drv_status(stepperE1, n); #endif #if AXIS_IS_TMC(E2) - tmc_parse_drv_status(stepperE2, i); + tmc_parse_drv_status(stepperE2, n); #endif #if AXIS_IS_TMC(E3) - tmc_parse_drv_status(stepperE3, i); + tmc_parse_drv_status(stepperE3, n); #endif #if AXIS_IS_TMC(E4) - tmc_parse_drv_status(stepperE4, i); + tmc_parse_drv_status(stepperE4, n); #endif #if AXIS_IS_TMC(E5) - tmc_parse_drv_status(stepperE5, i); + tmc_parse_drv_status(stepperE5, n); #endif #if AXIS_IS_TMC(E6) - tmc_parse_drv_status(stepperE6, i); + tmc_parse_drv_status(stepperE6, n); #endif #if AXIS_IS_TMC(E7) - tmc_parse_drv_status(stepperE7, i); + tmc_parse_drv_status(stepperE7, n); #endif } @@ -889,9 +924,10 @@ * M122 report functions */ - void tmc_report_all(bool print_x, const bool print_y, const bool print_z, const bool print_e) { - #define TMC_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_debug_loop(ITEM, print_x, print_y, print_z, print_e); }while(0) - #define DRV_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); drv_status_loop(ITEM, print_x, print_y, print_z, print_e); }while(0) + void tmc_report_all(LOGICAL_AXIS_ARGS(const bool)) { + #define TMC_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_debug_loop(ITEM, LOGICAL_AXIS_ARGS()); }while(0) + #define DRV_REPORT(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); drv_status_loop(ITEM, LOGICAL_AXIS_ARGS()); }while(0) + TMC_REPORT("\t", TMC_CODES); #if HAS_DRIVER(TMC2209) TMC_REPORT("Address\t", TMC_UART_ADDR); @@ -1015,72 +1051,82 @@ } #endif - static void tmc_get_registers(TMC_get_registers_enum i, const bool print_x, const bool print_y, const bool print_z, const bool print_e) { - if (print_x) { + static void tmc_get_registers(TMC_get_registers_enum n, LOGICAL_AXIS_ARGS(const bool)) { + if (x) { #if AXIS_IS_TMC(X) - tmc_get_registers(stepperX, i); + tmc_get_registers(stepperX, n); #endif #if AXIS_IS_TMC(X2) - tmc_get_registers(stepperX2, i); + tmc_get_registers(stepperX2, n); #endif } - if (print_y) { + if (TERN0(HAS_Y_AXIS, y)) { #if AXIS_IS_TMC(Y) - tmc_get_registers(stepperY, i); + tmc_get_registers(stepperY, n); #endif #if AXIS_IS_TMC(Y2) - tmc_get_registers(stepperY2, i); + tmc_get_registers(stepperY2, n); #endif } - if (print_z) { + if (TERN0(HAS_Z_AXIS, z)) { #if AXIS_IS_TMC(Z) - tmc_get_registers(stepperZ, i); + tmc_get_registers(stepperZ, n); #endif #if AXIS_IS_TMC(Z2) - tmc_get_registers(stepperZ2, i); + tmc_get_registers(stepperZ2, n); #endif #if AXIS_IS_TMC(Z3) - tmc_get_registers(stepperZ3, i); + tmc_get_registers(stepperZ3, n); #endif #if AXIS_IS_TMC(Z4) - tmc_get_registers(stepperZ4, i); + tmc_get_registers(stepperZ4, n); #endif } - if (print_e) { + #if AXIS_IS_TMC(I) + if (i) tmc_get_registers(stepperI, n); + #endif + #if AXIS_IS_TMC(J) + if (j) tmc_get_registers(stepperJ, n); + #endif + #if AXIS_IS_TMC(K) + if (k) tmc_get_registers(stepperK, n); + #endif + + if (TERN0(HAS_EXTRUDERS, e)) { #if AXIS_IS_TMC(E0) - tmc_get_registers(stepperE0, i); + tmc_get_registers(stepperE0, n); #endif #if AXIS_IS_TMC(E1) - tmc_get_registers(stepperE1, i); + tmc_get_registers(stepperE1, n); #endif #if AXIS_IS_TMC(E2) - tmc_get_registers(stepperE2, i); + tmc_get_registers(stepperE2, n); #endif #if AXIS_IS_TMC(E3) - tmc_get_registers(stepperE3, i); + tmc_get_registers(stepperE3, n); #endif #if AXIS_IS_TMC(E4) - tmc_get_registers(stepperE4, i); + tmc_get_registers(stepperE4, n); #endif #if AXIS_IS_TMC(E5) - tmc_get_registers(stepperE5, i); + tmc_get_registers(stepperE5, n); #endif #if AXIS_IS_TMC(E6) - tmc_get_registers(stepperE6, i); + tmc_get_registers(stepperE6, n); #endif #if AXIS_IS_TMC(E7) - tmc_get_registers(stepperE7, i); + tmc_get_registers(stepperE7, n); #endif } SERIAL_EOL(); } - void tmc_get_registers(bool print_x, bool print_y, bool print_z, bool print_e) { - #define _TMC_GET_REG(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_get_registers(ITEM, print_x, print_y, print_z, print_e); }while(0) + void tmc_get_registers(LOGICAL_AXIS_ARGS(bool)) { + #define _TMC_GET_REG(LABEL, ITEM) do{ SERIAL_ECHOPGM(LABEL); tmc_get_registers(ITEM, LOGICAL_AXIS_ARGS()); }while(0) #define TMC_GET_REG(NAME, TABS) _TMC_GET_REG(STRINGIFY(NAME) TABS, TMC_GET_##NAME) _TMC_GET_REG("\t", TMC_AXIS_CODES); TMC_GET_REG(GCONF, "\t\t"); @@ -1165,6 +1211,15 @@ #if AXIS_HAS_SPI(Z4) SET_CS_PIN(Z4); #endif + #if AXIS_HAS_SPI(I) + SET_CS_PIN(I); + #endif + #if AXIS_HAS_SPI(J) + SET_CS_PIN(J); + #endif + #if AXIS_HAS_SPI(K) + SET_CS_PIN(K); + #endif #if AXIS_HAS_SPI(E0) SET_CS_PIN(E0); #endif @@ -1208,16 +1263,16 @@ static bool test_connection(TMC &st) { case 1: stat = PSTR("HIGH"); break; case 2: stat = PSTR("LOW"); break; } - serialprintPGM(stat); + SERIAL_ECHOPGM_P(stat); SERIAL_EOL(); return test_result; } -void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z, const bool test_e) { +void test_tmc_connection(LOGICAL_AXIS_ARGS(const bool)) { uint8_t axis_connection = 0; - if (test_x) { + if (x) { #if AXIS_IS_TMC(X) axis_connection += test_connection(stepperX); #endif @@ -1226,7 +1281,7 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z #endif } - if (test_y) { + if (TERN0(HAS_Y_AXIS, y)) { #if AXIS_IS_TMC(Y) axis_connection += test_connection(stepperY); #endif @@ -1235,7 +1290,7 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z #endif } - if (test_z) { + if (TERN0(HAS_Z_AXIS, z)) { #if AXIS_IS_TMC(Z) axis_connection += test_connection(stepperZ); #endif @@ -1250,7 +1305,17 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z #endif } - if (test_e) { + #if AXIS_IS_TMC(I) + if (i) axis_connection += test_connection(stepperI); + #endif + #if AXIS_IS_TMC(J) + if (j) axis_connection += test_connection(stepperJ); + #endif + #if AXIS_IS_TMC(K) + if (k) axis_connection += test_connection(stepperK); + #endif + + if (TERN0(HAS_EXTRUDERS, e)) { #if AXIS_IS_TMC(E0) axis_connection += test_connection(stepperE0); #endif diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index b21b89f68bcb..1f7d5cf1a543 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -70,9 +70,9 @@ class TMCStorage { } struct { - TERN_(HAS_STEALTHCHOP, bool stealthChop_enabled = false); - TERN_(HYBRID_THRESHOLD, uint8_t hybrid_thrs = 0); - TERN_(USE_SENSORLESS, int16_t homing_thrs = 0); + OPTCODE(HAS_STEALTHCHOP, bool stealthChop_enabled = false) + OPTCODE(HYBRID_THRESHOLD, uint8_t hybrid_thrs = 0) + OPTCODE(USE_SENSORLESS, int16_t homing_thrs = 0) } stored; }; @@ -300,7 +300,7 @@ class TMCMarlin : public TMC266 template void tmc_print_current(TMC &st) { st.printLabel(); - SERIAL_ECHOLNPAIR(" driver current: ", st.getMilliamps()); + SERIAL_ECHOLNPGM(" driver current: ", st.getMilliamps()); } #if ENABLED(MONITOR_DRIVER_STATUS) @@ -322,7 +322,7 @@ void tmc_print_current(TMC &st) { template void tmc_print_pwmthrs(TMC &st) { st.printLabel(); - SERIAL_ECHOLNPAIR(" stealthChop max speed: ", st.get_pwm_thrs()); + SERIAL_ECHOLNPGM(" stealthChop max speed: ", st.get_pwm_thrs()); } #endif #if USE_SENSORLESS @@ -330,19 +330,19 @@ void tmc_print_current(TMC &st) { void tmc_print_sgt(TMC &st) { st.printLabel(); SERIAL_ECHOPGM(" homing sensitivity: "); - SERIAL_PRINTLN(st.homing_threshold(), DEC); + SERIAL_PRINTLN(st.homing_threshold(), PrintBase::Dec); } #endif void monitor_tmc_drivers(); -void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z, const bool test_e); +void test_tmc_connection(LOGICAL_AXIS_DECL(const bool, true)); #if ENABLED(TMC_DEBUG) #if ENABLED(MONITOR_DRIVER_STATUS) void tmc_set_report_interval(const uint16_t update_interval); #endif - void tmc_report_all(const bool print_x, const bool print_y, const bool print_z, const bool print_e); - void tmc_get_registers(const bool print_x, const bool print_y, const bool print_z, const bool print_e); + void tmc_report_all(LOGICAL_AXIS_DECL(const bool, true)); + void tmc_get_registers(LOGICAL_AXIS_ARGS(const bool)); #endif /** @@ -355,16 +355,11 @@ void test_tmc_connection(const bool test_x, const bool test_y, const bool test_z #if USE_SENSORLESS // Track enabled status of stealthChop and only re-enable where applicable - struct sensorless_t { bool x, y, z, x2, y2, z2, z3, z4; }; + struct sensorless_t { bool LINEAR_AXIS_ARGS(), x2, y2, z2, z3, z4; }; #if ENABLED(IMPROVE_HOMING_RELIABILITY) extern millis_t sg_guard_period; constexpr uint16_t default_sg_guard_duration = 400; - - struct slow_homing_t { - xy_ulong_t acceleration; - TERN_(HAS_CLASSIC_JERK, xy_float_t jerk_xy); - }; #endif bool tmc_enable_stallguard(TMC2130Stepper &st); diff --git a/Marlin/src/feature/tramming.h b/Marlin/src/feature/tramming.h index eb27fe82fe2a..925659e29db2 100644 --- a/Marlin/src/feature/tramming.h +++ b/Marlin/src/feature/tramming.h @@ -28,12 +28,12 @@ #error "TRAMMING_SCREW_THREAD must be equal to 30, 31, 40, 41, 50, or 51." #endif -constexpr xy_pos_t screws_tilt_adjust_pos[] = TRAMMING_POINT_XY; +constexpr xy_pos_t tramming_points[] = TRAMMING_POINT_XY; -#define G35_PROBE_COUNT COUNT(screws_tilt_adjust_pos) +#define G35_PROBE_COUNT COUNT(tramming_points) static_assert(WITHIN(G35_PROBE_COUNT, 3, 6), "TRAMMING_POINT_XY requires between 3 and 6 XY positions."); -#define VALIDATE_TRAMMING_POINT(N) static_assert(N >= G35_PROBE_COUNT || Probe::build_time::can_reach(screws_tilt_adjust_pos[N]), \ +#define VALIDATE_TRAMMING_POINT(N) static_assert(N >= G35_PROBE_COUNT || Probe::build_time::can_reach(tramming_points[N]), \ "TRAMMING_POINT_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.") VALIDATE_TRAMMING_POINT(0); VALIDATE_TRAMMING_POINT(1); VALIDATE_TRAMMING_POINT(2); VALIDATE_TRAMMING_POINT(3); VALIDATE_TRAMMING_POINT(4); VALIDATE_TRAMMING_POINT(5); diff --git a/Marlin/src/feature/twibus.cpp b/Marlin/src/feature/twibus.cpp index 855a3188d10c..5f5209cdd480 100644 --- a/Marlin/src/feature/twibus.cpp +++ b/Marlin/src/feature/twibus.cpp @@ -83,8 +83,8 @@ void TWIBus::send() { // static void TWIBus::echoprefix(uint8_t bytes, const char pref[], uint8_t adr) { SERIAL_ECHO_START(); - serialprintPGM(pref); - SERIAL_ECHOPAIR(": from:", adr, " bytes:", bytes, " data:"); + SERIAL_ECHOPGM_P(pref); + SERIAL_ECHOPGM(": from:", adr, " bytes:", bytes, " data:"); } // static @@ -172,7 +172,7 @@ void TWIBus::flush() { // static void TWIBus::prefix(const char func[]) { SERIAL_ECHOPGM("TWIBus::"); - serialprintPGM(func); + SERIAL_ECHOPGM_P(func); SERIAL_ECHOPGM(": "); } void TWIBus::debug(const char func[], uint32_t adr) { diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index 5a79aaac7bc2..ba14e6f0b484 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -113,6 +113,14 @@ #include "../../module/temperature.h" #include "../../lcd/marlinui.h" +#if ENABLED(EXTENSIBLE_UI) + #include "../../lcd/extui/ui_api.h" +#endif + +#if ENABLED(UBL_HILBERT_CURVE) + #include "../../feature/bedlevel/hilbert_curve.h" +#endif + #define EXTRUSION_MULTIPLIER 1.0 #define PRIME_LENGTH 10.0 #define OOZE_AMOUNT 0.3 @@ -145,24 +153,9 @@ constexpr float g26_e_axis_feedrate = 0.025; -static MeshFlags circle_flags, horizontal_mesh_line_flags, vertical_mesh_line_flags; +static MeshFlags circle_flags; float g26_random_deviation = 0.0; -static bool g26_retracted = false; // Track the retracted state of the nozzle so mismatched - // retracts/recovers won't result in a bad state. - -float g26_extrusion_multiplier, - g26_retraction_multiplier, - g26_layer_height, - g26_prime_length; - -xy_pos_t g26_xy_pos; // = { 0, 0 } - -int16_t g26_bed_temp, - g26_hotend_temp; - -int8_t g26_prime_flag; - #if HAS_LCD_MENU /** @@ -178,52 +171,17 @@ int8_t g26_prime_flag; #endif -mesh_index_pair find_closest_circle_to_print(const xy_pos_t &pos) { - float closest = 99999.99; - mesh_index_pair out_point; - - out_point.pos = -1; - - GRID_LOOP(i, j) { - if (!circle_flags.marked(i, j)) { - // We found a circle that needs to be printed - const xy_pos_t m = { _GET_MESH_X(i), _GET_MESH_Y(j) }; - - // Get the distance to this intersection - float f = (pos - m).magnitude(); - - // It is possible that we are being called with the values - // to let us find the closest circle to the start position. - // But if this is not the case, add a small weighting to the - // distance calculation to help it choose a better place to continue. - f += (g26_xy_pos - m).magnitude() / 15.0f; - - // Add the specified amount of Random Noise to our search - if (g26_random_deviation > 1.0) f += random(0.0, g26_random_deviation); - - if (f < closest) { - closest = f; // Found a closer un-printed location - out_point.pos.set(i, j); // Save its data - out_point.distance = closest; - } - } - } - circle_flags.mark(out_point); // Mark this location as done. - return out_point; -} - -void move_to(const float &rx, const float &ry, const float &z, const float &e_delta) { +void move_to(const_float_t rx, const_float_t ry, const_float_t z, const_float_t e_delta) { static float last_z = -999.99; const xy_pos_t dest = { rx, ry }; - const bool has_xy_component = dest != current_position; // Check if X or Y is involved in the movement. - const bool has_e_component = e_delta != 0.0; - - destination = current_position; + const bool has_xy_component = dest != current_position, // Check if X or Y is involved in the movement. + has_e_component = e_delta != 0.0; if (z != last_z) { - last_z = destination.z = z; + last_z = z; + destination.set(current_position.x, current_position.y, z, current_position.e); const feedRate_t fr_mm_s = planner.settings.max_feedrate_mm_s[Z_AXIS] * 0.5f; // Use half of the Z_AXIS max feed rate prepare_internal_move_to_destination(fr_mm_s); } @@ -239,233 +197,286 @@ void move_to(const float &rx, const float &ry, const float &z, const float &e_de prepare_internal_move_to_destination(fr_mm_s); } -FORCE_INLINE void move_to(const xyz_pos_t &where, const float &de) { move_to(where.x, where.y, where.z, de); } +void move_to(const xyz_pos_t &where, const_float_t de) { move_to(where.x, where.y, where.z, de); } -void retract_filament(const xyz_pos_t &where) { - if (!g26_retracted) { // Only retract if we are not already retracted! - g26_retracted = true; - move_to(where, -1.0f * g26_retraction_multiplier); - } -} +typedef struct { + float extrusion_multiplier = EXTRUSION_MULTIPLIER, + retraction_multiplier = G26_RETRACT_MULTIPLIER, + layer_height = MESH_TEST_LAYER_HEIGHT, + prime_length = PRIME_LENGTH; -// TODO: Parameterize the Z lift with a define -void retract_lift_move(const xyz_pos_t &s) { - retract_filament(destination); - move_to(current_position.x, current_position.y, current_position.z + 0.5f, 0.0); // Z lift to minimize scraping - move_to(s.x, s.y, s.z + 0.5f, 0.0); // Get to the starting point with no extrusion while lifted -} + celsius_t bed_temp = MESH_TEST_BED_TEMP, + hotend_temp = MESH_TEST_HOTEND_TEMP; + + float nozzle = MESH_TEST_NOZZLE_SIZE, + filament_diameter = DEFAULT_NOMINAL_FILAMENT_DIA, + ooze_amount; // 'O' ... OOZE_AMOUNT + + bool continue_with_closest, // 'C' + keep_heaters_on; // 'K' + + xy_pos_t xy_pos; // = { 0, 0 } + + int8_t prime_flag = 0; + + bool g26_retracted = false; // Track the retracted state during G26 so mismatched + // retracts/recovers don't result in a bad state. -void recover_filament(const xyz_pos_t &where) { - if (g26_retracted) { // Only un-retract if we are retracted. - move_to(where, 1.2f * g26_retraction_multiplier); - g26_retracted = false; + void retract_filament(const xyz_pos_t &where) { + if (!g26_retracted) { // Only retract if we are not already retracted! + g26_retracted = true; + move_to(where, -1.0f * retraction_multiplier); + } } -} -/** - * print_line_from_here_to_there() takes two cartesian coordinates and draws a line from one - * to the other. But there are really three sets of coordinates involved. The first coordinate - * is the present location of the nozzle. We don't necessarily want to print from this location. - * We first need to move the nozzle to the start of line segment where we want to print. Once - * there, we can use the two coordinates supplied to draw the line. - * - * Note: Although we assume the first set of coordinates is the start of the line and the second - * set of coordinates is the end of the line, it does not always work out that way. This function - * optimizes the movement to minimize the travel distance before it can start printing. This saves - * a lot of time and eliminates a lot of nonsensical movement of the nozzle. However, it does - * cause a lot of very little short retracement of th nozzle when it draws the very first line - * segment of a 'circle'. The time this requires is very short and is easily saved by the other - * cases where the optimization comes into play. - */ -void print_line_from_here_to_there(const xyz_pos_t &s, const xyz_pos_t &e) { + // TODO: Parameterize the Z lift with a define + void retract_lift_move(const xyz_pos_t &s) { + retract_filament(destination); + move_to(current_position.x, current_position.y, current_position.z + 0.5f, 0.0f); // Z lift to minimize scraping + move_to(s.x, s.y, s.z + 0.5f, 0.0f); // Get to the starting point with no extrusion while lifted + } - // Distances to the start / end of the line - xy_float_t svec = current_position - s, evec = current_position - e; + void recover_filament(const xyz_pos_t &where) { + if (g26_retracted) { // Only un-retract if we are retracted. + move_to(where, 1.2f * retraction_multiplier); + g26_retracted = false; + } + } - const float dist_start = HYPOT2(svec.x, svec.y), - dist_end = HYPOT2(evec.x, evec.y), - line_length = HYPOT(e.x - s.x, e.y - s.y); + /** + * print_line_from_here_to_there() takes two cartesian coordinates and draws a line from one + * to the other. But there are really three sets of coordinates involved. The first coordinate + * is the present location of the nozzle. We don't necessarily want to print from this location. + * We first need to move the nozzle to the start of line segment where we want to print. Once + * there, we can use the two coordinates supplied to draw the line. + * + * Note: Although we assume the first set of coordinates is the start of the line and the second + * set of coordinates is the end of the line, it does not always work out that way. This function + * optimizes the movement to minimize the travel distance before it can start printing. This saves + * a lot of time and eliminates a lot of nonsensical movement of the nozzle. However, it does + * cause a lot of very little short retracement of th nozzle when it draws the very first line + * segment of a 'circle'. The time this requires is very short and is easily saved by the other + * cases where the optimization comes into play. + */ + void print_line_from_here_to_there(const xyz_pos_t &s, const xyz_pos_t &e) { - // If the end point of the line is closer to the nozzle, flip the direction, - // moving from the end to the start. On very small lines the optimization isn't worth it. - if (dist_end < dist_start && (INTERSECTION_CIRCLE_RADIUS) < ABS(line_length)) - return print_line_from_here_to_there(e, s); + // Distances to the start / end of the line + xy_float_t svec = current_position - s, evec = current_position - e; - // Decide whether to retract & lift - if (dist_start > 2.0) retract_lift_move(s); + const float dist_start = HYPOT2(svec.x, svec.y), + dist_end = HYPOT2(evec.x, evec.y), + line_length = HYPOT(e.x - s.x, e.y - s.y); - move_to(s, 0.0); // Get to the starting point with no extrusion / un-Z lift + // If the end point of the line is closer to the nozzle, flip the direction, + // moving from the end to the start. On very small lines the optimization isn't worth it. + if (dist_end < dist_start && (INTERSECTION_CIRCLE_RADIUS) < ABS(line_length)) + return print_line_from_here_to_there(e, s); - const float e_pos_delta = line_length * g26_e_axis_feedrate * g26_extrusion_multiplier; + // Decide whether to retract & lift + if (dist_start > 2.0) retract_lift_move(s); - recover_filament(destination); - move_to(e, e_pos_delta); // Get to the ending point with an appropriate amount of extrusion -} + move_to(s, 0.0); // Get to the starting point with no extrusion / un-Z lift + + const float e_pos_delta = line_length * g26_e_axis_feedrate * extrusion_multiplier; -inline bool look_for_lines_to_connect() { - xyz_pos_t s, e; - s.z = e.z = g26_layer_height; + recover_filament(destination); + move_to(e, e_pos_delta); // Get to the ending point with an appropriate amount of extrusion + } - GRID_LOOP(i, j) { + void connect_neighbor_with_line(const xy_int8_t &p1, int8_t dx, int8_t dy) { + xy_int8_t p2; + p2.x = p1.x + dx; + p2.y = p1.y + dy; + + if (p2.x < 0 || p2.x >= (GRID_MAX_POINTS_X)) return; + if (p2.y < 0 || p2.y >= (GRID_MAX_POINTS_Y)) return; + + if (circle_flags.marked(p1.x, p1.y) && circle_flags.marked(p2.x, p2.y)) { + xyz_pos_t s, e; + s.x = _GET_MESH_X(p1.x) + (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)) * dx; + e.x = _GET_MESH_X(p2.x) - (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)) * dx; + s.y = _GET_MESH_Y(p1.y) + (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)) * dy; + e.y = _GET_MESH_Y(p2.y) - (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)) * dy; + s.z = e.z = layer_height; + + #if HAS_ENDSTOPS + LIMIT(s.y, Y_MIN_POS + 1, Y_MAX_POS - 1); + LIMIT(e.y, Y_MIN_POS + 1, Y_MAX_POS - 1); + LIMIT(s.x, X_MIN_POS + 1, X_MAX_POS - 1); + LIMIT(e.x, X_MIN_POS + 1, X_MAX_POS - 1); + #endif - if (TERN0(HAS_LCD_MENU, user_canceled())) return true; + if (position_is_reachable(s.x, s.y) && position_is_reachable(e.x, e.y)) + print_line_from_here_to_there(s, e); + } + } - if (i < (GRID_MAX_POINTS_X)) { // Can't connect to anything farther to the right than GRID_MAX_POINTS_X. - // Already a half circle at the edge of the bed. + /** + * Turn on the bed and nozzle heat and + * wait for them to get up to temperature. + */ + bool turn_on_heaters() { - if (circle_flags.marked(i, j) && circle_flags.marked(i + 1, j)) { // Test whether a leftward line can be done - if (!horizontal_mesh_line_flags.marked(i, j)) { - // Two circles need a horizontal line to connect them - s.x = _GET_MESH_X( i ) + (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)); // right edge - e.x = _GET_MESH_X(i + 1) - (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)); // left edge + SERIAL_ECHOLNPGM("Waiting for heatup."); - LIMIT(s.x, X_MIN_POS + 1, X_MAX_POS - 1); - s.y = e.y = constrain(_GET_MESH_Y(j), Y_MIN_POS + 1, Y_MAX_POS - 1); - LIMIT(e.x, X_MIN_POS + 1, X_MAX_POS - 1); + #if HAS_HEATED_BED - if (position_is_reachable(s.x, s.y) && position_is_reachable(e.x, e.y)) - print_line_from_here_to_there(s, e); + if (bed_temp > 25) { + #if HAS_WIRED_LCD + ui.set_status_P(GET_TEXT(MSG_G26_HEATING_BED), 99); + ui.quick_feedback(); + TERN_(HAS_LCD_MENU, ui.capture()); + #endif + thermalManager.setTargetBed(bed_temp); - horizontal_mesh_line_flags.mark(i, j); // Mark done, even if skipped - } + // Wait for the temperature to stabilize + if (!thermalManager.wait_for_bed(true OPTARG(G26_CLICK_CAN_CANCEL, true))) + return G26_ERR; } - if (j < (GRID_MAX_POINTS_Y)) { // Can't connect to anything further back than GRID_MAX_POINTS_Y. - // Already a half circle at the edge of the bed. + #else - if (circle_flags.marked(i, j) && circle_flags.marked(i, j + 1)) { // Test whether a downward line can be done - if (!vertical_mesh_line_flags.marked(i, j)) { - // Two circles that need a vertical line to connect them - s.y = _GET_MESH_Y( j ) + (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)); // top edge - e.y = _GET_MESH_Y(j + 1) - (INTERSECTION_CIRCLE_RADIUS - (CROSSHAIRS_SIZE)); // bottom edge + UNUSED(bed_temp); - s.x = e.x = constrain(_GET_MESH_X(i), X_MIN_POS + 1, X_MAX_POS - 1); - LIMIT(s.y, Y_MIN_POS + 1, Y_MAX_POS - 1); - LIMIT(e.y, Y_MIN_POS + 1, Y_MAX_POS - 1); + #endif // HAS_HEATED_BED - if (position_is_reachable(s.x, s.y) && position_is_reachable(e.x, e.y)) - print_line_from_here_to_there(s, e); + // Start heating the active nozzle + #if HAS_WIRED_LCD + ui.set_status_P(GET_TEXT(MSG_G26_HEATING_NOZZLE), 99); + ui.quick_feedback(); + #endif + thermalManager.setTargetHotend(hotend_temp, active_extruder); - vertical_mesh_line_flags.mark(i, j); // Mark done, even if skipped - } - } - } - } + // Wait for the temperature to stabilize + if (!thermalManager.wait_for_hotend(active_extruder, true OPTARG(G26_CLICK_CAN_CANCEL, true))) + return G26_ERR; + + #if HAS_WIRED_LCD + ui.reset_status(); + ui.quick_feedback(); + #endif + + return G26_OK; } - return false; -} -/** - * Turn on the bed and nozzle heat and - * wait for them to get up to temperature. - */ -inline bool turn_on_heaters() { + /** + * Prime the nozzle if needed. Return true on error. + */ + bool prime_nozzle() { - SERIAL_ECHOLNPGM("Waiting for heatup."); + const feedRate_t fr_slow_e = planner.settings.max_feedrate_mm_s[E_AXIS] / 15.0f; + #if HAS_LCD_MENU && !HAS_TOUCH_BUTTONS // ui.button_pressed issue with touchscreen + #if ENABLED(PREVENT_LENGTHY_EXTRUDE) + float Total_Prime = 0.0; + #endif - #if HAS_HEATED_BED + if (prime_flag == -1) { // The user wants to control how much filament gets purged + ui.capture(); + ui.set_status_P(GET_TEXT(MSG_G26_MANUAL_PRIME), 99); + ui.chirp(); + + destination = current_position; + + recover_filament(destination); // Make sure G26 doesn't think the filament is retracted(). + + while (!ui.button_pressed()) { + ui.chirp(); + destination.e += 0.25; + #if ENABLED(PREVENT_LENGTHY_EXTRUDE) + Total_Prime += 0.25; + if (Total_Prime >= EXTRUDE_MAXLENGTH) { + ui.release(); + return G26_ERR; + } + #endif + prepare_internal_move_to_destination(fr_slow_e); + destination = current_position; + planner.synchronize(); // Without this synchronize, the purge is more consistent, + // but because the planner has a buffer, we won't be able + // to stop as quickly. So we put up with the less smooth + // action to give the user a more responsive 'Stop'. + } - if (g26_bed_temp > 25) { + ui.wait_for_release(); + + ui.set_status_P(GET_TEXT(MSG_G26_PRIME_DONE), 99); + ui.quick_feedback(); + ui.release(); + } + else + #endif + { #if HAS_WIRED_LCD - ui.set_status_P(GET_TEXT(MSG_G26_HEATING_BED), 99); + ui.set_status_P(GET_TEXT(MSG_G26_FIXED_LENGTH), 99); ui.quick_feedback(); - TERN_(HAS_LCD_MENU, ui.capture()); #endif - thermalManager.setTargetBed(g26_bed_temp); - - // Wait for the temperature to stabilize - if (!thermalManager.wait_for_bed(true - #if G26_CLICK_CAN_CANCEL - , true - #endif - ) - ) return G26_ERR; + destination = current_position; + destination.e += prime_length; + prepare_internal_move_to_destination(fr_slow_e); + destination.e -= prime_length; + retract_filament(destination); } - #endif // HAS_HEATED_BED + return G26_OK; + } - // Start heating the active nozzle - #if HAS_WIRED_LCD - ui.set_status_P(GET_TEXT(MSG_G26_HEATING_NOZZLE), 99); - ui.quick_feedback(); - #endif - thermalManager.setTargetHotend(g26_hotend_temp, active_extruder); + /** + * Find the nearest point at which to print a circle + */ + mesh_index_pair find_closest_circle_to_print(const xy_pos_t &pos) { - // Wait for the temperature to stabilize - if (!thermalManager.wait_for_hotend(active_extruder, true - #if G26_CLICK_CAN_CANCEL - , true - #endif - )) return G26_ERR; + mesh_index_pair out_point; + out_point.pos = -1; - #if HAS_WIRED_LCD - ui.reset_status(); - ui.quick_feedback(); - #endif + #if ENABLED(UBL_HILBERT_CURVE) - return G26_OK; -} + auto test_func = [](uint8_t i, uint8_t j, void *data) -> bool { + if (!circle_flags.marked(i, j)) { + mesh_index_pair *out_point = (mesh_index_pair*)data; + out_point->pos.set(i, j); // Save its data + return true; + } + return false; + }; -/** - * Prime the nozzle if needed. Return true on error. - */ -inline bool prime_nozzle() { + hilbert_curve::search_from_closest(pos, test_func, &out_point); - const feedRate_t fr_slow_e = planner.settings.max_feedrate_mm_s[E_AXIS] / 15.0f; - #if HAS_LCD_MENU && !HAS_TOUCH_BUTTONS // ui.button_pressed issue with touchscreen - #if ENABLED(PREVENT_LENGTHY_EXTRUDE) - float Total_Prime = 0.0; - #endif + #else - if (g26_prime_flag == -1) { // The user wants to control how much filament gets purged - ui.capture(); - ui.set_status_P(GET_TEXT(MSG_G26_MANUAL_PRIME), 99); - ui.chirp(); + float closest = 99999.99; - destination = current_position; + GRID_LOOP(i, j) { + if (!circle_flags.marked(i, j)) { + // We found a circle that needs to be printed + const xy_pos_t m = { _GET_MESH_X(i), _GET_MESH_Y(j) }; - recover_filament(destination); // Make sure G26 doesn't think the filament is retracted(). + // Get the distance to this intersection + float f = (pos - m).magnitude(); - while (!ui.button_pressed()) { - ui.chirp(); - destination.e += 0.25; - #if ENABLED(PREVENT_LENGTHY_EXTRUDE) - Total_Prime += 0.25; - if (Total_Prime >= EXTRUDE_MAXLENGTH) { - ui.release(); - return G26_ERR; + // It is possible that we are being called with the values + // to let us find the closest circle to the start position. + // But if this is not the case, add a small weighting to the + // distance calculation to help it choose a better place to continue. + f += (xy_pos - m).magnitude() / 15.0f; + + // Add the specified amount of Random Noise to our search + if (g26_random_deviation > 1.0) f += random(0.0, g26_random_deviation); + + if (f < closest) { + closest = f; // Found a closer un-printed location + out_point.pos.set(i, j); // Save its data + out_point.distance = closest; } - #endif - prepare_internal_move_to_destination(fr_slow_e); - destination = current_position; - planner.synchronize(); // Without this synchronize, the purge is more consistent, - // but because the planner has a buffer, we won't be able - // to stop as quickly. So we put up with the less smooth - // action to give the user a more responsive 'Stop'. + } } - ui.wait_for_release(); - - ui.set_status_P(GET_TEXT(MSG_G26_PRIME_DONE), 99); - ui.quick_feedback(); - ui.release(); - } - else - #endif - { - #if HAS_WIRED_LCD - ui.set_status_P(GET_TEXT(MSG_G26_FIXED_LENGTH), 99); - ui.quick_feedback(); #endif - destination = current_position; - destination.e += g26_prime_length; - prepare_internal_move_to_destination(fr_slow_e); - destination.e -= g26_prime_length; - retract_filament(destination); + + circle_flags.mark(out_point); // Mark this location as done. + return out_point; } - return G26_OK; -} +} g26_helper_t; /** * G26: Mesh Validation Pattern generation. @@ -502,20 +513,11 @@ void GcodeSuite::G26() { // Change the tool first, if specified if (parser.seenval('T')) tool_change(parser.value_int()); - g26_extrusion_multiplier = EXTRUSION_MULTIPLIER; - g26_retraction_multiplier = G26_RETRACT_MULTIPLIER; - g26_layer_height = MESH_TEST_LAYER_HEIGHT; - g26_prime_length = PRIME_LENGTH; - g26_bed_temp = MESH_TEST_BED_TEMP; - g26_hotend_temp = MESH_TEST_HOTEND_TEMP; - g26_prime_flag = 0; + g26_helper_t g26; - float g26_nozzle = MESH_TEST_NOZZLE_SIZE, - g26_filament_diameter = DEFAULT_NOMINAL_FILAMENT_DIA, - g26_ooze_amount = parser.linearval('O', OOZE_AMOUNT); - - bool g26_continue_with_closest = parser.boolval('C'), - g26_keep_heaters_on = parser.boolval('K'); + g26.ooze_amount = parser.linearval('O', OOZE_AMOUNT); + g26.continue_with_closest = parser.boolval('C'); + g26.keep_heaters_on = parser.boolval('K'); // Accept 'I' if temperature presets are defined #if PREHEAT_COUNT @@ -525,7 +527,7 @@ void GcodeSuite::G26() { #if HAS_HEATED_BED // Get a temperature from 'I' or 'B' - int16_t bedtemp = 0; + celsius_t bedtemp = 0; // Use the 'I' index if temperature presets are defined #if PREHEAT_COUNT @@ -537,17 +539,17 @@ void GcodeSuite::G26() { if (bedtemp) { if (!WITHIN(bedtemp, 40, BED_MAX_TARGET)) { - SERIAL_ECHOLNPAIR("?Specified bed temperature not plausible (40-", int(BED_MAX_TARGET), "C)."); + SERIAL_ECHOLNPGM("?Specified bed temperature not plausible (40-", BED_MAX_TARGET, "C)."); return; } - g26_bed_temp = bedtemp; + g26.bed_temp = bedtemp; } #endif // HAS_HEATED_BED if (parser.seenval('L')) { - g26_layer_height = parser.value_linear_units(); - if (!WITHIN(g26_layer_height, 0.0, 2.0)) { + g26.layer_height = parser.value_linear_units(); + if (!WITHIN(g26.layer_height, 0.0, 2.0)) { SERIAL_ECHOLNPGM("?Specified layer height not plausible."); return; } @@ -555,8 +557,8 @@ void GcodeSuite::G26() { if (parser.seen('Q')) { if (parser.has_value()) { - g26_retraction_multiplier = parser.value_float(); - if (!WITHIN(g26_retraction_multiplier, 0.05, 15.0)) { + g26.retraction_multiplier = parser.value_float(); + if (!WITHIN(g26.retraction_multiplier, 0.05, 15.0)) { SERIAL_ECHOLNPGM("?Specified Retraction Multiplier not plausible."); return; } @@ -568,8 +570,8 @@ void GcodeSuite::G26() { } if (parser.seenval('S')) { - g26_nozzle = parser.value_float(); - if (!WITHIN(g26_nozzle, 0.1, 2.0)) { + g26.nozzle = parser.value_float(); + if (!WITHIN(g26.nozzle, 0.1, 2.0)) { SERIAL_ECHOLNPGM("?Specified nozzle size not plausible."); return; } @@ -578,16 +580,16 @@ void GcodeSuite::G26() { if (parser.seen('P')) { if (!parser.has_value()) { #if HAS_LCD_MENU - g26_prime_flag = -1; + g26.prime_flag = -1; #else SERIAL_ECHOLNPGM("?Prime length must be specified when not using an LCD."); return; #endif } else { - g26_prime_flag++; - g26_prime_length = parser.value_linear_units(); - if (!WITHIN(g26_prime_length, 0.0, 25.0)) { + g26.prime_flag++; + g26.prime_length = parser.value_linear_units(); + if (!WITHIN(g26.prime_length, 0.0, 25.0)) { SERIAL_ECHOLNPGM("?Specified prime length not plausible."); return; } @@ -595,20 +597,20 @@ void GcodeSuite::G26() { } if (parser.seenval('F')) { - g26_filament_diameter = parser.value_linear_units(); - if (!WITHIN(g26_filament_diameter, 1.0, 4.0)) { + g26.filament_diameter = parser.value_linear_units(); + if (!WITHIN(g26.filament_diameter, 1.0, 4.0)) { SERIAL_ECHOLNPGM("?Specified filament size not plausible."); return; } } - g26_extrusion_multiplier *= sq(1.75) / sq(g26_filament_diameter); // If we aren't using 1.75mm filament, we need to + g26.extrusion_multiplier *= sq(1.75) / sq(g26.filament_diameter); // If we aren't using 1.75mm filament, we need to // scale up or down the length needed to get the // same volume of filament - g26_extrusion_multiplier *= g26_filament_diameter * sq(g26_nozzle) / sq(0.3); // Scale up by nozzle size + g26.extrusion_multiplier *= g26.filament_diameter * sq(g26.nozzle) / sq(0.3); // Scale up by nozzle size // Get a temperature from 'I' or 'H' - int16_t noztemp = 0; + celsius_t noztemp = 0; // Accept 'I' if temperature presets are defined #if PREHEAT_COUNT @@ -624,7 +626,7 @@ void GcodeSuite::G26() { SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible."); return; } - g26_hotend_temp = noztemp; + g26.hotend_temp = noztemp; } // 'U' to Randomize and optionally set circle deviation @@ -639,12 +641,12 @@ void GcodeSuite::G26() { #if HAS_LCD_MENU g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1); #else - if (!parser.seen('R')) { + if (parser.seen('R')) + g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1; + else { SERIAL_ECHOLNPGM("?(R)epeat must be specified when not using an LCD."); return; } - else - g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1; #endif if (g26_repeats < 1) { SERIAL_ECHOLNPGM("?(R)epeat value not plausible; must be at least 1."); @@ -652,9 +654,9 @@ void GcodeSuite::G26() { } // Set a position with 'X' and/or 'Y'. Default: current_position - g26_xy_pos.set(parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position.x, + g26.xy_pos.set(parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position.x, parser.seenval('Y') ? RAW_Y_POSITION(parser.value_linear_units()) : current_position.y); - if (!position_is_reachable(g26_xy_pos)) { + if (!position_is_reachable(g26.xy_pos)) { SERIAL_ECHOLNPGM("?Specified X,Y coordinate out of bounds."); return; } @@ -662,7 +664,7 @@ void GcodeSuite::G26() { /** * Wait until all parameters are verified before altering the state! */ - set_bed_leveling_enabled(!parser.seen('D')); + set_bed_leveling_enabled(!parser.seen_test('D')); do_z_clearance(Z_CLEARANCE_BETWEEN_PROBES); @@ -672,12 +674,12 @@ void GcodeSuite::G26() { planner.calculate_volumetric_multipliers(); #endif - if (turn_on_heaters() != G26_OK) goto LEAVE; + if (g26.turn_on_heaters() != G26_OK) goto LEAVE; current_position.e = 0.0; sync_plan_position_e(); - if (g26_prime_flag && prime_nozzle() != G26_OK) goto LEAVE; + if (g26.prime_flag && g26.prime_nozzle() != G26_OK) goto LEAVE; /** * Bed is preheated @@ -690,14 +692,12 @@ void GcodeSuite::G26() { */ circle_flags.reset(); - horizontal_mesh_line_flags.reset(); - vertical_mesh_line_flags.reset(); // Move nozzle to the specified height for the first layer destination = current_position; - destination.z = g26_layer_height; + destination.z = g26.layer_height; move_to(destination, 0.0); - move_to(destination, g26_ooze_amount); + move_to(destination, g26.ooze_amount); TERN_(HAS_LCD_MENU, ui.capture()); @@ -722,11 +722,13 @@ void GcodeSuite::G26() { #endif // !ARC_SUPPORT mesh_index_pair location; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location.pos, ExtUI::G26_START)); do { // Find the nearest confluence - location = find_closest_circle_to_print(g26_continue_with_closest ? xy_pos_t(current_position) : g26_xy_pos); + location = g26.find_closest_circle_to_print(g26.continue_with_closest ? xy_pos_t(current_position) : g26.xy_pos); if (location.valid()) { + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location.pos, ExtUI::G26_POINT_START)); const xy_pos_t circle = _GET_MESH_POS(location.pos); // If this mesh location is outside the printable radius, skip it. @@ -754,7 +756,7 @@ void GcodeSuite::G26() { if (!b) { e.x = circle.x; e.y += INTERSECTION_CIRCLE_RADIUS; } arc_length = (f || b) ? ARC_LENGTH(1) : ARC_LENGTH(2); } - else if (r) { // right edge + else if (r) { // right edge if (b) s.set(circle.x - (INTERSECTION_CIRCLE_RADIUS), circle.y); else s.set(circle.x, circle.y + INTERSECTION_CIRCLE_RADIUS); if (f) e.set(circle.x - (INTERSECTION_CIRCLE_RADIUS), circle.y); @@ -774,25 +776,24 @@ void GcodeSuite::G26() { const xy_float_t dist = current_position - s; // Distance from the start of the actual circle const float dist_start = HYPOT2(dist.x, dist.y); const xyze_pos_t endpoint = { - e.x, e.y, g26_layer_height, - current_position.e + (arc_length * g26_e_axis_feedrate * g26_extrusion_multiplier) + e.x, e.y, g26.layer_height, + current_position.e + (arc_length * g26_e_axis_feedrate * g26.extrusion_multiplier) }; if (dist_start > 2.0) { - s.z = g26_layer_height + 0.5f; - retract_lift_move(s); + s.z = g26.layer_height + 0.5f; + g26.retract_lift_move(s); } - s.z = g26_layer_height; + s.z = g26.layer_height; move_to(s, 0.0); // Get to the starting point with no extrusion / un-Z lift - recover_filament(destination); + g26.recover_filament(destination); - const feedRate_t old_feedrate = feedrate_mm_s; - feedrate_mm_s = PLANNER_XY_FEEDRATE() * 0.1f; - plan_arc(endpoint, arc_offset, false, 0); // Draw a counter-clockwise arc - feedrate_mm_s = old_feedrate; - destination = current_position; + { REMEMBER(fr, feedrate_mm_s, PLANNER_XY_FEEDRATE() * 0.1f); + plan_arc(endpoint, arc_offset, false, 0); // Draw a counter-clockwise arc + destination = current_position; + } if (TERN0(HAS_LCD_MENU, user_canceled())) goto LEAVE; // Check if the user wants to stop the Mesh Validation @@ -820,26 +821,32 @@ void GcodeSuite::G26() { if (TERN0(HAS_LCD_MENU, user_canceled())) goto LEAVE; // Check if the user wants to stop the Mesh Validation - xyz_float_t p = { circle.x + _COS(ind ), circle.y + _SIN(ind ), g26_layer_height }, - q = { circle.x + _COS(ind + 1), circle.y + _SIN(ind + 1), g26_layer_height }; + xyz_float_t p = { circle.x + _COS(ind ), circle.y + _SIN(ind ), g26.layer_height }, + q = { circle.x + _COS(ind + 1), circle.y + _SIN(ind + 1), g26.layer_height }; #if IS_KINEMATIC // Check to make sure this segment is entirely on the bed, skip if not. if (!position_is_reachable(p) || !position_is_reachable(q)) continue; - #else + #elif HAS_ENDSTOPS LIMIT(p.x, X_MIN_POS + 1, X_MAX_POS - 1); // Prevent hitting the endstops LIMIT(p.y, Y_MIN_POS + 1, Y_MAX_POS - 1); LIMIT(q.x, X_MIN_POS + 1, X_MAX_POS - 1); LIMIT(q.y, Y_MIN_POS + 1, Y_MAX_POS - 1); #endif - print_line_from_here_to_there(p, q); + g26.print_line_from_here_to_there(p, q); SERIAL_FLUSH(); // Prevent host M105 buffer overrun. } #endif // !ARC_SUPPORT - if (look_for_lines_to_connect()) goto LEAVE; + g26.connect_neighbor_with_line(location.pos, -1, 0); + g26.connect_neighbor_with_line(location.pos, 1, 0); + g26.connect_neighbor_with_line(location.pos, 0, -1); + g26.connect_neighbor_with_line(location.pos, 0, 1); + planner.synchronize(); + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location.pos, ExtUI::G26_POINT_FINISH)); + if (TERN0(HAS_LCD_MENU, user_canceled())) goto LEAVE; } SERIAL_FLUSH(); // Prevent host M105 buffer overrun. @@ -848,13 +855,11 @@ void GcodeSuite::G26() { LEAVE: ui.set_status_P(GET_TEXT(MSG_G26_LEAVING), -1); + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location, ExtUI::G26_FINISH)); - retract_filament(destination); + g26.retract_filament(destination); destination.z = Z_CLEARANCE_BETWEEN_PROBES; - move_to(destination, 0); // Raise the nozzle - - destination = g26_xy_pos; // Move back to the starting XY position - move_to(destination, 0); // Move back to the starting position + move_to(destination, 0); // Raise the nozzle #if DISABLED(NO_VOLUMETRICS) parser.volumetric_enabled = volumetric_was_enabled; @@ -863,7 +868,7 @@ void GcodeSuite::G26() { TERN_(HAS_LCD_MENU, ui.release()); // Give back control of the LCD - if (!g26_keep_heaters_on) { + if (!g26.keep_heaters_on) { TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(0)); thermalManager.setTargetHotend(active_extruder, 0); } diff --git a/Marlin/src/gcode/bedlevel/G35.cpp b/Marlin/src/gcode/bedlevel/G35.cpp old mode 100755 new mode 100644 index 46f75f25906f..8d5c0573617c --- a/Marlin/src/gcode/bedlevel/G35.cpp +++ b/Marlin/src/gcode/bedlevel/G35.cpp @@ -72,7 +72,9 @@ void GcodeSuite::G35() { // Disable the leveling matrix before auto-aligning #if HAS_LEVELING - TERN_(RESTORE_LEVELING_AFTER_G35, const bool leveling_was_active = planner.leveling_active); + #if ENABLED(RESTORE_LEVELING_AFTER_G35) + const bool leveling_was_active = planner.leveling_active; + #endif set_bed_leveling_enabled(false); #endif @@ -89,8 +91,8 @@ void GcodeSuite::G35() { // Disable duplication mode on homing TERN_(HAS_DUPLICATION_MODE, set_duplication_enabled(false)); - // Home all before this procedure - home_all_axes(); + // Home only Z axis when X and Y is trusted, otherwise all axes, if needed before this procedure + if (!all_axes_trusted()) process_subcommands_now_P(PSTR("G28Z")); bool err_break = false; @@ -100,23 +102,23 @@ void GcodeSuite::G35() { // In BLTOUCH HS mode, the probe travels in a deployed state. // Users of G35 might have a badly misaligned bed, so raise Z by the // length of the deployed pin (BLTOUCH stroke < 7mm) - do_blocking_move_to_z((Z_CLEARANCE_BETWEEN_PROBES) + TERN0(BLTOUCH_HS_MODE, 7)); - const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[i], PROBE_PT_RAISE, 0, true); + do_blocking_move_to_z(SUM_TERN(BLTOUCH_HS_MODE, Z_CLEARANCE_BETWEEN_PROBES, 7)); + const float z_probed_height = probe.probe_at_point(tramming_points[i], PROBE_PT_RAISE, 0, true); if (isnan(z_probed_height)) { - SERIAL_ECHOPAIR("G35 failed at point ", int(i), " ("); + SERIAL_ECHOPGM("G35 failed at point ", i + 1, " ("); SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); SERIAL_CHAR(')'); - SERIAL_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y); + SERIAL_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y); err_break = true; break; } if (DEBUGGING(LEVELING)) { - DEBUG_ECHOPAIR("Probing point ", int(i), " ("); - DEBUG_PRINT_P((char *)pgm_read_ptr(&tramming_point_name[i])); + DEBUG_ECHOPGM("Probing point ", i + 1, " ("); + DEBUG_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); DEBUG_CHAR(')'); - DEBUG_ECHOLNPAIR_P(SP_X_STR, screws_tilt_adjust_pos[i].x, SP_Y_STR, screws_tilt_adjust_pos[i].y, SP_Z_STR, z_probed_height); + DEBUG_ECHOLNPGM_P(SP_X_STR, tramming_points[i].x, SP_Y_STR, tramming_points[i].y, SP_Z_STR, z_probed_height); } z_measured[i] = z_probed_height; @@ -128,7 +130,7 @@ void GcodeSuite::G35() { // Calculate adjusts LOOP_S_L_N(i, 1, G35_PROBE_COUNT) { const float diff = z_measured[0] - z_measured[i], - adjust = abs(diff) < 0.001f ? 0 : diff / threads_factor[(screw_thread - 30) / 10]; + adjust = ABS(diff) < 0.001f ? 0 : diff / threads_factor[(screw_thread - 30) / 10]; const int full_turns = trunc(adjust); const float decimal_part = adjust - float(full_turns); @@ -136,9 +138,9 @@ void GcodeSuite::G35() { SERIAL_ECHOPGM("Turn "); SERIAL_ECHOPGM_P((char *)pgm_read_ptr(&tramming_point_name[i])); - SERIAL_ECHOPAIR(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", abs(full_turns), " turns"); - if (minutes) SERIAL_ECHOPAIR(" and ", abs(minutes), " minutes"); - if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPAIR(" (", -diff, "mm)"); + SERIAL_ECHOPGM(" ", (screw_thread & 1) == (adjust > 0) ? "CCW" : "CW", " by ", ABS(full_turns), " turns"); + if (minutes) SERIAL_ECHOPGM(" and ", ABS(minutes), " minutes"); + if (ENABLED(REPORT_TRAMMING_MM)) SERIAL_ECHOPGM(" (", -diff, "mm)"); SERIAL_EOL(); } } diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp index 96122c18f882..d76e08dee610 100644 --- a/Marlin/src/gcode/bedlevel/M420.cpp +++ b/Marlin/src/gcode/bedlevel/M420.cpp @@ -68,17 +68,17 @@ void GcodeSuite::M420() { y_min = probe.min_y(), y_max = probe.max_y(); #if ENABLED(AUTO_BED_LEVELING_BILINEAR) bilinear_start.set(x_min, y_min); - bilinear_grid_spacing.set((x_max - x_min) / (GRID_MAX_POINTS_X - 1), - (y_max - y_min) / (GRID_MAX_POINTS_Y - 1)); + bilinear_grid_spacing.set((x_max - x_min) / (GRID_MAX_CELLS_X), + (y_max - y_min) / (GRID_MAX_CELLS_Y)); #endif GRID_LOOP(x, y) { Z_VALUES(x, y) = 0.001 * random(-200, 200); TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(x, y, Z_VALUES(x, y))); } SERIAL_ECHOPGM("Simulated " STRINGIFY(GRID_MAX_POINTS_X) "x" STRINGIFY(GRID_MAX_POINTS_Y) " mesh "); - SERIAL_ECHOPAIR(" (", x_min); + SERIAL_ECHOPGM(" (", x_min); SERIAL_CHAR(','); SERIAL_ECHO(y_min); - SERIAL_ECHOPAIR(")-(", x_max); + SERIAL_ECHOPGM(")-(", x_max); SERIAL_CHAR(','); SERIAL_ECHO(y_max); SERIAL_ECHOLNPGM(")"); } @@ -108,7 +108,7 @@ void GcodeSuite::M420() { if (!WITHIN(storage_slot, 0, a - 1)) { SERIAL_ECHOLNPGM("?Invalid storage slot."); - SERIAL_ECHOLNPAIR("?Use 0 to ", a - 1); + SERIAL_ECHOLNPGM("?Use 0 to ", a - 1); return; } @@ -128,12 +128,12 @@ void GcodeSuite::M420() { ubl.display_map(parser.byteval('T')); SERIAL_ECHOPGM("Mesh is "); if (!ubl.mesh_is_valid()) SERIAL_ECHOPGM("in"); - SERIAL_ECHOLNPAIR("valid\nStorage slot: ", ubl.storage_slot); + SERIAL_ECHOLNPGM("valid\nStorage slot: ", ubl.storage_slot); } #endif // AUTO_BED_LEVELING_UBL - const bool seenV = parser.seen('V'); + const bool seenV = parser.seen_test('V'); #if HAS_MESH @@ -156,16 +156,16 @@ void GcodeSuite::M420() { GRID_LOOP(x, y) mesh_sum += Z_VALUES(x, y); const float zmean = mesh_sum / float(GRID_MAX_POINTS); - #else + #else // midrange - // Find the low and high mesh values + // Find the low and high mesh values. float lo_val = 100, hi_val = -100; GRID_LOOP(x, y) { const float z = Z_VALUES(x, y); NOMORE(lo_val, z); NOLESS(hi_val, z); } - // Take the mean of the lowest and highest + // Get the midrange plus C value. (The median may be better.) const float zmean = (lo_val + hi_val) / 2.0 + cval; #endif @@ -242,4 +242,18 @@ void GcodeSuite::M420() { report_current_position(); } +void GcodeSuite::M420_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR( + TERN(MESH_BED_LEVELING, "Mesh Bed Leveling", TERN(AUTO_BED_LEVELING_UBL, "Unified Bed Leveling", "Auto Bed Leveling")) + )); + SERIAL_ECHOPGM_P( + PSTR(" M420 S"), planner.leveling_active + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + , SP_Z_STR, LINEAR_UNIT(planner.z_fade_height) + #endif + , PSTR(" ; Leveling ") + ); + serialprintln_onoff(planner.leveling_active); +} + #endif // HAS_LEVELING diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 2e80f090a4ba..0eb13dba9639 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -41,7 +41,7 @@ #include "../../../module/temperature.h" #endif -#if HAS_DISPLAY +#if HAS_STATUS_MESSAGE #include "../../../lcd/marlinui.h" #endif @@ -58,32 +58,87 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" -#endif - -#if ENABLED(DWIN_CREALITY_LCD) - #include "../../../lcd/dwin/e3v2/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD) + #include "../../../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../../lcd/e3v2/enhanced/dwin.h" #endif #if HAS_MULTI_HOTEND #include "../../../module/tool_change.h" #endif -#if ABL_GRID +#if ABL_USES_GRID #if ENABLED(PROBE_Y_FIRST) - #define PR_OUTER_VAR meshCount.x - #define PR_OUTER_END abl_grid_points.x - #define PR_INNER_VAR meshCount.y - #define PR_INNER_END abl_grid_points.y + #define PR_OUTER_VAR abl.meshCount.x + #define PR_OUTER_SIZE abl.grid_points.x + #define PR_INNER_VAR abl.meshCount.y + #define PR_INNER_SIZE abl.grid_points.y #else - #define PR_OUTER_VAR meshCount.y - #define PR_OUTER_END abl_grid_points.y - #define PR_INNER_VAR meshCount.x - #define PR_INNER_END abl_grid_points.x + #define PR_OUTER_VAR abl.meshCount.y + #define PR_OUTER_SIZE abl.grid_points.y + #define PR_INNER_VAR abl.meshCount.x + #define PR_INNER_SIZE abl.grid_points.x #endif #endif #define G29_RETURN(b) return TERN_(G29_RETRY_AND_RECOVER, b) +// For manual probing values persist over multiple G29 +class G29_State { +public: + int verbose_level; + xy_pos_t probePos; + float measured_z; + bool dryrun, + reenable; + + #if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) + int abl_probe_index; + #endif + + #if ENABLED(AUTO_BED_LEVELING_LINEAR) + int abl_points; + #elif ENABLED(AUTO_BED_LEVELING_3POINT) + static constexpr int abl_points = 3; + #elif ABL_USES_GRID + static constexpr int abl_points = GRID_MAX_POINTS; + #endif + + #if ABL_USES_GRID + + xy_int8_t meshCount; + + xy_pos_t probe_position_lf, + probe_position_rb; + + xy_float_t gridSpacing; // = { 0.0f, 0.0f } + + #if ENABLED(AUTO_BED_LEVELING_LINEAR) + bool topography_map; + xy_uint8_t grid_points; + #else // Bilinear + static constexpr xy_uint8_t grid_points = { GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y }; + #endif + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + float Z_offset; + #endif + + #if ENABLED(AUTO_BED_LEVELING_LINEAR) + int indexIntoAB[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; + float eqnAMatrix[(GRID_MAX_POINTS) * 3], // "A" matrix of the linear system of equations + eqnBVector[GRID_MAX_POINTS], // "B" vector of Z points + mean; + #endif + #endif +}; + +#if ABL_USES_GRID && EITHER(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_BILINEAR) + constexpr xy_uint8_t G29_State::grid_points; + constexpr int G29_State::abl_points; +#endif + /** * G29: Detailed Z probe, probes the bed at 3 or more points. * Will fail if the printer has not been homed with G28. @@ -162,22 +217,23 @@ * There's no extra effect if you have a fixed Z probe. */ G29_TYPE GcodeSuite::G29() { + DEBUG_SECTION(log_G29, "G29", DEBUGGING(LEVELING)); + + TERN_(PROBE_MANUALLY, static) G29_State abl; + + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_PROBE)); reset_stepper_timeout(); - const bool seenQ = EITHER(DEBUG_LEVELING_FEATURE, PROBE_MANUALLY) && parser.seen('Q'); + const bool seenQ = EITHER(DEBUG_LEVELING_FEATURE, PROBE_MANUALLY) && parser.seen_test('Q'); // G29 Q is also available if debugging #if ENABLED(DEBUG_LEVELING_FEATURE) - const uint8_t old_debug_flags = marlin_debug_flags; - if (seenQ) marlin_debug_flags |= MARLIN_DEBUG_LEVELING; - DEBUG_SECTION(log_G29, "G29", DEBUGGING(LEVELING)); - if (DEBUGGING(LEVELING)) log_machine_info(); - marlin_debug_flags = old_debug_flags; + if (seenQ || DEBUGGING(LEVELING)) log_machine_info(); if (DISABLED(PROBE_MANUALLY) && seenQ) G29_RETURN(false); #endif - const bool seenA = TERN0(PROBE_MANUALLY, parser.seen('A')), + const bool seenA = TERN0(PROBE_MANUALLY, parser.seen_test('A')), no_action = seenA || seenQ, faux = ENABLED(DEBUG_LEVELING_FEATURE) && DISABLED(PROBE_MANUALLY) ? parser.boolval('C') : no_action; @@ -187,69 +243,16 @@ G29_TYPE GcodeSuite::G29() { } // Send 'N' to force homing before G29 (internal only) - if (parser.seen('N')) - process_subcommands_now_P(TERN(G28_L0_ENSURES_LEVELING_OFF, PSTR("G28L0"), G28_STR)); + if (parser.seen_test('N')) + process_subcommands_now_P(TERN(CAN_SET_LEVELING_AFTER_G28, PSTR("G28L0"), G28_STR)); // Don't allow auto-leveling without homing first if (homing_needed_error()) G29_RETURN(false); - // Define local vars 'static' for manual probing, 'auto' otherwise - #define ABL_VAR TERN_(PROBE_MANUALLY, static) - - ABL_VAR int verbose_level; - ABL_VAR xy_pos_t probePos; - ABL_VAR float measured_z; - ABL_VAR bool dryrun, abl_should_enable; - - #if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) - ABL_VAR int abl_probe_index; - #endif - - #if ABL_GRID - - #if ENABLED(PROBE_MANUALLY) - ABL_VAR xy_int8_t meshCount; - #endif - - ABL_VAR xy_pos_t probe_position_lf, probe_position_rb; - ABL_VAR xy_float_t gridSpacing = { 0, 0 }; - - #if ENABLED(AUTO_BED_LEVELING_LINEAR) - ABL_VAR bool do_topography_map; - ABL_VAR xy_uint8_t abl_grid_points; - #else // Bilinear - constexpr xy_uint8_t abl_grid_points = { GRID_MAX_POINTS_X, GRID_MAX_POINTS_Y }; - #endif - - #if ENABLED(AUTO_BED_LEVELING_LINEAR) - ABL_VAR int abl_points; - #else - int constexpr abl_points = GRID_MAX_POINTS; - #endif - - #if ENABLED(AUTO_BED_LEVELING_BILINEAR) - - ABL_VAR float zoffset; - - #elif ENABLED(AUTO_BED_LEVELING_LINEAR) - - ABL_VAR int indexIntoAB[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y]; - - ABL_VAR float eqnAMatrix[(GRID_MAX_POINTS) * 3], // "A" matrix of the linear system of equations - eqnBVector[GRID_MAX_POINTS], // "B" vector of Z points - mean; - #endif - - #elif ENABLED(AUTO_BED_LEVELING_3POINT) - - #if ENABLED(PROBE_MANUALLY) - int constexpr abl_points = 3; // used to show total points - #endif - + #if ENABLED(AUTO_BED_LEVELING_3POINT) vector_3 points[3]; probe.get_three_points(points); - - #endif // AUTO_BED_LEVELING_3POINT + #endif #if ENABLED(AUTO_BED_LEVELING_LINEAR) struct linear_fit_data lsf_results; @@ -263,14 +266,14 @@ G29_TYPE GcodeSuite::G29() { TERN_(HAS_MULTI_HOTEND, if (active_extruder) tool_change(0)); #if EITHER(PROBE_MANUALLY, AUTO_BED_LEVELING_LINEAR) - abl_probe_index = -1; + abl.abl_probe_index = -1; #endif - abl_should_enable = planner.leveling_active; + abl.reenable = planner.leveling_active; #if ENABLED(AUTO_BED_LEVELING_BILINEAR) - const bool seen_w = parser.seen('W'); + const bool seen_w = parser.seen_test('W'); if (seen_w) { if (!leveling_is_valid()) { SERIAL_ERROR_MSG("No bilinear grid"); @@ -289,21 +292,21 @@ G29_TYPE GcodeSuite::G29() { if (!isnan(rx) && !isnan(ry)) { // Get nearest i / j from rx / ry - i = (rx - bilinear_start.x + 0.5 * gridSpacing.x) / gridSpacing.x; - j = (ry - bilinear_start.y + 0.5 * gridSpacing.y) / gridSpacing.y; - LIMIT(i, 0, GRID_MAX_POINTS_X - 1); - LIMIT(j, 0, GRID_MAX_POINTS_Y - 1); + i = (rx - bilinear_start.x + 0.5 * abl.gridSpacing.x) / abl.gridSpacing.x; + j = (ry - bilinear_start.y + 0.5 * abl.gridSpacing.y) / abl.gridSpacing.y; + LIMIT(i, 0, (GRID_MAX_POINTS_X) - 1); + LIMIT(j, 0, (GRID_MAX_POINTS_Y) - 1); } - if (WITHIN(i, 0, GRID_MAX_POINTS_X - 1) && WITHIN(j, 0, GRID_MAX_POINTS_Y)) { + if (WITHIN(i, 0, (GRID_MAX_POINTS_X) - 1) && WITHIN(j, 0, (GRID_MAX_POINTS_Y) - 1)) { set_bed_leveling_enabled(false); z_values[i][j] = rz; TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate()); TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(i, j, rz)); - set_bed_leveling_enabled(abl_should_enable); - if (abl_should_enable) report_current_position(); + set_bed_leveling_enabled(abl.reenable); + if (abl.reenable) report_current_position(); } G29_RETURN(false); - } // parser.seen('W') + } // parser.seen_test('W') #else @@ -312,86 +315,86 @@ G29_TYPE GcodeSuite::G29() { #endif // Jettison bed leveling data - if (!seen_w && parser.seen('J')) { + if (!seen_w && parser.seen_test('J')) { reset_bed_level(); G29_RETURN(false); } - verbose_level = parser.intval('V'); - if (!WITHIN(verbose_level, 0, 4)) { + abl.verbose_level = parser.intval('V'); + if (!WITHIN(abl.verbose_level, 0, 4)) { SERIAL_ECHOLNPGM("?(V)erbose level implausible (0-4)."); G29_RETURN(false); } - dryrun = parser.boolval('D') || TERN0(PROBE_MANUALLY, no_action); + abl.dryrun = parser.boolval('D') || TERN0(PROBE_MANUALLY, no_action); #if ENABLED(AUTO_BED_LEVELING_LINEAR) incremental_LSF_reset(&lsf_results); - do_topography_map = verbose_level > 2 || parser.boolval('T'); + abl.topography_map = abl.verbose_level > 2 || parser.boolval('T'); // X and Y specify points in each direction, overriding the default // These values may be saved with the completed mesh - abl_grid_points.set( + abl.grid_points.set( parser.byteval('X', GRID_MAX_POINTS_X), parser.byteval('Y', GRID_MAX_POINTS_Y) ); - if (parser.seenval('P')) abl_grid_points.x = abl_grid_points.y = parser.value_int(); + if (parser.seenval('P')) abl.grid_points.x = abl.grid_points.y = parser.value_int(); - if (!WITHIN(abl_grid_points.x, 2, GRID_MAX_POINTS_X)) { + if (!WITHIN(abl.grid_points.x, 2, GRID_MAX_POINTS_X)) { SERIAL_ECHOLNPGM("?Probe points (X) implausible (2-" STRINGIFY(GRID_MAX_POINTS_X) ")."); G29_RETURN(false); } - if (!WITHIN(abl_grid_points.y, 2, GRID_MAX_POINTS_Y)) { + if (!WITHIN(abl.grid_points.y, 2, GRID_MAX_POINTS_Y)) { SERIAL_ECHOLNPGM("?Probe points (Y) implausible (2-" STRINGIFY(GRID_MAX_POINTS_Y) ")."); G29_RETURN(false); } - abl_points = abl_grid_points.x * abl_grid_points.y; - mean = 0; + abl.abl_points = abl.grid_points.x * abl.grid_points.y; + abl.mean = 0; #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) - zoffset = parser.linearval('Z'); + abl.Z_offset = parser.linearval('Z'); #endif - #if ABL_GRID + #if ABL_USES_GRID - xy_probe_feedrate_mm_s = MMM_TO_MMS(parser.linearval('S', XY_PROBE_SPEED)); + xy_probe_feedrate_mm_s = MMM_TO_MMS(parser.linearval('S', XY_PROBE_FEEDRATE)); const float x_min = probe.min_x(), x_max = probe.max_x(), y_min = probe.min_y(), y_max = probe.max_y(); if (parser.seen('H')) { const int16_t size = (int16_t)parser.value_linear_units(); - probe_position_lf.set(_MAX((X_CENTER) - size / 2, x_min), _MAX((Y_CENTER) - size / 2, y_min)); - probe_position_rb.set(_MIN(probe_position_lf.x + size, x_max), _MIN(probe_position_lf.y + size, y_max)); + abl.probe_position_lf.set(_MAX((X_CENTER) - size / 2, x_min), _MAX((Y_CENTER) - size / 2, y_min)); + abl.probe_position_rb.set(_MIN(abl.probe_position_lf.x + size, x_max), _MIN(abl.probe_position_lf.y + size, y_max)); } else { - probe_position_lf.set(parser.linearval('L', x_min), parser.linearval('F', y_min)); - probe_position_rb.set(parser.linearval('R', x_max), parser.linearval('B', y_max)); + abl.probe_position_lf.set(parser.linearval('L', x_min), parser.linearval('F', y_min)); + abl.probe_position_rb.set(parser.linearval('R', x_max), parser.linearval('B', y_max)); } - if (!probe.good_bounds(probe_position_lf, probe_position_rb)) { + if (!probe.good_bounds(abl.probe_position_lf, abl.probe_position_rb)) { if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLNPAIR("G29 L", probe_position_lf.x, " R", probe_position_rb.x, - " F", probe_position_lf.y, " B", probe_position_rb.y); + DEBUG_ECHOLNPGM("G29 L", abl.probe_position_lf.x, " R", abl.probe_position_rb.x, + " F", abl.probe_position_lf.y, " B", abl.probe_position_rb.y); } SERIAL_ECHOLNPGM("? (L,R,F,B) out of bounds."); G29_RETURN(false); } // Probe at the points of a lattice grid - gridSpacing.set((probe_position_rb.x - probe_position_lf.x) / (abl_grid_points.x - 1), - (probe_position_rb.y - probe_position_lf.y) / (abl_grid_points.y - 1)); + abl.gridSpacing.set((abl.probe_position_rb.x - abl.probe_position_lf.x) / (abl.grid_points.x - 1), + (abl.probe_position_rb.y - abl.probe_position_lf.y) / (abl.grid_points.y - 1)); - #endif // ABL_GRID + #endif // ABL_USES_GRID - if (verbose_level > 0) { + if (abl.verbose_level > 0) { SERIAL_ECHOPGM("G29 Auto Bed Leveling"); - if (dryrun) SERIAL_ECHOPGM(" (DRYRUN)"); + if (abl.dryrun) SERIAL_ECHOPGM(" (DRYRUN)"); SERIAL_EOL(); } @@ -400,17 +403,16 @@ G29_TYPE GcodeSuite::G29() { #if ENABLED(AUTO_BED_LEVELING_3POINT) if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> 3-point Leveling"); points[0].z = points[1].z = points[2].z = 0; // Probe at 3 arbitrary points - #endif - - #if BOTH(AUTO_BED_LEVELING_BILINEAR, EXTENSIBLE_UI) - ExtUI::onMeshLevelingStart(); + #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) + TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart()); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshLevelingStart()); #endif if (!faux) { remember_feedrate_scaling_off(); #if ENABLED(PREHEAT_BEFORE_LEVELING) - if (!dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, LEVELING_BED_TEMP); + if (!abl.dryrun) probe.preheat_for_probing(LEVELING_NOZZLE_TEMP, LEVELING_BED_TEMP); #endif } @@ -423,24 +425,24 @@ G29_TYPE GcodeSuite::G29() { if (ENABLED(BLTOUCH)) do_z_clearance(Z_CLEARANCE_DEPLOY_PROBE); else if (probe.deploy()) { - set_bed_leveling_enabled(abl_should_enable); + set_bed_leveling_enabled(abl.reenable); G29_RETURN(false); } #endif #if ENABLED(AUTO_BED_LEVELING_BILINEAR) if (TERN1(PROBE_MANUALLY, !no_action) - && (gridSpacing != bilinear_grid_spacing || probe_position_lf != bilinear_start) + && (abl.gridSpacing != bilinear_grid_spacing || abl.probe_position_lf != bilinear_start) ) { // Reset grid to 0.0 or "not probed". (Also disables ABL) reset_bed_level(); // Initialize a grid with the given dimensions - bilinear_grid_spacing = gridSpacing; - bilinear_start = probe_position_lf; + bilinear_grid_spacing = abl.gridSpacing; + bilinear_start = abl.probe_position_lf; // Can't re-enable (on error) until the new grid is written - abl_should_enable = false; + abl.reenable = false; } #endif // AUTO_BED_LEVELING_BILINEAR @@ -451,7 +453,7 @@ G29_TYPE GcodeSuite::G29() { // For manual probing, get the next index to probe now. // On the first probe this will be incremented to 0. if (!no_action) { - ++abl_probe_index; + ++abl.abl_probe_index; g29_in_progress = true; } @@ -459,25 +461,23 @@ G29_TYPE GcodeSuite::G29() { if (seenA && g29_in_progress) { SERIAL_ECHOLNPGM("Manual G29 aborted"); SET_SOFT_ENDSTOP_LOOSE(false); - set_bed_leveling_enabled(abl_should_enable); + set_bed_leveling_enabled(abl.reenable); g29_in_progress = false; TERN_(LCD_BED_LEVELING, ui.wait_for_move = false); } // Query G29 status - if (verbose_level || seenQ) { + if (abl.verbose_level || seenQ) { SERIAL_ECHOPGM("Manual G29 "); - if (g29_in_progress) { - SERIAL_ECHOPAIR("point ", _MIN(abl_probe_index + 1, abl_points)); - SERIAL_ECHOLNPAIR(" of ", abl_points); - } + if (g29_in_progress) + SERIAL_ECHOLNPGM("point ", _MIN(abl.abl_probe_index + 1, abl.abl_points), " of ", abl.abl_points); else SERIAL_ECHOLNPGM("idle"); } if (no_action) G29_RETURN(false); - if (abl_probe_index == 0) { + if (abl.abl_probe_index == 0) { // For the initial G29 S2 save software endstop state SET_SOFT_ENDSTOP_LOOSE(true); // Move close to the bed before the first point @@ -486,34 +486,34 @@ G29_TYPE GcodeSuite::G29() { else { #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) - const uint16_t index = abl_probe_index - 1; + const uint16_t index = abl.abl_probe_index - 1; #endif // For G29 after adjusting Z. // Save the previous Z before going to the next point - measured_z = current_position.z; + abl.measured_z = current_position.z; #if ENABLED(AUTO_BED_LEVELING_LINEAR) - mean += measured_z; - eqnBVector[index] = measured_z; - eqnAMatrix[index + 0 * abl_points] = probePos.x; - eqnAMatrix[index + 1 * abl_points] = probePos.y; - eqnAMatrix[index + 2 * abl_points] = 1; + abl.mean += abl.measured_z; + abl.eqnBVector[index] = abl.measured_z; + abl.eqnAMatrix[index + 0 * abl.abl_points] = abl.probePos.x; + abl.eqnAMatrix[index + 1 * abl.abl_points] = abl.probePos.y; + abl.eqnAMatrix[index + 2 * abl.abl_points] = 1; - incremental_LSF(&lsf_results, probePos, measured_z); + incremental_LSF(&lsf_results, abl.probePos, abl.measured_z); #elif ENABLED(AUTO_BED_LEVELING_3POINT) - points[index].z = measured_z; + points[index].z = abl.measured_z; #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) - const float newz = measured_z + zoffset; - z_values[meshCount.x][meshCount.y] = newz; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(meshCount, newz)); + const float newz = abl.measured_z + abl.Z_offset; + z_values[abl.meshCount.x][abl.meshCount.y] = newz; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, newz)); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR_P(PSTR("Save X"), meshCount.x, SP_Y_STR, meshCount.y, SP_Z_STR, measured_z + zoffset); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM_P(PSTR("Save X"), abl.meshCount.x, SP_Y_STR, abl.meshCount.y, SP_Z_STR, abl.measured_z + abl.Z_offset); #endif } @@ -522,31 +522,31 @@ G29_TYPE GcodeSuite::G29() { // If there's another point to sample, move there with optional lift. // - #if ABL_GRID + #if ABL_USES_GRID // Skip any unreachable points - while (abl_probe_index < abl_points) { + while (abl.abl_probe_index < abl.abl_points) { - // Set meshCount.x, meshCount.y based on abl_probe_index, with zig-zag - PR_OUTER_VAR = abl_probe_index / PR_INNER_END; - PR_INNER_VAR = abl_probe_index - (PR_OUTER_VAR * PR_INNER_END); + // Set abl.meshCount.x, abl.meshCount.y based on abl.abl_probe_index, with zig-zag + PR_OUTER_VAR = abl.abl_probe_index / PR_INNER_SIZE; + PR_INNER_VAR = abl.abl_probe_index - (PR_OUTER_VAR * PR_INNER_SIZE); // Probe in reverse order for every other row/column - const bool zig = (PR_OUTER_VAR & 1); // != ((PR_OUTER_END) & 1); - if (zig) PR_INNER_VAR = (PR_INNER_END - 1) - PR_INNER_VAR; + const bool zig = (PR_OUTER_VAR & 1); // != ((PR_OUTER_SIZE) & 1); + if (zig) PR_INNER_VAR = (PR_INNER_SIZE - 1) - PR_INNER_VAR; - probePos = probe_position_lf + gridSpacing * meshCount.asFloat(); + abl.probePos = abl.probe_position_lf + abl.gridSpacing * abl.meshCount.asFloat(); - TERN_(AUTO_BED_LEVELING_LINEAR, indexIntoAB[meshCount.x][meshCount.y] = abl_probe_index); + TERN_(AUTO_BED_LEVELING_LINEAR, abl.indexIntoAB[abl.meshCount.x][abl.meshCount.y] = abl.abl_probe_index); // Keep looping till a reachable point is found - if (position_is_reachable(probePos)) break; - ++abl_probe_index; + if (position_is_reachable(abl.probePos)) break; + ++abl.abl_probe_index; } // Is there a next point to move to? - if (abl_probe_index < abl_points) { - _manual_goto_xy(probePos); // Can be used here too! + if (abl.abl_probe_index < abl.abl_points) { + _manual_goto_xy(abl.probePos); // Can be used here too! // Disable software endstops to allow manual adjustment // If G29 is not completed, they will not be re-enabled SET_SOFT_ENDSTOP_LOOSE(true); @@ -562,9 +562,9 @@ G29_TYPE GcodeSuite::G29() { #elif ENABLED(AUTO_BED_LEVELING_3POINT) // Probe at 3 arbitrary points - if (abl_probe_index < abl_points) { - probePos = points[abl_probe_index]; - _manual_goto_xy(probePos); + if (abl.abl_probe_index < abl.abl_points) { + abl.probePos = xy_pos_t(points[abl.abl_probe_index]); + _manual_goto_xy(abl.probePos); // Disable software endstops to allow manual adjustment // If G29 is not completed, they will not be re-enabled SET_SOFT_ENDSTOP_LOOSE(true); @@ -577,13 +577,13 @@ G29_TYPE GcodeSuite::G29() { // Re-enable software endstops, if needed SET_SOFT_ENDSTOP_LOOSE(false); - if (!dryrun) { + if (!abl.dryrun) { vector_3 planeNormal = vector_3::cross(points[0] - points[1], points[2] - points[1]).get_normal(); if (planeNormal.z < 0) planeNormal *= -1; planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal); // Can't re-enable (on error) until the new grid is written - abl_should_enable = false; + abl.reenable = false; } } @@ -594,84 +594,82 @@ G29_TYPE GcodeSuite::G29() { { const ProbePtRaise raise_after = parser.boolval('E') ? PROBE_PT_STOW : PROBE_PT_RAISE; - measured_z = 0; - - #if ABL_GRID + abl.measured_z = 0; - bool zig = PR_OUTER_END & 1; // Always end at RIGHT and BACK_PROBE_BED_POSITION + #if ABL_USES_GRID - measured_z = 0; + bool zig = PR_OUTER_SIZE & 1; // Always end at RIGHT and BACK_PROBE_BED_POSITION - xy_int8_t meshCount; + abl.measured_z = 0; // Outer loop is X with PROBE_Y_FIRST enabled // Outer loop is Y with PROBE_Y_FIRST disabled - for (PR_OUTER_VAR = 0; PR_OUTER_VAR < PR_OUTER_END && !isnan(measured_z); PR_OUTER_VAR++) { + for (PR_OUTER_VAR = 0; PR_OUTER_VAR < PR_OUTER_SIZE && !isnan(abl.measured_z); PR_OUTER_VAR++) { int8_t inStart, inStop, inInc; - if (zig) { // Zig away from origin - inStart = 0; // Left or front - inStop = PR_INNER_END; // Right or back - inInc = 1; // Zig right + if (zig) { // Zig away from origin + inStart = 0; // Left or front + inStop = PR_INNER_SIZE; // Right or back + inInc = 1; // Zig right } - else { // Zag towards origin - inStart = PR_INNER_END - 1; // Right or back - inStop = -1; // Left or front - inInc = -1; // Zag left + else { // Zag towards origin + inStart = PR_INNER_SIZE - 1; // Right or back + inStop = -1; // Left or front + inInc = -1; // Zag left } zig ^= true; // zag // An index to print current state - uint8_t pt_index = (PR_OUTER_VAR) * (PR_INNER_END) + 1; + uint8_t pt_index = (PR_OUTER_VAR) * (PR_INNER_SIZE) + 1; // Inner loop is Y with PROBE_Y_FIRST enabled // Inner loop is X with PROBE_Y_FIRST disabled for (PR_INNER_VAR = inStart; PR_INNER_VAR != inStop; pt_index++, PR_INNER_VAR += inInc) { - probePos = probe_position_lf + gridSpacing * meshCount.asFloat(); + abl.probePos = abl.probe_position_lf + abl.gridSpacing * abl.meshCount.asFloat(); - TERN_(AUTO_BED_LEVELING_LINEAR, indexIntoAB[meshCount.x][meshCount.y] = ++abl_probe_index); // 0... + TERN_(AUTO_BED_LEVELING_LINEAR, abl.indexIntoAB[abl.meshCount.x][abl.meshCount.y] = ++abl.abl_probe_index); // 0... // Avoid probing outside the round or hexagonal area - if (TERN0(IS_KINEMATIC, !probe.can_reach(probePos))) continue; + if (TERN0(IS_KINEMATIC, !probe.can_reach(abl.probePos))) continue; - if (verbose_level) SERIAL_ECHOLNPAIR("Probing mesh point ", int(pt_index), "/", abl_points, "."); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_MESH), int(pt_index), int(abl_points))); + if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing mesh point ", pt_index, "/", abl.abl_points, "."); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), int(pt_index), int(abl.abl_points))); - measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(probePos, raise_after, verbose_level); + abl.measured_z = faux ? 0.001f * random(-100, 101) : probe.probe_at_point(abl.probePos, raise_after, abl.verbose_level); - if (isnan(measured_z)) { - set_bed_leveling_enabled(abl_should_enable); + if (isnan(abl.measured_z)) { + set_bed_leveling_enabled(abl.reenable); break; // Breaks out of both loops } #if ENABLED(PROBE_TEMP_COMPENSATION) - temp_comp.compensate_measurement(TSI_BED, thermalManager.degBed(), measured_z); - temp_comp.compensate_measurement(TSI_PROBE, thermalManager.degProbe(), measured_z); - TERN_(USE_TEMP_EXT_COMPENSATION, temp_comp.compensate_measurement(TSI_EXT, thermalManager.degHotend(), measured_z)); + temp_comp.compensate_measurement(TSI_BED, thermalManager.degBed(), abl.measured_z); + temp_comp.compensate_measurement(TSI_PROBE, thermalManager.degProbe(), abl.measured_z); + TERN_(USE_TEMP_EXT_COMPENSATION, temp_comp.compensate_measurement(TSI_EXT, thermalManager.degHotend(), abl.measured_z)); #endif #if ENABLED(AUTO_BED_LEVELING_LINEAR) - mean += measured_z; - eqnBVector[abl_probe_index] = measured_z; - eqnAMatrix[abl_probe_index + 0 * abl_points] = probePos.x; - eqnAMatrix[abl_probe_index + 1 * abl_points] = probePos.y; - eqnAMatrix[abl_probe_index + 2 * abl_points] = 1; + abl.mean += abl.measured_z; + abl.eqnBVector[abl.abl_probe_index] = abl.measured_z; + abl.eqnAMatrix[abl.abl_probe_index + 0 * abl.abl_points] = abl.probePos.x; + abl.eqnAMatrix[abl.abl_probe_index + 1 * abl.abl_points] = abl.probePos.y; + abl.eqnAMatrix[abl.abl_probe_index + 2 * abl.abl_points] = 1; - incremental_LSF(&lsf_results, probePos, measured_z); + incremental_LSF(&lsf_results, abl.probePos, abl.measured_z); #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) - const float z = measured_z + zoffset; - z_values[meshCount.x][meshCount.y] = z; - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(meshCount, z)); + const float z = abl.measured_z + abl.Z_offset; + z_values[abl.meshCount.x][abl.meshCount.y] = z; + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(abl.meshCount, z)); #endif - abl_should_enable = false; + abl.reenable = false; idle_no_sleep(); } // inner @@ -682,36 +680,36 @@ G29_TYPE GcodeSuite::G29() { // Probe at 3 arbitrary points LOOP_L_N(i, 3) { - if (verbose_level) SERIAL_ECHOLNPAIR("Probing point ", int(i + 1), "/3."); - TERN_(HAS_DISPLAY, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_MESH), int(i + 1))); + if (abl.verbose_level) SERIAL_ECHOLNPGM("Probing point ", i + 1, "/3."); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/3"), GET_TEXT(MSG_PROBING_POINT), int(i + 1))); // Retain the last probe position - probePos = points[i]; - measured_z = faux ? 0.001 * random(-100, 101) : probe.probe_at_point(probePos, raise_after, verbose_level); - if (isnan(measured_z)) { - set_bed_leveling_enabled(abl_should_enable); + abl.probePos = xy_pos_t(points[i]); + abl.measured_z = faux ? 0.001 * random(-100, 101) : probe.probe_at_point(abl.probePos, raise_after, abl.verbose_level); + if (isnan(abl.measured_z)) { + set_bed_leveling_enabled(abl.reenable); break; } - points[i].z = measured_z; + points[i].z = abl.measured_z; } - if (!dryrun && !isnan(measured_z)) { + if (!abl.dryrun && !isnan(abl.measured_z)) { vector_3 planeNormal = vector_3::cross(points[0] - points[1], points[2] - points[1]).get_normal(); if (planeNormal.z < 0) planeNormal *= -1; planner.bed_level_matrix = matrix_3x3::create_look_at(planeNormal); // Can't re-enable (on error) until the new grid is written - abl_should_enable = false; + abl.reenable = false; } #endif // AUTO_BED_LEVELING_3POINT - TERN_(HAS_DISPLAY, ui.reset_status()); + TERN_(HAS_STATUS_MESSAGE, ui.reset_status()); // Stow the probe. No raise for FIX_MOUNTED_PROBE. if (probe.stow()) { - set_bed_leveling_enabled(abl_should_enable); - measured_z = NAN; + set_bed_leveling_enabled(abl.reenable); + abl.measured_z = NAN; } } #endif // !PROBE_MANUALLY @@ -734,10 +732,10 @@ G29_TYPE GcodeSuite::G29() { #endif // Calculate leveling, print reports, correct the position - if (!isnan(measured_z)) { + if (!isnan(abl.measured_z)) { #if ENABLED(AUTO_BED_LEVELING_BILINEAR) - if (!dryrun) extrapolate_unprobed_bed_level(); + if (!abl.dryrun) extrapolate_unprobed_bed_level(); print_bilinear_leveling_grid(); refresh_bed_level(); @@ -763,39 +761,39 @@ G29_TYPE GcodeSuite::G29() { plane_equation_coefficients.b = -lsf_results.B; // but that is not yet tested. plane_equation_coefficients.d = -lsf_results.D; - mean /= abl_points; + abl.mean /= abl.abl_points; - if (verbose_level) { + if (abl.verbose_level) { SERIAL_ECHOPAIR_F("Eqn coefficients: a: ", plane_equation_coefficients.a, 8); SERIAL_ECHOPAIR_F(" b: ", plane_equation_coefficients.b, 8); SERIAL_ECHOPAIR_F(" d: ", plane_equation_coefficients.d, 8); - if (verbose_level > 2) - SERIAL_ECHOPAIR_F("\nMean of sampled points: ", mean, 8); + if (abl.verbose_level > 2) + SERIAL_ECHOPAIR_F("\nMean of sampled points: ", abl.mean, 8); SERIAL_EOL(); } // Create the matrix but don't correct the position yet - if (!dryrun) + if (!abl.dryrun) planner.bed_level_matrix = matrix_3x3::create_look_at( vector_3(-plane_equation_coefficients.a, -plane_equation_coefficients.b, 1) // We can eliminate the '-' here and up above ); // Show the Topography map if enabled - if (do_topography_map) { + if (abl.topography_map) { float min_diff = 999; auto print_topo_map = [&](PGM_P const title, const bool get_min) { - serialprintPGM(title); - for (int8_t yy = abl_grid_points.y - 1; yy >= 0; yy--) { - LOOP_L_N(xx, abl_grid_points.x) { - const int ind = indexIntoAB[xx][yy]; - xyz_float_t tmp = { eqnAMatrix[ind + 0 * abl_points], - eqnAMatrix[ind + 1 * abl_points], 0 }; - apply_rotation_xyz(planner.bed_level_matrix, tmp); - if (get_min) NOMORE(min_diff, eqnBVector[ind] - tmp.z); - const float subval = get_min ? mean : tmp.z + min_diff, - diff = eqnBVector[ind] - subval; + SERIAL_ECHOPGM_P(title); + for (int8_t yy = abl.grid_points.y - 1; yy >= 0; yy--) { + LOOP_L_N(xx, abl.grid_points.x) { + const int ind = abl.indexIntoAB[xx][yy]; + xyz_float_t tmp = { abl.eqnAMatrix[ind + 0 * abl.abl_points], + abl.eqnAMatrix[ind + 1 * abl.abl_points], 0 }; + planner.bed_level_matrix.apply_rotation_xyz(tmp.x, tmp.y, tmp.z); + if (get_min) NOMORE(min_diff, abl.eqnBVector[ind] - tmp.z); + const float subval = get_min ? abl.mean : tmp.z + min_diff, + diff = abl.eqnBVector[ind] - subval; SERIAL_CHAR(' '); if (diff >= 0.0) SERIAL_CHAR('+'); // Include + for column alignment SERIAL_ECHO_F(diff, 5); } // xx @@ -815,10 +813,10 @@ G29_TYPE GcodeSuite::G29() { " | |\n" " O-- FRONT --+\n" " (0,0)\n"), true); - if (verbose_level > 3) + if (abl.verbose_level > 3) print_topo_map(PSTR("\nCorrected Bed Height vs. Bed Topology:\n"), false); - } //do_topography_map + } // abl.topography_map #endif // AUTO_BED_LEVELING_LINEAR @@ -826,10 +824,10 @@ G29_TYPE GcodeSuite::G29() { // For LINEAR and 3POINT leveling correct the current position - if (verbose_level > 0) + if (abl.verbose_level > 0) planner.bed_level_matrix.debug(PSTR("\n\nBed Level Correction Matrix:")); - if (!dryrun) { + if (!abl.dryrun) { // // Correct the current XYZ position based on the tilted plane. // @@ -840,11 +838,11 @@ G29_TYPE GcodeSuite::G29() { planner.force_unapply_leveling(converted); // use conversion machinery // Use the last measured distance to the bed, if possible - if ( NEAR(current_position.x, probePos.x - probe.offset_xy.x) - && NEAR(current_position.y, probePos.y - probe.offset_xy.y) + if ( NEAR(current_position.x, abl.probePos.x - probe.offset_xy.x) + && NEAR(current_position.y, abl.probePos.y - probe.offset_xy.y) ) { - const float simple_z = current_position.z - measured_z; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z); + const float simple_z = current_position.z - abl.measured_z; + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probed Z", simple_z, " Matrix Z", converted.z, " Discrepancy ", simple_z - converted.z); converted.z = simple_z; } @@ -856,22 +854,22 @@ G29_TYPE GcodeSuite::G29() { #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) - if (!dryrun) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("G29 uncorrected Z:", current_position.z); + if (!abl.dryrun) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("G29 uncorrected Z:", current_position.z); // Unapply the offset because it is going to be immediately applied // and cause compensation movement in Z const float fade_scaling_factor = TERN(ENABLE_LEVELING_FADE_HEIGHT, planner.fade_scaling_factor_for_z(current_position.z), 1); current_position.z -= fade_scaling_factor * bilinear_z_offset(current_position); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(" corrected Z:", current_position.z); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(" corrected Z:", current_position.z); } #endif // ABL_PLANAR // Auto Bed Leveling is complete! Enable if possible. - planner.leveling_active = dryrun ? abl_should_enable : true; - } // !isnan(measured_z) + planner.leveling_active = !abl.dryrun || abl.reenable; + } // !isnan(abl.measured_z) // Restore state after probing if (!faux) restore_feedrate_and_scaling(); @@ -879,23 +877,22 @@ G29_TYPE GcodeSuite::G29() { // Sync the planner from the current_position if (planner.leveling_active) sync_plan_position(); - #if HAS_BED_PROBE - probe.move_z_after_probing(); - #endif + TERN_(HAS_BED_PROBE, probe.move_z_after_probing()); #ifdef Z_PROBE_END_SCRIPT - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Z Probe End Script: ", Z_PROBE_END_SCRIPT); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Z Probe End Script: ", Z_PROBE_END_SCRIPT); planner.synchronize(); process_subcommands_now_P(PSTR(Z_PROBE_END_SCRIPT)); #endif - #if ENABLED(DWIN_CREALITY_LCD) - DWIN_CompletedLeveling(); - #endif + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedLeveling()); report_current_position(); - G29_RETURN(isnan(measured_z)); + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE)); + + G29_RETURN(isnan(abl.measured_z)); + } #endif // HAS_ABL_NOT_UBL diff --git a/Marlin/src/gcode/bedlevel/mbl/G29.cpp b/Marlin/src/gcode/bedlevel/mbl/G29.cpp index cf27c14d3b12..11e503f0136b 100644 --- a/Marlin/src/gcode/bedlevel/mbl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/mbl/G29.cpp @@ -40,8 +40,13 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../../lcd/e3v2/enhanced/dwin.h" #endif +#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) +#include "../../../core/debug_out.h" + // Save 130 bytes with non-duplication of PSTR inline void echo_not_entered(const char c) { SERIAL_CHAR(c); SERIAL_ECHOLNPGM(" not entered."); } @@ -59,6 +64,18 @@ inline void echo_not_entered(const char c) { SERIAL_CHAR(c); SERIAL_ECHOLNPGM(" * S5 Reset and disable mesh */ void GcodeSuite::G29() { + DEBUG_SECTION(log_G29, "G29", true); + + // G29 Q is also available if debugging + #if ENABLED(DEBUG_LEVELING_FEATURE) + const bool seenQ = parser.seen_test('Q'); + if (seenQ || DEBUGGING(LEVELING)) { + log_machine_info(); + if (seenQ) return; + } + #endif + + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_PROBE)); static int mbl_probe_index = -1; @@ -69,6 +86,7 @@ void GcodeSuite::G29() { } int8_t ix, iy; + ix = iy = 0; switch (state) { case MeshReport: @@ -85,7 +103,8 @@ void GcodeSuite::G29() { mbl.reset(); mbl_probe_index = 0; if (!ui.wait_for_move) { - queue.inject_P(parser.seen('N') ? PSTR("G28" TERN(G28_L0_ENSURES_LEVELING_OFF, "L0", "") "\nG29S2") : PSTR("G29S2")); + queue.inject_P(parser.seen_test('N') ? PSTR("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : PSTR("G29S2")); + TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart()); return; } state = MeshNext; @@ -98,15 +117,20 @@ void GcodeSuite::G29() { // For each G29 S2... if (mbl_probe_index == 0) { // Move close to the bed before the first point - do_blocking_move_to_z(0); + do_blocking_move_to_z(0.4f + #ifdef MANUAL_PROBE_START_Z + + (MANUAL_PROBE_START_Z) - 0.4f + #endif + ); } else { // Save Z for the previous mesh position mbl.set_zigzag_z(mbl_probe_index - 1, current_position.z); + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, current_position.z)); SET_SOFT_ENDSTOP_LOOSE(false); } // If there's another point to sample, move there with optional lift. - if (mbl_probe_index < GRID_MAX_POINTS) { + if (mbl_probe_index < (GRID_MAX_POINTS)) { // Disable software endstops to allow manual adjustment // If G29 is left hanging without completion they won't be re-enabled! SET_SOFT_ENDSTOP_LOOSE(true); @@ -114,14 +138,21 @@ void GcodeSuite::G29() { _manual_goto_xy({ mbl.index_to_xpos[ix], mbl.index_to_ypos[iy] }); } else { - // One last "return to the bed" (as originally coded) at completion - current_position.z = MANUAL_PROBE_HEIGHT; + // Move to the after probing position + current_position.z = ( + #ifdef Z_AFTER_PROBING + Z_AFTER_PROBING + #else + Z_CLEARANCE_BETWEEN_MANUAL_PROBES + #endif + ); line_to_current_position(); planner.synchronize(); // After recording the last point, activate home and activate mbl_probe_index = -1; SERIAL_ECHOLNPGM("Mesh probing done."); + TERN_(HAS_STATUS_MESSAGE, ui.set_status(GET_TEXT(MSG_MESH_DONE))); BUZZ(100, 659); BUZZ(100, 698); @@ -141,9 +172,8 @@ void GcodeSuite::G29() { case MeshSet: if (parser.seenval('I')) { ix = parser.value_int(); - if (!WITHIN(ix, 0, GRID_MAX_POINTS_X - 1)) { - SERIAL_ECHOPAIR("I out of range (0-", int(GRID_MAX_POINTS_X - 1)); - SERIAL_ECHOLNPGM(")"); + if (!WITHIN(ix, 0, (GRID_MAX_POINTS_X) - 1)) { + SERIAL_ECHOLNPGM("I out of range (0-", (GRID_MAX_POINTS_X) - 1, ")"); return; } } @@ -152,9 +182,8 @@ void GcodeSuite::G29() { if (parser.seenval('J')) { iy = parser.value_int(); - if (!WITHIN(iy, 0, GRID_MAX_POINTS_Y - 1)) { - SERIAL_ECHOPAIR("J out of range (0-", int(GRID_MAX_POINTS_Y - 1)); - SERIAL_ECHOLNPGM(")"); + if (!WITHIN(iy, 0, (GRID_MAX_POINTS_Y) - 1)) { + SERIAL_ECHOLNPGM("J out of range (0-", (GRID_MAX_POINTS_Y) - 1, ")"); return; } } @@ -164,6 +193,7 @@ void GcodeSuite::G29() { if (parser.seenval('Z')) { mbl.z_values[ix][iy] = parser.value_linear_units(); TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ix, iy, mbl.z_values[ix][iy])); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshUpdate(ix, iy, mbl.z_values[ix][iy])); } else return echo_not_entered('Z'); @@ -183,11 +213,13 @@ void GcodeSuite::G29() { } // switch(state) if (state == MeshNext) { - SERIAL_ECHOPAIR("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS)); - SERIAL_ECHOLNPAIR(" of ", int(GRID_MAX_POINTS)); + SERIAL_ECHOLNPGM("MBL G29 point ", _MIN(mbl_probe_index, GRID_MAX_POINTS), " of ", GRID_MAX_POINTS); + if (mbl_probe_index > 0) TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PROBING_POINT), _MIN(mbl_probe_index, GRID_MAX_POINTS), int(GRID_MAX_POINTS))); } report_current_position(); + + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE)); } #endif // MESH_BED_LEVELING diff --git a/Marlin/src/gcode/bedlevel/ubl/G29.cpp b/Marlin/src/gcode/bedlevel/ubl/G29.cpp index 2ef3ab4ceca9..932503d72b97 100644 --- a/Marlin/src/gcode/bedlevel/ubl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/ubl/G29.cpp @@ -31,6 +31,17 @@ #include "../../gcode.h" #include "../../../feature/bedlevel/bedlevel.h" -void GcodeSuite::G29() { ubl.G29(); } +#if ENABLED(FULL_REPORT_TO_HOST_FEATURE) + #include "../../../module/motion.h" +#endif + +void GcodeSuite::G29() { + + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_PROBE)); + + ubl.G29(); + + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE)); +} #endif // AUTO_BED_LEVELING_UBL diff --git a/Marlin/src/gcode/bedlevel/ubl/M421.cpp b/Marlin/src/gcode/bedlevel/ubl/M421.cpp index 600c1fc8ba51..e6f0ef1f8907 100644 --- a/Marlin/src/gcode/bedlevel/ubl/M421.cpp +++ b/Marlin/src/gcode/bedlevel/ubl/M421.cpp @@ -21,7 +21,7 @@ */ /** - * unified.cpp - Unified Bed Leveling + * M421.cpp - Unified Bed Leveling */ #include "../../../inc/MarlinConfig.h" @@ -33,37 +33,43 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../../lcd/e3v2/enhanced/dwin.h" #endif /** * M421: Set a single Mesh Bed Leveling Z coordinate * * Usage: - * M421 I J Z - * M421 I J Q - * M421 I J N - * M421 C Z - * M421 C Q + * M421 I J Z : Set the Mesh Point IJ to the Z value + * M421 I J Q : Add the Q value to the Mesh Point IJ + * M421 I J N : Set the Mesh Point IJ to NAN (not set) + * M421 C Z : Set the closest Mesh Point to the Z value + * M421 C Q : Add the Q value to the closest Mesh Point */ void GcodeSuite::M421() { xy_int8_t ij = { int8_t(parser.intval('I', -1)), int8_t(parser.intval('J', -1)) }; const bool hasI = ij.x >= 0, hasJ = ij.y >= 0, - hasC = parser.seen('C'), - hasN = parser.seen('N'), + hasC = parser.seen_test('C'), + hasN = parser.seen_test('N'), hasZ = parser.seen('Z'), hasQ = !hasZ && parser.seen('Q'); - if (hasC) ij = ubl.find_closest_mesh_point_of_type(REAL, current_position); + if (hasC) ij = ubl.find_closest_mesh_point_of_type(CLOSEST, current_position); + // Test for bad parameter combinations if (int(hasC) + int(hasI && hasJ) != 1 || !(hasZ || hasQ || hasN)) SERIAL_ERROR_MSG(STR_ERR_M421_PARAMETERS); + + // Test for I J out of range else if (!WITHIN(ij.x, 0, GRID_MAX_POINTS_X - 1) || !WITHIN(ij.y, 0, GRID_MAX_POINTS_Y - 1)) SERIAL_ERROR_MSG(STR_ERR_MESH_XY); else { - float &zval = ubl.z_values[ij.x][ij.y]; - zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0); - TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval)); + float &zval = ubl.z_values[ij.x][ij.y]; // Altering this Mesh Point + zval = hasN ? NAN : parser.value_linear_units() + (hasQ ? zval : 0); // N=NAN, Z=NEWVAL, or Q=ADDVAL + TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(ij.x, ij.y, zval)); // Ping ExtUI in case it's showing the mesh + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_MeshUpdate(ij.x, ij.y, zval)); } } diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 2de029a08b0f..dc93ba3d2f25 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -46,12 +46,13 @@ #endif #include "../../lcd/marlinui.h" -#if ENABLED(DWIN_CREALITY_LCD) - #include "../../lcd/dwin/e3v2/dwin.h" -#endif #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD) + #include "../../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" #endif #if HAS_L64XX // set L6470 absolute position registers to counts @@ -73,7 +74,7 @@ current_position.set(0.0, 0.0); sync_plan_position(); - const int x_axis_home_dir = x_home_dir(active_extruder); + const int x_axis_home_dir = TOOL_X_HOME_DIR(active_extruder); const float mlx = max_length(X_AXIS), mly = max_length(Y_AXIS), @@ -96,13 +97,13 @@ }; #endif - do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * home_dir(Y_AXIS), fr_mm_s); + do_blocking_move_to_xy(1.5 * mlx * x_axis_home_dir, 1.5 * mly * Y_HOME_DIR, fr_mm_s); endstops.validate_homing_move(); current_position.set(0.0, 0.0); - #if ENABLED(SENSORLESS_HOMING) + #if ENABLED(SENSORLESS_HOMING) && DISABLED(ENDSTOPS_ALWAYS_ON_DEFAULT) tmc_disable_stallguard(stepperX, stealth_states.x); tmc_disable_stallguard(stepperY, stealth_states.y); #if AXIS_HAS_STALLGUARD(X2) @@ -164,24 +165,28 @@ #if ENABLED(IMPROVE_HOMING_RELIABILITY) - slow_homing_t begin_slow_homing() { - slow_homing_t slow_homing{0}; - slow_homing.acceleration.set(planner.settings.max_acceleration_mm_per_s2[X_AXIS], - planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); + motion_state_t begin_slow_homing() { + motion_state_t motion_state{0}; + motion_state.acceleration.set(planner.settings.max_acceleration_mm_per_s2[X_AXIS], + planner.settings.max_acceleration_mm_per_s2[Y_AXIS] + OPTARG(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS]) + ); planner.settings.max_acceleration_mm_per_s2[X_AXIS] = 100; planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = 100; + TERN_(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = 100); #if HAS_CLASSIC_JERK - slow_homing.jerk_xy = planner.max_jerk; - planner.max_jerk.set(0, 0); + motion_state.jerk_state = planner.max_jerk; + planner.max_jerk.set(0, 0 OPTARG(DELTA, 0)); #endif planner.reset_acceleration_rates(); - return slow_homing; + return motion_state; } - void end_slow_homing(const slow_homing_t &slow_homing) { - planner.settings.max_acceleration_mm_per_s2[X_AXIS] = slow_homing.acceleration.x; - planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = slow_homing.acceleration.y; - TERN_(HAS_CLASSIC_JERK, planner.max_jerk = slow_homing.jerk_xy); + void end_slow_homing(const motion_state_t &motion_state) { + planner.settings.max_acceleration_mm_per_s2[X_AXIS] = motion_state.acceleration.x; + planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = motion_state.acceleration.y; + TERN_(DELTA, planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = motion_state.acceleration.z); + TERN_(HAS_CLASSIC_JERK, planner.max_jerk = motion_state.jerk_state); planner.reset_acceleration_rates(); } @@ -195,9 +200,9 @@ * None Home to all axes with no parameters. * With QUICK_HOME enabled XY will home together, then Z. * - * O Home only if position is unknown - * - * Rn Raise by n mm/inches before homing + * L Force leveling state ON (if possible) or OFF after homing (Requires RESTORE_LEVELING_AFTER_G28 or ENABLE_LEVELING_AFTER_G28) + * O Home only if the position is not known and trusted + * R Raise by n mm/inches before homing * * Cartesian/SCARA parameters * @@ -211,14 +216,16 @@ void GcodeSuite::G28() { TERN_(LASER_MOVE_G28_OFF, cutter.set_inline_enabled(false)); // turn off laser + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_HOMING)); + #if ENABLED(DUAL_X_CARRIAGE) bool IDEX_saved_duplication_state = extruder_duplication_enabled; DualXMode IDEX_saved_mode = dual_x_carriage_mode; #endif #if ENABLED(MARLIN_DEV_MODE) - if (parser.seen('S')) { - LOOP_XYZ(a) set_axis_is_at_home((AxisEnum)a); + if (parser.seen_test('S')) { + LOOP_LINEAR_AXES(a) set_axis_is_at_home((AxisEnum)a); sync_plan_position(); SERIAL_ECHOLNPGM("Simulated Homing"); report_current_position(); @@ -227,12 +234,12 @@ void GcodeSuite::G28() { #endif // Home (O)nly if position is unknown - if (!axes_should_home() && parser.boolval('O')) { + if (!axes_should_home() && parser.seen_test('O')) { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> homing not needed, skip"); return; } - TERN_(DWIN_CREALITY_LCD, DWIN_StartHoming()); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_StartHoming()); TERN_(EXTENSIBLE_UI, ExtUI::onHomingStart()); planner.synchronize(); // Wait for planner moves to finish! @@ -240,12 +247,16 @@ void GcodeSuite::G28() { SET_SOFT_ENDSTOP_LOOSE(false); // Reset a leftover 'loose' motion state // Disable the leveling matrix before homing - #if HAS_LEVELING - const bool leveling_restore_state = parser.boolval('L', TERN(RESTORE_LEVELING_AFTER_G28, planner.leveling_active, ENABLED(ENABLE_LEVELING_AFTER_G28))); - IF_ENABLED(PROBE_MANUALLY, g29_in_progress = false); // Cancel the active G29 session - set_bed_leveling_enabled(false); + #if CAN_SET_LEVELING_AFTER_G28 + const bool leveling_restore_state = parser.boolval('L', TERN1(RESTORE_LEVELING_AFTER_G28, planner.leveling_active)); #endif + // Cancel any prior G29 session + TERN_(PROBE_MANUALLY, g29_in_progress = false); + + // Disable leveling before homing + TERN_(HAS_LEVELING, set_bed_leveling_enabled(false)); + // Reset to the XY plane TERN_(CNC_WORKSPACE_PLANES, workspace_plane = PLANE_XY); @@ -253,13 +264,13 @@ void GcodeSuite::G28() { reset_stepper_timeout(); #define HAS_CURRENT_HOME(N) (defined(N##_CURRENT_HOME) && N##_CURRENT_HOME != N##_CURRENT) - #if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2) + #if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(X2) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Y2) || (ENABLED(DELTA) && HAS_CURRENT_HOME(Z)) #define HAS_HOMING_CURRENT 1 #endif #if HAS_HOMING_CURRENT - auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b){ - serialprintPGM(s); DEBUG_ECHOLNPAIR(" current: ", a, " -> ", b); + auto debug_current = [](PGM_P const s, const int16_t a, const int16_t b) { + DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b); }; #if HAS_CURRENT_HOME(X) const int16_t tmc_save_current_X = stepperX.getMilliamps(); @@ -281,9 +292,16 @@ void GcodeSuite::G28() { stepperY2.rms_current(Y2_CURRENT_HOME); if (DEBUGGING(LEVELING)) debug_current(PSTR("Y2"), tmc_save_current_Y2, Y2_CURRENT_HOME); #endif + #if HAS_CURRENT_HOME(Z) && ENABLED(DELTA) + const int16_t tmc_save_current_Z = stepperZ.getMilliamps(); + stepperZ.rms_current(Z_CURRENT_HOME); + if (DEBUGGING(LEVELING)) debug_current(PSTR("Z"), tmc_save_current_Z, Z_CURRENT_HOME); + #endif #endif - TERN_(IMPROVE_HOMING_RELIABILITY, slow_homing_t slow_homing = begin_slow_homing()); + #if ENABLED(IMPROVE_HOMING_RELIABILITY) + motion_state_t saved_motion_state = begin_slow_homing(); + #endif // Always home with tool 0 active #if HAS_MULTI_HOTEND @@ -309,38 +327,57 @@ void GcodeSuite::G28() { home_delta(); - TERN_(IMPROVE_HOMING_RELIABILITY, end_slow_homing(slow_homing)); + TERN_(IMPROVE_HOMING_RELIABILITY, end_slow_homing(saved_motion_state)); + + #elif ENABLED(AXEL_TPARA) - #else // NOT DELTA + constexpr bool doZ = true; // for NANODLP_Z_SYNC if your DLP is on a TPARA - const bool homeZ = parser.seen('Z'), - needX = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(X_AXIS))), - needY = homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(Y_AXIS))), - homeX = needX || parser.seen('X'), homeY = needY || parser.seen('Y'), - home_all = homeX == homeY && homeX == homeZ, // All or None - doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ; + home_TPARA(); - #if ENABLED(HOME_Z_FIRST) + #else - if (doZ) homeaxis(Z_AXIS); + #define _UNSAFE(A) (homeZ && TERN0(Z_SAFE_HOMING, axes_should_home(_BV(A##_AXIS)))) + const bool homeZ = TERN0(HAS_Z_AXIS, parser.seen_test('Z')), + LINEAR_AXIS_LIST( // Other axes should be homed before Z safe-homing + needX = _UNSAFE(X), needY = _UNSAFE(Y), needZ = false, // UNUSED + needI = _UNSAFE(I), needJ = _UNSAFE(J), needK = _UNSAFE(K) + ), + LINEAR_AXIS_LIST( // Home each axis if needed or flagged + homeX = needX || parser.seen_test('X'), + homeY = needY || parser.seen_test('Y'), + homeZZ = homeZ, + homeI = needI || parser.seen_test(AXIS4_NAME), homeJ = needJ || parser.seen_test(AXIS5_NAME), homeK = needK || parser.seen_test(AXIS6_NAME), + ), + home_all = LINEAR_AXIS_GANG( // Home-all if all or none are flagged + homeX == homeX, && homeY == homeX, && homeZ == homeX, + && homeI == homeX, && homeJ == homeX, && homeK == homeX + ), + LINEAR_AXIS_LIST( + doX = home_all || homeX, doY = home_all || homeY, doZ = home_all || homeZ, + doI = home_all || homeI, doJ = home_all || homeJ, doK = home_all || homeK + ); + + #if HAS_Z_AXIS + UNUSED(needZ); UNUSED(homeZZ); + #else + constexpr bool doZ = false; #endif - const float z_homing_height = TERN1(UNKNOWN_Z_NO_RAISE, axis_is_trusted(Z_AXIS)) - ? (parser.seenval('R') ? parser.value_linear_units() : Z_HOMING_HEIGHT) - : 0; + TERN_(HOME_Z_FIRST, if (doZ) homeaxis(Z_AXIS)); - if (z_homing_height && (doX || doY || TERN0(Z_SAFE_HOMING, doZ))) { + const float z_homing_height = parser.seenval('R') ? parser.value_linear_units() : Z_HOMING_HEIGHT; + + if (z_homing_height && (LINEAR_AXIS_GANG(doX, || doY, || TERN0(Z_SAFE_HOMING, doZ), || doI, || doJ, || doK))) { // Raise Z before homing any other axes and z is not already high enough (never lower z) - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Raise Z (before homing) by ", z_homing_height); - do_z_clearance(z_homing_height, axis_is_trusted(Z_AXIS), DISABLED(UNKNOWN_Z_NO_RAISE)); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Raise Z (before homing) by ", z_homing_height); + do_z_clearance(z_homing_height); + TERN_(BLTOUCH, bltouch.init()); } - #if ENABLED(QUICK_HOME) - - if (doX && doY) quick_home_xy(); - - #endif + // Diagonal move first if both are homing + TERN_(QUICK_HOME, if (doX && doY) quick_home_xy()); // Home Y (before X) if (ENABLED(HOME_Y_BEFORE_X) && (doY || TERN0(CODEPENDENT_XY_HOMING, doX))) @@ -376,25 +413,34 @@ void GcodeSuite::G28() { if (DISABLED(HOME_Y_BEFORE_X) && doY) homeaxis(Y_AXIS); - TERN_(IMPROVE_HOMING_RELIABILITY, end_slow_homing(slow_homing)); + TERN_(IMPROVE_HOMING_RELIABILITY, end_slow_homing(saved_motion_state)); // Home Z last if homing towards the bed - #if DISABLED(HOME_Z_FIRST) + #if HAS_Z_AXIS && DISABLED(HOME_Z_FIRST) if (doZ) { #if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) stepper.set_all_z_lock(false); stepper.set_separate_multi_axis(false); #endif - TERN_(BLTOUCH, bltouch.init()); TERN(Z_SAFE_HOMING, home_z_safely(), homeaxis(Z_AXIS)); probe.move_z_after_homing(); } #endif + #if LINEAR_AXES >= 4 + if (doI) homeaxis(I_AXIS); + #endif + #if LINEAR_AXES >= 5 + if (doJ) homeaxis(J_AXIS); + #endif + #if LINEAR_AXES >= 6 + if (doK) homeaxis(K_AXIS); + #endif + sync_plan_position(); - #endif // !DELTA (G28) + #endif /** * Preserve DXC mode across a G28 for IDEX printers in DXC_DUPLICATION_MODE. @@ -406,7 +452,7 @@ void GcodeSuite::G28() { if (idex_is_duplicating()) { - TERN_(IMPROVE_HOMING_RELIABILITY, slow_homing = begin_slow_homing()); + TERN_(IMPROVE_HOMING_RELIABILITY, saved_motion_state = begin_slow_homing()); // Always home the 2nd (right) extruder first active_extruder = 1; @@ -425,7 +471,7 @@ void GcodeSuite::G28() { dual_x_carriage_mode = IDEX_saved_mode; set_duplication_enabled(IDEX_saved_duplication_state); - TERN_(IMPROVE_HOMING_RELIABILITY, end_slow_homing(slow_homing)); + TERN_(IMPROVE_HOMING_RELIABILITY, end_slow_homing(saved_motion_state)); } #endif // DUAL_X_CARRIAGE @@ -435,12 +481,10 @@ void GcodeSuite::G28() { // Clear endstop state for polled stallGuard endstops TERN_(SPI_ENDSTOPS, endstops.clear_endstop_state()); - #if BOTH(DELTA, DELTA_HOME_TO_SAFE_ZONE) - // move to a height where we can use the full xy-area - do_blocking_move_to_z(delta_clip_start_height); - #endif + // Move to a height where we can use the full xy-area + TERN_(DELTA_HOME_TO_SAFE_ZONE, do_blocking_move_to_z(delta_clip_start_height)); - TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_restore_state)); + TERN_(CAN_SET_LEVELING_AFTER_G28, if (leveling_restore_state) set_bed_leveling_enabled()); restore_feedrate_and_scaling(); @@ -463,11 +507,23 @@ void GcodeSuite::G28() { #if HAS_CURRENT_HOME(Y2) stepperY2.rms_current(tmc_save_current_Y2); #endif - #endif + #if HAS_CURRENT_HOME(Z) && ENABLED(DELTA) + stepperZ.rms_current(tmc_save_current_Z); + #endif + #if HAS_CURRENT_HOME(I) + stepperI.rms_current(tmc_save_current_I); + #endif + #if HAS_CURRENT_HOME(J) + stepperJ.rms_current(tmc_save_current_J); + #endif + #if HAS_CURRENT_HOME(K) + stepperK.rms_current(tmc_save_current_K); + #endif + #endif // HAS_HOMING_CURRENT ui.refresh(); - TERN_(DWIN_CREALITY_LCD, DWIN_CompletedHoming()); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_CompletedHoming()); TERN_(EXTENSIBLE_UI, ExtUI::onHomingComplete()); report_current_position(); @@ -475,15 +531,19 @@ void GcodeSuite::G28() { if (ENABLED(NANODLP_Z_SYNC) && (doZ || ENABLED(NANODLP_ALL_AXIS))) SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP); + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE)); + #if HAS_L64XX // Set L6470 absolute position registers to counts // constexpr *might* move this to PROGMEM. // If not, this will need a PROGMEM directive and an accessor. + #define _EN_ITEM(N) , E_AXIS static constexpr AxisEnum L64XX_axis_xref[MAX_L64XX] = { - X_AXIS, Y_AXIS, Z_AXIS, - X_AXIS, Y_AXIS, Z_AXIS, Z_AXIS, - E_AXIS, E_AXIS, E_AXIS, E_AXIS, E_AXIS, E_AXIS + LINEAR_AXIS_LIST(X_AXIS, Y_AXIS, Z_AXIS, I_AXIS, J_AXIS, K_AXIS), + X_AXIS, Y_AXIS, Z_AXIS, Z_AXIS, Z_AXIS + REPEAT(E_STEPPERS, _EN_ITEM) }; + #undef _EN_ITEM for (uint8_t j = 1; j <= L64XX::chain[0]; j++) { const uint8_t cv = L64XX::chain[j]; L64xxManager.set_param((L64XX_axis_t)cv, L6470_ABS_POS, stepper.position(L64XX_axis_xref[cv])); diff --git a/Marlin/src/gcode/calibrate/G33.cpp b/Marlin/src/gcode/calibrate/G33.cpp index 77cc45771cc8..24a985299f42 100644 --- a/Marlin/src/gcode/calibrate/G33.cpp +++ b/Marlin/src/gcode/calibrate/G33.cpp @@ -63,13 +63,19 @@ enum CalEnum : char { // the 7 main calibration points - #define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP) #define LOOP_CAL_ACT(VAR, _4P, _OP) LOOP_CAL_PT(VAR, _OP ? _AB : __A, _4P ? _4P_STEP : _7P_STEP) -TERN_(HAS_MULTI_HOTEND, const uint8_t old_tool_index = active_extruder); +#if HAS_MULTI_HOTEND + const uint8_t old_tool_index = active_extruder; +#endif float lcd_probe_pt(const xy_pos_t &xy); +float dcr; + void ac_home() { endstops.enable(true); + TERN_(HAS_DELTA_SENSORLESS_PROBING, probe.set_homing_current(true)); home_delta(); + TERN_(HAS_DELTA_SENSORLESS_PROBING, probe.set_homing_current(false)); endstops.not_homing(); } @@ -91,9 +97,9 @@ void ac_cleanup(TERN_(HAS_MULTI_HOTEND, const uint8_t old_tool_index)) { TERN_(HAS_MULTI_HOTEND, tool_change(old_tool_index, true)); } -void print_signed_float(PGM_P const prefix, const float &f) { +void print_signed_float(PGM_P const prefix, const_float_t f) { SERIAL_ECHOPGM(" "); - serialprintPGM(prefix); + SERIAL_ECHOPGM_P(prefix); SERIAL_CHAR(':'); if (f >= 0) SERIAL_CHAR('+'); SERIAL_ECHO_F(f, 2); @@ -103,14 +109,14 @@ void print_signed_float(PGM_P const prefix, const float &f) { * - Print the delta settings */ static void print_calibration_settings(const bool end_stops, const bool tower_angles) { - SERIAL_ECHOPAIR(".Height:", delta_height); + SERIAL_ECHOPGM(".Height:", delta_height); if (end_stops) { print_signed_float(PSTR("Ex"), delta_endstop_adj.a); print_signed_float(PSTR("Ey"), delta_endstop_adj.b); print_signed_float(PSTR("Ez"), delta_endstop_adj.c); } if (end_stops && tower_angles) { - SERIAL_ECHOPAIR(" Radius:", delta_radius); + SERIAL_ECHOPGM(" Radius:", delta_radius); SERIAL_EOL(); SERIAL_CHAR('.'); SERIAL_ECHO_SP(13); @@ -121,7 +127,7 @@ static void print_calibration_settings(const bool end_stops, const bool tower_an print_signed_float(PSTR("Tz"), delta_tower_angle_trim.c); } if ((!end_stops && tower_angles) || (end_stops && !tower_angles)) { // XOR - SERIAL_ECHOPAIR(" Radius:", delta_radius); + SERIAL_ECHOPGM(" Radius:", delta_radius); } SERIAL_EOL(); } @@ -171,9 +177,9 @@ static float std_dev_points(float z_pt[NPP + 1], const bool _0p_cal, const bool /** * - Probe a point */ -static float calibration_probe(const xy_pos_t &xy, const bool stow) { +static float calibration_probe(const xy_pos_t &xy, const bool stow, const bool probe_at_offset) { #if HAS_BED_PROBE - return probe.probe_at_point(xy, stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, true, false); + return probe.probe_at_point(xy, stow ? PROBE_PT_STOW : PROBE_PT_RAISE, 0, true, probe_at_offset); #else UNUSED(stow); return lcd_probe_pt(xy); @@ -183,7 +189,7 @@ static float calibration_probe(const xy_pos_t &xy, const bool stow) { /** * - Probe a grid */ -static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_points, const bool towers_set, const bool stow_after_each) { +static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_points, const bool towers_set, const bool stow_after_each, const bool probe_at_offset) { const bool _0p_calibration = probe_points == 0, _1p_calibration = probe_points == 1 || probe_points == -1, _4p_calibration = probe_points == 2, @@ -205,11 +211,9 @@ static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_poi if (!_0p_calibration) { - const float dcr = delta_calibration_radius(); - if (!_7p_no_intermediates && !_7p_4_intermediates && !_7p_11_intermediates) { // probe the center const xy_pos_t center{0}; - z_pt[CEN] += calibration_probe(center, stow_after_each); + z_pt[CEN] += calibration_probe(center, stow_after_each, probe_at_offset); if (isnan(z_pt[CEN])) return false; } @@ -220,7 +224,7 @@ static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_poi const float a = RADIANS(210 + (360 / NPP) * (rad - 1)), r = dcr * 0.1; const xy_pos_t vec = { cos(a), sin(a) }; - z_pt[CEN] += calibration_probe(vec * r, stow_after_each); + z_pt[CEN] += calibration_probe(vec * r, stow_after_each, probe_at_offset); if (isnan(z_pt[CEN])) return false; } z_pt[CEN] /= float(_7p_2_intermediates ? 7 : probe_points); @@ -245,7 +249,7 @@ static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_poi r = dcr * (1 - 0.1 * (zig_zag ? offset - circle : circle)), interpol = FMOD(rad, 1); const xy_pos_t vec = { cos(a), sin(a) }; - const float z_temp = calibration_probe(vec * r, stow_after_each); + const float z_temp = calibration_probe(vec * r, stow_after_each, probe_at_offset); if (isnan(z_temp)) return false; // split probe point to neighbouring calibration points z_pt[uint8_t(LROUND(rad - interpol + NPP - 1)) % NPP + 1] += z_temp * sq(cos(RADIANS(interpol * 90))); @@ -272,7 +276,6 @@ static bool probe_calibration_points(float z_pt[NPP + 1], const int8_t probe_poi static void reverse_kinematics_probe_points(float z_pt[NPP + 1], abc_float_t mm_at_pt_axis[NPP + 1]) { xyz_pos_t pos{0}; - const float dcr = delta_calibration_radius(); LOOP_CAL_ALL(rad) { const float a = RADIANS(210 + (360 / NPP) * (rad - 1)), r = (rad == CEN ? 0.0f : dcr); @@ -283,7 +286,7 @@ static void reverse_kinematics_probe_points(float z_pt[NPP + 1], abc_float_t mm_ } static void forward_kinematics_probe_points(abc_float_t mm_at_pt_axis[NPP + 1], float z_pt[NPP + 1]) { - const float r_quot = delta_calibration_radius() / delta_radius; + const float r_quot = dcr / delta_radius; #define ZPP(N,I,A) (((1.0f + r_quot * (N)) / 3.0f) * mm_at_pt_axis[I].A) #define Z00(I, A) ZPP( 0, I, A) @@ -324,7 +327,7 @@ static void calc_kinematics_diff_probe_points(float z_pt[NPP + 1], abc_float_t d } static float auto_tune_h() { - const float r_quot = delta_calibration_radius() / delta_radius; + const float r_quot = dcr / delta_radius; return RECIPROCAL(r_quot / (2.0f / 3.0f)); // (2/3)/CR } @@ -345,7 +348,7 @@ static float auto_tune_a() { abc_float_t delta_e = { 0.0f }, delta_t = { 0.0f }; delta_t.reset(); - LOOP_XYZ(axis) { + LOOP_LINEAR_AXES(axis) { delta_t[axis] = diff; calc_kinematics_diff_probe_points(z_pt, delta_e, delta_r, delta_t); delta_t[axis] = 0; @@ -369,6 +372,8 @@ static float auto_tune_a() { * P3 Probe all positions: center, towers and opposite towers. Calibrate all. * P4-P10 Probe all positions at different intermediate locations and average them. * + * Rn.nn override default calibration Radius + * * T Don't calibrate tower angle corrections * * Cn.nn Calibration precision; when omitted calibrates to maximum precision @@ -382,16 +387,46 @@ static float auto_tune_a() { * V3 Report settings and probe results * * E Engage the probe for each point + * + * O Probe at offset points (this is wrong but it seems to work) + * + * With SENSORLESS_PROBING: + * Use these flags to calibrate stall sensitivity: (e.g., `G33 P1 Y Z` to calibrate X only.) + * X Don't activate stallguard on X. + * Y Don't activate stallguard on Y. + * Z Don't activate stallguard on Z. */ void GcodeSuite::G33() { + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_PROBE)); + const int8_t probe_points = parser.intval('P', DELTA_CALIBRATION_DEFAULT_POINTS); if (!WITHIN(probe_points, 0, 10)) { SERIAL_ECHOLNPGM("?(P)oints implausible (0-10)."); return; } - const bool towers_set = !parser.seen('T'); + const bool probe_at_offset = TERN0(HAS_PROBE_XY_OFFSET, parser.boolval('O')), + towers_set = !parser.seen_test('T'); + + float max_dcr = dcr = DELTA_PRINTABLE_RADIUS; + #if HAS_PROBE_XY_OFFSET + // For offset probes the calibration radius is set to a safe but non-optimal value + dcr -= HYPOT(probe.offset_xy.x, probe.offset_xy.y); + if (probe_at_offset) { + // With probe positions both probe and nozzle need to be within the printable area + max_dcr = dcr; + } + // else with nozzle positions there is a risk of the probe being outside the bed + // but as long the nozzle stays within the printable area there is no risk of + // the effector crashing into the towers. + #endif + + if (parser.seenval('R')) dcr = parser.value_float(); + if (!WITHIN(dcr, 0, max_dcr)) { + SERIAL_ECHOLNPGM("?calibration (R)adius implausible."); + return; + } const float calibration_precision = parser.floatval('C', 0.0f); if (calibration_precision < 0) { @@ -411,7 +446,13 @@ void GcodeSuite::G33() { return; } - const bool stow_after_each = parser.seen('E'); + const bool stow_after_each = parser.seen_test('E'); + + #if HAS_DELTA_SENSORLESS_PROBING + probe.test_sensitivity.x = !parser.seen_test('X'); + TERN_(HAS_Y_AXIS, probe.test_sensitivity.y = !parser.seen_test('Y')); + TERN_(HAS_Z_AXIS, probe.test_sensitivity.z = !parser.seen_test('Z')); + #endif const bool _0p_calibration = probe_points == 0, _1p_calibration = probe_points == 1 || probe_points == -1, @@ -435,21 +476,9 @@ void GcodeSuite::G33() { SERIAL_ECHOLNPGM("G33 Auto Calibrate"); - const float dcr = delta_calibration_radius(); - - if (!_1p_calibration && !_0p_calibration) { // test if the outer radius is reachable - LOOP_CAL_RAD(axis) { - const float a = RADIANS(210 + (360 / NPP) * (axis - 1)); - if (!position_is_reachable(cos(a) * dcr, sin(a) * dcr)) { - SERIAL_ECHOLNPGM("?Bed calibration radius implausible."); - return; - } - } - } - // Report settings PGM_P const checkingac = PSTR("Checking... AC"); - serialprintPGM(checkingac); + SERIAL_ECHOPGM_P(checkingac); if (verbose_level == 0) SERIAL_ECHOPGM(" (DRY-RUN)"); SERIAL_EOL(); ui.set_status_P(checkingac); @@ -469,7 +498,7 @@ void GcodeSuite::G33() { // Probe the points zero_std_dev_old = zero_std_dev; - if (!probe_calibration_points(z_at_pt, probe_points, towers_set, stow_after_each)) { + if (!probe_calibration_points(z_at_pt, probe_points, towers_set, stow_after_each, probe_at_offset)) { SERIAL_ECHOLNPGM("Correct delta settings with M665 and M666"); return ac_cleanup(TERN_(HAS_MULTI_HOTEND, old_tool_index)); } @@ -508,11 +537,11 @@ void GcodeSuite::G33() { #define Z0(I) ZP(0, I) // calculate factors - if (_7p_9_center) calibration_radius_factor = 0.9f; + if (_7p_9_center) dcr *= 0.9f; h_factor = auto_tune_h(); r_factor = auto_tune_r(); a_factor = auto_tune_a(); - calibration_radius_factor = 1.0f; + dcr /= 0.9f; switch (probe_points) { case 0: @@ -521,7 +550,7 @@ void GcodeSuite::G33() { case 1: test_precision = 0.0f; // forced end - LOOP_XYZ(axis) e_delta[axis] = +Z4(CEN); + LOOP_LINEAR_AXES(axis) e_delta[axis] = +Z4(CEN); break; case 2: @@ -569,21 +598,21 @@ void GcodeSuite::G33() { // Normalize angles to least-squares if (_angle_results) { float a_sum = 0.0f; - LOOP_XYZ(axis) a_sum += delta_tower_angle_trim[axis]; - LOOP_XYZ(axis) delta_tower_angle_trim[axis] -= a_sum / 3.0f; + LOOP_LINEAR_AXES(axis) a_sum += delta_tower_angle_trim[axis]; + LOOP_LINEAR_AXES(axis) delta_tower_angle_trim[axis] -= a_sum / 3.0f; } // adjust delta_height and endstops by the max amount const float z_temp = _MAX(delta_endstop_adj.a, delta_endstop_adj.b, delta_endstop_adj.c); delta_height -= z_temp; - LOOP_XYZ(axis) delta_endstop_adj[axis] -= z_temp; + LOOP_LINEAR_AXES(axis) delta_endstop_adj[axis] -= z_temp; } recalc_delta_settings(); NOMORE(zero_std_dev_min, zero_std_dev); // print report - if (verbose_level == 3) + if (verbose_level == 3 || verbose_level == 0) print_calibration_results(z_at_pt, _tower_results, _opposite_results); if (verbose_level != 0) { // !dry run @@ -625,7 +654,7 @@ void GcodeSuite::G33() { } else { // dry run PGM_P const enddryrun = PSTR("End DRY-RUN"); - serialprintPGM(enddryrun); + SERIAL_ECHOPGM_P(enddryrun); SERIAL_ECHO_SP(35); SERIAL_ECHOLNPAIR_F("std dev:", zero_std_dev, 3); @@ -643,6 +672,8 @@ void GcodeSuite::G33() { while (((zero_std_dev < test_precision && iterations < 31) || iterations <= force_iterations) && zero_std_dev > calibration_precision); ac_cleanup(TERN_(HAS_MULTI_HOTEND, old_tool_index)); + + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE)); } #endif // DELTA_AUTO_CALIBRATION diff --git a/Marlin/src/gcode/calibrate/G34.cpp b/Marlin/src/gcode/calibrate/G34.cpp index bcca00dd42b3..f335a123114a 100644 --- a/Marlin/src/gcode/calibrate/G34.cpp +++ b/Marlin/src/gcode/calibrate/G34.cpp @@ -39,7 +39,7 @@ void GcodeSuite::G34() { // Home before the alignment procedure - if (!all_axes_trusted()) home_all_axes(); + home_if_needed(); TERN_(HAS_LEVELING, TEMPORARY_BED_LEVELING_STATE(false)); @@ -81,11 +81,11 @@ void GcodeSuite::G34() { const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT); const uint32_t previous_current = stepper.motor_current_setting[Z_AXIS]; stepper.set_digipot_current(1, target_current); - #elif ENABLED(HAS_MOTOR_CURRENT_DAC) + #elif HAS_MOTOR_CURRENT_DAC const float target_current = parser.floatval('S', GANTRY_CALIBRATION_CURRENT); const float previous_current = dac_amps(Z_AXIS, target_current); stepper_dac.set_current_value(Z_AXIS, target_current); - #elif ENABLED(HAS_MOTOR_CURRENT_I2C) + #elif HAS_MOTOR_CURRENT_I2C const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT); previous_current = dac_amps(Z_AXIS); digipot_i2c.set_current(Z_AXIS, target_current) @@ -127,9 +127,9 @@ void GcodeSuite::G34() { stepper.set_digipot_current(Z_AXIS, previous_current); #elif HAS_MOTOR_CURRENT_PWM stepper.set_digipot_current(1, previous_current); - #elif ENABLED(HAS_MOTOR_CURRENT_DAC) + #elif HAS_MOTOR_CURRENT_DAC stepper_dac.set_current_value(Z_AXIS, previous_current); - #elif ENABLED(HAS_MOTOR_CURRENT_I2C) + #elif HAS_MOTOR_CURRENT_I2C digipot_i2c.set_current(Z_AXIS, previous_current) #elif HAS_TRINAMIC_CONFIG #if AXIS_IS_TMC(Z) diff --git a/Marlin/src/gcode/calibrate/G34_M422.cpp b/Marlin/src/gcode/calibrate/G34_M422.cpp index 0bcf954faf3f..dd1dd5622ac1 100644 --- a/Marlin/src/gcode/calibrate/G34_M422.cpp +++ b/Marlin/src/gcode/calibrate/G34_M422.cpp @@ -48,6 +48,13 @@ #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../../core/debug_out.h" +#if NUM_Z_STEPPER_DRIVERS >= 3 + #define TRIPLE_Z 1 + #if NUM_Z_STEPPER_DRIVERS >= 4 + #define QUAD_Z 1 + #endif +#endif + /** * G34: Z-Stepper automatic alignment * @@ -82,9 +89,9 @@ void GcodeSuite::G34() { switch (parser.intval('Z')) { case 1: stepper.set_z1_lock(state); break; case 2: stepper.set_z2_lock(state); break; - #if NUM_Z_STEPPER_DRIVERS >= 3 + #if TRIPLE_Z case 3: stepper.set_z3_lock(state); break; - #if NUM_Z_STEPPER_DRIVERS >= 4 + #if QUAD_Z case 4: stepper.set_z4_lock(state); break; #endif #endif @@ -99,13 +106,6 @@ void GcodeSuite::G34() { #if ENABLED(Z_STEPPER_AUTO_ALIGN) do { // break out on error - #if NUM_Z_STEPPER_DRIVERS == 4 - SERIAL_ECHOLNPGM("Alignment for 4 steppers is Experimental!"); - #elif NUM_Z_STEPPER_DRIVERS > 4 - SERIAL_ECHOLNPGM("Alignment not supported for over 4 steppers"); - break; - #endif - const int8_t z_auto_align_iterations = parser.intval('I', Z_STEPPER_ALIGN_ITERATIONS); if (!WITHIN(z_auto_align_iterations, 1, 30)) { SERIAL_ECHOLNPGM("?(I)teration out of bounds (1-30)."); @@ -130,7 +130,9 @@ void GcodeSuite::G34() { // Disable the leveling matrix before auto-aligning #if HAS_LEVELING - TERN_(RESTORE_LEVELING_AFTER_G34, const bool leveling_was_active = planner.leveling_active); + #if ENABLED(RESTORE_LEVELING_AFTER_G34) + const bool leveling_was_active = planner.leveling_active; + #endif set_bed_leveling_enabled(false); #endif @@ -155,19 +157,17 @@ void GcodeSuite::G34() { const xy_pos_t diff = z_stepper_align.xy[i] - z_stepper_align.xy[j]; return HYPOT2(diff.x, diff.y); }; - float z_probe = Z_BASIC_CLEARANCE + (G34_MAX_GRADE) * 0.01f * SQRT( - #if NUM_Z_STEPPER_DRIVERS == 3 - _MAX(magnitude2(0, 1), magnitude2(1, 2), magnitude2(2, 0)) - #elif NUM_Z_STEPPER_DRIVERS == 4 - _MAX(magnitude2(0, 1), magnitude2(1, 2), magnitude2(2, 3), - magnitude2(3, 0), magnitude2(0, 2), magnitude2(1, 3)) - #else - magnitude2(0, 1) + float z_probe = Z_BASIC_CLEARANCE + (G34_MAX_GRADE) * 0.01f * SQRT(_MAX(0, magnitude2(0, 1) + #if TRIPLE_Z + , magnitude2(2, 1), magnitude2(2, 0) + #if QUAD_Z + , magnitude2(3, 2), magnitude2(3, 1), magnitude2(3, 0) + #endif #endif - ); + )); // Home before the alignment procedure - if (!all_axes_trusted()) home_all_axes(); + home_if_needed(); // Move the Z coordinate realm towards the positive - dirty trick current_position.z += z_probe * 0.5f; @@ -176,7 +176,7 @@ void GcodeSuite::G34() { // This hack is un-done at the end of G34 - either by re-homing, or by using the probed heights of the last iteration. #if DISABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) - float last_z_align_move[NUM_Z_STEPPER_DRIVERS] = ARRAY_N(NUM_Z_STEPPER_DRIVERS, 10000.0f, 10000.0f, 10000.0f, 10000.0f); + float last_z_align_move[NUM_Z_STEPPER_DRIVERS] = ARRAY_N_1(NUM_Z_STEPPER_DRIVERS, 10000.0f); #else float last_z_align_level_indicator = 10000.0f; #endif @@ -188,7 +188,7 @@ void GcodeSuite::G34() { bool adjustment_reverse = false; #endif - #if HAS_DISPLAY + #if HAS_STATUS_MESSAGE PGM_P const msg_iteration = GET_TEXT(MSG_ITERATION); const uint8_t iter_str_len = strlen_P(msg_iteration); #endif @@ -201,8 +201,8 @@ void GcodeSuite::G34() { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> probing all positions."); const int iter = iteration + 1; - SERIAL_ECHOLNPAIR("\nG34 Iteration: ", iter); - #if HAS_DISPLAY + SERIAL_ECHOLNPGM("\nG34 Iteration: ", iter); + #if HAS_STATUS_MESSAGE char str[iter_str_len + 2 + 1]; sprintf_P(str, msg_iteration, iter); ui.set_status(str); @@ -221,7 +221,7 @@ void GcodeSuite::G34() { if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe); if (DEBUGGING(LEVELING)) - DEBUG_ECHOLNPAIR_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y); + DEBUG_ECHOLNPGM_P(PSTR("Probing X"), z_stepper_align.xy[iprobe].x, SP_Y_STR, z_stepper_align.xy[iprobe].y); // Probe a Z height for each stepper. // Probing sanity check is disabled, as it would trigger even in normal cases because @@ -238,7 +238,7 @@ void GcodeSuite::G34() { // the next iteration of probing. This allows adjustments to be made away from the bed. z_measured[iprobe] = z_probed_height + Z_CLEARANCE_BETWEEN_PROBES; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", int(iprobe + 1), " measured position is ", z_measured[iprobe]); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", iprobe + 1, " measured position is ", z_measured[iprobe]); // Remember the minimum measurement to calculate the correction later on z_measured_min = _MIN(z_measured_min, z_measured[iprobe]); @@ -267,7 +267,7 @@ void GcodeSuite::G34() { linear_fit_data lfd; incremental_LSF_reset(&lfd); LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) { - SERIAL_ECHOLNPAIR("PROBEPT_", int(i), ": ", z_measured[i]); + SERIAL_ECHOLNPGM("PROBEPT_", i, ": ", z_measured[i]); incremental_LSF(&lfd, z_stepper_align.xy[i], z_measured[i]); } finish_incremental_LSF(&lfd); @@ -278,39 +278,54 @@ void GcodeSuite::G34() { z_measured_min = _MIN(z_measured_min, z_measured[i]); } - SERIAL_ECHOLNPAIR("CALCULATED STEPPER POSITIONS: Z1=", z_measured[0], " Z2=", z_measured[1], " Z3=", z_measured[2]); + SERIAL_ECHOLNPGM( + LIST_N(DOUBLE(NUM_Z_STEPPER_DRIVERS), + "Calculated Z1=", z_measured[0], + " Z2=", z_measured[1], + " Z3=", z_measured[2], + " Z4=", z_measured[3] + ) + ); #endif - SERIAL_ECHOLNPAIR("\n" - "DIFFERENCE Z1-Z2=", ABS(z_measured[0] - z_measured[1]) - #if NUM_Z_STEPPER_DRIVERS == 3 - , " Z2-Z3=", ABS(z_measured[1] - z_measured[2]) + SERIAL_ECHOLNPGM("\n" + "Z2-Z1=", ABS(z_measured[1] - z_measured[0]) + #if TRIPLE_Z + , " Z3-Z2=", ABS(z_measured[2] - z_measured[1]) , " Z3-Z1=", ABS(z_measured[2] - z_measured[0]) + #if QUAD_Z + , " Z4-Z3=", ABS(z_measured[3] - z_measured[2]) + , " Z4-Z2=", ABS(z_measured[3] - z_measured[1]) + , " Z4-Z1=", ABS(z_measured[3] - z_measured[0]) + #endif #endif ); - #if HAS_DISPLAY + + #if HAS_STATUS_MESSAGE char fstr1[10]; - #if NUM_Z_STEPPER_DRIVERS == 2 - char msg[6 + (6 + 5) * 1 + 1]; - #else - char msg[6 + (6 + 5) * 3 + 1], fstr2[10], fstr3[10]; - #endif - sprintf_P(msg, - PSTR("Diffs Z1-Z2=%s" - #if NUM_Z_STEPPER_DRIVERS == 3 - " Z2-Z3=%s" - " Z3-Z1=%s" + char msg[6 + (6 + 5) * NUM_Z_STEPPER_DRIVERS + 1] + #if TRIPLE_Z + , fstr2[10], fstr3[10] + #if QUAD_Z + , fstr4[10], fstr5[10], fstr6[10] #endif - ), dtostrf(ABS(z_measured[0] - z_measured[1]), 1, 3, fstr1) - #if NUM_Z_STEPPER_DRIVERS == 3 - , dtostrf(ABS(z_measured[1] - z_measured[2]), 1, 3, fstr2) - , dtostrf(ABS(z_measured[2] - z_measured[0]), 1, 3, fstr3) #endif + ; + sprintf_P(msg, + PSTR("1:2=%s" TERN_(TRIPLE_Z, " 3-2=%s 3-1=%s") TERN_(QUAD_Z, " 4-3=%s 4-2=%s 4-1=%s")), + dtostrf(ABS(z_measured[1] - z_measured[0]), 1, 3, fstr1) + OPTARG(TRIPLE_Z, + dtostrf(ABS(z_measured[2] - z_measured[1]), 1, 3, fstr2), + dtostrf(ABS(z_measured[2] - z_measured[0]), 1, 3, fstr3)) + OPTARG(QUAD_Z, + dtostrf(ABS(z_measured[3] - z_measured[2]), 1, 3, fstr4), + dtostrf(ABS(z_measured[3] - z_measured[1]), 1, 3, fstr5), + dtostrf(ABS(z_measured[3] - z_measured[0]), 1, 3, fstr6)) ); ui.set_status(msg); #endif - auto decreasing_accuracy = [](const float &v1, const float &v2){ + auto decreasing_accuracy = [](const_float_t v1, const_float_t v2) { if (v1 < v2 * 0.7f) { SERIAL_ECHOLNPGM("Decreasing Accuracy Detected."); LCD_MESSAGEPGM(MSG_DECREASING_ACCURACY); @@ -357,8 +372,8 @@ void GcodeSuite::G34() { // Check for less accuracy compared to last move if (decreasing_accuracy(last_z_align_move[zstepper], z_align_abs)) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", int(zstepper + 1), " last_z_align_move = ", last_z_align_move[zstepper]); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", int(zstepper + 1), " z_align_abs = ", z_align_abs); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " last_z_align_move = ", last_z_align_move[zstepper]); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " z_align_abs = ", z_align_abs); adjustment_reverse = !adjustment_reverse; } @@ -370,7 +385,7 @@ void GcodeSuite::G34() { // Stop early if all measured points achieve accuracy target if (z_align_abs > z_auto_align_accuracy) success_break = false; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", int(zstepper + 1), " corrected by ", z_align_move); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " corrected by ", z_align_move); // Lock all steppers except one stepper.set_all_z_lock(true, zstepper); @@ -380,7 +395,7 @@ void GcodeSuite::G34() { // Will match reversed Z steppers on dual steppers. Triple will need more work to map. if (adjustment_reverse) { z_align_move = -z_align_move; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("> Z", int(zstepper + 1), " correction reversed to ", z_align_move); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> Z", zstepper + 1, " correction reversed to ", z_align_move); } #endif @@ -406,13 +421,13 @@ void GcodeSuite::G34() { if (err_break) SERIAL_ECHOLNPGM("G34 aborted."); else { - SERIAL_ECHOLNPAIR("Did ", int(iteration + (iteration != z_auto_align_iterations)), " of ", int(z_auto_align_iterations)); + SERIAL_ECHOLNPGM("Did ", iteration + (iteration != z_auto_align_iterations), " of ", z_auto_align_iterations); SERIAL_ECHOLNPAIR_F("Accuracy: ", z_maxdiff); } - // Stow the probe, as the last call to probe.probe_at_point(...) left - // the probe deployed if it was successful. - probe.stow(); + // Stow the probe because the last call to probe.probe_at_point(...) + // leaves the probe deployed when it's successful. + IF_DISABLED(TOUCH_MI_PROBE, probe.stow()); #if ENABLED(HOME_AFTER_G34) // After this operation the z position needs correction @@ -435,7 +450,7 @@ void GcodeSuite::G34() { #endif }while(0); - #endif + #endif // Z_STEPPER_AUTO_ALIGN } #endif // Z_MULTI_ENDSTOPS || Z_STEPPER_AUTO_ALIGN @@ -460,21 +475,13 @@ void GcodeSuite::G34() { */ void GcodeSuite::M422() { + if (!parser.seen_any()) return M422_report(); + if (parser.seen('R')) { z_stepper_align.reset_to_default(); return; } - if (!parser.seen_any()) { - LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) - SERIAL_ECHOLNPAIR_P(PSTR("M422 S"), int(i + 1), SP_X_STR, z_stepper_align.xy[i].x, SP_Y_STR, z_stepper_align.xy[i].y); - #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) - LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) - SERIAL_ECHOLNPAIR_P(PSTR("M422 W"), int(i + 1), SP_X_STR, z_stepper_align.stepper_xy[i].x, SP_Y_STR, z_stepper_align.stepper_xy[i].y); - #endif - return; - } - const bool is_probe_point = parser.seen('S'); if (TERN0(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS, is_probe_point && parser.seen('W'))) { @@ -530,4 +537,26 @@ void GcodeSuite::M422() { pos_dest[position_index] = pos; } +void GcodeSuite::M422_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_Z_AUTO_ALIGN)); + LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPGM_P( + PSTR(" M422 S"), i + 1, + SP_X_STR, z_stepper_align.xy[i].x, + SP_Y_STR, z_stepper_align.xy[i].y + ); + } + #if ENABLED(Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) + LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPGM_P( + PSTR(" M422 W"), i + 1, + SP_X_STR, z_stepper_align.stepper_xy[i].x, + SP_Y_STR, z_stepper_align.stepper_xy[i].y + ); + } + #endif +} + #endif // Z_STEPPER_AUTO_ALIGN diff --git a/Marlin/src/gcode/calibrate/G425.cpp b/Marlin/src/gcode/calibrate/G425.cpp index 9510da7740ef..23a66dd0c593 100644 --- a/Marlin/src/gcode/calibrate/G425.cpp +++ b/Marlin/src/gcode/calibrate/G425.cpp @@ -73,11 +73,23 @@ #if BOTH(CALIBRATION_MEASURE_LEFT, CALIBRATION_MEASURE_RIGHT) #define HAS_X_CENTER 1 #endif -#if BOTH(CALIBRATION_MEASURE_FRONT, CALIBRATION_MEASURE_BACK) +#if HAS_Y_AXIS && BOTH(CALIBRATION_MEASURE_FRONT, CALIBRATION_MEASURE_BACK) #define HAS_Y_CENTER 1 #endif +#if LINEAR_AXES >= 4 && BOTH(CALIBRATION_MEASURE_IMIN, CALIBRATION_MEASURE_IMAX) + #define HAS_I_CENTER 1 +#endif +#if LINEAR_AXES >= 5 && BOTH(CALIBRATION_MEASURE_JMIN, CALIBRATION_MEASURE_JMAX) + #define HAS_J_CENTER 1 +#endif +#if LINEAR_AXES >= 6 && BOTH(CALIBRATION_MEASURE_KMIN, CALIBRATION_MEASURE_KMAX) + #define HAS_K_CENTER 1 +#endif -enum side_t : uint8_t { TOP, RIGHT, FRONT, LEFT, BACK, NUM_SIDES }; +enum side_t : uint8_t { + TOP, RIGHT, FRONT, LEFT, BACK, NUM_SIDES, + LIST_N(DOUBLE(SUB3(LINEAR_AXES)), IMINIMUM, IMAXIMUM, JMINIMUM, JMAXIMUM, KMINIMUM, KMAXIMUM) +}; static constexpr xyz_pos_t true_center CALIBRATION_OBJECT_CENTER; static constexpr xyz_float_t dimensions CALIBRATION_OBJECT_DIMENSIONS; @@ -105,7 +117,7 @@ struct measurements_t { #endif inline void calibration_move() { - do_blocking_move_to(current_position, MMM_TO_MMS(CALIBRATION_FEEDRATE_TRAVEL)); + do_blocking_move_to((xyz_pos_t)current_position, MMM_TO_MMS(CALIBRATION_FEEDRATE_TRAVEL)); } /** @@ -174,7 +186,7 @@ float measuring_movement(const AxisEnum axis, const int dir, const bool stop_sta destination = current_position; for (float travel = 0; travel < limit; travel += step) { destination[axis] += dir * step; - do_blocking_move_to(destination, mms); + do_blocking_move_to((xyz_pos_t)destination, mms); planner.synchronize(); if (read_calibration_pin() == stop_state) break; } @@ -194,18 +206,22 @@ float measuring_movement(const AxisEnum axis, const int dir, const bool stop_sta inline float measure(const AxisEnum axis, const int dir, const bool stop_state, float * const backlash_ptr, const float uncertainty) { const bool fast = uncertainty == CALIBRATION_MEASUREMENT_UNKNOWN; - // Save position - destination = current_position; - const float start_pos = destination[axis]; + // Save the current position of the specified axis + const float start_pos = current_position[axis]; + + // Take a measurement. Only the specified axis will be affected. const float measured_pos = measuring_movement(axis, dir, stop_state, fast); + // Measure backlash if (backlash_ptr && !fast) { const float release_pos = measuring_movement(axis, -dir, !stop_state, fast); *backlash_ptr = ABS(release_pos - measured_pos); } - // Return to starting position + + // Move back to the starting position + destination = current_position; destination[axis] = start_pos; - do_blocking_move_to(destination, MMM_TO_MMS(CALIBRATION_FEEDRATE_TRAVEL)); + do_blocking_move_to((xyz_pos_t)destination, MMM_TO_MMS(CALIBRATION_FEEDRATE_TRAVEL)); return measured_pos; } @@ -226,7 +242,15 @@ inline void probe_side(measurements_t &m, const float uncertainty, const side_t park_above_object(m, uncertainty); switch (side) { - #if AXIS_CAN_CALIBRATE(Z) + #if AXIS_CAN_CALIBRATE(X) + case RIGHT: dir = -1; + case LEFT: axis = X_AXIS; break; + #endif + #if LINEAR_AXES >= 2 && AXIS_CAN_CALIBRATE(Y) + case BACK: dir = -1; + case FRONT: axis = Y_AXIS; break; + #endif + #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) case TOP: { const float measurement = measure(Z_AXIS, -1, true, &m.backlash[TOP], uncertainty); m.obj_center.z = measurement - dimensions.z / 2; @@ -234,13 +258,17 @@ inline void probe_side(measurements_t &m, const float uncertainty, const side_t return; } #endif - #if AXIS_CAN_CALIBRATE(X) - case LEFT: axis = X_AXIS; break; - case RIGHT: axis = X_AXIS; dir = -1; break; + #if LINEAR_AXES >= 4 && AXIS_CAN_CALIBRATE(I) + case IMINIMUM: dir = -1; + case IMAXIMUM: axis = I_AXIS; break; #endif - #if AXIS_CAN_CALIBRATE(Y) - case FRONT: axis = Y_AXIS; break; - case BACK: axis = Y_AXIS; dir = -1; break; + #if LINEAR_AXES >= 5 && AXIS_CAN_CALIBRATE(J) + case JMINIMUM: dir = -1; + case JMAXIMUM: axis = J_AXIS; break; + #endif + #if LINEAR_AXES >= 6 && AXIS_CAN_CALIBRATE(K) + case KMINIMUM: dir = -1; + case KMAXIMUM: axis = K_AXIS; break; #endif default: return; } @@ -285,14 +313,23 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { probe_side(m, uncertainty, TOP); #endif - TERN_(CALIBRATION_MEASURE_RIGHT, probe_side(m, uncertainty, RIGHT, probe_top_at_edge)); - TERN_(CALIBRATION_MEASURE_FRONT, probe_side(m, uncertainty, FRONT, probe_top_at_edge)); - TERN_(CALIBRATION_MEASURE_LEFT, probe_side(m, uncertainty, LEFT, probe_top_at_edge)); - TERN_(CALIBRATION_MEASURE_BACK, probe_side(m, uncertainty, BACK, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_RIGHT, probe_side(m, uncertainty, RIGHT, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_FRONT, probe_side(m, uncertainty, FRONT, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_LEFT, probe_side(m, uncertainty, LEFT, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_BACK, probe_side(m, uncertainty, BACK, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_IMIN, probe_side(m, uncertainty, IMINIMUM, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_IMAX, probe_side(m, uncertainty, IMAXIMUM, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_JMIN, probe_side(m, uncertainty, JMINIMUM, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_JMAX, probe_side(m, uncertainty, JMAXIMUM, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_KMIN, probe_side(m, uncertainty, KMINIMUM, probe_top_at_edge)); + TERN_(CALIBRATION_MEASURE_KMAX, probe_side(m, uncertainty, KMAXIMUM, probe_top_at_edge)); // Compute the measured center of the calibration object. - TERN_(HAS_X_CENTER, m.obj_center.x = (m.obj_side[LEFT] + m.obj_side[RIGHT]) / 2); - TERN_(HAS_Y_CENTER, m.obj_center.y = (m.obj_side[FRONT] + m.obj_side[BACK]) / 2); + TERN_(HAS_X_CENTER, m.obj_center.x = (m.obj_side[LEFT] + m.obj_side[RIGHT]) / 2); + TERN_(HAS_Y_CENTER, m.obj_center.y = (m.obj_side[FRONT] + m.obj_side[BACK]) / 2); + TERN_(HAS_I_CENTER, m.obj_center.i = (m.obj_side[IMINIMUM] + m.obj_side[IMAXIMUM]) / 2); + TERN_(HAS_J_CENTER, m.obj_center.j = (m.obj_side[JMINIMUM] + m.obj_side[JMAXIMUM]) / 2); + TERN_(HAS_K_CENTER, m.obj_center.k = (m.obj_side[KMINIMUM] + m.obj_side[KMAXIMUM]) / 2); // Compute the outside diameter of the nozzle at the height // at which it makes contact with the calibration object @@ -303,36 +340,59 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { // The difference between the known and the measured location // of the calibration object is the positional error - m.pos_error.x = (0 - #if HAS_X_CENTER - + true_center.x - m.obj_center.x - #endif - ); - m.pos_error.y = (0 - #if HAS_Y_CENTER - + true_center.y - m.obj_center.y - #endif + LINEAR_AXIS_CODE( + m.pos_error.x = TERN0(HAS_X_CENTER, true_center.x - m.obj_center.x), + m.pos_error.y = TERN0(HAS_Y_CENTER, true_center.y - m.obj_center.y), + m.pos_error.z = true_center.z - m.obj_center.z, + m.pos_error.i = TERN0(HAS_I_CENTER, true_center.i - m.obj_center.i), + m.pos_error.j = TERN0(HAS_J_CENTER, true_center.j - m.obj_center.j), + m.pos_error.k = TERN0(HAS_K_CENTER, true_center.k - m.obj_center.k) ); - m.pos_error.z = true_center.z - m.obj_center.z; } #if ENABLED(CALIBRATION_REPORTING) inline void report_measured_faces(const measurements_t &m) { SERIAL_ECHOLNPGM("Sides:"); - #if AXIS_CAN_CALIBRATE(Z) - SERIAL_ECHOLNPAIR(" Top: ", m.obj_side[TOP]); + #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) + SERIAL_ECHOLNPGM(" Top: ", m.obj_side[TOP]); #endif #if ENABLED(CALIBRATION_MEASURE_LEFT) - SERIAL_ECHOLNPAIR(" Left: ", m.obj_side[LEFT]); + SERIAL_ECHOLNPGM(" Left: ", m.obj_side[LEFT]); #endif #if ENABLED(CALIBRATION_MEASURE_RIGHT) - SERIAL_ECHOLNPAIR(" Right: ", m.obj_side[RIGHT]); + SERIAL_ECHOLNPGM(" Right: ", m.obj_side[RIGHT]); #endif - #if ENABLED(CALIBRATION_MEASURE_FRONT) - SERIAL_ECHOLNPAIR(" Front: ", m.obj_side[FRONT]); + #if HAS_Y_AXIS + #if ENABLED(CALIBRATION_MEASURE_FRONT) + SERIAL_ECHOLNPGM(" Front: ", m.obj_side[FRONT]); + #endif + #if ENABLED(CALIBRATION_MEASURE_BACK) + SERIAL_ECHOLNPGM(" Back: ", m.obj_side[BACK]); + #endif #endif - #if ENABLED(CALIBRATION_MEASURE_BACK) - SERIAL_ECHOLNPAIR(" Back: ", m.obj_side[BACK]); + #if LINEAR_AXES >= 4 + #if ENABLED(CALIBRATION_MEASURE_IMIN) + SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.obj_side[IMINIMUM]); + #endif + #if ENABLED(CALIBRATION_MEASURE_IMAX) + SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.obj_side[IMAXIMUM]); + #endif + #endif + #if LINEAR_AXES >= 5 + #if ENABLED(CALIBRATION_MEASURE_JMIN) + SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.obj_side[JMINIMUM]); + #endif + #if ENABLED(CALIBRATION_MEASURE_JMAX) + SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.obj_side[JMAXIMUM]); + #endif + #endif + #if LINEAR_AXES >= 6 + #if ENABLED(CALIBRATION_MEASURE_KMIN) + SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.obj_side[KMINIMUM]); + #endif + #if ENABLED(CALIBRATION_MEASURE_KMAX) + SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.obj_side[KMAXIMUM]); + #endif #endif SERIAL_EOL(); } @@ -340,12 +400,21 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { inline void report_measured_center(const measurements_t &m) { SERIAL_ECHOLNPGM("Center:"); #if HAS_X_CENTER - SERIAL_ECHOLNPAIR_P(SP_X_STR, m.obj_center.x); + SERIAL_ECHOLNPGM_P(SP_X_STR, m.obj_center.x); #endif #if HAS_Y_CENTER - SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.obj_center.y); + SERIAL_ECHOLNPGM_P(SP_Y_STR, m.obj_center.y); + #endif + SERIAL_ECHOLNPGM_P(SP_Z_STR, m.obj_center.z); + #if HAS_I_CENTER + SERIAL_ECHOLNPGM_P(SP_I_STR, m.obj_center.i); + #endif + #if HAS_J_CENTER + SERIAL_ECHOLNPGM_P(SP_J_STR, m.obj_center.j); + #endif + #if HAS_K_CENTER + SERIAL_ECHOLNPGM_P(SP_K_STR, m.obj_center.k); #endif - SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.obj_center.z); SERIAL_EOL(); } @@ -353,53 +422,85 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { SERIAL_ECHOLNPGM("Backlash:"); #if AXIS_CAN_CALIBRATE(X) #if ENABLED(CALIBRATION_MEASURE_LEFT) - SERIAL_ECHOLNPAIR(" Left: ", m.backlash[LEFT]); + SERIAL_ECHOLNPGM(" Left: ", m.backlash[LEFT]); #endif #if ENABLED(CALIBRATION_MEASURE_RIGHT) - SERIAL_ECHOLNPAIR(" Right: ", m.backlash[RIGHT]); + SERIAL_ECHOLNPGM(" Right: ", m.backlash[RIGHT]); #endif #endif - #if AXIS_CAN_CALIBRATE(Y) + #if HAS_Y_AXIS && AXIS_CAN_CALIBRATE(Y) #if ENABLED(CALIBRATION_MEASURE_FRONT) - SERIAL_ECHOLNPAIR(" Front: ", m.backlash[FRONT]); + SERIAL_ECHOLNPGM(" Front: ", m.backlash[FRONT]); #endif #if ENABLED(CALIBRATION_MEASURE_BACK) - SERIAL_ECHOLNPAIR(" Back: ", m.backlash[BACK]); + SERIAL_ECHOLNPGM(" Back: ", m.backlash[BACK]); #endif #endif - #if AXIS_CAN_CALIBRATE(Z) - SERIAL_ECHOLNPAIR(" Top: ", m.backlash[TOP]); + #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) + SERIAL_ECHOLNPGM(" Top: ", m.backlash[TOP]); + #endif + #if LINEAR_AXES >= 4 && AXIS_CAN_CALIBRATE(I) + #if ENABLED(CALIBRATION_MEASURE_IMIN) + SERIAL_ECHOLNPGM(" " STR_I_MIN ": ", m.backlash[IMINIMUM]); + #endif + #if ENABLED(CALIBRATION_MEASURE_IMAX) + SERIAL_ECHOLNPGM(" " STR_I_MAX ": ", m.backlash[IMAXIMUM]); + #endif + #endif + #if LINEAR_AXES >= 5 && AXIS_CAN_CALIBRATE(J) + #if ENABLED(CALIBRATION_MEASURE_JMIN) + SERIAL_ECHOLNPGM(" " STR_J_MIN ": ", m.backlash[JMINIMUM]); + #endif + #if ENABLED(CALIBRATION_MEASURE_JMAX) + SERIAL_ECHOLNPGM(" " STR_J_MAX ": ", m.backlash[JMAXIMUM]); + #endif + #endif + #if LINEAR_AXES >= 6 && AXIS_CAN_CALIBRATE(K) + #if ENABLED(CALIBRATION_MEASURE_KMIN) + SERIAL_ECHOLNPGM(" " STR_K_MIN ": ", m.backlash[KMINIMUM]); + #endif + #if ENABLED(CALIBRATION_MEASURE_KMAX) + SERIAL_ECHOLNPGM(" " STR_K_MAX ": ", m.backlash[KMAXIMUM]); + #endif #endif SERIAL_EOL(); } inline void report_measured_positional_error(const measurements_t &m) { SERIAL_CHAR('T'); - SERIAL_ECHO(int(active_extruder)); + SERIAL_ECHO(active_extruder); SERIAL_ECHOLNPGM(" Positional Error:"); - #if HAS_X_CENTER - SERIAL_ECHOLNPAIR_P(SP_X_STR, m.pos_error.x); + #if HAS_X_CENTER && AXIS_CAN_CALIBRATE(X) + SERIAL_ECHOLNPGM_P(SP_X_STR, m.pos_error.x); #endif - #if HAS_Y_CENTER - SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.pos_error.y); + #if HAS_Y_CENTER && AXIS_CAN_CALIBRATE(Y) + SERIAL_ECHOLNPGM_P(SP_Y_STR, m.pos_error.y); + #endif + #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z) + SERIAL_ECHOLNPGM_P(SP_Z_STR, m.pos_error.z); + #endif + #if HAS_I_CENTER && AXIS_CAN_CALIBRATE(I) + SERIAL_ECHOLNPGM_P(SP_I_STR, m.pos_error.i); + #endif + #if HAS_J_CENTER && AXIS_CAN_CALIBRATE(J) + SERIAL_ECHOLNPGM_P(SP_J_STR, m.pos_error.j); + #endif + #if HAS_K_CENTER && AXIS_CAN_CALIBRATE(K) + SERIAL_ECHOLNPGM_P(SP_Z_STR, m.pos_error.z); #endif - if (AXIS_CAN_CALIBRATE(Z)) SERIAL_ECHOLNPAIR_P(SP_Z_STR, m.pos_error.z); SERIAL_EOL(); } inline void report_measured_nozzle_dimensions(const measurements_t &m) { SERIAL_ECHOLNPGM("Nozzle Tip Outer Dimensions:"); - #if HAS_X_CENTER || HAS_Y_CENTER - #if HAS_X_CENTER - SERIAL_ECHOLNPAIR_P(SP_X_STR, m.nozzle_outer_dimension.x); - #endif - #if HAS_Y_CENTER - SERIAL_ECHOLNPAIR_P(SP_Y_STR, m.nozzle_outer_dimension.y); - #endif - #else - UNUSED(m); + #if HAS_X_CENTER + SERIAL_ECHOLNPGM_P(SP_X_STR, m.nozzle_outer_dimension.x); + #endif + #if HAS_Y_CENTER + SERIAL_ECHOLNPGM_P(SP_Y_STR, m.nozzle_outer_dimension.y); #endif SERIAL_EOL(); + UNUSED(m); } #if HAS_HOTEND_OFFSET @@ -408,7 +509,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) { // inline void report_hotend_offsets() { LOOP_S_L_N(e, 1, HOTENDS) - SERIAL_ECHOLNPAIR_P(PSTR("T"), int(e), PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z); + SERIAL_ECHOLNPGM_P(PSTR("T"), e, PSTR(" Hotend Offset X"), hotend_offset[e].x, SP_Y_STR, hotend_offset[e].y, SP_Z_STR, hotend_offset[e].z); } #endif @@ -448,8 +549,33 @@ inline void calibrate_backlash(measurements_t &m, const float uncertainty) { backlash.distance_mm.y = m.backlash[BACK]; #endif - if (AXIS_CAN_CALIBRATE(Z)) backlash.distance_mm.z = m.backlash[TOP]; - #endif + TERN_(HAS_Z_AXIS, if (AXIS_CAN_CALIBRATE(Z)) backlash.distance_mm.z = m.backlash[TOP]); + + #if HAS_I_CENTER + backlash.distance_mm.i = (m.backlash[IMINIMUM] + m.backlash[IMAXIMUM]) / 2; + #elif ENABLED(CALIBRATION_MEASURE_IMIN) + backlash.distance_mm.i = m.backlash[IMINIMUM]; + #elif ENABLED(CALIBRATION_MEASURE_IMAX) + backlash.distance_mm.i = m.backlash[IMAXIMUM]; + #endif + + #if HAS_J_CENTER + backlash.distance_mm.j = (m.backlash[JMINIMUM] + m.backlash[JMAXIMUM]) / 2; + #elif ENABLED(CALIBRATION_MEASURE_JMIN) + backlash.distance_mm.j = m.backlash[JMINIMUM]; + #elif ENABLED(CALIBRATION_MEASURE_JMAX) + backlash.distance_mm.j = m.backlash[JMAXIMUM]; + #endif + + #if HAS_K_CENTER + backlash.distance_mm.k = (m.backlash[KMINIMUM] + m.backlash[KMAXIMUM]) / 2; + #elif ENABLED(CALIBRATION_MEASURE_KMIN) + backlash.distance_mm.k = m.backlash[KMINIMUM]; + #elif ENABLED(CALIBRATION_MEASURE_KMAX) + backlash.distance_mm.k = m.backlash[KMAXIMUM]; + #endif + + #endif // BACKLASH_GCODE } #if ENABLED(BACKLASH_GCODE) @@ -459,7 +585,10 @@ inline void calibrate_backlash(measurements_t &m, const float uncertainty) { // New scope for TEMPORARY_BACKLASH_CORRECTION TEMPORARY_BACKLASH_CORRECTION(all_on); TEMPORARY_BACKLASH_SMOOTHING(0.0f); - const xyz_float_t move = { AXIS_CAN_CALIBRATE(X) * 3, AXIS_CAN_CALIBRATE(Y) * 3, AXIS_CAN_CALIBRATE(Z) * 3 }; + const xyz_float_t move = LINEAR_AXIS_ARRAY( + AXIS_CAN_CALIBRATE(X) * 3, AXIS_CAN_CALIBRATE(Y) * 3, AXIS_CAN_CALIBRATE(Z) * 3, + AXIS_CAN_CALIBRATE(I) * 3, AXIS_CAN_CALIBRATE(J) * 3, AXIS_CAN_CALIBRATE(K) * 3 + ); current_position += move; calibration_move(); current_position -= move; calibration_move(); } @@ -487,11 +616,7 @@ inline void calibrate_toolhead(measurements_t &m, const float uncertainty, const TEMPORARY_BACKLASH_CORRECTION(all_on); TEMPORARY_BACKLASH_SMOOTHING(0.0f); - #if HAS_MULTI_HOTEND - set_nozzle(m, extruder); - #else - UNUSED(extruder); - #endif + TERN(HAS_MULTI_HOTEND, set_nozzle(m, extruder), UNUSED(extruder)); probe_sides(m, uncertainty); @@ -510,6 +635,10 @@ inline void calibrate_toolhead(measurements_t &m, const float uncertainty, const if (ENABLED(HAS_Y_CENTER) && AXIS_CAN_CALIBRATE(Y)) update_measurements(m, Y_AXIS); if (AXIS_CAN_CALIBRATE(Z)) update_measurements(m, Z_AXIS); + TERN_(HAS_I_CENTER, update_measurements(m, I_AXIS)); + TERN_(HAS_J_CENTER, update_measurements(m, J_AXIS)); + TERN_(HAS_K_CENTER, update_measurements(m, K_AXIS)); + sync_plan_position(); } @@ -589,12 +718,12 @@ void GcodeSuite::G425() { SET_SOFT_ENDSTOP_LOOSE(true); measurements_t m; - float uncertainty = parser.seenval('U') ? parser.value_float() : CALIBRATION_MEASUREMENT_UNCERTAIN; + const float uncertainty = parser.floatval('U', CALIBRATION_MEASUREMENT_UNCERTAIN); - if (parser.seen('B')) + if (parser.seen_test('B')) calibrate_backlash(m, uncertainty); - else if (parser.seen('T')) - calibrate_toolhead(m, uncertainty, parser.has_value() ? parser.value_int() : active_extruder); + else if (parser.seen_test('T')) + calibrate_toolhead(m, uncertainty, parser.intval('T', active_extruder)); #if ENABLED(CALIBRATION_REPORTING) else if (parser.seen('V')) { probe_sides(m, uncertainty); diff --git a/Marlin/src/gcode/calibrate/G76_M192_M871.cpp b/Marlin/src/gcode/calibrate/G76_M192_M871.cpp index 5d0bb0dc1e0d..946701050e70 100644 --- a/Marlin/src/gcode/calibrate/G76_M192_M871.cpp +++ b/Marlin/src/gcode/calibrate/G76_M192_M871.cpp @@ -36,17 +36,7 @@ #include "../../module/temperature.h" #include "../../module/probe.h" #include "../../feature/probe_temp_comp.h" - #include "../../lcd/marlinui.h" -#include "../../MarlinCore.h" // for wait_for_heatup, idle() - -#if ENABLED(PRINTJOB_TIMER_AUTOSTART) - #include "../../module/printcounter.h" -#endif - -#if ENABLED(PRINTER_EVENTS_LEDS) - #include "../../feature/leds/leds.h" -#endif /** * G76: calibrate probe and/or bed temperature offsets @@ -57,7 +47,7 @@ * Compensation values are deltas to first probe measurement at bed temp. = 60°C. * - The hotend will not be heated at any time. * - On my Průša MK3S clone I put a piece of paper between the probe and the hotend - * so the hotend fan would not cool my probe constantly. Alternativly you could just + * so the hotend fan would not cool my probe constantly. Alternatively you could just * make sure the fan is not running while running the calibration process. * * Probe calibration: @@ -113,14 +103,14 @@ void GcodeSuite::G76() { return (timeout && ELAPSED(ms, timeout)); }; - auto wait_for_temps = [&](const float tb, const float tp, millis_t &ntr, const millis_t timeout=0) { + auto wait_for_temps = [&](const celsius_t tb, const celsius_t tp, millis_t &ntr, const millis_t timeout=0) { say_waiting_for(); SERIAL_ECHOLNPGM("bed and probe temperature."); - while (fabs(thermalManager.degBed() - tb) > 0.1f || thermalManager.degProbe() > tp) + while (thermalManager.wholeDegBed() != tb || thermalManager.wholeDegProbe() > tp) if (report_temps(ntr, timeout)) return true; return false; }; - auto g76_probe = [](const TempSensorID sid, uint16_t &targ, const xy_pos_t &nozpos) { + auto g76_probe = [](const TempSensorID sid, celsius_t &targ, const xy_pos_t &nozpos) { do_z_clearance(5.0); // Raise nozzle before probing const float measured_z = probe.probe_at_point(nozpos, PROBE_PT_STOW, 0, false); // verbose=0, probe_relative=false if (isnan(measured_z)) @@ -131,7 +121,7 @@ void GcodeSuite::G76() { temp_comp.prepare_new_calibration(measured_z); else temp_comp.push_back_new_measurement(sid, measured_z); - targ += cali_info_init[sid].temp_res; + targ += cali_info_init[sid].temp_resolution; } return measured_z; }; @@ -173,7 +163,6 @@ void GcodeSuite::G76() { remember_feedrate_scaling_off(); - /****************************************** * Calibrate bed temperature offsets ******************************************/ @@ -181,17 +170,17 @@ void GcodeSuite::G76() { // Report temperatures every second and handle heating timeouts millis_t next_temp_report = millis() + 1000; - auto report_targets = [&](const uint16_t tb, const uint16_t tp) { - SERIAL_ECHOLNPAIR("Target Bed:", tb, " Probe:", tp); + auto report_targets = [&](const celsius_t tb, const celsius_t tp) { + SERIAL_ECHOLNPGM("Target Bed:", tb, " Probe:", tp); }; if (do_bed_cal) { - uint16_t target_bed = cali_info_init[TSI_BED].start_temp, - target_probe = temp_comp.bed_calib_probe_temp; + celsius_t target_bed = cali_info_init[TSI_BED].start_temp, + target_probe = temp_comp.bed_calib_probe_temp; say_waiting_for(); SERIAL_ECHOLNPGM(" cooling."); - while (thermalManager.degBed() > target_bed || thermalManager.degProbe() > target_probe) + while (thermalManager.wholeDegBed() > target_bed || thermalManager.wholeDegProbe() > target_probe) report_temps(next_temp_report); // Disable leveling so it won't mess with us @@ -215,14 +204,14 @@ void GcodeSuite::G76() { do_blocking_move_to(noz_pos_xyz); say_waiting_for_probe_heating(); SERIAL_EOL(); - while (thermalManager.degProbe() < target_probe) + while (thermalManager.wholeDegProbe() < target_probe) report_temps(next_temp_report); const float measured_z = g76_probe(TSI_BED, target_bed, noz_pos_xyz); - if (isnan(measured_z) || target_bed > BED_MAX_TARGET) break; + if (isnan(measured_z) || target_bed > (BED_MAX_TARGET)) break; } - SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index()); + SERIAL_ECHOLNPGM("Retrieved measurements: ", temp_comp.get_index()); if (temp_comp.finish_calibration(TSI_BED)) { say_successfully_calibrated(); SERIAL_ECHOLNPGM(" bed."); @@ -247,10 +236,10 @@ void GcodeSuite::G76() { do_blocking_move_to(parkpos); // Initialize temperatures - const uint16_t target_bed = temp_comp.probe_calib_bed_temp; + const celsius_t target_bed = temp_comp.probe_calib_bed_temp; thermalManager.setTargetBed(target_bed); - uint16_t target_probe = cali_info_init[TSI_PROBE].start_temp; + celsius_t target_probe = cali_info_init[TSI_PROBE].start_temp; report_targets(target_bed, target_probe); @@ -266,7 +255,7 @@ void GcodeSuite::G76() { do_blocking_move_to(noz_pos_xyz); say_waiting_for_probe_heating(); - SERIAL_ECHOLNPAIR(" Bed:", target_bed, " Probe:", target_probe); + SERIAL_ECHOLNPGM(" Bed:", target_bed, " Probe:", target_probe); const millis_t probe_timeout_ms = millis() + SEC_TO_MS(900UL); while (thermalManager.degProbe() < target_probe) { if (report_temps(next_temp_report, probe_timeout_ms)) { @@ -281,7 +270,7 @@ void GcodeSuite::G76() { if (isnan(measured_z) || target_probe > cali_info_init[TSI_PROBE].end_temp) break; } - SERIAL_ECHOLNPAIR("Retrieved measurements: ", temp_comp.get_index()); + SERIAL_ECHOLNPGM("Retrieved measurements: ", temp_comp.get_index()); if (temp_comp.finish_calibration(TSI_PROBE)) say_successfully_calibrated(); else @@ -336,7 +325,7 @@ void GcodeSuite::M871() { TSI_PROBE ); if (idx > 0 && temp_comp.set_offset(mod, idx - 1, offset_val)) - SERIAL_ECHOLNPAIR("Set value: ", offset_val); + SERIAL_ECHOLNPGM("Set value: ", offset_val); else SERIAL_ECHOLNPGM("!Invalid index. Failed to set value (note: value at index 0 is constant)."); @@ -361,7 +350,7 @@ void GcodeSuite::M192() { return; } - const float target_temp = parser.value_celsius(); + const celsius_t target_temp = parser.value_celsius(); ui.set_status_P(thermalManager.isProbeBelowTemp(target_temp) ? GET_TEXT(MSG_PROBE_HEATING) : GET_TEXT(MSG_PROBE_COOLING)); thermalManager.wait_for_probe(target_temp, no_wait_for_cooling); } diff --git a/Marlin/src/gcode/calibrate/M100.cpp b/Marlin/src/gcode/calibrate/M100.cpp index 9ac2380e7964..0e2d42907a25 100644 --- a/Marlin/src/gcode/calibrate/M100.cpp +++ b/Marlin/src/gcode/calibrate/M100.cpp @@ -51,7 +51,7 @@ * Also, there are two support functions that can be called from a developer's C code. * * uint16_t check_for_free_memory_corruption(PGM_P const free_memory_start); - * void M100_dump_routine(PGM_P const title, const char * const start, const char * const end); + * void M100_dump_routine(PGM_P const title, const char * const start, const uintptr_t size); * * Initial version by Roxy-3D */ @@ -151,7 +151,7 @@ inline int32_t count_test_bytes(const char * const start_free_memory) { * the block. If so, it may indicate memory corruption due to a bad pointer. * Unexpected bytes are flagged in the right column. */ - inline void dump_free_memory(char *start_free_memory, char *end_free_memory) { + void dump_free_memory(char *start_free_memory, char *end_free_memory) { // // Start and end the dump on a nice 16 byte boundary // (even though the values are not 16-byte aligned). @@ -182,12 +182,12 @@ inline int32_t count_test_bytes(const char * const start_free_memory) { } } - void M100_dump_routine(PGM_P const title, const char * const start, const char * const end) { - serialprintPGM(title); - SERIAL_EOL(); + void M100_dump_routine(PGM_P const title, const char * const start, const uintptr_t size) { + SERIAL_ECHOLNPGM_P(title); // // Round the start and end locations to produce full lines of output // + const char * const end = start + size - 1; dump_free_memory( (char*)(uintptr_t(uint32_t(start) & ~0xFUL)), // Align to 16-byte boundary (char*)(uintptr_t(uint32_t(end) | 0xFUL)) // Align end_free_memory to the 15th byte (at or above end_free_memory) @@ -197,27 +197,27 @@ inline int32_t count_test_bytes(const char * const start_free_memory) { #endif // M100_FREE_MEMORY_DUMPER inline int check_for_free_memory_corruption(PGM_P const title) { - serialprintPGM(title); + SERIAL_ECHOPGM_P(title); char *start_free_memory = free_memory_start, *end_free_memory = free_memory_end; int n = end_free_memory - start_free_memory; - SERIAL_ECHOPAIR("\nfmc() n=", n); - SERIAL_ECHOPAIR("\nfree_memory_start=", hex_address(free_memory_start)); - SERIAL_ECHOLNPAIR(" end_free_memory=", hex_address(end_free_memory)); + SERIAL_ECHOLNPGM("\nfmc() n=", n, + "\nfree_memory_start=", hex_address(free_memory_start), + " end=", hex_address(end_free_memory)); if (end_free_memory < start_free_memory) { SERIAL_ECHOPGM(" end_free_memory < Heap "); - // SET_INPUT_PULLUP(63); // if the developer has a switch wired up to their controller board - // safe_delay(5); // this code can be enabled to pause the display as soon as the - // while ( READ(63)) // malfunction is detected. It is currently defaulting to a switch - // idle(); // being on pin-63 which is unassigend and available on most controller - // safe_delay(20); // boards. - // while ( !READ(63)) - // idle(); + //SET_INPUT_PULLUP(63); // if the developer has a switch wired up to their controller board + //safe_delay(5); // this code can be enabled to pause the display as soon as the + //while ( READ(63)) // malfunction is detected. It is currently defaulting to a switch + // idle(); // being on pin-63 which is unassigend and available on most controller + //safe_delay(20); // boards. + //while ( !READ(63)) + // idle(); serial_delay(20); #if ENABLED(M100_FREE_MEMORY_DUMPER) - M100_dump_routine(PSTR(" Memory corruption detected with end_free_memory 8) { - // SERIAL_ECHOPAIR("Found ", j); - // SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(start_free_memory + i)); + //SERIAL_ECHOPGM("Found ", j); + //SERIAL_ECHOLNPGM(" bytes free at ", hex_address(start_free_memory + i)); i += j; block_cnt++; - SERIAL_ECHOPAIR(" (", block_cnt); - SERIAL_ECHOPAIR(") found=", j); - SERIAL_ECHOLNPGM(" "); + SERIAL_ECHOLNPGM(" (", block_cnt, ") found=", j); } } } - SERIAL_ECHOPAIR(" block_found=", block_cnt); + SERIAL_ECHOPGM(" block_found=", block_cnt); if (block_cnt != 1) SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area."); @@ -269,8 +267,7 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_ if (*addr == TEST_BYTE) { const int32_t j = count_test_bytes(addr); if (j > 8) { - SERIAL_ECHOPAIR("Found ", j); - SERIAL_ECHOLNPAIR(" bytes free at ", hex_address(addr)); + SERIAL_ECHOLNPGM("Found ", j, " bytes free at ", hex_address(addr)); if (j > max_cnt) { max_cnt = j; max_addr = addr; @@ -280,12 +277,11 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_ } } } - if (block_cnt > 1) { - SERIAL_ECHOLNPGM("\nMemory Corruption detected in free memory area."); - SERIAL_ECHOPAIR("\nLargest free block is ", max_cnt); - SERIAL_ECHOLNPAIR(" bytes at ", hex_address(max_addr)); - } - SERIAL_ECHOLNPAIR("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F "))); + if (block_cnt > 1) SERIAL_ECHOLNPGM( + "\nMemory Corruption detected in free memory area." + "\nLargest free block is ", max_cnt, " bytes at ", hex_address(max_addr) + ); + SERIAL_ECHOLNPGM("check_for_free_memory_corruption() = ", check_for_free_memory_corruption(PSTR("M100 F "))); } #if ENABLED(M100_FREE_MEMORY_CORRUPTOR) @@ -294,16 +290,16 @@ inline void free_memory_pool_report(char * const start_free_memory, const int32_ * Corrupt locations in the free memory pool and report the corrupt addresses. * This is useful to check the correctness of the M100 D and the M100 F commands. */ - inline void corrupt_free_memory(char *start_free_memory, const uint32_t size) { + inline void corrupt_free_memory(char *start_free_memory, const uintptr_t size) { start_free_memory += 8; const uint32_t near_top = top_of_stack() - start_free_memory - 250, // -250 to avoid interrupt activity that's altered the stack. j = near_top / (size + 1); - SERIAL_ECHOLNPGM("Corrupting free memory block.\n"); + SERIAL_ECHOLNPGM("Corrupting free memory block."); for (uint32_t i = 1; i <= size; i++) { char * const addr = start_free_memory + i * j; *addr = i; - SERIAL_ECHOPAIR("\nCorrupting address: ", hex_address(addr)); + SERIAL_ECHOPGM("\nCorrupting address: ", hex_address(addr)); } SERIAL_EOL(); } @@ -322,8 +318,8 @@ inline void init_free_memory(char *start_free_memory, int32_t size) { return; } - start_free_memory += 8; // move a few bytes away from the heap just because we don't want - // to be altering memory that close to it. + start_free_memory += 8; // move a few bytes away from the heap just because we + // don't want to be altering memory that close to it. memset(start_free_memory, TEST_BYTE, size); SERIAL_ECHO(size); @@ -331,8 +327,8 @@ inline void init_free_memory(char *start_free_memory, int32_t size) { for (int32_t i = 0; i < size; i++) { if (start_free_memory[i] != TEST_BYTE) { - SERIAL_ECHOPAIR("? address : ", hex_address(start_free_memory + i)); - SERIAL_ECHOLNPAIR("=", hex_byte(start_free_memory[i])); + SERIAL_ECHOPGM("? address : ", hex_address(start_free_memory + i)); + SERIAL_ECHOLNPGM("=", hex_byte(start_free_memory[i])); SERIAL_EOL(); } } @@ -342,16 +338,16 @@ inline void init_free_memory(char *start_free_memory, int32_t size) { * M100: Free Memory Check */ void GcodeSuite::M100() { - char *sp = top_of_stack(); if (!free_memory_end) free_memory_end = sp - MEMORY_END_CORRECTION; - SERIAL_ECHOPAIR("\nbss_end : ", hex_address(end_bss)); - if (heaplimit) SERIAL_ECHOPAIR("\n__heaplimit : ", hex_address(heaplimit)); - SERIAL_ECHOPAIR("\nfree_memory_start : ", hex_address(free_memory_start)); - if (stacklimit) SERIAL_ECHOPAIR("\n__stacklimit : ", hex_address(stacklimit)); - SERIAL_ECHOPAIR("\nfree_memory_end : ", hex_address(free_memory_end)); - if (MEMORY_END_CORRECTION) SERIAL_ECHOPAIR("\nMEMORY_END_CORRECTION: ", MEMORY_END_CORRECTION); - SERIAL_ECHOLNPAIR("\nStack Pointer : ", hex_address(sp)); + SERIAL_ECHOPGM("\nbss_end : ", hex_address(end_bss)); + if (heaplimit) SERIAL_ECHOPGM("\n__heaplimit : ", hex_address(heaplimit)); + SERIAL_ECHOPGM("\nfree_memory_start : ", hex_address(free_memory_start)); + if (stacklimit) SERIAL_ECHOPGM("\n__stacklimit : ", hex_address(stacklimit)); + SERIAL_ECHOPGM("\nfree_memory_end : ", hex_address(free_memory_end)); + if (MEMORY_END_CORRECTION) + SERIAL_ECHOPGM("\nMEMORY_END_CORRECTION : ", MEMORY_END_CORRECTION); + SERIAL_ECHOLNPGM("\nStack Pointer : ", hex_address(sp)); // Always init on the first invocation of M100 static bool m100_not_initialized = true; @@ -369,10 +365,8 @@ void GcodeSuite::M100() { return free_memory_pool_report(free_memory_start, free_memory_end - free_memory_start); #if ENABLED(M100_FREE_MEMORY_CORRUPTOR) - if (parser.seen('C')) return corrupt_free_memory(free_memory_start, parser.value_int()); - #endif } diff --git a/Marlin/src/gcode/calibrate/M12.cpp b/Marlin/src/gcode/calibrate/M12.cpp index da244543754d..191ff22d7dd9 100644 --- a/Marlin/src/gcode/calibrate/M12.cpp +++ b/Marlin/src/gcode/calibrate/M12.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../../inc/MarlinConfigPre.h" #if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) diff --git a/Marlin/src/gcode/calibrate/M425.cpp b/Marlin/src/gcode/calibrate/M425.cpp index 40441ac08d16..1d314a37d3df 100644 --- a/Marlin/src/gcode/calibrate/M425.cpp +++ b/Marlin/src/gcode/calibrate/M425.cpp @@ -48,15 +48,20 @@ void GcodeSuite::M425() { auto axis_can_calibrate = [](const uint8_t a) { switch (a) { - default: - case X_AXIS: return AXIS_CAN_CALIBRATE(X); - case Y_AXIS: return AXIS_CAN_CALIBRATE(Y); - case Z_AXIS: return AXIS_CAN_CALIBRATE(Z); + default: return false; + LINEAR_AXIS_CODE( + case X_AXIS: return AXIS_CAN_CALIBRATE(X), + case Y_AXIS: return AXIS_CAN_CALIBRATE(Y), + case Z_AXIS: return AXIS_CAN_CALIBRATE(Z), + case I_AXIS: return AXIS_CAN_CALIBRATE(I), + case J_AXIS: return AXIS_CAN_CALIBRATE(J), + case K_AXIS: return AXIS_CAN_CALIBRATE(K), + ); } }; - LOOP_XYZ(a) { - if (axis_can_calibrate(a) && parser.seen(XYZ_CHAR(a))) { + LOOP_LINEAR_AXES(a) { + if (axis_can_calibrate(a) && parser.seen(AXIS_CHAR(a))) { planner.synchronize(); backlash.distance_mm[a] = parser.has_value() ? parser.value_linear_units() : backlash.get_measurement(AxisEnum(a)); noArgs = false; @@ -81,23 +86,23 @@ void GcodeSuite::M425() { SERIAL_ECHOPGM("Backlash Correction "); if (!backlash.correction) SERIAL_ECHOPGM("in"); SERIAL_ECHOLNPGM("active:"); - SERIAL_ECHOLNPAIR(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)"); + SERIAL_ECHOLNPGM(" Correction Amount/Fade-out: F", backlash.get_correction(), " (F1.0 = full, F0.0 = none)"); SERIAL_ECHOPGM(" Backlash Distance (mm): "); - LOOP_XYZ(a) if (axis_can_calibrate(a)) { - SERIAL_CHAR(' ', XYZ_CHAR(a)); + LOOP_LINEAR_AXES(a) if (axis_can_calibrate(a)) { + SERIAL_CHAR(' ', AXIS_CHAR(a)); SERIAL_ECHO(backlash.distance_mm[a]); SERIAL_EOL(); } #ifdef BACKLASH_SMOOTHING_MM - SERIAL_ECHOLNPAIR(" Smoothing (mm): S", backlash.smoothing_mm); + SERIAL_ECHOLNPGM(" Smoothing (mm): S", backlash.smoothing_mm); #endif #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) SERIAL_ECHOPGM(" Average measured backlash (mm):"); if (backlash.has_any_measurement()) { - LOOP_XYZ(a) if (axis_can_calibrate(a) && backlash.has_measurement(AxisEnum(a))) { - SERIAL_CHAR(' ', XYZ_CHAR(a)); + LOOP_LINEAR_AXES(a) if (axis_can_calibrate(a) && backlash.has_measurement(AxisEnum(a))) { + SERIAL_CHAR(' ', AXIS_CHAR(a)); SERIAL_ECHO(backlash.get_measurement(AxisEnum(a))); } } @@ -108,4 +113,22 @@ void GcodeSuite::M425() { } } +void GcodeSuite::M425_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_BACKLASH_COMPENSATION)); + SERIAL_ECHOLNPGM_P( + PSTR(" M425 F"), backlash.get_correction() + #ifdef BACKLASH_SMOOTHING_MM + , PSTR(" S"), LINEAR_UNIT(backlash.smoothing_mm) + #endif + , LIST_N(DOUBLE(LINEAR_AXES), + SP_X_STR, LINEAR_UNIT(backlash.distance_mm.x), + SP_Y_STR, LINEAR_UNIT(backlash.distance_mm.y), + SP_Z_STR, LINEAR_UNIT(backlash.distance_mm.z), + SP_I_STR, LINEAR_UNIT(backlash.distance_mm.i), + SP_J_STR, LINEAR_UNIT(backlash.distance_mm.j), + SP_K_STR, LINEAR_UNIT(backlash.distance_mm.k) + ) + ); +} + #endif // BACKLASH_GCODE diff --git a/Marlin/src/gcode/calibrate/M48.cpp b/Marlin/src/gcode/calibrate/M48.cpp index 97aea59221de..9db90c76ac32 100644 --- a/Marlin/src/gcode/calibrate/M48.cpp +++ b/Marlin/src/gcode/calibrate/M48.cpp @@ -117,7 +117,7 @@ void GcodeSuite::M48() { max = -99999.9, // Largest value sampled so far sample_set[n_samples]; // Storage for sampled values - auto dev_report = [](const bool verbose, const float &mean, const float &sigma, const float &min, const float &max, const bool final=false) { + auto dev_report = [](const bool verbose, const_float_t mean, const_float_t sigma, const_float_t min, const_float_t max, const bool final=false) { if (verbose) { SERIAL_ECHOPAIR_F("Mean: ", mean, 6); if (!final) SERIAL_ECHOPAIR_F(" Sigma: ", sigma, 6); @@ -142,7 +142,7 @@ void GcodeSuite::M48() { float sample_sum = 0.0; LOOP_L_N(n, n_samples) { - #if HAS_WIRED_LCD + #if HAS_STATUS_MESSAGE // Display M48 progress in the status bar ui.status_printf_P(0, PSTR(S_FMT ": %d/%d"), GET_TEXT(MSG_M48_POINT), int(n + 1), int(n_samples)); #endif @@ -162,7 +162,7 @@ void GcodeSuite::M48() { #endif ); if (verbose_level > 3) { - SERIAL_ECHOPAIR("Start radius:", radius, " angle:", angle, " dir:"); + SERIAL_ECHOPGM("Start radius:", radius, " angle:", angle, " dir:"); if (dir > 0) SERIAL_CHAR('C'); SERIAL_ECHOLNPGM("CW"); } @@ -200,16 +200,16 @@ void GcodeSuite::M48() { while (!probe.can_reach(next_pos)) { next_pos *= 0.8f; if (verbose_level > 3) - SERIAL_ECHOLNPAIR_P(PSTR("Moving inward: X"), next_pos.x, SP_Y_STR, next_pos.y); + SERIAL_ECHOLNPGM_P(PSTR("Moving inward: X"), next_pos.x, SP_Y_STR, next_pos.y); } - #else + #elif HAS_ENDSTOPS // For a rectangular bed just keep the probe in bounds LIMIT(next_pos.x, X_MIN_POS, X_MAX_POS); LIMIT(next_pos.y, Y_MIN_POS, Y_MAX_POS); #endif if (verbose_level > 3) - SERIAL_ECHOLNPAIR_P(PSTR("Going to: X"), next_pos.x, SP_Y_STR, next_pos.y); + SERIAL_ECHOLNPGM_P(PSTR("Going to: X"), next_pos.x, SP_Y_STR, next_pos.y); do_blocking_move_to_xy(next_pos); } // n_legs loop @@ -240,8 +240,8 @@ void GcodeSuite::M48() { sigma = SQRT(dev_sum / (n + 1)); if (verbose_level > 1) { - SERIAL_ECHO((int)(n + 1)); - SERIAL_ECHOPAIR(" of ", (int)n_samples); + SERIAL_ECHO(n + 1); + SERIAL_ECHOPGM(" of ", n_samples); SERIAL_ECHOPAIR_F(": z: ", pz, 3); SERIAL_CHAR(' '); dev_report(verbose_level > 2, mean, sigma, min, max); @@ -257,7 +257,7 @@ void GcodeSuite::M48() { SERIAL_ECHOLNPGM("Finished!"); dev_report(verbose_level > 0, mean, sigma, min, max, true); - #if HAS_WIRED_LCD + #if HAS_STATUS_MESSAGE // Display M48 results in the status bar char sigma_str[8]; ui.status_printf_P(0, PSTR(S_FMT ": %s"), GET_TEXT(MSG_M48_DEVIATION), dtostrf(sigma, 2, 6, sigma_str)); diff --git a/Marlin/src/gcode/calibrate/M665.cpp b/Marlin/src/gcode/calibrate/M665.cpp index 557204cc1102..11de1ce43459 100644 --- a/Marlin/src/gcode/calibrate/M665.cpp +++ b/Marlin/src/gcode/calibrate/M665.cpp @@ -30,6 +30,7 @@ #if ENABLED(DELTA) #include "../../module/delta.h" + /** * M665: Set delta configurations * @@ -40,24 +41,42 @@ * X = Alpha (Tower 1) angle trim * Y = Beta (Tower 2) angle trim * Z = Gamma (Tower 3) angle trim - * A = Alpha (Tower 1) digonal rod trim - * B = Beta (Tower 2) digonal rod trim - * C = Gamma (Tower 3) digonal rod trim + * A = Alpha (Tower 1) diagonal rod trim + * B = Beta (Tower 2) diagonal rod trim + * C = Gamma (Tower 3) diagonal rod trim */ void GcodeSuite::M665() { - if (parser.seen('H')) delta_height = parser.value_linear_units(); - if (parser.seen('L')) delta_diagonal_rod = parser.value_linear_units(); - if (parser.seen('R')) delta_radius = parser.value_linear_units(); - if (parser.seen('S')) delta_segments_per_second = parser.value_float(); - if (parser.seen('X')) delta_tower_angle_trim.a = parser.value_float(); - if (parser.seen('Y')) delta_tower_angle_trim.b = parser.value_float(); - if (parser.seen('Z')) delta_tower_angle_trim.c = parser.value_float(); - if (parser.seen('A')) delta_diagonal_rod_trim.a = parser.value_float(); - if (parser.seen('B')) delta_diagonal_rod_trim.b = parser.value_float(); - if (parser.seen('C')) delta_diagonal_rod_trim.c = parser.value_float(); + if (!parser.seen_any()) return M665_report(); + + if (parser.seenval('H')) delta_height = parser.value_linear_units(); + if (parser.seenval('L')) delta_diagonal_rod = parser.value_linear_units(); + if (parser.seenval('R')) delta_radius = parser.value_linear_units(); + if (parser.seenval('S')) segments_per_second = parser.value_float(); + if (parser.seenval('X')) delta_tower_angle_trim.a = parser.value_float(); + if (parser.seenval('Y')) delta_tower_angle_trim.b = parser.value_float(); + if (parser.seenval('Z')) delta_tower_angle_trim.c = parser.value_float(); + if (parser.seenval('A')) delta_diagonal_rod_trim.a = parser.value_float(); + if (parser.seenval('B')) delta_diagonal_rod_trim.b = parser.value_float(); + if (parser.seenval('C')) delta_diagonal_rod_trim.c = parser.value_float(); recalc_delta_settings(); } + void GcodeSuite::M665_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_DELTA_SETTINGS)); + SERIAL_ECHOLNPGM_P( + PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod) + , PSTR(" R"), LINEAR_UNIT(delta_radius) + , PSTR(" H"), LINEAR_UNIT(delta_height) + , PSTR(" S"), segments_per_second + , SP_X_STR, LINEAR_UNIT(delta_tower_angle_trim.a) + , SP_Y_STR, LINEAR_UNIT(delta_tower_angle_trim.b) + , SP_Z_STR, LINEAR_UNIT(delta_tower_angle_trim.c) + , PSTR(" A"), LINEAR_UNIT(delta_diagonal_rod_trim.a) + , PSTR(" B"), LINEAR_UNIT(delta_diagonal_rod_trim.b) + , PSTR(" C"), LINEAR_UNIT(delta_diagonal_rod_trim.c) + ); + } + #elif IS_SCARA #include "../../module/scara.h" @@ -68,6 +87,9 @@ * Parameters: * * S[segments-per-second] - Segments-per-second + * + * Without NO_WORKSPACE_OFFSETS: + * * P[theta-psi-offset] - Theta-Psi offset, added to the shoulder (A/X) angle * T[theta-offset] - Theta offset, added to the elbow (B/Y) angle * Z[z-offset] - Z offset, added to Z @@ -76,7 +98,9 @@ * B, T, and Y are all aliases for the elbow angle */ void GcodeSuite::M665() { - if (parser.seenval('S')) delta_segments_per_second = parser.value_float(); + if (!parser.seen_any()) return M665_report(); + + if (parser.seenval('S')) segments_per_second = parser.value_float(); #if HAS_SCARA_OFFSET @@ -107,6 +131,41 @@ #endif // HAS_SCARA_OFFSET } + void GcodeSuite::M665_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_SCARA_SETTINGS " (" STR_S_SEG_PER_SEC TERN_(HAS_SCARA_OFFSET, " " STR_SCARA_P_T_Z) ")")); + SERIAL_ECHOLNPGM_P( + PSTR(" M665 S"), segments_per_second + #if HAS_SCARA_OFFSET + , SP_P_STR, scara_home_offset.a + , SP_T_STR, scara_home_offset.b + , SP_Z_STR, LINEAR_UNIT(scara_home_offset.z) + #endif + ); + } + +#elif ENABLED(POLARGRAPH) + + #include "../../module/polargraph.h" + + /** + * M665: Set POLARGRAPH settings + * + * Parameters: + * + * S[segments-per-second] - Segments-per-second + */ + void GcodeSuite::M665() { + if (parser.seenval('S')) + segments_per_second = parser.value_float(); + else + M665_report(); + } + + void GcodeSuite::M665_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_POLARGRAPH_SETTINGS " (" STR_S_SEG_PER_SEC ")")); + SERIAL_ECHOLNPGM(" M665 S", segments_per_second); + } + #endif #endif // IS_KINEMATIC diff --git a/Marlin/src/gcode/calibrate/M666.cpp b/Marlin/src/gcode/calibrate/M666.cpp index e915aa8ff7b7..c4149c23520a 100644 --- a/Marlin/src/gcode/calibrate/M666.cpp +++ b/Marlin/src/gcode/calibrate/M666.cpp @@ -27,30 +27,49 @@ #include "../gcode.h" #if ENABLED(DELTA) - #include "../../module/delta.h" #include "../../module/motion.h" +#else + #include "../../module/endstops.h" +#endif + +#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) +#include "../../core/debug_out.h" - #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) - #include "../../core/debug_out.h" +#if ENABLED(DELTA) /** * M666: Set delta endstop adjustment */ void GcodeSuite::M666() { DEBUG_SECTION(log_M666, "M666", DEBUGGING(LEVELING)); - LOOP_XYZ(i) { - if (parser.seen(XYZ_CHAR(i))) { + bool is_err = false, is_set = false; + LOOP_LINEAR_AXES(i) { + if (parser.seen(AXIS_CHAR(i))) { + is_set = true; const float v = parser.value_linear_units(); - if (v * Z_HOME_DIR <= 0) delta_endstop_adj[i] = v; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("delta_endstop_adj[", XYZ_CHAR(i), "] = ", delta_endstop_adj[i]); + if (v > 0) + is_err = true; + else { + delta_endstop_adj[i] = v; + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("delta_endstop_adj[", AS_CHAR(AXIS_CHAR(i)), "] = ", v); + } } } + if (is_err) SERIAL_ECHOLNPGM("?M666 offsets must be <= 0"); + if (!is_set) M666_report(); } -#elif HAS_EXTRA_ENDSTOPS + void GcodeSuite::M666_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT)); + SERIAL_ECHOLNPGM_P( + PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) + , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b) + , SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c) + ); + } - #include "../../module/endstops.h" +#else /** * M666: Set Dual Endstops offsets for X, Y, and/or Z. @@ -63,6 +82,8 @@ * Set All: M666 Z */ void GcodeSuite::M666() { + if (!parser.seen_any()) return M666_report(); + #if ENABLED(X_DUAL_ENDSTOPS) if (parser.seenval('X')) endstops.x2_endstop_adj = parser.value_linear_units(); #endif @@ -71,33 +92,40 @@ #endif #if ENABLED(Z_MULTI_ENDSTOPS) if (parser.seenval('Z')) { - #if NUM_Z_STEPPER_DRIVERS >= 3 - const float z_adj = parser.value_linear_units(); - const int ind = parser.intval('S'); - if (!ind || ind == 2) endstops.z2_endstop_adj = z_adj; - if (!ind || ind == 3) endstops.z3_endstop_adj = z_adj; - #if NUM_Z_STEPPER_DRIVERS >= 4 - if (!ind || ind == 4) endstops.z4_endstop_adj = z_adj; - #endif + const float z_adj = parser.value_linear_units(); + #if NUM_Z_STEPPER_DRIVERS == 2 + endstops.z2_endstop_adj = z_adj; #else - endstops.z2_endstop_adj = parser.value_linear_units(); + const int ind = parser.intval('S'); + #define _SET_ZADJ(N) if (!ind || ind == N) endstops.z##N##_endstop_adj = z_adj; + REPEAT_S(2, INCREMENT(NUM_Z_STEPPER_DRIVERS), _SET_ZADJ) #endif } #endif - if (!parser.seen("XYZ")) { - SERIAL_ECHOPGM("Dual Endstop Adjustment (mm): "); - #if ENABLED(X_DUAL_ENDSTOPS) - SERIAL_ECHOPAIR(" X2:", endstops.x2_endstop_adj); - #endif - #if ENABLED(Y_DUAL_ENDSTOPS) - SERIAL_ECHOPAIR(" Y2:", endstops.y2_endstop_adj); - #endif - #if ENABLED(Z_MULTI_ENDSTOPS) - #define _ECHO_ZADJ(N) SERIAL_ECHOPAIR(" Z" STRINGIFY(N) ":", endstops.z##N##_endstop_adj); - REPEAT_S(2, INCREMENT(NUM_Z_STEPPER_DRIVERS), _ECHO_ZADJ) + } + + void GcodeSuite::M666_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_ENDSTOP_ADJUSTMENT)); + SERIAL_ECHOPGM(" M666"); + #if ENABLED(X_DUAL_ENDSTOPS) + SERIAL_ECHOLNPGM_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj)); + #endif + #if ENABLED(Y_DUAL_ENDSTOPS) + SERIAL_ECHOLNPGM_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj)); + #endif + #if ENABLED(Z_MULTI_ENDSTOPS) + #if NUM_Z_STEPPER_DRIVERS >= 3 + SERIAL_ECHOPGM(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); + #if NUM_Z_STEPPER_DRIVERS >= 4 + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj)); + #endif + #else + SERIAL_ECHOLNPGM_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj)); #endif - SERIAL_EOL(); - } + #endif } #endif // HAS_EXTRA_ENDSTOPS diff --git a/Marlin/src/gcode/calibrate/M852.cpp b/Marlin/src/gcode/calibrate/M852.cpp index b60f41748fec..c4361b89f315 100644 --- a/Marlin/src/gcode/calibrate/M852.cpp +++ b/Marlin/src/gcode/calibrate/M852.cpp @@ -36,10 +36,11 @@ * K[yz_factor] - New YZ skew factor */ void GcodeSuite::M852() { - uint8_t ijk = 0, badval = 0, setval = 0; + if (!parser.seen("SIJK")) return M852_report(); - if (parser.seen('I') || parser.seen('S')) { - ++ijk; + uint8_t badval = 0, setval = 0; + + if (parser.seenval('I') || parser.seenval('S')) { const float value = parser.value_linear_units(); if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX)) { if (planner.skew_factor.xy != value) { @@ -53,8 +54,7 @@ void GcodeSuite::M852() { #if ENABLED(SKEW_CORRECTION_FOR_Z) - if (parser.seen('J')) { - ++ijk; + if (parser.seenval('J')) { const float value = parser.value_linear_units(); if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX)) { if (planner.skew_factor.xz != value) { @@ -66,8 +66,7 @@ void GcodeSuite::M852() { ++badval; } - if (parser.seen('K')) { - ++ijk; + if (parser.seenval('K')) { const float value = parser.value_linear_units(); if (WITHIN(value, SKEW_FACTOR_MIN, SKEW_FACTOR_MAX)) { if (planner.skew_factor.yz != value) { @@ -86,21 +85,22 @@ void GcodeSuite::M852() { // When skew is changed the current position changes if (setval) { - set_current_from_steppers_for_axis(ALL_AXES); + set_current_from_steppers_for_axis(ALL_AXES_ENUM); sync_plan_position(); report_current_position(); } +} - if (!ijk) { - SERIAL_ECHO_START(); - serialprintPGM(GET_TEXT(MSG_SKEW_FACTOR)); - SERIAL_ECHOPAIR_F(" XY: ", planner.skew_factor.xy, 6); - #if ENABLED(SKEW_CORRECTION_FOR_Z) - SERIAL_ECHOPAIR_F(" XZ: ", planner.skew_factor.xz, 6); - SERIAL_ECHOPAIR_F(" YZ: ", planner.skew_factor.yz, 6); - #endif - SERIAL_EOL(); - } +void GcodeSuite::M852_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_SKEW_FACTOR)); + SERIAL_ECHOPAIR_F(" M851 I", planner.skew_factor.xy, 6); + #if ENABLED(SKEW_CORRECTION_FOR_Z) + SERIAL_ECHOPAIR_F(" J", planner.skew_factor.xz, 6); + SERIAL_ECHOPAIR_F(" K", planner.skew_factor.yz, 6); + SERIAL_ECHOLNPGM(" ; XY, XZ, YZ"); + #else + SERIAL_ECHOLNPGM(" ; XY"); + #endif } #endif // SKEW_CORRECTION_GCODE diff --git a/Marlin/src/gcode/config/M200-M205.cpp b/Marlin/src/gcode/config/M200-M205.cpp index cb17fc45a6e8..2880bd994307 100644 --- a/Marlin/src/gcode/config/M200-M205.cpp +++ b/Marlin/src/gcode/config/M200-M205.cpp @@ -32,9 +32,14 @@ * T - Optional extruder number. Current extruder if omitted. * D - Set filament diameter and enable. D0 disables volumetric. * S - Turn volumetric ON or OFF. + * + * With VOLUMETRIC_EXTRUDER_LIMIT: + * * L - Volumetric extruder limit (in mm^3/sec). L0 disables the limit. */ void GcodeSuite::M200() { + if (!parser.seen("DST" TERN_(VOLUMETRIC_EXTRUDER_LIMIT, "L"))) + return M200_report(); const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; @@ -69,6 +74,37 @@ planner.calculate_volumetric_multipliers(); } + void GcodeSuite::M200_report(const bool forReplay/*=true*/) { + if (!forReplay) { + report_heading(forReplay, PSTR(STR_FILAMENT_SETTINGS), false); + if (!parser.volumetric_enabled) SERIAL_ECHOPGM(" (Disabled):"); + SERIAL_EOL(); + report_echo_start(forReplay); + } + + #if EXTRUDERS == 1 + { + SERIAL_ECHOLNPGM( + " M200 S", parser.volumetric_enabled, " D", LINEAR_UNIT(planner.filament_size[0]) + #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) + , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0]) + #endif + ); + } + #else + SERIAL_ECHOLNPGM(" M200 S", parser.volumetric_enabled); + LOOP_L_N(i, EXTRUDERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPGM( + " M200 T", i, " D", LINEAR_UNIT(planner.filament_size[i]) + #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) + , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i]) + #endif + ); + } + #endif + } + #endif // !NO_VOLUMETRICS /** @@ -77,6 +113,8 @@ * With multiple extruders use T to specify which one. */ void GcodeSuite::M201() { + if (!parser.seen("T" LOGICAL_AXES_STRING)) + return M201_report(); const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; @@ -86,31 +124,85 @@ void GcodeSuite::M201() { if (parser.seenval('G')) planner.xy_freq_min_speed_factor = constrain(parser.value_float(), 1, 100) / 100; #endif - LOOP_XYZE(i) { - if (parser.seen(axis_codes[i])) { - const uint8_t a = (i == E_AXIS ? uint8_t(E_AXIS_N(target_extruder)) : i); + LOOP_LOGICAL_AXES(i) { + if (parser.seenval(axis_codes[i])) { + const uint8_t a = TERN(HAS_EXTRUDERS, (i == E_AXIS ? uint8_t(E_AXIS_N(target_extruder)) : i), i); planner.set_max_acceleration(a, parser.value_axis_units((AxisEnum)a)); } } } +void GcodeSuite::M201_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_MAX_ACCELERATION)); + SERIAL_ECHOLNPGM_P( + LIST_N(DOUBLE(LINEAR_AXES), + PSTR(" M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]), + SP_Y_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS]), + SP_Z_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Z_AXIS]), + SP_I_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[I_AXIS]), + SP_J_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[J_AXIS]), + SP_K_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[K_AXIS]) + ) + #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) + , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS]) + #endif + ); + #if ENABLED(DISTINCT_E_FACTORS) + LOOP_L_N(i, E_STEPPERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPGM_P( + PSTR(" M201 T"), i + , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)]) + ); + } + #endif +} + /** * M203: Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in units/sec * * With multiple extruders use T to specify which one. */ void GcodeSuite::M203() { + if (!parser.seen("T" LOGICAL_AXES_STRING)) + return M203_report(); const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; - LOOP_XYZE(i) - if (parser.seen(axis_codes[i])) { - const uint8_t a = (i == E_AXIS ? uint8_t(E_AXIS_N(target_extruder)) : i); + LOOP_LOGICAL_AXES(i) + if (parser.seenval(axis_codes[i])) { + const uint8_t a = TERN(HAS_EXTRUDERS, (i == E_AXIS ? uint8_t(E_AXIS_N(target_extruder)) : i), i); planner.set_max_feedrate(a, parser.value_axis_units((AxisEnum)a)); } } +void GcodeSuite::M203_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_MAX_FEEDRATES)); + SERIAL_ECHOLNPGM_P( + LIST_N(DOUBLE(LINEAR_AXES), + PSTR(" M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]), + SP_Y_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS]), + SP_Z_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Z_AXIS]), + SP_I_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[I_AXIS]), + SP_J_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[J_AXIS]), + SP_K_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[K_AXIS]) + ) + #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) + , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS]) + #endif + ); + #if ENABLED(DISTINCT_E_FACTORS) + LOOP_L_N(i, E_STEPPERS) { + SERIAL_ECHO_START(); + SERIAL_ECHOLNPGM_P( + PSTR(" M203 T"), i + , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)]) + ); + } + #endif +} + /** * M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000) * @@ -119,11 +211,8 @@ void GcodeSuite::M203() { * T = Travel (non printing) moves */ void GcodeSuite::M204() { - if (!parser.seen("PRST")) { - SERIAL_ECHOPAIR("Acceleration: P", planner.settings.acceleration); - SERIAL_ECHOPAIR(" R", planner.settings.retract_acceleration); - SERIAL_ECHOLNPAIR_P(SP_T_STR, planner.settings.travel_acceleration); - } + if (!parser.seen("PRST")) + return M204_report(); else { //planner.synchronize(); // 'S' for legacy compatibility. Should NOT BE USED for new development @@ -134,6 +223,15 @@ void GcodeSuite::M204() { } } +void GcodeSuite::M204_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_ACCELERATION_P_R_T)); + SERIAL_ECHOLNPGM_P( + PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration) + , PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration) + , SP_T_STR, LINEAR_UNIT(planner.settings.travel_acceleration) + ); +} + /** * M205: Set Advanced Settings * @@ -147,24 +245,18 @@ void GcodeSuite::M204() { * J = Junction Deviation (mm) (If not using CLASSIC_JERK) */ void GcodeSuite::M205() { - #if HAS_JUNCTION_DEVIATION - #define J_PARAM "J" - #else - #define J_PARAM - #endif - #if HAS_CLASSIC_JERK - #define XYZE_PARAM "XYZE" - #else - #define XYZE_PARAM - #endif - if (!parser.seen("BST" J_PARAM XYZE_PARAM)) return; + if (!parser.seen("BST" TERN_(HAS_JUNCTION_DEVIATION, "J") TERN_(HAS_CLASSIC_JERK, "XYZE"))) + return M205_report(); //planner.synchronize(); - if (parser.seen('B')) planner.settings.min_segment_time_us = parser.value_ulong(); - if (parser.seen('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units(); - if (parser.seen('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units(); + if (parser.seenval('B')) planner.settings.min_segment_time_us = parser.value_ulong(); + if (parser.seenval('S')) planner.settings.min_feedrate_mm_s = parser.value_linear_units(); + if (parser.seenval('T')) planner.settings.min_travel_feedrate_mm_s = parser.value_linear_units(); #if HAS_JUNCTION_DEVIATION - if (parser.seen('J')) { + #if HAS_CLASSIC_JERK && (AXIS4_NAME == 'J' || AXIS5_NAME == 'J' || AXIS6_NAME == 'J') + #error "Can't set_max_jerk for 'J' axis because 'J' is used for Junction Deviation." + #endif + if (parser.seenval('J')) { const float junc_dev = parser.value_linear_units(); if (WITHIN(junc_dev, 0.01f, 0.3f)) { planner.junction_deviation_mm = junc_dev; @@ -175,17 +267,50 @@ void GcodeSuite::M205() { } #endif #if HAS_CLASSIC_JERK - if (parser.seen('X')) planner.set_max_jerk(X_AXIS, parser.value_linear_units()); - if (parser.seen('Y')) planner.set_max_jerk(Y_AXIS, parser.value_linear_units()); - if (parser.seen('Z')) { - planner.set_max_jerk(Z_AXIS, parser.value_linear_units()); - #if HAS_MESH && DISABLED(LIMITED_JERK_EDITING) - if (planner.max_jerk.z <= 0.1f) - SERIAL_ECHOLNPGM("WARNING! Low Z Jerk may lead to unwanted pauses."); + bool seenZ = false; + LOGICAL_AXIS_CODE( + if (parser.seenval('E')) planner.set_max_jerk(E_AXIS, parser.value_linear_units()), + if (parser.seenval('X')) planner.set_max_jerk(X_AXIS, parser.value_linear_units()), + if (parser.seenval('Y')) planner.set_max_jerk(Y_AXIS, parser.value_linear_units()), + if ((seenZ = parser.seenval('Z'))) planner.set_max_jerk(Z_AXIS, parser.value_linear_units()), + if (parser.seenval(AXIS4_NAME)) planner.set_max_jerk(I_AXIS, parser.value_linear_units()), + if (parser.seenval(AXIS5_NAME)) planner.set_max_jerk(J_AXIS, parser.value_linear_units()), + if (parser.seenval(AXIS6_NAME)) planner.set_max_jerk(K_AXIS, parser.value_linear_units()) + ); + #if HAS_MESH && DISABLED(LIMITED_JERK_EDITING) + if (seenZ && planner.max_jerk.z <= 0.1f) + SERIAL_ECHOLNPGM("WARNING! Low Z Jerk may lead to unwanted pauses."); + #endif + #endif // HAS_CLASSIC_JERK +} + +void GcodeSuite::M205_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR( + "Advanced (B S T" + TERN_(HAS_JUNCTION_DEVIATION, " J") + TERN_(HAS_CLASSIC_JERK, " X Y Z") + TERN_(HAS_CLASSIC_E_JERK, " E") + ")" + )); + SERIAL_ECHOLNPGM_P( + PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us) + , PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s) + , SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s) + #if HAS_JUNCTION_DEVIATION + , PSTR(" J"), LINEAR_UNIT(planner.junction_deviation_mm) + #endif + #if HAS_CLASSIC_JERK + , LIST_N(DOUBLE(LINEAR_AXES), + SP_X_STR, LINEAR_UNIT(planner.max_jerk.x), + SP_Y_STR, LINEAR_UNIT(planner.max_jerk.y), + SP_Z_STR, LINEAR_UNIT(planner.max_jerk.z), + SP_I_STR, LINEAR_UNIT(planner.max_jerk.i), + SP_J_STR, LINEAR_UNIT(planner.max_jerk.j), + SP_K_STR, LINEAR_UNIT(planner.max_jerk.k) + ) + #if HAS_CLASSIC_E_JERK + , SP_E_STR, LINEAR_UNIT(planner.max_jerk.e) #endif - } - #if HAS_CLASSIC_E_JERK - if (parser.seen('E')) planner.set_max_jerk(E_AXIS, parser.value_linear_units()); #endif - #endif + ); } diff --git a/Marlin/src/gcode/config/M217.cpp b/Marlin/src/gcode/config/M217.cpp index f2fefb5756f6..923a27d7dfed 100644 --- a/Marlin/src/gcode/config/M217.cpp +++ b/Marlin/src/gcode/config/M217.cpp @@ -33,44 +33,6 @@ #include "../../MarlinCore.h" // for SP_X_STR, etc. -void M217_report(const bool eeprom=false) { - - #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) - serialprintPGM(eeprom ? PSTR(" M217") : PSTR("Toolchange:")); - SERIAL_ECHOPAIR(" S", LINEAR_UNIT(toolchange_settings.swap_length)); - SERIAL_ECHOPAIR_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume), - SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime), - SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed)); - SERIAL_ECHOPAIR(" R", LINEAR_UNIT(toolchange_settings.retract_speed), - " U", LINEAR_UNIT(toolchange_settings.unretract_speed), - " F", toolchange_settings.fan_speed, - " G", toolchange_settings.fan_time); - - #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) - SERIAL_ECHOPAIR(" A", int(migration.automode)); - SERIAL_ECHOPAIR(" L", LINEAR_UNIT(migration.last)); - #endif - - #if ENABLED(TOOLCHANGE_PARK) - SERIAL_ECHOPAIR(" W", LINEAR_UNIT(toolchange_settings.enable_park)); - SERIAL_ECHOPAIR_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)); - SERIAL_ECHOPAIR_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y)); - #endif - - #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED) - SERIAL_ECHOPAIR(" V", LINEAR_UNIT(enable_first_prime)); - #endif - - #else - - UNUSED(eeprom); - - #endif - - SERIAL_ECHOPAIR_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise)); - SERIAL_EOL(); -} - /** * M217 - Set SINGLENOZZLE toolchange parameters * @@ -168,4 +130,39 @@ void GcodeSuite::M217() { M217_report(); } +void GcodeSuite::M217_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_TOOL_CHANGING)); + + SERIAL_ECHOPGM(" M217"); + + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) + SERIAL_ECHOPGM(" S", LINEAR_UNIT(toolchange_settings.swap_length)); + SERIAL_ECHOPGM_P(SP_B_STR, LINEAR_UNIT(toolchange_settings.extra_resume), + SP_E_STR, LINEAR_UNIT(toolchange_settings.extra_prime), + SP_P_STR, LINEAR_UNIT(toolchange_settings.prime_speed)); + SERIAL_ECHOPGM(" R", LINEAR_UNIT(toolchange_settings.retract_speed), + " U", LINEAR_UNIT(toolchange_settings.unretract_speed), + " F", toolchange_settings.fan_speed, + " G", toolchange_settings.fan_time); + + #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) + SERIAL_ECHOPGM(" A", migration.automode); + SERIAL_ECHOPGM(" L", LINEAR_UNIT(migration.last)); + #endif + + #if ENABLED(TOOLCHANGE_PARK) + SERIAL_ECHOPGM(" W", LINEAR_UNIT(toolchange_settings.enable_park)); + SERIAL_ECHOPGM_P(SP_X_STR, LINEAR_UNIT(toolchange_settings.change_point.x)); + SERIAL_ECHOPGM_P(SP_Y_STR, LINEAR_UNIT(toolchange_settings.change_point.y)); + #endif + + #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED) + SERIAL_ECHOPGM(" V", LINEAR_UNIT(enable_first_prime)); + #endif + + #endif + + SERIAL_ECHOLNPGM_P(SP_Z_STR, LINEAR_UNIT(toolchange_settings.z_raise)); +} + #endif // HAS_MULTI_EXTRUDER diff --git a/Marlin/src/gcode/config/M218.cpp b/Marlin/src/gcode/config/M218.cpp index 7701320e9eae..c95cd6c1b93c 100644 --- a/Marlin/src/gcode/config/M218.cpp +++ b/Marlin/src/gcode/config/M218.cpp @@ -41,6 +41,8 @@ */ void GcodeSuite::M218() { + if (!parser.seen_any()) return M218_report(); + const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; @@ -48,24 +50,23 @@ void GcodeSuite::M218() { if (parser.seenval('Y')) hotend_offset[target_extruder].y = parser.value_linear_units(); if (parser.seenval('Z')) hotend_offset[target_extruder].z = parser.value_linear_units(); - if (!parser.seen("XYZ")) { - SERIAL_ECHO_START(); - SERIAL_ECHOPGM(STR_HOTEND_OFFSET); - HOTEND_LOOP() { - SERIAL_CHAR(' '); - SERIAL_ECHO(hotend_offset[e].x); - SERIAL_CHAR(','); - SERIAL_ECHO(hotend_offset[e].y); - SERIAL_CHAR(','); - SERIAL_ECHO_F(hotend_offset[e].z, 3); - } - SERIAL_EOL(); - } - #if ENABLED(DELTA) if (target_extruder == active_extruder) do_blocking_move_to_xy(current_position, planner.settings.max_feedrate_mm_s[X_AXIS]); #endif } +void GcodeSuite::M218_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_HOTEND_OFFSETS)); + LOOP_S_L_N(e, 1, HOTENDS) { + report_echo_start(forReplay); + SERIAL_ECHOPGM_P( + PSTR(" M218 T"), e, + SP_X_STR, LINEAR_UNIT(hotend_offset[e].x), + SP_Y_STR, LINEAR_UNIT(hotend_offset[e].y) + ); + SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(hotend_offset[e].z), 3); + } +} + #endif // HAS_HOTEND_OFFSET diff --git a/Marlin/src/gcode/config/M220.cpp b/Marlin/src/gcode/config/M220.cpp index 75339f10b9fc..c9070df803b8 100644 --- a/Marlin/src/gcode/config/M220.cpp +++ b/Marlin/src/gcode/config/M220.cpp @@ -44,7 +44,7 @@ void GcodeSuite::M220() { if (parser.seenval('S')) feedrate_percentage = parser.value_int(); if (!parser.seen_any()) { - SERIAL_ECHOPAIR("FR:", feedrate_percentage); + SERIAL_ECHOPGM("FR:", feedrate_percentage); SERIAL_CHAR('%'); SERIAL_EOL(); } diff --git a/Marlin/src/gcode/config/M221.cpp b/Marlin/src/gcode/config/M221.cpp index 7ba22d1901d5..f653aded7c16 100644 --- a/Marlin/src/gcode/config/M221.cpp +++ b/Marlin/src/gcode/config/M221.cpp @@ -23,7 +23,7 @@ #include "../gcode.h" #include "../../module/planner.h" -#if EXTRUDERS +#if HAS_EXTRUDERS /** * M221: Set extrusion percentage (M221 T0 S95) @@ -38,7 +38,7 @@ void GcodeSuite::M221() { else { SERIAL_ECHO_START(); SERIAL_CHAR('E', '0' + target_extruder); - SERIAL_ECHOPAIR(" Flow: ", planner.flow_percentage[target_extruder]); + SERIAL_ECHOPGM(" Flow: ", planner.flow_percentage[target_extruder]); SERIAL_CHAR('%'); SERIAL_EOL(); } diff --git a/Marlin/src/gcode/config/M281.cpp b/Marlin/src/gcode/config/M281.cpp index 018ca1c0928d..ac91f08cb4b0 100644 --- a/Marlin/src/gcode/config/M281.cpp +++ b/Marlin/src/gcode/config/M281.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../../inc/MarlinConfig.h" #if ENABLED(EDITABLE_SERVO_ANGLES) @@ -34,7 +35,10 @@ * U - Stowed Angle */ void GcodeSuite::M281() { + if (!parser.seen_any()) return M281_report(); + if (!parser.seenval('P')) return; + const int servo_index = parser.value_int(); if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) { #if ENABLED(BLTOUCH) @@ -43,25 +47,31 @@ void GcodeSuite::M281() { return; } #endif - bool angle_change = false; - if (parser.seen('L')) { - servo_angles[servo_index][0] = parser.value_int(); - angle_change = true; - } - if (parser.seen('U')) { - servo_angles[servo_index][1] = parser.value_int(); - angle_change = true; - } - if (!angle_change) { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(" Servo ", servo_index, - " L", servo_angles[servo_index][0], - " U", servo_angles[servo_index][1]); - } + if (parser.seen('L')) servo_angles[servo_index][0] = parser.value_int(); + if (parser.seen('U')) servo_angles[servo_index][1] = parser.value_int(); } - else { - SERIAL_ERROR_START(); - SERIAL_ECHOLNPAIR("Servo ", servo_index, " out of range"); + else + SERIAL_ERROR_MSG("Servo ", servo_index, " out of range"); +} + +void GcodeSuite::M281_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_SERVO_ANGLES)); + LOOP_L_N(i, NUM_SERVOS) { + switch (i) { + default: break; + #if ENABLED(SWITCHING_EXTRUDER) + case SWITCHING_EXTRUDER_SERVO_NR: + #if EXTRUDERS > 3 + case SWITCHING_EXTRUDER_E23_SERVO_NR: + #endif + #elif ENABLED(SWITCHING_NOZZLE) + case SWITCHING_NOZZLE_SERVO_NR: + #elif ENABLED(BLTOUCH) || (HAS_Z_SERVO_PROBE && defined(Z_SERVO_ANGLES)) + case Z_PROBE_SERVO_NR: + #endif + report_echo_start(forReplay); + SERIAL_ECHOLNPGM(" M281 P", i, " L", servo_angles[i][0], " U", servo_angles[i][1]); + } } } diff --git a/Marlin/src/gcode/config/M301.cpp b/Marlin/src/gcode/config/M301.cpp index 7b3f57608bad..db882b3b6505 100644 --- a/Marlin/src/gcode/config/M301.cpp +++ b/Marlin/src/gcode/config/M301.cpp @@ -46,46 +46,64 @@ * F[float] Kf term */ void GcodeSuite::M301() { - // multi-extruder PID patch: M301 updates or prints a single extruder's PID values // default behavior (omitting E parameter) is to update for extruder 0 only - const uint8_t e = parser.byteval('E'); // extruder being updated + int8_t e = E_TERN0(parser.byteval('E', -1)); // extruder being updated + + if (!parser.seen("PID" TERN_(PID_EXTRUSION_SCALING, "CL") TERN_(PID_FAN_SCALING, "F"))) + return M301_report(true E_OPTARG(e)); + + if (e == -1) e = 0; if (e < HOTENDS) { // catch bad input value - if (parser.seen('P')) PID_PARAM(Kp, e) = parser.value_float(); - if (parser.seen('I')) PID_PARAM(Ki, e) = scalePID_i(parser.value_float()); - if (parser.seen('D')) PID_PARAM(Kd, e) = scalePID_d(parser.value_float()); + + if (parser.seenval('P')) PID_PARAM(Kp, e) = parser.value_float(); + if (parser.seenval('I')) PID_PARAM(Ki, e) = scalePID_i(parser.value_float()); + if (parser.seenval('D')) PID_PARAM(Kd, e) = scalePID_d(parser.value_float()); + #if ENABLED(PID_EXTRUSION_SCALING) - if (parser.seen('C')) PID_PARAM(Kc, e) = parser.value_float(); + if (parser.seenval('C')) PID_PARAM(Kc, e) = parser.value_float(); if (parser.seenval('L')) thermalManager.lpq_len = parser.value_int(); NOMORE(thermalManager.lpq_len, LPQ_MAX_LEN); NOLESS(thermalManager.lpq_len, 0); #endif #if ENABLED(PID_FAN_SCALING) - if (parser.seen('F')) PID_PARAM(Kf, e) = parser.value_float(); + if (parser.seenval('F')) PID_PARAM(Kf, e) = parser.value_float(); #endif thermalManager.updatePID(); - - SERIAL_ECHO_START(); - #if ENABLED(PID_PARAMS_PER_HOTEND) - SERIAL_ECHOPAIR(" e:", e); // specify extruder in serial output - #endif - SERIAL_ECHOPAIR(" p:", PID_PARAM(Kp, e), - " i:", unscalePID_i(PID_PARAM(Ki, e)), - " d:", unscalePID_d(PID_PARAM(Kd, e))); - #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPAIR(" c:", PID_PARAM(Kc, e)); - #endif - #if ENABLED(PID_FAN_SCALING) - SERIAL_ECHOPAIR(" f:", PID_PARAM(Kf, e)); - #endif - - SERIAL_EOL(); } else SERIAL_ERROR_MSG(STR_INVALID_EXTRUDER); } +void GcodeSuite::M301_report(const bool forReplay/*=true*/ E_OPTARG(const int8_t eindex/*=-1*/)) { + report_heading(forReplay, PSTR(STR_HOTEND_PID)); + IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr int8_t eindex = -1); + HOTEND_LOOP() { + if (e == eindex || eindex == -1) { + report_echo_start(forReplay); + SERIAL_ECHOPGM_P( + #if ENABLED(PID_PARAMS_PER_HOTEND) + PSTR(" M301 E"), e, SP_P_STR + #else + PSTR(" M301 P") + #endif + , PID_PARAM(Kp, e) + , PSTR(" I"), unscalePID_i(PID_PARAM(Ki, e)) + , PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e)) + ); + #if ENABLED(PID_EXTRUSION_SCALING) + SERIAL_ECHOPGM_P(SP_C_STR, PID_PARAM(Kc, e)); + if (e == 0) SERIAL_ECHOPGM(" L", thermalManager.lpq_len); + #endif + #if ENABLED(PID_FAN_SCALING) + SERIAL_ECHOPGM(" F", PID_PARAM(Kf, e)); + #endif + SERIAL_EOL(); + } + } +} + #endif // PIDTEMP diff --git a/Marlin/src/gcode/config/M302.cpp b/Marlin/src/gcode/config/M302.cpp index afdc6c9e8506..57c049e19404 100644 --- a/Marlin/src/gcode/config/M302.cpp +++ b/Marlin/src/gcode/config/M302.cpp @@ -55,8 +55,8 @@ void GcodeSuite::M302() { // Report current state SERIAL_ECHO_START(); SERIAL_ECHOPGM("Cold extrudes are "); - serialprintPGM(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis")); - SERIAL_ECHOLNPAIR("abled (min temp ", thermalManager.extrude_min_temp, "C)"); + SERIAL_ECHOPGM_P(thermalManager.allow_cold_extrude ? PSTR("en") : PSTR("dis")); + SERIAL_ECHOLNPGM("abled (min temp ", thermalManager.extrude_min_temp, "C)"); } } diff --git a/Marlin/src/gcode/config/M304.cpp b/Marlin/src/gcode/config/M304.cpp index 10739be3f8c3..05ee4bad8061 100644 --- a/Marlin/src/gcode/config/M304.cpp +++ b/Marlin/src/gcode/config/M304.cpp @@ -35,14 +35,19 @@ * D - Set the D value */ void GcodeSuite::M304() { + if (!parser.seen("PID")) return M304_report(); if (parser.seen('P')) thermalManager.temp_bed.pid.Kp = parser.value_float(); if (parser.seen('I')) thermalManager.temp_bed.pid.Ki = scalePID_i(parser.value_float()); if (parser.seen('D')) thermalManager.temp_bed.pid.Kd = scalePID_d(parser.value_float()); +} - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(" p:", thermalManager.temp_bed.pid.Kp, - " i:", unscalePID_i(thermalManager.temp_bed.pid.Ki), - " d:", unscalePID_d(thermalManager.temp_bed.pid.Kd)); +void GcodeSuite::M304_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_BED_PID)); + SERIAL_ECHO_MSG( + " M304 P", thermalManager.temp_bed.pid.Kp + , " I", unscalePID_i(thermalManager.temp_bed.pid.Ki) + , " D", unscalePID_d(thermalManager.temp_bed.pid.Kd) + ); } #endif // PIDTEMPBED diff --git a/Marlin/src/gcode/config/M305.cpp b/Marlin/src/gcode/config/M305.cpp index 3e7206aee49d..6957eef050dd 100644 --- a/Marlin/src/gcode/config/M305.cpp +++ b/Marlin/src/gcode/config/M305.cpp @@ -49,10 +49,8 @@ void GcodeSuite::M305() { const bool do_set = parser.seen("BCRT"); // A valid P index is required - if (t_index >= (USER_THERMISTORS) || (do_set && t_index < 0)) { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("!Invalid index. (0 <= P <= ", int(USER_THERMISTORS - 1), ")"); - } + if (t_index >= (USER_THERMISTORS) || (do_set && t_index < 0)) + SERIAL_ECHO_MSG("!Invalid index. (0 <= P <= ", USER_THERMISTORS - 1, ")"); else if (do_set) { if (parser.seen('R')) // Pullup resistor value if (!thermalManager.set_pull_up_res(t_index, parser.value_float())) @@ -72,10 +70,10 @@ void GcodeSuite::M305() { } // If not setting then report parameters else if (t_index < 0) { // ...all user thermistors LOOP_L_N(i, USER_THERMISTORS) - thermalManager.log_user_thermistor(i); + thermalManager.M305_report(i); } else // ...one user thermistor - thermalManager.log_user_thermistor(t_index); + thermalManager.M305_report(t_index); } #endif // HAS_USER_THERMISTORS diff --git a/Marlin/src/gcode/config/M309.cpp b/Marlin/src/gcode/config/M309.cpp new file mode 100644 index 000000000000..01c4e6234788 --- /dev/null +++ b/Marlin/src/gcode/config/M309.cpp @@ -0,0 +1,53 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../inc/MarlinConfig.h" + +#if ENABLED(PIDTEMPCHAMBER) + +#include "../gcode.h" +#include "../../module/temperature.h" + +/** + * M309 - Set and/or Report the current Chamber PID values + * + * P - Set the P value + * I - Set the I value + * D - Set the D value + */ +void GcodeSuite::M309() { + if (!parser.seen("PID")) return M309_report(); + if (parser.seen('P')) thermalManager.temp_chamber.pid.Kp = parser.value_float(); + if (parser.seen('I')) thermalManager.temp_chamber.pid.Ki = scalePID_i(parser.value_float()); + if (parser.seen('D')) thermalManager.temp_chamber.pid.Kd = scalePID_d(parser.value_float()); +} + +void GcodeSuite::M309_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_CHAMBER_PID)); + SERIAL_ECHOLNPGM( + " M309 P", thermalManager.temp_chamber.pid.Kp + , " I", unscalePID_i(thermalManager.temp_chamber.pid.Ki) + , " D", unscalePID_d(thermalManager.temp_chamber.pid.Kd) + ); +} + +#endif // PIDTEMPCHAMBER diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index 005fdf0f3146..08b45efa15bf 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -112,7 +112,7 @@ inline void toggle_pins() { } SERIAL_EOL(); } - SERIAL_ECHOLNPGM("Done."); + SERIAL_ECHOLNPGM(STR_DONE); } // toggle_pins @@ -130,8 +130,8 @@ inline void servo_probe_test() { const uint8_t probe_index = parser.byteval('P', Z_PROBE_SERVO_NR); - SERIAL_ECHOLNPAIR("Servo probe test\n" - ". using index: ", int(probe_index), + SERIAL_ECHOLNPGM("Servo probe test\n" + ". using index: ", probe_index, ", deploy angle: ", servo_angles[probe_index][0], ", stow angle: ", servo_angles[probe_index][1] ); @@ -143,7 +143,7 @@ inline void servo_probe_test() { #define PROBE_TEST_PIN Z_MIN_PIN constexpr bool probe_inverting = Z_MIN_ENDSTOP_INVERTING; - SERIAL_ECHOLNPAIR(". Probe Z_MIN_PIN: ", int(PROBE_TEST_PIN)); + SERIAL_ECHOLNPGM(". Probe Z_MIN_PIN: ", PROBE_TEST_PIN); SERIAL_ECHOPGM(". Z_MIN_ENDSTOP_INVERTING: "); #else @@ -151,7 +151,7 @@ inline void servo_probe_test() { #define PROBE_TEST_PIN Z_MIN_PROBE_PIN constexpr bool probe_inverting = Z_MIN_PROBE_ENDSTOP_INVERTING; - SERIAL_ECHOLNPAIR(". Probe Z_MIN_PROBE_PIN: ", int(PROBE_TEST_PIN)); + SERIAL_ECHOLNPGM(". Probe Z_MIN_PROBE_PIN: ", PROBE_TEST_PIN); SERIAL_ECHOPGM( ". Z_MIN_PROBE_ENDSTOP_INVERTING: "); #endif @@ -211,11 +211,11 @@ inline void servo_probe_test() { if (deploy_state != stow_state) { SERIAL_ECHOLNPGM("= Mechanical Switch detected"); if (deploy_state) { - SERIAL_ECHOLNPAIR(" DEPLOYED state: HIGH (logic 1)", + SERIAL_ECHOLNPGM(" DEPLOYED state: HIGH (logic 1)", " STOWED (triggered) state: LOW (logic 0)"); } else { - SERIAL_ECHOLNPAIR(" DEPLOYED state: LOW (logic 0)", + SERIAL_ECHOLNPGM(" DEPLOYED state: LOW (logic 0)", " STOWED (triggered) state: HIGH (logic 1)"); } #if ENABLED(BLTOUCH) @@ -244,7 +244,7 @@ inline void servo_probe_test() { if (probe_counter == 15) SERIAL_ECHOLNPGM(": 30ms or more"); else - SERIAL_ECHOLNPAIR(" (+/- 4ms): ", probe_counter * 2); + SERIAL_ECHOLNPGM(" (+/- 4ms): ", probe_counter * 2); if (probe_counter >= 4) { if (probe_counter == 15) { @@ -288,8 +288,8 @@ inline void servo_probe_test() { * S - Start Pin number. If not given, will default to 0 * L - End Pin number. If not given, will default to last pin defined for this board * I - Flag to ignore Marlin's pin protection. Use with caution!!!! - * R - Repeat pulses on each pin this number of times before continueing to next pin - * W - Wait time (in miliseconds) between pulses. If not given will default to 500 + * R - Repeat pulses on each pin this number of times before continuing to next pin + * W - Wait time (in milliseconds) between pulses. If not given will default to 500 * * M43 S - Servo probe test * P - Probe index (optional - defaults to 0 @@ -303,7 +303,7 @@ void GcodeSuite::M43() { if (parser.seen('E')) { endstops.monitor_flag = parser.value_bool(); SERIAL_ECHOPGM("endstop monitor "); - serialprintPGM(endstops.monitor_flag ? PSTR("en") : PSTR("dis")); + SERIAL_ECHOPGM_P(endstops.monitor_flag ? PSTR("en") : PSTR("dis")); SERIAL_ECHOLNPGM("abled"); return; } diff --git a/Marlin/src/gcode/config/M575.cpp b/Marlin/src/gcode/config/M575.cpp index 44723b7f2fe6..2c12428d982a 100644 --- a/Marlin/src/gcode/config/M575.cpp +++ b/Marlin/src/gcode/config/M575.cpp @@ -52,19 +52,25 @@ void GcodeSuite::M575() { case 2400: case 9600: case 19200: case 38400: case 57600: case 115200: case 250000: case 500000: case 1000000: { const int8_t port = parser.intval('P', -99); - const bool set0 = (port == -99 || port == 0); - if (set0) SERIAL_ECHO_MSG(" Serial ", '0', " baud rate set to ", baud); + const bool set1 = (port == -99 || port == 0); + if (set1) SERIAL_ECHO_MSG(" Serial ", AS_DIGIT(0), " baud rate set to ", baud); #if HAS_MULTI_SERIAL - const bool set1 = (port == -99 || port == 1); - if (set1) SERIAL_ECHO_MSG(" Serial ", '1', " baud rate set to ", baud); + const bool set2 = (port == -99 || port == 1); + if (set2) SERIAL_ECHO_MSG(" Serial ", AS_DIGIT(1), " baud rate set to ", baud); + #ifdef SERIAL_PORT_3 + const bool set3 = (port == -99 || port == 2); + if (set3) SERIAL_ECHO_MSG(" Serial ", AS_DIGIT(2), " baud rate set to ", baud); + #endif #endif SERIAL_FLUSH(); - if (set0) { MYSERIAL0.end(); MYSERIAL0.begin(baud); } - + if (set1) { MYSERIAL1.end(); MYSERIAL1.begin(baud); } #if HAS_MULTI_SERIAL - if (set1) { MYSERIAL1.end(); MYSERIAL1.begin(baud); } + if (set2) { MYSERIAL2.end(); MYSERIAL2.begin(baud); } + #ifdef SERIAL_PORT_3 + if (set3) { MYSERIAL3.end(); MYSERIAL3.begin(baud); } + #endif #endif } break; diff --git a/Marlin/src/gcode/config/M92.cpp b/Marlin/src/gcode/config/M92.cpp index 0a7d52b633cc..ef1153311438 100644 --- a/Marlin/src/gcode/config/M92.cpp +++ b/Marlin/src/gcode/config/M92.cpp @@ -23,28 +23,6 @@ #include "../gcode.h" #include "../../module/planner.h" -void report_M92(const bool echo=true, const int8_t e=-1) { - if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' '); - SERIAL_ECHOPAIR_P(PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]), - SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]), - SP_Z_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS])); - #if DISABLED(DISTINCT_E_FACTORS) - SERIAL_ECHOPAIR_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS])); - #endif - SERIAL_EOL(); - - #if ENABLED(DISTINCT_E_FACTORS) - LOOP_L_N(i, E_STEPPERS) { - if (e >= 0 && i != e) continue; - if (echo) SERIAL_ECHO_START(); else SERIAL_CHAR(' '); - SERIAL_ECHOLNPAIR_P(PSTR(" M92 T"), (int)i, - SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)])); - } - #endif - - UNUSED_E(e); -} - /** * M92: Set axis steps-per-unit for one or more axes, X, Y, Z, and E. * (Follows the same syntax as G92) @@ -53,10 +31,11 @@ void report_M92(const bool echo=true, const int8_t e=-1) { * * If no argument is given print the current values. * - * With MAGIC_NUMBERS_GCODE: - * Use 'H' and/or 'L' to get ideal layer-height information. - * 'H' specifies micro-steps to use. We guess if it's not supplied. - * 'L' specifies a desired layer height. Nearest good heights are shown. + * With MAGIC_NUMBERS_GCODE: + * + * Use 'H' and/or 'L' to get ideal layer-height information. + * H - Specify micro-steps to use. Best guess if not supplied. + * L - Desired layer height in current units. Nearest good heights are shown. */ void GcodeSuite::M92() { @@ -64,28 +43,26 @@ void GcodeSuite::M92() { if (target_extruder < 0) return; // No arguments? Show M92 report. - if (!parser.seen("XYZE" - #if ENABLED(MAGIC_NUMBERS_GCODE) - "HL" - #endif - )) return report_M92(true, target_extruder); + if (!parser.seen(LOGICAL_AXES_STRING TERN_(MAGIC_NUMBERS_GCODE, "HL"))) + return M92_report(true, target_extruder); - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { if (parser.seenval(axis_codes[i])) { - if (i == E_AXIS) { - const float value = parser.value_per_axis_units((AxisEnum)(E_AXIS_N(target_extruder))); - if (value < 20) { - float factor = planner.settings.axis_steps_per_mm[E_AXIS_N(target_extruder)] / value; // increase e constants if M92 E14 is given for netfab. - #if HAS_CLASSIC_JERK && HAS_CLASSIC_E_JERK - planner.max_jerk.e *= factor; - #endif - planner.settings.max_feedrate_mm_s[E_AXIS_N(target_extruder)] *= factor; - planner.max_acceleration_steps_per_s2[E_AXIS_N(target_extruder)] *= factor; - } - planner.settings.axis_steps_per_mm[E_AXIS_N(target_extruder)] = value; - } - else { + if (TERN1(HAS_EXTRUDERS, i != E_AXIS)) planner.settings.axis_steps_per_mm[i] = parser.value_per_axis_units((AxisEnum)i); + else { + #if HAS_EXTRUDERS + const float value = parser.value_per_axis_units((AxisEnum)(E_AXIS_N(target_extruder))); + if (value < 20) { + float factor = planner.settings.axis_steps_per_mm[E_AXIS_N(target_extruder)] / value; // increase e constants if M92 E14 is given for netfab. + #if HAS_CLASSIC_JERK && HAS_CLASSIC_E_JERK + planner.max_jerk.e *= factor; + #endif + planner.settings.max_feedrate_mm_s[E_AXIS_N(target_extruder)] *= factor; + planner.max_acceleration_steps_per_s2[E_AXIS_N(target_extruder)] *= factor; + } + planner.settings.axis_steps_per_mm[E_AXIS_N(target_extruder)] = value; + #endif } } } @@ -95,16 +72,16 @@ void GcodeSuite::M92() { #ifndef Z_MICROSTEPS #define Z_MICROSTEPS 16 #endif - const float wanted = parser.floatval('L'); + const float wanted = parser.linearval('L'); if (parser.seen('H') || wanted) { const uint16_t argH = parser.ushortval('H'), micro_steps = argH ?: Z_MICROSTEPS; - const float z_full_step_mm = micro_steps * planner.steps_to_mm[Z_AXIS]; + const float z_full_step_mm = micro_steps * planner.mm_per_step[Z_AXIS]; SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm); + SERIAL_ECHOPGM("{ micro_steps:", micro_steps, ", z_full_step_mm:", z_full_step_mm); if (wanted) { const float best = uint16_t(wanted / z_full_step_mm) * z_full_step_mm; - SERIAL_ECHOPAIR(", best:[", best); + SERIAL_ECHOPGM(", best:[", best); if (best != wanted) { SERIAL_CHAR(','); SERIAL_DECIMAL(best + z_full_step_mm); } SERIAL_CHAR(']'); } @@ -112,3 +89,32 @@ void GcodeSuite::M92() { } #endif } + +void GcodeSuite::M92_report(const bool forReplay/*=true*/, const int8_t e/*=-1*/) { + report_heading_etc(forReplay, PSTR(STR_STEPS_PER_UNIT)); + SERIAL_ECHOPGM_P(LIST_N(DOUBLE(LINEAR_AXES), + PSTR(" M92 X"), LINEAR_UNIT(planner.settings.axis_steps_per_mm[X_AXIS]), + SP_Y_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Y_AXIS]), + SP_Z_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[Z_AXIS]), + SP_I_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[I_AXIS]), + SP_J_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[J_AXIS]), + SP_K_STR, LINEAR_UNIT(planner.settings.axis_steps_per_mm[K_AXIS])) + ); + #if HAS_EXTRUDERS && DISABLED(DISTINCT_E_FACTORS) + SERIAL_ECHOPGM_P(SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS])); + #endif + SERIAL_EOL(); + + #if ENABLED(DISTINCT_E_FACTORS) + LOOP_L_N(i, E_STEPPERS) { + if (e >= 0 && i != e) continue; + report_echo_start(forReplay); + SERIAL_ECHOLNPGM_P( + PSTR(" M92 T"), i, + SP_E_STR, VOLUMETRIC_UNIT(planner.settings.axis_steps_per_mm[E_AXIS_N(i)]) + ); + } + #else + UNUSED(e); + #endif +} diff --git a/Marlin/src/gcode/control/M10-M11.cpp b/Marlin/src/gcode/control/M10-M11.cpp new file mode 100644 index 000000000000..d5a69dcfccfb --- /dev/null +++ b/Marlin/src/gcode/control/M10-M11.cpp @@ -0,0 +1,44 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../inc/MarlinConfig.h" + +#if ENABLED(AIR_EVACUATION) + +#include "../gcode.h" +#include "../../feature/spindle_laser.h" + +/** + * M10: Vacuum or Blower On + */ +void GcodeSuite::M10() { + cutter.air_evac_enable(); // Turn on Vacuum or Blower motor +} + +/** + * M11: Vacuum or Blower OFF + */ +void GcodeSuite::M11() { + cutter.air_evac_disable(); // Turn off Vacuum or Blower motor +} + +#endif // AIR_EVACUATION diff --git a/Marlin/src/gcode/control/M111.cpp b/Marlin/src/gcode/control/M111.cpp index 38cb06532241..69d20b4c5d22 100644 --- a/Marlin/src/gcode/control/M111.cpp +++ b/Marlin/src/gcode/control/M111.cpp @@ -49,7 +49,7 @@ void GcodeSuite::M111() { LOOP_L_N(i, COUNT(debug_strings)) { if (TEST(marlin_debug_flags, i)) { if (comma++) SERIAL_CHAR(','); - serialprintPGM((char*)pgm_read_ptr(&debug_strings[i])); + SERIAL_ECHOPGM_P((char*)pgm_read_ptr(&debug_strings[i])); } } } @@ -57,19 +57,19 @@ void GcodeSuite::M111() { SERIAL_ECHOPGM(STR_DEBUG_OFF); #if !defined(__AVR__) || !defined(USBCON) #if ENABLED(SERIAL_STATS_RX_BUFFER_OVERRUNS) - SERIAL_ECHOPAIR("\nBuffer Overruns: ", MYSERIAL0.buffer_overruns()); + SERIAL_ECHOPGM("\nBuffer Overruns: ", MYSERIAL1.buffer_overruns()); #endif #if ENABLED(SERIAL_STATS_RX_FRAMING_ERRORS) - SERIAL_ECHOPAIR("\nFraming Errors: ", MYSERIAL0.framing_errors()); + SERIAL_ECHOPGM("\nFraming Errors: ", MYSERIAL1.framing_errors()); #endif #if ENABLED(SERIAL_STATS_DROPPED_RX) - SERIAL_ECHOPAIR("\nDropped bytes: ", MYSERIAL0.dropped()); + SERIAL_ECHOPGM("\nDropped bytes: ", MYSERIAL1.dropped()); #endif #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) - SERIAL_ECHOPAIR("\nMax RX Queue Size: ", MYSERIAL0.rxMaxEnqueued()); + SERIAL_ECHOPGM("\nMax RX Queue Size: ", MYSERIAL1.rxMaxEnqueued()); #endif #endif // !__AVR__ || !USBCON } diff --git a/Marlin/src/gcode/control/M17_M18_M84.cpp b/Marlin/src/gcode/control/M17_M18_M84.cpp index b35b4653319c..82df20ac45f1 100644 --- a/Marlin/src/gcode/control/M17_M18_M84.cpp +++ b/Marlin/src/gcode/control/M17_M18_M84.cpp @@ -29,24 +29,186 @@ #include "../../feature/bedlevel/bedlevel.h" #endif +#define DEBUG_OUT ENABLED(MARLIN_DEV_MODE) +#include "../../core/debug_out.h" +#include "../../libs/hex_print.h" + +inline axis_flags_t selected_axis_bits() { + axis_flags_t selected{0}; + #if HAS_EXTRUDERS + if (parser.seen('E')) { + if (E_TERN0(parser.has_value())) { + const uint8_t e = parser.value_int(); + if (e < EXTRUDERS) + selected.bits = _BV(INDEX_OF_AXIS(E_AXIS, e)); + } + else + selected.bits = selected.e_bits(); + } + #endif + selected.bits |= LINEAR_AXIS_GANG( + (parser.seen_test('X') << X_AXIS), + | (parser.seen_test('Y') << Y_AXIS), + | (parser.seen_test('Z') << Z_AXIS), + | (parser.seen_test(AXIS4_NAME) << I_AXIS), + | (parser.seen_test(AXIS5_NAME) << J_AXIS), + | (parser.seen_test(AXIS6_NAME) << K_AXIS) + ); + return selected; +} + +// Enable specified axes and warn about other affected axes +void do_enable(const axis_flags_t to_enable) { + const ena_mask_t was_enabled = stepper.axis_enabled.bits, + shall_enable = to_enable.bits & ~was_enabled; + + DEBUG_ECHOLNPGM("Now Enabled: ", hex_word(stepper.axis_enabled.bits), " Enabling: ", hex_word(to_enable.bits), " | ", shall_enable); + + if (!shall_enable) return; // All specified axes already enabled? + + ena_mask_t also_enabled = 0; // Track steppers enabled due to overlap + + // Enable all flagged axes + LOOP_LINEAR_AXES(a) { + if (TEST(shall_enable, a)) { + stepper.enable_axis(AxisEnum(a)); // Mark and enable the requested axis + DEBUG_ECHOLNPGM("Enabled ", axis_codes[a], " (", a, ") with overlap ", hex_word(enable_overlap[a]), " ... Enabled: ", hex_word(stepper.axis_enabled.bits)); + also_enabled |= enable_overlap[a]; + } + } + #if HAS_EXTRUDERS + LOOP_L_N(e, EXTRUDERS) { + const uint8_t a = INDEX_OF_AXIS(E_AXIS, e); + if (TEST(shall_enable, a)) { + stepper.ENABLE_EXTRUDER(e); + DEBUG_ECHOLNPGM("Enabled E", AS_DIGIT(e), " (", a, ") with overlap ", hex_word(enable_overlap[a]), " ... ", hex_word(stepper.axis_enabled.bits)); + also_enabled |= enable_overlap[a]; + } + } + #endif + + if ((also_enabled &= ~(shall_enable | was_enabled))) { + SERIAL_CHAR('('); + LOOP_LINEAR_AXES(a) if (TEST(also_enabled, a)) SERIAL_CHAR(axis_codes[a], ' '); + #if HAS_EXTRUDERS + #define _EN_ALSO(N) if (TEST(also_enabled, INDEX_OF_AXIS(E_AXIS, N))) SERIAL_CHAR('E', '0' + N, ' '); + REPEAT(EXTRUDERS, _EN_ALSO) + #endif + SERIAL_ECHOLNPGM("also enabled)"); + } + + DEBUG_ECHOLNPGM("Enabled Now: ", hex_word(stepper.axis_enabled.bits)); +} + /** - * M17: Enable stepper motors + * M17: Enable stepper motor power for one or more axes. + * Print warnings for axes that share an ENABLE_PIN. + * + * Examples: + * + * M17 XZ ; Enable X and Z axes + * M17 E ; Enable all E steppers + * M17 E1 ; Enable just the E1 stepper */ void GcodeSuite::M17() { - if (parser.seen("XYZE")) { - if (parser.seen('X')) ENABLE_AXIS_X(); - if (parser.seen('Y')) ENABLE_AXIS_Y(); - if (parser.seen('Z')) ENABLE_AXIS_Z(); - if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen('E'))) enable_e_steppers(); + if (parser.seen_axis()) { + if (any_enable_overlap()) + do_enable(selected_axis_bits()); + else { + #if HAS_EXTRUDERS + if (parser.seen('E')) { + if (parser.has_value()) { + const uint8_t e = parser.value_int(); + if (e < EXTRUDERS) stepper.ENABLE_EXTRUDER(e); + } + else + stepper.enable_e_steppers(); + } + #endif + LINEAR_AXIS_CODE( + if (parser.seen_test('X')) stepper.enable_axis(X_AXIS), + if (parser.seen_test('Y')) stepper.enable_axis(Y_AXIS), + if (parser.seen_test('Z')) stepper.enable_axis(Z_AXIS), + if (parser.seen_test(AXIS4_NAME)) stepper.enable_axis(I_AXIS), + if (parser.seen_test(AXIS5_NAME)) stepper.enable_axis(J_AXIS), + if (parser.seen_test(AXIS6_NAME)) stepper.enable_axis(K_AXIS) + ); + } } else { LCD_MESSAGEPGM(MSG_NO_MOVE); - enable_all_steppers(); + stepper.enable_all_steppers(); + } +} + +void try_to_disable(const axis_flags_t to_disable) { + ena_mask_t still_enabled = to_disable.bits & stepper.axis_enabled.bits; + + DEBUG_ECHOLNPGM("Enabled: ", hex_word(stepper.axis_enabled.bits), " To Disable: ", hex_word(to_disable.bits), " | ", hex_word(still_enabled)); + + if (!still_enabled) return; + + // Attempt to disable all flagged axes + LOOP_LINEAR_AXES(a) + if (TEST(to_disable.bits, a)) { + DEBUG_ECHOPGM("Try to disable ", axis_codes[a], " (", a, ") with overlap ", hex_word(enable_overlap[a]), " ... "); + if (stepper.disable_axis(AxisEnum(a))) { // Mark the requested axis and request to disable + DEBUG_ECHOPGM("OK"); + still_enabled &= ~(_BV(a) | enable_overlap[a]); // If actually disabled, clear one or more tracked bits + } + else + DEBUG_ECHOPGM("OVERLAP"); + DEBUG_ECHOLNPGM(" ... still_enabled=", hex_word(still_enabled)); + } + #if HAS_EXTRUDERS + LOOP_L_N(e, EXTRUDERS) { + const uint8_t a = INDEX_OF_AXIS(E_AXIS, e); + if (TEST(to_disable.bits, a)) { + DEBUG_ECHOPGM("Try to disable E", AS_DIGIT(e), " (", a, ") with overlap ", hex_word(enable_overlap[a]), " ... "); + if (stepper.DISABLE_EXTRUDER(e)) { + DEBUG_ECHOPGM("OK"); + still_enabled &= ~(_BV(a) | enable_overlap[a]); + } + else + DEBUG_ECHOPGM("OVERLAP"); + DEBUG_ECHOLNPGM(" ... still_enabled=", hex_word(still_enabled)); + } + } + #endif + + auto overlap_warning = [](const ena_mask_t axis_bits) { + SERIAL_ECHOPGM(" not disabled. Shared with"); + LOOP_LINEAR_AXES(a) if (TEST(axis_bits, a)) SERIAL_CHAR(' ', axis_codes[a]); + #if HAS_EXTRUDERS + #define _EN_STILLON(N) if (TEST(axis_bits, INDEX_OF_AXIS(E_AXIS, N))) SERIAL_CHAR(' ', 'E', '0' + N); + REPEAT(EXTRUDERS, _EN_STILLON) + #endif + SERIAL_ECHOLNPGM("."); + }; + + // If any of the requested axes are still enabled, give a warning + LOOP_LINEAR_AXES(a) { + if (TEST(still_enabled, a)) { + SERIAL_CHAR(axis_codes[a]); + overlap_warning(stepper.axis_enabled.bits & enable_overlap[a]); + } } + #if HAS_EXTRUDERS + LOOP_L_N(e, EXTRUDERS) { + const uint8_t a = INDEX_OF_AXIS(E_AXIS, e); + if (TEST(still_enabled, a)) { + SERIAL_CHAR('E', '0' + e); + overlap_warning(stepper.axis_enabled.bits & enable_overlap[a]); + } + } + #endif + + DEBUG_ECHOLNPGM("Enabled Now: ", hex_word(stepper.axis_enabled.bits)); } /** - * M18, M84: Disable stepper motors + * M18, M84: Disable stepper motor power for one or more axes. + * Print warnings for axes that share an ENABLE_PIN. */ void GcodeSuite::M18_M84() { if (parser.seenval('S')) { @@ -54,12 +216,28 @@ void GcodeSuite::M18_M84() { stepper_inactive_time = parser.value_millis_from_seconds(); } else { - if (parser.seen("XYZE")) { + if (parser.seen_axis()) { planner.synchronize(); - if (parser.seen('X')) DISABLE_AXIS_X(); - if (parser.seen('Y')) DISABLE_AXIS_Y(); - if (parser.seen('Z')) DISABLE_AXIS_Z(); - if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen('E'))) disable_e_steppers(); + if (any_enable_overlap()) + try_to_disable(selected_axis_bits()); + else { + #if HAS_EXTRUDERS + if (parser.seen('E')) { + if (E_TERN0(parser.has_value())) + stepper.DISABLE_EXTRUDER(parser.value_int()); + else + stepper.disable_e_steppers(); + } + #endif + LINEAR_AXIS_CODE( + if (parser.seen_test('X')) stepper.disable_axis(X_AXIS), + if (parser.seen_test('Y')) stepper.disable_axis(Y_AXIS), + if (parser.seen_test('Z')) stepper.disable_axis(Z_AXIS), + if (parser.seen_test(AXIS4_NAME)) stepper.disable_axis(I_AXIS), + if (parser.seen_test(AXIS5_NAME)) stepper.disable_axis(J_AXIS), + if (parser.seen_test(AXIS6_NAME)) stepper.disable_axis(K_AXIS) + ); + } } else planner.finish_and_disable(); diff --git a/Marlin/src/gcode/control/M211.cpp b/Marlin/src/gcode/control/M211.cpp index 2049f1eb6955..a837d795339b 100644 --- a/Marlin/src/gcode/control/M211.cpp +++ b/Marlin/src/gcode/control/M211.cpp @@ -33,14 +33,22 @@ * Usage: M211 S1 to enable, M211 S0 to disable, M211 alone for report */ void GcodeSuite::M211() { + if (parser.seen('S')) + soft_endstop._enabled = parser.value_bool(); + else + M211_report(); +} + +void GcodeSuite::M211_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_SOFT_ENDSTOPS)); + SERIAL_ECHOPGM(" M211 S", AS_DIGIT(soft_endstop._enabled), " ; "); + serialprintln_onoff(soft_endstop._enabled); + + report_echo_start(forReplay); const xyz_pos_t l_soft_min = soft_endstop.min.asLogical(), l_soft_max = soft_endstop.max.asLogical(); - SERIAL_ECHO_START(); - SERIAL_ECHOPGM(STR_SOFT_ENDSTOPS); - if (parser.seen('S')) soft_endstop._enabled = parser.value_bool(); - serialprint_onoff(soft_endstop._enabled); - print_xyz(l_soft_min, PSTR(STR_SOFT_MIN), PSTR(" ")); - print_xyz(l_soft_max, PSTR(STR_SOFT_MAX)); + print_pos(l_soft_min, PSTR(STR_SOFT_MIN), PSTR(" ")); + print_pos(l_soft_max, PSTR(STR_SOFT_MAX)); } -#endif +#endif // HAS_SOFTWARE_ENDSTOPS diff --git a/Marlin/src/gcode/control/M280.cpp b/Marlin/src/gcode/control/M280.cpp index 6ccbb7becc2f..2a8e73eafbf2 100644 --- a/Marlin/src/gcode/control/M280.cpp +++ b/Marlin/src/gcode/control/M280.cpp @@ -26,30 +26,51 @@ #include "../gcode.h" #include "../../module/servo.h" +#include "../../module/planner.h" /** - * M280: Get or set servo position. P [S] + * M280: Get or set servo position. + * P - Servo index + * S - Angle to set, omit to read current angle, or use -1 to detach + * + * With POLARGRAPH: + * T - Duration of servo move */ void GcodeSuite::M280() { - if (!parser.seen('P')) return; + + if (!parser.seenval('P')) return; + + TERN_(POLARGRAPH, planner.synchronize()); + const int servo_index = parser.value_int(); if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) { - if (parser.seen('S')) { - const int a = parser.value_int(); - if (a == -1) - servo[servo_index].detach(); + if (parser.seenval('S')) { + const int anew = parser.value_int(); + if (anew >= 0) { + #if ENABLED(POLARGRAPH) + if (parser.seen('T')) { // (ms) Total duration of servo move + const int16_t t = constrain(parser.value_int(), 0, 10000); + const int aold = servo[servo_index].read(); + millis_t now = millis(); + const millis_t start = now, end = start + t; + while (PENDING(now, end)) { + safe_delay(50); + now = _MIN(millis(), end); + MOVE_SERVO(servo_index, LROUND(aold + (anew - aold) * (float(now - start) / t))); + } + } + #endif // POLARGRAPH + MOVE_SERVO(servo_index, anew); + } else - MOVE_SERVO(servo_index, a); + DETACH_SERVO(servo_index); } - else { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(" Servo ", servo_index, ": ", servo[servo_index].read()); - } - } - else { - SERIAL_ERROR_START(); - SERIAL_ECHOLNPAIR("Servo ", servo_index, " out of range"); + else + SERIAL_ECHO_MSG(" Servo ", servo_index, ": ", servo[servo_index].read()); } + else + SERIAL_ERROR_MSG("Servo ", servo_index, " out of range"); + } #endif // HAS_SERVOS diff --git a/Marlin/src/gcode/control/M282.cpp b/Marlin/src/gcode/control/M282.cpp new file mode 100644 index 000000000000..e6f5ce7dccc3 --- /dev/null +++ b/Marlin/src/gcode/control/M282.cpp @@ -0,0 +1,45 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../inc/MarlinConfig.h" + +#if ENABLED(SERVO_DETACH_GCODE) + +#include "../gcode.h" +#include "../../module/servo.h" + +/** + * M282: Detach Servo. P + */ +void GcodeSuite::M282() { + + if (!parser.seenval('P')) return; + + const int servo_index = parser.value_int(); + if (WITHIN(servo_index, 0, NUM_SERVOS - 1)) + DETACH_SERVO(servo_index); + else + SERIAL_ECHO_MSG("Servo ", servo_index, " out of range"); + +} + +#endif // SERVO_DETACH_GCODE diff --git a/Marlin/src/gcode/control/M3-M5.cpp b/Marlin/src/gcode/control/M3-M5.cpp index 711bb7e5e4a7..ecae8b06c69f 100644 --- a/Marlin/src/gcode/control/M3-M5.cpp +++ b/Marlin/src/gcode/control/M3-M5.cpp @@ -72,7 +72,7 @@ void GcodeSuite::M3_M4(const bool is_M4) { #if ENABLED(SPINDLE_SERVO) cutter.unitPower = spwr; #else - cutter.unitPower = TERN(SPINDLE_LASER_PWM, + cutter.unitPower = TERN(SPINDLE_LASER_USE_PWM, cutter.power_to_range(cutter_power_t(round(spwr))), spwr > 0 ? 255 : 0); #endif @@ -86,7 +86,7 @@ void GcodeSuite::M3_M4(const bool is_M4) { if (parser.seen('I') == DISABLED(LASER_POWER_INLINE_INVERT)) { // Laser power in inline mode cutter.inline_direction(is_M4); // Should always be unused - #if ENABLED(SPINDLE_LASER_PWM) + #if ENABLED(SPINDLE_LASER_USE_PWM) if (parser.seen('O')) { cutter.unitPower = cutter.power_to_range(parser.value_byte(), 0); cutter.inline_ocr_power(cutter.unitPower); // The OCR is a value from 0 to 255 (uint8_t) @@ -105,10 +105,10 @@ void GcodeSuite::M3_M4(const bool is_M4) { planner.synchronize(); // Wait for previous movement commands (G0/G0/G2/G3) to complete before changing power cutter.set_reverse(is_M4); - #if ENABLED(SPINDLE_LASER_PWM) + #if ENABLED(SPINDLE_LASER_USE_PWM) if (parser.seenval('O')) { cutter.unitPower = cutter.power_to_range(parser.value_byte(), 0); - cutter.set_ocr_power(cutter.unitPower); // The OCR is a value from 0 to 255 (uint8_t) + cutter.ocr_set_power(cutter.unitPower); // The OCR is a value from 0 to 255 (uint8_t) } else cutter.set_power(cutter.upower_to_ocr(get_s_power())); diff --git a/Marlin/src/gcode/control/M350_M351.cpp b/Marlin/src/gcode/control/M350_M351.cpp index 463bd2ad5815..a92238e4bbf2 100644 --- a/Marlin/src/gcode/control/M350_M351.cpp +++ b/Marlin/src/gcode/control/M350_M351.cpp @@ -34,7 +34,7 @@ */ void GcodeSuite::M350() { if (parser.seen('S')) LOOP_LE_N(i, 4) stepper.microstep_mode(i, parser.value_byte()); - LOOP_XYZE(i) if (parser.seen(axis_codes[i])) stepper.microstep_mode(i, parser.value_byte()); + LOOP_LOGICAL_AXES(i) if (parser.seen(axis_codes[i])) stepper.microstep_mode(i, parser.value_byte()); if (parser.seen('B')) stepper.microstep_mode(4, parser.value_byte()); stepper.microstep_readings(); } @@ -46,15 +46,15 @@ void GcodeSuite::M350() { void GcodeSuite::M351() { if (parser.seenval('S')) switch (parser.value_byte()) { case 1: - LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, parser.value_byte(), -1, -1); + LOOP_LOGICAL_AXES(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, parser.value_byte(), -1, -1); if (parser.seenval('B')) stepper.microstep_ms(4, parser.value_byte(), -1, -1); break; case 2: - LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, -1, parser.value_byte(), -1); + LOOP_LOGICAL_AXES(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, -1, parser.value_byte(), -1); if (parser.seenval('B')) stepper.microstep_ms(4, -1, parser.value_byte(), -1); break; case 3: - LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, -1, -1, parser.value_byte()); + LOOP_LOGICAL_AXES(i) if (parser.seenval(axis_codes[i])) stepper.microstep_ms(i, -1, -1, parser.value_byte()); if (parser.seenval('B')) stepper.microstep_ms(4, -1, -1, parser.value_byte()); break; } diff --git a/Marlin/src/gcode/control/M42.cpp b/Marlin/src/gcode/control/M42.cpp index 6ef8455e0b5c..eead971a012c 100644 --- a/Marlin/src/gcode/control/M42.cpp +++ b/Marlin/src/gcode/control/M42.cpp @@ -31,6 +31,13 @@ #include "../../module/temperature.h" #endif +#ifdef MAPLE_STM32F1 + // these are enums on the F1... + #define INPUT_PULLDOWN INPUT_PULLDOWN + #define INPUT_ANALOG INPUT_ANALOG + #define OUTPUT_OPEN_DRAIN OUTPUT_OPEN_DRAIN +#endif + void protected_pin_err() { SERIAL_ERROR_MSG(STR_ERR_PROTECTED_PIN); } @@ -55,13 +62,20 @@ void GcodeSuite::M42() { if (!parser.boolval('I') && pin_is_protected(pin)) return protected_pin_err(); + bool avoidWrite = false; if (parser.seenval('M')) { switch (parser.value_byte()) { - case 0: pinMode(pin, INPUT); break; + case 0: pinMode(pin, INPUT); avoidWrite = true; break; case 1: pinMode(pin, OUTPUT); break; - case 2: pinMode(pin, INPUT_PULLUP); break; + case 2: pinMode(pin, INPUT_PULLUP); avoidWrite = true; break; #ifdef INPUT_PULLDOWN - case 3: pinMode(pin, INPUT_PULLDOWN); break; + case 3: pinMode(pin, INPUT_PULLDOWN); avoidWrite = true; break; + #endif + #ifdef INPUT_ANALOG + case 4: pinMode(pin, INPUT_ANALOG); avoidWrite = true; break; + #endif + #ifdef OUTPUT_OPEN_DRAIN + case 5: pinMode(pin, OUTPUT_OPEN_DRAIN); break; #endif default: SERIAL_ECHOLNPGM("Invalid Pin Mode"); return; } @@ -99,8 +113,22 @@ void GcodeSuite::M42() { } #endif - pinMode(pin, OUTPUT); + if (avoidWrite) { + SERIAL_ECHOLNPGM("?Cannot write to INPUT"); + return; + } + + // An OUTPUT_OPEN_DRAIN should not be changed to normal OUTPUT (STM32) + // Use M42 Px M1/5 S0/1 to set the output type and then set value + #ifndef OUTPUT_OPEN_DRAIN + pinMode(pin, OUTPUT); + #endif extDigitalWrite(pin, pin_status); + + #ifdef ARDUINO_ARCH_STM32 + // A simple I/O will be set to 0 by analogWrite() + if (pin_status <= 1 && !PWM_PIN(pin)) return; + #endif analogWrite(pin, pin_status); } diff --git a/Marlin/src/gcode/control/M605.cpp b/Marlin/src/gcode/control/M605.cpp index 0d7a9f431b23..08efaab59d75 100644 --- a/Marlin/src/gcode/control/M605.cpp +++ b/Marlin/src/gcode/control/M605.cpp @@ -70,26 +70,12 @@ dual_x_carriage_mode = (DualXMode)parser.value_byte(); idex_set_mirrored_mode(false); - if (dual_x_carriage_mode == DXC_MIRRORED_MODE) { - if (previous_mode != DXC_DUPLICATION_MODE) { - SERIAL_ECHOLNPGM("Printer must be in DXC_DUPLICATION_MODE prior to "); - SERIAL_ECHOLNPGM("specifying DXC_MIRRORED_MODE."); - dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE; - return; - } - idex_set_mirrored_mode(true); - float x_jog = current_position.x - .1; - for (uint8_t i = 2; --i;) { - planner.buffer_line(x_jog, current_position.y, current_position.z, current_position.e, feedrate_mm_s, 0); - x_jog += .1; - } - return; - } - switch (dual_x_carriage_mode) { + case DXC_FULL_CONTROL_MODE: case DXC_AUTO_PARK_MODE: break; + case DXC_DUPLICATION_MODE: // Set the X offset, but no less than the safety gap if (parser.seen('X')) duplicate_extruder_x_offset = _MAX(parser.value_linear_units(), (X2_MIN_POS) - (X1_MIN_POS)); @@ -97,10 +83,29 @@ // Always switch back to tool 0 if (active_extruder != 0) tool_change(0); break; + + case DXC_MIRRORED_MODE: { + if (previous_mode != DXC_DUPLICATION_MODE) { + SERIAL_ECHOLNPGM("Printer must be in DXC_DUPLICATION_MODE prior to "); + SERIAL_ECHOLNPGM("specifying DXC_MIRRORED_MODE."); + dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE; + return; + } + idex_set_mirrored_mode(true); + + // Do a small 'jog' motion in the X axis + xyze_pos_t dest = current_position; dest.x -= 0.1f; + for (uint8_t i = 2; --i;) { + planner.buffer_line(dest, feedrate_mm_s, 0); + dest.x += 0.1f; + } + } return; + default: dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE; break; } + idex_set_parked(false); set_duplication_enabled(false); @@ -122,26 +127,26 @@ case DXC_DUPLICATION_MODE: DEBUG_ECHOPGM("DUPLICATION"); break; case DXC_MIRRORED_MODE: DEBUG_ECHOPGM("MIRRORED"); break; } - DEBUG_ECHOPAIR("\nActive Ext: ", int(active_extruder)); + DEBUG_ECHOPGM("\nActive Ext: ", active_extruder); if (!active_extruder_parked) DEBUG_ECHOPGM(" NOT "); DEBUG_ECHOPGM(" parked."); - DEBUG_ECHOPAIR("\nactive_extruder_x_pos: ", current_position.x); - DEBUG_ECHOPAIR("\ninactive_extruder_x: ", inactive_extruder_x); - DEBUG_ECHOPAIR("\nextruder_duplication_enabled: ", int(extruder_duplication_enabled)); - DEBUG_ECHOPAIR("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset); - DEBUG_ECHOPAIR("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset); - DEBUG_ECHOPAIR("\ndelayed_move_time: ", delayed_move_time); - DEBUG_ECHOPAIR("\nX1 Home X: ", x_home_pos(0), "\nX1_MIN_POS=", int(X1_MIN_POS), "\nX1_MAX_POS=", int(X1_MAX_POS)); - DEBUG_ECHOPAIR("\nX2 Home X: ", x_home_pos(1), "\nX2_MIN_POS=", int(X2_MIN_POS), "\nX2_MAX_POS=", int(X2_MAX_POS)); - DEBUG_ECHOPAIR("\nX2_HOME_DIR=", int(X2_HOME_DIR), "\nX2_HOME_POS=", int(X2_HOME_POS)); - DEBUG_ECHOPAIR("\nDEFAULT_DUAL_X_CARRIAGE_MODE=", STRINGIFY(DEFAULT_DUAL_X_CARRIAGE_MODE)); - DEBUG_ECHOPAIR("\toolchange_settings.z_raise=", toolchange_settings.z_raise); - DEBUG_ECHOPAIR("\nDEFAULT_DUPLICATION_X_OFFSET=", int(DEFAULT_DUPLICATION_X_OFFSET)); + DEBUG_ECHOPGM("\nactive_extruder_x_pos: ", current_position.x); + DEBUG_ECHOPGM("\ninactive_extruder_x: ", inactive_extruder_x); + DEBUG_ECHOPGM("\nextruder_duplication_enabled: ", extruder_duplication_enabled); + DEBUG_ECHOPGM("\nduplicate_extruder_x_offset: ", duplicate_extruder_x_offset); + DEBUG_ECHOPGM("\nduplicate_extruder_temp_offset: ", duplicate_extruder_temp_offset); + DEBUG_ECHOPGM("\ndelayed_move_time: ", delayed_move_time); + DEBUG_ECHOPGM("\nX1 Home X: ", x_home_pos(0), "\nX1_MIN_POS=", X1_MIN_POS, "\nX1_MAX_POS=", X1_MAX_POS); + DEBUG_ECHOPGM("\nX2 Home X: ", x_home_pos(1), "\nX2_MIN_POS=", X2_MIN_POS, "\nX2_MAX_POS=", X2_MAX_POS); + DEBUG_ECHOPGM("\nX2_HOME_DIR=", X2_HOME_DIR, "\nX2_HOME_POS=", X2_HOME_POS); + DEBUG_ECHOPGM("\nDEFAULT_DUAL_X_CARRIAGE_MODE=", STRINGIFY(DEFAULT_DUAL_X_CARRIAGE_MODE)); + DEBUG_ECHOPGM("\toolchange_settings.z_raise=", toolchange_settings.z_raise); + DEBUG_ECHOPGM("\nDEFAULT_DUPLICATION_X_OFFSET=", DEFAULT_DUPLICATION_X_OFFSET); DEBUG_EOL(); HOTEND_LOOP() { - DEBUG_ECHOPAIR_P(SP_T_STR, int(e)); - LOOP_XYZ(a) DEBUG_ECHOPAIR(" hotend_offset[", int(e), "].", XYZ_CHAR(a) | 0x20, "=", hotend_offset[e][a]); + DEBUG_ECHOPGM_P(SP_T_STR, e); + LOOP_LINEAR_AXES(a) DEBUG_ECHOPGM(" hotend_offset[", e, "].", AS_CHAR(AXIS_CHAR(a) | 0x20), "=", hotend_offset[e][a]); DEBUG_EOL(); } DEBUG_EOL(); diff --git a/Marlin/src/gcode/control/M7-M9.cpp b/Marlin/src/gcode/control/M7-M9.cpp index a33e43288b75..ccde4f552cb9 100644 --- a/Marlin/src/gcode/control/M7-M9.cpp +++ b/Marlin/src/gcode/control/M7-M9.cpp @@ -20,9 +20,9 @@ * */ -#include "../../inc/MarlinConfig.h" +#include "../../inc/MarlinConfigPre.h" -#if ENABLED(COOLANT_CONTROL) +#if ANY(COOLANT_MIST, COOLANT_FLOOD, AIR_ASSIST) #include "../gcode.h" #include "../../module/planner.h" @@ -37,27 +37,41 @@ } #endif -#if ENABLED(COOLANT_FLOOD) +#if EITHER(COOLANT_FLOOD, AIR_ASSIST) + + #if ENABLED(AIR_ASSIST) + #include "../../feature/spindle_laser.h" + #endif + /** - * M8: Flood Coolant On + * M8: Flood Coolant / Air Assist ON */ void GcodeSuite::M8() { - planner.synchronize(); // Wait for move to arrive - WRITE(COOLANT_FLOOD_PIN, !(COOLANT_FLOOD_INVERT)); // Turn on Flood coolant + planner.synchronize(); // Wait for move to arrive + #if ENABLED(COOLANT_FLOOD) + WRITE(COOLANT_FLOOD_PIN, !(COOLANT_FLOOD_INVERT)); // Turn on Flood coolant + #endif + #if ENABLED(AIR_ASSIST) + cutter.air_assist_enable(); // Turn on Air Assist + #endif } + #endif /** - * M9: Coolant OFF + * M9: Coolant / Air Assist OFF */ void GcodeSuite::M9() { - planner.synchronize(); // Wait for move to arrive + planner.synchronize(); // Wait for move to arrive #if ENABLED(COOLANT_MIST) - WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT); // Turn off Mist coolant + WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT); // Turn off Mist coolant #endif #if ENABLED(COOLANT_FLOOD) - WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Turn off Flood coolant + WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Turn off Flood coolant + #endif + #if ENABLED(AIR_ASSIST) + cutter.air_assist_disable(); // Turn off Air Assist #endif } -#endif // COOLANT_CONTROL +#endif // COOLANT_MIST | COOLANT_FLOOD | AIR_ASSIST diff --git a/Marlin/src/gcode/control/M80_M81.cpp b/Marlin/src/gcode/control/M80_M81.cpp index 394b06d8ac30..149613ee15c8 100644 --- a/Marlin/src/gcode/control/M80_M81.cpp +++ b/Marlin/src/gcode/control/M80_M81.cpp @@ -29,25 +29,17 @@ #include "../../inc/MarlinConfig.h" +#if ENABLED(PSU_CONTROL) + #include "../queue.h" + #include "../../feature/power.h" +#endif + #if HAS_SUICIDE #include "../../MarlinCore.h" #endif #if ENABLED(PSU_CONTROL) - #if ENABLED(AUTO_POWER_CONTROL) - #include "../../feature/power.h" - #else - void restore_stepper_drivers(); - #endif - - // Could be moved to a feature, but this is all the data - bool powersupply_on; - - #if HAS_TRINAMIC_CONFIG - #include "../../feature/tmc_util.h" - #endif - /** * M80 : Turn on the Power Supply * M80 S : Report the current state and exit @@ -56,11 +48,11 @@ // S: Report the current power supply state and exit if (parser.seen('S')) { - serialprintPGM(powersupply_on ? PSTR("PS:1\n") : PSTR("PS:0\n")); + SERIAL_ECHOPGM_P(powerManager.psu_on ? PSTR("PS:1\n") : PSTR("PS:0\n")); return; } - PSU_ON(); + powerManager.power_on(); /** * If you have a switch on suicide pin, this is useful @@ -68,13 +60,7 @@ * a print without suicide... */ #if HAS_SUICIDE - OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING); - #endif - - #if DISABLED(AUTO_POWER_CONTROL) - safe_delay(PSU_POWERUP_DELAY); - restore_stepper_drivers(); - TERN_(HAS_TRINAMIC_CONFIG, safe_delay(PSU_POWERUP_DELAY)); + OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_STATE); #endif TERN_(HAS_LCD_MENU, ui.reset_status()); @@ -106,7 +92,7 @@ void GcodeSuite::M81() { #if HAS_SUICIDE suicide(); #elif ENABLED(PSU_CONTROL) - PSU_OFF_SOON(); + powerManager.power_off_soon(); #endif LCD_MESSAGEPGM_P(PSTR(MACHINE_NAME " " STR_OFF ".")); diff --git a/Marlin/src/gcode/control/M993_M994.cpp b/Marlin/src/gcode/control/M993_M994.cpp index ff9ff85bf5bd..252792e5224e 100644 --- a/Marlin/src/gcode/control/M993_M994.cpp +++ b/Marlin/src/gcode/control/M993_M994.cpp @@ -37,7 +37,7 @@ void GcodeSuite::M993() { char fname[] = "spiflash.bin"; card.openFileWrite(fname); if (!card.isFileOpen()) { - SERIAL_ECHOLNPAIR("Failed to open ", fname, " to write."); + SERIAL_ECHOLNPGM("Failed to open ", fname, " to write."); return; } @@ -65,7 +65,7 @@ void GcodeSuite::M994() { char fname[] = "spiflash.bin"; card.openFileRead(fname); if (!card.isFileOpen()) { - SERIAL_ECHOLNPAIR("Failed to open ", fname, " to read."); + SERIAL_ECHOLNPGM("Failed to open ", fname, " to read."); return; } diff --git a/Marlin/src/gcode/control/M997.cpp b/Marlin/src/gcode/control/M997.cpp index cdff96f1acd8..73d795bcefc8 100644 --- a/Marlin/src/gcode/control/M997.cpp +++ b/Marlin/src/gcode/control/M997.cpp @@ -24,11 +24,17 @@ #if ENABLED(PLATFORM_M997_SUPPORT) +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" +#endif + /** * M997: Perform in-application firmware update */ void GcodeSuite::M997() { + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_RebootScreen()); + flashFirmware(parser.intval('S')); } diff --git a/Marlin/src/gcode/control/M999.cpp b/Marlin/src/gcode/control/M999.cpp index 7487b4cf6e74..b7219673a3d6 100644 --- a/Marlin/src/gcode/control/M999.cpp +++ b/Marlin/src/gcode/control/M999.cpp @@ -41,5 +41,5 @@ void GcodeSuite::M999() { if (parser.boolval('S')) return; - queue.flush_and_request_resend(); + queue.flush_and_request_resend(queue.ring_buffer.command_port()); } diff --git a/Marlin/src/gcode/control/T.cpp b/Marlin/src/gcode/control/T.cpp index 3ce284f82e86..5e8f6b5436d4 100644 --- a/Marlin/src/gcode/control/T.cpp +++ b/Marlin/src/gcode/control/T.cpp @@ -40,7 +40,7 @@ * F[units/min] Set the movement feedrate * S1 Don't move the tool in XY after change * - * For PRUSA_MMU2(S) and SMUFF_EMU_MMU2(S) + * For PRUSA_MMU2(S) and EXTENDABLE_EMU_MMU2(S) * T[n] Gcode to extrude at least 38.10 mm at feedrate 19.02 mm/s must follow immediately to load to extruder wheels. * T? Gcode to extrude shouldn't have to follow. Load to extruder wheels is done automatically. * Tx Same as T?, but nozzle doesn't have to be preheated. Tc requires a preheated nozzle to finish filament load. @@ -49,7 +49,7 @@ void GcodeSuite::T(const int8_t tool_index) { DEBUG_SECTION(log_T, "T", DEBUGGING(LEVELING)); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("...(", tool_index, ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("...(", tool_index, ")"); // Count this command as movement / activity reset_stepper_timeout(); diff --git a/Marlin/src/gcode/eeprom/M500-M504.cpp b/Marlin/src/gcode/eeprom/M500-M504.cpp index 26c50a6129a0..a06e98ad1ea7 100644 --- a/Marlin/src/gcode/eeprom/M500-M504.cpp +++ b/Marlin/src/gcode/eeprom/M500-M504.cpp @@ -75,14 +75,14 @@ void GcodeSuite::M502() { if (dowrite) { val = parser.byteval('V'); persistentStore.write_data(addr, &val); - SERIAL_ECHOLNPAIR("Wrote address ", addr, " with ", int(val)); + SERIAL_ECHOLNPGM("Wrote address ", addr, " with ", val); } else { if (parser.seenval('T')) { const int endaddr = parser.value_ushort(); while (addr <= endaddr) { persistentStore.read_data(addr, &val); - SERIAL_ECHOLNPAIR("0x", hex_word(addr), ":", hex_byte(val)); + SERIAL_ECHOLNPGM("0x", hex_word(addr), ":", hex_byte(val)); addr++; safe_delay(10); } @@ -90,7 +90,7 @@ void GcodeSuite::M502() { } else { persistentStore.read_data(addr, &val); - SERIAL_ECHOLNPAIR("Read address ", addr, " and got ", int(val)); + SERIAL_ECHOLNPGM("Read address ", addr, " and got ", val); } } return; diff --git a/Marlin/src/gcode/feature/L6470/M122.cpp b/Marlin/src/gcode/feature/L6470/M122.cpp index d2b7f73997f8..1e5b37e4b76f 100644 --- a/Marlin/src/gcode/feature/L6470/M122.cpp +++ b/Marlin/src/gcode/feature/L6470/M122.cpp @@ -41,16 +41,16 @@ inline void L6470_say_status(const L64XX_axis_t axis) { SERIAL_ECHO(temp_buf); print_bin(sh.STATUS_AXIS_RAW); switch (sh.STATUS_AXIS_LAYOUT) { - case L6470_STATUS_LAYOUT: serialprintPGM(PSTR(" L6470")); break; - case L6474_STATUS_LAYOUT: serialprintPGM(PSTR(" L6474")); break; - case L6480_STATUS_LAYOUT: serialprintPGM(PSTR(" L6480/powerSTEP01")); break; + case L6470_STATUS_LAYOUT: SERIAL_ECHOPGM(" L6470"); break; + case L6474_STATUS_LAYOUT: SERIAL_ECHOPGM(" L6474"); break; + case L6480_STATUS_LAYOUT: SERIAL_ECHOPGM(" L6480/powerSTEP01"); break; } #endif SERIAL_ECHOPGM("\n...OUTPUT: "); - serialprintPGM(sh.STATUS_AXIS & STATUS_HIZ ? PSTR("OFF") : PSTR("ON ")); + SERIAL_ECHOPGM_P(sh.STATUS_AXIS & STATUS_HIZ ? PSTR("OFF") : PSTR("ON ")); SERIAL_ECHOPGM(" BUSY: "); echo_yes_no((sh.STATUS_AXIS & STATUS_BUSY) == 0); SERIAL_ECHOPGM(" DIR: "); - serialprintPGM((((sh.STATUS_AXIS & STATUS_DIR) >> 4) ^ L64xxManager.index_to_dir[axis]) ? PSTR("FORWARD") : PSTR("REVERSE")); + SERIAL_ECHOPGM_P((((sh.STATUS_AXIS & STATUS_DIR) >> 4) ^ L64xxManager.index_to_dir[axis]) ? PSTR("FORWARD") : PSTR("REVERSE")); if (sh.STATUS_AXIS_LAYOUT == L6480_STATUS_LAYOUT) { SERIAL_ECHOPGM(" Last Command: "); if (sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD) SERIAL_ECHOPGM("VALID"); @@ -67,8 +67,8 @@ inline void L6470_say_status(const L64XX_axis_t axis) { SERIAL_ECHOPGM(" Last Command: "); if (!(sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD)) SERIAL_ECHOPGM("IN"); SERIAL_ECHOPGM("VALID "); - serialprintPGM(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ? PSTR("COMPLETED ") : PSTR("Not PERFORMED")); - SERIAL_ECHOPAIR("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING " : "OK "); + SERIAL_ECHOPGM_P(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ? PSTR("COMPLETED ") : PSTR("Not PERFORMED")); + SERIAL_ECHOPGM("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING " : "OK "); } SERIAL_ECHOPGM(" OVERCURRENT:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_OCD) == 0); if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) { diff --git a/Marlin/src/gcode/feature/L6470/M906.cpp b/Marlin/src/gcode/feature/L6470/M906.cpp index 7bd446a1ab77..bab355fe38c2 100644 --- a/Marlin/src/gcode/feature/L6470/M906.cpp +++ b/Marlin/src/gcode/feature/L6470/M906.cpp @@ -32,31 +32,6 @@ #define DEBUG_OUT ENABLED(L6470_CHITCHAT) #include "../../../core/debug_out.h" -/** - * M906: report or set KVAL_HOLD which sets the maximum effective voltage provided by the - * PWMs to the steppers - * - * On L6474 this sets the TVAL register (same address). - * - * I - select which driver(s) to change on multi-driver axis - * 0 - (default) all drivers on the axis or E0 - * 1 - monitor only X, Y, Z or E1 - * 2 - monitor only X2, Y2, Z2 or E2 - * 3 - monitor only Z3 or E3 - * 4 - monitor only Z4 or E4 - * 5 - monitor only E5 - * Xxxx, Yxxx, Zxxx, Exxx - axis to change (optional) - * L6474 - current in mA (4A max) - * All others - 0-255 - */ - -/** - * Sets KVAL_HOLD wich affects the current being driven through the stepper. - * - * L6470 is used in the STEP-CLOCK mode. KVAL_HOLD is the only KVAL_xxx - * that affects the effective voltage seen by the stepper. - */ - /** * MACRO to fetch information on the items associated with current limiting * and maximum voltage output. @@ -88,7 +63,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { #if ENABLED(L6470_CHITCHAT) char tmp[10]; sprintf_P(tmp, PSTR("%4x "), status); - DEBUG_ECHOPAIR(" status: ", tmp); + DEBUG_ECHOPGM(" status: ", tmp); print_bin(status); #else UNUSED(status); @@ -129,13 +104,13 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { } SERIAL_EOL(); - SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps, + SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps, " ADC_OUT: ", L6470_ADC_out); SERIAL_ECHOPGM(" Vs_compensation: "); - serialprintPGM((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? PSTR("ENABLED ") : PSTR("DISABLED")); - SERIAL_ECHOLNPAIR(" Compensation coefficient: ~", comp_coef * 0.01f); + SERIAL_ECHOPGM_P((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? PSTR("ENABLED ") : PSTR("DISABLED")); + SERIAL_ECHOLNPGM(" Compensation coefficient: ~", comp_coef * 0.01f); - SERIAL_ECHOPAIR("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD), + SERIAL_ECHOPGM("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD), " KVAL_RUN : ", motor.GetParam(L6470_KVAL_RUN), " KVAL_ACC: ", motor.GetParam(L6470_KVAL_ACC), " KVAL_DEC: ", motor.GetParam(L6470_KVAL_DEC), @@ -193,7 +168,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { SERIAL_ECHOLNPGM(" mA) Motor Status: NA"); const uint16_t MicroSteps = _BV(motor.GetParam(L6470_STEP_MODE) & 0x07); //NOMORE(MicroSteps, 16); - SERIAL_ECHOPAIR("...MicroSteps: ", MicroSteps, + SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps, " ADC_OUT: ", L6470_ADC_out); SERIAL_ECHOLNPGM(" Vs_compensation: NA\n"); @@ -210,7 +185,7 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { case 1: DEBUG_ECHOLNPGM("75V/uS") ; break; case 2: DEBUG_ECHOLNPGM("110V/uS") ; break; case 3: DEBUG_ECHOLNPGM("260V/uS") ; break; - default: DEBUG_ECHOLNPAIR("slew rate: ", (motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT); break; + default: DEBUG_ECHOLNPGM("slew rate: ", (motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT); break; } #endif SERIAL_EOL(); @@ -220,6 +195,28 @@ void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) { } } +/** + * M906: report or set KVAL_HOLD which sets the maximum effective voltage provided by the + * PWMs to the steppers + * + * On L6474 this sets the TVAL register (same address). + * + * I - select which driver(s) to change on multi-driver axis + * 0 - (default) all drivers on the axis or E0 + * 1 - monitor only X, Y, Z or E1 + * 2 - monitor only X2, Y2, Z2 or E2 + * 3 - monitor only Z3 or E3 + * 4 - monitor only Z4 or E4 + * 5 - monitor only E5 + * Xxxx, Yxxx, Zxxx, Exxx - axis to change (optional) + * L6474 - current in mA (4A max) + * All others - 0-255 + * + * Sets KVAL_HOLD which affects the current being driven through the stepper. + * + * L6470 is used in the STEP-CLOCK mode. KVAL_HOLD is the only KVAL_xxx + * that affects the effective voltage seen by the stepper. + */ void GcodeSuite::M906() { L64xxManager.pause_monitor(true); // Keep monitor_driver() from stealing status @@ -234,7 +231,7 @@ void GcodeSuite::M906() { const uint8_t index = parser.byteval('I'); #endif - LOOP_XYZE(i) if (uint16_t value = parser.intval(axis_codes[i])) { + LOOP_LOGICAL_AXES(i) if (uint16_t value = parser.intval(axis_codes[i])) { report_current = false; @@ -252,58 +249,67 @@ void GcodeSuite::M906() { if (index == 1) L6470_SET_KVAL_HOLD(X2); #endif break; - case Y_AXIS: - #if AXIS_IS_L64XX(Y) - if (index == 0) L6470_SET_KVAL_HOLD(Y); - #endif - #if AXIS_IS_L64XX(Y2) - if (index == 1) L6470_SET_KVAL_HOLD(Y2); - #endif - break; - case Z_AXIS: - #if AXIS_IS_L64XX(Z) - if (index == 0) L6470_SET_KVAL_HOLD(Z); - #endif - #if AXIS_IS_L64XX(Z2) - if (index == 1) L6470_SET_KVAL_HOLD(Z2); - #endif - #if AXIS_IS_L64XX(Z3) - if (index == 2) L6470_SET_KVAL_HOLD(Z3); - #endif - #if AXIS_DRIVER_TYPE_Z4(L6470) - if (index == 3) L6470_SET_KVAL_HOLD(Z4); - #endif - break; - case E_AXIS: { - const int8_t target_extruder = get_target_extruder_from_command(); - if (target_extruder < 0) return; - switch (target_extruder) { - #if AXIS_IS_L64XX(E0) - case 0: L6470_SET_KVAL_HOLD(E0); break; - #endif - #if AXIS_IS_L64XX(E1) - case 1: L6470_SET_KVAL_HOLD(E1); break; - #endif - #if AXIS_IS_L64XX(E2) - case 2: L6470_SET_KVAL_HOLD(E2); break; + + #if HAS_Y_AXIS + case Y_AXIS: + #if AXIS_IS_L64XX(Y) + if (index == 0) L6470_SET_KVAL_HOLD(Y); #endif - #if AXIS_IS_L64XX(E3) - case 3: L6470_SET_KVAL_HOLD(E3); break; + #if AXIS_IS_L64XX(Y2) + if (index == 1) L6470_SET_KVAL_HOLD(Y2); #endif - #if AXIS_IS_L64XX(E4) - case 4: L6470_SET_KVAL_HOLD(E4); break; + break; + #endif + + #if HAS_Z_AXIS + case Z_AXIS: + #if AXIS_IS_L64XX(Z) + if (index == 0) L6470_SET_KVAL_HOLD(Z); #endif - #if AXIS_IS_L64XX(E5) - case 5: L6470_SET_KVAL_HOLD(E5); break; + #if AXIS_IS_L64XX(Z2) + if (index == 1) L6470_SET_KVAL_HOLD(Z2); #endif - #if AXIS_IS_L64XX(E6) - case 6: L6470_SET_KVAL_HOLD(E6); break; + #if AXIS_IS_L64XX(Z3) + if (index == 2) L6470_SET_KVAL_HOLD(Z3); #endif - #if AXIS_IS_L64XX(E7) - case 7: L6470_SET_KVAL_HOLD(E7); break; + #if AXIS_DRIVER_TYPE_Z4(L6470) + if (index == 3) L6470_SET_KVAL_HOLD(Z4); #endif - } - } break; + break; + #endif + + #if E_STEPPERS + case E_AXIS: { + const int8_t target_e_stepper = get_target_e_stepper_from_command(0); + if (target_e_stepper < 0) return; + switch (target_e_stepper) { + #if AXIS_IS_L64XX(E0) + case 0: L6470_SET_KVAL_HOLD(E0); break; + #endif + #if AXIS_IS_L64XX(E1) + case 1: L6470_SET_KVAL_HOLD(E1); break; + #endif + #if AXIS_IS_L64XX(E2) + case 2: L6470_SET_KVAL_HOLD(E2); break; + #endif + #if AXIS_IS_L64XX(E3) + case 3: L6470_SET_KVAL_HOLD(E3); break; + #endif + #if AXIS_IS_L64XX(E4) + case 4: L6470_SET_KVAL_HOLD(E4); break; + #endif + #if AXIS_IS_L64XX(E5) + case 5: L6470_SET_KVAL_HOLD(E5); break; + #endif + #if AXIS_IS_L64XX(E6) + case 6: L6470_SET_KVAL_HOLD(E6); break; + #endif + #if AXIS_IS_L64XX(E7) + case 7: L6470_SET_KVAL_HOLD(E7); break; + #endif + } + } break; + #endif } } diff --git a/Marlin/src/gcode/feature/L6470/M916-918.cpp b/Marlin/src/gcode/feature/L6470/M916-918.cpp index 8a1ea4830606..ad0a91111dc2 100644 --- a/Marlin/src/gcode/feature/L6470/M916-918.cpp +++ b/Marlin/src/gcode/feature/L6470/M916-918.cpp @@ -96,7 +96,7 @@ void GcodeSuite::M916() { if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold)) return; // quit if invalid user input - DEBUG_ECHOLNPAIR("feedrate = ", final_feedrate); + DEBUG_ECHOLNPGM("feedrate = ", final_feedrate); planner.synchronize(); // wait for all current movement commands to complete @@ -127,9 +127,9 @@ void GcodeSuite::M916() { do { if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT) - DEBUG_ECHOLNPAIR("TVAL current (mA) = ", (M91x_counter + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); // report TVAL current for this run + DEBUG_ECHOLNPGM("TVAL current (mA) = ", (M91x_counter + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); // report TVAL current for this run else - DEBUG_ECHOLNPAIR("kval_hold = ", M91x_counter); // report KVAL_HOLD for this run + DEBUG_ECHOLNPGM("kval_hold = ", M91x_counter); // report KVAL_HOLD for this run for (j = 0; j < driver_count; j++) L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, M91x_counter); //set KVAL_HOLD or TVAL (same register address) @@ -177,7 +177,7 @@ void GcodeSuite::M916() { if ((status_composite & (sh.STATUS_AXIS_TH_WRN | sh.STATUS_AXIS_TH_SD))) DEBUG_ECHOLNPGM(".\n.\nTest completed normally - Thermal warning/shutdown has occurred"); else if (status_composite) - DEBUG_ECHOLNPGM(".\n.\nTest completed abnormally - non-thermal error has occured"); + DEBUG_ECHOLNPGM(".\n.\nTest completed abnormally - non-thermal error has occurred"); else DEBUG_ECHOLNPGM(".\n.\nTest completed normally - Unable to get to thermal warning/shutdown"); @@ -236,7 +236,7 @@ void GcodeSuite::M917() { if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold)) return; // quit if invalid user input - DEBUG_ECHOLNPAIR("feedrate = ", final_feedrate); + DEBUG_ECHOLNPGM("feedrate = ", final_feedrate); planner.synchronize(); // wait for all current movement commands to complete @@ -252,18 +252,18 @@ void GcodeSuite::M917() { // 2 - OCD finalized - decreasing STALL - exit when STALL warning happens // 3 - OCD finalized - increasing STALL - exit when STALL warning stop // 4 - all testing completed - DEBUG_ECHOPAIR(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display - DEBUG_ECHOPAIR(" (OCD_TH: : ", OCD_TH_val); + DEBUG_ECHOPGM(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375); // first status display + DEBUG_ECHOPGM(" (OCD_TH: : ", OCD_TH_val); if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) { - DEBUG_ECHOPAIR(") Stall threshold: ", (STALL_TH_val + 1) * 31.25); - DEBUG_ECHOPAIR(" (STALL_TH: ", STALL_TH_val); + DEBUG_ECHOPGM(") Stall threshold: ", (STALL_TH_val + 1) * 31.25); + DEBUG_ECHOPGM(" (STALL_TH: ", STALL_TH_val); } DEBUG_ECHOLNPGM(")"); do { - if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPAIR("STALL threshold : ", (STALL_TH_val + 1) * 31.25); - DEBUG_ECHOLNPAIR(" OCD threshold : ", (OCD_TH_val + 1) * 375); + if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPGM("STALL threshold : ", (STALL_TH_val + 1) * 31.25); + DEBUG_ECHOLNPGM(" OCD threshold : ", (OCD_TH_val + 1) * 375); sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate)); gcode.process_subcommands_now_P(gcode_string); @@ -303,7 +303,7 @@ void GcodeSuite::M917() { if (!(k % 4)) { kval_hold *= 0.95; DEBUG_EOL(); - DEBUG_ECHOLNPAIR("Lowering KVAL_HOLD by about 5% to ", kval_hold); + DEBUG_ECHOLNPGM("Lowering KVAL_HOLD by about 5% to ", kval_hold); for (j = 0; j < driver_count; j++) L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold); } @@ -590,8 +590,8 @@ void GcodeSuite::M918() { } m_steps = L64xxManager.get_param(axis_index[0], L6470_STEP_MODE) & 0x07; // get microsteps - DEBUG_ECHOLNPAIR("Microsteps = ", _BV(m_steps)); - DEBUG_ECHOLNPAIR("target (maximum) feedrate = ", final_feedrate); + DEBUG_ECHOLNPGM("Microsteps = ", _BV(m_steps)); + DEBUG_ECHOLNPGM("target (maximum) feedrate = ", final_feedrate); const float feedrate_inc = final_feedrate / 10, // Start at 1/10 of max & go up by 1/10 per step fr_limit = final_feedrate * 0.99f; // Rounding-safe comparison value @@ -612,7 +612,7 @@ void GcodeSuite::M918() { do { current_feedrate += feedrate_inc; - DEBUG_ECHOLNPAIR("...feedrate = ", current_feedrate); + DEBUG_ECHOLNPGM("...feedrate = ", current_feedrate); sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(current_feedrate)); gcode.process_subcommands_now_P(gcode_string); diff --git a/Marlin/src/gcode/feature/advance/M900.cpp b/Marlin/src/gcode/feature/advance/M900.cpp index 5c7155d7c9b5..4ed601bbe873 100644 --- a/Marlin/src/gcode/feature/advance/M900.cpp +++ b/Marlin/src/gcode/feature/advance/M900.cpp @@ -43,7 +43,7 @@ void GcodeSuite::M900() { auto echo_value_oor = [](const char ltr, const bool ten=true) { - SERIAL_CHAR('?'); SERIAL_CHAR(ltr); + SERIAL_CHAR('?', ltr); SERIAL_ECHOPGM(" value out of range"); if (ten) SERIAL_ECHOPGM(" (0-10)"); SERIAL_ECHOLNPGM("."); @@ -115,12 +115,12 @@ void GcodeSuite::M900() { #if ENABLED(EXTRA_LIN_ADVANCE_K) #if EXTRUDERS < 2 - SERIAL_ECHOLNPAIR("Advance S", int(new_slot), " K", kref, "(S", int(!new_slot), " K", lref, ")"); + SERIAL_ECHOLNPGM("Advance S", new_slot, " K", kref, "(S", !new_slot, " K", lref, ")"); #else LOOP_L_N(i, EXTRUDERS) { const bool slot = TEST(lin_adv_slot, i); - SERIAL_ECHOLNPAIR("Advance T", int(i), " S", int(slot), " K", planner.extruder_advance_K[i], - "(S", int(!slot), " K", other_extruder_advance_K[i], ")"); + SERIAL_ECHOLNPGM("Advance T", i, " S", slot, " K", planner.extruder_advance_K[i], + "(S", !slot, " K", other_extruder_advance_K[i], ")"); SERIAL_EOL(); } #endif @@ -129,7 +129,7 @@ void GcodeSuite::M900() { SERIAL_ECHO_START(); #if EXTRUDERS < 2 - SERIAL_ECHOLNPAIR("Advance K=", planner.extruder_advance_K[0]); + SERIAL_ECHOLNPGM("Advance K=", planner.extruder_advance_K[0]); #else SERIAL_ECHOPGM("Advance K"); LOOP_L_N(i, EXTRUDERS) { @@ -144,4 +144,17 @@ void GcodeSuite::M900() { } +void GcodeSuite::M900_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_LINEAR_ADVANCE)); + #if EXTRUDERS < 2 + report_echo_start(forReplay); + SERIAL_ECHOLNPGM(" M900 K", planner.extruder_advance_K[0]); + #else + LOOP_L_N(i, EXTRUDERS) { + report_echo_start(forReplay); + SERIAL_ECHOLNPGM(" M900 T", i, " K", planner.extruder_advance_K[i]); + } + #endif +} + #endif // LIN_ADVANCE diff --git a/Marlin/src/gcode/feature/camera/M240.cpp b/Marlin/src/gcode/feature/camera/M240.cpp index fc350d8a558c..19051ffd423e 100644 --- a/Marlin/src/gcode/feature/camera/M240.cpp +++ b/Marlin/src/gcode/feature/camera/M240.cpp @@ -47,7 +47,7 @@ #endif #ifdef PHOTO_RETRACT_MM - inline void e_move_m240(const float length, const feedRate_t &fr_mm_s) { + inline void e_move_m240(const float length, const_feedRate_t fr_mm_s) { if (length && thermalManager.hotEnoughToExtrude(active_extruder)) unscaled_e_move(length, fr_mm_s); } @@ -135,17 +135,8 @@ void GcodeSuite::M240() { }; #ifdef PHOTO_RETRACT_MM - const float rval = parser.seenval('R') ? parser.value_linear_units() : _PHOTO_RETRACT_MM; - feedRate_t sval = ( - #if ENABLED(ADVANCED_PAUSE_FEATURE) - PAUSE_PARK_RETRACT_FEEDRATE - #elif ENABLED(FWRETRACT) - RETRACT_FEEDRATE - #else - 45 - #endif - ); - if (parser.seenval('S')) sval = parser.value_feedrate(); + const float rval = parser.linearval('R', _PHOTO_RETRACT_MM); + const feedRate_t sval = parser.feedrateval('S', TERN(ADVANCED_PAUSE_FEATURE, PAUSE_PARK_RETRACT_FEEDRATE, TERN(FWRETRACT, RETRACT_FEEDRATE, 45))); e_move_m240(-rval, sval); #endif diff --git a/Marlin/src/gcode/feature/caselight/M355.cpp b/Marlin/src/gcode/feature/caselight/M355.cpp index 12ae5cff1ddc..b3b863f02e1f 100644 --- a/Marlin/src/gcode/feature/caselight/M355.cpp +++ b/Marlin/src/gcode/feature/caselight/M355.cpp @@ -61,7 +61,7 @@ void GcodeSuite::M355() { SERIAL_ECHOLNPGM(STR_OFF); else { #if CASELIGHT_USES_BRIGHTNESS - if (PWM_PIN(CASE_LIGHT_PIN)) { + if (TERN(CASE_LIGHT_USE_NEOPIXEL, true, TERN0(NEED_CASE_LIGHT_PIN, PWM_PIN(CASE_LIGHT_PIN)))) { SERIAL_ECHOLN(int(caselight.brightness)); return; } diff --git a/Marlin/src/gcode/feature/clean/G12.cpp b/Marlin/src/gcode/feature/clean/G12.cpp index 216db5bae374..b19932eb983d 100644 --- a/Marlin/src/gcode/feature/clean/G12.cpp +++ b/Marlin/src/gcode/feature/clean/G12.cpp @@ -42,6 +42,7 @@ * P0 S : Stroke cleaning with S strokes * P1 Sn T : Zigzag cleaning with S repeats and T zigzags * P2 Sn R : Circle cleaning with S repeats and R radius + * X, Y, Z : Specify axes to move during cleaning. Default: ALL. */ void GcodeSuite::G12() { // Don't allow nozzle cleaning without homing first diff --git a/Marlin/src/gcode/feature/controllerfan/M710.cpp b/Marlin/src/gcode/feature/controllerfan/M710.cpp index cc450732baed..eede16b5bd42 100644 --- a/Marlin/src/gcode/feature/controllerfan/M710.cpp +++ b/Marlin/src/gcode/feature/controllerfan/M710.cpp @@ -27,18 +27,6 @@ #include "../../gcode.h" #include "../../../feature/controllerfan.h" -void M710_report(const bool forReplay) { - if (!forReplay) { SERIAL_ECHOLNPGM("; Controller Fan"); SERIAL_ECHO_START(); } - SERIAL_ECHOLNPAIR(" M710" - " S", int(controllerFan.settings.active_speed), - " I", int(controllerFan.settings.idle_speed), - " A", int(controllerFan.settings.auto_mode), - " D", controllerFan.settings.duration, - " ; (", (int(controllerFan.settings.active_speed) * 100) / 255, "%" - " ", (int(controllerFan.settings.idle_speed) * 100) / 255, "%)" - ); -} - /** * M710: Set controller fan settings * @@ -75,7 +63,19 @@ void GcodeSuite::M710() { if (seenD) controllerFan.settings.duration = parser.value_ushort(); if (!(seenR || seenS || seenI || seenA || seenD)) - M710_report(false); + M710_report(); +} + +void GcodeSuite::M710_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_CONTROLLER_FAN)); + SERIAL_ECHOLNPGM(" M710" + " S", int(controllerFan.settings.active_speed), + " I", int(controllerFan.settings.idle_speed), + " A", int(controllerFan.settings.auto_mode), + " D", controllerFan.settings.duration, + " ; (", (int(controllerFan.settings.active_speed) * 100) / 255, "%" + " ", (int(controllerFan.settings.idle_speed) * 100) / 255, "%)" + ); } #endif // CONTROLLER_FAN_EDITABLE diff --git a/Marlin/src/gcode/feature/digipot/M907-M910.cpp b/Marlin/src/gcode/feature/digipot/M907-M910.cpp index e46366620798..a0b5c48e82a5 100644 --- a/Marlin/src/gcode/feature/digipot/M907-M910.cpp +++ b/Marlin/src/gcode/feature/digipot/M907-M910.cpp @@ -22,7 +22,7 @@ #include "../../../inc/MarlinConfig.h" -#if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_MOTOR_CURRENT_I2C, HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM || HAS_MOTOR_CURRENT_I2C || HAS_MOTOR_CURRENT_DAC #include "../../gcode.h" @@ -34,7 +34,7 @@ #include "../../../feature/digipot/digipot.h" #endif -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "../../../feature/dac/stepper_dac.h" #endif @@ -44,12 +44,27 @@ void GcodeSuite::M907() { #if HAS_MOTOR_CURRENT_SPI - LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper.set_digipot_current(i, parser.value_int()); + if (!parser.seen("BS" LOGICAL_AXES_STRING)) + return M907_report(); + + LOOP_LOGICAL_AXES(i) if (parser.seenval(axis_codes[i])) stepper.set_digipot_current(i, parser.value_int()); if (parser.seenval('B')) stepper.set_digipot_current(4, parser.value_int()); if (parser.seenval('S')) LOOP_LE_N(i, 4) stepper.set_digipot_current(i, parser.value_int()); #elif HAS_MOTOR_CURRENT_PWM + if (!parser.seen( + #if ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY) + "XY" + #endif + #if PIN_EXISTS(MOTOR_CURRENT_PWM_Z) + "Z" + #endif + #if PIN_EXISTS(MOTOR_CURRENT_PWM_E) + "E" + #endif + )) return M907_report(); + #if ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY) if (parser.seenval('X') || parser.seenval('Y')) stepper.set_digipot_current(0, parser.value_int()); #endif @@ -64,23 +79,48 @@ void GcodeSuite::M907() { #if HAS_MOTOR_CURRENT_I2C // this one uses actual amps in floating point - LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) digipot_i2c.set_current(i, parser.value_float()); + LOOP_LOGICAL_AXES(i) if (parser.seenval(axis_codes[i])) digipot_i2c.set_current(i, parser.value_float()); // Additional extruders use B,C,D for channels 4,5,6. // TODO: Change these parameters because 'E' is used. B? - for (uint8_t i = E_AXIS + 1; i < DIGIPOT_I2C_NUM_CHANNELS; i++) - if (parser.seenval('B' + i - (E_AXIS + 1))) digipot_i2c.set_current(i, parser.value_float()); + #if HAS_EXTRUDERS + for (uint8_t i = E_AXIS + 1; i < DIGIPOT_I2C_NUM_CHANNELS; i++) + if (parser.seenval('B' + i - (E_AXIS + 1))) digipot_i2c.set_current(i, parser.value_float()); + #endif #endif - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC if (parser.seenval('S')) { const float dac_percent = parser.value_float(); LOOP_LE_N(i, 4) stepper_dac.set_current_percent(i, dac_percent); } - LOOP_XYZE(i) if (parser.seenval(axis_codes[i])) stepper_dac.set_current_percent(i, parser.value_float()); + LOOP_LOGICAL_AXES(i) if (parser.seenval(axis_codes[i])) stepper_dac.set_current_percent(i, parser.value_float()); #endif } -#if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM + + void GcodeSuite::M907_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_STEPPER_MOTOR_CURRENTS)); + #if HAS_MOTOR_CURRENT_PWM + SERIAL_ECHOLNPGM_P( // PWM-based has 3 values: + PSTR(" M907 X"), stepper.motor_current_setting[0] // X and Y + , SP_Z_STR, stepper.motor_current_setting[1] // Z + , SP_E_STR, stepper.motor_current_setting[2] // E + ); + #elif HAS_MOTOR_CURRENT_SPI + SERIAL_ECHOPGM(" M907"); // SPI-based has 5 values: + LOOP_LOGICAL_AXES(q) { // X Y Z (I J K) E (map to X Y Z (I J K) E0 by default) + SERIAL_CHAR(' ', axis_codes[q]); + SERIAL_ECHO(stepper.motor_current_setting[q]); + } + SERIAL_CHAR(' ', 'B'); // B (maps to E1 by default) + SERIAL_ECHOLN(stepper.motor_current_setting[4]); + #endif + } + +#endif // HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM + +#if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_DAC /** * M908: Control digital trimpot directly (M908 P S) @@ -90,7 +130,7 @@ void GcodeSuite::M907() { TERN_(HAS_MOTOR_CURRENT_DAC, stepper_dac.set_current_value(parser.byteval('P', -1), parser.ushortval('S', 0))); } - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC void GcodeSuite::M909() { stepper_dac.print_values(); } void GcodeSuite::M910() { stepper_dac.commit_eeprom(); } diff --git a/Marlin/src/gcode/feature/filwidth/M404-M407.cpp b/Marlin/src/gcode/feature/filwidth/M404-M407.cpp index a70f7a61fec7..ff174ecf1358 100644 --- a/Marlin/src/gcode/feature/filwidth/M404-M407.cpp +++ b/Marlin/src/gcode/feature/filwidth/M404-M407.cpp @@ -38,7 +38,7 @@ void GcodeSuite::M404() { planner.volumetric_area_nominal = CIRCLE_AREA(filwidth.nominal_mm * 0.5); } else - SERIAL_ECHOLNPAIR("Filament dia (nominal mm):", filwidth.nominal_mm); + SERIAL_ECHOLNPGM("Filament dia (nominal mm):", filwidth.nominal_mm); } /** @@ -65,7 +65,7 @@ void GcodeSuite::M406() { * M407: Get measured filament diameter on serial output */ void GcodeSuite::M407() { - SERIAL_ECHOLNPAIR("Filament dia (measured mm):", filwidth.measured_mm); + SERIAL_ECHOLNPGM("Filament dia (measured mm):", filwidth.measured_mm); } #endif // FILAMENT_WIDTH_SENSOR diff --git a/Marlin/src/gcode/feature/fwretract/G10_G11.cpp b/Marlin/src/gcode/feature/fwretract/G10_G11.cpp index 219502f28a8e..1889f83d6211 100644 --- a/Marlin/src/gcode/feature/fwretract/G10_G11.cpp +++ b/Marlin/src/gcode/feature/fwretract/G10_G11.cpp @@ -32,16 +32,7 @@ * G10 - Retract filament according to settings of M207 * TODO: Handle 'G10 P' for tool settings and 'G10 L' for workspace settings */ -void GcodeSuite::G10() { - #if HAS_MULTI_EXTRUDER - const bool rs = parser.boolval('S'); - #endif - fwretract.retract(true - #if HAS_MULTI_EXTRUDER - , rs - #endif - ); -} +void GcodeSuite::G10() { fwretract.retract(true E_OPTARG(parser.boolval('S'))); } /** * G11 - Recover filament according to settings of M208 diff --git a/Marlin/src/gcode/feature/fwretract/M207-M209.cpp b/Marlin/src/gcode/feature/fwretract/M207-M209.cpp index 538f16cde60b..040a09a8e090 100644 --- a/Marlin/src/gcode/feature/fwretract/M207-M209.cpp +++ b/Marlin/src/gcode/feature/fwretract/M207-M209.cpp @@ -35,11 +35,11 @@ * F[units/min] retract_feedrate_mm_s * Z[units] retract_zraise */ -void GcodeSuite::M207() { - if (parser.seen('S')) fwretract.settings.retract_length = parser.value_axis_units(E_AXIS); - if (parser.seen('F')) fwretract.settings.retract_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS)); - if (parser.seen('Z')) fwretract.settings.retract_zraise = parser.value_linear_units(); - if (parser.seen('W')) fwretract.settings.swap_retract_length = parser.value_axis_units(E_AXIS); +void GcodeSuite::M207() { fwretract.M207(); } + +void GcodeSuite::M207_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_RETRACT_S_F_Z)); + fwretract.M207_report(); } /** @@ -50,25 +50,28 @@ void GcodeSuite::M207() { * F[units/min] retract_recover_feedrate_mm_s * R[units/min] swap_retract_recover_feedrate_mm_s */ -void GcodeSuite::M208() { - if (parser.seen('S')) fwretract.settings.retract_recover_extra = parser.value_axis_units(E_AXIS); - if (parser.seen('F')) fwretract.settings.retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS)); - if (parser.seen('R')) fwretract.settings.swap_retract_recover_feedrate_mm_s = MMM_TO_MMS(parser.value_axis_units(E_AXIS)); - if (parser.seen('W')) fwretract.settings.swap_retract_recover_extra = parser.value_axis_units(E_AXIS); +void GcodeSuite::M208() { fwretract.M208(); } + +void GcodeSuite::M208_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_RECOVER_S_F)); + fwretract.M208_report(); } #if ENABLED(FWRETRACT_AUTORETRACT) /** * M209: Enable automatic retract (M209 S1) - * For slicers that don't support G10/11, reversed extrude-only - * moves will be classified as retraction. + * + * For slicers that don't support G10/11, reversed + * extruder-only moves can be classified as retraction. */ - void GcodeSuite::M209() { - if (MIN_AUTORETRACT <= MAX_AUTORETRACT && parser.seen('S')) - fwretract.enable_autoretract(parser.value_bool()); + void GcodeSuite::M209() { fwretract.M209(); } + + void GcodeSuite::M209_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_AUTO_RETRACT_S)); + fwretract.M209_report(); } -#endif // FWRETRACT_AUTORETRACT +#endif #endif // FWRETRACT diff --git a/Marlin/src/gcode/feature/leds/M150.cpp b/Marlin/src/gcode/feature/leds/M150.cpp index cf09bf14ead7..45278fe1f5d6 100644 --- a/Marlin/src/gcode/feature/leds/M150.cpp +++ b/Marlin/src/gcode/feature/leds/M150.cpp @@ -52,33 +52,40 @@ * M150 I1 R ; Set NEOPIXEL index 1 to red * M150 S1 I1 R ; Set SEPARATE index 1 to red */ - void GcodeSuite::M150() { #if ENABLED(NEOPIXEL_LED) - const uint8_t index = parser.intval('I', -1); + const int8_t index = parser.intval('I', -1); #if ENABLED(NEOPIXEL2_SEPARATE) - const uint8_t unit = parser.intval('S'), - brightness = unit ? neo2.brightness() : neo.brightness(); - *(unit ? &neo2.neoindex : &neo.neoindex) = index; + int8_t brightness = neo.brightness(), unit = parser.intval('S', -1); + switch (unit) { + case -1: neo2.neoindex = index; // fall-thru + case 0: neo.neoindex = index; break; + case 1: neo2.neoindex = index; brightness = neo2.brightness(); break; + } #else const uint8_t brightness = neo.brightness(); neo.neoindex = index; #endif #endif - const LEDColor color = MakeLEDColor( + const LEDColor color = LEDColor( parser.seen('R') ? (parser.has_value() ? parser.value_byte() : 255) : 0, parser.seen('U') ? (parser.has_value() ? parser.value_byte() : 255) : 0, - parser.seen('B') ? (parser.has_value() ? parser.value_byte() : 255) : 0, - parser.seen('W') ? (parser.has_value() ? parser.value_byte() : 255) : 0, - parser.seen('P') ? (parser.has_value() ? parser.value_byte() : 255) : brightness + parser.seen('B') ? (parser.has_value() ? parser.value_byte() : 255) : 0 + OPTARG(HAS_WHITE_LED, parser.seen('W') ? (parser.has_value() ? parser.value_byte() : 255) : 0) + OPTARG(NEOPIXEL_LED, parser.seen('P') ? (parser.has_value() ? parser.value_byte() : 255) : brightness) ); #if ENABLED(NEOPIXEL2_SEPARATE) - if (unit == 1) { leds2.set_color(color); return; } + switch (unit) { + case 0: leds.set_color(color); return; + case 1: leds2.set_color(color); return; + } #endif + // If 'S' is not specified use both leds.set_color(color); + TERN_(NEOPIXEL2_SEPARATE, leds2.set_color(color)); } #endif // HAS_COLOR_LEDS diff --git a/Marlin/src/gcode/feature/leds/M7219.cpp b/Marlin/src/gcode/feature/leds/M7219.cpp index a6ee71174b54..40d3554dfe6e 100644 --- a/Marlin/src/gcode/feature/leds/M7219.cpp +++ b/Marlin/src/gcode/feature/leds/M7219.cpp @@ -82,7 +82,7 @@ void GcodeSuite::M7219() { LOOP_L_N(r, MAX7219_LINES) { SERIAL_ECHOPGM("led_line["); if (r < 10) SERIAL_CHAR(' '); - SERIAL_ECHO(int(r)); + SERIAL_ECHO(r); SERIAL_ECHOPGM("]="); for (uint8_t b = 8; b--;) SERIAL_CHAR('0' + TEST(max7219.led_line[r], b)); SERIAL_EOL(); diff --git a/Marlin/src/gcode/feature/mixing/M166.cpp b/Marlin/src/gcode/feature/mixing/M166.cpp index 9e071a47ec27..f42583d05244 100644 --- a/Marlin/src/gcode/feature/mixing/M166.cpp +++ b/Marlin/src/gcode/feature/mixing/M166.cpp @@ -30,12 +30,12 @@ #include "../../../feature/mixing.h" inline void echo_mix() { - SERIAL_ECHOPAIR(" (", int(mixer.mix[0]), "%|", int(mixer.mix[1]), "%)"); + SERIAL_ECHOPGM(" (", mixer.mix[0], "%|", mixer.mix[1], "%)"); } -inline void echo_zt(const int t, const float &z) { +inline void echo_zt(const int t, const_float_t z) { mixer.update_mix_from_vtool(t); - SERIAL_ECHOPAIR_P(SP_Z_STR, z, SP_T_STR, t); + SERIAL_ECHOPGM_P(SP_Z_STR, z, SP_T_STR, t); echo_mix(); } @@ -74,7 +74,7 @@ void GcodeSuite::M166() { #if ENABLED(GRADIENT_VTOOL) if (mixer.gradient.vtool_index >= 0) { - SERIAL_ECHOPAIR(" (T", int(mixer.gradient.vtool_index)); + SERIAL_ECHOPGM(" (T", mixer.gradient.vtool_index); SERIAL_CHAR(')'); } #endif diff --git a/Marlin/src/gcode/feature/network/M552-M554.cpp b/Marlin/src/gcode/feature/network/M552-M554.cpp index 6ea15fefbf67..887e67f3bde0 100644 --- a/Marlin/src/gcode/feature/network/M552-M554.cpp +++ b/Marlin/src/gcode/feature/network/M552-M554.cpp @@ -48,7 +48,7 @@ void MAC_report() { SERIAL_ECHOPGM(" MAC: "); LOOP_L_N(i, 6) { if (mac[i] < 16) SERIAL_CHAR('0'); - SERIAL_PRINT(mac[i], HEX); + SERIAL_PRINT(mac[i], PrintBase::Hex); if (i < 5) SERIAL_CHAR(':'); } } @@ -64,17 +64,7 @@ void ip_report(const uint16_t cmd, PGM_P const post, const IPAddress &ipo) { if (i < 3) SERIAL_CHAR('.'); } SERIAL_ECHOPGM(" ; "); - SERIAL_ECHOPGM_P(post); - SERIAL_EOL(); -} -void M552_report() { - ip_report(552, PSTR("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip); -} -void M553_report() { - ip_report(553, PSTR("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet); -} -void M554_report() { - ip_report(554, PSTR("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway); + SERIAL_ECHOLNPGM_P(post); } /** @@ -107,20 +97,36 @@ void GcodeSuite::M552() { if (nopar || seenP) M552_report(); } +void GcodeSuite::M552_report() { + ip_report(552, PSTR("ip address"), Ethernet.linkStatus() == LinkON ? Ethernet.localIP() : ethernet.ip); +} + /** * M553 Pnnn - Set netmask */ void GcodeSuite::M553() { - if (parser.seenval('P')) ethernet.subnet.fromString(parser.value_string()); - M553_report(); + if (parser.seenval('P')) + ethernet.subnet.fromString(parser.value_string()); + else + M553_report(); +} + +void GcodeSuite::M553_report() { + ip_report(553, PSTR("subnet mask"), Ethernet.linkStatus() == LinkON ? Ethernet.subnetMask() : ethernet.subnet); } /** * M554 Pnnn - Set Gateway */ void GcodeSuite::M554() { - if (parser.seenval('P')) ethernet.gateway.fromString(parser.value_string()); - M554_report(); + if (parser.seenval('P')) + ethernet.gateway.fromString(parser.value_string()); + else + M554_report(); +} + +void GcodeSuite::M554_report() { + ip_report(554, PSTR("gateway"), Ethernet.linkStatus() == LinkON ? Ethernet.gatewayIP() : ethernet.gateway); } #endif // HAS_ETHERNET diff --git a/Marlin/src/gcode/feature/password/M510-M512.cpp b/Marlin/src/gcode/feature/password/M510-M512.cpp index eeb9b1df2231..a5f017f5f3f9 100644 --- a/Marlin/src/gcode/feature/password/M510-M512.cpp +++ b/Marlin/src/gcode/feature/password/M510-M512.cpp @@ -66,7 +66,7 @@ void GcodeSuite::M510() { if (password.value_entry < CAT(1e, PASSWORD_LENGTH)) { password.is_set = true; password.value = password.value_entry; - SERIAL_ECHOLNPAIR(STR_PASSWORD_SET, password.value); // TODO: Update password.string + SERIAL_ECHOLNPGM(STR_PASSWORD_SET, password.value); // TODO: Update password.string } else SERIAL_ECHOLNPGM(STR_PASSWORD_TOO_LONG); diff --git a/Marlin/src/gcode/feature/pause/G27.cpp b/Marlin/src/gcode/feature/pause/G27.cpp index 3ce618d67568..f61453e6fb75 100644 --- a/Marlin/src/gcode/feature/pause/G27.cpp +++ b/Marlin/src/gcode/feature/pause/G27.cpp @@ -20,7 +20,6 @@ * */ - #include "../../../inc/MarlinConfig.h" #if ENABLED(NOZZLE_PARK_FEATURE) diff --git a/Marlin/src/gcode/feature/pause/G60.cpp b/Marlin/src/gcode/feature/pause/G60.cpp index 6f695b99a942..4c7190091cfc 100644 --- a/Marlin/src/gcode/feature/pause/G60.cpp +++ b/Marlin/src/gcode/feature/pause/G60.cpp @@ -47,11 +47,13 @@ void GcodeSuite::G60() { SBI(saved_slots[slot >> 3], slot & 0x07); #if ENABLED(SAVED_POSITIONS_DEBUG) + DEBUG_ECHOPGM(STR_SAVED_POS " S", slot); const xyze_pos_t &pos = stored_position[slot]; - DEBUG_ECHOPAIR_F(STR_SAVED_POS " S", slot); - DEBUG_ECHOPAIR_F(" : X", pos.x); - DEBUG_ECHOPAIR_F_P(SP_Y_STR, pos.y); - DEBUG_ECHOLNPAIR_F_P(SP_Z_STR, pos.z); + DEBUG_ECHOLNPAIR_F_P( + LIST_N(DOUBLE(LOGICAL_AXES), SP_E_STR, pos.e, + PSTR(" : X"), pos.x, SP_Y_STR, pos.y, SP_Z_STR, pos.z, + SP_I_STR, pos.i, SP_J_STR, pos.j, SP_K_STR, pos.k) + ); #endif } diff --git a/Marlin/src/gcode/feature/pause/G61.cpp b/Marlin/src/gcode/feature/pause/G61.cpp index 5d89af0ab84e..f3e5a2ab387a 100644 --- a/Marlin/src/gcode/feature/pause/G61.cpp +++ b/Marlin/src/gcode/feature/pause/G61.cpp @@ -27,18 +27,26 @@ #include "../../../module/planner.h" #include "../../gcode.h" #include "../../../module/motion.h" +#include "../../../module/planner.h" + +#define DEBUG_OUT ENABLED(SAVED_POSITIONS_DEBUG) +#include "../../../core/debug_out.h" /** * G61: Return to saved position * * F - Feedrate (optional) for the move back. * S - Slot # (0-based) to restore from (default 0). - * X Y Z - Axes to restore. At least one is required. + * X Y Z E - Axes to restore. At least one is required. + * + * If XYZE are not given, default restore uses the smart blocking move. */ void GcodeSuite::G61(void) { const uint8_t slot = parser.byteval('S'); + #define SYNC_E(POINT) TERN_(HAS_EXTRUDERS, planner.set_e_position_mm((destination.e = current_position.e = (POINT)))) + #if SAVED_POSITIONS < 256 if (slot >= SAVED_POSITIONS) { SERIAL_ERROR_MSG(STR_INVALID_POS_SLOT STRINGIFY(SAVED_POSITIONS)); @@ -47,25 +55,39 @@ void GcodeSuite::G61(void) { #endif // No saved position? No axes being restored? - if (!TEST(saved_slots[slot >> 3], slot & 0x07) || !parser.seen("XYZ")) return; - - SERIAL_ECHOPAIR(STR_RESTORING_POS " S", int(slot)); - LOOP_XYZ(i) { - destination[i] = parser.seen(XYZ_CHAR(i)) - ? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i) - : current_position[i]; - SERIAL_CHAR(' ', XYZ_CHAR(i)); - SERIAL_ECHO_F(destination[i]); - } - SERIAL_EOL(); + if (!TEST(saved_slots[slot >> 3], slot & 0x07)) return; // Apply any given feedrate over 0.0 feedRate_t saved_feedrate = feedrate_mm_s; const float fr = parser.linearval('F'); if (fr > 0.0) feedrate_mm_s = MMM_TO_MMS(fr); - // Move to the saved position - prepare_line_to_destination(); + if (!parser.seen_axis()) { + DEBUG_ECHOLNPGM("Default position restore"); + do_blocking_move_to(stored_position[slot], feedrate_mm_s); + SYNC_E(stored_position[slot].e); + } + else { + if (parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR))) { + DEBUG_ECHOPGM(STR_RESTORING_POS " S", slot); + LOOP_LINEAR_AXES(i) { + destination[i] = parser.seen(AXIS_CHAR(i)) + ? stored_position[slot][i] + parser.value_axis_units((AxisEnum)i) + : current_position[i]; + DEBUG_CHAR(' ', AXIS_CHAR(i)); + DEBUG_ECHO_F(destination[i]); + } + DEBUG_EOL(); + // Move to the saved position + prepare_line_to_destination(); + } + #if HAS_EXTRUDERS + if (parser.seen_test('E')) { + DEBUG_ECHOLNPGM(STR_RESTORING_POS " S", slot, " E", current_position.e, "=>", stored_position[slot].e); + SYNC_E(stored_position[slot].e); + } + #endif + } feedrate_mm_s = saved_feedrate; } diff --git a/Marlin/src/gcode/feature/pause/M125.cpp b/Marlin/src/gcode/feature/pause/M125.cpp index 9391b8661b2c..bc31e1225d86 100644 --- a/Marlin/src/gcode/feature/pause/M125.cpp +++ b/Marlin/src/gcode/feature/pause/M125.cpp @@ -56,7 +56,7 @@ */ void GcodeSuite::M125() { // Initial retract before move to filament change position - const float retract = -ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) : (PAUSE_PARK_RETRACT_LENGTH)); + const float retract = TERN0(HAS_EXTRUDERS, -ABS(parser.axisunitsval('L', E_AXIS, PAUSE_PARK_RETRACT_LENGTH))); xyz_pos_t park_point = NOZZLE_PARK_POINT; @@ -78,9 +78,8 @@ void GcodeSuite::M125() { // If possible, show an LCD prompt with the 'P' flag const bool show_lcd = TERN0(HAS_LCD_MENU, parser.boolval('P')); - if (pause_print(retract, park_point, 0, show_lcd)) { - TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true)); - if (ENABLED(EXTENSIBLE_UI) || !sd_printing || show_lcd) { + if (pause_print(retract, park_point, show_lcd, 0)) { + if (ENABLED(EXTENSIBLE_UI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) || !sd_printing || show_lcd) { wait_for_confirmation(false, 0); resume_print(0, 0, -retract, 0); } diff --git a/Marlin/src/gcode/feature/pause/M600.cpp b/Marlin/src/gcode/feature/pause/M600.cpp index 1c282f2052c7..541fa08350e6 100644 --- a/Marlin/src/gcode/feature/pause/M600.cpp +++ b/Marlin/src/gcode/feature/pause/M600.cpp @@ -81,9 +81,9 @@ void GcodeSuite::M600() { #if ENABLED(DUAL_X_CARRIAGE) int8_t DXC_ext = target_extruder; - if (!parser.seen('T')) { // If no tool index is specified, M600 was (probably) sent in response to filament runout. - // In this case, for duplicating modes set DXC_ext to the extruder that ran out. - #if HAS_FILAMENT_SENSOR && NUM_RUNOUT_SENSORS > 1 + if (!parser.seen_test('T')) { // If no tool index is specified, M600 was (probably) sent in response to filament runout. + // In this case, for duplicating modes set DXC_ext to the extruder that ran out. + #if MULTI_FILAMENT_SENSOR if (idex_is_duplicating()) DXC_ext = (READ(FIL_RUNOUT2_PIN) == FIL_RUNOUT2_STATE) ? 1 : 0; #else @@ -99,7 +99,7 @@ void GcodeSuite::M600() { #if ENABLED(HOME_BEFORE_FILAMENT_CHANGE) // If needed, home before parking for filament change - if (!all_axes_trusted()) home_all_axes(true); + home_if_needed(true); #endif #if HAS_MULTI_EXTRUDER @@ -110,7 +110,7 @@ void GcodeSuite::M600() { #endif // Initial retract before move to filament change position - const float retract = -ABS(parser.seen('E') ? parser.value_axis_units(E_AXIS) : (PAUSE_PARK_RETRACT_LENGTH)); + const float retract = -ABS(parser.axisunitsval('E', E_AXIS, PAUSE_PARK_RETRACT_LENGTH)); xyz_pos_t park_point NOZZLE_PARK_POINT; @@ -132,15 +132,11 @@ void GcodeSuite::M600() { fast_load_length = 0.0f; #else // Unload filament - const float unload_length = -ABS(parser.seen('U') ? parser.value_axis_units(E_AXIS) - : fc_settings[active_extruder].unload_length); - + const float unload_length = -ABS(parser.axisunitsval('U', E_AXIS, fc_settings[active_extruder].unload_length)); // Slow load filament constexpr float slow_load_length = FILAMENT_CHANGE_SLOW_LOAD_LENGTH; - // Fast load filament - const float fast_load_length = ABS(parser.seen('L') ? parser.value_axis_units(E_AXIS) - : fc_settings[active_extruder].load_length); + const float fast_load_length = ABS(parser.axisunitsval('L', E_AXIS, fc_settings[active_extruder].load_length)); #endif const int beep_count = parser.intval('B', -1 @@ -149,7 +145,7 @@ void GcodeSuite::M600() { #endif ); - if (pause_print(retract, park_point, unload_length, true DXC_PASS)) { + if (pause_print(retract, park_point, true, unload_length DXC_PASS)) { #if ENABLED(MMU2_MENUS) mmu2_M600(); resume_print(slow_load_length, fast_load_length, 0, beep_count DXC_PASS); diff --git a/Marlin/src/gcode/feature/pause/M603.cpp b/Marlin/src/gcode/feature/pause/M603.cpp index 9c3b774bd2b2..ebb110d2e703 100644 --- a/Marlin/src/gcode/feature/pause/M603.cpp +++ b/Marlin/src/gcode/feature/pause/M603.cpp @@ -42,6 +42,8 @@ */ void GcodeSuite::M603() { + if (!parser.seen("TUL")) return M603_report(); + const int8_t target_extruder = get_target_extruder_from_command(); if (target_extruder < 0) return; @@ -62,4 +64,20 @@ void GcodeSuite::M603() { } } +void GcodeSuite::M603_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_FILAMENT_LOAD_UNLOAD)); + + #if EXTRUDERS == 1 + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M603 L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length), " ;"); + say_units(); + #else + LOOP_L_N(e, EXTRUDERS) { + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M603 T", e, " L", LINEAR_UNIT(fc_settings[e].load_length), " U", LINEAR_UNIT(fc_settings[e].unload_length), " ;"); + say_units(); + } + #endif +} + #endif // ADVANCED_PAUSE_FEATURE diff --git a/Marlin/src/gcode/feature/pause/M701_M702.cpp b/Marlin/src/gcode/feature/pause/M701_M702.cpp index 9a2b77493667..d46bb234bceb 100644 --- a/Marlin/src/gcode/feature/pause/M701_M702.cpp +++ b/Marlin/src/gcode/feature/pause/M701_M702.cpp @@ -88,9 +88,17 @@ void GcodeSuite::M701() { tool_change(target_extruder, false); #endif - // Lift Z axis - if (park_point.z > 0) - do_blocking_move_to_z(_MIN(current_position.z + park_point.z, Z_MAX_POS), feedRate_t(NOZZLE_PARK_Z_FEEDRATE)); + auto move_z_by = [](const_float_t zdist) { + if (zdist) { + destination = current_position; + destination.z += zdist; + prepare_internal_move_to_destination(NOZZLE_PARK_Z_FEEDRATE); + } + }; + + // Raise the Z axis (with max limit) + const float park_raise = _MIN(park_point.z, (Z_MAX_POS) - current_position.z); + move_z_by(park_raise); // Load filament #if HAS_PRUSA_MMU2 @@ -106,15 +114,12 @@ void GcodeSuite::M701() { true, // show_lcd thermalManager.still_heating(target_extruder), // pause_for_user PAUSE_MODE_LOAD_FILAMENT // pause_mode - #if ENABLED(DUAL_X_CARRIAGE) - , target_extruder // Dual X target - #endif + OPTARG(DUAL_X_CARRIAGE, target_extruder) // Dual X target ); #endif // Restore Z axis - if (park_point.z > 0) - do_blocking_move_to_z(_MAX(current_position.z - park_point.z, 0), feedRate_t(NOZZLE_PARK_Z_FEEDRATE)); + move_z_by(-park_raise); #if HAS_MULTI_EXTRUDER && (HAS_PRUSA_MMU1 || !HAS_MMU) // Restore toolhead if it was changed diff --git a/Marlin/src/gcode/feature/power_monitor/M430.cpp b/Marlin/src/gcode/feature/power_monitor/M430.cpp index 9559404456f5..642a75d0612a 100644 --- a/Marlin/src/gcode/feature/power_monitor/M430.cpp +++ b/Marlin/src/gcode/feature/power_monitor/M430.cpp @@ -42,7 +42,7 @@ void GcodeSuite::M430() { #if ENABLED(POWER_MONITOR_CURRENT) if (parser.seen('I')) { power_monitor.set_current_display(parser.value_bool()); do_report = false; } #endif - #if HAS_POWER_MONITOR_VREF + #if ENABLED(POWER_MONITOR_VOLTAGE) if (parser.seen('V')) { power_monitor.set_voltage_display(parser.value_bool()); do_report = false; } #endif #if HAS_POWER_MONITOR_WATTS @@ -50,14 +50,14 @@ void GcodeSuite::M430() { #endif #endif if (do_report) { - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( #if ENABLED(POWER_MONITOR_CURRENT) "Current: ", power_monitor.getAmps(), "A" - #if HAS_POWER_MONITOR_VREF + #if ENABLED(POWER_MONITOR_VOLTAGE) " " #endif #endif - #if HAS_POWER_MONITOR_VREF + #if ENABLED(POWER_MONITOR_VOLTAGE) "Voltage: ", power_monitor.getVolts(), "V" #endif #if HAS_POWER_MONITOR_WATTS diff --git a/Marlin/src/gcode/feature/powerloss/M1000.cpp b/Marlin/src/gcode/feature/powerloss/M1000.cpp index 14c92531fa0b..3ebb286b5775 100644 --- a/Marlin/src/gcode/feature/powerloss/M1000.cpp +++ b/Marlin/src/gcode/feature/powerloss/M1000.cpp @@ -27,9 +27,16 @@ #include "../../gcode.h" #include "../../../feature/powerloss.h" #include "../../../module/motion.h" + #include "../../../lcd/marlinui.h" #if ENABLED(EXTENSIBLE_UI) #include "../../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD) + #include "../../../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../../lcd/e3v2/enhanced/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #include "../../../lcd/e3v2/jyersui/dwin.h" // Temporary fix until it can be better implemented #endif #define DEBUG_OUT ENABLED(DEBUG_POWER_LOSS_RECOVERY) @@ -40,7 +47,7 @@ void menu_job_recovery(); inline void plr_error(PGM_P const prefix) { #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) DEBUG_ECHO_START(); - serialprintPGM(prefix); + DEBUG_ECHOPGM_P(prefix); DEBUG_ECHOLNPGM(" Job Recovery Data"); #else UNUSED(prefix); @@ -59,18 +66,20 @@ inline void plr_error(PGM_P const prefix) { void GcodeSuite::M1000() { if (recovery.valid()) { - if (parser.seen('S')) { + if (parser.seen_test('S')) { #if HAS_LCD_MENU ui.goto_screen(menu_job_recovery); - #elif ENABLED(DWIN_CREALITY_LCD) + #elif HAS_DWIN_E3V2_BASIC recovery.dwin_flag = true; + #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) // Temporary fix until it can be better implemented + CrealityDWIN.Popup_Handler(Resume); #elif ENABLED(EXTENSIBLE_UI) ExtUI::onPowerLossResume(); #else SERIAL_ECHO_MSG("Resume requires LCD."); #endif } - else if (parser.seen('C')) { + else if (parser.seen_test('C')) { #if HAS_LCD_MENU lcd_power_loss_recovery_cancel(); #else diff --git a/Marlin/src/gcode/feature/powerloss/M413.cpp b/Marlin/src/gcode/feature/powerloss/M413.cpp index 64573e5dff2a..7c714dad25e8 100644 --- a/Marlin/src/gcode/feature/powerloss/M413.cpp +++ b/Marlin/src/gcode/feature/powerloss/M413.cpp @@ -40,23 +40,26 @@ void GcodeSuite::M413() { if (parser.seen('S')) recovery.enable(parser.value_bool()); - else { - SERIAL_ECHO_START(); - SERIAL_ECHOPGM("Power-loss recovery "); - serialprintln_onoff(recovery.enabled); - } + else + M413_report(); #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) if (parser.seen("RL")) recovery.load(); - if (parser.seen('W')) recovery.save(true); - if (parser.seen('P')) recovery.purge(); - if (parser.seen('D')) recovery.debug(PSTR("M413")); + if (parser.seen_test('W')) recovery.save(true); + if (parser.seen_test('P')) recovery.purge(); + if (parser.seen_test('D')) recovery.debug(PSTR("M413")); #if PIN_EXISTS(POWER_LOSS) - if (parser.seen('O')) recovery._outage(); + if (parser.seen_test('O')) recovery._outage(); #endif - if (parser.seen('E')) serialprintPGM(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n")); - if (parser.seen('V')) serialprintPGM(recovery.valid() ? PSTR("Valid\n") : PSTR("Invalid\n")); + if (parser.seen_test('E')) SERIAL_ECHOPGM_P(recovery.exists() ? PSTR("PLR Exists\n") : PSTR("No PLR\n")); + if (parser.seen_test('V')) SERIAL_ECHOPGM_P(recovery.valid() ? PSTR("Valid\n") : PSTR("Invalid\n")); #endif } +void GcodeSuite::M413_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_POWER_LOSS_RECOVERY)); + SERIAL_ECHOPGM(" M413 S", AS_DIGIT(recovery.enabled), " ; "); + serialprintln_onoff(recovery.enabled); +} + #endif // POWER_LOSS_RECOVERY diff --git a/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp b/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp index 31d076337a44..bca2013e88ba 100644 --- a/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp +++ b/Marlin/src/gcode/feature/prusa_MMU2/M403.cpp @@ -40,7 +40,7 @@ void GcodeSuite::M403() { int8_t index = parser.intval('E', -1), type = parser.intval('F', -1); - if (WITHIN(index, 0, 4) && WITHIN(type, 0, 2)) + if (WITHIN(index, 0, EXTRUDERS - 1) && WITHIN(type, 0, 2)) mmu2.set_filament_type(index, type); else SERIAL_ECHO_MSG("M403 - bad arguments."); diff --git a/Marlin/src/gcode/feature/runout/M412.cpp b/Marlin/src/gcode/feature/runout/M412.cpp index 130f9c83e3ac..9cbfbade669d 100644 --- a/Marlin/src/gcode/feature/runout/M412.cpp +++ b/Marlin/src/gcode/feature/runout/M412.cpp @@ -44,7 +44,7 @@ void GcodeSuite::M412() { #if ENABLED(HOST_ACTION_COMMANDS) if (parser.seen('H')) runout.host_handling = parser.value_bool(); #endif - const bool seenR = parser.seen('R'), seenS = parser.seen('S'); + const bool seenR = parser.seen_test('R'), seenS = parser.seen('S'); if (seenR || seenS) runout.reset(); if (seenS) runout.enabled = parser.value_bool(); #if HAS_FILAMENT_RUNOUT_DISTANCE @@ -54,11 +54,28 @@ void GcodeSuite::M412() { else { SERIAL_ECHO_START(); SERIAL_ECHOPGM("Filament runout "); - serialprintln_onoff(runout.enabled); + serialprint_onoff(runout.enabled); #if HAS_FILAMENT_RUNOUT_DISTANCE - SERIAL_ECHOLNPAIR("Filament runout distance (mm): ", runout.runout_distance()); + SERIAL_ECHOPGM(" ; Distance ", runout.runout_distance(), "mm"); #endif + #if ENABLED(HOST_ACTION_COMMANDS) + SERIAL_ECHOPGM(" ; Host handling "); + serialprint_onoff(runout.host_handling); + #endif + SERIAL_EOL(); } } +void GcodeSuite::M412_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_FILAMENT_RUNOUT_SENSOR)); + SERIAL_ECHOPGM( + " M412 S", runout.enabled + #if HAS_FILAMENT_RUNOUT_DISTANCE + , " D", LINEAR_UNIT(runout.runout_distance()) + #endif + , " ; Sensor " + ); + serialprintln_onoff(runout.enabled); +} + #endif // HAS_FILAMENT_SENSOR diff --git a/Marlin/src/gcode/feature/trinamic/M122.cpp b/Marlin/src/gcode/feature/trinamic/M122.cpp index 46e4365f38c2..fdab54877433 100644 --- a/Marlin/src/gcode/feature/trinamic/M122.cpp +++ b/Marlin/src/gcode/feature/trinamic/M122.cpp @@ -32,29 +32,33 @@ * M122: Debug TMC drivers */ void GcodeSuite::M122() { - xyze_bool_t print_axis = { false, false, false, false }; + xyze_bool_t print_axis = ARRAY_N_1(LOGICAL_AXES, false); + bool print_all = true; - LOOP_XYZE(i) if (parser.seen(axis_codes[i])) { print_axis[i] = true; print_all = false; } + LOOP_LOGICAL_AXES(i) if (parser.seen_test(axis_codes[i])) { print_axis[i] = true; print_all = false; } - if (print_all) LOOP_XYZE(i) print_axis[i] = true; + if (print_all) LOOP_LOGICAL_AXES(i) print_axis[i] = true; if (parser.boolval('I')) restore_stepper_drivers(); #if ENABLED(TMC_DEBUG) #if ENABLED(MONITOR_DRIVER_STATUS) - uint16_t interval = MONITOR_DRIVER_STATUS_INTERVAL_MS; - if (parser.seen('S') && !parser.value_bool()) interval = 0; - if (parser.seenval('P')) NOMORE(interval, parser.value_ushort()); - tmc_set_report_interval(interval); + const bool sflag = parser.seen_test('S'), sval = sflag && parser.value_bool(); + if (sflag && !sval) + tmc_set_report_interval(0); + else if (parser.seenval('P')) + tmc_set_report_interval(_MAX(250, parser.value_ushort())); + else if (sval) + tmc_set_report_interval(MONITOR_DRIVER_STATUS_INTERVAL_MS); #endif - if (parser.seen('V')) - tmc_get_registers(print_axis.x, print_axis.y, print_axis.z, print_axis.e); + if (parser.seen_test('V')) + tmc_get_registers(LOGICAL_AXIS_ELEM(print_axis)); else - tmc_report_all(print_axis.x, print_axis.y, print_axis.z, print_axis.e); + tmc_report_all(LOGICAL_AXIS_ELEM(print_axis)); #endif - test_tmc_connection(print_axis.x, print_axis.y, print_axis.z, print_axis.e); + test_tmc_connection(LOGICAL_AXIS_ELEM(print_axis)); } #endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/gcode/feature/trinamic/M569.cpp b/Marlin/src/gcode/feature/trinamic/M569.cpp index 6b379f119051..05730eabfdd7 100644 --- a/Marlin/src/gcode/feature/trinamic/M569.cpp +++ b/Marlin/src/gcode/feature/trinamic/M569.cpp @@ -32,8 +32,7 @@ template void tmc_say_stealth_status(TMC &st) { st.printLabel(); SERIAL_ECHOPGM(" driver mode:\t"); - serialprintPGM(st.get_stealthChop() ? PSTR("stealthChop") : PSTR("spreadCycle")); - SERIAL_EOL(); + SERIAL_ECHOLNPGM_P(st.get_stealthChop() ? PSTR("stealthChop") : PSTR("spreadCycle")); } template void tmc_set_stealthChop(TMC &st, const bool enable) { @@ -41,132 +40,88 @@ void tmc_set_stealthChop(TMC &st, const bool enable) { st.refresh_stepping_mode(); } -static void set_stealth_status(const bool enable, const int8_t target_extruder) { +static void set_stealth_status(const bool enable, const int8_t target_e_stepper) { #define TMC_SET_STEALTH(Q) tmc_set_stealthChop(stepper##Q, enable) - #if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(X2) \ - || AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Y2) \ - || AXIS_HAS_STEALTHCHOP(Z) || AXIS_HAS_STEALTHCHOP(Z2) \ - || AXIS_HAS_STEALTHCHOP(Z3) || AXIS_HAS_STEALTHCHOP(Z4) + #if X_HAS_STEALTHCHOP || Y_HAS_STEALTHCHOP || Z_HAS_STEALTHCHOP \ + || I_HAS_STEALTHCHOP || J_HAS_STEALTHCHOP || K_HAS_STEALTHCHOP \ + || X2_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP || Z2_HAS_STEALTHCHOP || Z3_HAS_STEALTHCHOP || Z4_HAS_STEALTHCHOP const uint8_t index = parser.byteval('I'); #endif - LOOP_XYZE(i) if (parser.seen(axis_codes[i])) { + LOOP_LOGICAL_AXES(i) if (parser.seen(axis_codes[i])) { switch (i) { case X_AXIS: - #if AXIS_HAS_STEALTHCHOP(X) - if (index == 0) TMC_SET_STEALTH(X); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - if (index == 1) TMC_SET_STEALTH(X2); - #endif + TERN_(X_HAS_STEALTHCHOP, if (index == 0) TMC_SET_STEALTH(X)); + TERN_(X2_HAS_STEALTHCHOP, if (index == 1) TMC_SET_STEALTH(X2)); break; - case Y_AXIS: - #if AXIS_HAS_STEALTHCHOP(Y) - if (index == 0) TMC_SET_STEALTH(Y); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - if (index == 1) TMC_SET_STEALTH(Y2); - #endif - break; - case Z_AXIS: - #if AXIS_HAS_STEALTHCHOP(Z) - if (index == 0) TMC_SET_STEALTH(Z); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - if (index == 1) TMC_SET_STEALTH(Z2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - if (index == 2) TMC_SET_STEALTH(Z3); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - if (index == 3) TMC_SET_STEALTH(Z4); - #endif - break; - case E_AXIS: { - if (target_extruder < 0) return; - switch (target_extruder) { - #if AXIS_HAS_STEALTHCHOP(E0) - case 0: TMC_SET_STEALTH(E0); break; - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - case 1: TMC_SET_STEALTH(E1); break; - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - case 2: TMC_SET_STEALTH(E2); break; - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - case 3: TMC_SET_STEALTH(E3); break; - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - case 4: TMC_SET_STEALTH(E4); break; - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - case 5: TMC_SET_STEALTH(E5); break; - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - case 6: TMC_SET_STEALTH(E6); break; - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - case 7: TMC_SET_STEALTH(E7); break; - #endif - } - } break; + + #if HAS_Y_AXIS + case Y_AXIS: + TERN_(Y_HAS_STEALTHCHOP, if (index == 0) TMC_SET_STEALTH(Y)); + TERN_(Y2_HAS_STEALTHCHOP, if (index == 1) TMC_SET_STEALTH(Y2)); + break; + #endif + + #if HAS_Z_AXIS + case Z_AXIS: + TERN_(Z_HAS_STEALTHCHOP, if (index == 0) TMC_SET_STEALTH(Z)); + TERN_(Z2_HAS_STEALTHCHOP, if (index == 1) TMC_SET_STEALTH(Z2)); + TERN_(Z3_HAS_STEALTHCHOP, if (index == 2) TMC_SET_STEALTH(Z3)); + TERN_(Z4_HAS_STEALTHCHOP, if (index == 3) TMC_SET_STEALTH(Z4)); + break; + #endif + + #if I_HAS_STEALTHCHOP + case I_AXIS: TMC_SET_STEALTH(I); break; + #endif + #if J_HAS_STEALTHCHOP + case J_AXIS: TMC_SET_STEALTH(J); break; + #endif + #if K_HAS_STEALTHCHOP + case K_AXIS: TMC_SET_STEALTH(K); break; + #endif + + #if E_STEPPERS + case E_AXIS: { + if (target_e_stepper < 0) return; + switch (target_e_stepper) { + TERN_(E0_HAS_STEALTHCHOP, case 0: TMC_SET_STEALTH(E0); break;) + TERN_(E1_HAS_STEALTHCHOP, case 1: TMC_SET_STEALTH(E1); break;) + TERN_(E2_HAS_STEALTHCHOP, case 2: TMC_SET_STEALTH(E2); break;) + TERN_(E3_HAS_STEALTHCHOP, case 3: TMC_SET_STEALTH(E3); break;) + TERN_(E4_HAS_STEALTHCHOP, case 4: TMC_SET_STEALTH(E4); break;) + TERN_(E5_HAS_STEALTHCHOP, case 5: TMC_SET_STEALTH(E5); break;) + TERN_(E6_HAS_STEALTHCHOP, case 6: TMC_SET_STEALTH(E6); break;) + TERN_(E7_HAS_STEALTHCHOP, case 7: TMC_SET_STEALTH(E7); break;) + } + } break; + #endif } } } static void say_stealth_status() { #define TMC_SAY_STEALTH_STATUS(Q) tmc_say_stealth_status(stepper##Q) - - #if AXIS_HAS_STEALTHCHOP(X) - TMC_SAY_STEALTH_STATUS(X); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - TMC_SAY_STEALTH_STATUS(X2); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - TMC_SAY_STEALTH_STATUS(Y); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - TMC_SAY_STEALTH_STATUS(Y2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - TMC_SAY_STEALTH_STATUS(Z); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - TMC_SAY_STEALTH_STATUS(Z2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - TMC_SAY_STEALTH_STATUS(Z3); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - TMC_SAY_STEALTH_STATUS(Z4); - #endif - #if AXIS_HAS_STEALTHCHOP(E0) - TMC_SAY_STEALTH_STATUS(E0); - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - TMC_SAY_STEALTH_STATUS(E1); - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - TMC_SAY_STEALTH_STATUS(E2); - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - TMC_SAY_STEALTH_STATUS(E3); - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - TMC_SAY_STEALTH_STATUS(E4); - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - TMC_SAY_STEALTH_STATUS(E5); - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - TMC_SAY_STEALTH_STATUS(E6); - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - TMC_SAY_STEALTH_STATUS(E7); - #endif + OPTCODE( X_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(X)) + OPTCODE(X2_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(X2)) + OPTCODE( Y_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(Y)) + OPTCODE(Y2_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(Y2)) + OPTCODE( Z_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(Z)) + OPTCODE(Z2_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(Z2)) + OPTCODE(Z3_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(Z3)) + OPTCODE(Z4_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(Z4)) + OPTCODE( I_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(I)) + OPTCODE( J_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(J)) + OPTCODE( K_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(K)) + OPTCODE(E0_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(E0)) + OPTCODE(E1_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(E1)) + OPTCODE(E2_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(E2)) + OPTCODE(E3_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(E3)) + OPTCODE(E4_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(E4)) + OPTCODE(E5_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(E5)) + OPTCODE(E6_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(E6)) + OPTCODE(E7_HAS_STEALTHCHOP, TMC_SAY_STEALTH_STATUS(E7)) } /** @@ -178,9 +133,71 @@ static void say_stealth_status() { */ void GcodeSuite::M569() { if (parser.seen('S')) - set_stealth_status(parser.value_bool(), get_target_extruder_from_command()); + set_stealth_status(parser.value_bool(), get_target_e_stepper_from_command(0)); else say_stealth_status(); } +void GcodeSuite::M569_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_DRIVER_STEPPING_MODE)); + + auto say_M569 = [](const bool forReplay, const char * const etc=nullptr, const bool eol=false) { + if (!forReplay) SERIAL_ECHO_START(); + SERIAL_ECHOPGM(" M569 S1"); + if (etc) { + SERIAL_CHAR(' '); + SERIAL_ECHOPGM_P(etc); + } + if (eol) SERIAL_EOL(); + }; + + const bool chop_x = TERN0(X_HAS_STEALTHCHOP, stepperX.get_stored_stealthChop()), + chop_y = TERN0(Y_HAS_STEALTHCHOP, stepperY.get_stored_stealthChop()), + chop_z = TERN0(Z_HAS_STEALTHCHOP, stepperZ.get_stored_stealthChop()), + chop_i = TERN0(I_HAS_STEALTHCHOP, stepperI.get_stored_stealthChop()), + chop_j = TERN0(J_HAS_STEALTHCHOP, stepperJ.get_stored_stealthChop()), + chop_k = TERN0(K_HAS_STEALTHCHOP, stepperK.get_stored_stealthChop()); + + if (chop_x || chop_y || chop_z || chop_i || chop_j || chop_k) { + say_M569(forReplay); + LINEAR_AXIS_CODE( + if (chop_x) SERIAL_ECHOPGM_P(SP_X_STR), + if (chop_y) SERIAL_ECHOPGM_P(SP_Y_STR), + if (chop_z) SERIAL_ECHOPGM_P(SP_Z_STR), + if (chop_i) SERIAL_ECHOPGM_P(SP_I_STR), + if (chop_j) SERIAL_ECHOPGM_P(SP_J_STR), + if (chop_k) SERIAL_ECHOPGM_P(SP_K_STR) + ); + SERIAL_EOL(); + } + + const bool chop_x2 = TERN0(X2_HAS_STEALTHCHOP, stepperX2.get_stored_stealthChop()), + chop_y2 = TERN0(Y2_HAS_STEALTHCHOP, stepperY2.get_stored_stealthChop()), + chop_z2 = TERN0(Z2_HAS_STEALTHCHOP, stepperZ2.get_stored_stealthChop()); + + if (chop_x2 || chop_y2 || chop_z2) { + say_M569(forReplay, PSTR("I1")); + if (chop_x2) SERIAL_ECHOPGM_P(SP_X_STR); + if (chop_y2) SERIAL_ECHOPGM_P(SP_Y_STR); + if (chop_z2) SERIAL_ECHOPGM_P(SP_Z_STR); + SERIAL_EOL(); + } + + if (TERN0(Z3_HAS_STEALTHCHOP, stepperZ3.get_stored_stealthChop())) { say_M569(forReplay, PSTR("I2 Z"), true); } + if (TERN0(Z4_HAS_STEALTHCHOP, stepperZ4.get_stored_stealthChop())) { say_M569(forReplay, PSTR("I3 Z"), true); } + + if (TERN0( I_HAS_STEALTHCHOP, stepperI.get_stored_stealthChop())) { say_M569(forReplay, SP_I_STR, true); } + if (TERN0( J_HAS_STEALTHCHOP, stepperJ.get_stored_stealthChop())) { say_M569(forReplay, SP_J_STR, true); } + if (TERN0( K_HAS_STEALTHCHOP, stepperK.get_stored_stealthChop())) { say_M569(forReplay, SP_K_STR, true); } + + if (TERN0(E0_HAS_STEALTHCHOP, stepperE0.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T0 E"), true); } + if (TERN0(E1_HAS_STEALTHCHOP, stepperE1.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T1 E"), true); } + if (TERN0(E2_HAS_STEALTHCHOP, stepperE2.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T2 E"), true); } + if (TERN0(E3_HAS_STEALTHCHOP, stepperE3.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T3 E"), true); } + if (TERN0(E4_HAS_STEALTHCHOP, stepperE4.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T4 E"), true); } + if (TERN0(E5_HAS_STEALTHCHOP, stepperE5.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T5 E"), true); } + if (TERN0(E6_HAS_STEALTHCHOP, stepperE6.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T6 E"), true); } + if (TERN0(E7_HAS_STEALTHCHOP, stepperE7.get_stored_stealthChop())) { say_M569(forReplay, PSTR("T7 E"), true); } +} + #endif // HAS_STEALTHCHOP diff --git a/Marlin/src/gcode/feature/trinamic/M906.cpp b/Marlin/src/gcode/feature/trinamic/M906.cpp index e834ebd67d95..c3e12a4f92c1 100644 --- a/Marlin/src/gcode/feature/trinamic/M906.cpp +++ b/Marlin/src/gcode/feature/trinamic/M906.cpp @@ -48,11 +48,11 @@ void GcodeSuite::M906() { bool report = true; - #if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3) || AXIS_IS_TMC(Z4) + #if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3) || AXIS_IS_TMC(Z4) || AXIS_IS_TMC(I) || AXIS_IS_TMC(J) || AXIS_IS_TMC(K) const uint8_t index = parser.byteval('I'); #endif - LOOP_XYZE(i) if (uint16_t value = parser.intval(axis_codes[i])) { + LOOP_LOGICAL_AXES(i) if (uint16_t value = parser.intval(axis_codes[i])) { report = false; switch (i) { case X_AXIS: @@ -63,58 +63,77 @@ void GcodeSuite::M906() { if (index == 1) TMC_SET_CURRENT(X2); #endif break; - case Y_AXIS: - #if AXIS_IS_TMC(Y) - if (index == 0) TMC_SET_CURRENT(Y); - #endif - #if AXIS_IS_TMC(Y2) - if (index == 1) TMC_SET_CURRENT(Y2); - #endif - break; - case Z_AXIS: - #if AXIS_IS_TMC(Z) - if (index == 0) TMC_SET_CURRENT(Z); - #endif - #if AXIS_IS_TMC(Z2) - if (index == 1) TMC_SET_CURRENT(Z2); - #endif - #if AXIS_IS_TMC(Z3) - if (index == 2) TMC_SET_CURRENT(Z3); - #endif - #if AXIS_IS_TMC(Z4) - if (index == 3) TMC_SET_CURRENT(Z4); - #endif - break; - case E_AXIS: { - const int8_t target_extruder = get_target_extruder_from_command(); - if (target_extruder < 0) return; - switch (target_extruder) { - #if AXIS_IS_TMC(E0) - case 0: TMC_SET_CURRENT(E0); break; - #endif - #if AXIS_IS_TMC(E1) - case 1: TMC_SET_CURRENT(E1); break; - #endif - #if AXIS_IS_TMC(E2) - case 2: TMC_SET_CURRENT(E2); break; + + #if HAS_Y_AXIS + case Y_AXIS: + #if AXIS_IS_TMC(Y) + if (index == 0) TMC_SET_CURRENT(Y); #endif - #if AXIS_IS_TMC(E3) - case 3: TMC_SET_CURRENT(E3); break; + #if AXIS_IS_TMC(Y2) + if (index == 1) TMC_SET_CURRENT(Y2); #endif - #if AXIS_IS_TMC(E4) - case 4: TMC_SET_CURRENT(E4); break; + break; + #endif + + #if HAS_Z_AXIS + case Z_AXIS: + #if AXIS_IS_TMC(Z) + if (index == 0) TMC_SET_CURRENT(Z); #endif - #if AXIS_IS_TMC(E5) - case 5: TMC_SET_CURRENT(E5); break; + #if AXIS_IS_TMC(Z2) + if (index == 1) TMC_SET_CURRENT(Z2); #endif - #if AXIS_IS_TMC(E6) - case 6: TMC_SET_CURRENT(E6); break; + #if AXIS_IS_TMC(Z3) + if (index == 2) TMC_SET_CURRENT(Z3); #endif - #if AXIS_IS_TMC(E7) - case 7: TMC_SET_CURRENT(E7); break; + #if AXIS_IS_TMC(Z4) + if (index == 3) TMC_SET_CURRENT(Z4); #endif - } - } break; + break; + #endif + + #if AXIS_IS_TMC(I) + case I_AXIS: TMC_SET_CURRENT(I); break; + #endif + #if AXIS_IS_TMC(J) + case J_AXIS: TMC_SET_CURRENT(J); break; + #endif + #if AXIS_IS_TMC(K) + case K_AXIS: TMC_SET_CURRENT(K); break; + #endif + + #if E_STEPPERS + case E_AXIS: { + const int8_t target_e_stepper = get_target_e_stepper_from_command(0); + if (target_e_stepper < 0) return; + switch (target_e_stepper) { + #if AXIS_IS_TMC(E0) + case 0: TMC_SET_CURRENT(E0); break; + #endif + #if AXIS_IS_TMC(E1) + case 1: TMC_SET_CURRENT(E1); break; + #endif + #if AXIS_IS_TMC(E2) + case 2: TMC_SET_CURRENT(E2); break; + #endif + #if AXIS_IS_TMC(E3) + case 3: TMC_SET_CURRENT(E3); break; + #endif + #if AXIS_IS_TMC(E4) + case 4: TMC_SET_CURRENT(E4); break; + #endif + #if AXIS_IS_TMC(E5) + case 5: TMC_SET_CURRENT(E5); break; + #endif + #if AXIS_IS_TMC(E6) + case 6: TMC_SET_CURRENT(E6); break; + #endif + #if AXIS_IS_TMC(E7) + case 7: TMC_SET_CURRENT(E7); break; + #endif + } + } break; + #endif } } @@ -143,6 +162,15 @@ void GcodeSuite::M906() { #if AXIS_IS_TMC(Z4) TMC_SAY_CURRENT(Z4); #endif + #if AXIS_IS_TMC(I) + TMC_SAY_CURRENT(I); + #endif + #if AXIS_IS_TMC(J) + TMC_SAY_CURRENT(J); + #endif + #if AXIS_IS_TMC(K) + TMC_SAY_CURRENT(K); + #endif #if AXIS_IS_TMC(E0) TMC_SAY_CURRENT(E0); #endif @@ -170,4 +198,95 @@ void GcodeSuite::M906() { } } +void GcodeSuite::M906_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_STEPPER_DRIVER_CURRENT)); + + auto say_M906 = [](const bool forReplay) { + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M906"); + }; + + #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z) \ + || AXIS_IS_TMC(I) || AXIS_IS_TMC(J) || AXIS_IS_TMC(K) + say_M906(forReplay); + #if AXIS_IS_TMC(X) + SERIAL_ECHOPGM_P(SP_X_STR, stepperX.getMilliamps()); + #endif + #if AXIS_IS_TMC(Y) + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.getMilliamps()); + #endif + #if AXIS_IS_TMC(Z) + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.getMilliamps()); + #endif + #if AXIS_IS_TMC(I) + SERIAL_ECHOPGM_P(SP_I_STR, stepperI.getMilliamps()); + #endif + #if AXIS_IS_TMC(J) + SERIAL_ECHOPGM_P(SP_J_STR, stepperJ.getMilliamps()); + #endif + #if AXIS_IS_TMC(K) + SERIAL_ECHOPGM_P(SP_K_STR, stepperK.getMilliamps()); + #endif + SERIAL_EOL(); + #endif + + #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) + say_M906(forReplay); + SERIAL_ECHOPGM(" I1"); + #if AXIS_IS_TMC(X2) + SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.getMilliamps()); + #endif + #if AXIS_IS_TMC(Y2) + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.getMilliamps()); + #endif + #if AXIS_IS_TMC(Z2) + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.getMilliamps()); + #endif + SERIAL_EOL(); + #endif + + #if AXIS_IS_TMC(Z3) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.getMilliamps()); + #endif + #if AXIS_IS_TMC(Z4) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.getMilliamps()); + #endif + + #if AXIS_IS_TMC(E0) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" T0 E", stepperE0.getMilliamps()); + #endif + #if AXIS_IS_TMC(E1) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" T1 E", stepperE1.getMilliamps()); + #endif + #if AXIS_IS_TMC(E2) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" T2 E", stepperE2.getMilliamps()); + #endif + #if AXIS_IS_TMC(E3) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" T3 E", stepperE3.getMilliamps()); + #endif + #if AXIS_IS_TMC(E4) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" T4 E", stepperE4.getMilliamps()); + #endif + #if AXIS_IS_TMC(E5) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" T5 E", stepperE5.getMilliamps()); + #endif + #if AXIS_IS_TMC(E6) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" T6 E", stepperE6.getMilliamps()); + #endif + #if AXIS_IS_TMC(E7) + say_M906(forReplay); + SERIAL_ECHOLNPGM(" T7 E", stepperE7.getMilliamps()); + #endif + SERIAL_EOL(); +} + #endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp index 8c840db5bf9c..f15343484a93 100644 --- a/Marlin/src/gcode/feature/trinamic/M911-M914.cpp +++ b/Marlin/src/gcode/feature/trinamic/M911-M914.cpp @@ -35,12 +35,30 @@ #define M91x_USE(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) || AXIS_DRIVER_TYPE(ST, TMC2160) || AXIS_DRIVER_TYPE(ST, TMC2208) || AXIS_DRIVER_TYPE(ST, TMC2209) || AXIS_DRIVER_TYPE(ST, TMC2660) || AXIS_DRIVER_TYPE(ST, TMC5130) || AXIS_DRIVER_TYPE(ST, TMC5160)) #define M91x_USE_E(N) (E_STEPPERS > N && M91x_USE(E##N)) - #define M91x_SOME_X (M91x_USE(X) || M91x_USE(X2)) - #define M91x_SOME_Y (M91x_USE(Y) || M91x_USE(Y2)) - #define M91x_SOME_Z (M91x_USE(Z) || M91x_USE(Z2) || M91x_USE(Z3) || M91x_USE(Z4)) - #define M91x_SOME_E (M91x_USE_E(0) || M91x_USE_E(1) || M91x_USE_E(2) || M91x_USE_E(3) || M91x_USE_E(4) || M91x_USE_E(5) || M91x_USE_E(6) || M91x_USE_E(7)) + #if M91x_USE(X) || M91x_USE(X2) + #define M91x_SOME_X 1 + #endif + #if LINEAR_AXES >= 2 && (M91x_USE(Y) || M91x_USE(Y2)) + #define M91x_SOME_Y 1 + #endif + #if HAS_Z_AXIS && (M91x_USE(Z) || M91x_USE(Z2) || M91x_USE(Z3) || M91x_USE(Z4)) + #define M91x_SOME_Z 1 + #endif + #if LINEAR_AXES >= 4 && M91x_USE(I) + #define M91x_USE_I 1 + #endif + #if LINEAR_AXES >= 5 && M91x_USE(J) + #define M91x_USE_J 1 + #endif + #if LINEAR_AXES >= 6 && M91x_USE(K) + #define M91x_USE_K 1 + #endif - #if !M91x_SOME_X && !M91x_SOME_Y && !M91x_SOME_Z && !M91x_SOME_E + #if M91x_USE_E(0) || M91x_USE_E(1) || M91x_USE_E(2) || M91x_USE_E(3) || M91x_USE_E(4) || M91x_USE_E(5) || M91x_USE_E(6) || M91x_USE_E(7) + #define M91x_SOME_E 1 + #endif + + #if !M91x_SOME_X && !M91x_SOME_Y && !M91x_SOME_Z && !M91x_USE_I && !M91x_USE_J && !M91x_USE_K && !M91x_SOME_E #error "MONITOR_DRIVER_STATUS requires at least one TMC2130, 2160, 2208, 2209, 2660, 5130, or 5160." #endif @@ -73,6 +91,9 @@ #if M91x_USE(Z4) tmc_report_otpw(stepperZ4); #endif + TERN_(M91x_USE_I, tmc_report_otpw(stepperI)); + TERN_(M91x_USE_J, tmc_report_otpw(stepperJ)); + TERN_(M91x_USE_K, tmc_report_otpw(stepperK)); #if M91x_USE_E(0) tmc_report_otpw(stepperE0); #endif @@ -112,31 +133,15 @@ * M912 E1 ; clear E1 only */ void GcodeSuite::M912() { - #if M91x_SOME_X - const bool hasX = parser.seen(axis_codes.x); - #else - constexpr bool hasX = false; - #endif + const bool hasX = TERN0(M91x_SOME_X, parser.seen(axis_codes.x)), + hasY = TERN0(M91x_SOME_Y, parser.seen(axis_codes.y)), + hasZ = TERN0(M91x_SOME_Z, parser.seen(axis_codes.z)), + hasI = TERN0(M91x_USE_I, parser.seen(axis_codes.i)), + hasJ = TERN0(M91x_USE_J, parser.seen(axis_codes.j)), + hasK = TERN0(M91x_USE_K, parser.seen(axis_codes.k)), + hasE = TERN0(M91x_SOME_E, parser.seen(axis_codes.e)); - #if M91x_SOME_Y - const bool hasY = parser.seen(axis_codes.y); - #else - constexpr bool hasY = false; - #endif - - #if M91x_SOME_Z - const bool hasZ = parser.seen(axis_codes.z); - #else - constexpr bool hasZ = false; - #endif - - #if M91x_SOME_E - const bool hasE = parser.seen(axis_codes.e); - #else - constexpr bool hasE = false; - #endif - - const bool hasNone = !hasX && !hasY && !hasZ && !hasE; + const bool hasNone = !hasE && !hasX && !hasY && !hasZ && !hasI && !hasJ && !hasK; #if M91x_SOME_X const int8_t xval = int8_t(parser.byteval(axis_codes.x, 0xFF)); @@ -174,6 +179,19 @@ #endif #endif + #if M91x_USE_I + const int8_t ival = int8_t(parser.byteval(axis_codes.i, 0xFF)); + if (hasNone || ival == 1 || (hasI && ival < 0)) tmc_clear_otpw(stepperI); + #endif + #if M91x_USE_J + const int8_t jval = int8_t(parser.byteval(axis_codes.j, 0xFF)); + if (hasNone || jval == 1 || (hasJ && jval < 0)) tmc_clear_otpw(stepperJ); + #endif + #if M91x_USE_K + const int8_t kval = int8_t(parser.byteval(axis_codes.k, 0xFF)); + if (hasNone || kval == 1 || (hasK && kval < 0)) tmc_clear_otpw(stepperK); + #endif + #if M91x_SOME_E const int8_t eval = int8_t(parser.byteval(axis_codes.e, 0xFF)); #if M91x_USE_E(0) @@ -209,6 +227,7 @@ * M913: Set HYBRID_THRESHOLD speed. */ #if ENABLED(HYBRID_THRESHOLD) + void GcodeSuite::M913() { #define TMC_SAY_PWMTHRS(A,Q) tmc_print_pwmthrs(stepper##Q) #define TMC_SET_PWMTHRS(A,Q) stepper##Q.set_pwm_thrs(value) @@ -216,139 +235,188 @@ #define TMC_SET_PWMTHRS_E(E) stepperE##E.set_pwm_thrs(value) bool report = true; - #if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3) || AXIS_IS_TMC(Z4) + #if AXIS_IS_TMC(X) || AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z) || AXIS_IS_TMC(Z2) || AXIS_IS_TMC(Z3) || AXIS_IS_TMC(Z4) || AXIS_IS_TMC(I) || AXIS_IS_TMC(J) || AXIS_IS_TMC(K) const uint8_t index = parser.byteval('I'); #endif - LOOP_XYZE(i) if (int32_t value = parser.longval(axis_codes[i])) { + LOOP_LOGICAL_AXES(i) if (int32_t value = parser.longval(axis_codes[i])) { report = false; switch (i) { case X_AXIS: - #if AXIS_HAS_STEALTHCHOP(X) - if (index < 2) TMC_SET_PWMTHRS(X,X); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - if (!(index & 1)) TMC_SET_PWMTHRS(X,X2); - #endif + TERN_(X_HAS_STEALTHCHOP, if (index < 2) TMC_SET_PWMTHRS(X,X)); + TERN_(X2_HAS_STEALTHCHOP, if (!(index & 1)) TMC_SET_PWMTHRS(X,X2)); break; case Y_AXIS: - #if AXIS_HAS_STEALTHCHOP(Y) - if (index < 2) TMC_SET_PWMTHRS(Y,Y); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - if (!(index & 1)) TMC_SET_PWMTHRS(Y,Y2); - #endif + TERN_(Y_HAS_STEALTHCHOP, if (index < 2) TMC_SET_PWMTHRS(Y,Y)); + TERN_(Y2_HAS_STEALTHCHOP, if (!(index & 1)) TMC_SET_PWMTHRS(Y,Y2)); break; + + #if I_HAS_STEALTHCHOP + case I_AXIS: TMC_SET_PWMTHRS(I,I); break; + #endif + #if J_HAS_STEALTHCHOP + case J_AXIS: TMC_SET_PWMTHRS(J,J); break; + #endif + #if K_HAS_STEALTHCHOP + case K_AXIS: TMC_SET_PWMTHRS(K,K); break; + #endif + case Z_AXIS: - #if AXIS_HAS_STEALTHCHOP(Z) - if (index < 2) TMC_SET_PWMTHRS(Z,Z); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - if (index == 0 || index == 2) TMC_SET_PWMTHRS(Z,Z2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - if (index == 0 || index == 3) TMC_SET_PWMTHRS(Z,Z3); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - if (index == 0 || index == 4) TMC_SET_PWMTHRS(Z,Z4); - #endif + TERN_(Z_HAS_STEALTHCHOP, if (index < 2) TMC_SET_PWMTHRS(Z,Z)); + TERN_(Z2_HAS_STEALTHCHOP, if (index == 0 || index == 2) TMC_SET_PWMTHRS(Z,Z2)); + TERN_(Z3_HAS_STEALTHCHOP, if (index == 0 || index == 3) TMC_SET_PWMTHRS(Z,Z3)); + TERN_(Z4_HAS_STEALTHCHOP, if (index == 0 || index == 4) TMC_SET_PWMTHRS(Z,Z4)); break; - case E_AXIS: { - #if E_STEPPERS - const int8_t target_extruder = get_target_extruder_from_command(); - if (target_extruder < 0) return; - switch (target_extruder) { - #if AXIS_HAS_STEALTHCHOP(E0) - case 0: TMC_SET_PWMTHRS_E(0); break; - #endif - #if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1) - case 1: TMC_SET_PWMTHRS_E(1); break; - #endif - #if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2) - case 2: TMC_SET_PWMTHRS_E(2); break; - #endif - #if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3) - case 3: TMC_SET_PWMTHRS_E(3); break; - #endif - #if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4) - case 4: TMC_SET_PWMTHRS_E(4); break; - #endif - #if E_STEPPERS > 5 && AXIS_HAS_STEALTHCHOP(E5) - case 5: TMC_SET_PWMTHRS_E(5); break; - #endif - #if E_STEPPERS > 6 && AXIS_HAS_STEALTHCHOP(E6) - case 6: TMC_SET_PWMTHRS_E(6); break; - #endif - #if E_STEPPERS > 7 && AXIS_HAS_STEALTHCHOP(E7) - case 7: TMC_SET_PWMTHRS_E(7); break; - #endif + #if E_STEPPERS + case E_AXIS: { + const int8_t target_e_stepper = get_target_e_stepper_from_command(0); + if (target_e_stepper < 0) return; + switch (target_e_stepper) { + TERN_(E0_HAS_STEALTHCHOP, case 0: TMC_SET_PWMTHRS_E(0); break;) + TERN_(E1_HAS_STEALTHCHOP, case 1: TMC_SET_PWMTHRS_E(1); break;) + TERN_(E2_HAS_STEALTHCHOP, case 2: TMC_SET_PWMTHRS_E(2); break;) + TERN_(E3_HAS_STEALTHCHOP, case 3: TMC_SET_PWMTHRS_E(3); break;) + TERN_(E4_HAS_STEALTHCHOP, case 4: TMC_SET_PWMTHRS_E(4); break;) + TERN_(E5_HAS_STEALTHCHOP, case 5: TMC_SET_PWMTHRS_E(5); break;) + TERN_(E6_HAS_STEALTHCHOP, case 6: TMC_SET_PWMTHRS_E(6); break;) + TERN_(E7_HAS_STEALTHCHOP, case 7: TMC_SET_PWMTHRS_E(7); break;) } - #endif // E_STEPPERS - } break; + } break; + #endif // E_STEPPERS } } if (report) { - #if AXIS_HAS_STEALTHCHOP(X) - TMC_SAY_PWMTHRS(X,X); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - TMC_SAY_PWMTHRS(X,X2); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - TMC_SAY_PWMTHRS(Y,Y); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - TMC_SAY_PWMTHRS(Y,Y2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - TMC_SAY_PWMTHRS(Z,Z); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - TMC_SAY_PWMTHRS(Z,Z2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - TMC_SAY_PWMTHRS(Z,Z3); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - TMC_SAY_PWMTHRS(Z,Z4); - #endif - #if E_STEPPERS && AXIS_HAS_STEALTHCHOP(E0) - TMC_SAY_PWMTHRS_E(0); - #endif - #if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1) - TMC_SAY_PWMTHRS_E(1); - #endif - #if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2) - TMC_SAY_PWMTHRS_E(2); + TERN_( X_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(X,X)); + TERN_(X2_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(X,X2)); + TERN_( Y_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(Y,Y)); + TERN_(Y2_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(Y,Y2)); + TERN_( Z_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(Z,Z)); + TERN_(Z2_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(Z,Z2)); + TERN_(Z3_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(Z,Z3)); + TERN_(Z4_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(Z,Z4)); + + TERN_( I_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(I,I)); + TERN_( J_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(J,J)); + TERN_( K_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS(K,K)); + + TERN_(E0_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS_E(0)); + TERN_(E1_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS_E(1)); + TERN_(E2_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS_E(2)); + TERN_(E3_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS_E(3)); + TERN_(E4_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS_E(4)); + TERN_(E5_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS_E(5)); + TERN_(E6_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS_E(6)); + TERN_(E7_HAS_STEALTHCHOP, TMC_SAY_PWMTHRS_E(7)); + } + } + + void GcodeSuite::M913_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_HYBRID_THRESHOLD)); + + auto say_M913 = [](const bool forReplay) { + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M913"); + }; + + #if X_HAS_STEALTHCHOP || Y_HAS_STEALTHCHOP || Z_HAS_STEALTHCHOP + say_M913(forReplay); + #if X_HAS_STEALTHCHOP + SERIAL_ECHOPGM_P(SP_X_STR, stepperX.get_pwm_thrs()); #endif - #if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3) - TMC_SAY_PWMTHRS_E(3); + #if Y_HAS_STEALTHCHOP + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.get_pwm_thrs()); #endif - #if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4) - TMC_SAY_PWMTHRS_E(4); + #if Z_HAS_STEALTHCHOP + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.get_pwm_thrs()); #endif - #if E_STEPPERS > 5 && AXIS_HAS_STEALTHCHOP(E5) - TMC_SAY_PWMTHRS_E(5); + SERIAL_EOL(); + #endif + + #if X2_HAS_STEALTHCHOP || Y2_HAS_STEALTHCHOP || Z2_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOPGM(" I1"); + #if X2_HAS_STEALTHCHOP + SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.get_pwm_thrs()); #endif - #if E_STEPPERS > 6 && AXIS_HAS_STEALTHCHOP(E6) - TMC_SAY_PWMTHRS_E(6); + #if Y2_HAS_STEALTHCHOP + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.get_pwm_thrs()); #endif - #if E_STEPPERS > 7 && AXIS_HAS_STEALTHCHOP(E7) - TMC_SAY_PWMTHRS_E(7); + #if Z2_HAS_STEALTHCHOP + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.get_pwm_thrs()); #endif - } + SERIAL_EOL(); + #endif + + #if Z3_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.get_pwm_thrs()); + #endif + + #if Z4_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.get_pwm_thrs()); + #endif + + #if I_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.get_pwm_thrs()); + #endif + #if J_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.get_pwm_thrs()); + #endif + #if K_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.get_pwm_thrs()); + #endif + + #if E0_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" T0 E", stepperE0.get_pwm_thrs()); + #endif + #if E1_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" T1 E", stepperE1.get_pwm_thrs()); + #endif + #if E2_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" T2 E", stepperE2.get_pwm_thrs()); + #endif + #if E3_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" T3 E", stepperE3.get_pwm_thrs()); + #endif + #if E4_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" T4 E", stepperE4.get_pwm_thrs()); + #endif + #if E5_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" T5 E", stepperE5.get_pwm_thrs()); + #endif + #if E6_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" T6 E", stepperE6.get_pwm_thrs()); + #endif + #if E7_HAS_STEALTHCHOP + say_M913(forReplay); + SERIAL_ECHOLNPGM(" T7 E", stepperE7.get_pwm_thrs()); + #endif + SERIAL_EOL(); } + #endif // HYBRID_THRESHOLD /** * M914: Set StallGuard sensitivity. */ #if USE_SENSORLESS + void GcodeSuite::M914() { bool report = true; const uint8_t index = parser.byteval('I'); - LOOP_XYZ(i) if (parser.seen(XYZ_CHAR(i))) { + LOOP_LINEAR_AXES(i) if (parser.seen(AXIS_CHAR(i))) { const int16_t value = parser.value_int(); report = false; switch (i) { @@ -388,6 +456,15 @@ #endif break; #endif + #if I_SENSORLESS && AXIS_HAS_STALLGUARD(I) + case I_AXIS: stepperI.homing_threshold(value); break; + #endif + #if J_SENSORLESS && AXIS_HAS_STALLGUARD(J) + case J_AXIS: stepperJ.homing_threshold(value); break; + #endif + #if K_SENSORLESS && AXIS_HAS_STALLGUARD(K) + case K_AXIS: stepperK.homing_threshold(value); break; + #endif } } @@ -422,8 +499,79 @@ tmc_print_sgt(stepperZ4); #endif #endif + #if I_SENSORLESS && AXIS_HAS_STALLGUARD(I) + tmc_print_sgt(stepperI); + #endif + #if J_SENSORLESS && AXIS_HAS_STALLGUARD(J) + tmc_print_sgt(stepperJ); + #endif + #if K_SENSORLESS && AXIS_HAS_STALLGUARD(K) + tmc_print_sgt(stepperK); + #endif } } + + void GcodeSuite::M914_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_STALLGUARD_THRESHOLD)); + + auto say_M914 = [](const bool forReplay) { + report_echo_start(forReplay); + SERIAL_ECHOPGM(" M914"); + }; + + #if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS + say_M914(forReplay); + #if X_SENSORLESS + SERIAL_ECHOPGM_P(SP_X_STR, stepperX.homing_threshold()); + #endif + #if Y_SENSORLESS + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY.homing_threshold()); + #endif + #if Z_SENSORLESS + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ.homing_threshold()); + #endif + SERIAL_EOL(); + #endif + + #if X2_SENSORLESS || Y2_SENSORLESS || Z2_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOPGM(" I1"); + #if X2_SENSORLESS + SERIAL_ECHOPGM_P(SP_X_STR, stepperX2.homing_threshold()); + #endif + #if Y2_SENSORLESS + SERIAL_ECHOPGM_P(SP_Y_STR, stepperY2.homing_threshold()); + #endif + #if Z2_SENSORLESS + SERIAL_ECHOPGM_P(SP_Z_STR, stepperZ2.homing_threshold()); + #endif + SERIAL_EOL(); + #endif + + #if Z3_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPGM(" I2 Z", stepperZ3.homing_threshold()); + #endif + + #if Z4_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPGM(" I3 Z", stepperZ4.homing_threshold()); + #endif + + #if I_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPGM_P(SP_I_STR, stepperI.homing_threshold()); + #endif + #if J_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPGM_P(SP_J_STR, stepperJ.homing_threshold()); + #endif + #if K_SENSORLESS + say_M914(forReplay); + SERIAL_ECHOLNPGM_P(SP_K_STR, stepperK.homing_threshold()); + #endif + } + #endif // USE_SENSORLESS #endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index f9173188dcde..126ceadb3b9a 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -57,6 +57,10 @@ GcodeSuite gcode; #include "../feature/spindle_laser.h" #endif +#if ENABLED(FLOWMETER_SAFETY) + #include "../feature/cooler.h" +#endif + #if ENABLED(PASSWORD_FEATURE) #include "../feature/password/password.h" #endif @@ -70,11 +74,14 @@ millis_t GcodeSuite::previous_move_ms = 0, // Relative motion mode for each logical axis static constexpr xyze_bool_t ar_init = AXIS_RELATIVE_MODES; -uint8_t GcodeSuite::axis_relative = ( - (ar_init.x ? _BV(REL_X) : 0) - | (ar_init.y ? _BV(REL_Y) : 0) - | (ar_init.z ? _BV(REL_Z) : 0) - | (ar_init.e ? _BV(REL_E) : 0) +axis_bits_t GcodeSuite::axis_relative = 0 LOGICAL_AXIS_GANG( + | (ar_init.e << REL_E), + | (ar_init.x << REL_X), + | (ar_init.y << REL_Y), + | (ar_init.z << REL_Z), + | (ar_init.i << REL_I), + | (ar_init.j << REL_J), + | (ar_init.k << REL_K) ); #if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE) @@ -95,6 +102,24 @@ uint8_t GcodeSuite::axis_relative = ( xyz_pos_t GcodeSuite::coordinate_system[MAX_COORDINATE_SYSTEMS]; #endif +void GcodeSuite::report_echo_start(const bool forReplay) { if (!forReplay) SERIAL_ECHO_START(); } +void GcodeSuite::report_heading(const bool forReplay, PGM_P const pstr, const bool eol/*=true*/) { + if (forReplay) return; + if (pstr) { + SERIAL_ECHO_START(); + SERIAL_ECHOPGM("; "); + SERIAL_ECHOPGM_P(pstr); + } + if (eol) { SERIAL_CHAR(':'); SERIAL_EOL(); } +} + +void GcodeSuite::say_units() { + SERIAL_ECHOLNPGM_P( + TERN_(INCH_MODE_SUPPORT, parser.linear_unit_factor != 1.0 ? PSTR(" (in)") :) + PSTR(" (mm)") + ); +} + /** * Get the target extruder from the T parameter or the active_extruder * Return -1 if the T parameter is out of range @@ -105,18 +130,19 @@ int8_t GcodeSuite::get_target_extruder_from_command() { if (e < EXTRUDERS) return e; SERIAL_ECHO_START(); SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum); - SERIAL_ECHOLNPAIR(" " STR_INVALID_EXTRUDER " ", int(e)); + SERIAL_ECHOLNPGM(" " STR_INVALID_EXTRUDER " ", e); return -1; } return active_extruder; } /** - * Get the target e stepper from the T parameter - * Return -1 if the T parameter is out of range or unspecified + * Get the target E stepper from the 'T' parameter. + * If there is no 'T' parameter then dval will be substituted. + * Returns -1 if the resulting E stepper index is out of range. */ -int8_t GcodeSuite::get_target_e_stepper_from_command() { - const int8_t e = parser.intval('T', -1); +int8_t GcodeSuite::get_target_e_stepper_from_command(const int8_t dval/*=-1*/) { + const int8_t e = parser.intval('T', dval); if (WITHIN(e, 0, E_STEPPERS - 1)) return e; SERIAL_ECHO_START(); @@ -124,19 +150,19 @@ int8_t GcodeSuite::get_target_e_stepper_from_command() { if (e == -1) SERIAL_ECHOLNPGM(" " STR_E_STEPPER_NOT_SPECIFIED); else - SERIAL_ECHOLNPAIR(" " STR_INVALID_E_STEPPER " ", int(e)); + SERIAL_ECHOLNPGM(" " STR_INVALID_E_STEPPER " ", e); return -1; } /** - * Set XYZE destination and feedrate from the current GCode command + * Set XYZIJKE destination and feedrate from the current GCode command * * - Set destination from included axis codes * - Set to current for missing axis codes * - Set the feedrate, if included */ void GcodeSuite::get_destination_from_command() { - xyze_bool_t seen = { false, false, false, false }; + xyze_bool_t seen{false}; #if ENABLED(CANCEL_OBJECTS) const bool &skip_move = cancelable.skipping; @@ -145,8 +171,8 @@ void GcodeSuite::get_destination_from_command() { #endif // Get new XYZ position, whether absolute or relative - LOOP_XYZ(i) { - if ( (seen[i] = parser.seenval(XYZ_CHAR(i))) ) { + LOOP_LINEAR_AXES(i) { + if ( (seen[i] = parser.seenval(AXIS_CHAR(i))) ) { const float v = parser.value_axis_units((AxisEnum)i); if (skip_move) destination[i] = current_position[i]; @@ -157,13 +183,15 @@ void GcodeSuite::get_destination_from_command() { destination[i] = current_position[i]; } - // Get new E position, whether absolute or relative - if ( (seen.e = parser.seenval('E')) ) { - const float v = parser.value_axis_units(E_AXIS); - destination.e = axis_is_relative(E_AXIS) ? current_position.e + v : v; - } - else - destination.e = current_position.e; + #if HAS_EXTRUDERS + // Get new E position, whether absolute or relative + if ( (seen.e = parser.seenval('E')) ) { + const float v = parser.value_axis_units(E_AXIS); + destination.e = axis_is_relative(E_AXIS) ? current_position.e + v : v; + } + else + destination.e = current_position.e; + #endif #if ENABLED(POWER_LOSS_RECOVERY) && !PIN_EXISTS(POWER_LOSS) // Only update power loss recovery on moves with E @@ -171,7 +199,7 @@ void GcodeSuite::get_destination_from_command() { recovery.save(); #endif - if (parser.linearval('F') > 0) + if (parser.floatval('F') > 0) feedrate_mm_s = parser.value_feedrate(); #if ENABLED(PRINTCOUNTER) @@ -188,7 +216,7 @@ void GcodeSuite::get_destination_from_command() { // Set the laser power in the planner to configure this move if (parser.seen('S')) { const float spwr = parser.value_float(); - cutter.inline_power(TERN(SPINDLE_LASER_PWM, cutter.power_to_range(cutter_power_t(round(spwr))), spwr > 0 ? 255 : 0)); + cutter.inline_power(TERN(SPINDLE_LASER_USE_PWM, cutter.power_to_range(cutter_power_t(round(spwr))), spwr > 0 ? 255 : 0)); } else if (ENABLED(LASER_MOVE_G0_OFF) && parser.codenum == 0) // G0 cutter.set_inline_enabled(false); @@ -207,7 +235,7 @@ void GcodeSuite::dwell(millis_t time) { * When G29_RETRY_AND_RECOVER is enabled, call G29() in * a loop with recovery and retry handling. */ -#if BOTH(HAS_LEVELING, G29_RETRY_AND_RECOVER) +#if ENABLED(G29_RETRY_AND_RECOVER) void GcodeSuite::event_probe_recover() { TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), DISMISS_STR)); @@ -219,6 +247,10 @@ void GcodeSuite::dwell(millis_t time) { #endif } + #if ENABLED(G29_HALT_ON_FAILURE) + #include "../lcd/marlinui.h" + #endif + void GcodeSuite::event_probe_failure() { #ifdef ACTION_ON_G29_FAILURE host_action(PSTR(ACTION_ON_G29_FAILURE)); @@ -258,14 +290,7 @@ void GcodeSuite::dwell(millis_t time) { #endif } -#endif // HAS_LEVELING && G29_RETRY_AND_RECOVER - -// -// Placeholders for non-migrated codes -// -#if ENABLED(M100_FREE_MEMORY_WATCHER) - extern void M100_dump_routine(PGM_P const title, const char * const start, const char * const end); -#endif +#endif // G29_RETRY_AND_RECOVER /** * Process the parsed command and dispatch it to its handler @@ -285,8 +310,17 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { } #endif - // Handle a known G, M, or T + #if ENABLED(FLOWMETER_SAFETY) + if (cooler.flowfault) { + SERIAL_ECHO_MSG(STR_FLOWMETER_FAULT); + return; + } + #endif + + // Handle a known command or reply "unknown command" + switch (parser.command_letter) { + case 'G': switch (parser.codenum) { case 0: case 1: // G0: Fast Move, G1: Linear Move @@ -371,6 +405,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { break; #endif + #if HAS_MESH + case 42: G42(); break; // G42: Coordinated move to a mesh point + #endif + #if ENABLED(CNC_COORDINATE_SYSTEMS) case 53: G53(); break; // G53: (prefix) Apply native workspace case 54: G54(); break; // G54: Switch to Workspace 1 @@ -399,10 +437,6 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 92: G92(); break; // G92: Set current axis position(s) - #if HAS_MESH - case 42: G42(); break; // G42: Coordinated move to a mesh point - #endif - #if ENABLED(CALIBRATION_GCODE) case 425: G425(); break; // G425: Perform calibration with calibration cube #endif @@ -428,14 +462,21 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 5: M5(); break; // M5: Turn OFF Laser | Spindle #endif - #if ENABLED(COOLANT_CONTROL) - #if ENABLED(COOLANT_MIST) - case 7: M7(); break; // M7: Mist coolant ON - #endif - #if ENABLED(COOLANT_FLOOD) - case 8: M8(); break; // M8: Flood coolant ON - #endif - case 9: M9(); break; // M9: Coolant OFF + #if ENABLED(COOLANT_MIST) + case 7: M7(); break; // M7: Coolant Mist ON + #endif + + #if EITHER(AIR_ASSIST, COOLANT_FLOOD) + case 8: M8(); break; // M8: Air Assist / Coolant Flood ON + #endif + + #if EITHER(AIR_ASSIST, COOLANT_CONTROL) + case 9: M9(); break; // M9: Air Assist / Coolant OFF + #endif + + #if ENABLED(AIR_EVACUATION) + case 10: M10(); break; // M10: Vacuum or Blower motor ON + case 11: M11(); break; // M11: Vacuum or Blower motor OFF #endif #if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) @@ -506,7 +547,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 100: M100(); break; // M100: Free Memory Report #endif - #if EXTRUDERS + #if HAS_EXTRUDERS case 104: M104(); break; // M104: Set hot end temperature case 109: M109(); break; // M109: Wait for hotend temperature to reach target #endif @@ -546,6 +587,15 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 191: M191(); break; // M191: Wait for chamber temperature to reach target #endif + #if HAS_COOLER + case 143: M143(); break; // M143: Set cooler temperature + case 193: M193(); break; // M193: Wait for cooler temperature to reach target + #endif + + #if ENABLED(AUTO_REPORT_POSITION) + case 154: M154(); break; // M154: Set position auto-report interval + #endif + #if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR) case 155: M155(); break; // M155: Set temperature auto-report interval #endif @@ -573,14 +623,18 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #endif case 81: M81(); break; // M81: Turn off Power, including Power Supply, if possible - case 82: M82(); break; // M82: Set E axis normal mode (same as other axes) - case 83: M83(); break; // M83: Set E axis relative mode + #if HAS_EXTRUDERS + case 82: M82(); break; // M82: Set E axis normal mode (same as other axes) + case 83: M83(); break; // M83: Set E axis relative mode + #endif case 18: case 84: M18_M84(); break; // M18/M84: Disable Steppers / Set Timeout case 85: M85(); break; // M85: Set inactivity stepper shutdown timeout case 92: M92(); break; // M92: Set the steps-per-unit for one or more axes case 114: M114(); break; // M114: Report current position case 115: M115(); break; // M115: Report capabilities - case 117: M117(); break; // M117: Set LCD message text, if possible + + case 117: TERN_(HAS_STATUS_MESSAGE, M117()); break; // M117: Set LCD message text, if possible + case 118: M118(); break; // M118: Display a message in the host console case 119: M119(); break; // M119: Report endstop states case 120: M120(); break; // M120: Enable endstops @@ -651,7 +705,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 220: M220(); break; // M220: Set Feedrate Percentage: S ("FR" on your LCD) - #if EXTRUDERS + #if HAS_EXTRUDERS case 221: M221(); break; // M221: Set Flow Percentage #endif @@ -664,6 +718,9 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { #if ENABLED(EDITABLE_SERVO_ANGLES) case 281: M281(); break; // M281: Set servo angles #endif + #if ENABLED(SERVO_DETACH_GCODE) + case 282: M282(); break; // M282: Detach servo + #endif #endif #if ENABLED(BABYSTEPPING) @@ -682,6 +739,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 304: M304(); break; // M304: Set bed PID parameters #endif + #if ENABLED(PIDTEMPCHAMBER) + case 309: M309(); break; // M309: Set chamber PID parameters + #endif + #if ENABLED(PHOTO_GCODE) case 240: M240(); break; // M240: Trigger a camera #endif @@ -690,6 +751,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 250: M250(); break; // M250: Set LCD contrast #endif + #if HAS_LCD_BRIGHTNESS + case 256: M256(); break; // M256: Set LCD brightness + #endif + #if ENABLED(EXPERIMENTAL_I2CBUS) case 260: M260(); break; // M260: Send data to an i2c slave case 261: M261(); break; // M261: Request data from an i2c slave @@ -821,8 +886,8 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 605: M605(); break; // M605: Set Dual X Carriage movement mode #endif - #if ENABLED(DELTA) - case 665: M665(); break; // M665: Set delta configurations + #if IS_KINEMATIC + case 665: M665(); break; // M665: Set Delta/SCARA parameters #endif #if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS @@ -869,7 +934,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes. #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) case 908: M908(); break; // M908: Control digital trimpot directly. - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC case 909: M909(); break; // M909: Print digipot/DAC current value case 910: M910(); break; // M910: Commit digipot/DAC value to external EEPROM #endif @@ -964,6 +1029,14 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 1001: M1001(); break; // M1001: [INTERNAL] Handle SD completion #endif + #if ENABLED(DGUS_LCD_UI_MKS) + case 1002: M1002(); break; // M1002: [INTERNAL] Tool-change and Relative E Move + #endif + + #if ENABLED(UBL_MESH_WIZARD) + case 1004: M1004(); break; // M1004: UBL Mesh Wizard + #endif + #if ENABLED(MAX7219_GCODE) case 7219: M7219(); break; // M7219: Set LEDs, columns, and rows #endif @@ -978,6 +1051,10 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { case 'D': D(parser.codenum); break; // Dn: Debug codes #endif + #if ENABLED(REALTIME_REPORTING_COMMANDS) + case 'S': case 'P': case 'R': break; // Invalid S, P, R commands already filtered + #endif + default: #if ENABLED(WIFI_CUSTOM_COMMAND) if (wifi_custom_command(parser.command_ptr)) break; @@ -990,30 +1067,32 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) { SERIAL_OUT(msgDone); // Call the msgDone serial hook to signal command processing done } +#if ENABLED(M100_FREE_MEMORY_DUMPER) + void M100_dump_routine(PGM_P const title, const char * const start, const uintptr_t size); +#endif + /** * Process a single command and dispatch it to its handler * This is called from the main loop() */ void GcodeSuite::process_next_command() { - char * const current_command = queue.command_buffer[queue.index_r]; + GCodeQueue::CommandLine &command = queue.ring_buffer.peek_next_command(); - PORT_REDIRECT(SERIAL_PORTMASK(queue.port[queue.index_r])); + PORT_REDIRECT(SERIAL_PORTMASK(command.port)); - #if ENABLED(POWER_LOSS_RECOVERY) - recovery.queue_index_r = queue.index_r; - #endif + TERN_(POWER_LOSS_RECOVERY, recovery.queue_index_r = queue.ring_buffer.index_r); if (DEBUGGING(ECHO)) { SERIAL_ECHO_START(); - SERIAL_ECHOLN(current_command); + SERIAL_ECHOLN(command.buffer); #if ENABLED(M100_FREE_MEMORY_DUMPER) - SERIAL_ECHOPAIR("slot:", queue.index_r); - M100_dump_routine(PSTR(" Command Queue:"), &queue.command_buffer[0][0], &queue.command_buffer[BUFSIZE - 1][MAX_CMD_SIZE - 1]); + SERIAL_ECHOPGM("slot:", queue.ring_buffer.index_r); + M100_dump_routine(PSTR(" Command Queue:"), (const char*)&queue.ring_buffer, sizeof(queue.ring_buffer)); #endif } // Parse the next command in the queue - parser.parse(current_command); + parser.parse(command.buffer); process_parsed_command(); } @@ -1031,7 +1110,7 @@ void GcodeSuite::process_subcommands_now_P(PGM_P pgcode) { strncpy_P(cmd, pgcode, len); // Copy the command to the stack cmd[len] = '\0'; // End with a nul parser.parse(cmd); // Parse the command - process_parsed_command(true); // Process it + process_parsed_command(true); // Process it (no "ok") if (!delim) break; // Last command? pgcode = delim + 1; // Get the next command } @@ -1044,9 +1123,9 @@ void GcodeSuite::process_subcommands_now(char * gcode) { char * const delim = strchr(gcode, '\n'); // Get address of next newline if (delim) *delim = '\0'; // Replace with nul parser.parse(gcode); // Parse the current command - if (delim) *delim = '\n'; // Put back the newline - process_parsed_command(true); // Process it + process_parsed_command(true); // Process it (no "ok") if (!delim) break; // Last command? + *delim = '\n'; // Put back the newline gcode = delim + 1; // Get the next command } parser.parse(saved_cmd); // Restore the parser state @@ -1063,16 +1142,20 @@ void GcodeSuite::process_subcommands_now(char * gcode) { static millis_t next_busy_signal_ms = 0; if (!autoreport_paused && host_keepalive_interval && busy_state != NOT_BUSY) { if (PENDING(ms, next_busy_signal_ms)) return; + PORT_REDIRECT(SerialMask::All); switch (busy_state) { case IN_HANDLER: case IN_PROCESS: SERIAL_ECHO_MSG(STR_BUSY_PROCESSING); + TERN_(FULL_REPORT_TO_HOST_FEATURE, report_current_position_moving()); break; case PAUSED_FOR_USER: SERIAL_ECHO_MSG(STR_BUSY_PAUSED_FOR_USER); + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_HOLD)); break; case PAUSED_FOR_INPUT: SERIAL_ECHO_MSG(STR_BUSY_PAUSED_FOR_INPUT); + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_HOLD)); break; default: break; diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 7fd8d6904afb..2173c5cab191 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -21,10 +21,6 @@ */ #pragma once -/** - * gcode.h - Temporary container for all gcode handlers - */ - /** * ----------------- * G-Codes in Marlin @@ -86,6 +82,8 @@ * M7 - Turn mist coolant ON. (Requires COOLANT_CONTROL) * M8 - Turn flood coolant ON. (Requires COOLANT_CONTROL) * M9 - Turn coolant OFF. (Requires COOLANT_CONTROL) + * M10 - Turn Vacuum or Blower motor ON (Requires AIR_EVACUATION) + * M11 - Turn Vacuum or Blower motor OFF (Requires AIR_EVACUATION) * M12 - Set up closed loop control system. (Requires EXTERNAL_CLOSED_LOOP_CONTROLLER) * M16 - Expected printer check. (Requires EXPECTED_PRINTER_CHECK) * M17 - Enable/Power all stepper motors @@ -153,9 +151,11 @@ * M129 - EtoP Closed. (Requires BARICUDA) * M140 - Set bed target temp. S * M141 - Set heated chamber target temp. S (Requires a chamber heater) + * M143 - Set cooler target temp. S (Requires a laser cooling device) * M145 - Set heatup values for materials on the LCD. H B F for S (0=PLA, 1=ABS) * M149 - Set temperature units. (Requires TEMPERATURE_UNITS_SUPPORT) * M150 - Set Status LED Color as R U B W P. Values 0-255. (Requires BLINKM, RGB_LED, RGBW_LED, NEOPIXEL_LED, PCA9533, or PCA9632). + * M154 - Auto-report position with interval of S. (Requires AUTO_REPORT_POSITION) * M155 - Auto-report temperatures with interval of S. (Requires AUTO_REPORT_TEMPERATURES) * M163 - Set a single proportion for a mixing extruder. (Requires MIXING_EXTRUDER) * M164 - Commit the mix and save to a virtual tool (current, or as specified by 'S'). (Requires MIXING_EXTRUDER) @@ -163,6 +163,7 @@ * M166 - Set the Gradient Mix for the mixing extruder. (Requires GRADIENT_MIX) * M190 - S Wait for bed current temp to reach target temp. ** Wait only when heating! ** * R Wait for bed current temp to reach target temp. ** Wait for heating or cooling. ** + * M193 - R Wait for cooler temp to reach target temp. ** Wait for cooling. ** * M200 - Set filament diameter, D, setting E axis units to cubic. (Use S0 to revert to linear units.) * M201 - Set max acceleration in units/s^2 for print moves: "M201 X Y Z E" * M202 - Set max acceleration in units/s^2 for travel moves: "M202 X Y Z E" ** UNUSED IN MARLIN! ** @@ -186,10 +187,12 @@ * M226 - Wait until a pin is in a given state: "M226 P S" (Requires DIRECT_PIN_CONTROL) * M240 - Trigger a camera to take a photograph. (Requires PHOTO_GCODE) * M250 - Set LCD contrast: "M250 C" (0-63). (Requires LCD support) + * M256 - Set LCD brightness: "M256 B" (0-255). (Requires an LCD with brightness control) * M260 - i2c Send Data (Requires EXPERIMENTAL_I2CBUS) * M261 - i2c Request Data (Requires EXPERIMENTAL_I2CBUS) * M280 - Set servo position absolute: "M280 P S". (Requires servos) * M281 - Set servo min|max position: "M281 P L U". (Requires EDITABLE_SERVO_ANGLES) + * M282 - Detach servo: "M282 P". (Requires SERVO_DETACH_GCODE) * M290 - Babystepping (Requires BABYSTEPPING) * M300 - Play beep sound S P * M301 - Set PID parameters P I and D. (Requires PIDTEMP) @@ -197,6 +200,7 @@ * M303 - PID relay autotune S sets the target temperature. Default 150C. (Requires PIDTEMP) * M304 - Set bed PID parameters P I and D. (Requires PIDTEMPBED) * M305 - Set user thermistor parameters R T and P. (Requires TEMP_SENSOR_x 1000) + * M309 - Set chamber PID parameters P I and D. (Requires PIDTEMPCHAMBER) * M350 - Set microstepping mode. (Requires digital microstepping pins.) * M351 - Toggle MS1 MS2 pins directly. (Requires digital microstepping pins.) * M355 - Set Case Light on/off and set brightness. (Requires CASE_LIGHT_PIN) @@ -235,10 +239,12 @@ * M553 - Get or set IP netmask. (Requires enabled Ethernet port) * M554 - Get or set IP gateway. (Requires enabled Ethernet port) * M569 - Enable stealthChop on an axis. (Requires at least one _DRIVER_TYPE to be TMC2130/2160/2208/2209/5130/5160) + * M575 - Change the serial baud rate. (Requires BAUD_RATE_GCODE) * M600 - Pause for filament change: "M600 X Y Z E L". (Requires ADVANCED_PAUSE_FEATURE) * M603 - Configure filament change: "M603 T U L". (Requires ADVANCED_PAUSE_FEATURE) * M605 - Set Dual X-Carriage movement mode: "M605 S [X] [R]". (Requires DUAL_X_CARRIAGE) * M665 - Set delta configurations: "M665 H L R S B X Y Z (Requires DELTA) + * Set SCARA configurations: "M665 S P T Z (Requires MORGAN_SCARA or MP_SCARA) * M666 - Set/get offsets for delta (Requires DELTA) or dual endstops. (Requires [XYZ]_DUAL_ENDSTOPS) * M672 - Set/Reset Duet Smart Effector's sensitivity. (Requires DUET_SMART_EFFECTOR and SMART_EFFECTOR_MOD_PIN) * M701 - Load filament (Requires FILAMENT_LOAD_UNLOAD_GCODES) @@ -291,6 +297,7 @@ * M997 - Perform in-application firmware update * M999 - Restart after being stopped by error * D... - Custom Development G-code. Add hooks to 'gcode_D.cpp' for developers to test features. (Requires MARLIN_DEV_MODE) + * D576 - Set buffer monitoring options. (Requires BUFFER_MONITORING) * * "T" Codes * @@ -308,33 +315,46 @@ #define HAS_FAST_MOVES 1 #endif -enum AxisRelative : uint8_t { REL_X, REL_Y, REL_Z, REL_E, E_MODE_ABS, E_MODE_REL }; +enum AxisRelative : uint8_t { + LOGICAL_AXIS_LIST(REL_E, REL_X, REL_Y, REL_Z, REL_I, REL_J, REL_K) + #if HAS_EXTRUDERS + , E_MODE_ABS, E_MODE_REL + #endif +}; extern const char G28_STR[]; class GcodeSuite { public: - static uint8_t axis_relative; + static axis_bits_t axis_relative; static inline bool axis_is_relative(const AxisEnum a) { - if (a == E_AXIS) { - if (TEST(axis_relative, E_MODE_REL)) return true; - if (TEST(axis_relative, E_MODE_ABS)) return false; - } + #if HAS_EXTRUDERS + if (a == E_AXIS) { + if (TEST(axis_relative, E_MODE_REL)) return true; + if (TEST(axis_relative, E_MODE_ABS)) return false; + } + #endif return TEST(axis_relative, a); } static inline void set_relative_mode(const bool rel) { - axis_relative = rel ? _BV(REL_X) | _BV(REL_Y) | _BV(REL_Z) | _BV(REL_E) : 0; - } - static inline void set_e_relative() { - CBI(axis_relative, E_MODE_ABS); - SBI(axis_relative, E_MODE_REL); - } - static inline void set_e_absolute() { - CBI(axis_relative, E_MODE_REL); - SBI(axis_relative, E_MODE_ABS); + axis_relative = rel ? (0 LOGICAL_AXIS_GANG( + | _BV(REL_E), + | _BV(REL_X), | _BV(REL_Y), | _BV(REL_Z), + | _BV(REL_I), | _BV(REL_J), | _BV(REL_K) + )) : 0; } + #if HAS_EXTRUDERS + static inline void set_e_relative() { + CBI(axis_relative, E_MODE_ABS); + SBI(axis_relative, E_MODE_REL); + } + static inline void set_e_absolute() { + CBI(axis_relative, E_MODE_REL); + SBI(axis_relative, E_MODE_ABS); + } + #endif #if ENABLED(CNC_WORKSPACE_PLANES) /** @@ -361,8 +381,16 @@ class GcodeSuite { return ELAPSED(ms, previous_move_ms + stepper_inactive_time); } + static void report_echo_start(const bool forReplay); + static void report_heading(const bool forReplay, PGM_P const pstr, const bool eol=true); + static inline void report_heading_etc(const bool forReplay, PGM_P const pstr, const bool eol=true) { + report_heading(forReplay, pstr, eol); + report_echo_start(forReplay); + } + static void say_units(); + static int8_t get_target_extruder_from_command(); - static int8_t get_target_e_stepper_from_command(); + static int8_t get_target_e_stepper_from_command(const int8_t dval=-1); static void get_destination_from_command(); static void process_parsed_command(const bool no_ok=false); @@ -373,7 +401,7 @@ class GcodeSuite { static void process_subcommands_now(char * gcode); static inline void home_all_axes(const bool keep_leveling=false) { - process_subcommands_now_P(keep_leveling ? G28_STR : TERN(G28_L0_ENSURES_LEVELING_OFF, PSTR("G28L0"), G28_STR)); + process_subcommands_now_P(keep_leveling ? G28_STR : TERN(CAN_SET_LEVELING_AFTER_G28, PSTR("G28L0"), G28_STR)); } #if EITHER(HAS_AUTO_REPORTING, HOST_KEEPALIVE_FEATURE) @@ -405,6 +433,7 @@ class GcodeSuite { static uint8_t host_keepalive_interval; static void host_keepalive(); + static inline bool host_keepalive_is_paused() { return busy_state >= PAUSED_FOR_USER; } #define KEEPALIVE_STATE(N) REMEMBER(_KA_, gcode.busy_state, gcode.N) #else @@ -415,24 +444,36 @@ class GcodeSuite { private: - TERN_(MARLIN_DEV_MODE, static void D(const int16_t dcode)); + friend class MarlinSettings; + + #if ENABLED(MARLIN_DEV_MODE) + static void D(const int16_t dcode); + #endif static void G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move=false)); - TERN_(ARC_SUPPORT, static void G2_G3(const bool clockwise)); + #if ENABLED(ARC_SUPPORT) + static void G2_G3(const bool clockwise); + #endif static void G4(); - TERN_(BEZIER_CURVE_SUPPORT, static void G5()); + #if ENABLED(BEZIER_CURVE_SUPPORT) + static void G5(); + #endif - TERN_(DIRECT_STEPPING, static void G6()); + #if ENABLED(DIRECT_STEPPING) + static void G6(); + #endif #if ENABLED(FWRETRACT) static void G10(); static void G11(); #endif - TERN_(NOZZLE_CLEAN_FEATURE, static void G12()); + #if ENABLED(NOZZLE_CLEAN_FEATURE) + static void G12(); + #endif #if ENABLED(CNC_WORKSPACE_PLANES) static void G17(); @@ -445,9 +486,13 @@ class GcodeSuite { static void G21(); #endif - TERN_(G26_MESH_VALIDATION, static void G26()); + #if ENABLED(G26_MESH_VALIDATION) + static void G26(); + #endif - TERN_(NOZZLE_PARK_FEATURE, static void G27()); + #if ENABLED(NOZZLE_PARK_FEATURE) + static void G27(); + #endif static void G28(); @@ -471,19 +516,30 @@ class GcodeSuite { #endif #endif - TERN_(DELTA_AUTO_CALIBRATION, static void G33()); + #if ENABLED(DELTA_AUTO_CALIBRATION) + static void G33(); + #endif #if ANY(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION) static void G34(); #endif - TERN_(Z_STEPPER_AUTO_ALIGN, static void M422()); + #if ENABLED(Z_STEPPER_AUTO_ALIGN) + static void M422(); + static void M422_report(const bool forReplay=true); + #endif - TERN_(ASSISTED_TRAMMING, static void G35()); + #if ENABLED(ASSISTED_TRAMMING) + static void G35(); + #endif - TERN_(G38_PROBE_TARGET, static void G38(const int8_t subcode)); + #if ENABLED(G38_PROBE_TARGET) + static void G38(const int8_t subcode); + #endif - TERN_(HAS_MESH, static void G42()); + #if HAS_MESH + static void G42(); + #endif #if ENABLED(CNC_COORDINATE_SYSTEMS) static void G53(); @@ -495,35 +551,58 @@ class GcodeSuite { static void G59(); #endif - TERN_(PROBE_TEMP_COMPENSATION, static void G76()); + #if ENABLED(PROBE_TEMP_COMPENSATION) + static void G76(); + #endif #if SAVED_POSITIONS static void G60(); static void G61(); #endif - TERN_(GCODE_MOTION_MODES, static void G80()); + #if ENABLED(GCODE_MOTION_MODES) + static void G80(); + #endif static void G92(); - TERN_(CALIBRATION_GCODE, static void G425()); + #if ENABLED(CALIBRATION_GCODE) + static void G425(); + #endif - TERN_(HAS_RESUME_CONTINUE, static void M0_M1()); + #if HAS_RESUME_CONTINUE + static void M0_M1(); + #endif #if HAS_CUTTER static void M3_M4(const bool is_M4); static void M5(); #endif - #if ENABLED(COOLANT_CONTROL) - TERN_(COOLANT_MIST, static void M7()); - TERN_(COOLANT_FLOOD, static void M8()); + #if ENABLED(COOLANT_MIST) + static void M7(); + #endif + + #if EITHER(AIR_ASSIST, COOLANT_FLOOD) + static void M8(); + #endif + + #if EITHER(AIR_ASSIST, COOLANT_CONTROL) static void M9(); #endif - TERN_(EXTERNAL_CLOSED_LOOP_CONTROLLER, static void M12()); + #if ENABLED(AIR_EVACUATION) + static void M10(); + static void M11(); + #endif - TERN_(EXPECTED_PRINTER_CHECK, static void M16()); + #if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER) + static void M12(); + #endif + + #if ENABLED(EXPECTED_PRINTER_CHECK) + static void M16(); + #endif static void M17(); @@ -546,39 +625,62 @@ class GcodeSuite { static void M31(); #if ENABLED(SDSUPPORT) - TERN_(HAS_MEDIA_SUBCALLS, static void M32()); - TERN_(LONG_FILENAME_HOST_SUPPORT, static void M33()); + #if HAS_MEDIA_SUBCALLS + static void M32(); + #endif + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + static void M33(); + #endif #if BOTH(SDCARD_SORT_ALPHA, SDSORT_GCODE) static void M34(); #endif #endif - TERN_(DIRECT_PIN_CONTROL, static void M42()); - TERN_(PINS_DEBUGGING, static void M43()); + #if ENABLED(DIRECT_PIN_CONTROL) + static void M42(); + #endif + #if ENABLED(PINS_DEBUGGING) + static void M43(); + #endif - TERN_(Z_MIN_PROBE_REPEATABILITY_TEST, static void M48()); + #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) + static void M48(); + #endif - TERN_(LCD_SET_PROGRESS_MANUALLY, static void M73()); + #if ENABLED(LCD_SET_PROGRESS_MANUALLY) + static void M73(); + #endif static void M75(); static void M76(); static void M77(); - TERN_(PRINTCOUNTER, static void M78()); - - TERN_(PSU_CONTROL, static void M80()); + #if ENABLED(PRINTCOUNTER) + static void M78(); + #endif + #if ENABLED(PSU_CONTROL) + static void M80(); + #endif static void M81(); - static void M82(); - static void M83(); + + #if HAS_EXTRUDERS + static void M82(); + static void M83(); + #endif + static void M85(); static void M92(); + static void M92_report(const bool forReplay=true, const int8_t e=-1); - TERN_(M100_FREE_MEMORY_WATCHER, static void M100()); + #if ENABLED(M100_FREE_MEMORY_WATCHER) + static void M100(); + #endif - #if EXTRUDERS - static void M104(); - static void M109(); + #if HAS_EXTRUDERS + static void M104_M109(const bool isM109); + FORCE_INLINE static void M104() { M104_M109(false); } + FORCE_INLINE static void M109() { M104_M109(true); } #endif static void M105(); @@ -592,23 +694,33 @@ class GcodeSuite { static void M108(); static void M112(); static void M410(); - TERN_(HOST_PROMPT_SUPPORT, static void M876()); + #if ENABLED(HOST_PROMPT_SUPPORT) + static void M876(); + #endif #endif static void M110(); static void M111(); - TERN_(HOST_KEEPALIVE_FEATURE, static void M113()); + #if ENABLED(HOST_KEEPALIVE_FEATURE) + static void M113(); + #endif static void M114(); static void M115(); - static void M117(); + + #if HAS_STATUS_MESSAGE + static void M117(); + #endif + static void M118(); static void M119(); static void M120(); static void M121(); - TERN_(PARK_HEAD_ON_PAUSE, static void M125()); + #if ENABLED(PARK_HEAD_ON_PAUSE) + static void M125(); + #endif #if ENABLED(BARICUDA) #if HAS_HEATER_1 @@ -622,8 +734,9 @@ class GcodeSuite { #endif #if HAS_HEATED_BED - static void M140(); - static void M190(); + static void M140_M190(const bool isM190); + FORCE_INLINE static void M140() { M140_M190(false); } + FORCE_INLINE static void M190() { M140_M190(true); } #endif #if HAS_HEATED_CHAMBER @@ -631,13 +744,28 @@ class GcodeSuite { static void M191(); #endif + #if HAS_COOLER + static void M143(); + static void M193(); + #endif + #if PREHEAT_COUNT static void M145(); + static void M145_report(const bool forReplay=true); #endif - TERN_(TEMPERATURE_UNITS_SUPPORT, static void M149()); + #if ENABLED(TEMPERATURE_UNITS_SUPPORT) + static void M149(); + static void M149_report(const bool forReplay=true); + #endif + + #if HAS_COLOR_LEDS + static void M150(); + #endif - TERN_(HAS_COLOR_LEDS, static void M150()); + #if ENABLED(AUTO_REPORT_POSITION) + static void M154(); + #endif #if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR) static void M155(); @@ -646,46 +774,84 @@ class GcodeSuite { #if ENABLED(MIXING_EXTRUDER) static void M163(); static void M164(); - TERN_(DIRECT_MIXING_IN_G1, static void M165()); - TERN_(GRADIENT_MIX, static void M166()); + #if ENABLED(DIRECT_MIXING_IN_G1) + static void M165(); + #endif + #if ENABLED(GRADIENT_MIX) + static void M166(); + #endif #endif - static void M200(); + #if DISABLED(NO_VOLUMETRICS) + static void M200(); + static void M200_report(const bool forReplay=true); + #endif static void M201(); + static void M201_report(const bool forReplay=true); #if 0 static void M202(); // Not used for Sprinter/grbl gen6 #endif static void M203(); + static void M203_report(const bool forReplay=true); static void M204(); + static void M204_report(const bool forReplay=true); static void M205(); + static void M205_report(const bool forReplay=true); - TERN_(HAS_M206_COMMAND, static void M206()); + #if HAS_M206_COMMAND + static void M206(); + static void M206_report(const bool forReplay=true); + #endif #if ENABLED(FWRETRACT) static void M207(); + static void M207_report(const bool forReplay=true); static void M208(); - TERN_(FWRETRACT_AUTORETRACT, static void M209()); + static void M208_report(const bool forReplay=true); + #if ENABLED(FWRETRACT_AUTORETRACT) + static void M209(); + static void M209_report(const bool forReplay=true); + #endif #endif static void M211(); + static void M211_report(const bool forReplay=true); - TERN_(HAS_MULTI_EXTRUDER, static void M217()); + #if HAS_MULTI_EXTRUDER + static void M217(); + static void M217_report(const bool forReplay=true); + #endif - TERN_(HAS_HOTEND_OFFSET, static void M218()); + #if HAS_HOTEND_OFFSET + static void M218(); + static void M218_report(const bool forReplay=true); + #endif static void M220(); - #if EXTRUDERS + #if HAS_EXTRUDERS static void M221(); #endif - TERN_(DIRECT_PIN_CONTROL, static void M226()); + #if ENABLED(DIRECT_PIN_CONTROL) + static void M226(); + #endif - TERN_(PHOTO_GCODE, static void M240()); + #if ENABLED(PHOTO_GCODE) + static void M240(); + #endif - TERN_(HAS_LCD_CONTRAST, static void M250()); + #if HAS_LCD_CONTRAST + static void M250(); + static void M250_report(const bool forReplay=true); + #endif + + #if HAS_LCD_BRIGHTNESS + static void M256(); + static void M256_report(const bool forReplay=true); + #endif #if ENABLED(EXPERIMENTAL_I2CBUS) static void M260(); @@ -694,31 +860,62 @@ class GcodeSuite { #if HAS_SERVOS static void M280(); - TERN_(EDITABLE_SERVO_ANGLES, static void M281()); + #if ENABLED(EDITABLE_SERVO_ANGLES) + static void M281(); + static void M281_report(const bool forReplay=true); + #endif + #if ENABLED(SERVO_DETACH_GCODE) + static void M282(); + #endif #endif - TERN_(BABYSTEPPING, static void M290()); + #if ENABLED(BABYSTEPPING) + static void M290(); + #endif - TERN_(HAS_BUZZER, static void M300()); + #if HAS_BUZZER + static void M300(); + #endif - TERN_(PIDTEMP, static void M301()); + #if ENABLED(PIDTEMP) + static void M301(); + static void M301_report(const bool forReplay=true E_OPTARG(const int8_t eindex=-1)); + #endif - TERN_(PREVENT_COLD_EXTRUSION, static void M302()); + #if ENABLED(PREVENT_COLD_EXTRUSION) + static void M302(); + #endif + + #if HAS_PID_HEATING + static void M303(); + #endif - TERN_(HAS_PID_HEATING, static void M303()); + #if ENABLED(PIDTEMPBED) + static void M304(); + static void M304_report(const bool forReplay=true); + #endif - TERN_(PIDTEMPBED, static void M304()); + #if HAS_USER_THERMISTORS + static void M305(); + #endif - TERN_(HAS_USER_THERMISTORS, static void M305()); + #if ENABLED(PIDTEMPCHAMBER) + static void M309(); + static void M309_report(const bool forReplay=true); + #endif #if HAS_MICROSTEPS static void M350(); static void M351(); #endif - TERN_(CASE_LIGHT_ENABLE, static void M355()); + #if ENABLED(CASE_LIGHT_ENABLE) + static void M355(); + #endif - TERN_(REPETIER_GCODE_M360, static void M360()); + #if ENABLED(REPETIER_GCODE_M360) + static void M360(); + #endif #if ENABLED(MORGAN_SCARA) static bool M360(); @@ -740,7 +937,9 @@ class GcodeSuite { static void M402(); #endif - TERN_(HAS_PRUSA_MMU2, static void M403()); + #if HAS_PRUSA_MMU2 + static void M403(); + #endif #if ENABLED(FILAMENT_WIDTH_SENSOR) static void M404(); @@ -749,22 +948,38 @@ class GcodeSuite { static void M407(); #endif - TERN_(HAS_FILAMENT_SENSOR, static void M412()); + #if HAS_FILAMENT_SENSOR + static void M412(); + static void M412_report(const bool forReplay=true); + #endif - TERN_(HAS_MULTI_LANGUAGE, static void M414()); + #if HAS_MULTI_LANGUAGE + static void M414(); + static void M414_report(const bool forReplay=true); + #endif #if HAS_LEVELING static void M420(); + static void M420_report(const bool forReplay=true); static void M421(); #endif - TERN_(BACKLASH_GCODE, static void M425()); + #if ENABLED(BACKLASH_GCODE) + static void M425(); + static void M425_report(const bool forReplay=true); + #endif - TERN_(HAS_M206_COMMAND, static void M428()); + #if HAS_M206_COMMAND + static void M428(); + #endif - TERN_(HAS_POWER_MONITOR, static void M430()); + #if HAS_POWER_MONITOR + static void M430(); + #endif - TERN_(CANCEL_OBJECTS, static void M486()); + #if ENABLED(CANCEL_OBJECTS) + static void M486(); + #endif static void M500(); static void M501(); @@ -772,37 +987,64 @@ class GcodeSuite { #if DISABLED(DISABLE_M503) static void M503(); #endif - TERN_(EEPROM_SETTINGS, static void M504()); + #if ENABLED(EEPROM_SETTINGS) + static void M504(); + #endif #if ENABLED(PASSWORD_FEATURE) static void M510(); - TERN_(PASSWORD_UNLOCK_GCODE, static void M511()); - TERN_(PASSWORD_CHANGE_GCODE, static void M512()); + #if ENABLED(PASSWORD_UNLOCK_GCODE) + static void M511(); + #endif + #if ENABLED(PASSWORD_CHANGE_GCODE) + static void M512(); + #endif #endif - TERN_(SDSUPPORT, static void M524()); + #if ENABLED(SDSUPPORT) + static void M524(); + #endif - TERN_(SD_ABORT_ON_ENDSTOP_HIT, static void M540()); + #if ENABLED(SD_ABORT_ON_ENDSTOP_HIT) + static void M540(); + #endif #if HAS_ETHERNET static void M552(); + static void M552_report(); static void M553(); + static void M553_report(); static void M554(); + static void M554_report(); #endif - TERN_(BAUD_RATE_GCODE, static void M575()); + #if HAS_STEALTHCHOP + static void M569(); + static void M569_report(const bool forReplay=true); + #endif + + #if ENABLED(BAUD_RATE_GCODE) + static void M575(); + #endif #if ENABLED(ADVANCED_PAUSE_FEATURE) static void M600(); static void M603(); + static void M603_report(const bool forReplay=true); #endif - TERN_(HAS_DUPLICATION_MODE, static void M605()); + #if HAS_DUPLICATION_MODE + static void M605(); + #endif - TERN_(IS_KINEMATIC, static void M665()); + #if IS_KINEMATIC + static void M665(); + static void M665_report(const bool forReplay=true); + #endif - #if ENABLED(DELTA) || HAS_EXTRA_ENDSTOPS + #if EITHER(DELTA, HAS_EXTRA_ENDSTOPS) static void M666(); + static void M666_report(const bool forReplay=true); #endif #if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD) @@ -814,13 +1056,23 @@ class GcodeSuite { static void M702(); #endif - TERN_(GCODE_REPEAT_MARKERS, static void M808()); + #if ENABLED(GCODE_REPEAT_MARKERS) + static void M808(); + #endif - TERN_(GCODE_MACROS, static void M810_819()); + #if ENABLED(GCODE_MACROS) + static void M810_819(); + #endif - TERN_(HAS_BED_PROBE, static void M851()); + #if HAS_BED_PROBE + static void M851(); + static void M851_report(const bool forReplay=true); + #endif - TERN_(SKEW_CORRECTION_GCODE, static void M852()); + #if ENABLED(SKEW_CORRECTION_GCODE) + static void M852(); + static void M852_report(const bool forReplay=true); + #endif #if ENABLED(I2C_POSITION_ENCODERS) FORCE_INLINE static void M860() { I2CPEM.M860(); } @@ -840,18 +1092,27 @@ class GcodeSuite { static void M871(); #endif - TERN_(LIN_ADVANCE, static void M900()); + #if ENABLED(LIN_ADVANCE) + static void M900(); + static void M900_report(const bool forReplay=true); + #endif #if HAS_TRINAMIC_CONFIG static void M122(); static void M906(); - TERN_(HAS_STEALTHCHOP, static void M569()); + static void M906_report(const bool forReplay=true); #if ENABLED(MONITOR_DRIVER_STATUS) static void M911(); static void M912(); #endif - TERN_(HYBRID_THRESHOLD, static void M913()); - TERN_(USE_SENSORLESS, static void M914()); + #if ENABLED(HYBRID_THRESHOLD) + static void M913(); + static void M913_report(const bool forReplay=true); + #endif + #if ENABLED(USE_SENSORLESS) + static void M914(); + static void M914_report(const bool forReplay=true); + #endif #endif #if HAS_L64XX @@ -862,42 +1123,69 @@ class GcodeSuite { static void M918(); #endif - #if ANY(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM, HAS_MOTOR_CURRENT_I2C, HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM || HAS_MOTOR_CURRENT_I2C || HAS_MOTOR_CURRENT_DAC static void M907(); - #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) - static void M908(); - #if ENABLED(HAS_MOTOR_CURRENT_DAC) - static void M909(); - static void M910(); - #endif + #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM + static void M907_report(const bool forReplay=true); #endif #endif + #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_DAC + static void M908(); + #endif + #if HAS_MOTOR_CURRENT_DAC + static void M909(); + static void M910(); + #endif - TERN_(SDSUPPORT, static void M928()); + #if ENABLED(SDSUPPORT) + static void M928(); + #endif - TERN_(MAGNETIC_PARKING_EXTRUDER, static void M951()); + #if ENABLED(MAGNETIC_PARKING_EXTRUDER) + static void M951(); + #endif - TERN_(TOUCH_SCREEN_CALIBRATION, static void M995()); + #if ENABLED(TOUCH_SCREEN_CALIBRATION) + static void M995(); + #endif #if BOTH(HAS_SPI_FLASH, SDSUPPORT) static void M993(); static void M994(); #endif - TERN_(PLATFORM_M997_SUPPORT, static void M997()); + #if ENABLED(PLATFORM_M997_SUPPORT) + static void M997(); + #endif static void M999(); #if ENABLED(POWER_LOSS_RECOVERY) static void M413(); + static void M413_report(const bool forReplay=true); static void M1000(); #endif - TERN_(SDSUPPORT, static void M1001()); + #if ENABLED(SDSUPPORT) + static void M1001(); + #endif + + #if ENABLED(DGUS_LCD_UI_MKS) + static void M1002(); + #endif - TERN_(MAX7219_GCODE, static void M7219()); + #if ENABLED(UBL_MESH_WIZARD) + static void M1004(); + #endif + + #if ENABLED(MAX7219_GCODE) + static void M7219(); + #endif - TERN_(CONTROLLER_FAN_EDITABLE, static void M710()); + #if ENABLED(CONTROLLER_FAN_EDITABLE) + static void M710(); + static void M710_report(const bool forReplay=true); + #endif static void T(const int8_t tool_index); diff --git a/Marlin/src/gcode/gcode_d.cpp b/Marlin/src/gcode/gcode_d.cpp index 0bd295587531..83646ef67c4f 100644 --- a/Marlin/src/gcode/gcode_d.cpp +++ b/Marlin/src/gcode/gcode_d.cpp @@ -19,163 +19,284 @@ * along with this program. If not, see . * */ + #include "../inc/MarlinConfigPre.h" #if ENABLED(MARLIN_DEV_MODE) - #include "gcode.h" - #include "../module/settings.h" - #include "../module/temperature.h" - #include "../libs/hex_print.h" - #include "../HAL/shared/eeprom_if.h" - #include "../HAL/shared/Delay.h" - - /** - * Dn: G-code for development and testing - * - * See https://reprap.org/wiki/G-code#D:_Debug_codes - * - * Put whatever else you need here to test ongoing development. - */ - void GcodeSuite::D(const int16_t dcode) { - switch (dcode) { - - case -1: - for (;;); // forever - - case 0: - HAL_reboot(); - break; +#include "gcode.h" - case 1: { - // Zero or pattern-fill the EEPROM data - #if ENABLED(EEPROM_SETTINGS) - persistentStore.access_start(); - size_t total = persistentStore.capacity(); - int pos = 0; - const uint8_t value = 0x0; - while (total--) persistentStore.write_data(pos, &value, 1); - persistentStore.access_finish(); - #else - settings.reset(); - settings.save(); - #endif - HAL_reboot(); - } break; +#if ENABLED(BUFFER_MONITORING) + #include "queue.h" +#endif + +#include "../module/settings.h" +#include "../module/temperature.h" +#include "../libs/hex_print.h" +#include "../HAL/shared/eeprom_if.h" +#include "../HAL/shared/Delay.h" +#include "../sd/cardreader.h" +#include "../MarlinCore.h" // for kill + +extern void dump_delay_accuracy_check(); + +/** + * Dn: G-code for development and testing + * + * See https://reprap.org/wiki/G-code#D:_Debug_codes + * + * Put whatever else you need here to test ongoing development. + */ +void GcodeSuite::D(const int16_t dcode) { + switch (dcode) { + + case -1: + for (;;) { /* loop forever (watchdog reset) */ } + + case 0: + HAL_reboot(); + break; + + case 10: + kill(PSTR("D10"), PSTR("KILL TEST"), parser.seen_test('P')); + break; + + case 1: { + // Zero or pattern-fill the EEPROM data + #if ENABLED(EEPROM_SETTINGS) + persistentStore.access_start(); + size_t total = persistentStore.capacity(); + int pos = 0; + const uint8_t value = 0x0; + while (total--) persistentStore.write_data(pos, &value, 1); + persistentStore.access_finish(); + #else + settings.reset(); + settings.save(); + #endif + HAL_reboot(); + } break; - case 2: { // D2 Read / Write SRAM - #define SRAM_SIZE 8192 + case 2: { // D2 Read / Write SRAM + #define SRAM_SIZE 8192 + uint8_t *pointer = parser.hex_adr_val('A'); + uint16_t len = parser.ushortval('C', 1); + uintptr_t addr = (uintptr_t)pointer; + NOMORE(addr, size_t(SRAM_SIZE - 1)); + NOMORE(len, SRAM_SIZE - addr); + if (parser.seenval('X')) { + // Write the hex bytes after the X + uint16_t val = parser.hex_val('X'); + while (len--) { + *pointer = val; + pointer++; + } + } + else { + while (len--) print_hex_byte(*(pointer++)); + SERIAL_EOL(); + } + } break; + + #if ENABLED(EEPROM_SETTINGS) + case 3: { // D3 Read / Write EEPROM uint8_t *pointer = parser.hex_adr_val('A'); uint16_t len = parser.ushortval('C', 1); uintptr_t addr = (uintptr_t)pointer; - NOMORE(addr, size_t(SRAM_SIZE - 1)); - NOMORE(len, SRAM_SIZE - addr); + NOMORE(addr, size_t(persistentStore.capacity() - 1)); + NOMORE(len, persistentStore.capacity() - addr); if (parser.seenval('X')) { - // Write the hex bytes after the X uint16_t val = parser.hex_val('X'); - while (len--) { - *pointer = val; - pointer++; - } + #if ENABLED(EEPROM_SETTINGS) + persistentStore.access_start(); + while (len--) { + int pos = 0; + persistentStore.write_data(pos, (uint8_t *)&val, sizeof(val)); + } + SERIAL_EOL(); + persistentStore.access_finish(); + #else + SERIAL_ECHOLNPGM("NO EEPROM"); + #endif } else { - while (len--) print_hex_byte(*(pointer++)); + // Read bytes from EEPROM + #if ENABLED(EEPROM_SETTINGS) + persistentStore.access_start(); + int pos = 0; + uint8_t val; + while (len--) if (!persistentStore.read_data(pos, &val, 1)) print_hex_byte(val); + SERIAL_EOL(); + persistentStore.access_finish(); + #else + SERIAL_ECHOLNPGM("NO EEPROM"); + len = 0; + #endif SERIAL_EOL(); } } break; + #endif - #if ENABLED(EEPROM_SETTINGS) - case 3: { // D3 Read / Write EEPROM - uint8_t *pointer = parser.hex_adr_val('A'); - uint16_t len = parser.ushortval('C', 1); - uintptr_t addr = (uintptr_t)pointer; - NOMORE(addr, size_t(persistentStore.capacity() - 1)); - NOMORE(len, persistentStore.capacity() - addr); - if (parser.seenval('X')) { - uint16_t val = parser.hex_val('X'); - #if ENABLED(EEPROM_SETTINGS) - persistentStore.access_start(); - while (len--) { - int pos = 0; - persistentStore.write_data(pos, (uint8_t *)&val, sizeof(val)); - } - SERIAL_EOL(); - persistentStore.access_finish(); - #else - SERIAL_ECHOLNPGM("NO EEPROM"); - #endif - } - else { - // Read bytes from EEPROM - #if ENABLED(EEPROM_SETTINGS) - persistentStore.access_start(); - int pos = 0; - uint8_t val; - while (len--) if (!persistentStore.read_data(pos, &val, 1)) print_hex_byte(val); - SERIAL_EOL(); - persistentStore.access_finish(); - #else - SERIAL_ECHOLNPGM("NO EEPROM"); - len = 0; - #endif - SERIAL_EOL(); - } - } break; - #endif + case 4: { // D4 Read / Write PIN + //const bool is_out = parser.boolval('F'); + //const uint8_t pin = parser.byteval('P'), + // val = parser.byteval('V', LOW); + if (parser.seenval('X')) { + // TODO: Write the hex bytes after the X + //while (len--) { + //} + } + else { + //while (len--) { + //// TODO: Read bytes from EEPROM + // print_hex_byte(eeprom_read_byte(adr++)); + //} + SERIAL_EOL(); + } + } break; - case 4: { // D4 Read / Write PIN - // const uint8_t pin = parser.byteval('P'); - // const bool is_out = parser.boolval('F'), - // val = parser.byteval('V', LOW); - if (parser.seenval('X')) { - // TODO: Write the hex bytes after the X - //while (len--) { - //} + case 5: { // D5 Read / Write onboard Flash + #define FLASH_SIZE 1024 + uint8_t *pointer = parser.hex_adr_val('A'); + uint16_t len = parser.ushortval('C', 1); + uintptr_t addr = (uintptr_t)pointer; + NOMORE(addr, size_t(FLASH_SIZE - 1)); + NOMORE(len, FLASH_SIZE - addr); + if (parser.seenval('X')) { + // TODO: Write the hex bytes after the X + //while (len--) {} + } + else { + //while (len--) { + //// TODO: Read bytes from EEPROM + // print_hex_byte(eeprom_read_byte(adr++)); + //} + SERIAL_EOL(); + } + } break; + + case 6: // D6 Check delay loop accuracy + dump_delay_accuracy_check(); + break; + + case 7: // D7 dump the current serial port type (hence configuration) + SERIAL_ECHOLNPGM("Current serial configuration RX_BS:", RX_BUFFER_SIZE, ", TX_BS:", TX_BUFFER_SIZE); + SERIAL_ECHOLN(gtn(&SERIAL_IMPL)); + break; + + case 100: { // D100 Disable heaters and attempt a hard hang (Watchdog Test) + SERIAL_ECHOLNPGM("Disabling heaters and attempting to trigger Watchdog"); + SERIAL_ECHOLNPGM("(USE_WATCHDOG " TERN(USE_WATCHDOG, "ENABLED", "DISABLED") ")"); + thermalManager.disable_all_heaters(); + delay(1000); // Allow time to print + DISABLE_ISRS(); + // Use a low-level delay that does not rely on interrupts to function + // Do not spin forever, to avoid thermal risks if heaters are enabled and + // watchdog does not work. + for (int i = 10000; i--;) DELAY_US(1000UL); + ENABLE_ISRS(); + SERIAL_ECHOLNPGM("FAILURE: Watchdog did not trigger board reset."); + } break; + + #if ENABLED(SDSUPPORT) + + case 101: { // D101 Test SD Write + card.openFileWrite("test.gco"); + if (!card.isFileOpen()) { + SERIAL_ECHOLNPGM("Failed to open test.gco to write."); + return; } - else { - // while (len--) { - // TODO: Read bytes from EEPROM - // print_hex_byte(eeprom_read_byte(*(adr++)); - // } - SERIAL_EOL(); + __attribute__((aligned(sizeof(size_t)))) uint8_t buf[512]; + + uint16_t c; + for (c = 0; c < COUNT(buf); c++) + buf[c] = 'A' + (c % ('Z' - 'A')); + + c = 1024 * 4; + while (c--) { + TERN_(USE_WATCHDOG, watchdog_refresh()); + card.write(buf, COUNT(buf)); } + SERIAL_ECHOLNPGM(" done"); + card.closefile(); } break; - case 5: { // D4 Read / Write onboard Flash - #define FLASH_SIZE 1024 - uint8_t *pointer = parser.hex_adr_val('A'); - uint16_t len = parser.ushortval('C', 1); - uintptr_t addr = (uintptr_t)pointer; - NOMORE(addr, size_t(FLASH_SIZE - 1)); - NOMORE(len, FLASH_SIZE - addr); - if (parser.seenval('X')) { - // TODO: Write the hex bytes after the X - //while (len--) { - //} + case 102: { // D102 Test SD Read + char testfile[] = "test.gco"; + card.openFileRead(testfile); + if (!card.isFileOpen()) { + SERIAL_ECHOLNPGM("Failed to open test.gco to read."); + return; } - else { - // while (len--) { - // TODO: Read bytes from EEPROM - // print_hex_byte(eeprom_read_byte(adr++)); - // } - SERIAL_EOL(); + __attribute__((aligned(sizeof(size_t)))) uint8_t buf[512]; + uint16_t c = 1024 * 4; + while (c--) { + TERN_(USE_WATCHDOG, watchdog_refresh()); + card.read(buf, COUNT(buf)); + bool error = false; + for (uint16_t i = 0; i < COUNT(buf); i++) { + if (buf[i] != ('A' + (i % ('Z' - 'A')))) { + error = true; + break; + } + } + if (error) { + SERIAL_ECHOLNPGM(" Read error!"); + break; + } } + SERIAL_ECHOLNPGM(" done"); + card.closefile(); } break; - case 100: { // D100 Disable heaters and attempt a hard hang (Watchdog Test) - SERIAL_ECHOLNPGM("Disabling heaters and attempting to trigger Watchdog"); - SERIAL_ECHOLNPGM("(USE_WATCHDOG " TERN(USE_WATCHDOG, "ENABLED", "DISABLED") ")"); + #endif // SDSUPPORT + + #if ENABLED(POSTMORTEM_DEBUGGING) + + case 451: { // Trigger all kind of faults to test exception catcher + SERIAL_ECHOLNPGM("Disabling heaters"); thermalManager.disable_all_heaters(); delay(1000); // Allow time to print - DISABLE_ISRS(); - // Use a low-level delay that does not rely on interrupts to function - // Do not spin forever, to avoid thermal risks if heaters are enabled and - // watchdog does not work. - for (int i = 10000; i--;) DELAY_US(1000UL); - ENABLE_ISRS(); - SERIAL_ECHOLNPGM("FAILURE: Watchdog did not trigger board reset."); + volatile uint8_t type[5] = { parser.byteval('T', 1) }; + + // The code below is obviously wrong and it's full of quirks to fool the compiler from optimizing away the code + switch (type[0]) { + case 1: default: *(int*)0 = 451; break; // Write at bad address + case 2: { volatile int a = 0; volatile int b = 452 / a; *(int*)&a = b; } break; // Divide by zero (some CPUs accept this, like ARM) + case 3: { *(uint32_t*)&type[1] = 453; volatile int a = *(int*)&type[1]; type[0] = a / 255; } break; // Unaligned access (some CPUs accept this) + case 4: { volatile void (*func)() = (volatile void (*)()) 0xE0000000; func(); } break; // Invalid instruction + } + break; + } + + #endif + + #if ENABLED(BUFFER_MONITORING) + + /** + * D576: Return buffer stats or set the auto-report interval. + * Usage: D576 [S] + * + * With no parameters emits the following output: + * "D576 P B PU PD BU BD" + * Where: + * P : Planner buffers free + * B : Command buffers free + * PU: Planner buffer underruns (since the last report) + * PD: Longest duration (ms) the planner buffer was empty (since the last report) + * BU: Command buffer underruns (since the last report) + * BD: Longest duration (ms) command buffer was empty (since the last report) + */ + case 576: { + if (parser.seenval('S')) + queue.set_auto_report_interval((uint8_t)parser.value_byte()); + else + queue.report_buffer_statistics(); + break; } - } + + #endif // BUFFER_MONITORING } +} -#endif +#endif // MARLIN_DEV_MODE diff --git a/Marlin/src/gcode/geometry/G17-G19.cpp b/Marlin/src/gcode/geometry/G17-G19.cpp index 7510eaba8c3d..0154598ccb22 100644 --- a/Marlin/src/gcode/geometry/G17-G19.cpp +++ b/Marlin/src/gcode/geometry/G17-G19.cpp @@ -29,7 +29,7 @@ inline void report_workspace_plane() { SERIAL_ECHO_START(); SERIAL_ECHOPGM("Workspace Plane "); - serialprintPGM( + SERIAL_ECHOPGM_P( gcode.workspace_plane == GcodeSuite::PLANE_YZ ? PSTR("YZ\n") : gcode.workspace_plane == GcodeSuite::PLANE_ZX ? PSTR("ZX\n") : PSTR("XY\n") diff --git a/Marlin/src/gcode/geometry/G53-G59.cpp b/Marlin/src/gcode/geometry/G53-G59.cpp index 05bc522768a2..db2404a28dc2 100644 --- a/Marlin/src/gcode/geometry/G53-G59.cpp +++ b/Marlin/src/gcode/geometry/G53-G59.cpp @@ -39,7 +39,7 @@ bool GcodeSuite::select_coordinate_system(const int8_t _new) { xyz_float_t new_offset{0}; if (WITHIN(_new, 0, MAX_COORDINATE_SYSTEMS - 1)) new_offset = coordinate_system[_new]; - LOOP_XYZ(i) { + LOOP_LINEAR_AXES(i) { if (position_shift[i] != new_offset[i]) { position_shift[i] = new_offset[i]; update_workspace_offset((AxisEnum)i); @@ -69,7 +69,7 @@ void GcodeSuite::G53() { process_parsed_command(); // ...process the chained command select_coordinate_system(old_system); #ifdef DEBUG_M53 - SERIAL_ECHOLNPAIR("Go back to workspace ", old_system); + SERIAL_ECHOLNPGM("Go back to workspace ", old_system); report_current_position(); #endif } @@ -87,7 +87,7 @@ void GcodeSuite::G53() { void G54_59(uint8_t subcode=0) { const int8_t _space = parser.codenum - 54 + subcode; if (gcode.select_coordinate_system(_space)) { - SERIAL_ECHOLNPAIR("Select workspace ", _space); + SERIAL_ECHOLNPGM("Select workspace ", _space); report_current_position(); } } diff --git a/Marlin/src/gcode/geometry/G92.cpp b/Marlin/src/gcode/geometry/G92.cpp index 1a0382ed7c2b..990236c0e878 100644 --- a/Marlin/src/gcode/geometry/G92.cpp +++ b/Marlin/src/gcode/geometry/G92.cpp @@ -29,77 +29,105 @@ #endif /** - * G92: Set current position to given X Y Z E + * G92: Set the Current Position to the given X Y Z E values. + * + * Behind the scenes the G92 command may modify the Current Position + * or the Position Shift depending on settings and sub-commands. + * + * Since E has no Workspace Offset, it is always set directly. + * + * Without Workspace Offsets (e.g., with NO_WORKSPACE_OFFSETS): + * G92 : Set NATIVE Current Position to the given X Y Z E. + * + * Using Workspace Offsets (default Marlin behavior): + * G92 : Modify Workspace Offsets so the reported position shows the given X Y Z E. + * G92.1 : Zero XYZ Workspace Offsets (so the reported position = the native position). + * + * With POWER_LOSS_RECOVERY: + * G92.9 : Set NATIVE Current Position to the given X Y Z E. */ void GcodeSuite::G92() { - bool sync_E = false, sync_XYZ = false; + #if HAS_EXTRUDERS + bool sync_E = false; + #endif + bool sync_XYZE = false; - #if ENABLED(USE_GCODE_SUBCODES) + #if USE_GCODE_SUBCODES const uint8_t subcode_G92 = parser.subcode; #else constexpr uint8_t subcode_G92 = 0; #endif switch (subcode_G92) { - default: break; - #if ENABLED(CNC_COORDINATE_SYSTEMS) - case 1: { - // Zero the G92 values and restore current position - #if !IS_SCARA - LOOP_XYZ(i) if (position_shift[i]) { - position_shift[i] = 0; - update_workspace_offset((AxisEnum)i); - } - #endif // Not SCARA - } return; + default: return; // Ignore unknown G92.x + + #if ENABLED(CNC_COORDINATE_SYSTEMS) && !IS_SCARA + case 1: // G92.1 - Zero the Workspace Offset + LOOP_LINEAR_AXES(i) if (position_shift[i]) { + position_shift[i] = 0; + update_workspace_offset((AxisEnum)i); + } + break; #endif + #if ENABLED(POWER_LOSS_RECOVERY) - case 9: { - LOOP_XYZE(i) { + case 9: // G92.9 - Set Current Position directly (like Marlin 1.0) + LOOP_LOGICAL_AXES(i) { if (parser.seenval(axis_codes[i])) { + if (TERN1(HAS_EXTRUDERS, i != E_AXIS)) + sync_XYZE = true; + else { + TERN_(HAS_EXTRUDERS, sync_E = true); + } current_position[i] = parser.value_axis_units((AxisEnum)i); - if (i == E_AXIS) sync_E = true; else sync_XYZ = true; } } - } break; + break; #endif - case 0: { - LOOP_XYZE(i) { + + case 0: + LOOP_LOGICAL_AXES(i) { if (parser.seenval(axis_codes[i])) { - const float l = parser.value_axis_units((AxisEnum)i), - v = i == E_AXIS ? l : LOGICAL_TO_NATIVE(l, i), - d = v - current_position[i]; + const float l = parser.value_axis_units((AxisEnum)i), // Given axis coordinate value, converted to millimeters + v = TERN0(HAS_EXTRUDERS, i == E_AXIS) ? l : LOGICAL_TO_NATIVE(l, i), // Axis position in NATIVE space (applying the existing offset) + d = v - current_position[i]; // How much is the current axis position altered by? if (!NEAR_ZERO(d)) { - #if IS_SCARA || !HAS_POSITION_SHIFT - if (i == E_AXIS) sync_E = true; else sync_XYZ = true; - current_position[i] = v; // Without workspaces revert to Marlin 1.0 behavior - #elif HAS_POSITION_SHIFT - if (i == E_AXIS) { - sync_E = true; - current_position.e = v; // When using coordinate spaces, only E is set directly + #if HAS_POSITION_SHIFT && !IS_SCARA // When using workspaces... + if (TERN1(HAS_EXTRUDERS, i != E_AXIS)) { + position_shift[i] += d; // ...most axes offset the workspace... + update_workspace_offset((AxisEnum)i); } else { - position_shift[i] += d; // Other axes simply offset the coordinate space - update_workspace_offset((AxisEnum)i); + #if HAS_EXTRUDERS + sync_E = true; + current_position.e = v; // ...but E is set directly + #endif } + #else // Without workspaces... + if (TERN1(HAS_EXTRUDERS, i != E_AXIS)) + sync_XYZE = true; + else { + TERN_(HAS_EXTRUDERS, sync_E = true); + } + current_position[i] = v; // ...set Current Position directly (like Marlin 1.0) #endif } } } - } break; + break; } #if ENABLED(CNC_COORDINATE_SYSTEMS) - // Apply workspace offset to the active coordinate system + // Apply Workspace Offset to the active coordinate system if (WITHIN(active_coordinate_system, 0, MAX_COORDINATE_SYSTEMS - 1)) coordinate_system[active_coordinate_system] = position_shift; #endif - if (sync_XYZ) sync_plan_position(); - else if (sync_E) sync_plan_position_e(); - - #if DISABLED(DIRECT_STEPPING) - report_current_position(); + if (sync_XYZE) sync_plan_position(); + #if HAS_EXTRUDERS + else if (sync_E) sync_plan_position_e(); #endif + + IF_DISABLED(DIRECT_STEPPING, report_current_position()); } diff --git a/Marlin/src/gcode/geometry/M206_M428.cpp b/Marlin/src/gcode/geometry/M206_M428.cpp index 2a2cdb16ffe7..416b3f7634ea 100644 --- a/Marlin/src/gcode/geometry/M206_M428.cpp +++ b/Marlin/src/gcode/geometry/M206_M428.cpp @@ -30,10 +30,6 @@ #include "../../libs/buzzer.h" #include "../../MarlinCore.h" -void m206_report() { - SERIAL_ECHOLNPAIR_P(PSTR("M206 X"), home_offset.x, SP_Y_STR, home_offset.y, SP_Z_STR, home_offset.z); -} - /** * M206: Set Additional Homing Offset (X Y Z). SCARA aliases T=X, P=Y * @@ -42,8 +38,10 @@ void m206_report() { * *** In the 2.0 release, it will simply be disabled by default. */ void GcodeSuite::M206() { - LOOP_XYZ(i) - if (parser.seen(XYZ_CHAR(i))) + if (!parser.seen_any()) return M206_report(); + + LOOP_LINEAR_AXES(i) + if (parser.seen(AXIS_CHAR(i))) set_home_offset((AxisEnum)i, parser.value_linear_units()); #if ENABLED(MORGAN_SCARA) @@ -51,10 +49,25 @@ void GcodeSuite::M206() { if (parser.seen('P')) set_home_offset(B_AXIS, parser.value_float()); // Psi #endif - if (!parser.seen("XYZ")) - m206_report(); - else - report_current_position(); + report_current_position(); +} + +void GcodeSuite::M206_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_HOME_OFFSET)); + SERIAL_ECHOLNPGM_P( + #if IS_CARTESIAN + LIST_N(DOUBLE(LINEAR_AXES), + PSTR(" M206 X"), LINEAR_UNIT(home_offset.x), + SP_Y_STR, LINEAR_UNIT(home_offset.y), + SP_Z_STR, LINEAR_UNIT(home_offset.z), + SP_I_STR, LINEAR_UNIT(home_offset.i), + SP_J_STR, LINEAR_UNIT(home_offset.j), + SP_K_STR, LINEAR_UNIT(home_offset.k) + ) + #else + PSTR(" M206 Z"), LINEAR_UNIT(home_offset.z) + #endif + ); } /** @@ -72,7 +85,7 @@ void GcodeSuite::M428() { if (homing_needed_error()) return; xyz_float_t diff; - LOOP_XYZ(i) { + LOOP_LINEAR_AXES(i) { diff[i] = base_home_pos((AxisEnum)i) - current_position[i]; if (!WITHIN(diff[i], -20, 20) && home_dir((AxisEnum)i) > 0) diff[i] = -current_position[i]; @@ -84,7 +97,7 @@ void GcodeSuite::M428() { } } - LOOP_XYZ(i) set_home_offset((AxisEnum)i, diff[i]); + LOOP_LINEAR_AXES(i) set_home_offset((AxisEnum)i, diff[i]); report_current_position(); LCD_MESSAGEPGM(MSG_HOME_OFFSETS_APPLIED); BUZZ(100, 659); diff --git a/Marlin/src/gcode/host/M110.cpp b/Marlin/src/gcode/host/M110.cpp index b12b38ea0f12..2634b198978d 100644 --- a/Marlin/src/gcode/host/M110.cpp +++ b/Marlin/src/gcode/host/M110.cpp @@ -29,6 +29,6 @@ void GcodeSuite::M110() { if (parser.seenval('N')) - queue.last_N[queue.command_port()] = parser.value_long(); + queue.set_current_line_number(parser.value_long()); } diff --git a/Marlin/src/gcode/host/M113.cpp b/Marlin/src/gcode/host/M113.cpp index ce826d6acde6..ddabcefb1312 100644 --- a/Marlin/src/gcode/host/M113.cpp +++ b/Marlin/src/gcode/host/M113.cpp @@ -32,14 +32,14 @@ * S Optional. Set the keepalive interval. */ void GcodeSuite::M113() { + if (parser.seenval('S')) { host_keepalive_interval = parser.value_byte(); NOMORE(host_keepalive_interval, 60); } - else { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("M113 S", (unsigned long)host_keepalive_interval); - } + else + SERIAL_ECHO_MSG("M113 S", host_keepalive_interval); + } #endif // HOST_KEEPALIVE_FEATURE diff --git a/Marlin/src/gcode/host/M114.cpp b/Marlin/src/gcode/host/M114.cpp index 75356ff66fee..cdb9efb71b26 100644 --- a/Marlin/src/gcode/host/M114.cpp +++ b/Marlin/src/gcode/host/M114.cpp @@ -34,7 +34,7 @@ #include "../../core/debug_out.h" #endif - void report_xyze(const xyze_pos_t &pos, const uint8_t n=XYZE, const uint8_t precision=3) { + void report_all_axis_pos(const xyze_pos_t &pos, const uint8_t n=XYZE, const uint8_t precision=3) { char str[12]; LOOP_L_N(a, n) { SERIAL_CHAR(' ', axis_codes[a], ':'); @@ -43,12 +43,12 @@ } SERIAL_EOL(); } - inline void report_xyz(const xyze_pos_t &pos) { report_xyze(pos, XYZ); } + inline void report_linear_axis_pos(const xyze_pos_t &pos) { report_all_axis_pos(pos, XYZ); } - void report_xyz(const xyz_pos_t &pos, const uint8_t precision=3) { + void report_linear_axis_pos(const xyz_pos_t &pos, const uint8_t precision=3) { char str[12]; - LOOP_XYZ(a) { - SERIAL_CHAR(' ', XYZ_CHAR(a), ':'); + LOOP_LINEAR_AXES(a) { + SERIAL_CHAR(' ', AXIS_CHAR(a), ':'); SERIAL_ECHO(dtostrf(pos[a], 1, precision, str)); } SERIAL_EOL(); @@ -57,11 +57,11 @@ void report_current_position_detail() { // Position as sent by G-code SERIAL_ECHOPGM("\nLogical:"); - report_xyz(current_position.asLogical()); + report_linear_axis_pos(current_position.asLogical()); // Cartesian position in native machine space SERIAL_ECHOPGM("Raw: "); - report_xyz(current_position); + report_linear_axis_pos(current_position); xyze_pos_t leveled = current_position; @@ -69,20 +69,20 @@ // Current position with leveling applied SERIAL_ECHOPGM("Leveled:"); planner.apply_leveling(leveled); - report_xyz(leveled); + report_linear_axis_pos(leveled); // Test planner un-leveling. This should match the Raw result. SERIAL_ECHOPGM("UnLevel:"); xyze_pos_t unleveled = leveled; planner.unapply_leveling(unleveled); - report_xyz(unleveled); + report_linear_axis_pos(unleveled); #endif #if IS_KINEMATIC // Kinematics applied to the leveled position SERIAL_ECHOPGM(TERN(IS_SCARA, "ScaraK: ", "DeltaK: ")); inverse_kinematics(leveled); // writes delta[] - report_xyz(delta); + report_linear_axis_pos(delta); #endif planner.synchronize(); @@ -125,6 +125,15 @@ #if AXIS_IS_L64XX(Z4) REPORT_ABSOLUTE_POS(Z4); #endif + #if AXIS_IS_L64XX(I) + REPORT_ABSOLUTE_POS(I); + #endif + #if AXIS_IS_L64XX(J) + REPORT_ABSOLUTE_POS(J); + #endif + #if AXIS_IS_L64XX(K) + REPORT_ABSOLUTE_POS(K); + #endif #if AXIS_IS_L64XX(E0) REPORT_ABSOLUTE_POS(E0); #endif @@ -153,7 +162,7 @@ #endif // HAS_L64XX SERIAL_ECHOPGM("Stepper:"); - LOOP_XYZE(i) { + LOOP_LOGICAL_AXES(i) { SERIAL_CHAR(' ', axis_codes[i], ':'); SERIAL_ECHO(stepper.position((AxisEnum)i)); } @@ -165,17 +174,25 @@ planner.get_axis_position_degrees(B_AXIS) }; SERIAL_ECHOPGM("Degrees:"); - report_xyze(deg, 2); + report_all_axis_pos(deg, 2); #endif SERIAL_ECHOPGM("FromStp:"); get_cartesian_from_steppers(); // writes 'cartes' (with forward kinematics) - xyze_pos_t from_steppers = { cartes.x, cartes.y, cartes.z, planner.get_axis_position_mm(E_AXIS) }; - report_xyze(from_steppers); + xyze_pos_t from_steppers = LOGICAL_AXIS_ARRAY( + planner.get_axis_position_mm(E_AXIS), + cartes.x, cartes.y, cartes.z, + planner.get_axis_position_mm(I_AXIS), + planner.get_axis_position_mm(J_AXIS), + planner.get_axis_position_mm(K_AXIS) + ); + report_all_axis_pos(from_steppers); const xyze_float_t diff = from_steppers - leveled; SERIAL_ECHOPGM("Diff: "); - report_xyze(diff); + report_all_axis_pos(diff); + + TERN_(FULL_REPORT_TO_HOST_FEATURE, report_current_grblstate_moving()); } #endif // M114_DETAIL @@ -191,7 +208,7 @@ void GcodeSuite::M114() { #if ENABLED(M114_DETAIL) - if (parser.seen('D')) { + if (parser.seen_test('D')) { #if DISABLED(M114_LEGACY) planner.synchronize(); #endif @@ -199,16 +216,20 @@ void GcodeSuite::M114() { report_current_position_detail(); return; } - if (parser.seen('E')) { - SERIAL_ECHOLNPAIR("Count E:", stepper.position(E_AXIS)); - return; - } + #if HAS_EXTRUDERS + if (parser.seen_test('E')) { + SERIAL_ECHOLNPGM("Count E:", stepper.position(E_AXIS)); + return; + } + #endif #endif #if ENABLED(M114_REALTIME) - if (parser.seen('R')) { report_real_position(); return; } + if (parser.seen_test('R')) { report_real_position(); return; } #endif TERN_(M114_LEGACY, planner.synchronize()); report_current_position_projected(); + + TERN_(FULL_REPORT_TO_HOST_FEATURE, report_current_grblstate_moving()); } diff --git a/Marlin/src/gcode/host/M115.cpp b/Marlin/src/gcode/host/M115.cpp index 0501f3f60bcc..1c106977bf00 100644 --- a/Marlin/src/gcode/host/M115.cpp +++ b/Marlin/src/gcode/host/M115.cpp @@ -22,6 +22,8 @@ #include "../gcode.h" #include "../../inc/MarlinConfig.h" +#include "../queue.h" // for getting the command port + #if ENABLED(M115_GEOMETRY_REPORT) #include "../../module/motion.h" @@ -34,8 +36,8 @@ #if ENABLED(EXTENDED_CAPABILITIES_REPORT) static void cap_line(PGM_P const name, bool ena=false) { SERIAL_ECHOPGM("Cap:"); - serialprintPGM(name); - SERIAL_CHAR(':', ena ? '1' : '0'); + SERIAL_ECHOPGM_P(name); + SERIAL_CHAR(':', '0' + ena); SERIAL_EOL(); } #endif @@ -52,6 +54,9 @@ void GcodeSuite::M115() { "PROTOCOL_VERSION:" PROTOCOL_VERSION " " "MACHINE_TYPE:" MACHINE_NAME " " "EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " " + #if LINEAR_AXES != XYZ + "AXIS_COUNT:" STRINGIFY(LINEAR_AXES) " " + #endif #ifdef MACHINE_UUID "UUID:" MACHINE_UUID #endif @@ -59,6 +64,9 @@ void GcodeSuite::M115() { #if ENABLED(EXTENDED_CAPABILITIES_REPORT) + // The port that sent M115 + serial_index_t port = queue.ring_buffer.command_port(); + // PAREN_COMMENTS TERN_(PAREN_COMMENTS, cap_line(PSTR("PAREN_COMMENTS"), true)); @@ -69,7 +77,7 @@ void GcodeSuite::M115() { cap_line(PSTR("SERIAL_XON_XOFF"), ENABLED(SERIAL_XON_XOFF)); // BINARY_FILE_TRANSFER (M28 B1) - cap_line(PSTR("BINARY_FILE_TRANSFER"), ENABLED(BINARY_FILE_TRANSFER)); + cap_line(PSTR("BINARY_FILE_TRANSFER"), ENABLED(BINARY_FILE_TRANSFER)); // TODO: Use SERIAL_IMPL.has_feature(port, SerialFeature::BinaryFileTransfer) once implemented // EEPROM (M500, M501) cap_line(PSTR("EEPROM"), ENABLED(EEPROM_SETTINGS)); @@ -77,6 +85,9 @@ void GcodeSuite::M115() { // Volumetric Extrusion (M200) cap_line(PSTR("VOLUMETRIC"), DISABLED(NO_VOLUMETRICS)); + // AUTOREPORT_POS (M154) + cap_line(PSTR("AUTOREPORT_POS"), ENABLED(AUTO_REPORT_POSITION)); + // AUTOREPORT_TEMP (M155) cap_line(PSTR("AUTOREPORT_TEMP"), ENABLED(AUTO_REPORT_TEMPERATURES)); @@ -106,11 +117,14 @@ void GcodeSuite::M115() { // TOGGLE_LIGHTS (M355) cap_line(PSTR("TOGGLE_LIGHTS"), ENABLED(CASE_LIGHT_ENABLE)); - cap_line(PSTR("CASE_LIGHT_BRIGHTNESS"), TERN0(CASE_LIGHT_ENABLE, TERN0(CASELIGHT_USES_BRIGHTNESS, TERN(CASE_LIGHT_USE_NEOPIXEL, true, PWM_PIN(CASE_LIGHT_PIN))))); + cap_line(PSTR("CASE_LIGHT_BRIGHTNESS"), TERN0(CASE_LIGHT_ENABLE, caselight.has_brightness())); // EMERGENCY_PARSER (M108, M112, M410, M876) cap_line(PSTR("EMERGENCY_PARSER"), ENABLED(EMERGENCY_PARSER)); + // HOST ACTION COMMANDS (paused, resume, resumed, cancel, etc.) + cap_line(PSTR("HOST_ACTION_COMMANDS"), ENABLED(HOST_ACTION_COMMANDS)); + // PROMPT SUPPORT (M876) cap_line(PSTR("PROMPT_SUPPORT"), ENABLED(HOST_PROMPT_SUPPORT)); @@ -120,6 +134,9 @@ void GcodeSuite::M115() { // REPEAT (M808) cap_line(PSTR("REPEAT"), ENABLED(GCODE_REPEAT_MARKERS)); + // SD_WRITE (M928, M28, M29) + cap_line(PSTR("SD_WRITE"), ENABLED(SDSUPPORT) && DISABLED(SDCARD_READONLY)); + // AUTOREPORT_SD_STATUS (M27 extension) cap_line(PSTR("AUTOREPORT_SD_STATUS"), ENABLED(AUTO_REPORT_SD_STATUS)); @@ -141,19 +158,24 @@ void GcodeSuite::M115() { // CHAMBER_TEMPERATURE (M141, M191) cap_line(PSTR("CHAMBER_TEMPERATURE"), ENABLED(HAS_HEATED_CHAMBER)); - // MEATPACK Compresson - cap_line(PSTR("MEATPACK"), ENABLED(MEATPACK)); + // COOLER_TEMPERATURE (M143, M193) + cap_line(PSTR("COOLER_TEMPERATURE"), ENABLED(HAS_COOLER)); + + // MEATPACK Compression + cap_line(PSTR("MEATPACK"), SERIAL_IMPL.has_feature(port, SerialFeature::MeatPack)); // Machine Geometry #if ENABLED(M115_GEOMETRY_REPORT) - const xyz_pos_t dmin = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS }, + const xyz_pos_t bmin = { 0, 0, 0 }, + bmax = { X_BED_SIZE , Y_BED_SIZE, Z_MAX_POS }, + dmin = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS }, dmax = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS }; - xyz_pos_t cmin = dmin, cmax = dmax; + xyz_pos_t cmin = bmin, cmax = bmax; apply_motion_limits(cmin); apply_motion_limits(cmax); const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(), wmin = cmin.asLogical(), wmax = cmax.asLogical(); - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "area:{" "full:{" "min:{x:", lmin.x, ",y:", lmin.y, ",z:", lmin.z, "}," diff --git a/Marlin/src/gcode/host/M118.cpp b/Marlin/src/gcode/host/M118.cpp index 73115d5c0afb..d6e591add947 100644 --- a/Marlin/src/gcode/host/M118.cpp +++ b/Marlin/src/gcode/host/M118.cpp @@ -52,15 +52,9 @@ void GcodeSuite::M118() { while (*p == ' ') ++p; } - #if HAS_MULTI_SERIAL - const int8_t old_serial = multiSerial.portMask; - if (WITHIN(port, 0, NUM_SERIAL)) - multiSerial.portMask = port ? _BV(port - 1) : SERIAL_ALL; - #endif + PORT_REDIRECT(WITHIN(port, 0, NUM_SERIAL) ? (port ? SERIAL_PORTMASK(port - 1) : SerialMask::All) : multiSerial.portMask); if (hasE) SERIAL_ECHO_START(); if (hasA) SERIAL_ECHOPGM("//"); SERIAL_ECHOLN(p); - - TERN_(HAS_MULTI_SERIAL, multiSerial.portMask = old_serial); } diff --git a/Marlin/src/gcode/host/M154.cpp b/Marlin/src/gcode/host/M154.cpp new file mode 100644 index 000000000000..156e6b69b624 --- /dev/null +++ b/Marlin/src/gcode/host/M154.cpp @@ -0,0 +1,40 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../inc/MarlinConfigPre.h" + +#if ENABLED(AUTO_REPORT_POSITION) + +#include "../gcode.h" +#include "../../module/motion.h" + +/** + * M154: Set position auto-report interval. M154 S + */ +void GcodeSuite::M154() { + + if (parser.seenval('S')) + position_auto_reporter.set_interval(parser.value_byte()); + +} + +#endif // AUTO_REPORT_POSITION diff --git a/Marlin/src/gcode/host/M360.cpp b/Marlin/src/gcode/host/M360.cpp index f49a32cc618c..1830dea3bfd7 100644 --- a/Marlin/src/gcode/host/M360.cpp +++ b/Marlin/src/gcode/host/M360.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../../inc/MarlinConfig.h" #if ENABLED(REPETIER_GCODE_M360) @@ -28,16 +29,15 @@ #include "../../module/motion.h" #include "../../module/planner.h" -#if EXTRUDERS +#if HAS_EXTRUDERS #include "../../module/temperature.h" #endif static void config_prefix(PGM_P const name, PGM_P const pref=nullptr, const int8_t ind=-1) { SERIAL_ECHOPGM("Config:"); - if (pref) serialprintPGM(pref); - if (ind >= 0) { SERIAL_ECHO(int(ind)); SERIAL_CHAR(':'); } - serialprintPGM(name); - SERIAL_CHAR(':'); + if (pref) SERIAL_ECHOPGM_P(pref); + if (ind >= 0) { SERIAL_ECHO(ind); SERIAL_CHAR(':'); } + SERIAL_ECHOPGM_P(name, AS_CHAR(':')); } static void config_line(PGM_P const name, const float val, PGM_P const pref=nullptr, const int8_t ind=-1) { config_prefix(name, pref, ind); @@ -172,13 +172,13 @@ void GcodeSuite::M360() { // Per-Extruder settings // config_line(PSTR("NumExtruder"), EXTRUDERS); - #if EXTRUDERS + #if HAS_EXTRUDERS LOOP_L_N(e, EXTRUDERS) { config_line_e(e, JERK_STR, TERN(HAS_LINEAR_E_JERK, planner.max_e_jerk[E_INDEX_N(e)], TERN(HAS_CLASSIC_JERK, planner.max_jerk.e, DEFAULT_EJERK))); config_line_e(e, PSTR("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]); config_line_e(e, PSTR("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]); config_line_e(e, PSTR("Diameter"), TERN(NO_VOLUMETRICS, DEFAULT_NOMINAL_FILAMENT_DIA, planner.filament_size[e])); - config_line_e(e, PSTR("MaxTemp"), thermalManager.heater_maxtemp[e]); + config_line_e(e, PSTR("MaxTemp"), thermalManager.hotend_maxtemp[e]); } #endif } diff --git a/Marlin/src/gcode/host/M876.cpp b/Marlin/src/gcode/host/M876.cpp index 0d8256cf0874..00efb013d210 100644 --- a/Marlin/src/gcode/host/M876.cpp +++ b/Marlin/src/gcode/host/M876.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../../inc/MarlinConfig.h" #if ENABLED(HOST_PROMPT_SUPPORT) && DISABLED(EMERGENCY_PARSER) diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 414c4ce02396..241f11c813e2 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -35,6 +35,8 @@ #include "../../lcd/marlinui.h" #elif ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" #endif #if ENABLED(HOST_PROMPT_SUPPORT) @@ -68,6 +70,11 @@ void GcodeSuite::M0_M1() { ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string?? else ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT)); + #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + if (parser.string_arg) + DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT)); + else + DWIN_Popup_Confirm(ICON_BLTouch, GET_TEXT_F(MSG_STOPPED), GET_TEXT_F(MSG_USERWAIT)); #else if (parser.string_arg) { @@ -79,7 +86,7 @@ void GcodeSuite::M0_M1() { TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, parser.codenum ? PSTR("M1 Stop") : PSTR("M0 Stop"), CONTINUE_STR)); - wait_for_user_response(ms); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(ms)); TERN_(HAS_LCD_MENU, ui.reset_status()); } diff --git a/Marlin/src/gcode/lcd/M117.cpp b/Marlin/src/gcode/lcd/M117.cpp index 59305d94c5b5..f26694bd6463 100644 --- a/Marlin/src/gcode/lcd/M117.cpp +++ b/Marlin/src/gcode/lcd/M117.cpp @@ -20,6 +20,10 @@ * */ +#include "../../inc/MarlinConfig.h" + +#if HAS_STATUS_MESSAGE + #include "../gcode.h" #include "../../lcd/marlinui.h" @@ -34,3 +38,5 @@ void GcodeSuite::M117() { ui.reset_status(); } + +#endif // HAS_STATUS_MESSAGE diff --git a/Marlin/src/gcode/lcd/M145.cpp b/Marlin/src/gcode/lcd/M145.cpp index 84a7e75aa440..77fd425763d0 100644 --- a/Marlin/src/gcode/lcd/M145.cpp +++ b/Marlin/src/gcode/lcd/M145.cpp @@ -27,6 +27,10 @@ #include "../gcode.h" #include "../../lcd/marlinui.h" +#if HAS_HOTEND + #include "../../module/temperature.h" +#endif + /** * M145: Set the heatup state for a material in the LCD menu * @@ -43,7 +47,7 @@ void GcodeSuite::M145() { preheat_t &mat = ui.material_preset[material]; #if HAS_HOTEND if (parser.seenval('H')) - mat.hotend_temp = constrain(parser.value_int(), EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP) - (HOTEND_OVERSHOOT)); + mat.hotend_temp = constrain(parser.value_int(), EXTRUDE_MINTEMP, thermalManager.hotend_max_target(0)); #endif #if HAS_HEATED_BED if (parser.seenval('B')) @@ -56,4 +60,23 @@ void GcodeSuite::M145() { } } +void GcodeSuite::M145_report(const bool forReplay/*=true*/) { + report_heading(forReplay, PSTR(STR_MATERIAL_HEATUP)); + LOOP_L_N(i, PREHEAT_COUNT) { + report_echo_start(forReplay); + SERIAL_ECHOLNPGM_P( + PSTR(" M145 S"), i + #if HAS_HOTEND + , PSTR(" H"), parser.to_temp_units(ui.material_preset[i].hotend_temp) + #endif + #if HAS_HEATED_BED + , SP_B_STR, parser.to_temp_units(ui.material_preset[i].bed_temp) + #endif + #if HAS_FAN + , PSTR(" F"), ui.material_preset[i].fan_speed + #endif + ); + } +} + #endif // PREHEAT_COUNT diff --git a/Marlin/src/gcode/lcd/M250.cpp b/Marlin/src/gcode/lcd/M250.cpp index f553044d31c0..083fb37f65ca 100644 --- a/Marlin/src/gcode/lcd/M250.cpp +++ b/Marlin/src/gcode/lcd/M250.cpp @@ -31,8 +31,15 @@ * M250: Read and optionally set the LCD contrast */ void GcodeSuite::M250() { - if (parser.seen('C')) ui.set_contrast(parser.value_int()); - SERIAL_ECHOLNPAIR("LCD Contrast: ", ui.contrast); + if (parser.seenval('C')) + ui.set_contrast(parser.value_byte()); + else + M250_report(); +} + +void GcodeSuite::M250_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_LCD_CONTRAST)); + SERIAL_ECHOLNPGM(" M250 C", ui.contrast); } #endif // HAS_LCD_CONTRAST diff --git a/Marlin/src/gcode/lcd/M256.cpp b/Marlin/src/gcode/lcd/M256.cpp new file mode 100644 index 000000000000..ee187cc2e10e --- /dev/null +++ b/Marlin/src/gcode/lcd/M256.cpp @@ -0,0 +1,44 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../../inc/MarlinConfig.h" + +#if HAS_LCD_BRIGHTNESS + +#include "../gcode.h" +#include "../../lcd/marlinui.h" + +/** + * M256: Set the LCD brightness + */ +void GcodeSuite::M256() { + if (parser.seenval('B')) + ui.set_brightness(parser.value_int()); + else + M256_report(); +} + +void GcodeSuite::M256_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_LCD_BRIGHTNESS)); + SERIAL_ECHOLNPGM(" M256 B", ui.brightness); +} + +#endif // HAS_LCD_BRIGHTNESS diff --git a/Marlin/src/gcode/lcd/M414.cpp b/Marlin/src/gcode/lcd/M414.cpp index 760028a899f2..0eac980e0f92 100644 --- a/Marlin/src/gcode/lcd/M414.cpp +++ b/Marlin/src/gcode/lcd/M414.cpp @@ -38,7 +38,14 @@ void GcodeSuite::M414() { if (parser.seenval('S')) ui.set_language(parser.value_byte()); + else + M414_report(); } +void GcodeSuite::M414_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_UI_LANGUAGE)); + SERIAL_ECHOLNPGM(" M414 S", ui.language); +} + #endif // HAS_MULTI_LANGUAGE diff --git a/Marlin/src/gcode/lcd/M73.cpp b/Marlin/src/gcode/lcd/M73.cpp index 5b135bdff8bd..b7a9b3459e52 100644 --- a/Marlin/src/gcode/lcd/M73.cpp +++ b/Marlin/src/gcode/lcd/M73.cpp @@ -28,6 +28,10 @@ #include "../../lcd/marlinui.h" #include "../../sd/cardreader.h" +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" +#endif + /** * M73: Set percentage complete (for display on LCD) * @@ -35,13 +39,23 @@ * M73 P25 ; Set progress to 25% */ void GcodeSuite::M73() { - if (parser.seen('P')) - ui.set_progress((PROGRESS_SCALE) > 1 - ? parser.value_float() * (PROGRESS_SCALE) - : parser.value_byte() - ); - #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) - if (parser.seen('R')) ui.set_remaining_time(60 * parser.value_ulong()); + + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + + DWIN_Progress_Update(); + + #else + + if (parser.seenval('P')) + ui.set_progress((PROGRESS_SCALE) > 1 + ? parser.value_float() * (PROGRESS_SCALE) + : parser.value_byte() + ); + + #if ENABLED(USE_M73_REMAINING_TIME) + if (parser.seenval('R')) ui.set_remaining_time(60 * parser.value_ulong()); + #endif + #endif } diff --git a/Marlin/src/gcode/lcd/M995.cpp b/Marlin/src/gcode/lcd/M995.cpp index bc8dc35d4e05..d5f825c0c8d7 100644 --- a/Marlin/src/gcode/lcd/M995.cpp +++ b/Marlin/src/gcode/lcd/M995.cpp @@ -26,8 +26,8 @@ #include "../gcode.h" -#if ENABLED(TFT_LVGL_UI) - #include "../../lcd/extui/lib/mks_ui/draw_touch_calibration.h" +#if HAS_TFT_LVGL_UI + #include "../../lcd/extui/mks_ui/draw_touch_calibration.h" #else #include "../../lcd/menu/menu.h" #endif @@ -37,7 +37,7 @@ */ void GcodeSuite::M995() { - #if ENABLED(TFT_LVGL_UI) + #if HAS_TFT_LVGL_UI lv_draw_touch_calibration_screen(); #else ui.goto_screen(touch_screen_calibration); diff --git a/Marlin/src/gcode/motion/G0_G1.cpp b/Marlin/src/gcode/motion/G0_G1.cpp index 9ac49bd93cf1..cc6979b74c12 100644 --- a/Marlin/src/gcode/motion/G0_G1.cpp +++ b/Marlin/src/gcode/motion/G0_G1.cpp @@ -49,11 +49,17 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) { if (IsRunning() #if ENABLED(NO_MOTION_BEFORE_HOMING) && !homing_needed_error( - (parser.seen('X') ? _BV(X_AXIS) : 0) - | (parser.seen('Y') ? _BV(Y_AXIS) : 0) - | (parser.seen('Z') ? _BV(Z_AXIS) : 0) ) + LINEAR_AXIS_GANG( + (parser.seen_test('X') ? _BV(X_AXIS) : 0), + | (parser.seen_test('Y') ? _BV(Y_AXIS) : 0), + | (parser.seen_test('Z') ? _BV(Z_AXIS) : 0), + | (parser.seen_test(AXIS4_NAME) ? _BV(I_AXIS) : 0), + | (parser.seen_test(AXIS5_NAME) ? _BV(J_AXIS) : 0), + | (parser.seen_test(AXIS6_NAME) ? _BV(K_AXIS) : 0)) + ) #endif ) { + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING)); #ifdef G0_FEEDRATE feedRate_t old_feedrate; @@ -65,7 +71,7 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) { #endif #endif - get_destination_from_command(); // Get X Y Z E F (and set cutter power) + get_destination_from_command(); // Get X Y [Z[I[J[K]]]] [E] F (and set cutter power) #ifdef G0_FEEDRATE if (fast_move) { @@ -82,7 +88,9 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) { if (MIN_AUTORETRACT <= MAX_AUTORETRACT) { // When M209 Autoretract is enabled, convert E-only moves to firmware retract/recover moves - if (fwretract.autoretract_enabled && parser.seen('E') && !(parser.seen('X') || parser.seen('Y') || parser.seen('Z'))) { + if (fwretract.autoretract_enabled && parser.seen_test('E') + && !parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR)) + ) { const float echange = destination.e - current_position.e; // Is this a retract or recover move? if (WITHIN(ABS(echange), MIN_AUTORETRACT, MAX_AUTORETRACT) && fwretract.retracted[active_extruder] == (echange > 0.0)) { @@ -116,6 +124,9 @@ void GcodeSuite::G0_G1(TERN_(HAS_FAST_MOVES, const bool fast_move/*=false*/)) { planner.synchronize(); SERIAL_ECHOLNPGM(STR_Z_MOVE_COMP); } + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE)); + #else + TERN_(FULL_REPORT_TO_HOST_FEATURE, report_current_grblstate_moving()); #endif } } diff --git a/Marlin/src/gcode/motion/G2_G3.cpp b/Marlin/src/gcode/motion/G2_G3.cpp index 61e50247f3f7..33167d9dff8d 100644 --- a/Marlin/src/gcode/motion/G2_G3.cpp +++ b/Marlin/src/gcode/motion/G2_G3.cpp @@ -39,14 +39,21 @@ #undef N_ARC_CORRECTION #define N_ARC_CORRECTION 1 #endif +#ifndef MIN_CIRCLE_SEGMENTS + #define MIN_CIRCLE_SEGMENTS 72 // 5° per segment +#endif +#if !defined(MAX_ARC_SEGMENT_MM) && defined(MIN_ARC_SEGMENT_MM) + #define MAX_ARC_SEGMENT_MM MIN_ARC_SEGMENT_MM +#elif !defined(MIN_ARC_SEGMENT_MM) && defined(MAX_ARC_SEGMENT_MM) + #define MIN_ARC_SEGMENT_MM MAX_ARC_SEGMENT_MM +#endif + +#define ARC_LIJK_CODE(L,I,J,K) CODE_N(SUB2(LINEAR_AXES),L,I,J,K) +#define ARC_LIJKE_CODE(L,I,J,K,E) ARC_LIJK_CODE(L,I,J,K); CODE_ITEM_E(E) /** - * Plan an arc in 2 dimensions, with optional linear motion in a 3rd dimension - * - * The arc is traced by generating many small linear segments, as configured by - * MM_PER_ARC_SEGMENT (Default 1mm). In the future we hope more slicers will include - * an option to generate G2/G3 arcs for curved surfaces, as this will allow faster - * boards to produce much smoother curved surfaces. + * Plan an arc in 2 dimensions, with linear motion in the other axes. + * The arc is traced with many small linear segments according to the configuration. */ void plan_arc( const xyze_pos_t &cart, // Destination position @@ -55,40 +62,45 @@ void plan_arc( const uint8_t circles // Take the scenic route ) { #if ENABLED(CNC_WORKSPACE_PLANES) - AxisEnum p_axis, q_axis, l_axis; + AxisEnum axis_p, axis_q, axis_l; switch (gcode.workspace_plane) { default: - case GcodeSuite::PLANE_XY: p_axis = X_AXIS; q_axis = Y_AXIS; l_axis = Z_AXIS; break; - case GcodeSuite::PLANE_YZ: p_axis = Y_AXIS; q_axis = Z_AXIS; l_axis = X_AXIS; break; - case GcodeSuite::PLANE_ZX: p_axis = Z_AXIS; q_axis = X_AXIS; l_axis = Y_AXIS; break; + case GcodeSuite::PLANE_XY: axis_p = X_AXIS; axis_q = Y_AXIS; axis_l = Z_AXIS; break; + case GcodeSuite::PLANE_YZ: axis_p = Y_AXIS; axis_q = Z_AXIS; axis_l = X_AXIS; break; + case GcodeSuite::PLANE_ZX: axis_p = Z_AXIS; axis_q = X_AXIS; axis_l = Y_AXIS; break; } #else - constexpr AxisEnum p_axis = X_AXIS, q_axis = Y_AXIS, l_axis = Z_AXIS; + constexpr AxisEnum axis_p = X_AXIS, axis_q = Y_AXIS OPTARG(HAS_Z_AXIS, axis_l = Z_AXIS); #endif // Radius vector from center to current location ab_float_t rvec = -offset; const float radius = HYPOT(rvec.a, rvec.b), - center_P = current_position[p_axis] - rvec.a, - center_Q = current_position[q_axis] - rvec.b, - rt_X = cart[p_axis] - center_P, - rt_Y = cart[q_axis] - center_Q, - start_L = current_position[l_axis]; - - #ifdef MIN_ARC_SEGMENTS - uint16_t min_segments = MIN_ARC_SEGMENTS; - #else - constexpr uint16_t min_segments = 1; - #endif + center_P = current_position[axis_p] - rvec.a, + center_Q = current_position[axis_q] - rvec.b, + rt_X = cart[axis_p] - center_P, + rt_Y = cart[axis_q] - center_Q; + + ARC_LIJK_CODE( + const float start_L = current_position[axis_l], + const float start_I = current_position.i, + const float start_J = current_position.j, + const float start_K = current_position.k + ); // Angle of rotation between position and target from the circle center. - float angular_travel; + float angular_travel, abs_angular_travel; + + // Minimum number of segments in an arc move + uint16_t min_segments = 1; // Do a full circle if starting and ending positions are "identical" - if (NEAR(current_position[p_axis], cart[p_axis]) && NEAR(current_position[q_axis], cart[q_axis])) { + if (NEAR(current_position[axis_p], cart[axis_p]) && NEAR(current_position[axis_q], cart[axis_q])) { // Preserve direction for circles angular_travel = clockwise ? -RADIANS(360) : RADIANS(360); + abs_angular_travel = RADIANS(360); + min_segments = MIN_CIRCLE_SEGMENTS; } else { // Calculate the angle @@ -103,51 +115,92 @@ void plan_arc( case 2: angular_travel += RADIANS(360); break; // Negative but CCW? Reverse direction. } - #ifdef MIN_ARC_SEGMENTS - min_segments = CEIL(min_segments * ABS(angular_travel) / RADIANS(360)); - NOLESS(min_segments, 1U); - #endif + abs_angular_travel = ABS(angular_travel); + + // Apply minimum segments to the arc + const float portion_of_circle = abs_angular_travel / RADIANS(360); // Portion of a complete circle (0 < N < 1) + min_segments = CEIL((MIN_CIRCLE_SEGMENTS) * portion_of_circle); // Minimum segments for the arc } - float linear_travel = cart[l_axis] - start_L, - extruder_travel = cart.e - current_position.e; + ARC_LIJKE_CODE( + float travel_L = cart[axis_l] - start_L, + float travel_I = cart.i - start_I, + float travel_J = cart.j - start_J, + float travel_K = cart.k - start_K, + float travel_E = cart.e - current_position.e + ); + + // If "P" specified circles, call plan_arc recursively then continue with the rest of the arc + if (TERN0(ARC_P_CIRCLES, circles)) { + const float total_angular = abs_angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder + part_per_circle = RADIANS(360) / total_angular; // Each circle's part of the total + + ARC_LIJKE_CODE( + const float per_circle_L = travel_L * part_per_circle, // L movement per circle + const float per_circle_I = travel_I * part_per_circle, + const float per_circle_J = travel_J * part_per_circle, + const float per_circle_K = travel_K * part_per_circle, + const float per_circle_E = travel_E * part_per_circle // E movement per circle + ); - // If circling around... - if (ENABLED(ARC_P_CIRCLES) && circles) { - const float total_angular = angular_travel + circles * RADIANS(360), // Total rotation with all circles and remainder - part_per_circle = RADIANS(360) / total_angular, // Each circle's part of the total - l_per_circle = linear_travel * part_per_circle, // L movement per circle - e_per_circle = extruder_travel * part_per_circle; // E movement per circle - xyze_pos_t temp_position = current_position; // for plan_arc to compare to current_position + xyze_pos_t temp_position = current_position; for (uint16_t n = circles; n--;) { - temp_position.e += e_per_circle; // Destination E axis - temp_position[l_axis] += l_per_circle; // Destination L axis - plan_arc(temp_position, offset, clockwise, 0); // Plan a single whole circle + ARC_LIJKE_CODE( // Destination Linear Axes + temp_position[axis_l] += per_circle_L, + temp_position.i += per_circle_I, + temp_position.j += per_circle_J, + temp_position.k += per_circle_K, + temp_position.e += per_circle_E // Destination E axis + ); + plan_arc(temp_position, offset, clockwise, 0); // Plan a single whole circle } - linear_travel = cart[l_axis] - current_position[l_axis]; - extruder_travel = cart.e - current_position.e; + ARC_LIJKE_CODE( + travel_L = cart[axis_l] - current_position[axis_l], + travel_I = cart.i - current_position.i, + travel_J = cart.j - current_position.j, + travel_K = cart.k - current_position.k, + travel_E = cart.e - current_position.e + ); } - const float flat_mm = radius * angular_travel, - mm_of_travel = linear_travel ? HYPOT(flat_mm, linear_travel) : ABS(flat_mm); - if (mm_of_travel < 0.001f) return; + // Millimeters in the arc, assuming it's flat + const float flat_mm = radius * abs_angular_travel; + // Return if the move is near zero + if (flat_mm < 0.0001f + GANG_N(SUB2(LINEAR_AXES), + && travel_L < 0.0001f, + && travel_I < 0.0001f, + && travel_J < 0.0001f, + && travel_K < 0.0001f + ) + ) return; + + // Feedrate for the move, scaled by the feedrate multiplier const feedRate_t scaled_fr_mm_s = MMS_SCALED(feedrate_mm_s); - // Start with a nominal segment length - float seg_length = ( - #ifdef ARC_SEGMENTS_PER_R - constrain(MM_PER_ARC_SEGMENT * radius, MM_PER_ARC_SEGMENT, ARC_SEGMENTS_PER_R) - #elif ARC_SEGMENTS_PER_SEC - _MAX(scaled_fr_mm_s * RECIPROCAL(ARC_SEGMENTS_PER_SEC), MM_PER_ARC_SEGMENT) + // Get the nominal segment length based on settings + const float nominal_segment_mm = ( + #if ARC_SEGMENTS_PER_SEC // Length based on segments per second and feedrate + constrain(scaled_fr_mm_s * RECIPROCAL(ARC_SEGMENTS_PER_SEC), MIN_ARC_SEGMENT_MM, MAX_ARC_SEGMENT_MM) #else - MM_PER_ARC_SEGMENT + MAX_ARC_SEGMENT_MM // Length using the maximum segment size #endif ); - // Divide total travel by nominal segment length - uint16_t segments = FLOOR(mm_of_travel / seg_length); - NOLESS(segments, min_segments); // At least some segments - seg_length = mm_of_travel / segments; + + // Number of whole segments based on the nominal segment length + const float nominal_segments = _MAX(FLOOR(flat_mm / nominal_segment_mm), min_segments); + + // A new segment length based on the required minimum + const float segment_mm = constrain(flat_mm / nominal_segments, MIN_ARC_SEGMENT_MM, MAX_ARC_SEGMENT_MM); + + // The number of whole segments in the arc, ignoring the remainder + uint16_t segments = FLOOR(flat_mm / segment_mm); + + // Are the segments now too few to reach the destination? + const float segmented_length = segment_mm * segments; + const bool tooshort = segmented_length < flat_mm - 0.0001f; + const float proportion = tooshort ? segmented_length / flat_mm : 1.0f; /** * Vector rotation by transformation matrix: r is the original vector, r_T is the rotated vector, @@ -164,7 +217,7 @@ void plan_arc( * tool precision in some cases. Therefore, arc path correction is implemented. * * Small angle approximation may be used to reduce computation overhead further. This approximation - * holds for everything, but very small circles and large MM_PER_ARC_SEGMENT values. In other words, + * holds for everything, but very small circles and large MAX_ARC_SEGMENT_MM values. In other words, * theta_per_segment would need to be greater than 0.1 rad and N_ARC_CORRECTION would need to be large * to cause an appreciable drift error. N_ARC_CORRECTION~=25 is more than small enough to correct for * numerical drift error. N_ARC_CORRECTION may be on the order a hundred(s) before error becomes an @@ -177,21 +230,36 @@ void plan_arc( */ // Vector rotation matrix values xyze_pos_t raw; - const float theta_per_segment = angular_travel / segments, - linear_per_segment = linear_travel / segments, - extruder_per_segment = extruder_travel / segments, + const float theta_per_segment = proportion * angular_travel / segments, sq_theta_per_segment = sq(theta_per_segment), sin_T = theta_per_segment - sq_theta_per_segment * theta_per_segment / 6, cos_T = 1 - 0.5f * sq_theta_per_segment; // Small angle approximation - // Initialize the linear axis - raw[l_axis] = current_position[l_axis]; + #if DISABLED(AUTO_BED_LEVELING_UBL) + ARC_LIJK_CODE( + const float per_segment_L = proportion * travel_L / segments, + const float per_segment_I = proportion * travel_I / segments, + const float per_segment_J = proportion * travel_J / segments, + const float per_segment_K = proportion * travel_K / segments + ); + #endif + + CODE_ITEM_E(const float extruder_per_segment = proportion * travel_E / segments); + + // For shortened segments, run all but the remainder in the loop + if (tooshort) segments++; - // Initialize the extruder axis - raw.e = current_position.e; + // Initialize all linear axes and E + ARC_LIJKE_CODE( + raw[axis_l] = current_position[axis_l], + raw.i = current_position.i, + raw.j = current_position.j, + raw.k = current_position.k, + raw.e = current_position.e + ); #if ENABLED(SCARA_FEEDRATE_SCALING) - const float inv_duration = scaled_fr_mm_s / seg_length; + const float inv_duration = scaled_fr_mm_s / segment_mm; #endif millis_t next_idle_ms = millis() + 200UL; @@ -203,8 +271,9 @@ void plan_arc( for (uint16_t i = 1; i < segments; i++) { // Iterate (segments-1) times thermalManager.manage_heater(); - if (ELAPSED(millis(), next_idle_ms)) { - next_idle_ms = millis() + 200UL; + const millis_t ms = millis(); + if (ELAPSED(ms, next_idle_ms)) { + next_idle_ms = ms + 200UL; idle(); } @@ -232,15 +301,16 @@ void plan_arc( } // Update raw location - raw[p_axis] = center_P + rvec.a; - raw[q_axis] = center_Q + rvec.b; - #if ENABLED(AUTO_BED_LEVELING_UBL) - raw[l_axis] = start_L; - UNUSED(linear_per_segment); - #else - raw[l_axis] += linear_per_segment; - #endif - raw.e += extruder_per_segment; + raw[axis_p] = center_P + rvec.a; + raw[axis_q] = center_Q + rvec.b; + ARC_LIJKE_CODE( + #if ENABLED(AUTO_BED_LEVELING_UBL) + raw[axis_l] = start_L, raw.i = start_I, raw.j = start_J, raw.k = start_K + #else + raw[axis_l] += per_segment_L, raw.i += per_segment_I, raw.j += per_segment_J, raw.k += per_segment_K + #endif + , raw.e += extruder_per_segment + ); apply_motion_limits(raw); @@ -248,16 +318,15 @@ void plan_arc( planner.apply_leveling(raw); #endif - if (!planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, 0 - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif - )) break; + if (!planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, 0 OPTARG(SCARA_FEEDRATE_SCALING, inv_duration))) + break; } // Ensure last segment arrives at target location. raw = cart; - TERN_(AUTO_BED_LEVELING_UBL, raw[l_axis] = start_L); + #if ENABLED(AUTO_BED_LEVELING_UBL) + ARC_LIJK_CODE(raw[axis_l] = start_L, raw.i = start_I, raw.j = start_J, raw.k = start_K); + #endif apply_motion_limits(raw); @@ -265,13 +334,11 @@ void plan_arc( planner.apply_leveling(raw); #endif - planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, 0 - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif - ); + planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, 0 OPTARG(SCARA_FEEDRATE_SCALING, inv_duration)); - TERN_(AUTO_BED_LEVELING_UBL, raw[l_axis] = start_L); + #if ENABLED(AUTO_BED_LEVELING_UBL) + ARC_LIJK_CODE(raw[axis_l] = start_L, raw.i = start_I, raw.j = start_J, raw.k = start_K); + #endif current_position = raw; } // plan_arc @@ -291,12 +358,12 @@ void plan_arc( * Mixing IJ/JK/KI with R will throw an error. * * - R specifies the radius. X or Y (Y or Z / Z or X) is required. - * Omitting both XY/YZ/ZX will throw an error. - * XY/YZ/ZX must differ from the current XY/YZ/ZX. - * Mixing R with IJ/JK/KI will throw an error. + * Omitting both XY/YZ/ZX will throw an error. + * XY/YZ/ZX must differ from the current XY/YZ/ZX. + * Mixing R with IJ/JK/KI will throw an error. * * - P specifies the number of full circles to do - * before the specified arc move. + * before the specified arc move. * * Examples: * @@ -306,12 +373,14 @@ void plan_arc( void GcodeSuite::G2_G3(const bool clockwise) { if (MOTION_CONDITIONS) { + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_RUNNING)); + #if ENABLED(SF_ARC_FIX) const bool relative_mode_backup = relative_mode; relative_mode = true; #endif - get_destination_from_command(); // Get X Y Z E F (and set cutter power) + get_destination_from_command(); // Get X Y [Z[I[J[K]]]] [E] F (and set cutter power) TERN_(SF_ARC_FIX, relative_mode = relative_mode_backup); @@ -364,6 +433,8 @@ void GcodeSuite::G2_G3(const bool clockwise) { } else SERIAL_ERROR_MSG(STR_ERR_ARC_ARGS); + + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_IDLE)); } } diff --git a/Marlin/src/gcode/motion/G6.cpp b/Marlin/src/gcode/motion/G6.cpp index 168dc28abd23..a57a293e06f8 100644 --- a/Marlin/src/gcode/motion/G6.cpp +++ b/Marlin/src/gcode/motion/G6.cpp @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ + #include "../../inc/MarlinConfig.h" #if ENABLED(DIRECT_STEPPING) diff --git a/Marlin/src/gcode/motion/M290.cpp b/Marlin/src/gcode/motion/M290.cpp index df8dad7999f1..747ddd64de19 100644 --- a/Marlin/src/gcode/motion/M290.cpp +++ b/Marlin/src/gcode/motion/M290.cpp @@ -39,17 +39,15 @@ #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - FORCE_INLINE void mod_probe_offset(const float &offs) { + FORCE_INLINE void mod_probe_offset(const_float_t offs) { if (TERN1(BABYSTEP_HOTEND_Z_OFFSET, active_extruder == 0)) { probe.offset.z += offs; - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET " " STR_Z, probe.offset.z); + SERIAL_ECHO_MSG(STR_PROBE_OFFSET " " STR_Z, probe.offset.z); } else { #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) hotend_offset[active_extruder].z -= offs; - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET STR_Z ": ", hotend_offset[active_extruder].z); + SERIAL_ECHO_MSG(STR_PROBE_OFFSET STR_Z ": ", hotend_offset[active_extruder].z); #endif } } @@ -71,12 +69,12 @@ */ void GcodeSuite::M290() { #if ENABLED(BABYSTEP_XY) - LOOP_XYZ(a) - if (parser.seenval(XYZ_CHAR(a)) || (a == Z_AXIS && parser.seenval('S'))) { + LOOP_LINEAR_AXES(a) + if (parser.seenval(AXIS_CHAR(a)) || (a == Z_AXIS && parser.seenval('S'))) { const float offs = constrain(parser.value_axis_units((AxisEnum)a), -2, 2); babystep.add_mm((AxisEnum)a, offs); #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - if (a == Z_AXIS && (!parser.seen('P') || parser.value_bool())) mod_probe_offset(offs); + if (a == Z_AXIS && parser.boolval('P', true)) mod_probe_offset(offs); #endif } #else @@ -84,22 +82,22 @@ void GcodeSuite::M290() { const float offs = constrain(parser.value_axis_units(Z_AXIS), -2, 2); babystep.add_mm(Z_AXIS, offs); #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - if (!parser.seen('P') || parser.value_bool()) mod_probe_offset(offs); + if (parser.boolval('P', true)) mod_probe_offset(offs); #endif } #endif - if (!parser.seen("XYZ") || parser.seen('R')) { + if (!parser.seen(LINEAR_AXIS_GANG("X", "Y", "Z", AXIS4_STR, AXIS5_STR, AXIS6_STR)) || parser.seen('R')) { SERIAL_ECHO_START(); #if ENABLED(BABYSTEP_ZPROBE_OFFSET) - SERIAL_ECHOLNPAIR(STR_PROBE_OFFSET " " STR_Z, probe.offset.z); + SERIAL_ECHOLNPGM(STR_PROBE_OFFSET " " STR_Z, probe.offset.z); #endif #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) { - SERIAL_ECHOLNPAIR_P( - PSTR("Hotend "), int(active_extruder) + SERIAL_ECHOLNPGM_P( + PSTR("Hotend "), active_extruder #if ENABLED(BABYSTEP_XY) , PSTR("Offset X"), hotend_offset[active_extruder].x , SP_Y_STR, hotend_offset[active_extruder].y @@ -113,12 +111,12 @@ void GcodeSuite::M290() { #endif #if ENABLED(MESH_BED_LEVELING) - SERIAL_ECHOLNPAIR("MBL Adjust Z", mbl.z_offset); + SERIAL_ECHOLNPGM("MBL Adjust Z", mbl.z_offset); #endif #if ENABLED(BABYSTEP_DISPLAY_TOTAL) { - SERIAL_ECHOLNPAIR_P( + SERIAL_ECHOLNPGM_P( #if ENABLED(BABYSTEP_XY) PSTR("Babystep X"), babystep.axis_total[X_AXIS] , SP_Y_STR, babystep.axis_total[Y_AXIS] diff --git a/Marlin/src/gcode/parser.cpp b/Marlin/src/gcode/parser.cpp index a513c4b59611..4d4fdae0d621 100644 --- a/Marlin/src/gcode/parser.cpp +++ b/Marlin/src/gcode/parser.cpp @@ -47,13 +47,13 @@ char *GCodeParser::command_ptr, char GCodeParser::command_letter; uint16_t GCodeParser::codenum; -#if ENABLED(USE_GCODE_SUBCODES) +#if USE_GCODE_SUBCODES uint8_t GCodeParser::subcode; #endif #if ENABLED(GCODE_MOTION_MODES) int16_t GCodeParser::motion_mode_codenum = -1; - #if ENABLED(USE_GCODE_SUBCODES) + #if USE_GCODE_SUBCODES uint8_t GCodeParser::motion_mode_subcode; #endif #endif @@ -106,8 +106,10 @@ void GCodeParser::reset() { #endif -// Populate all fields by parsing a single line of GCode -// 58 bytes of SRAM are used to speed up seen/value +/** + * Populate the command line state (command_letter, codenum, subcode, and string_arg) + * by parsing a single line of GCode. 58 bytes of SRAM are used to speed up seen/value. + */ void GCodeParser::parse(char *p) { reset(); // No codes to report @@ -147,11 +149,31 @@ void GCodeParser::parse(char *p) { #define SIGNED_CODENUM 1 #endif - // Bail if the letter is not G, M, or T - // (or a valid parameter for the current motion mode) - switch (letter) { + /** + * Screen for good command letters. + * With Realtime Reporting, commands S000, P000, and R000 are allowed. + */ + #if ENABLED(REALTIME_REPORTING_COMMANDS) + switch (letter) { + case 'P': case 'R' ... 'S': { + uint8_t digits = 0; + char *a = p; + while (*a++ == '0') digits++; // Count up '0' characters + if (digits == 3) { // Three '0' digits is a good command + codenum = 0; + command_letter = letter; + return; + } + } + } + #endif - case 'G': case 'M': case 'T': TERN_(MARLIN_DEV_MODE, case 'D':) + /** + * Screen for good command letters. G, M, and T are always accepted. + * With Motion Modes enabled any axis letter can come first. + */ + switch (letter) { + case 'G': case 'M': case 'T': TERN_(MARLIN_DEV_MODE, case 'D':) { // Skip spaces to get the numeric part while (*p == ' ') p++; @@ -173,23 +195,21 @@ void GCodeParser::parse(char *p) { // A '?' signifies an unknown command command_letter = letter; - { - #if ENABLED(SIGNED_CODENUM) - int sign = 1; // Allow for a negative code like D-1 or T-1 - if (*p == '-') { sign = -1; ++p; } - #endif + #if ENABLED(SIGNED_CODENUM) + int sign = 1; // Allow for a negative code like D-1 or T-1 + if (*p == '-') { sign = -1; ++p; } + #endif - // Get the code number - integer digits only - codenum = 0; + // Get the code number - integer digits only + codenum = 0; - do { codenum = codenum * 10 + *p++ - '0'; } while (NUMERIC(*p)); + do { codenum = codenum * 10 + *p++ - '0'; } while (NUMERIC(*p)); - // Apply the sign, if any - TERN_(SIGNED_CODENUM, codenum *= sign); - } + // Apply the sign, if any + TERN_(SIGNED_CODENUM, codenum *= sign); // Allow for decimal point in command - #if ENABLED(USE_GCODE_SUBCODES) + #if USE_GCODE_SUBCODES if (*p == '.') { p++; while (NUMERIC(*p)) @@ -202,48 +222,54 @@ void GCodeParser::parse(char *p) { #if ENABLED(GCODE_MOTION_MODES) if (letter == 'G' - && (codenum <= TERN(ARC_SUPPORT, 3, 1) || codenum == 5 || TERN0(G38_PROBE_TARGET, codenum == 38)) + && (codenum <= TERN(ARC_SUPPORT, 3, 1) || TERN0(BEZIER_CURVE_SUPPORT, codenum == 5) || TERN0(G38_PROBE_TARGET, codenum == 38)) ) { motion_mode_codenum = codenum; TERN_(USE_GCODE_SUBCODES, motion_mode_subcode = subcode); } #endif - break; + } break; #if ENABLED(GCODE_MOTION_MODES) + + #if EITHER(BEZIER_CURVE_SUPPORT, ARC_SUPPORT) + case 'I' ... 'J': case 'P': + if (TERN1(BEZIER_CURVE_SUPPORT, motion_mode_codenum != 5) + && TERN1(ARC_P_CIRCLES, !WITHIN(motion_mode_codenum, 2, 3)) + ) return; + #endif + + #if ENABLED(BEZIER_CURVE_SUPPORT) + case 'Q': if (motion_mode_codenum != 5) return; + #endif + #if ENABLED(ARC_SUPPORT) - case 'I' ... 'J': case 'R': - if (motion_mode_codenum != 2 && motion_mode_codenum != 3) return; + case 'R': if (!WITHIN(motion_mode_codenum, 2, 3)) return; #endif - case 'P' ... 'Q': - if (motion_mode_codenum != 5) return; - case 'X' ... 'Z': case 'E' ... 'F': + + LOGICAL_AXIS_GANG(case 'E':, case 'X':, case 'Y':, case 'Z':, case AXIS4_NAME:, case AXIS5_NAME:, case AXIS6_NAME:) + case 'F': if (motion_mode_codenum < 0) return; command_letter = 'G'; codenum = motion_mode_codenum; TERN_(USE_GCODE_SUBCODES, subcode = motion_mode_subcode); p--; // Back up one character to use the current parameter - break; - #endif // GCODE_MOTION_MODES + break; + + #endif default: return; } // The command parameters (if any) start here, for sure! - #if DISABLED(FASTER_GCODE_PARSER) - command_args = p; // Scan for parameters in seen() - #endif + IF_DISABLED(FASTER_GCODE_PARSER, command_args = p); // Scan for parameters in seen() // Only use string_arg for these M codes if (letter == 'M') switch (codenum) { - #if ENABLED(GCODE_MACROS) - case 810 ... 819: - #endif - #if ENABLED(EXPECTED_PRINTER_CHECK) - case 16: - #endif + TERN_(GCODE_MACROS, case 810 ... 819:) + TERN_(EXPECTED_PRINTER_CHECK, case 16:) case 23: case 28: case 30: case 117 ... 118: case 928: string_arg = unescape_string(p); return; @@ -307,7 +333,7 @@ void GCodeParser::parse(char *p) { #if ENABLED(DEBUG_GCODE_PARSER) if (debug) { - SERIAL_ECHOPAIR("Got param ", param, " at index ", (int)(p - command_ptr - 1)); + SERIAL_ECHOPGM("Got param ", AS_CHAR(param), " at index ", p - command_ptr - 1); if (has_val) SERIAL_ECHOPGM(" (has_val)"); } #endif @@ -315,7 +341,7 @@ void GCodeParser::parse(char *p) { if (!has_val && !string_arg) { // No value? First time, keep as string_arg string_arg = p - 1; #if ENABLED(DEBUG_GCODE_PARSER) - if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG + if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG #endif } @@ -326,7 +352,7 @@ void GCodeParser::parse(char *p) { else if (!string_arg) { // Not A-Z? First time, keep as the string_arg string_arg = p - 1; #if ENABLED(DEBUG_GCODE_PARSER) - if (debug) SERIAL_ECHOPAIR(" string_arg: ", hex_address((void*)string_arg)); // DEBUG + if (debug) SERIAL_ECHOPGM(" string_arg: ", hex_address((void*)string_arg)); // DEBUG #endif } @@ -364,7 +390,7 @@ void GCodeParser::unknown_command_warning() { #if ENABLED(DEBUG_GCODE_PARSER) void GCodeParser::debug() { - SERIAL_ECHOPAIR("Command: ", command_ptr, " (", command_letter); + SERIAL_ECHOPGM("Command: ", command_ptr, " (", command_letter); SERIAL_ECHO(codenum); SERIAL_ECHOLNPGM(")"); #if ENABLED(FASTER_GCODE_PARSER) @@ -372,18 +398,18 @@ void GCodeParser::unknown_command_warning() { for (char c = 'A'; c <= 'Z'; ++c) if (seen(c)) SERIAL_CHAR(c, ' '); SERIAL_CHAR('}'); #else - SERIAL_ECHOPAIR(" args: { ", command_args, " }"); + SERIAL_ECHOPGM(" args: { ", command_args, " }"); #endif if (string_arg) { - SERIAL_ECHOPAIR(" string: \"", string_arg); + SERIAL_ECHOPGM(" string: \"", string_arg); SERIAL_CHAR('"'); } SERIAL_ECHOLNPGM("\n"); for (char c = 'A'; c <= 'Z'; ++c) { if (seen(c)) { - SERIAL_ECHOPAIR("Code '", c); SERIAL_ECHOPGM("':"); + SERIAL_ECHOPGM("Code '", c); SERIAL_ECHOPGM("':"); if (has_value()) { - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "\n float: ", value_float(), "\n long: ", value_long(), "\n ulong: ", value_ulong(), @@ -391,8 +417,8 @@ void GCodeParser::unknown_command_warning() { "\n sec-ms: ", value_millis_from_seconds(), "\n int: ", value_int(), "\n ushort: ", value_ushort(), - "\n byte: ", (int)value_byte(), - "\n bool: ", (int)value_bool(), + "\n byte: ", value_byte(), + "\n bool: ", value_bool(), "\n linear: ", value_linear_units(), "\n celsius: ", value_celsius() ); diff --git a/Marlin/src/gcode/parser.h b/Marlin/src/gcode/parser.h index cf531c4e4705..ad550765ec90 100644 --- a/Marlin/src/gcode/parser.h +++ b/Marlin/src/gcode/parser.h @@ -85,13 +85,13 @@ class GCodeParser { *string_arg, // string of command line command_letter; // G, M, or T static uint16_t codenum; // 123 - #if ENABLED(USE_GCODE_SUBCODES) + #if USE_GCODE_SUBCODES static uint8_t subcode; // .1 #endif #if ENABLED(GCODE_MOTION_MODES) static int16_t motion_mode_codenum; - #if ENABLED(USE_GCODE_SUBCODES) + #if USE_GCODE_SUBCODES static uint8_t motion_mode_subcode; #endif FORCE_INLINE static void cancel_motion_mode() { motion_mode_codenum = -1; } @@ -133,9 +133,9 @@ class GCodeParser { param[ind] = ptr ? ptr - command_ptr : 0; // parameter offset or 0 #if ENABLED(DEBUG_GCODE_PARSER) if (codenum == 800) { - SERIAL_ECHOPAIR("Set bit ", (int)ind, " of codebits (", hex_address((void*)(codebits >> 16))); + SERIAL_ECHOPGM("Set bit ", ind, " of codebits (", hex_address((void*)(codebits >> 16))); print_hex_word((uint16_t)(codebits & 0xFFFF)); - SERIAL_ECHOLNPAIR(") | param = ", (int)param[ind]); + SERIAL_ECHOLNPGM(") | param = ", param[ind]); } #endif } @@ -225,9 +225,7 @@ class GCodeParser { #endif // !FASTER_GCODE_PARSER // Seen any axis parameter - static inline bool seen_axis() { - return seen_test('X') || seen_test('Y') || seen_test('Z') || seen_test('E'); - } + static inline bool seen_axis() { return seen(LOGICAL_AXES_STRING); } #if ENABLED(GCODE_QUOTED_STRINGS) static char* unescape_string(char* &src); @@ -295,8 +293,8 @@ class GCodeParser { // Units modes: Inches, Fahrenheit, Kelvin #if ENABLED(INCH_MODE_SUPPORT) - static inline float mm_to_linear_unit(const float mm) { return mm / linear_unit_factor; } - static inline float mm_to_volumetric_unit(const float mm) { return mm / (volumetric_enabled ? volumetric_unit_factor : linear_unit_factor); } + static inline float mm_to_linear_unit(const_float_t mm) { return mm / linear_unit_factor; } + static inline float mm_to_volumetric_unit(const_float_t mm) { return mm / (volumetric_enabled ? volumetric_unit_factor : linear_unit_factor); } // Init linear units by constructor GCodeParser() { set_input_linear_units(LINEARUNIT_MM); } @@ -311,19 +309,25 @@ class GCodeParser { } static inline float axis_unit_factor(const AxisEnum axis) { - return (axis >= E_AXIS && volumetric_enabled ? volumetric_unit_factor : linear_unit_factor); + return ( + #if HAS_EXTRUDERS + axis >= E_AXIS && volumetric_enabled ? volumetric_unit_factor : linear_unit_factor + #else + linear_unit_factor + #endif + ); } - static inline float linear_value_to_mm(const float v) { return v * linear_unit_factor; } + static inline float linear_value_to_mm(const_float_t v) { return v * linear_unit_factor; } static inline float axis_value_to_mm(const AxisEnum axis, const float v) { return v * axis_unit_factor(axis); } static inline float per_axis_value(const AxisEnum axis, const float v) { return v / axis_unit_factor(axis); } #else - static inline float mm_to_linear_unit(const float mm) { return mm; } - static inline float mm_to_volumetric_unit(const float mm) { return mm; } + static inline float mm_to_linear_unit(const_float_t mm) { return mm; } + static inline float mm_to_volumetric_unit(const_float_t mm) { return mm; } - static inline float linear_value_to_mm(const float v) { return v; } + static inline float linear_value_to_mm(const_float_t v) { return v; } static inline float axis_value_to_mm(const AxisEnum, const float v) { return v; } static inline float per_axis_value(const AxisEnum, const float v) { return v; } @@ -344,60 +348,54 @@ class GCodeParser { static inline void set_input_temp_units(const TempUnit units) { input_temp_units = units; } + static inline char temp_units_code() { + return input_temp_units == TEMPUNIT_K ? 'K' : input_temp_units == TEMPUNIT_F ? 'F' : 'C'; + } + static inline PGM_P temp_units_name() { + return input_temp_units == TEMPUNIT_K ? PSTR("Kelvin") : input_temp_units == TEMPUNIT_F ? PSTR("Fahrenheit") : PSTR("Celsius"); + } + #if HAS_LCD_MENU && DISABLED(DISABLE_M503) - static inline char temp_units_code() { - return input_temp_units == TEMPUNIT_K ? 'K' : input_temp_units == TEMPUNIT_F ? 'F' : 'C'; - } - static inline PGM_P temp_units_name() { - return input_temp_units == TEMPUNIT_K ? PSTR("Kelvin") : input_temp_units == TEMPUNIT_F ? PSTR("Fahrenheit") : PSTR("Celsius"); - } - static inline float to_temp_units(const float &f) { + static inline float to_temp_units(celsius_t c) { switch (input_temp_units) { - case TEMPUNIT_F: - return f * 0.5555555556f + 32; - case TEMPUNIT_K: - return f + 273.15f; - case TEMPUNIT_C: default: - return f; + case TEMPUNIT_C: return c; + case TEMPUNIT_K: return c + 273.15f; + case TEMPUNIT_F: return c * 0.5555555556f + 32; } } #endif // HAS_LCD_MENU && !DISABLE_M503 - static inline float value_celsius() { - const float f = value_float(); + static inline celsius_t value_celsius() { + float f = value_float(); switch (input_temp_units) { - case TEMPUNIT_F: - return (f - 32) * 0.5555555556f; - case TEMPUNIT_K: - return f - 273.15f; - case TEMPUNIT_C: default: - return f; + case TEMPUNIT_C: break; + case TEMPUNIT_K: f -= 273.15f; + case TEMPUNIT_F: f = (f - 32) * 0.5555555556f; } + return LROUND(f); } - static inline float value_celsius_diff() { + static inline celsius_t value_celsius_diff() { + float f = value_float(); switch (input_temp_units) { - case TEMPUNIT_F: - return value_float() * 0.5555555556f; - case TEMPUNIT_C: - case TEMPUNIT_K: default: - return value_float(); + case TEMPUNIT_C: + case TEMPUNIT_K: break; + case TEMPUNIT_F: f *= 0.5555555556f; } + return LROUND(f); } - #define TEMP_UNIT(N) parser.to_temp_units(N) - #else // !TEMPERATURE_UNITS_SUPPORT - static inline float value_celsius() { return value_float(); } - static inline float value_celsius_diff() { return value_float(); } + static inline float to_temp_units(int16_t c) { return (float)c; } - #define TEMP_UNIT(N) (N) + static inline celsius_t value_celsius() { return value_int(); } + static inline celsius_t value_celsius_diff() { return value_int(); } #endif // !TEMPERATURE_UNITS_SUPPORT @@ -406,16 +404,19 @@ class GCodeParser { void unknown_command_warning(); // Provide simple value accessors with default option - static inline char* stringval(const char c, char * const dval=nullptr) { return seenval(c) ? value_string() : dval; } - static inline float floatval(const char c, const float dval=0.0) { return seenval(c) ? value_float() : dval; } - static inline bool boolval(const char c, const bool dval=false) { return seenval(c) ? value_bool() : (seen(c) ? true : dval); } - static inline uint8_t byteval(const char c, const uint8_t dval=0) { return seenval(c) ? value_byte() : dval; } - static inline int16_t intval(const char c, const int16_t dval=0) { return seenval(c) ? value_int() : dval; } - static inline uint16_t ushortval(const char c, const uint16_t dval=0) { return seenval(c) ? value_ushort() : dval; } - static inline int32_t longval(const char c, const int32_t dval=0) { return seenval(c) ? value_long() : dval; } - static inline uint32_t ulongval(const char c, const uint32_t dval=0) { return seenval(c) ? value_ulong() : dval; } - static inline float linearval(const char c, const float dval=0) { return seenval(c) ? value_linear_units() : dval; } - static inline float celsiusval(const char c, const float dval=0) { return seenval(c) ? value_celsius() : dval; } + static inline char* stringval(const char c, char * const dval=nullptr) { return seenval(c) ? value_string() : dval; } + static inline float floatval(const char c, const float dval=0.0) { return seenval(c) ? value_float() : dval; } + static inline bool boolval(const char c, const bool dval=false) { return seenval(c) ? value_bool() : (seen(c) ? true : dval); } + static inline uint8_t byteval(const char c, const uint8_t dval=0) { return seenval(c) ? value_byte() : dval; } + static inline int16_t intval(const char c, const int16_t dval=0) { return seenval(c) ? value_int() : dval; } + static inline uint16_t ushortval(const char c, const uint16_t dval=0) { return seenval(c) ? value_ushort() : dval; } + static inline int32_t longval(const char c, const int32_t dval=0) { return seenval(c) ? value_long() : dval; } + static inline uint32_t ulongval(const char c, const uint32_t dval=0) { return seenval(c) ? value_ulong() : dval; } + static inline float linearval(const char c, const float dval=0) { return seenval(c) ? value_linear_units() : dval; } + static inline float axisunitsval(const char c, const AxisEnum a, const float dval=0) + { return seenval(c) ? value_axis_units(a) : dval; } + static inline celsius_t celsiusval(const char c, const celsius_t dval=0) { return seenval(c) ? value_celsius() : dval; } + static inline feedRate_t feedrateval(const char c, const feedRate_t dval=0) { return seenval(c) ? value_feedrate() : dval; } #if ENABLED(MARLIN_DEV_MODE) diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index 4347f55aa8f8..f4152c76e9e5 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -53,7 +53,7 @@ void GcodeSuite::G30() { const ProbePtRaise raise_after = parser.boolval('E', true) ? PROBE_PT_STOW : PROBE_PT_NONE; const float measured_z = probe.probe_at_point(pos, raise_after, 1); if (!isnan(measured_z)) - SERIAL_ECHOLNPAIR("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z); + SERIAL_ECHOLNPGM("Bed X: ", pos.x, " Y: ", pos.y, " Z: ", measured_z); restore_feedrate_and_scaling(); diff --git a/Marlin/src/gcode/probe/G38.cpp b/Marlin/src/gcode/probe/G38.cpp index b06cd47359c7..6906805fca14 100644 --- a/Marlin/src/gcode/probe/G38.cpp +++ b/Marlin/src/gcode/probe/G38.cpp @@ -38,7 +38,7 @@ inline void G38_single_probe(const uint8_t move_value) { planner.synchronize(); G38_move = 0; endstops.hit_on_purpose(); - set_current_from_steppers_for_axis(ALL_AXES); + set_current_from_steppers_for_axis(ALL_AXES_ENUM); sync_plan_position(); } @@ -49,7 +49,7 @@ inline bool G38_run_probe() { #if MULTIPLE_PROBING > 1 // Get direction of move and retract xyz_float_t retract_mm; - LOOP_XYZ(i) { + LOOP_LINEAR_AXES(i) { const float dist = destination[i] - current_position[i]; retract_mm[i] = ABS(dist) < G38_MINIMUM_MOVE ? 0 : home_bump_mm((AxisEnum)i) * (dist > 0 ? -1 : 1); } @@ -119,7 +119,7 @@ void GcodeSuite::G38(const int8_t subcode) { ; // If any axis has enough movement, do the move - LOOP_XYZ(i) + LOOP_LINEAR_AXES(i) if (ABS(destination[i] - current_position[i]) >= G38_MINIMUM_MOVE) { if (!parser.seenval('F')) feedrate_mm_s = homing_feedrate((AxisEnum)i); // If G38.2 fails throw an error diff --git a/Marlin/src/gcode/probe/M851.cpp b/Marlin/src/gcode/probe/M851.cpp index 04b293de3129..7ec326730fc4 100644 --- a/Marlin/src/gcode/probe/M851.cpp +++ b/Marlin/src/gcode/probe/M851.cpp @@ -32,19 +32,8 @@ * M851: Set the nozzle-to-probe offsets in current units */ void GcodeSuite::M851() { - - // Show usage with no parameters - if (!parser.seen("XYZ")) { - SERIAL_ECHOLNPAIR_P( - #if HAS_PROBE_XY_OFFSET - PSTR(STR_PROBE_OFFSET " X"), probe.offset_xy.x, SP_Y_STR, probe.offset_xy.y, SP_Z_STR - #else - PSTR(STR_PROBE_OFFSET " X0 Y0 Z") - #endif - , probe.offset.z - ); - return; - } + // No parameters? Show current state. + if (!parser.seen("XYZ")) return M851_report(); // Start with current offsets and modify xyz_pos_t offs = probe.offset; @@ -58,11 +47,11 @@ void GcodeSuite::M851() { if (WITHIN(x, -(X_BED_SIZE), X_BED_SIZE)) offs.x = x; else { - SERIAL_ECHOLNPAIR("?X out of range (-", int(X_BED_SIZE), " to ", int(X_BED_SIZE), ")"); + SERIAL_ECHOLNPGM("?X out of range (-", X_BED_SIZE, " to ", X_BED_SIZE, ")"); ok = false; } #else - if (x) SERIAL_ECHOLNPAIR("?X must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true + if (x) SERIAL_ECHOLNPGM("?X must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true #endif } @@ -72,11 +61,11 @@ void GcodeSuite::M851() { if (WITHIN(y, -(Y_BED_SIZE), Y_BED_SIZE)) offs.y = y; else { - SERIAL_ECHOLNPAIR("?Y out of range (-", int(Y_BED_SIZE), " to ", int(Y_BED_SIZE), ")"); + SERIAL_ECHOLNPGM("?Y out of range (-", Y_BED_SIZE, " to ", Y_BED_SIZE, ")"); ok = false; } #else - if (y) SERIAL_ECHOLNPAIR("?Y must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true + if (y) SERIAL_ECHOLNPGM("?Y must be 0 (NOZZLE_AS_PROBE)."); // ...but let 'ok' stay true #endif } @@ -85,7 +74,7 @@ void GcodeSuite::M851() { if (WITHIN(z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) offs.z = z; else { - SERIAL_ECHOLNPAIR("?Z out of range (", int(Z_PROBE_OFFSET_RANGE_MIN), " to ", int(Z_PROBE_OFFSET_RANGE_MAX), ")"); + SERIAL_ECHOLNPGM("?Z out of range (", Z_PROBE_OFFSET_RANGE_MIN, " to ", Z_PROBE_OFFSET_RANGE_MAX, ")"); ok = false; } } @@ -94,4 +83,20 @@ void GcodeSuite::M851() { if (ok) probe.offset = offs; } +void GcodeSuite::M851_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_Z_PROBE_OFFSET)); + SERIAL_ECHOPGM_P( + #if HAS_PROBE_XY_OFFSET + PSTR(" M851 X"), LINEAR_UNIT(probe.offset_xy.x), + SP_Y_STR, LINEAR_UNIT(probe.offset_xy.y), + SP_Z_STR + #else + PSTR(" M851 X0 Y0 Z") + #endif + , LINEAR_UNIT(probe.offset.z) + , PSTR(" ;") + ); + say_units(); +} + #endif // HAS_BED_PROBE diff --git a/Marlin/src/gcode/probe/M951.cpp b/Marlin/src/gcode/probe/M951.cpp index f461fc2b079d..c6a9cfbe206c 100644 --- a/Marlin/src/gcode/probe/M951.cpp +++ b/Marlin/src/gcode/probe/M951.cpp @@ -32,13 +32,13 @@ mpe_settings_t mpe_settings; inline void mpe_settings_report() { SERIAL_ECHO_MSG("Magnetic Parking Extruder"); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("L: Left parking :", mpe_settings.parking_xpos[0]); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("R: Right parking :", mpe_settings.parking_xpos[1]); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("I: Grab Offset :", mpe_settings.grab_distance); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("J: Normal speed :", long(MMS_TO_MMM(mpe_settings.slow_feedrate))); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("H: High speed :", long(MMS_TO_MMM(mpe_settings.fast_feedrate))); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("D: Distance trav.:", mpe_settings.travel_distance); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("C: Compenstion :", mpe_settings.compensation_factor); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("L: Left parking :", mpe_settings.parking_xpos[0]); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("R: Right parking :", mpe_settings.parking_xpos[1]); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("I: Grab Offset :", mpe_settings.grab_distance); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("J: Normal speed :", long(MMS_TO_MMM(mpe_settings.slow_feedrate))); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("H: High speed :", long(MMS_TO_MMM(mpe_settings.fast_feedrate))); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("D: Distance trav.:", mpe_settings.travel_distance); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("C: Compenstion :", mpe_settings.compensation_factor); } void mpe_settings_init() { diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 4c42f7e35388..d11b2823f23c 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -35,6 +35,7 @@ GCodeQueue queue; #include "../module/planner.h" #include "../module/temperature.h" #include "../MarlinCore.h" +#include "../core/bug_on.h" #if ENABLED(PRINTER_EVENT_LEDS) #include "../feature/leds/printer_event_leds.h" @@ -48,10 +49,6 @@ GCodeQueue queue; #include "../feature/binary_stream.h" #endif -#if ENABLED(MEATPACK) - #include "../feature/meatpack.h" -#endif - #if ENABLED(POWER_LOSS_RECOVERY) #include "../feature/powerloss.h" #endif @@ -63,44 +60,34 @@ GCodeQueue queue; // Frequently used G-code strings PGMSTR(G28_STR, "G28"); -/** - * GCode line number handling. Hosts may opt to include line numbers when - * sending commands to Marlin, and lines will be checked for sequentiality. - * M110 N sets the current line number. - */ -long GCodeQueue::last_N[NUM_SERIAL]; - -/** - * GCode Command Queue - * A simple ring buffer of BUFSIZE command strings. - * - * Commands are copied into this buffer by the command injectors - * (immediate, serial, sd card) and they are processed sequentially by - * the main loop. The gcode.process_next_command method parses the next - * command and hands off execution to individual handler functions. - */ -uint8_t GCodeQueue::length = 0, // Count of commands in the queue - GCodeQueue::index_r = 0, // Ring buffer read position - GCodeQueue::index_w = 0; // Ring buffer write position +GCodeQueue::SerialState GCodeQueue::serial_state[NUM_SERIAL] = { 0 }; +GCodeQueue::RingBuffer GCodeQueue::ring_buffer = { 0 }; -char GCodeQueue::command_buffer[BUFSIZE][MAX_CMD_SIZE]; +#if NO_TIMEOUTS > 0 + static millis_t last_command_time = 0; +#endif -/* - * The port that the command was received on +/** + * Track buffer underruns */ -#if HAS_MULTI_SERIAL - serial_index_t GCodeQueue::port[BUFSIZE]; +#if ENABLED(BUFFER_MONITORING) + uint32_t GCodeQueue::command_buffer_underruns = 0, + GCodeQueue::planner_buffer_underruns = 0; + bool GCodeQueue::command_buffer_empty = false, + GCodeQueue::planner_buffer_empty = false; + millis_t GCodeQueue::max_command_buffer_empty_duration = 0, + GCodeQueue::max_planner_buffer_empty_duration = 0, + GCodeQueue::command_buffer_empty_at = 0, + GCodeQueue::planner_buffer_empty_at = 0; + + uint8_t GCodeQueue::auto_buffer_report_interval; + millis_t GCodeQueue::next_buffer_report_ms; #endif /** * Serial command injection */ -// Number of characters read in the current line of serial input -static int serial_count[NUM_SERIAL] = { 0 }; - -bool send_ok[BUFSIZE]; - /** * Next Injected PROGMEM Command pointer. (nullptr == empty) * Internal commands are enqueued ahead of serial / SD commands. @@ -112,38 +99,13 @@ PGM_P GCodeQueue::injected_commands_P; // = nullptr */ char GCodeQueue::injected_commands[64]; // = { 0 } -GCodeQueue::GCodeQueue() { - // Send "ok" after commands by default - LOOP_L_N(i, COUNT(send_ok)) send_ok[i] = true; -} - -/** - * Check whether there are any commands yet to be executed - */ -bool GCodeQueue::has_commands_queued() { - return queue.length || injected_commands_P || injected_commands[0]; -} - -/** - * Clear the Marlin command queue - */ -void GCodeQueue::clear() { - index_r = index_w = length = 0; -} - -/** - * Once a new command is in the ring buffer, call this to commit it - */ -void GCodeQueue::_commit_command(bool say_ok - #if HAS_MULTI_SERIAL - , serial_index_t serial_ind/*=-1*/ - #endif +void GCodeQueue::RingBuffer::commit_command(bool skip_ok + OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind/*=-1*/) ) { - send_ok[index_w] = say_ok; - TERN_(HAS_MULTI_SERIAL, port[index_w] = serial_ind); + commands[index_w].skip_ok = skip_ok; + TERN_(HAS_MULTI_SERIAL, commands[index_w].port = serial_ind); TERN_(POWER_LOSS_RECOVERY, recovery.commit_sdpos(index_w)); - if (++index_w >= BUFSIZE) index_w = 0; - length++; + advance_pos(index_w, 1); } /** @@ -151,18 +113,12 @@ void GCodeQueue::_commit_command(bool say_ok * Return true if the command was successfully added. * Return false for a full buffer, or if the 'command' is a comment. */ -bool GCodeQueue::_enqueue(const char* cmd, bool say_ok/*=false*/ - #if HAS_MULTI_SERIAL - , serial_index_t serial_ind/*=-1*/ - #endif +bool GCodeQueue::RingBuffer::enqueue(const char *cmd, bool skip_ok/*=true*/ + OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind/*=-1*/) ) { if (*cmd == ';' || length >= BUFSIZE) return false; - strcpy(command_buffer[index_w], cmd); - _commit_command(say_ok - #if HAS_MULTI_SERIAL - , serial_ind - #endif - ); + strcpy(commands[index_w].buffer, cmd); + commit_command(skip_ok OPTARG(HAS_MULTI_SERIAL, serial_ind)); return true; } @@ -170,15 +126,12 @@ bool GCodeQueue::_enqueue(const char* cmd, bool say_ok/*=false*/ * Enqueue with Serial Echo * Return true if the command was consumed */ -bool GCodeQueue::enqueue_one(const char* cmd) { - - //SERIAL_ECHOPGM("enqueue_one(\""); - //SERIAL_ECHO(cmd); - //SERIAL_ECHOPGM("\") \n"); +bool GCodeQueue::enqueue_one(const char *cmd) { + //SERIAL_ECHOLNPGM("enqueue_one(\"", cmd, "\")"); if (*cmd == 0 || ISEOL(*cmd)) return true; - if (_enqueue(cmd)) { + if (ring_buffer.enqueue(cmd)) { SERIAL_ECHO_MSG(STR_ENQUEUEING, cmd, "\""); return true; } @@ -242,7 +195,7 @@ bool GCodeQueue::process_injected_command() { * Enqueue and return only when commands are actually enqueued. * Never call this from a G-code handler! */ -void GCodeQueue::enqueue_one_now(const char* cmd) { while (!enqueue_one(cmd)) idle(); } +void GCodeQueue::enqueue_one_now(const char *cmd) { while (!enqueue_one(cmd)) idle(); } /** * Attempt to enqueue a single G-code command @@ -256,7 +209,7 @@ bool GCodeQueue::enqueue_one_P(PGM_P const pgcode) { char cmd[i + 1]; memcpy_P(cmd, p, i); cmd[i] = '\0'; - return _enqueue(cmd); + return ring_buffer.enqueue(cmd); } /** @@ -287,24 +240,27 @@ void GCodeQueue::enqueue_now_P(PGM_P const pgcode) { * P Planner space remaining * B Block queue space remaining */ -void GCodeQueue::ok_to_send() { +void GCodeQueue::RingBuffer::ok_to_send() { + #if NO_TIMEOUTS > 0 + // Start counting from the last command's execution + last_command_time = millis(); + #endif + CommandLine &command = commands[index_r]; #if HAS_MULTI_SERIAL - const serial_index_t serial_ind = command_port(); - if (serial_ind < 0) return; + const serial_index_t serial_ind = command.port; + if (!serial_ind.valid()) return; // Optimization here, skip processing if it's not going anywhere PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command #endif - if (!send_ok[index_r]) return; + if (command.skip_ok) return; SERIAL_ECHOPGM(STR_OK); #if ENABLED(ADVANCED_OK) - char* p = command_buffer[index_r]; + char* p = command.buffer; if (*p == 'N') { - SERIAL_ECHO(' '); - SERIAL_ECHO(*p++); + SERIAL_CHAR(' ', *p++); while (NUMERIC_SIGNED(*p)) - SERIAL_ECHO(*p++); + SERIAL_CHAR(*p++); } - SERIAL_ECHOPAIR_P(SP_P_STR, int(planner.moves_free()), - SP_B_STR, int(BUFSIZE - length)); + SERIAL_ECHOPGM_P(SP_P_STR, planner.moves_free(), SP_B_STR, BUFSIZE - length); #endif SERIAL_EOL(); } @@ -313,49 +269,46 @@ void GCodeQueue::ok_to_send() { * Send a "Resend: nnn" message to the host to * indicate that a command needs to be re-sent. */ -void GCodeQueue::flush_and_request_resend() { - const serial_index_t serial_ind = command_port(); +void GCodeQueue::flush_and_request_resend(const serial_index_t serial_ind) { #if HAS_MULTI_SERIAL - if (serial_ind < 0) return; // Never mind. Command came from SD or Flash Drive + if (!serial_ind.valid()) return; // Optimization here, skip if the command came from SD or Flash Drive PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command #endif SERIAL_FLUSH(); - SERIAL_ECHOPGM(STR_RESEND); - SERIAL_ECHOLN(last_N[serial_ind] + 1); - ok_to_send(); + SERIAL_ECHOLNPGM(STR_RESEND, serial_state[serial_ind.index].last_N + 1); + SERIAL_ECHOLNPGM(STR_OK); } -inline bool serial_data_available() { - byte data_available = 0; - if (MYSERIAL0.available()) data_available++; - #ifdef SERIAL_PORT_2 - const bool port2_open = TERN1(HAS_ETHERNET, ethernet.have_telnet_client); - if (port2_open && MYSERIAL1.available()) data_available++; +static bool serial_data_available(serial_index_t index) { + const int a = SERIAL_IMPL.available(index); + #if BOTH(RX_BUFFER_MONITOR, RX_BUFFER_SIZE) + if (a > RX_BUFFER_SIZE - 2) { + PORT_REDIRECT(SERIAL_PORTMASK(index)); + SERIAL_ERROR_MSG("RX BUF overflow, increase RX_BUFFER_SIZE: ", a); + } #endif - return data_available > 0; + return a > 0; } -inline int read_serial(const uint8_t index) { - switch (index) { - case 0: return MYSERIAL0.read(); - case 1: { - #if HAS_MULTI_SERIAL - const bool port2_open = TERN1(HAS_ETHERNET, ethernet.have_telnet_client); - if (port2_open) return MYSERIAL1.read(); - #endif - } - default: return -1; +#if NO_TIMEOUTS > 0 + // Multiserial already handles dispatch to/from multiple ports + static bool any_serial_data_available() { + LOOP_L_N(p, NUM_SERIAL) + if (serial_data_available(p)) + return true; + return false; } -} +#endif + +inline int read_serial(const serial_index_t index) { return SERIAL_IMPL.read(index); } void GCodeQueue::gcode_line_error(PGM_P const err, const serial_index_t serial_ind) { PORT_REDIRECT(SERIAL_PORTMASK(serial_ind)); // Reply to the serial port that sent the command SERIAL_ERROR_START(); - serialprintPGM(err); - SERIAL_ECHOLN(last_N[serial_ind]); - while (read_serial(serial_ind) != -1); // Clear out the RX buffer - flush_and_request_resend(); - serial_count[serial_ind] = 0; + SERIAL_ECHOLNPGM_P(err, serial_state[serial_ind.index].last_N); + while (read_serial(serial_ind) != -1) { /* nada */ } // Clear out the RX buffer. Why don't use flush here ? + flush_and_request_resend(serial_ind); + serial_state[serial_ind.index].count = 0; } FORCE_INLINE bool is_M29(const char * const cmd) { // matches "M29" & "M29 ", but not "M290", etc @@ -442,10 +395,6 @@ inline bool process_line_done(uint8_t &sis, char (&buff)[MAX_CMD_SIZE], int &ind * left on the serial port. */ void GCodeQueue::get_serial_commands() { - static char serial_line_buffer[NUM_SERIAL][MAX_CMD_SIZE]; - - static uint8_t serial_input_state[NUM_SERIAL] = { PS_NORMAL }; - #if ENABLED(BINARY_FILE_TRANSFER) if (card.flag.binary_mode) { /** @@ -453,7 +402,7 @@ void GCodeQueue::get_serial_commands() { * receive buffer (which limits the packet size to MAX_CMD_SIZE). * The receive buffer also limits the packet size for reliable transmission. */ - binaryStream[card.transfer_port_index].receive(serial_line_buffer[card.transfer_port_index]); + binaryStream[card.transfer_port_index.index].receive(serial_state[card.transfer_port_index.index].line_buffer); return; } #endif @@ -461,124 +410,133 @@ void GCodeQueue::get_serial_commands() { // If the command buffer is empty for too long, // send "wait" to indicate Marlin is still waiting. #if NO_TIMEOUTS > 0 - static millis_t last_command_time = 0; const millis_t ms = millis(); - if (length == 0 && !serial_data_available() && ELAPSED(ms, last_command_time + NO_TIMEOUTS)) { + if (ring_buffer.empty() && !any_serial_data_available() && ELAPSED(ms, last_command_time + NO_TIMEOUTS)) { SERIAL_ECHOLNPGM(STR_WAIT); last_command_time = ms; } #endif - /** - * Loop while serial characters are incoming and the queue is not full - */ - while (length < BUFSIZE && serial_data_available()) { + // Loop while serial characters are incoming and the queue is not full + for (bool hadData = true; hadData;) { + // Unless a serial port has data, this will exit on next iteration + hadData = false; + LOOP_L_N(p, NUM_SERIAL) { + // Check if the queue is full and exit if it is. + if (ring_buffer.full()) return; - const int c = read_serial(p); - if (c < 0) continue; + // No data for this port ? Skip it + if (!serial_data_available(p)) continue; - #if ENABLED(MEATPACK) - meatpack.handle_rx_char(uint8_t(c), p); - char c_res[2] = { 0, 0 }; - const uint8_t char_count = meatpack.get_result_char(c_res); - #else - constexpr uint8_t char_count = 1; - #endif + // Ok, we have some data to process, let's make progress here + hadData = true; - LOOP_L_N(char_index, char_count) { - const char serial_char = TERN(MEATPACK, c_res[char_index], c); + const int c = read_serial(p); + if (c < 0) { + // This should never happen, let's log it + PORT_REDIRECT(SERIAL_PORTMASK(p)); // Reply to the serial port that sent the command + // Crash here to get more information why it failed + BUG_ON("SP available but read -1"); + SERIAL_ERROR_MSG(STR_ERR_SERIAL_MISMATCH); + SERIAL_FLUSH(); + continue; + } - if (ISEOL(serial_char)) { + const char serial_char = (char)c; + SerialState &serial = serial_state[p]; - // Reset our state, continue if the line was empty - if (process_line_done(serial_input_state[p], serial_line_buffer[p], serial_count[p])) - continue; + if (ISEOL(serial_char)) { - char* command = serial_line_buffer[p]; + // Reset our state, continue if the line was empty + if (process_line_done(serial.input_state, serial.line_buffer, serial.count)) + continue; - while (*command == ' ') command++; // Skip leading spaces - char *npos = (*command == 'N') ? command : nullptr; // Require the N parameter to start the line + char* command = serial.line_buffer; - if (npos) { + while (*command == ' ') command++; // Skip leading spaces + char *npos = (*command == 'N') ? command : nullptr; // Require the N parameter to start the line - const bool M110 = !!strstr_P(command, PSTR("M110")); + if (npos) { - if (M110) { - char* n2pos = strchr(command + 4, 'N'); - if (n2pos) npos = n2pos; - } + const bool M110 = !!strstr_P(command, PSTR("M110")); - const long gcode_N = strtol(npos + 1, nullptr, 10); - - if (gcode_N != last_N[p] + 1 && !M110) - return gcode_line_error(PSTR(STR_ERR_LINE_NO), p); + if (M110) { + char* n2pos = strchr(command + 4, 'N'); + if (n2pos) npos = n2pos; + } - char *apos = strrchr(command, '*'); - if (apos) { - uint8_t checksum = 0, count = uint8_t(apos - command); - while (count) checksum ^= command[--count]; - if (strtol(apos + 1, nullptr, 10) != checksum) - return gcode_line_error(PSTR(STR_ERR_CHECKSUM_MISMATCH), p); - } - else - return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), p); + const long gcode_N = strtol(npos + 1, nullptr, 10); - last_N[p] = gcode_N; + if (gcode_N != serial.last_N + 1 && !M110) { + // In case of error on a serial port, don't prevent other serial port from making progress + gcode_line_error(PSTR(STR_ERR_LINE_NO), p); + break; } - #if ENABLED(SDSUPPORT) - // Pronterface "M29" and "M29 " has no line number - else if (card.flag.saving && !is_M29(command)) - return gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), p); - #endif - // - // Movement commands give an alert when the machine is stopped - // - - if (IsStopped()) { - char* gpos = strchr(command, 'G'); - if (gpos) { - switch (strtol(gpos + 1, nullptr, 10)) { - case 0: case 1: - #if ENABLED(ARC_SUPPORT) - case 2: case 3: - #endif - #if ENABLED(BEZIER_CURVE_SUPPORT) - case 5: - #endif - PORT_REDIRECT(SERIAL_PORTMASK(p)); // Reply to the serial port that sent the command - SERIAL_ECHOLNPGM(STR_ERR_STOPPED); - LCD_MESSAGEPGM(MSG_STOPPED); - break; - } + char *apos = strrchr(command, '*'); + if (apos) { + uint8_t checksum = 0, count = uint8_t(apos - command); + while (count) checksum ^= command[--count]; + if (strtol(apos + 1, nullptr, 10) != checksum) { + // In case of error on a serial port, don't prevent other serial port from making progress + gcode_line_error(PSTR(STR_ERR_CHECKSUM_MISMATCH), p); + break; } } + else { + // In case of error on a serial port, don't prevent other serial port from making progress + gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), p); + break; + } + + serial.last_N = gcode_N; + } + #if ENABLED(SDSUPPORT) + // Pronterface "M29" and "M29 " has no line number + else if (card.flag.saving && !is_M29(command)) { + gcode_line_error(PSTR(STR_ERR_NO_CHECKSUM), p); + break; + } + #endif - #if DISABLED(EMERGENCY_PARSER) - // Process critical commands early - if (command[0] == 'M') switch (command[3]) { - case '8': if (command[2] == '0' && command[1] == '1') { wait_for_heatup = false; TERN_(HAS_LCD_MENU, wait_for_user = false); } break; - case '2': if (command[2] == '1' && command[1] == '1') kill(M112_KILL_STR, nullptr, true); break; - case '0': if (command[1] == '4' && command[2] == '1') quickstop_stepper(); break; + // + // Movement commands give an alert when the machine is stopped + // + + if (IsStopped()) { + char* gpos = strchr(command, 'G'); + if (gpos) { + switch (strtol(gpos + 1, nullptr, 10)) { + case 0 ... 1: + TERN_(ARC_SUPPORT, case 2 ... 3:) + TERN_(BEZIER_CURVE_SUPPORT, case 5:) + PORT_REDIRECT(SERIAL_PORTMASK(p)); // Reply to the serial port that sent the command + SERIAL_ECHOLNPGM(STR_ERR_STOPPED); + LCD_MESSAGEPGM(MSG_STOPPED); + break; } - #endif + } + } - #if defined(NO_TIMEOUTS) && NO_TIMEOUTS > 0 - last_command_time = ms; - #endif + #if DISABLED(EMERGENCY_PARSER) + // Process critical commands early + if (command[0] == 'M') switch (command[3]) { + case '8': if (command[2] == '0' && command[1] == '1') { wait_for_heatup = false; TERN_(HAS_LCD_MENU, wait_for_user = false); } break; + case '2': if (command[2] == '1' && command[1] == '1') kill(M112_KILL_STR, nullptr, true); break; + case '0': if (command[1] == '4' && command[2] == '1') quickstop_stepper(); break; + } + #endif - // Add the command to the queue - _enqueue(serial_line_buffer[p], true - #if HAS_MULTI_SERIAL - , p - #endif - ); - } - else - process_stream_char(serial_char, serial_input_state[p], serial_line_buffer[p], serial_count[p]); + #if NO_TIMEOUTS > 0 + last_command_time = ms; + #endif - } // char_count loop + // Add the command to the queue + ring_buffer.enqueue(serial.line_buffer, false OPTARG(HAS_MULTI_SERIAL, p)); + } + else + process_stream_char(serial_char, serial.input_state, serial.line_buffer, serial.count); } // NUM_SERIAL loop } // queue has space, serial has data @@ -595,36 +553,45 @@ void GCodeQueue::get_serial_commands() { inline void GCodeQueue::get_sdcard_commands() { static uint8_t sd_input_state = PS_NORMAL; - if (!IS_SD_PRINTING()) return; + // Get commands if there are more in the file + if (!IS_SD_FETCHING()) return; int sd_count = 0; - while (length < BUFSIZE && !card.eof()) { + while (!ring_buffer.full() && !card.eof()) { const int16_t n = card.get(); const bool card_eof = card.eof(); if (n < 0 && !card_eof) { SERIAL_ERROR_MSG(STR_SD_ERR_READ); continue; } + CommandLine &command = ring_buffer.commands[ring_buffer.index_w]; const char sd_char = (char)n; const bool is_eol = ISEOL(sd_char); if (is_eol || card_eof) { // Reset stream state, terminate the buffer, and commit a non-empty command if (!is_eol && sd_count) ++sd_count; // End of file with no newline - if (!process_line_done(sd_input_state, command_buffer[index_w], sd_count)) { + if (!process_line_done(sd_input_state, command.buffer, sd_count)) { - // M808 S saves the sdpos of the next line. M808 loops to a new sdpos. - TERN_(GCODE_REPEAT_MARKERS, repeat.early_parse_M808(command_buffer[index_w])); + // M808 L saves the sdpos of the next line. M808 loops to a new sdpos. + TERN_(GCODE_REPEAT_MARKERS, repeat.early_parse_M808(command.buffer)); + + #if DISABLED(PARK_HEAD_ON_PAUSE) + // When M25 is non-blocking it can still suspend SD commands + // Otherwise the M125 handler needs to know SD printing is active + if (command.buffer[0] == 'M' && command.buffer[1] == '2' && command.buffer[2] == '5' && !NUMERIC(command.buffer[3])) + card.pauseSDPrint(); + #endif // Put the new command into the buffer (no "ok" sent) - _commit_command(false); + ring_buffer.commit_command(true); - // Prime Power-Loss Recovery for the NEXT _commit_command + // Prime Power-Loss Recovery for the NEXT commit_command TERN_(POWER_LOSS_RECOVERY, recovery.cmd_sdpos = card.getIndex()); } if (card.eof()) card.fileHasFinished(); // Handle end of file reached } else - process_stream_char(sd_char, sd_input_state, command_buffer[index_w], sd_count); + process_stream_char(sd_char, sd_input_state, command.buffer, sd_count); } } @@ -637,12 +604,21 @@ void GCodeQueue::get_serial_commands() { * - The SD card file being actively printed */ void GCodeQueue::get_available_commands() { + if (ring_buffer.full()) return; get_serial_commands(); TERN_(SDSUPPORT, get_sdcard_commands()); } +/** + * Run the entire queue in-place. Blocks SD completion/abort until complete. + */ +void GCodeQueue::exhaust() { + while (ring_buffer.occupied()) advance(); + planner.synchronize(); +} + /** * Get the next command in the queue, optionally log it to SD, then dispatch it */ @@ -652,23 +628,40 @@ void GCodeQueue::advance() { if (process_injected_command_P() || process_injected_command()) return; // Return if the G-code buffer is empty - if (!length) return; + if (ring_buffer.empty()) { + #if ENABLED(BUFFER_MONITORING) + if (!command_buffer_empty) { + command_buffer_empty = true; + command_buffer_underruns++; + command_buffer_empty_at = millis(); + } + #endif + return; + } + + #if ENABLED(BUFFER_MONITORING) + if (command_buffer_empty) { + command_buffer_empty = false; + const millis_t command_buffer_empty_duration = millis() - command_buffer_empty_at; + NOLESS(max_command_buffer_empty_duration, command_buffer_empty_duration); + } + #endif #if ENABLED(SDSUPPORT) if (card.flag.saving) { - char* command = command_buffer[index_r]; - if (is_M29(command)) { + char * const cmd = ring_buffer.peek_next_command_string(); + if (is_M29(cmd)) { // M29 closes the file card.closefile(); SERIAL_ECHOLNPGM(STR_FILE_SAVED); #if !defined(__AVR__) || !defined(USBCON) #if ENABLED(SERIAL_STATS_DROPPED_RX) - SERIAL_ECHOLNPAIR("Dropped bytes: ", MYSERIAL0.dropped()); + SERIAL_ECHOLNPGM("Dropped bytes: ", MYSERIAL1.dropped()); #endif #if ENABLED(SERIAL_STATS_MAX_RX_QUEUED) - SERIAL_ECHOLNPAIR("Max RX Queue Size: ", MYSERIAL0.rxMaxEnqueued()); + SERIAL_ECHOLNPGM("Max RX Queue Size: ", MYSERIAL1.rxMaxEnqueued()); #endif #endif @@ -676,7 +669,7 @@ void GCodeQueue::advance() { } else { // Write the string from the read buffer to SD - card.write_command(command); + card.write_command(cmd); if (card.flag.logging) gcode.process_next_command(); // The card is saving because it's logging else @@ -693,7 +686,43 @@ void GCodeQueue::advance() { #endif // SDSUPPORT // The queue may be reset by a command handler or by code invoked by idle() within a handler - --length; - if (++index_r >= BUFSIZE) index_r = 0; - + ring_buffer.advance_pos(ring_buffer.index_r, -1); } + +#if ENABLED(BUFFER_MONITORING) + + void GCodeQueue::report_buffer_statistics() { + SERIAL_ECHOLNPGM("D576" + " P:", planner.moves_free(), " ", -queue.planner_buffer_underruns, " (", queue.max_planner_buffer_empty_duration, ")" + " B:", BUFSIZE - ring_buffer.length, " ", -queue.command_buffer_underruns, " (", queue.max_command_buffer_empty_duration, ")" + ); + command_buffer_underruns = planner_buffer_underruns = 0; + max_command_buffer_empty_duration = max_planner_buffer_empty_duration = 0; + } + + void GCodeQueue::auto_report_buffer_statistics() { + // Bit of a hack to try to catch planner buffer underruns without having logic + // running inside Stepper::block_phase_isr + const millis_t ms = millis(); + if (planner.movesplanned() == 0) { + if (!planner_buffer_empty) { // the planner buffer wasn't empty, but now it is + planner_buffer_empty = true; + planner_buffer_underruns++; + planner_buffer_empty_at = ms; + } + } + else if (planner_buffer_empty) { // the planner buffer was empty, but now it's not + planner_buffer_empty = false; + const millis_t planner_buffer_empty_duration = ms - planner_buffer_empty_at; + NOLESS(max_planner_buffer_empty_duration, planner_buffer_empty_duration); // if it's longer than the currently tracked max duration, replace it + } + + if (queue.auto_buffer_report_interval && ELAPSED(ms, queue.next_buffer_report_ms)) { + queue.next_buffer_report_ms = ms + 1000UL * queue.auto_buffer_report_interval; + PORT_REDIRECT(SERIAL_BOTH); + report_buffer_statistics(); + PORT_RESTORE(); + } + } + +#endif // BUFFER_MONITORING diff --git a/Marlin/src/gcode/queue.h b/Marlin/src/gcode/queue.h index d677146a7dbe..6bcf4a97e4be 100644 --- a/Marlin/src/gcode/queue.h +++ b/Marlin/src/gcode/queue.h @@ -31,41 +31,84 @@ class GCodeQueue { public: /** - * GCode line number handling. Hosts may include line numbers when sending - * commands to Marlin, and lines will be checked for sequentiality. - * M110 N sets the current line number. + * The buffers per serial port. */ - - static long last_N[NUM_SERIAL]; + struct SerialState { + /** + * GCode line number handling. Hosts may include line numbers when sending + * commands to Marlin, and lines will be checked for sequentiality. + * M110 N sets the current line number. + */ + long last_N; + int count; //!< Number of characters read in the current line of serial input + char line_buffer[MAX_CMD_SIZE]; //!< The current line accumulator + uint8_t input_state; //!< The input state + }; + + static SerialState serial_state[NUM_SERIAL]; //!< Serial states for each serial port /** * GCode Command Queue - * A simple ring buffer of BUFSIZE command strings. + * A simple (circular) ring buffer of BUFSIZE command strings. * * Commands are copied into this buffer by the command injectors * (immediate, serial, sd card) and they are processed sequentially by * the main loop. The gcode.process_next_command method parses the next * command and hands off execution to individual handler functions. */ - static uint8_t length, // Count of commands in the queue - index_r; // Ring buffer read position - - static char command_buffer[BUFSIZE][MAX_CMD_SIZE]; + struct CommandLine { + char buffer[MAX_CMD_SIZE]; //!< The command buffer + bool skip_ok; //!< Skip sending ok when command is processed? + #if HAS_MULTI_SERIAL + serial_index_t port; //!< Serial port the command was received on + #endif + }; /** - * The port that the command was received on + * A handy ring buffer type */ - #if HAS_MULTI_SERIAL - static serial_index_t port[BUFSIZE]; - #endif - static inline serial_index_t command_port() { return TERN0(HAS_MULTI_SERIAL, port[index_r]); } + struct RingBuffer { + uint8_t length, //!< Number of commands in the queue + index_r, //!< Ring buffer's read position + index_w; //!< Ring buffer's write position + CommandLine commands[BUFSIZE]; //!< The ring buffer of commands + + inline serial_index_t command_port() const { return TERN0(HAS_MULTI_SERIAL, commands[index_r].port); } + + inline void clear() { length = index_r = index_w = 0; } + + void advance_pos(uint8_t &p, const int inc) { if (++p >= BUFSIZE) p = 0; length += inc; } + + void commit_command(bool skip_ok + OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind = serial_index_t()) + ); + + bool enqueue(const char *cmd, bool skip_ok = true + OPTARG(HAS_MULTI_SERIAL, serial_index_t serial_ind = serial_index_t()) + ); - GCodeQueue(); + void ok_to_send(); + + inline bool full(uint8_t cmdCount=1) const { return length > (BUFSIZE - cmdCount); } + + inline bool occupied() const { return length != 0; } + + inline bool empty() const { return !occupied(); } + + inline CommandLine& peek_next_command() { return commands[index_r]; } + + inline char* peek_next_command_string() { return peek_next_command().buffer; } + }; + + /** + * The ring buffer of commands + */ + static RingBuffer ring_buffer; /** * Clear the Marlin command queue */ - static void clear(); + static void clear() { ring_buffer.clear(); } /** * Next Injected Command (PROGMEM) pointer. (nullptr == empty) @@ -96,7 +139,7 @@ class GCodeQueue { /** * Enqueue and return only when commands are actually enqueued */ - static void enqueue_one_now(const char* cmd); + static void enqueue_one_now(const char *cmd); /** * Attempt to enqueue a single G-code command @@ -112,13 +155,18 @@ class GCodeQueue { /** * Check whether there are any commands yet to be executed */ - static bool has_commands_queued(); + static bool has_commands_queued() { return ring_buffer.length || injected_commands_P || injected_commands[0]; } /** * Get the next command in the queue, optionally log it to SD, then dispatch it */ static void advance(); + /** + * Run the entire queue in-place + */ + static void exhaust(); + /** * Add to the circular command queue the next command from: * - The command-injection queue (injected_commands_P) @@ -136,17 +184,60 @@ class GCodeQueue { * P Planner space remaining * B Block queue space remaining */ - static void ok_to_send(); + static inline void ok_to_send() { ring_buffer.ok_to_send(); } /** * Clear the serial line and request a resend of * the next expected line number. */ - static void flush_and_request_resend(); + static void flush_and_request_resend(const serial_index_t serial_ind); -private: + /** + * (Re)Set the current line number for the last received command + */ + static inline void set_current_line_number(long n) { serial_state[ring_buffer.command_port().index].last_N = n; } + + #if ENABLED(BUFFER_MONITORING) + + private: + + /** + * Track buffer underruns + */ + static uint32_t command_buffer_underruns, planner_buffer_underruns; + static bool command_buffer_empty, planner_buffer_empty; + static millis_t max_command_buffer_empty_duration, max_planner_buffer_empty_duration, + command_buffer_empty_at, planner_buffer_empty_at; + + /** + * Report buffer statistics to the host to be able to detect buffer underruns + * + * Returns "D576 " followed by: + * P Planner space remaining + * B Command buffer space remaining + * PU Number of planner buffer underruns since last report + * PD Max time in ms the planner buffer was empty since last report + * BU Number of command buffer underruns since last report + * BD Max time in ms the command buffer was empty since last report + */ + static void report_buffer_statistics(); + + static uint8_t auto_buffer_report_interval; + static millis_t next_buffer_report_ms; + + public: - static uint8_t index_w; // Ring buffer write position + static void auto_report_buffer_statistics(); + + static inline void set_auto_report_interval(uint8_t v) { + NOMORE(v, 60); + auto_buffer_report_interval = v; + next_buffer_report_ms = millis() + 1000UL * v; + } + + #endif // BUFFER_MONITORING + +private: static void get_serial_commands(); @@ -154,18 +245,6 @@ class GCodeQueue { static void get_sdcard_commands(); #endif - static void _commit_command(bool say_ok - #if HAS_MULTI_SERIAL - , serial_index_t serial_ind=-1 - #endif - ); - - static bool _enqueue(const char* cmd, bool say_ok=false - #if HAS_MULTI_SERIAL - , serial_index_t serial_ind=-1 - #endif - ); - // Process the next "immediate" command (PROGMEM) static bool process_injected_command_P(); @@ -176,10 +255,11 @@ class GCodeQueue { * Enqueue with Serial Echo * Return true on success */ - static bool enqueue_one(const char* cmd); + static bool enqueue_one(const char *cmd); static void gcode_line_error(PGM_P const err, const serial_index_t serial_ind); + friend class GcodeSuite; }; extern GCodeQueue queue; diff --git a/Marlin/src/gcode/scara/M360-M364.cpp b/Marlin/src/gcode/scara/M360-M364.cpp index 562beee4f98e..f32fa09de071 100644 --- a/Marlin/src/gcode/scara/M360-M364.cpp +++ b/Marlin/src/gcode/scara/M360-M364.cpp @@ -31,7 +31,7 @@ inline bool SCARA_move_to_cal(const uint8_t delta_a, const uint8_t delta_b) { if (IsRunning()) { - forward_kinematics_SCARA(delta_a, delta_b); + forward_kinematics(delta_a, delta_b); do_blocking_move_to_xy(cartes); return true; } diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index 1cf700ae26e1..032ec1f19869 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -25,11 +25,10 @@ #if ENABLED(SDSUPPORT) #include "../gcode.h" +#include "../../module/planner.h" #include "../../module/printcounter.h" - -#if DISABLED(NO_SD_AUTOSTART) - #include "../../sd/cardreader.h" -#endif +#include "../../module/temperature.h" +#include "../../sd/cardreader.h" #ifdef SD_FINISHED_RELEASECOMMAND #include "../queue.h" @@ -50,6 +49,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" #endif #if ENABLED(HOST_ACTION_COMMANDS) @@ -64,6 +65,11 @@ * M1001: Execute actions for SD print completion */ void GcodeSuite::M1001() { + planner.synchronize(); + + // SD Printing is finished when the queue reaches M1001 + card.flag.sdprinting = card.flag.sdprintdone = false; + // If there's another auto#.g file to run... if (TERN(NO_SD_AUTOSTART, false, card.autofile_check())) return; @@ -82,7 +88,7 @@ void GcodeSuite::M1001() { // Announce SD file completion { - PORT_REDIRECT(SERIAL_ALL); + PORT_REDIRECT(SerialMask::All); SERIAL_ECHOLNPGM(STR_FILE_PRINTED); } @@ -92,7 +98,7 @@ void GcodeSuite::M1001() { printerEventLEDs.onPrintCompleted(); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_PRINT_DONE))); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT(MSG_PRINT_DONE), CONTINUE_STR)); - wait_for_user_response(SEC_TO_MS(TERN(HAS_LCD_MENU, PE_LEDS_COMPLETED_TIME, 30))); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(SEC_TO_MS(TERN(HAS_LCD_MENU, PE_LEDS_COMPLETED_TIME, 30)))); printerEventLEDs.onResumeAfterWait(); } #endif @@ -103,6 +109,7 @@ void GcodeSuite::M1001() { #endif TERN_(EXTENSIBLE_UI, ExtUI::onPrintFinished()); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Print_Finished()); // Re-select the last printed file in the UI TERN_(SD_REPRINT_LAST_SELECTED_FILE, ui.reselect_last_file()); diff --git a/Marlin/src/gcode/sd/M20.cpp b/Marlin/src/gcode/sd/M20.cpp index 7ac4affdae9c..573183833854 100644 --- a/Marlin/src/gcode/sd/M20.cpp +++ b/Marlin/src/gcode/sd/M20.cpp @@ -33,7 +33,7 @@ void GcodeSuite::M20() { if (card.flag.mounted) { SERIAL_ECHOLNPGM(STR_BEGIN_FILE_LIST); - card.ls(); + card.ls(TERN_(LONG_FILENAME_HOST_SUPPORT, parser.boolval('L'))); SERIAL_ECHOLNPGM(STR_END_FILE_LIST); } else diff --git a/Marlin/src/gcode/sd/M24_M25.cpp b/Marlin/src/gcode/sd/M24_M25.cpp index 611ba17c55bc..4cb040feb35c 100644 --- a/Marlin/src/gcode/sd/M24_M25.cpp +++ b/Marlin/src/gcode/sd/M24_M25.cpp @@ -41,6 +41,10 @@ #include "../../feature/powerloss.h" #endif +#if ENABLED(DGUS_LCD_UI_MKS) + #include "../../lcd/extui/dgus/DGUSDisplayDef.h" +#endif + #include "../../MarlinCore.h" // for startOrResumeJob /** @@ -48,6 +52,11 @@ */ void GcodeSuite::M24() { + #if ENABLED(DGUS_LCD_UI_MKS) + if ((print_job_timer.isPaused() || print_job_timer.isRunning()) && !parser.seen("ST")) + MKS_resume_print_move(); + #endif + #if ENABLED(POWER_LOSS_RECOVERY) if (parser.seenval('S')) card.setIndex(parser.value_long()); if (parser.seenval('T')) print_job_timer.resume(parser.value_long()); @@ -61,7 +70,7 @@ void GcodeSuite::M24() { #endif if (card.isFileOpen()) { - card.startFileprint(); // SD card will now be read for commands + card.startOrResumeFilePrinting(); // SD card will now be read for commands startOrResumeJob(); // Start (or resume) the print job timer TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); } @@ -78,6 +87,10 @@ void GcodeSuite::M24() { /** * M25: Pause SD Print + * + * With PARK_HEAD_ON_PAUSE: + * Invoke M125 to store the current position and move to the park + * position. M24 will move the head back before resuming the print. */ void GcodeSuite::M25() { @@ -92,15 +105,15 @@ void GcodeSuite::M25() { if (IS_SD_PRINTING()) card.pauseSDPrint(); #endif - #if ENABLED(POWER_LOSS_RECOVERY) + #if ENABLED(POWER_LOSS_RECOVERY) && DISABLED(DGUS_LCD_UI_MKS) if (recovery.enabled) recovery.save(true); #endif print_job_timer.pause(); - #if DISABLED(DWIN_CREALITY_LCD) - ui.reset_status(); - #endif + TERN_(DGUS_LCD_UI_MKS, MKS_pause_print_move()); + + IF_DISABLED(DWIN_CREALITY_LCD, ui.reset_status()); #if ENABLED(HOST_ACTION_COMMANDS) TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("Pause SD"), PSTR("Resume"))); diff --git a/Marlin/src/gcode/sd/M27.cpp b/Marlin/src/gcode/sd/M27.cpp index a76070fda83a..88238190e259 100644 --- a/Marlin/src/gcode/sd/M27.cpp +++ b/Marlin/src/gcode/sd/M27.cpp @@ -33,9 +33,9 @@ * OR, with 'C' get the current filename. */ void GcodeSuite::M27() { - if (parser.seen('C')) { + if (parser.seen_test('C')) { SERIAL_ECHOPGM("Current file: "); - card.printFilename(); + card.printSelectedFilename(); return; } diff --git a/Marlin/src/gcode/sd/M28_M29.cpp b/Marlin/src/gcode/sd/M28_M29.cpp index 6f3f2450a195..373938d99b4b 100644 --- a/Marlin/src/gcode/sd/M28_M29.cpp +++ b/Marlin/src/gcode/sd/M28_M29.cpp @@ -49,7 +49,7 @@ void GcodeSuite::M28() { // Binary transfer mode if ((card.flag.binary_mode = binary_mode)) { SERIAL_ECHO_MSG("Switching to Binary Protocol"); - TERN_(HAS_MULTI_SERIAL, card.transfer_port_index = queue.port[queue.index_r]); + TERN_(HAS_MULTI_SERIAL, card.transfer_port_index = queue.ring_buffer.command_port().index); } else card.openFileWrite(p); diff --git a/Marlin/src/gcode/sd/M32.cpp b/Marlin/src/gcode/sd/M32.cpp index ea893c9232cb..3baa552e6e73 100644 --- a/Marlin/src/gcode/sd/M32.cpp +++ b/Marlin/src/gcode/sd/M32.cpp @@ -49,7 +49,7 @@ void GcodeSuite::M32() { if (parser.seenval('S')) card.setIndex(parser.value_long()); - card.startFileprint(); + card.startOrResumeFilePrinting(); // Procedure calls count as normal print time. if (!call_procedure) startOrResumeJob(); diff --git a/Marlin/src/gcode/sd/M524.cpp b/Marlin/src/gcode/sd/M524.cpp index 089d2e2f0c41..e7159155655c 100644 --- a/Marlin/src/gcode/sd/M524.cpp +++ b/Marlin/src/gcode/sd/M524.cpp @@ -33,7 +33,7 @@ void GcodeSuite::M524() { if (IS_SD_PRINTING()) - card.flag.abort_sd_printing = true; + card.abortFilePrintSoon(); else if (card.isMounted()) card.closefile(); diff --git a/Marlin/src/gcode/sd/M808.cpp b/Marlin/src/gcode/sd/M808.cpp index 0d11b16f8ae2..548683430c1f 100644 --- a/Marlin/src/gcode/sd/M808.cpp +++ b/Marlin/src/gcode/sd/M808.cpp @@ -44,7 +44,7 @@ void GcodeSuite::M808() { // Allowed to go into the queue for logging purposes. // M808 K sent from the host to cancel all loops - if (parser.seen('K')) repeat.cancel(); + if (parser.seen_test('K')) repeat.cancel(); } diff --git a/Marlin/src/gcode/stats/M31.cpp b/Marlin/src/gcode/stats/M31.cpp index 207f9e144e71..355701f6a413 100644 --- a/Marlin/src/gcode/stats/M31.cpp +++ b/Marlin/src/gcode/stats/M31.cpp @@ -35,6 +35,5 @@ void GcodeSuite::M31() { ui.set_status(buffer); - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("Print time: ", buffer); + SERIAL_ECHO_MSG("Print time: ", buffer); } diff --git a/Marlin/src/gcode/stats/M75-M78.cpp b/Marlin/src/gcode/stats/M75-M78.cpp index 568d9b0e2707..b55409946ea3 100644 --- a/Marlin/src/gcode/stats/M75-M78.cpp +++ b/Marlin/src/gcode/stats/M75-M78.cpp @@ -23,14 +23,25 @@ #include "../gcode.h" #include "../../module/printcounter.h" #include "../../lcd/marlinui.h" +#if ENABLED(HOST_PAUSE_M76) + #include "../../feature/host_actions.h" +#endif #include "../../MarlinCore.h" // for startOrResumeJob +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" +#endif + /** * M75: Start print timer */ void GcodeSuite::M75() { startOrResumeJob(); + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + DWIN_Print_Header(parser.string_arg && parser.string_arg[0] ? parser.string_arg : GET_TEXT(MSG_HOST_START_PRINT)); + DWIN_Print_Started(false); + #endif } /** @@ -38,6 +49,7 @@ void GcodeSuite::M75() { */ void GcodeSuite::M76() { print_job_timer.pause(); + TERN_(HOST_PAUSE_M76, host_action_pause()); } /** @@ -45,29 +57,30 @@ void GcodeSuite::M76() { */ void GcodeSuite::M77() { print_job_timer.stop(); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Print_Finished()); } #if ENABLED(PRINTCOUNTER) -/** - * M78: Show print statistics - */ -void GcodeSuite::M78() { - if (parser.intval('S') == 78) { // "M78 S78" will reset the statistics - print_job_timer.initStats(); - ui.reset_status(); - return; - } - - #if HAS_SERVICE_INTERVALS - if (parser.seenval('R')) { - print_job_timer.resetServiceInterval(parser.value_int()); + /** + * M78: Show print statistics + */ + void GcodeSuite::M78() { + if (parser.intval('S') == 78) { // "M78 S78" will reset the statistics + print_job_timer.initStats(); ui.reset_status(); return; } - #endif - print_job_timer.showStats(); -} + #if HAS_SERVICE_INTERVALS + if (parser.seenval('R')) { + print_job_timer.resetServiceInterval(parser.value_int()); + ui.reset_status(); + return; + } + #endif + + print_job_timer.showStats(); + } #endif // PRINTCOUNTER diff --git a/Marlin/src/gcode/temp/M104_M109.cpp b/Marlin/src/gcode/temp/M104_M109.cpp index 07e46e177571..efda04def50a 100644 --- a/Marlin/src/gcode/temp/M104_M109.cpp +++ b/Marlin/src/gcode/temp/M104_M109.cpp @@ -28,7 +28,7 @@ #include "../../inc/MarlinConfigPre.h" -#if EXTRUDERS +#if HAS_EXTRUDERS #include "../gcode.h" #include "../../module/temperature.h" @@ -51,89 +51,29 @@ /** * M104: Set Hotend Temperature target and return immediately - * - * Parameters: - * I : Material Preset index (if material presets are defined) - * T : Tool index. If omitted, applies to the active tool - * S : The target temperature in current units - */ -void GcodeSuite::M104() { - - if (DEBUGGING(DRYRUN)) return; - - #if ENABLED(MIXING_EXTRUDER) && MIXING_VIRTUAL_TOOLS > 1 - constexpr int8_t target_extruder = 0; - #else - const int8_t target_extruder = get_target_extruder_from_command(); - if (target_extruder < 0) return; - #endif - - bool got_temp = false; - int16_t temp = 0; - - // Accept 'I' if temperature presets are defined - #if PREHEAT_COUNT - got_temp = parser.seenval('I'); - if (got_temp) { - const uint8_t index = parser.value_byte(); - temp = ui.material_preset[_MIN(index, PREHEAT_COUNT - 1)].hotend_temp; - } - #endif - - // If no 'I' get the temperature from 'S' - if (!got_temp) { - got_temp = parser.seenval('S'); - if (got_temp) temp = parser.value_celsius(); - } - - if (got_temp) { - #if ENABLED(SINGLENOZZLE_STANDBY_TEMP) - thermalManager.singlenozzle_temp[target_extruder] = temp; - if (target_extruder != active_extruder) return; - #endif - thermalManager.setTargetHotend(temp, target_extruder); - - #if ENABLED(DUAL_X_CARRIAGE) - if (idex_is_duplicating() && target_extruder == 0) - thermalManager.setTargetHotend(temp ? temp + duplicate_extruder_temp_offset : 0, 1); - #endif - - #if ENABLED(PRINTJOB_TIMER_AUTOSTART) - /** - * Stop the timer at the end of print. Start is managed by 'heat and wait' M109. - * Hotends use EXTRUDE_MINTEMP / 2 to allow nozzles to be put into hot standby - * mode, for instance in a dual extruder setup, without affecting the running - * print timer. - */ - thermalManager.auto_job_check_timer(false, true); - #endif - } - - TERN_(AUTOTEMP, planner.autotemp_M104_M109()); -} - -/** * M109: Set Hotend Temperature target and wait * * Parameters * I : Material Preset index (if material presets are defined) * T : Tool index. If omitted, applies to the active tool - * S : The target temperature in current units. Wait for heating only. - * R : The target temperature in current units. Wait for heating and cooling. + * S : The target temperature in current units. For M109, only wait when heating up. * * With AUTOTEMP... * F : Autotemp Scaling Factor. Set non-zero to enable Auto-temp. * S : Minimum temperature, in current units. * B : Maximum temperature, in current units. * + * M109 Parameters + * R : The target temperature in current units. Wait for heating and cooling. + * * Examples - * M109 S100 : Set target to 100°. Wait until the hotend is at or above 100°. + * M104 S100 : Set target to 100° and return. * M109 R150 : Set target to 150°. Wait until the hotend gets close to 150°. * * With PRINTJOB_TIMER_AUTOSTART turning on heaters will start the print job timer * (used by printingIsActive, etc.) and turning off heaters will stop the timer. */ -void GcodeSuite::M109() { +void GcodeSuite::M104_M109(const bool isM109) { if (DEBUGGING(DRYRUN)) return; @@ -145,7 +85,7 @@ void GcodeSuite::M109() { #endif bool got_temp = false; - int16_t temp = 0; + celsius_t temp = 0; // Accept 'I' if temperature presets are defined #if PREHEAT_COUNT @@ -160,8 +100,8 @@ void GcodeSuite::M109() { bool no_wait_for_cooling = false; if (!got_temp) { no_wait_for_cooling = parser.seenval('S'); - got_temp = no_wait_for_cooling || parser.seenval('R'); - if (got_temp) temp = int16_t(parser.value_celsius()); + got_temp = no_wait_for_cooling || (isM109 && parser.seenval('R')); + if (got_temp) temp = parser.value_celsius(); } if (got_temp) { @@ -182,18 +122,16 @@ void GcodeSuite::M109() { * standby mode, (e.g., in a dual extruder setup) without affecting * the running print timer. */ - thermalManager.auto_job_check_timer(true, true); + thermalManager.auto_job_check_timer(isM109, true); #endif - #if HAS_DISPLAY - if (thermalManager.isHeatingHotend(target_extruder) || !no_wait_for_cooling) - thermalManager.set_heating_message(target_extruder); - #endif + if (thermalManager.isHeatingHotend(target_extruder) || !no_wait_for_cooling) + thermalManager.set_heating_message(target_extruder); } TERN_(AUTOTEMP, planner.autotemp_M104_M109()); - if (got_temp) + if (isM109 && got_temp) (void)thermalManager.wait_for_hotend(target_extruder, no_wait_for_cooling); } diff --git a/Marlin/src/gcode/temp/M105.cpp b/Marlin/src/gcode/temp/M105.cpp index eefc3ae9f17f..4de5ba8eefe1 100644 --- a/Marlin/src/gcode/temp/M105.cpp +++ b/Marlin/src/gcode/temp/M105.cpp @@ -35,11 +35,7 @@ void GcodeSuite::M105() { #if HAS_TEMP_SENSOR - thermalManager.print_heater_states(target_extruder - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - , parser.boolval('R') - #endif - ); + thermalManager.print_heater_states(target_extruder OPTARG(HAS_TEMP_REDUNDANT, parser.boolval('R'))); SERIAL_EOL(); diff --git a/Marlin/src/gcode/temp/M106_M107.cpp b/Marlin/src/gcode/temp/M106_M107.cpp index 9c70f1ebc782..3f85c53d78ae 100644 --- a/Marlin/src/gcode/temp/M106_M107.cpp +++ b/Marlin/src/gcode/temp/M106_M107.cpp @@ -28,6 +28,10 @@ #include "../../module/motion.h" #include "../../module/temperature.h" +#if ENABLED(LASER_SYNCHRONOUS_M106_M107) + #include "../../module/planner.h" +#endif + #if PREHEAT_COUNT #include "../../lcd/marlinui.h" #endif @@ -56,40 +60,58 @@ */ void GcodeSuite::M106() { const uint8_t pfan = parser.byteval('P', _ALT_P); + if (pfan >= _CNT_P) return; + #if REDUNDANT_PART_COOLING_FAN + if (pfan == REDUNDANT_PART_COOLING_FAN) return; + #endif + + #if ENABLED(EXTRA_FAN_SPEED) + const uint16_t t = parser.intval('T'); + if (t > 0) return thermalManager.set_temp_fan_speed(pfan, t); + #endif + + const uint16_t dspeed = parser.seen_test('A') ? thermalManager.fan_speed[active_extruder] : 255; - if (pfan < _CNT_P) { + uint16_t speed = dspeed; - #if ENABLED(EXTRA_FAN_SPEED) - const uint16_t t = parser.intval('T'); - if (t > 0) return thermalManager.set_temp_fan_speed(pfan, t); - #endif + // Accept 'I' if temperature presets are defined + #if PREHEAT_COUNT + const bool got_preset = parser.seenval('I'); + if (got_preset) speed = ui.material_preset[_MIN(parser.value_byte(), PREHEAT_COUNT - 1)].fan_speed; + #else + constexpr bool got_preset = false; + #endif - const uint16_t dspeed = parser.seen('A') ? thermalManager.fan_speed[active_extruder] : 255; + if (!got_preset && parser.seenval('S')) + speed = parser.value_ushort(); - uint16_t speed = dspeed; + TERN_(FOAMCUTTER_XYUV, speed *= 2.55); // Get command in % of max heat - // Accept 'I' if temperature presets are defined - #if PREHEAT_COUNT - const bool got_preset = parser.seenval('I'); - if (got_preset) speed = ui.material_preset[_MIN(parser.value_byte(), PREHEAT_COUNT - 1)].fan_speed; - #else - constexpr bool got_preset = false; - #endif + // Set speed, with constraint + thermalManager.set_fan_speed(pfan, speed); - if (!got_preset && parser.seenval('S')) - speed = parser.value_ushort(); + TERN_(LASER_SYNCHRONOUS_M106_M107, planner.buffer_sync_block(BLOCK_FLAG_SYNC_FANS)); - // Set speed, with constraint - thermalManager.set_fan_speed(pfan, speed); - } + if (TERN0(DUAL_X_CARRIAGE, idex_is_duplicating())) // pfan == 0 when duplicating + thermalManager.set_fan_speed(1 - pfan, speed); } /** * M107: Fan Off */ void GcodeSuite::M107() { - const uint8_t p = parser.byteval('P', _ALT_P); - thermalManager.set_fan_speed(p, 0); + const uint8_t pfan = parser.byteval('P', _ALT_P); + if (pfan >= _CNT_P) return; + #if REDUNDANT_PART_COOLING_FAN + if (pfan == REDUNDANT_PART_COOLING_FAN) return; + #endif + + thermalManager.set_fan_speed(pfan, 0); + + if (TERN0(DUAL_X_CARRIAGE, idex_is_duplicating())) // pfan == 0 when duplicating + thermalManager.set_fan_speed(1 - pfan, 0); + + TERN_(LASER_SYNCHRONOUS_M106_M107, planner.buffer_sync_block(BLOCK_FLAG_SYNC_FANS)); } #endif // HAS_FAN diff --git a/Marlin/src/gcode/temp/M140_M190.cpp b/Marlin/src/gcode/temp/M140_M190.cpp index d684127fe151..857e11dde53f 100644 --- a/Marlin/src/gcode/temp/M140_M190.cpp +++ b/Marlin/src/gcode/temp/M140_M190.cpp @@ -32,80 +32,35 @@ #include "../gcode.h" #include "../../module/temperature.h" -#include "../../module/motion.h" #include "../../lcd/marlinui.h" -#if ENABLED(PRINTJOB_TIMER_AUTOSTART) - #include "../../module/printcounter.h" -#endif - -#if ENABLED(PRINTER_EVENT_LEDS) - #include "../../feature/leds/leds.h" -#endif - -#include "../../MarlinCore.h" // for wait_for_heatup, idle, startOrResumeJob - /** - * M140: Set bed temperature + * M140 - Set Bed Temperature target and return immediately + * M190 - Set Bed Temperature target and wait * * I : Preset index (if material presets are defined) * S : The target temperature in current units - */ -void GcodeSuite::M140() { - if (DEBUGGING(DRYRUN)) return; - - bool got_temp = false; - int16_t temp = 0; - - // Accept 'I' if temperature presets are defined - #if PREHEAT_COUNT - got_temp = parser.seenval('I'); - if (got_temp) { - const uint8_t index = parser.value_byte(); - temp = ui.material_preset[_MIN(index, PREHEAT_COUNT - 1)].bed_temp; - } - #endif - - // If no 'I' get the temperature from 'S' - if (!got_temp) { - got_temp = parser.seenval('S'); - if (got_temp) temp = parser.value_celsius(); - } - - if (got_temp) { - thermalManager.setTargetBed(temp); - - #if ENABLED(PRINTJOB_TIMER_AUTOSTART) - /** - * Stop the timer at the end of print. Hotend, bed target, and chamber - * temperatures need to be set below mintemp. Order of M140, M104, and M141 - * at the end of the print does not matter. - */ - thermalManager.auto_job_check_timer(false, true); - #endif - } -} - -/** - * M190 - Set Bed Temperature target and wait * - * Parameters: + * Parameters * I : Preset index (if material presets are defined) * S : The target temperature in current units. Wait for heating only. + * + * M190 Parameters * R : The target temperature in current units. Wait for heating and cooling. * - * Examples: - * M190 S60 : Set target to 60°. Wait until the bed is at or above 60°. + * Examples + * M140 S60 : Set target to 60° and return right away. * M190 R40 : Set target to 40°. Wait until the bed gets close to 40°. * * With PRINTJOB_TIMER_AUTOSTART turning on heaters will start the print job timer * (used by printingIsActive, etc.) and turning off heaters will stop the timer. */ -void GcodeSuite::M190() { +void GcodeSuite::M140_M190(const bool isM190) { + if (DEBUGGING(DRYRUN)) return; bool got_temp = false; - int16_t temp = 0; + celsius_t temp = 0; // Accept 'I' if temperature presets are defined #if PREHEAT_COUNT @@ -120,19 +75,21 @@ void GcodeSuite::M190() { bool no_wait_for_cooling = false; if (!got_temp) { no_wait_for_cooling = parser.seenval('S'); - got_temp = no_wait_for_cooling || parser.seenval('R'); - if (got_temp) temp = int16_t(parser.value_celsius()); + got_temp = no_wait_for_cooling || (isM190 && parser.seenval('R')); + if (got_temp) temp = parser.value_celsius(); } if (!got_temp) return; thermalManager.setTargetBed(temp); - TERN_(PRINTJOB_TIMER_AUTOSTART, thermalManager.auto_job_check_timer(true, false)); - ui.set_status_P(thermalManager.isHeatingBed() ? GET_TEXT(MSG_BED_HEATING) : GET_TEXT(MSG_BED_COOLING)); - thermalManager.wait_for_bed(no_wait_for_cooling); + // with PRINTJOB_TIMER_AUTOSTART, M190 can start the timer, and M140 can stop it + TERN_(PRINTJOB_TIMER_AUTOSTART, thermalManager.auto_job_check_timer(isM190, !isM190)); + + if (isM190) + thermalManager.wait_for_bed(no_wait_for_cooling); } #endif // HAS_HEATED_BED diff --git a/Marlin/src/gcode/temp/M141_M191.cpp b/Marlin/src/gcode/temp/M141_M191.cpp index 17eb71eadaec..ed7637c92aa6 100644 --- a/Marlin/src/gcode/temp/M141_M191.cpp +++ b/Marlin/src/gcode/temp/M141_M191.cpp @@ -32,20 +32,8 @@ #include "../gcode.h" #include "../../module/temperature.h" - -#include "../../module/motion.h" #include "../../lcd/marlinui.h" -#if ENABLED(PRINTJOB_TIMER_AUTOSTART) - #include "../../module/printcounter.h" -#endif - -#if ENABLED(PRINTER_EVENT_LEDS) - #include "../../feature/leds/leds.h" -#endif - -#include "../../MarlinCore.h" // for wait_for_heatup, idle, startOrResumeJob - /** * M141: Set chamber temperature */ diff --git a/Marlin/src/gcode/temp/M143_M193.cpp b/Marlin/src/gcode/temp/M143_M193.cpp new file mode 100644 index 000000000000..aef4350e6048 --- /dev/null +++ b/Marlin/src/gcode/temp/M143_M193.cpp @@ -0,0 +1,67 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * gcode/temp/M143_M193.cpp + * + * Laser Cooler target temperature control + */ + +#include "../../inc/MarlinConfig.h" + +#if HAS_COOLER + +#include "../../feature/cooler.h" +extern Cooler cooler; + +#include "../gcode.h" +#include "../../module/temperature.h" +#include "../../lcd/marlinui.h" + +/** + * M143: Set cooler temperature + */ +void GcodeSuite::M143() { + if (DEBUGGING(DRYRUN)) return; + if (parser.seenval('S')) { + thermalManager.setTargetCooler(parser.value_celsius()); + parser.value_celsius() ? cooler.enable() : cooler.disable(); + } +} + +/** + * M193: Sxxx Wait for laser current temp to reach target temp. Waits only when cooling. + */ +void GcodeSuite::M193() { + if (DEBUGGING(DRYRUN)) return; + + if (parser.seenval('S')) { + cooler.enable(); + thermalManager.setTargetCooler(parser.value_celsius()); + if (thermalManager.isLaserCooling()) { + ui.set_status_P(GET_TEXT(MSG_LASER_COOLING)); + thermalManager.wait_for_cooler(true); + } + } +} + +#endif // HAS_COOLER diff --git a/Marlin/src/gcode/temp/M303.cpp b/Marlin/src/gcode/temp/M303.cpp index a066ddc88df5..0d0ce478eed8 100644 --- a/Marlin/src/gcode/temp/M303.cpp +++ b/Marlin/src/gcode/temp/M303.cpp @@ -30,6 +30,8 @@ #if ENABLED(EXTENSIBLE_UI) #include "../../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../../lcd/e3v2/enhanced/dwin.h" #endif /** @@ -40,45 +42,51 @@ * C Number of times to repeat the procedure. (Minimum: 3, Default: 5) * U Flag to apply the result to the current PID values * - * With PID_DEBUG: + * With PID_DEBUG, PID_BED_DEBUG, or PID_CHAMBER_DEBUG: * D Toggle PID debugging and EXIT without further action. */ -#if ENABLED(PID_DEBUG) - bool pid_debug_flag = 0; -#endif - void GcodeSuite::M303() { - #if ENABLED(PID_DEBUG) - if (parser.seen('D')) { - pid_debug_flag = !pid_debug_flag; + #if ANY(PID_DEBUG, PID_BED_DEBUG, PID_CHAMBER_DEBUG) + if (parser.seen_test('D')) { + thermalManager.pid_debug_flag ^= true; SERIAL_ECHO_START(); SERIAL_ECHOPGM("PID Debug "); - serialprintln_onoff(pid_debug_flag); + serialprintln_onoff(thermalManager.pid_debug_flag); return; } #endif - #define SI TERN(PIDTEMPBED, H_BED, H_E0) - #define EI TERN(PIDTEMP, HOTENDS - 1, H_BED) - const heater_id_t e = (heater_id_t)parser.intval('E'); - if (!WITHIN(e, SI, EI)) { - SERIAL_ECHOLNPGM(STR_PID_BAD_EXTRUDER_NUM); - TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM)); - return; + const heater_id_t hid = (heater_id_t)parser.intval('E'); + celsius_t default_temp; + switch (hid) { + #if ENABLED(PIDTEMP) + case 0 ... HOTENDS - 1: default_temp = PREHEAT_1_TEMP_HOTEND; break; + #endif + #if ENABLED(PIDTEMPBED) + case H_BED: default_temp = PREHEAT_1_TEMP_BED; break; + #endif + #if ENABLED(PIDTEMPCHAMBER) + case H_CHAMBER: default_temp = PREHEAT_1_TEMP_CHAMBER; break; + #endif + default: + SERIAL_ECHOLNPGM(STR_PID_BAD_HEATER_ID); + TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_BAD_EXTRUDER_NUM)); + return; } + const celsius_t temp = parser.celsiusval('S', default_temp); const int c = parser.intval('C', 5); const bool u = parser.boolval('U'); - const int16_t temp = parser.celsiusval('S', e < 0 ? PREHEAT_1_TEMP_BED : PREHEAT_1_TEMP_HOTEND); #if DISABLED(BUSY_WHILE_HEATING) KEEPALIVE_STATE(NOT_BUSY); #endif LCD_MESSAGEPGM(MSG_PID_AUTOTUNE); - thermalManager.PID_autotune(temp, e, c, u); + thermalManager.PID_autotune(temp, hid, c, u); ui.reset_status(); } diff --git a/Marlin/src/gcode/units/M149.cpp b/Marlin/src/gcode/units/M149.cpp index 5d9f83206980..20b3781eada5 100644 --- a/Marlin/src/gcode/units/M149.cpp +++ b/Marlin/src/gcode/units/M149.cpp @@ -33,6 +33,13 @@ void GcodeSuite::M149() { if (parser.seenval('C')) parser.set_input_temp_units(TEMPUNIT_C); else if (parser.seenval('K')) parser.set_input_temp_units(TEMPUNIT_K); else if (parser.seenval('F')) parser.set_input_temp_units(TEMPUNIT_F); + else M149_report(); +} + +void GcodeSuite::M149_report(const bool forReplay/*=true*/) { + report_heading_etc(forReplay, PSTR(STR_TEMPERATURE_UNITS)); + SERIAL_ECHOPGM(" M149 ", AS_CHAR(parser.temp_units_code()), " ; Units in "); + SERIAL_ECHOLNPGM_P(parser.temp_units_name()); } #endif // TEMPERATURE_UNITS_SUPPORT diff --git a/Marlin/src/gcode/units/M82_M83.cpp b/Marlin/src/gcode/units/M82_M83.cpp index d93f0ea5adf3..c1767e805739 100644 --- a/Marlin/src/gcode/units/M82_M83.cpp +++ b/Marlin/src/gcode/units/M82_M83.cpp @@ -20,6 +20,10 @@ * */ +#include "../../inc/MarlinConfigPre.h" + +#if HAS_EXTRUDERS + #include "../gcode.h" /** @@ -31,3 +35,5 @@ void GcodeSuite::M82() { set_e_absolute(); } * M83: Set E codes relative while in Absolute Coordinates (G90) mode */ void GcodeSuite::M83() { set_e_relative(); } + +#endif // HAS_EXTRUDERS diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 442e6fc9efad..98168709f620 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -26,11 +26,16 @@ * Conditionals that need to be set before Configuration_adv.h or pins.h */ -// MKS_LCD12864 is a variant of MKS_MINI_12864 -#if ENABLED(MKS_LCD12864) +// MKS_LCD12864A/B is a variant of MKS_MINI_12864 +#if EITHER(MKS_LCD12864A, MKS_LCD12864B) #define MKS_MINI_12864 #endif +// MKS_MINI_12864_V3 is simply identical to FYSETC_MINI_12864_2_1 +#if ENABLED(MKS_MINI_12864_V3) + #define FYSETC_MINI_12864_2_1 +#endif + /** * General Flags that may be set below by specific LCDs * @@ -50,6 +55,10 @@ #define MINIPANEL +#elif ENABLED(YHCB2004) + + #define IS_ULTIPANEL 1 + #elif ENABLED(CARTESIO_UI) #define DOGLCD @@ -132,6 +141,13 @@ #define IS_RRD_SC 1 #define IS_U8GLIB_SSD1306 +#elif ENABLED(SAV_3DGLCD) + + #ifdef U8GLIB_SSD1306 + #define IS_U8GLIB_SSD1306 + #endif + #define IS_NEWPANEL 1 + #elif ENABLED(FYSETC_242_OLED_12864) #define IS_RRD_SC 1 @@ -204,7 +220,7 @@ #define LCD_PROGRESS_BAR #endif #if ENABLED(TFTGLCD_PANEL_I2C) - #define LCD_I2C_ADDRESS 0x27 // Must be equal to panel's I2C slave addres + #define LCD_I2C_ADDRESS 0x33 // Must be 0x33 for STM32 main boards and equal to panel's I2C slave address #endif #define LCD_USE_I2C_BUZZER // Enable buzzer on LCD, used for both I2C and SPI buses (LiquidTWI2 not required) #define STD_ENCODER_PULSES_PER_STEP 2 @@ -221,18 +237,29 @@ #elif ENABLED(CR10_STOCKDISPLAY) #define IS_RRD_FG_SC 1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define LCD_ST7920_DELAY_1 125 + #define LCD_ST7920_DELAY_2 125 + #define LCD_ST7920_DELAY_3 125 + +#elif EITHER(ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING) + + #define IS_RRD_FG_SC 1 + #define LCD_ST7920_DELAY_1 150 + #define LCD_ST7920_DELAY_2 150 + #define LCD_ST7920_DELAY_3 150 -#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, ANET_FULL_GRAPHICS_LCD, ANET_FULL_GRAPHICS_LCD_ALT_WIRING, BQ_LCD_SMART_CONTROLLER) +#elif ANY(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, BQ_LCD_SMART_CONTROLLER, K3D_FULL_GRAPHIC_SMART_CONTROLLER) #define IS_RRD_FG_SC 1 #elif ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) - // RepRapDiscount LCD or Graphical LCD with rotary click encoder + #define IS_RRD_SC 1 // RepRapDiscount LCD or Graphical LCD with rotary click encoder + +#elif ENABLED(K3D_242_OLED_CONTROLLER) + #define IS_RRD_SC 1 + #define U8GLIB_SSD1309 #endif @@ -397,6 +424,10 @@ #endif +#if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && DISABLED(NO_LCD_DETECT) + #define DETECT_I2C_LCD_DEVICE 1 +#endif + #ifndef STD_ENCODER_PULSES_PER_STEP #if ENABLED(TOUCH_SCREEN) #define STD_ENCODER_PULSES_PER_STEP 2 @@ -447,19 +478,40 @@ #endif // Aliases for LCD features -#if ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY) +#if ANY(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS) + #define HAS_DGUS_LCD_CLASSIC 1 +#endif + +#if ANY(HAS_DGUS_LCD_CLASSIC, DGUS_LCD_UI_RELOADED) #define HAS_DGUS_LCD 1 #endif // Extensible UI serial touch screens. (See src/lcd/extui) -#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON) +#if ANY(HAS_DGUS_LCD, MALYAN_LCD, TOUCH_UI_FTDI_EVE, ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, NEXTION_TFT) #define IS_EXTUI 1 #define EXTENSIBLE_UI #endif // Aliases for LCD features -#if EITHER(IS_ULTRA_LCD, EXTENSIBLE_UI) - #define HAS_DISPLAY 1 +#if EITHER(DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_ENHANCED) + #define HAS_DWIN_E3V2_BASIC 1 +#endif +#if EITHER(HAS_DWIN_E3V2_BASIC, DWIN_CREALITY_LCD_JYERSUI) + #define HAS_DWIN_E3V2 1 +#endif + +// E3V2 extras +#if HAS_DWIN_E3V2 || IS_DWIN_MARLINUI + #define SERIAL_CATCHALL 0 + #ifndef LCD_SERIAL_PORT + #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO) + #define LCD_SERIAL_PORT 1 + #else + #define LCD_SERIAL_PORT 3 // Creality 4.x board + #endif + #endif + #define HAS_LCD_BRIGHTNESS 1 + #define LCD_BRIGHTNESS_MAX 250 #endif #if IS_ULTRA_LCD @@ -468,12 +520,19 @@ #define HAS_MARLINUI_U8GLIB 1 #elif IS_TFTGLCD_PANEL // Neither DOGM nor HD44780. Fully customized interface. - #elif DISABLED(HAS_GRAPHICAL_TFT) + #elif IS_DWIN_MARLINUI + // Since HAS_MARLINUI_U8GLIB refers to U8G displays + // the DWIN display can define its own flags + #elif !HAS_GRAPHICAL_TFT #define HAS_MARLINUI_HD44780 1 #endif #endif -#if EITHER(HAS_DISPLAY, GLOBAL_STATUS_MESSAGE) +#if ANY(HAS_WIRED_LCD, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) + #define HAS_DISPLAY 1 +#endif + +#if ANY(HAS_DISPLAY, HAS_DWIN_E3V2, GLOBAL_STATUS_MESSAGE) #define HAS_STATUS_MESSAGE 1 #endif @@ -493,11 +552,11 @@ /** * Multi-Material-Unit supported models */ -#define PRUSA_MMU1 1 -#define PRUSA_MMU2 2 -#define PRUSA_MMU2S 3 -#define SMUFF_EMU_MMU2 12 -#define SMUFF_EMU_MMU2S 13 +#define PRUSA_MMU1 1 +#define PRUSA_MMU2 2 +#define PRUSA_MMU2S 3 +#define EXTENDABLE_EMU_MMU2 12 +#define EXTENDABLE_EMU_MMU2S 13 #ifdef MMU_MODEL #define HAS_MMU 1 @@ -509,16 +568,16 @@ #define HAS_PRUSA_MMU2 1 #define HAS_PRUSA_MMU2S 1 #endif - #if MMU_MODEL >= SMUFF_EMU_MMU2 - #define HAS_SMUFF 1 + #if MMU_MODEL >= EXTENDABLE_EMU_MMU2 + #define HAS_EXTENDABLE_MMU 1 #endif #endif #undef PRUSA_MMU1 #undef PRUSA_MMU2 #undef PRUSA_MMU2S -#undef SMUFF_EMU_MMU2 -#undef SMUFF_EMU_MMU2S +#undef EXTENDABLE_EMU_MMU2 +#undef EXTENDABLE_EMU_MMU2S /** * Extruders have some combination of stepper motors and hotends @@ -528,9 +587,16 @@ * HOTENDS - Number of hotends, whether connected or separate * E_STEPPERS - Number of actual E stepper motors * E_MANUAL - Number of E steppers for LCD move options + * + * These defines must be simple constants for use in REPEAT, etc. */ - -#if EXTRUDERS == 0 +#if EXTRUDERS + #define HAS_EXTRUDERS 1 + #if EXTRUDERS > 1 + #define HAS_MULTI_EXTRUDER 1 + #endif + #define E_AXIS_N(E) AxisEnum(E_AXIS + E_INDEX_N(E)) +#else #undef EXTRUDERS #define EXTRUDERS 0 #undef SINGLENOZZLE @@ -538,11 +604,20 @@ #undef SWITCHING_NOZZLE #undef MIXING_EXTRUDER #undef HOTEND_IDLE_TIMEOUT -#elif EXTRUDERS > 1 - #define HAS_MULTI_EXTRUDER 1 + #undef DISABLE_E #endif -#if ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS +#define E_OPTARG(N) OPTARG(HAS_MULTI_EXTRUDER, N) +#define E_TERN_(N) TERN_(HAS_MULTI_EXTRUDER, N) +#define E_TERN0(N) TERN0(HAS_MULTI_EXTRUDER, N) + +#if ENABLED(E_DUAL_STEPPER_DRIVERS) // E0/E1 steppers act in tandem as E0 + + #define E_STEPPERS 2 + #define E_MANUAL 1 + +#elif ENABLED(SWITCHING_EXTRUDER) // One stepper for every two EXTRUDERS + #if EXTRUDERS > 4 #define E_STEPPERS 3 #elif EXTRUDERS > 2 @@ -553,17 +628,25 @@ #if DISABLED(SWITCHING_NOZZLE) #define HOTENDS E_STEPPERS #endif -#elif ENABLED(MIXING_EXTRUDER) + +#elif ENABLED(MIXING_EXTRUDER) // Multiple feeds are mixed proportionally + #define E_STEPPERS MIXING_STEPPERS #define E_MANUAL 1 #if MIXING_STEPPERS == 2 #define HAS_DUAL_MIXING 1 #endif -#elif ENABLED(SWITCHING_TOOLHEAD) + +#elif ENABLED(SWITCHING_TOOLHEAD) // Toolchanger + #define E_STEPPERS EXTRUDERS #define E_MANUAL EXTRUDERS -#elif HAS_PRUSA_MMU2 - #define E_STEPPERS 1 + +#elif HAS_PRUSA_MMU2 // Průša Multi-Material Unit v2 + + #define E_STEPPERS 1 + #define E_MANUAL 1 + #endif // No inactive extruders with SWITCHING_NOZZLE or Průša MMU1 @@ -571,7 +654,7 @@ #undef DISABLE_INACTIVE_EXTRUDER #endif -// Průša MMU1, MMU 2.0, MMUS 2.0 and SMUFF force SINGLENOZZLE +// Průša MMU1, MMU(S) 2.0 and EXTENDABLE_EMU_MMU2(S) force SINGLENOZZLE #if HAS_MMU #define SINGLENOZZLE #endif @@ -593,6 +676,56 @@ #define E_MANUAL EXTRUDERS #endif +/** + * Number of Linear Axes (e.g., XYZ) + * All the logical axes except for the tool (E) axis + */ +#ifndef LINEAR_AXES + #define LINEAR_AXES XYZ +#endif +#if LINEAR_AXES >= XY + #define HAS_Y_AXIS 1 + #if LINEAR_AXES >= XYZ + #define HAS_Z_AXIS 1 + #endif +#endif + +/** + * Number of Logical Axes (e.g., XYZE) + * All the logical axes that can be commanded directly by G-code. + * Delta maps stepper-specific values to ABC steppers. + */ +#if HAS_EXTRUDERS + #define LOGICAL_AXES INCREMENT(LINEAR_AXES) +#else + #define LOGICAL_AXES LINEAR_AXES +#endif + +/** + * DISTINCT_E_FACTORS is set to give extruders (some) individual settings. + * + * DISTINCT_AXES is the number of distinct addressable axes (not steppers). + * Includes all linear axes plus all distinguished extruders. + * The default behavior is to treat all extruders as a single E axis + * with shared motion and temperature settings. + * + * DISTINCT_E is the number of distinguished extruders. By default this + * well be 1 which indicates all extruders share the same settings. + * + * E_INDEX_N(E) should be used to get the E index of any item that might be + * distinguished. + */ +#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1 + #define DISTINCT_AXES (LINEAR_AXES + E_STEPPERS) + #define DISTINCT_E E_STEPPERS + #define E_INDEX_N(E) (E) +#else + #undef DISTINCT_E_FACTORS + #define DISTINCT_AXES LOGICAL_AXES + #define DISTINCT_E 1 + #define E_INDEX_N(E) 0 +#endif + #if HOTENDS #define HAS_HOTEND 1 #ifndef HOTEND_OVERSHOOT @@ -609,13 +742,9 @@ // Helper macros for extruder and hotend arrays #define HOTEND_LOOP() for (int8_t e = 0; e < HOTENDS; e++) #define ARRAY_BY_EXTRUDERS(V...) ARRAY_N(EXTRUDERS, V) -#define ARRAY_BY_EXTRUDERS1(v1) ARRAY_BY_EXTRUDERS(v1, v1, v1, v1, v1, v1, v1, v1) +#define ARRAY_BY_EXTRUDERS1(v1) ARRAY_N_1(EXTRUDERS, v1) #define ARRAY_BY_HOTENDS(V...) ARRAY_N(HOTENDS, V) -#define ARRAY_BY_HOTENDS1(v1) ARRAY_BY_HOTENDS(v1, v1, v1, v1, v1, v1, v1, v1) - -#if ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR) - #define DO_SWITCH_EXTRUDER 1 -#endif +#define ARRAY_BY_HOTENDS1(v1) ARRAY_N_1(HOTENDS, v1) /** * Default hotend offsets, if not defined @@ -633,28 +762,18 @@ #endif /** - * DISTINCT_E_FACTORS affects how some E factors are accessed + * Disable unused SINGLENOZZLE sub-options */ -#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1 - #define DISTINCT_E E_STEPPERS - #define XYZE_N (XYZ + E_STEPPERS) - #define E_INDEX_N(E) (E) - #define E_AXIS_N(E) AxisEnum(E_AXIS + E) - #define UNUSED_E(E) NOOP -#else - #undef DISTINCT_E_FACTORS - #define DISTINCT_E 1 - #define XYZE_N XYZE - #define E_INDEX_N(E) 0 - #define E_AXIS_N(E) E_AXIS - #define UNUSED_E(E) UNUSED(E) +#if DISABLED(SINGLENOZZLE) + #undef SINGLENOZZLE_STANDBY_TEMP +#endif +#if !BOTH(HAS_FAN, SINGLENOZZLE) + #undef SINGLENOZZLE_STANDBY_FAN #endif -#if ENABLED(DWIN_CREALITY_LCD) - #define SERIAL_CATCHALL 0 - #ifndef LCD_SERIAL_PORT - #define LCD_SERIAL_PORT 3 // Creality 4.x board - #endif +// Switching extruder has its own servo? +#if ENABLED(SWITCHING_EXTRUDER) && (DISABLED(SWITCHING_NOZZLE) || SWITCHING_EXTRUDER_SERVO_NR != SWITCHING_NOZZLE_SERVO_NR) + #define DO_SWITCH_EXTRUDER 1 #endif /** @@ -665,14 +784,19 @@ #ifndef Z_PROBE_SERVO_NR #define Z_PROBE_SERVO_NR 0 #endif - #undef DEACTIVATE_SERVOS_AFTER_MOVE + #ifdef DEACTIVATE_SERVOS_AFTER_MOVE + #error "BLTOUCH requires DEACTIVATE_SERVOS_AFTER_MOVE to be to disabled. Please update your Configuration.h file." + #endif // Always disable probe pin inverting for BLTouch - #undef Z_MIN_PROBE_ENDSTOP_INVERTING - #define Z_MIN_PROBE_ENDSTOP_INVERTING false + #if Z_MIN_PROBE_ENDSTOP_INVERTING + #error "BLTOUCH requires Z_MIN_PROBE_ENDSTOP_INVERTING set to false. Please update your Configuration.h file." + #endif + #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - #undef Z_MIN_ENDSTOP_INVERTING - #define Z_MIN_ENDSTOP_INVERTING false + #if Z_MIN_ENDSTOP_INVERTING + #error "BLTOUCH requires Z_MIN_ENDSTOP_INVERTING set to false. Please update your Configuration.h file." + #endif #endif #endif @@ -690,12 +814,15 @@ #endif /** - * Set flags for enabled probes + * Set a flag for any type of bed probe, including the paper-test */ #if ANY(HAS_Z_SERVO_PROBE, FIX_MOUNTED_PROBE, NOZZLE_AS_PROBE, TOUCH_MI_PROBE, Z_PROBE_ALLEN_KEY, Z_PROBE_SLED, SOLENOID_PROBE, SENSORLESS_PROBING, RACK_AND_PINION_PROBE) #define HAS_BED_PROBE 1 #endif +/** + * Fill in undefined Filament Sensor options + */ #if ENABLED(FILAMENT_RUNOUT_SENSOR) #if NUM_RUNOUT_SENSORS >= 1 #ifndef FIL_RUNOUT1_STATE @@ -787,22 +914,52 @@ #endif #endif // FILAMENT_RUNOUT_SENSOR -#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) - #undef PROBE_MANUALLY +// Homing to Min or Max +#if X_HOME_DIR > 0 + #define X_HOME_TO_MAX 1 +#elif X_HOME_DIR < 0 + #define X_HOME_TO_MIN 1 #endif - -#if ANY(HAS_BED_PROBE, PROBE_MANUALLY, MESH_BED_LEVELING) - #define PROBE_SELECTED 1 +#if Y_HOME_DIR > 0 + #define Y_HOME_TO_MAX 1 +#elif Y_HOME_DIR < 0 + #define Y_HOME_TO_MIN 1 +#endif +#if Z_HOME_DIR > 0 + #define Z_HOME_TO_MAX 1 +#elif Z_HOME_DIR < 0 + #define Z_HOME_TO_MIN 1 +#endif +#if I_HOME_DIR > 0 + #define I_HOME_TO_MAX 1 +#elif I_HOME_DIR < 0 + #define I_HOME_TO_MIN 1 +#endif +#if J_HOME_DIR > 0 + #define J_HOME_TO_MAX 1 +#elif J_HOME_DIR < 0 + #define J_HOME_TO_MIN 1 +#endif +#if K_HOME_DIR > 0 + #define K_HOME_TO_MAX 1 +#elif K_HOME_DIR < 0 + #define K_HOME_TO_MIN 1 #endif +/** + * Conditionals based on the type of Bed Probe + */ #if HAS_BED_PROBE #if DISABLED(NOZZLE_AS_PROBE) #define HAS_PROBE_XY_OFFSET 1 #endif - #if DISABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) - #define HAS_CUSTOM_PROBE_PIN 1 + #if BOTH(DELTA, SENSORLESS_PROBING) + #define HAS_DELTA_SENSORLESS_PROBING 1 #endif - #if Z_HOME_DIR < 0 && (!HAS_CUSTOM_PROBE_PIN || ENABLED(USE_PROBE_FOR_Z_HOMING)) + #if NONE(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, HAS_DELTA_SENSORLESS_PROBING) + #define USES_Z_MIN_PROBE_PIN 1 + #endif + #if Z_HOME_TO_MIN && TERN1(USES_Z_MIN_PROBE_PIN, ENABLED(USE_PROBE_FOR_Z_HOMING)) #define HOMING_Z_WITH_PROBE 1 #endif #ifndef Z_PROBE_LOW_POINT @@ -818,29 +975,13 @@ #define TOTAL_PROBING MULTIPLE_PROBING #endif #endif - #if ENABLED(PREHEAT_BEFORE_PROBING) - #ifndef PROBING_NOZZLE_TEMP - #define PROBING_NOZZLE_TEMP 0 - #endif - #ifndef PROBING_BED_TEMP - #define PROBING_BED_TEMP 0 - #endif - #endif - #if ENABLED(PREHEAT_BEFORE_LEVELING) - #ifndef LEVELING_NOZZLE_TEMP - #define LEVELING_NOZZLE_TEMP 0 - #endif - #ifndef LEVELING_BED_TEMP - #define LEVELING_BED_TEMP 0 - #endif - #endif #else // Clear probe pin settings when no probe is selected #undef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN #undef USE_PROBE_FOR_Z_HOMING #endif -#if Z_HOME_DIR > 0 +#if Z_HOME_TO_MAX #define HOME_Z_FIRST // If homing away from BED do Z first #endif @@ -849,7 +990,7 @@ #endif /** - * Set granular options based on the specific type of leveling + * Conditionals based on the type of Bed Leveling */ #if ENABLED(AUTO_BED_LEVELING_UBL) #undef LCD_BED_LEVELING @@ -861,7 +1002,7 @@ #define ABL_PLANAR 1 #endif #if EITHER(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) - #define ABL_GRID 1 + #define ABL_USES_GRID 1 #endif #if ANY(AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_3POINT) #define HAS_ABL_NOT_UBL 1 @@ -884,13 +1025,16 @@ #define PLANNER_LEVELING 1 #endif #endif -#if EITHER(HAS_ABL_OR_UBL, Z_MIN_PROBE_REPEATABILITY_TEST) - #define HAS_PROBING_PROCEDURE 1 -#endif #if !HAS_LEVELING - #undef PROBE_MANUALLY #undef RESTORE_LEVELING_AFTER_G28 #undef ENABLE_LEVELING_AFTER_G28 + #undef G29_RETRY_AND_RECOVER +#endif +#if !HAS_LEVELING || EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + #undef PROBE_MANUALLY +#endif +#if ANY(HAS_BED_PROBE, PROBE_MANUALLY, MESH_BED_LEVELING) + #define PROBE_SELECTED 1 #endif #ifdef GRID_MAX_POINTS_X @@ -940,10 +1084,10 @@ #define NORMAL_AXIS Z_AXIS #endif -#if ENABLED(MORGAN_SCARA) +#if ANY(MORGAN_SCARA, MP_SCARA, AXEL_TPARA) #define IS_SCARA 1 #define IS_KINEMATIC 1 -#elif ENABLED(DELTA) +#elif EITHER(DELTA, POLARGRAPH) #define IS_KINEMATIC 1 #else #define IS_CARTESIAN 1 @@ -952,6 +1096,10 @@ #endif #endif +#if DISABLED(DELTA) + #undef DELTA_HOME_TO_SAFE_ZONE +#endif + // This flag indicates some kind of jerk storage is needed #if EITHER(CLASSIC_JERK, IS_KINEMATIC) #define HAS_CLASSIC_JERK 1 @@ -962,11 +1110,27 @@ #endif // E jerk exists with JD disabled (of course) but also when Linear Advance is disabled on Delta/SCARA -#if ENABLED(CLASSIC_JERK) || (IS_KINEMATIC && DISABLED(LIN_ADVANCE)) +#if HAS_EXTRUDERS && (ENABLED(CLASSIC_JERK) || (IS_KINEMATIC && DISABLED(LIN_ADVANCE))) #define HAS_CLASSIC_E_JERK 1 #endif -#if SERIAL_PORT == -1 || SERIAL_PORT_2 == -1 +// +// Serial Port Info +// +#ifdef SERIAL_PORT_2 + #define HAS_MULTI_SERIAL 1 + #ifdef SERIAL_PORT_3 + #define NUM_SERIAL 3 + #else + #define NUM_SERIAL 2 + #endif +#elif defined(SERIAL_PORT) + #define NUM_SERIAL 1 +#else + #define NUM_SERIAL 0 + #undef BAUD_RATE_GCODE +#endif +#if SERIAL_PORT == -1 || SERIAL_PORT_2 == -1 || SERIAL_PORT_3 == -1 #define HAS_USB_SERIAL 1 #endif #if SERIAL_PORT_2 == -2 @@ -1043,13 +1207,22 @@ #ifndef INVERT_X_DIR #define INVERT_X_DIR false #endif -#ifndef INVERT_Y_DIR +#if HAS_Y_AXIS && !defined(INVERT_Y_DIR) #define INVERT_Y_DIR false #endif -#ifndef INVERT_Z_DIR +#if HAS_Z_AXIS && !defined(INVERT_Z_DIR) #define INVERT_Z_DIR false #endif -#ifndef INVERT_E_DIR +#if LINEAR_AXES >= 4 && !defined(INVERT_I_DIR) + #define INVERT_I_DIR false +#endif +#if LINEAR_AXES >= 5 && !defined(INVERT_J_DIR) + #define INVERT_J_DIR false +#endif +#if LINEAR_AXES >= 6 && !defined(INVERT_K_DIR) + #define INVERT_K_DIR false +#endif +#if HAS_EXTRUDERS && !defined(INVERT_E_DIR) #define INVERT_E_DIR false #endif @@ -1073,52 +1246,40 @@ * - TFT_COLOR * - GRAPHICAL_TFT_UPSCALE */ -#if ENABLED(MKS_TS35_V2_0) // Most common: ST7796 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY) +#if ENABLED(MKS_TS35_V2_0) // ST7796 + #define TFT_DEFAULT_DRIVER ST7796 + #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY #define TFT_RES_480x320 #define TFT_INTERFACE_SPI -#elif ENABLED(MKS_ROBIN_TFT24) // Most common: ST7789 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y) - #define TFT_RES_320x240 - #define TFT_INTERFACE_FSMC -#elif ENABLED(MKS_ROBIN_TFT28) // Most common: ST7789 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y) - #define TFT_RES_320x240 +#elif EITHER(LERDGE_TFT35, ANET_ET5_TFT35) // ST7796 + #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY + #define TFT_RES_480x320 #define TFT_INTERFACE_FSMC -#elif ENABLED(MKS_ROBIN_TFT32) // Most common: ST7789 +#elif ANY(ANET_ET4_TFT28, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32) // ST7789 #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y) #define TFT_RES_320x240 #define TFT_INTERFACE_FSMC -#elif ENABLED(MKS_ROBIN_TFT35) // Most common: ILI9488 +#elif ANY(MKS_ROBIN_TFT35, TFT_TRONXY_X5SA, ANYCUBIC_TFT35) // ILI9488 + #define TFT_DRIVER ILI9488 #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) #define TFT_RES_480x320 #define TFT_INTERFACE_FSMC #elif ENABLED(MKS_ROBIN_TFT43) - #define TFT_DEFAULT_ORIENTATION 0 #define TFT_DRIVER SSD1963 + #define TFT_DEFAULT_ORIENTATION 0 #define TFT_RES_480x272 #define TFT_INTERFACE_FSMC -#elif ENABLED(MKS_ROBIN_TFT_V1_1R) // ILI9328 or R61505 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) - #define TFT_RES_320x240 - #define TFT_INTERFACE_FSMC -#elif EITHER(TFT_TRONXY_X5SA, ANYCUBIC_TFT35) // ILI9488 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) - #define TFT_DRIVER ILI9488 - #define TFT_RES_480x320 - #define TFT_INTERFACE_FSMC -#elif ENABLED(LONGER_LK_TFT28) +#elif ANY(MKS_ROBIN_TFT_V1_1R, LONGER_LK_TFT28) // ILI9328 or R61505 #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) #define TFT_RES_320x240 #define TFT_INTERFACE_FSMC -#elif ENABLED(ANET_ET4_TFT28) // ST7789 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_Y) - #define TFT_RES_320x240 - #define TFT_INTERFACE_FSMC -#elif ENABLED(ANET_ET5_TFT35) // ST7796 - #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY) - #define TFT_RES_480x320 - #define TFT_INTERFACE_FSMC +#elif ENABLED(BIQU_BX_TFT70) // RGB + #define TFT_DEFAULT_ORIENTATION TFT_EXCHANGE_XY + #define TFT_RES_1024x600 + #define TFT_INTERFACE_LTDC + #if ENABLED(TOUCH_SCREEN) + #define TFT_TOUCH_DEVICE_GT911 + #endif #elif ENABLED(TFT_GENERIC) #define TFT_DEFAULT_ORIENTATION (TFT_EXCHANGE_XY | TFT_INVERT_X | TFT_INVERT_Y) #if NONE(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320) @@ -1141,9 +1302,13 @@ #define TFT_WIDTH 480 #define TFT_HEIGHT 320 #define GRAPHICAL_TFT_UPSCALE 3 +#elif ENABLED(TFT_RES_1024x600) + #define TFT_WIDTH 1024 + #define TFT_HEIGHT 600 + #define GRAPHICAL_TFT_UPSCALE 4 #endif -// FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi).h +// FSMC/SPI TFT Panels using standard HAL/tft/tft_(fsmc|spi|ltdc).h #if ENABLED(TFT_INTERFACE_FSMC) #define HAS_FSMC_TFT 1 #if TFT_SCALED_DOGLCD @@ -1158,6 +1323,13 @@ #elif HAS_TFT_LVGL_UI #define HAS_TFT_LVGL_UI_SPI 1 #endif +#elif ENABLED(TFT_INTERFACE_LTDC) + #define HAS_LTDC_TFT 1 + #if TFT_SCALED_DOGLCD + #define HAS_LTDC_GRAPHICAL_TFT 1 + #elif HAS_TFT_LVGL_UI + #define HAS_TFT_LVGL_UI_LTDC 1 + #endif #endif #if ENABLED(TFT_COLOR_UI) @@ -1179,6 +1351,10 @@ #elif ENABLED(TFT_INTERFACE_FSMC) #define TFT_480x272 #endif + #elif TFT_HEIGHT == 600 + #if ENABLED(TFT_INTERFACE_LTDC) + #define TFT_1024x600_LTDC + #endif #endif #endif @@ -1188,16 +1364,37 @@ #define HAS_UI_480x320 1 #elif EITHER(TFT_480x272, TFT_480x272_SPI) #define HAS_UI_480x272 1 +#elif defined(TFT_1024x600_LTDC) + #define HAS_UI_1024x600 1 #endif #if ANY(HAS_UI_320x240, HAS_UI_480x320, HAS_UI_480x272) - #define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7) // Fewer lines with touch buttons onscreen + #define LCD_HEIGHT TERN(TOUCH_SCREEN, 6, 7) // Fewer lines with touch buttons onscreen +#elif HAS_UI_1024x600 + #define LCD_HEIGHT TERN(TOUCH_SCREEN, 12, 13) // Fewer lines with touch buttons onscreen #endif // This emulated DOGM has 'touch/xpt2046', not 'tft/xpt2046' -#if ENABLED(TOUCH_SCREEN) && !HAS_GRAPHICAL_TFT - #undef TOUCH_SCREEN - #if ENABLED(TFT_CLASSIC_UI) - #define HAS_TOUCH_BUTTONS 1 +#if ENABLED(TOUCH_SCREEN) + #if TOUCH_IDLE_SLEEP + #define HAS_TOUCH_SLEEP 1 + #endif + #if NONE(TFT_TOUCH_DEVICE_GT911, TFT_TOUCH_DEVICE_XPT2046) + #define TFT_TOUCH_DEVICE_XPT2046 // ADS7843/XPT2046 ADC Touchscreen such as ILI9341 2.8 + #endif + #if ENABLED(TFT_TOUCH_DEVICE_GT911) // GT911 Capacitive touch screen such as BIQU_BX_TFT70 + #undef TOUCH_SCREEN_CALIBRATION + #undef TOUCH_CALIBRATION_AUTO_SAVE + #endif + #if !HAS_GRAPHICAL_TFT + #undef TOUCH_SCREEN + #if ENABLED(TFT_CLASSIC_UI) + #define HAS_TOUCH_BUTTONS 1 + #if ENABLED(TFT_TOUCH_DEVICE_GT911) + #define HAS_CAP_TOUCH_BUTTONS 1 + #else + #define HAS_RES_TOUCH_BUTTONS 1 + #endif + #endif #endif #endif @@ -1212,17 +1409,16 @@ #endif #endif -// XPT2046_** Compatibility -#if !(defined(TOUCH_CALIBRATION_X) || defined(TOUCH_CALIBRATION_Y) || defined(TOUCH_OFFSET_X) || defined(TOUCH_OFFSET_Y) || defined(TOUCH_ORIENTATION)) - #if defined(XPT2046_X_CALIBRATION) && defined(XPT2046_Y_CALIBRATION) && defined(XPT2046_X_OFFSET) && defined(XPT2046_Y_OFFSET) - #define TOUCH_CALIBRATION_X XPT2046_X_CALIBRATION - #define TOUCH_CALIBRATION_Y XPT2046_Y_CALIBRATION - #define TOUCH_OFFSET_X XPT2046_X_OFFSET - #define TOUCH_OFFSET_Y XPT2046_Y_OFFSET - #define TOUCH_ORIENTATION TOUCH_LANDSCAPE - #endif +#if ANY(USE_XMIN_PLUG, USE_YMIN_PLUG, USE_ZMIN_PLUG, USE_XMAX_PLUG, USE_YMAX_PLUG, USE_ZMAX_PLUG) + #define HAS_ENDSTOPS 1 + #define COORDINATE_OKAY(N,L,H) WITHIN(N,L,H) +#else + #define COORDINATE_OKAY(N,L,H) true #endif -#if MB(ANET_ET4, ANET_ET4P) - #define IS_ANET_ET 1 +/** + * LED Backlight INDEX END + */ +#if defined(NEOPIXEL_BKGD_INDEX_FIRST) && !defined(NEOPIXEL_BKGD_INDEX_LAST) + #define NEOPIXEL_BKGD_INDEX_LAST NEOPIXEL_BKGD_INDEX_FIRST #endif diff --git a/Marlin/src/inc/Conditionals_adv.h b/Marlin/src/inc/Conditionals_adv.h index d6245718f4ac..775f6a04f0be 100644 --- a/Marlin/src/inc/Conditionals_adv.h +++ b/Marlin/src/inc/Conditionals_adv.h @@ -26,6 +26,10 @@ * Defines that depend on advanced configuration. */ +#ifndef AXIS_RELATIVE_MODES + #define AXIS_RELATIVE_MODES {} +#endif + #ifdef SWITCHING_NOZZLE_E1_SERVO_NR #define SWITCHING_NOZZLE_TWO_SERVOS 1 #endif @@ -75,7 +79,7 @@ #define SERVO_DELAY { 50 } #endif -#if EXTRUDERS == 0 +#if !HAS_EXTRUDERS #define NO_VOLUMETRICS #undef TEMP_SENSOR_0 #undef TEMP_SENSOR_1 @@ -103,15 +107,422 @@ #undef THERMAL_PROTECTION_PERIOD #undef WATCH_TEMP_PERIOD #undef SHOW_TEMP_ADC_VALUES + #undef LCD_SHOW_E_TOTAL + #undef MANUAL_E_MOVES_RELATIVE + #undef STEALTHCHOP_E #endif -#if TEMP_SENSOR_BED == 0 - #undef THERMAL_PROTECTION_BED - #undef THERMAL_PROTECTION_BED_PERIOD +/** + * Temperature Sensors; define what sensor(s) we have. + */ + +// Temperature sensor IDs +#define HID_REDUNDANT -6 +#define HID_COOLER -5 +#define HID_PROBE -4 +#define HID_BOARD -3 +#define HID_CHAMBER -2 +#define HID_BED -1 +#define HID_E0 0 +#define HID_E1 1 +#define HID_E2 2 +#define HID_E3 3 +#define HID_E4 4 +#define HID_E5 5 +#define HID_E6 6 +#define HID_E7 7 + +#define _SENSOR_IS(I,N) || (TEMP_SENSOR_##N == I) +#define _E_SENSOR_IS(I,N) _SENSOR_IS(N,I) +#define ANY_THERMISTOR_IS(N) (0 REPEAT2(HOTENDS, _E_SENSOR_IS, N) \ + _SENSOR_IS(N,BED) _SENSOR_IS(N,PROBE) _SENSOR_IS(N,CHAMBER) \ + _SENSOR_IS(N,COOLER) _SENSOR_IS(N,BOARD) _SENSOR_IS(N,REDUNDANT) ) + +#if ANY_THERMISTOR_IS(1000) + #define HAS_USER_THERMISTORS 1 +#endif + +#if TEMP_SENSOR_REDUNDANT + #define _HEATER_ID(M) HID_##M + #define HEATER_ID(M) _HEATER_ID(M) + #define REDUNDANT_TEMP_MATCH(M,N) (HEATER_ID(TEMP_SENSOR_REDUNDANT_##M) == _HEATER_ID(N)) +#else + #define REDUNDANT_TEMP_MATCH(...) 0 +#endif + +#if TEMP_SENSOR_0 == -5 || TEMP_SENSOR_0 == -3 || TEMP_SENSOR_0 == -2 + #define TEMP_SENSOR_0_IS_MAX_TC 1 + #if TEMP_SENSOR_0 == -5 + #define TEMP_SENSOR_0_IS_MAX31865 1 + #define TEMP_SENSOR_0_MAX_TC_TMIN 0 + #define TEMP_SENSOR_0_MAX_TC_TMAX 1024 + #ifndef MAX31865_SENSOR_WIRES_0 + #define MAX31865_SENSOR_WIRES_0 2 + #endif + #elif TEMP_SENSOR_0 == -3 + #define TEMP_SENSOR_0_IS_MAX31855 1 + #define TEMP_SENSOR_0_MAX_TC_TMIN -270 + #define TEMP_SENSOR_0_MAX_TC_TMAX 1800 + #elif TEMP_SENSOR_0 == -2 + #define TEMP_SENSOR_0_IS_MAX6675 1 + #define TEMP_SENSOR_0_MAX_TC_TMIN 0 + #define TEMP_SENSOR_0_MAX_TC_TMAX 1024 + #endif +#elif TEMP_SENSOR_0 == -4 + #define TEMP_SENSOR_0_IS_AD8495 1 +#elif TEMP_SENSOR_0 == -1 + #define TEMP_SENSOR_0_IS_AD595 1 +#elif TEMP_SENSOR_0 > 0 + #define TEMP_SENSOR_0_IS_THERMISTOR 1 + #if TEMP_SENSOR_0 == 1000 + #define TEMP_SENSOR_0_IS_CUSTOM 1 + #elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999 + #define TEMP_SENSOR_0_IS_DUMMY 1 + #endif +#else + #undef HEATER_0_MINTEMP + #undef HEATER_0_MAXTEMP +#endif + +#if TEMP_SENSOR_1 == -5 || TEMP_SENSOR_1 == -3 || TEMP_SENSOR_1 == -2 + #define TEMP_SENSOR_1_IS_MAX_TC 1 + #if TEMP_SENSOR_1 == -5 + #define TEMP_SENSOR_1_IS_MAX31865 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN 0 + #define TEMP_SENSOR_1_MAX_TC_TMAX 1024 + #ifndef MAX31865_SENSOR_WIRES_1 + #define MAX31865_SENSOR_WIRES_1 2 + #endif + #elif TEMP_SENSOR_1 == -3 + #define TEMP_SENSOR_1_IS_MAX31855 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN -270 + #define TEMP_SENSOR_1_MAX_TC_TMAX 1800 + #elif TEMP_SENSOR_1 == -2 + #define TEMP_SENSOR_1_IS_MAX6675 1 + #define TEMP_SENSOR_1_MAX_TC_TMIN 0 + #define TEMP_SENSOR_1_MAX_TC_TMAX 1024 + #endif + + #if TEMP_SENSOR_1 != TEMP_SENSOR_0 + #if TEMP_SENSOR_1 == -5 + #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." + #elif TEMP_SENSOR_1 == -3 + #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." + #elif TEMP_SENSOR_1 == -2 + #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." + #endif + #endif +#elif TEMP_SENSOR_1 == -4 + #define TEMP_SENSOR_1_IS_AD8495 1 +#elif TEMP_SENSOR_1 == -1 + #define TEMP_SENSOR_1_IS_AD595 1 +#elif TEMP_SENSOR_1 > 0 + #define TEMP_SENSOR_1_IS_THERMISTOR 1 + #if TEMP_SENSOR_1 == 1000 + #define TEMP_SENSOR_1_IS_CUSTOM 1 + #elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999 + #define TEMP_SENSOR_1_IS_DUMMY 1 + #endif +#else + #undef HEATER_1_MINTEMP + #undef HEATER_1_MAXTEMP +#endif + +#if TEMP_SENSOR_REDUNDANT == -5 || TEMP_SENSOR_REDUNDANT == -3 || TEMP_SENSOR_REDUNDANT == -2 + #define TEMP_SENSOR_REDUNDANT_IS_MAX_TC 1 + + #if TEMP_SENSOR_REDUNDANT == -5 + #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) + #error "MAX31865 Thermocouples (-5) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." + #endif + + #define TEMP_SENSOR_REDUNDANT_IS_MAX31865 1 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 + #elif TEMP_SENSOR_REDUNDANT == -3 + #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." + #endif + + #define TEMP_SENSOR_REDUNDANT_IS_MAX31855 1 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN -270 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1800 + #elif TEMP_SENSOR_REDUNDANT == -2 + #if !REDUNDANT_TEMP_MATCH(SOURCE, E0) && !REDUNDANT_TEMP_MATCH(SOURCE, E1) + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_REDUNDANT_SOURCE other than TEMP_SENSOR_0/TEMP_SENSOR_1 (0/1)." + #endif + + #define TEMP_SENSOR_REDUNDANT_IS_MAX6675 1 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN 0 + #define TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX 1024 + #endif + + // mimic setting up the source TEMP_SENSOR + #if REDUNDANT_TEMP_MATCH(SOURCE, E0) + #define TEMP_SENSOR_0_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN + #define TEMP_SENSOR_0_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX + #ifndef MAX31865_SENSOR_WIRES_0 + #define MAX31865_SENSOR_WIRES_0 2 + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E1) + #define TEMP_SENSOR_1_MAX_TC_TMIN TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN + #define TEMP_SENSOR_1_MAX_TC_TMAX TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX + #ifndef MAX31865_SENSOR_WIRES_1 + #define MAX31865_SENSOR_WIRES_1 2 + #endif + #endif + + #if (TEMP_SENSOR_0_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_0) || (TEMP_SENSOR_1_IS_MAX_TC && TEMP_SENSOR_REDUNDANT != TEMP_SENSOR_1) + #if TEMP_SENSOR_REDUNDANT == -5 + #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." + #elif TEMP_SENSOR_REDUNDANT == -3 + #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." + #elif TEMP_SENSOR_REDUNDANT == -2 + #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_0/TEMP_SENSOR_1 then TEMP_SENSOR_REDUNDANT must match." + #endif + #endif +#elif TEMP_SENSOR_REDUNDANT == -4 + #define TEMP_SENSOR_REDUNDANT_IS_AD8495 1 +#elif TEMP_SENSOR_REDUNDANT == -1 + #define TEMP_SENSOR_REDUNDANT_IS_AD595 1 +#elif TEMP_SENSOR_REDUNDANT > 0 + #define TEMP_SENSOR_REDUNDANT_IS_THERMISTOR 1 + #if TEMP_SENSOR_REDUNDANT == 1000 + #define TEMP_SENSOR_REDUNDANT_IS_CUSTOM 1 + #elif TEMP_SENSOR_REDUNDANT == 998 || TEMP_SENSOR_REDUNDANT == 999 + #error "Dummy sensors are not supported for TEMP_SENSOR_REDUNDANT." + #endif +#endif + +#if TEMP_SENSOR_0_IS_MAX_TC || TEMP_SENSOR_1_IS_MAX_TC || TEMP_SENSOR_REDUNDANT_IS_MAX_TC + #define HAS_MAX_TC 1 +#endif +#if TEMP_SENSOR_0_IS_MAX6675 || TEMP_SENSOR_1_IS_MAX6675 || TEMP_SENSOR_REDUNDANT_IS_MAX6675 + #define HAS_MAX6675 1 +#endif +#if TEMP_SENSOR_0_IS_MAX31855 || TEMP_SENSOR_1_IS_MAX31855 || TEMP_SENSOR_REDUNDANT_IS_MAX31855 + #define HAS_MAX31855 1 +#endif +#if TEMP_SENSOR_0_IS_MAX31865 || TEMP_SENSOR_1_IS_MAX31865 || TEMP_SENSOR_REDUNDANT_IS_MAX31865 + #define HAS_MAX31865 1 #endif -#if TEMP_SENSOR_CHAMBER == 0 +#if TEMP_SENSOR_2 == -4 + #define TEMP_SENSOR_2_IS_AD8495 1 +#elif TEMP_SENSOR_2 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_2." +#elif TEMP_SENSOR_2 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_2." +#elif TEMP_SENSOR_2 == -1 + #define TEMP_SENSOR_2_IS_AD595 1 +#elif TEMP_SENSOR_2 > 0 + #define TEMP_SENSOR_2_IS_THERMISTOR 1 + #if TEMP_SENSOR_2 == 1000 + #define TEMP_SENSOR_2_IS_CUSTOM 1 + #elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999 + #define TEMP_SENSOR_2_IS_DUMMY 1 + #endif +#else + #undef HEATER_2_MINTEMP + #undef HEATER_2_MAXTEMP +#endif + +#if TEMP_SENSOR_3 == -4 + #define TEMP_SENSOR_3_IS_AD8495 1 +#elif TEMP_SENSOR_3 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_3." +#elif TEMP_SENSOR_3 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_3." +#elif TEMP_SENSOR_3 == -1 + #define TEMP_SENSOR_3_IS_AD595 1 +#elif TEMP_SENSOR_3 > 0 + #define TEMP_SENSOR_3_IS_THERMISTOR 1 + #if TEMP_SENSOR_3 == 1000 + #define TEMP_SENSOR_3_IS_CUSTOM 1 + #elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999 + #define TEMP_SENSOR_3_IS_DUMMY 1 + #endif +#else + #undef HEATER_3_MINTEMP + #undef HEATER_3_MAXTEMP +#endif + +#if TEMP_SENSOR_4 == -4 + #define TEMP_SENSOR_4_IS_AD8495 1 +#elif TEMP_SENSOR_4 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_4." +#elif TEMP_SENSOR_4 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_4." +#elif TEMP_SENSOR_4 == -1 + #define TEMP_SENSOR_4_IS_AD595 1 +#elif TEMP_SENSOR_4 > 0 + #define TEMP_SENSOR_4_IS_THERMISTOR 1 + #if TEMP_SENSOR_4 == 1000 + #define TEMP_SENSOR_4_IS_CUSTOM 1 + #elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999 + #define TEMP_SENSOR_4_IS_DUMMY 1 + #endif +#else + #undef HEATER_4_MINTEMP + #undef HEATER_4_MAXTEMP +#endif + +#if TEMP_SENSOR_5 == -4 + #define TEMP_SENSOR_5_IS_AD8495 1 +#elif TEMP_SENSOR_5 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_5." +#elif TEMP_SENSOR_5 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_5." +#elif TEMP_SENSOR_5 == -1 + #define TEMP_SENSOR_5_IS_AD595 1 +#elif TEMP_SENSOR_5 > 0 + #define TEMP_SENSOR_5_IS_THERMISTOR 1 + #if TEMP_SENSOR_5 == 1000 + #define TEMP_SENSOR_5_IS_CUSTOM 1 + #elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999 + #define TEMP_SENSOR_5_IS_DUMMY 1 + #endif +#else + #undef HEATER_5_MINTEMP + #undef HEATER_5_MAXTEMP +#endif + +#if TEMP_SENSOR_6 == -4 + #define TEMP_SENSOR_6_IS_AD8495 1 +#elif TEMP_SENSOR_6 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_6." +#elif TEMP_SENSOR_6 == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_6." +#elif TEMP_SENSOR_6 == -1 + #define TEMP_SENSOR_6_IS_AD595 1 +#elif TEMP_SENSOR_6 > 0 + #define TEMP_SENSOR_6_IS_THERMISTOR 1 + #if TEMP_SENSOR_6 == 1000 + #define TEMP_SENSOR_6_IS_CUSTOM 1 + #elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999 + #define TEMP_SENSOR_6_IS_DUMMY 1 + #endif +#else + #undef HEATER_6_MINTEMP + #undef HEATER_6_MAXTEMP +#endif + +#if TEMP_SENSOR_7 == -4 + #define TEMP_SENSOR_7_IS_AD8495 1 +#elif TEMP_SENSOR_7 == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_7." +#elif TEMP_SENSOR_7 == -2 + #error "MAX7775 Thermocouples (-2) not supported for TEMP_SENSOR_7." +#elif TEMP_SENSOR_7 == -1 + #define TEMP_SENSOR_7_IS_AD595 1 +#elif TEMP_SENSOR_7 > 0 + #define TEMP_SENSOR_7_IS_THERMISTOR 1 + #if TEMP_SENSOR_7 == 1000 + #define TEMP_SENSOR_7_IS_CUSTOM 1 + #elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999 + #define TEMP_SENSOR_7_IS_DUMMY 1 + #endif +#else + #undef HEATER_7_MINTEMP + #undef HEATER_7_MAXTEMP +#endif + +#if TEMP_SENSOR_BED == -4 + #define TEMP_SENSOR_BED_IS_AD8495 1 +#elif TEMP_SENSOR_BED == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BED." +#elif TEMP_SENSOR_BED == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BED." +#elif TEMP_SENSOR_BED == -1 + #define TEMP_SENSOR_BED_IS_AD595 1 +#elif TEMP_SENSOR_BED > 0 + #define TEMP_SENSOR_BED_IS_THERMISTOR 1 + #if TEMP_SENSOR_BED == 1000 + #define TEMP_SENSOR_BED_IS_CUSTOM 1 + #elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999 + #define TEMP_SENSOR_BED_IS_DUMMY 1 + #endif +#else + #undef THERMAL_PROTECTION_BED + #undef THERMAL_PROTECTION_BED_PERIOD + #undef BED_MINTEMP + #undef BED_MAXTEMP +#endif + +#if TEMP_SENSOR_CHAMBER == -4 + #define TEMP_SENSOR_CHAMBER_IS_AD8495 1 +#elif TEMP_SENSOR_CHAMBER == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_CHAMBER." +#elif TEMP_SENSOR_CHAMBER == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_CHAMBER." +#elif TEMP_SENSOR_CHAMBER == -1 + #define TEMP_SENSOR_CHAMBER_IS_AD595 1 +#elif TEMP_SENSOR_CHAMBER > 0 + #define TEMP_SENSOR_CHAMBER_IS_THERMISTOR 1 + #if TEMP_SENSOR_CHAMBER == 1000 + #define TEMP_SENSOR_CHAMBER_IS_CUSTOM 1 + #elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999 + #define TEMP_SENSOR_CHAMBER_IS_DUMMY 1 + #endif +#else #undef THERMAL_PROTECTION_CHAMBER + #undef CHAMBER_MINTEMP + #undef CHAMBER_MAXTEMP +#endif + +#if TEMP_SENSOR_COOLER == -4 + #define TEMP_SENSOR_COOLER_IS_AD8495 1 +#elif TEMP_SENSOR_COOLER == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_COOLER." +#elif TEMP_SENSOR_COOLER == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_COOLER." +#elif TEMP_SENSOR_COOLER == -1 + #define TEMP_SENSOR_COOLER_IS_AD595 1 +#elif TEMP_SENSOR_COOLER > 0 + #define TEMP_SENSOR_COOLER_IS_THERMISTOR 1 + #if TEMP_SENSOR_COOLER == 1000 + #define TEMP_SENSOR_COOLER_IS_CUSTOM 1 + #elif TEMP_SENSOR_COOLER == 998 || TEMP_SENSOR_COOLER == 999 + #define TEMP_SENSOR_COOLER_IS_DUMMY 1 + #endif +#else + #undef THERMAL_PROTECTION_COOLER + #undef COOLER_MINTEMP + #undef COOLER_MAXTEMP +#endif + +#if TEMP_SENSOR_PROBE == -4 + #define TEMP_SENSOR_PROBE_IS_AD8495 1 +#elif TEMP_SENSOR_PROBE == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_PROBE." +#elif TEMP_SENSOR_PROBE == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_PROBE." +#elif TEMP_SENSOR_PROBE == -1 + #define TEMP_SENSOR_PROBE_IS_AD595 1 +#elif TEMP_SENSOR_PROBE > 0 + #define TEMP_SENSOR_PROBE_IS_THERMISTOR 1 + #if TEMP_SENSOR_PROBE == 1000 + #define TEMP_SENSOR_PROBE_IS_CUSTOM 1 + #elif TEMP_SENSOR_PROBE == 998 || TEMP_SENSOR_PROBE == 999 + #define TEMP_SENSOR_PROBE_IS_DUMMY 1 + #endif +#endif + +#if TEMP_SENSOR_BOARD == -4 + #define TEMP_SENSOR_BOARD_IS_AD8495 1 +#elif TEMP_SENSOR_BOARD == -3 + #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BOARD." +#elif TEMP_SENSOR_BOARD == -2 + #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BOARD." +#elif TEMP_SENSOR_BOARD == -1 + #define TEMP_SENSOR_BOARD_IS_AD595 1 +#elif TEMP_SENSOR_BOARD > 0 + #define TEMP_SENSOR_BOARD_IS_THERMISTOR 1 + #if TEMP_SENSOR_BOARD == 1000 + #define TEMP_SENSOR_BOARD_IS_CUSTOM 1 + #elif TEMP_SENSOR_BOARD == 998 || TEMP_SENSOR_BOARD == 999 + #define TEMP_SENSOR_BOARD_IS_DUMMY 1 + #endif #endif #if ENABLED(MIXING_EXTRUDER) && (ENABLED(RETRACT_SYNC_MIXING) || BOTH(FILAMENT_LOAD_UNLOAD_GCODES, FILAMENT_UNLOAD_ALL_EXTRUDERS)) @@ -128,9 +539,15 @@ #if ENABLED(FILAMENT_RUNOUT_SENSOR) #define HAS_FILAMENT_SENSOR 1 + #if NUM_RUNOUT_SENSORS > 1 + #define MULTI_FILAMENT_SENSOR 1 + #endif #ifdef FILAMENT_RUNOUT_DISTANCE_MM #define HAS_FILAMENT_RUNOUT_DISTANCE 1 #endif + #if ENABLED(MIXING_EXTRUDER) + #define WATCH_ALL_RUNOUT_SENSORS + #endif #endif // Let SD_FINISHED_RELEASECOMMAND stand in for SD_FINISHED_STEPPERRELEASE @@ -175,7 +592,7 @@ #if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS) #define HAS_SOFTWARE_ENDSTOPS 1 #endif -#if ANY(EXTENSIBLE_UI, IS_NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS, DWIN_CREALITY_LCD) +#if ANY(EXTENSIBLE_UI, IS_NEWPANEL, EMERGENCY_PARSER, HAS_ADC_BUTTONS, HAS_DWIN_E3V2) #define HAS_RESUME_CONTINUE 1 #endif @@ -235,11 +652,11 @@ #define _CUTTER_POWER_PERCENT 2 #define _CUTTER_POWER_RPM 3 #define _CUTTER_POWER(V) _CAT(_CUTTER_POWER_, V) - #define CUTTER_UNIT_IS(V) (_CUTTER_POWER(CUTTER_POWER_UNIT) == _CUTTER_POWER(V)) + #define CUTTER_UNIT_IS(V) (_CUTTER_POWER(CUTTER_POWER_UNIT) == _CUTTER_POWER(V)) #endif // Add features that need hardware PWM here -#if ANY(FAST_PWM_FAN, SPINDLE_LASER_PWM) +#if ANY(FAST_PWM_FAN, SPINDLE_LASER_USE_PWM) #define NEEDS_HARDWARE_PWM 1 #endif @@ -360,19 +777,14 @@ #endif #endif -// If platform requires early initialization of watchdog to properly boot -#if ENABLED(USE_WATCHDOG) && defined(ARDUINO_ARCH_SAM) - #define EARLY_WATCHDOG 1 -#endif - // Full Touch Screen needs 'tft/xpt2046' -#if EITHER(TOUCH_SCREEN, HAS_TFT_LVGL_UI) +#if EITHER(TFT_TOUCH_DEVICE_XPT2046, HAS_TFT_LVGL_UI) #define HAS_TFT_XPT2046 1 #endif // Touch Screen or "Touch Buttons" need XPT2046 pins // but they use different components -#if EITHER(HAS_TFT_XPT2046, HAS_TOUCH_BUTTONS) +#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS #define NEED_TOUCH_PINS 1 #endif @@ -386,6 +798,12 @@ #define POLL_JOG #endif +#if X2_HOME_DIR > 0 + #define X2_HOME_TO_MAX 1 +#elif X2_HOME_DIR < 0 + #define X2_HOME_TO_MIN 1 +#endif + #ifndef HOMING_BUMP_MM #define HOMING_BUMP_MM { 0, 0, 0 } #endif @@ -471,6 +889,37 @@ #endif #endif +// Remove unused STEALTHCHOP flags +#if LINEAR_AXES < 6 + #undef STEALTHCHOP_K + #undef CALIBRATION_MEASURE_KMIN + #undef CALIBRATION_MEASURE_KMAX + #if LINEAR_AXES < 5 + #undef STEALTHCHOP_J + #undef CALIBRATION_MEASURE_JMIN + #undef CALIBRATION_MEASURE_JMAX + #if LINEAR_AXES < 4 + #undef STEALTHCHOP_I + #undef CALIBRATION_MEASURE_IMIN + #undef CALIBRATION_MEASURE_IMAX + #if LINEAR_AXES < 3 + #undef Z_IDLE_HEIGHT + #undef STEALTHCHOP_Z + #undef Z_PROBE_SLED + #undef Z_SAFE_HOMING + #undef HOME_Z_FIRST + #undef HOMING_Z_WITH_PROBE + #undef ENABLE_LEVELING_FADE_HEIGHT + #undef NUM_Z_STEPPER_DRIVERS + #undef CNC_WORKSPACE_PLANES + #if LINEAR_AXES < 2 + #undef STEALTHCHOP_Y + #endif + #endif + #endif + #endif +#endif + // // SD Card connection methods // Defined here so pins and sanity checks can use them @@ -488,12 +937,9 @@ // Power Monitor sensors #if EITHER(POWER_MONITOR_CURRENT, POWER_MONITOR_VOLTAGE) #define HAS_POWER_MONITOR 1 -#endif -#if ENABLED(POWER_MONITOR_CURRENT) && defined(POWER_MONITOR_FIXED_VOLTAGE) - #define HAS_POWER_MONITOR_VREF 1 -#endif -#if BOTH(HAS_POWER_MONITOR_VREF, POWER_MONITOR_CURRENT) - #define HAS_POWER_MONITOR_WATTS 1 + #if ENABLED(POWER_MONITOR_CURRENT) && (ENABLED(POWER_MONITOR_VOLTAGE) || defined(POWER_MONITOR_FIXED_VOLTAGE)) + #define HAS_POWER_MONITOR_WATTS 1 + #endif #endif // Flag if an EEPROM type is pre-selected @@ -506,13 +952,30 @@ #define NEED_HEX_PRINT 1 #endif +// Flags for Case Light having a color property or a single pin +#if ENABLED(CASE_LIGHT_ENABLE) + #if EITHER(CASE_LIGHT_USE_NEOPIXEL, CASE_LIGHT_USE_RGB_LED) + #define CASE_LIGHT_IS_COLOR_LED 1 + #else + #define NEED_CASE_LIGHT_PIN 1 + #endif +#endif + // Flag whether least_squares_fit.cpp is used #if ANY(AUTO_BED_LEVELING_UBL, AUTO_BED_LEVELING_LINEAR, Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS) #define NEED_LSF 1 #endif -// Flag the indexed serial ports that are in use -#define ANY_SERIAL_IS(N) (defined(SERIAL_PORT) && SERIAL_PORT == (N)) || \ - (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == (N)) || \ - (defined(MMU2_SERIAL_PORT) && MMU2_SERIAL_PORT == (N)) || \ - (defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == (N)) +#if BOTH(HAS_TFT_LVGL_UI, CUSTOM_MENU_MAIN) + #define _HAS_1(N) (defined(MAIN_MENU_ITEM_##N##_DESC) && defined(MAIN_MENU_ITEM_##N##_GCODE)) + #define HAS_USER_ITEM(V...) DO(HAS,||,V) +#else + #define HAS_USER_ITEM(N) 0 +#endif + +#if !HAS_MULTI_SERIAL + #undef MEATPACK_ON_SERIAL_PORT_2 +#endif +#if EITHER(MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2) + #define HAS_MEATPACK 1 +#endif diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index acf8f3620b78..94750d810ab8 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -78,17 +78,51 @@ /** * Axis lengths and center */ +#ifndef AXIS4_NAME + #define AXIS4_NAME 'A' +#endif +#ifndef AXIS5_NAME + #define AXIS5_NAME 'B' +#endif +#ifndef AXIS6_NAME + #define AXIS6_NAME 'C' +#endif + #define X_MAX_LENGTH (X_MAX_POS - (X_MIN_POS)) -#define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS)) -#define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS)) +#if HAS_Y_AXIS + #define Y_MAX_LENGTH (Y_MAX_POS - (Y_MIN_POS)) +#endif +#if HAS_Z_AXIS + #define Z_MAX_LENGTH (Z_MAX_POS - (Z_MIN_POS)) +#else + #undef CONTROLLER_FAN_USE_Z_ONLY +#endif +#if LINEAR_AXES >= 4 + #define I_MAX_LENGTH (I_MAX_POS - (I_MIN_POS)) +#endif +#if LINEAR_AXES >= 5 + #define J_MAX_LENGTH (J_MAX_POS - (J_MIN_POS)) +#endif +#if LINEAR_AXES >= 6 + #define K_MAX_LENGTH (K_MAX_POS - (K_MIN_POS)) +#endif // Defined only if the sanity-check is bypassed #ifndef X_BED_SIZE #define X_BED_SIZE X_MAX_LENGTH #endif -#ifndef Y_BED_SIZE +#if HAS_Y_AXIS && !defined(Y_BED_SIZE) #define Y_BED_SIZE Y_MAX_LENGTH #endif +#if LINEAR_AXES >= 4 && !defined(I_BED_SIZE) + #define I_BED_SIZE I_MAX_LENGTH +#endif +#if LINEAR_AXES >= 5 && !defined(J_BED_SIZE) + #define J_BED_SIZE J_MAX_LENGTH +#endif +#if LINEAR_AXES >= 6 && !defined(K_BED_SIZE) + #define K_BED_SIZE K_MAX_LENGTH +#endif // Require 0,0 bed center for Delta and SCARA #if IS_KINEMATIC @@ -97,16 +131,53 @@ // Define center values for future use #define _X_HALF_BED ((X_BED_SIZE) / 2) -#define _Y_HALF_BED ((Y_BED_SIZE) / 2) +#if HAS_Y_AXIS + #define _Y_HALF_BED ((Y_BED_SIZE) / 2) +#endif +#if LINEAR_AXES >= 4 + #define _I_HALF_IMAX ((I_BED_SIZE) / 2) +#endif +#if LINEAR_AXES >= 5 + #define _J_HALF_JMAX ((J_BED_SIZE) / 2) +#endif +#if LINEAR_AXES >= 6 + #define _K_HALF_KMAX ((K_BED_SIZE) / 2) +#endif + #define X_CENTER TERN(BED_CENTER_AT_0_0, 0, _X_HALF_BED) -#define Y_CENTER TERN(BED_CENTER_AT_0_0, 0, _Y_HALF_BED) -#define XY_CENTER { X_CENTER, Y_CENTER } +#if HAS_Y_AXIS + #define Y_CENTER TERN(BED_CENTER_AT_0_0, 0, _Y_HALF_BED) + #define XY_CENTER { X_CENTER, Y_CENTER } +#endif +#if LINEAR_AXES >= 4 + #define I_CENTER TERN(BED_CENTER_AT_0_0, 0, _I_HALF_BED) +#endif +#if LINEAR_AXES >= 5 + #define J_CENTER TERN(BED_CENTER_AT_0_0, 0, _J_HALF_BED) +#endif +#if LINEAR_AXES >= 6 + #define K_CENTER TERN(BED_CENTER_AT_0_0, 0, _K_HALF_BED) +#endif // Get the linear boundaries of the bed #define X_MIN_BED (X_CENTER - _X_HALF_BED) #define X_MAX_BED (X_MIN_BED + X_BED_SIZE) -#define Y_MIN_BED (Y_CENTER - _Y_HALF_BED) -#define Y_MAX_BED (Y_MIN_BED + Y_BED_SIZE) +#if HAS_Y_AXIS + #define Y_MIN_BED (Y_CENTER - _Y_HALF_BED) + #define Y_MAX_BED (Y_MIN_BED + Y_BED_SIZE) +#endif +#if LINEAR_AXES >= 4 + #define I_MINIM (I_CENTER - _I_HALF_BED_SIZE) + #define I_MAXIM (I_MINIM + I_BED_SIZE) +#endif +#if LINEAR_AXES >= 5 + #define J_MINIM (J_CENTER - _J_HALF_BED_SIZE) + #define J_MAXIM (J_MINIM + J_BED_SIZE) +#endif +#if LINEAR_AXES >= 6 + #define K_MINIM (K_CENTER - _K_HALF_BED_SIZE) + #define K_MAXIM (K_MINIM + K_BED_SIZE) +#endif /** * Dual X Carriage @@ -125,7 +196,7 @@ #if EITHER(IS_CORE, MARKFORGED_XY) #define CAN_CALIBRATE(A,B) (_AXIS(A) == B) #else - #define CAN_CALIBRATE(A,B) 1 + #define CAN_CALIBRATE(A,B) true #endif #endif #define AXIS_CAN_CALIBRATE(A) CAN_CALIBRATE(A,NORMAL_AXIS) @@ -143,7 +214,9 @@ */ #if IS_SCARA #undef SLOWDOWN - #define QUICK_HOME + #if DISABLED(AXEL_TPARA) + #define QUICK_HOME + #endif #define SCARA_PRINTABLE_RADIUS (SCARA_LINKAGE_1 + SCARA_LINKAGE_2) #endif @@ -153,7 +226,7 @@ #ifdef MANUAL_X_HOME_POS #define X_HOME_POS MANUAL_X_HOME_POS #else - #define X_END_POS (X_HOME_DIR < 0 ? X_MIN_POS : X_MAX_POS) + #define X_END_POS TERN(X_HOME_TO_MIN, X_MIN_POS, X_MAX_POS) #if ENABLED(BED_CENTER_AT_0_0) #define X_HOME_POS TERN(DELTA, 0, X_END_POS) #else @@ -161,21 +234,45 @@ #endif #endif -#ifdef MANUAL_Y_HOME_POS - #define Y_HOME_POS MANUAL_Y_HOME_POS -#else - #define Y_END_POS (Y_HOME_DIR < 0 ? Y_MIN_POS : Y_MAX_POS) - #if ENABLED(BED_CENTER_AT_0_0) - #define Y_HOME_POS TERN(DELTA, 0, Y_END_POS) +#if HAS_Y_AXIS + #ifdef MANUAL_Y_HOME_POS + #define Y_HOME_POS MANUAL_Y_HOME_POS #else - #define Y_HOME_POS TERN(DELTA, Y_MIN_POS + (Y_BED_SIZE) * 0.5, Y_END_POS) + #define Y_END_POS TERN(Y_HOME_TO_MIN, Y_MIN_POS, Y_MAX_POS) + #if ENABLED(BED_CENTER_AT_0_0) + #define Y_HOME_POS TERN(DELTA, 0, Y_END_POS) + #else + #define Y_HOME_POS TERN(DELTA, Y_MIN_POS + (Y_BED_SIZE) * 0.5, Y_END_POS) + #endif #endif #endif #ifdef MANUAL_Z_HOME_POS #define Z_HOME_POS MANUAL_Z_HOME_POS #else - #define Z_HOME_POS (Z_HOME_DIR < 0 ? Z_MIN_POS : Z_MAX_POS) + #define Z_HOME_POS TERN(Z_HOME_TO_MIN, Z_MIN_POS, Z_MAX_POS) +#endif + +#if LINEAR_AXES >= 4 + #ifdef MANUAL_I_HOME_POS + #define I_HOME_POS MANUAL_I_HOME_POS + #else + #define I_HOME_POS TERN(I_HOME_TO_MIN, I_MIN_POS, I_MAX_POS) + #endif +#endif +#if LINEAR_AXES >= 5 + #ifdef MANUAL_J_HOME_POS + #define J_HOME_POS MANUAL_J_HOME_POS + #else + #define J_HOME_POS TERN(J_HOME_TO_MIN, J_MIN_POS, J_MAX_POS) + #endif +#endif +#if LINEAR_AXES >= 6 + #ifdef MANUAL_K_HOME_POS + #define K_HOME_POS MANUAL_K_HOME_POS + #else + #define K_HOME_POS TERN(K_HOME_TO_MIN, K_MIN_POS, K_MAX_POS) + #endif #endif /** @@ -222,6 +319,11 @@ #endif #endif +#ifdef GRID_MAX_POINTS_X + #define GRID_MAX_CELLS_X (GRID_MAX_POINTS_X - 1) + #define GRID_MAX_CELLS_Y (GRID_MAX_POINTS_Y - 1) +#endif + /** * Host keep alive */ @@ -263,12 +365,16 @@ #elif ENABLED(AZSMZ_12864) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 190 -#elif ENABLED(MKS_LCD12864) +#elif EITHER(MKS_LCD12864A, MKS_LCD12864B) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 205 #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) #define _LCD_CONTRAST_MIN 120 #define _LCD_CONTRAST_INIT 195 +#elif ENABLED(MKS_MINI_12864_V3) + #define _LCD_CONTRAST_MIN 255 + #define _LCD_CONTRAST_INIT 255 + #define _LCD_CONTRAST_MAX 255 #elif ENABLED(FYSETC_MINI_12864) #define _LCD_CONTRAST_INIT 220 #elif ENABLED(ULTI_CONTROLLER) @@ -323,11 +429,6 @@ */ #if ENABLED(SDSUPPORT) - // Extender cable doesn't support SD_DETECT_PIN - #if ENABLED(NO_SD_DETECT) - #undef SD_DETECT_PIN - #endif - #if HAS_SD_HOST_DRIVE && SD_CONNECTION_IS(ONBOARD) // // The external SD card is not used. Hardware SPI is used to access the card. @@ -338,37 +439,32 @@ #define HAS_SHARED_MEDIA 1 #endif - #if PIN_EXISTS(SD_DETECT) - #if HAS_LCD_MENU && (SD_CONNECTION_IS(LCD) || !defined(SDCARD_CONNECTION)) - #undef SD_DETECT_STATE - #if ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define SD_DETECT_STATE HIGH - #endif - #endif - #ifndef SD_DETECT_STATE + // Set SD_DETECT_STATE based on hardware if not overridden + #if PIN_EXISTS(SD_DETECT) && !defined(SD_DETECT_STATE) + #if BOTH(HAS_LCD_MENU, ELB_FULL_GRAPHIC_CONTROLLER) && (SD_CONNECTION_IS(LCD) || !defined(SDCARD_CONNECTION)) + #define SD_DETECT_STATE HIGH + #else #define SD_DETECT_STATE LOW #endif #endif -#endif -#if ANY(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT) || !PIN_EXISTS(SD_DETECT) - #define NO_LCD_REINIT 1 // Suppress LCD re-initialization -#endif + // Extender cable doesn't support SD_DETECT_PIN + #if ENABLED(NO_SD_DETECT) + #undef SD_DETECT_PIN + #endif + + #if DISABLED(USB_FLASH_DRIVE_SUPPORT) || BOTH(MULTI_VOLUME, VOLUME_SD_ONBOARD) + #if ENABLED(SDIO_SUPPORT) + #define NEED_SD2CARD_SDIO 1 + #else + #define NEED_SD2CARD_SPI 1 + #endif + #endif -/** - * Set defaults for missing (newer) options - */ -#ifndef DISABLE_INACTIVE_X - #define DISABLE_INACTIVE_X DISABLE_X -#endif -#ifndef DISABLE_INACTIVE_Y - #define DISABLE_INACTIVE_Y DISABLE_Y -#endif -#ifndef DISABLE_INACTIVE_Z - #define DISABLE_INACTIVE_Z DISABLE_Z #endif -#ifndef DISABLE_INACTIVE_E - #define DISABLE_INACTIVE_E DISABLE_E + +#if ANY(HAS_GRAPHICAL_TFT, LCD_USE_DMA_FSMC, HAS_FSMC_GRAPHICAL_TFT, HAS_SPI_GRAPHICAL_TFT, IS_DWIN_MARLINUI) || !PIN_EXISTS(SD_DETECT) + #define NO_LCD_REINIT 1 // Suppress LCD re-initialization #endif /** @@ -394,277 +490,266 @@ #endif /** - * Temp Sensor defines + * Temp Sensor defines; set up pins as needed. */ -#define ANY_TEMP_SENSOR_IS(n) (TEMP_SENSOR_0 == (n) || TEMP_SENSOR_1 == (n) || TEMP_SENSOR_2 == (n) || TEMP_SENSOR_3 == (n) || TEMP_SENSOR_4 == (n) || TEMP_SENSOR_5 == (n) || TEMP_SENSOR_6 == (n) || TEMP_SENSOR_7 == (n) || TEMP_SENSOR_BED == (n) || TEMP_SENSOR_PROBE == (n) || TEMP_SENSOR_CHAMBER == (n)) - -#if ANY_TEMP_SENSOR_IS(1000) - #define HAS_USER_THERMISTORS 1 -#endif - -#if TEMP_SENSOR_0 == -5 || TEMP_SENSOR_0 == -3 || TEMP_SENSOR_0 == -2 - #define HEATER_0_USES_MAX6675 1 - #if TEMP_SENSOR_0 == -3 - #define HEATER_0_MAX6675_TMIN -270 - #define HEATER_0_MAX6675_TMAX 1800 - #else - #define HEATER_0_MAX6675_TMIN 0 - #define HEATER_0_MAX6675_TMAX 1024 - #endif - #if TEMP_SENSOR_0 == -5 - #define MAX6675_0_IS_MAX31865 1 - #elif TEMP_SENSOR_0 == -3 - #define MAX6675_0_IS_MAX31855 1 - #endif -#elif TEMP_SENSOR_0 == -4 - #define HEATER_0_USES_AD8495 1 -#elif TEMP_SENSOR_0 == -1 - #define HEATER_0_USES_AD595 1 -#elif TEMP_SENSOR_0 > 0 - #define THERMISTOR_HEATER_0 TEMP_SENSOR_0 - #define HEATER_0_USES_THERMISTOR 1 - #if TEMP_SENSOR_0 == 1000 - #define HEATER_0_USER_THERMISTOR 1 - #elif TEMP_SENSOR_0 == 998 || TEMP_SENSOR_0 == 999 - #define HEATER_0_DUMMY_THERMISTOR 1 - #endif -#else - #undef HEATER_0_MINTEMP - #undef HEATER_0_MAXTEMP -#endif - -#if TEMP_SENSOR_1 == -5 || TEMP_SENSOR_1 == -3 || TEMP_SENSOR_1 == -2 - #define HEATER_1_USES_MAX6675 1 - #if TEMP_SENSOR_1 == -3 - #define HEATER_1_MAX6675_TMIN -270 - #define HEATER_1_MAX6675_TMAX 1800 - #else - #define HEATER_1_MAX6675_TMIN 0 - #define HEATER_1_MAX6675_TMAX 1024 - #endif - #if TEMP_SENSOR_1 == -5 - #define MAX6675_1_IS_MAX31865 1 - #elif TEMP_SENSOR_1 == -3 - #define MAX6675_1_IS_MAX31855 1 - #endif - #if TEMP_SENSOR_1 != TEMP_SENSOR_0 - #if TEMP_SENSOR_1 == -5 - #error "If MAX31865 Thermocouple (-5) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." - #elif TEMP_SENSOR_1 == -3 - #error "If MAX31855 Thermocouple (-3) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." - #elif TEMP_SENSOR_1 == -2 - #error "If MAX6675 Thermocouple (-2) is used for TEMP_SENSOR_1 then TEMP_SENSOR_0 must match." - #endif - #endif -#elif TEMP_SENSOR_1 == -4 - #define HEATER_1_USES_AD8495 1 -#elif TEMP_SENSOR_1 == -1 - #define HEATER_1_USES_AD595 1 -#elif TEMP_SENSOR_1 > 0 - #define THERMISTOR_HEATER_1 TEMP_SENSOR_1 - #define HEATER_1_USES_THERMISTOR 1 - #if TEMP_SENSOR_1 == 1000 - #define HEATER_1_USER_THERMISTOR 1 - #elif TEMP_SENSOR_1 == 998 || TEMP_SENSOR_1 == 999 - #define HEATER_1_DUMMY_THERMISTOR 1 +// Usurp a sensor to do redundant readings +#if TEMP_SENSOR_REDUNDANT + #ifndef TEMP_SENSOR_REDUNDANT_SOURCE + #define TEMP_SENSOR_REDUNDANT_SOURCE E1 #endif -#else - #undef HEATER_1_MINTEMP - #undef HEATER_1_MAXTEMP -#endif - -#if TEMP_SENSOR_2 == -4 - #define HEATER_2_USES_AD8495 1 -#elif TEMP_SENSOR_2 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_2." -#elif TEMP_SENSOR_2 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_2." -#elif TEMP_SENSOR_2 == -1 - #define HEATER_2_USES_AD595 1 -#elif TEMP_SENSOR_2 > 0 - #define THERMISTOR_HEATER_2 TEMP_SENSOR_2 - #define HEATER_2_USES_THERMISTOR 1 - #if TEMP_SENSOR_2 == 1000 - #define HEATER_2_USER_THERMISTOR 1 - #elif TEMP_SENSOR_2 == 998 || TEMP_SENSOR_2 == 999 - #define HEATER_2_DUMMY_THERMISTOR 1 + #ifndef TEMP_SENSOR_REDUNDANT_TARGET + #define TEMP_SENSOR_REDUNDANT_TARGET E0 #endif -#else - #undef HEATER_2_MINTEMP - #undef HEATER_2_MAXTEMP -#endif - -#if TEMP_SENSOR_3 == -4 - #define HEATER_3_USES_AD8495 1 -#elif TEMP_SENSOR_3 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_3." -#elif TEMP_SENSOR_3 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_3." -#elif TEMP_SENSOR_3 == -1 - #define HEATER_3_USES_AD595 1 -#elif TEMP_SENSOR_3 > 0 - #define THERMISTOR_HEATER_3 TEMP_SENSOR_3 - #define HEATER_3_USES_THERMISTOR 1 - #if TEMP_SENSOR_3 == 1000 - #define HEATER_3_USER_THERMISTOR 1 - #elif TEMP_SENSOR_3 == 998 || TEMP_SENSOR_3 == 999 - #define HEATER_3_DUMMY_THERMISTOR 1 - #endif -#else - #undef HEATER_3_MINTEMP - #undef HEATER_3_MAXTEMP -#endif - -#if TEMP_SENSOR_4 == -4 - #define HEATER_4_USES_AD8495 1 -#elif TEMP_SENSOR_4 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_4." -#elif TEMP_SENSOR_4 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_4." -#elif TEMP_SENSOR_4 == -1 - #define HEATER_4_USES_AD595 1 -#elif TEMP_SENSOR_4 > 0 - #define THERMISTOR_HEATER_4 TEMP_SENSOR_4 - #define HEATER_4_USES_THERMISTOR 1 - #if TEMP_SENSOR_4 == 1000 - #define HEATER_4_USER_THERMISTOR 1 - #elif TEMP_SENSOR_4 == 998 || TEMP_SENSOR_4 == 999 - #define HEATER_4_DUMMY_THERMISTOR 1 - #endif -#else - #undef HEATER_4_MINTEMP - #undef HEATER_4_MAXTEMP -#endif - -#if TEMP_SENSOR_5 == -4 - #define HEATER_5_USES_AD8495 1 -#elif TEMP_SENSOR_5 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_5." -#elif TEMP_SENSOR_5 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_5." -#elif TEMP_SENSOR_5 == -1 - #define HEATER_5_USES_AD595 1 -#elif TEMP_SENSOR_5 > 0 - #define THERMISTOR_HEATER_5 TEMP_SENSOR_5 - #define HEATER_5_USES_THERMISTOR 1 - #if TEMP_SENSOR_5 == 1000 - #define HEATER_5_USER_THERMISTOR 1 - #elif TEMP_SENSOR_5 == 998 || TEMP_SENSOR_5 == 999 - #define HEATER_5_DUMMY_THERMISTOR 1 - #endif -#else - #undef HEATER_5_MINTEMP - #undef HEATER_5_MAXTEMP -#endif - -#if TEMP_SENSOR_6 == -4 - #define HEATER_6_USES_AD8495 1 -#elif TEMP_SENSOR_6 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_6." -#elif TEMP_SENSOR_6 == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_6." -#elif TEMP_SENSOR_6 == -1 - #define HEATER_6_USES_AD595 1 -#elif TEMP_SENSOR_6 > 0 - #define THERMISTOR_HEATER_6 TEMP_SENSOR_6 - #define HEATER_6_USES_THERMISTOR 1 - #if TEMP_SENSOR_6 == 1000 - #define HEATER_6_USER_THERMISTOR 1 - #elif TEMP_SENSOR_6 == 998 || TEMP_SENSOR_6 == 999 - #define HEATER_6_DUMMY_THERMISTOR 1 + #if !PIN_EXISTS(TEMP_REDUNDANT) + #ifndef TEMP_SENSOR_REDUNDANT_MAX_DIFF + #define TEMP_SENSOR_REDUNDANT_MAX_DIFF 10 + #endif + #if REDUNDANT_TEMP_MATCH(SOURCE, COOLER) + #if !PIN_EXISTS(TEMP_COOLER) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to COOLER requires TEMP_COOLER_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_COOLER_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, PROBE) + #if !PIN_EXISTS(TEMP_PROBE) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to PROBE requires TEMP_PROBE_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_PROBE_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, CHAMBER) + #if !PIN_EXISTS(TEMP_CHAMBER) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to CHAMBER requires TEMP_CHAMBER_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_CHAMBER_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, BED) + #if !PIN_EXISTS(TEMP_BED) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to BED requires TEMP_BED_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_BED_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E0) + #if !PIN_EXISTS(TEMP_0) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E0 requires TEMP_0_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_0_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E1) + #if !PIN_EXISTS(TEMP_1) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E1 requires TEMP_1_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_1_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E2) + #if !PIN_EXISTS(TEMP_2) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E2 requires TEMP_2_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_2_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E3) + #if !PIN_EXISTS(TEMP_3) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E3 requires TEMP_3_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_3_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E4) + #if !PIN_EXISTS(TEMP_4) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E4 requires TEMP_4_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_4_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E5) + #if !PIN_EXISTS(TEMP_5) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E5 requires TEMP_5_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_5_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E6) + #if !PIN_EXISTS(TEMP_6) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E6 requires TEMP_6_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_6_PIN + #endif + #elif REDUNDANT_TEMP_MATCH(SOURCE, E7) + #if !PIN_EXISTS(TEMP_7) + #error "TEMP_SENSOR_REDUNDANT_SOURCE set to E7 requires TEMP_7_PIN." + #else + #define TEMP_REDUNDANT_PIN TEMP_7_PIN + #endif + #endif #endif -#else - #undef HEATER_6_MINTEMP - #undef HEATER_6_MAXTEMP -#endif - -#if TEMP_SENSOR_7 == -4 - #define HEATER_7_USES_AD8495 1 -#elif TEMP_SENSOR_7 == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_7." -#elif TEMP_SENSOR_7 == -2 - #error "MAX7775 Thermocouples (-2) not supported for TEMP_SENSOR_7." -#elif TEMP_SENSOR_7 == -1 - #define HEATER_7_USES_AD595 1 -#elif TEMP_SENSOR_7 > 0 - #define THERMISTOR_HEATER_7 TEMP_SENSOR_7 - #define HEATER_7_USES_THERMISTOR 1 - #if TEMP_SENSOR_7 == 1000 - #define HEATER_7_USER_THERMISTOR 1 - #elif TEMP_SENSOR_7 == 998 || TEMP_SENSOR_7 == 999 - #define HEATER_7_DUMMY_THERMISTOR 1 +#endif + +/** + * Compatibility layer for MAX (SPI) temp boards + */ +#if HAS_MAX_TC + + // Translate old _SS, _CS, _SCK, _DO, _DI, _MISO, and _MOSI PIN defines. + #if TEMP_SENSOR_0_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1)) + + #if !PIN_EXISTS(TEMP_0_CS) // SS, CS + #if PIN_EXISTS(MAX6675_SS) + #define TEMP_0_CS_PIN MAX6675_SS_PIN + #elif PIN_EXISTS(MAX6675_CS) + #define TEMP_0_CS_PIN MAX6675_CS_PIN + #elif PIN_EXISTS(MAX31855_SS) + #define TEMP_0_CS_PIN MAX31855_SS_PIN + #elif PIN_EXISTS(MAX31855_CS) + #define TEMP_0_CS_PIN MAX31855_CS_PIN + #elif PIN_EXISTS(MAX31865_SS) + #define TEMP_0_CS_PIN MAX31865_SS_PIN + #elif PIN_EXISTS(MAX31865_CS) + #define TEMP_0_CS_PIN MAX31865_CS_PIN + #endif + #endif + + #if TEMP_SENSOR_0_IS_MAX6675 + #if !PIN_EXISTS(TEMP_0_MISO) // DO + #if PIN_EXISTS(MAX6675_MISO) + #define TEMP_0_MISO_PIN MAX6675_MISO_PIN + #elif PIN_EXISTS(MAX6675_DO) + #define TEMP_0_MISO_PIN MAX6675_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_0_SCK) && PIN_EXISTS(MAX6675_SCK) + #define TEMP_0_SCK_PIN MAX6675_SCK_PIN + #endif + + #elif TEMP_SENSOR_0_IS_MAX31855 + #if !PIN_EXISTS(TEMP_0_MISO) // DO + #if PIN_EXISTS(MAX31855_MISO) + #define TEMP_0_MISO_PIN MAX31855_MISO_PIN + #elif PIN_EXISTS(MAX31855_DO) + #define TEMP_0_MISO_PIN MAX31855_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_0_SCK) && PIN_EXISTS(MAX31855_SCK) + #define TEMP_0_SCK_PIN MAX31855_SCK_PIN + #endif + + #elif TEMP_SENSOR_1_IS_MAX31865 + #if !PIN_EXISTS(TEMP_1_MISO) // DO + #if PIN_EXISTS(MAX31865_MISO) + #define TEMP_1_MISO_PIN MAX31865_MISO_PIN + #elif PIN_EXISTS(MAX31865_DO) + #define TEMP_1_MISO_PIN MAX31865_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX31865_SCK) + #define TEMP_1_SCK_PIN MAX31865_SCK_PIN + #endif + #if !PIN_EXISTS(TEMP_1_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only + #define TEMP_1_MOSI_PIN MAX31865_MOSI_PIN + #endif + #endif + + // Software SPI - enable if MISO/SCK are defined. + #if PIN_EXISTS(TEMP_0_MISO) && PIN_EXISTS(TEMP_0_SCK) && DISABLED(TEMP_SENSOR_0_FORCE_HW_SPI) + #if TEMP_SENSOR_0_IS_MAX31865 && !PIN_EXISTS(TEMP_0_MOSI) + #error "TEMP_SENSOR_0 MAX31865 requires TEMP_0_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_0_FORCE_HW_SPI." + #else + #define TEMP_SENSOR_0_HAS_SPI_PINS 1 + #endif + #endif + + #endif // TEMP_SENSOR_0_IS_MAX_TC + + #if TEMP_SENSOR_1_IS_MAX_TC || (TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1)) + + #if !PIN_EXISTS(TEMP_1_CS) // SS2, CS2 + #if PIN_EXISTS(MAX6675_SS2) + #define TEMP_1_CS_PIN MAX6675_SS2_PIN + #elif PIN_EXISTS(MAX6675_CS) + #define TEMP_1_CS_PIN MAX6675_CS2_PIN + #elif PIN_EXISTS(MAX31855_SS2) + #define TEMP_1_CS_PIN MAX31855_SS2_PIN + #elif PIN_EXISTS(MAX31855_CS2) + #define TEMP_1_CS_PIN MAX31855_CS2_PIN + #elif PIN_EXISTS(MAX31865_SS2) + #define TEMP_1_CS_PIN MAX31865_SS2_PIN + #elif PIN_EXISTS(MAX31865_CS2) + #define TEMP_1_CS_PIN MAX31865_CS2_PIN + #endif + #endif + + #if TEMP_SENSOR_1_IS_MAX6675 + #if !PIN_EXISTS(TEMP_1_MISO) // DO + #if PIN_EXISTS(MAX6675_MISO) + #define TEMP_1_MISO_PIN MAX6675_MISO_PIN + #elif PIN_EXISTS(MAX6675_DO) + #define TEMP_1_MISO_PIN MAX6675_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX6675_SCK) + #define TEMP_1_SCK_PIN MAX6675_SCK_PIN + #endif + + #elif TEMP_SENSOR_1_IS_MAX31855 + #if !PIN_EXISTS(TEMP_1_MISO) // DO + #if PIN_EXISTS(MAX31855_MISO) + #define TEMP_1_MISO_PIN MAX31855_MISO_PIN + #elif PIN_EXISTS(MAX31855_DO) + #define TEMP_1_MISO_PIN MAX31855_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX31855_SCK) + #define TEMP_1_SCK_PIN MAX31855_SCK_PIN + #endif + + #elif TEMP_SENSOR_1_IS_MAX31865 + #if !PIN_EXISTS(TEMP_1_MISO) // DO + #if PIN_EXISTS(MAX31865_MISO) + #define TEMP_1_MISO_PIN MAX31865_MISO_PIN + #elif PIN_EXISTS(MAX31865_DO) + #define TEMP_1_MISO_PIN MAX31865_DO_PIN + #endif + #endif + #if !PIN_EXISTS(TEMP_1_SCK) && PIN_EXISTS(MAX31865_SCK) + #define TEMP_1_SCK_PIN MAX31865_SCK_PIN + #endif + #if !PIN_EXISTS(TEMP_1_MOSI) && PIN_EXISTS(MAX31865_MOSI) // MOSI for '65 only + #define TEMP_1_MOSI_PIN MAX31865_MOSI_PIN + #endif + #endif + + // Software SPI - enable if MISO/SCK are defined. + #if PIN_EXISTS(TEMP_1_MISO) && PIN_EXISTS(TEMP_1_SCK) && DISABLED(TEMP_SENSOR_1_FORCE_HW_SPI) + #if TEMP_SENSOR_1_IS_MAX31865 && !PIN_EXISTS(TEMP_1_MOSI) + #error "TEMP_SENSOR_1 MAX31865 requires TEMP_1_MOSI_PIN defined for Software SPI. To use Hardware SPI instead, undefine MISO/SCK or enable TEMP_SENSOR_1_FORCE_HW_SPI." + #else + #define TEMP_SENSOR_1_HAS_SPI_PINS 1 + #endif + #endif + + #endif // TEMP_SENSOR_1_IS_MAX_TC + + // + // User-defined thermocouple libraries + // + // Add LIB_MAX6675 / LIB_MAX31855 / LIB_MAX31865 to the build_flags + // to select a USER library for MAX6675, MAX31855, MAX31865 + // + #if BOTH(HAS_MAX6675, LIB_MAX6675) + #define USE_LIB_MAX6675 1 #endif -#else - #undef HEATER_7_MINTEMP - #undef HEATER_7_MAXTEMP -#endif - -#if TEMP_SENSOR_BED == -4 - #define HEATER_BED_USES_AD8495 1 -#elif TEMP_SENSOR_BED == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_BED." -#elif TEMP_SENSOR_BED == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_BED." -#elif TEMP_SENSOR_BED == -1 - #define HEATER_BED_USES_AD595 1 -#elif TEMP_SENSOR_BED > 0 - #define THERMISTORBED TEMP_SENSOR_BED - #define HEATER_BED_USES_THERMISTOR 1 - #if TEMP_SENSOR_BED == 1000 - #define HEATER_BED_USER_THERMISTOR 1 - #elif TEMP_SENSOR_BED == 998 || TEMP_SENSOR_BED == 999 - #define HEATER_BED_DUMMY_THERMISTOR 1 + #if BOTH(HAS_MAX31855, LIB_MAX31855) + #define USE_ADAFRUIT_MAX31855 1 #endif -#else - #undef BED_MINTEMP - #undef BED_MAXTEMP -#endif - -#if TEMP_SENSOR_CHAMBER == -4 - #define HEATER_CHAMBER_USES_AD8495 1 -#elif TEMP_SENSOR_CHAMBER == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_CHAMBER." -#elif TEMP_SENSOR_CHAMBER == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_CHAMBER." -#elif TEMP_SENSOR_CHAMBER == -1 - #define HEATER_CHAMBER_USES_AD595 1 -#elif TEMP_SENSOR_CHAMBER > 0 - #define THERMISTORCHAMBER TEMP_SENSOR_CHAMBER - #define HEATER_CHAMBER_USES_THERMISTOR 1 - #if TEMP_SENSOR_CHAMBER == 1000 - #define HEATER_CHAMBER_USER_THERMISTOR 1 - #elif TEMP_SENSOR_CHAMBER == 998 || TEMP_SENSOR_CHAMBER == 999 - #define HEATER_CHAMBER_DUMMY_THERMISTOR 1 + #if BOTH(HAS_MAX31865, LIB_MAX31865) + #define USE_ADAFRUIT_MAX31865 1 + #elif HAS_MAX31865 + #define LIB_INTERNAL_MAX31865 1 #endif -#else - #undef CHAMBER_MINTEMP - #undef CHAMBER_MAXTEMP -#endif -#if TEMP_SENSOR_PROBE == -4 - #define HEATER_PROBE_USES_AD8495 1 -#elif TEMP_SENSOR_PROBE == -3 - #error "MAX31855 Thermocouples (-3) not supported for TEMP_SENSOR_PROBE." -#elif TEMP_SENSOR_PROBE == -2 - #error "MAX6675 Thermocouples (-2) not supported for TEMP_SENSOR_PROBE." -#elif TEMP_SENSOR_PROBE == -1 - #define HEATER_PROBE_USES_AD595 1 -#elif TEMP_SENSOR_PROBE > 0 - #define THERMISTORPROBE TEMP_SENSOR_PROBE - #define HEATER_PROBE_USES_THERMISTOR 1 - #if TEMP_SENSOR_PROBE == 1000 - #define HEATER_PROBE_USER_THERMISTOR 1 - #elif TEMP_SENSOR_PROBE == 998 || TEMP_SENSOR_PROBE == 999 - #define HEATER_PROBE_DUMMY_THERMISTOR 1 - #endif -#endif +#endif //HAS_MAX_TC /** * X_DUAL_ENDSTOPS endstop reassignment */ #if ENABLED(X_DUAL_ENDSTOPS) - #if X_HOME_DIR > 0 + #if X_HOME_TO_MAX #ifndef X2_MAX_ENDSTOP_INVERTING #if X2_USE_ENDSTOP == _XMIN_ #define X2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING @@ -787,7 +872,7 @@ * Y_DUAL_ENDSTOPS endstop reassignment */ #if ENABLED(Y_DUAL_ENDSTOPS) - #if Y_HOME_DIR > 0 + #if Y_HOME_TO_MAX #ifndef Y2_MAX_ENDSTOP_INVERTING #if Y2_USE_ENDSTOP == _XMIN_ #define Y2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING @@ -911,7 +996,7 @@ */ #if ENABLED(Z_MULTI_ENDSTOPS) - #if Z_HOME_DIR > 0 + #if Z_HOME_TO_MAX #ifndef Z2_MAX_ENDSTOP_INVERTING #if Z2_USE_ENDSTOP == _XMIN_ #define Z2_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING @@ -1030,7 +1115,7 @@ #endif #if NUM_Z_STEPPER_DRIVERS >= 3 - #if Z_HOME_DIR > 0 + #if Z_HOME_TO_MAX #ifndef Z3_MAX_ENDSTOP_INVERTING #if Z3_USE_ENDSTOP == _XMIN_ #define Z3_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING @@ -1150,7 +1235,7 @@ #endif #if NUM_Z_STEPPER_DRIVERS >= 4 - #if Z_HOME_DIR > 0 + #if Z_HOME_TO_MAX #ifndef Z4_MAX_ENDSTOP_INVERTING #if Z4_USE_ENDSTOP == _XMIN_ #define Z4_MAX_ENDSTOP_INVERTING X_MIN_ENDSTOP_INVERTING @@ -1284,6 +1369,15 @@ #if ENABLED(USE_ZMAX_PLUG) #define ENDSTOPPULLUP_ZMAX #endif + #if ENABLED(USE_IMAX_PLUG) + #define ENDSTOPPULLUP_IMAX + #endif + #if ENABLED(USE_JMAX_PLUG) + #define ENDSTOPPULLUP_JMAX + #endif + #if ENABLED(USE_KMAX_PLUG) + #define ENDSTOPPULLUP_KMAX + #endif #if ENABLED(USE_XMIN_PLUG) #define ENDSTOPPULLUP_XMIN #endif @@ -1293,6 +1387,15 @@ #if ENABLED(USE_ZMIN_PLUG) #define ENDSTOPPULLUP_ZMIN #endif + #if ENABLED(USE_IMIN_PLUG) + #define ENDSTOPPULLUP_IMIN + #endif + #if ENABLED(USE_JMIN_PLUG) + #define ENDSTOPPULLUP_JMIN + #endif + #if ENABLED(USE_KMIN_PLUG) + #define ENDSTOPPULLUP_KMIN + #endif #endif /** @@ -1337,7 +1440,7 @@ #define HAS_X_MS_PINS 1 #endif -#if PIN_EXISTS(X2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2)) +#if PIN_EXISTS(X2_ENABLE) || AXIS_IS_L64XX(X2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2)) #define HAS_X2_ENABLE 1 #endif #if PIN_EXISTS(X2_DIR) @@ -1350,211 +1453,332 @@ #define HAS_X2_MS_PINS 1 #endif -#if PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y)) - #define HAS_Y_ENABLE 1 -#endif -#if PIN_EXISTS(Y_DIR) - #define HAS_Y_DIR 1 -#endif -#if PIN_EXISTS(Y_STEP) - #define HAS_Y_STEP 1 -#endif -#if PIN_EXISTS(Y_MS1) - #define HAS_Y_MS_PINS 1 +/** + * Set defaults for missing (newer) options + */ +#if !defined(DISABLE_INACTIVE_X) && ENABLED(DISABLE_X) + #define DISABLE_INACTIVE_X 1 #endif -#if PIN_EXISTS(Y2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2)) - #define HAS_Y2_ENABLE 1 -#endif -#if PIN_EXISTS(Y2_DIR) - #define HAS_Y2_DIR 1 -#endif -#if PIN_EXISTS(Y2_STEP) - #define HAS_Y2_STEP 1 -#endif -#if PIN_EXISTS(Y2_MS1) - #define HAS_Y2_MS_PINS 1 -#endif +#if HAS_Y_AXIS + #if PIN_EXISTS(Y_ENABLE) || AXIS_IS_L64XX(Y) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y)) + #define HAS_Y_ENABLE 1 + #endif + #if PIN_EXISTS(Y_DIR) + #define HAS_Y_DIR 1 + #endif + #if PIN_EXISTS(Y_STEP) + #define HAS_Y_STEP 1 + #endif + #if PIN_EXISTS(Y_MS1) + #define HAS_Y_MS_PINS 1 + #endif -#if PIN_EXISTS(Z_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z)) - #define HAS_Z_ENABLE 1 -#endif -#if PIN_EXISTS(Z_DIR) - #define HAS_Z_DIR 1 -#endif -#if PIN_EXISTS(Z_STEP) - #define HAS_Z_STEP 1 -#endif -#if PIN_EXISTS(Z_MS1) - #define HAS_Z_MS_PINS 1 + #if PIN_EXISTS(Y2_ENABLE) || AXIS_IS_L64XX(Y2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2)) + #define HAS_Y2_ENABLE 1 + #endif + #if PIN_EXISTS(Y2_DIR) + #define HAS_Y2_DIR 1 + #endif + #if PIN_EXISTS(Y2_STEP) + #define HAS_Y2_STEP 1 + #endif + #if PIN_EXISTS(Y2_MS1) + #define HAS_Y2_MS_PINS 1 + #endif + #if !defined(DISABLE_INACTIVE_Y) && ENABLED(DISABLE_Y) + #define DISABLE_INACTIVE_Y 1 + #endif +#else + #undef DISABLE_INACTIVE_Y #endif -#if PIN_EXISTS(Z2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2)) - #define HAS_Z2_ENABLE 1 -#endif -#if PIN_EXISTS(Z2_DIR) - #define HAS_Z2_DIR 1 -#endif -#if PIN_EXISTS(Z2_STEP) - #define HAS_Z2_STEP 1 -#endif -#if PIN_EXISTS(Z2_MS1) - #define HAS_Z2_MS_PINS 1 +#if HAS_Z_AXIS + #if PIN_EXISTS(Z_ENABLE) || AXIS_IS_L64XX(Z) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z)) + #define HAS_Z_ENABLE 1 + #endif + #if PIN_EXISTS(Z_DIR) + #define HAS_Z_DIR 1 + #endif + #if PIN_EXISTS(Z_STEP) + #define HAS_Z_STEP 1 + #endif + #if PIN_EXISTS(Z_MS1) + #define HAS_Z_MS_PINS 1 + #endif + #if !defined(DISABLE_INACTIVE_Z) && ENABLED(DISABLE_Z) + #define DISABLE_INACTIVE_Z 1 + #endif +#else + #undef DISABLE_INACTIVE_Z #endif -#if PIN_EXISTS(Z3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3)) - #define HAS_Z3_ENABLE 1 -#endif -#if PIN_EXISTS(Z3_DIR) - #define HAS_Z3_DIR 1 -#endif -#if PIN_EXISTS(Z3_STEP) - #define HAS_Z3_STEP 1 +#if NUM_Z_STEPPER_DRIVERS >= 2 + #if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2)) + #define HAS_Z2_ENABLE 1 + #endif + #if PIN_EXISTS(Z2_DIR) + #define HAS_Z2_DIR 1 + #endif + #if PIN_EXISTS(Z2_STEP) + #define HAS_Z2_STEP 1 + #endif + #if PIN_EXISTS(Z2_MS1) + #define HAS_Z2_MS_PINS 1 + #endif #endif -#if PIN_EXISTS(Z3_MS1) - #define HAS_Z3_MS_PINS 1 + +#if NUM_Z_STEPPER_DRIVERS >= 3 + #if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3)) + #define HAS_Z3_ENABLE 1 + #endif + #if PIN_EXISTS(Z3_DIR) + #define HAS_Z3_DIR 1 + #endif + #if PIN_EXISTS(Z3_STEP) + #define HAS_Z3_STEP 1 + #endif + #if PIN_EXISTS(Z3_MS1) + #define HAS_Z3_MS_PINS 1 + #endif #endif -#if PIN_EXISTS(Z4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4)) - #define HAS_Z4_ENABLE 1 +#if NUM_Z_STEPPER_DRIVERS >= 4 + #if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4)) + #define HAS_Z4_ENABLE 1 + #endif + #if PIN_EXISTS(Z4_DIR) + #define HAS_Z4_DIR 1 + #endif + #if PIN_EXISTS(Z4_STEP) + #define HAS_Z4_STEP 1 + #endif + #if PIN_EXISTS(Z4_MS1) + #define HAS_Z4_MS_PINS 1 + #endif #endif -#if PIN_EXISTS(Z4_DIR) - #define HAS_Z4_DIR 1 + +#if LINEAR_AXES >= 4 + #if PIN_EXISTS(I_ENABLE) || AXIS_IS_L64XX(I) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(I)) + #define HAS_I_ENABLE 1 + #endif + #if PIN_EXISTS(I_DIR) + #define HAS_I_DIR 1 + #endif + #if PIN_EXISTS(I_STEP) + #define HAS_I_STEP 1 + #endif + #if PIN_EXISTS(I_MS1) + #define HAS_I_MS_PINS 1 + #endif + #if !defined(DISABLE_INACTIVE_I) && ENABLED(DISABLE_I) + #define DISABLE_INACTIVE_I 1 + #endif +#else + #undef DISABLE_INACTIVE_I #endif -#if PIN_EXISTS(Z4_STEP) - #define HAS_Z4_STEP 1 + +#if LINEAR_AXES >= 5 + #if PIN_EXISTS(J_ENABLE) || AXIS_IS_L64XX(J) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(J)) + #define HAS_J_ENABLE 1 + #endif + #if PIN_EXISTS(J_DIR) + #define HAS_J_DIR 1 + #endif + #if PIN_EXISTS(J_STEP) + #define HAS_J_STEP 1 + #endif + #if PIN_EXISTS(J_MS1) + #define HAS_J_MS_PINS 1 + #endif + #if !defined(DISABLE_INACTIVE_J) && ENABLED(DISABLE_J) + #define DISABLE_INACTIVE_J 1 + #endif +#else + #undef DISABLE_INACTIVE_J #endif -#if PIN_EXISTS(Z4_MS1) - #define HAS_Z4_MS_PINS 1 + +#if LINEAR_AXES >= 6 + #if PIN_EXISTS(K_ENABLE) || AXIS_IS_L64XX(K) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(K)) + #define HAS_K_ENABLE 1 + #endif + #if PIN_EXISTS(K_DIR) + #define HAS_K_DIR 1 + #endif + #if PIN_EXISTS(K_STEP) + #define HAS_K_STEP 1 + #endif + #if PIN_EXISTS(K_MS1) + #define HAS_K_MS_PINS 1 + #endif + #if !defined(DISABLE_INACTIVE_K) && ENABLED(DISABLE_K) + #define DISABLE_INACTIVE_K 1 + #endif +#else + #undef DISABLE_INACTIVE_K #endif // Extruder steppers and solenoids -#if PIN_EXISTS(E0_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0)) - #define HAS_E0_ENABLE 1 -#endif -#if PIN_EXISTS(E0_DIR) - #define HAS_E0_DIR 1 -#endif -#if PIN_EXISTS(E0_STEP) - #define HAS_E0_STEP 1 -#endif -#if PIN_EXISTS(E0_MS1) - #define HAS_E0_MS_PINS 1 -#endif -#if PIN_EXISTS(SOL0) - #define HAS_SOLENOID_0 1 -#endif +#if HAS_EXTRUDERS -#if PIN_EXISTS(E1_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1)) - #define HAS_E1_ENABLE 1 -#endif -#if PIN_EXISTS(E1_DIR) - #define HAS_E1_DIR 1 -#endif -#if PIN_EXISTS(E1_STEP) - #define HAS_E1_STEP 1 -#endif -#if PIN_EXISTS(E1_MS1) - #define HAS_E1_MS_PINS 1 -#endif -#if PIN_EXISTS(SOL1) - #define HAS_SOLENOID_1 1 -#endif + #if PIN_EXISTS(E0_ENABLE) || AXIS_IS_L64XX(E0) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0)) + #define HAS_E0_ENABLE 1 + #endif + #if PIN_EXISTS(E0_DIR) + #define HAS_E0_DIR 1 + #endif + #if PIN_EXISTS(E0_STEP) + #define HAS_E0_STEP 1 + #endif + #if PIN_EXISTS(E0_MS1) + #define HAS_E0_MS_PINS 1 + #endif -#if PIN_EXISTS(E2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2)) - #define HAS_E2_ENABLE 1 -#endif -#if PIN_EXISTS(E2_DIR) - #define HAS_E2_DIR 1 -#endif -#if PIN_EXISTS(E2_STEP) - #define HAS_E2_STEP 1 -#endif -#if PIN_EXISTS(E2_MS1) - #define HAS_E2_MS_PINS 1 -#endif -#if PIN_EXISTS(SOL2) - #define HAS_SOLENOID_2 1 -#endif + #if E_STEPPERS > 1 || ENABLED(E_DUAL_STEPPER_DRIVERS) + #if PIN_EXISTS(E1_ENABLE) || AXIS_IS_L64XX(E1) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1)) + #define HAS_E1_ENABLE 1 + #endif + #if PIN_EXISTS(E1_DIR) + #define HAS_E1_DIR 1 + #endif + #if PIN_EXISTS(E1_STEP) + #define HAS_E1_STEP 1 + #endif + #if PIN_EXISTS(E1_MS1) + #define HAS_E1_MS_PINS 1 + #endif + #endif -#if PIN_EXISTS(E3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3)) - #define HAS_E3_ENABLE 1 -#endif -#if PIN_EXISTS(E3_DIR) - #define HAS_E3_DIR 1 -#endif -#if PIN_EXISTS(E3_STEP) - #define HAS_E3_STEP 1 -#endif -#if PIN_EXISTS(E3_MS1) - #define HAS_E3_MS_PINS 1 -#endif -#if PIN_EXISTS(SOL3) - #define HAS_SOLENOID_3 1 -#endif + #if E_STEPPERS > 2 + #if PIN_EXISTS(E2_ENABLE) || AXIS_IS_L64XX(E2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2)) + #define HAS_E2_ENABLE 1 + #endif + #if PIN_EXISTS(E2_DIR) + #define HAS_E2_DIR 1 + #endif + #if PIN_EXISTS(E2_STEP) + #define HAS_E2_STEP 1 + #endif + #if PIN_EXISTS(E2_MS1) + #define HAS_E2_MS_PINS 1 + #endif + #endif -#if PIN_EXISTS(E4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4)) - #define HAS_E4_ENABLE 1 -#endif -#if PIN_EXISTS(E4_DIR) - #define HAS_E4_DIR 1 -#endif -#if PIN_EXISTS(E4_STEP) - #define HAS_E4_STEP 1 -#endif -#if PIN_EXISTS(E4_MS1) - #define HAS_E4_MS_PINS 1 -#endif -#if PIN_EXISTS(SOL4) - #define HAS_SOLENOID_4 1 -#endif + #if E_STEPPERS > 3 + #if PIN_EXISTS(E3_ENABLE) || AXIS_IS_L64XX(E3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3)) + #define HAS_E3_ENABLE 1 + #endif + #if PIN_EXISTS(E3_DIR) + #define HAS_E3_DIR 1 + #endif + #if PIN_EXISTS(E3_STEP) + #define HAS_E3_STEP 1 + #endif + #if PIN_EXISTS(E3_MS1) + #define HAS_E3_MS_PINS 1 + #endif + #endif -#if PIN_EXISTS(E5_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5)) - #define HAS_E5_ENABLE 1 -#endif -#if PIN_EXISTS(E5_DIR) - #define HAS_E5_DIR 1 -#endif -#if PIN_EXISTS(E5_STEP) - #define HAS_E5_STEP 1 -#endif -#if PIN_EXISTS(E5_MS1) - #define HAS_E5_MS_PINS 1 -#endif -#if PIN_EXISTS(SOL5) - #define HAS_SOLENOID_5 1 -#endif + #if E_STEPPERS > 4 + #if PIN_EXISTS(E4_ENABLE) || AXIS_IS_L64XX(E4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4)) + #define HAS_E4_ENABLE 1 + #endif + #if PIN_EXISTS(E4_DIR) + #define HAS_E4_DIR 1 + #endif + #if PIN_EXISTS(E4_STEP) + #define HAS_E4_STEP 1 + #endif + #if PIN_EXISTS(E4_MS1) + #define HAS_E4_MS_PINS 1 + #endif + #endif -#if PIN_EXISTS(E6_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6)) - #define HAS_E6_ENABLE 1 -#endif -#if PIN_EXISTS(E6_DIR) - #define HAS_E6_DIR 1 -#endif -#if PIN_EXISTS(E6_STEP) - #define HAS_E6_STEP 1 -#endif -#if PIN_EXISTS(E6_MS1) - #define HAS_E6_MS_PINS 1 -#endif -#if PIN_EXISTS(SOL6) - #define HAS_SOLENOID_6 1 -#endif + #if E_STEPPERS > 5 + #if PIN_EXISTS(E5_ENABLE) || AXIS_IS_L64XX(E5) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5)) + #define HAS_E5_ENABLE 1 + #endif + #if PIN_EXISTS(E5_DIR) + #define HAS_E5_DIR 1 + #endif + #if PIN_EXISTS(E5_STEP) + #define HAS_E5_STEP 1 + #endif + #if PIN_EXISTS(E5_MS1) + #define HAS_E5_MS_PINS 1 + #endif + #endif -#if PIN_EXISTS(E7_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7)) - #define HAS_E7_ENABLE 1 -#endif -#if PIN_EXISTS(E7_DIR) - #define HAS_E7_DIR 1 -#endif -#if PIN_EXISTS(E7_STEP) - #define HAS_E7_STEP 1 -#endif -#if PIN_EXISTS(E7_MS1) - #define HAS_E7_MS_PINS 1 -#endif -#if PIN_EXISTS(SOL7) - #define HAS_SOLENOID_7 1 + #if E_STEPPERS > 6 + #if PIN_EXISTS(E6_ENABLE) || AXIS_IS_L64XX(E6) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6)) + #define HAS_E6_ENABLE 1 + #endif + #if PIN_EXISTS(E6_DIR) + #define HAS_E6_DIR 1 + #endif + #if PIN_EXISTS(E6_STEP) + #define HAS_E6_STEP 1 + #endif + #if PIN_EXISTS(E6_MS1) + #define HAS_E6_MS_PINS 1 + #endif + #endif + + #if E_STEPPERS > 7 + #if PIN_EXISTS(E7_ENABLE) || AXIS_IS_L64XX(E7) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7)) + #define HAS_E7_ENABLE 1 + #endif + #if PIN_EXISTS(E7_DIR) + #define HAS_E7_DIR 1 + #endif + #if PIN_EXISTS(E7_STEP) + #define HAS_E7_STEP 1 + #endif + #if PIN_EXISTS(E7_MS1) + #define HAS_E7_MS_PINS 1 + #endif + #endif + + #if !defined(DISABLE_INACTIVE_E) && ENABLED(DISABLE_E) + #define DISABLE_INACTIVE_E 1 + #endif +#else + #undef DISABLE_INACTIVE_E +#endif // HAS_EXTRUDERS + +/** + * Set solenoid flags if any features use solenoids + * - EXT_SOLENOID (M380, M381) to enable/disable the extruder solenoid + * - MANUAL_SOLENOID_CONTROL (M380, M381) to enable/disable solenoids by index + * - PARKING_EXTRUDER uses SOL0_PIN and SOL1_PIN + * - SOLENOID_PROBE uses SOL1_PIN + * - Z_PROBE_SLED uses SOL1_PIN, when defined (unless EXT_SOLENOID is enabled) + */ +#if ANY(EXT_SOLENOID, MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER, SOLENOID_PROBE, Z_PROBE_SLED) + #if PIN_EXISTS(SOL0) && (EITHER(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER) || BOTH(EXT_SOLENOID, HAS_EXTRUDERS)) + #define HAS_SOLENOID_0 1 + #endif + #if PIN_EXISTS(SOL1) && (ANY(MANUAL_SOLENOID_CONTROL, PARKING_EXTRUDER, SOLENOID_PROBE, Z_PROBE_SLED) || TERN0(EXT_SOLENOID, E_STEPPERS > 1)) + #define HAS_SOLENOID_1 1 + #endif + #if PIN_EXISTS(SOL2) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 2)) + #define HAS_SOLENOID_2 2 + #endif + #if PIN_EXISTS(SOL3) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 3)) + #define HAS_SOLENOID_3 3 + #endif + #if PIN_EXISTS(SOL4) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 4)) + #define HAS_SOLENOID_4 4 + #endif + #if PIN_EXISTS(SOL5) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 5)) + #define HAS_SOLENOID_5 5 + #endif + #if PIN_EXISTS(SOL6) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 6)) + #define HAS_SOLENOID_6 6 + #endif + #if PIN_EXISTS(SOL7) && (ENABLED(MANUAL_SOLENOID_CONTROL) || TERN0(EXT_SOLENOID, E_STEPPERS > 7)) + #define HAS_SOLENOID_7 7 + #endif #endif // @@ -1562,7 +1786,7 @@ // #if HAS_TRINAMIC_CONFIG - #if ANY(STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_E) + #if ANY(STEALTHCHOP_E, STEALTHCHOP_XY, STEALTHCHOP_Z, STEALTHCHOP_I, STEALTHCHOP_J, STEALTHCHOP_K) #define STEALTHCHOP_ENABLED 1 #endif #if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) @@ -1581,28 +1805,109 @@ #if defined(X2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(X2) #define X2_SENSORLESS 1 #endif - #if defined(Y_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y) - #define Y_SENSORLESS 1 + #if defined(Y_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y) + #define Y_SENSORLESS 1 + #endif + #if defined(Y2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2) + #define Y2_SENSORLESS 1 + #endif + #if defined(Z_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z) + #define Z_SENSORLESS 1 + #endif + #if defined(Z2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2) + #define Z2_SENSORLESS 1 + #endif + #if defined(Z3_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3) + #define Z3_SENSORLESS 1 + #endif + #if defined(Z4_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z4) + #define Z4_SENSORLESS 1 + #endif + #if defined(I_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(I) + #define I_SENSORLESS 1 + #endif + #if defined(J_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(J) + #define J_SENSORLESS 1 + #endif + #if defined(K_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(K) + #define K_SENSORLESS 1 + #endif + + #if AXIS_HAS_STEALTHCHOP(X) + #define X_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(X2) + #define X2_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(Y) + #define Y_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(Y2) + #define Y2_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(Z) + #define Z_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(Z2) + #define Z2_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(Z3) + #define Z3_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(Z4) + #define Z4_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(I) + #define I_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(J) + #define J_HAS_STEALTHCHOP 1 + #endif + #if AXIS_HAS_STEALTHCHOP(K) + #define K_HAS_STEALTHCHOP 1 + #endif + #if E_STEPPERS > 0 && AXIS_HAS_STEALTHCHOP(E0) + #define E0_HAS_STEALTHCHOP 1 + #endif + #if E_STEPPERS > 1 && AXIS_HAS_STEALTHCHOP(E1) + #define E1_HAS_STEALTHCHOP 1 #endif - #if defined(Y2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2) - #define Y2_SENSORLESS 1 + #if E_STEPPERS > 2 && AXIS_HAS_STEALTHCHOP(E2) + #define E2_HAS_STEALTHCHOP 1 #endif - #if defined(Z_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z) - #define Z_SENSORLESS 1 + #if E_STEPPERS > 3 && AXIS_HAS_STEALTHCHOP(E3) + #define E3_HAS_STEALTHCHOP 1 #endif - #if defined(Z2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2) - #define Z2_SENSORLESS 1 + #if E_STEPPERS > 4 && AXIS_HAS_STEALTHCHOP(E4) + #define E4_HAS_STEALTHCHOP 1 #endif - #if defined(Z3_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3) - #define Z3_SENSORLESS 1 + #if E_STEPPERS > 5 && AXIS_HAS_STEALTHCHOP(E5) + #define E5_HAS_STEALTHCHOP 1 #endif - #if defined(Z4_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z4) - #define Z4_SENSORLESS 1 + #if E_STEPPERS > 6 && AXIS_HAS_STEALTHCHOP(E6) + #define E6_HAS_STEALTHCHOP 1 #endif + #if E_STEPPERS > 7 && AXIS_HAS_STEALTHCHOP(E7) + #define E7_HAS_STEALTHCHOP 1 + #endif + #if ENABLED(SPI_ENDSTOPS) #define X_SPI_SENSORLESS X_SENSORLESS - #define Y_SPI_SENSORLESS Y_SENSORLESS - #define Z_SPI_SENSORLESS Z_SENSORLESS + #if HAS_Y_AXIS + #define Y_SPI_SENSORLESS Y_SENSORLESS + #endif + #if HAS_Z_AXIS + #define Z_SPI_SENSORLESS Z_SENSORLESS + #endif + #if LINEAR_AXES >= 4 + #define I_SPI_SENSORLESS I_SENSORLESS + #endif + #if LINEAR_AXES >= 5 + #define J_SPI_SENSORLESS J_SENSORLESS + #endif + #if LINEAR_AXES >= 6 + #define K_SPI_SENSORLESS K_SENSORLESS + #endif #endif #ifndef X_INTERPOLATE #define X_INTERPOLATE INTERPOLATE @@ -1628,6 +1933,15 @@ #ifndef Z4_INTERPOLATE #define Z4_INTERPOLATE INTERPOLATE #endif + #if LINEAR_AXES >= 4 && !defined(I_INTERPOLATE) + #define I_INTERPOLATE INTERPOLATE + #endif + #if LINEAR_AXES >= 5 && !defined(J_INTERPOLATE) + #define J_INTERPOLATE INTERPOLATE + #endif + #if LINEAR_AXES >= 6 && !defined(K_INTERPOLATE) + #define K_INTERPOLATE INTERPOLATE + #endif #ifndef E0_INTERPOLATE #define E0_INTERPOLATE INTERPOLATE #endif @@ -1653,13 +1967,22 @@ #define E7_INTERPOLATE INTERPOLATE #endif #ifndef X_SLAVE_ADDRESS - #define X_SLAVE_ADDRESS 0 + #define X_SLAVE_ADDRESS 0 #endif #ifndef Y_SLAVE_ADDRESS - #define Y_SLAVE_ADDRESS 0 + #define Y_SLAVE_ADDRESS 0 #endif #ifndef Z_SLAVE_ADDRESS - #define Z_SLAVE_ADDRESS 0 + #define Z_SLAVE_ADDRESS 0 + #endif + #ifndef I_SLAVE_ADDRESS + #define I_SLAVE_ADDRESS 0 + #endif + #ifndef J_SLAVE_ADDRESS + #define J_SLAVE_ADDRESS 0 + #endif + #ifndef K_SLAVE_ADDRESS + #define K_SLAVE_ADDRESS 0 #endif #ifndef X2_SLAVE_ADDRESS #define X2_SLAVE_ADDRESS 0 @@ -1702,12 +2025,6 @@ #endif #endif -#if (HAS_E_DRIVER(TMC2660) \ - || ( E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != X_ENABLE_PIN \ - && E0_ENABLE_PIN != Y_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN ) ) - #define HAS_E_STEPPER_ENABLE 1 -#endif - #if ANY_AXIS_HAS(HW_SERIAL) #define HAS_TMC_HW_SERIAL 1 #endif @@ -1715,12 +2032,116 @@ #define HAS_TMC_SW_SERIAL 1 #endif +#if DISABLED(SENSORLESS_HOMING) + #undef SENSORLESS_BACKOFF_MM +#endif + +// +// Set USING_HW_SERIALn flags for used Serial Ports +// + +// Flag the indexed hardware serial ports in use +#define CONF_SERIAL_IS(N) ( (defined(SERIAL_PORT) && SERIAL_PORT == N) \ + || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == N) \ + || (defined(SERIAL_PORT_3) && SERIAL_PORT_3 == N) \ + || (defined(MMU2_SERIAL_PORT) && MMU2_SERIAL_PORT == N) \ + || (defined(LCD_SERIAL_PORT) && LCD_SERIAL_PORT == N) ) + +// Flag the named hardware serial ports in use +#define TMC_UART_IS(A,N) (defined(A##_HARDWARE_SERIAL) && (CAT(HW_,A##_HARDWARE_SERIAL) == HW_Serial##N || CAT(HW_,A##_HARDWARE_SERIAL) == HW_MSerial##N)) +#define ANY_SERIAL_IS(N) ( CONF_SERIAL_IS(N) \ + || TMC_UART_IS(X, N) || TMC_UART_IS(Y , N) || TMC_UART_IS(Z , N) \ + || TMC_UART_IS(X2, N) || TMC_UART_IS(Y2, N) || TMC_UART_IS(Z2, N) || TMC_UART_IS(Z3, N) || TMC_UART_IS(Z4, N) \ + || TMC_UART_IS(E0, N) || TMC_UART_IS(E1, N) || TMC_UART_IS(E2, N) || TMC_UART_IS(E3, N) || TMC_UART_IS(E4, N) ) + +#define HW_Serial 501 +#define HW_Serial0 502 +#define HW_Serial1 503 +#define HW_Serial2 504 +#define HW_Serial3 505 +#define HW_Serial4 506 +#define HW_Serial5 507 +#define HW_Serial6 508 +#define HW_MSerial0 509 +#define HW_MSerial1 510 +#define HW_MSerial2 511 +#define HW_MSerial3 512 +#define HW_MSerial4 513 +#define HW_MSerial5 514 +#define HW_MSerial6 515 +#define HW_MSerial7 516 +#define HW_MSerial8 517 +#define HW_MSerial9 518 +#define HW_MSerial10 519 + +#if CONF_SERIAL_IS(-1) + #define USING_HW_SERIALUSB 1 +#endif +#if ANY_SERIAL_IS(0) + #define USING_HW_SERIAL0 1 +#endif +#if ANY_SERIAL_IS(1) + #define USING_HW_SERIAL1 1 +#endif +#if ANY_SERIAL_IS(2) + #define USING_HW_SERIAL2 1 +#endif +#if ANY_SERIAL_IS(3) + #define USING_HW_SERIAL3 1 +#endif +#if ANY_SERIAL_IS(4) + #define USING_HW_SERIAL4 1 +#endif +#if ANY_SERIAL_IS(5) + #define USING_HW_SERIAL5 1 +#endif +#if ANY_SERIAL_IS(6) + #define USING_HW_SERIAL6 1 +#endif +#if ANY_SERIAL_IS(7) + #define USING_HW_SERIAL7 1 +#endif +#if ANY_SERIAL_IS(8) + #define USING_HW_SERIAL8 1 +#endif +#if ANY_SERIAL_IS(9) + #define USING_HW_SERIAL9 1 +#endif +#if ANY_SERIAL_IS(10) + #define USING_HW_SERIAL10 1 +#endif + +#undef HW_Serial +#undef HW_Serial0 +#undef HW_Serial1 +#undef HW_Serial2 +#undef HW_Serial3 +#undef HW_Serial4 +#undef HW_Serial5 +#undef HW_Serial6 +#undef HW_MSerial0 +#undef HW_MSerial1 +#undef HW_MSerial2 +#undef HW_MSerial3 +#undef HW_MSerial4 +#undef HW_MSerial5 +#undef HW_MSerial6 +#undef HW_MSerial7 +#undef HW_MSerial8 +#undef HW_MSerial9 +#undef HW_MSerial10 + +#undef _SERIAL_ID +#undef _TMC_UART_IS +#undef TMC_UART_IS +#undef ANY_SERIAL_IS + // // Endstops and bed probe // // Is an endstop plug used for extra Z endstops or the probe? -#define IS_PROBE_PIN(A,M) (HAS_CUSTOM_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN) +#define IS_PROBE_PIN(A,M) (USES_Z_MIN_PROBE_PIN && Z_MIN_PROBE_PIN == A##_##M##_PIN) #define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_) #define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_) #define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_) @@ -1746,14 +2167,23 @@ #if _HAS_STOP(Z,MAX) #define HAS_Z_MAX 1 #endif -#if _HAS_STOP(X,STOP) - #define HAS_X_STOP 1 +#if _HAS_STOP(I,MIN) + #define HAS_I_MIN 1 +#endif +#if _HAS_STOP(I,MAX) + #define HAS_I_MAX 1 +#endif +#if _HAS_STOP(J,MIN) + #define HAS_J_MIN 1 +#endif +#if _HAS_STOP(J,MAX) + #define HAS_J_MAX 1 #endif -#if _HAS_STOP(Y,STOP) - #define HAS_Y_STOP 1 +#if _HAS_STOP(K,MIN) + #define HAS_K_MIN 1 #endif -#if _HAS_STOP(Z,STOP) - #define HAS_Z_STOP 1 +#if _HAS_STOP(K,MAX) + #define HAS_K_MAX 1 #endif #if PIN_EXISTS(X2_MIN) #define HAS_X2_MIN 1 @@ -1785,14 +2215,23 @@ #if PIN_EXISTS(Z4_MAX) #define HAS_Z4_MAX 1 #endif -#if HAS_CUSTOM_PROBE_PIN && PIN_EXISTS(Z_MIN_PROBE) + +#if HAS_BED_PROBE && PIN_EXISTS(Z_MIN_PROBE) #define HAS_Z_MIN_PROBE_PIN 1 #endif +#undef _HAS_STOP +#undef IS_PROBE_PIN +#undef IS_X2_ENDSTOP +#undef IS_Y2_ENDSTOP +#undef IS_Z2_ENDSTOP +#undef IS_Z3_ENDSTOP +#undef IS_Z4_ENDSTOP + // // ADC Temp Sensors (Thermistor or Thermocouple with amplifier ADC interface) // -#define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && NONE(HEATER_##P##_USES_MAX6675, HEATER_##P##_DUMMY_THERMISTOR)) +#define HAS_ADC_TEST(P) (PIN_EXISTS(TEMP_##P) && TEMP_SENSOR_##P != 0 && NONE(TEMP_SENSOR_##P##_IS_MAX_TC, TEMP_SENSOR_##P##_IS_DUMMY)) #if HAS_ADC_TEST(0) #define HAS_TEMP_ADC_0 1 #endif @@ -1826,8 +2265,17 @@ #if HAS_ADC_TEST(CHAMBER) #define HAS_TEMP_ADC_CHAMBER 1 #endif +#if HAS_ADC_TEST(COOLER) + #define HAS_TEMP_ADC_COOLER 1 +#endif +#if HAS_ADC_TEST(BOARD) + #define HAS_TEMP_ADC_BOARD 1 +#endif +#if HAS_ADC_TEST(REDUNDANT) + #define HAS_TEMP_ADC_REDUNDANT 1 +#endif -#define HAS_TEMP(N) ANY(HAS_TEMP_ADC_##N, HEATER_##N##_USES_MAX6675, HEATER_##N##_DUMMY_THERMISTOR) +#define HAS_TEMP(N) ANY(HAS_TEMP_ADC_##N, TEMP_SENSOR_##N##_IS_MAX_TC, TEMP_SENSOR_##N##_IS_DUMMY) #if HAS_HOTEND && HAS_TEMP(0) #define HAS_TEMP_HOTEND 1 #endif @@ -1840,6 +2288,15 @@ #if HAS_TEMP(CHAMBER) #define HAS_TEMP_CHAMBER 1 #endif +#if HAS_TEMP(COOLER) + #define HAS_TEMP_COOLER 1 +#endif +#if HAS_TEMP(BOARD) + #define HAS_TEMP_BOARD 1 +#endif +#if HAS_TEMP(REDUNDANT) + #define HAS_TEMP_REDUNDANT 1 +#endif #if ENABLED(JOYSTICK) #if PIN_EXISTS(JOY_X) @@ -1892,27 +2349,41 @@ #define BED_OVERSHOOT 10 #endif #define BED_MAX_TARGET (BED_MAXTEMP - (BED_OVERSHOOT)) +#else + #undef PIDTEMPBED +#endif + +#if HAS_TEMP_COOLER && PIN_EXISTS(COOLER) + #define HAS_COOLER 1 + #ifndef COOLER_OVERSHOOT + #define COOLER_OVERSHOOT 2 + #endif + #define COOLER_MIN_TARGET (COOLER_MINTEMP + (COOLER_OVERSHOOT)) + #define COOLER_MAX_TARGET (COOLER_MAXTEMP - (COOLER_OVERSHOOT)) #endif + #if HAS_HEATED_BED || HAS_TEMP_CHAMBER #define BED_OR_CHAMBER 1 #endif -#if HAS_TEMP_HOTEND || BED_OR_CHAMBER || HAS_TEMP_PROBE + +#if HAS_TEMP_HOTEND || BED_OR_CHAMBER || HAS_TEMP_PROBE || HAS_TEMP_COOLER || HAS_TEMP_BOARD #define HAS_TEMP_SENSOR 1 #endif + #if HAS_TEMP_CHAMBER && PIN_EXISTS(HEATER_CHAMBER) #define HAS_HEATED_CHAMBER 1 + #ifndef CHAMBER_OVERSHOOT + #define CHAMBER_OVERSHOOT 10 + #endif + #define CHAMBER_MAX_TARGET (CHAMBER_MAXTEMP - (CHAMBER_OVERSHOOT)) +#else + #undef PIDTEMPCHAMBER #endif // PID heating -#if !HAS_HEATED_BED - #undef PIDTEMPBED -#endif -#if EITHER(PIDTEMP, PIDTEMPBED) +#if ANY(PIDTEMP, PIDTEMPBED, PIDTEMPCHAMBER) #define HAS_PID_HEATING 1 #endif -#if BOTH(PIDTEMP, PIDTEMPBED) - #define HAS_PID_FOR_BOTH 1 -#endif // Thermal protection #if BOTH(HAS_HEATED_BED, THERMAL_PROTECTION_BED) @@ -1927,9 +2398,13 @@ #if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) && WATCH_CHAMBER_TEMP_PERIOD > 0 #define WATCH_CHAMBER 1 #endif +#if BOTH(HAS_COOLER, THERMAL_PROTECTION_COOLER) && WATCH_COOLER_TEMP_PERIOD > 0 + #define WATCH_COOLER 1 +#endif #if (ENABLED(THERMAL_PROTECTION_HOTENDS) || !EXTRUDERS) \ && (ENABLED(THERMAL_PROTECTION_BED) || !HAS_HEATED_BED) \ - && (ENABLED(THERMAL_PROTECTION_CHAMBER) || !HAS_HEATED_CHAMBER) + && (ENABLED(THERMAL_PROTECTION_CHAMBER) || !HAS_HEATED_CHAMBER) \ + && (ENABLED(THERMAL_PROTECTION_COOLER) || !HAS_COOLER) #define THERMALLY_SAFE 1 #endif @@ -1961,8 +2436,11 @@ #if HAS_TEMP_CHAMBER && PIN_EXISTS(CHAMBER_AUTO_FAN) #define HAS_AUTO_CHAMBER_FAN 1 #endif +#if HAS_TEMP_COOLER && PIN_EXISTS(COOLER_AUTO_FAN) + #define HAS_AUTO_COOLER_FAN 1 +#endif -#if ANY(HAS_AUTO_FAN_0, HAS_AUTO_FAN_1, HAS_AUTO_FAN_2, HAS_AUTO_FAN_3, HAS_AUTO_FAN_4, HAS_AUTO_FAN_5, HAS_AUTO_FAN_6, HAS_AUTO_FAN_7, HAS_AUTO_CHAMBER_FAN) +#if ANY(HAS_AUTO_FAN_0, HAS_AUTO_FAN_1, HAS_AUTO_FAN_2, HAS_AUTO_FAN_3, HAS_AUTO_FAN_4, HAS_AUTO_FAN_5, HAS_AUTO_FAN_6, HAS_AUTO_FAN_7, HAS_AUTO_CHAMBER_FAN, HAS_AUTO_COOLER_FAN) #define HAS_AUTO_FAN 1 #endif #define _FANOVERLAP(A,B) (A##_AUTO_FAN_PIN == E##B##_AUTO_FAN_PIN) @@ -1973,7 +2451,7 @@ #if !HAS_TEMP_SENSOR #undef AUTO_REPORT_TEMPERATURES #endif -#if EITHER(AUTO_REPORT_TEMPERATURES, AUTO_REPORT_SD_STATUS) +#if ANY(AUTO_REPORT_TEMPERATURES, AUTO_REPORT_SD_STATUS, AUTO_REPORT_POSITION) #define HAS_AUTO_REPORTING 1 #endif @@ -2026,12 +2504,101 @@ #endif #undef _NOT_E_AUTO #undef _HAS_FAN + +#if BED_OR_CHAMBER || HAS_FAN0 + #define BED_OR_CHAMBER_OR_FAN 1 +#endif + +/** + * Up to 3 PWM fans + */ +#ifndef FAN_INVERTING + #define FAN_INVERTING false +#endif + +#if HAS_FAN7 + #define FAN_COUNT 8 +#elif HAS_FAN6 + #define FAN_COUNT 7 +#elif HAS_FAN5 + #define FAN_COUNT 6 +#elif HAS_FAN4 + #define FAN_COUNT 5 +#elif HAS_FAN3 + #define FAN_COUNT 4 +#elif HAS_FAN2 + #define FAN_COUNT 3 +#elif HAS_FAN1 + #define FAN_COUNT 2 +#elif HAS_FAN0 + #define FAN_COUNT 1 +#else + #define FAN_COUNT 0 +#endif + +#if FAN_COUNT > 0 + #define HAS_FAN 1 +#endif + +/** + * Part Cooling fan multipliexer + */ +#if PIN_EXISTS(FANMUX0) + #define HAS_FANMUX 1 +#endif + +/** + * MIN/MAX fan PWM scaling + */ +#ifndef FAN_OFF_PWM + #define FAN_OFF_PWM 0 +#endif +#ifndef FAN_MIN_PWM + #if FAN_OFF_PWM > 0 + #define FAN_MIN_PWM (FAN_OFF_PWM + 1) + #else + #define FAN_MIN_PWM 0 + #endif +#endif +#ifndef FAN_MAX_PWM + #define FAN_MAX_PWM 255 +#endif +#if FAN_MIN_PWM < 0 || FAN_MIN_PWM > 255 + #error "FAN_MIN_PWM must be a value from 0 to 255." +#elif FAN_MAX_PWM < 0 || FAN_MAX_PWM > 255 + #error "FAN_MAX_PWM must be a value from 0 to 255." +#elif FAN_MIN_PWM > FAN_MAX_PWM + #error "FAN_MIN_PWM must be less than or equal to FAN_MAX_PWM." +#elif FAN_OFF_PWM > FAN_MIN_PWM + #error "FAN_OFF_PWM must be less than or equal to FAN_MIN_PWM." +#endif + +/** + * FAST PWM FAN Settings + */ +#if ENABLED(FAST_PWM_FAN) && !defined(FAST_PWM_FAN_FREQUENCY) + #define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1)) // Fan frequency default +#endif + +/** + * Controller Fan Settings + */ #if PIN_EXISTS(CONTROLLER_FAN) #define HAS_CONTROLLER_FAN 1 + #if CONTROLLER_FAN_MIN_BOARD_TEMP + #define HAS_CONTROLLER_FAN_MIN_BOARD_TEMP 1 + #endif #endif -#if BED_OR_CHAMBER || HAS_FAN0 - #define BED_OR_CHAMBER_OR_FAN 1 +#if HAS_CONTROLLER_FAN + #if ENABLED(CONTROLLER_FAN_USE_BOARD_TEMP) + #define HAS_CONTROLLER_FAN_BOARD_TEMP_TRIGGER 1 + #ifndef CONTROLLER_FAN_TRIGGER_TEMP + #define CONTROLLER_FAN_TRIGGER_TEMP 30 + #endif + #else + #undef CONTROLLER_FAN_TRIGGER_TEMP + #endif #endif // Servos @@ -2049,9 +2616,14 @@ #endif #if NUM_SERVOS > 0 #define HAS_SERVOS 1 -#endif -#if HAS_SERVOS && defined(PAUSE_SERVO_OUTPUT) && defined(RESUME_SERVO_OUTPUT) - #define HAS_PAUSE_SERVO_OUTPUT 1 + #if defined(PAUSE_SERVO_OUTPUT) && defined(RESUME_SERVO_OUTPUT) + #define HAS_PAUSE_SERVO_OUTPUT 1 + #endif +#else + #undef SERVO_DELAY + #undef DEACTIVATE_SERVOS_AFTER_MOVE + #undef EDITABLE_SERVO_ANGLES + #undef SERVO_DETACH_GCODE #endif // Sensors @@ -2060,12 +2632,22 @@ #endif // User Interface -#if PIN_EXISTS(HOME) - #define HAS_HOME 1 +#if ENABLED(FREEZE_FEATURE) + #if !PIN_EXISTS(FREEZE) && PIN_EXISTS(KILL) + #define FREEZE_PIN KILL_PIN + #endif + #if PIN_EXISTS(FREEZE) + #define HAS_FREEZE_PIN 1 + #endif +#else + #undef FREEZE_PIN #endif -#if PIN_EXISTS(KILL) +#if PIN_EXISTS(KILL) && TERN1(FREEZE_FEATURE, KILL_PIN != FREEZE_PIN) #define HAS_KILL 1 #endif +#if PIN_EXISTS(HOME) + #define HAS_HOME 1 +#endif #if PIN_EXISTS(SUICIDE) #define HAS_SUICIDE 1 #endif @@ -2080,7 +2662,10 @@ #if PIN_EXISTS(DIGIPOTSS) #define HAS_MOTOR_CURRENT_SPI 1 #endif -#if ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_Z, MOTOR_CURRENT_PWM_E) +#if HAS_EXTRUDERS && PIN_EXISTS(MOTOR_CURRENT_PWM_E) + #define HAS_MOTOR_CURRENT_PWM_E 1 +#endif +#if HAS_MOTOR_CURRENT_PWM_E || ANY_PIN(MOTOR_CURRENT_PWM_X, MOTOR_CURRENT_PWM_Y, MOTOR_CURRENT_PWM_XY, MOTOR_CURRENT_PWM_Z, MOTOR_CURRENT_PWM_I, MOTOR_CURRENT_PWM_J, MOTOR_CURRENT_PWM_K) #define HAS_MOTOR_CURRENT_PWM 1 #endif @@ -2090,7 +2675,7 @@ #if ANY(HAS_E0_MS_PINS, HAS_E1_MS_PINS, HAS_E2_MS_PINS, HAS_E3_MS_PINS, HAS_E4_MS_PINS, HAS_E5_MS_PINS, HAS_E6_MS_PINS, HAS_E7_MS_PINS) #define HAS_SOME_E_MS_PINS 1 #endif -#if ANY(HAS_X_MS_PINS, HAS_X2_MS_PINS, HAS_Y_MS_PINS, HAS_Y2_MS_PINS, HAS_SOME_Z_MS_PINS, HAS_SOME_E_MS_PINS) +#if ANY(HAS_X_MS_PINS, HAS_X2_MS_PINS, HAS_Y_MS_PINS, HAS_Y2_MS_PINS, HAS_SOME_Z_MS_PINS, HAS_I_MS_PINS, HAS_J_MS_PINS, HAS_K_MS_PINS, HAS_SOME_E_MS_PINS) #define HAS_MICROSTEPS 1 #endif @@ -2246,6 +2831,9 @@ * Heated chamber requires settings */ #if HAS_HEATED_CHAMBER + #ifndef MIN_CHAMBER_POWER + #define MIN_CHAMBER_POWER 0 + #endif #ifndef MAX_CHAMBER_POWER #define MAX_CHAMBER_POWER 255 #endif @@ -2255,12 +2843,27 @@ #define WRITE_HEATER_CHAMBER(v) WRITE(HEATER_CHAMBER_PIN, (v) ^ HEATER_CHAMBER_INVERTING) #endif -#if HAS_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER +/** + * Laser Cooling requires settings + */ +#if HAS_COOLER + #ifndef MAX_COOLER_POWER + #define MAX_COOLER_POWER 255 + #endif + #ifndef COOLER_INVERTING + #define COOLER_INVERTING true + #endif + #define WRITE_HEATER_COOLER(v) WRITE(COOLER_PIN, (v) ^ COOLER_INVERTING) +#endif + +#if HAS_HOTEND || HAS_HEATED_BED || HAS_HEATED_CHAMBER || HAS_COOLER #define HAS_TEMPERATURE 1 #endif -#if HAS_TEMPERATURE && EITHER(HAS_LCD_MENU, DWIN_CREALITY_LCD) - #ifdef PREHEAT_5_LABEL +#if HAS_TEMPERATURE && EITHER(HAS_LCD_MENU, HAS_DWIN_E3V2) + #ifdef PREHEAT_6_LABEL + #define PREHEAT_COUNT 6 + #elif defined(PREHEAT_5_LABEL) #define PREHEAT_COUNT 5 #elif defined(PREHEAT_4_LABEL) #define PREHEAT_COUNT 4 @@ -2273,75 +2876,8 @@ #endif #endif -/** - * Up to 3 PWM fans - */ -#ifndef FAN_INVERTING - #define FAN_INVERTING false -#endif - -#if HAS_FAN7 - #define FAN_COUNT 8 -#elif HAS_FAN6 - #define FAN_COUNT 7 -#elif HAS_FAN5 - #define FAN_COUNT 6 -#elif HAS_FAN4 - #define FAN_COUNT 5 -#elif HAS_FAN3 - #define FAN_COUNT 4 -#elif HAS_FAN2 - #define FAN_COUNT 3 -#elif HAS_FAN1 - #define FAN_COUNT 2 -#elif HAS_FAN0 - #define FAN_COUNT 1 -#else - #define FAN_COUNT 0 -#endif - -#if FAN_COUNT > 0 - #define HAS_FAN 1 -#endif - -/** - * Part Cooling fan multipliexer - */ -#if PIN_EXISTS(FANMUX0) - #define HAS_FANMUX 1 -#endif - -/** - * MIN/MAX fan PWM scaling - */ -#ifndef FAN_OFF_PWM - #define FAN_OFF_PWM 0 -#endif -#ifndef FAN_MIN_PWM - #if FAN_OFF_PWM > 0 - #define FAN_MIN_PWM (FAN_OFF_PWM + 1) - #else - #define FAN_MIN_PWM 0 - #endif -#endif -#ifndef FAN_MAX_PWM - #define FAN_MAX_PWM 255 -#endif -#if FAN_MIN_PWM < 0 || FAN_MIN_PWM > 255 - #error "FAN_MIN_PWM must be a value from 0 to 255." -#elif FAN_MAX_PWM < 0 || FAN_MAX_PWM > 255 - #error "FAN_MAX_PWM must be a value from 0 to 255." -#elif FAN_MIN_PWM > FAN_MAX_PWM - #error "FAN_MIN_PWM must be less than or equal to FAN_MAX_PWM." -#elif FAN_OFF_PWM > FAN_MIN_PWM - #error "FAN_OFF_PWM must be less than or equal to FAN_MIN_PWM." -#endif - -/** - * FAST PWM FAN Settings - */ -#if ENABLED(FAST_PWM_FAN) && !defined(FAST_PWM_FAN_FREQUENCY) - #define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1)) // Fan frequency default +#if !PREHEAT_COUNT + #undef PREHEAT_SHORTCUT_MENU_ITEM #endif /** @@ -2358,24 +2894,27 @@ /** * Bed Probe dependencies */ -#if HAS_BED_PROBE - #if BOTH(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN) - #define ENDSTOPPULLUP_ZMIN_PROBE - #endif +#if EITHER(MESH_BED_LEVELING, HAS_BED_PROBE) #ifndef Z_PROBE_OFFSET_RANGE_MIN #define Z_PROBE_OFFSET_RANGE_MIN -20 #endif #ifndef Z_PROBE_OFFSET_RANGE_MAX #define Z_PROBE_OFFSET_RANGE_MAX 20 #endif - #ifndef XY_PROBE_SPEED - #define XY_PROBE_SPEED ((homing_feedrate_mm_m.x + homing_feedrate_mm_m.y) / 2) +#endif +#if HAS_BED_PROBE + #if BOTH(ENDSTOPPULLUPS, HAS_Z_MIN_PROBE_PIN) + #define ENDSTOPPULLUP_ZMIN_PROBE + #endif + #ifndef XY_PROBE_FEEDRATE + #define XY_PROBE_FEEDRATE ((homing_feedrate_mm_m.x + homing_feedrate_mm_m.y) / 2) #endif #ifndef NOZZLE_TO_PROBE_OFFSET #define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 } #endif #else #undef NOZZLE_TO_PROBE_OFFSET + #undef PROBING_STEPPERS_OFF #endif /** @@ -2418,21 +2957,36 @@ /** * Heater, Fan, and Probe interactions */ -#if FAN_COUNT == 0 - #undef PROBING_FANS_OFF +#if !HAS_FAN #undef ADAPTIVE_FAN_SLOWING #undef NO_FAN_SLOWING_IN_PID_TUNING #endif - -#if HAS_BED_PROBE && (EITHER(PROBING_HEATERS_OFF, PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0) - #define HAS_QUIET_PROBING 1 +#if !BOTH(HAS_BED_PROBE, HAS_FAN) + #undef PROBING_FANS_OFF +#endif +#if !BOTH(HAS_BED_PROBE, HAS_EXTRUDERS) + #undef PROBING_ESTEPPERS_OFF +#elif ENABLED(PROBING_STEPPERS_OFF) + // PROBING_STEPPERS_OFF implies PROBING_ESTEPPERS_OFF, make sure it is defined + #define PROBING_ESTEPPERS_OFF #endif #if EITHER(ADVANCED_PAUSE_FEATURE, PROBING_HEATERS_OFF) #define HEATER_IDLE_HANDLER 1 #endif +#if HAS_BED_PROBE && (ANY(PROBING_HEATERS_OFF, PROBING_STEPPERS_OFF, PROBING_ESTEPPERS_OFF, PROBING_FANS_OFF) || DELAY_BEFORE_PROBING > 0) + #define HAS_QUIET_PROBING 1 +#endif -#if ENABLED(ADVANCED_PAUSE_FEATURE) && !defined(FILAMENT_CHANGE_SLOW_LOAD_LENGTH) - #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 +/** + * Advanced Pause - Filament Change + */ +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #if ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) + #define M600_PURGE_MORE_RESUMABLE 1 + #endif + #ifndef FILAMENT_CHANGE_SLOW_LOAD_LENGTH + #define FILAMENT_CHANGE_SLOW_LOAD_LENGTH 0 + #endif #endif #if HAS_MULTI_EXTRUDER && !defined(TOOLCHANGE_FS_EXTRA_PRIME) @@ -2617,9 +3171,9 @@ #define Z_CLEARANCE_BETWEEN_PROBES Z_HOMING_HEIGHT #endif #if Z_CLEARANCE_BETWEEN_PROBES > Z_HOMING_HEIGHT - #define MANUAL_PROBE_HEIGHT Z_CLEARANCE_BETWEEN_PROBES + #define Z_CLEARANCE_BETWEEN_MANUAL_PROBES Z_CLEARANCE_BETWEEN_PROBES #else - #define MANUAL_PROBE_HEIGHT Z_HOMING_HEIGHT + #define Z_CLEARANCE_BETWEEN_MANUAL_PROBES Z_HOMING_HEIGHT #endif #ifndef Z_CLEARANCE_MULTI_PROBE #define Z_CLEARANCE_MULTI_PROBE Z_CLEARANCE_BETWEEN_PROBES @@ -2629,8 +3183,14 @@ #endif #endif -#if !defined(MANUAL_PROBE_START_Z) && defined(Z_CLEARANCE_BETWEEN_PROBES) - #define MANUAL_PROBE_START_Z Z_CLEARANCE_BETWEEN_PROBES +// Define a starting height for measuring manual probe points +#ifndef MANUAL_PROBE_START_Z + #if EITHER(MESH_BED_LEVELING, PROBE_MANUALLY) + // Leave MANUAL_PROBE_START_Z undefined so the prior Z height will be used. + // Note: If Z_CLEARANCE_BETWEEN_MANUAL_PROBES is 0 there will be no raise between points + #elif ENABLED(AUTO_BED_LEVELING_UBL) && defined(Z_CLEARANCE_BETWEEN_PROBES) + #define MANUAL_PROBE_START_Z Z_CLEARANCE_BETWEEN_PROBES + #endif #endif #ifndef __SAM3X8E__ //todo: hal: broken hal encapsulation @@ -2651,14 +3211,19 @@ #endif #endif -// LCD timeout to status screen default is 15s -#ifndef LCD_TIMEOUT_TO_STATUS - #define LCD_TIMEOUT_TO_STATUS 15000 +#if HAS_LCD_MENU + // LCD timeout to status screen default is 15s + #ifndef LCD_TIMEOUT_TO_STATUS + #define LCD_TIMEOUT_TO_STATUS 15000 + #endif + #if LCD_TIMEOUT_TO_STATUS + #define SCREENS_CAN_TIME_OUT 1 + #endif #endif // Add commands that need sub-codes to this list #if ANY(G38_PROBE_TARGET, CNC_COORDINATE_SYSTEMS, POWER_LOSS_RECOVERY) - #define USE_GCODE_SUBCODES + #define USE_GCODE_SUBCODES 1 #endif // Parking Extruder @@ -2672,7 +3237,7 @@ #endif // Number of VFAT entries used. Each entry has 13 UTF-16 characters -#if EITHER(SCROLL_LONG_FILENAMES, DWIN_CREALITY_LCD) +#if EITHER(SCROLL_LONG_FILENAMES, HAS_DWIN_E3V2) #define MAX_VFAT_ENTRIES (5) #else #define MAX_VFAT_ENTRIES (2) @@ -2717,16 +3282,13 @@ #define SD_SPI_SPEED SPI_FULL_SPEED #endif -// Defined here to catch the above defines -#if ENABLED(SDCARD_SORT_ALPHA) && (FOLDER_SORTING || ENABLED(SDSORT_GCODE)) - #define HAS_FOLDER_SORTING 1 -#endif - #if HAS_WIRED_LCD // Get LCD character width/height, which may be overridden by pins, configs, etc. #ifndef LCD_WIDTH #if HAS_MARLINUI_U8GLIB #define LCD_WIDTH 21 + #elif IS_DWIN_MARLINUI + // Defined by header #else #define LCD_WIDTH TERN(IS_ULTIPANEL, 20, 16) #endif @@ -2734,6 +3296,8 @@ #ifndef LCD_HEIGHT #if HAS_MARLINUI_U8GLIB #define LCD_HEIGHT 5 + #elif IS_DWIN_MARLINUI + // Defined by header #else #define LCD_HEIGHT TERN(IS_ULTIPANEL, 4, 2) #endif @@ -2744,8 +3308,6 @@ #define HAS_ROTARY_ENCODER 1 #endif -#if !NUM_SERIAL - #undef BAUD_RATE_GCODE -#elif NUM_SERIAL > 1 - #define HAS_MULTI_SERIAL 1 +#if PIN_EXISTS(SAFE_POWER) && DISABLED(DISABLE_DRIVER_SAFE_POWER_PROTECT) + #define HAS_DRIVER_SAFE_POWER_PROTECT 1 #endif diff --git a/Marlin/src/inc/MarlinConfigPre.h b/Marlin/src/inc/MarlinConfigPre.h index dfa0adba1bd7..c090b7e37bc4 100644 --- a/Marlin/src/inc/MarlinConfigPre.h +++ b/Marlin/src/inc/MarlinConfigPre.h @@ -34,8 +34,8 @@ #include "../HAL/platforms.h" #endif -#include "../core/boards.h" #include "../core/macros.h" +#include "../core/boards.h" #include "../../Configuration.h" #ifdef CUSTOM_VERSION_FILE diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index b3beedfe80fd..856d0c44c7f2 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -34,12 +34,16 @@ #error "Marlin requires C++11 support (gcc >= 4.7, Arduino IDE >= 1.6.8). Please upgrade your toolchain." #endif +// Strings for sanity check messages +#define _LINEAR_AXES_STR LINEAR_AXIS_GANG("X ", "Y ", "Z ", "I ", "J ", "K ") +#define _LOGICAL_AXES_STR LOGICAL_AXIS_GANG("E ", "X ", "Y ", "Z ", "I ", "J ", "K ") + // Make sure macros aren't borked #define TEST1 #define TEST2 1 #define TEST3 0 #define TEST4 true -#if ENABLED(TEST0) || !ENABLED(TEST2) || ENABLED(TEST3) +#if ENABLED(TEST0) || !ENABLED(TEST2) || ENABLED(TEST3) || !ENABLED(TEST1, TEST2, TEST4) #error "ENABLED is borked!" #endif #if BOTH(TEST0, TEST1) @@ -60,18 +64,23 @@ #undef TEST4 /** - * We try our best to include sanity checks for all changed configuration - * directives because users have a tendency to use outdated config files with - * the bleeding-edge source code, but sometimes this is not enough. This check - * forces a minimum config file revision. Otherwise Marlin will not build. + * This is to alert you about non-matching versions of config files. + * + * You can edit the version tag in your old config files and try the build again. + * The checks below will alert you about options that need to be changed, but they won't + * tell you about new options that you might find useful. So it's recommended to transfer + * your settings to new Configuration files matching your Marlin version as soon as possible. */ #define HEXIFY(H) _CAT(0x,H) #if !defined(CONFIGURATION_H_VERSION) || HEXIFY(CONFIGURATION_H_VERSION) < HEXIFY(REQUIRED_CONFIGURATION_H_VERSION) - #error "You are using an old Configuration.h file, update it before building Marlin." + #error "Your Configuration.h file is for an old version of Marlin. Downgrade Marlin or upgrade your Configuration.h." +#elif HEXIFY(CONFIGURATION_H_VERSION) > HEXIFY(REQUIRED_CONFIGURATION_H_VERSION) + #error "Your Configuration.h file is for a newer version of Marlin. Upgrade Marlin or downgrade your Configuration.h." #endif - #if !defined(CONFIGURATION_ADV_H_VERSION) || HEXIFY(CONFIGURATION_ADV_H_VERSION) < HEXIFY(REQUIRED_CONFIGURATION_ADV_H_VERSION) - #error "You are using an old Configuration_adv.h file, update it before building Marlin." + #error "Your Configuration_adv.h file is for an old version of Marlin. Downgrade Marlin or upgrade your Configuration_adv.h." +#elif HEXIFY(CONFIGURATION_ADV_H_VERSION) > HEXIFY(REQUIRED_CONFIGURATION_ADV_H_VERSION) + #error "Your Configuration_adv.h file is for a newer version of Marlin. Upgrade Marlin or downgrade your Configuration_adv.h." #endif #undef HEXIFY @@ -131,7 +140,13 @@ #elif defined(DEFAULT_XYJERK) #error "DEFAULT_XYJERK is deprecated. Use DEFAULT_XJERK and DEFAULT_YJERK instead." #elif defined(XY_TRAVEL_SPEED) - #error "XY_TRAVEL_SPEED is deprecated. Use XY_PROBE_SPEED instead." + #error "XY_TRAVEL_SPEED is now XY_PROBE_FEEDRATE." +#elif defined(XY_PROBE_SPEED) + #error "XY_PROBE_SPEED is now XY_PROBE_FEEDRATE." +#elif defined(Z_PROBE_SPEED_FAST) + #error "Z_PROBE_SPEED_FAST is now Z_PROBE_FEEDRATE_FAST." +#elif defined(Z_PROBE_SPEED_SLOW) + #error "Z_PROBE_SPEED_SLOW is now Z_PROBE_FEEDRATE_SLOW." #elif defined(PROBE_SERVO_DEACTIVATION_DELAY) #error "PROBE_SERVO_DEACTIVATION_DELAY is deprecated. Use DEACTIVATE_SERVOS_AFTER_MOVE instead." #elif defined(SERVO_DEACTIVATION_DELAY) @@ -401,8 +416,19 @@ #error "MBL_Z_STEP is now MESH_EDIT_Z_STEP." #elif defined(CHDK) #error "CHDK is now CHDK_PIN." -#elif defined(MAX6675_SS) || defined(MAX6675_SS2) - #error "MAX6675_SS / MAX6675_SS2 is now MAX6675_SS_PIN / MAX6675_SS2_PIN." +#elif ANY_PIN( \ + MAX6675_SS, MAX6675_SS2, MAX6675_CS, MAX6675_CS2, \ + MAX31855_SS, MAX31855_SS2, MAX31855_CS, MAX31855_CS2, \ + MAX31865_SS, MAX31865_SS2, MAX31865_CS, MAX31865_CS2) + #warning "MAX*_SS_PIN, MAX*_SS2_PIN, MAX*_CS_PIN, and MAX*_CS2_PIN are deprecated and will be removed in a future version. Please use TEMP_0_CS_PIN/TEMP_1_CS_PIN instead." +#elif ANY_PIN(MAX6675_SCK, MAX31855_SCK, MAX31865_SCK) + #warning "MAX*_SCK_PIN is deprecated and will be removed in a future version. Please use TEMP_0_SCK_PIN/TEMP_1_SCK_PIN instead." +#elif ANY_PIN(MAX6675_MISO, MAX6675_DO, MAX31855_MISO, MAX31855_DO, MAX31865_MISO, MAX31865_DO) + #warning "MAX*_MISO_PIN and MAX*_DO_PIN are deprecated and will be removed in a future version. Please use TEMP_0_MISO_PIN/TEMP_1_MISO_PIN instead." +#elif PIN_EXISTS(MAX31865_MOSI) + #warning "MAX31865_MOSI_PIN is deprecated and will be removed in a future version. Please use TEMP_0_MOSI_PIN/TEMP_1_MOSI_PIN instead." +#elif ANY_PIN(THERMO_CS1_PIN, THERMO_CS2_PIN, THERMO_DO_PIN, THERMO_SCK_PIN) + #error "THERMO_*_PIN is now TEMP_n_CS_PIN, TEMP_n_SCK_PIN, TEMP_n_MOSI_PIN, TEMP_n_MISO_PIN." #elif defined(MAX31865_SENSOR_OHMS) #error "MAX31865_SENSOR_OHMS is now MAX31865_SENSOR_OHMS_0." #elif defined(MAX31865_CALIBRATION_OHMS) @@ -431,6 +457,8 @@ #error "DUAL_NOZZLE_DUPLICATION_MODE is now MULTI_NOZZLE_DUPLICATION." #elif defined(MENU_ITEM_CASE_LIGHT) #error "MENU_ITEM_CASE_LIGHT is now CASE_LIGHT_MENU." +#elif defined(CASE_LIGHT_NEOPIXEL_COLOR) + #error "CASE_LIGHT_NEOPIXEL_COLOR is now CASE_LIGHT_DEFAULT_COLOR." #elif defined(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED) #error "ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED is now SD_ABORT_ON_ENDSTOP_HIT." #elif defined(LPC_SD_LCD) || defined(LPC_SD_ONBOARD) || defined(LPC_SD_CUSTOM_CABLE) @@ -539,11 +567,49 @@ #endif #elif defined(ASSISTED_TRAMMING_MENU_ITEM) #error "ASSISTED_TRAMMING_MENU_ITEM is deprecated and should be removed." -#endif +#elif defined(UNKNOWN_Z_NO_RAISE) + #error "UNKNOWN_Z_NO_RAISE is replaced by setting Z_IDLE_HEIGHT to Z_MAX_POS." +#elif defined(Z_AFTER_DEACTIVATE) + #error "Z_AFTER_DEACTIVATE is replaced by Z_IDLE_HEIGHT." +#elif defined(MEATPACK) + #error "MEATPACK is now enabled with MEATPACK_ON_SERIAL_PORT_1, MEATPACK_ON_SERIAL_PORT_2, etc." +#elif defined(CUSTOM_USER_MENUS) + #error "CUSTOM_USER_MENUS has been replaced by CUSTOM_MENU_MAIN and CUSTOM_MENU_CONFIG." +#elif defined(MKS_LCD12864) + #error "MKS_LCD12864 is now MKS_LCD12864A or MKS_LCD12864B." +#elif defined(DOGM_SD_PERCENT) + #error "DOGM_SD_PERCENT is now SHOW_SD_PERCENT." +#elif defined(NEOPIXEL_BKGD_LED_INDEX) + #error "NEOPIXEL_BKGD_LED_INDEX is now NEOPIXEL_BKGD_INDEX_FIRST." +#elif defined(TEMP_SENSOR_1_AS_REDUNDANT) + #error "TEMP_SENSOR_1_AS_REDUNDANT is now TEMP_SENSOR_REDUNDANT, with associated TEMP_SENSOR_REDUNDANT_* config." +#elif defined(MAX_REDUNDANT_TEMP_SENSOR_DIFF) + #error "MAX_REDUNDANT_TEMP_SENSOR_DIFF is now TEMP_SENSOR_REDUNDANT_MAX_DIFF" +#elif defined(LCD_ALEPHOBJECTS_CLCD_UI) + #error "LCD_ALEPHOBJECTS_CLCD_UI is now LCD_LULZBOT_CLCD_UI." +#elif defined(MIN_ARC_SEGMENTS) + #error "MIN_ARC_SEGMENTS is now MIN_CIRCLE_SEGMENTS." +#elif defined(ARC_SEGMENTS_PER_R) + #error "ARC_SUPPORT no longer uses ARC_SEGMENTS_PER_R." +#elif ENABLED(ARC_SUPPORT) && (!defined(MIN_ARC_SEGMENT_MM) || !defined(MAX_ARC_SEGMENT_MM)) + #error "ARC_SUPPORT now requires MIN_ARC_SEGMENT_MM and MAX_ARC_SEGMENT_MM." +#elif defined(SPINDLE_LASER_PWM) + #error "SPINDLE_LASER_PWM (true) is now set with SPINDLE_LASER_USE_PWM (enabled)." +#endif + +#if MB(DUE3DOM_MINI) && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) + #warning "Onboard temperature sensor for BOARD_DUE3DOM_MINI has moved from TEMP_SENSOR_2 (TEMP_2_PIN) to TEMP_SENSOR_BOARD (TEMP_BOARD_PIN)." +#elif MB(BTT_SKR_E3_TURBO) && PIN_EXISTS(TEMP_2) && DISABLED(TEMP_SENSOR_BOARD) + #warning "Onboard temperature sensor for BOARD_BTT_SKR_E3_TURBO has moved from TEMP_SENSOR_2 (TEMP_2_PIN) to TEMP_SENSOR_BOARD (TEMP_BOARD_PIN)." +#endif + +constexpr float arm[] = AXIS_RELATIVE_MODES; +static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _LOGICAL_AXES_STR "elements."); /** * Probe temp compensation requirements */ + #if ENABLED(PROBE_TEMP_COMPENSATION) #if defined(PTC_PARK_POS_X) || defined(PTC_PARK_POS_Y) || defined(PTC_PARK_POS_Z) #error "PTC_PARK_POS_[XYZ] is now PTC_PARK_POS (array)." @@ -554,6 +620,32 @@ #elif !defined(PTC_PROBE_POS) #error "PROBE_TEMP_COMPENSATION requires PTC_PROBE_POS." #endif + + #ifdef PTC_SAMPLE_START + constexpr auto _ptc_sample_start = PTC_SAMPLE_START; + constexpr decltype(_ptc_sample_start) _test_ptc_sample_start = 12.3f; + static_assert(_test_ptc_sample_start != 12.3f, "PTC_SAMPLE_START must be a whole number."); + #endif + #ifdef PTC_SAMPLE_RES + constexpr auto _ptc_sample_res = PTC_SAMPLE_RES; + constexpr decltype(_ptc_sample_res) _test_ptc_sample_res = 12.3f; + static_assert(_test_ptc_sample_res != 12.3f, "PTC_SAMPLE_RES must be a whole number."); + #endif + #ifdef BTC_SAMPLE_START + constexpr auto _btc_sample_start = BTC_SAMPLE_START; + constexpr decltype(_btc_sample_start) _test_btc_sample_start = 12.3f; + static_assert(_test_btc_sample_start != 12.3f, "BTC_SAMPLE_START must be a whole number."); + #endif + #ifdef BTC_SAMPLE_RES + constexpr auto _btc_sample_res = BTC_SAMPLE_RES; + constexpr decltype(_btc_sample_res) _test_btc_sample_res = 12.3f; + static_assert(_test_btc_sample_res != 12.3f, "BTC_SAMPLE_RES must be a whole number."); + #endif + #ifdef BTC_PROBE_TEMP + constexpr auto _btc_probe_temp = BTC_PROBE_TEMP; + constexpr decltype(_btc_probe_temp) _test_btc_probe_temp = 12.3f; + static_assert(_test_btc_probe_temp != 12.3f, "BTC_PROBE_TEMP must be a whole number."); + #endif #endif /** @@ -584,6 +676,14 @@ #error "SERIAL_PORT must be defined." #elif defined(SERIAL_PORT_2) && SERIAL_PORT_2 == SERIAL_PORT #error "SERIAL_PORT_2 cannot be the same as SERIAL_PORT." +#elif defined(SERIAL_PORT_3) + #ifndef SERIAL_PORT_2 + #error "Use SERIAL_PORT_2 before using SERIAL_PORT_3" + #elif SERIAL_PORT_3 == SERIAL_PORT + #error "SERIAL_PORT_3 cannot be the same as SERIAL_PORT." + #elif SERIAL_PORT_3 == SERIAL_PORT_2 + #error "SERIAL_PORT_3 cannot be the same as SERIAL_PORT_2." + #endif #endif #if !(defined(__AVR__) && defined(USBCON)) #if ENABLED(SERIAL_XON_XOFF) && RX_BUFFER_SIZE < 1024 @@ -611,14 +711,18 @@ #if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !GOOD_AXIS_PINS(Y) #error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins to be defined." -#elif !WITHIN(NUM_Z_STEPPER_DRIVERS, 1, 4) - #error "NUM_Z_STEPPER_DRIVERS must be an integer from 1 to 4." -#elif NUM_Z_STEPPER_DRIVERS == 2 && !GOOD_AXIS_PINS(Z2) - #error "If NUM_Z_STEPPER_DRIVERS is 2, you must define stepper pins for Z2." -#elif NUM_Z_STEPPER_DRIVERS == 3 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3)) - #error "If NUM_Z_STEPPER_DRIVERS is 3, you must define stepper pins for Z2 and Z3." -#elif NUM_Z_STEPPER_DRIVERS == 4 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3) && GOOD_AXIS_PINS(Z4)) - #error "If NUM_Z_STEPPER_DRIVERS is 4, you must define stepper pins for Z2, Z3, and Z4." +#endif + +#if HAS_Z_AXIS + #if !WITHIN(NUM_Z_STEPPER_DRIVERS, 1, 4) + #error "NUM_Z_STEPPER_DRIVERS must be an integer from 1 to 4." + #elif NUM_Z_STEPPER_DRIVERS == 2 && !GOOD_AXIS_PINS(Z2) + #error "If NUM_Z_STEPPER_DRIVERS is 2, you must define stepper pins for Z2." + #elif NUM_Z_STEPPER_DRIVERS == 3 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3)) + #error "If NUM_Z_STEPPER_DRIVERS is 3, you must define stepper pins for Z2 and Z3." + #elif NUM_Z_STEPPER_DRIVERS == 4 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3) && GOOD_AXIS_PINS(Z4)) + #error "If NUM_Z_STEPPER_DRIVERS is 4, you must define stepper pins for Z2, Z3, and Z4." + #endif #endif /** @@ -671,6 +775,12 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "Enable only one of ENDSTOPPULLUP_Y_MIN or ENDSTOPPULLDOWN_Y_MIN." #elif BOTH(ENDSTOPPULLUP_ZMIN, ENDSTOPPULLDOWN_ZMIN) #error "Enable only one of ENDSTOPPULLUP_Z_MIN or ENDSTOPPULLDOWN_Z_MIN." +#elif BOTH(ENDSTOPPULLUP_IMIN, ENDSTOPPULLDOWN_IMIN) + #error "Enable only one of ENDSTOPPULLUP_I_MIN or ENDSTOPPULLDOWN_I_MIN." +#elif BOTH(ENDSTOPPULLUP_JMIN, ENDSTOPPULLDOWN_JMIN) + #error "Enable only one of ENDSTOPPULLUP_J_MIN or ENDSTOPPULLDOWN_J_MIN." +#elif BOTH(ENDSTOPPULLUP_KMIN, ENDSTOPPULLDOWN_KMIN) + #error "Enable only one of ENDSTOPPULLUP_K_MIN or ENDSTOPPULLDOWN_K_MIN." #endif /** @@ -699,10 +809,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #elif PROGRESS_MSG_EXPIRE < 0 #error "PROGRESS_MSG_EXPIRE must be greater than or equal to 0." #endif -#elif ENABLED(LCD_SET_PROGRESS_MANUALLY) - #if NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI) - #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, or EXTENSIBLE_UI." - #endif +#elif ENABLED(LCD_SET_PROGRESS_MANUALLY) && NONE(HAS_MARLINUI_U8GLIB, HAS_GRAPHICAL_TFT, HAS_MARLINUI_HD44780, EXTENSIBLE_UI, HAS_DWIN_E3V2, IS_DWIN_MARLINUI) + #error "LCD_SET_PROGRESS_MANUALLY requires LCD_PROGRESS_BAR, Character LCD, Graphical LCD, TFT, DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_*, OR EXTENSIBLE_UI." #endif #if ENABLED(USE_M73_REMAINING_TIME) && DISABLED(LCD_SET_PROGRESS_MANUALLY) @@ -729,6 +837,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "LIGHTWEIGHT_UI requires a U8GLIB_ST7920-based display." #endif +/** + * SD Card Settings + */ +#if ALL(SDSUPPORT, ELB_FULL_GRAPHIC_CONTROLLER, HAS_LCD_MENU) && PIN_EXISTS(SD_DETECT) && SD_DETECT_STATE != HIGH && (SD_CONNECTION_IS(LCD) || !defined(SDCARD_CONNECTION)) + #error "SD_DETECT_STATE must be set HIGH for SD on the ELB_FULL_GRAPHIC_CONTROLLER." +#endif + /** * SD File Sorting */ @@ -785,7 +900,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "MESH_BED_LEVELING and BABYSTEP_ZPROBE_OFFSET is not a valid combination" #elif ENABLED(BABYSTEP_ZPROBE_OFFSET) && !HAS_BED_PROBE #error "BABYSTEP_ZPROBE_OFFSET requires a probe." - #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && !HAS_MARLINUI_U8GLIB + #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && NONE(HAS_MARLINUI_U8GLIB, IS_DWIN_MARLINUI) #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a Graphical LCD." #elif ENABLED(BABYSTEP_ZPROBE_GFX_OVERLAY) && DISABLED(BABYSTEP_ZPROBE_OFFSET) #error "BABYSTEP_ZPROBE_GFX_OVERLAY requires a BABYSTEP_ZPROBE_OFFSET." @@ -811,26 +926,24 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #if HAS_FILAMENT_SENSOR #if !PIN_EXISTS(FIL_RUNOUT) #error "FILAMENT_RUNOUT_SENSOR requires FIL_RUNOUT_PIN." - #elif NUM_RUNOUT_SENSORS > E_STEPPERS - #if HAS_PRUSA_MMU2 + #elif HAS_PRUSA_MMU2 && NUM_RUNOUT_SENSORS != 1 #error "NUM_RUNOUT_SENSORS must be 1 with MMU2 / MMU2S." - #else - #error "NUM_RUNOUT_SENSORS cannot exceed the number of E steppers." - #endif - #elif NUM_RUNOUT_SENSORS >= 2 && !PIN_EXISTS(FIL_RUNOUT2) - #error "FIL_RUNOUT2_PIN is required with NUM_RUNOUT_SENSORS >= 2." - #elif NUM_RUNOUT_SENSORS >= 3 && !PIN_EXISTS(FIL_RUNOUT3) - #error "FIL_RUNOUT3_PIN is required with NUM_RUNOUT_SENSORS >= 3." - #elif NUM_RUNOUT_SENSORS >= 4 && !PIN_EXISTS(FIL_RUNOUT4) - #error "FIL_RUNOUT4_PIN is required with NUM_RUNOUT_SENSORS >= 4." - #elif NUM_RUNOUT_SENSORS >= 5 && !PIN_EXISTS(FIL_RUNOUT5) - #error "FIL_RUNOUT5_PIN is required with NUM_RUNOUT_SENSORS >= 5." - #elif NUM_RUNOUT_SENSORS >= 6 && !PIN_EXISTS(FIL_RUNOUT6) - #error "FIL_RUNOUT6_PIN is required with NUM_RUNOUT_SENSORS >= 6." - #elif NUM_RUNOUT_SENSORS >= 7 && !PIN_EXISTS(FIL_RUNOUT7) - #error "FIL_RUNOUT7_PIN is required with NUM_RUNOUT_SENSORS >= 7." + #elif NUM_RUNOUT_SENSORS != 1 && NUM_RUNOUT_SENSORS != E_STEPPERS + #error "NUM_RUNOUT_SENSORS must be either 1 or number of E steppers." #elif NUM_RUNOUT_SENSORS >= 8 && !PIN_EXISTS(FIL_RUNOUT8) #error "FIL_RUNOUT8_PIN is required with NUM_RUNOUT_SENSORS >= 8." + #elif NUM_RUNOUT_SENSORS >= 7 && !PIN_EXISTS(FIL_RUNOUT7) + #error "FIL_RUNOUT7_PIN is required with NUM_RUNOUT_SENSORS >= 7." + #elif NUM_RUNOUT_SENSORS >= 6 && !PIN_EXISTS(FIL_RUNOUT6) + #error "FIL_RUNOUT6_PIN is required with NUM_RUNOUT_SENSORS >= 6." + #elif NUM_RUNOUT_SENSORS >= 5 && !PIN_EXISTS(FIL_RUNOUT5) + #error "FIL_RUNOUT5_PIN is required with NUM_RUNOUT_SENSORS >= 5." + #elif NUM_RUNOUT_SENSORS >= 4 && !PIN_EXISTS(FIL_RUNOUT4) + #error "FIL_RUNOUT4_PIN is required with NUM_RUNOUT_SENSORS >= 4." + #elif NUM_RUNOUT_SENSORS >= 3 && !PIN_EXISTS(FIL_RUNOUT3) + #error "FIL_RUNOUT3_PIN is required with NUM_RUNOUT_SENSORS >= 3." + #elif NUM_RUNOUT_SENSORS >= 2 && !PIN_EXISTS(FIL_RUNOUT2) + #error "FIL_RUNOUT2_PIN is required with NUM_RUNOUT_SENSORS >= 2." #elif BOTH(FIL_RUNOUT1_PULLUP, FIL_RUNOUT1_PULLDOWN) #error "You can't enable FIL_RUNOUT1_PULLUP and FIL_RUNOUT1_PULLDOWN at the same time." #elif BOTH(FIL_RUNOUT2_PULLUP, FIL_RUNOUT2_PULLDOWN) @@ -888,6 +1001,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS static_assert(WITHIN(npp_xyz.z, Z_MIN_POS, Z_MAX_POS), "NOZZLE_PARK_POINT.Z is out of bounds (Z_MIN_POS, Z_MAX_POS)."); #endif +/** + * Instant Freeze + */ +#if ENABLED(FREEZE_FEATURE) && !PIN_EXISTS(FREEZE) + #error "FREEZE_FEATURE requires a FREEZE_PIN to be defined." +#endif + /** * Individual axis homing is useless for DELTAS */ @@ -906,15 +1026,21 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "PRUSA_MMU2 is obsolete. Define MMU_MODEL as PRUSA_MMU2 instead." #elif ENABLED(PRUSA_MMU2_S_MODE) #error "PRUSA_MMU2_S_MODE is obsolete. Define MMU_MODEL as PRUSA_MMU2S instead." +#elif ENABLED(SMUFF_EMU_MMU2) + #error "SMUFF_EMU_MMU2 is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2 instead." +#elif ENABLED(SMUFF_EMU_MMU2S) + #error "SMUFF_EMU_MMU2S is obsolete. Define MMU_MODEL as EXTENDABLE_EMU_MMU2S instead." #endif /** - * Multi-Material-Unit 2 / SMUFF requirements + * Multi-Material-Unit 2 / EXTENDABLE_EMU_MMU2 requirements */ #if HAS_PRUSA_MMU2 - #if EXTRUDERS != 5 + #if !HAS_EXTENDABLE_MMU && EXTRUDERS != 5 #undef SINGLENOZZLE #error "PRUSA_MMU2(S) requires exactly 5 EXTRUDERS. Please update your Configuration." + #elif HAS_EXTENDABLE_MMU && EXTRUDERS > 15 + #error "EXTRUDERS is too large for MMU(S) emulation mode. The maximum value is 15." #elif DISABLED(NOZZLE_PARK_FEATURE) #error "PRUSA_MMU2(S) requires NOZZLE_PARK_FEATURE. Enable it to continue." #elif HAS_PRUSA_MMU2S && DISABLED(FILAMENT_RUNOUT_SENSOR) @@ -924,26 +1050,31 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #elif ENABLED(MMU_EXTRUDER_SENSOR) && !HAS_LCD_MENU #error "MMU_EXTRUDER_SENSOR requires an LCD supporting MarlinUI to be enabled." #elif DISABLED(ADVANCED_PAUSE_FEATURE) - static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2(S) / SMUFF_EMU_MMU2(S)."); + static_assert(nullptr == strstr(MMU2_FILAMENT_RUNOUT_SCRIPT, "M600"), "ADVANCED_PAUSE_FEATURE is required to use M600 with PRUSA_MMU2(S) / HAS_EXTENDABLE_MMU(S)."); #endif #endif -#if HAS_SMUFF && EXTRUDERS > 12 - #error "Too many extruders for SMUFF_EMU_MMU2(S). (12 maximum)." -#endif /** * Options only for EXTRUDERS > 1 */ #if HAS_MULTI_EXTRUDER - #if EXTRUDERS > 8 - #error "Marlin supports a maximum of 8 EXTRUDERS." + #if HAS_EXTENDABLE_MMU + #define MAX_EXTRUDERS 15 + #else + #define MAX_EXTRUDERS 8 #endif + static_assert(EXTRUDERS <= MAX_EXTRUDERS, "Marlin supports a maximum of " STRINGIFY(MAX_EXTRUDERS) " EXTRUDERS."); + #undef MAX_EXTRUDERS #if ENABLED(HEATERS_PARALLEL) #error "EXTRUDERS must be 1 with HEATERS_PARALLEL." #endif + #if ENABLED(STATUS_HOTEND_INVERTED) && NONE(STATUS_HOTEND_NUMBERLESS, STATUS_HOTEND_ANIM) + #error "With multiple hotends STATUS_HOTEND_INVERTED requires STATUS_HOTEND_ANIM or STATUS_HOTEND_NUMBERLESS." + #endif + #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) #ifndef TOOLCHANGE_FS_LENGTH #error "TOOLCHANGE_FILAMENT_SWAP requires TOOLCHANGE_FS_LENGTH." @@ -966,7 +1097,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "TOOLCHANGE_ZRAISE required for EXTRUDERS > 1." #endif -#elif HAS_PRUSA_MMU1 || HAS_SMUFF +#elif HAS_PRUSA_MMU1 || HAS_EXTENDABLE_MMU #error "Multi-Material-Unit requires 2 or more EXTRUDERS." @@ -1063,6 +1194,21 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "Please select either MIXING_EXTRUDER or SWITCHING_EXTRUDER, not both." #elif ENABLED(SINGLENOZZLE) #error "MIXING_EXTRUDER is incompatible with SINGLENOZZLE." + #elif ENABLED(DISABLE_INACTIVE_EXTRUDER) + #error "MIXING_EXTRUDER is incompatible with DISABLE_INACTIVE_EXTRUDER." + #endif +#endif + +/** + * Dual E Steppers requirements + */ +#if ENABLED(E_DUAL_STEPPER_DRIVERS) + #if EXTRUDERS > 1 + #error "E_DUAL_STEPPER_DRIVERS can only be used with EXTRUDERS set to 1." + #elif ENABLED(MIXING_EXTRUDER) + #error "E_DUAL_STEPPER_DRIVERS is incompatible with MIXING_EXTRUDER." + #elif ENABLED(SWITCHING_EXTRUDER) + #error "E_DUAL_STEPPER_DRIVERS is incompatible with SWITCHING_EXTRUDER." #endif #endif @@ -1076,6 +1222,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS ); #if ENABLED(S_CURVE_ACCELERATION) && DISABLED(EXPERIMENTAL_SCURVE) #error "LIN_ADVANCE and S_CURVE_ACCELERATION may not play well together! Enable EXPERIMENTAL_SCURVE to continue." + #elif ENABLED(DIRECT_STEPPING) + #error "DIRECT_STEPPING is incompatible with LIN_ADVANCE. Enable in external planner if possible." + #elif !HAS_JUNCTION_DEVIATION && defined(DEFAULT_EJERK) + static_assert(DEFAULT_EJERK >= 10, "It is strongly recommended to set DEFAULT_EJERK >= 10 when using LIN_ADVANCE."); #endif #endif @@ -1089,7 +1239,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * (Magnetic) Parking Extruder requirements */ -#if ANY(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) +#if EITHER(PARKING_EXTRUDER, MAGNETIC_PARKING_EXTRUDER) #if ENABLED(EXT_SOLENOID) #error "(MAGNETIC_)PARKING_EXTRUDER and EXT_SOLENOID are incompatible. (Pins are used twice.)" #elif EXTRUDERS != 2 @@ -1137,23 +1287,28 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif /** - * (Electro)magnetic Switching Toolhead requirements + * Magnetic / Electromagnetic Switching Toolhead requirements */ #if EITHER(MAGNETIC_SWITCHING_TOOLHEAD, ELECTROMAGNETIC_SWITCHING_TOOLHEAD) #ifndef SWITCHING_TOOLHEAD_Y_POS - #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_POS" + #error "(ELECTRO)?MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_POS" #elif !defined(SWITCHING_TOOLHEAD_X_POS) - #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_X_POS" - #elif !defined(SWITCHING_TOOLHEAD_Z_HOP) - #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Z_HOP." + #error "(ELECTRO)?MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_X_POS" #elif !defined(SWITCHING_TOOLHEAD_Y_CLEAR) - #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_CLEAR." - #elif ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) - #if ENABLED(EXT_SOLENOID) - #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD and EXT_SOLENOID are incompatible. (Pins are used twice.)" - #elif !PIN_EXISTS(SOL0) - #error "(ELECTRO)MAGNETIC_SWITCHING_TOOLHEAD requires SOL0_PIN." - #endif + #error "(ELECTRO)?MAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Y_CLEAR." + #endif +#endif + +/** + * Electromagnetic Switching Toolhead requirements + */ +#if ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + #if ENABLED(EXT_SOLENOID) + #error "ELECTROMAGNETIC_SWITCHING_TOOLHEAD and EXT_SOLENOID are incompatible. (Pins are used twice.)" + #elif !PIN_EXISTS(SOL0) + #error "ELECTROMAGNETIC_SWITCHING_TOOLHEAD requires SOL0_PIN." + #elif !defined(SWITCHING_TOOLHEAD_Z_HOP) + #error "ELECTROMAGNETIC_SWITCHING_TOOLHEAD requires SWITCHING_TOOLHEAD_Z_HOP." #endif #endif @@ -1185,8 +1340,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Servo deactivation depends on servo endstops, switching nozzle, or switching extruder */ -#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && !HAS_Z_SERVO_PROBE && !defined(SWITCHING_NOZZLE_SERVO_NR) && !defined(SWITCHING_EXTRUDER_SERVO_NR) && !defined(SWITCHING_TOOLHEAD_SERVO_NR) - #error "Z_PROBE_SERVO_NR, switching nozzle, switching toolhead or switching extruder is required for DEACTIVATE_SERVOS_AFTER_MOVE." +#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE) && NONE(HAS_Z_SERVO_PROBE, POLARGRAPH) && !defined(SWITCHING_NOZZLE_SERVO_NR) && !defined(SWITCHING_EXTRUDER_SERVO_NR) && !defined(SWITCHING_TOOLHEAD_SERVO_NR) + #error "Z_PROBE_SERVO_NR, switching nozzle, switching toolhead, switching extruder, or POLARGRAPH is required for DEACTIVATE_SERVOS_AFTER_MOVE." #endif /** @@ -1203,6 +1358,78 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "To use BED_LIMIT_SWITCHING you must disable PIDTEMPBED." #endif +/** + * Synchronous M106/M107 checks + */ +#if ENABLED(LASER_SYNCHRONOUS_M106_M107) + #if FAN_KICKSTART_TIME + #error "FAN_KICKSTART_TIME must be 0 with LASER_SYNCHRONOUS_M106_M107 (because the laser will always come on at FULL power)." + #elif FAN_MIN_PWM + #error "FAN_MIN_PWM must be 0 with LASER_SYNCHRONOUS_M106_M107 (otherwise the laser will never turn OFF)." + #endif +#endif + +/** + * Chamber Heating Options - PID vs Limit Switching + */ +#if BOTH(PIDTEMPCHAMBER, CHAMBER_LIMIT_SWITCHING) + #error "To use CHAMBER_LIMIT_SWITCHING you must disable PIDTEMPCHAMBER." +#endif + +/** + * Features that require a min/max/specific LINEAR_AXES + */ +#if HAS_LEVELING && !HAS_Z_AXIS + #error "Leveling in Marlin requires three or more axes, with Z as the vertical axis." +#elif ENABLED(CNC_WORKSPACE_PLANES) && !HAS_Z_AXIS + #error "CNC_WORKSPACE_PLANES currently requires LINEAR_AXES >= 3" +#elif ENABLED(DIRECT_STEPPING) && LINEAR_AXES > XYZ + #error "DIRECT_STEPPING currently requires LINEAR_AXES 3" +#elif ENABLED(FOAMCUTTER_XYUV) && LINEAR_AXES < 5 + #error "FOAMCUTTER_XYUV requires LINEAR_AXES >= 5." +#endif + +/** + * Allow only extra axis codes that do not conflict with G-code parameter names + */ +#if LINEAR_AXES >= 4 + #if AXIS4_NAME != 'A' && AXIS4_NAME != 'B' && AXIS4_NAME != 'C' && AXIS4_NAME != 'U' && AXIS4_NAME != 'V' && AXIS4_NAME != 'W' + #error "AXIS4_NAME can only be one of 'A', 'B', 'C', 'U', 'V', or 'W'." + #elif !defined(I_MIN_POS) || !defined(I_MAX_POS) + #error "I_MIN_POS and I_MAX_POS are required with LINEAR_AXES >= 4." + #elif !defined(I_HOME_DIR) + #error "I_HOME_DIR is required with LINEAR_AXES >= 4." + #elif HAS_I_ENABLE && !defined(I_ENABLE_ON) + #error "I_ENABLE_ON is required for your I driver with LINEAR_AXES >= 4." + #endif +#endif +#if LINEAR_AXES >= 5 + #if AXIS5_NAME == AXIS4_NAME + #error "AXIS5_NAME must be unique." + #elif AXIS5_NAME != 'A' && AXIS5_NAME != 'B' && AXIS5_NAME != 'C' && AXIS5_NAME != 'U' && AXIS5_NAME != 'V' && AXIS5_NAME != 'W' + #error "AXIS5_NAME can only be one of 'A', 'B', 'C', 'U', 'V', or 'W'." + #elif !defined(J_MIN_POS) || !defined(J_MAX_POS) + #error "J_MIN_POS and J_MAX_POS are required with LINEAR_AXES >= 5." + #elif !defined(J_HOME_DIR) + #error "J_HOME_DIR is required with LINEAR_AXES >= 5." + #elif HAS_J_ENABLE && !defined(J_ENABLE_ON) + #error "J_ENABLE_ON is required for your J driver with LINEAR_AXES >= 5." + #endif +#endif +#if LINEAR_AXES >= 6 + #if AXIS6_NAME == AXIS5_NAME || AXIS6_NAME == AXIS4_NAME + #error "AXIS6_NAME must be unique." + #elif AXIS6_NAME != 'A' && AXIS6_NAME != 'B' && AXIS6_NAME != 'C' && AXIS6_NAME != 'U' && AXIS6_NAME != 'V' && AXIS6_NAME != 'W' + #error "AXIS6_NAME can only be one of 'A', 'B', 'C', 'U', 'V', or 'W'." + #elif !defined(K_MIN_POS) || !defined(K_MAX_POS) + #error "K_MIN_POS and K_MAX_POS are required with LINEAR_AXES >= 6." + #elif !defined(K_HOME_DIR) + #error "K_HOME_DIR is required with LINEAR_AXES >= 6." + #elif HAS_K_ENABLE && !defined(K_ENABLE_ON) + #error "K_ENABLE_ON is required for your K driver with LINEAR_AXES >= 6." + #endif +#endif + /** * Kinematics */ @@ -1210,8 +1437,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS /** * Allow only one kinematic type to be defined */ -#if MANY(DELTA, MORGAN_SCARA, COREXY, COREXZ, COREYZ, COREYX, COREZX, COREZY, MARKFORGED_XY) - #error "Please enable only one of DELTA, MORGAN_SCARA, COREXY, COREYX, COREXZ, COREZX, COREYZ, COREZY, or MARKFORGED_XY." +#if MANY(DELTA, MORGAN_SCARA, MP_SCARA, AXEL_TPARA, COREXY, COREXZ, COREYZ, COREYX, COREZX, COREZY, MARKFORGED_XY, FOAMCUTTER_XYUV) + #error "Please enable only one of DELTA, MORGAN_SCARA, MP_SCARA, AXEL_TPARA, COREXY, COREXZ, COREYZ, COREYX, COREZX, COREZY, MARKFORGED_XY, or FOAMCUTTER_XYUV." #endif /** @@ -1226,10 +1453,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "DELTA_AUTO_CALIBRATION requires a probe or LCD Controller." #elif ENABLED(DELTA_CALIBRATION_MENU) && !HAS_LCD_MENU #error "DELTA_CALIBRATION_MENU requires an LCD Controller." - #elif ABL_GRID - #if (GRID_MAX_POINTS_X & 1) == 0 || (GRID_MAX_POINTS_Y & 1) == 0 + #elif ABL_USES_GRID + #if ((GRID_MAX_POINTS_X) & 1) == 0 || ((GRID_MAX_POINTS_Y) & 1) == 0 #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be odd numbers." - #elif GRID_MAX_POINTS_X < 3 + #elif (GRID_MAX_POINTS_X) < 3 #error "DELTA requires GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y to be 3 or higher." #endif #endif @@ -1242,6 +1469,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "CLASSIC_JERK is required for DELTA and SCARA." #endif +/** + * Some things should not be used on Belt Printers + */ +#if BOTH(BELTPRINTER, HAS_LEVELING) + #error "Bed Leveling is not compatible with BELTPRINTER." +#endif + /** * Probes */ @@ -1295,10 +1529,34 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #if ENABLED(BLTOUCH) + + // BLTouch can't run in 5V mode with a 3.3V probe pin + #if ENABLED(BLTOUCH_SET_5V_MODE) + #define _5V(P,A,B) WITHIN(P,A,B) + #ifdef STM32F1 // STM32F103 5V-tolerant pins + #define _IS_5V_TOLERANT(P) (_5V(P,PA8,PA15) || _5V(P,PB2,PB15) || _5V(P,PC6,PC12) || _5V(P,PD0,PD15) || _5V(P,PE0,PE15) || _5V(P,PF0,PF5) || _5V(P,PF11,PF15)) + #elif defined(ARDUINO_ARCH_SAM) + #define _IS_5V_TOLERANT(P) 0 // Assume no 5V tolerance + #else + #define _IS_5V_TOLERANT(P) 1 // Assume 5V tolerance + #endif + #if USES_Z_MIN_PROBE_PIN && !_IS_5V_TOLERANT(Z_MIN_PROBE_PIN) + #error "BLTOUCH_SET_5V_MODE is not compatible with the Z_MIN_PROBE_PIN." + #elif !_IS_5V_TOLERANT(Z_MIN_PIN) + #error "BLTOUCH_SET_5V_MODE is not compatible with the Z_MIN_PIN." + #endif + #undef _IS_5V_TOLERANT + #undef _5V + #elif NONE(ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN, ENDSTOPPULLUP_ZMIN_PROBE) + #if USES_Z_MIN_PROBE_PIN + #error "BLTOUCH on Z_MIN_PROBE_PIN requires ENDSTOPPULLUP_ZMIN_PROBE, ENDSTOPPULLUPS, or BLTOUCH_SET_5V_MODE." + #else + #error "BLTOUCH on Z_MIN_PIN requires ENDSTOPPULLUP_ZMIN, ENDSTOPPULLUPS, or BLTOUCH_SET_5V_MODE." + #endif + #endif + #if BLTOUCH_DELAY < 200 #error "BLTOUCH_DELAY less than 200 is unsafe and is not supported." - #elif DISABLED(BLTOUCH_SET_5V_MODE) && NONE(ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN, ENDSTOPPULLUP_ZMIN_PROBE) - #error "BLTOUCH without BLTOUCH_SET_5V_MODE requires ENDSTOPPULLUPS, ENDSTOPPULLUP_ZMIN or ENDSTOPPULLUP_ZMIN_PROBE." #endif #endif @@ -1482,7 +1740,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS // Mesh Bed Leveling #if ENABLED(DELTA) #error "MESH_BED_LEVELING is not compatible with DELTA printers." - #elif GRID_MAX_POINTS_X > 9 || GRID_MAX_POINTS_Y > 9 + #elif (GRID_MAX_POINTS_X) > 9 || (GRID_MAX_POINTS_Y) > 9 #error "GRID_MAX_POINTS_X and GRID_MAX_POINTS_Y must be less than 10 for MBL." #endif @@ -1497,33 +1755,35 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif #if ENABLED(G26_MESH_VALIDATION) - #if !EXTRUDERS + #if !HAS_EXTRUDERS #error "G26_MESH_VALIDATION requires at least one extruder." #elif !HAS_MESH #error "G26_MESH_VALIDATION requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, or AUTO_BED_LEVELING_UBL." #endif #endif -#if ENABLED(MESH_EDIT_GFX_OVERLAY) && !BOTH(AUTO_BED_LEVELING_UBL, HAS_MARLINUI_U8GLIB) - #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL and a Graphical LCD." +#if ENABLED(MESH_EDIT_GFX_OVERLAY) + #if DISABLED(AUTO_BED_LEVELING_UBL) + #error "MESH_EDIT_GFX_OVERLAY requires AUTO_BED_LEVELING_UBL." + #elif NONE(HAS_MARLINUI_U8GLIB, IS_DWIN_MARLINUI) + #error "MESH_EDIT_GFX_OVERLAY requires a Graphical LCD." + #endif #endif -#if ENABLED(G29_RETRY_AND_RECOVER) - #if ENABLED(AUTO_BED_LEVELING_UBL) - #error "G29_RETRY_AND_RECOVER is not compatible with UBL." - #elif ENABLED(MESH_BED_LEVELING) - #error "G29_RETRY_AND_RECOVER is not compatible with MESH_BED_LEVELING." - #endif +#if ENABLED(G29_RETRY_AND_RECOVER) && NONE(AUTO_BED_LEVELING_3POINT, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_BILINEAR) + #error "G29_RETRY_AND_RECOVER requires AUTO_BED_LEVELING_3POINT, LINEAR, or BILINEAR." #endif /** * LCD_BED_LEVELING requirements */ #if ENABLED(LCD_BED_LEVELING) - #if !HAS_LCD_MENU - #error "LCD_BED_LEVELING requires a programmable LCD controller." + #if NONE(HAS_LCD_MENU, DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_ENHANCED) + #error "LCD_BED_LEVELING is not supported by the selected LCD controller." #elif !(ENABLED(MESH_BED_LEVELING) || HAS_ABL_NOT_UBL) #error "LCD_BED_LEVELING requires MESH_BED_LEVELING or AUTO_BED_LEVELING." + #elif ENABLED(MESH_EDIT_MENU) && !HAS_MESH + #error "MESH_EDIT_MENU requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR or AUTO_BED_LEVELING_UBL." #endif #endif @@ -1532,13 +1792,59 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #endif /** - * Homing + * Homing checks */ -constexpr float hbm[] = HOMING_BUMP_MM; -static_assert(COUNT(hbm) == XYZ, "HOMING_BUMP_MM requires X, Y, and Z elements."); -static_assert(hbm[X_AXIS] >= 0, "HOMING_BUMP_MM.X must be greater than or equal to 0."); -static_assert(hbm[Y_AXIS] >= 0, "HOMING_BUMP_MM.Y must be greater than or equal to 0."); -static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal to 0."); +#ifndef HOMING_BUMP_MM + #error "Required setting HOMING_BUMP_MM is missing!" +#elif !defined(HOMING_BUMP_DIVISOR) + #error "Required setting HOMING_BUMP_DIVISOR is missing!" +#else + constexpr float hbm[] = HOMING_BUMP_MM, hbd[] = HOMING_BUMP_DIVISOR; + static_assert(COUNT(hbm) == LINEAR_AXES, "HOMING_BUMP_MM must have " _LINEAR_AXES_STR "elements (and no others)."); + LINEAR_AXIS_CODE( + static_assert(hbm[X_AXIS] >= 0, "HOMING_BUMP_MM.X must be greater than or equal to 0."), + static_assert(hbm[Y_AXIS] >= 0, "HOMING_BUMP_MM.Y must be greater than or equal to 0."), + static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal to 0."), + static_assert(hbm[I_AXIS] >= 0, "HOMING_BUMP_MM.I must be greater than or equal to 0."), + static_assert(hbm[J_AXIS] >= 0, "HOMING_BUMP_MM.J must be greater than or equal to 0."), + static_assert(hbm[K_AXIS] >= 0, "HOMING_BUMP_MM.K must be greater than or equal to 0.") + ); + static_assert(COUNT(hbd) == LINEAR_AXES, "HOMING_BUMP_DIVISOR must have " _LINEAR_AXES_STR "elements (and no others)."); + LINEAR_AXIS_CODE( + static_assert(hbd[X_AXIS] >= 1, "HOMING_BUMP_DIVISOR.X must be greater than or equal to 1."), + static_assert(hbd[Y_AXIS] >= 1, "HOMING_BUMP_DIVISOR.Y must be greater than or equal to 1."), + static_assert(hbd[Z_AXIS] >= 1, "HOMING_BUMP_DIVISOR.Z must be greater than or equal to 1."), + static_assert(hbd[I_AXIS] >= 1, "HOMING_BUMP_DIVISOR.I must be greater than or equal to 1."), + static_assert(hbd[J_AXIS] >= 1, "HOMING_BUMP_DIVISOR.J must be greater than or equal to 1."), + static_assert(hbd[K_AXIS] >= 1, "HOMING_BUMP_DIVISOR.K must be greater than or equal to 1.") + ); +#endif + +#ifdef HOMING_BACKOFF_POST_MM + constexpr float hbp[] = HOMING_BACKOFF_POST_MM; + static_assert(COUNT(hbp) == LINEAR_AXES, "HOMING_BACKOFF_POST_MM must have " _LINEAR_AXES_STR "elements (and no others)."); + LINEAR_AXIS_CODE( + static_assert(hbp[X_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.X must be greater than or equal to 0."), + static_assert(hbp[Y_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.Y must be greater than or equal to 0."), + static_assert(hbp[Z_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.Z must be greater than or equal to 0."), + static_assert(hbp[I_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.I must be greater than or equal to 0."), + static_assert(hbp[J_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.J must be greater than or equal to 0."), + static_assert(hbp[K_AXIS] >= 0, "HOMING_BACKOFF_POST_MM.K must be greater than or equal to 0.") + ); +#endif + +#ifdef SENSORLESS_BACKOFF_MM + constexpr float sbm[] = SENSORLESS_BACKOFF_MM; + static_assert(COUNT(sbm) == LINEAR_AXES, "SENSORLESS_BACKOFF_MM must have " _LINEAR_AXES_STR "elements (and no others)."); + LINEAR_AXIS_CODE( + static_assert(sbm[X_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.X must be greater than or equal to 0."), + static_assert(sbm[Y_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Y must be greater than or equal to 0."), + static_assert(sbm[Z_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.Z must be greater than or equal to 0."), + static_assert(sbm[I_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.I must be greater than or equal to 0."), + static_assert(sbm[J_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.J must be greater than or equal to 0."), + static_assert(sbm[K_AXIS] >= 0, "SENSORLESS_BACKOFF_MM.K must be greater than or equal to 0.") + ); +#endif #if ENABLED(CODEPENDENT_XY_HOMING) #if ENABLED(QUICK_HOME) @@ -1559,9 +1865,9 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal /** * Make sure DISABLE_[XYZ] compatible with selected homing options */ -#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z) +#if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K) #if EITHER(HOME_AFTER_DEACTIVATE, Z_SAFE_HOMING) - #error "DISABLE_[XYZ] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING." + #error "DISABLE_[XYZIJK] is not compatible with HOME_AFTER_DEACTIVATE or Z_SAFE_HOMING." #endif #endif @@ -1624,7 +1930,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal * Allen Key * Deploying the Allen Key probe uses big moves in z direction. Too dangerous for an unhomed z-axis. */ -#if BOTH(Z_PROBE_ALLEN_KEY, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) && (Z_HOME_DIR < 0) +#if ALL(Z_HOME_TO_MIN, Z_PROBE_ALLEN_KEY, Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) #error "You can't home to a Z min endstop with a Z_PROBE_ALLEN_KEY." #endif @@ -1642,7 +1948,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "DUAL_X_CARRIAGE requires USE_XMAX_PLUG and an X Max Endstop." #elif !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) #error "DUAL_X_CARRIAGE requires X2_HOME_POS, X2_MIN_POS, and X2_MAX_POS." - #elif X_HOME_DIR != -1 || X2_HOME_DIR != 1 + #elif X_HOME_TO_MAX || X2_HOME_TO_MIN #error "DUAL_X_CARRIAGE requires X_HOME_DIR -1 and X2_HOME_DIR 1." #endif #endif @@ -1684,12 +1990,20 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #endif #endif +#ifdef REDUNDANT_PART_COOLING_FAN + #if FAN_COUNT < 2 + #error "REDUNDANT_PART_COOLING_FAN requires a board with at least two PWM fans." + #else + static_assert(WITHIN(REDUNDANT_PART_COOLING_FAN, 1, FAN_COUNT - 1), "REDUNDANT_PART_COOLING_FAN must be between 1 and " STRINGIFY(DECREMENT(FAN_COUNT)) "."); + #endif +#endif + /** * Case Light requirements */ -#if ENABLED(CASE_LIGHT_ENABLE) +#if NEED_CASE_LIGHT_PIN #if !PIN_EXISTS(CASE_LIGHT) - #error "CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN to be defined." + #error "CASE_LIGHT_ENABLE requires CASE_LIGHT_PIN, CASE_LIGHT_USE_NEOPIXEL, or CASE_LIGHT_USE_RGB_LED." #elif CASE_LIGHT_PIN == FAN_PIN #error "CASE_LIGHT_PIN conflicts with FAN_PIN. Resolve before continuing." #endif @@ -1698,55 +2012,145 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal /** * Required custom thermistor settings */ -#if HEATER_0_USER_THERMISTOR && !(defined(HOTEND0_PULLUP_RESISTOR_OHMS) && defined(HOTEND0_RESISTANCE_25C_OHMS) && defined(HOTEND0_BETA)) +#if TEMP_SENSOR_0_IS_CUSTOM && !(defined(HOTEND0_PULLUP_RESISTOR_OHMS) && defined(HOTEND0_RESISTANCE_25C_OHMS) && defined(HOTEND0_BETA)) #error "TEMP_SENSOR_0 1000 requires HOTEND0_PULLUP_RESISTOR_OHMS, HOTEND0_RESISTANCE_25C_OHMS and HOTEND0_BETA in Configuration_adv.h." -#elif HEATER_1_USER_THERMISTOR && !(defined(HOTEND1_PULLUP_RESISTOR_OHMS) && defined(HOTEND1_RESISTANCE_25C_OHMS) && defined(HOTEND1_BETA)) +#elif TEMP_SENSOR_1_IS_CUSTOM && !(defined(HOTEND1_PULLUP_RESISTOR_OHMS) && defined(HOTEND1_RESISTANCE_25C_OHMS) && defined(HOTEND1_BETA)) #error "TEMP_SENSOR_1 1000 requires HOTEND1_PULLUP_RESISTOR_OHMS, HOTEND1_RESISTANCE_25C_OHMS and HOTEND1_BETA in Configuration_adv.h." -#elif HEATER_2_USER_THERMISTOR && !(defined(HOTEND2_PULLUP_RESISTOR_OHMS) && defined(HOTEND2_RESISTANCE_25C_OHMS) && defined(HOTEND2_BETA)) +#elif TEMP_SENSOR_2_IS_CUSTOM && !(defined(HOTEND2_PULLUP_RESISTOR_OHMS) && defined(HOTEND2_RESISTANCE_25C_OHMS) && defined(HOTEND2_BETA)) #error "TEMP_SENSOR_2 1000 requires HOTEND2_PULLUP_RESISTOR_OHMS, HOTEND2_RESISTANCE_25C_OHMS and HOTEND2_BETA in Configuration_adv.h." -#elif HEATER_3_USER_THERMISTOR && !(defined(HOTEND3_PULLUP_RESISTOR_OHMS) && defined(HOTEND3_RESISTANCE_25C_OHMS) && defined(HOTEND3_BETA)) +#elif TEMP_SENSOR_3_IS_CUSTOM && !(defined(HOTEND3_PULLUP_RESISTOR_OHMS) && defined(HOTEND3_RESISTANCE_25C_OHMS) && defined(HOTEND3_BETA)) #error "TEMP_SENSOR_3 1000 requires HOTEND3_PULLUP_RESISTOR_OHMS, HOTEND3_RESISTANCE_25C_OHMS and HOTEND3_BETA in Configuration_adv.h." -#elif HEATER_4_USER_THERMISTOR && !(defined(HOTEND4_PULLUP_RESISTOR_OHMS) && defined(HOTEND4_RESISTANCE_25C_OHMS) && defined(HOTEND4_BETA)) +#elif TEMP_SENSOR_4_IS_CUSTOM && !(defined(HOTEND4_PULLUP_RESISTOR_OHMS) && defined(HOTEND4_RESISTANCE_25C_OHMS) && defined(HOTEND4_BETA)) #error "TEMP_SENSOR_4 1000 requires HOTEND4_PULLUP_RESISTOR_OHMS, HOTEND4_RESISTANCE_25C_OHMS and HOTEND4_BETA in Configuration_adv.h." -#elif HEATER_5_USER_THERMISTOR && !(defined(HOTEND5_PULLUP_RESISTOR_OHMS) && defined(HOTEND5_RESISTANCE_25C_OHMS) && defined(HOTEND5_BETA)) +#elif TEMP_SENSOR_5_IS_CUSTOM && !(defined(HOTEND5_PULLUP_RESISTOR_OHMS) && defined(HOTEND5_RESISTANCE_25C_OHMS) && defined(HOTEND5_BETA)) #error "TEMP_SENSOR_5 1000 requires HOTEND5_PULLUP_RESISTOR_OHMS, HOTEND5_RESISTANCE_25C_OHMS and HOTEND5_BETA in Configuration_adv.h." -#elif HEATER_6_USER_THERMISTOR && !(defined(HOTEND6_PULLUP_RESISTOR_OHMS) && defined(HOTEND6_RESISTANCE_25C_OHMS) && defined(HOTEND6_BETA)) +#elif TEMP_SENSOR_6_IS_CUSTOM && !(defined(HOTEND6_PULLUP_RESISTOR_OHMS) && defined(HOTEND6_RESISTANCE_25C_OHMS) && defined(HOTEND6_BETA)) #error "TEMP_SENSOR_6 1000 requires HOTEND6_PULLUP_RESISTOR_OHMS, HOTEND6_RESISTANCE_25C_OHMS and HOTEND6_BETA in Configuration_adv.h." -#elif HEATER_7_USER_THERMISTOR && !(defined(HOTEND7_PULLUP_RESISTOR_OHMS) && defined(HOTEND7_RESISTANCE_25C_OHMS) && defined(HOTEND7_BETA)) +#elif TEMP_SENSOR_7_IS_CUSTOM && !(defined(HOTEND7_PULLUP_RESISTOR_OHMS) && defined(HOTEND7_RESISTANCE_25C_OHMS) && defined(HOTEND7_BETA)) #error "TEMP_SENSOR_7 1000 requires HOTEND7_PULLUP_RESISTOR_OHMS, HOTEND7_RESISTANCE_25C_OHMS and HOTEND7_BETA in Configuration_adv.h." -#elif HEATER_BED_USER_THERMISTOR && !(defined(BED_PULLUP_RESISTOR_OHMS) && defined(BED_RESISTANCE_25C_OHMS) && defined(BED_BETA)) +#elif TEMP_SENSOR_BED_IS_CUSTOM && !(defined(BED_PULLUP_RESISTOR_OHMS) && defined(BED_RESISTANCE_25C_OHMS) && defined(BED_BETA)) #error "TEMP_SENSOR_BED 1000 requires BED_PULLUP_RESISTOR_OHMS, BED_RESISTANCE_25C_OHMS and BED_BETA in Configuration_adv.h." -#elif HEATER_CHAMBER_USER_THERMISTOR && !(defined(CHAMBER_PULLUP_RESISTOR_OHMS) && defined(CHAMBER_RESISTANCE_25C_OHMS) && defined(CHAMBER_BETA)) +#elif TEMP_SENSOR_CHAMBER_IS_CUSTOM && !(defined(CHAMBER_PULLUP_RESISTOR_OHMS) && defined(CHAMBER_RESISTANCE_25C_OHMS) && defined(CHAMBER_BETA)) #error "TEMP_SENSOR_CHAMBER 1000 requires CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS and CHAMBER_BETA in Configuration_adv.h." -#endif - -/** +#elif TEMP_SENSOR_PROBE_IS_CUSTOM && !(defined(PROBE_PULLUP_RESISTOR_OHMS) && defined(PROBE_RESISTANCE_25C_OHMS) && defined(PROBE_BETA)) + #error "TEMP_SENSOR_PROBE 1000 requires PROBE_PULLUP_RESISTOR_OHMS, PROBE_RESISTANCE_25C_OHMS and PROBE_BETA in Configuration_adv.h." +#elif TEMP_SENSOR_BOARD_IS_CUSTOM && !(defined(BOARD_PULLUP_RESISTOR_OHMS) && defined(BOARD_RESISTANCE_25C_OHMS) && defined(BOARD_BETA)) + #error "TEMP_SENSOR_BOARD 1000 requires BOARD_PULLUP_RESISTOR_OHMS, BOARD_RESISTANCE_25C_OHMS and BOARD_BETA in Configuration_adv.h." +#elif TEMP_SENSOR_REDUNDANT_IS_CUSTOM && !(defined(REDUNDANT_PULLUP_RESISTOR_OHMS) && defined(REDUNDANT_RESISTANCE_25C_OHMS) && defined(REDUNDANT_BETA)) + #error "TEMP_SENSOR_REDUNDANT 1000 requires REDUNDANT_PULLUP_RESISTOR_OHMS, REDUNDANT_RESISTANCE_25C_OHMS and REDUNDANT_BETA in Configuration_adv.h." +#endif + +/** + * Required MAX31865 settings + */ +#if TEMP_SENSOR_0_IS_MAX31865 || (TEMP_SENSOR_REDUNDANT_IS_MAX31865 && REDUNDANT_TEMP_MATCH(SOURCE, E0)) + #if !defined(MAX31865_SENSOR_WIRES_0) || !WITHIN(MAX31865_SENSOR_WIRES_0, 2, 4) + #error "MAX31865_SENSOR_WIRES_0 must be defined as an integer between 2 and 4." + #elif !defined(MAX31865_SENSOR_OHMS_0) || !defined(MAX31865_CALIBRATION_OHMS_0) + #error "MAX31865_SENSOR_OHMS_0 and MAX31865_CALIBRATION_OHMS_0 must be set if TEMP_SENSOR_0/TEMP_SENSOR_REDUNDANT is MAX31865." + #endif +#endif +#if TEMP_SENSOR_1_IS_MAX31865 || (TEMP_SENSOR_REDUNDANT_IS_MAX31865 && REDUNDANT_TEMP_MATCH(SOURCE, E1)) + #if !defined(MAX31865_SENSOR_WIRES_1) || !WITHIN(MAX31865_SENSOR_WIRES_1, 2, 4) + #error "MAX31865_SENSOR_WIRES_1 must be defined as an integer between 2 and 4." + #elif !defined(MAX31865_SENSOR_OHMS_1) || !defined(MAX31865_CALIBRATION_OHMS_1) + #error "MAX31865_SENSOR_OHMS_1 and MAX31865_CALIBRATION_OHMS_1 must be set if TEMP_SENSOR_1/TEMP_SENSOR_REDUNDANT is MAX31865." + #endif +#endif + +/** + * Redundant temperature sensor config + */ +#if HAS_TEMP_REDUNDANT + #if !defined(TEMP_SENSOR_REDUNDANT_SOURCE) + #error "TEMP_SENSOR_REDUNDANT requires TEMP_SENSOR_REDUNDANT_SOURCE." + #elif !defined(TEMP_SENSOR_REDUNDANT_TARGET) + #error "TEMP_SENSOR_REDUNDANT requires TEMP_SENSOR_REDUNDANT_TARGET." + #elif REDUNDANT_TEMP_MATCH(SOURCE, TEMP_SENSOR_REDUNDANT_TARGET) + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be the same as TEMP_SENSOR_REDUNDANT_TARGET." + #elif HAS_MULTI_HOTEND && TEMP_SENSOR_REDUNDANT_SOURCE < HOTENDS + #error "TEMP_SENSOR_REDUNDANT_SOURCE must be after the last used hotend TEMP_SENSOR." + #endif + + #if REDUNDANT_TEMP_MATCH(SOURCE, E0) && HAS_HOTEND + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be E0 if a hotend is used. E0 always uses TEMP_SENSOR_0." + #elif REDUNDANT_TEMP_MATCH(SOURCE, COOLER) && HAS_TEMP_COOLER + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be COOLER. TEMP_SENSOR_COOLER is in use." + #elif REDUNDANT_TEMP_MATCH(SOURCE, PROBE) && HAS_TEMP_PROBE + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be PROBE. TEMP_SENSOR_PROBE is in use." + #elif REDUNDANT_TEMP_MATCH(SOURCE, BOARD) && HAS_TEMP_BOARD + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be BOARD. TEMP_SENSOR_BOARD is in use." + #elif REDUNDANT_TEMP_MATCH(SOURCE, CHAMBER) && HAS_TEMP_CHAMBER + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be CHAMBER. TEMP_SENSOR_CHAMBER is in use." + #elif REDUNDANT_TEMP_MATCH(SOURCE, BED) && HAS_TEMP_BED + #error "TEMP_SENSOR_REDUNDANT_SOURCE can't be BED. TEMP_SENSOR_BED is in use." + #endif + + #if REDUNDANT_TEMP_MATCH(TARGET, E0) && !PIN_EXISTS(TEMP_0) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E0 without TEMP_0_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E1) && !PIN_EXISTS(TEMP_1) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E1 without TEMP_1_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E2) && !PIN_EXISTS(TEMP_2) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E2 without TEMP_2_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E3) && !PIN_EXISTS(TEMP_3) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E3 without TEMP_3_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E4) && !PIN_EXISTS(TEMP_4) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E4 without TEMP_4_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E5) && !PIN_EXISTS(TEMP_5) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E5 without TEMP_5_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E6) && !PIN_EXISTS(TEMP_6) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E6 without TEMP_6_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, E7) && !PIN_EXISTS(TEMP_7) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be E7 without TEMP_7_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, BED) && !PIN_EXISTS(TEMP_BED) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be BED without TEMP_BED_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, CHAMBER) && !PIN_EXISTS(TEMP_CHAMBER) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be CHAMBER without TEMP_CHAMBER_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, BOARD) && !PIN_EXISTS(TEMP_BOARD) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be BOARD without TEMP_BOARD_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, PROBE) && !PIN_EXISTS(TEMP_PROBE) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be PROBE without TEMP_PROBE_PIN defined." + #elif REDUNDANT_TEMP_MATCH(TARGET, COOLER) && !PIN_EXISTS(TEMP_COOLER) + #error "TEMP_SENSOR_REDUNDANT_TARGET can't be COOLER without TEMP_COOLER_PIN defined." + #endif + + #if TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0) && !PIN_EXISTS(TEMP_0_CS) + #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE E0 requires TEMP_0_CS_PIN." + #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1) && !PIN_EXISTS(TEMP_1_CS) + #error "TEMP_SENSOR_REDUNDANT MAX Thermocouple with TEMP_SENSOR_REDUNDANT_SOURCE E1 requires TEMP_1_CS_PIN." + #endif +#endif + +/** + * Test Sensor & Heater pin combos. * Pins and Sensor IDs must be set for each heater */ -#if HEATER_0_USES_MAX6675 && !PIN_EXISTS(MAX6675_SS) - #error "MAX6675_SS_PIN (required for TEMP_SENSOR_0) not defined for this board." -#elif HAS_HOTEND && !HAS_TEMP_HOTEND && !HEATER_0_DUMMY_THERMISTOR +#if !ANY_PIN(TEMP_0, TEMP_0_CS) + #error "TEMP_0_PIN or TEMP_0_CS_PIN not defined for this board." +#elif !HAS_HEATER_0 && EXTRUDERS + #error "HEATER_0_PIN not defined for this board." +#elif TEMP_SENSOR_0_IS_MAX_TC && !PIN_EXISTS(TEMP_0_CS) + #error "TEMP_SENSOR_0 MAX thermocouple requires TEMP_0_CS_PIN." +#elif HAS_HOTEND && !HAS_TEMP_HOTEND && !TEMP_SENSOR_0_IS_DUMMY #error "TEMP_0_PIN (required for TEMP_SENSOR_0) not defined for this board." #elif EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) && !HAS_HEATER_1 #error "HEATER_1_PIN is not defined. TEMP_SENSOR_1 might not be set, or the board (not EEB / EEF?) doesn't define a pin." #endif #if HAS_MULTI_HOTEND - #if HEATER_1_USES_MAX6675 && !PIN_EXISTS(MAX6675_SS2) - #error "MAX6675_SS2_PIN (required for TEMP_SENSOR_1) not defined for this board." + #if TEMP_SENSOR_1_IS_MAX_TC && !PIN_EXISTS(TEMP_1_CS) + #error "TEMP_SENSOR_1 MAX thermocouple requires TEMP_1_CS_PIN." #elif TEMP_SENSOR_1 == 0 #error "TEMP_SENSOR_1 is required with 2 or more HOTENDS." - #elif !ANY_PIN(TEMP_1, MAX6675_SS2) && !HEATER_1_DUMMY_THERMISTOR - #error "TEMP_1_PIN not defined for this board." - #elif ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - #error "HOTENDS must be 1 with TEMP_SENSOR_1_AS_REDUNDANT." + #elif !ANY_PIN(TEMP_1, TEMP_1_CS) && !TEMP_SENSOR_1_IS_DUMMY + #error "TEMP_1_PIN or TEMP_1_CS_PIN not defined for this board." #endif #if HOTENDS > 2 #if TEMP_SENSOR_2 == 0 #error "TEMP_SENSOR_2 is required with 3 or more HOTENDS." #elif !HAS_HEATER_2 #error "HEATER_2_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_2) && !HEATER_2_DUMMY_THERMISTOR + #elif !PIN_EXISTS(TEMP_2) && !TEMP_SENSOR_2_IS_DUMMY #error "TEMP_2_PIN not defined for this board." #endif #if HOTENDS > 3 @@ -1754,7 +2158,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "TEMP_SENSOR_3 is required with 4 or more HOTENDS." #elif !HAS_HEATER_3 #error "HEATER_3_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_3) && !HEATER_3_DUMMY_THERMISTOR + #elif !PIN_EXISTS(TEMP_3) && !TEMP_SENSOR_3_IS_DUMMY #error "TEMP_3_PIN not defined for this board." #endif #if HOTENDS > 4 @@ -1762,7 +2166,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "TEMP_SENSOR_4 is required with 5 or more HOTENDS." #elif !HAS_HEATER_4 #error "HEATER_4_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_4) && !HEATER_4_DUMMY_THERMISTOR + #elif !PIN_EXISTS(TEMP_4) && !TEMP_SENSOR_4_IS_DUMMY #error "TEMP_4_PIN not defined for this board." #endif #if HOTENDS > 5 @@ -1770,7 +2174,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "TEMP_SENSOR_5 is required with 6 HOTENDS." #elif !HAS_HEATER_5 #error "HEATER_5_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_5) && !HEATER_5_DUMMY_THERMISTOR + #elif !PIN_EXISTS(TEMP_5) && !TEMP_SENSOR_5_IS_DUMMY #error "TEMP_5_PIN not defined for this board." #endif #if HOTENDS > 6 @@ -1778,7 +2182,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "TEMP_SENSOR_6 is required with 6 HOTENDS." #elif !HAS_HEATER_6 #error "HEATER_6_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_6) && !HEATER_6_DUMMY_THERMISTOR + #elif !PIN_EXISTS(TEMP_6) && !TEMP_SENSOR_6_IS_DUMMY #error "TEMP_6_PIN not defined for this board." #endif #if HOTENDS > 7 @@ -1786,77 +2190,68 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "TEMP_SENSOR_7 is required with 7 HOTENDS." #elif !HAS_HEATER_7 #error "HEATER_7_PIN not defined for this board." - #elif !PIN_EXISTS(TEMP_7) && !HEATER_7_DUMMY_THERMISTOR + #elif !PIN_EXISTS(TEMP_7) && !TEMP_SENSOR_7_IS_DUMMY #error "TEMP_7_PIN not defined for this board." #endif - #elif TEMP_SENSOR_7 != 0 - #error "TEMP_SENSOR_7 shouldn't be set with only 7 HOTENDS." - #endif - #elif TEMP_SENSOR_6 != 0 - #error "TEMP_SENSOR_6 shouldn't be set with only 6 HOTENDS." - #elif TEMP_SENSOR_7 != 0 - #error "TEMP_SENSOR_7 shouldn't be set with only 6 HOTENDS." - #endif - #elif TEMP_SENSOR_5 != 0 - #error "TEMP_SENSOR_5 shouldn't be set with only 5 HOTENDS." - #elif TEMP_SENSOR_6 != 0 - #error "TEMP_SENSOR_6 shouldn't be set with only 5 HOTENDS." - #elif TEMP_SENSOR_7 != 0 - #error "TEMP_SENSOR_7 shouldn't be set with only 5 HOTENDS." - #endif - #elif TEMP_SENSOR_4 != 0 - #error "TEMP_SENSOR_4 shouldn't be set with only 4 HOTENDS." - #elif TEMP_SENSOR_5 != 0 - #error "TEMP_SENSOR_5 shouldn't be set with only 4 HOTENDS." - #elif TEMP_SENSOR_6 != 0 - #error "TEMP_SENSOR_6 shouldn't be set with only 4 HOTENDS." - #elif TEMP_SENSOR_7 != 0 - #error "TEMP_SENSOR_7 shouldn't be set with only 4 HOTENDS." - #endif - #elif TEMP_SENSOR_3 != 0 - #error "TEMP_SENSOR_3 shouldn't be set with only 3 HOTENDS." - #elif TEMP_SENSOR_4 != 0 - #error "TEMP_SENSOR_4 shouldn't be set with only 3 HOTENDS." - #elif TEMP_SENSOR_5 != 0 - #error "TEMP_SENSOR_5 shouldn't be set with only 3 HOTENDS." - #elif TEMP_SENSOR_6 != 0 - #error "TEMP_SENSOR_6 shouldn't be set with only 3 HOTENDS." - #elif TEMP_SENSOR_7 != 0 - #error "TEMP_SENSOR_7 shouldn't be set with only 3 HOTENDS." - #endif - #elif TEMP_SENSOR_2 != 0 - #error "TEMP_SENSOR_2 shouldn't be set with only 2 HOTENDS." - #elif TEMP_SENSOR_3 != 0 - #error "TEMP_SENSOR_3 shouldn't be set with only 2 HOTENDS." - #elif TEMP_SENSOR_4 != 0 - #error "TEMP_SENSOR_4 shouldn't be set with only 2 HOTENDS." - #elif TEMP_SENSOR_5 != 0 - #error "TEMP_SENSOR_5 shouldn't be set with only 2 HOTENDS." - #elif TEMP_SENSOR_6 != 0 - #error "TEMP_SENSOR_6 shouldn't be set with only 2 HOTENDS." - #elif TEMP_SENSOR_7 != 0 - #error "TEMP_SENSOR_7 shouldn't be set with only 2 HOTENDS." - #endif -#elif TEMP_SENSOR_1 != 0 && DISABLED(TEMP_SENSOR_1_AS_REDUNDANT) - #error "TEMP_SENSOR_1 shouldn't be set with only 1 HOTEND." -#elif TEMP_SENSOR_2 != 0 - #error "TEMP_SENSOR_2 shouldn't be set with only 1 HOTEND." -#elif TEMP_SENSOR_3 != 0 - #error "TEMP_SENSOR_3 shouldn't be set with only 1 HOTEND." -#elif TEMP_SENSOR_4 != 0 - #error "TEMP_SENSOR_4 shouldn't be set with only 1 HOTEND." -#elif TEMP_SENSOR_5 != 0 - #error "TEMP_SENSOR_5 shouldn't be set with only 1 HOTEND." -#elif TEMP_SENSOR_6 != 0 - #error "TEMP_SENSOR_6 shouldn't be set with only 1 HOTEND." -#elif TEMP_SENSOR_7 != 0 - #error "TEMP_SENSOR_7 shouldn't be set with only 1 HOTEND." -#endif + #endif // HOTENDS > 7 + #endif // HOTENDS > 6 + #endif // HOTENDS > 5 + #endif // HOTENDS > 4 + #endif // HOTENDS > 3 + #endif // HOTENDS > 2 +#endif // HAS_MULTI_HOTEND +/** + * Pins must be set for temp sensors, with some other feature requirements. + */ #if TEMP_SENSOR_CHAMBER && !PIN_EXISTS(TEMP_CHAMBER) #error "TEMP_SENSOR_CHAMBER requires TEMP_CHAMBER_PIN." #endif +#if TEMP_SENSOR_COOLER + #if !PIN_EXISTS(TEMP_COOLER) + #error "TEMP_SENSOR_COOLER requires TEMP_COOLER_PIN." + #elif DISABLED(LASER_FEATURE) + #error "TEMP_SENSOR_COOLER requires LASER_FEATURE." + #endif +#endif + +#if TEMP_SENSOR_PROBE + #if !PIN_EXISTS(TEMP_PROBE) + #error "TEMP_SENSOR_PROBE requires TEMP_PROBE_PIN." + #elif !HAS_TEMP_ADC_PROBE + #error "TEMP_PROBE_PIN must be an ADC pin." + #elif DISABLED(FIX_MOUNTED_PROBE) + #error "TEMP_SENSOR_PROBE shouldn't be set without FIX_MOUNTED_PROBE." + #endif +#endif + +#if TEMP_SENSOR_PROBE + #if !PIN_EXISTS(TEMP_PROBE) + #error "TEMP_SENSOR_PROBE requires TEMP_PROBE_PIN." + #elif !HAS_TEMP_ADC_PROBE + #error "TEMP_PROBE_PIN must be an ADC pin." + #elif DISABLED(FIX_MOUNTED_PROBE) + #error "TEMP_SENSOR_PROBE shouldn't be set without FIX_MOUNTED_PROBE." + #endif +#endif + +#if TEMP_SENSOR_BOARD + #if !PIN_EXISTS(TEMP_BOARD) + #error "TEMP_SENSOR_BOARD requires TEMP_BOARD_PIN." + #elif !HAS_TEMP_ADC_BOARD + #error "TEMP_BOARD_PIN must be an ADC pin." + #elif ENABLED(THERMAL_PROTECTION_BOARD) && (!defined(BOARD_MINTEMP) || !defined(BOARD_MAXTEMP)) + #error "THERMAL_PROTECTION_BOARD requires BOARD_MINTEMP and BOARD_MAXTEMP." + #endif +#elif CONTROLLER_FAN_MIN_BOARD_TEMP + #error "CONTROLLER_FAN_MIN_BOARD_TEMP requires TEMP_SENSOR_BOARD." +#endif + +#if ENABLED(LASER_COOLANT_FLOW_METER) && !(PIN_EXISTS(FLOWMETER) && ENABLED(LASER_FEATURE)) + #error "LASER_COOLANT_FLOW_METER requires FLOWMETER_PIN and LASER_FEATURE." +#endif + #if ENABLED(CHAMBER_FAN) && !(defined(CHAMBER_FAN_MODE) && WITHIN(CHAMBER_FAN_MODE, 0, 2)) #error "CHAMBER_FAN_MODE must be between 0 and 2." #endif @@ -1881,41 +2276,6 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #endif #endif -#if TEMP_SENSOR_PROBE - #if !PIN_EXISTS(TEMP_PROBE) - #error "TEMP_SENSOR_PROBE requires TEMP_PROBE_PIN." - #elif !HAS_TEMP_ADC_PROBE - #error "TEMP_PROBE_PIN must be an ADC pin." - #elif DISABLED(FIX_MOUNTED_PROBE) - #error "TEMP_SENSOR_PROBE shouldn't be set without FIX_MOUNTED_PROBE." - #endif -#endif - -#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) && TEMP_SENSOR_1 == 0 - #error "TEMP_SENSOR_1 is required with TEMP_SENSOR_1_AS_REDUNDANT." -#endif - -#if MAX6675_0_IS_MAX31865 && !(defined(MAX31865_SENSOR_OHMS_0) && defined(MAX31865_CALIBRATION_OHMS_0)) - #error "MAX31865_SENSOR_OHMS_0 and MAX31865_CALIBRATION_OHMS_0 must be set if TEMP_SENSOR_0 is MAX31865." -#elif MAX6675_1_IS_MAX31865 && !(defined(MAX31865_SENSOR_OHMS_1) && defined(MAX31865_CALIBRATION_OHMS_1)) - #error "MAX31865_SENSOR_OHMS_1 and MAX31865_CALIBRATION_OHMS_1 must be set if TEMP_SENSOR_1 is MAX31865." -#endif - -/** - * Test Heater, Temp Sensor, and Extruder Pins - */ -#if !HAS_HEATER_0 && EXTRUDERS - #error "HEATER_0_PIN not defined for this board." -#elif !ANY_PIN(TEMP_0, MAX6675_SS) - #error "TEMP_0_PIN not defined for this board." -#elif ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PINS_EXIST(E0_STEP, E0_DIR)) - #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board." -#elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PINS_EXIST(E0_STEP, E0_DIR) || !HAS_E0_ENABLE)) - #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." -#elif EXTRUDERS && TEMP_SENSOR_0 == 0 - #error "TEMP_SENSOR_0 is required if there are any extruders." -#endif - /** * Temperature status LEDs */ @@ -1957,46 +2317,40 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal /** * Test Extruder Stepper Pins */ -#if E_STEPPERS - #if !(PINS_EXIST(E0_STEP, E0_DIR) && HAS_E0_ENABLE) +#if HAS_EXTRUDERS + #if ((defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && !PINS_EXIST(E0_STEP, E0_DIR)) + #error "E0_STEP_PIN or E0_DIR_PIN not defined for this board." + #elif ( !(defined(__AVR_ATmega644P__) || defined(__AVR_ATmega1284P__)) && (!PINS_EXIST(E0_STEP, E0_DIR) || !HAS_E0_ENABLE)) #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." + #elif EXTRUDERS && TEMP_SENSOR_0 == 0 + #error "TEMP_SENSOR_0 is required if there are any extruders." #endif - #if E_STEPPERS > 1 - #if !(PINS_EXIST(E1_STEP, E1_DIR) && HAS_E1_ENABLE) - #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board." - #endif - #if E_STEPPERS > 2 - #if !(PINS_EXIST(E2_STEP, E2_DIR) && HAS_E2_ENABLE) - #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board." - #endif - #if E_STEPPERS > 3 - #if !(PINS_EXIST(E3_STEP, E3_DIR) && HAS_E3_ENABLE) - #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board." - #endif - #if E_STEPPERS > 4 - #if !(PINS_EXIST(E4_STEP, E4_DIR) && HAS_E4_ENABLE) - #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board." - #endif - #if E_STEPPERS > 5 - #if !(PINS_EXIST(E5_STEP, E5_DIR) && HAS_E5_ENABLE) - #error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board." - #endif - #if E_STEPPERS > 6 - #if !(PINS_EXIST(E6_STEP, E6_DIR) && HAS_E6_ENABLE) - #error "E6_STEP_PIN, E6_DIR_PIN, or E6_ENABLE_PIN not defined for this board." - #endif - #if E_STEPPERS > 7 - #if !(PINS_EXIST(E7_STEP, E7_DIR) && HAS_E7_ENABLE) - #error "E7_STEP_PIN, E7_DIR_PIN, or E7_ENABLE_PIN not defined for this board." - #endif - #endif // E_STEPPERS > 7 - #endif // E_STEPPERS > 6 - #endif // E_STEPPERS > 5 - #endif // E_STEPPERS > 4 - #endif // E_STEPPERS > 3 - #endif // E_STEPPERS > 2 - #endif // E_STEPPERS > 1 -#endif // E_STEPPERS +#endif + +#if E_STEPPERS > 0 && !(PINS_EXIST(E0_STEP, E0_DIR) && HAS_E0_ENABLE) + #error "E0_STEP_PIN, E0_DIR_PIN, or E0_ENABLE_PIN not defined for this board." +#endif +#if E_STEPPERS > 1 && !(PINS_EXIST(E1_STEP, E1_DIR) && HAS_E1_ENABLE) + #error "E1_STEP_PIN, E1_DIR_PIN, or E1_ENABLE_PIN not defined for this board." +#endif +#if E_STEPPERS > 2 && !(PINS_EXIST(E2_STEP, E2_DIR) && HAS_E2_ENABLE) + #error "E2_STEP_PIN, E2_DIR_PIN, or E2_ENABLE_PIN not defined for this board." +#endif +#if E_STEPPERS > 3 && !(PINS_EXIST(E3_STEP, E3_DIR) && HAS_E3_ENABLE) + #error "E3_STEP_PIN, E3_DIR_PIN, or E3_ENABLE_PIN not defined for this board." +#endif +#if E_STEPPERS > 4 && !(PINS_EXIST(E4_STEP, E4_DIR) && HAS_E4_ENABLE) + #error "E4_STEP_PIN, E4_DIR_PIN, or E4_ENABLE_PIN not defined for this board." +#endif +#if E_STEPPERS > 5 && !(PINS_EXIST(E5_STEP, E5_DIR) && HAS_E5_ENABLE) + #error "E5_STEP_PIN, E5_DIR_PIN, or E5_ENABLE_PIN not defined for this board." +#endif +#if E_STEPPERS > 6 && !(PINS_EXIST(E6_STEP, E6_DIR) && HAS_E6_ENABLE) + #error "E6_STEP_PIN, E6_DIR_PIN, or E6_ENABLE_PIN not defined for this board." +#endif +#if E_STEPPERS > 7 && !(PINS_EXIST(E7_STEP, E7_DIR) && HAS_E7_ENABLE) + #error "E7_STEP_PIN, E7_DIR_PIN, or E7_ENABLE_PIN not defined for this board." +#endif /** * Endstop Tests @@ -2005,41 +2359,64 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #define _PLUG_UNUSED_TEST(A,P) (DISABLED(USE_##P##MIN_PLUG, USE_##P##MAX_PLUG) \ && !(ENABLED(A##_DUAL_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) \ && !(ENABLED(A##_MULTI_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) ) -#define _AXIS_PLUG_UNUSED_TEST(A) (_PLUG_UNUSED_TEST(A,X) && _PLUG_UNUSED_TEST(A,Y) && _PLUG_UNUSED_TEST(A,Z)) - -// At least 3 endstop plugs must be used -#if _AXIS_PLUG_UNUSED_TEST(X) - #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG." -#endif -#if _AXIS_PLUG_UNUSED_TEST(Y) - #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG." -#endif -#if _AXIS_PLUG_UNUSED_TEST(Z) - #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG." -#endif - -// Delta and Cartesian use 3 homing endstops -#if NONE(IS_SCARA, SPI_ENDSTOPS) - #if X_HOME_DIR < 0 && DISABLED(USE_XMIN_PLUG) - #error "Enable USE_XMIN_PLUG when homing X to MIN." - #elif X_HOME_DIR > 0 && DISABLED(USE_XMAX_PLUG) - #error "Enable USE_XMAX_PLUG when homing X to MAX." - #elif Y_HOME_DIR < 0 && DISABLED(USE_YMIN_PLUG) - #error "Enable USE_YMIN_PLUG when homing Y to MIN." - #elif Y_HOME_DIR > 0 && DISABLED(USE_YMAX_PLUG) - #error "Enable USE_YMAX_PLUG when homing Y to MAX." +#define _AXIS_PLUG_UNUSED_TEST(A) (1 LINEAR_AXIS_GANG(&& _PLUG_UNUSED_TEST(A,X), && _PLUG_UNUSED_TEST(A,Y), && _PLUG_UNUSED_TEST(A,Z), && _PLUG_UNUSED_TEST(A,I), && _PLUG_UNUSED_TEST(A,J), && _PLUG_UNUSED_TEST(A,K) ) ) + +// A machine with endstops must have a minimum of 3 +#if HAS_ENDSTOPS + #if _AXIS_PLUG_UNUSED_TEST(X) + #error "You must enable USE_XMIN_PLUG or USE_XMAX_PLUG." + #endif + #if _AXIS_PLUG_UNUSED_TEST(Y) + #error "You must enable USE_YMIN_PLUG or USE_YMAX_PLUG." + #endif + #if _AXIS_PLUG_UNUSED_TEST(Z) + #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG." + #endif + #if LINEAR_AXES >= 4 && _AXIS_PLUG_UNUSED_TEST(I) + #error "You must enable USE_IMIN_PLUG or USE_IMAX_PLUG." + #endif + #if LINEAR_AXES >= 5 && _AXIS_PLUG_UNUSED_TEST(J) + #error "You must enable USE_JMIN_PLUG or USE_JMAX_PLUG." + #endif + #if LINEAR_AXES >= 6 && _AXIS_PLUG_UNUSED_TEST(K) + #error "You must enable USE_KMIN_PLUG or USE_KMAX_PLUG." + #endif + + // Delta and Cartesian use 3 homing endstops + #if NONE(IS_SCARA, SPI_ENDSTOPS) + #if X_HOME_TO_MIN && DISABLED(USE_XMIN_PLUG) + #error "Enable USE_XMIN_PLUG when homing X to MIN." + #elif X_HOME_TO_MAX && DISABLED(USE_XMAX_PLUG) + #error "Enable USE_XMAX_PLUG when homing X to MAX." + #elif Y_HOME_TO_MIN && DISABLED(USE_YMIN_PLUG) + #error "Enable USE_YMIN_PLUG when homing Y to MIN." + #elif Y_HOME_TO_MAX && DISABLED(USE_YMAX_PLUG) + #error "Enable USE_YMAX_PLUG when homing Y to MAX." + #elif LINEAR_AXES >= 4 && I_HOME_TO_MIN && DISABLED(USE_IMIN_PLUG) + #error "Enable USE_IMIN_PLUG when homing I to MIN." + #elif LINEAR_AXES >= 4 && I_HOME_TO_MAX && DISABLED(USE_IMAX_PLUG) + #error "Enable USE_IMAX_PLUG when homing I to MAX." + #elif LINEAR_AXES >= 5 && J_HOME_TO_MIN && DISABLED(USE_JMIN_PLUG) + #error "Enable USE_JMIN_PLUG when homing J to MIN." + #elif LINEAR_AXES >= 5 && J_HOME_TO_MAX && DISABLED(USE_JMAX_PLUG) + #error "Enable USE_JMAX_PLUG when homing J to MAX." + #elif LINEAR_AXES >= 6 && K_HOME_TO_MIN && DISABLED(USE_KMIN_PLUG) + #error "Enable USE_KMIN_PLUG when homing K to MIN." + #elif LINEAR_AXES >= 6 && K_HOME_TO_MAX && DISABLED(USE_KMAX_PLUG) + #error "Enable USE_KMAX_PLUG when homing K to MAX." + #endif #endif -#endif -// Z homing direction and plug usage flags -#if Z_HOME_DIR < 0 && NONE(USE_ZMIN_PLUG, HOMING_Z_WITH_PROBE) - #error "Enable USE_ZMIN_PLUG when homing Z to MIN." -#elif Z_HOME_DIR > 0 && ENABLED(USE_PROBE_FOR_Z_HOMING) - #error "Z_HOME_DIR must be -1 when homing Z with the probe." -#elif BOTH(HOMING_Z_WITH_PROBE, Z_MULTI_ENDSTOPS) - #error "Z_MULTI_ENDSTOPS is incompatible with USE_PROBE_FOR_Z_HOMING." -#elif Z_HOME_DIR > 0 && DISABLED(USE_ZMAX_PLUG) - #error "Enable USE_ZMAX_PLUG when homing Z to MAX." + // Z homing direction and plug usage flags + #if Z_HOME_TO_MIN && NONE(USE_ZMIN_PLUG, HOMING_Z_WITH_PROBE) + #error "Enable USE_ZMIN_PLUG when homing Z to MIN." + #elif Z_HOME_TO_MAX && ENABLED(USE_PROBE_FOR_Z_HOMING) + #error "Z_HOME_DIR must be -1 when homing Z with the probe." + #elif BOTH(HOMING_Z_WITH_PROBE, Z_MULTI_ENDSTOPS) + #error "Z_MULTI_ENDSTOPS is incompatible with USE_PROBE_FOR_Z_HOMING." + #elif Z_HOME_TO_MAX && DISABLED(USE_ZMAX_PLUG) + #error "Enable USE_ZMAX_PLUG when homing Z to MAX." + #endif #endif #if BOTH(HOME_Z_FIRST, USE_PROBE_FOR_Z_HOMING) @@ -2048,105 +2425,28 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal // Dual/multiple endstops requirements #if ENABLED(X_DUAL_ENDSTOPS) - #if !X2_USE_ENDSTOP - #error "You must set X2_USE_ENDSTOP with X_DUAL_ENDSTOPS." - #elif X2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG) - #error "USE_XMIN_PLUG is required when X2_USE_ENDSTOP is _XMIN_." - #elif X2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG) - #error "USE_XMAX_PLUG is required when X2_USE_ENDSTOP is _XMAX_." - #elif X2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG) - #error "USE_YMIN_PLUG is required when X2_USE_ENDSTOP is _YMIN_." - #elif X2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG) - #error "USE_YMAX_PLUG is required when X2_USE_ENDSTOP is _YMAX_." - #elif X2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG) - #error "USE_ZMIN_PLUG is required when X2_USE_ENDSTOP is _ZMIN_." - #elif X2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG) - #error "USE_ZMAX_PLUG is required when X2_USE_ENDSTOP is _ZMAX_." - #elif !HAS_X2_MIN && !HAS_X2_MAX - #error "X2_USE_ENDSTOP has been assigned to a nonexistent endstop!" - #elif ENABLED(DELTA) + #if ENABLED(DELTA) #error "X_DUAL_ENDSTOPS is not compatible with DELTA." + #elif !X2_USE_ENDSTOP + #error "X2_USE_ENDSTOP must be set with X_DUAL_ENDSTOPS." #endif #endif #if ENABLED(Y_DUAL_ENDSTOPS) - #if !Y2_USE_ENDSTOP - #error "You must set Y2_USE_ENDSTOP with Y_DUAL_ENDSTOPS." - #elif Y2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG) - #error "USE_XMIN_PLUG is required when Y2_USE_ENDSTOP is _XMIN_." - #elif Y2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG) - #error "USE_XMAX_PLUG is required when Y2_USE_ENDSTOP is _XMAX_." - #elif Y2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG) - #error "USE_YMIN_PLUG is required when Y2_USE_ENDSTOP is _YMIN_." - #elif Y2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG) - #error "USE_YMAX_PLUG is required when Y2_USE_ENDSTOP is _YMAX_." - #elif Y2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG) - #error "USE_ZMIN_PLUG is required when Y2_USE_ENDSTOP is _ZMIN_." - #elif Y2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG) - #error "USE_ZMAX_PLUG is required when Y2_USE_ENDSTOP is _ZMAX_." - #elif !HAS_Y2_MIN && !HAS_Y2_MAX - #error "Y2_USE_ENDSTOP has been assigned to a nonexistent endstop!" - #elif ENABLED(DELTA) + #if ENABLED(DELTA) #error "Y_DUAL_ENDSTOPS is not compatible with DELTA." + #elif !Y2_USE_ENDSTOP + #error "Y2_USE_ENDSTOP must be set with Y_DUAL_ENDSTOPS." #endif #endif - #if ENABLED(Z_MULTI_ENDSTOPS) - #if !Z2_USE_ENDSTOP - #error "You must set Z2_USE_ENDSTOP with Z_MULTI_ENDSTOPS when NUM_Z_STEPPER_DRIVERS >= 2." - #elif Z2_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG) - #error "USE_XMIN_PLUG is required when Z2_USE_ENDSTOP is _XMIN_." - #elif Z2_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG) - #error "USE_XMAX_PLUG is required when Z2_USE_ENDSTOP is _XMAX_." - #elif Z2_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG) - #error "USE_YMIN_PLUG is required when Z2_USE_ENDSTOP is _YMIN_." - #elif Z2_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG) - #error "USE_YMAX_PLUG is required when Z2_USE_ENDSTOP is _YMAX_." - #elif Z2_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG) - #error "USE_ZMIN_PLUG is required when Z2_USE_ENDSTOP is _ZMIN_." - #elif Z2_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG) - #error "USE_ZMAX_PLUG is required when Z2_USE_ENDSTOP is _ZMAX_." - #elif !HAS_Z2_MIN && !HAS_Z2_MAX - #error "Z2_USE_ENDSTOP has been assigned to a nonexistent endstop!" - #elif ENABLED(DELTA) + #if ENABLED(DELTA) #error "Z_MULTI_ENDSTOPS is not compatible with DELTA." - #endif - #if NUM_Z_STEPPER_DRIVERS >= 3 - #if !Z3_USE_ENDSTOP - #error "You must set Z3_USE_ENDSTOP with Z_MULTI_ENDSTOPS when NUM_Z_STEPPER_DRIVERS >= 3." - #elif Z3_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG) - #error "USE_XMIN_PLUG is required when Z3_USE_ENDSTOP is _XMIN_." - #elif Z3_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG) - #error "USE_XMAX_PLUG is required when Z3_USE_ENDSTOP is _XMAX_." - #elif Z3_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG) - #error "USE_YMIN_PLUG is required when Z3_USE_ENDSTOP is _YMIN_." - #elif Z3_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG) - #error "USE_YMAX_PLUG is required when Z3_USE_ENDSTOP is _YMAX_." - #elif Z3_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG) - #error "USE_ZMIN_PLUG is required when Z3_USE_ENDSTOP is _ZMIN_." - #elif Z3_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG) - #error "USE_ZMAX_PLUG is required when Z3_USE_ENDSTOP is _ZMAX_." - #elif !HAS_Z3_MIN && !HAS_Z3_MAX - #error "Z3_USE_ENDSTOP has been assigned to a nonexistent endstop!" - #endif - #endif - #if NUM_Z_STEPPER_DRIVERS >= 4 - #if !Z4_USE_ENDSTOP - #error "You must set Z4_USE_ENDSTOP with Z_MULTI_ENDSTOPS when NUM_Z_STEPPER_DRIVERS >= 4." - #elif Z4_USE_ENDSTOP == _XMIN_ && DISABLED(USE_XMIN_PLUG) - #error "USE_XMIN_PLUG is required when Z4_USE_ENDSTOP is _XMIN_." - #elif Z4_USE_ENDSTOP == _XMAX_ && DISABLED(USE_XMAX_PLUG) - #error "USE_XMAX_PLUG is required when Z4_USE_ENDSTOP is _XMAX_." - #elif Z4_USE_ENDSTOP == _YMIN_ && DISABLED(USE_YMIN_PLUG) - #error "USE_YMIN_PLUG is required when Z4_USE_ENDSTOP is _YMIN_." - #elif Z4_USE_ENDSTOP == _YMAX_ && DISABLED(USE_YMAX_PLUG) - #error "USE_YMAX_PLUG is required when Z4_USE_ENDSTOP is _YMAX_." - #elif Z4_USE_ENDSTOP == _ZMIN_ && DISABLED(USE_ZMIN_PLUG) - #error "USE_ZMIN_PLUG is required when Z4_USE_ENDSTOP is _ZMIN_." - #elif Z4_USE_ENDSTOP == _ZMAX_ && DISABLED(USE_ZMAX_PLUG) - #error "USE_ZMAX_PLUG is required when Z4_USE_ENDSTOP is _ZMAX_." - #elif !HAS_Z4_MIN && !HAS_Z4_MAX - #error "Z4_USE_ENDSTOP has been assigned to a nonexistent endstop!" - #endif + #elif !Z2_USE_ENDSTOP + #error "Z2_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS." + #elif !Z3_USE_ENDSTOP && NUM_Z_STEPPER_DRIVERS >= 3 + #error "Z3_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and NUM_Z_STEPPER_DRIVERS >= 3." + #elif !Z4_USE_ENDSTOP && NUM_Z_STEPPER_DRIVERS >= 4 + #error "Z4_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and NUM_Z_STEPPER_DRIVERS >= 4." #endif #endif @@ -2155,12 +2455,22 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #endif /** - * emergency-command parser + * Emergency Command Parser */ #if ENABLED(EMERGENCY_PARSER) && defined(__AVR__) && defined(USBCON) #error "EMERGENCY_PARSER does not work on boards with AT90USB processors (USBCON)." #endif +/** + * Software Reset options + */ +#if ENABLED(SOFT_RESET_VIA_SERIAL) && DISABLED(EMERGENCY_PARSER) + #error "EMERGENCY_PARSER is required to activate SOFT_RESET_VIA_SERIAL." +#endif +#if ENABLED(SOFT_RESET_ON_KILL) && !BUTTON_EXISTS(ENC) + #error "An encoder button is required or SOFT_RESET_ON_KILL will reset the printer without notice!" +#endif + /** * I2C bus */ @@ -2294,17 +2604,16 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #if 1 < 0 \ + ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \ + ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \ - + ENABLED(ULTIPANEL) \ - + ENABLED(ULTRA_LCD) \ + (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \ + (ENABLED(MINIPANEL) && NONE(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \ - + (ENABLED(MKS_MINI_12864) && DISABLED(MKS_LCD12864)) \ + + (ENABLED(MKS_MINI_12864) && NONE(MKS_LCD12864A, MKS_LCD12864B)) \ + (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \ + (DISABLED(IS_LEGACY_TFT) && ENABLED(TFT_GENERIC)) \ + (ENABLED(IS_LEGACY_TFT) && COUNT_ENABLED(TFT_320x240, TFT_320x240_SPI, TFT_480x320, TFT_480x320_SPI)) \ + COUNT_ENABLED(ANYCUBIC_LCD_I3MEGA, ANYCUBIC_LCD_CHIRON, ANYCUBIC_TFT35) \ - + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY) \ - + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY, DWIN_CREALITY_LCD) \ + + COUNT_ENABLED(DGUS_LCD_UI_ORIGIN, DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY, DGUS_LCD_UI_MKS, DGUS_LCD_UI_RELOADED) \ + + COUNT_ENABLED(ENDER2_STOCKDISPLAY, CR10_STOCKDISPLAY) \ + + COUNT_ENABLED(DWIN_CREALITY_LCD, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI, DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE) \ + COUNT_ENABLED(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1, FYSETC_GENERIC_12864_1_1) \ + COUNT_ENABLED(LCD_SAINSMART_I2C_1602, LCD_SAINSMART_I2C_2004) \ + COUNT_ENABLED(MKS_12864OLED, MKS_12864OLED_SSD1306) \ @@ -2328,7 +2637,9 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal + ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \ + ENABLED(MAKRPANEL) \ + ENABLED(MALYAN_LCD) \ - + ENABLED(MKS_LCD12864) \ + + ENABLED(NEXTION_TFT) \ + + ENABLED(MKS_LCD12864A) \ + + ENABLED(MKS_LCD12864B) \ + ENABLED(OLED_PANEL_TINYBOY2) \ + ENABLED(OVERLORD_OLED) \ + ENABLED(PANEL_ONE) \ @@ -2344,7 +2655,12 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal + ENABLED(U8GLIB_SH1106_EINSTART) \ + ENABLED(ULTI_CONTROLLER) \ + ENABLED(ULTIMAKERCONTROLLER) \ - + ENABLED(ZONESTAR_LCD) + + ENABLED(ULTIPANEL) \ + + ENABLED(ULTRA_LCD) \ + + ENABLED(YHCB2004) \ + + ENABLED(ZONESTAR_LCD) \ + + ENABLED(K3D_FULL_GRAPHIC_SMART_CONTROLLER) \ + + ENABLED(K3D_242_OLED_CONTROLLER) #error "Please select only one LCD controller option." #endif @@ -2352,7 +2668,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #undef IS_EXTUI #undef IS_LEGACY_TFT -#if ANY(TFT_GENERIC, MKS_TS35_V2_0, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35, MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R, TFT_TRONXY_X5SA, ANYCUBIC_TFT35, ANYCUBIC_TFT35, LONGER_LK_TFT28, ANET_ET4_TFT28, ANET_ET5_TFT35) +#if ANY(TFT_GENERIC, MKS_TS35_V2_0, MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35, MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R, TFT_TRONXY_X5SA, ANYCUBIC_TFT35, ANYCUBIC_TFT35, LONGER_LK_TFT28, ANET_ET4_TFT28, ANET_ET5_TFT35, BIQU_BX_TFT70) #if NONE(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) #error "TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI is required for your TFT. Please enable one." #elif 1 < ENABLED(TFT_COLOR_UI) + ENABLED(TFT_CLASSIC_UI) + ENABLED(TFT_LVGL_UI) @@ -2374,16 +2690,49 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "Please enable only one LCD_SCREEN_ROT_* option: 0, 90, 180, or 270." #endif -#if MANY(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320) - #error "Please select only one of TFT_RES_480x320, TFT_RES_480x320, or TFT_RES_480x272." +#if MANY(TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320, TFT_RES_1024x600) + #error "Please select only one of TFT_RES_320x240, TFT_RES_480x272, TFT_RES_480x320, or TFT_RES_1024x600." #endif #if HAS_TFT_LVGL_UI && DISABLED(TFT_RES_480x320) #error "(FMSC|SPI)TFT_LVGL_UI requires TFT_RES_480x320." #endif -#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 3) - #error "GRAPHICAL_TFT_UPSCALE must be set to 2 or 3." +#if defined(GRAPHICAL_TFT_UPSCALE) && !WITHIN(GRAPHICAL_TFT_UPSCALE, 2, 4) + #error "GRAPHICAL_TFT_UPSCALE must be 2, 3, or 4." +#endif + +#if BOTH(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW) + #error "Please select only one of CHIRON_TFT_STANDARD or CHIRON_TFT_NEW." +#endif + +/** + * Ender 3 V2 controller has some limitations + */ +#if ENABLED(DWIN_CREALITY_LCD) + #if DISABLED(SDSUPPORT) + #error "DWIN_CREALITY_LCD requires SDSUPPORT to be enabled." + #elif ENABLED(PID_EDIT_MENU) + #error "DWIN_CREALITY_LCD does not support PID_EDIT_MENU." + #elif ENABLED(PID_AUTOTUNE_MENU) + #error "DWIN_CREALITY_LCD does not support PID_AUTOTUNE_MENU." + #elif ENABLED(LEVEL_BED_CORNERS) + #error "DWIN_CREALITY_LCD does not support LEVEL_BED_CORNERS." + #elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY) + #error "DWIN_CREALITY_LCD does not support LCD_BED_LEVELING with PROBE_MANUALLY." + #endif +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #if DISABLED(SDSUPPORT) + #error "DWIN_CREALITY_LCD_ENHANCED requires SDSUPPORT to be enabled." + #elif ENABLED(PID_EDIT_MENU) + #error "DWIN_CREALITY_LCD_ENHANCED does not support PID_EDIT_MENU." + #elif ENABLED(PID_AUTOTUNE_MENU) + #error "DWIN_CREALITY_LCD_ENHANCED does not support PID_AUTOTUNE_MENU." + #elif ENABLED(LEVEL_BED_CORNERS) + #error "DWIN_CREALITY_LCD_ENHANCED does not support LEVEL_BED_CORNERS." + #elif BOTH(LCD_BED_LEVELING, PROBE_MANUALLY) + #error "DWIN_CREALITY_LCD_ENHANCED does not support LCD_BED_LEVELING with PROBE_MANUALLY." + #endif #endif /** @@ -2479,6 +2828,12 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "An SPI driven TMC driver on E6 requires E6_CS_PIN." #elif INVALID_TMC_SPI(E7) #error "An SPI driven TMC driver on E7 requires E7_CS_PIN." +#elif INVALID_TMC_SPI(I) + #error "An SPI driven TMC on I requires I_CS_PIN." +#elif INVALID_TMC_SPI(J) + #error "An SPI driven TMC on J requires J_CS_PIN." +#elif INVALID_TMC_SPI(K) + #error "An SPI driven TMC on K requires K_CS_PIN." #endif #undef INVALID_TMC_SPI @@ -2518,6 +2873,12 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #error "TMC2208 or TMC2209 on E6 requires E6_HARDWARE_SERIAL or E6_SERIAL_(RX|TX)_PIN." #elif INVALID_TMC_UART(E7) #error "TMC2208 or TMC2209 on E7 requires E7_HARDWARE_SERIAL or E7_SERIAL_(RX|TX)_PIN." +#elif LINEAR_AXES >= 4 && INVALID_TMC_UART(I) + #error "TMC2208 or TMC2209 on I requires I_HARDWARE_SERIAL or I_SERIAL_(RX|TX)_PIN." +#elif LINEAR_AXES >= 5 && INVALID_TMC_UART(J) + #error "TMC2208 or TMC2209 on J requires J_HARDWARE_SERIAL or J_SERIAL_(RX|TX)_PIN." +#elif LINEAR_AXES >= 6 && INVALID_TMC_UART(K) + #error "TMC2208 or TMC2209 on K requires K_HARDWARE_SERIAL or K_SERIAL_(RX|TX)_PIN." #endif #undef INVALID_TMC_UART @@ -2541,6 +2902,12 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal INVALID_TMC_ADDRESS(Z3); #elif AXIS_DRIVER_TYPE_Z4(TMC2209) INVALID_TMC_ADDRESS(Z4); +#elif AXIS_DRIVER_TYPE_I(TMC2209) + INVALID_TMC_ADDRESS(I); +#elif AXIS_DRIVER_TYPE_J(TMC2209) + INVALID_TMC_ADDRESS(J); +#elif AXIS_DRIVER_TYPE_K(TMC2209) + INVALID_TMC_ADDRESS(K); #elif AXIS_DRIVER_TYPE_E0(TMC2209) INVALID_TMC_ADDRESS(E0); #elif AXIS_DRIVER_TYPE_E1(TMC2209) @@ -2596,6 +2963,12 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal INVALID_TMC_MS(E6) #elif !TMC_MICROSTEP_IS_VALID(E7) INVALID_TMC_MS(E7) +#elif LINEAR_AXES >= 4 && !TMC_MICROSTEP_IS_VALID(I) + INVALID_TMC_MS(I) +#elif LINEAR_AXES >= 5 && !TMC_MICROSTEP_IS_VALID(J) + INVALID_TMC_MS(J) +#elif LINEAR_AXES >= 6 && !TMC_MICROSTEP_IS_VALID(K) + INVALID_TMC_MS(K) #endif #undef INVALID_TMC_MS #undef TMC_MICROSTEP_IS_VALID @@ -2616,20 +2989,41 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #define X_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(X,TMC2209) #define Y_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Y,TMC2209) #define Z_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Z,TMC2209) + #if LINEAR_AXES >= 4 + #define I_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(I,TMC2209) + #endif + #if LINEAR_AXES >= 5 + #define J_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(J,TMC2209) + #endif + #if LINEAR_AXES >= 6 + #define K_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(K,TMC2209) + #endif #if NONE(SPI_ENDSTOPS, ONBOARD_ENDSTOPPULLUPS, ENDSTOPPULLUPS) - #if X_SENSORLESS && X_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUP_XMIN) + #if X_SENSORLESS && X_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_XMIN) #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMIN (or ENDSTOPPULLUPS) when homing to X_MIN." - #elif X_SENSORLESS && X_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUP_XMAX) + #elif X_SENSORLESS && X_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_XMAX) #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_XMAX (or ENDSTOPPULLUPS) when homing to X_MAX." - #elif Y_SENSORLESS && Y_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUP_YMIN) + #elif Y_SENSORLESS && Y_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_YMIN) #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMIN (or ENDSTOPPULLUPS) when homing to Y_MIN." - #elif Y_SENSORLESS && Y_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUP_YMAX) + #elif Y_SENSORLESS && Y_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_YMAX) #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_YMAX (or ENDSTOPPULLUPS) when homing to Y_MAX." - #elif Z_SENSORLESS && Z_HOME_DIR < 0 && DISABLED(ENDSTOPPULLUP_ZMIN) + #elif Z_SENSORLESS && Z_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_ZMIN) #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) when homing to Z_MIN." - #elif Z_SENSORLESS && Z_HOME_DIR > 0 && DISABLED(ENDSTOPPULLUP_ZMAX) + #elif Z_SENSORLESS && Z_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_ZMAX) #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) when homing to Z_MAX." + #elif LINEAR_AXES >= 4 && I_SENSORLESS && I_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_IMIN) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMIN (or ENDSTOPPULLUPS) when homing to I_MIN." + #elif LINEAR_AXES >= 4 && I_SENSORLESS && I_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_IMAX) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMAX (or ENDSTOPPULLUPS) when homing to I_MAX." + #elif LINEAR_AXES >= 5 && J_SENSORLESS && J_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_JMIN) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMIN (or ENDSTOPPULLUPS) when homing to J_MIN." + #elif LINEAR_AXES >= 5 && J_SENSORLESS && J_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_JMAX) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMAX (or ENDSTOPPULLUPS) when homing to J_MAX." + #elif LINEAR_AXES >= 6 && K_SENSORLESS && K_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_KMIN) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMIN (or ENDSTOPPULLUPS) when homing to K_MIN." + #elif LINEAR_AXES >= 6 && K_SENSORLESS && K_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_KMAX) + #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMAX (or ENDSTOPPULLUPS) when homing to K_MAX." #endif #endif @@ -2638,42 +3032,78 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #warning "SPI_ENDSTOPS may be unreliable with QUICK_HOME. Adjust back-offs for better results." #endif #else - #if X_SENSORLESS && X_HOME_DIR < 0 && X_MIN_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING + #if X_SENSORLESS && X_HOME_TO_MIN && X_MIN_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING #if X_ENDSTOP_INVERTING #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = true when homing to X_MIN." #else #error "SENSORLESS_HOMING requires X_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to X_MIN." #endif - #elif X_SENSORLESS && X_HOME_DIR > 0 && X_MAX_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING + #elif X_SENSORLESS && X_HOME_TO_MAX && X_MAX_ENDSTOP_INVERTING != X_ENDSTOP_INVERTING #if X_ENDSTOP_INVERTING #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = true when homing to X_MAX." #else #error "SENSORLESS_HOMING requires X_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to X_MAX." #endif - #elif Y_SENSORLESS && Y_HOME_DIR < 0 && Y_MIN_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING + #elif Y_SENSORLESS && Y_HOME_TO_MIN && Y_MIN_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING #if Y_ENDSTOP_INVERTING #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = true when homing to Y_MIN." #else #error "SENSORLESS_HOMING requires Y_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MIN." #endif - #elif Y_SENSORLESS && Y_HOME_DIR > 0 && Y_MAX_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING + #elif Y_SENSORLESS && Y_HOME_TO_MAX && Y_MAX_ENDSTOP_INVERTING != Y_ENDSTOP_INVERTING #if Y_ENDSTOP_INVERTING #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = true when homing to Y_MAX." #else #error "SENSORLESS_HOMING requires Y_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Y_MAX." #endif - #elif Z_SENSORLESS && Z_HOME_DIR < 0 && Z_MIN_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING + #elif Z_SENSORLESS && Z_HOME_TO_MIN && Z_MIN_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING #if Z_ENDSTOP_INVERTING #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = true when homing to Z_MIN." #else #error "SENSORLESS_HOMING requires Z_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MIN." #endif - #elif Z_SENSORLESS && Z_HOME_DIR > 0 && Z_MAX_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING + #elif Z_SENSORLESS && Z_HOME_TO_MAX && Z_MAX_ENDSTOP_INVERTING != Z_ENDSTOP_INVERTING #if Z_ENDSTOP_INVERTING #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = true when homing to Z_MAX." #else #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MAX." #endif + #elif LINEAR_AXES >= 4 && I_SENSORLESS && I_HOME_TO_MIN && I_MIN_ENDSTOP_INVERTING != I_ENDSTOP_INVERTING + #if I_ENDSTOP_INVERTING + #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_INVERTING = true when homing to I_MIN." + #else + #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to I_MIN." + #endif + #elif LINEAR_AXES >= 4 && I_SENSORLESS && I_HOME_TO_MAX && I_MAX_ENDSTOP_INVERTING != I_ENDSTOP_INVERTING + #if I_ENDSTOP_INVERTING + #error "SENSORLESS_HOMING requires I_MAX_ENDSTOP_INVERTING = true when homing to I_MAX." + #else + #error "SENSORLESS_HOMING requires I_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to I_MAX." + #endif + #elif LINEAR_AXES >= 5 && J_SENSORLESS && J_HOME_TO_MIN && J_MIN_ENDSTOP_INVERTING != J_ENDSTOP_INVERTING + #if J_ENDSTOP_INVERTING + #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_INVERTING = true when homing to J_MIN." + #else + #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to J_MIN." + #endif + #elif LINEAR_AXES >= 5 && J_SENSORLESS && J_HOME_TO_MAX && J_MAX_ENDSTOP_INVERTING != J_ENDSTOP_INVERTING + #if J_ENDSTOP_INVERTING + #error "SENSORLESS_HOMING requires J_MAX_ENDSTOP_INVERTING = true when homing to J_MAX." + #else + #error "SENSORLESS_HOMING requires J_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to J_MAX." + #endif + #elif LINEAR_AXES >= 6 && K_SENSORLESS && K_HOME_TO_MIN && K_MIN_ENDSTOP_INVERTING != K_ENDSTOP_INVERTING + #if K_ENDSTOP_INVERTING + #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_INVERTING = true when homing to K_MIN." + #else + #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to K_MIN." + #endif + #elif LINEAR_AXES >= 6 && K_SENSORLESS && K_HOME_TO_MAX && K_MAX_ENDSTOP_INVERTING != K_ENDSTOP_INVERTING + #if K_ENDSTOP_INVERTING + #error "SENSORLESS_HOMING requires K_MAX_ENDSTOP_INVERTING = true when homing to K_MAX." + #else + #error "SENSORLESS_HOMING requires K_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to K_MAX." + #endif #endif #endif @@ -2688,6 +3118,9 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #undef X_ENDSTOP_INVERTING #undef Y_ENDSTOP_INVERTING #undef Z_ENDSTOP_INVERTING + #undef I_ENDSTOP_INVERTING + #undef J_ENDSTOP_INVERTING + #undef K_ENDSTOP_INVERTING #endif // Sensorless probing requirements @@ -2750,6 +3183,12 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #define CS_COMPARE Z2_CS_PIN #elif IN_CHAIN(Z3) #define CS_COMPARE Z3_CS_PIN + #elif IN_CHAIN(I) + #define CS_COMPARE I_CS_PIN + #elif IN_CHAIN(J) + #define CS_COMPARE J_CS_PIN + #elif IN_CHAIN(K) + #define CS_COMPARE K_CS_PIN #elif IN_CHAIN(E0) #define CS_COMPARE E0_CS_PIN #elif IN_CHAIN(E1) @@ -2769,6 +3208,7 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #endif #define BAD_CS_PIN(A) (IN_CHAIN(A) && A##_CS_PIN != CS_COMPARE) #if BAD_CS_PIN(X ) || BAD_CS_PIN(Y ) || BAD_CS_PIN(Z ) || BAD_CS_PIN(X2) || BAD_CS_PIN(Y2) || BAD_CS_PIN(Z2) || BAD_CS_PIN(Z3) || BAD_CS_PIN(Z4) \ + || BAD_CS_PIN(I) || BAD_CS_PIN(J) || BAD_CS_PIN(K) \ || BAD_CS_PIN(E0) || BAD_CS_PIN(E1) || BAD_CS_PIN(E2) || BAD_CS_PIN(E3) || BAD_CS_PIN(E4) || BAD_CS_PIN(E5) || BAD_CS_PIN(E6) || BAD_CS_PIN(E7) #error "All chained TMC drivers must use the same CS pin." #endif @@ -2779,13 +3219,20 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal #endif #undef IN_CHAIN +/** + * L64XX requirement + */ +#if HAS_L64XX && LINEAR_AXES >= 4 + #error "L64XX requires LINEAR_AXES 3. Homing with L64XX is not yet implemented for LINEAR_AXES > 3." +#endif + /** * Digipot requirement */ #if HAS_MOTOR_CURRENT_I2C #if BOTH(DIGIPOT_MCP4018, DIGIPOT_MCP4451) #error "Enable only one of DIGIPOT_MCP4018 or DIGIPOT_MCP4451." - #elif !MB(MKS_SBASE) \ + #elif !MB(MKS_SBASE, AZTEEG_X5_GT, AZTEEG_X5_MINI, AZTEEG_X5_MINI_WIFI) \ && (!defined(DIGIPOTS_I2C_SDA_X) || !defined(DIGIPOTS_I2C_SDA_Y) || !defined(DIGIPOTS_I2C_SDA_Z) || !defined(DIGIPOTS_I2C_SDA_E0) || !defined(DIGIPOTS_I2C_SDA_E1)) #error "DIGIPOT_MCP4018/4451 requires DIGIPOTS_I2C_SDA_* pins to be defined." #endif @@ -2794,70 +3241,65 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal /** * Check per-axis initializers for errors */ -constexpr float sanity_arr_1[] = DEFAULT_AXIS_STEPS_PER_UNIT, - sanity_arr_2[] = DEFAULT_MAX_FEEDRATE, - sanity_arr_3[] = DEFAULT_MAX_ACCELERATION; -#define _ARR_TEST(N,I) (sanity_arr_##N[_MIN(I,int(COUNT(sanity_arr_##N))-1)] > 0) +#define __PLUS_TEST(I,A) && (sanity_arr_##A[_MIN(I,signed(COUNT(sanity_arr_##A)-1))] > 0) +#define _PLUS_TEST(A) (1 REPEAT2(14,__PLUS_TEST,A)) +#if HAS_MULTI_EXTRUDER + #define _EXTRA_NOTE " (Did you forget to enable DISTINCT_E_FACTORS?)" +#else + #define _EXTRA_NOTE " (Should be " STRINGIFY(LINEAR_AXES) "+" STRINGIFY(E_STEPPERS) ")" +#endif + +constexpr float sanity_arr_1[] = DEFAULT_AXIS_STEPS_PER_UNIT; +static_assert(COUNT(sanity_arr_1) >= LOGICAL_AXES, "DEFAULT_AXIS_STEPS_PER_UNIT requires " _LOGICAL_AXES_STR "elements."); +static_assert(COUNT(sanity_arr_1) <= DISTINCT_AXES, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements." _EXTRA_NOTE); +static_assert(_PLUS_TEST(1), "DEFAULT_AXIS_STEPS_PER_UNIT values must be positive."); -static_assert(COUNT(sanity_arr_1) >= XYZE, "DEFAULT_AXIS_STEPS_PER_UNIT requires X, Y, Z and E elements."); -static_assert(COUNT(sanity_arr_1) <= XYZE_N, "DEFAULT_AXIS_STEPS_PER_UNIT has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)"); -static_assert( _ARR_TEST(1,0) && _ARR_TEST(1,1) && _ARR_TEST(1,2) - && _ARR_TEST(1,3) && _ARR_TEST(1,4) && _ARR_TEST(1,5) - && _ARR_TEST(1,6) && _ARR_TEST(1,7) && _ARR_TEST(1,8), - "DEFAULT_AXIS_STEPS_PER_UNIT values must be positive."); +constexpr float sanity_arr_2[] = DEFAULT_MAX_FEEDRATE; +static_assert(COUNT(sanity_arr_2) >= LOGICAL_AXES, "DEFAULT_MAX_FEEDRATE requires " _LOGICAL_AXES_STR "elements."); +static_assert(COUNT(sanity_arr_2) <= DISTINCT_AXES, "DEFAULT_MAX_FEEDRATE has too many elements." _EXTRA_NOTE); +static_assert(_PLUS_TEST(2), "DEFAULT_MAX_FEEDRATE values must be positive."); -static_assert(COUNT(sanity_arr_2) >= XYZE, "DEFAULT_MAX_FEEDRATE requires X, Y, Z and E elements."); -static_assert(COUNT(sanity_arr_2) <= XYZE_N, "DEFAULT_MAX_FEEDRATE has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)"); -static_assert( _ARR_TEST(2,0) && _ARR_TEST(2,1) && _ARR_TEST(2,2) - && _ARR_TEST(2,3) && _ARR_TEST(2,4) && _ARR_TEST(2,5) - && _ARR_TEST(2,6) && _ARR_TEST(2,7) && _ARR_TEST(2,8), - "DEFAULT_MAX_FEEDRATE values must be positive."); +constexpr float sanity_arr_3[] = DEFAULT_MAX_ACCELERATION; +static_assert(COUNT(sanity_arr_3) >= LOGICAL_AXES, "DEFAULT_MAX_ACCELERATION requires " _LOGICAL_AXES_STR "elements."); +static_assert(COUNT(sanity_arr_3) <= DISTINCT_AXES, "DEFAULT_MAX_ACCELERATION has too many elements." _EXTRA_NOTE); +static_assert(_PLUS_TEST(3), "DEFAULT_MAX_ACCELERATION values must be positive."); -static_assert(COUNT(sanity_arr_3) >= XYZE, "DEFAULT_MAX_ACCELERATION requires X, Y, Z and E elements."); -static_assert(COUNT(sanity_arr_3) <= XYZE_N, "DEFAULT_MAX_ACCELERATION has too many elements. (Did you forget to enable DISTINCT_E_FACTORS?)"); -static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) - && _ARR_TEST(3,3) && _ARR_TEST(3,4) && _ARR_TEST(3,5) - && _ARR_TEST(3,6) && _ARR_TEST(3,7) && _ARR_TEST(3,8), - "DEFAULT_MAX_ACCELERATION values must be positive."); +constexpr float sanity_arr_4[] = HOMING_FEEDRATE_MM_M; +static_assert(COUNT(sanity_arr_4) == LINEAR_AXES, "HOMING_FEEDRATE_MM_M requires " _LINEAR_AXES_STR "elements (and no others)."); +static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive."); -#if ENABLED(LIMITED_MAX_ACCEL_EDITING) - #ifdef MAX_ACCEL_EDIT_VALUES - constexpr float sanity_arr_4[] = MAX_ACCEL_EDIT_VALUES; - static_assert(COUNT(sanity_arr_4) >= XYZE, "MAX_ACCEL_EDIT_VALUES requires X, Y, Z and E elements."); - static_assert(COUNT(sanity_arr_4) <= XYZE, "MAX_ACCEL_EDIT_VALUES has too many elements. X, Y, Z and E elements only."); - static_assert( _ARR_TEST(4,0) && _ARR_TEST(4,1) && _ARR_TEST(4,2) - && _ARR_TEST(4,3) && _ARR_TEST(4,4) && _ARR_TEST(4,5) - && _ARR_TEST(4,6) && _ARR_TEST(4,7) && _ARR_TEST(4,8), - "MAX_ACCEL_EDIT_VALUES values must be positive."); - #endif +#ifdef MAX_ACCEL_EDIT_VALUES + constexpr float sanity_arr_5[] = MAX_ACCEL_EDIT_VALUES; + static_assert(COUNT(sanity_arr_5) >= LOGICAL_AXES, "MAX_ACCEL_EDIT_VALUES requires " _LOGICAL_AXES_STR "elements."); + static_assert(COUNT(sanity_arr_5) <= LOGICAL_AXES, "MAX_ACCEL_EDIT_VALUES has too many elements. " _LOGICAL_AXES_STR "elements only."); + static_assert(_PLUS_TEST(5), "MAX_ACCEL_EDIT_VALUES values must be positive."); #endif -#if ENABLED(LIMITED_MAX_FR_EDITING) - #ifdef MAX_FEEDRATE_EDIT_VALUES - constexpr float sanity_arr_5[] = MAX_FEEDRATE_EDIT_VALUES; - static_assert(COUNT(sanity_arr_5) >= XYZE, "MAX_FEEDRATE_EDIT_VALUES requires X, Y, Z and E elements."); - static_assert(COUNT(sanity_arr_5) <= XYZE, "MAX_FEEDRATE_EDIT_VALUES has too many elements. X, Y, Z and E elements only."); - static_assert( _ARR_TEST(5,0) && _ARR_TEST(5,1) && _ARR_TEST(5,2) - && _ARR_TEST(5,3) && _ARR_TEST(5,4) && _ARR_TEST(5,5) - && _ARR_TEST(5,6) && _ARR_TEST(5,7) && _ARR_TEST(5,8), - "MAX_FEEDRATE_EDIT_VALUES values must be positive."); - #endif +#ifdef MAX_FEEDRATE_EDIT_VALUES + constexpr float sanity_arr_6[] = MAX_FEEDRATE_EDIT_VALUES; + static_assert(COUNT(sanity_arr_6) >= LOGICAL_AXES, "MAX_FEEDRATE_EDIT_VALUES requires " _LOGICAL_AXES_STR "elements."); + static_assert(COUNT(sanity_arr_6) <= LOGICAL_AXES, "MAX_FEEDRATE_EDIT_VALUES has too many elements. " _LOGICAL_AXES_STR "elements only."); + static_assert(_PLUS_TEST(6), "MAX_FEEDRATE_EDIT_VALUES values must be positive."); #endif -#if ENABLED(LIMITED_JERK_EDITING) - #ifdef MAX_JERK_EDIT_VALUES - constexpr float sanity_arr_6[] = MAX_JERK_EDIT_VALUES; - static_assert(COUNT(sanity_arr_6) >= XYZE, "MAX_JERK_EDIT_VALUES requires X, Y, Z and E elements."); - static_assert(COUNT(sanity_arr_6) <= XYZE, "MAX_JERK_EDIT_VALUES has too many elements. X, Y, Z and E elements only."); - static_assert( _ARR_TEST(6,0) && _ARR_TEST(6,1) && _ARR_TEST(6,2) - && _ARR_TEST(6,3) && _ARR_TEST(6,4) && _ARR_TEST(6,5) - && _ARR_TEST(6,6) && _ARR_TEST(6,7) && _ARR_TEST(6,8), - "MAX_JERK_EDIT_VALUES values must be positive."); - #endif +#ifdef MAX_JERK_EDIT_VALUES + constexpr float sanity_arr_7[] = MAX_JERK_EDIT_VALUES; + static_assert(COUNT(sanity_arr_7) >= LOGICAL_AXES, "MAX_JERK_EDIT_VALUES requires " _LOGICAL_AXES_STR "elements."); + static_assert(COUNT(sanity_arr_7) <= LOGICAL_AXES, "MAX_JERK_EDIT_VALUES has too many elements. " _LOGICAL_AXES_STR "elements only."); + static_assert(_PLUS_TEST(7), "MAX_JERK_EDIT_VALUES values must be positive."); #endif -#undef _ARR_TEST +#ifdef MANUAL_FEEDRATE + constexpr float sanity_arr_8[] = MANUAL_FEEDRATE; + static_assert(COUNT(sanity_arr_8) >= LOGICAL_AXES, "MANUAL_FEEDRATE requires " _LOGICAL_AXES_STR "elements."); + static_assert(COUNT(sanity_arr_8) <= LOGICAL_AXES, "MANUAL_FEEDRATE has too many elements. " _LOGICAL_AXES_STR "elements only."); + static_assert(_PLUS_TEST(8), "MANUAL_FEEDRATE values must be positive."); +#endif + +#undef __PLUS_TEST +#undef _PLUS_TEST +#undef _EXTRA_NOTE #if BOTH(CNC_COORDINATE_SYSTEMS, NO_WORKSPACE_OFFSETS) #error "CNC_COORDINATE_SYSTEMS is incompatible with NO_WORKSPACE_OFFSETS." @@ -2891,12 +3333,18 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #endif -#if ENABLED(BACKUP_POWER_SUPPLY) && !PIN_EXISTS(POWER_LOSS) - #error "BACKUP_POWER_SUPPLY requires a POWER_LOSS_PIN." -#endif - -#if BOTH(POWER_LOSS_PULLUP, POWER_LOSS_PULLDOWN) - #error "You can't enable POWER_LOSS_PULLUP and POWER_LOSS_PULLDOWN at the same time." +#if ENABLED(POWER_LOSS_RECOVERY) + #if ENABLED(BACKUP_POWER_SUPPLY) && !PIN_EXISTS(POWER_LOSS) + #error "BACKUP_POWER_SUPPLY requires a POWER_LOSS_PIN." + #elif BOTH(POWER_LOSS_RECOVER_ZHOME, Z_SAFE_HOMING) + #error "POWER_LOSS_RECOVER_ZHOME cannot be used with Z_SAFE_HOMING." + #elif BOTH(POWER_LOSS_PULLUP, POWER_LOSS_PULLDOWN) + #error "You can't enable POWER_LOSS_PULLUP and POWER_LOSS_PULLDOWN at the same time." + #elif ENABLED(POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MAX + #error "POWER_LOSS_RECOVER_ZHOME is not needed on a machine that homes to ZMAX." + #elif BOTH(IS_CARTESIAN, POWER_LOSS_RECOVER_ZHOME) && Z_HOME_TO_MIN && !defined(POWER_LOSS_ZHOME_POS) + #error "POWER_LOSS_RECOVER_ZHOME requires POWER_LOSS_ZHOME_POS for a Cartesian that homes to ZMIN." + #endif #endif #if ENABLED(Z_STEPPER_AUTO_ALIGN) @@ -2921,16 +3369,16 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #error "MECHANICAL_GANTRY_CALIBRATION Requires GANTRY_CALIBRATION_EXTRA_HEIGHT to be set." #elif !defined(GANTRY_CALIBRATION_FEEDRATE) #error "MECHANICAL_GANTRY_CALIBRATION Requires GANTRY_CALIBRATION_FEEDRATE to be set." + #elif ENABLED(Z_MULTI_ENDSTOPS) + #error "Sorry! MECHANICAL_GANTRY_CALIBRATION cannot be used with Z_MULTI_ENDSTOPS." + #elif ENABLED(Z_STEPPER_AUTO_ALIGN) + #error "Sorry! MECHANICAL_GANTRY_CALIBRATION cannot be used with Z_STEPPER_AUTO_ALIGN." #endif #if defined(GANTRY_CALIBRATION_SAFE_POSITION) && !defined(GANTRY_CALIBRATION_XY_PARK_FEEDRATE) #error "GANTRY_CALIBRATION_SAFE_POSITION Requires GANTRY_CALIBRATION_XY_PARK_FEEDRATE to be set." #endif #endif -#if BOTH(Z_STEPPER_AUTO_ALIGN, MECHANICAL_GANTRY_CALIBRATION) - #error "You cannot use Z_STEPPER_AUTO_ALIGN and MECHANICAL_GANTRY_CALIBRATION at the same time." -#endif - #if ENABLED(PRINTCOUNTER) && DISABLED(EEPROM_SETTINGS) #error "PRINTCOUNTER requires EEPROM_SETTINGS." #endif @@ -2951,109 +3399,6 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #error "GCODE_MACROS_SLOTS must be a number from 1 to 10." #endif -#if ENABLED(CUSTOM_USER_MENUS) - #ifdef USER_GCODE_1 - constexpr char _chr1 = USER_GCODE_1[strlen(USER_GCODE_1) - 1]; - static_assert(_chr1 != '\n' && _chr1 != '\r', "USER_GCODE_1 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_2 - constexpr char _chr2 = USER_GCODE_2[strlen(USER_GCODE_2) - 1]; - static_assert(_chr2 != '\n' && _chr2 != '\r', "USER_GCODE_2 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_3 - constexpr char _chr3 = USER_GCODE_3[strlen(USER_GCODE_3) - 1]; - static_assert(_chr3 != '\n' && _chr3 != '\r', "USER_GCODE_3 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_4 - constexpr char _chr4 = USER_GCODE_4[strlen(USER_GCODE_4) - 1]; - static_assert(_chr4 != '\n' && _chr4 != '\r', "USER_GCODE_4 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_5 - constexpr char _chr5 = USER_GCODE_5[strlen(USER_GCODE_5) - 1]; - static_assert(_chr5 != '\n' && _chr5 != '\r', "USER_GCODE_5 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_6 - constexpr char _chr6 = USER_GCODE_6[strlen(USER_GCODE_6) - 1]; - static_assert(_chr6 != '\n' && _chr6 != '\r', "USER_GCODE_6 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_7 - constexpr char _chr7 = USER_GCODE_7[strlen(USER_GCODE_7) - 1]; - static_assert(_chr7 != '\n' && _chr7 != '\r', "USER_GCODE_7 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_8 - constexpr char _chr8 = USER_GCODE_8[strlen(USER_GCODE_8) - 1]; - static_assert(_chr8 != '\n' && _chr8 != '\r', "USER_GCODE_8 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_9 - constexpr char _chr9 = USER_GCODE_9[strlen(USER_GCODE_9) - 1]; - static_assert(_chr9 != '\n' && _chr9 != '\r', "USER_GCODE_9 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_10 - constexpr char _chr10 = USER_GCODE_10[strlen(USER_GCODE_10) - 1]; - static_assert(_chr10 != '\n' && _chr10 != '\r', "USER_GCODE_10 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_11 - constexpr char _chr11 = USER_GCODE_11[strlen(USER_GCODE_11) - 1]; - static_assert(_chr11 != '\n' && _chr11 != '\r', "USER_GCODE_11 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_12 - constexpr char _chr12 = USER_GCODE_12[strlen(USER_GCODE_12) - 1]; - static_assert(_chr12 != '\n' && _chr12 != '\r', "USER_GCODE_12 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_13 - constexpr char _chr13 = USER_GCODE_13[strlen(USER_GCODE_13) - 1]; - static_assert(_chr13 != '\n' && _chr13 != '\r', "USER_GCODE_13 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_14 - constexpr char _chr14 = USER_GCODE_14[strlen(USER_GCODE_14) - 1]; - static_assert(_chr14 != '\n' && _chr14 != '\r', "USER_GCODE_14 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_15 - constexpr char _chr15 = USER_GCODE_15[strlen(USER_GCODE_15) - 1]; - static_assert(_chr15 != '\n' && _chr15 != '\r', "USER_GCODE_15 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_16 - constexpr char _chr16 = USER_GCODE_16[strlen(USER_GCODE_16) - 1]; - static_assert(_chr16 != '\n' && _chr16 != '\r', "USER_GCODE_16 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_17 - constexpr char _chr17 = USER_GCODE_17[strlen(USER_GCODE_17) - 1]; - static_assert(_chr17 != '\n' && _chr17 != '\r', "USER_GCODE_17 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_18 - constexpr char _chr18 = USER_GCODE_18[strlen(USER_GCODE_18) - 1]; - static_assert(_chr18 != '\n' && _chr18 != '\r', "USER_GCODE_18 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_19 - constexpr char _chr19 = USER_GCODE_19[strlen(USER_GCODE_19) - 1]; - static_assert(_chr19 != '\n' && _chr19 != '\r', "USER_GCODE_19 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_20 - constexpr char _chr20 = USER_GCODE_20[strlen(USER_GCODE_20) - 1]; - static_assert(_chr20 != '\n' && _chr20 != '\r', "USER_GCODE_20 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_21 - constexpr char _chr21 = USER_GCODE_21[strlen(USER_GCODE_21) - 1]; - static_assert(_chr21 != '\n' && _chr21 != '\r', "USER_GCODE_21 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_22 - constexpr char _chr22 = USER_GCODE_22[strlen(USER_GCODE_22) - 1]; - static_assert(_chr22 != '\n' && _chr22 != '\r', "USER_GCODE_22 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_23 - constexpr char _chr23 = USER_GCODE_23[strlen(USER_GCODE_23) - 1]; - static_assert(_chr23 != '\n' && _chr23 != '\r', "USER_GCODE_23 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_24 - constexpr char _chr24 = USER_GCODE_24[strlen(USER_GCODE_24) - 1]; - static_assert(_chr24 != '\n' && _chr24 != '\r', "USER_GCODE_24 cannot have a newline at the end. Please remove it."); - #endif - #ifdef USER_GCODE_25 - constexpr char _chr25 = USER_GCODE_25[strlen(USER_GCODE_25) - 1]; - static_assert(_chr25 != '\n' && _chr25 != '\r', "USER_GCODE_25 cannot have a newline at the end. Please remove it."); - #endif -#endif - #if ENABLED(BACKLASH_COMPENSATION) #ifndef BACKLASH_DISTANCE_MM #error "BACKLASH_COMPENSATION requires BACKLASH_DISTANCE_MM." @@ -3065,8 +3410,10 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) "BACKLASH_COMPENSATION can only apply to " STRINGIFY(NORMAL_AXIS) " on a MarkForged system."); #elif IS_CORE constexpr float backlash_arr[] = BACKLASH_DISTANCE_MM; - static_assert(!backlash_arr[CORE_AXIS_1] && !backlash_arr[CORE_AXIS_2], + #ifndef CORE_BACKLASH + static_assert(!backlash_arr[CORE_AXIS_1] && !backlash_arr[CORE_AXIS_2], "BACKLASH_COMPENSATION can only apply to " STRINGIFY(NORMAL_AXIS) " with your CORE system."); + #endif #endif #endif @@ -3115,6 +3462,13 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #endif +/** + * Validate MKS_PWC + */ +#if ENABLED(MKS_PWC) && PSU_ACTIVE_STATE != HIGH + #error "MKS_PWC requires PSU_ACTIVE_STATE to be set HIGH." +#endif + /** * Ensure this option is set intentionally */ @@ -3142,8 +3496,8 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #error "LASER_MOVE_G0_OFF requires LASER_MOVE_POWER." #endif #if ENABLED(LASER_POWER_INLINE_TRAPEZOID) - #if DISABLED(SPINDLE_LASER_PWM) - #error "LASER_POWER_INLINE_TRAPEZOID requires SPINDLE_LASER_PWM to function." + #if DISABLED(SPINDLE_LASER_USE_PWM) + #error "LASER_POWER_INLINE_TRAPEZOID requires SPINDLE_LASER_USE_PWM to function." #elif ENABLED(S_CURVE_ACCELERATION) //#ifndef LASER_POWER_INLINE_S_CURVE_ACCELERATION_WARN // #define LASER_POWER_INLINE_S_CURVE_ACCELERATION_WARN @@ -3175,21 +3529,21 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #error "(SPINDLE|LASER)_FEATURE requires SPINDLE_LASER_ENA_PIN or SPINDLE_SERVO to control the power." #elif ENABLED(SPINDLE_CHANGE_DIR) && !PIN_EXISTS(SPINDLE_DIR) #error "SPINDLE_DIR_PIN is required for SPINDLE_CHANGE_DIR." - #elif ENABLED(SPINDLE_LASER_PWM) + #elif ENABLED(SPINDLE_LASER_USE_PWM) #if !defined(SPINDLE_LASER_PWM_PIN) || SPINDLE_LASER_PWM_PIN < 0 - #error "SPINDLE_LASER_PWM_PIN is required for SPINDLE_LASER_PWM." + #error "SPINDLE_LASER_PWM_PIN is required for SPINDLE_LASER_USE_PWM." #elif !_TEST_PWM(SPINDLE_LASER_PWM_PIN) #error "SPINDLE_LASER_PWM_PIN not assigned to a PWM pin." #elif !defined(SPINDLE_LASER_PWM_INVERT) #error "SPINDLE_LASER_PWM_INVERT is required for (SPINDLE|LASER)_FEATURE." #elif !(defined(SPEED_POWER_INTERCEPT) && defined(SPEED_POWER_MIN) && defined(SPEED_POWER_MAX) && defined(SPEED_POWER_STARTUP)) - #error "SPINDLE_LASER_PWM equation constant(s) missing." + #error "SPINDLE_LASER_USE_PWM equation constant(s) missing." #elif _PIN_CONFLICT(X_MIN) - #error "SPINDLE_LASER_PWM pin conflicts with X_MIN_PIN." + #error "SPINDLE_LASER_USE_PWM pin conflicts with X_MIN_PIN." #elif _PIN_CONFLICT(X_MAX) - #error "SPINDLE_LASER_PWM pin conflicts with X_MAX_PIN." + #error "SPINDLE_LASER_USE_PWM pin conflicts with X_MAX_PIN." #elif _PIN_CONFLICT(Z_STEP) - #error "SPINDLE_LASER_PWM pin conflicts with Z_STEP_PIN." + #error "SPINDLE_LASER_USE_PWM pin conflicts with Z_STEP_PIN." #elif _PIN_CONFLICT(CASE_LIGHT) #error "SPINDLE_LASER_PWM_PIN conflicts with CASE_LIGHT_PIN." #elif _PIN_CONFLICT(E0_AUTO_FAN) @@ -3237,6 +3591,12 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #undef _PIN_CONFLICT #endif +#if ENABLED(COOLANT_MIST) && !PIN_EXISTS(COOLANT_MIST) + #error "COOLANT_MIST requires COOLANT_MIST_PIN to be defined." +#elif ENABLED(COOLANT_FLOOD) && !PIN_EXISTS(COOLANT_FLOOD) + #error "COOLANT_FLOOD requires COOLANT_FLOOD_PIN to be defined." +#endif + #if NONE(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI) && ENABLED(PRINT_PROGRESS_SHOW_DECIMALS) #error "PRINT_PROGRESS_SHOW_DECIMALS currently requires a Graphical LCD." #endif @@ -3259,28 +3619,11 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif /** - * Stepper Chunk support + * Touch Screen Calibration */ -#if BOTH(DIRECT_STEPPING, LIN_ADVANCE) - #error "DIRECT_STEPPING is incompatible with LIN_ADVANCE. Enable in external planner if possible." -#endif - -/** - * Touch Buttons - */ -#if ENABLED(TOUCH_SCREEN) && DISABLED(TOUCH_SCREEN_CALIBRATION) - #ifndef TOUCH_CALIBRATION_X - #error "TOUCH_CALIBRATION_X must be defined with TOUCH_SCREEN." - #endif - #ifndef TOUCH_CALIBRATION_Y - #error "TOUCH_CALIBRATION_Y must be defined with TOUCH_SCREEN." - #endif - #ifndef TOUCH_OFFSET_X - #error "TOUCH_OFFSET_X must be defined with TOUCH_SCREEN." - #endif - #ifndef TOUCH_OFFSET_Y - #error "TOUCH_OFFSET_Y must be defined with TOUCH_SCREEN." - #endif +#if ENABLED(TFT_TOUCH_DEVICE_XPT2046) && DISABLED(TOUCH_SCREEN_CALIBRATION) \ + && (!defined(TOUCH_CALIBRATION_X) || !defined(TOUCH_CALIBRATION_Y) || !defined(TOUCH_OFFSET_X) || !defined(TOUCH_OFFSET_Y)) + #error "TOUCH_CALIBRATION_[XY] and TOUCH_OFFSET_[XY] are required for resistive touch screens with TOUCH_SCREEN_CALIBRATION disabled." #endif /** @@ -3301,12 +3644,40 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #endif - /** * Sanity Check for MEATPACK and BINARY_FILE_TRANSFER Features */ -#if BOTH(MEATPACK, BINARY_FILE_TRANSFER) - #error "Either enable MEATPACK or enable BINARY_FILE_TRANSFER." +#if BOTH(HAS_MEATPACK, BINARY_FILE_TRANSFER) + #error "Either enable MEATPACK_ON_SERIAL_PORT_* or BINARY_FILE_TRANSFER, not both." +#endif + +/** + * Sanity Check for Slim LCD Menus and Probe Offset Wizard + */ +#if BOTH(SLIM_LCD_MENUS, PROBE_OFFSET_WIZARD) + #error "SLIM_LCD_MENUS disables \"Advanced Settings > Probe Offsets > PROBE_OFFSET_WIZARD.\"" +#endif + +/** + * Sanity check for unique start and stop values in NOZZLE_CLEAN_FEATURE + */ +#if ENABLED(NOZZLE_CLEAN_FEATURE) + constexpr xyz_pos_t start_xyz[8] = NOZZLE_CLEAN_START_POINT, + end_xyz[8] = NOZZLE_CLEAN_END_POINT; + #define _CLEAN_ASSERT(N) static_assert(N >= HOTENDS || end_xyz[N].x != start_xyz[N].x || TERN(NOZZLE_CLEAN_NO_Y, false, end_xyz[N].y != start_xyz[N].y), \ + "NOZZLE_CLEAN Start and End must be made different on HOTEND " STRINGIFY(N)) + _CLEAN_ASSERT(0); _CLEAN_ASSERT(1); + _CLEAN_ASSERT(2); _CLEAN_ASSERT(3); + _CLEAN_ASSERT(4); _CLEAN_ASSERT(5); + _CLEAN_ASSERT(6); _CLEAN_ASSERT(7); + #undef _CLEAN_ASSERT +#endif + +/** + * Sanity check for MIXING_EXTRUDER & DISTINCT_E_FACTORS these are not compatible + */ +#if BOTH(MIXING_EXTRUDER, DISTINCT_E_FACTORS) + #error "MIXING_EXTRUDER can't be used with DISTINCT_E_FACTORS. But you may use SINGLENOZZLE with DISTINCT_E_FACTORS." #endif /** @@ -3322,6 +3693,22 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #if _BAD_DRIVER(Z) #error "Z_DRIVER_TYPE is not recognized." #endif +#if LINEAR_AXES >= 4 + #if _BAD_DRIVER(I) + #error "I_DRIVER_TYPE is not recognized." + #endif +#endif +#if LINEAR_AXES >= 5 + #if _BAD_DRIVER(J) + #error "J_DRIVER_TYPE is not recognized." + #endif +#endif +#if LINEAR_AXES >= 6 + #if _BAD_DRIVER(K) + #error "K_DRIVER_TYPE is not recognized." + #endif +#endif + #if _BAD_DRIVER(X2) #error "X2_DRIVER_TYPE is not recognized." #endif @@ -3363,5 +3750,36 @@ static_assert( _ARR_TEST(3,0) && _ARR_TEST(3,1) && _ARR_TEST(3,2) #endif #undef _BAD_DRIVER +/** + * Require certain features for DGUS_LCD_UI_RELOADED. + */ +#if ENABLED(DGUS_LCD_UI_RELOADED) + #if BUFSIZE < 4 + #error "DGUS_LCD_UI_RELOADED requires a BUFSIZE of at least 4." + #elif HOTENDS < 1 + #error "DGUS_LCD_UI_RELOADED requires at least 1 hotend." + #elif EXTRUDERS < 1 + #error "DGUS_LCD_UI_RELOADED requires at least 1 extruder." + #elif !HAS_HEATED_BED + #error "DGUS_LCD_UI_RELOADED requires a heated bed." + #elif FAN_COUNT < 1 + #error "DGUS_LCD_UI_RELOADED requires a fan." + #elif !HAS_BED_PROBE + #error "DGUS_LCD_UI_RELOADED requires a bed probe." + #elif !HAS_MESH + #error "DGUS_LCD_UI_RELOADED requires mesh leveling." + #elif DISABLED(LEVEL_BED_CORNERS) + #error "DGUS_LCD_UI_RELOADED requires LEVEL_BED_CORNERS." + #elif DISABLED(BABYSTEP_ALWAYS_AVAILABLE) + #error "DGUS_LCD_UI_RELOADED requires BABYSTEP_ALWAYS_AVAILABLE." + #elif DISABLED(BABYSTEP_ZPROBE_OFFSET) + #error "DGUS_LCD_UI_RELOADED requires BABYSTEP_ZPROBE_OFFSET." + #elif ENABLED(AUTO_BED_LEVELING_UBL) && DISABLED(UBL_SAVE_ACTIVE_ON_M500) + #warning "Without UBL_SAVE_ACTIVE_ON_M500, your mesh will not be saved when using the touchscreen." + #endif +#endif + // Misc. Cleanup #undef _TEST_PWM +#undef _LINEAR_AXES_STR +#undef _LOGICAL_AXES_STR diff --git a/Marlin/src/inc/Version.h b/Marlin/src/inc/Version.h index 46929c85c2ef..12baa64fe7aa 100644 --- a/Marlin/src/inc/Version.h +++ b/Marlin/src/inc/Version.h @@ -25,7 +25,7 @@ * Release version. Leave the Marlin version or apply a custom scheme. */ #ifndef SHORT_BUILD_VERSION - #define SHORT_BUILD_VERSION "bugfix-2.0.x" + #define SHORT_BUILD_VERSION "2.0.9.2" #endif /** @@ -42,7 +42,7 @@ * version was tagged. */ #ifndef STRING_DISTRIBUTION_DATE - #define STRING_DISTRIBUTION_DATE "2021-02-04" + #define STRING_DISTRIBUTION_DATE "2021-09-03" #endif /** @@ -52,7 +52,7 @@ * to alert users to major changes. */ -#define MARLIN_HEX_VERSION 020008 +#define MARLIN_HEX_VERSION 02000902 #ifndef REQUIRED_CONFIGURATION_H_VERSION #define REQUIRED_CONFIGURATION_H_VERSION MARLIN_HEX_VERSION #endif @@ -105,18 +105,18 @@ * Currently only supported by DUE platform */ #ifndef USB_DEVICE_VENDOR_ID - #define USB_DEVICE_VENDOR_ID 0x03EB /* ATMEL VID */ + #define USB_DEVICE_VENDOR_ID 0x03EB /* ATMEL VID */ #endif #ifndef USB_DEVICE_PRODUCT_ID - #define USB_DEVICE_PRODUCT_ID 0x2424 /* MSC / CDC */ + #define USB_DEVICE_PRODUCT_ID 0x2424 /* MSC / CDC */ #endif //! USB Device string definitions (Optional) #ifndef USB_DEVICE_MANUFACTURE_NAME - #define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL + #define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL #endif #ifdef CUSTOM_MACHINE_NAME - #define USB_DEVICE_PRODUCT_NAME CUSTOM_MACHINE_NAME + #define USB_DEVICE_PRODUCT_NAME CUSTOM_MACHINE_NAME #else - #define USB_DEVICE_PRODUCT_NAME MACHINE_NAME + #define USB_DEVICE_PRODUCT_NAME MACHINE_NAME #endif -#define USB_DEVICE_SERIAL_NAME "123985739853" +#define USB_DEVICE_SERIAL_NAME "123985739853" diff --git a/Marlin/src/inc/Warnings.cpp b/Marlin/src/inc/Warnings.cpp new file mode 100644 index 000000000000..a210c1b0fc50 --- /dev/null +++ b/Marlin/src/inc/Warnings.cpp @@ -0,0 +1,482 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Warnings.cpp + * Test configuration values and give warnings at compile-time. + */ + +#include "MarlinConfig.h" + +// +// Warnings! Located here so they will appear just once in the build output. +// + +#if ENABLED(MARLIN_DEV_MODE) + #warning "WARNING! Disable MARLIN_DEV_MODE for the final build!" +#endif + +// Safety Features +#if DISABLED(USE_WATCHDOG) + #warning "Safety Alert! Enable USE_WATCHDOG for the final build!" +#endif +#if HAS_HOTEND && DISABLED(THERMAL_PROTECTION_HOTENDS) + #warning "Safety Alert! Enable THERMAL_PROTECTION_HOTENDS for the final build!" +#endif +#if HAS_HEATED_BED && DISABLED(THERMAL_PROTECTION_BED) + #warning "Safety Alert! Enable THERMAL_PROTECTION_BED for the final build!" +#endif +#if HAS_HEATED_CHAMBER && DISABLED(THERMAL_PROTECTION_CHAMBER) + #warning "Safety Alert! Enable THERMAL_PROTECTION_CHAMBER for the final build!" +#endif +#if HAS_COOLER && DISABLED(THERMAL_PROTECTION_COOLER) + #warning "Safety Alert! Enable THERMAL_PROTECTION_COOLER for the final build!" +#endif +#if ANY_THERMISTOR_IS(998) || ANY_THERMISTOR_IS(999) + #warning "Warning! Don't use dummy thermistors (998/999) for final build!" +#endif + +#if NONE(HAS_RESUME_CONTINUE, HOST_PROMPT_SUPPORT) + #warning "Your Configuration provides no method to acquire user feedback!" +#endif + +#if AUTO_ASSIGNED_X2_STEPPER + #warning "Auto-assigned X2 STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs." +#endif +#if AUTO_ASSIGNED_X2_MS1 + #warning "Auto-assigned X2_MS1_PIN to an unused En_MS1_PIN." +#endif +#if AUTO_ASSIGNED_X2_MS2 + #warning "Auto-assigned X2_MS2_PIN to an unused En_MS2_PIN." +#endif +#if AUTO_ASSIGNED_X2_MS3 + #warning "Auto-assigned X2_MS3_PIN to an unused En_MS3_PIN." +#endif +#if AUTO_ASSIGNED_X2_CS + #warning "Auto-assigned X2_CS_PIN to an unused En_CS_PIN." +#endif +#if AUTO_ASSIGNED_X2_DIAG + #if X2_USE_ENDSTOP == _XMIN_ + #warning "Auto-assigned X2_DIAG_PIN to X_MIN_PIN." + #elif X2_USE_ENDSTOP == _XMAX_ + #warning "Auto-assigned X2_DIAG_PIN to X_MAX_PIN." + #elif X2_USE_ENDSTOP == _YMIN_ + #warning "Auto-assigned X2_DIAG_PIN to Y_MIN_PIN." + #elif X2_USE_ENDSTOP == _YMAX_ + #warning "Auto-assigned X2_DIAG_PIN to Y_MAX_PIN." + #elif X2_USE_ENDSTOP == _ZMIN_ + #warning "Auto-assigned X2_DIAG_PIN to Z_MIN_PIN." + #elif X2_USE_ENDSTOP == _ZMAX_ + #warning "Auto-assigned X2_DIAG_PIN to Z_MAX_PIN." + #elif X2_USE_ENDSTOP == _XDIAG_ + #warning "Auto-assigned X2_DIAG_PIN to X_DIAG_PIN." + #elif X2_USE_ENDSTOP == _YDIAG_ + #warning "Auto-assigned X2_DIAG_PIN to Y_DIAG_PIN." + #elif X2_USE_ENDSTOP == _ZDIAG_ + #warning "Auto-assigned X2_DIAG_PIN to Z_DIAG_PIN." + #elif X2_USE_ENDSTOP == _E0DIAG_ + #warning "Auto-assigned X2_DIAG_PIN to E0_DIAG_PIN." + #elif X2_USE_ENDSTOP == _E1DIAG_ + #warning "Auto-assigned X2_DIAG_PIN to E1_DIAG_PIN." + #elif X2_USE_ENDSTOP == _E2DIAG_ + #warning "Auto-assigned X2_DIAG_PIN to E2_DIAG_PIN." + #elif X2_USE_ENDSTOP == _E3DIAG_ + #warning "Auto-assigned X2_DIAG_PIN to E3_DIAG_PIN." + #elif X2_USE_ENDSTOP == _E4DIAG_ + #warning "Auto-assigned X2_DIAG_PIN to E4_DIAG_PIN." + #elif X2_USE_ENDSTOP == _E5DIAG_ + #warning "Auto-assigned X2_DIAG_PIN to E5_DIAG_PIN." + #elif X2_USE_ENDSTOP == _E6DIAG_ + #warning "Auto-assigned X2_DIAG_PIN to E6_DIAG_PIN." + #elif X2_USE_ENDSTOP == _E7DIAG_ + #warning "Auto-assigned X2_DIAG_PIN to E7_DIAG_PIN." + #endif +#endif +#if AUTO_ASSIGNED_Y2_STEPPER + #warning "Auto-assigned Y2 STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs." +#endif +#if AUTO_ASSIGNED_Y2_MS1 + #warning "Auto-assigned Y2_MS1_PIN to an unused En_MS1_PIN." +#endif +#if AUTO_ASSIGNED_Y2_MS2 + #warning "Auto-assigned Y2_MS2_PIN to an unused En_MS2_PIN." +#endif +#if AUTO_ASSIGNED_Y2_MS3 + #warning "Auto-assigned Y2_MS3_PIN to an unused En_MS3_PIN." +#endif +#if AUTO_ASSIGNED_Y2_CS + #warning "Auto-assigned Y2_CS_PIN to an unused En_CS_PIN." +#endif +#if AUTO_ASSIGNED_Y2_DIAG + #if Y2_USE_ENDSTOP == _XMIN_ + #warning "Auto-assigned Y2_DIAG_PIN to X_MIN_PIN." + #elif Y2_USE_ENDSTOP == _XMAX_ + #warning "Auto-assigned Y2_DIAG_PIN to X_MAX_PIN." + #elif Y2_USE_ENDSTOP == _YMIN_ + #warning "Auto-assigned Y2_DIAG_PIN to Y_MIN_PIN." + #elif Y2_USE_ENDSTOP == _YMAX_ + #warning "Auto-assigned Y2_DIAG_PIN to Y_MAX_PIN." + #elif Y2_USE_ENDSTOP == _ZMIN_ + #warning "Auto-assigned Y2_DIAG_PIN to Z_MIN_PIN." + #elif Y2_USE_ENDSTOP == _ZMAX_ + #warning "Auto-assigned Y2_DIAG_PIN to Z_MAX_PIN." + #elif Y2_USE_ENDSTOP == _XDIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to X_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _YDIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to Y_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _ZDIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to Z_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _E0DIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to E0_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _E1DIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to E1_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _E2DIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to E2_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _E3DIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to E3_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _E4DIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to E4_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _E5DIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to E5_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _E6DIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to E6_DIAG_PIN." + #elif Y2_USE_ENDSTOP == _E7DIAG_ + #warning "Auto-assigned Y2_DIAG_PIN to E7_DIAG_PIN." + #endif +#endif +#if AUTO_ASSIGNED_Z2_STEPPER + #warning "Auto-assigned Z2 STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs." +#endif +#if AUTO_ASSIGNED_Z2_MS1 + #warning "Auto-assigned Z2_MS1_PIN to an unused En_MS1_PIN." +#endif +#if AUTO_ASSIGNED_Z2_MS2 + #warning "Auto-assigned Z2_MS2_PIN to an unused En_MS2_PIN." +#endif +#if AUTO_ASSIGNED_Z2_MS3 + #warning "Auto-assigned Z2_MS3_PIN to an unused En_MS3_PIN." +#endif +#if AUTO_ASSIGNED_Z2_CS + #warning "Auto-assigned Z2_CS_PIN to an unused En_CS_PIN." +#endif +#if AUTO_ASSIGNED_Z2_DIAG + #if Z2_USE_ENDSTOP == _XMIN_ + #warning "Auto-assigned Z2_DIAG_PIN to X_MIN_PIN." + #elif Z2_USE_ENDSTOP == _XMAX_ + #warning "Auto-assigned Z2_DIAG_PIN to X_MAX_PIN." + #elif Z2_USE_ENDSTOP == _YMIN_ + #warning "Auto-assigned Z2_DIAG_PIN to Y_MIN_PIN." + #elif Z2_USE_ENDSTOP == _YMAX_ + #warning "Auto-assigned Z2_DIAG_PIN to Y_MAX_PIN." + #elif Z2_USE_ENDSTOP == _ZMIN_ + #warning "Auto-assigned Z2_DIAG_PIN to Z_MIN_PIN." + #elif Z2_USE_ENDSTOP == _ZMAX_ + #warning "Auto-assigned Z2_DIAG_PIN to Z_MAX_PIN." + #elif Z2_USE_ENDSTOP == _XDIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to X_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _YDIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to Y_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _ZDIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to Z_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _E0DIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to E0_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _E1DIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to E1_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _E2DIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to E2_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _E3DIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to E3_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _E4DIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to E4_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _E5DIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to E5_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _E6DIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to E6_DIAG_PIN." + #elif Z2_USE_ENDSTOP == _E7DIAG_ + #warning "Auto-assigned Z2_DIAG_PIN to E7_DIAG_PIN." + #endif +#endif +#if AUTO_ASSIGNED_Z3_STEPPER + #warning "Auto-assigned Z3 STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs." +#endif +#if AUTO_ASSIGNED_Z3_CS + #warning "Auto-assigned Z3_CS_PIN to an unused En_CS_PIN." +#endif +#if AUTO_ASSIGNED_Z3_MS1 + #warning "Auto-assigned Z3_MS1_PIN to an unused En_MS1_PIN." +#endif +#if AUTO_ASSIGNED_Z3_MS2 + #warning "Auto-assigned Z3_MS2_PIN to an unused En_MS2_PIN." +#endif +#if AUTO_ASSIGNED_Z3_MS3 + #warning "Auto-assigned Z3_MS3_PIN to an unused En_MS3_PIN." +#endif +#if AUTO_ASSIGNED_Z3_DIAG + #if Z3_USE_ENDSTOP == _XMIN_ + #warning "Auto-assigned Z3_DIAG_PIN to X_MIN_PIN." + #elif Z3_USE_ENDSTOP == _XMAX_ + #warning "Auto-assigned Z3_DIAG_PIN to X_MAX_PIN." + #elif Z3_USE_ENDSTOP == _YMIN_ + #warning "Auto-assigned Z3_DIAG_PIN to Y_MIN_PIN." + #elif Z3_USE_ENDSTOP == _YMAX_ + #warning "Auto-assigned Z3_DIAG_PIN to Y_MAX_PIN." + #elif Z3_USE_ENDSTOP == _ZMIN_ + #warning "Auto-assigned Z3_DIAG_PIN to Z_MIN_PIN." + #elif Z3_USE_ENDSTOP == _ZMAX_ + #warning "Auto-assigned Z3_DIAG_PIN to Z_MAX_PIN." + #elif Z3_USE_ENDSTOP == _XDIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to X_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _YDIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to Y_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _ZDIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to Z_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _E0DIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to E0_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _E1DIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to E1_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _E2DIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to E2_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _E3DIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to E3_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _E4DIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to E4_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _E5DIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to E5_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _E6DIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to E6_DIAG_PIN." + #elif Z3_USE_ENDSTOP == _E7DIAG_ + #warning "Auto-assigned Z3_DIAG_PIN to E7_DIAG_PIN." + #endif +#endif +#if AUTO_ASSIGNED_Z4_STEPPER + #warning "Auto-assigned Z4 STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs." +#endif +#if AUTO_ASSIGNED_Z4_CS + #warning "Auto-assigned Z4_CS_PIN to an unused En_CS_PIN." +#endif +#if AUTO_ASSIGNED_Z4_MS1 + #warning "Auto-assigned Z4_MS1_PIN to an unused En_MS1_PIN." +#endif +#if AUTO_ASSIGNED_Z4_MS2 + #warning "Auto-assigned Z4_MS2_PIN to an unused En_MS2_PIN." +#endif +#if AUTO_ASSIGNED_Z4_MS3 + #warning "Auto-assigned Z4_MS3_PIN to an unused En_MS3_PIN." +#endif +#if AUTO_ASSIGNED_Z4_DIAG + #if Z4_USE_ENDSTOP == _XMIN_ + #warning "Auto-assigned Z4_DIAG_PIN to X_MIN_PIN." + #elif Z4_USE_ENDSTOP == _XMAX_ + #warning "Auto-assigned Z4_DIAG_PIN to X_MAX_PIN." + #elif Z4_USE_ENDSTOP == _YMIN_ + #warning "Auto-assigned Z4_DIAG_PIN to Y_MIN_PIN." + #elif Z4_USE_ENDSTOP == _YMAX_ + #warning "Auto-assigned Z4_DIAG_PIN to Y_MAX_PIN." + #elif Z4_USE_ENDSTOP == _ZMIN_ + #warning "Auto-assigned Z4_DIAG_PIN to Z_MIN_PIN." + #elif Z4_USE_ENDSTOP == _ZMAX_ + #warning "Auto-assigned Z4_DIAG_PIN to Z_MAX_PIN." + #elif Z4_USE_ENDSTOP == _XDIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to X_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _YDIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to Y_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _ZDIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to Z_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _E0DIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to E0_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _E1DIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to E1_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _E2DIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to E2_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _E3DIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to E3_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _E4DIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to E4_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _E5DIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to E5_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _E6DIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to E6_DIAG_PIN." + #elif Z4_USE_ENDSTOP == _E7DIAG_ + #warning "Auto-assigned Z4_DIAG_PIN to E7_DIAG_PIN." + #endif +#endif +#if AUTO_ASSIGNED_I_STEPPER + #warning "Auto-assigned I STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs." +#endif +#if AUTO_ASSIGNED_I_CS + #warning "Auto-assigned I_CS_PIN to an unused En_CS_PIN." +#endif +#if AUTO_ASSIGNED_I_MS1 + #warning "Auto-assigned I_MS1_PIN to an unused En_MS1_PIN." +#endif +#if AUTO_ASSIGNED_I_MS2 + #warning "Auto-assigned I_MS2_PIN to an unused En_MS2_PIN." +#endif +#if AUTO_ASSIGNED_I_MS3 + #warning "Auto-assigned I_MS3_PIN to an unused En_MS3_PIN." +#endif +#if AUTO_ASSIGNED_I_DIAG + #if I_USE_ENDSTOP == _XMIN_ + #warning "Auto-assigned I_DIAG_PIN to X_MIN_PIN." + #elif I_USE_ENDSTOP == _XMAX_ + #warning "Auto-assigned I_DIAG_PIN to X_MAX_PIN." + #elif I_USE_ENDSTOP == _YMIN_ + #warning "Auto-assigned I_DIAG_PIN to Y_MIN_PIN." + #elif I_USE_ENDSTOP == _YMAX_ + #warning "Auto-assigned I_DIAG_PIN to Y_MAX_PIN." + #elif I_USE_ENDSTOP == _ZMIN_ + #warning "Auto-assigned I_DIAG_PIN to Z_MIN_PIN." + #elif I_USE_ENDSTOP == _ZMAX_ + #warning "Auto-assigned I_DIAG_PIN to Z_MAX_PIN." + #elif I_USE_ENDSTOP == _XDIAG_ + #warning "Auto-assigned I_DIAG_PIN to X_DIAG_PIN." + #elif I_USE_ENDSTOP == _YDIAG_ + #warning "Auto-assigned I_DIAG_PIN to Y_DIAG_PIN." + #elif I_USE_ENDSTOP == _ZDIAG_ + #warning "Auto-assigned I_DIAG_PIN to Z_DIAG_PIN." + #elif I_USE_ENDSTOP == _E0DIAG_ + #warning "Auto-assigned I_DIAG_PIN to E0_DIAG_PIN." + #elif I_USE_ENDSTOP == _E1DIAG_ + #warning "Auto-assigned I_DIAG_PIN to E1_DIAG_PIN." + #elif I_USE_ENDSTOP == _E2DIAG_ + #warning "Auto-assigned I_DIAG_PIN to E2_DIAG_PIN." + #elif I_USE_ENDSTOP == _E3DIAG_ + #warning "Auto-assigned I_DIAG_PIN to E3_DIAG_PIN." + #elif I_USE_ENDSTOP == _E4DIAG_ + #warning "Auto-assigned I_DIAG_PIN to E4_DIAG_PIN." + #elif I_USE_ENDSTOP == _E5DIAG_ + #warning "Auto-assigned I_DIAG_PIN to E5_DIAG_PIN." + #elif I_USE_ENDSTOP == _E6DIAG_ + #warning "Auto-assigned I_DIAG_PIN to E6_DIAG_PIN." + #elif I_USE_ENDSTOP == _E7DIAG_ + #warning "Auto-assigned I_DIAG_PIN to E7_DIAG_PIN." + #endif +#endif +#if AUTO_ASSIGNED_J_STEPPER + #warning "Auto-assigned J STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs." +#endif +#if AUTO_ASSIGNED_J_CS + #warning "Auto-assigned J_CS_PIN to an unused En_CS_PIN." +#endif +#if AUTO_ASSIGNED_J_MS1 + #warning "Auto-assigned J_MS1_PIN to an unused En_MS1_PIN." +#endif +#if AUTO_ASSIGNED_J_MS2 + #warning "Auto-assigned J_MS2_PIN to an unused En_MS2_PIN." +#endif +#if AUTO_ASSIGNED_J_MS3 + #warning "Auto-assigned J_MS3_PIN to an unused En_MS3_PIN." +#endif +#if AUTO_ASSIGNED_J_DIAG + #if J_USE_ENDSTOP == _XMIN_ + #warning "Auto-assigned J_DIAG_PIN to X_MIN_PIN." + #elif J_USE_ENDSTOP == _XMAX_ + #warning "Auto-assigned J_DIAG_PIN to X_MAX_PIN." + #elif J_USE_ENDSTOP == _YMIN_ + #warning "Auto-assigned J_DIAG_PIN to Y_MIN_PIN." + #elif J_USE_ENDSTOP == _YMAX_ + #warning "Auto-assigned J_DIAG_PIN to Y_MAX_PIN." + #elif J_USE_ENDSTOP == _ZMIN_ + #warning "Auto-assigned J_DIAG_PIN to Z_MIN_PIN." + #elif J_USE_ENDSTOP == _ZMAX_ + #warning "Auto-assigned J_DIAG_PIN to Z_MAX_PIN." + #elif J_USE_ENDSTOP == _XDIAG_ + #warning "Auto-assigned J_DIAG_PIN to X_DIAG_PIN." + #elif J_USE_ENDSTOP == _YDIAG_ + #warning "Auto-assigned J_DIAG_PIN to Y_DIAG_PIN." + #elif J_USE_ENDSTOP == _ZDIAG_ + #warning "Auto-assigned J_DIAG_PIN to Z_DIAG_PIN." + #elif J_USE_ENDSTOP == _E0DIAG_ + #warning "Auto-assigned J_DIAG_PIN to E0_DIAG_PIN." + #elif J_USE_ENDSTOP == _E1DIAG_ + #warning "Auto-assigned J_DIAG_PIN to E1_DIAG_PIN." + #elif J_USE_ENDSTOP == _E2DIAG_ + #warning "Auto-assigned J_DIAG_PIN to E2_DIAG_PIN." + #elif J_USE_ENDSTOP == _E3DIAG_ + #warning "Auto-assigned J_DIAG_PIN to E3_DIAG_PIN." + #elif J_USE_ENDSTOP == _E4DIAG_ + #warning "Auto-assigned J_DIAG_PIN to E4_DIAG_PIN." + #elif J_USE_ENDSTOP == _E5DIAG_ + #warning "Auto-assigned J_DIAG_PIN to E5_DIAG_PIN." + #elif J_USE_ENDSTOP == _E6DIAG_ + #warning "Auto-assigned J_DIAG_PIN to E6_DIAG_PIN." + #elif J_USE_ENDSTOP == _E7DIAG_ + #warning "Auto-assigned J_DIAG_PIN to E7_DIAG_PIN." + #endif +#endif +#if AUTO_ASSIGNED_K_STEPPER + #warning "Auto-assigned K STEP/DIR/ENABLE_PINs to unused En_STEP/DIR/ENABLE_PINs." +#endif +#if AUTO_ASSIGNED_K_CS + #warning "Auto-assigned K_CS_PIN to an unused En_CS_PIN." +#endif +#if AUTO_ASSIGNED_K_MS1 + #warning "Auto-assigned K_MS1_PIN to an unused En_MS1_PIN." +#endif +#if AUTO_ASSIGNED_K_MS2 + #warning "Auto-assigned K_MS2_PIN to an unused En_MS2_PIN." +#endif +#if AUTO_ASSIGNED_K_MS3 + #warning "Auto-assigned K_MS3_PIN to an unused En_MS3_PIN." +#endif +#if AUTO_ASSIGNED_K_DIAG + #if K_USE_ENDSTOP == _XMIN_ + #warning "Auto-assigned K_DIAG_PIN to X_MIN_PIN." + #elif K_USE_ENDSTOP == _XMAX_ + #warning "Auto-assigned K_DIAG_PIN to X_MAX_PIN." + #elif K_USE_ENDSTOP == _YMIN_ + #warning "Auto-assigned K_DIAG_PIN to Y_MIN_PIN." + #elif K_USE_ENDSTOP == _YMAX_ + #warning "Auto-assigned K_DIAG_PIN to Y_MAX_PIN." + #elif K_USE_ENDSTOP == _ZMIN_ + #warning "Auto-assigned K_DIAG_PIN to Z_MIN_PIN." + #elif K_USE_ENDSTOP == _ZMAX_ + #warning "Auto-assigned K_DIAG_PIN to Z_MAX_PIN." + #elif K_USE_ENDSTOP == _XDIAG_ + #warning "Auto-assigned K_DIAG_PIN to X_DIAG_PIN." + #elif K_USE_ENDSTOP == _YDIAG_ + #warning "Auto-assigned K_DIAG_PIN to Y_DIAG_PIN." + #elif K_USE_ENDSTOP == _ZDIAG_ + #warning "Auto-assigned K_DIAG_PIN to Z_DIAG_PIN." + #elif K_USE_ENDSTOP == _E0DIAG_ + #warning "Auto-assigned K_DIAG_PIN to E0_DIAG_PIN." + #elif K_USE_ENDSTOP == _E1DIAG_ + #warning "Auto-assigned K_DIAG_PIN to E1_DIAG_PIN." + #elif K_USE_ENDSTOP == _E2DIAG_ + #warning "Auto-assigned K_DIAG_PIN to E2_DIAG_PIN." + #elif K_USE_ENDSTOP == _E3DIAG_ + #warning "Auto-assigned K_DIAG_PIN to E3_DIAG_PIN." + #elif K_USE_ENDSTOP == _E4DIAG_ + #warning "Auto-assigned K_DIAG_PIN to E4_DIAG_PIN." + #elif K_USE_ENDSTOP == _E5DIAG_ + #warning "Auto-assigned K_DIAG_PIN to E5_DIAG_PIN." + #elif K_USE_ENDSTOP == _E6DIAG_ + #warning "Auto-assigned K_DIAG_PIN to E6_DIAG_PIN." + #elif K_USE_ENDSTOP == _E7DIAG_ + #warning "Auto-assigned K_DIAG_PIN to E7_DIAG_PIN." + #endif +#endif + +// Ender 3 Pro (but, apparently all Creality 4.2.2 boards) +#if ENABLED(EMIT_CREALITY_422_WARNING) || MB(CREALITY_V4) + #warning "Creality 4.2.2 boards may have A4988 or TMC2208_STANDALONE drivers. Check your board and make sure to select the correct DRIVER_TYPE!" +#endif diff --git a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp index 8aca19b0cd9e..19e3814a6f66 100644 --- a/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp +++ b/Marlin/src/lcd/HD44780/lcdprint_hd44780.cpp @@ -1,3 +1,25 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + /** * @file lcdprint_hd44780.cpp * @brief LCD print api for HD44780 diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp index 635751b3f5c3..f4d765e2d303 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.cpp @@ -46,6 +46,14 @@ #include "../../gcode/parser.h" #endif +#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) + #include "../../feature/cooler.h" +#endif + +#if ENABLED(I2C_AMMETER) + #include "../../feature/ammeter.h" +#endif + #if ENABLED(AUTO_BED_LEVELING_UBL) #include "../../feature/bedlevel/bedlevel.h" #endif @@ -60,11 +68,7 @@ #elif EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) - LCD_CLASS lcd(LCD_I2C_ADDRESS - #ifdef DETECT_DEVICE - , 1 - #endif - ); + LCD_CLASS lcd(LCD_I2C_ADDRESS OPTARG(DETECT_I2C_LCD_DEVICE, 1)); #elif ENABLED(LCD_I2C_TYPE_PCA8574) @@ -93,6 +97,10 @@ LCD_CLASS lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); +#elif ENABLED(YHCB2004) + + LCD_CLASS lcd(YHCB2004_CLK, 20, 4, YHCB2004_MOSI, YHCB2004_MISO); // CLK, cols, rows, MOSI, MISO + #else // Standard direct-connected LCD implementations @@ -368,11 +376,7 @@ void MarlinUI::init_lcd() { } bool MarlinUI::detected() { - return (true - #if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && defined(DETECT_DEVICE) - && lcd.LcdDetected() == 1 - #endif - ); + return TERN1(DETECT_I2C_LCD_DEVICE, lcd.LcdDetected() == 1); } #if HAS_SLOW_BUTTONS @@ -478,7 +482,9 @@ void MarlinUI::clear_lcd() { lcd.clear(); } CENTER_OR_SCROLL(STRING_SPLASH_LINE3, 1500); #endif } + } + void MarlinUI::bootscreen_completion(const millis_t) { lcd.clear(); safe_delay(100); set_custom_characters(CHARSET_INFO); @@ -513,18 +519,19 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const lcd_put_u8str(value); } + FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char prefix, const bool blink) { #if HAS_HEATED_BED const bool isBed = TERN(HAS_HEATED_CHAMBER, heater_id == H_BED, heater_id < 0); - const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater_id)), - t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id)); + const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)), + t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id)); #else - const float t1 = thermalManager.degHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id); + const celsius_t t1 = thermalManager.wholeDegHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id); #endif if (prefix >= 0) lcd_put_wchar(prefix); - lcd_put_u8str(i16tostr3rj(t1 + 0.5)); + lcd_put_u8str(t1 < 0 ? "err" : i16tostr3rj(t1)); lcd_put_wchar('/'); #if !HEATER_IDLE_HANDLER @@ -537,7 +544,7 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr } else #endif - lcd_put_u8str(i16tostr3left(t2 + 0.5)); + lcd_put_u8str(i16tostr3left(t2)); if (prefix >= 0) { lcd_put_wchar(LCD_STR_DEGREE[0]); @@ -546,6 +553,58 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char pr } } +#if HAS_COOLER +FORCE_INLINE void _draw_cooler_status(const char prefix, const bool blink) { + const celsius_t t2 = thermalManager.degTargetCooler(); + + if (prefix >= 0) lcd_put_wchar(prefix); + + lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegCooler())); + lcd_put_wchar('/'); + + #if !HEATER_IDLE_HANDLER + UNUSED(blink); + #else + if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) { + lcd_put_wchar(' '); + if (t2 >= 10) lcd_put_wchar(' '); + if (t2 >= 100) lcd_put_wchar(' '); + } + else + #endif + lcd_put_u8str(i16tostr3left(t2)); + + if (prefix >= 0) { + lcd_put_wchar(LCD_STR_DEGREE[0]); + lcd_put_wchar(' '); + if (t2 < 10) lcd_put_wchar(' '); + } +} +#endif + +#if ENABLED(LASER_COOLANT_FLOW_METER) + FORCE_INLINE void _draw_flowmeter_status() { + lcd_put_u8str("~"); + lcd_put_u8str(ftostr11ns(cooler.flowrate)); + lcd_put_wchar('L'); + } +#endif + +#if ENABLED(I2C_AMMETER) + FORCE_INLINE void _draw_ammeter_status() { + lcd_put_u8str(" "); + ammeter.read(); + if (ammeter.current <= 0.999f) { + lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current * 1000 + 0.5f))); + lcd_put_u8str("mA"); + } + else { + lcd_put_u8str(ftostr12ns(ammeter.current)); + lcd_put_wchar('A'); + } + } +#endif + FORCE_INLINE void _draw_bed_status(const bool blink) { _draw_heater_status(H_BED, TERN0(HAS_LEVELING, blink && planner.leveling_active) ? '_' : LCD_STR_BEDTEMP[0], blink); } @@ -567,9 +626,9 @@ FORCE_INLINE void _draw_bed_status(const bool blink) { #if ENABLED(LCD_PROGRESS_BAR) void MarlinUI::draw_progress_bar(const uint8_t percent) { - const int16_t tix = (int16_t)(percent * (LCD_WIDTH) * 3) / 100, - cel = tix / 3, - rem = tix % 3; + const int16_t tix = int16_t(percent * (LCD_WIDTH) * 3) / 100, + cel = tix / 3, + rem = tix % 3; uint8_t i = LCD_WIDTH; char msg[LCD_WIDTH + 1], b = ' '; msg[LCD_WIDTH] = '\0'; @@ -638,12 +697,15 @@ void MarlinUI::draw_status_message(const bool blink) { // If the remaining string doesn't completely fill the screen if (rlen < LCD_WIDTH) { - lcd_put_wchar('.'); // Always at 1+ spaces left, draw a dot uint8_t chars = LCD_WIDTH - rlen; // Amount of space left in characters - if (--chars) { // Draw a second dot if there's space - lcd_put_wchar('.'); - if (--chars) - lcd_put_u8str_max(status_message, chars); // Print a second copy of the message + lcd_put_wchar(' '); // Always at 1+ spaces left, draw a space + if (--chars) { // Draw a second space if there's room + lcd_put_wchar(' '); + if (--chars) { // Draw a third space if there's room + lcd_put_wchar(' '); + if (--chars) + lcd_put_u8str_max(status_message, chars); // Print a second copy of the message + } } } if (last_blink != blink) { @@ -704,7 +766,7 @@ inline uint8_t draw_elapsed_or_remaining_time(uint8_t timepos, const bool blink) char buffer[14]; #if ENABLED(SHOW_REMAINING_TIME) - const bool show_remain = TERN1(ROTATE_PROGRESS_DISPLAY, blink) && (printingIsActive() || marlin_state == MF_SD_COMPLETE); + const bool show_remain = TERN1(ROTATE_PROGRESS_DISPLAY, blink) && printingIsActive(); if (show_remain) { #if ENABLED(USE_M73_REMAINING_TIME) duration_t remaining = ui.get_remaining_time(); @@ -743,17 +805,19 @@ void MarlinUI::draw_status_screen() { // // Hotend 0 Temperature // - _draw_heater_status(H_E0, -1, blink); - - // - // Hotend 1 or Bed Temperature - // - #if HAS_MULTI_HOTEND - lcd_moveto(8, 0); - _draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink); - #elif HAS_HEATED_BED - lcd_moveto(8, 0); - _draw_bed_status(blink); + #if HAS_HOTEND + _draw_heater_status(H_E0, -1, blink); + + // + // Hotend 1 or Bed Temperature + // + #if HAS_MULTI_HOTEND + lcd_moveto(8, 0); + _draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink); + #elif HAS_HEATED_BED + lcd_moveto(8, 0); + _draw_bed_status(blink); + #endif #endif #else // LCD_WIDTH >= 20 @@ -761,19 +825,25 @@ void MarlinUI::draw_status_screen() { // // Hotend 0 Temperature // - _draw_heater_status(H_E0, LCD_STR_THERMOMETER[0], blink); - - // - // Hotend 1 or Bed Temperature - // - #if HAS_MULTI_HOTEND - lcd_moveto(10, 0); - _draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink); - #elif HAS_HEATED_BED - lcd_moveto(10, 0); - _draw_bed_status(blink); + #if HAS_HOTEND + _draw_heater_status(H_E0, LCD_STR_THERMOMETER[0], blink); + + // + // Hotend 1 or Bed Temperature + // + #if HAS_MULTI_HOTEND + lcd_moveto(10, 0); + _draw_heater_status(H_E1, LCD_STR_THERMOMETER[0], blink); + #elif HAS_HEATED_BED + lcd_moveto(10, 0); + _draw_bed_status(blink); + #endif #endif + TERN_(HAS_COOLER, _draw_cooler_status('*', blink)); + TERN_(LASER_COOLANT_FLOW_METER, _draw_flowmeter_status()); + TERN_(I2C_AMMETER, _draw_ammeter_status()); + #endif // LCD_WIDTH >= 20 // ========== Line 2 ========== @@ -827,7 +897,7 @@ void MarlinUI::draw_status_screen() { #else // !HAS_DUAL_MIXING - const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive() || marlin_state == MF_SD_COMPLETE); + const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive()); if (show_e_total) { #if ENABLED(LCD_SHOW_E_TOTAL) @@ -887,12 +957,12 @@ void MarlinUI::draw_status_screen() { #if ENABLED(ADAPTIVE_FAN_SLOWING) else { c = '*'; spd = thermalManager.scaledFanSpeed(0, spd); } #endif - per = thermalManager.fanPercent(spd); + per = thermalManager.pwmToPercent(spd); } else #endif { - #if EXTRUDERS + #if HAS_EXTRUDERS c = 'E'; per = planner.flow_percentage[0]; #endif @@ -1019,7 +1089,7 @@ void MarlinUI::draw_status_screen() { } // Draw a menu item with a (potentially) editable value - void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const inStr, const bool pgm) { + void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const inStr, const bool pgm) { const uint8_t vlen = inStr ? (pgm ? utf8_strlen_P(inStr) : utf8_strlen(inStr)) : 0; lcd_put_wchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' '); uint8_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 2 - vlen); @@ -1031,7 +1101,7 @@ void MarlinUI::draw_status_screen() { } // Low-level draw_edit_screen can be used to draw an edit screen from anyplace - void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { + void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) { ui.encoder_direction_normal(); uint8_t n = lcd_put_u8str_ind_P(0, 1, pstr, itemIndex, itemString, LCD_WIDTH - 1); if (value) { @@ -1222,7 +1292,7 @@ void MarlinUI::draw_status_screen() { pixels_per_x_mesh_pnt, pixels_per_y_mesh_pnt, suppress_x_offset = 0, suppress_y_offset = 0; - const uint8_t y_plot_inv = (GRID_MAX_POINTS_Y - 1) - y_plot; + const uint8_t y_plot_inv = (GRID_MAX_POINTS_Y) - 1 - y_plot; upper_left.column = 0; upper_left.row = 0; @@ -1251,7 +1321,7 @@ void MarlinUI::draw_status_screen() { y_map_pixels = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y); // Directions fit nicely right_edge = pixels_per_x_mesh_pnt * (GRID_MAX_POINTS_X) + 1; // Find location of right edge within the character cell - bottom_line = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y) + 1; // Find location of bottome line within the character cell + bottom_line = pixels_per_y_mesh_pnt * (GRID_MAX_POINTS_Y) + 1; // Find location of bottom line within the character cell n_rows = bottom_line / (HD44780_CHAR_HEIGHT) + 1; n_cols = right_edge / (HD44780_CHAR_WIDTH) + 1; diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.h b/Marlin/src/lcd/HD44780/marlinui_HD44780.h index 604d26a029b4..62c0c7620220 100644 --- a/Marlin/src/lcd/HD44780/marlinui_HD44780.h +++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.h @@ -90,6 +90,11 @@ #include #define LCD_CLASS LiquidCrystal_I2C +#elif ENABLED(YHCB2004) + + #include + #define LCD_CLASS LiquidCrystal_AIP31068_SPI + #else // Standard directly connected LCD implementations diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index 44128cc9f8d1..9617b3775db5 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -57,6 +57,18 @@ #include "../../gcode/parser.h" #endif +#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) + #include "../../feature/cooler.h" +#endif + +#if ENABLED(I2C_AMMETER) + #include "../../feature/ammeter.h" +#endif + +#if HAS_CUTTER + #include "../../feature/spindle_laser.h" +#endif + #if ENABLED(AUTO_BED_LEVELING_UBL) #include "../../feature/bedlevel/bedlevel.h" #endif @@ -64,12 +76,12 @@ TFTGLCD lcd; #define ICON_LOGO B00000001 -#define ICON_TEMP1 B00000010 //hotend 1 -#define ICON_TEMP2 B00000100 //hotend 2 -#define ICON_TEMP3 B00001000 //hotend 3 +#define ICON_TEMP1 B00000010 // Hotend 1 +#define ICON_TEMP2 B00000100 // Hotend 2 +#define ICON_TEMP3 B00001000 // Hotend 3 #define ICON_BED B00010000 #define ICON_FAN B00100000 -#define ICON_HOT B01000000 //when any T > 50deg +#define ICON_HOT B01000000 // When any T > 50deg #define PIC_MASK 0x7F // LEDs not used, for compatibility with Smoothieware @@ -86,7 +98,7 @@ TFTGLCD lcd; #define COLOR_EDIT '#' #define COLOR_ERROR '!' -#ifdef CONVERT_TO_EXT_ASCII //use standart pseudographic symbols in ASCII table +#ifdef CONVERT_TO_EXT_ASCII //use standard pseudographic symbols in ASCII table #define LR 179 //vertical line #define TRC 191 //top right corner #define BLC 192 //bottom left corner @@ -364,12 +376,9 @@ void MarlinUI::clear_lcd() { lcd.clear_buffer(); } -int16_t MarlinUI::contrast; // Initialized by settings.load() - -void MarlinUI::set_contrast(const int16_t value) { - contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX); - lcd.setContrast(contrast); -} +#if HAS_LCD_CONTRAST + void MarlinUI::_set_contrast() { lcd.setContrast(contrast); } +#endif static void center_text_P(PGM_P pstart, uint8_t y) { uint8_t len = utf8_strlen_P(pstart); @@ -389,7 +398,7 @@ static void center_text_P(PGM_P pstart, uint8_t y) { // uint8_t indent = (LCD_WIDTH - 8) / 2; // symbols 217 (bottom right corner) and 218 (top left corner) are using for letters in some languages - // and they should be moved to begining ASCII table as spetial symbols + // and they should be moved to beginning ASCII table as special symbols lcd.setCursor(indent, 0); lcd.write(TLC); lcd_put_u8str_P(PSTR("------")); lcd.write(TRC); lcd.setCursor(indent, 1); lcd.write(LR); lcd_put_u8str_P(PSTR("Marlin")); lcd.write(LR); lcd.setCursor(indent, 2); lcd.write(BLC); lcd_put_u8str_P(PSTR("------")); lcd.write(BRC); @@ -397,7 +406,10 @@ static void center_text_P(PGM_P pstart, uint8_t y) { center_text_P(PSTR(MARLIN_WEBSITE_URL), 4); picBits = ICON_LOGO; lcd.print_screen(); - safe_delay(1500); + } + + void MarlinUI::bootscreen_completion(const millis_t sofar) { + if ((BOOTSCREEN_TIMEOUT) > sofar) safe_delay((BOOTSCREEN_TIMEOUT) - sofar); } #endif // SHOW_BOOTSCREEN @@ -430,70 +442,161 @@ FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const lcd_put_u8str(value); } -FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *prefix, const bool blink) { - uint8_t pic_hot_bits; - #if HAS_HEATED_BED - const bool isBed = heater_id < 0; - const float t1 = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater_id)); - const float t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id)); - #else - const float t1 = thermalManager.degHotend(heater_id); - const float t2 = thermalManager.degTargetHotend(heater_id); - #endif +#if HAS_HOTEND || HAS_HEATED_BED - #if HOTENDS < 2 - if (heater_id == H_E0) { - lcd.setCursor(2, 5); lcd.print(prefix); //HE - lcd.setCursor(1, 6); lcd.print(i16tostr3rj(t1 + 0.5)); - lcd.setCursor(1, 7); - } - else { - lcd.setCursor(6, 5); lcd.print(prefix); //BED - lcd.setCursor(6, 6); lcd.print(i16tostr3rj(t1 + 0.5)); - lcd.setCursor(6, 7); + FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *prefix, const bool blink) { + uint8_t pic_hot_bits; + #if HAS_HEATED_BED + const bool isBed = heater_id < 0; + const celsius_t t1 = (isBed ? thermalManager.wholeDegBed() : thermalManager.wholeDegHotend(heater_id)), + t2 = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater_id)); + #else + const celsius_t t1 = thermalManager.wholeDegHotend(heater_id), t2 = thermalManager.degTargetHotend(heater_id); + #endif + + #if HOTENDS < 2 + if (heater_id == H_E0) { + lcd.setCursor(2, 5); lcd.print(prefix); //HE + lcd.setCursor(1, 6); lcd.print(i16tostr3rj(t1)); + lcd.setCursor(1, 7); + } + else { + lcd.setCursor(6, 5); lcd.print(prefix); //BED + lcd.setCursor(6, 6); lcd.print(i16tostr3rj(t1)); + lcd.setCursor(6, 7); + } + #else + if (heater_id > H_BED) { + lcd.setCursor(heater_id * 4, 5); lcd.print(prefix); // HE1 or HE2 or HE3 + lcd.setCursor(heater_id * 4, 6); lcd.print(i16tostr3rj(t1)); + lcd.setCursor(heater_id * 4, 7); + } + else { + lcd.setCursor(13, 5); lcd.print(prefix); //BED + lcd.setCursor(13, 6); lcd.print(i16tostr3rj(t1)); + lcd.setCursor(13, 7); + } + #endif // HOTENDS <= 1 + + #if !HEATER_IDLE_HANDLER + UNUSED(blink); + #else + if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) { + lcd.write(' '); + if (t2 >= 10) lcd.write(' '); + if (t2 >= 100) lcd.write(' '); + } + else + #endif // !HEATER_IDLE_HANDLER + lcd.print(i16tostr3rj(t2)); + + switch (heater_id) { + case H_BED: pic_hot_bits = ICON_BED; break; + case H_E0: pic_hot_bits = ICON_TEMP1; break; + case H_E1: pic_hot_bits = ICON_TEMP2; break; + case H_E2: pic_hot_bits = ICON_TEMP3; + default: break; } - #else - if (heater_id > H_BED) { - lcd.setCursor(heater_id * 4, 5); lcd.print(prefix); //HE1 or HE2 or HE3 - lcd.setCursor(heater_id * 4, 6); lcd.print(i16tostr3rj(t1 + 0.5)); - lcd.setCursor(heater_id * 4, 7); + + if (t2) picBits |= pic_hot_bits; + else picBits &= ~pic_hot_bits; + + if (t1 > 50) hotBits |= pic_hot_bits; + else hotBits &= ~pic_hot_bits; + + if (hotBits) picBits |= ICON_HOT; + else picBits &= ~ICON_HOT; + } + +#endif // HAS_HOTEND || HAS_HEATED_BED + +#if HAS_COOLER + + FORCE_INLINE void _draw_cooler_status(const bool blink) { + const celsius_t t2 = thermalManager.degTargetCooler(); + + lcd.setCursor(0, 5); lcd_put_u8str_P(PSTR("COOL")); + lcd.setCursor(1, 6); lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegCooler())); + lcd.setCursor(1, 7); + + #if !HEATER_IDLE_HANDLER + UNUSED(blink); + #else + if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) { + lcd_put_wchar(' '); + if (t2 >= 10) lcd_put_wchar(' '); + if (t2 >= 100) lcd_put_wchar(' '); + } + else + #endif + lcd_put_u8str(i16tostr3left(t2)); + + lcd_put_wchar(' '); + if (t2 < 10) lcd_put_wchar(' '); + + if (t2) picBits |= ICON_TEMP1; + else picBits &= ~ICON_TEMP1; + } + +#endif // HAS_COOLER + +#if ENABLED(LASER_COOLANT_FLOW_METER) + + FORCE_INLINE void _draw_flowmeter_status() { + lcd.setCursor(5, 5); lcd_put_u8str_P(PSTR("FLOW")); + lcd.setCursor(7, 6); lcd_put_wchar('L'); + lcd.setCursor(6, 7); lcd_put_u8str(ftostr11ns(cooler.flowrate)); + + if (cooler.flowrate) picBits |= ICON_FAN; + else picBits &= ~ICON_FAN; + } + +#endif + +#if ENABLED(I2C_AMMETER) + + FORCE_INLINE void _draw_ammeter_status() { + lcd.setCursor(10, 5); lcd_put_u8str_P(PSTR("ILAZ")); + ammeter.read(); + lcd.setCursor(11, 6); + if (ammeter.current <= 0.999f) + { + lcd_put_u8str("mA"); + lcd.setCursor(10, 7); + lcd_put_wchar(' '); lcd_put_u8str(ui16tostr3rj(uint16_t(ammeter.current * 1000 + 0.5f))); } else { - lcd.setCursor(13, 5); lcd.print(prefix); //BED - lcd.setCursor(13, 6); lcd.print(i16tostr3rj(t1 + 0.5)); - lcd.setCursor(13, 7); + lcd_put_u8str(" A"); + lcd.setCursor(10, 7); + lcd_put_u8str(ftostr12ns(ammeter.current)); } - #endif // HOTENDS <= 1 - #if !HEATER_IDLE_HANDLER - UNUSED(blink); - #else - if (!blink && thermalManager.heater_idle[thermalManager.idle_index_for_id(heater_id)].timed_out) { - lcd.write(' '); - if (t2 >= 10) lcd.write(' '); - if (t2 >= 100) lcd.write(' '); - } - else - #endif // !HEATER_IDLE_HANDLER - lcd.print(i16tostr3rj(t2 + 0.5)); - - switch (heater_id) { - case H_BED: pic_hot_bits = ICON_BED; break; - case H_E0: pic_hot_bits = ICON_TEMP1; break; - case H_E1: pic_hot_bits = ICON_TEMP2; break; - case H_E2: pic_hot_bits = ICON_TEMP3; - default: break; + if (ammeter.current) picBits |= ICON_BED; + else picBits &= ~ICON_BED; } - if (t2) picBits |= pic_hot_bits; - else picBits &= ~pic_hot_bits; +#endif // I2C_AMMETER - if (t1 > 50) hotBits |= pic_hot_bits; - else hotBits &= ~pic_hot_bits; +#if HAS_CUTTER - if (hotBits) picBits |= ICON_HOT; - else picBits &= ~ICON_HOT; -} + FORCE_INLINE void _draw_cutter_status() { + lcd.setCursor(15, 5); lcd_put_u8str_P(PSTR("CUTT")); + #if CUTTER_UNIT_IS(RPM) + lcd.setCursor(16, 6); lcd_put_u8str_P(PSTR("RPM")); + lcd.setCursor(15, 7); lcd_put_u8str(ftostr31ns(float(cutter.unitPower) / 1000)); + lcd_put_wchar('K'); + #elif CUTTER_UNIT_IS(PERCENT) + lcd.setCursor(17, 6); lcd_put_wchar('%'); + lcd.setCursor(18, 7); lcd_put_u8str(cutter_power2str(cutter.unitPower)); + #else + lcd.setCursor(17, 7); lcd_put_u8str(cutter_power2str(cutter.unitPower)); + #endif + + if (cutter.unitPower) picBits |= ICON_HOT; + else picBits &= ~ICON_HOT; + } + +#endif // HAS_CUTTER #if HAS_PRINT_PROGRESS @@ -531,7 +634,7 @@ FORCE_INLINE void _draw_heater_status(const heater_id_t heater_id, const char *p } } -#endif +#endif // LCD_PROGRESS_BAR void MarlinUI::draw_status_message(const bool blink) { if (!PanelDetected) return; @@ -582,12 +685,15 @@ void MarlinUI::draw_status_message(const bool blink) { // If the remaining string doesn't completely fill the screen if (rlen < LCD_WIDTH) { - lcd.write('.'); // Always at 1+ spaces left, draw a dot uint8_t chars = LCD_WIDTH - rlen; // Amount of space left in characters - if (--chars) { // Draw a second dot if there's space - lcd.write('.'); - if (--chars) - lcd_put_u8str_max(status_message, chars); // Print a second copy of the message + lcd.write(' '); // Always at 1+ spaces left, draw a space + if (--chars) { // Draw a second space if there's room + lcd.write(' '); + if (--chars) { // Draw a third space if there's room + lcd.write(' '); + if (--chars) + lcd_put_u8str_max(status_message, chars); // Print a second copy of the message + } } } if (last_blink != blink) { @@ -624,7 +730,7 @@ Equal to 20x10 text LCD | | | HE BED FAN | | ttc ttc % | ttc - current temperature -| tts tts %%% | tts - setted temperature, %%% - percent for FAN +| tts tts %%% | tts - set temperature, %%% - percent for FAN | ICO ICO ICO ICO | ICO - icon 48x48, placed in 2 text lines | ICO ICO ICO ICO | ICO @@ -643,6 +749,19 @@ or or +|X 000 Y 000 Z 000.00| +|FR100% SD100% C--:--| +| Progress bar line | +|Status message | +| | +|COOL FLOW ILAZ CUTT | +| ttc L mA RPM | +| tts f.f aaa rr.rK| +| ICO ICO ICO ICO | +| ICO ICO ICO ICO | + +or + Equal to 24x10 text LCD |X 000 Y 000 Z 000.00 | @@ -669,9 +788,10 @@ void MarlinUI::draw_status_screen() { // lcd.setCursor(0, 0); - _draw_axis_value(X_AXIS, ftostr4sign(LOGICAL_X_POSITION(current_position[X_AXIS])), blink); lcd.write(' '); - _draw_axis_value(Y_AXIS, ftostr4sign(LOGICAL_Y_POSITION(current_position[Y_AXIS])), blink); lcd.write(' '); - _draw_axis_value(Z_AXIS, ftostr52sp(LOGICAL_Z_POSITION(current_position[Z_AXIS])), blink); + const xyz_pos_t lpos = current_position.asLogical(); + _draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink); lcd.write(' '); + _draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink); lcd.write(' '); + _draw_axis_value(Z_AXIS, ftostr52sp(lpos.z), blink); #if HAS_LEVELING && !HAS_HEATED_BED lcd.write(planner.leveling_active || blink ? '_' : ' '); @@ -740,51 +860,61 @@ void MarlinUI::draw_status_screen() { #endif // - // Line 6..8 Temperatures, FAN + // Line 6..8 Temperatures, FAN for printer or Cooler, Flowmetter, Ampermeter, Cutter for laser/spindle // - #if HOTENDS < 2 - _draw_heater_status(H_E0, "HE", blink); // Hotend Temperature - #else - _draw_heater_status(H_E0, "HE1", blink); // Hotend 1 Temperature - _draw_heater_status(H_E1, "HE2", blink); // Hotend 2 Temperature - #if HOTENDS > 2 - _draw_heater_status(H_E2, "HE3", blink); // Hotend 3 Temperature - #endif - #endif // HOTENDS <= 1 + #if HAS_HOTEND - #if HAS_HEATED_BED - #if HAS_LEVELING - _draw_heater_status(H_BED, (planner.leveling_active && blink ? "___" : "BED"), blink); + #if HOTENDS < 2 + _draw_heater_status(H_E0, "HE", blink); // Hotend Temperature #else - _draw_heater_status(H_BED, "BED", blink); + _draw_heater_status(H_E0, "HE1", blink); // Hotend 1 Temperature + _draw_heater_status(H_E1, "HE2", blink); // Hotend 2 Temperature + #if HOTENDS > 2 + _draw_heater_status(H_E2, "HE3", blink); // Hotend 3 Temperature + #endif #endif - #endif // HAS_HEATED_BED - - #if FAN_COUNT > 0 - uint16_t spd = thermalManager.fan_speed[0]; - #if ENABLED(ADAPTIVE_FAN_SLOWING) - if (!blink) spd = thermalManager.scaledFanSpeed(0, spd); + #if HAS_HEATED_BED + #if HAS_LEVELING + _draw_heater_status(H_BED, (planner.leveling_active && blink ? "___" : "BED"), blink); + #else + _draw_heater_status(H_BED, "BED", blink); + #endif #endif - uint16_t per = thermalManager.fanPercent(spd); - #if HOTENDS < 2 - #define FANX 11 - #else - #define FANX 17 - #endif - lcd.setCursor(FANX, 5); lcd_put_u8str_P(PSTR("FAN")); - lcd.setCursor(FANX + 1, 6); lcd.write('%'); - lcd.setCursor(FANX, 7); - lcd.print(i16tostr3rj(per)); + #if HAS_FAN + uint16_t spd = thermalManager.fan_speed[0]; + #if ENABLED(ADAPTIVE_FAN_SLOWING) + if (!blink) spd = thermalManager.scaledFanSpeed(0, spd); + #endif + uint16_t per = thermalManager.pwmToPercent(spd); - if (TERN0(HAS_FAN0, thermalManager.fan_speed[0]) || TERN0(HAS_FAN1, thermalManager.fan_speed[1]) || TERN0(HAS_FAN2, thermalManager.fan_speed[2])) - picBits |= ICON_FAN; - else - picBits &= ~ICON_FAN; + #if HOTENDS < 2 + #define FANX 11 + #else + #define FANX 17 + #endif + lcd.setCursor(FANX, 5); lcd_put_u8str_P(PSTR("FAN")); + lcd.setCursor(FANX + 1, 6); lcd.write('%'); + lcd.setCursor(FANX, 7); + lcd.print(i16tostr3rj(per)); + + if (TERN0(HAS_FAN0, thermalManager.fan_speed[0]) || TERN0(HAS_FAN1, thermalManager.fan_speed[1]) || TERN0(HAS_FAN2, thermalManager.fan_speed[2])) + picBits |= ICON_FAN; + else + picBits &= ~ICON_FAN; - #endif // FAN_COUNT > 0 + #endif // HAS_FAN + + #else + + TERN_(HAS_COOLER, _draw_cooler_status(blink)); + TERN_(LASER_COOLANT_FLOW_METER, _draw_flowmeter_status()); + TERN_(I2C_AMMETER, _draw_ammeter_status()); + TERN_(HAS_CUTTER, _draw_cutter_status()); + + #endif // // Line 9, 10 - icons @@ -802,7 +932,7 @@ void MarlinUI::draw_status_screen() { if (!PanelDetected) return; lcd.setCursor((LCD_WIDTH - 14) / 2, row + 1); lcd.write(LCD_STR_THERMOMETER[0]); lcd_put_u8str_P(PSTR(" E")); lcd.write('1' + extruder); lcd.write(' '); - lcd.print(i16tostr3rj(thermalManager.degHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]); lcd.write('/'); + lcd.print(i16tostr3rj(thermalManager.wholeDegHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]); lcd.write('/'); lcd.print(i16tostr3rj(thermalManager.degTargetHotend(extruder))); lcd.write(LCD_STR_DEGREE[0]); lcd.print_line(); } @@ -836,7 +966,7 @@ void MarlinUI::draw_status_screen() { } // Draw a menu item with a (potentially) editable value - void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm) { + void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const data, const bool pgm) { if (!PanelDetected) return; const uint8_t vlen = data ? (pgm ? utf8_strlen_P(data) : utf8_strlen(data)) : 0; lcd.setCursor(0, row); @@ -852,7 +982,7 @@ void MarlinUI::draw_status_screen() { // Low-level draw_edit_screen can be used to draw an edit screen from anyplace // This line moves to the last line of the screen for UBL plot screen on the panel side - void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { + void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) { if (!PanelDetected) return; ui.encoder_direction_normal(); const uint8_t y = TERN0(AUTO_BED_LEVELING_UBL, ui.external_control) ? LCD_HEIGHT - 1 : MIDDLE_Y; diff --git a/Marlin/src/lcd/buttons.h b/Marlin/src/lcd/buttons.h index 07a4524def18..6d028e9bc65a 100644 --- a/Marlin/src/lcd/buttons.h +++ b/Marlin/src/lcd/buttons.h @@ -45,8 +45,37 @@ #define ENCODER_PHASE_3 1 #endif -#if EITHER(HAS_DIGITAL_BUTTONS, DWIN_CREALITY_LCD) +#if IS_RRW_KEYPAD + #define BTN_OFFSET 0 // Bit offset into buttons for shift register values + + #define BLEN_KEYPAD_F3 0 + #define BLEN_KEYPAD_F2 1 + #define BLEN_KEYPAD_F1 2 + #define BLEN_KEYPAD_DOWN 3 + #define BLEN_KEYPAD_RIGHT 4 + #define BLEN_KEYPAD_MIDDLE 5 + #define BLEN_KEYPAD_UP 6 + #define BLEN_KEYPAD_LEFT 7 + + #define EN_KEYPAD_F1 _BV(BTN_OFFSET + BLEN_KEYPAD_F1) + #define EN_KEYPAD_F2 _BV(BTN_OFFSET + BLEN_KEYPAD_F2) + #define EN_KEYPAD_F3 _BV(BTN_OFFSET + BLEN_KEYPAD_F3) + #define EN_KEYPAD_DOWN _BV(BTN_OFFSET + BLEN_KEYPAD_DOWN) + #define EN_KEYPAD_RIGHT _BV(BTN_OFFSET + BLEN_KEYPAD_RIGHT) + #define EN_KEYPAD_MIDDLE _BV(BTN_OFFSET + BLEN_KEYPAD_MIDDLE) + #define EN_KEYPAD_UP _BV(BTN_OFFSET + BLEN_KEYPAD_UP) + #define EN_KEYPAD_LEFT _BV(BTN_OFFSET + BLEN_KEYPAD_LEFT) + + #define RRK(B) (keypad_buttons & (B)) + #ifdef EN_C + #define BUTTON_CLICK() ((buttons & EN_C) || RRK(EN_KEYPAD_MIDDLE)) + #else + #define BUTTON_CLICK() RRK(EN_KEYPAD_MIDDLE) + #endif +#endif + +#if EITHER(HAS_DIGITAL_BUTTONS, HAS_DWIN_E3V2) // Wheel spin pins where BA is 00, 10, 11, 01 (1 bit always changes) #define BLEN_A 0 #define BLEN_B 1 @@ -62,9 +91,7 @@ #endif #if ENABLED(LCD_I2C_VIKI) - #include - #define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C) // button and encoder bit positions within 'buttons' @@ -84,21 +111,15 @@ // I2C buttons take too long to read inside an interrupt context and so we read them during lcd_update #elif ENABLED(LCD_I2C_PANELOLU2) - #if !BUTTON_EXISTS(ENC) // Use I2C if not directly connected to a pin - #define B_I2C_BTN_OFFSET 3 // (the first three bit positions reserved for EN_A, EN_B, EN_C) #define B_MI (PANELOLU2_ENCODER_C << B_I2C_BTN_OFFSET) // requires LiquidTWI2 library v1.2.3 or later #define BUTTON_CLICK() (buttons & B_MI) - #endif - #endif - #else - #undef BUTTON_EXISTS #define BUTTON_EXISTS(...) false @@ -122,37 +143,6 @@ #ifndef BUTTON_CLICK #define BUTTON_CLICK() (buttons & (B_MI|B_ST)) #endif - -#endif - -#if IS_RRW_KEYPAD - #define BTN_OFFSET 0 // Bit offset into buttons for shift register values - - #define BLEN_KEYPAD_F3 0 - #define BLEN_KEYPAD_F2 1 - #define BLEN_KEYPAD_F1 2 - #define BLEN_KEYPAD_DOWN 3 - #define BLEN_KEYPAD_RIGHT 4 - #define BLEN_KEYPAD_MIDDLE 5 - #define BLEN_KEYPAD_UP 6 - #define BLEN_KEYPAD_LEFT 7 - - #define EN_KEYPAD_F1 _BV(BTN_OFFSET + BLEN_KEYPAD_F1) - #define EN_KEYPAD_F2 _BV(BTN_OFFSET + BLEN_KEYPAD_F2) - #define EN_KEYPAD_F3 _BV(BTN_OFFSET + BLEN_KEYPAD_F3) - #define EN_KEYPAD_DOWN _BV(BTN_OFFSET + BLEN_KEYPAD_DOWN) - #define EN_KEYPAD_RIGHT _BV(BTN_OFFSET + BLEN_KEYPAD_RIGHT) - #define EN_KEYPAD_MIDDLE _BV(BTN_OFFSET + BLEN_KEYPAD_MIDDLE) - #define EN_KEYPAD_UP _BV(BTN_OFFSET + BLEN_KEYPAD_UP) - #define EN_KEYPAD_LEFT _BV(BTN_OFFSET + BLEN_KEYPAD_LEFT) - - #define RRK(B) (keypad_buttons & (B)) - - #ifdef EN_C - #define BUTTON_CLICK() ((buttons & EN_C) || RRK(EN_KEYPAD_MIDDLE)) - #else - #define BUTTON_CLICK() RRK(EN_KEYPAD_MIDDLE) - #endif #endif #ifndef EN_A diff --git a/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h index 30a5361ab926..28ca26134e16 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h @@ -30,12 +30,15 @@ extern u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi; class U8GLIB_64128N_2X_HAL : public U8GLIB { public: - U8GLIB_64128N_2X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_st7565_64128n_HAL_2x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset) - { } - U8GLIB_64128N_2X_HAL(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_st7565_64128n_HAL_2x_hw_spi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset) - { } + U8GLIB_64128N_2X_HAL() : U8GLIB() { } + U8GLIB_64128N_2X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, a0, reset); } + U8GLIB_64128N_2X_HAL(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { init(cs, a0, reset); } + void init(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { + U8GLIB::init(&u8g_dev_st7565_64128n_HAL_2x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset); + } + void init(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { + U8GLIB::init(&u8g_dev_st7565_64128n_HAL_2x_hw_spi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset); + } }; extern u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_sw_spi; @@ -43,12 +46,15 @@ extern u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi; class U8GLIB_ST7920_128X64_4X_HAL : public U8GLIB { public: - U8GLIB_ST7920_128X64_4X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_st7920_128x64_HAL_4x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset) // a0 = U8G_PIN_NONE - { } - U8GLIB_ST7920_128X64_4X_HAL(pin_t cs, pin_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_st7920_128x64_HAL_4x_hw_spi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset) // a0 = U8G_PIN_NONE - { } + U8GLIB_ST7920_128X64_4X_HAL() : U8GLIB() { } + U8GLIB_ST7920_128X64_4X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, reset); } + U8GLIB_ST7920_128X64_4X_HAL(pin_t cs, pin_t reset = U8G_PIN_NONE) { init(cs, reset); } + void init(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) { + U8GLIB::init(&u8g_dev_st7920_128x64_HAL_4x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset); // a0 = U8G_PIN_NONE + } + void init(pin_t cs, pin_t reset = U8G_PIN_NONE) { + U8GLIB::init(&u8g_dev_st7920_128x64_HAL_4x_hw_spi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset); // a0 = U8G_PIN_NONE + } }; // @@ -59,27 +65,29 @@ extern u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi; class U8GLIB_ST7920_128X64_RRD : public U8GLIB { public: - U8GLIB_ST7920_128X64_RRD(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset) // a0 = U8G_PIN_NONE - { } + U8GLIB_ST7920_128X64_RRD() : U8GLIB() { } + U8GLIB_ST7920_128X64_RRD(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, reset); } + void init(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) { + U8GLIB::init(&u8g_dev_st7920_128x64_rrd_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset); // a0 = U8G_PIN_NONE + } }; extern u8g_dev_t u8g_dev_sh1106_128x64_2x_i2c_2_wire; class U8GLIB_SH1106_128X64_2X_I2C_2_WIRE : public U8GLIB { public: - U8GLIB_SH1106_128X64_2X_I2C_2_WIRE(uint8_t options = U8G_I2C_OPT_NONE) - : U8GLIB(&u8g_dev_sh1106_128x64_2x_i2c_2_wire, options) - { } + U8GLIB_SH1106_128X64_2X_I2C_2_WIRE() : U8GLIB() { } + U8GLIB_SH1106_128X64_2X_I2C_2_WIRE(uint8_t options) { init(options); } + void init(uint8_t options = U8G_I2C_OPT_NONE) { U8GLIB::init(&u8g_dev_sh1106_128x64_2x_i2c_2_wire, options); } }; extern u8g_dev_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire; class U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE : public U8GLIB { public: - U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE(uint8_t options = U8G_I2C_OPT_NONE) - : U8GLIB(&u8g_dev_ssd1306_128x64_2x_i2c_2_wire, options) - { } + U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE() : U8GLIB() { } + U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE(uint8_t options) { init(options); } + void init(uint8_t options = U8G_I2C_OPT_NONE) { U8GLIB::init(&u8g_dev_ssd1306_128x64_2x_i2c_2_wire, options); } }; // @@ -90,9 +98,9 @@ extern u8g_dev_t u8g_dev_tft_320x240_upscale_from_128x64; class U8GLIB_TFT_320X240_UPSCALE_FROM_128X64 : public U8GLIB { public: - U8GLIB_TFT_320X240_UPSCALE_FROM_128X64(uint8_t cs, uint8_t rs, uint8_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_tft_320x240_upscale_from_128x64, cs, rs, reset) - { } + U8GLIB_TFT_320X240_UPSCALE_FROM_128X64() : U8GLIB() { } + U8GLIB_TFT_320X240_UPSCALE_FROM_128X64(uint8_t cs, uint8_t rs, uint8_t reset = U8G_PIN_NONE) { init(cs, rs, reset); } + void init(uint8_t cs, uint8_t rs, uint8_t reset = U8G_PIN_NONE) { U8GLIB::init(&u8g_dev_tft_320x240_upscale_from_128x64, cs, rs, reset); } }; @@ -100,12 +108,15 @@ extern u8g_dev_t u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, u8g_dev_uc1701_mini1286 class U8GLIB_MINI12864_2X_HAL : public U8GLIB { public: - U8GLIB_MINI12864_2X_HAL(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, sck, mosi, cs, a0, reset) - { } - U8GLIB_MINI12864_2X_HAL(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_uc1701_mini12864_HAL_2x_hw_spi, cs, a0, reset) - { } + U8GLIB_MINI12864_2X_HAL() : U8GLIB() { } + U8GLIB_MINI12864_2X_HAL(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, a0, reset); } + U8GLIB_MINI12864_2X_HAL(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) { init(cs, a0, reset); } + void init(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) { + U8GLIB::init(&u8g_dev_uc1701_mini12864_HAL_2x_sw_spi, sck, mosi, cs, a0, reset); + } + void init(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) { + U8GLIB::init(&u8g_dev_uc1701_mini12864_HAL_2x_hw_spi, cs, a0, reset); + } }; extern u8g_dev_t u8g_dev_ssd1309_sw_spi; @@ -113,10 +124,13 @@ extern u8g_dev_t u8g_dev_ssd1309_hw_spi; class U8GLIB_SSD1309_128X64_HAL : public U8GLIB { public: - U8GLIB_SSD1309_128X64_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_ssd1309_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset) - { } - U8GLIB_SSD1309_128X64_HAL(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) - : U8GLIB(&u8g_dev_ssd1309_hw_spi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset) - { } + U8GLIB_SSD1309_128X64_HAL() : U8GLIB() { } + U8GLIB_SSD1309_128X64_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { init(sck, mosi, cs, a0, reset); } + U8GLIB_SSD1309_128X64_HAL(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { init(cs, a0, reset); } + void init(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { + U8GLIB::init(&u8g_dev_ssd1309_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset); + } + void init(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) { + U8GLIB::init(&u8g_dev_ssd1309_hw_spi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset); + } }; diff --git a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h index 8a707ab41a36..a30dd4ca17f3 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_com_defines.h @@ -23,7 +23,7 @@ // Use this file to select the com driver for device drivers that are NOT in the U8G library -#include +#include #ifndef U8G_HAL_LINKS // Defined by LPC1768/9 environments in platform.ini @@ -97,6 +97,11 @@ #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_HAL_LPC1768_ST7920_hw_spi_fn #define U8G_COM_SSD_I2C_HAL u8g_com_HAL_LPC1768_ssd_hw_i2c_fn +#elif defined(__PLAT_NATIVE_SIM__) + uint8_t u8g_com_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + uint8_t u8g_com_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr); + #define U8G_COM_HAL_SW_SPI_FN u8g_com_sw_spi_fn + #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_ST7920_sw_spi_fn #endif #ifndef U8G_COM_HAL_SW_SPI_FN diff --git a/Marlin/src/lcd/dogm/dogm_Bootscreen.h b/Marlin/src/lcd/dogm/dogm_Bootscreen.h index 0b8845ed794d..42408614715e 100644 --- a/Marlin/src/lcd/dogm/dogm_Bootscreen.h +++ b/Marlin/src/lcd/dogm/dogm_Bootscreen.h @@ -39,6 +39,10 @@ #include "../../../_Bootscreen.h" + #if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED) && DISABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME) && !defined(CUSTOM_BOOTSCREEN_FRAME_TIME) + #define CUSTOM_BOOTSCREEN_FRAME_TIME 500 // (ms) + #endif + #ifndef CUSTOM_BOOTSCREEN_BMPWIDTH #define CUSTOM_BOOTSCREEN_BMPWIDTH 128 #endif diff --git a/Marlin/src/lcd/dogm/dogm_Statusscreen.h b/Marlin/src/lcd/dogm/dogm_Statusscreen.h index 61fee3e048ff..f17dd0636516 100644 --- a/Marlin/src/lcd/dogm/dogm_Statusscreen.h +++ b/Marlin/src/lcd/dogm/dogm_Statusscreen.h @@ -77,6 +77,47 @@ #ifndef STATUS_CUTTER_WIDTH #define STATUS_CUTTER_WIDTH 0 #endif + #ifndef STATUS_CUTTER_BYTEWIDTH + #define STATUS_CUTTER_BYTEWIDTH BW(STATUS_CUTTER_WIDTH) + #endif + +// +// Laser cooler +// +#if !STATUS_COOLER_WIDTH && HAS_COOLER + #include "status/cooler.h" +#endif +#ifndef STATUS_COOLER_WIDTH + #define STATUS_COOLER_WIDTH 0 +#endif +#ifndef STATUS_COOLER_BYTEWIDTH + #define STATUS_COOLER_BYTEWIDTH BW(STATUS_COOLER_WIDTH) +#endif + +// +// Laser Flowmeter +// +#if !STATUS_FLOWMETER_WIDTH && ENABLED(LASER_COOLANT_FLOW_METER) + #include "status/cooler.h" +#endif +#ifndef STATUS_FLOWMETER_WIDTH + #define STATUS_FLOWMETER_WIDTH 0 +#endif +#ifndef STATUS_FLOWMETER_BYTEWIDTH + #define STATUS_FLOWMETER_BYTEWIDTH BW(STATUS_FLOWMETER_WIDTH) +#endif + +// +// Laser Ammeter +// +#if ENABLED(I2C_AMMETER) + #if !STATUS_AMMETER_WIDTH + #include "status/ammeter.h" + #endif + #ifndef STATUS_AMMETER_WIDTH + #define STATUS_AMMETER_WIDTH 0 + #endif +#endif // // Bed @@ -250,7 +291,9 @@ #define STATUS_HOTEND8_WIDTH STATUS_HOTEND7_WIDTH #endif - constexpr uint8_t status_hotend_width[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_WIDTH, STATUS_HOTEND2_WIDTH, STATUS_HOTEND3_WIDTH, STATUS_HOTEND4_WIDTH, STATUS_HOTEND5_WIDTH, STATUS_HOTEND6_WIDTH, STATUS_HOTEND7_WIDTH, STATUS_HOTEND8_WIDTH); + #define _SHNAME(N,T) STATUS_HOTEND##N##_##T, + + constexpr uint8_t status_hotend_width[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, WIDTH) }; #define STATUS_HOTEND_WIDTH(N) status_hotend_width[N] #ifndef STATUS_HOTEND1_BYTEWIDTH @@ -278,7 +321,7 @@ #define STATUS_HOTEND8_BYTEWIDTH BW(STATUS_HOTEND8_WIDTH) #endif - constexpr uint8_t status_hotend_bytewidth[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_BYTEWIDTH, STATUS_HOTEND2_BYTEWIDTH, STATUS_HOTEND3_BYTEWIDTH, STATUS_HOTEND4_BYTEWIDTH, STATUS_HOTEND5_BYTEWIDTH, STATUS_HOTEND6_BYTEWIDTH, STATUS_HOTEND7_BYTEWIDTH, STATUS_HOTEND8_BYTEWIDTH); + constexpr uint8_t status_hotend_bytewidth[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, BYTEWIDTH) }; #define STATUS_HOTEND_BYTEWIDTH(N) status_hotend_bytewidth[N] #ifndef STATUS_HOTEND1_X @@ -308,7 +351,7 @@ #define STATUS_HOTEND8_X STATUS_HOTEND7_X + STATUS_HEATERS_XSPACE #endif - constexpr uint8_t status_hotend_x[HOTENDS] = ARRAY_N(HOTENDS, STATUS_HOTEND1_X, STATUS_HOTEND2_X, STATUS_HOTEND3_X, STATUS_HOTEND4_X, STATUS_HOTEND5_X, STATUS_HOTEND6_X, STATUS_HOTEND7_X, STATUS_HOTEND8_X); + constexpr uint8_t status_hotend_x[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, X) }; #define STATUS_HOTEND_X(N) status_hotend_x[N] #elif HAS_MULTI_HOTEND #define STATUS_HOTEND_X(N) ((N) ? STATUS_HOTEND2_X : STATUS_HOTEND1_X) @@ -339,13 +382,15 @@ #ifndef STATUS_HOTEND8_TEXT_X #define STATUS_HOTEND8_TEXT_X STATUS_HOTEND7_TEXT_X + STATUS_HEATERS_XSPACE #endif - constexpr uint8_t status_hotend_text_x[] = ARRAY_N(HOTENDS, STATUS_HOTEND1_TEXT_X, STATUS_HOTEND2_TEXT_X, STATUS_HOTEND3_TEXT_X, STATUS_HOTEND4_TEXT_X, STATUS_HOTEND5_TEXT_X, STATUS_HOTEND6_TEXT_X, STATUS_HOTEND7_TEXT_X, STATUS_HOTEND8_TEXT_X); + constexpr uint8_t status_hotend_text_x[HOTENDS] = { REPEAT2_S(1, INCREMENT(HOTENDS), _SHNAME, TEXT_X) }; #define STATUS_HOTEND_TEXT_X(N) status_hotend_text_x[N] #else #define STATUS_HOTEND_TEXT_X(N) (STATUS_HOTEND1_X + 6 + (N) * (STATUS_HEATERS_XSPACE)) #endif #endif + #undef _SHNAME + #if STATUS_HOTEND_BITMAPS > 1 && DISABLED(STATUS_HOTEND_NUMBERLESS) #define TEST_BITMAP_OFF status_hotend1_a_bmp #define TEST_BITMAP_ON status_hotend1_b_bmp @@ -415,46 +460,45 @@ // // Cutter Bitmap Properties // -#ifndef STATUS_CUTTER_BYTEWIDTH - #define STATUS_CUTTER_BYTEWIDTH BW(STATUS_CUTTER_WIDTH) -#endif -#if STATUS_CUTTER_WIDTH +#if HAS_CUTTER + #if STATUS_CUTTER_WIDTH - #ifndef STATUS_CUTTER_X - #define STATUS_CUTTER_X (LCD_PIXEL_WIDTH - (STATUS_CUTTER_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH) * 8) - #endif + #ifndef STATUS_CUTTER_X + #define STATUS_CUTTER_X (LCD_PIXEL_WIDTH - (STATUS_CUTTER_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH) * 8) + #endif - #ifndef STATUS_CUTTER_HEIGHT - #ifdef STATUS_CUTTER_ANIM - #define STATUS_CUTTER_HEIGHT(S) ((S) ? sizeof(status_cutter_on_bmp) / (STATUS_CUTTER_BYTEWIDTH) : sizeof(status_cutter_bmp) / (STATUS_CUTTER_BYTEWIDTH)) - #else - #define STATUS_CUTTER_HEIGHT(S) (sizeof(status_cutter_bmp) / (STATUS_CUTTER_BYTEWIDTH)) + #ifndef STATUS_CUTTER_HEIGHT + #ifdef STATUS_CUTTER_ANIM + #define STATUS_CUTTER_HEIGHT(S) ((S) ? sizeof(status_cutter_on_bmp) / (STATUS_CUTTER_BYTEWIDTH) : sizeof(status_cutter_bmp) / (STATUS_CUTTER_BYTEWIDTH)) + #else + #define STATUS_CUTTER_HEIGHT(S) (sizeof(status_cutter_bmp) / (STATUS_CUTTER_BYTEWIDTH)) + #endif #endif - #endif - #ifndef STATUS_CUTTER_Y - #define STATUS_CUTTER_Y(S) 4 - #endif + #ifndef STATUS_CUTTER_Y + #define STATUS_CUTTER_Y(S) 4 + #endif - #ifndef STATUS_CUTTER_TEXT_X - #define STATUS_CUTTER_TEXT_X (STATUS_CUTTER_X -1) - #endif + #ifndef STATUS_CUTTER_TEXT_X + #define STATUS_CUTTER_TEXT_X (STATUS_CUTTER_X - 1) + #endif - #ifndef STATUS_CUTTER_TEXT_Y - #define STATUS_CUTTER_TEXT_Y 28 - #endif + #ifndef STATUS_CUTTER_TEXT_Y + #define STATUS_CUTTER_TEXT_Y 28 + #endif - static_assert( - sizeof(status_cutter_bmp) == (STATUS_CUTTER_BYTEWIDTH) * (STATUS_CUTTER_HEIGHT(0)), - "Status cutter bitmap (status_cutter_bmp) dimensions don't match data." - ); - #ifdef STATUS_CUTTER_ANIM static_assert( - sizeof(status_cutter_on_bmp) == (STATUS_CUTTER_BYTEWIDTH) * (STATUS_CUTTER_HEIGHT(1)), - "Status cutter bitmap (status_cutter_on_bmp) dimensions don't match data." + sizeof(status_cutter_bmp) == (STATUS_CUTTER_BYTEWIDTH) * STATUS_CUTTER_HEIGHT(0), + "Status cutter bitmap (status_cutter_bmp) dimensions don't match data." ); - #endif + #ifdef STATUS_CUTTER_ANIM + static_assert( + sizeof(status_cutter_on_bmp) == (STATUS_CUTTER_BYTEWIDTH) * STATUS_CUTTER_HEIGHT(1), + "Status cutter bitmap (status_cutter_on_bmp) dimensions don't match data." + ); + #endif + #endif #endif // @@ -486,18 +530,114 @@ #endif static_assert( - sizeof(status_chamber_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * (STATUS_CHAMBER_HEIGHT(0)), + sizeof(status_chamber_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * STATUS_CHAMBER_HEIGHT(0), "Status chamber bitmap (status_chamber_bmp) dimensions don't match data." ); #ifdef STATUS_CHAMBER_ANIM static_assert( - sizeof(status_chamber_on_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * (STATUS_CHAMBER_HEIGHT(1)), + sizeof(status_chamber_on_bmp) == (STATUS_CHAMBER_BYTEWIDTH) * STATUS_CHAMBER_HEIGHT(1), "Status chamber bitmap (status_chamber_on_bmp) dimensions don't match data." ); #endif #endif +// +// Cooler Bitmap Properties +// +#if HAS_COOLER + #if STATUS_COOLER_WIDTH + + #ifndef STATUS_COOLER_X + #define STATUS_COOLER_X (LCD_PIXEL_WIDTH - (STATUS_COOLER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH) * 8) + #endif + + #ifndef STATUS_COOLER_HEIGHT + #define STATUS_COOLER_HEIGHT(S) (sizeof(status_cooler_bmp1) / (STATUS_COOLER_BYTEWIDTH)) + #endif + + #ifndef STATUS_COOLER_Y + #define STATUS_COOLER_Y(S) (18 - STATUS_COOLER_HEIGHT(S)) + #endif + + #ifndef STATUS_COOLER_TEXT_X + #define STATUS_COOLER_TEXT_X (STATUS_COOLER_X + 12) + #endif + + static_assert( + sizeof(status_cooler_bmp1) == (STATUS_COOLER_BYTEWIDTH) * STATUS_COOLER_HEIGHT(0), + "Status cooler bitmap (status_cooler_bmp1) dimensions don't match data." + ); + #ifdef STATUS_COOLER_ANIM + static_assert( + sizeof(status_cooler_bmp2) == (STATUS_COOLER_BYTEWIDTH) * STATUS_COOLER_HEIGHT(1), + "Status cooler bitmap (status_cooler_bmp2) dimensions don't match data." + ); + #endif + + #endif +#endif + +// +// Flowmeter Bitmap Properties +// +#if ENABLED(LASER_COOLANT_FLOW_METER) + #if STATUS_FLOWMETER_WIDTH + + #ifndef STATUS_FLOWMETER_X + #define STATUS_FLOWMETER_X (LCD_PIXEL_WIDTH - (STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8) + #endif + + #ifndef STATUS_FLOWMETER_HEIGHT + #define STATUS_FLOWMETER_HEIGHT(S) (sizeof(status_flowmeter_bmp1) / (STATUS_FLOWMETER_BYTEWIDTH)) + #endif + + #ifndef STATUS_FLOWMETER_Y + #define STATUS_FLOWMETER_Y(S) (20 - STATUS_FLOWMETER_HEIGHT(S)) + #endif + + #ifndef STATUS_FLOWMETER_TEXT_X + #define STATUS_FLOWMETER_TEXT_X (STATUS_FLOWMETER_X + 12) + #endif + + static_assert( + sizeof(status_flowmeter_bmp1) == (STATUS_FLOWMETER_BYTEWIDTH) * STATUS_FLOWMETER_HEIGHT(0), + "Status flowmeter bitmap (status_flowmeter_bmp1) dimensions don't match data." + ); + #ifdef STATUS_COOLER_ANIM + static_assert( + sizeof(status_flowmeter_bmp2) == (STATUS_FLOWMETER_BYTEWIDTH) * STATUS_FLOWMETER_HEIGHT(1), + "Status flowmeter bitmap (status_flowmeter_bmp2) dimensions don't match data." + ); + #endif + #endif +#endif + +// +// I2C Laser Ammeter +// +#if ENABLED(I2C_AMMETER) && STATUS_AMMETER_WIDTH + #ifndef STATUS_AMMETER_BYTEWIDTH + #define STATUS_AMMETER_BYTEWIDTH BW(STATUS_AMMETER_WIDTH) + #endif + #ifndef STATUS_AMMETER_X + #define STATUS_AMMETER_X (LCD_PIXEL_WIDTH - (STATUS_AMMETER_BYTEWIDTH + STATUS_FLOWMETER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_CUTTER_BYTEWIDTH + STATUS_COOLER_BYTEWIDTH) * 8) + #endif + #ifndef STATUS_AMMETER_HEIGHT + #define STATUS_AMMETER_HEIGHT(S) (sizeof(status_ammeter_bmp_mA) / (STATUS_AMMETER_BYTEWIDTH)) + #endif + #ifndef STATUS_AMMETER_Y + #define STATUS_AMMETER_Y(S) (18 - STATUS_AMMETER_HEIGHT(S)) + #endif + #ifndef STATUS_AMMETER_TEXT_X + #define STATUS_AMMETER_TEXT_X (STATUS_AMMETER_X + 7) + #endif + static_assert( + sizeof(status_ammeter_bmp_mA) == (STATUS_AMMETER_BYTEWIDTH) * STATUS_AMMETER_HEIGHT(0), + "Status ammeter bitmap (status_ammeter_bmp_mA) dimensions don't match data." + ); +#endif + // // Bed Bitmap Properties // @@ -507,7 +647,7 @@ #if STATUS_BED_WIDTH && !STATUS_HEATERS_WIDTH #ifndef STATUS_BED_X - #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8) + #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH + STATUS_BED_BYTEWIDTH) * 8 - TERN0(STATUS_HEAT_PERCENT, 4)) #endif #ifndef STATUS_BED_HEIGHT @@ -527,12 +667,12 @@ #endif static_assert( - sizeof(status_bed_bmp) == (STATUS_BED_BYTEWIDTH) * (STATUS_BED_HEIGHT(0)), + sizeof(status_bed_bmp) == (STATUS_BED_BYTEWIDTH) * STATUS_BED_HEIGHT(0), "Status bed bitmap (status_bed_bmp) dimensions don't match data." ); #ifdef STATUS_BED_ANIM static_assert( - sizeof(status_bed_on_bmp) == (STATUS_BED_BYTEWIDTH) * (STATUS_BED_HEIGHT(1)), + sizeof(status_bed_on_bmp) == (STATUS_BED_BYTEWIDTH) * STATUS_BED_HEIGHT(1), "Status bed bitmap (status_bed_on_bmp) dimensions don't match data." ); #endif @@ -585,6 +725,16 @@ #if HAS_CUTTER && !DO_DRAW_BED #define DO_DRAW_CUTTER 1 #endif +#if HAS_COOLER + #define DO_DRAW_COOLER 1 +#endif +#if ENABLED(LASER_COOLANT_FLOW_METER) + #define DO_DRAW_FLOWMETER 1 +#endif +#if ENABLED(I2C_AMMETER) + #define DO_DRAW_AMMETER 1 +#endif + #if HAS_TEMP_CHAMBER && STATUS_CHAMBER_WIDTH && HOTENDS <= 4 #define DO_DRAW_CHAMBER 1 #endif @@ -603,6 +753,12 @@ #if BOTH(DO_DRAW_CUTTER, STATUS_CUTTER_ANIM) #define ANIM_CUTTER 1 #endif +#if BOTH(DO_DRAW_COOLER, STATUS_COOLER_ANIM) + #define ANIM_COOLER 1 +#endif +#if BOTH(DO_DRAW_FLOWMETER, STATUS_FLOWMETER_ANIM) + #define ANIM_FLOWMETER 1 +#endif #if ANIM_HOTEND || ANIM_BED || ANIM_CHAMBER || ANIM_CUTTER #define ANIM_HBCC 1 #endif diff --git a/Marlin/src/lcd/dogm/fontdata/fontdata_6x9_marlin.h b/Marlin/src/lcd/dogm/fontdata/fontdata_6x9_marlin.h index cd9cb3cdc968..524ff18778dc 100644 --- a/Marlin/src/lcd/dogm/fontdata/fontdata_6x9_marlin.h +++ b/Marlin/src/lcd/dogm/fontdata/fontdata_6x9_marlin.h @@ -32,7 +32,7 @@ X Font ascent = 6 descent=-2 Max Font ascent = 7 descent=-2 */ -#include +#include const u8g_fntpgm_uint8_t u8g_font_6x9[2434] U8G_FONT_SECTION(".progmem.u8g_font_6x9") = { 0x00,0x06,0x09,0x00,0xFE,0x06,0x02,0x0F,0x03,0x84,0x01,0xFF,0xFE,0x07,0xFE,0x06, 0xFE,0x05,0x07,0x07,0x00,0x00,0x00,0x40,0xF0,0xC8,0x88,0x98,0x78,0x10,0x05,0x07, diff --git a/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h b/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h index b4b615da4d0f..6f55d3bc3df8 100644 --- a/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h +++ b/Marlin/src/lcd/dogm/fontdata/fontdata_ISO10646_1.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -16,7 +19,8 @@ * along with this program. If not, see . * */ -#include + +#include #if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7) // reduced font (only symbols 1 - 127) - saves about 1278 bytes of FLASH diff --git a/Marlin/src/lcd/dogm/fontdata/langdata.h b/Marlin/src/lcd/dogm/fontdata/langdata.h new file mode 100644 index 000000000000..746a3bd0b451 --- /dev/null +++ b/Marlin/src/lcd/dogm/fontdata/langdata.h @@ -0,0 +1,23 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_an.h b/Marlin/src/lcd/dogm/fontdata/langdata_an.h index ffda82764fa2..fb0fdcf893f5 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_an.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_an.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_an[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_bg.h b/Marlin/src/lcd/dogm/fontdata/langdata_bg.h index c506f879335b..20cd7b9ed74d 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_bg.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_bg.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_8_144_149[96] U8G_FONT_SECTION("fontpage_8_144_149") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0x95,0x00,0x07,0xFF,0x00, @@ -64,14 +66,13 @@ const u8g_fntpgm_uint8_t fontpage_8_206_207[39] U8G_FONT_SECTION("fontpage_8_206 0x00,0x05,0x05,0x05,0x06,0x00,0x00,0x90,0xA8,0xE8,0xA8,0x90,0x04,0x05,0x05,0x06, 0x01,0x00,0x70,0x90,0x70,0x50,0x90}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(8, 144, 149, fontpage_8_144_149), // 'А' -- 'Е' - FONTDATA_ITEM(8, 151, 152, fontpage_8_151_152), // 'З' -- 'И' - FONTDATA_ITEM(8, 154, 164, fontpage_8_154_164), // 'К' -- 'Ф' - FONTDATA_ITEM(8, 166, 166, fontpage_8_166_166), // 'Ц' -- 'Ц' - FONTDATA_ITEM(8, 175, 195, fontpage_8_175_195), // 'Я' -- 'у' - FONTDATA_ITEM(8, 197, 200, fontpage_8_197_200), // 'х' -- 'ш' - FONTDATA_ITEM(8, 202, 202, fontpage_8_202_202), // 'ъ' -- 'ъ' - FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я' +static const uxg_fontinfo_t g_fontinfo_bg[] PROGMEM = { + FONTDATA_ITEM(8, 144, 149, fontpage_8_144_149), // 'А' -- 'Е' + FONTDATA_ITEM(8, 151, 152, fontpage_8_151_152), // 'З' -- 'И' + FONTDATA_ITEM(8, 154, 164, fontpage_8_154_164), // 'К' -- 'Ф' + FONTDATA_ITEM(8, 166, 166, fontpage_8_166_166), // 'Ц' -- 'Ц' + FONTDATA_ITEM(8, 175, 195, fontpage_8_175_195), // 'Я' -- 'у' + FONTDATA_ITEM(8, 197, 200, fontpage_8_197_200), // 'х' -- 'ш' + FONTDATA_ITEM(8, 202, 202, fontpage_8_202_202), // 'ъ' -- 'ъ' + FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ca.h b/Marlin/src/lcd/dogm/fontdata/langdata_ca.h index ffda82764fa2..deac3678b56e 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ca.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ca.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_ca[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_cz.h b/Marlin/src/lcd/dogm/fontdata/langdata_cz.h index 754459d9af2a..39f03f3a97d7 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_cz.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_cz.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_140_141[47] U8G_FONT_SECTION("fontpage_2_140_141") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8D,0x00,0x0A,0x00,0x00, @@ -40,15 +42,14 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253 0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x08,0x10,0x20,0x40,0x80, 0xF8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' - FONTDATA_ITEM(2, 143, 143, fontpage_2_143_143), // 'ď' -- 'ď' - FONTDATA_ITEM(2, 154, 155, fontpage_2_154_155), // 'Ě' -- 'ě' - FONTDATA_ITEM(2, 200, 200, fontpage_2_200_200), // 'ň' -- 'ň' - FONTDATA_ITEM(2, 216, 217, fontpage_2_216_217), // 'Ř' -- 'ř' - FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š' - FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť' - FONTDATA_ITEM(2, 239, 239, fontpage_2_239_239), // 'ů' -- 'ů' - FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž' +static const uxg_fontinfo_t g_fontinfo_cz[] PROGMEM = { + FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' + FONTDATA_ITEM(2, 143, 143, fontpage_2_143_143), // 'ď' -- 'ď' + FONTDATA_ITEM(2, 154, 155, fontpage_2_154_155), // 'Ě' -- 'ě' + FONTDATA_ITEM(2, 200, 200, fontpage_2_200_200), // 'ň' -- 'ň' + FONTDATA_ITEM(2, 216, 217, fontpage_2_216_217), // 'Ř' -- 'ř' + FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š' + FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť' + FONTDATA_ITEM(2, 239, 239, fontpage_2_239_239), // 'ů' -- 'ů' + FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_da.h b/Marlin/src/lcd/dogm/fontdata/langdata_da.h index ffda82764fa2..ad8df9a42976 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_da.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_da.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_da[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_de.h b/Marlin/src/lcd/dogm/fontdata/langdata_de.h index ffda82764fa2..44230fa302b3 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_de.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_de.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_de[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_el.h b/Marlin/src/lcd/dogm/fontdata/langdata_el.h index 4b545f228436..6fefab9c61a1 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_el.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_el.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136_136") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00, @@ -75,16 +77,15 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA6,0xA6,0x00,0x01,0x00,0x00, 0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xA8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' - FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' - FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' - FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' - FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' - FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε' - FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ' - FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω' - FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ' - FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…' +static const uxg_fontinfo_t g_fontinfo_el[] PROGMEM = { + FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' + FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' + FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' + FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' + FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' + FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε' + FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ' + FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω' + FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ' + FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h b/Marlin/src/lcd/dogm/fontdata/langdata_el_CY.h similarity index 86% rename from Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h rename to Marlin/src/lcd/dogm/fontdata/langdata_el_CY.h index 4b545f228436..c3a2264aecd5 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_el_gr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_el_CY.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_7_136_136[33] U8G_FONT_SECTION("fontpage_7_136_136") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x88,0x88,0x00,0x0A,0x00,0x00, @@ -75,16 +77,15 @@ const u8g_fntpgm_uint8_t fontpage_64_166_166[24] U8G_FONT_SECTION("fontpage_64_1 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA6,0xA6,0x00,0x01,0x00,0x00, 0x00,0x05,0x01,0x01,0x06,0x00,0x00,0xA8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' - FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' - FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' - FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' - FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' - FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε' - FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ' - FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω' - FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ' - FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…' +static const uxg_fontinfo_t g_fontinfo_el_CY[] PROGMEM = { + FONTDATA_ITEM(7, 136, 136, fontpage_7_136_136), // 'Έ' -- 'Έ' + FONTDATA_ITEM(7, 145, 157, fontpage_7_145_157), // 'Α' -- 'Ν' + FONTDATA_ITEM(7, 159, 161, fontpage_7_159_161), // 'Ο' -- 'Ρ' + FONTDATA_ITEM(7, 163, 167, fontpage_7_163_167), // 'Σ' -- 'Χ' + FONTDATA_ITEM(7, 172, 175, fontpage_7_172_175), // 'ά' -- 'ί' + FONTDATA_ITEM(7, 177, 181, fontpage_7_177_181), // 'α' -- 'ε' + FONTDATA_ITEM(7, 183, 199, fontpage_7_183_199), // 'η' -- 'χ' + FONTDATA_ITEM(7, 201, 201, fontpage_7_201_201), // 'ω' -- 'ω' + FONTDATA_ITEM(7, 204, 206, fontpage_7_204_206), // 'ό' -- 'ώ' + FONTDATA_ITEM(64, 166, 166, fontpage_64_166_166), // '…' -- '…' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_en.h b/Marlin/src/lcd/dogm/fontdata/langdata_en.h index ffda82764fa2..a69161b5620f 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_en.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_en.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_en[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_es.h b/Marlin/src/lcd/dogm/fontdata/langdata_es.h index ffda82764fa2..a8ddb44ce896 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_es.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_es.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_es[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_eu.h b/Marlin/src/lcd/dogm/fontdata/langdata_eu.h index ffda82764fa2..3fdc0253bc80 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_eu.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_eu.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_eu[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_fi.h b/Marlin/src/lcd/dogm/fontdata/langdata_fi.h index ffda82764fa2..25e192753756 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_fi.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_fi.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_fi[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_fr.h b/Marlin/src/lcd/dogm/fontdata/langdata_fr.h index ffda82764fa2..a3cc160c97ce 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_fr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_fr.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_fr[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_gl.h b/Marlin/src/lcd/dogm/fontdata/langdata_gl.h index ffda82764fa2..2f93d05dbe20 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_gl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_gl.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_gl[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_hr.h b/Marlin/src/lcd/dogm/fontdata/langdata_hr.h index cdb2cc7d1ade..b5e4d544cca2 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_hr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_hr.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_135_135[31] U8G_FONT_SECTION("fontpage_2_135_135") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x87,0x87,0x00,0x08,0x00,0x00, @@ -22,11 +24,10 @@ const u8g_fntpgm_uint8_t fontpage_2_254_254[31] U8G_FONT_SECTION("fontpage_2_254 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0x00,0x08,0x00,0x00, 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' - FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' - FONTDATA_ITEM(2, 145, 145, fontpage_2_145_145), // 'đ' -- 'đ' - FONTDATA_ITEM(2, 225, 225, fontpage_2_225_225), // 'š' -- 'š' - FONTDATA_ITEM(2, 254, 254, fontpage_2_254_254), // 'ž' -- 'ž' +static const uxg_fontinfo_t g_fontinfo_hr[] PROGMEM = { + FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' + FONTDATA_ITEM(2, 140, 141, fontpage_2_140_141), // 'Č' -- 'č' + FONTDATA_ITEM(2, 145, 145, fontpage_2_145_145), // 'đ' -- 'đ' + FONTDATA_ITEM(2, 225, 225, fontpage_2_225_225), // 'š' -- 'š' + FONTDATA_ITEM(2, 254, 254, fontpage_2_254_254), // 'ž' -- 'ž' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_hu.h b/Marlin/src/lcd/dogm/fontdata/langdata_hu.h index 8c15a3890ab0..450662a8c9d1 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_hu.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_hu.h @@ -3,13 +3,14 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_241_241[31] U8G_FONT_SECTION("fontpage_2_241_241") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xF1,0xF1,0x00,0x08,0x00,0x00, 0x00,0x05,0x08,0x08,0x06,0x00,0x00,0x48,0x90,0x00,0x88,0x88,0x88,0x88,0x70}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 241, 241, fontpage_2_241_241), // 'ű' -- 'ű' +static const uxg_fontinfo_t g_fontinfo_hu[] PROGMEM = { + FONTDATA_ITEM(2, 241, 241, fontpage_2_241_241), // 'ű' -- 'ű' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_it.h b/Marlin/src/lcd/dogm/fontdata/langdata_it.h index ffda82764fa2..1a41a794fa52 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_it.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_it.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_it[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h b/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h index 01316d4c1311..dc483b7d2b59 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_jp_kana.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_97_161_164[65] U8G_FONT_SECTION("fontpage_97_161_164") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xA1,0xA4,0x00,0x07,0x00,0x00, @@ -94,18 +96,17 @@ const u8g_fntpgm_uint8_t fontpage_97_252_252[25] U8G_FONT_SECTION("fontpage_97_2 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x05,0x00,0x00, 0x00,0x05,0x02,0x02,0x06,0x00,0x03,0x80,0x78}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ' - FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ' - FONTDATA_ITEM(97, 168, 168, fontpage_97_168_168), // 'エ' -- 'エ' - FONTDATA_ITEM(97, 170, 187, fontpage_97_170_187), // 'オ' -- 'セ' - FONTDATA_ITEM(97, 189, 193, fontpage_97_189_193), // 'ソ' -- 'チ' - FONTDATA_ITEM(97, 195, 211, fontpage_97_195_211), // 'ッ' -- 'ビ' - FONTDATA_ITEM(97, 213, 217, fontpage_97_213_217), // 'フ' -- 'ベ' - FONTDATA_ITEM(97, 219, 220, fontpage_97_219_220), // 'ホ' -- 'ボ' - FONTDATA_ITEM(97, 222, 223, fontpage_97_222_223), // 'マ' -- 'ミ' - FONTDATA_ITEM(97, 225, 237, fontpage_97_225_237), // 'メ' -- 'ロ' - FONTDATA_ITEM(97, 242, 243, fontpage_97_242_243), // 'ヲ' -- 'ン' - FONTDATA_ITEM(97, 252, 252, fontpage_97_252_252), // 'ー' -- 'ー' +static const uxg_fontinfo_t g_fontinfo_jp_kana[] PROGMEM = { + FONTDATA_ITEM(97, 161, 164, fontpage_97_161_164), // 'ァ' -- 'イ' + FONTDATA_ITEM(97, 166, 166, fontpage_97_166_166), // 'ウ' -- 'ウ' + FONTDATA_ITEM(97, 168, 168, fontpage_97_168_168), // 'エ' -- 'エ' + FONTDATA_ITEM(97, 170, 187, fontpage_97_170_187), // 'オ' -- 'セ' + FONTDATA_ITEM(97, 189, 193, fontpage_97_189_193), // 'ソ' -- 'チ' + FONTDATA_ITEM(97, 195, 211, fontpage_97_195_211), // 'ッ' -- 'ビ' + FONTDATA_ITEM(97, 213, 217, fontpage_97_213_217), // 'フ' -- 'ベ' + FONTDATA_ITEM(97, 219, 220, fontpage_97_219_220), // 'ホ' -- 'ボ' + FONTDATA_ITEM(97, 222, 223, fontpage_97_222_223), // 'マ' -- 'ミ' + FONTDATA_ITEM(97, 225, 237, fontpage_97_225_237), // 'メ' -- 'ロ' + FONTDATA_ITEM(97, 242, 243, fontpage_97_242_243), // 'ヲ' -- 'ン' + FONTDATA_ITEM(97, 252, 252, fontpage_97_252_252), // 'ー' -- 'ー' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h b/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h index 6b48434a6f58..31cc0bca36b7 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ko_KR.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_344_240_240[34] U8G_FONT_SECTION("fontpage_344_240_240") = { 0x00,0x0B,0x0D,0x00,0xFD,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x09,0xFE,0x00, @@ -436,112 +438,111 @@ const u8g_fntpgm_uint8_t fontpage_431_136_136[34] U8G_FONT_SECTION("fontpage_431 0x00,0x08,0x0B,0x0B,0x0A,0x01,0xFE,0x71,0x01,0xFD,0x01,0x71,0x49,0x89,0x49,0x71, 0x01,0x01}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(344, 240, 240, fontpage_344_240_240), // '거' -- '거' - FONTDATA_ITEM(345, 224, 224, fontpage_345_224_224), // '고' -- '고' - FONTDATA_ITEM(347, 248, 248, fontpage_347_248_248), // '그' -- '그' - FONTDATA_ITEM(348, 137, 137, fontpage_348_137_137), // '급' -- '급' - FONTDATA_ITEM(348, 176, 176, fontpage_348_176_176), // '기' -- '기' - FONTDATA_ITEM(348, 197, 197, fontpage_348_197_197), // '깅' -- '깅' - FONTDATA_ITEM(352, 196, 196, fontpage_352_196_196), // '끄' -- '끄' - FONTDATA_ITEM(353, 180, 180, fontpage_353_180_180), // '내' -- '내' - FONTDATA_ITEM(354, 248, 248, fontpage_354_248_248), // '노' -- '노' - FONTDATA_ITEM(356, 132, 132, fontpage_356_132_132), // '누' -- '누' - FONTDATA_ITEM(356, 244, 244, fontpage_356_244_244), // '뉴' -- '뉴' - FONTDATA_ITEM(357, 200, 200, fontpage_357_200_200), // '니' -- '니' - FONTDATA_ITEM(357, 228, 228, fontpage_357_228_228), // '다' -- '다' - FONTDATA_ITEM(357, 249, 249, fontpage_357_249_249), // '당' -- '당' - FONTDATA_ITEM(359, 196, 196, fontpage_359_196_196), // '도' -- '도' - FONTDATA_ITEM(359, 204, 204, fontpage_359_204_204), // '돌' -- '돌' - FONTDATA_ITEM(359, 217, 217, fontpage_359_217_217), // '동' -- '동' - FONTDATA_ITEM(360, 152, 152, fontpage_360_152_152), // '되' -- '되' - FONTDATA_ITEM(360, 156, 156, fontpage_360_156_156), // '된' -- '된' - FONTDATA_ITEM(360, 168, 168, fontpage_360_168_168), // '됨' -- '됨' - FONTDATA_ITEM(361, 164, 164, fontpage_361_164_164), // '뒤' -- '뒤' - FONTDATA_ITEM(361, 220, 220, fontpage_361_220_220), // '드' -- '드' - FONTDATA_ITEM(362, 148, 148, fontpage_362_148_148), // '디' -- '디' - FONTDATA_ITEM(366, 252, 252, fontpage_366_252_252), // '라' -- '라' - FONTDATA_ITEM(367, 236, 236, fontpage_367_236_236), // '러' -- '러' - FONTDATA_ITEM(368, 136, 136, fontpage_368_136_136), // '레' -- '레' - FONTDATA_ITEM(368, 165, 165, fontpage_368_165_165), // '력' -- '력' - FONTDATA_ITEM(368, 220, 220, fontpage_368_220_220), // '로' -- '로' - FONTDATA_ITEM(369, 204, 204, fontpage_369_204_204), // '료' -- '료' - FONTDATA_ITEM(370, 244, 244, fontpage_370_244_244), // '르' -- '르' - FONTDATA_ITEM(371, 172, 172, fontpage_371_172_172), // '리' -- '리' - FONTDATA_ITEM(371, 176, 176, fontpage_371_176_176), // '린' -- '린' - FONTDATA_ITEM(371, 189, 189, fontpage_371_189_189), // '립' -- '립' - FONTDATA_ITEM(371, 193, 193, fontpage_371_193_193), // '링' -- '링' - FONTDATA_ITEM(372, 200, 200, fontpage_372_200_200), // '멈' -- '멈' - FONTDATA_ITEM(372, 212, 212, fontpage_372_212_212), // '메' -- '메' - FONTDATA_ITEM(372, 244, 244, fontpage_372_244_244), // '면' -- '면' - FONTDATA_ITEM(373, 168, 168, fontpage_373_168_168), // '모' -- '모' - FONTDATA_ITEM(373, 187, 187, fontpage_373_187_187), // '못' -- '못' - FONTDATA_ITEM(375, 248, 248, fontpage_375_248_248), // '미' -- '미' - FONTDATA_ITEM(376, 128, 128, fontpage_376_128_128), // '밀' -- '밀' - FONTDATA_ITEM(376, 148, 148, fontpage_376_148_148), // '바' -- '바' - FONTDATA_ITEM(377, 132, 132, fontpage_377_132_132), // '버' -- '버' - FONTDATA_ITEM(377, 160, 160, fontpage_377_160_160), // '베' -- '베' - FONTDATA_ITEM(377, 168, 168, fontpage_377_168_168), // '벨' -- '벨' - FONTDATA_ITEM(377, 248, 248, fontpage_377_248_248), // '본' -- '본' - FONTDATA_ITEM(380, 196, 196, fontpage_380_196_196), // '비' -- '비' - FONTDATA_ITEM(385, 172, 172, fontpage_385_172_172), // '사' -- '사' - FONTDATA_ITEM(385, 189, 189, fontpage_385_189_189), // '삽' -- '삽' - FONTDATA_ITEM(385, 200, 200, fontpage_385_200_200), // '새' -- '새' - FONTDATA_ITEM(386, 164, 164, fontpage_386_164_164), // '설' -- '설' - FONTDATA_ITEM(387, 140, 141, fontpage_387_140_141), // '소' -- '속' - FONTDATA_ITEM(389, 164, 164, fontpage_389_164_164), // '스' -- '스' - FONTDATA_ITEM(389, 172, 172, fontpage_389_172_172), // '슬' -- '슬' - FONTDATA_ITEM(389, 220, 221, fontpage_389_220_221), // '시' -- '식' - FONTDATA_ITEM(395, 180, 180, fontpage_395_180_180), // '어' -- '어' - FONTDATA_ITEM(395, 198, 198, fontpage_395_198_198), // '없' -- '없' - FONTDATA_ITEM(395, 209, 209, fontpage_395_209_209), // '엑' -- '엑' - FONTDATA_ITEM(395, 212, 212, fontpage_395_212_212), // '엔' -- '엔' - FONTDATA_ITEM(395, 244, 244, fontpage_395_244_244), // '열' -- '열' - FONTDATA_ITEM(396, 136, 136, fontpage_396_136_136), // '예' -- '예' - FONTDATA_ITEM(396, 164, 164, fontpage_396_164_164), // '오' -- '오' - FONTDATA_ITEM(396, 168, 168, fontpage_396_168_168), // '온' -- '온' - FONTDATA_ITEM(396, 196, 196, fontpage_396_196_196), // '완' -- '완' - FONTDATA_ITEM(397, 208, 208, fontpage_397_208_208), // '원' -- '원' - FONTDATA_ITEM(398, 132, 132, fontpage_398_132_132), // '위' -- '위' - FONTDATA_ITEM(398, 188, 188, fontpage_398_188_188), // '으' -- '으' - FONTDATA_ITEM(398, 204, 204, fontpage_398_204_204), // '음' -- '음' - FONTDATA_ITEM(398, 244, 244, fontpage_398_244_244), // '이' -- '이' - FONTDATA_ITEM(398, 252, 253, fontpage_398_252_253), // '일' -- '읽' - FONTDATA_ITEM(399, 133, 133, fontpage_399_133_133), // '입' -- '입' - FONTDATA_ITEM(399, 144, 145, fontpage_399_144_145), // '자' -- '작' - FONTDATA_ITEM(399, 152, 152, fontpage_399_152_152), // '잘' -- '잘' - FONTDATA_ITEM(399, 165, 165, fontpage_399_165_165), // '장' -- '장' - FONTDATA_ITEM(399, 172, 172, fontpage_399_172_172), // '재' -- '재' - FONTDATA_ITEM(400, 128, 128, fontpage_400_128_128), // '저' -- '저' - FONTDATA_ITEM(400, 132, 132, fontpage_400_132_132), // '전' -- '전' - FONTDATA_ITEM(400, 149, 149, fontpage_400_149_149), // '정' -- '정' - FONTDATA_ITEM(400, 156, 156, fontpage_400_156_156), // '제' -- '제' - FONTDATA_ITEM(401, 253, 253, fontpage_401_253_253), // '죽' -- '죽' - FONTDATA_ITEM(402, 128, 128, fontpage_402_128_128), // '준' -- '준' - FONTDATA_ITEM(402, 145, 145, fontpage_402_145_145), // '중' -- '중' - FONTDATA_ITEM(403, 144, 144, fontpage_403_144_144), // '즐' -- '즐' - FONTDATA_ITEM(403, 192, 192, fontpage_403_192_192), // '지' -- '지' - FONTDATA_ITEM(409, 152, 152, fontpage_409_152_152), // '처' -- '처' - FONTDATA_ITEM(410, 136, 136, fontpage_410_136_136), // '초' -- '초' - FONTDATA_ITEM(411, 149, 149, fontpage_411_149_149), // '축' -- '축' - FONTDATA_ITEM(411, 156, 156, fontpage_411_156_156), // '출' -- '출' - FONTDATA_ITEM(411, 164, 164, fontpage_411_164_164), // '춤' -- '춤' - FONTDATA_ITEM(411, 232, 232, fontpage_411_232_232), // '취' -- '취' - FONTDATA_ITEM(412, 216, 216, fontpage_412_216_216), // '치' -- '치' - FONTDATA_ITEM(412, 232, 232, fontpage_412_232_232), // '침' -- '침' - FONTDATA_ITEM(412, 244, 244, fontpage_412_244_244), // '카' -- '카' - FONTDATA_ITEM(414, 156, 156, fontpage_414_156_156), // '켜' -- '켜' - FONTDATA_ITEM(417, 209, 209, fontpage_417_209_209), // '탑' -- '탑' - FONTDATA_ITEM(418, 176, 176, fontpage_418_176_176), // '터' -- '터' - FONTDATA_ITEM(418, 204, 204, fontpage_418_204_204), // '테' -- '테' - FONTDATA_ITEM(419, 160, 160, fontpage_419_160_160), // '토' -- '토' - FONTDATA_ITEM(421, 184, 184, fontpage_421_184_184), // '트' -- '트' - FONTDATA_ITEM(423, 156, 156, fontpage_423_156_156), // '펜' -- '펜' - FONTDATA_ITEM(426, 132, 132, fontpage_426_132_132), // '프' -- '프' - FONTDATA_ITEM(426, 216, 216, fontpage_426_216_216), // '하' -- '하' - FONTDATA_ITEM(426, 233, 233, fontpage_426_233_233), // '합' -- '합' - FONTDATA_ITEM(428, 200, 200, fontpage_428_200_200), // '홈' -- '홈' - FONTDATA_ITEM(428, 212, 212, fontpage_428_212_212), // '화' -- '화' - FONTDATA_ITEM(431, 136, 136, fontpage_431_136_136), // '히' -- '히' +static const uxg_fontinfo_t g_fontinfo_ko_KR[] PROGMEM = { + FONTDATA_ITEM(344, 240, 240, fontpage_344_240_240), // '거' -- '거' + FONTDATA_ITEM(345, 224, 224, fontpage_345_224_224), // '고' -- '고' + FONTDATA_ITEM(347, 248, 248, fontpage_347_248_248), // '그' -- '그' + FONTDATA_ITEM(348, 137, 137, fontpage_348_137_137), // '급' -- '급' + FONTDATA_ITEM(348, 176, 176, fontpage_348_176_176), // '기' -- '기' + FONTDATA_ITEM(348, 197, 197, fontpage_348_197_197), // '깅' -- '깅' + FONTDATA_ITEM(352, 196, 196, fontpage_352_196_196), // '끄' -- '끄' + FONTDATA_ITEM(353, 180, 180, fontpage_353_180_180), // '내' -- '내' + FONTDATA_ITEM(354, 248, 248, fontpage_354_248_248), // '노' -- '노' + FONTDATA_ITEM(356, 132, 132, fontpage_356_132_132), // '누' -- '누' + FONTDATA_ITEM(356, 244, 244, fontpage_356_244_244), // '뉴' -- '뉴' + FONTDATA_ITEM(357, 200, 200, fontpage_357_200_200), // '니' -- '니' + FONTDATA_ITEM(357, 228, 228, fontpage_357_228_228), // '다' -- '다' + FONTDATA_ITEM(357, 249, 249, fontpage_357_249_249), // '당' -- '당' + FONTDATA_ITEM(359, 196, 196, fontpage_359_196_196), // '도' -- '도' + FONTDATA_ITEM(359, 204, 204, fontpage_359_204_204), // '돌' -- '돌' + FONTDATA_ITEM(359, 217, 217, fontpage_359_217_217), // '동' -- '동' + FONTDATA_ITEM(360, 152, 152, fontpage_360_152_152), // '되' -- '되' + FONTDATA_ITEM(360, 156, 156, fontpage_360_156_156), // '된' -- '된' + FONTDATA_ITEM(360, 168, 168, fontpage_360_168_168), // '됨' -- '됨' + FONTDATA_ITEM(361, 164, 164, fontpage_361_164_164), // '뒤' -- '뒤' + FONTDATA_ITEM(361, 220, 220, fontpage_361_220_220), // '드' -- '드' + FONTDATA_ITEM(362, 148, 148, fontpage_362_148_148), // '디' -- '디' + FONTDATA_ITEM(366, 252, 252, fontpage_366_252_252), // '라' -- '라' + FONTDATA_ITEM(367, 236, 236, fontpage_367_236_236), // '러' -- '러' + FONTDATA_ITEM(368, 136, 136, fontpage_368_136_136), // '레' -- '레' + FONTDATA_ITEM(368, 165, 165, fontpage_368_165_165), // '력' -- '력' + FONTDATA_ITEM(368, 220, 220, fontpage_368_220_220), // '로' -- '로' + FONTDATA_ITEM(369, 204, 204, fontpage_369_204_204), // '료' -- '료' + FONTDATA_ITEM(370, 244, 244, fontpage_370_244_244), // '르' -- '르' + FONTDATA_ITEM(371, 172, 172, fontpage_371_172_172), // '리' -- '리' + FONTDATA_ITEM(371, 176, 176, fontpage_371_176_176), // '린' -- '린' + FONTDATA_ITEM(371, 189, 189, fontpage_371_189_189), // '립' -- '립' + FONTDATA_ITEM(371, 193, 193, fontpage_371_193_193), // '링' -- '링' + FONTDATA_ITEM(372, 200, 200, fontpage_372_200_200), // '멈' -- '멈' + FONTDATA_ITEM(372, 212, 212, fontpage_372_212_212), // '메' -- '메' + FONTDATA_ITEM(372, 244, 244, fontpage_372_244_244), // '면' -- '면' + FONTDATA_ITEM(373, 168, 168, fontpage_373_168_168), // '모' -- '모' + FONTDATA_ITEM(373, 187, 187, fontpage_373_187_187), // '못' -- '못' + FONTDATA_ITEM(375, 248, 248, fontpage_375_248_248), // '미' -- '미' + FONTDATA_ITEM(376, 128, 128, fontpage_376_128_128), // '밀' -- '밀' + FONTDATA_ITEM(376, 148, 148, fontpage_376_148_148), // '바' -- '바' + FONTDATA_ITEM(377, 132, 132, fontpage_377_132_132), // '버' -- '버' + FONTDATA_ITEM(377, 160, 160, fontpage_377_160_160), // '베' -- '베' + FONTDATA_ITEM(377, 168, 168, fontpage_377_168_168), // '벨' -- '벨' + FONTDATA_ITEM(377, 248, 248, fontpage_377_248_248), // '본' -- '본' + FONTDATA_ITEM(380, 196, 196, fontpage_380_196_196), // '비' -- '비' + FONTDATA_ITEM(385, 172, 172, fontpage_385_172_172), // '사' -- '사' + FONTDATA_ITEM(385, 189, 189, fontpage_385_189_189), // '삽' -- '삽' + FONTDATA_ITEM(385, 200, 200, fontpage_385_200_200), // '새' -- '새' + FONTDATA_ITEM(386, 164, 164, fontpage_386_164_164), // '설' -- '설' + FONTDATA_ITEM(387, 140, 141, fontpage_387_140_141), // '소' -- '속' + FONTDATA_ITEM(389, 164, 164, fontpage_389_164_164), // '스' -- '스' + FONTDATA_ITEM(389, 172, 172, fontpage_389_172_172), // '슬' -- '슬' + FONTDATA_ITEM(389, 220, 221, fontpage_389_220_221), // '시' -- '식' + FONTDATA_ITEM(395, 180, 180, fontpage_395_180_180), // '어' -- '어' + FONTDATA_ITEM(395, 198, 198, fontpage_395_198_198), // '없' -- '없' + FONTDATA_ITEM(395, 209, 209, fontpage_395_209_209), // '엑' -- '엑' + FONTDATA_ITEM(395, 212, 212, fontpage_395_212_212), // '엔' -- '엔' + FONTDATA_ITEM(395, 244, 244, fontpage_395_244_244), // '열' -- '열' + FONTDATA_ITEM(396, 136, 136, fontpage_396_136_136), // '예' -- '예' + FONTDATA_ITEM(396, 164, 164, fontpage_396_164_164), // '오' -- '오' + FONTDATA_ITEM(396, 168, 168, fontpage_396_168_168), // '온' -- '온' + FONTDATA_ITEM(396, 196, 196, fontpage_396_196_196), // '완' -- '완' + FONTDATA_ITEM(397, 208, 208, fontpage_397_208_208), // '원' -- '원' + FONTDATA_ITEM(398, 132, 132, fontpage_398_132_132), // '위' -- '위' + FONTDATA_ITEM(398, 188, 188, fontpage_398_188_188), // '으' -- '으' + FONTDATA_ITEM(398, 204, 204, fontpage_398_204_204), // '음' -- '음' + FONTDATA_ITEM(398, 244, 244, fontpage_398_244_244), // '이' -- '이' + FONTDATA_ITEM(398, 252, 253, fontpage_398_252_253), // '일' -- '읽' + FONTDATA_ITEM(399, 133, 133, fontpage_399_133_133), // '입' -- '입' + FONTDATA_ITEM(399, 144, 145, fontpage_399_144_145), // '자' -- '작' + FONTDATA_ITEM(399, 152, 152, fontpage_399_152_152), // '잘' -- '잘' + FONTDATA_ITEM(399, 165, 165, fontpage_399_165_165), // '장' -- '장' + FONTDATA_ITEM(399, 172, 172, fontpage_399_172_172), // '재' -- '재' + FONTDATA_ITEM(400, 128, 128, fontpage_400_128_128), // '저' -- '저' + FONTDATA_ITEM(400, 132, 132, fontpage_400_132_132), // '전' -- '전' + FONTDATA_ITEM(400, 149, 149, fontpage_400_149_149), // '정' -- '정' + FONTDATA_ITEM(400, 156, 156, fontpage_400_156_156), // '제' -- '제' + FONTDATA_ITEM(401, 253, 253, fontpage_401_253_253), // '죽' -- '죽' + FONTDATA_ITEM(402, 128, 128, fontpage_402_128_128), // '준' -- '준' + FONTDATA_ITEM(402, 145, 145, fontpage_402_145_145), // '중' -- '중' + FONTDATA_ITEM(403, 144, 144, fontpage_403_144_144), // '즐' -- '즐' + FONTDATA_ITEM(403, 192, 192, fontpage_403_192_192), // '지' -- '지' + FONTDATA_ITEM(409, 152, 152, fontpage_409_152_152), // '처' -- '처' + FONTDATA_ITEM(410, 136, 136, fontpage_410_136_136), // '초' -- '초' + FONTDATA_ITEM(411, 149, 149, fontpage_411_149_149), // '축' -- '축' + FONTDATA_ITEM(411, 156, 156, fontpage_411_156_156), // '출' -- '출' + FONTDATA_ITEM(411, 164, 164, fontpage_411_164_164), // '춤' -- '춤' + FONTDATA_ITEM(411, 232, 232, fontpage_411_232_232), // '취' -- '취' + FONTDATA_ITEM(412, 216, 216, fontpage_412_216_216), // '치' -- '치' + FONTDATA_ITEM(412, 232, 232, fontpage_412_232_232), // '침' -- '침' + FONTDATA_ITEM(412, 244, 244, fontpage_412_244_244), // '카' -- '카' + FONTDATA_ITEM(414, 156, 156, fontpage_414_156_156), // '켜' -- '켜' + FONTDATA_ITEM(417, 209, 209, fontpage_417_209_209), // '탑' -- '탑' + FONTDATA_ITEM(418, 176, 176, fontpage_418_176_176), // '터' -- '터' + FONTDATA_ITEM(418, 204, 204, fontpage_418_204_204), // '테' -- '테' + FONTDATA_ITEM(419, 160, 160, fontpage_419_160_160), // '토' -- '토' + FONTDATA_ITEM(421, 184, 184, fontpage_421_184_184), // '트' -- '트' + FONTDATA_ITEM(423, 156, 156, fontpage_423_156_156), // '펜' -- '펜' + FONTDATA_ITEM(426, 132, 132, fontpage_426_132_132), // '프' -- '프' + FONTDATA_ITEM(426, 216, 216, fontpage_426_216_216), // '하' -- '하' + FONTDATA_ITEM(426, 233, 233, fontpage_426_233_233), // '합' -- '합' + FONTDATA_ITEM(428, 200, 200, fontpage_428_200_200), // '홈' -- '홈' + FONTDATA_ITEM(428, 212, 212, fontpage_428_212_212), // '화' -- '화' + FONTDATA_ITEM(431, 136, 136, fontpage_431_136_136), // '히' -- '히' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_nl.h b/Marlin/src/lcd/dogm/fontdata/langdata_nl.h index ffda82764fa2..e76eff334820 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_nl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_nl.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_nl[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pl.h b/Marlin/src/lcd/dogm/fontdata/langdata_pl.h index 926f07529537..e89a6c159a4e 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pl.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pl.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_132_133[45] U8G_FONT_SECTION("fontpage_2_132_133") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x84,0x85,0x00,0x07,0xFE,0x00, @@ -29,12 +31,11 @@ const u8g_fntpgm_uint8_t fontpage_2_252_252[30] U8G_FONT_SECTION("fontpage_2_252 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xFC,0xFC,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 132, 133, fontpage_2_132_133), // 'Ą' -- 'ą' - FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' - FONTDATA_ITEM(2, 153, 153, fontpage_2_153_153), // 'ę' -- 'ę' - FONTDATA_ITEM(2, 193, 196, fontpage_2_193_196), // 'Ł' -- 'ń' - FONTDATA_ITEM(2, 218, 219, fontpage_2_218_219), // 'Ś' -- 'ś' - FONTDATA_ITEM(2, 252, 252, fontpage_2_252_252), // 'ż' -- 'ż' +static const uxg_fontinfo_t g_fontinfo_pl[] PROGMEM = { + FONTDATA_ITEM(2, 132, 133, fontpage_2_132_133), // 'Ą' -- 'ą' + FONTDATA_ITEM(2, 135, 135, fontpage_2_135_135), // 'ć' -- 'ć' + FONTDATA_ITEM(2, 153, 153, fontpage_2_153_153), // 'ę' -- 'ę' + FONTDATA_ITEM(2, 193, 196, fontpage_2_193_196), // 'Ł' -- 'ń' + FONTDATA_ITEM(2, 218, 219, fontpage_2_218_219), // 'Ś' -- 'ś' + FONTDATA_ITEM(2, 252, 252, fontpage_2_252_252), // 'ż' -- 'ż' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pt.h b/Marlin/src/lcd/dogm/fontdata/langdata_pt.h index ffda82764fa2..61f857e587b6 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pt.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pt.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_pt[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h b/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h index ffda82764fa2..b0ed5ad5cffc 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_pt_br.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_pt_br[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ro.h b/Marlin/src/lcd/dogm/fontdata/langdata_ro.h index ffda82764fa2..6be486355314 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ro.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ro.h @@ -3,7 +3,8 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {}; +#include "langdata.h" + +static const uxg_fontinfo_t g_fontinfo_ro[] PROGMEM = {}; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_ru.h b/Marlin/src/lcd/dogm/fontdata/langdata_ru.h index 4edd6e74e304..3f857a1b3f22 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_ru.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_ru.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_8_144_168[348] U8G_FONT_SECTION("fontpage_8_144_168") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x90,0xA8,0x00,0x0A,0xFE,0x00, @@ -64,10 +66,9 @@ const u8g_fntpgm_uint8_t fontpage_8_209_209[30] U8G_FONT_SECTION("fontpage_8_209 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xD1,0xD1,0x00,0x07,0x00,0x00, 0x00,0x05,0x07,0x07,0x06,0x00,0x00,0x50,0x00,0x70,0x88,0xF0,0x80,0x70}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(8, 144, 168, fontpage_8_144_168), // 'А' -- 'Ш' - FONTDATA_ITEM(8, 171, 173, fontpage_8_171_173), // 'Ы' -- 'Э' - FONTDATA_ITEM(8, 175, 207, fontpage_8_175_207), // 'Я' -- 'я' - FONTDATA_ITEM(8, 209, 209, fontpage_8_209_209), // 'ё' -- 'ё' +static const uxg_fontinfo_t g_fontinfo_ru[] PROGMEM = { + FONTDATA_ITEM(8, 144, 168, fontpage_8_144_168), // 'А' -- 'Ш' + FONTDATA_ITEM(8, 171, 173, fontpage_8_171_173), // 'Ы' -- 'Э' + FONTDATA_ITEM(8, 175, 207, fontpage_8_175_207), // 'Я' -- 'я' + FONTDATA_ITEM(8, 209, 209, fontpage_8_209_209), // 'ё' -- 'ё' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_sk.h b/Marlin/src/lcd/dogm/fontdata/langdata_sk.h index 491006e05a20..4580ce5b7b82 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_sk.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_sk.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_140_143[79] U8G_FONT_SECTION("fontpage_2_140_143") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x8C,0x8F,0x00,0x0A,0x00,0x00, @@ -37,13 +39,12 @@ const u8g_fntpgm_uint8_t fontpage_2_253_254[47] U8G_FONT_SECTION("fontpage_2_253 0x00,0x05,0x0A,0x0A,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x08,0x10,0x20,0x40,0x80, 0xF8,0x05,0x08,0x08,0x06,0x00,0x00,0x50,0x20,0x00,0xF8,0x10,0x20,0x40,0xF8}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 140, 143, fontpage_2_140_143), // 'Č' -- 'ď' - FONTDATA_ITEM(2, 186, 186, fontpage_2_186_186), // 'ĺ' -- 'ĺ' - FONTDATA_ITEM(2, 189, 190, fontpage_2_189_190), // 'Ľ' -- 'ľ' - FONTDATA_ITEM(2, 199, 200, fontpage_2_199_200), // 'Ň' -- 'ň' - FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š' - FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť' - FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž' +static const uxg_fontinfo_t g_fontinfo_sk[] PROGMEM = { + FONTDATA_ITEM(2, 140, 143, fontpage_2_140_143), // 'Č' -- 'ď' + FONTDATA_ITEM(2, 186, 186, fontpage_2_186_186), // 'ĺ' -- 'ĺ' + FONTDATA_ITEM(2, 189, 190, fontpage_2_189_190), // 'Ľ' -- 'ľ' + FONTDATA_ITEM(2, 199, 200, fontpage_2_199_200), // 'Ň' -- 'ň' + FONTDATA_ITEM(2, 224, 225, fontpage_2_224_225), // 'Š' -- 'š' + FONTDATA_ITEM(2, 229, 229, fontpage_2_229_229), // 'ť' -- 'ť' + FONTDATA_ITEM(2, 253, 254, fontpage_2_253_254), // 'Ž' -- 'ž' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_test.h b/Marlin/src/lcd/dogm/fontdata/langdata_test.h index c397d8b4b95b..da76a3104156 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_test.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_test.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_8_128_255[1677] U8G_FONT_SECTION("fontpage_8_128_255") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x00,0x0A,0xFE,0x00, @@ -223,9 +225,8 @@ const u8g_fntpgm_uint8_t fontpage_97_193_255[822] U8G_FONT_SECTION("fontpage_97_ 0x06,0x00,0x02,0x28,0x28,0x00,0x80,0x60,0x10,0x08,0x05,0x06,0x06,0x06,0x00,0x00, 0xF8,0x08,0x08,0x08,0x08,0x08}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(8, 128, 255, fontpage_8_128_255), // 'Ѐ' -- 'ѿ' - FONTDATA_ITEM(97, 129, 191, fontpage_97_129_191), // 'め' -- 'タ' - FONTDATA_ITEM(97, 193, 255, fontpage_97_193_255), // 'チ' -- 'ヿ' +static const uxg_fontinfo_t g_fontinfo_test[] PROGMEM = { + FONTDATA_ITEM(8, 128, 255, fontpage_8_128_255), // 'Ѐ' -- 'ѿ' + FONTDATA_ITEM(97, 129, 191, fontpage_97_129_191), // 'め' -- 'タ' + FONTDATA_ITEM(97, 193, 255, fontpage_97_193_255), // 'チ' -- 'ヿ' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_tr.h b/Marlin/src/lcd/dogm/fontdata/langdata_tr.h index a4068e10d092..0ac02435a5dd 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_tr.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_tr.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_158_159[49] U8G_FONT_SECTION("fontpage_2_158_159") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9E,0x9F,0x00,0x0A,0xFE,0x00, @@ -19,9 +21,8 @@ const u8g_fntpgm_uint8_t fontpage_2_222_223[45] U8G_FONT_SECTION("fontpage_2_222 0x00,0x05,0x09,0x09,0x06,0x00,0xFE,0x70,0x88,0x80,0x70,0x08,0x88,0x70,0x10,0x60, 0x05,0x07,0x07,0x06,0x00,0xFE,0x78,0x80,0x70,0x08,0xF0,0x10,0x60}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 158, 159, fontpage_2_158_159), // 'Ğ' -- 'ğ' - FONTDATA_ITEM(2, 176, 177, fontpage_2_176_177), // 'İ' -- 'ı' - FONTDATA_ITEM(2, 222, 223, fontpage_2_222_223), // 'Ş' -- 'ş' +static const uxg_fontinfo_t g_fontinfo_tr[] PROGMEM = { + FONTDATA_ITEM(2, 158, 159, fontpage_2_158_159), // 'Ğ' -- 'ğ' + FONTDATA_ITEM(2, 176, 177, fontpage_2_176_177), // 'İ' -- 'ı' + FONTDATA_ITEM(2, 222, 223, fontpage_2_222_223), // 'Ş' -- 'ş' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_uk.h b/Marlin/src/lcd/dogm/fontdata/langdata_uk.h index 47ec93992fc2..b25e2f6db4e3 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_uk.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_uk.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_8_134_134[30] U8G_FONT_SECTION("fontpage_8_134_134") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x86,0x86,0x00,0x07,0x00,0x00, @@ -72,14 +74,13 @@ const u8g_fntpgm_uint8_t fontpage_8_214_215[41] U8G_FONT_SECTION("fontpage_8_214 0x00,0x03,0x06,0x06,0x06,0x01,0x00,0x40,0x00,0xC0,0x40,0x40,0xE0,0x03,0x06,0x06, 0x06,0x01,0x00,0xA0,0x00,0xC0,0x40,0x40,0xE0}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(8, 134, 134, fontpage_8_134_134), // 'І' -- 'І' - FONTDATA_ITEM(8, 144, 169, fontpage_8_144_169), // 'А' -- 'Щ' - FONTDATA_ITEM(8, 172, 172, fontpage_8_172_172), // 'Ь' -- 'Ь' - FONTDATA_ITEM(8, 175, 201, fontpage_8_175_201), // 'Я' -- 'щ' - FONTDATA_ITEM(8, 204, 204, fontpage_8_204_204), // 'ь' -- 'ь' - FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я' - FONTDATA_ITEM(8, 212, 212, fontpage_8_212_212), // 'є' -- 'є' - FONTDATA_ITEM(8, 214, 215, fontpage_8_214_215), // 'і' -- 'ї' +static const uxg_fontinfo_t g_fontinfo_uk[] PROGMEM = { + FONTDATA_ITEM(8, 134, 134, fontpage_8_134_134), // 'І' -- 'І' + FONTDATA_ITEM(8, 144, 169, fontpage_8_144_169), // 'А' -- 'Щ' + FONTDATA_ITEM(8, 172, 172, fontpage_8_172_172), // 'Ь' -- 'Ь' + FONTDATA_ITEM(8, 175, 201, fontpage_8_175_201), // 'Я' -- 'щ' + FONTDATA_ITEM(8, 204, 204, fontpage_8_204_204), // 'ь' -- 'ь' + FONTDATA_ITEM(8, 206, 207, fontpage_8_206_207), // 'ю' -- 'я' + FONTDATA_ITEM(8, 212, 212, fontpage_8_212_212), // 'є' -- 'є' + FONTDATA_ITEM(8, 214, 215, fontpage_8_214_215), // 'і' -- 'ї' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_vi.h b/Marlin/src/lcd/dogm/fontdata/langdata_vi.h index a8a0c5c121e6..303c4c66d637 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_vi.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_vi.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_2_131_131[31] U8G_FONT_SECTION("fontpage_2_131_131") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x83,0x83,0x00,0x08,0x00,0x00, @@ -177,51 +179,50 @@ const u8g_fntpgm_uint8_t fontpage_61_241_241[32] U8G_FONT_SECTION("fontpage_61_2 0x00,0x06,0x09,0x09,0x07,0x00,0xFE,0x0C,0x04,0x88,0x88,0x88,0x88,0x70,0x00,0x20 }; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(2, 131, 131, fontpage_2_131_131), // 'ă' -- 'ă' - FONTDATA_ITEM(2, 144, 145, fontpage_2_144_145), // 'Đ' -- 'đ' - FONTDATA_ITEM(2, 169, 169, fontpage_2_169_169), // 'ĩ' -- 'ĩ' - FONTDATA_ITEM(3, 161, 161, fontpage_3_161_161), // 'ơ' -- 'ơ' - FONTDATA_ITEM(3, 175, 176, fontpage_3_175_176), // 'Ư' -- 'ư' - FONTDATA_ITEM(6, 131, 131, fontpage_6_131_131), // '̃' -- '̃' - FONTDATA_ITEM(6, 137, 137, fontpage_6_137_137), // '̉' -- '̉' - FONTDATA_ITEM(6, 163, 163, fontpage_6_163_163), // '̣' -- '̣' - FONTDATA_ITEM(6, 192, 193, fontpage_6_192_193), // '̀' -- '́' - FONTDATA_ITEM(61, 161, 161, fontpage_61_161_161), // 'ạ' -- 'ạ' - FONTDATA_ITEM(61, 163, 163, fontpage_61_163_163), // 'ả' -- 'ả' - FONTDATA_ITEM(61, 165, 165, fontpage_61_165_165), // 'ấ' -- 'ấ' - FONTDATA_ITEM(61, 167, 167, fontpage_61_167_167), // 'ầ' -- 'ầ' - FONTDATA_ITEM(61, 169, 169, fontpage_61_169_169), // 'ẩ' -- 'ẩ' - FONTDATA_ITEM(61, 173, 173, fontpage_61_173_173), // 'ậ' -- 'ậ' - FONTDATA_ITEM(61, 175, 175, fontpage_61_175_175), // 'ắ' -- 'ắ' - FONTDATA_ITEM(61, 177, 177, fontpage_61_177_177), // 'ằ' -- 'ằ' - FONTDATA_ITEM(61, 179, 179, fontpage_61_179_179), // 'ẳ' -- 'ẳ' - FONTDATA_ITEM(61, 181, 181, fontpage_61_181_181), // 'ẵ' -- 'ẵ' - FONTDATA_ITEM(61, 183, 183, fontpage_61_183_183), // 'ặ' -- 'ặ' - FONTDATA_ITEM(61, 191, 191, fontpage_61_191_191), // 'ế' -- 'ế' - FONTDATA_ITEM(61, 193, 193, fontpage_61_193_193), // 'ề' -- 'ề' - FONTDATA_ITEM(61, 195, 195, fontpage_61_195_195), // 'ể' -- 'ể' - FONTDATA_ITEM(61, 199, 199, fontpage_61_199_199), // 'ệ' -- 'ệ' - FONTDATA_ITEM(61, 201, 201, fontpage_61_201_201), // 'ỉ' -- 'ỉ' - FONTDATA_ITEM(61, 203, 203, fontpage_61_203_203), // 'ị' -- 'ị' - FONTDATA_ITEM(61, 205, 205, fontpage_61_205_205), // 'ọ' -- 'ọ' - FONTDATA_ITEM(61, 207, 207, fontpage_61_207_207), // 'ỏ' -- 'ỏ' - FONTDATA_ITEM(61, 209, 209, fontpage_61_209_209), // 'ố' -- 'ố' - FONTDATA_ITEM(61, 211, 211, fontpage_61_211_211), // 'ồ' -- 'ồ' - FONTDATA_ITEM(61, 213, 213, fontpage_61_213_213), // 'ổ' -- 'ổ' - FONTDATA_ITEM(61, 215, 215, fontpage_61_215_215), // 'ỗ' -- 'ỗ' - FONTDATA_ITEM(61, 217, 217, fontpage_61_217_217), // 'ộ' -- 'ộ' - FONTDATA_ITEM(61, 219, 219, fontpage_61_219_219), // 'ớ' -- 'ớ' - FONTDATA_ITEM(61, 221, 221, fontpage_61_221_221), // 'ờ' -- 'ờ' - FONTDATA_ITEM(61, 223, 223, fontpage_61_223_223), // 'ở' -- 'ở' - FONTDATA_ITEM(61, 225, 225, fontpage_61_225_225), // 'ỡ' -- 'ỡ' - FONTDATA_ITEM(61, 227, 227, fontpage_61_227_227), // 'ợ' -- 'ợ' - FONTDATA_ITEM(61, 229, 229, fontpage_61_229_229), // 'ụ' -- 'ụ' - FONTDATA_ITEM(61, 231, 231, fontpage_61_231_231), // 'ủ' -- 'ủ' - FONTDATA_ITEM(61, 233, 233, fontpage_61_233_233), // 'ứ' -- 'ứ' - FONTDATA_ITEM(61, 235, 235, fontpage_61_235_235), // 'ừ' -- 'ừ' - FONTDATA_ITEM(61, 237, 237, fontpage_61_237_237), // 'ử' -- 'ử' - FONTDATA_ITEM(61, 239, 239, fontpage_61_239_239), // 'ữ' -- 'ữ' - FONTDATA_ITEM(61, 241, 241, fontpage_61_241_241), // 'ự' -- 'ự' +static const uxg_fontinfo_t g_fontinfo_vi[] PROGMEM = { + FONTDATA_ITEM(2, 131, 131, fontpage_2_131_131), // 'ă' -- 'ă' + FONTDATA_ITEM(2, 144, 145, fontpage_2_144_145), // 'Đ' -- 'đ' + FONTDATA_ITEM(2, 169, 169, fontpage_2_169_169), // 'ĩ' -- 'ĩ' + FONTDATA_ITEM(3, 161, 161, fontpage_3_161_161), // 'ơ' -- 'ơ' + FONTDATA_ITEM(3, 175, 176, fontpage_3_175_176), // 'Ư' -- 'ư' + FONTDATA_ITEM(6, 131, 131, fontpage_6_131_131), // '̃' -- '̃' + FONTDATA_ITEM(6, 137, 137, fontpage_6_137_137), // '̉' -- '̉' + FONTDATA_ITEM(6, 163, 163, fontpage_6_163_163), // '̣' -- '̣' + FONTDATA_ITEM(6, 192, 193, fontpage_6_192_193), // '̀' -- '́' + FONTDATA_ITEM(61, 161, 161, fontpage_61_161_161), // 'ạ' -- 'ạ' + FONTDATA_ITEM(61, 163, 163, fontpage_61_163_163), // 'ả' -- 'ả' + FONTDATA_ITEM(61, 165, 165, fontpage_61_165_165), // 'ấ' -- 'ấ' + FONTDATA_ITEM(61, 167, 167, fontpage_61_167_167), // 'ầ' -- 'ầ' + FONTDATA_ITEM(61, 169, 169, fontpage_61_169_169), // 'ẩ' -- 'ẩ' + FONTDATA_ITEM(61, 173, 173, fontpage_61_173_173), // 'ậ' -- 'ậ' + FONTDATA_ITEM(61, 175, 175, fontpage_61_175_175), // 'ắ' -- 'ắ' + FONTDATA_ITEM(61, 177, 177, fontpage_61_177_177), // 'ằ' -- 'ằ' + FONTDATA_ITEM(61, 179, 179, fontpage_61_179_179), // 'ẳ' -- 'ẳ' + FONTDATA_ITEM(61, 181, 181, fontpage_61_181_181), // 'ẵ' -- 'ẵ' + FONTDATA_ITEM(61, 183, 183, fontpage_61_183_183), // 'ặ' -- 'ặ' + FONTDATA_ITEM(61, 191, 191, fontpage_61_191_191), // 'ế' -- 'ế' + FONTDATA_ITEM(61, 193, 193, fontpage_61_193_193), // 'ề' -- 'ề' + FONTDATA_ITEM(61, 195, 195, fontpage_61_195_195), // 'ể' -- 'ể' + FONTDATA_ITEM(61, 199, 199, fontpage_61_199_199), // 'ệ' -- 'ệ' + FONTDATA_ITEM(61, 201, 201, fontpage_61_201_201), // 'ỉ' -- 'ỉ' + FONTDATA_ITEM(61, 203, 203, fontpage_61_203_203), // 'ị' -- 'ị' + FONTDATA_ITEM(61, 205, 205, fontpage_61_205_205), // 'ọ' -- 'ọ' + FONTDATA_ITEM(61, 207, 207, fontpage_61_207_207), // 'ỏ' -- 'ỏ' + FONTDATA_ITEM(61, 209, 209, fontpage_61_209_209), // 'ố' -- 'ố' + FONTDATA_ITEM(61, 211, 211, fontpage_61_211_211), // 'ồ' -- 'ồ' + FONTDATA_ITEM(61, 213, 213, fontpage_61_213_213), // 'ổ' -- 'ổ' + FONTDATA_ITEM(61, 215, 215, fontpage_61_215_215), // 'ỗ' -- 'ỗ' + FONTDATA_ITEM(61, 217, 217, fontpage_61_217_217), // 'ộ' -- 'ộ' + FONTDATA_ITEM(61, 219, 219, fontpage_61_219_219), // 'ớ' -- 'ớ' + FONTDATA_ITEM(61, 221, 221, fontpage_61_221_221), // 'ờ' -- 'ờ' + FONTDATA_ITEM(61, 223, 223, fontpage_61_223_223), // 'ở' -- 'ở' + FONTDATA_ITEM(61, 225, 225, fontpage_61_225_225), // 'ỡ' -- 'ỡ' + FONTDATA_ITEM(61, 227, 227, fontpage_61_227_227), // 'ợ' -- 'ợ' + FONTDATA_ITEM(61, 229, 229, fontpage_61_229_229), // 'ụ' -- 'ụ' + FONTDATA_ITEM(61, 231, 231, fontpage_61_231_231), // 'ủ' -- 'ủ' + FONTDATA_ITEM(61, 233, 233, fontpage_61_233_233), // 'ứ' -- 'ứ' + FONTDATA_ITEM(61, 235, 235, fontpage_61_235_235), // 'ừ' -- 'ừ' + FONTDATA_ITEM(61, 237, 237, fontpage_61_237_237), // 'ử' -- 'ử' + FONTDATA_ITEM(61, 239, 239, fontpage_61_239_239), // 'ữ' -- 'ữ' + FONTDATA_ITEM(61, 241, 241, fontpage_61_241_241), // 'ự' -- 'ự' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h b/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h index 491d480a0150..664fa5f4bfe9 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_zh_CN.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_64_157_157[26] U8G_FONT_SECTION("fontpage_64_157_157") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9D,0x9D,0x00,0x07,0x00,0x00, @@ -1462,362 +1464,361 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9A,0x9A,0x00,0x08,0x00,0x00, 0x00,0x02,0x07,0x07,0x0C,0x06,0x01,0xC0,0xC0,0x00,0x00,0x00,0xC0,0xC0}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(64, 157, 157, fontpage_64_157_157), // '”' -- '”' - FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' - FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' - FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // '三' -- '下' - FONTDATA_ITEM(156, 141, 141, fontpage_156_141_141), // '不' -- '不' - FONTDATA_ITEM(156, 147, 147, fontpage_156_147_147), // '专' -- '专' - FONTDATA_ITEM(156, 157, 157, fontpage_156_157_157), // '丝' -- '丝' - FONTDATA_ITEM(156, 170, 170, fontpage_156_170_170), // '个' -- '个' - FONTDATA_ITEM(156, 173, 173, fontpage_156_173_173), // '中' -- '中' - FONTDATA_ITEM(156, 186, 187, fontpage_156_186_187), // '为' -- '主' - FONTDATA_ITEM(156, 201, 201, fontpage_156_201_201), // '义' -- '义' - FONTDATA_ITEM(156, 203, 203, fontpage_156_203_203), // '之' -- '之' - FONTDATA_ITEM(157, 134, 134, fontpage_157_134_134), // '了' -- '了' - FONTDATA_ITEM(157, 140, 140, fontpage_157_140_140), // '二' -- '二' - FONTDATA_ITEM(157, 142, 142, fontpage_157_142_142), // '于' -- '于' - FONTDATA_ITEM(157, 164, 164, fontpage_157_164_164), // '交' -- '交' - FONTDATA_ITEM(157, 174, 174, fontpage_157_174_174), // '亮' -- '亮' - FONTDATA_ITEM(157, 206, 206, fontpage_157_206_206), // '从' -- '从' - FONTDATA_ITEM(157, 228, 229, fontpage_157_228_229), // '令' -- '以' - FONTDATA_ITEM(157, 246, 246, fontpage_157_246_246), // '件' -- '件' - FONTDATA_ITEM(157, 253, 253, fontpage_157_253_253), // '份' -- '份' - FONTDATA_ITEM(158, 145, 145, fontpage_158_145_145), // '休' -- '休' - FONTDATA_ITEM(158, 160, 160, fontpage_158_160_160), // '传' -- '传' - FONTDATA_ITEM(158, 205, 206, fontpage_158_205_206), // '位' -- '低' - FONTDATA_ITEM(158, 211, 211, fontpage_158_211_211), // '体' -- '体' - FONTDATA_ITEM(158, 217, 217, fontpage_158_217_217), // '余' -- '余' - FONTDATA_ITEM(158, 220, 220, fontpage_158_220_220), // '作' -- '作' - FONTDATA_ITEM(158, 255, 255, fontpage_158_255_255), // '使' -- '使' - FONTDATA_ITEM(159, 155, 155, fontpage_159_155_155), // '供' -- '供' - FONTDATA_ITEM(159, 181, 181, fontpage_159_181_181), // '侵' -- '侵' - FONTDATA_ITEM(159, 221, 221, fontpage_159_221_221), // '保' -- '保' - FONTDATA_ITEM(159, 225, 225, fontpage_159_225_225), // '信' -- '信' - FONTDATA_ITEM(160, 188, 188, fontpage_160_188_188), // '值' -- '值' - FONTDATA_ITEM(160, 190, 190, fontpage_160_190_190), // '倾' -- '倾' - FONTDATA_ITEM(160, 207, 207, fontpage_160_207_207), // '偏' -- '偏' - FONTDATA_ITEM(160, 220, 220, fontpage_160_220_220), // '停' -- '停' - FONTDATA_ITEM(161, 168, 168, fontpage_161_168_168), // '储' -- '储' - FONTDATA_ITEM(161, 207, 207, fontpage_161_207_207), // '像' -- '像' - FONTDATA_ITEM(162, 197, 197, fontpage_162_197_197), // '充' -- '充' - FONTDATA_ITEM(162, 200, 201, fontpage_162_200_201), // '先' -- '光' - FONTDATA_ITEM(162, 229, 229, fontpage_162_229_229), // '入' -- '入' - FONTDATA_ITEM(162, 232, 232, fontpage_162_232_232), // '全' -- '全' - FONTDATA_ITEM(162, 241, 241, fontpage_162_241_241), // '共' -- '共' - FONTDATA_ITEM(162, 243, 243, fontpage_162_243_243), // '关' -- '关' - FONTDATA_ITEM(162, 247, 247, fontpage_162_247_247), // '具' -- '具' - FONTDATA_ITEM(163, 151, 151, fontpage_163_151_151), // '冗' -- '冗' - FONTDATA_ITEM(163, 183, 183, fontpage_163_183_183), // '冷' -- '冷' - FONTDATA_ITEM(163, 198, 198, fontpage_163_198_198), // '准' -- '准' - FONTDATA_ITEM(163, 250, 251, fontpage_163_250_251), // '出' -- '击' - FONTDATA_ITEM(164, 134, 135, fontpage_164_134_135), // '分' -- '切' - FONTDATA_ITEM(164, 155, 155, fontpage_164_155_155), // '创' -- '创' - FONTDATA_ITEM(164, 157, 157, fontpage_164_157_157), // '初' -- '初' - FONTDATA_ITEM(164, 171, 171, fontpage_164_171_171), // '别' -- '别' - FONTDATA_ITEM(164, 176, 176, fontpage_164_176_176), // '到' -- '到' - FONTDATA_ITEM(164, 182, 183, fontpage_164_182_183), // '制' -- '刷' - FONTDATA_ITEM(164, 242, 242, fontpage_164_242_242), // '割' -- '割' - FONTDATA_ITEM(165, 155, 155, fontpage_165_155_155), // '力' -- '力' - FONTDATA_ITEM(165, 159, 160, fontpage_165_159_160), // '功' -- '加' - FONTDATA_ITEM(165, 168, 168, fontpage_165_168_168), // '动' -- '动' - FONTDATA_ITEM(166, 150, 150, fontpage_166_150_150), // '化' -- '化' - FONTDATA_ITEM(166, 199, 199, fontpage_166_199_199), // '升' -- '升' - FONTDATA_ITEM(166, 202, 202, fontpage_166_202_202), // '半' -- '半' - FONTDATA_ITEM(166, 207, 207, fontpage_166_207_207), // '协' -- '协' - FONTDATA_ITEM(166, 213, 213, fontpage_166_213_213), // '单' -- '单' - FONTDATA_ITEM(166, 225, 225, fontpage_166_225_225), // '卡' -- '卡' - FONTDATA_ITEM(166, 240, 241, fontpage_166_240_241), // '印' -- '危' - FONTDATA_ITEM(166, 244, 244, fontpage_166_244_244), // '却' -- '却' - FONTDATA_ITEM(166, 248, 248, fontpage_166_248_248), // '卸' -- '卸' - FONTDATA_ITEM(167, 139, 139, fontpage_167_139_139), // '压' -- '压' - FONTDATA_ITEM(167, 159, 159, fontpage_167_159_159), // '原' -- '原' - FONTDATA_ITEM(167, 204, 205, fontpage_167_204_205), // '双' -- '反' - FONTDATA_ITEM(167, 214, 214, fontpage_167_214_214), // '取' -- '取' - FONTDATA_ITEM(167, 216, 216, fontpage_167_216_216), // '变' -- '变' - FONTDATA_ITEM(167, 240, 240, fontpage_167_240_240), // '台' -- '台' - FONTDATA_ITEM(168, 131, 131, fontpage_168_131_131), // '吃' -- '吃' - FONTDATA_ITEM(168, 136, 136, fontpage_168_136_136), // '合' -- '合' - FONTDATA_ITEM(168, 141, 142, fontpage_168_141_142), // '名' -- '后' - FONTDATA_ITEM(168, 145, 145, fontpage_168_145_145), // '向' -- '向' - FONTDATA_ITEM(168, 166, 166, fontpage_168_166_166), // '否' -- '否' - FONTDATA_ITEM(168, 175, 175, fontpage_168_175_175), // '启' -- '启' - FONTDATA_ITEM(168, 202, 202, fontpage_168_202_202), // '告' -- '告' - FONTDATA_ITEM(168, 232, 232, fontpage_168_232_232), // '周' -- '周' - FONTDATA_ITEM(168, 253, 253, fontpage_168_253_253), // '命' -- '命' - FONTDATA_ITEM(169, 140, 140, fontpage_169_140_140), // '和' -- '和' - FONTDATA_ITEM(169, 205, 205, fontpage_169_205_205), // '响' -- '响' - FONTDATA_ITEM(171, 183, 183, fontpage_171_183_183), // '喷' -- '喷' - FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // '嘴' -- '嘴' - FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // '器' -- '器' - FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // '噴' -- '噴' - FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // '回' -- '回' - FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // '因' -- '因' - FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // '固' -- '固' - FONTDATA_ITEM(173, 254, 254, fontpage_173_254_254), // '图' -- '图' - FONTDATA_ITEM(174, 168, 168, fontpage_174_168_168), // '在' -- '在' - FONTDATA_ITEM(174, 207, 207, fontpage_174_207_207), // '坏' -- '坏' - FONTDATA_ITEM(174, 215, 215, fontpage_174_215_215), // '块' -- '块' - FONTDATA_ITEM(175, 139, 139, fontpage_175_139_139), // '型' -- '型' - FONTDATA_ITEM(175, 171, 171, fontpage_175_171_171), // '垫' -- '垫' - FONTDATA_ITEM(176, 235, 235, fontpage_176_235_235), // '填' -- '填' - FONTDATA_ITEM(177, 243, 243, fontpage_177_243_243), // '壳' -- '壳' - FONTDATA_ITEM(178, 135, 135, fontpage_178_135_135), // '备' -- '备' - FONTDATA_ITEM(178, 141, 141, fontpage_178_141_141), // '复' -- '复' - FONTDATA_ITEM(178, 150, 150, fontpage_178_150_150), // '外' -- '外' - FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // '多' -- '多' - FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '大' -- '大' - FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '天' -- '太' - FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '失' -- '失' - FONTDATA_ITEM(178, 180, 180, fontpage_178_180_180), // '头' -- '头' - FONTDATA_ITEM(178, 253, 253, fontpage_178_253_253), // '好' -- '好' - FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // '始' -- '始' - FONTDATA_ITEM(182, 208, 208, fontpage_182_208_208), // '子' -- '子' - FONTDATA_ITEM(182, 216, 216, fontpage_182_216_216), // '存' -- '存' - FONTDATA_ITEM(183, 137, 137, fontpage_183_137_137), // '安' -- '安' - FONTDATA_ITEM(183, 140, 140, fontpage_183_140_140), // '完' -- '完' - FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' - FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' - FONTDATA_ITEM(183, 171, 171, fontpage_183_171_171), // '宫' -- '宫' - FONTDATA_ITEM(183, 249, 249, fontpage_183_249_249), // '对' -- '对' - FONTDATA_ITEM(184, 134, 134, fontpage_184_134_134), // '将' -- '将' - FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' - FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' - FONTDATA_ITEM(184, 207, 207, fontpage_184_207_207), // '屏' -- '屏' - FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' - FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' - FONTDATA_ITEM(187, 242, 242, fontpage_187_242_242), // '已' -- '已' - FONTDATA_ITEM(188, 243, 243, fontpage_188_243_243), // '平' -- '平' - FONTDATA_ITEM(188, 246, 246, fontpage_188_246_246), // '并' -- '并' - FONTDATA_ITEM(189, 138, 138, fontpage_189_138_138), // '床' -- '床' - FONTDATA_ITEM(189, 148, 148, fontpage_189_148_148), // '应' -- '应' - FONTDATA_ITEM(189, 159, 159, fontpage_189_159_159), // '废' -- '废' - FONTDATA_ITEM(189, 166, 166, fontpage_189_166_166), // '度' -- '度' - FONTDATA_ITEM(190, 128, 128, fontpage_190_128_128), // '开' -- '开' - FONTDATA_ITEM(190, 131, 131, fontpage_190_131_131), // '弃' -- '弃' - FONTDATA_ITEM(190, 143, 143, fontpage_190_143_143), // '式' -- '式' - FONTDATA_ITEM(190, 149, 149, fontpage_190_149_149), // '引' -- '引' - FONTDATA_ITEM(190, 185, 185, fontpage_190_185_185), // '弹' -- '弹' - FONTDATA_ITEM(190, 210, 210, fontpage_190_210_210), // '归' -- '归' - FONTDATA_ITEM(191, 132, 133, fontpage_191_132_133), // '径' -- '待' - FONTDATA_ITEM(191, 170, 170, fontpage_191_170_170), // '循' -- '循' - FONTDATA_ITEM(191, 174, 174, fontpage_191_174_174), // '微' -- '微' - FONTDATA_ITEM(191, 195, 195, fontpage_191_195_195), // '心' -- '心' - FONTDATA_ITEM(191, 253, 253, fontpage_191_253_253), // '忽' -- '忽' - FONTDATA_ITEM(192, 167, 167, fontpage_192_167_167), // '性' -- '性' - FONTDATA_ITEM(192, 187, 187, fontpage_192_187_187), // '总' -- '总' - FONTDATA_ITEM(192, 226, 226, fontpage_192_226_226), // '恢' -- '恢' - FONTDATA_ITEM(192, 239, 239, fontpage_192_239_239), // '息' -- '息' - FONTDATA_ITEM(194, 159, 159, fontpage_194_159_159), // '感' -- '感' - FONTDATA_ITEM(196, 143, 144, fontpage_196_143_144), // '戏' -- '成' - FONTDATA_ITEM(196, 183, 183, fontpage_196_183_183), // '户' -- '户' - FONTDATA_ITEM(196, 192, 192, fontpage_196_192_192), // '所' -- '所' - FONTDATA_ITEM(196, 199, 199, fontpage_196_199_199), // '扇' -- '扇' - FONTDATA_ITEM(196, 203, 203, fontpage_196_203_203), // '手' -- '手' - FONTDATA_ITEM(196, 211, 211, fontpage_196_211_211), // '打' -- '打' - FONTDATA_ITEM(196, 231, 231, fontpage_196_231_231), // '执' -- '执' - FONTDATA_ITEM(196, 249, 249, fontpage_196_249_249), // '批' -- '批' - FONTDATA_ITEM(197, 150, 150, fontpage_197_150_150), // '抖' -- '抖' - FONTDATA_ITEM(197, 165, 165, fontpage_197_165_165), // '报' -- '报' - FONTDATA_ITEM(197, 172, 172, fontpage_197_172_172), // '抬' -- '抬' - FONTDATA_ITEM(197, 189, 189, fontpage_197_189_189), // '抽' -- '抽' - FONTDATA_ITEM(197, 212, 212, fontpage_197_212_212), // '拔' -- '拔' - FONTDATA_ITEM(197, 233, 233, fontpage_197_233_233), // '择' -- '择' - FONTDATA_ITEM(198, 137, 137, fontpage_198_137_137), // '按' -- '按' - FONTDATA_ITEM(198, 161, 161, fontpage_198_161_161), // '挡' -- '挡' - FONTDATA_ITEM(198, 164, 164, fontpage_198_164_164), // '挤' -- '挤' - FONTDATA_ITEM(198, 223, 223, fontpage_198_223_223), // '损' -- '损' - FONTDATA_ITEM(198, 226, 226, fontpage_198_226_226), // '换' -- '换' - FONTDATA_ITEM(199, 137, 137, fontpage_199_137_137), // '掉' -- '掉' - FONTDATA_ITEM(199, 162, 162, fontpage_199_162_162), // '探' -- '探' - FONTDATA_ITEM(199, 165, 165, fontpage_199_165_165), // '接' -- '接' - FONTDATA_ITEM(199, 167, 167, fontpage_199_167_167), // '控' -- '控' - FONTDATA_ITEM(199, 208, 208, fontpage_199_208_208), // '提' -- '提' - FONTDATA_ITEM(199, 210, 210, fontpage_199_210_210), // '插' -- '插' - FONTDATA_ITEM(202, 182, 182, fontpage_202_182_182), // '收' -- '收' - FONTDATA_ITEM(202, 190, 190, fontpage_202_190_190), // '放' -- '放' - FONTDATA_ITEM(202, 240, 240, fontpage_202_240_240), // '数' -- '数' - FONTDATA_ITEM(202, 242, 242, fontpage_202_242_242), // '敲' -- '敲' - FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // '整' -- '整' - FONTDATA_ITEM(203, 135, 135, fontpage_203_135_135), // '文' -- '文' - FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // '料' -- '料' - FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // '斜' -- '斜' - FONTDATA_ITEM(203, 173, 173, fontpage_203_173_173), // '断' -- '断' - FONTDATA_ITEM(203, 176, 176, fontpage_203_176_176), // '新' -- '新' - FONTDATA_ITEM(203, 185, 185, fontpage_203_185_185), // '方' -- '方' - FONTDATA_ITEM(203, 224, 224, fontpage_203_224_224), // '无' -- '无' - FONTDATA_ITEM(203, 246, 246, fontpage_203_246_246), // '时' -- '时' - FONTDATA_ITEM(204, 142, 142, fontpage_204_142_142), // '明' -- '明' - FONTDATA_ITEM(204, 175, 175, fontpage_204_175_175), // '是' -- '是' - FONTDATA_ITEM(205, 130, 130, fontpage_205_130_130), // '暂' -- '暂' - FONTDATA_ITEM(205, 171, 171, fontpage_205_171_171), // '暫' -- '暫' - FONTDATA_ITEM(205, 244, 244, fontpage_205_244_244), // '更' -- '更' - FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' - FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' - FONTDATA_ITEM(206, 159, 159, fontpage_206_159_159), // '期' -- '期' - FONTDATA_ITEM(206, 186, 186, fontpage_206_186_186), // '机' -- '机' - FONTDATA_ITEM(206, 192, 192, fontpage_206_192_192), // '杀' -- '杀' - FONTDATA_ITEM(206, 223, 223, fontpage_206_223_223), // '束' -- '束' - FONTDATA_ITEM(206, 225, 225, fontpage_206_225_225), // '条' -- '条' - FONTDATA_ITEM(206, 229, 229, fontpage_206_229_229), // '来' -- '来' - FONTDATA_ITEM(206, 255, 255, fontpage_206_255_255), // '板' -- '板' - FONTDATA_ITEM(207, 151, 151, fontpage_207_151_151), // '林' -- '林' - FONTDATA_ITEM(207, 241, 241, fontpage_207_241_241), // '柱' -- '柱' - FONTDATA_ITEM(208, 161, 161, fontpage_208_161_161), // '校' -- '校' - FONTDATA_ITEM(208, 188, 188, fontpage_208_188_188), // '格' -- '格' - FONTDATA_ITEM(209, 175, 175, fontpage_209_175_175), // '梯' -- '梯' - FONTDATA_ITEM(209, 192, 192, fontpage_209_192_192), // '检' -- '检' - FONTDATA_ITEM(211, 253, 253, fontpage_211_253_253), // '槽' -- '槽' - FONTDATA_ITEM(212, 161, 161, fontpage_212_161_161), // '模' -- '模' - FONTDATA_ITEM(212, 217, 217, fontpage_212_217_217), // '橙' -- '橙' - FONTDATA_ITEM(214, 226, 227, fontpage_214_226_227), // '止' -- '正' - FONTDATA_ITEM(214, 229, 229, fontpage_214_229_229), // '步' -- '步' - FONTDATA_ITEM(215, 212, 212, fontpage_215_212_212), // '比' -- '比' - FONTDATA_ITEM(217, 161, 161, fontpage_217_161_161), // '没' -- '没' - FONTDATA_ITEM(217, 226, 226, fontpage_217_226_226), // '波' -- '波' - FONTDATA_ITEM(217, 232, 232, fontpage_217_232_232), // '注' -- '注' - FONTDATA_ITEM(218, 151, 151, fontpage_218_151_151), // '洗' -- '洗' - FONTDATA_ITEM(218, 187, 187, fontpage_218_187_187), // '活' -- '活' - FONTDATA_ITEM(218, 193, 193, fontpage_218_193_193), // '流' -- '流' - FONTDATA_ITEM(218, 203, 203, fontpage_218_203_203), // '测' -- '测' - FONTDATA_ITEM(219, 136, 136, fontpage_219_136_136), // '消' -- '消' - FONTDATA_ITEM(219, 225, 225, fontpage_219_225_225), // '淡' -- '淡' - FONTDATA_ITEM(219, 247, 247, fontpage_219_247_247), // '混' -- '混' - FONTDATA_ITEM(220, 133, 133, fontpage_220_133_133), // '清' -- '清' - FONTDATA_ITEM(220, 169, 169, fontpage_220_169_169), // '温' -- '温' - FONTDATA_ITEM(220, 184, 184, fontpage_220_184_184), // '游' -- '游' - FONTDATA_ITEM(221, 144, 144, fontpage_221_144_144), // '源' -- '源' - FONTDATA_ITEM(221, 162, 162, fontpage_221_162_162), // '溢' -- '溢' - FONTDATA_ITEM(221, 209, 209, fontpage_221_209_209), // '滑' -- '滑' - FONTDATA_ITEM(222, 143, 143, fontpage_222_143_143), // '漏' -- '漏' - FONTDATA_ITEM(223, 192, 192, fontpage_223_192_192), // '激' -- '激' - FONTDATA_ITEM(224, 239, 239, fontpage_224_239_239), // '灯' -- '灯' - FONTDATA_ITEM(225, 185, 185, fontpage_225_185_185), // '点' -- '点' - FONTDATA_ITEM(225, 237, 237, fontpage_225_237_237), // '热' -- '热' - FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' - FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' - FONTDATA_ITEM(228, 249, 249, fontpage_228_249_249), // '特' -- '特' - FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' - FONTDATA_ITEM(231, 175, 175, fontpage_231_175_175), // '环' -- '环' - FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' - FONTDATA_ITEM(234, 181, 181, fontpage_234_181_181), // '电' -- '电' - FONTDATA_ITEM(234, 229, 229, fontpage_234_229_229), // '略' -- '略' - FONTDATA_ITEM(236, 253, 253, fontpage_236_253_253), // '白' -- '白' - FONTDATA_ITEM(237, 132, 132, fontpage_237_132_132), // '的' -- '的' - FONTDATA_ITEM(237, 209, 209, fontpage_237_209_209), // '监' -- '监' - FONTDATA_ITEM(237, 244, 244, fontpage_237_244_244), // '直' -- '直' - FONTDATA_ITEM(238, 129, 129, fontpage_238_129_129), // '省' -- '省' - FONTDATA_ITEM(238, 160, 160, fontpage_238_160_160), // '眠' -- '眠' - FONTDATA_ITEM(240, 238, 238, fontpage_240_238_238), // '确' -- '确' - FONTDATA_ITEM(243, 187, 187, fontpage_243_187_187), // '离' -- '离' - FONTDATA_ITEM(243, 251, 251, fontpage_243_251_251), // '移' -- '移' - FONTDATA_ITEM(244, 250, 250, fontpage_244_250_250), // '空' -- '空' - FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端' - FONTDATA_ITEM(246, 172, 172, fontpage_246_172_172), // '第' -- '第' - FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等' - FONTDATA_ITEM(247, 128, 128, fontpage_247_128_128), // '简' -- '简' - FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱' - FONTDATA_ITEM(248, 251, 251, fontpage_248_251_251), // '类' -- '类' - FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索' - FONTDATA_ITEM(250, 171, 171, fontpage_250_171_171), // '紫' -- '紫' - FONTDATA_ITEM(253, 162, 162, fontpage_253_162_162), // '红' -- '红' - FONTDATA_ITEM(253, 167, 167, fontpage_253_167_167), // '级' -- '级' - FONTDATA_ITEM(253, 191, 191, fontpage_253_191_191), // '线' -- '线' - FONTDATA_ITEM(253, 198, 198, fontpage_253_198_198), // '细' -- '细' - FONTDATA_ITEM(253, 200, 200, fontpage_253_200_200), // '终' -- '终' - FONTDATA_ITEM(253, 211, 211, fontpage_253_211_211), // '结' -- '结' - FONTDATA_ITEM(253, 217, 217, fontpage_253_217_217), // '给' -- '给' - FONTDATA_ITEM(253, 223, 223, fontpage_253_223_223), // '统' -- '统' - FONTDATA_ITEM(253, 231, 231, fontpage_253_231_231), // '继' -- '继' - FONTDATA_ITEM(253, 234, 234, fontpage_253_234_234), // '绪' -- '绪' - FONTDATA_ITEM(253, 237, 237, fontpage_253_237_237), // '续' -- '续' - FONTDATA_ITEM(253, 255, 255, fontpage_253_255_255), // '绿' -- '绿' - FONTDATA_ITEM(254, 150, 150, fontpage_254_150_150), // '编' -- '编' - FONTDATA_ITEM(254, 186, 186, fontpage_254_186_186), // '缺' -- '缺' - FONTDATA_ITEM(254, 209, 209, fontpage_254_209_209), // '网' -- '网' - FONTDATA_ITEM(254, 238, 238, fontpage_254_238_238), // '置' -- '置' - FONTDATA_ITEM(254, 242, 242, fontpage_254_242_242), // '署' -- '署' - FONTDATA_ITEM(256, 133, 133, fontpage_256_133_133), // '者' -- '者' - FONTDATA_ITEM(256, 234, 234, fontpage_256_234_234), // '聪' -- '聪' - FONTDATA_ITEM(257, 253, 253, fontpage_257_253_253), // '能' -- '能' - FONTDATA_ITEM(259, 234, 234, fontpage_259_234_234), // '自' -- '自' - FONTDATA_ITEM(259, 243, 243, fontpage_259_243_243), // '至' -- '至' - FONTDATA_ITEM(263, 220, 220, fontpage_263_220_220), // '菜' -- '菜' - FONTDATA_ITEM(265, 221, 221, fontpage_265_221_221), // '蓝' -- '蓝' - FONTDATA_ITEM(269, 199, 199, fontpage_269_199_199), // '蛇' -- '蛇' - FONTDATA_ITEM(272, 204, 204, fontpage_272_204_204), // '行' -- '行' - FONTDATA_ITEM(273, 171, 171, fontpage_273_171_171), // '被' -- '被' - FONTDATA_ITEM(273, 197, 197, fontpage_273_197_197), // '装' -- '装' - FONTDATA_ITEM(275, 129, 129, fontpage_275_129_129), // '要' -- '要' - FONTDATA_ITEM(275, 210, 210, fontpage_275_210_210), // '角' -- '角' - FONTDATA_ITEM(279, 161, 161, fontpage_279_161_161), // '计' -- '计' - FONTDATA_ITEM(279, 174, 174, fontpage_279_174_174), // '议' -- '议' - FONTDATA_ITEM(279, 190, 190, fontpage_279_190_190), // '设' -- '设' - FONTDATA_ITEM(279, 213, 213, fontpage_279_213_213), // '试' -- '试' - FONTDATA_ITEM(279, 239, 239, fontpage_279_239_239), // '误' -- '误' - FONTDATA_ITEM(279, 247, 247, fontpage_279_247_247), // '请' -- '请' - FONTDATA_ITEM(279, 251, 251, fontpage_279_251_251), // '读' -- '读' - FONTDATA_ITEM(280, 131, 131, fontpage_280_131_131), // '调' -- '调' - FONTDATA_ITEM(282, 165, 165, fontpage_282_165_165), // '败' -- '败' - FONTDATA_ITEM(282, 170, 170, fontpage_282_170_170), // '贪' -- '贪' - FONTDATA_ITEM(282, 247, 247, fontpage_282_247_247), // '起' -- '起' - FONTDATA_ITEM(283, 133, 133, fontpage_283_133_133), // '超' -- '超' - FONTDATA_ITEM(283, 221, 221, fontpage_283_221_221), // '距' -- '距' - FONTDATA_ITEM(286, 236, 236, fontpage_286_236_236), // '转' -- '转' - FONTDATA_ITEM(286, 239, 239, fontpage_286_239_239), // '软' -- '软' - FONTDATA_ITEM(286, 244, 244, fontpage_286_244_244), // '轴' -- '轴' - FONTDATA_ITEM(286, 253, 253, fontpage_286_253_253), // '载' -- '载' - FONTDATA_ITEM(287, 145, 145, fontpage_287_145_145), // '辑' -- '辑' - FONTDATA_ITEM(287, 147, 147, fontpage_287_147_147), // '输' -- '输' - FONTDATA_ITEM(287, 185, 185, fontpage_287_185_185), // '边' -- '边' - FONTDATA_ITEM(287, 193, 193, fontpage_287_193_193), // '迁' -- '迁' - FONTDATA_ITEM(287, 208, 209, fontpage_287_208_209), // '运' -- '近' - FONTDATA_ITEM(287, 212, 212, fontpage_287_212_212), // '返' -- '返' - FONTDATA_ITEM(287, 216, 216, fontpage_287_216_216), // '还' -- '还' - FONTDATA_ITEM(287, 219, 219, fontpage_287_219_219), // '进' -- '进' - FONTDATA_ITEM(287, 222, 222, fontpage_287_222_222), // '连' -- '连' - FONTDATA_ITEM(287, 247, 247, fontpage_287_247_247), // '迷' -- '迷' - FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' - FONTDATA_ITEM(288, 137, 137, fontpage_288_137_137), // '选' -- '选' - FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' - FONTDATA_ITEM(289, 232, 232, fontpage_289_232_232), // '部' -- '部' - FONTDATA_ITEM(290, 205, 205, fontpage_290_205_205), // '配' -- '配' - FONTDATA_ITEM(291, 202, 202, fontpage_291_202_202), // '释' -- '释' - FONTDATA_ITEM(291, 205, 205, fontpage_291_205_205), // '重' -- '重' - FONTDATA_ITEM(291, 207, 207, fontpage_291_207_207), // '量' -- '量' - FONTDATA_ITEM(297, 136, 136, fontpage_297_136_136), // '针' -- '针' - FONTDATA_ITEM(297, 174, 174, fontpage_297_174_174), // '钮' -- '钮' - FONTDATA_ITEM(298, 153, 153, fontpage_298_153_153), // '错' -- '错' - FONTDATA_ITEM(298, 220, 220, fontpage_298_220_220), // '镜' -- '镜' - FONTDATA_ITEM(298, 255, 255, fontpage_298_255_255), // '长' -- '长' - FONTDATA_ITEM(299, 237, 237, fontpage_299_237_237), // '闭' -- '闭' - FONTDATA_ITEM(299, 242, 242, fontpage_299_242_242), // '闲' -- '闲' - FONTDATA_ITEM(299, 244, 244, fontpage_299_244_244), // '间' -- '间' - FONTDATA_ITEM(300, 136, 136, fontpage_300_136_136), // '阈' -- '阈' - FONTDATA_ITEM(300, 205, 205, fontpage_300_205_205), // '降' -- '降' - FONTDATA_ITEM(300, 208, 208, fontpage_300_208_208), // '限' -- '限' - FONTDATA_ITEM(300, 228, 228, fontpage_300_228_228), // '除' -- '除' - FONTDATA_ITEM(300, 233, 233, fontpage_300_233_233), // '险' -- '险' - FONTDATA_ITEM(301, 246, 246, fontpage_301_246_246), // '零' -- '零' - FONTDATA_ITEM(302, 128, 128, fontpage_302_128_128), // '需' -- '需' - FONTDATA_ITEM(302, 210, 210, fontpage_302_210_210), // '青' -- '青' - FONTDATA_ITEM(302, 222, 222, fontpage_302_222_222), // '非' -- '非' - FONTDATA_ITEM(302, 224, 224, fontpage_302_224_224), // '靠' -- '靠' - FONTDATA_ITEM(302, 226, 226, fontpage_302_226_226), // '面' -- '面' - FONTDATA_ITEM(304, 245, 245, fontpage_304_245_245), // '页' -- '页' - FONTDATA_ITEM(304, 249, 249, fontpage_304_249_249), // '项' -- '项' - FONTDATA_ITEM(305, 132, 132, fontpage_305_132_132), // '预' -- '预' - FONTDATA_ITEM(305, 145, 145, fontpage_305_145_145), // '频' -- '频' - FONTDATA_ITEM(305, 157, 157, fontpage_305_157_157), // '额' -- '额' - FONTDATA_ITEM(305, 206, 206, fontpage_305_206_206), // '风' -- '风' - FONTDATA_ITEM(306, 241, 241, fontpage_306_241_241), // '饱' -- '饱' - FONTDATA_ITEM(308, 236, 236, fontpage_308_236_236), // '马' -- '马' - FONTDATA_ITEM(308, 241, 241, fontpage_308_241_241), // '驱' -- '驱' - FONTDATA_ITEM(309, 216, 216, fontpage_309_216_216), // '高' -- '高' - FONTDATA_ITEM(317, 196, 196, fontpage_317_196_196), // '黄' -- '黄' - FONTDATA_ITEM(317, 222, 222, fontpage_317_222_222), // '點' -- '點' - FONTDATA_ITEM(318, 208, 208, fontpage_318_208_208), // '齐' -- '齐' - FONTDATA_ITEM(510, 154, 154, fontpage_510_154_154), // ':' -- ':' +static const uxg_fontinfo_t g_fontinfo_zh_CN[] PROGMEM = { + FONTDATA_ITEM(64, 157, 157, fontpage_64_157_157), // '”' -- '”' + FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' + FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' + FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // '三' -- '下' + FONTDATA_ITEM(156, 141, 141, fontpage_156_141_141), // '不' -- '不' + FONTDATA_ITEM(156, 147, 147, fontpage_156_147_147), // '专' -- '专' + FONTDATA_ITEM(156, 157, 157, fontpage_156_157_157), // '丝' -- '丝' + FONTDATA_ITEM(156, 170, 170, fontpage_156_170_170), // '个' -- '个' + FONTDATA_ITEM(156, 173, 173, fontpage_156_173_173), // '中' -- '中' + FONTDATA_ITEM(156, 186, 187, fontpage_156_186_187), // '为' -- '主' + FONTDATA_ITEM(156, 201, 201, fontpage_156_201_201), // '义' -- '义' + FONTDATA_ITEM(156, 203, 203, fontpage_156_203_203), // '之' -- '之' + FONTDATA_ITEM(157, 134, 134, fontpage_157_134_134), // '了' -- '了' + FONTDATA_ITEM(157, 140, 140, fontpage_157_140_140), // '二' -- '二' + FONTDATA_ITEM(157, 142, 142, fontpage_157_142_142), // '于' -- '于' + FONTDATA_ITEM(157, 164, 164, fontpage_157_164_164), // '交' -- '交' + FONTDATA_ITEM(157, 174, 174, fontpage_157_174_174), // '亮' -- '亮' + FONTDATA_ITEM(157, 206, 206, fontpage_157_206_206), // '从' -- '从' + FONTDATA_ITEM(157, 228, 229, fontpage_157_228_229), // '令' -- '以' + FONTDATA_ITEM(157, 246, 246, fontpage_157_246_246), // '件' -- '件' + FONTDATA_ITEM(157, 253, 253, fontpage_157_253_253), // '份' -- '份' + FONTDATA_ITEM(158, 145, 145, fontpage_158_145_145), // '休' -- '休' + FONTDATA_ITEM(158, 160, 160, fontpage_158_160_160), // '传' -- '传' + FONTDATA_ITEM(158, 205, 206, fontpage_158_205_206), // '位' -- '低' + FONTDATA_ITEM(158, 211, 211, fontpage_158_211_211), // '体' -- '体' + FONTDATA_ITEM(158, 217, 217, fontpage_158_217_217), // '余' -- '余' + FONTDATA_ITEM(158, 220, 220, fontpage_158_220_220), // '作' -- '作' + FONTDATA_ITEM(158, 255, 255, fontpage_158_255_255), // '使' -- '使' + FONTDATA_ITEM(159, 155, 155, fontpage_159_155_155), // '供' -- '供' + FONTDATA_ITEM(159, 181, 181, fontpage_159_181_181), // '侵' -- '侵' + FONTDATA_ITEM(159, 221, 221, fontpage_159_221_221), // '保' -- '保' + FONTDATA_ITEM(159, 225, 225, fontpage_159_225_225), // '信' -- '信' + FONTDATA_ITEM(160, 188, 188, fontpage_160_188_188), // '值' -- '值' + FONTDATA_ITEM(160, 190, 190, fontpage_160_190_190), // '倾' -- '倾' + FONTDATA_ITEM(160, 207, 207, fontpage_160_207_207), // '偏' -- '偏' + FONTDATA_ITEM(160, 220, 220, fontpage_160_220_220), // '停' -- '停' + FONTDATA_ITEM(161, 168, 168, fontpage_161_168_168), // '储' -- '储' + FONTDATA_ITEM(161, 207, 207, fontpage_161_207_207), // '像' -- '像' + FONTDATA_ITEM(162, 197, 197, fontpage_162_197_197), // '充' -- '充' + FONTDATA_ITEM(162, 200, 201, fontpage_162_200_201), // '先' -- '光' + FONTDATA_ITEM(162, 229, 229, fontpage_162_229_229), // '入' -- '入' + FONTDATA_ITEM(162, 232, 232, fontpage_162_232_232), // '全' -- '全' + FONTDATA_ITEM(162, 241, 241, fontpage_162_241_241), // '共' -- '共' + FONTDATA_ITEM(162, 243, 243, fontpage_162_243_243), // '关' -- '关' + FONTDATA_ITEM(162, 247, 247, fontpage_162_247_247), // '具' -- '具' + FONTDATA_ITEM(163, 151, 151, fontpage_163_151_151), // '冗' -- '冗' + FONTDATA_ITEM(163, 183, 183, fontpage_163_183_183), // '冷' -- '冷' + FONTDATA_ITEM(163, 198, 198, fontpage_163_198_198), // '准' -- '准' + FONTDATA_ITEM(163, 250, 251, fontpage_163_250_251), // '出' -- '击' + FONTDATA_ITEM(164, 134, 135, fontpage_164_134_135), // '分' -- '切' + FONTDATA_ITEM(164, 155, 155, fontpage_164_155_155), // '创' -- '创' + FONTDATA_ITEM(164, 157, 157, fontpage_164_157_157), // '初' -- '初' + FONTDATA_ITEM(164, 171, 171, fontpage_164_171_171), // '别' -- '别' + FONTDATA_ITEM(164, 176, 176, fontpage_164_176_176), // '到' -- '到' + FONTDATA_ITEM(164, 182, 183, fontpage_164_182_183), // '制' -- '刷' + FONTDATA_ITEM(164, 242, 242, fontpage_164_242_242), // '割' -- '割' + FONTDATA_ITEM(165, 155, 155, fontpage_165_155_155), // '力' -- '力' + FONTDATA_ITEM(165, 159, 160, fontpage_165_159_160), // '功' -- '加' + FONTDATA_ITEM(165, 168, 168, fontpage_165_168_168), // '动' -- '动' + FONTDATA_ITEM(166, 150, 150, fontpage_166_150_150), // '化' -- '化' + FONTDATA_ITEM(166, 199, 199, fontpage_166_199_199), // '升' -- '升' + FONTDATA_ITEM(166, 202, 202, fontpage_166_202_202), // '半' -- '半' + FONTDATA_ITEM(166, 207, 207, fontpage_166_207_207), // '协' -- '协' + FONTDATA_ITEM(166, 213, 213, fontpage_166_213_213), // '单' -- '单' + FONTDATA_ITEM(166, 225, 225, fontpage_166_225_225), // '卡' -- '卡' + FONTDATA_ITEM(166, 240, 241, fontpage_166_240_241), // '印' -- '危' + FONTDATA_ITEM(166, 244, 244, fontpage_166_244_244), // '却' -- '却' + FONTDATA_ITEM(166, 248, 248, fontpage_166_248_248), // '卸' -- '卸' + FONTDATA_ITEM(167, 139, 139, fontpage_167_139_139), // '压' -- '压' + FONTDATA_ITEM(167, 159, 159, fontpage_167_159_159), // '原' -- '原' + FONTDATA_ITEM(167, 204, 205, fontpage_167_204_205), // '双' -- '反' + FONTDATA_ITEM(167, 214, 214, fontpage_167_214_214), // '取' -- '取' + FONTDATA_ITEM(167, 216, 216, fontpage_167_216_216), // '变' -- '变' + FONTDATA_ITEM(167, 240, 240, fontpage_167_240_240), // '台' -- '台' + FONTDATA_ITEM(168, 131, 131, fontpage_168_131_131), // '吃' -- '吃' + FONTDATA_ITEM(168, 136, 136, fontpage_168_136_136), // '合' -- '合' + FONTDATA_ITEM(168, 141, 142, fontpage_168_141_142), // '名' -- '后' + FONTDATA_ITEM(168, 145, 145, fontpage_168_145_145), // '向' -- '向' + FONTDATA_ITEM(168, 166, 166, fontpage_168_166_166), // '否' -- '否' + FONTDATA_ITEM(168, 175, 175, fontpage_168_175_175), // '启' -- '启' + FONTDATA_ITEM(168, 202, 202, fontpage_168_202_202), // '告' -- '告' + FONTDATA_ITEM(168, 232, 232, fontpage_168_232_232), // '周' -- '周' + FONTDATA_ITEM(168, 253, 253, fontpage_168_253_253), // '命' -- '命' + FONTDATA_ITEM(169, 140, 140, fontpage_169_140_140), // '和' -- '和' + FONTDATA_ITEM(169, 205, 205, fontpage_169_205_205), // '响' -- '响' + FONTDATA_ITEM(171, 183, 183, fontpage_171_183_183), // '喷' -- '喷' + FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // '嘴' -- '嘴' + FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // '器' -- '器' + FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // '噴' -- '噴' + FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // '回' -- '回' + FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // '因' -- '因' + FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // '固' -- '固' + FONTDATA_ITEM(173, 254, 254, fontpage_173_254_254), // '图' -- '图' + FONTDATA_ITEM(174, 168, 168, fontpage_174_168_168), // '在' -- '在' + FONTDATA_ITEM(174, 207, 207, fontpage_174_207_207), // '坏' -- '坏' + FONTDATA_ITEM(174, 215, 215, fontpage_174_215_215), // '块' -- '块' + FONTDATA_ITEM(175, 139, 139, fontpage_175_139_139), // '型' -- '型' + FONTDATA_ITEM(175, 171, 171, fontpage_175_171_171), // '垫' -- '垫' + FONTDATA_ITEM(176, 235, 235, fontpage_176_235_235), // '填' -- '填' + FONTDATA_ITEM(177, 243, 243, fontpage_177_243_243), // '壳' -- '壳' + FONTDATA_ITEM(178, 135, 135, fontpage_178_135_135), // '备' -- '备' + FONTDATA_ITEM(178, 141, 141, fontpage_178_141_141), // '复' -- '复' + FONTDATA_ITEM(178, 150, 150, fontpage_178_150_150), // '外' -- '外' + FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // '多' -- '多' + FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '大' -- '大' + FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '天' -- '太' + FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '失' -- '失' + FONTDATA_ITEM(178, 180, 180, fontpage_178_180_180), // '头' -- '头' + FONTDATA_ITEM(178, 253, 253, fontpage_178_253_253), // '好' -- '好' + FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // '始' -- '始' + FONTDATA_ITEM(182, 208, 208, fontpage_182_208_208), // '子' -- '子' + FONTDATA_ITEM(182, 216, 216, fontpage_182_216_216), // '存' -- '存' + FONTDATA_ITEM(183, 137, 137, fontpage_183_137_137), // '安' -- '安' + FONTDATA_ITEM(183, 140, 140, fontpage_183_140_140), // '完' -- '完' + FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' + FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' + FONTDATA_ITEM(183, 171, 171, fontpage_183_171_171), // '宫' -- '宫' + FONTDATA_ITEM(183, 249, 249, fontpage_183_249_249), // '对' -- '对' + FONTDATA_ITEM(184, 134, 134, fontpage_184_134_134), // '将' -- '将' + FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' + FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' + FONTDATA_ITEM(184, 207, 207, fontpage_184_207_207), // '屏' -- '屏' + FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' + FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' + FONTDATA_ITEM(187, 242, 242, fontpage_187_242_242), // '已' -- '已' + FONTDATA_ITEM(188, 243, 243, fontpage_188_243_243), // '平' -- '平' + FONTDATA_ITEM(188, 246, 246, fontpage_188_246_246), // '并' -- '并' + FONTDATA_ITEM(189, 138, 138, fontpage_189_138_138), // '床' -- '床' + FONTDATA_ITEM(189, 148, 148, fontpage_189_148_148), // '应' -- '应' + FONTDATA_ITEM(189, 159, 159, fontpage_189_159_159), // '废' -- '废' + FONTDATA_ITEM(189, 166, 166, fontpage_189_166_166), // '度' -- '度' + FONTDATA_ITEM(190, 128, 128, fontpage_190_128_128), // '开' -- '开' + FONTDATA_ITEM(190, 131, 131, fontpage_190_131_131), // '弃' -- '弃' + FONTDATA_ITEM(190, 143, 143, fontpage_190_143_143), // '式' -- '式' + FONTDATA_ITEM(190, 149, 149, fontpage_190_149_149), // '引' -- '引' + FONTDATA_ITEM(190, 185, 185, fontpage_190_185_185), // '弹' -- '弹' + FONTDATA_ITEM(190, 210, 210, fontpage_190_210_210), // '归' -- '归' + FONTDATA_ITEM(191, 132, 133, fontpage_191_132_133), // '径' -- '待' + FONTDATA_ITEM(191, 170, 170, fontpage_191_170_170), // '循' -- '循' + FONTDATA_ITEM(191, 174, 174, fontpage_191_174_174), // '微' -- '微' + FONTDATA_ITEM(191, 195, 195, fontpage_191_195_195), // '心' -- '心' + FONTDATA_ITEM(191, 253, 253, fontpage_191_253_253), // '忽' -- '忽' + FONTDATA_ITEM(192, 167, 167, fontpage_192_167_167), // '性' -- '性' + FONTDATA_ITEM(192, 187, 187, fontpage_192_187_187), // '总' -- '总' + FONTDATA_ITEM(192, 226, 226, fontpage_192_226_226), // '恢' -- '恢' + FONTDATA_ITEM(192, 239, 239, fontpage_192_239_239), // '息' -- '息' + FONTDATA_ITEM(194, 159, 159, fontpage_194_159_159), // '感' -- '感' + FONTDATA_ITEM(196, 143, 144, fontpage_196_143_144), // '戏' -- '成' + FONTDATA_ITEM(196, 183, 183, fontpage_196_183_183), // '户' -- '户' + FONTDATA_ITEM(196, 192, 192, fontpage_196_192_192), // '所' -- '所' + FONTDATA_ITEM(196, 199, 199, fontpage_196_199_199), // '扇' -- '扇' + FONTDATA_ITEM(196, 203, 203, fontpage_196_203_203), // '手' -- '手' + FONTDATA_ITEM(196, 211, 211, fontpage_196_211_211), // '打' -- '打' + FONTDATA_ITEM(196, 231, 231, fontpage_196_231_231), // '执' -- '执' + FONTDATA_ITEM(196, 249, 249, fontpage_196_249_249), // '批' -- '批' + FONTDATA_ITEM(197, 150, 150, fontpage_197_150_150), // '抖' -- '抖' + FONTDATA_ITEM(197, 165, 165, fontpage_197_165_165), // '报' -- '报' + FONTDATA_ITEM(197, 172, 172, fontpage_197_172_172), // '抬' -- '抬' + FONTDATA_ITEM(197, 189, 189, fontpage_197_189_189), // '抽' -- '抽' + FONTDATA_ITEM(197, 212, 212, fontpage_197_212_212), // '拔' -- '拔' + FONTDATA_ITEM(197, 233, 233, fontpage_197_233_233), // '择' -- '择' + FONTDATA_ITEM(198, 137, 137, fontpage_198_137_137), // '按' -- '按' + FONTDATA_ITEM(198, 161, 161, fontpage_198_161_161), // '挡' -- '挡' + FONTDATA_ITEM(198, 164, 164, fontpage_198_164_164), // '挤' -- '挤' + FONTDATA_ITEM(198, 223, 223, fontpage_198_223_223), // '损' -- '损' + FONTDATA_ITEM(198, 226, 226, fontpage_198_226_226), // '换' -- '换' + FONTDATA_ITEM(199, 137, 137, fontpage_199_137_137), // '掉' -- '掉' + FONTDATA_ITEM(199, 162, 162, fontpage_199_162_162), // '探' -- '探' + FONTDATA_ITEM(199, 165, 165, fontpage_199_165_165), // '接' -- '接' + FONTDATA_ITEM(199, 167, 167, fontpage_199_167_167), // '控' -- '控' + FONTDATA_ITEM(199, 208, 208, fontpage_199_208_208), // '提' -- '提' + FONTDATA_ITEM(199, 210, 210, fontpage_199_210_210), // '插' -- '插' + FONTDATA_ITEM(202, 182, 182, fontpage_202_182_182), // '收' -- '收' + FONTDATA_ITEM(202, 190, 190, fontpage_202_190_190), // '放' -- '放' + FONTDATA_ITEM(202, 240, 240, fontpage_202_240_240), // '数' -- '数' + FONTDATA_ITEM(202, 242, 242, fontpage_202_242_242), // '敲' -- '敲' + FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // '整' -- '整' + FONTDATA_ITEM(203, 135, 135, fontpage_203_135_135), // '文' -- '文' + FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // '料' -- '料' + FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // '斜' -- '斜' + FONTDATA_ITEM(203, 173, 173, fontpage_203_173_173), // '断' -- '断' + FONTDATA_ITEM(203, 176, 176, fontpage_203_176_176), // '新' -- '新' + FONTDATA_ITEM(203, 185, 185, fontpage_203_185_185), // '方' -- '方' + FONTDATA_ITEM(203, 224, 224, fontpage_203_224_224), // '无' -- '无' + FONTDATA_ITEM(203, 246, 246, fontpage_203_246_246), // '时' -- '时' + FONTDATA_ITEM(204, 142, 142, fontpage_204_142_142), // '明' -- '明' + FONTDATA_ITEM(204, 175, 175, fontpage_204_175_175), // '是' -- '是' + FONTDATA_ITEM(205, 130, 130, fontpage_205_130_130), // '暂' -- '暂' + FONTDATA_ITEM(205, 171, 171, fontpage_205_171_171), // '暫' -- '暫' + FONTDATA_ITEM(205, 244, 244, fontpage_205_244_244), // '更' -- '更' + FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' + FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' + FONTDATA_ITEM(206, 159, 159, fontpage_206_159_159), // '期' -- '期' + FONTDATA_ITEM(206, 186, 186, fontpage_206_186_186), // '机' -- '机' + FONTDATA_ITEM(206, 192, 192, fontpage_206_192_192), // '杀' -- '杀' + FONTDATA_ITEM(206, 223, 223, fontpage_206_223_223), // '束' -- '束' + FONTDATA_ITEM(206, 225, 225, fontpage_206_225_225), // '条' -- '条' + FONTDATA_ITEM(206, 229, 229, fontpage_206_229_229), // '来' -- '来' + FONTDATA_ITEM(206, 255, 255, fontpage_206_255_255), // '板' -- '板' + FONTDATA_ITEM(207, 151, 151, fontpage_207_151_151), // '林' -- '林' + FONTDATA_ITEM(207, 241, 241, fontpage_207_241_241), // '柱' -- '柱' + FONTDATA_ITEM(208, 161, 161, fontpage_208_161_161), // '校' -- '校' + FONTDATA_ITEM(208, 188, 188, fontpage_208_188_188), // '格' -- '格' + FONTDATA_ITEM(209, 175, 175, fontpage_209_175_175), // '梯' -- '梯' + FONTDATA_ITEM(209, 192, 192, fontpage_209_192_192), // '检' -- '检' + FONTDATA_ITEM(211, 253, 253, fontpage_211_253_253), // '槽' -- '槽' + FONTDATA_ITEM(212, 161, 161, fontpage_212_161_161), // '模' -- '模' + FONTDATA_ITEM(212, 217, 217, fontpage_212_217_217), // '橙' -- '橙' + FONTDATA_ITEM(214, 226, 227, fontpage_214_226_227), // '止' -- '正' + FONTDATA_ITEM(214, 229, 229, fontpage_214_229_229), // '步' -- '步' + FONTDATA_ITEM(215, 212, 212, fontpage_215_212_212), // '比' -- '比' + FONTDATA_ITEM(217, 161, 161, fontpage_217_161_161), // '没' -- '没' + FONTDATA_ITEM(217, 226, 226, fontpage_217_226_226), // '波' -- '波' + FONTDATA_ITEM(217, 232, 232, fontpage_217_232_232), // '注' -- '注' + FONTDATA_ITEM(218, 151, 151, fontpage_218_151_151), // '洗' -- '洗' + FONTDATA_ITEM(218, 187, 187, fontpage_218_187_187), // '活' -- '活' + FONTDATA_ITEM(218, 193, 193, fontpage_218_193_193), // '流' -- '流' + FONTDATA_ITEM(218, 203, 203, fontpage_218_203_203), // '测' -- '测' + FONTDATA_ITEM(219, 136, 136, fontpage_219_136_136), // '消' -- '消' + FONTDATA_ITEM(219, 225, 225, fontpage_219_225_225), // '淡' -- '淡' + FONTDATA_ITEM(219, 247, 247, fontpage_219_247_247), // '混' -- '混' + FONTDATA_ITEM(220, 133, 133, fontpage_220_133_133), // '清' -- '清' + FONTDATA_ITEM(220, 169, 169, fontpage_220_169_169), // '温' -- '温' + FONTDATA_ITEM(220, 184, 184, fontpage_220_184_184), // '游' -- '游' + FONTDATA_ITEM(221, 144, 144, fontpage_221_144_144), // '源' -- '源' + FONTDATA_ITEM(221, 162, 162, fontpage_221_162_162), // '溢' -- '溢' + FONTDATA_ITEM(221, 209, 209, fontpage_221_209_209), // '滑' -- '滑' + FONTDATA_ITEM(222, 143, 143, fontpage_222_143_143), // '漏' -- '漏' + FONTDATA_ITEM(223, 192, 192, fontpage_223_192_192), // '激' -- '激' + FONTDATA_ITEM(224, 239, 239, fontpage_224_239_239), // '灯' -- '灯' + FONTDATA_ITEM(225, 185, 185, fontpage_225_185_185), // '点' -- '点' + FONTDATA_ITEM(225, 237, 237, fontpage_225_237_237), // '热' -- '热' + FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' + FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' + FONTDATA_ITEM(228, 249, 249, fontpage_228_249_249), // '特' -- '特' + FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' + FONTDATA_ITEM(231, 175, 175, fontpage_231_175_175), // '环' -- '环' + FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' + FONTDATA_ITEM(234, 181, 181, fontpage_234_181_181), // '电' -- '电' + FONTDATA_ITEM(234, 229, 229, fontpage_234_229_229), // '略' -- '略' + FONTDATA_ITEM(236, 253, 253, fontpage_236_253_253), // '白' -- '白' + FONTDATA_ITEM(237, 132, 132, fontpage_237_132_132), // '的' -- '的' + FONTDATA_ITEM(237, 209, 209, fontpage_237_209_209), // '监' -- '监' + FONTDATA_ITEM(237, 244, 244, fontpage_237_244_244), // '直' -- '直' + FONTDATA_ITEM(238, 129, 129, fontpage_238_129_129), // '省' -- '省' + FONTDATA_ITEM(238, 160, 160, fontpage_238_160_160), // '眠' -- '眠' + FONTDATA_ITEM(240, 238, 238, fontpage_240_238_238), // '确' -- '确' + FONTDATA_ITEM(243, 187, 187, fontpage_243_187_187), // '离' -- '离' + FONTDATA_ITEM(243, 251, 251, fontpage_243_251_251), // '移' -- '移' + FONTDATA_ITEM(244, 250, 250, fontpage_244_250_250), // '空' -- '空' + FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端' + FONTDATA_ITEM(246, 172, 172, fontpage_246_172_172), // '第' -- '第' + FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等' + FONTDATA_ITEM(247, 128, 128, fontpage_247_128_128), // '简' -- '简' + FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱' + FONTDATA_ITEM(248, 251, 251, fontpage_248_251_251), // '类' -- '类' + FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索' + FONTDATA_ITEM(250, 171, 171, fontpage_250_171_171), // '紫' -- '紫' + FONTDATA_ITEM(253, 162, 162, fontpage_253_162_162), // '红' -- '红' + FONTDATA_ITEM(253, 167, 167, fontpage_253_167_167), // '级' -- '级' + FONTDATA_ITEM(253, 191, 191, fontpage_253_191_191), // '线' -- '线' + FONTDATA_ITEM(253, 198, 198, fontpage_253_198_198), // '细' -- '细' + FONTDATA_ITEM(253, 200, 200, fontpage_253_200_200), // '终' -- '终' + FONTDATA_ITEM(253, 211, 211, fontpage_253_211_211), // '结' -- '结' + FONTDATA_ITEM(253, 217, 217, fontpage_253_217_217), // '给' -- '给' + FONTDATA_ITEM(253, 223, 223, fontpage_253_223_223), // '统' -- '统' + FONTDATA_ITEM(253, 231, 231, fontpage_253_231_231), // '继' -- '继' + FONTDATA_ITEM(253, 234, 234, fontpage_253_234_234), // '绪' -- '绪' + FONTDATA_ITEM(253, 237, 237, fontpage_253_237_237), // '续' -- '续' + FONTDATA_ITEM(253, 255, 255, fontpage_253_255_255), // '绿' -- '绿' + FONTDATA_ITEM(254, 150, 150, fontpage_254_150_150), // '编' -- '编' + FONTDATA_ITEM(254, 186, 186, fontpage_254_186_186), // '缺' -- '缺' + FONTDATA_ITEM(254, 209, 209, fontpage_254_209_209), // '网' -- '网' + FONTDATA_ITEM(254, 238, 238, fontpage_254_238_238), // '置' -- '置' + FONTDATA_ITEM(254, 242, 242, fontpage_254_242_242), // '署' -- '署' + FONTDATA_ITEM(256, 133, 133, fontpage_256_133_133), // '者' -- '者' + FONTDATA_ITEM(256, 234, 234, fontpage_256_234_234), // '聪' -- '聪' + FONTDATA_ITEM(257, 253, 253, fontpage_257_253_253), // '能' -- '能' + FONTDATA_ITEM(259, 234, 234, fontpage_259_234_234), // '自' -- '自' + FONTDATA_ITEM(259, 243, 243, fontpage_259_243_243), // '至' -- '至' + FONTDATA_ITEM(263, 220, 220, fontpage_263_220_220), // '菜' -- '菜' + FONTDATA_ITEM(265, 221, 221, fontpage_265_221_221), // '蓝' -- '蓝' + FONTDATA_ITEM(269, 199, 199, fontpage_269_199_199), // '蛇' -- '蛇' + FONTDATA_ITEM(272, 204, 204, fontpage_272_204_204), // '行' -- '行' + FONTDATA_ITEM(273, 171, 171, fontpage_273_171_171), // '被' -- '被' + FONTDATA_ITEM(273, 197, 197, fontpage_273_197_197), // '装' -- '装' + FONTDATA_ITEM(275, 129, 129, fontpage_275_129_129), // '要' -- '要' + FONTDATA_ITEM(275, 210, 210, fontpage_275_210_210), // '角' -- '角' + FONTDATA_ITEM(279, 161, 161, fontpage_279_161_161), // '计' -- '计' + FONTDATA_ITEM(279, 174, 174, fontpage_279_174_174), // '议' -- '议' + FONTDATA_ITEM(279, 190, 190, fontpage_279_190_190), // '设' -- '设' + FONTDATA_ITEM(279, 213, 213, fontpage_279_213_213), // '试' -- '试' + FONTDATA_ITEM(279, 239, 239, fontpage_279_239_239), // '误' -- '误' + FONTDATA_ITEM(279, 247, 247, fontpage_279_247_247), // '请' -- '请' + FONTDATA_ITEM(279, 251, 251, fontpage_279_251_251), // '读' -- '读' + FONTDATA_ITEM(280, 131, 131, fontpage_280_131_131), // '调' -- '调' + FONTDATA_ITEM(282, 165, 165, fontpage_282_165_165), // '败' -- '败' + FONTDATA_ITEM(282, 170, 170, fontpage_282_170_170), // '贪' -- '贪' + FONTDATA_ITEM(282, 247, 247, fontpage_282_247_247), // '起' -- '起' + FONTDATA_ITEM(283, 133, 133, fontpage_283_133_133), // '超' -- '超' + FONTDATA_ITEM(283, 221, 221, fontpage_283_221_221), // '距' -- '距' + FONTDATA_ITEM(286, 236, 236, fontpage_286_236_236), // '转' -- '转' + FONTDATA_ITEM(286, 239, 239, fontpage_286_239_239), // '软' -- '软' + FONTDATA_ITEM(286, 244, 244, fontpage_286_244_244), // '轴' -- '轴' + FONTDATA_ITEM(286, 253, 253, fontpage_286_253_253), // '载' -- '载' + FONTDATA_ITEM(287, 145, 145, fontpage_287_145_145), // '辑' -- '辑' + FONTDATA_ITEM(287, 147, 147, fontpage_287_147_147), // '输' -- '输' + FONTDATA_ITEM(287, 185, 185, fontpage_287_185_185), // '边' -- '边' + FONTDATA_ITEM(287, 193, 193, fontpage_287_193_193), // '迁' -- '迁' + FONTDATA_ITEM(287, 208, 209, fontpage_287_208_209), // '运' -- '近' + FONTDATA_ITEM(287, 212, 212, fontpage_287_212_212), // '返' -- '返' + FONTDATA_ITEM(287, 216, 216, fontpage_287_216_216), // '还' -- '还' + FONTDATA_ITEM(287, 219, 219, fontpage_287_219_219), // '进' -- '进' + FONTDATA_ITEM(287, 222, 222, fontpage_287_222_222), // '连' -- '连' + FONTDATA_ITEM(287, 247, 247, fontpage_287_247_247), // '迷' -- '迷' + FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' + FONTDATA_ITEM(288, 137, 137, fontpage_288_137_137), // '选' -- '选' + FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' + FONTDATA_ITEM(289, 232, 232, fontpage_289_232_232), // '部' -- '部' + FONTDATA_ITEM(290, 205, 205, fontpage_290_205_205), // '配' -- '配' + FONTDATA_ITEM(291, 202, 202, fontpage_291_202_202), // '释' -- '释' + FONTDATA_ITEM(291, 205, 205, fontpage_291_205_205), // '重' -- '重' + FONTDATA_ITEM(291, 207, 207, fontpage_291_207_207), // '量' -- '量' + FONTDATA_ITEM(297, 136, 136, fontpage_297_136_136), // '针' -- '针' + FONTDATA_ITEM(297, 174, 174, fontpage_297_174_174), // '钮' -- '钮' + FONTDATA_ITEM(298, 153, 153, fontpage_298_153_153), // '错' -- '错' + FONTDATA_ITEM(298, 220, 220, fontpage_298_220_220), // '镜' -- '镜' + FONTDATA_ITEM(298, 255, 255, fontpage_298_255_255), // '长' -- '长' + FONTDATA_ITEM(299, 237, 237, fontpage_299_237_237), // '闭' -- '闭' + FONTDATA_ITEM(299, 242, 242, fontpage_299_242_242), // '闲' -- '闲' + FONTDATA_ITEM(299, 244, 244, fontpage_299_244_244), // '间' -- '间' + FONTDATA_ITEM(300, 136, 136, fontpage_300_136_136), // '阈' -- '阈' + FONTDATA_ITEM(300, 205, 205, fontpage_300_205_205), // '降' -- '降' + FONTDATA_ITEM(300, 208, 208, fontpage_300_208_208), // '限' -- '限' + FONTDATA_ITEM(300, 228, 228, fontpage_300_228_228), // '除' -- '除' + FONTDATA_ITEM(300, 233, 233, fontpage_300_233_233), // '险' -- '险' + FONTDATA_ITEM(301, 246, 246, fontpage_301_246_246), // '零' -- '零' + FONTDATA_ITEM(302, 128, 128, fontpage_302_128_128), // '需' -- '需' + FONTDATA_ITEM(302, 210, 210, fontpage_302_210_210), // '青' -- '青' + FONTDATA_ITEM(302, 222, 222, fontpage_302_222_222), // '非' -- '非' + FONTDATA_ITEM(302, 224, 224, fontpage_302_224_224), // '靠' -- '靠' + FONTDATA_ITEM(302, 226, 226, fontpage_302_226_226), // '面' -- '面' + FONTDATA_ITEM(304, 245, 245, fontpage_304_245_245), // '页' -- '页' + FONTDATA_ITEM(304, 249, 249, fontpage_304_249_249), // '项' -- '项' + FONTDATA_ITEM(305, 132, 132, fontpage_305_132_132), // '预' -- '预' + FONTDATA_ITEM(305, 145, 145, fontpage_305_145_145), // '频' -- '频' + FONTDATA_ITEM(305, 157, 157, fontpage_305_157_157), // '额' -- '额' + FONTDATA_ITEM(305, 206, 206, fontpage_305_206_206), // '风' -- '风' + FONTDATA_ITEM(306, 241, 241, fontpage_306_241_241), // '饱' -- '饱' + FONTDATA_ITEM(308, 236, 236, fontpage_308_236_236), // '马' -- '马' + FONTDATA_ITEM(308, 241, 241, fontpage_308_241_241), // '驱' -- '驱' + FONTDATA_ITEM(309, 216, 216, fontpage_309_216_216), // '高' -- '高' + FONTDATA_ITEM(317, 196, 196, fontpage_317_196_196), // '黄' -- '黄' + FONTDATA_ITEM(317, 222, 222, fontpage_317_222_222), // '點' -- '點' + FONTDATA_ITEM(318, 208, 208, fontpage_318_208_208), // '齐' -- '齐' + FONTDATA_ITEM(510, 154, 154, fontpage_510_154_154), // ':' -- ':' }; diff --git a/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h b/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h index 8eee544ec81b..093629cd16fa 100644 --- a/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h +++ b/Marlin/src/lcd/dogm/fontdata/langdata_zh_TW.h @@ -3,7 +3,9 @@ * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#pragma once + +#include "langdata.h" const u8g_fntpgm_uint8_t fontpage_69_191_191[28] U8G_FONT_SECTION("fontpage_69_191_191") = { 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0xBF,0xBF,0x00,0x05,0x00,0x00, @@ -1217,305 +1219,304 @@ const u8g_fntpgm_uint8_t fontpage_510_154_154[30] U8G_FONT_SECTION("fontpage_510 0x00,0x0C,0x0F,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x9A,0x9A,0x00,0x08,0x00,0x00, 0x00,0x02,0x07,0x07,0x0C,0x06,0x01,0xC0,0xC0,0x00,0x00,0x00,0xC0,0xC0}; -#define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } -static const uxg_fontinfo_t g_fontinfo[] PROGMEM = { - FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' - FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' - FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // '三' -- '下' - FONTDATA_ITEM(156, 141, 141, fontpage_156_141_141), // '不' -- '不' - FONTDATA_ITEM(156, 166, 166, fontpage_156_166_166), // '並' -- '並' - FONTDATA_ITEM(156, 173, 173, fontpage_156_173_173), // '中' -- '中' - FONTDATA_ITEM(156, 187, 187, fontpage_156_187_187), // '主' -- '主' - FONTDATA_ITEM(156, 203, 203, fontpage_156_203_203), // '之' -- '之' - FONTDATA_ITEM(157, 164, 164, fontpage_157_164_164), // '交' -- '交' - FONTDATA_ITEM(157, 174, 174, fontpage_157_174_174), // '亮' -- '亮' - FONTDATA_ITEM(157, 228, 228, fontpage_157_228_228), // '令' -- '令' - FONTDATA_ITEM(157, 246, 246, fontpage_157_246_246), // '件' -- '件' - FONTDATA_ITEM(157, 253, 253, fontpage_157_253_253), // '份' -- '份' - FONTDATA_ITEM(158, 145, 145, fontpage_158_145_145), // '休' -- '休' - FONTDATA_ITEM(158, 205, 206, fontpage_158_205_206), // '位' -- '低' - FONTDATA_ITEM(158, 220, 220, fontpage_158_220_220), // '作' -- '作' - FONTDATA_ITEM(159, 155, 155, fontpage_159_155_155), // '供' -- '供' - FONTDATA_ITEM(159, 221, 221, fontpage_159_221_221), // '保' -- '保' - FONTDATA_ITEM(159, 225, 225, fontpage_159_225_225), // '信' -- '信' - FONTDATA_ITEM(160, 139, 139, fontpage_160_139_139), // '個' -- '個' - FONTDATA_ITEM(160, 188, 188, fontpage_160_188_188), // '值' -- '值' - FONTDATA_ITEM(160, 207, 207, fontpage_160_207_207), // '偏' -- '偏' - FONTDATA_ITEM(160, 220, 220, fontpage_160_220_220), // '停' -- '停' - FONTDATA_ITEM(160, 245, 245, fontpage_160_245_245), // '偵' -- '偵' - FONTDATA_ITEM(161, 153, 153, fontpage_161_153_153), // '備' -- '備' - FONTDATA_ITEM(161, 179, 179, fontpage_161_179_179), // '傳' -- '傳' - FONTDATA_ITEM(161, 190, 190, fontpage_161_190_190), // '傾' -- '傾' - FONTDATA_ITEM(162, 178, 178, fontpage_162_178_178), // '儲' -- '儲' - FONTDATA_ITEM(162, 197, 197, fontpage_162_197_197), // '充' -- '充' - FONTDATA_ITEM(162, 200, 201, fontpage_162_200_201), // '先' -- '光' - FONTDATA_ITEM(162, 229, 229, fontpage_162_229_229), // '入' -- '入' - FONTDATA_ITEM(162, 232, 232, fontpage_162_232_232), // '全' -- '全' - FONTDATA_ITEM(162, 241, 241, fontpage_162_241_241), // '共' -- '共' - FONTDATA_ITEM(162, 247, 247, fontpage_162_247_247), // '具' -- '具' - FONTDATA_ITEM(163, 151, 151, fontpage_163_151_151), // '冗' -- '冗' - FONTDATA_ITEM(163, 183, 183, fontpage_163_183_183), // '冷' -- '冷' - FONTDATA_ITEM(163, 198, 198, fontpage_163_198_198), // '准' -- '准' - FONTDATA_ITEM(163, 250, 250, fontpage_163_250_250), // '出' -- '出' - FONTDATA_ITEM(164, 134, 134, fontpage_164_134_134), // '分' -- '分' - FONTDATA_ITEM(164, 151, 151, fontpage_164_151_151), // '列' -- '列' - FONTDATA_ITEM(164, 157, 157, fontpage_164_157_157), // '初' -- '初' - FONTDATA_ITEM(164, 176, 176, fontpage_164_176_176), // '到' -- '到' - FONTDATA_ITEM(164, 182, 183, fontpage_164_182_183), // '制' -- '刷' - FONTDATA_ITEM(164, 245, 245, fontpage_164_245_245), // '創' -- '創' - FONTDATA_ITEM(165, 155, 155, fontpage_165_155_155), // '力' -- '力' - FONTDATA_ITEM(165, 160, 160, fontpage_165_160_160), // '加' -- '加' - FONTDATA_ITEM(165, 213, 213, fontpage_165_213_213), // '動' -- '動' - FONTDATA_ITEM(166, 150, 150, fontpage_166_150_150), // '化' -- '化' - FONTDATA_ITEM(166, 202, 202, fontpage_166_202_202), // '半' -- '半' - FONTDATA_ITEM(166, 212, 212, fontpage_166_212_212), // '協' -- '協' - FONTDATA_ITEM(166, 225, 225, fontpage_166_225_225), // '卡' -- '卡' - FONTDATA_ITEM(166, 240, 240, fontpage_166_240_240), // '印' -- '印' - FONTDATA_ITEM(166, 248, 248, fontpage_166_248_248), // '卸' -- '卸' - FONTDATA_ITEM(166, 251, 251, fontpage_166_251_251), // '卻' -- '卻' - FONTDATA_ITEM(167, 159, 159, fontpage_167_159_159), // '原' -- '原' - FONTDATA_ITEM(167, 205, 205, fontpage_167_205_205), // '反' -- '反' - FONTDATA_ITEM(167, 214, 214, fontpage_167_214_214), // '取' -- '取' - FONTDATA_ITEM(167, 240, 240, fontpage_167_240_240), // '台' -- '台' - FONTDATA_ITEM(168, 136, 136, fontpage_168_136_136), // '合' -- '合' - FONTDATA_ITEM(168, 166, 166, fontpage_168_166_166), // '否' -- '否' - FONTDATA_ITEM(168, 202, 202, fontpage_168_202_202), // '告' -- '告' - FONTDATA_ITEM(168, 253, 253, fontpage_168_253_253), // '命' -- '命' - FONTDATA_ITEM(169, 140, 140, fontpage_169_140_140), // '和' -- '和' - FONTDATA_ITEM(170, 223, 223, fontpage_170_223_223), // '啟' -- '啟' - FONTDATA_ITEM(171, 174, 174, fontpage_171_174_174), // '單' -- '單' - FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // '嘴' -- '嘴' - FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // '器' -- '器' - FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // '噴' -- '噴' - FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // '回' -- '回' - FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // '因' -- '因' - FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // '固' -- '固' - FONTDATA_ITEM(174, 150, 150, fontpage_174_150_150), // '圖' -- '圖' - FONTDATA_ITEM(174, 168, 168, fontpage_174_168_168), // '在' -- '在' - FONTDATA_ITEM(175, 139, 139, fontpage_175_139_139), // '型' -- '型' - FONTDATA_ITEM(175, 247, 247, fontpage_175_247_247), // '執' -- '執' - FONTDATA_ITEM(176, 202, 202, fontpage_176_202_202), // '塊' -- '塊' - FONTDATA_ITEM(176, 235, 235, fontpage_176_235_235), // '填' -- '填' - FONTDATA_ITEM(177, 138, 138, fontpage_177_138_138), // '墊' -- '墊' - FONTDATA_ITEM(178, 150, 150, fontpage_178_150_150), // '外' -- '外' - FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // '多' -- '多' - FONTDATA_ITEM(178, 160, 160, fontpage_178_160_160), // '夠' -- '夠' - FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '大' -- '大' - FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '天' -- '太' - FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '失' -- '失' - FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // '始' -- '始' - FONTDATA_ITEM(181, 146, 146, fontpage_181_146_146), // '媒' -- '媒' - FONTDATA_ITEM(182, 208, 208, fontpage_182_208_208), // '子' -- '子' - FONTDATA_ITEM(182, 216, 216, fontpage_182_216_216), // '存' -- '存' - FONTDATA_ITEM(183, 137, 137, fontpage_183_137_137), // '安' -- '安' - FONTDATA_ITEM(183, 140, 140, fontpage_183_140_140), // '完' -- '完' - FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' - FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' - FONTDATA_ITEM(183, 185, 185, fontpage_183_185_185), // '容' -- '容' - FONTDATA_ITEM(184, 141, 141, fontpage_184_141_141), // '對' -- '對' - FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' - FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' - FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' - FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' - FONTDATA_ITEM(187, 242, 242, fontpage_187_242_242), // '已' -- '已' - FONTDATA_ITEM(188, 243, 243, fontpage_188_243_243), // '平' -- '平' - FONTDATA_ITEM(189, 138, 138, fontpage_189_138_138), // '床' -- '床' - FONTDATA_ITEM(189, 166, 166, fontpage_189_166_166), // '度' -- '度' - FONTDATA_ITEM(189, 226, 226, fontpage_189_226_226), // '廢' -- '廢' - FONTDATA_ITEM(189, 250, 250, fontpage_189_250_250), // '建' -- '建' - FONTDATA_ITEM(190, 149, 149, fontpage_190_149_149), // '引' -- '引' - FONTDATA_ITEM(191, 133, 133, fontpage_191_133_133), // '待' -- '待' - FONTDATA_ITEM(191, 140, 140, fontpage_191_140_140), // '後' -- '後' - FONTDATA_ITEM(191, 145, 145, fontpage_191_145_145), // '徑' -- '徑' - FONTDATA_ITEM(191, 158, 158, fontpage_191_158_158), // '從' -- '從' - FONTDATA_ITEM(191, 169, 169, fontpage_191_169_169), // '復' -- '復' - FONTDATA_ITEM(191, 174, 174, fontpage_191_174_174), // '微' -- '微' - FONTDATA_ITEM(191, 195, 195, fontpage_191_195_195), // '心' -- '心' - FONTDATA_ITEM(192, 167, 167, fontpage_192_167_167), // '性' -- '性' - FONTDATA_ITEM(192, 226, 226, fontpage_192_226_226), // '恢' -- '恢' - FONTDATA_ITEM(192, 239, 239, fontpage_192_239_239), // '息' -- '息' - FONTDATA_ITEM(195, 182, 182, fontpage_195_182_182), // '憶' -- '憶' - FONTDATA_ITEM(195, 201, 201, fontpage_195_201_201), // '應' -- '應' - FONTDATA_ITEM(196, 144, 144, fontpage_196_144_144), // '成' -- '成' - FONTDATA_ITEM(196, 182, 182, fontpage_196_182_182), // '戶' -- '戶' - FONTDATA_ITEM(196, 192, 192, fontpage_196_192_192), // '所' -- '所' - FONTDATA_ITEM(196, 199, 199, fontpage_196_199_199), // '扇' -- '扇' - FONTDATA_ITEM(196, 203, 203, fontpage_196_203_203), // '手' -- '手' - FONTDATA_ITEM(196, 211, 211, fontpage_196_211_211), // '打' -- '打' - FONTDATA_ITEM(196, 249, 249, fontpage_196_249_249), // '批' -- '批' - FONTDATA_ITEM(197, 150, 150, fontpage_197_150_150), // '抖' -- '抖' - FONTDATA_ITEM(197, 189, 189, fontpage_197_189_189), // '抽' -- '抽' - FONTDATA_ITEM(197, 212, 212, fontpage_197_212_212), // '拔' -- '拔' - FONTDATA_ITEM(198, 137, 137, fontpage_198_137_137), // '按' -- '按' - FONTDATA_ITEM(199, 137, 137, fontpage_199_137_137), // '掉' -- '掉' - FONTDATA_ITEM(199, 162, 162, fontpage_199_162_162), // '探' -- '探' - FONTDATA_ITEM(199, 165, 165, fontpage_199_165_165), // '接' -- '接' - FONTDATA_ITEM(199, 167, 167, fontpage_199_167_167), // '控' -- '控' - FONTDATA_ITEM(199, 208, 208, fontpage_199_208_208), // '提' -- '提' - FONTDATA_ITEM(199, 210, 210, fontpage_199_210_210), // '插' -- '插' - FONTDATA_ITEM(199, 219, 219, fontpage_199_219_219), // '換' -- '換' - FONTDATA_ITEM(201, 199, 199, fontpage_201_199_199), // '擇' -- '擇' - FONTDATA_ITEM(201, 202, 203, fontpage_201_202_203), // '擊' -- '擋' - FONTDATA_ITEM(201, 224, 224, fontpage_201_224_224), // '擠' -- '擠' - FONTDATA_ITEM(202, 182, 182, fontpage_202_182_182), // '收' -- '收' - FONTDATA_ITEM(202, 190, 190, fontpage_202_190_190), // '放' -- '放' - FONTDATA_ITEM(202, 215, 215, fontpage_202_215_215), // '敗' -- '敗' - FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // '整' -- '整' - FONTDATA_ITEM(202, 248, 248, fontpage_202_248_248), // '數' -- '數' - FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // '料' -- '料' - FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // '斜' -- '斜' - FONTDATA_ITEM(203, 176, 176, fontpage_203_176_176), // '新' -- '新' - FONTDATA_ITEM(203, 183, 183, fontpage_203_183_183), // '斷' -- '斷' - FONTDATA_ITEM(203, 188, 188, fontpage_203_188_188), // '於' -- '於' - FONTDATA_ITEM(204, 135, 135, fontpage_204_135_135), // '昇' -- '昇' - FONTDATA_ITEM(204, 142, 142, fontpage_204_142_142), // '明' -- '明' - FONTDATA_ITEM(204, 175, 175, fontpage_204_175_175), // '是' -- '是' - FONTDATA_ITEM(204, 194, 194, fontpage_204_194_194), // '時' -- '時' - FONTDATA_ITEM(205, 171, 171, fontpage_205_171_171), // '暫' -- '暫' - FONTDATA_ITEM(205, 244, 244, fontpage_205_244_244), // '更' -- '更' - FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' - FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' - FONTDATA_ITEM(206, 255, 255, fontpage_206_255_255), // '板' -- '板' - FONTDATA_ITEM(207, 241, 241, fontpage_207_241_241), // '柱' -- '柱' - FONTDATA_ITEM(208, 161, 161, fontpage_208_161_161), // '校' -- '校' - FONTDATA_ITEM(208, 188, 188, fontpage_208_188_188), // '格' -- '格' - FONTDATA_ITEM(209, 157, 157, fontpage_209_157_157), // '條' -- '條' - FONTDATA_ITEM(209, 196, 196, fontpage_209_196_196), // '棄' -- '棄' - FONTDATA_ITEM(211, 253, 253, fontpage_211_253_253), // '槽' -- '槽' - FONTDATA_ITEM(212, 217, 217, fontpage_212_217_217), // '橙' -- '橙' - FONTDATA_ITEM(212, 223, 223, fontpage_212_223_223), // '機' -- '機' - FONTDATA_ITEM(213, 162, 162, fontpage_213_162_162), // '檢' -- '檢' - FONTDATA_ITEM(214, 226, 227, fontpage_214_226_227), // '止' -- '正' - FONTDATA_ITEM(214, 229, 229, fontpage_214_229_229), // '步' -- '步' - FONTDATA_ITEM(214, 248, 248, fontpage_214_248_248), // '歸' -- '歸' - FONTDATA_ITEM(215, 188, 188, fontpage_215_188_188), // '殼' -- '殼' - FONTDATA_ITEM(215, 212, 212, fontpage_215_212_212), // '比' -- '比' - FONTDATA_ITEM(217, 146, 146, fontpage_217_146_146), // '沒' -- '沒' - FONTDATA_ITEM(219, 136, 136, fontpage_219_136_136), // '消' -- '消' - FONTDATA_ITEM(219, 225, 225, fontpage_219_225_225), // '淡' -- '淡' - FONTDATA_ITEM(220, 133, 133, fontpage_220_133_133), // '清' -- '清' - FONTDATA_ITEM(220, 172, 172, fontpage_220_172_172), // '測' -- '測' - FONTDATA_ITEM(221, 144, 144, fontpage_221_144_144), // '源' -- '源' - FONTDATA_ITEM(221, 150, 150, fontpage_221_150_150), // '準' -- '準' - FONTDATA_ITEM(221, 171, 171, fontpage_221_171_171), // '溫' -- '溫' - FONTDATA_ITEM(223, 192, 192, fontpage_223_192_192), // '激' -- '激' - FONTDATA_ITEM(226, 161, 161, fontpage_226_161_161), // '無' -- '無' - FONTDATA_ITEM(227, 177, 177, fontpage_227_177_177), // '熱' -- '熱' - FONTDATA_ITEM(227, 200, 200, fontpage_227_200_200), // '燈' -- '燈' - FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' - FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' - FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' - FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' - FONTDATA_ITEM(234, 204, 204, fontpage_234_204_204), // '界' -- '界' - FONTDATA_ITEM(236, 253, 253, fontpage_236_253_253), // '白' -- '白' - FONTDATA_ITEM(237, 132, 132, fontpage_237_132_132), // '的' -- '的' - FONTDATA_ITEM(237, 227, 227, fontpage_237_227_227), // '監' -- '監' - FONTDATA_ITEM(237, 244, 244, fontpage_237_244_244), // '直' -- '直' - FONTDATA_ITEM(238, 160, 160, fontpage_238_160_160), // '眠' -- '眠' - FONTDATA_ITEM(240, 141, 141, fontpage_240_141_141), // '砍' -- '砍' - FONTDATA_ITEM(241, 186, 186, fontpage_241_186_186), // '確' -- '確' - FONTDATA_ITEM(243, 251, 251, fontpage_243_251_251), // '移' -- '移' - FONTDATA_ITEM(244, 205, 205, fontpage_244_205_205), // '積' -- '積' - FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端' - FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等' - FONTDATA_ITEM(247, 161, 161, fontpage_247_161_161), // '管' -- '管' - FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱' - FONTDATA_ITEM(249, 251, 251, fontpage_249_251_251), // '系' -- '系' - FONTDATA_ITEM(250, 133, 133, fontpage_250_133_133), // '紅' -- '紅' - FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索' - FONTDATA_ITEM(250, 171, 171, fontpage_250_171_171), // '紫' -- '紫' - FONTDATA_ITEM(250, 176, 176, fontpage_250_176_176), // '細' -- '細' - FONTDATA_ITEM(250, 194, 194, fontpage_250_194_194), // '終' -- '終' - FONTDATA_ITEM(250, 241, 242, fontpage_250_241_242), // '統' -- '絲' - FONTDATA_ITEM(251, 160, 160, fontpage_251_160_160), // '綠' -- '綠' - FONTDATA_ITEM(251, 178, 178, fontpage_251_178_178), // '網' -- '網' - FONTDATA_ITEM(251, 210, 210, fontpage_251_210_210), // '緒' -- '緒' - FONTDATA_ITEM(251, 218, 218, fontpage_251_218_218), // '線' -- '線' - FONTDATA_ITEM(251, 232, 232, fontpage_251_232_232), // '編' -- '編' - FONTDATA_ITEM(252, 174, 174, fontpage_252_174_174), // '縮' -- '縮' - FONTDATA_ITEM(252, 189, 189, fontpage_252_189_189), // '總' -- '總' - FONTDATA_ITEM(252, 252, 252, fontpage_252_252_252), // '繼' -- '繼' - FONTDATA_ITEM(253, 140, 140, fontpage_253_140_140), // '續' -- '續' - FONTDATA_ITEM(253, 162, 162, fontpage_253_162_162), // '红' -- '红' - FONTDATA_ITEM(254, 238, 238, fontpage_254_238_238), // '置' -- '置' - FONTDATA_ITEM(254, 242, 242, fontpage_254_242_242), // '署' -- '署' - FONTDATA_ITEM(256, 240, 240, fontpage_256_240_240), // '聰' -- '聰' - FONTDATA_ITEM(259, 234, 234, fontpage_259_234_234), // '自' -- '自' - FONTDATA_ITEM(267, 205, 205, fontpage_267_205_205), // '藍' -- '藍' - FONTDATA_ITEM(272, 204, 204, fontpage_272_204_204), // '行' -- '行' - FONTDATA_ITEM(272, 232, 232, fontpage_272_232_232), // '表' -- '表' - FONTDATA_ITEM(273, 171, 171, fontpage_273_171_171), // '被' -- '被' - FONTDATA_ITEM(273, 197, 197, fontpage_273_197_197), // '装' -- '装' - FONTDATA_ITEM(273, 221, 221, fontpage_273_221_221), // '裝' -- '裝' - FONTDATA_ITEM(274, 135, 135, fontpage_274_135_135), // '複' -- '複' - FONTDATA_ITEM(275, 210, 210, fontpage_275_210_210), // '角' -- '角' - FONTDATA_ITEM(276, 136, 136, fontpage_276_136_136), // '計' -- '計' - FONTDATA_ITEM(276, 138, 138, fontpage_276_138_138), // '訊' -- '訊' - FONTDATA_ITEM(276, 152, 152, fontpage_276_152_152), // '記' -- '記' - FONTDATA_ITEM(276, 173, 173, fontpage_276_173_173), // '設' -- '設' - FONTDATA_ITEM(276, 230, 230, fontpage_276_230_230), // '試' -- '試' - FONTDATA_ITEM(277, 141, 141, fontpage_277_141_141), // '認' -- '認' - FONTDATA_ITEM(277, 164, 164, fontpage_277_164_164), // '誤' -- '誤' - FONTDATA_ITEM(277, 191, 191, fontpage_277_191_191), // '調' -- '調' - FONTDATA_ITEM(277, 203, 203, fontpage_277_203_203), // '請' -- '請' - FONTDATA_ITEM(278, 240, 240, fontpage_278_240_240), // '議' -- '議' - FONTDATA_ITEM(279, 128, 128, fontpage_279_128_128), // '讀' -- '讀' - FONTDATA_ITEM(279, 138, 138, fontpage_279_138_138), // '變' -- '變' - FONTDATA_ITEM(281, 199, 199, fontpage_281_199_199), // '資' -- '資' - FONTDATA_ITEM(283, 221, 221, fontpage_283_221_221), // '距' -- '距' - FONTDATA_ITEM(285, 202, 202, fontpage_285_202_202), // '車' -- '車' - FONTDATA_ITEM(285, 223, 223, fontpage_285_223_223), // '軟' -- '軟' - FONTDATA_ITEM(285, 248, 248, fontpage_285_248_248), // '軸' -- '軸' - FONTDATA_ITEM(286, 137, 137, fontpage_286_137_137), // '載' -- '載' - FONTDATA_ITEM(286, 175, 175, fontpage_286_175_175), // '輯' -- '輯' - FONTDATA_ITEM(286, 184, 184, fontpage_286_184_184), // '輸' -- '輸' - FONTDATA_ITEM(286, 201, 201, fontpage_286_201_201), // '轉' -- '轉' - FONTDATA_ITEM(287, 209, 209, fontpage_287_209_209), // '近' -- '近' - FONTDATA_ITEM(287, 212, 212, fontpage_287_212_212), // '返' -- '返' - FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' - FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' - FONTDATA_ITEM(288, 163, 163, fontpage_288_163_163), // '連' -- '連' - FONTDATA_ITEM(288, 178, 178, fontpage_288_178_178), // '進' -- '進' - FONTDATA_ITEM(288, 203, 203, fontpage_288_203_203), // '運' -- '運' - FONTDATA_ITEM(288, 212, 212, fontpage_288_212_212), // '達' -- '達' - FONTDATA_ITEM(288, 248, 248, fontpage_288_248_248), // '選' -- '選' - FONTDATA_ITEM(289, 132, 132, fontpage_289_132_132), // '還' -- '還' - FONTDATA_ITEM(289, 138, 138, fontpage_289_138_138), // '邊' -- '邊' - FONTDATA_ITEM(289, 232, 232, fontpage_289_232_232), // '部' -- '部' - FONTDATA_ITEM(291, 203, 203, fontpage_291_203_203), // '釋' -- '釋' - FONTDATA_ITEM(291, 205, 205, fontpage_291_205_205), // '重' -- '重' - FONTDATA_ITEM(291, 207, 207, fontpage_291_207_207), // '量' -- '量' - FONTDATA_ITEM(291, 221, 221, fontpage_291_221_221), // '針' -- '針' - FONTDATA_ITEM(292, 149, 149, fontpage_292_149_149), // '鈕' -- '鈕' - FONTDATA_ITEM(294, 175, 175, fontpage_294_175_175), // '錯' -- '錯' - FONTDATA_ITEM(294, 245, 245, fontpage_294_245_245), // '鍵' -- '鍵' - FONTDATA_ITEM(298, 247, 247, fontpage_298_247_247), // '長' -- '長' - FONTDATA_ITEM(299, 137, 137, fontpage_299_137_137), // '閉' -- '閉' - FONTDATA_ITEM(299, 139, 139, fontpage_299_139_139), // '開' -- '開' - FONTDATA_ITEM(299, 147, 147, fontpage_299_147_147), // '間' -- '間' - FONTDATA_ITEM(299, 220, 220, fontpage_299_220_220), // '關' -- '關' - FONTDATA_ITEM(300, 205, 205, fontpage_300_205_205), // '降' -- '降' - FONTDATA_ITEM(300, 228, 228, fontpage_300_228_228), // '除' -- '除' - FONTDATA_ITEM(301, 142, 142, fontpage_301_142_142), // '階' -- '階' - FONTDATA_ITEM(301, 217, 217, fontpage_301_217_217), // '雙' -- '雙' - FONTDATA_ITEM(301, 226, 226, fontpage_301_226_226), // '離' -- '離' - FONTDATA_ITEM(301, 251, 251, fontpage_301_251_251), // '電' -- '電' - FONTDATA_ITEM(302, 210, 210, fontpage_302_210_210), // '青' -- '青' - FONTDATA_ITEM(302, 222, 222, fontpage_302_222_222), // '非' -- '非' - FONTDATA_ITEM(302, 226, 226, fontpage_302_226_226), // '面' -- '面' - FONTDATA_ITEM(304, 133, 133, fontpage_304_133_133), // '項' -- '項' - FONTDATA_ITEM(304, 144, 144, fontpage_304_144_144), // '預' -- '預' - FONTDATA_ITEM(304, 205, 205, fontpage_304_205_205), // '額' -- '額' - FONTDATA_ITEM(304, 222, 222, fontpage_304_222_222), // '類' -- '類' - FONTDATA_ITEM(305, 168, 168, fontpage_305_168_168), // '風' -- '風' - FONTDATA_ITEM(305, 253, 253, fontpage_305_253_253), // '飽' -- '飽' - FONTDATA_ITEM(306, 152, 152, fontpage_306_152_152), // '餘' -- '餘' - FONTDATA_ITEM(307, 172, 172, fontpage_307_172_172), // '馬' -- '馬' - FONTDATA_ITEM(308, 197, 197, fontpage_308_197_197), // '驅' -- '驅' - FONTDATA_ITEM(309, 212, 212, fontpage_309_212_212), // '體' -- '體' - FONTDATA_ITEM(309, 216, 216, fontpage_309_216_216), // '高' -- '高' - FONTDATA_ITEM(317, 195, 195, fontpage_317_195_195), // '黃' -- '黃' - FONTDATA_ITEM(317, 222, 222, fontpage_317_222_222), // '點' -- '點' - FONTDATA_ITEM(318, 202, 202, fontpage_318_202_202), // '齊' -- '齊' - FONTDATA_ITEM(510, 154, 154, fontpage_510_154_154), // ':' -- ':' +static const uxg_fontinfo_t g_fontinfo_zh_TW[] PROGMEM = { + FONTDATA_ITEM(69, 191, 191, fontpage_69_191_191), // '⊿' -- '⊿' + FONTDATA_ITEM(156, 128, 128, fontpage_156_128_128), // '一' -- '一' + FONTDATA_ITEM(156, 137, 139, fontpage_156_137_139), // '三' -- '下' + FONTDATA_ITEM(156, 141, 141, fontpage_156_141_141), // '不' -- '不' + FONTDATA_ITEM(156, 166, 166, fontpage_156_166_166), // '並' -- '並' + FONTDATA_ITEM(156, 173, 173, fontpage_156_173_173), // '中' -- '中' + FONTDATA_ITEM(156, 187, 187, fontpage_156_187_187), // '主' -- '主' + FONTDATA_ITEM(156, 203, 203, fontpage_156_203_203), // '之' -- '之' + FONTDATA_ITEM(157, 164, 164, fontpage_157_164_164), // '交' -- '交' + FONTDATA_ITEM(157, 174, 174, fontpage_157_174_174), // '亮' -- '亮' + FONTDATA_ITEM(157, 228, 228, fontpage_157_228_228), // '令' -- '令' + FONTDATA_ITEM(157, 246, 246, fontpage_157_246_246), // '件' -- '件' + FONTDATA_ITEM(157, 253, 253, fontpage_157_253_253), // '份' -- '份' + FONTDATA_ITEM(158, 145, 145, fontpage_158_145_145), // '休' -- '休' + FONTDATA_ITEM(158, 205, 206, fontpage_158_205_206), // '位' -- '低' + FONTDATA_ITEM(158, 220, 220, fontpage_158_220_220), // '作' -- '作' + FONTDATA_ITEM(159, 155, 155, fontpage_159_155_155), // '供' -- '供' + FONTDATA_ITEM(159, 221, 221, fontpage_159_221_221), // '保' -- '保' + FONTDATA_ITEM(159, 225, 225, fontpage_159_225_225), // '信' -- '信' + FONTDATA_ITEM(160, 139, 139, fontpage_160_139_139), // '個' -- '個' + FONTDATA_ITEM(160, 188, 188, fontpage_160_188_188), // '值' -- '值' + FONTDATA_ITEM(160, 207, 207, fontpage_160_207_207), // '偏' -- '偏' + FONTDATA_ITEM(160, 220, 220, fontpage_160_220_220), // '停' -- '停' + FONTDATA_ITEM(160, 245, 245, fontpage_160_245_245), // '偵' -- '偵' + FONTDATA_ITEM(161, 153, 153, fontpage_161_153_153), // '備' -- '備' + FONTDATA_ITEM(161, 179, 179, fontpage_161_179_179), // '傳' -- '傳' + FONTDATA_ITEM(161, 190, 190, fontpage_161_190_190), // '傾' -- '傾' + FONTDATA_ITEM(162, 178, 178, fontpage_162_178_178), // '儲' -- '儲' + FONTDATA_ITEM(162, 197, 197, fontpage_162_197_197), // '充' -- '充' + FONTDATA_ITEM(162, 200, 201, fontpage_162_200_201), // '先' -- '光' + FONTDATA_ITEM(162, 229, 229, fontpage_162_229_229), // '入' -- '入' + FONTDATA_ITEM(162, 232, 232, fontpage_162_232_232), // '全' -- '全' + FONTDATA_ITEM(162, 241, 241, fontpage_162_241_241), // '共' -- '共' + FONTDATA_ITEM(162, 247, 247, fontpage_162_247_247), // '具' -- '具' + FONTDATA_ITEM(163, 151, 151, fontpage_163_151_151), // '冗' -- '冗' + FONTDATA_ITEM(163, 183, 183, fontpage_163_183_183), // '冷' -- '冷' + FONTDATA_ITEM(163, 198, 198, fontpage_163_198_198), // '准' -- '准' + FONTDATA_ITEM(163, 250, 250, fontpage_163_250_250), // '出' -- '出' + FONTDATA_ITEM(164, 134, 134, fontpage_164_134_134), // '分' -- '分' + FONTDATA_ITEM(164, 151, 151, fontpage_164_151_151), // '列' -- '列' + FONTDATA_ITEM(164, 157, 157, fontpage_164_157_157), // '初' -- '初' + FONTDATA_ITEM(164, 176, 176, fontpage_164_176_176), // '到' -- '到' + FONTDATA_ITEM(164, 182, 183, fontpage_164_182_183), // '制' -- '刷' + FONTDATA_ITEM(164, 245, 245, fontpage_164_245_245), // '創' -- '創' + FONTDATA_ITEM(165, 155, 155, fontpage_165_155_155), // '力' -- '力' + FONTDATA_ITEM(165, 160, 160, fontpage_165_160_160), // '加' -- '加' + FONTDATA_ITEM(165, 213, 213, fontpage_165_213_213), // '動' -- '動' + FONTDATA_ITEM(166, 150, 150, fontpage_166_150_150), // '化' -- '化' + FONTDATA_ITEM(166, 202, 202, fontpage_166_202_202), // '半' -- '半' + FONTDATA_ITEM(166, 212, 212, fontpage_166_212_212), // '協' -- '協' + FONTDATA_ITEM(166, 225, 225, fontpage_166_225_225), // '卡' -- '卡' + FONTDATA_ITEM(166, 240, 240, fontpage_166_240_240), // '印' -- '印' + FONTDATA_ITEM(166, 248, 248, fontpage_166_248_248), // '卸' -- '卸' + FONTDATA_ITEM(166, 251, 251, fontpage_166_251_251), // '卻' -- '卻' + FONTDATA_ITEM(167, 159, 159, fontpage_167_159_159), // '原' -- '原' + FONTDATA_ITEM(167, 205, 205, fontpage_167_205_205), // '反' -- '反' + FONTDATA_ITEM(167, 214, 214, fontpage_167_214_214), // '取' -- '取' + FONTDATA_ITEM(167, 240, 240, fontpage_167_240_240), // '台' -- '台' + FONTDATA_ITEM(168, 136, 136, fontpage_168_136_136), // '合' -- '合' + FONTDATA_ITEM(168, 166, 166, fontpage_168_166_166), // '否' -- '否' + FONTDATA_ITEM(168, 202, 202, fontpage_168_202_202), // '告' -- '告' + FONTDATA_ITEM(168, 253, 253, fontpage_168_253_253), // '命' -- '命' + FONTDATA_ITEM(169, 140, 140, fontpage_169_140_140), // '和' -- '和' + FONTDATA_ITEM(170, 223, 223, fontpage_170_223_223), // '啟' -- '啟' + FONTDATA_ITEM(171, 174, 174, fontpage_171_174_174), // '單' -- '單' + FONTDATA_ITEM(172, 180, 180, fontpage_172_180_180), // '嘴' -- '嘴' + FONTDATA_ITEM(172, 232, 232, fontpage_172_232_232), // '器' -- '器' + FONTDATA_ITEM(172, 244, 244, fontpage_172_244_244), // '噴' -- '噴' + FONTDATA_ITEM(173, 222, 222, fontpage_173_222_222), // '回' -- '回' + FONTDATA_ITEM(173, 224, 224, fontpage_173_224_224), // '因' -- '因' + FONTDATA_ITEM(173, 250, 250, fontpage_173_250_250), // '固' -- '固' + FONTDATA_ITEM(174, 150, 150, fontpage_174_150_150), // '圖' -- '圖' + FONTDATA_ITEM(174, 168, 168, fontpage_174_168_168), // '在' -- '在' + FONTDATA_ITEM(175, 139, 139, fontpage_175_139_139), // '型' -- '型' + FONTDATA_ITEM(175, 247, 247, fontpage_175_247_247), // '執' -- '執' + FONTDATA_ITEM(176, 202, 202, fontpage_176_202_202), // '塊' -- '塊' + FONTDATA_ITEM(176, 235, 235, fontpage_176_235_235), // '填' -- '填' + FONTDATA_ITEM(177, 138, 138, fontpage_177_138_138), // '墊' -- '墊' + FONTDATA_ITEM(178, 150, 150, fontpage_178_150_150), // '外' -- '外' + FONTDATA_ITEM(178, 154, 154, fontpage_178_154_154), // '多' -- '多' + FONTDATA_ITEM(178, 160, 160, fontpage_178_160_160), // '夠' -- '夠' + FONTDATA_ITEM(178, 167, 167, fontpage_178_167_167), // '大' -- '大' + FONTDATA_ITEM(178, 169, 170, fontpage_178_169_170), // '天' -- '太' + FONTDATA_ITEM(178, 177, 177, fontpage_178_177_177), // '失' -- '失' + FONTDATA_ITEM(179, 203, 203, fontpage_179_203_203), // '始' -- '始' + FONTDATA_ITEM(181, 146, 146, fontpage_181_146_146), // '媒' -- '媒' + FONTDATA_ITEM(182, 208, 208, fontpage_182_208_208), // '子' -- '子' + FONTDATA_ITEM(182, 216, 216, fontpage_182_216_216), // '存' -- '存' + FONTDATA_ITEM(183, 137, 137, fontpage_183_137_137), // '安' -- '安' + FONTDATA_ITEM(183, 140, 140, fontpage_183_140_140), // '完' -- '完' + FONTDATA_ITEM(183, 154, 154, fontpage_183_154_154), // '定' -- '定' + FONTDATA_ITEM(183, 162, 162, fontpage_183_162_162), // '客' -- '客' + FONTDATA_ITEM(183, 185, 185, fontpage_183_185_185), // '容' -- '容' + FONTDATA_ITEM(184, 141, 141, fontpage_184_141_141), // '對' -- '對' + FONTDATA_ITEM(184, 143, 143, fontpage_184_143_143), // '小' -- '小' + FONTDATA_ITEM(184, 177, 177, fontpage_184_177_177), // '就' -- '就' + FONTDATA_ITEM(187, 229, 229, fontpage_187_229_229), // '工' -- '工' + FONTDATA_ITEM(187, 238, 238, fontpage_187_238_238), // '差' -- '差' + FONTDATA_ITEM(187, 242, 242, fontpage_187_242_242), // '已' -- '已' + FONTDATA_ITEM(188, 243, 243, fontpage_188_243_243), // '平' -- '平' + FONTDATA_ITEM(189, 138, 138, fontpage_189_138_138), // '床' -- '床' + FONTDATA_ITEM(189, 166, 166, fontpage_189_166_166), // '度' -- '度' + FONTDATA_ITEM(189, 226, 226, fontpage_189_226_226), // '廢' -- '廢' + FONTDATA_ITEM(189, 250, 250, fontpage_189_250_250), // '建' -- '建' + FONTDATA_ITEM(190, 149, 149, fontpage_190_149_149), // '引' -- '引' + FONTDATA_ITEM(191, 133, 133, fontpage_191_133_133), // '待' -- '待' + FONTDATA_ITEM(191, 140, 140, fontpage_191_140_140), // '後' -- '後' + FONTDATA_ITEM(191, 145, 145, fontpage_191_145_145), // '徑' -- '徑' + FONTDATA_ITEM(191, 158, 158, fontpage_191_158_158), // '從' -- '從' + FONTDATA_ITEM(191, 169, 169, fontpage_191_169_169), // '復' -- '復' + FONTDATA_ITEM(191, 174, 174, fontpage_191_174_174), // '微' -- '微' + FONTDATA_ITEM(191, 195, 195, fontpage_191_195_195), // '心' -- '心' + FONTDATA_ITEM(192, 167, 167, fontpage_192_167_167), // '性' -- '性' + FONTDATA_ITEM(192, 226, 226, fontpage_192_226_226), // '恢' -- '恢' + FONTDATA_ITEM(192, 239, 239, fontpage_192_239_239), // '息' -- '息' + FONTDATA_ITEM(195, 182, 182, fontpage_195_182_182), // '憶' -- '憶' + FONTDATA_ITEM(195, 201, 201, fontpage_195_201_201), // '應' -- '應' + FONTDATA_ITEM(196, 144, 144, fontpage_196_144_144), // '成' -- '成' + FONTDATA_ITEM(196, 182, 182, fontpage_196_182_182), // '戶' -- '戶' + FONTDATA_ITEM(196, 192, 192, fontpage_196_192_192), // '所' -- '所' + FONTDATA_ITEM(196, 199, 199, fontpage_196_199_199), // '扇' -- '扇' + FONTDATA_ITEM(196, 203, 203, fontpage_196_203_203), // '手' -- '手' + FONTDATA_ITEM(196, 211, 211, fontpage_196_211_211), // '打' -- '打' + FONTDATA_ITEM(196, 249, 249, fontpage_196_249_249), // '批' -- '批' + FONTDATA_ITEM(197, 150, 150, fontpage_197_150_150), // '抖' -- '抖' + FONTDATA_ITEM(197, 189, 189, fontpage_197_189_189), // '抽' -- '抽' + FONTDATA_ITEM(197, 212, 212, fontpage_197_212_212), // '拔' -- '拔' + FONTDATA_ITEM(198, 137, 137, fontpage_198_137_137), // '按' -- '按' + FONTDATA_ITEM(199, 137, 137, fontpage_199_137_137), // '掉' -- '掉' + FONTDATA_ITEM(199, 162, 162, fontpage_199_162_162), // '探' -- '探' + FONTDATA_ITEM(199, 165, 165, fontpage_199_165_165), // '接' -- '接' + FONTDATA_ITEM(199, 167, 167, fontpage_199_167_167), // '控' -- '控' + FONTDATA_ITEM(199, 208, 208, fontpage_199_208_208), // '提' -- '提' + FONTDATA_ITEM(199, 210, 210, fontpage_199_210_210), // '插' -- '插' + FONTDATA_ITEM(199, 219, 219, fontpage_199_219_219), // '換' -- '換' + FONTDATA_ITEM(201, 199, 199, fontpage_201_199_199), // '擇' -- '擇' + FONTDATA_ITEM(201, 202, 203, fontpage_201_202_203), // '擊' -- '擋' + FONTDATA_ITEM(201, 224, 224, fontpage_201_224_224), // '擠' -- '擠' + FONTDATA_ITEM(202, 182, 182, fontpage_202_182_182), // '收' -- '收' + FONTDATA_ITEM(202, 190, 190, fontpage_202_190_190), // '放' -- '放' + FONTDATA_ITEM(202, 215, 215, fontpage_202_215_215), // '敗' -- '敗' + FONTDATA_ITEM(202, 244, 244, fontpage_202_244_244), // '整' -- '整' + FONTDATA_ITEM(202, 248, 248, fontpage_202_248_248), // '數' -- '數' + FONTDATA_ITEM(203, 153, 153, fontpage_203_153_153), // '料' -- '料' + FONTDATA_ITEM(203, 156, 156, fontpage_203_156_156), // '斜' -- '斜' + FONTDATA_ITEM(203, 176, 176, fontpage_203_176_176), // '新' -- '新' + FONTDATA_ITEM(203, 183, 183, fontpage_203_183_183), // '斷' -- '斷' + FONTDATA_ITEM(203, 188, 188, fontpage_203_188_188), // '於' -- '於' + FONTDATA_ITEM(204, 135, 135, fontpage_204_135_135), // '昇' -- '昇' + FONTDATA_ITEM(204, 142, 142, fontpage_204_142_142), // '明' -- '明' + FONTDATA_ITEM(204, 175, 175, fontpage_204_175_175), // '是' -- '是' + FONTDATA_ITEM(204, 194, 194, fontpage_204_194_194), // '時' -- '時' + FONTDATA_ITEM(205, 171, 171, fontpage_205_171_171), // '暫' -- '暫' + FONTDATA_ITEM(205, 244, 244, fontpage_205_244_244), // '更' -- '更' + FONTDATA_ITEM(206, 128, 128, fontpage_206_128_128), // '最' -- '最' + FONTDATA_ITEM(206, 137, 137, fontpage_206_137_137), // '有' -- '有' + FONTDATA_ITEM(206, 255, 255, fontpage_206_255_255), // '板' -- '板' + FONTDATA_ITEM(207, 241, 241, fontpage_207_241_241), // '柱' -- '柱' + FONTDATA_ITEM(208, 161, 161, fontpage_208_161_161), // '校' -- '校' + FONTDATA_ITEM(208, 188, 188, fontpage_208_188_188), // '格' -- '格' + FONTDATA_ITEM(209, 157, 157, fontpage_209_157_157), // '條' -- '條' + FONTDATA_ITEM(209, 196, 196, fontpage_209_196_196), // '棄' -- '棄' + FONTDATA_ITEM(211, 253, 253, fontpage_211_253_253), // '槽' -- '槽' + FONTDATA_ITEM(212, 217, 217, fontpage_212_217_217), // '橙' -- '橙' + FONTDATA_ITEM(212, 223, 223, fontpage_212_223_223), // '機' -- '機' + FONTDATA_ITEM(213, 162, 162, fontpage_213_162_162), // '檢' -- '檢' + FONTDATA_ITEM(214, 226, 227, fontpage_214_226_227), // '止' -- '正' + FONTDATA_ITEM(214, 229, 229, fontpage_214_229_229), // '步' -- '步' + FONTDATA_ITEM(214, 248, 248, fontpage_214_248_248), // '歸' -- '歸' + FONTDATA_ITEM(215, 188, 188, fontpage_215_188_188), // '殼' -- '殼' + FONTDATA_ITEM(215, 212, 212, fontpage_215_212_212), // '比' -- '比' + FONTDATA_ITEM(217, 146, 146, fontpage_217_146_146), // '沒' -- '沒' + FONTDATA_ITEM(219, 136, 136, fontpage_219_136_136), // '消' -- '消' + FONTDATA_ITEM(219, 225, 225, fontpage_219_225_225), // '淡' -- '淡' + FONTDATA_ITEM(220, 133, 133, fontpage_220_133_133), // '清' -- '清' + FONTDATA_ITEM(220, 172, 172, fontpage_220_172_172), // '測' -- '測' + FONTDATA_ITEM(221, 144, 144, fontpage_221_144_144), // '源' -- '源' + FONTDATA_ITEM(221, 150, 150, fontpage_221_150_150), // '準' -- '準' + FONTDATA_ITEM(221, 171, 171, fontpage_221_171_171), // '溫' -- '溫' + FONTDATA_ITEM(223, 192, 192, fontpage_223_192_192), // '激' -- '激' + FONTDATA_ITEM(226, 161, 161, fontpage_226_161_161), // '無' -- '無' + FONTDATA_ITEM(227, 177, 177, fontpage_227_177_177), // '熱' -- '熱' + FONTDATA_ITEM(227, 200, 200, fontpage_227_200_200), // '燈' -- '燈' + FONTDATA_ITEM(228, 199, 199, fontpage_228_199_199), // '片' -- '片' + FONTDATA_ITEM(228, 233, 233, fontpage_228_233_233), // '物' -- '物' + FONTDATA_ITEM(231, 135, 135, fontpage_231_135_135), // '率' -- '率' + FONTDATA_ITEM(234, 168, 168, fontpage_234_168_168), // '用' -- '用' + FONTDATA_ITEM(234, 204, 204, fontpage_234_204_204), // '界' -- '界' + FONTDATA_ITEM(236, 253, 253, fontpage_236_253_253), // '白' -- '白' + FONTDATA_ITEM(237, 132, 132, fontpage_237_132_132), // '的' -- '的' + FONTDATA_ITEM(237, 227, 227, fontpage_237_227_227), // '監' -- '監' + FONTDATA_ITEM(237, 244, 244, fontpage_237_244_244), // '直' -- '直' + FONTDATA_ITEM(238, 160, 160, fontpage_238_160_160), // '眠' -- '眠' + FONTDATA_ITEM(240, 141, 141, fontpage_240_141_141), // '砍' -- '砍' + FONTDATA_ITEM(241, 186, 186, fontpage_241_186_186), // '確' -- '確' + FONTDATA_ITEM(243, 251, 251, fontpage_243_251_251), // '移' -- '移' + FONTDATA_ITEM(244, 205, 205, fontpage_244_205_205), // '積' -- '積' + FONTDATA_ITEM(245, 239, 239, fontpage_245_239_239), // '端' -- '端' + FONTDATA_ITEM(246, 201, 201, fontpage_246_201_201), // '等' -- '等' + FONTDATA_ITEM(247, 161, 161, fontpage_247_161_161), // '管' -- '管' + FONTDATA_ITEM(247, 177, 177, fontpage_247_177_177), // '箱' -- '箱' + FONTDATA_ITEM(249, 251, 251, fontpage_249_251_251), // '系' -- '系' + FONTDATA_ITEM(250, 133, 133, fontpage_250_133_133), // '紅' -- '紅' + FONTDATA_ITEM(250, 162, 162, fontpage_250_162_162), // '索' -- '索' + FONTDATA_ITEM(250, 171, 171, fontpage_250_171_171), // '紫' -- '紫' + FONTDATA_ITEM(250, 176, 176, fontpage_250_176_176), // '細' -- '細' + FONTDATA_ITEM(250, 194, 194, fontpage_250_194_194), // '終' -- '終' + FONTDATA_ITEM(250, 241, 242, fontpage_250_241_242), // '統' -- '絲' + FONTDATA_ITEM(251, 160, 160, fontpage_251_160_160), // '綠' -- '綠' + FONTDATA_ITEM(251, 178, 178, fontpage_251_178_178), // '網' -- '網' + FONTDATA_ITEM(251, 210, 210, fontpage_251_210_210), // '緒' -- '緒' + FONTDATA_ITEM(251, 218, 218, fontpage_251_218_218), // '線' -- '線' + FONTDATA_ITEM(251, 232, 232, fontpage_251_232_232), // '編' -- '編' + FONTDATA_ITEM(252, 174, 174, fontpage_252_174_174), // '縮' -- '縮' + FONTDATA_ITEM(252, 189, 189, fontpage_252_189_189), // '總' -- '總' + FONTDATA_ITEM(252, 252, 252, fontpage_252_252_252), // '繼' -- '繼' + FONTDATA_ITEM(253, 140, 140, fontpage_253_140_140), // '續' -- '續' + FONTDATA_ITEM(253, 162, 162, fontpage_253_162_162), // '红' -- '红' + FONTDATA_ITEM(254, 238, 238, fontpage_254_238_238), // '置' -- '置' + FONTDATA_ITEM(254, 242, 242, fontpage_254_242_242), // '署' -- '署' + FONTDATA_ITEM(256, 240, 240, fontpage_256_240_240), // '聰' -- '聰' + FONTDATA_ITEM(259, 234, 234, fontpage_259_234_234), // '自' -- '自' + FONTDATA_ITEM(267, 205, 205, fontpage_267_205_205), // '藍' -- '藍' + FONTDATA_ITEM(272, 204, 204, fontpage_272_204_204), // '行' -- '行' + FONTDATA_ITEM(272, 232, 232, fontpage_272_232_232), // '表' -- '表' + FONTDATA_ITEM(273, 171, 171, fontpage_273_171_171), // '被' -- '被' + FONTDATA_ITEM(273, 197, 197, fontpage_273_197_197), // '装' -- '装' + FONTDATA_ITEM(273, 221, 221, fontpage_273_221_221), // '裝' -- '裝' + FONTDATA_ITEM(274, 135, 135, fontpage_274_135_135), // '複' -- '複' + FONTDATA_ITEM(275, 210, 210, fontpage_275_210_210), // '角' -- '角' + FONTDATA_ITEM(276, 136, 136, fontpage_276_136_136), // '計' -- '計' + FONTDATA_ITEM(276, 138, 138, fontpage_276_138_138), // '訊' -- '訊' + FONTDATA_ITEM(276, 152, 152, fontpage_276_152_152), // '記' -- '記' + FONTDATA_ITEM(276, 173, 173, fontpage_276_173_173), // '設' -- '設' + FONTDATA_ITEM(276, 230, 230, fontpage_276_230_230), // '試' -- '試' + FONTDATA_ITEM(277, 141, 141, fontpage_277_141_141), // '認' -- '認' + FONTDATA_ITEM(277, 164, 164, fontpage_277_164_164), // '誤' -- '誤' + FONTDATA_ITEM(277, 191, 191, fontpage_277_191_191), // '調' -- '調' + FONTDATA_ITEM(277, 203, 203, fontpage_277_203_203), // '請' -- '請' + FONTDATA_ITEM(278, 240, 240, fontpage_278_240_240), // '議' -- '議' + FONTDATA_ITEM(279, 128, 128, fontpage_279_128_128), // '讀' -- '讀' + FONTDATA_ITEM(279, 138, 138, fontpage_279_138_138), // '變' -- '變' + FONTDATA_ITEM(281, 199, 199, fontpage_281_199_199), // '資' -- '資' + FONTDATA_ITEM(283, 221, 221, fontpage_283_221_221), // '距' -- '距' + FONTDATA_ITEM(285, 202, 202, fontpage_285_202_202), // '車' -- '車' + FONTDATA_ITEM(285, 223, 223, fontpage_285_223_223), // '軟' -- '軟' + FONTDATA_ITEM(285, 248, 248, fontpage_285_248_248), // '軸' -- '軸' + FONTDATA_ITEM(286, 137, 137, fontpage_286_137_137), // '載' -- '載' + FONTDATA_ITEM(286, 175, 175, fontpage_286_175_175), // '輯' -- '輯' + FONTDATA_ITEM(286, 184, 184, fontpage_286_184_184), // '輸' -- '輸' + FONTDATA_ITEM(286, 201, 201, fontpage_286_201_201), // '轉' -- '轉' + FONTDATA_ITEM(287, 209, 209, fontpage_287_209_209), // '近' -- '近' + FONTDATA_ITEM(287, 212, 212, fontpage_287_212_212), // '返' -- '返' + FONTDATA_ITEM(288, 128, 128, fontpage_288_128_128), // '退' -- '退' + FONTDATA_ITEM(288, 159, 159, fontpage_288_159_159), // '速' -- '速' + FONTDATA_ITEM(288, 163, 163, fontpage_288_163_163), // '連' -- '連' + FONTDATA_ITEM(288, 178, 178, fontpage_288_178_178), // '進' -- '進' + FONTDATA_ITEM(288, 203, 203, fontpage_288_203_203), // '運' -- '運' + FONTDATA_ITEM(288, 212, 212, fontpage_288_212_212), // '達' -- '達' + FONTDATA_ITEM(288, 248, 248, fontpage_288_248_248), // '選' -- '選' + FONTDATA_ITEM(289, 132, 132, fontpage_289_132_132), // '還' -- '還' + FONTDATA_ITEM(289, 138, 138, fontpage_289_138_138), // '邊' -- '邊' + FONTDATA_ITEM(289, 232, 232, fontpage_289_232_232), // '部' -- '部' + FONTDATA_ITEM(291, 203, 203, fontpage_291_203_203), // '釋' -- '釋' + FONTDATA_ITEM(291, 205, 205, fontpage_291_205_205), // '重' -- '重' + FONTDATA_ITEM(291, 207, 207, fontpage_291_207_207), // '量' -- '量' + FONTDATA_ITEM(291, 221, 221, fontpage_291_221_221), // '針' -- '針' + FONTDATA_ITEM(292, 149, 149, fontpage_292_149_149), // '鈕' -- '鈕' + FONTDATA_ITEM(294, 175, 175, fontpage_294_175_175), // '錯' -- '錯' + FONTDATA_ITEM(294, 245, 245, fontpage_294_245_245), // '鍵' -- '鍵' + FONTDATA_ITEM(298, 247, 247, fontpage_298_247_247), // '長' -- '長' + FONTDATA_ITEM(299, 137, 137, fontpage_299_137_137), // '閉' -- '閉' + FONTDATA_ITEM(299, 139, 139, fontpage_299_139_139), // '開' -- '開' + FONTDATA_ITEM(299, 147, 147, fontpage_299_147_147), // '間' -- '間' + FONTDATA_ITEM(299, 220, 220, fontpage_299_220_220), // '關' -- '關' + FONTDATA_ITEM(300, 205, 205, fontpage_300_205_205), // '降' -- '降' + FONTDATA_ITEM(300, 228, 228, fontpage_300_228_228), // '除' -- '除' + FONTDATA_ITEM(301, 142, 142, fontpage_301_142_142), // '階' -- '階' + FONTDATA_ITEM(301, 217, 217, fontpage_301_217_217), // '雙' -- '雙' + FONTDATA_ITEM(301, 226, 226, fontpage_301_226_226), // '離' -- '離' + FONTDATA_ITEM(301, 251, 251, fontpage_301_251_251), // '電' -- '電' + FONTDATA_ITEM(302, 210, 210, fontpage_302_210_210), // '青' -- '青' + FONTDATA_ITEM(302, 222, 222, fontpage_302_222_222), // '非' -- '非' + FONTDATA_ITEM(302, 226, 226, fontpage_302_226_226), // '面' -- '面' + FONTDATA_ITEM(304, 133, 133, fontpage_304_133_133), // '項' -- '項' + FONTDATA_ITEM(304, 144, 144, fontpage_304_144_144), // '預' -- '預' + FONTDATA_ITEM(304, 205, 205, fontpage_304_205_205), // '額' -- '額' + FONTDATA_ITEM(304, 222, 222, fontpage_304_222_222), // '類' -- '類' + FONTDATA_ITEM(305, 168, 168, fontpage_305_168_168), // '風' -- '風' + FONTDATA_ITEM(305, 253, 253, fontpage_305_253_253), // '飽' -- '飽' + FONTDATA_ITEM(306, 152, 152, fontpage_306_152_152), // '餘' -- '餘' + FONTDATA_ITEM(307, 172, 172, fontpage_307_172_172), // '馬' -- '馬' + FONTDATA_ITEM(308, 197, 197, fontpage_308_197_197), // '驅' -- '驅' + FONTDATA_ITEM(309, 212, 212, fontpage_309_212_212), // '體' -- '體' + FONTDATA_ITEM(309, 216, 216, fontpage_309_216_216), // '高' -- '高' + FONTDATA_ITEM(317, 195, 195, fontpage_317_195_195), // '黃' -- '黃' + FONTDATA_ITEM(317, 222, 222, fontpage_317_222_222), // '點' -- '點' + FONTDATA_ITEM(318, 202, 202, fontpage_318_202_202), // '齊' -- '齊' + FONTDATA_ITEM(510, 154, 154, fontpage_510_154_154), // ':' -- ':' }; diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index c7c5908b36b9..4a7e26ae83e4 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -76,19 +76,24 @@ #define FONT_STATUSMENU_NAME MENU_FONT_NAME #endif -U8G_CLASS u8g(U8G_PARAM); +U8G_CLASS u8g; #include LANGUAGE_DATA_INCL(LCD_LANGUAGE) +#ifdef LCD_LANGUAGE_2 + #include LANGUAGE_DATA_INCL(LCD_LANGUAGE_2) +#endif +#ifdef LCD_LANGUAGE_3 + #include LANGUAGE_DATA_INCL(LCD_LANGUAGE_3) +#endif +#ifdef LCD_LANGUAGE_4 + #include LANGUAGE_DATA_INCL(LCD_LANGUAGE_4) +#endif +#ifdef LCD_LANGUAGE_5 + #include LANGUAGE_DATA_INCL(LCD_LANGUAGE_5) +#endif #if HAS_LCD_CONTRAST - - int16_t MarlinUI::contrast = DEFAULT_LCD_CONTRAST; - - void MarlinUI::set_contrast(const int16_t value) { - contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX); - u8g.setContrast(contrast); - } - + void MarlinUI::_set_contrast() { u8g.setContrast(contrast); } #endif void MarlinUI::set_font(const MarlinFont font_nr) { @@ -118,12 +123,10 @@ bool MarlinUI::detected() { return true; } #endif #if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED) - const void * const frame_ptr = pgm_read_ptr(&custom_bootscreen_animation[frame]); - #if ENABLED(CUSTOM_BOOTSCREEN_TIME_PER_FRAME) - const boot_frame_t * const frame_info = (boot_frame_t*)frame_ptr; - const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)pgm_read_ptr(&frame_info->bitmap); + #if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME) + const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)pgm_read_ptr(&custom_bootscreen_animation[frame].bitmap); #else - const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)frame_ptr; + const u8g_pgm_uint8_t * const bmp = (u8g_pgm_uint8_t*)pgm_read_ptr(&custom_bootscreen_animation[frame]); #endif #else const u8g_pgm_uint8_t * const bmp = custom_start_bmp; @@ -150,16 +153,15 @@ bool MarlinUI::detected() { return true; } constexpr millis_t frame_time = 0; constexpr uint8_t f = 0; #else - #if DISABLED(CUSTOM_BOOTSCREEN_TIME_PER_FRAME) + #if DISABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME) constexpr millis_t frame_time = CUSTOM_BOOTSCREEN_FRAME_TIME; #endif LOOP_L_N(f, COUNT(custom_bootscreen_animation)) #endif { - #if ENABLED(CUSTOM_BOOTSCREEN_TIME_PER_FRAME) + #if ENABLED(CUSTOM_BOOTSCREEN_ANIMATED_FRAME_TIME) const uint8_t fr = _MIN(f, COUNT(custom_bootscreen_animation) - 1); - const boot_frame_t * const frame_info = (boot_frame_t*)pgm_read_ptr(&custom_bootscreen_animation[fr]); - const millis_t frame_time = pgm_read_word(&frame_info->duration); + const millis_t frame_time = pgm_read_word(&custom_bootscreen_animation[fr].duration); #endif u8g.firstPage(); do { draw_custom_bootscreen(f); } while (u8g.nextPage()); @@ -177,6 +179,7 @@ bool MarlinUI::detected() { return true; } // Two-part needed to display all info constexpr bool two_part = ((LCD_PIXEL_HEIGHT) - (START_BMPHEIGHT)) < ((MENU_FONT_ASCENT) * 2); + constexpr uint8_t bootscreen_pages = 1 + two_part; // Draw the static Marlin bootscreen from a u8g loop // or the animated boot screen within its own u8g loop @@ -235,10 +238,9 @@ bool MarlinUI::detected() { return true; } // Show the Marlin bootscreen, with the u8g loop and delays void MarlinUI::show_marlin_bootscreen() { - constexpr uint8_t pages = two_part ? 2 : 1; - for (uint8_t q = pages; q--;) { + for (uint8_t q = bootscreen_pages; q--;) { draw_marlin_bootscreen(q == 0); - safe_delay((BOOTSCREEN_TIMEOUT) / pages); + if (q) safe_delay((BOOTSCREEN_TIMEOUT) / bootscreen_pages); } } @@ -247,6 +249,10 @@ bool MarlinUI::detected() { return true; } show_marlin_bootscreen(); } + void MarlinUI::bootscreen_completion(const millis_t sofar) { + if ((BOOTSCREEN_TIMEOUT) / bootscreen_pages > sofar) safe_delay((BOOTSCREEN_TIMEOUT) / bootscreen_pages - sofar); + } + #endif // SHOW_BOOTSCREEN #if ENABLED(LIGHTWEIGHT_UI) @@ -255,11 +261,18 @@ bool MarlinUI::detected() { return true; } // Initialize or re-initialize the LCD void MarlinUI::init_lcd() { + + static bool did_init_u8g = false; + if (!did_init_u8g) { + u8g.init(U8G_PARAM); + did_init_u8g = true; + } + #if PIN_EXISTS(LCD_BACKLIGHT) OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away #endif - #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED) + #if ANY(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864, ZONESTAR_12864OLED, K3D_242_OLED_CONTROLLER) SET_OUTPUT(LCD_PINS_DC); #ifndef LCD_RESET_PIN #define LCD_RESET_PIN LCD_PINS_RS @@ -285,7 +298,29 @@ void MarlinUI::init_lcd() { TERN_(LCD_SCREEN_ROT_180, u8g.setRot180()); TERN_(LCD_SCREEN_ROT_270, u8g.setRot270()); - uxg_SetUtf8Fonts(g_fontinfo, COUNT(g_fontinfo)); + update_language_font(); +} + +void MarlinUI::update_language_font() { + #if HAS_MULTI_LANGUAGE + switch (language) { + default: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE), COUNT(LANG_FONT_INFO(LCD_LANGUAGE))); break; + #ifdef LCD_LANGUAGE_2 + case 1: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE_2), COUNT(LANG_FONT_INFO(LCD_LANGUAGE_2))); break; + #endif + #ifdef LCD_LANGUAGE_3 + case 2: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE_3), COUNT(LANG_FONT_INFO(LCD_LANGUAGE_3))); break; + #endif + #ifdef LCD_LANGUAGE_4 + case 3: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE_4), COUNT(LANG_FONT_INFO(LCD_LANGUAGE_4))); break; + #endif + #ifdef LCD_LANGUAGE_5 + case 4: uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE_5), COUNT(LANG_FONT_INFO(LCD_LANGUAGE_5))); break; + #endif + } + #else + uxg_SetUtf8Fonts(LANG_FONT_INFO(LCD_LANGUAGE), COUNT(LANG_FONT_INFO(LCD_LANGUAGE))); + #endif } // The kill screen is displayed for unrecoverable conditions @@ -303,6 +338,15 @@ void MarlinUI::draw_kill_screen() { void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop +#if HAS_LCD_BRIGHTNESS + void MarlinUI::_set_brightness() { + #if PIN_EXISTS(TFT_BACKLIGHT) + if (PWM_PIN(TFT_BACKLIGHT_PIN)) + analogWrite(pin_t(TFT_BACKLIGHT_PIN), brightness); + #endif + } +#endif + #if HAS_LCD_MENU #include "../menu/menu.h" @@ -312,15 +356,14 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop #if ENABLED(ADVANCED_PAUSE_FEATURE) void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) { - row_y1 = row * (MENU_FONT_HEIGHT) + 1; - row_y2 = row_y1 + MENU_FONT_HEIGHT - 1; + u8g_uint_t y1 = row * (MENU_FONT_HEIGHT) + 1, y2 = y1 + MENU_FONT_HEIGHT - 1; - if (!PAGE_CONTAINS(row_y1 + 1, row_y2 + 2)) return; + if (!PAGE_CONTAINS(y1 + 1, y2 + 2)) return; - lcd_put_wchar(LCD_PIXEL_WIDTH - 11 * (MENU_FONT_WIDTH), row_y2, 'E'); + lcd_put_wchar(LCD_PIXEL_WIDTH - 11 * (MENU_FONT_WIDTH), y2, 'E'); lcd_put_wchar((char)('1' + extruder)); lcd_put_wchar(' '); - lcd_put_u8str(i16tostr3rj(thermalManager.degHotend(extruder))); + lcd_put_u8str(i16tostr3rj(thermalManager.wholeDegHotend(extruder))); lcd_put_wchar('/'); if (get_blink() || !thermalManager.heater_idle[extruder].timed_out) @@ -361,13 +404,12 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { if (mark_as_selected(row, style & SS_INVERT)) { - pixel_len_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed - const int8_t plen = pstr ? utf8_strlen_P(pstr) : 0, - vlen = vstr ? utf8_strlen(vstr) : 0; + const int plen = pstr ? calculateWidth(pstr) : 0, + vlen = vstr ? utf8_strlen(vstr) : 0; if (style & SS_CENTER) { - int8_t pad = (LCD_WIDTH - plen - vlen) / 2; + int pad = (LCD_PIXEL_WIDTH - plen - vlen * MENU_FONT_WIDTH) / MENU_FONT_WIDTH / 2; while (--pad >= 0) n -= lcd_put_wchar(' '); } @@ -388,12 +430,13 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop } // Draw a menu item with an editable value - void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const inStr, const bool pgm) { + void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const inStr, const bool pgm) { if (mark_as_selected(row, sel)) { const uint8_t vallen = (pgm ? utf8_strlen_P(inStr) : utf8_strlen((char*)inStr)), pixelwidth = (pgm ? uxg_GetUtf8StrPixelWidthP(u8g.getU8g(), inStr) : uxg_GetUtf8StrPixelWidth(u8g.getU8g(), (char*)inStr)); + const u8g_uint_t prop = USE_WIDE_GLYPH ? 2 : 1; - pixel_len_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 2 - vallen) * (MENU_FONT_WIDTH); + pixel_len_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 2 - vallen * prop) * (MENU_FONT_WIDTH); if (vallen) { lcd_put_wchar(':'); while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' '); @@ -403,18 +446,19 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop } } - void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { + void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) { ui.encoder_direction_normal(); + const u8g_uint_t prop = USE_WIDE_GLYPH ? 2 : 1; const u8g_uint_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value); - bool extra_row = labellen > LCD_WIDTH - 2 - vallen; + bool extra_row = labellen * prop > LCD_WIDTH - 2 - vallen * prop; #if ENABLED(USE_BIG_EDIT_FONT) // Use the menu font if the label won't fit on a single line constexpr u8g_uint_t lcd_edit_width = (LCD_PIXEL_WIDTH) / (EDIT_FONT_WIDTH); u8g_uint_t lcd_chr_fit, one_chr_width; - if (labellen <= lcd_edit_width - 1) { - if (labellen + vallen + 1 > lcd_edit_width) extra_row = true; + if (labellen * prop <= lcd_edit_width - 1) { + if (labellen * prop + vallen * prop + 1 > lcd_edit_width) extra_row = true; lcd_chr_fit = lcd_edit_width + 1; one_chr_width = EDIT_FONT_WIDTH; ui.set_font(FONT_EDIT); @@ -446,7 +490,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop onpage = PAGE_CONTAINS(baseline - (EDIT_FONT_ASCENT - 1), baseline); } if (onpage) { - lcd_put_wchar(((lcd_chr_fit - 1) - (vallen + 1)) * one_chr_width, baseline, ' '); // Right-justified, padded, add a leading space + lcd_put_wchar(((lcd_chr_fit - 1) - (vallen * prop + 1)) * one_chr_width, baseline, ' '); // Right-justified, padded, add a leading space lcd_put_u8str(value); } } @@ -460,7 +504,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop const pixel_len_t bw = len * prop * (MENU_FONT_WIDTH), bx = x * prop * (MENU_FONT_WIDTH); if (inv) { u8g.setColorIndex(1); - u8g.drawBox(bx / prop - 1, by - (MENU_FONT_ASCENT) + 1, bw / prop + 2, MENU_FONT_HEIGHT - 1); + u8g.drawBox(bx / prop - 1, by - (MENU_FONT_ASCENT), bw + 2, MENU_FONT_HEIGHT); u8g.setColorIndex(0); } lcd_put_u8str_P(bx / prop, by, pstr); @@ -470,8 +514,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { ui.draw_select_screen_prompt(pref, string, suff); draw_boxed_string(1, LCD_HEIGHT - 1, no, !yesno); - const u8g_uint_t xpos = (LCD_WIDTH) / (USE_WIDE_GLYPH ? 2 : 1); - draw_boxed_string(xpos - (utf8_strlen_P(yes) + 1), LCD_HEIGHT - 1, yes, yesno); + draw_boxed_string(LCD_WIDTH - (utf8_strlen_P(yes) * (USE_WIDE_GLYPH ? 2 : 1) + 1), LCD_HEIGHT - 1, yes, yesno); } #if ENABLED(SDSUPPORT) @@ -532,7 +575,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop // Fill in the Specified Mesh Point - const uint8_t y_plot_inv = (GRID_MAX_POINTS_Y - 1) - y_plot; // The origin is typically in the lower right corner. We need to + const uint8_t y_plot_inv = (GRID_MAX_POINTS_Y) - 1 - y_plot; // The origin is typically in the lower right corner. We need to // invert the Y to get it to plot in the right location. const u8g_uint_t by = y_offset + y_plot_inv * pixels_per_y_mesh_pnt; @@ -577,6 +620,12 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop #if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) + // + // Draw knob rotation => Z motion key for: + // - menu.cpp:lcd_babystep_zoffset + // - menu_ubl.cpp:_lcd_mesh_fine_tune + // + const unsigned char cw_bmp[] PROGMEM = { B00000000,B11111110,B00000000, B00000011,B11111111,B10000000, @@ -666,37 +715,24 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop B00001100,B00000000 }; - void _lcd_zoffset_overlay_gfx(const float zvalue) { - // Determine whether the user is raising or lowering the nozzle. - static int8_t dir; - static float old_zvalue; - if (zvalue != old_zvalue) { - dir = zvalue ? zvalue < old_zvalue ? -1 : 1 : 0; - old_zvalue = zvalue; - } - - #if ENABLED(OVERLAY_GFX_REVERSE) - const unsigned char *rot_up = ccw_bmp, *rot_down = cw_bmp; - #else - const unsigned char *rot_up = cw_bmp, *rot_down = ccw_bmp; - #endif + void MarlinUI::zoffset_overlay(const int8_t dir) { + const unsigned char *rot_up = TERN(OVERLAY_GFX_REVERSE, ccw_bmp, cw_bmp), + *rot_down = TERN(OVERLAY_GFX_REVERSE, cw_bmp, ccw_bmp); - #if ENABLED(USE_BIG_EDIT_FONT) - const int left = 0, right = 45, nozzle = 95; - #else - const int left = 5, right = 90, nozzle = 60; - #endif + const int left = TERN(USE_BIG_EDIT_FONT, 0, 5), + right = TERN(USE_BIG_EDIT_FONT, 45, 90), + nozzle = TERN(USE_BIG_EDIT_FONT, 95, 60); - // Draw a representation of the nozzle - if (PAGE_CONTAINS(3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp); - if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20, 3, 1, offset_bedline_bmp); + // Draw nozzle lowered or raised according to direction moved + if (PAGE_CONTAINS( 3, 16)) u8g.drawBitmapP(nozzle + 6, 4 - dir, 2, 12, nozzle_bmp); + if (PAGE_CONTAINS(20, 20)) u8g.drawBitmapP(nozzle + 0, 20 , 3, 1, offset_bedline_bmp); // Draw cw/ccw indicator and up/down arrows. if (PAGE_CONTAINS(47, 62)) { - u8g.drawBitmapP(right + 0, 48 - dir, 2, 13, up_arrow_bmp); - u8g.drawBitmapP(left + 0, 49 - dir, 2, 13, down_arrow_bmp); - u8g.drawBitmapP(left + 13, 47, 3, 16, rot_down); - u8g.drawBitmapP(right + 13, 47, 3, 16, rot_up); + u8g.drawBitmapP(right + 0, 48 - dir, 2, 13, up_arrow_bmp); + u8g.drawBitmapP(left + 0, 49 - dir, 2, 13, down_arrow_bmp); + u8g.drawBitmapP(left + 13, 47 , 3, 16, rot_down); + u8g.drawBitmapP(right + 13, 47 , 3, 16, rot_up); } } diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.h b/Marlin/src/lcd/dogm/marlinui_DOGM.h index e5229cd08845..328b69b93b6c 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.h +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.h @@ -27,7 +27,7 @@ #include "../../inc/MarlinConfigPre.h" -#include +#include #include "HAL_LCD_class_defines.h" //#define ALTERNATIVE_LCD @@ -88,7 +88,8 @@ #define SMART_RAMPS MB(RAMPS_SMART_EFB, RAMPS_SMART_EEB, RAMPS_SMART_EFF, RAMPS_SMART_EEF, RAMPS_SMART_SF) #define U8G_CLASS U8GLIB_64128N_2X_HAL // 4 stripes (HW-SPI) - #if SMART_RAMPS || DOGLCD_SCK != SD_SCK_PIN || DOGLCD_MOSI != SD_MOSI_PIN + + #if (SMART_RAMPS && defined(__SAM3X8E__)) || DOGLCD_SCK != SD_SCK_PIN || DOGLCD_MOSI != SD_MOSI_PIN #define FORCE_SOFT_SPI // SW-SPI #endif @@ -122,9 +123,10 @@ #define U8G_CLASS U8GLIB_SSD1306_128X64 // 8 stripes #endif -#elif ENABLED(FYSETC_242_OLED_12864) +#elif EITHER(FYSETC_242_OLED_12864, K3D_242_OLED_CONTROLLER) - // FYSETC OLED 2.42" 128 × 64 FULL GRAPHICS CONTROLLER + // FYSETC OLED 2.42" 128 × 64 Full Graphics Controller + // or K3D OLED 2.42" 128 × 64 Full Graphics Controller #define FORCE_SOFT_SPI // SW-SPI diff --git a/Marlin/src/lcd/dogm/status/ammeter.h b/Marlin/src/lcd/dogm/status/ammeter.h new file mode 100644 index 000000000000..d99ea6949a64 --- /dev/null +++ b/Marlin/src/lcd/dogm/status/ammeter.h @@ -0,0 +1,68 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// +// lcd/dogm/status/ammeter.h - Status Screen Laser Ammeter bitmaps +// + +#define STATUS_AMMETER_WIDTH 20 + +const unsigned char status_ammeter_bmp_mA[] PROGMEM = { + B00000000,B11111100,B00000000, + B00000011,B00000011,B00000000, + B00000100,B00000000,B10000000, + B00001000,B00000000,B01000000, + B00010000,B00000110,B00100000, + B00010000,B00001001,B00100000, + B00100000,B00001001,B00010000, + B00100011,B01001111,B00010000, + B11100010,B10101001,B00011100, + B00100010,B10101001,B00010000, + B00100010,B10101001,B00010000, + B00010000,B00000000,B00100000, + B00010000,B00000000,B00100000, + B00001000,B00000000,B01000000, + B00000100,B00000000,B10000000, + B00000011,B00000011,B00000000, + B00000000,B11111100,B00000000 +}; + +const unsigned char status_ammeter_bmp_A[] PROGMEM = { + B00000000,B11111100,B00000000, + B00000011,B00000011,B00000000, + B00000100,B00000000,B10000000, + B00001000,B00000000,B01000000, + B00010000,B00000000,B00100000, + B00010000,B00110000,B00100000, + B00100000,B01001000,B00010000, + B00100000,B01001000,B00010000, + B11100000,B01111000,B00011100, + B00100000,B01001000,B00010000, + B00100000,B01001000,B00010000, + B00010000,B01001000,B00100000, + B00010000,B00000000,B00100000, + B00001000,B00000000,B01000000, + B00000100,B00000000,B10000000, + B00000011,B00000011,B00000000, + B00000000,B11111100,B00000000, +}; diff --git a/Marlin/src/lcd/dogm/status/bed.h b/Marlin/src/lcd/dogm/status/bed.h index c484a129293e..175a50e34188 100644 --- a/Marlin/src/lcd/dogm/status/bed.h +++ b/Marlin/src/lcd/dogm/status/bed.h @@ -29,9 +29,7 @@ #define STATUS_BED_ANIM #define STATUS_BED_WIDTH 24 - #ifndef STATUS_BED_X - #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) - #endif + #define STATUS_BED_TEXT_X (STATUS_BED_X + 11) const unsigned char status_bed_bmp[] PROGMEM = { @@ -62,9 +60,6 @@ #else #define STATUS_BED_WIDTH 21 - #ifndef STATUS_BED_X - #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8) - #endif #ifdef STATUS_BED_ANIM @@ -108,3 +103,7 @@ #endif #endif + +#ifndef STATUS_BED_X + #define STATUS_BED_X (LCD_PIXEL_WIDTH - (STATUS_BED_BYTEWIDTH + STATUS_CHAMBER_BYTEWIDTH + STATUS_FAN_BYTEWIDTH) * 8 - TERN0(STATUS_HEAT_PERCENT, 4)) +#endif diff --git a/Marlin/src/lcd/dogm/status/cooler.h b/Marlin/src/lcd/dogm/status/cooler.h new file mode 100644 index 000000000000..65c28ec28e15 --- /dev/null +++ b/Marlin/src/lcd/dogm/status/cooler.h @@ -0,0 +1,119 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// +// lcd/dogm/status/cooler.h - Status Screen Laser Cooler bitmaps +// +#if HAS_COOLER + + #define STATUS_COOLER_WIDTH 22 + + const unsigned char status_cooler_bmp2[] PROGMEM = { + B00000001,B00000000,B10000000, + B00000001,B00100100,B10010000, + B00000101,B01000010,B10100000, + B00000011,B10000001,B11000000, + B00001111,B11101111,B11110000, + B00000011,B10000001,B11000000, + B00000101,B01000010,B10100000, + B00001001,B00001000,B10010000, + B00000001,B00001000,B00000000, + B00000000,B01001001,B00000000, + B00000000,B00101010,B00000000, + B00000000,B00011100,B00000000, + B00000001,B11111111,B11000000, + B00000000,B00011100,B00000000, + B00000000,B00101010,B00000000, + B00000000,B01001001,B00000000 + }; + const unsigned char status_cooler_bmp1[] PROGMEM = { + B00000001,B00000000,B10000000, + B00000001,B00100100,B10010000, + B00000101,B01000010,B10100000, + B00000010,B10000001,B01000000, + B00001100,B01110110,B00110000, + B00000010,B10000001,B01000000, + B00000101,B01000010,B10100000, + B00001001,B00001000,B10010000, + B00000001,B00001000,B00000000, + B00000000,B01001001,B00000000, + B00000000,B00101010,B00000000, + B00000000,B00010100,B00000000, + B00000001,B11100011,B11000000, + B00000000,B00010100,B00000000, + B00000000,B00101010,B00000000, + B00000000,B01001001,B00000000 + }; + +#endif + +#if ENABLED(LASER_COOLANT_FLOW_METER) + + #define STATUS_FLOWMETER_WIDTH 24 + + const unsigned char status_flowmeter_bmp2[] PROGMEM = { + B00000000,B01111110,B00000000, + B00000001,B10000001,B10000000, + B00000010,B00011000,B01000000, + B00000100,B00011000,B00100000, + B00001000,B00011000,B00010000, + B00001000,B00011000,B00010000, + B00010000,B00011000,B00001000, + B00010000,B00011000,B00001000, + B00010111,B11111111,B11101000, + B00010111,B11111111,B11101000, + B00010000,B00011000,B00001000, + B00010000,B00011000,B00001000, + B00001000,B00011000,B00010000, + B00001000,B00011000,B00010000, + B00000100,B00011000,B00100000, + B00000010,B00011000,B01000000, + B00000001,B10000001,B10000000, + B00000000,B01111110,B00000000, + B00000000,B00011000,B00000000, + B00000111,B11111111,B11100000 + }; + const unsigned char status_flowmeter_bmp1[] PROGMEM = { + B00000000,B01111110,B00000000, + B00000001,B10000001,B10000000, + B00000010,B00000000,B01000000, + B00000101,B00000000,B10100000, + B00001011,B10000001,B11010000, + B00001001,B11000011,B10010000, + B00010000,B11100111,B00001000, + B00010000,B01111110,B00001000, + B00010000,B00111100,B00001000, + B00010000,B00111100,B00001000, + B00010000,B01111110,B00001000, + B00010000,B11100111,B00001000, + B00001001,B11000011,B10010000, + B00001011,B10000001,B11010000, + B00000101,B00000000,B10100000, + B00000010,B00000000,B01000000, + B00000001,B10000001,B10000000, + B00000000,B01111110,B00000000, + B00000000,B00011000,B00000000, + B00000111,B11111111,B11100000 + }; + +#endif diff --git a/Marlin/src/lcd/dogm/status/hotend.h b/Marlin/src/lcd/dogm/status/hotend.h index 4dddc42bee88..aac29da45122 100644 --- a/Marlin/src/lcd/dogm/status/hotend.h +++ b/Marlin/src/lcd/dogm/status/hotend.h @@ -25,29 +25,47 @@ // lcd/dogm/status/hotend.h - Status Screen Hotends bitmaps // -#define STATUS_HOTEND1_WIDTH 16 - -#define MAX_HOTEND_BITMAPS 5 -#if HOTENDS > MAX_HOTEND_BITMAPS - #define STATUS_HOTEND_BITMAPS MAX_HOTEND_BITMAPS +#if HAS_MMU + #define STATUS_HOTEND_BITMAPS EXTRUDERS + #define MAX_HOTEND_BITMAPS 8 #else #define STATUS_HOTEND_BITMAPS HOTENDS + #define MAX_HOTEND_BITMAPS 5 +#endif +#if STATUS_HOTEND_BITMAPS > MAX_HOTEND_BITMAPS + #undef STATUS_HOTEND_BITMAPS + #define STATUS_HOTEND_BITMAPS MAX_HOTEND_BITMAPS #endif -#if HOTENDS == 1 || ENABLED(STATUS_HOTEND_NUMBERLESS) +#define STATUS_HOTEND1_WIDTH 16 + +#if STATUS_HOTEND_BITMAPS == 1 || defined(STATUS_HOTEND_NUMBERLESS) const unsigned char status_hotend_a_bmp[] PROGMEM = { B00011111,B11100000, - B00111111,B11110000, - B00111111,B11110000, - B00111111,B11110000, - B00011111,B11100000, - B00011111,B11100000, - B00111111,B11110000, - B00111111,B11110000, - B00111111,B11110000, - B00001111,B11000000, - B00000111,B10000000, + #if defined(STATUS_HOTEND_INVERTED) && !defined(STATUS_HOTEND_ANIM) + B00100000,B00010000, + B00100000,B00010000, + B00100000,B00010000, + B00010000,B00100000, + B00010000,B00100000, + B00100000,B00010000, + B00100000,B00010000, + B00110000,B00110000, + B00001000,B01000000, + B00000100,B10000000, + #else + B00111111,B11110000, + B00111111,B11110000, + B00111111,B11110000, + B00011111,B11100000, + B00011111,B11100000, + B00111111,B11110000, + B00111111,B11110000, + B00111111,B11110000, + B00001111,B11000000, + B00000111,B10000000, + #endif B00000011,B00000000 }; @@ -70,7 +88,7 @@ #endif -#elif HOTENDS >= 2 +#elif STATUS_HOTEND_BITMAPS > 1 #ifdef STATUS_HOTEND_ANIM @@ -483,4 +501,259 @@ #endif + #if STATUS_HOTEND_BITMAPS >= 6 + + #ifdef STATUS_HOTEND_ANIM + + const unsigned char status_hotend6_a_bmp[] PROGMEM = { + B00011111,B11100000, + B00111111,B11110000, + #if LCD_FIRST_TOOL == 0 + B00111000,B01110000, + B00111011,B11110000, + B00011000,B11100000, + B00011111,B01100000, + B00111111,B01110000, + B00111011,B01110000, + B00111100,B11110000, + #else + B00111100,B01110000, + B00111011,B11110000, + B00011011,B11100000, + B00011000,B11100000, + B00111011,B01110000, + B00111011,B01110000, + B00111100,B11110000, + #endif + B00001111,B11000000, + B00000111,B10000000, + B00000011,B00000000 + }; + + const unsigned char status_hotend6_b_bmp[] PROGMEM = { + B00011111,B11100000, + B00100000,B00010000, + #if LCD_FIRST_TOOL == 0 + B00100111,B10010000, + B00100100,B00010000, + B00010111,B00100000, + B00010000,B10100000, + B00100000,B10010000, + B00100100,B10010000, + B00110011,B00110000, + #else + B00100011,B10010000, + B00100100,B00010000, + B00010100,B00100000, + B00010111,B00100000, + B00100100,B10010000, + B00100100,B10010000, + B00110011,B00110000, + #endif + B00001000,B01000000, + B00000100,B10000000, + B00000011,B00000000 + }; + + #else + + const unsigned char status_hotend6_a_bmp[] PROGMEM = { + B00011111,B11100000, + #if LCD_FIRST_TOOL == 0 + B00111000,B01110000, + B00111011,B11110000, + B00111000,B11110000, + B00011111,B01100000, + B00011111,B01100000, + B00111011,B01110000, + B00111100,B11110000, + #else + B00111100,B01110000, + B00111011,B11110000, + B00111011,B11110000, + B00011000,B11100000, + B00011011,B01100000, + B00111011,B01110000, + B00111100,B11110000, + #endif + B00111111,B11110000, + B00001111,B11000000, + B00000111,B10000000, + B00000011,B00000000 + }; + + #endif + + #endif + + #if STATUS_HOTEND_BITMAPS >= 7 + + #ifdef STATUS_HOTEND_ANIM + + const unsigned char status_hotend7_a_bmp[] PROGMEM = { + B00011111,B11100000, + B00111111,B11110000, + #if LCD_FIRST_TOOL == 0 + B00111100,B01110000, + B00111011,B11110000, + B00011011,B11100000, + B00011000,B11100000, + B00111011,B01110000, + B00111011,B01110000, + B00111100,B11110000, + #else + B00111000,B01110000, + B00111011,B01110000, + B00011111,B01100000, + B00011110,B11100000, + B00111110,B11110000, + B00111101,B11110000, + B00111101,B11110000, + #endif + B00001111,B11000000, + B00000111,B10000000, + B00000011,B00000000 + }; + + const unsigned char status_hotend7_b_bmp[] PROGMEM = { + B00011111,B11100000, + B00100000,B00010000, + #if LCD_FIRST_TOOL == 0 + B00100011,B10010000, + B00100100,B00010000, + B00010100,B00100000, + B00010111,B00100000, + B00100100,B10010000, + B00100100,B10010000, + B00110011,B00110000, + #else + B00100111,B10010000, + B00100100,B10010000, + B00010000,B10100000, + B00010001,B00100000, + B00100001,B00010000, + B00100010,B00010000, + B00110010,B00110000, + #endif + B00001000,B01000000, + B00000100,B10000000, + B00000011,B00000000 + }; + + #else + + const unsigned char status_hotend7_a_bmp[] PROGMEM = { + B00011111,B11100000, + #if LCD_FIRST_TOOL == 0 + B00111100,B01110000, + B00111011,B11110000, + B00111011,B11110000, + B00011000,B11100000, + B00011011,B01100000, + B00111011,B01110000, + B00111100,B11110000, + #else + B00111000,B01110000, + B00111011,B01110000, + B00111111,B01110000, + B00011110,B11100000, + B00011110,B11100000, + B00111101,B11110000, + B00111101,B11110000, + #endif + B00111111,B11110000, + B00001111,B11000000, + B00000111,B10000000, + B00000011,B00000000 + }; + + #endif + + #endif + + #if STATUS_HOTEND_BITMAPS >= 8 + + #ifdef STATUS_HOTEND_ANIM + + const unsigned char status_hotend8_a_bmp[] PROGMEM = { + B00011111,B11100000, + B00111111,B11110000, + #if LCD_FIRST_TOOL == 0 + B00111000,B01110000, + B00111011,B01110000, + B00011111,B01100000, + B00011110,B11100000, + B00111110,B11110000, + B00111101,B11110000, + B00111101,B11110000, + #else + B00111100,B11110000, + B00111011,B01110000, + B00011011,B01100000, + B00011100,B11100000, + B00111011,B01110000, + B00111011,B01110000, + B00111100,B11110000, + #endif + B00001111,B11000000, + B00000111,B10000000, + B00000011,B00000000 + }; + + const unsigned char status_hotend8_b_bmp[] PROGMEM = { + B00011111,B11100000, + B00100000,B00010000, + #if LCD_FIRST_TOOL == 0 + B00100111,B10010000, + B00100100,B10010000, + B00010000,B10100000, + B00010001,B00100000, + B00100001,B00010000, + B00100010,B00010000, + B00110010,B00110000, + #else + B00100011,B00010000, + B00100100,B10010000, + B00010100,B10100000, + B00010011,B00100000, + B00100100,B10010000, + B00100100,B10010000, + B00110011,B00110000, + #endif + B00001000,B01000000, + B00000100,B10000000, + B00000011,B00000000 + }; + + #else + + const unsigned char status_hotend8_a_bmp[] PROGMEM = { + B00011111,B11100000, + #if LCD_FIRST_TOOL == 0 + B00111000,B01110000, + B00111011,B01110000, + B00111111,B01110000, + B00011110,B11100000, + B00011110,B11100000, + B00111101,B11110000, + B00111101,B11110000, + #else + B00111100,B11110000, + B00111011,B01110000, + B00111011,B01110000, + B00011100,B11100000, + B00011011,B01100000, + B00111011,B01110000, + B00111100,B11110000, + #endif + B00111111,B11110000, + B00001111,B11000000, + B00000111,B10000000, + B00000011,B00000000 + }; + + #endif + + #endif + #endif diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 8ae6ab662793..8b707ba7c78a 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -41,7 +41,7 @@ #include "../../gcode/parser.h" // for units (and volumetric) #if ENABLED(LCD_SHOW_E_TOTAL) - #include "../../MarlinCore.h" // for printingIsActive(), marlin_state and MF_SD_COMPLETE + #include "../../MarlinCore.h" // for printingIsActive() #endif #if ENABLED(FILAMENT_LCD_DISPLAY) @@ -53,6 +53,14 @@ #include "../../feature/spindle_laser.h" #endif +#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) + #include "../../feature/cooler.h" +#endif + +#if ENABLED(I2C_AMMETER) + #include "../../feature/ammeter.h" +#endif + #if HAS_POWER_MONITOR #include "../../feature/power_monitor.h" #endif @@ -83,31 +91,31 @@ #if ANIM_HBCC enum HeatBits : uint8_t { - HEATBIT_HOTEND, - HEATBIT_BED = HOTENDS, - HEATBIT_CHAMBER, - HEATBIT_CUTTER + DRAWBIT_HOTEND, + DRAWBIT_BED = HOTENDS, + DRAWBIT_CHAMBER, + DRAWBIT_CUTTER }; - IF<(HEATBIT_CUTTER > 7), uint16_t, uint8_t>::type heat_bits; + IF<(DRAWBIT_CUTTER > 7), uint16_t, uint8_t>::type draw_bits; #endif #if ANIM_HOTEND - #define HOTEND_ALT(N) TEST(heat_bits, HEATBIT_HOTEND + N) + #define HOTEND_ALT(N) TEST(draw_bits, DRAWBIT_HOTEND + N) #else #define HOTEND_ALT(N) false #endif #if ANIM_BED - #define BED_ALT() TEST(heat_bits, HEATBIT_BED) + #define BED_ALT() TEST(draw_bits, DRAWBIT_BED) #else #define BED_ALT() false #endif #if ANIM_CHAMBER - #define CHAMBER_ALT() TEST(heat_bits, HEATBIT_CHAMBER) + #define CHAMBER_ALT() TEST(draw_bits, DRAWBIT_CHAMBER) #else #define CHAMBER_ALT() false #endif #if ANIM_CUTTER - #define CUTTER_ALT(N) TEST(heat_bits, HEATBIT_CUTTER) + #define CUTTER_ALT(N) TEST(draw_bits, DRAWBIT_CUTTER) #else #define CUTTER_ALT() false #endif @@ -132,7 +140,7 @@ #if ENABLED(POWER_MONITOR_CURRENT) const bool iflag = power_monitor.current_display_enabled(); #endif - #if HAS_POWER_MONITOR_VREF + #if ENABLED(POWER_MONITOR_VOLTAGE) const bool vflag = power_monitor.voltage_display_enabled(); #endif @@ -144,7 +152,7 @@ } #elif ENABLED(POWER_MONITOR_CURRENT) power_monitor.display_item = 0; - #elif HAS_POWER_MONITOR_VREF + #elif ENABLED(POWER_MONITOR_VOLTAGE) power_monitor.display_item = 1; #endif @@ -153,7 +161,7 @@ #if ENABLED(POWER_MONITOR_CURRENT) if (power_monitor.display_item == 0 && !iflag) ++power_monitor.display_item; #endif - #if HAS_POWER_MONITOR_VREF + #if ENABLED(POWER_MONITOR_VOLTAGE) if (power_monitor.display_item == 1 && !vflag) ++power_monitor.display_item; #endif #if HAS_POWER_MONITOR_WATTS @@ -166,7 +174,7 @@ #if ENABLED(POWER_MONITOR_CURRENT) // Current case 0: if (iflag) power_monitor.draw_current(); break; #endif - #if HAS_POWER_MONITOR_VREF // Voltage + #if ENABLED(POWER_MONITOR_VOLTAGE) // Voltage case 1: if (vflag) power_monitor.draw_voltage(); break; #endif #if HAS_POWER_MONITOR_WATTS // Power @@ -181,13 +189,34 @@ #define PROGRESS_BAR_Y (EXTRAS_BASELINE + 1) #define PROGRESS_BAR_WIDTH (LCD_PIXEL_WIDTH - PROGRESS_BAR_X) -FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, const uint8_t ty) { - const char *str = i16tostr3rj(temp); - const uint8_t len = str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1; - lcd_put_u8str(tx - len * (INFO_FONT_WIDTH) / 2 + 1, ty, &str[3-len]); - lcd_put_wchar(LCD_STR_DEGREE[0]); +FORCE_INLINE void _draw_centered_temp(const celsius_t temp, const uint8_t tx, const uint8_t ty) { + if (temp < 0) + lcd_put_u8str(tx - 3 * (INFO_FONT_WIDTH) / 2 + 1, ty, "err"); + else { + const char *str = i16tostr3rj(temp); + const uint8_t len = str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1; + lcd_put_u8str(tx - len * (INFO_FONT_WIDTH) / 2 + 1, ty, &str[3-len]); + lcd_put_wchar(LCD_STR_DEGREE[0]); + } } +#if DO_DRAW_FLOWMETER + FORCE_INLINE void _draw_centered_flowrate(const float flow, const uint8_t tx, const uint8_t ty) { + const char *str = ftostr11ns(flow); + const uint8_t len = str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1; + lcd_put_u8str(tx - len * (INFO_FONT_WIDTH) / 2 + 1, ty, &str[3-len]); + lcd_put_u8str("L"); + } +#endif + +#if DO_DRAW_AMMETER + FORCE_INLINE void _draw_centered_current(const float current, const uint8_t tx, const uint8_t ty) { + const char *str = ftostr31ns(current); + const uint8_t len = str[0] != ' ' ? 3 : str[1] != ' ' ? 2 : 1; + lcd_put_u8str(tx - len * (INFO_FONT_WIDTH) / 2 + 1, ty, &str[3-len]); + } +#endif + #if DO_DRAW_HOTENDS // Draw hotend bitmap with current and target temperatures @@ -200,8 +229,8 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons const uint8_t tx = STATUS_HOTEND_TEXT_X(heater_id); - const float temp = thermalManager.degHotend(heater_id), - target = thermalManager.degTargetHotend(heater_id); + const celsius_t temp = thermalManager.wholeDegHotend(heater_id), + target = thermalManager.degTargetHotend(heater_id); #if DISABLED(STATUS_HOTEND_ANIM) #define STATIC_HOTEND true @@ -211,24 +240,20 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons #define HOTEND_DOT false #endif - #if ANIM_HOTEND && BOTH(STATUS_HOTEND_INVERTED, STATUS_HOTEND_NUMBERLESS) - #define OFF_BMP(N) status_hotend_b_bmp - #define ON_BMP(N) status_hotend_a_bmp - #elif ANIM_HOTEND && DISABLED(STATUS_HOTEND_INVERTED) && ENABLED(STATUS_HOTEND_NUMBERLESS) - #define OFF_BMP(N) status_hotend_a_bmp - #define ON_BMP(N) status_hotend_b_bmp - #elif BOTH(ANIM_HOTEND, STATUS_HOTEND_INVERTED) - #define OFF_BMP(N) status_hotend##N##_b_bmp - #define ON_BMP(N) status_hotend##N##_a_bmp + #if ENABLED(STATUS_HOTEND_NUMBERLESS) + #define OFF_BMP(N) TERN(STATUS_HOTEND_INVERTED, status_hotend_b_bmp, status_hotend_a_bmp) + #define ON_BMP(N) TERN(STATUS_HOTEND_INVERTED, status_hotend_a_bmp, status_hotend_b_bmp) #else - #define OFF_BMP(N) status_hotend##N##_a_bmp - #define ON_BMP(N) status_hotend##N##_b_bmp + #define OFF_BMP(N) TERN(STATUS_HOTEND_INVERTED, status_hotend##N##_b_bmp, status_hotend##N##_a_bmp) + #define ON_BMP(N) TERN(STATUS_HOTEND_INVERTED, status_hotend##N##_a_bmp, status_hotend##N##_b_bmp) #endif #if STATUS_HOTEND_BITMAPS > 1 - static const unsigned char* const status_hotend_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, OFF_BMP(1), OFF_BMP(2), OFF_BMP(3), OFF_BMP(4), OFF_BMP(5), OFF_BMP(6)); + #define _OFF_BMP(N) OFF_BMP(N), + #define _ON_BMP(N) ON_BMP(N), + static const unsigned char* const status_hotend_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = { REPEAT_1(STATUS_HOTEND_BITMAPS, _OFF_BMP) }; #if ANIM_HOTEND - static const unsigned char* const status_hotend_on_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = ARRAY_N(STATUS_HOTEND_BITMAPS, ON_BMP(1), ON_BMP(2), ON_BMP(3), ON_BMP(4), ON_BMP(5), ON_BMP(6)); + static const unsigned char* const status_hotend_on_gfx[STATUS_HOTEND_BITMAPS] PROGMEM = { REPEAT_1(STATUS_HOTEND_BITMAPS, _ON_BMP) }; #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr((S) ? &status_hotend_on_gfx[(N) % (STATUS_HOTEND_BITMAPS)] : &status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)]) #else #define HOTEND_BITMAP(N,S) (unsigned char*)pgm_read_ptr(&status_hotend_gfx[(N) % (STATUS_HOTEND_BITMAPS)]) @@ -239,31 +264,33 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons #define HOTEND_BITMAP(N,S) status_hotend_a_bmp #endif - if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_BOT)) { + #if DISABLED(STATUS_COMBINE_HEATERS) - #define BAR_TALL (STATUS_HEATERS_HEIGHT - 2) + if (PAGE_CONTAINS(STATUS_HEATERS_Y, STATUS_HEATERS_BOT)) { - const float prop = target - 20, - perc = prop > 0 && temp >= 20 ? (temp - 20) / prop : 0; - uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f); - NOMORE(tall, BAR_TALL); + #define BAR_TALL (STATUS_HEATERS_HEIGHT - 2) + + const float prop = target - 20, + perc = prop > 0 && temp >= 20 ? (temp - 20) / prop : 0; + uint8_t tall = uint8_t(perc * BAR_TALL + 0.5f); + NOMORE(tall, BAR_TALL); - #if ANIM_HOTEND // Draw hotend bitmap, either whole or split by the heating percent const uint8_t hx = STATUS_HOTEND_X(heater_id), bw = STATUS_HOTEND_BYTEWIDTH(heater_id); #if ENABLED(STATUS_HEAT_PERCENT) if (isHeat && tall <= BAR_TALL) { const uint8_t ph = STATUS_HEATERS_HEIGHT - 1 - tall; - u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, ph, HOTEND_BITMAP(heater_id, false)); - u8g.drawBitmapP(hx, STATUS_HEATERS_Y + ph, bw, tall + 1, HOTEND_BITMAP(heater_id, true) + ph * bw); + u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, ph, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), false)); + u8g.drawBitmapP(hx, STATUS_HEATERS_Y + ph, bw, tall + 1, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), true) + ph * bw); } else #endif - u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(heater_id, isHeat)); - #endif + u8g.drawBitmapP(hx, STATUS_HEATERS_Y, bw, STATUS_HEATERS_HEIGHT, HOTEND_BITMAP(TERN(HAS_MMU, active_extruder, heater_id), isHeat)); - } // PAGE_CONTAINS + } // PAGE_CONTAINS + + #endif // !STATUS_COMBINE_HEATERS if (PAGE_UNDER(7)) { #if HEATER_IDLE_HANDLER @@ -271,11 +298,11 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons #else constexpr bool dodraw = true; #endif - if (dodraw) _draw_centered_temp(target + 0.5, tx, 7); + if (dodraw) _draw_centered_temp(target, tx, 7); } if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1)) - _draw_centered_temp(temp + 0.5f, tx, 28); + _draw_centered_temp(temp, tx, 28); if (STATIC_HOTEND && HOTEND_DOT && PAGE_CONTAINS(17, 19)) { u8g.setColorIndex(0); // set to white on black @@ -297,8 +324,8 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons const uint8_t tx = STATUS_BED_TEXT_X; - const float temp = thermalManager.degBed(), - target = thermalManager.degTargetBed(); + const celsius_t temp = thermalManager.wholeDegBed(), + target = thermalManager.degTargetBed(); #if ENABLED(STATUS_HEAT_PERCENT) || DISABLED(STATUS_BED_ANIM) const bool isHeat = BED_ALT(); @@ -344,11 +371,11 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons #else constexpr bool dodraw = true; #endif - if (dodraw) _draw_centered_temp(target + 0.5, tx, 7); + if (dodraw) _draw_centered_temp(target, tx, 7); } if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1)) - _draw_centered_temp(temp + 0.5f, tx, 28); + _draw_centered_temp(temp, tx, 28); if (STATIC_BED && BED_DOT && PAGE_CONTAINS(17, 19)) { u8g.setColorIndex(0); // set to white on black @@ -361,18 +388,36 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t tx, cons #endif // DO_DRAW_BED #if DO_DRAW_CHAMBER - FORCE_INLINE void _draw_chamber_status() { #if HAS_HEATED_CHAMBER if (PAGE_UNDER(7)) - _draw_centered_temp(thermalManager.degTargetChamber() + 0.5f, STATUS_CHAMBER_TEXT_X, 7); + _draw_centered_temp(thermalManager.degTargetChamber(), STATUS_CHAMBER_TEXT_X, 7); #endif + if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1)) + _draw_centered_temp(thermalManager.wholeDegChamber(), STATUS_CHAMBER_TEXT_X, 28); + } +#endif + +#if DO_DRAW_COOLER + FORCE_INLINE void _draw_cooler_status() { + if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1)) + _draw_centered_temp(thermalManager.wholeDegCooler(), STATUS_COOLER_TEXT_X, 28); + } +#endif +#if DO_DRAW_FLOWMETER + FORCE_INLINE void _draw_flowmeter_status() { if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1)) - _draw_centered_temp(thermalManager.degChamber() + 0.5f, STATUS_CHAMBER_TEXT_X, 28); + _draw_centered_flowrate(cooler.flowrate, STATUS_FLOWMETER_TEXT_X, 28); } +#endif -#endif // DO_DRAW_CHAMBER +#if DO_DRAW_AMMETER + FORCE_INLINE void _draw_ammeter_status() { + if (PAGE_CONTAINS(28 - INFO_FONT_ASCENT, 28 - 1)) + _draw_centered_current(ammeter.read(), STATUS_AMMETER_TEXT_X, 28); + } +#endif // // Before homing, blink '123' <-> '???'. @@ -411,13 +456,13 @@ void MarlinUI::draw_status_screen() { #endif #if HAS_PRINT_PROGRESS - #if DISABLED(DOGM_SD_PERCENT) + #if DISABLED(SHOW_SD_PERCENT) #define _SD_INFO_X(len) (PROGRESS_BAR_X + (PROGRESS_BAR_WIDTH) / 2 - (len) * (MENU_FONT_WIDTH) / 2) #else #define _SD_INFO_X(len) (LCD_PIXEL_WIDTH - (len) * (MENU_FONT_WIDTH)) #endif - #if ENABLED(DOGM_SD_PERCENT) + #if ENABLED(SHOW_SD_PERCENT) static char progress_string[5]; #endif static uint8_t lastElapsed = 0xFF, lastProgress = 0xFF; @@ -426,7 +471,7 @@ void MarlinUI::draw_status_screen() { #if ENABLED(SHOW_REMAINING_TIME) static u8g_uint_t estimation_x_pos = 0; static char estimation_string[10]; - #if BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY) + #if BOTH(SHOW_SD_PERCENT, ROTATE_PROGRESS_DISPLAY) static u8g_uint_t progress_x_pos = 0; static uint8_t progress_state = 0; static bool prev_blink = 0; @@ -434,21 +479,21 @@ void MarlinUI::draw_status_screen() { #endif #endif - const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive() || marlin_state == MF_SD_COMPLETE); + const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive()); // At the first page, generate new display values if (first_page) { #if ANIM_HBCC uint8_t new_bits = 0; #if ANIM_HOTEND - HOTEND_LOOP() if (thermalManager.isHeatingHotend(e)) SBI(new_bits, HEATBIT_HOTEND + e); + HOTEND_LOOP() if (thermalManager.isHeatingHotend(e)) SBI(new_bits, DRAWBIT_HOTEND + e); #endif - if (TERN0(ANIM_BED, thermalManager.isHeatingBed())) SBI(new_bits, HEATBIT_BED); + if (TERN0(ANIM_BED, thermalManager.isHeatingBed())) SBI(new_bits, DRAWBIT_BED); #if DO_DRAW_CHAMBER && HAS_HEATED_CHAMBER - if (thermalManager.isHeatingChamber()) SBI(new_bits, HEATBIT_CHAMBER); + if (thermalManager.isHeatingChamber()) SBI(new_bits, DRAWBIT_CHAMBER); #endif - if (TERN0(ANIM_CUTTER, cutter.enabled())) SBI(new_bits, HEATBIT_CUTTER); - heat_bits = new_bits; + if (TERN0(ANIM_CUTTER, cutter.enabled())) SBI(new_bits, DRAWBIT_CUTTER); + draw_bits = new_bits; #endif const xyz_pos_t lpos = current_position.asLogical(); @@ -481,7 +526,7 @@ void MarlinUI::draw_status_screen() { progress_bar_solid_width = u8g_uint_t((PROGRESS_BAR_WIDTH - 2) * (progress / (PROGRESS_SCALE)) * 0.01f); - #if ENABLED(DOGM_SD_PERCENT) + #if ENABLED(SHOW_SD_PERCENT) if (progress == 0) { progress_string[0] = '\0'; #if ENABLED(SHOW_REMAINING_TIME) @@ -498,7 +543,7 @@ void MarlinUI::draw_status_screen() { #endif } - constexpr bool can_show_days = DISABLED(DOGM_SD_PERCENT) || ENABLED(ROTATE_PROGRESS_DISPLAY); + constexpr bool can_show_days = DISABLED(SHOW_SD_PERCENT) || ENABLED(ROTATE_PROGRESS_DISPLAY); if (ev != lastElapsed) { lastElapsed = ev; const uint8_t len = elapsed.toDigital(elapsed_string, can_show_days && elapsed.value >= 60*60*24L); @@ -519,11 +564,7 @@ void MarlinUI::draw_status_screen() { else { duration_t estimation = timeval; const uint8_t len = estimation.toDigital(estimation_string, can_show_days && estimation.value >= 60*60*24L); - estimation_x_pos = _SD_INFO_X(len - #if !BOTH(DOGM_SD_PERCENT, ROTATE_PROGRESS_DISPLAY) - + 1 - #endif - ); + estimation_x_pos = _SD_INFO_X(len + !BOTH(SHOW_SD_PERCENT, ROTATE_PROGRESS_DISPLAY)); } } #endif @@ -631,12 +672,45 @@ void MarlinUI::draw_status_screen() { } #endif + // Laser Cooler + #if DO_DRAW_COOLER + const uint8_t coolery = STATUS_COOLER_Y(status_cooler_bmp1), + coolerh = STATUS_COOLER_HEIGHT(status_cooler_bmp1); + if (PAGE_CONTAINS(coolery, coolery + coolerh - 1)) + u8g.drawBitmapP(STATUS_COOLER_X, coolery, STATUS_COOLER_BYTEWIDTH, coolerh, blink && cooler.enabled ? status_cooler_bmp2 : status_cooler_bmp1); + #endif + + // Laser Cooler Flow Meter + #if DO_DRAW_FLOWMETER + const uint8_t flowmetery = STATUS_FLOWMETER_Y(status_flowmeter_bmp1), + flowmeterh = STATUS_FLOWMETER_HEIGHT(status_flowmeter_bmp1); + if (PAGE_CONTAINS(flowmetery, flowmetery + flowmeterh - 1)) + u8g.drawBitmapP(STATUS_FLOWMETER_X, flowmetery, STATUS_FLOWMETER_BYTEWIDTH, flowmeterh, blink && cooler.flowpulses ? status_flowmeter_bmp2 : status_flowmeter_bmp1); + #endif + + // Laser Ammeter + #if DO_DRAW_AMMETER + const uint8_t ammetery = STATUS_AMMETER_Y(status_ammeter_bmp_mA), + ammeterh = STATUS_AMMETER_HEIGHT(status_ammeter_bmp_mA); + if (PAGE_CONTAINS(ammetery, ammetery + ammeterh - 1)) + u8g.drawBitmapP(STATUS_AMMETER_X, ammetery, STATUS_AMMETER_BYTEWIDTH, ammeterh, (ammeter.current < 0.1f) ? status_ammeter_bmp_mA : status_ammeter_bmp_A); + #endif + // Heated Bed TERN_(DO_DRAW_BED, _draw_bed_status(blink)); // Heated Chamber TERN_(DO_DRAW_CHAMBER, _draw_chamber_status()); + // Cooler + TERN_(DO_DRAW_COOLER, _draw_cooler_status()); + + // Flowmeter + TERN_(DO_DRAW_FLOWMETER, _draw_flowmeter_status()); + + // Flowmeter + TERN_(DO_DRAW_AMMETER, _draw_ammeter_status()); + // Fan, if a bitmap was provided #if DO_DRAW_FAN if (PAGE_CONTAINS(STATUS_FAN_TEXT_Y - INFO_FONT_ASCENT, STATUS_FAN_TEXT_Y - 1)) { @@ -649,7 +723,7 @@ void MarlinUI::draw_status_screen() { c = '*'; } #endif - lcd_put_u8str(STATUS_FAN_TEXT_X, STATUS_FAN_TEXT_Y, i16tostr3rj(thermalManager.fanPercent(spd))); + lcd_put_u8str(STATUS_FAN_TEXT_X, STATUS_FAN_TEXT_Y, i16tostr3rj(thermalManager.pwmToPercent(spd))); lcd_put_wchar(c); } } @@ -689,7 +763,7 @@ void MarlinUI::draw_status_screen() { if (PAGE_CONTAINS(EXTRAS_BASELINE - INFO_FONT_ASCENT, EXTRAS_BASELINE - 1)) { - #if ALL(DOGM_SD_PERCENT, SHOW_REMAINING_TIME, ROTATE_PROGRESS_DISPLAY) + #if ALL(SHOW_SD_PERCENT, SHOW_REMAINING_TIME, ROTATE_PROGRESS_DISPLAY) if (prev_blink != blink) { prev_blink = blink; @@ -711,13 +785,13 @@ void MarlinUI::draw_status_screen() { lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string); } - #else // !DOGM_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY + #else // !SHOW_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY // // SD Percent Complete // - #if ENABLED(DOGM_SD_PERCENT) + #if ENABLED(SHOW_SD_PERCENT) if (progress_string[0]) { lcd_put_u8str(55, EXTRAS_BASELINE, progress_string); // Percent complete lcd_put_wchar('%'); @@ -737,7 +811,7 @@ void MarlinUI::draw_status_screen() { #endif lcd_put_u8str(elapsed_x_pos, EXTRAS_BASELINE, elapsed_string); - #endif // !DOGM_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY + #endif // !SHOW_SD_PERCENT || !SHOW_REMAINING_TIME || !ROTATE_PROGRESS_DISPLAY } #endif // HAS_PRINT_PROGRESS @@ -788,19 +862,25 @@ void MarlinUI::draw_status_screen() { mix_label = PSTR("Mx"); } - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wformat-overflow" + #if GCC_VERSION <= 50000 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wformat-overflow" + #endif sprintf_P(mixer_messages, PSTR(S_FMT " %d;%d%% "), mix_label, int(mixer.mix[0]), int(mixer.mix[1])); lcd_put_u8str(X_LABEL_POS, XYZ_BASELINE, mixer_messages); - #pragma GCC diagnostic pop + #if GCC_VERSION <= 50000 + #pragma GCC diagnostic pop + #endif #else if (show_e_total) { - _draw_axis_value(E_AXIS, xstring, true); - lcd_put_u8str_P(PSTR(" ")); + #if ENABLED(LCD_SHOW_E_TOTAL) + _draw_axis_value(E_AXIS, xstring, true); + lcd_put_u8str_P(PSTR(" ")); + #endif } else { _draw_axis_value(X_AXIS, xstring, blink); @@ -908,13 +988,16 @@ void MarlinUI::draw_status_message(const bool blink) { // If the remaining string doesn't completely fill the screen if (rlen < lcd_width) { - lcd_put_wchar('.'); // Always at 1+ spaces left, draw a dot uint8_t chars = lcd_width - rlen; // Amount of space left in characters - if (--chars) { // Draw a second dot if there's space - lcd_put_wchar('.'); - if (--chars) { // Print a second copy of the message - lcd_put_u8str_max(status_message, pixel_width - (rlen + 2) * (MENU_FONT_WIDTH)); + lcd_put_wchar(' '); // Always at 1+ spaces left, draw a space + if (--chars) { // Draw a second space if there's room + lcd_put_wchar(' '); + if (--chars) { // Draw a third space if there's room lcd_put_wchar(' '); + if (--chars) { // Print a second copy of the message + lcd_put_u8str_max(status_message, pixel_width - (rlen + 2) * (MENU_FONT_WIDTH)); + lcd_put_wchar(' '); + } } } } diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp index a538121d2cf6..be112c8d549e 100644 --- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp +++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp @@ -447,7 +447,7 @@ void ST7920_Lite_Status_Screen::draw_static_elements() { * data buffer (DDRAM) to be used in conjunction with the graphics * bitmap buffer (CGRAM). The contents of the graphics buffer is * XORed with the data from the character generator. This allows - * us to make the progess bar out of graphical data (the bar) and + * us to make the progress bar out of graphical data (the bar) and * text data (the percentage). */ void ST7920_Lite_Status_Screen::draw_progress_bar(const uint8_t value) { @@ -536,7 +536,9 @@ void ST7920_Lite_Status_Screen::draw_heat_icon(const bool whichIcon, const bool static struct { bool E1_show_target : 1; bool E2_show_target : 1; - TERN_(HAS_HEATED_BED, bool bed_show_target : 1); + #if HAS_HEATED_BED + bool bed_show_target : 1; + #endif } display_state = { true, true, TERN_(HAS_HEATED_BED, true) }; @@ -640,11 +642,14 @@ void ST7920_Lite_Status_Screen::draw_status_message() { // If the remaining string doesn't completely fill the screen if (rlen < TEXT_MODE_LCD_WIDTH) { - write_byte('.'); // Always at 1+ spaces left, draw a dot - uint8_t chars = TEXT_MODE_LCD_WIDTH - rlen; // Amount of space left in characters - if (--chars) { // Draw a second dot if there's space - write_byte('.'); - if (--chars) write_str(str, chars); // Print a second copy of the message + uint8_t chars = TEXT_MODE_LCD_WIDTH - rlen; // Amount of space left in characters + write_byte(' '); // Always at 1+ spaces left, draw a space + if (--chars) { // Draw a second space if there's room + write_byte(' '); + if (--chars) { // Draw a third space if there's room + write_byte(' '); + if (--chars) write_str(str, chars); // Print a second copy of the message + } } } ui.advance_status_scroll(); @@ -691,15 +696,15 @@ bool ST7920_Lite_Status_Screen::indicators_changed() { // We only add the target temperatures to the checksum // because the actual temps fluctuate so by updating // them only during blinks we gain a bit of stability. - const bool blink = ui.get_blink(); - const uint16_t feedrate_perc = feedrate_percentage; - const uint16_t fs = thermalManager.scaledFanSpeed(0); - const int16_t extruder_1_target = thermalManager.degTargetHotend(0); + const bool blink = ui.get_blink(); + const uint16_t feedrate_perc = feedrate_percentage; + const uint16_t fs = thermalManager.scaledFanSpeed(0); + const celsius_t extruder_1_target = thermalManager.degTargetHotend(0); #if HAS_MULTI_HOTEND - const int16_t extruder_2_target = thermalManager.degTargetHotend(1); + const celsius_t extruder_2_target = thermalManager.degTargetHotend(1); #endif #if HAS_HEATED_BED - const int16_t bed_target = thermalManager.degTargetBed(); + const celsius_t bed_target = thermalManager.degTargetBed(); #endif static uint16_t last_checksum = 0; const uint16_t checksum = blink ^ feedrate_perc ^ fs ^ extruder_1_target @@ -712,33 +717,31 @@ bool ST7920_Lite_Status_Screen::indicators_changed() { void ST7920_Lite_Status_Screen::update_indicators(const bool forceUpdate) { if (forceUpdate || indicators_changed()) { - const bool blink = ui.get_blink(); - const duration_t elapsed = print_job_timer.duration(); - duration_t remaining = TERN0(USE_M73_REMAINING_TIME, ui.get_remaining_time()); - const uint16_t feedrate_perc = feedrate_percentage; - const int16_t extruder_1_temp = thermalManager.degHotend(0), - extruder_1_target = thermalManager.degTargetHotend(0); + const bool blink = ui.get_blink(); + const duration_t elapsed = print_job_timer.duration(); + duration_t remaining = TERN0(USE_M73_REMAINING_TIME, ui.get_remaining_time()); + const uint16_t feedrate_perc = feedrate_percentage; + const celsius_t extruder_1_temp = thermalManager.wholeDegHotend(0), + extruder_1_target = thermalManager.degTargetHotend(0); #if HAS_MULTI_HOTEND - const int16_t extruder_2_temp = thermalManager.degHotend(1), - extruder_2_target = thermalManager.degTargetHotend(1); + const celsius_t extruder_2_temp = thermalManager.wholeDegHotend(1), + extruder_2_target = thermalManager.degTargetHotend(1); #endif #if HAS_HEATED_BED - const int16_t bed_temp = thermalManager.degBed(), - bed_target = thermalManager.degTargetBed(); + const celsius_t bed_temp = thermalManager.wholeDegBed(), + bed_target = thermalManager.degTargetBed(); #endif draw_extruder_1_temp(extruder_1_temp, extruder_1_target, forceUpdate); TERN_(HAS_MULTI_HOTEND, draw_extruder_2_temp(extruder_2_temp, extruder_2_target, forceUpdate)); TERN_(HAS_HEATED_BED, draw_bed_temp(bed_temp, bed_target, forceUpdate)); - uint16_t spd = thermalManager.fan_speed[0]; - + uint8_t spd = thermalManager.fan_speed[0]; #if ENABLED(ADAPTIVE_FAN_SLOWING) if (!blink && thermalManager.fan_speed_scaler[0] < 128) spd = thermalManager.scaledFanSpeed(0, spd); #endif - - draw_fan_speed(thermalManager.fanPercent(spd)); + draw_fan_speed(thermalManager.pwmToPercent(spd)); // Draw elapsed/remaining time const bool show_remaining = ENABLED(SHOW_REMAINING_TIME) && (DISABLED(ROTATE_PROGRESS_DISPLAY) || blink); diff --git a/Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp b/Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp index 8ba19216b113..6d40ea0d4b47 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_ssd1309_12864.cpp @@ -19,12 +19,13 @@ * along with this program. If not, see . * */ + #include "../../inc/MarlinConfigPre.h" #if HAS_MARLINUI_U8GLIB #include "HAL_LCD_com_defines.h" -#include +#include #define WIDTH 128 #define HEIGHT 64 @@ -88,7 +89,7 @@ static const uint8_t u8g_dev_ssd13xx_sleep_off[] PROGMEM = { }; uint8_t u8g_dev_ssd1309_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) { - switch(msg) { + switch (msg) { case U8G_DEV_MSG_INIT: u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS); u8g_WriteEscSeqP(u8g, dev, u8g_dev_ssd1309_128x64_init_seq); diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp index 84c10dbb4d2e..fda090338ca1 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp @@ -57,7 +57,7 @@ #if HAS_MARLINUI_U8GLIB -#include +#include #include "HAL_LCD_com_defines.h" #define WIDTH 128 diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp index aa5f990898f6..fde6e41792dc 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp @@ -73,7 +73,7 @@ static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = { 0x038, // 8 Bit interface (DL=1), basic instruction set (RE=0) 0x00C, // display on, cursor & blink off; 0x08: all off 0x006, // Entry mode: Cursor move to right, DDRAM address counter (AC) plus 1, no shift - 0x002, // disable scroll, enable CGRAM adress + 0x002, // disable scroll, enable CGRAM address 0x001, // clear RAM, needs 1.6 ms U8G_ESC_DLY(100), // delay 100 ms diff --git a/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp b/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp index 7f88df7bc41f..df7b4000a99f 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp @@ -55,14 +55,14 @@ #include "../../inc/MarlinConfig.h" -#if HAS_MARLINUI_U8GLIB && (PIN_EXISTS(FSMC_CS) || HAS_SPI_GRAPHICAL_TFT) +#if HAS_MARLINUI_U8GLIB && (PIN_EXISTS(FSMC_CS) || HAS_SPI_GRAPHICAL_TFT || HAS_LTDC_GRAPHICAL_TFT) #include "HAL_LCD_com_defines.h" #include "marlinui_DOGM.h" #include -#if EITHER(LCD_USE_DMA_FSMC, LCD_USE_DMA_SPI) +#if ANY(LCD_USE_DMA_FSMC, LCD_USE_DMA_SPI, HAS_LTDC_GRAPHICAL_TFT) #define HAS_LCD_IO 1 #endif @@ -73,17 +73,23 @@ TFT_IO tftio; #define HEIGHT LCD_PIXEL_HEIGHT #define PAGE_HEIGHT 8 -#include "../touch/touch_buttons.h" - #if ENABLED(TOUCH_SCREEN_CALIBRATION) #include "../tft_io/touch_calibration.h" #include "../marlinui.h" #endif +#if HAS_TOUCH_BUTTONS + #include "../touch/touch_buttons.h" + #if HAS_TOUCH_SLEEP + #define HAS_TOUCH_BUTTONS_SLEEP 1 + #endif +#endif + #define X_HI (UPSCALE(TFT_PIXEL_OFFSET_X, WIDTH) - 1) #define Y_HI (UPSCALE(TFT_PIXEL_OFFSET_Y, HEIGHT) - 1) -// see https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html +// 16 bit color generator: https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html +// RGB565 color picker: https://trolsoft.ru/en/articles/rgb565-color-picker #define COLOR_BLACK 0x0000 // #000000 #define COLOR_WHITE 0xFFFF // #FFFFFF @@ -91,7 +97,7 @@ TFT_IO tftio; #define COLOR_GREY 0x7BEF // #808080 #define COLOR_DARKGREY 0x4208 // #404040 #define COLOR_DARKGREY2 0x39E7 // #303030 -#define COLOR_DARK 0x0003 // Some dark color +#define COLOR_DARK 0x0003 // #000019 #define COLOR_RED 0xF800 // #FF0000 #define COLOR_LIME 0x7E00 // #00FF00 @@ -311,7 +317,7 @@ static void setWindow(u8g_t *u8g, u8g_dev_t *dev, uint16_t Xmin, uint16_t Ymin, // Used to fill RGB565 (16bits) background inline void memset2(const void *ptr, uint16_t fill, size_t cnt) { - uint16_t* wptr = (uint16_t*)ptr; + uint16_t *wptr = (uint16_t*)ptr; for (size_t i = 0; i < cnt; i += 2) { *wptr = fill; wptr++; } } @@ -339,6 +345,18 @@ static uint8_t page; } #endif // HAS_TOUCH_BUTTONS +static void u8g_upscale_clear_lcd(u8g_t *u8g, u8g_dev_t *dev, uint16_t *buffer) { + setWindow(u8g, dev, 0, 0, (TFT_WIDTH) - 1, (TFT_HEIGHT) - 1); + #if HAS_LCD_IO + UNUSED(buffer); + tftio.WriteMultiple(TFT_MARLINBG_COLOR, (TFT_WIDTH) * (TFT_HEIGHT)); + #else + memset2(buffer, TFT_MARLINBG_COLOR, (TFT_WIDTH) / 2); + for (uint16_t i = 0; i < (TFT_HEIGHT) * sq(GRAPHICAL_TFT_UPSCALE); i++) + u8g_WriteSequence(u8g, dev, (TFT_WIDTH) / 2, (uint8_t *)buffer); + #endif +} + static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) { @@ -346,7 +364,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u #if HAS_LCD_IO static uint16_t bufferA[WIDTH * sq(GRAPHICAL_TFT_UPSCALE)], bufferB[WIDTH * sq(GRAPHICAL_TFT_UPSCALE)]; - uint16_t* buffer = &bufferA[0]; + uint16_t *buffer = &bufferA[0]; #else uint16_t buffer[WIDTH * GRAPHICAL_TFT_UPSCALE]; // 16-bit RGB 565 pixel line buffer #endif @@ -364,34 +382,37 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u tftio.Init(); tftio.InitTFT(); TERN_(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration_reset()); - - // Clear Screen - setWindow(u8g, dev, 0, 0, (TFT_WIDTH) - 1, (TFT_HEIGHT) - 1); - #if HAS_LCD_IO - tftio.WriteMultiple(TFT_MARLINBG_COLOR, (TFT_WIDTH) * (TFT_HEIGHT)); - #else - memset2(buffer, TFT_MARLINBG_COLOR, (TFT_WIDTH) / 2); - for (uint16_t i = 0; i < (TFT_HEIGHT) * sq(GRAPHICAL_TFT_UPSCALE); i++) - u8g_WriteSequence(u8g, dev, (TFT_WIDTH) / 2, (uint8_t *)buffer); - #endif + u8g_upscale_clear_lcd(u8g, dev, buffer); return 0; case U8G_DEV_MSG_STOP: preinit = true; break; - case U8G_DEV_MSG_PAGE_FIRST: + case U8G_DEV_MSG_PAGE_FIRST: { page = 0; + #if HAS_TOUCH_BUTTONS_SLEEP + static bool sleepCleared; + if (touchBt.isSleeping()) { + if (!sleepCleared) { + sleepCleared = true; + u8g_upscale_clear_lcd(u8g, dev, buffer); + IF_ENABLED(HAS_TOUCH_BUTTONS, redrawTouchButtons = true); + } + break; + } + else + sleepCleared = false; + #endif TERN_(HAS_TOUCH_BUTTONS, drawTouchButtons(u8g, dev)); setWindow(u8g, dev, TFT_PIXEL_OFFSET_X, TFT_PIXEL_OFFSET_Y, X_HI, Y_HI); - break; + } break; case U8G_DEV_MSG_PAGE_NEXT: + if (TERN0(HAS_TOUCH_BUTTONS_SLEEP, touchBt.isSleeping())) break; if (++page > (HEIGHT / PAGE_HEIGHT)) return 1; LOOP_L_N(y, PAGE_HEIGHT) { uint32_t k = 0; - #if HAS_LCD_IO - buffer = (y & 1) ? bufferB : bufferA; - #endif + TERN_(HAS_LCD_IO, buffer = (y & 1) ? bufferB : bufferA); for (uint16_t i = 0; i < (uint32_t)pb->width; i++) { const uint8_t b = *(((uint8_t *)pb->buf) + i); const uint16_t c = TEST(b, y) ? TFT_MARLINUI_COLOR : TFT_MARLINBG_COLOR; @@ -404,7 +425,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u tftio.WriteSequence(buffer, COUNT(bufferA)); #else - uint8_t* bufptr = (uint8_t*) buffer; + uint8_t *bufptr = (uint8_t*) buffer; for (uint8_t i = GRAPHICAL_TFT_UPSCALE; i--;) { LOOP_S_L_N(n, 0, GRAPHICAL_TFT_UPSCALE * 2) { u8g_WriteSequence(u8g, dev, WIDTH, &bufptr[WIDTH * n]); diff --git a/Marlin/src/lcd/dogm/u8g_fontutf8.h b/Marlin/src/lcd/dogm/u8g_fontutf8.h index 34e365cf9553..9760ef106bd1 100644 --- a/Marlin/src/lcd/dogm/u8g_fontutf8.h +++ b/Marlin/src/lcd/dogm/u8g_fontutf8.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include "../fontutils.h" // the macro to indicate a UTF-8 string @@ -35,3 +35,6 @@ int uxg_GetUtf8StrPixelWidth(u8g_t *pu8g, const char *utf8_msg); int uxg_GetUtf8StrPixelWidthP(u8g_t *pu8g, PGM_P utf8_msg); #define uxg_GetFont(puxg) ((puxg)->font) + +#define _LANG_FONT_INFO(L) g_fontinfo_##L +#define LANG_FONT_INFO(L) _LANG_FONT_INFO(L) diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index 8542424d7efd..9367ed75a98b 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -33,68 +33,64 @@ #include "ultralcd_st7920_u8glib_rrd_AVR.h" -#if F_CPU >= 20000000 - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(0) - #define CPU_ST7920_DELAY_3 DELAY_NS(50) -#elif MB(3DRAG, K8200, K8400) - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(188) - #define CPU_ST7920_DELAY_3 DELAY_NS(0) -#elif MB(MINIRAMBO, EINSY_RAMBO, EINSY_RETRO, SILVER_GATE) - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(250) - #define CPU_ST7920_DELAY_3 DELAY_NS(0) -#elif MB(RAMBO) - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(0) - #define CPU_ST7920_DELAY_3 DELAY_NS(0) -#elif MB(BQ_ZUM_MEGA_3D) - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(0) - #define CPU_ST7920_DELAY_3 DELAY_NS(189) -#elif defined(ARDUINO_ARCH_STM32) - #define CPU_ST7920_DELAY_1 DELAY_NS(300) - #define CPU_ST7920_DELAY_2 DELAY_NS(40) - #define CPU_ST7920_DELAY_3 DELAY_NS(340) -#elif F_CPU == 16000000 - #define CPU_ST7920_DELAY_1 DELAY_NS(0) - #define CPU_ST7920_DELAY_2 DELAY_NS(0) - #define CPU_ST7920_DELAY_3 DELAY_NS(63) -#else - #error "No valid condition for delays in 'ultralcd_st7920_u8glib_rrd_AVR.h'" -#endif +// Optimize this code with -O3 +#pragma GCC optimize (3) #ifndef ST7920_DELAY_1 - #ifdef BOARD_ST7920_DELAY_1 - #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1 + #ifndef LCD_ST7920_DELAY_1 + #define LCD_ST7920_DELAY_1 0 + #endif + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 0 + #endif + #ifndef CPU_ST7920_DELAY_1 + #define CPU_ST7920_DELAY_1 0 + #endif + #if LCD_ST7920_DELAY_1 || BOARD_ST7920_DELAY_1 || CPU_ST7920_DELAY_1 + #define ST7920_DELAY_1 DELAY_NS(_MAX(LCD_ST7920_DELAY_1, BOARD_ST7920_DELAY_1, CPU_ST7920_DELAY_1)) #else - #define ST7920_DELAY_1 CPU_ST7920_DELAY_1 + #define ST7920_DELAY_1 #endif #endif #ifndef ST7920_DELAY_2 - #ifdef BOARD_ST7920_DELAY_2 - #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2 + #ifndef LCD_ST7920_DELAY_2 + #define LCD_ST7920_DELAY_2 0 + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 0 + #endif + #ifndef CPU_ST7920_DELAY_2 + #define CPU_ST7920_DELAY_2 0 + #endif + #if LCD_ST7920_DELAY_2 || BOARD_ST7920_DELAY_2 || CPU_ST7920_DELAY_2 + #define ST7920_DELAY_2 DELAY_NS(_MAX(LCD_ST7920_DELAY_2, BOARD_ST7920_DELAY_2, CPU_ST7920_DELAY_2)) #else - #define ST7920_DELAY_2 CPU_ST7920_DELAY_2 + #define ST7920_DELAY_2 #endif #endif #ifndef ST7920_DELAY_3 - #ifdef BOARD_ST7920_DELAY_3 - #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3 + #ifndef LCD_ST7920_DELAY_3 + #define LCD_ST7920_DELAY_3 0 + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 0 + #endif + #ifndef CPU_ST7920_DELAY_3 + #define CPU_ST7920_DELAY_3 0 + #endif + #if LCD_ST7920_DELAY_3 || BOARD_ST7920_DELAY_3 || CPU_ST7920_DELAY_3 + #define ST7920_DELAY_3 DELAY_NS(_MAX(LCD_ST7920_DELAY_3, BOARD_ST7920_DELAY_3, CPU_ST7920_DELAY_3)) #else - #define ST7920_DELAY_3 CPU_ST7920_DELAY_3 + #define ST7920_DELAY_3 #endif #endif -// Optimize this code with -O3 -#pragma GCC optimize (3) - #ifdef ARDUINO_ARCH_STM32F1 #define ST7920_DAT(V) !!((V) & 0x80) #else #define ST7920_DAT(V) ((V) & 0x80) #endif + #define ST7920_SND_BIT do{ \ WRITE(ST7920_CLK_PIN, LOW); ST7920_DELAY_1; \ WRITE(ST7920_DAT_PIN, ST7920_DAT(val)); ST7920_DELAY_2; \ @@ -148,8 +144,8 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo case U8G_DEV_MSG_STOP: break; case U8G_DEV_MSG_PAGE_NEXT: { - uint8_t* ptr; - u8g_pb_t* pb = (u8g_pb_t*)(dev->dev_mem); + uint8_t *ptr; + u8g_pb_t *pb = (u8g_pb_t*)(dev->dev_mem); y = pb->p.page_y0; ptr = (uint8_t*)pb->buf; diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h index e8a48299cb19..446bfcfd4212 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.h @@ -35,7 +35,7 @@ #define PAGE_HEIGHT 16 // 256 byte framebuffer //#define PAGE_HEIGHT 32 // 512 byte framebuffer -#include +#include void ST7920_SWSPI_SND_8BIT(uint8_t val); diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp deleted file mode 100644 index 39f161f5adfc..000000000000 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ /dev/null @@ -1,3693 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * DWIN by Creality3D - */ - -#include "../../../inc/MarlinConfigPre.h" - -#if ENABLED(DWIN_CREALITY_LCD) - -#include "dwin.h" - -#if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) && DISABLED(PROBE_MANUALLY) - #define HAS_ONESTEP_LEVELING 1 -#endif - -#if ANY(BABYSTEPPING, HAS_BED_PROBE, HAS_WORKSPACE_OFFSET) - #define HAS_ZOFFSET_ITEM 1 -#endif - -#if !HAS_BED_PROBE && ENABLED(BABYSTEPPING) - #define JUST_BABYSTEP 1 -#endif - -#include -#include -#include - -#include "../../fontutils.h" -#include "../../marlinui.h" - -#include "../../../sd/cardreader.h" - -#include "../../../MarlinCore.h" -#include "../../../core/serial.h" -#include "../../../core/macros.h" -#include "../../../gcode/queue.h" - -#include "../../../module/temperature.h" -#include "../../../module/printcounter.h" -#include "../../../module/motion.h" -#include "../../../module/planner.h" - -#if ENABLED(EEPROM_SETTINGS) - #include "../../../module/settings.h" -#endif - -#if ENABLED(HOST_ACTION_COMMANDS) - #include "../../../feature/host_actions.h" -#endif - -#if HAS_ONESTEP_LEVELING - #include "../../../feature/bedlevel/bedlevel.h" -#endif - -#if HAS_BED_PROBE - #include "../../../module/probe.h" -#endif - -#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) - #include "../../../feature/babystep.h" -#endif - -#if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../feature/powerloss.h" -#endif - -#ifndef MACHINE_SIZE - #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS) -#endif -#ifndef CORP_WEBSITE_C - #define CORP_WEBSITE_C "www.cxsw3d.com" -#endif -#ifndef CORP_WEBSITE_E - #define CORP_WEBSITE_E "www.creality.com" -#endif - -#define PAUSE_HEAT - -#define USE_STRING_HEADINGS - -#define DWIN_FONT_MENU font8x16 -#define DWIN_FONT_STAT font10x20 -#define DWIN_FONT_HEAD font10x20 - -#define MENU_CHAR_LIMIT 24 -#define STATUS_Y 360 - -// Fan speed limit -#define FANON 255 -#define FANOFF 0 - -// Print speed limit -#define MAX_PRINT_SPEED 999 -#define MIN_PRINT_SPEED 10 - -// Temp limits -#if HAS_HOTEND - #define MAX_E_TEMP (HEATER_0_MAXTEMP - (HOTEND_OVERSHOOT)) - #define MIN_E_TEMP HEATER_0_MINTEMP -#endif - -#if HAS_HEATED_BED - #define MIN_BED_TEMP BED_MINTEMP -#endif - -// Feedspeed limit (max feedspeed = DEFAULT_MAX_FEEDRATE * 2) -#define MIN_MAXFEEDSPEED 1 -#define MIN_MAXACCELERATION 1 -#define MIN_MAXJERK 0.1 -#define MIN_STEP 1 - -#define FEEDRATE_E (60) - -// Minimum unit (0.1) : multiple (10) -#define UNITFDIGITS 1 -#define MINUNITMULT pow(10, UNITFDIGITS) - -#define ENCODER_WAIT 20 -#define DWIN_SCROLL_UPDATE_INTERVAL 2000 -#define DWIN_REMAIN_TIME_UPDATE_INTERVAL 20000 - -constexpr uint16_t TROWS = 6, MROWS = TROWS - 1, // Total rows, and other-than-Back - TITLE_HEIGHT = 30, // Title bar height - MLINE = 53, // Menu line height - LBLX = 60, // Menu item label X - MENU_CHR_W = 8, STAT_CHR_W = 10; - -#define MBASE(L) (49 + MLINE * (L)) - -#define BABY_Z_VAR TERN(HAS_BED_PROBE, probe.offset.z, dwin_zoffset) - -/* Value Init */ -HMI_value_t HMI_ValueStruct; -HMI_Flag_t HMI_flag{0}; - -millis_t dwin_heat_time = 0; - -uint8_t checkkey = 0; - -typedef struct { - uint8_t now, last; - void set(uint8_t v) { now = last = v; } - void reset() { set(0); } - bool changed() { bool c = (now != last); if (c) last = now; return c; } - bool dec() { if (now) now--; return changed(); } - bool inc(uint8_t v) { if (now < (v - 1)) now++; else now = (v - 1); return changed(); } -} select_t; - -select_t select_page{0}, select_file{0}, select_print{0}, select_prepare{0} - , select_control{0}, select_axis{0}, select_temp{0}, select_motion{0}, select_tune{0} - , select_PLA{0}, select_ABS{0} - , select_speed{0} - , select_acc{0} - , select_jerk{0} - , select_step{0} - ; - -uint8_t index_file = MROWS, - index_prepare = MROWS, - index_control = MROWS, - index_leveling = MROWS, - index_tune = MROWS; - -bool dwin_abort_flag = false; // Flag to reset feedrate, return to Home - -constexpr float default_max_feedrate[] = DEFAULT_MAX_FEEDRATE; -constexpr float default_max_acceleration[] = DEFAULT_MAX_ACCELERATION; - -#if HAS_CLASSIC_JERK - constexpr float default_max_jerk[] = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK }; -#endif - -uint8_t Percentrecord = 0; -uint16_t remain_time = 0; - -#if ENABLED(PAUSE_HEAT) - #if HAS_HOTEND - uint16_t temphot = 0; - #endif - #if HAS_HEATED_BED - uint16_t tempbed = 0; - #endif -#endif - -#if HAS_ZOFFSET_ITEM - float dwin_zoffset = 0, last_zoffset = 0; -#endif - -#define DWIN_LANGUAGE_EEPROM_ADDRESS 0x01 // Between 0x01 and 0x63 (EEPROM_OFFSET-1) - // BL24CXX::check() uses 0x00 - -inline bool HMI_IsChinese() { return HMI_flag.language == DWIN_CHINESE; } - -void HMI_SetLanguageCache() { - DWIN_JPG_CacheTo1(HMI_IsChinese() ? Language_Chinese : Language_English); -} - -void HMI_SetLanguage() { - #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) - BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); - #endif - HMI_SetLanguageCache(); -} - -void HMI_ToggleLanguage() { - HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE; - HMI_SetLanguageCache(); - #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) - BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); - #endif -} - -void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { - if (value < 0) { - DWIN_Draw_String(false, true, size, Color_White, bColor, x - 6, y, F("-")); - DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, -value); - } - else { - DWIN_Draw_String(false, true, size, Color_White, bColor, x - 6, y, F(" ")); - DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, value); - } -} - -void ICON_Print() { - if (select_page.now == 0) { - DWIN_ICON_Show(ICON, ICON_Print_1, 17, 130); - DWIN_Draw_Rectangle(0, Color_White, 17, 130, 126, 229); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 447, 28, 460, 58, 201); - else - DWIN_Frame_AreaCopy(1, 1, 451, 31, 463, 57, 201); - } - else { - DWIN_ICON_Show(ICON, ICON_Print_0, 17, 130); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 405, 28, 420, 58, 201); - else - DWIN_Frame_AreaCopy(1, 1, 423, 31, 435, 57, 201); - } -} - -void ICON_Prepare() { - if (select_page.now == 1) { - DWIN_ICON_Show(ICON, ICON_Prepare_1, 145, 130); - DWIN_Draw_Rectangle(0, Color_White, 145, 130, 254, 229); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 31, 447, 58, 460, 186, 201); - else - DWIN_Frame_AreaCopy(1, 33, 451, 82, 466, 175, 201); - } - else { - DWIN_ICON_Show(ICON, ICON_Prepare_0, 145, 130); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 31, 405, 58, 420, 186, 201); - else - DWIN_Frame_AreaCopy(1, 33, 423, 82, 438, 175, 201); - } -} - -void ICON_Control() { - if (select_page.now == 2) { - DWIN_ICON_Show(ICON, ICON_Control_1, 17, 246); - DWIN_Draw_Rectangle(0, Color_White, 17, 246, 126, 345); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 61, 447, 88, 460, 58, 318); - else - DWIN_Frame_AreaCopy(1, 85, 451, 132, 463, 48, 318); - } - else { - DWIN_ICON_Show(ICON, ICON_Control_0, 17, 246); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 61, 405, 88, 420, 58, 318); - else - DWIN_Frame_AreaCopy(1, 85, 423, 132, 434, 48, 318); - } -} - -void ICON_StartInfo(bool show) { - if (show) { - DWIN_ICON_Show(ICON, ICON_Info_1, 145, 246); - DWIN_Draw_Rectangle(0, Color_White, 145, 246, 254, 345); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 91, 447, 118, 460, 186, 318); - else - DWIN_Frame_AreaCopy(1, 132, 451, 159, 466, 186, 318); - } - else { - DWIN_ICON_Show(ICON, ICON_Info_0, 145, 246); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 91, 405, 118, 420, 186, 318); - else - DWIN_Frame_AreaCopy(1, 132, 423, 159, 435, 186, 318); - } -} - -void ICON_Leveling(bool show) { - if (show) { - DWIN_ICON_Show(ICON, ICON_Leveling_1, 145, 246); - DWIN_Draw_Rectangle(0, Color_White, 145, 246, 254, 345); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 211, 447, 238, 460, 186, 318); - else - DWIN_Frame_AreaCopy(1, 84, 437, 120, 449, 182, 318); - } - else { - DWIN_ICON_Show(ICON, ICON_Leveling_0, 145, 246); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 211, 405, 238, 420, 186, 318); - else - DWIN_Frame_AreaCopy(1, 84, 465, 120, 478, 182, 318); - } -} - -void ICON_Tune() { - if (select_print.now == 0) { - DWIN_ICON_Show(ICON, ICON_Setup_1, 8, 252); - DWIN_Draw_Rectangle(0, Color_White, 8, 252, 87, 351); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 121, 447, 148, 458, 34, 325); - else - DWIN_Frame_AreaCopy(1, 0, 466, 34, 476, 31, 325); - } - else { - DWIN_ICON_Show(ICON, ICON_Setup_0, 8, 252); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 121, 405, 148, 420, 34, 325); - else - DWIN_Frame_AreaCopy(1, 0, 438, 32, 448, 31, 325); - } -} - -void ICON_Pause() { - if (select_print.now == 1) { - DWIN_ICON_Show(ICON, ICON_Pause_1, 96, 252); - DWIN_Draw_Rectangle(0, Color_White, 96, 252, 175, 351); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 181, 447, 208, 459, 124, 325); - else - DWIN_Frame_AreaCopy(1, 177, 451, 216, 462, 116, 325); - } - else { - DWIN_ICON_Show(ICON, ICON_Pause_0, 96, 252); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 181, 405, 208, 420, 124, 325); - else - DWIN_Frame_AreaCopy(1, 177, 423, 215, 433, 116, 325); - } -} - -void ICON_Continue() { - if (select_print.now == 1) { - DWIN_ICON_Show(ICON, ICON_Continue_1, 96, 252); - DWIN_Draw_Rectangle(0, Color_White, 96, 252, 175, 351); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 447, 28, 460, 124, 325); - else - DWIN_Frame_AreaCopy(1, 1, 452, 32, 464, 121, 325); - } - else { - DWIN_ICON_Show(ICON, ICON_Continue_0, 96, 252); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 405, 28, 420, 124, 325); - else - DWIN_Frame_AreaCopy(1, 1, 424, 31, 434, 121, 325); - } -} - -void ICON_Stop() { - if (select_print.now == 2) { - DWIN_ICON_Show(ICON, ICON_Stop_1, 184, 252); - DWIN_Draw_Rectangle(0, Color_White, 184, 252, 263, 351); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 151, 447, 178, 459, 210, 325); - else - DWIN_Frame_AreaCopy(1, 218, 452, 249, 466, 209, 325); - } - else { - DWIN_ICON_Show(ICON, ICON_Stop_0, 184, 252); - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 151, 405, 178, 420, 210, 325); - else - DWIN_Frame_AreaCopy(1, 218, 423, 247, 436, 209, 325); - } -} - -inline void Clear_Title_Bar() { - DWIN_Draw_Rectangle(1, Color_Bg_Blue, 0, 0, DWIN_WIDTH, 30); -} - -inline void Draw_Title(const char * const title) { - DWIN_Draw_String(false, false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title); -} - -inline void Draw_Title(const __FlashStringHelper * title) { - DWIN_Draw_String(false, false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, (char*)title); -} - -inline void Clear_Menu_Area() { - DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, STATUS_Y); -} - -inline void Clear_Main_Window() { - Clear_Title_Bar(); - Clear_Menu_Area(); -} - -inline void Clear_Popup_Area() { - Clear_Title_Bar(); - DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, DWIN_HEIGHT); -} - -void Draw_Popup_Bkgd_105() { - DWIN_Draw_Rectangle(1, Color_Bg_Window, 14, 105, 258, 374); -} - -inline void Draw_More_Icon(const uint8_t line) { - DWIN_ICON_Show(ICON, ICON_More, 226, MBASE(line) - 3); -} - -inline void Draw_Menu_Cursor(const uint8_t line) { - // DWIN_ICON_Show(ICON,ICON_Rectangle, 0, MBASE(line) - 18); - DWIN_Draw_Rectangle(1, Rectangle_Color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); -} - -inline void Erase_Menu_Cursor(const uint8_t line) { - DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); -} - -inline void Move_Highlight(const int16_t from, const uint16_t newline) { - Erase_Menu_Cursor(newline - from); - Draw_Menu_Cursor(newline); -} - -inline void Add_Menu_Line() { - Move_Highlight(1, MROWS); - DWIN_Draw_Line(Line_Color, 16, MBASE(MROWS + 1) - 20, 256, MBASE(MROWS + 1) - 19); -} - -inline void Scroll_Menu(const uint8_t dir) { - DWIN_Frame_AreaMove(1, dir, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); - switch (dir) { - case DWIN_SCROLL_DOWN: Move_Highlight(-1, 0); break; - case DWIN_SCROLL_UP: Add_Menu_Line(); break; - } -} - -inline uint16_t nr_sd_menu_items() { - return card.get_num_Files() + !card.flag.workDirIsRoot; -} - -inline void Draw_Menu_Icon(const uint8_t line, const uint8_t icon) { - DWIN_ICON_Show(ICON, icon, 26, MBASE(line) - 3); -} - -inline void Erase_Menu_Text(const uint8_t line) { - DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(line) - 14, 271, MBASE(line) + 28); -} - -inline void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr) { - if (label) DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(line) - 1, (char*)label); - if (icon) Draw_Menu_Icon(line, icon); - DWIN_Draw_Line(Line_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 34); -} - -// The "Back" label is always on the first line -inline void Draw_Back_Label() { - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 129, 72, 156, 84, LBLX, MBASE(0)); - else - DWIN_Frame_AreaCopy(1, 226, 179, 256, 189, LBLX, MBASE(0)); -} - -// Draw "Back" line at the top -inline void Draw_Back_First(const bool is_sel=true) { - Draw_Menu_Line(0, ICON_Back); - Draw_Back_Label(); - if (is_sel) Draw_Menu_Cursor(0); -} - -inline bool Apply_Encoder(const ENCODER_DiffState &encoder_diffState, auto &valref) { - if (encoder_diffState == ENCODER_DIFF_CW) - valref += EncoderRate.encoderMoveValue; - else if (encoder_diffState == ENCODER_DIFF_CCW) - valref -= EncoderRate.encoderMoveValue; - return encoder_diffState == ENCODER_DIFF_ENTER; -} - -// -// Draw Menus -// - -#define MOTION_CASE_RATE 1 -#define MOTION_CASE_ACCEL 2 -#define MOTION_CASE_JERK (MOTION_CASE_ACCEL + ENABLED(HAS_CLASSIC_JERK)) -#define MOTION_CASE_STEPS (MOTION_CASE_JERK + 1) -#define MOTION_CASE_TOTAL MOTION_CASE_STEPS - -#define PREPARE_CASE_MOVE 1 -#define PREPARE_CASE_DISA 2 -#define PREPARE_CASE_HOME 3 -#define PREPARE_CASE_ZOFF (PREPARE_CASE_HOME + ENABLED(HAS_ZOFFSET_ITEM)) -#define PREPARE_CASE_PLA (PREPARE_CASE_ZOFF + ENABLED(HAS_HOTEND)) -#define PREPARE_CASE_ABS (PREPARE_CASE_PLA + ENABLED(HAS_HOTEND)) -#define PREPARE_CASE_COOL (PREPARE_CASE_ABS + EITHER(HAS_HOTEND, HAS_HEATED_BED)) -#define PREPARE_CASE_LANG (PREPARE_CASE_COOL + 1) -#define PREPARE_CASE_TOTAL PREPARE_CASE_LANG - -#define CONTROL_CASE_TEMP 1 -#define CONTROL_CASE_MOVE (CONTROL_CASE_TEMP + 1) -#define CONTROL_CASE_SAVE (CONTROL_CASE_MOVE + ENABLED(EEPROM_SETTINGS)) -#define CONTROL_CASE_LOAD (CONTROL_CASE_SAVE + ENABLED(EEPROM_SETTINGS)) -#define CONTROL_CASE_RESET (CONTROL_CASE_LOAD + ENABLED(EEPROM_SETTINGS)) -#define CONTROL_CASE_INFO (CONTROL_CASE_RESET + 1) -#define CONTROL_CASE_TOTAL CONTROL_CASE_INFO - -#define TUNE_CASE_SPEED 1 -#define TUNE_CASE_TEMP (TUNE_CASE_SPEED + ENABLED(HAS_HOTEND)) -#define TUNE_CASE_BED (TUNE_CASE_TEMP + ENABLED(HAS_HEATED_BED)) -#define TUNE_CASE_FAN (TUNE_CASE_BED + ENABLED(HAS_FAN)) -#define TUNE_CASE_ZOFF (TUNE_CASE_FAN + ENABLED(HAS_ZOFFSET_ITEM)) -#define TUNE_CASE_TOTAL TUNE_CASE_ZOFF - -#define TEMP_CASE_TEMP (0 + ENABLED(HAS_HOTEND)) -#define TEMP_CASE_BED (TEMP_CASE_TEMP + ENABLED(HAS_HEATED_BED)) -#define TEMP_CASE_FAN (TEMP_CASE_BED + ENABLED(HAS_FAN)) -#define TEMP_CASE_PLA (TEMP_CASE_FAN + ENABLED(HAS_HOTEND)) -#define TEMP_CASE_ABS (TEMP_CASE_PLA + ENABLED(HAS_HOTEND)) -#define TEMP_CASE_TOTAL TEMP_CASE_ABS - -#define PREHEAT_CASE_TEMP (0 + ENABLED(HAS_HOTEND)) -#define PREHEAT_CASE_BED (PREHEAT_CASE_TEMP + ENABLED(HAS_HEATED_BED)) -#define PREHEAT_CASE_FAN (PREHEAT_CASE_BED + ENABLED(HAS_FAN)) -#define PREHEAT_CASE_SAVE (PREHEAT_CASE_FAN + ENABLED(EEPROM_SETTINGS)) -#define PREHEAT_CASE_TOTAL PREHEAT_CASE_SAVE - -// -// Draw Menus -// - -inline void draw_move_en(const uint16_t line) { - DWIN_Frame_AreaCopy(1, 69, 61, 102, 71, LBLX, line); // "Move" -} - -inline void DWIN_Frame_TitleCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { DWIN_Frame_AreaCopy(id, x1, y1, x2, y2, 14, 8); } - -inline void Item_Prepare_Move(const uint8_t row) { - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 159, 70, 200, 84, LBLX, MBASE(row)); - else - draw_move_en(MBASE(row)); // "Move >" - Draw_Menu_Line(row, ICON_Axis); - Draw_More_Icon(row); -} - -inline void Item_Prepare_Disable(const uint8_t row) { - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 204, 70, 259, 82, LBLX, MBASE(row)); - else - DWIN_Frame_AreaCopy(1, 103, 59, 200, 74, LBLX, MBASE(row)); // "Disable Stepper" - Draw_Menu_Line(row, ICON_CloseMotor); -} - -inline void Item_Prepare_Home(const uint8_t row) { - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 0, 89, 41, 101, LBLX, MBASE(row)); - else - DWIN_Frame_AreaCopy(1, 202, 61, 271, 71, LBLX, MBASE(row)); // "Auto Home" - Draw_Menu_Line(row, ICON_Homing); -} - -#if HAS_ZOFFSET_ITEM - - inline void Item_Prepare_Offset(const uint8_t row) { - if (HMI_IsChinese()) { - #if HAS_BED_PROBE - DWIN_Frame_AreaCopy(1, 174, 164, 223, 177, LBLX, MBASE(row)); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, MBASE(row), probe.offset.z * 100); - #else - DWIN_Frame_AreaCopy(1, 43, 89, 98, 101, LBLX, MBASE(row)); - #endif - } - else { - #if HAS_BED_PROBE - DWIN_Frame_AreaCopy(1, 93, 179, 141, 189, LBLX, MBASE(row)); // "Z-Offset" - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, MBASE(row), probe.offset.z * 100); - #else - DWIN_Frame_AreaCopy(1, 1, 76, 106, 86, LBLX, MBASE(row)); // "..." - #endif - } - Draw_Menu_Line(row, ICON_SetHome); - } - -#endif - -#if HAS_HOTEND - inline void Item_Prepare_PLA(const uint8_t row) { - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 100, 89, 151, 101, LBLX, MBASE(row)); - } - else { - DWIN_Frame_AreaCopy(1, 107, 76, 156, 86, LBLX, MBASE(row)); // "Preheat" - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX + 52, MBASE(row)); // "PLA" - } - Draw_Menu_Line(row, ICON_PLAPreheat); - } - - inline void Item_Prepare_ABS(const uint8_t row) { - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 180, 89, 233, 100, LBLX, MBASE(row)); - } - else { - DWIN_Frame_AreaCopy(1, 107, 76, 156, 86, LBLX, MBASE(row)); // "Preheat" - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX + 52, MBASE(row)); // "ABS" - } - Draw_Menu_Line(row, ICON_ABSPreheat); - } -#endif - -#if HAS_PREHEAT - inline void Item_Prepare_Cool(const uint8_t row) { - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 1, 104, 56, 117, LBLX, MBASE(row)); - else - DWIN_Frame_AreaCopy(1, 200, 76, 264, 86, LBLX, MBASE(row)); // "Cooldown" - Draw_Menu_Line(row, ICON_Cool); - } -#endif - -inline void Item_Prepare_Lang(const uint8_t row) { - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 239, 134, 266, 146, LBLX, MBASE(row)); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 226, MBASE(row), F("CN")); - } - else { - DWIN_Frame_AreaCopy(1, 0, 194, 121, 207, LBLX, MBASE(row)); // "Language selection" - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 226, MBASE(row), F("EN")); - } - Draw_Menu_Icon(row, ICON_Language); -} - -inline void Draw_Prepare_Menu() { - Clear_Main_Window(); - - const int16_t scroll = MROWS - index_prepare; // Scrolled-up lines - #define PSCROL(L) (scroll + (L)) - #define PVISI(L) WITHIN(PSCROL(L), 0, MROWS) - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 133, 1, 160, 13); // "Prepare" - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_PREPARE)); - #else - DWIN_Frame_TitleCopy(1, 178, 2, 229, 14); // "Prepare" - #endif - } - - if (PVISI(0)) Draw_Back_First(select_prepare.now == 0); // < Back - if (PVISI(PREPARE_CASE_MOVE)) Item_Prepare_Move(PSCROL(PREPARE_CASE_MOVE)); // Move > - if (PVISI(PREPARE_CASE_DISA)) Item_Prepare_Disable(PSCROL(PREPARE_CASE_DISA)); // Disable Stepper - if (PVISI(PREPARE_CASE_HOME)) Item_Prepare_Home(PSCROL(PREPARE_CASE_HOME)); // Auto Home - #if HAS_ZOFFSET_ITEM - if (PVISI(PREPARE_CASE_ZOFF)) Item_Prepare_Offset(PSCROL(PREPARE_CASE_ZOFF)); // Edit Z-Offset / Babystep / Set Home Offset - #endif - #if HAS_HOTEND - if (PVISI(PREPARE_CASE_PLA)) Item_Prepare_PLA(PSCROL(PREPARE_CASE_PLA)); // Preheat PLA - if (PVISI(PREPARE_CASE_ABS)) Item_Prepare_ABS(PSCROL(PREPARE_CASE_ABS)); // Preheat ABS - #endif - #if HAS_PREHEAT - if (PVISI(PREPARE_CASE_COOL)) Item_Prepare_Cool(PSCROL(PREPARE_CASE_COOL)); // Cooldown - #endif - if (PVISI(PREPARE_CASE_LANG)) Item_Prepare_Lang(PSCROL(PREPARE_CASE_LANG)); // Language CN/EN - - if (select_prepare.now) Draw_Menu_Cursor(PSCROL(select_prepare.now)); -} - -inline void Draw_Control_Menu() { - Clear_Main_Window(); - - #if CONTROL_CASE_TOTAL >= 6 - const int16_t scroll = MROWS - index_control; // Scrolled-up lines - #define CSCROL(L) (scroll + (L)) - #else - #define CSCROL(L) (L) - #endif - #define CLINE(L) MBASE(CSCROL(L)) - #define CVISI(L) WITHIN(CSCROL(L), 0, MROWS) - - if (CVISI(0)) Draw_Back_First(select_control.now == 0); // < Back - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 103, 1, 130, 14); // "Control" - - DWIN_Frame_AreaCopy(1, 57, 104, 84, 116, LBLX, CLINE(CONTROL_CASE_TEMP)); // Temperature > - DWIN_Frame_AreaCopy(1, 87, 104, 114, 116, LBLX, CLINE(CONTROL_CASE_MOVE)); // Motion > - - #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 117, 104, 172, 116, LBLX, CLINE(CONTROL_CASE_SAVE)); // Store Configuration - DWIN_Frame_AreaCopy(1, 174, 103, 229, 116, LBLX, CLINE(CONTROL_CASE_LOAD)); // Read Configuration - DWIN_Frame_AreaCopy(1, 1, 118, 56, 131, LBLX, CLINE(CONTROL_CASE_RESET)); // Reset Configuration - #endif - - if (CVISI(CONTROL_CASE_INFO)) - DWIN_Frame_AreaCopy(1, 231, 104, 258, 116, LBLX, CLINE(CONTROL_CASE_TEMP)); // Info > - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_CONTROL)); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, CLINE(CONTROL_CASE_TEMP), GET_TEXT_F(MSG_TEMPERATURE)); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, CLINE(CONTROL_CASE_MOVE), GET_TEXT_F(MSG_MOTION)); - #if ENABLED(EEPROM_SETTINGS) - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, CLINE(CONTROL_CASE_SAVE), GET_TEXT_F(MSG_STORE_EEPROM)); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, CLINE(CONTROL_CASE_LOAD), GET_TEXT_F(MSG_LOAD_EEPROM)); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, CLINE(CONTROL_CASE_RESET), GET_TEXT_F(MSG_RESTORE_DEFAULTS)); - #endif - if (CVISI(CONTROL_CASE_INFO)) DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, CLINE(CONTROL_CASE_INFO), F("Info")); - #else - DWIN_Frame_TitleCopy(1, 128, 2, 176, 12); // "Control" - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX, CLINE(CONTROL_CASE_TEMP)); // Temperature > - DWIN_Frame_AreaCopy(1, 84, 89, 128, 99, LBLX, CLINE(CONTROL_CASE_MOVE)); // Motion > - #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 148, 89, 268, 101, LBLX , CLINE(CONTROL_CASE_SAVE // "Store Configuration" - DWIN_Frame_AreaCopy(1, 26, 104, 57, 114, LBLX , CLINE(CONTROL_CASE_LOAD)); // "Read" - DWIN_Frame_AreaCopy(1, 182, 89, 268, 101, LBLX + 34, CLINE(CONTROL_CASE_LOAD)); // "Configuration" - DWIN_Frame_AreaCopy(1, 59, 104, 93, 114, LBLX , CLINE(CONTROL_CASE_RESET)); // "Reset" - DWIN_Frame_AreaCopy(1, 182, 89, 268, 101, LBLX + 37, CLINE(CONTROL_CASE_RESET)); // "Configuration" - #endif - if (CVISI(CONTROL_CASE_INFO)) DWIN_Frame_AreaCopy(1, 0, 104, 25, 115, LBLX, CLINE(CONTROL_CASE_INFO)); // Info > - #endif - } - - if (select_control.now && CVISI(select_control.now)) - Draw_Menu_Cursor(CSCROL(select_control.now)); - - // Draw icons and lines - uint8_t i = 0; - #define _TEMP_ICON(N) do{ ++i; if (CVISI(i)) Draw_Menu_Line(CSCROL(i), ICON_Temperature + (N) - 1); }while(0) - - _TEMP_ICON(CONTROL_CASE_TEMP); - if (CVISI(i)) Draw_More_Icon(CSCROL(i)); - - _TEMP_ICON(CONTROL_CASE_MOVE); - Draw_More_Icon(CSCROL(i)); - - #if ENABLED(EEPROM_SETTINGS) - _TEMP_ICON(CONTROL_CASE_SAVE); - _TEMP_ICON(CONTROL_CASE_LOAD); - _TEMP_ICON(CONTROL_CASE_RESET); - #endif - - _TEMP_ICON(CONTROL_CASE_INFO); - if (CVISI(CONTROL_CASE_INFO)) Draw_More_Icon(CSCROL(i)); -} - -inline void Draw_Tune_Menu() { - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 73, 2, 100, 13, 14, 9); - DWIN_Frame_AreaCopy(1, 116, 164, 171, 176, LBLX, MBASE(TUNE_CASE_SPEED)); - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX, MBASE(TUNE_CASE_TEMP)); - #endif - #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 58, 134, 113, 146, LBLX, MBASE(TUNE_CASE_BED)); - #endif - #if HAS_FAN - DWIN_Frame_AreaCopy(1, 115, 134, 170, 146, LBLX, MBASE(TUNE_CASE_FAN)); - #endif - #if HAS_ZOFFSET_ITEM - DWIN_Frame_AreaCopy(1, 174, 164, 223, 177, LBLX, MBASE(TUNE_CASE_ZOFF)); - #endif - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_TUNE)); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TUNE_CASE_SPEED), GET_TEXT_F(MSG_SPEED)); - #if HAS_HOTEND - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TUNE_CASE_TEMP), GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND)); - #endif - #if HAS_HEATED_BED - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TUNE_CASE_BED), GET_TEXT_F(MSG_UBL_SET_TEMP_BED)); - #endif - #if HAS_FAN - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TUNE_CASE_FAN), GET_TEXT_F(MSG_FAN_SPEED)); - #endif - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TUNE_CASE_ZOFF), GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); - #else - DWIN_Frame_AreaCopy(1, 94, 2, 126, 12, 14, 9); - DWIN_Frame_AreaCopy(1, 1, 179, 92, 190, LBLX, MBASE(TUNE_CASE_SPEED)); // Print speed - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX, MBASE(TUNE_CASE_TEMP)); // Hotend... - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 44, MBASE(TUNE_CASE_TEMP)); // ...Temperature - #endif - #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 240, 104, 264, 114, LBLX, MBASE(TUNE_CASE_BED)); // Bed... - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 27, MBASE(TUNE_CASE_BED)); // ...Temperature - #endif - #if HAS_FAN - DWIN_Frame_AreaCopy(1, 0, 119, 64, 132, LBLX, MBASE(TUNE_CASE_FAN)); // Fan speed - #endif - #if HAS_ZOFFSET_ITEM - DWIN_Frame_AreaCopy(1, 93, 179, 141, 189, LBLX, MBASE(TUNE_CASE_ZOFF)); // Z-offset - #endif - #endif - } - - Draw_Back_First(select_tune.now == 0); - if (select_tune.now) Draw_Menu_Cursor(select_tune.now); - - Draw_Menu_Line(TUNE_CASE_SPEED, ICON_Speed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_SPEED), feedrate_percentage); - - #if HAS_HOTEND - Draw_Menu_Line(TUNE_CASE_TEMP, ICON_HotendTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_TEMP), thermalManager.temp_hotend[0].target); - #endif - #if HAS_HEATED_BED - Draw_Menu_Line(TUNE_CASE_BED, ICON_BedTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_BED), thermalManager.temp_bed.target); - #endif - #if HAS_FAN - Draw_Menu_Line(TUNE_CASE_FAN, ICON_FanSpeed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_FAN), thermalManager.fan_speed[0]); - #endif - #if HAS_ZOFFSET_ITEM - Draw_Menu_Line(TUNE_CASE_ZOFF, ICON_Zoffset); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, MBASE(TUNE_CASE_ZOFF), BABY_Z_VAR * 100); - #endif -} - -inline void draw_max_en(const uint16_t line) { - DWIN_Frame_AreaCopy(1, 245, 119, 269, 129, LBLX, line); // "Max" -} -inline void draw_max_accel_en(const uint16_t line) { - draw_max_en(line); - DWIN_Frame_AreaCopy(1, 1, 135, 79, 145, LBLX + 27, line); // "Acceleration" -} -inline void draw_speed_en(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 184, 119, 224, 132, LBLX + inset, line); // "Speed" -} -inline void draw_jerk_en(const uint16_t line) { - DWIN_Frame_AreaCopy(1, 64, 119, 106, 129, LBLX + 27, line); // "Jerk" -} -inline void draw_steps_per_mm(const uint16_t line) { - DWIN_Frame_AreaCopy(1, 1, 151, 101, 161, LBLX, line); // "Steps-per-mm" -} -inline void say_x(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 95, 104, 102, 114, LBLX + inset, line); // "X" -} -inline void say_y(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 104, 104, 110, 114, LBLX + inset, line); // "Y" -} -inline void say_z(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 112, 104, 120, 114, LBLX + inset, line); // "Z" -} -inline void say_e(const uint16_t inset, const uint16_t line) { - DWIN_Frame_AreaCopy(1, 237, 119, 244, 129, LBLX + inset, line); // "E" -} - -inline void Draw_Motion_Menu() { - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Motion" - DWIN_Frame_AreaCopy(1, 173, 133, 228, 147, LBLX, MBASE(MOTION_CASE_RATE)); // Max speed - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(MOTION_CASE_ACCEL)); // Max... - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(MOTION_CASE_ACCEL) + 1); // ...Acceleration - #if HAS_CLASSIC_JERK - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(MOTION_CASE_JERK)); // Max... - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(MOTION_CASE_JERK) + 1); // ... - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 54, MBASE(MOTION_CASE_JERK)); // ...Jerk - #endif - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(MOTION_CASE_STEPS)); // Flow ratio - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_MOTION)); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(MOTION_CASE_RATE), F("Feedrate")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(MOTION_CASE_ACCEL), GET_TEXT_F(MSG_ACCELERATION)); - #if HAS_CLASSIC_JERK - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(MOTION_CASE_JERK), GET_TEXT_F(MSG_JERK)); - #endif - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(MOTION_CASE_STEPS), GET_TEXT_F(MSG_STEPS_PER_MM)); - #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Motion" - draw_max_en(MBASE(MOTION_CASE_RATE)); draw_speed_en(27, MBASE(MOTION_CASE_RATE)); // "Max Speed" - draw_max_accel_en(MBASE(MOTION_CASE_ACCEL)); // "Max Acceleration" - #if HAS_CLASSIC_JERK - draw_max_en(MBASE(MOTION_CASE_JERK)); draw_jerk_en(MBASE(MOTION_CASE_JERK)); // "Max Jerk" - #endif - draw_steps_per_mm(MBASE(MOTION_CASE_STEPS)); // "Steps-per-mm" - #endif - } - - Draw_Back_First(select_motion.now == 0); - if (select_motion.now) Draw_Menu_Cursor(select_motion.now); - - uint8_t i = 0; - #define _MOTION_ICON(N) Draw_Menu_Line(++i, ICON_MaxSpeed + (N) - 1) - _MOTION_ICON(MOTION_CASE_RATE); Draw_More_Icon(i); - _MOTION_ICON(MOTION_CASE_ACCEL); Draw_More_Icon(i); - #if HAS_CLASSIC_JERK - _MOTION_ICON(MOTION_CASE_JERK); Draw_More_Icon(i); - #endif - _MOTION_ICON(MOTION_CASE_STEPS); Draw_More_Icon(i); -} - -// -// Draw Popup Windows -// -#if HAS_HOTEND || HAS_HEATED_BED - - void DWIN_Popup_Temperature(const bool toohigh) { - Clear_Popup_Area(); - Draw_Popup_Bkgd_105(); - if (toohigh) { - DWIN_ICON_Show(ICON, ICON_TempTooHigh, 102, 165); - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285); - DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285); - DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); - } - else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too high")); - } - } - else { - DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 165); - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 103, 371, 270, 386, 52, 285); - DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); - } - else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too low")); - } - } - } - -#endif - -inline void Draw_Popup_Bkgd_60() { - DWIN_Draw_Rectangle(1, Color_Bg_Window, 14, 60, 258, 330); -} - -#if HAS_HOTEND - - void Popup_Window_ETempTooLow() { - Clear_Main_Window(); - Draw_Popup_Bkgd_60(); - DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105); - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240); - DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 102, 240); - DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280); - } - else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, 20, 235, F("Nozzle is too cold")); - DWIN_ICON_Show(ICON, ICON_Confirm_E, 86, 280); - } - } - -#endif - -void Popup_Window_Resume() { - Clear_Popup_Area(); - Draw_Popup_Bkgd_105(); - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 135); - DWIN_Frame_AreaCopy(1, 103, 321, 271, 335, 52, 192); - DWIN_ICON_Show(ICON, ICON_Cancel_C, 26, 307); - DWIN_ICON_Show(ICON, ICON_Continue_C, 146, 307); - } - else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 14) / 2, 115, F("Continue Print")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 192, F("It looks like the last")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 212, F("file was interrupted.")); - DWIN_ICON_Show(ICON, ICON_Cancel_E, 26, 307); - DWIN_ICON_Show(ICON, ICON_Continue_E, 146, 307); - } -} - -void Popup_Window_Home(const bool parking/*=false*/) { - Clear_Main_Window(); - Draw_Popup_Bkgd_60(); - DWIN_ICON_Show(ICON, ICON_BLTouch, 101, 105); - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 0, 371, 33, 386, 85, 240); - DWIN_Frame_AreaCopy(1, 203, 286, 271, 302, 118, 240); - DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280); - } - else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * (parking ? 7 : 10)) / 2, 230, parking ? F("Parking") : F("Homing XYZ")); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done.")); - } -} - -#if HAS_ONESTEP_LEVELING - - void Popup_Window_Leveling() { - Clear_Main_Window(); - Draw_Popup_Bkgd_60(); - DWIN_ICON_Show(ICON, ICON_AutoLeveling, 101, 105); - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 0, 371, 100, 386, 84, 240); - DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280); - } - else { - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 13) / 2, 230, GET_TEXT_F(MSG_BED_LEVELING)); - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done.")); - } - } - -#endif - -void Draw_Select_Highlight(const bool sel) { - HMI_flag.select_flag = sel; - const uint16_t c1 = sel ? Select_Color : Color_Bg_Window, - c2 = sel ? Color_Bg_Window : Select_Color; - DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318); - DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319); - DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318); - DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319); -} - -void Popup_window_PauseOrStop() { - Clear_Main_Window(); - Draw_Popup_Bkgd_60(); - if (HMI_IsChinese()) { - if (select_print.now == 1) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); - else if (select_print.now == 2) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); - DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150); - DWIN_ICON_Show(ICON, ICON_Confirm_C, 26, 280); - DWIN_ICON_Show(ICON, ICON_Cancel_C, 146, 280); - } - else { - if (select_print.now == 1) DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 11) / 2, 150, GET_TEXT_F(MSG_PAUSE_PRINT)); - else if (select_print.now == 2) DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 10) / 2, 150, GET_TEXT_F(MSG_STOP_PRINT)); - DWIN_ICON_Show(ICON, ICON_Confirm_E, 26, 280); - DWIN_ICON_Show(ICON, ICON_Cancel_E, 146, 280); - } - Draw_Select_Highlight(true); -} - -void Draw_Printing_Screen() { - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 30, 1, 71, 14, 14, 9); // Tune - DWIN_Frame_AreaCopy(1, 0, 72, 63, 86, 41, 188); // Pause - DWIN_Frame_AreaCopy(1, 65, 72, 128, 86, 176, 188); // Stop - } - else { - DWIN_Frame_AreaCopy(1, 40, 2, 92, 14, 14, 9); // Tune - DWIN_Frame_AreaCopy(1, 0, 44, 96, 58, 41, 188); // Pause - DWIN_Frame_AreaCopy(1, 98, 44, 152, 58, 176, 188); // Stop - } -} - -void Draw_Print_ProgressBar() { - DWIN_ICON_Show(ICON, ICON_Bar, 15, 93); - DWIN_Draw_Rectangle(1, BarFill_Color, 16 + Percentrecord * 240 / 100, 93, 256, 113); - DWIN_Draw_IntValue(true, true, 0, font8x16, Percent_Color, Color_Bg_Black, 2, 117, 133, Percentrecord); - DWIN_Draw_String(false, false, font8x16, Percent_Color, Color_Bg_Black, 133, 133, F("%")); -} - -void Draw_Print_ProgressElapsed() { - duration_t elapsed = print_job_timer.duration(); // print timer - DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 42, 212, elapsed.value / 3600); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 58, 212, F(":")); - DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 66, 212, (elapsed.value % 3600) / 60); -} - -void Draw_Print_ProgressRemain() { - DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 176, 212, remain_time / 3600); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, 192, 212, F(":")); - DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, 200, 212, (remain_time % 3600) / 60); -} - -void Goto_PrintProcess() { - checkkey = PrintProcess; - - Clear_Main_Window(); - Draw_Printing_Screen(); - - ICON_Tune(); - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); - ICON_Stop(); - - // Copy into filebuf string before entry - char * const name = card.longest_filename(); - const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * MENU_CHR_W) / 2; - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, npos, 60, name); - - DWIN_ICON_Show(ICON, ICON_PrintTime, 17, 193); - DWIN_ICON_Show(ICON, ICON_RemainTime, 150, 191); - - Draw_Print_ProgressBar(); - Draw_Print_ProgressElapsed(); - Draw_Print_ProgressRemain(); -} - -void Goto_MainMenu() { - checkkey = MainMenu; - - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_AreaCopy(1, 2, 2, 27, 14, 14, 9); // "Home" - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_MAIN)); - #else - DWIN_Frame_AreaCopy(1, 0, 2, 39, 12, 14, 9); - #endif - } - - DWIN_ICON_Show(ICON, ICON_LOGO, 71, 52); - - ICON_Print(); - ICON_Prepare(); - ICON_Control(); - TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(select_page.now == 3); -} - -inline ENCODER_DiffState get_encoder_state() { - static millis_t Encoder_ms = 0; - const millis_t ms = millis(); - if (PENDING(ms, Encoder_ms)) return ENCODER_DIFF_NO; - const ENCODER_DiffState state = Encoder_ReceiveAnalyze(); - if (state != ENCODER_DIFF_NO) Encoder_ms = ms + ENCODER_WAIT; - return state; -} - -void HMI_Move_X() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_X_scale)) { - checkkey = AxisMove; - EncoderRate.enabled = false; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scale); - if (!planner.is_full()) { - // Wait for planner moves to finish! - planner.synchronize(); - planner.buffer_line(current_position, homing_feedrate(X_AXIS), active_extruder); - } - DWIN_UpdateLCD(); - return; - } - NOLESS(HMI_ValueStruct.Move_X_scale, (X_MIN_POS) * MINUNITMULT); - NOMORE(HMI_ValueStruct.Move_X_scale, (X_MAX_POS) * MINUNITMULT); - current_position.x = HMI_ValueStruct.Move_X_scale / MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(1), HMI_ValueStruct.Move_X_scale); - DWIN_UpdateLCD(); - } -} - -void HMI_Move_Y() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Y_scale)) { - checkkey = AxisMove; - EncoderRate.enabled = false; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale); - if (!planner.is_full()) { - // Wait for planner moves to finish! - planner.synchronize(); - planner.buffer_line(current_position, homing_feedrate(Y_AXIS), active_extruder); - } - DWIN_UpdateLCD(); - return; - } - NOLESS(HMI_ValueStruct.Move_Y_scale, (Y_MIN_POS) * MINUNITMULT); - NOMORE(HMI_ValueStruct.Move_Y_scale, (Y_MAX_POS) * MINUNITMULT); - current_position.y = HMI_ValueStruct.Move_Y_scale / MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale); - DWIN_UpdateLCD(); - } -} - -void HMI_Move_Z() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Z_scale)) { - checkkey = AxisMove; - EncoderRate.enabled = false; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale); - if (!planner.is_full()) { - // Wait for planner moves to finish! - planner.synchronize(); - planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); - } - DWIN_UpdateLCD(); - return; - } - NOLESS(HMI_ValueStruct.Move_Z_scale, Z_MIN_POS * MINUNITMULT); - NOMORE(HMI_ValueStruct.Move_Z_scale, Z_MAX_POS * MINUNITMULT); - current_position.z = HMI_ValueStruct.Move_Z_scale / MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale); - DWIN_UpdateLCD(); - } -} - -#if HAS_HOTEND - - void HMI_Move_E() { - static float last_E_scale = 0; - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_E_scale)) { - checkkey = AxisMove; - EncoderRate.enabled = false; - last_E_scale = HMI_ValueStruct.Move_E_scale; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(4), HMI_ValueStruct.Move_E_scale); - if (!planner.is_full()) { - planner.synchronize(); // Wait for planner moves to finish! - planner.buffer_line(current_position, MMM_TO_MMS(FEEDRATE_E), active_extruder); - } - DWIN_UpdateLCD(); - return; - } - if ((HMI_ValueStruct.Move_E_scale - last_E_scale) > (EXTRUDE_MAXLENGTH) * MINUNITMULT) - HMI_ValueStruct.Move_E_scale = last_E_scale + (EXTRUDE_MAXLENGTH) * MINUNITMULT; - else if ((last_E_scale - HMI_ValueStruct.Move_E_scale) > (EXTRUDE_MAXLENGTH) * MINUNITMULT) - HMI_ValueStruct.Move_E_scale = last_E_scale - (EXTRUDE_MAXLENGTH) * MINUNITMULT; - current_position.e = HMI_ValueStruct.Move_E_scale / MINUNITMULT; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, UNITFDIGITS, 216, MBASE(4), HMI_ValueStruct.Move_E_scale); - DWIN_UpdateLCD(); - } - } - -#endif - -#if HAS_ZOFFSET_ITEM - - bool printer_busy() { return planner.movesplanned() || printingIsActive(); } - - void HMI_Zoffset() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - uint8_t zoff_line; - switch (HMI_ValueStruct.show_mode) { - case -4: zoff_line = PREPARE_CASE_ZOFF + MROWS - index_prepare; break; - default: zoff_line = TUNE_CASE_ZOFF + MROWS - index_tune; - } - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.offset_value)) { - EncoderRate.enabled = false; - #if HAS_BED_PROBE - probe.offset.z = dwin_zoffset; - TERN_(EEPROM_SETTINGS, settings.save()); - #endif - checkkey = HMI_ValueStruct.show_mode == -4 ? Prepare : Tune; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 2, 2, 202, MBASE(zoff_line), TERN(HAS_BED_PROBE, BABY_Z_VAR * 100, HMI_ValueStruct.offset_value)); - DWIN_UpdateLCD(); - return; - } - NOLESS(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MIN) * 100); - NOMORE(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MAX) * 100); - last_zoffset = dwin_zoffset; - dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f; - #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) - if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset); - #endif - DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, MBASE(zoff_line), HMI_ValueStruct.offset_value); - DWIN_UpdateLCD(); - } - } - -#endif // HAS_ZOFFSET_ITEM - -#if HAS_HOTEND - - void HMI_ETemp() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - uint8_t temp_line; - switch (HMI_ValueStruct.show_mode) { - case -1: temp_line = TEMP_CASE_TEMP; break; - case -2: temp_line = PREHEAT_CASE_TEMP; break; - case -3: temp_line = PREHEAT_CASE_TEMP; break; - default: temp_line = TUNE_CASE_TEMP + MROWS - index_tune; - } - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.E_Temp)) { - EncoderRate.enabled = false; - if (HMI_ValueStruct.show_mode == -2) { - checkkey = PLAPreheat; - ui.material_preset[0].hotend_temp = HMI_ValueStruct.E_Temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(temp_line), ui.material_preset[0].hotend_temp); - return; - } - else if (HMI_ValueStruct.show_mode == -3) { - checkkey = ABSPreheat; - ui.material_preset[1].hotend_temp = HMI_ValueStruct.E_Temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(temp_line), ui.material_preset[1].hotend_temp); - return; - } - else if (HMI_ValueStruct.show_mode == -1) // Temperature - checkkey = TemperatureID; - else - checkkey = Tune; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(temp_line), HMI_ValueStruct.E_Temp); - thermalManager.setTargetHotend(HMI_ValueStruct.E_Temp, 0); - return; - } - // E_Temp limit - NOMORE(HMI_ValueStruct.E_Temp, MAX_E_TEMP); - NOLESS(HMI_ValueStruct.E_Temp, MIN_E_TEMP); - // E_Temp value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(temp_line), HMI_ValueStruct.E_Temp); - } - } - -#endif // HAS_HOTEND - -#if HAS_HEATED_BED - - void HMI_BedTemp() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - uint8_t bed_line; - switch (HMI_ValueStruct.show_mode) { - case -1: bed_line = TEMP_CASE_BED; break; - case -2: bed_line = PREHEAT_CASE_BED; break; - case -3: bed_line = PREHEAT_CASE_BED; break; - default: bed_line = TUNE_CASE_BED + MROWS - index_tune; - } - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Bed_Temp)) { - EncoderRate.enabled = false; - if (HMI_ValueStruct.show_mode == -2) { - checkkey = PLAPreheat; - ui.material_preset[0].bed_temp = HMI_ValueStruct.Bed_Temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(bed_line), ui.material_preset[0].bed_temp); - return; - } - else if (HMI_ValueStruct.show_mode == -3) { - checkkey = ABSPreheat; - ui.material_preset[1].bed_temp = HMI_ValueStruct.Bed_Temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(bed_line), ui.material_preset[1].bed_temp); - return; - } - else if (HMI_ValueStruct.show_mode == -1) - checkkey = TemperatureID; - else - checkkey = Tune; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(bed_line), HMI_ValueStruct.Bed_Temp); - thermalManager.setTargetBed(HMI_ValueStruct.Bed_Temp); - return; - } - // Bed_Temp limit - NOMORE(HMI_ValueStruct.Bed_Temp, BED_MAX_TARGET); - NOLESS(HMI_ValueStruct.Bed_Temp, MIN_BED_TEMP); - // Bed_Temp value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(bed_line), HMI_ValueStruct.Bed_Temp); - } - } - -#endif // HAS_HEATED_BED - -#if HAS_PREHEAT - - void HMI_FanSpeed() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - uint8_t fan_line; - switch (HMI_ValueStruct.show_mode) { - case -1: fan_line = TEMP_CASE_FAN; break; - case -2: fan_line = PREHEAT_CASE_FAN; break; - case -3: fan_line = PREHEAT_CASE_FAN; break; - default: fan_line = TUNE_CASE_FAN + MROWS - index_tune; - } - - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Fan_speed)) { - EncoderRate.enabled = false; - if (HMI_ValueStruct.show_mode == -2) { - checkkey = PLAPreheat; - ui.material_preset[0].fan_speed = HMI_ValueStruct.Fan_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(fan_line), ui.material_preset[0].fan_speed); - return; - } - else if (HMI_ValueStruct.show_mode == -3) { - checkkey = ABSPreheat; - ui.material_preset[1].fan_speed = HMI_ValueStruct.Fan_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(fan_line), ui.material_preset[1].fan_speed); - return; - } - else if (HMI_ValueStruct.show_mode == -1) - checkkey = TemperatureID; - else - checkkey = Tune; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(fan_line), HMI_ValueStruct.Fan_speed); - thermalManager.set_fan_speed(0, HMI_ValueStruct.Fan_speed); - return; - } - // Fan_speed limit - NOMORE(HMI_ValueStruct.Fan_speed, FANON); - NOLESS(HMI_ValueStruct.Fan_speed, FANOFF); - // Fan_speed value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(fan_line), HMI_ValueStruct.Fan_speed); - } - } - -#endif // HAS_PREHEAT - -void HMI_PrintSpeed() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.print_speed)) { - checkkey = Tune; - EncoderRate.enabled = false; - feedrate_percentage = HMI_ValueStruct.print_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(select_tune.now + MROWS - index_tune), HMI_ValueStruct.print_speed); - return; - } - // print_speed limit - NOMORE(HMI_ValueStruct.print_speed, MAX_PRINT_SPEED); - NOLESS(HMI_ValueStruct.print_speed, MIN_PRINT_SPEED); - // print_speed value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(select_tune.now + MROWS - index_tune), HMI_ValueStruct.print_speed); - } -} - -void HMI_MaxFeedspeedXYZE() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Feedspeed)) { - checkkey = MaxSpeed; - EncoderRate.enabled = false; - if (WITHIN(HMI_flag.feedspeed_axis, X_AXIS, E_AXIS)) - planner.set_max_feedrate(HMI_flag.feedspeed_axis, HMI_ValueStruct.Max_Feedspeed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(select_speed.now), HMI_ValueStruct.Max_Feedspeed); - return; - } - // MaxFeedspeed limit - if (WITHIN(HMI_flag.feedspeed_axis, X_AXIS, E_AXIS)) - NOMORE(HMI_ValueStruct.Max_Feedspeed, default_max_feedrate[HMI_flag.feedspeed_axis] * 2); - if (HMI_ValueStruct.Max_Feedspeed < MIN_MAXFEEDSPEED) HMI_ValueStruct.Max_Feedspeed = MIN_MAXFEEDSPEED; - // MaxFeedspeed value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 4, 210, MBASE(select_speed.now), HMI_ValueStruct.Max_Feedspeed); - } -} - -void HMI_MaxAccelerationXYZE() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Acceleration)) { - checkkey = MaxAcceleration; - EncoderRate.enabled = false; - if (HMI_flag.acc_axis == X_AXIS) planner.set_max_acceleration(X_AXIS, HMI_ValueStruct.Max_Acceleration); - else if (HMI_flag.acc_axis == Y_AXIS) planner.set_max_acceleration(Y_AXIS, HMI_ValueStruct.Max_Acceleration); - else if (HMI_flag.acc_axis == Z_AXIS) planner.set_max_acceleration(Z_AXIS, HMI_ValueStruct.Max_Acceleration); - #if HAS_HOTEND - else if (HMI_flag.acc_axis == E_AXIS) planner.set_max_acceleration(E_AXIS, HMI_ValueStruct.Max_Acceleration); - #endif - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(select_acc.now), HMI_ValueStruct.Max_Acceleration); - return; - } - // MaxAcceleration limit - if (WITHIN(HMI_flag.acc_axis, X_AXIS, E_AXIS)) - NOMORE(HMI_ValueStruct.Max_Acceleration, default_max_acceleration[HMI_flag.acc_axis] * 2); - if (HMI_ValueStruct.Max_Acceleration < MIN_MAXACCELERATION) HMI_ValueStruct.Max_Acceleration = MIN_MAXACCELERATION; - // MaxAcceleration value - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 4, 210, MBASE(select_acc.now), HMI_ValueStruct.Max_Acceleration); - } -} - -#if HAS_CLASSIC_JERK - - void HMI_MaxJerkXYZE() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Jerk)) { - checkkey = MaxJerk; - EncoderRate.enabled = false; - if (WITHIN(HMI_flag.jerk_axis, X_AXIS, E_AXIS)) - planner.set_max_jerk(HMI_flag.jerk_axis, HMI_ValueStruct.Max_Jerk / 10); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk); - return; - } - // MaxJerk limit - if (WITHIN(HMI_flag.jerk_axis, X_AXIS, E_AXIS)) - NOMORE(HMI_ValueStruct.Max_Jerk, default_max_jerk[HMI_flag.jerk_axis] * 2 * MINUNITMULT); - NOLESS(HMI_ValueStruct.Max_Jerk, (MIN_MAXJERK) * MINUNITMULT); - // MaxJerk value - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk); - } - } - -#endif // HAS_CLASSIC_JERK - -void HMI_StepXYZE() { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Step)) { - checkkey = Step; - EncoderRate.enabled = false; - if (WITHIN(HMI_flag.step_axis, X_AXIS, E_AXIS)) - planner.settings.axis_steps_per_mm[HMI_flag.step_axis] = HMI_ValueStruct.Max_Step / 10; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step); - return; - } - // Step limit - if (WITHIN(HMI_flag.step_axis, X_AXIS, E_AXIS)) - NOMORE(HMI_ValueStruct.Max_Step, 999.9 * MINUNITMULT); - NOLESS(HMI_ValueStruct.Max_Step, MIN_STEP); - // Step value - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step); - } -} - -void update_variable() { - #if HAS_HOTEND - static float last_temp_hotend_target = 0, last_temp_hotend_current = 0; - #endif - #if HAS_HEATED_BED - static float last_temp_bed_target = 0, last_temp_bed_current = 0; - #endif - #if HAS_FAN - static uint8_t last_fan_speed = 0; - #endif - - /* Tune page temperature update */ - if (checkkey == Tune) { - #if HAS_HOTEND - if (last_temp_hotend_target != thermalManager.temp_hotend[0].target) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_TEMP + MROWS - index_tune), thermalManager.temp_hotend[0].target); - #endif - #if HAS_HEATED_BED - if (last_temp_bed_target != thermalManager.temp_bed.target) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_BED + MROWS - index_tune), thermalManager.temp_bed.target); - #endif - #if HAS_FAN - if (last_fan_speed != thermalManager.fan_speed[0]) { - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TUNE_CASE_FAN + MROWS - index_tune), thermalManager.fan_speed[0]); - last_fan_speed = thermalManager.fan_speed[0]; - } - #endif - } - - /* Temperature page temperature update */ - if (checkkey == TemperatureID) { - #if HAS_HOTEND - if (last_temp_hotend_target != thermalManager.temp_hotend[0].target) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_TEMP), thermalManager.temp_hotend[0].target); - #endif - #if HAS_HEATED_BED - if (last_temp_bed_target != thermalManager.temp_bed.target) - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_BED), thermalManager.temp_bed.target); - #endif - #if HAS_FAN - if (last_fan_speed != thermalManager.fan_speed[0]) { - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(TEMP_CASE_FAN), thermalManager.fan_speed[0]); - last_fan_speed = thermalManager.fan_speed[0]; - } - #endif - } - - /* Bottom temperature update */ - #if HAS_HOTEND - if (last_temp_hotend_current != thermalManager.temp_hotend[0].celsius) { - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33, 382, thermalManager.temp_hotend[0].celsius); - last_temp_hotend_current = thermalManager.temp_hotend[0].celsius; - } - if (last_temp_hotend_target != thermalManager.temp_hotend[0].target) { - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33 + 4 * STAT_CHR_W + 6, 382, thermalManager.temp_hotend[0].target); - last_temp_hotend_target = thermalManager.temp_hotend[0].target; - } - #endif - #if HAS_HEATED_BED - if (last_temp_bed_current != thermalManager.temp_bed.celsius) { - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 178, 382, thermalManager.temp_bed.celsius); - last_temp_bed_current = thermalManager.temp_bed.celsius; - } - if (last_temp_bed_target != thermalManager.temp_bed.target) { - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 178 + 4 * STAT_CHR_W + 6, 382, thermalManager.temp_bed.target); - last_temp_bed_target = thermalManager.temp_bed.target; - } - #endif - static uint16_t last_speed = 0; - if (last_speed != feedrate_percentage) { - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33 + 2 * STAT_CHR_W, 429, feedrate_percentage); - last_speed = feedrate_percentage; - } - #if HAS_ZOFFSET_ITEM - if (last_zoffset != BABY_Z_VAR) { - DWIN_Draw_Signed_Float(DWIN_FONT_STAT, Color_Bg_Black, 2, 2, 178 + STAT_CHR_W, 429, BABY_Z_VAR * 100); - last_zoffset = BABY_Z_VAR; - } - #endif -} - -/** - * Read and cache the working directory. - * - * TODO: New code can follow the pattern of menu_media.cpp - * and rely on Marlin caching for performance. No need to - * cache files here. - */ - -#ifndef strcasecmp_P - #define strcasecmp_P(a, b) strcasecmp((a), (b)) -#endif - -inline void make_name_without_ext(char *dst, char *src, size_t maxlen=MENU_CHAR_LIMIT) { - char * const name = card.longest_filename(); - size_t pos = strlen(name); // index of ending nul - - // For files, remove the extension - // which may be .gcode, .gco, or .g - if (!card.flag.filenameIsDir) - while (pos && src[pos] != '.') pos--; // find last '.' (stop at 0) - - size_t len = pos; // nul or '.' - if (len > maxlen) { // Keep the name short - pos = len = maxlen; // move nul down - dst[--pos] = '.'; // insert dots - dst[--pos] = '.'; - dst[--pos] = '.'; - } - - dst[len] = '\0'; // end it - - // Copy down to 0 - while (pos--) dst[pos] = src[pos]; -} - -inline void HMI_SDCardInit() { card.cdroot(); } - -void MarlinUI::refresh() { /* Nothing to see here */ } - -#define ICON_Folder ICON_More - -#if ENABLED(SCROLL_LONG_FILENAMES) - - char shift_name[LONG_FILENAME_LENGTH + 1]; - int8_t shift_amt; // = 0 - millis_t shift_ms; // = 0 - - // Init the shift name based on the highlighted item - inline void Init_Shift_Name() { - const bool is_subdir = !card.flag.workDirIsRoot; - const int8_t filenum = select_file.now - 1 - is_subdir; // Skip "Back" and ".." - const uint16_t fileCnt = card.get_num_Files(); - if (WITHIN(filenum, 0, fileCnt - 1)) { - card.getfilename_sorted(SD_ORDER(filenum, fileCnt)); - char * const name = card.longest_filename(); - make_name_without_ext(shift_name, name, 100); - } - } - - inline void Init_SDItem_Shift() { - shift_amt = 0; - shift_ms = select_file.now > 0 && strlen(shift_name) > MENU_CHAR_LIMIT - ? millis() + 750UL : 0; - } - -#endif - -/** - * Display an SD item, adding a CDUP for subfolders. - */ -inline void Draw_SDItem(const uint16_t item, int16_t row=-1) { - if (row < 0) row = item + 1 + MROWS - index_file; - const bool is_subdir = !card.flag.workDirIsRoot; - if (is_subdir && item == 0) { - Draw_Menu_Line(row, ICON_Folder, ".."); - return; - } - - card.getfilename_sorted(SD_ORDER(item - is_subdir, card.get_num_Files())); - char * const name = card.longest_filename(); - - #if ENABLED(SCROLL_LONG_FILENAMES) - // Init the current selected name - // This is used during scroll drawing - if (item == select_file.now - 1) { - make_name_without_ext(shift_name, name, 100); - Init_SDItem_Shift(); - } - #endif - - // Draw the file/folder with name aligned left - char str[strlen(name) + 1]; - make_name_without_ext(str, name); - Draw_Menu_Line(row, card.flag.filenameIsDir ? ICON_Folder : ICON_File, str); -} - -#if ENABLED(SCROLL_LONG_FILENAMES) - - inline void Draw_SDItem_Shifted(int8_t &shift) { - // Limit to the number of chars past the cutoff - const size_t len = strlen(shift_name); - NOMORE(shift, _MAX(len - MENU_CHAR_LIMIT, 0U)); - - // Shorten to the available space - const size_t lastchar = _MIN((signed)len, shift + MENU_CHAR_LIMIT); - - const char c = shift_name[lastchar]; - shift_name[lastchar] = '\0'; - - const uint8_t row = select_file.now + MROWS - index_file; // skip "Back" and scroll - Erase_Menu_Text(row); - Draw_Menu_Line(row, 0, &shift_name[shift]); - - shift_name[lastchar] = c; - } - -#endif - -// Redraw the first set of SD Files -inline void Redraw_SD_List() { - select_file.reset(); - index_file = MROWS; - - Clear_Menu_Area(); // Leave title bar unchanged - - Draw_Back_First(); - - if (card.isMounted()) { - // As many files as will fit - LOOP_L_N(i, _MIN(nr_sd_menu_items(), MROWS)) - Draw_SDItem(i, i + 1); - - TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); - } - else { - DWIN_Draw_Rectangle(1, Color_Bg_Red, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4)); - DWIN_Draw_String(false, false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), F("No Media")); - } -} - -bool DWIN_lcd_sd_status = false; - -inline void SDCard_Up() { - card.cdup(); - Redraw_SD_List(); - DWIN_lcd_sd_status = false; // On next DWIN_Update -} - -inline void SDCard_Folder(char * const dirname) { - card.cd(dirname); - Redraw_SD_List(); - DWIN_lcd_sd_status = false; // On next DWIN_Update -} - -// -// Watch for media mount / unmount -// -void HMI_SDCardUpdate() { - if (HMI_flag.home_flag) return; - if (DWIN_lcd_sd_status != card.isMounted()) { - DWIN_lcd_sd_status = card.isMounted(); - // SERIAL_ECHOLNPAIR("HMI_SDCardUpdate: ", int(DWIN_lcd_sd_status)); - if (DWIN_lcd_sd_status) { - if (checkkey == SelectFile) - Redraw_SD_List(); - } - else { - // clean file icon - if (checkkey == SelectFile) { - Redraw_SD_List(); - } - else if (checkkey == PrintProcess || checkkey == Tune || printingIsActive()) { - // TODO: Move card removed abort handling - // to CardReader::manage_media. - card.flag.abort_sd_printing = true; - wait_for_heatup = wait_for_user = false; - dwin_abort_flag = true; // Reset feedrate, return to Home - } - } - DWIN_UpdateLCD(); - } -} - -// -// The status area is always on-screen, except during -// full-screen modal dialogs. (TODO: Keep alive during dialogs) -// -void Draw_Status_Area(const bool with_update) { - - // Clear the bottom area of the screen - DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, STATUS_Y, DWIN_WIDTH, DWIN_HEIGHT - 1); - - // - // Status Area - // - #if HAS_HOTEND - DWIN_ICON_Show(ICON, ICON_HotendTemp, 13, 381); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33, 382, thermalManager.temp_hotend[0].celsius); - DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 33 + 3 * STAT_CHR_W + 5, 383, F("/")); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33 + 4 * STAT_CHR_W + 6, 382, thermalManager.temp_hotend[0].target); - #endif - #if HOTENDS > 1 - // DWIN_ICON_Show(ICON,ICON_HotendTemp, 13, 381); - #endif - - #if HAS_HEATED_BED - DWIN_ICON_Show(ICON, ICON_BedTemp, 158, 381); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 178, 382, thermalManager.temp_bed.celsius); - DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 178 + 3 * STAT_CHR_W + 5, 383, F("/")); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 178 + 4 * STAT_CHR_W + 6, 382, thermalManager.temp_bed.target); - #endif - - DWIN_ICON_Show(ICON, ICON_Speed, 13, 429); - DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, 33 + 2 * STAT_CHR_W, 429, feedrate_percentage); - DWIN_Draw_String(false, false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 33 + 5 * STAT_CHR_W + 2, 429, F("%")); - - #if HAS_ZOFFSET_ITEM - DWIN_ICON_Show(ICON, ICON_Zoffset, 158, 428); - dwin_zoffset = BABY_Z_VAR; - DWIN_Draw_Signed_Float(DWIN_FONT_STAT, Color_Bg_Black, 2, 2, 178, 429, dwin_zoffset * 100); - #endif - - if (with_update) { - DWIN_UpdateLCD(); - delay(5); - } -} - -void HMI_StartFrame(const bool with_update) { - Goto_MainMenu(); - Draw_Status_Area(with_update); -} - -inline void Draw_Info_Menu() { - Clear_Main_Window(); - - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(MACHINE_SIZE) * MENU_CHR_W) / 2, 122, (char*)MACHINE_SIZE); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(SHORT_BUILD_VERSION) * MENU_CHR_W) / 2, 195, (char*)SHORT_BUILD_VERSION); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 30, 17, 57, 29); // "Info" - - DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102); - DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); - DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE_C) * MENU_CHR_W) / 2, 268, (char*)CORP_WEBSITE_C); - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_INFO_SCREEN)); - #else - DWIN_Frame_TitleCopy(1, 190, 16, 215, 26); // "Info" - #endif - - DWIN_Frame_AreaCopy(1, 120, 150, 146, 161, 124, 102); - DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175); - DWIN_Frame_AreaCopy(1, 0, 165, 94, 175, 89, 248); - DWIN_Draw_String(false, false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE_E) * MENU_CHR_W) / 2, 268, (char*)CORP_WEBSITE_E); - } - - Draw_Back_First(); - LOOP_L_N(i, 3) { - DWIN_ICON_Show(ICON, ICON_PrintSize + i, 26, 99 + i * 73); - DWIN_Draw_Line(Line_Color, 16, MBASE(2) + i * 73, 256, 156 + i * 73); - } -} - -inline void Draw_Print_File_Menu() { - Clear_Title_Bar(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 0, 31, 55, 44); // "Print file" - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title("Print file"); // TODO: GET_TEXT_F - #else - DWIN_Frame_TitleCopy(1, 52, 31, 137, 41); // "Print file" - #endif - } - - Redraw_SD_List(); -} - -/* Main Process */ -void HMI_MainMenu() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_page.inc(4)) { - switch (select_page.now) { - case 0: ICON_Print(); break; - case 1: ICON_Print(); ICON_Prepare(); break; - case 2: ICON_Prepare(); ICON_Control(); break; - case 3: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(1); break; - } - } - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_page.dec()) { - switch (select_page.now) { - case 0: ICON_Print(); ICON_Prepare(); break; - case 1: ICON_Prepare(); ICON_Control(); break; - case 2: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(0); break; - case 3: TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(1); break; - } - } - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_page.now) { - case 0: // Print File - checkkey = SelectFile; - Draw_Print_File_Menu(); - break; - - case 1: // Prepare - checkkey = Prepare; - select_prepare.reset(); - index_prepare = MROWS; - Draw_Prepare_Menu(); - break; - - case 2: // Control - checkkey = Control; - select_control.reset(); - index_control = MROWS; - Draw_Control_Menu(); - break; - - case 3: // Leveling or Info - #if HAS_ONESTEP_LEVELING - checkkey = Leveling; - HMI_Leveling(); - #else - checkkey = Info; - Draw_Info_Menu(); - #endif - break; - } - } - DWIN_UpdateLCD(); -} - -// Select (and Print) File -void HMI_SelectFile() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - - const uint16_t hasUpDir = !card.flag.workDirIsRoot; - - if (encoder_diffState == ENCODER_DIFF_NO) { - #if ENABLED(SCROLL_LONG_FILENAMES) - if (shift_ms && select_file.now >= 1 + hasUpDir) { - // Scroll selected filename every second - const millis_t ms = millis(); - if (ELAPSED(ms, shift_ms)) { - const bool was_reset = shift_amt < 0; - shift_ms = ms + 375UL + was_reset * 250UL; // ms per character - int8_t shift_new = shift_amt + 1; // Try to shift by... - Draw_SDItem_Shifted(shift_new); // Draw the item - if (!was_reset && shift_new == 0) // Was it limited to 0? - shift_ms = 0; // No scrolling needed - else if (shift_new == shift_amt) // Scroll reached the end - shift_new = -1; // Reset - shift_amt = shift_new; // Set new scroll - } - } - #endif - return; - } - - // First pause is long. Easy. - // On reset, long pause must be after 0. - - const uint16_t fullCnt = nr_sd_menu_items(); - - if (encoder_diffState == ENCODER_DIFF_CW && fullCnt) { - if (select_file.inc(1 + fullCnt)) { - const uint8_t itemnum = select_file.now - 1; // -1 for "Back" - if (TERN0(SCROLL_LONG_FILENAMES, shift_ms)) { // If line was shifted - Erase_Menu_Text(itemnum + MROWS - index_file); // Erase and - Draw_SDItem(itemnum - 1); // redraw - } - if (select_file.now > MROWS && select_file.now > index_file) { // Cursor past the bottom - index_file = select_file.now; // New bottom line - Scroll_Menu(DWIN_SCROLL_UP); - Draw_SDItem(itemnum, MROWS); // Draw and init the shift name - } - else { - Move_Highlight(1, select_file.now + MROWS - index_file); // Just move highlight - TERN_(SCROLL_LONG_FILENAMES, Init_Shift_Name()); // ...and init the shift name - } - TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); - } - } - else if (encoder_diffState == ENCODER_DIFF_CCW && fullCnt) { - if (select_file.dec()) { - const uint8_t itemnum = select_file.now - 1; // -1 for "Back" - if (TERN0(SCROLL_LONG_FILENAMES, shift_ms)) { // If line was shifted - Erase_Menu_Text(select_file.now + 1 + MROWS - index_file); // Erase and - Draw_SDItem(itemnum + 1); // redraw - } - if (select_file.now < index_file - MROWS) { // Cursor past the top - index_file--; // New bottom line - Scroll_Menu(DWIN_SCROLL_DOWN); - if (index_file == MROWS) { - Draw_Back_First(); - TERN_(SCROLL_LONG_FILENAMES, shift_ms = 0); - } - else { - Draw_SDItem(itemnum, 0); // Draw the item (and init shift name) - } - } - else { - Move_Highlight(-1, select_file.now + MROWS - index_file); // Just move highlight - TERN_(SCROLL_LONG_FILENAMES, Init_Shift_Name()); // ...and init the shift name - } - TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); // Reset left. Init timer. - } - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - if (select_file.now == 0) { // Back - select_page.set(0); - Goto_MainMenu(); - } - else if (hasUpDir && select_file.now == 1) { // CD-Up - SDCard_Up(); - goto HMI_SelectFileExit; - } - else { - const uint16_t filenum = select_file.now - 1 - hasUpDir; - card.getfilename_sorted(SD_ORDER(filenum, card.get_num_Files())); - - // Enter that folder! - if (card.flag.filenameIsDir) { - SDCard_Folder(card.filename); - goto HMI_SelectFileExit; - } - - // Reset highlight for next entry - select_print.reset(); - select_file.reset(); - - // Start choice and print SD file - HMI_flag.heat_flag = true; - HMI_flag.print_finish = false; - HMI_ValueStruct.show_mode = 0; - - card.openAndPrintFile(card.filename); - - #if FAN_COUNT > 0 - // All fans on for Ender 3 v2 ? - // The slicer should manage this for us. - // for (uint8_t i = 0; i < FAN_COUNT; i++) - // thermalManager.fan_speed[i] = FANON; - #endif - - Goto_PrintProcess(); - } - } -HMI_SelectFileExit: - DWIN_UpdateLCD(); -} - -/* Printing */ -void HMI_Printing() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - if (HMI_flag.done_confirm_flag) { - if (encoder_diffState == ENCODER_DIFF_ENTER) { - HMI_flag.done_confirm_flag = false; - dwin_abort_flag = true; // Reset feedrate, return to Home - } - return; - } - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_print.inc(3)) { - switch (select_print.now) { - case 0: ICON_Tune(); break; - case 1: - ICON_Tune(); - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); - break; - case 2: - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); - ICON_Stop(); - break; - } - } - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_print.dec()) { - switch (select_print.now) { - case 0: - ICON_Tune(); - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); - break; - case 1: - if (printingIsPaused()) ICON_Continue(); else ICON_Pause(); - ICON_Stop(); - break; - case 2: ICON_Stop(); break; - } - } - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_print.now) { - case 0: // Tune - checkkey = Tune; - HMI_ValueStruct.show_mode = 0; - select_tune.reset(); - index_tune = MROWS; - Draw_Tune_Menu(); - break; - case 1: // Pause - if (HMI_flag.pause_flag) { - ICON_Pause(); - - char cmd[40]; - cmd[0] = '\0'; - - #if ENABLED(PAUSE_HEAT) - #if HAS_HEATED_BED - if (tempbed) sprintf_P(cmd, PSTR("M190 S%i\n"), tempbed); - #endif - #if HAS_HOTEND - if (temphot) sprintf_P(&cmd[strlen(cmd)], PSTR("M109 S%i\n"), temphot); - #endif - #endif - - strcat_P(cmd, M24_STR); - queue.inject(cmd); - } - else { - HMI_flag.select_flag = true; - checkkey = Print_window; - Popup_window_PauseOrStop(); - } - break; - - case 2: // Stop - HMI_flag.select_flag = true; - checkkey = Print_window; - Popup_window_PauseOrStop(); - break; - - default: break; - } - } - DWIN_UpdateLCD(); -} - -/* Pause and Stop window */ -void HMI_PauseOrStop() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - if (encoder_diffState == ENCODER_DIFF_CW) - Draw_Select_Highlight(false); - else if (encoder_diffState == ENCODER_DIFF_CCW) - Draw_Select_Highlight(true); - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - if (select_print.now == 1) { // pause window - if (HMI_flag.select_flag) { - HMI_flag.pause_action = true; - ICON_Continue(); - #if ENABLED(POWER_LOSS_RECOVERY) - if (recovery.enabled) recovery.save(true); - #endif - queue.inject_P(PSTR("M25")); - } - else { - // cancel pause - } - Goto_PrintProcess(); - } - else if (select_print.now == 2) { // stop window - if (HMI_flag.select_flag) { - checkkey = Back_Main; - if (HMI_flag.home_flag) planner.synchronize(); // Wait for planner moves to finish! - wait_for_heatup = wait_for_user = false; // Stop waiting for heating/user - card.flag.abort_sd_printing = true; // Let the main loop handle SD abort - dwin_abort_flag = true; // Reset feedrate, return to Home - #ifdef ACTION_ON_CANCEL - host_action_cancel(); - #endif - Popup_Window_Home(true); - } - else - Goto_PrintProcess(); // cancel stop - } - } - DWIN_UpdateLCD(); -} - -inline void Draw_Move_Menu() { - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 192, 1, 233, 14); // "Move" - DWIN_Frame_AreaCopy(1, 58, 118, 106, 132, LBLX, MBASE(1)); - DWIN_Frame_AreaCopy(1, 109, 118, 157, 132, LBLX, MBASE(2)); - DWIN_Frame_AreaCopy(1, 160, 118, 209, 132, LBLX, MBASE(3)); - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 212, 118, 253, 131, LBLX, MBASE(4)); - #endif - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_MOVE_AXIS)); - #else - DWIN_Frame_TitleCopy(1, 231, 2, 265, 12); // "Move" - #endif - draw_move_en(MBASE(1)); say_x(36, MBASE(1)); // "Move X" - draw_move_en(MBASE(2)); say_y(36, MBASE(2)); // "Move Y" - draw_move_en(MBASE(3)); say_z(36, MBASE(3)); // "Move Z" - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 123, 192, 176, 202, LBLX, MBASE(4)); // "Extruder" - #endif - } - - Draw_Back_First(select_axis.now == 0); - if (select_axis.now) Draw_Menu_Cursor(select_axis.now); - - // Draw separators and icons - LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MoveX + i); -} - -#include "../../../libs/buzzer.h" - -void HMI_AudioFeedback(const bool success=true) { - if (success) { - buzzer.tone(100, 659); - buzzer.tone(10, 0); - buzzer.tone(100, 698); - } - else - buzzer.tone(40, 440); -} - -/* Prepare */ -void HMI_Prepare() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_prepare.inc(1 + PREPARE_CASE_TOTAL)) { - if (select_prepare.now > MROWS && select_prepare.now > index_prepare) { - index_prepare = select_prepare.now; - - // Scroll up and draw a blank bottom line - Scroll_Menu(DWIN_SCROLL_UP); - Draw_Menu_Icon(MROWS, ICON_Axis + select_prepare.now - 1); - - // Draw "More" icon for sub-menus - if (index_prepare < 7) Draw_More_Icon(MROWS - index_prepare + 1); - - #if HAS_HOTEND - if (index_prepare == PREPARE_CASE_ABS) Item_Prepare_ABS(MROWS); - #endif - #if HAS_PREHEAT - if (index_prepare == PREPARE_CASE_COOL) Item_Prepare_Cool(MROWS); - #endif - if (index_prepare == PREPARE_CASE_LANG) Item_Prepare_Lang(MROWS); - } - else { - Move_Highlight(1, select_prepare.now + MROWS - index_prepare); - } - } - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_prepare.dec()) { - if (select_prepare.now < index_prepare - MROWS) { - index_prepare--; - Scroll_Menu(DWIN_SCROLL_DOWN); - - if (index_prepare == MROWS) - Draw_Back_First(); - else - Draw_Menu_Line(0, ICON_Axis + select_prepare.now - 1); - - if (index_prepare < 7) Draw_More_Icon(MROWS - index_prepare + 1); - - if (index_prepare == 6) Item_Prepare_Move(0); - else if (index_prepare == 7) Item_Prepare_Disable(0); - else if (index_prepare == 8) Item_Prepare_Home(0); - } - else { - Move_Highlight(-1, select_prepare.now + MROWS - index_prepare); - } - } - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_prepare.now) { - case 0: // Back - select_page.set(1); - Goto_MainMenu(); - break; - case PREPARE_CASE_MOVE: // Axis move - checkkey = AxisMove; - select_axis.reset(); - Draw_Move_Menu(); - - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(1), current_position.x * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(2), current_position.y * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 216, MBASE(3), current_position.z * MINUNITMULT); - #if HAS_HOTEND - HMI_ValueStruct.Move_E_scale = current_position.e * MINUNITMULT; - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scale); - #endif - break; - case PREPARE_CASE_DISA: // Disable steppers - queue.inject_P(PSTR("M84")); - break; - case PREPARE_CASE_HOME: // Homing - checkkey = Last_Prepare; - index_prepare = MROWS; - queue.inject_P(G28_STR); // G28 will set home_flag - Popup_Window_Home(); - break; - #if HAS_ZOFFSET_ITEM - case PREPARE_CASE_ZOFF: // Z-offset - #if EITHER(HAS_BED_PROBE, BABYSTEPPING) - checkkey = Homeoffset; - HMI_ValueStruct.show_mode = -4; - HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, MBASE(PREPARE_CASE_ZOFF + MROWS - index_prepare), HMI_ValueStruct.offset_value); - EncoderRate.enabled = true; - #else - // Apply workspace offset, making the current position 0,0,0 - queue.inject_P(PSTR("G92 X0 Y0 Z0")); - HMI_AudioFeedback(); - #endif - break; - #endif - #if HAS_HOTEND - case PREPARE_CASE_PLA: // PLA preheat - thermalManager.setTargetHotend(ui.material_preset[0].hotend_temp, 0); - thermalManager.setTargetBed(ui.material_preset[0].bed_temp); - thermalManager.set_fan_speed(0, ui.material_preset[0].fan_speed); - break; - case PREPARE_CASE_ABS: // ABS preheat - thermalManager.setTargetHotend(ui.material_preset[1].hotend_temp, 0); - thermalManager.setTargetBed(ui.material_preset[1].bed_temp); - thermalManager.set_fan_speed(0, ui.material_preset[1].fan_speed); - break; - #endif - #if HAS_PREHEAT - case PREPARE_CASE_COOL: // Cool - TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); - #if HAS_HOTEND || HAS_HEATED_BED - thermalManager.disable_all_heaters(); - #endif - break; - #endif - case PREPARE_CASE_LANG: // Toggle Language - HMI_ToggleLanguage(); - Draw_Prepare_Menu(); - break; - default: break; - } - } - DWIN_UpdateLCD(); -} - -void Draw_Temperature_Menu() { - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 236, 2, 263, 13); // "Temperature" - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX, MBASE(TEMP_CASE_TEMP)); - #endif - #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 58, 134, 113, 146, LBLX, MBASE(TEMP_CASE_BED)); - #endif - #if HAS_FAN - DWIN_Frame_AreaCopy(1, 115, 134, 170, 146, LBLX, MBASE(TEMP_CASE_FAN)); - #endif - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 100, 89, 178, 101, LBLX, MBASE(TEMP_CASE_PLA)); - DWIN_Frame_AreaCopy(1, 180, 89, 260, 100, LBLX, MBASE(TEMP_CASE_ABS)); - #endif - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_TEMPERATURE)); - #if HAS_HOTEND - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TEMP_CASE_TEMP), GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND)); - #endif - #if HAS_HEATED_BED - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TEMP_CASE_BED), GET_TEXT_F(MSG_UBL_SET_TEMP_BED)); - #endif - #if HAS_FAN - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TEMP_CASE_FAN), GET_TEXT_F(MSG_FAN_SPEED)); - #endif - #if HAS_HOTEND - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TEMP_CASE_PLA), F("PLA Preheat Settings")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(TEMP_CASE_ABS), F("ABS Preheat Settings")); - #endif - #else - DWIN_Frame_TitleCopy(1, 56, 16, 141, 28); // "Temperature" - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX, MBASE(TEMP_CASE_TEMP)); // Nozzle... - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 44, MBASE(TEMP_CASE_TEMP)); // ...Temperature - #endif - #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 240, 104, 264, 114, LBLX, MBASE(TEMP_CASE_BED)); // Bed... - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 27, MBASE(TEMP_CASE_BED)); // ...Temperature - #endif - #if HAS_FAN - DWIN_Frame_AreaCopy(1, 0, 119, 64, 132, LBLX, MBASE(TEMP_CASE_FAN)); // Fan speed - #endif - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 107, 76, 156, 86, LBLX, MBASE(TEMP_CASE_PLA)); // Preheat... - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX + 52, MBASE(TEMP_CASE_PLA)); // ...PLA - DWIN_Frame_AreaCopy(1, 131, 119, 182, 132, LBLX + 79, MBASE(TEMP_CASE_PLA)); // PLA setting - DWIN_Frame_AreaCopy(1, 107, 76, 156, 86, LBLX, MBASE(TEMP_CASE_ABS)); // Preheat... - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX + 52, MBASE(TEMP_CASE_ABS)); // ...ABS - DWIN_Frame_AreaCopy(1, 131, 119, 182, 132, LBLX + 81, MBASE(TEMP_CASE_ABS)); // ABS setting - #endif - #endif - } - - Draw_Back_First(select_temp.now == 0); - if (select_temp.now) Draw_Menu_Cursor(select_temp.now); - - // Draw icons and lines - uint8_t i = 0; - #define _TMENU_ICON(N) Draw_Menu_Line(++i, ICON_SetEndTemp + (N) - 1) - #if HAS_HOTEND - _TMENU_ICON(TEMP_CASE_TEMP); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), thermalManager.temp_hotend[0].target); - #endif - #if HAS_HEATED_BED - _TMENU_ICON(TEMP_CASE_BED); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), thermalManager.temp_bed.target); - #endif - #if HAS_FAN - _TMENU_ICON(TEMP_CASE_FAN); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), thermalManager.fan_speed[0]); - #endif - #if HAS_HOTEND - // PLA/ABS items have submenus - _TMENU_ICON(TEMP_CASE_PLA); - Draw_More_Icon(i); - _TMENU_ICON(TEMP_CASE_ABS); - Draw_More_Icon(i); - #endif -} - -/* Control */ -void HMI_Control() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_control.inc(1 + CONTROL_CASE_TOTAL)) { - if (select_control.now > MROWS && select_control.now > index_control) { - index_control = select_control.now; - Scroll_Menu(DWIN_SCROLL_UP); - Draw_Menu_Icon(MROWS, ICON_Temperature + index_control - 1); - Draw_More_Icon(CONTROL_CASE_TEMP + MROWS - index_control); // Temperature > - Draw_More_Icon(CONTROL_CASE_MOVE + MROWS - index_control); // Motion > - if (index_control > MROWS) { - Draw_More_Icon(CONTROL_CASE_INFO + MROWS - index_control); // Info > - if (HMI_IsChinese()) - DWIN_Frame_AreaCopy(1, 231, 104, 258, 116, LBLX, MBASE(CONTROL_CASE_INFO - 1)); - else - DWIN_Frame_AreaCopy(1, 0, 104, 24, 114, LBLX, MBASE(CONTROL_CASE_INFO - 1)); - } - } - else { - Move_Highlight(1, select_control.now + MROWS - index_control); - } - } - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_control.dec()) { - if (select_control.now < index_control - MROWS) { - index_control--; - Scroll_Menu(DWIN_SCROLL_DOWN); - if (index_control == MROWS) - Draw_Back_First(); - else - Draw_Menu_Line(0, ICON_Temperature + select_control.now - 1); - Draw_More_Icon(0 + MROWS - index_control + 1); // Temperature > - Draw_More_Icon(1 + MROWS - index_control + 1); // Motion > - } - else { - Move_Highlight(-1, select_control.now + MROWS - index_control); - } - } - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_control.now) { - case 0: // Back - select_page.set(2); - Goto_MainMenu(); - break; - case CONTROL_CASE_TEMP: // Temperature - checkkey = TemperatureID; - HMI_ValueStruct.show_mode = -1; - select_temp.reset(); - Draw_Temperature_Menu(); - break; - case CONTROL_CASE_MOVE: // Motion - checkkey = Motion; - select_motion.reset(); - Draw_Motion_Menu(); - break; - #if ENABLED(EEPROM_SETTINGS) - case CONTROL_CASE_SAVE: { // Write EEPROM - const bool success = settings.save(); - HMI_AudioFeedback(success); - } break; - case CONTROL_CASE_LOAD: { // Read EEPROM - const bool success = settings.load(); - HMI_AudioFeedback(success); - } break; - case CONTROL_CASE_RESET: // Reset EEPROM - settings.reset(); - HMI_AudioFeedback(); - break; - #endif - case CONTROL_CASE_INFO: // Info - checkkey = Info; - Draw_Info_Menu(); - break; - default: break; - } - } - DWIN_UpdateLCD(); -} - - -#if HAS_ONESTEP_LEVELING - - /* Leveling */ - void HMI_Leveling() { - Popup_Window_Leveling(); - DWIN_UpdateLCD(); - queue.inject_P(PSTR("G28O\nG29")); - } - -#endif - -/* Axis Move */ -void HMI_AxisMove() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - #if ENABLED(PREVENT_COLD_EXTRUSION) - // popup window resume - if (HMI_flag.ETempTooLow_flag) { - if (encoder_diffState == ENCODER_DIFF_ENTER) { - HMI_flag.ETempTooLow_flag = false; - HMI_ValueStruct.Move_E_scale = current_position.e * MINUNITMULT; - Draw_Move_Menu(); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scale); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale); - DWIN_Draw_Signed_Float(font8x16, Color_Bg_Black, 3, 1, 216, MBASE(4), 0); - DWIN_UpdateLCD(); - } - return; - } - #endif - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_axis.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_axis.now); - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_axis.dec()) Move_Highlight(-1, select_axis.now); - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_axis.now) { - case 0: // Back - checkkey = Prepare; - select_prepare.set(1); - index_prepare = MROWS; - Draw_Prepare_Menu(); - break; - case 1: // X axis move - checkkey = Move_X; - HMI_ValueStruct.Move_X_scale = current_position.x * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(1), HMI_ValueStruct.Move_X_scale); - EncoderRate.enabled = true; - break; - case 2: // Y axis move - checkkey = Move_Y; - HMI_ValueStruct.Move_Y_scale = current_position.y * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(2), HMI_ValueStruct.Move_Y_scale); - EncoderRate.enabled = true; - break; - case 3: // Z axis move - checkkey = Move_Z; - HMI_ValueStruct.Move_Z_scale = current_position.z * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 1, 216, MBASE(3), HMI_ValueStruct.Move_Z_scale); - EncoderRate.enabled = true; - break; - #if HAS_HOTEND - case 4: // Extruder - // window tips - #ifdef PREVENT_COLD_EXTRUSION - if (thermalManager.temp_hotend[0].celsius < EXTRUDE_MINTEMP) { - HMI_flag.ETempTooLow_flag = true; - Popup_Window_ETempTooLow(); - DWIN_UpdateLCD(); - return; - } - #endif - checkkey = Extruder; - HMI_ValueStruct.Move_E_scale = current_position.e * MINUNITMULT; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 3, 1, 216, MBASE(4), HMI_ValueStruct.Move_E_scale); - EncoderRate.enabled = true; - break; - #endif - } - } - DWIN_UpdateLCD(); -} - -/* TemperatureID */ -void HMI_Temperature() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_temp.inc(1 + TEMP_CASE_TOTAL)) Move_Highlight(1, select_temp.now); - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_temp.dec()) Move_Highlight(-1, select_temp.now); - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_temp.now) { - case 0: // Back - checkkey = Control; - select_control.set(1); - index_control = MROWS; - Draw_Control_Menu(); - break; - #if HAS_HOTEND - case TEMP_CASE_TEMP: // Nozzle temperature - checkkey = ETemp; - HMI_ValueStruct.E_Temp = thermalManager.temp_hotend[0].target; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(1), thermalManager.temp_hotend[0].target); - EncoderRate.enabled = true; - break; - #endif - #if HAS_HEATED_BED - case TEMP_CASE_BED: // Bed temperature - checkkey = BedTemp; - HMI_ValueStruct.Bed_Temp = thermalManager.temp_bed.target; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(2), thermalManager.temp_bed.target); - EncoderRate.enabled = true; - break; - #endif - #if HAS_FAN - case TEMP_CASE_FAN: // Fan speed - checkkey = FanSpeed; - HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0]; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(3), thermalManager.fan_speed[0]); - EncoderRate.enabled = true; - break; - #endif - #if HAS_HOTEND - case TEMP_CASE_PLA: { // PLA preheat setting - checkkey = PLAPreheat; - select_PLA.reset(); - HMI_ValueStruct.show_mode = -2; - - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 59, 16, 139, 29); // "PLA Settings" - DWIN_Frame_AreaCopy(1, 100, 89, 124, 101, LBLX, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX + 24, MBASE(PREHEAT_CASE_TEMP)); // PLA nozzle temp - #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 100, 89, 124, 101, LBLX, MBASE(PREHEAT_CASE_BED)); - DWIN_Frame_AreaCopy(1, 58, 134, 113, 146, LBLX + 24, MBASE(PREHEAT_CASE_BED)); // PLA bed temp - #endif - #if HAS_FAN - DWIN_Frame_AreaCopy(1, 100, 89, 124, 101, LBLX, MBASE(PREHEAT_CASE_FAN)); - DWIN_Frame_AreaCopy(1, 115, 134, 170, 146, LBLX + 24, MBASE(PREHEAT_CASE_FAN)); // PLA fan speed - #endif - #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 72, 148, 151, 162, LBLX, MBASE(PREHEAT_CASE_SAVE)); // Save PLA configuration - #endif - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title("PLA Settings"); // TODO: GET_TEXT_F - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(PREHEAT_CASE_TEMP), F("Nozzle Temp")); - #if HAS_HEATED_BED - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(PREHEAT_CASE_BED), F("Bed Temp")); - #endif - #if HAS_FAN - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(PREHEAT_CASE_FAN), GET_TEXT_F(MSG_FAN_SPEED)); - #endif - #if ENABLED(EEPROM_SETTINGS) - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(PREHEAT_CASE_SAVE), GET_TEXT_F(MSG_STORE_EEPROM)); - #endif - #else - DWIN_Frame_TitleCopy(1, 56, 16, 141, 28); // "PLA Settings" - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX + 27, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 71, MBASE(PREHEAT_CASE_TEMP)); // PLA nozzle temp - #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX, MBASE(PREHEAT_CASE_BED) + 3); - DWIN_Frame_AreaCopy(1, 240, 104, 264, 114, LBLX + 27, MBASE(PREHEAT_CASE_BED) + 3); - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 54, MBASE(PREHEAT_CASE_BED) + 3); // PLA bed temp - #endif - #if HAS_FAN - DWIN_Frame_AreaCopy(1, 157, 76, 181, 86, LBLX, MBASE(PREHEAT_CASE_FAN)); - DWIN_Frame_AreaCopy(1, 0, 119, 64, 132, LBLX + 27, MBASE(PREHEAT_CASE_FAN)); // PLA fan speed - #endif - #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 97, 165, 229, 177, LBLX, MBASE(PREHEAT_CASE_SAVE)); // Save PLA configuration - #endif - #endif - } - - Draw_Back_First(); - - uint8_t i = 0; - Draw_Menu_Line(++i, ICON_SetEndTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[0].hotend_temp); - #if HAS_HEATED_BED - Draw_Menu_Line(++i, ICON_SetBedTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[0].bed_temp); - #endif - #if HAS_FAN - Draw_Menu_Line(++i, ICON_FanSpeed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[0].fan_speed); - #endif - #if ENABLED(EEPROM_SETTINGS) - Draw_Menu_Line(++i, ICON_WriteEEPROM); - #endif - } break; - - case TEMP_CASE_ABS: { // ABS preheat setting - checkkey = ABSPreheat; - select_ABS.reset(); - HMI_ValueStruct.show_mode = -3; - - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 142, 16, 223, 29); // "ABS Settings" - - DWIN_Frame_AreaCopy(1, 180, 89, 204, 100, LBLX, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 1, 134, 56, 146, LBLX + 24, MBASE(PREHEAT_CASE_TEMP)); // ABS nozzle temp - #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 180, 89, 204, 100, LBLX, MBASE(PREHEAT_CASE_BED)); - DWIN_Frame_AreaCopy(1, 58, 134, 113, 146, LBLX + 24, MBASE(PREHEAT_CASE_BED)); // ABS bed temp - #endif - #if HAS_FAN - DWIN_Frame_AreaCopy(1, 180, 89, 204, 100, LBLX, MBASE(PREHEAT_CASE_FAN)); - DWIN_Frame_AreaCopy(1, 115, 134, 170, 146, LBLX + 24, MBASE(PREHEAT_CASE_FAN)); // ABS fan speed - #endif - #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 72, 148, 151, 162, LBLX, MBASE(PREHEAT_CASE_SAVE)); - DWIN_Frame_AreaCopy(1, 180, 89, 204, 100, LBLX + 28, MBASE(PREHEAT_CASE_SAVE) + 2); // Save ABS configuration - #endif - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title("ABS Settings"); // TODO: GET_TEXT_F - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(PREHEAT_CASE_TEMP), F("Nozzle Temp")); - #if HAS_HEATED_BED - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(PREHEAT_CASE_BED), F("Bed Temp")); - #endif - #if HAS_FAN - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(PREHEAT_CASE_FAN), GET_TEXT_F(MSG_FAN_SPEED)); - #endif - #if ENABLED(EEPROM_SETTINGS) - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(PREHEAT_CASE_SAVE), GET_TEXT_F(MSG_STORE_EEPROM)); - #endif - #else - DWIN_Frame_TitleCopy(1, 56, 16, 141, 28); // "ABS Settings" - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 197, 104, 238, 114, LBLX + 27, MBASE(PREHEAT_CASE_TEMP)); - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 71, MBASE(PREHEAT_CASE_TEMP)); // ABS nozzle temp - #if HAS_HEATED_BED - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX, MBASE(PREHEAT_CASE_BED) + 3); - DWIN_Frame_AreaCopy(1, 240, 104, 264, 114, LBLX + 27, MBASE(PREHEAT_CASE_BED) + 3); - DWIN_Frame_AreaCopy(1, 1, 89, 83, 101, LBLX + 54, MBASE(PREHEAT_CASE_BED) + 3); // ABS bed temp - #endif - #if HAS_FAN - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX, MBASE(PREHEAT_CASE_FAN)); - DWIN_Frame_AreaCopy(1, 0, 119, 64, 132, LBLX + 27, MBASE(PREHEAT_CASE_FAN)); // ABS fan speed - #endif - #if ENABLED(EEPROM_SETTINGS) - DWIN_Frame_AreaCopy(1, 97, 165, 229, 177, LBLX, MBASE(PREHEAT_CASE_SAVE)); - DWIN_Frame_AreaCopy(1, 172, 76, 198, 86, LBLX + 33, MBASE(PREHEAT_CASE_SAVE)); // Save ABS configuration - #endif - #endif - } - - Draw_Back_First(); - - uint8_t i = 0; - Draw_Menu_Line(++i, ICON_SetEndTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[1].hotend_temp); - #if HAS_HEATED_BED - Draw_Menu_Line(++i, ICON_SetBedTemp); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[1].bed_temp); - #endif - #if HAS_FAN - Draw_Menu_Line(++i, ICON_FanSpeed); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 216, MBASE(i), ui.material_preset[1].fan_speed); - #endif - #if ENABLED(EEPROM_SETTINGS) - Draw_Menu_Line(++i, ICON_WriteEEPROM); - #endif - - } break; - - #endif // HAS_HOTEND - } - } - DWIN_UpdateLCD(); -} - -inline void Draw_Max_Speed_Menu() { - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Max Speed (mm/s)" - - auto say_max_speed = [](const uint16_t row) { - DWIN_Frame_AreaCopy(1, 173, 133, 228, 147, LBLX, row); // "Max speed" - }; - - say_max_speed(MBASE(1)); // "Max speed" - DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 58, MBASE(1)); // X - say_max_speed(MBASE(2)); // "Max speed" - DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 58, MBASE(2) + 3); // Y - say_max_speed(MBASE(3)); // "Max speed" - DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 58, MBASE(3) + 3); // Z - #if HAS_HOTEND - say_max_speed(MBASE(4)); // "Max speed" - DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 58, MBASE(4) + 3); // E - #endif - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title("Max Speed (mm/s)"); // TODO: GET_TEXT_F - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(1), F("Max Feedrate X")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(2), F("Max Feedrate Y")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(3), F("Max Feedrate Z")); - #if HAS_HOTEND - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(4), F("Max Feedrate E")); - #endif - #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Max Speed (mm/s)" - - draw_max_en(MBASE(1)); // "Max" - DWIN_Frame_AreaCopy(1, 184, 119, 234, 132, LBLX + 27, MBASE(1)); // "Speed X" - - draw_max_en(MBASE(2)); // "Max" - draw_speed_en(27, MBASE(2)); // "Speed" - say_y(70, MBASE(2)); // "Y" - - draw_max_en(MBASE(3)); // "Max" - draw_speed_en(27, MBASE(3)); // "Speed" - say_z(70, MBASE(3)); // "Z" - - #if HAS_HOTEND - draw_max_en(MBASE(4)); // "Max" - draw_speed_en(27, MBASE(4)); // "Speed" - say_e(70, MBASE(4)); // "E" - #endif - #endif - } - - Draw_Back_First(); - LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedX + i); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(1), planner.settings.max_feedrate_mm_s[X_AXIS]); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(2), planner.settings.max_feedrate_mm_s[Y_AXIS]); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(3), planner.settings.max_feedrate_mm_s[Z_AXIS]); - #if HAS_HOTEND - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(4), planner.settings.max_feedrate_mm_s[E_AXIS]); - #endif -} - -inline void Draw_Max_Accel_Menu() { - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Acceleration" - - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(1)); - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(1) + 1); - DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 71, MBASE(1)); // Max acceleration X - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(2)); - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(2) + 1); - DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 71, MBASE(2) + 2); // Max acceleration Y - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(3)); - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(3) + 1); - DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 71, MBASE(3) + 2); // Max acceleration Z - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX, MBASE(4)); - DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(4) + 1); - DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 71, MBASE(4) + 2); // Max acceleration E - #endif - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_ACCELERATION)); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(1), F("Max Accel X")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(2), F("Max Accel Y")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(3), F("Max Accel Z")); - #if HAS_HOTEND - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(4), F("Max Accel E")); - #endif - #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Acceleration" - draw_max_accel_en(MBASE(1)); say_x(108, MBASE(1)); // "Max Acceleration X" - draw_max_accel_en(MBASE(2)); say_y(108, MBASE(2)); // "Max Acceleration Y" - draw_max_accel_en(MBASE(3)); say_z(108, MBASE(3)); // "Max Acceleration Z" - #if HAS_HOTEND - draw_max_accel_en(MBASE(4)); say_e(108, MBASE(4)); // "Max Acceleration E" - #endif - #endif - } - - Draw_Back_First(); - LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxAccX + i); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(1), planner.settings.max_acceleration_mm_per_s2[X_AXIS]); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(2), planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(3), planner.settings.max_acceleration_mm_per_s2[Z_AXIS]); - #if HAS_HOTEND - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 4, 210, MBASE(4), planner.settings.max_acceleration_mm_per_s2[E_AXIS]); - #endif -} - -#if HAS_CLASSIC_JERK - inline void Draw_Max_Jerk_Menu() { - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Jerk" - - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(1)); - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(1) + 1); - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(1)); - DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 83, MBASE(1)); // Max Jerk speed X - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(2)); - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(2) + 1); - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(2)); - DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 83, MBASE(2) + 3); // Max Jerk speed Y - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(3)); - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(3) + 1); - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(3)); - DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 83, MBASE(3) + 3); // Max Jerk speed Z - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 173, 133, 200, 147, LBLX , MBASE(4)); - DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(4) + 1); - DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(4)); - DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 83, MBASE(4) + 3); // Max Jerk speed E - #endif - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_JERK)); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(1), F("Max Jerk X")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(2), F("Max Jerk Y")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(3), F("Max Jerk Z")); - #if HAS_HOTEND - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(4), F("Max Jerk E")); - #endif - #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Jerk" - draw_max_en(MBASE(1)); // "Max" - draw_jerk_en(MBASE(1)); // "Jerk" - draw_speed_en(72, MBASE(1)); // "Speed" - say_x(115, MBASE(1)); // "X" - - draw_max_en(MBASE(2)); // "Max" - draw_jerk_en(MBASE(2)); // "Jerk" - draw_speed_en(72, MBASE(2)); // "Speed" - say_y(115, MBASE(2)); // "Y" - - draw_max_en(MBASE(3)); // "Max" - draw_jerk_en(MBASE(3)); // "Jerk" - draw_speed_en(72, MBASE(3)); // "Speed" - say_z(115, MBASE(3)); // "Z" - - #if HAS_HOTEND - draw_max_en(MBASE(4)); // "Max" - draw_jerk_en(MBASE(4)); // "Jerk" - draw_speed_en(72, MBASE(4)); // "Speed" - say_e(115, MBASE(4)); // "E" - #endif - #endif - } - - Draw_Back_First(); - LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedJerkX + i); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(1), planner.max_jerk[X_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(2), planner.max_jerk[Y_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(3), planner.max_jerk[Z_AXIS] * MINUNITMULT); - #if HAS_HOTEND - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(4), planner.max_jerk[E_AXIS] * MINUNITMULT); - #endif - } -#endif - -inline void Draw_Steps_Menu() { - Clear_Main_Window(); - - if (HMI_IsChinese()) { - DWIN_Frame_TitleCopy(1, 1, 16, 28, 28); // "Steps per mm" - - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(1)); - DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 44, MBASE(1)); // Transmission Ratio X - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(2)); - DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 44, MBASE(2) + 3); // Transmission Ratio Y - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(3)); - DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 44, MBASE(3) + 3); // Transmission Ratio Z - #if HAS_HOTEND - DWIN_Frame_AreaCopy(1, 153, 148, 194, 161, LBLX, MBASE(4)); - DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 44, MBASE(4) + 3); // Transmission Ratio E - #endif - } - else { - #ifdef USE_STRING_HEADINGS - Draw_Title(GET_TEXT_F(MSG_STEPS_PER_MM)); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(1), F("Steps/mm X")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(2), F("Steps/mm Y")); - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(3), F("Steps/mm Z")); - #if HAS_HOTEND - DWIN_Draw_String(false, true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(4), F("Steps/mm E")); - #endif - #else - DWIN_Frame_TitleCopy(1, 144, 16, 189, 26); // "Steps per mm" - draw_steps_per_mm(MBASE(1)); say_x(103, MBASE(1)); // "Steps-per-mm X" - draw_steps_per_mm(MBASE(2)); say_y(103, MBASE(2)); // "Y" - draw_steps_per_mm(MBASE(3)); say_z(103, MBASE(3)); // "Z" - #if HAS_HOTEND - draw_steps_per_mm(MBASE(4)); say_e(103, MBASE(4)); // "E" - #endif - #endif - } - - Draw_Back_First(); - LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_StepX + i); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(1), planner.settings.axis_steps_per_mm[X_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(2), planner.settings.axis_steps_per_mm[Y_AXIS] * MINUNITMULT); - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(3), planner.settings.axis_steps_per_mm[Z_AXIS] * MINUNITMULT); - #if HAS_HOTEND - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, UNITFDIGITS, 210, MBASE(4), planner.settings.axis_steps_per_mm[E_AXIS] * MINUNITMULT); - #endif -} - -/* Motion */ -void HMI_Motion() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_motion.inc(1 + MOTION_CASE_TOTAL)) Move_Highlight(1, select_motion.now); - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_motion.dec()) Move_Highlight(-1, select_motion.now); - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_motion.now) { - case 0: // Back - checkkey = Control; - select_control.set(CONTROL_CASE_MOVE); - index_control = MROWS; - Draw_Control_Menu(); - break; - case MOTION_CASE_RATE: // Max speed - checkkey = MaxSpeed; - select_speed.reset(); - Draw_Max_Speed_Menu(); - break; - case MOTION_CASE_ACCEL: // Max acceleration - checkkey = MaxAcceleration; - select_acc.reset(); - Draw_Max_Accel_Menu(); - break; - #if HAS_CLASSIC_JERK - case MOTION_CASE_JERK: // Max jerk - checkkey = MaxJerk; - select_jerk.reset(); - Draw_Max_Jerk_Menu(); - break; - #endif - case MOTION_CASE_STEPS: // Steps per mm - checkkey = Step; - select_step.reset(); - Draw_Steps_Menu(); - break; - default: break; - } - } - DWIN_UpdateLCD(); -} - -/* Info */ -void HMI_Info() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - if (encoder_diffState == ENCODER_DIFF_ENTER) { - #if HAS_ONESTEP_LEVELING - checkkey = Control; - select_control.set(CONTROL_CASE_INFO); - Draw_Control_Menu(); - #else - select_page.set(3); - Goto_MainMenu(); - #endif - } - DWIN_UpdateLCD(); -} - -/* Tune */ -void HMI_Tune() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_tune.inc(1 + TUNE_CASE_TOTAL)) { - if (select_tune.now > MROWS && select_tune.now > index_tune) { - index_tune = select_tune.now; - Scroll_Menu(DWIN_SCROLL_UP); - } - else { - Move_Highlight(1, select_tune.now + MROWS - index_tune); - } - } - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_tune.dec()) { - if (select_tune.now < index_tune - MROWS) { - index_tune--; - Scroll_Menu(DWIN_SCROLL_DOWN); - if (index_tune == MROWS) Draw_Back_First(); - } - else { - Move_Highlight(-1, select_tune.now + MROWS - index_tune); - } - } - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_tune.now) { - case 0: { // Back - select_print.set(0); - Goto_PrintProcess(); - } - break; - case TUNE_CASE_SPEED: // Print speed - checkkey = PrintSpeed; - HMI_ValueStruct.print_speed = feedrate_percentage; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(TUNE_CASE_SPEED + MROWS - index_tune), feedrate_percentage); - EncoderRate.enabled = true; - break; - #if HAS_HOTEND - case TUNE_CASE_TEMP: // Nozzle temp - checkkey = ETemp; - HMI_ValueStruct.E_Temp = thermalManager.temp_hotend[0].target; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(TUNE_CASE_TEMP + MROWS - index_tune), thermalManager.temp_hotend[0].target); - EncoderRate.enabled = true; - break; - #endif - #if HAS_HEATED_BED - case TUNE_CASE_BED: // Bed temp - checkkey = BedTemp; - HMI_ValueStruct.Bed_Temp = thermalManager.temp_bed.target; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(TUNE_CASE_BED + MROWS - index_tune), thermalManager.temp_bed.target); - EncoderRate.enabled = true; - break; - #endif - #if HAS_FAN - case TUNE_CASE_FAN: // Fan speed - checkkey = FanSpeed; - HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0]; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(TUNE_CASE_FAN + MROWS - index_tune), thermalManager.fan_speed[0]); - EncoderRate.enabled = true; - break; - #endif - #if HAS_ZOFFSET_ITEM - case TUNE_CASE_ZOFF: // Z-offset - #if EITHER(HAS_BED_PROBE, BABYSTEPPING) - checkkey = Homeoffset; - HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; - DWIN_Draw_Signed_Float(font8x16, Select_Color, 2, 2, 202, MBASE(TUNE_CASE_ZOFF + MROWS - index_tune), HMI_ValueStruct.offset_value); - EncoderRate.enabled = true; - #else - // Apply workspace offset, making the current position 0,0,0 - queue.inject_P(PSTR("G92 X0 Y0 Z0")); - HMI_AudioFeedback(); - #endif - break; - #endif - default: break; - } - } - DWIN_UpdateLCD(); -} - -#if HAS_PREHEAT - - /* PLA Preheat */ - void HMI_PLAPreheatSetting() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_PLA.inc(1 + PREHEAT_CASE_TOTAL)) Move_Highlight(1, select_PLA.now); - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_PLA.dec()) Move_Highlight(-1, select_PLA.now); - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_PLA.now) { - case 0: // Back - checkkey = TemperatureID; - select_temp.now = TEMP_CASE_PLA; - HMI_ValueStruct.show_mode = -1; - Draw_Temperature_Menu(); - break; - #if HAS_HOTEND - case PREHEAT_CASE_TEMP: // Nozzle temperature - checkkey = ETemp; - HMI_ValueStruct.E_Temp = ui.material_preset[0].hotend_temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_TEMP), ui.material_preset[0].hotend_temp); - EncoderRate.enabled = true; - break; - #endif - #if HAS_HEATED_BED - case PREHEAT_CASE_BED: // Bed temperature - checkkey = BedTemp; - HMI_ValueStruct.Bed_Temp = ui.material_preset[0].bed_temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_BED), ui.material_preset[0].bed_temp); - EncoderRate.enabled = true; - break; - #endif - #if HAS_FAN - case PREHEAT_CASE_FAN: // Fan speed - checkkey = FanSpeed; - HMI_ValueStruct.Fan_speed = ui.material_preset[0].fan_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_FAN), ui.material_preset[0].fan_speed); - EncoderRate.enabled = true; - break; - #endif - #if ENABLED(EEPROM_SETTINGS) - case 4: { // Save PLA configuration - const bool success = settings.save(); - HMI_AudioFeedback(success); - } break; - #endif - default: break; - } - } - DWIN_UpdateLCD(); - } - - /* ABS Preheat */ - void HMI_ABSPreheatSetting() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_ABS.inc(1 + PREHEAT_CASE_TOTAL)) Move_Highlight(1, select_ABS.now); - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_ABS.dec()) Move_Highlight(-1, select_ABS.now); - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - switch (select_ABS.now) { - case 0: // Back - checkkey = TemperatureID; - select_temp.now = TEMP_CASE_ABS; - HMI_ValueStruct.show_mode = -1; - Draw_Temperature_Menu(); - break; - #if HAS_HOTEND - case PREHEAT_CASE_TEMP: // Set nozzle temperature - checkkey = ETemp; - HMI_ValueStruct.E_Temp = ui.material_preset[1].hotend_temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_TEMP), ui.material_preset[1].hotend_temp); - EncoderRate.enabled = true; - break; - #endif - #if HAS_HEATED_BED - case PREHEAT_CASE_BED: // Set bed temperature - checkkey = BedTemp; - HMI_ValueStruct.Bed_Temp = ui.material_preset[1].bed_temp; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_BED), ui.material_preset[1].bed_temp); - EncoderRate.enabled = true; - break; - #endif - #if HAS_FAN - case PREHEAT_CASE_FAN: // Set fan speed - checkkey = FanSpeed; - HMI_ValueStruct.Fan_speed = ui.material_preset[1].fan_speed; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 3, 216, MBASE(PREHEAT_CASE_FAN), ui.material_preset[1].fan_speed); - EncoderRate.enabled = true; - break; - #endif - #if ENABLED(EEPROM_SETTINGS) - case PREHEAT_CASE_SAVE: { // Save ABS configuration - const bool success = settings.save(); - HMI_AudioFeedback(success); - } break; - #endif - default: break; - } - } - DWIN_UpdateLCD(); - } - -#endif - -/* Max Speed */ -void HMI_MaxSpeed() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_speed.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_speed.now); - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_speed.dec()) Move_Highlight(-1, select_speed.now); - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - if (WITHIN(select_speed.now, 1, 4)) { - checkkey = MaxSpeed_value; - HMI_flag.feedspeed_axis = AxisEnum(select_speed.now - 1); - HMI_ValueStruct.Max_Feedspeed = planner.settings.max_feedrate_mm_s[HMI_flag.feedspeed_axis]; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 4, 210, MBASE(select_speed.now), HMI_ValueStruct.Max_Feedspeed); - EncoderRate.enabled = true; - } - else { // Back - checkkey = Motion; - select_motion.now = MOTION_CASE_RATE; - Draw_Motion_Menu(); - } - } - DWIN_UpdateLCD(); -} - -/* Max Acceleration */ -void HMI_MaxAcceleration() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_acc.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_acc.now); - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_acc.dec()) Move_Highlight(-1, select_acc.now); - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - if (WITHIN(select_acc.now, 1, 4)) { - checkkey = MaxAcceleration_value; - HMI_flag.acc_axis = AxisEnum(select_acc.now - 1); - HMI_ValueStruct.Max_Acceleration = planner.settings.max_acceleration_mm_per_s2[HMI_flag.acc_axis]; - DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, Select_Color, 4, 210, MBASE(select_acc.now), HMI_ValueStruct.Max_Acceleration); - EncoderRate.enabled = true; - } - else { // Back - checkkey = Motion; - select_motion.now = MOTION_CASE_ACCEL; - Draw_Motion_Menu(); - } - } - DWIN_UpdateLCD(); -} - -#if HAS_CLASSIC_JERK - /* Max Jerk */ - void HMI_MaxJerk() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_jerk.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_jerk.now); - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_jerk.dec()) Move_Highlight(-1, select_jerk.now); - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - if (WITHIN(select_jerk.now, 1, 4)) { - checkkey = MaxJerk_value; - HMI_flag.jerk_axis = AxisEnum(select_jerk.now - 1); - HMI_ValueStruct.Max_Jerk = planner.max_jerk[HMI_flag.jerk_axis] * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_jerk.now), HMI_ValueStruct.Max_Jerk); - EncoderRate.enabled = true; - } - else { // Back - checkkey = Motion; - select_motion.now = MOTION_CASE_JERK; - Draw_Motion_Menu(); - } - } - DWIN_UpdateLCD(); - } -#endif // HAS_CLASSIC_JERK - -/* Step */ -void HMI_Step() { - ENCODER_DiffState encoder_diffState = get_encoder_state(); - if (encoder_diffState == ENCODER_DIFF_NO) return; - - // Avoid flicker by updating only the previous menu - if (encoder_diffState == ENCODER_DIFF_CW) { - if (select_step.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_step.now); - } - else if (encoder_diffState == ENCODER_DIFF_CCW) { - if (select_step.dec()) Move_Highlight(-1, select_step.now); - } - else if (encoder_diffState == ENCODER_DIFF_ENTER) { - if (WITHIN(select_step.now, 1, 4)) { - checkkey = Step_value; - HMI_flag.step_axis = AxisEnum(select_step.now - 1); - HMI_ValueStruct.Max_Step = planner.settings.axis_steps_per_mm[HMI_flag.step_axis] * MINUNITMULT; - DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Select_Color, 3, UNITFDIGITS, 210, MBASE(select_step.now), HMI_ValueStruct.Max_Step); - EncoderRate.enabled = true; - } - else { // Back - checkkey = Motion; - select_motion.now = MOTION_CASE_STEPS; - Draw_Motion_Menu(); - } - } - DWIN_UpdateLCD(); -} - -void HMI_Init() { - HMI_SDCardInit(); - - for (uint16_t t = 0; t <= 100; t += 2) { - DWIN_ICON_Show(ICON, ICON_Bar, 15, 260); - DWIN_Draw_Rectangle(1, Color_Bg_Black, 15 + t * 242 / 100, 260, 257, 280); - DWIN_UpdateLCD(); - delay(20); - } - - HMI_SetLanguage(); -} - -void DWIN_Update() { - EachMomentUpdate(); // Status update - HMI_SDCardUpdate(); // SD card update - DWIN_HandleScreen(); // Rotary encoder update -} - -void EachMomentUpdate() { - static millis_t next_rts_update_ms = 0; - const millis_t ms = millis(); - if (PENDING(ms, next_rts_update_ms)) return; - next_rts_update_ms = ms + DWIN_SCROLL_UPDATE_INTERVAL; - - // variable update - update_variable(); - - if (checkkey == PrintProcess) { - // if print done - if (HMI_flag.print_finish && !HMI_flag.done_confirm_flag) { - HMI_flag.print_finish = false; - HMI_flag.done_confirm_flag = true; - - TERN_(POWER_LOSS_RECOVERY, recovery.cancel()); - - planner.finish_and_disable(); - - // show percent bar and value - Percentrecord = 0; - Draw_Print_ProgressBar(); - - // show print done confirm - DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 250, DWIN_WIDTH - 1, STATUS_Y); - DWIN_ICON_Show(ICON, HMI_IsChinese() ? ICON_Confirm_C : ICON_Confirm_E, 86, 283); - } - else if (HMI_flag.pause_flag != printingIsPaused()) { - // print status update - HMI_flag.pause_flag = printingIsPaused(); - if (HMI_flag.pause_flag) ICON_Continue(); else ICON_Pause(); - } - } - - // pause after homing - if (HMI_flag.pause_action && printingIsPaused() && !planner.has_blocks_queued()) { - HMI_flag.pause_action = false; - #if ENABLED(PAUSE_HEAT) - #if HAS_HEATED_BED - tempbed = thermalManager.temp_bed.target; - #endif - #if HAS_HOTEND - temphot = thermalManager.temp_hotend[0].target; - #endif - thermalManager.disable_all_heaters(); - #endif - queue.inject_P(PSTR("G1 F1200 X0 Y0")); - } - - if (card.isPrinting() && checkkey == PrintProcess) { // print process - const uint8_t card_pct = card.percentDone(); - static uint8_t last_cardpercentValue = 101; - if (last_cardpercentValue != card_pct) { // print percent - last_cardpercentValue = card_pct; - if (card_pct) { - Percentrecord = card_pct; - Draw_Print_ProgressBar(); - } - } - - duration_t elapsed = print_job_timer.duration(); // print timer - - // Print time so far - static uint16_t last_Printtime = 0; - const uint16_t min = (elapsed.value % 3600) / 60; - if (last_Printtime != min) { // 1 minute update - last_Printtime = min; - Draw_Print_ProgressElapsed(); - } - - // Estimate remaining time every 20 seconds - static millis_t next_remain_time_update = 0; - if (Percentrecord > 1 && ELAPSED(ms, next_remain_time_update) && !HMI_flag.heat_flag) { - remain_time = (elapsed.value - dwin_heat_time) / (Percentrecord * 0.01f) - (elapsed.value - dwin_heat_time); - next_remain_time_update += SEC_TO_MS(20); - Draw_Print_ProgressRemain(); - } - } - else if (dwin_abort_flag && !HMI_flag.home_flag) { // Print Stop - dwin_abort_flag = false; - HMI_ValueStruct.print_speed = feedrate_percentage = 100; - dwin_zoffset = BABY_Z_VAR; - select_page.set(0); - Goto_MainMenu(); - } - #if ENABLED(POWER_LOSS_RECOVERY) - else if (DWIN_lcd_sd_status && recovery.dwin_flag) { // resume print before power off - static bool recovery_flag = false; - - recovery.dwin_flag = false; - recovery_flag = true; - - auto update_selection = [&](const bool sel) { - HMI_flag.select_flag = sel; - const uint16_t c1 = sel ? Color_Bg_Window : Select_Color; - DWIN_Draw_Rectangle(0, c1, 25, 306, 126, 345); - DWIN_Draw_Rectangle(0, c1, 24, 305, 127, 346); - const uint16_t c2 = sel ? Select_Color : Color_Bg_Window; - DWIN_Draw_Rectangle(0, c2, 145, 306, 246, 345); - DWIN_Draw_Rectangle(0, c2, 144, 305, 247, 346); - }; - - Popup_Window_Resume(); - update_selection(true); - - // TODO: Get the name of the current file from someplace - // - //(void)recovery.interrupted_file_exists(); - char * const name = card.longest_filename(); - const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * (MENU_CHR_W)) / 2; - DWIN_Draw_String(false, true, font8x16, Popup_Text_Color, Color_Bg_Window, npos, 252, name); - DWIN_UpdateLCD(); - - while (recovery_flag) { - ENCODER_DiffState encoder_diffState = Encoder_ReceiveAnalyze(); - if (encoder_diffState != ENCODER_DIFF_NO) { - if (encoder_diffState == ENCODER_DIFF_ENTER) { - recovery_flag = false; - if (HMI_flag.select_flag) break; - TERN_(POWER_LOSS_RECOVERY, queue.inject_P(PSTR("M1000C"))); - HMI_StartFrame(true); - return; - } - else - update_selection(encoder_diffState == ENCODER_DIFF_CW); - - DWIN_UpdateLCD(); - } - } - - select_print.set(0); - HMI_ValueStruct.show_mode = 0; - queue.inject_P(PSTR("M1000")); - Goto_PrintProcess(); - Draw_Status_Area(true); - } - #endif - DWIN_UpdateLCD(); -} - -void DWIN_HandleScreen() { - switch (checkkey) { - case MainMenu: HMI_MainMenu(); break; - case SelectFile: HMI_SelectFile(); break; - case Prepare: HMI_Prepare(); break; - case Control: HMI_Control(); break; - case Leveling: break; - case PrintProcess: HMI_Printing(); break; - case Print_window: HMI_PauseOrStop(); break; - case AxisMove: HMI_AxisMove(); break; - case TemperatureID: HMI_Temperature(); break; - case Motion: HMI_Motion(); break; - case Info: HMI_Info(); break; - case Tune: HMI_Tune(); break; - #if HAS_PREHEAT - case PLAPreheat: HMI_PLAPreheatSetting(); break; - case ABSPreheat: HMI_ABSPreheatSetting(); break; - #endif - case MaxSpeed: HMI_MaxSpeed(); break; - case MaxAcceleration: HMI_MaxAcceleration(); break; - #if HAS_CLASSIC_JERK - case MaxJerk: HMI_MaxJerk(); break; - #endif - case Step: HMI_Step(); break; - case Move_X: HMI_Move_X(); break; - case Move_Y: HMI_Move_Y(); break; - case Move_Z: HMI_Move_Z(); break; - #if HAS_HOTEND - case Extruder: HMI_Move_E(); break; - case ETemp: HMI_ETemp(); break; - #endif - #if EITHER(HAS_BED_PROBE, BABYSTEPPING) - case Homeoffset: HMI_Zoffset(); break; - #endif - #if HAS_HEATED_BED - case BedTemp: HMI_BedTemp(); break; - #endif - #if HAS_PREHEAT - case FanSpeed: HMI_FanSpeed(); break; - #endif - case PrintSpeed: HMI_PrintSpeed(); break; - case MaxSpeed_value: HMI_MaxFeedspeedXYZE(); break; - case MaxAcceleration_value: HMI_MaxAccelerationXYZE(); break; - #if HAS_CLASSIC_JERK - case MaxJerk_value: HMI_MaxJerkXYZE(); break; - #endif - case Step_value: HMI_StepXYZE(); break; - default: break; - } -} - -void DWIN_CompletedHoming() { - HMI_flag.home_flag = false; - dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); - if (checkkey == Last_Prepare) { - checkkey = Prepare; - select_prepare.now = PREPARE_CASE_HOME; - index_prepare = MROWS; - Draw_Prepare_Menu(); - } - else if (checkkey == Back_Main) { - HMI_ValueStruct.print_speed = feedrate_percentage = 100; - planner.finish_and_disable(); - Goto_MainMenu(); - } -} - -void DWIN_CompletedLeveling() { - if (checkkey == Leveling) Goto_MainMenu(); -} - -#endif // DWIN_CREALITY_LCD diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.h b/Marlin/src/lcd/dwin/e3v2/dwin.h deleted file mode 100644 index 5656d67e9a6e..000000000000 --- a/Marlin/src/lcd/dwin/e3v2/dwin.h +++ /dev/null @@ -1,375 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#pragma once - -/** - * DWIN by Creality3D - */ - -#include "../dwin_lcd.h" -#include "rotary_encoder.h" -#include "../../../libs/BL24CXX.h" - -#include "../../../inc/MarlinConfigPre.h" - -#if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_FAN) && PREHEAT_COUNT - #define HAS_PREHEAT 1 - #if PREHEAT_COUNT < 2 - #error "Creality DWIN requires two material preheat presets." - #endif -#endif - -enum processID : uint8_t { - // Process ID - MainMenu, - SelectFile, - Prepare, - Control, - Leveling, - PrintProcess, - AxisMove, - TemperatureID, - Motion, - Info, - Tune, - #if HAS_PREHEAT - PLAPreheat, - ABSPreheat, - #endif - MaxSpeed, - MaxSpeed_value, - MaxAcceleration, - MaxAcceleration_value, - MaxJerk, - MaxJerk_value, - Step, - Step_value, - - // Last Process ID - Last_Prepare, - - // Back Process ID - Back_Main, - Back_Print, - - // Date variable ID - Move_X, - Move_Y, - Move_Z, - #if HAS_HOTEND - Extruder, - ETemp, - #endif - Homeoffset, - #if HAS_HEATED_BED - BedTemp, - #endif - #if HAS_FAN - FanSpeed, - #endif - PrintSpeed, - - // Window ID - Print_window, - Popup_Window -}; - -// Picture ID -#define Start_Process 0 -#define Language_English 1 -#define Language_Chinese 2 - -// ICON ID -#define ICON 0x09 -#define ICON_LOGO 0 -#define ICON_Print_0 1 -#define ICON_Print_1 2 -#define ICON_Prepare_0 3 -#define ICON_Prepare_1 4 -#define ICON_Control_0 5 -#define ICON_Control_1 6 -#define ICON_Leveling_0 7 -#define ICON_Leveling_1 8 -#define ICON_HotendTemp 9 -#define ICON_BedTemp 10 -#define ICON_Speed 11 -#define ICON_Zoffset 12 -#define ICON_Back 13 -#define ICON_File 14 -#define ICON_PrintTime 15 -#define ICON_RemainTime 16 -#define ICON_Setup_0 17 -#define ICON_Setup_1 18 -#define ICON_Pause_0 19 -#define ICON_Pause_1 20 -#define ICON_Continue_0 21 -#define ICON_Continue_1 22 -#define ICON_Stop_0 23 -#define ICON_Stop_1 24 -#define ICON_Bar 25 -#define ICON_More 26 - -#define ICON_Axis 27 -#define ICON_CloseMotor 28 -#define ICON_Homing 29 -#define ICON_SetHome 30 -#define ICON_PLAPreheat 31 -#define ICON_ABSPreheat 32 -#define ICON_Cool 33 -#define ICON_Language 34 - -#define ICON_MoveX 35 -#define ICON_MoveY 36 -#define ICON_MoveZ 37 -#define ICON_Extruder 38 - -#define ICON_Temperature 40 -#define ICON_Motion 41 -#define ICON_WriteEEPROM 42 -#define ICON_ReadEEPROM 43 -#define ICON_ResumeEEPROM 44 -#define ICON_Info 45 - -#define ICON_SetEndTemp 46 -#define ICON_SetBedTemp 47 -#define ICON_FanSpeed 48 -#define ICON_SetPLAPreheat 49 -#define ICON_SetABSPreheat 50 - -#define ICON_MaxSpeed 51 -#define ICON_MaxAccelerated 52 -#define ICON_MaxJerk 53 -#define ICON_Step 54 -#define ICON_PrintSize 55 -#define ICON_Version 56 -#define ICON_Contact 57 -#define ICON_StockConfiguraton 58 -#define ICON_MaxSpeedX 59 -#define ICON_MaxSpeedY 60 -#define ICON_MaxSpeedZ 61 -#define ICON_MaxSpeedE 62 -#define ICON_MaxAccX 63 -#define ICON_MaxAccY 64 -#define ICON_MaxAccZ 65 -#define ICON_MaxAccE 66 -#define ICON_MaxSpeedJerkX 67 -#define ICON_MaxSpeedJerkY 68 -#define ICON_MaxSpeedJerkZ 69 -#define ICON_MaxSpeedJerkE 70 -#define ICON_StepX 71 -#define ICON_StepY 72 -#define ICON_StepZ 73 -#define ICON_StepE 74 -#define ICON_Setspeed 75 -#define ICON_SetZOffset 76 -#define ICON_Rectangle 77 -#define ICON_BLTouch 78 -#define ICON_TempTooLow 79 -#define ICON_AutoLeveling 80 -#define ICON_TempTooHigh 81 -#define ICON_NoTips_C 82 -#define ICON_NoTips_E 83 -#define ICON_Continue_C 84 -#define ICON_Continue_E 85 -#define ICON_Cancel_C 86 -#define ICON_Cancel_E 87 -#define ICON_Confirm_C 88 -#define ICON_Confirm_E 89 -#define ICON_Info_0 90 -#define ICON_Info_1 91 - -/** - * 3-.0:The font size, 0x00-0x09, corresponds to the font size below: - * 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28 - * 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64 - */ -#define font6x12 0x00 -#define font8x16 0x01 -#define font10x20 0x02 -#define font12x24 0x03 -#define font14x28 0x04 -#define font16x32 0x05 -#define font20x40 0x06 -#define font24x48 0x07 -#define font28x56 0x08 -#define font32x64 0x09 - -// Color -#define Color_White 0xFFFF -#define Color_Yellow 0xFF0F -#define Color_Bg_Window 0x31E8 // Popup background color -#define Color_Bg_Blue 0x1125 // Dark blue background color -#define Color_Bg_Black 0x0841 // Black background color -#define Color_Bg_Red 0xF00F // Red background color -#define Popup_Text_Color 0xD6BA // Popup font background color -#define Line_Color 0x3A6A // Split line color -#define Rectangle_Color 0xEE2F // Blue square cursor color -#define Percent_Color 0xFE29 // Percentage color -#define BarFill_Color 0x10E4 // Fill color of progress bar -#define Select_Color 0x33BB // Selected color - -extern uint8_t checkkey; -extern float zprobe_zoffset; -extern char print_filename[16]; - -extern millis_t dwin_heat_time; - -typedef struct { - TERN_(HAS_HOTEND, int16_t E_Temp = 0); - TERN_(HAS_HEATED_BED, int16_t Bed_Temp = 0); - TERN_(HAS_PREHEAT, int16_t Fan_speed = 0); - int16_t print_speed = 100; - float Max_Feedspeed = 0; - float Max_Acceleration = 0; - float Max_Jerk = 0; - float Max_Step = 0; - float Move_X_scale = 0; - float Move_Y_scale = 0; - float Move_Z_scale = 0; - #if HAS_HOTEND - float Move_E_scale = 0; - #endif - float offset_value = 0; - int8_t show_mode = 0; // -1: Temperature control 0: Printing temperature -} HMI_value_t; - -#define DWIN_CHINESE 123 -#define DWIN_ENGLISH 0 - -typedef struct { - uint8_t language; - bool pause_flag:1; - bool pause_action:1; - bool print_finish:1; - bool done_confirm_flag:1; - bool select_flag:1; - bool home_flag:1; - bool heat_flag:1; // 0: heating done 1: during heating - #if ENABLED(PREVENT_COLD_EXTRUSION) - bool ETempTooLow_flag:1; - #endif - #if HAS_LEVELING - bool leveling_offset_flag:1; - #endif - #if HAS_FAN - AxisEnum feedspeed_axis; - #endif - AxisEnum acc_axis, jerk_axis, step_axis; -} HMI_Flag_t; - -extern HMI_value_t HMI_ValueStruct; -extern HMI_Flag_t HMI_flag; - -// Show ICO -void ICON_Print(bool show); -void ICON_Prepare(bool show); -void ICON_Control(bool show); -void ICON_Leveling(bool show); -void ICON_StartInfo(bool show); - -void ICON_Setting(bool show); -void ICON_Pause(bool show); -void ICON_Continue(bool show); -void ICON_Stop(bool show); - -#if HAS_HOTEND || HAS_HEATED_BED - // Popup message window - void DWIN_Popup_Temperature(const bool toohigh); -#endif - -#if HAS_HOTEND - void Popup_Window_ETempTooLow(); -#endif - -void Popup_Window_Resume(); -void Popup_Window_Home(const bool parking=false); -void Popup_Window_Leveling(); - -void Goto_PrintProcess(); -void Goto_MainMenu(); - -// Variable control -void HMI_Move_X(); -void HMI_Move_Y(); -void HMI_Move_Z(); -void HMI_Move_E(); - -void HMI_Zoffset(); - -TERN_(HAS_HOTEND, void HMI_ETemp()); -TERN_(HAS_HEATED_BED, void HMI_BedTemp()); -TERN_(HAS_FAN, void HMI_FanSpeed()); - -void HMI_PrintSpeed(); - -void HMI_MaxFeedspeedXYZE(); -void HMI_MaxAccelerationXYZE(); -void HMI_MaxJerkXYZE(); -void HMI_StepXYZE(); - -void update_variable(); -void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); - -// SD Card -void HMI_SDCardInit(); -void HMI_SDCardUpdate(); - -// Main Process -void Icon_print(bool value); -void Icon_control(bool value); -void Icon_temperature(bool value); -void Icon_leveling(bool value); - -// Other -void Draw_Status_Area(const bool with_update); // Status Area -void HMI_StartFrame(const bool with_update); // Prepare the menu view -void HMI_MainMenu(); // Main process screen -void HMI_SelectFile(); // File page -void HMI_Printing(); // Print page -void HMI_Prepare(); // Prepare page -void HMI_Control(); // Control page -void HMI_Leveling(); // Level the page -void HMI_AxisMove(); // Axis movement menu -void HMI_Temperature(); // Temperature menu -void HMI_Motion(); // Sports menu -void HMI_Info(); // Information menu -void HMI_Tune(); // Adjust the menu - -#if HAS_PREHEAT - void HMI_PLAPreheatSetting(); // PLA warm-up setting - void HMI_ABSPreheatSetting(); // ABS warm-up setting -#endif - -void HMI_MaxSpeed(); // Maximum speed submenu -void HMI_MaxAcceleration(); // Maximum acceleration submenu -void HMI_MaxJerk(); // Maximum jerk speed submenu -void HMI_Step(); // Transmission ratio - -void HMI_Init(); -void DWIN_Update(); -void EachMomentUpdate(); -void DWIN_HandleScreen(); - -inline void DWIN_StartHoming() { HMI_flag.home_flag = true; } - -void DWIN_CompletedHoming(); -void DWIN_CompletedLeveling(); diff --git a/Marlin/src/lcd/dwin/e3v2/README.md b/Marlin/src/lcd/e3v2/README.md similarity index 100% rename from Marlin/src/lcd/dwin/e3v2/README.md rename to Marlin/src/lcd/e3v2/README.md diff --git a/Marlin/src/lcd/dwin/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/common/dwin_api.cpp similarity index 74% rename from Marlin/src/lcd/dwin/dwin_lcd.cpp rename to Marlin/src/lcd/e3v2/common/dwin_api.cpp index 1978c6a4f801..d89b22a7aa74 100644 --- a/Marlin/src/lcd/dwin/dwin_lcd.cpp +++ b/Marlin/src/lcd/e3v2/common/dwin_api.cpp @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm @@ -19,68 +19,23 @@ * along with this program. If not, see . * */ +#include "../../../inc/MarlinConfigPre.h" -/******************************************************************************** - * @file dwin_lcd.cpp - * @author LEO / Creality3D - * @date 2019/07/18 - * @version 2.0.1 - * @brief DWIN screen control functions - ********************************************************************************/ +#if EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) -#include "../../inc/MarlinConfigPre.h" +#include "dwin_api.h" +#include "dwin_set.h" -#if ENABLED(DWIN_CREALITY_LCD) +#include "../../../inc/MarlinConfig.h" -#include "../../inc/MarlinConfig.h" - -#include "dwin_lcd.h" #include // for memset -//#define DEBUG_OUT 1 -#include "../../core/debug_out.h" - -// Make sure DWIN_SendBuf is large enough to hold the largest string plus draw command and tail. -// Assume the narrowest (6 pixel) font and 2-byte gb2312-encoded characters. uint8_t DWIN_SendBuf[11 + DWIN_WIDTH / 6 * 2] = { 0xAA }; uint8_t DWIN_BufTail[4] = { 0xCC, 0x33, 0xC3, 0x3C }; uint8_t databuf[26] = { 0 }; -uint8_t receivedType; - -int recnum = 0; - -inline void DWIN_Byte(size_t &i, const uint16_t bval) { - DWIN_SendBuf[++i] = bval; -} - -inline void DWIN_Word(size_t &i, const uint16_t wval) { - DWIN_SendBuf[++i] = wval >> 8; - DWIN_SendBuf[++i] = wval & 0xFF; -} - -inline void DWIN_Long(size_t &i, const uint32_t lval) { - DWIN_SendBuf[++i] = (lval >> 24) & 0xFF; - DWIN_SendBuf[++i] = (lval >> 16) & 0xFF; - DWIN_SendBuf[++i] = (lval >> 8) & 0xFF; - DWIN_SendBuf[++i] = lval & 0xFF; -} - -inline void DWIN_String(size_t &i, char * const string) { - const size_t len = _MIN(sizeof(DWIN_SendBuf) - i, strlen(string)); - memcpy(&DWIN_SendBuf[i+1], string, len); - i += len; -} -inline void DWIN_String(size_t &i, const __FlashStringHelper * string) { - if (!string) return; - const size_t len = strlen_P((PGM_P)string); // cast it to PGM_P, which is basically const char *, and measure it using the _P version of strlen. - if (len == 0) return; - memcpy(&DWIN_SendBuf[i+1], string, len); - i += len; -} - -// Send the data in the buffer and the packet end -inline void DWIN_Send(size_t &i) { +// Send the data in the buffer plus the packet tail +void DWIN_Send(size_t &i) { ++i; LOOP_L_N(n, i) { LCD_SERIAL.write(DWIN_SendBuf[n]); delayMicroseconds(1); } LOOP_L_N(n, 4) { LCD_SERIAL.write(DWIN_BufTail[n]); delayMicroseconds(1); } @@ -89,13 +44,14 @@ inline void DWIN_Send(size_t &i) { /*-------------------------------------- System variable function --------------------------------------*/ // Handshake (1: Success, 0: Fail) -bool DWIN_Handshake(void) { +bool DWIN_Handshake() { + static int recnum = 0; #ifndef LCD_BAUDRATE #define LCD_BAUDRATE 115200 #endif LCD_SERIAL.begin(LCD_BAUDRATE); const millis_t serial_connect_timeout = millis() + 1000UL; - while (!LCD_SERIAL && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + while (!LCD_SERIAL.connected() && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } size_t i = 0; DWIN_Byte(i, 0x00); @@ -122,14 +78,16 @@ bool DWIN_Handshake(void) { && databuf[3] == 'K' ); } -// Set the backlight luminance -// luminance: (0x00-0xFF) -void DWIN_Backlight_SetLuminance(const uint8_t luminance) { - size_t i = 0; - DWIN_Byte(i, 0x30); - DWIN_Byte(i, _MAX(luminance, 0x1F)); - DWIN_Send(i); -} +#if HAS_LCD_BRIGHTNESS + // Set LCD backlight (from DWIN Enhanced) + // brightness: 0x00-0xFF + void DWIN_LCD_Brightness(const uint8_t brightness) { + size_t i = 0; + DWIN_Byte(i, 0x30); + DWIN_Byte(i, brightness); + DWIN_Send(i); + } +#endif // Set screen display direction // dir: 0=0°, 1=90°, 2=180°, 3=270° @@ -143,7 +101,7 @@ void DWIN_Frame_SetDir(uint8_t dir) { } // Update display -void DWIN_UpdateLCD(void) { +void DWIN_UpdateLCD() { size_t i = 0; DWIN_Byte(i, 0x3D); DWIN_Send(i); @@ -161,12 +119,14 @@ void DWIN_Frame_Clear(const uint16_t color) { } // Draw a point +// color: point color // width: point width 0x01-0x0F // height: point height 0x01-0x0F // x,y: upper left point -void DWIN_Draw_Point(uint8_t width, uint8_t height, uint16_t x, uint16_t y) { +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y) { size_t i = 0; DWIN_Byte(i, 0x02); + DWIN_Word(i, color); DWIN_Byte(i, width); DWIN_Byte(i, height); DWIN_Word(i, x); @@ -194,8 +154,7 @@ void DWIN_Draw_Line(uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t x // color: Rectangle color // xStart/yStart: upper left point // xEnd/yEnd: lower right point -void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, - uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { +void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd) { size_t i = 0; DWIN_Byte(i, 0x05); DWIN_Byte(i, mode); @@ -238,8 +197,9 @@ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, // bColor: Background color // x/y: Upper-left coordinate of the string // *string: The string -void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, - uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string) { +// rlimit: To limit the drawn string length +void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit/*=0xFFFF*/) { + constexpr uint8_t widthAdjust = 0; size_t i = 0; DWIN_Byte(i, 0x11); // Bit 7: widthAdjust @@ -251,7 +211,7 @@ void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, DWIN_Word(i, bColor); DWIN_Word(i, x); DWIN_Word(i, y); - DWIN_String(i, string); + DWIN_Text(i, string, rlimit); DWIN_Send(i); } @@ -266,7 +226,7 @@ void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, // x/y: Upper-left coordinate // value: Integer value void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, - uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value) { + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint32_t value) { size_t i = 0; DWIN_Byte(i, 0x14); // Bit 7: bshow @@ -312,7 +272,7 @@ void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t // x/y: Upper-left point // value: Float value void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, - uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value) { + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, int32_t value) { //uint8_t *fvalue = (uint8_t*)&value; size_t i = 0; DWIN_Byte(i, 0x14); @@ -333,10 +293,18 @@ void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_ DWIN_Send(i); } +// Draw a floating point number +// value: positive unscaled float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + const int32_t val = round(value * POW(10, fNum)); + DWIN_Draw_FloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, val); +} + /*---------------------------------------- Picture related functions ----------------------------------------*/ // Draw JPG and cached in #0 virtual display area -// id: Picture ID +// id: Picture ID void DWIN_JPG_ShowAndCache(const uint8_t id) { size_t i = 0; DWIN_Word(i, 0x2200); @@ -345,21 +313,42 @@ void DWIN_JPG_ShowAndCache(const uint8_t id) { } // Draw an Icon +// IBD: The icon background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) // libID: Icon library ID // picID: Icon ID // x/y: Upper-left point -void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { +void DWIN_ICON_Show(bool IBD, bool BIR, bool BFI, uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { NOMORE(x, DWIN_WIDTH - 1); NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl size_t i = 0; DWIN_Byte(i, 0x23); DWIN_Word(i, x); DWIN_Word(i, y); - DWIN_Byte(i, 0x80 | libID); + DWIN_Byte(i, (IBD << 7) | (BIR << 6) | (BFI << 5) | libID); DWIN_Byte(i, picID); DWIN_Send(i); } +// Draw an Icon from SRAM +// IBD: The icon background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// x/y: Upper-left point +// addr: SRAM address +void DWIN_ICON_Show(bool IBD, bool BIR, bool BFI, uint16_t x, uint16_t y, uint16_t addr) { + NOMORE(x, DWIN_WIDTH - 1); + NOMORE(y, DWIN_HEIGHT - 1); // -- ozy -- srl + size_t i = 0; + DWIN_Byte(i, 0x24); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Byte(i, (IBD << 7) | (BIR << 6) | (BFI << 5) | 0x00); + DWIN_Word(i, addr); + DWIN_Send(i); +} + // Unzip the JPG picture to a virtual display area // n: Cache index // id: Picture ID @@ -371,25 +360,6 @@ void DWIN_JPG_CacheToN(uint8_t n, uint8_t id) { DWIN_Send(i); } -// Copy area from virtual display area to current screen -// cacheID: virtual area number -// xStart/yStart: Upper-left of virtual area -// xEnd/yEnd: Lower-right of virtual area -// x/y: Screen paste point -void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, - uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { - size_t i = 0; - DWIN_Byte(i, 0x27); - DWIN_Byte(i, 0x80 | cacheID); - DWIN_Word(i, xStart); - DWIN_Word(i, yStart); - DWIN_Word(i, xEnd); - DWIN_Word(i, yEnd); - DWIN_Word(i, x); - DWIN_Word(i, y); - DWIN_Send(i); -} - // Animate a series of icons // animID: Animation ID; 0x00-0x0F // animate: true on; false off; @@ -421,15 +391,14 @@ void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t pi // state: 16 bits, each bit is the state of an animation id void DWIN_ICON_AnimationControl(uint16_t state) { size_t i = 0; - DWIN_Byte(i, 0x28); + DWIN_Byte(i, 0x29); DWIN_Word(i, state); DWIN_Send(i); } /*---------------------------------------- Memory functions ----------------------------------------*/ // The LCD has an additional 32KB SRAM and 16KB Flash - -// Data can be written to the sram and save to one of the jpeg page files +// Data can be written to the SRAM and saved to one of the jpeg page files // Write Data Memory // command 0x31 @@ -459,4 +428,4 @@ void DWIN_ICON_AnimationControl(uint16_t state) { // // Flash writing returns 0xA5 0x4F 0x4B -#endif // DWIN_CREALITY_LCD +#endif // HAS_DWIN_E3V2 || IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/dwin/dwin_lcd.h b/Marlin/src/lcd/e3v2/common/dwin_api.h similarity index 57% rename from Marlin/src/lcd/dwin/dwin_lcd.h rename to Marlin/src/lcd/e3v2/common/dwin_api.h index 9ae6d076d502..37b1525ba34a 100644 --- a/Marlin/src/lcd/dwin/dwin_lcd.h +++ b/Marlin/src/lcd/e3v2/common/dwin_api.h @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm @@ -21,15 +21,15 @@ */ #pragma once -/******************************************************************************** - * @file dwin_lcd.h - * @author LEO / Creality3D - * @date 2019/07/18 - * @version 2.0.1 - * @brief 迪文屏控制操作函数 - ********************************************************************************/ +#include "../../../inc/MarlinConfig.h" -#include +#if ENABLED(DWIN_MARLINUI_LANDSCAPE) + #define DWIN_WIDTH 480 + #define DWIN_HEIGHT 272 +#else + #define DWIN_WIDTH 272 + #define DWIN_HEIGHT 480 +#endif #define RECEIVED_NO_DATA 0x00 #define RECEIVED_SHAKE_HAND_ACK 0x01 @@ -39,27 +39,67 @@ #define DWIN_SCROLL_UP 2 #define DWIN_SCROLL_DOWN 3 -#define DWIN_WIDTH 272 -#define DWIN_HEIGHT 480 +// Make sure DWIN_SendBuf is large enough to hold the largest string plus draw command and tail. +// Assume the narrowest (6 pixel) font and 2-byte gb2312-encoded characters. +extern uint8_t DWIN_SendBuf[11 + DWIN_WIDTH / 6 * 2]; +extern uint8_t DWIN_BufTail[4]; +extern uint8_t databuf[26]; + +inline void DWIN_Byte(size_t &i, const uint16_t bval) { + DWIN_SendBuf[++i] = bval; +} + +inline void DWIN_Word(size_t &i, const uint16_t wval) { + DWIN_SendBuf[++i] = wval >> 8; + DWIN_SendBuf[++i] = wval & 0xFF; +} + +inline void DWIN_Long(size_t &i, const uint32_t lval) { + DWIN_SendBuf[++i] = (lval >> 24) & 0xFF; + DWIN_SendBuf[++i] = (lval >> 16) & 0xFF; + DWIN_SendBuf[++i] = (lval >> 8) & 0xFF; + DWIN_SendBuf[++i] = lval & 0xFF; +} + +// Send the data in the buffer plus the packet tail +void DWIN_Send(size_t &i); + +inline void DWIN_Text(size_t &i, const char * const string, uint16_t rlimit=0xFFFF) { + if (!string) return; + const size_t len = _MIN(sizeof(DWIN_SendBuf) - i, _MIN(strlen(string), rlimit)); + if (len == 0) return; + memcpy(&DWIN_SendBuf[i+1], string, len); + i += len; +} + +inline void DWIN_Text(size_t &i, FSTR_P string, uint16_t rlimit=0xFFFF) { + if (!string) return; + const size_t len = _MIN(sizeof(DWIN_SendBuf) - i, _MIN(rlimit, strlen_P((PGM_P)string))); // cast to PGM_P (const char*) measure with strlen_P. + if (len == 0) return; + memcpy_P(&DWIN_SendBuf[i+1], string, len); + i += len; +} /*-------------------------------------- System variable function --------------------------------------*/ // Handshake (1: Success, 0: Fail) -bool DWIN_Handshake(void); +bool DWIN_Handshake(); -// Common DWIN startup -void DWIN_Startup(void); +// DWIN startup +void DWIN_Startup(); -// Set the backlight luminance -// luminance: (0x00-0xFF) -void DWIN_Backlight_SetLuminance(const uint8_t luminance); +#if HAS_LCD_BRIGHTNESS + // Set the backlight brightness + // brightness: (0x00-0xFF) + void DWIN_LCD_Brightness(const uint8_t brightness); +#endif // Set screen display direction // dir: 0=0°, 1=90°, 2=180°, 3=270° void DWIN_Frame_SetDir(uint8_t dir); // Update display -void DWIN_UpdateLCD(void); +void DWIN_UpdateLCD(); /*---------------------------------------- Drawing functions ----------------------------------------*/ @@ -68,10 +108,11 @@ void DWIN_UpdateLCD(void); void DWIN_Frame_Clear(const uint16_t color); // Draw a point +// color: point color // width: point width 0x01-0x0F // height: point height 0x01-0x0F // x,y: upper left point -void DWIN_Draw_Point(uint8_t width, uint8_t height, uint16_t x, uint16_t y); +void DWIN_Draw_Point(uint16_t color, uint8_t width, uint8_t height, uint16_t x, uint16_t y); // Draw a line // color: Line segment color @@ -100,8 +141,7 @@ inline void DWIN_Draw_VLine(uint16_t color, uint16_t xStart, uint16_t yStart, ui // color: Rectangle color // xStart/yStart: upper left point // xEnd/yEnd: lower right point -void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, - uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); +void DWIN_Draw_Rectangle(uint8_t mode, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); // Draw a box // mode: 0=frame, 1=fill, 2=XOR fill @@ -122,23 +162,23 @@ inline void DWIN_Draw_Box(uint8_t mode, uint16_t color, uint16_t xStart, uint16_ void DWIN_Frame_AreaMove(uint8_t mode, uint8_t dir, uint16_t dis, uint16_t color, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd); + /*---------------------------------------- Text related functions ----------------------------------------*/ // Draw a string -// widthAdjust: true=self-adjust character width; false=no adjustment // bShow: true=display background color; false=don't display background color // size: Font size // color: Character color // bColor: Background color // x/y: Upper-left coordinate of the string // *string: The string -void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, - uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, char *string); - -class __FlashStringHelper; +// rlimit: For draw less chars than string length use rlimit +void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const char * const string, uint16_t rlimit=0xFFFF); -inline void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, const __FlashStringHelper *title) { - DWIN_Draw_String(widthAdjust, bShow, size, color, bColor, x, y, (char *)title); +inline void DWIN_Draw_String(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t x, uint16_t y, FSTR_P const ftitle) { + char ctitle[strlen_P(FTOP(ftitle)) + 1]; + strcpy_P(ctitle, FTOP(ftitle)); + DWIN_Draw_String(bShow, size, color, bColor, x, y, ctitle); } // Draw a positive integer @@ -152,7 +192,7 @@ inline void DWIN_Draw_String(bool widthAdjust, bool bShow, uint8_t size, uint16_ // x/y: Upper-left coordinate // value: Integer value void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, - uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint16_t value); + uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, uint32_t value); // Draw a floating point number // bShow: true=display background color; false=don't display background color @@ -166,12 +206,17 @@ void DWIN_Draw_IntValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t // x/y: Upper-left point // value: Float value void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, - uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, int32_t value); + +// Draw a floating point number +// value: positive unscaled float value +void DWIN_Draw_FloatValue(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, + uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value); /*---------------------------------------- Picture related functions ----------------------------------------*/ // Draw JPG and cached in #0 virtual display area -// id: Picture ID +// id: Picture ID void DWIN_JPG_ShowAndCache(const uint8_t id); // Draw an Icon @@ -180,6 +225,23 @@ void DWIN_JPG_ShowAndCache(const uint8_t id); // x/y: Upper-left point void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y); +// Draw an Icon +// IBD: The icon background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(bool IBD, bool BIR, bool BFI, uint8_t libID, uint8_t picID, uint16_t x, uint16_t y); + +// Draw an Icon from SRAM +// IBD: The icon background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// x/y: Upper-left point +// addr: SRAM address +void DWIN_ICON_Show(bool IBD, bool BIR, bool BFI, uint16_t x, uint16_t y, uint16_t addr); + // Unzip the JPG picture to a virtual display area // n: Cache index // id: Picture ID @@ -189,14 +251,6 @@ void DWIN_JPG_CacheToN(uint8_t n, uint8_t id); // id: Picture ID inline void DWIN_JPG_CacheTo1(uint8_t id) { DWIN_JPG_CacheToN(1, id); } -// Copy area from virtual display area to current screen -// cacheID: virtual area number -// xStart/yStart: Upper-left of virtual area -// xEnd/yEnd: Lower-right of virtual area -// x/y: Screen paste point -void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, - uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); - // Animate a series of icons // animID: Animation ID up to 16 // animate: animation on or off @@ -205,8 +259,7 @@ void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, // picIDe: Icon ending ID // x/y: Upper-left point // interval: Display time interval, unit 10mS -void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs, - uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval); +void DWIN_ICON_Animation(uint8_t animID, bool animate, uint8_t libID, uint8_t picIDs, uint8_t picIDe, uint16_t x, uint16_t y, uint16_t interval); // Animation Control // state: 16 bits, each bit is the state of an animation id diff --git a/Marlin/src/lcd/e3v2/common/dwin_color.h b/Marlin/src/lcd/e3v2/common/dwin_color.h new file mode 100644 index 000000000000..d327f21a9384 --- /dev/null +++ b/Marlin/src/lcd/e3v2/common/dwin_color.h @@ -0,0 +1,44 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// Extended and default UI Colors +#define RGB(R,G,B) (R << 11) | (G << 5) | (B) // R,B: 0..31; G: 0..63 +#define GetRColor(color) ((color >> 11) & 0x1F) +#define GetGColor(color) ((color >> 5) & 0x3F) +#define GetBColor(color) ((color >> 0) & 0x1F) + +#define Color_White 0xFFFF +#define Color_Yellow RGB(0x1F,0x3F,0x00) +#define Color_Red RGB(0x1F,0x00,0x00) +#define Color_Error_Red 0xB000 // Error! +#define Color_Bg_Red 0xF00F // Red background color +#define Color_Bg_Window 0x31E8 // Popup background color +#define Color_Bg_Blue 0x1125 // Dark blue background color +#define Color_Bg_Black 0x0841 // Black background color +#define Color_IconBlue 0x45FA // Lighter blue that matches icons/accents +#define Popup_Text_Color 0xD6BA // Popup font background color +#define Line_Color 0x3A6A // Split line color +#define Rectangle_Color 0xEE2F // Blue square cursor color +#define Percent_Color 0xFE29 // Percentage color +#define BarFill_Color 0x10E4 // Fill color of progress bar +#define Select_Color 0x33BB // Selected color diff --git a/Marlin/src/lcd/e3v2/common/dwin_font.h b/Marlin/src/lcd/e3v2/common/dwin_font.h new file mode 100644 index 000000000000..5a4b1a61cf24 --- /dev/null +++ b/Marlin/src/lcd/e3v2/common/dwin_font.h @@ -0,0 +1,38 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * 3-.0:The font size, 0x00-0x09, corresponds to the font size below: + * 0x00=6*12 0x01=8*16 0x02=10*20 0x03=12*24 0x04=14*28 + * 0x05=16*32 0x06=20*40 0x07=24*48 0x08=28*56 0x09=32*64 + */ +#define font6x12 0x00 +#define font8x16 0x01 +#define font10x20 0x02 +#define font12x24 0x03 +#define font14x28 0x04 +#define font16x32 0x05 +#define font20x40 0x06 +#define font24x48 0x07 +#define font28x56 0x08 +#define font32x64 0x09 diff --git a/Marlin/src/lcd/e3v2/common/dwin_set.h b/Marlin/src/lcd/e3v2/common/dwin_set.h new file mode 100644 index 000000000000..4fedd7a5843b --- /dev/null +++ b/Marlin/src/lcd/e3v2/common/dwin_set.h @@ -0,0 +1,138 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// Picture ID +#define Language_English 1 +#define Language_Chinese 2 + +#define ICON 7 // Icon set file 7.ICO + +#define ICON_LOGO 0 +#define ICON_Print_0 1 +#define ICON_Print_1 2 +#define ICON_Prepare_0 3 +#define ICON_Prepare_1 4 +#define ICON_Control_0 5 +#define ICON_Control_1 6 +#define ICON_Leveling_0 7 +#define ICON_Leveling_1 8 +#define ICON_HotendTemp 9 +#define ICON_BedTemp 10 +#define ICON_Speed 11 +#define ICON_Zoffset 12 +#define ICON_Back 13 +#define ICON_File 14 +#define ICON_PrintTime 15 +#define ICON_RemainTime 16 +#define ICON_Setup_0 17 +#define ICON_Setup_1 18 +#define ICON_Pause_0 19 +#define ICON_Pause_1 20 +#define ICON_Continue_0 21 +#define ICON_Continue_1 22 +#define ICON_Stop_0 23 +#define ICON_Stop_1 24 +#define ICON_Bar 25 +#define ICON_More 26 + +#define ICON_Axis 27 +#define ICON_CloseMotor 28 +#define ICON_Homing 29 +#define ICON_SetHome 30 +#define ICON_PLAPreheat 31 +#define ICON_ABSPreheat 32 +#define ICON_Cool 33 +#define ICON_Language 34 + +#define ICON_MoveX 35 +#define ICON_MoveY 36 +#define ICON_MoveZ 37 +#define ICON_Extruder 38 + +#define ICON_Temperature 40 +#define ICON_Motion 41 +#define ICON_WriteEEPROM 42 +#define ICON_ReadEEPROM 43 +#define ICON_ResumeEEPROM 44 +#define ICON_Info 45 + +#define ICON_SetEndTemp 46 +#define ICON_SetBedTemp 47 +#define ICON_FanSpeed 48 +#define ICON_SetPLAPreheat 49 +#define ICON_SetABSPreheat 50 + +#define ICON_MaxSpeed 51 +#define ICON_MaxAccelerated 52 +#define ICON_MaxJerk 53 +#define ICON_Step 54 +#define ICON_PrintSize 55 +#define ICON_Version 56 +#define ICON_Contact 57 +#define ICON_StockConfiguration 58 +#define ICON_MaxSpeedX 59 +#define ICON_MaxSpeedY 60 +#define ICON_MaxSpeedZ 61 +#define ICON_MaxSpeedE 62 +#define ICON_MaxAccX 63 +#define ICON_MaxAccY 64 +#define ICON_MaxAccZ 65 +#define ICON_MaxAccE 66 +#define ICON_MaxSpeedJerkX 67 +#define ICON_MaxSpeedJerkY 68 +#define ICON_MaxSpeedJerkZ 69 +#define ICON_MaxSpeedJerkE 70 +#define ICON_StepX 71 +#define ICON_StepY 72 +#define ICON_StepZ 73 +#define ICON_StepE 74 +#define ICON_Setspeed 75 +#define ICON_SetZOffset 76 +#define ICON_Rectangle 77 +#define ICON_BLTouch 78 +#define ICON_TempTooLow 79 +#define ICON_AutoLeveling 80 +#define ICON_TempTooHigh 81 +#define ICON_NoTips_C 82 +#define ICON_NoTips_E 83 +#define ICON_Continue_C 84 +#define ICON_Continue_E 85 +#define ICON_Cancel_C 86 +#define ICON_Cancel_E 87 +#define ICON_Confirm_C 88 +#define ICON_Confirm_E 89 +#define ICON_Info_0 90 +#define ICON_Info_1 91 + +#define ICON_Folder ICON_More +#define ICON_AdvSet ICON_Language +#define ICON_HomeOffset ICON_AdvSet +#define ICON_HomeOffsetX ICON_StepX +#define ICON_HomeOffsetY ICON_StepY +#define ICON_HomeOffsetZ ICON_StepZ +#define ICON_ProbeOffset ICON_AdvSet +#define ICON_ProbeOffsetX ICON_StepX +#define ICON_ProbeOffsetY ICON_StepY +#define ICON_ProbeOffsetZ ICON_StepZ +#define ICON_PIDNozzle ICON_SetEndTemp +#define ICON_PIDbed ICON_SetBedTemp diff --git a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp b/Marlin/src/lcd/e3v2/common/encoder.cpp similarity index 88% rename from Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp rename to Marlin/src/lcd/e3v2/common/encoder.cpp index 6c229b7aca22..edfaf60aae1e 100644 --- a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.cpp +++ b/Marlin/src/lcd/e3v2/common/encoder.cpp @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm @@ -21,21 +21,19 @@ */ /***************************************************************************** - * @file rotary_encoder.cpp - * @author LEO / Creality3D - * @date 2019/07/06 - * @version 2.0.1 + * @file lcd/e3v2/common/encoder.cpp * @brief Rotary encoder functions *****************************************************************************/ #include "../../../inc/MarlinConfigPre.h" -#if ENABLED(DWIN_CREALITY_LCD) +#if HAS_DWIN_E3V2 -#include "rotary_encoder.h" +#include "encoder.h" #include "../../buttons.h" #include "../../../MarlinCore.h" +#include "../../marlinui.h" #include "../../../HAL/shared/Delay.h" #if HAS_BUZZER @@ -50,12 +48,14 @@ ENCODER_Rate EncoderRate; -// Buzzer +// TODO: Replace with ui.quick_feedback void Encoder_tick() { #if PIN_EXISTS(BEEPER) - WRITE(BEEPER_PIN, HIGH); - delay(10); - WRITE(BEEPER_PIN, LOW); + if (ui.buzzer_enabled) { + WRITE(BEEPER_PIN, HIGH); + delay(10); + WRITE(BEEPER_PIN, LOW); + } #endif } @@ -71,18 +71,18 @@ void Encoder_Configuration() { SET_INPUT_PULLUP(BTN_ENC); #endif #if PIN_EXISTS(BEEPER) - SET_OUTPUT(BEEPER_PIN); + SET_OUTPUT(BEEPER_PIN); // TODO: Use buzzer.h which already inits this #endif } // Analyze encoder value and return state -ENCODER_DiffState Encoder_ReceiveAnalyze() { +EncoderState Encoder_ReceiveAnalyze() { const millis_t now = millis(); static uint8_t lastEncoderBits; uint8_t newbutton = 0; static signed char temp_diff = 0; - ENCODER_DiffState temp_diffState = ENCODER_DIFF_NO; + EncoderState temp_diffState = ENCODER_DIFF_NO; if (BUTTON_PRESSED(EN1)) newbutton |= EN_A; if (BUTTON_PRESSED(EN2)) newbutton |= EN_B; if (BUTTON_PRESSED(ENC)) { @@ -93,6 +93,7 @@ ENCODER_DiffState Encoder_ReceiveAnalyze() { #if PIN_EXISTS(LCD_LED) //LED_Action(); #endif + if (!ui.backlight) ui.refresh_brightness(); const bool was_waiting = wait_for_user; wait_for_user = false; return was_waiting ? ENCODER_DIFF_NO : ENCODER_DIFF_ENTER; @@ -121,9 +122,9 @@ ENCODER_DiffState Encoder_ReceiveAnalyze() { lastEncoderBits = newbutton; } - if (abs(temp_diff) >= ENCODER_PULSES_PER_STEP) { - if (temp_diff > 0) temp_diffState = ENCODER_DIFF_CW; - else temp_diffState = ENCODER_DIFF_CCW; + if (ABS(temp_diff) >= ENCODER_PULSES_PER_STEP) { + if (temp_diff > 0) temp_diffState = TERN(REVERSE_ENCODER_DIRECTION, ENCODER_DIFF_CCW, ENCODER_DIFF_CW); + else temp_diffState = TERN(REVERSE_ENCODER_DIRECTION, ENCODER_DIFF_CW, ENCODER_DIFF_CCW); #if ENABLED(ENCODER_RATE_MULTIPLIER) @@ -140,7 +141,9 @@ ENCODER_DiffState Encoder_ReceiveAnalyze() { const float encoderStepRate = encoderMovementSteps / float(ms - EncoderRate.lastEncoderTime) * 1000; if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; - else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5; + #if ENCODER_5X_STEPS_PER_SEC + else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5; + #endif } EncoderRate.lastEncoderTime = ms; } @@ -253,4 +256,4 @@ ENCODER_DiffState Encoder_ReceiveAnalyze() { #endif // LCD_LED -#endif // DWIN_CREALITY_LCD +#endif // HAS_DWIN_E3V2 diff --git a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.h b/Marlin/src/lcd/e3v2/common/encoder.h similarity index 91% rename from Marlin/src/lcd/dwin/e3v2/rotary_encoder.h rename to Marlin/src/lcd/e3v2/common/encoder.h index 7de80dfe01ca..e5d9645ed43b 100644 --- a/Marlin/src/lcd/dwin/e3v2/rotary_encoder.h +++ b/Marlin/src/lcd/e3v2/common/encoder.h @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm @@ -22,10 +22,7 @@ #pragma once /***************************************************************************** - * @file rotary_encoder.h - * @author LEO / Creality3D - * @date 2019/07/06 - * @version 2.0.1 + * @file lcd/e3v2/common/encoder.h * @brief Rotary encoder functions ****************************************************************************/ @@ -46,13 +43,13 @@ typedef enum { ENCODER_DIFF_CW = 1, // clockwise rotation ENCODER_DIFF_CCW = 2, // counterclockwise rotation ENCODER_DIFF_ENTER = 3 // click -} ENCODER_DiffState; +} EncoderState; // Encoder initialization void Encoder_Configuration(); // Analyze encoder value and return state -ENCODER_DiffState Encoder_ReceiveAnalyze(); +EncoderState Encoder_ReceiveAnalyze(); /*********************** Encoder LED ***********************/ diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp new file mode 100644 index 000000000000..54fa6f941b0f --- /dev/null +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -0,0 +1,4303 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * DWIN by Creality3D + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD) + +#include "dwin.h" + +//#define USE_STRING_HEADINGS +//#define USE_STRING_TITLES + +#if ENABLED(LCD_BED_LEVELING) && DISABLED(PROBE_MANUALLY) && ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) + #define HAS_ONESTEP_LEVELING 1 +#endif + +#if ANY(BABYSTEPPING, HAS_BED_PROBE, HAS_WORKSPACE_OFFSET) + #define HAS_ZOFFSET_ITEM 1 +#endif + +#if !HAS_BED_PROBE && ENABLED(BABYSTEPPING) + #define JUST_BABYSTEP 1 +#endif + +#include "../../fontutils.h" +#include "../../marlinui.h" + +#include "../../../sd/cardreader.h" + +#include "../../../MarlinCore.h" +#include "../../../core/serial.h" +#include "../../../core/macros.h" +#include "../../../gcode/queue.h" + +#include "../../../module/temperature.h" +#include "../../../module/printcounter.h" +#include "../../../module/motion.h" +#include "../../../module/planner.h" + +#if ENABLED(EEPROM_SETTINGS) + #include "../../../module/settings.h" +#endif + +#if ENABLED(HOST_ACTION_COMMANDS) + #include "../../../feature/host_actions.h" +#endif + +#if HAS_ONESTEP_LEVELING + #include "../../../feature/bedlevel/bedlevel.h" +#endif + +#if HAS_BED_PROBE + #include "../../../module/probe.h" +#endif + +#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + #include "../../../feature/babystep.h" +#endif + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../feature/powerloss.h" +#endif + +#include +#include +#include + +#ifndef MACHINE_SIZE + #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS) +#endif +#ifndef CORP_WEBSITE + #define CORP_WEBSITE WEBSITE_URL +#endif + +#define PAUSE_HEAT + +#define MENU_CHAR_LIMIT 24 +#define STATUS_Y 354 + +// Print speed limit +#define MIN_PRINT_SPEED 10 +#define MAX_PRINT_SPEED 999 + +// Feedspeed limit (max feedspeed = DEFAULT_MAX_FEEDRATE * 2) +#define MIN_MAXFEEDSPEED 1 +#define MIN_MAXACCELERATION 1 +#define MIN_MAXJERK 0.1 +#define MIN_STEP 1 + +#define FEEDRATE_E (60) + +// Minimum unit (0.1) : multiple (10) +#define UNITFDIGITS 1 +#define MINUNITMULT pow(10, UNITFDIGITS) + +#define ENCODER_WAIT_MS 20 +#define DWIN_VAR_UPDATE_INTERVAL 1024 +#define DWIN_SCROLL_UPDATE_INTERVAL SEC_TO_MS(2) +#define DWIN_REMAIN_TIME_UPDATE_INTERVAL SEC_TO_MS(20) + +#define TROWS 6 // Total rows +constexpr uint16_t MROWS = TROWS - 1, // Last Row Index + TITLE_HEIGHT = 30, // Title bar height + MLINE = 53, // Menu line height + LBLX = 60, // Menu item label X + MENU_CHR_W = 8, STAT_CHR_W = 10; + +#define MBASE(L) (49 + MLINE * (L)) +#define EBASE(L) (MBASE(L) - 2 * DISABLED(USE_STRING_TITLES)) + +#define BABY_Z_VAR TERN(HAS_BED_PROBE, probe.offset.z, dwin_zoffset) + +#define DWIN_BOTTOM (DWIN_HEIGHT-1) +#define DWIN_RIGHT (DWIN_WIDTH-1) + +// Value Init +HMI_value_t HMI_ValueStruct; +HMI_flag_t HMI_flag{0}; + +millis_t dwin_heat_time = 0; + +uint8_t checkkey = 0; + +enum SelectItem : uint8_t { + PAGE_PRINT = 0, + PAGE_PREPARE, + PAGE_CONTROL, + PAGE_INFO_LEVELING, + + PRINT_SETUP = 0, + PRINT_PAUSE_RESUME, + PRINT_STOP +}; + +typedef struct { + uint8_t now, last; + void set(uint8_t v) { now = last = v; } + void reset() { set(0); } + bool changed() { bool c = (now != last); if (c) last = now; return c; } + bool dec() { if (now) now--; return changed(); } + bool inc(uint8_t v) { if (now < (v - 1)) now++; else now = (v - 1); return changed(); } +} select_t; + +select_t select_page{0}, select_file{0}, select_print{0}, select_prepare{0} + , select_control{0}, select_axis{0}, select_temp{0}, select_motion{0}, select_tune{0} + , select_advset{0}, select_PLA{0}, select_ABS{0} + , select_speed{0} + , select_acc{0} + , select_jerk{0} + , select_step{0} + , select_item{0} + ; + +uint8_t index_file = MROWS, + index_prepare = MROWS, + index_control = MROWS, + index_leveling = MROWS, + index_tune = MROWS, + index_advset = MROWS; + +bool dwin_abort_flag = false; // Flag to reset feedrate, return to Home + +constexpr float default_max_feedrate[] = DEFAULT_MAX_FEEDRATE; +constexpr float default_max_acceleration[] = DEFAULT_MAX_ACCELERATION; + +#if HAS_CLASSIC_JERK + constexpr float default_max_jerk[] = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK }; +#endif + +static uint8_t _card_percent = 0; +static uint16_t _remain_time = 0; + +#if ENABLED(PAUSE_HEAT) + #if HAS_HOTEND + uint16_t resume_hotend_temp = 0; + #endif + #if HAS_HEATED_BED + uint16_t resume_bed_temp = 0; + #endif +#endif + +#if HAS_ZOFFSET_ITEM + float dwin_zoffset = 0, last_zoffset = 0; +#endif + +#define DWIN_LANGUAGE_EEPROM_ADDRESS 0x01 // Between 0x01 and 0x63 (EEPROM_OFFSET-1) + // BL24CXX::check() uses 0x00 + +inline bool HMI_IsChinese() { return HMI_flag.language == DWIN_CHINESE; } + +void HMI_SetLanguageCache() { + DWIN_JPG_CacheTo1(HMI_IsChinese() ? Language_Chinese : Language_English); +} + +void HMI_SetLanguage() { + #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); + #endif + HMI_SetLanguageCache(); +} + +void HMI_ToggleLanguage() { + HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE; + HMI_SetLanguageCache(); + #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); + #endif +} + +typedef struct { uint16_t x, y, w, h; } icon_info_t; +typedef struct { uint16_t x, y[2], w, h; } text_info_t; + +void ICON_Button(const bool here, const int iconid, const icon_info_t &ico, const text_info_t (&txt)[2]) { + const bool cn = HMI_IsChinese(); + DWIN_ICON_Show(ICON, iconid + here, ico.x, ico.y); + if (here) DWIN_Draw_Rectangle(0, Color_White, ico.x, ico.y, ico.x + ico.w - 1, ico.y + ico.h - 1); + DWIN_Frame_AreaCopy(1, txt[cn].x, txt[cn].y[here], txt[cn].x + txt[cn].w - 1, txt[cn].y[here] + txt[cn].h - 1, ico.x + (ico.w - txt[cn].w) / 2, (ico.y + ico.h - 28) - txt[cn].h/2); +} + +// +// Main Menu: "Print" +// +void ICON_Print() { + constexpr icon_info_t ico = { 17, 110, 110, 100 }; + constexpr text_info_t txt[2] = { + { 1, { 417, 449 }, 30, 14 }, + { 1, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt); +} + +// +// Main Menu: "Prepare" +// +void ICON_Prepare() { + constexpr icon_info_t ico = { 145, 110, 110, 100 }; + constexpr text_info_t txt[2] = { + { 33, { 417, 449 }, 51, 14 }, + { 31, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt); +} + +// +// Main Menu: "Control" +// +void ICON_Control() { + constexpr icon_info_t ico = { 17, 226, 110, 100 }; + constexpr text_info_t txt[2] = { + { 85, { 417, 449 }, 46, 14 }, + { 61, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt); +} + +// +// Main Menu: "Info" +// +void ICON_StartInfo() { + constexpr icon_info_t ico = { 145, 226, 110, 100 }; + constexpr text_info_t txt[2] = { + { 133, { 417, 449 }, 23, 14 }, + { 91, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Info_0, ico, txt); +} + +// +// Main Menu: "Level" +// +void ICON_Leveling() { + constexpr icon_info_t ico = { 145, 226, 110, 100 }; + constexpr text_info_t txt[2] = { + { 88, { 433, 464 }, 36, 14 }, + { 211, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Leveling_0, ico, txt); +} + +// +// Printing: "Tune" +// +void ICON_Tune() { + constexpr icon_info_t ico = { 8, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 0, { 433, 464 }, 32, 14 }, + { 121, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt); +} + +// +// Printing: "Pause" +// +void ICON_Pause() { + constexpr icon_info_t ico = { 96, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 157, { 417, 449 }, 39, 14 }, + { 181, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Pause_0, ico, txt); +} + +// +// Printing: "Resume" +// +void ICON_Resume() { + constexpr icon_info_t ico = { 96, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 33, { 433, 464 }, 53, 14 }, + { 1, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Continue_0, ico, txt); +} + +void ICON_ResumeOrPause() { + if (printingIsPaused() || HMI_flag.pause_flag || HMI_flag.pause_action) + ICON_Resume(); + else + ICON_Pause(); +} + +// +// Printing: "Stop" +// +void ICON_Stop() { + constexpr icon_info_t ico = { 184, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 196, { 417, 449 }, 29, 14 }, + { 151, { 405, 447 }, 27, 12 } + }; + ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt); +} + +inline void Clear_Title_Bar() { + DWIN_Draw_Box(1, Color_Bg_Blue, 0, 0, DWIN_WIDTH, TITLE_HEIGHT); +} + +void Draw_Title(FSTR_P ftitle) { + DWIN_Draw_String(false, DWIN_FONT_HEAD, Color_White, Color_Bg_Blue, 14, 4, ftitle); +} + +inline void Clear_Menu_Area() { + DWIN_Draw_Box(1, Color_Bg_Black, 0, TITLE_HEIGHT, DWIN_WIDTH, STATUS_Y - TITLE_HEIGHT); +} + +void Clear_Main_Window() { + Clear_Title_Bar(); + Clear_Menu_Area(); +} + +void Clear_Popup_Area() { + Clear_Title_Bar(); + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, DWIN_HEIGHT); +} + +void Draw_Popup_Bkgd_105() { + DWIN_Draw_Rectangle(1, Color_Bg_Window, 14, 105, 258, 374); +} + +void Draw_More_Icon(const uint8_t line) { + DWIN_ICON_Show(ICON, ICON_More, 226, MBASE(line) - 3); +} + +void Draw_Menu_Cursor(const uint8_t line) { + //DWIN_ICON_Show(ICON, ICON_Rectangle, 0, MBASE(line) - 18); + DWIN_Draw_Rectangle(1, Rectangle_Color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); +} + +void Erase_Menu_Cursor(const uint8_t line) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); +} + +void Move_Highlight(const int16_t from, const uint16_t newline) { + Erase_Menu_Cursor(newline - from); + Draw_Menu_Cursor(newline); +} + +void Add_Menu_Line() { + Move_Highlight(1, MROWS); + DWIN_Draw_Line(Line_Color, 16, MBASE(MROWS + 1) - 20, 256, MBASE(MROWS + 1) - 19); +} + +void Scroll_Menu(const uint8_t dir) { + DWIN_Frame_AreaMove(1, dir, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); + switch (dir) { + case DWIN_SCROLL_DOWN: Move_Highlight(-1, 0); break; + case DWIN_SCROLL_UP: Add_Menu_Line(); break; + } +} + +inline uint16_t nr_sd_menu_items() { + return card.get_num_Files() + !card.flag.workDirIsRoot; +} + +void Erase_Menu_Text(const uint8_t line) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(line) - 14, 271, MBASE(line) + 28); +} + +void Draw_Menu_Icon(const uint8_t line, const uint8_t icon) { + DWIN_ICON_Show(ICON, icon, 26, MBASE(line) - 3); +} + +void _Decorate_Menu_Item(const uint8_t line, const uint8_t icon, bool more) { + if (icon) Draw_Menu_Icon(line, icon); + if (more) Draw_More_Icon(line); +} +void Draw_Menu_Item(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr, bool more=false) { + if (label) DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(line) - 1, (char*)label); + _Decorate_Menu_Item(line, icon, more); +} +void Draw_Menu_Item(const uint8_t line, const uint8_t icon=0, FSTR_P const flabel=nullptr, bool more=false) { + if (flabel) DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(line) - 1, flabel); + _Decorate_Menu_Item(line, icon, more); +} + +void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr, bool more=false) { + Draw_Menu_Item(line, icon, label, more); + DWIN_Draw_Line(Line_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 34); +} + +void Draw_Menu_Line(const uint8_t line, const uint8_t icon, FSTR_P const flabel, bool more=false) { + Draw_Menu_Item(line, icon, flabel, more); + DWIN_Draw_Line(Line_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 34); +} + +void Draw_Checkbox_Line(const uint8_t line, const bool ison) { + const uint16_t x = 225, y = EBASE(line) - 2; + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x + 5, y, ison ? F("X") : F(" ")); + DWIN_Draw_Rectangle(0, Color_White, x + 2, y + 2, x + 16, y + 16); +} + +// AreaCopy for a Menu Item +void Item_AreaCopy(const uint16_t x1, const uint16_t y1, const uint16_t x2, const uint16_t y2, const uint8_t row=0, const uint16_t inset=0, const uint16_t yadd=0) { + DWIN_Frame_AreaCopy(1, x1, y1, x2, y2, LBLX + inset, MBASE(row) + yadd); +} + +// AreaCopy for a Screen Title +void DWIN_Frame_TitleCopy(const uint16_t x1, const uint16_t y1, const uint16_t w, const uint16_t h) { + DWIN_Frame_AreaCopy(1, x1, y1, x1 + w - 1, y1 + h - 1, (DWIN_WIDTH - w) / 2, (TITLE_HEIGHT - h) / 2); +} + +// Draw "Back" line at the top +void Draw_Back_First(const bool is_sel=true) { + Draw_Menu_Line(0, ICON_Back); + if (HMI_IsChinese()) + Item_AreaCopy(129, 72, 156, 84); + else + Item_AreaCopy(223, 179, 254, 189); + if (is_sel) Draw_Menu_Cursor(0); +} + +template +inline bool Apply_Encoder(const EncoderState &encoder_diffState, T &valref) { + if (encoder_diffState == ENCODER_DIFF_CW) + valref += EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_CCW) + valref -= EncoderRate.encoderMoveValue; + return encoder_diffState == ENCODER_DIFF_ENTER; +} + +// +// Draw Menus +// +#define CASE_BACK 0 + +#define MOTION_CASE_RATE 1 +#define MOTION_CASE_ACCEL 2 +#define MOTION_CASE_JERK (MOTION_CASE_ACCEL + ENABLED(HAS_CLASSIC_JERK)) +#define MOTION_CASE_STEPS (MOTION_CASE_JERK + 1) +#define MOTION_CASE_TOTAL MOTION_CASE_STEPS + +#define PREPARE_CASE_MOVE 1 +#define PREPARE_CASE_DISA 2 +#define PREPARE_CASE_HOME 3 +#define PREPARE_CASE_ZOFF (PREPARE_CASE_HOME + ENABLED(HAS_ZOFFSET_ITEM)) +#define PREPARE_CASE_PLA (PREPARE_CASE_ZOFF + ENABLED(HAS_HOTEND)) +#define PREPARE_CASE_ABS (PREPARE_CASE_PLA + ENABLED(HAS_HOTEND)) +#define PREPARE_CASE_COOL (PREPARE_CASE_ABS + EITHER(HAS_HOTEND, HAS_HEATED_BED)) +#define PREPARE_CASE_LANG (PREPARE_CASE_COOL + 1) +#define PREPARE_CASE_TOTAL PREPARE_CASE_LANG + +#define CONTROL_CASE_TEMP 1 +#define CONTROL_CASE_MOVE (CONTROL_CASE_TEMP + 1) +#define CONTROL_CASE_SAVE (CONTROL_CASE_MOVE + ENABLED(EEPROM_SETTINGS)) +#define CONTROL_CASE_LOAD (CONTROL_CASE_SAVE + ENABLED(EEPROM_SETTINGS)) +#define CONTROL_CASE_RESET (CONTROL_CASE_LOAD + ENABLED(EEPROM_SETTINGS)) +#define CONTROL_CASE_ADVSET (CONTROL_CASE_RESET + 1) +#define CONTROL_CASE_INFO (CONTROL_CASE_ADVSET + 1) +#define CONTROL_CASE_TOTAL CONTROL_CASE_INFO + +#define TUNE_CASE_SPEED 1 +#define TUNE_CASE_TEMP (TUNE_CASE_SPEED + ENABLED(HAS_HOTEND)) +#define TUNE_CASE_BED (TUNE_CASE_TEMP + ENABLED(HAS_HEATED_BED)) +#define TUNE_CASE_FAN (TUNE_CASE_BED + ENABLED(HAS_FAN)) +#define TUNE_CASE_ZOFF (TUNE_CASE_FAN + ENABLED(HAS_ZOFFSET_ITEM)) +#define TUNE_CASE_TOTAL TUNE_CASE_ZOFF + +#define TEMP_CASE_TEMP (0 + ENABLED(HAS_HOTEND)) +#define TEMP_CASE_BED (TEMP_CASE_TEMP + ENABLED(HAS_HEATED_BED)) +#define TEMP_CASE_FAN (TEMP_CASE_BED + ENABLED(HAS_FAN)) +#define TEMP_CASE_PLA (TEMP_CASE_FAN + ENABLED(HAS_HOTEND)) +#define TEMP_CASE_ABS (TEMP_CASE_PLA + ENABLED(HAS_HOTEND)) +#define TEMP_CASE_TOTAL TEMP_CASE_ABS + +#define PREHEAT_CASE_TEMP (0 + ENABLED(HAS_HOTEND)) +#define PREHEAT_CASE_BED (PREHEAT_CASE_TEMP + ENABLED(HAS_HEATED_BED)) +#define PREHEAT_CASE_FAN (PREHEAT_CASE_BED + ENABLED(HAS_FAN)) +#define PREHEAT_CASE_SAVE (PREHEAT_CASE_FAN + ENABLED(EEPROM_SETTINGS)) +#define PREHEAT_CASE_TOTAL PREHEAT_CASE_SAVE + +#define ADVSET_CASE_HOMEOFF 1 +#define ADVSET_CASE_PROBEOFF (ADVSET_CASE_HOMEOFF + ENABLED(HAS_ONESTEP_LEVELING)) +#define ADVSET_CASE_HEPID (ADVSET_CASE_PROBEOFF + ENABLED(HAS_HOTEND)) +#define ADVSET_CASE_BEDPID (ADVSET_CASE_HEPID + ENABLED(HAS_HEATED_BED)) +#define ADVSET_CASE_PWRLOSSR (ADVSET_CASE_BEDPID + ENABLED(POWER_LOSS_RECOVERY)) +#define ADVSET_CASE_TOTAL ADVSET_CASE_PWRLOSSR + +// +// Draw Menus +// + +void say_move_en(const uint8_t row) { + Item_AreaCopy( 69, 61, 102, 71, row); // "Move" +} +void say_max_en(const uint8_t row) { + Item_AreaCopy( 75, 119, 100, 129, row); // "Max" +} +void say_jerk_en(const uint8_t row) { + Item_AreaCopy(104, 119, 128, 129, row, 30); // "Jerk" +} +void say_speed_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(133, 119, 172, 132, row, inset); // "Speed" +} +void say_max_accel_en(const uint8_t row) { + say_max_en(row); // "Max" + Item_AreaCopy( 0, 135, 79, 145, row, 30); // "Acceleration" +} +void say_max_jerk_speed_en(const uint8_t row) { + Item_AreaCopy( 75, 119, 172, 132, row); // "Max Jerk Speed" +} +void say_x_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(175, 119, 184, 129, row, inset); // "X" +} +void say_y_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(184, 119, 192, 129, row, inset); // "Y" +} +void say_z_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(193, 119, 201, 129, row, inset); // "Z" +} +void say_e_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(201, 119, 209, 129, row, inset); // "E" +} +void say_pla_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(131, 164, 153, 174, row, inset); // "PLA" +} +void say_abs_en(const uint16_t inset, const uint8_t row) { + Item_AreaCopy(157, 76, 181, 86, row, inset); // "ABS" +} +void say_home_offs_en(const uint8_t row) { + Item_AreaCopy(153, 193, 225, 203, row); // "Home Offset" +} +void say_probe_offs_en(const uint8_t row) { + Item_AreaCopy(153, 205, 225, 215, row); // "Probe Offset" +} +void say_steps_per_mm_en(const uint8_t row) { + Item_AreaCopy( 1, 151, 91, 161, row); // "Steps-per-mm" +} + +void DWIN_Draw_Label(const uint8_t row, char *string) { + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, LBLX, MBASE(row), string); +} +void DWIN_Draw_Label(const uint8_t row, FSTR_P title) { + DWIN_Draw_Label(row, (char*)title); +} + +void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, int32_t value) { + DWIN_Draw_String(true, size, Color_White, bColor, x - 8, y, value < 0 ? F("-") : F(" ")); + DWIN_Draw_FloatValue(true, true, 0, size, Color_White, bColor, iNum, fNum, x, y, value < 0 ? -value : value); +} + +void Draw_Edit_Integer3(const uint8_t row, const uint16_t value, const bool active=false) { + DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 3, 220, EBASE(row), value); +} + +void Draw_Edit_Integer4(const uint8_t row, const uint16_t value, const bool active=false) { + DWIN_Draw_IntValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 4, 220 - 1 * 8, EBASE(row), value); +} + +void Draw_Edit_Float3(const uint8_t row, const uint16_t value, const bool active=false) { + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, active ? Select_Color : Color_Bg_Black, 3, UNITFDIGITS, 220 - UNITFDIGITS * 8, EBASE(row), (int32_t)value); +} + +void Draw_Edit_Signed_Float2(const uint8_t row, const float value, const bool active=false) { + DWIN_Draw_Signed_Float(font8x16, active ? Select_Color : Color_Bg_Black, 2, UNITFDIGITS, 220 + 8 - UNITFDIGITS * 8, EBASE(row), value); +} + +void Draw_Edit_Signed_Float3(const uint8_t row, const float value, const bool active=false) { + DWIN_Draw_Signed_Float(font8x16, active ? Select_Color : Color_Bg_Black, 3, UNITFDIGITS, 220 - UNITFDIGITS * 8, EBASE(row), value); +} + +void Draw_Stat_Int(const uint16_t xpos, const uint16_t ypos, const uint16_t value) { + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 3, xpos, ypos, value); +} + +void Draw_Stat_Float(const uint16_t xpos, const uint16_t ypos, const float value) { + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 2, 2, xpos, ypos, value); +} + +// +// Prepare Menu +// + +void Item_Prepare_Move(const uint8_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(159, 70, 200, 84, row); + else + say_move_en(row); // "Move" + Draw_Menu_Line(row, ICON_Axis); + Draw_More_Icon(row); +} + +void Item_Prepare_Disable(const uint8_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(204, 70, 259, 82, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_DISABLE_STEPPERS)); + #else + Item_AreaCopy(104, 61, 191, 74, row); // "Disable Stepper" + #endif + } + Draw_Menu_Line(row, ICON_CloseMotor); +} + +void Item_Prepare_Home(const uint8_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(0, 89, 41, 101, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_AUTO_HOME)); + #else + Item_AreaCopy(202, 61, 271, 71, row); // "Auto Home" + #endif + } + Draw_Menu_Line(row, ICON_Homing); +} + +#if HAS_ZOFFSET_ITEM + + void Item_Prepare_Offset(const uint8_t row) { + if (HMI_IsChinese()) { + #if HAS_BED_PROBE + Item_AreaCopy(174, 164, 223, 177, row); + #else + Item_AreaCopy(43, 89, 98, 101, row); + #endif + } + else { + #if HAS_BED_PROBE + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); + #else + Item_AreaCopy( 94, 179, 143, 190, row); // "Z-Offset" + #endif + #else + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); + #else + Item_AreaCopy( 1, 76, 103, 87, row); // "Set home offsets" + #endif + #endif + } + Draw_Edit_Signed_Float2(row, BABY_Z_VAR * 100); + Draw_Menu_Line(row, ICON_SetHome); + } + +#endif + +#if HAS_HOTEND + void Item_Prepare_PLA(const uint8_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(100, 89, 151, 101, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_PREHEAT_1)); + #else + Item_AreaCopy(108, 76, 155, 87, row); // "Preheat" + say_pla_en(52, row); // "PLA" + #endif + } + Draw_Menu_Line(row, ICON_PLAPreheat); + } + + void Item_Prepare_ABS(const uint8_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(180, 89, 233, 100, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, F("Preheat " PREHEAT_2_LABEL)); + #else + Item_AreaCopy(108, 76, 155, 87, row); // "Preheat" + say_abs_en(52, row); // "ABS" + #endif + } + Draw_Menu_Line(row, ICON_ABSPreheat); + } +#endif + +#if HAS_PREHEAT + void Item_Prepare_Cool(const uint8_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(1, 104, 56, 117, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_COOLDOWN)); + #else + Item_AreaCopy(200, 76, 264, 86, row); // "Cooldown" + #endif + } + Draw_Menu_Line(row, ICON_Cool); + } +#endif + +void Item_Prepare_Lang(const uint8_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(239, 134, 266, 146, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, F("UI Language")); + #else + Item_AreaCopy(1, 194, 96, 206, row); // "LCD Language" + #endif + } + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, 226, EBASE(row), HMI_IsChinese() ? F("CN") : F("EN")); + Draw_Menu_Icon(row, ICON_Language); +} + +#define VISI(T,L,S) (WITHIN(L, T - MROWS, MROWS) || WITHIN(S, 0, MROWS)) + +void Draw_Prepare_Menu() { + Clear_Main_Window(); + + const int16_t scroll = MROWS - index_prepare; // Scrolled-up lines + #define PSCROL(L) (scroll + (L)) + #define PVISI(L) VISI(PREPARE_CASE_TOTAL, L, PSCROL(L)) + + if (HMI_IsChinese()) + DWIN_Frame_TitleCopy(133, 1, 28, 13); // "Prepare" + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_PREPARE)); + #else + DWIN_Frame_TitleCopy(179, 0, 48, 14); // "Prepare" + #endif + } + + if (PVISI(0)) Draw_Back_First(select_prepare.now == CASE_BACK); // < Back + if (PVISI(PREPARE_CASE_MOVE)) Item_Prepare_Move(PSCROL(PREPARE_CASE_MOVE)); // Move > + if (PVISI(PREPARE_CASE_DISA)) Item_Prepare_Disable(PSCROL(PREPARE_CASE_DISA)); // Disable Stepper + if (PVISI(PREPARE_CASE_HOME)) Item_Prepare_Home(PSCROL(PREPARE_CASE_HOME)); // Auto Home + #if HAS_ZOFFSET_ITEM + if (PVISI(PREPARE_CASE_ZOFF)) Item_Prepare_Offset(PSCROL(PREPARE_CASE_ZOFF)); // Edit Z-Offset / Babystep / Set Home Offset + #endif + #if HAS_HOTEND + if (PVISI(PREPARE_CASE_PLA)) Item_Prepare_PLA(PSCROL(PREPARE_CASE_PLA)); // Preheat PLA + if (PVISI(PREPARE_CASE_ABS)) Item_Prepare_ABS(PSCROL(PREPARE_CASE_ABS)); // Preheat ABS + #endif + #if HAS_PREHEAT + if (PVISI(PREPARE_CASE_COOL)) Item_Prepare_Cool(PSCROL(PREPARE_CASE_COOL)); // Cooldown + #endif + if (PVISI(PREPARE_CASE_LANG)) Item_Prepare_Lang(PSCROL(PREPARE_CASE_LANG)); // Language CN/EN + + if (select_prepare.now != CASE_BACK) Draw_Menu_Cursor(PSCROL(select_prepare.now)); +} + +// +// Control Menu +// + +void Item_Control_Temp(const uint16_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(57, 104, 84, 116, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_TEMPERATURE)); + #else + Item_AreaCopy(1, 89, 83, 101, row); + #endif + } + Draw_Menu_Line(row, ICON_Temperature); + Draw_More_Icon(row); +} + +void Item_Control_Motion(const uint16_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(87, 104, 114, 116, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_MOTION)); + #else + Item_AreaCopy(84, 89, 128, 99, row); + #endif + } + Draw_Menu_Line(row, ICON_Motion); + Draw_More_Icon(row); +} + +void Item_Control_Advanced(const uint16_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(62, 180, 120, 192, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); + #else + Item_AreaCopy(82, 135, 200, 149, row); + #endif + } + Draw_Menu_Line(row, ICON_AdvSet); + Draw_More_Icon(row); +} + +void Item_Control_Info(const uint16_t row) { + if (HMI_IsChinese()) + Item_AreaCopy(231, 104, 258, 116, row); + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_INFO_SCREEN)); + #else + Item_AreaCopy(0, 104, 24, 114, row); + #endif + } + Draw_Menu_Line(row, ICON_Info); + Draw_More_Icon(row); +} + +void Draw_Control_Menu() { + Clear_Main_Window(); + + #if CONTROL_CASE_TOTAL >= TROWS + const int16_t scroll = MROWS - index_control; // Scrolled-up lines + #else + constexpr int16_t scroll = 0; + #endif + #define CSCROL(L) (scroll + (L)) + #define CLINE(L) MBASE(CSCROL(L)) + #define CVISI(L) VISI(CONTROL_CASE_TOTAL, L, CSCROL(L)) + + if (HMI_IsChinese()) + DWIN_Frame_TitleCopy(103, 1, 28, 14); // "Control" + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_CONTROL)); + #else + DWIN_Frame_TitleCopy(128, 2, 49, 11); // "Control" + #endif + } + + if (CVISI(0)) Draw_Back_First(select_control.now == CASE_BACK); // < Back + if (CVISI(CONTROL_CASE_TEMP)) Item_Control_Temp(CSCROL(CONTROL_CASE_TEMP)); // Temperature > + if (CVISI(CONTROL_CASE_MOVE)) Item_Control_Motion(CSCROL(CONTROL_CASE_MOVE)); // Motion > + + if (HMI_IsChinese()) { + #if ENABLED(EEPROM_SETTINGS) + Item_AreaCopy(117, 104, 172, 116, CSCROL(CONTROL_CASE_SAVE)); // "Store Configuration" + Item_AreaCopy(174, 103, 229, 116, CSCROL(CONTROL_CASE_LOAD)); // "Read Configuration" + Item_AreaCopy( 1, 118, 56, 131, CSCROL(CONTROL_CASE_RESET)); // "Reset Configuration" + #endif + } + else { + #ifdef USE_STRING_TITLES + #if ENABLED(EEPROM_SETTINGS) + if (CVISI(CONTROL_CASE_SAVE)) DWIN_Draw_Label(CSCROL(CONTROL_CASE_SAVE), GET_TEXT_F(MSG_STORE_EEPROM)); // "Store Configuration" + if (CVISI(CONTROL_CASE_LOAD)) DWIN_Draw_Label(CSCROL(CONTROL_CASE_LOAD), GET_TEXT_F(MSG_LOAD_EEPROM)); // "Read Configuration" + if (CVISI(CONTROL_CASE_RESET)) DWIN_Draw_Label(CSCROL(CONTROL_CASE_RESET), GET_TEXT_F(MSG_RESTORE_DEFAULTS)); // "Reset Configuration" + #endif + #else + #if ENABLED(EEPROM_SETTINGS) + if (CVISI(CONTROL_CASE_SAVE)) + Item_AreaCopy(150, 89, 263, 102, CSCROL(CONTROL_CASE_SAVE)); // "Store Configuration" + if (CVISI(CONTROL_CASE_LOAD)) { + Item_AreaCopy( 26, 104, 57, 114, CSCROL(CONTROL_CASE_LOAD)); // "Read" + Item_AreaCopy(182, 89, 263, 102, CSCROL(CONTROL_CASE_LOAD), 34); // "Configuration" + } + if (CVISI(CONTROL_CASE_RESET)) { + Item_AreaCopy( 59, 104, 93, 114, CSCROL(CONTROL_CASE_RESET)); // "Reset" + Item_AreaCopy(182, 89, 263, 102, CSCROL(CONTROL_CASE_RESET), 37); // "Configuration" + } + #endif + #endif + } + + if (CVISI(CONTROL_CASE_ADVSET)) Item_Control_Advanced(CSCROL(CONTROL_CASE_ADVSET)); + if (CVISI(CONTROL_CASE_INFO)) Item_Control_Info(CSCROL(CONTROL_CASE_INFO)); + + if (select_control.now != CASE_BACK && CVISI(select_control.now)) + Draw_Menu_Cursor(CSCROL(select_control.now)); + + // Draw icons and lines + #define _TEMP_ICON(N, I, M) do { \ + if (CVISI(N)) { \ + Draw_Menu_Line(CSCROL(N), I); \ + if (M) { \ + Draw_More_Icon(CSCROL(N)); \ + } \ + } \ + } while(0) + + #if ENABLED(EEPROM_SETTINGS) + _TEMP_ICON(CONTROL_CASE_SAVE, ICON_WriteEEPROM, false); + _TEMP_ICON(CONTROL_CASE_LOAD, ICON_ReadEEPROM, false); + _TEMP_ICON(CONTROL_CASE_RESET, ICON_ResumeEEPROM, false); + #endif +} + +// +// Tune Menu +// + +void Draw_Tune_Menu() { + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(73, 2, 28, 12); // "Tune" + Item_AreaCopy(116, 164, 171, 176, TUNE_CASE_SPEED); + #if HAS_HOTEND + Item_AreaCopy(1, 134, 56, 146, TUNE_CASE_TEMP); + #endif + #if HAS_HEATED_BED + Item_AreaCopy(58, 134, 113, 146, TUNE_CASE_BED); + #endif + #if HAS_FAN + Item_AreaCopy(115, 134, 170, 146, TUNE_CASE_FAN); + #endif + #if HAS_ZOFFSET_ITEM + Item_AreaCopy(174, 164, 223, 177, TUNE_CASE_ZOFF); + #endif + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_TUNE)); + #else + DWIN_Frame_TitleCopy(94, 2, 33, 11); // "Tune" + #endif + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(TUNE_CASE_SPEED, GET_TEXT_F(MSG_SPEED)); + #if HAS_HOTEND + DWIN_Draw_Label(TUNE_CASE_TEMP, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND)); + #endif + #if HAS_HEATED_BED + DWIN_Draw_Label(TUNE_CASE_BED, GET_TEXT_F(MSG_UBL_SET_TEMP_BED)); + #endif + #if HAS_FAN + DWIN_Draw_Label(TUNE_CASE_FAN, GET_TEXT_F(MSG_FAN_SPEED)); + #endif + DWIN_Draw_Label(TUNE_CASE_ZOFF, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); + #else + Item_AreaCopy(1, 179, 92, 190, TUNE_CASE_SPEED); // "Print speed" + #if HAS_HOTEND + Item_AreaCopy(197, 104, 238, 114, TUNE_CASE_TEMP); // "Hotend" + Item_AreaCopy( 1, 89, 83, 101, TUNE_CASE_TEMP, 44); // "Temperature" + #endif + #if HAS_HEATED_BED + Item_AreaCopy(240, 104, 264, 114, TUNE_CASE_BED); // "Bed" + Item_AreaCopy( 1, 89, 83, 101, TUNE_CASE_BED, 27); // "Temperature" + #endif + #if HAS_FAN + Item_AreaCopy(0, 119, 64, 132, TUNE_CASE_FAN); // "Fan speed" + #endif + #if HAS_ZOFFSET_ITEM + Item_AreaCopy(93, 179, 141, 189, TUNE_CASE_ZOFF); // "Z-offset" + #endif + #endif + } + + Draw_Back_First(select_tune.now == CASE_BACK); + if (select_tune.now != CASE_BACK) Draw_Menu_Cursor(select_tune.now); + + Draw_Menu_Line(TUNE_CASE_SPEED, ICON_Speed); + Draw_Edit_Integer3(TUNE_CASE_SPEED, feedrate_percentage); + + #if HAS_HOTEND + Draw_Menu_Line(TUNE_CASE_TEMP, ICON_HotendTemp); + Draw_Edit_Integer3(TUNE_CASE_TEMP, thermalManager.degTargetHotend(0)); + #endif + #if HAS_HEATED_BED + Draw_Menu_Line(TUNE_CASE_BED, ICON_BedTemp); + Draw_Edit_Integer3(TUNE_CASE_BED, thermalManager.degTargetBed()); + #endif + #if HAS_FAN + Draw_Menu_Line(TUNE_CASE_FAN, ICON_FanSpeed); + Draw_Edit_Integer3(TUNE_CASE_FAN, thermalManager.fan_speed[0]); + #endif + #if HAS_ZOFFSET_ITEM + Draw_Menu_Line(TUNE_CASE_ZOFF, ICON_Zoffset); + Draw_Edit_Signed_Float2(TUNE_CASE_ZOFF, BABY_Z_VAR * 100); + #endif +} + +// +// Motion Menu +// +void Draw_Motion_Menu() { + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Motion" + Item_AreaCopy(173, 133, 228, 147, MOTION_CASE_RATE); // Max speed + Item_AreaCopy(173, 133, 200, 147, MOTION_CASE_ACCEL); // Max... + Item_AreaCopy(28, 149, 69, 161, MOTION_CASE_ACCEL, 30, 1); // ...Acceleration + #if HAS_CLASSIC_JERK + Item_AreaCopy(173, 133, 200, 147, MOTION_CASE_JERK); // Max... + Item_AreaCopy(1, 180, 28, 192, MOTION_CASE_JERK, 30, 1); // ... + Item_AreaCopy(202, 133, 228, 147, MOTION_CASE_JERK, 57); // ...Jerk + #endif + Item_AreaCopy(153, 148, 194, 161, MOTION_CASE_STEPS); // Flow ratio + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_MOTION)); + #else + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Motion" + #endif + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(MOTION_CASE_RATE, F("Feedrate")); // "Feedrate" + DWIN_Draw_Label(MOTION_CASE_ACCEL, GET_TEXT_F(MSG_ACCELERATION)); // "Acceleration" + #if HAS_CLASSIC_JERK + DWIN_Draw_Label(MOTION_CASE_JERK, GET_TEXT_F(MSG_JERK)); // "Jerk" + #endif + DWIN_Draw_Label(MOTION_CASE_STEPS, GET_TEXT_F(MSG_STEPS_PER_MM)); // "Steps/mm" + #else + say_max_en(MOTION_CASE_RATE); say_speed_en(30, MOTION_CASE_RATE); // "Max Speed" + say_max_accel_en(MOTION_CASE_ACCEL); // "Max Acceleration" + #if HAS_CLASSIC_JERK + say_max_en(MOTION_CASE_JERK); say_jerk_en(MOTION_CASE_JERK); // "Max Jerk" + #endif + say_steps_per_mm_en(MOTION_CASE_STEPS); // "Steps-per-mm" + #endif + } + + Draw_Back_First(select_motion.now == CASE_BACK); + if (select_motion.now != CASE_BACK) Draw_Menu_Cursor(select_motion.now); + + uint8_t i = 0; + #define _MOTION_ICON(N) Draw_Menu_Line(++i, ICON_MaxSpeed + (N) - 1) + _MOTION_ICON(MOTION_CASE_RATE); Draw_More_Icon(i); + _MOTION_ICON(MOTION_CASE_ACCEL); Draw_More_Icon(i); + #if HAS_CLASSIC_JERK + _MOTION_ICON(MOTION_CASE_JERK); Draw_More_Icon(i); + #endif + _MOTION_ICON(MOTION_CASE_STEPS); Draw_More_Icon(i); +} + +// +// Draw Popup Windows +// + +#if HAS_HOTEND || HAS_HEATED_BED + + void DWIN_Popup_Temperature(const bool toohigh) { + Clear_Popup_Area(); + Draw_Popup_Bkgd_105(); + if (toohigh) { + DWIN_ICON_Show(ICON, ICON_TempTooHigh, 102, 165); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285); // Temp Too High + DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285); + DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); + } + else { + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too high")); + } + } + else { + DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 165); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 103, 371, 270, 386, 52, 285); // Tenp Too Low + DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); + } + else { + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 36, 300, F("Nozzle or Bed temperature")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 92, 300, F("is too low")); + } + } + } + +#endif + +void Draw_Popup_Bkgd_60() { + DWIN_Draw_Rectangle(1, Color_Bg_Window, 14, 60, 258, 330); +} + +#if HAS_HOTEND + + void Popup_Window_ETempTooLow() { + Clear_Main_Window(); + Draw_Popup_Bkgd_60(); + DWIN_ICON_Show(ICON, ICON_TempTooLow, 102, 105); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240); // Nozzle Too Cold + DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 69 + 33, 240); + DWIN_ICON_Show(ICON, ICON_Confirm_C, 86, 280); + } + else { + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, 20, 235, F("Nozzle is too cold")); + DWIN_ICON_Show(ICON, ICON_Confirm_E, 86, 280); + } + } + +#endif + +void Popup_Window_Resume() { + Clear_Popup_Area(); + Draw_Popup_Bkgd_105(); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 135); // Resume Interrupted Print + DWIN_Frame_AreaCopy(1, 103, 321, 271, 335, 52, 192); + DWIN_ICON_Show(ICON, ICON_Cancel_C, 26, 307); + DWIN_ICON_Show(ICON, ICON_Continue_C, 146, 307); + } + else { + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 14) / 2, 115, F("Continue Print")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 192, F("It looks like the last")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 22) / 2, 212, F("file was interrupted.")); + DWIN_ICON_Show(ICON, ICON_Cancel_E, 26, 307); + DWIN_ICON_Show(ICON, ICON_Continue_E, 146, 307); + } +} + +void Popup_Window_Home(const bool parking/*=false*/) { + Clear_Main_Window(); + Draw_Popup_Bkgd_60(); + DWIN_ICON_Show(ICON, ICON_BLTouch, 101, 105); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 0, 371, 33, 386, 85, 240); // Wait for Move to Complete + DWIN_Frame_AreaCopy(1, 203, 286, 271, 302, 118, 240); + DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280); + } + else { + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * (parking ? 7 : 10)) / 2, 230, parking ? F("Parking") : F("Homing XYZ")); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done.")); + } +} + +#if HAS_ONESTEP_LEVELING + + void Popup_Window_Leveling() { + Clear_Main_Window(); + Draw_Popup_Bkgd_60(); + DWIN_ICON_Show(ICON, ICON_AutoLeveling, 101, 105); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 0, 371, 100, 386, 84, 240); // Wait for Leveling + DWIN_Frame_AreaCopy(1, 0, 389, 150, 402, 61, 280); + } + else { + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 13) / 2, 230, GET_TEXT_F(MSG_BED_LEVELING)); + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 23) / 2, 260, F("Please wait until done.")); + } + } + +#endif + +void Draw_Select_Highlight(const bool sel) { + HMI_flag.select_flag = sel; + const uint16_t c1 = sel ? Select_Color : Color_Bg_Window, + c2 = sel ? Color_Bg_Window : Select_Color; + DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318); + DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319); + DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318); + DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319); +} + +void Popup_window_PauseOrStop() { + Clear_Main_Window(); + Draw_Popup_Bkgd_60(); + if (HMI_IsChinese()) { + if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); // Pause + else if (select_print.now == PRINT_STOP) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); // Stop + DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150); // Print + DWIN_ICON_Show(ICON, ICON_Confirm_C, 26, 280); + DWIN_ICON_Show(ICON, ICON_Cancel_C, 146, 280); + } + else { + if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 11) / 2, 150, GET_TEXT_F(MSG_PAUSE_PRINT)); + else if (select_print.now == PRINT_STOP) DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, (272 - 8 * 10) / 2, 150, GET_TEXT_F(MSG_STOP_PRINT)); + DWIN_ICON_Show(ICON, ICON_Confirm_E, 26, 280); + DWIN_ICON_Show(ICON, ICON_Cancel_E, 146, 280); + } + Draw_Select_Highlight(true); +} + +void Draw_Printing_Screen() { + const uint16_t y = 168; + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(30, 1, 42, 14); // "Printing" + DWIN_Frame_AreaCopy(1, 0, 72, 63, 86, 43, y); // "Printing Time" + DWIN_Frame_AreaCopy(1, 65, 72, 128, 86, 178, y); // "Remain" + } + else { + DWIN_Frame_TitleCopy(42, 0, 47, 14); // "Printing" + DWIN_Frame_AreaCopy(1, 1, 43, 97, 59, 43, y); // "Printing Time" + DWIN_Frame_AreaCopy(1, 100, 43, 152, 56, 178, y); // "Remain" + } +} + +void Draw_Print_ProgressBar() { + constexpr uint16_t y = 93, h = 21; + DWIN_ICON_Show(ICON, ICON_Bar, 15, 93); + DWIN_Draw_Rectangle(1, BarFill_Color, 16 + _card_percent * 240 / 100, y, 256, y + h - 1); + DWIN_Draw_IntValue(true, true, 0, font8x16, Percent_Color, Color_Bg_Black, 2, 117, y + 40, _card_percent); + DWIN_Draw_String(false, font8x16, Percent_Color, Color_Bg_Black, 133, y + 40, F("%")); +} + +void Draw_Print_ProgressElapsed() { + constexpr uint16_t x = 45, y = 192; + duration_t elapsed = print_job_timer.duration(); // print timer + DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, x, y, elapsed.value / 3600); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, x + 8 * 2, y, F(":")); + DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, x + 8 * 3, y, (elapsed.value % 3600) / 60); +} + +void Draw_Print_ProgressRemain() { + constexpr uint16_t x = 179, y = 192; + DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, x, y, _remain_time / 3600); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, x + 8 * 2, y, F(":")); + DWIN_Draw_IntValue(true, true, 1, font8x16, Color_White, Color_Bg_Black, 2, x + 8 * 3, y, (_remain_time % 3600) / 60); +} + +void Goto_PrintProcess() { + checkkey = PrintProcess; + + Clear_Main_Window(); + Draw_Printing_Screen(); + + ICON_Tune(); + ICON_ResumeOrPause(); + ICON_Stop(); + + // Copy into filebuf string before entry + char * const name = card.longest_filename(); + const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * MENU_CHR_W) / 2; + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, npos, 60, name); + + DWIN_ICON_Show(ICON, ICON_PrintTime, 17, 163); + DWIN_ICON_Show(ICON, ICON_RemainTime, 150, 161); + + Draw_Print_ProgressBar(); + Draw_Print_ProgressElapsed(); + Draw_Print_ProgressRemain(); +} + +void Goto_MainMenu() { + checkkey = MainMenu; + + Clear_Main_Window(); + + if (HMI_IsChinese()) + DWIN_Frame_TitleCopy(2, 2, 26, 13); // "Home" etc + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_MAIN)); + #else + DWIN_Frame_TitleCopy(0, 2, 40, 11); // "Home" + #endif + } + + DWIN_ICON_Show(ICON, ICON_LOGO, 71, 52); + + ICON_Print(); + ICON_Prepare(); + ICON_Control(); + TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); +} + +inline EncoderState get_encoder_state() { + static millis_t Encoder_ms = 0; + const millis_t ms = millis(); + if (PENDING(ms, Encoder_ms)) return ENCODER_DIFF_NO; + const EncoderState state = Encoder_ReceiveAnalyze(); + if (state != ENCODER_DIFF_NO) Encoder_ms = ms + ENCODER_WAIT_MS; + return state; +} + +void HMI_Plan_Move(const feedRate_t fr_mm_s) { + if (!planner.is_full()) { + planner.synchronize(); + planner.buffer_line(current_position, fr_mm_s); + DWIN_UpdateLCD(); + } +} + +void HMI_Move_Done(const AxisEnum axis) { + EncoderRate.enabled = false; + planner.synchronize(); + checkkey = AxisMove; + DWIN_UpdateLCD(); +} + +void HMI_Move_X() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_X_scaled)) { + Draw_Edit_Float3(1, HMI_ValueStruct.Move_X_scaled); + return HMI_Move_Done(X_AXIS); + } + LIMIT(HMI_ValueStruct.Move_X_scaled, (X_MIN_POS) * MINUNITMULT, (X_MAX_POS) * MINUNITMULT); + current_position.x = HMI_ValueStruct.Move_X_scaled / MINUNITMULT; + Draw_Edit_Float3(1, HMI_ValueStruct.Move_X_scaled, true); + DWIN_UpdateLCD(); + HMI_Plan_Move(homing_feedrate(X_AXIS)); +} + +void HMI_Move_Y() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Y_scaled)) { + Draw_Edit_Float3(2, HMI_ValueStruct.Move_Y_scaled); + return HMI_Move_Done(Y_AXIS); + } + LIMIT(HMI_ValueStruct.Move_Y_scaled, (Y_MIN_POS) * MINUNITMULT, (Y_MAX_POS) * MINUNITMULT); + current_position.y = HMI_ValueStruct.Move_Y_scaled / MINUNITMULT; + Draw_Edit_Float3(2, HMI_ValueStruct.Move_Y_scaled, true); + DWIN_UpdateLCD(); + HMI_Plan_Move(homing_feedrate(Y_AXIS)); +} + +void HMI_Move_Z() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_Z_scaled)) { + Draw_Edit_Float3(3, HMI_ValueStruct.Move_Z_scaled); + return HMI_Move_Done(Z_AXIS); + } + LIMIT(HMI_ValueStruct.Move_Z_scaled, (Z_MIN_POS) * MINUNITMULT, (Z_MAX_POS) * MINUNITMULT); + current_position.z = HMI_ValueStruct.Move_Z_scaled / MINUNITMULT; + Draw_Edit_Float3(3, HMI_ValueStruct.Move_Z_scaled, true); + DWIN_UpdateLCD(); + HMI_Plan_Move(homing_feedrate(Z_AXIS)); +} + +#if HAS_HOTEND + + void HMI_Move_E() { + static float last_E_scaled = 0; + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Move_E_scaled)) { + last_E_scaled = HMI_ValueStruct.Move_E_scaled; + Draw_Edit_Signed_Float3(4, last_E_scaled); + return HMI_Move_Done(E_AXIS); + } + LIMIT(HMI_ValueStruct.Move_E_scaled, last_E_scaled - (EXTRUDE_MAXLENGTH) * MINUNITMULT, last_E_scaled + (EXTRUDE_MAXLENGTH) * MINUNITMULT); + current_position.e = HMI_ValueStruct.Move_E_scaled / MINUNITMULT; + Draw_Edit_Signed_Float3(4, HMI_ValueStruct.Move_E_scaled, true); + DWIN_UpdateLCD(); + HMI_Plan_Move(MMM_TO_MMS(FEEDRATE_E)); + } + +#endif + +#if HAS_ZOFFSET_ITEM + + bool printer_busy() { return planner.movesplanned() || printingIsActive(); } + + void HMI_Zoffset() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + uint8_t zoff_line; + switch (HMI_ValueStruct.show_mode) { + case -4: zoff_line = PREPARE_CASE_ZOFF + MROWS - index_prepare; break; + default: zoff_line = TUNE_CASE_ZOFF + MROWS - index_tune; + } + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.offset_value)) { + EncoderRate.enabled = false; + #if HAS_BED_PROBE + probe.offset.z = dwin_zoffset; + TERN_(EEPROM_SETTINGS, settings.save()); + #endif + checkkey = HMI_ValueStruct.show_mode == -4 ? Prepare : Tune; + Draw_Edit_Signed_Float2(zoff_line, TERN(HAS_BED_PROBE, BABY_Z_VAR * 100, HMI_ValueStruct.offset_value)); + DWIN_UpdateLCD(); + return; + } + LIMIT(HMI_ValueStruct.offset_value, (Z_PROBE_OFFSET_RANGE_MIN) * 100, (Z_PROBE_OFFSET_RANGE_MAX) * 100); + last_zoffset = dwin_zoffset; + dwin_zoffset = HMI_ValueStruct.offset_value / 100.0f; + #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset); + #endif + Draw_Edit_Signed_Float2(zoff_line, HMI_ValueStruct.offset_value, true); + DWIN_UpdateLCD(); + } + +#endif // HAS_ZOFFSET_ITEM + +#if HAS_HOTEND + + void HMI_ETemp() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + uint8_t temp_line; + switch (HMI_ValueStruct.show_mode) { + case -1: temp_line = TEMP_CASE_TEMP; break; + case -2: temp_line = PREHEAT_CASE_TEMP; break; + case -3: temp_line = PREHEAT_CASE_TEMP; break; + default: temp_line = TUNE_CASE_TEMP + MROWS - index_tune; + } + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.E_Temp)) { + EncoderRate.enabled = false; + if (HMI_ValueStruct.show_mode == -2) { + checkkey = PLAPreheat; + ui.material_preset[0].hotend_temp = HMI_ValueStruct.E_Temp; + Draw_Edit_Integer3(temp_line, ui.material_preset[0].hotend_temp); + return; + } + else if (HMI_ValueStruct.show_mode == -3) { + checkkey = ABSPreheat; + ui.material_preset[1].hotend_temp = HMI_ValueStruct.E_Temp; + Draw_Edit_Integer3(temp_line, ui.material_preset[1].hotend_temp); + return; + } + else if (HMI_ValueStruct.show_mode == -1) // Temperature + checkkey = TemperatureID; + else + checkkey = Tune; + Draw_Edit_Integer3(temp_line, HMI_ValueStruct.E_Temp); + thermalManager.setTargetHotend(HMI_ValueStruct.E_Temp, 0); + return; + } + // E_Temp limit + LIMIT(HMI_ValueStruct.E_Temp, HEATER_0_MINTEMP, thermalManager.hotend_max_target(0)); + // E_Temp value + Draw_Edit_Integer3(temp_line, HMI_ValueStruct.E_Temp, true); + } + +#endif // HAS_HOTEND + +#if HAS_HEATED_BED + + void HMI_BedTemp() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + uint8_t bed_line; + switch (HMI_ValueStruct.show_mode) { + case -1: bed_line = TEMP_CASE_BED; break; + case -2: bed_line = PREHEAT_CASE_BED; break; + case -3: bed_line = PREHEAT_CASE_BED; break; + default: bed_line = TUNE_CASE_BED + MROWS - index_tune; + } + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Bed_Temp)) { + EncoderRate.enabled = false; + if (HMI_ValueStruct.show_mode == -2) { + checkkey = PLAPreheat; + ui.material_preset[0].bed_temp = HMI_ValueStruct.Bed_Temp; + Draw_Edit_Integer3(bed_line, ui.material_preset[0].bed_temp); + return; + } + else if (HMI_ValueStruct.show_mode == -3) { + checkkey = ABSPreheat; + ui.material_preset[1].bed_temp = HMI_ValueStruct.Bed_Temp; + Draw_Edit_Integer3(bed_line, ui.material_preset[1].bed_temp); + return; + } + else if (HMI_ValueStruct.show_mode == -1) + checkkey = TemperatureID; + else + checkkey = Tune; + Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp); + thermalManager.setTargetBed(HMI_ValueStruct.Bed_Temp); + return; + } + // Bed_Temp limit + LIMIT(HMI_ValueStruct.Bed_Temp, BED_MINTEMP, BED_MAX_TARGET); + // Bed_Temp value + Draw_Edit_Integer3(bed_line, HMI_ValueStruct.Bed_Temp, true); + } + +#endif // HAS_HEATED_BED + +#if HAS_PREHEAT && HAS_FAN + + void HMI_FanSpeed() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + uint8_t fan_line; + switch (HMI_ValueStruct.show_mode) { + case -1: fan_line = TEMP_CASE_FAN; break; + case -2: fan_line = PREHEAT_CASE_FAN; break; + case -3: fan_line = PREHEAT_CASE_FAN; break; + default: fan_line = TUNE_CASE_FAN + MROWS - index_tune; + } + + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Fan_speed)) { + EncoderRate.enabled = false; + if (HMI_ValueStruct.show_mode == -2) { + checkkey = PLAPreheat; + ui.material_preset[0].fan_speed = HMI_ValueStruct.Fan_speed; + Draw_Edit_Integer3(fan_line, ui.material_preset[0].fan_speed); + return; + } + else if (HMI_ValueStruct.show_mode == -3) { + checkkey = ABSPreheat; + ui.material_preset[1].fan_speed = HMI_ValueStruct.Fan_speed; + Draw_Edit_Integer3(fan_line, ui.material_preset[1].fan_speed); + return; + } + else if (HMI_ValueStruct.show_mode == -1) + checkkey = TemperatureID; + else + checkkey = Tune; + Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed); + thermalManager.set_fan_speed(0, HMI_ValueStruct.Fan_speed); + return; + } + // Fan_speed limit + LIMIT(HMI_ValueStruct.Fan_speed, 0, 255); + // Fan_speed value + Draw_Edit_Integer3(fan_line, HMI_ValueStruct.Fan_speed, true); + } + +#endif // HAS_PREHEAT && HAS_FAN + +void HMI_PrintSpeed() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.print_speed)) { + checkkey = Tune; + EncoderRate.enabled = false; + feedrate_percentage = HMI_ValueStruct.print_speed; + Draw_Edit_Integer3(select_tune.now + MROWS - index_tune, HMI_ValueStruct.print_speed); + return; + } + // print_speed limit + LIMIT(HMI_ValueStruct.print_speed, MIN_PRINT_SPEED, MAX_PRINT_SPEED); + // print_speed value + Draw_Edit_Integer3(select_tune.now + MROWS - index_tune, HMI_ValueStruct.print_speed, true); +} + +#define LAST_AXIS TERN(HAS_HOTEND, E_AXIS, Z_AXIS) + +void HMI_MaxFeedspeedXYZE() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Feedspeed)) { + checkkey = MaxSpeed; + EncoderRate.enabled = false; + if (WITHIN(HMI_flag.feedspeed_axis, X_AXIS, LAST_AXIS)) + planner.set_max_feedrate(HMI_flag.feedspeed_axis, HMI_ValueStruct.Max_Feedspeed); + Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed); + return; + } + // MaxFeedspeed limit + if (WITHIN(HMI_flag.feedspeed_axis, X_AXIS, LAST_AXIS)) + NOMORE(HMI_ValueStruct.Max_Feedspeed, default_max_feedrate[HMI_flag.feedspeed_axis] * 2); + if (HMI_ValueStruct.Max_Feedspeed < MIN_MAXFEEDSPEED) HMI_ValueStruct.Max_Feedspeed = MIN_MAXFEEDSPEED; + // MaxFeedspeed value + Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed, true); +} + +void HMI_MaxAccelerationXYZE() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Acceleration)) { + checkkey = MaxAcceleration; + EncoderRate.enabled = false; + if (WITHIN(HMI_flag.acc_axis, X_AXIS, LAST_AXIS)) + planner.set_max_acceleration(HMI_flag.acc_axis, HMI_ValueStruct.Max_Acceleration); + Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration); + return; + } + // MaxAcceleration limit + if (WITHIN(HMI_flag.acc_axis, X_AXIS, LAST_AXIS)) + NOMORE(HMI_ValueStruct.Max_Acceleration, default_max_acceleration[HMI_flag.acc_axis] * 2); + if (HMI_ValueStruct.Max_Acceleration < MIN_MAXACCELERATION) HMI_ValueStruct.Max_Acceleration = MIN_MAXACCELERATION; + // MaxAcceleration value + Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration, true); +} + +#if HAS_CLASSIC_JERK + + void HMI_MaxJerkXYZE() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Jerk_scaled)) { + checkkey = MaxJerk; + EncoderRate.enabled = false; + if (WITHIN(HMI_flag.jerk_axis, X_AXIS, LAST_AXIS)) + planner.set_max_jerk(HMI_flag.jerk_axis, HMI_ValueStruct.Max_Jerk_scaled / 10); + Draw_Edit_Float3(select_jerk.now, HMI_ValueStruct.Max_Jerk_scaled); + return; + } + // MaxJerk limit + if (WITHIN(HMI_flag.jerk_axis, X_AXIS, LAST_AXIS)) + NOMORE(HMI_ValueStruct.Max_Jerk_scaled, default_max_jerk[HMI_flag.jerk_axis] * 2 * MINUNITMULT); + NOLESS(HMI_ValueStruct.Max_Jerk_scaled, (MIN_MAXJERK) * MINUNITMULT); + // MaxJerk value + Draw_Edit_Float3(select_jerk.now, HMI_ValueStruct.Max_Jerk_scaled, true); + } + +#endif // HAS_CLASSIC_JERK + +void HMI_StepXYZE() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (Apply_Encoder(encoder_diffState, HMI_ValueStruct.Max_Step_scaled)) { + checkkey = Step; + EncoderRate.enabled = false; + if (WITHIN(HMI_flag.step_axis, X_AXIS, LAST_AXIS)) + planner.settings.axis_steps_per_mm[HMI_flag.step_axis] = HMI_ValueStruct.Max_Step_scaled / 10; + Draw_Edit_Float3(select_step.now, HMI_ValueStruct.Max_Step_scaled); + return; + } + // Step limit + if (WITHIN(HMI_flag.step_axis, X_AXIS, LAST_AXIS)) + NOMORE(HMI_ValueStruct.Max_Step_scaled, 999.9 * MINUNITMULT); + NOLESS(HMI_ValueStruct.Max_Step_scaled, MIN_STEP); + // Step value + Draw_Edit_Float3(select_step.now, HMI_ValueStruct.Max_Step_scaled, true); +} + +// Draw X, Y, Z and blink if in an un-homed or un-trusted state +void _update_axis_value(const AxisEnum axis, const uint16_t x, const uint16_t y, const bool blink, const bool force) { + const bool draw_qmark = axis_should_home(axis), + draw_empty = NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !draw_qmark && !axis_is_trusted(axis); + + // Check for a position change + static xyz_pos_t oldpos = { -1, -1, -1 }; + const float p = current_position[axis]; + const bool changed = oldpos[axis] != p; + if (changed) oldpos[axis] = p; + + if (force || changed || draw_qmark || draw_empty) { + if (blink && draw_qmark) + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x, y, F("???.?")); + else if (blink && draw_empty) + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, x, y, F(" ")); + else + DWIN_Draw_FloatValue(true, true, 0, font8x16, Color_White, Color_Bg_Black, 3, 1, x, y, p * 10); + } +} + +void _draw_xyz_position(const bool force) { + //SERIAL_ECHOPGM("Draw XYZ:"); + static bool _blink = false; + const bool blink = !!(millis() & 0x400UL); + if (force || blink != _blink) { + _blink = blink; + //SERIAL_ECHOPGM(" (blink)"); + _update_axis_value(X_AXIS, 35, 459, blink, true); + _update_axis_value(Y_AXIS, 120, 459, blink, true); + _update_axis_value(Z_AXIS, 205, 459, blink, true); + } + //SERIAL_EOL(); +} + +void update_variable() { + #if HAS_HOTEND + static celsius_t _hotendtemp = 0, _hotendtarget = 0; + const celsius_t hc = thermalManager.wholeDegHotend(0), + ht = thermalManager.degTargetHotend(0); + const bool _new_hotend_temp = _hotendtemp != hc, + _new_hotend_target = _hotendtarget != ht; + if (_new_hotend_temp) _hotendtemp = hc; + if (_new_hotend_target) _hotendtarget = ht; + #endif + #if HAS_HEATED_BED + static celsius_t _bedtemp = 0, _bedtarget = 0; + const celsius_t bc = thermalManager.wholeDegBed(), + bt = thermalManager.degTargetBed(); + const bool _new_bed_temp = _bedtemp != bc, + _new_bed_target = _bedtarget != bt; + if (_new_bed_temp) _bedtemp = bc; + if (_new_bed_target) _bedtarget = bt; + #endif + #if HAS_FAN + static uint8_t _fanspeed = 0; + const bool _new_fanspeed = _fanspeed != thermalManager.fan_speed[0]; + if (_new_fanspeed) _fanspeed = thermalManager.fan_speed[0]; + #endif + + if (checkkey == Tune) { + // Tune page temperature update + #if HAS_HOTEND + if (_new_hotend_target) + Draw_Edit_Integer3(TUNE_CASE_TEMP + MROWS - index_tune, _hotendtarget); + #endif + #if HAS_HEATED_BED + if (_new_bed_target) + Draw_Edit_Integer3(TUNE_CASE_BED + MROWS - index_tune, _bedtarget); + #endif + #if HAS_FAN + if (_new_fanspeed) + Draw_Edit_Integer3(TUNE_CASE_FAN + MROWS - index_tune, _fanspeed); + #endif + } + else if (checkkey == TemperatureID) { + // Temperature page temperature update + #if HAS_HOTEND + if (_new_hotend_target) Draw_Edit_Integer3(TEMP_CASE_TEMP, _hotendtarget); + #endif + #if HAS_HEATED_BED + if (_new_bed_target) Draw_Edit_Integer3(TEMP_CASE_BED, _bedtarget); + #endif + #if HAS_FAN + if (_new_fanspeed) Draw_Edit_Integer3(TEMP_CASE_FAN, _fanspeed); + #endif + } + + // Bottom temperature update + + #if HAS_HOTEND + if (_new_hotend_temp) + Draw_Stat_Int(28, 384, _hotendtemp); + if (_new_hotend_target) + Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 384, _hotendtarget); + + static int16_t _flow = planner.flow_percentage[0]; + if (_flow != planner.flow_percentage[0]) { + _flow = planner.flow_percentage[0]; + Draw_Stat_Int(116 + 2 * STAT_CHR_W, 417, _flow); + } + #endif + + #if HAS_HEATED_BED + if (_new_bed_temp) + Draw_Stat_Int(28, 417, _bedtemp); + if (_new_bed_target) + Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 417, _bedtarget); + #endif + + static int16_t _feedrate = 100; + if (_feedrate != feedrate_percentage) { + _feedrate = feedrate_percentage; + Draw_Stat_Int(116 + 2 * STAT_CHR_W, 384, _feedrate); + } + + #if HAS_FAN + if (_new_fanspeed) { + _fanspeed = thermalManager.fan_speed[0]; + Draw_Stat_Int(195 + 2 * STAT_CHR_W, 384, _fanspeed); + } + #endif + + static float _offset = 0; + if (BABY_Z_VAR != _offset) { + _offset = BABY_Z_VAR; + if (BABY_Z_VAR < 0) { + Draw_Stat_Float(207, 417, -_offset * 100); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-")); + } + else { + Draw_Stat_Float(207, 417, _offset * 100); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" ")); + } + } + + _draw_xyz_position(false); +} + +/** + * Read and cache the working directory. + * + * TODO: New code can follow the pattern of menu_media.cpp + * and rely on Marlin caching for performance. No need to + * cache files here. + */ + +#ifndef strcasecmp_P + #define strcasecmp_P(a, b) strcasecmp((a), (b)) +#endif + +void make_name_without_ext(char *dst, char *src, size_t maxlen=MENU_CHAR_LIMIT) { + char * const name = card.longest_filename(); + size_t pos = strlen(name); // index of ending nul + + // For files, remove the extension + // which may be .gcode, .gco, or .g + if (!card.flag.filenameIsDir) + while (pos && src[pos] != '.') pos--; // find last '.' (stop at 0) + + size_t len = pos; // nul or '.' + if (len > maxlen) { // Keep the name short + pos = len = maxlen; // move nul down + dst[--pos] = '.'; // insert dots + dst[--pos] = '.'; + dst[--pos] = '.'; + } + + dst[len] = '\0'; // end it + + // Copy down to 0 + while (pos--) dst[pos] = src[pos]; +} + +void HMI_SDCardInit() { card.cdroot(); } + +void MarlinUI::refresh() { /* Nothing to see here */ } + +#if HAS_LCD_BRIGHTNESS + void MarlinUI::_set_brightness() { DWIN_LCD_Brightness(backlight ? brightness : 0); } +#endif + +#if ENABLED(SCROLL_LONG_FILENAMES) + + char shift_name[LONG_FILENAME_LENGTH + 1]; + int8_t shift_amt; // = 0 + millis_t shift_ms; // = 0 + + // Init the shift name based on the highlighted item + void Init_Shift_Name() { + const bool is_subdir = !card.flag.workDirIsRoot; + const int8_t filenum = select_file.now - 1 - is_subdir; // Skip "Back" and ".." + const uint16_t fileCnt = card.get_num_Files(); + if (WITHIN(filenum, 0, fileCnt - 1)) { + card.getfilename_sorted(SD_ORDER(filenum, fileCnt)); + char * const name = card.longest_filename(); + make_name_without_ext(shift_name, name, 100); + } + } + + void Init_SDItem_Shift() { + shift_amt = 0; + shift_ms = select_file.now != CASE_BACK && strlen(shift_name) > MENU_CHAR_LIMIT + ? millis() + 750UL : 0; + } + +#endif + +/** + * Display an SD item, adding a CDUP for subfolders. + */ +void Draw_SDItem(const uint16_t item, int16_t row=-1) { + if (row < 0) row = item + 1 + MROWS - index_file; + const bool is_subdir = !card.flag.workDirIsRoot; + if (is_subdir && item == 0) { + Draw_Menu_Line(row, ICON_Folder, F("..")); + return; + } + + card.getfilename_sorted(SD_ORDER(item - is_subdir, card.get_num_Files())); + char * const name = card.longest_filename(); + + #if ENABLED(SCROLL_LONG_FILENAMES) + // Init the current selected name + // This is used during scroll drawing + if (item == select_file.now - 1) { + make_name_without_ext(shift_name, name, 100); + Init_SDItem_Shift(); + } + #endif + + // Draw the file/folder with name aligned left + char str[strlen(name) + 1]; + make_name_without_ext(str, name); + Draw_Menu_Line(row, card.flag.filenameIsDir ? ICON_Folder : ICON_File, str); +} + +#if ENABLED(SCROLL_LONG_FILENAMES) + + void Draw_SDItem_Shifted(uint8_t &shift) { + // Limit to the number of chars past the cutoff + const size_t len = strlen(shift_name); + NOMORE(shift, _MAX(len - MENU_CHAR_LIMIT, 0U)); + + // Shorten to the available space + const size_t lastchar = _MIN((signed)len, shift + MENU_CHAR_LIMIT); + + const char c = shift_name[lastchar]; + shift_name[lastchar] = '\0'; + + const uint8_t row = select_file.now + MROWS - index_file; // skip "Back" and scroll + Erase_Menu_Text(row); + Draw_Menu_Line(row, 0, &shift_name[shift]); + + shift_name[lastchar] = c; + } + +#endif + +// Redraw the first set of SD Files +void Redraw_SD_List() { + select_file.reset(); + index_file = MROWS; + + Clear_Menu_Area(); // Leave title bar unchanged + + Draw_Back_First(); + + if (card.isMounted()) { + // As many files as will fit + LOOP_L_N(i, _MIN(nr_sd_menu_items(), MROWS)) + Draw_SDItem(i, i + 1); + + TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); + } + else { + DWIN_Draw_Rectangle(1, Color_Bg_Red, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4)); + DWIN_Draw_String(false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), F("No Media")); + } +} + +bool DWIN_lcd_sd_status = false; + +void SDCard_Up() { + card.cdup(); + Redraw_SD_List(); + DWIN_lcd_sd_status = false; // On next DWIN_Update +} + +void SDCard_Folder(char * const dirname) { + card.cd(dirname); + Redraw_SD_List(); + DWIN_lcd_sd_status = false; // On next DWIN_Update +} + +// +// Watch for media mount / unmount +// +void HMI_SDCardUpdate() { + if (HMI_flag.home_flag) return; + if (DWIN_lcd_sd_status != card.isMounted()) { + DWIN_lcd_sd_status = card.isMounted(); + //SERIAL_ECHOLNPGM("HMI_SDCardUpdate: ", DWIN_lcd_sd_status); + if (DWIN_lcd_sd_status) { + if (checkkey == SelectFile) + Redraw_SD_List(); + } + else { + // clean file icon + if (checkkey == SelectFile) { + Redraw_SD_List(); + } + else if (checkkey == PrintProcess || checkkey == Tune || printingIsActive()) { + // TODO: Move card removed abort handling + // to CardReader::manage_media. + card.abortFilePrintSoon(); + wait_for_heatup = wait_for_user = false; + dwin_abort_flag = true; // Reset feedrate, return to Home + } + } + DWIN_UpdateLCD(); + } +} + +// +// The status area is always on-screen, except during +// full-screen modal dialogs. (TODO: Keep alive during dialogs) +// +void Draw_Status_Area(const bool with_update) { + + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, STATUS_Y, DWIN_WIDTH, DWIN_HEIGHT - 1); + + #if HAS_HOTEND + DWIN_ICON_Show(ICON, ICON_HotendTemp, 10, 383); + Draw_Stat_Int(28, 384, thermalManager.wholeDegHotend(0)); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 384, F("/")); + Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 384, thermalManager.degTargetHotend(0)); + + DWIN_ICON_Show(ICON, ICON_StepE, 112, 417); + Draw_Stat_Int(116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 417, F("%")); + #endif + + #if HAS_HEATED_BED + DWIN_ICON_Show(ICON, ICON_BedTemp, 10, 416); + Draw_Stat_Int(28, 417, thermalManager.wholeDegBed()); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 417, F("/")); + Draw_Stat_Int(25 + 4 * STAT_CHR_W + 6, 417, thermalManager.degTargetBed()); + #endif + + DWIN_ICON_Show(ICON, ICON_Speed, 113, 383); + Draw_Stat_Int(116 + 2 * STAT_CHR_W, 384, feedrate_percentage); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 384, F("%")); + + #if HAS_FAN + DWIN_ICON_Show(ICON, ICON_FanSpeed, 187, 383); + Draw_Stat_Int(195 + 2 * STAT_CHR_W, 384, thermalManager.fan_speed[0]); + #endif + + #if HAS_ZOFFSET_ITEM + DWIN_ICON_Show(ICON, ICON_Zoffset, 187, 416); + #endif + + if (BABY_Z_VAR < 0) { + Draw_Stat_Float(207, 417, -BABY_Z_VAR * 100); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F("-")); + } + else { + Draw_Stat_Float(207, 417, BABY_Z_VAR * 100); + DWIN_Draw_String(true, font8x16, Color_White, Color_Bg_Black, 205, 419, F(" ")); + } + + DWIN_Draw_Rectangle(1, Line_Color, 0, 449, DWIN_WIDTH, 451); + + DWIN_ICON_Show(ICON, ICON_MaxSpeedX, 10, 456); + DWIN_ICON_Show(ICON, ICON_MaxSpeedY, 95, 456); + DWIN_ICON_Show(ICON, ICON_MaxSpeedZ, 180, 456); + _draw_xyz_position(true); + + if (with_update) { + DWIN_UpdateLCD(); + delay(5); + } +} + +void HMI_StartFrame(const bool with_update) { + Goto_MainMenu(); + Draw_Status_Area(with_update); +} + +void Draw_Info_Menu() { + Clear_Main_Window(); + + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(MACHINE_SIZE) * MENU_CHR_W) / 2, 122, F(MACHINE_SIZE)); + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(SHORT_BUILD_VERSION) * MENU_CHR_W) / 2, 195, F(SHORT_BUILD_VERSION)); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(30, 17, 28, 13); // "Info" + + DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102); // "Size" + DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); // "Firmware Version" + DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); // "Contact Details" + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_INFO_SCREEN)); + #else + DWIN_Frame_TitleCopy(192, 15, 23, 12); // "Info" + #endif + + DWIN_Frame_AreaCopy(1, 120, 150, 146, 161, 124, 102); // "Size" + DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175); // "Firmware Version" + DWIN_Frame_AreaCopy(1, 1, 164, 96, 175, 89, 248); // "Contact details" + } + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Black, (DWIN_WIDTH - strlen(CORP_WEBSITE) * MENU_CHR_W) / 2, 268, F(CORP_WEBSITE)); + + Draw_Back_First(); + LOOP_L_N(i, 3) { + DWIN_ICON_Show(ICON, ICON_PrintSize + i, 26, 99 + i * 73); + DWIN_Draw_Line(Line_Color, 16, MBASE(2) + i * 73, 256, 156 + i * 73); + } +} + +void Draw_Print_File_Menu() { + Clear_Title_Bar(); + + if (HMI_IsChinese()) + DWIN_Frame_TitleCopy(0, 31, 56, 14); // "Print file" + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_MEDIA_MENU)); + #else + DWIN_Frame_TitleCopy(52, 31, 86, 11); // "Print file" + #endif + } + + Redraw_SD_List(); +} + +// Main Process +void HMI_MainMenu() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_page.inc(4)) { + switch (select_page.now) { + case PAGE_PRINT: ICON_Print(); break; + case PAGE_PREPARE: ICON_Print(); ICON_Prepare(); break; + case PAGE_CONTROL: ICON_Prepare(); ICON_Control(); break; + case PAGE_INFO_LEVELING: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_page.dec()) { + switch (select_page.now) { + case PAGE_PRINT: ICON_Print(); ICON_Prepare(); break; + case PAGE_PREPARE: ICON_Prepare(); ICON_Control(); break; + case PAGE_CONTROL: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + case PAGE_INFO_LEVELING: TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_page.now) { + case PAGE_PRINT: + checkkey = SelectFile; + Draw_Print_File_Menu(); + break; + + case PAGE_PREPARE: + checkkey = Prepare; + select_prepare.reset(); + index_prepare = MROWS; + Draw_Prepare_Menu(); + break; + + case PAGE_CONTROL: + checkkey = Control; + select_control.reset(); + index_control = MROWS; + Draw_Control_Menu(); + break; + + case PAGE_INFO_LEVELING: + #if HAS_ONESTEP_LEVELING + checkkey = Leveling; + HMI_Leveling(); + #else + checkkey = Info; + Draw_Info_Menu(); + #endif + break; + } + } + DWIN_UpdateLCD(); +} + +// Select (and Print) File +void HMI_SelectFile() { + EncoderState encoder_diffState = get_encoder_state(); + + const uint16_t hasUpDir = !card.flag.workDirIsRoot; + + if (encoder_diffState == ENCODER_DIFF_NO) { + #if ENABLED(SCROLL_LONG_FILENAMES) + if (shift_ms && select_file.now >= 1 + hasUpDir) { + // Scroll selected filename every second + const millis_t ms = millis(); + if (ELAPSED(ms, shift_ms)) { + const bool was_reset = shift_amt < 0; + shift_ms = ms + 375UL + was_reset * 250UL; // ms per character + uint8_t shift_new = shift_amt + 1; // Try to shift by... + Draw_SDItem_Shifted(shift_new); // Draw the item + if (!was_reset && shift_new == 0) // Was it limited to 0? + shift_ms = 0; // No scrolling needed + else if (shift_new == shift_amt) // Scroll reached the end + shift_new = -1; // Reset + shift_amt = shift_new; // Set new scroll + } + } + #endif + return; + } + + // First pause is long. Easy. + // On reset, long pause must be after 0. + + const uint16_t fullCnt = nr_sd_menu_items(); + + if (encoder_diffState == ENCODER_DIFF_CW && fullCnt) { + if (select_file.inc(1 + fullCnt)) { + const uint8_t itemnum = select_file.now - 1; // -1 for "Back" + if (TERN0(SCROLL_LONG_FILENAMES, shift_ms)) { // If line was shifted + Erase_Menu_Text(itemnum + MROWS - index_file); // Erase and + Draw_SDItem(itemnum - 1); // redraw + } + if (select_file.now > MROWS && select_file.now > index_file) { // Cursor past the bottom + index_file = select_file.now; // New bottom line + Scroll_Menu(DWIN_SCROLL_UP); + Draw_SDItem(itemnum, MROWS); // Draw and init the shift name + } + else { + Move_Highlight(1, select_file.now + MROWS - index_file); // Just move highlight + TERN_(SCROLL_LONG_FILENAMES, Init_Shift_Name()); // ...and init the shift name + } + TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW && fullCnt) { + if (select_file.dec()) { + const uint8_t itemnum = select_file.now - 1; // -1 for "Back" + if (TERN0(SCROLL_LONG_FILENAMES, shift_ms)) { // If line was shifted + Erase_Menu_Text(select_file.now + 1 + MROWS - index_file); // Erase and + Draw_SDItem(itemnum + 1); // redraw + } + if (select_file.now < index_file - MROWS) { // Cursor past the top + index_file--; // New bottom line + Scroll_Menu(DWIN_SCROLL_DOWN); + if (index_file == MROWS) { + Draw_Back_First(); + TERN_(SCROLL_LONG_FILENAMES, shift_ms = 0); + } + else + Draw_SDItem(itemnum, 0); // Draw the item (and init shift name) + } + else { + Move_Highlight(-1, select_file.now + MROWS - index_file); // Just move highlight + TERN_(SCROLL_LONG_FILENAMES, Init_Shift_Name()); // ...and init the shift name + } + TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); // Reset left. Init timer. + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (select_file.now == CASE_BACK) { // Back + select_page.set(0); + Goto_MainMenu(); + } + else if (hasUpDir && select_file.now == 1) { // CD-Up + SDCard_Up(); + goto HMI_SelectFileExit; + } + else { + const uint16_t filenum = select_file.now - 1 - hasUpDir; + card.getfilename_sorted(SD_ORDER(filenum, card.get_num_Files())); + + // Enter that folder! + if (card.flag.filenameIsDir) { + SDCard_Folder(card.filename); + goto HMI_SelectFileExit; + } + + // Reset highlight for next entry + select_print.reset(); + select_file.reset(); + + // Start choice and print SD file + HMI_flag.heat_flag = true; + HMI_flag.print_finish = false; + HMI_ValueStruct.show_mode = 0; + + card.openAndPrintFile(card.filename); + + #if HAS_FAN + // All fans on for Ender 3 v2 ? + // The slicer should manage this for us. + //for (uint8_t i = 0; i < FAN_COUNT; i++) + // thermalManager.fan_speed[i] = 255; + #endif + + Goto_PrintProcess(); + } + } + + HMI_SelectFileExit: + DWIN_UpdateLCD(); +} + +// Printing +void HMI_Printing() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (HMI_flag.done_confirm_flag) { + if (encoder_diffState == ENCODER_DIFF_ENTER) { + HMI_flag.done_confirm_flag = false; + dwin_abort_flag = true; // Reset feedrate, return to Home + } + return; + } + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_print.inc(3)) { + switch (select_print.now) { + case PRINT_SETUP: ICON_Tune(); break; + case PRINT_PAUSE_RESUME: ICON_Tune(); ICON_ResumeOrPause(); break; + case PRINT_STOP: ICON_ResumeOrPause(); ICON_Stop(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_print.dec()) { + switch (select_print.now) { + case PRINT_SETUP: ICON_Tune(); ICON_ResumeOrPause(); break; + case PRINT_PAUSE_RESUME: ICON_ResumeOrPause(); ICON_Stop(); break; + case PRINT_STOP: ICON_Stop(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_print.now) { + case PRINT_SETUP: + checkkey = Tune; + HMI_ValueStruct.show_mode = 0; + select_tune.reset(); + index_tune = MROWS; + Draw_Tune_Menu(); + break; + + case PRINT_PAUSE_RESUME: + if (HMI_flag.pause_flag) { + ICON_Pause(); + + char cmd[40]; + cmd[0] = '\0'; + + #if BOTH(HAS_HEATED_BED, PAUSE_HEAT) + if (resume_bed_temp) sprintf_P(cmd, PSTR("M190 S%i\n"), resume_bed_temp); + #endif + #if BOTH(HAS_HOTEND, PAUSE_HEAT) + if (resume_hotend_temp) sprintf_P(&cmd[strlen(cmd)], PSTR("M109 S%i\n"), resume_hotend_temp); + #endif + + strcat_P(cmd, M24_STR); + queue.inject(cmd); + } + else { + HMI_flag.select_flag = true; + checkkey = Print_window; + Popup_window_PauseOrStop(); + } + break; + + case PRINT_STOP: + HMI_flag.select_flag = true; + checkkey = Print_window; + Popup_window_PauseOrStop(); + break; + + default: break; + } + } + DWIN_UpdateLCD(); +} + +// Pause and Stop window +void HMI_PauseOrStop() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (encoder_diffState == ENCODER_DIFF_CW) + Draw_Select_Highlight(false); + else if (encoder_diffState == ENCODER_DIFF_CCW) + Draw_Select_Highlight(true); + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (select_print.now == PRINT_PAUSE_RESUME) { + if (HMI_flag.select_flag) { + HMI_flag.pause_action = true; + queue.inject_P(PSTR("M25")); + } + Goto_PrintProcess(); + } + else if (select_print.now == PRINT_STOP) { + if (HMI_flag.select_flag) { + checkkey = Back_Main; + wait_for_heatup = wait_for_user = false; // Stop waiting for heating/user + card.abortFilePrintSoon(); // Let the main loop handle SD abort + dwin_abort_flag = true; // Reset feedrate, return to Home + #ifdef ACTION_ON_CANCEL + host_action_cancel(); + #endif + Popup_Window_Home(true); + if (HMI_flag.home_flag) planner.synchronize(); // Wait for planner moves to finish! + } + else + Goto_PrintProcess(); // cancel stop + } + } + DWIN_UpdateLCD(); +} + +void Draw_Move_Menu() { + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(192, 1, 42, 14); // "Move" + Item_AreaCopy(58, 118, 106, 132, 1); + Item_AreaCopy(109, 118, 157, 132, 2); + Item_AreaCopy(160, 118, 209, 132, 3); + TERN_(HAS_HOTEND, Item_AreaCopy(212, 118, 253, 131, 4)); + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_MOVE_AXIS)); + #else + DWIN_Frame_TitleCopy(231, 2, 35, 11); // "Move" + #endif + + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(1, GET_TEXT_F(MSG_MOVE_X)); + DWIN_Draw_Label(2, GET_TEXT_F(MSG_MOVE_Y)); + DWIN_Draw_Label(3, GET_TEXT_F(MSG_MOVE_Z)); + TERN_(HAS_HOTEND, DWIN_Draw_Label(4, GET_TEXT_F(MSG_MOVE_E))); + #else + say_move_en(1); say_x_en(38, 1); // "Move X" + say_move_en(2); say_y_en(38, 2); // "Move Y" + say_move_en(3); say_z_en(38, 3); // "Move Z" + TERN_(HAS_HOTEND, (say_move_en(4), Item_AreaCopy(99, 194, 151, 204, 4, 38))); // "Move Extruder" + #endif + } + + Draw_Back_First(select_axis.now == CASE_BACK); + if (select_axis.now != CASE_BACK) Draw_Menu_Cursor(select_axis.now); + + // Draw separators and icons + LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MoveX + i); +} + +void Item_Adv_HomeOffsets(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Set Home Offsets" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); + #else + Item_AreaCopy(1, 76, 102, 87, row); // "Set Home Offsets" + #endif + } + Draw_Menu_Line(row, ICON_HomeOffset); + Draw_More_Icon(row); +} + +#if HAS_ONESTEP_LEVELING + + void Item_Adv_ProbeOffsets(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Probe Offsets" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_ZPROBE_OFFSETS)); + #else + say_probe_offs_en(row); + #endif + } + Draw_Menu_Line(row, ICON_ProbeOffset); + Draw_More_Icon(row); + } + +#endif + +void Item_Adv_HotendPID(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Hotend PID" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, F("Hotend PID")); + #else + Item_AreaCopy(96, 104, 167, 114, row); // "Hotend PID" + #endif + } + Draw_Menu_Line(row, ICON_PIDNozzle); +} + +void Item_Adv_BedPID(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Bed PID" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, F("Bed PID")); + #else + Item_AreaCopy(241, 104, 263, 115, row); // "Bed" + Item_AreaCopy(145, 104, 167, 114, row, 27); // "PID" + #endif + } + Draw_Menu_Line(row, ICON_PIDbed); +} + +#if ENABLED(POWER_LOSS_RECOVERY) + + void Item_Adv_PLR(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Power-loss Recovery" + } + else { + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(row, GET_TEXT_F(MSG_ZPROBE_OFFSETS)); + #else + Item_AreaCopy(1, 208, 137, 221, row); // "Power-loss Recovery" + #endif + } + Draw_Menu_Line(row, ICON_Motion); + Draw_Checkbox_Line(row, recovery.enabled); + } + +#endif + +void Draw_AdvancedSettings_Menu() { + Clear_Main_Window(); + + #if ADVSET_CASE_TOTAL >= TROWS + const int16_t scroll = MROWS - index_advset; // Scrolled-up lines + #else + constexpr int16_t scroll = 0; + #endif + #define ASCROL(L) (scroll + (L)) + #define AVISI(L) VISI(ADVSET_CASE_TOTAL, L, ASCROL(L)) + + if (false && HMI_IsChinese()) { + // TODO: Chinese "Advanced Settings" + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_ADVANCED_SETTINGS)); + #else + DWIN_Frame_TitleCopy(93, 401, 126, 15); // "Advanced Settings" + #endif + } + + if (AVISI(0)) Draw_Back_First(select_advset.now == CASE_BACK); + if (AVISI(ADVSET_CASE_HOMEOFF)) Item_Adv_HomeOffsets(ASCROL(ADVSET_CASE_HOMEOFF)); // Set Home Offsets > + #if HAS_ONESTEP_LEVELING + if (AVISI(ADVSET_CASE_PROBEOFF)) Item_Adv_ProbeOffsets(ASCROL(ADVSET_CASE_PROBEOFF)); // Probe Offsets > + #endif + if (AVISI(ADVSET_CASE_HEPID)) Item_Adv_HotendPID(ASCROL(ADVSET_CASE_HEPID)); // Nozzle PID + if (AVISI(ADVSET_CASE_BEDPID)) Item_Adv_BedPID(ASCROL(ADVSET_CASE_BEDPID)); // Bed PID + #if ENABLED(POWER_LOSS_RECOVERY) + if (AVISI(ADVSET_CASE_PWRLOSSR)) Item_Adv_PLR(ASCROL(ADVSET_CASE_PWRLOSSR)); // Power-loss recovery + #endif + if (select_advset.now != CASE_BACK) Draw_Menu_Cursor(ASCROL(select_advset.now)); +} + +void Item_HomeOffs_X(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Home Offset X" + } + else { + #ifdef USE_STRING_TITLES + Draw_Menu_Line(row, ICON_HomeOffsetX, GET_TEXT_F(MSG_HOME_OFFSET_X)); + #else + say_home_offs_en(row); say_x_en(75, row); // "Home Offset X" + #endif + } + Draw_Menu_Line(row, ICON_HomeOffset); + Draw_Edit_Signed_Float3(row, HMI_ValueStruct.Home_OffX_scaled); +} + +void Item_HomeOffs_Y(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Home Offset Y" + } + else { + #ifdef USE_STRING_TITLES + Draw_Menu_Line(row, ICON_HomeOffsetY, GET_TEXT_F(MSG_HOME_OFFSET_Y)); + #else + say_home_offs_en(row); say_y_en(75, row); // "Home Offset X" + #endif + } + Draw_Menu_Line(row, ICON_HomeOffset); + Draw_Edit_Signed_Float3(row, HMI_ValueStruct.Home_OffY_scaled); +} + +void Item_HomeOffs_Z(const uint8_t row) { + if (false && HMI_IsChinese()) { + // TODO: Chinese "Home Offset Z" + } + else { + #ifdef USE_STRING_TITLES + Draw_Menu_Line(row, ICON_HomeOffsetZ, GET_TEXT_F(MSG_HOME_OFFSET_Z)); + #else + say_home_offs_en(row); say_z_en(75, row); // "Home Offset Z" + #endif + } + Draw_Menu_Line(row, ICON_HomeOffset); + Draw_Edit_Signed_Float3(row, HMI_ValueStruct.Home_OffZ_scaled); +} + +void Draw_HomeOff_Menu() { + Clear_Main_Window(); + if (false && HMI_IsChinese()) { + // TODO: Chinese "Home Offsets" + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_SET_HOME_OFFSETS)); + #else + DWIN_Frame_TitleCopy(1, 401, 91, 12); // "Home Offsets" + #endif + } + Draw_Back_First(select_item.now == CASE_BACK); + Item_HomeOffs_X(1); // "Home Offset X" + Item_HomeOffs_Y(2); // "Home Offset Y" + Item_HomeOffs_Z(3); // "Home Offset Z" + if (select_item.now != CASE_BACK) Draw_Menu_Cursor(select_item.now); +} + +#if HAS_ONESTEP_LEVELING + + void Draw_ProbeOff_Menu() { + Clear_Main_Window(); + Draw_Back_First(select_item.now == CASE_BACK); + if (false && HMI_IsChinese()) { + // TODO: Chinese "Probe Offsets" + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_ZPROBE_OFFSETS)); + #else + DWIN_Frame_TitleCopy(124, 431, 91, 12); // "Probe Offsets" + #endif + #ifdef USE_STRING_TITLES + Draw_Menu_Line(1, ICON_ProbeOffsetX, GET_TEXT_F(MSG_ZPROBE_XOFFSET)); // Probe X Offset + Draw_Menu_Line(2, ICON_ProbeOffsetY, GET_TEXT_F(MSG_ZPROBE_YOFFSET)); // Probe Y Offset + #else + say_probe_offs_en(1); say_x_en(75, 1); // "Probe Offset X" + say_probe_offs_en(2); say_y_en(75, 2); // "Probe Offset Y" + #endif + } + + Draw_Edit_Signed_Float3(1, HMI_ValueStruct.Probe_OffX_scaled); + Draw_Edit_Signed_Float3(2, HMI_ValueStruct.Probe_OffY_scaled); + + if (select_item.now != CASE_BACK) Draw_Menu_Cursor(select_item.now); + } + +#endif + +#include "../../../libs/buzzer.h" + +void HMI_AudioFeedback(const bool success=true) { + #if HAS_BUZZER + if (success) { + buzzer.tone(100, 659); + buzzer.tone(10, 0); + buzzer.tone(100, 698); + } + else + buzzer.tone(40, 440); + #endif +} + +// Prepare +void HMI_Prepare() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_prepare.inc(1 + PREPARE_CASE_TOTAL)) { + if (select_prepare.now > MROWS && select_prepare.now > index_prepare) { + index_prepare = select_prepare.now; + + // Scroll up and draw a blank bottom line + Scroll_Menu(DWIN_SCROLL_UP); + Draw_Menu_Icon(MROWS, ICON_Axis + select_prepare.now - 1); + + // Draw "More" icon for sub-menus + if (index_prepare < 7) Draw_More_Icon(MROWS - index_prepare + 1); + + #if HAS_HOTEND + if (index_prepare == PREPARE_CASE_ABS) Item_Prepare_ABS(MROWS); + #endif + #if HAS_PREHEAT + if (index_prepare == PREPARE_CASE_COOL) Item_Prepare_Cool(MROWS); + #endif + if (index_prepare == PREPARE_CASE_LANG) Item_Prepare_Lang(MROWS); + } + else { + Move_Highlight(1, select_prepare.now + MROWS - index_prepare); + } + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_prepare.dec()) { + if (select_prepare.now < index_prepare - MROWS) { + index_prepare--; + Scroll_Menu(DWIN_SCROLL_DOWN); + + if (index_prepare == MROWS) + Draw_Back_First(); + else + Draw_Menu_Line(0, ICON_Axis + select_prepare.now - 1); + + if (index_prepare < 7) Draw_More_Icon(MROWS - index_prepare + 1); + + if (index_prepare == 6) Item_Prepare_Move(0); + else if (index_prepare == 7) Item_Prepare_Disable(0); + else if (index_prepare == 8) Item_Prepare_Home(0); + } + else { + Move_Highlight(-1, select_prepare.now + MROWS - index_prepare); + } + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_prepare.now) { + case CASE_BACK: + select_page.set(1); + Goto_MainMenu(); + break; + case PREPARE_CASE_MOVE: + checkkey = AxisMove; + select_axis.reset(); + Draw_Move_Menu(); + + Draw_Edit_Float3(1, current_position.x * MINUNITMULT); + Draw_Edit_Float3(2, current_position.y * MINUNITMULT); + Draw_Edit_Float3(3, current_position.z * MINUNITMULT); + #if HAS_HOTEND + HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT; + Draw_Edit_Signed_Float3(4, HMI_ValueStruct.Move_E_scaled); + #endif + break; + + case PREPARE_CASE_DISA: queue.inject_P(PSTR("M84")); break; + + case PREPARE_CASE_HOME: // Homing + checkkey = Last_Prepare; + index_prepare = MROWS; + queue.inject_P(G28_STR); // G28 will set home_flag + Popup_Window_Home(); + break; + #if HAS_ZOFFSET_ITEM + case PREPARE_CASE_ZOFF: + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + checkkey = Homeoffset; + HMI_ValueStruct.show_mode = -4; + HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; + Draw_Edit_Signed_Float2(PREPARE_CASE_ZOFF + MROWS - index_prepare, HMI_ValueStruct.offset_value, true); + EncoderRate.enabled = true; + #else + // Apply workspace offset, making the current position 0,0,0 + queue.inject_P(PSTR("G92 X0 Y0 Z0")); + HMI_AudioFeedback(); + #endif + break; + #endif + #if HAS_PREHEAT + case PREPARE_CASE_PLA: + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[0].hotend_temp, 0)); + TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(ui.material_preset[0].bed_temp)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[0].fan_speed)); + break; + case PREPARE_CASE_ABS: + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[1].hotend_temp, 0)); + TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(ui.material_preset[1].bed_temp)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[1].fan_speed)); + break; + case PREPARE_CASE_COOL: + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + #if HAS_HOTEND || HAS_HEATED_BED + thermalManager.disable_all_heaters(); + #endif + break; + #endif + case PREPARE_CASE_LANG: + HMI_ToggleLanguage(); + Draw_Prepare_Menu(); + break; + default: break; + } + } + DWIN_UpdateLCD(); +} + +void Draw_Temperature_Menu() { + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(236, 2, 28, 12); // "Temperature" + #if HAS_HOTEND + Item_AreaCopy(1, 134, 56, 146, TEMP_CASE_TEMP); + #endif + #if HAS_HEATED_BED + Item_AreaCopy(58, 134, 113, 146, TEMP_CASE_BED); + #endif + #if HAS_FAN + Item_AreaCopy(115, 134, 170, 146, TEMP_CASE_FAN); + #endif + #if HAS_HOTEND + Item_AreaCopy(100, 89, 178, 101, TEMP_CASE_PLA); + Item_AreaCopy(180, 89, 260, 100, TEMP_CASE_ABS); + #endif + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_TEMPERATURE)); + #else + DWIN_Frame_TitleCopy(56, 15, 85, 14); // "Temperature" + #endif + #ifdef USE_STRING_TITLES + #if HAS_HOTEND + DWIN_Draw_Label(TEMP_CASE_TEMP, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND)); + #endif + #if HAS_HEATED_BED + DWIN_Draw_Label(TEMP_CASE_BED, GET_TEXT_F(MSG_UBL_SET_TEMP_BED)); + #endif + #if HAS_FAN + DWIN_Draw_Label(TEMP_CASE_FAN, GET_TEXT_F(MSG_FAN_SPEED)); + #endif + #if HAS_HOTEND + DWIN_Draw_Label(TEMP_CASE_PLA, F(PREHEAT_1_LABEL " Preheat Settings")); + DWIN_Draw_Label(TEMP_CASE_ABS, F(PREHEAT_2_LABEL " Preheat Settings")); + #endif + #else + #if HAS_HOTEND + Item_AreaCopy(197, 104, 238, 114, TEMP_CASE_TEMP); // "Nozzle" + Item_AreaCopy(1, 89, 83, 101, TEMP_CASE_TEMP, 44); // "Temperature" + #endif + #if HAS_HEATED_BED + Item_AreaCopy(240, 104, 264, 114, TEMP_CASE_BED); // "Bed" + Item_AreaCopy(1, 89, 83, 101, TEMP_CASE_BED, 27); // "Temperature" + #endif + #if HAS_FAN + Item_AreaCopy( 1, 119, 61, 132, TEMP_CASE_FAN); // "Fan speed" + #endif + #if HAS_HOTEND + Item_AreaCopy(107, 76, 156, 86, TEMP_CASE_PLA); // "Preheat" + say_pla_en(52, TEMP_CASE_PLA); // "PLA" + Item_AreaCopy(150, 135, 202, 148, TEMP_CASE_PLA, 79); // "Settings" + + Item_AreaCopy(107, 76, 156, 86, TEMP_CASE_ABS); // "Preheat" + say_abs_en(52, TEMP_CASE_ABS); // "ABS" + Item_AreaCopy(150, 135, 202, 148, TEMP_CASE_ABS, 81); // "Settings" + #endif + #endif + } + + Draw_Back_First(select_temp.now == CASE_BACK); + if (select_temp.now != CASE_BACK) Draw_Menu_Cursor(select_temp.now); + + // Draw icons and lines + uint8_t i = 0; + #define _TMENU_ICON(N) Draw_Menu_Line(++i, ICON_SetEndTemp + (N) - 1) + #if HAS_HOTEND + _TMENU_ICON(TEMP_CASE_TEMP); + Draw_Edit_Integer3(i, thermalManager.degTargetHotend(0)); + #endif + #if HAS_HEATED_BED + _TMENU_ICON(TEMP_CASE_BED); + Draw_Edit_Integer3(i, thermalManager.degTargetBed()); + #endif + #if HAS_FAN + _TMENU_ICON(TEMP_CASE_FAN); + Draw_Edit_Integer3(i, thermalManager.fan_speed[0]); + #endif + #if HAS_HOTEND + // PLA/ABS items have submenus + _TMENU_ICON(TEMP_CASE_PLA); + Draw_More_Icon(i); + _TMENU_ICON(TEMP_CASE_ABS); + Draw_More_Icon(i); + #endif +} + +// Control +void HMI_Control() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_control.inc(1 + CONTROL_CASE_TOTAL)) { + if (select_control.now > MROWS && select_control.now > index_control) { + index_control = select_control.now; + + // Scroll up and draw a blank bottom line + Scroll_Menu(DWIN_SCROLL_UP); + + switch (index_control) { // Last menu items + case CONTROL_CASE_ADVSET: Item_Control_Advanced(MROWS); break; + case CONTROL_CASE_INFO: Item_Control_Info(MROWS); break; + default: break; + } + + } + else + Move_Highlight(1, select_control.now + MROWS - index_control); + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_control.dec()) { + if (select_control.now < index_control - MROWS) { + index_control--; + Scroll_Menu(DWIN_SCROLL_DOWN); + switch (index_control) { // First menu items + case MROWS: Draw_Back_First(); break; + case MROWS + 1: Item_Control_Temp(0); break; + case MROWS + 2: Item_Control_Motion(0); break; + default: break; + } + } + else + Move_Highlight(-1, select_control.now + MROWS - index_control); + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_control.now) { + case CASE_BACK: + select_page.set(2); + Goto_MainMenu(); + break; + case CONTROL_CASE_TEMP: + checkkey = TemperatureID; + HMI_ValueStruct.show_mode = -1; + select_temp.reset(); + Draw_Temperature_Menu(); + break; + case CONTROL_CASE_MOVE: + checkkey = Motion; + select_motion.reset(); + Draw_Motion_Menu(); + break; + #if ENABLED(EEPROM_SETTINGS) + case CONTROL_CASE_SAVE: { + const bool success = settings.save(); + HMI_AudioFeedback(success); + } break; + case CONTROL_CASE_LOAD: { + const bool success = settings.load(); + HMI_AudioFeedback(success); + } break; + case CONTROL_CASE_RESET: + settings.reset(); + HMI_AudioFeedback(); + break; + #endif + case CONTROL_CASE_ADVSET: + checkkey = AdvSet; + select_advset.reset(); + Draw_AdvancedSettings_Menu(); + break; + case CONTROL_CASE_INFO: + checkkey = Info; + Draw_Info_Menu(); + break; + default: break; + } + } + DWIN_UpdateLCD(); +} + +#if HAS_ONESTEP_LEVELING + // Leveling + void HMI_Leveling() { + Popup_Window_Leveling(); + DWIN_UpdateLCD(); + queue.inject_P(PSTR("G28O\nG29")); + } +#endif + +// Axis Move +void HMI_AxisMove() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + #if ENABLED(PREVENT_COLD_EXTRUSION) + // popup window resume + if (HMI_flag.cold_flag) { + if (encoder_diffState == ENCODER_DIFF_ENTER) { + HMI_flag.cold_flag = false; + HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT; + Draw_Move_Menu(); + Draw_Edit_Float3(1, HMI_ValueStruct.Move_X_scaled); + Draw_Edit_Float3(2, HMI_ValueStruct.Move_Y_scaled); + Draw_Edit_Float3(3, HMI_ValueStruct.Move_Z_scaled); + Draw_Edit_Signed_Float3(4, 0); + DWIN_UpdateLCD(); + } + return; + } + #endif + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_axis.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_axis.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_axis.dec()) Move_Highlight(-1, select_axis.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_axis.now) { + case CASE_BACK: + checkkey = Prepare; + select_prepare.set(1); + index_prepare = MROWS; + Draw_Prepare_Menu(); + break; + case 1: // X axis move + checkkey = Move_X; + HMI_ValueStruct.Move_X_scaled = current_position.x * MINUNITMULT; + Draw_Edit_Float3(1, HMI_ValueStruct.Move_X_scaled, true); + EncoderRate.enabled = true; + break; + case 2: // Y axis move + checkkey = Move_Y; + HMI_ValueStruct.Move_Y_scaled = current_position.y * MINUNITMULT; + Draw_Edit_Float3(2, HMI_ValueStruct.Move_Y_scaled, true); + EncoderRate.enabled = true; + break; + case 3: // Z axis move + checkkey = Move_Z; + HMI_ValueStruct.Move_Z_scaled = current_position.z * MINUNITMULT; + Draw_Edit_Float3(3, HMI_ValueStruct.Move_Z_scaled, true); + EncoderRate.enabled = true; + break; + #if HAS_HOTEND + case 4: // Extruder + #if ENABLED(PREVENT_COLD_EXTRUSION) + if (thermalManager.tooColdToExtrude(0)) { + HMI_flag.cold_flag = true; + Popup_Window_ETempTooLow(); + DWIN_UpdateLCD(); + return; + } + #endif + checkkey = Extruder; + HMI_ValueStruct.Move_E_scaled = current_position.e * MINUNITMULT; + Draw_Edit_Signed_Float3(4, HMI_ValueStruct.Move_E_scaled, true); + EncoderRate.enabled = true; + break; + #endif + } + } + DWIN_UpdateLCD(); +} + +// TemperatureID +void HMI_Temperature() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_temp.inc(1 + TEMP_CASE_TOTAL)) Move_Highlight(1, select_temp.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_temp.dec()) Move_Highlight(-1, select_temp.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_temp.now) { + case CASE_BACK: + checkkey = Control; + select_control.set(1); + index_control = MROWS; + Draw_Control_Menu(); + break; + #if HAS_HOTEND + case TEMP_CASE_TEMP: + checkkey = ETemp; + HMI_ValueStruct.E_Temp = thermalManager.degTargetHotend(0); + Draw_Edit_Integer3(1, HMI_ValueStruct.E_Temp, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_HEATED_BED + case TEMP_CASE_BED: + checkkey = BedTemp; + HMI_ValueStruct.Bed_Temp = thermalManager.degTargetBed(); + Draw_Edit_Integer3(2, HMI_ValueStruct.Bed_Temp, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_FAN + case TEMP_CASE_FAN: + checkkey = FanSpeed; + HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0]; + Draw_Edit_Integer3(3, HMI_ValueStruct.Fan_speed, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_HOTEND + case TEMP_CASE_PLA: { + checkkey = PLAPreheat; + select_PLA.reset(); + HMI_ValueStruct.show_mode = -2; + + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(59, 16, 81, 14); // "PLA Settings" + Item_AreaCopy(100, 89, 124, 101, PREHEAT_CASE_TEMP); + Item_AreaCopy(1, 134, 56, 146, PREHEAT_CASE_TEMP, 24); // PLA nozzle temp + #if HAS_HEATED_BED + Item_AreaCopy(100, 89, 124, 101, PREHEAT_CASE_BED); + Item_AreaCopy(58, 134, 113, 146, PREHEAT_CASE_BED, 24); // PLA bed temp + #endif + #if HAS_FAN + Item_AreaCopy(100, 89, 124, 101, PREHEAT_CASE_FAN); + Item_AreaCopy(115, 134, 170, 146, PREHEAT_CASE_FAN, 24); // PLA fan speed + #endif + #if ENABLED(EEPROM_SETTINGS) + Item_AreaCopy(72, 148, 151, 162, PREHEAT_CASE_SAVE); // Save PLA configuration + #endif + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(F(PREHEAT_1_LABEL " Settings")); // TODO: GET_TEXT_F + #else + DWIN_Frame_TitleCopy(56, 15, 85, 14); // "Temperature" TODO: "PLA Settings" + #endif + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(PREHEAT_CASE_TEMP, F("Nozzle Temp")); + #if HAS_HEATED_BED + DWIN_Draw_Label(PREHEAT_CASE_BED, F("Bed Temp")); + #endif + #if HAS_FAN + DWIN_Draw_Label(PREHEAT_CASE_FAN, GET_TEXT_F(MSG_FAN_SPEED)); + #endif + #if ENABLED(EEPROM_SETTINGS) + DWIN_Draw_Label(PREHEAT_CASE_SAVE, GET_TEXT_F(MSG_STORE_EEPROM)); + #endif + #else + say_pla_en(0, PREHEAT_CASE_TEMP); // "PLA" + Item_AreaCopy(198, 104, 237, 114, PREHEAT_CASE_TEMP, 27); // "Nozzle" + Item_AreaCopy(1, 89, 81, 102, PREHEAT_CASE_TEMP, 71); // "Temperature" + #if HAS_HEATED_BED + say_pla_en(0, PREHEAT_CASE_BED); // "PLA" + Item_AreaCopy(240, 104, 264, 114, PREHEAT_CASE_BED, 27); // "Bed" + Item_AreaCopy(1, 89, 83, 101, PREHEAT_CASE_BED, 54); // "Temperature" + #endif + #if HAS_FAN + say_pla_en(0, PREHEAT_CASE_FAN); // "PLA" + Item_AreaCopy(0, 119, 64, 132, PREHEAT_CASE_FAN, 27); // "Fan speed" + #endif + #if ENABLED(EEPROM_SETTINGS) + Item_AreaCopy(98, 164, 233, 177, PREHEAT_CASE_SAVE); // "Save PLA parameters" + #endif + #endif + } + + Draw_Back_First(); + + uint8_t i = 0; + Draw_Menu_Line(++i, ICON_SetEndTemp); + Draw_Edit_Integer3(i, ui.material_preset[0].hotend_temp); + #if HAS_HEATED_BED + Draw_Menu_Line(++i, ICON_SetBedTemp); + Draw_Edit_Integer3(i, ui.material_preset[0].bed_temp); + #endif + #if HAS_FAN + Draw_Menu_Line(++i, ICON_FanSpeed); + Draw_Edit_Integer3(i, ui.material_preset[0].fan_speed); + #endif + #if ENABLED(EEPROM_SETTINGS) + Draw_Menu_Line(++i, ICON_WriteEEPROM); + #endif + } break; + + case TEMP_CASE_ABS: { // ABS preheat setting + checkkey = ABSPreheat; + select_ABS.reset(); + HMI_ValueStruct.show_mode = -3; + + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(142, 16, 82, 14); // "ABS Settings" + + Item_AreaCopy(180, 89, 204, 100, PREHEAT_CASE_TEMP); + Item_AreaCopy(1, 134, 56, 146, PREHEAT_CASE_TEMP, 24); // ABS nozzle temp + #if HAS_HEATED_BED + Item_AreaCopy(180, 89, 204, 100, PREHEAT_CASE_BED); + Item_AreaCopy(58, 134, 113, 146, PREHEAT_CASE_BED, 24); // ABS bed temp + #endif + #if HAS_FAN + Item_AreaCopy(180, 89, 204, 100, PREHEAT_CASE_FAN); + Item_AreaCopy(115, 134, 170, 146, PREHEAT_CASE_FAN, 24); // ABS fan speed + #endif + #if ENABLED(EEPROM_SETTINGS) + Item_AreaCopy(72, 148, 151, 162, PREHEAT_CASE_SAVE); + Item_AreaCopy(180, 89, 204, 100, PREHEAT_CASE_SAVE, 28, 2); // Save ABS configuration + #endif + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(F("ABS Settings")); // TODO: GET_TEXT_F + #else + DWIN_Frame_TitleCopy(56, 15, 85, 14); // "Temperature" TODO: "ABS Settings" + #endif + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(PREHEAT_CASE_TEMP, F("Nozzle Temp")); + #if HAS_HEATED_BED + DWIN_Draw_Label(PREHEAT_CASE_BED, F("Bed Temp")); + #endif + #if HAS_FAN + DWIN_Draw_Label(PREHEAT_CASE_FAN, GET_TEXT_F(MSG_FAN_SPEED)); + #endif + #if ENABLED(EEPROM_SETTINGS) + DWIN_Draw_Label(PREHEAT_CASE_SAVE, GET_TEXT_F(MSG_STORE_EEPROM)); + #endif + #else + say_abs_en(0, PREHEAT_CASE_TEMP); // "ABS" + Item_AreaCopy(197, 104, 238, 114, PREHEAT_CASE_TEMP, 29); // "Nozzle" + Item_AreaCopy(1, 89, 34, 102, PREHEAT_CASE_TEMP, 73); // "Temp" + #if HAS_HEATED_BED + say_abs_en(0, PREHEAT_CASE_BED); // "ABS" + Item_AreaCopy(240, 104, 264, 114, PREHEAT_CASE_BED, 29); // "Bed" + Item_AreaCopy(1, 89, 83, 102, PREHEAT_CASE_BED, 56); // "Temperature" + #endif + #if HAS_FAN + say_abs_en(0, PREHEAT_CASE_FAN); // "ABS" + Item_AreaCopy(0, 119, 64, 132, PREHEAT_CASE_FAN, 29); // "Fan speed" + #endif + #if ENABLED(EEPROM_SETTINGS) + Item_AreaCopy(98, 165, 233, 177, PREHEAT_CASE_SAVE); // "Save PLA parameters" + say_abs_en(33, PREHEAT_CASE_SAVE); // "ABS" + #endif + #endif + } + + Draw_Back_First(); + + uint8_t i = 0; + Draw_Menu_Line(++i, ICON_SetEndTemp); + Draw_Edit_Integer3(i, ui.material_preset[1].hotend_temp); + #if HAS_HEATED_BED + Draw_Menu_Line(++i, ICON_SetBedTemp); + Draw_Edit_Integer3(i, ui.material_preset[1].bed_temp); + #endif + #if HAS_FAN + Draw_Menu_Line(++i, ICON_FanSpeed); + Draw_Edit_Integer3(i, ui.material_preset[1].fan_speed); + #endif + #if ENABLED(EEPROM_SETTINGS) + Draw_Menu_Line(++i, ICON_WriteEEPROM); + #endif + + } break; + + #endif // HAS_HOTEND + } + } + DWIN_UpdateLCD(); +} + +void Draw_Max_Speed_Menu() { + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Max Speed (mm/s)" + + auto say_max_speed_cn = [](const uint8_t line) { + Item_AreaCopy(173, 133, 228, 147, line); // "Max speed" + }; + + say_max_speed_cn(1); // "Max speed" + Item_AreaCopy(229, 133, 236, 147, 1, 58); // "X" + say_max_speed_cn(2); // "Max speed" + Item_AreaCopy(1, 150, 7, 160, 2, 58, 3); // "Y" + say_max_speed_cn(3); // "Max speed" + Item_AreaCopy(9, 150, 16, 160, 3, 58, 3); // "Z" + #if HAS_HOTEND + say_max_speed_cn(4); // "Max speed" + Item_AreaCopy(18, 150, 25, 160, 4, 58, 3); // "E" + #endif + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(F("Max Speed (mm/s)")); // TODO: GET_TEXT_F + #else + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Max Speed (mm/s)" + #endif + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(1, F("Max Feedrate X")); + DWIN_Draw_Label(2, F("Max Feedrate Y")); + DWIN_Draw_Label(3, F("Max Feedrate Z")); + #if HAS_HOTEND + DWIN_Draw_Label(4, F("Max Feedrate E")); + #endif + #else + say_max_en(1); say_speed_en(30, 1); say_x_en(73, 1); // "Max Speed X" + say_max_en(2); say_speed_en(30, 2); say_y_en(73, 2); // "Max Speed Y" + say_max_en(3); say_speed_en(30, 3); say_z_en(73, 3); // "Max Speed Z" + #if HAS_HOTEND + say_max_en(4); say_speed_en(30, 4); say_e_en(73, 4); // "Max Speed E" + #endif + #endif + } + + Draw_Back_First(); + LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedX + i); + Draw_Edit_Integer4(1, planner.settings.max_feedrate_mm_s[X_AXIS]); + Draw_Edit_Integer4(2, planner.settings.max_feedrate_mm_s[Y_AXIS]); + Draw_Edit_Integer4(3, planner.settings.max_feedrate_mm_s[Z_AXIS]); + #if HAS_HOTEND + Draw_Edit_Integer4(4, planner.settings.max_feedrate_mm_s[E_AXIS]); + #endif +} + +void Draw_Max_Accel_Menu() { + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Acceleration" + + Item_AreaCopy(173, 133, 200, 147, 1); + Item_AreaCopy( 28, 149, 69, 161, 1, 30, 1); + Item_AreaCopy(229, 133, 236, 147, 1, 74); // Max acceleration X + Item_AreaCopy(173, 133, 200, 147, 2); + Item_AreaCopy( 28, 149, 69, 161, 2, 30, 1); + Item_AreaCopy( 1, 150, 7, 160, 2, 74, 2); // Max acceleration Y + Item_AreaCopy(173, 133, 200, 147, 3); + Item_AreaCopy( 28, 149, 69, 161, 3, 30, 1); + Item_AreaCopy( 9, 150, 16, 160, 3, 74, 2); // Max acceleration Z + #if HAS_HOTEND + Item_AreaCopy(173, 133, 200, 147, 4); + Item_AreaCopy( 28, 149, 69, 161, 4, 30, 1); + Item_AreaCopy( 18, 150, 25, 160, 4, 74, 2); // Max acceleration E + #endif + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_ACCELERATION)); + #else + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Acceleration" + #endif + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(1, F("Max Accel X")); + DWIN_Draw_Label(2, F("Max Accel Y")); + DWIN_Draw_Label(3, F("Max Accel Z")); + #if HAS_HOTEND + DWIN_Draw_Label(4, F("Max Accel E")); + #endif + #else + say_max_accel_en(1); say_x_en(112, 1); // "Max Acceleration X" + say_max_accel_en(2); say_y_en(112, 2); // "Max Acceleration Y" + say_max_accel_en(3); say_z_en(112, 3); // "Max Acceleration Z" + #if HAS_HOTEND + say_max_accel_en(4); say_e_en(112, 4); // "Max Acceleration E" + #endif + #endif + } + + Draw_Back_First(); + LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxAccX + i); + Draw_Edit_Integer4(1, planner.settings.max_acceleration_mm_per_s2[X_AXIS]); + Draw_Edit_Integer4(2, planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); + Draw_Edit_Integer4(3, planner.settings.max_acceleration_mm_per_s2[Z_AXIS]); + #if HAS_HOTEND + Draw_Edit_Integer4(4, planner.settings.max_acceleration_mm_per_s2[E_AXIS]); + #endif +} + +#if HAS_CLASSIC_JERK + void Draw_Max_Jerk_Menu() { + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Jerk" + + Item_AreaCopy(173, 133, 200, 147, 1); + Item_AreaCopy( 1, 180, 28, 192, 1, 30, 1); + Item_AreaCopy(202, 133, 228, 147, 1, 56); + Item_AreaCopy(229, 133, 236, 147, 1, 86); // Max Jerk speed X + Item_AreaCopy(173, 133, 200, 147, 2); + Item_AreaCopy( 1, 180, 28, 192, 2, 30, 1); + Item_AreaCopy(202, 133, 228, 147, 2, 56); + Item_AreaCopy( 1, 150, 7, 160, 2, 86, 3); // Max Jerk speed Y + Item_AreaCopy(173, 133, 200, 147, 3); + Item_AreaCopy( 1, 180, 28, 192, 3, 30, 1); + Item_AreaCopy(202, 133, 228, 147, 3, 56); + Item_AreaCopy( 9, 150, 16, 160, 3, 86, 3); // Max Jerk speed Z + #if HAS_HOTEND + Item_AreaCopy(173, 133, 200, 147, 4); + Item_AreaCopy( 1, 180, 28, 192, 4, 30, 1); + Item_AreaCopy(202, 133, 228, 147, 4, 56); + Item_AreaCopy( 18, 150, 25, 160, 4, 86, 3); // Max Jerk speed E + #endif + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_JERK)); + #else + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Jerk" + #endif + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(1, GET_TEXT_F(MSG_VA_JERK)); + DWIN_Draw_Label(2, GET_TEXT_F(MSG_VB_JERK)); + DWIN_Draw_Label(3, GET_TEXT_F(MSG_VC_JERK)); + #if HAS_HOTEND + DWIN_Draw_Label(4, GET_TEXT_F(MSG_VE_JERK)); + #endif + #else + say_max_jerk_speed_en(1); say_x_en(102, 1); // Max Jerk speed X + say_max_jerk_speed_en(2); say_y_en(102, 2); // Max Jerk speed Y + say_max_jerk_speed_en(3); say_z_en(102, 3); // Max Jerk speed Z + #if HAS_HOTEND + say_max_jerk_speed_en(4); say_e_en(102, 4); // Max Jerk speed E + #endif + #endif + } + + Draw_Back_First(); + LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_MaxSpeedJerkX + i); + Draw_Edit_Float3(1, planner.max_jerk[X_AXIS] * MINUNITMULT); + Draw_Edit_Float3(2, planner.max_jerk[Y_AXIS] * MINUNITMULT); + Draw_Edit_Float3(3, planner.max_jerk[Z_AXIS] * MINUNITMULT); + #if HAS_HOTEND + Draw_Edit_Float3(4, planner.max_jerk[E_AXIS] * MINUNITMULT); + #endif + } +#endif + +void Draw_Steps_Menu() { + Clear_Main_Window(); + + if (HMI_IsChinese()) { + DWIN_Frame_TitleCopy(1, 16, 28, 13); // "Steps per mm" + + Item_AreaCopy(153, 148, 194, 161, 1); + Item_AreaCopy(229, 133, 236, 147, 1, 44); // Transmission Ratio X + Item_AreaCopy(153, 148, 194, 161, 2); + Item_AreaCopy( 1, 150, 7, 160, 2, 44, 3); // Transmission Ratio Y + Item_AreaCopy(153, 148, 194, 161, 3); + Item_AreaCopy( 9, 150, 16, 160, 3, 44, 3); // Transmission Ratio Z + #if HAS_HOTEND + Item_AreaCopy(153, 148, 194, 161, 4); + Item_AreaCopy( 18, 150, 25, 160, 4, 44, 3); // Transmission Ratio E + #endif + } + else { + #ifdef USE_STRING_HEADINGS + Draw_Title(GET_TEXT_F(MSG_STEPS_PER_MM)); + #else + DWIN_Frame_TitleCopy(144, 16, 46, 11); // "Steps per mm" + #endif + #ifdef USE_STRING_TITLES + DWIN_Draw_Label(1, GET_TEXT_F(MSG_A_STEPS)); + DWIN_Draw_Label(2, GET_TEXT_F(MSG_B_STEPS)); + DWIN_Draw_Label(3, GET_TEXT_F(MSG_C_STEPS)); + #if HAS_HOTEND + DWIN_Draw_Label(4, GET_TEXT_F(MSG_E_STEPS)); + #endif + #else + say_steps_per_mm_en(1); say_x_en(101, 1); // "Steps-per-mm X" + say_steps_per_mm_en(2); say_y_en(101, 2); // "Y" + say_steps_per_mm_en(3); say_z_en(101, 3); // "Z" + #if HAS_HOTEND + say_steps_per_mm_en(4); say_e_en(101, 4); // "E" + #endif + #endif + } + + Draw_Back_First(); + LOOP_L_N(i, 3 + ENABLED(HAS_HOTEND)) Draw_Menu_Line(i + 1, ICON_StepX + i); + Draw_Edit_Float3(1, planner.settings.axis_steps_per_mm[X_AXIS] * MINUNITMULT); + Draw_Edit_Float3(2, planner.settings.axis_steps_per_mm[Y_AXIS] * MINUNITMULT); + Draw_Edit_Float3(3, planner.settings.axis_steps_per_mm[Z_AXIS] * MINUNITMULT); + #if HAS_HOTEND + Draw_Edit_Float3(4, planner.settings.axis_steps_per_mm[E_AXIS] * MINUNITMULT); + #endif +} + +// Motion +void HMI_Motion() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_motion.inc(1 + MOTION_CASE_TOTAL)) Move_Highlight(1, select_motion.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_motion.dec()) Move_Highlight(-1, select_motion.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_motion.now) { + case CASE_BACK: + checkkey = Control; + select_control.set(CONTROL_CASE_MOVE); + index_control = MROWS; + Draw_Control_Menu(); + break; + case MOTION_CASE_RATE: + checkkey = MaxSpeed; + select_speed.reset(); + Draw_Max_Speed_Menu(); + break; + case MOTION_CASE_ACCEL: + checkkey = MaxAcceleration; + select_acc.reset(); + Draw_Max_Accel_Menu(); + break; + #if HAS_CLASSIC_JERK + case MOTION_CASE_JERK: + checkkey = MaxJerk; + select_jerk.reset(); + Draw_Max_Jerk_Menu(); + break; + #endif + case MOTION_CASE_STEPS: + checkkey = Step; + select_step.reset(); + Draw_Steps_Menu(); + break; + default: break; + } + } + DWIN_UpdateLCD(); +} + +// Advanced Settings +void HMI_AdvSet() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_advset.inc(1 + ADVSET_CASE_TOTAL)) { + if (select_advset.now > MROWS && select_advset.now > index_advset) { + index_advset = select_advset.now; + + // Scroll up and draw a blank bottom line + Scroll_Menu(DWIN_SCROLL_UP); + + //switch (index_advset) { // Redraw last menu items + // default: break; + //} + + } + else { + Move_Highlight(1, select_advset.now + MROWS - index_advset); + } + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_advset.dec()) { + if (select_advset.now < index_advset - MROWS) { + index_advset--; + Scroll_Menu(DWIN_SCROLL_DOWN); + + //switch (index_advset) { // Redraw first menu items + // default: break; + //} + } + else { + Move_Highlight(-1, select_advset.now + MROWS - index_advset); + } + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_advset.now) { + case CASE_BACK: + checkkey = Control; + select_control.set(CONTROL_CASE_ADVSET); + index_control = CONTROL_CASE_ADVSET; + Draw_Control_Menu(); + break; + + #if HAS_HOME_OFFSET + case ADVSET_CASE_HOMEOFF: + checkkey = HomeOff; + select_item.reset(); + HMI_ValueStruct.Home_OffX_scaled = home_offset[X_AXIS] * 10; + HMI_ValueStruct.Home_OffY_scaled = home_offset[Y_AXIS] * 10; + HMI_ValueStruct.Home_OffZ_scaled = home_offset[Z_AXIS] * 10; + Draw_HomeOff_Menu(); + break; + #endif + + #if HAS_ONESTEP_LEVELING + case ADVSET_CASE_PROBEOFF: + checkkey = ProbeOff; + select_item.reset(); + HMI_ValueStruct.Probe_OffX_scaled = probe.offset.x * 10; + HMI_ValueStruct.Probe_OffY_scaled = probe.offset.y * 10; + Draw_ProbeOff_Menu(); + break; + #endif + + #if HAS_HOTEND + case ADVSET_CASE_HEPID: + thermalManager.setTargetHotend(ui.material_preset[0].hotend_temp, 0); + thermalManager.PID_autotune(ui.material_preset[0].hotend_temp, H_E0, 10, true); + break; + #endif + + #if HAS_HEATED_BED + case ADVSET_CASE_BEDPID: + thermalManager.setTargetBed(ui.material_preset[0].bed_temp); + thermalManager.PID_autotune(ui.material_preset[0].bed_temp, H_BED, 10, true); + break; + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + case ADVSET_CASE_PWRLOSSR: + recovery.enable(!recovery.enabled); + Draw_Checkbox_Line(ADVSET_CASE_PWRLOSSR + MROWS - index_advset, recovery.enabled); + break; + #endif + default: break; + } + } + DWIN_UpdateLCD(); +} + +#if HAS_HOME_OFFSET + + // Home Offset + void HMI_HomeOff() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_item.inc(1 + 3)) Move_Highlight(1, select_item.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_item.dec()) Move_Highlight(-1, select_item.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_item.now) { + case CASE_BACK: + checkkey = AdvSet; + select_advset.set(ADVSET_CASE_HOMEOFF); + Draw_AdvancedSettings_Menu(); + break; + case 1: // Home Offset X + checkkey = HomeOffX; + Draw_Edit_Signed_Float3(1, HMI_ValueStruct.Home_OffX_scaled, true); + EncoderRate.enabled = true; + break; + case 2: // Home Offset Y + checkkey = HomeOffY; + Draw_Edit_Signed_Float3(2, HMI_ValueStruct.Home_OffY_scaled, true); + EncoderRate.enabled = true; + break; + case 3: // Home Offset Z + checkkey = HomeOffZ; + Draw_Edit_Signed_Float3(3, HMI_ValueStruct.Home_OffZ_scaled, true); + EncoderRate.enabled = true; + break; + default: break; + } + } + DWIN_UpdateLCD(); + } + + void HMI_HomeOffN(const AxisEnum axis, float &posScaled, const_float_t lo, const_float_t hi) { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (Apply_Encoder(encoder_diffState, posScaled)) { + checkkey = HomeOff; + EncoderRate.enabled = false; + set_home_offset(axis, posScaled / 10); + Draw_Edit_Signed_Float3(select_item.now, posScaled); + return; + } + LIMIT(posScaled, lo, hi); + Draw_Edit_Signed_Float3(select_item.now, posScaled, true); + } + + void HMI_HomeOffX() { HMI_HomeOffN(X_AXIS, HMI_ValueStruct.Home_OffX_scaled, -500, 500); } + void HMI_HomeOffY() { HMI_HomeOffN(Y_AXIS, HMI_ValueStruct.Home_OffY_scaled, -500, 500); } + void HMI_HomeOffZ() { HMI_HomeOffN(Z_AXIS, HMI_ValueStruct.Home_OffZ_scaled, -20, 20); } + +#endif // HAS_HOME_OFFSET + +#if HAS_ONESTEP_LEVELING + + // Probe Offset + void HMI_ProbeOff() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_item.inc(1 + 2)) Move_Highlight(1, select_item.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_item.dec()) Move_Highlight(-1, select_item.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_item.now) { + case CASE_BACK: + checkkey = AdvSet; + select_advset.set(ADVSET_CASE_PROBEOFF); + Draw_AdvancedSettings_Menu(); + break; + case 1: // Probe Offset X + checkkey = ProbeOffX; + Draw_Edit_Signed_Float3(1, HMI_ValueStruct.Probe_OffX_scaled, true); + EncoderRate.enabled = true; + break; + case 2: // Probe Offset Y + checkkey = ProbeOffY; + Draw_Edit_Signed_Float3(2, HMI_ValueStruct.Probe_OffY_scaled, true); + EncoderRate.enabled = true; + break; + } + } + DWIN_UpdateLCD(); + } + + void HMI_ProbeOffN(float &posScaled, float &offset_ref) { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (Apply_Encoder(encoder_diffState, posScaled)) { + checkkey = ProbeOff; + EncoderRate.enabled = false; + offset_ref = posScaled / 10; + Draw_Edit_Signed_Float3(select_item.now, posScaled); + return; + } + LIMIT(posScaled, -500, 500); + Draw_Edit_Signed_Float3(select_item.now, posScaled, true); + } + + void HMI_ProbeOffX() { HMI_ProbeOffN(HMI_ValueStruct.Probe_OffX_scaled, probe.offset.x); } + void HMI_ProbeOffY() { HMI_ProbeOffN(HMI_ValueStruct.Probe_OffY_scaled, probe.offset.y); } + +#endif // HAS_ONESTEP_LEVELING + +// Info +void HMI_Info() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + #if HAS_ONESTEP_LEVELING + checkkey = Control; + select_control.set(CONTROL_CASE_INFO); + Draw_Control_Menu(); + #else + select_page.set(3); + Goto_MainMenu(); + #endif + } + DWIN_UpdateLCD(); +} + +// Tune +void HMI_Tune() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_tune.inc(1 + TUNE_CASE_TOTAL)) { + if (select_tune.now > MROWS && select_tune.now > index_tune) { + index_tune = select_tune.now; + Scroll_Menu(DWIN_SCROLL_UP); + } + else + Move_Highlight(1, select_tune.now + MROWS - index_tune); + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_tune.dec()) { + if (select_tune.now < index_tune - MROWS) { + index_tune--; + Scroll_Menu(DWIN_SCROLL_DOWN); + if (index_tune == MROWS) Draw_Back_First(); + } + else + Move_Highlight(-1, select_tune.now + MROWS - index_tune); + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_tune.now) { + case 0: { // Back + select_print.set(0); + Goto_PrintProcess(); + } + break; + case TUNE_CASE_SPEED: // Print speed + checkkey = PrintSpeed; + HMI_ValueStruct.print_speed = feedrate_percentage; + Draw_Edit_Integer3(TUNE_CASE_SPEED + MROWS - index_tune, HMI_ValueStruct.print_speed, true); + EncoderRate.enabled = true; + break; + #if HAS_HOTEND + case TUNE_CASE_TEMP: // Nozzle temp + checkkey = ETemp; + HMI_ValueStruct.E_Temp = thermalManager.degTargetHotend(0); + Draw_Edit_Integer3(TUNE_CASE_TEMP + MROWS - index_tune, HMI_ValueStruct.E_Temp, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_HEATED_BED + case TUNE_CASE_BED: // Bed temp + checkkey = BedTemp; + HMI_ValueStruct.Bed_Temp = thermalManager.degTargetBed(); + Draw_Edit_Integer3(TUNE_CASE_BED + MROWS - index_tune, HMI_ValueStruct.Bed_Temp, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_FAN + case TUNE_CASE_FAN: // Fan speed + checkkey = FanSpeed; + HMI_ValueStruct.Fan_speed = thermalManager.fan_speed[0]; + Draw_Edit_Integer3(TUNE_CASE_FAN + MROWS - index_tune, HMI_ValueStruct.Fan_speed, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_ZOFFSET_ITEM + case TUNE_CASE_ZOFF: // Z-offset + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + checkkey = Homeoffset; + HMI_ValueStruct.offset_value = BABY_Z_VAR * 100; + Draw_Edit_Signed_Float2(TUNE_CASE_ZOFF + MROWS - index_tune, HMI_ValueStruct.offset_value, true); + EncoderRate.enabled = true; + #else + // Apply workspace offset, making the current position 0,0,0 + queue.inject_P(PSTR("G92 X0 Y0 Z0")); + HMI_AudioFeedback(); + #endif + break; + #endif + default: break; + } + } + DWIN_UpdateLCD(); +} + +#if HAS_PREHEAT + + // PLA Preheat + void HMI_PLAPreheatSetting() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_PLA.inc(1 + PREHEAT_CASE_TOTAL)) Move_Highlight(1, select_PLA.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_PLA.dec()) Move_Highlight(-1, select_PLA.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_PLA.now) { + case CASE_BACK: + checkkey = TemperatureID; + select_temp.now = TEMP_CASE_PLA; + HMI_ValueStruct.show_mode = -1; + Draw_Temperature_Menu(); + break; + #if HAS_HOTEND + case PREHEAT_CASE_TEMP: + checkkey = ETemp; + HMI_ValueStruct.E_Temp = ui.material_preset[0].hotend_temp; + Draw_Edit_Integer3(PREHEAT_CASE_TEMP, ui.material_preset[0].hotend_temp, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_HEATED_BED + case PREHEAT_CASE_BED: + checkkey = BedTemp; + HMI_ValueStruct.Bed_Temp = ui.material_preset[0].bed_temp; + Draw_Edit_Integer3(PREHEAT_CASE_BED, ui.material_preset[0].bed_temp, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_FAN + case PREHEAT_CASE_FAN: + checkkey = FanSpeed; + HMI_ValueStruct.Fan_speed = ui.material_preset[0].fan_speed; + Draw_Edit_Integer3(PREHEAT_CASE_FAN, ui.material_preset[0].fan_speed, true); + EncoderRate.enabled = true; + break; + #endif + #if ENABLED(EEPROM_SETTINGS) + case PREHEAT_CASE_SAVE: { + const bool success = settings.save(); + HMI_AudioFeedback(success); + } break; + #endif + default: break; + } + } + DWIN_UpdateLCD(); + } + + // ABS Preheat + void HMI_ABSPreheatSetting() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_ABS.inc(1 + PREHEAT_CASE_TOTAL)) Move_Highlight(1, select_ABS.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_ABS.dec()) Move_Highlight(-1, select_ABS.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_ABS.now) { + case CASE_BACK: + checkkey = TemperatureID; + select_temp.now = TEMP_CASE_ABS; + HMI_ValueStruct.show_mode = -1; + Draw_Temperature_Menu(); + break; + #if HAS_HOTEND + case PREHEAT_CASE_TEMP: + checkkey = ETemp; + HMI_ValueStruct.E_Temp = ui.material_preset[1].hotend_temp; + Draw_Edit_Integer3(PREHEAT_CASE_TEMP, ui.material_preset[1].hotend_temp, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_HEATED_BED + case PREHEAT_CASE_BED: + checkkey = BedTemp; + HMI_ValueStruct.Bed_Temp = ui.material_preset[1].bed_temp; + Draw_Edit_Integer3(PREHEAT_CASE_BED, ui.material_preset[1].bed_temp, true); + EncoderRate.enabled = true; + break; + #endif + #if HAS_FAN + case PREHEAT_CASE_FAN: + checkkey = FanSpeed; + HMI_ValueStruct.Fan_speed = ui.material_preset[1].fan_speed; + Draw_Edit_Integer3(PREHEAT_CASE_FAN, ui.material_preset[1].fan_speed, true); + EncoderRate.enabled = true; + break; + #endif + #if ENABLED(EEPROM_SETTINGS) + case PREHEAT_CASE_SAVE: { + const bool success = settings.save(); + HMI_AudioFeedback(success); + } break; + #endif + default: break; + } + } + DWIN_UpdateLCD(); + } + +#endif + +// Max Speed +void HMI_MaxSpeed() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_speed.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_speed.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_speed.dec()) Move_Highlight(-1, select_speed.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (WITHIN(select_speed.now, 1, 4)) { + checkkey = MaxSpeed_value; + HMI_flag.feedspeed_axis = AxisEnum(select_speed.now - 1); + HMI_ValueStruct.Max_Feedspeed = planner.settings.max_feedrate_mm_s[HMI_flag.feedspeed_axis]; + Draw_Edit_Integer4(select_speed.now, HMI_ValueStruct.Max_Feedspeed, true); + EncoderRate.enabled = true; + } + else { // Back + checkkey = Motion; + select_motion.now = MOTION_CASE_RATE; + Draw_Motion_Menu(); + } + } + DWIN_UpdateLCD(); +} + +// Max Acceleration +void HMI_MaxAcceleration() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_acc.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_acc.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_acc.dec()) Move_Highlight(-1, select_acc.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (WITHIN(select_acc.now, 1, 4)) { + checkkey = MaxAcceleration_value; + HMI_flag.acc_axis = AxisEnum(select_acc.now - 1); + HMI_ValueStruct.Max_Acceleration = planner.settings.max_acceleration_mm_per_s2[HMI_flag.acc_axis]; + Draw_Edit_Integer4(select_acc.now, HMI_ValueStruct.Max_Acceleration, true); + EncoderRate.enabled = true; + } + else { // Back + checkkey = Motion; + select_motion.now = MOTION_CASE_ACCEL; + Draw_Motion_Menu(); + } + } + DWIN_UpdateLCD(); +} + +#if HAS_CLASSIC_JERK + // Max Jerk + void HMI_MaxJerk() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_jerk.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_jerk.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_jerk.dec()) Move_Highlight(-1, select_jerk.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (WITHIN(select_jerk.now, 1, 4)) { + checkkey = MaxJerk_value; + HMI_flag.jerk_axis = AxisEnum(select_jerk.now - 1); + HMI_ValueStruct.Max_Jerk_scaled = planner.max_jerk[HMI_flag.jerk_axis] * MINUNITMULT; + Draw_Edit_Float3(select_jerk.now, HMI_ValueStruct.Max_Jerk_scaled, true); + EncoderRate.enabled = true; + } + else { // Back + checkkey = Motion; + select_motion.now = MOTION_CASE_JERK; + Draw_Motion_Menu(); + } + } + DWIN_UpdateLCD(); + } +#endif // HAS_CLASSIC_JERK + +// Step +void HMI_Step() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_step.inc(1 + 3 + ENABLED(HAS_HOTEND))) Move_Highlight(1, select_step.now); + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_step.dec()) Move_Highlight(-1, select_step.now); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (WITHIN(select_step.now, 1, 4)) { + checkkey = Step_value; + HMI_flag.step_axis = AxisEnum(select_step.now - 1); + HMI_ValueStruct.Max_Step_scaled = planner.settings.axis_steps_per_mm[HMI_flag.step_axis] * MINUNITMULT; + Draw_Edit_Float3(select_step.now, HMI_ValueStruct.Max_Step_scaled, true); + EncoderRate.enabled = true; + } + else { // Back + checkkey = Motion; + select_motion.now = MOTION_CASE_STEPS; + Draw_Motion_Menu(); + } + } + DWIN_UpdateLCD(); +} + +void HMI_Init() { + HMI_SDCardInit(); + + for (uint16_t t = 0; t <= 100; t += 2) { + DWIN_ICON_Show(ICON, ICON_Bar, 15, 260); + DWIN_Draw_Rectangle(1, Color_Bg_Black, 15 + t * 242 / 100, 260, 257, 280); + DWIN_UpdateLCD(); + delay(20); + } + + HMI_SetLanguage(); +} + +void DWIN_Update() { + EachMomentUpdate(); // Status update + HMI_SDCardUpdate(); // SD card update + DWIN_HandleScreen(); // Rotary encoder update +} + +void EachMomentUpdate() { + static millis_t next_var_update_ms = 0, next_rts_update_ms = 0; + + const millis_t ms = millis(); + if (ELAPSED(ms, next_var_update_ms)) { + next_var_update_ms = ms + DWIN_VAR_UPDATE_INTERVAL; + update_variable(); + } + + if (PENDING(ms, next_rts_update_ms)) return; + next_rts_update_ms = ms + DWIN_SCROLL_UPDATE_INTERVAL; + + if (checkkey == PrintProcess) { + // if print done + if (HMI_flag.print_finish && !HMI_flag.done_confirm_flag) { + HMI_flag.print_finish = false; + HMI_flag.done_confirm_flag = true; + + TERN_(POWER_LOSS_RECOVERY, recovery.cancel()); + + planner.finish_and_disable(); + + // show percent bar and value + _card_percent = 0; + Draw_Print_ProgressBar(); + + // show print done confirm + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 250, DWIN_WIDTH - 1, STATUS_Y); + DWIN_ICON_Show(ICON, HMI_IsChinese() ? ICON_Confirm_C : ICON_Confirm_E, 86, 283); + } + else if (HMI_flag.pause_flag != printingIsPaused()) { + // print status update + HMI_flag.pause_flag = printingIsPaused(); + ICON_ResumeOrPause(); + } + } + + // pause after homing + if (HMI_flag.pause_action && printingIsPaused() && !planner.has_blocks_queued()) { + HMI_flag.pause_action = false; + #if ENABLED(PAUSE_HEAT) + TERN_(HAS_HOTEND, resume_hotend_temp = thermalManager.degTargetHotend(0)); + TERN_(HAS_HEATED_BED, resume_bed_temp = thermalManager.degTargetBed()); + thermalManager.disable_all_heaters(); + #endif + queue.inject_P(PSTR("G1 F1200 X0 Y0")); + } + + if (card.isPrinting() && checkkey == PrintProcess) { // print process + const uint8_t card_pct = card.percentDone(); + static uint8_t last_cardpercentValue = 101; + if (last_cardpercentValue != card_pct) { // print percent + last_cardpercentValue = card_pct; + if (card_pct) { + _card_percent = card_pct; + Draw_Print_ProgressBar(); + } + } + + duration_t elapsed = print_job_timer.duration(); // print timer + + // Print time so far + static uint16_t last_Printtime = 0; + const uint16_t min = (elapsed.value % 3600) / 60; + if (last_Printtime != min) { // 1 minute update + last_Printtime = min; + Draw_Print_ProgressElapsed(); + } + + // Estimate remaining time every 20 seconds + static millis_t next_remain_time_update = 0; + if (_card_percent > 1 && ELAPSED(ms, next_remain_time_update) && !HMI_flag.heat_flag) { + _remain_time = (elapsed.value - dwin_heat_time) / (_card_percent * 0.01f) - (elapsed.value - dwin_heat_time); + next_remain_time_update += DWIN_REMAIN_TIME_UPDATE_INTERVAL; + Draw_Print_ProgressRemain(); + } + } + else if (dwin_abort_flag && !HMI_flag.home_flag) { // Print Stop + dwin_abort_flag = false; + HMI_ValueStruct.print_speed = feedrate_percentage = 100; + dwin_zoffset = BABY_Z_VAR; + select_page.set(0); + Goto_MainMenu(); + } + #if ENABLED(POWER_LOSS_RECOVERY) + else if (DWIN_lcd_sd_status && recovery.dwin_flag) { // resume print before power off + static bool recovery_flag = false; + + recovery.dwin_flag = false; + recovery_flag = true; + + auto update_selection = [&](const bool sel) { + HMI_flag.select_flag = sel; + const uint16_t c1 = sel ? Color_Bg_Window : Select_Color; + DWIN_Draw_Rectangle(0, c1, 25, 306, 126, 345); + DWIN_Draw_Rectangle(0, c1, 24, 305, 127, 346); + const uint16_t c2 = sel ? Select_Color : Color_Bg_Window; + DWIN_Draw_Rectangle(0, c2, 145, 306, 246, 345); + DWIN_Draw_Rectangle(0, c2, 144, 305, 247, 346); + }; + + Popup_Window_Resume(); + update_selection(true); + + char * const name = card.longest_filename(); + const int8_t npos = _MAX(0U, DWIN_WIDTH - strlen(name) * (MENU_CHR_W)) / 2; + DWIN_Draw_String(true, font8x16, Popup_Text_Color, Color_Bg_Window, npos, 252, name); + DWIN_UpdateLCD(); + + while (recovery_flag) { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState != ENCODER_DIFF_NO) { + if (encoder_diffState == ENCODER_DIFF_ENTER) { + recovery_flag = false; + if (HMI_flag.select_flag) break; + TERN_(POWER_LOSS_RECOVERY, queue.inject_P(PSTR("M1000C"))); + HMI_StartFrame(true); + return; + } + else + update_selection(encoder_diffState == ENCODER_DIFF_CW); + + DWIN_UpdateLCD(); + } + } + + select_print.set(0); + HMI_ValueStruct.show_mode = 0; + queue.inject_P(PSTR("M1000")); + Goto_PrintProcess(); + Draw_Status_Area(true); + } + #endif // POWER_LOSS_RECOVERY + + DWIN_UpdateLCD(); +} + +void DWIN_HandleScreen() { + switch (checkkey) { + case MainMenu: HMI_MainMenu(); break; + case SelectFile: HMI_SelectFile(); break; + case Prepare: HMI_Prepare(); break; + case Control: HMI_Control(); break; + case Leveling: break; + case PrintProcess: HMI_Printing(); break; + case Print_window: HMI_PauseOrStop(); break; + case AxisMove: HMI_AxisMove(); break; + case TemperatureID: HMI_Temperature(); break; + case Motion: HMI_Motion(); break; + case AdvSet: HMI_AdvSet(); break; + #if HAS_HOME_OFFSET + case HomeOff: HMI_HomeOff(); break; + case HomeOffX: HMI_HomeOffX(); break; + case HomeOffY: HMI_HomeOffY(); break; + case HomeOffZ: HMI_HomeOffZ(); break; + #endif + #if HAS_ONESTEP_LEVELING + case ProbeOff: HMI_ProbeOff(); break; + case ProbeOffX: HMI_ProbeOffX(); break; + case ProbeOffY: HMI_ProbeOffY(); break; + #endif + case Info: HMI_Info(); break; + case Tune: HMI_Tune(); break; + #if HAS_PREHEAT + case PLAPreheat: HMI_PLAPreheatSetting(); break; + case ABSPreheat: HMI_ABSPreheatSetting(); break; + #endif + case MaxSpeed: HMI_MaxSpeed(); break; + case MaxAcceleration: HMI_MaxAcceleration(); break; + #if HAS_CLASSIC_JERK + case MaxJerk: HMI_MaxJerk(); break; + #endif + case Step: HMI_Step(); break; + case Move_X: HMI_Move_X(); break; + case Move_Y: HMI_Move_Y(); break; + case Move_Z: HMI_Move_Z(); break; + #if HAS_HOTEND + case Extruder: HMI_Move_E(); break; + case ETemp: HMI_ETemp(); break; + #endif + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + case Homeoffset: HMI_Zoffset(); break; + #endif + #if HAS_HEATED_BED + case BedTemp: HMI_BedTemp(); break; + #endif + #if HAS_PREHEAT && HAS_FAN + case FanSpeed: HMI_FanSpeed(); break; + #endif + case PrintSpeed: HMI_PrintSpeed(); break; + case MaxSpeed_value: HMI_MaxFeedspeedXYZE(); break; + case MaxAcceleration_value: HMI_MaxAccelerationXYZE(); break; + #if HAS_CLASSIC_JERK + case MaxJerk_value: HMI_MaxJerkXYZE(); break; + #endif + case Step_value: HMI_StepXYZE(); break; + default: break; + } +} + +void DWIN_CompletedHoming() { + HMI_flag.home_flag = false; + dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); + if (checkkey == Last_Prepare) { + checkkey = Prepare; + select_prepare.now = PREPARE_CASE_HOME; + index_prepare = MROWS; + Draw_Prepare_Menu(); + } + else if (checkkey == Back_Main) { + HMI_ValueStruct.print_speed = feedrate_percentage = 100; + planner.finish_and_disable(); + Goto_MainMenu(); + } +} + +void DWIN_CompletedLeveling() { + if (checkkey == Leveling) Goto_MainMenu(); +} + +void DWIN_StatusChanged(const char *text) { + DWIN_Draw_Rectangle(1, Color_Bg_Blue, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 24); + const int8_t x = _MAX(0U, DWIN_WIDTH - strlen_P(text) * MENU_CHR_W) / 2; + DWIN_Draw_String(false, font8x16, Color_White, Color_Bg_Blue, x, STATUS_Y + 3, F(text)); + DWIN_UpdateLCD(); +} + +void DWIN_StatusChanged_P(PGM_P const pstr) { + char str[strlen_P((const char*)pstr) + 1]; + strcpy_P(str, (const char*)pstr); + DWIN_StatusChanged(str); +} + +#endif // DWIN_CREALITY_LCD diff --git a/Marlin/src/lcd/e3v2/creality/dwin.h b/Marlin/src/lcd/e3v2/creality/dwin.h new file mode 100644 index 000000000000..d4afe46a7d36 --- /dev/null +++ b/Marlin/src/lcd/e3v2/creality/dwin.h @@ -0,0 +1,253 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN by Creality3D + */ + +#include "dwin_lcd.h" +#include "../common/encoder.h" +#include "../../../libs/BL24CXX.h" + +#include "../../../inc/MarlinConfigPre.h" + +#if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_FAN) && PREHEAT_COUNT + #define HAS_PREHEAT 1 + #if PREHEAT_COUNT < 2 + #error "Creality DWIN requires two material preheat presets." + #endif +#endif + +enum processID : uint8_t { + // Process ID + MainMenu, + SelectFile, + Prepare, + Control, + Leveling, + PrintProcess, + AxisMove, + TemperatureID, + Motion, + Info, + Tune, + #if HAS_PREHEAT + PLAPreheat, + ABSPreheat, + #endif + MaxSpeed, + MaxSpeed_value, + MaxAcceleration, + MaxAcceleration_value, + MaxJerk, + MaxJerk_value, + Step, + Step_value, + HomeOff, + HomeOffX, + HomeOffY, + HomeOffZ, + + // Last Process ID + Last_Prepare, + + // Advance Settings + AdvSet, + ProbeOff, + ProbeOffX, + ProbeOffY, + + // Back Process ID + Back_Main, + Back_Print, + + // Date variable ID + Move_X, + Move_Y, + Move_Z, + #if HAS_HOTEND + Extruder, + ETemp, + #endif + Homeoffset, + #if HAS_HEATED_BED + BedTemp, + #endif + #if HAS_FAN + FanSpeed, + #endif + PrintSpeed, + + // Window ID + Print_window, + Popup_Window +}; + +extern uint8_t checkkey; +extern float zprobe_zoffset; +extern char print_filename[16]; + +extern millis_t dwin_heat_time; + +typedef struct { + #if HAS_HOTEND + celsius_t E_Temp = 0; + #endif + #if HAS_HEATED_BED + celsius_t Bed_Temp = 0; + #endif + #if HAS_FAN + int16_t Fan_speed = 0; + #endif + int16_t print_speed = 100; + float Max_Feedspeed = 0; + float Max_Acceleration = 0; + float Max_Jerk_scaled = 0; + float Max_Step_scaled = 0; + float Move_X_scaled = 0; + float Move_Y_scaled = 0; + float Move_Z_scaled = 0; + #if HAS_HOTEND + float Move_E_scaled = 0; + #endif + float offset_value = 0; + int8_t show_mode = 0; // -1: Temperature control 0: Printing temperature + float Home_OffX_scaled = 0; + float Home_OffY_scaled = 0; + float Home_OffZ_scaled = 0; + float Probe_OffX_scaled = 0; + float Probe_OffY_scaled = 0; +} HMI_value_t; + +#define DWIN_CHINESE 123 +#define DWIN_ENGLISH 0 + +typedef struct { + uint8_t language; + bool pause_flag:1; // printing is paused + bool pause_action:1; // flag a pause action + bool print_finish:1; // print was finished + bool select_flag:1; // Popup button selected + bool home_flag:1; // homing in course + bool heat_flag:1; // 0: heating done 1: during heating + bool done_confirm_flag:1; + #if ENABLED(PREVENT_COLD_EXTRUSION) + bool cold_flag:1; + #endif + AxisEnum feedspeed_axis, acc_axis, jerk_axis, step_axis; +} HMI_flag_t; + +extern HMI_value_t HMI_ValueStruct; +extern HMI_flag_t HMI_flag; + +#if HAS_HOTEND || HAS_HEATED_BED + // Popup message window + void DWIN_Popup_Temperature(const bool toohigh); +#endif + +#if HAS_HOTEND + void Popup_Window_ETempTooLow(); +#endif + +void Popup_Window_Resume(); +void Popup_Window_Home(const bool parking=false); +void Popup_Window_Leveling(); + +void Goto_PrintProcess(); +void Goto_MainMenu(); + +// Variable control +void HMI_Move_X(); +void HMI_Move_Y(); +void HMI_Move_Z(); +void HMI_Move_E(); + +void HMI_Zoffset(); + +#if HAS_HOTEND + void HMI_ETemp(); +#endif +#if HAS_HEATED_BED + void HMI_BedTemp(); +#endif +#if HAS_FAN + void HMI_FanSpeed(); +#endif + +void HMI_PrintSpeed(); + +void HMI_MaxFeedspeedXYZE(); +void HMI_MaxAccelerationXYZE(); +void HMI_MaxJerkXYZE(); +void HMI_StepXYZE(); +void HMI_SetLanguageCache(); + +void update_variable(); +void DWIN_Draw_Signed_Float(uint8_t size, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, long value); + +// SD Card +void HMI_SDCardInit(); +void HMI_SDCardUpdate(); + +// Main Process +void Icon_print(bool value); +void Icon_control(bool value); +void Icon_temperature(bool value); +void Icon_leveling(bool value); + +// Other +void Draw_Status_Area(const bool with_update); // Status Area +void HMI_StartFrame(const bool with_update); // Prepare the menu view +void HMI_MainMenu(); // Main process screen +void HMI_SelectFile(); // File page +void HMI_Printing(); // Print page +void HMI_Prepare(); // Prepare page +void HMI_Control(); // Control page +void HMI_Leveling(); // Level the page +void HMI_AxisMove(); // Axis movement menu +void HMI_Temperature(); // Temperature menu +void HMI_Motion(); // Sports menu +void HMI_Info(); // Information menu +void HMI_Tune(); // Adjust the menu + +#if HAS_PREHEAT + void HMI_PLAPreheatSetting(); // PLA warm-up setting + void HMI_ABSPreheatSetting(); // ABS warm-up setting +#endif + +void HMI_MaxSpeed(); // Maximum speed submenu +void HMI_MaxAcceleration(); // Maximum acceleration submenu +void HMI_MaxJerk(); // Maximum jerk speed submenu +void HMI_Step(); // Transmission ratio + +void HMI_Init(); +void DWIN_Update(); +void EachMomentUpdate(); +void DWIN_HandleScreen(); +void DWIN_StatusChanged(const char *text); +void DWIN_StatusChanged_P(PGM_P const pstr); + +inline void DWIN_StartHoming() { HMI_flag.home_flag = true; } + +void DWIN_CompletedHoming(); +void DWIN_CompletedLeveling(); diff --git a/Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp new file mode 100644 index 000000000000..fee22932d2e5 --- /dev/null +++ b/Marlin/src/lcd/e3v2/creality/dwin_lcd.cpp @@ -0,0 +1,83 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/******************************************************************************** + * @file lcd/e3v2/creality/dwin_lcd.cpp + * @author LEO / Creality3D + * @date 2019/07/18 + * @version 2.0.1 + * @brief DWIN screen control functions + ********************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD) + +#include "../../../inc/MarlinConfig.h" + +#include "dwin_lcd.h" + +//#define DEBUG_OUT 1 +#include "../../../core/debug_out.h" + +/*-------------------------------------- System variable function --------------------------------------*/ + +void DWIN_Startup() { + DEBUG_ECHOPGM("\r\nDWIN handshake "); + delay(750); // Delay here or init later in the boot process + if (DWIN_Handshake()) DEBUG_ECHOLNPGM("ok."); else DEBUG_ECHOLNPGM("error."); + DWIN_Frame_SetDir(1); + #if DISABLED(SHOW_BOOTSCREEN) + DWIN_Frame_Clear(Color_Bg_Black); // MarlinUI handles the bootscreen so just clear here + #endif + DWIN_UpdateLCD(); +} + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Draw an Icon +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { + DWIN_ICON_Show(true, false, false, libID, picID, x, y); +} + +// Copy area from virtual display area to current screen +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x27); + DWIN_Byte(i, 0x80 | cacheID); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +#endif // DWIN_CREALITY_LCD diff --git a/Marlin/src/lcd/e3v2/creality/dwin_lcd.h b/Marlin/src/lcd/e3v2/creality/dwin_lcd.h new file mode 100644 index 000000000000..b37a65977c5c --- /dev/null +++ b/Marlin/src/lcd/e3v2/creality/dwin_lcd.h @@ -0,0 +1,47 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/******************************************************************************** + * @file dwin_lcd.h + * @author LEO / Creality3D + * @date 2019/07/18 + * @version 2.0.1 + * @brief 迪文屏控制操作函数 + ********************************************************************************/ + +#include "../common/dwin_api.h" +#include "../common/dwin_set.h" +#include "../common/dwin_font.h" +#include "../common/dwin_color.h" + +#define DWIN_FONT_MENU font10x20 +#define DWIN_FONT_STAT font10x20 +#define DWIN_FONT_HEAD font10x20 +#define DWIN_FONT_ALERT font14x28 + +// Copy area from virtual display area to current screen +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp new file mode 100644 index 000000000000..065dce713b6a --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.cpp @@ -0,0 +1,3655 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.3 + * Date: 2021/09/10 + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + +#include "dwin.h" + +#include "../../fontutils.h" +#include "../../marlinui.h" + +#include "../../../sd/cardreader.h" + +#include "../../../MarlinCore.h" +#include "../../../core/serial.h" +#include "../../../core/macros.h" + +#include "../../../module/temperature.h" +#include "../../../module/printcounter.h" +#include "../../../module/motion.h" +#include "../../../module/planner.h" + +#include "../../../gcode/gcode.h" +#include "../../../gcode/queue.h" + +#if HAS_FILAMENT_SENSOR + #include "../../../feature/runout.h" +#endif + +#if ENABLED(EEPROM_SETTINGS) + #include "../../../module/settings.h" +#endif + +#if ENABLED(HOST_ACTION_COMMANDS) + #include "../../../feature/host_actions.h" +#endif + +#if HAS_MESH || HAS_ONESTEP_LEVELING + #include "../../../feature/bedlevel/bedlevel.h" +#endif + +#if HAS_BED_PROBE + #include "../../../module/probe.h" +#endif + +#if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + #include "../../../feature/babystep.h" +#endif + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../feature/powerloss.h" +#endif + +#if HAS_MESH + #include "meshviewer.h" +#endif + +#include +#include +#include + +#ifndef MACHINE_SIZE + #define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS) +#endif + +#include "lockscreen.h" + +#ifndef CORP_WEBSITE + #define CORP_WEBSITE WEBSITE_URL +#endif + +#define PAUSE_HEAT + +#define MENU_CHAR_LIMIT 24 + +// Print speed limit +#define MIN_PRINT_SPEED 10 +#define MAX_PRINT_SPEED 999 + +// Print flow limit +#define MIN_PRINT_FLOW 10 +#define MAX_PRINT_FLOW 299 + +// Load and Unload limits +#define MAX_LOAD_UNLOAD 500 + +// Feedspeed limit (max feedspeed = DEFAULT_MAX_FEEDRATE * 2) +#define MIN_MAXFEEDSPEED 1 +#define MIN_MAXACCELERATION 1 +#define MIN_MAXJERK 0.1 +#define MIN_STEP 1 +#define MAX_STEP 999.9 + +// Extruder's temperature limits +#define MIN_ETEMP HEATER_0_MINTEMP +#define MAX_ETEMP (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT) + +#define FEEDRATE_E (60) + +// Minimum unit (0.1) : multiple (10) +#define UNITFDIGITS 1 +#define MINUNITMULT POW(10, UNITFDIGITS) + +#define ENCODER_WAIT_MS 20 +#define DWIN_VAR_UPDATE_INTERVAL 1024 +#define DWIN_SCROLL_UPDATE_INTERVAL SEC_TO_MS(2) +#define DWIN_REMAIN_TIME_UPDATE_INTERVAL SEC_TO_MS(20) + +#define BABY_Z_VAR TERN(HAS_BED_PROBE, probe.offset.z, dwin_zoffset) + +// Structs +HMI_value_t HMI_value; +HMI_flag_t HMI_flag{0}; +HMI_data_t HMI_data; + +millis_t dwin_heat_time = 0; + +uint8_t checkkey = MainMenu, last_checkkey = MainMenu; + +enum SelectItem : uint8_t { + PAGE_PRINT = 0, + PAGE_PREPARE, + PAGE_CONTROL, + PAGE_INFO_LEVELING, + PAGE_COUNT, + + PRINT_SETUP = 0, + PRINT_PAUSE_RESUME, + PRINT_STOP, + PRINT_COUNT +}; + +typedef struct { + uint8_t now, last; + void set(uint8_t v) { now = last = v; } + void reset() { set(0); } + bool changed() { bool c = (now != last); if (c) last = now; return c; } + bool dec() { if (now) now--; return changed(); } + bool inc(uint8_t v) { if (now < (v - 1)) now++; else now = (v - 1); return changed(); } +} select_t; + +select_t select_page{0}, select_file{0}, select_print{0}; +uint8_t index_file = MROWS; + +bool dwin_abort_flag = false; // Flag to reset feedrate, return to Home + +constexpr float default_max_feedrate[] = DEFAULT_MAX_FEEDRATE; +constexpr float default_max_acceleration[] = DEFAULT_MAX_ACCELERATION; + +#if HAS_CLASSIC_JERK + constexpr float default_max_jerk[] = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK }; +#endif + +static uint8_t _percent_done = 0; +static uint32_t _remain_time = 0; + +// Additional Aux Host Support +static bool sdprint = false; + +#if ENABLED(PAUSE_HEAT) + #if HAS_HOTEND + celsius_t resume_hotend_temp = 0; + #endif + #if HAS_HEATED_BED + celsius_t resume_bed_temp = 0; + #endif + #if HAS_FAN + uint16_t resume_fan = 0; + #endif +#endif + +#if HAS_ZOFFSET_ITEM + float dwin_zoffset = 0, last_zoffset = 0; +#endif + +#if HAS_HOTEND + float last_E = 0; +#endif + +// New menu system pointers +MenuClass *PrepareMenu = nullptr; +MenuClass *LevBedMenu = nullptr; +MenuClass *MoveMenu = nullptr; +MenuClass *ControlMenu = nullptr; +MenuClass *AdvancedSettings = nullptr; +#if HAS_HOME_OFFSET + MenuClass *HomeOffMenu = nullptr; +#endif +#if HAS_BED_PROBE + MenuClass *ProbeSetMenu = nullptr; +#endif +MenuClass *FilSetMenu = nullptr; +MenuClass *SelectColorMenu = nullptr; +MenuClass *GetColorMenu = nullptr; +MenuClass *TuneMenu = nullptr; +MenuClass *MotionMenu = nullptr; +MenuClass *FilamentMenu = nullptr; +#if ENABLED(MESH_BED_LEVELING) + MenuClass *ManualMesh = nullptr; +#endif +#if HAS_HOTEND + MenuClass *PreheatMenu = nullptr; +#endif +MenuClass *TemperatureMenu = nullptr; +MenuClass *MaxSpeedMenu = nullptr; +MenuClass *MaxAccelMenu = nullptr; +MenuClass *MaxJerkMenu = nullptr; +MenuClass *StepsMenu = nullptr; +MenuClass *HotendPIDMenu = nullptr; +MenuClass *BedPIDMenu = nullptr; +#if EITHER(HAS_BED_PROBE, BABYSTEPPING) + MenuClass *ZOffsetWizMenu = nullptr; +#endif + +// Updatable menuitems pointers +MenuItemClass *HotendTargetItem = nullptr; +MenuItemClass *BedTargetItem = nullptr; +MenuItemClass *FanSpeedItem = nullptr; +MenuItemClass *MMeshMoveZItem = nullptr; + +#define DWIN_LANGUAGE_EEPROM_ADDRESS 0x01 // Between 0x01 and 0x63 (EEPROM_OFFSET-1) + // BL24CXX::check() uses 0x00 + +inline bool HMI_IsChinese() { return HMI_flag.language == DWIN_CHINESE; } + +void HMI_SetLanguageCache() { + DWIN_JPG_CacheTo1(HMI_IsChinese() ? Language_Chinese : Language_English); +} + +void HMI_SetLanguage() { + #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + BL24CXX::read(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); + #endif + HMI_SetLanguageCache(); +} + +void HMI_ToggleLanguage() { + HMI_flag.language = HMI_IsChinese() ? DWIN_ENGLISH : DWIN_CHINESE; + HMI_SetLanguageCache(); + #if BOTH(EEPROM_SETTINGS, IIC_BL24CXX_EEPROM) + BL24CXX::write(DWIN_LANGUAGE_EEPROM_ADDRESS, (uint8_t*)&HMI_flag.language, sizeof(HMI_flag.language)); + #endif +} + +typedef struct { uint16_t x, y[2], w, h; } text_info_t; + +void ICON_Button(const bool here, const int iconid, const frame_rect_t &ico, const text_info_t (&txt)[2]) { + const bool cn = HMI_IsChinese(); + DWIN_ICON_Show(true, false, false, ICON, iconid + here, ico.x, ico.y); + if (here) DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, ico.x, ico.y, ico.x + ico.w - 1, ico.y + ico.h - 1); + DWIN_Frame_AreaCopy(1, txt[cn].x, txt[cn].y[here], txt[cn].x + txt[cn].w - 1, txt[cn].y[here] + txt[cn].h - 1, ico.x + (ico.w - txt[cn].w) / 2, (ico.y + ico.h - 28) - txt[cn].h/2); +} + +// +// Main Menu: "Print" +// +void ICON_Print() { + constexpr frame_rect_t ico = { 17, 110, 110, 100 }; + constexpr text_info_t txt[2] = { + { 1, { 417, 449 }, 30, 14 }, + { 1, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_PRINT, ICON_Print_0, ico, txt); +} + +// +// Main Menu: "Prepare" +// +void ICON_Prepare() { + constexpr frame_rect_t ico = { 145, 110, 110, 100 }; + constexpr text_info_t txt[2] = { + { 33, { 417, 449 }, 51, 14 }, + { 31, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_PREPARE, ICON_Prepare_0, ico, txt); +} + +// +// Main Menu: "Control" +// +void ICON_Control() { + constexpr frame_rect_t ico = { 17, 226, 110, 100 }; + constexpr text_info_t txt[2] = { + { 85, { 417, 449 }, 46, 14 }, + { 61, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_CONTROL, ICON_Control_0, ico, txt); +} + +// +// Main Menu: "Info" +// +void ICON_StartInfo() { + constexpr frame_rect_t ico = { 145, 226, 110, 100 }; + constexpr text_info_t txt[2] = { + { 133, { 417, 449 }, 23, 14 }, + { 91, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Info_0, ico, txt); +} + +// +// Main Menu: "Level" +// +void ICON_Leveling() { + constexpr frame_rect_t ico = { 145, 226, 110, 100 }; + constexpr text_info_t txt[2] = { + { 88, { 433, 464 }, 36, 14 }, + { 211, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_page.now == PAGE_INFO_LEVELING, ICON_Leveling_0, ico, txt); +} + +// +// Printing: "Tune" +// +void ICON_Tune() { + constexpr frame_rect_t ico = { 8, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 0, { 433, 464 }, 32, 14 }, + { 121, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == PRINT_SETUP, ICON_Setup_0, ico, txt); +} + +// +// Printing: "Pause" +// +void ICON_Pause() { + constexpr frame_rect_t ico = { 96, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 157, { 417, 449 }, 39, 14 }, + { 181, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Pause_0, ico, txt); +} + +// +// Printing: "Resume" +// +void ICON_Resume() { + constexpr frame_rect_t ico = { 96, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 33, { 433, 464 }, 53, 14 }, + { 1, { 405, 447 }, 27, 15 } + }; + ICON_Button(select_print.now == PRINT_PAUSE_RESUME, ICON_Continue_0, ico, txt); +} + +// +// Printing: "Stop" +// +void ICON_Stop() { + constexpr frame_rect_t ico = { 184, 232, 80, 100 }; + constexpr text_info_t txt[2] = { + { 196, { 417, 449 }, 29, 14 }, + { 151, { 405, 447 }, 27, 12 } + }; + ICON_Button(select_print.now == PRINT_STOP, ICON_Stop_0, ico, txt); +} + +void Draw_Menu_Cursor(const uint8_t line) { + DWIN_Draw_Rectangle(1, HMI_data.Cursor_color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); +} + +void Erase_Menu_Cursor(const uint8_t line) { + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, MBASE(line) - 18, 14, MBASE(line + 1) - 20); +} + +void Move_Highlight(const int16_t from, const uint16_t newline) { + Erase_Menu_Cursor(newline - from); + Draw_Menu_Cursor(newline); +} + +void Add_Menu_Line() { + Move_Highlight(1, MROWS); + DWIN_Draw_Line(HMI_data.SplitLine_Color, 16, MBASE(MROWS + 1) - 20, 256, MBASE(MROWS + 1) - 19); +} + +void Scroll_Menu(const uint8_t dir) { + DWIN_Frame_AreaMove(1, dir, MLINE, HMI_data.Background_Color, 0, 31, DWIN_WIDTH, 349); + switch (dir) { + case DWIN_SCROLL_DOWN: Move_Highlight(-1, 0); break; + case DWIN_SCROLL_UP: Add_Menu_Line(); break; + } +} + +inline uint16_t nr_sd_menu_items() { + return card.get_num_Files() + !card.flag.workDirIsRoot; +} + +void Erase_Menu_Text(const uint8_t line) { + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, LBLX, MBASE(line) - 14, 271, MBASE(line) + 28); +} + +void Draw_Menu_Line(const uint8_t line, const uint8_t icon=0, const char * const label=nullptr, bool more=false) { + if (label) DWINUI::Draw_String(LBLX, MBASE(line) - 1, (char*)label); + if (icon) DWINUI::Draw_Icon(icon, 26, MBASE(line) - 3); + if (more) DWINUI::Draw_Icon(ICON_More, 226, MBASE(line) - 3); + DWIN_Draw_Line(HMI_data.SplitLine_Color, 16, MBASE(line) + 33, 256, MBASE(line) + 33); +} + +void Draw_Chkb_Line(const uint8_t line, const bool checked) { + DWINUI::Draw_Checkbox(HMI_data.Text_Color, HMI_data.Background_Color, VALX + 16, MBASE(line) - 1, checked); +} + +void Draw_Menu_IntValue(uint16_t bcolor, const uint8_t line, uint8_t iNum, const uint16_t value=0) { + DWINUI::Draw_Int(HMI_data.Text_Color, bcolor, iNum , VALX, MBASE(line) - 1, value); +} + +// The "Back" label is always on the first line +void Draw_Back_Label() { + if (HMI_IsChinese()) + DWIN_Frame_AreaCopy(1, 129, 72, 156, 84, LBLX, MBASE(0)); + else + DWIN_Frame_AreaCopy(1, 223, 179, 254, 189, LBLX, MBASE(0)); +} + +// Draw "Back" line at the top +void Draw_Back_First(const bool is_sel=true) { + Draw_Menu_Line(0, ICON_Back); + Draw_Back_Label(); + if (is_sel) Draw_Menu_Cursor(0); +} + +inline EncoderState get_encoder_state() { + static millis_t Encoder_ms = 0; + const millis_t ms = millis(); + if (PENDING(ms, Encoder_ms)) return ENCODER_DIFF_NO; + const EncoderState state = Encoder_ReceiveAnalyze(); + if (state != ENCODER_DIFF_NO) Encoder_ms = ms + ENCODER_WAIT_MS; + return state; +} + +template +inline bool Apply_Encoder(const EncoderState &encoder_diffState, T &valref) { + if (encoder_diffState == ENCODER_DIFF_CW) + valref += EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_CCW) + valref -= EncoderRate.encoderMoveValue; + return encoder_diffState == ENCODER_DIFF_ENTER; +} + +// +// Draw Popup Windows +// + +inline void Draw_Popup_Bkgd_60() { + DWIN_Draw_Rectangle(1, HMI_data.PopupBg_color, 14, 60, 258, 330); + DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, 14, 60, 258, 330); +} + +inline void Draw_Popup_Bkgd_105() { + DWIN_Draw_Rectangle(1, HMI_data.PopupBg_color, 14, 105, 258, 374); + DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, 14, 105, 258, 374); +} + +void Clear_Popup_Area() { + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 31, DWIN_WIDTH, DWIN_HEIGHT); +} + +void DWIN_Draw_Popup1(const uint8_t icon) { + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd_60(); + if (icon) DWINUI::Draw_Icon(icon, 101, 105); +} +void DWIN_Draw_Popup2(FSTR_P const fmsg2, uint8_t button) { + if (fmsg2) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 240, fmsg2); + if (button) DWINUI::Draw_Icon(button, 86, 280); +} + +void DWIN_Draw_Popup(const uint8_t icon, const char * const cmsg1, FSTR_P const fmsg2, uint8_t button) { + DWIN_Draw_Popup1(icon); + if (cmsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, cmsg1); + DWIN_Draw_Popup2(fmsg2, button); +} + +void DWIN_Draw_Popup(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2, uint8_t button) { + DWIN_Draw_Popup1(icon); + if (fmsg1) DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 210, fmsg1); + DWIN_Draw_Popup2(fmsg2, button); +} + +void DWIN_Popup_Continue(const uint8_t icon, FSTR_P const fmsg1, FSTR_P const fmsg2) { + HMI_SaveProcessID(WaitResponse); + DWIN_Draw_Popup(icon, fmsg1, fmsg2, ICON_Continue_E); // Button Continue + DWIN_UpdateLCD(); +} + +#if HAS_HOTEND + + void Popup_Window_ETempTooLow() { + if (HMI_IsChinese()) { + HMI_SaveProcessID(WaitResponse); + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd_60(); + DWINUI::Draw_Icon(ICON_TempTooLow, 102, 105); + DWIN_Frame_AreaCopy(1, 103, 371, 136, 386, 69, 240); + DWIN_Frame_AreaCopy(1, 170, 371, 270, 386, 102, 240); + DWINUI::Draw_Icon(ICON_Confirm_C, 86, 280); + DWIN_UpdateLCD(); + } + else + DWIN_Popup_Confirm(ICON_TempTooLow, F("Nozzle is too cold"), F("Preheat the hotend")); + } + +#endif + +void Popup_Window_Resume() { + Clear_Popup_Area(); + Draw_Popup_Bkgd_105(); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 160, 338, 235, 354, 98, 135); + DWIN_Frame_AreaCopy(1, 103, 321, 271, 335, 52, 192); + DWINUI::Draw_Icon(ICON_Cancel_C, 26, 307); + DWINUI::Draw_Icon(ICON_Continue_C, 146, 307); + } + else { + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 115, F("Continue Print")); + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 192, F("It looks like the last")); + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 212, F("file was interrupted.")); + DWINUI::Draw_Icon(ICON_Cancel_E, 26, 307); + DWINUI::Draw_Icon(ICON_Continue_E, 146, 307); + } +} + +void Draw_Select_Highlight(const bool sel) { + HMI_flag.select_flag = sel; + const uint16_t c1 = sel ? HMI_data.Highlight_Color : HMI_data.PopupBg_color, + c2 = sel ? HMI_data.PopupBg_color : HMI_data.Highlight_Color; + DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318); + DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319); + DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318); + DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319); +} + +void Popup_window_PauseOrStop() { + if (HMI_IsChinese()) { + DWINUI::ClearMenuArea(); + Draw_Popup_Bkgd_60(); + if (select_print.now == PRINT_PAUSE_RESUME) DWIN_Frame_AreaCopy(1, 237, 338, 269, 356, 98, 150); + else if (select_print.now == PRINT_STOP) DWIN_Frame_AreaCopy(1, 221, 320, 253, 336, 98, 150); + DWIN_Frame_AreaCopy(1, 220, 304, 264, 319, 130, 150); + DWINUI::Draw_Icon(ICON_Confirm_C, 26, 280); + DWINUI::Draw_Icon(ICON_Cancel_C, 146, 280); + } + else { + DWIN_Draw_Popup(ICON_BLTouch, F("Please confirm"), select_print.now == PRINT_PAUSE_RESUME ? GET_TEXT_F(MSG_PAUSE_PRINT) : GET_TEXT_F(MSG_STOP_PRINT)); + DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280); + DWINUI::Draw_Icon(ICON_Cancel_E, 146, 280); + } + Draw_Select_Highlight(true); +} + +#if HAS_HOTEND || HAS_HEATED_BED + void DWIN_Popup_Temperature(const bool toohigh) { + Clear_Popup_Area(); + Draw_Popup_Bkgd_105(); + if (toohigh) { + DWINUI::Draw_Icon(ICON_TempTooHigh, 102, 165); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 103, 371, 237, 386, 52, 285); + DWIN_Frame_AreaCopy(1, 151, 389, 185, 402, 187, 285); + DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); + } + else { + DWINUI::Draw_String(HMI_data.PopupTxt_Color, 36, 300, F("Nozzle or Bed temperature")); + DWINUI::Draw_String(HMI_data.PopupTxt_Color, 92, 300, F("is too high")); + } + } + else { + DWINUI::Draw_Icon(ICON_TempTooLow, 102, 165); + if (HMI_IsChinese()) { + DWIN_Frame_AreaCopy(1, 103, 371, 270, 386, 52, 285); + DWIN_Frame_AreaCopy(1, 189, 389, 271, 402, 95, 310); + } + else { + DWINUI::Draw_String(HMI_data.PopupTxt_Color, 36, 300, F("Nozzle or Bed temperature")); + DWINUI::Draw_String(HMI_data.PopupTxt_Color, 92, 300, F("is too low")); + } + } + } + +#endif + +void Draw_Print_Labels() { + if (HMI_IsChinese()) { + Title.FrameCopy(30, 1, 42, 14); // "Printing" + DWIN_Frame_AreaCopy(1, 0, 72, 63, 86, 41, 173); // Printing Time + DWIN_Frame_AreaCopy(1, 65, 72, 128, 86, 176, 173); // Remain + } + else { + Title.ShowCaption(GET_TEXT(MSG_PRINTING)); + DWINUI::Draw_String( 46, 173, F("Print Time")); + DWINUI::Draw_String(181, 173, F("Remain")); + } +} + +void Draw_Print_ProgressBar() { + DWINUI::Draw_Icon(ICON_Bar, 15, 93); + DWIN_Draw_Rectangle(1, HMI_data.Barfill_Color, 16 + _percent_done * 240 / 100, 93, 256, 113); + DWINUI::Draw_Int(HMI_data.PercentTxt_Color, HMI_data.Background_Color, 3, 117, 133, _percent_done); + DWINUI::Draw_String(HMI_data.PercentTxt_Color, 142, 133, F("%")); +} + +void Draw_Print_ProgressElapsed() { + char buf[10]; + duration_t elapsed = print_job_timer.duration(); // print timer + sprintf_P(buf, PSTR("%02i:%02i"), (uint16_t)(elapsed.value / 3600), ((uint16_t)elapsed.value % 3600) / 60); + DWINUI::Draw_String(HMI_data.Text_Color, HMI_data.Background_Color, 47, 192, buf); +} + +void Draw_Print_ProgressRemain() { + char buf[10]; + sprintf_P(buf, PSTR("%02i:%02i"), (uint16_t)(_remain_time / 3600), ((uint16_t)_remain_time % 3600) / 60); + DWINUI::Draw_String(HMI_data.Text_Color, HMI_data.Background_Color, 181, 192, buf); +} + +void ICON_ResumeOrPause() { + if (printingIsPaused() || HMI_flag.pause_flag || HMI_flag.pause_action) + ICON_Resume(); + else + ICON_Pause(); +} + +void Draw_PrintProcess() { + DWINUI::ClearMenuArea(); + Draw_Print_Labels(); + + ICON_Tune(); + ICON_ResumeOrPause(); + ICON_Stop(); + + DWIN_Print_Header(sdprint ? card.longest_filename() : nullptr); + + DWINUI::Draw_Icon(ICON_PrintTime, 15, 173); + DWINUI::Draw_Icon(ICON_RemainTime, 150, 171); + + Draw_Print_ProgressBar(); + Draw_Print_ProgressElapsed(); + Draw_Print_ProgressRemain(); + + DWIN_UpdateLCD(); +} + +void Goto_PrintProcess() { + checkkey = PrintProcess; + Draw_PrintProcess(); +} + +void Draw_PrintDone() { + // show percent bar and value + _percent_done = 100; + _remain_time = 0; + + DWINUI::ClearMenuArea(); + DWIN_Print_Header(nullptr); + Draw_Print_Labels(); + DWINUI::Draw_Icon(ICON_PrintTime, 15, 173); + DWINUI::Draw_Icon(ICON_RemainTime, 150, 171); + Draw_Print_ProgressBar(); + Draw_Print_ProgressElapsed(); + Draw_Print_ProgressRemain(); + + // show print done confirm + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 240, DWIN_WIDTH - 1, STATUS_Y - 1); + DWINUI::Draw_Icon(HMI_IsChinese() ? ICON_Confirm_C : ICON_Confirm_E, 86, 283); +} + +void Draw_Main_Menu() { + DWINUI::ClearMenuArea(); + + if (HMI_IsChinese()) + Title.FrameCopy(2, 2, 26, 13); // "Home" etc + else + Title.ShowCaption(MACHINE_NAME); + + DWINUI::Draw_Icon(ICON_LOGO, 71, 52); // CREALITY logo + + ICON_Print(); + ICON_Prepare(); + ICON_Control(); + TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); + DWIN_UpdateLCD(); +} + +void Goto_Main_Menu() { + checkkey = MainMenu; + DWIN_StatusChanged(nullptr); + Draw_Main_Menu(); +} + +// Draw X, Y, Z and blink if in an un-homed or un-trusted state +void _update_axis_value(const AxisEnum axis, const uint16_t x, const uint16_t y, const bool blink, const bool force) { + const bool draw_qmark = axis_should_home(axis), + draw_empty = NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !draw_qmark && !axis_is_trusted(axis); + + // Check for a position change + static xyz_pos_t oldpos = { -1, -1, -1 }; + const float p = current_position[axis]; + const bool changed = oldpos[axis] != p; + if (changed) oldpos[axis] = p; + + if (force || changed || draw_qmark || draw_empty) { + if (blink && draw_qmark) + DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F("--?--")); + else if (blink && draw_empty) + DWINUI::Draw_String(HMI_data.Coordinate_Color, HMI_data.Background_Color, x, y, F(" ")); + else + DWINUI::Draw_Signed_Float(HMI_data.Coordinate_Color, HMI_data.Background_Color, 3, 1, x, y, p); + } +} + +void _draw_xyz_position(const bool force) { + //SERIAL_ECHOPGM("Draw XYZ:"); + static bool _blink = false; + const bool blink = !!(millis() & 0x400UL); + if (force || blink != _blink) { + _blink = blink; + //SERIAL_ECHOPGM(" (blink)"); + _update_axis_value(X_AXIS, 35, 459, blink, true); + _update_axis_value(Y_AXIS, 120, 459, blink, true); + _update_axis_value(Z_AXIS, 205, 459, blink, true); + } + //SERIAL_EOL(); +} + +void update_variable() { + #if HAS_HOTEND + static celsius_t _hotendtemp = 0, _hotendtarget = 0; + const celsius_t hc = thermalManager.wholeDegHotend(0), + ht = thermalManager.degTargetHotend(0); + const bool _new_hotend_temp = _hotendtemp != hc, + _new_hotend_target = _hotendtarget != ht; + if (_new_hotend_temp) _hotendtemp = hc; + if (_new_hotend_target) _hotendtarget = ht; + #endif + #if HAS_HEATED_BED + static celsius_t _bedtemp = 0, _bedtarget = 0; + const celsius_t bc = thermalManager.wholeDegBed(), + bt = thermalManager.degTargetBed(); + const bool _new_bed_temp = _bedtemp != bc, + _new_bed_target = _bedtarget != bt; + if (_new_bed_temp) _bedtemp = bc; + if (_new_bed_target) _bedtarget = bt; + #endif + #if HAS_FAN + static uint8_t _fanspeed = 0; + const bool _new_fanspeed = _fanspeed != thermalManager.fan_speed[0]; + if (_new_fanspeed) _fanspeed = thermalManager.fan_speed[0]; + #endif + + if (checkkey == Menu && (CurrentMenu == TuneMenu || CurrentMenu == TemperatureMenu)) { + // Tune page temperature update + #if HAS_HOTEND + if (_new_hotend_target) + HotendTargetItem->draw(CurrentMenu->line(HotendTargetItem->pos)); + #endif + #if HAS_HEATED_BED + if (_new_bed_target) + BedTargetItem->draw(CurrentMenu->line(BedTargetItem->pos)); + #endif + #if HAS_FAN + if (_new_fanspeed) + FanSpeedItem->draw(CurrentMenu->line(FanSpeedItem->pos)); + #endif + } + + // Bottom temperature update + + #if HAS_HOTEND + if (_new_hotend_temp) + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 28, 384, _hotendtemp); + if (_new_hotend_target) + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 25 + 4 * STAT_CHR_W + 6, 384, _hotendtarget); + + static int16_t _flow = planner.flow_percentage[0]; + if (_flow != planner.flow_percentage[0]) { + _flow = planner.flow_percentage[0]; + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 116 + 2 * STAT_CHR_W, 417, _flow); + } + #endif + + #if HAS_HEATED_BED + if (_new_bed_temp) + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 28, 417, _bedtemp); + if (_new_bed_target) + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 25 + 4 * STAT_CHR_W + 6, 417, _bedtarget); + #endif + + static int16_t _feedrate = 100; + if (_feedrate != feedrate_percentage) { + _feedrate = feedrate_percentage; + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 116 + 2 * STAT_CHR_W, 384, _feedrate); + } + + #if HAS_FAN + if (_new_fanspeed) { + _fanspeed = thermalManager.fan_speed[0]; + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 195 + 2 * STAT_CHR_W, 384, _fanspeed); + } + #endif + + static float _offset = 0; + if (BABY_Z_VAR != _offset) { + _offset = BABY_Z_VAR; + DWINUI::Draw_Signed_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 210, 417, _offset); + } + + _draw_xyz_position(false); +} + +/** + * Read and cache the working directory. + * + * TODO: New code can follow the pattern of menu_media.cpp + * and rely on Marlin caching for performance. No need to + * cache files here. + */ + +#ifndef strcasecmp_P + #define strcasecmp_P(a, b) strcasecmp((a), (b)) +#endif + +void make_name_without_ext(char *dst, char *src, size_t maxlen=MENU_CHAR_LIMIT) { + char * const name = card.longest_filename(); + size_t pos = strlen(name); // index of ending nul + + // For files, remove the extension + // which may be .gcode, .gco, or .g + if (!card.flag.filenameIsDir) + while (pos && src[pos] != '.') pos--; // find last '.' (stop at 0) + + size_t len = pos; // nul or '.' + if (len > maxlen) { // Keep the name short + pos = len = maxlen; // move nul down + dst[--pos] = '.'; // insert dots + dst[--pos] = '.'; + dst[--pos] = '.'; + } + + dst[len] = '\0'; // end it + + // Copy down to 0 + while (pos--) dst[pos] = src[pos]; +} + +void HMI_SDCardInit() { card.cdroot(); } + +void MarlinUI::refresh() { /* Nothing to see here */ } + +#if HAS_LCD_BRIGHTNESS + void MarlinUI::_set_brightness() { DWIN_LCD_Brightness(backlight ? brightness : 0); } +#endif + +#define ICON_Folder ICON_More + +#if ENABLED(SCROLL_LONG_FILENAMES) + + char shift_name[LONG_FILENAME_LENGTH + 1]; + int8_t shift_amt; // = 0 + millis_t shift_ms; // = 0 + + // Init the shift name based on the highlighted item + void Init_Shift_Name() { + const bool is_subdir = !card.flag.workDirIsRoot; + const int8_t filenum = select_file.now - 1 - is_subdir; // Skip "Back" and ".." + const uint16_t fileCnt = card.get_num_Files(); + if (WITHIN(filenum, 0, fileCnt - 1)) { + card.getfilename_sorted(SD_ORDER(filenum, fileCnt)); + char * const name = card.longest_filename(); + make_name_without_ext(shift_name, name, 100); + } + } + + void Init_SDItem_Shift() { + shift_amt = 0; + shift_ms = select_file.now > 0 && strlen(shift_name) > MENU_CHAR_LIMIT ? millis() + 750UL : 0; + } + +#endif + +/** + * Display an SD item, adding a CDUP for subfolders. + */ +void Draw_SDItem(const uint16_t item, int16_t row=-1) { + if (row < 0) row = item + 1 + MROWS - index_file; + const bool is_subdir = !card.flag.workDirIsRoot; + if (is_subdir && item == 0) + return Draw_Menu_Line(row, ICON_Folder, ".."); + + card.getfilename_sorted(SD_ORDER(item - is_subdir, card.get_num_Files())); + char * const name = card.longest_filename(); + + #if ENABLED(SCROLL_LONG_FILENAMES) + // Init the current selected name + // This is used during scroll drawing + if (item == select_file.now - 1) { + make_name_without_ext(shift_name, name, 100); + Init_SDItem_Shift(); + } + #endif + + // Draw the file/folder with name aligned left + char str[strlen(name) + 1]; + make_name_without_ext(str, name); + Draw_Menu_Line(row, card.flag.filenameIsDir ? ICON_Folder : ICON_File, str); +} + +#if ENABLED(SCROLL_LONG_FILENAMES) + + void Draw_SDItem_Shifted(uint8_t &shift) { + // Limit to the number of chars past the cutoff + const size_t len = strlen(shift_name); + NOMORE(shift, _MAX(len - MENU_CHAR_LIMIT, 0U)); + + // Shorten to the available space + const size_t lastchar = _MIN((signed)len, shift + MENU_CHAR_LIMIT); + + const char c = shift_name[lastchar]; + shift_name[lastchar] = '\0'; + + const uint8_t row = select_file.now + MROWS - index_file; // skip "Back" and scroll + Erase_Menu_Text(row); + Draw_Menu_Line(row, 0, &shift_name[shift]); + + shift_name[lastchar] = c; + } + +#endif + +// Redraw the first set of SD Files +void Redraw_SD_List() { + select_file.reset(); + index_file = MROWS; + + DWINUI::ClearMenuArea(); // Leave title bar unchanged + + Draw_Back_First(); + + if (card.isMounted()) { + // As many files as will fit + LOOP_L_N(i, _MIN(nr_sd_menu_items(), MROWS)) + Draw_SDItem(i, i + 1); + + TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); + } + else { + DWIN_Draw_Rectangle(1, HMI_data.AlertBg_Color, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4)); + DWINUI::Draw_CenteredString(font16x32, HMI_data.AlertTxt_Color, MBASE(3), F("No Media")); + } +} + +bool DWIN_lcd_sd_status = false; + +void SDCard_Up() { + card.cdup(); + Redraw_SD_List(); + DWIN_lcd_sd_status = false; // On next DWIN_Update +} + +void SDCard_Folder(char * const dirname) { + card.cd(dirname); + Redraw_SD_List(); + DWIN_lcd_sd_status = false; // On next DWIN_Update +} + +// +// Watch for media mount / unmount +// +void HMI_SDCardUpdate() { + if (HMI_flag.home_flag) return; + if (DWIN_lcd_sd_status != card.isMounted()) { + DWIN_lcd_sd_status = card.isMounted(); + //SERIAL_ECHOLNPGM("HMI_SDCardUpdate: ", DWIN_lcd_sd_status); + if (DWIN_lcd_sd_status) { + if (checkkey == SelectFile) + Redraw_SD_List(); + } + else { + // clean file icon + if (checkkey == SelectFile) { + Redraw_SD_List(); + } + else if (sdprint && card.isPrinting() && printingIsActive()) { + // TODO: Move card removed abort handling + // to CardReader::manage_media. + card.abortFilePrintSoon(); + wait_for_heatup = wait_for_user = false; + dwin_abort_flag = true; // Reset feedrate, return to Home + } + } + DWIN_UpdateLCD(); + } +} + +// +// The status area is always on-screen, except during +// full-screen modal dialogs. (TODO: Keep alive during dialogs) +// +void Draw_Status_Area(const bool with_update) { + + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, STATUS_Y + 21, DWIN_WIDTH, DWIN_HEIGHT - 1); + + #if HAS_HOTEND + DWINUI::Draw_Icon(ICON_HotendTemp, 10, 383); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 28, 384, thermalManager.wholeDegHotend(0)); + DWINUI::Draw_String(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 25 + 3 * STAT_CHR_W + 5, 384, F("/")); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 25 + 4 * STAT_CHR_W + 6, 384, thermalManager.degTargetHotend(0)); + + DWINUI::Draw_Icon(ICON_StepE, 112, 417); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]); + DWINUI::Draw_String(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 116 + 5 * STAT_CHR_W + 2, 417, F("%")); + #endif + + #if HAS_HEATED_BED + DWINUI::Draw_Icon(ICON_BedTemp, 10, 416); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 28, 417, thermalManager.wholeDegBed()); + DWINUI::Draw_String(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 25 + 3 * STAT_CHR_W + 5, 417, F("/")); + DWINUI::Draw_Int(true, true, 0, DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 25 + 4 * STAT_CHR_W + 6, 417, thermalManager.degTargetBed()); + #endif + + DWINUI::Draw_Icon(ICON_Speed, 113, 383); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 116 + 2 * STAT_CHR_W, 384, feedrate_percentage); + DWINUI::Draw_String(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 116 + 5 * STAT_CHR_W + 2, 384, F("%")); + + #if HAS_FAN + DWINUI::Draw_Icon(ICON_FanSpeed, 187, 383); + DWINUI::Draw_Int(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 3, 195 + 2 * STAT_CHR_W, 384, thermalManager.fan_speed[0]); + #endif + + #if HAS_ZOFFSET_ITEM + DWINUI::Draw_Icon(ICON_Zoffset, 187, 416); + #endif + + DWINUI::Draw_Signed_Float(DWIN_FONT_STAT, HMI_data.Indicator_Color, HMI_data.Background_Color, 2, 2, 210, 417, BABY_Z_VAR); + + DWIN_Draw_Rectangle(1, HMI_data.SplitLine_Color, 0, 449, DWIN_WIDTH, 451); + + DWINUI::Draw_Icon(ICON_MaxSpeedX, 10, 456); + DWINUI::Draw_Icon(ICON_MaxSpeedY, 95, 456); + DWINUI::Draw_Icon(ICON_MaxSpeedZ, 180, 456); + _draw_xyz_position(true); + + if (with_update) { + DWIN_UpdateLCD(); + delay(5); + } +} + +void HMI_StartFrame(const bool with_update) { + Goto_Main_Menu(); + Draw_Status_Area(with_update); +} + +void Draw_Info_Menu() { + DWINUI::ClearMenuArea(); + Draw_Back_First(); + + DWINUI::Draw_CenteredString(122, F(MACHINE_SIZE)); + DWINUI::Draw_CenteredString(195, F(SHORT_BUILD_VERSION)); + + if (HMI_IsChinese()) { + Title.FrameCopy(30, 17, 28, 13); // "Info" + + DWIN_Frame_AreaCopy(1, 197, 149, 252, 161, 108, 102); // "Size" + DWIN_Frame_AreaCopy(1, 1, 164, 56, 176, 108, 175); // "Firmware Version" + DWIN_Frame_AreaCopy(1, 58, 164, 113, 176, 105, 248); // "Contact Details" + } + else { + Title.ShowCaption(GET_TEXT_F(MSG_INFO_SCREEN)); + + DWIN_Frame_AreaCopy(1, 120, 150, 146, 161, 124, 102); // "Size" + DWIN_Frame_AreaCopy(1, 146, 151, 254, 161, 82, 175); // "Firmware Version" + DWIN_Frame_AreaCopy(1, 1, 164, 96, 175, 89, 248); // "Contact details" + } + DWINUI::Draw_CenteredString(268, F(CORP_WEBSITE)); + + LOOP_L_N(i, 3) { + DWINUI::Draw_Icon(ICON_PrintSize + i, 26, 99 + i * 73); + DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MBASE(2) + i * 73, 240); + } + + DWIN_UpdateLCD(); +} + +void Draw_Print_File_Menu() { + if (HMI_IsChinese()) + Title.FrameCopy(0, 31, 56, 14); // "Print file" + else + Title.ShowCaption(GET_TEXT_F(MSG_MEDIA_MENU)); + Redraw_SD_List(); +} + +// Main Process +void HMI_MainMenu() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_page.inc(PAGE_COUNT)) { + switch (select_page.now) { + case PAGE_PRINT: ICON_Print(); break; + case PAGE_PREPARE: ICON_Print(); ICON_Prepare(); break; + case PAGE_CONTROL: ICON_Prepare(); ICON_Control(); break; + case PAGE_INFO_LEVELING: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_page.dec()) { + switch (select_page.now) { + case PAGE_PRINT: ICON_Print(); ICON_Prepare(); break; + case PAGE_PREPARE: ICON_Prepare(); ICON_Control(); break; + case PAGE_CONTROL: ICON_Control(); TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + case PAGE_INFO_LEVELING: TERN(HAS_ONESTEP_LEVELING, ICON_Leveling, ICON_StartInfo)(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_page.now) { + case PAGE_PRINT: + checkkey = SelectFile; + Draw_Print_File_Menu(); + break; + + case PAGE_PREPARE: Draw_Prepare_Menu(); break; + + case PAGE_CONTROL: Draw_Control_Menu(); break; + + case PAGE_INFO_LEVELING: + #if HAS_ONESTEP_LEVELING + queue.inject_P(PSTR("G28XYO\nG28Z\nG29")); // TODO: 'G29' should be homing when needed. Does it make sense for every LCD to do this differently? + #else + checkkey = Info; + Draw_Info_Menu(); + #endif + break; + } + } + DWIN_UpdateLCD(); +} + +// Select (and Print) File +void HMI_SelectFile() { + EncoderState encoder_diffState = get_encoder_state(); + + const uint16_t hasUpDir = !card.flag.workDirIsRoot; + + if (encoder_diffState == ENCODER_DIFF_NO) { + #if ENABLED(SCROLL_LONG_FILENAMES) + if (shift_ms && select_file.now >= 1 + hasUpDir) { + // Scroll selected filename every second + const millis_t ms = millis(); + if (ELAPSED(ms, shift_ms)) { + const bool was_reset = shift_amt < 0; + shift_ms = ms + 375UL + was_reset * 250UL; // ms per character + uint8_t shift_new = shift_amt + 1; // Try to shift by... + Draw_SDItem_Shifted(shift_new); // Draw the item + if (!was_reset && shift_new == 0) // Was it limited to 0? + shift_ms = 0; // No scrolling needed + else if (shift_new == shift_amt) // Scroll reached the end + shift_new = -1; // Reset + shift_amt = shift_new; // Set new scroll + } + } + #endif + return; + } + + // First pause is long. Easy. + // On reset, long pause must be after 0. + + const uint16_t fullCnt = nr_sd_menu_items(); + + if (encoder_diffState == ENCODER_DIFF_CW && fullCnt) { + if (select_file.inc(1 + fullCnt)) { + const uint8_t itemnum = select_file.now - 1; // -1 for "Back" + if (TERN0(SCROLL_LONG_FILENAMES, shift_ms)) { // If line was shifted + Erase_Menu_Text(itemnum + MROWS - index_file); // Erase and + Draw_SDItem(itemnum - 1); // redraw + } + if (select_file.now > MROWS && select_file.now > index_file) { // Cursor past the bottom + index_file = select_file.now; // New bottom line + Scroll_Menu(DWIN_SCROLL_UP); + Draw_SDItem(itemnum, MROWS); // Draw and init the shift name + } + else { + Move_Highlight(1, select_file.now + MROWS - index_file); // Just move highlight + TERN_(SCROLL_LONG_FILENAMES, Init_Shift_Name()); // ...and init the shift name + } + TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW && fullCnt) { + if (select_file.dec()) { + const uint8_t itemnum = select_file.now - 1; // -1 for "Back" + if (TERN0(SCROLL_LONG_FILENAMES, shift_ms)) { // If line was shifted + Erase_Menu_Text(select_file.now + 1 + MROWS - index_file); // Erase and + Draw_SDItem(itemnum + 1); // redraw + } + if (select_file.now < index_file - MROWS) { // Cursor past the top + index_file--; // New bottom line + Scroll_Menu(DWIN_SCROLL_DOWN); + if (index_file == MROWS) { + Draw_Back_First(); + TERN_(SCROLL_LONG_FILENAMES, shift_ms = 0); + } + else { + Draw_SDItem(itemnum, 0); // Draw the item (and init shift name) + } + } + else { + Move_Highlight(-1, select_file.now + MROWS - index_file); // Just move highlight + TERN_(SCROLL_LONG_FILENAMES, Init_Shift_Name()); // ...and init the shift name + } + TERN_(SCROLL_LONG_FILENAMES, Init_SDItem_Shift()); // Reset left. Init timer. + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (select_file.now == 0) { + select_page.set(PAGE_PRINT); + Goto_Main_Menu(); + } + else if (hasUpDir && select_file.now == 1) { // CD-Up + SDCard_Up(); + goto HMI_SelectFileExit; + } + else { + const uint16_t filenum = select_file.now - 1 - hasUpDir; + card.getfilename_sorted(SD_ORDER(filenum, card.get_num_Files())); + + // Enter that folder! + if (card.flag.filenameIsDir) { + SDCard_Folder(card.filename); + goto HMI_SelectFileExit; + } + + // Reset highlight for next entry + select_print.reset(); + select_file.reset(); + + // Start choice and print SD file + HMI_flag.heat_flag = true; + HMI_flag.print_finish = false; + + card.openAndPrintFile(card.filename); + + #if HAS_FAN + // All fans on for Ender 3 v2 ? + // The slicer should manage this for us. + //for (uint8_t i = 0; i < FAN_COUNT; i++) + // thermalManager.fan_speed[i] = 255; + #endif + + DWIN_Print_Started(true); + } + } + + HMI_SelectFileExit: + DWIN_UpdateLCD(); +} + +// Printing +void HMI_Printing() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + // Avoid flicker by updating only the previous menu + if (encoder_diffState == ENCODER_DIFF_CW) { + if (select_print.inc(PRINT_COUNT)) { + switch (select_print.now) { + case PRINT_SETUP: ICON_Tune(); break; + case PRINT_PAUSE_RESUME: ICON_Tune(); ICON_ResumeOrPause(); break; + case PRINT_STOP: ICON_ResumeOrPause(); ICON_Stop(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_CCW) { + if (select_print.dec()) { + switch (select_print.now) { + case PRINT_SETUP: ICON_Tune(); ICON_ResumeOrPause(); break; + case PRINT_PAUSE_RESUME: ICON_ResumeOrPause(); ICON_Stop(); break; + case PRINT_STOP: ICON_Stop(); break; + } + } + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (select_print.now) { + case PRINT_SETUP: Draw_Tune_Menu(); break; + case PRINT_PAUSE_RESUME: + if (HMI_flag.pause_flag) { + ICON_Pause(); + #if DISABLED(ADVANCED_PAUSE_FEATURE) + char cmd[40]; + cmd[0] = '\0'; + #if BOTH(HAS_HEATED_BED, PAUSE_HEAT) + if (resume_bed_temp) sprintf_P(cmd, PSTR("M190 S%i\n"), resume_bed_temp); + #endif + #if BOTH(HAS_HOTEND, PAUSE_HEAT) + if (resume_hotend_temp) sprintf_P(&cmd[strlen(cmd)], PSTR("M109 S%i\n"), resume_hotend_temp); + #endif + #if HAS_FAN + if (resume_fan) thermalManager.fan_speed[0] = resume_fan; + #endif + strcat_P(cmd, M24_STR); + queue.inject(cmd); + #endif + } + else { + HMI_flag.select_flag = true; + checkkey = PauseOrStop; + Popup_window_PauseOrStop(); + } + break; + + case PRINT_STOP: + HMI_flag.select_flag = true; + checkkey = PauseOrStop; + Popup_window_PauseOrStop(); + break; + + default: break; + } + } + DWIN_UpdateLCD(); +} + +// Print done +void HMI_PrintDone() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + dwin_abort_flag = true; // Reset feedrate, return to Home + Goto_Main_Menu(); // Return to Main menu after print done + } +} + +// Pause or Stop popup +void HMI_PauseOrStop() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + + if (encoder_diffState == ENCODER_DIFF_CW) + Draw_Select_Highlight(false); + else if (encoder_diffState == ENCODER_DIFF_CCW) + Draw_Select_Highlight(true); + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (select_print.now == PRINT_PAUSE_RESUME) { + if (HMI_flag.select_flag) { + HMI_flag.pause_action = true; + ICON_Resume(); + queue.inject_P(PSTR("M25")); + } + else { + // cancel pause + } + Goto_PrintProcess(); + } + else if (select_print.now == PRINT_STOP) { + if (HMI_flag.select_flag) { + checkkey = MainMenu; + if (HMI_flag.home_flag) planner.synchronize(); // Wait for planner moves to finish! + wait_for_heatup = wait_for_user = false; // Stop waiting for heating/user + card.abortFilePrintSoon(); // Let the main loop handle SD abort + dwin_abort_flag = true; // Reset feedrate, return to Home + #ifdef ACTION_ON_CANCEL + host_action_cancel(); + #endif + DWIN_Draw_Popup(ICON_BLTouch, F("Stopping...") , F("Please wait until done.")); + } + else + Goto_PrintProcess(); // cancel stop + } + } + DWIN_UpdateLCD(); +} + +#include "../../../libs/buzzer.h" + +void HMI_AudioFeedback(const bool success/*=true*/) { + #if HAS_BUZZER + if (success) { + BUZZ(100, 659); + BUZZ(10, 0); + BUZZ(100, 698); + } + else + BUZZ(40, 440); + #endif +} + +void Draw_Main_Area() { + switch (checkkey) { + case MainMenu: Draw_Main_Menu(); break; + case SelectFile: Draw_Print_File_Menu(); break; + case PrintProcess: Draw_PrintProcess(); break; + case PrintDone: Draw_PrintDone(); break; + case Info: Draw_Info_Menu(); break; + case PauseOrStop: Popup_window_PauseOrStop(); break; + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case FilamentPurge: Draw_Popup_FilamentPurge(); break; + #endif + case Locked: lockScreen.draw(); break; + case Menu: + case SetInt: + case SetPInt: + case SetIntNoDraw: + case SetFloat: + case SetPFloat: CurrentMenu->draw(); break; + default: break; + } +} + +void HMI_ReturnScreen() { + checkkey = last_checkkey; + Draw_Main_Area(); + DWIN_UpdateLCD(); + return; +} + +void HMI_Popup() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + wait_for_user = false; + HMI_ReturnScreen(); + } +} + +void HMI_Init() { + HMI_SDCardInit(); + + for (uint16_t t = 0; t <= 100; t += 2) { + DWINUI::Draw_Icon(ICON_Bar, 15, 260); + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 15 + t * 242 / 100, 260, 257, 280); + DWIN_UpdateLCD(); + delay(20); + } + + HMI_SetLanguage(); +} + +void DWIN_Update() { + EachMomentUpdate(); // Status update + HMI_SDCardUpdate(); // SD card update + DWIN_HandleScreen(); // Rotary encoder update +} + +void EachMomentUpdate() { + static millis_t next_var_update_ms = 0, next_rts_update_ms = 0; + + const millis_t ms = millis(); + if (ELAPSED(ms, next_var_update_ms)) { + next_var_update_ms = ms + DWIN_VAR_UPDATE_INTERVAL; + update_variable(); + } + + if (PENDING(ms, next_rts_update_ms)) return; + next_rts_update_ms = ms + DWIN_SCROLL_UPDATE_INTERVAL; + + if (checkkey == PrintProcess) { + // if print done + if (HMI_flag.print_finish) { + HMI_flag.print_finish = false; + TERN_(POWER_LOSS_RECOVERY, recovery.cancel()); + planner.finish_and_disable(); + checkkey = PrintDone; + Draw_PrintDone(); + } + else if (HMI_flag.pause_flag != printingIsPaused()) { + // print status update + HMI_flag.pause_flag = printingIsPaused(); + ICON_ResumeOrPause(); + } + } + + // pause after homing + if (HMI_flag.pause_action && printingIsPaused() && !planner.has_blocks_queued()) { + HMI_flag.pause_action = false; + #if ENABLED(PAUSE_HEAT) + TERN_(HAS_HOTEND, resume_hotend_temp = sdprint ? thermalManager.degTargetHotend(0) : thermalManager.wholeDegHotend(0)); + TERN_(HAS_HEATED_BED, resume_bed_temp = sdprint ? thermalManager.degTargetBed() : thermalManager.wholeDegBed()); + TERN_(HAS_FAN, resume_fan = thermalManager.fan_speed[0]); + #endif + IF_DISABLED(ADVANCED_PAUSE_FEATURE, thermalManager.disable_all_heaters()); + IF_DISABLED(PARK_HEAD_ON_PAUSE, queue.inject_P(PSTR("G1 F1200 X0 Y0"))); + } + + if (checkkey == PrintProcess) { // print process + + duration_t elapsed = print_job_timer.duration(); // print timer + + if (sdprint && card.isPrinting()) { + uint8_t percentDone = card.percentDone(); + static uint8_t last_percentValue = 101; + if (last_percentValue != percentDone) { // print percent + last_percentValue = percentDone; + if (percentDone) { + _percent_done = percentDone; + Draw_Print_ProgressBar(); + } + } + + // Estimate remaining time every 20 seconds + static millis_t next_remain_time_update = 0; + if (_percent_done > 1 && ELAPSED(ms, next_remain_time_update) && !HMI_flag.heat_flag) { + _remain_time = (elapsed.value - dwin_heat_time) / (_percent_done * 0.01f) - (elapsed.value - dwin_heat_time); + next_remain_time_update += DWIN_REMAIN_TIME_UPDATE_INTERVAL; + Draw_Print_ProgressRemain(); + } + } + + // Print time so far + static uint16_t last_Printtime = 0; + const uint16_t min = (elapsed.value % 3600) / 60; + if (last_Printtime != min) { // 1 minute update + last_Printtime = min; + Draw_Print_ProgressElapsed(); + } + + } + else if (dwin_abort_flag && !HMI_flag.home_flag) { // Print Stop + dwin_abort_flag = false; + dwin_zoffset = BABY_Z_VAR; + select_page.set(PAGE_PRINT); + Goto_Main_Menu(); + } + + #if ENABLED(POWER_LOSS_RECOVERY) + else if (DWIN_lcd_sd_status && recovery.dwin_flag) { // resume print before power off + static bool recovery_flag = false; + + recovery.dwin_flag = false; + recovery_flag = true; + + auto update_selection = [&](const bool sel) { + HMI_flag.select_flag = sel; + const uint16_t c1 = sel ? HMI_data.PopupBg_color : HMI_data.Highlight_Color; + DWIN_Draw_Rectangle(0, c1, 25, 306, 126, 345); + DWIN_Draw_Rectangle(0, c1, 24, 305, 127, 346); + const uint16_t c2 = sel ? HMI_data.Highlight_Color : HMI_data.PopupBg_color; + DWIN_Draw_Rectangle(0, c2, 145, 306, 246, 345); + DWIN_Draw_Rectangle(0, c2, 144, 305, 247, 346); + }; + + Popup_Window_Resume(); + update_selection(true); + + // TODO: Get the name of the current file from someplace + // + //(void)recovery.interrupted_file_exists(); + SdFile *dir = nullptr; + const char * const filename = card.diveToFile(true, dir, recovery.info.sd_filename); + card.selectFileByName(filename); + DWINUI::Draw_CenteredString(HMI_data.PopupTxt_Color, 252, card.longest_filename()); + DWIN_UpdateLCD(); + + while (recovery_flag) { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState != ENCODER_DIFF_NO) { + if (encoder_diffState == ENCODER_DIFF_ENTER) { + recovery_flag = false; + if (HMI_flag.select_flag) break; + TERN_(POWER_LOSS_RECOVERY, queue.inject_P(PSTR("M1000C"))); + return HMI_StartFrame(true); + } + else + update_selection(encoder_diffState == ENCODER_DIFF_CW); + + DWIN_UpdateLCD(); + } + watchdog_refresh(); + } + + select_print.set(PRINT_SETUP); + queue.inject_P(PSTR("M1000")); + sdprint = true; + Goto_PrintProcess(); + Draw_Status_Area(true); + } + #endif // POWER_LOSS_RECOVERY + + DWIN_UpdateLCD(); +} + +void DWIN_HandleScreen() { + switch (checkkey) { + case MainMenu: HMI_MainMenu(); break; + case Menu: HMI_Menu(); break; + case SetInt: HMI_SetInt(); break; + case SetPInt: HMI_SetPInt(); break; + case SetIntNoDraw: HMI_SetIntNoDraw(); break; + case SetFloat: HMI_SetFloat(); break; + case SetPFloat: HMI_SetPFloat(); break; + case SelectFile: HMI_SelectFile(); break; + case Homing: break; + case Leveling: break; + case PrintProcess: HMI_Printing(); break; + case PrintDone: HMI_PrintDone(); break; + case PauseOrStop: HMI_PauseOrStop(); break; + case Info: HMI_Popup(); break; + case WaitResponse: HMI_Popup(); break; + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case FilamentPurge: HMI_FilamentPurge(); break; + #endif + case NothingToDo: break; + case Locked: HMI_LockScreen(); break; + default: break; + } +} + +void HMI_SaveProcessID(const uint8_t id) { + if (checkkey != id) { + if ((checkkey != NothingToDo) && + (checkkey != WaitResponse) && + (checkkey != Homing) && + (checkkey != Leveling) && + (checkkey != PauseOrStop) && + (checkkey != FilamentPurge)) last_checkkey = checkkey; // if not a popup + checkkey = id; + } +} + +void DWIN_StartHoming() { + HMI_flag.home_flag = true; + HMI_SaveProcessID(Homing); + Title.ShowCaption(F("Axis Homing")); + DWIN_Draw_Popup(ICON_BLTouch, F("Axis Homing"), F("Please wait until done.")); +} + +void DWIN_CompletedHoming() { + HMI_flag.home_flag = false; + dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); + if (dwin_abort_flag) { + planner.finish_and_disable(); + } + HMI_ReturnScreen(); +} + +void DWIN_MeshLevelingStart() { + #if HAS_ONESTEP_LEVELING + HMI_SaveProcessID(Leveling); + Title.ShowCaption(F("Bed Leveling")); + DWIN_Draw_Popup(ICON_AutoLeveling, GET_TEXT_F(MSG_BED_LEVELING), F("Please wait until done.")); + #elif ENABLED(MESH_BED_LEVELING) + Draw_ManualMesh_Menu(); + #endif +} + +void DWIN_CompletedLeveling() { TERN_(HAS_MESH, DWIN_MeshViewer()); } + +#if HAS_MESH + void DWIN_MeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { + char msg[33] = ""; + char str_1[6] = ""; + sprintf_P(msg, PSTR(S_FMT " %i/%i Z=%s"), GET_TEXT(MSG_PROBING_POINT), xpos, ypos, + dtostrf(zval, 1, 2, str_1)); + ui.set_status(msg); + } +#endif + +// PID process +void DWIN_PidTuning(pidresult_t result) { + switch (result) { + case PID_BED_START: + HMI_SaveProcessID(NothingToDo); + DWIN_Draw_Popup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), F("for BED is running.")); + break; + case PID_EXTR_START: + HMI_SaveProcessID(NothingToDo); + DWIN_Draw_Popup(ICON_TempTooHigh, GET_TEXT_F(MSG_PID_AUTOTUNE), F("for Nozzle is running.")); + break; + case PID_BAD_EXTRUDER_NUM: + checkkey = last_checkkey; + DWIN_Popup_Confirm(ICON_TempTooLow, F("PID Autotune failed!"), F("Bad extruder")); + break; + case PID_TUNING_TIMEOUT: + checkkey = last_checkkey; + DWIN_Popup_Confirm(ICON_TempTooHigh, F("Error"), GET_TEXT_F(MSG_PID_TIMEOUT)); + break; + case PID_TEMP_TOO_HIGH: + checkkey = last_checkkey; + DWIN_Popup_Confirm(ICON_TempTooHigh, F("PID Autotune failed!"), F("Temperature too high")); + break; + case PID_DONE: + checkkey = last_checkkey; + DWIN_Popup_Confirm(ICON_TempTooLow, GET_TEXT_F(MSG_PID_AUTOTUNE), GET_TEXT_F(MSG_BUTTON_DONE)); + break; + default: + checkkey = last_checkkey; + break; + } +} + +// Update filename on print +void DWIN_Print_Header(const char *text = nullptr) { + static char headertxt[31] = ""; // Print header text + + if (text != nullptr) { + const int8_t size = _MIN((unsigned) 30, strlen_P(text)); + LOOP_L_N(i, size) headertxt[i] = text[i]; + headertxt[size] = '\0'; + } + if (checkkey == PrintProcess || checkkey == PrintDone) { + DWIN_Draw_Rectangle(1, HMI_data.Background_Color, 0, 60, DWIN_WIDTH, 60+16); + DWINUI::Draw_CenteredString(60, headertxt); + } +} + +void Draw_Title(TitleClass* title) { + DWIN_Draw_Rectangle(1, HMI_data.TitleBg_color, 0, 0, DWIN_WIDTH - 1, TITLE_HEIGHT - 1); + if (title->frameid) + DWIN_Frame_AreaCopy(title->frameid, title->frame.left, title->frame.top, title->frame.right, title->frame.bottom, 14, (TITLE_HEIGHT - (title->frame.bottom - title->frame.top)) / 2 - 1); + else + DWIN_Draw_String(false, DWIN_FONT_HEAD, HMI_data.TitleTxt_color, HMI_data.TitleBg_color, 14, (TITLE_HEIGHT - DWINUI::fontHeight(DWIN_FONT_HEAD)) / 2 - 1, title->caption); +} + +void Draw_Menu(MenuClass* menu) { + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + DWIN_Draw_Rectangle(1, DWINUI::backcolor, 0, TITLE_HEIGHT, DWIN_WIDTH - 1, STATUS_Y - 1); + ui.set_status(""); +} + +// Startup routines +void DWIN_Startup() { + DWINUI::init(); + DWINUI::onCursorDraw = Draw_Menu_Cursor; + DWINUI::onCursorErase = Erase_Menu_Cursor; + DWINUI::onTitleDraw = Draw_Title; + DWINUI::onMenuDraw = Draw_Menu; + HMI_SetLanguage(); +} + +void DWIN_DrawStatusLine(const uint16_t color, const uint16_t bgcolor, const char *text) { + DWIN_Draw_Rectangle(1, bgcolor, 0, STATUS_Y, DWIN_WIDTH, STATUS_Y + 20); + if (text) DWINUI::Draw_CenteredString(color, STATUS_Y + 2, text); + DWIN_UpdateLCD(); +} + +// Update Status line +void DWIN_StatusChanged(const char *text) { + DWIN_DrawStatusLine(HMI_data.StatusTxt_Color, HMI_data.StatusBg_Color, text); +} + +void DWIN_StatusChanged_P(PGM_P const pstr) { + char str[strlen_P((const char*)pstr) + 1]; + strcpy_P(str, (const char*)pstr); + DWIN_StatusChanged(str); +} + +// Started a Print Job +void DWIN_Print_Started(const bool sd) { + sdprint = card.isPrinting() || sd; + _percent_done = 0; + _remain_time = 0; + HMI_flag.print_finish = false; + Goto_PrintProcess(); +} + +// Ended print job +void DWIN_Print_Finished() { + if (checkkey == PrintProcess || printingIsActive()) { + thermalManager.disable_all_heaters(); + thermalManager.zero_fan_speeds(); + HMI_flag.print_finish = true; + } +} + +// Progress Bar update +void DWIN_Progress_Update() { + if (parser.seenval('P')) _percent_done = parser.byteval('P'); + if (parser.seenval('R')) _remain_time = parser.ulongval('R') * 60; + if (checkkey == PrintProcess) { + Draw_Print_ProgressBar(); + Draw_Print_ProgressRemain(); + Draw_Print_ProgressElapsed(); + } +} + +#if HAS_FILAMENT_SENSOR + // Filament Runout process + void DWIN_FilamentRunout(const uint8_t extruder) { ui.set_status_P(GET_TEXT(MSG_RUNOUT_SENSOR)); } +#endif + +void DWIN_SetColorDefaults() { + HMI_data.Background_Color = Def_Background_Color; + HMI_data.Cursor_color = Def_Cursor_color; + HMI_data.TitleBg_color = Def_TitleBg_color; + HMI_data.TitleTxt_color = Def_TitleTxt_color; + HMI_data.Text_Color = Def_Text_Color; + HMI_data.Selected_Color = Def_Selected_Color; + HMI_data.SplitLine_Color = Def_SplitLine_Color; + HMI_data.Highlight_Color = Def_Highlight_Color; + HMI_data.StatusBg_Color = Def_StatusBg_Color; + HMI_data.StatusTxt_Color = Def_StatusTxt_Color; + HMI_data.PopupBg_color = Def_PopupBg_color; + HMI_data.PopupTxt_Color = Def_PopupTxt_Color; + HMI_data.AlertBg_Color = Def_AlertBg_Color; + HMI_data.AlertTxt_Color = Def_AlertTxt_Color; + HMI_data.PercentTxt_Color = Def_PercentTxt_Color; + HMI_data.Barfill_Color = Def_Barfill_Color; + HMI_data.Indicator_Color = Def_Indicator_Color; + HMI_data.Coordinate_Color = Def_Coordinate_Color; +} + +void DWIN_SetDataDefaults() { + DWIN_SetColorDefaults(); + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + TERN_(HAS_HOTEND, HMI_data.HotendPidT = PREHEAT_1_TEMP_HOTEND); + TERN_(HAS_HEATED_BED, HMI_data.BedPidT = PREHEAT_1_TEMP_BED); + TERN_(HAS_HOTEND, HMI_data.PidCycles = 5); + TERN_(PREVENT_COLD_EXTRUSION, HMI_data.ExtMinT = EXTRUDE_MINTEMP); +} + +void DWIN_StoreSettings(char *buff) { + memcpy(buff, &HMI_data, _MIN(sizeof(HMI_data), eeprom_data_size)); +} + +void DWIN_LoadSettings(const char *buff) { + memcpy(&HMI_data, buff, _MIN(sizeof(HMI_data), eeprom_data_size)); + dwin_zoffset = TERN0(HAS_BED_PROBE, probe.offset.z); + if (HMI_data.Text_Color == HMI_data.Background_Color) DWIN_SetColorDefaults(); + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + TERN_(PREVENT_COLD_EXTRUSION, ApplyExtMinT()); + feedrate_percentage = 100; +} + +void MarlinUI::kill_screen(PGM_P lcd_error, PGM_P lcd_component) { + DWIN_Draw_Popup(ICON_BLTouch, lcd_error, lcd_component); + DWIN_UpdateLCD(); +} + +void DWIN_RebootScreen() { + DWIN_Frame_Clear(Color_Bg_Black); + DWINUI::Draw_Icon(ICON_LOGO, 71, 150); // CREALITY logo + DWINUI::Draw_CenteredString(Color_White, 200, F("Please wait until reboot.")); + DWIN_UpdateLCD(); + delay(500); +} + +void DWIN_Redraw_screen() { + Draw_Main_Area(); + DWIN_StatusChanged(ui.status_message); + Draw_Status_Area(false); +} + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + + void DWIN_Popup_Pause(FSTR_P const fmsg, uint8_t button = 0) { + HMI_SaveProcessID(button ? WaitResponse : NothingToDo); + DWIN_Draw_Popup(ICON_BLTouch, F("Advanced Pause"), fmsg, button); + ui.reset_status(true); + } + + void MarlinUI::pause_show_message(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) { + switch (message) { + case PAUSE_MESSAGE_PARKING: DWIN_Popup_Pause(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); break; + case PAUSE_MESSAGE_CHANGING: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); break; + case PAUSE_MESSAGE_UNLOAD: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); break; + case PAUSE_MESSAGE_WAITING: DWIN_Popup_Pause(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING), ICON_Continue_E); break; + case PAUSE_MESSAGE_INSERT: DWIN_Popup_Continue(ICON_BLTouch, F("Advanced Pause"), GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT)); break; + case PAUSE_MESSAGE_LOAD: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); break; + case PAUSE_MESSAGE_PURGE: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE)); break; + case PAUSE_MESSAGE_OPTION: DWIN_Popup_FilamentPurge(); break; + case PAUSE_MESSAGE_RESUME: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); break; + case PAUSE_MESSAGE_HEAT: DWIN_Popup_Pause(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT), ICON_Continue_E); break; + case PAUSE_MESSAGE_HEATING: ui.set_status_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEATING)); break; + case PAUSE_MESSAGE_STATUS: HMI_ReturnScreen(); break; + default: break; + } + } + + void Draw_Popup_FilamentPurge() { + DWIN_Draw_Popup(ICON_BLTouch, F("Advanced Pause"), F("Purge or Continue?")); + DWINUI::Draw_Icon(ICON_Confirm_E, 26, 280); + DWINUI::Draw_Icon(ICON_Continue_E, 146, 280); + Draw_Select_Highlight(true); + DWIN_UpdateLCD(); + } + + // Handle responses such as: + // - Purge More, Continue + // - General "Continue" response + void DWIN_Popup_FilamentPurge() { + HMI_SaveProcessID(FilamentPurge); + pause_menu_response = PAUSE_RESPONSE_WAIT_FOR; + Draw_Popup_FilamentPurge(); + } + + void HMI_FilamentPurge() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW) + Draw_Select_Highlight(false); + else if (encoder_diffState == ENCODER_DIFF_CCW) + Draw_Select_Highlight(true); + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (HMI_flag.select_flag) + pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; // "Purge More" button + else { + HMI_SaveProcessID(NothingToDo); + pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; // "Continue" button + } + } + DWIN_UpdateLCD(); + } + +#endif // ADVANCED_PAUSE_FEATURE + +#if HAS_MESH + void DWIN_MeshViewer() { + if (!leveling_is_valid()) + DWIN_Popup_Continue(ICON_BLTouch, F("Mesh viewer"), F("No valid mesh")); + else { + HMI_SaveProcessID(WaitResponse); + MeshViewer.Draw(); + } + } +#endif + +void HMI_LockScreen() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + lockScreen.onEncoder(encoder_diffState); + if (lockScreen.isUnlocked()) { + if (CurrentMenu == AdvancedSettings) + Draw_AdvancedSettings_Menu(); + else + Draw_Tune_Menu(); + } +} + +void DWIN_LockScreen(const bool flag) { + HMI_flag.lock_flag = flag; + checkkey = Locked; + lockScreen.init(); +} + +// +// NEW MENU SUBSYSTEM ========================================================= +// + +// On click functions + +// Generic onclick event without draw anything +// process: process id HMI destiny +// lo: low limit +// hi: high limit +// dp: decimal places, 0 for integers +// val: value / scaled value +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetOnClick(uint8_t process, const int32_t lo, const int32_t hi, uint8_t dp, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + checkkey = process; + HMI_value.MinValue = lo; + HMI_value.MaxValue = hi; + HMI_value.dp = dp; + HMI_value.Apply = Apply; + HMI_value.LiveUpdate = LiveUpdate; + HMI_value.Value = val; + EncoderRate.enabled = true; +} + +// Generic onclick event for integer values +// process: process id HMI destiny +// lo: scaled low limit +// hi: scaled high limit +// val: value +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetValueOnClick(uint8_t process, const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + SetOnClick(process, lo, hi, 0, val, Apply, LiveUpdate); + Draw_Menu_IntValue(HMI_data.Selected_Color, CurrentMenu->line(), 4, HMI_value.Value); +} + +// Generic onclick event for float values +// process: process id HMI destiny +// lo: scaled low limit +// hi: scaled high limit +// val: value +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetValueOnClick(uint8_t process, const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + const int32_t value = round(val * POW(10, dp)); + SetOnClick(process, lo * POW(10, dp), hi * POW(10, dp), dp, value, Apply, LiveUpdate); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Selected_Color, 3, dp, VALX - dp * DWINUI::fontWidth(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), val); +} + +// Generic onclick event for integer values +// lo: scaled low limit +// hi: scaled high limit +// val: value +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +inline void SetIntOnClick(const int32_t lo, const int32_t hi, const int32_t val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + SetValueOnClick(SetInt, lo, hi, val, Apply, LiveUpdate); +} + +// Generic onclick event for set pointer to 16 bit uinteger values +// lo: low limit +// hi: high limit +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetPIntOnClick(const int32_t lo, const int32_t hi, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + HMI_value.P_Int = (int16_t*)static_cast(CurrentMenu->SelectedItem())->value; + const int32_t value = *HMI_value.P_Int; + SetValueOnClick(SetPInt, lo, hi, value, Apply, LiveUpdate); +} + +// Generic onclick event for float values +// process: process id HMI destiny +// lo: low limit +// hi: high limit +// dp: decimal places +// val: value +inline void SetFloatOnClick(const float lo, const float hi, uint8_t dp, const float val, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + SetValueOnClick(SetFloat, lo, hi, dp, val, Apply, LiveUpdate); +} + +// Generic onclick event for set pointer to float values +// lo: low limit +// hi: high limit +// LiveUpdate: live update function when the encoder changes +// Apply: update function when the encoder is pressed +void SetPFloatOnClick(const float lo, const float hi, uint8_t dp, void (*Apply)() = nullptr, void (*LiveUpdate)() = nullptr) { + HMI_value.P_Float = (float*)static_cast(CurrentMenu->SelectedItem())->value; + SetValueOnClick(SetPFloat, lo, hi, dp, *HMI_value.P_Float, Apply, LiveUpdate); +} + +#if ENABLED(EEPROM_SETTINGS) + void WriteEeprom() { + const bool success = settings.save(); + HMI_AudioFeedback(success); + } + + void ReadEeprom() { + const bool success = settings.load(); + DWIN_Redraw_screen(); + HMI_AudioFeedback(success); + } + + void ResetEeprom() { + settings.reset(); + DWIN_Redraw_screen(); + HMI_AudioFeedback(); + } +#endif + +// Reset Printer +void RebootPrinter() { + dwin_abort_flag = true; + wait_for_heatup = wait_for_user = false; // Stop waiting for heating/user + thermalManager.disable_all_heaters(); + planner.finish_and_disable(); + DWIN_RebootScreen(); + HAL_reboot(); +} + +void Goto_InfoMenu(){ + checkkey = Info; + Draw_Info_Menu(); +} + +void DisableMotors() { queue.inject_P(PSTR("M84")); } + +void AutoHome() { queue.inject_P(G28_STR); } + +void SetHome() { + // Apply workspace offset, making the current position 0,0,0 + queue.inject_P(PSTR("G92 X0 Y0 Z0")); + HMI_AudioFeedback(); +} + +#if HAS_ZOFFSET_ITEM + bool printer_busy() { return planner.movesplanned() || printingIsActive(); } + void ApplyZOffset() { TERN_(EEPROM_SETTINGS, settings.save()); } + void LiveZOffset() { + last_zoffset = dwin_zoffset; + dwin_zoffset = HMI_value.Value / 100.0f; + #if EITHER(BABYSTEP_ZPROBE_OFFSET, JUST_BABYSTEP) + if (BABYSTEP_ALLOWED()) babystep.add_mm(Z_AXIS, dwin_zoffset - last_zoffset); + #endif + } + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + void SetZOffset() { + SetPFloatOnClick(Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX, 2, ApplyZOffset, LiveZOffset); + } + #endif +#endif + +#if HAS_PREHEAT + void SetPreheat(const uint8_t i) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[i].hotend_temp, 0)); + TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(ui.material_preset[i].bed_temp)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[i].fan_speed)); + } + void SetPreheat0() { SetPreheat(0); } + void SetPreheat1() { SetPreheat(1); } + void SetPreheat2() { SetPreheat(2); } + + void SetCoolDown() { + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + #if HAS_HOTEND || HAS_HEATED_BED + thermalManager.disable_all_heaters(); + #endif + } +#endif + +void SetLanguage() { + HMI_ToggleLanguage(); + CurrentMenu = nullptr; // Invalidate menu to full redraw + Draw_Prepare_Menu(); +} + +void LiveMove() { + *HMI_value.P_Float = HMI_value.Value / MINUNITMULT; + if (!planner.is_full()) { + planner.synchronize(); + planner.buffer_line(current_position, homing_feedrate(HMI_value.axis)); + } +} +void ApplyMoveE() { + last_E = HMI_value.Value / MINUNITMULT; + if (!planner.is_full()) { + planner.synchronize(); + planner.buffer_line(current_position, MMM_TO_MMS(FEEDRATE_E)); + } +} +void SetMoveX() { HMI_value.axis = X_AXIS; SetPFloatOnClick(X_MIN_POS, X_MAX_POS, UNITFDIGITS, planner.synchronize, LiveMove);} +void SetMoveY() { HMI_value.axis = Y_AXIS; SetPFloatOnClick(Y_MIN_POS, Y_MAX_POS, UNITFDIGITS, planner.synchronize, LiveMove);} +void SetMoveZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick(Z_MIN_POS, Z_MAX_POS, UNITFDIGITS, planner.synchronize, LiveMove);} + +#if HAS_HOTEND + void SetMoveE() { + #if ENABLED(PREVENT_COLD_EXTRUSION) + if (thermalManager.tooColdToExtrude(0)) { + Popup_Window_ETempTooLow(); + return; + } + #endif + SetPFloatOnClick(last_E - (EXTRUDE_MAXLENGTH), last_E + (EXTRUDE_MAXLENGTH), UNITFDIGITS, ApplyMoveE); + } +#endif + +void SetMoveZto0() { + char cmd[48] = ""; + char str_1[5] = "", str_2[5] = ""; + sprintf_P(cmd, PSTR("G28OXY\nG28Z\nG0X%sY%sF5000\nG0Z0F300"), + #if ENABLED(MESH_BED_LEVELING) + dtostrf(0, 1, 1, str_1), + dtostrf(0, 1, 1, str_2) + #else + dtostrf(X_CENTER, 1, 1, str_1), + dtostrf(Y_CENTER, 1, 1, str_2) + #endif + ); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + ui.set_status_P(PSTR("Now adjust Z Offset")); + HMI_AudioFeedback(true); +} + +void SetPID(celsius_t t, heater_id_t h) { + char cmd[48] = ""; + char str_1[5] = "", str_2[5] = ""; + sprintf_P(cmd, PSTR("G28OXY\nG0Z5F300\nG0X%sY%sF5000\nM84"), + dtostrf(X_CENTER, 1, 1, str_1), + dtostrf(Y_CENTER, 1, 1, str_2) + ); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + thermalManager.PID_autotune(t, h, HMI_data.PidCycles, true); +} +#if HAS_HOTEND + void HotendPID() { SetPID(HMI_data.HotendPidT, H_E0); } +#endif +#if HAS_HEATED_BED + void BedPID() { SetPID(HMI_data.BedPidT, H_BED); } +#endif + +#if ENABLED(POWER_LOSS_RECOVERY) + void SetPwrLossr() { + recovery.enable(!recovery.enabled); + Draw_Chkb_Line(CurrentMenu->line(), recovery.enabled); + DWIN_UpdateLCD(); + } +#endif + +#if HAS_LCD_BRIGHTNESS + void LiveBrightness() { ui.set_brightness(HMI_value.Value); } + void SetBrightness() { SetIntOnClick(LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX, ui.brightness, nullptr, LiveBrightness); } +#endif + +#if ENABLED(SOUND_MENU_ITEM) + void SetEnableSound() { + ui.buzzer_enabled = !ui.buzzer_enabled; + Draw_Chkb_Line(CurrentMenu->line(), ui.buzzer_enabled); + DWIN_UpdateLCD(); + } +#endif + +void Goto_LockScreen() { DWIN_LockScreen(true); } + +#if HAS_HOME_OFFSET + void ApplyHomeOffset() { set_home_offset(HMI_value.axis, HMI_value.Value / MINUNITMULT); } + void SetHomeOffsetX() { HMI_value.axis = X_AXIS; SetPFloatOnClick(-50, 50, UNITFDIGITS, ApplyHomeOffset); } + void SetHomeOffsetY() { HMI_value.axis = Y_AXIS; SetPFloatOnClick(-50, 50, UNITFDIGITS, ApplyHomeOffset); } + void SetHomeOffsetZ() { HMI_value.axis = Z_AXIS; SetPFloatOnClick( -2, 2, UNITFDIGITS, ApplyHomeOffset); } +#endif + +#if HAS_BED_PROBE + void SetProbeOffsetX() { SetPFloatOnClick(-50, 50, UNITFDIGITS); } + void SetProbeOffsetY() { SetPFloatOnClick(-50, 50, UNITFDIGITS); } + void SetProbeOffsetZ() { SetPFloatOnClick(-10, 10, 2); } + void ProbeTest() { + ui.set_status_P(GET_TEXT(MSG_M48_TEST)); + queue.inject_P(PSTR("G28O\nM48 P10")); + } +#endif + +#if HAS_FILAMENT_SENSOR + void SetRunoutEnable() { + runout.reset(); + runout.enabled = !runout.enabled; + Draw_Chkb_Line(CurrentMenu->line(), runout.enabled); + DWIN_UpdateLCD(); + } + #if HAS_FILAMENT_RUNOUT_DISTANCE + void ApplyRunoutDistance() { runout.set_runout_distance(HMI_value.Value / MINUNITMULT); } + void SetRunoutDistance() { SetFloatOnClick(0, 999, UNITFDIGITS, runout.runout_distance(), ApplyRunoutDistance); } + #endif +#endif + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void SetFilLoad() { SetPFloatOnClick(0, MAX_LOAD_UNLOAD, UNITFDIGITS); } + void SetFilUnload() { SetPFloatOnClick(0, MAX_LOAD_UNLOAD, UNITFDIGITS); } +#endif + +#if ENABLED(PREVENT_COLD_EXTRUSION) + void ApplyExtMinT() { thermalManager.extrude_min_temp = HMI_data.ExtMinT; thermalManager.allow_cold_extrude = (HMI_data.ExtMinT == 0); } + void SetExtMinT() { SetPIntOnClick(MIN_ETEMP, MAX_ETEMP, ApplyExtMinT); } +#endif + +void RestoreDefaultsColors() { + DWIN_SetColorDefaults(); + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + DWIN_Redraw_screen(); +} + +void SelColor() { + HMI_value.P_Int = (int16_t*)static_cast(CurrentMenu->SelectedItem())->value; + HMI_value.Color[0] = GetRColor(*HMI_value.P_Int); // Red + HMI_value.Color[1] = GetGColor(*HMI_value.P_Int); // Green + HMI_value.Color[2] = GetBColor(*HMI_value.P_Int); // Blue + Draw_GetColor_Menu(); +} + +void LiveRGBColor() { + HMI_value.Color[CurrentMenu->line() - 2] = HMI_value.Value; + uint16_t color = RGB(HMI_value.Color[0], HMI_value.Color[1], HMI_value.Color[2]); + DWIN_Draw_Rectangle(1, color, 20, 315, DWIN_WIDTH - 20, 335); +} +void SetRGBColor() { + const uint8_t color = CurrentMenu->SelectedItem()->icon; + SetIntOnClick(0, (color == 1) ? 63 : 31, HMI_value.Color[color], nullptr, LiveRGBColor); +} + +void DWIN_ApplyColor() { + *HMI_value.P_Int = RGB(HMI_value.Color[0], HMI_value.Color[1], HMI_value.Color[2]); + DWINUI::SetColors(HMI_data.Text_Color, HMI_data.Background_Color); + Draw_Status_Area(false); + Draw_SelectColors_Menu(); + ui.set_status_P(PSTR("Colors applied")); +} + +void SetSpeed() { SetPIntOnClick(MIN_PRINT_SPEED, MAX_PRINT_SPEED); } + +#if HAS_HOTEND + void ApplyHotendTemp() { thermalManager.setTargetHotend(HMI_value.Value, 0); } + void SetHotendTemp() { SetIntOnClick(MIN_ETEMP, MAX_ETEMP, thermalManager.degTargetHotend(0), ApplyHotendTemp); } +#endif + +#if HAS_HEATED_BED + void ApplyBedTemp() { thermalManager.setTargetBed(HMI_value.Value); } + void SetBedTemp() { SetIntOnClick(BED_MINTEMP, BED_MAX_TARGET, thermalManager.degTargetBed(), ApplyBedTemp); } +#endif + +#if HAS_FAN + void ApplyFanSpeed() { thermalManager.set_fan_speed(0, HMI_value.Value); } + void SetFanSpeed() { SetIntOnClick(0, 255, thermalManager.fan_speed[0], ApplyFanSpeed); } +#endif + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + + void ChangeFilament() { + HMI_SaveProcessID(NothingToDo); + queue.inject_P(PSTR("M600 B2")); + } + + void ParkHead(){ + ui.set_status_P(GET_TEXT(MSG_FILAMENT_PARK_ENABLED)); + queue.inject_P(PSTR("G28O\nG27")); + } + + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + void UnloadFilament(){ + ui.set_status_P(GET_TEXT(MSG_FILAMENTUNLOAD)); + queue.inject_P(PSTR("M702 Z20")); + } + + void LoadFilament(){ + ui.set_status_P(GET_TEXT(MSG_FILAMENTLOAD)); + queue.inject_P(PSTR("M701 Z20")); + } + #endif + +#endif // ADVANCED_PAUSE_FEATURE + +void ApplyFlow() { planner.refresh_e_factor(0); } +void SetFlow() { SetPIntOnClick(MIN_PRINT_FLOW, MAX_PRINT_FLOW, ApplyFlow); } + +// Leveling Bed Corners +void LevBed(uint8_t point) { + char cmd[100] = ""; + #if HAS_ONESTEP_LEVELING + char str_1[6] = "", str_2[6] = "", str_3[6] = ""; + #define fmt "X:%s, Y:%s, Z:%s" + float xpos = 0, ypos = 0, zval = 0; + float margin = PROBING_MARGIN; + #else + #define fmt "M420 S0\nG28O\nG90\nG0 Z5 F300\nG0 X%i Y%i F5000\nG0 Z0 F300" + int16_t xpos = 0, ypos = 0; + int16_t margin = 30; + #endif + + switch (point) { + case 0: + ui.set_status_P(GET_TEXT(MSG_LEVBED_FL)); + xpos = ypos = margin; + break; + case 1: + ui.set_status_P(GET_TEXT(MSG_LEVBED_FR)); + xpos = X_BED_SIZE - margin; ypos = margin; + break; + case 2: + ui.set_status_P(GET_TEXT(MSG_LEVBED_BR)); + xpos = X_BED_SIZE - margin; ypos = Y_BED_SIZE - margin; + break; + case 3: + ui.set_status_P(GET_TEXT(MSG_LEVBED_BL)); + xpos = margin; ypos = Y_BED_SIZE - margin; + break; + case 4: + ui.set_status_P(GET_TEXT(MSG_LEVBED_C)); + xpos = X_BED_SIZE / 2; ypos = Y_BED_SIZE / 2; + break; + } + + #if HAS_ONESTEP_LEVELING + planner.synchronize(); + gcode.process_subcommands_now_P(PSTR("M420S0\nG28O")); + planner.synchronize(); + zval = probe.probe_at_point(xpos, ypos, PROBE_PT_STOW); + sprintf_P(cmd, PSTR(fmt), + dtostrf(xpos, 1, 1, str_1), + dtostrf(ypos, 1, 1, str_2), + dtostrf(zval, 1, 2, str_3) + ); + ui.set_status_P(cmd); + #else + planner.synchronize(); + sprintf_P(cmd, PSTR(fmt), xpos, ypos); + queue.inject(cmd); + #endif +} + +void LevBedFL() { LevBed(0); } +void LevBedFR() { LevBed(1); } +void LevBedBR() { LevBed(2); } +void LevBedBL() { LevBed(3); } +void LevBedC () { LevBed(4); } + +#if ENABLED(MESH_BED_LEVELING) + + void ManualMeshStart(){ + ui.set_status_P(GET_TEXT(MSG_UBL_BUILD_MESH_MENU)); + gcode.process_subcommands_now_P(PSTR("G28 XYO\nG28 Z\nM211 S0\nG29S1")); + planner.synchronize(); + #ifdef MANUAL_PROBE_START_Z + const uint8_t line = CurrentMenu->line(MMeshMoveZItem->pos); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, 2, VALX - 2 * DWINUI::fontWidth(DWIN_FONT_MENU), MBASE(line), MANUAL_PROBE_START_Z); + #endif + } + + void LiveMeshMoveZ() { + *HMI_value.P_Float = HMI_value.Value / POW(10, 2); + if (!planner.is_full()) { + planner.synchronize(); + planner.buffer_line(current_position, homing_feedrate(Z_AXIS)); + } + } + void SetMMeshMoveZ() { SetPFloatOnClick(-1, 1, 2, planner.synchronize, LiveMeshMoveZ);} + + void ManualMeshContinue(){ + gcode.process_subcommands_now_P(PSTR("G29S2")); + planner.synchronize(); + MMeshMoveZItem->draw(CurrentMenu->line(MMeshMoveZItem->pos)); + } + + void ManualMeshSave(){ + ui.set_status_P(GET_TEXT(MSG_UBL_STORAGE_MESH_MENU)); + queue.inject_P(PSTR("M211 S1\nM500")); + } + +#endif // MESH_BED_LEVELING + +#if HAS_PREHEAT + #if HAS_HOTEND + void SetPreheatEndTemp() { SetPIntOnClick(MIN_ETEMP, MAX_ETEMP); } + #endif + #if HAS_HEATED_BED + void SetPreheatBedTemp() { SetPIntOnClick(BED_MINTEMP, BED_MAX_TARGET); } + #endif + #if HAS_FAN + void SetPreheatFanSpeed() { SetPIntOnClick(0, 255); } + #endif +#endif + +void ApplyMaxSpeed() { planner.set_max_feedrate(HMI_value.axis, HMI_value.Value / MINUNITMULT); } +void SetMaxSpeedX() { HMI_value.axis = X_AXIS, SetFloatOnClick(MIN_MAXFEEDSPEED, default_max_feedrate[X_AXIS] * 2, UNITFDIGITS, planner.settings.max_feedrate_mm_s[X_AXIS], ApplyMaxSpeed); } +void SetMaxSpeedY() { HMI_value.axis = Y_AXIS, SetFloatOnClick(MIN_MAXFEEDSPEED, default_max_feedrate[Y_AXIS] * 2, UNITFDIGITS, planner.settings.max_feedrate_mm_s[Y_AXIS], ApplyMaxSpeed); } +void SetMaxSpeedZ() { HMI_value.axis = Z_AXIS, SetFloatOnClick(MIN_MAXFEEDSPEED, default_max_feedrate[Z_AXIS] * 2, UNITFDIGITS, planner.settings.max_feedrate_mm_s[Z_AXIS], ApplyMaxSpeed); } +#if HAS_HOTEND + void SetMaxSpeedE() { HMI_value.axis = E_AXIS; SetFloatOnClick(MIN_MAXFEEDSPEED, default_max_feedrate[E_AXIS] * 2, UNITFDIGITS, planner.settings.max_feedrate_mm_s[E_AXIS], ApplyMaxSpeed); } +#endif + +void ApplyMaxAccel() { planner.set_max_acceleration(HMI_value.axis, HMI_value.Value); } +void SetMaxAccelX() { HMI_value.axis = X_AXIS, SetIntOnClick(MIN_MAXACCELERATION, default_max_acceleration[X_AXIS] * 2, planner.settings.max_acceleration_mm_per_s2[X_AXIS], ApplyMaxAccel); } +void SetMaxAccelY() { HMI_value.axis = Y_AXIS, SetIntOnClick(MIN_MAXACCELERATION, default_max_acceleration[Y_AXIS] * 2, planner.settings.max_acceleration_mm_per_s2[Y_AXIS], ApplyMaxAccel); } +void SetMaxAccelZ() { HMI_value.axis = Z_AXIS, SetIntOnClick(MIN_MAXACCELERATION, default_max_acceleration[Z_AXIS] * 2, planner.settings.max_acceleration_mm_per_s2[Z_AXIS], ApplyMaxAccel); } +#if HAS_HOTEND + void SetMaxAccelE() { HMI_value.axis = E_AXIS; SetIntOnClick(MIN_MAXACCELERATION, default_max_acceleration[E_AXIS] * 2, planner.settings.max_acceleration_mm_per_s2[E_AXIS], ApplyMaxAccel); } +#endif + +#if HAS_CLASSIC_JERK + void ApplyMaxJerk() { planner.set_max_jerk(HMI_value.axis, HMI_value.Value / MINUNITMULT); } + void SetMaxJerkX() { HMI_value.axis = X_AXIS, SetFloatOnClick(MIN_MAXJERK, default_max_jerk[X_AXIS] * 2, UNITFDIGITS, planner.max_jerk[X_AXIS], ApplyMaxJerk); } + void SetMaxJerkY() { HMI_value.axis = Y_AXIS, SetFloatOnClick(MIN_MAXJERK, default_max_jerk[Y_AXIS] * 2, UNITFDIGITS, planner.max_jerk[Y_AXIS], ApplyMaxJerk); } + void SetMaxJerkZ() { HMI_value.axis = Z_AXIS, SetFloatOnClick(MIN_MAXJERK, default_max_jerk[Z_AXIS] * 2, UNITFDIGITS, planner.max_jerk[Z_AXIS], ApplyMaxJerk); } + #if HAS_HOTEND + void SetMaxJerkE() { HMI_value.axis = E_AXIS; SetFloatOnClick(MIN_MAXJERK, default_max_jerk[E_AXIS] * 2, UNITFDIGITS, planner.max_jerk[E_AXIS], ApplyMaxJerk); } + #endif +#endif + +void SetStepsX() { HMI_value.axis = X_AXIS, SetPFloatOnClick( MIN_STEP, MAX_STEP, UNITFDIGITS); } +void SetStepsY() { HMI_value.axis = Y_AXIS, SetPFloatOnClick( MIN_STEP, MAX_STEP, UNITFDIGITS); } +void SetStepsZ() { HMI_value.axis = Z_AXIS, SetPFloatOnClick( MIN_STEP, MAX_STEP, UNITFDIGITS); } +#if HAS_HOTEND + void SetStepsE() { HMI_value.axis = E_AXIS; SetPFloatOnClick( MIN_STEP, MAX_STEP, UNITFDIGITS); } + void SetHotendPidT() { SetPIntOnClick(MIN_ETEMP, MAX_ETEMP); } +#endif +#if HAS_HEATED_BED + void SetBedPidT() { SetPIntOnClick(BED_MINTEMP, BED_MAX_TARGET); } +#endif + +#if HAS_HOTEND || HAS_HEATED_BED + void SetPidCycles() { SetPIntOnClick(3, 50); } + void SetKp() { SetPFloatOnClick(0, 1000, 2); } + void ApplyPIDi() { + *HMI_value.P_Float = scalePID_i(HMI_value.Value / POW(10, 2)); + thermalManager.updatePID(); + } + void ApplyPIDd() { + *HMI_value.P_Float = scalePID_d(HMI_value.Value / POW(10, 2)); + thermalManager.updatePID(); + } + void SetKi() { + HMI_value.P_Float = (float*)static_cast(CurrentMenu->SelectedItem())->value; + const float value = unscalePID_i(*HMI_value.P_Float); + SetFloatOnClick(0, 1000, 2, value, ApplyPIDi); + } + void SetKd() { + HMI_value.P_Float = (float*)static_cast(CurrentMenu->SelectedItem())->value; + const float value = unscalePID_d(*HMI_value.P_Float); + SetFloatOnClick(0, 1000, 2, value, ApplyPIDd); + } +#endif + +// Menuitem Drawing functions ================================================= + +void onDrawMenuItem(MenuItemClass* menuitem, int8_t line) { + if (menuitem->icon) DWINUI::Draw_Icon(menuitem->icon, ICOX, MBASE(line) - 3); + if (menuitem->frameid) + DWIN_Frame_AreaCopy(menuitem->frameid, menuitem->frame.left, menuitem->frame.top, menuitem->frame.right, menuitem->frame.bottom, LBLX, MBASE(line)); + else if (menuitem->caption) + DWINUI::Draw_String(LBLX, MBASE(line) - 1, menuitem->caption); + DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240); +} + +void onDrawSubMenu(MenuItemClass* menuitem, int8_t line) { + onDrawMenuItem(menuitem, line); + DWINUI::Draw_Icon(ICON_More, VALX + 16, MBASE(line) - 3); +} + +void onDrawIntMenu(MenuItemClass* menuitem, int8_t line, uint16_t value) { + onDrawMenuItem(menuitem, line); + Draw_Menu_IntValue(HMI_data.Background_Color, line, 4, value); +} + +void onDrawPIntMenu(MenuItemClass* menuitem, int8_t line) { + const uint16_t value = *(uint16_t*)static_cast(menuitem)->value; + onDrawIntMenu(menuitem, line, value); +} + +void onDrawPInt8Menu(MenuItemClass* menuitem, int8_t line) { + const uint8_t value = *(uint8_t*)static_cast(menuitem)->value; + onDrawIntMenu(menuitem, line, value); +} + +void onDrawPInt32Menu(MenuItemClass* menuitem, int8_t line) { + const uint32_t value = *(uint32_t*)static_cast(menuitem)->value; + onDrawIntMenu(menuitem, line, value); +} + +void onDrawFloatMenu(MenuItemClass* menuitem, int8_t line, uint8_t dp, const float value) { + onDrawMenuItem(menuitem, line); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, dp, VALX - dp * DWINUI::fontWidth(DWIN_FONT_MENU), MBASE(line), value); +} + +void onDrawPFloatMenu(MenuItemClass* menuitem, int8_t line) { + const float value = *(float*)static_cast(menuitem)->value; + const int8_t dp = UNITFDIGITS; + onDrawFloatMenu(menuitem, line, dp, value); +} + +void onDrawPFloat2Menu(MenuItemClass* menuitem, int8_t line) { + const float value = *(float*)static_cast(menuitem)->value; + onDrawFloatMenu(menuitem, line, 2, value); +} + +void onDrawChkbMenu(MenuItemClass* menuitem, int8_t line, bool checked) { + onDrawMenuItem(menuitem, line); + Draw_Chkb_Line(line, checked); +} + +void onDrawBack(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 129, 72, 156, 84); + onDrawMenuItem(menuitem, line); +} + +void onDrawTempSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 57, 104, 84, 116); + onDrawSubMenu(menuitem, line); +} + +void onDrawMotionSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 87, 104, 114, 116); + onDrawSubMenu(menuitem, line); +} + +#if ENABLED(EEPROM_SETTINGS) + void onDrawWriteEeprom(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 117, 104, 172, 116); + onDrawMenuItem(menuitem, line); + } + + void onDrawReadEeprom(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 174, 103, 229, 116); + onDrawMenuItem(menuitem, line); + } + + void onDrawResetEeprom(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 1, 118, 56, 131); + onDrawMenuItem(menuitem, line); + } +#endif + +void onDrawInfoSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 231, 104, 258, 116); + onDrawSubMenu(menuitem, line); +} + +void onDrawMoveX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 58, 118, 106, 132); + onDrawPFloatMenu(menuitem, line); +} + +void onDrawMoveY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 109, 118, 157, 132); + onDrawPFloatMenu(menuitem, line); +} + +void onDrawMoveZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 160, 118, 209, 132); + onDrawPFloatMenu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawMoveE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 212, 118, 253, 131); + onDrawPFloatMenu(menuitem, line); + } +#endif + +void onDrawMoveSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 159, 70, 200, 84); + onDrawSubMenu(menuitem, line); +} + +void onDrawDisableMotors(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 204, 70, 259, 82); + onDrawMenuItem(menuitem, line); +} + +void onDrawAutoHome(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 0, 89, 41, 101); + onDrawMenuItem(menuitem, line); +} + +#if HAS_ZOFFSET_ITEM + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + void onDrawZOffset(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 174, 164, 223, 177); + onDrawPFloat2Menu(menuitem, line); + } + #else + void onDrawHomeOffset(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 43, 89, 98, 101); + onDrawMenuItem(menuitem, line); + } + #endif +#endif + +#if HAS_HOTEND + void onDrawPreheat1(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 100, 89, 151, 101); + onDrawMenuItem(menuitem, line); + } + void onDrawPreheat2(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 180, 89, 233, 100); + onDrawMenuItem(menuitem, line); + } +#endif + +#if HAS_PREHEAT + void onDrawCooldown(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 1, 104, 56, 117); + onDrawMenuItem(menuitem, line); + } +#endif + +void onDrawLanguage(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 239, 134, 266, 146); + onDrawMenuItem(menuitem, line); + DWINUI::Draw_String(VALX, MBASE(line), HMI_IsChinese() ? F("CN") : F("EN")); +} + +#if ENABLED(POWER_LOSS_RECOVERY) + void onDrawPwrLossR(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, recovery.enabled); } +#endif + +void onDrawEnableSound(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, ui.buzzer_enabled); } + +void onDrawSelColorItem(MenuItemClass* menuitem, int8_t line) { + const uint16_t color = *(uint16_t*)static_cast(menuitem)->value; + DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, ICOX + 1, MBASE(line) - 1 + 1, ICOX + 18, MBASE(line) - 1 + 18); + DWIN_Draw_Rectangle(1, color, ICOX + 2, MBASE(line) - 1 + 2, ICOX + 17, MBASE(line) - 1 + 17); + onDrawMenuItem(menuitem, line); +} + +void onDrawGetColorItem(MenuItemClass* menuitem, int8_t line) { + const uint8_t i = menuitem->icon; + uint16_t color; + switch (i) { + case 0: color = RGB(31, 0, 0); break; // Red + case 1: color = RGB(0, 63, 0); break; // Green + case 2: color = RGB(0, 0, 31); break; // Blue + default: color = 0; break; + } + DWIN_Draw_Rectangle(0, HMI_data.Highlight_Color, ICOX + 1, MBASE(line) - 1 + 1, ICOX + 18, MBASE(line) - 1 + 18); + DWIN_Draw_Rectangle(1, color, ICOX + 2, MBASE(line) - 1 + 2, ICOX + 17, MBASE(line) - 1 + 17); + DWINUI::Draw_String(LBLX, MBASE(line) - 1, menuitem->caption); + Draw_Menu_IntValue(HMI_data.Background_Color, line, 4, HMI_value.Color[i]); + DWIN_Draw_HLine(HMI_data.SplitLine_Color, 16, MYPOS(line + 1), 240); +} + +#if HAS_FILAMENT_SENSOR + void onDrawRunoutEnable(MenuItemClass* menuitem, int8_t line) { onDrawChkbMenu(menuitem, line, runout.enabled); } +#endif + +void onDrawPIDi(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_i(*(float*)static_cast(menuitem)->value)); } +void onDrawPIDd(MenuItemClass* menuitem, int8_t line) { onDrawFloatMenu(menuitem, line, 2, unscalePID_d(*(float*)static_cast(menuitem)->value)); } + +void onDrawSpeedItem(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 116, 164, 171, 176); + onDrawPIntMenu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawHotendTemp(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 1, 134, 56, 146); + onDrawPIntMenu(menuitem, line); + } +#endif + +#if HAS_HEATED_BED + void onDrawBedTemp(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 58, 134, 113, 146); + onDrawPIntMenu(menuitem, line); + } +#endif + +#if HAS_FAN + void onDrawFanSpeed(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 115, 134, 170, 146); + onDrawPInt8Menu(menuitem, line); + } +#endif + +void onDrawSteps(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 153, 148, 194, 161); + onDrawSubMenu(menuitem, line); +} + +#if ENABLED(MESH_BED_LEVELING) + void onDrawMMeshMoveZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 160, 118, 209, 132); + onDrawPFloatMenu(menuitem, line); + } +#endif + +#if HAS_PREHEAT + #if HAS_HOTEND + void onDrawSetPreheatHotend(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 1, 134, 56, 146); + onDrawPIntMenu(menuitem, line); + } + #endif + #if HAS_HEATED_BED + void onDrawSetPreheatBed(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 58, 134, 113, 146); + onDrawPIntMenu(menuitem, line); + } + #endif + #if HAS_FAN + void onDrawSetPreheatFan(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 115, 134, 170, 146); + onDrawPIntMenu(menuitem, line); + } + #endif + void onDrawPLAPreheatSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 100, 89, 178, 101); + onDrawSubMenu(menuitem,line); + } + void onDrawABSPreheatSubMenu(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) menuitem->SetFrame(1, 180, 89, 260, 100); + onDrawSubMenu(menuitem,line); + } +#endif // HAS_PREHEAT + +void onDrawSpeed(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) + menuitem->SetFrame(1, 173, 133, 228, 147); + onDrawSubMenu(menuitem, line); +} + +void onDrawMaxSpeedX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 228, 147); + DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 58, MBASE(line)); // X + } + onDrawPFloatMenu(menuitem, line); +} + +void onDrawMaxSpeedY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 228, 147); + DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 58, MBASE(line)); // Y + } + onDrawPFloatMenu(menuitem, line); +} + +void onDrawMaxSpeedZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 228, 147); + DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 58, MBASE(line) + 3); // Z + } + onDrawPFloatMenu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawMaxSpeedE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 228, 147); + DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 58, MBASE(line)); // E + } + onDrawPFloatMenu(menuitem, line); + } +#endif + +void onDrawAcc(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line) + 1); // ...Acceleration + } + onDrawSubMenu(menuitem, line); +} + +void onDrawMaxAccelX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 71, MBASE(line)); // X + } + onDrawPInt32Menu(menuitem, line); +} + +void onDrawMaxAccelY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 71, MBASE(line)); // Y + } + onDrawPInt32Menu(menuitem, line); +} + +void onDrawMaxAccelZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 71, MBASE(line)); // Z + } + onDrawPInt32Menu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawMaxAccelE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 28, 149, 69, 161, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 71, MBASE(line)); // E + } + onDrawPInt32Menu(menuitem, line); + } +#endif + +#if HAS_CLASSIC_JERK + + void onDrawJerk(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line) + 1); // ... + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 54, MBASE(line)); // ...Jerk + } + onDrawSubMenu(menuitem, line); + } + + void onDrawMaxJerkX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(line)); + DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 83, MBASE(line)); + } + onDrawPFloatMenu(menuitem, line); + } + + void onDrawMaxJerkY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(line)); + DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 83, MBASE(line)); + } + onDrawPFloatMenu(menuitem, line); + } + + void onDrawMaxJerkZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(line)); + DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 83, MBASE(line)); + } + onDrawPFloatMenu(menuitem, line); + } + + #if HAS_HOTEND + void onDrawMaxJerkE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 173, 133, 200, 147); + DWIN_Frame_AreaCopy(1, 1, 180, 28, 192, LBLX + 27, MBASE(line)); + DWIN_Frame_AreaCopy(1, 202, 133, 228, 147, LBLX + 53, MBASE(line)); + DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 83, MBASE(line)); + } + onDrawPFloatMenu(menuitem, line); + } + #endif + +#endif // HAS_CLASSIC_JERK + +void onDrawStepsX(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 153, 148, 194, 161); + DWIN_Frame_AreaCopy(1, 229, 133, 236, 147, LBLX + 44, MBASE(line)); // X + } + onDrawPFloatMenu(menuitem, line); +} + +void onDrawStepsY(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 153, 148, 194, 161); + DWIN_Frame_AreaCopy(1, 1, 150, 7, 160, LBLX + 44, MBASE(line)); // Y + } + onDrawPFloatMenu(menuitem, line); +} + +void onDrawStepsZ(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 153, 148, 194, 161); + DWIN_Frame_AreaCopy(1, 9, 150, 16, 160, LBLX + 44, MBASE(line)); // Z + } + onDrawPFloatMenu(menuitem, line); +} + +#if HAS_HOTEND + void onDrawStepsE(MenuItemClass* menuitem, int8_t line) { + if (HMI_IsChinese()) { + menuitem->SetFrame(1, 153, 148, 194, 161); + DWIN_Frame_AreaCopy(1, 18, 150, 25, 160, LBLX + 44, MBASE(line)); // E + } + onDrawPFloatMenu(menuitem, line); + } +#endif + +// HMI Control functions ====================================================== + +// Generic menu control using the encoder +void HMI_Menu() { + EncoderState encoder_diffState = get_encoder_state(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (CurrentMenu != nullptr) CurrentMenu->onClick(); + } else if (CurrentMenu != nullptr) CurrentMenu->onScroll(encoder_diffState == ENCODER_DIFF_CW); +} + +// Get an integer value using the encoder without draw anything +// lo: low limit +// hi: high limit +// Return value: +// 0 : no change +// 1 : live change +// 2 : apply change +int8_t HMI_GetIntNoDraw(const int32_t lo, const int32_t hi) { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState != ENCODER_DIFF_NO) { + if (Apply_Encoder(encoder_diffState, HMI_value.Value)) { + EncoderRate.enabled = false; + checkkey = Menu; + return 2; + } + LIMIT(HMI_value.Value, lo, hi); + return 1; + } + return 0; +} + +// Get an integer value using the encoder +// lo: low limit +// hi: high limit +// Return value: +// 0 : no change +// 1 : live change +// 2 : apply change +int8_t HMI_GetInt(const int32_t lo, const int32_t hi) { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState != ENCODER_DIFF_NO) { + if (Apply_Encoder(encoder_diffState, HMI_value.Value)) { + EncoderRate.enabled = false; + DWINUI::Draw_Int(HMI_data.Text_Color, HMI_data.Background_Color, 4 , VALX, MBASE(CurrentMenu->line()) - 1, HMI_value.Value); + checkkey = Menu; + return 2; + } + LIMIT(HMI_value.Value, lo, hi); + DWINUI::Draw_Int(HMI_data.Text_Color, HMI_data.Selected_Color, 4 , VALX, MBASE(CurrentMenu->line()) - 1, HMI_value.Value); + return 1; + } + return 0; +} + +// Set an integer using the encoder +void HMI_SetInt() { + int8_t val = HMI_GetInt(HMI_value.MinValue, HMI_value.MaxValue); + switch (val) { + case 0: return; break; + case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; + case 2: if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + } +} + +// Set an integer without drawing +void HMI_SetIntNoDraw() { + int8_t val = HMI_GetIntNoDraw(HMI_value.MinValue, HMI_value.MaxValue); + switch (val) { + case 0: return; break; + case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; + case 2: if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + } +} + +// Set an integer pointer variable using the encoder +void HMI_SetPInt() { + int8_t val = HMI_GetInt(HMI_value.MinValue, HMI_value.MaxValue); + if (!val) return; + else if (val == 2) { // Apply + *HMI_value.P_Int = HMI_value.Value; + if (HMI_value.Apply != nullptr) HMI_value.Apply(); + } else if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); +} + +// Get a scaled float value using the encoder +// dp: decimal places +// lo: scaled low limit +// hi: scaled high limit +// Return value: +// 0 : no change +// 1 : live change +// 2 : apply change +int8_t HMI_GetFloat(uint8_t dp, int32_t lo, int32_t hi) { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState != ENCODER_DIFF_NO) { + if (Apply_Encoder(encoder_diffState, HMI_value.Value)) { + EncoderRate.enabled = false; + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Background_Color, 3, dp, VALX - dp * DWINUI::fontWidth(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value / POW(10, dp)); + checkkey = Menu; + return 2; + } + LIMIT(HMI_value.Value, lo, hi); + DWINUI::Draw_Signed_Float(HMI_data.Text_Color, HMI_data.Selected_Color, 3, dp, VALX - dp * DWINUI::fontWidth(DWIN_FONT_MENU), MBASE(CurrentMenu->line()), HMI_value.Value / POW(10, dp)); + return 1; + } + return 0; +} + +// Set a scaled float using the encoder +void HMI_SetFloat() { + const int8_t val = HMI_GetFloat(HMI_value.dp, HMI_value.MinValue, HMI_value.MaxValue); + switch (val) { + case 0: return; + case 1: if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); break; + case 2: if (HMI_value.Apply != nullptr) HMI_value.Apply(); break; + } +} + +// Set a scaled float pointer variable using the encoder +void HMI_SetPFloat() { + const int8_t val = HMI_GetFloat(HMI_value.dp, HMI_value.MinValue, HMI_value.MaxValue); + if (!val) return; + if (val == 2) { // Apply + *HMI_value.P_Float = HMI_value.Value / POW(10, HMI_value.dp); + if (HMI_value.Apply != nullptr) HMI_value.Apply(); + } + else if (HMI_value.LiveUpdate != nullptr) HMI_value.LiveUpdate(); +} + +// Menu Creation and Drawing functions ====================================================== + +void SetMenuTitle(frame_rect_t cn, frame_rect_t en, const __FlashStringHelper* text) { + if (HMI_IsChinese() && (cn.w != 0)) + CurrentMenu->MenuTitle.SetFrame(cn.x, cn.y, cn.w, cn.h); + else + CurrentMenu->MenuTitle.SetCaption(text); +} + +void Draw_Prepare_Menu() { + checkkey = Menu; + if (PrepareMenu == nullptr) PrepareMenu = new MenuClass(); + if (CurrentMenu != PrepareMenu) { + CurrentMenu = PrepareMenu; + SetMenuTitle({133, 1, 28, 13}, {179, 0, 48, 14}, GET_TEXT_F(MSG_PREPARE)); + DWINUI::MenuItemsPrepare(13); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu); + #if ENABLED(ADVANCED_PAUSE_FEATURE) + ADDMENUITEM(ICON_FilMan, GET_TEXT_F(MSG_FILAMENT_MAN), onDrawSubMenu, Draw_FilamentMan_Menu); + #endif + ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_MOVE_AXIS), onDrawMoveSubMenu, Draw_Move_Menu); + ADDMENUITEM(ICON_LevBed, GET_TEXT_F(MSG_BED_LEVELING), onDrawSubMenu, Draw_LevBedCorners_Menu); + ADDMENUITEM(ICON_CloseMotor, GET_TEXT_F(MSG_DISABLE_STEPPERS), onDrawDisableMotors, DisableMotors); + ADDMENUITEM(ICON_Homing, GET_TEXT_F(MSG_AUTO_HOME), onDrawAutoHome, AutoHome); + #if ENABLED(MESH_BED_LEVELING) + ADDMENUITEM(ICON_ManualMesh, GET_TEXT_F(MSG_MANUAL_MESH), onDrawSubMenu, Draw_ManualMesh_Menu); + #endif + #if HAS_ZOFFSET_ITEM + #if EITHER(HAS_BED_PROBE, BABYSTEPPING) + ADDMENUITEM(ICON_SetZOffset, GET_TEXT_F(MSG_PROBE_WIZARD), onDrawSubMenu, Draw_ZOffsetWiz_Menu); + #else + ADDMENUITEM(ICON_SetHome, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawHomeOffset, SetHome); + #endif + #endif + #if HAS_HOTEND + ADDMENUITEM(ICON_PLAPreheat, GET_TEXT_F(MSG_PREHEAT_1), onDrawPreheat1, SetPreheat0); + ADDMENUITEM(ICON_ABSPreheat, PSTR("Preheat " PREHEAT_2_LABEL), onDrawPreheat2, SetPreheat1); + ADDMENUITEM(ICON_CustomPreheat, GET_TEXT_F(MSG_PREHEAT_CUSTOM), onDrawMenuItem, SetPreheat2); + #endif + #if HAS_PREHEAT + ADDMENUITEM(ICON_Cool, GET_TEXT_F(MSG_COOLDOWN), onDrawCooldown, SetCoolDown); + #endif + ADDMENUITEM(ICON_Language, PSTR("UI Language"), onDrawLanguage, SetLanguage); + } + CurrentMenu->draw(); +} + +void Draw_LevBedCorners_Menu() { + DWINUI::ClearMenuArea(); + checkkey = Menu; + if (LevBedMenu == nullptr) LevBedMenu = new MenuClass(); + if (CurrentMenu != LevBedMenu) { + CurrentMenu = LevBedMenu; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_BED_TRAMMING)); // TODO: Chinese, English "Bed Tramming" JPG + DWINUI::MenuItemsPrepare(6); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu); + ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_FL), onDrawMenuItem, LevBedFL); + ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_FR), onDrawMenuItem, LevBedFR); + ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_BR), onDrawMenuItem, LevBedBR); + ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_BL), onDrawMenuItem, LevBedBL); + ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_LEVBED_C ), onDrawMenuItem, LevBedC ); + } + CurrentMenu->draw(); +} + +void Draw_Control_Menu() { + checkkey = Menu; + if (ControlMenu == nullptr) ControlMenu = new MenuClass(); + if (CurrentMenu != ControlMenu) { + CurrentMenu = ControlMenu; + SetMenuTitle({103, 1, 28, 14}, {128, 2, 49, 11}, GET_TEXT_F(MSG_CONTROL)); + DWINUI::MenuItemsPrepare(9); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_Main_Menu); + ADDMENUITEM(ICON_Temperature, GET_TEXT_F(MSG_TEMPERATURE), onDrawTempSubMenu, Draw_Temperature_Menu); + ADDMENUITEM(ICON_Motion, GET_TEXT_F(MSG_MOTION), onDrawMotionSubMenu, Draw_Motion_Menu); + #if ENABLED(EEPROM_SETTINGS) + ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT_F(MSG_STORE_EEPROM), onDrawWriteEeprom, WriteEeprom); + ADDMENUITEM(ICON_ReadEEPROM, GET_TEXT_F(MSG_LOAD_EEPROM), onDrawReadEeprom, ReadEeprom); + ADDMENUITEM(ICON_ResumeEEPROM, GET_TEXT_F(MSG_RESTORE_DEFAULTS), onDrawResetEeprom, ResetEeprom); + #endif + ADDMENUITEM(ICON_Reboot, GET_TEXT_F(MSG_RESET_PRINTER), onDrawMenuItem, RebootPrinter); + ADDMENUITEM(ICON_AdvSet, GET_TEXT_F(MSG_ADVANCED_SETTINGS), onDrawSubMenu, Draw_AdvancedSettings_Menu); + ADDMENUITEM(ICON_Info, GET_TEXT_F(MSG_INFO_SCREEN), onDrawInfoSubMenu, Goto_InfoMenu); + } + CurrentMenu->draw(); +} + +void Draw_AdvancedSettings_Menu() { + checkkey = Menu; + if (AdvancedSettings == nullptr) AdvancedSettings = new MenuClass(); + if (CurrentMenu != AdvancedSettings) { + CurrentMenu = AdvancedSettings; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_ADVANCED_SETTINGS)); // TODO: Chinese, English "Advanced Settings" JPG + DWINUI::MenuItemsPrepare(11); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu); + #if HAS_HOME_OFFSET + ADDMENUITEM(ICON_HomeOffset, GET_TEXT_F(MSG_SET_HOME_OFFSETS), onDrawSubMenu, Draw_HomeOffset_Menu); + #endif + #if HAS_BED_PROBE + ADDMENUITEM(ICON_ProbeSet, GET_TEXT_F(MSG_ZPROBE_SETTINGS), onDrawSubMenu, Draw_ProbeSet_Menu); + #endif + #if HAS_HOTEND + ADDMENUITEM(ICON_PIDNozzle, F("Hotend PID Settings"), onDrawSubMenu, Draw_HotendPID_Menu); + #endif + #if HAS_HEATED_BED + ADDMENUITEM(ICON_PIDbed, F("Bed PID Settings"), onDrawSubMenu, Draw_BedPID_Menu); + #endif + #if HAS_FILAMENT_SENSOR + ADDMENUITEM(ICON_FilSet, GET_TEXT_F(MSG_FILAMENT_SET), onDrawSubMenu, Draw_FilSet_Menu); + #endif + #if ENABLED(POWER_LOSS_RECOVERY) + ADDMENUITEM(ICON_Pwrlossr, GET_TEXT_F(MSG_OUTAGE_RECOVERY), onDrawPwrLossR, SetPwrLossr); + #endif + #if HAS_LCD_BRIGHTNESS + ADDMENUITEM_P(ICON_Brightness, GET_TEXT_F(MSG_BRIGHTNESS), onDrawPInt8Menu, SetBrightness, &ui.brightness); + #endif + ADDMENUITEM(ICON_Scolor, F("Select Colors"), onDrawSubMenu, Draw_SelectColors_Menu); + #if ENABLED(SOUND_MENU_ITEM) + ADDMENUITEM(ICON_Sound, F("Enable Sound"), onDrawEnableSound, SetEnableSound); + #endif + #if HAS_MESH + ADDMENUITEM(ICON_MeshViewer, GET_TEXT_F(MSG_MESH_VIEW), onDrawSubMenu, DWIN_MeshViewer); + #endif + ADDMENUITEM(ICON_Lock, F("Lock Screen"), onDrawMenuItem, Goto_LockScreen); + } + CurrentMenu->draw(); +} + +void Draw_Move_Menu() { + checkkey = Menu; + if (MoveMenu == nullptr) MoveMenu = new MenuClass(); + if (CurrentMenu != MoveMenu) { + CurrentMenu = MoveMenu; + SetMenuTitle({192, 1, 42, 14}, {231, 2, 35, 11}, GET_TEXT_F(MSG_MOVE_AXIS)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu); + ADDMENUITEM_P(ICON_MoveX, GET_TEXT_F(MSG_MOVE_X), onDrawMoveX, SetMoveX, ¤t_position.x); + ADDMENUITEM_P(ICON_MoveY, GET_TEXT_F(MSG_MOVE_Y), onDrawMoveY, SetMoveY, ¤t_position.y); + ADDMENUITEM_P(ICON_MoveZ, GET_TEXT_F(MSG_MOVE_Z), onDrawMoveZ, SetMoveZ, ¤t_position.z); + #if HAS_HOTEND + ADDMENUITEM_P(ICON_Extruder, GET_TEXT_F(MSG_MOVE_E), onDrawMoveE, SetMoveE, ¤t_position.e); + #endif + } + CurrentMenu->draw(); + if (!all_axes_trusted()) ui.set_status_P(PSTR("WARNING: position is unknow")); +} + +#if HAS_HOME_OFFSET + void Draw_HomeOffset_Menu() { + checkkey = Menu; + if (HomeOffMenu == nullptr) HomeOffMenu = new MenuClass(); + if (CurrentMenu != HomeOffMenu) { + CurrentMenu = HomeOffMenu; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_SET_HOME_OFFSETS)); // TODO: Chinese, English "Set Home Offsets" JPG + DWINUI::MenuItemsPrepare(4); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu); + ADDMENUITEM_P(ICON_HomeOffsetX, GET_TEXT_F(MSG_HOME_OFFSET_X), onDrawPFloatMenu, SetHomeOffsetX, &home_offset[X_AXIS]); + ADDMENUITEM_P(ICON_HomeOffsetY, GET_TEXT_F(MSG_HOME_OFFSET_Y), onDrawPFloatMenu, SetHomeOffsetY, &home_offset[Y_AXIS]); + ADDMENUITEM_P(ICON_HomeOffsetZ, GET_TEXT_F(MSG_HOME_OFFSET_Z), onDrawPFloatMenu, SetHomeOffsetZ, &home_offset[Z_AXIS]); + } + CurrentMenu->draw(); + } +#endif + +#if HAS_BED_PROBE + void Draw_ProbeSet_Menu() { + checkkey = Menu; + if (ProbeSetMenu == nullptr) ProbeSetMenu = new MenuClass(); + if (CurrentMenu != ProbeSetMenu) { + CurrentMenu = ProbeSetMenu; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_ZPROBE_SETTINGS)); // TODO: Chinese, English "Probe Settings" JPG + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu); + ADDMENUITEM_P(ICON_ProbeOffsetX, GET_TEXT_F(MSG_ZPROBE_XOFFSET), onDrawPFloatMenu, SetProbeOffsetX, &probe.offset.x); + ADDMENUITEM_P(ICON_ProbeOffsetY, GET_TEXT_F(MSG_ZPROBE_YOFFSET), onDrawPFloatMenu, SetProbeOffsetY, &probe.offset.y); + ADDMENUITEM_P(ICON_ProbeOffsetZ, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetProbeOffsetZ, &probe.offset.z); + ADDMENUITEM(ICON_ProbeTest, GET_TEXT_F(MSG_M48_TEST), onDrawMenuItem, ProbeTest); + } + CurrentMenu->draw(); + } +#endif + +#if HAS_FILAMENT_SENSOR + void Draw_FilSet_Menu() { + checkkey = Menu; + if (FilSetMenu == nullptr) FilSetMenu = new MenuClass(); + if (CurrentMenu != FilSetMenu) { + CurrentMenu = FilSetMenu; + CurrentMenu->MenuTitle.SetCaption(GET_TEXT_F(MSG_FILAMENT_SET)); + DWINUI::MenuItemsPrepare(6); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); + #if HAS_FILAMENT_SENSOR + ADDMENUITEM(ICON_Runout, GET_TEXT_F(MSG_RUNOUT_ENABLE), onDrawRunoutEnable, SetRunoutEnable); + #endif + #if HAS_FILAMENT_RUNOUT_DISTANCE + ADDMENUITEM_P(ICON_Runout, F("Runout Distance"), onDrawPFloatMenu, SetRunoutDistance, &runout.runout_distance()); + #endif + #if ENABLED(PREVENT_COLD_EXTRUSION) + ADDMENUITEM_P(ICON_ExtrudeMinT, F("Extrude Min Temp."), onDrawPIntMenu, SetExtMinT, &HMI_data.ExtMinT); + #endif + #if ENABLED(ADVANCED_PAUSE_FEATURE) + ADDMENUITEM_P(ICON_FilLoad, GET_TEXT_F(MSG_FILAMENT_LOAD), onDrawPFloatMenu, SetFilLoad, &fc_settings[0].load_length); + ADDMENUITEM_P(ICON_FilUnload, GET_TEXT_F(MSG_FILAMENT_UNLOAD), onDrawPFloatMenu, SetFilUnload, &fc_settings[0].unload_length); + #endif + } + CurrentMenu->draw(); + } +#endif // HAS_FILAMENT_SENSOR + +void Draw_SelectColors_Menu() { + checkkey = Menu; + if (SelectColorMenu == nullptr) SelectColorMenu = new MenuClass(); + if (CurrentMenu != SelectColorMenu) { + CurrentMenu = SelectColorMenu; + SetMenuTitle({0}, {0}, F("Select Colors")); // TODO: Chinese, English "Select Color" JPG + DWINUI::MenuItemsPrepare(20); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_AdvancedSettings_Menu); + ADDMENUITEM(ICON_StockConfiguration, GET_TEXT_F(MSG_RESTORE_DEFAULTS), onDrawMenuItem, RestoreDefaultsColors); + ADDMENUITEM_P(0, "Screen Background", onDrawSelColorItem, SelColor, &HMI_data.Background_Color); + ADDMENUITEM_P(0, "Cursor", onDrawSelColorItem, SelColor, &HMI_data.Cursor_color); + ADDMENUITEM_P(0, "Title Background", onDrawSelColorItem, SelColor, &HMI_data.TitleBg_color); + ADDMENUITEM_P(0, "Title Text", onDrawSelColorItem, SelColor, &HMI_data.TitleTxt_color); + ADDMENUITEM_P(0, "Text", onDrawSelColorItem, SelColor, &HMI_data.Text_Color); + ADDMENUITEM_P(0, "Selected", onDrawSelColorItem, SelColor, &HMI_data.Selected_Color); + ADDMENUITEM_P(0, "Split Line", onDrawSelColorItem, SelColor, &HMI_data.SplitLine_Color); + ADDMENUITEM_P(0, "Highlight", onDrawSelColorItem, SelColor, &HMI_data.Highlight_Color); + ADDMENUITEM_P(0, "Status Background", onDrawSelColorItem, SelColor, &HMI_data.StatusBg_Color); + ADDMENUITEM_P(0, "Status Text", onDrawSelColorItem, SelColor, &HMI_data.StatusTxt_Color); + ADDMENUITEM_P(0, "Popup Background", onDrawSelColorItem, SelColor, &HMI_data.PopupBg_color); + ADDMENUITEM_P(0, "Popup Text", onDrawSelColorItem, SelColor, &HMI_data.PopupTxt_Color); + ADDMENUITEM_P(0, "Alert Background", onDrawSelColorItem, SelColor, &HMI_data.AlertBg_Color); + ADDMENUITEM_P(0, "Alert Text", onDrawSelColorItem, SelColor, &HMI_data.AlertTxt_Color); + ADDMENUITEM_P(0, "Percent Text", onDrawSelColorItem, SelColor, &HMI_data.PercentTxt_Color); + ADDMENUITEM_P(0, "Bar Fill", onDrawSelColorItem, SelColor, &HMI_data.Barfill_Color); + ADDMENUITEM_P(0, "Indicator value", onDrawSelColorItem, SelColor, &HMI_data.Indicator_Color); + ADDMENUITEM_P(0, "Coordinate value", onDrawSelColorItem, SelColor, &HMI_data.Coordinate_Color); + } + CurrentMenu->draw(); +} + +void Draw_GetColor_Menu() { + checkkey = Menu; + if (GetColorMenu == nullptr) GetColorMenu = new MenuClass(); + if (CurrentMenu != GetColorMenu) { + CurrentMenu = GetColorMenu; + SetMenuTitle({0}, {0}, F("Get Color")); // TODO: Chinese, English "Get Color" JPG + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, DWIN_ApplyColor); + ADDMENUITEM(ICON_Cancel, GET_TEXT_F(MSG_BUTTON_CANCEL), onDrawMenuItem, Draw_SelectColors_Menu); + ADDMENUITEM(0, "Red", onDrawGetColorItem, SetRGBColor); + ADDMENUITEM(1, "Green", onDrawGetColorItem, SetRGBColor); + ADDMENUITEM(2, "Blue", onDrawGetColorItem, SetRGBColor); + } + CurrentMenu->draw(); + DWIN_Draw_Rectangle(1, *HMI_value.P_Int, 20, 315, DWIN_WIDTH - 20, 335); +} + +void Draw_Tune_Menu() { + checkkey = Menu; + if (TuneMenu == nullptr) TuneMenu = new MenuClass(); + if (CurrentMenu != TuneMenu) { + CurrentMenu = TuneMenu; + SetMenuTitle({73, 2, 28, 12}, {94, 2, 33, 11}, GET_TEXT_F(MSG_TUNE)); // TODO: Chinese, English "Tune" JPG + DWINUI::MenuItemsPrepare(10); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Goto_PrintProcess); + ADDMENUITEM_P(ICON_Speed, GET_TEXT_F(MSG_SPEED), onDrawSpeedItem, SetSpeed, &feedrate_percentage); + #if HAS_HOTEND + HotendTargetItem = ADDMENUITEM_P(ICON_HotendTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target); + #endif + #if HAS_HEATED_BED + BedTargetItem = ADDMENUITEM_P(ICON_BedTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_BED), onDrawBedTemp, SetBedTemp, &thermalManager.temp_bed.target); + #endif + #if HAS_FAN + FanSpeedItem = ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT_F(MSG_FAN_SPEED), onDrawFanSpeed, SetFanSpeed, &thermalManager.fan_speed[0]); + #endif + #if HAS_ZOFFSET_ITEM && EITHER(HAS_BED_PROBE, BABYSTEPPING) + ADDMENUITEM_P(ICON_Zoffset, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawZOffset, SetZOffset, &BABY_Z_VAR); + #endif + ADDMENUITEM_P(ICON_Flow, GET_TEXT_F(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]); + #if ENABLED(ADVANCED_PAUSE_FEATURE) + ADDMENUITEM(ICON_FilMan, GET_TEXT_F(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament); + #endif + ADDMENUITEM(ICON_Lock, F("Lock Screen"), onDrawMenuItem, Goto_LockScreen); + #if HAS_LCD_BRIGHTNESS + ADDMENUITEM_P(ICON_Brightness, F("LCD Brightness"), onDrawPInt8Menu, SetBrightness, &ui.brightness); + #endif + } + CurrentMenu->draw(); +} + +void Draw_Motion_Menu() { + checkkey = Menu; + if (MotionMenu == nullptr) MotionMenu = new MenuClass(); + if (CurrentMenu != MotionMenu) { + CurrentMenu = MotionMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_MOTION)); // TODO: Chinese, English "Motion" JPG + DWINUI::MenuItemsPrepare(6); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu); + ADDMENUITEM(ICON_MaxSpeed, GET_TEXT_F(MSG_SPEED), onDrawSpeed, Draw_MaxSpeed_Menu); + ADDMENUITEM(ICON_MaxAccelerated, GET_TEXT_F(MSG_ACCELERATION), onDrawAcc, Draw_MaxAccel_Menu); + #if HAS_CLASSIC_JERK + ADDMENUITEM(ICON_MaxJerk, GET_TEXT_F(MSG_JERK), onDrawJerk, Draw_MaxJerk_Menu); + #endif + ADDMENUITEM(ICON_Step, GET_TEXT_F(MSG_STEPS_PER_MM), onDrawSteps, Draw_Steps_Menu); + ADDMENUITEM_P(ICON_Flow, GET_TEXT_F(MSG_FLOW), onDrawPIntMenu, SetFlow, &planner.flow_percentage[0]); + } + CurrentMenu->draw(); +} + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void Draw_FilamentMan_Menu() { + checkkey = Menu; + if (FilamentMenu == nullptr) FilamentMenu = new MenuClass(); + if (CurrentMenu != FilamentMenu) { + CurrentMenu = FilamentMenu; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_FILAMENT_MAN)); // TODO: Chinese, English "Filament Management" JPG + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu); + ADDMENUITEM(ICON_Park, GET_TEXT_F(MSG_FILAMENT_PARK_ENABLED), onDrawMenuItem, ParkHead); + ADDMENUITEM(ICON_FilMan, GET_TEXT_F(MSG_FILAMENTCHANGE), onDrawMenuItem, ChangeFilament); + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + ADDMENUITEM(ICON_FilUnload, GET_TEXT_F(MSG_FILAMENTUNLOAD), onDrawMenuItem, UnloadFilament); + ADDMENUITEM(ICON_FilLoad, GET_TEXT_F(MSG_FILAMENTLOAD), onDrawMenuItem, LoadFilament); + #endif + } + CurrentMenu->draw(); + } +#endif + +#if ENABLED(MESH_BED_LEVELING) + void Draw_ManualMesh_Menu() { + checkkey = Menu; + if (ManualMesh == nullptr) ManualMesh = new MenuClass(); + if (CurrentMenu != ManualMesh) { + CurrentMenu = ManualMesh; + SetMenuTitle({0}, {0}, GET_TEXT_F(MSG_MANUAL_MESH)); // TODO: Chinese, English "Manual Mesh Leveling" JPG + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Prepare_Menu); + ADDMENUITEM(ICON_ManualMesh, GET_TEXT_F(MSG_LEVEL_BED), onDrawMenuItem, ManualMeshStart); + MMeshMoveZItem = ADDMENUITEM_P(ICON_Zoffset, GET_TEXT_F(MSG_MOVE_Z), onDrawMMeshMoveZ, SetMMeshMoveZ, ¤t_position.z); + ADDMENUITEM(ICON_Axis, GET_TEXT_F(MSG_UBL_CONTINUE_MESH), onDrawMenuItem, ManualMeshContinue); + ADDMENUITEM(ICON_MeshViewer, GET_TEXT_F(MSG_MESH_VIEW), onDrawSubMenu, DWIN_MeshViewer); + ADDMENUITEM(ICON_MeshSave, GET_TEXT_F(MSG_UBL_SAVE_MESH), onDrawMenuItem, ManualMeshSave); + } + CurrentMenu->draw(); + } +#endif + +#if HAS_PREHEAT + + void Draw_Preheat_Menu(frame_rect_t cn, frame_rect_t en, const __FlashStringHelper* text) { + checkkey = Menu; + if (CurrentMenu != PreheatMenu) { + CurrentMenu = PreheatMenu; + SetMenuTitle(cn, en, text); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Temperature_Menu); + #if HAS_HOTEND + ADDMENUITEM_P(ICON_SetEndTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawSetPreheatHotend, SetPreheatEndTemp, &ui.material_preset[HMI_value.Preheat].hotend_temp); + #endif + #if HAS_HEATED_BED + ADDMENUITEM_P(ICON_SetBedTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_BED), onDrawSetPreheatBed, SetPreheatBedTemp, &ui.material_preset[HMI_value.Preheat].bed_temp); + #endif + #if HAS_FAN + ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT_F(MSG_FAN_SPEED), onDrawSetPreheatFan, SetPreheatFanSpeed, &ui.material_preset[HMI_value.Preheat].fan_speed); + #endif + #if ENABLED(EEPROM_SETTINGS) + ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT_F(MSG_STORE_EEPROM), onDrawWriteEeprom, WriteEeprom); + #endif + } + CurrentMenu->draw(); + } + + void Draw_Preheat1_Menu() { + HMI_value.Preheat = 0; + if (PreheatMenu == nullptr) PreheatMenu = new MenuClass(); + Draw_Preheat_Menu({59, 16, 81, 14}, {56, 15, 85, 14}, F(PREHEAT_1_LABEL " Preheat Settings")); // TODO: English "PLA Settings" JPG + } + + void Draw_Preheat2_Menu() { + HMI_value.Preheat = 1; + if (PreheatMenu == nullptr) PreheatMenu = new MenuClass(); + Draw_Preheat_Menu({142, 16, 82, 14}, {56, 15, 85, 14}, F(PREHEAT_2_LABEL " Preheat Settings")); // TODO: English "ABS Settings" JPG + } + + #ifdef PREHEAT_3_LABEL + void Draw_Preheat3_Menu() { + HMI_value.Preheat = 2; + if (PreheatMenu == nullptr) PreheatMenu = new MenuClass(); + #define PREHEAT_3_TITLE PREHEAT_3_LABEL " Preheat Set." + Draw_Preheat_Menu({0}, {0}, F(PREHEAT_3_TITLE)); // TODO: Chinese, English "Custom Preheat Settings" JPG + } + #endif + +#endif // HAS_PREHEAT + +void Draw_Temperature_Menu() { + checkkey = Menu; + if (TemperatureMenu == nullptr) TemperatureMenu = new MenuClass(); + if (CurrentMenu != TemperatureMenu) { + CurrentMenu = TemperatureMenu; + SetMenuTitle({236, 2, 28, 12}, {56, 15, 85, 14}, GET_TEXT_F(MSG_TEMPERATURE)); + DWINUI::MenuItemsPrepare(7); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Control_Menu); + #if HAS_HOTEND + HotendTargetItem = ADDMENUITEM_P(ICON_SetEndTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_HOTEND), onDrawHotendTemp, SetHotendTemp, &thermalManager.temp_hotend[0].target); + #endif + #if HAS_HEATED_BED + BedTargetItem = ADDMENUITEM_P(ICON_SetBedTemp, GET_TEXT_F(MSG_UBL_SET_TEMP_BED), onDrawBedTemp, SetBedTemp, &thermalManager.temp_bed.target); + #endif + #if HAS_FAN + FanSpeedItem = ADDMENUITEM_P(ICON_FanSpeed, GET_TEXT_F(MSG_FAN_SPEED), onDrawFanSpeed, SetFanSpeed, &thermalManager.fan_speed[0]); + #endif + #if HAS_HOTEND + ADDMENUITEM(ICON_SetPLAPreheat, F(PREHEAT_1_LABEL " Preheat Settings"), onDrawPLAPreheatSubMenu, Draw_Preheat1_Menu); + ADDMENUITEM(ICON_SetABSPreheat, F(PREHEAT_2_LABEL " Preheat Settings"), onDrawABSPreheatSubMenu, Draw_Preheat2_Menu); + #ifdef PREHEAT_3_LABEL + ADDMENUITEM(ICON_SetCustomPreheat, PREHEAT_3_TITLE, onDrawSubMenu, Draw_Preheat3_Menu); + #endif + #endif + } + CurrentMenu->draw(); +} + +void Draw_MaxSpeed_Menu() { + checkkey = Menu; + if (MaxSpeedMenu == nullptr) MaxSpeedMenu = new MenuClass(); + if (CurrentMenu != MaxSpeedMenu) { + CurrentMenu = MaxSpeedMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_MAXSPEED)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu); + ADDMENUITEM_P(ICON_MaxSpeedX, GET_TEXT_F(MSG_MAXSPEED_X), onDrawMaxSpeedX, SetMaxSpeedX, &planner.settings.max_feedrate_mm_s[X_AXIS]); + ADDMENUITEM_P(ICON_MaxSpeedY, GET_TEXT_F(MSG_MAXSPEED_Y), onDrawMaxSpeedY, SetMaxSpeedY, &planner.settings.max_feedrate_mm_s[Y_AXIS]); + ADDMENUITEM_P(ICON_MaxSpeedZ, GET_TEXT_F(MSG_MAXSPEED_Z), onDrawMaxSpeedZ, SetMaxSpeedZ, &planner.settings.max_feedrate_mm_s[Z_AXIS]); + #if HAS_HOTEND + ADDMENUITEM_P(ICON_MaxSpeedE, GET_TEXT_F(MSG_MAXSPEED_E), onDrawMaxSpeedE, SetMaxSpeedE, &planner.settings.max_feedrate_mm_s[Z_AXIS]); + #endif + } + CurrentMenu->draw(); +} + +void Draw_MaxAccel_Menu() { + checkkey = Menu; + if (MaxAccelMenu == nullptr) MaxAccelMenu = new MenuClass(); + if (CurrentMenu != MaxAccelMenu) { + CurrentMenu = MaxAccelMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_ACCELERATION)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu); + ADDMENUITEM_P(ICON_MaxAccX, GET_TEXT_F(MSG_AMAX_A), onDrawMaxAccelX, SetMaxAccelX, &planner.settings.max_acceleration_mm_per_s2[X_AXIS]); + ADDMENUITEM_P(ICON_MaxAccY, GET_TEXT_F(MSG_AMAX_B), onDrawMaxAccelY, SetMaxAccelY, &planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); + ADDMENUITEM_P(ICON_MaxAccZ, GET_TEXT_F(MSG_AMAX_C), onDrawMaxAccelZ, SetMaxAccelZ, &planner.settings.max_acceleration_mm_per_s2[Z_AXIS]); + #if HAS_HOTEND + ADDMENUITEM_P(ICON_MaxAccE, GET_TEXT_F(MSG_AMAX_E), onDrawMaxAccelE, SetMaxAccelE, &planner.settings.max_acceleration_mm_per_s2[E_AXIS]); + #endif + } + CurrentMenu->draw(); +} + +#if HAS_CLASSIC_JERK + void Draw_MaxJerk_Menu() { + checkkey = Menu; + if (MaxJerkMenu == nullptr) MaxJerkMenu = new MenuClass(); + if (CurrentMenu != MaxJerkMenu) { + CurrentMenu = MaxJerkMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_JERK)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu); + ADDMENUITEM_P(ICON_MaxSpeedJerkX, GET_TEXT_F(MSG_VA_JERK), onDrawMaxJerkX, SetMaxJerkX, &planner.max_jerk[X_AXIS]); + ADDMENUITEM_P(ICON_MaxSpeedJerkY, GET_TEXT_F(MSG_VB_JERK), onDrawMaxJerkY, SetMaxJerkY, &planner.max_jerk[Y_AXIS]); + ADDMENUITEM_P(ICON_MaxSpeedJerkZ, GET_TEXT_F(MSG_VC_JERK), onDrawMaxJerkZ, SetMaxJerkZ, &planner.max_jerk[Z_AXIS]); + #if HAS_HOTEND + ADDMENUITEM_P(ICON_MaxSpeedJerkE, GET_TEXT_F(MSG_VE_JERK), onDrawMaxJerkE, SetMaxJerkE, &planner.max_jerk[E_AXIS]); + #endif + } + CurrentMenu->draw(); + } +#endif + +void Draw_Steps_Menu() { + checkkey = Menu; + if (StepsMenu == nullptr) StepsMenu = new MenuClass(); + if (CurrentMenu != StepsMenu) { + CurrentMenu = StepsMenu; + SetMenuTitle({1, 16, 28, 13}, {144, 16, 46, 11}, GET_TEXT_F(MSG_STEPS_PER_MM)); + DWINUI::MenuItemsPrepare(5); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawBack, Draw_Motion_Menu); + ADDMENUITEM_P(ICON_StepX, GET_TEXT_F(MSG_A_STEPS), onDrawStepsX, SetStepsX, &planner.settings.axis_steps_per_mm[X_AXIS]); + ADDMENUITEM_P(ICON_StepY, GET_TEXT_F(MSG_B_STEPS), onDrawStepsY, SetStepsY, &planner.settings.axis_steps_per_mm[Y_AXIS]); + ADDMENUITEM_P(ICON_StepZ, GET_TEXT_F(MSG_C_STEPS), onDrawStepsZ, SetStepsZ, &planner.settings.axis_steps_per_mm[Z_AXIS]); + #if HAS_HOTEND + ADDMENUITEM_P(ICON_StepE, GET_TEXT_F(MSG_E_STEPS), onDrawStepsE, SetStepsE, &planner.settings.axis_steps_per_mm[E_AXIS]); + #endif + } + CurrentMenu->draw(); +} + +#if HAS_HOTEND + void Draw_HotendPID_Menu() { + checkkey = Menu; + if (HotendPIDMenu == nullptr) HotendPIDMenu = new MenuClass(); + if (CurrentMenu != HotendPIDMenu) { + CurrentMenu = HotendPIDMenu; + CurrentMenu->MenuTitle.SetCaption(F("Hotend PID Settings")); + DWINUI::MenuItemsPrepare(8); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); + ADDMENUITEM(ICON_PIDNozzle, F("Hotend PID"), onDrawMenuItem, HotendPID); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_hotend[0].pid.Kp); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_hotend[0].pid.Ki); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_hotend[0].pid.Kd); + ADDMENUITEM_P(ICON_Temperature, GET_TEXT_F(MSG_TEMPERATURE), onDrawPIntMenu, SetHotendPidT, &HMI_data.HotendPidT); + ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT_F(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles); + #if ENABLED(EEPROM_SETTINGS) + ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT_F(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom); + #endif + } + CurrentMenu->draw(); + } +#endif + +#if HAS_HEATED_BED + void Draw_BedPID_Menu() { + checkkey = Menu; + if (BedPIDMenu == nullptr) BedPIDMenu = new MenuClass(); + if (CurrentMenu != BedPIDMenu) { + CurrentMenu = BedPIDMenu; + CurrentMenu->MenuTitle.SetCaption(F("Bed PID Settings")); + DWINUI::MenuItemsPrepare(8); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_AdvancedSettings_Menu); + ADDMENUITEM(ICON_PIDNozzle, F("Bed PID"), onDrawMenuItem,BedPID); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KP), onDrawPFloat2Menu, SetKp, &thermalManager.temp_bed.pid.Kp); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KI), onDrawPIDi, SetKi, &thermalManager.temp_bed.pid.Ki); + ADDMENUITEM_P(ICON_PIDValue, F("Set" STR_KD), onDrawPIDd, SetKd, &thermalManager.temp_bed.pid.Kd); + ADDMENUITEM_P(ICON_Temperature, GET_TEXT_F(MSG_TEMPERATURE), onDrawPIntMenu, SetBedPidT, &HMI_data.BedPidT); + ADDMENUITEM_P(ICON_PIDcycles, GET_TEXT_F(MSG_PID_CYCLE), onDrawPIntMenu, SetPidCycles, &HMI_data.PidCycles); + #if ENABLED(EEPROM_SETTINGS) + ADDMENUITEM(ICON_WriteEEPROM, GET_TEXT_F(MSG_STORE_EEPROM), onDrawMenuItem, WriteEeprom); + #endif + } + CurrentMenu->draw(); + } +#endif + +#if EITHER(HAS_BED_PROBE, BABYSTEPPING) + void Draw_ZOffsetWiz_Menu() { + checkkey = Menu; + if (ZOffsetWizMenu == nullptr) ZOffsetWizMenu = new MenuClass(); + if (CurrentMenu != ZOffsetWizMenu) { + CurrentMenu = ZOffsetWizMenu; + CurrentMenu->MenuTitle.SetCaption(GET_TEXT_F(MSG_PROBE_WIZARD)); + DWINUI::MenuItemsPrepare(4); + ADDMENUITEM(ICON_Back, GET_TEXT_F(MSG_BUTTON_BACK), onDrawMenuItem, Draw_Prepare_Menu); + ADDMENUITEM(ICON_Homing, GET_TEXT_F(MSG_AUTO_HOME), onDrawMenuItem, AutoHome); + ADDMENUITEM(ICON_MoveZ0, F("Move Z to Home"), onDrawMenuItem, SetMoveZto0); + ADDMENUITEM_P(ICON_Zoffset, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetZOffset, &BABY_Z_VAR); + } + CurrentMenu->draw(); + if (!axis_is_trusted(Z_AXIS)) ui.set_status_P(PSTR("WARNING: Z position is unknow, move Z to home")); + } +#endif + +#endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin.h b/Marlin/src/lcd/e3v2/enhanced/dwin.h new file mode 100644 index 000000000000..f71d54b482a8 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin.h @@ -0,0 +1,290 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.3 + * Date: 2021/09/08 + */ + +#include "../../../inc/MarlinConfigPre.h" +#include "dwinui.h" +#include "../common/encoder.h" +#include "../../../libs/BL24CXX.h" + +#if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_FAN) && PREHEAT_COUNT + #define HAS_PREHEAT 1 + #if PREHEAT_COUNT < 2 + #error "Creality DWIN requires two material preheat presets." + #endif +#endif + +#if ANY(AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_LINEAR, AUTO_BED_LEVELING_3POINT) && DISABLED(PROBE_MANUALLY) + #define HAS_ONESTEP_LEVELING 1 +#endif + +#if !HAS_BED_PROBE && ENABLED(BABYSTEPPING) + #define JUST_BABYSTEP 1 +#endif + +#if ANY(BABYSTEPPING, HAS_BED_PROBE, HAS_WORKSPACE_OFFSET) + #define HAS_ZOFFSET_ITEM 1 +#endif + +static constexpr size_t eeprom_data_size = 64; + +enum processID : uint8_t { + // Process ID + MainMenu, + Menu, + SetInt, + SetPInt, + SetIntNoDraw, + SetFloat, + SetPFloat, + SelectFile, + PrintProcess, + PrintDone, + Info, + + // Popup Windows + Homing, + Leveling, + PauseOrStop, + FilamentPurge, + WaitResponse, + Locked, + NothingToDo, +}; + +enum pidresult_t : uint8_t { + PID_BAD_EXTRUDER_NUM, + PID_TEMP_TOO_HIGH, + PID_TUNING_TIMEOUT, + PID_EXTR_START, + PID_BED_START, + PID_DONE +}; + +#define DWIN_CHINESE 123 +#define DWIN_ENGLISH 0 + +typedef struct { + int8_t Color[3]; // Color components + int8_t Preheat = 0; // Material Select 0: PLA, 1: ABS, 2: Custom + AxisEnum axis = X_AXIS; // Axis Select + int32_t MaxValue = 0; // Auxiliar max integer/scaled float value + int32_t MinValue = 0; // Auxiliar min integer/scaled float value + int8_t dp = 0; // Auxiliar decimal places + int32_t Value = 0; // Auxiliar integer / scaled float value + int16_t *P_Int = nullptr; // Auxiliar pointer to 16 bit integer variable + float *P_Float = nullptr; // Auxiliar pointer to float variable + void (*Apply)() = nullptr; // Auxiliar apply function + void (*LiveUpdate)() = nullptr; // Auxiliar live update function +} HMI_value_t; + +typedef struct { + uint16_t Background_Color = Def_Background_Color; + uint16_t Cursor_color = Def_Cursor_color; + uint16_t TitleBg_color = Def_TitleBg_color; + uint16_t TitleTxt_color = Def_TitleTxt_color; + uint16_t Text_Color = Def_Text_Color; + uint16_t Selected_Color = Def_Selected_Color; + uint16_t SplitLine_Color = Def_SplitLine_Color; + uint16_t Highlight_Color = Def_Highlight_Color; + uint16_t StatusBg_Color = Def_StatusBg_Color; + uint16_t StatusTxt_Color = Def_StatusTxt_Color; + uint16_t PopupBg_color = Def_PopupBg_color; + uint16_t PopupTxt_Color = Def_PopupTxt_Color; + uint16_t AlertBg_Color = Def_AlertBg_Color; + uint16_t AlertTxt_Color = Def_AlertTxt_Color; + uint16_t PercentTxt_Color = Def_PercentTxt_Color; + uint16_t Barfill_Color = Def_Barfill_Color; + uint16_t Indicator_Color = Def_Indicator_Color; + uint16_t Coordinate_Color = Def_Coordinate_Color; + #if HAS_HOTEND + int16_t HotendPidT = PREHEAT_1_TEMP_HOTEND; + int16_t PidCycles = 10; + #endif + #ifdef PREHEAT_1_TEMP_BED + int16_t BedPidT = PREHEAT_1_TEMP_BED; + #endif + #if ENABLED(PREVENT_COLD_EXTRUSION) + int16_t ExtMinT = EXTRUDE_MINTEMP; + #endif +} HMI_data_t; + +typedef struct { + uint8_t language; + bool pause_flag:1; // printing is paused + bool pause_action:1; // flag a pause action + bool print_finish:1; // print was finished + bool select_flag:1; // Popup button selected + bool home_flag:1; // homing in course + bool heat_flag:1; // 0: heating done 1: during heating + bool lock_flag:1; // 0: lock called from AdvSet 1: lock called from Tune +} HMI_flag_t; + +extern HMI_value_t HMI_value; +extern HMI_flag_t HMI_flag; +extern HMI_data_t HMI_data; +extern uint8_t checkkey; +extern millis_t dwin_heat_time; + +// SD Card +void HMI_SDCardInit(); +void HMI_SDCardUpdate(); + +// Other +void Goto_PrintProcess(); +void Goto_Main_Menu(); +void Draw_Select_Highlight(const bool sel); +void Draw_Status_Area(const bool with_update); // Status Area +void Draw_Main_Area(); // Redraw main area; +void DWIN_Redraw_screen(); // Redraw all screen elements +void HMI_StartFrame(const bool with_update); // Prepare the menu view +void HMI_MainMenu(); // Main process screen +void HMI_SelectFile(); // File page +void HMI_Printing(); // Print page +void HMI_ReturnScreen(); // Return to previous screen before popups +void ApplyExtMinT(); +void HMI_SetLanguageCache(); // Set the languaje image cache + +void HMI_Init(); +void HMI_Popup(); +void HMI_SaveProcessID(const uint8_t id); +void HMI_AudioFeedback(const bool success=true); +void EachMomentUpdate(); +void update_variable(); +void DWIN_HandleScreen(); +void DWIN_Update(); +void DWIN_DrawStatusLine(const uint16_t color, const uint16_t bgcolor, const char *text); +void DWIN_StatusChanged(const char * const text); +void DWIN_StatusChanged_P(PGM_P const text); +void DWIN_StartHoming(); +void DWIN_CompletedHoming(); +#if HAS_MESH + void DWIN_MeshUpdate(const int8_t xpos, const int8_t ypos, const float zval); +#endif +void DWIN_MeshLevelingStart(); +void DWIN_CompletedLeveling(); +void DWIN_PidTuning(pidresult_t result); +void DWIN_Print_Started(const bool sd = false); +void DWIN_Print_Finished(); +#if HAS_FILAMENT_SENSOR + void DWIN_FilamentRunout(const uint8_t extruder); +#endif +void DWIN_Progress_Update(); +void DWIN_Print_Header(const char *text); +void DWIN_SetColorDefaults(); +void DWIN_StoreSettings(char *buff); +void DWIN_LoadSettings(const char *buff); +void DWIN_SetDataDefaults(); +void DWIN_RebootScreen(); + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void Draw_Popup_FilamentPurge(); + void DWIN_Popup_FilamentPurge(); + void HMI_FilamentPurge(); +#endif + +// Utility and extensions +void HMI_LockScreen(); +void DWIN_LockScreen(const bool flag = true); +#if HAS_MESH + void DWIN_MeshViewer(); +#endif + +// HMI user control functions +void HMI_Menu(); +void HMI_SetInt(); +void HMI_SetPInt(); +void HMI_SetIntNoDraw(); +void HMI_SetFloat(); +void HMI_SetPFloat(); + +// Menu drawing functions +void Draw_Control_Menu(); +void Draw_AdvancedSettings_Menu(); +void Draw_Prepare_Menu(); +void Draw_Move_Menu(); +void Draw_LevBedCorners_Menu(); +#if HAS_HOME_OFFSET + void Draw_HomeOffset_Menu(); +#endif +#if HAS_BED_PROBE + void Draw_ProbeSet_Menu(); +#endif +#if HAS_FILAMENT_SENSOR + void Draw_FilSet_Menu(); +#endif +void Draw_SelectColors_Menu(); +void Draw_GetColor_Menu(); +void Draw_Tune_Menu(); +void Draw_Motion_Menu(); +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void Draw_FilamentMan_Menu(); +#endif +#if ENABLED(MESH_BED_LEVELING) + void Draw_ManualMesh_Menu(); +#endif +#if HAS_HOTEND + void Draw_Preheat1_Menu(); + void Draw_Preheat2_Menu(); + void Draw_Preheat3_Menu(); + void Draw_HotendPID_Menu(); +#endif +void Draw_Temperature_Menu(); +void Draw_MaxSpeed_Menu(); +void Draw_MaxAccel_Menu(); +#if HAS_CLASSIC_JERK + void Draw_MaxJerk_Menu(); +#endif +void Draw_Steps_Menu(); +#if HAS_HEATED_BED + void Draw_BedPID_Menu(); +#endif +#if EITHER(HAS_BED_PROBE, BABYSTEPPING) + void Draw_ZOffsetWiz_Menu(); +#endif + +// Popup windows + +void DWIN_Draw_Popup(const uint8_t icon, const char * const cmsg1, FSTR_P const fmsg2, uint8_t button=0); +void DWIN_Draw_Popup(const uint8_t icon, FSTR_P const fmsg1=nullptr, FSTR_P const fmsg2=nullptr, uint8_t button=0); + +template +void DWIN_Popup_Confirm(const uint8_t icon, T amsg1, U amsg2) { + HMI_SaveProcessID(WaitResponse); + DWIN_Draw_Popup(icon, amsg1, amsg2, ICON_Confirm_E); // Button Confirm + DWIN_UpdateLCD(); +} + +#if HAS_HOTEND || HAS_HEATED_BED + void DWIN_Popup_Temperature(const bool toohigh); +#endif +#if HAS_HOTEND + void Popup_Window_ETempTooLow(); +#endif +void Popup_Window_Resume(); diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp new file mode 100644 index 000000000000..93477be0b871 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.cpp @@ -0,0 +1,160 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.3 + * Date: 2021/09/08 + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + +#include "../../../inc/MarlinConfig.h" + +#include "dwin_lcd.h" + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Display QR code +// The size of the QR code is (46*QR_Pixel)*(46*QR_Pixel) dot matrix +// QR_Pixel: The pixel size occupied by each point of the QR code: 0x01-0x0F (1-16) +// (Nx, Ny): The coordinates of the upper left corner displayed by the QR code +// str: multi-bit data +void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, char *string) { + size_t i = 0; + DWIN_Byte(i, 0x21); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Byte(i, QR_Pixel); + DWIN_Text(i, string); + DWIN_Send(i); +} + +// Draw an Icon with transparent background +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { + DWIN_ICON_Show(false, false, true, libID, picID, x, y); +} + +// Copy area from current virtual display area to current screen +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x26); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +// Copy area from virtual display area to current screen +// IBD: background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(bool IBD, bool BIR, bool BFI, uint8_t cacheID, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { + size_t i = 0; + DWIN_Byte(i, 0x27); + DWIN_Byte(i, (IBD & 1) << 7 | (BIR & 1) << 6 | (BFI & 1) << 5 | cacheID); + DWIN_Word(i, xStart); + DWIN_Word(i, yStart); + DWIN_Word(i, xEnd); + DWIN_Word(i, yEnd); + DWIN_Word(i, x); + DWIN_Word(i, y); + DWIN_Send(i); +} + +// Copy area from virtual display area to current screen with transparent background +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y) { + DWIN_Frame_AreaCopy(false, false, true, cacheID, xStart, yStart, xEnd, yEnd, x, y); +} + +// Write buffer data to the SRAM or Flash +// mem: 0x5A=32KB SRAM, 0xA5=16KB Flash +// addr: start address +// length: Bytes to write +// data: address of the buffer with data +void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data) { + const uint8_t max_size = 128; + uint16_t pending = length; + uint16_t to_send; + uint16_t indx; + uint8_t block = 0; + + while (pending > 0) { + indx = block * max_size; + to_send = _MIN(pending, max_size); + size_t i = 0; + DWIN_Byte(i, 0x31); + DWIN_Byte(i, mem); + DWIN_Word(i, addr + indx); // start address of the data block + ++i; + LOOP_L_N(j, i) { LCD_SERIAL.write(DWIN_SendBuf[j]); delayMicroseconds(1); } // Buf header + for (uint16_t j = indx; j <= indx + to_send - 1; j++) LCD_SERIAL.write(*(data + j)); delayMicroseconds(1); // write block of data + LOOP_L_N(j, 4) { LCD_SERIAL.write(DWIN_BufTail[j]); delayMicroseconds(1); } + block++; + pending -= to_send; + } +} + +// Write the contents of the 32KB SRAM data memory into the designated image memory space. +// picID: Picture memory space location, 0x00-0x0F, each space is 32Kbytes +void DWIN_SRAMToPic(uint8_t picID) { + size_t i = 0; + DWIN_Byte(i, 0x33); + DWIN_Byte(i, 0x5A); + DWIN_Byte(i, 0xA5); + DWIN_Byte(i, picID); + DWIN_Send(i); +} + +//--------------------------Test area ------------------------- + +//void DWIN_ReadSRAM(uint16_t addr, uint8_t length, const char * const data) { +// size_t i = 0; +// DWIN_Byte(i, 0x32); +// DWIN_Byte(i, 0x5A); // 0x5A Read from SRAM - 0xA5 Read from Flash +// DWIN_Word(i, addr); // 0x0000 to 0x7FFF +// const size_t len = _MIN(0xF0, length); +// DWIN_Byte(i, len); +// DWIN_Send(i); +//} + +#endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h new file mode 100644 index 000000000000..c49f23af45db --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwin_lcd.h @@ -0,0 +1,83 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.3 + * Date: 2021/09/08 + */ + +#include "../common/dwin_api.h" + +// Display QR code +// The size of the QR code is (46*QR_Pixel)*(46*QR_Pixel) dot matrix +// QR_Pixel: The pixel size occupied by each point of the QR code: 0x01-0x0F (1-16) +// (Nx, Ny): The coordinates of the upper left corner displayed by the QR code +// str: multi-bit data +void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, char *string); + +inline void DWIN_Draw_QR(uint8_t QR_Pixel, uint16_t x, uint16_t y, FSTR_P title) { + DWIN_Draw_QR(QR_Pixel, x, y, (char *)title); +} + +// Copy area from virtual display area to current screen +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); + +// Copy area from virtual display area to current screen +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint8_t cacheID, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); + +// Copy area from current virtual display area to current screen +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); + +// Copy area from virtual display area to current screen +// IBD: background display: 0=Background filtering is not displayed, 1=Background display \\When setting the background filtering not to display, the background must be pure black +// BIR: Background image restoration: 0=Background image is not restored, 1=Automatically use virtual display area image for background restoration +// BFI: Background filtering strength: 0=normal, 1=enhanced, (only valid when the icon background display=0) +// cacheID: virtual area number +// xStart/yStart: Upper-left of virtual area +// xEnd/yEnd: Lower-right of virtual area +// x/y: Screen paste point +void DWIN_Frame_AreaCopy(bool IBD, bool BIR, bool BFI, uint8_t cacheID, uint16_t xStart, uint16_t yStart, uint16_t xEnd, uint16_t yEnd, uint16_t x, uint16_t y); + +// Write buffer data to the SRAM or Flash +// mem: 0x5A=32KB SRAM, 0xA5=16KB Flash +// addr: start address +// length: Bytes to write +// data: address of the buffer with data +void DWIN_WriteToMem(uint8_t mem, uint16_t addr, uint16_t length, uint8_t *data); + +// Write the contents of the 32KB SRAM data memory into the designated image memory space. +// picID: Picture memory space location, 0x00-0x0F, each space is 32Kbytes +void DWIN_SRAMToPic(uint8_t picID); diff --git a/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp b/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp new file mode 100644 index 000000000000..6c46eb31f105 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwinui.cpp @@ -0,0 +1,453 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.3 + * Date: 2021/09/08 + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + +#include "../../../inc/MarlinConfig.h" +#include "dwin_lcd.h" +#include "dwinui.h" + +//#define DEBUG_OUT 1 +#include "../../../core/debug_out.h" + +uint8_t MenuItemTotal = 0; +uint8_t MenuItemCount = 0; +MenuItemClass** MenuItems = nullptr; +MenuClass *CurrentMenu = nullptr; +MenuClass *PreviousMenu = nullptr; + +xy_int_t DWINUI::cursor = { 0 }; +uint16_t DWINUI::pencolor = Color_White; +uint16_t DWINUI::textcolor = Def_Text_Color; +uint16_t DWINUI::backcolor = Def_Background_Color; +uint8_t DWINUI::font = font8x16; + +void (*DWINUI::onCursorErase)(uint8_t line)=nullptr; +void (*DWINUI::onCursorDraw)(uint8_t line)=nullptr; +void (*DWINUI::onTitleDraw)(TitleClass* title)=nullptr; +void (*DWINUI::onMenuDraw)(MenuClass* menu)=nullptr; + +void DWINUI::init() { + DEBUG_ECHOPGM("\r\nDWIN handshake "); + delay(750); // Delay here or init later in the boot process + const bool success = DWIN_Handshake(); + if (success) DEBUG_ECHOLNPGM("ok."); else DEBUG_ECHOLNPGM("error."); + DWIN_Frame_SetDir(1); + TERN(SHOW_BOOTSCREEN,,DWIN_Frame_Clear(Color_Bg_Black)); + DWIN_UpdateLCD(); + cursor.x = 0; + cursor.y = 0; + pencolor = Color_White; + textcolor = Def_Text_Color; + backcolor = Def_Background_Color; + font = font8x16; +} + +// Set text/number font +void DWINUI::setFont(uint8_t cfont) { + font = cfont; +} + +// Get font character width +uint8_t DWINUI::fontWidth(uint8_t cfont) { + switch (cfont) { + case font6x12 : return 6; + case font8x16 : return 8; + case font10x20: return 10; + case font12x24: return 12; + case font14x28: return 14; + case font16x32: return 16; + case font20x40: return 20; + case font24x48: return 24; + case font28x56: return 28; + case font32x64: return 32; + default: return 0; + } +} + +// Get font character heigh +uint8_t DWINUI::fontHeight(uint8_t cfont) { + switch (cfont) { + case font6x12 : return 12; + case font8x16 : return 16; + case font10x20: return 20; + case font12x24: return 24; + case font14x28: return 28; + case font16x32: return 32; + case font20x40: return 40; + case font24x48: return 48; + case font28x56: return 56; + case font32x64: return 64; + default: return 0; + } +} + +// Get screen x coodinates from text column +uint16_t DWINUI::ColToX(uint8_t col) { + return col * fontWidth(font); +} + +// Get screen y coodinates from text row +uint16_t DWINUI::RowToY(uint8_t row) { + return row * fontHeight(font); +} + +// Set text/number color +void DWINUI::SetColors(uint16_t fgcolor, uint16_t bgcolor) { + textcolor = fgcolor; + backcolor = bgcolor; +} +void DWINUI::SetTextColor(uint16_t fgcolor) { + textcolor = fgcolor; +} +void DWINUI::SetBackgroundColor(uint16_t bgcolor) { + backcolor = bgcolor; +} + +// Moves cursor to point +// x: abscissa of the display +// y: ordinate of the display +// point: xy coordinate +void DWINUI::MoveTo(int16_t x, int16_t y) { + cursor.x = x; + cursor.y = y; +} +void DWINUI::MoveTo(xy_int_t point) { + cursor = point; +} + +// Moves cursor relative to the actual position +// x: abscissa of the display +// y: ordinate of the display +// point: xy coordinate +void DWINUI::MoveBy(int16_t x, int16_t y) { + cursor.x += x; + cursor.y += y; +} +void DWINUI::MoveBy(xy_int_t point) { + cursor += point; +} + +// Draw a Centered string using DWIN_WIDTH +void DWINUI::Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, const char * const string) { + const int8_t x = _MAX(0U, DWIN_WIDTH - strlen_P(string) * fontWidth(size)) / 2 - 1; + DWIN_Draw_String(bShow, size, color, bColor, x, y, string); +} + +// Draw a char at cursor position +void DWINUI::Draw_Char(const char c) { + const char string[2] = { c, 0}; + DWIN_Draw_String(false, font, textcolor, backcolor, cursor.x, cursor.y, string, 1); + MoveBy(fontWidth(font), 0); +} + +// Draw a string at cursor position +// color: Character color +// *string: The string +// rlimit: For draw less chars than string length use rlimit +void DWINUI::Draw_String(const char * const string, uint16_t rlimit) { + DWIN_Draw_String(false, font, textcolor, backcolor, cursor.x, cursor.y, string, rlimit); + MoveBy(strlen(string) * fontWidth(font), 0); +} +void DWINUI::Draw_String(uint16_t color, const char * const string, uint16_t rlimit) { + DWIN_Draw_String(false, font, color, backcolor, cursor.x, cursor.y, string, rlimit); + MoveBy(strlen(string) * fontWidth(font), 0); +} + +// Draw a signed floating point number +// bShow: true=display background color; false=don't display background color +// zeroFill: true=zero fill; false=no zero fill +// zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space +// size: Font size +// bColor: Background color +// iNum: Number of whole digits +// fNum: Number of decimal digits +// x/y: Upper-left point +// value: Float value +void DWINUI::Draw_Signed_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + DWIN_Draw_FloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, value < 0 ? -value : value); + DWIN_Draw_String(bShow, size, color, bColor, x - 6, y, value < 0 ? F("-") : F(" ")); +} + +// Draw a circle +// color: circle color +// x: the abscissa of the center of the circle +// y: ordinate of the center of the circle +// r: circle radius +void DWINUI::Draw_Circle(uint16_t color, uint16_t x, uint16_t y, uint8_t r) { + int a = 0, b = 0; + while (a <= b) { + b = SQRT(sq(r) - sq(a)); + if (a == 0) b--; + DWIN_Draw_Point(color, 1, 1, x + a, y + b); // Draw some sector 1 + DWIN_Draw_Point(color, 1, 1, x + b, y + a); // Draw some sector 2 + DWIN_Draw_Point(color, 1, 1, x + b, y - a); // Draw some sector 3 + DWIN_Draw_Point(color, 1, 1, x + a, y - b); // Draw some sector 4 + DWIN_Draw_Point(color, 1, 1, x - a, y - b); // Draw some sector 5 + DWIN_Draw_Point(color, 1, 1, x - b, y - a); // Draw some sector 6 + DWIN_Draw_Point(color, 1, 1, x - b, y + a); // Draw some sector 7 + DWIN_Draw_Point(color, 1, 1, x - a, y + b); // Draw some sector 8 + a++; + } +} + +// Draw a circle filled with color +// bcolor: fill color +// x: the abscissa of the center of the circle +// y: ordinate of the center of the circle +// r: circle radius +void DWINUI::Draw_FillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r) { + int a = 0, b = 0; + while (a <= b) { + b = SQRT(sq(r) - sq(a)); // b=sqrt(r*r-a*a); + if (a == 0) b--; + DWIN_Draw_Line(bcolor, x-b,y-a,x+b,y-a); + DWIN_Draw_Line(bcolor, x-a,y-b,x+a,y-b); + DWIN_Draw_Line(bcolor, x-b,y+a,x+b,y+a); + DWIN_Draw_Line(bcolor, x-a,y+b,x+a,y+b); + a++; + } +} + +// Color Interpolator +// val : Interpolator minv..maxv +// minv : Minimum value +// maxv : Maximum value +// color1 : Start color +// color2 : End color +uint16_t DWINUI::ColorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2) { + uint8_t B,G,R; + float n; + n = (float)(val-minv)/(maxv-minv); + R = (1-n)*GetRColor(color1) + n*GetRColor(color2); + G = (1-n)*GetGColor(color1) + n*GetGColor(color2); + B = (1-n)*GetBColor(color1) + n*GetBColor(color2); + return RGB(R,G,B); +} + +// Color Interpolator through Red->Yellow->Green->Blue +// val : Interpolator minv..maxv +// minv : Minimum value +// maxv : Maximum value +uint16_t DWINUI::RainbowInt(int16_t val, int16_t minv, int16_t maxv) { + uint8_t B,G,R; + const uint8_t maxB = 28; + const uint8_t maxR = 28; + const uint8_t maxG = 38; + const int16_t limv = _MAX(abs(minv), abs(maxv)); + float n; + if (minv>=0) { + n = (float)(val-minv)/(maxv-minv); + } else { + n = (float)val/limv; + } + n = _MIN(1, n); + n = _MAX(-1, n); + if (n < 0) { + R = 0; + G = (1+n)*maxG; + B = (-n)*maxB; + } else if (n < 0.5) { + R = maxR*n*2; + G = maxG; + B = 0; + } else { + R = maxR; + G = maxG*(1-n); + B = 0; + } + return RGB(R,G,B); +} + +// Draw a checkbox +// Color: frame color +// bColor: Background color +// x/y: Upper-left point +// mode : 0 : unchecked, 1 : checked +void DWINUI::Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool checked=false) { + DWIN_Draw_String(true, font8x16, color, bcolor, x + 4, y, checked ? F("x") : F(" ")); + DWIN_Draw_Rectangle(0, color, x + 2, y + 2, x + 17, y + 17); +} + +// Clear Menu by filling the menu area with background color +void DWINUI::ClearMenuArea() { + DWIN_Draw_Rectangle(1, backcolor, 0, TITLE_HEIGHT, DWIN_WIDTH - 1, STATUS_Y - 1); +} + +void DWINUI::MenuItemsClear() { + if (MenuItems == nullptr) return; + for (uint8_t i = 0; i < MenuItemCount; i++) delete MenuItems[i]; + delete[] MenuItems; + MenuItems = nullptr; + MenuItemCount = 0; + MenuItemTotal = 0; +} + +void DWINUI::MenuItemsPrepare(uint8_t totalitems) { + MenuItemsClear(); + MenuItemTotal = totalitems; + MenuItems = new MenuItemClass*[totalitems]; +} + +MenuItemClass* DWINUI::MenuItemsAdd(MenuItemClass* menuitem) { + if (MenuItemCount < MenuItemTotal) { + MenuItems[MenuItemCount] = menuitem; + menuitem->pos = MenuItemCount++; + return menuitem; + } + else { + delete menuitem; + return nullptr; + } +} + +/* Title Class ==============================================================*/ + +TitleClass Title; + +void TitleClass::draw() { + if (DWINUI::onTitleDraw != nullptr) (*DWINUI::onTitleDraw)(this); +} + +void TitleClass::SetCaption(const char * const title) { + frameid = 0; + if ( caption == title ) return; + const uint8_t len = _MIN(sizeof(caption) - 1, strlen(title)); + memcpy(&caption[0], title, len); + caption[len] = '\0'; +} + +void TitleClass::ShowCaption(const char * const title) { + SetCaption(title); + draw(); +} + +void TitleClass::SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { + caption[0] = '\0'; + frameid = id; + frame = { x1, y1, x2, y2 }; +} + +void TitleClass::SetFrame(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { + SetFrame(1, x, y, x + w - 1, y + h - 1); +} + +void TitleClass::FrameCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { + SetFrame(id, x1, y1, x2, y2); + draw(); +} + +void TitleClass::FrameCopy(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { + FrameCopy(1, x, y, x + w - 1, y + h - 1); +} + +/* Menu Class ===============================================================*/ + +MenuClass::MenuClass() { + selected = 0; + topline = 0; +} + +void MenuClass::draw() { + MenuTitle.draw(); + if (DWINUI::onMenuDraw != nullptr) (*DWINUI::onMenuDraw)(this); + for (uint8_t i = 0; i < MenuItemCount; i++) + MenuItems[i]->draw(i - topline); + if (DWINUI::onCursorDraw != nullptr) DWINUI::onCursorDraw(line()); + DWIN_UpdateLCD(); +} + +void MenuClass::onScroll(bool dir) { + int8_t sel = selected; + if (dir) sel++; else sel--; + LIMIT(sel, 0, MenuItemCount - 1); + if (sel != selected) { + if (DWINUI::onCursorErase != nullptr) DWINUI::onCursorErase(line()); + if ((sel - topline) == TROWS) { + DWIN_Frame_AreaMove(1, DWIN_SCROLL_UP, MLINE, DWINUI::backcolor, 0, TITLE_HEIGHT + 1, DWIN_WIDTH, STATUS_Y - 1); + topline++; + MenuItems[sel]->draw(TROWS - 1); + } + if ((sel < topline)) { + DWIN_Frame_AreaMove(1, DWIN_SCROLL_DOWN, MLINE, DWINUI::backcolor, 0, TITLE_HEIGHT + 1, DWIN_WIDTH, STATUS_Y - 1); + topline--; + MenuItems[sel]->draw(0); + } + selected = sel; + if (DWINUI::onCursorDraw != nullptr) DWINUI::onCursorDraw(line()); + DWIN_UpdateLCD(); + } +} + +void MenuClass::onClick() { + if (MenuItems[selected]->onClick != nullptr) (*MenuItems[selected]->onClick)(); +} + +MenuItemClass *MenuClass::SelectedItem() { + return MenuItems[selected]; +} + +/* MenuItem Class ===========================================================*/ + +MenuItemClass::MenuItemClass(uint8_t cicon, const char * const text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)()) { + icon = cicon; + onClick = onclick; + onDraw = ondraw; + const uint8_t len = _MIN(sizeof(caption) - 1, strlen(text)); + memcpy(&caption[0], text, len); + caption[len] = '\0'; +} + +MenuItemClass::MenuItemClass(uint8_t cicon, uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)()) { + icon = cicon; + onClick = onclick; + onDraw = ondraw; + caption[0] = '\0'; + frameid = id; + frame = { x1, y1, x2, y2 }; +} + +void MenuItemClass::SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2) { + caption[0] = '\0'; + frameid = id; + frame = { x1, y1, x2, y2 }; +} + +void MenuItemClass::draw(int8_t line) { + if (line < 0 || line >= TROWS) return; + if (onDraw != nullptr) (*onDraw)(this, line); +}; + +MenuItemPtrClass::MenuItemPtrClass(uint8_t cicon, const char * const text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)(), void* val) : MenuItemClass(cicon, text, ondraw, onclick) { + value = val; +}; + +#endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/dwinui.h b/Marlin/src/lcd/e3v2/enhanced/dwinui.h new file mode 100644 index 000000000000..8cbb66fdf041 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/dwinui.h @@ -0,0 +1,485 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.3 + * Date: 2021/09/08 + */ + +#include "../../../core/types.h" +#include "dwin_lcd.h" +#include "../common/dwin_set.h" +#include "../common/dwin_font.h" +#include "../common/dwin_color.h" + +// Extra Icons +#define ICON_Brightness ICON_Motion +#define ICON_Cancel ICON_StockConfiguration +#define ICON_CustomPreheat ICON_SetEndTemp +#define ICON_Error ICON_TempTooHigh +#define ICON_ExtrudeMinT ICON_HotendTemp +#define ICON_FilLoad ICON_WriteEEPROM +#define ICON_FilMan ICON_ResumeEEPROM +#define ICON_FilSet ICON_ResumeEEPROM +#define ICON_FilUnload ICON_ReadEEPROM +#define ICON_Flow ICON_StepE +#define ICON_LevBed ICON_SetEndTemp +#define ICON_Lock ICON_Cool +#define ICON_ManualMesh ICON_HotendTemp +#define ICON_MeshNext ICON_Axis +#define ICON_MeshSave ICON_WriteEEPROM +#define ICON_MeshViewer ICON_HotendTemp +#define ICON_MoveZ0 ICON_HotendTemp +#define ICON_Park ICON_Motion +#define ICON_PIDcycles ICON_ResumeEEPROM +#define ICON_PIDValue ICON_Contact +#define ICON_ProbeSet ICON_SetEndTemp +#define ICON_ProbeTest ICON_SetEndTemp +#define ICON_Pwrlossr ICON_Motion +#define ICON_Reboot ICON_ResumeEEPROM +#define ICON_Runout ICON_MaxAccE +#define ICON_Scolor ICON_MaxSpeed +#define ICON_SetCustomPreheat ICON_SetEndTemp +#define ICON_Sound ICON_Cool + +// Default UI Colors +#define Def_Background_Color Color_Bg_Black +#define Def_Cursor_color Rectangle_Color +#define Def_TitleBg_color Color_Bg_Blue +#define Def_TitleTxt_color Color_White +#define Def_Text_Color Color_White +#define Def_Selected_Color Select_Color +#define Def_SplitLine_Color Line_Color +#define Def_Highlight_Color Color_White +#define Def_StatusBg_Color RGB(0,20,20) +#define Def_StatusTxt_Color Color_Yellow +#define Def_PopupBg_color Color_Bg_Window +#define Def_PopupTxt_Color Popup_Text_Color +#define Def_AlertBg_Color Color_Bg_Red +#define Def_AlertTxt_Color Color_Yellow +#define Def_PercentTxt_Color Percent_Color +#define Def_Barfill_Color BarFill_Color +#define Def_Indicator_Color Color_White +#define Def_Coordinate_Color Color_White + +// UI element defines and constants +#define DWIN_FONT_MENU font8x16 +#define DWIN_FONT_STAT font10x20 +#define DWIN_FONT_HEAD font10x20 +#define DWIN_FONT_ALERT font10x20 +#define STATUS_Y 354 +#define LCD_WIDTH (DWIN_WIDTH / 8) + +constexpr uint16_t TITLE_HEIGHT = 30, // Title bar height + MLINE = 53, // Menu line height + TROWS = (STATUS_Y - TITLE_HEIGHT) / MLINE, // Total rows + MROWS = TROWS - 1, // Other-than-Back + ICOX = 26, // Menu item icon X position + LBLX = 60, // Menu item label X position + VALX = 210, // Menu item value X position + MENU_CHR_W = 8, MENU_CHR_H = 16, // Menu font 8x16 + STAT_CHR_W = 10; + +// Menuitem Y position +#define MYPOS(L) (TITLE_HEIGHT + MLINE * (L)) + +// Menuitem caption Offset +#define CAPOFF ((MLINE - MENU_CHR_H) / 2) + +// Menuitem caption Y position +#define MBASE(L) (MYPOS(L) + CAPOFF) + +// Create and add a MenuItem object to the menu array +#define ADDMENUITEM(V...) DWINUI::MenuItemsAdd(new MenuItemClass(V)) +#define ADDMENUITEM_P(V...) DWINUI::MenuItemsAdd(new MenuItemPtrClass(V)) + +typedef struct { uint16_t left, top, right, bottom; } rect_t; +typedef struct { uint16_t x, y, w, h; } frame_rect_t; + +class TitleClass { +public: + char caption[32] = ""; + uint8_t frameid = 0; + rect_t frame = {0}; + void draw(); + void SetCaption(const char * const title); + inline void SetCaption(FSTR_P title) { SetCaption((char *)title); } + void ShowCaption(const char * const title); + inline void ShowCaption(FSTR_P title) { ShowCaption((char *)title); } + void SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); + void SetFrame(uint16_t x, uint16_t y, uint16_t w, uint16_t h); + void FrameCopy(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); + void FrameCopy(uint16_t x, uint16_t y, uint16_t h, uint16_t v); +}; +extern TitleClass Title; + +class MenuItemClass { +protected: +public: + uint8_t pos = 0; + uint8_t icon = 0; + char caption[32] = ""; + uint8_t frameid = 0; + rect_t frame = {0}; + void (*onDraw)(MenuItemClass* menuitem, int8_t line) = nullptr; + void (*onClick)() = nullptr; + MenuItemClass() {}; + MenuItemClass(uint8_t cicon, const char * const text=nullptr, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr); + MenuItemClass(uint8_t cicon, FSTR_P text = nullptr, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr) : MenuItemClass(cicon, FTOP(text), ondraw, onclick){} + MenuItemClass(uint8_t cicon, uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, void (*ondraw)(MenuItemClass* menuitem, int8_t line)=nullptr, void (*onclick)()=nullptr); + void SetFrame(uint8_t id, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); + virtual ~MenuItemClass(){}; + virtual void draw(int8_t line); +}; + +class MenuItemPtrClass: public MenuItemClass { +public: + void *value = nullptr; + using MenuItemClass::MenuItemClass; + MenuItemPtrClass(uint8_t cicon, const char * const text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)(), void* val); + MenuItemPtrClass(uint8_t cicon, FSTR_P text, void (*ondraw)(MenuItemClass* menuitem, int8_t line), void (*onclick)(), void* val) : MenuItemPtrClass(cicon, FTOP(text), ondraw, onclick, val){} +}; + +class MenuClass { +public: + int8_t topline = 0; + int8_t selected = 0; + TitleClass MenuTitle; + MenuClass(); + virtual ~MenuClass(){}; + inline int8_t line() { return selected - topline; }; + inline int8_t line(uint8_t pos) {return pos - topline; }; + void draw(); + void onScroll(bool dir); + void onClick(); + MenuItemClass* SelectedItem(); +}; +extern MenuClass *CurrentMenu; + +namespace DWINUI { + extern xy_int_t cursor; + extern uint16_t pencolor; + extern uint16_t textcolor; + extern uint16_t backcolor; + extern uint8_t font; + + extern void (*onCursorErase)(uint8_t line); + extern void (*onCursorDraw)(uint8_t line); + extern void (*onTitleDraw)(TitleClass* title); + extern void (*onMenuDraw)(MenuClass* menu); + + // DWIN LCD Initialization + void init(); + + // Set text/number font + void setFont(uint8_t cfont); + + // Get font character width + uint8_t fontWidth(uint8_t cfont); + + // Get font character heigh + uint8_t fontHeight(uint8_t cfont); + + // Get screen x coodinates from text column + uint16_t ColToX(uint8_t col); + + // Get screen y coodinates from text row + uint16_t RowToY(uint8_t row); + + // Set text/number color + void SetColors(uint16_t fgcolor, uint16_t bgcolor); + void SetTextColor(uint16_t fgcolor); + void SetBackgroundColor(uint16_t bgcolor); + + // Moves cursor to point + // x: abscissa of the display + // y: ordinate of the display + // point: xy coordinate + void MoveTo(int16_t x, int16_t y); + void MoveTo(xy_int_t point); + + // Moves cursor relative to the actual position + // x: abscissa of the display + // y: ordinate of the display + // point: xy coordinate + void MoveBy(int16_t x, int16_t y); + void MoveBy(xy_int_t point); + + // Draw a line from the cursor to xy position + // color: Line segment color + // x/y: End point + inline void LineTo(uint16_t color, uint16_t x, uint16_t y) { + DWIN_Draw_Line(color, cursor.x, cursor.y, x, y); + } + inline void LineTo(uint16_t x, uint16_t y) { + DWIN_Draw_Line(pencolor, cursor.x, cursor.y, x, y); + } + + // Draw an Icon with transparent background from the library ICON + // icon: Icon ID + // x/y: Upper-left point + inline void Draw_Icon(uint8_t icon, uint16_t x, uint16_t y) { + DWIN_ICON_Show(ICON, icon, x, y); + } + + // Draw a positive integer + // bShow: true=display background color; false=don't display background color + // zeroFill: true=zero fill; false=no zero fill + // zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space + // size: Font size + // color: Character color + // bColor: Background color + // iNum: Number of digits + // x/y: Upper-left coordinate + // value: Integer value + inline void Draw_Int(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_IntValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, x, y, value); + } + inline void Draw_Int(uint8_t iNum, long value) { + DWIN_Draw_IntValue(false, true, 0, font, textcolor, backcolor, iNum, cursor.x, cursor.y, value); + MoveBy(iNum * fontWidth(font), 0); + } + inline void Draw_Int(uint8_t iNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_IntValue(false, true, 0, font, textcolor, backcolor, iNum, x, y, value); + } + inline void Draw_Int(uint16_t color, uint8_t iNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_IntValue(false, true, 0, font, color, backcolor, iNum, x, y, value); + } + inline void Draw_Int(uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_IntValue(true, true, 0, font, color, bColor, iNum, x, y, value); + } + inline void Draw_Int(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint16_t x, uint16_t y, long value) { + DWIN_Draw_IntValue(true, true, 0, size, color, bColor, iNum, x, y, value); + } + + // Draw a floating point number + // bShow: true=display background color; false=don't display background color + // zeroFill: true=zero fill; false=no zero fill + // zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space + // size: Font size + // color: Character color + // bColor: Background color + // iNum: Number of whole digits + // fNum: Number of decimal digits + // x/y: Upper-left point + // value: Float value + inline void Draw_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + DWIN_Draw_FloatValue(bShow, zeroFill, zeroMode, size, color, bColor, iNum, fNum, x, y, value); + } + inline void Draw_Float(uint8_t iNum, uint8_t fNum, float value) { + DWIN_Draw_FloatValue(false, true, 0, font, textcolor, backcolor, iNum, fNum, cursor.x, cursor.y, value); + MoveBy((iNum + fNum + 1) * fontWidth(font), 0); + } + inline void Draw_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + DWIN_Draw_FloatValue(false, true, 0, font, textcolor, backcolor, iNum, fNum, x, y, value); + } + inline void Draw_Float(uint16_t color, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + DWIN_Draw_FloatValue(false, true, 0, font, color, backcolor, iNum, fNum, x, y, value); + } + inline void Draw_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + DWIN_Draw_FloatValue(true, true, 0, font, color, bColor, iNum, fNum, x, y, value); + } + inline void Draw_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + DWIN_Draw_FloatValue(true, true, 0, size, color, bColor, iNum, fNum, x, y, value); + } + + // Draw a signed floating point number + // bShow: true=display background color; false=don't display background color + // zeroFill: true=zero fill; false=no zero fill + // zeroMode: 1=leading 0 displayed as 0; 0=leading 0 displayed as a space + // size: Font size + // bColor: Background color + // iNum: Number of whole digits + // fNum: Number of decimal digits + // x/y: Upper-left point + // value: Float value + void Draw_Signed_Float(uint8_t bShow, bool zeroFill, uint8_t zeroMode, uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value); + inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, float value) { + Draw_Signed_Float(false, true, 0, font, textcolor, backcolor, iNum, fNum, cursor.x, cursor.y, value); + MoveBy((iNum + fNum + 1) * fontWidth(font), 0); + } + inline void Draw_Signed_Float(uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + Draw_Signed_Float(false, true, 0, font, textcolor, backcolor, iNum, fNum, x, y, value); + } + inline void Draw_Signed_Float(uint8_t size, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + Draw_Signed_Float(false, true, 0, size, textcolor, backcolor, iNum, fNum, x, y, value); + } + inline void Draw_Signed_Float(uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + Draw_Signed_Float(true, true, 0, font, color, bColor, iNum, fNum, x, y, value); + } + inline void Draw_Signed_Float(uint8_t size, uint16_t color, uint16_t bColor, uint8_t iNum, uint8_t fNum, uint16_t x, uint16_t y, float value) { + Draw_Signed_Float(true, true, 0, size, color, bColor, iNum, fNum, x, y, value); + } + + // Draw a char at cursor position + void Draw_Char(const char c); + + // Draw a string at cursor position + // color: Character color + // *string: The string + // rlimit: For draw less chars than string length use rlimit + void Draw_String(const char * const string, uint16_t rlimit = 0xFFFF); + void Draw_String(uint16_t color, const char * const string, uint16_t rlimit = 0xFFFF); + + // Draw a string + // size: Font size + // color: Character color + // bColor: Background color + // x/y: Upper-left coordinate of the string + // *string: The string + inline void Draw_String(uint16_t x, uint16_t y, const char * const string) { + DWIN_Draw_String(false, font, textcolor, backcolor, x, y, string); + } + inline void Draw_String(uint16_t x, uint16_t y, FSTR_P title) { + DWIN_Draw_String(false, font, textcolor, backcolor, x, y, (char *)title); + } + inline void Draw_String(uint16_t color, uint16_t x, uint16_t y, const char * const string) { + DWIN_Draw_String(false, font, color, backcolor, x, y, string); + } + inline void Draw_String(uint16_t color, uint16_t x, uint16_t y, FSTR_P title) { + DWIN_Draw_String(false, font, color, backcolor, x, y, (char *)title); + } + inline void Draw_String(uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const char * const string) { + DWIN_Draw_String(true, font, color, bgcolor, x, y, string); + } + inline void Draw_String(uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, FSTR_P title) { + DWIN_Draw_String(true, font, color, bgcolor, x, y, (char *)title); + } + inline void Draw_String(uint8_t size, uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, const char * const string) { + DWIN_Draw_String(true, size, color, bgcolor, x, y, string); + } + inline void Draw_String(uint8_t size, uint16_t color, uint16_t bgcolor, uint16_t x, uint16_t y, FSTR_P title) { + DWIN_Draw_String(true, size, color, bgcolor, x, y, (char *)title); + } + + // Draw a centered string using DWIN_WIDTH + // bShow: true=display background color; false=don't display background color + // size: Font size + // color: Character color + // bColor: Background color + // y: Upper coordinate of the string + // *string: The string + void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, const char * const string); + inline void Draw_CenteredString(bool bShow, uint8_t size, uint16_t color, uint16_t bColor, uint16_t y, FSTR_P title) { + Draw_CenteredString(bShow, size, color, bColor, y, (char *)title); + } + inline void Draw_CenteredString(uint16_t color, uint16_t bcolor, uint16_t y, const char * const string) { + Draw_CenteredString(true, font, color, bcolor, y, string); + } + inline void Draw_CenteredString(uint8_t size, uint16_t color, uint16_t y, const char * const string) { + Draw_CenteredString(false, size, color, backcolor, y, string); + } + inline void Draw_CenteredString(uint8_t size, uint16_t color, uint16_t y, FSTR_P title) { + Draw_CenteredString(false, size, color, backcolor, y, (char *)title); + } + inline void Draw_CenteredString(uint16_t color, uint16_t y, const char * const string) { + Draw_CenteredString(false, font, color, backcolor, y, string); + } + inline void Draw_CenteredString(uint16_t color, uint16_t y, FSTR_P title) { + Draw_CenteredString(false, font, color, backcolor, y, (char *)title); + } + inline void Draw_CenteredString(uint16_t y, const char * const string) { + Draw_CenteredString(false, font, textcolor, backcolor, y, string); + } + inline void Draw_CenteredString(uint16_t y, FSTR_P title) { + Draw_CenteredString(false, font, textcolor, backcolor, y, (char *)title); + } + + // Draw a circle + // Color: circle color + // x: abscissa of the center of the circle + // y: ordinate of the center of the circle + // r: circle radius + void Draw_Circle(uint16_t color, uint16_t x,uint16_t y,uint8_t r); + inline void Draw_Circle(uint16_t color, uint8_t r) { + Draw_Circle(color, cursor.x, cursor.y, r); + } + + // Draw a checkbox + // Color: frame color + // bColor: Background color + // x/y: Upper-left point + // checked : 0 : unchecked, 1 : checked + void Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool checked); + inline void Draw_Checkbox(uint16_t x, uint16_t y, bool checked=false) { + Draw_Checkbox(textcolor, backcolor, x, y, checked); + } + + // Color Interpolator + // val : Interpolator minv..maxv + // minv : Minimum value + // maxv : Maximum value + // color1 : Start color + // color2 : End color + uint16_t ColorInt(int16_t val, int16_t minv, int16_t maxv, uint16_t color1, uint16_t color2); + + // -------------------------- Extra -------------------------------// + + // Draw a circle filled with color + // bcolor: fill color + // x: abscissa of the center of the circle + // y: ordinate of the center of the circle + // r: circle radius + void Draw_FillCircle(uint16_t bcolor, uint16_t x,uint16_t y,uint8_t r); + inline void Draw_FillCircle(uint16_t bcolor, uint8_t r) { + Draw_FillCircle(bcolor, cursor.x, cursor.y, r); + } + + // Color Interpolator through Red->Yellow->Green->Blue + // val : Interpolator minv..maxv + // minv : Minimum value + // maxv : Maximum value + uint16_t RainbowInt(int16_t val, int16_t minv, int16_t maxv); + + // Write buffer data to the SRAM + // addr: SRAM start address 0x0000-0x7FFF + // length: Bytes to write + // data: address of the buffer with data + inline void WriteToSRAM(uint16_t addr, uint16_t length, uint8_t *data) { + DWIN_WriteToMem(0x5A, addr, length, data); + } + + // Write buffer data to the Flash + // addr: Flash start address 0x0000-0x3FFF + // length: Bytes to write + // data: address of the buffer with data + inline void WriteToFlash(uint16_t addr, uint16_t length, uint8_t *data) { + DWIN_WriteToMem(0xA5, addr, length, data); + } + + // Clear Menu by filling the area with background color + // Area (0, TITLE_HEIGHT, DWIN_WIDTH, STATUS_Y - 1) + void ClearMenuArea(); + + // Clear MenuItems array and free MenuItems elements + void MenuItemsClear(); + + // Prepare MenuItems array + void MenuItemsPrepare(uint8_t totalitems); + + // Add elements to the MenuItems array + MenuItemClass* MenuItemsAdd(MenuItemClass* menuitem); + +}; diff --git a/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp b/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp new file mode 100644 index 000000000000..ca772184f148 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/lockscreen.cpp @@ -0,0 +1,75 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.3 + * Date: 2021/09/08 + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + +#include "../../../core/types.h" +#include "dwin_lcd.h" +#include "dwinui.h" +#include "dwin.h" +#include "lockscreen.h" + +LockScreenClass lockScreen; + +uint8_t LockScreenClass::lock_pos = 0; +bool LockScreenClass::unlocked = false; + +void LockScreenClass::init() { + lock_pos = 0; + unlocked = false; + draw(); +} + +void LockScreenClass::draw() { + Title.SetCaption(PSTR("Lock Screen")); + DWINUI::ClearMenuArea(); + DWINUI::Draw_Icon(ICON_LOGO, 71, 120); // CREALITY logo + DWINUI::Draw_CenteredString(Color_White, 180, F("Printer is Locked,")); + DWINUI::Draw_CenteredString(Color_White, 200, F("Scroll to unlock.")); + DWINUI::Draw_CenteredString(Color_White, 240, F("-> | <-")); + DWIN_Draw_Box(1, HMI_data.Barfill_Color, 0, 260, DWIN_WIDTH, 20); + DWIN_Draw_VLine(Color_Yellow, lock_pos * DWIN_WIDTH / 255, 260, 20); + DWIN_UpdateLCD(); +} + +void LockScreenClass::onEncoder(EncoderState encoder_diffState) { + switch (encoder_diffState) { + case ENCODER_DIFF_CW: lock_pos += 8; break; + case ENCODER_DIFF_CCW: lock_pos -= 8; break; + case ENCODER_DIFF_ENTER: unlocked = (lock_pos == 128); break; + default: break; + } + DWIN_Draw_Box(1, HMI_data.Barfill_Color, 0, 260, DWIN_WIDTH, 20); + DWIN_Draw_VLine(Color_Yellow, lock_pos * DWIN_WIDTH / 255, 260, 20); + DWIN_UpdateLCD(); +} + +#endif // DWIN_CREALITY_LCD_ENHANCED diff --git a/Marlin/src/lcd/e3v2/enhanced/lockscreen.h b/Marlin/src/lcd/e3v2/enhanced/lockscreen.h new file mode 100644 index 000000000000..f0c4c1fde8d2 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/lockscreen.h @@ -0,0 +1,45 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * DWIN UI Enhanced implementation + * Author: Miguel A. Risco-Castillo + * Version: 3.6.3 + * Date: 2021/09/08 + */ + +#include "../common/encoder.h" +#include + +class LockScreenClass { +private: + static bool unlocked; + static uint8_t lock_pos; +public: + static void init(); + static void onEncoder(EncoderState encoder_diffState); + static void draw(); + static inline bool isUnlocked() { return unlocked; } +}; + +extern LockScreenClass lockScreen; diff --git a/Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp b/Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp new file mode 100644 index 000000000000..88ab504a5469 --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/meshviewer.cpp @@ -0,0 +1,75 @@ +/** + * DWIN Mesh Viewer + * Author: Miguel A. Risco-Castillo + * version: 2.5 + * Date: 2021/09/27 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if BOTH(DWIN_CREALITY_LCD_ENHANCED, HAS_MESH) + +#include "meshviewer.h" + +#include "../../../core/types.h" +#include "../../marlinui.h" +#include "dwin_lcd.h" +#include "dwinui.h" +#include "dwin.h" +#include "../../../feature/bedlevel/bedlevel.h" + +MeshViewerClass MeshViewer; + +void MeshViewerClass::Draw() { + const int8_t mx = 30, my = 30; // Margins + const int16_t stx = (DWIN_WIDTH - 2 * mx) / (GRID_MAX_POINTS_X - 1), // Steps + sty = (DWIN_WIDTH - 2 * my) / (GRID_MAX_POINTS_Y - 1); + int8_t zmesh[GRID_MAX_POINTS_X][GRID_MAX_POINTS_Y], maxz =-127, minz = 127; + #define px(xp) (mx + (xp) * stx) + #define py(yp) (30 + DWIN_WIDTH - my - (yp) * sty) + #define rm(z) ((((z) - minz) * 10 / _MAX(1, (maxz - minz))) + 10) + #define DrawMeshValue(xp, yp, zv) DWINUI::Draw_Signed_Float(font6x12, 1, 2, px(xp) - 12, py(yp) - 6, zv) + #define DrawMeshHLine(yp) DWIN_Draw_HLine(HMI_data.SplitLine_Color, px(0), py(yp), DWIN_WIDTH - 2 * mx) + #define DrawMeshVLine(xp) DWIN_Draw_VLine(HMI_data.SplitLine_Color, px(xp), py(GRID_MAX_POINTS_Y - 1), DWIN_WIDTH - 2 * my) + GRID_LOOP(x, y) { + const float v = Z_VALUES(x,y) * 100; + zmesh[x][y] = v; + NOLESS(maxz, v); + NOMORE(minz, v); + } + Title.ShowCaption(F("Mesh Viewer")); + DWINUI::ClearMenuArea(); + DWINUI::Draw_Icon(ICON_Continue_E, 86, 305); + DWIN_Draw_Rectangle(0, HMI_data.SplitLine_Color, px(0), py(0), px(GRID_MAX_POINTS_X - 1), py(GRID_MAX_POINTS_Y - 1)); + LOOP_S_L_N(x, 1, GRID_MAX_POINTS_X - 1) DrawMeshVLine(x); + LOOP_S_L_N(y, 1, GRID_MAX_POINTS_Y - 1) DrawMeshHLine(y); + LOOP_L_N(y, GRID_MAX_POINTS_Y) { + watchdog_refresh(); + LOOP_L_N(x, GRID_MAX_POINTS_X) { + uint16_t color = DWINUI::RainbowInt(zmesh[x][y], _MIN(-5, minz), _MAX(5, maxz)); + DWINUI::Draw_FillCircle(color, px(x), py(y), rm(zmesh[x][y])); + DrawMeshValue(x, y, Z_VALUES(x,y)); + } + } + char str_1[6], str_2[6] = ""; + ui.status_printf_P(0, PSTR("Mesh minZ: %s, maxZ: %s"), + dtostrf((float)minz / 100, 1, 2, str_1), + dtostrf((float)maxz / 100, 1, 2, str_2) + ); +} + +#endif // DWIN_CREALITY_LCD_ENHANCED && HAS_MESH diff --git a/Marlin/src/lcd/e3v2/enhanced/meshviewer.h b/Marlin/src/lcd/e3v2/enhanced/meshviewer.h new file mode 100644 index 000000000000..4f7a6ae1d25f --- /dev/null +++ b/Marlin/src/lcd/e3v2/enhanced/meshviewer.h @@ -0,0 +1,28 @@ +/** + * DWIN Mesh Viewer + * Author: Miguel A. Risco-Castillo + * version: 2.5 + * Date: 2021/09/27 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + */ +#pragma once + +class MeshViewerClass { +public: + void Draw(); +}; + +extern MeshViewerClass MeshViewer; diff --git a/Marlin/src/lcd/e3v2/jyersui/README.md b/Marlin/src/lcd/e3v2/jyersui/README.md new file mode 100644 index 000000000000..10b05455fdaf --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/README.md @@ -0,0 +1,7 @@ +# DWIN for Creality Ender 3 v2 + +Marlin's Ender 3 v2 support requires the `DWIN_SET` included with the Ender 3 V2 [example configuration](https://github.com/MarlinFirmware/Configurations/tree/bugfix-2.0.x/config/examples/Creality/Ender-3%20V2). + +## Easy Install + +Copy the `DWIN_SET` folder onto a Micro-SD card and insert the card into the slot on the DWIN screen. Cycle the machine and wait for the screen to go from blue to orange. Turn the machine off and remove the SD card. When you turn on the machine the screen will display a "Creality" loading screen. diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp new file mode 100644 index 000000000000..9f50b2f2879a --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -0,0 +1,5065 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/e3v2/jyersui/dwin.cpp + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + +#include "dwin.h" + +#include "../../marlinui.h" +#include "../../../MarlinCore.h" + +#include "../../../gcode/gcode.h" +#include "../../../module/temperature.h" +#include "../../../module/planner.h" +#include "../../../module/settings.h" +#include "../../../libs/buzzer.h" +#include "../../../inc/Conditionals_post.h" + +//#define DEBUG_OUT 1 +#include "../../../core/debug_out.h" + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #include "../../../feature/pause.h" +#endif + +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #include "../../../feature/runout.h" +#endif + +#if ENABLED(HOST_ACTION_COMMANDS) + #include "../../../feature/host_actions.h" +#endif + +#if ANY(BABYSTEPPING, HAS_BED_PROBE, HAS_WORKSPACE_OFFSET) + #define HAS_ZOFFSET_ITEM 1 +#endif + +#ifndef strcasecmp_P + #define strcasecmp_P(a, b) strcasecmp((a), (b)) +#endif + +#if HAS_LEVELING + #include "../../../feature/bedlevel/bedlevel.h" +#endif + +#if ENABLED(AUTO_BED_LEVELING_UBL) + #include "../../../libs/least_squares_fit.h" + #include "../../../libs/vector_3.h" +#endif + +#if HAS_BED_PROBE + #include "../../../module/probe.h" +#endif + +#if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_FAN) && PREHEAT_COUNT + #define HAS_PREHEAT 1 +#endif + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../feature/powerloss.h" +#endif + +#define MACHINE_SIZE STRINGIFY(X_BED_SIZE) "x" STRINGIFY(Y_BED_SIZE) "x" STRINGIFY(Z_MAX_POS) + +#ifndef CORP_WEBSITE + #define CORP_WEBSITE WEBSITE_URL + #endif + +#define DWIN_FONT_MENU font8x16 +#define DWIN_FONT_STAT font10x20 +#define DWIN_FONT_HEAD font10x20 + +#define MENU_CHAR_LIMIT 24 +#define STATUS_Y 352 + +#define MAX_PRINT_SPEED 500 +#define MIN_PRINT_SPEED 10 + +#if HAS_FAN + #define MAX_FAN_SPEED 255 + #define MIN_FAN_SPEED 0 +#endif + +#define MAX_XY_OFFSET 100 + +#if HAS_ZOFFSET_ITEM + #define MAX_Z_OFFSET 9.99 + #if HAS_BED_PROBE + #define MIN_Z_OFFSET -9.99 + #else + #define MIN_Z_OFFSET -1 + #endif +#endif + +#if HAS_HOTEND + #define MAX_FLOW_RATE 200 + #define MIN_FLOW_RATE 10 + + #define MAX_E_TEMP (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT) + #define MIN_E_TEMP 0 +#endif + +#if HAS_HEATED_BED + #define MAX_BED_TEMP BED_MAXTEMP + #define MIN_BED_TEMP 0 +#endif + +constexpr uint16_t TROWS = 6, MROWS = TROWS - 1, + TITLE_HEIGHT = 30, + MLINE = 53, + LBLX = 60, + MENU_CHR_W = 8, MENU_CHR_H = 16, STAT_CHR_W = 10; + +#define MBASE(L) (49 + MLINE * (L)) + +constexpr float default_max_feedrate[] = DEFAULT_MAX_FEEDRATE; +constexpr float default_max_acceleration[] = DEFAULT_MAX_ACCELERATION; +constexpr float default_steps[] = DEFAULT_AXIS_STEPS_PER_UNIT; +#if HAS_CLASSIC_JERK + constexpr float default_max_jerk[] = { DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_EJERK }; +#endif + +enum SelectItem : uint8_t { + PAGE_PRINT = 0, + PAGE_PREPARE, + PAGE_CONTROL, + PAGE_INFO_LEVELING, + PAGE_COUNT, + + PRINT_SETUP = 0, + PRINT_PAUSE_RESUME, + PRINT_STOP, + PRINT_COUNT +}; + +uint8_t active_menu = MainMenu, last_menu = MainMenu; +uint8_t selection = 0, last_selection = 0; +uint8_t scrollpos = 0; +uint8_t process = Main, last_process = Main; +PopupID popup, last_popup; + +void (*funcpointer)() = nullptr; +void *valuepointer = nullptr; +float tempvalue; +float valuemin; +float valuemax; +uint8_t valueunit; +uint8_t valuetype; + +char cmd[MAX_CMD_SIZE+16], str_1[16], str_2[16], str_3[16]; +char statusmsg[64]; +char filename[LONG_FILENAME_LENGTH]; +bool printing = false; +bool paused = false; +bool sdprint = false; + +int16_t pausetemp, pausebed, pausefan; + +bool livemove = false; +bool liveadjust = false; +uint8_t preheatmode = 0; +float zoffsetvalue = 0; +uint8_t gridpoint; +float corner_avg; +float corner_pos; + +bool probe_deployed = false; + +CrealityDWINClass CrealityDWIN; + +#if HAS_MESH + + struct Mesh_Settings { + bool viewer_asymmetric_range = false; + bool viewer_print_value = false; + bool goto_mesh_value = false; + bool drawing_mesh = false; + uint8_t mesh_x = 0; + uint8_t mesh_y = 0; + + #if ENABLED(AUTO_BED_LEVELING_UBL) + uint8_t tilt_grid = 1; + + void manual_value_update(bool undefined=false) { + sprintf_P(cmd, PSTR("M421 I%i J%i Z%s %s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1), undefined ? "N" : ""); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + } + + bool create_plane_from_mesh() { + struct linear_fit_data lsf_results; + incremental_LSF_reset(&lsf_results); + GRID_LOOP(x, y) { + if (!isnan(Z_VALUES_ARR[x][y])) { + xy_pos_t rpos; + rpos.x = ubl.mesh_index_to_xpos(x); + rpos.y = ubl.mesh_index_to_ypos(y); + incremental_LSF(&lsf_results, rpos, Z_VALUES_ARR[x][y]); + } + } + + if (finish_incremental_LSF(&lsf_results)) { + SERIAL_ECHOPGM("Could not complete LSF!"); + return true; + } + + ubl.set_all_mesh_points_to_value(0); + + matrix_3x3 rotation = matrix_3x3::create_look_at(vector_3(lsf_results.A, lsf_results.B, 1)); + GRID_LOOP(i, j) { + float mx = ubl.mesh_index_to_xpos(i), + my = ubl.mesh_index_to_ypos(j), + mz = Z_VALUES_ARR[i][j]; + + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOPAIR_F("before rotation = [", mx, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(my, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(mz, 7); + DEBUG_ECHOPGM("] ---> "); + DEBUG_DELAY(20); + } + + rotation.apply_rotation_xyz(mx, my, mz); + + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOPAIR_F("after rotation = [", mx, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(my, 7); + DEBUG_CHAR(','); + DEBUG_ECHO_F(mz, 7); + DEBUG_ECHOLNPGM("]"); + DEBUG_DELAY(20); + } + + Z_VALUES_ARR[i][j] = mz - lsf_results.D; + } + return false; + } + + #else + + void manual_value_update() { + sprintf_P(cmd, PSTR("G29 I%i J%i Z%s"), mesh_x, mesh_y, dtostrf(current_position.z, 1, 3, str_1)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + } + + #endif + + void manual_move(bool zmove=false) { + if (zmove) { + planner.synchronize(); + current_position.z = goto_mesh_value ? Z_VALUES_ARR[mesh_x][mesh_y] : Z_CLEARANCE_BETWEEN_PROBES; + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + planner.synchronize(); + } + else { + CrealityDWIN.Popup_Handler(MoveWait); + sprintf_P(cmd, PSTR("G0 F300 Z%s"), dtostrf(Z_CLEARANCE_BETWEEN_PROBES, 1, 3, str_1)); + gcode.process_subcommands_now_P(cmd); + sprintf_P(cmd, PSTR("G42 F4000 I%i J%i"), mesh_x, mesh_y); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + current_position.z = goto_mesh_value ? Z_VALUES_ARR[mesh_x][mesh_y] : Z_CLEARANCE_BETWEEN_PROBES; + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + planner.synchronize(); + CrealityDWIN.Redraw_Menu(); + } + } + + float get_max_value() { + float max = __FLT_MIN__; + GRID_LOOP(x, y) { + if (!isnan(Z_VALUES_ARR[x][y]) && Z_VALUES_ARR[x][y] > max) + max = Z_VALUES_ARR[x][y]; + } + return max; + } + + float get_min_value() { + float min = __FLT_MAX__; + GRID_LOOP(x, y) { + if (!isnan(Z_VALUES_ARR[x][y]) && Z_VALUES_ARR[x][y] < min) + min = Z_VALUES_ARR[x][y]; + } + return min; + } + + void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7) { + drawing_mesh = true; + const uint16_t total_width_px = DWIN_WIDTH - padding_x - padding_x; + const uint16_t cell_width_px = total_width_px / GRID_MAX_POINTS_X; + const uint16_t cell_height_px = total_width_px / GRID_MAX_POINTS_Y; + const float v_max = abs(get_max_value()), v_min = abs(get_min_value()), range = _MAX(v_min, v_max); + + // Clear background from previous selection and select new square + DWIN_Draw_Rectangle(1, Color_Bg_Black, _MAX(0, padding_x - gridline_width), _MAX(0, padding_y_top - gridline_width), padding_x + total_width_px, padding_y_top + total_width_px); + if (selected >= 0) { + const auto selected_y = selected / GRID_MAX_POINTS_X; + const auto selected_x = selected - (GRID_MAX_POINTS_X * selected_y); + const auto start_y_px = padding_y_top + selected_y * cell_height_px; + const auto start_x_px = padding_x + selected_x * cell_width_px; + DWIN_Draw_Rectangle(1, Color_White, _MAX(0, start_x_px - gridline_width), _MAX(0, start_y_px - gridline_width), start_x_px + cell_width_px, start_y_px + cell_height_px); + } + + // Draw value square grid + char buf[8]; + GRID_LOOP(x, y) { + const auto start_x_px = padding_x + x * cell_width_px; + const auto end_x_px = start_x_px + cell_width_px - 1 - gridline_width; + const auto start_y_px = padding_y_top + (GRID_MAX_POINTS_Y - y - 1) * cell_height_px; + const auto end_y_px = start_y_px + cell_height_px - 1 - gridline_width; + DWIN_Draw_Rectangle(1, // RGB565 colors: http://www.barth-dev.de/online/rgb565-color-picker/ + isnan(Z_VALUES_ARR[x][y]) ? Color_Grey : ( // gray if undefined + (Z_VALUES_ARR[x][y] < 0 ? + (uint16_t)round(0x1F * -Z_VALUES_ARR[x][y] / (!viewer_asymmetric_range ? range : v_min)) << 11 : // red if mesh point value is negative + (uint16_t)round(0x3F * Z_VALUES_ARR[x][y] / (!viewer_asymmetric_range ? range : v_max)) << 5) | // green if mesh point value is positive + _MIN(0x1F, (((uint8_t)abs(Z_VALUES_ARR[x][y]) / 10) * 4))), // + blue stepping for every mm + start_x_px, start_y_px, end_x_px, end_y_px + ); + + safe_delay(10); + LCD_SERIAL.flushTX(); + + // Draw value text on + if (viewer_print_value) { + int8_t offset_x, offset_y = cell_height_px / 2 - 6; + if (isnan(Z_VALUES_ARR[x][y])) { // undefined + DWIN_Draw_String(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + cell_width_px / 2 - 5, start_y_px + offset_y, F("X")); + } + else { // has value + if (GRID_MAX_POINTS_X < 10) + sprintf_P(buf, PSTR("%s"), dtostrf(abs(Z_VALUES_ARR[x][y]), 1, 2, str_1)); + else + sprintf_P(buf, PSTR("%02i"), (uint16_t)(abs(Z_VALUES_ARR[x][y] - (int16_t)Z_VALUES_ARR[x][y]) * 100)); + offset_x = cell_width_px / 2 - 3 * (strlen(buf)) - 2; + if (!(GRID_MAX_POINTS_X < 10)) + DWIN_Draw_String(false, font6x12, Color_White, Color_Bg_Blue, start_x_px - 2 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, F(".")); + DWIN_Draw_String(false, font6x12, Color_White, Color_Bg_Blue, start_x_px + 1 + offset_x, start_y_px + offset_y /*+ square / 2 - 6*/, buf); + } + safe_delay(10); + LCD_SERIAL.flushTX(); + } + } + } + + void Set_Mesh_Viewer_Status() { // TODO: draw gradient with values as a legend instead + float v_max = abs(get_max_value()), v_min = abs(get_min_value()), range = _MAX(v_min, v_max); + if (v_min > 3e+10F) v_min = 0.0000001; + if (v_max > 3e+10F) v_max = 0.0000001; + if (range > 3e+10F) range = 0.0000001; + char msg[46]; + if (viewer_asymmetric_range) { + dtostrf(-v_min, 1, 3, str_1); + dtostrf( v_max, 1, 3, str_2); + } + else { + dtostrf(-range, 1, 3, str_1); + dtostrf( range, 1, 3, str_2); + } + sprintf_P(msg, PSTR("Red %s..0..%s Green"), str_1, str_2); + CrealityDWIN.Update_Status(msg); + drawing_mesh = false; + } + + }; + Mesh_Settings mesh_conf; + +#endif // HAS_MESH + +/* General Display Functions */ + +struct CrealityDWINClass::EEPROM_Settings CrealityDWINClass::eeprom_settings{0}; +constexpr const char * const CrealityDWINClass::color_names[11]; +constexpr const char * const CrealityDWINClass::preheat_modes[3]; + +// Clear a part of the screen +// 4=Entire screen +// 3=Title bar and Menu area (default) +// 2=Menu area +// 1=Title bar +void CrealityDWINClass::Clear_Screen(uint8_t e/*=3*/) { + if (e == 1 || e == 3 || e == 4) DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.menu_top_bg, Color_Bg_Blue, false), 0, 0, DWIN_WIDTH, TITLE_HEIGHT); // Clear Title Bar + if (e == 2 || e == 3) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, STATUS_Y); // Clear Menu Area + if (e == 4) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, 31, DWIN_WIDTH, DWIN_HEIGHT); // Clear Popup Area +} + +void CrealityDWINClass::Draw_Float(float value, uint8_t row, bool selected/*=false*/, uint8_t minunit/*=10*/) { + const uint8_t digits = (uint8_t)floor(log10(abs(value))) + log10(minunit) + (minunit > 1); + const uint16_t bColor = (selected) ? Select_Color : Color_Bg_Black; + const uint16_t xpos = 240 - (digits * 8); + DWIN_Draw_Rectangle(1, Color_Bg_Black, 194, MBASE(row), 234 - (digits * 8), MBASE(row) + 16); + if (isnan(value)) + DWIN_Draw_String(true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), F(" NaN")); + else { + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, Color_White, bColor, digits - log10(minunit) + 1, log10(minunit), xpos, MBASE(row), (value < 0 ? -value : value)); + DWIN_Draw_String(true, DWIN_FONT_MENU, Color_White, bColor, xpos - 8, MBASE(row), value < 0 ? F("-") : F(" ")); + } +} + +void CrealityDWINClass::Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected/*=false*/, bool color/*=false*/) { + uint16_t bColor = (selected) ? Select_Color : Color_Bg_Black; + uint16_t tColor = (color) ? GetColor(value, Color_White, false) : Color_White; + DWIN_Draw_Rectangle(1, bColor, 202, MBASE(row) + 14, 258, MBASE(row) - 2); + DWIN_Draw_String(false, DWIN_FONT_MENU, tColor, bColor, 202, MBASE(row) - 1, options[value]); +} + +uint16_t CrealityDWINClass::GetColor(uint8_t color, uint16_t original, bool light/*=false*/) { + switch (color){ + case Default: + return original; + break; + case White: + return (light) ? Color_Light_White : Color_White; + break; + case Green: + return (light) ? Color_Light_Green : Color_Green; + break; + case Cyan: + return (light) ? Color_Light_Cyan : Color_Cyan; + break; + case Blue: + return (light) ? Color_Light_Blue : Color_Blue; + break; + case Magenta: + return (light) ? Color_Light_Magenta : Color_Magenta; + break; + case Red: + return (light) ? Color_Light_Red : Color_Red; + break; + case Orange: + return (light) ? Color_Light_Orange : Color_Orange; + break; + case Yellow: + return (light) ? Color_Light_Yellow : Color_Yellow; + break; + case Brown: + return (light) ? Color_Light_Brown : Color_Brown; + break; + case Black: + return Color_Black; + break; + } + return Color_White; +} + +void CrealityDWINClass::Draw_Title(const char * ctitle) { + DWIN_Draw_String(false, DWIN_FONT_HEAD, GetColor(eeprom_settings.menu_top_txt, Color_White, false), Color_Bg_Blue, (DWIN_WIDTH - strlen(ctitle) * STAT_CHR_W) / 2, 5, ctitle); +} +void CrealityDWINClass::Draw_Title(FSTR_P const ftitle) { + DWIN_Draw_String(false, DWIN_FONT_HEAD, GetColor(eeprom_settings.menu_top_txt, Color_White, false), Color_Bg_Blue, (DWIN_WIDTH - strlen_P(FTOP(ftitle)) * STAT_CHR_W) / 2, 5, ftitle); +} + +void _Decorate_Menu_Item(uint8_t row, uint8_t icon, bool more) { + if (icon) DWIN_ICON_Show(ICON, icon, 26, MBASE(row) - 3); //Draw Menu Icon + if (more) DWIN_ICON_Show(ICON, ICON_More, 226, MBASE(row) - 3); // Draw More Arrow + DWIN_Draw_Line(CrealityDWIN.GetColor(CrealityDWIN.eeprom_settings.menu_split_line, Line_Color, true), 16, MBASE(row) + 33, 256, MBASE(row) + 33); // Draw Menu Line +} + +void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, const char * label1, const char * label2, bool more/*=false*/, bool centered/*=false*/) { + const uint8_t label_offset_y = (label1 || label2) ? MENU_CHR_H * 3 / 5 : 0, + label1_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (label1 ? strlen(label1) : 0) * MENU_CHR_W) / 2), + label2_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (label2 ? strlen(label2) : 0) * MENU_CHR_W) / 2); + if (label1) DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, label1_offset_x, MBASE(row) - 1 - label_offset_y, label1); // Draw Label + if (label2) DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, label2_offset_x, MBASE(row) - 1 + label_offset_y, label2); // Draw Label + _Decorate_Menu_Item(row, icon, more); +} + +void CrealityDWINClass::Draw_Menu_Item(uint8_t row, uint8_t icon/*=0*/, FSTR_P const flabel1, FSTR_P const flabel2, bool more/*=false*/, bool centered/*=false*/) { + const uint8_t label_offset_y = (flabel1 || flabel2) ? MENU_CHR_H * 3 / 5 : 0, + label1_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (flabel1 ? strlen_P(FTOP(flabel1)) : 0) * MENU_CHR_W) / 2), + label2_offset_x = !centered ? LBLX : LBLX * 4/5 + _MAX(LBLX * 1U/5, (DWIN_WIDTH - LBLX - (flabel2 ? strlen_P(FTOP(flabel2)) : 0) * MENU_CHR_W) / 2); + if (flabel1) DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, label1_offset_x, MBASE(row) - 1 - label_offset_y, flabel1); // Draw Label + if (flabel2) DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, label2_offset_x, MBASE(row) - 1 + label_offset_y, flabel2); // Draw Label + _Decorate_Menu_Item(row, icon, more); +} + +void CrealityDWINClass::Draw_Checkbox(uint8_t row, bool value) { + #if ENABLED(DWIN_CREALITY_LCD_CUSTOM_ICONS) // Draw appropriate checkbox icon + DWIN_ICON_Show(ICON, (value ? ICON_Checkbox_T : ICON_Checkbox_F), 226, MBASE(row) - 3); + #else // Draw a basic checkbox using rectangles and lines + DWIN_Draw_Rectangle(1, Color_Bg_Black, 226, MBASE(row) - 3, 226 + 20, MBASE(row) - 3 + 20); + DWIN_Draw_Rectangle(0, Color_White, 226, MBASE(row) - 3, 226 + 20, MBASE(row) - 3 + 20); + if (value) { + DWIN_Draw_Line(Check_Color, 227, MBASE(row) - 3 + 11, 226 + 8, MBASE(row) - 3 + 17); + DWIN_Draw_Line(Check_Color, 227 + 8, MBASE(row) - 3 + 17, 226 + 19, MBASE(row) - 3 + 1); + DWIN_Draw_Line(Check_Color, 227, MBASE(row) - 3 + 12, 226 + 8, MBASE(row) - 3 + 18); + DWIN_Draw_Line(Check_Color, 227 + 8, MBASE(row) - 3 + 18, 226 + 19, MBASE(row) - 3 + 2); + DWIN_Draw_Line(Check_Color, 227, MBASE(row) - 3 + 13, 226 + 8, MBASE(row) - 3 + 19); + DWIN_Draw_Line(Check_Color, 227 + 8, MBASE(row) - 3 + 19, 226 + 19, MBASE(row) - 3 + 3); + } + #endif +} + +void CrealityDWINClass::Draw_Menu(uint8_t menu, uint8_t select/*=0*/, uint8_t scroll/*=0*/) { + if (active_menu != menu) { + last_menu = active_menu; + if (process == Menu) last_selection = selection; + } + selection = _MIN(select, Get_Menu_Size(menu)); + scrollpos = scroll; + if (selection - scrollpos > MROWS) + scrollpos = selection - MROWS; + process = Menu; + active_menu = menu; + Clear_Screen(); + Draw_Title(Get_Menu_Title(menu)); + LOOP_L_N(i, TROWS) Menu_Item_Handler(menu, i + scrollpos); + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); +} + +void CrealityDWINClass::Redraw_Menu(bool lastprocess/*=true*/, bool lastselection/*=false*/, bool lastmenu/*=false*/) { + switch ((lastprocess) ? last_process : process) { + case Menu: + Draw_Menu((lastmenu) ? last_menu : active_menu, (lastselection) ? last_selection : selection, (lastmenu) ? 0 : scrollpos); + break; + case Main: Draw_Main_Menu((lastselection) ? last_selection : selection); break; + case Print: Draw_Print_Screen(); break; + case File: Draw_SD_List(); break; + default: break; + } +} + +void CrealityDWINClass::Redraw_Screen() { + Redraw_Menu(false); + Draw_Status_Area(true); + Update_Status_Bar(true); +} + +/* Primary Menus and Screen Elements */ + +void CrealityDWINClass::Main_Menu_Icons() { + if (selection == 0) { + DWIN_ICON_Show(ICON, ICON_Print_1, 17, 130); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 17, 130, 126, 229); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 52, 200, F("Print")); + } + else { + DWIN_ICON_Show(ICON, ICON_Print_0, 17, 130); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 52, 200, F("Print")); + } + if (selection == 1) { + DWIN_ICON_Show(ICON, ICON_Prepare_1, 145, 130); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 145, 130, 254, 229); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 170, 200, F("Prepare")); + } + else { + DWIN_ICON_Show(ICON, ICON_Prepare_0, 145, 130); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 170, 200, F("Prepare")); + } + if (selection == 2) { + DWIN_ICON_Show(ICON, ICON_Control_1, 17, 246); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 17, 246, 126, 345); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 43, 317, F("Control")); + } + else { + DWIN_ICON_Show(ICON, ICON_Control_0, 17, 246); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 43, 317, F("Control")); + } + #if HAS_ABL_OR_UBL + if (selection == 3) { + DWIN_ICON_Show(ICON, ICON_Leveling_1, 145, 246); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 145, 246, 254, 345); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 179, 317, F("Level")); + } + else { + DWIN_ICON_Show(ICON, ICON_Leveling_0, 145, 246); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 179, 317, F("Level")); + } + #else + if (selection == 3) { + DWIN_ICON_Show(ICON, ICON_Info_1, 145, 246); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 145, 246, 254, 345); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 181, 317, F("Info")); + } + else { + DWIN_ICON_Show(ICON, ICON_Info_0, 145, 246); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 181, 317, F("Info")); + } + #endif +} + +void CrealityDWINClass::Draw_Main_Menu(uint8_t select/*=0*/) { + process = Main; + active_menu = MainMenu; + selection = select; + Clear_Screen(); + Draw_Title(Get_Menu_Title(MainMenu)); + SERIAL_ECHOPGM("\nDWIN handshake "); + DWIN_ICON_Show(ICON, ICON_LOGO, 71, 72); + Main_Menu_Icons(); +} + +void CrealityDWINClass::Print_Screen_Icons() { + if (selection == 0) { + DWIN_ICON_Show(ICON, ICON_Setup_1, 8, 252); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 8, 252, 87, 351); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 30, 322, F("Tune")); + } + else { + DWIN_ICON_Show(ICON, ICON_Setup_0, 8, 252); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 30, 322, F("Tune")); + } + if (selection == 2) { + DWIN_ICON_Show(ICON, ICON_Stop_1, 184, 252); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 184, 252, 263, 351); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 205, 322, F("Stop")); + } + else { + DWIN_ICON_Show(ICON, ICON_Stop_0, 184, 252); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 205, 322, F("Stop")); + } + if (paused) { + if (selection == 1) { + DWIN_ICON_Show(ICON, ICON_Continue_1, 96, 252); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 96, 252, 175, 351); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 114, 322, F("Print")); + } + else { + DWIN_ICON_Show(ICON, ICON_Continue_0, 96, 252); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 114, 322, F("Print")); + } + } + else { + if (selection == 1) { + DWIN_ICON_Show(ICON, ICON_Pause_1, 96, 252); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 96, 252, 175, 351); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 114, 322, F("Pause")); + } + else { + DWIN_ICON_Show(ICON, ICON_Pause_0, 96, 252); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Blue, 114, 322, F("Pause")); + } + } +} + +void CrealityDWINClass::Draw_Print_Screen() { + process = Print; + selection = 0; + Clear_Screen(); + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 352, DWIN_WIDTH - 8, 376); + Draw_Title("Printing..."); + Print_Screen_Icons(); + DWIN_ICON_Show(ICON, ICON_PrintTime, 14, 171); + DWIN_ICON_Show(ICON, ICON_RemainTime, 147, 169); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, 41, 163, F("Elapsed")); + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, 176, 163, F("Remaining")); + Update_Status_Bar(true); + Draw_Print_ProgressBar(); + Draw_Print_ProgressElapsed(); + TERN_(USE_M73_REMAINING_TIME, Draw_Print_ProgressRemain()); + Draw_Print_Filename(true); +} + +void CrealityDWINClass::Draw_Print_Filename(const bool reset/*=false*/) { + static uint8_t namescrl = 0; + if (reset) namescrl = 0; + if (process == Print) { + size_t len = strlen(filename); + int8_t pos = len; + if (pos > 30) { + pos -= namescrl; + len = _MIN(pos, 30); + char dispname[len + 1]; + if (pos >= 0) { + LOOP_L_N(i, len) dispname[i] = filename[i + namescrl]; + } + else { + LOOP_L_N(i, 30 + pos) dispname[i] = ' '; + LOOP_S_L_N(i, 30 + pos, 30) dispname[i] = filename[i - (30 + pos)]; + } + dispname[len] = '\0'; + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 50, DWIN_WIDTH - 8, 80); + const int8_t npos = (DWIN_WIDTH - 30 * MENU_CHR_W) / 2; + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, npos, 60, dispname); + if (-pos >= 30) namescrl = 0; + namescrl++; + } + else { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 50, DWIN_WIDTH - 8, 80); + const int8_t npos = (DWIN_WIDTH - strlen(filename) * MENU_CHR_W) / 2; + DWIN_Draw_String(false, DWIN_FONT_MENU, Color_White, Color_Bg_Black, npos, 60, filename); + } + } +} + +void CrealityDWINClass::Draw_Print_ProgressBar() { + uint8_t printpercent = sdprint ? card.percentDone() : (ui._get_progress() / 100); + DWIN_ICON_Show(ICON, ICON_Bar, 15, 93); + DWIN_Draw_Rectangle(1, BarFill_Color, 16 + printpercent * 240 / 100, 93, 256, 113); + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_percent, Percent_Color), Color_Bg_Black, 3, 109, 133, printpercent); + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_percent, Percent_Color), Color_Bg_Black, 133, 133, F("%")); +} + +#if ENABLED(USE_M73_REMAINING_TIME) + + void CrealityDWINClass::Draw_Print_ProgressRemain() { + uint16_t remainingtime = ui.get_remaining_time(); + DWIN_Draw_IntValue(true, true, 1, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 2, 176, 187, remainingtime / 3600); + DWIN_Draw_IntValue(true, true, 1, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 2, 200, 187, (remainingtime % 3600) / 60); + if (eeprom_settings.time_format_textual) { + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 192, 187, F("h")); + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 216, 187, F("m")); + } + else + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 192, 187, F(":")); + } + +#endif + +void CrealityDWINClass::Draw_Print_ProgressElapsed() { + duration_t elapsed = print_job_timer.duration(); + DWIN_Draw_IntValue(true, true, 1, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 2, 42, 187, elapsed.value / 3600); + DWIN_Draw_IntValue(true, true, 1, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 2, 66, 187, (elapsed.value % 3600) / 60); + if (eeprom_settings.time_format_textual) { + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 58, 187, F("h")); + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 82, 187, F("m")); + } + else + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.progress_time, Color_White), Color_Bg_Black, 58, 187, F(":")); +} + +void CrealityDWINClass::Draw_Print_confirm() { + Draw_Print_Screen(); + process = Confirm; + popup = Complete; + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 252, 263, 351); + DWIN_ICON_Show(ICON, ICON_Confirm_E, 87, 283); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 86, 282, 187, 321); + DWIN_Draw_Rectangle(0, GetColor(eeprom_settings.highlight_box, Color_White), 85, 281, 188, 322); +} + +void CrealityDWINClass::Draw_SD_Item(uint8_t item, uint8_t row) { + if (item == 0) + Draw_Menu_Item(0, ICON_Back, card.flag.workDirIsRoot ? F("Back") : F("..")); + else { + card.getfilename_sorted(SD_ORDER(item - 1, card.get_num_Files())); + char * const filename = card.longest_filename(); + size_t max = MENU_CHAR_LIMIT; + size_t pos = strlen(filename), len = pos; + if (!card.flag.filenameIsDir) + while (pos && filename[pos] != '.') pos--; + len = pos; + if (len > max) len = max; + char name[len + 1]; + LOOP_L_N(i, len) name[i] = filename[i]; + if (pos > max) + LOOP_S_L_N(i, len - 3, len) name[i] = '.'; + name[len] = '\0'; + Draw_Menu_Item(row, card.flag.filenameIsDir ? ICON_More : ICON_File, name); + } +} + +void CrealityDWINClass::Draw_SD_List(bool removed/*=false*/) { + Clear_Screen(); + Draw_Title("Select File"); + selection = 0; + scrollpos = 0; + process = File; + if (card.isMounted() && !removed) { + LOOP_L_N(i, _MIN(card.get_num_Files() + 1, TROWS)) + Draw_SD_Item(i, i); + } + else { + Draw_Menu_Item(0, ICON_Back, F("Back")); + DWIN_Draw_Rectangle(1, Color_Bg_Red, 10, MBASE(3) - 10, DWIN_WIDTH - 10, MBASE(4)); + DWIN_Draw_String(false, font16x32, Color_Yellow, Color_Bg_Red, ((DWIN_WIDTH) - 8 * 16) / 2, MBASE(3), F("No Media")); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(0) - 18, 14, MBASE(0) + 33); +} + +void CrealityDWINClass::Draw_Status_Area(bool icons/*=false*/) { + + if (icons) DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, STATUS_Y, DWIN_WIDTH, DWIN_HEIGHT - 1); + + #if HAS_HOTEND + static float hotend = -1; + static int16_t hotendtarget = -1, flow = -1; + if (icons) { + hotend = -1; + hotendtarget = -1; + DWIN_ICON_Show(ICON, ICON_HotendTemp, 10, 383); + DWIN_Draw_String(false, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 384, F("/")); + } + if (thermalManager.temp_hotend[0].celsius != hotend) { + hotend = thermalManager.temp_hotend[0].celsius; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 28, 384, thermalManager.temp_hotend[0].celsius); + DWIN_Draw_DegreeSymbol(GetColor(eeprom_settings.status_area_text, Color_White), 25 + 3 * STAT_CHR_W + 5, 386); + } + if (thermalManager.temp_hotend[0].target != hotendtarget) { + hotendtarget = thermalManager.temp_hotend[0].target; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 384, thermalManager.temp_hotend[0].target); + DWIN_Draw_DegreeSymbol(GetColor(eeprom_settings.status_area_text, Color_White), 25 + 4 * STAT_CHR_W + 39, 386); + } + if (icons) { + flow = -1; + DWIN_ICON_Show(ICON, ICON_StepE, 112, 417); + DWIN_Draw_String(false, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 417, F("%")); + } + if (planner.flow_percentage[0] != flow) { + flow = planner.flow_percentage[0]; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 417, planner.flow_percentage[0]); + } + #endif + + #if HAS_HEATED_BED + static float bed = -1; + static int16_t bedtarget = -1; + if (icons) { + bed = -1; + bedtarget = -1; + DWIN_ICON_Show(ICON, ICON_BedTemp, 10, 416); + DWIN_Draw_String(false, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 25 + 3 * STAT_CHR_W + 5, 417, F("/")); + } + if (thermalManager.temp_bed.celsius != bed) { + bed = thermalManager.temp_bed.celsius; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 28, 417, thermalManager.temp_bed.celsius); + DWIN_Draw_DegreeSymbol(GetColor(eeprom_settings.status_area_text, Color_White), 25 + 3 * STAT_CHR_W + 5, 419); + } + if (thermalManager.temp_bed.target != bedtarget) { + bedtarget = thermalManager.temp_bed.target; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 25 + 4 * STAT_CHR_W + 6, 417, thermalManager.temp_bed.target); + DWIN_Draw_DegreeSymbol(GetColor(eeprom_settings.status_area_text, Color_White), 25 + 4 * STAT_CHR_W + 39, 419); + } + #endif + + #if HAS_FAN + static uint8_t fan = -1; + if (icons) { + fan = -1; + DWIN_ICON_Show(ICON, ICON_FanSpeed, 187, 383); + } + if (thermalManager.fan_speed[0] != fan) { + fan = thermalManager.fan_speed[0]; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 195 + 2 * STAT_CHR_W, 384, thermalManager.fan_speed[0]); + } + #endif + + #if HAS_ZOFFSET_ITEM + static float offset = -1; + + if (icons) { + offset = -1; + DWIN_ICON_Show(ICON, ICON_Zoffset, 187, 416); + } + if (zoffsetvalue != offset) { + offset = zoffsetvalue; + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 2, 2, 207, 417, (zoffsetvalue < 0 ? -zoffsetvalue : zoffsetvalue)); + DWIN_Draw_String(true, DWIN_FONT_MENU, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 205, 419, zoffsetvalue < 0 ? F("-") : F(" ")); + } + #endif + + static int16_t feedrate = -1; + if (icons) { + feedrate = -1; + DWIN_ICON_Show(ICON, ICON_Speed, 113, 383); + DWIN_Draw_String(false, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 116 + 5 * STAT_CHR_W + 2, 384, F("%")); + } + if (feedrate_percentage != feedrate) { + feedrate = feedrate_percentage; + DWIN_Draw_IntValue(true, true, 0, DWIN_FONT_STAT, GetColor(eeprom_settings.status_area_text, Color_White), Color_Bg_Black, 3, 116 + 2 * STAT_CHR_W, 384, feedrate_percentage); + } + + static float x = -1, y = -1, z = -1; + static bool update_x = false, update_y = false, update_z = false; + update_x = (current_position.x != x || axis_should_home(X_AXIS) || update_x); + update_y = (current_position.y != y || axis_should_home(Y_AXIS) || update_y); + update_z = (current_position.z != z || axis_should_home(Z_AXIS) || update_z); + if (icons) { + x = y = z = -1; + DWIN_Draw_Line(GetColor(eeprom_settings.coordinates_split_line, Line_Color, true), 16, 450, 256, 450); + DWIN_ICON_Show(ICON, ICON_MaxSpeedX, 10, 456); + DWIN_ICON_Show(ICON, ICON_MaxSpeedY, 95, 456); + DWIN_ICON_Show(ICON, ICON_MaxSpeedZ, 180, 456); + } + if (update_x) { + x = current_position.x; + if ((update_x = axis_should_home(X_AXIS) && ui.get_blink())) + DWIN_Draw_String(true, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 35, 459, F(" -?- ")); + else + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 1, 35, 459, current_position.x); + } + if (update_y) { + y = current_position.y; + if ((update_y = axis_should_home(Y_AXIS) && ui.get_blink())) + DWIN_Draw_String(true, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 120, 459, F(" -?- ")); + else + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 1, 120, 459, current_position.y); + } + if (update_z) { + z = current_position.z; + if ((update_z = axis_should_home(Z_AXIS) && ui.get_blink())) + DWIN_Draw_String(true, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 205, 459, F(" -?- ")); + else + DWIN_Draw_FloatValue(true, true, 0, DWIN_FONT_MENU, GetColor(eeprom_settings.coordinates_text, Color_White), Color_Bg_Black, 3, 2, 205, 459, (current_position.z>=0) ? current_position.z : 0); + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Draw_Popup(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, uint8_t mode, uint8_t icon/*=0*/) { + if (process != Confirm && process != Popup && process != Wait) last_process = process; + if ((process == Menu || process == Wait) && mode == Popup) last_selection = selection; + process = mode; + Clear_Screen(); + DWIN_Draw_Rectangle(0, Color_White, 13, 59, 259, 351); + DWIN_Draw_Rectangle(1, Color_Bg_Window, 14, 60, 258, 350); + const uint8_t ypos = (mode == Popup || mode == Confirm) ? 150 : 230; + if (icon > 0) DWIN_ICON_Show(ICON, icon, 101, 105); + DWIN_Draw_String(true, DWIN_FONT_MENU, Popup_Text_Color, Color_Bg_Window, (272 - 8 * strlen_P(FTOP(line1))) / 2, ypos, line1); + DWIN_Draw_String(true, DWIN_FONT_MENU, Popup_Text_Color, Color_Bg_Window, (272 - 8 * strlen_P(FTOP(line2))) / 2, ypos + 30, line2); + DWIN_Draw_String(true, DWIN_FONT_MENU, Popup_Text_Color, Color_Bg_Window, (272 - 8 * strlen_P(FTOP(line3))) / 2, ypos + 60, line3); + if (mode == Popup) { + selection = 0; + DWIN_Draw_Rectangle(1, Confirm_Color, 26, 280, 125, 317); + DWIN_Draw_Rectangle(1, Cancel_Color, 146, 280, 245, 317); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Window, 39, 290, F("Confirm")); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Window, 165, 290, F("Cancel")); + Popup_Select(); + } + else if (mode == Confirm) { + DWIN_Draw_Rectangle(1, Confirm_Color, 87, 280, 186, 317); + DWIN_Draw_String(false, DWIN_FONT_STAT, Color_White, Color_Bg_Window, 96, 290, F("Continue")); + } +} + +void MarlinUI::kill_screen(PGM_P const error, PGM_P const component) { + CrealityDWIN.Draw_Popup(F("Printer Kill Reason:"), error, F("Restart Required"), Wait, ICON_BLTouch); +} + +void CrealityDWINClass::Popup_Select() { + const uint16_t c1 = (selection == 0) ? GetColor(eeprom_settings.highlight_box, Color_White) : Color_Bg_Window, + c2 = (selection == 0) ? Color_Bg_Window : GetColor(eeprom_settings.highlight_box, Color_White); + DWIN_Draw_Rectangle(0, c1, 25, 279, 126, 318); + DWIN_Draw_Rectangle(0, c1, 24, 278, 127, 319); + DWIN_Draw_Rectangle(0, c2, 145, 279, 246, 318); + DWIN_Draw_Rectangle(0, c2, 144, 278, 247, 319); +} + +void CrealityDWINClass::Update_Status_Bar(bool refresh/*=false*/) { + static bool new_msg; + static uint8_t msgscrl = 0; + static char lastmsg[64]; + if (strcmp_P(lastmsg, statusmsg) != 0 || refresh) { + strcpy_P(lastmsg, statusmsg); + msgscrl = 0; + new_msg = true; + } + size_t len = strlen(statusmsg); + int8_t pos = len; + if (pos > 30) { + pos -= msgscrl; + len = pos; + if (len > 30) + len = 30; + char dispmsg[len + 1]; + if (pos >= 0) { + LOOP_L_N(i, len) dispmsg[i] = statusmsg[i + msgscrl]; + } + else { + LOOP_L_N(i, 30 + pos) dispmsg[i] = ' '; + LOOP_S_L_N(i, 30 + pos, 30) dispmsg[i] = statusmsg[i - (30 + pos)]; + } + dispmsg[len] = '\0'; + if (process == Print) { + DWIN_Draw_Rectangle(1, Color_Grey, 8, 214, DWIN_WIDTH - 8, 238); + const int8_t npos = (DWIN_WIDTH - 30 * MENU_CHR_W) / 2; + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.status_bar_text, Color_White), Color_Bg_Black, npos, 219, dispmsg); + } + else { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 352, DWIN_WIDTH - 8, 376); + const int8_t npos = (DWIN_WIDTH - 30 * MENU_CHR_W) / 2; + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.status_bar_text, Color_White), Color_Bg_Black, npos, 357, dispmsg); + } + if (-pos >= 30) msgscrl = 0; + msgscrl++; + } + else { + if (new_msg) { + new_msg = false; + if (process == Print) { + DWIN_Draw_Rectangle(1, Color_Grey, 8, 214, DWIN_WIDTH - 8, 238); + const int8_t npos = (DWIN_WIDTH - strlen(statusmsg) * MENU_CHR_W) / 2; + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.status_bar_text, Color_White), Color_Bg_Black, npos, 219, statusmsg); + } + else { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 8, 352, DWIN_WIDTH - 8, 376); + const int8_t npos = (DWIN_WIDTH - strlen(statusmsg) * MENU_CHR_W) / 2; + DWIN_Draw_String(false, DWIN_FONT_MENU, GetColor(eeprom_settings.status_bar_text, Color_White), Color_Bg_Black, npos, 357, statusmsg); + } + } + } +} + +/* Menu Item Config */ + +void CrealityDWINClass::Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw/*=true*/) { + uint8_t row = item - scrollpos; + #if HAS_LEVELING + static bool level_state; + #endif + switch (menu) { + case Prepare: + + #define PREPARE_BACK 0 + #define PREPARE_MOVE (PREPARE_BACK + 1) + #define PREPARE_DISABLE (PREPARE_MOVE + 1) + #define PREPARE_HOME (PREPARE_DISABLE + 1) + #define PREPARE_MANUALLEVEL (PREPARE_HOME + 1) + #define PREPARE_ZOFFSET (PREPARE_MANUALLEVEL + ENABLED(HAS_ZOFFSET_ITEM)) + #define PREPARE_PREHEAT (PREPARE_ZOFFSET + ENABLED(HAS_PREHEAT)) + #define PREPARE_COOLDOWN (PREPARE_PREHEAT + ENABLED(HAS_PREHEAT)) + #define PREPARE_CHANGEFIL (PREPARE_COOLDOWN + ENABLED(ADVANCED_PAUSE_FEATURE)) + #define PREPARE_TOTAL PREPARE_CHANGEFIL + + switch (item) { + case PREPARE_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Main_Menu(1); + break; + case PREPARE_MOVE: + if (draw) + Draw_Menu_Item(row, ICON_Axis, F("Move"), nullptr, true); + else + Draw_Menu(Move); + break; + case PREPARE_DISABLE: + if (draw) + Draw_Menu_Item(row, ICON_CloseMotor, F("Disable Stepper")); + else + queue.inject_P(PSTR("M84")); + break; + case PREPARE_HOME: + if (draw) + Draw_Menu_Item(row, ICON_SetHome, F("Homing"), nullptr, true); + else + Draw_Menu(HomeMenu); + break; + case PREPARE_MANUALLEVEL: + if (draw) + Draw_Menu_Item(row, ICON_PrintSize, F("Manual Leveling"), nullptr, true); + else { + if (axes_should_home()) { + Popup_Handler(Home); + gcode.home_all_axes(true); + } + #if HAS_LEVELING + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + #endif + Draw_Menu(ManualLevel); + } + break; + + #if HAS_ZOFFSET_ITEM + case PREPARE_ZOFFSET: + if (draw) + Draw_Menu_Item(row, ICON_Zoffset, F("Z-Offset"), nullptr, true); + else { + #if HAS_LEVELING + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + #endif + Draw_Menu(ZOffset); + } + break; + #endif + + #if HAS_PREHEAT + case PREPARE_PREHEAT: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F("Preheat"), nullptr, true); + else + Draw_Menu(Preheat); + break; + case PREPARE_COOLDOWN: + if (draw) + Draw_Menu_Item(row, ICON_Cool, F("Cooldown")); + else { + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + thermalManager.disable_all_heaters(); + } + break; + #endif + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case PREPARE_CHANGEFIL: + if (draw) { + Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Change Filament") + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + , nullptr, true + #endif + ); + } + else { + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + Draw_Menu(ChangeFilament); + #else + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + Popup_Handler(ETemp); + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + } + #endif + } + break; + #endif + } + break; + + case HomeMenu: + + #define HOME_BACK 0 + #define HOME_ALL (HOME_BACK + 1) + #define HOME_X (HOME_ALL + 1) + #define HOME_Y (HOME_X + 1) + #define HOME_Z (HOME_Y + 1) + #define HOME_SET (HOME_Z + 1) + #define HOME_TOTAL HOME_SET + + switch (item) { + case HOME_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Prepare, PREPARE_HOME); + break; + case HOME_ALL: + if (draw) + Draw_Menu_Item(row, ICON_Homing, F("Home All")); + else { + Popup_Handler(Home); + gcode.home_all_axes(true); + Redraw_Menu(); + } + break; + case HOME_X: + if (draw) + Draw_Menu_Item(row, ICON_MoveX, F("Home X")); + else { + Popup_Handler(Home); + gcode.process_subcommands_now_P(PSTR("G28 X")); + planner.synchronize(); + Redraw_Menu(); + } + break; + case HOME_Y: + if (draw) + Draw_Menu_Item(row, ICON_MoveY, F("Home Y")); + else { + Popup_Handler(Home); + gcode.process_subcommands_now_P(PSTR("G28 Y")); + planner.synchronize(); + Redraw_Menu(); + } + break; + case HOME_Z: + if (draw) + Draw_Menu_Item(row, ICON_MoveZ, F("Home Z")); + else { + Popup_Handler(Home); + gcode.process_subcommands_now_P(PSTR("G28 Z")); + planner.synchronize(); + Redraw_Menu(); + } + break; + case HOME_SET: + if (draw) + Draw_Menu_Item(row, ICON_SetHome, F("Set Home Position")); + else { + gcode.process_subcommands_now_P(PSTR("G92 X0 Y0 Z0")); + AudioFeedback(); + } + break; + } + break; + + case Move: + + #define MOVE_BACK 0 + #define MOVE_X (MOVE_BACK + 1) + #define MOVE_Y (MOVE_X + 1) + #define MOVE_Z (MOVE_Y + 1) + #define MOVE_E (MOVE_Z + ENABLED(HAS_HOTEND)) + #define MOVE_P (MOVE_E + ENABLED(HAS_BED_PROBE)) + #define MOVE_LIVE (MOVE_P + 1) + #define MOVE_TOTAL MOVE_LIVE + + switch (item) { + case MOVE_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else { + #if HAS_BED_PROBE + probe_deployed = false; + probe.set_deployed(probe_deployed); + #endif + Draw_Menu(Prepare, PREPARE_MOVE); + } + break; + case MOVE_X: + if (draw) { + Draw_Menu_Item(row, ICON_MoveX, F("Move X")); + Draw_Float(current_position.x, row, false); + } + else + Modify_Value(current_position.x, X_MIN_POS, X_MAX_POS, 10); + break; + case MOVE_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MoveY, F("Move Y")); + Draw_Float(current_position.y, row); + } + else + Modify_Value(current_position.y, Y_MIN_POS, Y_MAX_POS, 10); + break; + case MOVE_Z: + if (draw) { + Draw_Menu_Item(row, ICON_MoveZ, F("Move Z")); + Draw_Float(current_position.z, row); + } + else + Modify_Value(current_position.z, Z_MIN_POS, Z_MAX_POS, 10); + break; + + #if HAS_HOTEND + case MOVE_E: + if (draw) { + Draw_Menu_Item(row, ICON_Extruder, F("Extruder")); + current_position.e = 0; + sync_plan_position(); + Draw_Float(current_position.e, row); + } + else { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) { + Popup_Handler(ETemp); + } + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + Redraw_Menu(); + } + current_position.e = 0; + sync_plan_position(); + Modify_Value(current_position.e, -500, 500, 10); + } + } + break; + #endif // HAS_HOTEND + + #if HAS_BED_PROBE + case MOVE_P: + if (draw) { + Draw_Menu_Item(row, ICON_StockConfiguration, F("Probe")); + Draw_Checkbox(row, probe_deployed); + } + else { + probe_deployed = !probe_deployed; + probe.set_deployed(probe_deployed); + Draw_Checkbox(row, probe_deployed); + } + break; + #endif + + case MOVE_LIVE: + if (draw) { + Draw_Menu_Item(row, ICON_Axis, F("Live Movement")); + Draw_Checkbox(row, livemove); + } + else { + livemove = !livemove; + Draw_Checkbox(row, livemove); + } + break; + } + break; + case ManualLevel: + + #define MLEVEL_BACK 0 + #define MLEVEL_PROBE (MLEVEL_BACK + ENABLED(HAS_BED_PROBE)) + #define MLEVEL_BL (MLEVEL_PROBE + 1) + #define MLEVEL_TL (MLEVEL_BL + 1) + #define MLEVEL_TR (MLEVEL_TL + 1) + #define MLEVEL_BR (MLEVEL_TR + 1) + #define MLEVEL_C (MLEVEL_BR + 1) + #define MLEVEL_ZPOS (MLEVEL_C + 1) + #define MLEVEL_TOTAL MLEVEL_ZPOS + + static float mlev_z_pos = 0; + static bool use_probe = false; + + switch (item) { + case MLEVEL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else { + TERN_(HAS_LEVELING, set_bed_leveling_enabled(level_state)); + Draw_Menu(Prepare, PREPARE_MANUALLEVEL); + } + break; + #if HAS_BED_PROBE + case MLEVEL_PROBE: + if (draw) { + Draw_Menu_Item(row, ICON_Zoffset, F("Use Probe")); + Draw_Checkbox(row, use_probe); + } + else { + use_probe = !use_probe; + Draw_Checkbox(row, use_probe); + if (use_probe) { + Popup_Handler(Level); + corner_avg = 0; + #define PROBE_X_MIN _MAX(0 + corner_pos, X_MIN_POS + probe.offset.x, X_MIN_POS + PROBING_MARGIN) - probe.offset.x + #define PROBE_X_MAX _MIN((X_BED_SIZE + X_MIN_POS) - corner_pos, X_MAX_POS + probe.offset.x, X_MAX_POS - PROBING_MARGIN) - probe.offset.x + #define PROBE_Y_MIN _MAX(0 + corner_pos, Y_MIN_POS + probe.offset.y, Y_MIN_POS + PROBING_MARGIN) - probe.offset.y + #define PROBE_Y_MAX _MIN((Y_BED_SIZE + Y_MIN_POS) - corner_pos, Y_MAX_POS + probe.offset.y, Y_MAX_POS - PROBING_MARGIN) - probe.offset.y + corner_avg += probe.probe_at_point(PROBE_X_MIN, PROBE_Y_MIN, PROBE_PT_RAISE, 0, false); + corner_avg += probe.probe_at_point(PROBE_X_MIN, PROBE_Y_MAX, PROBE_PT_RAISE, 0, false); + corner_avg += probe.probe_at_point(PROBE_X_MAX, PROBE_Y_MAX, PROBE_PT_RAISE, 0, false); + corner_avg += probe.probe_at_point(PROBE_X_MAX, PROBE_Y_MIN, PROBE_PT_STOW, 0, false); + corner_avg /= 4; + Redraw_Menu(); + } + } + break; + #endif + case MLEVEL_BL: + if (draw) + Draw_Menu_Item(row, ICON_AxisBL, F("Bottom Left")); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_TL: + if (draw) + Draw_Menu_Item(row, ICON_AxisTL, F("Top Left")); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MIN, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf(corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_TR: + if (draw) + Draw_Menu_Item(row, ICON_AxisTR, F("Top Right")); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MAX, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) - corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_BR: + if (draw) + Draw_Menu_Item(row, ICON_AxisBR, F("Bottom Right")); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(PROBE_X_MAX, 1, 3, str_1), dtostrf(PROBE_Y_MIN, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) - corner_pos, 1, 3, str_1), dtostrf(corner_pos, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_C: + if (draw) + Draw_Menu_Item(row, ICON_AxisC, F("Center")); + else { + Popup_Handler(MoveWait); + if (use_probe) { + #if HAS_BED_PROBE + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s"), dtostrf(X_MAX_POS / 2.0f - probe.offset.x, 1, 3, str_1), dtostrf(Y_MAX_POS / 2.0f - probe.offset.y, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Popup_Handler(ManualProbing); + #endif + } + else { + sprintf_P(cmd, PSTR("G0 F4000\nG0 Z10\nG0 X%s Y%s\nG0 F300 Z%s"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), dtostrf(mlev_z_pos, 1, 3, str_3)); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case MLEVEL_ZPOS: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, F("Z Position")); + Draw_Float(mlev_z_pos, row, false, 100); + } + else + Modify_Value(mlev_z_pos, 0, MAX_Z_OFFSET, 100); + break; + } + break; + #if HAS_ZOFFSET_ITEM + case ZOffset: + + #define ZOFFSET_BACK 0 + #define ZOFFSET_HOME (ZOFFSET_BACK + 1) + #define ZOFFSET_MODE (ZOFFSET_HOME + 1) + #define ZOFFSET_OFFSET (ZOFFSET_MODE + 1) + #define ZOFFSET_UP (ZOFFSET_OFFSET + 1) + #define ZOFFSET_DOWN (ZOFFSET_UP + 1) + #define ZOFFSET_SAVE (ZOFFSET_DOWN + ENABLED(EEPROM_SETTINGS)) + #define ZOFFSET_TOTAL ZOFFSET_SAVE + + switch (item) { + case ZOFFSET_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else { + liveadjust = false; + TERN_(HAS_LEVELING, set_bed_leveling_enabled(level_state)); + Draw_Menu(Prepare, PREPARE_ZOFFSET); + } + break; + case ZOFFSET_HOME: + if (draw) + Draw_Menu_Item(row, ICON_Homing, F("Home Z Axis")); + else { + Popup_Handler(Home); + gcode.process_subcommands_now_P(PSTR("G28 Z")); + Popup_Handler(MoveWait); + #if ENABLED(Z_SAFE_HOMING) + planner.synchronize(); + sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + #else + gcode.process_subcommands_now_P(PSTR("G0 F4000 X117.5 Y117.5")); + #endif + gcode.process_subcommands_now_P(PSTR("G0 F300 Z0")); + planner.synchronize(); + Redraw_Menu(); + } + break; + case ZOFFSET_MODE: + if (draw) { + Draw_Menu_Item(row, ICON_Zoffset, F("Live Adjustment")); + Draw_Checkbox(row, liveadjust); + } + else { + if (!liveadjust) { + if (axes_should_home()) { + Popup_Handler(Home); + gcode.home_all_axes(true); + } + Popup_Handler(MoveWait); + #if ENABLED(Z_SAFE_HOMING) + planner.synchronize(); + sprintf_P(cmd, PSTR("G0 F4000 X%s Y%s"), dtostrf(Z_SAFE_HOMING_X_POINT, 1, 3, str_1), dtostrf(Z_SAFE_HOMING_Y_POINT, 1, 3, str_2)); + gcode.process_subcommands_now_P(cmd); + #else + gcode.process_subcommands_now_P(PSTR("G0 F4000 X117.5 Y117.5")); + #endif + gcode.process_subcommands_now_P(PSTR("G0 F300 Z0")); + planner.synchronize(); + Redraw_Menu(); + } + liveadjust = !liveadjust; + Draw_Checkbox(row, liveadjust); + } + break; + case ZOFFSET_OFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, F("Z Offset")); + Draw_Float(zoffsetvalue, row, false, 100); + } + else + Modify_Value(zoffsetvalue, MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + break; + case ZOFFSET_UP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); + else { + if (zoffsetvalue < MAX_Z_OFFSET) { + if (liveadjust) { + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + planner.synchronize(); + } + zoffsetvalue += 0.01; + Draw_Float(zoffsetvalue, row - 1, false, 100); + } + } + break; + case ZOFFSET_DOWN: + if (draw) + Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down")); + else { + if (zoffsetvalue > MIN_Z_OFFSET) { + if (liveadjust) { + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + planner.synchronize(); + } + zoffsetvalue -= 0.01; + Draw_Float(zoffsetvalue, row - 2, false, 100); + } + } + break; + #if ENABLED(EEPROM_SETTINGS) + case ZOFFSET_SAVE: + if (draw) + Draw_Menu_Item(row, ICON_WriteEEPROM, F("Save")); + else + AudioFeedback(settings.save()); + break; + #endif + } + break; + #endif + #if HAS_PREHEAT + case Preheat: + + #define PREHEAT_BACK 0 + #define PREHEAT_MODE (PREHEAT_BACK + 1) + #define PREHEAT_1 (PREHEAT_MODE + (PREHEAT_COUNT >= 1)) + #define PREHEAT_2 (PREHEAT_1 + (PREHEAT_COUNT >= 2)) + #define PREHEAT_3 (PREHEAT_2 + (PREHEAT_COUNT >= 3)) + #define PREHEAT_4 (PREHEAT_3 + (PREHEAT_COUNT >= 4)) + #define PREHEAT_5 (PREHEAT_4 + (PREHEAT_COUNT >= 5)) + #define PREHEAT_TOTAL PREHEAT_5 + + switch (item) { + case PREHEAT_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Prepare, PREPARE_PREHEAT); + break; + case PREHEAT_MODE: + if (draw) { + Draw_Menu_Item(row, ICON_Homing, F("Preheat Mode")); + Draw_Option(preheatmode, preheat_modes, row); + } + else + Modify_Option(preheatmode, preheat_modes, 2); + break; + + #if PREHEAT_COUNT >= 1 + case PREHEAT_1: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_1_LABEL)); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[0].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[0].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[0].bed_temp); + #endif + } + break; + #endif + + #if PREHEAT_COUNT >= 2 + case PREHEAT_2: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_2_LABEL)); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[1].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[1].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[1].bed_temp); + #endif + } + break; + #endif + + #if PREHEAT_COUNT >= 3 + case PREHEAT_3: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_3_LABEL)); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[2].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[2].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[2].bed_temp); + #endif + } + break; + #endif + + #if PREHEAT_COUNT >= 4 + case PREHEAT_4: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_4_LABEL)); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[3].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[3].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[3].bed_temp); + #endif + } + break; + #endif + + #if PREHEAT_COUNT >= 5 + case PREHEAT_5: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_5_LABEL)); + else { + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + if (preheatmode == 0 || preheatmode == 1) { + TERN_(HAS_HOTEND, thermalManager.setTargetHotend(ui.material_preset[4].hotend_temp, 0)); + TERN_(HAS_FAN, thermalManager.set_fan_speed(0, ui.material_preset[4].fan_speed)); + } + #if HAS_HEATED_BED + if (preheatmode == 0 || preheatmode == 2) thermalManager.setTargetBed(ui.material_preset[4].bed_temp); + #endif + } + break; + #endif + } + break; + #endif + + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case ChangeFilament: + + #define CHANGEFIL_BACK 0 + #define CHANGEFIL_LOAD (CHANGEFIL_BACK + 1) + #define CHANGEFIL_UNLOAD (CHANGEFIL_LOAD + 1) + #define CHANGEFIL_CHANGE (CHANGEFIL_UNLOAD + 1) + #define CHANGEFIL_TOTAL CHANGEFIL_CHANGE + + switch (item) { + case CHANGEFIL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Prepare, PREPARE_CHANGEFIL); + break; + case CHANGEFIL_LOAD: + if (draw) + Draw_Menu_Item(row, ICON_WriteEEPROM, F("Load Filament")); + else { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + Popup_Handler(ETemp); + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilLoad); + gcode.process_subcommands_now_P(PSTR("M701")); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case CHANGEFIL_UNLOAD: + if (draw) + Draw_Menu_Item(row, ICON_ReadEEPROM, F("Unload Filament")); + else { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) { + Popup_Handler(ETemp); + } + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilLoad, true); + gcode.process_subcommands_now_P(PSTR("M702")); + planner.synchronize(); + Redraw_Menu(); + } + } + break; + case CHANGEFIL_CHANGE: + if (draw) + Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Change Filament")); + else { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + Popup_Handler(ETemp); + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + } + } + break; + } + break; + #endif // FILAMENT_LOAD_UNLOAD_GCODES + + case Control: + + #define CONTROL_BACK 0 + #define CONTROL_TEMP (CONTROL_BACK + 1) + #define CONTROL_MOTION (CONTROL_TEMP + 1) + #define CONTROL_VISUAL (CONTROL_MOTION + 1) + #define CONTROL_ADVANCED (CONTROL_VISUAL + 1) + #define CONTROL_SAVE (CONTROL_ADVANCED + ENABLED(EEPROM_SETTINGS)) + #define CONTROL_RESTORE (CONTROL_SAVE + ENABLED(EEPROM_SETTINGS)) + #define CONTROL_RESET (CONTROL_RESTORE + ENABLED(EEPROM_SETTINGS)) + #define CONTROL_INFO (CONTROL_RESET + 1) + #define CONTROL_TOTAL CONTROL_INFO + + switch (item) { + case CONTROL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Main_Menu(2); + break; + case CONTROL_TEMP: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F("Temperature"), nullptr, true); + else + Draw_Menu(TempMenu); + break; + case CONTROL_MOTION: + if (draw) + Draw_Menu_Item(row, ICON_Motion, F("Motion"), nullptr, true); + else + Draw_Menu(Motion); + break; + case CONTROL_VISUAL: + if (draw) + Draw_Menu_Item(row, ICON_PrintSize, F("Visual"), nullptr, true); + else + Draw_Menu(Visual); + break; + case CONTROL_ADVANCED: + if (draw) + Draw_Menu_Item(row, ICON_Version, F("Advanced"), nullptr, true); + else + Draw_Menu(Advanced); + break; + #if ENABLED(EEPROM_SETTINGS) + case CONTROL_SAVE: + if (draw) + Draw_Menu_Item(row, ICON_WriteEEPROM, F("Store Settings")); + else + AudioFeedback(settings.save()); + break; + case CONTROL_RESTORE: + if (draw) + Draw_Menu_Item(row, ICON_ReadEEPROM, F("Restore Settings")); + else + AudioFeedback(settings.load()); + break; + case CONTROL_RESET: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F("Reset to Defaults")); + else { + settings.reset(); + AudioFeedback(); + } + break; + #endif + case CONTROL_INFO: + if (draw) + Draw_Menu_Item(row, ICON_Info, F("Info")); + else + Draw_Menu(Info); + break; + } + break; + + case TempMenu: + + #define TEMP_BACK 0 + #define TEMP_HOTEND (TEMP_BACK + ENABLED(HAS_HOTEND)) + #define TEMP_BED (TEMP_HOTEND + ENABLED(HAS_HEATED_BED)) + #define TEMP_FAN (TEMP_BED + ENABLED(HAS_FAN)) + #define TEMP_PID (TEMP_FAN + ANY(HAS_HOTEND, HAS_HEATED_BED)) + #define TEMP_PREHEAT1 (TEMP_PID + (PREHEAT_COUNT >= 1)) + #define TEMP_PREHEAT2 (TEMP_PREHEAT1 + (PREHEAT_COUNT >= 2)) + #define TEMP_PREHEAT3 (TEMP_PREHEAT2 + (PREHEAT_COUNT >= 3)) + #define TEMP_PREHEAT4 (TEMP_PREHEAT3 + (PREHEAT_COUNT >= 4)) + #define TEMP_PREHEAT5 (TEMP_PREHEAT4 + (PREHEAT_COUNT >= 5)) + #define TEMP_TOTAL TEMP_PREHEAT5 + + switch (item) { + case TEMP_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Control, CONTROL_TEMP); + break; + #if HAS_HOTEND + case TEMP_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, F("Hotend")); + Draw_Float(thermalManager.temp_hotend[0].target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_hotend[0].target, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case TEMP_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, F("Bed")); + Draw_Float(thermalManager.temp_bed.target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_bed.target, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case TEMP_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, F("Fan")); + Draw_Float(thermalManager.fan_speed[0], row, false, 1); + } + else + Modify_Value(thermalManager.fan_speed[0], MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + #if HAS_HOTEND || HAS_HEATED_BED + case TEMP_PID: + if (draw) + Draw_Menu_Item(row, ICON_Step, F("PID"), nullptr, true); + else + Draw_Menu(PID); + break; + #endif + #if PREHEAT_COUNT >= 1 + case TEMP_PREHEAT1: + if (draw) + Draw_Menu_Item(row, ICON_Step, F(PREHEAT_1_LABEL), nullptr, true); + else + Draw_Menu(Preheat1); + break; + #endif + #if PREHEAT_COUNT >= 2 + case TEMP_PREHEAT2: + if (draw) + Draw_Menu_Item(row, ICON_Step, F(PREHEAT_2_LABEL), nullptr, true); + else + Draw_Menu(Preheat2); + break; + #endif + #if PREHEAT_COUNT >= 3 + case TEMP_PREHEAT3: + if (draw) + Draw_Menu_Item(row, ICON_Step, F(PREHEAT_3_LABEL), nullptr, true); + else + Draw_Menu(Preheat3); + break; + #endif + #if PREHEAT_COUNT >= 4 + case TEMP_PREHEAT4: + if (draw) + Draw_Menu_Item(row, ICON_Step, F(PREHEAT_4_LABEL), nullptr, true); + else + Draw_Menu(Preheat4); + break; + #endif + #if PREHEAT_COUNT >= 5 + case TEMP_PREHEAT5: + if (draw) + Draw_Menu_Item(row, ICON_Step, F(PREHEAT_5_LABEL), nullptr, true); + else + Draw_Menu(Preheat5); + break; + #endif + } + break; + + #if HAS_HOTEND || HAS_HEATED_BED + case PID: + + #define PID_BACK 0 + #define PID_HOTEND (PID_BACK + ENABLED(HAS_HOTEND)) + #define PID_BED (PID_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PID_CYCLES (PID_BED + 1) + #define PID_TOTAL PID_CYCLES + + static uint8_t PID_cycles = 5; + + switch (item) { + case PID_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(TempMenu, TEMP_PID); + break; + #if HAS_HOTEND + case PID_HOTEND: + if (draw) + Draw_Menu_Item(row, ICON_HotendTemp, F("Hotend"), nullptr, true); + else + Draw_Menu(HotendPID); + break; + #endif + #if HAS_HEATED_BED + case PID_BED: + if (draw) + Draw_Menu_Item(row, ICON_BedTemp, F("Bed"), nullptr, true); + else + Draw_Menu(BedPID); + break; + #endif + case PID_CYCLES: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, F("Cycles")); + Draw_Float(PID_cycles, row, false, 1); + } + else + Modify_Value(PID_cycles, 3, 50, 1); + break; + } + break; + #endif // HAS_HOTEND || HAS_HEATED_BED + + #if HAS_HOTEND + case HotendPID: + + #define HOTENDPID_BACK 0 + #define HOTENDPID_TUNE (HOTENDPID_BACK + 1) + #define HOTENDPID_TEMP (HOTENDPID_TUNE + 1) + #define HOTENDPID_KP (HOTENDPID_TEMP + 1) + #define HOTENDPID_KI (HOTENDPID_KP + 1) + #define HOTENDPID_KD (HOTENDPID_KI + 1) + #define HOTENDPID_TOTAL HOTENDPID_KD + + static uint16_t PID_e_temp = 180; + + switch (item) { + case HOTENDPID_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(PID, PID_HOTEND); + break; + case HOTENDPID_TUNE: + if (draw) + Draw_Menu_Item(row, ICON_HotendTemp, F("Autotune")); + else { + Popup_Handler(PIDWait); + sprintf_P(cmd, PSTR("M303 E0 C%i S%i U1"), PID_cycles, PID_e_temp); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + break; + case HOTENDPID_TEMP: + if (draw) { + Draw_Menu_Item(row, ICON_Temperature, F("Temperature")); + Draw_Float(PID_e_temp, row, false, 1); + } + else + Modify_Value(PID_e_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + case HOTENDPID_KP: + if (draw) { + Draw_Menu_Item(row, ICON_Version, F("Kp Value")); + Draw_Float(thermalManager.temp_hotend[0].pid.Kp, row, false, 100); + } + else + Modify_Value(thermalManager.temp_hotend[0].pid.Kp, 0, 5000, 100, thermalManager.updatePID); + break; + case HOTENDPID_KI: + if (draw) { + Draw_Menu_Item(row, ICON_Version, F("Ki Value")); + Draw_Float(unscalePID_i(thermalManager.temp_hotend[0].pid.Ki), row, false, 100); + } + else + Modify_Value(thermalManager.temp_hotend[0].pid.Ki, 0, 5000, 100, thermalManager.updatePID); + break; + case HOTENDPID_KD: + if (draw) { + Draw_Menu_Item(row, ICON_Version, F("Kd Value")); + Draw_Float(unscalePID_d(thermalManager.temp_hotend[0].pid.Kd), row, false, 100); + } + else + Modify_Value(thermalManager.temp_hotend[0].pid.Kd, 0, 5000, 100, thermalManager.updatePID); + break; + } + break; + #endif // HAS_HOTEND + + #if HAS_HEATED_BED + case BedPID: + + #define BEDPID_BACK 0 + #define BEDPID_TUNE (BEDPID_BACK + 1) + #define BEDPID_TEMP (BEDPID_TUNE + 1) + #define BEDPID_KP (BEDPID_TEMP + 1) + #define BEDPID_KI (BEDPID_KP + 1) + #define BEDPID_KD (BEDPID_KI + 1) + #define BEDPID_TOTAL BEDPID_KD + + static uint16_t PID_bed_temp = 60; + + switch (item) { + case BEDPID_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(PID, PID_BED); + break; + case BEDPID_TUNE: + if (draw) + Draw_Menu_Item(row, ICON_HotendTemp, F("Autotune")); + else { + Popup_Handler(PIDWait); + sprintf_P(cmd, PSTR("M303 E-1 C%i S%i U1"), PID_cycles, PID_bed_temp); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + break; + case BEDPID_TEMP: + if (draw) { + Draw_Menu_Item(row, ICON_Temperature, F("Temperature")); + Draw_Float(PID_bed_temp, row, false, 1); + } + else + Modify_Value(PID_bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + case BEDPID_KP: + if (draw) { + Draw_Menu_Item(row, ICON_Version, F("Kp Value")); + Draw_Float(thermalManager.temp_bed.pid.Kp, row, false, 100); + } + else { + Modify_Value(thermalManager.temp_bed.pid.Kp, 0, 5000, 100, thermalManager.updatePID); + } + break; + case BEDPID_KI: + if (draw) { + Draw_Menu_Item(row, ICON_Version, F("Ki Value")); + Draw_Float(unscalePID_i(thermalManager.temp_bed.pid.Ki), row, false, 100); + } + else + Modify_Value(thermalManager.temp_bed.pid.Ki, 0, 5000, 100, thermalManager.updatePID); + break; + case BEDPID_KD: + if (draw) { + Draw_Menu_Item(row, ICON_Version, F("Kd Value")); + Draw_Float(unscalePID_d(thermalManager.temp_bed.pid.Kd), row, false, 100); + } + else + Modify_Value(thermalManager.temp_bed.pid.Kd, 0, 5000, 100, thermalManager.updatePID); + break; + } + break; + #endif // HAS_HEATED_BED + + #if PREHEAT_COUNT >= 1 + case Preheat1: + + #define PREHEAT1_BACK 0 + #define PREHEAT1_HOTEND (PREHEAT1_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT1_BED (PREHEAT1_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT1_FAN (PREHEAT1_BED + ENABLED(HAS_FAN)) + #define PREHEAT1_TOTAL PREHEAT1_FAN + + switch (item) { + case PREHEAT1_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(TempMenu, TEMP_PREHEAT1); + break; + #if HAS_HOTEND + case PREHEAT1_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, F("Hotend")); + Draw_Float(ui.material_preset[0].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[0].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT1_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, F("Bed")); + Draw_Float(ui.material_preset[0].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[0].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT1_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, F("Fan")); + Draw_Float(ui.material_preset[0].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[0].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 1 + + #if PREHEAT_COUNT >= 2 + case Preheat2: + + #define PREHEAT2_BACK 0 + #define PREHEAT2_HOTEND (PREHEAT2_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT2_BED (PREHEAT2_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT2_FAN (PREHEAT2_BED + ENABLED(HAS_FAN)) + #define PREHEAT2_TOTAL PREHEAT2_FAN + + switch (item) { + case PREHEAT2_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(TempMenu, TEMP_PREHEAT2); + break; + #if HAS_HOTEND + case PREHEAT2_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, F("Hotend")); + Draw_Float(ui.material_preset[1].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[1].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT2_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, F("Bed")); + Draw_Float(ui.material_preset[1].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[1].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT2_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, F("Fan")); + Draw_Float(ui.material_preset[1].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[1].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 2 + + #if PREHEAT_COUNT >= 3 + case Preheat3: + + #define PREHEAT3_BACK 0 + #define PREHEAT3_HOTEND (PREHEAT3_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT3_BED (PREHEAT3_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT3_FAN (PREHEAT3_BED + ENABLED(HAS_FAN)) + #define PREHEAT3_TOTAL PREHEAT3_FAN + + switch (item) { + case PREHEAT3_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(TempMenu, TEMP_PREHEAT3); + break; + #if HAS_HOTEND + case PREHEAT3_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, F("Hotend")); + Draw_Float(ui.material_preset[2].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[2].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT3_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, F("Bed")); + Draw_Float(ui.material_preset[2].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[2].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT3_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, F("Fan")); + Draw_Float(ui.material_preset[2].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[2].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 3 + + #if PREHEAT_COUNT >= 4 + case Preheat4: + + #define PREHEAT4_BACK 0 + #define PREHEAT4_HOTEND (PREHEAT4_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT4_BED (PREHEAT4_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT4_FAN (PREHEAT4_BED + ENABLED(HAS_FAN)) + #define PREHEAT4_TOTAL PREHEAT4_FAN + + switch (item) { + case PREHEAT4_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(TempMenu, TEMP_PREHEAT4); + break; + #if HAS_HOTEND + case PREHEAT4_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, F("Hotend")); + Draw_Float(ui.material_preset[3].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[3].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT4_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, F("Bed")); + Draw_Float(ui.material_preset[3].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[3].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT4_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, F("Fan")); + Draw_Float(ui.material_preset[3].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[3].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 4 + + #if PREHEAT_COUNT >= 5 + case Preheat5: + + #define PREHEAT5_BACK 0 + #define PREHEAT5_HOTEND (PREHEAT5_BACK + ENABLED(HAS_HOTEND)) + #define PREHEAT5_BED (PREHEAT5_HOTEND + ENABLED(HAS_HEATED_BED)) + #define PREHEAT5_FAN (PREHEAT5_BED + ENABLED(HAS_FAN)) + #define PREHEAT5_TOTAL PREHEAT5_FAN + + switch (item) { + case PREHEAT5_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(TempMenu, TEMP_PREHEAT5); + break; + #if HAS_HOTEND + case PREHEAT5_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, F("Hotend")); + Draw_Float(ui.material_preset[4].hotend_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[4].hotend_temp, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + #if HAS_HEATED_BED + case PREHEAT5_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, F("Bed")); + Draw_Float(ui.material_preset[4].bed_temp, row, false, 1); + } + else + Modify_Value(ui.material_preset[4].bed_temp, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + #if HAS_FAN + case PREHEAT5_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, F("Fan")); + Draw_Float(ui.material_preset[4].fan_speed, row, false, 1); + } + else + Modify_Value(ui.material_preset[4].fan_speed, MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + } + break; + #endif // PREHEAT_COUNT >= 5 + + case Motion: + + #define MOTION_BACK 0 + #define MOTION_HOMEOFFSETS (MOTION_BACK + 1) + #define MOTION_SPEED (MOTION_HOMEOFFSETS + 1) + #define MOTION_ACCEL (MOTION_SPEED + 1) + #define MOTION_JERK (MOTION_ACCEL + ENABLED(HAS_CLASSIC_JERK)) + #define MOTION_STEPS (MOTION_JERK + 1) + #define MOTION_FLOW (MOTION_STEPS + ENABLED(HAS_HOTEND)) + #define MOTION_TOTAL MOTION_FLOW + + switch (item) { + case MOTION_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Control, CONTROL_MOTION); + break; + case MOTION_HOMEOFFSETS: + if (draw) + Draw_Menu_Item(row, ICON_SetHome, F("Home Offsets"), nullptr, true); + else + Draw_Menu(HomeOffsets); + break; + case MOTION_SPEED: + if (draw) + Draw_Menu_Item(row, ICON_MaxSpeed, F("Max Speed"), nullptr, true); + else + Draw_Menu(MaxSpeed); + break; + case MOTION_ACCEL: + if (draw) + Draw_Menu_Item(row, ICON_MaxAccelerated, F("Max Acceleration"), nullptr, true); + else + Draw_Menu(MaxAcceleration); + break; + #if HAS_CLASSIC_JERK + case MOTION_JERK: + if (draw) + Draw_Menu_Item(row, ICON_MaxJerk, F("Max Jerk"), nullptr, true); + else + Draw_Menu(MaxJerk); + break; + #endif + case MOTION_STEPS: + if (draw) + Draw_Menu_Item(row, ICON_Step, F("Steps/mm"), nullptr, true); + else + Draw_Menu(Steps); + break; + #if HAS_HOTEND + case MOTION_FLOW: + if (draw) { + Draw_Menu_Item(row, ICON_Speed, F("Flow Rate")); + Draw_Float(planner.flow_percentage[0], row, false, 1); + } + else + Modify_Value(planner.flow_percentage[0], MIN_FLOW_RATE, MAX_FLOW_RATE, 1); + break; + #endif + } + break; + + case HomeOffsets: + + #define HOMEOFFSETS_BACK 0 + #define HOMEOFFSETS_XOFFSET (HOMEOFFSETS_BACK + 1) + #define HOMEOFFSETS_YOFFSET (HOMEOFFSETS_XOFFSET + 1) + #define HOMEOFFSETS_TOTAL HOMEOFFSETS_YOFFSET + + switch (item) { + case HOMEOFFSETS_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Motion, MOTION_HOMEOFFSETS); + break; + case HOMEOFFSETS_XOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_StepX, F("X Offset")); + Draw_Float(home_offset.x, row, false, 100); + } + else + Modify_Value(home_offset.x, -MAX_XY_OFFSET, MAX_XY_OFFSET, 100); + break; + case HOMEOFFSETS_YOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_StepY, F("Y Offset")); + Draw_Float(home_offset.y, row, false, 100); + } + else + Modify_Value(home_offset.y, -MAX_XY_OFFSET, MAX_XY_OFFSET, 100); + break; + } + break; + case MaxSpeed: + + #define SPEED_BACK 0 + #define SPEED_X (SPEED_BACK + 1) + #define SPEED_Y (SPEED_X + 1) + #define SPEED_Z (SPEED_Y + 1) + #define SPEED_E (SPEED_Z + ENABLED(HAS_HOTEND)) + #define SPEED_TOTAL SPEED_E + + switch (item) { + case SPEED_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Motion, MOTION_SPEED); + break; + case SPEED_X: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedX, F("X Axis")); + Draw_Float(planner.settings.max_feedrate_mm_s[X_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_feedrate_mm_s[X_AXIS], 0, default_max_feedrate[X_AXIS] * 2, 1); + break; + + #if HAS_Y_AXIS + case SPEED_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedY, F("Y Axis")); + Draw_Float(planner.settings.max_feedrate_mm_s[Y_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_feedrate_mm_s[Y_AXIS], 0, default_max_feedrate[Y_AXIS] * 2, 1); + break; + #endif + + #if HAS_Z_AXIS + case SPEED_Z: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedZ, F("Z Axis")); + Draw_Float(planner.settings.max_feedrate_mm_s[Z_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_feedrate_mm_s[Z_AXIS], 0, default_max_feedrate[Z_AXIS] * 2, 1); + break; + #endif + + #if HAS_HOTEND + case SPEED_E: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedE, F("Extruder")); + Draw_Float(planner.settings.max_feedrate_mm_s[E_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_feedrate_mm_s[E_AXIS], 0, default_max_feedrate[E_AXIS] * 2, 1); + break; + #endif + } + break; + + case MaxAcceleration: + + #define ACCEL_BACK 0 + #define ACCEL_X (ACCEL_BACK + 1) + #define ACCEL_Y (ACCEL_X + 1) + #define ACCEL_Z (ACCEL_Y + 1) + #define ACCEL_E (ACCEL_Z + ENABLED(HAS_HOTEND)) + #define ACCEL_TOTAL ACCEL_E + + switch (item) { + case ACCEL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Motion, MOTION_ACCEL); + break; + case ACCEL_X: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccX, F("X Axis")); + Draw_Float(planner.settings.max_acceleration_mm_per_s2[X_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_acceleration_mm_per_s2[X_AXIS], 0, default_max_acceleration[X_AXIS] * 2, 1); + break; + case ACCEL_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccY, F("Y Axis")); + Draw_Float(planner.settings.max_acceleration_mm_per_s2[Y_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_acceleration_mm_per_s2[Y_AXIS], 0, default_max_acceleration[Y_AXIS] * 2, 1); + break; + case ACCEL_Z: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccZ, F("Z Axis")); + Draw_Float(planner.settings.max_acceleration_mm_per_s2[Z_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_acceleration_mm_per_s2[Z_AXIS], 0, default_max_acceleration[Z_AXIS] * 2, 1); + break; + #if HAS_HOTEND + case ACCEL_E: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccE, F("Extruder")); + Draw_Float(planner.settings.max_acceleration_mm_per_s2[E_AXIS], row, false, 1); + } + else + Modify_Value(planner.settings.max_acceleration_mm_per_s2[E_AXIS], 0, default_max_acceleration[E_AXIS] * 2, 1); + break; + #endif + } + break; + #if HAS_CLASSIC_JERK + case MaxJerk: + + #define JERK_BACK 0 + #define JERK_X (JERK_BACK + 1) + #define JERK_Y (JERK_X + 1) + #define JERK_Z (JERK_Y + 1) + #define JERK_E (JERK_Z + ENABLED(HAS_HOTEND)) + #define JERK_TOTAL JERK_E + + switch (item) { + case JERK_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Motion, MOTION_JERK); + break; + case JERK_X: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedJerkX, F("X Axis")); + Draw_Float(planner.max_jerk[X_AXIS], row, false, 10); + } + else + Modify_Value(planner.max_jerk[X_AXIS], 0, default_max_jerk[X_AXIS] * 2, 10); + break; + case JERK_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedJerkY, F("Y Axis")); + Draw_Float(planner.max_jerk[Y_AXIS], row, false, 10); + } + else + Modify_Value(planner.max_jerk[Y_AXIS], 0, default_max_jerk[Y_AXIS] * 2, 10); + break; + case JERK_Z: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedJerkZ, F("Z Axis")); + Draw_Float(planner.max_jerk[Z_AXIS], row, false, 10); + } + else + Modify_Value(planner.max_jerk[Z_AXIS], 0, default_max_jerk[Z_AXIS] * 2, 10); + break; + #if HAS_HOTEND + case JERK_E: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeedJerkE, F("Extruder")); + Draw_Float(planner.max_jerk[E_AXIS], row, false, 10); + } + else + Modify_Value(planner.max_jerk[E_AXIS], 0, default_max_jerk[E_AXIS] * 2, 10); + break; + #endif + } + break; + #endif + case Steps: + + #define STEPS_BACK 0 + #define STEPS_X (STEPS_BACK + 1) + #define STEPS_Y (STEPS_X + 1) + #define STEPS_Z (STEPS_Y + 1) + #define STEPS_E (STEPS_Z + ENABLED(HAS_HOTEND)) + #define STEPS_TOTAL STEPS_E + + switch (item) { + case STEPS_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Motion, MOTION_STEPS); + break; + case STEPS_X: + if (draw) { + Draw_Menu_Item(row, ICON_StepX, F("X Axis")); + Draw_Float(planner.settings.axis_steps_per_mm[X_AXIS], row, false, 10); + } + else + Modify_Value(planner.settings.axis_steps_per_mm[X_AXIS], 0, default_steps[X_AXIS] * 2, 10); + break; + case STEPS_Y: + if (draw) { + Draw_Menu_Item(row, ICON_StepY, F("Y Axis")); + Draw_Float(planner.settings.axis_steps_per_mm[Y_AXIS], row, false, 10); + } + else + Modify_Value(planner.settings.axis_steps_per_mm[Y_AXIS], 0, default_steps[Y_AXIS] * 2, 10); + break; + case STEPS_Z: + if (draw) { + Draw_Menu_Item(row, ICON_StepZ, F("Z Axis")); + Draw_Float(planner.settings.axis_steps_per_mm[Z_AXIS], row, false, 10); + } + else + Modify_Value(planner.settings.axis_steps_per_mm[Z_AXIS], 0, default_steps[Z_AXIS] * 2, 10); + break; + #if HAS_HOTEND + case STEPS_E: + if (draw) { + Draw_Menu_Item(row, ICON_StepE, F("Extruder")); + Draw_Float(planner.settings.axis_steps_per_mm[E_AXIS], row, false, 10); + } + else + Modify_Value(planner.settings.axis_steps_per_mm[E_AXIS], 0, 1000, 10); + break; + #endif + } + break; + + case Visual: + + #define VISUAL_BACK 0 + #define VISUAL_BACKLIGHT (VISUAL_BACK + 1) + #define VISUAL_BRIGHTNESS (VISUAL_BACKLIGHT + 1) + #define VISUAL_TIME_FORMAT (VISUAL_BRIGHTNESS + 1) + #define VISUAL_COLOR_THEMES (VISUAL_TIME_FORMAT + 1) + #define VISUAL_TOTAL VISUAL_COLOR_THEMES + + switch (item) { + case VISUAL_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Control, CONTROL_VISUAL); + break; + case VISUAL_BACKLIGHT: + if (draw) + Draw_Menu_Item(row, ICON_Brightness, F("Display Off")); + else + ui.set_brightness(0); + break; + case VISUAL_BRIGHTNESS: + if (draw) { + Draw_Menu_Item(row, ICON_Brightness, F("LCD Brightness")); + Draw_Float(ui.brightness, row, false, 1); + } + else + Modify_Value(ui.brightness, LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX, 1, ui.refresh_brightness); + break; + case VISUAL_TIME_FORMAT: + if (draw) { + Draw_Menu_Item(row, ICON_PrintTime, F("Progress as __h__m")); + Draw_Checkbox(row, eeprom_settings.time_format_textual); + } + else { + eeprom_settings.time_format_textual = !eeprom_settings.time_format_textual; + Draw_Checkbox(row, eeprom_settings.time_format_textual); + } + break; + case VISUAL_COLOR_THEMES: + if (draw) + Draw_Menu_Item(row, ICON_MaxSpeed, F("UI Color Settings"), nullptr, true); + else + Draw_Menu(ColorSettings); + break; + } + break; + + case ColorSettings: + + #define COLORSETTINGS_BACK 0 + #define COLORSETTINGS_CURSOR (COLORSETTINGS_BACK + 1) + #define COLORSETTINGS_SPLIT_LINE (COLORSETTINGS_CURSOR + 1) + #define COLORSETTINGS_MENU_TOP_TXT (COLORSETTINGS_SPLIT_LINE + 1) + #define COLORSETTINGS_MENU_TOP_BG (COLORSETTINGS_MENU_TOP_TXT + 1) + #define COLORSETTINGS_HIGHLIGHT_BORDER (COLORSETTINGS_MENU_TOP_BG + 1) + #define COLORSETTINGS_PROGRESS_PERCENT (COLORSETTINGS_HIGHLIGHT_BORDER + 1) + #define COLORSETTINGS_PROGRESS_TIME (COLORSETTINGS_PROGRESS_PERCENT + 1) + #define COLORSETTINGS_PROGRESS_STATUS_BAR (COLORSETTINGS_PROGRESS_TIME + 1) + #define COLORSETTINGS_PROGRESS_STATUS_AREA (COLORSETTINGS_PROGRESS_STATUS_BAR + 1) + #define COLORSETTINGS_PROGRESS_COORDINATES (COLORSETTINGS_PROGRESS_STATUS_AREA + 1) + #define COLORSETTINGS_PROGRESS_COORDINATES_LINE (COLORSETTINGS_PROGRESS_COORDINATES + 1) + #define COLORSETTINGS_TOTAL COLORSETTINGS_PROGRESS_COORDINATES_LINE + + switch (item) { + case COLORSETTINGS_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Visual, VISUAL_COLOR_THEMES); + break; + case COLORSETTINGS_CURSOR: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Cursor")); + Draw_Option(eeprom_settings.cursor_color, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.cursor_color, color_names, Custom_Colors); + break; + case COLORSETTINGS_SPLIT_LINE: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Menu Split Line")); + Draw_Option(eeprom_settings.menu_split_line, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.menu_split_line, color_names, Custom_Colors); + break; + case COLORSETTINGS_MENU_TOP_TXT: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Menu Header Text")); + Draw_Option(eeprom_settings.menu_top_txt, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.menu_top_txt, color_names, Custom_Colors); + break; + case COLORSETTINGS_MENU_TOP_BG: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Menu Header Bg")); + Draw_Option(eeprom_settings.menu_top_bg, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.menu_top_bg, color_names, Custom_Colors); + break; + case COLORSETTINGS_HIGHLIGHT_BORDER: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Highlight Box")); + Draw_Option(eeprom_settings.highlight_box, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.highlight_box, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_PERCENT: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Progress Percent")); + Draw_Option(eeprom_settings.progress_percent, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.progress_percent, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_TIME: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Progress Time")); + Draw_Option(eeprom_settings.progress_time, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.progress_time, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_STATUS_BAR: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Status Bar Text")); + Draw_Option(eeprom_settings.status_bar_text, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.status_bar_text, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_STATUS_AREA: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Status Area Text")); + Draw_Option(eeprom_settings.status_area_text, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.status_area_text, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_COORDINATES: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Coordinates Text")); + Draw_Option(eeprom_settings.coordinates_text, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.coordinates_text, color_names, Custom_Colors); + break; + case COLORSETTINGS_PROGRESS_COORDINATES_LINE: + if (draw) { + Draw_Menu_Item(row, ICON_MaxSpeed, F("Coordinates Line")); + Draw_Option(eeprom_settings.coordinates_split_line, color_names, row, false, true); + } + else + Modify_Option(eeprom_settings.coordinates_split_line, color_names, Custom_Colors); + break; + } // switch (item) + break; + + case Advanced: + + #define ADVANCED_BACK 0 + #define ADVANCED_BEEPER (ADVANCED_BACK + ENABLED(SOUND_MENU_ITEM)) + #define ADVANCED_PROBE (ADVANCED_BEEPER + ENABLED(HAS_BED_PROBE)) + #define ADVANCED_CORNER (ADVANCED_PROBE + 1) + #define ADVANCED_LA (ADVANCED_CORNER + ENABLED(LIN_ADVANCE)) + #define ADVANCED_LOAD (ADVANCED_LA + ENABLED(ADVANCED_PAUSE_FEATURE)) + #define ADVANCED_UNLOAD (ADVANCED_LOAD + ENABLED(ADVANCED_PAUSE_FEATURE)) + #define ADVANCED_COLD_EXTRUDE (ADVANCED_UNLOAD + ENABLED(PREVENT_COLD_EXTRUSION)) + #define ADVANCED_FILSENSORENABLED (ADVANCED_COLD_EXTRUDE + ENABLED(FILAMENT_RUNOUT_SENSOR)) + #define ADVANCED_FILSENSORDISTANCE (ADVANCED_FILSENSORENABLED + ENABLED(HAS_FILAMENT_RUNOUT_DISTANCE)) + #define ADVANCED_POWER_LOSS (ADVANCED_FILSENSORDISTANCE + ENABLED(POWER_LOSS_RECOVERY)) + #define ADVANCED_TOTAL ADVANCED_POWER_LOSS + + switch (item) { + case ADVANCED_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Control, CONTROL_ADVANCED); + break; + + #if ENABLED(SOUND_MENU_ITEM) + case ADVANCED_BEEPER: + if (draw) { + Draw_Menu_Item(row, ICON_Version, F("LCD Beeper")); + Draw_Checkbox(row, ui.buzzer_enabled); + } + else { + ui.buzzer_enabled = !ui.buzzer_enabled; + Draw_Checkbox(row, ui.buzzer_enabled); + } + break; + #endif + + #if HAS_BED_PROBE + case ADVANCED_PROBE: + if (draw) + Draw_Menu_Item(row, ICON_StepX, F("Probe"), nullptr, true); + else + Draw_Menu(ProbeMenu); + break; + #endif + + case ADVANCED_CORNER: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccelerated, F("Bed Screw Inset")); + Draw_Float(corner_pos, row, false, 10); + } + else + Modify_Value(corner_pos, 1, 100, 10); + break; + + #if ENABLED(LIN_ADVANCE) + case ADVANCED_LA: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccelerated, F("Lin Advance Kp")); + Draw_Float(planner.extruder_advance_K[0], row, false, 100); + } + else + Modify_Value(planner.extruder_advance_K[0], 0, 10, 100); + break; + #endif + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case ADVANCED_LOAD: + if (draw) { + Draw_Menu_Item(row, ICON_WriteEEPROM, F("Load Length")); + Draw_Float(fc_settings[0].load_length, row, false, 1); + } + else + Modify_Value(fc_settings[0].load_length, 0, EXTRUDE_MAXLENGTH, 1); + break; + case ADVANCED_UNLOAD: + if (draw) { + Draw_Menu_Item(row, ICON_ReadEEPROM, F("Unload Length")); + Draw_Float(fc_settings[0].unload_length, row, false, 1); + } + else + Modify_Value(fc_settings[0].unload_length, 0, EXTRUDE_MAXLENGTH, 1); + break; + #endif // ADVANCED_PAUSE_FEATURE + + #if ENABLED(PREVENT_COLD_EXTRUSION) + case ADVANCED_COLD_EXTRUDE: + if (draw) { + Draw_Menu_Item(row, ICON_Cool, F("Min Extrusion T")); + Draw_Float(thermalManager.extrude_min_temp, row, false, 1); + } + else { + Modify_Value(thermalManager.extrude_min_temp, 0, MAX_E_TEMP, 1); + thermalManager.allow_cold_extrude = (thermalManager.extrude_min_temp == 0); + } + break; + #endif + + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + case ADVANCED_FILSENSORENABLED: + if (draw) { + Draw_Menu_Item(row, ICON_Extruder, F("Filament Sensor")); + Draw_Checkbox(row, runout.enabled); + } + else { + runout.enabled = !runout.enabled; + Draw_Checkbox(row, runout.enabled); + } + break; + + #if ENABLED(HAS_FILAMENT_RUNOUT_DISTANCE) + case ADVANCED_FILSENSORDISTANCE: + if (draw) { + Draw_Menu_Item(row, ICON_MaxAccE, F("Runout Distance")); + Draw_Float(runout.runout_distance(), row, false, 10); + } + else + Modify_Value(runout.runout_distance(), 0, 999, 10); + break; + #endif + #endif // FILAMENT_RUNOUT_SENSOR + + #if ENABLED(POWER_LOSS_RECOVERY) + case ADVANCED_POWER_LOSS: + if (draw) { + Draw_Menu_Item(row, ICON_Motion, F("Power-loss recovery")); + Draw_Checkbox(row, recovery.enabled); + } + else { + recovery.enable(!recovery.enabled); + Draw_Checkbox(row, recovery.enabled); + } + break; + #endif + } + break; + + #if HAS_BED_PROBE + case ProbeMenu: + + #define PROBE_BACK 0 + #define PROBE_XOFFSET (PROBE_BACK + 1) + #define PROBE_YOFFSET (PROBE_XOFFSET + 1) + #define PROBE_TEST (PROBE_YOFFSET + 1) + #define PROBE_TEST_COUNT (PROBE_TEST + 1) + #define PROBE_TOTAL PROBE_TEST_COUNT + + static uint8_t testcount = 4; + + switch (item) { + case PROBE_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Advanced, ADVANCED_PROBE); + break; + + case PROBE_XOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_StepX, F("Probe X Offset")); + Draw_Float(probe.offset.x, row, false, 10); + } + else + Modify_Value(probe.offset.x, -MAX_XY_OFFSET, MAX_XY_OFFSET, 10); + break; + case PROBE_YOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_StepY, F("Probe Y Offset")); + Draw_Float(probe.offset.y, row, false, 10); + } + else + Modify_Value(probe.offset.y, -MAX_XY_OFFSET, MAX_XY_OFFSET, 10); + break; + case PROBE_TEST: + if (draw) + Draw_Menu_Item(row, ICON_StepY, F("M48 Probe Test")); + else { + sprintf_P(cmd, PSTR("G28O\nM48 X%s Y%s P%i"), dtostrf((X_BED_SIZE + X_MIN_POS) / 2.0f, 1, 3, str_1), dtostrf((Y_BED_SIZE + Y_MIN_POS) / 2.0f, 1, 3, str_2), testcount); + gcode.process_subcommands_now_P(cmd); + } + break; + case PROBE_TEST_COUNT: + if (draw) { + Draw_Menu_Item(row, ICON_StepY, F("Probe Test Count")); + Draw_Float(testcount, row, false, 1); + } + else + Modify_Value(testcount, 4, 50, 1); + break; + } + break; + #endif + + case InfoMain: + case Info: + + #define INFO_BACK 0 + #define INFO_PRINTCOUNT (INFO_BACK + ENABLED(PRINTCOUNTER)) + #define INFO_PRINTTIME (INFO_PRINTCOUNT + ENABLED(PRINTCOUNTER)) + #define INFO_SIZE (INFO_PRINTTIME + 1) + #define INFO_VERSION (INFO_SIZE + 1) + #define INFO_CONTACT (INFO_VERSION + 1) + #define INFO_TOTAL INFO_BACK + + switch (item) { + case INFO_BACK: + if (draw) { + Draw_Menu_Item(row, ICON_Back, F("Back")); + + #if ENABLED(PRINTCOUNTER) + char row1[50], row2[50], buf[32]; + printStatistics ps = print_job_timer.getStats(); + + sprintf_P(row1, PSTR("%i prints, %i finished"), ps.totalPrints, ps.finishedPrints); + sprintf_P(row2, PSTR("%s m filament used"), dtostrf(ps.filamentUsed / 1000, 1, 2, str_1)); + Draw_Menu_Item(INFO_PRINTCOUNT, ICON_HotendTemp, row1, row2, false, true); + + duration_t(print_job_timer.getStats().printTime).toString(buf); + sprintf_P(row1, PSTR("Printed: %s"), buf); + duration_t(print_job_timer.getStats().longestPrint).toString(buf); + sprintf_P(row2, PSTR("Longest: %s"), buf); + Draw_Menu_Item(INFO_PRINTTIME, ICON_PrintTime, row1, row2, false, true); + #endif + + Draw_Menu_Item(INFO_SIZE, ICON_PrintSize, F(MACHINE_SIZE), nullptr, false, true); + Draw_Menu_Item(INFO_VERSION, ICON_Version, F(SHORT_BUILD_VERSION), nullptr, false, true); + Draw_Menu_Item(INFO_CONTACT, ICON_Contact, F(CORP_WEBSITE), nullptr, false, true); + } + else { + if (menu == Info) + Draw_Menu(Control, CONTROL_INFO); + else + Draw_Main_Menu(3); + } + break; + } + break; + + #if HAS_MESH + case Leveling: + + #define LEVELING_BACK 0 + #define LEVELING_ACTIVE (LEVELING_BACK + 1) + #define LEVELING_GET_TILT (LEVELING_ACTIVE + BOTH(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL)) + #define LEVELING_GET_MESH (LEVELING_GET_TILT + 1) + #define LEVELING_MANUAL (LEVELING_GET_MESH + 1) + #define LEVELING_VIEW (LEVELING_MANUAL + 1) + #define LEVELING_SETTINGS (LEVELING_VIEW + 1) + #define LEVELING_SLOT (LEVELING_SETTINGS + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_LOAD (LEVELING_SLOT + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SAVE (LEVELING_LOAD + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_TOTAL LEVELING_SAVE + + switch (item) { + case LEVELING_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Main_Menu(3); + break; + case LEVELING_ACTIVE: + if (draw) { + Draw_Menu_Item(row, ICON_StockConfiguration, F("Leveling Active")); + Draw_Checkbox(row, planner.leveling_active); + } + else { + if (!planner.leveling_active) { + set_bed_leveling_enabled(!planner.leveling_active); + if (!planner.leveling_active) { + Confirm_Handler(LevelError); + break; + } + } + else + set_bed_leveling_enabled(!planner.leveling_active); + Draw_Checkbox(row, planner.leveling_active); + } + break; + #if BOTH(HAS_BED_PROBE, AUTO_BED_LEVELING_UBL) + case LEVELING_GET_TILT: + if (draw) + Draw_Menu_Item(row, ICON_Tilt, F("Autotilt Current Mesh")); + else { + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + Popup_Handler(Home); + gcode.home_all_axes(true); + Popup_Handler(Level); + if (mesh_conf.tilt_grid > 1) + sprintf_P(cmd, PSTR("G29 J%i"), mesh_conf.tilt_grid); + else + sprintf_P(cmd, PSTR("G29 J")); + gcode.process_subcommands_now_P(cmd); + planner.synchronize(); + Redraw_Menu(); + } + break; + #endif + case LEVELING_GET_MESH: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, F("Create New Mesh")); + else { + Popup_Handler(Home); + gcode.home_all_axes(true); + #if ENABLED(AUTO_BED_LEVELING_UBL) + #if ENABLED(PREHEAT_BEFORE_LEVELING) + Popup_Handler(Heating); + #if HAS_HOTEND + if (thermalManager.degTargetHotend(0) < LEVELING_NOZZLE_TEMP) + thermalManager.setTargetHotend(LEVELING_NOZZLE_TEMP, 0); + #endif + #if HAS_HEATED_BED + if (thermalManager.degTargetBed() < LEVELING_BED_TEMP) + thermalManager.setTargetBed(LEVELING_BED_TEMP); + #endif + thermalManager.wait_for_hotend(0); + TERN_(HAS_HEATED_BED, thermalManager.wait_for_bed_heating()); + #endif + #if HAS_BED_PROBE + Popup_Handler(Level); + gcode.process_subcommands_now_P(PSTR("G29 P0\nG29 P1")); + gcode.process_subcommands_now_P(PSTR("G29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nG29 P3\nM420 S1")); + planner.synchronize(); + Update_Status("Probed all reachable points"); + Popup_Handler(SaveLevel); + #else + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + mesh_conf.goto_mesh_value = true; + mesh_conf.mesh_x = mesh_conf.mesh_y = 0; + Popup_Handler(MoveWait); + mesh_conf.manual_move();; + Draw_Menu(UBLMesh); + #endif + #elif HAS_BED_PROBE + Popup_Handler(Level); + gcode.process_subcommands_now_P(PSTR("G29")); + planner.synchronize(); + Popup_Handler(SaveLevel); + #else + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + gridpoint = 1; + Popup_Handler(MoveWait); + gcode.process_subcommands_now_P(PSTR("G29")); + planner.synchronize(); + Draw_Menu(ManualMesh); + #endif + } + break; + case LEVELING_MANUAL: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, F("Manual Tuning"), nullptr, true); + else { + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + if (!leveling_is_valid()) { + Confirm_Handler(InvalidMesh); + break; + } + #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + #endif + if (axes_should_home()) { + Popup_Handler(Home); + gcode.home_all_axes(true); + } + level_state = planner.leveling_active; + set_bed_leveling_enabled(false); + mesh_conf.goto_mesh_value = false; + #if ENABLED(PREHEAT_BEFORE_LEVELING) + Popup_Handler(Heating); + #if HAS_HOTEND + if (thermalManager.degTargetHotend(0) < LEVELING_NOZZLE_TEMP) + thermalManager.setTargetHotend(LEVELING_NOZZLE_TEMP, 0); + #endif + #if HAS_HEATED_BED + if (thermalManager.degTargetBed() < LEVELING_BED_TEMP) + thermalManager.setTargetBed(LEVELING_BED_TEMP); + #endif + TERN_(HAS_HOTEND, thermalManager.wait_for_hotend(0)); + TERN_(HAS_HEATED_BED, thermalManager.wait_for_bed_heating()); + #endif + Popup_Handler(MoveWait); + mesh_conf.manual_move(); + Draw_Menu(LevelManual); + } + break; + case LEVELING_VIEW: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, GET_TEXT(MSG_MESH_VIEW), nullptr, true); + else { + #if ENABLED(AUTO_BED_LEVELING_UBL) + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + #endif + Draw_Menu(LevelView); + } + break; + case LEVELING_SETTINGS: + if (draw) + Draw_Menu_Item(row, ICON_Step, F("Leveling Settings"), nullptr, true); + else + Draw_Menu(LevelSettings); + break; + #if ENABLED(AUTO_BED_LEVELING_UBL) + case LEVELING_SLOT: + if (draw) { + Draw_Menu_Item(row, ICON_PrintSize, F("Mesh Slot")); + Draw_Float(ubl.storage_slot, row, false, 1); + } + else + Modify_Value(ubl.storage_slot, 0, settings.calc_num_meshes() - 1, 1); + break; + case LEVELING_LOAD: + if (draw) + Draw_Menu_Item(row, ICON_ReadEEPROM, F("Load Mesh")); + else { + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + gcode.process_subcommands_now_P(PSTR("G29 L")); + planner.synchronize(); + AudioFeedback(true); + } + break; + case LEVELING_SAVE: + if (draw) + Draw_Menu_Item(row, ICON_WriteEEPROM, F("Save Mesh")); + else { + if (ubl.storage_slot < 0) { + Popup_Handler(MeshSlot); + break; + } + gcode.process_subcommands_now_P(PSTR("G29 S")); + planner.synchronize(); + AudioFeedback(true); + } + break; + #endif + } + break; + + case LevelView: + + #define LEVELING_VIEW_BACK 0 + #define LEVELING_VIEW_MESH (LEVELING_VIEW_BACK + 1) + #define LEVELING_VIEW_TEXT (LEVELING_VIEW_MESH + 1) + #define LEVELING_VIEW_ASYMMETRIC (LEVELING_VIEW_TEXT + 1) + #define LEVELING_VIEW_TOTAL LEVELING_VIEW_ASYMMETRIC + + switch (item) { + case LEVELING_VIEW_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Leveling, LEVELING_VIEW); + break; + case LEVELING_VIEW_MESH: + if (draw) + Draw_Menu_Item(row, ICON_PrintSize, GET_TEXT(MSG_MESH_VIEW), nullptr, true); + else + Draw_Menu(MeshViewer); + break; + case LEVELING_VIEW_TEXT: + if (draw) { + Draw_Menu_Item(row, ICON_Contact, F("Viewer Show Values")); + Draw_Checkbox(row, mesh_conf.viewer_print_value); + } + else { + mesh_conf.viewer_print_value = !mesh_conf.viewer_print_value; + Draw_Checkbox(row, mesh_conf.viewer_print_value); + } + break; + case LEVELING_VIEW_ASYMMETRIC: + if (draw) { + Draw_Menu_Item(row, ICON_Axis, F("Viewer Asymmetric")); + Draw_Checkbox(row, mesh_conf.viewer_asymmetric_range); + } + else { + mesh_conf.viewer_asymmetric_range = !mesh_conf.viewer_asymmetric_range; + Draw_Checkbox(row, mesh_conf.viewer_asymmetric_range); + } + break; + } + break; + + case LevelSettings: + + #define LEVELING_SETTINGS_BACK 0 + #define LEVELING_SETTINGS_FADE (LEVELING_SETTINGS_BACK + 1) + #define LEVELING_SETTINGS_TILT (LEVELING_SETTINGS_FADE + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SETTINGS_PLANE (LEVELING_SETTINGS_TILT + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SETTINGS_ZERO (LEVELING_SETTINGS_PLANE + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SETTINGS_UNDEF (LEVELING_SETTINGS_ZERO + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_SETTINGS_TOTAL LEVELING_SETTINGS_UNDEF + + switch (item) { + case LEVELING_SETTINGS_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Menu(Leveling, LEVELING_SETTINGS); + break; + case LEVELING_SETTINGS_FADE: + if (draw) { + Draw_Menu_Item(row, ICON_Fade, F("Fade Mesh within")); + Draw_Float(planner.z_fade_height, row, false, 1); + } + else { + Modify_Value(planner.z_fade_height, 0, Z_MAX_POS, 1); + planner.z_fade_height = -1; + set_z_fade_height(planner.z_fade_height); + } + break; + + #if ENABLED(AUTO_BED_LEVELING_UBL) + case LEVELING_SETTINGS_TILT: + if (draw) { + Draw_Menu_Item(row, ICON_Tilt, F("Tilting Grid Size")); + Draw_Float(mesh_conf.tilt_grid, row, false, 1); + } + else + Modify_Value(mesh_conf.tilt_grid, 1, 8, 1); + break; + case LEVELING_SETTINGS_PLANE: + if (draw) + Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Convert Mesh to Plane")); + else { + if (mesh_conf.create_plane_from_mesh()) break; + gcode.process_subcommands_now_P(PSTR("M420 S1")); + planner.synchronize(); + AudioFeedback(true); + } + break; + case LEVELING_SETTINGS_ZERO: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, F("Zero Current Mesh")); + else + ZERO(Z_VALUES_ARR); + break; + case LEVELING_SETTINGS_UNDEF: + if (draw) + Draw_Menu_Item(row, ICON_Mesh, F("Clear Current Mesh")); + else + ubl.invalidate(); + break; + #endif // AUTO_BED_LEVELING_UBL + } + break; + + case MeshViewer: + #define MESHVIEW_BACK 0 + #define MESHVIEW_TOTAL MESHVIEW_BACK + + if (item == MESHVIEW_BACK) { + if (draw) { + Draw_Menu_Item(0, ICON_Back, F("Back")); + mesh_conf.Draw_Bed_Mesh(); + mesh_conf.Set_Mesh_Viewer_Status(); + } + else if (!mesh_conf.drawing_mesh) { + Draw_Menu(LevelView, LEVELING_VIEW_MESH); + Update_Status(""); + } + } + break; + + case LevelManual: + + #define LEVELING_M_BACK 0 + #define LEVELING_M_X (LEVELING_M_BACK + 1) + #define LEVELING_M_Y (LEVELING_M_X + 1) + #define LEVELING_M_NEXT (LEVELING_M_Y + 1) + #define LEVELING_M_OFFSET (LEVELING_M_NEXT + 1) + #define LEVELING_M_UP (LEVELING_M_OFFSET + 1) + #define LEVELING_M_DOWN (LEVELING_M_UP + 1) + #define LEVELING_M_GOTO_VALUE (LEVELING_M_DOWN + 1) + #define LEVELING_M_UNDEF (LEVELING_M_GOTO_VALUE + ENABLED(AUTO_BED_LEVELING_UBL)) + #define LEVELING_M_TOTAL LEVELING_M_UNDEF + + switch (item) { + case LEVELING_M_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else { + set_bed_leveling_enabled(level_state); + TERN_(AUTO_BED_LEVELING_BILINEAR, refresh_bed_level()); + Draw_Menu(Leveling, LEVELING_MANUAL); + } + break; + case LEVELING_M_X: + if (draw) { + Draw_Menu_Item(row, ICON_MoveX, F("Mesh Point X")); + Draw_Float(mesh_conf.mesh_x, row, 0, 1); + } + else + Modify_Value(mesh_conf.mesh_x, 0, GRID_MAX_POINTS_X - 1, 1); + break; + case LEVELING_M_Y: + if (draw) { + Draw_Menu_Item(row, ICON_MoveY, F("Mesh Point Y")); + Draw_Float(mesh_conf.mesh_y, row, 0, 1); + } + else + Modify_Value(mesh_conf.mesh_y, 0, GRID_MAX_POINTS_Y - 1, 1); + break; + case LEVELING_M_NEXT: + if (draw) + Draw_Menu_Item(row, ICON_More, F("Next Point")); + else { + if (mesh_conf.mesh_x != (GRID_MAX_POINTS_X - 1) || mesh_conf.mesh_y != (GRID_MAX_POINTS_Y - 1)) { + if ((mesh_conf.mesh_x == (GRID_MAX_POINTS_X - 1) && mesh_conf.mesh_y % 2 == 0) || (mesh_conf.mesh_x == 0 && mesh_conf.mesh_y % 2 == 1)) + mesh_conf.mesh_y++; + else if (mesh_conf.mesh_y % 2 == 0) + mesh_conf.mesh_x++; + else + mesh_conf.mesh_x--; + mesh_conf.manual_move(); + } + } + break; + case LEVELING_M_OFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, F("Point Z Offset")); + Draw_Float(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y], row, false, 100); + } + else { + if (isnan(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y])) + Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] = 0; + Modify_Value(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y], MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + } + break; + case LEVELING_M_UP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); + else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) { + Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01; + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + planner.synchronize(); + current_position.z += 0.01f; + sync_plan_position(); + Draw_Float(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y], row - 1, false, 100); + } + break; + case LEVELING_M_DOWN: + if (draw) + Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down")); + else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) { + Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01; + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + planner.synchronize(); + current_position.z -= 0.01f; + sync_plan_position(); + Draw_Float(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y], row - 2, false, 100); + } + break; + case LEVELING_M_GOTO_VALUE: + if (draw) { + Draw_Menu_Item(row, ICON_StockConfiguration, F("Go to Mesh Z Value")); + Draw_Checkbox(row, mesh_conf.goto_mesh_value); + } + else { + mesh_conf.goto_mesh_value = !mesh_conf.goto_mesh_value; + current_position.z = 0; + mesh_conf.manual_move(true); + Draw_Checkbox(row, mesh_conf.goto_mesh_value); + } + break; + #if ENABLED(AUTO_BED_LEVELING_UBL) + case LEVELING_M_UNDEF: + if (draw) + Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Clear Point Value")); + else { + mesh_conf.manual_value_update(true); + Redraw_Menu(false); + } + break; + #endif + } + break; + #endif // HAS_MESH + + #if ENABLED(AUTO_BED_LEVELING_UBL) && !HAS_BED_PROBE + case UBLMesh: + + #define UBL_M_BACK 0 + #define UBL_M_NEXT (UBL_M_BACK + 1) + #define UBL_M_PREV (UBL_M_NEXT + 1) + #define UBL_M_OFFSET (UBL_M_PREV + 1) + #define UBL_M_UP (UBL_M_OFFSET + 1) + #define UBL_M_DOWN (UBL_M_UP + 1) + #define UBL_M_TOTAL UBL_M_DOWN + + switch (item) { + case UBL_M_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else { + set_bed_leveling_enabled(level_state); + Draw_Menu(Leveling, LEVELING_GET_MESH); + } + break; + case UBL_M_NEXT: + if (draw) { + if (mesh_conf.mesh_x != (GRID_MAX_POINTS_X - 1) || mesh_conf.mesh_y != (GRID_MAX_POINTS_Y - 1)) + Draw_Menu_Item(row, ICON_More, F("Next Point")); + else + Draw_Menu_Item(row, ICON_More, F("Save Mesh")); + } + else { + if (mesh_conf.mesh_x != (GRID_MAX_POINTS_X - 1) || mesh_conf.mesh_y != (GRID_MAX_POINTS_Y - 1)) { + if ((mesh_conf.mesh_x == (GRID_MAX_POINTS_X - 1) && mesh_conf.mesh_y % 2 == 0) || (mesh_conf.mesh_x == 0 && mesh_conf.mesh_y % 2 == 1)) + mesh_conf.mesh_y++; + else if (mesh_conf.mesh_y % 2 == 0) + mesh_conf.mesh_x++; + else + mesh_conf.mesh_x--; + mesh_conf.manual_move(); + } + else { + gcode.process_subcommands_now_P(PSTR("G29 S")); + planner.synchronize(); + AudioFeedback(true); + Draw_Menu(Leveling, LEVELING_GET_MESH); + } + } + break; + case UBL_M_PREV: + if (draw) + Draw_Menu_Item(row, ICON_More, F("Previous Point")); + else { + if (mesh_conf.mesh_x != 0 || mesh_conf.mesh_y != 0) { + if ((mesh_conf.mesh_x == (GRID_MAX_POINTS_X - 1) && mesh_conf.mesh_y % 2 == 1) || (mesh_conf.mesh_x == 0 && mesh_conf.mesh_y % 2 == 0)) + mesh_conf.mesh_y--; + else if (mesh_conf.mesh_y % 2 == 0) + mesh_conf.mesh_x--; + else + mesh_conf.mesh_x++; + mesh_conf.manual_move(); + } + } + break; + case UBL_M_OFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, F("Point Z Offset")); + Draw_Float(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y], row, false, 100); + } + else { + if (isnan(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y])) + Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] = 0; + Modify_Value(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y], MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + } + break; + case UBL_M_UP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); + else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] < MAX_Z_OFFSET) { + Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] += 0.01; + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + planner.synchronize(); + current_position.z += 0.01f; + sync_plan_position(); + Draw_Float(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y], row - 1, false, 100); + } + break; + case UBL_M_DOWN: + if (draw) + Draw_Menu_Item(row, ICON_Axis, F("Microstep Down")); + else if (Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] > MIN_Z_OFFSET) { + Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y] -= 0.01; + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + planner.synchronize(); + current_position.z -= 0.01f; + sync_plan_position(); + Draw_Float(Z_VALUES_ARR[mesh_conf.mesh_x][mesh_conf.mesh_y], row - 2, false, 100); + } + break; + } + break; + #endif // AUTO_BED_LEVELING_UBL && !HAS_BED_PROBE + + #if ENABLED(PROBE_MANUALLY) + case ManualMesh: + + #define MMESH_BACK 0 + #define MMESH_NEXT (MMESH_BACK + 1) + #define MMESH_OFFSET (MMESH_NEXT + 1) + #define MMESH_UP (MMESH_OFFSET + 1) + #define MMESH_DOWN (MMESH_UP + 1) + #define MMESH_OLD (MMESH_DOWN + 1) + #define MMESH_TOTAL MMESH_OLD + + switch (item) { + case MMESH_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Cancel")); + else { + gcode.process_subcommands_now_P(PSTR("G29 A")); + planner.synchronize(); + set_bed_leveling_enabled(level_state); + Draw_Menu(Leveling, LEVELING_GET_MESH); + } + break; + case MMESH_NEXT: + if (draw) { + if (gridpoint < GRID_MAX_POINTS) + Draw_Menu_Item(row, ICON_More, F("Next Point")); + else + Draw_Menu_Item(row, ICON_More, F("Save Mesh")); + } + else if (gridpoint < GRID_MAX_POINTS) { + Popup_Handler(MoveWait); + gcode.process_subcommands_now_P(PSTR("G29")); + planner.synchronize(); + gridpoint++; + Redraw_Menu(); + } + else { + gcode.process_subcommands_now_P(PSTR("G29")); + planner.synchronize(); + AudioFeedback(settings.save()); + Draw_Menu(Leveling, LEVELING_GET_MESH); + } + break; + case MMESH_OFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_SetZOffset, F("Z Position")); + current_position.z = MANUAL_PROBE_START_Z; + Draw_Float(current_position.z, row, false, 100); + } + else + Modify_Value(current_position.z, MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + break; + case MMESH_UP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, F("Microstep Up")); + else if (current_position.z < MAX_Z_OFFSET) { + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + planner.synchronize(); + current_position.z += 0.01f; + sync_plan_position(); + Draw_Float(current_position.z, row - 1, false, 100); + } + break; + case MMESH_DOWN: + if (draw) + Draw_Menu_Item(row, ICON_AxisD, F("Microstep Down")); + else if (current_position.z > MIN_Z_OFFSET) { + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + planner.synchronize(); + current_position.z -= 0.01f; + sync_plan_position(); + Draw_Float(current_position.z, row - 2, false, 100); + } + break; + case MMESH_OLD: + uint8_t mesh_x, mesh_y; + // 0,0 -> 1,0 -> 2,0 -> 2,1 -> 1,1 -> 0,1 -> 0,2 -> 1,2 -> 2,2 + mesh_y = (gridpoint - 1) / GRID_MAX_POINTS_Y; + mesh_x = (gridpoint - 1) % GRID_MAX_POINTS_X; + + if (mesh_y % 2 == 1) + mesh_x = GRID_MAX_POINTS_X - mesh_x - 1; + + const float currval = Z_VALUES_ARR[mesh_x][mesh_y]; + + if (draw) { + Draw_Menu_Item(row, ICON_Zoffset, F("Goto Mesh Value")); + Draw_Float(currval, row, false, 100); + } + else if (!isnan(currval)) { + current_position.z = currval; + planner.synchronize(); + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + planner.synchronize(); + Draw_Float(current_position.z, row - 3, false, 100); + } + break; + } + break; + #endif // PROBE_MANUALLY + + case Tune: + + #define TUNE_BACK 0 + #define TUNE_SPEED (TUNE_BACK + 1) + #define TUNE_FLOW (TUNE_SPEED + ENABLED(HAS_HOTEND)) + #define TUNE_HOTEND (TUNE_FLOW + ENABLED(HAS_HOTEND)) + #define TUNE_BED (TUNE_HOTEND + ENABLED(HAS_HEATED_BED)) + #define TUNE_FAN (TUNE_BED + ENABLED(HAS_FAN)) + #define TUNE_ZOFFSET (TUNE_FAN + ENABLED(HAS_ZOFFSET_ITEM)) + #define TUNE_ZUP (TUNE_ZOFFSET + ENABLED(HAS_ZOFFSET_ITEM)) + #define TUNE_ZDOWN (TUNE_ZUP + ENABLED(HAS_ZOFFSET_ITEM)) + #define TUNE_CHANGEFIL (TUNE_ZDOWN + ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)) + #define TUNE_FILSENSORENABLED (TUNE_CHANGEFIL + ENABLED(FILAMENT_RUNOUT_SENSOR)) + #define TUNE_BACKLIGHT_OFF (TUNE_FILSENSORENABLED + 1) + #define TUNE_BACKLIGHT (TUNE_BACKLIGHT_OFF + 1) + #define TUNE_TOTAL TUNE_BACKLIGHT + + switch (item) { + case TUNE_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Back")); + else + Draw_Print_Screen(); + break; + case TUNE_SPEED: + if (draw) { + Draw_Menu_Item(row, ICON_Speed, F("Print Speed")); + Draw_Float(feedrate_percentage, row, false, 1); + } + else + Modify_Value(feedrate_percentage, MIN_PRINT_SPEED, MAX_PRINT_SPEED, 1); + break; + + #if HAS_HOTEND + case TUNE_FLOW: + if (draw) { + Draw_Menu_Item(row, ICON_Speed, F("Flow Rate")); + Draw_Float(planner.flow_percentage[0], row, false, 1); + } + else + Modify_Value(planner.flow_percentage[0], MIN_FLOW_RATE, MAX_FLOW_RATE, 1); + break; + case TUNE_HOTEND: + if (draw) { + Draw_Menu_Item(row, ICON_SetEndTemp, F("Hotend")); + Draw_Float(thermalManager.temp_hotend[0].target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_hotend[0].target, MIN_E_TEMP, MAX_E_TEMP, 1); + break; + #endif + + #if HAS_HEATED_BED + case TUNE_BED: + if (draw) { + Draw_Menu_Item(row, ICON_SetBedTemp, F("Bed")); + Draw_Float(thermalManager.temp_bed.target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_bed.target, MIN_BED_TEMP, MAX_BED_TEMP, 1); + break; + #endif + + #if HAS_FAN + case TUNE_FAN: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, F("Fan")); + Draw_Float(thermalManager.fan_speed[0], row, false, 1); + } + else + Modify_Value(thermalManager.fan_speed[0], MIN_FAN_SPEED, MAX_FAN_SPEED, 1); + break; + #endif + + #if HAS_ZOFFSET_ITEM + case TUNE_ZOFFSET: + if (draw) { + Draw_Menu_Item(row, ICON_FanSpeed, F("Z-Offset")); + Draw_Float(zoffsetvalue, row, false, 100); + } + else + Modify_Value(zoffsetvalue, MIN_Z_OFFSET, MAX_Z_OFFSET, 100); + break; + case TUNE_ZUP: + if (draw) + Draw_Menu_Item(row, ICON_Axis, F("Z-Offset Up")); + else if (zoffsetvalue < MAX_Z_OFFSET) { + gcode.process_subcommands_now_P(PSTR("M290 Z0.01")); + zoffsetvalue += 0.01; + Draw_Float(zoffsetvalue, row - 1, false, 100); + } + break; + case TUNE_ZDOWN: + if (draw) + Draw_Menu_Item(row, ICON_AxisD, F("Z-Offset Down")); + else if (zoffsetvalue > MIN_Z_OFFSET) { + gcode.process_subcommands_now_P(PSTR("M290 Z-0.01")); + zoffsetvalue -= 0.01; + Draw_Float(zoffsetvalue, row - 2, false, 100); + } + break; + #endif + + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case TUNE_CHANGEFIL: + if (draw) + Draw_Menu_Item(row, ICON_ResumeEEPROM, F("Change Filament")); + else + Popup_Handler(ConfFilChange); + break; + #endif + + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + case TUNE_FILSENSORENABLED: + if (draw) { + Draw_Menu_Item(row, ICON_Extruder, F("Filament Sensor")); + Draw_Checkbox(row, runout.enabled); + } + else { + runout.enabled = !runout.enabled; + Draw_Checkbox(row, runout.enabled); + } + break; + #endif + + case TUNE_BACKLIGHT_OFF: + if (draw) + Draw_Menu_Item(row, ICON_Brightness, F("Display Off")); + else + ui.set_brightness(0); + break; + case TUNE_BACKLIGHT: + if (draw) { + Draw_Menu_Item(row, ICON_Brightness, F("LCD Brightness")); + Draw_Float(ui.brightness, row, false, 1); + } + else + Modify_Value(ui.brightness, LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX, 1, ui.refresh_brightness); + break; + } + break; + + case PreheatHotend: + + #define PREHEATHOTEND_BACK 0 + #define PREHEATHOTEND_CONTINUE (PREHEATHOTEND_BACK + 1) + #define PREHEATHOTEND_1 (PREHEATHOTEND_CONTINUE + (PREHEAT_COUNT >= 1)) + #define PREHEATHOTEND_2 (PREHEATHOTEND_1 + (PREHEAT_COUNT >= 2)) + #define PREHEATHOTEND_3 (PREHEATHOTEND_2 + (PREHEAT_COUNT >= 3)) + #define PREHEATHOTEND_4 (PREHEATHOTEND_3 + (PREHEAT_COUNT >= 4)) + #define PREHEATHOTEND_5 (PREHEATHOTEND_4 + (PREHEAT_COUNT >= 5)) + #define PREHEATHOTEND_CUSTOM (PREHEATHOTEND_5 + 1) + #define PREHEATHOTEND_TOTAL PREHEATHOTEND_CUSTOM + + switch (item) { + case PREHEATHOTEND_BACK: + if (draw) + Draw_Menu_Item(row, ICON_Back, F("Cancel")); + else { + thermalManager.setTargetHotend(0, 0); + thermalManager.set_fan_speed(0, 0); + Redraw_Menu(false, true, true); + } + break; + case PREHEATHOTEND_CONTINUE: + if (draw) + Draw_Menu_Item(row, ICON_SetEndTemp, F("Continue")); + else { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + switch (last_menu) { + case Prepare: + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + break; + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case ChangeFilament: + switch (last_selection) { + case CHANGEFIL_LOAD: + Popup_Handler(FilLoad); + gcode.process_subcommands_now_P("M701"); + planner.synchronize(); + Redraw_Menu(true, true, true); + break; + case CHANGEFIL_UNLOAD: + Popup_Handler(FilLoad, true); + gcode.process_subcommands_now_P("M702"); + planner.synchronize(); + Redraw_Menu(true, true, true); + break; + case CHANGEFIL_CHANGE: + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + break; + } + break; + #endif + default: + Redraw_Menu(true, true, true); + break; + } + } + break; + #if PREHEAT_COUNT >= 1 + case PREHEATHOTEND_1: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_1_LABEL)); + else { + thermalManager.setTargetHotend(ui.material_preset[0].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[0].fan_speed); + } + break; + #endif + #if PREHEAT_COUNT >= 2 + case PREHEATHOTEND_2: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_2_LABEL)); + else { + thermalManager.setTargetHotend(ui.material_preset[1].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[1].fan_speed); + } + break; + #endif + #if PREHEAT_COUNT >= 3 + case PREHEATHOTEND_3: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_3_LABEL)); + else { + thermalManager.setTargetHotend(ui.material_preset[2].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[2].fan_speed); + } + break; + #endif + #if PREHEAT_COUNT >= 4 + case PREHEATHOTEND_4: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_4_LABEL)); + else { + thermalManager.setTargetHotend(ui.material_preset[3].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[3].fan_speed); + } + break; + #endif + #if PREHEAT_COUNT >= 5 + case PREHEATHOTEND_5: + if (draw) + Draw_Menu_Item(row, ICON_Temperature, F(PREHEAT_5_LABEL)); + else { + thermalManager.setTargetHotend(ui.material_preset[4].hotend_temp, 0); + thermalManager.set_fan_speed(0, ui.material_preset[4].fan_speed); + } + break; + #endif + case PREHEATHOTEND_CUSTOM: + if (draw) { + Draw_Menu_Item(row, ICON_Temperature, F("Custom")); + Draw_Float(thermalManager.temp_hotend[0].target, row, false, 1); + } + else + Modify_Value(thermalManager.temp_hotend[0].target, EXTRUDE_MINTEMP, MAX_E_TEMP, 1); + break; + } + break; + } +} + +FSTR_P CrealityDWINClass::Get_Menu_Title(uint8_t menu) { + switch (menu) { + case MainMenu: return F("Main Menu"); + case Prepare: return F("Prepare"); + case HomeMenu: return F("Homing Menu"); + case Move: return F("Move"); + case ManualLevel: return F("Manual Leveling"); + #if HAS_ZOFFSET_ITEM + case ZOffset: return F("Z Offset"); + #endif + #if HAS_PREHEAT + case Preheat: return F("Preheat"); + #endif + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case ChangeFilament: return F("Change Filament"); + #endif + case Control: return F("Control"); + case TempMenu: return F("Temperature"); + #if HAS_HOTEND || HAS_HEATED_BED + case PID: return F("PID Menu"); + #endif + #if HAS_HOTEND + case HotendPID: return F("Hotend PID Settings"); + #endif + #if HAS_HEATED_BED + case BedPID: return F("Bed PID Settings"); + #endif + #if PREHEAT_COUNT >= 1 + case Preheat1: return F(PREHEAT_1_LABEL " Settings"); + #endif + #if PREHEAT_COUNT >= 2 + case Preheat2: return F(PREHEAT_2_LABEL " Settings"); + #endif + #if PREHEAT_COUNT >= 3 + case Preheat3: return F(PREHEAT_3_LABEL " Settings"); + #endif + #if PREHEAT_COUNT >= 4 + case Preheat4: return F(PREHEAT_4_LABEL " Settings"); + #endif + #if PREHEAT_COUNT >= 5 + case Preheat5: return F(PREHEAT_5_LABEL " Settings"); + #endif + case Motion: return F("Motion Settings"); + case HomeOffsets: return F("Home Offsets"); + case MaxSpeed: return F("Max Speed"); + case MaxAcceleration: return F("Max Acceleration"); + #if HAS_CLASSIC_JERK + case MaxJerk: return F("Max Jerk"); + #endif + case Steps: return F("Steps/mm"); + case Visual: return F("Visual Settings"); + case Advanced: return F("Advanced Settings"); + #if HAS_BED_PROBE + case ProbeMenu: return F("Probe Menu"); + #endif + case ColorSettings: return F("UI Color Settings"); + case Info: return F("Info"); + case InfoMain: return F("Info"); + #if HAS_MESH + case Leveling: return F("Leveling"); + case LevelView: return GET_TEXT_F(MSG_MESH_VIEW); + case LevelSettings: return F("Leveling Settings"); + case MeshViewer: return GET_TEXT_F(MSG_MESH_VIEW); + case LevelManual: return F("Manual Tuning"); + #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) && !HAS_BED_PROBE + case UBLMesh: return F("UBL Bed Leveling"); + #endif + #if ENABLED(PROBE_MANUALLY) + case ManualMesh: return F("Mesh Bed Leveling"); + #endif + case Tune: return F("Tune"); + case PreheatHotend: return F("Preheat Hotend"); + } + return F(""); +} + +uint8_t CrealityDWINClass::Get_Menu_Size(uint8_t menu) { + switch (menu) { + case Prepare: return PREPARE_TOTAL; + case HomeMenu: return HOME_TOTAL; + case Move: return MOVE_TOTAL; + case ManualLevel: return MLEVEL_TOTAL; + #if HAS_ZOFFSET_ITEM + case ZOffset: return ZOFFSET_TOTAL; + #endif + #if HAS_PREHEAT + case Preheat: return PREHEAT_TOTAL; + #endif + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + case ChangeFilament: return CHANGEFIL_TOTAL; + #endif + case Control: return CONTROL_TOTAL; + case TempMenu: return TEMP_TOTAL; + #if HAS_HOTEND || HAS_HEATED_BED + case PID: return PID_TOTAL; + #endif + #if HAS_HOTEND + case HotendPID: return HOTENDPID_TOTAL; + #endif + #if HAS_HEATED_BED + case BedPID: return BEDPID_TOTAL; + #endif + #if PREHEAT_COUNT >= 1 + case Preheat1: return PREHEAT1_TOTAL; + #endif + #if PREHEAT_COUNT >= 2 + case Preheat2: return PREHEAT2_TOTAL; + #endif + #if PREHEAT_COUNT >= 3 + case Preheat3: return PREHEAT3_TOTAL; + #endif + #if PREHEAT_COUNT >= 4 + case Preheat4: return PREHEAT4_TOTAL; + #endif + #if PREHEAT_COUNT >= 5 + case Preheat5: return PREHEAT5_TOTAL; + #endif + case Motion: return MOTION_TOTAL; + case HomeOffsets: return HOMEOFFSETS_TOTAL; + case MaxSpeed: return SPEED_TOTAL; + case MaxAcceleration: return ACCEL_TOTAL; + #if HAS_CLASSIC_JERK + case MaxJerk: return JERK_TOTAL; + #endif + case Steps: return STEPS_TOTAL; + case Visual: return VISUAL_TOTAL; + case Advanced: return ADVANCED_TOTAL; + #if HAS_BED_PROBE + case ProbeMenu: return PROBE_TOTAL; + #endif + case Info: return INFO_TOTAL; + case InfoMain: return INFO_TOTAL; + #if ENABLED(AUTO_BED_LEVELING_UBL) && !HAS_BED_PROBE + case UBLMesh: return UBL_M_TOTAL; + #endif + #if ENABLED(PROBE_MANUALLY) + case ManualMesh: return MMESH_TOTAL; + #endif + #if HAS_MESH + case Leveling: return LEVELING_TOTAL; + case LevelView: return LEVELING_VIEW_TOTAL; + case LevelSettings: return LEVELING_SETTINGS_TOTAL; + case MeshViewer: return MESHVIEW_TOTAL; + case LevelManual: return LEVELING_M_TOTAL; + #endif + case Tune: return TUNE_TOTAL; + case PreheatHotend: return PREHEATHOTEND_TOTAL; + case ColorSettings: return COLORSETTINGS_TOTAL; + } + return 0; +} + +/* Popup Config */ + +void CrealityDWINClass::Popup_Handler(PopupID popupid, bool option/*=false*/) { + popup = last_popup = popupid; + switch (popupid) { + case Pause: Draw_Popup(F("Pause Print"), F(""), F(""), Popup); break; + case Stop: Draw_Popup(F("Stop Print"), F(""), F(""), Popup); break; + case Resume: Draw_Popup(F("Resume Print?"), F("Looks Like the last"), F("print was interupted."), Popup); break; + case ConfFilChange: Draw_Popup(F("Confirm Filament Change"), F(""), F(""), Popup); break; + case PurgeMore: Draw_Popup(F("Purge more filament?"), F("(Cancel to finish process)"), F(""), Popup); break; + case SaveLevel: Draw_Popup(F("Leveling Complete"), F("Save to EEPROM?"), F(""), Popup); break; + case MeshSlot: Draw_Popup(F("Mesh slot not selected"), F("(Confirm to select slot 0)"), F(""), Popup); break; + case ETemp: Draw_Popup(F("Nozzle is too cold"), F("Open Preheat Menu?"), F(""), Popup); break; + case ManualProbing: Draw_Popup(F("Manual Probing"), F("(Confirm to probe)"), F("(cancel to exit)"), Popup); break; + case Level: Draw_Popup(F("Auto Bed Leveling"), F("Please wait until done."), F(""), Wait, ICON_AutoLeveling); break; + case Home: Draw_Popup(option ? F("Parking") : F("Homing"), F("Please wait until done."), F(""), Wait, ICON_BLTouch); break; + case MoveWait: Draw_Popup(F("Moving to Point"), F("Please wait until done."), F(""), Wait, ICON_BLTouch); break; + case Heating: Draw_Popup(F("Heating"), F("Please wait until done."), F(""), Wait, ICON_BLTouch); break; + case FilLoad: Draw_Popup(option ? F("Unloading Filament") : F("Loading Filament"), F("Please wait until done."), F(""), Wait, ICON_BLTouch); break; + case FilChange: Draw_Popup(F("Filament Change"), F("Please wait for prompt."), F(""), Wait, ICON_BLTouch); break; + case TempWarn: Draw_Popup(option ? F("Nozzle temp too low!") : F("Nozzle temp too high!"), F(""), F(""), Wait, option ? ICON_TempTooLow : ICON_TempTooHigh); break; + case Runout: Draw_Popup(F("Filament Runout"), F(""), F(""), Wait, ICON_BLTouch); break; + case PIDWait: Draw_Popup(F("PID Autotune"), F("in process"), F("Please wait until done."), Wait, ICON_BLTouch); break; + case Resuming: Draw_Popup(F("Resuming Print"), F("Please wait until done."), F(""), Wait, ICON_BLTouch); break; + default: break; + } +} + +void CrealityDWINClass::Confirm_Handler(PopupID popupid) { + popup = popupid; + switch (popupid) { + case FilInsert: Draw_Popup(F("Insert Filament"), F("Press to Continue"), F(""), Confirm); break; + case HeaterTime: Draw_Popup(F("Heater Timed Out"), F("Press to Reheat"), F(""), Confirm); break; + case UserInput: Draw_Popup(F("Waiting for Input"), F("Press to Continue"), F(""), Confirm); break; + case LevelError: Draw_Popup(F("Couldn't enable Leveling"), F("(Valid mesh must exist)"), F(""), Confirm); break; + case InvalidMesh: Draw_Popup(F("Valid mesh must exist"), F("before tuning can be"), F("performed"), Confirm); break; + default: break; + } +} + +/* Navigation and Control */ + +void CrealityDWINClass::Main_Menu_Control() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW && selection < PAGE_COUNT - 1) { + selection++; // Select Down + Main_Menu_Icons(); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + selection--; // Select Up + Main_Menu_Icons(); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) + switch (selection) { + case PAGE_PRINT: card.mount(); Draw_SD_List(); break; + case PAGE_PREPARE: Draw_Menu(Prepare); break; + case PAGE_CONTROL: Draw_Menu(Control); break; + case PAGE_INFO_LEVELING: Draw_Menu(TERN(HAS_MESH, Leveling, InfoMain)); break; + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Menu_Control() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW && selection < Get_Menu_Size(active_menu)) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + selection++; // Select Down + if (selection > scrollpos+MROWS) { + scrollpos++; + DWIN_Frame_AreaMove(1, 2, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); + Menu_Item_Handler(active_menu, selection); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + selection--; // Select Up + if (selection < scrollpos) { + scrollpos--; + DWIN_Frame_AreaMove(1, 3, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); + Menu_Item_Handler(active_menu, selection); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) + Menu_Item_Handler(active_menu, selection, false); + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Value_Control() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW) + tempvalue += EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_CCW) + tempvalue -= EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + process = Menu; + EncoderRate.enabled = false; + Draw_Float(tempvalue / valueunit, selection - scrollpos, false, valueunit); + DWIN_UpdateLCD(); + if (active_menu == ZOffset && liveadjust) { + planner.synchronize(); + current_position.z += (tempvalue / valueunit - zoffsetvalue); + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + current_position.z = 0; + sync_plan_position(); + } + else if (active_menu == Tune && selection == TUNE_ZOFFSET) { + sprintf_P(cmd, PSTR("M290 Z%s"), dtostrf((tempvalue / valueunit - zoffsetvalue), 1, 3, str_1)); + gcode.process_subcommands_now_P(cmd); + } + if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki)) + tempvalue = scalePID_i(tempvalue); + if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Kd) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Kd)) + tempvalue = scalePID_d(tempvalue); + switch (valuetype) { + case 0: *(float*)valuepointer = tempvalue / valueunit; break; + case 1: *(uint8_t*)valuepointer = tempvalue / valueunit; break; + case 2: *(uint16_t*)valuepointer = tempvalue / valueunit; break; + case 3: *(int16_t*)valuepointer = tempvalue / valueunit; break; + case 4: *(uint32_t*)valuepointer = tempvalue / valueunit; break; + case 5: *(int8_t*)valuepointer = tempvalue / valueunit; break; + } + switch (active_menu) { + case Move: + planner.synchronize(); + planner.buffer_line(current_position, manual_feedrate_mm_s[selection - 1], active_extruder); + break; + #if HAS_MESH + case ManualMesh: + planner.synchronize(); + planner.buffer_line(current_position, homing_feedrate(Z_AXIS), active_extruder); + planner.synchronize(); + break; + case UBLMesh: mesh_conf.manual_move(true); break; + case LevelManual: mesh_conf.manual_move(selection == LEVELING_M_OFFSET); break; + #endif + } + if (valuepointer == &planner.flow_percentage[0]) + planner.refresh_e_factor(0); + if (funcpointer) funcpointer(); + return; + } + NOLESS(tempvalue, (valuemin * valueunit)); + NOMORE(tempvalue, (valuemax * valueunit)); + Draw_Float(tempvalue / valueunit, selection - scrollpos, true, valueunit); + DWIN_UpdateLCD(); + if (active_menu == Move && livemove) { + *(float*)valuepointer = tempvalue / valueunit; + planner.buffer_line(current_position, manual_feedrate_mm_s[selection - 1], active_extruder); + } +} + +void CrealityDWINClass::Option_Control() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW) + tempvalue += EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_CCW) + tempvalue -= EncoderRate.encoderMoveValue; + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + process = Menu; + EncoderRate.enabled = false; + if (valuepointer == &color_names) { + switch (selection) { + case COLORSETTINGS_CURSOR: eeprom_settings.cursor_color = tempvalue; break; + case COLORSETTINGS_SPLIT_LINE: eeprom_settings.menu_split_line = tempvalue; break; + case COLORSETTINGS_MENU_TOP_BG: eeprom_settings.menu_top_bg = tempvalue; break; + case COLORSETTINGS_MENU_TOP_TXT: eeprom_settings.menu_top_txt = tempvalue; break; + case COLORSETTINGS_HIGHLIGHT_BORDER: eeprom_settings.highlight_box = tempvalue; break; + case COLORSETTINGS_PROGRESS_PERCENT: eeprom_settings.progress_percent = tempvalue; break; + case COLORSETTINGS_PROGRESS_TIME: eeprom_settings.progress_time = tempvalue; break; + case COLORSETTINGS_PROGRESS_STATUS_BAR: eeprom_settings.status_bar_text = tempvalue; break; + case COLORSETTINGS_PROGRESS_STATUS_AREA: eeprom_settings.status_area_text = tempvalue; break; + case COLORSETTINGS_PROGRESS_COORDINATES: eeprom_settings.coordinates_text = tempvalue; break; + case COLORSETTINGS_PROGRESS_COORDINATES_LINE: eeprom_settings.coordinates_split_line = tempvalue; break; + } + Redraw_Screen(); + } + else if (valuepointer == &preheat_modes) + preheatmode = tempvalue; + + Draw_Option(tempvalue, static_cast(valuepointer), selection - scrollpos, false, (valuepointer == &color_names)); + DWIN_UpdateLCD(); + return; + } + NOLESS(tempvalue, valuemin); + NOMORE(tempvalue, valuemax); + Draw_Option(tempvalue, static_cast(valuepointer), selection - scrollpos, true); + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::File_Control() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + static uint8_t filescrl = 0; + if (encoder_diffState == ENCODER_DIFF_NO) { + if (selection > 0) { + card.getfilename_sorted(SD_ORDER(selection - 1, card.get_num_Files())); + char * const filename = card.longest_filename(); + size_t len = strlen(filename); + int8_t pos = len; + if (!card.flag.filenameIsDir) + while (pos && filename[pos] != '.') pos--; + if (pos > MENU_CHAR_LIMIT) { + static millis_t time = 0; + if (PENDING(millis(), time)) return; + time = millis() + 200; + pos -= filescrl; + len = _MIN(pos, MENU_CHAR_LIMIT); + char name[len + 1]; + if (pos >= 0) { + LOOP_L_N(i, len) name[i] = filename[i + filescrl]; + } + else { + LOOP_L_N(i, MENU_CHAR_LIMIT + pos) name[i] = ' '; + LOOP_S_L_N(i, MENU_CHAR_LIMIT + pos, MENU_CHAR_LIMIT) name[i] = filename[i - (MENU_CHAR_LIMIT + pos)]; + } + name[len] = '\0'; + DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(selection - scrollpos) - 14, 271, MBASE(selection - scrollpos) + 28); + Draw_Menu_Item(selection - scrollpos, card.flag.filenameIsDir ? ICON_More : ICON_File, name); + if (-pos >= MENU_CHAR_LIMIT) filescrl = 0; + filescrl++; + DWIN_UpdateLCD(); + } + } + return; + } + if (encoder_diffState == ENCODER_DIFF_CW && selection < card.get_num_Files()) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + if (selection > 0) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(selection - scrollpos) - 14, 271, MBASE(selection - scrollpos) + 28); + Draw_SD_Item(selection, selection - scrollpos); + } + filescrl = 0; + selection++; // Select Down + if (selection > scrollpos + MROWS) { + scrollpos++; + DWIN_Frame_AreaMove(1, 2, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); + Draw_SD_Item(selection, selection - scrollpos); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + DWIN_Draw_Rectangle(1, Color_Bg_Black, 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + DWIN_Draw_Rectangle(1, Color_Bg_Black, LBLX, MBASE(selection - scrollpos) - 14, 271, MBASE(selection - scrollpos) + 28); + Draw_SD_Item(selection, selection - scrollpos); + filescrl = 0; + selection--; // Select Up + if (selection < scrollpos) { + scrollpos--; + DWIN_Frame_AreaMove(1, 3, MLINE, Color_Bg_Black, 0, 31, DWIN_WIDTH, 349); + Draw_SD_Item(selection, selection - scrollpos); + } + DWIN_Draw_Rectangle(1, GetColor(eeprom_settings.cursor_color, Rectangle_Color), 0, MBASE(selection - scrollpos) - 18, 14, MBASE(selection - scrollpos) + 33); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + if (selection == 0) { + if (card.flag.workDirIsRoot) { + process = Main; + Draw_Main_Menu(); + } + else { + card.cdup(); + Draw_SD_List(); + } + } + else { + card.getfilename_sorted(SD_ORDER(selection - 1, card.get_num_Files())); + if (card.flag.filenameIsDir) { + card.cd(card.filename); + Draw_SD_List(); + } + else { + card.openAndPrintFile(card.filename); + } + } + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Print_Screen_Control() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW && selection < PRINT_COUNT - 1) { + selection++; // Select Down + Print_Screen_Icons(); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + selection--; // Select Up + Print_Screen_Icons(); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (selection) { + case PRINT_SETUP: + Draw_Menu(Tune); + Update_Status_Bar(true); + break; + case PRINT_PAUSE_RESUME: + if (paused) { + if (sdprint) { + wait_for_user = false; + #if ENABLED(PARK_HEAD_ON_PAUSE) + card.startOrResumeFilePrinting(); + TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); + #else + char cmnd[20]; + #if HAS_HEATED_BED + cmnd[sprintf_P(cmnd, PSTR("M140 S%i"), pausebed)] = '\0'; + gcode.process_subcommands_now_P(PSTR(cmnd)); + #endif + #if HAS_EXTRUDERS + cmnd[sprintf_P(cmnd, PSTR("M109 S%i"), pausetemp)] = '\0'; + gcode.process_subcommands_now_P(PSTR(cmnd)); + #endif + TERN_(HAS_FAN, thermalManager.fan_speed[0] = pausefan); + planner.synchronize(); + TERN_(SDSUPPORT, queue.inject_P(PSTR("M24"))); + #endif + } + else { + TERN_(HOST_ACTION_COMMANDS, host_action_resume()); + } + Draw_Print_Screen(); + } + else + Popup_Handler(Pause); + break; + case PRINT_STOP: Popup_Handler(Stop); break; + } + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Popup_Control() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_CW && selection < 1) { + selection++; + Popup_Select(); + } + else if (encoder_diffState == ENCODER_DIFF_CCW && selection > 0) { + selection--; + Popup_Select(); + } + else if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (popup) { + case Pause: + if (selection == 0) { + if (sdprint) { + #if ENABLED(POWER_LOSS_RECOVERY) + if (recovery.enabled) recovery.save(true); + #endif + #if ENABLED(PARK_HEAD_ON_PAUSE) + Popup_Handler(Home, true); + #if ENABLED(SDSUPPORT) + if (IS_SD_PRINTING()) card.pauseSDPrint(); + #endif + planner.synchronize(); + queue.inject_P(PSTR("M125")); + planner.synchronize(); + #else + queue.inject_P(PSTR("M25")); + TERN_(HAS_HOTEND, pausetemp = thermalManager.temp_hotend[0].target); + TERN_(HAS_HEATED_BED, pausebed = thermalManager.temp_bed.target); + TERN_(HAS_FAN, pausefan = thermalManager.fan_speed[0]); + thermalManager.disable_all_heaters(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + #endif + } + else { + TERN_(HOST_ACTION_COMMANDS, host_action_pause()); + } + } + Draw_Print_Screen(); + break; + case Stop: + if (selection == 0) { + if (sdprint) { + ui.abort_print(); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + thermalManager.disable_all_heaters(); + } + else { + TERN_(HOST_ACTION_COMMANDS, host_action_cancel()); + } + } + else + Draw_Print_Screen(); + break; + case Resume: + if (selection == 0) + queue.inject_P(PSTR("M1000")); + else { + queue.inject_P(PSTR("M1000 C")); + Draw_Main_Menu(); + } + break; + + #if HAS_HOTEND + case ETemp: + if (selection == 0) { + thermalManager.setTargetHotend(EXTRUDE_MINTEMP, 0); + thermalManager.set_fan_speed(0, MAX_FAN_SPEED); + Draw_Menu(PreheatHotend); + } + else + Redraw_Menu(true, true, false); + break; + #endif + + #if HAS_BED_PROBE + case ManualProbing: + if (selection == 0) { + char buf[80]; + const float dif = probe.probe_at_point(current_position.x, current_position.y, PROBE_PT_STOW, 0, false) - corner_avg; + sprintf_P(buf, dif > 0 ? PSTR("Corner is %smm high") : PSTR("Corner is %smm low"), dtostrf(abs(dif), 1, 3, str_1)); + Update_Status(buf); + } + else { + Redraw_Menu(true, true, false); + Update_Status(""); + } + break; + #endif + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + case ConfFilChange: + if (selection == 0) { + if (thermalManager.temp_hotend[0].target < thermalManager.extrude_min_temp) + Popup_Handler(ETemp); + else { + if (thermalManager.temp_hotend[0].celsius < thermalManager.temp_hotend[0].target - 2) { + Popup_Handler(Heating); + thermalManager.wait_for_hotend(0); + } + Popup_Handler(FilChange); + sprintf_P(cmd, PSTR("M600 B1 R%i"), thermalManager.temp_hotend[0].target); + gcode.process_subcommands_now_P(cmd); + } + } + else + Redraw_Menu(true, true, false); + break; + case PurgeMore: + if (selection == 0) { + pause_menu_response = PAUSE_RESPONSE_EXTRUDE_MORE; + Popup_Handler(FilChange); + } + else { + pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT; + if (printing) Popup_Handler(Resuming); + else Redraw_Menu(true, true, (active_menu==PreheatHotend)); + } + break; + #endif // ADVANCED_PAUSE_FEATURE + + #if HAS_MESH + case SaveLevel: + if (selection == 0) { + #if ENABLED(AUTO_BED_LEVELING_UBL) + gcode.process_subcommands_now_P(PSTR("G29 S")); + planner.synchronize(); + AudioFeedback(true); + #else + AudioFeedback(settings.save()); + #endif + } + Draw_Menu(Leveling, LEVELING_GET_MESH); + break; + #endif + + #if ENABLED(AUTO_BED_LEVELING_UBL) + case MeshSlot: + if (selection == 0) ubl.storage_slot = 0; + Redraw_Menu(true, true); + break; + #endif + default: break; + } + } + DWIN_UpdateLCD(); +} + +void CrealityDWINClass::Confirm_Control() { + EncoderState encoder_diffState = Encoder_ReceiveAnalyze(); + if (encoder_diffState == ENCODER_DIFF_NO) return; + if (encoder_diffState == ENCODER_DIFF_ENTER) { + switch (popup) { + case Complete: + Draw_Main_Menu(); + break; + case FilInsert: + Popup_Handler(FilChange); + wait_for_user = false; + break; + case HeaterTime: + Popup_Handler(Heating); + wait_for_user = false; + break; + default: + Redraw_Menu(true, true, false); + wait_for_user = false; + break; + } + } + DWIN_UpdateLCD(); +} + +/* In-Menu Value Modification */ + +void CrealityDWINClass::Setup_Value(float value, float min, float max, float unit, uint8_t type) { + if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Ki) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Ki)) + tempvalue = unscalePID_i(value) * unit; + else if (TERN0(HAS_HOTEND, valuepointer == &thermalManager.temp_hotend[0].pid.Kd) || TERN0(HAS_HEATED_BED, valuepointer == &thermalManager.temp_bed.pid.Kd)) + tempvalue = unscalePID_d(value) * unit; + else + tempvalue = value * unit; + valuemin = min; + valuemax = max; + valueunit = unit; + valuetype = type; + process = Value; + EncoderRate.enabled = true; + Draw_Float(tempvalue / unit, selection - scrollpos, true, valueunit); +} + +void CrealityDWINClass::Modify_Value(float &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 0); +} +void CrealityDWINClass::Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 1); +} +void CrealityDWINClass::Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 2); +} +void CrealityDWINClass::Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 3); +} +void CrealityDWINClass::Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 4); +} +void CrealityDWINClass::Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()/*=nullptr*/) { + valuepointer = &value; + funcpointer = f; + Setup_Value((float)value, min, max, unit, 5); +} + +void CrealityDWINClass::Modify_Option(uint8_t value, const char * const * options, uint8_t max) { + tempvalue = value; + valuepointer = const_cast(options); + valuemin = 0; + valuemax = max; + process = Option; + EncoderRate.enabled = true; + Draw_Option(value, options, selection - scrollpos, true); +} + +/* Main Functions */ + +void CrealityDWINClass::Update_Status(const char * const text) { + char header[4]; + LOOP_L_N(i, 3) header[i] = text[i]; + header[3] = '\0'; + if (strcmp_P(header,"") == 0) { + LOOP_L_N(i, _MIN((size_t)LONG_FILENAME_LENGTH, strlen(text))) filename[i] = text[i + 3]; + filename[_MIN((size_t)LONG_FILENAME_LENGTH - 1, strlen(text))] = '\0'; + Draw_Print_Filename(true); + } + else { + LOOP_L_N(i, _MIN((size_t)64, strlen(text))) statusmsg[i] = text[i]; + statusmsg[_MIN((size_t)64, strlen(text))] = '\0'; + } +} + +void CrealityDWINClass::Start_Print(bool sd) { + sdprint = sd; + if (!printing) { + printing = true; + statusmsg[0] = '\0'; + if (sd) { + #if ENABLED(POWER_LOSS_RECOVERY) + if (recovery.valid()) { + SdFile *diveDir = nullptr; + const char * const fname = card.diveToFile(true, diveDir, recovery.info.sd_filename); + card.selectFileByName(fname); + } + #endif + strcpy_P(filename, card.longest_filename()); + } + else + strcpy_P(filename, "Host Print"); + TERN_(LCD_SET_PROGRESS_MANUALLY, ui.set_progress(0)); + TERN_(USE_M73_REMAINING_TIME, ui.set_remaining_time(0)); + Draw_Print_Screen(); + } +} + +void CrealityDWINClass::Stop_Print() { + printing = false; + sdprint = false; + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); + thermalManager.disable_all_heaters(); + TERN_(LCD_SET_PROGRESS_MANUALLY, ui.set_progress(100 * (PROGRESS_SCALE))); + TERN_(USE_M73_REMAINING_TIME, ui.set_remaining_time(0)); + Draw_Print_confirm(); +} + +void CrealityDWINClass::Update() { + State_Update(); + Screen_Update(); + switch (process) { + case Main: Main_Menu_Control(); break; + case Menu: Menu_Control(); break; + case Value: Value_Control(); break; + case Option: Option_Control(); break; + case File: File_Control(); break; + case Print: Print_Screen_Control(); break; + case Popup: Popup_Control(); break; + case Confirm: Confirm_Control(); break; + } +} + +void MarlinUI::update() { CrealityDWIN.Update(); } + +#if HAS_LCD_BRIGHTNESS + void MarlinUI::_set_brightness() { DWIN_LCD_Brightness(backlight ? brightness : 0); } +#endif + +void CrealityDWINClass::State_Update() { + if ((print_job_timer.isRunning() || print_job_timer.isPaused()) != printing) { + if (!printing) Start_Print(card.isFileOpen() || TERN0(POWER_LOSS_RECOVERY, recovery.valid())); + else Stop_Print(); + } + if (print_job_timer.isPaused() != paused) { + paused = print_job_timer.isPaused(); + if (process == Print) Print_Screen_Icons(); + if (process == Wait && !paused) Redraw_Menu(true, true); + } + if (wait_for_user && !(process == Confirm) && !print_job_timer.isPaused()) + Confirm_Handler(UserInput); + #if ENABLED(ADVANCED_PAUSE_FEATURE) + if (process == Popup && popup == PurgeMore) { + if (pause_menu_response == PAUSE_RESPONSE_EXTRUDE_MORE) + Popup_Handler(FilChange); + else if (pause_menu_response == PAUSE_RESPONSE_RESUME_PRINT) { + if (printing) Popup_Handler(Resuming); + else Redraw_Menu(true, true, (active_menu==PreheatHotend)); + } + } + #endif + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + static bool ranout = false; + if (runout.filament_ran_out != ranout) { + ranout = runout.filament_ran_out; + if (ranout) Popup_Handler(Runout); + } + #endif +} + +void CrealityDWINClass::Screen_Update() { + static millis_t scrltime = 0; + if (ELAPSED(millis(), scrltime)) { + scrltime = millis() + 200; + Update_Status_Bar(); + if (process == Print) Draw_Print_Filename(); + } + + static millis_t statustime = 0; + if (ELAPSED(millis(), statustime)) { + statustime = millis() + 500; + Draw_Status_Area(); + } + + static millis_t printtime = 0; + if (ELAPSED(millis(), printtime)) { + printtime = millis() + 1000; + if (process == Print) { + Draw_Print_ProgressBar(); + Draw_Print_ProgressElapsed(); + TERN_(USE_M73_REMAINING_TIME, Draw_Print_ProgressRemain()); + } + } + + static bool mounted = card.isMounted(); + if (mounted != card.isMounted()) { + mounted = card.isMounted(); + if (process == File) + Draw_SD_List(); + } + + #if HAS_HOTEND + static int16_t hotendtarget = -1; + #endif + #if HAS_HEATED_BED + static int16_t bedtarget = -1; + #endif + #if HAS_FAN + static int16_t fanspeed = -1; + #endif + + #if HAS_ZOFFSET_ITEM + static float lastzoffset = zoffsetvalue; + if (zoffsetvalue != lastzoffset) { + lastzoffset = zoffsetvalue; + #if HAS_BED_PROBE + probe.offset.z = zoffsetvalue; + #else + set_home_offset(Z_AXIS, -zoffsetvalue); + #endif + } + + #if HAS_BED_PROBE + if (probe.offset.z != lastzoffset) + zoffsetvalue = lastzoffset = probe.offset.z; + #else + if (-home_offset.z != lastzoffset) + zoffsetvalue = lastzoffset = -home_offset.z; + #endif + #endif // HAS_ZOFFSET_ITEM + + if (process == Menu || process == Value) { + switch (active_menu) { + case TempMenu: + #if HAS_HOTEND + if (thermalManager.temp_hotend[0].target != hotendtarget) { + hotendtarget = thermalManager.temp_hotend[0].target; + if (scrollpos <= TEMP_HOTEND && TEMP_HOTEND <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.temp_hotend[0].target, TEMP_HOTEND - scrollpos, false, 1); + } + } + #endif + #if HAS_HEATED_BED + if (thermalManager.temp_bed.target != bedtarget) { + bedtarget = thermalManager.temp_bed.target; + if (scrollpos <= TEMP_BED && TEMP_BED <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.temp_bed.target, TEMP_BED - scrollpos, false, 1); + } + } + #endif + #if HAS_FAN + if (thermalManager.fan_speed[0] != fanspeed) { + fanspeed = thermalManager.fan_speed[0]; + if (scrollpos <= TEMP_FAN && TEMP_FAN <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.fan_speed[0], TEMP_FAN - scrollpos, false, 1); + } + } + #endif + break; + case Tune: + #if HAS_HOTEND + if (thermalManager.temp_hotend[0].target != hotendtarget) { + hotendtarget = thermalManager.temp_hotend[0].target; + if (scrollpos <= TUNE_HOTEND && TUNE_HOTEND <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.temp_hotend[0].target, TUNE_HOTEND - scrollpos, false, 1); + } + } + #endif + #if HAS_HEATED_BED + if (thermalManager.temp_bed.target != bedtarget) { + bedtarget = thermalManager.temp_bed.target; + if (scrollpos <= TUNE_BED && TUNE_BED <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.temp_bed.target, TUNE_BED - scrollpos, false, 1); + } + } + #endif + #if HAS_FAN + if (thermalManager.fan_speed[0] != fanspeed) { + fanspeed = thermalManager.fan_speed[0]; + if (scrollpos <= TUNE_FAN && TUNE_FAN <= scrollpos + MROWS) { + if (process != Value || selection != TEMP_HOTEND - scrollpos) + Draw_Float(thermalManager.fan_speed[0], TUNE_FAN - scrollpos, false, 1); + } + } + #endif + break; + } + } +} + +void CrealityDWINClass::AudioFeedback(const bool success/*=true*/) { + if (success) { + if (ui.buzzer_enabled) { + BUZZ(100, 659); + BUZZ( 10, 0); + BUZZ(100, 698); + } + else Update_Status("Success"); + } + else if (ui.buzzer_enabled) + BUZZ(40, 440); + else + Update_Status("Failed"); +} + +void CrealityDWINClass::Save_Settings(char *buff) { + TERN_(AUTO_BED_LEVELING_UBL, eeprom_settings.tilt_grid_size = mesh_conf.tilt_grid - 1); + eeprom_settings.corner_pos = corner_pos * 10; + memcpy(buff, &eeprom_settings, _MIN(sizeof(eeprom_settings), eeprom_data_size)); +} + +void CrealityDWINClass::Load_Settings(const char *buff) { + memcpy(&eeprom_settings, buff, _MIN(sizeof(eeprom_settings), eeprom_data_size)); + TERN_(AUTO_BED_LEVELING_UBL, mesh_conf.tilt_grid = eeprom_settings.tilt_grid_size + 1); + if (eeprom_settings.corner_pos == 0) eeprom_settings.corner_pos = 325; + corner_pos = eeprom_settings.corner_pos / 10.0f; + Redraw_Screen(); + #if ENABLED(POWER_LOSS_RECOVERY) + static bool init = true; + if (init) { + init = false; + queue.inject_P(PSTR("M1000 S")); + } + #endif +} + +void CrealityDWINClass::Reset_Settings() { + eeprom_settings.time_format_textual = false; + TERN_(AUTO_BED_LEVELING_UBL, eeprom_settings.tilt_grid_size = 0); + eeprom_settings.corner_pos = 325; + eeprom_settings.cursor_color = 0; + eeprom_settings.menu_split_line = 0; + eeprom_settings.menu_top_bg = 0; + eeprom_settings.menu_top_txt = 0; + eeprom_settings.highlight_box = 0; + eeprom_settings.progress_percent = 0; + eeprom_settings.progress_time = 0; + eeprom_settings.status_bar_text = 0; + eeprom_settings.status_area_text = 0; + eeprom_settings.coordinates_text = 0; + eeprom_settings.coordinates_split_line = 0; + TERN_(AUTO_BED_LEVELING_UBL, mesh_conf.tilt_grid = eeprom_settings.tilt_grid_size + 1); + corner_pos = eeprom_settings.corner_pos / 10.0f; + TERN_(SOUND_MENU_ITEM, ui.buzzer_enabled = true); + Redraw_Screen(); +} + +void MarlinUI::init() { + delay(800); + SERIAL_ECHOPGM("\nDWIN handshake "); + if (DWIN_Handshake()) SERIAL_ECHOLNPGM("ok."); else SERIAL_ECHOLNPGM("error."); + DWIN_Frame_SetDir(1); // Orientation 90° + DWIN_UpdateLCD(); // Show bootscreen (first image) + Encoder_Configuration(); + for (uint16_t t = 0; t <= 100; t += 2) { + DWIN_ICON_Show(ICON, ICON_Bar, 15, 260); + DWIN_Draw_Rectangle(1, Color_Bg_Black, 15 + t * 242 / 100, 260, 257, 280); + DWIN_UpdateLCD(); + delay(20); + } + DWIN_JPG_CacheTo1(Language_English); + CrealityDWIN.Redraw_Screen(); +} + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + void MarlinUI::pause_show_message(const PauseMessage message, const PauseMode mode/*=PAUSE_MODE_SAME*/, const uint8_t extruder/*=active_extruder*/) { + switch (message) { + case PAUSE_MESSAGE_INSERT: CrealityDWIN.Confirm_Handler(FilInsert); break; + case PAUSE_MESSAGE_OPTION: CrealityDWIN.Popup_Handler(PurgeMore); break; + case PAUSE_MESSAGE_HEAT: CrealityDWIN.Confirm_Handler(HeaterTime); break; + case PAUSE_MESSAGE_WAITING: CrealityDWIN.Draw_Print_Screen(); break; + default: break; + } + } +#endif + +#endif // DWIN_CREALITY_LCD_JYERSUI diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.h b/Marlin/src/lcd/e3v2/jyersui/dwin.h new file mode 100644 index 000000000000..0157f673cef9 --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.h @@ -0,0 +1,245 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * lcd/e3v2/jyersui/dwin.h + */ + +#include "dwin_lcd.h" +#include "../common/dwin_set.h" +#include "../common/dwin_font.h" +#include "../common/dwin_color.h" +#include "../common/encoder.h" +#include "../../../libs/BL24CXX.h" + +#include "../../../inc/MarlinConfigPre.h" + +//#define DWIN_CREALITY_LCD_CUSTOM_ICONS + +enum processID : uint8_t { + Main, Print, Menu, Value, Option, File, Popup, Confirm, Wait +}; + +enum PopupID : uint8_t { + Pause, Stop, Resume, SaveLevel, ETemp, ConfFilChange, PurgeMore, MeshSlot, + Level, Home, MoveWait, Heating, FilLoad, FilChange, TempWarn, Runout, PIDWait, Resuming, ManualProbing, + FilInsert, HeaterTime, UserInput, LevelError, InvalidMesh, UI, Complete +}; + +enum menuID : uint8_t { + MainMenu, + Prepare, + Move, + HomeMenu, + ManualLevel, + ZOffset, + Preheat, + ChangeFilament, + Control, + TempMenu, + PID, + HotendPID, + BedPID, + Preheat1, + Preheat2, + Preheat3, + Preheat4, + Preheat5, + Motion, + HomeOffsets, + MaxSpeed, + MaxAcceleration, + MaxJerk, + Steps, + Visual, + ColorSettings, + Advanced, + ProbeMenu, + Info, + Leveling, + LevelManual, + LevelView, + MeshViewer, + LevelSettings, + ManualMesh, + UBLMesh, + InfoMain, + Tune, + PreheatHotend +}; + +// Custom icons +#if ENABLED(DWIN_CREALITY_LCD_CUSTOM_ICONS) + // index of every custom icon should be >= CUSTOM_ICON_START + #define CUSTOM_ICON_START ICON_Checkbox_F + #define ICON_Checkbox_F 200 + #define ICON_Checkbox_T 201 + #define ICON_Fade 202 + #define ICON_Mesh 203 + #define ICON_Tilt 204 + #define ICON_Brightness 205 + #define ICON_AxisD 249 + #define ICON_AxisBR 250 + #define ICON_AxisTR 251 + #define ICON_AxisBL 252 + #define ICON_AxisTL 253 + #define ICON_AxisC 254 +#else + #define ICON_Fade ICON_Version + #define ICON_Mesh ICON_Version + #define ICON_Tilt ICON_Version + #define ICON_Brightness ICON_Version + #define ICON_AxisD ICON_Axis + #define ICON_AxisBR ICON_Axis + #define ICON_AxisTR ICON_Axis + #define ICON_AxisBL ICON_Axis + #define ICON_AxisTL ICON_Axis + #define ICON_AxisC ICON_Axis +#endif + +enum colorID : uint8_t { + Default, White, Green, Cyan, Blue, Magenta, Red, Orange, Yellow, Brown, Black +}; + +#define Custom_Colors 10 +#define Color_Aqua RGB(0x00,0x3F,0x1F) +#define Color_Light_White 0xBDD7 +#define Color_Green RGB(0x00,0x3F,0x00) +#define Color_Light_Green 0x3460 +#define Color_Cyan 0x07FF +#define Color_Light_Cyan 0x04F3 +#define Color_Blue 0x015F +#define Color_Light_Blue 0x3A6A +#define Color_Magenta 0xF81F +#define Color_Light_Magenta 0x9813 +#define Color_Light_Red 0x8800 +#define Color_Orange 0xFA20 +#define Color_Light_Orange 0xFBC0 +#define Color_Light_Yellow 0x8BE0 +#define Color_Brown 0xCC27 +#define Color_Light_Brown 0x6204 +#define Color_Black 0x0000 +#define Color_Grey 0x18E3 +#define Check_Color 0x4E5C // Check-box check color +#define Confirm_Color 0x34B9 +#define Cancel_Color 0x3186 + +class CrealityDWINClass { +public: + static constexpr size_t eeprom_data_size = 48; + static struct EEPROM_Settings { // use bit fields to save space, max 48 bytes + bool time_format_textual : 1; + #if ENABLED(AUTO_BED_LEVELING_UBL) + uint8_t tilt_grid_size : 3; + #endif + uint16_t corner_pos : 10; + uint8_t cursor_color : 4; + uint8_t menu_split_line : 4; + uint8_t menu_top_bg : 4; + uint8_t menu_top_txt : 4; + uint8_t highlight_box : 4; + uint8_t progress_percent : 4; + uint8_t progress_time : 4; + uint8_t status_bar_text : 4; + uint8_t status_area_text : 4; + uint8_t coordinates_text : 4; + uint8_t coordinates_split_line : 4; + } eeprom_settings; + + static constexpr const char * const color_names[11] = { "Default", "White", "Green", "Cyan", "Blue", "Magenta", "Red", "Orange", "Yellow", "Brown", "Black" }; + static constexpr const char * const preheat_modes[3] = { "Both", "Hotend", "Bed" }; + + static void Clear_Screen(uint8_t e=3); + static void Draw_Float(float value, uint8_t row, bool selected=false, uint8_t minunit=10); + static void Draw_Option(uint8_t value, const char * const * options, uint8_t row, bool selected=false, bool color=false); + static uint16_t GetColor(uint8_t color, uint16_t original, bool light=false); + static void Draw_Checkbox(uint8_t row, bool value); + static void Draw_Title(const char * title); + static void Draw_Title(FSTR_P const title); + static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, const char * const label1=nullptr, const char * const label2=nullptr, bool more=false, bool centered=false); + static void Draw_Menu_Item(uint8_t row, uint8_t icon=0, FSTR_P const flabel1=nullptr, FSTR_P const flabel2=nullptr, bool more=false, bool centered=false); + static void Draw_Menu(uint8_t menu, uint8_t select=0, uint8_t scroll=0); + static void Redraw_Menu(bool lastprocess=true, bool lastselection=false, bool lastmenu=false); + static void Redraw_Screen(); + + static void Main_Menu_Icons(); + static void Draw_Main_Menu(uint8_t select=0); + static void Print_Screen_Icons(); + static void Draw_Print_Screen(); + static void Draw_Print_Filename(const bool reset=false); + static void Draw_Print_ProgressBar(); + #if ENABLED(USE_M73_REMAINING_TIME) + static void Draw_Print_ProgressRemain(); + #endif + static void Draw_Print_ProgressElapsed(); + static void Draw_Print_confirm(); + static void Draw_SD_Item(uint8_t item, uint8_t row); + static void Draw_SD_List(bool removed=false); + static void Draw_Status_Area(bool icons=false); + static void Draw_Popup(FSTR_P const line1, FSTR_P const line2, FSTR_P const line3, uint8_t mode, uint8_t icon=0); + static void Popup_Select(); + static void Update_Status_Bar(bool refresh=false); + + #if ENABLED(AUTO_BED_LEVELING_UBL) + static void Draw_Bed_Mesh(int16_t selected = -1, uint8_t gridline_width = 1, uint16_t padding_x = 8, uint16_t padding_y_top = 40 + 53 - 7); + static void Set_Mesh_Viewer_Status(); + #endif + + static FSTR_P Get_Menu_Title(uint8_t menu); + static uint8_t Get_Menu_Size(uint8_t menu); + static void Menu_Item_Handler(uint8_t menu, uint8_t item, bool draw=true); + + static void Popup_Handler(PopupID popupid, bool option = false); + static void Confirm_Handler(PopupID popupid); + + static void Main_Menu_Control(); + static void Menu_Control(); + static void Value_Control(); + static void Option_Control(); + static void File_Control(); + static void Print_Screen_Control(); + static void Popup_Control(); + static void Confirm_Control(); + + static void Setup_Value(float value, float min, float max, float unit, uint8_t type); + static void Modify_Value(float &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(uint8_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(uint16_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(int16_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(uint32_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Value(int8_t &value, float min, float max, float unit, void (*f)()=nullptr); + static void Modify_Option(uint8_t value, const char * const * options, uint8_t max); + + static void Update_Status(const char * const text); + static void Start_Print(bool sd); + static void Stop_Print(); + static void Update(); + static void State_Update(); + static void Screen_Update(); + static void AudioFeedback(const bool success=true); + static void Save_Settings(char *buff); + static void Load_Settings(const char *buff); + static void Reset_Settings(); +}; + +extern CrealityDWINClass CrealityDWIN; diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp new file mode 100644 index 000000000000..04889e92b038 --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.cpp @@ -0,0 +1,64 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/******************************************************************************** + * @file lcd/e3v2/jyersui/dwin_lcd.cpp + * @brief DWIN screen control functions + ********************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DWIN_CREALITY_LCD_JYERSUI) + +#include "dwin_lcd.h" + +/*-------------------------------------- System variable function --------------------------------------*/ + +void DWIN_Startup() {} + +/*---------------------------------------- Drawing functions ----------------------------------------*/ + +// Draw the degree (°) symbol +// Color: color +// x/y: Upper-left coordinate of the first pixel +void DWIN_Draw_DegreeSymbol(uint16_t Color, uint16_t x, uint16_t y) { + DWIN_Draw_Point(Color, 1, 1, x + 1, y); + DWIN_Draw_Point(Color, 1, 1, x + 2, y); + DWIN_Draw_Point(Color, 1, 1, x, y + 1); + DWIN_Draw_Point(Color, 1, 1, x + 3, y + 1); + DWIN_Draw_Point(Color, 1, 1, x, y + 2); + DWIN_Draw_Point(Color, 1, 1, x + 3, y + 2); + DWIN_Draw_Point(Color, 1, 1, x + 1, y + 3); + DWIN_Draw_Point(Color, 1, 1, x + 2, y + 3); +} + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Draw an Icon +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { + DWIN_ICON_Show(true, false, false, libID, picID, x, y); +} + +#endif // DWIN_CREALITY_LCD_JYERSUI diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h new file mode 100644 index 000000000000..f76cfb5d3e5f --- /dev/null +++ b/Marlin/src/lcd/e3v2/jyersui/dwin_lcd.h @@ -0,0 +1,34 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/******************************************************************************** + * @file lcd/e3v2/jyersui/dwin_lcd.h + * @brief DWIN screen control functions + ********************************************************************************/ + +#include "../common/dwin_api.h" + +// Draw the degree (°) symbol +// Color: color +// x/y: Upper-left coordinate of the first pixel +void DWIN_Draw_DegreeSymbol(uint16_t Color, uint16_t x, uint16_t y); diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp new file mode 100644 index 000000000000..ef390ac9dc04 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.cpp @@ -0,0 +1,62 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/******************************************************************************** + * @file lcd/e3v2/marlinui/dwin_lcd.cpp + * @brief DWIN screen control functions + ********************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if IS_DWIN_MARLINUI + +#include "../../../inc/MarlinConfig.h" + +#include "dwin_lcd.h" +#include // for memset + +//#define DEBUG_OUT 1 +#include "../../../core/debug_out.h" + +/*-------------------------------------- System variable function --------------------------------------*/ + +void DWIN_Startup() { + DEBUG_ECHOPGM("\r\nDWIN handshake "); + delay(750); // Delay here or init later in the boot process + const bool success = DWIN_Handshake(); + if (success) DEBUG_ECHOLNPGM("ok."); else DEBUG_ECHOLNPGM("error."); + DWIN_Frame_SetDir(TERN(DWIN_MARLINUI_LANDSCAPE, 0, 1)); + DWIN_Frame_Clear(Color_Bg_Black); // MarlinUI handles the bootscreen so just clear here + DWIN_UpdateLCD(); +} + +/*---------------------------------------- Picture related functions ----------------------------------------*/ + +// Draw an Icon +// libID: Icon library ID +// picID: Icon ID +// x/y: Upper-left point +void DWIN_ICON_Show(uint8_t libID, uint8_t picID, uint16_t x, uint16_t y) { + DWIN_ICON_Show(true, false, false, libID, picID, x, y); +} + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h new file mode 100644 index 000000000000..3e80a0103ee8 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_lcd.h @@ -0,0 +1,80 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/******************************************************************************** + * @file lcd/e3v2/marlinui/dwin_lcd.h + * @brief DWIN screen control functions + ********************************************************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#include "../common/dwin_api.h" + +// Picture ID +#define DWIN_Boot_Horiz 0 +#define DWIN_Boot_Vert 1 +#define DWIN_MarlinUI_Assets 2 + +// ICON ID +#define BOOT_ICON 3 // Icon set file 3.ICO +#define ICON 4 // Icon set file 4.ICO + +// MarlinUI Boot Icons from Set 3 +#define ICON_MarlinBoot 0 +#define ICON_OpenSource 1 +#define ICON_GitHubURL 2 +#define ICON_MarlinURL 3 +#define ICON_Copyright 4 + +// MarlinUI Icons from Set 4 +#define ICON_LOGO_Marlin 0 +#define ICON_HotendOff 1 +#define ICON_HotendOn 2 +#define ICON_BedOff 3 +#define ICON_BedOn 4 +#define ICON_Fan0 5 +#define ICON_Fan1 6 +#define ICON_Fan2 7 +#define ICON_Fan3 8 +#define ICON_Halted 9 +#define ICON_Question 10 +#define ICON_Alert 11 +#define ICON_RotateCW 12 +#define ICON_RotateCCW 13 +#define ICON_UpArrow 14 +#define ICON_DownArrow 15 +#define ICON_BedLine 16 + +#include "../common/dwin_font.h" + +#define DWIN_FONT_MENU font10x20 +#define DWIN_FONT_STAT font14x28 +#define DWIN_FONT_ALERT font14x28 + +#include "../common/dwin_color.h" + +#define Color_Bg_Heading 0x3344 // Static Heading + +// Character matrix width x height +//#define LCD_WIDTH ((DWIN_WIDTH) / 8) +//#define LCD_HEIGHT ((DWIN_HEIGHT) / 12) diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp new file mode 100644 index 000000000000..89e001b29c39 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp @@ -0,0 +1,180 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfig.h" + +#if IS_DWIN_MARLINUI + +#include "dwin_string.h" +//#include "../../fontutils.h" + +uint8_t DWIN_String::data[]; +uint16_t DWIN_String::span; +uint8_t DWIN_String::len; + +void DWIN_String::set() { + //*data = 0x00; + memset(data, 0x00, sizeof(data)); + span = 0; + len = 0; +} + +uint8_t read_byte(uint8_t *byte) { return *byte; } + +/** + * Add a string, applying substitutions for the following characters: + * + * = displays '0'....'10' for indexes 0 - 10 + * ~ displays '1'....'11' for indexes 0 - 10 + * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) + */ +void DWIN_String::add(uint8_t *string, const int8_t index, uint8_t *itemString/*=nullptr*/) { + wchar_t wchar; + + while (*string) { + string = get_utf8_value_cb(string, read_byte, &wchar); + if (wchar > 255) wchar |= 0x0080; + uint8_t ch = uint8_t(wchar & 0x00FF); + + if (ch == '=' || ch == '~' || ch == '*') { + if (index >= 0) { + int8_t inum = index + ((ch == '=') ? 0 : LCD_FIRST_TOOL); + if (ch == '*') add_character('E'); + if (inum >= 10) { add_character('0' + (inum / 10)); inum %= 10; } + add_character('0' + inum); + } + else { + add(index == -2 ? GET_TEXT(MSG_CHAMBER) : GET_TEXT(MSG_BED)); + } + continue; + } + else if (ch == '$' && itemString) { + add(itemString); + continue; + } + + add_character(ch); + } + eol(); +} + +void DWIN_String::add(uint8_t *string, uint8_t max_len) { + wchar_t wchar; + while (*string && max_len) { + string = get_utf8_value_cb(string, read_byte, &wchar); + /* + if (wchar > 255) wchar |= 0x0080; + uint8_t ch = uint8_t(wchar & 0x00FF); + add_character(ch); + */ + add(wchar); + max_len--; + } + eol(); +} + +void DWIN_String::add(wchar_t character) { + int ret; + size_t idx = 0; + dwin_charmap_t pinval; + dwin_charmap_t *copy_address = nullptr; + pinval.uchar = character; + pinval.idx = -1; + + // For 8-bit ASCII just print the single character + char str[] = { '?', 0 }; + if (character < 255) { + str[0] = (char)character; + } + else { + copy_address = nullptr; + ret = pf_bsearch_r((void *)g_dwin_charmap_device, COUNT(g_dwin_charmap_device), pf_bsearch_cb_comp_dwinmap_pgm, (void *)&pinval, &idx); + if (ret >= 0) { + copy_address = (dwin_charmap_t*)(g_dwin_charmap_device + idx); + } + else { + ret = pf_bsearch_r((void *)g_dwin_charmap_common, COUNT(g_dwin_charmap_common), pf_bsearch_cb_comp_dwinmap_pgm, (void *)&pinval, &idx); + if (ret >= 0) + copy_address = (dwin_charmap_t*)(g_dwin_charmap_common + idx); + } + if (ret >= 0) { + dwin_charmap_t localval; + memcpy_P(&localval, copy_address, sizeof(localval)); + str[0] = localval.idx; + str[1] = localval.idx2; + } + } + if (str[0]) add_character(str[0]); + if (str[1]) add_character(str[1]); +} + +void DWIN_String::add_character(const uint8_t character) { + if (len < MAX_STRING_LENGTH) { + data[len] = character; + len++; + //span += glyph(character)->DWidth; + } +} + +void DWIN_String::rtrim(const uint8_t character) { + while (len) { + if (data[len - 1] == 0x20 || data[len - 1] == character) { + len--; + //span -= glyph(data[length])->DWidth; + eol(); + } + else + break; + } +} + +void DWIN_String::ltrim(const uint8_t character) { + uint16_t i, j; + for (i = 0; (i < len) && (data[i] == 0x20 || data[i] == character); i++) { + //span -= glyph(data[i])->DWidth; + } + if (i == 0) return; + for (j = 0; i < len; data[j++] = data[i++]); + len = j; + eol(); +} + +void DWIN_String::trim(const uint8_t character) { + rtrim(character); + ltrim(character); +} + +/* return v1 - v2 */ +int dwin_charmap_compare(dwin_charmap_t *v1, dwin_charmap_t *v2) { + return (v1->uchar < v2->uchar) ? -1 : (v1->uchar > v2->uchar) ? 1 : 0; +} + +int pf_bsearch_cb_comp_dwinmap_pgm(void *userdata, size_t idx, void * data_pin) { + dwin_charmap_t localval; + dwin_charmap_t *p_dwin_charmap = (dwin_charmap_t *)userdata; + memcpy_P(&localval, p_dwin_charmap + idx, sizeof(localval)); + return dwin_charmap_compare(&localval, (dwin_charmap_t *)data_pin); +} + +DWIN_String dwin_string; + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h new file mode 100644 index 000000000000..30af387bdcba --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h @@ -0,0 +1,1006 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../fontutils.h" +#include "../../marlinui.h" + +#include + +typedef struct _dwin_charmap_t { + wchar_t uchar; // the unicode char + uint8_t idx; // the glyph of the char in the ROM + uint8_t idx2; // the char used to be combined with the idx to simulate a single char +} dwin_charmap_t; + +#define MAX_STRING_LENGTH 64 + +#define S(V) (char*)(V) + +class DWIN_String { + private: + //static glyph_t *glyphs[256]; + //static font_t *font_header; + + static uint8_t data[MAX_STRING_LENGTH + 1]; + static uint16_t span; // in pixels + static uint8_t len; // in characters + + static void add_character(const uint8_t character); + static void eol() { data[len] = 0x00; } + + public: + //static void set_font(const uint8_t *font); + //static void add_glyphs(const uint8_t *font); + + //static font_t *font() { return font_header; }; + //static uint16_t font_height() { return font_header->FontAscent - font_header->FontDescent; } + //static glyph_t *glyph(uint8_t character) { return glyphs[character] ?: glyphs[0x3F]; } /* Use '?' for unknown glyphs */ + //static inline glyph_t *glyph(uint8_t *character) { return glyph(*character); } + + static void set(); + //static void add(uint8_t character) { add_character(character); eol(); } + static void add(wchar_t character); + static void add(uint8_t *string, uint8_t max_len=MAX_STRING_LENGTH); + static void add(uint8_t *string, const int8_t index, uint8_t *itemString=nullptr); + static void set(uint8_t *string) { set(); add(string); } + static void set(wchar_t character) { set(); add(character); } + static void set(uint8_t *string, int8_t index, const char *itemString=nullptr) { set(); add(string, index, (uint8_t *)itemString); } + static inline void set(FSTR_P fstring) { set((uint8_t *)fstring); } + static inline void set(const char *string) { set((uint8_t *)string); } + static inline void set(const char *string, int8_t index, const char *itemString=nullptr) { set((uint8_t *)string, index, itemString); } + static inline void add(const char *string) { add((uint8_t *)string); } + + static void trim(const uint8_t character=0x20); + static void rtrim(const uint8_t character=0x20); + static void ltrim(const uint8_t character=0x20); + + static void truncate(uint8_t maxlen) { if (len > maxlen) { len = maxlen; eol(); } } + + static inline uint8_t length() { return len; } + static inline uint16_t width() { return span; } + static inline uint8_t *string() { return data; } + static uint16_t center(uint16_t width) { return span > width ? 0 : (width - span) / 2; } +}; + +int dwin_charmap_compare(dwin_charmap_t *v1, dwin_charmap_t *v2); +int pf_bsearch_cb_comp_dwinmap_pgm(void *userdata, size_t idx, void *data_pin); + +extern DWIN_String dwin_string; + +#ifdef __AVR__ + #define IV(a) U##a +#else + #define IV(a) L##a +#endif + +const dwin_charmap_t g_dwin_charmap_device[] PROGMEM = { + // sorted by uchar: + #if DISPLAY_CHARSET_HD44780 == JAPANESE + + {IV('¢'), 0xEC, 0}, // A2 + {IV('°'), 0xDF, 0}, // B0, Marlin special: '°' LCD_STR_DEGREE (0x09) + {IV('ä'), 0xE1, 0}, // E4 + {IV('ö'), 0xEF, 0}, // F6 + {IV('÷'), 0xFD, 0}, // 00F7 + {IV('ü'), 0xF5, 0}, // 00FC + {IV('ˣ'), 0xEB, 0}, // 02E3 + + {IV('·'), 0xA5, 0}, // 0387 + {IV('Ώ'), 0xF4, 0}, // 038F + {IV('Θ'), 0xF2, 0}, // 0398, Theta + {IV('Ξ'), 0xE3, 0}, // 039E, Xi + {IV('Σ'), 0xF6, 0}, // 03A3, Sigma + {IV('Ω'), 0xF4, 0}, // 03A9, Omega + {IV('ά'), 0xE0, 0}, // 03AC + {IV('έ'), 0xE3, 0}, // 03AD + {IV('α'), 0xE0, 0}, // 03B1, alpha + {IV('β'), 0xE2, 0}, // 03B2, beta + {IV('ε'), 0xE3, 0}, // 03B5, epsilon + {IV('θ'), 0xF2, 0}, // 03B8, theta + {IV('μ'), 0xE4, 0}, // 03BC, mu + {IV('ξ'), 0xE3, 0}, // 03BE, xi + {IV('π'), 0xF7, 0}, // 03C0, pi + {IV('ρ'), 0xE6, 0}, // 03C1, rho + {IV('σ'), 0xE5, 0}, // 03C3, sigma + + {IV('←'), 0x7F, 0}, // 2190 + {IV('→'), 0x7E, 0}, // 2192, Marlin special: '⮈⮉⮊⮋➤→' LCD_STR_ARROW_RIGHT (0x03) + {IV('√'), 0xE8, 0}, // 221A + {IV('∞'), 0xF3, 0}, // 221E + {IV('█'), 0xFF, 0}, // 2588 + + //{IV(''), 0xA0, 0}, + {IV('。'), 0xA1, 0}, + {IV('「'), 0xA2, 0}, + {IV('」'), 0xA3, 0}, + {IV('゛'), 0xDE, 0}, // ‶ + {IV('゜'), 0xDF, 0}, // '〫' + {IV('゠'), '=', 0}, + {IV('ァ'), 0xA7, 0}, + {IV('ア'), 0xB1, 0}, + {IV('ィ'), 0xA8, 0}, + {IV('イ'), 0xB2, 0}, + {IV('ゥ'), 0xA9, 0}, + {IV('ウ'), 0xB3, 0}, + {IV('ェ'), 0xAA, 0}, + {IV('エ'), 0xB4, 0}, + {IV('ォ'), 0xAB, 0}, + + {IV('オ'), 0xB5, 0}, + {IV('カ'), 0xB6, 0}, + {IV('ガ'), 0xB6, 0xDE}, + {IV('キ'), 0xB7, 0}, + {IV('ギ'), 0xB7, 0xDE}, + {IV('ク'), 0xB8, 0}, + {IV('グ'), 0xB8, 0xDE}, + {IV('ケ'), 0xB9, 0}, + {IV('ゲ'), 0xB9, 0xDE}, + {IV('コ'), 0xBA, 0}, + {IV('ゴ'), 0xBA, 0xDE}, + {IV('サ'), 0xBB, 0}, + {IV('ザ'), 0xBB, 0xDE}, + {IV('シ'), 0xBC, 0}, + {IV('ジ'), 0xBC, 0xDE}, + {IV('ス'), 0xBD, 0}, + {IV('ズ'), 0xBD, 0xDE}, + {IV('セ'), 0xBE, 0}, + {IV('ゼ'), 0xBE, 0xDE}, + {IV('ソ'), 0xBF, 0}, + {IV('ゾ'), 0xBF, 0xDE}, + + {IV('タ'), 0xC0, 0}, + {IV('ダ'), 0xC0, 0xDE}, + {IV('チ'), 0xC1, 0}, + {IV('ヂ'), 0xC1, 0xDE}, + {IV('ッ'), 0xAF, 0}, + {IV('ツ'), 0xC2, 0}, + {IV('ヅ'), 0xC2, 0xDE}, + {IV('テ'), 0xC3, 0}, + {IV('デ'), 0xC3, 0xDE}, + {IV('ト'), 0xC4, 0}, + {IV('ド'), 0xC4, 0xDE}, + {IV('ナ'), 0xC5, 0}, + {IV('ニ'), 0xC6, 0}, + {IV('ヌ'), 0xC7, 0}, + {IV('ネ'), 0xC8, 0}, + {IV('ノ'), 0xC9, 0}, + {IV('ハ'), 0xCA, 0}, + {IV('バ'), 0xCA, 0xDE}, + {IV('パ'), 0xCA, 0xDF}, + {IV('ヒ'), 0xCB, 0}, + {IV('ビ'), 0xCB, 0xDE}, + {IV('ピ'), 0xCB, 0xDF}, + {IV('フ'), 0xCC, 0}, + {IV('ブ'), 0xCC, 0xDE}, + {IV('プ'), 0xCC, 0xDF}, + {IV('ヘ'), 0xCD, 0}, + {IV('ベ'), 0xCD, 0xDE}, + {IV('ペ'), 0xCD, 0xDF}, + {IV('ホ'), 0xCE, 0}, + {IV('ボ'), 0xCE, 0xDE}, + {IV('ポ'), 0xCE, 0xDF}, + {IV('マ'), 0xCF, 0}, + + {IV('ミ'), 0xD0, 0}, + {IV('ム'), 0xD1, 0}, + {IV('メ'), 0xD2, 0}, + {IV('モ'), 0xD3, 0}, + {IV('ャ'), 0xAC, 0}, + {IV('ヤ'), 0xD4, 0}, + {IV('ュ'), 0xAD, 0}, + {IV('ユ'), 0xD5, 0}, + {IV('ョ'), 0xAE, 0}, + {IV('ヨ'), 0xD6, 0}, + {IV('ラ'), 0xD7, 0}, + {IV('リ'), 0xD8, 0}, + {IV('ル'), 0xD9, 0}, + {IV('レ'), 0xDA, 0}, + {IV('ロ'), 0xDB, 0}, + {IV('ワ'), 0xDC, 0}, + {IV('ヲ'), 0xA6, 0}, + {IV('ン'), 0xDD, 0}, + {IV('ヴ'), 0xB3, 0xDE}, + {IV('ヷ'), 0xDC, 0xDE}, + {IV('ヺ'), 0xA6, 0xDE}, + {IV('・'), 0xA5, 0}, + {IV('ー'), 0xB0, 0}, + {IV('ヽ'), 0xA4, 0}, + + //{IV('g'), 0xE7, 0}, // error + //{IV(''), 0xE9, 0}, + //{IV('j'), 0xEA, 0}, // error + //{IV(''), 0xED, 0}, + //{IV(''), 0xEE, 0}, + + //{IV('p'), 0xF0, 0}, // error + //{IV('q'), 0xF1, 0}, // error + //{IV(''), 0xF8, 0}, + //{IV('y'), 0xF9, 0}, // error + {IV('万'), 0xFB, 0}, + {IV('円'), 0xFC, 0}, + {IV('千'), 0xFA, 0}, + //{IV(''), 0xFE, 0}, + + //、・ヲァィゥェォャュョッー + {IV('、'), 0xA4, 0}, //ヽ + {IV('・'), 0xA5, 0}, //・ + {IV('ヲ'), 0xA6, 0}, //ヲ + {IV('ァ'), 0xA7, 0}, //ァ + {IV('ィ'), 0xA8, 0}, //ィ + {IV('ゥ'), 0xA9, 0}, //ゥ + {IV('ェ'), 0xAA, 0}, //ェ + {IV('ォ'), 0xAB, 0}, //ォ + {IV('ャ'), 0xAC, 0}, //ャ + {IV('ュ'), 0xAD, 0}, //ュ + {IV('ョ'), 0xAE, 0}, //ョ + {IV('ッ'), 0xAF, 0}, //ッ + {IV('ー'), 0xB0, 0}, //ー + + //アイウエオカキクケコサシスセ + {IV('ア'), 0xB1, 0}, //ア + {IV('イ'), 0xB2, 0}, //イ + {IV('ウ'), 0xB3, 0}, //ウ + {IV('エ'), 0xB4, 0}, //エ + {IV('オ'), 0xB5, 0}, //オ + {IV('カ'), 0xB6, 0}, //カ + {IV('キ'), 0xB7, 0}, //キ + {IV('ク'), 0xB8, 0}, //ク + {IV('ケ'), 0xB9, 0}, //ケ + {IV('コ'), 0xBA, 0}, //コ + {IV('サ'), 0xBB, 0}, //サ + {IV('シ'), 0xBC, 0}, //シ + {IV('ス'), 0xBD, 0}, //ス + {IV('セ'), 0xBE, 0}, //セ + + //ソタチツテトナニヌネノハヒフ + {IV('ソ'), 0xBF, 0}, //ソ + {IV('タ'), 0xC0, 0}, //タ + {IV('チ'), 0xC1, 0}, //チ + {IV('ツ'), 0xC2, 0}, //ツ + {IV('テ'), 0xC3, 0}, //テ + {IV('ト'), 0xC4, 0}, //ト + {IV('ナ'), 0xC5, 0}, //ナ + {IV('ニ'), 0xC6, 0}, //ニ + {IV('ヌ'), 0xC7, 0}, //ヌ + {IV('ネ'), 0xC8, 0}, //ネ + {IV('ノ'), 0xC9, 0}, //ノ + {IV('ハ'), 0xCA, 0}, //ハ + {IV('ヒ'), 0xCB, 0}, //ヒ + {IV('フ'), 0xCC, 0}, //フ + + //ヘホマミムメモヤユヨラリルレロワン゙゚ + {IV('ヘ'), 0xCD, 0}, //ヘ + {IV('ホ'), 0xCE, 0}, //ホ + {IV('マ'), 0xCF, 0}, //マ + {IV('ミ'), 0xD0, 0}, //ミ + {IV('ム'), 0xD1, 0}, //ム + {IV('メ'), 0xD2, 0}, //メ + {IV('モ'), 0xD3, 0}, //モ + {IV('ヤ'), 0xD4, 0}, //ヤ + {IV('ユ'), 0xD5, 0}, //ユ + {IV('ヨ'), 0xD6, 0}, //ヨ + {IV('ラ'), 0xD7, 0}, //ラ + {IV('リ'), 0xD8, 0}, //リ + {IV('ル'), 0xD9, 0}, //ル + {IV('レ'), 0xDA, 0}, //レ + {IV('ロ'), 0xDB, 0}, //ロ + {IV('ワ'), 0xDC, 0}, //ワ + {IV('ン'), 0xDD, 0}, //ン + {IV('゙'), 0xDE, 0}, // ゛ + {IV('゚'), 0xDF, 0}, // ゜ + + {IV('¥'), 0x5C, 0}, + + #elif DISPLAY_CHARSET_HD44780 == WESTERN + // 0x10 -- 0x1F (except 0x1C) + // 0x80 -- 0xFF (except 0xA7,0xB0,0xB1,0xB3,0xB4,0xBF,0xD1,0xF8,0xFA,0xFC-0xFF) + + {IV('¡'), 0xA9, 0}, + {IV('¢'), 0xA4, 0}, + {IV('£'), 0xA5, 0}, + {IV('¥'), 0xA6, 0}, + {IV('§'), 0xD2, 0}, // section sign + {IV('©'), 0xCF, 0}, + + {IV('ª'), 0x9D, 0}, + {IV('«'), 0xBB, 0}, + {IV('®'), 0xCE, 0}, + + {IV('°'), 0xB2, 0}, // Marlin special: '°' LCD_STR_DEGREE (0x09) + //{IV(''), 0xD1, 0}, + {IV('±'), 0x10, 0}, //∓± + //{'='), 0x1C, 0}, // error + {IV('²'), 0x1E, 0}, + {IV('³'), 0x1F, 0}, + {IV('¶'), 0xD3, 0}, // pilcrow sign + {IV('º'), 0x9E, 0}, + {IV('»'), 0xBC, 0}, // 00BB + //{IV(''), 0xB3, 0}, // error + //{IV(''), 0xB4, 0}, // error + {IV('¼'), 0xB6, 0}, // 00BC + {IV('½'), 0xB5, 0}, // 00BD + //{IV('¾'), '3', 0}, // 00BE + {IV('¿'), 0x9F, 0}, // 00BF + + {IV('Â'), 0x8F, 0}, + {IV('Ã'), 0xAA, 0}, + {IV('Ä'), 0x8E, 0}, + {IV('Æ'), 0x92, 0}, + {IV('Ç'), 0x80, 0}, + {IV('É'), 0x90, 0}, + {IV('Ñ'), 0x9C, 0}, + {IV('Õ'), 0xAC, 0}, + {IV('Ö'), 0x99, 0}, + {IV('×'), 0xB7, 0}, + {IV('Ø'), 0xAE, 0}, + {IV('Ü'), 0x9A, 0}, + {IV('à'), 0x85, 0}, + {IV('á'), 0xA0, 0}, + {IV('â'), 0x83, 0}, + {IV('ã'), 0xAB, 0}, + {IV('ä'), 0x84, 0}, + {IV('å'), 0x86, 0}, + {IV('æ'), 0x91, 0}, + {IV('ç'), 0x87, 0}, + {IV('è'), 0x8A, 0}, + {IV('é'), 0x82, 0}, + {IV('ê'), 0x88, 0}, + {IV('ë'), 0x89, 0}, + {IV('ì'), 0x8D, 0}, + {IV('í'), 0xA1, 0}, + {IV('î'), 0x8C, 0}, + {IV('ï'), 0x8B, 0}, + + {IV('ñ'), 0x9B, 0}, + {IV('ò'), 0x95, 0}, + {IV('ó'), 0xA2, 0}, + {IV('ô'), 0x93, 0}, + {IV('õ'), 0xAD, 0}, + {IV('ö'), 0x94, 0}, + {IV('÷'), 0xB8, 0}, + {IV('ø'), 0xAF, 0}, + {IV('ù'), 0x97, 0}, + {IV('ú'), 0xA3, 0}, + {IV('û'), 0x96, 0}, + {IV('ü'), 0x81, 0}, + {IV('ÿ'), 0x98, 0}, + + //{IV(''), 0xB0, 0}, // error + //{IV(''), 0xB1, 0}, // error + {IV('ƒ'), 0xA8, 0}, // 0192 + + {IV('Ύ'), 0xDB, 0}, // 038E + {IV('Ώ'), 0xDE, 0}, // 038F + {IV('ΐ'), 0xE7, 0}, // 0390 + + {IV('Γ'), 0xD4, 0}, // 0393, Gamma + {IV('Δ'), 0xD5, 0}, // 0394, Delta, ◿ + {IV('Θ'), 0xD6, 0}, // 0398, Theta + {IV('Λ'), 0xD7, 0}, // 039B, Lambda + {IV('Ξ'), 0xD8, 0}, // 039E, Xi + {IV('Π'), 0xD9, 0}, // Pi + {IV('Σ'), 0xDA, 0}, // Sigma + {IV('Υ'), 0xDB, 0}, // Upsilon + {IV('Φ'), 0xDC, 0}, // Phi + {IV('Ψ'), 0xDD, 0}, // Psi + {IV('Ω'), 0xDE, 0}, // Omega + + {IV('ά'), 0xDF, 0}, // 03AC + {IV('έ'), 0xE3, 0}, // 03AD + {IV('ή'), 0xE5, 0}, // 03AE + {IV('ί'), 0xE7, 0}, // 03AF + {IV('ΰ'), 0xF1, 0}, // 03B0 + + {IV('α'), 0xDF, 0}, // alpha + {IV('β'), 0xE0, 0}, // beta + {IV('γ'), 0xE1, 0}, // gamma + {IV('δ'), 0xE2, 0}, // delta + {IV('ε'), 0xE3, 0}, // epsilon + {IV('ζ'), 0xE4, 0}, // zeta + {IV('η'), 0xE5, 0}, // eta + {IV('θ'), 0xE6, 0}, // theta + {IV('ι'), 0xE7, 0}, // lota + {IV('κ'), 0xE8, 0}, // kappa + {IV('λ'), 0xE9, 0}, // lambda + {IV('μ'), 0xEA, 0}, // mu + {IV('ν'), 0xEB, 0}, // nu + {IV('ξ'), 0xEC, 0}, // xi + {IV('π'), 0xED, 0}, // pi + {IV('ρ'), 0xEE, 0}, // rho + {IV('σ'), 0xEF, 0}, // sigma + + {IV('τ'), 0xF0, 0}, // tau + {IV('υ'), 0xF1, 0}, // upsilon + {IV('χ'), 0xF2, 0}, // chi + {IV('ψ'), 0xF3, 0}, // psi + {IV('ω'), 0xF4, 0}, // 03C9, omega + {IV('ϊ'), 0xE7, 0}, // 03CA + {IV('ϋ'), 0xF1, 0}, // 03CB + {IV('ύ'), 0xF1, 0}, // 03CD + {IV('ώ'), 0xF4, 0}, // 03CE + + {IV('•'), 0xCD, 0}, // · + {IV('℞'), 0xA7, 0}, // ℞ Pt ASCII 158 + {IV('™'), 0xD0, 0}, + {IV('↤'), 0xF9, 0}, // ⟻ + {IV('↵'), 0xC4, 0}, + {IV('↻'), 0x04, 0}, // Marlin special: '↻↺⟳⟲' LCD_STR_REFRESH (0x01) + {IV('⇥'), 0xFB, 0}, + {IV('√'), 0xBE, 0}, // √ + {IV('∞'), 0xC2, 0}, // infinity + {IV('∫'), 0x1B, 0}, + {IV('∼'), 0x1D, 0}, + {IV('≈'), 0x1A, 0}, + {IV('≠'), 0xBD, 0}, + {IV('≡'), 0x11, 0}, + {IV('≤'), 0xB9, 0},// ≤≥ ⩽⩾ + {IV('≥'), 0xBA, 0}, + //{IV(''), 0xBF, 0}, // error + + {IV('⌠'), 0xC0, 0}, + {IV('⌡'), 0xC1, 0}, + + {IV('⎧'), 0x14, 0}, + {IV('⎩'), 0x15, 0}, + {IV('⎫'), 0x16, 0}, + {IV('⎭'), 0x17, 0}, + {IV('⎰'), 0x18, 0}, + {IV('⎱'), 0x19, 0}, + + {IV('⎲'), 0x12, 0}, + {IV('⎳'), 0x13, 0}, + + {IV('⏱'), 0x07, 0}, // Marlin special: '🕐🕑🕒🕓🕔🕕🕖🕗🕘🕙🕚🕛🕜🕝🕞🕟🕠🕡🕢🕣🕤🕥🕦🕧 ⌚⌛⏰⏱⏳⧖⧗' LCD_STR_CLOCK (0x05) + {IV('┌'), 0xC9, 0}, + {IV('┐'), 0xCA, 0}, + {IV('└'), 0xCB, 0}, + {IV('┘'), 0xCC, 0}, + {IV('◸'), 0xC3, 0}, // ◿ + {IV('⭠'), 0xC8, 0}, + {IV('⭡'), 0xC5, 0}, + {IV('⭢'), 0xC7, 0}, + {IV('⭣'), 0xC6, 0}, + + + {IV('⯆'), 0xF5, 0}, + {IV('⯇'), 0xF7, 0}, // ⯅ + {IV('⯈'), 0xF6, 0}, + //{IV(''), 0xF8, 0}, // error + //{IV(''), 0xFA, 0}, // error + //{IV(''), 0xFC, 0}, // error + //{IV(''), 0xFD, 0}, // error + //{IV(''), 0xFE, 0}, // error + //{IV(''), 0xFF, 0}, // error + + #elif DISPLAY_CHARSET_HD44780 == CYRILLIC + + {IV('¢'), 0x5C, 0}, // 00A2 + {IV('£'), 0xCF, 0}, // 00A3 + {IV('°'), 0x01, 0}, // 00B0, Marlin special: '°' LCD_STR_DEGREE (0x09) + + //{IV(''), 0x80, 0}, + //{IV(''), 0x81, 0}, + //{IV(''), 0x82, 0}, + //{IV(''), 0x83, 0}, + //{IV(''), 0x84, 0}, + //{IV(''), 0x85, 0}, + //{IV(''), 0x86, 0}, + //{IV(''), 0x87, 0}, + //{IV(''), 0x88, 0}, + //{IV(''), 0x89, 0}, + //{IV(''), 0x8A, 0}, + //{IV(''), 0x8B, 0}, + //{IV(''), 0x8C, 0}, + //{IV(''), 0x8D, 0}, + //{IV(''), 0x8E, 0}, + //{IV(''), 0x8F, 0}, + + //{IV(''), 0x90, 0}, + //{IV(''), 0x91, 0}, + //{IV(''), 0x92, 0}, + //{IV(''), 0x93, 0}, + //{IV(''), 0x94, 0}, + //{IV(''), 0x95, 0}, + //{IV(''), 0x96, 0}, + //{IV(''), 0x97, 0}, + //{IV(''), 0x98, 0}, + //{IV(''), 0x99, 0}, + //{IV(''), 0x9A, 0}, + //{IV(''), 0x9B, 0}, + //{IV(''), 0x9C, 0}, + //{IV(''), 0x9D, 0}, + //{IV(''), 0x9E, 0}, + //{IV(''), 0x9F, 0}, + + + {IV('¼'), 0xF0, 0}, // 00BC + {IV('⅓'), 0xF1, 0}, + {IV('½'), 0xF2, 0}, // 00BD + {IV('¾'), 0xF3, 0}, // 00BE + {IV('¿'), 0xCD, 0}, // 00BF + + #if ENABLED(DISPLAY_CHARSET_ISO10646_5) + + // Map Cyrillic to HD44780 extended CYRILLIC where possible + {IV('Ё'), 0xA2, 0}, // 0401 + {IV('А'), 'A', 0}, // 0410 + {IV('Б'), 0xA0, 0}, + {IV('В'), 'B', 0}, + {IV('Г'), 0xA1, 0}, + {IV('Д'), 0xE0, 0}, + {IV('Е'), 'E', 0}, + {IV('Ж'), 0xA3, 0}, + {IV('З'), 0xA4, 0}, + {IV('И'), 0xA5, 0}, + {IV('Й'), 0xA6, 0}, + {IV('К'), 'K', 0}, + {IV('Л'), 0xA7, 0}, + {IV('М'), 'M', 0}, + {IV('Н'), 'H', 0}, + {IV('О'), 'O', 0}, + {IV('П'), 0xA8, 0}, + {IV('Р'), 'P', 0}, + {IV('С'), 'C', 0}, + {IV('Т'), 'T', 0}, + {IV('У'), 0xA9, 0}, + {IV('Ф'), 0xAA, 0}, + {IV('Х'), 'X', 0}, + {IV('Ц'), 0xE1, 0}, + {IV('Ч'), 0xAB, 0}, + {IV('Ш'), 0xAC, 0}, + {IV('Щ'), 0xE2, 0}, + {IV('Ъ'), 0xAD, 0}, + {IV('Ы'), 0xAE, 0}, + {IV('Ь'), 'b', 0}, + {IV('Э'), 0xAF, 0}, + {IV('Ю'), 0xB0, 0}, + {IV('Я'), 0xB1, 0}, + {IV('а'), 'a', 0}, + + {IV('б'), 0xB2, 0}, + {IV('в'), 0xB3, 0}, + {IV('г'), 0xB4, 0}, + {IV('д'), 0xE3, 0}, + {IV('е'), 'e', 0}, + {IV('ж'), 0xB6, 0}, + {IV('з'), 0xB7, 0}, + {IV('и'), 0xB8, 0}, + {IV('й'), 0xB9, 0}, + {IV('к'), 0xBA, 0}, //клмноп + {IV('л'), 0xBB, 0}, + {IV('м'), 0xBC, 0}, + {IV('н'), 0xBD, 0}, + {IV('о'), 'o', 0}, + {IV('п'), 0xBE, 0}, + {IV('р'), 'p', 0}, + {IV('с'), 'c', 0}, + {IV('т'), 0xBF, 0}, + + {IV('у'), 'y', 0}, + {IV('ф'), 0xE4, 0}, + {IV('х'), 'x', 0}, + {IV('ц'), 0xE5, 0}, + {IV('ч'), 0xC0, 0}, + {IV('ш'), 0xC1, 0}, + {IV('щ'), 0xE6, 0}, + {IV('ъ'), 0xC2, 0}, + {IV('ы'), 0xC3, 0}, + {IV('ь'), 0xC4, 0}, + {IV('э'), 0xC5, 0}, + {IV('ю'), 0xC6, 0}, + {IV('я'), 0xC7, 0}, // 044F + {IV('ё'), 0xB5, 0}, // 0451 + //{IV(''), 0xC8, 0}, + //{IV(''), 0xC9, 0}, + //{IV(''), 0xCA, 0}, + //{IV(''), 0xCB, 0}, + //{IV(''), 0xCC, 0}, + //{IV(''), 0xCD, 0}, + //{IV(''), 0xCE, 0}, + + //{IV(''), 0xD0, 0}, + //{IV(''), 0xD1, 0}, + //{IV(''), 0xD2, 0}, + //{IV(''), 0xD3, 0}, + //{IV(''), 0xD4, 0}, + //{IV(''), 0xD5, 0}, + //{IV(''), 0xD6, 0}, + //{IV(''), 0xD7, 0}, + //{IV(''), 0xD8, 0}, + //{IV(''), 0xDB, 0}, + //{IV(''), 0xDC, 0}, + //{IV(''), 0xDD, 0}, + //{IV(''), 0xDE, 0}, + //{IV(''), 0xDF, 0}, + + //{IV(''), 0xE7, 0}, + //{IV(''), 0xE8, 0}, + //{IV(''), 0xE9, 0}, + //{IV(''), 0xEA, 0}, + //{IV(''), 0xEB, 0}, + //{IV(''), 0xEC, 0}, + //{IV(''), 0xED, 0}, + //{IV(''), 0xEE, 0}, + //{IV(''), 0xEF, 0}, + + //{IV(''), 0xF4, 0}, + //{IV(''), 0xF5, 0}, + //{IV(''), 0xF6, 0}, + //{IV(''), 0xF7, 0}, + //{IV(''), 0xF8, 0}, + //{IV(''), 0xF9, 0}, + //{IV(''), 0xFA, 0}, + //{IV(''), 0xFB, 0}, + //{IV(''), 0xFC, 0}, + //{IV(''), 0xFD, 0}, + //{IV(''), 0xFE, 0}, + //{IV(''), 0xFF, 0}, + + #endif + + {IV('↑'), 0xD9, 0}, // 2191 ←↑→↓ + {IV('↓'), 0xDA, 0}, // 2193 + #endif +}; + +// ASCII replacement for various characters +const dwin_charmap_t g_dwin_charmap_common[] PROGMEM = { + {IV('¡'), 'i', 0}, // A1 + {IV('¢'), 'c', 0}, // A2 + {IV('°'), 0x09, 0}, // B0 Marlin special: '°' LCD_STR_DEGREE (0x09) + + // Map WESTERN code to plain ASCII + {IV('Á'), 'A', 0}, // C1 + {IV('Â'), 'A', 0}, // C2 + {IV('Ã'), 'A', 0}, // C3 + {IV('Ä'), 'A', 0}, // C4 + {IV('Å'), 'A', 0}, // C5 + {IV('Æ'), 'A', 'E'}, // C6 + {IV('Ç'), 'C', 0}, // C7 + {IV('È'), 'E', 0}, // C8 + {IV('É'), 'E', 0}, // C9 + {IV('Í'), 'I', 0}, // CD + {IV('Ñ'), 'N', 0}, // D1 + {IV('Õ'), 'O', 0}, // D5 + {IV('Ö'), 'O', 0}, // D6 + {IV('×'), 'x', 0}, // D7 + {IV('Ü'), 'U', 0}, // DC + {IV('Ý'), 'Y', 0}, // DD + {IV('à'), 'a', 0}, // E0 + {IV('á'), 'a', 0}, + {IV('â'), 'a', 0}, + {IV('ã'), 'a', 0}, + {IV('ä'), 'a', 0}, + {IV('å'), 'a', 0}, + {IV('æ'), 'a', 'e'}, + {IV('ç'), 'c', 0}, + {IV('è'), 'e', 0}, // 00E8 + {IV('é'), 'e', 0}, + {IV('ê'), 'e', 0}, + {IV('ë'), 'e', 0}, + {IV('ì'), 'i', 0}, // 00EC + {IV('í'), 'i', 0}, + {IV('î'), 'i', 0}, + {IV('ï'), 'i', 0}, // 00EF + + {IV('ñ'), 'n', 0}, // 00F1 + {IV('ò'), 'o', 0}, + {IV('ó'), 'o', 0}, + {IV('ô'), 'o', 0}, + {IV('õ'), 'o', 0}, + {IV('ö'), 'o', 0}, + //{IV('÷'), 0xB8, 0}, + {IV('ø'), 'o', 0}, + {IV('ù'), 'u', 0}, + {IV('ú'), 'u', 0}, + {IV('û'), 'u', 0}, + {IV('ü'), 'u', 0}, // FC + {IV('ý'), 'y', 0}, // FD + {IV('ÿ'), 'y', 0}, // FF + + {IV('Ą'), 'A', 0}, // 0104 + {IV('ą'), 'a', 0}, // 0105 + {IV('Ć'), 'C', 0}, // 0106 + {IV('ć'), 'c', 0}, // 0107 + {IV('Č'), 'C', 0}, // 010C + {IV('č'), 'c', 0}, // 010D + {IV('Ď'), 'D', 0}, // 010E + {IV('ď'), 'd', 0}, // 010F + {IV('đ'), 'd', 0}, // 0111 + {IV('ę'), 'e', 0}, // 0119 + {IV('Ě'), 'E', 0}, // 011A + {IV('ě'), 'e', 0}, // 011B + {IV('ğ'), 'g', 0}, // 011F + {IV('İ'), 'I', 0}, // 0130 + {IV('ı'), 'i', 0}, // 0131 + + {IV('Ł'), 'L', 0}, // 0141 + {IV('ł'), 'l', 0}, // 0142 + {IV('Ń'), 'N', 0}, // 0143 + {IV('ń'), 'n', 0}, // 0144 + {IV('ň'), 'n', 0}, // 0148 + + {IV('Ř'), 'R', 0}, // 0158 + {IV('ř'), 'r', 0}, // 0159 + {IV('Ś'), 'S', 0}, // 015A + {IV('ś'), 's', 0}, // 015B + {IV('ş'), 's', 0}, // 015F + {IV('Š'), 'S', 0}, // 0160 + {IV('š'), 's', 0}, // 0161 + {IV('ť'), 't', 0}, // 0165 + {IV('ů'), 'u', 0}, // 016F + {IV('ż'), 'z', 0}, // 017C + {IV('Ž'), 'Z', 0}, // 017D + {IV('ž'), 'z', 0}, // 017E + {IV('ƒ'), 'f', 0}, // 0192 + + {IV('ˣ'), 'x', 0}, // 02E3 + + #if ENABLED(DISPLAY_CHARSET_ISO10646_VI) + + // Map Vietnamese phonetics + + //{IV('à'), 'a', 0}, {IV('À'), 'A', 0}, + {IV('ạ'), 'a', 0}, {IV('Ạ'), 'A', 0}, + {IV('ả'), 'a', 0}, {IV('Ả'), 'A', 0}, + //{IV('ã'), 'a', 0}, {IV('Ã'), 'A', 0}, + //{IV('á'), 'á', 0}, {IV('Á'), 'A', 0}, + {IV('Ạ'), 'A', 0}, + {IV('ă'), 'a', 0}, {IV('Ă'), 'A', 0}, + {IV('ằ'), 'a', 0}, {IV('Ằ'), 'A', 0}, + {IV('ẳ'), 'a', 0}, {IV('Ẳ'), 'A', 0}, + {IV('ẵ'), 'a', 0}, {IV('Ẵ'), 'A', 0}, + {IV('ắ'), 'a', 0}, {IV('Ắ'), 'A', 0}, + {IV('ặ'), 'a', 0}, {IV('Ặ'), 'A', 0}, + {IV('â'), 'a', 0}, {IV('Â'), 'A', 0}, + {IV('ầ'), 'a', 0}, {IV('Ầ'), 'A', 0}, + {IV('ẩ'), 'a', 0}, {IV('Ẩ'), 'A', 0}, + {IV('ẫ'), 'a', 0}, {IV('Ẫ'), 'A', 0}, + {IV('ấ'), 'a', 0}, {IV('Ấ'), 'A', 0}, + {IV('ậ'), 'a', 0}, {IV('Ậ'), 'A', 0}, + //{IV('đ'), 'd', 0}, + {IV('Đ'), 'D', 0}, + {IV('e'), 'e', 0}, {IV('E'), 'E', 0}, + {IV('è'), 'e', 0}, {IV('È'), 'E', 0}, + {IV('ẻ'), 'e', 0}, {IV('Ẻ'), 'E', 0}, + {IV('ẽ'), 'e', 0}, {IV('Ẽ'), 'E', 0}, + {IV('é'), 'e', 0}, {IV('É'), 'E', 0}, + {IV('ẹ'), 'e', 0}, {IV('Ẹ'), 'E', 0}, + {IV('ê'), 'e', 0}, {IV('Ê'), 'E', 0}, + {IV('ề'), 'e', 0}, {IV('Ề'), 'E', 0}, + {IV('ể'), 'e', 0}, {IV('Ể'), 'E', 0}, + {IV('ễ'), 'e', 0}, {IV('Ễ'), 'E', 0}, + {IV('ế'), 'e', 0}, {IV('Ế'), 'E', 0}, + {IV('ệ'), 'e', 0}, {IV('Ệ'), 'E', 0}, + {IV('i'), 'i', 0}, {IV('I'), 'I', 0}, + //{IV('ì'), 'ì', 0}, {IV('Ì'), 'Ì', 0}, + {IV('ỉ'), 'ỉ', 0}, {IV('Ỉ'), 'Ỉ', 0}, + {IV('ĩ'), 'ĩ', 0}, {IV('Ĩ'), 'Ĩ', 0}, + {IV('í'), 'í', 0}, {IV('Í'), 'Í', 0}, + {IV('ị'), 'ị', 0}, {IV('Ị'), 'Ị', 0}, + {IV('o'), 'o', 0}, {IV('O'), 'O', 0}, + {IV('ò'), 'o', 0}, {IV('Ò'), 'O', 0}, + {IV('ỏ'), 'o', 0}, {IV('Ỏ'), 'O', 0}, + {IV('õ'), 'o', 0}, {IV('Õ'), 'O', 0}, + {IV('ó'), 'o', 0}, {IV('Ó'), 'O', 0}, + {IV('ọ'), 'o', 0}, {IV('Ọ'), 'O', 0}, + {IV('ô'), 'o', 0}, {IV('Ô'), 'O', 0}, + {IV('ồ'), 'o', 0}, {IV('Ồ'), 'O', 0}, + {IV('ổ'), 'o', 0}, {IV('Ổ'), 'O', 0}, + {IV('ỗ'), 'o', 0}, {IV('Ỗ'), 'O', 0}, + {IV('ố'), 'o', 0}, {IV('Ố'), 'O', 0}, + {IV('ộ'), 'o', 0}, {IV('Ộ'), 'O', 0}, + {IV('ơ'), 'o', 0}, {IV('Ơ'), 'O', 0}, + {IV('ờ'), 'o', 0}, {IV('Ờ'), 'O', 0}, + {IV('ở'), 'o', 0}, {IV('Ở'), 'O', 0}, + {IV('ỡ'), 'o', 0}, {IV('Ỡ'), 'O', 0}, + {IV('ớ'), 'o', 0}, {IV('Ớ'), 'O', 0}, + {IV('ợ'), 'o', 0}, {IV('Ợ'), 'O', 0}, + {IV('ù'), 'u', 0}, {IV('Ù'), 'U', 0}, + {IV('ủ'), 'u', 0}, {IV('Ủ'), 'U', 0}, + {IV('ũ'), 'u', 0}, {IV('Ũ'), 'U', 0}, + //{IV('ú'), 'u', 0}, {IV('Ú'), 'U', 0}, + {IV('ụ'), 'u', 0}, {IV('Ụ'), 'U', 0}, + {IV('ư'), 'u', 0}, {IV('Ư'), 'U', 0}, + {IV('ừ'), 'u', 0}, {IV('Ừ'), 'U', 0}, + {IV('ử'), 'u', 0}, {IV('Ử'), 'U', 0}, + {IV('ữ'), 'u', 0}, {IV('Ữ'), 'U', 0}, + {IV('ứ'), 'u', 0}, {IV('Ứ'), 'U', 0}, + {IV('ự'), 'u', 0}, {IV('Ự'), 'U', 0}, + {IV('y'), 'y', 0}, {IV('Y'), 'Y', 0}, + + #endif + + #if ENABLED(DISPLAY_CHARSET_ISO10646_GREEK) + + {IV('΄'), '\'', 0}, // 0384 + {IV('΅'), '\'', 0}, // 0385 + {IV('Ά'), 'A', 0}, // 0386 + {IV('·'), '.', 0}, // 0387 + {IV('Έ'), 'E', 0}, // 0388 + {IV('Ή'), 'H', 0}, // 0389 + {IV('Ί'), 'I', 0}, // 038A + {IV('Ό'), 'O', 0}, // 038C + {IV('Ύ'), 'Y', 0}, // 038E + {IV('Ώ'), 'O', 0}, // 038F + {IV('ΐ'), 'i', 0}, // 0390 + {IV('Α'), 'A', 0}, // 0391 + {IV('Β'), 'B', 0}, // 0392 + {IV('Γ'), 'T', 0}, // 0393, Gamma + {IV('Δ'), '4', 0}, // 0394, Delta, ◿ + {IV('Ε'), 'E', 0}, // 0395 + {IV('Ζ'), 'Z', 0}, // 0396 + {IV('Η'), 'H', 0}, // 0397 + {IV('Θ'), '0', 0}, // 0398, Theta + {IV('Ι'), 'I', 0}, // 0399 + {IV('Κ'), 'K', 0}, // 039A + {IV('Λ'), '^', 0}, // 039B, Lambda + {IV('Μ'), 'M', 0}, // 039C + {IV('Ν'), 'N', 0}, // 039D + {IV('Ξ'), '3', 0}, // 039E, Xi + {IV('Ο'), 'O', 0}, // 039F + {IV('Π'), 'n', 0}, // 03A0, Pi + {IV('Ρ'), 'P', 0}, // 03A1 + {IV('Σ'), 'E', 0}, // 03A3, Sigma + {IV('Τ'), 'T', 0}, // 03A4 + {IV('Υ'), 'Y', 0}, // 03A5, Upsilon + {IV('Φ'), 'p', 0}, // 03A6, Phi + {IV('Χ'), 'X', 0}, // 03A7 + {IV('Ψ'), 'P', 0}, // 03A8, Psi + {IV('Ω'), 'O', 0}, // 03A9, Omega + {IV('Ϊ'), 'I', 0}, // 03AA + {IV('Ϋ'), 'Y', 0}, // 03AB + {IV('ά'), 'a', 0}, // 03AC + {IV('έ'), 'e', 0}, // 03AD + {IV('ή'), 'n', 0}, // 03AE + {IV('ί'), 'i', 0}, // 03AF + {IV('ΰ'), 'v', 0}, // 03B0 + {IV('α'), 'a', 0}, // 03B1, alpha + {IV('β'), 'B', 0}, // 03B2, beta + {IV('γ'), 'v', 0}, // 03B3, gamma + {IV('δ'), 'd', 0}, // 03B4, delta + {IV('ε'), 'e', 0}, // 03B5, epsilon + {IV('ζ'), 'Z', 0}, // 03B6, zeta + {IV('η'), 'n', 0}, // 03B7, eta + {IV('θ'), '0', 0}, // 03B8, theta + {IV('ι'), 'i', 0}, // 03B9, lota + {IV('κ'), 'k', 0}, // 03BA, kappa + {IV('λ'), 'L', 0}, // 03BB, lambda + {IV('μ'), 'u', 0}, // 03BC, mu + {IV('ν'), 'v', 0}, // 03BD, nu + {IV('ξ'), 'e', 0}, // 03BE, xi + {IV('ο'), 'o', 0}, // 03BF + {IV('π'), 'n', 0}, // 03C0, pi + {IV('ρ'), 'p', 0}, // 03C1, rho + {IV('ς'), 'c', 0}, // 03C2 + {IV('σ'), 'o', 0}, // 03C3, sigma + {IV('τ'), 't', 0}, // 03C4, tau + {IV('υ'), 'v', 0}, // 03C5, upsilon + {IV('φ'), 'p', 0}, // 03C6 + {IV('χ'), 'X', 0}, // 03C7, chi + {IV('ψ'), 'W', 0}, // 03C8, psi + {IV('ω'), 'w', 0}, // 03C9, omega + {IV('ϊ'), 'i', 0}, // 03CA + {IV('ϋ'), 'v', 0}, // 03CB + {IV('ό'), 'o', 0}, // 03CC + {IV('ύ'), 'v', 0}, // 03CD + {IV('ώ'), 'w', 0}, // 03CE + + #endif + + #if ENABLED(DISPLAY_CHARSET_ISO10646_5) + // Map CYRILLIC code to plain ASCII + {IV('Ё'), 'E', 0}, // 0401 + {IV('А'), 'A', 0}, // 0410 + {IV('Б'), 'b', 0}, // 0411 + {IV('В'), 'B', 0}, // 0412 + {IV('Г'), 'T', 0}, // 0413 + {IV('Д'), 'Q', 0}, // 0414 + {IV('Е'), 'E', 0}, // 0415 + {IV('Ж'), '*', 0}, // 0416 + {IV('З'), 'E', 0}, // 0417 + {IV('И'), 'N', 0}, // 0418 + {IV('Й'), 'N', 0}, // 0419 + {IV('К'), 'K', 0}, // 041A + {IV('Л'), 'T', 0}, // 041B + {IV('М'), 'M', 0}, // 041C + {IV('Н'), 'H', 0}, // 041D + {IV('О'), 'O', 0}, // 041E + {IV('П'), 'n', 0}, // 041F + {IV('Р'), 'P', 0}, // 0420 + {IV('С'), 'C', 0}, // 0421 + {IV('Т'), 'T', 0}, // 0422 + {IV('У'), 'Y', 0}, + {IV('Ф'), 'o', 0}, + {IV('Х'), 'X', 0}, + {IV('Ц'), 'U', 0}, + {IV('Ч'), 'y', 0}, + {IV('Ш'), 'W', 0}, + {IV('Щ'), 'W', 0}, + {IV('Ъ'), 'b', 0}, + {IV('Ы'), 'b', '|'}, + {IV('Ь'), 'b'}, + {IV('Э'), 'e'}, + {IV('Ю'), '|', 'O'}, + {IV('Я'), '9', '|'}, // 042F + + {IV('а'), 'a', 0}, // 0430 + {IV('б'), '6', 0}, // 0431 + {IV('в'), 'B', 0}, // 0432, + {IV('г'), 'r', 0}, // 0433 + {IV('д'), 'a', 0}, // 0434, + {IV('е'), 'e', 0}, // 0435 + {IV('ж'), '*', 0}, // 0436 + {IV('з'), 'e', 0}, // 0437, + {IV('и'), 'u', 0}, // 0438 + {IV('й'), 'u', 0}, // 0439, + {IV('к'), 'k', 0}, // 043A + {IV('л'), 'n', 0}, + {IV('м'), 'm', 0}, + {IV('н'), 'H', 0}, + {IV('о'), 'o', 0}, + {IV('п'), 'n', 0}, + {IV('р'), 'p', 0}, + {IV('с'), 'c', 0}, + {IV('т'), 't', 0}, + {IV('у'), 'y', 0}, + {IV('ф'), 'q', 'p'}, + {IV('х'), 'x', 0}, + {IV('ц'), 'u', 0}, + {IV('ч'), 'y', 0}, + {IV('ш'), 'w', 0}, + {IV('щ'), 'w', 0}, + {IV('ъ'), 'b', 0}, + {IV('ы'), 'b', '|'}, + {IV('ь'), 'b', 0}, + {IV('э'), 'e', 0}, + {IV('ю'), '|', 'o'}, + {IV('я'), 'g', 0}, // 044F + {IV('ё'), 'e', 0}, // 0451 + #endif + + {IV('•'), '.', 0}, // 2022 · + {IV('℞'), 'P', 'x'}, // 211E ℞ Pt ASCII 158 + {IV('™'), 'T', 'M'}, // 2122 + {IV('←'), '<', '-'}, // 2190 + {IV('→'), '-', '>'}, // 2192, Marlin special: '⮈⮉⮊⮋➤→⏵➟➠➡' LCD_STR_ARROW_RIGHT (0x03) + //{IV('↰'), '<', 0}, // 21B0, Marlin special: '⮥⮭⮉⇧↑↰⤴' LCD_STR_UPLEVEL (0x04) + {IV('↰'), 0x03, 0}, // 21B0, Marlin special: '⮥⮭⮉⇧↑↰⤴' LCD_STR_UPLEVEL (0x04) + {IV('↻'), 0x04, 0}, // 21BB Marlin special: '↻↺⟳⟲' LCD_STR_REFRESH (0x01) + {IV('∼'), '~', 0}, // 223C + {IV('≈'), '~', '='}, // 2248 + {IV('≠'), '!', '='}, // 2260 + {IV('≡'), '=', 0}, // 2261 + {IV('≤'), '<', '='},// 2264, ≤≥ ⩽⩾ + {IV('≥'), '>', '='}, // 2265 + {IV('⏱'), 0x07, 0}, // 23F1, Marlin special: '🕐🕑🕒🕓🕔🕕🕖🕗🕘🕙🕚🕛🕜🕝🕞🕟🕠🕡🕢🕣🕤🕥🕦🕧 ⌚⌛⏰⏱⏳⧖⧗' LCD_STR_CLOCK (0x05) + + {IV('゠'), '=', 0}, // 30A0 + + // ⏰⏱⏲⏳◴◵◶◷ + // ⏻⏼♁♂ + //{IV(''), 0x00, 0}, // Marlin special: '' LCD_STR_BEDTEMP (0x07) + {IV('🌡'), 0x02, 0}, // D83CDF21 Marlin special: '🌡' LCD_STR_THERMOMETER (0x08) + {IV('📂'), 0x05, 0}, // D83DDCC2 Marlin special: '📁📂' LCD_STR_FOLDER (0x02) + //{IV(''), 0x06, 0}, // Marlin special: '' LCD_STR_FEEDRATE (0x06) +}; diff --git a/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp new file mode 100644 index 000000000000..8892f1a00449 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.cpp @@ -0,0 +1,191 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/e3v2/marlinui/lcdprint_dwin.cpp + * + * Due to DWIN hardware limitations simplified characters are used + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if IS_DWIN_MARLINUI + +#include "lcdprint_dwin.h" +#include "dwin_lcd.h" +#include "dwin_string.h" + +#include "../../marlinui.h" +#include "../../../MarlinCore.h" + +#include + +cursor_t cursor; + +extern dwin_font_t dwin_font; + +void lcd_moveto_xy(const lcd_uint_t x, const lcd_uint_t y) { cursor.x = x; cursor.y = y; } + +void lcd_moveto(const lcd_uint_t col, const lcd_uint_t row) { + lcd_moveto_xy(col * dwin_font.width, row * (dwin_font.height + EXTRA_ROW_HEIGHT) + EXTRA_ROW_HEIGHT / 2); +} + +inline void lcd_advance_cursor(const uint8_t len=1) { cursor.x += len * dwin_font.width; } + +void lcd_put_int(const int i) { + // TODO: Draw an int at the cursor position, advance the cursor +} + +int lcd_put_dwin_string() { + DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); + lcd_advance_cursor(dwin_string.length()); + return dwin_string.length(); +} + +// return < 0 on error +// return the advanced cols +int lcd_put_wchar_max(wchar_t c, pixel_len_t max_length) { + dwin_string.set(c); + dwin_string.truncate(max_length); + // Draw the char(s) at the cursor and advance the cursor + DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); + lcd_advance_cursor(dwin_string.length()); + return dwin_string.length(); +} + +/** + * @brief Draw a UTF-8 string + * + * @param utf8_str : the UTF-8 string + * @param cb_read_byte : the callback function to read one byte from the utf8_str (from RAM or ROM) + * @param max_length : the pixel length of the string allowed (or number of slots in HD44780) + * + * @return the number of pixels advanced + * + * Draw a UTF-8 string + */ +static int lcd_put_u8str_max_cb(const char * utf8_str, uint8_t (*cb_read_byte)(uint8_t * str), pixel_len_t max_length) { + uint8_t *p = (uint8_t *)utf8_str; + dwin_string.set(); + while (dwin_string.length() < max_length) { + wchar_t ch = 0; + p = get_utf8_value_cb(p, cb_read_byte, &ch); + if (!ch) break; + dwin_string.add(ch); + } + DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); + lcd_advance_cursor(dwin_string.length()); + return dwin_string.length(); +} + +int lcd_put_u8str_max(const char * utf8_str, pixel_len_t max_length) { + return lcd_put_u8str_max_cb(utf8_str, read_byte_ram, max_length); +} + +int lcd_put_u8str_max_P(PGM_P utf8_str_P, pixel_len_t max_length) { + return lcd_put_u8str_max_cb(utf8_str_P, read_byte_rom, max_length); +} + +lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const int8_t ind, PGM_P const inStr/*=nullptr*/, const lcd_uint_t maxlen/*=LCD_WIDTH*/) { + dwin_string.set(); + dwin_string.add((uint8_t*)pstr, ind, (uint8_t*)inStr); + dwin_string.truncate(maxlen); + DWIN_Draw_String(dwin_font.solid, dwin_font.index, dwin_font.fg, dwin_font.bg, cursor.x, cursor.y, (char*)dwin_string.string()); + lcd_advance_cursor(dwin_string.length()); + return dwin_string.length(); +} + +#if ENABLED(DEBUG_LCDPRINT) + + int test_dwin_charmap(dwin_charmap_t *data, size_t size, char *name, char flg_show_contents) { + int ret; + size_t idx = 0; + dwin_charmap_t preval = { 0, 0, 0 }; + dwin_charmap_t pinval = { 0, 0, 0 }; + char flg_error = 0; + + int i; + + TRACE("Test %s\n", name); + + for (i = 0; i < size; i ++) { + memcpy_P(&pinval, &(data[i]), sizeof(pinval)); + + if (flg_show_contents) { + #if 1 + TRACE("[% 4d] % 6" PRIu32 "(0x%04" PRIX32 ") --> 0x%02X,0x%02X%s\n", i, pinval.uchar, pinval.uchar, (unsigned int)(pinval.idx), (unsigned int)(pinval.idx2), (preval.uchar < pinval.uchar?"":" <--- ERROR")); + #else + TRACE("[% 4d]", i); + TRACE("% 6" PRIu32 "(0x%04" PRIX32 "),", pinval.uchar, pinval.uchar); + TRACE("0x%02X,", (unsigned int)(pinval.idx)); + TRACE("0x%02X,", (unsigned int)(pinval.idx2)); + TRACE("%s", (preval.uchar < pinval.uchar?"":" <--- ERROR")); + #endif + } + if (preval.uchar >= pinval.uchar) { + flg_error = 1; + //TRACE("Error: out of order in array %s: idx=%d, val=%d(0x%x)\n", name, i, pinval.uchar, pinval.uchar); + //return -1; + } + memcpy(&preval, &pinval, sizeof(pinval)); + + ret = pf_bsearch_r((void *)data, size, pf_bsearch_cb_comp_dwinmap_pgm, (void *)&pinval, &idx); + if (ret < 0) { + flg_error = 1; + TRACE("Error: not found item in array %s: idx=%d, val=%d(0x%x)\n", name, i, pinval.uchar, pinval.uchar); + //return -1; + } + if (idx != i) { + flg_error = 1; + TRACE("Error: wrong index found item in array %s: idx=%d, val=%d(0x%x)\n", name, i, pinval.uchar, pinval.uchar); + //return -1; + } + } + if (flg_error) { + TRACE("\nError: in array %s\n\n", name); + return -1; + } + TRACE("\nPASS array %s\n\n", name); + return 0; + } + + int test_dwin_charmap_all() { + int flg_error = 0; + if (test_dwin_charmap(g_dwin_charmap_device, COUNT(g_dwin_charmap_device), "g_dwin_charmap_device", 0) < 0) { + flg_error = 1; + test_dwin_charmap(g_dwin_charmap_device, COUNT(g_dwin_charmap_device), "g_dwin_charmap_device", 1); + } + if (test_dwin_charmap(g_dwin_charmap_common, COUNT(g_dwin_charmap_common), "g_dwin_charmap_common", 0) < 0) { + flg_error = 1; + test_dwin_charmap(g_dwin_charmap_common, COUNT(g_dwin_charmap_common), "g_dwin_charmap_common", 1); + } + if (flg_error) { + TRACE("\nFAILED in dwin tests!\n"); + return -1; + } + TRACE("\nPASS in dwin tests.\n"); + return 0; + } + +#endif // DEBUG_LCDPRINT + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h new file mode 100644 index 000000000000..692f448e7631 --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/lcdprint_dwin.h @@ -0,0 +1,30 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../lcdprint.h" + +typedef struct { int16_t x, y; } cursor_t; +extern cursor_t cursor; + +int lcd_put_dwin_string(); +void lcd_moveto_xy(const lcd_uint_t, const lcd_uint_t); diff --git a/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h b/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h new file mode 100644 index 000000000000..a91cd19f6e8f --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/marlinui_dwin.h @@ -0,0 +1,146 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * lcd/e3v2/marlinui/lcdprint_dwin.h + */ + +#include "../../../inc/MarlinConfigPre.h" +#include "dwin_lcd.h" + +typedef uint16_t dwin_coord_t; // Screen can be pretty big +typedef uint16_t lcd_uint_t; +typedef int16_t lcd_int_t; + +typedef struct { + uint8_t index, width, height; + uint16_t fg, bg; + bool solid; +} dwin_font_t; + +extern dwin_font_t dwin_font; + +// Only Western languages support big / small fonts +//#if DISABLED(DISPLAY_CHARSET_ISO10646_1) +// #undef USE_BIG_EDIT_FONT +// #undef USE_SMALL_INFOFONT +//#endif + +#if ENABLED(USE_BIG_EDIT_FONT) + #define DWIN_FONT_EDIT font10x20 +#else + #define DWIN_FONT_EDIT font8x16 +#endif + +#define DWIN_FONT_INFO font8x16 + +#if DWIN_FONT_MENU == font6x12 + #define MENU_FONT_WIDTH 6 + #define MENU_FONT_ASCENT 10 + #define MENU_FONT_DESCENT 2 +#elif DWIN_FONT_MENU == font8x16 + #define MENU_FONT_WIDTH 8 + #define MENU_FONT_ASCENT 13 + #define MENU_FONT_DESCENT 3 +#elif DWIN_FONT_MENU == font10x20 + #define MENU_FONT_WIDTH 10 + #define MENU_FONT_ASCENT 16 + #define MENU_FONT_DESCENT 4 +#endif +#define MENU_FONT_HEIGHT (MENU_FONT_ASCENT + MENU_FONT_DESCENT) + +#define EXTRA_ROW_HEIGHT 8 +#define MENU_LINE_HEIGHT (MENU_FONT_HEIGHT + EXTRA_ROW_HEIGHT) + +#if DWIN_FONT_EDIT == font6x12 + #define EDIT_FONT_WIDTH 6 + #define EDIT_FONT_ASCENT 10 + #define EDIT_FONT_DESCENT 2 +#elif DWIN_FONT_EDIT == font8x16 + #define EDIT_FONT_WIDTH 8 + #define EDIT_FONT_ASCENT 13 + #define EDIT_FONT_DESCENT 3 +#elif DWIN_FONT_EDIT == font10x20 + #define EDIT_FONT_WIDTH 10 + #define EDIT_FONT_ASCENT 16 + #define EDIT_FONT_DESCENT 4 +#endif +#define EDIT_FONT_HEIGHT (EDIT_FONT_ASCENT + EDIT_FONT_DESCENT) + +#if DWIN_FONT_INFO == font6x12 + #define INFO_FONT_WIDTH 6 + #define INFO_FONT_ASCENT 10 + #define INFO_FONT_DESCENT 2 +#elif DWIN_FONT_INFO == font8x16 + #define INFO_FONT_WIDTH 8 + #define INFO_FONT_ASCENT 13 + #define INFO_FONT_DESCENT 3 +#elif DWIN_FONT_INFO == font10x20 + #define INFO_FONT_WIDTH 10 + #define INFO_FONT_ASCENT 16 + #define INFO_FONT_DESCENT 4 +#endif +#define INFO_FONT_HEIGHT (INFO_FONT_ASCENT + INFO_FONT_DESCENT) + +#if DWIN_FONT_STAT == font6x12 + #define STAT_FONT_WIDTH 6 + #define STAT_FONT_ASCENT 10 + #define STAT_FONT_DESCENT 2 +#elif DWIN_FONT_STAT == font8x16 + #define STAT_FONT_WIDTH 8 + #define STAT_FONT_ASCENT 13 + #define STAT_FONT_DESCENT 3 +#elif DWIN_FONT_STAT == font10x20 + #define STAT_FONT_WIDTH 10 + #define STAT_FONT_ASCENT 16 + #define STAT_FONT_DESCENT 4 +#elif DWIN_FONT_STAT == font12x24 + #define STAT_FONT_WIDTH 12 + #define STAT_FONT_ASCENT 19 + #define STAT_FONT_DESCENT 5 +#elif DWIN_FONT_STAT == font14x28 + #define STAT_FONT_WIDTH 14 + #define STAT_FONT_ASCENT 22 + #define STAT_FONT_DESCENT 6 +#elif DWIN_FONT_STAT == font16x32 + #define STAT_FONT_WIDTH 16 + #define STAT_FONT_ASCENT 26 + #define STAT_FONT_DESCENT 6 +#elif DWIN_FONT_STAT == font20x40 + #define STAT_FONT_WIDTH 20 + #define STAT_FONT_ASCENT 32 + #define STAT_FONT_DESCENT 8 +#elif DWIN_FONT_STAT == font24x48 + #define STAT_FONT_WIDTH 24 + #define STAT_FONT_ASCENT 38 + #define STAT_FONT_DESCENT 10 +#elif DWIN_FONT_STAT == font28x56 + #define STAT_FONT_WIDTH 28 + #define STAT_FONT_ASCENT 44 + #define STAT_FONT_DESCENT 12 +#elif DWIN_FONT_STAT == font32x64 + #define STAT_FONT_WIDTH 32 + #define STAT_FONT_ASCENT 50 + #define STAT_FONT_DESCENT 14 +#endif +#define STAT_FONT_HEIGHT (STAT_FONT_ASCENT + STAT_FONT_DESCENT) diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp new file mode 100644 index 000000000000..ca8e6c177f0e --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp @@ -0,0 +1,591 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if IS_DWIN_MARLINUI + +#include "marlinui_dwin.h" +#include "dwin_lcd.h" +#include "dwin_string.h" + +//#include "../../lcdprint.h" +#include "lcdprint_dwin.h" +#include "../../fontutils.h" +#include "../../../libs/numtostr.h" +#include "../../marlinui.h" + +#include "../../../sd/cardreader.h" +#include "../../../module/motion.h" +#include "../../../module/temperature.h" +#include "../../../module/printcounter.h" + +#if ENABLED(SDSUPPORT) + #include "../../../libs/duration_t.h" +#endif + +#if ENABLED(AUTO_BED_LEVELING_UBL) + #include "../../../feature/bedlevel/bedlevel.h" +#endif + +// DWIN printing specifies the font on each string operation +// but we'll make the font modal for Marlin +dwin_font_t dwin_font = { font8x16, 8, 16, Color_White, Color_Bg_Black, true }; +void MarlinUI::set_font(const uint8_t font_nr) { + if (font_nr != dwin_font.index) { + dwin_font.index = font_nr; + uint8_t w, h; + switch (font_nr) { + default: + case font6x12: w = 6; h = 12; break; + case font8x16: w = 8; h = 16; break; + case font10x20: w = 10; h = 20; break; + case font12x24: w = 12; h = 24; break; + case font14x28: w = 14; h = 28; break; + case font16x32: w = 16; h = 32; break; + case font20x40: w = 20; h = 40; break; + case font24x48: w = 24; h = 48; break; + case font28x56: w = 28; h = 56; break; + case font32x64: w = 32; h = 64; break; + } + dwin_font.width = w; + dwin_font.height = h; + // TODO: Array with dimensions, auto fit menu items, + // update char width / height of the screen based on + // new (fixed-width) font size. + } +} + +// This display is always detected +bool MarlinUI::detected() { return true; } + +// Initialize or re-initialize the LCD +void MarlinUI::init_lcd() { + DWIN_Startup(); + + // Load the assets JPG (currently just the status screen 'icon') + DWIN_JPG_CacheTo1(DWIN_MarlinUI_Assets); +} + +// This LCD should clear where it will draw anew +void MarlinUI::clear_lcd() { + DWIN_ICON_AnimationControl(0x0000); // disable all icon animations + DWIN_Frame_Clear(Color_Bg_Black); + DWIN_UpdateLCD(); + + did_first_redraw = false; +} + +#if ENABLED(SHOW_BOOTSCREEN) + + void MarlinUI::show_bootscreen() { + clear_lcd(); + dwin_string.set(F(SHORT_BUILD_VERSION)); + + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + #define LOGO_CENTER ((LCD_PIXEL_WIDTH) / 2) + #define INFO_CENTER LOGO_CENTER + #define VERSION_Y 330 + DWIN_ICON_Show(BOOT_ICON, ICON_MarlinBoot, LOGO_CENTER - 266 / 2, 15); + DWIN_ICON_Show(BOOT_ICON, ICON_OpenSource, LOGO_CENTER - 174 / 2, 280); + DWIN_ICON_Show(BOOT_ICON, ICON_GitHubURL, LOGO_CENTER - 180 / 2, 420); + DWIN_ICON_Show(BOOT_ICON, ICON_MarlinURL, LOGO_CENTER - 100 / 2, 440); + DWIN_ICON_Show(BOOT_ICON, ICON_Copyright, LOGO_CENTER - 126 / 2, 460); + #else + #define LOGO_CENTER (280 / 2) + #define INFO_CENTER ((LCD_PIXEL_WIDTH) - 200 / 2) + #define VERSION_Y 84 + DWIN_ICON_Show(BOOT_ICON, ICON_MarlinBoot, LOGO_CENTER - 266 / 2, 15); + DWIN_ICON_Show(BOOT_ICON, ICON_OpenSource, INFO_CENTER - 174 / 2, 60); + DWIN_ICON_Show(BOOT_ICON, ICON_GitHubURL, INFO_CENTER - 180 / 2, 130); + DWIN_ICON_Show(BOOT_ICON, ICON_MarlinURL, INFO_CENTER - 100 / 2, 152); + DWIN_ICON_Show(BOOT_ICON, ICON_Copyright, INFO_CENTER - 126 / 2, 200); + #endif + + DWIN_Draw_String(false, font10x20, Color_Yellow, Color_Bg_Black, INFO_CENTER - (dwin_string.length() * 10) / 2, VERSION_Y, S(dwin_string.string())); + DWIN_UpdateLCD(); + } + + void MarlinUI::bootscreen_completion(const millis_t sofar) { + if ((BOOTSCREEN_TIMEOUT) > sofar) safe_delay((BOOTSCREEN_TIMEOUT) - sofar); + clear_lcd(); + } + +#endif + +// The kill screen is displayed for unrecoverable conditions +void MarlinUI::draw_kill_screen() { + set_font(DWIN_FONT_ALERT); + DWIN_Frame_Clear(Color_Bg_Black); + dwin_font.fg = Color_Error_Red; + dwin_font.solid = false; + DWIN_Draw_Rectangle(1, Color_Bg_Window, 20, 20, LCD_PIXEL_WIDTH - 20, LCD_PIXEL_HEIGHT - 20); + // make the frame a few pixels thick + DWIN_Draw_Rectangle(0, Color_Yellow, 20, 20, LCD_PIXEL_WIDTH - 20, LCD_PIXEL_HEIGHT - 20); + DWIN_Draw_Rectangle(0, Color_Yellow, 21, 21, LCD_PIXEL_WIDTH - 21, LCD_PIXEL_HEIGHT - 21); + DWIN_Draw_Rectangle(0, Color_Yellow, 22, 22, LCD_PIXEL_WIDTH - 22, LCD_PIXEL_HEIGHT - 22); + + uint8_t cx = (LCD_PIXEL_WIDTH / dwin_font.width / 2), + cy = (LCD_PIXEL_HEIGHT / dwin_font.height / 2); + + #if ENABLED(DWIN_MARLINUI_LANDSCAPE) + cx += (96 / 2 / dwin_font.width); + DWIN_ICON_Show(ICON, ICON_Halted, 40, (LCD_PIXEL_HEIGHT - 96) / 2); + #else + DWIN_ICON_Show(ICON, ICON_Halted, (LCD_PIXEL_WIDTH - 96) / 2, 40); + #endif + + uint8_t slen = utf8_strlen(status_message); + lcd_moveto(cx - (slen / 2), cy - 1); + lcd_put_u8str(status_message); + + slen = utf8_strlen(S(GET_TEXT_F(MSG_HALTED))); + lcd_moveto(cx - (slen / 2), cy); + lcd_put_u8str_P((const char*)GET_TEXT_F(MSG_HALTED)); + + slen = utf8_strlen(S(GET_TEXT_F(MSG_HALTED))); + lcd_moveto(cx - (slen / 2), cy + 1); + lcd_put_u8str_P((const char*)GET_TEXT_F(MSG_HALTED)); +} + +// +// Status Message +// +void MarlinUI::draw_status_message(const bool blink) { + set_font(DWIN_FONT_STAT); + dwin_font.solid = true; + dwin_font.fg = Color_White; + dwin_font.bg = Color_Bg_Black; + lcd_moveto_xy(0, LCD_PIXEL_HEIGHT - (STAT_FONT_HEIGHT) - 1); + + constexpr uint8_t max_status_chars = (LCD_PIXEL_WIDTH) / (STAT_FONT_WIDTH); + + auto status_changed = []{ + static uint16_t old_hash = 0x0000; + uint16_t hash = 0x0000; + for (uint8_t i = 0; i < MAX_MESSAGE_LENGTH; i++) { + const char c = ui.status_message[i]; + if (!c) break; + hash = ((hash << 1) | (hash >> 15)) ^ c; + } + const bool hash_changed = hash != old_hash; + old_hash = hash; + return hash_changed || !ui.did_first_redraw; + }; + + #if ENABLED(STATUS_MESSAGE_SCROLLING) + static bool last_blink = false; + + // Get the UTF8 character count of the string + uint8_t slen = utf8_strlen(status_message); + + // If the string fits into the LCD, just print it and do not scroll it + if (slen <= max_status_chars) { + + if (status_changed()) { + + // The string isn't scrolling and may not fill the screen + lcd_put_u8str(status_message); + + // Fill the rest with spaces + while (slen < max_status_chars) { lcd_put_wchar(' '); ++slen; } + } + } + else { + // String is larger than the available line space + + // Get a pointer to the next valid UTF8 character + // and the string remaining length + uint8_t rlen; + const char *stat = status_and_len(rlen); + lcd_put_u8str_max(stat, max_status_chars); + + // If the string doesn't completely fill the line... + if (rlen < max_status_chars) { + lcd_put_wchar('.'); // Always at 1+ spaces left, draw a dot + uint8_t chars = max_status_chars - rlen; // Amount of space left in characters + if (--chars) { // Draw a second dot if there's space + lcd_put_wchar('.'); + if (--chars) + lcd_put_u8str_max(status_message, chars); // Print a second copy of the message + } + } + + if (last_blink != blink) { + last_blink = blink; + advance_status_scroll(); + } + } + + #else + + UNUSED(blink); + + if (status_changed()) { + // Get the UTF8 character count of the string + uint8_t slen = utf8_strlen(status_message); + + // Just print the string to the LCD + lcd_put_u8str_max(status_message, max_status_chars); + + // Fill the rest with spaces if there are missing spaces + while (slen < max_status_chars) { lcd_put_wchar(' '); ++slen; } + } + + #endif +} + +#if HAS_LCD_BRIGHTNESS + void MarlinUI::_set_brightness() { DWIN_LCD_Brightness(backlight ? brightness : 0); } +#endif + +#if HAS_LCD_MENU + + #include "../../menu/menu.h" + + #if ENABLED(ADVANCED_PAUSE_FEATURE) + + void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) { + + dwin_font.solid = false; + dwin_font.fg = Color_White; + dwin_string.set("E"); + dwin_string.add('1' + extruder); + dwin_string.add(' '); + dwin_string.add(i16tostr3rj(thermalManager.degHotend(extruder))); + dwin_string.add('/'); + if (get_blink() || !thermalManager.heater_idle[thermalManager.idle_index_for_id(extruder)].timed_out) + dwin_string.add(i16tostr3rj(thermalManager.degTargetHotend(extruder))); + else + dwin_string.add(PSTR(" ")); + + lcd_moveto(LCD_WIDTH - dwin_string.length(), row); + lcd_put_dwin_string(); + } + + #endif + + // Set the colors for a menu item based on whether it is selected + static bool mark_as_selected(const uint8_t row, const bool sel, const bool is_static=false) { + const dwin_coord_t y = row * (MENU_LINE_HEIGHT) + 1; + if (y >= LCD_PIXEL_HEIGHT) return false; + + if (is_static && sel) + DWIN_Draw_Box(1, Color_Bg_Heading, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1); + else { + #if ENABLED(MENU_HOLLOW_FRAME) + DWIN_Draw_Box(1, Color_Bg_Black, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1); + if (sel) DWIN_Draw_Box(0, Select_Color, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1); + #else + DWIN_Draw_Box(1, sel ? Select_Color : Color_Bg_Black, 0, y, LCD_PIXEL_WIDTH, MENU_LINE_HEIGHT - 1); + #endif + } + + return true; + } + + // Draw a static line of text in the same idiom as a menu item + + void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) { + // Call mark_as_selected to draw a bigger selection box + // and draw the text without a background + if (mark_as_selected(row, (bool)(style & SS_INVERT), true)) { + ui.set_font(DWIN_FONT_MENU); + dwin_font.solid = false; + dwin_font.fg = Color_White; + + dwin_string.set(); + const int8_t plen = pstr ? utf8_strlen_P(pstr) : 0, + vlen = vstr ? utf8_strlen(vstr) : 0; + if (style & SS_CENTER) { + int8_t pad = (LCD_WIDTH - 1 - plen - vlen) / 2; + while (--pad) dwin_string.add(' '); + } + + if (plen) dwin_string.add((uint8_t*)pstr, itemIndex, (uint8_t*)itemString); + if (vlen) dwin_string.add((uint8_t*)vstr); + if (style & SS_CENTER) { + int8_t pad = (LCD_WIDTH - 1 - plen - vlen) / 2; + while (--pad) dwin_string.add(' '); + } + + lcd_moveto(1, row); + lcd_put_dwin_string(); + } + } + + // Draw a generic menu item + void MenuItemBase::_draw(const bool sel, const uint8_t row, PGM_P const pstr, const char, const char post_char) { + if (mark_as_selected(row, sel)) { + ui.set_font(DWIN_FONT_MENU); + dwin_font.solid = false; + dwin_font.fg = Color_White; + + dwin_string.set(pstr, itemIndex, itemString); + + pixel_len_t n = LCD_WIDTH - 1 - dwin_string.length(); + while (--n > 1) dwin_string.add(' '); + + dwin_string.add(post_char); + + lcd_moveto(1, row); + lcd_put_dwin_string(); + } + } + + // + // Draw a menu item with an editable value + // + void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm) { + if (mark_as_selected(row, sel)) { + ui.set_font(DWIN_FONT_MENU); + dwin_font.solid = false; + dwin_font.fg = Color_White; + + const uint8_t vallen = (pgm ? utf8_strlen_P(data) : utf8_strlen(S(data))); + + dwin_string.set(pstr, itemIndex, itemString); + if (vallen) dwin_string.add(':'); + + lcd_moveto(1, row); + lcd_put_dwin_string(); + + if (vallen) { + dwin_font.fg = Color_Yellow; + dwin_string.set(data); + lcd_moveto(LCD_WIDTH - vallen - 1, row); + lcd_put_dwin_string(); + } + } + } + + // + // Draw an edit screen with label and current value + // + void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { + ui.encoder_direction_normal(); + + const dwin_coord_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value); + + dwin_string.set(); + dwin_string.add((uint8_t*)pstr, itemIndex); + if (vallen) dwin_string.add(':'); // If a value is included, add a colon + + // Assume the label is alpha-numeric (with a descender) + const uint16_t row = (LCD_HEIGHT / 2) - 1; + + dwin_font.fg = Color_White; + dwin_font.solid = true; + lcd_moveto((LCD_WIDTH - labellen + !!vallen) / 2, row); + lcd_put_dwin_string(); + + // If a value is included, print the value in larger text below the label + if (vallen) { + dwin_string.set(); + dwin_string.add(value); + + const dwin_coord_t by = (row * MENU_LINE_HEIGHT) + MENU_FONT_HEIGHT + EXTRA_ROW_HEIGHT / 2; + DWIN_Draw_String(true, font16x32, Color_Yellow, Color_Bg_Black, (LCD_PIXEL_WIDTH - vallen * 16) / 2, by, S(dwin_string.string())); + + extern screenFunc_t _manual_move_func_ptr; + if (ui.currentScreen != _manual_move_func_ptr && !ui.external_control) { + + const dwin_coord_t slider_length = LCD_PIXEL_WIDTH - TERN(DWIN_MARLINUI_LANDSCAPE, 120, 20), + slider_height = 16, + slider_x = (LCD_PIXEL_WIDTH - slider_length) / 2, + slider_y = by + 32 + 4, + amount = ui.encoderPosition * slider_length / maxEditValue; + + DWIN_Draw_Rectangle(1, Color_Bg_Window, slider_x - 1, slider_y - 1, slider_x - 1 + slider_length + 2 - 1, slider_y - 1 + slider_height + 2 - 1); + if (amount > 0) + DWIN_Draw_Box(1, BarFill_Color, slider_x, slider_y, amount, slider_height); + if (amount < slider_length) + DWIN_Draw_Box(1, Color_Bg_Black, slider_x + amount, slider_y, slider_length - amount, slider_height); + } + } + } + + inline void draw_boxed_string(const bool yesopt, PGM_P const pstr, const bool inv) { + const uint8_t len = utf8_strlen_P(pstr), + mar = TERN(DWIN_MARLINUI_PORTRAIT, 1, 4), + col = yesopt ? LCD_WIDTH - mar - len : mar, + row = (LCD_HEIGHT >= 8 ? LCD_HEIGHT / 2 + 3 : LCD_HEIGHT - 1); + lcd_moveto(col, row); + DWIN_Draw_Box(1, inv ? Select_Color : Color_Bg_Black, cursor.x - dwin_font.width, cursor.y + 1, dwin_font.width * (len + 2), dwin_font.height + 2); + lcd_put_u8str_P(col, row, pstr); + } + + void MenuItem_confirm::draw_select_screen( + PGM_P const yes, PGM_P const no, const bool yesno, + PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/ + ) { + ui.set_font(DWIN_FONT_MENU); + dwin_font.solid = false; + dwin_font.fg = Color_White; + ui.draw_select_screen_prompt(pref, string, suff); + draw_boxed_string(false, no, !yesno); + draw_boxed_string(true, yes, yesno); + } + + #if ENABLED(SDSUPPORT) + + void MenuItem_sdbase::draw(const bool sel, const uint8_t row, PGM_P const, CardReader &theCard, const bool isDir) { + if (mark_as_selected(row, sel)) { + dwin_string.set(); + + uint8_t maxlen = LCD_WIDTH - 1; + if (isDir) { + dwin_string.add(LCD_STR_FOLDER " "); + maxlen -= 2; + } + + dwin_string.add((uint8_t*)ui.scrolled_filename(theCard, maxlen, row, sel), maxlen); + uint8_t n = maxlen - dwin_string.length(); + while (n > 0) { dwin_string.add(' '); --n; } + lcd_moveto(1, row); + lcd_put_dwin_string(); + } + } + + #endif // SDSUPPORT + + #if ENABLED(AUTO_BED_LEVELING_UBL) + + /** + * UBL LCD "radar" map data + */ + #define MAP_UPPER_LEFT_CORNER_X 5 // These probably should be moved to the .h file But for now, + #define MAP_UPPER_LEFT_CORNER_Y 5 // it is easier to play with things having them here + #define MAP_MAX_PIXELS_X 262 // 272 - 10 + #define MAP_MAX_PIXELS_Y 262 + + void MarlinUI::ubl_plot(const uint8_t x_plot, const uint8_t y_plot) { + // Scale the box pixels appropriately + dwin_coord_t x_map_pixels = ((MAP_MAX_PIXELS_X - 4) / (GRID_MAX_POINTS_X)) * (GRID_MAX_POINTS_X), + y_map_pixels = ((MAP_MAX_PIXELS_Y - 4) / (GRID_MAX_POINTS_Y)) * (GRID_MAX_POINTS_Y), + + pixels_per_x_mesh_pnt = x_map_pixels / (GRID_MAX_POINTS_X), + pixels_per_y_mesh_pnt = y_map_pixels / (GRID_MAX_POINTS_Y), + + x_offset = MAP_UPPER_LEFT_CORNER_X + 1 + (MAP_MAX_PIXELS_X - x_map_pixels - 2) / 2, + y_offset = MAP_UPPER_LEFT_CORNER_Y + 1 + (MAP_MAX_PIXELS_Y - y_map_pixels - 2) / 2; + + // Clear the Mesh Map + + // First draw the bigger box in White so we have a border around the mesh map box + DWIN_Draw_Rectangle(1, Color_White, x_offset - 2, y_offset - 2, x_offset + 2 + x_map_pixels, y_offset + 2 + y_map_pixels); + // Now actually clear the mesh map box + DWIN_Draw_Rectangle(1, Color_Bg_Black, x_offset, y_offset, x_offset + x_map_pixels, y_offset + y_map_pixels); + + // Fill in the Specified Mesh Point + + const uint8_t y_plot_inv = (GRID_MAX_POINTS_Y - 1) - y_plot; // The origin is typically in the lower right corner. We need to + // invert the Y to get it to plot in the right location. + + const dwin_coord_t by = y_offset + y_plot_inv * pixels_per_y_mesh_pnt; + DWIN_Draw_Rectangle(1, Select_Color, + x_offset + (x_plot * pixels_per_x_mesh_pnt), by, + x_offset + (x_plot * pixels_per_x_mesh_pnt) + pixels_per_x_mesh_pnt, by + pixels_per_y_mesh_pnt + ); + + // Display Mesh Point Locations + const dwin_coord_t sx = x_offset + pixels_per_x_mesh_pnt / 2; + dwin_coord_t y = y_offset + pixels_per_y_mesh_pnt / 2; + for (uint8_t j = 0; j < GRID_MAX_POINTS_Y; j++, y += pixels_per_y_mesh_pnt) + for (uint8_t i = 0, x = sx; i < GRID_MAX_POINTS_X; i++, x += pixels_per_x_mesh_pnt) + DWIN_Draw_Point(Color_White, 1, 1, x, y); + + // Put Relevant Text on Display + + // Show X and Y positions at top of screen + dwin_font.fg = Color_White; + dwin_font.solid = true; + const xy_pos_t pos = { ubl.mesh_index_to_xpos(x_plot), ubl.mesh_index_to_ypos(y_plot) }, + lpos = pos.asLogical(); + + lcd_moveto( + TERN(DWIN_MARLINUI_LANDSCAPE, ((x_offset + x_map_pixels) / MENU_FONT_WIDTH) + 2, 1), + TERN(DWIN_MARLINUI_LANDSCAPE, 1, ((y_offset + y_map_pixels) / MENU_LINE_HEIGHT) + 1) + ); + lcd_put_u8str_P(X_LBL); + lcd_put_u8str(ftostr52(lpos.x)); + lcd_moveto( + TERN(DWIN_MARLINUI_LANDSCAPE, ((x_offset + x_map_pixels) / MENU_FONT_WIDTH) + 2, 1), + TERN(DWIN_MARLINUI_LANDSCAPE, 3, ((y_offset + y_map_pixels) / MENU_LINE_HEIGHT) + 2) + ); + lcd_put_u8str_P(Y_LBL); + lcd_put_u8str(ftostr52(lpos.y)); + + // Print plot position + dwin_string.set("("); + dwin_string.add(i8tostr3rj(x_plot)); + dwin_string.add(","); + dwin_string.add(i8tostr3rj(y_plot)); + dwin_string.add(")"); + lcd_moveto( + TERN(DWIN_MARLINUI_LANDSCAPE, ((x_offset + x_map_pixels) / MENU_FONT_WIDTH) + 2, LCD_WIDTH - dwin_string.length()), + TERN(DWIN_MARLINUI_LANDSCAPE, LCD_HEIGHT - 2, ((y_offset + y_map_pixels) / MENU_LINE_HEIGHT) + 1) + ); + lcd_put_dwin_string(); + + // Show the location value + dwin_string.set(Z_LBL); + if (!isnan(Z_VALUES_ARR[x_plot][y_plot])) + dwin_string.add(ftostr43sign(Z_VALUES_ARR[x_plot][y_plot])); + else + dwin_string.add(PSTR(" -----")); + lcd_moveto( + TERN(DWIN_MARLINUI_LANDSCAPE, ((x_offset + x_map_pixels) / MENU_FONT_WIDTH) + 2, LCD_WIDTH - dwin_string.length()), + TERN(DWIN_MARLINUI_LANDSCAPE, LCD_HEIGHT - 1, ((y_offset + y_map_pixels) / MENU_LINE_HEIGHT) + 2) + ); + lcd_put_dwin_string(); + } + + #endif // AUTO_BED_LEVELING_UBL + + #if ANY(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) + + void MarlinUI::zoffset_overlay(const int8_t dir) { + const int rot_up = TERN(OVERLAY_GFX_REVERSE, ICON_RotateCCW, ICON_RotateCW), + rot_down = TERN(OVERLAY_GFX_REVERSE, ICON_RotateCW, ICON_RotateCCW); + + const int nozzle = (LCD_PIXEL_WIDTH / 2) - 20; + + // Draw a representation of the nozzle + DWIN_Draw_Box(1, Color_Bg_Black, nozzle + 3, 8, 48, 52); // 'clear' the area where the nozzle is drawn in case it was moved up/down + DWIN_ICON_Show(ICON, ICON_HotendOff, nozzle + 3, 10 - dir); + DWIN_ICON_Show(ICON, ICON_BedLine, nozzle, 10 + 36); + + // Draw cw/ccw indicator and up/down arrows + const int arrow_y = LCD_PIXEL_HEIGHT / 2 - 24; + DWIN_ICON_Show(ICON, ICON_DownArrow, 0, arrow_y - dir); + DWIN_ICON_Show(ICON, rot_down, 48, arrow_y); + + DWIN_ICON_Show(ICON, ICON_UpArrow, LCD_PIXEL_WIDTH - 10 - (48*2), arrow_y - dir); + DWIN_ICON_Show(ICON, rot_up, LCD_PIXEL_WIDTH - 10 - 48, arrow_y); + } + + #endif // BABYSTEP_ZPROBE_GFX_OVERLAY || MESH_EDIT_GFX_OVERLAY + +#endif // HAS_LCD_MENU + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp new file mode 100644 index 000000000000..703db2ee45de --- /dev/null +++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp @@ -0,0 +1,391 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if IS_DWIN_MARLINUI + +#include "marlinui_dwin.h" +#include "dwin_lcd.h" +#include "dwin_string.h" +#include "lcdprint_dwin.h" + +#include "../../fontutils.h" +#include "../../../libs/numtostr.h" +#include "../../marlinui.h" + +#include "../../../sd/cardreader.h" +#include "../../../module/motion.h" +#include "../../../module/temperature.h" +#include "../../../module/printcounter.h" + +#if ENABLED(SDSUPPORT) + #include "../../../libs/duration_t.h" +#endif + +#if ENABLED(LCD_SHOW_E_TOTAL) + #include "../../../MarlinCore.h" // for printingIsActive +#endif + +#define STATUS_HEATERS_X 15 +#define STATUS_HEATERS_Y 56 +#define STATUS_HEATERS_XSPACE 64 +#define STATUS_FAN_WIDTH 48 +#define STATUS_FAN_HEIGHT 48 +#define STATUS_FAN_Y STATUS_HEATERS_Y + 22 +#define STATUS_CHR_WIDTH 14 +#define STATUS_CHR_HEIGHT 28 + +// +// Before homing, blink '123' <-> '???'. +// Homed but unknown... '123' <-> ' '. +// Homed and known, display constantly. +// +FORCE_INLINE void _draw_axis_value(const AxisEnum axis, const char *value, const bool blink, const uint16_t x, const uint16_t y) { + uint8_t vallen = utf8_strlen(value); + + if (!ui.did_first_redraw) { + dwin_string.set(); + dwin_string.add('X' + axis); + DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x + (vallen * 14 - 14) / 2, y + 2, S(dwin_string.string())); + } + + dwin_string.set(); + if (blink) + dwin_string.add(value); + else { + if (!TEST(axis_homed, axis)) + while (const char c = *value++) dwin_string.add(c <= '.' ? c : '?'); + else { + #if NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) + if (!TEST(axis_trusted, axis)) + dwin_string.add(TERN1(DWIN_MARLINUI_PORTRAIT, axis == Z_AXIS) ? PSTR(" ") : PSTR(" ")); + else + #endif + dwin_string.add(value); + } + } + + // For E_TOTAL there may be some characters to cover up + if (BOTH(DWIN_MARLINUI_PORTRAIT, LCD_SHOW_E_TOTAL) && axis == X_AXIS) + dwin_string.add(" "); + + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 32, S(dwin_string.string())); +} + +#if ENABLED(LCD_SHOW_E_TOTAL) + + FORCE_INLINE void _draw_e_value(const_float_t value, const uint16_t x, const uint16_t y) { + const uint8_t scale = value >= 100000.0f ? 10 : 1; // show cm after 99,999mm + + if (!ui.did_first_redraw) { + // Extra spaces so we don't have to clear the 'Y' label separately + dwin_string.set("E "); + DWIN_Draw_String(true, font16x32, Color_IconBlue, Color_Bg_Black, x + (4 * 14 / 2) - 7, y + 2, S(dwin_string.string())); + } + + dwin_string.set(ui16tostr5rj(value / scale)); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 32, S(dwin_string.string())); + + // Extra spaces so we don't have to clear out the Y value separately + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, x + (5 * 14), y + 32, S(scale == 1 ? "mm " : "cm ")); + } + +#endif + +// +// Fan Icon and Percentage +// +FORCE_INLINE void _draw_fan_status(const uint16_t x, const uint16_t y) { + const uint16_t fanx = (4 * STATUS_CHR_WIDTH - STATUS_FAN_WIDTH) / 2; + const uint8_t fan_pct = thermalManager.scaledFanSpeedPercent(0); + const bool fan_on = !!fan_pct; + if (fan_on) { + DWIN_ICON_Animation(0, fan_on, ICON, ICON_Fan0, ICON_Fan3, x + fanx, y, 25); + dwin_string.set(i8tostr3rj(fan_pct)); + dwin_string.add('%'); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); + } + else { + DWIN_ICON_Show(ICON, ICON_Fan0, x + fanx, y); + dwin_string.set(PSTR(" ")); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + STATUS_FAN_HEIGHT, S(dwin_string.string())); + } +} + +#if HOTENDS > 2 + #define HOTEND_STATS 3 +#elif HOTENDS > 1 + #define HOTEND_STATS 2 +#elif HAS_HOTEND + #define HOTEND_STATS 1 +#endif + +/** + * Draw a single heater icon with current and target temperature, at the given XY + */ +FORCE_INLINE void _draw_heater_status(const heater_id_t heater, const uint16_t x, const uint16_t y) { + + #if HAS_HOTEND + static celsius_t old_temp[HOTEND_STATS] = ARRAY_N_1(HOTEND_STATS, 500), + old_target[HOTEND_STATS] = ARRAY_N_1(HOTEND_STATS, 500); + static bool old_on[HOTEND_STATS] = ARRAY_N_1(HOTEND_STATS, false); + #endif + + #if HAS_HEATED_BED + static celsius_t old_bed_temp = 500, old_bed_target = 500; + static bool old_bed_on = false; + #endif + + #if HAS_HOTEND && HAS_HEATED_BED + const bool isBed = heater < 0; + const float tc = (isBed ? thermalManager.degBed() : thermalManager.degHotend(heater)), + tt = (isBed ? thermalManager.degTargetBed() : thermalManager.degTargetHotend(heater)); + const uint8_t ta = isBed ? thermalManager.isHeatingBed() : thermalManager.isHeatingHotend(heater); + const bool c_draw = tc != (isBed ? old_bed_temp : old_temp[heater]), + t_draw = tt != (isBed ? old_bed_target : old_target[heater]), + i_draw = ta != (isBed ? old_bed_on : old_on[heater]); + if (isBed) { old_bed_temp = tc; old_bed_target = tt; old_bed_on = ta; } + else { old_temp[heater] = tc; old_target[heater] = tt; old_on[heater] = ta; } + #elif HAS_HOTEND + constexpr bool isBed = false; + const float tc = thermalManager.degHotend(heater), tt = thermalManager.degTargetHotend(heater); + const uint8_t ta = thermalManager.isHeatingHotend(heater); + const bool c_draw = tc != old_bed_temp, t_draw = tt != old_bed_target, i_draw = ta != old_bed_on; + old_temp[heater] = tc; old_target[heater] = tt; old_on[heater] = ta; + #elif HAS_HEATED_BED + constexpr bool isBed = true; + const float tc = thermalManager.degBed(), tt = thermalManager.degTargetBed(); + const uint8_t ta = thermalManager.isHeatingBed(); + const bool c_draw = tc != old_temp[heater], t_draw = tt != old_target[heater], i_draw = ta != old_on[heater]; + old_bed_temp = tc; old_bed_target = tt; old_bed_on = ta; + #endif + + if (!ui.did_first_redraw || t_draw) { + dwin_string.set(i16tostr3rj(tt + 0.5)); + dwin_string.add(LCD_STR_DEGREE); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y, S(dwin_string.string())); + } + + if (!ui.did_first_redraw || i_draw) + DWIN_ICON_Show(ICON, (isBed ? ICON_BedOff : ICON_HotendOff) + ta, x, y + STATUS_CHR_HEIGHT + 2); + + if (!ui.did_first_redraw || c_draw) { + dwin_string.set(i16tostr3rj(tc + 0.5)); + dwin_string.add(LCD_STR_DEGREE); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x, y + 70, S(dwin_string.string())); + } +} + +/** + * Draw the current "feed rate" percentage preceded by the >> character + */ +FORCE_INLINE void _draw_feedrate_status(const char *value, uint16_t x, uint16_t y) { + if (!ui.did_first_redraw) { + dwin_string.set(LCD_STR_FEEDRATE); + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, x, y, S(dwin_string.string())); + } + + dwin_string.set(value); + dwin_string.add(PSTR("%")); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, x + 14, y, S(dwin_string.string())); +} + +/** + * Draw the MarlinUI Status Screen for Ender 3 V2 + */ +void MarlinUI::draw_status_screen() { + const bool blink = get_blink(); + + // Draw elements that never change + if (!ui.did_first_redraw) { + // Logo/Status Icon + #define STATUS_LOGO_WIDTH 128 + #define STATUS_LOGO_HEIGHT 40 + DWIN_ICON_Show(ICON, ICON_LOGO_Marlin, (LCD_PIXEL_WIDTH - (STATUS_LOGO_WIDTH)) / 2, ((STATUS_HEATERS_Y - 4) - (STATUS_LOGO_HEIGHT)) / 2); + + // Draw a frame around the x/y/z values + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + DWIN_Draw_Rectangle(0, Select_Color, 0, 193, LCD_PIXEL_WIDTH, 260); + #else + //DWIN_Draw_Rectangle(0, Select_Color, LCD_PIXEL_WIDTH - 106, 50, LCD_PIXEL_WIDTH - 1, 230); + #endif + } + + uint16_t hx = STATUS_HEATERS_X; + #if HAS_HOTEND + _draw_heater_status(H_E0, hx, STATUS_HEATERS_Y); + hx += STATUS_HEATERS_XSPACE; + #endif + #if HAS_MULTI_HOTEND + _draw_heater_status(H_E1, hx, STATUS_HEATERS_Y); + hx += STATUS_HEATERS_XSPACE; + #endif + #if HAS_HEATED_BED + _draw_heater_status(H_BED, hx, STATUS_HEATERS_Y); + #endif + + #if HAS_FAN + // Fan display, pinned to the right side + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + _draw_fan_status(LCD_PIXEL_WIDTH - STATUS_CHR_WIDTH * 4, STATUS_FAN_Y); + #else + _draw_fan_status(212, STATUS_FAN_Y); + #endif + #endif + + // Axis values + const xyz_pos_t lpos = current_position.asLogical(); + const bool show_e_total = TERN0(LCD_SHOW_E_TOTAL, printingIsActive()); UNUSED(show_e_total); + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + constexpr int16_t cpy = 195; + if (show_e_total) { + TERN_(LCD_SHOW_E_TOTAL, _draw_e_value(e_move_accumulator, 6, cpy)); + } + else { + _draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink, 6, cpy); + TERN_(HAS_Y_AXIS, _draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink, 95, cpy)); + } + TERN_(HAS_Z_AXIS, _draw_axis_value(Z_AXIS, ftostr52sp(lpos.z), blink, 165, cpy)); + #else + constexpr int16_t cpx = LCD_PIXEL_WIDTH - 104; + _draw_axis_value(X_AXIS, ftostr52sp(lpos.x), blink, cpx, STATUS_HEATERS_Y); + TERN_(HAS_Y_AXIS, _draw_axis_value(Y_AXIS, ftostr52sp(lpos.y), blink, cpx, STATUS_HEATERS_Y + 59)); + TERN_(HAS_Z_AXIS, _draw_axis_value(Z_AXIS, ftostr52sp(lpos.z), blink, cpx, STATUS_HEATERS_Y + 118)); + #endif + + // Feedrate + static uint16_t old_fp = 0; + if (!ui.did_first_redraw || old_fp != feedrate_percentage) { + old_fp = feedrate_percentage; + _draw_feedrate_status(i16tostr3rj(feedrate_percentage), + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + 5, 290 + #else + 294, STATUS_HEATERS_Y + #endif + ); + } + + // + // Elapsed time + // + char buffer[14]; + duration_t time; + + #if ENABLED(DWIN_MARLINUI_PORTRAIT) + + // Portrait mode only shows one value at a time, and will rotate if ROTATE_PROGRESS_DISPLAY + dwin_string.set(); + char prefix = ' '; + #if ENABLED(SHOW_REMAINING_TIME) + if (TERN1(ROTATE_PROGRESS_DISPLAY, blink) && print_job_timer.isRunning()) { + time = get_remaining_time(); + prefix = 'R'; + } + else + #endif + time = print_job_timer.duration(); + + time.toDigital(buffer); + dwin_string.add(prefix); + dwin_string.add(buffer); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, (LCD_PIXEL_WIDTH - ((dwin_string.length() + 1) * 14)), 290, S(dwin_string.string())); + + #else + + // landscape mode shows both elapsed and remaining (if SHOW_REMAINING_TIME) + time = print_job_timer.duration(); + time.toDigital(buffer); + dwin_string.set(" "); + dwin_string.add(buffer); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, 280, 100, S(dwin_string.string())); + + #if ENABLED(LCD_SHOW_E_TOTAL) + if (show_e_total && TERN1(SHOW_REMAINING_TIME, !blink)) { // if SHOW_REMAINING_TIME is also + const uint8_t escale = e_move_accumulator >= 100000.0f ? 10 : 1; // show cm after 99,000mm + + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, 249, 135, S("E")); + dwin_string.set(ui16tostr5rj(e_move_accumulator * escale)); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, 263, 135, S(dwin_string.string())); + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, 333, 135, S(escale==1 ? "mm" : "cm")); + } + #endif + #if ENABLED(SHOW_REMAINING_TIME) + if (!show_e_total || blink) { + DWIN_Draw_String(true, font14x28, Color_IconBlue, Color_Bg_Black, 249, 135, S(" R ")); + time = get_remaining_time(); + time.toDigital(buffer); + dwin_string.set(buffer); + DWIN_Draw_String(true, font14x28, Color_White, Color_Bg_Black, 291, 135, S(dwin_string.string())); + } + #endif + #endif + + // + // Progress Bar + // + constexpr int16_t pb_margin = 5, pb_left = pb_margin, pb_height = 60, + pb_right = LCD_PIXEL_WIDTH - TERN(DWIN_MARLINUI_PORTRAIT, 0, 107) - pb_margin, + pb_bottom = TERN(DWIN_MARLINUI_PORTRAIT, 410, 230), + pb_top = pb_bottom - pb_height, + pb_width = pb_right - pb_left; + + const progress_t progress = TERN(HAS_PRINT_PROGRESS_PERMYRIAD, get_progress_permyriad, get_progress_percent)(); + + if (!ui.did_first_redraw) + DWIN_Draw_Rectangle(0, Select_Color, pb_left, pb_top, pb_right, pb_bottom); // Outline + + static uint16_t old_solid = 50; + const uint16_t pb_solid = (pb_width - 2) * (progress / (PROGRESS_SCALE)) * 0.01f; + const bool p_draw = !ui.did_first_redraw || old_solid != pb_solid; + + if (p_draw) { + //if (pb_solid) + DWIN_Draw_Rectangle(1, Select_Color, pb_left + 1, pb_top + 1, pb_left + pb_solid, pb_bottom - 1); // Fill the solid part + + //if (pb_solid < old_solid) + DWIN_Draw_Rectangle(1, Color_Bg_Black, pb_left + 1 + pb_solid, pb_top + 1, pb_right - 1, pb_bottom - 1); // Erase the rest + + #if ENABLED(SHOW_SD_PERCENT) + dwin_string.set(TERN(PRINT_PROGRESS_SHOW_DECIMALS, permyriadtostr4(progress), ui8tostr3rj(progress / (PROGRESS_SCALE)))); + dwin_string.add(PSTR("%")); + DWIN_Draw_String( + false, font16x32, Percent_Color, Color_Bg_Black, + pb_left + (pb_width - dwin_string.length() * 16) / 2, + pb_top + (pb_height - 32) / 2, + S(dwin_string.string()) + ); + #endif + + old_solid = pb_solid; + } + + // + // Status Message + // + draw_status_message(blink); + + ui.did_first_redraw = true; +} + +#endif // IS_DWIN_MARLINUI diff --git a/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp new file mode 100644 index 000000000000..1339c39f3f28 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp @@ -0,0 +1,258 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/extui/anycubic_chiron/FileNavigator.cpp + * + * Extensible_UI implementation for Anycubic Chiron + * Written By Nick Wells, 2020 [https://github.com/SwiftNick] + * (not affiliated with Anycubic, Ltd.) + * + * The AC panel wants files in block of 4 and can only display a flat list + * This library allows full folder traversal or flat file display and supports both standerd and new style panels. + * + * ## Old Style TFT panel + * Supported chars {}[]-+=_"$%^&*()~<>| + * Max display length 22 chars + * Max path len 29 chars + * (DOS 8.3 filepath max 29chars) + * (long filepath Max 22) + * + * ## New TFT Panel Format file display format + * Supported chars {}[]-+=_!"$%^&*()~<>\| + * Max display length 26 chars + * Max path len 29 chars + * (DOS 8.3 filepath must end '.GCO') + * (long filepath must end '.gcode') + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(ANYCUBIC_LCD_CHIRON) +#include "FileNavigator.h" +#include "chiron_tft.h" + +using namespace ExtUI; + +#define DEBUG_OUT ACDEBUG(AC_FILE) +#include "../../../core/debug_out.h" + +namespace Anycubic { + +FileNavigator filenavigator; +FileList FileNavigator::filelist; // Instance of the Marlin file API +uint16_t FileNavigator::lastpanelindex; +uint16_t FileNavigator::currentindex; // override the panel request +uint8_t FileNavigator::currentfolderdepth; +uint16_t FileNavigator::currentfolderindex[MAX_FOLDER_DEPTH]; // track folder pos for iteration +char FileNavigator::currentfoldername[MAX_PATH_LEN + 1]; // Current folder path + +FileNavigator::FileNavigator() { reset(); } + +void FileNavigator::reset() { + DEBUG_ECHOLNPGM("reset()"); + currentfoldername[0] = '\0'; + currentfolderdepth = 0; + currentindex = 0; + lastpanelindex = 0; + ZERO(currentfolderindex); + + // Start at root folder + while (!filelist.isAtRootDir()) filelist.upDir(); + refresh(); +} + +void FileNavigator::refresh() { filelist.refresh(); } + +void FileNavigator::changeDIR(const char *folder) { + if (currentfolderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth + DEBUG_ECHOLNPGM("FD:" , folderdepth, " FP:",currentindex, " currentfolder:", currentfoldername, " enter:", folder); + currentfolderindex[currentfolderdepth] = currentindex; + strcat(currentfoldername, folder); + strcat(currentfoldername, "/"); + filelist.changeDir(folder); + currentfolderdepth++; + currentindex = 0; +} + +void FileNavigator::upDIR() { + DEBUG_ECHOLNPGM("upDIR() from D:", currentfolderdepth, " N:", currentfoldername); + if (!filelist.isAtRootDir()) { + filelist.upDir(); + currentfolderdepth--; + currentindex = currentfolderindex[currentfolderdepth]; // restore last position in the folder + filelist.seek(currentindex); // restore file information + } + + // Remove the child folder from the stored path + if (currentfolderdepth == 0) + currentfoldername[0] = '\0'; + else { + char * const pos = strchr(currentfoldername, '/'); + *(pos + 1) = '\0'; + } +} + +void FileNavigator::skiptofileindex(uint16_t skip) { + if (skip == 0) return; + while (skip > 0) { + if (filelist.seek(currentindex)) { + DEBUG_ECHOLNPGM("CI:", currentindex, " FD:", currentfolderdepth, " N:", skip, " ", filelist.longFilename()); + if (!filelist.isDir()) { + skip--; + currentindex++; + } + else + changeDIR(filelist.shortFilename()); + } // valid file + if (currentindex == filelist.count()) { + if (currentfolderdepth > 0) { + upDIR(); + currentindex++; + } + else break; // end of root folder + } // end of folder + } // files needed + // No more files available. +} + +#if ENABLED(AC_SD_FOLDER_VIEW) // SD Folder navigation + + void FileNavigator::getFiles(uint16_t index, panel_type_t paneltype, uint8_t filesneeded) { + if (index == 0) currentindex = 0; + // Each time we change folder we reset the file index to 0 and keep track + // of the current position, since the TFT panel isn't aware of folder trees. + if (index > 0) { + --currentindex; // go back a file to take account of the .. we added to the root. + if (index > lastpanelindex) + currentindex += filesneeded; + else + currentindex = currentindex < 4 ? 0 : currentindex - filesneeded; + } + lastpanelindex = index; + + DEBUG_ECHOLNPGM("index=", index, " currentindex=", currentindex); + + if (currentindex == 0 && currentfolderdepth > 0) { // Add a link to go up a folder + // The new panel ignores entries that don't end in .GCO or .gcode so add and pad them. + if (paneltype == AC_panel_new) { + TFTSer.println("<<.GCO"); + Chiron.SendtoTFTLN(PSTR(".. .gcode")); + } + else { + TFTSer.println("<<"); + TFTSer.println(".."); + } + filesneeded--; + } + + for (uint16_t seek = currentindex; seek < currentindex + filesneeded; seek++) { + if (filelist.seek(seek)) { + sendFile(paneltype); + DEBUG_ECHOLNPGM("-", seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'"); + } + } + } + + void FileNavigator::sendFile(panel_type_t paneltype) { + if (filelist.isDir()) { + // Add mandatory tags for new panel otherwise lines are ignored. + if (paneltype == AC_panel_new) { + TFTSer.print(filelist.shortFilename()); + TFTSer.println(".GCO"); + TFTSer.print(filelist.shortFilename()); + TFTSer.write('/'); + // Make sure we fill all 29 chars of the display line to clear the text buffer otherwise the last line is still visible + for (int8_t i = strlen(filelist.shortFilename()); i < 19; i++) + TFTSer.write(' '); + TFTSer.println(".gcode"); + } + else { + TFTSer.println(filelist.shortFilename()); + TFTSer.print(filelist.shortFilename()); + TFTSer.write('/'); + TFTSer.println(); + } + } + else { // Not DIR + TFTSer.write('/'); + if (currentfolderdepth > 0) TFTSer.print(currentfoldername); + TFTSer.println(filelist.shortFilename()); + TFTSer.print(filelist.longFilename()); + + // Make sure we fill all 29 chars of the display line to clear the text buffer otherwise the last line is still visible + if (paneltype == AC_panel_new) + for (int8_t i = strlen(filelist.longFilename()); i < 26; i++) + TFTSer.write(' '); + + TFTSer.println(); + } + } // AC_SD_FOLDER_VIEW + +#else // Flat file list + + void FileNavigator::getFiles(uint16_t index, panel_type_t paneltype, uint8_t filesneeded) { + DEBUG_ECHOLNPGM("getFiles() I:", index," L:", lastpanelindex); + // if we're searching backwards, jump back to start and search forward + if (index < lastpanelindex) { + reset(); + skiptofileindex(index); + } + lastpanelindex = index; + + while (filesneeded > 0) { + if (filelist.seek(currentindex)) { + if (!filelist.isDir()) { + sendFile(paneltype); + filesneeded--; + currentindex++; + } + else + changeDIR(filelist.shortFilename()); + } // valid file + + if (currentindex == filelist.count()) { + if (currentfolderdepth > 0) { + upDIR(); + currentindex++; + } + else break; // end of root folder + } // end of folder + } // files needed + // No more files available. + } + + void FileNavigator::sendFile(panel_type_t paneltype) { + TFTSer.write('/'); + if (currentfolderdepth > 0) TFTSer.print(currentfoldername); + TFTSer.println(filelist.shortFilename()); + if (currentfolderdepth > 0) TFTSer.print(currentfoldername); + TFTSer.println(filelist.longFilename()); + DEBUG_ECHOLNPGM("/", currentfoldername, "", filelist.shortFilename(), " ", filelist.longFilename()); + } + +#endif // Flat file list + +} // Anycubic namespace + +#endif // ANYCUBIC_LCD_CHIRON diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.h similarity index 61% rename from Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h rename to Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.h index 8e03614a4649..ca4283f54ba3 100644 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h +++ b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.h @@ -22,7 +22,7 @@ #pragma once /** - * lcd/extui/lib/FileNavigator.h + * lcd/extui/anycubic_chiron/FileNavigator.h * * Extensible_UI implementation for Anycubic Chiron * Written By Nick Wells, 2020 [https://github.com/SwiftNick] @@ -30,27 +30,32 @@ */ #include "chiron_tft_defs.h" -#include "../../ui_api.h" +#include "../ui_api.h" using namespace ExtUI; namespace Anycubic { - class FileNavigator { - public: - FileNavigator(); - void reset(); - void getFiles(uint16_t); - void upDIR(); - void changeDIR(char *); - void sendFile(); - void refresh(); - char * getCurrentFolderName(); - private: - static FileList filelist; - static char currentfoldername[MAX_PATH_LEN]; - static uint16_t lastindex; - static uint8_t folderdepth; - static uint16_t currentindex; - }; - extern FileNavigator filenavigator; + +class FileNavigator { + public: + FileNavigator(); + static void reset(); + static void getFiles(uint16_t, panel_type_t, uint8_t filesneeded=4); + static void upDIR(); + static void changeDIR(const char *); + static void sendFile(panel_type_t); + static void refresh(); + static void skiptofileindex(uint16_t); + + static FileList filelist; + private: + static uint16_t lastpanelindex; + static uint16_t currentindex; + static uint8_t currentfolderdepth; + static uint16_t currentfolderindex[MAX_FOLDER_DEPTH]; + static char currentfoldername[MAX_PATH_LEN + 1]; +}; + +extern FileNavigator filenavigator; + } diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/Tunes.cpp b/Marlin/src/lcd/extui/anycubic_chiron/Tunes.cpp similarity index 94% rename from Marlin/src/lcd/extui/lib/anycubic_chiron/Tunes.cpp rename to Marlin/src/lcd/extui/anycubic_chiron/Tunes.cpp index f09c4db3f283..f228c471c9ca 100644 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/Tunes.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/Tunes.cpp @@ -21,7 +21,7 @@ */ /** - * lcd/extui/lib/Tunes.cpp + * lcd/extui/anycubic_chiron/Tunes.cpp * * Extensible_UI implementation for Anycubic Chiron * Written By Nick Wells, 2020 [https://github.com/SwiftNick] @@ -33,12 +33,12 @@ * See Tunes.h for note and tune definitions. * ***********************************************************************/ -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if ENABLED(ANYCUBIC_LCD_CHIRON) #include "Tunes.h" -#include "../../ui_api.h" +#include "../ui_api.h" namespace Anycubic { diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/Tunes.h b/Marlin/src/lcd/extui/anycubic_chiron/Tunes.h similarity index 99% rename from Marlin/src/lcd/extui/lib/anycubic_chiron/Tunes.h rename to Marlin/src/lcd/extui/anycubic_chiron/Tunes.h index 1bafec43adf3..bf2e92d03e53 100644 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/Tunes.h +++ b/Marlin/src/lcd/extui/anycubic_chiron/Tunes.h @@ -22,7 +22,7 @@ #pragma once /** - * lcd/extui/lib/Tunes.h + * lcd/extui/anycubic_chiron/Tunes.h * * Extensible_UI implementation for Anycubic Chiron * Written By Nick Wells, 2020 [https://github.com/SwiftNick] diff --git a/Marlin/src/lcd/extui/anycubic_chiron_lcd.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp similarity index 86% rename from Marlin/src/lcd/extui/anycubic_chiron_lcd.cpp rename to Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp index 06baa4c19d11..5cd09228009c 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp @@ -21,17 +21,17 @@ */ /** - * lcd/extui/anycubic_chiron_lcd.cpp + * lcd/extui/anycubic_chiron/chiron_extui.cpp * * Anycubic Chiron TFT support for Marlin */ -#include "../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if ENABLED(ANYCUBIC_LCD_CHIRON) -#include "ui_api.h" -#include "lib/anycubic_chiron/chiron_tft.h" +#include "../ui_api.h" +#include "chiron_tft.h" using namespace Anycubic; @@ -74,7 +74,7 @@ namespace ExtUI { // into buff. // Example: - // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // static_assert(sizeof(myDataStruct) <= eeprom_data_size); // memcpy(buff, &myDataStruct, sizeof(myDataStruct)); } @@ -84,10 +84,14 @@ namespace ExtUI { // from buff // Example: - // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // static_assert(sizeof(myDataStruct) <= eeprom_data_size); // memcpy(&myDataStruct, buff, sizeof(myDataStruct)); } + void onPostprocessSettings() { + // Called after loading or resetting stored settings + } + void onConfigurationStoreWritten(bool success) { // Called after the entire EEPROM has been written, // whether successful or not. @@ -101,14 +105,14 @@ namespace ExtUI { #if HAS_MESH void onMeshLevelingStart() {} - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { // Called when any mesh points are updated - //SERIAL_ECHOLNPAIR("onMeshUpdate() x:", xpos, " y:", ypos, " z:", zval); + //SERIAL_ECHOLNPGM("onMeshUpdate() x:", xpos, " y:", ypos, " z:", zval); } - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) { + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { // Called to indicate a special condition - //SERIAL_ECHOLNPAIR("onMeshUpdate() x:", xpos, " y:", ypos, " state:", state); + //SERIAL_ECHOLNPGM("onMeshUpdate() x:", xpos, " y:", ypos, " state:", state); } #endif diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp new file mode 100644 index 000000000000..1b572367f2b6 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp @@ -0,0 +1,976 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/extui/anycubic_chiron/chiron_tft.cpp + * + * Extensible_UI implementation for Anycubic Chiron + * Written By Nick Wells, 2020 [https://github.com/SwiftNick] + * (not affiliated with Anycubic, Ltd.) + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(ANYCUBIC_LCD_CHIRON) + +#include "chiron_tft.h" +#include "Tunes.h" +#include "FileNavigator.h" + +#include "../../../gcode/queue.h" +#include "../../../module/stepper.h" +#include "../../../sd/cardreader.h" +#include "../../../libs/numtostr.h" +#include "../../../MarlinCore.h" + +namespace Anycubic { + +ChironTFT Chiron; +#if AUTO_DETECT_CHIRON_TFT + panel_type_t ChironTFT::panel_type = AC_panel_unknown; +#endif +last_error_t ChironTFT::last_error; +printer_state_t ChironTFT::printer_state; +paused_state_t ChironTFT::pause_state; +heater_state_t ChironTFT::hotend_state; +heater_state_t ChironTFT::hotbed_state; +xy_uint8_t ChironTFT::selectedmeshpoint; +char ChironTFT::selectedfile[MAX_PATH_LEN + 1]; +char ChironTFT::panel_command[MAX_CMND_LEN + 1]; +uint8_t ChironTFT::command_len; +float ChironTFT::live_Zoffset; +file_menu_t ChironTFT::file_menu; + +void ChironTFT::Startup() { + selectedfile[0] = '\0'; + panel_command[0] = '\0'; + command_len = 0; + last_error = AC_error_none; + printer_state = AC_printer_idle; + pause_state = AC_paused_idle; + hotend_state = AC_heater_off; + hotbed_state = AC_heater_off; + live_Zoffset = 0.0; + file_menu = AC_menu_file; + + // Setup pins for powerloss detection + // Two IO pins are connected on the Trigorilla Board + // On a power interruption the OUTAGECON_PIN goes low. + + #if ENABLED(POWER_LOSS_RECOVERY) + OUT_WRITE(OUTAGECON_PIN, HIGH); + #endif + + // Filament runout is handled by Marlin settings in Configuration.h + // opt_set FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present. + // opt_enable FIL_RUNOUT_PULLUP + TFTSer.begin(115200); + + // wait for the TFT panel to initialise and finish the animation + delay_ms(250); + + // There are different panels for the Chiron with slightly different commands + // So we need to know what we are working with. + + // Panel type can be defined otherwise detect it automatically + if (panel_type == AC_panel_unknown) DetectPanelType(); + + // Signal Board has reset + SendtoTFTLN(AC_msg_main_board_has_reset); + + // Enable leveling and Disable end stops during print + // as Z home places nozzle above the bed so we need to allow it past the end stops + injectCommands_P(AC_cmnd_enable_leveling); + + // Startup tunes are defined in Tunes.h + PlayTune(BEEPER_PIN, TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn), 1); + + #if ACDEBUGLEVEL + SERIAL_ECHOLNPGM("AC Debug Level ", ACDEBUGLEVEL); + #endif + SendtoTFTLN(AC_msg_ready); +} + +void ChironTFT::DetectPanelType() { + #if AUTO_DETECT_CHIRON_TFT + // Send a query to the TFT + SendtoTFTLN(AC_Test_for_OldPanel); // The panel will respond with 'SXY 480 320' + SendtoTFTLN(AC_Test_for_NewPanel); // the panel will respond with '[0]=0 ' to '[19]=0 ' + #endif +} + +void ChironTFT::IdleLoop() { + if (ReadTFTCommand()) { + ProcessPanelRequest(); + command_len = 0; + } + CheckHeaters(); +} + +void ChironTFT::PrinterKilled(PGM_P error,PGM_P component) { + SendtoTFTLN(AC_msg_kill_lcd); + #if ACDEBUG(AC_MARLIN) + SERIAL_ECHOLNPGM("PrinterKilled()\nerror: ", error , "\ncomponent: ", component); + #endif +} + +void ChironTFT::MediaEvent(media_event_t event) { + #if ACDEBUG(AC_MARLIN) + SERIAL_ECHOLNPGM("ProcessMediaStatus() ", event); + #endif + switch (event) { + case AC_media_inserted: + SendtoTFTLN(AC_msg_sd_card_inserted); + break; + + case AC_media_removed: + SendtoTFTLN(AC_msg_sd_card_removed); + break; + + case AC_media_error: + last_error = AC_error_noSD; + SendtoTFTLN(AC_msg_no_sd_card); + break; + } +} + +void ChironTFT::TimerEvent(timer_event_t event) { + #if ACDEBUG(AC_MARLIN) + SERIAL_ECHOLNPGM("TimerEvent() ", event); + SERIAL_ECHOLNPGM("Printer State: ", printer_state); + #endif + + switch (event) { + case AC_timer_started: { + live_Zoffset = 0.0; // reset print offset + setSoftEndstopState(false); // disable endstops to print + printer_state = AC_printer_printing; + SendtoTFTLN(AC_msg_print_from_sd_card); + } break; + + case AC_timer_paused: { + printer_state = AC_printer_paused; + pause_state = AC_paused_idle; + SendtoTFTLN(AC_msg_paused); + } break; + + case AC_timer_stopped: { + if (printer_state != AC_printer_idle) { + printer_state = AC_printer_stopping; + SendtoTFTLN(AC_msg_print_complete); + } + setSoftEndstopState(true); // enable endstops + } break; + } +} + +void ChironTFT::FilamentRunout() { + #if ACDEBUG(AC_MARLIN) + SERIAL_ECHOLNPGM("FilamentRunout() printer_state ", printer_state); + #endif + // 1 Signal filament out + last_error = AC_error_filament_runout; + SendtoTFTLN(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block); + PlayTune(BEEPER_PIN, FilamentOut, 1); +} + +void ChironTFT::ConfirmationRequest(const char * const msg) { + // M108 continue + #if ACDEBUG(AC_MARLIN) + SERIAL_ECHOLNPGM("ConfirmationRequest() ", msg, " printer_state:", printer_state); + #endif + switch (printer_state) { + case AC_printer_pausing: { + if (strcmp_P(msg, MARLIN_msg_print_paused) == 0 || strcmp_P(msg, MARLIN_msg_nozzle_parked) == 0) { + SendtoTFTLN(AC_msg_paused); // enable continue button + printer_state = AC_printer_paused; + } + } break; + + case AC_printer_resuming_from_power_outage: + case AC_printer_printing: + case AC_printer_paused: { + // Heater timeout, send acknowledgement + if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) { + pause_state = AC_paused_heater_timed_out; + SendtoTFTLN(AC_msg_paused); // enable continue button + PlayTune(BEEPER_PIN,Heater_Timedout,1); + } + // Reheat finished, send acknowledgement + else if (strcmp_P(msg, MARLIN_msg_reheat_done) == 0) { + pause_state = AC_paused_idle; + SendtoTFTLN(AC_msg_paused); // enable continue button + } + // Filament Purging, send acknowledgement enter run mode + else if (strcmp_P(msg, MARLIN_msg_filament_purging) == 0) { + pause_state = AC_paused_purging_filament; + SendtoTFTLN(AC_msg_paused); // enable continue button + } + } break; + default: + break; + } +} + +void ChironTFT::StatusChange(const char * const msg) { + #if ACDEBUG(AC_MARLIN) + SERIAL_ECHOLNPGM("StatusChange() ", msg); + SERIAL_ECHOLNPGM("printer_state:", printer_state); + #endif + bool msg_matched = false; + // The only way to get printer status is to parse messages + // Use the state to minimise the work we do here. + switch (printer_state) { + case AC_printer_probing: { + // If probing completes ok save the mesh and park + // Ignore the custom machine name + if (strcmp_P(msg + strlen(CUSTOM_MACHINE_NAME), MARLIN_msg_ready) == 0) { + injectCommands_P(PSTR("M500\nG27")); + SendtoTFTLN(AC_msg_probing_complete); + printer_state = AC_printer_idle; + msg_matched = true; + } + // If probing fails don't save the mesh raise the probe above the bad point + if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) { + PlayTune(BEEPER_PIN, BeepBeepBeeep, 1); + injectCommands_P(PSTR("G1 Z50 F500")); + SendtoTFTLN(AC_msg_probing_complete); + printer_state = AC_printer_idle; + msg_matched = true; + } + } break; + + case AC_printer_printing: { + if (strcmp_P(msg, MARLIN_msg_reheating) == 0) { + SendtoTFTLN(AC_msg_paused); // enable continue button + msg_matched = true; + } + } break; + + case AC_printer_pausing: { + if (strcmp_P(msg, MARLIN_msg_print_paused) == 0) { + SendtoTFTLN(AC_msg_paused); + printer_state = AC_printer_paused; + pause_state = AC_paused_idle; + msg_matched = true; + } + } break; + + case AC_printer_stopping: { + if (strcmp_P(msg, MARLIN_msg_print_aborted) == 0) { + SendtoTFTLN(AC_msg_stop); + printer_state = AC_printer_idle; + msg_matched = true; + } + } break; + default: + break; + } + + // If not matched earlier see if this was a heater message + if (!msg_matched) { + if (strcmp_P(msg, MARLIN_msg_extruder_heating) == 0) { + SendtoTFTLN(AC_msg_nozzle_heating); + hotend_state = AC_heater_temp_set; + } + else if (strcmp_P(msg, MARLIN_msg_bed_heating) == 0) { + SendtoTFTLN(AC_msg_bed_heating); + hotbed_state = AC_heater_temp_set; + } + else if (strcmp_P(msg, MARLIN_msg_EEPROM_version) == 0) { + last_error = AC_error_EEPROM; + } + } +} + +void ChironTFT::PowerLossRecovery() { + printer_state = AC_printer_resuming_from_power_outage; // Play tune to notify user we can recover. + last_error = AC_error_powerloss; + PlayTune(BEEPER_PIN, SOS, 1); + SERIAL_ECHOLNPGM_P(AC_msg_powerloss_recovery); +} + +void ChironTFT::PrintComplete() { + SendtoTFT(AC_msg_print_complete); + printer_state = AC_printer_idle; + setSoftEndstopState(true); // enable endstops +} + +void ChironTFT::SendtoTFT(PGM_P str) { // A helper to print PROGMEM string to the panel + #if ACDEBUG(AC_SOME) + SERIAL_ECHOPGM_P(str); + #endif + while (const char c = pgm_read_byte(str++)) TFTSer.write(c); +} + +void ChironTFT::SendtoTFTLN(PGM_P str = nullptr) { + if (str) { + #if ACDEBUG(AC_SOME) + SERIAL_ECHOPGM("> "); + #endif + SendtoTFT(str); + #if ACDEBUG(AC_SOME) + SERIAL_EOL(); + #endif + } + TFTSer.println(); +} + +bool ChironTFT::ReadTFTCommand() { + bool command_ready = false; + while (TFTSer.available() > 0 && command_len < MAX_CMND_LEN) { + panel_command[command_len] = TFTSer.read(); + if (panel_command[command_len] == '\n') { + command_ready = true; + break; + } + command_len++; + } + + if (command_ready || command_len == MAX_CMND_LEN) { + panel_command[command_len] = '\0'; + #if ACDEBUG(AC_ALL) + SERIAL_ECHOLNPGM("len(",command_len,") < ", panel_command); + #endif + command_ready = true; + } + return command_ready; +} + +int8_t ChironTFT::FindToken(char c) { + int8_t pos = 0; + do { + if (panel_command[pos] == c) { + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Tpos:", pos, " ", c); + #endif + return pos; + } + } while(++pos < command_len); + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Not found: ", c); + #endif + return -1; +} + +void ChironTFT::CheckHeaters() { + uint8_t faultDuration = 0; + + // if the hotend temp is abnormal, confirm state before signalling panel + celsius_float_t temp = getActualTemp_celsius(E0); + while (!WITHIN(temp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP)) { + faultDuration++; + if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) { + SendtoTFTLN(AC_msg_nozzle_temp_abnormal); + last_error = AC_error_abnormal_temp_t0; + SERIAL_ECHOLNPGM("Extruder temp abnormal! : ", temp); + break; + } + delay_ms(500); + temp = getActualTemp_celsius(E0); + } + + // If the hotbed temp is abnormal, confirm state before signaling panel + faultDuration = 0; + temp = getActualTemp_celsius(BED); + while (!WITHIN(temp, BED_MINTEMP, BED_MAXTEMP)) { + faultDuration++; + if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) { + SendtoTFTLN(AC_msg_nozzle_temp_abnormal); + last_error = AC_error_abnormal_temp_bed; + SERIAL_ECHOLNPGM("Bed temp abnormal! : ", temp); + break; + } + delay_ms(500); + temp = getActualTemp_celsius(E0); + } + + // Update panel with hotend heater status + if (hotend_state != AC_heater_temp_reached) { + if (WITHIN(getActualTemp_celsius(E0) - getTargetTemp_celsius(E0), -(TEMP_WINDOW), TEMP_WINDOW)) { + SendtoTFTLN(AC_msg_nozzle_heating_done); + hotend_state = AC_heater_temp_reached; + } + } + + // Update panel with bed heater status + if (hotbed_state != AC_heater_temp_reached) { + if (WITHIN(getActualTemp_celsius(BED) - getTargetTemp_celsius(BED), -(TEMP_BED_WINDOW), TEMP_BED_WINDOW)) { + SendtoTFTLN(AC_msg_bed_heating_done); + hotbed_state = AC_heater_temp_reached; + } + } +} + +void ChironTFT::SendFileList(int8_t startindex) { + // Respond to panel request for 4 files starting at index + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("## SendFileList ## ", startindex); + #endif + SendtoTFTLN(PSTR("FN ")); + filenavigator.getFiles(startindex, panel_type, 4); + SendtoTFTLN(PSTR("END")); +} + +void ChironTFT::SelectFile() { + if (panel_type == AC_panel_new) { + strncpy(selectedfile, panel_command + 4, command_len - 3); + selectedfile[command_len - 4] = '\0'; + } + else { + strncpy(selectedfile, panel_command + 4, command_len - 4); + selectedfile[command_len - 5] = '\0'; + } + #if ACDEBUG(AC_FILE) + SERIAL_ECHOLNPGM(" Selected File: ",selectedfile); + #endif + switch (selectedfile[0]) { + case '/': // Valid file selected + SendtoTFTLN(AC_msg_sd_file_open_success); + break; + + case '<': // .. (go up folder level) + filenavigator.upDIR(); + SendtoTFTLN(AC_msg_sd_file_open_failed); + SendFileList( 0 ); + break; + default: // enter sub folder + // for new panel remove the '.GCO' tag that was added to the end of the path + if (panel_type == AC_panel_new) + selectedfile[strlen(selectedfile) - 4] = '\0'; + filenavigator.changeDIR(selectedfile); + SendtoTFTLN(AC_msg_sd_file_open_failed); + SendFileList( 0 ); + break; + } +} + +void ChironTFT::ProcessPanelRequest() { + // Break these up into logical blocks // as its easier to navigate than one huge switch case! + int8_t tpos = FindToken('A'); + // Panel request are 'A0' - 'A36' + if (tpos != -1) { + const int8_t req = atoi(&panel_command[tpos+1]); + + // Information requests A0 - A8 and A33 + if (req <= 8 || req == 33) PanelInfo(req); + + // Simple Actions A9 - A28 + else if (req <= 28) PanelAction(req); + + // Process Initiation + else if (req <= 36) PanelProcess(req); + } + else { + #if AUTO_DETECT_CHIRON_TFT + // This may be a response to a panel type detection query + if (panel_type == AC_panel_unknown) { + tpos = FindToken('S'); // old panel will respond to 'SIZE' with 'SXY 480 320' + if (tpos != -1) { + if (panel_command[tpos+1]== 'X' && panel_command[tpos+2]=='Y') { + panel_type = AC_panel_standard; + SERIAL_ECHOLNPGM_P(AC_msg_old_panel_detected); + } + } + else { + tpos = FindToken('['); // new panel will respond to 'J200' with '[0]=0' + if (tpos != -1) { + if (panel_command[tpos+1]== '0' && panel_command[tpos+2]==']') { + panel_type = AC_panel_new; + SERIAL_ECHOLNPGM_P(AC_msg_new_panel_detected); + } + } + } + return; + } + #endif + + SendtoTFTLN(); // Ignore unknown requests + } +} + +void ChironTFT::PanelInfo(uint8_t req) { + // information requests A0-A8 and A33 + switch (req) { + case 0: // A0 Get HOTEND Temp + SendtoTFT(PSTR("A0V ")); + TFTSer.println(getActualTemp_celsius(E0)); + break; + + case 1: // A1 Get HOTEND Target Temp + SendtoTFT(PSTR("A1V ")); + TFTSer.println(getTargetTemp_celsius(E0)); + break; + + case 2: // A2 Get BED Temp + SendtoTFT(PSTR("A2V ")); + TFTSer.println(getActualTemp_celsius(BED)); + break; + + case 3: // A3 Get BED Target Temp + SendtoTFT(PSTR("A3V ")); + TFTSer.println(getTargetTemp_celsius(BED)); + break; + + case 4: // A4 Get FAN Speed + SendtoTFT(PSTR("A4V ")); + TFTSer.println(getActualFan_percent(FAN0)); + break; + + case 5: // A5 Get Current Coordinates + SendtoTFT(PSTR("A5V X: ")); + TFTSer.print(getAxisPosition_mm(X)); + SendtoTFT(PSTR(" Y: ")); + TFTSer.print(getAxisPosition_mm(Y)); + SendtoTFT(PSTR(" Z: ")); + TFTSer.println(getAxisPosition_mm(Z)); + break; + + case 6: // A6 Get printing progress + if (isPrintingFromMedia()) { + SendtoTFT(PSTR("A6V ")); + TFTSer.println(ui8tostr2(getProgress_percent())); + } + else + SendtoTFTLN(PSTR("A6V ---")); + break; + + case 7: { // A7 Get Printing Time + uint32_t time = getProgress_seconds_elapsed() / 60; + SendtoTFT(PSTR("A7V ")); + TFTSer.print(ui8tostr2(time / 60)); + SendtoTFT(PSTR(" H ")); + TFTSer.print(ui8tostr2(time % 60)); + SendtoTFT(PSTR(" M")); + #if ACDEBUG(AC_ALL) + SERIAL_ECHOLNPGM("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60)); + #endif + } break; + + case 8: // A8 Get SD Card list A8 S0 + if (!isMediaInserted()) safe_delay(500); + if (!isMediaInserted()) // Make sure the card is removed + SendtoTFTLN(AC_msg_no_sd_card); + else if (panel_command[3] == 'S') + SendFileList( atoi( &panel_command[4] ) ); + break; + + case 33: // A33 Get firmware info + SendtoTFT(PSTR("J33 ")); + // If there is an error recorded, show that instead of the FW version + if (!GetLastError()) SendtoTFTLN(PSTR(SHORT_BUILD_VERSION)); + break; + } +} + +void ChironTFT::PanelAction(uint8_t req) { + switch (req) { + case 9: // A9 Pause SD print + if (isPrintingFromMedia()) { + SendtoTFTLN(AC_msg_pause); + pausePrint(); + printer_state = AC_printer_pausing; + } + else + SendtoTFTLN(AC_msg_stop); + break; + + case 10: // A10 Resume SD Print + if (pause_state == AC_paused_idle || printer_state == AC_printer_resuming_from_power_outage) + resumePrint(); + else + setUserConfirmed(); + break; + + case 11: // A11 Stop SD print + if (isPrintingFromMedia()) { + printer_state = AC_printer_stopping; + stopPrint(); + } + else { + if (printer_state == AC_printer_resuming_from_power_outage) + injectCommands_P(PSTR("M1000 C")); // Cancel recovery + SendtoTFTLN(AC_msg_stop); + printer_state = AC_printer_idle; + } + break; + + case 12: // A12 Kill printer + kill(); // from marlincore.h + break; + + case 13: // A13 Select file + SelectFile(); + break; + + case 14: { // A14 Start Printing + // Allows printer to restart the job if we don't want to recover + if (printer_state == AC_printer_resuming_from_power_outage) { + injectCommands_P(PSTR("M1000 C")); // Cancel recovery + printer_state = AC_printer_idle; + } + #if ACDebugLevel >= 1 + SERIAL_ECHOLNPAIR_F("Print: ", selectedfile); + #endif + printFile(selectedfile); + SendtoTFTLN(AC_msg_print_from_sd_card); + } break; + + case 15: // A15 Resuming from outage + if (printer_state == AC_printer_resuming_from_power_outage) { + // Need to home here to restore the Z position + injectCommands_P(AC_cmnd_power_loss_recovery); + injectCommands_P(PSTR("M1000")); // home and start recovery + } + break; + + case 16: { // A16 Set HotEnd temp A17 S170 + const float set_Htemp = atof(&panel_command[5]); + hotend_state = set_Htemp ? AC_heater_temp_set : AC_heater_off; + switch ((char)panel_command[4]) { + // Set Temp + case 'S': case 'C': setTargetTemp_celsius(set_Htemp, E0); + } + } break; + + case 17: { // A17 Set bed temp + const float set_Btemp = atof(&panel_command[5]); + hotbed_state = set_Btemp ? AC_heater_temp_set : AC_heater_off; + if (panel_command[4] == 'S') + setTargetTemp_celsius(set_Btemp, BED); + } break; + + case 18: // A18 Set Fan Speed + if (panel_command[4] == 'S') + setTargetFan_percent(atof(&panel_command[5]), FAN0); + break; + + case 19: // A19 Motors off + if (!isPrinting()) { + stepper.disable_all_steppers(); + SendtoTFTLN(AC_msg_ready); + } + break; + + case 20: // A20 Read/write print speed + if (panel_command[4] == 'S') + setFeedrate_percent(atoi(&panel_command[5])); + else { + SendtoTFT(PSTR("A20V ")); + TFTSer.println(getFeedrate_percent()); + } + break; + + case 21: // A21 Home Axis A21 X + if (!isPrinting()) { + switch ((char)panel_command[4]) { + case 'X': injectCommands_P(PSTR("G28X")); break; + case 'Y': injectCommands_P(PSTR("G28Y")); break; + case 'Z': injectCommands_P(PSTR("G28Z")); break; + case 'C': injectCommands_P(G28_STR); break; + } + } + break; + + case 22: { // A22 Move Axis + // The commands have changed on the new panel + // Old TFT A22 X -1F1500 A22 X +1F1500 + // New TFT A22 X-1.0 F1500 A22 X1.0 F1500 + + // lets just wrap this in a gcode relative nonprint move and let the controller deal with it + // G91 G0 G90 + + if (!isPrinting()) { // Ignore request if printing + char MoveCmnd[30]; + sprintf_P(MoveCmnd, PSTR("G91\nG0%s\nG90"), panel_command + 3); + #if ACDEBUG(AC_ACTION) + SERIAL_ECHOLNPGM("Move: ", MoveCmnd); + #endif + setSoftEndstopState(true); // enable endstops + injectCommands(MoveCmnd); + } + } break; + + case 23: // A23 Preheat PLA + // Ignore request if printing + if (!isPrinting()) { + // Temps defined in configuration.h + setTargetTemp_celsius(PREHEAT_1_TEMP_BED, BED); + setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, E0); + SendtoTFTLN(); + hotbed_state = AC_heater_temp_set; + hotend_state = AC_heater_temp_set; + } + break; + + case 24: // A24 Preheat ABS + // Ignore request if printing + if (!isPrinting()) { + setTargetTemp_celsius(PREHEAT_2_TEMP_BED, BED); + setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, E0); + SendtoTFTLN(); + hotbed_state = AC_heater_temp_set; + hotend_state = AC_heater_temp_set; + } + break; + + case 25: // A25 Cool Down + // Ignore request if printing + if (!isPrinting()) { + setTargetTemp_celsius(0, E0); + setTargetTemp_celsius(0, BED); + SendtoTFTLN(AC_msg_ready); + hotbed_state = AC_heater_off; + hotend_state = AC_heater_off; + } + break; + + case 26: // A26 Refresh SD + if (card.isMounted())card.release(); + card.mount(); + safe_delay(500); + filenavigator.reset(); + break; + + case 27: // A27 Servo Angles adjust + break; + + case 28: // A28 Filament set A28 O/C + // Ignore request if printing + if (isPrinting()) break; + SendtoTFTLN(); + break; + } +} + +void ChironTFT::PanelProcess(uint8_t req) { + switch (req) { + case 29: { // A29 Read Mesh Point A29 X1 Y1 + xy_uint8_t pos; + float pos_z; + pos.x = atoi(&panel_command[FindToken('X')+1]); + pos.y = atoi(&panel_command[FindToken('Y')+1]); + pos_z = getMeshPoint(pos); + + SendtoTFT(PSTR("A29V ")); + TFTSer.println(pos_z * 100); + if (!isPrinting()) { + setSoftEndstopState(true); // disable endstops + // If the same meshpoint is selected twice in a row, move the head to that ready for adjustment + if ((selectedmeshpoint.x == pos.x) && (selectedmeshpoint.y == pos.y)) { + if (!isPositionKnown()) + injectCommands_P(G28_STR); // home + + if (isPositionKnown()) { + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z); + #endif + // Go up before moving + setAxisPosition_mm(3.0,Z); + + setAxisPosition_mm(17 + (93 * pos.x), X); + setAxisPosition_mm(20 + (93 * pos.y), Y); + setAxisPosition_mm(0.0, Z); + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Current Z: ", getAxisPosition_mm(Z)); + #endif + } + } + selectedmeshpoint.x = pos.x; + selectedmeshpoint.y = pos.y; + } + } break; + + case 30: { // A30 Auto leveling + if (FindToken('S') != -1) { // Start probing New panel adds spaces.. + // Ignore request if printing + if (isPrinting()) + SendtoTFTLN(AC_msg_probing_not_allowed); // forbid auto leveling + else { + + + SendtoTFTLN(AC_msg_start_probing); + injectCommands_P(PSTR("G28\nG29")); + printer_state = AC_printer_probing; + } + } + else { + SendtoTFTLN(AC_msg_start_probing); // Just enter levelling menu + } + } break; + + case 31: { // A31 Adjust all Probe Points + // The tokens can occur in different places on the new panel so we need to find it. + + if (FindToken('C') != -1) { // Restore and apply original offsets + if (!isPrinting()) { + injectCommands_P(PSTR("M501\nM420 S1")); + selectedmeshpoint.x = selectedmeshpoint.y = 99; + SERIAL_ECHOLNPGM_P(AC_msg_mesh_changes_abandoned); + } + } + + else if (FindToken('D') != -1) { // Save Z Offset tables and restore leveling state + if (!isPrinting()) { + setAxisPosition_mm(1.0,Z); // Lift nozzle before any further movements are made + injectCommands_P(PSTR("M500")); + SERIAL_ECHOLNPGM_P(AC_msg_mesh_changes_saved); + selectedmeshpoint.x = selectedmeshpoint.y = 99; + } + } + + else if (FindToken('G') != -1) { // Get current offset + SendtoTFT(PSTR("A31V ")); + // When printing use the live z Offset position + // we will use babystepping to move the print head + if (isPrinting()) + TFTSer.println(live_Zoffset); + else { + TFTSer.println(getZOffset_mm()); + selectedmeshpoint.x = selectedmeshpoint.y = 99; + } + } + + else { + int8_t tokenpos = FindToken('S'); + if (tokenpos != -1) { // Set offset (adjusts all points by value) + float Zshift = atof(&panel_command[tokenpos+1]); + setSoftEndstopState(false); // disable endstops + // Allow temporary Z position nudging during print + // From the leveling panel use the all points UI to adjust the print pos. + if (isPrinting()) { + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift); + #endif + if (isAxisPositionKnown(Z)) { + #if ACDEBUG(AC_INFO) + const float currZpos = getAxisPosition_mm(Z); + SERIAL_ECHOLNPGM("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05)); + #endif + // Use babystepping to adjust the head position + int16_t steps = mmToWholeSteps(constrain(Zshift,-0.05,0.05), Z); + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Steps to move Z: ", steps); + #endif + babystepAxis_steps(steps, Z); + live_Zoffset += Zshift; + } + SendtoTFT(PSTR("A31V ")); + TFTSer.println(live_Zoffset); + } + else { + GRID_LOOP(x, y) { + const xy_uint8_t pos { x, y }; + const float currval = getMeshPoint(pos); + setMeshPoint(pos, constrain(currval + Zshift, AC_LOWEST_MESHPOINT_VAL, 2)); + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Change mesh point X", x," Y",y ," from ", currval, " to ", getMeshPoint(pos) ); + #endif + } + const float currZOffset = getZOffset_mm(); + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Change probe offset from ", currZOffset, " to ", currZOffset + Zshift); + #endif + + setZOffset_mm(currZOffset + Zshift); + SendtoTFT(PSTR("A31V ")); + TFTSer.println(getZOffset_mm()); + + if (isAxisPositionKnown(Z)) { + // Move Z axis + const float currZpos = getAxisPosition_mm(Z); + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05)); + #endif + setAxisPosition_mm(currZpos+constrain(Zshift,-0.05,0.05),Z); + } + } + } + } + } break; + + case 32: { // A32 clean leveling beep flag + // Ignore request if printing + //if (isPrinting()) break; + //injectCommands_P(PSTR("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000")); + //TFTSer.println(); + } break; + + // A33 firmware info request see PanelInfo() + + case 34: { // A34 Adjust single mesh point A34 C/S X1 Y1 V123 + if (panel_command[3] == 'C') { // Restore original offsets + injectCommands_P(PSTR("M501\nM420 S1")); + selectedmeshpoint.x = selectedmeshpoint.y = 99; + //printer_state = AC_printer_idle; + } + else { + xy_uint8_t pos; + pos.x = atoi(&panel_command[5]); + pos.y = atoi(&panel_command[8]); + + float currmesh = getMeshPoint(pos); + float newval = atof(&panel_command[11])/100; + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Change mesh point x:", pos.x, " y:", pos.y); + SERIAL_ECHOLNPGM("from ", currmesh, " to ", newval); + #endif + // Update Meshpoint + setMeshPoint(pos,newval); + if (printer_state == AC_printer_idle || printer_state == AC_printer_probing /*!isPrinting()*/) { + // if we are at the current mesh point indicated on the panel Move Z pos +/- 0.05mm + // (The panel changes the mesh value by +/- 0.05mm on each button press) + if (selectedmeshpoint.x == pos.x && selectedmeshpoint.y == pos.y) { + setSoftEndstopState(false); + float currZpos = getAxisPosition_mm(Z); + #if ACDEBUG(AC_INFO) + SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05)); + #endif + setAxisPosition_mm(currZpos + constrain(newval - currmesh, -0.05, 0.05), Z); + } + } + } + } break; + + case 36: // A36 Auto leveling for new TFT bet that was a typo in the panel code! + SendtoTFTLN(AC_msg_start_probing); + break; + } +} + +bool ChironTFT::GetLastError() { + switch (last_error) { + case AC_error_abnormal_temp_bed: SendtoTFTLN(AC_msg_error_bed_temp); break; + case AC_error_abnormal_temp_t0: SendtoTFTLN(AC_msg_error_hotend_temp); break; + case AC_error_noSD: SendtoTFTLN(AC_msg_error_sd_card); break; + case AC_error_powerloss: SendtoTFTLN(AC_msg_power_loss); break; + case AC_error_EEPROM: SendtoTFTLN(AC_msg_eeprom_version); break; + case AC_error_filament_runout: SendtoTFTLN(AC_msg_filament_out); break; + default: return false; + } + last_error = AC_error_none; + return true; +} + +} // Anycubic namespace + +#endif // ANYCUBIC_LCD_CHIRON diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h new file mode 100644 index 000000000000..7eb0049993f7 --- /dev/null +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h @@ -0,0 +1,89 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * lcd/extui/anycubic_chiron/chiron_tft.h + * + * Extensible_UI implementation for Anycubic Chiron + * Written By Nick Wells, 2020 [https://github.com/SwiftNick] + * (not affiliated with Anycubic, Ltd.) + */ + +#include "chiron_tft_defs.h" +#include "../../../inc/MarlinConfigPre.h" +#include "../ui_api.h" + +#if NONE(CHIRON_TFT_STANDARD, CHIRON_TFT_NEW) + #define AUTO_DETECT_CHIRON_TFT 1 +#endif + +namespace Anycubic { + +class ChironTFT { + #if AUTO_DETECT_CHIRON_TFT + static panel_type_t panel_type; + #else + static constexpr panel_type_t panel_type = TERN(CHIRON_TFT_NEW, AC_panel_new, AC_panel_standard); + #endif + static last_error_t last_error; + static printer_state_t printer_state; + static paused_state_t pause_state; + static heater_state_t hotend_state; + static heater_state_t hotbed_state; + static xy_uint8_t selectedmeshpoint; + static char panel_command[MAX_CMND_LEN + 1]; + static uint8_t command_len; + static char selectedfile[MAX_PATH_LEN + 1]; + static float live_Zoffset; + static file_menu_t file_menu; + public: + static void Startup(); + static void IdleLoop(); + static void PrinterKilled(PGM_P,PGM_P); + static void MediaEvent(media_event_t); + static void TimerEvent(timer_event_t); + static void FilamentRunout(); + static void ConfirmationRequest(const char * const ); + static void StatusChange(const char * const ); + static void PowerLossRecovery(); + static void PrintComplete(); + static void SendtoTFT(PGM_P); + static void SendtoTFTLN(PGM_P); + private: + static void DetectPanelType(); + static bool ReadTFTCommand(); + static int8_t FindToken(char); + static void CheckHeaters(); + static void SendFileList(int8_t); + static void SelectFile(); + static void InjectCommandandWait(PGM_P); + static void ProcessPanelRequest(); + static void PanelInfo(uint8_t); + static void PanelAction(uint8_t); + static void PanelProcess(uint8_t); + static bool GetLastError(); +}; + +extern ChironTFT Chiron; + +} // Anycubic namespace diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft_defs.h b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h similarity index 75% rename from Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft_defs.h rename to Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h index 7012e98d929e..d9157fc4e653 100644 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft_defs.h +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h @@ -19,18 +19,18 @@ * along with this program. If not, see . * */ +#pragma once /** - * lcd/extui/lib/chiron_defs.h + * lcd/extui/anycubic_chiron/chiron_defs.h * * Extensible_UI implementation for Anycubic Chiron * Written By Nick Wells, 2020 [https://github.com/SwiftNick] * (not affiliated with Anycubic, Ltd.) */ -#pragma once -#include "../../../../inc/MarlinConfigPre.h" -//#define ACDEBUGLEVEL 255 +#include "../../../inc/MarlinConfigPre.h" +//#define ACDEBUGLEVEL 4 #if ACDEBUGLEVEL // Bit-masks for selective debug: @@ -54,7 +54,7 @@ #define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path #define AC_HEATER_FAULT_VALIDATION_TIME 5 // number of 1/2 second loops before signalling a heater fault -#define AC_LOWEST_MESHPOINT_VAL Z_PROBE_LOW_POINT // The lowest value you can set for a single mesh point offset +#define AC_LOWEST_MESHPOINT_VAL -10 // The lowest value you can set for a single mesh point offset // TFT panel commands #define AC_msg_sd_card_inserted PSTR("J00") @@ -85,6 +85,18 @@ #define AC_msg_probing_complete PSTR("J25") #define AC_msg_start_probing PSTR("J26") #define AC_msg_version PSTR("J27") +#define AC_msg_mesh_changes_abandoned PSTR("Mesh changes abandoned, previous mesh restored.") +#define AC_msg_mesh_changes_saved PSTR("Mesh changes saved.") +#define AC_msg_old_panel_detected PSTR("Standard TFT panel detected!") +#define AC_msg_new_panel_detected PSTR("New TFT panel detected!") +#define AC_msg_powerloss_recovery PSTR("Resuming from power outage! select the same SD file then press resume") +// Error messages must not contain spaces +#define AC_msg_error_bed_temp PSTR("Abnormal_bed_temp") +#define AC_msg_error_hotend_temp PSTR("Abnormal_hotend_temp") +#define AC_msg_error_sd_card PSTR("SD_card_error") +#define AC_msg_filament_out PSTR("Filament_runout") +#define AC_msg_power_loss PSTR("Power_failure") +#define AC_msg_eeprom_version PSTR("EEPROM_ver_wrong") #define MARLIN_msg_start_probing PSTR("Probing Point 1/25") #define MARLIN_msg_probing_failed PSTR("Probing Failed") @@ -93,13 +105,14 @@ #define MARLIN_msg_print_aborted PSTR("Print Aborted") #define MARLIN_msg_extruder_heating PSTR("E Heating...") #define MARLIN_msg_bed_heating PSTR("Bed Heating...") - +#define MARLIN_msg_EEPROM_version PSTR("EEPROM Version Error") #define MARLIN_msg_nozzle_parked PSTR("Nozzle Parked") #define MARLIN_msg_heater_timeout PSTR("Heater Timeout") #define MARLIN_msg_reheating PSTR("Reheating...") #define MARLIN_msg_reheat_done PSTR("Reheat finished.") #define MARLIN_msg_filament_purging PSTR("Filament Purging...") #define MARLIN_msg_special_pause PSTR("PB") + #define AC_cmnd_auto_unload_filament PSTR("M701") // Use Marlin unload routine #define AC_cmnd_auto_load_filament PSTR("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle @@ -108,20 +121,22 @@ #define AC_cmnd_enable_leveling PSTR("M420SV") #define AC_cmnd_power_loss_recovery PSTR("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position +#define AC_Test_for_OldPanel PSTR("SIZE") // An old panel will respond with 'SXY 480 320' a new panel wont respond. +#define AC_Test_for_NewPanel PSTR("J200") // A new panel will respond with '[0]=0 [1]=0' to '[19]=0 ' an old panel wont respond + namespace Anycubic { enum heater_state_t : uint8_t { AC_heater_off, AC_heater_temp_set, AC_heater_temp_reached }; - enum paused_state_t : uint8_t { AC_paused_heater_timed_out, AC_paused_purging_filament, AC_paused_idle }; - enum printer_state_t : uint8_t { + AC_printer_booting, AC_printer_idle, AC_printer_probing, AC_printer_printing, @@ -130,13 +145,11 @@ namespace Anycubic { AC_printer_stopping, AC_printer_resuming_from_power_outage }; - enum timer_event_t : uint8_t { AC_timer_started, AC_timer_paused, AC_timer_stopped }; - enum media_event_t : uint8_t { AC_media_inserted, AC_media_removed, @@ -148,4 +161,18 @@ namespace Anycubic { AC_menu_change_to_file, AC_menu_change_to_command }; -} + enum panel_type_t : uint8_t { + AC_panel_unknown, + AC_panel_standard, + AC_panel_new + }; + enum last_error_t : uint8_t { + AC_error_none, + AC_error_abnormal_temp_t0, + AC_error_abnormal_temp_bed, + AC_error_noSD, + AC_error_powerloss, + AC_error_filament_runout, + AC_error_EEPROM + }; +} // Anycubic namespace diff --git a/Marlin/src/lcd/extui/anycubic_i3mega_lcd.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp similarity index 86% rename from Marlin/src/lcd/extui/anycubic_i3mega_lcd.cpp rename to Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp index e2bd96068ceb..33e7e84a819f 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_extui.cpp @@ -21,15 +21,15 @@ */ /** - * anycubic_i3mega_lcd.cpp + * lcd/extui/anycubic_i3mega/anycubic_extui.cpp */ -#include "../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if ENABLED(ANYCUBIC_LCD_I3MEGA) -#include "lib/anycubic_i3mega/anycubic_i3mega_lcd.h" -#include "ui_api.h" +#include "anycubic_i3mega_lcd.h" +#include "../ui_api.h" #include // for the ::tone() call @@ -65,7 +65,7 @@ namespace ExtUI { // into buff. // Example: - // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // static_assert(sizeof(myDataStruct) <= eeprom_data_size); // memcpy(buff, &myDataStruct, sizeof(myDataStruct)); } @@ -75,10 +75,14 @@ namespace ExtUI { // from buff // Example: - // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // static_assert(sizeof(myDataStruct) <= eeprom_data_size); // memcpy(&myDataStruct, buff, sizeof(myDataStruct)); } + void onPostprocessSettings() { + // Called after loading or resetting stored settings + } + void onConfigurationStoreWritten(bool success) { // Called after the entire EEPROM has been written, // whether successful or not. @@ -93,7 +97,11 @@ namespace ExtUI { void onMeshLevelingStart() {} - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { + // Called when any mesh points are updated + } + + void onMeshUpdate(const int8_t xpos, const int8_t ypos, probe_state_t state) { // Called when any mesh points are updated } #endif diff --git a/Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp similarity index 78% rename from Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp rename to Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp index 1508dc0d27cb..e07e377dfc40 100644 --- a/Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -2,7 +2,7 @@ * anycubic_i3mega_lcd.cpp --- Support for Anycubic i3 Mega TFT * Created by Christian Hopp on 09.12.17. * Improved by David Ramiro - * Converted to ext_iu by John BouAntoun 21 June 2020 + * Converted to ExtUI by John BouAntoun 21 June 2020 * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,57 +19,60 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if ENABLED(ANYCUBIC_LCD_I3MEGA) #include "anycubic_i3mega_lcd.h" -#include "../../ui_api.h" +#include "../ui_api.h" -#include "../../../../libs/numtostr.h" -#include "../../../../module/motion.h" // for quickstop_stepper, A20 read printing speed, feedrate_percentage -#include "../../../../MarlinCore.h" // for disable_steppers -#include "../../../../inc/MarlinConfig.h" +#include "../../../libs/numtostr.h" +#include "../../../module/stepper.h" // for disable_all_steppers +#include "../../../module/motion.h" // for quickstop_stepper, A20 read printing speed, feedrate_percentage +#include "../../../MarlinCore.h" // for disable_steppers +#include "../../../inc/MarlinConfig.h" // command sending macro's with debugging capability -#define SEND_PGM(x) send_P(PSTR(x)) -#define SENDLINE_PGM(x) sendLine_P(PSTR(x)) -#define SEND_PGM_VAL(x,y) (send_P(PSTR(x)), sendLine(i16tostr3rj(y))) -#define SEND(x) send(x) -#define SENDLINE(x) sendLine(x) +#define SEND_PGM(x) send_P(PSTR(x)) +#define SENDLINE_PGM(x) sendLine_P(PSTR(x)) +#define SEND_PGM_VAL(x,y) (send_P(PSTR(x)), sendLine(i16tostr3rj(y))) +#define SEND(x) send(x) +#define SENDLINE(x) sendLine(x) #if ENABLED(ANYCUBIC_LCD_DEBUG) - #define SENDLINE_DBG_PGM(x,y) (sendLine_P(PSTR(x)), SERIAL_ECHOLNPGM(y)) - #define SENDLINE_DBG_PGM_VAL(x,y,z) (sendLine_P(PSTR(x)), SERIAL_ECHOPGM(y), SERIAL_ECHOLN(z)) + #define SENDLINE_DBG_PGM(x,y) do{ sendLine_P(PSTR(x)); SERIAL_ECHOLNPGM(y); }while(0) + #define SENDLINE_DBG_PGM_VAL(x,y,z) do{ sendLine_P(PSTR(x)); SERIAL_ECHOLNPGM(y, z); }while(0) #else - #define SENDLINE_DBG_PGM(x,y) sendLine_P(PSTR(x)) - #define SENDLINE_DBG_PGM_VAL(x,y,z) sendLine_P(PSTR(x)) + #define SENDLINE_DBG_PGM(x,y) sendLine_P(PSTR(x)) + #define SENDLINE_DBG_PGM_VAL(x,y,z) sendLine_P(PSTR(x)) #endif AnycubicTFTClass AnycubicTFT; -static void sendNewLine(void) { - LCD_SERIAL.write('\r'); - LCD_SERIAL.write('\n'); -} - -static void send(const char *str) { - LCD_SERIAL.print(str); -} - -static void sendLine(const char *str) { - send(str); - sendNewLine(); -} - +char AnycubicTFTClass::TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE]; +int AnycubicTFTClass::TFTbuflen = 0, + AnycubicTFTClass::TFTbufindr = 0, + AnycubicTFTClass::TFTbufindw = 0; +char AnycubicTFTClass::serial3_char; +int AnycubicTFTClass::serial3_count = 0; +char* AnycubicTFTClass::TFTstrchr_pointer; +uint8_t AnycubicTFTClass::SpecialMenu = false; +AnycubicMediaPrintState AnycubicTFTClass::mediaPrintingState = AMPRINTSTATE_NOT_PRINTING; +AnycubicMediaPauseState AnycubicTFTClass::mediaPauseState = AMPAUSESTATE_NOT_PAUSED; + +char AnycubicTFTClass::SelectedDirectory[30]; +char AnycubicTFTClass::SelectedFile[FILENAME_LENGTH]; + +// Serial helpers +static void sendNewLine(void) { LCD_SERIAL.write('\r'); LCD_SERIAL.write('\n'); } +static void send(const char *str) { LCD_SERIAL.print(str); } static void send_P(PGM_P str) { while (const char c = pgm_read_byte(str++)) LCD_SERIAL.write(c); } +static void sendLine(const char *str) { send(str); sendNewLine(); } +static void sendLine_P(PGM_P str) { send_P(str); sendNewLine(); } -static void sendLine_P(PGM_P str) { - send_P(str); - sendNewLine(); -} +using namespace ExtUI; AnycubicTFTClass::AnycubicTFTClass() {} @@ -80,7 +83,7 @@ void AnycubicTFTClass::OnSetup() { LCD_SERIAL.begin(LCD_BAUDRATE); SENDLINE_DBG_PGM("J17", "TFT Serial Debug: Main board reset... J17"); // J17 Main board reset - ExtUI::delay_ms(10); + delay_ms(10); // initialise the state of the key pins running on the tft #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT) @@ -95,13 +98,13 @@ void AnycubicTFTClass::OnSetup() { // DoSDCardStateCheck(); SENDLINE_DBG_PGM("J12", "TFT Serial Debug: Ready... J12"); // J12 Ready - ExtUI::delay_ms(10); + delay_ms(10); DoFilamentRunoutCheck(); SelectedFile[0] = 0; #if ENABLED(STARTUP_CHIME) - ExtUI::injectCommands_P(PSTR("M300 P250 S554\nM300 P250 S554\nM300 P250 S740\nM300 P250 S554\nM300 P250 S740\nM300 P250 S554\nM300 P500 S831")); + injectCommands_P(PSTR("M300 P250 S554\nM300 P250 S554\nM300 P250 S740\nM300 P250 S554\nM300 P250 S740\nM300 P250 S554\nM300 P500 S831")); #endif #if ENABLED(ANYCUBIC_LCD_DEBUG) SERIAL_ECHOLNPGM("TFT Serial Debug: Finished startup"); @@ -119,8 +122,8 @@ void AnycubicTFTClass::OnCommandScan() { #endif mediaPrintingState = AMPRINTSTATE_NOT_PRINTING; mediaPauseState = AMPAUSESTATE_NOT_PAUSED; - ExtUI::injectCommands_P(PSTR("M84\nM27")); // disable stepper motors and force report of SD status - ExtUI::delay_ms(200); + injectCommands_P(PSTR("M84\nM27")); // disable stepper motors and force report of SD status + delay_ms(200); // tell printer to release resources of print to indicate it is done SENDLINE_DBG_PGM("J14", "TFT Serial Debug: SD Print Stopped... J14"); } @@ -141,9 +144,7 @@ void AnycubicTFTClass::OnKillTFT() { void AnycubicTFTClass::OnSDCardStateChange(bool isInserted) { #if ENABLED(ANYCUBIC_LCD_DEBUG) - SERIAL_ECHOPGM("TFT Serial Debug: OnSDCardStateChange event triggered..."); - SERIAL_ECHO(ui8tostr2(isInserted)); - SERIAL_EOL(); + SERIAL_ECHOLNPGM("TFT Serial Debug: OnSDCardStateChange event triggered...", isInserted); #endif DoSDCardStateCheck(); } @@ -164,8 +165,7 @@ void AnycubicTFTClass::OnFilamentRunout() { void AnycubicTFTClass::OnUserConfirmRequired(const char * const msg) { #if ENABLED(ANYCUBIC_LCD_DEBUG) - SERIAL_ECHOPGM("TFT Serial Debug: OnUserConfirmRequired triggered... "); - SERIAL_ECHOLN(msg); + SERIAL_ECHOLNPGM("TFT Serial Debug: OnUserConfirmRequired triggered... ", msg); #endif #if ENABLED(SDSUPPORT) @@ -227,8 +227,8 @@ bool AnycubicTFTClass::CodeSeen(char code) { } bool AnycubicTFTClass::IsNozzleHomed() { - const float xPosition = ExtUI::getAxisPosition_mm((ExtUI::axis_t) ExtUI::X); - const float yPosition = ExtUI::getAxisPosition_mm((ExtUI::axis_t) ExtUI::Y); + const float xPosition = getAxisPosition_mm((axis_t) X); + const float yPosition = getAxisPosition_mm((axis_t) Y); return WITHIN(xPosition, X_MIN_POS - 0.1, X_MIN_POS + 0.1) && WITHIN(yPosition, Y_MIN_POS - 0.1, Y_MIN_POS + 0.1); } @@ -249,48 +249,48 @@ void AnycubicTFTClass::HandleSpecialMenu() { switch (SelectedDirectory[2]) { case '1': // "<01ZUp0.1>" SERIAL_ECHOLNPGM("Special Menu: Z Up 0.1"); - ExtUI::injectCommands_P(PSTR("G91\nG1 Z+0.1\nG90")); + injectCommands_P(PSTR("G91\nG1 Z+0.1\nG90")); break; case '2': // "<02ZUp0.02>" SERIAL_ECHOLNPGM("Special Menu: Z Up 0.02"); - ExtUI::injectCommands_P(PSTR("G91\nG1 Z+0.02\nG90")); + injectCommands_P(PSTR("G91\nG1 Z+0.02\nG90")); break; case '3': // "<03ZDn0.02>" SERIAL_ECHOLNPGM("Special Menu: Z Down 0.02"); - ExtUI::injectCommands_P(PSTR("G91\nG1 Z-0.02\nG90")); + injectCommands_P(PSTR("G91\nG1 Z-0.02\nG90")); break; case '4': // "<04ZDn0.1>" SERIAL_ECHOLNPGM("Special Menu: Z Down 0.1"); - ExtUI::injectCommands_P(PSTR("G91\nG1 Z-0.1\nG90")); + injectCommands_P(PSTR("G91\nG1 Z-0.1\nG90")); break; case '5': // "<05PrehtBed>" SERIAL_ECHOLNPGM("Special Menu: Preheat Bed"); - ExtUI::injectCommands_P(PSTR("M140 S65")); + injectCommands_P(PSTR("M140 S65")); break; case '6': // "<06SMeshLvl>" SERIAL_ECHOLNPGM("Special Menu: Start Mesh Leveling"); - ExtUI::injectCommands_P(PSTR("G29S1")); + injectCommands_P(PSTR("G29S1")); break; case '7': // "<07MeshNPnt>" SERIAL_ECHOLNPGM("Special Menu: Next Mesh Point"); - ExtUI::injectCommands_P(PSTR("G29S2")); + injectCommands_P(PSTR("G29S2")); break; case '8': // "<08HtEndPID>" SERIAL_ECHOLNPGM("Special Menu: Auto Tune Hotend PID"); // need to dwell for half a second to give the fan a chance to start before the pid tuning starts - ExtUI::injectCommands_P(PSTR("M106 S204\nG4 P500\nM303 E0 S215 C15 U1")); + injectCommands_P(PSTR("M106 S204\nG4 P500\nM303 E0 S215 C15 U1")); break; case '9': // "<09HtBedPID>" SERIAL_ECHOLNPGM("Special Menu: Auto Tune Hotbed Pid"); - ExtUI::injectCommands_P(PSTR("M303 E-1 S65 C6 U1")); + injectCommands_P(PSTR("M303 E-1 S65 C6 U1")); break; default: @@ -302,12 +302,12 @@ void AnycubicTFTClass::HandleSpecialMenu() { switch (SelectedDirectory[2]) { case '0': // "<10FWDeflts>" SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults"); - ExtUI::injectCommands_P(PSTR("M502\nM300 P105 S1661\nM300 P210 S1108")); + injectCommands_P(PSTR("M502\nM300 P105 S1661\nM300 P210 S1108")); break; case '1': // "<11SvEEPROM>" SERIAL_ECHOLNPGM("Special Menu: Save EEPROM"); - ExtUI::injectCommands_P(PSTR("M500\nM300 P105 S1108\nM300 P210 S1661")); + injectCommands_P(PSTR("M500\nM300 P105 S1108\nM300 P210 S1661")); break; default: @@ -319,38 +319,38 @@ void AnycubicTFTClass::HandleSpecialMenu() { switch (SelectedDirectory[2]) { case '1': // "<01PrehtBed>" SERIAL_ECHOLNPGM("Special Menu: Preheat Bed"); - ExtUI::injectCommands_P(PSTR("M140 S65")); + injectCommands_P(PSTR("M140 S65")); break; case '2': // "<02ABL>" SERIAL_ECHOLNPGM("Special Menu: Auto Bed Leveling"); - ExtUI::injectCommands_P(PSTR("G29N")); + injectCommands_P(PSTR("G29N")); break; case '3': // "<03HtendPID>" SERIAL_ECHOLNPGM("Special Menu: Auto Tune Hotend PID"); // need to dwell for half a second to give the fan a chance to start before the pid tuning starts - ExtUI::injectCommands_P(PSTR("M106 S204\nG4 P500\nM303 E0 S215 C15 U1")); + injectCommands_P(PSTR("M106 S204\nG4 P500\nM303 E0 S215 C15 U1")); break; case '4': // "<04HtbedPID>" SERIAL_ECHOLNPGM("Special Menu: Auto Tune Hotbed Pid"); - ExtUI::injectCommands_P(PSTR("M303 E-1 S65 C6 U1")); + injectCommands_P(PSTR("M303 E-1 S65 C6 U1")); break; case '5': // "<05FWDeflts>" SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults"); - ExtUI::injectCommands_P(PSTR("M502\nM300 P105 S1661\nM300 P210 S1108")); + injectCommands_P(PSTR("M502\nM300 P105 S1661\nM300 P210 S1108")); break; case '6': // "<06SvEEPROM>" SERIAL_ECHOLNPGM("Special Menu: Save EEPROM"); - ExtUI::injectCommands_P(PSTR("M500\nM300 P105 S1108\nM300 P210 S1661")); + injectCommands_P(PSTR("M500\nM300 P105 S1108\nM300 P210 S1661")); break; case '7': // <07SendM108> SERIAL_ECHOLNPGM("Special Menu: Send User Confirmation"); - ExtUI::injectCommands_P(PSTR("M108")); + injectCommands_P(PSTR("M108")); break; default: @@ -376,11 +376,11 @@ void AnycubicTFTClass::RenderCurrentFileList() { uint16_t selectedNumber = 0; SelectedDirectory[0] = 0; SelectedFile[0] = 0; - ExtUI::FileList currentFileList; + FileList currentFileList; SENDLINE_PGM("FN "); // Filelist start - if (!ExtUI::isMediaInserted() && !SpecialMenu) { + if (!isMediaInserted() && !SpecialMenu) { SENDLINE_DBG_PGM("J02", "TFT Serial Debug: No SD Card mounted to render Current File List... J02"); SENDLINE_PGM(""); @@ -465,7 +465,7 @@ void AnycubicTFTClass::RenderSpecialMenu(uint16_t selectedNumber) { } void AnycubicTFTClass::RenderCurrentFolder(uint16_t selectedNumber) { - ExtUI::FileList currentFileList; + FileList currentFileList; uint16_t cnt = selectedNumber; uint16_t max_files; uint16_t dir_files = currentFileList.count(); @@ -517,7 +517,7 @@ void AnycubicTFTClass::OnPrintTimerStarted() { void AnycubicTFTClass::OnPrintTimerPaused() { #if ENABLED(SDSUPPORT) - if (ExtUI::isPrintingFromMedia()) { + if (isPrintingFromMedia()) { mediaPrintingState = AMPRINTSTATE_PAUSED; mediaPauseState = AMPAUSESTATE_PARKING; } @@ -535,6 +535,8 @@ void AnycubicTFTClass::OnPrintTimerStopped() { #endif } +#define ROUND(val) int((val)+0.5f) + void AnycubicTFTClass::GetCommandFromTFT() { char *starpos = nullptr; while (LCD_SERIAL.available() > 0 && TFTbuflen < TFTBUFSIZE) { @@ -555,46 +557,42 @@ void AnycubicTFTClass::GetCommandFromTFT() { a_command = ((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], nullptr)))); #if ENABLED(ANYCUBIC_LCD_DEBUG) - if ((a_command > 7) && (a_command != 20)) { // No debugging of status polls, please! - SERIAL_ECHOPGM("TFT Serial Command: "); - SERIAL_ECHOLN(TFTcmdbuffer[TFTbufindw]); - } + if ((a_command > 7) && (a_command != 20)) // No debugging of status polls, please! + SERIAL_ECHOLNPGM("TFT Serial Command: ", TFTcmdbuffer[TFTbufindw]); #endif switch (a_command) { case 0: { // A0 GET HOTEND TEMP - float hotendActualTemp = ExtUI::getActualTemp_celsius((ExtUI::extruder_t) (ExtUI::extruder_t) ExtUI::E0); - SEND_PGM_VAL("A0V ", int(hotendActualTemp + 0.5)); + const celsius_float_t hotendActualTemp = getActualTemp_celsius(E0); + SEND_PGM_VAL("A0V ", ROUND(hotendActualTemp)); } break; case 1: { // A1 GET HOTEND TARGET TEMP - float hotendTargetTemp = ExtUI::getTargetTemp_celsius((ExtUI::extruder_t) (ExtUI::extruder_t) ExtUI::E0); - SEND_PGM_VAL("A1V ", int(hotendTargetTemp + 0.5)); + const celsius_float_t hotendTargetTemp = getTargetTemp_celsius(E0); + SEND_PGM_VAL("A1V ", ROUND(hotendTargetTemp)); } break; case 2: { // A2 GET HOTBED TEMP - float heatedBedActualTemp = ExtUI::getActualTemp_celsius((ExtUI::heater_t) ExtUI::BED); - SEND_PGM_VAL("A2V ", int(heatedBedActualTemp + 0.5)); + const celsius_float_t heatedBedActualTemp = getActualTemp_celsius(BED); + SEND_PGM_VAL("A2V ", ROUND(heatedBedActualTemp)); } break; case 3: { // A3 GET HOTBED TARGET TEMP - float heatedBedTargetTemp = ExtUI::getTargetTemp_celsius((ExtUI::heater_t) ExtUI::BED); - SEND_PGM_VAL("A3V ", int(heatedBedTargetTemp + 0.5)); + const celsius_float_t heatedBedTargetTemp = getTargetTemp_celsius(BED); + SEND_PGM_VAL("A3V ", ROUND(heatedBedTargetTemp)); } break; case 4: { // A4 GET FAN SPEED - float fanPercent = ExtUI::getActualFan_percent(ExtUI::FAN0); - fanPercent = constrain(fanPercent, 0, 100); - SEND_PGM_VAL("A4V ", int(fanPercent)); + SEND_PGM_VAL("A4V ", int(getActualFan_percent(FAN0))); } break; case 5: { // A5 GET CURRENT COORDINATE - const float xPosition = ExtUI::getAxisPosition_mm(ExtUI::X), - yPosition = ExtUI::getAxisPosition_mm(ExtUI::Y), - zPosition = ExtUI::getAxisPosition_mm(ExtUI::Z); + const float xPosition = getAxisPosition_mm(X), + yPosition = getAxisPosition_mm(Y), + zPosition = getAxisPosition_mm(Z); SEND_PGM("A5V X: "); LCD_SERIAL.print(xPosition); SEND_PGM( " Y: "); LCD_SERIAL.print(yPosition); SEND_PGM( " Z: "); LCD_SERIAL.print(zPosition); @@ -603,10 +601,10 @@ void AnycubicTFTClass::GetCommandFromTFT() { case 6: // A6 GET SD CARD PRINTING STATUS #if ENABLED(SDSUPPORT) - if (ExtUI::isPrintingFromMedia()) { + if (isPrintingFromMedia()) { SEND_PGM("A6V "); - if (ExtUI::isMediaInserted()) - SENDLINE(ui8tostr3rj(ExtUI::getProgress_percent())); + if (isMediaInserted()) + SENDLINE(ui8tostr3rj(getProgress_percent())); else SENDLINE_DBG_PGM("J02", "TFT Serial Debug: No SD Card mounted to return printing status... J02"); } @@ -616,7 +614,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { break; case 7: { // A7 GET PRINTING TIME - const uint32_t elapsedSeconds = ExtUI::getProgress_seconds_elapsed(); + const uint32_t elapsedSeconds = getProgress_seconds_elapsed(); SEND_PGM("A7V "); if (elapsedSeconds != 0) { // print time const uint32_t elapsedMinutes = elapsedSeconds / 60; @@ -639,14 +637,14 @@ void AnycubicTFTClass::GetCommandFromTFT() { case 9: // A9 pause sd print #if ENABLED(SDSUPPORT) - if (ExtUI::isPrintingFromMedia()) + if (isPrintingFromMedia()) PausePrint(); #endif break; case 10: // A10 resume sd print #if ENABLED(SDSUPPORT) - if (ExtUI::isPrintingFromMediaPaused()) + if (isPrintingFromMediaPaused()) ResumePrint(); #endif break; @@ -661,7 +659,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { case 13: // A13 SELECTION FILE #if ENABLED(SDSUPPORT) - if (ExtUI::isMediaInserted()) { + if (isMediaInserted()) { starpos = (strchr(TFTstrchr_pointer + 4, '*')); if (TFTstrchr_pointer[4] == '/') { strcpy(SelectedDirectory, TFTstrchr_pointer + 5); @@ -690,7 +688,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { case 14: // A14 START PRINTING #if ENABLED(SDSUPPORT) - if (!ExtUI::isPrinting() && strlen(SelectedFile) > 0) + if (!isPrinting() && strlen(SelectedFile) > 0) StartPrint(); #endif break; @@ -703,13 +701,13 @@ void AnycubicTFTClass::GetCommandFromTFT() { unsigned int tempvalue; if (CodeSeen('S')) { tempvalue = constrain(CodeValue(), 0, 275); - ExtUI::setTargetTemp_celsius(tempvalue, (ExtUI::extruder_t) ExtUI::E0); + setTargetTemp_celsius(tempvalue, (extruder_t)E0); } - else if (CodeSeen('C') && !ExtUI::isPrinting()) { - if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 10) - ExtUI::injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS + else if (CodeSeen('C') && !isPrinting()) { + if (getAxisPosition_mm(Z) < 10) + injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS tempvalue = constrain(CodeValue(), 0, 275); - ExtUI::setTargetTemp_celsius(tempvalue, (ExtUI::extruder_t) ExtUI::E0); + setTargetTemp_celsius(tempvalue, (extruder_t)E0); } } break; @@ -718,7 +716,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { unsigned int tempbed; if (CodeSeen('S')) { tempbed = constrain(CodeValue(), 0, 100); - ExtUI::setTargetTemp_celsius(tempbed, (ExtUI::heater_t)ExtUI::BED); + setTargetTemp_celsius(tempbed, (heater_t)BED); } } break; @@ -728,20 +726,20 @@ void AnycubicTFTClass::GetCommandFromTFT() { if (CodeSeen('S')) { fanPercent = CodeValue(); fanPercent = constrain(fanPercent, 0, 100); - ExtUI::setTargetFan_percent(fanPercent, ExtUI::FAN0); + setTargetFan_percent(fanPercent, FAN0); } else fanPercent = 100; - ExtUI::setTargetFan_percent(fanPercent, ExtUI::FAN0); + setTargetFan_percent(fanPercent, FAN0); SENDLINE_PGM(""); } break; case 19: // A19 stop stepper drivers - sent on stop extrude command and on turn motors off command - if (!ExtUI::isPrinting()) { + if (!isPrinting()) { quickstop_stepper(); - disable_all_steppers(); + stepper.disable_all_steppers(); } SENDLINE_PGM(""); @@ -755,23 +753,23 @@ void AnycubicTFTClass::GetCommandFromTFT() { break; case 21: // A21 all home - if (!ExtUI::isPrinting() && !ExtUI::isPrintingFromMediaPaused()) { + if (!isPrinting() && !isPrintingFromMediaPaused()) { if (CodeSeen('X') || CodeSeen('Y') || CodeSeen('Z')) { if (CodeSeen('X')) - ExtUI::injectCommands_P(PSTR("G28X")); + injectCommands_P(PSTR("G28X")); if (CodeSeen('Y')) - ExtUI::injectCommands_P(PSTR("G28Y")); + injectCommands_P(PSTR("G28Y")); if (CodeSeen('Z')) - ExtUI::injectCommands_P(PSTR("G28Z")); + injectCommands_P(PSTR("G28Z")); } else if (CodeSeen('C')) { - ExtUI::injectCommands_P(G28_STR); + injectCommands_P(G28_STR); } } break; case 22: // A22 move X/Y/Z or extrude - if (!ExtUI::isPrinting()) { + if (!isPrinting()) { float coorvalue; unsigned int movespeed = 0; char commandStr[30]; @@ -824,38 +822,38 @@ void AnycubicTFTClass::GetCommandFromTFT() { SERIAL_ECHOPGM("TFT Serial Debug: A22 Move final request with gcode... "); SERIAL_ECHOLN(fullCommandStr); #endif - ExtUI::injectCommands(fullCommandStr); + injectCommands(fullCommandStr); } } SENDLINE_PGM(""); break; case 23: // A23 preheat pla - if (!ExtUI::isPrinting()) { - if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 10) - ExtUI::injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS + if (!isPrinting()) { + if (getAxisPosition_mm(Z) < 10) + injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS - ExtUI::setTargetTemp_celsius(PREHEAT_1_TEMP_BED, (ExtUI::heater_t) ExtUI::BED); - ExtUI::setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, (ExtUI::extruder_t) ExtUI::E0); + setTargetTemp_celsius(PREHEAT_1_TEMP_BED, (heater_t)BED); + setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, (extruder_t)E0); SENDLINE_PGM("OK"); } break; case 24:// A24 preheat abs - if (!ExtUI::isPrinting()) { - if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 10) - ExtUI::injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS + if (!isPrinting()) { + if (getAxisPosition_mm(Z) < 10) + injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS - ExtUI::setTargetTemp_celsius(PREHEAT_2_TEMP_BED, (ExtUI::heater_t) ExtUI::BED); - ExtUI::setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, (ExtUI::extruder_t) ExtUI::E0); + setTargetTemp_celsius(PREHEAT_2_TEMP_BED, (heater_t)BED); + setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, (extruder_t)E0); SENDLINE_PGM("OK"); } break; case 25: // A25 cool down - if (!ExtUI::isPrinting()) { - ExtUI::setTargetTemp_celsius(0, (ExtUI::heater_t) ExtUI::BED); - ExtUI::setTargetTemp_celsius(0, (ExtUI::extruder_t) ExtUI::E0); + if (!isPrinting()) { + setTargetTemp_celsius(0, (heater_t) BED); + setTargetTemp_celsius(0, (extruder_t) E0); SENDLINE_DBG_PGM("J12", "TFT Serial Debug: Cooling down... J12"); // J12 cool down } @@ -863,9 +861,9 @@ void AnycubicTFTClass::GetCommandFromTFT() { case 26: // A26 refresh SD #if ENABLED(SDSUPPORT) - if (ExtUI::isMediaInserted()) { + if (isMediaInserted()) { if (strlen(SelectedDirectory) > 0) { - ExtUI::FileList currentFileList; + FileList currentFileList; if ((SelectedDirectory[0] == '.') && (SelectedDirectory[1] == '.')) { currentFileList.upDir(); } @@ -919,7 +917,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { void AnycubicTFTClass::DoSDCardStateCheck() { #if ENABLED(SDSUPPORT) && PIN_EXISTS(SD_DETECT) - bool isInserted = ExtUI::isMediaInserted(); + bool isInserted = isMediaInserted(); if (isInserted) SENDLINE_DBG_PGM("J00", "TFT Serial Debug: SD card state changed... isInserted"); else @@ -930,12 +928,12 @@ void AnycubicTFTClass::DoSDCardStateCheck() { void AnycubicTFTClass::DoFilamentRunoutCheck() { #if ENABLED(FILAMENT_RUNOUT_SENSOR) - // NOTE: ExtUI::getFilamentRunoutState() only returns the runout state if the job is printing + // NOTE: getFilamentRunoutState() only returns the runout state if the job is printing // we want to actually check the status of the pin here, regardless of printstate if (READ(FIL_RUNOUT1_PIN)) { if (mediaPrintingState == AMPRINTSTATE_PRINTING || mediaPrintingState == AMPRINTSTATE_PAUSED || mediaPrintingState == AMPRINTSTATE_PAUSE_REQUESTED) { // play tone to indicate filament is out - ExtUI::injectCommands_P(PSTR("\nM300 P200 S1567\nM300 P200 S1174\nM300 P200 S1567\nM300 P200 S1174\nM300 P2000 S1567")); + injectCommands_P(PSTR("\nM300 P200 S1567\nM300 P200 S1174\nM300 P200 S1567\nM300 P200 S1174\nM300 P2000 S1567")); // tell the user that the filament has run out and wait SENDLINE_DBG_PGM("J23", "TFT Serial Debug: Blocking filament prompt... J23"); @@ -949,30 +947,30 @@ void AnycubicTFTClass::DoFilamentRunoutCheck() { void AnycubicTFTClass::StartPrint() { #if ENABLED(SDSUPPORT) - if (!ExtUI::isPrinting() && strlen(SelectedFile) > 0) { + if (!isPrinting() && strlen(SelectedFile) > 0) { #if ENABLED(ANYCUBIC_LCD_DEBUG) SERIAL_ECHOPGM("TFT Serial Debug: About to print file ... "); - SERIAL_ECHO(ExtUI::isPrinting()); + SERIAL_ECHO(isPrinting()); SERIAL_ECHOPGM(" "); SERIAL_ECHOLN(SelectedFile); #endif mediaPrintingState = AMPRINTSTATE_PRINTING; mediaPauseState = AMPAUSESTATE_NOT_PAUSED; - ExtUI::printFile(SelectedFile); + printFile(SelectedFile); } #endif // SDUPPORT } void AnycubicTFTClass::PausePrint() { #if ENABLED(SDSUPPORT) - if (ExtUI::isPrintingFromMedia() && mediaPrintingState != AMPRINTSTATE_STOP_REQUESTED && mediaPauseState == AMPAUSESTATE_NOT_PAUSED) { + if (isPrintingFromMedia() && mediaPrintingState != AMPRINTSTATE_STOP_REQUESTED && mediaPauseState == AMPAUSESTATE_NOT_PAUSED) { mediaPrintingState = AMPRINTSTATE_PAUSE_REQUESTED; mediaPauseState = AMPAUSESTATE_NOT_PAUSED; // need the userconfirm method to update pause state SENDLINE_DBG_PGM("J05", "TFT Serial Debug: SD print pause started... J05"); // J05 printing pause // for some reason pausing the print doesn't retract the extruder so force a manual one here - ExtUI::injectCommands_P(PSTR("G91\nG1 E-2 F1800\nG90")); - ExtUI::pausePrint(); + injectCommands_P(PSTR("G91\nG1 E-2 F1800\nG90")); + pausePrint(); } #endif } @@ -1001,14 +999,14 @@ void AnycubicTFTClass::ResumePrint() { // SENDLINE_DBG_PGM("J05", "TFT Serial Debug: Resume called with heater timeout... J05"); // J05 printing pause // reheat the nozzle - ExtUI::setUserConfirmed(); + setUserConfirmed(); } else { mediaPrintingState = AMPRINTSTATE_PRINTING; mediaPauseState = AMPAUSESTATE_NOT_PAUSED; SENDLINE_DBG_PGM("J04", "TFT Serial Debug: SD print resumed... J04"); // J04 printing form sd card now - ExtUI::resumePrint(); + resumePrint(); } #endif } @@ -1020,8 +1018,8 @@ void AnycubicTFTClass::StopPrint() { SENDLINE_DBG_PGM("J16", "TFT Serial Debug: SD print stop called... J16"); // for some reason stopping the print doesn't retract the extruder so force a manual one here - ExtUI::injectCommands_P(PSTR("G91\nG1 E-2 F1800\nG90")); - ExtUI::stopPrint(); + injectCommands_P(PSTR("G91\nG1 E-2 F1800\nG90")); + stopPrint(); #endif } diff --git a/Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.h b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.h similarity index 50% rename from Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.h rename to Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.h index 59050acccb2d..fa62b545dcdd 100644 --- a/Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.h +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.h @@ -2,7 +2,7 @@ * anycubic_i3mega_lcd.h --- Support for Anycubic i3 Mega TFT * Created by Christian Hopp on 09.12.17. * Improved by David Ramiro - * Converted to ext_iu by John BouAntoun 21 June 2020 + * Converted to ExtUI by John BouAntoun 21 June 2020 * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,8 +20,8 @@ */ #pragma once -#include "../../../../inc/MarlinConfigPre.h" -#include "../../../../sd/SdFatConfig.h" // for the FILENAME_LENGTH macro +#include "../../../inc/MarlinConfigPre.h" +#include "../../../sd/SdFatConfig.h" // for the FILENAME_LENGTH macro #define TFTBUFSIZE 4 #define TFT_MAX_CMD_SIZE 96 @@ -48,49 +48,47 @@ enum AnycubicMediaPauseState { class AnycubicTFTClass { public: AnycubicTFTClass(); - void OnSetup(); - void OnCommandScan(); - void OnKillTFT(); - void OnSDCardStateChange(bool); - void OnSDCardError(); - void OnFilamentRunout(); - void OnUserConfirmRequired(const char *); - void OnPrintTimerStarted(); - void OnPrintTimerPaused(); - void OnPrintTimerStopped(); + static void OnSetup(); + static void OnCommandScan(); + static void OnKillTFT(); + static void OnSDCardStateChange(bool); + static void OnSDCardError(); + static void OnFilamentRunout(); + static void OnUserConfirmRequired(const char *); + static void OnPrintTimerStarted(); + static void OnPrintTimerPaused(); + static void OnPrintTimerStopped(); private: - char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE]; - int TFTbuflen=0; - int TFTbufindr = 0; - int TFTbufindw = 0; - char serial3_char; - int serial3_count = 0; - char *TFTstrchr_pointer; - uint8_t SpecialMenu = false; - AnycubicMediaPrintState mediaPrintingState = AMPRINTSTATE_NOT_PRINTING; - AnycubicMediaPauseState mediaPauseState = AMPAUSESTATE_NOT_PAUSED; + static char TFTcmdbuffer[TFTBUFSIZE][TFT_MAX_CMD_SIZE]; + static int TFTbuflen, TFTbufindr, TFTbufindw; + static char serial3_char; + static int serial3_count; + static char *TFTstrchr_pointer; + static uint8_t SpecialMenu; + static AnycubicMediaPrintState mediaPrintingState; + static AnycubicMediaPauseState mediaPauseState; - float CodeValue(); - bool CodeSeen(char); - bool IsNozzleHomed(); - void RenderCurrentFileList(); - void RenderSpecialMenu(uint16_t); - void RenderCurrentFolder(uint16_t); - void GetCommandFromTFT(); - void CheckSDCardChange(); - void CheckPauseState(); - void CheckPrintCompletion(); - void HandleSpecialMenu(); - void DoSDCardStateCheck(); - void DoFilamentRunoutCheck(); - void StartPrint(); - void PausePrint(); - void ResumePrint(); - void StopPrint(); + static float CodeValue(); + static bool CodeSeen(char); + static bool IsNozzleHomed(); + static void RenderCurrentFileList(); + static void RenderSpecialMenu(uint16_t); + static void RenderCurrentFolder(uint16_t); + static void GetCommandFromTFT(); + static void CheckSDCardChange(); + static void CheckPauseState(); + static void CheckPrintCompletion(); + static void HandleSpecialMenu(); + static void DoSDCardStateCheck(); + static void DoFilamentRunoutCheck(); + static void StartPrint(); + static void PausePrint(); + static void ResumePrint(); + static void StopPrint(); - char SelectedDirectory[30]; - char SelectedFile[FILENAME_LENGTH]; + static char SelectedDirectory[30]; + static char SelectedFile[FILENAME_LENGTH]; }; extern AnycubicTFTClass AnycubicTFT; diff --git a/Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp similarity index 79% rename from Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp rename to Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp index c7cd76733fc1..262dcea36483 100644 --- a/Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSDisplay.cpp @@ -20,32 +20,32 @@ * */ -/* DGUS implementation written by coldtobi in 2019 for Marlin */ +#include "../../../inc/MarlinConfigPre.h" -#include "../../../../inc/MarlinConfigPre.h" - -#if HAS_DGUS_LCD +#if HAS_DGUS_LCD_CLASSIC #if HOTENDS > 2 - #error "More than 2 hotends not implemented on the Display UI design." + #warning "More than 2 hotends not implemented on DGUS Display UI." #endif -#include "../../ui_api.h" +#include "../ui_api.h" -#include "../../../../MarlinCore.h" -#include "../../../../module/motion.h" -#include "../../../../gcode/queue.h" -#include "../../../../module/planner.h" -#include "../../../../libs/duration_t.h" -#include "../../../../module/printcounter.h" +#include "../../../MarlinCore.h" +#include "../../../module/motion.h" +#include "../../../gcode/queue.h" +#include "../../../module/planner.h" +#include "../../../libs/duration_t.h" +#include "../../../module/printcounter.h" #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../feature/powerloss.h" #endif #include "DGUSDisplay.h" #include "DGUSVPVariable.h" #include "DGUSDisplayDef.h" +DGUSDisplay dgusdisplay; + // Preamble... 2 Bytes, usually 0x5A 0xA5, but configurable constexpr uint8_t DGUS_HEADER1 = 0x5A; constexpr uint8_t DGUS_HEADER2 = 0xA5; @@ -62,11 +62,15 @@ void DGUSDisplay::InitDisplay() { #define LCD_BAUDRATE 115200 #endif LCD_SERIAL.begin(LCD_BAUDRATE); - if (TERN1(POWER_LOSS_RECOVERY, !recovery.valid())) - RequestScreen(TERN(SHOW_BOOTSCREEN, DGUSLCD_SCREEN_BOOT, DGUSLCD_SCREEN_MAIN)); + + if (TERN1(POWER_LOSS_RECOVERY, !recovery.valid())) { // If no Power-Loss Recovery is needed... + TERN_(DGUS_LCD_UI_MKS, delay(LOGO_TIME_DELAY)); // Show the logo for a little while + } + + RequestScreen(TERN(SHOW_BOOTSCREEN, DGUSLCD_SCREEN_BOOT, DGUSLCD_SCREEN_MAIN)); } -void DGUSDisplay::WriteVariable(uint16_t adr, const void* values, uint8_t valueslen, bool isstr) { +void DGUSDisplay::WriteVariable(uint16_t adr, const void *values, uint8_t valueslen, bool isstr) { const char* myvalues = static_cast(values); bool strend = !myvalues; WriteHeader(adr, DGUS_CMD_WRITEVAR, valueslen); @@ -82,12 +86,12 @@ void DGUSDisplay::WriteVariable(uint16_t adr, const void* values, uint8_t values } void DGUSDisplay::WriteVariable(uint16_t adr, uint16_t value) { - value = (value & 0xffU) << 8U | (value >> 8U); + value = (value & 0xFFU) << 8U | (value >> 8U); WriteVariable(adr, static_cast(&value), sizeof(uint16_t)); } void DGUSDisplay::WriteVariable(uint16_t adr, int16_t value) { - value = (value & 0xffU) << 8U | (value >> 8U); + value = (value & 0xFFU) << 8U | (value >> 8U); WriteVariable(adr, static_cast(&value), sizeof(uint16_t)); } @@ -99,18 +103,24 @@ void DGUSDisplay::WriteVariable(uint16_t adr, int8_t value) { WriteVariable(adr, static_cast(&value), sizeof(int8_t)); } +#if ENABLED(DGUS_LCD_UI_MKS) + void DGUSDisplay::MKS_WriteVariable(uint16_t adr, uint8_t value) { + WriteVariable(adr, static_cast(&value), sizeof(uint8_t)); + } +#endif + void DGUSDisplay::WriteVariable(uint16_t adr, long value) { - union { long l; char lb[4]; } endian; - char tmp[4]; - endian.l = value; - tmp[0] = endian.lb[3]; - tmp[1] = endian.lb[2]; - tmp[2] = endian.lb[1]; - tmp[3] = endian.lb[0]; - WriteVariable(adr, static_cast(&tmp), sizeof(long)); + union { long l; char lb[4]; } endian; + char tmp[4]; + endian.l = value; + tmp[0] = endian.lb[3]; + tmp[1] = endian.lb[2]; + tmp[2] = endian.lb[1]; + tmp[3] = endian.lb[0]; + WriteVariable(adr, static_cast(&tmp), sizeof(long)); } -void DGUSDisplay::WriteVariablePGM(uint16_t adr, const void* values, uint8_t valueslen, bool isstr) { +void DGUSDisplay::WriteVariablePGM(uint16_t adr, const void *values, uint8_t valueslen, bool isstr) { const char* myvalues = static_cast(values); bool strend = !myvalues; WriteHeader(adr, DGUS_CMD_WRITEVAR, valueslen); @@ -144,19 +154,19 @@ void DGUSDisplay::ProcessRx() { case DGUS_IDLE: // Waiting for the first header byte receivedbyte = LCD_SERIAL.read(); - //DEBUG_ECHOPAIR("< ",x); + //DEBUG_ECHOPGM("< ",x); if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN; break; case DGUS_HEADER1_SEEN: // Waiting for the second header byte receivedbyte = LCD_SERIAL.read(); - //DEBUG_ECHOPAIR(" ",x); + //DEBUG_ECHOPGM(" ",x); rx_datagram_state = (DGUS_HEADER2 == receivedbyte) ? DGUS_HEADER2_SEEN : DGUS_IDLE; break; case DGUS_HEADER2_SEEN: // Waiting for the length byte rx_datagram_len = LCD_SERIAL.read(); - DEBUG_ECHOPAIR(" (", rx_datagram_len, ") "); + DEBUG_ECHOPGM(" (", rx_datagram_len, ") "); // Telegram min len is 3 (command and one word of payload) rx_datagram_state = WITHIN(rx_datagram_len, 3, DGUS_RX_BUFFER_SIZE) ? DGUS_WAIT_TELEGRAM : DGUS_IDLE; @@ -168,14 +178,14 @@ void DGUSDisplay::ProcessRx() { Initialized = true; // We've talked to it, so we defined it as initialized. uint8_t command = LCD_SERIAL.read(); - DEBUG_ECHOPAIR("# ", command); + DEBUG_ECHOPGM("# ", command); uint8_t readlen = rx_datagram_len - 1; // command is part of len. unsigned char tmp[rx_datagram_len - 1]; unsigned char *ptmp = tmp; while (readlen--) { receivedbyte = LCD_SERIAL.read(); - DEBUG_ECHOPAIR(" ", receivedbyte); + DEBUG_ECHOPGM(" ", receivedbyte); *ptmp++ = receivedbyte; } DEBUG_ECHOPGM(" # "); @@ -196,7 +206,7 @@ void DGUSDisplay::ProcessRx() { if (command == DGUS_CMD_READVAR) { const uint16_t vp = tmp[0] << 8 | tmp[1]; //const uint8_t dlen = tmp[2] << 1; // Convert to Bytes. (Display works with words) - //DEBUG_ECHOPAIR(" vp=", vp, " dlen=", dlen); + //DEBUG_ECHOPGM(" vp=", vp, " dlen=", dlen); DGUS_VP_Variable ramcopy; if (populate_VPVar(vp, &ramcopy)) { if (ramcopy.set_by_display_handler) @@ -205,7 +215,7 @@ void DGUSDisplay::ProcessRx() { DEBUG_ECHOLNPGM(" VPVar found, no handler."); } else - DEBUG_ECHOLNPAIR(" VPVar not found:", vp); + DEBUG_ECHOLNPGM(" VPVar not found:", vp); rx_datagram_state = DGUS_IDLE; break; @@ -250,12 +260,12 @@ bool DGUSDisplay::no_reentrance = false; #define sw_barrier() asm volatile("": : :"memory"); bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy) { - // DEBUG_ECHOPAIR("populate_VPVar ", VP); + // DEBUG_ECHOPGM("populate_VPVar ", VP); const DGUS_VP_Variable *pvp = DGUSLCD_FindVPVar(VP); - // DEBUG_ECHOLNPAIR(" pvp ", (uint16_t )pvp); + // DEBUG_ECHOLNPGM(" pvp ", (uint16_t )pvp); if (!pvp) return false; memcpy_P(ramcopy, pvp, sizeof(DGUS_VP_Variable)); return true; } -#endif // HAS_DGUS_LCD +#endif // HAS_DGUS_LCD_CLASSIC diff --git a/Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.h b/Marlin/src/lcd/extui/dgus/DGUSDisplay.h similarity index 84% rename from Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.h rename to Marlin/src/lcd/extui/dgus/DGUSDisplay.h index 88c119566cc1..e486a0014570 100644 --- a/Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.h +++ b/Marlin/src/lcd/extui/dgus/DGUSDisplay.h @@ -21,21 +21,24 @@ */ #pragma once -/* DGUS implementation written by coldtobi in 2019 for Marlin */ +/** + * lcd/extui/dgus/DGUSDisplay.h + */ -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #include // size_t #if HAS_BED_PROBE - #include "../../../../module/probe.h" + #include "../../../module/probe.h" #endif #include "DGUSVPVariable.h" enum DGUSLCD_Screens : uint8_t; +//#define DEBUG_DGUSLCD #define DEBUG_OUT ENABLED(DEBUG_DGUSLCD) -#include "../../../../core/debug_out.h" +#include "../../../core/debug_out.h" typedef enum : uint8_t { DGUS_IDLE, //< waiting for DGUS_HEADER1. @@ -53,13 +56,15 @@ class DGUSDisplay { static void InitDisplay(); // Variable access. - static void WriteVariable(uint16_t adr, const void* values, uint8_t valueslen, bool isstr=false); - static void WriteVariablePGM(uint16_t adr, const void* values, uint8_t valueslen, bool isstr=false); + static void WriteVariable(uint16_t adr, const void *values, uint8_t valueslen, bool isstr=false); + static void WriteVariablePGM(uint16_t adr, const void *values, uint8_t valueslen, bool isstr=false); static void WriteVariable(uint16_t adr, int16_t value); static void WriteVariable(uint16_t adr, uint16_t value); static void WriteVariable(uint16_t adr, uint8_t value); static void WriteVariable(uint16_t adr, int8_t value); static void WriteVariable(uint16_t adr, long value); + static void MKS_WriteVariable(uint16_t adr, uint8_t value); + // Utility functions for bridging ui_api and dbus template @@ -88,7 +93,7 @@ class DGUSDisplay { // Helper for users of this class to estimate if an interaction would be blocking. static size_t GetFreeTxBuffer(); - // Checks two things: Can we confirm the presence of the display and has we initiliazed it. + // Checks two things: Can we confirm the presence of the display and has we initialized it. // (both boils down that the display answered to our chatting) static inline bool isInitialized() { return Initialized; } @@ -103,16 +108,16 @@ class DGUSDisplay { static bool Initialized, no_reentrance; }; -#define GET_VARIABLE(f, t, V...) (&DGUSDisplay::GetVariable) -#define SET_VARIABLE(f, t, V...) (&DGUSDisplay::SetVariable) - extern DGUSDisplay dgusdisplay; // compile-time x^y constexpr float cpow(const float x, const int y) { return y == 0 ? 1.0 : x * cpow(x, y - 1); } +/// +const uint16_t* DGUSLCD_FindScreenVPMapList(uint8_t screen); + /// Find the flash address of a DGUS_VP_Variable for the VP. -extern const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp); +const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp); /// Helper to populate a DGUS_VP_Variable for a given VP. Return false if not found. -extern bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy); +bool populate_VPVar(const uint16_t VP, DGUS_VP_Variable * const ramcopy); diff --git a/Marlin/src/lcd/extui/lib/dgus/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/DGUSDisplayDef.h similarity index 85% rename from Marlin/src/lcd/extui/lib/dgus/DGUSDisplayDef.h rename to Marlin/src/lcd/extui/dgus/DGUSDisplayDef.h index b34a04875d1a..9cbcf0dd7b12 100644 --- a/Marlin/src/lcd/extui/lib/dgus/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/DGUSDisplayDef.h @@ -21,15 +21,16 @@ */ #pragma once -/* DGUS implementation written by coldtobi in 2019 for Marlin */ +/** + * lcd/extui/dgus/DGUSDisplayDef.h + * Defines the interaction between Marlin and the display firmware + */ #include "DGUSVPVariable.h" #include -// This file defines the interaction between Marlin and the display firmware. - -// information on which screen which VP is displayed +// Information on which screen which VP is displayed. // As this is a sparse table, two arrays are needed: // one to list the VPs of one screen and one to map screens to the lists. // (Strictly this would not be necessary, but allows to only send data the display needs and reducing load on Marlin) @@ -43,10 +44,12 @@ extern const struct VPMapping VPMap[]; // List of VPs handled by Marlin / The Display. extern const struct DGUS_VP_Variable ListOfVP[]; -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" #if ENABLED(DGUS_LCD_UI_ORIGIN) #include "origin/DGUSDisplayDef.h" +#elif ENABLED(DGUS_LCD_UI_MKS) + #include "mks/DGUSDisplayDef.h" #elif ENABLED(DGUS_LCD_UI_FYSETC) #include "fysetc/DGUSDisplayDef.h" #elif ENABLED(DGUS_LCD_UI_HIPRECY) diff --git a/Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp similarity index 52% rename from Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp rename to Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp index 77feacf4a942..16576f7039ae 100644 --- a/Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp @@ -20,40 +20,29 @@ * */ -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" -#if HAS_DGUS_LCD +#if HAS_DGUS_LCD_CLASSIC #include "DGUSScreenHandler.h" -#include "DGUSDisplay.h" -#include "DGUSVPVariable.h" -#include "DGUSDisplayDef.h" - -#include "../../ui_api.h" -#include "../../../../MarlinCore.h" -#include "../../../../module/temperature.h" -#include "../../../../module/motion.h" -#include "../../../../gcode/queue.h" -#include "../../../../module/planner.h" -#include "../../../../sd/cardreader.h" -#include "../../../../libs/duration_t.h" -#include "../../../../module/printcounter.h" + +#include "../../../MarlinCore.h" +#include "../../../gcode/queue.h" +#include "../../../libs/duration_t.h" +#include "../../../module/settings.h" +#include "../../../module/temperature.h" +#include "../../../module/motion.h" +#include "../../../module/planner.h" +#include "../../../module/printcounter.h" +#include "../../../sd/cardreader.h" #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../feature/powerloss.h" #endif -uint16_t DGUSScreenHandler::ConfirmVP; +DGUSScreenHandler ScreenHandler; -#if ENABLED(SDSUPPORT) - int16_t DGUSScreenHandler::top_file = 0; - int16_t DGUSScreenHandler::file_to_print = 0; - static ExtUI::FileList filelist; -#endif - -void (*DGUSScreenHandler::confirm_action_cb)() = nullptr; - -//DGUSScreenHandler ScreenHandler; +uint16_t DGUSScreenHandler::ConfirmVP; DGUSLCD_Screens DGUSScreenHandler::current_screen; DGUSLCD_Screens DGUSScreenHandler::past_screens[NUM_PAST_SCREENS]; @@ -61,12 +50,19 @@ uint8_t DGUSScreenHandler::update_ptr; uint16_t DGUSScreenHandler::skipVP; bool DGUSScreenHandler::ScreenComplete; -//DGUSDisplay dgusdisplay; +void (*DGUSScreenHandler::confirm_action_cb)() = nullptr; + +#if ENABLED(SDSUPPORT) + int16_t DGUSScreenHandler::top_file = 0, + DGUSScreenHandler::file_to_print = 0; + static ExtUI::FileList filelist; +#endif -// endianness swap -uint16_t swap16(const uint16_t value) { return (value & 0xffU) << 8U | (value >> 8U); } +#if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + filament_data_t filament_data; +#endif -void DGUSScreenHandler::sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool l4inflash) { +void DGUSScreenHandler::sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool l4inflash) { DGUS_VP_Variable ramcopy; if (populate_VPVar(VP_MSGSTR1, &ramcopy)) { ramcopy.memadr = (void*) line1; @@ -86,15 +82,13 @@ void DGUSScreenHandler::sendinfoscreen(const char* line1, const char* line2, con } } -void DGUSScreenHandler::HandleUserConfirmationPopUp(uint16_t VP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1, bool l2, bool l3, bool l4) { - if (current_screen == DGUSLCD_SCREEN_CONFIRM) { - // Already showing a pop up, so we need to cancel that first. +void DGUSScreenHandler::HandleUserConfirmationPopUp(uint16_t VP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1, bool l2, bool l3, bool l4) { + if (current_screen == DGUSLCD_SCREEN_CONFIRM) // Already showing a pop up, so we need to cancel that first. PopToOldScreen(); - } ConfirmVP = VP; sendinfoscreen(line1, line2, line3, line4, l1, l2, l3, l4); - ScreenHandler.GotoScreen(DGUSLCD_SCREEN_CONFIRM); + GotoScreen(DGUSLCD_SCREEN_CONFIRM); } void DGUSScreenHandler::setstatusmessage(const char *msg) { @@ -116,8 +110,8 @@ void DGUSScreenHandler::setstatusmessagePGM(PGM_P const msg) { // Send an 8 bit or 16 bit value to the display. void DGUSScreenHandler::DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - //DEBUG_ECHOPAIR(" DGUS_LCD_SendWordValueToDisplay ", var.VP); - //DEBUG_ECHOLNPAIR(" data ", *(uint16_t *)var.memadr); + //DEBUG_ECHOPGM(" DGUS_LCD_SendWordValueToDisplay ", var.VP); + //DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr); if (var.size > 1) dgusdisplay.WriteVariable(var.VP, *(int16_t*)var.memadr); else @@ -128,9 +122,9 @@ void DGUSScreenHandler::DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var) { // Send an uint8_t between 0 and 255 to the display, but scale to a percentage (0..100) void DGUSScreenHandler::DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - //DEBUG_ECHOPAIR(" DGUS_LCD_SendWordValueToDisplay ", var.VP); - //DEBUG_ECHOLNPAIR(" data ", *(uint16_t *)var.memadr); - uint16_t tmp = *(uint8_t *) var.memadr +1 ; // +1 -> avoid rounding issues for the display. + //DEBUG_ECHOPGM(" DGUS_LCD_SendWordValueToDisplay ", var.VP); + //DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr); + uint16_t tmp = *(uint8_t *) var.memadr + 1; // +1 -> avoid rounding issues for the display. tmp = map(tmp, 0, 255, 0, 100); dgusdisplay.WriteVariable(var.VP, tmp); } @@ -138,9 +132,9 @@ void DGUSScreenHandler::DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var) { // Send the current print progress to the display. void DGUSScreenHandler::DGUSLCD_SendPrintProgressToDisplay(DGUS_VP_Variable &var) { - //DEBUG_ECHOPAIR(" DGUSLCD_SendPrintProgressToDisplay ", var.VP); + //DEBUG_ECHOPGM(" DGUSLCD_SendPrintProgressToDisplay ", var.VP); uint16_t tmp = ExtUI::getProgress_percent(); - //DEBUG_ECHOLNPAIR(" data ", tmp); + //DEBUG_ECHOLNPGM(" data ", tmp); dgusdisplay.WriteVariable(var.VP, tmp); } @@ -157,7 +151,9 @@ void DGUSScreenHandler::DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var) { void DGUSScreenHandler::DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr) { if (var.memadr) { uint16_t value = swap16(*(uint16_t*)val_ptr); + DEBUG_ECHOLNPGM("FAN value get:", value); *(uint8_t*)var.memadr = map(constrain(value, 0, 100), 0, 100, 0, 255); + DEBUG_ECHOLNPGM("FAN value change:", *(uint8_t*)var.memadr); } } @@ -180,10 +176,11 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) { #if HAS_PID_HEATING void DGUSScreenHandler::DGUSLCD_SendTemperaturePID(DGUS_VP_Variable &var) { float value = *(float *)var.memadr; + value /= 10; float valuesend = 0; switch (var.VP) { default: return; - #if HOTENDS >= 1 + #if HAS_HOTEND case VP_E0_PID_P: valuesend = value; break; case VP_E0_PID_I: valuesend = unscalePID_i(value); break; case VP_E0_PID_D: valuesend = unscalePID_d(value); break; @@ -234,22 +231,24 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) { // Send fan status value to the display. #if HAS_FAN + void DGUSScreenHandler::DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - DEBUG_ECHOPAIR(" DGUSLCD_SendFanStatusToDisplay ", var.VP); - DEBUG_ECHOLNPAIR(" data ", *(uint8_t *)var.memadr); + DEBUG_ECHOPGM(" DGUSLCD_SendFanStatusToDisplay ", var.VP); + DEBUG_ECHOLNPGM(" data ", *(uint8_t *)var.memadr); uint16_t data_to_send = 0; if (*(uint8_t *) var.memadr) data_to_send = 1; dgusdisplay.WriteVariable(var.VP, data_to_send); } } + #endif // Send heater status value to the display. void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { - DEBUG_ECHOPAIR(" DGUSLCD_SendHeaterStatusToDisplay ", var.VP); - DEBUG_ECHOLNPAIR(" data ", *(int16_t *)var.memadr); + DEBUG_ECHOPGM(" DGUSLCD_SendHeaterStatusToDisplay ", var.VP); + DEBUG_ECHOLNPGM(" data ", *(int16_t *)var.memadr); uint16_t data_to_send = 0; if (*(int16_t *) var.memadr) data_to_send = 1; dgusdisplay.WriteVariable(var.VP, data_to_send); @@ -257,19 +256,21 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) } #if ENABLED(DGUS_UI_WAITING) + void DGUSScreenHandler::DGUSLCD_SendWaitingStatusToDisplay(DGUS_VP_Variable &var) { // In FYSETC UI design there are 10 statuses to loop static uint16_t period = 0; static uint16_t index = 0; - //DEBUG_ECHOPAIR(" DGUSLCD_SendWaitingStatusToDisplay ", var.VP); - //DEBUG_ECHOLNPAIR(" data ", swap16(index)); + //DEBUG_ECHOPGM(" DGUSLCD_SendWaitingStatusToDisplay ", var.VP); + //DEBUG_ECHOLNPGM(" data ", swap16(index)); if (period++ > DGUS_UI_WAITING_STATUS_PERIOD) { dgusdisplay.WriteVariable(var.VP, index); - //DEBUG_ECHOLNPAIR(" data ", swap16(index)); + //DEBUG_ECHOLNPGM(" data ", swap16(index)); if (++index >= DGUS_UI_WAITING_STATUS) index = 0; period = 0; } } + #endif #if ENABLED(SDSUPPORT) @@ -306,7 +307,7 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) const int16_t scroll = (int16_t)swap16(*(uint16_t*)val_ptr); if (scroll) { top_file += scroll; - DEBUG_ECHOPAIR("new topfile calculated:", top_file); + DEBUG_ECHOPGM("new topfile calculated:", top_file); if (top_file < 0) { top_file = 0; DEBUG_ECHOLNPGM("Top of filelist reached"); @@ -316,10 +317,10 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) NOLESS(max_top, 0); NOMORE(top_file, max_top); } - DEBUG_ECHOPAIR("new topfile adjusted:", top_file); + DEBUG_ECHOPGM("new topfile adjusted:", top_file); } else if (!filelist.isAtRootDir()) { - filelist.upDir(); + IF_DISABLED(DGUS_LCD_UI_MKS, filelist.upDir()); top_file = 0; ForceCompleteUpdate(); } @@ -327,54 +328,6 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) if (old_top != top_file) ForceCompleteUpdate(); } - void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) { - uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file; - if (touched_nr > filelist.count()) return; - if (!filelist.seek(touched_nr)) return; - if (filelist.isDir()) { - filelist.changeDir(filelist.filename()); - top_file = 0; - ForceCompleteUpdate(); - return; - } - - #if ENABLED(DGUS_PRINT_FILENAME) - // Send print filename - dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), VP_SD_FileName_LEN, true); - #endif - - // Setup Confirmation screen - file_to_print = touched_nr; - HandleUserConfirmationPopUp(VP_SD_FileSelectConfirm, nullptr, PSTR("Print file"), filelist.filename(), PSTR("from SD Card?"), true, true, false, true); - } - - void DGUSScreenHandler::DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr) { - if (!filelist.seek(file_to_print)) return; - ExtUI::printFile(filelist.shortFilename()); - ScreenHandler.GotoScreen( - #if ENABLED(DGUS_LCD_UI_ORIGIN) - DGUSLCD_SCREEN_STATUS - #else - DGUSLCD_SCREEN_SDPRINTMANIPULATION - #endif - ); - } - - void DGUSScreenHandler::DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr) { - if (!ExtUI::isPrintingFromMedia()) return; // avoid race condition when user stays in this menu and printer finishes. - switch (swap16(*(uint16_t*)val_ptr)) { - case 0: // Resume - if (ExtUI::isPrintingFromMediaPaused()) ExtUI::resumePrint(); - break; - case 1: // Pause - if (!ExtUI::isPrintingFromMediaPaused()) ExtUI::pausePrint(); - break; - case 2: // Abort - ScreenHandler.HandleUserConfirmationPopUp(VP_SD_AbortPrintConfirmed, nullptr, PSTR("Abort printing"), filelist.filename(), PSTR("?"), true, true, false, true); - break; - } - } - void DGUSScreenHandler::DGUSLCD_SD_ReallyAbort(DGUS_VP_Variable &var, void *val_ptr) { ExtUI::stopPrint(); GotoScreen(DGUSLCD_SCREEN_MAIN); @@ -385,38 +338,12 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var) GotoScreen(DGUSLCD_SCREEN_SDPRINTTUNE); } - void DGUSScreenHandler::DGUSLCD_SD_SendFilename(DGUS_VP_Variable& var) { - uint16_t target_line = (var.VP - VP_SD_FileName0) / VP_SD_FileName_LEN; - if (target_line > DGUS_SD_FILESPERSCREEN) return; - char tmpfilename[VP_SD_FileName_LEN + 1] = ""; - var.memadr = (void*)tmpfilename; - if (filelist.seek(top_file + target_line)) - snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s%c"), filelist.filename(), filelist.isDir() ? '/' : 0); - DGUSLCD_SendStringToDisplay(var); - } - - void DGUSScreenHandler::SDCardInserted() { - top_file = 0; - filelist.refresh(); - auto cs = ScreenHandler.getCurrentScreen(); - if (cs == DGUSLCD_SCREEN_MAIN || cs == DGUSLCD_SCREEN_STATUS) - ScreenHandler.GotoScreen(DGUSLCD_SCREEN_SDFILELIST); - } - - void DGUSScreenHandler::SDCardRemoved() { - if (current_screen == DGUSLCD_SCREEN_SDFILELIST - || (current_screen == DGUSLCD_SCREEN_CONFIRM && (ConfirmVP == VP_SD_AbortPrintConfirmed || ConfirmVP == VP_SD_FileSelectConfirm)) - || current_screen == DGUSLCD_SCREEN_SDPRINTMANIPULATION - ) ScreenHandler.GotoScreen(DGUSLCD_SCREEN_MAIN); - } - void DGUSScreenHandler::SDCardError() { DGUSScreenHandler::SDCardRemoved(); - ScreenHandler.sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("SD card error"), nullptr, true, true, true, true); - ScreenHandler.SetupConfirmAction(nullptr); - ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POPUP); + sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("SD card error"), nullptr, true, true, true, true); + SetupConfirmAction(nullptr); + GotoScreen(DGUSLCD_SCREEN_POPUP); } - #endif // SDSUPPORT void DGUSScreenHandler::ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr) { @@ -428,7 +355,7 @@ void DGUSScreenHandler::ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr) const uint16_t* DGUSLCD_FindScreenVPMapList(uint8_t screen) { const uint16_t *ret; const struct VPMapping *map = VPMap; - while (ret = (uint16_t*) pgm_read_ptr(&(map->VPList))) { + while ((ret = (uint16_t*) pgm_read_ptr(&(map->VPList)))) { if (pgm_read_byte(&(map->screen)) == screen) return ret; map++; } @@ -444,7 +371,7 @@ const DGUS_VP_Variable* DGUSLCD_FindVPVar(const uint16_t vp) { ++ret; } while (1); - DEBUG_ECHOLNPAIR("FindVPVar NOT FOUND ", vp); + DEBUG_ECHOLNPGM("FindVPVar NOT FOUND ", vp); return nullptr; } @@ -455,80 +382,59 @@ void DGUSScreenHandler::ScreenChangeHookIfIdle(DGUS_VP_Variable &var, void *val_ } } -void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { - uint8_t *tmp = (uint8_t*)val_ptr; - - // The keycode in target is coded as , so 0x0100A means - // from screen 1 (main) to 10 (temperature). DGUSLCD_SCREEN_POPUP is special, - // meaning "return to previous screen" - DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1]; - - if (target == DGUSLCD_SCREEN_POPUP) { - // special handling for popup is to return to previous menu - if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb(); - PopToOldScreen(); - return; - } - - UpdateNewScreen(target); - - #ifdef DEBUG_DGUSLCD - if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPAIR("WARNING: No screen Mapping found for ", target); - #endif -} - void DGUSScreenHandler::HandleAllHeatersOff(DGUS_VP_Variable &var, void *val_ptr) { thermalManager.disable_all_heaters(); - ScreenHandler.ForceCompleteUpdate(); // hint to send all data. + ForceCompleteUpdate(); // hint to send all data. } void DGUSScreenHandler::HandleTemperatureChanged(DGUS_VP_Variable &var, void *val_ptr) { - uint16_t newvalue = swap16(*(uint16_t*)val_ptr); - uint16_t acceptedvalue; + celsius_t newvalue = swap16(*(uint16_t*)val_ptr); + celsius_t acceptedvalue; switch (var.VP) { default: return; - #if HOTENDS >= 1 + #if HAS_HOTEND case VP_T_E0_Set: + NOMORE(newvalue, HEATER_0_MAXTEMP); thermalManager.setTargetHotend(newvalue, 0); - acceptedvalue = thermalManager.temp_hotend[0].target; + acceptedvalue = thermalManager.degTargetHotend(0); break; #endif #if HOTENDS >= 2 case VP_T_E1_Set: + NOMORE(newvalue, HEATER_1_MAXTEMP); thermalManager.setTargetHotend(newvalue, 1); - acceptedvalue = thermalManager.temp_hotend[1].target; - break; + acceptedvalue = thermalManager.degTargetHotend(1); + break; #endif #if HAS_HEATED_BED case VP_T_Bed_Set: + NOMORE(newvalue, BED_MAXTEMP); thermalManager.setTargetBed(newvalue); - acceptedvalue = thermalManager.temp_bed.target; + acceptedvalue = thermalManager.degTargetBed(); break; #endif } // reply to display the new value to update the view if the new value was rejected by the Thermal Manager. if (newvalue != acceptedvalue && var.send_to_display_handler) var.send_to_display_handler(var); - ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } void DGUSScreenHandler::HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_ptr) { - #if EXTRUDERS + #if HAS_EXTRUDERS uint16_t newvalue = swap16(*(uint16_t*)val_ptr); uint8_t target_extruder; switch (var.VP) { default: return; - #if HOTENDS >= 1 - case VP_Flowrate_E0: target_extruder = 0; break; - #endif - #if HOTENDS >= 2 + case VP_Flowrate_E0: target_extruder = 0; break; + #if HAS_MULTI_EXTRUDER case VP_Flowrate_E1: target_extruder = 1; break; #endif } planner.set_flow(target_extruder, newvalue); - ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel #else UNUSED(var); UNUSED(val_ptr); #endif @@ -542,11 +448,11 @@ void DGUSScreenHandler::HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr ExtUI::extruder_t target_extruder; switch (var.VP) { - #if HOTENDS >= 1 + #if HAS_HOTEND case VP_MOVE_E0: target_extruder = ExtUI::extruder_t::E0; break; - #endif - #if HOTENDS >= 2 - case VP_MOVE_E1: target_extruder = ExtUI::extruder_t::E1; break; + #if HAS_MULTI_EXTRUDER + case VP_MOVE_E1: target_extruder = ExtUI::extruder_t::E1; break; + #endif #endif default: return; } @@ -563,97 +469,6 @@ void DGUSScreenHandler::HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr } #endif -void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { - DEBUG_ECHOLNPGM("HandleManualMove"); - - int16_t movevalue = swap16(*(uint16_t*)val_ptr); - #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) - if (movevalue) { - const uint16_t choice = *(uint16_t*)var.memadr; - movevalue = movevalue < 0 ? -choice : choice; - } - #endif - char axiscode; - unsigned int speed = 1500; //FIXME: get default feedrate for manual moves, dont hardcode. - - switch (var.VP) { - default: return; - - case VP_MOVE_X: - axiscode = 'X'; - if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove; - break; - - case VP_MOVE_Y: - axiscode = 'Y'; - if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove; - break; - - case VP_MOVE_Z: - axiscode = 'Z'; - speed = 300; // default to 5mm/s - if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove; - break; - - case VP_HOME_ALL: // only used for homing - axiscode = '\0'; - movevalue = 0; // ignore value sent from display, this VP is _ONLY_ for homing. - break; - } - - if (!movevalue) { - // homing - DEBUG_ECHOPAIR(" homing ", axiscode); - char buf[6] = "G28 X"; - buf[4] = axiscode; - //DEBUG_ECHOPAIR(" ", buf); - queue.enqueue_one_now(buf); - //DEBUG_ECHOLNPGM(" ✓"); - ScreenHandler.ForceCompleteUpdate(); - return; - } - else { - //movement - DEBUG_ECHOPAIR(" move ", axiscode); - bool old_relative_mode = relative_mode; - if (!relative_mode) { - //DEBUG_ECHOPGM(" G91"); - queue.enqueue_now_P(PSTR("G91")); - //DEBUG_ECHOPGM(" ✓ "); - } - char buf[32]; // G1 X9999.99 F12345 - unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s); - char sign[]="\0"; - int16_t value = movevalue / 100; - if (movevalue < 0) { value = -value; sign[0] = '-'; } - int16_t fraction = ABS(movevalue) % 100; - snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed); - //DEBUG_ECHOPAIR(" ", buf); - queue.enqueue_one_now(buf); - //DEBUG_ECHOLNPGM(" ✓ "); - if (backup_speed != speed) { - snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); - queue.enqueue_one_now(buf); - //DEBUG_ECHOPAIR(" ", buf); - } - //while (!enqueue_and_echo_command(buf)) idle(); - //DEBUG_ECHOLNPGM(" ✓ "); - if (!old_relative_mode) { - //DEBUG_ECHOPGM("G90"); - queue.enqueue_now_P(PSTR("G90")); - //DEBUG_ECHOPGM(" ✓ "); - } - } - - ScreenHandler.ForceCompleteUpdate(); - DEBUG_ECHOLNPGM("manmv done."); - return; - - cannotmove: - DEBUG_ECHOLNPAIR(" cannot move ", axiscode); - return; -} - void DGUSScreenHandler::HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_ptr) { DEBUG_ECHOLNPGM("HandleMotorLockUnlock"); @@ -661,26 +476,10 @@ void DGUSScreenHandler::HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_p const int16_t lock = swap16(*(uint16_t*)val_ptr); strcpy_P(buf, lock ? PSTR("M18") : PSTR("M17")); - //DEBUG_ECHOPAIR(" ", buf); + //DEBUG_ECHOPGM(" ", buf); queue.enqueue_one_now(buf); } -#if ENABLED(POWER_LOSS_RECOVERY) - - void DGUSScreenHandler::HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr) { - uint16_t value = swap16(*(uint16_t*)val_ptr); - if (value) { - queue.inject_P(PSTR("M1000")); - ScreenHandler.GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION); - } - else { - recovery.cancel(); - ScreenHandler.GotoScreen(DGUSLCD_SCREEN_STATUS); - } - } - -#endif - void DGUSScreenHandler::HandleSettings(DGUS_VP_Variable &var, void *val_ptr) { DEBUG_ECHOLNPGM("HandleSettings"); uint16_t value = swap16(*(uint16_t*)val_ptr); @@ -688,10 +487,11 @@ void DGUSScreenHandler::HandleSettings(DGUS_VP_Variable &var, void *val_ptr) { default: break; case 1: TERN_(PRINTCOUNTER, print_job_timer.initStats()); - queue.inject_P(PSTR("M502\nM500")); + settings.reset(); + settings.save(); break; - case 2: queue.inject_P(PSTR("M501")); break; - case 3: queue.inject_P(PSTR("M500")); break; + case 2: settings.load(); break; + case 3: settings.save(); break; } } @@ -699,8 +499,8 @@ void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ DEBUG_ECHOLNPGM("HandleStepPerMMChanged"); uint16_t value_raw = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("value_raw:", value_raw); - float value = (float)value_raw/10; + DEBUG_ECHOLNPGM("value_raw:", value_raw); + float value = (float)value_raw / 10; ExtUI::axis_t axis; switch (var.VP) { case VP_X_STEP_PER_MM: axis = ExtUI::axis_t::X; break; @@ -711,7 +511,7 @@ void DGUSScreenHandler::HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ DEBUG_ECHOLNPAIR_F("value:", value); ExtUI::setAxisSteps_per_mm(value, axis); DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(axis)); - ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel return; } @@ -719,57 +519,25 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo DEBUG_ECHOLNPGM("HandleStepPerMMExtruderChanged"); uint16_t value_raw = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("value_raw:", value_raw); - float value = (float)value_raw/10; + DEBUG_ECHOLNPGM("value_raw:", value_raw); + float value = (float)value_raw / 10; ExtUI::extruder_t extruder; switch (var.VP) { default: return; - #if HOTENDS >= 1 - case VP_E0_STEP_PER_MM: extruder = ExtUI::extruder_t::E0; break; - #endif - #if HOTENDS >= 2 - case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break; - #endif + #if HAS_EXTRUDERS + case VP_E0_STEP_PER_MM: extruder = ExtUI::extruder_t::E0; break; + #if HAS_MULTI_EXTRUDER + case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break; + #endif + #endif } DEBUG_ECHOLNPAIR_F("value:", value); - ExtUI::setAxisSteps_per_mm(value,extruder); + ExtUI::setAxisSteps_per_mm(value, extruder); DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(extruder)); - ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel - return; + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel } #if HAS_PID_HEATING - void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) { - uint16_t rawvalue = swap16(*(uint16_t*)val_ptr); - DEBUG_ECHOLNPAIR("V1:", rawvalue); - float value = (float)rawvalue / 10; - DEBUG_ECHOLNPAIR("V2:", value); - float newvalue = 0; - - switch (var.VP) { - default: return; - #if HOTENDS >= 1 - case VP_E0_PID_P: newvalue = value; break; - case VP_E0_PID_I: newvalue = scalePID_i(value); break; - case VP_E0_PID_D: newvalue = scalePID_d(value); break; - #endif - #if HOTENDS >= 2 - case VP_E1_PID_P: newvalue = value; break; - case VP_E1_PID_I: newvalue = scalePID_i(value); break; - case VP_E1_PID_D: newvalue = scalePID_d(value); break; - #endif - #if HAS_HEATED_BED - case VP_BED_PID_P: newvalue = value; break; - case VP_BED_PID_I: newvalue = scalePID_i(value); break; - case VP_BED_PID_D: newvalue = scalePID_d(value); break; - #endif - } - - DEBUG_ECHOLNPAIR_F("V3:", newvalue); - *(float *)var.memadr = newvalue; - ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel - } - void DGUSScreenHandler::HandlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr) { DEBUG_ECHOLNPGM("HandlePIDAutotune"); @@ -777,23 +545,23 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo switch (var.VP) { default: break; - #if ENABLED(PIDTEMP) - #if HOTENDS >= 1 - case VP_PID_AUTOTUNE_E0: // Autotune Extruder 0 - sprintf(buf, "M303 E%d C5 S210 U1", ExtUI::extruder_t::E0); - break; + #if ENABLED(PIDTEMP) + #if HAS_HOTEND + case VP_PID_AUTOTUNE_E0: // Autotune Extruder 0 + sprintf_P(buf, PSTR("M303 E%d C5 S210 U1"), ExtUI::extruder_t::E0); + break; + #endif + #if HOTENDS >= 2 + case VP_PID_AUTOTUNE_E1: + sprintf_P(buf, PSTR("M303 E%d C5 S210 U1"), ExtUI::extruder_t::E1); + break; + #endif #endif - #if HOTENDS >= 2 - case VP_PID_AUTOTUNE_E1: - sprintf(buf, "M303 E%d C5 S210 U1", ExtUI::extruder_t::E1); + #if ENABLED(PIDTEMPBED) + case VP_PID_AUTOTUNE_BED: + strcpy_P(buf, PSTR("M303 E-1 C5 S70 U1")); break; #endif - #endif - #if ENABLED(PIDTEMPBED) - case VP_PID_AUTOTUNE_BED: - sprintf(buf, "M303 E-1 C5 S70 U1"); - break; - #endif } if (buf[0]) queue.enqueue_one_now(buf); @@ -803,7 +571,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo GotoScreen(DGUSLCD_SCREEN_WAITING); #endif } -#endif +#endif // HAS_PID_HEATING #if HAS_BED_PROBE void DGUSScreenHandler::HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr) { @@ -811,19 +579,7 @@ void DGUSScreenHandler::HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, vo const float offset = float(int16_t(swap16(*(uint16_t*)val_ptr))) / 100.0f; ExtUI::setZOffset_mm(offset); - ScreenHandler.skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel - return; - } -#endif - -#if ENABLED(BABYSTEPPING) - void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) { - DEBUG_ECHOLNPGM("HandleLiveAdjustZ"); - - int16_t flag = swap16(*(uint16_t*)val_ptr); - int16_t steps = flag ? -20 : 20; - ExtUI::smartAdjustAxis_steps(steps, ExtUI::axis_t::Z, true); - ScreenHandler.ForceCompleteUpdate(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel return; } #endif @@ -840,17 +596,17 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr uint8_t preheat_temp = 0; switch (var.VP) { - #if HOTENDS >= 1 + #if HAS_HOTEND case VP_E0_CONTROL: - #endif - #if HOTENDS >= 2 - case VP_E1_CONTROL: - #endif - #if HOTENDS >= 3 - case VP_E2_CONTROL: - #endif + #if HOTENDS >= 2 + case VP_E1_CONTROL: + #if HOTENDS >= 3 + case VP_E2_CONTROL: + #endif + #endif preheat_temp = PREHEAT_1_TEMP_HOTEND; break; + #endif case VP_BED_CONTROL: preheat_temp = PREHEAT_1_TEMP_BED; @@ -866,7 +622,9 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr DEBUG_ECHOLNPGM("HandlePreheat"); uint8_t e_temp = 0; - TERN_(HAS_HEATED_BED, uint8_t bed_temp = 0); + #if HAS_HEATED_BED + uint8_t bed_temp = 0; + #endif const uint16_t preheat_option = swap16(*(uint16_t*)val_ptr); switch (preheat_option) { default: @@ -900,169 +658,69 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr switch (var.VP) { default: return; - #if HOTENDS >= 1 - case VP_E0_BED_PREHEAT: - thermalManager.setTargetHotend(e_temp, 0); - TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(bed_temp)); - break; - #endif - #if HOTENDS >= 2 - case VP_E1_BED_PREHEAT: - thermalManager.setTargetHotend(e_temp, 1); - TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(bed_temp)); - break; - #endif + #if HAS_HOTEND + case VP_E0_BED_PREHEAT: + thermalManager.setTargetHotend(e_temp, 0); + TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(bed_temp)); + break; + #endif + #if HOTENDS >= 2 + case VP_E1_BED_PREHEAT: + thermalManager.setTargetHotend(e_temp, 1); + TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(bed_temp)); + break; + #endif } // Go to the preheat screen to show the heating progress GotoScreen(DGUSLCD_SCREEN_PREHEAT); } -#endif +#endif // DGUS_PREHEAT_UI -#if ENABLED(DGUS_FILAMENT_LOADUNLOAD) - - typedef struct { - ExtUI::extruder_t extruder; // which extruder to operate - uint8_t action; // load or unload - bool heated; // heating done ? - float purge_length; // the length to extrude before unload, prevent filament jam - } filament_data_t; - - static filament_data_t filament_data; - - void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) { - DEBUG_ECHOLNPGM("HandleFilamentOption"); - - uint8_t e_temp = 0; - filament_data.heated = false; - uint16_t preheat_option = swap16(*(uint16_t*)val_ptr); - if (preheat_option <= 8) // Load filament type - filament_data.action = 1; - else if (preheat_option >= 10) { // Unload filament type - preheat_option -= 10; - filament_data.action = 2; - filament_data.purge_length = DGUS_FILAMENT_PURGE_LENGTH; - } - else // Cancel filament operation - filament_data.action = 0; - - switch (preheat_option) { - case 0: // Load PLA - #ifdef PREHEAT_1_TEMP_HOTEND - e_temp = PREHEAT_1_TEMP_HOTEND; - #endif - break; - case 1: // Load ABS - TERN_(PREHEAT_2_TEMP_HOTEND, e_temp = PREHEAT_2_TEMP_HOTEND); - break; - case 2: // Load PET - #ifdef PREHEAT_3_TEMP_HOTEND - e_temp = PREHEAT_3_TEMP_HOTEND; - #endif - break; - case 3: // Load FLEX - #ifdef PREHEAT_4_TEMP_HOTEND - e_temp = PREHEAT_4_TEMP_HOTEND; - #endif - break; - case 9: // Cool down - default: - e_temp = 0; - break; - } +#if ENABLED(POWER_LOSS_RECOVERY) - if (filament_data.action == 0) { // Go back to utility screen - #if HOTENDS >= 1 - thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E0); - #endif - #if HOTENDS >= 2 - thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1); - #endif - GotoScreen(DGUSLCD_SCREEN_UTILITY); + void DGUSScreenHandler::HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t value = swap16(*(uint16_t*)val_ptr); + if (value) { + queue.inject_P(PSTR("M1000")); + dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), 32, true); + GotoScreen(PLR_SCREEN_RECOVER); } - else { // Go to the preheat screen to show the heating progress - switch (var.VP) { - default: return; - #if HOTENDS >= 1 - case VP_E0_FILAMENT_LOAD_UNLOAD: - filament_data.extruder = ExtUI::extruder_t::E0; - thermalManager.setTargetHotend(e_temp, filament_data.extruder); - break; - #endif - #if HOTENDS >= 2 - case VP_E1_FILAMENT_LOAD_UNLOAD: - filament_data.extruder = ExtUI::extruder_t::E1; - thermalManager.setTargetHotend(e_temp, filament_data.extruder); - break; - #endif - } - GotoScreen(DGUSLCD_SCREEN_FILAMENT_HEATING); + else { + recovery.cancel(); + GotoScreen(PLR_SCREEN_CANCEL); } } - void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) { - DEBUG_ECHOLNPGM("HandleFilamentLoadUnload"); - if (filament_data.action <= 0) return; - - // If we close to the target temperature, we can start load or unload the filament - if (thermalManager.hotEnoughToExtrude(filament_data.extruder) && \ - thermalManager.targetHotEnoughToExtrude(filament_data.extruder)) { - float movevalue = DGUS_FILAMENT_LOAD_LENGTH_PER_TIME; - - if (filament_data.action == 1) { // load filament - if (!filament_data.heated) { - GotoScreen(DGUSLCD_SCREEN_FILAMENT_LOADING); - filament_data.heated = true; - } - movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder)+movevalue; - } - else { // unload filament - if (!filament_data.heated) { - GotoScreen(DGUSLCD_SCREEN_FILAMENT_UNLOADING); - filament_data.heated = true; - } - // Before unloading extrude to prevent jamming - if (filament_data.purge_length >= 0) { - movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue; - filament_data.purge_length -= movevalue; - } - else - movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) - movevalue; - } - ExtUI::setAxisPosition_mm(movevalue, filament_data.extruder); - } - } #endif void DGUSScreenHandler::UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup) { - DEBUG_ECHOLNPAIR("SetNewScreen: ", newscreen); - + DEBUG_ECHOLNPGM("SetNewScreen: ", newscreen); if (!popup) { memmove(&past_screens[1], &past_screens[0], sizeof(past_screens) - 1); past_screens[0] = current_screen; } - current_screen = newscreen; skipVP = 0; ForceCompleteUpdate(); } void DGUSScreenHandler::PopToOldScreen() { - DEBUG_ECHOLNPAIR("PopToOldScreen s=", past_screens[0]); + DEBUG_ECHOLNPGM("PopToOldScreen s=", past_screens[0]); GotoScreen(past_screens[0], true); memmove(&past_screens[0], &past_screens[1], sizeof(past_screens) - 1); past_screens[sizeof(past_screens) - 1] = DGUSLCD_SCREEN_MAIN; } void DGUSScreenHandler::UpdateScreenVPData() { - DEBUG_ECHOPAIR(" UpdateScreenVPData Screen: ", current_screen); + DEBUG_ECHOPGM(" UpdateScreenVPData Screen: ", current_screen); const uint16_t *VPList = DGUSLCD_FindScreenVPMapList(current_screen); if (!VPList) { - DEBUG_ECHOLNPAIR(" NO SCREEN FOR: ", current_screen); + DEBUG_ECHOLNPGM(" NO SCREEN FOR: ", current_screen); ScreenComplete = true; - return; // nothing to do, likely a bug or boring screen. + return; // nothing to do, likely a bug or boring screen. } // Round-robin updating of all VPs. @@ -1071,32 +729,32 @@ void DGUSScreenHandler::UpdateScreenVPData() { bool sent_one = false; do { uint16_t VP = pgm_read_word(VPList); - DEBUG_ECHOPAIR(" VP: ", VP); + DEBUG_ECHOPGM(" VP: ", VP); if (!VP) { update_ptr = 0; DEBUG_ECHOLNPGM(" UpdateScreenVPData done"); ScreenComplete = true; - return; // Screen completed. + return; // Screen completed. } if (VP == skipVP) { skipVP = 0; continue; } DGUS_VP_Variable rcpy; if (populate_VPVar(VP, &rcpy)) { - uint8_t expected_tx = 6 + rcpy.size; // expected overhead is 6 bytes + payload. + uint8_t expected_tx = 6 + rcpy.size; // expected overhead is 6 bytes + payload. // Send the VP to the display, but try to avoid overrunning the Tx Buffer. // But send at least one VP, to avoid getting stalled. if (rcpy.send_to_display_handler && (!sent_one || expected_tx <= dgusdisplay.GetFreeTxBuffer())) { - //DEBUG_ECHOPAIR(" calling handler for ", rcpy.VP); + //DEBUG_ECHOPGM(" calling handler for ", rcpy.VP); sent_one = true; rcpy.send_to_display_handler(rcpy); } else { - //auto x=dgusdisplay.GetFreeTxBuffer(); - //DEBUG_ECHOLNPAIR(" tx almost full: ", x); - //DEBUG_ECHOPAIR(" update_ptr ", update_ptr); + // auto x=dgusdisplay.GetFreeTxBuffer(); + //DEBUG_ECHOLNPGM(" tx almost full: ", x); + //DEBUG_ECHOPGM(" update_ptr ", update_ptr); ScreenComplete = false; - return; // please call again! + return; // please call again! } } @@ -1108,33 +766,10 @@ void DGUSScreenHandler::GotoScreen(DGUSLCD_Screens screen, bool ispopup) { UpdateNewScreen(screen, ispopup); } -bool DGUSScreenHandler::loop() { - dgusdisplay.loop(); - - const millis_t ms = millis(); - static millis_t next_event_ms = 0; - - if (!IsScreenComplete() || ELAPSED(ms, next_event_ms)) { - next_event_ms = ms + DGUS_UPDATE_INTERVAL_MS; - UpdateScreenVPData(); - } - - #if ENABLED(SHOW_BOOTSCREEN) - static bool booted = false; - if (!booted && TERN0(POWER_LOSS_RECOVERY, recovery.valid())) - booted = true; - if (!booted && ELAPSED(ms, BOOTSCREEN_TIMEOUT)) { - booted = true; - GotoScreen(DGUSLCD_SCREEN_MAIN); - } - #endif - return IsScreenComplete(); -} - void DGUSDisplay::RequestScreen(DGUSLCD_Screens screen) { - DEBUG_ECHOLNPAIR("GotoScreen ", screen); + DEBUG_ECHOLNPGM("GotoScreen ", screen); const unsigned char gotoscreen[] = { 0x5A, 0x01, (unsigned char) (screen >> 8U), (unsigned char) (screen & 0xFFU) }; WriteVariable(0x84, gotoscreen, sizeof(gotoscreen)); } -#endif // HAS_DGUS_LCD +#endif // HAS_DGUS_LCD_CLASSIC diff --git a/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.h new file mode 100644 index 000000000000..8ee2761c899b --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/DGUSScreenHandler.h @@ -0,0 +1,76 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * lcd/extui/dgus/DGUSScreenHandler.h + */ + +#include "../../../inc/MarlinConfigPre.h" + +#include "../ui_api.h" + +#if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + + typedef struct { + ExtUI::extruder_t extruder; // which extruder to operate + uint8_t action; // load or unload + bool heated; // heating done ? + float purge_length; // the length to extrude before unload, prevent filament jam + } filament_data_t; + + extern filament_data_t filament_data; + +#endif + +// endianness swap +inline uint16_t swap16(const uint16_t value) { return (value & 0xFFU) << 8U | (value >> 8U); } + +#if ENABLED(DGUS_LCD_UI_ORIGIN) + #include "origin/DGUSScreenHandler.h" +#elif ENABLED(DGUS_LCD_UI_MKS) + #include "mks/DGUSScreenHandler.h" +#elif ENABLED(DGUS_LCD_UI_FYSETC) + #include "fysetc/DGUSScreenHandler.h" +#elif ENABLED(DGUS_LCD_UI_HIPRECY) + #include "hiprecy/DGUSScreenHandler.h" +#endif + +extern DGUSScreenHandler ScreenHandler; + +// Helper to define a DGUS_VP_Variable for common use-cases. +#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR) { \ + .VP = VPADR, \ + .memadr = VPADRVAR, \ + .size = sizeof(VPADRVAR), \ + .set_by_display_handler = RXFPTR, \ + .send_to_display_handler = TXFPTR \ +} + +// Helper to define a DGUS_VP_Variable when the size of the var cannot be determined automatically (e.g., a string) +#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR) { \ + .VP = VPADR, \ + .memadr = VPADRVAR, \ + .size = STRLEN, \ + .set_by_display_handler = RXFPTR, \ + .send_to_display_handler = TXFPTR \ +} diff --git a/Marlin/src/lcd/extui/lib/dgus/DGUSVPVariable.h b/Marlin/src/lcd/extui/dgus/DGUSVPVariable.h similarity index 100% rename from Marlin/src/lcd/extui/lib/dgus/DGUSVPVariable.h rename to Marlin/src/lcd/extui/dgus/DGUSVPVariable.h diff --git a/Marlin/src/lcd/extui/dgus_lcd.cpp b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp similarity index 85% rename from Marlin/src/lcd/extui/dgus_lcd.cpp rename to Marlin/src/lcd/extui/dgus/dgus_extui.cpp index 9fcb6c8d1328..4f15827a4938 100644 --- a/Marlin/src/lcd/extui/dgus_lcd.cpp +++ b/Marlin/src/lcd/extui/dgus/dgus_extui.cpp @@ -21,19 +21,17 @@ */ /** - * dgus_lcd.cpp - * - * DGUS implementation for Marlin by coldtobi, Feb-May 2019 + * lcd/extui/dgus/dgus_extui.cpp */ -#include "../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" -#if HAS_DGUS_LCD +#if HAS_DGUS_LCD_CLASSIC -#include "ui_api.h" -#include "lib/dgus/DGUSDisplay.h" -#include "lib/dgus/DGUSDisplayDef.h" -#include "lib/dgus/DGUSScreenHandler.h" +#include "../ui_api.h" +#include "DGUSDisplay.h" +#include "DGUSDisplayDef.h" +#include "DGUSScreenHandler.h" namespace ExtUI { @@ -63,10 +61,10 @@ namespace ExtUI { void onUserConfirmRequired(const char * const msg) { if (msg) { ScreenHandler.sendinfoscreen(PSTR("Please confirm."), nullptr, msg, nullptr, true, true, false, true); - ScreenHandler.SetupConfirmAction(ExtUI::setUserConfirmed); + ScreenHandler.SetupConfirmAction(setUserConfirmed); ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POPUP); } - else if (ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_POPUP ) { + else if (ScreenHandler.getCurrentScreen() == DGUSLCD_SCREEN_POPUP) { ScreenHandler.SetupConfirmAction(nullptr); ScreenHandler.PopToOldScreen(); } @@ -86,7 +84,7 @@ namespace ExtUI { // into buff. // Example: - // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // static_assert(sizeof(myDataStruct) <= eeprom_data_size); // memcpy(buff, &myDataStruct, sizeof(myDataStruct)); } @@ -96,10 +94,14 @@ namespace ExtUI { // from buff // Example: - // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // static_assert(sizeof(myDataStruct) <= eeprom_data_size); // memcpy(&myDataStruct, buff, sizeof(myDataStruct)); } + void onPostprocessSettings() { + // Called after loading or resetting stored settings + } + void onConfigurationStoreWritten(bool success) { // Called after the entire EEPROM has been written, // whether successful or not. @@ -113,11 +115,11 @@ namespace ExtUI { #if HAS_MESH void onMeshLevelingStart() {} - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { // Called when any mesh points are updated } - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) { + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { // Called to indicate a special condition } #endif @@ -125,15 +127,17 @@ namespace ExtUI { #if ENABLED(POWER_LOSS_RECOVERY) void onPowerLossResume() { // Called on resume from power-loss - ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POWER_LOSS); + IF_DISABLED(DGUS_LCD_UI_MKS, ScreenHandler.GotoScreen(DGUSLCD_SCREEN_POWER_LOSS)); } #endif - #if HAS_PID_HEATING void onPidTuning(const result_t rst) { // Called for temperature PID tuning result switch (rst) { + case PID_STARTED: + ScreenHandler.setstatusmessagePGM(GET_TEXT(MSG_PID_AUTOTUNE)); + break; case PID_BAD_EXTRUDER_NUM: ScreenHandler.setstatusmessagePGM(GET_TEXT(MSG_PID_BAD_EXTRUDER_NUM)); break; @@ -155,4 +159,4 @@ namespace ExtUI { void onSteppersEnabled() {} } -#endif // HAS_DGUS_LCD +#endif // HAS_DGUS_LCD_CLASSIC diff --git a/Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp similarity index 64% rename from Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSDisplayDef.cpp rename to Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp index 467444c21459..d73a7ea552a6 100644 --- a/Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.cpp @@ -22,7 +22,7 @@ /* DGUS VPs changed by George Fu in 2019 for Marlin */ -#include "../../../../../inc/MarlinConfigPre.h" +#include "../../../../inc/MarlinConfigPre.h" #if ENABLED(DGUS_LCD_UI_FYSETC) @@ -30,12 +30,12 @@ #include "../DGUSDisplay.h" #include "../DGUSScreenHandler.h" -#include "../../../../../module/temperature.h" -#include "../../../../../module/motion.h" -#include "../../../../../module/planner.h" +#include "../../../../module/temperature.h" +#include "../../../../module/motion.h" +#include "../../../../module/planner.h" -#include "../../../ui_api.h" -#include "../../../../marlinui.h" +#include "../../ui_api.h" +#include "../../../marlinui.h" #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) uint16_t distanceToMove = 10; @@ -47,8 +47,8 @@ const uint16_t VPList_Boot[] PROGMEM = { }; const uint16_t VPList_Main[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded. */ - #if HOTENDS >= 1 + // VP_M117, for completeness, but it cannot be auto-uploaded. + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, VP_E0_STATUS, #endif #if HOTENDS >= 2 @@ -70,7 +70,7 @@ const uint16_t VPList_Main[] PROGMEM = { }; const uint16_t VPList_Temp[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, #endif #if HOTENDS >= 2 @@ -83,8 +83,8 @@ const uint16_t VPList_Temp[] PROGMEM = { }; const uint16_t VPList_Status[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ - #if HOTENDS >= 1 + // VP_M117, for completeness, but it cannot be auto-uploaded + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, #endif #if HOTENDS >= 2 @@ -104,12 +104,12 @@ const uint16_t VPList_Status[] PROGMEM = { }; const uint16_t VPList_Status2[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ - #if HOTENDS >= 1 + // VP_M117, for completeness, but it cannot be auto-uploaded + #if HAS_HOTEND VP_Flowrate_E0, - #endif - #if HOTENDS >= 2 - VP_Flowrate_E1, + #if HAS_MULTI_EXTRUDER + VP_Flowrate_E1, + #endif #endif VP_PrintProgress_Percentage, VP_PrintTime, @@ -117,7 +117,7 @@ const uint16_t VPList_Status2[] PROGMEM = { }; const uint16_t VPList_Preheat[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, #endif #if HOTENDS >= 2 @@ -135,11 +135,11 @@ const uint16_t VPList_ManualMove[] PROGMEM = { }; const uint16_t VPList_ManualExtrude[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HAS_MULTI_EXTRUDER + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif VP_EPos, 0x0000 @@ -156,23 +156,23 @@ const uint16_t VPList_SD_FlowRates[] PROGMEM = { }; const uint16_t VPList_Filament_heating[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, VP_E0_FILAMENT_LOAD_UNLOAD, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, - VP_E1_FILAMENT_LOAD_UNLOAD, + #if HAS_MULTI_EXTRUDER + VP_T_E1_Is, VP_T_E1_Set, + VP_E1_FILAMENT_LOAD_UNLOAD, + #endif #endif 0x0000 }; const uint16_t VPList_Filament_load_unload[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_E0_FILAMENT_LOAD_UNLOAD, - #endif - #if HOTENDS >= 2 - VP_E1_FILAMENT_LOAD_UNLOAD, + #if HAS_MULTI_EXTRUDER + VP_E1_FILAMENT_LOAD_UNLOAD, + #endif #endif 0x0000 }; @@ -184,7 +184,7 @@ const uint16_t VPList_SDFileList[] PROGMEM = { const uint16_t VPList_SD_PrintManipulation[] PROGMEM = { VP_PrintProgress_Percentage, VP_PrintTime, - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, #endif #if HOTENDS >= 2 @@ -204,11 +204,11 @@ const uint16_t VPList_SD_PrintManipulation[] PROGMEM = { }; const uint16_t VPList_SDPrintTune[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, VP_Flowrate_E0, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, VP_Flowrate_E1, + #if HAS_MULTI_EXTRUDER + VP_T_E1_Is, VP_T_E1_Set, VP_Flowrate_E1, // ERROR: Flowrate is per-extruder, not per-hotend + #endif #endif #if HAS_HEATED_BED VP_T_Bed_Is, VP_T_Bed_Set, @@ -222,11 +222,11 @@ const uint16_t VPList_StepPerMM[] PROGMEM = { VP_X_STEP_PER_MM, VP_Y_STEP_PER_MM, VP_Z_STEP_PER_MM, - #if HOTENDS >= 1 + #if HAS_EXTRUDERS VP_E0_STEP_PER_MM, - #endif - #if HOTENDS >= 2 - VP_E1_STEP_PER_MM, + #if HAS_MULTI_EXTRUDER + VP_E1_STEP_PER_MM, + #endif #endif 0x0000 }; @@ -265,7 +265,7 @@ const uint16_t VPList_PIDTuningWaiting[] PROGMEM = { }; const uint16_t VPList_FLCPreheat[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, #endif #if HAS_HEATED_BED @@ -275,55 +275,47 @@ const uint16_t VPList_FLCPreheat[] PROGMEM = { }; const uint16_t VPList_FLCPrinting[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_SD_Print_ProbeOffsetZ, #endif 0x0000 }; const uint16_t VPList_Z_Offset[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_SD_Print_ProbeOffsetZ, #endif 0x0000 }; const struct VPMapping VPMap[] PROGMEM = { - { DGUSLCD_SCREEN_BOOT, VPList_Boot }, - { DGUSLCD_SCREEN_MAIN, VPList_Main }, - { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, - { DGUSLCD_SCREEN_STATUS, VPList_Status }, - { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, - { DGUSLCD_SCREEN_PREHEAT, VPList_Preheat }, - { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, - { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, - { DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating }, - { DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload }, - { DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload }, + { DGUSLCD_SCREEN_BOOT, VPList_Boot }, + { DGUSLCD_SCREEN_MAIN, VPList_Main }, + { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, + { DGUSLCD_SCREEN_STATUS, VPList_Status }, + { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, + { DGUSLCD_SCREEN_PREHEAT, VPList_Preheat }, + { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, + { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, + { DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating }, + { DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload }, + { DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload }, { DGUSLCD_SCREEN_SDPRINTMANIPULATION, VPList_SD_PrintManipulation }, - { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, - { DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune }, - { DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting }, - { DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat }, - { DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting }, - { DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset }, - { DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM }, - { DGUSLCD_SCREEN_PID_E, VPList_PIDE0 }, - { DGUSLCD_SCREEN_PID_BED, VPList_PIDBED }, - { DGUSLCD_SCREEN_INFOS, VPList_Infos }, + { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, + { DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune }, + { DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting }, + { DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat }, + { DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting }, + { DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset }, + { DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM }, + { DGUSLCD_SCREEN_PID_E, VPList_PIDE0 }, + { DGUSLCD_SCREEN_PID_BED, VPList_PIDBED }, + { DGUSLCD_SCREEN_INFOS, VPList_Infos }, { 0 , nullptr } // List is terminated with an nullptr as table entry. }; const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION; -// Helper to define a DGUS_VP_Variable for common use cases. -#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=sizeof(VPADRVAR), \ - .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR } - -// Helper to define a DGUS_VP_Variable when the sizeo of the var cannot be determined automaticalyl (eg. a string) -#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=STRLEN, \ - .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR } - const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // Helper to detect touch events VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr), @@ -333,96 +325,96 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { #endif VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr), - VPHELPER(VP_TEMP_ALL_OFF, nullptr, &ScreenHandler.HandleAllHeatersOff, nullptr), + VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr), #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) - VPHELPER(VP_MOVE_OPTION, &distanceToMove, &ScreenHandler.HandleManualMoveOption, nullptr), + VPHELPER(VP_MOVE_OPTION, &distanceToMove, ScreenHandler.HandleManualMoveOption, nullptr), #endif #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) - VPHELPER(VP_MOVE_X, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Y, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Z, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_HOME_ALL, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_X, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Y, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Z, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_HOME_ALL, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), #else - VPHELPER(VP_MOVE_X, nullptr, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Y, nullptr, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Z, nullptr, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_HOME_ALL, nullptr, &ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr), #endif - VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, &ScreenHandler.HandleMotorLockUnlock, nullptr), + VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleMotorLockUnlock, nullptr), #if ENABLED(POWER_LOSS_RECOVERY) - VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, &ScreenHandler.HandlePowerLossRecovery, nullptr), + VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr), #endif - VPHELPER(VP_SETTINGS, nullptr, &ScreenHandler.HandleSettings, nullptr), + VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr), #if ENABLED(SINGLE_Z_CALIBRATION) - VPHELPER(VP_Z_CALIBRATE, nullptr, &ScreenHandler.HandleZCalibration, nullptr), + VPHELPER(VP_Z_CALIBRATE, nullptr, ScreenHandler.HandleZCalibration, nullptr), #endif #if ENABLED(FIRST_LAYER_CAL) - VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, &ScreenHandler.HandleFirstLayerCal, nullptr), + VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, ScreenHandler.HandleFirstLayerCal, nullptr), #endif - { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, // M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr - { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplay }, + { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay }, // Temperature Data - #if HOTENDS >= 1 + #if HAS_HOTEND VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), - VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), - VPHELPER(VP_MOVE_E0, nullptr, &ScreenHandler.HandleManualExtrude, nullptr), - VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &ScreenHandler.HandleHeaterControl, nullptr), - VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr), + VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), #if ENABLED(DGUS_PREHEAT_UI) - VPHELPER(VP_E0_BED_PREHEAT, nullptr, &ScreenHandler.HandlePreheat, nullptr), + VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr), #endif #if ENABLED(PIDTEMP) VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), - VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr), + VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), #endif #if ENABLED(DGUS_FILAMENT_LOADUNLOAD) - VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload), + VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload), #endif #endif #if HOTENDS >= 2 VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), - VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_MOVE_E1, nullptr, &ScreenHandler.HandleManualExtrude, nullptr), - VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, &ScreenHandler.HandleHeaterControl, nullptr), - VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), // ERROR: Flow is per-extruder, not per-hotend + VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr), + VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), #if ENABLED(PIDTEMP) - VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr), + VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), #endif - VPHELPER(VP_E1_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload), + VPHELPER(VP_E1_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload), #endif #if HAS_HEATED_BED - VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), - VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, &ScreenHandler.HandleHeaterControl, nullptr), - VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), #if ENABLED(PIDTEMPBED) VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), - VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr), + VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), #endif #endif // Fan Data #if HAS_FAN #define FAN_VPHELPER(N) \ - VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, &ScreenHandler.DGUSLCD_SendPercentageToDisplay), \ - VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], &ScreenHandler.HandleFanControl, nullptr), \ - VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, &ScreenHandler.DGUSLCD_SendFanStatusToDisplay), + VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, ScreenHandler.DGUSLCD_SendPercentageToDisplay), \ + VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr), \ + VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay), REPEAT(FAN_COUNT, FAN_VPHELPER) #endif // Feedrate - VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly, &ScreenHandler.DGUSLCD_SendWordValueToDisplay ), + VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly, ScreenHandler.DGUSLCD_SendWordValueToDisplay), // Position Data VPHELPER(VP_XPos, ¤t_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), @@ -430,7 +422,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_ZPos, ¤t_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), // Print Progress - VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay ), + VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay), // Print Time VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay), @@ -442,11 +434,11 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), - #if HOTENDS >= 1 + #if HAS_EXTRUDERS VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), - #endif - #if HOTENDS >= 2 - VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), + #if HAS_MULTI_EXTRUDER + VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), + #endif #endif // SDCard File listing. @@ -463,7 +455,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr), VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr), #if HAS_BED_PROBE - VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, &ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>), + VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>), #if ENABLED(BABYSTEPPING) VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr), #endif @@ -474,11 +466,11 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay), #endif - // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content. - { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, - { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, - { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, - { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + // Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content. + { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, VPHELPER(0, 0, 0, 0) // must be last entry. }; diff --git a/Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.h similarity index 99% rename from Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSDisplayDef.h rename to Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.h index 910f5f7791f9..2543d20b7688 100644 --- a/Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSDisplayDef.h @@ -51,7 +51,7 @@ enum DGUSLCD_Screens : uint8_t { DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version") DGUSLCD_SCREEN_WAITING = 251, DGUSLCD_SCREEN_POPUP = 252, ///< special target, popup screen will also return this code to say "return to previous screen" - DGUSLDC_SCREEN_UNUSED = 255 + DGUSLCD_SCREEN_UNUSED = 255 }; // Display Memory layout used (T5UID) @@ -282,7 +282,7 @@ constexpr uint16_t VP_BED_PID_P = 0x3710; constexpr uint16_t VP_BED_PID_I = 0x3712; constexpr uint16_t VP_BED_PID_D = 0x3714; -// Wating screen status +// Waiting screen status constexpr uint16_t VP_WAITING_STATUS = 0x3800; // SPs for certain variables... diff --git a/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp new file mode 100644 index 000000000000..60a0f6c5bb6c --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.cpp @@ -0,0 +1,427 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_FYSETC) + +#include "../DGUSScreenHandler.h" + +#include "../../../../MarlinCore.h" +#include "../../../../gcode/queue.h" +#include "../../../../libs/duration_t.h" +#include "../../../../module/settings.h" +#include "../../../../module/temperature.h" +#include "../../../../module/motion.h" +#include "../../../../module/planner.h" +#include "../../../../module/printcounter.h" +#include "../../../../sd/cardreader.h" + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../../feature/powerloss.h" +#endif + +#if ENABLED(SDSUPPORT) + + static ExtUI::FileList filelist; + + void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file; + if (touched_nr > filelist.count()) return; + if (!filelist.seek(touched_nr)) return; + + if (filelist.isDir()) { + filelist.changeDir(filelist.filename()); + top_file = 0; + ForceCompleteUpdate(); + return; + } + + #if ENABLED(DGUS_PRINT_FILENAME) + // Send print filename + dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), VP_SD_FileName_LEN, true); + #endif + + // Setup Confirmation screen + file_to_print = touched_nr; + + HandleUserConfirmationPopUp(VP_SD_FileSelectConfirm, nullptr, PSTR("Print file"), filelist.filename(), PSTR("from SD Card?"), true, true, false, true); + } + + void DGUSScreenHandler::DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr) { + if (!filelist.seek(file_to_print)) return; + ExtUI::printFile(filelist.shortFilename()); + GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION); + } + + void DGUSScreenHandler::DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr) { + + if (!ExtUI::isPrintingFromMedia()) return; // avoid race condition when user stays in this menu and printer finishes. + switch (swap16(*(uint16_t*)val_ptr)) { + case 0: { // Resume + if (ExtUI::isPrintingFromMediaPaused()) { + ExtUI::resumePrint(); + } + } break; + + case 1: // Pause + + GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION); + if (!ExtUI::isPrintingFromMediaPaused()) { + ExtUI::pausePrint(); + //ExtUI::mks_pausePrint(); + } + break; + case 2: // Abort + HandleUserConfirmationPopUp(VP_SD_AbortPrintConfirmed, nullptr, PSTR("Abort printing"), filelist.filename(), PSTR("?"), true, true, false, true); + break; + } + } + + void DGUSScreenHandler::DGUSLCD_SD_SendFilename(DGUS_VP_Variable& var) { + uint16_t target_line = (var.VP - VP_SD_FileName0) / VP_SD_FileName_LEN; + if (target_line > DGUS_SD_FILESPERSCREEN) return; + char tmpfilename[VP_SD_FileName_LEN + 1] = ""; + var.memadr = (void*)tmpfilename; + + if (filelist.seek(top_file + target_line)) { + snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s%c"), filelist.filename(), filelist.isDir() ? '/' : 0); // snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s"), filelist.filename()); + } + DGUSLCD_SendStringToDisplay(var); + } + + void DGUSScreenHandler::SDCardInserted() { + top_file = 0; + filelist.refresh(); + auto cs = getCurrentScreen(); + if (cs == DGUSLCD_SCREEN_MAIN || cs == DGUSLCD_SCREEN_STATUS) + GotoScreen(DGUSLCD_SCREEN_SDFILELIST); + } + + void DGUSScreenHandler::SDCardRemoved() { + if (current_screen == DGUSLCD_SCREEN_SDFILELIST + || (current_screen == DGUSLCD_SCREEN_CONFIRM && (ConfirmVP == VP_SD_AbortPrintConfirmed || ConfirmVP == VP_SD_FileSelectConfirm)) + || current_screen == DGUSLCD_SCREEN_SDPRINTMANIPULATION + ) GotoScreen(DGUSLCD_SCREEN_MAIN); + } + +#endif // SDSUPPORT + +void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { + uint8_t *tmp = (uint8_t*)val_ptr; + + // The keycode in target is coded as , so 0x0100A means + // from screen 1 (main) to 10 (temperature). DGUSLCD_SCREEN_POPUP is special, + // meaning "return to previous screen" + DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1]; + + DEBUG_ECHOLNPGM("\n DEBUG target", target); + + if (target == DGUSLCD_SCREEN_POPUP) { + // Special handling for popup is to return to previous menu + if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb(); + PopToOldScreen(); + return; + } + + UpdateNewScreen(target); + + #ifdef DEBUG_DGUSLCD + if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPGM("WARNING: No screen Mapping found for ", target); + #endif +} + +void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleManualMove"); + + int16_t movevalue = swap16(*(uint16_t*)val_ptr); + #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) + if (movevalue) { + const uint16_t choice = *(uint16_t*)var.memadr; + movevalue = movevalue < 0 ? -choice : choice; + } + #endif + char axiscode; + unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode. + + switch (var.VP) { + default: return; + + case VP_MOVE_X: + axiscode = 'X'; + if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove; + break; + + case VP_MOVE_Y: + axiscode = 'Y'; + if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove; + break; + + case VP_MOVE_Z: + axiscode = 'Z'; + speed = 300; // default to 5mm/s + if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove; + break; + + case VP_HOME_ALL: // only used for homing + axiscode = '\0'; + movevalue = 0; // ignore value sent from display, this VP is _ONLY_ for homing. + break; + } + + if (!movevalue) { + // homing + DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); + char buf[6] = "G28 X"; + buf[4] = axiscode; + //DEBUG_ECHOPGM(" ", buf); + queue.enqueue_one_now(buf); + //DEBUG_ECHOLNPGM(" ✓"); + ForceCompleteUpdate(); + return; + } + else { + // movement + DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); + bool old_relative_mode = relative_mode; + if (!relative_mode) { + //DEBUG_ECHOPGM(" G91"); + queue.enqueue_now_P(PSTR("G91")); + //DEBUG_ECHOPGM(" ✓ "); + } + char buf[32]; // G1 X9999.99 F12345 + unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s); + char sign[] = "\0"; + int16_t value = movevalue / 100; + if (movevalue < 0) { value = -value; sign[0] = '-'; } + int16_t fraction = ABS(movevalue) % 100; + snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed); + //DEBUG_ECHOPGM(" ", buf); + queue.enqueue_one_now(buf); + //DEBUG_ECHOLNPGM(" ✓ "); + if (backup_speed != speed) { + snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); + queue.enqueue_one_now(buf); + //DEBUG_ECHOPGM(" ", buf); + } + // while (!enqueue_and_echo_command(buf)) idle(); + //DEBUG_ECHOLNPGM(" ✓ "); + if (!old_relative_mode) { + //DEBUG_ECHOPGM("G90"); + queue.enqueue_now_P(PSTR("G90")); + //DEBUG_ECHOPGM(" ✓ "); + } + } + + ForceCompleteUpdate(); + DEBUG_ECHOLNPGM("manmv done."); + return; + + cannotmove: + DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); + return; +} + +#if HAS_PID_HEATING + void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t rawvalue = swap16(*(uint16_t*)val_ptr); + DEBUG_ECHOLNPGM("V1:", rawvalue); + float value = (float)rawvalue / 10; + DEBUG_ECHOLNPGM("V2:", value); + float newvalue = 0; + + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_PID_P: newvalue = value; break; + case VP_E0_PID_I: newvalue = scalePID_i(value); break; + case VP_E0_PID_D: newvalue = scalePID_d(value); break; + #endif + #if HOTENDS >= 2 + case VP_E1_PID_P: newvalue = value; break; + case VP_E1_PID_I: newvalue = scalePID_i(value); break; + case VP_E1_PID_D: newvalue = scalePID_d(value); break; + #endif + #if HAS_HEATED_BED + case VP_BED_PID_P: newvalue = value; break; + case VP_BED_PID_I: newvalue = scalePID_i(value); break; + case VP_BED_PID_D: newvalue = scalePID_d(value); break; + #endif + } + + DEBUG_ECHOLNPAIR_F("V3:", newvalue); + *(float *)var.memadr = newvalue; + + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel + } +#endif // HAS_PID_HEATING + +#if ENABLED(BABYSTEPPING) + void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleLiveAdjustZ"); + int16_t flag = swap16(*(uint16_t*)val_ptr), + steps = flag ? -20 : 20; + ExtUI::smartAdjustAxis_steps(steps, ExtUI::axis_t::Z, true); + ForceCompleteUpdate(); + } +#endif + +#if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + + void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleFilamentOption"); + + uint8_t e_temp = 0; + filament_data.heated = false; + uint16_t preheat_option = swap16(*(uint16_t*)val_ptr); + if (preheat_option <= 8) { // Load filament type + filament_data.action = 1; + } + else if (preheat_option >= 10) { // Unload filament type + preheat_option -= 10; + filament_data.action = 2; + filament_data.purge_length = DGUS_FILAMENT_PURGE_LENGTH; + } + else { // Cancel filament operation + filament_data.action = 0; + } + + switch (preheat_option) { + case 0: // Load PLA + #ifdef PREHEAT_1_TEMP_HOTEND + e_temp = PREHEAT_1_TEMP_HOTEND; + #endif + break; + case 1: // Load ABS + TERN_(PREHEAT_2_TEMP_HOTEND, e_temp = PREHEAT_2_TEMP_HOTEND); + break; + case 2: // Load PET + #ifdef PREHEAT_3_TEMP_HOTEND + e_temp = PREHEAT_3_TEMP_HOTEND; + #endif + break; + case 3: // Load FLEX + #ifdef PREHEAT_4_TEMP_HOTEND + e_temp = PREHEAT_4_TEMP_HOTEND; + #endif + break; + case 9: // Cool down + default: + e_temp = 0; + break; + } + + if (filament_data.action == 0) { // Go back to utility screen + #if HAS_HOTEND + thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E0); + #endif + #if HOTENDS >= 2 + thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1); + #endif + GotoScreen(DGUSLCD_SCREEN_UTILITY); + } + else { // Go to the preheat screen to show the heating progress + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_FILAMENT_LOAD_UNLOAD: + filament_data.extruder = ExtUI::extruder_t::E0; + thermalManager.setTargetHotend(e_temp, filament_data.extruder); + break; + #endif + #if HAS_MULTI_EXTRUDER + case VP_E1_FILAMENT_LOAD_UNLOAD: + filament_data.extruder = ExtUI::extruder_t::E1; + thermalManager.setTargetHotend(e_temp, filament_data.extruder); + break; + #endif + } + GotoScreen(DGUSLCD_SCREEN_FILAMENT_HEATING); + } + } + + void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) { + DEBUG_ECHOLNPGM("HandleFilamentLoadUnload"); + if (filament_data.action <= 0) return; + + // If we close to the target temperature, we can start load or unload the filament + if (thermalManager.hotEnoughToExtrude(filament_data.extruder) && \ + thermalManager.targetHotEnoughToExtrude(filament_data.extruder)) { + float movevalue = DGUS_FILAMENT_LOAD_LENGTH_PER_TIME; + + if (filament_data.action == 1) { // load filament + if (!filament_data.heated) { + //GotoScreen(DGUSLCD_SCREEN_FILAMENT_LOADING); + filament_data.heated = true; + } + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue; + } + else { // unload filament + if (!filament_data.heated) { + GotoScreen(DGUSLCD_SCREEN_FILAMENT_UNLOADING); + filament_data.heated = true; + } + // Before unloading extrude to prevent jamming + if (filament_data.purge_length >= 0) { + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue; + filament_data.purge_length -= movevalue; + } + else { + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) - movevalue; + } + } + ExtUI::setAxisPosition_mm(movevalue, filament_data.extruder); + } + } +#endif // DGUS_FILAMENT_LOADUNLOAD + +bool DGUSScreenHandler::loop() { + dgusdisplay.loop(); + + const millis_t ms = millis(); + static millis_t next_event_ms = 0; + + if (!IsScreenComplete() || ELAPSED(ms, next_event_ms)) { + next_event_ms = ms + DGUS_UPDATE_INTERVAL_MS; + UpdateScreenVPData(); + } + + #if ENABLED(SHOW_BOOTSCREEN) + static bool booted = false; + + if (!booted && TERN0(POWER_LOSS_RECOVERY, recovery.valid())) + booted = true; + + if (!booted && ELAPSED(ms, BOOTSCREEN_TIMEOUT)) { + booted = true; + + if (TERN0(POWER_LOSS_RECOVERY, recovery.valid())) + GotoScreen(DGUSLCD_SCREEN_POWER_LOSS); + else + GotoScreen(DGUSLCD_SCREEN_MAIN); + } + + #endif + return IsScreenComplete(); +} + +#endif // DGUS_LCD_UI_FYSETC diff --git a/Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h similarity index 75% rename from Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.h rename to Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h index df738dbfd144..ee0af013a855 100644 --- a/Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/fysetc/DGUSScreenHandler.h @@ -21,8 +21,9 @@ */ #pragma once -#include "DGUSDisplay.h" -#include "DGUSVPVariable.h" +#include "../DGUSDisplay.h" +#include "../DGUSVPVariable.h" +#include "../DGUSDisplayDef.h" #include "../../../../inc/MarlinConfig.h" @@ -34,20 +35,21 @@ class DGUSScreenHandler { static bool loop(); - /// Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen - /// The bools specifing whether the strings are in RAM or FLASH. - static void sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); + // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen + // The bools specifying whether the strings are in RAM or FLASH. + static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); - static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); + static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); - /// "M117" Message -- msg is a RAM ptr. - static void setstatusmessage(const char* msg); - /// The same for messages from Flash + // "M117" Message -- msg is a RAM ptr. + static void setstatusmessage(const char *msg); + // The same for messages from Flash static void setstatusmessagePGM(PGM_P const msg); // Callback for VP "Display wants to change screen on idle printer" static void ScreenChangeHookIfIdle(DGUS_VP_Variable &var, void *val_ptr); // Callback for VP "Screen has been changed" static void ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr); + // Callback for VP "All Heaters Off" static void HandleAllHeatersOff(DGUS_VP_Variable &var, void *val_ptr); // Hook for "Change this temperature" @@ -58,6 +60,7 @@ class DGUSScreenHandler { // Hook for manual move option static void HandleManualMoveOption(DGUS_VP_Variable &var, void *val_ptr); #endif + // Hook for manual move. static void HandleManualMove(DGUS_VP_Variable &var, void *val_ptr); // Hook for manual extrude. @@ -72,6 +75,7 @@ class DGUSScreenHandler { static void HandleSettings(DGUS_VP_Variable &var, void *val_ptr); static void HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr); static void HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr); + #if HAS_PID_HEATING // Hook for "Change this temperature PID para" static void HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr); @@ -106,25 +110,25 @@ class DGUSScreenHandler { #if ENABLED(SDSUPPORT) // Callback for VP "Display wants to change screen when there is a SD card" static void ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr); - /// Scroll buttons on the file listing screen. + // Scroll buttons on the file listing screen. static void DGUSLCD_SD_ScrollFilelist(DGUS_VP_Variable &var, void *val_ptr); - /// File touched. + // File touched. static void DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr); - /// start print after confirmation received. + // start print after confirmation received. static void DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr); - /// User hit the pause, resume or abort button. + // User hit the pause, resume or abort button. static void DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr); - /// User confirmed the abort action + // User confirmed the abort action static void DGUSLCD_SD_ReallyAbort(DGUS_VP_Variable &var, void *val_ptr); - /// User hit the tune button + // User hit the tune button static void DGUSLCD_SD_PrintTune(DGUS_VP_Variable &var, void *val_ptr); - /// Send a single filename to the display. + // Send a single filename to the display. static void DGUSLCD_SD_SendFilename(DGUS_VP_Variable &var); - /// Marlin informed us that a new SD has been inserted. + // Marlin informed us that a new SD has been inserted. static void SDCardInserted(); - /// Marlin informed us that the SD Card has been removed(). + // Marlin informed us that the SD Card has been removed(). static void SDCardRemoved(); - /// Marlin informed us about a bad SD Card. + // Marlin informed us about a bad SD Card. static void SDCardError(); #endif @@ -152,6 +156,7 @@ class DGUSScreenHandler { static void DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var); static void DGUSLCD_SendPrintProgressToDisplay(DGUS_VP_Variable &var); static void DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var); + #if ENABLED(PRINTCOUNTER) static void DGUSLCD_SendPrintAccTimeToDisplay(DGUS_VP_Variable &var); static void DGUSLCD_SendPrintsTotalToDisplay(DGUS_VP_Variable &var); @@ -164,7 +169,7 @@ class DGUSScreenHandler { static void DGUSLCD_SendWaitingStatusToDisplay(DGUS_VP_Variable &var); #endif - /// Send a value from 0..100 to a variable with a range from 0..255 + // Send a value from 0..100 to a variable with a range from 0..255 static void DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr); template @@ -176,9 +181,9 @@ class DGUSScreenHandler { *(T*)var.memadr = x.t; } - /// Send a float value to the display. - /// Display will get a 4-byte integer scaled to the number of digits: - /// Tell the display the number of digits and it cheats by displaying a dot between... + // Send a float value to the display. + // Display will get a 4-byte integer scaled to the number of digits: + // Tell the display the number of digits and it cheats by displaying a dot between... template static void DGUSLCD_SendFloatAsLongValueToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { @@ -188,9 +193,9 @@ class DGUSScreenHandler { } } - /// Send a float value to the display. - /// Display will get a 2-byte integer scaled to the number of digits: - /// Tell the display the number of digits and it cheats by displaying a dot between... + // Send a float value to the display. + // Display will get a 2-byte integer scaled to the number of digits: + // Tell the display the number of digits and it cheats by displaying a dot between... template static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { if (var.memadr) { @@ -201,9 +206,9 @@ class DGUSScreenHandler { } } - /// Force an update of all VP on the current screen. + // Force an update of all VP on the current screen. static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; } - /// Has all VPs sent to the screen + // Has all VPs sent to the screen static inline bool IsScreenComplete() { return ScreenComplete; } static inline DGUSLCD_Screens getCurrentScreen() { return current_screen; } @@ -211,22 +216,25 @@ class DGUSScreenHandler { static inline void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; } private: - static DGUSLCD_Screens current_screen; ///< currently on screen + static DGUSLCD_Screens current_screen; //< currently on screen static constexpr uint8_t NUM_PAST_SCREENS = 4; - static DGUSLCD_Screens past_screens[NUM_PAST_SCREENS]; ///< LIFO with past screens for the "back" button. + static DGUSLCD_Screens past_screens[NUM_PAST_SCREENS]; //< LIFO with past screens for the "back" button. - static uint8_t update_ptr; ///< Last sent entry in the VPList for the actual screen. - static uint16_t skipVP; ///< When updating the screen data, skip this one, because the user is interacting with it. - static bool ScreenComplete; ///< All VPs sent to screen? + static uint8_t update_ptr; //< Last sent entry in the VPList for the actual screen. + static uint16_t skipVP; //< When updating the screen data, skip this one, because the user is interacting with it. + static bool ScreenComplete; //< All VPs sent to screen? - static uint16_t ConfirmVP; ///< context for confirm screen (VP that will be emulated-sent on "OK"). + static uint16_t ConfirmVP; //< context for confirm screen (VP that will be emulated-sent on "OK"). #if ENABLED(SDSUPPORT) - static int16_t top_file; ///< file on top of file chooser - static int16_t file_to_print; ///< touched file to be confirmed + static int16_t top_file; //< file on top of file chooser + static int16_t file_to_print; //< touched file to be confirmed #endif static void (*confirm_action_cb)(); }; -extern DGUSScreenHandler ScreenHandler; +#if ENABLED(POWER_LOSS_RECOVERY) + #define PLR_SCREEN_RECOVER DGUSLCD_SCREEN_SDPRINTMANIPULATION + #define PLR_SCREEN_CANCEL DGUSLCD_SCREEN_STATUS +#endif diff --git a/Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp similarity index 59% rename from Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.cpp rename to Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp index 536640ec9526..bdcff47ae812 100644 --- a/Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.cpp @@ -22,7 +22,7 @@ /* DGUS VPs changed by George Fu in 2019 for Marlin */ -#include "../../../../../inc/MarlinConfigPre.h" +#include "../../../../inc/MarlinConfigPre.h" #if ENABLED(DGUS_LCD_UI_HIPRECY) @@ -30,12 +30,12 @@ #include "../DGUSDisplay.h" #include "../DGUSScreenHandler.h" -#include "../../../../../module/temperature.h" -#include "../../../../../module/motion.h" -#include "../../../../../module/planner.h" +#include "../../../../module/temperature.h" +#include "../../../../module/motion.h" +#include "../../../../module/planner.h" -#include "../../../ui_api.h" -#include "../../../../marlinui.h" +#include "../../ui_api.h" +#include "../../../marlinui.h" #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) uint16_t distanceToMove = 10; @@ -47,12 +47,12 @@ const uint16_t VPList_Boot[] PROGMEM = { }; const uint16_t VPList_Main[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded. */ - #if HOTENDS >= 1 + // VP_M117, for completeness, but it cannot be auto-uploaded. + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, VP_E0_STATUS, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif #if HAS_HEATED_BED VP_T_Bed_Is, VP_T_Bed_Set, VP_BED_STATUS, @@ -70,11 +70,11 @@ const uint16_t VPList_Main[] PROGMEM = { }; const uint16_t VPList_Temp[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif #if HAS_HEATED_BED VP_T_Bed_Is, VP_T_Bed_Set, @@ -83,12 +83,12 @@ const uint16_t VPList_Temp[] PROGMEM = { }; const uint16_t VPList_Status[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ - #if HOTENDS >= 1 + // VP_M117, for completeness, but it cannot be auto-uploaded + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif #if HAS_HEATED_BED VP_T_Bed_Is, VP_T_Bed_Set, @@ -104,12 +104,12 @@ const uint16_t VPList_Status[] PROGMEM = { }; const uint16_t VPList_Status2[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ - #if HOTENDS >= 1 + // VP_M117, for completeness, but it cannot be auto-uploaded + #if HAS_HOTEND VP_Flowrate_E0, - #endif - #if HOTENDS >= 2 - VP_Flowrate_E1, + #if HOTENDS >= 2 + VP_Flowrate_E1, + #endif #endif VP_PrintProgress_Percentage, VP_PrintTime, @@ -117,11 +117,11 @@ const uint16_t VPList_Status2[] PROGMEM = { }; const uint16_t VPList_Preheat[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif #if HAS_HEATED_BED VP_T_Bed_Is, VP_T_Bed_Set, @@ -135,11 +135,11 @@ const uint16_t VPList_ManualMove[] PROGMEM = { }; const uint16_t VPList_ManualExtrude[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif VP_EPos, 0x0000 @@ -156,22 +156,22 @@ const uint16_t VPList_SD_FlowRates[] PROGMEM = { }; const uint16_t VPList_Filament_heating[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, VP_E0_FILAMENT_LOAD_UNLOAD, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif 0x0000 }; const uint16_t VPList_Filament_load_unload[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_E0_FILAMENT_LOAD_UNLOAD, - #endif - #if HOTENDS >= 2 - VP_E1_FILAMENT_LOAD_UNLOAD, + #if HOTENDS >= 2 + VP_E1_FILAMENT_LOAD_UNLOAD, + #endif #endif 0x0000 }; @@ -183,11 +183,11 @@ const uint16_t VPList_SDFileList[] PROGMEM = { const uint16_t VPList_SD_PrintManipulation[] PROGMEM = { VP_PrintProgress_Percentage, VP_PrintTime, - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif #if HAS_HEATED_BED VP_T_Bed_Is, VP_T_Bed_Set, @@ -203,11 +203,11 @@ const uint16_t VPList_SD_PrintManipulation[] PROGMEM = { }; const uint16_t VPList_SDPrintTune[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif #if HAS_HEATED_BED VP_T_Bed_Is, VP_T_Bed_Set, @@ -225,11 +225,11 @@ const uint16_t VPList_StepPerMM[] PROGMEM = { VP_X_STEP_PER_MM, VP_Y_STEP_PER_MM, VP_Z_STEP_PER_MM, - #if HOTENDS >= 1 + #if HAS_HOTEND VP_E0_STEP_PER_MM, - #endif - #if HOTENDS >= 2 - VP_E1_STEP_PER_MM, + #if HOTENDS >= 2 + VP_E1_STEP_PER_MM, + #endif #endif 0x0000 }; @@ -268,7 +268,7 @@ const uint16_t VPList_PIDTuningWaiting[] PROGMEM = { }; const uint16_t VPList_FLCPreheat[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, #endif #if HAS_HEATED_BED @@ -278,55 +278,47 @@ const uint16_t VPList_FLCPreheat[] PROGMEM = { }; const uint16_t VPList_FLCPrinting[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_SD_Print_ProbeOffsetZ, #endif 0x0000 }; const uint16_t VPList_Z_Offset[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_SD_Print_ProbeOffsetZ, #endif 0x0000 }; const struct VPMapping VPMap[] PROGMEM = { - { DGUSLCD_SCREEN_BOOT, VPList_Boot }, - { DGUSLCD_SCREEN_MAIN, VPList_Main }, - { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, - { DGUSLCD_SCREEN_STATUS, VPList_Status }, - { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, - { DGUSLCD_SCREEN_PREHEAT, VPList_Preheat }, - { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, - { DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset }, - { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, - { DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating }, - { DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload }, - { DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload }, + { DGUSLCD_SCREEN_BOOT, VPList_Boot }, + { DGUSLCD_SCREEN_MAIN, VPList_Main }, + { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, + { DGUSLCD_SCREEN_STATUS, VPList_Status }, + { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, + { DGUSLCD_SCREEN_PREHEAT, VPList_Preheat }, + { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, + { DGUSLCD_SCREEN_Z_OFFSET, VPList_Z_Offset }, + { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, + { DGUSLCD_SCREEN_FILAMENT_HEATING, VPList_Filament_heating }, + { DGUSLCD_SCREEN_FILAMENT_LOADING, VPList_Filament_load_unload }, + { DGUSLCD_SCREEN_FILAMENT_UNLOADING, VPList_Filament_load_unload }, { DGUSLCD_SCREEN_SDPRINTMANIPULATION, VPList_SD_PrintManipulation }, - { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, - { DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune }, - { DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting }, - { DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat }, - { DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting }, - { DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM }, - { DGUSLCD_SCREEN_PID_E, VPList_PIDE0 }, - { DGUSLCD_SCREEN_PID_BED, VPList_PIDBED }, - { DGUSLCD_SCREEN_INFOS, VPList_Infos }, + { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, + { DGUSLCD_SCREEN_SDPRINTTUNE, VPList_SDPrintTune }, + { DGUSLCD_SCREEN_WAITING, VPList_PIDTuningWaiting }, + { DGUSLCD_SCREEN_FLC_PREHEAT, VPList_FLCPreheat }, + { DGUSLCD_SCREEN_FLC_PRINTING, VPList_FLCPrinting }, + { DGUSLCD_SCREEN_STEPPERMM, VPList_StepPerMM }, + { DGUSLCD_SCREEN_PID_E, VPList_PIDE0 }, + { DGUSLCD_SCREEN_PID_BED, VPList_PIDBED }, + { DGUSLCD_SCREEN_INFOS, VPList_Infos }, { 0 , nullptr } // List is terminated with an nullptr as table entry. }; const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION; -// Helper to define a DGUS_VP_Variable for common use cases. -#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=sizeof(VPADRVAR), \ - .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR } - -// Helper to define a DGUS_VP_Variable when the sizeo of the var cannot be determined automaticalyl (eg. a string) -#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=STRLEN, \ - .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR } - const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // Helper to detect touch events VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr), @@ -336,92 +328,92 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { #endif VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr), - VPHELPER(VP_TEMP_ALL_OFF, nullptr, &ScreenHandler.HandleAllHeatersOff, nullptr), + VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr), #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) - VPHELPER(VP_MOVE_OPTION, &distanceToMove, &ScreenHandler.HandleManualMoveOption, nullptr), + VPHELPER(VP_MOVE_OPTION, &distanceToMove, ScreenHandler.HandleManualMoveOption, nullptr), #endif #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) - VPHELPER(VP_MOVE_X, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Y, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Z, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_HOME_ALL, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_X, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Y, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Z, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_HOME_ALL, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), #else - VPHELPER(VP_MOVE_X, nullptr, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Y, nullptr, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Z, nullptr, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_HOME_ALL, nullptr, &ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr), #endif - VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, &ScreenHandler.HandleMotorLockUnlock, nullptr), + VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleMotorLockUnlock, nullptr), #if ENABLED(POWER_LOSS_RECOVERY) - VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, &ScreenHandler.HandlePowerLossRecovery, nullptr), + VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr), #endif - VPHELPER(VP_SETTINGS, nullptr, &ScreenHandler.HandleSettings, nullptr), + VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr), #if ENABLED(SINGLE_Z_CALIBRATION) - VPHELPER(VP_Z_CALIBRATE, nullptr, &ScreenHandler.HandleZCalibration, nullptr), + VPHELPER(VP_Z_CALIBRATE, nullptr, ScreenHandler.HandleZCalibration, nullptr), #endif #if ENABLED(FIRST_LAYER_CAL) - VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, &ScreenHandler.HandleFirstLayerCal, nullptr), + VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, ScreenHandler.HandleFirstLayerCal, nullptr), #endif - { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, // M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr - { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplay }, + { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay }, // Temperature Data - #if HOTENDS >= 1 + #if HAS_HOTEND VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), - VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), - VPHELPER(VP_MOVE_E0, nullptr, &ScreenHandler.HandleManualExtrude, nullptr), - VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &ScreenHandler.HandleHeaterControl, nullptr), - VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr), + VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), #if ENABLED(DGUS_PREHEAT_UI) - VPHELPER(VP_E0_BED_PREHEAT, nullptr, &ScreenHandler.HandlePreheat, nullptr), + VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr), #endif #if ENABLED(DGUS_FILAMENT_LOADUNLOAD) - VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload), + VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload), #endif #if ENABLED(PIDTEMP) VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), - VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr), + VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), #endif #endif #if HOTENDS >= 2 - VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, DGUSLCD_SendFloatAsLongValueToDisplay<0>), - VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_MOVE_E1, nullptr, &ScreenHandler.HandleManualExtrude, nullptr), - VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, &ScreenHandler.HandleHeaterControl, nullptr), - VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), + VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr), + VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), #endif #if HAS_HEATED_BED - VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), - VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, &ScreenHandler.HandleHeaterControl, nullptr), - VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), - #if ENABLED(PIDTEMP) + VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + #if ENABLED(PIDTEMPBED) VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), - VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr), + VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), #endif #endif // Fan Data #if HAS_FAN #define FAN_VPHELPER(N) \ - VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, &ScreenHandler.DGUSLCD_SendPercentageToDisplay), \ - VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], &ScreenHandler.HandleFanControl, nullptr), \ - VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, &ScreenHandler.DGUSLCD_SendFanStatusToDisplay), + VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, ScreenHandler.DGUSLCD_SendPercentageToDisplay), \ + VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr), \ + VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay), REPEAT(FAN_COUNT, FAN_VPHELPER) #endif // Feedrate - VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly, &ScreenHandler.DGUSLCD_SendWordValueToDisplay ), + VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly, ScreenHandler.DGUSLCD_SendWordValueToDisplay), // Position Data VPHELPER(VP_XPos, ¤t_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), @@ -429,23 +421,23 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_ZPos, ¤t_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), // Print Progress - VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay ), + VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay), // Print Time - VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay ), + VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay), #if ENABLED(PRINTCOUNTER) - VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay ), - VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay ), + VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay), + VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay), #endif VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), - #if HOTENDS >= 1 + #if HAS_HOTEND VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), - #endif - #if HOTENDS >= 2 - VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), + #if HOTENDS >= 2 + VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), + #endif #endif // SDCard File listing. @@ -453,16 +445,16 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr), VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), - VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), + VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), VPHELPER(VP_SD_ResumePauseAbort, nullptr, ScreenHandler.DGUSLCD_SD_ResumePauseAbort, nullptr), VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr), VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr), #if HAS_BED_PROBE - VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, &ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>), + VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>), #if ENABLED(BABYSTEPPING) VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr), #endif @@ -473,11 +465,11 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay), #endif - // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content. - { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, - { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, - { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, - { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + // Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content. + { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, VPHELPER(0, 0, 0, 0) // must be last entry. }; diff --git a/Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.h similarity index 99% rename from Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.h rename to Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.h index d18989a48b00..e9581553817b 100644 --- a/Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSDisplayDef.h @@ -51,7 +51,7 @@ enum DGUSLCD_Screens : uint8_t { DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version") DGUSLCD_SCREEN_WAITING = 251, DGUSLCD_SCREEN_POPUP = 252, ///< special target, popup screen will also return this code to say "return to previous screen" - DGUSLDC_SCREEN_UNUSED = 255 + DGUSLCD_SCREEN_UNUSED = 255 }; // Display Memory layout used (T5UID) @@ -278,7 +278,7 @@ constexpr uint16_t VP_BED_PID_P = 0x3710; constexpr uint16_t VP_BED_PID_I = 0x3712; constexpr uint16_t VP_BED_PID_D = 0x3714; -// Wating screen status +// Waiting screen status constexpr uint16_t VP_WAITING_STATUS = 0x3800; // SPs for certain variables... diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp new file mode 100644 index 000000000000..83f7a39c2855 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.cpp @@ -0,0 +1,420 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_HIPRECY) + +#include "../DGUSScreenHandler.h" + +#include "../../../../MarlinCore.h" +#include "../../../../gcode/queue.h" +#include "../../../../libs/duration_t.h" +#include "../../../../module/settings.h" +#include "../../../../module/temperature.h" +#include "../../../../module/motion.h" +#include "../../../../module/planner.h" +#include "../../../../module/printcounter.h" +#include "../../../../sd/cardreader.h" + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../../feature/powerloss.h" +#endif + +#if ENABLED(SDSUPPORT) + + static ExtUI::FileList filelist; + + void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file; + if (touched_nr > filelist.count()) return; + if (!filelist.seek(touched_nr)) return; + + if (filelist.isDir()) { + filelist.changeDir(filelist.filename()); + top_file = 0; + ForceCompleteUpdate(); + return; + } + + #if ENABLED(DGUS_PRINT_FILENAME) + // Send print filename + dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), VP_SD_FileName_LEN, true); + #endif + + // Setup Confirmation screen + file_to_print = touched_nr; + + HandleUserConfirmationPopUp(VP_SD_FileSelectConfirm, nullptr, PSTR("Print file"), filelist.filename(), PSTR("from SD Card?"), true, true, false, true); + } + + void DGUSScreenHandler::DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr) { + if (!filelist.seek(file_to_print)) return; + ExtUI::printFile(filelist.shortFilename()); + GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION); + } + + void DGUSScreenHandler::DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr) { + + if (!ExtUI::isPrintingFromMedia()) return; // avoid race condition when user stays in this menu and printer finishes. + switch (swap16(*(uint16_t*)val_ptr)) { + case 0: { // Resume + if (ExtUI::isPrintingFromMediaPaused()) { + ExtUI::resumePrint(); + } + } break; + + case 1: // Pause + + GotoScreen(MKSLCD_SCREEN_PAUSE); + if (!ExtUI::isPrintingFromMediaPaused()) { + ExtUI::pausePrint(); + //ExtUI::mks_pausePrint(); + } + break; + case 2: // Abort + HandleUserConfirmationPopUp(VP_SD_AbortPrintConfirmed, nullptr, PSTR("Abort printing"), filelist.filename(), PSTR("?"), true, true, false, true); + break; + } + } + + void DGUSScreenHandler::DGUSLCD_SD_SendFilename(DGUS_VP_Variable& var) { + uint16_t target_line = (var.VP - VP_SD_FileName0) / VP_SD_FileName_LEN; + if (target_line > DGUS_SD_FILESPERSCREEN) return; + char tmpfilename[VP_SD_FileName_LEN + 1] = ""; + var.memadr = (void*)tmpfilename; + + if (filelist.seek(top_file + target_line)) { + snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s%c"), filelist.filename(), filelist.isDir() ? '/' : 0); // snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s"), filelist.filename()); + } + DGUSLCD_SendStringToDisplay(var); + } + + void DGUSScreenHandler::SDCardInserted() { + top_file = 0; + filelist.refresh(); + auto cs = getCurrentScreen(); + if (cs == DGUSLCD_SCREEN_MAIN || cs == DGUSLCD_SCREEN_STATUS) + GotoScreen(DGUSLCD_SCREEN_SDFILELIST); + } + + void DGUSScreenHandler::SDCardRemoved() { + if (current_screen == DGUSLCD_SCREEN_SDFILELIST + || (current_screen == DGUSLCD_SCREEN_CONFIRM && (ConfirmVP == VP_SD_AbortPrintConfirmed || ConfirmVP == VP_SD_FileSelectConfirm)) + || current_screen == DGUSLCD_SCREEN_SDPRINTMANIPULATION + ) GotoScreen(DGUSLCD_SCREEN_MAIN); + } + +#endif // SDSUPPORT + +void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { + uint8_t *tmp = (uint8_t*)val_ptr; + + // The keycode in target is coded as , so 0x0100A means + // from screen 1 (main) to 10 (temperature). DGUSLCD_SCREEN_POPUP is special, + // meaning "return to previous screen" + DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1]; + + DEBUG_ECHOLNPGM("\n DEBUG target", target); + + if (target == DGUSLCD_SCREEN_POPUP) { + // Special handling for popup is to return to previous menu + if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb(); + PopToOldScreen(); + return; + } + + UpdateNewScreen(target); + + #ifdef DEBUG_DGUSLCD + if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPGM("WARNING: No screen Mapping found for ", target); + #endif +} + +void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleManualMove"); + + int16_t movevalue = swap16(*(uint16_t*)val_ptr); + #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) + if (movevalue) { + const uint16_t choice = *(uint16_t*)var.memadr; + movevalue = movevalue < 0 ? -choice : choice; + } + #endif + char axiscode; + unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode. + + switch (var.VP) { + default: return; + + case VP_MOVE_X: + axiscode = 'X'; + if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove; + break; + + case VP_MOVE_Y: + axiscode = 'Y'; + if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove; + break; + + case VP_MOVE_Z: + axiscode = 'Z'; + speed = 300; // default to 5mm/s + if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove; + break; + + case VP_HOME_ALL: // only used for homing + axiscode = '\0'; + movevalue = 0; // ignore value sent from display, this VP is _ONLY_ for homing. + break; + } + + if (!movevalue) { + // homing + DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); + char buf[6] = "G28 X"; + buf[4] = axiscode; + //DEBUG_ECHOPGM(" ", buf); + queue.enqueue_one_now(buf); + //DEBUG_ECHOLNPGM(" ✓"); + ForceCompleteUpdate(); + return; + } + else { + // movement + DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); + bool old_relative_mode = relative_mode; + if (!relative_mode) { + //DEBUG_ECHOPGM(" G91"); + queue.enqueue_now_P(PSTR("G91")); + //DEBUG_ECHOPGM(" ✓ "); + } + char buf[32]; // G1 X9999.99 F12345 + unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s); + char sign[] = "\0"; + int16_t value = movevalue / 100; + if (movevalue < 0) { value = -value; sign[0] = '-'; } + int16_t fraction = ABS(movevalue) % 100; + snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed); + //DEBUG_ECHOPGM(" ", buf); + queue.enqueue_one_now(buf); + //DEBUG_ECHOLNPGM(" ✓ "); + if (backup_speed != speed) { + snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); + queue.enqueue_one_now(buf); + //DEBUG_ECHOPGM(" ", buf); + } + // while (!enqueue_and_echo_command(buf)) idle(); + //DEBUG_ECHOLNPGM(" ✓ "); + if (!old_relative_mode) { + //DEBUG_ECHOPGM("G90"); + queue.enqueue_now_P(PSTR("G90")); + //DEBUG_ECHOPGM(" ✓ "); + } + } + + ForceCompleteUpdate(); + DEBUG_ECHOLNPGM("manmv done."); + return; + + cannotmove: + DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); + return; +} + +#if HAS_PID_HEATING + void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t rawvalue = swap16(*(uint16_t*)val_ptr); + DEBUG_ECHOLNPGM("V1:", rawvalue); + float value = (float)rawvalue / 10; + DEBUG_ECHOLNPGM("V2:", value); + float newvalue = 0; + + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_PID_P: newvalue = value; break; + case VP_E0_PID_I: newvalue = scalePID_i(value); break; + case VP_E0_PID_D: newvalue = scalePID_d(value); break; + #endif + #if HOTENDS >= 2 + case VP_E1_PID_P: newvalue = value; break; + case VP_E1_PID_I: newvalue = scalePID_i(value); break; + case VP_E1_PID_D: newvalue = scalePID_d(value); break; + #endif + #if HAS_HEATED_BED + case VP_BED_PID_P: newvalue = value; break; + case VP_BED_PID_I: newvalue = scalePID_i(value); break; + case VP_BED_PID_D: newvalue = scalePID_d(value); break; + #endif + } + + DEBUG_ECHOLNPAIR_F("V3:", newvalue); + *(float *)var.memadr = newvalue; + + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel + } +#endif // HAS_PID_HEATING + +#if ENABLED(BABYSTEPPING) + void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleLiveAdjustZ"); + int16_t flag = swap16(*(uint16_t*)val_ptr), + steps = flag ? -20 : 20; + ExtUI::smartAdjustAxis_steps(steps, ExtUI::axis_t::Z, true); + ForceCompleteUpdate(); + } +#endif + +#if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + + void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleFilamentOption"); + + uint8_t e_temp = 0; + filament_data.heated = false; + uint16_t preheat_option = swap16(*(uint16_t*)val_ptr); + if (preheat_option <= 8) { // Load filament type + filament_data.action = 1; + } + else if (preheat_option >= 10) { // Unload filament type + preheat_option -= 10; + filament_data.action = 2; + filament_data.purge_length = DGUS_FILAMENT_PURGE_LENGTH; + } + else { // Cancel filament operation + filament_data.action = 0; + } + + switch (preheat_option) { + case 0: // Load PLA + #ifdef PREHEAT_1_TEMP_HOTEND + e_temp = PREHEAT_1_TEMP_HOTEND; + #endif + break; + case 1: // Load ABS + TERN_(PREHEAT_2_TEMP_HOTEND, e_temp = PREHEAT_2_TEMP_HOTEND); + break; + case 2: // Load PET + #ifdef PREHEAT_3_TEMP_HOTEND + e_temp = PREHEAT_3_TEMP_HOTEND; + #endif + break; + case 3: // Load FLEX + #ifdef PREHEAT_4_TEMP_HOTEND + e_temp = PREHEAT_4_TEMP_HOTEND; + #endif + break; + case 9: // Cool down + default: + e_temp = 0; + break; + } + + if (filament_data.action == 0) { // Go back to utility screen + #if HAS_HOTEND + thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E0); + #if HOTENDS >= 2 + thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1); + #endif + #endif + GotoScreen(DGUSLCD_SCREEN_UTILITY); + } + else { // Go to the preheat screen to show the heating progress + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_FILAMENT_LOAD_UNLOAD: + filament_data.extruder = ExtUI::extruder_t::E0; + thermalManager.setTargetHotend(e_temp, filament_data.extruder); + break; + #endif + #if HOTENDS >= 2 + case VP_E1_FILAMENT_LOAD_UNLOAD: + filament_data.extruder = ExtUI::extruder_t::E1; + thermalManager.setTargetHotend(e_temp, filament_data.extruder); + break; + #endif + } + GotoScreen(DGUSLCD_SCREEN_FILAMENT_HEATING); + } + } + + void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) { + DEBUG_ECHOLNPGM("HandleFilamentLoadUnload"); + if (filament_data.action <= 0) return; + + // If we close to the target temperature, we can start load or unload the filament + if (thermalManager.hotEnoughToExtrude(filament_data.extruder) && \ + thermalManager.targetHotEnoughToExtrude(filament_data.extruder)) { + float movevalue = DGUS_FILAMENT_LOAD_LENGTH_PER_TIME; + + if (filament_data.action == 1) { // load filament + if (!filament_data.heated) { + //GotoScreen(DGUSLCD_SCREEN_FILAMENT_LOADING); + filament_data.heated = true; + } + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue; + } + else { // unload filament + if (!filament_data.heated) { + GotoScreen(DGUSLCD_SCREEN_FILAMENT_UNLOADING); + filament_data.heated = true; + } + // Before unloading extrude to prevent jamming + if (filament_data.purge_length >= 0) { + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue; + filament_data.purge_length -= movevalue; + } + else { + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) - movevalue; + } + } + ExtUI::setAxisPosition_mm(movevalue, filament_data.extruder); + } + } +#endif // DGUS_FILAMENT_LOADUNLOAD + +bool DGUSScreenHandler::loop() { + dgusdisplay.loop(); + + const millis_t ms = millis(); + static millis_t next_event_ms = 0; + + if (!IsScreenComplete() || ELAPSED(ms, next_event_ms)) { + next_event_ms = ms + DGUS_UPDATE_INTERVAL_MS; + UpdateScreenVPData(); + } + + #if ENABLED(SHOW_BOOTSCREEN) + static bool booted = false; + + if (!booted && TERN0(POWER_LOSS_RECOVERY, recovery.valid())) + booted = true; + + if (!booted && ELAPSED(ms, TERN(USE_MKS_GREEN_UI, 1000, BOOTSCREEN_TIMEOUT))) + booted = true; + #endif + return IsScreenComplete(); +} + +#endif // DGUS_LCD_UI_HIPRECY diff --git a/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h new file mode 100644 index 000000000000..ee0af013a855 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/hiprecy/DGUSScreenHandler.h @@ -0,0 +1,240 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../DGUSDisplay.h" +#include "../DGUSVPVariable.h" +#include "../DGUSDisplayDef.h" + +#include "../../../../inc/MarlinConfig.h" + +enum DGUSLCD_Screens : uint8_t; + +class DGUSScreenHandler { +public: + DGUSScreenHandler() = default; + + static bool loop(); + + // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen + // The bools specifying whether the strings are in RAM or FLASH. + static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); + + static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); + + // "M117" Message -- msg is a RAM ptr. + static void setstatusmessage(const char *msg); + // The same for messages from Flash + static void setstatusmessagePGM(PGM_P const msg); + // Callback for VP "Display wants to change screen on idle printer" + static void ScreenChangeHookIfIdle(DGUS_VP_Variable &var, void *val_ptr); + // Callback for VP "Screen has been changed" + static void ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr); + + // Callback for VP "All Heaters Off" + static void HandleAllHeatersOff(DGUS_VP_Variable &var, void *val_ptr); + // Hook for "Change this temperature" + static void HandleTemperatureChanged(DGUS_VP_Variable &var, void *val_ptr); + // Hook for "Change Flowrate" + static void HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) + // Hook for manual move option + static void HandleManualMoveOption(DGUS_VP_Variable &var, void *val_ptr); + #endif + + // Hook for manual move. + static void HandleManualMove(DGUS_VP_Variable &var, void *val_ptr); + // Hook for manual extrude. + static void HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr); + // Hook for motor lock and unlook + static void HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(POWER_LOSS_RECOVERY) + // Hook for power loss recovery. + static void HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr); + #endif + // Hook for settings + static void HandleSettings(DGUS_VP_Variable &var, void *val_ptr); + static void HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr); + static void HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr); + + #if HAS_PID_HEATING + // Hook for "Change this temperature PID para" + static void HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr); + // Hook for PID autotune + static void HandlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if HAS_BED_PROBE + // Hook for "Change probe offset z" + static void HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if ENABLED(BABYSTEPPING) + // Hook for live z adjust action + static void HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if HAS_FAN + // Hook for fan control + static void HandleFanControl(DGUS_VP_Variable &var, void *val_ptr); + #endif + // Hook for heater control + static void HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(DGUS_PREHEAT_UI) + // Hook for preheat + static void HandlePreheat(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + // Hook for filament load and unload filament option + static void HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr); + // Hook for filament load and unload + static void HandleFilamentLoadUnload(DGUS_VP_Variable &var); + #endif + + #if ENABLED(SDSUPPORT) + // Callback for VP "Display wants to change screen when there is a SD card" + static void ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr); + // Scroll buttons on the file listing screen. + static void DGUSLCD_SD_ScrollFilelist(DGUS_VP_Variable &var, void *val_ptr); + // File touched. + static void DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr); + // start print after confirmation received. + static void DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr); + // User hit the pause, resume or abort button. + static void DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr); + // User confirmed the abort action + static void DGUSLCD_SD_ReallyAbort(DGUS_VP_Variable &var, void *val_ptr); + // User hit the tune button + static void DGUSLCD_SD_PrintTune(DGUS_VP_Variable &var, void *val_ptr); + // Send a single filename to the display. + static void DGUSLCD_SD_SendFilename(DGUS_VP_Variable &var); + // Marlin informed us that a new SD has been inserted. + static void SDCardInserted(); + // Marlin informed us that the SD Card has been removed(). + static void SDCardRemoved(); + // Marlin informed us about a bad SD Card. + static void SDCardError(); + #endif + + // OK Button the Confirm screen. + static void ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr); + + // Update data after went to new screen (by display or by GotoScreen) + // remember: store the last-displayed screen, so it can get returned to. + // (e.g for pop up messages) + static void UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup=false); + + // Recall the remembered screen. + static void PopToOldScreen(); + + // Make the display show the screen and update all VPs in it. + static void GotoScreen(DGUSLCD_Screens screen, bool ispopup = false); + + static void UpdateScreenVPData(); + + // Helpers to convert and transfer data to the display. + static void DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendStringToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var); + static void DGUSLCD_SendTemperaturePID(DGUS_VP_Variable &var); + static void DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendPrintProgressToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var); + + #if ENABLED(PRINTCOUNTER) + static void DGUSLCD_SendPrintAccTimeToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendPrintsTotalToDisplay(DGUS_VP_Variable &var); + #endif + #if HAS_FAN + static void DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var); + #endif + static void DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var); + #if ENABLED(DGUS_UI_WAITING) + static void DGUSLCD_SendWaitingStatusToDisplay(DGUS_VP_Variable &var); + #endif + + // Send a value from 0..100 to a variable with a range from 0..255 + static void DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr); + + template + static void DGUSLCD_SetValueDirectly(DGUS_VP_Variable &var, void *val_ptr) { + if (!var.memadr) return; + union { unsigned char tmp[sizeof(T)]; T t; } x; + unsigned char *ptr = (unsigned char*)val_ptr; + LOOP_L_N(i, sizeof(T)) x.tmp[i] = ptr[sizeof(T) - i - 1]; + *(T*)var.memadr = x.t; + } + + // Send a float value to the display. + // Display will get a 4-byte integer scaled to the number of digits: + // Tell the display the number of digits and it cheats by displaying a dot between... + template + static void DGUSLCD_SendFloatAsLongValueToDisplay(DGUS_VP_Variable &var) { + if (var.memadr) { + float f = *(float *)var.memadr; + f *= cpow(10, decimals); + dgusdisplay.WriteVariable(var.VP, (long)f); + } + } + + // Send a float value to the display. + // Display will get a 2-byte integer scaled to the number of digits: + // Tell the display the number of digits and it cheats by displaying a dot between... + template + static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { + if (var.memadr) { + float f = *(float *)var.memadr; + DEBUG_ECHOLNPAIR_F(" >> ", f, 6); + f *= cpow(10, decimals); + dgusdisplay.WriteVariable(var.VP, (int16_t)f); + } + } + + // Force an update of all VP on the current screen. + static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; } + // Has all VPs sent to the screen + static inline bool IsScreenComplete() { return ScreenComplete; } + + static inline DGUSLCD_Screens getCurrentScreen() { return current_screen; } + + static inline void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; } + +private: + static DGUSLCD_Screens current_screen; //< currently on screen + static constexpr uint8_t NUM_PAST_SCREENS = 4; + static DGUSLCD_Screens past_screens[NUM_PAST_SCREENS]; //< LIFO with past screens for the "back" button. + + static uint8_t update_ptr; //< Last sent entry in the VPList for the actual screen. + static uint16_t skipVP; //< When updating the screen data, skip this one, because the user is interacting with it. + static bool ScreenComplete; //< All VPs sent to screen? + + static uint16_t ConfirmVP; //< context for confirm screen (VP that will be emulated-sent on "OK"). + + #if ENABLED(SDSUPPORT) + static int16_t top_file; //< file on top of file chooser + static int16_t file_to_print; //< touched file to be confirmed + #endif + + static void (*confirm_action_cb)(); +}; + +#if ENABLED(POWER_LOSS_RECOVERY) + #define PLR_SCREEN_RECOVER DGUSLCD_SCREEN_SDPRINTMANIPULATION + #define PLR_SCREEN_CANCEL DGUSLCD_SCREEN_STATUS +#endif diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp new file mode 100644 index 000000000000..9ecfb57397b9 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp @@ -0,0 +1,802 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_MKS) + +#include "DGUSDisplayDef.h" +#include "../DGUSDisplay.h" +#include "../DGUSScreenHandler.h" + +#include "../../../../module/temperature.h" +#include "../../../../module/motion.h" +#include "../../../../module/planner.h" + +#include "../../ui_api.h" +#include "../../../marlinui.h" + +#if HAS_STEALTHCHOP + #include "../../../../module/stepper/trinamic.h" +#endif + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../../../feature/powerloss.h" +#endif + +#if ENABLED(DGUS_UI_MOVE_DIS_OPTION) + uint16_t distanceToMove = 10; +#endif + +uint16_t manualMoveStep = 1; +uint16_t distanceFilament = 10; +uint16_t filamentSpeed_mm_s = 25; +float ZOffset_distance = 0.1; +float mesh_adj_distance = 0.01; +float Z_distance = 0.1; + +//struct { uint16_t h, m, s; } dgus_time; + +// +// Persistent settings +// +xy_int_t mks_corner_offsets[5]; // Initialized by settings.load() +xyz_int_t mks_park_pos; // Initialized by settings.load() +celsius_t mks_min_extrusion_temp; // Initialized by settings.load() + +void MKS_reset_settings() { + constexpr xy_int_t init_dgus_level_offsets[5] = { + { 20, 20 }, { 20, 20 }, + { 20, 20 }, { 20, 20 }, + { X_CENTER, Y_CENTER } + }; + mks_language_index = 0; + COPY(mks_corner_offsets, init_dgus_level_offsets); + mks_park_pos.set(20, 20, 10); + mks_min_extrusion_temp = 0; +} + +xyz_pos_t position_before_pause; +constexpr feedRate_t park_speed_xy = TERN(NOZZLE_PARK_FEATURE, NOZZLE_PARK_XY_FEEDRATE, 100), + park_speed_z = TERN(NOZZLE_PARK_FEATURE, NOZZLE_PARK_Z_FEEDRATE, 5); + +void MKS_pause_print_move() { + queue.exhaust(); + position_before_pause = current_position; + + // Save the current position, the raise amount, and 'already raised' + TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true, mks_park_pos.z, true)); + + destination.z = _MIN(current_position.z + mks_park_pos.z, Z_MAX_POS); + prepare_internal_move_to_destination(park_speed_z); + + destination.set(X_MIN_POS + mks_park_pos.x, Y_MIN_POS + mks_park_pos.y); + prepare_internal_move_to_destination(park_speed_xy); +} + +void MKS_resume_print_move() { + destination.set(position_before_pause.x, position_before_pause.y); + prepare_internal_move_to_destination(park_speed_xy); + destination.z = position_before_pause.z; + prepare_internal_move_to_destination(park_speed_z); + TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true)); +} + +float z_offset_add = 0; + +xyz_int_t tmc_step; // = { 0, 0, 0 } + +uint16_t lcd_default_light = 50; + +EX_FILAMENT_DEF ex_filament; +RUNOUT_MKS_DEF runout_mks; +NOZZLE_PARK_DEF nozzle_park_mks; + +const uint16_t VPList_Boot[] PROGMEM = { + VP_MARLIN_VERSION, + 0x0000 +}; + +#define MKSLIST_E_ITEM(N) VP_T_E##N##_Is, VP_T_E##N##_Set, + +const uint16_t VPList_Main[] PROGMEM = { + // VP_M117, for completeness, but it cannot be auto-uploaded. + #if HAS_HOTEND + MKSLIST_E_ITEM(0) VP_E0_STATUS, + #if HOTENDS >= 2 + MKSLIST_E_ITEM(1) VP_E1_STATUS, + #endif + #endif + #if HAS_HEATED_BED + VP_T_Bed_Is, VP_T_Bed_Set, VP_BED_STATUS, + #endif + #if HAS_FAN + VP_Fan0_Percentage, VP_FAN0_STATUS, + #endif + VP_XPos, VP_YPos, VP_ZPos, + VP_Fan0_Percentage, + VP_Feedrate_Percentage, + #if ENABLED(LCD_SET_PROGRESS_MANUALLY) + VP_PrintProgress_Percentage, + #endif + 0x0000 +}; + +const uint16_t MKSList_Home[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + // Language + // VP_HOME_Dis, + + 0x0000 +}; + +const uint16_t MKSList_Setting[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + // Language + VP_Setting_Dis, + 0x0000 +}; + +const uint16_t MKSList_Tool[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + // Language + VP_Tool_Dis, + // LCD BLK + VP_LCD_BLK, + 0x0000 +}; + +const uint16_t MKSList_EXTRUE[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + + VP_Filament_distance, + VP_Filament_speed, + + 0x0000 +}; + +const uint16_t MKSList_LEVEL[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + + 0x0000 +}; + +const uint16_t MKSList_MOVE[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + + 0x0000 +}; + +const uint16_t MKSList_Print[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + // Print Percent + VP_PrintProgress_Percentage, + + VP_PrintTime, + + VP_Flowrate_E0, + VP_Flowrate_E1, + VP_Feedrate_Percentage, + + VP_PrintTime_H, + VP_PrintTime_M, + VP_PrintTime_S, + + VP_XPos, + VP_YPos, + VP_ZPos, + + 0x0000 +}; + +const uint16_t MKSList_SD_File[] PROGMEM = { + VP_SD_FileName0, VP_SD_FileName1, + VP_SD_FileName2, VP_SD_FileName3, + VP_SD_FileName4, VP_SD_FileName5, + VP_SD_FileName6, VP_SD_FileName7, + VP_SD_FileName8, VP_SD_FileName9, + + 0x0000 +}; + +const uint16_t MKSList_TempOnly[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + // LCD BLK + VP_LCD_BLK, + 0x0000 +}; + +const uint16_t MKSList_Pluse[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + + // Pluse + VP_X_STEP_PER_MM, + VP_Y_STEP_PER_MM, + VP_Z_STEP_PER_MM, + VP_E0_STEP_PER_MM, + VP_E1_STEP_PER_MM, + + 0x0000 +}; + +const uint16_t MKSList_MaxSpeed[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + + // Pluse + VP_X_MAX_SPEED, + VP_Y_MAX_SPEED, + VP_Z_MAX_SPEED, + VP_E0_MAX_SPEED, + VP_E1_MAX_SPEED, + + 0x0000 +}; + +const uint16_t MKSList_MaxAcc[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + + // ACC + VP_ACC_SPEED, + VP_X_ACC_MAX_SPEED, + VP_Y_ACC_MAX_SPEED, + VP_Z_ACC_MAX_SPEED, + VP_E0_ACC_MAX_SPEED, + VP_E1_ACC_MAX_SPEED, + + 0x0000 +}; + +const uint16_t MKSList_PID[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + + // PID + VP_E0_PID_P, + VP_E0_PID_I, + VP_E0_PID_D, + + 0x0000 +}; + +const uint16_t MKSList_Level_Point[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + // FAN + VP_Fan0_Percentage, + + // Level Point + VP_Level_Point_One_X, + VP_Level_Point_One_Y, + VP_Level_Point_Two_X, + VP_Level_Point_Two_Y, + VP_Level_Point_Three_X, + VP_Level_Point_Three_Y, + VP_Level_Point_Four_X, + VP_Level_Point_Four_Y, + VP_Level_Point_Five_X, + VP_Level_Point_Five_Y, + + 0x0000 +}; + +const uint16_t MKSList_Level_PrintConfig[] PROGMEM = { + VP_T_E0_Set, + VP_T_E1_Set, + VP_T_Bed_Set, + VP_Flowrate_E0, + VP_Flowrate_E1, + VP_Fan0_Percentage, + VP_Feedrate_Percentage, + + 0x0000 +}; + +const uint16_t MKSList_PrintPauseConfig[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + + VP_X_PARK_POS, + VP_Y_PARK_POS, + VP_Z_PARK_POS, + + 0x0000 +}; + +const uint16_t MKSList_MotoConfig[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + + VP_TRAVEL_SPEED, + VP_FEEDRATE_MIN_SPEED, + VP_T_F_SPEED, + + 0x0000 +}; + +const uint16_t MKSList_EX_Config[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + VP_MIN_EX_T,VP_Min_EX_T_E, + 0x0000 +}; + +const uint16_t MKSTMC_Config[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + // HB Temp + VP_T_Bed_Is, VP_T_Bed_Set, + VP_MIN_EX_T, + + VP_TMC_X_STEP, + VP_TMC_Y_STEP, + VP_TMC_Z_STEP, + VP_TMC_X1_Current, + VP_TMC_Y1_Current, + VP_TMC_X_Current, + VP_TMC_Y_Current, + VP_TMC_Z_Current, + VP_TMC_E0_Current, + VP_TMC_E1_Current, + VP_TMC_Z1_Current, + + 0x0000 +}; + +const uint16_t MKSAuto_Level[] PROGMEM = { + VP_MESH_LEVEL_POINT_DIS, + VP_ZPos, + 0x0000 +}; + +const uint16_t MKSOffset_Config[] PROGMEM = { + // E Temp + REPEAT(EXTRUDERS, MKSLIST_E_ITEM) + VP_OFFSET_X, + VP_OFFSET_Y, + VP_OFFSET_Z, + 0x0000 +}; + +const uint16_t MKSBabyStep[] PROGMEM = { + VP_ZOffset_DE_DIS, + 0x0000 +}; + +const uint16_t MKSList_About[] PROGMEM = { + // Marlin version + VP_MARLIN_VERSION, + // H43 Version + VP_MKS_H43_VERSION, + VP_MKS_H43_UpdataVERSION, + 0x0000 +}; + +// Page data updata +const struct VPMapping VPMap[] PROGMEM = { + { MKSLCD_SCREEN_BOOT, VPList_Boot }, // Boot Page to show logo 0 + { MKSLCD_SCREEN_HOME, MKSList_Home }, // Home, Page 1 + { MKSLCD_SCREEN_SETTING, MKSList_Setting }, // Setting, Page 2 + { MKSLCD_SCREEM_TOOL, MKSList_Tool }, // Page 3 + { MKSLCD_SCREEN_EXTRUDE_P1, MKSList_EXTRUE }, // Page 4 + { MKSLCD_SCREEN_EXTRUDE_P2, MKSList_EXTRUE }, // Page 11 + { MKSLCD_PAUSE_SETTING_EX, MKSList_EXTRUE }, // Page 57 + { MKSLCD_PAUSE_SETTING_EX2, MKSList_EXTRUE }, // Page 61 + { MKSLCD_SCREEN_LEVEL, MKSList_LEVEL }, // Page 5 + { MKSLCD_SCREEN_MOVE, MKSList_MOVE }, // Page 6 + { MKSLCD_SCREEN_PRINT, MKSList_Print }, // Page 7 + { MKSLCD_SCREEN_PAUSE, MKSList_Print }, // Page 26 + { MKSLCD_SCREEN_CHOOSE_FILE, MKSList_SD_File }, // Page 15 + { MKSLCD_SCREEN_MOTOR_PLUSE, MKSList_Pluse }, // Page 51 + { MKSLCD_SCREEN_MOTOR_SPEED, MKSList_MaxSpeed }, // Page 55 + { MKSLCD_SCREEN_MOTOR_ACC_MAX, MKSList_MaxAcc }, // Page 53 + { MKSLCD_SCREEN_LEVEL_DATA, MKSList_Level_Point }, // Page 48 + { MKSLCD_PrintPause_SET, MKSList_PrintPauseConfig }, // Page 49 + { MKSLCD_FILAMENT_DATA, MKSList_SD_File }, // Page 50 + { MKSLCD_SCREEN_Config, MKSList_TempOnly }, // Page 46 + { MKSLCD_SCREEN_Config_MOTOR, MKSList_MotoConfig }, // Page 47 + { MKSLCD_PID, MKSList_PID }, // Page 56 + { MKSLCD_ABOUT, MKSList_About }, // Page 36 + { MKSLCD_SCREEN_PRINT_CONFIG, MKSList_Level_PrintConfig }, // Page 60 + { MKSLCD_SCREEN_EX_CONFIG, MKSList_EX_Config }, // Page 65 + { MKSLCD_SCREEN_TMC_Config, MKSTMC_Config }, // Page 70 + { MKSLCD_AUTO_LEVEL, MKSAuto_Level }, // Page 73 + { MKSLCD_Screen_Offset_Config, MKSOffset_Config }, // Page 30 + { MKSLCD_Screen_PMove, MKSList_MOVE }, // Page 64 + { MKSLCD_Screen_Baby, MKSBabyStep }, // Page 71 + //{ MKSLCD_SCREEN_LEVEL_DATA, MKSList_SD_File}, + //{ MKSLCD_SCREEN_HOME, VPList_Boot }, + { 0, nullptr } // List is terminated with an nullptr as table entry. +}; + +const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION; +const char H43Version[] PROGMEM = "MKS H43_V1.30"; +const char Updata_Time[] PROGMEM = STRING_DISTRIBUTION_DATE; + +const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { + // Helper to detect touch events + VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr), + VPHELPER(VP_SCREENCHANGE_ASK, nullptr, ScreenHandler.ScreenChangeHookIfIdle, nullptr), + #if ENABLED(SDSUPPORT) + VPHELPER(VP_SCREENCHANGE_WHENSD, nullptr, ScreenHandler.ScreenChangeHookIfSD, nullptr), + #endif + VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr), + + // Back Button + VPHELPER(VP_BACK_PAGE, nullptr, ScreenHandler.ScreenBackChange, nullptr), + VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr), + + VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr), + + VPHELPER(VP_X_HOME, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_Y_HOME, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_Z_HOME, nullptr, ScreenHandler.HandleManualMove, nullptr), + + VPHELPER(VP_MOVE_DISTANCE, &manualMoveStep, ScreenHandler.GetManualMovestep, nullptr), + + VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_LEVEL_POINT, nullptr, ScreenHandler.ManualAssistLeveling, nullptr), + + #if ENABLED(POWER_LOSS_RECOVERY) + VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr), + #endif + VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr), + #if ENABLED(SINGLE_Z_CALIBRATION) + VPHELPER(VP_Z_CALIBRATE, nullptr, ScreenHandler.HandleZCalibration, nullptr), + #endif + #if ENABLED(FIRST_LAYER_CAL) + VPHELPER(VP_Z_FIRST_LAYER_CAL, nullptr, ScreenHandler.HandleFirstLayerCal, nullptr), + #endif + {.VP = VP_MARLIN_VERSION, .memadr = (void *)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, + // M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr + {.VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay}, + {.VP = VP_MKS_H43_VERSION, .memadr = (void *)H43Version, .size = VP_MKS_H43_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, + {.VP = VP_MKS_H43_UpdataVERSION, .memadr = (void *)Updata_Time, .size = VP_MKS_H43_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, + + // Temperature Data + #if HAS_HOTEND + VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), + VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Flowrate_E0, &planner.flow_percentage[ExtUI::extruder_t::E0], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), + VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr), + VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + #if ENABLED(DGUS_PREHEAT_UI) + VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr), + #endif + #if ENABLED(PIDTEMP) + VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), + VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), + VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), + VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), + #endif + #if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + VPHELPER(VP_LOAD_Filament, nullptr, ScreenHandler.MKS_FilamentLoad, nullptr), + VPHELPER(VP_UNLOAD_Filament, nullptr, ScreenHandler.MKS_FilamentUnLoad, nullptr), + VPHELPER(VP_Filament_distance, &distanceFilament, ScreenHandler.GetManualFilament, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Filament_speed, &filamentSpeed_mm_s, ScreenHandler.GetManualFilamentSpeed, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #endif + + #if HOTENDS >= 2 + VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), + VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Flowrate_E1, &planner.flow_percentage[ExtUI::extruder_t::E1], ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr), + VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + + #if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + VPHELPER(VP_Filament_distance, &distanceFilament, ScreenHandler.GetManualFilament, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_Filament_speed, &filamentSpeed_mm_s, ScreenHandler.GetManualFilamentSpeed, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + + #if ENABLED(PIDTEMP) + VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), + #endif + + VPHELPER(VP_E1_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload), + #endif + + #if HAS_HEATED_BED + VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), + VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + #if ENABLED(PIDTEMPBED) + VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), + VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), + VPHELPER(VP_BED_PID_D, &thermalManager.temp_bed.pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), + VPHELPER(VP_PID_AUTOTUNE_BED, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), + #endif + #endif + + // Fan Data + #if HAS_FAN + #define FAN_VPHELPER(N) \ + VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_SetUint8, ScreenHandler.DGUSLCD_SendFanToDisplay), \ + VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr), \ + VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay), + REPEAT(FAN_COUNT, FAN_VPHELPER) + #endif + + // Feedrate + VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + + // Position Data + VPHELPER(VP_XPos, ¤t_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), + VPHELPER(VP_YPos, ¤t_position.y, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), + VPHELPER(VP_ZPos, ¤t_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), + + // Level Point Set + VPHELPER(VP_Level_Point_One_X, &mks_corner_offsets[0].x, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Level_Point_One_Y, &mks_corner_offsets[0].y, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Level_Point_Two_X, &mks_corner_offsets[1].x, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Level_Point_Two_Y, &mks_corner_offsets[1].y, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Level_Point_Three_X, &mks_corner_offsets[2].x, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Level_Point_Three_Y, &mks_corner_offsets[2].y, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Level_Point_Four_X, &mks_corner_offsets[3].x, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Level_Point_Four_Y, &mks_corner_offsets[3].y, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Level_Point_Five_X, &mks_corner_offsets[4].x, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Level_Point_Five_Y, &mks_corner_offsets[4].y, ScreenHandler.HandleChangeLevelPoint_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + + // Print Progress + VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay), + + // LCD Control + VPHELPER(VP_LCD_BLK, &lcd_default_light, ScreenHandler.LCD_BLK_Adjust, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + + // SD File - Back + VPHELPER(VP_SD_FileSelect_Back, nullptr, ScreenHandler.SD_FileBack, nullptr), + + // Print Time + VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay_MKS), + + #if ENABLED(PRINTCOUNTER) + VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay), + VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay), + #endif + + VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + + VPHELPER(VP_X_MAX_SPEED, &planner.settings.max_feedrate_mm_s[X_AXIS], ScreenHandler.HandleMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_Y_MAX_SPEED, &planner.settings.max_feedrate_mm_s[Y_AXIS], ScreenHandler.HandleMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_Z_MAX_SPEED, &planner.settings.max_feedrate_mm_s[Z_AXIS], ScreenHandler.HandleMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + + #if HAS_HOTEND + VPHELPER(VP_E0_MAX_SPEED, &planner.settings.max_feedrate_mm_s[E_AXIS_N(0)], ScreenHandler.HandleExtruderMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + #if HOTENDS >= 2 + VPHELPER(VP_E1_MAX_SPEED, &planner.settings.max_feedrate_mm_s[E_AXIS_N(1)], ScreenHandler.HandleExtruderMaxSpeedChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + #endif + #endif + + VPHELPER(VP_X_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[X_AXIS], ScreenHandler.HandleMaxAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Y_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[Y_AXIS], ScreenHandler.HandleMaxAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Z_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[Z_AXIS], ScreenHandler.HandleMaxAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + + #if HAS_HOTEND + VPHELPER(VP_E0_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(0)], ScreenHandler.HandleExtruderAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #if HOTENDS >= 2 + VPHELPER(VP_E1_ACC_MAX_SPEED, (uint16_t *)&planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)], ScreenHandler.HandleExtruderAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #endif + + VPHELPER(VP_TRAVEL_SPEED, (uint16_t *)&planner.settings.travel_acceleration, ScreenHandler.HandleTravelAccChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_FEEDRATE_MIN_SPEED, (uint16_t *)&planner.settings.min_feedrate_mm_s, ScreenHandler.HandleFeedRateMinChange_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_T_F_SPEED, (uint16_t *)&planner.settings.min_travel_feedrate_mm_s, ScreenHandler.HandleMin_T_F_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + VPHELPER(VP_ACC_SPEED, (uint16_t *)&planner.settings.acceleration, ScreenHandler.HandleAccChange_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + + VPHELPER(VP_X_PARK_POS, &mks_park_pos.x, ScreenHandler.GetParkPos_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Y_PARK_POS, &mks_park_pos.y, ScreenHandler.GetParkPos_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Z_PARK_POS, &mks_park_pos.z, ScreenHandler.GetParkPos_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + + #if ENABLED(PREVENT_COLD_EXTRUSION) + VPHELPER(VP_MIN_EX_T, &thermalManager.extrude_min_temp, ScreenHandler.HandleGetExMinTemp_MKS, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + + #if ENABLED(SENSORLESS_HOMING) // TMC SENSORLESS Setting + #if X_HAS_STEALTHCHOP + VPHELPER(VP_TMC_X_STEP, &tmc_step.x, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendTMCStepValue), + #endif + #if Y_HAS_STEALTHCHOP + VPHELPER(VP_TMC_Y_STEP, &tmc_step.y, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendTMCStepValue), + #endif + #if Z_HAS_STEALTHCHOP + VPHELPER(VP_TMC_Z_STEP, &tmc_step.z, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendTMCStepValue), + #endif + #endif + + #if HAS_TRINAMIC_CONFIG // TMC Current Setting + #if AXIS_IS_TMC(X) + VPHELPER(VP_TMC_X_Current, &stepperX.val_mA, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #if AXIS_IS_TMC(Y) + VPHELPER(VP_TMC_Y_Current, &stepperY.val_mA, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #if AXIS_IS_TMC(Z) + VPHELPER(VP_TMC_Z_Current, &stepperZ.val_mA, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #if AXIS_IS_TMC(E0) + VPHELPER(VP_TMC_E0_Current, &stepperE0.val_mA, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #if AXIS_IS_TMC(E1) + VPHELPER(VP_TMC_E1_Current, &stepperE1.val_mA, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #if AXIS_IS_TMC(X2) + VPHELPER(VP_TMC_X1_Current, &stepperX2.val_mA, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #if AXIS_IS_TMC(Y2) + VPHELPER(VP_TMC_Y1_Current, &stepperY2.val_mA, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #if AXIS_IS_TMC(Z2) + VPHELPER(VP_TMC_Z1_Current, &stepperZ2.val_mA, ScreenHandler.TMC_ChangeConfig, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + #endif + + VPHELPER(VP_EEPROM_CTRL, nullptr, ScreenHandler.EEPROM_CTRL, nullptr), + VPHELPER(VP_LEVEL_BUTTON, nullptr, ScreenHandler.Level_Ctrl_MKS, nullptr), + VPHELPER(VP_LANGUAGE_CHANGE, nullptr, ScreenHandler.LanguageChange_MKS, nullptr), + + //VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr), + + VPHELPER(VP_SD_Print_LiveAdjustZ_Confirm, nullptr, ScreenHandler.ZoffsetConfirm, nullptr), + + VPHELPER(VP_ZOffset_Distance,nullptr ,ScreenHandler.GetZoffsetDistance, nullptr), + VPHELPER(VP_MESH_LEVEL_ADJUST, nullptr, ScreenHandler.MeshLevelDistanceConfig, nullptr), + VPHELPER(VP_MESH_LEVEL_POINT,nullptr, ScreenHandler.MeshLevel,nullptr), + + #if ENABLED(PREVENT_COLD_EXTRUSION) + VPHELPER(VP_Min_EX_T_E, &thermalManager.extrude_min_temp, ScreenHandler.GetMinExtrudeTemp, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #endif + + VPHELPER(VP_AutoTurnOffSw, nullptr, ScreenHandler.GetTurnOffCtrl, nullptr), + + #if HAS_HOTEND + VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + #if HOTENDS >= 2 + VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged_MKS, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<0>), + #endif + #endif + + // SDCard File listing + + #if ENABLED(SDSUPPORT) + VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr), + VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), + VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), + VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName5, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName6, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName7, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName8, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName9, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER(VP_SD_ResumePauseAbort, nullptr, ScreenHandler.DGUSLCD_SD_ResumePauseAbort, nullptr), + VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr), + VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr), + #if ENABLED(BABYSTEPPING) + VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>), + VPHELPER(VP_ZOffset_DE_DIS, &z_offset_add, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), + #endif + #if HAS_BED_PROBE + VPHELPER(VP_OFFSET_X, &probe.offset.x, ScreenHandler.GetOffsetValue,ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), + VPHELPER(VP_OFFSET_Y, &probe.offset.y, ScreenHandler.GetOffsetValue,ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), + VPHELPER(VP_OFFSET_Z, &probe.offset.z, ScreenHandler.GetOffsetValue,ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), + #endif + #else + VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.PrintReturn, nullptr), + #endif + + #if ENABLED(DGUS_UI_WAITING) + VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay), + #endif + + // Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content. + //{.VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, + //{.VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, + //{.VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, + //{.VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM}, + + {.VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS}, + {.VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS}, + {.VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS}, + {.VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay_Language_MKS}, + + VPHELPER(0, 0, 0, 0) // must be last entry. +}; + +#endif // DGUS_LCD_UI_MKS diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h new file mode 100644 index 000000000000..407782f5595e --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.h @@ -0,0 +1,712 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../DGUSDisplayDef.h" + +//#define DGUS_MKS_RUNOUT_SENSOR + +#define LOGO_TIME_DELAY TERN(USE_MKS_GREEN_UI, 8000, 1500) + +#if ENABLED(DGUS_MKS_RUNOUT_SENSOR) + #define MT_DET_1_PIN 1 + #define MT_DET_2_PIN 2 + #define MT_DET_PIN_STATE LOW +#endif + +#define MKS_FINSH + +extern uint16_t manualMoveStep; +extern uint16_t distanceFilament; +extern uint16_t filamentSpeed_mm_s; +extern float ZOffset_distance; +extern float mesh_adj_distance; +extern float Z_distance; + +//extern struct { uint16_t h, m, s; } dgus_time; + +extern xy_int_t mks_corner_offsets[5]; +extern xyz_int_t mks_park_pos; +extern celsius_t mks_min_extrusion_temp; + +void MKS_reset_settings(); // Restore persistent settings to defaults + +void MKS_pause_print_move(); +void MKS_resume_print_move(); + +extern float z_offset_add; + +extern xyz_int_t tmc_step; + +extern uint16_t lcd_default_light; + +#if X_HAS_STEALTHCHOP + extern uint16_t tmc_x_current; +#endif +#if Y_HAS_STEALTHCHOP + extern uint16_t tmc_y_current; +#endif +#if Z_HAS_STEALTHCHOP + extern uint16_t tmc_z_current; +#endif +#if E0_HAS_STEALTHCHOP + extern uint16_t tmc_e0_current; +#endif +#if E1_HAS_STEALTHCHOP + extern uint16_t tmc_e1_current; +#endif + +typedef enum { + EX_HEATING, + EX_HEAT_STARUS, + EX_CHANGING, + EX_CHANGE_STATUS, + EX_NONE, +} EX_STATUS_DEF; + +typedef struct { + //uint8_t ex_change_flag:1; + //uint8_t ex_heat_flag:1; + uint8_t ex_load_unload_flag:1; //0:unload 1:load + EX_STATUS_DEF ex_status; + uint32_t ex_tick_start; + uint32_t ex_tick_end; + uint32_t ex_speed; + uint32_t ex_length; + uint32_t ex_need_time; +} EX_FILAMENT_DEF; + +extern EX_FILAMENT_DEF ex_filament; + +typedef enum { + UNRUNOUT_STATUS, + RUNOUT_STATUS, + RUNOUT_WAITTING_STATUS, + RUNOUT_BEGIN_STATUS, +} RUNOUT_MKS_STATUS_DEF; + +typedef struct { + RUNOUT_MKS_STATUS_DEF runout_status; + uint8_t pin_status; + uint8_t de_count; + uint8_t de_times; +} RUNOUT_MKS_DEF; + +extern RUNOUT_MKS_DEF runout_mks; + +typedef struct { + uint8_t print_pause_start_flag:1; + uint8_t runout_flag:1; + bool blstatus; + uint16_t x_pos; + uint16_t y_pos; + uint16_t z_pos; +} NOZZLE_PARK_DEF; + +extern NOZZLE_PARK_DEF nozzle_park_mks; + +enum DGUSLCD_Screens : uint8_t { + #if ENABLED(USE_MKS_GREEN_UI) + + DGUSLCD_SCREEN_BOOT = 33, + DGUSLCD_SCREEN_MAIN = 60, + DGUSLCD_SCREEN_STATUS = 60, + DGUSLCD_SCREEN_STATUS2 = 60, + DGUSLCD_SCREEN_PREHEAT = 18, + DGUSLCD_SCREEN_POWER_LOSS = 100, + DGUSLCD_SCREEN_MANUALMOVE = 192, + DGUSLCD_SCREEN_UTILITY = 120, + DGUSLCD_SCREEN_FILAMENT_UNLOADING = 158, + DGUSLCD_SCREEN_SDFILELIST = 15, + DGUSLCD_SCREEN_SDPRINTMANIPULATION = 15, + DGUSLCD_SCREEN_SDPRINTTUNE = 17, + + MKSLCD_SCREEN_BOOT = 33, + MKSLCD_SCREEN_HOME = 60, // MKS main page + MKSLCD_SCREEN_SETTING = 62, // MKS Setting page / no wifi whit + MKSLCD_SCREEM_TOOL = 64, // MKS Tool page + MKSLCD_SCREEN_EXTRUDE_P1 = 75, + MKSLCD_SCREEN_EXTRUDE_P2 = 77, + MKSLCD_SCREEN_LEVEL = 73, + MKSLCD_AUTO_LEVEL = 81, + MKSLCD_SCREEN_MOVE = 66, + MKSLCD_SCREEN_PRINT = 68, + MKSLCD_SCREEN_PAUSE = 70, + MKSLCD_SCREEN_CHOOSE_FILE = 87, + MKSLCD_SCREEN_NO_CHOOSE_FILE = 88, + MKSLCD_SCREEN_Config = 101, + MKSLCD_SCREEN_Config_MOTOR = 103, + MKSLCD_SCREEN_MOTOR_PLUSE = 104, + MKSLCD_SCREEN_MOTOR_SPEED = 102, + MKSLCD_SCREEN_MOTOR_ACC_MAX = 105, + MKSLCD_SCREEN_PRINT_CONFIG = 72, + MKSLCD_SCREEN_LEVEL_DATA = 106, + MKSLCD_PrintPause_SET = 107, + MKSLCD_FILAMENT_DATA = 50, + MKSLCD_ABOUT = 83, + MKSLCD_PID = 108, + MKSLCD_PAUSE_SETTING_MOVE = 98, + MKSLCD_PAUSE_SETTING_EX = 96, + MKSLCD_PAUSE_SETTING_EX2 = 97, + MKSLCD_SCREEN_PRINT_CONFIRM = 94, + MKSLCD_SCREEN_EX_CONFIG = 112, + MKSLCD_SCREEN_EEP_Config = 89, + MKSLCD_SCREEN_PrintDone = 92, + MKSLCD_SCREEN_TMC_Config = 111, + MKSLCD_Screen_Offset_Config = 109, + MKSLCD_Screen_PMove = 98, + MKSLCD_Screen_Baby = 79, + + #else + + DGUSLCD_SCREEN_BOOT = 120, + DGUSLCD_SCREEN_MAIN = 1, + + DGUSLCD_SCREEN_STATUS = 1, + DGUSLCD_SCREEN_STATUS2 = 1, + DGUSLCD_SCREEN_PREHEAT = 18, + DGUSLCD_SCREEN_POWER_LOSS = 100, + DGUSLCD_SCREEN_MANUALMOVE = 192, + DGUSLCD_SCREEN_UTILITY = 120, + DGUSLCD_SCREEN_FILAMENT_UNLOADING = 158, + DGUSLCD_SCREEN_SDFILELIST = 15, + DGUSLCD_SCREEN_SDPRINTMANIPULATION = 15, + DGUSLCD_SCREEN_SDPRINTTUNE = 17, + + MKSLCD_SCREEN_BOOT = 0, + MKSLCD_SCREEN_HOME = 1, // MKS main page + MKSLCD_SCREEN_SETTING = 2, // MKS Setting page / no wifi whit + MKSLCD_SCREEM_TOOL = 3, // MKS Tool page + MKSLCD_SCREEN_EXTRUDE_P1 = 4, + MKSLCD_SCREEN_EXTRUDE_P2 = 11, + MKSLCD_SCREEN_LEVEL = 5, + MKSLCD_AUTO_LEVEL = 73, + MKSLCD_SCREEN_LEVEL_PRESS = 9, + MKSLCD_SCREEN_MOVE = 6, + MKSLCD_SCREEN_PRINT = 7, + MKSLCD_SCREEN_PRINT_PRESS = 13, + MKSLCD_SCREEN_PAUSE = 26, + MKSLCD_SCREEN_PAUSE_PRESS = 26, + MKSLCD_SCREEN_CHOOSE_FILE = 15, + MKSLCD_SCREEN_NO_CHOOSE_FILE = 17, + MKSLCD_SCREEN_Config = 46, + MKSLCD_SCREEN_Config_MOTOR = 47, + MKSLCD_SCREEN_MOTOR_PLUSE = 51, + MKSLCD_SCREEN_MOTOR_SPEED = 55, + MKSLCD_SCREEN_MOTOR_ACC_MAX = 53, + MKSLCD_SCREEN_PRINT_CONFIG = 60, + MKSLCD_SCREEN_LEVEL_DATA = 48, + MKSLCD_PrintPause_SET = 49, + MKSLCD_FILAMENT_DATA = 50, + MKSLCD_ABOUT = 36, + MKSLCD_PID = 56, + MKSLCD_PAUSE_SETTING_MOVE = 58, + MKSLCD_PAUSE_SETTING_EX = 57, + MKSLCD_PAUSE_SETTING_EX2 = 61, + MKSLCD_SCREEN_NO_FILE = 42, + MKSLCD_SCREEN_PRINT_CONFIRM = 43, + MKSLCD_SCREEN_EX_CONFIG = 65, + MKSLCD_SCREEN_EEP_Config = 20, + MKSLCD_SCREEN_PrintDone = 25, + MKSLCD_SCREEN_TMC_Config = 70, + MKSLCD_Screen_Offset_Config = 30, + MKSLCD_Screen_PMove = 64, + MKSLCD_Screen_Baby = 71, + + #endif + + DGUSLCD_SCREEN_CONFIRM = 240, + DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version") + DGUSLCD_SCREEN_WAITING = 251, + DGUSLCD_SCREEN_POPUP = 252, ///< special target, popup screen will also return this code to say "return to previous screen" + DGUSLCD_SCREEN_UNUSED = 255 +}; + + +// Place for status messages. +constexpr uint16_t VP_M117 = 0x7020; +constexpr uint8_t VP_M117_LEN = 0x20; + +// Heater status +constexpr uint16_t VP_E0_STATUS = 0x3410; +constexpr uint16_t VP_E1_STATUS = 0x3412; +//constexpr uint16_t VP_E2_STATUS = 0x3414; +//constexpr uint16_t VP_E3_STATUS = 0x3416; +//constexpr uint16_t VP_E4_STATUS = 0x3418; +//constexpr uint16_t VP_E5_STATUS = 0x341A; +constexpr uint16_t VP_MOVE_OPTION = 0x3500; + +// // PIDs +// constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4 +// constexpr uint16_t VP_E0_PID_I = 0x3702; +// constexpr uint16_t VP_E0_PID_D = 0x3704; +// constexpr uint16_t VP_E1_PID_P = 0x3706; // at the moment , 2 byte unsigned int , 0~1638.4 +// constexpr uint16_t VP_E1_PID_I = 0x3708; +// constexpr uint16_t VP_E1_PID_D = 0x370A; +// constexpr uint16_t VP_BED_PID_P = 0x3710; +// constexpr uint16_t VP_BED_PID_I = 0x3712; +// constexpr uint16_t VP_BED_PID_D = 0x3714; + +// Waiting screen status +constexpr uint16_t VP_WAITING_STATUS = 0x3800; + +// SPs for certain variables... +// located at 0x5000 and up +// Not used yet! +// This can be used e.g to make controls / data display invisible +constexpr uint16_t SP_T_E0_Is = 0x5000; +constexpr uint16_t SP_T_E0_Set = 0x5010; +constexpr uint16_t SP_T_E1_Is = 0x5020; +constexpr uint16_t SP_T_Bed_Is = 0x5030; +constexpr uint16_t SP_T_Bed_Set = 0x5040; + +/************************************************************************************************************************* + ************************************************************************************************************************* + * DGUS for MKS Mem layout + ************************************************************************************************************************ + ************************************************************************************************************************/ + +#if ENABLED(MKS_FINSH) + /* -------------------------------0x1000-0x1FFF------------------------------- */ + constexpr uint16_t VP_MSGSTR1 = 0x1100; + constexpr uint8_t VP_MSGSTR1_LEN = 0x20; // might be more place for it... + constexpr uint16_t VP_MSGSTR2 = 0x1140; + constexpr uint8_t VP_MSGSTR2_LEN = 0x20; + constexpr uint16_t VP_MSGSTR3 = 0x1180; + constexpr uint8_t VP_MSGSTR3_LEN = 0x20; + constexpr uint16_t VP_MSGSTR4 = 0x11C0; + constexpr uint8_t VP_MSGSTR4_LEN = 0x20; + + constexpr uint16_t VP_MARLIN_VERSION = 0x1A00; + constexpr uint8_t VP_MARLIN_VERSION_LEN = 16; // there is more space on the display, if needed. + + + constexpr uint16_t VP_SCREENCHANGE_ASK = 0x1500; + constexpr uint16_t VP_SCREENCHANGE = 0x1501; // Key-Return button to new menu pressed. Data contains target screen in low byte and info in high byte. + constexpr uint16_t VP_TEMP_ALL_OFF = 0x1502; // Turn all heaters off. Value arbitrary ;)= + constexpr uint16_t VP_SCREENCHANGE_WHENSD = 0x1503; // "Print" Button touched -- go only there if there is an SD Card. + constexpr uint16_t VP_CONFIRMED = 0x1510; // OK on confirm screen. + + constexpr uint16_t VP_BACK_PAGE = 0x1600; + constexpr uint16_t VP_SETTINGS = 0x1620; + // Power loss recovery + constexpr uint16_t VP_POWER_LOSS_RECOVERY = 0x1680; + /* -------------------------------0x2000-0x2FFF------------------------------- */ + // Temperatures. + constexpr uint16_t VP_T_E0_Is = 0x2000; // 4 Byte Integer + constexpr uint16_t VP_T_E0_Set = 0x2004; // 2 Byte Integer + constexpr uint16_t VP_T_E1_Is = 0x2008; // 4 Byte Integer + constexpr uint16_t VP_T_E1_Set = 0x200B; // 2 Byte Integer + constexpr uint16_t VP_T_E2_Is = 0x2010; // 4 Byte Integer + constexpr uint16_t VP_T_E2_Set = 0x2014; // 2 Byte Integer + constexpr uint16_t VP_T_E3_Is = 0x2018; // 4 Byte Integer + constexpr uint16_t VP_T_E3_Set = 0x201B; // 2 Byte Integer + constexpr uint16_t VP_T_E4_Is = 0x2020; // 4 Byte Integer + constexpr uint16_t VP_T_E4_Set = 0x2024; // 2 Byte Integer + constexpr uint16_t VP_T_E5_Is = 0x2028; // 4 Byte Integer + constexpr uint16_t VP_T_E5_Set = 0x202B; // 2 Byte Integer + constexpr uint16_t VP_T_E6_Is = 0x2030; // 4 Byte Integer + constexpr uint16_t VP_T_E6_Set = 0x2034; // 2 Byte Integer + constexpr uint16_t VP_T_E7_Is = 0x2038; // 4 Byte Integer + constexpr uint16_t VP_T_E7_Set = 0x203B; // 2 Byte Integer + + constexpr uint16_t VP_T_Bed_Is = 0x2040; // 4 Byte Integer + constexpr uint16_t VP_T_Bed_Set = 0x2044; // 2 Byte Integer + + constexpr uint16_t VP_Min_EX_T_E = 0x2100; + + constexpr uint16_t VP_Flowrate_E0 = 0x2200; // 2 Byte Integer + constexpr uint16_t VP_Flowrate_E1 = 0x2202; // 2 Byte Integer + constexpr uint16_t VP_Flowrate_E2 = 0x2204; + constexpr uint16_t VP_Flowrate_E3 = 0x2206; + constexpr uint16_t VP_Flowrate_E4 = 0x2208; + constexpr uint16_t VP_Flowrate_E5 = 0x220A; + constexpr uint16_t VP_Flowrate_E6 = 0x220C; + constexpr uint16_t VP_Flowrate_E7 = 0x220E; + + // Move + constexpr uint16_t VP_MOVE_X = 0x2300; + constexpr uint16_t VP_MOVE_Y = 0x2302; + constexpr uint16_t VP_MOVE_Z = 0x2304; + constexpr uint16_t VP_MOVE_E0 = 0x2310; + constexpr uint16_t VP_MOVE_E1 = 0x2312; + constexpr uint16_t VP_MOVE_E2 = 0x2314; + constexpr uint16_t VP_MOVE_E3 = 0x2316; + constexpr uint16_t VP_MOVE_E4 = 0x2318; + constexpr uint16_t VP_MOVE_E5 = 0x231A; + constexpr uint16_t VP_MOVE_E6 = 0x231C; + constexpr uint16_t VP_MOVE_E7 = 0x231E; + constexpr uint16_t VP_HOME_ALL = 0x2320; + constexpr uint16_t VP_MOTOR_LOCK_UNLOK = 0x2330; + constexpr uint16_t VP_MOVE_DISTANCE = 0x2334; + constexpr uint16_t VP_X_HOME = 0x2336; + constexpr uint16_t VP_Y_HOME = 0x2338; + constexpr uint16_t VP_Z_HOME = 0x233A; + + // Fan Control Buttons , switch between "off" and "on" + constexpr uint16_t VP_FAN0_CONTROL = 0x2350; + constexpr uint16_t VP_FAN1_CONTROL = 0x2352; + constexpr uint16_t VP_FAN2_CONTROL = 0x2354; + constexpr uint16_t VP_FAN3_CONTROL = 0x2356; + constexpr uint16_t VP_FAN4_CONTROL = 0x2358; + constexpr uint16_t VP_FAN5_CONTROL = 0x235A; + + constexpr uint16_t VP_LANGUAGE_CHANGE = 0x2380; + constexpr uint16_t VP_LANGUAGE_CHANGE1 = 0x2382; + constexpr uint16_t VP_LANGUAGE_CHANGE2 = 0x2384; + constexpr uint16_t VP_LANGUAGE_CHANGE3 = 0x2386; + constexpr uint16_t VP_LANGUAGE_CHANGE4 = 0x2388; + constexpr uint16_t VP_LANGUAGE_CHANGE5 = 0x238A; + + // LEVEL + constexpr uint16_t VP_LEVEL_POINT = 0x2400; + constexpr uint16_t VP_MESH_LEVEL_POINT = 0x2410; + constexpr uint16_t VP_MESH_LEVEL_ADJUST = 0x2412; + constexpr uint16_t VP_MESH_LEVEL_DIP = 0x2414; + constexpr uint16_t VP_MESH_LEVEL_POINT_X = 0x2416; + constexpr uint16_t VP_MESH_LEVEL_POINT_Y = 0x2418; + constexpr uint16_t VP_LEVEL_BUTTON = 0x2420; + constexpr uint16_t VP_MESH_LEVEL_POINT_DIS = 0x2422; + constexpr uint16_t VP_MESH_LEVEL_BACK = 0x2424; + + constexpr uint16_t VP_E0_FILAMENT_LOAD_UNLOAD = 0x2500; + constexpr uint16_t VP_E1_FILAMENT_LOAD_UNLOAD = 0x2504; + constexpr uint16_t VP_LOAD_Filament = 0x2508; + // constexpr uint16_t VP_LOAD_UNLOAD_Cancle = 0x250A; + constexpr uint16_t VP_UNLOAD_Filament = 0x250B; + constexpr uint16_t VP_Filament_distance = 0x2600; + constexpr uint16_t VP_Filament_speed = 0x2604; + constexpr uint16_t VP_MIN_EX_T = 0x2606; + + constexpr uint16_t VP_E1_Filament_distance = 0x2614; + constexpr uint16_t VP_E1_Filament_speed = 0x2616; + constexpr uint16_t VP_E1_MIN_EX_T = 0x2618; + + constexpr uint16_t VP_Fan0_Percentage = 0x2700; // 2 Byte Integer (0..100) + constexpr uint16_t VP_Fan1_Percentage = 0x2702; // 2 Byte Integer (0..100) + constexpr uint16_t VP_Fan2_Percentage = 0x2704; // 2 Byte Integer (0..100) + constexpr uint16_t VP_Fan3_Percentage = 0x2706; // 2 Byte Integer (0..100) + constexpr uint16_t VP_Feedrate_Percentage = 0x2708; // 2 Byte Integer (0..100) + + // Fan status + constexpr uint16_t VP_FAN0_STATUS = 0x2710; + constexpr uint16_t VP_FAN1_STATUS = 0x2712; + constexpr uint16_t VP_FAN2_STATUS = 0x2714; + constexpr uint16_t VP_FAN3_STATUS = 0x2716; + + // Step per mm + constexpr uint16_t VP_X_STEP_PER_MM = 0x2900; // at the moment , 2 byte unsigned int , 0~1638.4 + constexpr uint16_t VP_Y_STEP_PER_MM = 0x2904; + constexpr uint16_t VP_Z_STEP_PER_MM = 0x2908; + constexpr uint16_t VP_E0_STEP_PER_MM = 0x2910; + constexpr uint16_t VP_E1_STEP_PER_MM = 0x2912; + constexpr uint16_t VP_E2_STEP_PER_MM = 0x2914; + constexpr uint16_t VP_E3_STEP_PER_MM = 0x2916; + constexpr uint16_t VP_E4_STEP_PER_MM = 0x2918; + constexpr uint16_t VP_E5_STEP_PER_MM = 0x291A; + constexpr uint16_t VP_E6_STEP_PER_MM = 0x291C; + constexpr uint16_t VP_E7_STEP_PER_MM = 0x291E; + + constexpr uint16_t VP_X_MAX_SPEED = 0x2A00; + constexpr uint16_t VP_Y_MAX_SPEED = 0x2A04; + constexpr uint16_t VP_Z_MAX_SPEED = 0x2A08; + constexpr uint16_t VP_E0_MAX_SPEED = 0x2A0C; + constexpr uint16_t VP_E1_MAX_SPEED = 0x2A10; + + constexpr uint16_t VP_X_ACC_MAX_SPEED = 0x2A28; + constexpr uint16_t VP_Y_ACC_MAX_SPEED = 0x2A2C; + constexpr uint16_t VP_Z_ACC_MAX_SPEED = 0x2A30; + constexpr uint16_t VP_E0_ACC_MAX_SPEED = 0x2A34; + constexpr uint16_t VP_E1_ACC_MAX_SPEED = 0x2A38; + + constexpr uint16_t VP_TRAVEL_SPEED = 0x2A3C; + constexpr uint16_t VP_FEEDRATE_MIN_SPEED = 0x2A40; + constexpr uint16_t VP_T_F_SPEED = 0x2A44; + constexpr uint16_t VP_ACC_SPEED = 0x2A48; + + /* -------------------------------0x3000-0x3FFF------------------------------- */ + // Buttons on the SD-Card File listing. + constexpr uint16_t VP_SD_ScrollEvent = 0x3020; // Data: 0 for "up a directory", numbers are the amount to scroll, e.g -1 one up, 1 one down + constexpr uint16_t VP_SD_FileSelected = 0x3022; // Number of file field selected. + constexpr uint16_t VP_SD_FileSelectConfirm = 0x3024; // (This is a virtual VP and emulated by the Confirm Screen when a file has been confirmed) + constexpr uint16_t VP_SD_ResumePauseAbort = 0x3026; // Resume(Data=0), Pause(Data=1), Abort(Data=2) SD Card prints + constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x3028; // Abort print confirmation (virtual, will be injected by the confirm dialog) + constexpr uint16_t VP_SD_Print_Setting = 0x3040; + constexpr uint16_t VP_SD_Print_LiveAdjustZ = 0x3050; // Data: 0 down, 1 up + constexpr uint16_t VP_SD_Print_LiveAdjustZ_Confirm = 0x3060; + constexpr uint16_t VP_ZOffset_Distance = 0x3070; + constexpr uint16_t VP_ZOffset_DE_DIS = 0x3080; + constexpr uint16_t VP_SD_FileSelect_Back = 0x3082; + // SDCard File Listing + constexpr uint16_t VP_SD_FileName_LEN = 32; // LEN is shared for all entries. + constexpr uint16_t DGUS_SD_FILESPERSCREEN = 10; // FIXME move that info to the display and read it from there. + constexpr uint16_t VP_SD_FileName0 = 0x3100; + constexpr uint16_t VP_SD_FileName1 = 0x3120; + constexpr uint16_t VP_SD_FileName2 = 0x3140; + constexpr uint16_t VP_SD_FileName3 = 0x3160; + constexpr uint16_t VP_SD_FileName4 = 0x3180; + constexpr uint16_t VP_SD_FileName5 = 0x31A0; + constexpr uint16_t VP_SD_FileName6 = 0x31C0; + constexpr uint16_t VP_SD_FileName7 = 0x31E0; + constexpr uint16_t VP_SD_FileName8 = 0x3200; + constexpr uint16_t VP_SD_FileName9 = 0x3220; + + constexpr uint16_t VP_SD_Print_ProbeOffsetZ = 0x32A0; + constexpr uint16_t VP_SD_Print_Baby = 0x32B0; + constexpr uint16_t VP_SD_Print_Filename = 0x32C0; + + // X Y Z Point + constexpr uint16_t VP_XPos = 0x3300; // 4 Byte Fixed point number; format xxx.yy + constexpr uint16_t VP_YPos = 0x3302; // 4 Byte Fixed point number; format xxx.yy + constexpr uint16_t VP_ZPos = 0x3304; // 4 Byte Fixed point number; format xxx.yy + constexpr uint16_t VP_EPos = 0x3306; // 4 Byte Fixed point number; format xxx.yy + + // Print + constexpr uint16_t VP_PrintProgress_Percentage = 0x3330; // 2 Byte Integer (0..100) + constexpr uint16_t VP_PrintTime = 0x3340; + constexpr uint16_t VP_PrintTime_LEN = 32; + constexpr uint16_t VP_PrintAccTime = 0x3360; + constexpr uint16_t VP_PrintAccTime_LEN = 32; + constexpr uint16_t VP_PrintsTotal = 0x3380; + constexpr uint16_t VP_PrintsTotal_LEN = 16; + + constexpr uint16_t VP_File_Pictutr0 = 0x3400; + constexpr uint16_t VP_File_Pictutr1 = 0x3402; + constexpr uint16_t VP_File_Pictutr2 = 0x3404; + constexpr uint16_t VP_File_Pictutr3 = 0x3406; + constexpr uint16_t VP_File_Pictutr4 = 0x3408; + constexpr uint16_t VP_File_Pictutr5 = 0x340A; + constexpr uint16_t VP_File_Pictutr6 = 0x340C; + constexpr uint16_t VP_File_Pictutr7 = 0x340E; + constexpr uint16_t VP_File_Pictutr8 = 0x3410; + constexpr uint16_t VP_File_Pictutr9 = 0x3412; + + constexpr uint16_t VP_BED_STATUS = 0x341C; + + constexpr uint16_t VP_TMC_X_STEP = 0x3430; + constexpr uint16_t VP_TMC_Y_STEP = 0x3432; + constexpr uint16_t VP_TMC_Z_STEP = 0x3434; + + constexpr uint16_t VP_TMC_X1_Current = 0x3436; + constexpr uint16_t VP_TMC_Y1_Current = 0x3438; + constexpr uint16_t VP_TMC_X_Current = 0x343A; + constexpr uint16_t VP_TMC_Y_Current = 0x343C; + constexpr uint16_t VP_TMC_Z_Current = 0x343E; + constexpr uint16_t VP_TMC_E0_Current = 0x3440; + constexpr uint16_t VP_TMC_E1_Current = 0x3442; + constexpr uint16_t VP_TMC_Z1_Current = 0x3444; + + + constexpr uint16_t VP_PrintTime_H = 0x3500; + constexpr uint16_t VP_PrintTime_M = 0x3502; + constexpr uint16_t VP_PrintTime_S = 0x3504; + + // PIDs + constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4 + constexpr uint16_t VP_E0_PID_I = 0x3702; + constexpr uint16_t VP_E0_PID_D = 0x3704; + constexpr uint16_t VP_E1_PID_P = 0x3706; // at the moment , 2 byte unsigned int , 0~1638.4 + constexpr uint16_t VP_E1_PID_I = 0x3708; + constexpr uint16_t VP_E1_PID_D = 0x370A; + constexpr uint16_t VP_BED_PID_P = 0x3710; + constexpr uint16_t VP_BED_PID_I = 0x3712; + constexpr uint16_t VP_BED_PID_D = 0x3714; + + constexpr uint16_t VP_EEPROM_CTRL = 0x3720; + + constexpr uint16_t VP_OFFSET_X = 0x3724; + constexpr uint16_t VP_OFFSET_Y = 0x3728; + constexpr uint16_t VP_OFFSET_Z = 0x372B; + + // PID autotune + constexpr uint16_t VP_PID_AUTOTUNE_E0 = 0x3800; + constexpr uint16_t VP_PID_AUTOTUNE_E1 = 0x3802; + constexpr uint16_t VP_PID_AUTOTUNE_E2 = 0x3804; + constexpr uint16_t VP_PID_AUTOTUNE_E3 = 0x3806; + constexpr uint16_t VP_PID_AUTOTUNE_E4 = 0x3808; + constexpr uint16_t VP_PID_AUTOTUNE_E5 = 0x380A; + constexpr uint16_t VP_PID_AUTOTUNE_BED = 0x380C; + // Calibrate Z + constexpr uint16_t VP_Z_CALIBRATE = 0x3810; + + constexpr uint16_t VP_AutoTurnOffSw = 0x3812; + constexpr uint16_t VP_LCD_BLK = 0x3814; + + constexpr uint16_t VP_X_PARK_POS = 0x3900; + constexpr uint16_t VP_Y_PARK_POS = 0x3902; + constexpr uint16_t VP_Z_PARK_POS = 0x3904; + + /* -------------------------------0x4000-0x4FFF------------------------------- */ + // Heater Control Buttons , triged between "cool down" and "heat PLA" state + constexpr uint16_t VP_E0_CONTROL = 0x4010; + constexpr uint16_t VP_E1_CONTROL = 0x4012; + //constexpr uint16_t VP_E2_CONTROL = 0x2214; + //constexpr uint16_t VP_E3_CONTROL = 0x2216; + //constexpr uint16_t VP_E4_CONTROL = 0x2218; + //constexpr uint16_t VP_E5_CONTROL = 0x221A; + constexpr uint16_t VP_BED_CONTROL = 0x401C; + + // Preheat + constexpr uint16_t VP_E0_BED_PREHEAT = 0x4020; + constexpr uint16_t VP_E1_BED_PREHEAT = 0x4022; + //constexpr uint16_t VP_E2_BED_PREHEAT = 0x4024; + //constexpr uint16_t VP_E3_BED_PREHEAT = 0x4026; + //constexpr uint16_t VP_E4_BED_PREHEAT = 0x4028; + //constexpr uint16_t VP_E5_BED_PREHEAT = 0x402A; + + // Filament load and unload + // constexpr uint16_t VP_E0_FILAMENT_LOAD_UNLOAD = 0x4030; + // constexpr uint16_t VP_E1_FILAMENT_LOAD_UNLOAD = 0x4032; + + // Settings store , reset + + // Level data + constexpr uint16_t VP_Level_Point_One_X = 0x4100; + constexpr uint16_t VP_Level_Point_One_Y = 0x4102; + constexpr uint16_t VP_Level_Point_Two_X = 0x4104; + constexpr uint16_t VP_Level_Point_Two_Y = 0x4106; + constexpr uint16_t VP_Level_Point_Three_X = 0x4108; + constexpr uint16_t VP_Level_Point_Three_Y = 0x410A; + constexpr uint16_t VP_Level_Point_Four_X = 0x410C; + constexpr uint16_t VP_Level_Point_Four_Y = 0x410E; + constexpr uint16_t VP_Level_Point_Five_X = 0x4110; + constexpr uint16_t VP_Level_Point_Five_Y = 0x4112; + + + /* H43 Version */ + constexpr uint16_t VP_MKS_H43_VERSION = 0x4A00; // MKS H43 V1.0.0 + constexpr uint16_t VP_MKS_H43_VERSION_LEN = 16; + constexpr uint16_t VP_MKS_H43_UpdataVERSION = 0x4A10; // MKS H43 V1.0.0 + constexpr uint16_t VP_MKS_H43_UpdataVERSION_LEN = 16; + + /* -------------------------------0x5000-0xFFFF------------------------------- */ + constexpr uint16_t VP_HOME_Dis = 0x5000; + constexpr uint16_t VP_Setting_Dis = 0x5010; + constexpr uint16_t VP_Tool_Dis = 0x5020; + constexpr uint16_t VP_Printing_Dis = 0x5030; + + constexpr uint16_t VP_Language_Dis = 0x5080; + constexpr uint16_t VP_LossPoint_Dis = 0x5090; + + constexpr uint16_t VP_PrintPauseConfig_Dis = 0x5120; + constexpr uint16_t VP_MotorPluse_Dis = 0x5140; + constexpr uint16_t VP_MotorMaxSpeed_Dis = 0x5150; + constexpr uint16_t VP_MotorMaxAcc_Dis = 0x5160; + + constexpr uint16_t VP_X_Pluse_Dis = 0x5170; + constexpr uint16_t VP_Y_Pluse_Dis = 0x5180; + constexpr uint16_t VP_Z_Pluse_Dis = 0x5190; + constexpr uint16_t VP_E0_Pluse_Dis = 0x51A0; + constexpr uint16_t VP_E1_Pluse_Dis = 0x51B0; + + constexpr uint16_t VP_X_Max_Speed_Dis = 0x5280; + constexpr uint16_t VP_Y_Max_Speed_Dis = 0x5290; + constexpr uint16_t VP_Z_Max_Speed_Dis = 0x52A0; + constexpr uint16_t VP_E0_Max_Speed_Dis = 0x52B0; + constexpr uint16_t VP_E1_Max_Speed_Dis = 0x52C0; + + constexpr uint16_t VP_X_Max_Acc_Speed_Dis = 0x51E0; + constexpr uint16_t VP_Y_Max_Acc_Speed_Dis = 0x51F0; + constexpr uint16_t VP_Z_Max_Acc_Speed_Dis = 0x5200; + constexpr uint16_t VP_E0_Max_Acc_Speed_Dis = 0x5210; + constexpr uint16_t VP_E1_Max_Acc_Speed_Dis = 0x5220; + + + constexpr uint16_t VP_PrintTime_Dis = 0x5470; + constexpr uint16_t VP_E0_Temp_Dis = 0x5310; + constexpr uint16_t VP_E1_Temp_Dis = 0x5320; + constexpr uint16_t VP_HB_Temp_Dis = 0x5330; + constexpr uint16_t VP_Feedrate_Dis = 0x5350; + constexpr uint16_t VP_PrintAcc_Dis = 0x5340; + constexpr uint16_t VP_Fan_Speed_Dis = 0x5360; + + constexpr uint16_t VP_Min_Ex_Temp_Dis = 0x5380; + + + constexpr uint16_t VP_X_PARK_POS_Dis = 0x53E0; + constexpr uint16_t VP_Y_PARK_POS_Dis = 0x53F0; + constexpr uint16_t VP_Z_PARK_POS_Dis = 0x5400; + + + constexpr uint16_t VP_TravelAcc_Dis = 0x5440; + constexpr uint16_t VP_FeedRateMin_Dis = 0x5450; + constexpr uint16_t VP_TravelFeeRateMin_Dis = 0x5460; + constexpr uint16_t VP_ACC_Dis = 0x5480; + + constexpr uint16_t VP_Extrusion_Dis = 0x5230; + constexpr uint16_t VP_HeatBed_Dis = 0x5240; + + constexpr uint16_t VP_Printting_Dis = 0x5430; + constexpr uint16_t VP_FactoryDefaults_Dis = 0x54C0; + constexpr uint16_t VP_StoreSetting_Dis = 0x54B0; + constexpr uint16_t VP_Info_EEPROM_2_Dis = 0x54D0; + constexpr uint16_t VP_Info_EEPROM_1_Dis = 0x54E0; + + constexpr uint16_t VP_AutoLevel_1_Dis = 0x55F0; + + constexpr uint16_t VP_TMC_X_Step_Dis = 0x5530; + constexpr uint16_t VP_TMC_Y_Step_Dis = 0x5540; + constexpr uint16_t VP_TMC_Z_Step_Dis = 0x5550; + constexpr uint16_t VP_TMC_X1_Current_Dis = 0x5560; + constexpr uint16_t VP_TMC_Y1_Current_Dis = 0x5570; + constexpr uint16_t VP_TMC_X_Current_Dis = 0x5580; + constexpr uint16_t VP_TMC_Y_Current_Dis = 0x5590; + constexpr uint16_t VP_TMC_Z_Current_Dis = 0x55A0; + constexpr uint16_t VP_TMC_E0_Current_Dis = 0x55B0; + constexpr uint16_t VP_TMC_E1_Current_Dis = 0x55C0; + constexpr uint16_t VP_TMC_Z1_Current_Dis = 0x55E0; + + constexpr uint16_t VP_AutoLEVEL_INFO1 = 0x5600; + constexpr uint16_t VP_EX_TEMP_INFO1_Dis = 0x5610; + constexpr uint16_t VP_EX_TEMP_INFO2_Dis = 0x5620; + constexpr uint16_t VP_EX_TEMP_INFO3_Dis = 0x5630; + constexpr uint16_t VP_LCD_BLK_Dis = 0x56A0; + constexpr uint16_t VP_Info_PrinfFinsh_1_Dis = 0x5C00; + constexpr uint16_t VP_Info_PrinfFinsh_2_Dis = 0x5C10; + + constexpr uint16_t VP_Length_Dis = 0x5B00; + + constexpr uint16_t VP_PrintConfrim_Info_Dis = 0x5B90; + constexpr uint16_t VP_StopPrintConfrim_Info_Dis = 0x5B80; + + constexpr uint16_t VP_Point_One_Dis = 0x5BA0; + constexpr uint16_t VP_Point_Two_Dis = 0x5BB0; + constexpr uint16_t VP_Point_Three_Dis = 0x5BC0; + constexpr uint16_t VP_Point_Four_Dis = 0x5BD0; + constexpr uint16_t VP_Point_Five_Dis = 0x5BE0; + + constexpr uint16_t VP_Print_Dis = 0x5250; + + constexpr uint16_t VP_About_Dis = 0x5A00; + constexpr uint16_t VP_Config_Dis = 0x5A10; + constexpr uint16_t VP_Filament_Dis = 0x5A20; + constexpr uint16_t VP_Move_Dis = 0x5A30; + constexpr uint16_t VP_Level_Dis = 0x5A50; + constexpr uint16_t VP_Speed_Dis = 0x5A70; + constexpr uint16_t VP_InOut_Dis = 0x5A80; + + constexpr uint16_t VP_MotorConfig_Dis = 0x5100; + constexpr uint16_t VP_LevelConfig_Dis = 0x5110; + constexpr uint16_t VP_Advance_Dis = 0x5130; + constexpr uint16_t VP_TemperatureConfig_Dis = 0x5390; + +#endif // MKS_FINSH diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp new file mode 100644 index 000000000000..60c3790882a9 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -0,0 +1,2030 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_MKS) + +#include "../DGUSScreenHandler.h" + +#include "../../../../inc/MarlinConfig.h" + +#include "../../../../MarlinCore.h" +#include "../../../../module/settings.h" +#include "../../../../module/temperature.h" +#include "../../../../module/motion.h" +#include "../../../../module/planner.h" +#include "../../../../module/printcounter.h" + +#include "../../../../gcode/gcode.h" + +#if HAS_STEALTHCHOP + #include "../../../../module/stepper/trinamic.h" + #include "../../../../module/stepper/indirection.h" +#endif +#include "../../../../module/probe.h" + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../../feature/powerloss.h" +#endif + +#if ENABLED(SDSUPPORT) + static ExtUI::FileList filelist; +#endif + +bool DGUSAutoTurnOff = false; +uint8_t mks_language_index; // Initialized by settings.load() + +// endianness swap +uint32_t swap32(const uint32_t value) { return (value & 0x000000FFU) << 24U | (value & 0x0000FF00U) << 8U | (value & 0x00FF0000U) >> 8U | (value & 0xFF000000U) >> 24U; } + +#if 0 +void DGUSScreenHandler::sendinfoscreen_ch_mks(const uint16_t *line1, const uint16_t *line2, const uint16_t *line3, const uint16_t *line4) { + dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true); + dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true); + dgusdisplay.WriteVariable(VP_MSGSTR3, line3, 32, true); + dgusdisplay.WriteVariable(VP_MSGSTR4, line4, 32, true); +} + +void DGUSScreenHandler::sendinfoscreen_en_mks(const char *line1, const char *line2, const char *line3, const char *line4) { + dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true); + dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true); + dgusdisplay.WriteVariable(VP_MSGSTR3, line3, 32, true); + dgusdisplay.WriteVariable(VP_MSGSTR4, line4, 32, true); +} + +void DGUSScreenHandler::sendinfoscreen_mks(const void *line1, const void *line2, const void *line3, const void *line4, uint16_t language) { + if (language == MKS_English) + DGUSScreenHandler::sendinfoscreen_en_mks((char *)line1, (char *)line2, (char *)line3, (char *)line4); + else if (language == MKS_SimpleChinese) + DGUSScreenHandler::sendinfoscreen_ch_mks((uint16_t *)line1, (uint16_t *)line2, (uint16_t *)line3, (uint16_t *)line4); +} + +#endif + +void DGUSScreenHandler::DGUSLCD_SendFanToDisplay(DGUS_VP_Variable &var) { + if (var.memadr) { + //DEBUG_ECHOPGM(" DGUS_LCD_SendWordValueToDisplay ", var.VP); + //DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr); + uint16_t tmp = *(uint8_t *) var.memadr; // +1 -> avoid rounding issues for the display. + // tmp = map(tmp, 0, 255, 0, 100); + dgusdisplay.WriteVariable(var.VP, tmp); + } +} + +void DGUSScreenHandler::DGUSLCD_SendBabyStepToDisplay_MKS(DGUS_VP_Variable &var) { + float value = current_position.z; + DEBUG_ECHOLNPAIR_F(" >> ", value, 6); + value *= cpow(10, 2); + dgusdisplay.WriteVariable(VP_SD_Print_Baby, (uint16_t)value); +} + +void DGUSScreenHandler::DGUSLCD_SendPrintTimeToDisplay_MKS(DGUS_VP_Variable &var) { + duration_t elapsed = print_job_timer.duration(); + uint32_t time = elapsed.value; + dgusdisplay.WriteVariable(VP_PrintTime_H, uint16_t(time / 3600)); + dgusdisplay.WriteVariable(VP_PrintTime_M, uint16_t(time % 3600 / 60)); + dgusdisplay.WriteVariable(VP_PrintTime_S, uint16_t((time % 3600) % 60)); +} + +void DGUSScreenHandler::DGUSLCD_SetUint8(DGUS_VP_Variable &var, void *val_ptr) { + if (var.memadr) { + const uint16_t value = swap16(*(uint16_t*)val_ptr); + DEBUG_ECHOLNPGM("FAN value get:", value); + *(uint8_t*)var.memadr = map(constrain(value, 0, 255), 0, 255, 0, 255); + DEBUG_ECHOLNPGM("FAN value change:", *(uint8_t*)var.memadr); + } +} + +void DGUSScreenHandler::DGUSLCD_SendGbkToDisplay(DGUS_VP_Variable &var) { + DEBUG_ECHOLNPGM(" data ", *(uint16_t *)var.memadr); + uint16_t *tmp = (uint16_t*) var.memadr; + dgusdisplay.WriteVariable(var.VP, tmp, var.size, true); +} + +void DGUSScreenHandler::DGUSLCD_SendStringToDisplay_Language_MKS(DGUS_VP_Variable &var) { + if (mks_language_index == MKS_English) { + char *tmp = (char*) var.memadr; + dgusdisplay.WriteVariable(var.VP, tmp, var.size, true); + } + else if (mks_language_index == MKS_SimpleChinese) { + uint16_t *tmp = (uint16_t *)var.memadr; + dgusdisplay.WriteVariable(var.VP, tmp, var.size, true); + } +} + +void DGUSScreenHandler::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) { + #if ENABLED(SENSORLESS_HOMING) + #if X_HAS_STEALTHCHOP + tmc_step.x = stepperX.homing_threshold(); + dgusdisplay.WriteVariable(var.VP, *(int16_t*)var.memadr); + #endif + #if Y_HAS_STEALTHCHOP + tmc_step.y = stepperY.homing_threshold(); + dgusdisplay.WriteVariable(var.VP, *(int16_t*)var.memadr); + #endif + #if Z_HAS_STEALTHCHOP + tmc_step.z = stepperZ.homing_threshold(); + dgusdisplay.WriteVariable(var.VP, *(int16_t*)var.memadr); + #endif + #endif +} + +#if ENABLED(SDSUPPORT) + + void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file; + if (touched_nr != 0x0F && touched_nr > filelist.count()) return; + if (!filelist.seek(touched_nr) && touched_nr != 0x0F) return; + + if (touched_nr == 0x0F) { + if (filelist.isAtRootDir()) + GotoScreen(DGUSLCD_SCREEN_MAIN); + else + filelist.upDir(); + return; + } + + if (filelist.isDir()) { + filelist.changeDir(filelist.filename()); + top_file = 0; + ForceCompleteUpdate(); + return; + } + + #if ENABLED(DGUS_PRINT_FILENAME) + // Send print filename + dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), VP_SD_FileName_LEN, true); + #endif + + // Setup Confirmation screen + file_to_print = touched_nr; + GotoScreen(MKSLCD_SCREEN_PRINT_CONFIRM); + } + + void DGUSScreenHandler::DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr) { + if (!filelist.seek(file_to_print)) return; + ExtUI::printFile(filelist.shortFilename()); + GotoScreen(MKSLCD_SCREEN_PRINT); + z_offset_add = 0; + } + + void DGUSScreenHandler::DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr) { + + if (!ExtUI::isPrintingFromMedia()) return; // avoid race condition when user stays in this menu and printer finishes. + switch (swap16(*(uint16_t*)val_ptr)) { + case 0: { // Resume + + auto cs = getCurrentScreen(); + if (runout_mks.runout_status != RUNOUT_WAITTING_STATUS && runout_mks.runout_status != UNRUNOUT_STATUS) { + if (cs == MKSLCD_SCREEN_PRINT || cs == MKSLCD_SCREEN_PAUSE) + GotoScreen(MKSLCD_SCREEN_PAUSE); + return; + } + else + runout_mks.runout_status = UNRUNOUT_STATUS; + + GotoScreen(MKSLCD_SCREEN_PRINT); + + if (ExtUI::isPrintingFromMediaPaused()) { + nozzle_park_mks.print_pause_start_flag = 0; + nozzle_park_mks.blstatus = true; + ExtUI::resumePrint(); + } + } break; + + case 1: // Pause + + GotoScreen(MKSLCD_SCREEN_PAUSE); + if (!ExtUI::isPrintingFromMediaPaused()) { + nozzle_park_mks.print_pause_start_flag = 1; + nozzle_park_mks.blstatus = true; + ExtUI::pausePrint(); + //ExtUI::mks_pausePrint(); + } + break; + case 2: // Abort + HandleUserConfirmationPopUp(VP_SD_AbortPrintConfirmed, nullptr, PSTR("Abort printing"), filelist.filename(), PSTR("?"), true, true, false, true); + break; + } + } + + void DGUSScreenHandler::DGUSLCD_SD_SendFilename(DGUS_VP_Variable& var) { + uint16_t target_line = (var.VP - VP_SD_FileName0) / VP_SD_FileName_LEN; + if (target_line > DGUS_SD_FILESPERSCREEN) return; + char tmpfilename[VP_SD_FileName_LEN + 1] = ""; + var.memadr = (void*)tmpfilename; + + uint16_t dir_icon_val = 25; + if (filelist.seek(top_file + target_line)) { + snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s%c"), filelist.filename(), filelist.isDir() ? '/' : 0); // snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s"), filelist.filename()); + dir_icon_val = filelist.isDir() ? 0 : 1; + } + DGUSLCD_SendStringToDisplay(var); + + dgusdisplay.WriteVariable(VP_File_Pictutr0 + target_line * 2, dir_icon_val); + } + + void DGUSScreenHandler::SDCardInserted() { + top_file = 0; + filelist.refresh(); + auto cs = getCurrentScreen(); + if (cs == DGUSLCD_SCREEN_MAIN || cs == DGUSLCD_SCREEN_STATUS) + GotoScreen(MKSLCD_SCREEN_CHOOSE_FILE); + } + + void DGUSScreenHandler::SDCardRemoved() { + if (current_screen == DGUSLCD_SCREEN_SDFILELIST + || (current_screen == DGUSLCD_SCREEN_CONFIRM && (ConfirmVP == VP_SD_AbortPrintConfirmed || ConfirmVP == VP_SD_FileSelectConfirm)) + || current_screen == DGUSLCD_SCREEN_SDPRINTMANIPULATION + ) filelist.refresh(); + } + + void DGUSScreenHandler::SDPrintingFinished() { + if (DGUSAutoTurnOff) { + queue.exhaust(); + gcode.process_subcommands_now_P(PSTR("M81")); + } + GotoScreen(MKSLCD_SCREEN_PrintDone); + } + +#else + void DGUSScreenHandler::PrintReturn(DGUS_VP_Variable& var, void *val_ptr) { + uint16_t value = swap16(*(uint16_t*)val_ptr); + if (value == 0x0F) GotoScreen(DGUSLCD_SCREEN_MAIN); + } +#endif // SDSUPPORT + +void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { + uint8_t *tmp = (uint8_t*)val_ptr; + + // The keycode in target is coded as , so 0x0100A means + // from screen 1 (main) to 10 (temperature). DGUSLCD_SCREEN_POPUP is special, + // meaning "return to previous screen" + DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1]; + + DEBUG_ECHOLNPGM("\n DEBUG target", target); + + // when the dgus had reboot, it will enter the DGUSLCD_SCREEN_MAIN page, + // so user can change any page to use this function, an it will check + // if robin nano is printing. when it is, dgus will enter the printing + // page to continue print; + // + //if (printJobOngoing() || printingIsPaused()) { + // if (target == MKSLCD_PAUSE_SETTING_MOVE || target == MKSLCD_PAUSE_SETTING_EX + // || target == MKSLCD_SCREEN_PRINT || target == MKSLCD_SCREEN_PAUSE + // ) { + // } + // else + // GotoScreen(MKSLCD_SCREEN_PRINT); + // return; + //} + + if (target == DGUSLCD_SCREEN_POPUP) { + SetupConfirmAction(ExtUI::setUserConfirmed); + + // Special handling for popup is to return to previous menu + if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb(); + PopToOldScreen(); + return; + } + + UpdateNewScreen(target); + + #ifdef DEBUG_DGUSLCD + if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPGM("WARNING: No screen Mapping found for ", target); + #endif +} + +void DGUSScreenHandler::ScreenBackChange(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t target = swap16(*(uint16_t *)val_ptr); + DEBUG_ECHOLNPGM(" back = 0x%x", target); + switch (target) { + } +} + +void DGUSScreenHandler::ZoffsetConfirm(DGUS_VP_Variable &var, void *val_ptr) { + settings.save(); + if (printJobOngoing()) + GotoScreen(MKSLCD_SCREEN_PRINT); + else if (print_job_timer.isPaused) + GotoScreen(MKSLCD_SCREEN_PAUSE); +} + +void DGUSScreenHandler::GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("GetTurnOffCtrl\n"); + const uint16_t value = swap16(*(uint16_t *)val_ptr); + switch (value) { + case 0 ... 1: DGUSAutoTurnOff = (bool)value; break; + default: break; + } +} + +void DGUSScreenHandler::GetMinExtrudeTemp(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("GetMinExtrudeTemp"); + const uint16_t value = swap16(*(uint16_t *)val_ptr); + TERN_(PREVENT_COLD_EXTRUSION, thermalManager.extrude_min_temp = value); + mks_min_extrusion_temp = value; + settings.save(); +} + +void DGUSScreenHandler::GetZoffsetDistance(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("GetZoffsetDistance"); + const uint16_t value = swap16(*(uint16_t *)val_ptr); + float val_distance = 0; + switch (value) { + case 0: val_distance = 0.01; break; + case 1: val_distance = 0.1; break; + case 2: val_distance = 0.5; break; + case 3: val_distance = 1; break; + default: val_distance = 0.01; break; + } + ZOffset_distance = val_distance; +} + +void DGUSScreenHandler::GetManualMovestep(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("\nGetManualMovestep"); + *(uint16_t *)var.memadr = swap16(*(uint16_t *)val_ptr); +} + +void DGUSScreenHandler::EEPROM_CTRL(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t eep_flag = swap16(*(uint16_t *)val_ptr); + switch (eep_flag) { + case 0: + settings.save(); + settings.load(); // load eeprom data to check the data is right + GotoScreen(MKSLCD_SCREEN_EEP_Config); + break; + + case 1: + settings.reset(); + GotoScreen(MKSLCD_SCREEN_EEP_Config); + break; + + default: break; + } +} + +void DGUSScreenHandler::Z_offset_select(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t z_value = swap16(*(uint16_t *)val_ptr); + switch (z_value) { + case 0: Z_distance = 0.01; break; + case 1: Z_distance = 0.1; break; + case 2: Z_distance = 0.5; break; + default: Z_distance = 1; break; + } +} + +void DGUSScreenHandler::GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr) { + + #if HAS_BED_PROBE + int32_t value = swap32(*(int32_t *)val_ptr); + float Offset = value / 100.0f; + DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6); + #endif + + switch (var.VP) { + case VP_OFFSET_X: TERN_(HAS_BED_PROBE, probe.offset.x = Offset); break; + case VP_OFFSET_Y: TERN_(HAS_BED_PROBE, probe.offset.y = Offset); break; + case VP_OFFSET_Z: TERN_(HAS_BED_PROBE, probe.offset.z = Offset); break; + default: break; + } + settings.save(); +} + +void DGUSScreenHandler::LanguageChange_MKS(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t lag_flag = swap16(*(uint16_t *)val_ptr); + switch (lag_flag) { + case MKS_SimpleChinese: + DGUS_LanguageDisplay(MKS_SimpleChinese); + mks_language_index = MKS_SimpleChinese; + dgusdisplay.MKS_WriteVariable(VP_LANGUAGE_CHANGE1, MKS_Language_Choose); + dgusdisplay.MKS_WriteVariable(VP_LANGUAGE_CHANGE2, MKS_Language_NoChoose); + settings.save(); + break; + case MKS_English: + DGUS_LanguageDisplay(MKS_English); + mks_language_index = MKS_English; + dgusdisplay.MKS_WriteVariable(VP_LANGUAGE_CHANGE1, MKS_Language_NoChoose); + dgusdisplay.MKS_WriteVariable(VP_LANGUAGE_CHANGE2, MKS_Language_Choose); + settings.save(); + break; + default: break; + } +} + +#if ENABLED(MESH_BED_LEVELING) + uint8_t mesh_point_count = GRID_MAX_POINTS; +#endif + +void DGUSScreenHandler::Level_Ctrl_MKS(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t lev_but = swap16(*(uint16_t *)val_ptr); + #if ENABLED(MESH_BED_LEVELING) + auto cs = getCurrentScreen(); + #endif + switch (lev_but) { + case 0: + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + + static uint8_t a_first_level = 1; + if (a_first_level == 1) { + a_first_level = 0; + queue.enqueue_now_P(G28_STR); + } + queue.enqueue_now_P(PSTR("G29")); + + #elif ENABLED(MESH_BED_LEVELING) + + mesh_point_count = GRID_MAX_POINTS; + + if (mks_language_index == MKS_English) { + const char level_buf_en[] = "Start Level"; + dgusdisplay.WriteVariable(VP_AutoLevel_1_Dis, level_buf_en, 32, true); + } + else if (mks_language_index == MKS_SimpleChinese) { + const uint16_t level_buf_ch[] = {0xAABF, 0xBCCA, 0xF7B5, 0xBDC6, 0x2000}; + dgusdisplay.WriteVariable(VP_AutoLevel_1_Dis, level_buf_ch, 32, true); + } + + cs = getCurrentScreen(); + if (cs != MKSLCD_AUTO_LEVEL) GotoScreen(MKSLCD_AUTO_LEVEL); + #else + + GotoScreen(MKSLCD_SCREEN_LEVEL); + + #endif + break; + + case 1: + soft_endstop._enabled = true; + GotoScreen(MKSLCD_SCREEM_TOOL); + break; + + default: break; + } +} + +void DGUSScreenHandler::MeshLevelDistanceConfig(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t mesh_dist = swap16(*(uint16_t *)val_ptr); + switch (mesh_dist) { + case 0: mesh_adj_distance = 0.01; break; + case 1: mesh_adj_distance = 0.1; break; + case 2: mesh_adj_distance = 1; break; + default: mesh_adj_distance = 0.1; break; + } +} + +void DGUSScreenHandler::MeshLevel(DGUS_VP_Variable &var, void *val_ptr) { + #if ENABLED(MESH_BED_LEVELING) + const uint16_t mesh_value = swap16(*(uint16_t *)val_ptr); + // static uint8_t a_first_level = 1; + char cmd_buf[30]; + float offset = mesh_adj_distance; + int16_t integer, Deci, Deci2; + + if (!queue.ring_buffer.empty()) return; + + switch (mesh_value) { + case 0: + offset = mesh_adj_distance; + integer = offset; // get int + Deci = (offset * 10); + Deci = Deci % 10; + Deci2 = offset * 100; + Deci2 = Deci2 % 10; + soft_endstop._enabled = false; + queue.enqueue_now_P(PSTR("G91")); + snprintf_P(cmd_buf, 30, PSTR("G1 Z%d.%d%d"), integer, Deci, Deci2); + queue.enqueue_one_now(cmd_buf); + queue.enqueue_now_P(PSTR("G90")); + //soft_endstop._enabled = true; + break; + + case 1: + offset = mesh_adj_distance; + integer = offset; // get int + Deci = (offset * 10); + Deci = Deci % 10; + Deci2 = offset * 100; + Deci2 = Deci2 % 10; + soft_endstop._enabled = false; + queue.enqueue_now_P(PSTR("G91")); + snprintf_P(cmd_buf, 30, PSTR("G1 Z-%d.%d%d"), integer, Deci, Deci2); + queue.enqueue_one_now(cmd_buf); + queue.enqueue_now_P(PSTR("G90")); + break; + + case 2: + if (mesh_point_count == GRID_MAX_POINTS) { // The first point + + queue.enqueue_now_P(PSTR("G28")); + queue.enqueue_now_P(PSTR("G29S1")); + mesh_point_count--; + + if (mks_language_index == MKS_English) { + const char level_buf_en1[] = "Next Point"; + dgusdisplay.WriteVariable(VP_AutoLevel_1_Dis, level_buf_en1, 32, true); + } + else if (mks_language_index == MKS_SimpleChinese) { + const uint16_t level_buf_ch1[] = {0xC2CF, 0xBBD2, 0xE3B5, 0x2000}; + dgusdisplay.WriteVariable(VP_AutoLevel_1_Dis, level_buf_ch1, 32, true); + } + } + else if (mesh_point_count > 1) { // 倒数第二个点 + queue.enqueue_now_P(PSTR("G29S2")); + mesh_point_count--; + if (mks_language_index == MKS_English) { + const char level_buf_en2[] = "Next Point"; + dgusdisplay.WriteVariable(VP_AutoLevel_1_Dis, level_buf_en2, 32, true); + } + else if (mks_language_index == MKS_SimpleChinese) { + const uint16_t level_buf_ch2[] = {0xC2CF, 0xBBD2, 0xE3B5, 0x2000}; + dgusdisplay.WriteVariable(VP_AutoLevel_1_Dis, level_buf_ch2, 32, true); + } + } + else if (mesh_point_count == 1) { + queue.enqueue_now_P(PSTR("G29S2")); + mesh_point_count--; + if (mks_language_index == MKS_English) { + const char level_buf_en2[] = "Level Finsh"; + dgusdisplay.WriteVariable(VP_AutoLevel_1_Dis, level_buf_en2, 32, true); + } + else if (mks_language_index == MKS_SimpleChinese) { + const uint16_t level_buf_ch2[] = {0xF7B5, 0xBDC6, 0xEACD, 0xC9B3, 0x2000}; + dgusdisplay.WriteVariable(VP_AutoLevel_1_Dis, level_buf_ch2, 32, true); + } + settings.save(); + } + else if (mesh_point_count == 0) { + mesh_point_count = GRID_MAX_POINTS; + soft_endstop._enabled = true; + settings.save(); + GotoScreen(MKSLCD_SCREEM_TOOL); + } + break; + + default: + break; + } + #endif // MESH_BED_LEVELING +} + +void DGUSScreenHandler::SD_FileBack(DGUS_VP_Variable&, void*) { + GotoScreen(MKSLCD_SCREEN_HOME); +} + +void DGUSScreenHandler::LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t lcd_value = swap16(*(uint16_t *)val_ptr); + + lcd_default_light = constrain(lcd_value, 10, 100); + + const uint16_t lcd_data[2] = { lcd_default_light, lcd_default_light }; + dgusdisplay.WriteVariable(0x0082, &lcd_data, 5, true); +} + +void DGUSScreenHandler::ManualAssistLeveling(DGUS_VP_Variable &var, void *val_ptr) { + const int16_t point_value = swap16(*(uint16_t *)val_ptr); + + // Insist on leveling first time at this screen + static bool first_level_flag = false; + if (!first_level_flag || point_value == 0x0001) { + queue.enqueue_now_P(G28_STR); + first_level_flag = true; + } + + constexpr uint16_t level_speed = 1500; + + auto enqueue_corner_move = [](int16_t lx, int16_t ly, uint16_t fr) { + char buf_level[32]; + sprintf_P(buf_level, "G0X%dY%dF%d", lx, ly, fr); + queue.enqueue_one_now(buf_level); + }; + + if (WITHIN(point_value, 0x0001, 0x0005)) + queue.enqueue_now_P(PSTR("G1Z10")); + + switch (point_value) { + case 0x0001: + enqueue_corner_move(X_MIN_POS + ABS(mks_corner_offsets[0].x), + Y_MIN_POS + ABS(mks_corner_offsets[0].y), level_speed); + queue.enqueue_now_P(PSTR("G28Z")); + break; + case 0x0002: + enqueue_corner_move(X_MAX_POS - ABS(mks_corner_offsets[1].x), + Y_MIN_POS + ABS(mks_corner_offsets[1].y), level_speed); + break; + case 0x0003: + enqueue_corner_move(X_MAX_POS - ABS(mks_corner_offsets[2].x), + Y_MAX_POS - ABS(mks_corner_offsets[2].y), level_speed); + break; + case 0x0004: + enqueue_corner_move(X_MIN_POS + ABS(mks_corner_offsets[3].x), + Y_MAX_POS - ABS(mks_corner_offsets[3].y), level_speed); + break; + case 0x0005: + enqueue_corner_move(ABS(mks_corner_offsets[4].x), + ABS(mks_corner_offsets[4].y), level_speed); + break; + } + + if (WITHIN(point_value, 0x0002, 0x0005)) { + //queue.enqueue_now_P(PSTR("G28Z")); + queue.enqueue_now_P(PSTR("G1Z-10")); + } +} + +#define mks_min(a, b) ((a) < (b)) ? (a) : (b) +#define mks_max(a, b) ((a) > (b)) ? (a) : (b) +void DGUSScreenHandler::TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr) { + #if EITHER(HAS_TRINAMIC_CONFIG, HAS_STEALTHCHOP) + const uint16_t tmc_value = swap16(*(uint16_t*)val_ptr); + #endif + + switch (var.VP) { + case VP_TMC_X_STEP: + #if USE_SENSORLESS + #if X_HAS_STEALTHCHOP + stepperX.homing_threshold(mks_min(tmc_value, 255)); + settings.save(); + //tmc_step.x = stepperX.homing_threshold(); + #endif + #endif + break; + case VP_TMC_Y_STEP: + #if USE_SENSORLESS + #if Y_HAS_STEALTHCHOP + stepperY.homing_threshold(mks_min(tmc_value, 255)); + settings.save(); + //tmc_step.y = stepperY.homing_threshold(); + #endif + #endif + break; + case VP_TMC_Z_STEP: + #if USE_SENSORLESS + #if Z_HAS_STEALTHCHOP + stepperZ.homing_threshold(mks_min(tmc_value, 255)); + settings.save(); + //tmc_step.z = stepperZ.homing_threshold(); + #endif + #endif + break; + case VP_TMC_X_Current: + #if AXIS_IS_TMC(X) + stepperX.rms_current(tmc_value); + settings.save(); + #endif + break; + case VP_TMC_X1_Current: + #if AXIS_IS_TMC(X2) + stepperX2.rms_current(tmc_value); + settings.save(); + #endif + break; + case VP_TMC_Y_Current: + #if AXIS_IS_TMC(Y) + stepperY.rms_current(tmc_value); + settings.save(); + #endif + break; + case VP_TMC_Y1_Current: + #if AXIS_IS_TMC(X2) + stepperY2.rms_current(tmc_value); + settings.save(); + #endif + break; + case VP_TMC_Z_Current: + #if AXIS_IS_TMC(Z) + stepperZ.rms_current(tmc_value); + settings.save(); + #endif + break; + case VP_TMC_Z1_Current: + #if AXIS_IS_TMC(Z2) + stepperZ2.rms_current(tmc_value); + settings.save(); + #endif + break; + case VP_TMC_E0_Current: + #if AXIS_IS_TMC(E0) + stepperE0.rms_current(tmc_value); + settings.save(); + #endif + break; + case VP_TMC_E1_Current: + #if AXIS_IS_TMC(E1) + stepperE1.rms_current(tmc_value); + settings.save(); + #endif + break; + + default: + break; + } + #if USE_SENSORLESS + TERN_(X_HAS_STEALTHCHOP, tmc_step.x = stepperX.homing_threshold()); + TERN_(Y_HAS_STEALTHCHOP, tmc_step.y = stepperY.homing_threshold()); + TERN_(Z_HAS_STEALTHCHOP, tmc_step.z = stepperZ.homing_threshold()); + #endif +} + +void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleManualMove"); + + int16_t movevalue = swap16(*(uint16_t*)val_ptr); + + // Choose Move distance + if (manualMoveStep == 0x01) manualMoveStep = 10; + else if (manualMoveStep == 0x02) manualMoveStep = 100; + else if (manualMoveStep == 0x03) manualMoveStep = 1000; + + DEBUG_ECHOLNPGM("QUEUE LEN:", queue.length); + + if (!print_job_timer.isPaused() && !queue.ring_buffer.empty()) + return; + + char axiscode; + unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode. + + switch (var.VP) { // switch X Y Z or Home + default: return; + case VP_MOVE_X: + DEBUG_ECHOLNPGM("X Move"); + axiscode = 'X'; + if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove; + break; + + case VP_MOVE_Y: + DEBUG_ECHOLNPGM("Y Move"); + axiscode = 'Y'; + if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove; + break; + + case VP_MOVE_Z: + DEBUG_ECHOLNPGM("Z Move"); + axiscode = 'Z'; + speed = 300; // default to 5mm/s + if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove; + break; + + case VP_MOTOR_LOCK_UNLOK: + DEBUG_ECHOLNPGM("Motor Unlock"); + movevalue = 5; + axiscode = '\0'; + // return ; + break; + + case VP_HOME_ALL: // only used for homing + DEBUG_ECHOLNPGM("Home all"); + axiscode = '\0'; + movevalue = 0; // ignore value sent from display, this VP is _ONLY_ for homing. + //return; + break; + + case VP_X_HOME: + DEBUG_ECHOLNPGM("X Home"); + axiscode = 'X'; + movevalue = 0; + break; + + case VP_Y_HOME: + DEBUG_ECHOLNPGM("Y Home"); + axiscode = 'Y'; + movevalue = 0; + break; + + case VP_Z_HOME: + DEBUG_ECHOLNPGM("Z Home"); + axiscode = 'Z'; + movevalue = 0; + break; + } + + DEBUG_ECHOPGM("movevalue = ", movevalue); + if (movevalue != 0 && movevalue != 5) { // get move distance + switch (movevalue) { + case 0x0001: movevalue = manualMoveStep; break; + case 0x0002: movevalue = -manualMoveStep; break; + default: movevalue = 0; break; + } + } + + if (!movevalue) { + // homing + DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); + // char buf[6] = "G28 X"; + // buf[4] = axiscode; + + char buf[6]; + sprintf(buf, "G28 %c", axiscode); + //DEBUG_ECHOPGM(" ", buf); + queue.enqueue_one_now(buf); + //DEBUG_ECHOLNPGM(" ✓"); + ForceCompleteUpdate(); + return; + } + else if (movevalue == 5) { + DEBUG_ECHOPGM("send M84"); + char buf[6]; + snprintf_P(buf,6,PSTR("M84 %c"), axiscode); + queue.enqueue_one_now(buf); + ForceCompleteUpdate(); + return; + } + else { + // movement + DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); + bool old_relative_mode = relative_mode; + + if (!relative_mode) { + //DEBUG_ECHOPGM(" G91"); + queue.enqueue_now_P(PSTR("G91")); + //DEBUG_ECHOPGM(" ✓ "); + } + char buf[32]; // G1 X9999.99 F12345 + // unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s); + char sign[] = "\0"; + int16_t value = movevalue / 100; + if (movevalue < 0) { value = -value; sign[0] = '-'; } + int16_t fraction = ABS(movevalue) % 100; + snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed); + queue.enqueue_one_now(buf); + + //if (backup_speed != speed) { + // snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); + // queue.enqueue_one_now(buf); + // //DEBUG_ECHOPGM(" ", buf); + //} + + //while (!enqueue_and_echo_command(buf)) idle(); + //DEBUG_ECHOLNPGM(" ✓ "); + if (!old_relative_mode) { + //DEBUG_ECHOPGM("G90"); + //queue.enqueue_now_P(PSTR("G90")); + queue.enqueue_now_P(PSTR("G90")); + //DEBUG_ECHOPGM(" ✓ "); + } + } + + ForceCompleteUpdate(); + DEBUG_ECHOLNPGM("manmv done."); + return; + + cannotmove: + DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); + return; +} + +void DGUSScreenHandler::GetParkPos_MKS(DGUS_VP_Variable &var, void *val_ptr) { + const int16_t value_pos = swap16(*(int16_t*)val_ptr); + + switch (var.VP) { + case VP_X_PARK_POS: mks_park_pos.x = value_pos; break; + case VP_Y_PARK_POS: mks_park_pos.y = value_pos; break; + case VP_Z_PARK_POS: mks_park_pos.z = value_pos; break; + default: break; + } + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleChangeLevelPoint_MKS(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleChangeLevelPoint_MKS"); + + const int16_t value_raw = swap16(*(int16_t*)val_ptr); + DEBUG_ECHOLNPAIR_F("value_raw:", value_raw); + + *(int16_t*)var.memadr = value_raw; + + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleStepPerMMChanged_MKS(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleStepPerMMChanged_MKS"); + + const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); + const float value = (float)value_raw; + + DEBUG_ECHOLNPGM("value_raw:", value_raw); + DEBUG_ECHOLNPAIR_F("value:", value); + + ExtUI::axis_t axis; + switch (var.VP) { + default: return; + case VP_X_STEP_PER_MM: axis = ExtUI::axis_t::X; break; + case VP_Y_STEP_PER_MM: axis = ExtUI::axis_t::Y; break; + case VP_Z_STEP_PER_MM: axis = ExtUI::axis_t::Z; break; + } + ExtUI::setAxisSteps_per_mm(value, axis); + DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(axis)); + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleStepPerMMExtruderChanged_MKS(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleStepPerMMExtruderChanged_MKS"); + + const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); + const float value = (float)value_raw; + + DEBUG_ECHOLNPGM("value_raw:", value_raw); + DEBUG_ECHOLNPAIR_F("value:", value); + + ExtUI::extruder_t extruder; + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_STEP_PER_MM: extruder = ExtUI::extruder_t::E0; break; + #endif + #if HAS_MULTI_HOTEND + case VP_E1_STEP_PER_MM: extruder = ExtUI::extruder_t::E1; break; + #endif + } + ExtUI::setAxisSteps_per_mm(value, extruder); + DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisSteps_per_mm(extruder)); + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleMaxSpeedChange_MKS(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleMaxSpeedChange_MKS"); + + const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); + const float value = (float)value_raw; + + DEBUG_ECHOLNPGM("value_raw:", value_raw); + DEBUG_ECHOLNPAIR_F("value:", value); + + ExtUI::axis_t axis; + switch (var.VP) { + case VP_X_MAX_SPEED: axis = ExtUI::axis_t::X; break; + case VP_Y_MAX_SPEED: axis = ExtUI::axis_t::Y; break; + case VP_Z_MAX_SPEED: axis = ExtUI::axis_t::Z; break; + default: return; + } + ExtUI::setAxisMaxFeedrate_mm_s(value, axis); + DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(axis)); + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleExtruderMaxSpeedChange_MKS(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleExtruderMaxSpeedChange_MKS"); + + const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); + const float value = (float)value_raw; + + DEBUG_ECHOLNPGM("value_raw:", value_raw); + DEBUG_ECHOLNPAIR_F("value:", value); + + ExtUI::extruder_t extruder; + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_MAX_SPEED: extruder = ExtUI::extruder_t::E0; break; + #endif + #if HAS_MULTI_HOTEND + #endif + case VP_E1_MAX_SPEED: extruder = ExtUI::extruder_t::E1; break; + } + ExtUI::setAxisMaxFeedrate_mm_s(value, extruder); + DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxFeedrate_mm_s(extruder)); + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleMaxAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleMaxAccChange_MKS"); + + const uint16_t value_raw = swap16(*(uint16_t*)val_ptr); + const float value = (float)value_raw; + + DEBUG_ECHOLNPGM("value_raw:", value_raw); + DEBUG_ECHOLNPAIR_F("value:", value); + + ExtUI::axis_t axis; + switch (var.VP) { + default: return; + case VP_X_ACC_MAX_SPEED: axis = ExtUI::axis_t::X; break; + case VP_Y_ACC_MAX_SPEED: axis = ExtUI::axis_t::Y; break; + case VP_Z_ACC_MAX_SPEED: axis = ExtUI::axis_t::Z; break; + } + ExtUI::setAxisMaxAcceleration_mm_s2(value, axis); + DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(axis)); + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleExtruderAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleExtruderAccChange_MKS"); + + uint16_t value_raw = swap16(*(uint16_t*)val_ptr); + DEBUG_ECHOLNPGM("value_raw:", value_raw); + float value = (float)value_raw; + ExtUI::extruder_t extruder; + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_ACC_MAX_SPEED: extruder = ExtUI::extruder_t::E0; settings.load(); break; + #endif + #if HAS_MULTI_HOTEND + case VP_E1_ACC_MAX_SPEED: extruder = ExtUI::extruder_t::E1; settings.load(); break; + #endif + } + DEBUG_ECHOLNPAIR_F("value:", value); + ExtUI::setAxisMaxAcceleration_mm_s2(value, extruder); + DEBUG_ECHOLNPAIR_F("value_set:", ExtUI::getAxisMaxAcceleration_mm_s2(extruder)); + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleTravelAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t value_travel = swap16(*(uint16_t*)val_ptr); + planner.settings.travel_acceleration = (float)value_travel; + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleFeedRateMinChange_MKS(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t value_t = swap16(*(uint16_t*)val_ptr); + planner.settings.min_feedrate_mm_s = (float)value_t; + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleMin_T_F_MKS(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t value_t_f = swap16(*(uint16_t*)val_ptr); + planner.settings.min_travel_feedrate_mm_s = (float)value_t_f; + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::HandleAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t value_acc = swap16(*(uint16_t*)val_ptr); + planner.settings.acceleration = (float)value_acc; + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +#if ENABLED(PREVENT_COLD_EXTRUSION) + void DGUSScreenHandler::HandleGetExMinTemp_MKS(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t value_ex_min_temp = swap16(*(uint16_t*)val_ptr); + thermalManager.extrude_min_temp = value_ex_min_temp; + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel + } +#endif + +#if HAS_PID_HEATING + void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) { + const uint16_t rawvalue = swap16(*(uint16_t*)val_ptr); + DEBUG_ECHOLNPGM("V1:", rawvalue); + const float value = 1.0f * rawvalue; + DEBUG_ECHOLNPGM("V2:", value); + float newvalue = 0; + + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_PID_P: newvalue = value; break; + case VP_E0_PID_I: newvalue = scalePID_i(value); break; + case VP_E0_PID_D: newvalue = scalePID_d(value); break; + #endif + #if HAS_MULTI_HOTEND + case VP_E1_PID_P: newvalue = value; break; + case VP_E1_PID_I: newvalue = scalePID_i(value); break; + case VP_E1_PID_D: newvalue = scalePID_d(value); break; + #endif + #if HAS_HEATED_BED + case VP_BED_PID_P: newvalue = value; break; + case VP_BED_PID_I: newvalue = scalePID_i(value); break; + case VP_BED_PID_D: newvalue = scalePID_d(value); break; + #endif + } + + DEBUG_ECHOLNPAIR_F("V3:", newvalue); + *(float *)var.memadr = newvalue; + + settings.save(); + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel + } +#endif // HAS_PID_HEATING + +#if ENABLED(BABYSTEPPING) + void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleLiveAdjustZ"); + char babystep_buf[30]; + float step = ZOffset_distance; + + uint16_t flag = swap16(*(uint16_t*)val_ptr); + switch (flag) { + case 0: + if (step == 0.01) + queue.inject_P(PSTR("M290 Z-0.01")); + else if (step == 0.1) + queue.inject_P(PSTR("M290 Z-0.1")); + else if (step == 0.5) + queue.inject_P(PSTR("M290 Z-0.5")); + else if (step == 1) + queue.inject_P(PSTR("M290 Z-1")); + else + queue.inject_P(PSTR("M290 Z-0.01")); + + z_offset_add = z_offset_add - ZOffset_distance; + break; + + case 1: + if (step == 0.01) + queue.inject_P(PSTR("M290 Z0.01")); + else if (step == 0.1) + queue.inject_P(PSTR("M290 Z0.1")); + else if (step == 0.5) + queue.inject_P(PSTR("M290 Z0.5")); + else if (step == 1) + queue.inject_P(PSTR("M290 Z1")); + else + queue.inject_P(PSTR("M290 Z-0.01")); + + z_offset_add = z_offset_add + ZOffset_distance; + break; + + default: + break; + } + ForceCompleteUpdate(); + } +#endif // BABYSTEPPING + +void DGUSScreenHandler::GetManualFilament(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("GetManualFilament"); + + uint16_t value_len = swap16(*(uint16_t*)val_ptr); + + float value = (float)value_len; + + DEBUG_ECHOLNPAIR_F("Get Filament len value:", value); + distanceFilament = value; + + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("GetManualFilamentSpeed"); + + uint16_t value_len = swap16(*(uint16_t*)val_ptr); + + DEBUG_ECHOLNPAIR_F("filamentSpeed_mm_s value:", value_len); + + filamentSpeed_mm_s = value_len; + + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel +} + +void DGUSScreenHandler::MKS_FilamentLoadUnload(DGUS_VP_Variable &var, void *val_ptr, const int filamentDir) { + #if EITHER(HAS_MULTI_HOTEND, SINGLENOZZLE) + uint8_t swap_tool = 0; + #else + constexpr uint8_t swap_tool = 1; // T0 (or none at all) + #endif + + #if HAS_HOTEND + uint8_t hotend_too_cold = 0; + #endif + + if (!print_job_timer.isPaused() && !queue.ring_buffer.empty()) + return; + + const uint16_t val_t = swap16(*(uint16_t*)val_ptr); + switch (val_t) { + default: break; + case 0: + #if HAS_HOTEND + if (thermalManager.tooColdToExtrude(0)) + hotend_too_cold = 1; + else { + #if EITHER(HAS_MULTI_HOTEND, SINGLENOZZLE) + swap_tool = 1; + #endif + } + #endif + break; + case 1: + #if HAS_MULTI_HOTEND + if (thermalManager.tooColdToExtrude(1)) hotend_too_cold = 2; else swap_tool = 2; + #elif ENABLED(SINGLENOZZLE) + if (thermalManager.tooColdToExtrude(0)) hotend_too_cold = 1; else swap_tool = 2; + #endif + break; + } + + #if BOTH(HAS_HOTEND, PREVENT_COLD_EXTRUSION) + if (hotend_too_cold) { + if (thermalManager.targetTooColdToExtrude(hotend_too_cold - 1)) thermalManager.setTargetHotend(thermalManager.extrude_min_temp, hotend_too_cold - 1); + sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please wait."), PSTR("Nozzle heating!"), true, true, true, true); + SetupConfirmAction(nullptr); + GotoScreen(DGUSLCD_SCREEN_POPUP); + } + #endif + + if (swap_tool) { + char buf[30]; + snprintf_P(buf, 30 + #if EITHER(HAS_MULTI_HOTEND, SINGLENOZZLE) + , PSTR("M1002T%cE%dF%d"), char('0' + swap_tool - 1) + #else + , PSTR("M1002E%dF%d") + #endif + , (int)distanceFilament * filamentDir, filamentSpeed_mm_s * 60 + ); + queue.inject(buf); + } +} + +/** + * M1002: Do a tool-change and relative move for MKS_FilamentLoadUnload + * within the G-code execution window for best concurrency. + */ +void GcodeSuite::M1002() { + #if EITHER(HAS_MULTI_HOTEND, SINGLENOZZLE) + { + char buf[3]; + sprintf_P(buf, PSTR("T%c"), char('0' + parser.intval('T'))); + process_subcommands_now(buf); + } + #endif + + const uint8_t old_axis_relative = axis_relative; + set_e_relative(); // M83 + { + char buf[20]; + snprintf_P(buf, 20, PSTR("G1E%dF%d"), parser.intval('E'), parser.intval('F')); + process_subcommands_now(buf); + } + axis_relative = old_axis_relative; +} + +void DGUSScreenHandler::MKS_FilamentLoad(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("MKS_FilamentLoad"); + MKS_FilamentLoadUnload(var, val_ptr, 1); +} + +void DGUSScreenHandler::MKS_FilamentUnLoad(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("MKS_FilamentUnLoad"); + MKS_FilamentLoadUnload(var, val_ptr, -1); +} + +#if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + + void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleFilamentOption"); + + uint8_t e_temp = 0; + filament_data.heated = false; + uint16_t preheat_option = swap16(*(uint16_t*)val_ptr); + if (preheat_option >= 10) { // Unload filament type + preheat_option -= 10; + filament_data.action = 2; + filament_data.purge_length = DGUS_FILAMENT_PURGE_LENGTH; + } + else if (preheat_option <= 8) // Load filament type + filament_data.action = 1; + else // Cancel filament operation + filament_data.action = 0; + + switch (preheat_option) { + case 0: // Load PLA + #ifdef PREHEAT_1_TEMP_HOTEND + e_temp = PREHEAT_1_TEMP_HOTEND; + #endif + break; + case 1: // Load ABS + TERN_(PREHEAT_2_TEMP_HOTEND, e_temp = PREHEAT_2_TEMP_HOTEND); + break; + case 2: // Load PET + #ifdef PREHEAT_3_TEMP_HOTEND + e_temp = PREHEAT_3_TEMP_HOTEND; + #endif + break; + case 3: // Load FLEX + #ifdef PREHEAT_4_TEMP_HOTEND + e_temp = PREHEAT_4_TEMP_HOTEND; + #endif + break; + case 9: // Cool down + default: + e_temp = 0; + break; + } + + if (filament_data.action == 0) { // Go back to utility screen + #if HAS_HOTEND + thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E0); + #endif + #if HAS_MULTI_HOTEND + thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1); + #endif + GotoScreen(DGUSLCD_SCREEN_UTILITY); + } + else { // Go to the preheat screen to show the heating progress + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_FILAMENT_LOAD_UNLOAD: + filament_data.extruder = ExtUI::extruder_t::E0; + thermalManager.setTargetHotend(e_temp, filament_data.extruder); + break; + #endif + #if HAS_MULTI_HOTEND + case VP_E1_FILAMENT_LOAD_UNLOAD: + filament_data.extruder = ExtUI::extruder_t::E1; + thermalManager.setTargetHotend(e_temp, filament_data.extruder); + break; + #endif + } + } + } + + void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) { + DEBUG_ECHOLNPGM("HandleFilamentLoadUnload"); + if (filament_data.action <= 0) return; + + // If we close to the target temperature, we can start load or unload the filament + if (thermalManager.hotEnoughToExtrude(filament_data.extruder) && \ + thermalManager.targetHotEnoughToExtrude(filament_data.extruder)) { + float movevalue = DGUS_FILAMENT_LOAD_LENGTH_PER_TIME; + + if (filament_data.action == 1) { // load filament + if (!filament_data.heated) { + filament_data.heated = true; + } + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue; + } + else { // unload filament + if (!filament_data.heated) { + GotoScreen(DGUSLCD_SCREEN_FILAMENT_UNLOADING); + filament_data.heated = true; + } + // Before unloading extrude to prevent jamming + if (filament_data.purge_length >= 0) { + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue; + filament_data.purge_length -= movevalue; + } + else { + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) - movevalue; + } + } + ExtUI::setAxisPosition_mm(movevalue, filament_data.extruder); + } + } + +#endif // DGUS_FILAMENT_LOADUNLOAD + +bool DGUSScreenHandler::loop() { + dgusdisplay.loop(); + + const millis_t ms = millis(); + static millis_t next_event_ms = 0; + + static uint8_t language_times = 2; + + if (!IsScreenComplete() || ELAPSED(ms, next_event_ms)) { + next_event_ms = ms + DGUS_UPDATE_INTERVAL_MS; + UpdateScreenVPData(); + } + + if (language_times != 0) { + LanguagePInit(); + DGUS_LanguageDisplay(mks_language_index); + language_times--; + } + + #if ENABLED(SHOW_BOOTSCREEN) + static bool booted = false; + if (!booted && ELAPSED(ms, TERN(USE_MKS_GREEN_UI, 1000, BOOTSCREEN_TIMEOUT))) { + booted = true; + #if USE_SENSORLESS + TERN_(X_HAS_STEALTHCHOP, tmc_step.x = stepperX.homing_threshold()); + TERN_(Y_HAS_STEALTHCHOP, tmc_step.y = stepperY.homing_threshold()); + TERN_(Z_HAS_STEALTHCHOP, tmc_step.z = stepperZ.homing_threshold()); + #endif + + #if ENABLED(PREVENT_COLD_EXTRUSION) + if (mks_min_extrusion_temp != 0) + thermalManager.extrude_min_temp = mks_min_extrusion_temp; + #endif + + DGUS_ExtrudeLoadInit(); + + TERN_(DGUS_MKS_RUNOUT_SENSOR, DGUS_RunoutInit()); + + if (TERN0(POWER_LOSS_RECOVERY, recovery.valid())) + GotoScreen(DGUSLCD_SCREEN_POWER_LOSS); + else + GotoScreen(DGUSLCD_SCREEN_MAIN); + } + + #if ENABLED(DGUS_MKS_RUNOUT_SENSOR) + if (booted && printingIsActive()) DGUS_Runout_Idle(); + #endif + #endif // SHOW_BOOTSCREEN + + return IsScreenComplete(); +} + +void DGUSScreenHandler::LanguagePInit() { + switch (mks_language_index) { + case MKS_SimpleChinese: + dgusdisplay.MKS_WriteVariable(VP_LANGUAGE_CHANGE1, MKS_Language_Choose); + dgusdisplay.MKS_WriteVariable(VP_LANGUAGE_CHANGE2, MKS_Language_NoChoose); + break; + case MKS_English: + dgusdisplay.MKS_WriteVariable(VP_LANGUAGE_CHANGE1, MKS_Language_NoChoose); + dgusdisplay.MKS_WriteVariable(VP_LANGUAGE_CHANGE2, MKS_Language_Choose); + break; + default: + break; + } +} + +void DGUSScreenHandler::DGUS_ExtrudeLoadInit(void) { + ex_filament.ex_length = distanceFilament; + ex_filament.ex_load_unload_flag = 0; + ex_filament.ex_need_time = filamentSpeed_mm_s; + ex_filament.ex_speed = 0; + ex_filament.ex_status = EX_NONE; + ex_filament.ex_tick_end = 0; + ex_filament.ex_tick_start = 0; +} + +void DGUSScreenHandler::DGUS_RunoutInit(void) { + #if PIN_EXISTS(MT_DET_1) + SET_INPUT_PULLUP(MT_DET_1_PIN); + #endif + runout_mks.de_count = 0; + runout_mks.de_times = 10; + runout_mks.pin_status = 1; + runout_mks.runout_status = UNRUNOUT_STATUS; +} + +void DGUSScreenHandler::DGUS_Runout_Idle(void) { + #if ENABLED(DGUS_MKS_RUNOUT_SENSOR) + // scanf runout pin + switch (runout_mks.runout_status) { + + case RUNOUT_STATUS: + runout_mks.runout_status = RUNOUT_BEGIN_STATUS; + queue.inject_P(PSTR("M25")); + GotoScreen(MKSLCD_SCREEN_PAUSE); + + sendinfoscreen(PSTR("NOTICE"), nullptr, PSTR("Please change filament!"), nullptr, true, true, true, true); + //SetupConfirmAction(nullptr); + GotoScreen(DGUSLCD_SCREEN_POPUP); + break; + + case UNRUNOUT_STATUS: + if (READ(MT_DET_1_PIN) == MT_DET_PIN_STATE) + runout_mks.runout_status = RUNOUT_STATUS; + break; + + case RUNOUT_BEGIN_STATUS: + if (READ(MT_DET_1_PIN) != MT_DET_PIN_STATE) + runout_mks.runout_status = RUNOUT_WAITTING_STATUS; + break; + + case RUNOUT_WAITTING_STATUS: + if (READ(MT_DET_1_PIN) == MT_DET_PIN_STATE) + runout_mks.runout_status = RUNOUT_BEGIN_STATUS; + break; + + default: break; + } + #endif +} + +void DGUSScreenHandler::DGUS_LanguageDisplay(uint8_t var) { + if (var == MKS_English) { + const char home_buf_en[] = "Home"; + dgusdisplay.WriteVariable(VP_HOME_Dis, home_buf_en, 32, true); + + const char setting_buf_en[] = "Setting"; + dgusdisplay.WriteVariable(VP_Setting_Dis, setting_buf_en, 32, true); + + const char Tool_buf_en[] = "Tool"; + dgusdisplay.WriteVariable(VP_Tool_Dis, Tool_buf_en, 32, true); + + const char Print_buf_en[] = "Print"; + dgusdisplay.WriteVariable(VP_Print_Dis, Print_buf_en, 32, true); + + const char Language_buf_en[] = "Language"; + dgusdisplay.WriteVariable(VP_Language_Dis, Language_buf_en, 32, true); + + const char About_buf_en[] = "About"; + dgusdisplay.WriteVariable(VP_About_Dis, About_buf_en, 32, true); + + const char Config_buf_en[] = "Config"; + dgusdisplay.WriteVariable(VP_Config_Dis, Config_buf_en, 32, true); + + const char MotorConfig_buf_en[] = "MotorConfig"; + dgusdisplay.WriteVariable(VP_MotorConfig_Dis, MotorConfig_buf_en, 32, true); + + const char LevelConfig_buf_en[] = "LevelConfig"; + dgusdisplay.WriteVariable(VP_LevelConfig_Dis, LevelConfig_buf_en, 32, true); + + const char TemperatureConfig_buf_en[] = "Temperature"; + dgusdisplay.WriteVariable(VP_TemperatureConfig_Dis, TemperatureConfig_buf_en, 32, true); + + const char Advance_buf_en[] = "Advance"; + dgusdisplay.WriteVariable(VP_Advance_Dis, Advance_buf_en, 32, true); + + const char Filament_buf_en[] = "Extrude"; + dgusdisplay.WriteVariable(VP_Filament_Dis, Filament_buf_en, 32, true); + + const char Move_buf_en[] = "Move"; + dgusdisplay.WriteVariable(VP_Move_Dis, Move_buf_en, 32, true); + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + const char Level_buf_en[] = "AutoLevel"; + dgusdisplay.WriteVariable(VP_Level_Dis, Level_buf_en, 32, true); + #elif ENABLED(MESH_BED_LEVELING) + const char Level_buf_en[] = "MeshLevel"; + dgusdisplay.WriteVariable(VP_Level_Dis, Level_buf_en, 32, true); + #else + const char Level_buf_en[] = "Level"; + dgusdisplay.WriteVariable(VP_Level_Dis, Level_buf_en, 32, true); + #endif + + const char MotorPluse_buf_en[] = "MotorPluse"; + dgusdisplay.WriteVariable(VP_MotorPluse_Dis, MotorPluse_buf_en, 32, true); + + const char MotorMaxSpeed_buf_en[] = "MotorMaxSpeed"; + dgusdisplay.WriteVariable(VP_MotorMaxSpeed_Dis, MotorMaxSpeed_buf_en, 32, true); + + const char MotorMaxAcc_buf_en[] = "MotorAcc"; + dgusdisplay.WriteVariable(VP_MotorMaxAcc_Dis, MotorMaxAcc_buf_en, 32, true); + + const char TravelAcc_buf_en[] = "TravelAcc"; + dgusdisplay.WriteVariable(VP_TravelAcc_Dis, TravelAcc_buf_en, 32, true); + + const char FeedRateMin_buf_en[] = "FeedRateMin"; + dgusdisplay.WriteVariable(VP_FeedRateMin_Dis, FeedRateMin_buf_en, 32, true); + + const char TravelFeeRateMin_buf_en[] = "TravelFeedRateMin"; + dgusdisplay.WriteVariable(VP_TravelFeeRateMin_Dis, TravelFeeRateMin_buf_en, 32, true); + + const char Acc_buf_en[] = "Acc"; + dgusdisplay.WriteVariable(VP_ACC_Dis, Acc_buf_en, 32, true); + + const char Point_One_buf_en[] = "Point_First"; + dgusdisplay.WriteVariable(VP_Point_One_Dis, Point_One_buf_en, 32, true); + + const char Point_Two_buf_en[] = "Point_Second"; + dgusdisplay.WriteVariable(VP_Point_Two_Dis, Point_Two_buf_en, 32, true); + + const char Point_Three_buf_en[] = "Point_Third"; + dgusdisplay.WriteVariable(VP_Point_Three_Dis, Point_Three_buf_en, 32, true); + + const char Point_Four_buf_en[] = "Point_Fourth"; + dgusdisplay.WriteVariable(VP_Point_Four_Dis, Point_Four_buf_en, 32, true); + + const char Point_Five_buf_en[] = "Point_Fifth"; + dgusdisplay.WriteVariable(VP_Point_Five_Dis, Point_Five_buf_en, 32, true); + + const char Extrusion_buf_en[] = "Extrusion"; + dgusdisplay.WriteVariable(VP_Extrusion_Dis, Extrusion_buf_en, 32, true); + + const char HeatBed_buf_en[] = "HeatBed"; + dgusdisplay.WriteVariable(VP_HeatBed_Dis, HeatBed_buf_en, 32, true); + + const char FactoryDefaults_buf_en[] = "FactoryDefaults"; + dgusdisplay.WriteVariable(VP_FactoryDefaults_Dis, FactoryDefaults_buf_en, 32, true); + + const char StoreSetting_buf_en[] = "StoreSetting"; + dgusdisplay.WriteVariable(VP_StoreSetting_Dis, StoreSetting_buf_en, 32, true); + + const char PrintPauseConfig_buf_en[] = "PrintPauseConfig"; + dgusdisplay.WriteVariable(VP_PrintPauseConfig_Dis, PrintPauseConfig_buf_en, 32, true); + + const char X_Pluse_buf_en[] = "X_Pluse"; + dgusdisplay.WriteVariable(VP_X_Pluse_Dis, X_Pluse_buf_en, 32, true); + + const char Y_Pluse_buf_en[] = "Y_Pluse"; + dgusdisplay.WriteVariable(VP_Y_Pluse_Dis, Y_Pluse_buf_en, 32, true); + + const char Z_Pluse_buf_en[] = "Z_Pluse"; + dgusdisplay.WriteVariable(VP_Z_Pluse_Dis, Z_Pluse_buf_en, 32, true); + + const char E0_Pluse_buf_en[] = "E0_Pluse"; + dgusdisplay.WriteVariable(VP_E0_Pluse_Dis, E0_Pluse_buf_en, 32, true); + + const char E1_Pluse_buf_en[] = "E1_Pluse"; + dgusdisplay.WriteVariable(VP_E1_Pluse_Dis, E1_Pluse_buf_en, 32, true); + + const char X_Max_Speed_buf_en[] = "X_Max_Speed"; + dgusdisplay.WriteVariable(VP_X_Max_Speed_Dis, X_Max_Speed_buf_en, 32, true); + + const char Y_Max_Speed_buf_en[] = "Y_Max_Speed"; + dgusdisplay.WriteVariable(VP_Y_Max_Speed_Dis, Y_Max_Speed_buf_en, 32, true); + + const char Z_Max_Speed_buf_en[] = "Z_Max_Speed"; + dgusdisplay.WriteVariable(VP_Z_Max_Speed_Dis, Z_Max_Speed_buf_en, 32, true); + + const char E0_Max_Speed_buf_en[] = "E0_Max_Speed"; + dgusdisplay.WriteVariable(VP_E0_Max_Speed_Dis, E0_Max_Speed_buf_en, 32, true); + + const char E1_Max_Speed_buf_en[] = "E1_Max_Speed"; + dgusdisplay.WriteVariable(VP_E1_Max_Speed_Dis, E1_Max_Speed_buf_en, 32, true); + + const char X_Max_Acc_Speed_buf_en[] = "X_Max_Acc_Speed"; + dgusdisplay.WriteVariable(VP_X_Max_Acc_Speed_Dis, X_Max_Acc_Speed_buf_en, 32, true); + + const char Y_Max_Acc_Speed_buf_en[] = "Y_Max_Acc_Speed"; + dgusdisplay.WriteVariable(VP_Y_Max_Acc_Speed_Dis, Y_Max_Acc_Speed_buf_en, 32, true); + + const char Z_Max_Acc_Speed_buf_en[] = "Z_Max_Acc_Speed"; + dgusdisplay.WriteVariable(VP_Z_Max_Acc_Speed_Dis, Z_Max_Acc_Speed_buf_en, 32, true); + + const char E0_Max_Acc_Speed_buf_en[] = "E0_Max_Acc_Speed"; + dgusdisplay.WriteVariable(VP_E0_Max_Acc_Speed_Dis, E0_Max_Acc_Speed_buf_en, 32, true); + + const char E1_Max_Acc_Speed_buf_en[] = "E1_Max_Acc_Speed"; + dgusdisplay.WriteVariable(VP_E1_Max_Acc_Speed_Dis, E1_Max_Acc_Speed_buf_en, 32, true); + + const char X_PARK_POS_buf_en[] = "X_PARK_POS"; + dgusdisplay.WriteVariable(VP_X_PARK_POS_Dis, X_PARK_POS_buf_en, 32, true); + + const char Y_PARK_POS_buf_en[] = "Y_PARK_POS"; + dgusdisplay.WriteVariable(VP_Y_PARK_POS_Dis, Y_PARK_POS_buf_en, 32, true); + + const char Z_PARK_POS_buf_en[] = "Z_PARK_POS"; + dgusdisplay.WriteVariable(VP_Z_PARK_POS_Dis, Z_PARK_POS_buf_en, 32, true); + + const char Length_buf_en[] = "Length"; + dgusdisplay.WriteVariable(VP_Length_Dis, Length_buf_en, 32, true); + + const char Speed_buf_en[] = "Speed"; + dgusdisplay.WriteVariable(VP_Speed_Dis, Speed_buf_en, 32, true); + + const char InOut_buf_en[] = "InOut"; + dgusdisplay.WriteVariable(VP_InOut_Dis, InOut_buf_en, 32, true); + + const char PrintTimet_buf_en[] = "PrintTime"; + dgusdisplay.WriteVariable(VP_PrintTime_Dis, PrintTimet_buf_en, 32, true); + + const char E0_Temp_buf_en[] = "E0_Temp"; + dgusdisplay.WriteVariable(VP_E0_Temp_Dis, E0_Temp_buf_en, 32, true); + + const char E1_Temp_buf_en[] = "E1_Temp"; + dgusdisplay.WriteVariable(VP_E1_Temp_Dis, E1_Temp_buf_en, 32, true); + + const char HB_Temp_buf_en[] = "HB_Temp"; + dgusdisplay.WriteVariable(VP_HB_Temp_Dis, HB_Temp_buf_en, 32, true); + + const char Feedrate_buf_en[] = "Feedrate"; + dgusdisplay.WriteVariable(VP_Feedrate_Dis, Feedrate_buf_en, 32, true); + + const char PrintAcc_buf_en[] = "PrintSpeed"; + dgusdisplay.WriteVariable(VP_PrintAcc_Dis, PrintAcc_buf_en, 32, true); + + const char FAN_Speed_buf_en[] = "FAN_Speed"; + dgusdisplay.WriteVariable(VP_Fan_Speed_Dis, FAN_Speed_buf_en, 32, true); + + const char Printing_buf_en[] = "Printing"; + dgusdisplay.WriteVariable(VP_Printing_Dis, Printing_buf_en, 32, true); + + const char Info_EEPROM_1_buf_en[] = "Store setting?"; + dgusdisplay.WriteVariable(VP_Info_EEPROM_1_Dis, Info_EEPROM_1_buf_en, 32, true); + + const char Info_EEPROM_2_buf_en[] = "Revert setting?"; + dgusdisplay.WriteVariable(VP_Info_EEPROM_2_Dis, Info_EEPROM_2_buf_en, 32, true); + + const char Info_PrinfFinsh_1_buf_en[] = "Print Done"; + dgusdisplay.WriteVariable(VP_Info_PrinfFinsh_1_Dis, Info_PrinfFinsh_1_buf_en, 32, true); + + const char TMC_X_Step_buf_en[] = "X_SenSitivity"; + dgusdisplay.WriteVariable(VP_TMC_X_Step_Dis, TMC_X_Step_buf_en, 32, true); + + const char TMC_Y_Step_buf_en[] = "Y_SenSitivity"; + dgusdisplay.WriteVariable(VP_TMC_Y_Step_Dis, TMC_Y_Step_buf_en, 32, true); + + const char TMC_Z_Step_buf_en[] = "Z_SenSitivity"; + dgusdisplay.WriteVariable(VP_TMC_Z_Step_Dis, TMC_Z_Step_buf_en, 32, true); + + const char TMC_X_Current_buf_en[] = "X_Current"; + dgusdisplay.WriteVariable(VP_TMC_X_Current_Dis, TMC_X_Current_buf_en, 32, true); + + const char TMC_Y_Current_buf_en[] = "Y_Current"; + dgusdisplay.WriteVariable(VP_TMC_Y_Current_Dis, TMC_Y_Current_buf_en, 32, true); + + const char TMC_Z_Current_buf_en[] = "Z_Current"; + dgusdisplay.WriteVariable(VP_TMC_Z_Current_Dis, TMC_Z_Current_buf_en, 32, true); + + const char TMC_E0_Current_buf_en[] = "E0_Current"; + dgusdisplay.WriteVariable(VP_TMC_E0_Current_Dis, TMC_E0_Current_buf_en, 32, true); + + const char TMC_X1_Current_buf_en[] = "X1_Current"; + dgusdisplay.WriteVariable(VP_TMC_X1_Current_Dis, TMC_X1_Current_buf_en, 32, true); + + const char TMC_Y1_Current_buf_en[] = "Y1_Current"; + dgusdisplay.WriteVariable(VP_TMC_Y1_Current_Dis, TMC_Y1_Current_buf_en, 32, true); + + const char TMC_Z1_Current_buf_en[] = "Z1_Current"; + dgusdisplay.WriteVariable(VP_TMC_Z1_Current_Dis, TMC_Z1_Current_buf_en, 32, true); + + const char TMC_E1_Current_buf_en[] = "E1_Current"; + dgusdisplay.WriteVariable(VP_TMC_E1_Current_Dis, TMC_E1_Current_buf_en, 32, true); + + const char Min_Ex_Temp_buf_en[] = "Min_Ex_Temp"; + dgusdisplay.WriteVariable(VP_Min_Ex_Temp_Dis, Min_Ex_Temp_buf_en, 32, true); + + const char AutoLEVEL_INFO1_buf_en[] = "Please Press Button!"; + dgusdisplay.WriteVariable(VP_AutoLEVEL_INFO1, AutoLEVEL_INFO1_buf_en, 32, true); + + const char EX_TEMP_INFO2_buf_en[] = "Please wait a monent"; + dgusdisplay.WriteVariable(VP_EX_TEMP_INFO2_Dis, EX_TEMP_INFO2_buf_en, 32, true); + + const char EX_TEMP_INFO3_buf_en[] = "Cancle"; + dgusdisplay.WriteVariable(VP_EX_TEMP_INFO3_Dis, EX_TEMP_INFO3_buf_en, 32, true); + + const char PrintConfrim_Info_buf_en[] = "Start Print?"; + dgusdisplay.WriteVariable(VP_PrintConfrim_Info_Dis, PrintConfrim_Info_buf_en, 32, true); + + const char StopPrintConfrim_Info_buf_en[] = "Stop Print?"; + dgusdisplay.WriteVariable(VP_StopPrintConfrim_Info_Dis, StopPrintConfrim_Info_buf_en, 32, true); + + const char Printting_buf_en[] = "Printing"; + dgusdisplay.WriteVariable(VP_Printting_Dis, Printting_buf_en, 32, true); + + const char LCD_BLK_buf_en[] = "Backlight"; + dgusdisplay.WriteVariable(VP_LCD_BLK_Dis, LCD_BLK_buf_en, 32, true); + } + else if (var == MKS_SimpleChinese) { + uint16_t home_buf_ch[] = { 0xF7D6, 0xB3D2 }; + dgusdisplay.WriteVariable(VP_HOME_Dis, home_buf_ch, 4, true); + + const uint16_t Setting_Dis[] = { 0xE8C9, 0xC3D6, 0x2000, 0x2000, 0x2000 }; + dgusdisplay.WriteVariable(VP_Setting_Dis, Setting_Dis, 7, true); + + const uint16_t Tool_Dis[] = { 0xA4B9, 0xDFBE }; + dgusdisplay.WriteVariable(VP_Tool_Dis, Tool_Dis, 4, true); + + const uint16_t Print_buf_ch[] = { 0xF2B4, 0xA1D3, 0x2000 }; + dgusdisplay.WriteVariable(VP_Print_Dis, Print_buf_ch, 6, true); + + const uint16_t Language_buf_ch[] = { 0xEFD3, 0xD4D1, 0x2000, 0x2000 }; + dgusdisplay.WriteVariable(VP_Language_Dis, Language_buf_ch, 8, true); + + const uint16_t About_buf_ch[] = { 0xD8B9, 0xDAD3, 0x2000 }; + dgusdisplay.WriteVariable(VP_About_Dis, About_buf_ch, 6, true); + + const uint16_t Config_buf_ch[] = { 0xE4C5, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Config_Dis, Config_buf_ch, 6, true); + + const uint16_t MotorConfig_buf_ch[] = { 0xE7B5, 0xFABB, 0xE4C5, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_MotorConfig_Dis, MotorConfig_buf_ch, 12, true); + + const uint16_t LevelConfig_buf_ch[] = { 0xD6CA, 0xAFB6, 0xF7B5, 0xBDC6, 0xE8C9, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_LevelConfig_Dis, LevelConfig_buf_ch, 32, true); + + const uint16_t TemperatureConfig_buf_ch[] = { 0xC2CE, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_TemperatureConfig_Dis, TemperatureConfig_buf_ch, 11, true); + + const uint16_t Advance_buf_ch[] = { 0xDFB8, 0xB6BC, 0xE8C9, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Advance_Dis, Advance_buf_ch, 16, true); + + const uint16_t Filament_buf_ch[] = { 0xB7BC, 0xF6B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_Filament_Dis, Filament_buf_ch, 8, true); + + const uint16_t Move_buf_ch[] = { 0xC6D2, 0xAFB6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Move_Dis, Move_buf_ch, 4, true); + + #if ENABLED(AUTO_BED_LEVELING_BILINEAR) + const uint16_t Level_buf_ch[] = { 0xD4D7, 0xAFB6, 0xF7B5, 0xBDC6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Level_Dis, Level_buf_ch, 32, true); + #elif ENABLED(MESH_BED_LEVELING) + const uint16_t Level_buf_ch[] = { 0xF8CD, 0xF1B8, 0xF7B5, 0xBDC6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Level_Dis, Level_buf_ch, 32, true); + #else + const uint16_t Level_buf_ch[] = { 0xD6CA, 0xAFB6, 0xF7B5, 0xBDC6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Level_Dis, Level_buf_ch, 32, true); + #endif + + const uint16_t MotorPluse_buf_ch[] = { 0xF6C2, 0xE5B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_MotorPluse_Dis, MotorPluse_buf_ch, 16, true); + + const uint16_t MotorMaxSpeed_buf_ch[] = { 0xEED7, 0xF3B4, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_MotorMaxSpeed_Dis, MotorMaxSpeed_buf_ch, 16, true); + + const uint16_t MotorMaxAcc_buf_ch[] = { 0xEED7, 0xF3B4, 0xD3BC, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_MotorMaxAcc_Dis, MotorMaxAcc_buf_ch, 16, true); + + const uint16_t TravelAcc_buf_ch[] = { 0xD5BF, 0xD0D0, 0xD3BC, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_TravelAcc_Dis, TravelAcc_buf_ch, 16, true); + + const uint16_t FeedRateMin_buf_ch[] = { 0xEED7, 0xA1D0, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_FeedRateMin_Dis, FeedRateMin_buf_ch, 12, true); + + const uint16_t TravelFeeRateMin_buf_ch[] = { 0xD5BF, 0xD0D0, 0xEED7, 0xA1D0, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_TravelFeeRateMin_Dis, TravelFeeRateMin_buf_ch, 24, true); + + const uint16_t Acc_buf_ch[] = { 0xD3BC, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_ACC_Dis, Acc_buf_ch, 16, true); + + const uint16_t Point_One_buf_ch[] = { 0xDAB5, 0xBBD2, 0xE3B5, 0x2000 }; + dgusdisplay.WriteVariable(VP_Point_One_Dis, Point_One_buf_ch, 12, true); + + const uint16_t Point_Two_buf_ch[] = { 0xDAB5, 0xFEB6, 0xE3B5, 0x2000 }; + dgusdisplay.WriteVariable(VP_Point_Two_Dis, Point_Two_buf_ch, 12, true); + + const uint16_t Point_Three_buf_ch[] = { 0xDAB5, 0xFDC8, 0xE3B5, 0x2000 }; + dgusdisplay.WriteVariable(VP_Point_Three_Dis, Point_Three_buf_ch, 12, true); + + const uint16_t Point_Four_buf_ch[] = { 0xDAB5, 0xC4CB, 0xE3B5, 0x2000 }; + dgusdisplay.WriteVariable(VP_Point_Four_Dis, Point_Four_buf_ch, 12, true); + + const uint16_t Point_Five_buf_ch[] = { 0xDAB5, 0xE5CE, 0xE3B5, 0x2000 }; + dgusdisplay.WriteVariable(VP_Point_Five_Dis, Point_Five_buf_ch, 12, true); + + const uint16_t Extrusion_buf_ch[] = { 0xB7BC, 0xF6B3, 0xB7CD, 0x2000 }; + dgusdisplay.WriteVariable(VP_Extrusion_Dis, Extrusion_buf_ch, 12, true); + + const uint16_t HeatBed_buf_ch[] = { 0xC8C8, 0xB2B4, 0x2000 }; + dgusdisplay.WriteVariable(VP_HeatBed_Dis, HeatBed_buf_ch, 12, true); + + const uint16_t FactoryDefaults_buf_ch[] = { 0xD6BB, 0xB4B8, 0xF6B3, 0xA7B3, 0xE8C9, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_FactoryDefaults_Dis, FactoryDefaults_buf_ch, 16, true); + + const uint16_t StoreSetting_buf_ch[] = { 0xA3B1, 0xE6B4, 0xE8C9, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_StoreSetting_Dis, StoreSetting_buf_ch, 16, true); + + const uint16_t PrintPauseConfig_buf_ch[] = { 0xDDD4, 0xA3CD, 0xBBCE, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_PrintPauseConfig_Dis, PrintPauseConfig_buf_ch, 32, true); + + const uint16_t X_Pluse_buf_ch[] = { 0x2058, 0xE1D6, 0xF6C2, 0xE5B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_X_Pluse_Dis, X_Pluse_buf_ch, 16, true); + + const uint16_t Y_Pluse_buf_ch[] = { 0x2059, 0xE1D6, 0xF6C2, 0xE5B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_Y_Pluse_Dis, Y_Pluse_buf_ch, 16, true); + + const uint16_t Z_Pluse_buf_ch[] = { 0x205A, 0xE1D6, 0xF6C2, 0xE5B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_Z_Pluse_Dis, Z_Pluse_buf_ch, 16, true); + + const uint16_t E0_Pluse_buf_ch[] = { 0x3045, 0xE1D6, 0xF6C2, 0xE5B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_E0_Pluse_Dis, E0_Pluse_buf_ch, 16, true); + + const uint16_t E1_Pluse_buf_ch[] = { 0x3145, 0xE1D6, 0xF6C2, 0xE5B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_E1_Pluse_Dis, E1_Pluse_buf_ch, 16, true); + + const uint16_t X_Max_Speed_buf_ch[] = { 0x2058, 0xEED7, 0xF3B4, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_X_Max_Speed_Dis, X_Max_Speed_buf_ch, 16, true); + + const uint16_t Y_Max_Speed_buf_ch[] = { 0x2059, 0xEED7, 0xF3B4, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Y_Max_Speed_Dis, Y_Max_Speed_buf_ch, 16, true); + + const uint16_t Z_Max_Speed_buf_ch[] = { 0x205A, 0xEED7, 0xF3B4, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Z_Max_Speed_Dis, Z_Max_Speed_buf_ch, 16, true); + + const uint16_t E0_Max_Speed_buf_ch[] = { 0x3045, 0xEED7, 0xF3B4, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_E0_Max_Speed_Dis, E0_Max_Speed_buf_ch, 16, true); + + const uint16_t E1_Max_Speed_buf_ch[] = { 0x3145, 0xEED7, 0xF3B4, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_E1_Max_Speed_Dis, E1_Max_Speed_buf_ch, 16, true); + + const uint16_t X_Max_Acc_Speed_buf_ch[] = { 0x2058, 0xEED7, 0xF3B4, 0xD3BC, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_X_Max_Acc_Speed_Dis, X_Max_Acc_Speed_buf_ch, 16, true); + + const uint16_t Y_Max_Acc_Speed_buf_ch[] = { 0x2059, 0xEED7, 0xF3B4, 0xD3BC, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Y_Max_Acc_Speed_Dis, Y_Max_Acc_Speed_buf_ch, 16, true); + + const uint16_t Z_Max_Acc_Speed_buf_ch[] = { 0x205A, 0xEED7, 0xF3B4, 0xD3BC, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Z_Max_Acc_Speed_Dis, Z_Max_Acc_Speed_buf_ch, 16, true); + + const uint16_t E0_Max_Acc_Speed_buf_ch[] = { 0x3045, 0xEED7, 0xF3B4, 0xD3BC, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_E0_Max_Acc_Speed_Dis, E0_Max_Acc_Speed_buf_ch, 16, true); + + const uint16_t E1_Max_Acc_Speed_buf_ch[] = { 0x3145, 0xEED7, 0xF3B4, 0xD3BC, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_E1_Max_Acc_Speed_Dis, E1_Max_Acc_Speed_buf_ch, 16, true); + + const uint16_t X_PARK_POS_buf_ch[] = { 0x2058, 0xDDD4, 0xA3CD, 0xBBCE, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_X_PARK_POS_Dis, X_PARK_POS_buf_ch, 16, true); + + const uint16_t Y_PARK_POS_buf_ch[] = { 0x2059, 0xDDD4, 0xA3CD, 0xBBCE, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Y_PARK_POS_Dis, Y_PARK_POS_buf_ch, 16, true); + + const uint16_t Z_PARK_POS_buf_ch[] = { 0x205A, 0xDDD4, 0xA3CD, 0xBBCE, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Z_PARK_POS_Dis, Z_PARK_POS_buf_ch, 16, true); + + const uint16_t Length_buf_ch[] = { 0xBDB2, 0xA4B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_Length_Dis, Length_buf_ch, 8, true); + + const uint16_t Speed_buf_ch[] = { 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Speed_Dis, Speed_buf_ch, 8, true); + + const uint16_t InOut_buf_ch[] = { 0xF8BD, 0xF6B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_InOut_Dis, InOut_buf_ch, 8, true); + + const uint16_t PrintTimet_buf_en[] = { 0xF2B4, 0xA1D3, 0xB1CA, 0xE4BC, 0x2000 }; + dgusdisplay.WriteVariable(VP_PrintTime_Dis, PrintTimet_buf_en, 16, true); + + const uint16_t E0_Temp_buf_ch[] = { 0x3045, 0xC2CE, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_E0_Temp_Dis, E0_Temp_buf_ch, 16, true); + + const uint16_t E1_Temp_buf_ch[] = { 0x3145, 0xC2CE, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_E1_Temp_Dis, E1_Temp_buf_ch, 16, true); + + const uint16_t HB_Temp_buf_ch[] = { 0xC8C8, 0xB2B4, 0xC2CE, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_HB_Temp_Dis, HB_Temp_buf_ch, 16, true); + + const uint16_t Feedrate_buf_ch[] = { 0xB7BC, 0xF6B3, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Feedrate_Dis, Feedrate_buf_ch, 16, true); + + const uint16_t PrintAcc_buf_ch[] = { 0xF2B4, 0xA1D3, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_PrintAcc_Dis, PrintAcc_buf_ch, 16, true); + + const uint16_t FAN_Speed_buf_ch[] = { 0xE7B7, 0xC8C9, 0xD9CB, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Fan_Speed_Dis, FAN_Speed_buf_ch, 16, true); + + const uint16_t Printing_buf_ch[] = { 0xF2B4, 0xA1D3, 0xD0D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Printing_Dis, Printing_buf_ch, 16, true); + + const uint16_t Info_EEPROM_1_buf_ch[] = { 0xC7CA, 0xF1B7, 0xA3B1, 0xE6B4, 0xE8C9, 0xC3D6, 0xBFA3, 0x2000 }; + dgusdisplay.WriteVariable(VP_Info_EEPROM_1_Dis, Info_EEPROM_1_buf_ch, 32, true); + + const uint16_t Info_EEPROM_2_buf_ch[] = { 0xC7CA, 0xF1B7, 0xD6BB, 0xB4B8, 0xF6B3, 0xA7B3, 0xE8C9, 0xC3D6, 0xBFA3, 0x2000 }; + dgusdisplay.WriteVariable(VP_Info_EEPROM_2_Dis, Info_EEPROM_2_buf_ch, 32, true); + + const uint16_t TMC_X_Step_buf_ch[] = { 0x2058, 0xE9C1, 0xF4C3, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_X_Step_Dis, TMC_X_Step_buf_ch, 16, true); + + const uint16_t TMC_Y_Step_buf_ch[] = { 0x2059, 0xE9C1, 0xF4C3, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_Y_Step_Dis, TMC_Y_Step_buf_ch, 16, true); + + const uint16_t TMC_Z_Step_buf_ch[] = { 0x205A, 0xE9C1, 0xF4C3, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_Z_Step_Dis, TMC_Z_Step_buf_ch, 16, true); + + const uint16_t Info_PrinfFinsh_1_buf_ch[] = { 0xF2B4, 0xA1D3, 0xEACD, 0xC9B3, 0x2000 }; + dgusdisplay.WriteVariable(VP_Info_PrinfFinsh_1_Dis, Info_PrinfFinsh_1_buf_ch, 32, true); + + const uint16_t TMC_X_Current_buf_ch[] = { 0x2058, 0xE1D6, 0xE7B5, 0xF7C1, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_X_Current_Dis, TMC_X_Current_buf_ch, 16, true); + + const uint16_t TMC_Y_Current_buf_ch[] = { 0x2059, 0xE1D6, 0xE7B5, 0xF7C1, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_Y_Current_Dis, TMC_Y_Current_buf_ch, 16, true); + + const uint16_t TMC_Z_Current_buf_ch[] = { 0x205A, 0xE1D6, 0xE7B5, 0xF7C1, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_Z_Current_Dis, TMC_Z_Current_buf_ch, 16, true); + + const uint16_t TMC_E0_Current_buf_ch[] = { 0x3045, 0xE1D6, 0xE7B5, 0xF7C1, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_E0_Current_Dis, TMC_E0_Current_buf_ch, 16, true); + + const uint16_t TMC_X1_Current_buf_ch[] = { 0x3158, 0xE1D6, 0xE7B5, 0xF7C1, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_X1_Current_Dis, TMC_X1_Current_buf_ch, 16, true); + + const uint16_t TMC_Y1_Current_buf_ch[] = { 0x3159, 0xE1D6, 0xE7B5, 0xF7C1, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_Y1_Current_Dis, TMC_Y1_Current_buf_ch, 16, true); + + const uint16_t TMC_Z1_Current_buf_ch[] = { 0x315A, 0xE1D6, 0xE7B5, 0xF7C1, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_Z1_Current_Dis, TMC_Z1_Current_buf_ch, 16, true); + + const uint16_t TMC_E1_Current_buf_ch[] = { 0x3145, 0xE1D6, 0xE7B5, 0xF7C1, 0x2000 }; + dgusdisplay.WriteVariable(VP_TMC_E1_Current_Dis, TMC_E1_Current_buf_ch, 16, true); + + const uint16_t Min_Ex_Temp_buf_ch[] = { 0xEED7, 0xA1D0, 0xB7BC, 0xF6B3, 0xC2CE, 0xC8B6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Min_Ex_Temp_Dis, Min_Ex_Temp_buf_ch, 32, true); + + const uint16_t AutoLEVEL_INFO1_buf_ch[] = { 0xEBC7, 0xB4B0, 0xC2CF, 0xB4B0, 0xA5C5, 0x2000 }; + dgusdisplay.WriteVariable(VP_AutoLEVEL_INFO1, AutoLEVEL_INFO1_buf_ch, 32, true); + + const uint16_t EX_TEMP_INFO2_buf_ch[] = { 0xEBC7, 0xD4C9, 0xC8B5, 0x2000 }; + dgusdisplay.WriteVariable(VP_EX_TEMP_INFO2_Dis, EX_TEMP_INFO2_buf_ch, 32, true); + + const uint16_t EX_TEMP_INFO3_buf_ch[] = { 0xA1C8, 0xFBCF, 0xD3BC, 0xC8C8, 0x2000 }; + dgusdisplay.WriteVariable(VP_EX_TEMP_INFO3_Dis, EX_TEMP_INFO3_buf_ch, 32, true); + + const uint16_t PrintConfrim_Info_buf_ch[] = { 0xC7CA, 0xF1B7, 0xAABF, 0xBCCA, 0xF2B4, 0xA1D3, 0x2000 }; + dgusdisplay.WriteVariable(VP_PrintConfrim_Info_Dis, PrintConfrim_Info_buf_ch, 32, true); + + const uint16_t StopPrintConfrim_Info_buf_ch[] = { 0xC7CA, 0xF1B7, 0xA3CD, 0xB9D6, 0xF2B4, 0xA1D3, 0x2000 }; + dgusdisplay.WriteVariable(VP_StopPrintConfrim_Info_Dis, StopPrintConfrim_Info_buf_ch, 32, true); + + const uint16_t Printting_buf_ch[] = { 0xF2B4, 0xA1D3, 0xD0D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_Printting_Dis, Printting_buf_ch, 32, true); + + const uint16_t LCD_BLK_buf_ch[] = { 0xB3B1, 0xE2B9, 0xE8C9, 0xC3D6, 0x2000 }; + dgusdisplay.WriteVariable(VP_LCD_BLK_Dis, LCD_BLK_buf_ch, 32, true); + } +} + +#endif // DGUS_LCD_UI_MKS diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h new file mode 100644 index 000000000000..8d5d9066f4c8 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h @@ -0,0 +1,315 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../DGUSDisplay.h" +#include "../DGUSVPVariable.h" +#include "../DGUSDisplayDef.h" + +#include "../../../../inc/MarlinConfig.h" + +enum DGUSLCD_Screens : uint8_t; + +class DGUSScreenHandler { +public: + DGUSScreenHandler() = default; + + static bool loop(); + + // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen + // The bools specifying whether the strings are in RAM or FLASH. + static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); + + static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); + + #if 0 + static void sendinfoscreen_ch_mks(const uint16_t *line1, const uint16_t *line2, const uint16_t *line3, const uint16_t *line4); + static void sendinfoscreen_en_mks(const char *line1, const char *line2, const char *line3, const char *line4) ; + static void sendinfoscreen_mks(const void *line1, const void *line2, const void *line3, const void *line4, uint16_t language); + #endif + + // "M117" Message -- msg is a RAM ptr. + static void setstatusmessage(const char *msg); + // The same for messages from Flash + static void setstatusmessagePGM(PGM_P const msg); + // Callback for VP "Display wants to change screen on idle printer" + static void ScreenChangeHookIfIdle(DGUS_VP_Variable &var, void *val_ptr); + // Callback for VP "Screen has been changed" + static void ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr); + + static void ScreenBackChange(DGUS_VP_Variable &var, void *val_ptr); + + // Callback for VP "All Heaters Off" + static void HandleAllHeatersOff(DGUS_VP_Variable &var, void *val_ptr); + // Hook for "Change this temperature" + static void HandleTemperatureChanged(DGUS_VP_Variable &var, void *val_ptr); + // Hook for "Change Flowrate" + static void HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) + // Hook for manual move option + static void HandleManualMoveOption(DGUS_VP_Variable &var, void *val_ptr); + #endif + + static void EEPROM_CTRL(DGUS_VP_Variable &var, void *val_ptr); + static void LanguageChange_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr); + static void Level_Ctrl_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void MeshLevel(DGUS_VP_Variable &var, void *val_ptr); + static void MeshLevelDistanceConfig(DGUS_VP_Variable &var, void *val_ptr); + static void ManualAssistLeveling(DGUS_VP_Variable &var, void *val_ptr); + static void ZoffsetConfirm(DGUS_VP_Variable &var, void *val_ptr); + static void Z_offset_select(DGUS_VP_Variable &var, void *val_ptr); + static void GetManualMovestep(DGUS_VP_Variable &var, void *val_ptr); + static void GetZoffsetDistance(DGUS_VP_Variable &var, void *val_ptr); + static void GetMinExtrudeTemp(DGUS_VP_Variable &var, void *val_ptr); + static void GetParkPos_MKS(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(PREVENT_COLD_EXTRUSION) + static void HandleGetExMinTemp_MKS(DGUS_VP_Variable &var, void *val_ptr); + #endif + static void DGUS_LanguageDisplay(uint8_t var); + static void TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr); + static void GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr); + static void LanguagePInit(void); + static void DGUS_Runout_Idle(void); + static void DGUS_RunoutInit(void); + static void DGUS_ExtrudeLoadInit(void); + static void LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr); + static void SD_FileBack(DGUS_VP_Variable &var, void *val_ptr); + + // Hook for manual move. + static void HandleManualMove(DGUS_VP_Variable &var, void *val_ptr); + // Hook for manual extrude. + static void HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr); + // Hook for motor lock and unlook + static void HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(POWER_LOSS_RECOVERY) + // Hook for power loss recovery. + static void HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr); + #endif + // Hook for settings + static void HandleSettings(DGUS_VP_Variable &var, void *val_ptr); + static void HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr); + static void HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr); + + static void HandleStepPerMMChanged_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleStepPerMMExtruderChanged_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleMaxSpeedChange_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleExtruderMaxSpeedChange_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleMaxAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleExtruderAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleChangeLevelPoint_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleTravelAccChange_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleFeedRateMinChange_MKS(DGUS_VP_Variable &var, void *val_ptr); + static void HandleMin_T_F_MKS(DGUS_VP_Variable &var, void *val_ptr); + + #if HAS_PID_HEATING + // Hook for "Change this temperature PID para" + static void HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr); + // Hook for PID autotune + static void HandlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if HAS_BED_PROBE + // Hook for "Change probe offset z" + static void HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if ENABLED(BABYSTEPPING) + // Hook for live z adjust action + static void HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if HAS_FAN + // Hook for fan control + static void HandleFanControl(DGUS_VP_Variable &var, void *val_ptr); + #endif + // Hook for heater control + static void HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(DGUS_PREHEAT_UI) + // Hook for preheat + static void HandlePreheat(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + // Hook for filament load and unload filament option + static void HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr); + // Hook for filament load and unload + static void HandleFilamentLoadUnload(DGUS_VP_Variable &var); + + static void MKS_FilamentLoadUnload(DGUS_VP_Variable &var, void *val_ptr, const int filamentDir); + static void MKS_FilamentLoad(DGUS_VP_Variable &var, void *val_ptr); + static void MKS_FilamentUnLoad(DGUS_VP_Variable &var, void *val_ptr); + static void MKS_LOAD_UNLOAD_IDLE(); + static void MKS_LOAD_Cancle(DGUS_VP_Variable &var, void *val_ptr); + static void GetManualFilament(DGUS_VP_Variable &var, void *val_ptr); + static void GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_ptr); + #endif + + #if ENABLED(SDSUPPORT) + // Callback for VP "Display wants to change screen when there is a SD card" + static void ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr); + // Scroll buttons on the file listing screen. + static void DGUSLCD_SD_ScrollFilelist(DGUS_VP_Variable &var, void *val_ptr); + // File touched. + static void DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr); + // start print after confirmation received. + static void DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr); + // User hit the pause, resume or abort button. + static void DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr); + // User confirmed the abort action + static void DGUSLCD_SD_ReallyAbort(DGUS_VP_Variable &var, void *val_ptr); + // User hit the tune button + static void DGUSLCD_SD_PrintTune(DGUS_VP_Variable &var, void *val_ptr); + // Send a single filename to the display. + static void DGUSLCD_SD_SendFilename(DGUS_VP_Variable &var); + // Marlin informed us that a new SD has been inserted. + static void SDCardInserted(); + // Marlin informed us that the SD Card has been removed(). + static void SDCardRemoved(); + // Marlin informed us about a bad SD Card. + static void SDCardError(); + // Marlin informed us about SD print completion. + static void SDPrintingFinished(); + #else + static void PrintReturn(DGUS_VP_Variable &var, void *val_ptr); + #endif + + // OK Button on the Confirm screen. + static void ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr); + + // Update data after going to a new screen (by display or by GotoScreen) + // remember: store the last-displayed screen, so it can be returned to. + // (e.g for popup messages) + static void UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup=false); + + // Recall the remembered screen. + static void PopToOldScreen(); + + // Make the display show the screen and update all VPs in it. + static void GotoScreen(DGUSLCD_Screens screen, bool ispopup = false); + + static void UpdateScreenVPData(); + + // Helpers to convert and transfer data to the display. + static void DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendStringToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var); + static void DGUSLCD_SendTemperaturePID(DGUS_VP_Variable &var); + static void DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendPrintProgressToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var); + + static void DGUSLCD_SendPrintTimeToDisplay_MKS(DGUS_VP_Variable &var); + static void DGUSLCD_SendBabyStepToDisplay_MKS(DGUS_VP_Variable &var); + static void DGUSLCD_SendFanToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendGbkToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendStringToDisplay_Language_MKS(DGUS_VP_Variable &var); + static void DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var); + + #if ENABLED(PRINTCOUNTER) + static void DGUSLCD_SendPrintAccTimeToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendPrintsTotalToDisplay(DGUS_VP_Variable &var); + #endif + #if HAS_FAN + static void DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var); + #endif + static void DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var); + #if ENABLED(DGUS_UI_WAITING) + static void DGUSLCD_SendWaitingStatusToDisplay(DGUS_VP_Variable &var); + #endif + + // Send a value from 0..100 to a variable with a range from 0..255 + static void DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr); + + static void DGUSLCD_SetUint8(DGUS_VP_Variable &var, void *val_ptr); + + template + static void DGUSLCD_SetValueDirectly(DGUS_VP_Variable &var, void *val_ptr) { + if (!var.memadr) return; + union { unsigned char tmp[sizeof(T)]; T t; } x; + unsigned char *ptr = (unsigned char*)val_ptr; + LOOP_L_N(i, sizeof(T)) x.tmp[i] = ptr[sizeof(T) - i - 1]; + *(T*)var.memadr = x.t; + } + + // Send a float value to the display. + // Display will get a 4-byte integer scaled to the number of digits: + // Tell the display the number of digits and it cheats by displaying a dot between... + template + static void DGUSLCD_SendFloatAsLongValueToDisplay(DGUS_VP_Variable &var) { + if (var.memadr) { + float f = *(float *)var.memadr; + f *= cpow(10, decimals); + dgusdisplay.WriteVariable(var.VP, (long)f); + } + } + + // Send a float value to the display. + // Display will get a 2-byte integer scaled to the number of digits: + // Tell the display the number of digits and it cheats by displaying a dot between... + template + static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { + if (var.memadr) { + float f = *(float *)var.memadr; + DEBUG_ECHOLNPAIR_F(" >> ", f, 6); + f *= cpow(10, decimals); + dgusdisplay.WriteVariable(var.VP, (int16_t)f); + } + } + + // Force an update of all VP on the current screen. + static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; } + // Has all VPs sent to the screen + static inline bool IsScreenComplete() { return ScreenComplete; } + + static inline DGUSLCD_Screens getCurrentScreen() { return current_screen; } + + static inline void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; } + +private: + static DGUSLCD_Screens current_screen; //< currently on screen + static constexpr uint8_t NUM_PAST_SCREENS = 4; + static DGUSLCD_Screens past_screens[NUM_PAST_SCREENS]; //< LIFO with past screens for the "back" button. + + static uint8_t update_ptr; //< Last sent entry in the VPList for the actual screen. + static uint16_t skipVP; //< When updating the screen data, skip this one, because the user is interacting with it. + static bool ScreenComplete; //< All VPs sent to screen? + + static uint16_t ConfirmVP; //< context for confirm screen (VP that will be emulated-sent on "OK"). + + #if ENABLED(SDSUPPORT) + static int16_t top_file; //< file on top of file chooser + static int16_t file_to_print; //< touched file to be confirmed + #endif + + static void (*confirm_action_cb)(); +}; + +#define MKS_Language_Choose 0x00 +#define MKS_Language_NoChoose 0x01 + +#define MKS_SimpleChinese 0 +#define MKS_English 1 +extern uint8_t mks_language_index; +extern bool DGUSAutoTurnOff; + +#if ENABLED(POWER_LOSS_RECOVERY) + #define PLR_SCREEN_RECOVER MKSLCD_SCREEN_PRINT + #define PLR_SCREEN_CANCEL MKSLCD_SCREEN_HOME +#endif diff --git a/Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp similarity index 54% rename from Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.cpp rename to Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp index 28e66e5d7ce4..2f5e2787d615 100644 --- a/Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.cpp +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.cpp @@ -20,9 +20,11 @@ * */ -/* DGUS implementation written by coldtobi in 2019 for Marlin */ +/** + * lcd/extui/dgus/origin/DGUSDisplayDef.cpp + */ -#include "../../../../../inc/MarlinConfigPre.h" +#include "../../../../inc/MarlinConfigPre.h" #if ENABLED(DGUS_LCD_UI_ORIGIN) @@ -30,12 +32,12 @@ #include "../DGUSDisplay.h" #include "../DGUSScreenHandler.h" -#include "../../../../../module/temperature.h" -#include "../../../../../module/motion.h" -#include "../../../../../module/planner.h" +#include "../../../../module/temperature.h" +#include "../../../../module/motion.h" +#include "../../../../module/planner.h" -#include "../../../../marlinui.h" -#include "../../../ui_api.h" +#include "../../../marlinui.h" +#include "../../ui_api.h" #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) uint16_t distanceToMove = 10; @@ -48,16 +50,16 @@ const uint16_t VPList_Boot[] PROGMEM = { }; const uint16_t VPList_Main[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded. */ + // VP_M117, for completeness, but it cannot be auto-uploaded. 0x0000 }; const uint16_t VPList_Temp[] PROGMEM = { - #if HOTENDS >= 1 + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif #if HAS_HEATED_BED VP_T_Bed_Is, VP_T_Bed_Set, @@ -66,12 +68,12 @@ const uint16_t VPList_Temp[] PROGMEM = { }; const uint16_t VPList_Status[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ - #if HOTENDS >= 1 + // VP_M117, for completeness, but it cannot be auto-uploaded + #if HAS_HOTEND VP_T_E0_Is, VP_T_E0_Set, - #endif - #if HOTENDS >= 2 - VP_T_E1_Is, VP_T_E1_Set, + #if HOTENDS >= 2 + VP_T_E1_Is, VP_T_E1_Set, + #endif #endif #if HAS_HEATED_BED VP_T_Bed_Is, VP_T_Bed_Set, @@ -87,73 +89,41 @@ const uint16_t VPList_Status[] PROGMEM = { }; const uint16_t VPList_Status2[] PROGMEM = { - /* VP_M117, for completeness, but it cannot be auto-uploaded */ - #if HOTENDS >= 1 + // VP_M117, for completeness, but it cannot be auto-uploaded + #if HAS_HOTEND VP_Flowrate_E0, - #endif - #if HOTENDS >= 2 - VP_Flowrate_E1, + #if HOTENDS >= 2 + VP_Flowrate_E1, + #endif #endif VP_PrintProgress_Percentage, VP_PrintTime, 0x0000 }; - -const uint16_t VPList_ManualMove[] PROGMEM = { - VP_XPos, VP_YPos, VP_ZPos, - 0x0000 -}; - -const uint16_t VPList_ManualExtrude[] PROGMEM = { - VP_EPos, - 0x0000 -}; - -const uint16_t VPList_FanAndFeedrate[] PROGMEM = { - VP_Feedrate_Percentage, VP_Fan0_Percentage, - 0x0000 -}; - -const uint16_t VPList_SD_FlowRates[] PROGMEM = { - VP_Flowrate_E0, VP_Flowrate_E1, - 0x0000 -}; - -const uint16_t VPList_SDFileList[] PROGMEM = { - VP_SD_FileName0, VP_SD_FileName1, VP_SD_FileName2, VP_SD_FileName3, VP_SD_FileName4, - 0x0000 -}; - -const uint16_t VPList_SD_PrintManipulation[] PROGMEM = { - VP_PrintProgress_Percentage, VP_PrintTime, - 0x0000 -}; +const uint16_t VPList_ManualMove[] PROGMEM = { VP_XPos, VP_YPos, VP_ZPos, 0x0000 }; +const uint16_t VPList_ManualExtrude[] PROGMEM = { VP_EPos, 0x0000 }; +const uint16_t VPList_FanAndFeedrate[] PROGMEM = { VP_Feedrate_Percentage, VP_Fan0_Percentage, 0x0000 }; +const uint16_t VPList_SD_FlowRates[] PROGMEM = { VP_Flowrate_E0, VP_Flowrate_E1, 0x0000 }; +const uint16_t VPList_SDFileList[] PROGMEM = { VP_SD_FileName0, VP_SD_FileName1, VP_SD_FileName2, VP_SD_FileName3, VP_SD_FileName4, 0x0000 }; +const uint16_t VPList_SD_PrintManipulation[] PROGMEM = { VP_PrintProgress_Percentage, VP_PrintTime, 0x0000 }; const struct VPMapping VPMap[] PROGMEM = { - { DGUSLCD_SCREEN_BOOT, VPList_Boot }, - { DGUSLCD_SCREEN_MAIN, VPList_Main }, - { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, - { DGUSLCD_SCREEN_STATUS, VPList_Status }, - { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, - { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, - { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, - { DGUSLCD_SCREEN_FANANDFEEDRATE, VPList_FanAndFeedrate }, - { DGUSLCD_SCREEN_FLOWRATES, VPList_SD_FlowRates }, + { DGUSLCD_SCREEN_BOOT, VPList_Boot }, + { DGUSLCD_SCREEN_MAIN, VPList_Main }, + { DGUSLCD_SCREEN_TEMPERATURE, VPList_Temp }, + { DGUSLCD_SCREEN_STATUS, VPList_Status }, + { DGUSLCD_SCREEN_STATUS2, VPList_Status2 }, + { DGUSLCD_SCREEN_MANUALMOVE, VPList_ManualMove }, + { DGUSLCD_SCREEN_MANUALEXTRUDE, VPList_ManualExtrude }, + { DGUSLCD_SCREEN_FANANDFEEDRATE, VPList_FanAndFeedrate }, + { DGUSLCD_SCREEN_FLOWRATES, VPList_SD_FlowRates }, { DGUSLCD_SCREEN_SDPRINTMANIPULATION, VPList_SD_PrintManipulation }, - { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, + { DGUSLCD_SCREEN_SDFILELIST, VPList_SDFileList }, { 0 , nullptr } // List is terminated with an nullptr as table entry. }; const char MarlinVersion[] PROGMEM = SHORT_BUILD_VERSION; -// Helper to define a DGUS_VP_Variable for common use cases. -#define VPHELPER(VPADR, VPADRVAR, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=sizeof(VPADRVAR), \ - .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR } - -// Helper to define a DGUS_VP_Variable when the sizeo of the var cannot be determined automaticalyl (eg. a string) -#define VPHELPER_STR(VPADR, VPADRVAR, STRLEN, RXFPTR, TXFPTR ) { .VP=VPADR, .memadr=VPADRVAR, .size=STRLEN, \ - .set_by_display_handler = RXFPTR, .send_to_display_handler = TXFPTR } - const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // Helper to detect touch events VPHELPER(VP_SCREENCHANGE, nullptr, ScreenHandler.ScreenChangeHook, nullptr), @@ -163,72 +133,71 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { #endif VPHELPER(VP_CONFIRMED, nullptr, ScreenHandler.ScreenConfirmedOK, nullptr), - VPHELPER(VP_TEMP_ALL_OFF, nullptr, &ScreenHandler.HandleAllHeatersOff, nullptr), + VPHELPER(VP_TEMP_ALL_OFF, nullptr, ScreenHandler.HandleAllHeatersOff, nullptr), #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) - VPHELPER(VP_MOVE_OPTION, &distanceToMove, &ScreenHandler.HandleManualMoveOption, nullptr), + VPHELPER(VP_MOVE_OPTION, &distanceToMove, ScreenHandler.HandleManualMoveOption, nullptr), #endif #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) - VPHELPER(VP_MOVE_X, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Y, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Z, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_HOME_ALL, &distanceToMove, &ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_X, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Y, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Z, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_HOME_ALL, &distanceToMove, ScreenHandler.HandleManualMove, nullptr), #else - VPHELPER(VP_MOVE_X, nullptr, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Y, nullptr, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_MOVE_Z, nullptr, &ScreenHandler.HandleManualMove, nullptr), - VPHELPER(VP_HOME_ALL, nullptr, &ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_X, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Y, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_MOVE_Z, nullptr, ScreenHandler.HandleManualMove, nullptr), + VPHELPER(VP_HOME_ALL, nullptr, ScreenHandler.HandleManualMove, nullptr), #endif - VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, &ScreenHandler.HandleMotorLockUnlock, nullptr), + VPHELPER(VP_MOTOR_LOCK_UNLOK, nullptr, ScreenHandler.HandleMotorLockUnlock, nullptr), #if ENABLED(POWER_LOSS_RECOVERY) - VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, &ScreenHandler.HandlePowerLossRecovery, nullptr), + VPHELPER(VP_POWER_LOSS_RECOVERY, nullptr, ScreenHandler.HandlePowerLossRecovery, nullptr), #endif - VPHELPER(VP_SETTINGS, nullptr, &ScreenHandler.HandleSettings, nullptr), + VPHELPER(VP_SETTINGS, nullptr, ScreenHandler.HandleSettings, nullptr), - { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MARLIN_VERSION, .memadr = (void*)MarlinVersion, .size = VP_MARLIN_VERSION_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, // M117 LCD String (We don't need the string in memory but "just" push it to the display on demand, hence the nullptr - { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler =&ScreenHandler.DGUSLCD_SendStringToDisplay }, + { .VP = VP_M117, .memadr = nullptr, .size = VP_M117_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplay }, // Temperature Data - #if HOTENDS >= 1 - VPHELPER(VP_T_E0_Is, nullptr, nullptr, SET_VARIABLE(getActualTemp_celsius, E0, long)), - VPHELPER(VP_T_E0_Set, nullptr, GET_VARIABLE(setTargetTemp_celsius, E0), - SET_VARIABLE(getTargetTemp_celsius, E0)), - VPHELPER(VP_Flowrate_E0, nullptr, ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), + #if HAS_HOTEND + VPHELPER(VP_T_E0_Is, &thermalManager.temp_hotend[0].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), + VPHELPER(VP_T_E0_Set, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Flowrate_E0, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), VPHELPER(VP_EPos, &destination.e, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), - VPHELPER(VP_MOVE_E0, nullptr, &ScreenHandler.HandleManualExtrude, nullptr), - VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, &ScreenHandler.HandleHeaterControl, nullptr), - VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + VPHELPER(VP_MOVE_E0, nullptr, ScreenHandler.HandleManualExtrude, nullptr), + VPHELPER(VP_E0_CONTROL, &thermalManager.temp_hotend[0].target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_E0_STATUS, &thermalManager.temp_hotend[0].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), #if ENABLED(DGUS_PREHEAT_UI) - VPHELPER(VP_E0_BED_PREHEAT, nullptr, &ScreenHandler.HandlePreheat, nullptr), + VPHELPER(VP_E0_BED_PREHEAT, nullptr, ScreenHandler.HandlePreheat, nullptr), #endif #if ENABLED(PIDTEMP) VPHELPER(VP_E0_PID_P, &thermalManager.temp_hotend[0].pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_E0_PID_I, &thermalManager.temp_hotend[0].pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_E0_PID_D, &thermalManager.temp_hotend[0].pid.Kd, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), - VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr), + VPHELPER(VP_PID_AUTOTUNE_E0, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), #endif #if ENABLED(DGUS_FILAMENT_LOADUNLOAD) - VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, &ScreenHandler.HandleFilamentOption, &ScreenHandler.HandleFilamentLoadUnload), + VPHELPER(VP_E0_FILAMENT_LOAD_UNLOAD, nullptr, ScreenHandler.HandleFilamentOption, ScreenHandler.HandleFilamentLoadUnload), #endif #endif #if HOTENDS >= 2 - VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, DGUSLCD_SendFloatAsLongValueToDisplay<0>), - VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_MOVE_E1, nullptr, &ScreenHandler.HandleManualExtrude, nullptr), - VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, &ScreenHandler.HandleHeaterControl, nullptr), - VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + VPHELPER(VP_T_E1_Is, &thermalManager.temp_hotend[1].celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), + VPHELPER(VP_T_E1_Set, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_Flowrate_E1, nullptr, ScreenHandler.HandleFlowRateChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_MOVE_E1, nullptr, ScreenHandler.HandleManualExtrude, nullptr), + VPHELPER(VP_E1_CONTROL, &thermalManager.temp_hotend[1].target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_E1_STATUS, &thermalManager.temp_hotend[1].target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), #if ENABLED(PIDTEMP) - VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, &ScreenHandler.HandlePIDAutotune, nullptr), + VPHELPER(VP_PID_AUTOTUNE_E1, nullptr, ScreenHandler.HandlePIDAutotune, nullptr), #endif #endif #if HAS_HEATED_BED VPHELPER(VP_T_Bed_Is, &thermalManager.temp_bed.celsius, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>), - VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, &ScreenHandler.DGUSLCD_SendWordValueToDisplay), - VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, &ScreenHandler.HandleHeaterControl, nullptr), - VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, &ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), + VPHELPER(VP_T_Bed_Set, &thermalManager.temp_bed.target, ScreenHandler.HandleTemperatureChanged, ScreenHandler.DGUSLCD_SendWordValueToDisplay), + VPHELPER(VP_BED_CONTROL, &thermalManager.temp_bed.target, ScreenHandler.HandleHeaterControl, nullptr), + VPHELPER(VP_BED_STATUS, &thermalManager.temp_bed.target, nullptr, ScreenHandler.DGUSLCD_SendHeaterStatusToDisplay), #if ENABLED(PIDTEMPBED) VPHELPER(VP_BED_PID_P, &thermalManager.temp_bed.pid.Kp, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), VPHELPER(VP_BED_PID_I, &thermalManager.temp_bed.pid.Ki, ScreenHandler.HandleTemperaturePIDChanged, ScreenHandler.DGUSLCD_SendTemperaturePID), @@ -239,14 +208,14 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { // Fan Data #if HAS_FAN #define FAN_VPHELPER(N) \ - VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, &ScreenHandler.DGUSLCD_SendPercentageToDisplay), \ - VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], &ScreenHandler.HandleFanControl, nullptr), \ - VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, &ScreenHandler.DGUSLCD_SendFanStatusToDisplay), + VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], ScreenHandler.DGUSLCD_PercentageToUint8, ScreenHandler.DGUSLCD_SendPercentageToDisplay), \ + VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], ScreenHandler.HandleFanControl, nullptr), \ + VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, ScreenHandler.DGUSLCD_SendFanStatusToDisplay), REPEAT(FAN_COUNT, FAN_VPHELPER) #endif // Feedrate - VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly, &ScreenHandler.DGUSLCD_SendWordValueToDisplay ), + VPHELPER(VP_Feedrate_Percentage, &feedrate_percentage, ScreenHandler.DGUSLCD_SetValueDirectly, ScreenHandler.DGUSLCD_SendWordValueToDisplay), // Position Data VPHELPER(VP_XPos, ¤t_position.x, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), @@ -254,23 +223,23 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_ZPos, ¤t_position.z, nullptr, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>), // Print Progress - VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay ), + VPHELPER(VP_PrintProgress_Percentage, nullptr, nullptr, ScreenHandler.DGUSLCD_SendPrintProgressToDisplay), // Print Time - VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay ), + VPHELPER_STR(VP_PrintTime, nullptr, VP_PrintTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintTimeToDisplay), #if ENABLED(PRINTCOUNTER) - VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay ), - VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay ), + VPHELPER_STR(VP_PrintAccTime, nullptr, VP_PrintAccTime_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintAccTimeToDisplay), + VPHELPER_STR(VP_PrintsTotal, nullptr, VP_PrintsTotal_LEN, nullptr, ScreenHandler.DGUSLCD_SendPrintsTotalToDisplay), #endif VPHELPER(VP_X_STEP_PER_MM, &planner.settings.axis_steps_per_mm[X_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), VPHELPER(VP_Y_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Y_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), VPHELPER(VP_Z_STEP_PER_MM, &planner.settings.axis_steps_per_mm[Z_AXIS], ScreenHandler.HandleStepPerMMChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), - #if HOTENDS >= 1 + #if HAS_HOTEND VPHELPER(VP_E0_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(0)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), - #endif - #if HOTENDS >= 2 - VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), + #if HOTENDS >= 2 + VPHELPER(VP_E1_STEP_PER_MM, &planner.settings.axis_steps_per_mm[E_AXIS_N(1)], ScreenHandler.HandleStepPerMMExtruderChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<1>), + #endif #endif // SDCard File listing. @@ -278,16 +247,16 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr), VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr), VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr), - VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), - VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename ), + VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName1, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName2, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName3, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), + VPHELPER_STR(VP_SD_FileName4, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename), VPHELPER(VP_SD_ResumePauseAbort, nullptr, ScreenHandler.DGUSLCD_SD_ResumePauseAbort, nullptr), VPHELPER(VP_SD_AbortPrintConfirmed, nullptr, ScreenHandler.DGUSLCD_SD_ReallyAbort, nullptr), VPHELPER(VP_SD_Print_Setting, nullptr, ScreenHandler.DGUSLCD_SD_PrintTune, nullptr), #if HAS_BED_PROBE - VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, &ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>), + VPHELPER(VP_SD_Print_ProbeOffsetZ, &probe.offset.z, ScreenHandler.HandleProbeOffsetZChanged, ScreenHandler.DGUSLCD_SendFloatAsIntValueToDisplay<2>), #if ENABLED(BABYSTEPPING) VPHELPER(VP_SD_Print_LiveAdjustZ, nullptr, ScreenHandler.HandleLiveAdjustZ, nullptr), #endif @@ -298,11 +267,11 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = { VPHELPER(VP_WAITING_STATUS, nullptr, nullptr, ScreenHandler.DGUSLCD_SendWaitingStatusToDisplay), #endif - // Messages for the User, shared by the popup and the kill screen. They cant be autouploaded as we do not buffer content. - { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, - { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, - { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, - { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = &ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + // Messages for the User, shared by the popup and the kill screen. They can't be autouploaded as we do not buffer content. + { .VP = VP_MSGSTR1, .memadr = nullptr, .size = VP_MSGSTR1_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MSGSTR2, .memadr = nullptr, .size = VP_MSGSTR2_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MSGSTR3, .memadr = nullptr, .size = VP_MSGSTR3_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, + { .VP = VP_MSGSTR4, .memadr = nullptr, .size = VP_MSGSTR4_LEN, .set_by_display_handler = nullptr, .send_to_display_handler = ScreenHandler.DGUSLCD_SendStringToDisplayPGM }, VPHELPER(0, 0, 0, 0) // must be last entry. }; diff --git a/Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.h b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h similarity index 90% rename from Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.h rename to Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h index 5c5a315de6dc..f5fb986bde51 100644 --- a/Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.h +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSDisplayDef.h @@ -24,29 +24,29 @@ #include "../DGUSDisplayDef.h" enum DGUSLCD_Screens : uint8_t { - DGUSLCD_SCREEN_BOOT = 0, - DGUSLCD_SCREEN_MAIN = 10, - DGUSLCD_SCREEN_TEMPERATURE = 20, - DGUSLCD_SCREEN_STATUS = 30, - DGUSLCD_SCREEN_STATUS2 = 32, - DGUSLCD_SCREEN_MANUALMOVE = 40, - DGUSLCD_SCREEN_MANUALEXTRUDE=42, - DGUSLCD_SCREEN_FANANDFEEDRATE = 44, - DGUSLCD_SCREEN_FLOWRATES = 46, - DGUSLCD_SCREEN_SDFILELIST = 50, - DGUSLCD_SCREEN_SDPRINTMANIPULATION = 52, - DGUSLCD_SCREEN_POWER_LOSS = 100, - DGUSLCD_SCREEN_PREHEAT=120, - DGUSLCD_SCREEN_UTILITY=110, - DGUSLCD_SCREEN_FILAMENT_HEATING=146, - DGUSLCD_SCREEN_FILAMENT_LOADING=148, - DGUSLCD_SCREEN_FILAMENT_UNLOADING=158, - DGUSLCD_SCREEN_SDPRINTTUNE = 170, - DGUSLCD_SCREEN_CONFIRM = 240, - DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version") - DGUSLCD_SCREEN_WAITING = 251, - DGUSLCD_SCREEN_POPUP = 252, ///< special target, popup screen will also return this code to say "return to previous screen" - DGUSLDC_SCREEN_UNUSED = 255 + DGUSLCD_SCREEN_BOOT = 0, + DGUSLCD_SCREEN_MAIN = 10, + DGUSLCD_SCREEN_TEMPERATURE = 20, + DGUSLCD_SCREEN_STATUS = 30, + DGUSLCD_SCREEN_STATUS2 = 32, + DGUSLCD_SCREEN_MANUALMOVE = 40, + DGUSLCD_SCREEN_MANUALEXTRUDE = 42, + DGUSLCD_SCREEN_FANANDFEEDRATE = 44, + DGUSLCD_SCREEN_FLOWRATES = 46, + DGUSLCD_SCREEN_SDFILELIST = 50, + DGUSLCD_SCREEN_SDPRINTMANIPULATION = 52, + DGUSLCD_SCREEN_POWER_LOSS = 100, + DGUSLCD_SCREEN_PREHEAT = 120, + DGUSLCD_SCREEN_UTILITY = 110, + DGUSLCD_SCREEN_FILAMENT_HEATING = 146, + DGUSLCD_SCREEN_FILAMENT_LOADING = 148, + DGUSLCD_SCREEN_FILAMENT_UNLOADING = 158, + DGUSLCD_SCREEN_SDPRINTTUNE = 170, + DGUSLCD_SCREEN_CONFIRM = 240, + DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version") + DGUSLCD_SCREEN_WAITING = 251, + DGUSLCD_SCREEN_POPUP = 252, ///< special target, popup screen will also return this code to say "return to previous screen" + DGUSLCD_SCREEN_UNUSED = 255 }; // Display Memory layout used (T5UID) @@ -268,7 +268,7 @@ constexpr uint16_t VP_BED_PID_P = 0x3710; constexpr uint16_t VP_BED_PID_I = 0x3712; constexpr uint16_t VP_BED_PID_D = 0x3714; -// Wating screen status +// Waiting screen status constexpr uint16_t VP_WAITING_STATUS = 0x3800; // SPs for certain variables... diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp new file mode 100644 index 000000000000..db467d7b3459 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.cpp @@ -0,0 +1,423 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_ORIGIN) + +#include "../DGUSScreenHandler.h" + +#include "../../../../MarlinCore.h" +#include "../../../../gcode/queue.h" +#include "../../../../libs/duration_t.h" +#include "../../../../module/settings.h" +#include "../../../../module/temperature.h" +#include "../../../../module/motion.h" +#include "../../../../module/planner.h" +#include "../../../../module/printcounter.h" +#include "../../../../sd/cardreader.h" + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../../feature/powerloss.h" +#endif + +#if ENABLED(SDSUPPORT) + + static ExtUI::FileList filelist; + + void DGUSScreenHandler::DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t touched_nr = (int16_t)swap16(*(uint16_t*)val_ptr) + top_file; + if (touched_nr > filelist.count()) return; + if (!filelist.seek(touched_nr)) return; + + if (filelist.isDir()) { + filelist.changeDir(filelist.filename()); + top_file = 0; + ForceCompleteUpdate(); + return; + } + + #if ENABLED(DGUS_PRINT_FILENAME) + // Send print filename + dgusdisplay.WriteVariable(VP_SD_Print_Filename, filelist.filename(), VP_SD_FileName_LEN, true); + #endif + + // Setup Confirmation screen + file_to_print = touched_nr; + + HandleUserConfirmationPopUp(VP_SD_FileSelectConfirm, nullptr, PSTR("Print file"), filelist.filename(), PSTR("from SD Card?"), true, true, false, true); + } + + void DGUSScreenHandler::DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr) { + if (!filelist.seek(file_to_print)) return; + ExtUI::printFile(filelist.shortFilename()); + GotoScreen(DGUSLCD_SCREEN_STATUS); + } + + void DGUSScreenHandler::DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr) { + + if (!ExtUI::isPrintingFromMedia()) return; // avoid race condition when user stays in this menu and printer finishes. + switch (swap16(*(uint16_t*)val_ptr)) { + case 0: { // Resume + if (ExtUI::isPrintingFromMediaPaused()) { + ExtUI::resumePrint(); + } + } break; + + case 1: // Pause + + GotoScreen(DGUSLCD_SCREEN_SDPRINTMANIPULATION); + if (!ExtUI::isPrintingFromMediaPaused()) { + ExtUI::pausePrint(); + //ExtUI::mks_pausePrint(); + } + break; + case 2: // Abort + HandleUserConfirmationPopUp(VP_SD_AbortPrintConfirmed, nullptr, PSTR("Abort printing"), filelist.filename(), PSTR("?"), true, true, false, true); + break; + } + } + + void DGUSScreenHandler::DGUSLCD_SD_SendFilename(DGUS_VP_Variable& var) { + uint16_t target_line = (var.VP - VP_SD_FileName0) / VP_SD_FileName_LEN; + if (target_line > DGUS_SD_FILESPERSCREEN) return; + char tmpfilename[VP_SD_FileName_LEN + 1] = ""; + var.memadr = (void*)tmpfilename; + + if (filelist.seek(top_file + target_line)) { + snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s%c"), filelist.filename(), filelist.isDir() ? '/' : 0); // snprintf_P(tmpfilename, VP_SD_FileName_LEN, PSTR("%s"), filelist.filename()); + } + DGUSLCD_SendStringToDisplay(var); + } + + void DGUSScreenHandler::SDCardInserted() { + top_file = 0; + filelist.refresh(); + auto cs = getCurrentScreen(); + if (cs == DGUSLCD_SCREEN_MAIN || cs == DGUSLCD_SCREEN_STATUS) + GotoScreen(DGUSLCD_SCREEN_SDFILELIST); + } + + void DGUSScreenHandler::SDCardRemoved() { + if (current_screen == DGUSLCD_SCREEN_SDFILELIST + || (current_screen == DGUSLCD_SCREEN_CONFIRM && (ConfirmVP == VP_SD_AbortPrintConfirmed || ConfirmVP == VP_SD_FileSelectConfirm)) + || current_screen == DGUSLCD_SCREEN_SDPRINTMANIPULATION + ) GotoScreen(DGUSLCD_SCREEN_MAIN); + } + +#endif // SDSUPPORT + +void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) { + uint8_t *tmp = (uint8_t*)val_ptr; + + // The keycode in target is coded as , so 0x0100A means + // from screen 1 (main) to 10 (temperature). DGUSLCD_SCREEN_POPUP is special, + // meaning "return to previous screen" + DGUSLCD_Screens target = (DGUSLCD_Screens)tmp[1]; + + DEBUG_ECHOLNPGM("\n DEBUG target", target); + + if (target == DGUSLCD_SCREEN_POPUP) { + // Special handling for popup is to return to previous menu + if (current_screen == DGUSLCD_SCREEN_POPUP && confirm_action_cb) confirm_action_cb(); + PopToOldScreen(); + return; + } + + UpdateNewScreen(target); + + #ifdef DEBUG_DGUSLCD + if (!DGUSLCD_FindScreenVPMapList(target)) DEBUG_ECHOLNPGM("WARNING: No screen Mapping found for ", target); + #endif +} + +void DGUSScreenHandler::HandleManualMove(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleManualMove"); + + int16_t movevalue = swap16(*(uint16_t*)val_ptr); + #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) + if (movevalue) { + const uint16_t choice = *(uint16_t*)var.memadr; + movevalue = movevalue < 0 ? -choice : choice; + } + #endif + char axiscode; + unsigned int speed = 1500; // FIXME: get default feedrate for manual moves, don't hardcode. + + switch (var.VP) { + default: return; + + case VP_MOVE_X: + axiscode = 'X'; + if (!ExtUI::canMove(ExtUI::axis_t::X)) goto cannotmove; + break; + + case VP_MOVE_Y: + axiscode = 'Y'; + if (!ExtUI::canMove(ExtUI::axis_t::Y)) goto cannotmove; + break; + + case VP_MOVE_Z: + axiscode = 'Z'; + speed = 300; // default to 5mm/s + if (!ExtUI::canMove(ExtUI::axis_t::Z)) goto cannotmove; + break; + + case VP_HOME_ALL: // only used for homing + axiscode = '\0'; + movevalue = 0; // ignore value sent from display, this VP is _ONLY_ for homing. + break; + } + + if (!movevalue) { + // homing + DEBUG_ECHOPGM(" homing ", AS_CHAR(axiscode)); + char buf[6] = "G28 X"; + buf[4] = axiscode; + //DEBUG_ECHOPGM(" ", buf); + queue.enqueue_one_now(buf); + //DEBUG_ECHOLNPGM(" ✓"); + ForceCompleteUpdate(); + return; + } + else { + // movement + DEBUG_ECHOPGM(" move ", AS_CHAR(axiscode)); + bool old_relative_mode = relative_mode; + if (!relative_mode) { + //DEBUG_ECHOPGM(" G91"); + queue.enqueue_now_P(PSTR("G91")); + //DEBUG_ECHOPGM(" ✓ "); + } + char buf[32]; // G1 X9999.99 F12345 + unsigned int backup_speed = MMS_TO_MMM(feedrate_mm_s); + char sign[] = "\0"; + int16_t value = movevalue / 100; + if (movevalue < 0) { value = -value; sign[0] = '-'; } + int16_t fraction = ABS(movevalue) % 100; + snprintf_P(buf, 32, PSTR("G0 %c%s%d.%02d F%d"), axiscode, sign, value, fraction, speed); + //DEBUG_ECHOPGM(" ", buf); + queue.enqueue_one_now(buf); + //DEBUG_ECHOLNPGM(" ✓ "); + if (backup_speed != speed) { + snprintf_P(buf, 32, PSTR("G0 F%d"), backup_speed); + queue.enqueue_one_now(buf); + //DEBUG_ECHOPGM(" ", buf); + } + // while (!enqueue_and_echo_command(buf)) idle(); + //DEBUG_ECHOLNPGM(" ✓ "); + if (!old_relative_mode) { + //DEBUG_ECHOPGM("G90"); + queue.enqueue_now_P(PSTR("G90")); + //DEBUG_ECHOPGM(" ✓ "); + } + } + + ForceCompleteUpdate(); + DEBUG_ECHOLNPGM("manmv done."); + return; + + cannotmove: + DEBUG_ECHOLNPGM(" cannot move ", AS_CHAR(axiscode)); + return; +} + +#if HAS_PID_HEATING + void DGUSScreenHandler::HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr) { + uint16_t rawvalue = swap16(*(uint16_t*)val_ptr); + DEBUG_ECHOLNPGM("V1:", rawvalue); + float value = (float)rawvalue / 10; + DEBUG_ECHOLNPGM("V2:", value); + float newvalue = 0; + + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_PID_P: newvalue = value; break; + case VP_E0_PID_I: newvalue = scalePID_i(value); break; + case VP_E0_PID_D: newvalue = scalePID_d(value); break; + #endif + #if HOTENDS >= 2 + case VP_E1_PID_P: newvalue = value; break; + case VP_E1_PID_I: newvalue = scalePID_i(value); break; + case VP_E1_PID_D: newvalue = scalePID_d(value); break; + #endif + #if HAS_HEATED_BED + case VP_BED_PID_P: newvalue = value; break; + case VP_BED_PID_I: newvalue = scalePID_i(value); break; + case VP_BED_PID_D: newvalue = scalePID_d(value); break; + #endif + } + + DEBUG_ECHOLNPAIR_F("V3:", newvalue); + *(float *)var.memadr = newvalue; + + skipVP = var.VP; // don't overwrite value the next update time as the display might autoincrement in parallel + } +#endif // HAS_PID_HEATING + +#if ENABLED(BABYSTEPPING) + void DGUSScreenHandler::HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleLiveAdjustZ"); + int16_t flag = swap16(*(uint16_t*)val_ptr), + steps = flag ? -20 : 20; + ExtUI::smartAdjustAxis_steps(steps, ExtUI::axis_t::Z, true); + ForceCompleteUpdate(); + } +#endif + +#if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + + void DGUSScreenHandler::HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr) { + DEBUG_ECHOLNPGM("HandleFilamentOption"); + + uint8_t e_temp = 0; + filament_data.heated = false; + uint16_t preheat_option = swap16(*(uint16_t*)val_ptr); + if (preheat_option <= 8) { // Load filament type + filament_data.action = 1; + } + else if (preheat_option >= 10) { // Unload filament type + preheat_option -= 10; + filament_data.action = 2; + filament_data.purge_length = DGUS_FILAMENT_PURGE_LENGTH; + } + else { // Cancel filament operation + filament_data.action = 0; + } + + switch (preheat_option) { + case 0: // Load PLA + #ifdef PREHEAT_1_TEMP_HOTEND + e_temp = PREHEAT_1_TEMP_HOTEND; + #endif + break; + case 1: // Load ABS + TERN_(PREHEAT_2_TEMP_HOTEND, e_temp = PREHEAT_2_TEMP_HOTEND); + break; + case 2: // Load PET + #ifdef PREHEAT_3_TEMP_HOTEND + e_temp = PREHEAT_3_TEMP_HOTEND; + #endif + break; + case 3: // Load FLEX + #ifdef PREHEAT_4_TEMP_HOTEND + e_temp = PREHEAT_4_TEMP_HOTEND; + #endif + break; + case 9: // Cool down + default: + e_temp = 0; + break; + } + + if (filament_data.action == 0) { // Go back to utility screen + #if HAS_HOTEND + thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E0); + #if HOTENDS >= 2 + thermalManager.setTargetHotend(e_temp, ExtUI::extruder_t::E1); + #endif + #endif + GotoScreen(DGUSLCD_SCREEN_UTILITY); + } + else { // Go to the preheat screen to show the heating progress + switch (var.VP) { + default: return; + #if HAS_HOTEND + case VP_E0_FILAMENT_LOAD_UNLOAD: + filament_data.extruder = ExtUI::extruder_t::E0; + thermalManager.setTargetHotend(e_temp, filament_data.extruder); + break; + #endif + #if HOTENDS >= 2 + case VP_E1_FILAMENT_LOAD_UNLOAD: + filament_data.extruder = ExtUI::extruder_t::E1; + thermalManager.setTargetHotend(e_temp, filament_data.extruder); + break; + #endif + } + GotoScreen(DGUSLCD_SCREEN_FILAMENT_HEATING); + } + } + + void DGUSScreenHandler::HandleFilamentLoadUnload(DGUS_VP_Variable &var) { + DEBUG_ECHOLNPGM("HandleFilamentLoadUnload"); + if (filament_data.action <= 0) return; + + // If we close to the target temperature, we can start load or unload the filament + if (thermalManager.hotEnoughToExtrude(filament_data.extruder) && \ + thermalManager.targetHotEnoughToExtrude(filament_data.extruder)) { + float movevalue = DGUS_FILAMENT_LOAD_LENGTH_PER_TIME; + + if (filament_data.action == 1) { // load filament + if (!filament_data.heated) { + //GotoScreen(DGUSLCD_SCREEN_FILAMENT_LOADING); + filament_data.heated = true; + } + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue; + } + else { // unload filament + if (!filament_data.heated) { + GotoScreen(DGUSLCD_SCREEN_FILAMENT_UNLOADING); + filament_data.heated = true; + } + // Before unloading extrude to prevent jamming + if (filament_data.purge_length >= 0) { + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) + movevalue; + filament_data.purge_length -= movevalue; + } + else { + movevalue = ExtUI::getAxisPosition_mm(filament_data.extruder) - movevalue; + } + } + ExtUI::setAxisPosition_mm(movevalue, filament_data.extruder); + } + } +#endif // DGUS_FILAMENT_LOADUNLOAD + +bool DGUSScreenHandler::loop() { + dgusdisplay.loop(); + + const millis_t ms = millis(); + static millis_t next_event_ms = 0; + + if (!IsScreenComplete() || ELAPSED(ms, next_event_ms)) { + next_event_ms = ms + DGUS_UPDATE_INTERVAL_MS; + UpdateScreenVPData(); + } + + #if ENABLED(SHOW_BOOTSCREEN) + static bool booted = false; + + if (!booted && TERN0(POWER_LOSS_RECOVERY, recovery.valid())) + booted = true; + + if (!booted && ELAPSED(ms, BOOTSCREEN_TIMEOUT)) { + booted = true; + GotoScreen(TERN0(POWER_LOSS_RECOVERY, recovery.valid()) ? DGUSLCD_SCREEN_POWER_LOSS : DGUSLCD_SCREEN_MAIN); + } + #endif + + return IsScreenComplete(); +} + +#endif // DGUS_LCD_UI_ORIGIN diff --git a/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h new file mode 100644 index 000000000000..ee0af013a855 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus/origin/DGUSScreenHandler.h @@ -0,0 +1,240 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../DGUSDisplay.h" +#include "../DGUSVPVariable.h" +#include "../DGUSDisplayDef.h" + +#include "../../../../inc/MarlinConfig.h" + +enum DGUSLCD_Screens : uint8_t; + +class DGUSScreenHandler { +public: + DGUSScreenHandler() = default; + + static bool loop(); + + // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen + // The bools specifying whether the strings are in RAM or FLASH. + static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); + + static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash); + + // "M117" Message -- msg is a RAM ptr. + static void setstatusmessage(const char *msg); + // The same for messages from Flash + static void setstatusmessagePGM(PGM_P const msg); + // Callback for VP "Display wants to change screen on idle printer" + static void ScreenChangeHookIfIdle(DGUS_VP_Variable &var, void *val_ptr); + // Callback for VP "Screen has been changed" + static void ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr); + + // Callback for VP "All Heaters Off" + static void HandleAllHeatersOff(DGUS_VP_Variable &var, void *val_ptr); + // Hook for "Change this temperature" + static void HandleTemperatureChanged(DGUS_VP_Variable &var, void *val_ptr); + // Hook for "Change Flowrate" + static void HandleFlowRateChanged(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(DGUS_UI_MOVE_DIS_OPTION) + // Hook for manual move option + static void HandleManualMoveOption(DGUS_VP_Variable &var, void *val_ptr); + #endif + + // Hook for manual move. + static void HandleManualMove(DGUS_VP_Variable &var, void *val_ptr); + // Hook for manual extrude. + static void HandleManualExtrude(DGUS_VP_Variable &var, void *val_ptr); + // Hook for motor lock and unlook + static void HandleMotorLockUnlock(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(POWER_LOSS_RECOVERY) + // Hook for power loss recovery. + static void HandlePowerLossRecovery(DGUS_VP_Variable &var, void *val_ptr); + #endif + // Hook for settings + static void HandleSettings(DGUS_VP_Variable &var, void *val_ptr); + static void HandleStepPerMMChanged(DGUS_VP_Variable &var, void *val_ptr); + static void HandleStepPerMMExtruderChanged(DGUS_VP_Variable &var, void *val_ptr); + + #if HAS_PID_HEATING + // Hook for "Change this temperature PID para" + static void HandleTemperaturePIDChanged(DGUS_VP_Variable &var, void *val_ptr); + // Hook for PID autotune + static void HandlePIDAutotune(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if HAS_BED_PROBE + // Hook for "Change probe offset z" + static void HandleProbeOffsetZChanged(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if ENABLED(BABYSTEPPING) + // Hook for live z adjust action + static void HandleLiveAdjustZ(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if HAS_FAN + // Hook for fan control + static void HandleFanControl(DGUS_VP_Variable &var, void *val_ptr); + #endif + // Hook for heater control + static void HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr); + #if ENABLED(DGUS_PREHEAT_UI) + // Hook for preheat + static void HandlePreheat(DGUS_VP_Variable &var, void *val_ptr); + #endif + #if ENABLED(DGUS_FILAMENT_LOADUNLOAD) + // Hook for filament load and unload filament option + static void HandleFilamentOption(DGUS_VP_Variable &var, void *val_ptr); + // Hook for filament load and unload + static void HandleFilamentLoadUnload(DGUS_VP_Variable &var); + #endif + + #if ENABLED(SDSUPPORT) + // Callback for VP "Display wants to change screen when there is a SD card" + static void ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr); + // Scroll buttons on the file listing screen. + static void DGUSLCD_SD_ScrollFilelist(DGUS_VP_Variable &var, void *val_ptr); + // File touched. + static void DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr); + // start print after confirmation received. + static void DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr); + // User hit the pause, resume or abort button. + static void DGUSLCD_SD_ResumePauseAbort(DGUS_VP_Variable &var, void *val_ptr); + // User confirmed the abort action + static void DGUSLCD_SD_ReallyAbort(DGUS_VP_Variable &var, void *val_ptr); + // User hit the tune button + static void DGUSLCD_SD_PrintTune(DGUS_VP_Variable &var, void *val_ptr); + // Send a single filename to the display. + static void DGUSLCD_SD_SendFilename(DGUS_VP_Variable &var); + // Marlin informed us that a new SD has been inserted. + static void SDCardInserted(); + // Marlin informed us that the SD Card has been removed(). + static void SDCardRemoved(); + // Marlin informed us about a bad SD Card. + static void SDCardError(); + #endif + + // OK Button the Confirm screen. + static void ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr); + + // Update data after went to new screen (by display or by GotoScreen) + // remember: store the last-displayed screen, so it can get returned to. + // (e.g for pop up messages) + static void UpdateNewScreen(DGUSLCD_Screens newscreen, bool popup=false); + + // Recall the remembered screen. + static void PopToOldScreen(); + + // Make the display show the screen and update all VPs in it. + static void GotoScreen(DGUSLCD_Screens screen, bool ispopup = false); + + static void UpdateScreenVPData(); + + // Helpers to convert and transfer data to the display. + static void DGUSLCD_SendWordValueToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendStringToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var); + static void DGUSLCD_SendTemperaturePID(DGUS_VP_Variable &var); + static void DGUSLCD_SendPercentageToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendPrintProgressToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendPrintTimeToDisplay(DGUS_VP_Variable &var); + + #if ENABLED(PRINTCOUNTER) + static void DGUSLCD_SendPrintAccTimeToDisplay(DGUS_VP_Variable &var); + static void DGUSLCD_SendPrintsTotalToDisplay(DGUS_VP_Variable &var); + #endif + #if HAS_FAN + static void DGUSLCD_SendFanStatusToDisplay(DGUS_VP_Variable &var); + #endif + static void DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var); + #if ENABLED(DGUS_UI_WAITING) + static void DGUSLCD_SendWaitingStatusToDisplay(DGUS_VP_Variable &var); + #endif + + // Send a value from 0..100 to a variable with a range from 0..255 + static void DGUSLCD_PercentageToUint8(DGUS_VP_Variable &var, void *val_ptr); + + template + static void DGUSLCD_SetValueDirectly(DGUS_VP_Variable &var, void *val_ptr) { + if (!var.memadr) return; + union { unsigned char tmp[sizeof(T)]; T t; } x; + unsigned char *ptr = (unsigned char*)val_ptr; + LOOP_L_N(i, sizeof(T)) x.tmp[i] = ptr[sizeof(T) - i - 1]; + *(T*)var.memadr = x.t; + } + + // Send a float value to the display. + // Display will get a 4-byte integer scaled to the number of digits: + // Tell the display the number of digits and it cheats by displaying a dot between... + template + static void DGUSLCD_SendFloatAsLongValueToDisplay(DGUS_VP_Variable &var) { + if (var.memadr) { + float f = *(float *)var.memadr; + f *= cpow(10, decimals); + dgusdisplay.WriteVariable(var.VP, (long)f); + } + } + + // Send a float value to the display. + // Display will get a 2-byte integer scaled to the number of digits: + // Tell the display the number of digits and it cheats by displaying a dot between... + template + static void DGUSLCD_SendFloatAsIntValueToDisplay(DGUS_VP_Variable &var) { + if (var.memadr) { + float f = *(float *)var.memadr; + DEBUG_ECHOLNPAIR_F(" >> ", f, 6); + f *= cpow(10, decimals); + dgusdisplay.WriteVariable(var.VP, (int16_t)f); + } + } + + // Force an update of all VP on the current screen. + static inline void ForceCompleteUpdate() { update_ptr = 0; ScreenComplete = false; } + // Has all VPs sent to the screen + static inline bool IsScreenComplete() { return ScreenComplete; } + + static inline DGUSLCD_Screens getCurrentScreen() { return current_screen; } + + static inline void SetupConfirmAction( void (*f)()) { confirm_action_cb = f; } + +private: + static DGUSLCD_Screens current_screen; //< currently on screen + static constexpr uint8_t NUM_PAST_SCREENS = 4; + static DGUSLCD_Screens past_screens[NUM_PAST_SCREENS]; //< LIFO with past screens for the "back" button. + + static uint8_t update_ptr; //< Last sent entry in the VPList for the actual screen. + static uint16_t skipVP; //< When updating the screen data, skip this one, because the user is interacting with it. + static bool ScreenComplete; //< All VPs sent to screen? + + static uint16_t ConfirmVP; //< context for confirm screen (VP that will be emulated-sent on "OK"). + + #if ENABLED(SDSUPPORT) + static int16_t top_file; //< file on top of file chooser + static int16_t file_to_print; //< touched file to be confirmed + #endif + + static void (*confirm_action_cb)(); +}; + +#if ENABLED(POWER_LOSS_RECOVERY) + #define PLR_SCREEN_RECOVER DGUSLCD_SCREEN_SDPRINTMANIPULATION + #define PLR_SCREEN_CANCEL DGUSLCD_SCREEN_STATUS +#endif diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp new file mode 100644 index 000000000000..1d97902c7171 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp @@ -0,0 +1,407 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/* DGUS implementation written by coldtobi in 2019 for Marlin */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSDisplay.h" + +#include "config/DGUS_Addr.h" +#include "config/DGUS_Constants.h" +#include "definition/DGUS_VPList.h" + +#include "../ui_api.h" +#include "../../../gcode/gcode.h" + +long map_precise(float x, long in_min, long in_max, long out_min, long out_max) { + return LROUND((x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min); +} + +uint8_t DGUSDisplay::gui_version = 0; +uint8_t DGUSDisplay::os_version = 0; + +uint8_t DGUSDisplay::volume = 255; +uint8_t DGUSDisplay::brightness = 100; + +DGUSDisplay::rx_datagram_state_t DGUSDisplay::rx_datagram_state = DGUS_IDLE; +uint8_t DGUSDisplay::rx_datagram_len = 0; + +bool DGUSDisplay::initialized = false; + +void DGUSDisplay::Loop() { + ProcessRx(); +} + +void DGUSDisplay::Init() { + LCD_SERIAL.begin(LCD_BAUDRATE); + + Read(DGUS_VERSION, 1); +} + +void DGUSDisplay::Read(uint16_t addr, uint8_t size) { + WriteHeader(addr, DGUS_READVAR, size); + + LCD_SERIAL.write(size); +} + +void DGUSDisplay::Write(uint16_t addr, const void* data_ptr, uint8_t size) { + if (!data_ptr) return; + + WriteHeader(addr, DGUS_WRITEVAR, size); + + const char* data = static_cast(data_ptr); + + while (size--) { + LCD_SERIAL.write(*data++); + } +} + +void DGUSDisplay::WriteString(uint16_t addr, const void* data_ptr, uint8_t size, bool left, bool right, bool use_space) { + if (!data_ptr) return; + + WriteHeader(addr, DGUS_WRITEVAR, size); + + const char* data = static_cast(data_ptr); + size_t len = strlen(data); + uint8_t left_spaces = 0; + uint8_t right_spaces = 0; + + if (len < size) { + if (!len) { + right_spaces = size; + } + else if ((left && right) || (!left && !right)) { + left_spaces = (size - len) / 2; + right_spaces = size - len - left_spaces; + } + else if (left) { + right_spaces = size - len; + } + else { + left_spaces = size - len; + } + } + else { + len = size; + } + + while (left_spaces--) { + LCD_SERIAL.write(' '); + } + while (len--) { + LCD_SERIAL.write(*data++); + } + while (right_spaces--) { + LCD_SERIAL.write(use_space ? ' ' : '\0'); + } +} + +void DGUSDisplay::WriteStringPGM(uint16_t addr, const void* data_ptr, uint8_t size, bool left, bool right, bool use_space) { + if (!data_ptr) return; + + WriteHeader(addr, DGUS_WRITEVAR, size); + + const char* data = static_cast(data_ptr); + size_t len = strlen_P(data); + uint8_t left_spaces = 0; + uint8_t right_spaces = 0; + + if (len < size) { + if (!len) { + right_spaces = size; + } + else if ((left && right) || (!left && !right)) { + left_spaces = (size - len) / 2; + right_spaces = size - len - left_spaces; + } + else if (left) { + right_spaces = size - len; + } + else { + left_spaces = size - len; + } + } + else { + len = size; + } + + while (left_spaces--) { + LCD_SERIAL.write(' '); + } + while (len--) { + LCD_SERIAL.write(pgm_read_byte(data++)); + } + while (right_spaces--) { + LCD_SERIAL.write(use_space ? ' ' : '\0'); + } +} + +void DGUSDisplay::SwitchScreen(DGUS_Screen screen) { + DEBUG_ECHOLNPGM("SwitchScreen ", (uint8_t)screen); + const uint8_t command[] = { 0x5A, 0x01, 0x00, (uint8_t)screen }; + Write(0x84, command, sizeof(command)); +} + +void DGUSDisplay::PlaySound(uint8_t start, uint8_t len, uint8_t volume) { + if (volume == 0) volume = DGUSDisplay::volume; + if (volume == 0) return; + DEBUG_ECHOLNPGM("PlaySound ", start, ":", len, "\nVolume ", volume); + const uint8_t command[] = { start, len, volume, 0x00 }; + Write(0xA0, command, sizeof(command)); +} + +void DGUSDisplay::EnableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control) { + DEBUG_ECHOLNPGM("EnableControl ", (uint8_t)control, "\nScreen ", (uint8_t)screen, "\nType ", (uint8_t)type); + + const uint8_t command[] = { 0x5A, 0xA5, 0x00, (uint8_t)screen, (uint8_t)control, type, 0x00, 0x01 }; + Write(0xB0, command, sizeof(command)); + + FlushTx(); + delay(50); +} + +void DGUSDisplay::DisableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control) { + DEBUG_ECHOLNPGM("DisableControl ", (uint8_t)control, "\nScreen ", (uint8_t)screen, "\nType ", (uint8_t)type); + + const uint8_t command[] = { 0x5A, 0xA5, 0x00, (uint8_t)screen, (uint8_t)control, type, 0x00, 0x00 }; + Write(0xB0, command, sizeof(command)); + + FlushTx(); + delay(50); +} + +uint8_t DGUSDisplay::GetBrightness() { + return brightness; +} + +uint8_t DGUSDisplay::GetVolume() { + return map_precise(volume, 0, 255, 0, 100); +} + +void DGUSDisplay::SetBrightness(uint8_t new_brightness) { + brightness = constrain(new_brightness, 0, 100); + new_brightness = map_precise(brightness, 0, 100, 5, 100); + DEBUG_ECHOLNPGM("SetBrightness ", new_brightness); + const uint8_t command[] = { new_brightness, new_brightness }; + Write(0x82, command, sizeof(command)); +} + +void DGUSDisplay::SetVolume(uint8_t new_volume) { + volume = map_precise(constrain(new_volume, 0, 100), 0, 100, 0, 255); + DEBUG_ECHOLNPGM("SetVolume ", volume); + const uint8_t command[] = { volume, 0x00 }; + Write(0xA1, command, sizeof(command)); +} + +void DGUSDisplay::ProcessRx() { + + #if ENABLED(LCD_SERIAL_STATS_RX_BUFFER_OVERRUNS) + if (!LCD_SERIAL.available() && LCD_SERIAL.buffer_overruns()) { + // Overrun, but reset the flag only when the buffer is empty + // We want to extract as many as valid datagrams possible... + DEBUG_ECHOPGM("OVFL"); + rx_datagram_state = DGUS_IDLE; + //LCD_SERIAL.reset_rx_overun(); + LCD_SERIAL.flush(); + } + #endif + + uint8_t receivedbyte; + while (LCD_SERIAL.available()) { + switch (rx_datagram_state) { + + case DGUS_IDLE: // Waiting for the first header byte + receivedbyte = LCD_SERIAL.read(); + DEBUG_ECHOPGM("< ", receivedbyte); + if (DGUS_HEADER1 == receivedbyte) rx_datagram_state = DGUS_HEADER1_SEEN; + break; + + case DGUS_HEADER1_SEEN: // Waiting for the second header byte + receivedbyte = LCD_SERIAL.read(); + DEBUG_ECHOPGM(" ", receivedbyte); + rx_datagram_state = (DGUS_HEADER2 == receivedbyte) ? DGUS_HEADER2_SEEN : DGUS_IDLE; + break; + + case DGUS_HEADER2_SEEN: // Waiting for the length byte + rx_datagram_len = LCD_SERIAL.read(); + DEBUG_ECHOPGM(" (", rx_datagram_len, ") "); + + // Telegram min len is 3 (command and one word of payload) + rx_datagram_state = WITHIN(rx_datagram_len, 3, DGUS_RX_BUFFER_SIZE) ? DGUS_WAIT_TELEGRAM : DGUS_IDLE; + break; + + case DGUS_WAIT_TELEGRAM: // wait for complete datagram to arrive. + if (LCD_SERIAL.available() < rx_datagram_len) return; + + initialized = true; // We've talked to it, so we defined it as initialized. + uint8_t command = LCD_SERIAL.read(); + + DEBUG_ECHOPGM("# ", command); + + uint8_t readlen = rx_datagram_len - 1; // command is part of len. + unsigned char tmp[rx_datagram_len - 1]; + unsigned char *ptmp = tmp; + + while (readlen--) { + receivedbyte = LCD_SERIAL.read(); + DEBUG_ECHOPGM(" ", receivedbyte); + *ptmp++ = receivedbyte; + } + DEBUG_ECHOPGM(" # "); + // mostly we'll get this: 5A A5 03 82 4F 4B -- ACK on 0x82, so discard it. + if (command == DGUS_WRITEVAR && 'O' == tmp[0] && 'K' == tmp[1]) { + DEBUG_ECHOLNPGM(">"); + rx_datagram_state = DGUS_IDLE; + break; + } + + /* AutoUpload, (and answer to) Command 0x83 : + | tmp[0 1 2 3 4 ... ] + | Example 5A A5 06 83 20 01 01 78 01 …… + | / / | | \ / | \ \ + | Header | | | | \_____\_ DATA (Words!) + | DatagramLen / VPAdr | + | Command DataLen (in Words) */ + if (command == DGUS_READVAR) { + const uint16_t addr = tmp[0] << 8 | tmp[1]; + const uint8_t dlen = tmp[2] << 1; // Convert to Bytes. (Display works with words) + DEBUG_ECHOPGM("addr=", addr, " dlen=", dlen, "> "); + + if (addr == DGUS_VERSION && dlen == 2) { + DEBUG_ECHOLNPGM("VERSIONS"); + gui_version = tmp[3]; + os_version = tmp[4]; + rx_datagram_state = DGUS_IDLE; + break; + } + + DGUS_VP vp; + if (!DGUS_PopulateVP((DGUS_Addr)addr, &vp)) { + DEBUG_ECHOLNPGM("VP not found"); + rx_datagram_state = DGUS_IDLE; + break; + } + + if (!vp.rx_handler) { + DEBUG_ECHOLNPGM("VP found, no handler."); + rx_datagram_state = DGUS_IDLE; + break; + } + + gcode.reset_stepper_timeout(); + + if (!vp.size) { + DEBUG_ECHOLN(); + vp.rx_handler(vp, nullptr); + + rx_datagram_state = DGUS_IDLE; + break; + } + + if (vp.flags & VPFLAG_RXSTRING) { + unsigned char buffer[vp.size]; + memset(buffer, 0, vp.size); + + for (uint8_t i = 0; i < dlen; i++) { + if (i >= vp.size) { + break; + } + + if (i + 1 < dlen && tmp[i + 3] == 0xFF && tmp[i + 4] == 0xFF) { + break; + } + + buffer[i] = tmp[i + 3]; + } + + DEBUG_ECHOLN(); + vp.rx_handler(vp, buffer); + + rx_datagram_state = DGUS_IDLE; + break; + } + + if (dlen != vp.size) { + DEBUG_ECHOLNPGM("VP found, size mismatch."); + rx_datagram_state = DGUS_IDLE; + break; + } + + DEBUG_ECHOLN(); + vp.rx_handler(vp, &tmp[3]); + + rx_datagram_state = DGUS_IDLE; + break; + } + + DEBUG_ECHOLNPGM(">"); + rx_datagram_state = DGUS_IDLE; + break; + } + } +} + +size_t DGUSDisplay::GetFreeTxBuffer() { + #ifdef LCD_SERIAL_GET_TX_BUFFER_FREE + return LCD_SERIAL_GET_TX_BUFFER_FREE(); + #else + return SIZE_MAX; + #endif +} + +void DGUSDisplay::FlushTx() { + #ifdef ARDUINO_ARCH_STM32 + LCD_SERIAL.flush(); + #else + LCD_SERIAL.flushTX(); + #endif +} + +void DGUSDisplay::WriteHeader(uint16_t addr, uint8_t command, uint8_t len) { + LCD_SERIAL.write(DGUS_HEADER1); + LCD_SERIAL.write(DGUS_HEADER2); + LCD_SERIAL.write(len + 3); + LCD_SERIAL.write(command); + LCD_SERIAL.write(addr >> 8); + LCD_SERIAL.write(addr & 0xFF); +} + +bool DGUS_PopulateVP(const DGUS_Addr addr, DGUS_VP * const buffer) { + const DGUS_VP *ret = vp_list; + + do { + const uint16_t *paddr = (uint16_t *)(&ret->addr); + const uint16_t addrcheck = pgm_read_word(paddr); + if (addrcheck == 0) break; + if ((DGUS_Addr)addrcheck == addr) { + memcpy_P(buffer, ret, sizeof(*ret)); + return true; + } + } while (++ret); + DEBUG_ECHOLNPGM("VP not found: ", (uint16_t)addr); + return false; +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h new file mode 100644 index 000000000000..1869f7940450 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.h @@ -0,0 +1,171 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/* DGUS implementation written by coldtobi in 2019 for Marlin */ + +#include "config/DGUS_Screen.h" +#include "config/DGUS_Control.h" +#include "definition/DGUS_VP.h" + +#include "../../../inc/MarlinConfigPre.h" +#include "../../../MarlinCore.h" + +#define DEBUG_OUT ENABLED(DEBUG_DGUSLCD) +#include "../../../core/debug_out.h" + +#define Swap16(val) ((uint16_t)(((uint16_t)(val) >> 8) |\ + ((uint16_t)(val) << 8))) + +// Low-Level access to the display. +class DGUSDisplay { +public: + + enum DGUS_ControlType : uint8_t { + VARIABLE_DATA_INPUT = 0x00, + POPUP_WINDOW = 0x01, + INCREMENTAL_ADJUST = 0x02, + SLIDER_ADJUST = 0x03, + RTC_SETTINGS = 0x04, + RETURN_KEY_CODE = 0x05, + TEXT_INPUT = 0x06, + FIRMWARE_SETTINGS = 0x07 + }; + + DGUSDisplay() = default; + + static void Init(); + + static void Read(uint16_t addr, uint8_t size); + static void Write(uint16_t addr, const void* data_ptr, uint8_t size); + + static void WriteString(uint16_t addr, const void* data_ptr, uint8_t size, bool left = true, bool right = false, bool use_space = true); + static void WriteStringPGM(uint16_t addr, const void* data_ptr, uint8_t size, bool left = true, bool right = false, bool use_space = true); + + template + static void Write(uint16_t addr, T data) { + Write(addr, static_cast(&data), sizeof(T)); + } + + // Until now I did not need to actively read from the display. That's why there is no ReadVariable + // (I extensively use the auto upload of the display) + + // Force display into another screen. + static void SwitchScreen(DGUS_Screen screen); + // Play sounds using the display speaker. + // start: position at which the sound was stored on the display. + // len: how many sounds to play. Sounds will play consecutively from start to start+len-1. + // volume: playback volume. 0 keeps the current volume. + static void PlaySound(uint8_t start, uint8_t len = 1, uint8_t volume = 0); + // Enable/disable a specific touch control. + // type: control type. + // control: index of the control on the page (set during screen development). + static void EnableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control); + static void DisableControl(DGUS_Screen screen, DGUS_ControlType type, DGUS_Control control); + + static uint8_t GetBrightness(); + static uint8_t GetVolume(); + + // Set the display brightness/volume, ranging 0 - 100 + static void SetBrightness(uint8_t brightness); + static void SetVolume(uint8_t volume); + + // Periodic tasks, eg. Rx-Queue handling. + static void Loop(); + + // Helper for users of this class to estimate if an interaction would be blocking. + static size_t GetFreeTxBuffer(); + static void FlushTx(); + + // Checks two things: Can we confirm the presence of the display and has we initiliazed it. + // (both boils down that the display answered to our chatting) + static inline bool IsInitialized() { + return initialized; + } + + static uint8_t gui_version; + static uint8_t os_version; + + template + static T SwapBytes(const T value) { + union { + T val; + char byte[sizeof(T)]; + } src, dst; + + src.val = value; + LOOP_L_N(i, sizeof(T)) dst.byte[i] = src.byte[sizeof(T) - i - 1]; + return dst.val; + } + + template + T_out FromFixedPoint(const T_in value) { + return (T_out)((float)value / POW(10, decimals)); + } + + template + T_out ToFixedPoint(const T_in value) { + return (T_out)LROUND((float)value * POW(10, decimals)); + } + +private: + enum dgus_header : uint8_t { + DGUS_HEADER1 = 0x5A, + DGUS_HEADER2 = 0xA5 + }; + + enum dgus_command : uint8_t { + DGUS_WRITEVAR = 0x82, + DGUS_READVAR = 0x83 + }; + + enum rx_datagram_state_t : uint8_t { + DGUS_IDLE, //< waiting for DGUS_HEADER1. + DGUS_HEADER1_SEEN, //< DGUS_HEADER1 received + DGUS_HEADER2_SEEN, //< DGUS_HEADER2 received + DGUS_WAIT_TELEGRAM, //< LEN received, Waiting for to receive all bytes. + }; + + enum dgus_system_addr : uint16_t { + DGUS_VERSION = 0x000f // OS/GUI version + }; + + static void WriteHeader(uint16_t addr, uint8_t command, uint8_t len); + static void ProcessRx(); + + static uint8_t volume; + static uint8_t brightness; + + static rx_datagram_state_t rx_datagram_state; + static uint8_t rx_datagram_len; + + static bool initialized; +}; + +template<> inline uint16_t DGUSDisplay::SwapBytes(const uint16_t value) { + return ((value << 8) | (value >> 8)); +} + +extern DGUSDisplay dgus_display; + +/// Helper to populate a DGUS_VP for a given VP. Return false if not found. +extern bool DGUS_PopulateVP(const DGUS_Addr addr, DGUS_VP * const buffer); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp new file mode 100644 index 000000000000..baae2538a0bf --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp @@ -0,0 +1,1045 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSRxHandler.h" + +#include "DGUSScreenHandler.h" +#include "config/DGUS_Screen.h" + +#include "../ui_api.h" +#include "../../../core/language.h" +#include "../../../module/temperature.h" +#include "../../../module/printcounter.h" +#include "../../../module/stepper.h" +#include "../../../gcode/queue.h" +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #include "../../../feature/pause.h" +#endif +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../feature/powerloss.h" +#endif + +void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) { + const DGUS_Screen screen = (DGUS_Screen)((uint8_t*)data_ptr)[1]; + + if (vp.addr == DGUS_Addr::SCREENCHANGE_SD) { + #if ENABLED(SDSUPPORT) + #if !PIN_EXISTS(SD_DETECT) + card.mount(); + #endif + + if (!ExtUI::isMediaInserted()) { + dgus_screen_handler.SetStatusMessagePGM(GET_TEXT(MSG_NO_MEDIA)); + return; + } + + card.cdroot(); + #else + dgus_screen_handler.SetStatusMessagePGM(GET_TEXT(MSG_NO_MEDIA)); + return; + #endif + } + + if (vp.addr == DGUS_Addr::SCREENCHANGE_Idle + && (ExtUI::isPrinting() || ExtUI::isPrintingPaused())) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("Impossible while printing")); + return; + } + + if (vp.addr == DGUS_Addr::SCREENCHANGE_Printing + && (!ExtUI::isPrinting() && !ExtUI::isPrintingPaused())) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("Impossible while idle")); + return; + } + + dgus_screen_handler.TriggerScreenChange(screen); +} + +#if ENABLED(SDSUPPORT) + void DGUSRxHandler::Scroll(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Scroll scroll = (DGUS_Data::Scroll)((uint8_t*)data_ptr)[1]; + + switch (scroll) { + case DGUS_Data::Scroll::GO_BACK: + if (dgus_screen_handler.filelist.isAtRootDir()) { + return; + } + + dgus_screen_handler.filelist_offset = 0; + dgus_screen_handler.filelist_selected = -1; + dgus_screen_handler.filelist.upDir(); + break; + case DGUS_Data::Scroll::UP: + if (dgus_screen_handler.filelist_offset < 1) { + return; + } + + --dgus_screen_handler.filelist_offset; + break; + case DGUS_Data::Scroll::DOWN: + if (dgus_screen_handler.filelist_offset + 1 + DGUS_FILE_COUNT > dgus_screen_handler.filelist.count()) { + return; + } + + ++dgus_screen_handler.filelist_offset; + break; + } + + dgus_screen_handler.TriggerFullUpdate(); + } + + void DGUSRxHandler::SelectFile(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const uint8_t index = ((uint8_t*)data_ptr)[1]; + + if (!dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_offset + index)) { + return; + } + + if (dgus_screen_handler.filelist.isDir()) { + dgus_screen_handler.filelist_offset = 0; + dgus_screen_handler.filelist_selected = -1; + dgus_screen_handler.filelist.changeDir(dgus_screen_handler.filelist.filename()); + } + else { + dgus_screen_handler.filelist_selected = dgus_screen_handler.filelist_offset + index; + } + + dgus_screen_handler.TriggerFullUpdate(); + } + + void DGUSRxHandler::PrintFile(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + if (dgus_screen_handler.filelist_selected < 0) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("No file selected")); + return; + } + + if (!dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_selected) + || dgus_screen_handler.filelist.isDir()) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + ExtUI::printFile(dgus_screen_handler.filelist.shortFilename()); + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_STATUS); + } +#endif // SDSUPPORT + +void DGUSRxHandler::PrintAbort(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!ExtUI::isPrinting() && !ExtUI::isPrintingPaused()) { + dgus_screen_handler.TriggerFullUpdate(); + return; + } + + ExtUI::stopPrint(); +} + +void DGUSRxHandler::PrintPause(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!ExtUI::isPrinting()) { + dgus_screen_handler.TriggerFullUpdate(); + return; + } + + ExtUI::pausePrint(); +} + +void DGUSRxHandler::PrintResume(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!ExtUI::isPrintingPaused()) { + dgus_screen_handler.TriggerFullUpdate(); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + ExtUI::resumePrint(); +} + +void DGUSRxHandler::Feedrate(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const int16_t feedrate = Swap16(*(int16_t*)data_ptr); + + ExtUI::setFeedrate_percent(feedrate); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::Flowrate(DGUS_VP &vp, void *data_ptr) { + const int16_t flowrate = Swap16(*(int16_t*)data_ptr); + + switch (vp.addr) { + default: return; + case DGUS_Addr::ADJUST_SetFlowrate_CUR: + ExtUI::setFlow_percent(flowrate, TERN(HAS_MULTI_EXTRUDER, ExtUI::getActiveTool(), ExtUI::E0)); + break; + #if HAS_MULTI_EXTRUDER + case DGUS_Addr::ADJUST_SetFlowrate_E0: + ExtUI::setFlow_percent(flowrate, ExtUI::E0); + break; + case DGUS_Addr::ADJUST_SetFlowrate_E1: + ExtUI::setFlow_percent(flowrate, ExtUI::E1); + break; + #endif + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::BabystepSet(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const int16_t data = Swap16(*(int16_t*)data_ptr); + const float offset = dgus_display.FromFixedPoint(data); + + const int16_t steps = ExtUI::mmToWholeSteps(offset - ExtUI::getZOffset_mm(), ExtUI::Z); + + ExtUI::smartAdjustAxis_steps(steps, ExtUI::Z, true); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::Babystep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Adjust adjust = (DGUS_Data::Adjust)((uint8_t*)data_ptr)[1]; + int16_t steps; + + switch (adjust) { + default: return; + case DGUS_Data::Adjust::INCREMENT: + steps = ExtUI::mmToWholeSteps(DGUS_PRINT_BABYSTEP, ExtUI::Z); + break; + case DGUS_Data::Adjust::DECREMENT: + steps = ExtUI::mmToWholeSteps(-DGUS_PRINT_BABYSTEP, ExtUI::Z); + break; + } + + ExtUI::smartAdjustAxis_steps(steps, ExtUI::Z, true); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::TempPreset(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::TempPreset preset = (DGUS_Data::TempPreset)((uint8_t*)data_ptr)[1]; + + switch (preset) { + case DGUS_Data::TempPreset::PLA: + #if HOTENDS < 2 + ExtUI::setTargetTemp_celsius(DGUS_PLA_TEMP_HOTEND, ExtUI::H0); + #else + ExtUI::setTargetTemp_celsius(DGUS_PLA_TEMP_HOTEND, ExtUI::getActiveTool()); + #endif + ExtUI::setTargetTemp_celsius(DGUS_PLA_TEMP_BED, ExtUI::BED); + break; + case DGUS_Data::TempPreset::ABS: + #if HOTENDS < 2 + ExtUI::setTargetTemp_celsius(DGUS_ABS_TEMP_HOTEND, ExtUI::H0); + #else + ExtUI::setTargetTemp_celsius(DGUS_ABS_TEMP_HOTEND, ExtUI::getActiveTool()); + #endif + ExtUI::setTargetTemp_celsius(DGUS_ABS_TEMP_BED, ExtUI::BED); + break; + case DGUS_Data::TempPreset::PETG: + #if HOTENDS < 2 + ExtUI::setTargetTemp_celsius(DGUS_PETG_TEMP_HOTEND, ExtUI::H0); + #else + ExtUI::setTargetTemp_celsius(DGUS_PETG_TEMP_HOTEND, ExtUI::getActiveTool()); + #endif + ExtUI::setTargetTemp_celsius(DGUS_PETG_TEMP_BED, ExtUI::BED); + break; + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::TempTarget(DGUS_VP &vp, void *data_ptr) { + const int16_t temp = Swap16(*(int16_t*)data_ptr); + + switch (vp.addr) { + default: return; + case DGUS_Addr::TEMP_SetTarget_Bed: + ExtUI::setTargetTemp_celsius(temp, ExtUI::BED); + break; + case DGUS_Addr::TEMP_SetTarget_H0: + ExtUI::setTargetTemp_celsius(temp, ExtUI::H0); + break; + #if HOTENDS > 1 + case DGUS_Addr::TEMP_SetTarget_H1: + ExtUI::setTargetTemp_celsius(temp, ExtUI::H1); + break; + #endif + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::TempCool(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Heater heater = (DGUS_Data::Heater)Swap16(*(uint16_t*)data_ptr); + + switch (heater) { + default: return; + case DGUS_Data::Heater::ALL: + ExtUI::setTargetTemp_celsius(0, ExtUI::BED); + ExtUI::setTargetTemp_celsius(0, ExtUI::H0); + #if HOTENDS > 1 + ExtUI::setTargetTemp_celsius(0, ExtUI::H1); + #endif + break; + case DGUS_Data::Heater::BED: + ExtUI::setTargetTemp_celsius(0, ExtUI::BED); + break; + case DGUS_Data::Heater::H0: + ExtUI::setTargetTemp_celsius(0, ExtUI::H0); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + ExtUI::setTargetTemp_celsius(0, ExtUI::H1); + break; + #endif + } + + dgus_screen_handler.SetStatusMessagePGM(PSTR("Cooling...")); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::Steppers(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Control control = (DGUS_Data::Control)((uint8_t*)data_ptr)[1]; + + switch (control) { + case DGUS_Data::Control::ENABLE: + stepper.enable_all_steppers(); + break; + case DGUS_Data::Control::DISABLE: + stepper.disable_all_steppers(); + break; + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::ZOffset(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!ExtUI::isAxisPositionKnown(ExtUI::Z)) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + const int16_t data = Swap16(*(int16_t*)data_ptr); + const float offset = dgus_display.FromFixedPoint(data); + + const int16_t steps = ExtUI::mmToWholeSteps(offset - ExtUI::getZOffset_mm(), ExtUI::Z); + + ExtUI::smartAdjustAxis_steps(steps, ExtUI::Z, true); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::ZOffsetStep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!ExtUI::isAxisPositionKnown(ExtUI::Z)) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + const DGUS_Data::Adjust adjust = (DGUS_Data::Adjust)((uint8_t*)data_ptr)[1]; + int16_t steps; + + switch (dgus_screen_handler.offset_steps) { + default: return; + case DGUS_Data::StepSize::MMP1: + steps = ExtUI::mmToWholeSteps((adjust == DGUS_Data::Adjust::INCREMENT ? 0.1f : -0.1f), ExtUI::Z); + break; + case DGUS_Data::StepSize::MMP01: + steps = ExtUI::mmToWholeSteps((adjust == DGUS_Data::Adjust::INCREMENT ? 0.01f : -0.01f), ExtUI::Z); + break; + } + + ExtUI::smartAdjustAxis_steps(steps, ExtUI::Z, true); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::ZOffsetSetStep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::StepSize size = (DGUS_Data::StepSize)((uint8_t*)data_ptr)[1]; + + dgus_screen_handler.offset_steps = size; + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::MoveToPoint(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!ExtUI::isPositionKnown()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + const uint8_t point = ((uint8_t*)data_ptr)[1]; + constexpr float lfrb[4] = LEVEL_CORNERS_INSET_LFRB; + float x, y; + + switch (point) { + default: return; + case 1: + x = DGUS_LEVEL_CENTER_X; + y = DGUS_LEVEL_CENTER_Y; + break; + case 2: + x = X_MIN_POS + lfrb[0]; + y = Y_MIN_POS + lfrb[1]; + break; + case 3: + x = X_MAX_POS - lfrb[2]; + y = Y_MIN_POS + lfrb[1]; + break; + case 4: + x = X_MAX_POS - lfrb[2]; + y = Y_MAX_POS - lfrb[3]; + break; + case 5: + x = X_MIN_POS + lfrb[0]; + y = Y_MAX_POS - lfrb[3]; + break; + } + + if (ExtUI::getAxisPosition_mm(ExtUI::Z) < Z_MIN_POS + LEVEL_CORNERS_Z_HOP) { + ExtUI::setAxisPosition_mm(Z_MIN_POS + LEVEL_CORNERS_Z_HOP, ExtUI::Z); + } + ExtUI::setAxisPosition_mm(x, ExtUI::X); + ExtUI::setAxisPosition_mm(y, ExtUI::Y); + ExtUI::setAxisPosition_mm(Z_MIN_POS + LEVEL_CORNERS_HEIGHT, ExtUI::Z); +} + +void DGUSRxHandler::Probe(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + #if ENABLED(MESH_BED_LEVELING) + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_ABL_REQUIRED); + return; + #endif + + if (!ExtUI::isPositionKnown()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::LEVELING_PROBING); + + #if ENABLED(AUTO_BED_LEVELING_UBL) + queue.enqueue_now_P(PSTR("G29P1\nG29P3\nG29P5C")); + #else + queue.enqueue_now_P(PSTR("G29")); + #endif + queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE); +} + +void DGUSRxHandler::DisableABL(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + ExtUI::setLevelingActive(false); + + dgus_screen_handler.TriggerEEPROMSave(); + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::FilamentSelect(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Extruder extruder = (DGUS_Data::Extruder)Swap16(*(uint16_t*)data_ptr); + + switch (extruder) { + default: return; + case DGUS_Data::Extruder::CURRENT: + case DGUS_Data::Extruder::E0: + E_TERN_(case DGUS_Data::Extruder::E1:) + dgus_screen_handler.filament_extruder = extruder; + break; + } + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::FilamentLength(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const uint16_t length = Swap16(*(uint16_t*)data_ptr); + + dgus_screen_handler.filament_length = constrain(length, 0, EXTRUDE_MAXLENGTH); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::FilamentMove(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + ExtUI::extruder_t extruder; + + switch (dgus_screen_handler.filament_extruder) { + default: return; + case DGUS_Data::Extruder::CURRENT: + #if HAS_MULTI_EXTRUDER + extruder = ExtUI::getActiveTool(); + break; + #endif + case DGUS_Data::Extruder::E0: + extruder = ExtUI::E0; + break; + #if HAS_MULTI_EXTRUDER + case DGUS_Data::Extruder::E1: + extruder = ExtUI::E1; + break; + #endif + } + + if (ExtUI::getActualTemp_celsius(extruder) < (float)EXTRUDE_MINTEMP) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("Temperature too low")); + return; + } + + const DGUS_Data::FilamentMove move = (DGUS_Data::FilamentMove)((uint8_t*)data_ptr)[1]; + + switch (move) { + case DGUS_Data::FilamentMove::RETRACT: + UI_DECREMENT_BY(AxisPosition_mm, (float)dgus_screen_handler.filament_length, extruder); + break; + case DGUS_Data::FilamentMove::EXTRUDE: + UI_INCREMENT_BY(AxisPosition_mm, (float)dgus_screen_handler.filament_length, extruder); + break; + } +} + +void DGUSRxHandler::Home(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + DGUS_Data::Axis axis = (DGUS_Data::Axis)((uint8_t*)data_ptr)[1]; + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(DGUS_MSG_HOMING, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(dgus_screen_handler.GetCurrentScreen()); + + switch (axis) { + case DGUS_Data::Axis::X_Y_Z: + queue.enqueue_now_P(PSTR("G28XYZ")); + break; + case DGUS_Data::Axis::X_Y: + queue.enqueue_now_P(PSTR("G28XY")); + break; + case DGUS_Data::Axis::Z: + queue.enqueue_now_P(PSTR("G28Z")); + break; + } +} + +void DGUSRxHandler::Move(DGUS_VP &vp, void *data_ptr) { + const int16_t data = Swap16(*(int16_t*)data_ptr); + const float position = dgus_display.FromFixedPoint(data); + ExtUI::axis_t axis; + + switch (vp.addr) { + default: return; + case DGUS_Addr::MOVE_SetX: + axis = ExtUI::X; + break; + case DGUS_Addr::MOVE_SetY: + axis = ExtUI::Y; + break; + case DGUS_Addr::MOVE_SetZ: + axis = ExtUI::Z; + break; + } + + if (!ExtUI::isAxisPositionKnown(axis)) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + ExtUI::setAxisPosition_mm(position, axis); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::MoveStep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + float offset; + + switch (dgus_screen_handler.move_steps) { + default: return; + case DGUS_Data::StepSize::MM10: + offset = 10.0f; + break; + case DGUS_Data::StepSize::MM1: + offset = 1.0f; + break; + case DGUS_Data::StepSize::MMP1: + offset = 0.1f; + break; + } + + const DGUS_Data::MoveDirection direction = (DGUS_Data::MoveDirection)((uint8_t*)data_ptr)[1]; + ExtUI::axis_t axis; + + switch (direction) { + default: return; + case DGUS_Data::MoveDirection::XP: + axis = ExtUI::X; + break; + case DGUS_Data::MoveDirection::XM: + axis = ExtUI::X; + offset = -offset; + break; + case DGUS_Data::MoveDirection::YP: + axis = ExtUI::Y; + break; + case DGUS_Data::MoveDirection::YM: + axis = ExtUI::Y; + offset = -offset; + break; + case DGUS_Data::MoveDirection::ZP: + axis = ExtUI::Z; + break; + case DGUS_Data::MoveDirection::ZM: + axis = ExtUI::Z; + offset = -offset; + break; + } + + if (!ExtUI::isAxisPositionKnown(axis)) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + return; + } + + UI_INCREMENT_BY(AxisPosition_mm, offset, axis); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::MoveSetStep(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::StepSize size = (DGUS_Data::StepSize)((uint8_t*)data_ptr)[1]; + + dgus_screen_handler.move_steps = size; + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::GcodeClear(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + ZERO(dgus_screen_handler.gcode); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::GcodeExecute(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + if (!strlen(dgus_screen_handler.gcode)) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(PSTR("Executing command..."), 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::GCODE); + + queue.enqueue_one_now(dgus_screen_handler.gcode); +} + +void DGUSRxHandler::ResetEEPROM(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + queue.enqueue_now_P(PSTR("M502")); + queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE); +} + +void DGUSRxHandler::SettingsExtra(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Extra extra = (DGUS_Data::Extra)((uint8_t*)data_ptr)[1]; + + switch (extra) { + default: return; + case DGUS_Data::Extra::BUTTON1: + #if ENABLED(BLTOUCH) + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + queue.enqueue_now_P(PSTR(DGUS_RESET_BLTOUCH)); + #else + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::INFOS); + #endif + break; + #if ENABLED(BLTOUCH) + case DGUS_Data::Extra::BUTTON2: + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::INFOS); + break; + #endif + } +} + +void DGUSRxHandler::PIDSelect(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Heater heater = (DGUS_Data::Heater)Swap16(*(uint16_t*)data_ptr); + + switch (heater) { + default: return; + case DGUS_Data::Heater::BED: + dgus_screen_handler.pid_temp = DGUS_PLA_TEMP_BED; + dgus_screen_handler.pid_heater = heater; + break; + case DGUS_Data::Heater::H0: + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + #endif + dgus_screen_handler.pid_temp = DGUS_PLA_TEMP_HOTEND; + dgus_screen_handler.pid_heater = heater; + break; + } + + dgus_screen_handler.pid_cycles = 5; + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::PIDSetTemp(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + uint16_t temp = Swap16(*(uint16_t*)data_ptr); + + switch (dgus_screen_handler.pid_heater) { + default: return; + case DGUS_Data::Heater::BED: + temp = constrain(temp, BED_MINTEMP, BED_MAX_TARGET); + break; + case DGUS_Data::Heater::H0: + temp = constrain(temp, HEATER_0_MINTEMP, (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT)); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + temp = constrain(temp, HEATER_1_MINTEMP, (HEATER_1_MAXTEMP - HOTEND_OVERSHOOT)); + break; + #endif + } + + dgus_screen_handler.pid_temp = temp; + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + heater_id_t heater; + uint8_t cycles = constrain(dgus_screen_handler.pid_cycles, 3, 10); + + switch (dgus_screen_handler.pid_heater) { + default: return; + case DGUS_Data::Heater::BED: + #if ENABLED(PIDTEMPBED) + heater = H_BED; + break; + #else + dgus_screen_handler.SetStatusMessagePGM(PSTR("Bed PID disabled")); + return; + #endif + case DGUS_Data::Heater::H0: + #if ENABLED(PIDTEMP) + heater = H_E0; + break; + #else + dgus_screen_handler.SetStatusMessagePGM(PSTR("PID disabled")); + return; + #endif + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + #if ENABLED(PIDTEMP) + heater = H_E1; + break; + #else + dgus_screen_handler.SetStatusMessagePGM(PSTR("PID disabled")); + return; + #endif + #endif + } + + char buffer[24]; + snprintf_P(buffer, sizeof(buffer), PSTR("M303C%dE%dS%dU1"), cycles, heater, dgus_screen_handler.pid_temp); + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(PSTR("PID autotuning..."), 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::PID); + + queue.enqueue_one_now(buffer); + queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE); +} + +#if ENABLED(POWER_LOSS_RECOVERY) + void DGUSRxHandler::PowerLossAbort(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::HOME); + + queue.enqueue_now_P(PSTR("M1000C")); + } + + void DGUSRxHandler::PowerLossResume(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return; + } + + if (!recovery.valid()) { + dgus_screen_handler.SetStatusMessagePGM(PSTR("Invalid recovery data")); + return; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_STATUS); + + queue.enqueue_now_P(PSTR("M1000")); + } +#endif // POWER_LOSS_RECOVERY + +void DGUSRxHandler::WaitAbort(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + const DGUS_Data::Popup result = (DGUS_Data::Popup)((uint8_t*)data_ptr)[1]; + + if (result != DGUS_Data::Popup::CONFIRMED) { + return; + } + + if (!ExtUI::isPrintingPaused()) { + dgus_screen_handler.TriggerFullUpdate(); + return; + } + + ExtUI::stopPrint(); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::WaitContinue(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + ExtUI::setUserConfirmed(); + + dgus_screen_handler.TriggerFullUpdate(); +} + +void DGUSRxHandler::FanSpeed(DGUS_VP &vp, void *data_ptr) { + uint8_t speed = ((uint8_t*)data_ptr)[1]; + switch (vp.addr) { + default: return; + case DGUS_Addr::FAN0_Speed: + ExtUI::setTargetFan_percent(speed, ExtUI::FAN0); + break; + } +} + +void DGUSRxHandler::Volume(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + uint8_t volume = ((uint8_t*)data_ptr)[1]; + dgus_display.SetVolume(volume); + + dgus_screen_handler.TriggerEEPROMSave(); +} + +void DGUSRxHandler::Brightness(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + + uint8_t brightness = ((uint8_t*)data_ptr)[1]; + dgus_display.SetBrightness(brightness); + + dgus_screen_handler.TriggerEEPROMSave(); +} + +void DGUSRxHandler::Debug(DGUS_VP &vp, void *data_ptr) { + UNUSED(vp); + UNUSED(data_ptr); + + ++dgus_screen_handler.debug_count; + + if (dgus_screen_handler.debug_count >= 10) { + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::DEBUG); + } +} + +void DGUSRxHandler::StringToExtra(DGUS_VP &vp, void *data_ptr) { + if (!vp.size || !vp.extra) return; + memcpy(vp.extra, data_ptr, vp.size); +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h new file mode 100644 index 000000000000..c2e6e4308e5a --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.h @@ -0,0 +1,122 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "DGUSDisplay.h" +#include "definition/DGUS_VP.h" + +namespace DGUSRxHandler { + + void ScreenChange(DGUS_VP &, void *); + + #if ENABLED(SDSUPPORT) + void Scroll(DGUS_VP &, void *); + void SelectFile(DGUS_VP &, void *); + void PrintFile(DGUS_VP &, void *); + #endif + + void PrintAbort(DGUS_VP &, void *); + void PrintPause(DGUS_VP &, void *); + void PrintResume(DGUS_VP &, void *); + + void Feedrate(DGUS_VP &, void *); + void Flowrate(DGUS_VP &, void *); + void BabystepSet(DGUS_VP &, void *); + void Babystep(DGUS_VP &, void *); + + void TempPreset(DGUS_VP &, void *); + void TempTarget(DGUS_VP &, void *); + void TempCool(DGUS_VP &, void *); + + void Steppers(DGUS_VP &, void *); + + void ZOffset(DGUS_VP &, void *); + void ZOffsetStep(DGUS_VP &, void *); + void ZOffsetSetStep(DGUS_VP &, void *); + + void MoveToPoint(DGUS_VP &, void *); + + void Probe(DGUS_VP &, void *); + void DisableABL(DGUS_VP &, void *); + + void FilamentSelect(DGUS_VP &, void *); + void FilamentLength(DGUS_VP &, void *); + void FilamentMove(DGUS_VP &, void *); + + void Home(DGUS_VP &, void *); + void Move(DGUS_VP &, void *); + void MoveStep(DGUS_VP &, void *); + void MoveSetStep(DGUS_VP &, void *); + + void GcodeClear(DGUS_VP &, void *); + void GcodeExecute(DGUS_VP &, void *); + + void ResetEEPROM(DGUS_VP &, void *); + + void SettingsExtra(DGUS_VP &, void *); + + void PIDSelect(DGUS_VP &, void *); + void PIDSetTemp(DGUS_VP &, void *); + void PIDRun(DGUS_VP &, void *); + + #if ENABLED(POWER_LOSS_RECOVERY) + void PowerLossAbort(DGUS_VP &, void *); + void PowerLossResume(DGUS_VP &, void *); + #endif + + void WaitAbort(DGUS_VP &, void *); + void WaitContinue(DGUS_VP &, void *); + + void FanSpeed(DGUS_VP &, void *); + + void Volume(DGUS_VP &, void *); + + void Brightness(DGUS_VP &, void *); + + void Debug(DGUS_VP &, void *); + + void StringToExtra(DGUS_VP &, void *); + + template + void IntegerToExtra(DGUS_VP &vp, void *data_ptr) { + if (!vp.size || !vp.extra) return; + switch (vp.size) { + default: return; + case 1: { + const uint8_t data = *(uint8_t*)data_ptr; + *(T*)vp.extra = (T)data; + break; + } + case 2: { + const uint16_t data = Swap16(*(uint16_t*)data_ptr); + *(T*)vp.extra = (T)data; + break; + } + case 4: { + const uint32_t data = dgus_display.SwapBytes(*(uint32_t*)data_ptr); + *(T*)vp.extra = (T)data; + break; + } + } + } + +} diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp new file mode 100644 index 000000000000..02cc3d68363b --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -0,0 +1,540 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSScreenHandler.h" + +#include "DGUSDisplay.h" +#include "definition/DGUS_ScreenAddrList.h" +#include "definition/DGUS_ScreenSetup.h" + +#include "../../../gcode/queue.h" + +uint8_t DGUSScreenHandler::debug_count = 0; + +#if ENABLED(SDSUPPORT) + ExtUI::FileList DGUSScreenHandler::filelist; + uint16_t DGUSScreenHandler::filelist_offset = 0; + int16_t DGUSScreenHandler::filelist_selected = -1; +#endif + +DGUS_Data::StepSize DGUSScreenHandler::offset_steps = DGUS_Data::StepSize::MMP1; +DGUS_Data::StepSize DGUSScreenHandler::move_steps = DGUS_Data::StepSize::MM10; + +uint16_t DGUSScreenHandler::probing_icons[] = { 0, 0 }; + +DGUS_Data::Extruder DGUSScreenHandler::filament_extruder = DGUS_Data::Extruder::CURRENT; +uint16_t DGUSScreenHandler::filament_length = DGUS_DEFAULT_FILAMENT_LEN; + +char DGUSScreenHandler::gcode[] = ""; + +DGUS_Data::Heater DGUSScreenHandler::pid_heater = DGUS_Data::Heater::H0; +uint16_t DGUSScreenHandler::pid_temp = DGUS_PLA_TEMP_HOTEND; +uint8_t DGUSScreenHandler::pid_cycles = 5; + +bool DGUSScreenHandler::settings_ready = false; +bool DGUSScreenHandler::booted = false; + +DGUS_Screen DGUSScreenHandler::current_screen = DGUS_Screen::BOOT; +DGUS_Screen DGUSScreenHandler::new_screen = DGUS_Screen::BOOT; +bool DGUSScreenHandler::full_update = false; + +DGUS_Screen DGUSScreenHandler::wait_return_screen = DGUS_Screen::HOME; +bool DGUSScreenHandler::wait_continue = false; + +bool DGUSScreenHandler::leveling_active = false; + +millis_t DGUSScreenHandler::status_expire = 0; +millis_t DGUSScreenHandler::eeprom_save = 0; + +const char DGUS_MSG_HOMING_REQUIRED[] PROGMEM = "Homing required", + DGUS_MSG_BUSY[] PROGMEM = "Busy", + DGUS_MSG_UNDEF[] PROGMEM = "-", + DGUS_MSG_HOMING[] PROGMEM = "Homing...", + DGUS_MSG_FW_OUTDATED[] PROGMEM = "DWIN GUI/OS update required", + DGUS_MSG_ABL_REQUIRED[] PROGMEM = "Auto bed leveling required"; + +const char DGUS_CMD_HOME[] PROGMEM = "G28", + DGUS_CMD_EEPROM_SAVE[] PROGMEM = "M500"; + +void DGUSScreenHandler::Init() { + dgus_display.Init(); + + MoveToScreen(DGUS_Screen::BOOT, true); +} + +void DGUSScreenHandler::Ready() { + dgus_display.PlaySound(1); +} + +void DGUSScreenHandler::Loop() { + if (!settings_ready || current_screen == DGUS_Screen::KILL) { + return; + } + + const millis_t ms = ExtUI::safe_millis(); + static millis_t next_event_ms = 0; + + if (new_screen != DGUS_Screen::BOOT) { + const DGUS_Screen screen = new_screen; + new_screen = DGUS_Screen::BOOT; + + if (current_screen == screen) { + TriggerFullUpdate(); + } + else { + MoveToScreen(screen); + } + return; + } + + if (!booted && ELAPSED(ms, 3000)) { + booted = true; + + if (current_screen == DGUS_Screen::BOOT) { + MoveToScreen(DGUS_Screen::HOME); + } + return; + } + + if (ELAPSED(ms, next_event_ms) || full_update) { + next_event_ms = ms + DGUS_UPDATE_INTERVAL_MS; + + if (!SendScreenVPData(current_screen, full_update)) { + DEBUG_ECHOLNPGM("SendScreenVPData failed"); + } + return; + } + + if (current_screen == DGUS_Screen::WAIT + && ((wait_continue && !wait_for_user) + || (!wait_continue && IsPrinterIdle()))) { + MoveToScreen(wait_return_screen, true); + return; + } + + if (current_screen == DGUS_Screen::LEVELING_PROBING + && IsPrinterIdle()) { + dgus_display.PlaySound(3); + + SetStatusMessagePGM(ExtUI::getMeshValid() ? + PSTR("Probing successful") + : PSTR("Probing failed")); + + MoveToScreen(DGUS_Screen::LEVELING_AUTOMATIC); + return; + } + + if (status_expire > 0 && ELAPSED(ms, status_expire)) { + SetStatusMessagePGM(NUL_STR, 0); + return; + } + + if (eeprom_save > 0 && ELAPSED(ms, eeprom_save) && IsPrinterIdle()) { + eeprom_save = 0; + + queue.enqueue_now_P(DGUS_CMD_EEPROM_SAVE); + return; + } + + dgus_display.Loop(); +} + +void DGUSScreenHandler::PrinterKilled(PGM_P error, PGM_P component) { + SetMessageLinePGM(error, 1); + SetMessageLinePGM(component, 2); + SetMessageLinePGM(NUL_STR, 3); + SetMessageLinePGM(GET_TEXT(MSG_PLEASE_RESET), 4); + + dgus_display.PlaySound(3, 1, 200); + + MoveToScreen(DGUS_Screen::KILL, true); +} + +void DGUSScreenHandler::UserConfirmRequired(const char * const msg) { + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLine(msg, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + + dgus_display.PlaySound(3); + + dgus_screen_handler.ShowWaitScreen(current_screen, true); +} + +void DGUSScreenHandler::SettingsReset() { + dgus_display.SetVolume(DGUS_DEFAULT_VOLUME); + dgus_display.SetBrightness(DGUS_DEFAULT_BRIGHTNESS); + + if (!settings_ready) { + settings_ready = true; + + Ready(); + } + + SetStatusMessagePGM(PSTR("EEPROM reset")); +} + +void DGUSScreenHandler::StoreSettings(char *buff) { + eeprom_data_t data; + + static_assert(sizeof(data) <= ExtUI::eeprom_data_size, "sizeof(eeprom_data_t) > eeprom_data_size."); + + data.initialized = true; + data.volume = dgus_display.GetVolume(); + data.brightness = dgus_display.GetBrightness(); + data.abl = (ExtUI::getLevelingActive() && ExtUI::getMeshValid()); + + memcpy(buff, &data, sizeof(data)); +} + +void DGUSScreenHandler::LoadSettings(const char *buff) { + eeprom_data_t data; + + static_assert(sizeof(data) <= ExtUI::eeprom_data_size, "sizeof(eeprom_data_t) > eeprom_data_size."); + + memcpy(&data, buff, sizeof(data)); + + dgus_display.SetVolume(data.initialized ? data.volume : DGUS_DEFAULT_VOLUME); + dgus_display.SetBrightness(data.initialized ? data.brightness : DGUS_DEFAULT_BRIGHTNESS); + + if (data.initialized) { + leveling_active = (data.abl && ExtUI::getMeshValid()); + + ExtUI::setLevelingActive(leveling_active); + } +} + +void DGUSScreenHandler::ConfigurationStoreWritten(bool success) { + if (!success) { + SetStatusMessagePGM(PSTR("EEPROM write failed")); + } +} + +void DGUSScreenHandler::ConfigurationStoreRead(bool success) { + if (!success) { + SetStatusMessagePGM(PSTR("EEPROM read failed")); + } + else if (!settings_ready) { + settings_ready = true; + + Ready(); + } +} + +void DGUSScreenHandler::PlayTone(const uint16_t frequency, const uint16_t duration) { + UNUSED(duration); + + if (frequency >= 1 && frequency <= 255) { + if (duration >= 1 && duration <= 255) { + dgus_display.PlaySound((uint8_t)frequency, (uint8_t)duration); + } + else { + dgus_display.PlaySound((uint8_t)frequency); + } + } +} + +void DGUSScreenHandler::MeshUpdate(const int8_t xpos, const int8_t ypos) { + if (current_screen != DGUS_Screen::LEVELING_PROBING) { + if (current_screen == DGUS_Screen::LEVELING_AUTOMATIC) { + TriggerFullUpdate(); + } + + return; + } + + uint8_t point = ypos * GRID_MAX_POINTS_X + xpos; + probing_icons[point < 16 ? 0 : 1] |= (1U << (point % 16)); + + if (xpos >= GRID_MAX_POINTS_X - 1 + && ypos >= GRID_MAX_POINTS_Y - 1 + && !ExtUI::getMeshValid()) { + probing_icons[0] = 0; + probing_icons[1] = 0; + } + + TriggerFullUpdate(); +} + +void DGUSScreenHandler::PrintTimerStarted() { + TriggerScreenChange(DGUS_Screen::PRINT_STATUS); +} + +void DGUSScreenHandler::PrintTimerPaused() { + dgus_display.PlaySound(3); + + TriggerFullUpdate(); +} + +void DGUSScreenHandler::PrintTimerStopped() { + if (current_screen != DGUS_Screen::PRINT_STATUS + && current_screen != DGUS_Screen::PRINT_ADJUST) { + return; + } + + dgus_display.PlaySound(3); + + TriggerScreenChange(DGUS_Screen::PRINT_FINISHED); +} + +void DGUSScreenHandler::FilamentRunout(const ExtUI::extruder_t extruder) { + char buffer[21]; + snprintf_P(buffer, sizeof(buffer), PSTR("Filament runout E%d"), extruder); + + SetStatusMessage(buffer); + + dgus_display.PlaySound(3); +} + +#if ENABLED(SDSUPPORT) + + void DGUSScreenHandler::SDCardInserted() { + if (current_screen == DGUS_Screen::HOME) { + TriggerScreenChange(DGUS_Screen::PRINT); + } + } + + void DGUSScreenHandler::SDCardRemoved() { + if (current_screen == DGUS_Screen::PRINT) { + TriggerScreenChange(DGUS_Screen::HOME); + } + } + + void DGUSScreenHandler::SDCardError() { + SetStatusMessagePGM(GET_TEXT(MSG_MEDIA_READ_ERROR)); + + if (current_screen == DGUS_Screen::PRINT) { + TriggerScreenChange(DGUS_Screen::HOME); + } + } + +#endif // SDSUPPORT + +#if ENABLED(POWER_LOSS_RECOVERY) + + void DGUSScreenHandler::PowerLossResume() { + MoveToScreen(DGUS_Screen::POWERLOSS, true); + } + +#endif // POWER_LOSS_RECOVERY + +#if HAS_PID_HEATING + + void DGUSScreenHandler::PidTuning(const ExtUI::result_t rst) { + switch (rst) { + case ExtUI::PID_STARTED: + SetStatusMessagePGM(GET_TEXT(MSG_PID_AUTOTUNE)); + break; + case ExtUI::PID_BAD_EXTRUDER_NUM: + SetStatusMessagePGM(GET_TEXT(MSG_PID_BAD_EXTRUDER_NUM)); + break; + case ExtUI::PID_TEMP_TOO_HIGH: + SetStatusMessagePGM(GET_TEXT(MSG_PID_TEMP_TOO_HIGH)); + break; + case ExtUI::PID_TUNING_TIMEOUT: + SetStatusMessagePGM(GET_TEXT(MSG_PID_TIMEOUT)); + break; + case ExtUI::PID_DONE: + SetStatusMessagePGM(GET_TEXT(MSG_PID_AUTOTUNE_DONE)); + break; + default: + return; + } + + dgus_display.PlaySound(3); + } + +#endif // HAS_PID_HEATING + +void DGUSScreenHandler::SetMessageLine(const char* msg, uint8_t line) { + switch (line) { + default: return; + case 1: + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Line1, msg, DGUS_LINE_LEN, true, true); + break; + case 2: + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Line2, msg, DGUS_LINE_LEN, true, true); + break; + case 3: + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Line3, msg, DGUS_LINE_LEN, true, true); + break; + case 4: + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Line4, msg, DGUS_LINE_LEN, true, true); + break; + } +} + +void DGUSScreenHandler::SetMessageLinePGM(PGM_P msg, uint8_t line) { + switch (line) { + default: return; + case 1: + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Line1, msg, DGUS_LINE_LEN, true, true); + break; + case 2: + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Line2, msg, DGUS_LINE_LEN, true, true); + break; + case 3: + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Line3, msg, DGUS_LINE_LEN, true, true); + break; + case 4: + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Line4, msg, DGUS_LINE_LEN, true, true); + break; + } +} + +void DGUSScreenHandler::SetStatusMessage(const char* msg, const millis_t duration) { + dgus_display.WriteString((uint16_t)DGUS_Addr::MESSAGE_Status, msg, DGUS_STATUS_LEN, false, true); + + status_expire = (duration > 0 ? ExtUI::safe_millis() + duration : 0); +} + +void DGUSScreenHandler::SetStatusMessagePGM(PGM_P msg, const millis_t duration) { + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Status, msg, DGUS_STATUS_LEN, false, true); + + status_expire = (duration > 0 ? ExtUI::safe_millis() + duration : 0); +} + +void DGUSScreenHandler::ShowWaitScreen(DGUS_Screen return_screen, bool has_continue) { + if (return_screen != DGUS_Screen::WAIT) { + wait_return_screen = return_screen; + } + wait_continue = has_continue; + + TriggerScreenChange(DGUS_Screen::WAIT); +} + +DGUS_Screen DGUSScreenHandler::GetCurrentScreen() { + return current_screen; +} + +void DGUSScreenHandler::TriggerScreenChange(DGUS_Screen screen) { + new_screen = screen; +} + +void DGUSScreenHandler::TriggerFullUpdate() { + full_update = true; +} + +void DGUSScreenHandler::TriggerEEPROMSave() { + eeprom_save = ExtUI::safe_millis() + 500; +} + +bool DGUSScreenHandler::IsPrinterIdle() { + return (!ExtUI::commandsInQueue() + && !ExtUI::isMoving()); +} + +const DGUS_Addr* DGUSScreenHandler::FindScreenAddrList(DGUS_Screen screen) { + DGUS_ScreenAddrList list; + const DGUS_ScreenAddrList *map = screen_addr_list_map; + + do { + memcpy_P(&list, map, sizeof(*map)); + if (!list.addr_list) break; + if (list.screen == screen) { + return list.addr_list; + } + } while (++map); + + return nullptr; +} + +bool DGUSScreenHandler::CallScreenSetup(DGUS_Screen screen) { + DGUS_ScreenSetup setup; + const DGUS_ScreenSetup *list = screen_setup_list; + + do { + memcpy_P(&setup, list, sizeof(*list)); + if (!setup.setup_fn) break; + if (setup.screen == screen) { + return setup.setup_fn(); + } + } while (++list); + + return true; +} + +void DGUSScreenHandler::MoveToScreen(DGUS_Screen screen, bool abort_wait) { + if (current_screen == DGUS_Screen::KILL) { + return; + } + + if (current_screen == DGUS_Screen::WAIT) { + if (screen != DGUS_Screen::WAIT) { + wait_return_screen = screen; + } + + if (!abort_wait) return; + + if (wait_continue && wait_for_user) { + ExtUI::setUserConfirmed(); + } + } + + if (!CallScreenSetup(screen)) return; + + if (!SendScreenVPData(screen, true)) { + DEBUG_ECHOLNPGM("SendScreenVPData failed"); + return; + } + + current_screen = screen; + dgus_display.SwitchScreen(current_screen); +} + +bool DGUSScreenHandler::SendScreenVPData(DGUS_Screen screen, bool complete_update) { + if (complete_update) { + full_update = false; + } + + const DGUS_Addr *list = FindScreenAddrList(screen); + + while (true) { + if (!list) return true; // Nothing left to send + + const uint16_t addr = pgm_read_word(list++); + if (!addr) return true; // Nothing left to send + + DGUS_VP vp; + if (!DGUS_PopulateVP((DGUS_Addr)addr, &vp)) continue; // Invalid VP + if (!vp.tx_handler) continue; // Nothing to send + if (!complete_update && !(vp.flags & VPFLAG_AUTOUPLOAD)) continue; // Unnecessary VP + + uint8_t expected_tx = 6 + vp.size; // 6 bytes header + payload. + const millis_t try_until = ExtUI::safe_millis() + 1000; + + while (expected_tx > dgus_display.GetFreeTxBuffer()) { + if (ELAPSED(ExtUI::safe_millis(), try_until)) return false; // Stop trying after 1 second + + dgus_display.FlushTx(); // Flush the TX buffer + delay(50); + } + + vp.tx_handler(vp); + } +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h new file mode 100644 index 000000000000..0c5e0662128a --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h @@ -0,0 +1,151 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "config/DGUS_Addr.h" +#include "config/DGUS_Data.h" +#include "config/DGUS_Screen.h" +#include "config/DGUS_Constants.h" + +#include "../ui_api.h" +#include "../../../inc/MarlinConfigPre.h" + +class DGUSScreenHandler { +public: + DGUSScreenHandler() = default; + + static void Init(); + static void Ready(); + static void Loop(); + + static void PrinterKilled(PGM_P error, PGM_P component); + static void UserConfirmRequired(const char * const msg); + static void SettingsReset(); + static void StoreSettings(char *buff); + static void LoadSettings(const char *buff); + static void ConfigurationStoreWritten(bool success); + static void ConfigurationStoreRead(bool success); + + static void PlayTone(const uint16_t frequency, const uint16_t duration); + static void MeshUpdate(const int8_t xpos, const int8_t ypos); + static void PrintTimerStarted(); + static void PrintTimerPaused(); + static void PrintTimerStopped(); + static void FilamentRunout(const ExtUI::extruder_t extruder); + + #if ENABLED(SDSUPPORT) + /// Marlin informed us that a new SD has been inserted. + static void SDCardInserted(); + /// Marlin informed us that the SD Card has been removed(). + static void SDCardRemoved(); + /// Marlin informed us about a bad SD Card. + static void SDCardError(); + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + static void PowerLossResume(); + #endif + + #if HAS_PID_HEATING + static void PidTuning(const ExtUI::result_t rst); + #endif + + static void SetMessageLine(const char* msg, uint8_t line); + static void SetMessageLinePGM(PGM_P msg, uint8_t line); + + static void SetStatusMessage(const char* msg, const millis_t duration = DGUS_STATUS_EXPIRATION_MS); + static void SetStatusMessagePGM(PGM_P msg, const millis_t duration = DGUS_STATUS_EXPIRATION_MS); + + static void ShowWaitScreen(DGUS_Screen return_screen, bool has_continue = false); + + static DGUS_Screen GetCurrentScreen(); + static void TriggerScreenChange(DGUS_Screen screen); + static void TriggerFullUpdate(); + + static void TriggerEEPROMSave(); + + static bool IsPrinterIdle(); + + static uint8_t debug_count; + + #if ENABLED(SDSUPPORT) + static ExtUI::FileList filelist; + static uint16_t filelist_offset; + static int16_t filelist_selected; + #endif + + static DGUS_Data::StepSize offset_steps; + static DGUS_Data::StepSize move_steps; + + static uint16_t probing_icons[2]; + + static DGUS_Data::Extruder filament_extruder; + static uint16_t filament_length; + + static char gcode[DGUS_GCODE_LEN + 1]; + + static DGUS_Data::Heater pid_heater; + static uint16_t pid_temp; + static uint8_t pid_cycles; + + static bool wait_continue; + + static bool leveling_active; + +private: + static const DGUS_Addr* FindScreenAddrList(DGUS_Screen screen); + static bool CallScreenSetup(DGUS_Screen screen); + + static void MoveToScreen(DGUS_Screen screen, bool abort_wait = false); + static bool SendScreenVPData(DGUS_Screen screen, bool complete_update); + + static bool settings_ready; + static bool booted; + + static DGUS_Screen current_screen; + static DGUS_Screen new_screen; + static bool full_update; + + static DGUS_Screen wait_return_screen; + + static millis_t status_expire; + static millis_t eeprom_save; + + typedef struct { + bool initialized; + uint8_t volume; + uint8_t brightness; + bool abl; + } eeprom_data_t; +}; + +extern DGUSScreenHandler dgus_screen_handler; + +extern const char DGUS_MSG_HOMING_REQUIRED[], + DGUS_MSG_BUSY[], + DGUS_MSG_UNDEF[], + DGUS_MSG_HOMING[], + DGUS_MSG_FW_OUTDATED[], + DGUS_MSG_ABL_REQUIRED[]; + +extern const char DGUS_CMD_HOME[], + DGUS_CMD_EEPROM_SAVE[]; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp new file mode 100644 index 000000000000..48bea1cdc007 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp @@ -0,0 +1,209 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSSetupHandler.h" + +#include "DGUSDisplay.h" +#include "DGUSScreenHandler.h" + +#include "../../../gcode/queue.h" + +#if ENABLED(SDSUPPORT) + bool DGUSSetupHandler::Print() { + dgus_screen_handler.filelist.refresh(); + + while (!dgus_screen_handler.filelist.isAtRootDir()) { + dgus_screen_handler.filelist.upDir(); + } + + dgus_screen_handler.filelist_offset = 0; + dgus_screen_handler.filelist_selected = -1; + + return true; + } +#endif + +bool DGUSSetupHandler::PrintStatus() { + if (ExtUI::isPrinting() || ExtUI::isPrintingPaused()) { + return true; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_FINISHED); + return false; +} + +bool DGUSSetupHandler::PrintAdjust() { + if (ExtUI::isPrinting() || ExtUI::isPrintingPaused()) { + return true; + } + + dgus_screen_handler.TriggerScreenChange(DGUS_Screen::PRINT_FINISHED); + return false; +} + +bool DGUSSetupHandler::LevelingMenu() { + ExtUI::setLevelingActive(dgus_screen_handler.leveling_active); + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return false; + } + + if (ExtUI::isPositionKnown()) { + if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 10.0f) { + queue.enqueue_now_P(PSTR("G0Z10")); + } + + return true; + } + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(DGUS_MSG_HOMING, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::LEVELING_MENU); + + queue.enqueue_now_P(DGUS_CMD_HOME); + + return false; +} + +bool DGUSSetupHandler::LevelingManual() { + ExtUI::setLevelingActive(false); + + if (ExtUI::isPositionKnown()) { + return true; + } + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return false; + } + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(DGUS_MSG_HOMING, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::LEVELING_MANUAL); + + queue.enqueue_now_P(DGUS_CMD_HOME); + + return false; +} + +bool DGUSSetupHandler::LevelingOffset() { + dgus_screen_handler.offset_steps = DGUS_Data::StepSize::MMP1; + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return false; + } + + if (ExtUI::isPositionKnown()) { + if (ExtUI::getAxisPosition_mm(ExtUI::Z) < 4.0f) { + queue.enqueue_now_P(PSTR("G0Z4")); + } + + char buffer[20]; + snprintf_P(buffer, sizeof(buffer), PSTR("G0X%dY%d"), DGUS_LEVEL_CENTER_X, DGUS_LEVEL_CENTER_Y); + + queue.enqueue_one_now(buffer); + queue.enqueue_now_P(PSTR("G0Z0")); + + return true; + } + + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1); + dgus_screen_handler.SetMessageLinePGM(DGUS_MSG_HOMING, 2); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3); + dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4); + dgus_screen_handler.ShowWaitScreen(DGUS_Screen::LEVELING_OFFSET); + + queue.enqueue_now_P(DGUS_CMD_HOME); + + return false; +} + +bool DGUSSetupHandler::LevelingAutomatic() { + if (ExtUI::getMeshValid()) { + dgus_screen_handler.leveling_active = true; + + ExtUI::setLevelingActive(true); + } + + return true; +} + +bool DGUSSetupHandler::LevelingProbing() { + dgus_screen_handler.probing_icons[0] = 0; + dgus_screen_handler.probing_icons[1] = 0; + + return true; +} + +bool DGUSSetupHandler::Filament() { + dgus_screen_handler.filament_extruder = DGUS_Data::Extruder::CURRENT; + dgus_screen_handler.filament_length = DGUS_DEFAULT_FILAMENT_LEN; + + return true; +} + +bool DGUSSetupHandler::Move() { + dgus_screen_handler.move_steps = DGUS_Data::StepSize::MM10; + + if (!dgus_screen_handler.IsPrinterIdle()) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + return false; + } + + return true; +} + +bool DGUSSetupHandler::Gcode() { + ZERO(dgus_screen_handler.gcode); + + if (dgus_display.gui_version < 0x30 || dgus_display.os_version < 0x21) { + dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_FW_OUTDATED); + return false; + } + + return true; +} + +bool DGUSSetupHandler::PID() { + dgus_screen_handler.pid_heater = DGUS_Data::Heater::H0; + dgus_screen_handler.pid_temp = DGUS_PLA_TEMP_HOTEND; + + return true; +} + +bool DGUSSetupHandler::Infos() { + dgus_screen_handler.debug_count = 0; + + return true; +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h new file mode 100644 index 000000000000..9e3866467fc0 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.h @@ -0,0 +1,42 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +namespace DGUSSetupHandler { + + #if ENABLED(SDSUPPORT) + bool Print(); + #endif + bool PrintStatus(); + bool PrintAdjust(); + bool LevelingMenu(); + bool LevelingOffset(); + bool LevelingManual(); + bool LevelingAutomatic(); + bool LevelingProbing(); + bool Filament(); + bool Move(); + bool Gcode(); + bool PID(); + bool Infos(); + +} diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp new file mode 100644 index 000000000000..3fc48d2ebbb9 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.cpp @@ -0,0 +1,618 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUSTxHandler.h" + +#include "DGUSScreenHandler.h" +#include "config/DGUS_Data.h" + +#include "../ui_api.h" +#include "../../../module/stepper.h" +#include "../../../module/printcounter.h" +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #include "../../../feature/pause.h" +#endif + +#if ENABLED(SDSUPPORT) + void DGUSTxHandler::SetFileControlState(int file, bool state) { + DGUS_Control control; + + switch (file) { + default: return; + case 0: + control = DGUS_Control::FILE0; + break; + case 1: + control = DGUS_Control::FILE1; + break; + case 2: + control = DGUS_Control::FILE2; + break; + case 3: + control = DGUS_Control::FILE3; + break; + case 4: + control = DGUS_Control::FILE4; + break; + } + + if (state) { + dgus_display.EnableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + control); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + control); + } + } + + void DGUSTxHandler::FileType(DGUS_VP &vp) { + // Batch send + uint16_t data[DGUS_FILE_COUNT]; + + for (int i = 0; i < DGUS_FILE_COUNT; i++) { + if (!dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_offset + i)) { + data[i] = Swap16((uint16_t)DGUS_Data::SDType::NONE); + + SetFileControlState(i, false); + continue; + } + + data[i] = dgus_screen_handler.filelist.isDir() ? + Swap16((uint16_t)DGUS_Data::SDType::DIRECTORY) + : Swap16((uint16_t)DGUS_Data::SDType::FILE); + + SetFileControlState(i, true); + } + + dgus_display.Write((uint16_t)vp.addr, data, sizeof(*data) * DGUS_FILE_COUNT); + } + + void DGUSTxHandler::FileName(DGUS_VP &vp) { + uint8_t offset; + + switch (vp.addr) { + default: return; + case DGUS_Addr::SD_FileName0: + offset = 0; + break; + case DGUS_Addr::SD_FileName1: + offset = 1; + break; + case DGUS_Addr::SD_FileName2: + offset = 2; + break; + case DGUS_Addr::SD_FileName3: + offset = 3; + break; + case DGUS_Addr::SD_FileName4: + offset = 4; + break; + } + + if (dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_offset + offset)) { + dgus_display.WriteString((uint16_t)vp.addr, dgus_screen_handler.filelist.filename(), vp.size); + } + else { + dgus_display.WriteStringPGM((uint16_t)vp.addr, NUL_STR, vp.size); + } + } + + void DGUSTxHandler::ScrollIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + if (!dgus_screen_handler.filelist.isAtRootDir()) { + icons |= (uint16_t)DGUS_Data::ScrollIcon::GO_BACK; + + dgus_display.EnableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::GO_BACK); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::GO_BACK); + } + + if (dgus_screen_handler.filelist_offset > 0) { + icons |= (uint16_t)DGUS_Data::ScrollIcon::UP; + + dgus_display.EnableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::SCROLL_UP); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::SCROLL_UP); + } + + if (dgus_screen_handler.filelist_offset + DGUS_FILE_COUNT < dgus_screen_handler.filelist.count()) { + icons |= (uint16_t)DGUS_Data::ScrollIcon::DOWN; + + dgus_display.EnableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::SCROLL_DOWN); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::SCROLL_DOWN); + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); + } + + void DGUSTxHandler::SelectedFileName(DGUS_VP &vp) { + if (dgus_screen_handler.filelist_selected < 0 + || !dgus_screen_handler.filelist.seek(dgus_screen_handler.filelist_selected)) { + dgus_display.WriteStringPGM((uint16_t)vp.addr, NUL_STR, vp.size); + return; + } + + dgus_display.WriteString((uint16_t)vp.addr, dgus_screen_handler.filelist.filename(), vp.size); + } +#endif // SDSUPPORT + +void DGUSTxHandler::PositionZ(DGUS_VP &vp) { + float position = ExtUI::isAxisPositionKnown(ExtUI::Z) ? + planner.get_axis_position_mm(Z_AXIS) + : 0; + + const int16_t data = dgus_display.ToFixedPoint(position); + dgus_display.Write((uint16_t)vp.addr, Swap16(data)); +} + +void DGUSTxHandler::Ellapsed(DGUS_VP &vp) { + char buffer[21]; + duration_t(print_job_timer.duration()).toString(buffer); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); +} + +void DGUSTxHandler::Percent(DGUS_VP &vp) { + uint16_t progress; + + switch (vp.addr) { + default: return; + case DGUS_Addr::STATUS_Percent: + progress = constrain(ExtUI::getProgress_percent(), 0, 100); + break; + case DGUS_Addr::STATUS_Percent_Complete: + progress = 100; + break; + } + + dgus_display.Write((uint16_t)DGUS_Addr::STATUS_Percent, Swap16(progress)); +} + +void DGUSTxHandler::StatusIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + if (ExtUI::isPrinting()) { + icons |= (uint16_t)DGUS_Data::StatusIcon::PAUSE; + + dgus_display.EnableControl(DGUS_Screen::PRINT_STATUS, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::PAUSE); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT_STATUS, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::PAUSE); + } + + if (ExtUI::isPrintingPaused()) { + icons |= (uint16_t)DGUS_Data::StatusIcon::RESUME; + + dgus_display.EnableControl(DGUS_Screen::PRINT_STATUS, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::RESUME); + } + else { + dgus_display.DisableControl(DGUS_Screen::PRINT_STATUS, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::RESUME); + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::Flowrate(DGUS_VP &vp) { + int16_t flowrate; + + switch (vp.addr) { + default: return; + case DGUS_Addr::ADJUST_Flowrate_CUR: + flowrate = ExtUI::getFlow_percent(TERN(HAS_MULTI_EXTRUDER, ExtUI::getActiveTool(), ExtUI::E0)); + break; + #if HAS_MULTI_EXTRUDER + case DGUS_Addr::ADJUST_Flowrate_E0: + flowrate = ExtUI::getFlow_percent(ExtUI::E0); + break; + case DGUS_Addr::ADJUST_Flowrate_E1: + flowrate = ExtUI::getFlow_percent(ExtUI::E1); + break; + #endif + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(flowrate)); +} + +void DGUSTxHandler::TempMax(DGUS_VP &vp) { + uint16_t temp; + + switch (vp.addr) { + default: return; + case DGUS_Addr::TEMP_Max_Bed: + temp = BED_MAX_TARGET; + break; + case DGUS_Addr::TEMP_Max_H0: + temp = HEATER_0_MAXTEMP - HOTEND_OVERSHOOT; + break; + #if HOTENDS > 1 + case DGUS_Addr::TEMP_Max_H1: + temp = HEATER_1_MAXTEMP - HOTEND_OVERSHOOT; + break; + #endif + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(temp)); +} + +void DGUSTxHandler::StepperStatus(DGUS_VP &vp) { + const bool motor_on = stepper.axis_enabled.bits & (_BV(LINEAR_AXES) - 1); + dgus_display.Write((uint16_t)vp.addr, Swap16(uint16_t(motor_on ? DGUS_Data::Status::ENABLED : DGUS_Data::Status::DISABLED))); +} + +void DGUSTxHandler::StepIcons(DGUS_VP &vp) { + if (!vp.extra) return; + uint16_t icons = 0; + DGUS_Data::StepSize size = *(DGUS_Data::StepSize*)vp.extra; + + switch (size) { + case DGUS_Data::StepSize::MM10: + icons |= (uint16_t)DGUS_Data::StepIcon::MM10; + break; + case DGUS_Data::StepSize::MM1: + icons |= (uint16_t)DGUS_Data::StepIcon::MM1; + break; + case DGUS_Data::StepSize::MMP1: + icons |= (uint16_t)DGUS_Data::StepIcon::MMP1; + break; + case DGUS_Data::StepSize::MMP01: + icons |= (uint16_t)DGUS_Data::StepIcon::MMP01; + break; + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::ABLDisableIcon(DGUS_VP &vp) { + uint16_t data; + + if (ExtUI::getLevelingActive()) { + data = (uint16_t)DGUS_Data::Status::ENABLED; + + dgus_display.EnableControl(DGUS_Screen::LEVELING_AUTOMATIC, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::DISABLE); + } + else { + data = (uint16_t)DGUS_Data::Status::DISABLED; + + dgus_display.DisableControl(DGUS_Screen::LEVELING_AUTOMATIC, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::DISABLE); + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(data)); +} + +void DGUSTxHandler::ABLGrid(DGUS_VP &vp) { + // Batch send + int16_t data[DGUS_LEVEL_GRID_SIZE]; + xy_uint8_t point; + int16_t fixed; + + for (int i = 0; i < DGUS_LEVEL_GRID_SIZE; i++) { + point.x = i % GRID_MAX_POINTS_X; + point.y = i / GRID_MAX_POINTS_X; + fixed = dgus_display.ToFixedPoint(ExtUI::getMeshPoint(point)); + data[i] = Swap16(fixed); + } + + dgus_display.Write((uint16_t)vp.addr, data, sizeof(*data) * DGUS_LEVEL_GRID_SIZE); +} + +void DGUSTxHandler::FilamentIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + switch (dgus_screen_handler.filament_extruder) { + default: return; + case DGUS_Data::Extruder::CURRENT: + #if HAS_MULTI_EXTRUDER + switch (ExtUI::getActiveTool()) { + default: break; + case ExtUI::E0: + icons |= (uint16_t)DGUS_Data::ExtruderIcon::E0; + break; + case ExtUI::E1: + icons |= (uint16_t)DGUS_Data::ExtruderIcon::E1; + break; + } + break; + #endif + case DGUS_Data::Extruder::E0: + icons |= (uint16_t)DGUS_Data::ExtruderIcon::E0; + break; + case DGUS_Data::Extruder::E1: + icons |= (uint16_t)DGUS_Data::ExtruderIcon::E1; + break; + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::BLTouch(DGUS_VP &vp) { + #if ENABLED(BLTOUCH) + dgus_display.EnableControl(DGUS_Screen::SETTINGS_MENU2, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::EXTRA2); + + dgus_display.Write((uint16_t)vp.addr, Swap16((uint16_t)DGUS_Data::Status::ENABLED)); + #else + dgus_display.DisableControl(DGUS_Screen::SETTINGS_MENU2, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::EXTRA2); + + dgus_display.Write((uint16_t)vp.addr, Swap16((uint16_t)DGUS_Data::Status::DISABLED)); + #endif +} + +void DGUSTxHandler::PIDIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + switch (dgus_screen_handler.pid_heater) { + default: return; + case DGUS_Data::Heater::BED: + icons |= (uint16_t)DGUS_Data::HeaterIcon::BED; + break; + case DGUS_Data::Heater::H0: + icons |= (uint16_t)DGUS_Data::HeaterIcon::H0; + break; + case DGUS_Data::Heater::H1: + icons |= (uint16_t)DGUS_Data::HeaterIcon::H1; + break; + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::PIDKp(DGUS_VP &vp) { + float value; + + switch (dgus_screen_handler.pid_heater) { + default: return; + #if ENABLED(PIDTEMPBED) + case DGUS_Data::Heater::BED: + value = ExtUI::getBedPIDValues_Kp(); + break; + #endif + #if ENABLED(PIDTEMP) + case DGUS_Data::Heater::H0: + value = ExtUI::getPIDValues_Kp(ExtUI::E0); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + value = ExtUI::getPIDValues_Kp(ExtUI::E1); + break; + #endif + #endif + } + + const int32_t data = dgus_display.ToFixedPoint(value); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); +} + +void DGUSTxHandler::PIDKi(DGUS_VP &vp) { + float value; + + switch (dgus_screen_handler.pid_heater) { + default: return; + #if ENABLED(PIDTEMPBED) + case DGUS_Data::Heater::BED: + value = ExtUI::getBedPIDValues_Ki(); + break; + #endif + #if ENABLED(PIDTEMP) + case DGUS_Data::Heater::H0: + value = ExtUI::getPIDValues_Ki(ExtUI::E0); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + value = ExtUI::getPIDValues_Ki(ExtUI::E1); + break; + #endif + #endif + } + + const int32_t data = dgus_display.ToFixedPoint(value); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); +} + +void DGUSTxHandler::PIDKd(DGUS_VP &vp) { + float value; + + switch (dgus_screen_handler.pid_heater) { + default: return; + #if ENABLED(PIDTEMPBED) + case DGUS_Data::Heater::BED: + value = ExtUI::getBedPIDValues_Kd(); + break; + #endif + #if ENABLED(PIDTEMP) + case DGUS_Data::Heater::H0: + value = ExtUI::getPIDValues_Kd(ExtUI::E0); + break; + #if HOTENDS > 1 + case DGUS_Data::Heater::H1: + value = ExtUI::getPIDValues_Kd(ExtUI::E1); + break; + #endif + #endif + } + + const int32_t data = dgus_display.ToFixedPoint(value); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); +} + +void DGUSTxHandler::BuildVolume(DGUS_VP &vp) { + char buffer[vp.size]; + snprintf_P(buffer, vp.size, PSTR("%dx%dx%d"), X_BED_SIZE, Y_BED_SIZE, (Z_MAX_POS - Z_MIN_POS)); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); +} + +void DGUSTxHandler::TotalPrints(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(print_job_timer.getStats().totalPrints)); + #else + UNUSED(vp); + #endif +} + +void DGUSTxHandler::FinishedPrints(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(print_job_timer.getStats().finishedPrints)); + #else + UNUSED(vp); + #endif +} + +void DGUSTxHandler::PrintTime(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + char buffer[21]; + ExtUI::getTotalPrintTime_str(buffer); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); + #else + dgus_display.WriteStringPGM((uint16_t)vp.addr, DGUS_MSG_UNDEF, vp.size); + #endif +} + +void DGUSTxHandler::LongestPrint(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + char buffer[21]; + ExtUI::getLongestPrint_str(buffer); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); + #else + dgus_display.WriteStringPGM((uint16_t)vp.addr, DGUS_MSG_UNDEF, vp.size); + #endif +} + +void DGUSTxHandler::FilamentUsed(DGUS_VP &vp) { + #if ENABLED(PRINTCOUNTER) + char buffer[21]; + ExtUI::getFilamentUsed_str(buffer); + + dgus_display.WriteString((uint16_t)vp.addr, buffer, vp.size); + #else + dgus_display.WriteStringPGM((uint16_t)vp.addr, DGUS_MSG_UNDEF, vp.size); + #endif +} + +void DGUSTxHandler::WaitIcons(DGUS_VP &vp) { + uint16_t icons = 0; + + if (ExtUI::isPrintingPaused()) { + icons |= (uint16_t)DGUS_Data::WaitIcon::ABORT; + + dgus_display.EnableControl(DGUS_Screen::WAIT, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::ABORT); + } + else { + dgus_display.DisableControl(DGUS_Screen::WAIT, + DGUSDisplay::POPUP_WINDOW, + DGUS_Control::ABORT); + } + + if (dgus_screen_handler.wait_continue) { + icons |= (uint16_t)DGUS_Data::WaitIcon::CONTINUE; + + dgus_display.EnableControl(DGUS_Screen::WAIT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::CONTINUE); + } + else { + dgus_display.DisableControl(DGUS_Screen::WAIT, + DGUSDisplay::RETURN_KEY_CODE, + DGUS_Control::CONTINUE); + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(icons)); +} + +void DGUSTxHandler::FanSpeed(DGUS_VP &vp) { + uint16_t fan_speed; + + switch (vp.addr) { + default: return; + case DGUS_Addr::FAN0_Speed: fan_speed = ExtUI::getTargetFan_percent(ExtUI::FAN0); break; + } + + dgus_display.Write((uint16_t)vp.addr, Swap16(fan_speed)); +} + +void DGUSTxHandler::Volume(DGUS_VP &vp) { + const uint16_t volume = dgus_display.GetVolume(); + + dgus_display.Write((uint16_t)vp.addr, Swap16(volume)); +} + +void DGUSTxHandler::Brightness(DGUS_VP &vp) { + const uint16_t brightness = dgus_display.GetBrightness(); + + dgus_display.Write((uint16_t)vp.addr, Swap16(brightness)); +} + +void DGUSTxHandler::ExtraToString(DGUS_VP &vp) { + if (!vp.size || !vp.extra) return; + + dgus_display.WriteString((uint16_t)vp.addr, vp.extra, vp.size, true, false, false); +} + +void DGUSTxHandler::ExtraPGMToString(DGUS_VP &vp) { + if (!vp.size || !vp.extra) return; + + dgus_display.WriteStringPGM((uint16_t)vp.addr, vp.extra, vp.size, true, false, false); +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h new file mode 100644 index 000000000000..94632fe385e6 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSTxHandler.h @@ -0,0 +1,126 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "DGUSDisplay.h" +#include "definition/DGUS_VP.h" + +namespace DGUSTxHandler { + + #if ENABLED(SDSUPPORT) + void SetFileControlState(int, bool); + void FileType(DGUS_VP &); + void FileName(DGUS_VP &); + void ScrollIcons(DGUS_VP &); + void SelectedFileName(DGUS_VP &); + #endif + + void PositionZ(DGUS_VP &); + void Ellapsed(DGUS_VP &); + void Percent(DGUS_VP &); + void StatusIcons(DGUS_VP &); + + void Flowrate(DGUS_VP &); + + void TempMax(DGUS_VP &); + + void StepperStatus(DGUS_VP &); + + void StepIcons(DGUS_VP &); + + void ABLDisableIcon(DGUS_VP &); + void ABLGrid(DGUS_VP &); + + void FilamentIcons(DGUS_VP &); + + void BLTouch(DGUS_VP &); + + void PIDIcons(DGUS_VP &); + void PIDKp(DGUS_VP &); + void PIDKi(DGUS_VP &); + void PIDKd(DGUS_VP &); + + void BuildVolume(DGUS_VP &); + void TotalPrints(DGUS_VP &); + void FinishedPrints(DGUS_VP &); + void PrintTime(DGUS_VP &); + void LongestPrint(DGUS_VP &); + void FilamentUsed(DGUS_VP &); + + void WaitIcons(DGUS_VP &); + + void FanSpeed(DGUS_VP &); + + void Volume(DGUS_VP &); + + void Brightness(DGUS_VP &); + + void ExtraToString(DGUS_VP &); + void ExtraPGMToString(DGUS_VP &); + + template + void ExtraToInteger(DGUS_VP &vp) { + if (!vp.size || !vp.extra) return; + switch (vp.size) { + default: return; + case 1: { + const uint8_t data = (uint8_t)(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, data); + break; + } + case 2: { + const uint16_t data = (uint16_t)(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, Swap16(data)); + break; + } + case 4: { + const uint32_t data = (uint32_t)(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); + break; + } + } + } + + template + void ExtraToFixedPoint(DGUS_VP &vp) { + if (!vp.size || !vp.extra) return; + switch (vp.size) { + default: return; + case 1: { + const uint8_t data = dgus_display.ToFixedPoint(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, data); + break; + } + case 2: { + const uint16_t data = dgus_display.ToFixedPoint(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, Swap16(data)); + break; + } + case 4: { + const uint32_t data = dgus_display.ToFixedPoint(*(T*)vp.extra); + dgus_display.Write((uint16_t)vp.addr, dgus_display.SwapBytes(data)); + break; + } + } + } + +} diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h new file mode 100644 index 000000000000..4207119c87f2 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Addr.h @@ -0,0 +1,173 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +constexpr uint8_t DGUS_LINE_LEN = 32; +constexpr uint8_t DGUS_STATUS_LEN = 32; +constexpr uint8_t DGUS_FILE_COUNT = 5; +constexpr uint8_t DGUS_FILENAME_LEN = 32; +constexpr uint8_t DGUS_ELLAPSED_LEN = 15; +constexpr uint8_t DGUS_LEVEL_GRID_SIZE = 25; +constexpr uint8_t DGUS_MACHINE_LEN = 24; +constexpr uint8_t DGUS_BUILDVOLUME_LEN = 24; +constexpr uint8_t DGUS_VERSION_LEN = 16; +constexpr uint8_t DGUS_PRINTTIME_LEN = 24; +constexpr uint8_t DGUS_LONGESTPRINT_LEN = 24; +constexpr uint8_t DGUS_FILAMENTUSED_LEN = 24; +constexpr uint8_t DGUS_GCODE_LEN = 32; + +enum class DGUS_Addr : uint16_t { + MESSAGE_Line1 = 0x1100, // 0x1100 - 0x111F + MESSAGE_Line2 = 0x1120, // 0x1120 - 0x113F + MESSAGE_Line3 = 0x1140, // 0x1140 - 0x115F + MESSAGE_Line4 = 0x1160, // 0x1160 - 0x117F + + // READ-ONLY VARIABLES + + SCREENCHANGE = 0x2000, // Screen change request. Data contains target screen in low byte. + SCREENCHANGE_SD = 0x2001, // Only change if SD card present. + SCREENCHANGE_Idle = 0x2002, // Only change if not printing. + SCREENCHANGE_Printing = 0x2003, // Only change if printing. + SD_SelectFile = 0x2004, // Data: file index (0-4) + SD_Scroll = 0x2005, // Data: DGUS_Data::Scroll + SD_Print = 0x2006, + STATUS_Abort = 0x2007, // Popup / Data: DGUS_Data::Popup + STATUS_Pause = 0x2008, // Popup / Data: DGUS_Data::Popup + STATUS_Resume = 0x2009, // Popup / Data: DGUS_Data::Popup + ADJUST_SetFeedrate = 0x200A, // Type: Integer (16 bits signed) + ADJUST_SetFlowrate_CUR = 0x200B, // Type: Integer (16 bits signed) + #if HAS_MULTI_EXTRUDER + ADJUST_SetFlowrate_E0 = 0x200C, // Type: Integer (16 bits signed) + ADJUST_SetFlowrate_E1 = 0x200D, // Type: Integer (16 bits signed) + #endif + ADJUST_SetBabystep = 0x200E, // Type: Fixed point, 2 decimals (16 bits signed) + ADJUST_Babystep = 0x200F, // Data: DGUS_Data::Adjust + TEMP_Preset = 0x2010, // Popup / Data: DGUS_Data::TempPreset + TEMP_SetTarget_Bed = 0x2011, // Type: Integer (16 bits signed) + TEMP_SetTarget_H0 = 0x2012, // Type: Integer (16 bits signed) + #if HOTENDS > 1 + TEMP_SetTarget_H1 = 0x2013, // Type: Integer (16 bits signed) + #endif + TEMP_Cool = 0x2014, // Data: DGUS_Data::Heater + STEPPER_Control = 0x2015, // Popup / Data: DGUS_Data::Control + LEVEL_OFFSET_Set = 0x2016, // Type: Fixed point, 2 decimals (16 bits signed) + LEVEL_OFFSET_Step = 0x2017, // Data: DGUS_Data::Adjust + LEVEL_OFFSET_SetStep = 0x2018, // Data: DGUS_Data::StepSize + LEVEL_MANUAL_Point = 0x2019, // Data: point index (1-5) + LEVEL_AUTO_Probe = 0x201A, + LEVEL_AUTO_Disable = 0x201B, + FILAMENT_Select = 0x201C, // Data: DGUS_Data::Extruder + FILAMENT_SetLength = 0x201D, // Type: Integer (16 bits unsigned) + FILAMENT_Move = 0x201E, // Data: DGUS_Data::FilamentMove + MOVE_Home = 0x201F, // Data: DGUS_Data::Axis + MOVE_SetX = 0x2020, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_SetY = 0x2021, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_SetZ = 0x2022, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_Step = 0x2023, // Data: DGUS_Data::MoveDirection + MOVE_SetStep = 0x2024, // Data: DGUS_Data::StepSize + GCODE_Clear = 0x2025, + GCODE_Execute = 0x2026, + EEPROM_Reset = 0x2027, // Popup / Data: DGUS_Data::Popup + SETTINGS2_Extra = 0x2028, // Data: DGUS_Data::Extra + PID_Select = 0x2029, // Data: DGUS_Data::Heater + PID_SetTemp = 0x202A, // Type: Integer (16 bits unsigned) + PID_Run = 0x202B, + POWERLOSS_Abort = 0x202C, // Popup / Data: DGUS_Data::Popup + POWERLOSS_Resume = 0x202D, // Popup / Data: DGUS_Data::Popup + WAIT_Abort = 0x202E, // Popup / Data: DGUS_Data::Popup + WAIT_Continue = 0x202F, + + // WRITE-ONLY VARIABLES + + MESSAGE_Status = 0x3000, // 0x3000 - 0x301F + SD_Type = 0x3020, // 0x3020 - 0x3024 / Data: DGUS_Data::SDType + SD_FileName0 = 0x3025, // 0x3025 - 0x3044 + SD_FileName1 = 0x3045, // 0x3045 - 0x3064 + SD_FileName2 = 0x3065, // 0x3065 - 0x3084 + SD_FileName3 = 0x3085, // 0x3085 - 0x30A4 + SD_FileName4 = 0x30A5, // 0x30A5 - 0x30C4 + SD_ScrollIcons = 0x30C5, // Bits: DGUS_Data::ScrollIcon + SD_SelectedFileName = 0x30C6, // 0x30C6 - 0x30E5 + STATUS_PositionZ = 0x30E6, // Type: Fixed point, 1 decimal (16 bits signed) + STATUS_Ellapsed = 0x30E7, // 0x30E7 - 0x30F5 + STATUS_Percent = 0x30F6, // Type: Integer (16 bits unsigned) + STATUS_Icons = 0x30F7, // Bits: DGUS_Data::StatusIcon + ADJUST_Feedrate = 0x30F8, // Type: Integer (16 bits signed) + ADJUST_Flowrate_CUR = 0x30F9, // Type: Integer (16 bits signed) + #if HAS_MULTI_EXTRUDER + ADJUST_Flowrate_E0 = 0x30FA, // Type: Integer (16 bits signed) + ADJUST_Flowrate_E1 = 0x30FB, // Type: Integer (16 bits signed) + #endif + TEMP_Current_Bed = 0x30FC, // Type: Integer (16 bits signed) + TEMP_Target_Bed = 0x30FD, // Type: Integer (16 bits signed) + TEMP_Max_Bed = 0x30FE, // Type: Integer (16 bits unsigned) + TEMP_Current_H0 = 0x30FF, // Type: Integer (16 bits signed) + TEMP_Target_H0 = 0x3100, // Type: Integer (16 bits signed) + TEMP_Max_H0 = 0x3101, // Type: Integer (16 bits unsigned) + #if HOTENDS > 1 + TEMP_Current_H1 = 0x3102, // Type: Integer (16 bits signed) + TEMP_Target_H1 = 0x3103, // Type: Integer (16 bits signed) + TEMP_Max_H1 = 0x3104, // Type: Integer (16 bits unsigned) + #endif + STEPPER_Status = 0x3105, // Data: DGUS_Data::Status + LEVEL_OFFSET_Current = 0x3106, // Type: Fixed point, 2 decimals (16 bits signed) + LEVEL_OFFSET_StepIcons = 0x3107, // Bits: DGUS_Data::StepIcon + LEVEL_AUTO_DisableIcon = 0x3108, // Data: DGUS_Data::Status + LEVEL_AUTO_Grid = 0x3109, // 0x3109 - 0x3121 / Type: Fixed point, 3 decimals (16 bits signed) + LEVEL_PROBING_Icons1 = 0x3122, // Type: Integer (16 bits unsigned) / Each bit represents a grid point + LEVEL_PROBING_Icons2 = 0x3123, // Type: Integer (16 bits unsigned) / Each bit represents a grid point + FILAMENT_ExtruderIcons = 0x3124, // Data: DGUS_Data::ExtruderIcon + FILAMENT_Length = 0x3125, // Type: Integer (16 bits unsigned) + MOVE_CurrentX = 0x3126, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_CurrentY = 0x3127, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_CurrentZ = 0x3128, // Type: Fixed point, 1 decimal (16 bits signed) + MOVE_StepIcons = 0x3129, // Bits: DGUS_Data::StepIcon + SETTINGS2_BLTouch = 0x312A, // Data: DGUS_Data::Status + PID_HeaterIcons = 0x312B, // Data: DGUS_Data::HeaterIcon + PID_Temp = 0x312C, // Type: Integer (16 bits unsigned) + PID_Kp = 0x312D, // Type: Fixed point, 2 decimals (32 bits signed) + PID_Ki = 0x312F, // Type: Fixed point, 2 decimals (32 bits signed) + PID_Kd = 0x3131, // Type: Fixed point, 2 decimals (32 bits signed) + INFOS_Machine = 0x3133, // 0x3133 - 0x314A + INFOS_BuildVolume = 0x314B, // 0x314B - 0x3162 + INFOS_Version = 0x3163, // 0x3163 - 0x3172 + INFOS_TotalPrints = 0x3173, // Type: Integer (16 bits unsigned) + INFOS_FinishedPrints = 0x3174, // Type: Integer (16 bits unsigned) + INFOS_PrintTime = 0x3175, // 0x3175 - 0x318C + INFOS_LongestPrint = 0x318D, // 0x318D - 0x31A4 + INFOS_FilamentUsed = 0x31A5, // 0x31A5 - 0x31BC + WAIT_Icons = 0x31BD, // Bits: DGUS_Data::WaitIcon + + // READ-WRITE VARIABLES + + FAN0_Speed = 0x4000, // Type: Integer (16 bits unsigned) / Data: fan speed as percent (0-100) + GCODE_Data = 0x4001, // 0x4001 - 0x4020 + PID_Cycles = 0x4021, // Type: Integer (16 bits unsigned) + VOLUME_Level = 0x4022, // Type: Integer (16 bits unsigned) / Data: volume as percent (0-100) + BRIGHTNESS_Level = 0x4023, // Type: Integer (16 bits unsigned) / Data: brightness as percent (0-100) + + // SPECIAL CASES + + STATUS_Percent_Complete = 0x5000, // Same as STATUS_Percent, but always 100% + INFOS_Debug = 0x5001, + +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h new file mode 100644 index 000000000000..9b275fb2f550 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Constants.h @@ -0,0 +1,96 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../../../../inc/MarlinConfigPre.h" + +#include "DGUS_Addr.h" + +static_assert((DGUS_LEVEL_GRID_SIZE == GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y), "DGUS_LEVEL_GRID_SIZE incompatible with current mesh."); + +#ifndef DGUS_DEFAULT_VOLUME + #define DGUS_DEFAULT_VOLUME 50 +#endif + +#ifndef DGUS_DEFAULT_BRIGHTNESS + #define DGUS_DEFAULT_BRIGHTNESS 100 +#endif + +#ifndef DGUS_STATUS_EXPIRATION_MS + #define DGUS_STATUS_EXPIRATION_MS 30000 +#endif + +#ifndef DGUS_PRINT_BABYSTEP + #define DGUS_PRINT_BABYSTEP 0.01f +#endif + +#ifndef DGUS_PLA_TEMP_HOTEND + #define DGUS_PLA_TEMP_HOTEND 200 +#endif + +#ifndef DGUS_PLA_TEMP_BED + #define DGUS_PLA_TEMP_BED 60 +#endif + +#ifndef DGUS_ABS_TEMP_HOTEND + #define DGUS_ABS_TEMP_HOTEND 240 +#endif + +#ifndef DGUS_ABS_TEMP_BED + #define DGUS_ABS_TEMP_BED 80 +#endif + +#ifndef DGUS_PETG_TEMP_HOTEND + #define DGUS_PETG_TEMP_HOTEND 240 +#endif + +#ifndef DGUS_PETG_TEMP_BED + #define DGUS_PETG_TEMP_BED 60 +#endif + +#ifndef DGUS_DEFAULT_FILAMENT_LEN + #define DGUS_DEFAULT_FILAMENT_LEN 10 +#endif + +#ifndef LEVEL_CORNERS_Z_HOP + #define LEVEL_CORNERS_Z_HOP 4.0 +#endif + +#ifndef LEVEL_CORNERS_HEIGHT + #define LEVEL_CORNERS_HEIGHT 0.0 +#endif + +static_assert(LEVEL_CORNERS_Z_HOP >= 0, "LEVEL_CORNERS_Z_HOP must be >= 0. Please update your configuration."); + +#ifndef DGUS_LEVEL_CENTER_X + #define DGUS_LEVEL_CENTER_X ((X_BED_SIZE) / 2) +#endif + +#ifndef DGUS_LEVEL_CENTER_Y + #define DGUS_LEVEL_CENTER_Y ((Y_BED_SIZE) / 2) +#endif + +#if ENABLED(BLTOUCH) + #ifndef DGUS_RESET_BLTOUCH + #define DGUS_RESET_BLTOUCH "M999\nM280P0S160" + #endif +#endif diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h new file mode 100644 index 000000000000..650e1e3a1d88 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Control.h @@ -0,0 +1,50 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +enum class DGUS_Control : uint8_t { + + // PRINT + FILE0 = 1, // RETURN_KEY_CODE + FILE1 = 2, // RETURN_KEY_CODE + FILE2 = 3, // RETURN_KEY_CODE + FILE3 = 4, // RETURN_KEY_CODE + FILE4 = 5, // RETURN_KEY_CODE + GO_BACK = 6, // RETURN_KEY_CODE + SCROLL_UP = 7, // RETURN_KEY_CODE + SCROLL_DOWN = 8, // RETURN_KEY_CODE + + // PRINT_STATUS + PAUSE = 1, // POPUP_WINDOW + RESUME = 2, // POPUP_WINDOW + + // LEVELING_AUTOMATIC + DISABLE = 5, // RETURN_KEY_CODE + + // SETTINGS_MENU2 + EXTRA2 = 6, // RETURN_KEY_CODE + + // WAIT + ABORT = 1, // POPUP_WINDOW + CONTINUE = 2 // RETURN_KEY_CODE + +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h new file mode 100644 index 000000000000..e1c1bf557f54 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Data.h @@ -0,0 +1,148 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +namespace DGUS_Data { + + // RX constants + + enum class Scroll : uint8_t { + GO_BACK = 0, + UP = 1, + DOWN = 2 + }; + + enum class Popup : uint8_t { + CONFIRMED = 1 + }; + + enum class Adjust : uint8_t { + INCREMENT = 0, + DECREMENT = 1 + }; + + enum class TempPreset : uint8_t { + PLA = 1, + ABS = 2, + PETG = 3 + }; + + enum class Extruder : int8_t { + CURRENT = -1, + E0 = 0, + E1 = 1 + }; + + enum class Heater : int8_t { + ALL = -2, + BED = -1, + H0 = 0, + H1 = 1 + }; + + enum class Control : uint8_t { + ENABLE = 1, + DISABLE = 2 + }; + + enum class StepSize : uint8_t { + MM10 = 0, // 10mm + MM1 = 1, // 1mm + MMP1 = 2, // 0.1mm + MMP01 = 3 // 0.01mm + }; + + enum class FilamentMove : uint8_t { + RETRACT = 0, + EXTRUDE = 1 + }; + + enum class Axis : uint8_t { + X_Y_Z = 0, + X_Y = 1, + Z = 2 + }; + + enum class MoveDirection : uint8_t { + XP = 0, // X+ + XM = 1, // X- + YP = 2, // Y+ + YM = 3, // Y- + ZP = 4, // Z+ + ZM = 5 // Z- + }; + + enum class Extra : uint8_t { + BUTTON1 = 0, + BUTTON2 = 1 + }; + + // TX constants + + enum class SDType : uint16_t { + NONE = 0, + FILE = 1, + DIRECTORY = 2 + }; + + enum class ScrollIcon : uint16_t { + GO_BACK = 1U << 0, + UP = 1U << 1, + DOWN = 1U << 2 + }; + + enum class StatusIcon : uint16_t { + PAUSE = 1U << 0, + RESUME = 1U << 1 + }; + + enum class Status : uint16_t { + DISABLED = 0, + ENABLED = 1 + }; + + enum class StepIcon : uint16_t { + MM10 = 1U << 0, // 10mm + MM1 = 1U << 1, // 1mm + MMP1 = 1U << 2, // 0.1mm + MMP01 = 1U << 3 // 0.01mm + }; + + enum class ExtruderIcon : uint16_t { + E0 = 1U << 0, + E1 = 1U << 1 + }; + + enum class HeaterIcon : uint16_t { + BED = 1U << 0, + H0 = 1U << 1, + H1 = 1U << 2 + }; + + enum class WaitIcon : uint16_t { + ABORT = 1U << 0, + CONTINUE = 1U << 1 + }; + +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h new file mode 100644 index 000000000000..0a738223ce36 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/config/DGUS_Screen.h @@ -0,0 +1,52 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +enum class DGUS_Screen : uint8_t { + BOOT = 0, + HOME = 1, + PRINT = 2, + PRINT_STATUS = 3, + PRINT_ADJUST = 4, + PRINT_FINISHED = 5, + TEMP_MENU = 6, + TEMP_MANUAL = 7, + FAN = 8, + SETTINGS_MENU = 9, + LEVELING_MENU = 10, + LEVELING_OFFSET = 11, + LEVELING_MANUAL = 12, + LEVELING_AUTOMATIC = 13, + LEVELING_PROBING = 14, + FILAMENT = 15, + MOVE = 16, + GCODE = 17, + SETTINGS_MENU2 = 18, + PID = 19, + VOLUME = 20, + BRIGHTNESS = 21, + INFOS = 22, + DEBUG = 240, + POWERLOSS = 248, + WAIT = 249, + KILL = 250 +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp new file mode 100644 index 000000000000..1627d44c8466 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.cpp @@ -0,0 +1,240 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUS_ScreenAddrList.h" + +#include "../../ui_api.h" + +constexpr DGUS_Addr LIST_HOME[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + (DGUS_Addr)0 +}; + +#if ENABLED(SDSUPPORT) + constexpr DGUS_Addr LIST_PRINT[] PROGMEM = { + DGUS_Addr::SD_Type, + DGUS_Addr::SD_FileName0, + DGUS_Addr::SD_FileName1, + DGUS_Addr::SD_FileName2, + DGUS_Addr::SD_FileName3, + DGUS_Addr::SD_FileName4, + DGUS_Addr::SD_ScrollIcons, + DGUS_Addr::SD_SelectedFileName, + (DGUS_Addr)0 + }; +#endif + +constexpr DGUS_Addr LIST_PRINT_STATUS[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::STATUS_PositionZ, + DGUS_Addr::STATUS_Ellapsed, + DGUS_Addr::STATUS_Percent, + DGUS_Addr::STATUS_Icons, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_PRINT_ADJUST[] PROGMEM = { + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::FAN0_Speed, + DGUS_Addr::ADJUST_Feedrate, + DGUS_Addr::ADJUST_Flowrate_CUR, + DGUS_Addr::LEVEL_OFFSET_Current, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_PRINT_FINISHED[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::STATUS_PositionZ, + DGUS_Addr::STATUS_Ellapsed, + DGUS_Addr::STATUS_Percent_Complete, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_TEMP_MENU[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_TEMP_MANUAL[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Max_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::TEMP_Max_Bed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_FAN[] PROGMEM = { + DGUS_Addr::FAN0_Speed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_SETTINGS_MENU[] PROGMEM = { + DGUS_Addr::STEPPER_Status, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_LEVELING_OFFSET[] PROGMEM = { + DGUS_Addr::LEVEL_OFFSET_Current, + DGUS_Addr::LEVEL_OFFSET_StepIcons, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_LEVELING_MANUAL[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_LEVELING_AUTOMATIC[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::TEMP_Current_Bed, + DGUS_Addr::TEMP_Target_Bed, + DGUS_Addr::LEVEL_AUTO_DisableIcon, + DGUS_Addr::LEVEL_AUTO_Grid, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_LEVELING_PROBING[] PROGMEM = { + DGUS_Addr::LEVEL_PROBING_Icons1, + DGUS_Addr::LEVEL_PROBING_Icons2, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_FILAMENT[] PROGMEM = { + DGUS_Addr::TEMP_Current_H0, + DGUS_Addr::TEMP_Target_H0, + DGUS_Addr::FILAMENT_ExtruderIcons, + DGUS_Addr::FILAMENT_Length, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_MOVE[] PROGMEM = { + DGUS_Addr::MOVE_CurrentX, + DGUS_Addr::MOVE_CurrentY, + DGUS_Addr::MOVE_CurrentZ, + DGUS_Addr::MOVE_StepIcons, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_GCODE[] PROGMEM = { + DGUS_Addr::GCODE_Data, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_SETTINGS_MENU2[] PROGMEM = { + DGUS_Addr::SETTINGS2_BLTouch, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_PID[] PROGMEM = { + DGUS_Addr::PID_HeaterIcons, + DGUS_Addr::PID_Temp, + DGUS_Addr::PID_Cycles, + DGUS_Addr::PID_Kp, + DGUS_Addr::PID_Ki, + DGUS_Addr::PID_Kd, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_VOLUME[] PROGMEM = { + DGUS_Addr::VOLUME_Level, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_BRIGHTNESS[] PROGMEM = { + DGUS_Addr::BRIGHTNESS_Level, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_INFOS[] PROGMEM = { + DGUS_Addr::INFOS_Machine, + DGUS_Addr::INFOS_BuildVolume, + DGUS_Addr::INFOS_Version, + DGUS_Addr::INFOS_TotalPrints, + DGUS_Addr::INFOS_FinishedPrints, + DGUS_Addr::INFOS_PrintTime, + DGUS_Addr::INFOS_LongestPrint, + DGUS_Addr::INFOS_FilamentUsed, + (DGUS_Addr)0 +}; + +constexpr DGUS_Addr LIST_WAIT[] PROGMEM = { + DGUS_Addr::WAIT_Icons, + (DGUS_Addr)0 +}; + +#define MAP_HELPER(SCREEN, LIST) \ + { .screen = SCREEN, \ + .addr_list = LIST } + +const struct DGUS_ScreenAddrList screen_addr_list_map[] PROGMEM = { + MAP_HELPER(DGUS_Screen::HOME, LIST_HOME), + #if ENABLED(SDSUPPORT) + MAP_HELPER(DGUS_Screen::PRINT, LIST_PRINT), + #endif + MAP_HELPER(DGUS_Screen::PRINT_STATUS, LIST_PRINT_STATUS), + MAP_HELPER(DGUS_Screen::PRINT_ADJUST, LIST_PRINT_ADJUST), + MAP_HELPER(DGUS_Screen::PRINT_FINISHED, LIST_PRINT_FINISHED), + MAP_HELPER(DGUS_Screen::TEMP_MENU, LIST_TEMP_MENU), + MAP_HELPER(DGUS_Screen::TEMP_MANUAL, LIST_TEMP_MANUAL), + MAP_HELPER(DGUS_Screen::FAN, LIST_FAN), + MAP_HELPER(DGUS_Screen::SETTINGS_MENU, LIST_SETTINGS_MENU), + MAP_HELPER(DGUS_Screen::LEVELING_OFFSET, LIST_LEVELING_OFFSET), + MAP_HELPER(DGUS_Screen::LEVELING_MANUAL, LIST_LEVELING_MANUAL), + MAP_HELPER(DGUS_Screen::LEVELING_AUTOMATIC, LIST_LEVELING_AUTOMATIC), + MAP_HELPER(DGUS_Screen::LEVELING_PROBING, LIST_LEVELING_PROBING), + MAP_HELPER(DGUS_Screen::FILAMENT, LIST_FILAMENT), + MAP_HELPER(DGUS_Screen::MOVE, LIST_MOVE), + MAP_HELPER(DGUS_Screen::GCODE, LIST_GCODE), + MAP_HELPER(DGUS_Screen::SETTINGS_MENU2, LIST_SETTINGS_MENU2), + MAP_HELPER(DGUS_Screen::PID, LIST_PID), + MAP_HELPER(DGUS_Screen::VOLUME, LIST_VOLUME), + MAP_HELPER(DGUS_Screen::BRIGHTNESS, LIST_BRIGHTNESS), + MAP_HELPER(DGUS_Screen::INFOS, LIST_INFOS), + MAP_HELPER(DGUS_Screen::WAIT, LIST_WAIT), + + MAP_HELPER((DGUS_Screen)0, nullptr) +}; + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h new file mode 100644 index 000000000000..1e481ef3cce6 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenAddrList.h @@ -0,0 +1,32 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../config/DGUS_Screen.h" +#include "../config/DGUS_Addr.h" + +struct DGUS_ScreenAddrList { + DGUS_Screen screen; + const DGUS_Addr *addr_list; +}; + +extern const struct DGUS_ScreenAddrList screen_addr_list_map[]; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp new file mode 100644 index 000000000000..13319edd0595 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.cpp @@ -0,0 +1,57 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUS_ScreenSetup.h" + +#include "../DGUSSetupHandler.h" + +#include "../../ui_api.h" + +#define SETUP_HELPER(SCREEN, SETUP) \ + { .screen = SCREEN, \ + .setup_fn = SETUP } + +const struct DGUS_ScreenSetup screen_setup_list[] PROGMEM = { + #if ENABLED(SDSUPPORT) + SETUP_HELPER(DGUS_Screen::PRINT, &DGUSSetupHandler::Print), + #endif + SETUP_HELPER(DGUS_Screen::PRINT_STATUS, &DGUSSetupHandler::PrintStatus), + SETUP_HELPER(DGUS_Screen::PRINT_ADJUST, &DGUSSetupHandler::PrintAdjust), + SETUP_HELPER(DGUS_Screen::LEVELING_MENU, &DGUSSetupHandler::LevelingMenu), + SETUP_HELPER(DGUS_Screen::LEVELING_OFFSET, &DGUSSetupHandler::LevelingOffset), + SETUP_HELPER(DGUS_Screen::LEVELING_MANUAL, &DGUSSetupHandler::LevelingManual), + SETUP_HELPER(DGUS_Screen::LEVELING_AUTOMATIC, &DGUSSetupHandler::LevelingAutomatic), + SETUP_HELPER(DGUS_Screen::LEVELING_PROBING, &DGUSSetupHandler::LevelingProbing), + SETUP_HELPER(DGUS_Screen::FILAMENT, &DGUSSetupHandler::Filament), + SETUP_HELPER(DGUS_Screen::MOVE, &DGUSSetupHandler::Move), + SETUP_HELPER(DGUS_Screen::GCODE, &DGUSSetupHandler::Gcode), + SETUP_HELPER(DGUS_Screen::PID, &DGUSSetupHandler::PID), + SETUP_HELPER(DGUS_Screen::INFOS, &DGUSSetupHandler::Infos), + + SETUP_HELPER((DGUS_Screen)0, nullptr) +}; + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h new file mode 100644 index 000000000000..93df5ad90ae6 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_ScreenSetup.h @@ -0,0 +1,31 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../config/DGUS_Screen.h" + +struct DGUS_ScreenSetup { + DGUS_Screen screen; + bool (*setup_fn)(void); +}; + +extern const struct DGUS_ScreenSetup screen_setup_list[]; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h new file mode 100644 index 000000000000..30b3f9ddba77 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VP.h @@ -0,0 +1,40 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "../config/DGUS_Addr.h" + +#define VPFLAG_NONE 0 +#define VPFLAG_AUTOUPLOAD (1U << 0) // Upload on every DGUS update +#define VPFLAG_RXSTRING (1U << 1) // Treat the received data as a string (terminated with 0xFFFF) + +struct DGUS_VP { + DGUS_Addr addr; + uint8_t size; + uint8_t flags; + void *extra; + + // Callback that will be called if the display modified the value. + // nullptr makes it readonly for the display. + void (*rx_handler)(DGUS_VP &, void *); + void (*tx_handler)(DGUS_VP &); +}; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp new file mode 100644 index 000000000000..27b6d9036cee --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.cpp @@ -0,0 +1,368 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "DGUS_VPList.h" + +#include "../config/DGUS_Addr.h" +#include "../DGUSScreenHandler.h" +#include "../DGUSRxHandler.h" +#include "../DGUSTxHandler.h" + +#include "../../ui_api.h" +#include "../../../../module/probe.h" +#include "../../../../module/motion.h" +#include "../../../../module/temperature.h" + +const char DGUS_MACHINENAME[] PROGMEM = MACHINE_NAME; +const char DGUS_MARLINVERSION[] PROGMEM = SHORT_BUILD_VERSION; + +#define VP_HELPER(ADDR, SIZE, FLAGS, EXTRA, RXHANDLER, TXHANDLER) \ + { .addr = ADDR, \ + .size = SIZE, \ + .flags = FLAGS, \ + .extra = EXTRA, \ + .rx_handler = RXHANDLER, \ + .tx_handler = TXHANDLER } + +#define VP_HELPER_WORD(ADDR, FLAGS, EXTRA, RXHANDLER, TXHANDLER) \ + VP_HELPER(ADDR, 2, FLAGS, EXTRA, RXHANDLER, TXHANDLER) + +#define VP_HELPER_DWORD(ADDR, FLAGS, EXTRA, RXHANDLER, TXHANDLER) \ + VP_HELPER(ADDR, 4, FLAGS, EXTRA, RXHANDLER, TXHANDLER) + +#define VP_HELPER_RX(ADDR, RXHANDLER) \ + VP_HELPER_WORD(ADDR, VPFLAG_NONE, nullptr, RXHANDLER, nullptr) + +#define VP_HELPER_RX_NODATA(ADDR, RXHANDLER) \ + VP_HELPER(ADDR, 0, VPFLAG_NONE, nullptr, RXHANDLER, nullptr) + +#define VP_HELPER_TX(ADDR, TXHANDLER) \ + VP_HELPER_WORD(ADDR, VPFLAG_NONE, nullptr, nullptr, TXHANDLER) + +#define VP_HELPER_TX_SIZE(ADDR, SIZE, TXHANDLER) \ + VP_HELPER(ADDR, SIZE, VPFLAG_NONE, nullptr, nullptr, TXHANDLER) + +#define VP_HELPER_TX_EXTRA(ADDR, EXTRA, TXHANDLER) \ + VP_HELPER_WORD(ADDR, VPFLAG_NONE, EXTRA, nullptr, TXHANDLER) + +#define VP_HELPER_TX_AUTO(ADDR, EXTRA, TXHANDLER) \ + VP_HELPER_WORD(ADDR, VPFLAG_AUTOUPLOAD, EXTRA, nullptr, TXHANDLER) + +const struct DGUS_VP vp_list[] PROGMEM = { + + // READ-ONLY VARIABLES + + VP_HELPER_RX(DGUS_Addr::SCREENCHANGE, &DGUSRxHandler::ScreenChange), + VP_HELPER_RX(DGUS_Addr::SCREENCHANGE_SD, &DGUSRxHandler::ScreenChange), + VP_HELPER_RX(DGUS_Addr::SCREENCHANGE_Idle, &DGUSRxHandler::ScreenChange), + VP_HELPER_RX(DGUS_Addr::SCREENCHANGE_Printing, &DGUSRxHandler::ScreenChange), + + #if ENABLED(SDSUPPORT) + VP_HELPER_RX(DGUS_Addr::SD_SelectFile, &DGUSRxHandler::SelectFile), + VP_HELPER_RX(DGUS_Addr::SD_Scroll, &DGUSRxHandler::Scroll), + VP_HELPER_RX_NODATA(DGUS_Addr::SD_Print, &DGUSRxHandler::PrintFile), + #endif + + VP_HELPER_RX(DGUS_Addr::STATUS_Abort, &DGUSRxHandler::PrintAbort), + VP_HELPER_RX(DGUS_Addr::STATUS_Pause, &DGUSRxHandler::PrintPause), + VP_HELPER_RX(DGUS_Addr::STATUS_Resume, &DGUSRxHandler::PrintResume), + + VP_HELPER_RX(DGUS_Addr::ADJUST_SetFeedrate, &DGUSRxHandler::Feedrate), + VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_CUR, &DGUSRxHandler::Flowrate), + #if HAS_MULTI_EXTRUDER + VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E0, &DGUSRxHandler::Flowrate), + VP_HELPER_RX(DGUS_Addr::ADJUST_SetFlowrate_E1, &DGUSRxHandler::Flowrate), + #endif + VP_HELPER_RX(DGUS_Addr::ADJUST_SetBabystep, &DGUSRxHandler::BabystepSet), + VP_HELPER_RX(DGUS_Addr::ADJUST_Babystep, &DGUSRxHandler::Babystep), + + VP_HELPER_RX(DGUS_Addr::TEMP_Preset, &DGUSRxHandler::TempPreset), + VP_HELPER_RX(DGUS_Addr::TEMP_SetTarget_Bed, &DGUSRxHandler::TempTarget), + VP_HELPER_RX(DGUS_Addr::TEMP_SetTarget_H0, &DGUSRxHandler::TempTarget), + #if HOTENDS > 1 + VP_HELPER_RX(DGUS_Addr::TEMP_SetTarget_H1, &DGUSRxHandler::TempTarget), + #endif + VP_HELPER_RX(DGUS_Addr::TEMP_Cool, &DGUSRxHandler::TempCool), + + VP_HELPER_RX(DGUS_Addr::STEPPER_Control, &DGUSRxHandler::Steppers), + + VP_HELPER_RX(DGUS_Addr::LEVEL_OFFSET_Set, &DGUSRxHandler::ZOffset), + VP_HELPER_RX(DGUS_Addr::LEVEL_OFFSET_Step, &DGUSRxHandler::ZOffsetStep), + VP_HELPER_RX(DGUS_Addr::LEVEL_OFFSET_SetStep, &DGUSRxHandler::ZOffsetSetStep), + + VP_HELPER_RX(DGUS_Addr::LEVEL_MANUAL_Point, &DGUSRxHandler::MoveToPoint), + + VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Probe, &DGUSRxHandler::Probe), + VP_HELPER_RX_NODATA(DGUS_Addr::LEVEL_AUTO_Disable, + &DGUSRxHandler::DisableABL), + + VP_HELPER_RX(DGUS_Addr::FILAMENT_Select, &DGUSRxHandler::FilamentSelect), + VP_HELPER_RX(DGUS_Addr::FILAMENT_SetLength, &DGUSRxHandler::FilamentLength), + VP_HELPER_RX(DGUS_Addr::FILAMENT_Move, &DGUSRxHandler::FilamentMove), + + VP_HELPER_RX(DGUS_Addr::MOVE_Home, &DGUSRxHandler::Home), + VP_HELPER_RX(DGUS_Addr::MOVE_SetX, &DGUSRxHandler::Move), + VP_HELPER_RX(DGUS_Addr::MOVE_SetY, &DGUSRxHandler::Move), + VP_HELPER_RX(DGUS_Addr::MOVE_SetZ, &DGUSRxHandler::Move), + VP_HELPER_RX(DGUS_Addr::MOVE_Step, &DGUSRxHandler::MoveStep), + VP_HELPER_RX(DGUS_Addr::MOVE_SetStep, &DGUSRxHandler::MoveSetStep), + + VP_HELPER_RX_NODATA(DGUS_Addr::GCODE_Clear, &DGUSRxHandler::GcodeClear), + VP_HELPER_RX_NODATA(DGUS_Addr::GCODE_Execute, &DGUSRxHandler::GcodeExecute), + + VP_HELPER_RX(DGUS_Addr::EEPROM_Reset, &DGUSRxHandler::ResetEEPROM), + + VP_HELPER_RX(DGUS_Addr::SETTINGS2_Extra, &DGUSRxHandler::SettingsExtra), + + VP_HELPER_RX(DGUS_Addr::PID_Select, &DGUSRxHandler::PIDSelect), + VP_HELPER_RX(DGUS_Addr::PID_SetTemp, &DGUSRxHandler::PIDSetTemp), + VP_HELPER_RX_NODATA(DGUS_Addr::PID_Run, &DGUSRxHandler::PIDRun), + + #if ENABLED(POWER_LOSS_RECOVERY) + VP_HELPER_RX(DGUS_Addr::POWERLOSS_Abort, &DGUSRxHandler::PowerLossAbort), + VP_HELPER_RX(DGUS_Addr::POWERLOSS_Resume, &DGUSRxHandler::PowerLossResume), + #endif + + VP_HELPER_RX(DGUS_Addr::WAIT_Abort, &DGUSRxHandler::WaitAbort), + VP_HELPER_RX_NODATA(DGUS_Addr::WAIT_Continue, &DGUSRxHandler::WaitContinue), + + // WRITE-ONLY VARIABLES + + #if ENABLED(SDSUPPORT) + VP_HELPER_TX(DGUS_Addr::SD_Type, &DGUSTxHandler::FileType), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName0, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName1, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName2, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName3, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_FileName4, + DGUS_FILENAME_LEN, + &DGUSTxHandler::FileName), + VP_HELPER_TX(DGUS_Addr::SD_ScrollIcons, &DGUSTxHandler::ScrollIcons), + VP_HELPER_TX_SIZE(DGUS_Addr::SD_SelectedFileName, + DGUS_FILENAME_LEN, + &DGUSTxHandler::SelectedFileName), + #endif + + VP_HELPER_TX_AUTO(DGUS_Addr::STATUS_PositionZ, + nullptr, + &DGUSTxHandler::PositionZ), + VP_HELPER(DGUS_Addr::STATUS_Ellapsed, + DGUS_ELLAPSED_LEN, + VPFLAG_AUTOUPLOAD, + nullptr, + nullptr, + &DGUSTxHandler::Ellapsed), + VP_HELPER_TX_AUTO(DGUS_Addr::STATUS_Percent, + nullptr, + &DGUSTxHandler::Percent), + VP_HELPER_TX(DGUS_Addr::STATUS_Icons, &DGUSTxHandler::StatusIcons), + + VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Feedrate, + &feedrate_percentage, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_CUR, + nullptr, + &DGUSTxHandler::Flowrate), + #if HAS_MULTI_EXTRUDER + VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_E0, + nullptr, + &DGUSTxHandler::Flowrate), + VP_HELPER_TX_AUTO(DGUS_Addr::ADJUST_Flowrate_E1, + nullptr, + &DGUSTxHandler::Flowrate), + #endif + + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_Bed, + &thermalManager.temp_bed.celsius, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_Bed, + &thermalManager.temp_bed.target, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX(DGUS_Addr::TEMP_Max_Bed, &DGUSTxHandler::TempMax), + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H0, + &thermalManager.temp_hotend[ExtUI::heater_t::H0].celsius, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H0, + &thermalManager.temp_hotend[ExtUI::heater_t::H0].target, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX(DGUS_Addr::TEMP_Max_H0, &DGUSTxHandler::TempMax), + #if HOTENDS > 1 + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Current_H1, + &thermalManager.temp_hotend[ExtUI::heater_t::H1].celsius, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_AUTO(DGUS_Addr::TEMP_Target_H1, + &thermalManager.temp_hotend[ExtUI::heater_t::H1].target, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX(DGUS_Addr::TEMP_Max_H1, &DGUSTxHandler::TempMax), + #endif + + VP_HELPER_TX_AUTO(DGUS_Addr::STEPPER_Status, + nullptr, + &DGUSTxHandler::StepperStatus), + + VP_HELPER_TX_AUTO(DGUS_Addr::LEVEL_OFFSET_Current, + &probe.offset.z, + (&DGUSTxHandler::ExtraToFixedPoint)), + VP_HELPER_TX_EXTRA(DGUS_Addr::LEVEL_OFFSET_StepIcons, + &DGUSScreenHandler::offset_steps, + &DGUSTxHandler::StepIcons), + + VP_HELPER_TX_AUTO(DGUS_Addr::LEVEL_AUTO_DisableIcon, + nullptr, + &DGUSTxHandler::ABLDisableIcon), + VP_HELPER_TX(DGUS_Addr::LEVEL_AUTO_Grid, &DGUSTxHandler::ABLGrid), + + VP_HELPER_TX_EXTRA(DGUS_Addr::LEVEL_PROBING_Icons1, + &DGUSScreenHandler::probing_icons[0], + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_TX_EXTRA(DGUS_Addr::LEVEL_PROBING_Icons2, + &DGUSScreenHandler::probing_icons[1], + &DGUSTxHandler::ExtraToInteger), + + VP_HELPER_TX(DGUS_Addr::FILAMENT_ExtruderIcons, &DGUSTxHandler::FilamentIcons), + VP_HELPER_TX_EXTRA(DGUS_Addr::FILAMENT_Length, + &DGUSScreenHandler::filament_length, + &DGUSTxHandler::ExtraToInteger), + + VP_HELPER_TX_AUTO(DGUS_Addr::MOVE_CurrentX, + ¤t_position.x, + (&DGUSTxHandler::ExtraToFixedPoint)), + VP_HELPER_TX_AUTO(DGUS_Addr::MOVE_CurrentY, + ¤t_position.y, + (&DGUSTxHandler::ExtraToFixedPoint)), + VP_HELPER_TX_AUTO(DGUS_Addr::MOVE_CurrentZ, + ¤t_position.z, + (&DGUSTxHandler::ExtraToFixedPoint)), + VP_HELPER_TX_EXTRA(DGUS_Addr::MOVE_StepIcons, + &DGUSScreenHandler::move_steps, + &DGUSTxHandler::StepIcons), + + VP_HELPER_TX(DGUS_Addr::SETTINGS2_BLTouch, &DGUSTxHandler::BLTouch), + + VP_HELPER_TX(DGUS_Addr::PID_HeaterIcons, &DGUSTxHandler::PIDIcons), + VP_HELPER_TX_EXTRA(DGUS_Addr::PID_Temp, + &DGUSScreenHandler::pid_temp, + &DGUSTxHandler::ExtraToInteger), + VP_HELPER_DWORD(DGUS_Addr::PID_Kp, + VPFLAG_AUTOUPLOAD, + nullptr, + nullptr, + &DGUSTxHandler::PIDKp), + VP_HELPER_DWORD(DGUS_Addr::PID_Ki, + VPFLAG_AUTOUPLOAD, + nullptr, + nullptr, + &DGUSTxHandler::PIDKi), + VP_HELPER_DWORD(DGUS_Addr::PID_Kd, + VPFLAG_AUTOUPLOAD, + nullptr, + nullptr, + &DGUSTxHandler::PIDKd), + + VP_HELPER(DGUS_Addr::INFOS_Machine, + DGUS_MACHINE_LEN, + VPFLAG_NONE, + (void*)DGUS_MACHINENAME, + nullptr, + &DGUSTxHandler::ExtraPGMToString), + VP_HELPER_TX_SIZE(DGUS_Addr::INFOS_BuildVolume, + DGUS_BUILDVOLUME_LEN, + &DGUSTxHandler::BuildVolume), + VP_HELPER(DGUS_Addr::INFOS_Version, + DGUS_VERSION_LEN, + VPFLAG_NONE, + (void*)DGUS_MARLINVERSION, + nullptr, + &DGUSTxHandler::ExtraPGMToString), + VP_HELPER_TX(DGUS_Addr::INFOS_TotalPrints, &DGUSTxHandler::TotalPrints), + VP_HELPER_TX(DGUS_Addr::INFOS_FinishedPrints, &DGUSTxHandler::FinishedPrints), + VP_HELPER_TX_SIZE(DGUS_Addr::INFOS_PrintTime, + DGUS_PRINTTIME_LEN, + &DGUSTxHandler::PrintTime), + VP_HELPER_TX_SIZE(DGUS_Addr::INFOS_LongestPrint, + DGUS_LONGESTPRINT_LEN, + &DGUSTxHandler::LongestPrint), + VP_HELPER_TX_SIZE(DGUS_Addr::INFOS_FilamentUsed, + DGUS_FILAMENTUSED_LEN, + &DGUSTxHandler::FilamentUsed), + + VP_HELPER_TX(DGUS_Addr::WAIT_Icons, &DGUSTxHandler::WaitIcons), + + // READ-WRITE VARIABLES + + VP_HELPER(DGUS_Addr::FAN0_Speed, + 2, + VPFLAG_AUTOUPLOAD, + nullptr, + &DGUSRxHandler::FanSpeed, + &DGUSTxHandler::FanSpeed), + + VP_HELPER(DGUS_Addr::GCODE_Data, + DGUS_GCODE_LEN, + VPFLAG_RXSTRING, + (void*)DGUSScreenHandler::gcode, + &DGUSRxHandler::StringToExtra, + &DGUSTxHandler::ExtraToString), + + VP_HELPER(DGUS_Addr::PID_Cycles, + 2, + VPFLAG_NONE, + &DGUSScreenHandler::pid_cycles, + &DGUSRxHandler::IntegerToExtra, + &DGUSTxHandler::ExtraToInteger), + + VP_HELPER(DGUS_Addr::VOLUME_Level, + 2, + VPFLAG_NONE, + nullptr, + &DGUSRxHandler::Volume, + &DGUSTxHandler::Volume), + + VP_HELPER(DGUS_Addr::BRIGHTNESS_Level, + 2, + VPFLAG_NONE, + nullptr, + &DGUSRxHandler::Brightness, + &DGUSTxHandler::Brightness), + + // SPECIAL CASES + + VP_HELPER_TX(DGUS_Addr::STATUS_Percent_Complete, &DGUSTxHandler::Percent), + VP_HELPER_RX_NODATA(DGUS_Addr::INFOS_Debug, &DGUSRxHandler::Debug), + + VP_HELPER((DGUS_Addr)0, 0, VPFLAG_NONE, nullptr, nullptr, nullptr) + +}; + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h new file mode 100644 index 000000000000..1a4f36882cf2 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/definition/DGUS_VPList.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "DGUS_VP.h" + +extern const struct DGUS_VP vp_list[]; diff --git a/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp new file mode 100644 index 000000000000..26f2dcbde9e7 --- /dev/null +++ b/Marlin/src/lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp @@ -0,0 +1,142 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/extui/dgus_reloaded/dgus_reloaded_extui.cpp + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(DGUS_LCD_UI_RELOADED) + +#include "../ui_api.h" +#include "DGUSScreenHandler.h" + +namespace ExtUI { + + void onStartup() { dgus_screen_handler.Init(); } + + void onIdle() { + static bool processing = false; + + // Prevent recursion + if (!processing) { + processing = true; + dgus_screen_handler.Loop(); + processing = false; + } + } + + void onPrinterKilled(PGM_P error, PGM_P component) { + dgus_screen_handler.PrinterKilled(error, component); + } + + void onMediaInserted() { TERN_(SDSUPPORT, dgus_screen_handler.SDCardInserted()); } + void onMediaError() { TERN_(SDSUPPORT, dgus_screen_handler.SDCardError()); } + void onMediaRemoved() { TERN_(SDSUPPORT, dgus_screen_handler.SDCardRemoved()); } + + void onPlayTone(const uint16_t frequency, const uint16_t duration) { + dgus_screen_handler.PlayTone(frequency, duration); + } + + void onPrintTimerStarted() { + dgus_screen_handler.PrintTimerStarted(); + } + + void onPrintTimerPaused() { + dgus_screen_handler.PrintTimerPaused(); + } + + void onPrintTimerStopped() { + dgus_screen_handler.PrintTimerStopped(); + } + + void onFilamentRunout(const extruder_t extruder) { + dgus_screen_handler.FilamentRunout(extruder); + } + + void onUserConfirmRequired(const char * const msg) { + dgus_screen_handler.UserConfirmRequired(msg); + } + + void onStatusChanged(const char * const msg) { + dgus_screen_handler.SetStatusMessage(msg); + } + + void onHomingStart() {} + void onHomingComplete() {} + void onPrintFinished() {} + + void onFactoryReset() { + dgus_screen_handler.SettingsReset(); + } + + void onStoreSettings(char *buff) { + dgus_screen_handler.StoreSettings(buff); + } + + void onLoadSettings(const char *buff) { + dgus_screen_handler.LoadSettings(buff); + } + + void onPostprocessSettings() {} + + void onConfigurationStoreWritten(bool success) { + dgus_screen_handler.ConfigurationStoreWritten(success); + } + + void onConfigurationStoreRead(bool success) { + dgus_screen_handler.ConfigurationStoreRead(success); + } + + #if HAS_MESH + void onMeshLevelingStart() {} + + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { + dgus_screen_handler.MeshUpdate(xpos, ypos); + } + + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { + if (state == G29_POINT_FINISH) + dgus_screen_handler.MeshUpdate(xpos, ypos); + } + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + void onPowerLossResume() { + // Called on resume from power-loss + dgus_screen_handler.PowerLossResume(); + } + #endif + + #if HAS_PID_HEATING + void onPidTuning(const result_t rst) { + // Called for temperature PID tuning result + dgus_screen_handler.PidTuning(rst); + } + #endif + + void onSteppersDisabled() {} + void onSteppersEnabled() {} +} + +#endif // DGUS_LCD_UI_RELOADED diff --git a/Marlin/src/lcd/extui/example.cpp b/Marlin/src/lcd/extui/example/example.cpp similarity index 87% rename from Marlin/src/lcd/extui/example.cpp rename to Marlin/src/lcd/extui/example/example.cpp index dd4b3312eb95..f74cbee91cf7 100644 --- a/Marlin/src/lcd/extui/example.cpp +++ b/Marlin/src/lcd/extui/example/example.cpp @@ -19,11 +19,11 @@ * location: . * ****************************************************************************/ -#include "../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if BOTH(EXTUI_EXAMPLE, EXTENSIBLE_UI) -#include "ui_api.h" +#include "../ui_api.h" // To implement a new UI, complete the functions below and // read or update Marlin's state using the methods in the @@ -70,7 +70,7 @@ namespace ExtUI { // into buff. // Example: - // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // static_assert(sizeof(myDataStruct) <= eeprom_data_size); // memcpy(buff, &myDataStruct, sizeof(myDataStruct)); } @@ -80,10 +80,14 @@ namespace ExtUI { // from buff // Example: - // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // static_assert(sizeof(myDataStruct) <= eeprom_data_size); // memcpy(&myDataStruct, buff, sizeof(myDataStruct)); } + void onPostprocessSettings() { + // Called after loading or resetting stored settings + } + void onConfigurationStoreWritten(bool success) { // Called after the entire EEPROM has been written, // whether successful or not. @@ -97,11 +101,11 @@ namespace ExtUI { #if HAS_MESH void onMeshLevelingStart() {} - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { // Called when any mesh points are updated } - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) { + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { // Called to indicate a special condition } #endif @@ -115,6 +119,13 @@ namespace ExtUI { #if HAS_PID_HEATING void onPidTuning(const result_t rst) { // Called for temperature PID tuning result + switch (rst) { + case PID_STARTED: break; + case PID_BAD_EXTRUDER_NUM: break; + case PID_TEMP_TOO_HIGH: break; + case PID_TUNING_TIMEOUT: break; + case PID_DONE: break; + } } #endif diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp index a64c237fa13f..8b0c0f877c2b 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp @@ -20,7 +20,7 @@ * location: . * ****************************************************************************/ -#include "../compat.h" +#include "../config.h" #if ENABLED(TOUCH_UI_FTDI_EVE) @@ -178,9 +178,9 @@ bool UIFlashStorage::is_present = false; if (!is_known) { SERIAL_ECHO_MSG("Unable to locate supported SPI Flash Memory."); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Manufacturer ID, got: ", manufacturer_id); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Device Type , got: ", device_type); - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR(" Capacity , got: ", capacity); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Manufacturer ID, got: ", manufacturer_id); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Device Type , got: ", device_type); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM(" Capacity , got: ", capacity); } return is_known; @@ -206,7 +206,7 @@ bool UIFlashStorage::is_present = false; /* In order to provide some degree of wear leveling, each data write to the * SPI Flash chip is appended to data that was already written before, until - * the data storage area is completely filled. New data is written preceeded + * the data storage area is completely filled. New data is written preceded * with a 32-bit delimiter 'LULZ', so that we can distinguish written and * unwritten data: * @@ -247,7 +247,7 @@ bool UIFlashStorage::is_present = false; case 0xFFFFFFFFul: return read_offset; case delimiter: read_offset = offset; break; default: - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("Invalid delimiter in Flash: ", delim); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Invalid delimiter in Flash: ", delim); return -1; } } @@ -325,7 +325,7 @@ bool UIFlashStorage::is_present = false; } SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Writing UI settings to SPI Flash (offset ", write_addr); + SERIAL_ECHOPGM("Writing UI settings to SPI Flash (offset ", write_addr); SERIAL_ECHOPGM(")..."); const uint32_t delim = delimiter; @@ -416,7 +416,7 @@ bool UIFlashStorage::is_present = false; /* Writes a media file from the SD card/USB flash drive into a slot on the SPI Flash. Media * files must be written sequentially following by a chip erase and it is not possible to * overwrite files. */ - UIFlashStorage::error_t UIFlashStorage::write_media_file(progmem_str filename, uint8_t slot) { + UIFlashStorage::error_t UIFlashStorage::write_media_file(FSTR_P filename, uint8_t slot) { #if ENABLED(SDSUPPORT) uint32_t addr; uint8_t buff[write_page_size]; @@ -509,7 +509,7 @@ bool UIFlashStorage::is_present = false; bytes_remaining = get_media_file_size(slot); if (bytes_remaining != 0xFFFFFFFFUL) { - SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR("Boot media file size:", bytes_remaining); + SERIAL_ECHO_START(); SERIAL_ECHOLNPGM("Boot media file size:", bytes_remaining); addr = get_media_file_start(slot); return true; } @@ -543,7 +543,7 @@ bool UIFlashStorage::is_present = false; void UIFlashStorage::write_config_data(const void *, size_t) {} bool UIFlashStorage::verify_config_data(const void *, size_t) {return false;} bool UIFlashStorage::read_config_data(void *, size_t ) {return false;} - UIFlashStorage::error_t UIFlashStorage::write_media_file(progmem_str, uint8_t) {return FILE_NOT_FOUND;} + UIFlashStorage::error_t UIFlashStorage::write_media_file(FSTR_P, uint8_t) {return FILE_NOT_FOUND;} void UIFlashStorage::format_flash() {} bool UIFlashStorage::BootMediaReader::isAvailable(uint32_t) {return false;} diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.h similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.h index eef8cf8677ca..0ca269a62819 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/flash_storage.h @@ -88,7 +88,7 @@ class UIFlashStorage : private SPIFlash { static void write_config_data (const void *data, size_t size); static bool verify_config_data (const void *data, size_t size); static bool read_config_data (void *data, size_t size); - static error_t write_media_file (progmem_str filename, uint8_t slot = 0); + static error_t write_media_file (FSTR_P filename, uint8_t slot = 0); class BootMediaReader; }; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp similarity index 93% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp index 9868492d81f5..b4165a742a5f 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp @@ -20,16 +20,14 @@ * location: . * ****************************************************************************/ -#include "../compat.h" +#include "../config.h" #if ENABLED(TOUCH_UI_FTDI_EVE) #include "media_file_reader.h" #if ENABLED(SDSUPPORT) - bool MediaFileReader::open(const char* filename) { - card.init(SD_SPI_SPEED, SDSS); - volume.init(&card); - root.openRoot(&volume); + bool MediaFileReader::open(const char *filename) { + root = CardReader::getroot(); return file.open(&root, filename, O_READ); } diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h similarity index 87% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h index be393a952c30..eb76bb9b2b2c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h @@ -22,23 +22,21 @@ #pragma once -#include "../../../../../inc/MarlinConfigPre.h" +#include "../../../../inc/MarlinConfigPre.h" #if ENABLED(SDSUPPORT) - #include "../../../../../sd/SdFile.h" - #include "../../../../../sd/cardreader.h" + #include "../../../../sd/SdFile.h" + #include "../../../../sd/cardreader.h" #endif class MediaFileReader { private: #if ENABLED(SDSUPPORT) - Sd2Card card; - SdVolume volume; - SdFile root, file; + SdFile root, file; #endif public: - bool open(const char* filename); + bool open(const char *filename); int16_t read(void *buff, size_t bytes); uint32_t size(); void rewind(); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp index cabcd5ded74e..40ec16a9dfe6 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_advanced_settings.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) - -#include "screens.h" +#ifdef FTDI_BIO_ADVANCED_SETTINGS_MENU using namespace FTDI; using namespace Theme; @@ -88,7 +87,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .tag(13) .button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_INTERFACE)) .tag(14) .button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_RESTORE_DEFAULTS)) .colors(action_btn) - .tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .tag(1). button( BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); #undef GRID_COLS #undef GRID_ROWS } @@ -134,4 +133,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO +#endif // FTDI_BIO_ADVANCED_SETTINGS_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.h new file mode 100644 index 000000000000..29a21fe5d992 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/advanced_settings.h @@ -0,0 +1,32 @@ +/*************************** + * bio_advanced_settings.h * + ***************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BIO_ADVANCED_SETTINGS_MENU +#define FTDI_BIO_ADVANCED_SETTINGS_MENU_CLASS AdvancedSettingsMenu + +class AdvancedSettingsMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp index 3f6b4116f189..a5511f94b9eb 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_e.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) - -#include "screens.h" +#ifdef FTDI_BIO_CONFIRM_HOME_E using namespace FTDI; @@ -37,7 +36,7 @@ bool BioConfirmHomeE::onTouchEnd(uint8_t tag) { switch (tag) { case 1: #if defined(AXIS_LEVELING_COMMANDS) && defined(PARK_AND_RELEASE_COMMANDS) - SpinnerDialogBox::enqueueAndWait_P(F( + SpinnerDialogBox::enqueueAndWait(F( "G28 E\n" AXIS_LEVELING_COMMANDS "\n" PARK_AND_RELEASE_COMMANDS @@ -54,4 +53,4 @@ bool BioConfirmHomeE::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO +#endif // FTDI_BIO_CONFIRM_HOME_E diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.h new file mode 100644 index 000000000000..151b784b935b --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_e.h @@ -0,0 +1,32 @@ +/**************************** + * bio_confirm_home_e.h * + ****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BIO_CONFIRM_HOME_E +#define FTDI_BIO_CONFIRM_HOME_E_CLASS BioConfirmHomeE + +class BioConfirmHomeE : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp index f712fdfff9ab..e34df42b84d3 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_confirm_home_xyz.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) - -#include "screens.h" +#ifdef FTDI_BIO_CONFIRM_HOME_XYZ using namespace FTDI; @@ -37,7 +36,7 @@ bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) { switch (tag) { case 1: #ifdef PARK_AND_RELEASE_COMMANDS - SpinnerDialogBox::enqueueAndWait_P(F( + SpinnerDialogBox::enqueueAndWait(F( "G28\n" PARK_AND_RELEASE_COMMANDS )); @@ -53,4 +52,4 @@ bool BioConfirmHomeXYZ::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO +#endif // FTDI_BIO_CONFIRM_HOME_XYZ diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.h new file mode 100644 index 000000000000..d8cb1cdb6742 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/confirm_home_xyz.h @@ -0,0 +1,32 @@ +/************************** + * bio_confirm_home_xyz.h * + **************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BIO_CONFIRM_HOME_XYZ +#define FTDI_BIO_CONFIRM_HOME_XYZ_CLASS BioConfirmHomeXYZ + +class BioConfirmHomeXYZ : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp similarity index 86% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp index 53203cd35e34..adc84dfa25ff 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) - -#include "screens.h" +#ifdef FTDI_BIO_MAIN_MENU using namespace FTDI; using namespace Theme; @@ -55,7 +54,7 @@ void MainMenu::onRedraw(draw_mode_t what) { .tag(8).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_ADVANCED_SETTINGS)) .tag(9).button(BTN_POS(1,9), BTN_SIZE(2,1), GET_TEXT_F(MSG_INFO_MENU)) .colors(action_btn) - .tag(1).button(BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button(BTN_POS(1,10), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); } #undef GRID_COLS @@ -68,21 +67,21 @@ bool MainMenu::onTouchEnd(uint8_t tag) { const bool e_homed = isAxisPositionKnown(E0); switch (tag) { - case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; - case 2: GOTO_SCREEN(BioConfirmHomeXYZ); break; - case 3: SpinnerDialogBox::enqueueAndWait_P(e_homed ? F("G0 E0 F120") : F("G112")); break; - case 4: StatusScreen::unlockMotors(); break; + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; + case 2: GOTO_SCREEN(BioConfirmHomeXYZ); break; + case 3: SpinnerDialogBox::enqueueAndWait(e_homed ? F("G0 E0 F120") : F("G112")); break; + case 4: StatusScreen::unlockMotors(); break; #ifdef AXIS_LEVELING_COMMANDS - case 5: SpinnerDialogBox::enqueueAndWait_P(F(AXIS_LEVELING_COMMANDS)); break; + case 5: SpinnerDialogBox::enqueueAndWait(F(AXIS_LEVELING_COMMANDS)); break; #endif - case 6: GOTO_SCREEN(TemperatureScreen); break; - case 7: GOTO_SCREEN(InterfaceSettingsScreen); break; - case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; - case 9: GOTO_SCREEN(AboutScreen); break; + case 6: GOTO_SCREEN(TemperatureScreen); break; + case 7: GOTO_SCREEN(InterfaceSettingsScreen); break; + case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; + case 9: GOTO_SCREEN(AboutScreen); break; default: return false; } return true; } -#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO +#endif // FTDI_BIO_MAIN_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.h new file mode 100644 index 000000000000..fdf977fcbfd9 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/main_menu.h @@ -0,0 +1,32 @@ +/********************* + * bio_main_menu.cpp * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BIO_MAIN_MENU +#define FTDI_BIO_MAIN_MENU_CLASS MainMenu + +class MainMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp index 65b996dd511d..f0c0a59d3658 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.cpp @@ -21,12 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) - -#include "screens.h" - -#include "../ftdi_eve_lib/extras/circular_progress.h" +#ifdef FTDI_BIO_PRINTING_DIALOG_BOX using namespace FTDI; using namespace ExtUI; @@ -35,7 +32,7 @@ using namespace Theme; #define GRID_COLS 2 #define GRID_ROWS 9 -void BioPrintingDialogBox::draw_status_message(draw_mode_t what, const char* message) { +void BioPrintingDialogBox::draw_status_message(draw_mode_t what, const char *message) { if (what & BACKGROUND) { CommandProcessor cmd; cmd.cmd(COLOR_RGB(bg_text_enabled)) @@ -108,13 +105,13 @@ bool BioPrintingDialogBox::onTouchEnd(uint8_t tag) { return true; } -void BioPrintingDialogBox::setStatusMessage(progmem_str message) { +void BioPrintingDialogBox::setStatusMessage(FSTR_P message) { char buff[strlen_P((const char*)message)+1]; strcpy_P(buff, (const char*) message); setStatusMessage(buff); } -void BioPrintingDialogBox::setStatusMessage(const char* message) { +void BioPrintingDialogBox::setStatusMessage(const char *message) { CommandProcessor cmd; cmd.cmd(CMD_DLSTART) .cmd(CLEAR_COLOR_RGB(bg_color)) @@ -127,8 +124,7 @@ void BioPrintingDialogBox::setStatusMessage(const char* message) { storeBackground(); #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("New status message: ", message); + SERIAL_ECHO_MSG("New status message: ", message); #endif if (AT_SCREEN(BioPrintingDialogBox)) @@ -148,4 +144,4 @@ void BioPrintingDialogBox::show() { GOTO_SCREEN(BioPrintingDialogBox); } -#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO +#endif // FTDI_BIO_PRINTING_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.h new file mode 100644 index 000000000000..b55038bef282 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/printing_dialog_box.h @@ -0,0 +1,44 @@ +/***************************** + * bio_printing_dialog_box.h * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BIO_PRINTING_DIALOG_BOX +#define FTDI_BIO_PRINTING_DIALOG_BOX_CLASS BioPrintingDialogBox + +class BioPrintingDialogBox : public BaseScreen, public CachedScreen { + private: + static void draw_status_message(draw_mode_t, const char * const); + static void draw_progress(draw_mode_t); + static void draw_time_remaining(draw_mode_t); + static void draw_interaction_buttons(draw_mode_t); + public: + static void onRedraw(draw_mode_t); + + static void show(); + + static void setStatusMessage(const char *); + static void setStatusMessage(FSTR_P); + + static void onIdle(); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h new file mode 100644 index 000000000000..7294c4aa0b10 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h @@ -0,0 +1,105 @@ +/************* + * screens.h * + *************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +/********************************* DL CACHE SLOTS ******************************/ + +// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This +// is done using the CLCD::DLCache class, which takes a unique ID for each +// cache location. These IDs are defined here: + +enum { + STATUS_SCREEN_CACHE, + MENU_SCREEN_CACHE, + TUNE_SCREEN_CACHE, + ALERT_BOX_CACHE, + SPINNER_CACHE, + ADVANCED_SETTINGS_SCREEN_CACHE, + TEMPERATURE_SCREEN_CACHE, + STEPS_SCREEN_CACHE, + MAX_FEEDRATE_SCREEN_CACHE, + MAX_VELOCITY_SCREEN_CACHE, + MAX_ACCELERATION_SCREEN_CACHE, + DEFAULT_ACCELERATION_SCREEN_CACHE, + FLOW_PERCENT_SCREEN_CACHE, + ZOFFSET_SCREEN_CACHE, + STEPPER_CURRENT_SCREEN_CACHE, + STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE, + PRINTING_SCREEN_CACHE, + FILES_SCREEN_CACHE, + INTERFACE_SETTINGS_SCREEN_CACHE, + INTERFACE_SOUNDS_SCREEN_CACHE, + LOCK_SCREEN_CACHE, + DISPLAY_TIMINGS_SCREEN_CACHE +}; + +// To save MCU RAM, the status message is "baked" in to the status screen +// cache, so we reserve a large chunk of memory for the DL cache + +#define STATUS_SCREEN_DL_SIZE 4096 +#define ALERT_BOX_DL_SIZE 3072 +#define SPINNER_DL_SIZE 3072 +#define FILE_SCREEN_DL_SIZE 4160 +#define PRINTING_SCREEN_DL_SIZE 2048 + +/************************* MENU SCREEN DECLARATIONS *************************/ + +#include "../generic/base_screen.h" +#include "../generic/base_numeric_adjustment_screen.h" +#include "../generic/dialog_box_base_class.h" +#include "../generic/boot_screen.h" +#include "../generic/about_screen.h" +#include "../generic/kill_screen.h" +#include "../generic/alert_dialog_box.h" +#include "../generic/spinner_dialog_box.h" +#include "../generic/restore_failsafe_dialog_box.h" +#include "../generic/save_settings_dialog_box.h" +#include "../generic/confirm_start_print_dialog_box.h" +#include "../generic/confirm_abort_print_dialog_box.h" +#include "../generic/confirm_user_request_alert_box.h" +#include "../generic/touch_calibration_screen.h" +#include "../generic/move_axis_screen.h" +#include "../generic/steps_screen.h" +#include "../generic/feedrate_percent_screen.h" +#include "../generic/max_velocity_screen.h" +#include "../generic/max_acceleration_screen.h" +#include "../generic/default_acceleration_screen.h" +#include "../generic/temperature_screen.h" +#include "../generic/interface_sounds_screen.h" +#include "../generic/interface_settings_screen.h" +#include "../generic/lock_screen.h" +#include "../generic/endstop_state_screen.h" +#include "../generic/display_tuning_screen.h" +#include "../generic/media_player_screen.h" +#include "../generic/statistics_screen.h" +#include "../generic/stepper_current_screen.h" +#include "../generic/stepper_bump_sensitivity_screen.h" +#include "../generic/leveling_menu.h" +#include "../generic/z_offset_screen.h" +#include "../generic/files_screen.h" + +#include "bio_status_screen.h" +#include "bio_main_menu.h" +#include "bio_tune_menu.h" +#include "bio_advanced_settings.h" +#include "bio_printing_dialog_box.h" +#include "bio_confirm_home_xyz.h" +#include "bio_confirm_home_e.h" diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp index 90d8d6251d3b..cdc303a89e88 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp @@ -22,17 +22,14 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) - -#include "screens.h" - -#include "../ftdi_eve_lib/extras/poly_ui.h" +#ifdef FTDI_BIO_STATUS_SCREEN #if ENABLED(TOUCH_UI_PORTRAIT) - #include "bio_printer_ui_portrait.h" + #include "ui_portrait.h" #else - #include "bio_printer_ui_landscape.h" + #include "ui_landscape.h" #endif #define GRID_COLS 2 @@ -319,7 +316,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { case 9: GOTO_SCREEN(FilesScreen); break; case 10: GOTO_SCREEN(MainMenu); break; case 13: GOTO_SCREEN(BioConfirmHomeE); break; - case 14: SpinnerDialogBox::enqueueAndWait_P(F("G28Z")); break; + case 14: SpinnerDialogBox::enqueueAndWait(F("G28Z")); break; case 15: GOTO_SCREEN(TemperatureScreen); break; case 16: fine_motion = !fine_motion; break; default: return false; @@ -357,7 +354,7 @@ bool StatusScreen::onTouchHeld(uint8_t tag) { return false; } -void StatusScreen::setStatusMessage(progmem_str pstr) { +void StatusScreen::setStatusMessage(FSTR_P pstr) { BioPrintingDialogBox::setStatusMessage(pstr); } @@ -376,4 +373,4 @@ void StatusScreen::onIdle() { } } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_BIO_STATUS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.h new file mode 100644 index 000000000000..458ddd19a0bd --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.h @@ -0,0 +1,56 @@ +/************************* + * bio_status_screen.cpp * + *************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BIO_STATUS_SCREEN +#define FTDI_BIO_STATUS_SCREEN_CLASS StatusScreen + +class StatusScreen : public BaseScreen, public CachedScreen { + private: + static float increment; + static bool jog_xy; + static bool fine_motion; + + static void draw_progress(draw_mode_t what); + static void draw_temperature(draw_mode_t what); + static void draw_syringe(draw_mode_t what); + static void draw_arrows(draw_mode_t what); + static void draw_overlay_icons(draw_mode_t what); + static void draw_fine_motion(draw_mode_t what); + static void draw_buttons(draw_mode_t what); + public: + static void loadBitmaps(); + static void unlockMotors(); + + static void setStatusMessage(const char *); + static void setStatusMessage(FSTR_P); + + static void onRedraw(draw_mode_t); + + static bool onTouchStart(uint8_t tag); + static bool onTouchHeld(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); + +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp similarity index 93% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp index dacc1cb6eaf6..48eff0a66149 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_LULZBOT_BIO) - -#include "screens.h" +#ifdef FTDI_BIO_TUNE_MENU using namespace FTDI; using namespace Theme; @@ -55,7 +54,7 @@ void TuneMenu::onRedraw(draw_mode_t what) { .enabled(!isPrinting()).tag(5).button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_MOVE_TO_HOME)) .enabled(!isPrinting()).tag(6).button(BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_RAISE_PLUNGER)) .enabled(!isPrinting()).tag(7).button(BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_RELEASE_XY_AXIS)) - .colors(action_btn) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .colors(action_btn) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); } #undef GRID_COLS #undef GRID_ROWS @@ -68,7 +67,7 @@ bool TuneMenu::onTouchEnd(uint8_t tag) { case 3: GOTO_SCREEN(TemperatureScreen); break; case 4: GOTO_SCREEN(NudgeNozzleScreen); break; case 5: GOTO_SCREEN(BioConfirmHomeXYZ); break; - case 6: SpinnerDialogBox::enqueueAndWait_P(F("G0 E0 F120")); break; + case 6: SpinnerDialogBox::enqueueAndWait(F("G0 E0 F120")); break; case 7: StatusScreen::unlockMotors(); break; default: return false; @@ -76,4 +75,4 @@ bool TuneMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_LULZBOT_BIO +#endif // FTDI_BIO_TUNE_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.h new file mode 100644 index 000000000000..52fe694f37bb --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/tune_menu.h @@ -0,0 +1,35 @@ +/******************* + * bio_tune_menu.h * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BIO_TUNE_MENU +#define FTDI_BIO_TUNE_MENU_CLASS TuneMenu + +class TuneMenu : public BaseScreen, public CachedScreen { + private: + static void pausePrint(); + static void resumePrint(); + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_landscape.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_landscape.h similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_landscape.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_landscape.h index 4faddc64b1d9..754f6e93e11d 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_landscape.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_landscape.h @@ -21,7 +21,6 @@ * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the * start of a new closed path. */ - #pragma once constexpr float x_min = 0.000000; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_portrait.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_portrait.h similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_portrait.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_portrait.h index 50fc5ab9f846..e8b42811224f 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printer_ui_portrait.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/ui_portrait.h @@ -21,7 +21,6 @@ * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the * start of a new closed path. */ - #pragma once constexpr float x_min = 0.000000; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_advanced_settings_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp similarity index 86% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_advanced_settings_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp index 656bf1db13d1..7549e8d54e93 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.cpp @@ -1,5 +1,5 @@ /***************************************** - * cocoa_press_advance_settings_menu.cpp * + * cocoa_press/advance_settings_menu.cpp * *****************************************/ /**************************************************************************** @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" +#ifdef COCOA_ADVANCED_SETTINGS_MENU using namespace FTDI; using namespace ExtUI; @@ -41,8 +40,7 @@ using namespace Theme; #define DISPLAY_POS BTN_POS(1,3), BTN_SIZE(1,1) #define INTERFACE_POS BTN_POS(2,3), BTN_SIZE(1,1) #define ENDSTOPS_POS BTN_POS(3,3), BTN_SIZE(1,1) -#define CASE_LIGHT_POS BTN_POS(1,4), BTN_SIZE(1,1) -#define RESTORE_DEFAULTS_POS BTN_POS(2,4), BTN_SIZE(1,1) +#define RESTORE_DEFAULTS_POS BTN_POS(1,4), BTN_SIZE(2,1) #define BACK_POS BTN_POS(3,4), BTN_SIZE(1,1) void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { @@ -67,11 +65,9 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .tag(8) .button(ENDSTOPS_POS, GET_TEXT_F(MSG_LCD_ENDSTOPS)) .tag(9) .button(INTERFACE_POS, GET_TEXT_F(MSG_INTERFACE)) .tag(10).button(DISPLAY_POS, GET_TEXT_F(MSG_DISPLAY_MENU)) - .enabled(ENABLED(CASE_LIGHT_ENABLE)) - .tag(11).button(CASE_LIGHT_POS, GET_TEXT_F(MSG_CASE_LIGHT)) - .tag(12).button(RESTORE_DEFAULTS_POS, GET_TEXT_F(MSG_RESTORE_DEFAULTS)) + .tag(11).button(RESTORE_DEFAULTS_POS, GET_TEXT_F(MSG_RESTORE_DEFAULTS)) .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } @@ -91,12 +87,9 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { case 8: GOTO_SCREEN(EndstopStatesScreen); break; case 9: GOTO_SCREEN(InterfaceSettingsScreen); LockScreen::check_passcode(); break; case 10: GOTO_SCREEN(DisplayTuningScreen); break; - #if ENABLED(CASE_LIGHT_ENABLE) - case 11: GOTO_SCREEN(CaseLightScreen); break; - #endif - case 12: GOTO_SCREEN(RestoreFailsafeDialogBox); LockScreen::check_passcode(); break; + case 11: GOTO_SCREEN(RestoreFailsafeDialogBox); LockScreen::check_passcode(); break; default: return false; } return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // COCOA_ADVANCED_SETTINGS_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.h new file mode 100644 index 000000000000..02f65572a29e --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/advanced_settings_menu.h @@ -0,0 +1,32 @@ +/*************************************** + * cocoa_press/advance_settings_menu.h * + ***************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_ADVANCED_SETTINGS_MENU +#define COCOA_ADVANCED_SETTINGS_MENU_CLASS AdvancedSettingsMenu + +class AdvancedSettingsMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_ui.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h similarity index 84% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_ui.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h index 5cbaced7f6b5..6a022289252d 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_ui.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/cocoa_press_ui.h @@ -11,7 +11,7 @@ * GNU General Public License for more details. * * * * To view a copy of the GNU General Public License, go to the following * - * location: . * + * location: . * ****************************************************************************/ /** @@ -21,7 +21,6 @@ * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the * start of a new closed path. */ - #pragma once constexpr float x_min = 0.000000; @@ -32,7 +31,7 @@ constexpr float y_max = 272.000000; const PROGMEM uint16_t syringe_outline[] = {0xED96, 0x14F0, 0xE65D, 0x10E9, 0xDED2, 0x0F9C, 0xD74B, 0x110E, 0xD01B, 0x1543, 0xCE80, 0x1836, 0xCE0A, 0x1C3A, 0xCE0F, 0x27AD, 0xCF0A, 0x2BD3, 0xD127, 0x2E5B, 0xD2A1, 0x2FF0, 0xD2A2, 0x9FC9, 0xD407, 0xA97A, 0xD7B9, 0xB10C, 0xD7BF, 0xBB58, 0xD978, 0xC2BE, 0xDD55, 0xC6EB, 0xDD58, 0xD159, 0xDE3B, 0xD3A8, 0xDFCF, 0xD3AF, 0xE0B8, 0xD04C, 0xE0B8, 0xC6EB, 0xE4A7, 0xC299, 0xE652, 0xBAF6, 0xE652, 0xB10C, 0xEA2E, 0xA8EA, 0xEB6C, 0x9E86, 0xEB6C, 0x2F58, 0xEF3C, 0x2B4E, 0xF003, 0x2583, 0xEFFD, 0x1AC2, 0xED96, 0x14F0, 0xED96, 0x14F0}; const PROGMEM uint16_t syringe_fluid[] = {0xDE73, 0x2512, 0xDA0C, 0x261D, 0xD5B8, 0x29A0, 0xD4AE, 0x2D87, 0xD4AE, 0x9F60, 0xD585, 0xA63B, 0xDE44, 0xA9DE, 0xE32A, 0xA942, 0xE7E3, 0xA6A5, 0xE930, 0xA342, 0xE95D, 0x9C1D, 0xE95B, 0x31B8, 0xE955, 0x2B63, 0xE867, 0x2A67, 0xE790, 0x28DE, 0xE342, 0x25CB, 0xDE73, 0x2512}; const PROGMEM uint16_t syringe[] = {0xED91, 0x1502, 0xE658, 0x10FB, 0xDECE, 0x0FAE, 0xD746, 0x1120, 0xD016, 0x1555, 0xCE7B, 0x1848, 0xCE05, 0x1C4D, 0xCE0A, 0x27BF, 0xCF05, 0x2BE5, 0xD122, 0x2E6E, 0xD29C, 0x3002, 0xD29D, 0x9FDB, 0xD402, 0xA98C, 0xD7B4, 0xB11F, 0xD7BA, 0xBB6A, 0xD973, 0xC2D1, 0xDD50, 0xC6FD, 0xDD53, 0xD16C, 0xDE36, 0xD3BA, 0xDFCA, 0xD3C2, 0xE0B3, 0xD05E, 0xE0B3, 0xC6FD, 0xE4A2, 0xC2AB, 0xE64D, 0xBB09, 0xE64D, 0xB11F, 0xEA29, 0xA8FC, 0xEB67, 0x9E98, 0xEB67, 0x2F6B, 0xEF37, 0x2B60, 0xEFFE, 0x2595, 0xEFF8, 0x1AD5, 0xED91, 0x1502, 0xED91, 0x1502, 0xFFFF, 0xD1CF, 0x1A7E, 0xD84F, 0x16DB, 0xDF19, 0x15A9, 0xE5E0, 0x16EA, 0xEC5B, 0x1AA4, 0xEC9D, 0x1D34, 0xEC9D, 0x20CC, 0xE5F1, 0x1D41, 0xDF02, 0x1C12, 0xD812, 0x1D41, 0xD166, 0x20CC, 0xD16C, 0x1B45, 0xD1CF, 0x1A7E, 0xFFFF, 0xE3BD, 0xACFD, 0xDE8E, 0xAF4F, 0xD988, 0xAC0F, 0xD7CC, 0xA8CD, 0xDD1C, 0xAAA9, 0xE287, 0xAA5B, 0xE655, 0xA8BE, 0xE3BD, 0xACFD, 0xFFFF, 0xE802, 0x2DC5, 0xE809, 0x343C, 0xE808, 0x9FC8, 0xE7E3, 0xA296, 0xE70D, 0xA4B1, 0xE2C9, 0xA70E, 0xDE4E, 0xA790, 0xD6A1, 0xA457, 0xD5FF, 0x9F2B, 0xD5FF, 0x2DFD, 0xD6B2, 0x2B72, 0xDA78, 0x2861, 0xDE9D, 0x276F, 0xE300, 0x2824, 0xE70D, 0x2B13, 0xE7FF, 0x2DB6, 0xE800, 0x2DC5, 0xE802, 0x2DC5, 0xFFFF, 0xE2ED, 0xBA8B, 0xE1CC, 0xBF52, 0xDF1C, 0xC165, 0xDC64, 0xBF99, 0xDB1B, 0xBAFF, 0xDB19, 0xB433, 0xDF04, 0xB552, 0xE2EF, 0xB438, 0xE2ED, 0xBA8B, 0xFFFF, 0xEC09, 0x2893, 0xE925, 0x2A08, 0xE57D, 0x261D, 0xE149, 0x246F, 0xDBDE, 0x24A0, 0xD6BC, 0x2795, 0xD484, 0x2A46, 0xD1C0, 0x2853, 0xD166, 0x251E, 0xD80D, 0x2151, 0xDF02, 0x200C, 0xE5F6, 0x2151, 0xEC9D, 0x251E, 0xEC09, 0x2893}; -const PROGMEM uint16_t unload_cartridge_btn[] = {0x0AAA, 0x0E1E, 0x57FF, 0x0E1E, 0x57FF, 0x33C3, 0x0AAA, 0x33C3, 0x0AAA, 0x0E1E}; +const PROGMEM uint16_t park_btn[] = {0x0AAA, 0x0E1E, 0x57FF, 0x0E1E, 0x57FF, 0x33C3, 0x0AAA, 0x33C3, 0x0AAA, 0x0E1E}; const PROGMEM uint16_t pause_btn[] = {0x47FF, 0xCA58, 0x7FFF, 0xCA58, 0x7FFF, 0xEFFE, 0x47FF, 0xEFFE, 0x47FF, 0xCA58}; const PROGMEM uint16_t load_chocolate_btn[] = {0x0AAA, 0x3D2C, 0x57FF, 0x3D2C, 0x57FF, 0x62D2, 0x0AAA, 0x62D2, 0x0AAA, 0x3D2C}; const PROGMEM uint16_t preheat_chocolate_btn[] = {0x0AAA, 0x6C3B, 0x57FF, 0x6C3B, 0x57FF, 0x91E0, 0x0AAA, 0x91E0, 0x0AAA, 0x6C3B}; @@ -49,6 +48,13 @@ const PROGMEM uint16_t h0_label[] = {0x62A9, 0x2A5A, 0x8FFE, 0x2A5A, 0x8FFE, 0x4 const PROGMEM uint16_t h0_temp[] = {0x62A9, 0x41E1, 0x8FFE, 0x41E1, 0x8FFE, 0x5968, 0x62A9, 0x5968, 0x62A9, 0x41E1}; const PROGMEM uint16_t h1_label[] = {0x8FFE, 0x2A5A, 0xBD53, 0x2A5A, 0xBD53, 0x41E1, 0x8FFE, 0x41E1, 0x8FFE, 0x2A5A}; const PROGMEM uint16_t h1_temp[] = {0x8FFE, 0x41E1, 0xBD53, 0x41E1, 0xBD53, 0x5968, 0x8FFE, 0x5968, 0x8FFE, 0x41E1}; -const PROGMEM uint16_t extrude_btn[] = {0xC859, 0xDD2B, 0xF5AE, 0xDD2B, 0xF5AE, 0xEFFE, 0xC859, 0xEFFE, 0xC859, 0xDD2B}; const PROGMEM uint16_t h2_label[] = {0x8FFE, 0x5E1D, 0xBD53, 0x5E1D, 0xBD53, 0x75A4, 0x8FFE, 0x75A4, 0x8FFE, 0x5E1D}; const PROGMEM uint16_t h2_temp[] = {0x8FFE, 0x75A4, 0xBD53, 0x75A4, 0xBD53, 0x8D2C, 0x8FFE, 0x8D2C, 0x8FFE, 0x75A4}; +const PROGMEM uint16_t extrude_btn[] = {0xC859, 0xDD2B, 0xF5AE, 0xDD2B, 0xF5AE, 0xEFFE, 0xC859, 0xEFFE, 0xC859, 0xDD2B}; +const PROGMEM uint16_t load_screen_extrude[] = {0x25FB, 0x89AE, 0x2F58, 0x89AE, 0x2F58, 0xAAF6, 0x3406, 0xAAF6, 0x2AAA, 0xBB9A, 0x214D, 0xAAF6, 0x25FB, 0xAAF6, 0x25FB, 0x89AE}; +const PROGMEM uint16_t load_screen_retract[] = {0x25FC, 0x790A, 0x2F58, 0x790A, 0x2F58, 0x57C2, 0x3406, 0x57C2, 0x2AAA, 0x471D, 0x214D, 0x57C2, 0x25FC, 0x57C2, 0x25FC, 0x790A}; +const PROGMEM uint16_t load_screen_back_btn[] = {0x1555, 0xCA58, 0xC553, 0xCA58, 0xC553, 0xEFFE, 0x1555, 0xEFFE, 0x1555, 0xCA58}; +const PROGMEM uint16_t load_screen_unload_btn[] = {0x4AAA, 0x8EBD, 0xC553, 0x8EBD, 0xC553, 0xB463, 0x4AAA, 0xB463, 0x4AAA, 0x8EBD}; +const PROGMEM uint16_t load_screen_load_btn[] = {0x4AAA, 0x5322, 0xC553, 0x5322, 0xC553, 0x78C7, 0x4AAA, 0x78C7, 0x4AAA, 0x5322}; +const PROGMEM uint16_t load_sreen_title[] = {0x4AAA, 0x1787, 0xC553, 0x1787, 0xC553, 0x3D2C, 0x4AAA, 0x3D2C, 0x4AAA, 0x1787}; +const PROGMEM uint16_t load_screen_increment[] = {0x1555, 0x2E1D, 0x3FFF, 0x2E1D, 0x3FFF, 0x3D2C, 0x1555, 0x3D2C, 0x1555, 0x2E1D}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp new file mode 100644 index 000000000000..3636b5da6cf3 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp @@ -0,0 +1,91 @@ +/********************************* + * cocoa_press/leveling_menu.cpp * + *********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" + +#if ENABLED(COCOA_LEVELING_MENU) + +#if BOTH(HAS_BED_PROBE, BLTOUCH) + #include "../../../../feature/bltouch.h" +#endif + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +#define GRID_ROWS 5 +#define GRID_COLS 3 +#define BED_MESH_TITLE_POS BTN_POS(1,1), BTN_SIZE(3,1) +#define PROBE_BED_POS BTN_POS(1,2), BTN_SIZE(1,1) +#define SHOW_MESH_POS BTN_POS(2,2), BTN_SIZE(1,1) +#define EDIT_MESH_POS BTN_POS(3,2), BTN_SIZE(1,1) +#define BLTOUCH_TITLE_POS BTN_POS(1,3), BTN_SIZE(3,1) +#define BLTOUCH_RESET_POS BTN_POS(1,4), BTN_SIZE(1,1) +#define BLTOUCH_TEST_POS BTN_POS(2,4), BTN_SIZE(1,1) +#define BACK_POS BTN_POS(1,5), BTN_SIZE(3,1) + +void LevelingMenu::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)) + .tag(0); + } + + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.font(font_large) + .cmd(COLOR_RGB(bg_text_enabled)) + .text(BED_MESH_TITLE_POS, GET_TEXT_F(MSG_BED_LEVELING)) + .text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH)) + .font(font_medium).colors(normal_btn) + .tag(2).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED)) + .enabled(ENABLED(HAS_MESH)) + .tag(3).button(SHOW_MESH_POS, GET_TEXT_F(MSG_MESH_VIEW)) + .enabled(ENABLED(HAS_MESH)) + .tag(4).button(EDIT_MESH_POS, GET_TEXT_F(MSG_EDIT_MESH)) + #undef GRID_COLS + #define GRID_COLS 2 + .tag(5).button(BLTOUCH_RESET_POS, GET_TEXT_F(MSG_BLTOUCH_RESET)) + .tag(6).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST)) + #undef GRID_COLS + #define GRID_COLS 3 + .colors(action_btn) + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); + } +} + +bool LevelingMenu::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + case 2: BedMeshViewScreen::doProbe(); break; + case 3: BedMeshViewScreen::show(); break; + case 4: BedMeshEditScreen::show(); break; + case 5: injectCommands_P(PSTR("M280 P0 S60")); break; + case 6: SpinnerDialogBox::enqueueAndWait(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; + default: return false; + } + return true; +} + +#endif // COCOA_LEVELING_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.h new file mode 100644 index 000000000000..827538024989 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.h @@ -0,0 +1,32 @@ +/******************************* + * cocoa_press/leveling_menu.h * + ******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_LEVELING_MENU +#define COCOA_LEVELING_MENU_CLASS LevelingMenu + +class LevelingMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp new file mode 100644 index 000000000000..d40b3be35460 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.cpp @@ -0,0 +1,218 @@ +/********************************** + * cocoa_press/load_chocolate.cpp * + **********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2020 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" +#include "../screen_data.h" + +#ifdef COCOA_LOAD_CHOCOLATE_SCREEN + +#include "cocoa_press_ui.h" + +#define POLY(A) PolyUI::poly_reader_t(A, sizeof(A)/sizeof(A[0])) + +const uint8_t shadow_depth = 5; + +using namespace ExtUI; +using namespace FTDI; +using namespace Theme; + +constexpr static LoadChocolateScreenData &mydata = screen_data.LoadChocolateScreen; + +void LoadChocolateScreen::draw_syringe(draw_mode_t what) { + #if ENABLED(COCOA_PRESS_CHOCOLATE_LEVEL_SENSOR) + const float fill_level = get_chocolate_fill_level(); + #else + constexpr float fill_level = 1.0f; + #endif + + CommandProcessor cmd; + PolyUI ui(cmd, what); + + if (what & BACKGROUND) { + // Paint the shadow for the syringe + ui.color(shadow_rgb); + ui.shadow(POLY(syringe_outline), shadow_depth); + } + + if (what & FOREGROUND) { + int16_t x, y, h, v; + + // Paint the syringe icon + ui.color(syringe_rgb); + ui.fill(POLY(syringe_outline)); + + ui.color(fluid_rgb); + ui.bounds(POLY(syringe_fluid), x, y, h, v); + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(SCISSOR_XY(x,y + v * (1.0 - fill_level))); + cmd.cmd(SCISSOR_SIZE(h, v * fill_level)); + ui.fill(POLY(syringe_fluid), false); + cmd.cmd(RESTORE_CONTEXT()); + + ui.color(stroke_rgb); + ui.fill(POLY(syringe)); + } +} + +void LoadChocolateScreen::draw_buttons(draw_mode_t what) { + int16_t x, y, h, v; + + CommandProcessor cmd; + PolyUI ui(cmd, what); + + cmd.font(font_medium).colors(normal_btn); + + ui.bounds(POLY(load_screen_unload_btn), x, y, h, v); + cmd.tag(2).button(x, y, h, v, GET_TEXT_F(MSG_FULL_UNLOAD)); + + ui.bounds(POLY(load_screen_load_btn), x, y, h, v); + cmd.tag(3).button(x, y, h, v, GET_TEXT_F(MSG_FULL_LOAD)); + + ui.bounds(POLY(load_screen_back_btn), x, y, h, v); + cmd.tag(1).colors(action_btn).button(x, y, h, v, GET_TEXT_F(MSG_BUTTON_DONE)); +} + +void LoadChocolateScreen::draw_text(draw_mode_t what) { + if (what & BACKGROUND) { + int16_t x, y, h, v; + + CommandProcessor cmd; + PolyUI ui(cmd, what); + + cmd.font(font_medium).cmd(COLOR_RGB(bg_text_enabled)); + + ui.bounds(POLY(load_sreen_title), x, y, h, v); + cmd.tag(2).text(x, y, h, v, GET_TEXT_F(MSG_LOAD_UNLOAD)); + + ui.bounds(POLY(load_screen_increment), x, y, h, v); + cmd.tag(3).text(x, y, h, v, GET_TEXT_F(MSG_INCREMENT)); + } +} + +void LoadChocolateScreen::draw_arrows(draw_mode_t what) { + CommandProcessor cmd; + PolyUI ui(cmd, what); + + ui.button_fill (fill_rgb); + ui.button_stroke(stroke_rgb, 28); + ui.button_shadow(shadow_rgb, shadow_depth); + + constexpr uint8_t style = PolyUI::REGULAR; + + ui.button(4, POLY(load_screen_extrude), style); + ui.button(5, POLY(load_screen_retract), style); +} + +void LoadChocolateScreen::onEntry() { + mydata.repeat_tag = 0; +} + +void LoadChocolateScreen::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .tag(0); + } + + draw_syringe(what); + draw_arrows(what); + draw_buttons(what); + draw_text(what); +} + +bool LoadChocolateScreen::onTouchStart(uint8_t) { + mydata.repeat_tag = 0; + return true; +} + +bool LoadChocolateScreen::onTouchEnd(uint8_t tag) { + using namespace ExtUI; + switch (tag) { + case 2: + mydata.repeat_tag = (mydata.repeat_tag == 2) ? 0 : 2; + break; + case 3: + mydata.repeat_tag = (mydata.repeat_tag == 3) ? 0 : 3; + break; + case 1: GOTO_PREVIOUS(); break; + } + return true; +} + +void LoadChocolateScreen::setManualFeedrateAndIncrement(float feedrate_mm_s, float &increment_mm) { + // Compute increment so feedrate so that the tool lags the adjuster when it is + // being held down, this allows enough margin for the planner to + // connect segments and even out the motion. + ExtUI::setFeedrate_mm_s(feedrate_mm_s); + increment_mm = feedrate_mm_s / ((TOUCH_REPEATS_PER_SECOND) * 0.80f); +} + +bool LoadChocolateScreen::onTouchHeld(uint8_t tag) { + if (ExtUI::isMoving()) return false; // Don't allow moves to accumulate + float increment; + setManualFeedrateAndIncrement(20, increment); + #define UI_INCREMENT_AXIS(axis) UI_INCREMENT(AxisPosition_mm, axis); + #define UI_DECREMENT_AXIS(axis) UI_DECREMENT(AxisPosition_mm, axis); + switch (tag) { + case 2: { + if (get_chocolate_fill_level() < 0.1) { + mydata.repeat_tag = 0; + return false; + } + UI_INCREMENT_AXIS(E0); + break; + } + case 3: { + if (get_chocolate_fill_level() > 0.75) { + mydata.repeat_tag = 0; + return false; + } + UI_DECREMENT_AXIS(E0); + break; + } + case 4: + UI_INCREMENT_AXIS(E0); + break; + case 5: + UI_DECREMENT_AXIS(E0); + break; + default: return false; + } + #undef UI_DECREMENT_AXIS + #undef UI_INCREMENT_AXIS + return false; +} + +void LoadChocolateScreen::onIdle() { + reset_menu_timeout(); + if (mydata.repeat_tag) onTouchHeld(mydata.repeat_tag); + if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { + if (!EventLoop::is_touch_held()) + onRefresh(); + refresh_timer.start(); + } + BaseScreen::onIdle(); +} +#endif // COCOA_LOAD_CHOCOLATE_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.h new file mode 100644 index 000000000000..4a582f0212f8 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/load_chocolate.h @@ -0,0 +1,47 @@ +/******************************** + * cocoa_press/load_chocolate.h * + ********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2020 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_LOAD_CHOCOLATE_SCREEN +#define COCOA_LOAD_CHOCOLATE_SCREEN_CLASS LoadChocolateScreen + +struct LoadChocolateScreenData { + uint8_t repeat_tag; +}; + +class LoadChocolateScreen : public BaseScreen, public CachedScreen { + private: + static void draw_syringe(draw_mode_t what); + static void draw_arrows(draw_mode_t what); + static void draw_buttons(draw_mode_t what); + static void draw_text(draw_mode_t what); + public: + static void setManualFeedrateAndIncrement(float feedrate_mm_s, float &increment); + static void onEntry(); + static void onIdle(); + static void onRedraw(draw_mode_t); + static bool onTouchStart(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp similarity index 51% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_main_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp index 9c8ad062aae1..3fe17b72d5eb 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp @@ -1,5 +1,5 @@ /***************************** - * cocoa_press_main_menu.cpp * + * cocoa_press/main_menu.cpp * *****************************/ /**************************************************************************** @@ -22,25 +22,27 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" +#ifdef COCOA_MAIN_MENU using namespace FTDI; using namespace Theme; -#define GRID_ROWS 4 +#define GRID_ROWS 6 #define GRID_COLS 2 -#define MOVE_XYZ_POS BTN_POS(1,1), BTN_SIZE(1,1) +#define ZPROBE_ZOFFSET_POS BTN_POS(1,1), BTN_SIZE(1,1) +#define MOVE_XYZ_POS BTN_POS(1,2), BTN_SIZE(1,1) #define TEMPERATURE_POS BTN_POS(2,1), BTN_SIZE(1,1) -#define ZPROBE_ZOFFSET_POS BTN_POS(1,2), BTN_SIZE(1,1) #define MOVE_E_POS BTN_POS(2,2), BTN_SIZE(1,1) #define SPEED_POS BTN_POS(1,3), BTN_SIZE(1,1) -#define ADVANCED_SETTINGS_POS BTN_POS(2,3), BTN_SIZE(1,1) -#define ABOUT_PRINTER_POS BTN_POS(1,4), BTN_SIZE(1,1) -#define BACK_POS BTN_POS(2,4), BTN_SIZE(1,1) +#define FLOW_POS BTN_POS(2,3), BTN_SIZE(1,1) +#define ADVANCED_SETTINGS_POS BTN_POS(1,4), BTN_SIZE(1,1) +#define DISABLE_STEPPERS_POS BTN_POS(2,4), BTN_SIZE(1,1) +#define LEVELING_POS BTN_POS(1,5), BTN_SIZE(1,1) +#define ABOUT_PRINTER_POS BTN_POS(2,5), BTN_SIZE(1,1) +#define BACK_POS BTN_POS(1,6), BTN_SIZE(2,1) void MainMenu::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { @@ -53,16 +55,20 @@ void MainMenu::onRedraw(draw_mode_t what) { CommandProcessor cmd; cmd.colors(normal_btn) .font(Theme::font_medium) - .tag(2).button(MOVE_XYZ_POS, GET_TEXT_F(MSG_XYZ_MOVE)) - .tag(3).button(TEMPERATURE_POS, GET_TEXT_F(MSG_TEMPERATURE)) + .tag( 2).button(MOVE_XYZ_POS, GET_TEXT_F(MSG_XYZ_MOVE)) + .tag( 3).button(TEMPERATURE_POS, GET_TEXT_F(MSG_TEMPERATURE)) .enabled(BOTH(HAS_LEVELING, HAS_BED_PROBE)) - .tag(4).button(ZPROBE_ZOFFSET_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) - .tag(5).button(MOVE_E_POS, GET_TEXT_F(MSG_E_MOVE)) - .tag(6).button(SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED)) - .tag(7).button(ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS)) - .tag(8).button(ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU)) + .tag( 4).button(ZPROBE_ZOFFSET_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) + .tag( 5).button(MOVE_E_POS, GET_TEXT_F(MSG_E_MOVE)) + .tag( 6).button(SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED)) + .tag( 7).button(FLOW_POS, GET_TEXT_F(MSG_FLOW)) + .tag( 8).button(ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS)) + .tag( 9).button(DISABLE_STEPPERS_POS, GET_TEXT_F(MSG_DISABLE_STEPPERS)) + .enabled(HAS_LEVELING) + .tag(10).button(LEVELING_POS, GET_TEXT_F(MSG_LEVELING)) + .tag(11).button(ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU)) .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } @@ -70,20 +76,25 @@ bool MainMenu::onTouchEnd(uint8_t tag) { using namespace ExtUI; switch (tag) { - case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; - case 2: GOTO_SCREEN(MoveXYZScreen); break; - case 3: GOTO_SCREEN(TemperatureScreen); break; + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; + case 2: GOTO_SCREEN(MoveXYZScreen); break; + case 3: GOTO_SCREEN(TemperatureScreen); break; #if BOTH(HAS_LEVELING, HAS_BED_PROBE) - case 4: GOTO_SCREEN(ZOffsetScreen); break; + case 4: GOTO_SCREEN(ZOffsetScreen); break; + #endif + case 5: GOTO_SCREEN(MoveEScreen); break; + case 6: GOTO_SCREEN(FeedratePercentScreen); break; + case 7: GOTO_SCREEN(FlowPercentScreen); break; + case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; + case 9: injectCommands_P(PSTR("M84")); break; + #if HAS_LEVELING + case 10: GOTO_SCREEN(LevelingMenu); break; #endif - case 5: GOTO_SCREEN(MoveEScreen); break; - case 6: GOTO_SCREEN(FeedratePercentScreen); break; - case 7: GOTO_SCREEN(AdvancedSettingsMenu); break; - case 8: GOTO_SCREEN(AboutScreen); break; + case 11: GOTO_SCREEN(AboutScreen); break; default: return false; } return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // COCOA_MAIN_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.h new file mode 100644 index 000000000000..460bb4b81a70 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.h @@ -0,0 +1,33 @@ +/*************************** + * cocoa_press/main_menu.h * + ***************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_MAIN_MENU +#define COCOA_MAIN_MENU_CLASS MainMenu + +class MainMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_e_screen.cpp similarity index 76% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_e_screen.cpp index 61411afa1bde..f7dbc466c7de 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_e_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_e_screen.cpp @@ -1,5 +1,5 @@ /********************************* - * cocoa_press_move_e_screen.cpp * + * cocoa_press/move_e_screen.cpp * *********************************/ /**************************************************************************** @@ -22,31 +22,32 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" -#include "screen_data.h" +#ifdef COCOA_MOVE_E_SCREEN using namespace FTDI; using namespace ExtUI; +constexpr static MoveAxisScreenData &mydata = screen_data.MoveAxisScreen; + void MoveEScreen::onRedraw(draw_mode_t what) { widgets_t w(what); - w.precision(1); + w.precision(1, DEFAULT_MIDRANGE); w.units(GET_TEXT_F(MSG_UNITS_MM)); w.heading( GET_TEXT_F(MSG_E_MOVE)); w.color(Theme::e_axis); #if EXTRUDERS == 1 - w.adjuster( 8, GET_TEXT_F(MSG_AXIS_E), screen_data.MoveAxis.e_rel[0], canMove(E0)); + w.adjuster( 8, GET_TEXT_F(MSG_AXIS_E), mydata.e_rel[0], canMove(E0)); #elif HAS_MULTI_EXTRUDER - w.adjuster( 8, GET_TEXT_F(MSG_AXIS_E1), screen_data.MoveAxis.e_rel[0], canMove(E0)); - w.adjuster( 10, GET_TEXT_F(MSG_AXIS_E2), screen_data.MoveAxis.e_rel[1], canMove(E1)); + w.adjuster( 8, GET_TEXT_F(MSG_AXIS_E1), mydata.e_rel[0], canMove(E0)); + w.adjuster( 10, GET_TEXT_F(MSG_AXIS_E2), mydata.e_rel[1], canMove(E1)); #if EXTRUDERS > 2 - w.adjuster( 12, GET_TEXT_F(MSG_AXIS_E3), screen_data.MoveAxis.e_rel[2], canMove(E2)); + w.adjuster( 12, GET_TEXT_F(MSG_AXIS_E3), mydata.e_rel[2], canMove(E2)); #endif #if EXTRUDERS > 3 - w.adjuster( 14, GET_TEXT_F(MSG_AXIS_E4), screen_data.MoveAxis.e_rel[3], canMove(E3)); + w.adjuster( 14, GET_TEXT_F(MSG_AXIS_E4), mydata.e_rel[3], canMove(E3)); #endif #endif w.increments(); @@ -59,4 +60,4 @@ void MoveEScreen::onIdle() { } BaseScreen::onIdle(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // COCOA_MOVE_E_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_e_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_e_screen.h new file mode 100644 index 000000000000..0cede6f0c5e2 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_e_screen.h @@ -0,0 +1,33 @@ +/******************************* + * cocoa_press/move_e_screen.h * + *******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_MOVE_E_SCREEN +#define COCOA_MOVE_E_SCREEN_CLASS MoveEScreen + +class MoveEScreen : public BaseMoveAxisScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_xyz_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_xyz_screen.cpp similarity index 90% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_xyz_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_xyz_screen.cpp index 52a70448cd38..8e80bd53a9e1 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_move_xyz_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_xyz_screen.cpp @@ -1,6 +1,6 @@ -/************************************ - * cocoa_press_move_xyz_screen.cpp * - ************************************/ +/*********************************** + * cocoa_press/move_xyz_screen.cpp * + ***********************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * @@ -22,11 +22,10 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" -#include "screen_data.h" +#ifdef COCOA_MOVE_XYZ_SCREEN using namespace FTDI; using namespace ExtUI; @@ -50,4 +49,4 @@ void MoveXYZScreen::onIdle() { } BaseScreen::onIdle(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // COCOA_MOVE_XYZ_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_xyz_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_xyz_screen.h new file mode 100644 index 000000000000..015f5b30e4a5 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/move_xyz_screen.h @@ -0,0 +1,33 @@ +/********************************* + * cocoa_press/move_xyz_screen.h * + *********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_MOVE_XYZ_SCREEN +#define COCOA_MOVE_XYZ_SCREEN_CLASS MoveXYZScreen + +class MoveXYZScreen : public BaseMoveAxisScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp similarity index 88% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp index 99c0c1b66439..424e0afa7624 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp @@ -1,5 +1,5 @@ /******************************** - * cocoa_press_preheat_menu.cpp * + * cocoa_press/preheat_menu.cpp * ********************************/ /**************************************************************************** @@ -20,10 +20,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" +#ifdef COCOA_PREHEAT_MENU using namespace FTDI; using namespace ExtUI; @@ -33,7 +32,7 @@ using namespace Theme; #define GRID_COLS 2 void PreheatMenu::onRedraw(draw_mode_t what) { - const int16_t w = has_extra_heater() ? BTN_W(1) : BTN_W(2); + const int16_t w = TERN0(COCOA_PRESS_EXTRA_HEATER, has_extra_heater() ? BTN_W(1) : BTN_W(2)); const int16_t h = BTN_H(1); if (what & BACKGROUND) { @@ -43,10 +42,12 @@ void PreheatMenu::onRedraw(draw_mode_t what) { .tag(0) .cmd(COLOR_RGB(bg_text_enabled)) .font(Theme::font_medium) - .text ( BTN_POS(1,1), w, h, GET_TEXT_F(MSG_INTERNAL)); - if (has_extra_heater()) { + .text( BTN_POS(1,1), w, h, GET_TEXT_F(MSG_SELECT_CHOCOLATE_TYPE)); + #if ENABLED(COCOA_PRESS_EXTRA_HEATER) + if (has_extra_heater()) { cmd.text( BTN_POS(2,1), w, h, GET_TEXT_F(MSG_EXTERNAL)); - } + } + #endif } if (what & FOREGROUND) { @@ -56,13 +57,15 @@ void PreheatMenu::onRedraw(draw_mode_t what) { .tag(2).button(BTN_POS(1,2), w, h, F("Dark Chocolate")) .tag(3).button(BTN_POS(1,3), w, h, F("Milk Chocolate")) .tag(4).button(BTN_POS(1,4), w, h, F("White Chocolate")); - if (has_extra_heater()) { + #if ENABLED(COCOA_PRESS_EXTRA_HEATER) + if (has_extra_heater()) { cmd.tag(5).button(BTN_POS(2,2), w, h, F("Dark Chocolate")) .tag(6).button(BTN_POS(2,3), w, h, F("Milk Chocolate")) .tag(7).button(BTN_POS(2,4), w, h, F("White Chocolate")); - } + } + #endif cmd.colors(action_btn) - .tag(1) .button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .tag(1) .button(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); } } @@ -110,4 +113,4 @@ bool PreheatMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // COCOA_PREHEAT_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.h new file mode 100644 index 000000000000..46bded7df490 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.h @@ -0,0 +1,31 @@ +/****************************** + * cocoa_press/preheat_menu.h * + ******************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2020 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_PREHEAT_MENU +#define COCOA_PREHEAT_MENU_CLASS PreheatMenu + +class PreheatMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp similarity index 71% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp index c9caef6524a7..c4e9d971f6a7 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_preheat_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.cpp @@ -1,6 +1,6 @@ -/**************************** - * preheat_timer_screen.cpp * - ****************************/ +/*************************************** + * cocoapress/preheat_timer_screen.cpp * + ***************************************/ /**************************************************************************** * Written By Marcio Teixeira 2019 - Cocoa Press * @@ -20,18 +20,17 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" -#include "screen_data.h" - -#include "../ftdi_eve_lib/extras/circular_progress.h" +#ifdef COCOA_PREHEAT_SCREEN using namespace FTDI; using namespace ExtUI; using namespace Theme; +constexpr static PreheatTimerScreenData &mydata = screen_data.PreheatTimerScreen; + #define GRID_COLS 2 #define GRID_ROWS 8 @@ -54,7 +53,7 @@ void PreheatTimerScreen::draw_message(draw_mode_t what) { } uint16_t PreheatTimerScreen::secondsRemaining() { - const uint32_t elapsed_sec = (millis() - screen_data.PreheatTimer.start_ms) / 1000; + const uint32_t elapsed_sec = (millis() - mydata.start_ms) / 1000; return (COCOA_PRESS_PREHEAT_SECONDS > elapsed_sec) ? COCOA_PRESS_PREHEAT_SECONDS - elapsed_sec : 0; } @@ -78,29 +77,19 @@ void PreheatTimerScreen::draw_interaction_buttons(draw_mode_t what) { CommandProcessor cmd; cmd.colors(normal_btn) .font(font_medium) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } -void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, progmem_str label, float value, int16_t x, int16_t y, int16_t w, int16_t h) { +void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, FSTR_P label, float value, int16_t x, int16_t y, int16_t w, int16_t h) { #define SUB_COLS 9 #define SUB_ROWS 2 - #define SUB_GRID_W(W) ((W)*w/SUB_COLS) - #define SUB_GRID_H(H) ((H)*h/SUB_ROWS) - #define SUB_GRID_X(X) (SUB_GRID_W((X)-1) + x) - #define SUB_GRID_Y(Y) (SUB_GRID_H((Y)-1) + y) - #define SUB_X(X) (SUB_GRID_X(X) + MARGIN_L) - #define SUB_Y(Y) (SUB_GRID_Y(Y) + MARGIN_T) - #define SUB_W(W) (SUB_GRID_W(W) - MARGIN_L - MARGIN_R) - #define SUB_H(H) (SUB_GRID_H(H) - MARGIN_T - MARGIN_B) - #define SUB_POS(X,Y) SUB_X(X), SUB_Y(Y) - #define SUB_SIZE(W,H) SUB_W(W), SUB_H(H) CommandProcessor cmd; cmd.tag(0) .font(font_small); if (what & BACKGROUND) { - cmd.text( SUB_POS(1,1), SUB_SIZE(9,1), label) + cmd.text( SUB_POS(1,1), SUB_SIZE(9,1), label) .button(SUB_POS(1,2), SUB_SIZE(5,1), F(""), OPT_FLAT); } @@ -118,27 +107,27 @@ void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, progmem_st } void PreheatTimerScreen::onEntry() { - screen_data.PreheatTimer.start_ms = millis(); + mydata.start_ms = millis(); } void PreheatTimerScreen::onRedraw(draw_mode_t what) { draw_message(what); draw_time_remaining(what); draw_interaction_buttons(what); - draw_adjuster(what, 1, GET_TEXT_F(MSG_NOZZLE), getTargetTemp_celsius(E0), NOZZLE_ADJ_POS); - draw_adjuster(what, 3, GET_TEXT_F(MSG_BODY), getTargetTemp_celsius(E1), BODY_ADJ_POS); - draw_adjuster(what, 5, GET_TEXT_F(MSG_CHAMBER), getTargetTemp_celsius(CHAMBER), CHAMBER_ADJ_POS); + draw_adjuster(what, 2, GET_TEXT_F(MSG_NOZZLE), getTargetTemp_celsius(E0), NOZZLE_ADJ_POS); + draw_adjuster(what, 4, GET_TEXT_F(MSG_BODY), getTargetTemp_celsius(E1), BODY_ADJ_POS); + draw_adjuster(what, 6, GET_TEXT_F(MSG_CHAMBER), getTargetTemp_celsius(CHAMBER), CHAMBER_ADJ_POS); } bool PreheatTimerScreen::onTouchHeld(uint8_t tag) { - const float increment = (tag == 5 || tag == 6) ? 1 : 0.1; + const float increment = (tag == 6 || tag == 7) ? 1 : 0.1; switch (tag) { - case 1: UI_DECREMENT(TargetTemp_celsius, E0); break; - case 2: UI_INCREMENT(TargetTemp_celsius, E0); break; - case 3: UI_DECREMENT(TargetTemp_celsius, E1); break; - case 4: UI_INCREMENT(TargetTemp_celsius, E1); break; - case 5: UI_DECREMENT(TargetTemp_celsius, CHAMBER); break; - case 6: UI_INCREMENT(TargetTemp_celsius, CHAMBER); break; + case 2: UI_DECREMENT(TargetTemp_celsius, E0); break; + case 3: UI_INCREMENT(TargetTemp_celsius, E0); break; + case 4: UI_DECREMENT(TargetTemp_celsius, E1); break; + case 5: UI_INCREMENT(TargetTemp_celsius, E1); break; + case 6: UI_DECREMENT(TargetTemp_celsius, CHAMBER); break; + case 7: UI_INCREMENT(TargetTemp_celsius, CHAMBER); break; default: return false; } @@ -148,7 +137,7 @@ bool PreheatTimerScreen::onTouchHeld(uint8_t tag) { bool PreheatTimerScreen::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); return true; - default: break; + default: return current_screen.onTouchHeld(tag); } return false; } @@ -169,4 +158,4 @@ void PreheatTimerScreen::onIdle() { BaseScreen::onIdle(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // COCOA_PREHEAT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.h new file mode 100644 index 000000000000..87628c4cab91 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_screen.h @@ -0,0 +1,46 @@ +/********************************* + * cocoapress/preheat_screen.cpp * + *********************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define COCOA_PREHEAT_SCREEN +#define COCOA_PREHEAT_SCREEN_CLASS PreheatTimerScreen + +struct PreheatTimerScreenData { + uint32_t start_ms; +}; + +class PreheatTimerScreen : public BaseScreen, public CachedScreen { + private: + static uint16_t secondsRemaining(); + + static void draw_message(draw_mode_t); + static void draw_time_remaining(draw_mode_t); + static void draw_interaction_buttons(draw_mode_t); + static void draw_adjuster(draw_mode_t, uint8_t tag, FSTR_P label, float value, int16_t x, int16_t y, int16_t w, int16_t h); + public: + static void onRedraw(draw_mode_t); + + static void onEntry(); + static void onIdle(); + static bool onTouchHeld(uint8_t tag); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h new file mode 100644 index 000000000000..8481e446c425 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h @@ -0,0 +1,134 @@ +/************* + * screens.h * + *************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + + +/********************************* DL CACHE SLOTS ******************************/ + +// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This +// is done using the CLCD::DLCache class, which takes a unique ID for each +// cache location. These IDs are defined here: + +enum { + STATUS_SCREEN_CACHE, + MENU_SCREEN_CACHE, + TUNE_SCREEN_CACHE, + ALERT_BOX_CACHE, + SPINNER_CACHE, + ADVANCED_SETTINGS_SCREEN_CACHE, + MOVE_AXIS_SCREEN_CACHE, + TEMPERATURE_SCREEN_CACHE, + STEPS_SCREEN_CACHE, + MAX_FEEDRATE_SCREEN_CACHE, + MAX_VELOCITY_SCREEN_CACHE, + MAX_ACCELERATION_SCREEN_CACHE, + DEFAULT_ACCELERATION_SCREEN_CACHE, + FLOW_PERCENT_SCREEN_CACHE, + LEVELING_SCREEN_CACHE, + ZOFFSET_SCREEN_CACHE, + BED_MESH_VIEW_SCREEN_CACHE, + BED_MESH_EDIT_SCREEN_CACHE, + STEPPER_CURRENT_SCREEN_CACHE, + #if HAS_JUNCTION_DEVIATION + JUNC_DEV_SCREEN_CACHE, + #else + JERK_SCREEN_CACHE, + #endif + CASE_LIGHT_SCREEN_CACHE, + FILAMENT_MENU_CACHE, + LINEAR_ADVANCE_SCREEN_CACHE, + PREHEAT_MENU_CACHE, + PREHEAT_TIMER_SCREEN_CACHE, + LOAD_CHOCOLATE_SCREEN_CACHE, + MOVE_XYZ_SCREEN_CACHE, + MOVE_E_SCREEN_CACHE, + FILES_SCREEN_CACHE, + INTERFACE_SETTINGS_SCREEN_CACHE, + INTERFACE_SOUNDS_SCREEN_CACHE, + LOCK_SCREEN_CACHE, + DISPLAY_TIMINGS_SCREEN_CACHE +}; + +// To save MCU RAM, the status message is "baked" in to the status screen +// cache, so we reserve a large chunk of memory for the DL cache + +#define STATUS_SCREEN_DL_SIZE 4096 +#define ALERT_BOX_DL_SIZE 3072 +#define SPINNER_DL_SIZE 3072 +#define FILE_SCREEN_DL_SIZE 4160 +#define PRINTING_SCREEN_DL_SIZE 2048 + +/************************* MENU SCREEN DECLARATIONS *************************/ + +#include "../generic/base_screen.h" +#include "../generic/base_numeric_adjustment_screen.h" +#include "../generic/dialog_box_base_class.h" +#include "../generic/boot_screen.h" +#include "../generic/about_screen.h" +#include "../generic/kill_screen.h" +#include "../generic/alert_dialog_box.h" +#include "../generic/spinner_dialog_box.h" +#include "../generic/restore_failsafe_dialog_box.h" +#include "../generic/save_settings_dialog_box.h" +#include "../generic/confirm_start_print_dialog_box.h" +#include "../generic/confirm_abort_print_dialog_box.h" +#include "../generic/confirm_user_request_alert_box.h" +#include "../generic/touch_calibration_screen.h" +#include "../generic/move_axis_screen.h" +#include "../generic/steps_screen.h" +#include "../generic/feedrate_percent_screen.h" +#include "../generic/max_velocity_screen.h" +#include "../generic/max_acceleration_screen.h" +#include "../generic/default_acceleration_screen.h" +#include "../generic/temperature_screen.h" +#include "../generic/interface_sounds_screen.h" +#include "../generic/interface_settings_screen.h" +#include "../generic/lock_screen.h" +#include "../generic/endstop_state_screen.h" +#include "../generic/display_tuning_screen.h" +#include "../generic/statistics_screen.h" +#include "../generic/stepper_current_screen.h" +#include "../generic/z_offset_screen.h" +#include "../generic/bed_mesh_base.h" +#include "../generic/bed_mesh_view_screen.h" +#include "../generic/bed_mesh_edit_screen.h" +#include "../generic/case_light_screen.h" +#include "../generic/linear_advance_screen.h" +#include "../generic/files_screen.h" +#include "../generic/move_axis_screen.h" +#include "../generic/flow_percent_screen.h" +#if HAS_JUNCTION_DEVIATION + #include "../generic/junction_deviation_screen.h" +#else + #include "../generic/jerk_screen.h" +#endif + +#include "status_screen.h" +#include "main_menu.h" +#include "advanced_settings_menu.h" +#include "preheat_menu.h" +#include "preheat_screen.h" +#include "load_chocolate.h" +#include "leveling_menu.h" +#include "move_xyz_screen.h" +#include "move_e_screen.h" diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp similarity index 89% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp index d9881d747a0b..0db063b70c38 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.cpp @@ -1,5 +1,5 @@ /********************************* - * cocoa_press_status_screen.cpp * + * cocoa_press/status_screen.cpp * *********************************/ /**************************************************************************** @@ -22,12 +22,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" - -#include "../ftdi_eve_lib/extras/poly_ui.h" +#ifdef COCOA_STATUS_SCREEN #include "cocoa_press_ui.h" @@ -87,10 +84,8 @@ void StatusScreen::draw_temperature(draw_mode_t what) { int16_t x, y, h, v; if (what & BACKGROUND) { - cmd.cmd(COLOR_RGB(bg_color)); - cmd.cmd(COLOR_RGB(fluid_rgb)); - cmd.font(font_medium); + cmd.font(font_medium).tag(10); ui.bounds(POLY(chocolate_label), x, y, h, v); cmd.text(x, y, h, v, GET_TEXT_F(MSG_CHOCOLATE)); @@ -120,7 +115,7 @@ void StatusScreen::draw_temperature(draw_mode_t what) { char str[15]; cmd.cmd(COLOR_RGB(fluid_rgb)); - cmd.font(font_large); + cmd.font(font_large).tag(10); format_temp(str, getActualTemp_celsius(E0)); ui.bounds(POLY(h0_temp), x, y, h, v); @@ -145,11 +140,8 @@ void StatusScreen::draw_temperature(draw_mode_t what) { } void StatusScreen::draw_syringe(draw_mode_t what) { - #if NUM_SERVOS < 2 - // Note, this requires a new pin 108 to be added to to access ADC9 - // "ArduinoAddons/arduino-1.8.5/packages/ultimachine/hardware/sam/1.6.9-b/variants/archim/variant.cpp" - const int val = analogRead(108); - const float fill_level = float(val) / 1024; + #if ENABLED(COCOA_PRESS_CHOCOLATE_LEVEL_SENSOR) + const float fill_level = get_chocolate_fill_level(); #else constexpr float fill_level = 1.0f; #endif @@ -193,15 +185,13 @@ void StatusScreen::draw_buttons(draw_mode_t what) { CommandProcessor cmd; PolyUI ui(cmd, what); - ui.bounds(POLY(unload_cartridge_btn), x, y, h, v); - cmd.font(font_medium).colors(normal_btn); - ui.bounds(POLY(unload_cartridge_btn), x, y, h, v); - cmd.tag(1).button(x, y, h, v, GET_TEXT_F(MSG_UNLOAD_CARTRIDGE)); + ui.bounds(POLY(park_btn), x, y, h, v); + cmd.tag(1).button(x, y, h, v, GET_TEXT_F(MSG_FILAMENT_PARK_ENABLED)); ui.bounds(POLY(load_chocolate_btn), x, y, h, v); - cmd.tag(2).button(x, y, h, v, GET_TEXT_F(MSG_LOAD_CHOCOLATE)); + cmd.tag(2).button(x, y, h, v, GET_TEXT_F(MSG_LOAD_UNLOAD)); ui.bounds(POLY(preheat_chocolate_btn), x, y, h, v); cmd.tag(3).button(x, y, h, v, GET_TEXT_F(MSG_PREHEAT_CHOCOLATE)); @@ -243,7 +233,7 @@ bool StatusScreen::onTouchStart(uint8_t) { bool StatusScreen::onTouchEnd(uint8_t tag) { switch (tag) { - case 1: GOTO_SCREEN(UnloadCartridgeScreen); break; + case 1: SpinnerDialogBox::enqueueAndWait(F("G28 O\nG27")); break; case 2: GOTO_SCREEN(LoadChocolateScreen); break; case 3: GOTO_SCREEN(PreheatMenu); break; case 4: GOTO_SCREEN(MainMenu); break; @@ -271,6 +261,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { PUSH_SCREEN(StatusScreen); break; case 9: GOTO_SCREEN(FilesScreen); break; + case 10: GOTO_SCREEN(TemperatureScreen); break; default: return false; } // If a passcode is enabled, the LockScreen will prevent the @@ -281,15 +272,14 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { bool StatusScreen::onTouchHeld(uint8_t tag) { if (tag == 8 && !ExtUI::isMoving()) { - increment = 0.05; - MoveAxisScreen::setManualFeedrate(E0, increment); + LoadChocolateScreen::setManualFeedrateAndIncrement(1, increment); UI_INCREMENT(AxisPosition_mm, E0); current_screen.onRefresh(); } return false; } -void StatusScreen::setStatusMessage(progmem_str) { +void StatusScreen::setStatusMessage(FSTR_P) { } void StatusScreen::setStatusMessage(const char * const) { @@ -304,4 +294,14 @@ void StatusScreen::onIdle() { } } -#endif // TOUCH_UI_FTDI_EVE +void StatusScreen::onMediaInserted() { + if (AT_SCREEN(StatusScreen)) + setStatusMessage(GET_TEXT_F(MSG_MEDIA_INSERTED)); +} + +void StatusScreen::onMediaRemoved() { + if (AT_SCREEN(StatusScreen) || ExtUI::isPrintingFromMedia()) + setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED)); +} + +#endif // COCOA_STATUS_SCREEN diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/spinner_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h similarity index 52% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/spinner_dialog_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h index 2318a0d108ce..08fb6f26d4c5 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/spinner_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/status_screen.h @@ -1,10 +1,11 @@ -/************************** - * spinner_dialog_box.cpp * - **************************/ +/******************************* + * cocoa_press/status_screen.h * + *******************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Cocoa Press * * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -20,49 +21,37 @@ * location: . * ****************************************************************************/ -#include "../config.h" - -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" -#include "screen_data.h" - -using namespace FTDI; -using namespace ExtUI; - -void SpinnerDialogBox::onRedraw(draw_mode_t) { -} - -void SpinnerDialogBox::show(const progmem_str message) { - drawMessage(message); - drawSpinner(); - storeBackground(); - screen_data.SpinnerDialog.auto_hide = false; -} - -void SpinnerDialogBox::hide() { - CommandProcessor cmd; - cmd.stop().execute(); -} - -void SpinnerDialogBox::enqueueAndWait_P(const progmem_str commands) { - enqueueAndWait_P(GET_TEXT_F(MSG_PLEASE_WAIT), commands); -} - -void SpinnerDialogBox::enqueueAndWait_P(const progmem_str message, const progmem_str commands) { - show(message); - GOTO_SCREEN(SpinnerDialogBox); - ExtUI::injectCommands_P((const char*)commands); - screen_data.SpinnerDialog.auto_hide = true; -} - -void SpinnerDialogBox::onIdle() { - reset_menu_timeout(); - if (screen_data.SpinnerDialog.auto_hide && !commandsInQueue()) { - screen_data.SpinnerDialog.auto_hide = false; - hide(); - GOTO_PREVIOUS(); - } -} - -#endif // TOUCH_UI_FTDI_EVE +#pragma once + +#define COCOA_STATUS_SCREEN +#define COCOA_STATUS_SCREEN_CLASS StatusScreen + +class StatusScreen : public BaseScreen, public CachedScreen { + private: + static float increment; + static bool jog_xy; + static bool fine_motion; + + static void draw_progress(draw_mode_t what); + static void draw_temperature(draw_mode_t what); + static void draw_syringe(draw_mode_t what); + static void draw_arrows(draw_mode_t what); + static void draw_overlay_icons(draw_mode_t what); + static void draw_fine_motion(draw_mode_t what); + static void draw_buttons(draw_mode_t what); + public: + static void loadBitmaps(); + static void unlockMotors(); + + static void setStatusMessage(const char *); + static void setStatusMessage(FSTR_P); + + static void onRedraw(draw_mode_t); + + static bool onTouchStart(uint8_t tag); + static bool onTouchHeld(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); + static void onMediaInserted(); + static void onMediaRemoved(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/compat.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/compat.h similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/compat.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/compat.h index c01d45ed7c55..3b63b0fd5be6 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/compat.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/compat.h @@ -27,11 +27,11 @@ */ #ifdef __has_include - #if __has_include("../../ui_api.h") - #include "../../ui_api.h" + #if __has_include("../ui_api.h") + #include "../ui_api.h" #endif #else - #include "../../ui_api.h" + #include "../ui_api.h" #endif #ifdef __MARLIN_FIRMWARE__ @@ -49,5 +49,5 @@ #endif class __FlashStringHelper; -typedef const __FlashStringHelper *progmem_str; +typedef const __FlashStringHelper *FSTR_P; extern const char G28_STR[]; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/config.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/config.h similarity index 94% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/config.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/config.h index 76b231536bea..05e19b20e478 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/config.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/config.h @@ -21,6 +21,10 @@ #pragma once +// Configure this display with options in Configuration_adv.h +#include "../../../inc/MarlinConfigPre.h" +#if ENABLED(TOUCH_UI_FTDI_EVE) + #include "compat.h" -// Configure this display with options in Configuration_adv.h +#endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp new file mode 100644 index 000000000000..59833b06a047 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp @@ -0,0 +1,160 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/extui/ftdi_eve_touch_ui/ftdi_eve_extui.cpp + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(TOUCH_UI_FTDI_EVE) + +#include "screens.h" + +namespace ExtUI { + using namespace Theme; + using namespace FTDI; + + void onStartup() { EventLoop::setup(); } + + void onIdle() { EventLoop::loop(); } + + void onPrinterKilled(PGM_P const error, PGM_P const component) { + char str[strlen_P(error) + strlen_P(component) + 3]; + sprintf_P(str, PSTR(S_FMT ": " S_FMT), error, component); + KillScreen::show(str); + } + + void onMediaInserted() { + #if ENABLED(SDSUPPORT) + sound.play(media_inserted, PLAY_ASYNCHRONOUS); + StatusScreen::onMediaInserted(); + #endif + } + + void onMediaRemoved() { + #if ENABLED(SDSUPPORT) + if (isPrintingFromMedia()) { + stopPrint(); + InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED); + } + else + sound.play(media_removed, PLAY_ASYNCHRONOUS); + + StatusScreen::onMediaRemoved(); + FilesScreen::onMediaRemoved(); + #endif + } + + void onMediaError() { + sound.play(sad_trombone, PLAY_ASYNCHRONOUS); + AlertDialogBox::showError(F("Unable to read media.")); + } + + void onStatusChanged(const char *lcd_msg) { StatusScreen::setStatusMessage(lcd_msg); } + void onStatusChanged(FSTR_P lcd_msg) { StatusScreen::setStatusMessage(lcd_msg); } + + void onPrintTimerStarted() { + InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_STARTED); + } + void onPrintTimerStopped() { + InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FINISHED); + } + + void onPrintTimerPaused() {} + void onPrintFinished() {} + + void onFilamentRunout(const extruder_t extruder) { + char lcd_msg[30]; + sprintf_P(lcd_msg, PSTR("Extruder %d Filament Error"), extruder + 1); + StatusScreen::setStatusMessage(lcd_msg); + InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED, FTDI::PLAY_SYNCHRONOUS); + } + + void onHomingStart() {} + void onHomingComplete() {} + + void onFactoryReset() { InterfaceSettingsScreen::defaultSettings(); } + void onStoreSettings(char *buff) { InterfaceSettingsScreen::saveSettings(buff); } + void onLoadSettings(const char *buff) { InterfaceSettingsScreen::loadSettings(buff); } + void onPostprocessSettings() {} // Called after loading or resetting stored settings + + void onConfigurationStoreWritten(bool success) { + #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE + if (success && InterfaceSettingsScreen::backupEEPROM()) { + SERIAL_ECHOLNPGM("EEPROM backed up to SPI Flash"); + } + #else + UNUSED(success); + #endif + } + void onConfigurationStoreRead(bool) {} + + void onPlayTone(const uint16_t frequency, const uint16_t duration) { sound.play_tone(frequency, duration); } + + void onUserConfirmRequired(const char * const msg) { + if (msg) + ConfirmUserRequestAlertBox::show(msg); + else + ConfirmUserRequestAlertBox::hide(); + } + + #if HAS_LEVELING && HAS_MESH + void onMeshLevelingStart() {} + void onMeshUpdate(const int8_t x, const int8_t y, const_float_t val) { BedMeshViewScreen::onMeshUpdate(x, y, val); } + void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { BedMeshViewScreen::onMeshUpdate(x, y, state); } + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + void onPowerLossResume() {} // Called on resume from power-loss + #endif + + #if HAS_PID_HEATING + void onPidTuning(const result_t rst) { + // Called for temperature PID tuning result + //SERIAL_ECHOLNPGM("OnPidTuning:", rst); + switch (rst) { + case PID_STARTED: + StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); + break; + case PID_BAD_EXTRUDER_NUM: + StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_BAD_EXTRUDER_NUM)); + break; + case PID_TEMP_TOO_HIGH: + StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_TEMP_TOO_HIGH)); + break; + case PID_TUNING_TIMEOUT: + StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_TIMEOUT)); + break; + case PID_DONE: + StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE_DONE)); + break; + } + GOTO_SCREEN(StatusScreen); + } + #endif // HAS_PID_HEATING + + void onSteppersDisabled() {} + void onSteppersEnabled() {} +} + +#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/LICENSE.txt b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/LICENSE.txt similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/LICENSE.txt rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/LICENSE.txt diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/README.md b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/README.md similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/README.md rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/README.md diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h new file mode 100644 index 000000000000..5168ef76af4a --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h @@ -0,0 +1,281 @@ +/************ + * boards.h * + ************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define HAS_RESOLUTION (defined(TOUCH_UI_320x240) || defined(TOUCH_UI_480x272) || defined(TOUCH_UI_800x480)) + +#define IS_FT800 \ + constexpr uint16_t ftdi_chip = 800; \ + using namespace FTDI_FT800; \ + namespace DL { \ + using namespace FTDI_FT800_DL; \ + } \ + typedef ft800_memory_map ftdi_memory_map; \ + typedef ft800_registers ftdi_registers; + +#define IS_FT810 \ + constexpr uint16_t ftdi_chip = 810; \ + using namespace FTDI_FT810; \ + namespace DL { \ + using namespace FTDI_FT800_DL; \ + using namespace FTDI_FT810_DL; \ + } \ + typedef ft810_memory_map ftdi_memory_map; \ + typedef ft810_registers ftdi_registers; + +#ifdef LCD_FTDI_VM800B35A + #if !HAS_RESOLUTION + #define TOUCH_UI_320x240 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 800 + #endif + namespace FTDI { + IS_FT800 + constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; /* 1 = does use GPIO00 for amplifier control, 0 = not in use for Audio */ + constexpr bool GPIO_1_Audio_Shutdown = true; /* 1 = does use GPIO01 for amplifier control, 0 = not in use for Audio */ + constexpr uint8_t Swizzle = 2; + constexpr uint8_t CSpread = 1; + + constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */ + } + +/** + * Settings for the Haoyu Electronics, 4.3" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY43B) + * and 5" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY50B) + * http://www.hotmcu.com/43-graphical-lcd-touchscreen-480x272-spi-ft800-p-111.html?cPath=6_16 + * http://www.hotmcu.com/5-graphical-lcd-touchscreen-480x272-spi-ft800-p-124.html?cPath=6_16 + * Datasheet: + * https://www.hantronix.com/files/data/1278363262430-3.pdf + * https://www.haoyuelectronics.com/Attachment/HY43-LCD/LCD%20DataSheet.pdf + * https://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf + */ +#elif defined(LCD_HAOYU_FT800CB) + #if !HAS_RESOLUTION + #define TOUCH_UI_480x272 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 800 + #endif + namespace FTDI { + IS_FT800 + constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; + constexpr bool GPIO_1_Audio_Shutdown = false; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 1; + constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ + } + +/** + * Settings for the Haoyu Electronics, 5" Graphical LCD Touchscreen, 800x480, SPI, FT810 + * http://www.hotmcu.com/5-graphical-lcd-touchscreen-800x480-spi-ft810-p-286.html + * Datasheet: + * https://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf + */ +#elif defined(LCD_HAOYU_FT810CB) + #if !HAS_RESOLUTION + #define TOUCH_UI_800x480 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 810 + #endif + namespace FTDI { + IS_FT810 + constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; + constexpr bool GPIO_1_Audio_Shutdown = false; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 1; + constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ + } + +/** + * Settings for the 4D Systems, 4.3" Embedded SPI Display 480x272, SPI, FT800 (4DLCD-FT843) + * https://4dsystems.com.au/4dlcd-ft843 + * Datasheet: + * https://4dsystems.com.au/mwdownloads/download/link/id/52/ + */ +#elif defined(LCD_4DSYSTEMS_4DLCD_FT843) + #if !HAS_RESOLUTION + #define TOUCH_UI_480x272 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 800 + #endif + namespace FTDI { + IS_FT800 + constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; + constexpr bool GPIO_1_Audio_Shutdown = true; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 1; + constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */ + } + +/** + * Settings for the Aleph Objects Color LCD User Interface + * Datasheet https://www.hantronix.com/files/data/s1501799605s500-gh7.pdf + */ +#elif defined(LCD_LULZBOT_CLCD_UI) + #if !HAS_RESOLUTION + #define TOUCH_UI_800x480 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 810 + #endif + namespace FTDI { + IS_FT810 + constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio + constexpr bool GPIO_1_Audio_Shutdown = false; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 0; + constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ + } + +/** + * FYSETC Color LCD + * https://www.aliexpress.com/item/4000627651757.html + * Product information: + * https://github.com/FYSETC/TFT81050 + */ +#elif defined(LCD_FYSETC_TFT81050) + #if !HAS_RESOLUTION + #define TOUCH_UI_800x480 + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 810 + #endif + namespace FTDI { + IS_FT810 + constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio + constexpr bool GPIO_1_Audio_Shutdown = false; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 0; + constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ + } + +/** + * Settings for EVE3-50G - Matrix Orbital 5.0" 800x480, BT815 + * https://www.matrixorbital.com/ftdi-eve/eve-bt815-bt816/eve3-50g + * use for example with: https://github.com/RudolphRiedel/EVE_display-adapter + */ +#elif defined(LCD_EVE3_50G) + #if !HAS_RESOLUTION + #define TOUCH_UI_800x480 + #define TOUCH_UI_800x480_GENERIC // use more common timing parameters as the original set + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 810 + #endif + namespace FTDI { + IS_FT810 + constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; + constexpr bool GPIO_1_Audio_Shutdown = false; + #define USE_GT911 // this display uses an alternative touch-controller and we need to tell the init function to switch + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 1; + constexpr uint8_t Pclkpol = 1; + constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */ + + constexpr uint32_t default_transform_a = 0x000109E4; + constexpr uint32_t default_transform_b = 0x000007A6; + constexpr uint32_t default_transform_c = 0xFFEC1EBA; + constexpr uint32_t default_transform_d = 0x0000072C; + constexpr uint32_t default_transform_e = 0x0001096A; + constexpr uint32_t default_transform_f = 0xFFF469CF; + } + +/** + * Settings for EVE2-50G - Matrix Orbital 5.0" 800x480, FT813 + * https://www.matrixorbital.com/ftdi-eve/eve-bt815-bt816/eve3-50g + * use for example with: https://github.com/RudolphRiedel/EVE_display-adapter + */ +#elif defined(LCD_EVE2_50G) + #if !HAS_RESOLUTION + #define TOUCH_UI_800x480 + #define TOUCH_UI_800x480_GENERIC // use more common timing parameters as the original set + #endif + #ifndef FTDI_API_LEVEL + #define FTDI_API_LEVEL 810 + #endif + namespace FTDI { + IS_FT810 + constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated + constexpr bool GPIO_0_Audio_Enable = false; + constexpr bool GPIO_1_Audio_Shutdown = false; + #define PATCH_GT911 // this display uses an alternative touch-controller and we need to tell the init function to patch the FT813 for it + constexpr uint8_t Pclkpol = 1; + constexpr uint8_t Swizzle = 0; + constexpr uint8_t CSpread = 1; + constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */ + + constexpr uint32_t default_transform_a = 0x000109E4; + constexpr uint32_t default_transform_b = 0x000007A6; + constexpr uint32_t default_transform_c = 0xFFEC1EBA; + constexpr uint32_t default_transform_d = 0x0000072C; + constexpr uint32_t default_transform_e = 0x0001096A; + constexpr uint32_t default_transform_f = 0xFFF469CF; + } + +#else + + #error "Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify this file." + +#endif + + +/* this data is used to patch FT813 displays that use a GT911 as a touch-controller */ +#ifdef PATCH_GT911 + constexpr PROGMEM unsigned char GT911_data[] = { + 26,255,255,255,32,32,48,0,4,0,0,0,2,0,0,0, + 34,255,255,255,0,176,48,0,120,218,237,84,221,111,84,69,20,63,51,179,93,160,148,101,111,76,5,44,141,123,111,161,11,219,154,16,9,16,17,229,156,75,26,11,13,21,227,3,16,252,184,179, + 45,219,143,45,41,125,144,72,67,100,150,71,189,113,18,36,17,165,100,165,198,16,32,17,149,196,240,128,161,16,164,38,54,240,0,209,72,130,15,38,125,48,66,82,30,76,19,31,172,103,46, + 139,24,255,4,227,157,204,156,51,115,102,206,231,239,220,5,170,94,129,137,75,194,216,98,94,103,117,115,121,76,131,177,125,89,125,82,123,60,243,58,142,242,204,185,243,188,118,156, + 227,155,203,238,238,195,251,205,229,71,92,28,169,190,184,84,143,113,137,53,244,103,181,237,87,253,113,137,233,48,12,198,165,181,104,139,25,84,253,155,114,74,191,0,54,138,163, + 12,62,131,207,129,23,217,34,91,31,128,65,246,163,175,213,8,147,213,107,35,203,94,108,3,111,40,171,83,24,15,165,177,222,116,97,23,188,140,206,150,42,102,181,87,78,86,182,170,134, + 215,241,121,26,243,252,2,76,115,217,139,222,206,173,136,132,81,61,35,185,39,113,23,46,199,76,178,54,151,183,224,0,40,189,28,149,182,58,131,79,152,30,76,34,98,234,162,216,133,141, + 102,39,170,40,192,101,53,201,146,191,37,77,44,177,209,74,211,5,206,187,5,6,216,47,53,96,123,22,50,103,251,192,84,17,74,227,185,56,106,51,91,161,96,182,163,48,171,141,139,65,152, + 66,66,11,102,43,158,75,36,80,147,184,147,139,112,17,235,216,103,111,239,245,92,10,175,194,40,44,58,125,5,59,112,50,103,245,4,78,192,5,156,194,51,60,191,134,75,110,173,237,46,192, + 121,156,192,115,184,218,120,67,63,115,46,11,102,10,97,232,50,235,114,182,148,118,178,41,188,12,135,77,202,124,12,96,238,35,161,234,189,129,23,249,212,139,230,25,53,48,205,52,93, + 163,117,53,154,170,81,85,163,178,70,69,66,167,241,14,46,241,1,226,136,152,179,197,59,184,148,254,49,132,48,15,176,137,192,76,131,196,105,104,162,86,81,160,165,255,26,173,162,137, + 86,145,210,183,192,55,175,194,211,60,91,120,230,184,174,27,41,131,155,40,224,29,87,179,232,16,55,55,7,165,147,81,23,165,49,101,54,224,75,180,81,108,18,29,226,69,225,110,175,224, + 42,212,25,47,130,193,110,234,192,215,252,56,74,162,24,46,251,174,54,106,68,245,14,9,155,160,22,120,207,104,240,29,90,178,140,28,24,220,47,166,112,61,251,208,192,111,56,239,238, + 93,255,251,62,99,32,193,75,61,190,235,123,229,110,218,194,85,79,225,59,98,20,238,227,235,220,11,221,149,25,180,116,194,159,111,96,192,24,213,59,139,179,156,215,69,230,19,24,35, + 135,117,206,171,206,162,67,129,234,61,235,11,104,103,84,64,223,167,254,40,163,101,92,84,43,150,46,249,219,205,7,116,11,91,104,61,57,75,223,8,48,25,28,119,252,222,113,49,86,249, + 74,180,211,156,181,61,215,168,157,7,251,199,150,242,250,91,58,132,94,121,7,53,151,139,98,6,165,153,69,214,32,110,211,100,101,31,89,45,81,98,23,205,205,197,209,109,186,198,35, + 141,191,249,25,60,132,223,153,251,98,20,239,146,139,20,217,250,41,250,137,58,177,90,57,79,51,108,233,20,253,194,187,49,222,205,114,141,96,48,175,219,107,54,111,138,22,154,103, + 108,79,58,252,179,178,79,164,195,2,153,36,39,170,199,201,167,197,85,106,8,59,177,81,46,56,2,230,75,114,17,55,112,188,65,208,137,77,114,10,115,55,58,208,197,173,122,87,6,140, + 110,42,208,124,163,70,108,241,104,18,245,98,214,187,134,53,42,221,22,182,133,211,116,148,177,194,209,192,85,90,199,58,55,203,2,229,19,137,187,161,228,154,112,203,145,125,244, + 188,220,118,228,41,201,181,41,195,144,215,183,51,80,250,21,217,16,217,200,235,109,227,188,122,218,142,60,170,224,112,240,184,130,229,224,113,5,223,148,163,80,165,183,130,187, + 132,116,64,238,161,85,220,115,139,205,98,227,244,29,102,125,7,37,243,123,223,11,26,92,63,243,116,61,191,138,123,244,160,84,186,74,31,5,174,247,119,135,199,248,253,135,242,97, + 102,145,190,144,14,85,238,221,231,193,158,48,205,25,120,248,15,220,29,158,9,70,185,30,103,229,33,254,23,237,160,172,62,193,90,222,224,232,14,200,56,90,104,142,227,120,110,6, + 21,211,203,65,150,99,151,220,247,87,164,50,159,49,239,234,58,142,0,109,108,123,18,79,227,36,100,248,222,205,96,127,120,26,171,228,69,63,36,17,252,200,17,116,242,187,227,88,143, + 247,2,75,191,6,130,59,188,11,55,240,31,243,122,152,226,183,207,154,73,188,39,219,43,105,222,87,41,143,141,140,175,73,112,184,252,61,184,16,90,250,35,168,82,119,176,57,116,94, + 200,150,22,190,179,44,104,12,235,84,149,102,252,89,154,193,99,228,106,242,125,248,64,194,255,223,127,242,83,11,255,2,70,214,226,128,0,0 + }; +#endif // PATCH_GT911 diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp index 1db1175d3c63..8e788421ad25 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.cpp @@ -66,7 +66,7 @@ uint16_t CLCD::FontMetrics::get_text_width(const char *str, size_t n) const { return width; } -uint16_t CLCD::FontMetrics::get_text_width(progmem_str str, size_t n) const { +uint16_t CLCD::FontMetrics::get_text_width(FSTR_P str, size_t n) const { uint16_t width = 0; const uint8_t *p = (const uint8_t *) str; for (;;) { @@ -162,7 +162,7 @@ void CLCD::mem_write_bulk(uint32_t reg_address, const void *data, uint16_t len, } // Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM -void CLCD::mem_write_bulk(uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding) { +void CLCD::mem_write_bulk(uint32_t reg_address, FSTR_P str, uint16_t len, uint8_t padding) { spi_ftdi_select(); spi_write_addr(reg_address); spi_write_bulk(str, len, padding); @@ -178,7 +178,7 @@ void CLCD::mem_write_pgm(uint32_t reg_address, const void *data, uint16_t len, u } // Write 3-Byte Address, Multiple Bytes, plus padding bytes, from PROGMEM, reversing bytes (suitable for loading XBM images) -void CLCD::mem_write_xbm(uint32_t reg_address, progmem_str data, uint16_t len, uint8_t padding) { +void CLCD::mem_write_xbm(uint32_t reg_address, FSTR_P data, uint16_t len, uint8_t padding) { spi_ftdi_select(); spi_write_addr(reg_address); spi_write_bulk(data, len, padding); @@ -229,7 +229,7 @@ void CLCD::CommandFifo::cmd(uint32_t cmd32) { write((void*)&cmd32, sizeof(uint32_t)); } -void CLCD::CommandFifo::cmd(void* data, uint16_t len) { +void CLCD::CommandFifo::cmd(void *data, uint16_t len) { write(data, len); } @@ -902,6 +902,7 @@ bool CLCD::CommandFifo::has_fault() { } #if FTDI_API_LEVEL == 800 + void CLCD::CommandFifo::start() { if (command_write_ptr == 0xFFFFFFFFul) { command_write_ptr = mem_read_32(REG::CMD_WRITE) & 0x0FFF; @@ -979,12 +980,13 @@ template bool CLCD::CommandFifo::_write_unaligned(T data, uint16_t len template bool CLCD::CommandFifo::write(T data, uint16_t len) { const uint8_t padding = MULTIPLE_OF_4(len) - len; - - uint8_t pad_bytes[] = {0, 0, 0, 0}; + const uint8_t pad_bytes[] = { 0, 0, 0, 0 }; return _write_unaligned(data, len) && _write_unaligned(pad_bytes, padding); } -#else + +#else // FTDI_API_LEVEL != 800 ... + void CLCD::CommandFifo::start() { } @@ -1023,8 +1025,8 @@ template bool CLCD::CommandFifo::write(T data, uint16_t len) { if (Command_Space < (len + padding)) { #if ENABLED(TOUCH_UI_DEBUG) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Waiting for ", len + padding); - SERIAL_ECHOLNPAIR(" bytes in command queue, now free: ", Command_Space); + SERIAL_ECHOPGM("Waiting for ", len + padding); + SERIAL_ECHOLNPGM(" bytes in command queue, now free: ", Command_Space); #endif do { Command_Space = mem_read_32(REG::CMDB_SPACE) & 0x0FFF; @@ -1042,18 +1044,34 @@ template bool CLCD::CommandFifo::write(T data, uint16_t len) { mem_write_bulk(REG::CMDB_WRITE, data, len, padding); return true; } -#endif + +#endif // ... FTDI_API_LEVEL != 800 template bool CLCD::CommandFifo::write(const void*, uint16_t); -template bool CLCD::CommandFifo::write(progmem_str, uint16_t); +template bool CLCD::CommandFifo::write(FSTR_P, uint16_t); // CO_PROCESSOR COMMANDS +void CLCD::CommandFifo::str(const char * data, size_t maxlen) { + // Write the string without the terminating '\0' + const size_t len = strnlen(data, maxlen); + write(data, len); + + // If padding was added by the previous write, then + // the string is terminated. Otherwise write four + // more zeros. + const uint8_t padding = MULTIPLE_OF_4(len) - len; + if (padding == 0) { + const uint8_t pad_bytes[] = {0, 0, 0, 0}; + write(pad_bytes, 4); + } +} + void CLCD::CommandFifo::str(const char * data) { write(data, strlen(data)+1); } -void CLCD::CommandFifo::str(progmem_str data) { +void CLCD::CommandFifo::str(FSTR_P data) { write(data, strlen_P((const char*)data)+1); } @@ -1061,7 +1079,7 @@ void CLCD::CommandFifo::str(progmem_str data) { void CLCD::init() { spi_init(); // Set Up I/O Lines for SPI and FT800/810 Control - ftdi_reset(); // Power down/up the FT8xx with the apropriate delays + ftdi_reset(); // Power down/up the FT8xx with the appropriate delays host_cmd(Use_Crystal ? CLKEXT : CLKINT, 0); host_cmd(FTDI::ACTIVE, 0); // Activate the System Clock @@ -1073,40 +1091,48 @@ void CLCD::init() { for (counter = 0; counter < 250; counter++) { uint8_t device_id = mem_read_8(REG::ID); // Read Device ID, Should Be 0x7C; if (device_id == 0x7C) { - #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHO_MSG("FTDI chip initialized "); - #endif + if (ENABLED(TOUCH_UI_DEBUG)) SERIAL_ECHO_MSG("FTDI chip initialized "); break; } else delay(1); - if (counter == 249) { - #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("Timeout waiting for device ID, should be 124, got ", device_id); - #endif - } + if (TERN0(TOUCH_UI_DEBUG, counter > 248)) + SERIAL_ECHO_MSG("Timeout waiting for device ID, should be 124, got ", device_id); } - /* make sure that all units are in working conditions, usually the touch-controller needs a little more time */ + /* Ensure all units are in working condition, usually the touch-controller needs a little more time */ for (counter = 0; counter < 100; counter++) { uint8_t reset_status = mem_read_8(REG::CPURESET) & 0x03; if (reset_status == 0x00) { - #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHO_MSG("FTDI chip all units running "); - #endif + if (ENABLED(TOUCH_UI_DEBUG)) SERIAL_ECHO_MSG("FTDI chip all units running "); break; } else delay(1); - if (ENABLED(TOUCH_UI_DEBUG) && counter == 99) { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("Timeout waiting for reset status. Should be 0x00, got ", reset_status); - } + if (TERN0(TOUCH_UI_DEBUG, counter > 98)) + SERIAL_ECHO_MSG("Timeout waiting for reset status. Should be 0x00, got ", reset_status); } + #if ENABLED(USE_GT911) /* switch BT815 to use Goodix GT911 touch controller */ + mem_write_32(REG::TOUCH_CONFIG, 0x000005D1); + #endif + + #if ENABLED(PATCH_GT911) /* patch FT813 use Goodix GT911 touch controller */ + mem_write_pgm(REG::CMDB_WRITE, GT911_data, sizeof(GT911_data)); /* write binary blob to command-fifo */ + delay(10); + mem_write_8(REG::TOUCH_OVERSAMPLE, 0x0F); /* setup oversample to 0x0f as "hidden" in binary-blob for AN_336 */ + mem_write_16(REG::TOUCH_CONFIG, 0x05d0); /* write magic cookie as requested by AN_336 */ + + /* specific to the EVE2 modules from Matrix-Orbital we have to use GPIO3 to reset GT911 */ + mem_write_16(REG::GPIOX_DIR,0x8008); /* Reset-Value is 0x8000, adding 0x08 sets GPIO3 to output, default-value for REG_GPIOX is 0x8000 -> Low output on GPIO3 */ + delay(1); /* wait more than 100µs */ + mem_write_8(REG::CPURESET, 0x00); /* clear all resets */ + delay(56); /* wait more than 55ms */ + mem_write_16(REG::GPIOX_DIR,0x8000); /* setting GPIO3 back to input */ + #endif + mem_write_8(REG::PWM_DUTY, 0); // turn off Backlight, Frequency already is set to 250Hz default /* Configure the FT8xx Registers */ @@ -1143,13 +1169,13 @@ void CLCD::init() { if (GPIO_1_Audio_Shutdown) { mem_write_8(REG::GPIO_DIR, GPIO_DISP | GPIO_GP1); mem_write_8(REG::GPIO, GPIO_DISP | GPIO_GP1); - } else if (GPIO_0_Audio_Enable) { + } + else if (GPIO_0_Audio_Enable) { mem_write_8(REG::GPIO_DIR, GPIO_DISP | GPIO_GP0); mem_write_8(REG::GPIO, GPIO_DISP | GPIO_GP0); } - else { + else mem_write_8(REG::GPIO, GPIO_DISP); /* REG::GPIO_DIR is set to output for GPIO_DISP by default */ - } mem_write_8(REG::PCLK, Pclk); // Turns on Clock by setting PCLK Register to the value necessary for the module diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h index 376beaec44e0..2e2657a83eec 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/commands.h @@ -70,7 +70,7 @@ * * CommandFifo::fgcolor Set Graphic Item Foreground Color * * CommandFifo::bgcolor Set Graphic Item Background Color * - * CommandFifo::begin() Begin Drawing a Primative * + * CommandFifo::begin() Begin Drawing a Primitive * * CommandFifo::mem_copy() Copy a Block of Memory * * CommandFifo::append() Append Commands to Current DL * * CommandFifo::gradient_color() Set 3D Button Highlight Color * @@ -93,7 +93,7 @@ #pragma once -typedef const __FlashStringHelper *progmem_str; +typedef const __FlashStringHelper *FSTR_P; class UIStorage; @@ -118,8 +118,8 @@ class CLCD { static void mem_write_fill (uint32_t reg_address, uint8_t w_data, uint16_t len); static void mem_write_bulk (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0); static void mem_write_pgm (uint32_t reg_address, const void *data, uint16_t len, uint8_t padding = 0); - static void mem_write_bulk (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding = 0); - static void mem_write_xbm (uint32_t reg_address, progmem_str str, uint16_t len, uint8_t padding = 0); + static void mem_write_bulk (uint32_t reg_address, FSTR_P str, uint16_t len, uint8_t padding = 0); + static void mem_write_xbm (uint32_t reg_address, FSTR_P str, uint16_t len, uint8_t padding = 0); public: class CommandFifo; @@ -168,7 +168,7 @@ class CLCD::FontMetrics { // Returns width of string, up to a maximum of n characters. uint16_t get_text_width(const char *str, size_t n = SIZE_MAX) const; - uint16_t get_text_width(progmem_str str, size_t n = SIZE_MAX) const; + uint16_t get_text_width(FSTR_P str, size_t n = SIZE_MAX) const; }; /******************* FT800/810 Graphic Commands *********************************/ @@ -196,7 +196,7 @@ class CLCD::CommandFifo { void execute(); void cmd(uint32_t cmd32); - void cmd(void* data, uint16_t len); + void cmd(void *data, uint16_t len); void dlstart() {cmd(FTDI::CMD_DLSTART);} void swap() {cmd(FTDI::CMD_SWAP);} @@ -248,8 +248,9 @@ class CLCD::CommandFifo { void keys (int16_t x, int16_t y, int16_t w, int16_t h, int16_t font, uint16_t options); // Sends the string portion of text, button, toggle and keys. + void str (const char * data, size_t maxlen); void str (const char * data); - void str (progmem_str data); + void str (FSTR_P data); void memzero (uint32_t ptr, uint32_t size); void memset (uint32_t ptr, uint32_t value, uint32_t size); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/constants.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/constants.h similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/constants.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/constants.h index 507e25151846..20b1a3e9752e 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/constants.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/constants.h @@ -95,6 +95,7 @@ namespace FTDI_FT810 { namespace FTDI { constexpr uint8_t ARGB1555 = 0; constexpr uint8_t L1 = 1; + constexpr uint8_t L2 = 17; constexpr uint8_t L4 = 2; constexpr uint8_t L8 = 3; constexpr uint8_t RGB332 = 4; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/display_list.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/display_list.h similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/display_list.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/display_list.h index 99a9e0e81089..d6afe78f7cda 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/display_list.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/display_list.h @@ -64,14 +64,14 @@ namespace FTDI { inline uint32_t CLEAR_COLOR_A(uint8_t alpha) {return DL::CLEAR_COLOR_A|(alpha&255UL);} inline uint32_t CLEAR_COLOR_RGB(uint8_t red, uint8_t green, uint8_t blue) {return DL::CLEAR_COLOR_RGB|((red&255UL)<<16)|((green&255UL)<<8)|(blue&255UL);} - inline uint32_t CLEAR_COLOR_RGB(uint32_t rgb) {return DL::CLEAR_COLOR_RGB|rgb;} + inline uint32_t CLEAR_COLOR_RGB(uint32_t rgb) {return DL::CLEAR_COLOR_RGB|(rgb&0xFFFFFF);} inline uint32_t CLEAR_STENCIL(uint8_t s) {return DL::CLEAR_STENCIL|(s&255UL);} inline uint32_t CLEAR_TAG(uint8_t s) {return DL::CLEAR_TAG|(s&255UL);} inline uint32_t COLOR_A(uint8_t alpha) {return DL::COLOR_A|(alpha&255UL);} inline uint32_t COLOR_MASK(bool r, bool g, bool b, bool a) {return DL::COLOR_MASK|((r?1UL:0UL)<<3)|((g?1UL:0UL)<<2)|((b?1UL:0UL)<<1)|(a?1UL:0UL);} inline uint32_t COLOR_RGB(uint8_t red,uint8_t green,uint8_t blue) {return DL::COLOR_RGB|((red&255UL)<<16)|((green&255UL)<<8)|(blue&255UL);} - inline uint32_t COLOR_RGB(uint32_t rgb) {return DL::COLOR_RGB|rgb;} + inline uint32_t COLOR_RGB(uint32_t rgb) {return DL::COLOR_RGB|(rgb&0xFFFFFF);} /* inline uint32_t DISPLAY() {return (0UL<<24)) */ inline uint32_t END() {return DL::END;} inline uint32_t JUMP(uint16_t dest) {return DL::JUMP|(dest&65535UL);} diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/ftdi_basic.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/ftdi_basic.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/ftdi_basic.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/ftdi_basic.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft800.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft800.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft800.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft800.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft810.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft810.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft810.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/registers_ft810.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h similarity index 71% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h index 5b29816429f3..0c600fa0a580 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/resolutions.h @@ -43,7 +43,7 @@ constexpr uint16_t Vsync0 = tvfp - 1; \ constexpr uint16_t Vsync1 = tvfp + tvpw - 1; \ static_assert(thfp + thb + Hsize == th, "Mismatch in display th"); \ - static_assert(tvfp + tvb + Vsize == tv, "Mismatch in display tv"); + static_assert(tvfp + tvb + Vsize == tv, "Mismatch in display tv") #if ENABLED(TOUCH_UI_320x240) namespace FTDI { @@ -85,7 +85,7 @@ constexpr uint16_t tvb = 2; // VS Back porch (blanking) constexpr uint16_t tvpw = 10; // VS pulse width - COMPUTE_REGS_FROM_DATASHEET + COMPUTE_REGS_FROM_DATASHEET; constexpr uint32_t default_transform_a = 0x00008100; constexpr uint32_t default_transform_b = 0x00000000; @@ -97,29 +97,44 @@ #elif defined(TOUCH_UI_800x480) namespace FTDI { - constexpr uint8_t Pclk = 3; - constexpr uint8_t Pclkpol = 1; - constexpr uint16_t Hsize = 800; - constexpr uint16_t Vsize = 480; - - constexpr uint16_t th = 1056; // One horizontal line - constexpr uint16_t thfp = 210; // HS Front porch - constexpr uint16_t thb = 46; // HS Back porch (blanking) - constexpr uint16_t thpw = 23; // HS pulse width - - constexpr uint16_t tv = 525; // Vertical period time - constexpr uint16_t tvfp = 22; // VS Front porch - constexpr uint16_t tvb = 23; // VS Back porch (blanking) - constexpr uint16_t tvpw = 10; // VS pulse width - - COMPUTE_REGS_FROM_DATASHEET - - constexpr uint32_t default_transform_a = 0x0000D8B9; - constexpr uint32_t default_transform_b = 0x00000124; - constexpr uint32_t default_transform_c = 0xFFE23926; - constexpr uint32_t default_transform_d = 0xFFFFFF51; - constexpr uint32_t default_transform_e = 0xFFFF7E4F; - constexpr uint32_t default_transform_f = 0x01F0AF70; + #if defined(TOUCH_UI_800x480_GENERIC) + constexpr uint8_t Pclk = 2; + constexpr uint16_t Hsize = 800; + constexpr uint16_t Vsize = 480; + + constexpr uint16_t Vsync0 = 0; + constexpr uint16_t Vsync1 = 3; + constexpr uint16_t Voffset = 32; + constexpr uint16_t Vcycle = 525; + constexpr uint16_t Hsync0 = 0; + constexpr uint16_t Hsync1 = 48; + constexpr uint16_t Hoffset = 88; + constexpr uint16_t Hcycle = 928; + #else + constexpr uint8_t Pclk = 3; + constexpr uint8_t Pclkpol = 1; + constexpr uint16_t Hsize = 800; + constexpr uint16_t Vsize = 480; + + constexpr uint16_t th = 1056; // One horizontal line + constexpr uint16_t thfp = 210; // HS Front porch + constexpr uint16_t thb = 46; // HS Back porch (blanking) + constexpr uint16_t thpw = 23; // HS pulse width + + constexpr uint16_t tv = 525; // Vertical period time + constexpr uint16_t tvfp = 22; // VS Front porch + constexpr uint16_t tvb = 23; // VS Back porch (blanking) + constexpr uint16_t tvpw = 10; // VS pulse width + + COMPUTE_REGS_FROM_DATASHEET; + + constexpr uint32_t default_transform_a = 0x0000D8B9; + constexpr uint32_t default_transform_b = 0x00000124; + constexpr uint32_t default_transform_c = 0xFFE23926; + constexpr uint32_t default_transform_d = 0xFFFFFF51; + constexpr uint32_t default_transform_e = 0xFFFF7E4F; + constexpr uint32_t default_transform_f = 0x01F0AF70; + #endif } #else diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp similarity index 98% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp index 006cbe872c08..30f778e9f51c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp @@ -103,12 +103,12 @@ namespace FTDI { #endif void SPI::spi_read_bulk(void *data, uint16_t len) { - uint8_t* p = (uint8_t *)data; + uint8_t *p = (uint8_t *)data; while (len--) *p++ = spi_recv(); } bool SPI::spi_verify_bulk(const void *data, uint16_t len) { - const uint8_t* p = (const uint8_t *)data; + const uint8_t *p = (const uint8_t *)data; while (len--) if (*p++ != spi_recv()) return false; return true; } diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h similarity index 98% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h index e3a23d768f19..7adf7e9c53a2 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h @@ -116,14 +116,14 @@ namespace FTDI { template void spi_write_bulk(const void *data, uint16_t len, uint8_t padding) { - const uint8_t* p = (const uint8_t *)data; + const uint8_t *p = (const uint8_t *)data; while (len--) spi_send(byte_op(p++)); while (padding--) spi_send(0); } template void spi_write_bulk(const void *data, uint16_t len) { - const uint8_t* p = (const uint8_t *)data; + const uint8_t *p = (const uint8_t *)data; while (len--) spi_send(byte_op(p++)); } diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h similarity index 86% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h index 9be7882a390f..4e11c732268c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h @@ -195,12 +195,32 @@ #define pgm_read_ptr_far pgm_read_ptr #endif + // Use NUM_ARGS(__VA_ARGS__) to get the number of variadic arguments + #define _NUM_ARGS(_,Z,Y,X,W,V,U,T,S,R,Q,P,O,N,M,L,K,J,I,H,G,F,E,D,C,B,A,OUT,...) OUT + #define NUM_ARGS(V...) _NUM_ARGS(0,V,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0) + + // SERIAL_ECHOPGM / SERIAL_ECHOPGM_P is used to output a key value pair. The key must be a string and the value can be anything + // Print up to 12 pairs of values. Odd elements auto-wrapped in PSTR(). + #define __SEP_N(N,V...) _SEP_##N(V) + #define _SEP_N(N,V...) __SEP_N(N,V) + #define _SEP_1(PRE) SERIAL_ECHOPGM(PRE) + #define _SEP_2(PRE,V) do{ Serial.print(F(PRE)); Serial.print(V); }while(0) + #define _SEP_3(a,b,c) do{ _SEP_2(a,b); SERIAL_ECHOPGM(c); }while(0) + #define _SEP_4(a,b,V...) do{ _SEP_2(a,b); _SEP_2(V); }while(0) + + // Print up to 1 pairs of values followed by newline + #define __SELP_N(N,V...) _SELP_##N(V) + #define _SELP_N(N,V...) __SELP_N(N,V) + #define _SELP_1(PRE) SERIAL_ECHOLNPGM(PRE) + #define _SELP_2(PRE,V) do{ Serial.print(F(PRE)); Serial.println(V); }while(0) + #define _SELP_3(a,b,c) do{ _SEP_2(a,b); SERIAL_ECHOLNPGM(c); }while(0) + #define _SELP_4(a,b,V...) do{ _SEP_2(a,b); _SELP_2(V); }while(0) #define SERIAL_ECHO_START() #define SERIAL_ECHOLNPGM(str) Serial.println(F(str)) #define SERIAL_ECHOPGM(str) Serial.print(F(str)) - #define SERIAL_ECHO_MSG(str) Serial.println(str) - #define SERIAL_ECHOLNPAIR(str, val) do{ Serial.print(F(str)); Serial.println(val); }while(0) - #define SERIAL_ECHOPAIR(str, val) do{ Serial.print(F(str)); Serial.print(val); }while(0) + #define SERIAL_ECHO_MSG(V...) SERIAL_ECHOLNPGM(V) + #define SERIAL_ECHOLNPGM(V...) _SELP_N(NUM_ARGS(V),V) + #define SERIAL_ECHOPGM(str, val) do{ Serial.print(F(str)); Serial.print(val); }while(0) #define safe_delay delay @@ -268,7 +288,7 @@ // Remove compiler warning on an unused variable #ifndef UNUSED - #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) + #ifdef HAL_STM32 #define UNUSED(X) (void)X #else #define UNUSED(x) ((void)(x)) @@ -276,3 +296,7 @@ #endif #endif // !__MARLIN_FIRMWARE__ + +#ifndef SD_SPI_SPEED + #define SD_SPI_SPEED SPI_FULL_SPEED +#endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp new file mode 100644 index 000000000000..470d3806ee8b --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.cpp @@ -0,0 +1,60 @@ +/*********************** + * adjuster_widget.cpp * + ***********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2021 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#if ENABLED(FTDI_EXTENDED) + +#define SUB_COLS 9 +#define SUB_ROWS 1 +#define VAL_POS SUB_POS(1,1), SUB_SIZE(5,1) +#define INC_POS SUB_POS(6,1), SUB_SIZE(2,1) +#define DEC_POS SUB_POS(8,1), SUB_SIZE(2,1) + +namespace FTDI { + void draw_adjuster_value(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, float value, FSTR_P units, int8_t width, uint8_t precision) { + char str[width + precision + 10 + (units ? strlen_P((const char*) units) : 0)]; + if (isnan(value)) + strcpy_P(str, PSTR("-")); + else + dtostrf(value, width, precision, str); + + if (units) { + strcat_P(str, PSTR(" ")); + strcat_P(str, (const char*) units); + } + + cmd.tag(0).text(VAL_POS, str); + } + + void draw_adjuster(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, uint8_t tag, float value, FSTR_P units, int8_t width, uint8_t precision, draw_mode_t what) { + if (what & BACKGROUND) + cmd.tag(0).button(VAL_POS, F(""), FTDI::OPT_FLAT); + + if (what & FOREGROUND) { + draw_adjuster_value(cmd, x, y, w, h, value, units, width, precision); + cmd.tag(tag ).button(INC_POS, F("-")) + .tag(tag+1).button(DEC_POS, F("+")); + } + } +} // namespace FTDI + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.h new file mode 100644 index 000000000000..fa5f8e46e6d5 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/adjuster_widget.h @@ -0,0 +1,40 @@ +/********************* + * adjuster_widget.h * + *********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2021 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +namespace FTDI { + void draw_adjuster_value( + CommandProcessor& cmd, + int16_t x, int16_t y, int16_t w, int16_t h, + float value, FSTR_P units = nullptr, + int8_t width = 5, uint8_t precision = 1 + ); + + void draw_adjuster( + CommandProcessor& cmd, + int16_t x, int16_t y, int16_t w, int16_t h, + uint8_t tag, + float value, FSTR_P units = nullptr, + int8_t width = 5, uint8_t precision = 1, + draw_mode_t what = BOTH + ); +} diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.cpp new file mode 100644 index 000000000000..0a45c0d33903 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.cpp @@ -0,0 +1,52 @@ +/************** + * arrows.cpp * + **************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2021 - SynDaver 3D * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#if ENABLED(FTDI_EXTENDED) + +#define COORD(X,Y) cx + s*(swapXY ? Y : (flipX ? -X : X)), cy + s*(swapXY ? (flipX ? -X : X) : Y) + +namespace FTDI { + + void drawArrow(int x, int y, int w, int h, Direction direction) { + const bool swapXY = direction == UP || direction == DOWN; + const bool flipX = direction == UP || direction == LEFT; + const int s = min(w,h); + const int cx = (x + w/2)*16; + const int cy = (y + h/2)*16; + + CommandProcessor cmd; + cmd.cmd(SAVE_CONTEXT()) + .cmd(LINE_WIDTH(s/2)) + .cmd(BEGIN(LINES)) + .cmd(VERTEX2F(COORD( 5, 0))) + .cmd(VERTEX2F(COORD( 2,-2))) + .cmd(VERTEX2F(COORD( 5, 0))) + .cmd(VERTEX2F(COORD( 2, 2))) + .cmd(VERTEX2F(COORD( 5, 0))) + .cmd(VERTEX2F(COORD(-5, 0))) + .cmd(RESTORE_CONTEXT()); + } + +} // namespace FTDI + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.h new file mode 100644 index 000000000000..e9592d47a05f --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/arrows.h @@ -0,0 +1,28 @@ +/************ + * arrows.h * + ************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2021 - SynDaver 3D * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +namespace FTDI { + enum Direction {UP, DOWN, LEFT, RIGHT}; + + void drawArrow(int x, int y, int w, int h, Direction direction); +} diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/bitmap_info.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/bitmap_info.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/bitmap_info.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/bitmap_info.h diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp new file mode 100644 index 000000000000..32cc37d2e2f7 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.cpp @@ -0,0 +1,108 @@ +/************************* + * circular_progress.cpp * + *************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "ftdi_extended.h" + +#if ENABLED(FTDI_EXTENDED) + +/* This function draws a circular progress "ring" */ +namespace FTDI { + void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, char *text, uint32_t bgcolor, uint32_t fgcolor) { + const float rim = 0.3; + const float a = percent/100.0*2.0*PI; + const float a1 = min(PI/2, a); + const float a2 = min(PI/2, a-a1); + const float a3 = min(PI/2, a-a1-a2); + const float a4 = min(PI/2, a-a1-a2-a3); + + const int ro = min(w,h) * 8; + const int rr = ro * rim; + const int cx = x * 16 + w * 8; + const int cy = y * 16 + h * 8; + + // Load a rim shape into stencil buffer + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(TAG_MASK(0)); + cmd.cmd(CLEAR(0,1,0)); + cmd.cmd(COLOR_MASK(0,0,0,0)); + cmd.cmd(STENCIL_OP(STENCIL_OP_KEEP, STENCIL_OP_INVERT)); + cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_ALWAYS, 255, 255)); + cmd.cmd(BEGIN(POINTS)); + cmd.cmd(POINT_SIZE(ro)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(POINT_SIZE(ro - rr)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(RESTORE_CONTEXT()); + + // Mask further drawing by stencil buffer + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_NOTEQUAL, 0, 255)); + + // Fill the background + cmd.cmd(COLOR_RGB(bgcolor)); + cmd.cmd(BEGIN(POINTS)); + cmd.cmd(POINT_SIZE(ro)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(COLOR_RGB(fgcolor)); + + // Paint upper-right quadrant + cmd.cmd(BEGIN(EDGE_STRIP_A)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx + ro*sin(a1) + 16,cy - ro*cos(a1) + 8)); + + // Paint lower-right quadrant + if (a > PI/2) { + cmd.cmd(BEGIN(EDGE_STRIP_R)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx + ro*cos(a2),cy + ro*sin(a2) + 16)); + } + + // Paint lower-left quadrant + if (a > PI) { + cmd.cmd(BEGIN(EDGE_STRIP_B)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx - ro*sin(a3) - 8,cy + ro*cos(a3))); + } + + // Paint upper-left quadrant + if (a > 1.5*PI) { + cmd.cmd(BEGIN(EDGE_STRIP_L)); + cmd.cmd(VERTEX2F(cx, cy)); + cmd.cmd(VERTEX2F(cx - ro*cos(a4),cy - ro*sin(a4))); + } + cmd.cmd(RESTORE_CONTEXT()); + + // Draw the text + + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(COLOR_RGB(fgcolor)); + cmd.text(x,y,w,h,text, OPT_CENTERX | OPT_CENTERY); + cmd.cmd(RESTORE_CONTEXT()); + } + + void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, uint32_t bgcolor, uint32_t fgcolor) { + char str[5]; + sprintf(str,"%d\%%",int(percent)); + draw_circular_progress(cmd, x, y, w, h, percent, str, bgcolor, fgcolor); + } +} // namespace FTDI + +#endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.h new file mode 100644 index 000000000000..68fc06b4d9e4 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/circular_progress.h @@ -0,0 +1,27 @@ +/*********************** + * circular_progress.h * + ***********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +namespace FTDI { + void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, char *text, uint32_t bgcolor, uint32_t fgcolor); + void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, uint32_t bgcolor, uint32_t fgcolor); +} diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.cpp similarity index 82% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.cpp index e324cb978aa0..fd9c70ff3c5f 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.cpp @@ -26,4 +26,16 @@ CommandProcessor::btn_style_func_t *CommandProcessor::_btn_style_callback = CommandProcessor::default_button_style_func; bool CommandProcessor::is_tracking = false; +uint32_t CommandProcessor::memcrc(uint32_t ptr, uint32_t num) { + const uint16_t x = CLCD::mem_read_16(CLCD::REG::CMD_WRITE); + memcrc(ptr, num, 0); + wait(); + return CLCD::mem_read_32(CLCD::MAP::RAM_CMD + x + 12); +} + +bool CommandProcessor::wait() { + while (is_processing() && !has_fault()) { /* nada */ } + return !has_fault(); +} + #endif // FTDI_EXTENDED diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h similarity index 93% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h index da51ee638517..24e93982c22a 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/command_processor.h @@ -65,7 +65,7 @@ class CommandProcessor : public CLCD::CommandFifo { uint8_t _style = 0; protected: - // Returns the cannonical thickness of a widget (i.e. the height of a toggle element) + // Returns the canonical thickness of a widget (i.e. the height of a toggle element) uint16_t widget_thickness() { CLCD::FontMetrics fm(_font); return fm.height * 20.0/16; @@ -146,10 +146,13 @@ class CommandProcessor : public CLCD::CommandFifo { return *this; } + bool wait(); + uint32_t memcrc(uint32_t ptr, uint32_t num); + // Wrap all the CommandFifo routines to allow method chaining inline CommandProcessor& cmd (uint32_t cmd32) {CLCD::CommandFifo::cmd(cmd32); return *this;} - inline CommandProcessor& cmd (void* data, uint16_t len) {CLCD::CommandFifo::cmd(data, len); return *this;} + inline CommandProcessor& cmd (void *data, uint16_t len) {CLCD::CommandFifo::cmd(data, len); return *this;} inline CommandProcessor& execute() {CLCD::CommandFifo::execute(); return *this;} inline CommandProcessor& fgcolor (uint32_t rgb) {CLCD::CommandFifo::fgcolor(rgb); return *this;} @@ -206,8 +209,22 @@ class CommandProcessor : public CLCD::CommandFifo { inline CommandProcessor& rectangle(int16_t x, int16_t y, int16_t w, int16_t h) { using namespace FTDI; CLCD::CommandFifo::cmd(BEGIN(RECTS)); - CLCD::CommandFifo::cmd(VERTEX2F(x * 16, y * 16)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, y * 16)); + CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, (y + h) * 16)); + return *this; + } + + inline CommandProcessor& border(int16_t x, int16_t y, int16_t w, int16_t h) { + using namespace FTDI; + CLCD::CommandFifo::cmd(BEGIN(LINES)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, y * 16)); + CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, y * 16)); + CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, y * 16)); + CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, (y + h) * 16)); CLCD::CommandFifo::cmd(VERTEX2F((x + w) * 16, (y + h) * 16)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, (y + h) * 16)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, (y + h) * 16)); + CLCD::CommandFifo::cmd(VERTEX2F( x * 16, y * 16)); return *this; } @@ -215,18 +232,16 @@ class CommandProcessor : public CLCD::CommandFifo { FORCEDINLINE CommandProcessor& toggle(int16_t x, int16_t y, int16_t w, int16_t h, T text, bool state, uint16_t options = FTDI::OPT_3D) { CLCD::FontMetrics fm(_font); const int16_t widget_h = fm.height * 20.0 / 16; - //const int16_t outer_bar_r = widget_h / 2; - //const int16_t knob_r = outer_bar_r - 1.5; // The y coordinate of the toggle is the baseline of the text, // so we must introduce a fudge factor based on the line height to // actually center the control. const int16_t fudge_y = fm.height * 5 / 16; - CLCD::CommandFifo::toggle(x + h / 2, y + (h - widget_h) / 2 + fudge_y, w - h, _font, options, state); + CLCD::CommandFifo::toggle(x + widget_h, y + (h - widget_h) / 2 + fudge_y, w - widget_h, _font, options, state); CLCD::CommandFifo::str(text); return *this; } - CommandProcessor& toggle2(int16_t x, int16_t y, int16_t w, int16_t h, progmem_str no, progmem_str yes, bool state, uint16_t options = FTDI::OPT_3D) { + CommandProcessor& toggle2(int16_t x, int16_t y, int16_t w, int16_t h, FSTR_P no, FSTR_P yes, bool state, uint16_t options = FTDI::OPT_3D) { char text[strlen_P((const char *)no) + strlen_P((const char *)yes) + 2]; strcpy_P(text, (const char *)no); strcat(text, "\xFF"); @@ -234,7 +249,7 @@ class CommandProcessor : public CLCD::CommandFifo { return toggle(x, y, w, h, text, state, options); } - // Contrained drawing routines. These constrain the widget inside a box for easier layout. + // Constrained drawing routines. These constrain the widget inside a box for easier layout. // The FORCEDINLINE ensures that the code is inlined so that all the math is done at compile time. FORCEDINLINE CommandProcessor& track_linear(int16_t x, int16_t y, int16_t w, int16_t h, int16_t tag) { diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp index a13c36265ed8..1ee73c140e3a 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp @@ -132,8 +132,8 @@ bool DLCache::store(uint32_t min_bytes /* = 0*/) { // Not enough memory to cache the display list. #if ENABLED(TOUCH_UI_DEBUG) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR ("Not enough space in GRAM to cache display list, free space: ", dl_slot_size); - SERIAL_ECHOLNPAIR(" Required: ", dl_size); + SERIAL_ECHOPGM ("Not enough space in GRAM to cache display list, free space: ", dl_slot_size); + SERIAL_ECHOLNPGM(" Required: ", dl_size); #endif dl_slot_used = 0; save_slot(); @@ -142,8 +142,8 @@ bool DLCache::store(uint32_t min_bytes /* = 0*/) { else { #if ENABLED(TOUCH_UI_DEBUG) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR ("Saving DL to RAMG cache, bytes: ", dl_slot_used); - SERIAL_ECHOLNPAIR(" Free space: ", dl_slot_size); + SERIAL_ECHOPGM ("Saving DL to RAMG cache, bytes: ", dl_slot_used); + SERIAL_ECHOLNPGM(" Free space: ", dl_slot_size); #endif dl_slot_used = dl_size; save_slot(); @@ -172,8 +172,8 @@ void DLCache::append() { cmd.execute(); wait_until_idle(); SERIAL_ECHO_START(); - SERIAL_ECHOPAIR ("Appending to DL from RAMG cache, bytes: ", dl_slot_used); - SERIAL_ECHOLNPAIR(" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL)); + SERIAL_ECHOPGM ("Appending to DL from RAMG cache, bytes: ", dl_slot_used); + SERIAL_ECHOLNPGM(" REG_CMD_DL: ", CLCD::mem_read_32(REG::CMD_DL)); #endif } diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp index 6c0392c200db..7fccb309f56b 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.cpp @@ -108,7 +108,7 @@ namespace FTDI { * - Dispatches onTouchStart and onTouchEnd events to the active screen. * - Handles auto-repetition by sending onTouchHeld to the active screen periodically. * - Plays touch feedback "click" sounds when appropriate. - * - Performs debouncing to supress spurious touch events. + * - Performs debouncing to suppress spurious touch events. */ void EventLoop::process_events() { // If the LCD is processing commands, don't check @@ -124,8 +124,7 @@ namespace FTDI { case UNPRESSED: if (tag != 0) { #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("Touch start: ", tag); + SERIAL_ECHO_MSG("Touch start: ", tag); #endif pressed_tag = tag; @@ -186,8 +185,7 @@ namespace FTDI { if (UIData::flags.bits.touch_end_sound) sound.play(unpress_sound); #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("Touch end: ", pressed_tag); + SERIAL_ECHO_MSG("Touch end: ", pressed_tag); #endif const uint8_t saved_pressed_tag = pressed_tag; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/event_loop.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h index fd84c795f11f..e99c798eeae1 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/ftdi_extended.h @@ -47,6 +47,10 @@ #include "sound_player.h" #include "sound_list.h" #include "polygon.h" + #include "poly_ui.h" + #include "arrows.h" #include "text_box.h" #include "text_ellipsis.h" + #include "adjuster_widget.h" + #include "circular_progress.h" #endif diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h similarity index 60% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h index 82bb8abf7fc0..813f4f04844f 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h @@ -47,28 +47,40 @@ #define MARGIN_DEFAULT 3 #endif -// EDGE_R adds some black space on the right edge of the display -// This shifts some of the screens left to visually center them. +// The EDGE variables adds some space on the edges of the display +#define EDGE_T 0 +#define EDGE_B 0 +#define EDGE_L 0 #define EDGE_R 0 -// GRID_X and GRID_Y computes the positions of the divisions on +// _GRID_X and _GRID_Y computes the positions of the divisions on // the layout grid. -#define GRID_X(x) ((x)*(FTDI::display_width-EDGE_R)/GRID_COLS) -#define GRID_Y(y) ((y)*FTDI::display_height/GRID_ROWS) +#define _GRID_X(x) ((x)*(FTDI::display_width-EDGE_R-EDGE_L)/GRID_COLS+EDGE_L) +#define _GRID_Y(y) ((y)*(FTDI::display_height-EDGE_B-EDGE_T)/GRID_ROWS+EDGE_T) + +// BOX_X, BOX_Y, BOX_W and BOX_X returns the top-left and width +// and height of position on the grid. + +#define BOX_X(x) (_GRID_X((x)-1)) +#define BOX_Y(y) (_GRID_Y((y)-1)) +#define BOX_W(w) (_GRID_X(w) - _GRID_X(0)) +#define BOX_H(h) (_GRID_Y(h) - _GRID_Y(0)) // BTN_X, BTN_Y, BTN_W and BTN_X returns the top-left and width // and height of a button, taking into account the button margins. -#define BTN_X(x) (GRID_X((x)-1) + MARGIN_L) -#define BTN_Y(y) (GRID_Y((y)-1) + MARGIN_T) -#define BTN_W(w) (GRID_X(w) - MARGIN_L - MARGIN_R) -#define BTN_H(h) (GRID_Y(h) - MARGIN_T - MARGIN_B) +#define BTN_X(x) (BOX_X(x) + MARGIN_L) +#define BTN_Y(y) (BOX_Y(y) + MARGIN_T) +#define BTN_W(w) (BOX_W(w) - MARGIN_L - MARGIN_R) +#define BTN_H(h) (BOX_H(h) - MARGIN_T - MARGIN_B) -// Abbreviations for common phrases, to allow a button to be -// defined in one line of source. +// Abbreviations for common phrases, to allow a box or button +// to be defined in one line of source. #define BTN_POS(x,y) BTN_X(x), BTN_Y(y) #define BTN_SIZE(w,h) BTN_W(w), BTN_H(h) +#define BOX_POS(x,y) BOX_X(x), BOX_Y(y) +#define BOX_SIZE(w,h) BOX_W(w), BOX_H(h) // Draw a reference grid for ease of spacing out widgets. #define DRAW_LAYOUT_GRID \ @@ -76,17 +88,30 @@ cmd.cmd(LINE_WIDTH(4)); \ for (int i = 1; i <= GRID_COLS; i++) { \ cmd.cmd(BEGIN(LINES)); \ - cmd.cmd(VERTEX2F(GRID_X(i) *16, 0 *16)); \ - cmd.cmd(VERTEX2F(GRID_X(i) *16, FTDI::display_height *16)); \ + cmd.cmd(VERTEX2F(_GRID_X(i) *16, 0 *16)); \ + cmd.cmd(VERTEX2F(_GRID_X(i) *16, FTDI::display_height *16)); \ } \ for (int i = 1; i < GRID_ROWS; i++) { \ cmd.cmd(BEGIN(LINES)); \ - cmd.cmd(VERTEX2F(0 *16, GRID_Y(i) *16)); \ - cmd.cmd(VERTEX2F(FTDI::display_width *16, GRID_Y(i) *16)); \ + cmd.cmd(VERTEX2F(0 *16, _GRID_Y(i) *16)); \ + cmd.cmd(VERTEX2F(FTDI::display_width *16, _GRID_Y(i) *16)); \ } \ cmd.cmd(LINE_WIDTH(16)); \ } +// Routines for subdividing a grid within a box (x,y,w,h) + +#define SUB_GRID_W(W) ((W)*w/SUB_COLS) +#define SUB_GRID_H(H) ((H)*h/SUB_ROWS) +#define SUB_GRID_X(X) (SUB_GRID_W((X)-1) + x) +#define SUB_GRID_Y(Y) (SUB_GRID_H((Y)-1) + y) +#define SUB_X(X) (SUB_GRID_X(X) + MARGIN_L) +#define SUB_Y(Y) (SUB_GRID_Y(Y) + MARGIN_T) +#define SUB_W(W) (SUB_GRID_W(W) - MARGIN_L - MARGIN_R) +#define SUB_H(H) (SUB_GRID_H(H) - MARGIN_T - MARGIN_B) +#define SUB_POS(X,Y) SUB_X(X), SUB_Y(Y) +#define SUB_SIZE(W,H) SUB_W(W), SUB_H(H) + namespace FTDI { #if ENABLED(TOUCH_UI_PORTRAIT) constexpr uint16_t display_width = Vsize; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/poly_ui.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/poly_ui.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h index ba41650f2f84..809e729a8f69 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/poly_ui.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/poly_ui.h @@ -239,9 +239,11 @@ class DeduplicatedPolyReader : public POLY_READER { */ template> class GenericPolyUI { - private: + protected: CommandProcessor &cmd; + draw_mode_t mode; + private: // Attributes used to paint buttons uint32_t btn_fill_color = 0x000000; @@ -250,8 +252,6 @@ class GenericPolyUI { uint32_t btn_stroke_color = 0x000000; uint8_t btn_stroke_width = 28; - draw_mode_t mode; - public: enum ButtonStyle : uint8_t { FILL = 1, @@ -272,7 +272,7 @@ class GenericPolyUI { if (clip) { // Clipping reduces the number of pixels that are // filled, allowing more complex shapes to be drawn - // in the alloted time. + // in the allotted time. bounds(r, x, y, w, h); cmd.cmd(SAVE_CONTEXT()); cmd.cmd(SCISSOR_XY(x, y)); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h index 6aa52f09c9bd..3dc80bb3bba0 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/polygon.h @@ -41,7 +41,7 @@ * ... * p.end_fill(); * - * Based on the example from "Applicaton Note AN_334, FT801 Polygon Application": + * Based on the example from "Application Note AN_334, FT801 Polygon Application": * * https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_334-FT801_Polygon_Application.pdf */ diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/rgb_t.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/rgb_t.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/rgb_t.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/rgb_t.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp index 944237bd281d..44836cec4878 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp @@ -26,14 +26,14 @@ /********************** VIRTUAL DISPATCH DATA TYPE ******************************/ uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) { - for (uint8_t type = 0; type < functionTableSize; type++) { + for (uint8_t type = 0; type < tableSize(); type++) { if (GET_METHOD(type, onRedraw) == onRedraw_ptr) { return type; } } #if ENABLED(TOUCH_UI_DEBUG) SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Screen not found: ", (uintptr_t) onRedraw_ptr); + SERIAL_ECHOPGM("Screen not found: ", (uintptr_t) onRedraw_ptr); #endif return 0xFF; } @@ -43,14 +43,13 @@ void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) { if (type != 0xFF) { setType(type); #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("New screen: ", type); + SERIAL_ECHO_MSG("New screen: ", type); #endif } } void ScreenRef::initializeAll() { - for (uint8_t type = 0; type < functionTableSize; type++) + for (uint8_t type = 0; type < tableSize(); type++) GET_METHOD(type, onStartup)(); } diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h index 1581cbbbc74e..a13ab8e9aa7a 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.h @@ -50,7 +50,11 @@ typedef enum { #define GET_METHOD(type, method) reinterpret_cast(pgm_read_ptr_far(&functionTable[type].method##_ptr)) #define SCREEN_TABLE PROGMEM const ScreenRef::table_t ScreenRef::functionTable[] = -#define SCREEN_TABLE_POST const uint8_t ScreenRef::functionTableSize = sizeof(ScreenRef::functionTable)/sizeof(ScreenRef::functionTable[0]); +#define SCREEN_TABLE_POST size_t ScreenRef::tableSize() { \ + constexpr size_t siz = sizeof(functionTable)/sizeof(functionTable[0]); \ + static_assert(siz > 0, "The screen table is empty!"); \ + return siz; \ + } class ScreenRef { protected: @@ -79,14 +83,12 @@ class ScreenRef { uint8_t type = 0; static PROGMEM const table_t functionTable[]; - static const uint8_t functionTableSize; public: - uint8_t getType() {return type;} + static size_t tableSize(); - void setType(uint8_t t) { - type = t; - } + uint8_t getType() {return type;} + void setType(uint8_t t) {type = t;} uint8_t lookupScreen(onRedraw_func_t onRedraw_ptr); @@ -150,7 +152,7 @@ class UIScreen { #define AT_SCREEN(screen) (current_screen.getType() == current_screen.lookupScreen(screen::onRedraw)) #define IS_PARENT_SCREEN(screen) (current_screen.peek() == current_screen.lookupScreen(screen::onRedraw)) -/************************** CACHED VS UNCHACHED SCREENS ***************************/ +/************************** CACHED VS UNCACHED SCREENS ***************************/ class UncachedScreen { public: @@ -235,7 +237,7 @@ class CachedScreen { cmd.cmd(CMD_SWAP); cmd.execute(); #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHOLNPAIR("Time to draw screen (ms): ", millis() - start_time); + SERIAL_ECHOLNPGM("Time to draw screen (ms): ", millis() - start_time); #endif } }; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h index 20df15a91edb..2ddab1b818b4 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h @@ -24,7 +24,7 @@ class SoundList { private: static PROGMEM const struct list_t { - const char *const PROGMEM name; + const char * const PROGMEM name; const FTDI::SoundPlayer::sound_t* data; } list[]; public: diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp similarity index 94% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp index 07d1ff56246d..47bf79e46743 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp @@ -37,9 +37,7 @@ namespace FTDI { void SoundPlayer::play(effect_t effect, note_t note) { #if ENABLED(TOUCH_UI_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR ("Playing note ", int(note)); - SERIAL_ECHOLNPAIR(", instrument ", int(effect)); + SERIAL_ECHO_MSG("Playing note ", note, ", instrument ", effect); #endif // Play the note @@ -64,7 +62,7 @@ namespace FTDI { timer.start(); } - void SoundPlayer::play(const sound_t* seq, play_mode_t mode) { + void SoundPlayer::play(const sound_t *seq, play_mode_t mode) { sequence = seq; wait = 250; // Adding this delay causes the note to not be clipped, not sure why. timer.start(); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h index fcfe70bd76d1..3ba39b8c57bf 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h @@ -55,7 +55,7 @@ namespace FTDI { static void play(effect_t effect, note_t note = NOTE_C4); static bool is_sound_playing(); - void play(const sound_t* seq, play_mode_t mode = PLAY_SYNCHRONOUS); + void play(const sound_t *seq, play_mode_t mode = PLAY_SYNCHRONOUS); void play_tone(const uint16_t frequency_hz, const uint16_t duration_ms); bool has_more_notes() {return sequence != 0;}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp similarity index 54% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp index b7422a06b1b0..b4d8156b39d8 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp @@ -23,30 +23,39 @@ #if ENABLED(FTDI_EXTENDED) +#define IS_LINE_SEPARATOR(c) c == '\n' || c == '\t' +#define IS_WORD_SEPARATOR(c) c == ' ' +#define IS_SEPARATOR(c) IS_LINE_SEPARATOR(c) || IS_WORD_SEPARATOR(c) + namespace FTDI { /** * Given a str, end will be set to the position at which a line needs to * be broken so that the display width is less than w. The line will also * be broken after a '\n'. Returns the display width of the line. */ - static uint16_t find_line_break(const FontMetrics &fm, uint16_t w, const char *str, const char *&end) { - w -= fm.get_char_width(' '); - const char *p = str; - end = str; + static uint16_t find_line_break(const FontMetrics &utf8_fm, const CLCD::FontMetrics &clcd_fm, const uint16_t w, const char *start, const char *&end, bool use_utf8) { + const char *p = start; + end = start; uint16_t lw = 0, result = 0; for (;;) { - utf8_char_t c = get_utf8_char_and_inc(p); - if (c == ' ' || c == '\n' || c == '\0') { - if (lw < w || end == str) { - end = (c == '\0') ? p-1 : p; - result = lw; - } - if (c == '\0' || c == '\n') break; + const char *next = p; + const utf8_char_t c = get_utf8_char_and_inc(next); + // Decide whether to break the string at this location + if (IS_SEPARATOR(c) || c == '\0' ) { + end = p; + result = lw; } - lw += fm.get_char_width(c); + if (IS_LINE_SEPARATOR(c) || c == '\0') break; + // Measure the next character + const uint16_t cw = use_utf8 ? utf8_fm.get_char_width(c) : clcd_fm.char_widths[(uint8_t)c]; + // Stop processing once string exceeds the display width + if (lw + cw > w) break; + // Now add the length of the current character to the tally. + lw += cw; + p = next; } - if (end == str) { - end = p-1; + if (end == start) { + end = p; result = lw; } return result; @@ -55,16 +64,18 @@ namespace FTDI { /** * This function returns a measurements of the word-wrapped text box. */ - static void measure_text_box(const FontMetrics &fm, const char *str, uint16_t &width, uint16_t &height) { + static void measure_text_box(const FontMetrics &utf8_fm, const CLCD::FontMetrics &clcd_fm, const char *str, uint16_t &width, uint16_t &height, bool use_utf8) { const char *line_start = (const char*)str; const char *line_end; const uint16_t wrap_width = width; width = height = 0; for (;;) { - uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end); - if (line_end == line_start) break; + const uint16_t line_width = find_line_break(utf8_fm, clcd_fm, wrap_width, line_start, line_end, use_utf8); width = max(width, line_width); - height += fm.get_height(); + height += utf8_fm.get_height(); + if (IS_SEPARATOR(*line_end)) line_end++; + if (*line_end == '\0') break; + if (line_end == line_start) break; line_start = line_end; } } @@ -73,53 +84,58 @@ namespace FTDI { * This function draws text inside a bounding box, doing word wrapping and using the largest font that will fit. */ void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options, uint8_t font) { + #if ENABLED(TOUCH_UI_USE_UTF8) + const bool use_utf8 = has_utf8_chars(str); + #else + constexpr bool use_utf8 = false; + #endif uint16_t box_width, box_height; - FontMetrics fm(font); + FontMetrics utf8_fm(font); + CLCD::FontMetrics clcd_fm; + clcd_fm.load(font); // Shrink the font until we find a font that fits for (;;) { box_width = w; - measure_text_box(fm, str, box_width, box_height); + measure_text_box(utf8_fm, clcd_fm, str, box_width, box_height, use_utf8); if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break; - fm.load(--font); if (font == 26) break; + utf8_fm.load(--font); + clcd_fm.load(font); } - const uint16_t dx = (options & OPT_RIGHTX) ? w : (options & OPT_CENTERX) ? w/2 : 0; - const uint16_t dy = (options & OPT_CENTERY) ? (h - box_height)/2 : 0; + const uint16_t dx = (options & OPT_RIGHTX) ? w : + (options & OPT_CENTERX) ? w / 2 : 0, + dy = (options & OPT_BOTTOMY) ? (h - box_height) : + (options & OPT_CENTERY) ? (h - box_height) / 2 : 0; - const char *line_start = str; - const char *line_end; + const char *line_start = str, *line_end; for (;;) { - find_line_break(fm, w, line_start, line_end); - if (line_end == line_start) break; + find_line_break(utf8_fm, clcd_fm, w, line_start, line_end, use_utf8); const size_t line_len = line_end - line_start; if (line_len) { - char line[line_len + 1]; - strncpy(line, line_start, line_len); - line[line_len] = 0; - if (line[line_len - 1] == '\n' || line[line_len - 1] == ' ') - line[line_len - 1] = 0; - #if ENABLED(TOUCH_UI_USE_UTF8) - if (has_utf8_chars(line)) { - draw_utf8_text(cmd, x + dx, y + dy, line, fm.fs, options & ~OPT_CENTERY); - } else + if (use_utf8) + draw_utf8_text(cmd, x + dx, y + dy, line_start, utf8_fm.fs, options & ~(OPT_CENTERY | OPT_BOTTOMY), line_len); + else #endif { - cmd.CLCD::CommandFifo::text(x + dx, y + dy, font, options & ~OPT_CENTERY); - cmd.CLCD::CommandFifo::str(line); + cmd.CLCD::CommandFifo::text(x + dx, y + dy, font, options & ~(OPT_CENTERY | OPT_BOTTOMY)); + cmd.CLCD::CommandFifo::str(line_start, line_len); } } - y += fm.get_height(); + y += utf8_fm.get_height(); + if (IS_SEPARATOR(*line_end)) line_end++; + if (*line_end == '\0') break; + if (line_end == line_start) break; line_start = line_end; } } - void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, progmem_str pstr, uint16_t options, uint8_t font) { + void draw_text_box(CommandProcessor& cmd, int x, int y, int w, int h, FSTR_P pstr, uint16_t options, uint8_t font) { char str[strlen_P((const char*)pstr) + 1]; strcpy_P(str, (const char*)pstr); draw_text_box(cmd, x, y, w, h, (const char*) str, options, font); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h index 9d8cd440615e..cc702344ba9b 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.h @@ -25,6 +25,8 @@ * This function draws text inside a bounding box, doing word wrapping and using the largest font that will fit. */ namespace FTDI { - void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, progmem_str str, uint16_t options = 0, uint8_t font = 31); + constexpr uint16_t OPT_BOTTOMY = 0x1000; // Non-standard + + void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, FSTR_P str, uint16_t options = 0, uint8_t font = 31); void draw_text_box(class CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options = 0, uint8_t font = 31); } diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp similarity index 80% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp index 5fc89f1fa9d3..698bcdb15062 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp @@ -29,30 +29,29 @@ namespace FTDI { * Helper function for drawing text with ellipses. The str buffer may be modified and should have space for up to two extra characters. */ static void _draw_text_with_ellipsis(CommandProcessor& cmd, int16_t x, int16_t y, int16_t w, int16_t h, char *str, uint16_t options, uint8_t font) { - FontMetrics fm(font); - const int16_t ellipsisWidth = fm.get_char_width('.') * 3; + #if ENABLED(TOUCH_UI_USE_UTF8) + const bool use_utf8 = has_utf8_chars(str); + #define CHAR_WIDTH(c) use_utf8 ? utf8_fm.get_char_width(c) : clcd_fm.char_widths[(uint8_t)c] + #else + #define CHAR_WIDTH(c) utf8_fm.get_char_width(c) + #endif + FontMetrics utf8_fm(font); + CLCD::FontMetrics clcd_fm; + clcd_fm.load(font); + const int16_t ellipsisWidth = utf8_fm.get_char_width('.') * 3; // Compute the total line length, as well as // the location in the string where it can // split and still allow the ellipsis to fit. int16_t lineWidth = 0; - char *breakPoint = str; - #ifdef TOUCH_UI_USE_UTF8 - char *tstr = str; - while (*tstr) { - breakPoint = tstr; - const utf8_char_t c = get_utf8_char_and_inc(tstr); - lineWidth += fm.get_char_width(c); - if (lineWidth + ellipsisWidth < w) - break; - } - #else - for (char* c = str; *c; c++) { - lineWidth += fm.get_char_width(*c); - if (lineWidth + ellipsisWidth < w) - breakPoint = c; - } - #endif + char *breakPoint = str; + const char *next = str; + while (*next) { + const utf8_char_t c = get_utf8_char_and_inc(next); + lineWidth += CHAR_WIDTH(c); + if (lineWidth + ellipsisWidth < w) + breakPoint = (char*)next; + } if (lineWidth > w) { *breakPoint = '\0'; @@ -61,7 +60,7 @@ namespace FTDI { cmd.apply_text_alignment(x, y, w, h, options); #if ENABLED(TOUCH_UI_USE_UTF8) - if (has_utf8_chars(str)) { + if (use_utf8) { draw_utf8_text(cmd, x, y, str, font_size_t::from_romfont(font), options); } else #endif @@ -81,7 +80,7 @@ namespace FTDI { _draw_text_with_ellipsis(cmd, x, y, w, h, tmp, options, font); } - void draw_text_with_ellipsis(CommandProcessor& cmd, int x, int y, int w, int h, progmem_str pstr, uint16_t options, uint8_t font) { + void draw_text_with_ellipsis(CommandProcessor& cmd, int x, int y, int w, int h, FSTR_P pstr, uint16_t options, uint8_t font) { char tmp[strlen_P((const char*)pstr) + 3]; strcpy_P(tmp, (const char*)pstr); _draw_text_with_ellipsis(cmd, x, y, w, h, tmp, options, font); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.h similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.h index a2d8aa944391..0c6b202ae97a 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.h @@ -26,6 +26,6 @@ * showing ellipsis if it does not fit. */ namespace FTDI { - void draw_text_with_ellipsis(class CommandProcessor& cmd, int x, int y, int w, int h, progmem_str str, uint16_t options = 0, uint8_t font = 31); + void draw_text_with_ellipsis(class CommandProcessor& cmd, int x, int y, int w, int h, FSTR_P str, uint16_t options = 0, uint8_t font = 31); void draw_text_with_ellipsis(class CommandProcessor& cmd, int x, int y, int w, int h, const char *str, uint16_t options = 0, uint8_t font = 31); } diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.cpp similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.cpp diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h index f64d033d524b..576567cf4dee 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/tiny_timer.h @@ -28,7 +28,7 @@ /* tiny_interval_t downsamples a 32-bit millis() value into a 8-bit value which can record periods of - a few seconds with a rougly 1/16th of second + a few seconds with a roughly 1/16th of second resolution. This allows us to measure small intervals without needing to use four-byte counters. */ diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/README.txt b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/README.txt similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/README.txt rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/README.txt diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.cpp similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.cpp diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set.h diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h new file mode 100644 index 000000000000..30b1f8439955 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h @@ -0,0 +1,2529 @@ +/******************************** + * cyrillic_char_set_bitmap_31.h * + ********************************/ + +/**************************************************************************** + * Written By Kirill Shashlov 2020 * + * Marcio Teixeira 2019 - Aleph Objects, Inc. * + * * + * Used GNU FreeFont FreeSans font (licensed under the GPL) * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +const uint8_t cyrillic_font_widths[] PROGMEM = { + 27, // А (0) + 26, // Б + 26, // В + 24, // Г + 33, // Д + 25, // Е + 37, // Ж + 26, // З + + 28, // И (8) + 28, // Й + 26, // К + 25, // Л + 33, // М + 27, // Н + 31, // О + 27, // П + + 26, // Р (16) + 29, // С + 28, // Т + 26, // У + 34, // Ф + 27, // Х + 30, // Ц + 23, // Ч + + 32, // Ш (24) + 34, // Щ + 26, // Ь + 34, // Ы + 34, // Ъ + 28, // Э + 40, // Ю + 26, // Я + + 22, // а (32) + 21, // б + 20, // в + 16, // г + 24, // д + 21, // е + 31, // ж + 19, // з + + 21, // и (40) + 21, // й + 20, // к + 19, // л + 23, // м + 21, // н + 21, // о + 21, // п + + 22, // р (48) + 20, // с + 17, // т + 19, // у + 34, // ф + 19, // х + 23, // ц + 19, // ч + 26, // ш + 28, // щ + 20, // ь + 26, // ы + 26, // ъ + 20, // э + 30, // ю + 20, // я + + 26, // Ё + 21, // ё +}; + + +/* This is a dump of "font_bitmaps/cyrillic_char_set_bitmap_31.png" + * using the tool "bitmap2cpp.py". The tool converts the image into + * 16-level grayscale and packs two pixels per byte. The resulting + * bytes are then RLE compressed to yield (count, byte) pairs. + */ + +const unsigned char cyrillic_font[] PROGMEM = { + /* 0 */ + 0xB9, 0x00, 0x01, 0x2F, 0x02, 0xFF, 0x01, 0x30, 0x10, 0x00, 0x01, 0x7F, + 0x02, 0xFF, 0x01, 0x90, 0x10, 0x00, 0x01, 0xDF, 0x02, 0xFF, 0x01, 0xE0, + 0x0F, 0x00, 0x01, 0x03, 0x03, 0xFF, 0x01, 0xF4, 0x0F, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xFB, 0x01, 0xFF, 0x01, 0xFA, 0x0F, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xF1, 0x02, 0xFF, 0x0F, 0x00, 0x01, 0x5F, 0x01, 0xFF, + 0x01, 0x90, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x50, 0x0E, 0x00, 0x01, 0xAF, + 0x01, 0xFF, 0x01, 0x40, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xB0, 0x0D, 0x00, + 0x01, 0x01, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xF1, 0x0D, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF8, 0x01, 0x00, + 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF7, 0x0D, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x01, 0x00, 0x01, 0x04, 0x01, 0xFF, 0x01, 0xFC, 0x0D, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0xEF, 0x01, 0xFF, + 0x01, 0x20, 0x0C, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x60, 0x02, 0x00, + 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x80, 0x0C, 0x00, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0x10, 0x02, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xD0, 0x0B, 0x00, + 0x01, 0x03, 0x01, 0xFF, 0x01, 0xFA, 0x03, 0x00, 0x01, 0x0E, 0x01, 0xFF, + 0x01, 0xF3, 0x0B, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF5, 0x03, 0x00, + 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF9, 0x0B, 0x00, 0x01, 0x0E, 0x01, 0xFF, + 0x01, 0xE0, 0x03, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xB4, 0x04, 0x44, 0x02, 0xFF, 0x01, 0x40, + 0x0A, 0x00, 0x01, 0xAF, 0x08, 0xFF, 0x01, 0xA0, 0x0A, 0x00, 0x09, 0xFF, + 0x01, 0xF0, 0x09, 0x00, 0x01, 0x06, 0x02, 0xFF, 0x05, 0xEE, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xF5, 0x09, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF5, + 0x05, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFB, 0x09, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xF0, 0x05, 0x00, 0x01, 0x02, 0x02, 0xFF, 0x01, 0x10, + 0x08, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x90, 0x06, 0x00, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0x70, 0x08, 0x00, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x40, + 0x06, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xFE, 0x07, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xF2, + 0x07, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF8, 0x07, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF8, 0x07, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xF2, + 0x07, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xFD, 0x07, 0x00, 0x01, 0x4F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x01, 0x02, 0xFF, 0x01, 0x30, + 0x06, 0x00, 0x01, 0x8D, 0x01, 0xDD, 0x01, 0x60, 0x08, 0x00, 0x01, 0xAD, + 0x01, 0xDD, 0x01, 0x70, 0xCE, 0x00, + + /* 1 */ + 0xB5, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xF4, 0x09, 0x00, 0x01, 0x1F, + 0x09, 0xFF, 0x01, 0xF4, 0x09, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xF4, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD5, 0x07, 0x55, 0x01, 0x51, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xFE, + 0x04, 0xEE, 0x01, 0xDB, 0x01, 0x84, 0x0B, 0x00, 0x01, 0x1F, 0x08, 0xFF, + 0x01, 0xE7, 0x0A, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xD2, 0x09, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD6, 0x04, 0x66, 0x01, 0x68, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0xFD, 0x01, 0x10, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x05, 0x00, 0x01, 0x04, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x90, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x3F, + 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x06, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF5, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF7, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF9, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x06, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF7, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF4, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x06, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xE0, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x05, 0x02, 0xFF, 0x01, 0x80, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xE7, 0x04, 0x77, 0x01, 0x89, + 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xFE, 0x09, 0x00, 0x01, 0x1F, 0x09, 0xFF, + 0x01, 0xE2, 0x09, 0x00, 0x01, 0x1F, 0x08, 0xFF, 0x01, 0xFB, 0x01, 0x10, + 0x09, 0x00, 0x01, 0x1D, 0x06, 0xDD, 0x01, 0xDC, 0x01, 0xB7, 0x01, 0x20, + 0xD1, 0x00, + + /* 2 */ + 0xB5, 0x00, 0x01, 0x1F, 0x06, 0xFF, 0x01, 0xEC, 0x01, 0x94, 0x0B, 0x00, + 0x01, 0x1F, 0x08, 0xFF, 0x01, 0xC3, 0x0A, 0x00, 0x01, 0x1F, 0x09, 0xFF, + 0x01, 0x40, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD6, 0x03, 0x66, + 0x01, 0x67, 0x01, 0x9D, 0x02, 0xFF, 0x01, 0xE1, 0x09, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x4E, 0x01, 0xFF, 0x01, 0xF9, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x04, + 0x02, 0xFF, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, + 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x20, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x06, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x30, 0x08, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0xAF, 0x01, 0xFF, + 0x01, 0x20, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, + 0x01, 0xCF, 0x01, 0xFF, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x05, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xFA, 0x09, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x1D, 0x01, 0xFF, 0x01, 0xF2, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD2, 0x03, 0x22, 0x01, 0x23, + 0x01, 0x59, 0x02, 0xFF, 0x01, 0x50, 0x09, 0x00, 0x01, 0x1F, 0x08, 0xFF, + 0x01, 0xD3, 0x0A, 0x00, 0x01, 0x1F, 0x08, 0xFF, 0x01, 0xB3, 0x0A, 0x00, + 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xA0, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xD4, 0x04, 0x44, 0x01, 0x45, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xFD, + 0x01, 0x10, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, + 0x01, 0x01, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xA0, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF6, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x06, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF9, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x07, + 0x01, 0xFF, 0x01, 0xF7, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x06, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF5, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x05, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x90, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xE7, 0x04, 0x77, 0x01, 0x79, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xFE, + 0x01, 0x10, 0x08, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xE3, 0x09, 0x00, + 0x01, 0x1F, 0x08, 0xFF, 0x01, 0xFA, 0x01, 0x10, 0x09, 0x00, 0x01, 0x1D, + 0x07, 0xDD, 0x01, 0xB7, 0x01, 0x20, 0xD1, 0x00, + + /* 3 */ + 0xB5, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xF4, 0x09, 0x00, 0x01, 0x1F, + 0x09, 0xFF, 0x01, 0xF4, 0x09, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xF4, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD5, 0x07, 0x55, 0x01, 0x51, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1E, + 0x01, 0xEE, 0x01, 0xB0, 0xD8, 0x00, + + /* 4 */ + 0xB8, 0x00, 0x01, 0x08, 0x09, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, + 0x09, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x09, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFA, 0x05, 0x66, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF6, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF6, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF6, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF5, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF5, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xF4, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF3, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF2, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xF0, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xF0, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x6F, + 0x01, 0xFF, 0x01, 0xA0, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x70, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x30, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x08, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xFE, 0x06, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x08, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x08, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xF1, + 0x06, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x05, 0x00, 0x01, 0x02, + 0x01, 0x22, 0x01, 0x28, 0x02, 0xFF, 0x01, 0xC7, 0x06, 0x77, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0x52, 0x01, 0x22, 0x04, 0x00, 0x01, 0x0F, 0x0F, 0xFF, + 0x04, 0x00, 0x01, 0x0F, 0x0F, 0xFF, 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xED, 0x0B, 0xDD, 0x01, 0xEF, 0x01, 0xFF, 0x04, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x04, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x5F, 0x01, 0xFF, + 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x5F, + 0x01, 0xFF, 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, + 0x01, 0x5F, 0x01, 0xFF, 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x50, + 0x0B, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x04, 0x00, 0x01, 0x06, 0x01, 0x66, + 0x01, 0x20, 0x0B, 0x00, 0x01, 0x26, 0x01, 0x66, 0x54, 0x00, + + /* 5 */ + 0xB5, 0x00, 0x01, 0x1F, 0x0A, 0xFF, 0x09, 0x00, 0x01, 0x1F, 0x0A, 0xFF, + 0x09, 0x00, 0x01, 0x1F, 0x0A, 0xFF, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xD6, 0x07, 0x66, 0x01, 0x65, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC1, 0x07, 0x11, 0x01, 0x10, 0x09, 0x00, + 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xF5, 0x09, 0x00, 0x01, 0x1F, 0x09, 0xFF, + 0x01, 0xF5, 0x09, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xF5, 0x09, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD4, 0x07, 0x44, 0x01, 0x41, 0x09, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xE7, 0x08, 0x77, 0x01, 0x50, 0x08, 0x00, + 0x01, 0x1F, 0x0A, 0xFF, 0x01, 0xB0, 0x08, 0x00, 0x01, 0x1F, 0x0A, 0xFF, + 0x01, 0xB0, 0x08, 0x00, 0x01, 0x1E, 0x0A, 0xEE, 0x01, 0xA0, 0xCF, 0x00, + + /* 6 */ + 0xB5, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xF3, 0x04, 0x00, 0x01, 0x4F, + 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xE1, + 0x03, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x10, 0x03, 0x00, + 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, 0x01, 0x0A, 0x02, 0xFF, + 0x01, 0x30, 0x03, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xB0, + 0x03, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, 0x01, 0x7F, + 0x01, 0xFF, 0x01, 0xF5, 0x05, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xF8, + 0x03, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x03, + 0x02, 0xFF, 0x01, 0x80, 0x05, 0x00, 0x01, 0x05, 0x02, 0xFF, 0x01, 0x50, + 0x02, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x1E, + 0x01, 0xFF, 0x01, 0xFB, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xF2, + 0x02, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xFD, + 0x02, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x20, 0x07, 0x00, 0x01, 0x01, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0xB0, 0x01, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, + 0x01, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xF4, 0x09, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xF7, 0x01, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, + 0x01, 0x02, 0x02, 0xFF, 0x01, 0x70, 0x09, 0x00, 0x01, 0x05, 0x02, 0xFF, + 0x01, 0x40, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x1D, 0x01, 0xFF, + 0x01, 0xFA, 0x0B, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xE2, 0x01, 0x4F, + 0x01, 0xFF, 0x01, 0x90, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xC0, 0x0B, 0x00, + 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xFC, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x98, + 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x10, 0x0C, 0x00, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xF3, 0x0D, 0x00, + 0x01, 0x2E, 0x05, 0xFF, 0x01, 0x60, 0x0D, 0x00, 0x01, 0x07, 0x04, 0xFF, + 0x01, 0xFC, 0x0E, 0x00, 0x01, 0x2E, 0x05, 0xFF, 0x01, 0x60, 0x0C, 0x00, + 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xF4, 0x0C, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xFD, + 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x9A, 0x02, 0xFF, 0x01, 0x30, 0x0B, 0x00, + 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xE2, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, + 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xE2, 0x0A, 0x00, 0x01, 0x09, 0x02, 0xFF, + 0x01, 0x30, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x0D, 0x01, 0xFF, + 0x01, 0xFD, 0x01, 0x10, 0x09, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xF4, + 0x01, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x01, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xC0, 0x08, 0x00, 0x01, 0x06, 0x02, 0xFF, 0x01, 0x50, + 0x01, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, 0x01, 0x3F, + 0x01, 0xFF, 0x01, 0xFB, 0x08, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xF7, + 0x02, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, 0x01, 0x04, + 0x02, 0xFF, 0x01, 0x90, 0x06, 0x00, 0x01, 0x03, 0x02, 0xFF, 0x01, 0x80, + 0x02, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x6F, + 0x01, 0xFF, 0x01, 0xF7, 0x06, 0x00, 0x01, 0x2E, 0x01, 0xFF, 0x01, 0xFA, + 0x03, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x08, + 0x02, 0xFF, 0x01, 0x50, 0x04, 0x00, 0x01, 0x01, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0xB0, 0x03, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, + 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xF4, 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xFC, 0x04, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, + 0x01, 0x0B, 0x02, 0xFF, 0x01, 0x20, 0x03, 0x00, 0x01, 0xAF, 0x01, 0xFF, + 0x01, 0xD1, 0x04, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, + 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xE1, 0x02, 0x00, 0x01, 0x08, 0x01, 0xFF, + 0x01, 0xFE, 0x01, 0x20, 0x04, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x90, + 0x04, 0x00, 0x01, 0x2E, 0x01, 0xFF, 0x01, 0xFD, 0x01, 0x10, 0x01, 0x00, + 0x01, 0x5D, 0x01, 0xDD, 0x01, 0xD3, 0x05, 0x00, 0x01, 0x3D, 0x01, 0xDD, + 0x01, 0x80, 0x04, 0x00, 0x01, 0x03, 0x02, 0xDD, 0x01, 0x90, 0xC9, 0x00, + + /* 7 */ + 0xA5, 0x00, 0x01, 0x45, 0x01, 0x67, 0x01, 0x65, 0x01, 0x20, 0x0E, 0x00, + 0x01, 0x06, 0x01, 0xCF, 0x03, 0xFF, 0x01, 0xFE, 0x01, 0x92, 0x0C, 0x00, + 0x01, 0x04, 0x01, 0xEF, 0x06, 0xFF, 0x01, 0x90, 0x0B, 0x00, 0x01, 0x6F, + 0x02, 0xFF, 0x01, 0xFD, 0x01, 0xCB, 0x01, 0xCF, 0x02, 0xFF, 0x01, 0xFC, + 0x0A, 0x00, 0x01, 0x04, 0x02, 0xFF, 0x01, 0xD6, 0x01, 0x10, 0x02, 0x00, + 0x01, 0x39, 0x02, 0xFF, 0x01, 0xA0, 0x09, 0x00, 0x01, 0x0D, 0x01, 0xFF, + 0x01, 0xF9, 0x05, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xF3, 0x09, 0x00, + 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xF9, 0x09, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x06, 0x00, + 0x01, 0xFF, 0x01, 0xFE, 0x09, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x07, 0x00, + 0x01, 0xDF, 0x01, 0xFF, 0x09, 0x00, 0x01, 0xAC, 0x01, 0xCB, 0x07, 0x00, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x10, 0x10, 0x00, 0x01, 0x04, 0x02, 0xFF, + 0x11, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xFC, 0x10, 0x00, 0x01, 0x01, + 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xF5, 0x10, 0x00, 0x01, 0x5D, 0x02, 0xFF, + 0x01, 0xA0, 0x0D, 0x00, 0x02, 0x99, 0x01, 0xBE, 0x02, 0xFF, 0x01, 0xF8, + 0x0E, 0x00, 0x05, 0xFF, 0x01, 0x40, 0x0E, 0x00, 0x05, 0xFF, 0x01, 0xF9, + 0x0E, 0x00, 0x02, 0xBB, 0x01, 0xCD, 0x03, 0xFF, 0x01, 0xD1, 0x10, 0x00, + 0x01, 0x16, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xFC, 0x11, 0x00, 0x01, 0x0A, + 0x02, 0xFF, 0x01, 0x60, 0x11, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xC0, + 0x07, 0x00, 0x01, 0x07, 0x01, 0x99, 0x01, 0x80, 0x07, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xF0, 0x07, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF0, + 0x07, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF1, 0x07, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xF2, 0x07, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF1, + 0x07, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, 0x07, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xE0, 0x07, 0x00, 0x01, 0x01, 0x02, 0xFF, 0x01, 0x20, + 0x06, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xA0, 0x08, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0xD2, 0x05, 0x00, 0x01, 0x03, 0x02, 0xFF, 0x01, 0x30, + 0x08, 0x00, 0x01, 0x1E, 0x02, 0xFF, 0x01, 0x81, 0x03, 0x00, 0x01, 0x01, + 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xFA, 0x09, 0x00, 0x01, 0x03, 0x01, 0xEF, + 0x02, 0xFF, 0x01, 0xDA, 0x01, 0x98, 0x01, 0x9A, 0x01, 0xDF, 0x02, 0xFF, + 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x2D, 0x07, 0xFF, 0x01, 0xFA, 0x0C, 0x00, + 0x01, 0x6D, 0x05, 0xFF, 0x01, 0xFB, 0x01, 0x30, 0x0D, 0x00, 0x01, 0x27, + 0x01, 0x9B, 0x01, 0xCD, 0x01, 0xBA, 0x01, 0x95, 0x01, 0x10, 0xBE, 0x00, + + /* 8 */ + 0xB5, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x07, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x06, 0x00, 0x01, 0x07, 0x02, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x90, 0x06, 0x00, 0x01, 0x2F, 0x02, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x06, 0x00, 0x01, 0xCF, + 0x02, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x05, 0x00, 0x01, 0x06, 0x03, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x90, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x05, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xFA, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, 0x01, 0x1E, 0x01, 0xFF, + 0x01, 0xE1, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x60, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x03, 0x00, 0x01, 0x04, 0x01, 0xFF, 0x01, 0xFB, 0x01, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x03, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF2, 0x01, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x03, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x70, 0x01, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x02, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xFD, 0x02, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x02, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF3, 0x02, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x02, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x80, 0x02, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x01, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xFD, 0x03, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x01, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF4, 0x03, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x01, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFE, 0x01, 0x10, 0x03, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF5, 0x04, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xB0, 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x10, 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x99, 0x01, 0xFF, 0x01, 0xF6, + 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x03, 0xFF, 0x01, 0x20, + 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, + 0x02, 0xFF, 0x01, 0xF7, 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x02, 0xFF, 0x01, 0xD0, 0x06, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x02, 0xFF, 0x01, 0x30, + 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1E, + 0x01, 0xEE, 0x01, 0xE8, 0x07, 0x00, 0x01, 0x0E, 0x01, 0xEE, 0x01, 0xA0, + 0xCE, 0x00, + + /* 9 */ + 0x2C, 0x00, 0x01, 0x7F, 0x01, 0xF1, 0x03, 0x00, 0x01, 0x9F, 0x01, 0xE0, + 0x0D, 0x00, 0x01, 0x5F, 0x01, 0xF8, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, + 0x01, 0xB0, 0x0D, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xB6, 0x01, 0x45, + 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x50, 0x0D, 0x00, 0x01, 0x05, 0x04, 0xFF, + 0x01, 0xFB, 0x0F, 0x00, 0x01, 0x5E, 0x03, 0xFF, 0x01, 0x90, 0x10, 0x00, + 0x01, 0x46, 0x01, 0x87, 0x01, 0x51, 0x20, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x07, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x06, 0x00, 0x01, 0x07, 0x02, 0xFF, + 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x06, 0x00, + 0x01, 0x2F, 0x02, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x06, 0x00, 0x01, 0xBF, 0x02, 0xFF, 0x01, 0xA0, 0x07, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x05, 0x00, 0x01, 0x06, 0x03, 0xFF, + 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x05, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x05, 0x00, 0x01, 0xAF, 0x01, 0xFF, + 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x04, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xFA, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x04, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xE1, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, + 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x60, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, 0x01, 0x04, + 0x01, 0xFF, 0x01, 0xFB, 0x01, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, 0x01, 0x0D, + 0x01, 0xFF, 0x01, 0xF2, 0x01, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x70, 0x01, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xFD, 0x02, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF3, 0x02, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x7F, + 0x01, 0xFF, 0x01, 0x80, 0x02, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xFD, 0x03, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xF4, 0x03, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, 0x01, 0x6F, + 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x01, 0x01, 0xEF, + 0x01, 0xFE, 0x01, 0x10, 0x03, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x0A, 0x01, 0xFF, + 0x01, 0xF5, 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xB0, + 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x90, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x10, 0x04, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x99, 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0xC0, 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, + 0x01, 0x1F, 0x03, 0xFF, 0x01, 0x20, 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x02, 0xFF, 0x01, 0xF7, 0x06, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x02, 0xFF, + 0x01, 0xD0, 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, + 0x01, 0x1F, 0x02, 0xFF, 0x01, 0x30, 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xE8, 0x07, 0x00, + 0x01, 0x0E, 0x01, 0xEE, 0x01, 0xA0, 0xCE, 0x00, + + /* 10 */ + 0xB5, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x1D, + 0x01, 0xFF, 0x01, 0xFA, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x04, 0x00, 0x01, 0x01, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xA0, 0x09, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x04, 0x00, 0x01, 0x1D, 0x01, 0xFF, + 0x01, 0xF9, 0x0A, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x03, 0x00, + 0x01, 0x01, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x90, 0x0A, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x03, 0x00, 0x01, 0x2D, 0x01, 0xFF, 0x01, 0xF9, + 0x0B, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0x02, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x90, 0x0B, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x02, 0x00, 0x01, 0x2E, 0x01, 0xFF, 0x01, 0xF8, 0x0C, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x01, 0x00, 0x01, 0x02, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x80, 0x0C, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x01, 0x00, 0x01, 0x2E, 0x01, 0xFF, 0x01, 0xF8, 0x0D, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x01, 0x02, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x80, + 0x0D, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x01, 0x2E, 0x01, 0xFF, + 0x01, 0xF7, 0x0E, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC3, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x70, 0x0E, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xEE, + 0x01, 0xFF, 0x01, 0xF7, 0x0F, 0x00, 0x01, 0x1F, 0x03, 0xFF, 0x01, 0x70, + 0x0F, 0x00, 0x01, 0x1F, 0x03, 0xFF, 0x01, 0x20, 0x0F, 0x00, 0x01, 0x1F, + 0x03, 0xFF, 0x01, 0xE2, 0x0F, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xDD, + 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x20, 0x0E, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC1, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xE2, 0x0E, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x01, 0x1D, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x20, + 0x0D, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x01, 0x01, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0xE2, 0x0D, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x01, 0x00, 0x01, 0x1D, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x20, 0x0C, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x01, 0x00, 0x01, 0x01, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0xE2, 0x0C, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x02, 0x00, 0x01, 0x1D, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x20, 0x0B, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0x01, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0xE2, 0x0B, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x03, 0x00, 0x01, 0x1D, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x30, 0x0A, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x03, 0x00, 0x01, 0x02, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xE3, 0x0A, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x04, 0x00, 0x01, 0x2E, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x30, 0x09, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x04, 0x00, 0x01, 0x02, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xE3, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x05, 0x00, 0x01, 0x2E, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x30, 0x08, 0x00, + 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xB0, 0x05, 0x00, 0x01, 0x02, 0x01, 0xDE, + 0x01, 0xEE, 0x01, 0xD2, 0xCF, 0x00, + + /* 11 */ + 0xB6, 0x00, 0x01, 0x08, 0x09, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, + 0x09, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x09, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFA, 0x05, 0x66, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF6, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF6, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF6, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF5, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF4, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0A, + 0x01, 0xFF, 0x01, 0xF4, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF3, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF1, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xF0, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xE0, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xC0, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x4F, + 0x01, 0xFF, 0x01, 0x90, 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x60, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x20, + 0x05, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x08, 0x00, 0x01, 0x01, + 0x01, 0xFF, 0x01, 0xFE, 0x06, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x08, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF9, 0x06, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x30, 0x08, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xF2, + 0x06, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x07, 0x00, 0x01, 0x1A, + 0x02, 0xFF, 0x01, 0xA0, 0x06, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, + 0x07, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x10, 0x06, 0x00, + 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x07, 0x00, 0x01, 0x2F, 0x01, 0xFF, + 0x01, 0xF4, 0x07, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x07, 0x00, + 0x01, 0x2F, 0x01, 0xFB, 0x01, 0x20, 0x07, 0x00, 0x01, 0xAE, 0x01, 0xEE, + 0x01, 0x30, 0x07, 0x00, 0x01, 0x03, 0x01, 0x10, 0xC6, 0x00, + + /* 12 */ + 0xB5, 0x00, 0x01, 0x1E, 0x02, 0xEE, 0x01, 0x70, 0x08, 0x00, 0x02, 0xEE, + 0x01, 0xE7, 0x05, 0x00, 0x01, 0x1F, 0x02, 0xFF, 0x01, 0xC0, 0x07, 0x00, + 0x01, 0x05, 0x02, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x02, 0xFF, + 0x01, 0xF2, 0x07, 0x00, 0x01, 0x0B, 0x02, 0xFF, 0x01, 0xF8, 0x05, 0x00, + 0x01, 0x1F, 0x02, 0xFF, 0x01, 0xF7, 0x07, 0x00, 0x01, 0x1F, 0x02, 0xFF, + 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x02, 0xFF, 0x01, 0xFD, 0x07, 0x00, + 0x01, 0x6F, 0x02, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x30, 0x06, 0x00, 0x01, 0xBF, 0x01, 0xFC, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x9D, + 0x01, 0xFF, 0x01, 0x80, 0x05, 0x00, 0x01, 0x01, 0x01, 0xFF, 0x01, 0xF7, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x98, + 0x01, 0xFF, 0x01, 0xE0, 0x05, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xE2, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x92, + 0x01, 0xFF, 0x01, 0xF3, 0x05, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0x92, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x01, 0xDF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x42, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x01, 0x7F, 0x01, 0xFE, 0x05, 0x00, 0x01, 0x6F, 0x01, 0xFE, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x40, 0x04, 0x00, 0x01, 0xCF, 0x01, 0xF9, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0x90, 0x03, 0x00, 0x01, 0x01, + 0x01, 0xFF, 0x01, 0xF3, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xE0, + 0x03, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xE0, 0x01, 0x02, 0x01, 0xFF, + 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x01, + 0x01, 0xFF, 0x01, 0xF4, 0x03, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0x80, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x01, 0x00, 0x01, 0xCF, 0x01, 0xFA, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x30, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, 0x01, 0x6F, 0x01, 0xFF, + 0x03, 0x00, 0x01, 0x7F, 0x01, 0xFD, 0x01, 0x00, 0x01, 0x02, 0x01, 0xFF, + 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x50, 0x02, 0x00, 0x01, 0xCF, 0x01, 0xF8, + 0x01, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xA0, + 0x01, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF3, 0x01, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x01, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x01, 0x00, 0x01, 0x07, + 0x01, 0xFF, 0x01, 0xD0, 0x01, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0xFF, + 0x01, 0xF6, 0x01, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0x80, 0x01, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0x90, 0x02, 0x00, 0x01, 0xAF, 0x01, 0xFB, 0x01, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x20, 0x01, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x5F, + 0x01, 0xFF, 0x01, 0x10, 0x01, 0x7F, 0x01, 0xFD, 0x02, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x02, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x60, 0x01, 0xDF, 0x01, 0xF7, + 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xC2, + 0x01, 0xFF, 0x01, 0xF2, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, 0x01, 0x04, + 0x01, 0xFF, 0x01, 0xFA, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x03, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0x70, 0x02, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x03, 0x00, 0x01, 0x9F, 0x02, 0xFF, 0x01, 0x20, 0x02, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x03, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xFC, 0x03, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF8, 0x05, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0x80, + 0x03, 0x00, 0x01, 0x0D, 0x01, 0xEE, 0x01, 0xE6, 0x03, 0x00, 0x01, 0x02, + 0x01, 0xEE, 0x01, 0xE7, 0xCC, 0x00, + + /* 13 */ + 0xB5, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x0B, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x0B, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x0B, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD4, + 0x07, 0x44, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1E, + 0x01, 0xEE, 0x01, 0xB0, 0x07, 0x00, 0x01, 0x8E, 0x01, 0xEE, 0x01, 0x40, + 0xCE, 0x00, + + /* 14 */ + 0xA6, 0x00, 0x01, 0x13, 0x01, 0x56, 0x01, 0x64, 0x01, 0x31, 0x0E, 0x00, + 0x01, 0x02, 0x01, 0x8D, 0x04, 0xFF, 0x01, 0xC7, 0x01, 0x10, 0x0B, 0x00, + 0x01, 0x01, 0x01, 0x9F, 0x06, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0x3E, + 0x08, 0xFF, 0x01, 0xD2, 0x09, 0x00, 0x01, 0x04, 0x02, 0xFF, 0x01, 0xFC, + 0x01, 0x72, 0x01, 0x00, 0x01, 0x01, 0x01, 0x38, 0x01, 0xDF, 0x02, 0xFF, + 0x01, 0x30, 0x08, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x50, + 0x04, 0x00, 0x01, 0x07, 0x02, 0xFF, 0x01, 0xE2, 0x07, 0x00, 0x01, 0x01, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xD1, 0x06, 0x00, 0x01, 0x2E, 0x01, 0xFF, + 0x01, 0xFD, 0x07, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x10, + 0x06, 0x00, 0x01, 0x02, 0x02, 0xFF, 0x01, 0x60, 0x06, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xF4, 0x08, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xE0, + 0x06, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xA0, 0x08, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF5, 0x06, 0x00, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x30, + 0x08, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xFB, 0x05, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xFD, 0x0A, 0x00, 0x02, 0xFF, 0x05, 0x00, 0x01, 0x06, + 0x01, 0xFF, 0x01, 0xF9, 0x0A, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x30, + 0x04, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF5, 0x0A, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x50, 0x04, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF4, + 0x0A, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x70, 0x04, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xF2, 0x0A, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x80, + 0x04, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF2, 0x0A, 0x00, 0x01, 0x4F, + 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF3, + 0x0A, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x80, 0x04, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF4, 0x0A, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x60, + 0x04, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF7, 0x0A, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x50, 0x04, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xFB, + 0x0A, 0x00, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x10, 0x05, 0x00, 0x02, 0xFF, + 0x01, 0x10, 0x08, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xFD, 0x06, 0x00, + 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x70, 0x08, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xF8, 0x06, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xE1, 0x08, 0x00, + 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xF1, 0x06, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xFA, 0x08, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xA0, 0x06, 0x00, + 0x01, 0x04, 0x02, 0xFF, 0x01, 0x80, 0x06, 0x00, 0x01, 0x0A, 0x01, 0xFF, + 0x01, 0xFE, 0x01, 0x10, 0x07, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0x01, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xF5, 0x08, 0x00, + 0x01, 0x0B, 0x02, 0xFF, 0x01, 0xE6, 0x01, 0x10, 0x02, 0x00, 0x01, 0x02, + 0x01, 0x8F, 0x02, 0xFF, 0x01, 0x80, 0x09, 0x00, 0x01, 0xAF, 0x02, 0xFF, + 0x01, 0xFC, 0x01, 0xA8, 0x01, 0x8A, 0x01, 0xDF, 0x02, 0xFF, 0x01, 0xF6, + 0x0A, 0x00, 0x01, 0x06, 0x01, 0xEF, 0x06, 0xFF, 0x01, 0xFD, 0x01, 0x40, + 0x0B, 0x00, 0x01, 0x18, 0x01, 0xEF, 0x04, 0xFF, 0x01, 0xFD, 0x01, 0x60, + 0x0D, 0x00, 0x01, 0x03, 0x01, 0x7A, 0x01, 0xCD, 0x01, 0xDC, 0x01, 0xA7, + 0x01, 0x30, 0xBD, 0x00, + + /* 15 */ + 0xB5, 0x00, 0x01, 0x1F, 0x0B, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x0B, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x0B, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xE6, 0x07, 0x66, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1E, + 0x01, 0xEE, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9E, 0x01, 0xEE, 0x01, 0x40, + 0xCE, 0x00, + + /* 16 */ + 0xB5, 0x00, 0x01, 0x1E, 0x06, 0xEE, 0x01, 0xEC, 0x01, 0x95, 0x0B, 0x00, + 0x01, 0x1F, 0x08, 0xFF, 0x01, 0xE5, 0x0A, 0x00, 0x01, 0x1F, 0x09, 0xFF, + 0x01, 0x80, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD6, 0x03, 0x66, + 0x01, 0x67, 0x01, 0x9D, 0x02, 0xFF, 0x01, 0xF5, 0x09, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x4E, 0x01, 0xFF, 0x01, 0xFE, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x03, + 0x02, 0xFF, 0x01, 0x50, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x06, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x90, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xB0, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x3F, + 0x01, 0xFF, 0x01, 0xD0, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x06, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xC0, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xA0, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x70, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x05, 0x00, 0x01, 0x1B, 0x02, 0xFF, 0x01, 0x10, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC1, 0x03, 0x11, 0x01, 0x12, 0x01, 0x48, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xF9, 0x09, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xC0, + 0x09, 0x00, 0x01, 0x1F, 0x08, 0xFF, 0x01, 0xFB, 0x01, 0x10, 0x09, 0x00, + 0x01, 0x1F, 0x07, 0xFF, 0x01, 0xFB, 0x01, 0x40, 0x0A, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD4, 0x04, 0x44, 0x01, 0x32, 0x0C, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xB0, 0xD8, 0x00, + + /* 17 */ + 0xA6, 0x00, 0x01, 0x35, 0x01, 0x66, 0x01, 0x54, 0x01, 0x10, 0x0E, 0x00, + 0x01, 0x06, 0x01, 0xCF, 0x03, 0xFF, 0x01, 0xFD, 0x01, 0x71, 0x0C, 0x00, + 0x01, 0x05, 0x01, 0xEF, 0x06, 0xFF, 0x01, 0x60, 0x0B, 0x00, 0x01, 0xAF, + 0x07, 0xFF, 0x01, 0xF8, 0x0A, 0x00, 0x01, 0x0A, 0x02, 0xFF, 0x01, 0xD7, + 0x01, 0x20, 0x01, 0x00, 0x01, 0x03, 0x01, 0x9F, 0x02, 0xFF, 0x01, 0x70, + 0x09, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xF8, 0x04, 0x00, 0x01, 0x01, + 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xF2, 0x08, 0x00, 0x01, 0x02, 0x02, 0xFF, + 0x01, 0x60, 0x05, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xFA, 0x08, 0x00, + 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0x02, 0x02, 0xFF, + 0x01, 0x10, 0x07, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, + 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x60, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, + 0x01, 0x60, 0x07, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xA0, 0x07, 0x00, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x10, 0x07, 0x00, 0x01, 0x05, 0x01, 0x55, + 0x01, 0x40, 0x06, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xFB, 0x11, 0x00, + 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, + 0x01, 0xF5, 0x11, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF3, 0x11, 0x00, + 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF2, 0x11, 0x00, 0x01, 0x0B, 0x01, 0xFF, + 0x01, 0xF2, 0x11, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF3, 0x11, 0x00, + 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF4, 0x11, 0x00, 0x01, 0x07, 0x01, 0xFF, + 0x01, 0xF6, 0x11, 0x00, 0x01, 0x04, 0x01, 0xFF, 0x01, 0xFA, 0x08, 0x00, + 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF6, 0x06, 0x00, 0x01, 0x01, 0x01, 0xFF, + 0x01, 0xFE, 0x08, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF3, 0x07, 0x00, + 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xF0, 0x07, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xB0, 0x07, 0x00, + 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xB0, 0x07, 0x00, 0x01, 0x1E, 0x01, 0xFF, + 0x01, 0xF5, 0x07, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x60, 0x07, 0x00, + 0x01, 0x07, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x20, 0x05, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x10, 0x08, 0x00, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0xE3, 0x05, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xF7, 0x09, 0x00, + 0x01, 0x3F, 0x02, 0xFF, 0x01, 0x92, 0x03, 0x00, 0x01, 0x29, 0x02, 0xFF, + 0x01, 0xC0, 0x09, 0x00, 0x01, 0x04, 0x03, 0xFF, 0x01, 0xDA, 0x01, 0x88, + 0x01, 0x9C, 0x02, 0xFF, 0x01, 0xFE, 0x01, 0x10, 0x0A, 0x00, 0x01, 0x3D, + 0x07, 0xFF, 0x01, 0xC1, 0x0C, 0x00, 0x01, 0x7E, 0x05, 0xFF, 0x01, 0xD6, + 0x0E, 0x00, 0x01, 0x37, 0x01, 0xAC, 0x01, 0xDD, 0x01, 0xCA, 0x01, 0x73, + 0xBE, 0x00, + + /* 18 */ + 0xB4, 0x00, 0x01, 0x2F, 0x0B, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x2F, + 0x0B, 0xFF, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x2F, 0x0B, 0xFF, 0x01, 0xA0, + 0x07, 0x00, 0x01, 0x16, 0x04, 0x66, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xD6, + 0x04, 0x66, 0x01, 0x40, 0x0C, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x2E, 0x01, 0xEE, 0x01, 0xA0, 0xD4, 0x00, + + /* 19 */ + 0xB4, 0x00, 0x01, 0x8E, 0x01, 0xEE, 0x01, 0xE2, 0x07, 0x00, 0x01, 0xDE, + 0x01, 0xEE, 0x01, 0xA0, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xFA, + 0x06, 0x00, 0x01, 0x06, 0x02, 0xFF, 0x01, 0x30, 0x07, 0x00, 0x01, 0x08, + 0x02, 0xFF, 0x01, 0x20, 0x05, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xFA, + 0x08, 0x00, 0x01, 0x01, 0x02, 0xFF, 0x01, 0x90, 0x05, 0x00, 0x01, 0x6F, + 0x01, 0xFF, 0x01, 0xF2, 0x09, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xF2, + 0x05, 0x00, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xA0, 0x09, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x06, 0x02, 0xFF, 0x01, 0x20, + 0x09, 0x00, 0x01, 0x08, 0x02, 0xFF, 0x01, 0x20, 0x03, 0x00, 0x01, 0x0D, + 0x01, 0xFF, 0x01, 0xFA, 0x0A, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFF, + 0x01, 0x90, 0x03, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, + 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xF2, 0x03, 0x00, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0x90, 0x0B, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x05, 0x02, 0xFF, 0x01, 0x20, 0x0B, 0x00, 0x01, 0x07, 0x02, 0xFF, + 0x01, 0x20, 0x01, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF9, 0x0D, 0x00, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x90, 0x01, 0x00, 0x01, 0x5F, 0x01, 0xFF, + 0x01, 0xF1, 0x0D, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xF2, 0x01, 0x00, + 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x80, 0x0D, 0x00, 0x01, 0x0E, 0x01, 0xFF, + 0x01, 0xF9, 0x01, 0x05, 0x02, 0xFF, 0x01, 0x10, 0x0D, 0x00, 0x01, 0x07, + 0x02, 0xFF, 0x01, 0x2D, 0x01, 0xFF, 0x01, 0xF8, 0x0F, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xF1, 0x0F, 0x00, 0x01, 0x7F, + 0x03, 0xFF, 0x01, 0x80, 0x0F, 0x00, 0x01, 0x0E, 0x02, 0xFF, 0x01, 0xFE, + 0x01, 0x10, 0x0F, 0x00, 0x01, 0x06, 0x02, 0xFF, 0x01, 0xF7, 0x11, 0x00, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xE0, 0x10, 0x00, 0x01, 0x01, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x70, 0x10, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFE, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xF6, 0x11, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0xE0, 0x10, 0x00, 0x01, 0x02, 0x02, 0xFF, 0x01, 0x60, + 0x10, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xFE, 0x11, 0x00, 0x01, 0x3F, + 0x01, 0xFF, 0x01, 0xF6, 0x11, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xD0, + 0x10, 0x00, 0x01, 0x05, 0x02, 0xFF, 0x01, 0x50, 0x10, 0x00, 0x01, 0x0C, + 0x01, 0xEE, 0x01, 0xEC, 0xD7, 0x00, + + /* 20 */ + 0xBB, 0x00, 0x01, 0x0B, 0x01, 0xEE, 0x01, 0xE2, 0x11, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF2, 0x11, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF2, + 0x10, 0x00, 0x01, 0x01, 0x01, 0x2D, 0x01, 0xFF, 0x01, 0xF4, 0x01, 0x10, + 0x0D, 0x00, 0x01, 0x48, 0x01, 0xCE, 0x05, 0xFF, 0x01, 0xFD, 0x01, 0x96, + 0x01, 0x10, 0x09, 0x00, 0x01, 0x7D, 0x09, 0xFF, 0x01, 0xFA, 0x01, 0x20, + 0x07, 0x00, 0x01, 0x2D, 0x0B, 0xFF, 0x01, 0xF6, 0x06, 0x00, 0x01, 0x03, + 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xFB, 0x01, 0x75, 0x01, 0x4D, 0x01, 0xFF, + 0x01, 0xF6, 0x01, 0x56, 0x01, 0x9D, 0x03, 0xFF, 0x01, 0x80, 0x05, 0x00, + 0x01, 0x1E, 0x02, 0xFF, 0x01, 0xE6, 0x02, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x02, 0x00, 0x01, 0x3B, 0x02, 0xFF, 0x01, 0xF5, 0x05, 0x00, + 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xFB, 0x01, 0x10, 0x02, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF2, 0x03, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xFE, + 0x05, 0x00, 0x02, 0xFF, 0x01, 0xC0, 0x03, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x03, 0x00, 0x01, 0x07, 0x02, 0xFF, 0x01, 0x50, 0x03, 0x00, + 0x01, 0x05, 0x02, 0xFF, 0x01, 0x20, 0x03, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xB0, 0x03, 0x00, + 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFC, 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xE0, 0x03, 0x00, + 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF8, 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xF0, 0x03, 0x00, + 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF7, 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xF1, 0x03, 0x00, + 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF7, 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xF1, 0x03, 0x00, + 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF8, 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xF0, 0x03, 0x00, + 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFC, 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xE0, 0x03, 0x00, + 0x01, 0x05, 0x02, 0xFF, 0x01, 0x30, 0x03, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xB0, 0x04, 0x00, + 0x02, 0xFF, 0x01, 0xD1, 0x03, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF2, + 0x03, 0x00, 0x01, 0x08, 0x02, 0xFF, 0x01, 0x60, 0x04, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0xFC, 0x01, 0x10, 0x02, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF2, 0x03, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xFE, 0x05, 0x00, + 0x01, 0x1E, 0x02, 0xFF, 0x01, 0xF7, 0x01, 0x10, 0x01, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF2, 0x02, 0x00, 0x01, 0x4C, 0x02, 0xFF, 0x01, 0xF6, + 0x05, 0x00, 0x01, 0x04, 0x03, 0xFF, 0x01, 0xFB, 0x01, 0x86, 0x01, 0x5D, + 0x01, 0xFF, 0x01, 0xF6, 0x01, 0x67, 0x01, 0xAE, 0x03, 0xFF, 0x01, 0xA0, + 0x06, 0x00, 0x01, 0x4E, 0x0B, 0xFF, 0x01, 0xF8, 0x07, 0x00, 0x01, 0x01, + 0x01, 0x8E, 0x09, 0xFF, 0x01, 0xFB, 0x01, 0x30, 0x09, 0x00, 0x01, 0x48, + 0x01, 0xBE, 0x05, 0xFF, 0x01, 0xED, 0x01, 0xA6, 0x01, 0x10, 0x0D, 0x00, + 0x01, 0x1C, 0x01, 0xFF, 0x01, 0xF3, 0x01, 0x10, 0x10, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF2, 0x11, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF2, + 0x11, 0x00, 0x01, 0x0B, 0x01, 0xEE, 0x01, 0xE2, 0xD2, 0x00, + + /* 21 */ + 0xB4, 0x00, 0x01, 0x0B, 0x01, 0xEE, 0x01, 0xEC, 0x07, 0x00, 0x01, 0x2E, + 0x01, 0xEE, 0x01, 0xE7, 0x07, 0x00, 0x01, 0x02, 0x02, 0xFF, 0x01, 0x80, + 0x06, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xC0, 0x08, 0x00, 0x01, 0x6F, + 0x01, 0xFF, 0x01, 0xF3, 0x05, 0x00, 0x01, 0x06, 0x02, 0xFF, 0x01, 0x20, + 0x08, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xFD, 0x05, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xF6, 0x09, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFF, + 0x01, 0x80, 0x04, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xB0, 0x0A, 0x00, + 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xF3, 0x03, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xFE, 0x01, 0x10, 0x0A, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xFD, + 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xF5, 0x0B, 0x00, 0x01, 0x01, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x80, 0x02, 0x00, 0x01, 0xBF, 0x01, 0xFF, + 0x01, 0x90, 0x0C, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xF3, 0x01, 0x00, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xFD, 0x0D, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xFD, 0x01, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xF3, 0x0E, 0x00, + 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x80, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x70, + 0x0E, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xF9, 0x01, 0xFF, 0x01, 0xFC, + 0x0F, 0x00, 0x01, 0x08, 0x03, 0xFF, 0x01, 0xF2, 0x10, 0x00, 0x01, 0xCF, + 0x02, 0xFF, 0x01, 0x50, 0x10, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xFC, + 0x11, 0x00, 0x01, 0xAF, 0x02, 0xFF, 0x01, 0x30, 0x0F, 0x00, 0x01, 0x05, + 0x03, 0xFF, 0x01, 0xD0, 0x0F, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xFD, + 0x01, 0xFF, 0x01, 0xF9, 0x0F, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x91, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x50, 0x0D, 0x00, 0x01, 0x07, 0x01, 0xFF, + 0x01, 0xFD, 0x01, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xE1, 0x0D, 0x00, + 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xF3, 0x01, 0x00, 0x01, 0x0B, 0x01, 0xFF, + 0x01, 0xFB, 0x0D, 0x00, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x80, 0x01, 0x00, + 0x01, 0x01, 0x02, 0xFF, 0x01, 0x60, 0x0B, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xFD, 0x03, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, + 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xF3, 0x03, 0x00, 0x01, 0x0B, 0x01, 0xFF, + 0x01, 0xFC, 0x0A, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x80, + 0x03, 0x00, 0x01, 0x01, 0x02, 0xFF, 0x01, 0x80, 0x09, 0x00, 0x01, 0x0A, + 0x01, 0xFF, 0x01, 0xFD, 0x05, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xF4, + 0x09, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xF3, 0x05, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x10, 0x07, 0x00, 0x01, 0x02, 0x02, 0xFF, + 0x01, 0x80, 0x05, 0x00, 0x01, 0x01, 0x02, 0xFF, 0x01, 0xA0, 0x07, 0x00, + 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xFD, 0x07, 0x00, 0x01, 0x6F, 0x01, 0xFF, + 0x01, 0xF5, 0x07, 0x00, 0x01, 0x6E, 0x01, 0xEE, 0x01, 0xE3, 0x07, 0x00, + 0x01, 0x0B, 0x01, 0xEE, 0x01, 0xED, 0x01, 0x10, 0xCE, 0x00, + + /* 22 */ + 0xB5, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xC0, 0x07, 0x00, 0x01, 0x9E, + 0x01, 0xEE, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, + 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x07, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xE6, 0x07, 0x66, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x51, + 0x01, 0x10, 0x06, 0x00, 0x01, 0x1F, 0x0C, 0xFF, 0x01, 0xF1, 0x06, 0x00, + 0x01, 0x1F, 0x0C, 0xFF, 0x01, 0xF1, 0x06, 0x00, 0x01, 0x1F, 0x0C, 0xFF, + 0x01, 0xF1, 0x11, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF1, 0x11, 0x00, + 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF1, 0x11, 0x00, 0x01, 0x03, 0x01, 0xFF, + 0x01, 0xF1, 0x11, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF1, 0x11, 0x00, + 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF1, 0x11, 0x00, 0x01, 0x01, 0x01, 0x77, + 0x01, 0x70, 0x55, 0x00, + + /* 23 */ + 0xB4, 0x00, 0x01, 0x04, 0x01, 0xEE, 0x01, 0xE8, 0x06, 0x00, 0x01, 0xBE, + 0x01, 0xEE, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, + 0x06, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, + 0x08, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, + 0x06, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, + 0x08, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, + 0x06, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, + 0x08, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF8, + 0x06, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, + 0x08, 0x00, 0x01, 0x04, 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x10, 0x08, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xFA, + 0x06, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, 0x09, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x40, 0x05, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, + 0x09, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xFD, 0x01, 0xBA, 0x04, 0xAA, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x10, 0x09, 0x00, 0x01, 0x0B, 0x09, 0xFF, + 0x01, 0x10, 0x0A, 0x00, 0x01, 0x8F, 0x08, 0xFF, 0x01, 0x10, 0x0A, 0x00, + 0x01, 0x01, 0x01, 0x69, 0x05, 0xAA, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x10, + 0x11, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, 0x11, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x10, 0x11, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, + 0x11, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, 0x11, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x10, 0x11, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, + 0x11, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, 0x11, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x10, 0x11, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, + 0x11, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x10, 0x11, 0x00, 0x01, 0xBE, + 0x01, 0xEE, 0x01, 0x10, 0xD0, 0x00, + + /* 24 */ + 0xB5, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xC0, 0x03, 0x00, 0x01, 0x1E, + 0x01, 0xEE, 0x01, 0xC0, 0x03, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xC0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xE6, 0x03, 0x66, 0x01, 0x7F, + 0x01, 0xFF, 0x01, 0xE6, 0x03, 0x66, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x0D, 0xFF, 0x01, 0xD0, 0x05, 0x00, 0x01, 0x1F, + 0x0D, 0xFF, 0x01, 0xD0, 0x05, 0x00, 0x01, 0x1F, 0x0D, 0xFF, 0x01, 0xC0, + 0xCC, 0x00, + + /* 25 */ + 0xB5, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xC0, 0x03, 0x00, 0x01, 0x1E, + 0x01, 0xEE, 0x01, 0xC0, 0x03, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xC0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xE6, 0x03, 0x66, 0x01, 0x7F, + 0x01, 0xFF, 0x01, 0xE6, 0x03, 0x66, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xD1, + 0x01, 0x10, 0x04, 0x00, 0x01, 0x1F, 0x0E, 0xFF, 0x01, 0xFA, 0x04, 0x00, + 0x01, 0x1F, 0x0E, 0xFF, 0x01, 0xFA, 0x04, 0x00, 0x01, 0x1F, 0x0E, 0xFF, + 0x01, 0xFA, 0x12, 0x00, 0x01, 0xBF, 0x01, 0xFA, 0x12, 0x00, 0x01, 0xBF, + 0x01, 0xFA, 0x12, 0x00, 0x01, 0xBF, 0x01, 0xFA, 0x12, 0x00, 0x01, 0xBF, + 0x01, 0xFA, 0x12, 0x00, 0x01, 0xBF, 0x01, 0xFA, 0x12, 0x00, 0x01, 0x57, + 0x01, 0x74, 0x53, 0x00, + + /* 26 */ + 0xB5, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xE8, + 0x03, 0x88, 0x01, 0x76, 0x01, 0x53, 0x0C, 0x00, 0x01, 0x1F, 0x07, 0xFF, + 0x01, 0xFB, 0x01, 0x50, 0x0A, 0x00, 0x01, 0x1F, 0x08, 0xFF, 0x01, 0xFD, + 0x01, 0x30, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xFC, 0x03, 0xCC, + 0x01, 0xCD, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xF5, 0x09, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x04, 0x00, 0x01, 0x01, 0x01, 0x7E, 0x02, 0xFF, + 0x01, 0x20, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, + 0x01, 0x02, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xB0, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xF6, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x06, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF8, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x04, 0x01, 0xFF, 0x01, 0xF9, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF8, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x06, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF6, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xF2, + 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0xAF, + 0x01, 0xFF, 0x01, 0xC0, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x05, 0x00, 0x01, 0x1A, 0x02, 0xFF, 0x01, 0x40, 0x08, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD6, 0x04, 0x66, 0x01, 0x7B, 0x02, 0xFF, 0x01, 0xF9, + 0x09, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xA0, 0x09, 0x00, 0x01, 0x1F, + 0x08, 0xFF, 0x01, 0xE6, 0x0A, 0x00, 0x01, 0x1E, 0x06, 0xEE, 0x01, 0xED, + 0x01, 0xA5, 0xD2, 0x00, + + /* 27 */ + 0xB5, 0x00, 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xB0, 0x0A, 0x00, 0x01, 0x3E, + 0x01, 0xEE, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x0A, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, + 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x3F, + 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x0A, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, + 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x3F, + 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x0A, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, + 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x3F, + 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x0A, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xE8, 0x03, 0x88, 0x01, 0x76, 0x01, 0x52, 0x05, 0x00, + 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, 0x07, 0xFF, + 0x01, 0xFB, 0x01, 0x50, 0x03, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, + 0x04, 0x00, 0x01, 0x1F, 0x08, 0xFF, 0x01, 0xFD, 0x01, 0x30, 0x02, 0x00, + 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xFD, 0x04, 0xDD, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xF5, 0x02, 0x00, + 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x04, 0x00, 0x01, 0x01, 0x01, 0x7E, 0x02, 0xFF, 0x01, 0x20, + 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x02, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0xB0, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x3F, 0x01, 0xFF, + 0x01, 0xF1, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x0B, 0x01, 0xFF, + 0x01, 0xF6, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xF8, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x04, 0x01, 0xFF, + 0x01, 0xF9, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x05, 0x01, 0xFF, + 0x01, 0xF8, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xF6, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0x0E, 0x01, 0xFF, + 0x01, 0xF2, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x06, 0x00, 0x01, 0xAF, 0x01, 0xFF, + 0x01, 0xC0, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x1A, 0x02, 0xFF, + 0x01, 0x40, 0x01, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD6, 0x04, 0x66, 0x01, 0x7A, 0x02, 0xFF, + 0x01, 0xF9, 0x02, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, + 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xA0, 0x02, 0x00, 0x01, 0x3F, 0x01, 0xFF, + 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1F, 0x08, 0xFF, 0x01, 0xE6, 0x03, 0x00, + 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x1E, 0x06, 0xEE, + 0x01, 0xED, 0x01, 0xA5, 0x04, 0x00, 0x01, 0x3E, 0x01, 0xEE, 0x01, 0xA0, + 0xCB, 0x00, + + /* 28 */ + 0xB4, 0x00, 0x01, 0x2E, 0x06, 0xEE, 0x01, 0x50, 0x0C, 0x00, 0x01, 0x2F, + 0x06, 0xFF, 0x01, 0x50, 0x0C, 0x00, 0x01, 0x2F, 0x06, 0xFF, 0x01, 0x50, + 0x0C, 0x00, 0x01, 0x17, 0x04, 0x77, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x50, + 0x11, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, + 0x11, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, + 0x11, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0xB8, 0x03, 0x88, 0x01, 0x76, 0x01, 0x41, 0x0C, 0x00, + 0x01, 0x8F, 0x07, 0xFF, 0x01, 0xE8, 0x01, 0x20, 0x0A, 0x00, 0x01, 0x8F, + 0x08, 0xFF, 0x01, 0xF9, 0x0A, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xED, + 0x04, 0xDD, 0x03, 0xFF, 0x01, 0xC0, 0x09, 0x00, 0x01, 0x8F, 0x01, 0xFF, + 0x01, 0x50, 0x04, 0x00, 0x01, 0x03, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xFB, + 0x09, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, 0x05, 0x00, 0x01, 0x07, + 0x02, 0xFF, 0x01, 0x40, 0x08, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, + 0x06, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xA0, 0x08, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x50, 0x06, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xE0, + 0x08, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, 0x06, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, + 0x06, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x50, 0x06, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, 0x06, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, + 0x06, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xB0, 0x08, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x50, 0x05, 0x00, 0x01, 0x02, 0x02, 0xFF, 0x01, 0x50, + 0x08, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, 0x05, 0x00, 0x01, 0x4E, + 0x01, 0xFF, 0x01, 0xFD, 0x09, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x96, + 0x04, 0x66, 0x01, 0x8D, 0x02, 0xFF, 0x01, 0xF3, 0x09, 0x00, 0x01, 0x8F, + 0x08, 0xFF, 0x01, 0xFE, 0x01, 0x40, 0x09, 0x00, 0x01, 0x8F, 0x08, 0xFF, + 0x01, 0xB2, 0x0A, 0x00, 0x01, 0x7E, 0x06, 0xEE, 0x01, 0xEC, 0x01, 0x83, + 0xCE, 0x00, + + /* 29 */ + 0xA5, 0x00, 0x01, 0x14, 0x01, 0x56, 0x01, 0x54, 0x01, 0x20, 0x0E, 0x00, + 0x01, 0x02, 0x01, 0x8E, 0x03, 0xFF, 0x01, 0xFE, 0x01, 0xA4, 0x0D, 0x00, + 0x01, 0x8F, 0x06, 0xFF, 0x01, 0xC2, 0x0B, 0x00, 0x01, 0x0C, 0x08, 0xFF, + 0x01, 0x50, 0x0A, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xFD, 0x01, 0x73, + 0x01, 0x00, 0x01, 0x01, 0x01, 0x49, 0x02, 0xFF, 0x01, 0xF6, 0x09, 0x00, + 0x01, 0x05, 0x02, 0xFF, 0x01, 0x80, 0x04, 0x00, 0x01, 0x2C, 0x02, 0xFF, + 0x01, 0x30, 0x08, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xF8, 0x06, 0x00, + 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xD0, 0x08, 0x00, 0x01, 0x5F, 0x01, 0xFF, + 0x01, 0xD0, 0x06, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF6, 0x08, 0x00, + 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x60, 0x06, 0x00, 0x01, 0x03, 0x01, 0xFF, + 0x01, 0xFE, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x10, 0x07, 0x00, + 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x40, 0x07, 0x00, 0x01, 0x55, 0x01, 0x54, + 0x08, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x90, 0x11, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF1, + 0x11, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF4, 0x0A, 0x00, 0x01, 0xBF, + 0x08, 0xFF, 0x01, 0xF5, 0x0A, 0x00, 0x01, 0xBF, 0x08, 0xFF, 0x01, 0xF6, + 0x0A, 0x00, 0x01, 0xBF, 0x08, 0xFF, 0x01, 0xF7, 0x0A, 0x00, 0x01, 0x35, + 0x06, 0x55, 0x01, 0x5A, 0x01, 0xFF, 0x01, 0xF6, 0x11, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xF5, 0x11, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF3, + 0x06, 0x00, 0x01, 0x09, 0x01, 0xEE, 0x01, 0xE5, 0x08, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xF0, 0x06, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF8, + 0x08, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xD0, 0x06, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xFD, 0x08, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x70, + 0x06, 0x00, 0x01, 0x01, 0x02, 0xFF, 0x01, 0x20, 0x07, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x20, 0x07, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x90, + 0x06, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xFB, 0x08, 0x00, 0x01, 0x5F, + 0x01, 0xFF, 0x01, 0xF3, 0x06, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xF3, + 0x08, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x20, 0x04, 0x00, + 0x01, 0x06, 0x02, 0xFF, 0x01, 0xA0, 0x08, 0x00, 0x01, 0x03, 0x02, 0xFF, + 0x01, 0xE6, 0x03, 0x00, 0x01, 0x03, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xFD, + 0x0A, 0x00, 0x01, 0x5F, 0x02, 0xFF, 0x01, 0xFB, 0x01, 0x87, 0x01, 0x8A, + 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xD1, 0x0A, 0x00, 0x01, 0x04, 0x01, 0xEF, + 0x06, 0xFF, 0x01, 0xFB, 0x01, 0x10, 0x0B, 0x00, 0x01, 0x19, 0x05, 0xFF, + 0x01, 0xFC, 0x01, 0x50, 0x0D, 0x00, 0x01, 0x15, 0x01, 0x9B, 0x01, 0xDE, + 0x01, 0xDC, 0x01, 0xA7, 0x01, 0x20, 0xBE, 0x00, + + /* 30 */ + 0xAB, 0x00, 0x01, 0x13, 0x01, 0x56, 0x01, 0x54, 0x01, 0x20, 0x06, 0x00, + 0x01, 0x1E, 0x01, 0xEE, 0x01, 0xB0, 0x05, 0x00, 0x01, 0x02, 0x01, 0x8D, + 0x03, 0xFF, 0x01, 0xFE, 0x01, 0x93, 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x04, 0x00, 0x01, 0x01, 0x01, 0x9F, 0x06, 0xFF, 0x01, 0xB2, + 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x04, 0x00, 0x01, 0x3E, + 0x08, 0xFF, 0x01, 0x50, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, + 0x03, 0x00, 0x01, 0x03, 0x02, 0xFF, 0x01, 0xFC, 0x01, 0x62, 0x01, 0x00, + 0x01, 0x02, 0x01, 0x6B, 0x02, 0xFF, 0x01, 0xF6, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x03, 0x00, 0x01, 0x1E, 0x01, 0xFF, 0x01, 0xFE, + 0x01, 0x40, 0x04, 0x00, 0x01, 0x3D, 0x02, 0xFF, 0x01, 0x30, 0x02, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFF, + 0x01, 0xD1, 0x05, 0x00, 0x01, 0x01, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xD0, + 0x02, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0x04, + 0x02, 0xFF, 0x01, 0x10, 0x06, 0x00, 0x01, 0x1E, 0x01, 0xFF, 0x01, 0xF7, + 0x02, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF6, 0x07, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xFD, + 0x02, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xE0, 0x08, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x40, + 0x01, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0x7F, + 0x01, 0xFF, 0x01, 0x80, 0x08, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x90, + 0x01, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x20, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x01, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x02, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x09, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xF0, 0x01, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x01, 0x00, 0x01, 0x01, 0x01, 0xFF, + 0x01, 0xFC, 0x09, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF3, 0x01, 0x00, + 0x01, 0x1F, 0x05, 0xFF, 0x01, 0xFB, 0x09, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xF4, 0x01, 0x00, 0x01, 0x1F, 0x05, 0xFF, 0x01, 0xFA, 0x09, 0x00, + 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF5, 0x01, 0x00, 0x01, 0x1F, 0x05, 0xFF, + 0x01, 0xF9, 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF5, 0x01, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xE5, 0x01, 0x55, 0x01, 0x57, 0x01, 0xFF, + 0x01, 0xFA, 0x09, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF4, 0x01, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x01, 0x00, 0x01, 0x01, 0x01, 0xFF, + 0x01, 0xFB, 0x09, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF3, 0x01, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x02, 0x00, 0x01, 0xFF, 0x01, 0xFD, + 0x09, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF1, 0x01, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x02, 0x00, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x10, + 0x08, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xE0, 0x01, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x02, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x50, + 0x08, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xA0, 0x01, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x02, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xB0, + 0x08, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x50, 0x01, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x02, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xF2, + 0x07, 0x00, 0x01, 0x01, 0x01, 0xFF, 0x01, 0xFE, 0x02, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x02, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFB, + 0x07, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF6, 0x02, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x02, 0x00, 0x01, 0x01, 0x02, 0xFF, 0x01, 0x70, + 0x06, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xD0, 0x02, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xF7, + 0x05, 0x00, 0x01, 0x06, 0x02, 0xFF, 0x01, 0x30, 0x02, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x09, 0x02, 0xFF, 0x01, 0xC4, + 0x03, 0x00, 0x01, 0x03, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xF6, 0x03, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x04, 0x00, 0x01, 0x9F, 0x02, 0xFF, + 0x01, 0xEA, 0x01, 0x87, 0x01, 0x8A, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0x50, + 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x04, 0x00, 0x01, 0x06, + 0x07, 0xFF, 0x01, 0xD4, 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, + 0x05, 0x00, 0x01, 0x19, 0x05, 0xFF, 0x01, 0xE7, 0x0E, 0x00, 0x01, 0x04, + 0x01, 0x9B, 0x01, 0xCE, 0x01, 0xDC, 0x01, 0x95, 0xB9, 0x00, + + /* 31 */ + 0xB7, 0x00, 0x01, 0x04, 0x01, 0x9C, 0x01, 0xDE, 0x06, 0xEE, 0x01, 0xC0, + 0x09, 0x00, 0x01, 0x04, 0x01, 0xDF, 0x08, 0xFF, 0x01, 0xD0, 0x09, 0x00, + 0x01, 0x6F, 0x09, 0xFF, 0x01, 0xD0, 0x08, 0x00, 0x01, 0x04, 0x02, 0xFF, + 0x01, 0xFB, 0x01, 0x87, 0x04, 0x77, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xD0, + 0x08, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xFC, 0x01, 0x20, 0x05, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x08, 0x00, 0x01, 0x4F, 0x01, 0xFF, + 0x01, 0xE1, 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x08, 0x00, + 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x60, 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xD0, 0x08, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x30, 0x06, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x08, 0x00, 0x01, 0xCF, 0x01, 0xFF, + 0x01, 0x10, 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x08, 0x00, + 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x20, 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xD0, 0x08, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x50, 0x06, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x08, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x08, 0x00, + 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xFA, 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xD0, 0x08, 0x00, 0x01, 0x02, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xE8, + 0x01, 0x54, 0x04, 0x44, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xD0, 0x09, 0x00, + 0x01, 0x4F, 0x09, 0xFF, 0x01, 0xD0, 0x09, 0x00, 0x01, 0x03, 0x01, 0xDF, + 0x08, 0xFF, 0x01, 0xD0, 0x0A, 0x00, 0x01, 0x05, 0x01, 0xAE, 0x07, 0xFF, + 0x01, 0xD0, 0x0C, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x32, + 0x01, 0x22, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xD0, 0x0C, 0x00, 0x01, 0xAF, + 0x01, 0xFF, 0x01, 0xE2, 0x02, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, + 0x0B, 0x00, 0x01, 0x08, 0x02, 0xFF, 0x01, 0x30, 0x02, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xD0, 0x0B, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xF5, + 0x03, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x0A, 0x00, 0x01, 0x04, + 0x02, 0xFF, 0x01, 0x60, 0x03, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, + 0x0A, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xF7, 0x04, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xD0, 0x09, 0x00, 0x01, 0x02, 0x01, 0xEF, 0x01, 0xFF, + 0x01, 0x90, 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x09, 0x00, + 0x01, 0x1D, 0x01, 0xFF, 0x01, 0xFB, 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xD0, 0x09, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x08, 0x00, 0x01, 0x0B, 0x01, 0xFF, + 0x01, 0xFD, 0x01, 0x10, 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, + 0x08, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xE1, 0x06, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x07, 0x02, 0xFF, 0x01, 0x20, + 0x06, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, 0x07, 0x00, 0x01, 0x5F, + 0x01, 0xFF, 0x01, 0xF4, 0x07, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xD0, + 0xCF, 0x00, + + /* 32 */ + 0xFF, 0x00, 0x45, 0x00, 0x01, 0x01, 0x01, 0x11, 0x10, 0x00, 0x01, 0x02, + 0x01, 0x8D, 0x02, 0xFF, 0x01, 0xFD, 0x01, 0x93, 0x0E, 0x00, 0x01, 0x9F, + 0x05, 0xFF, 0x01, 0xB0, 0x0C, 0x00, 0x01, 0x0B, 0x06, 0xFF, 0x01, 0xFB, + 0x0C, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xF8, 0x01, 0x42, 0x01, 0x12, + 0x01, 0x4A, 0x02, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0xCF, 0x01, 0xFF, + 0x01, 0x30, 0x03, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x90, 0x0B, 0x00, + 0x01, 0xFF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xB0, + 0x0A, 0x00, 0x01, 0x02, 0x01, 0xDD, 0x01, 0xD5, 0x04, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xC0, + 0x11, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xC0, 0x0E, 0x00, 0x01, 0x02, + 0x01, 0x57, 0x01, 0xAD, 0x02, 0xFF, 0x01, 0xC0, 0x0C, 0x00, 0x01, 0x16, + 0x01, 0xAD, 0x05, 0xFF, 0x01, 0xC0, 0x0B, 0x00, 0x01, 0x09, 0x04, 0xFF, + 0x01, 0xFE, 0x01, 0x9D, 0x01, 0xFF, 0x01, 0xC0, 0x0B, 0x00, 0x01, 0xCF, + 0x02, 0xFF, 0x01, 0xC9, 0x01, 0x64, 0x01, 0x10, 0x01, 0x0B, 0x01, 0xFF, + 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x71, + 0x03, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xF2, 0x04, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xC0, + 0x0A, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x70, + 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xC0, + 0x0A, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xF2, 0x03, 0x00, 0x01, 0x0A, + 0x02, 0xFF, 0x01, 0xC0, 0x0A, 0x00, 0x01, 0x07, 0x02, 0xFF, 0x01, 0x83, + 0x01, 0x12, 0x01, 0x48, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xF4, 0x0B, 0x00, + 0x01, 0xCF, 0x05, 0xFF, 0x01, 0x76, 0x02, 0xFF, 0x01, 0xF6, 0x0A, 0x00, + 0x01, 0x1B, 0x04, 0xFF, 0x01, 0xC3, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFF, + 0x01, 0xF6, 0x0B, 0x00, 0x01, 0x39, 0x01, 0xCE, 0x01, 0xDC, 0x01, 0x94, + 0x02, 0x00, 0x01, 0x2A, 0x01, 0xDE, 0x01, 0xB3, 0xBD, 0x00, + + /* 33 */ + 0x93, 0x00, 0x01, 0x03, 0x01, 0xCC, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xD0, 0x10, 0x00, 0x01, 0x26, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0xA0, 0x0D, 0x00, 0x01, 0x02, 0x01, 0x69, 0x01, 0xBE, 0x03, 0xFF, + 0x01, 0x40, 0x0C, 0x00, 0x01, 0x02, 0x01, 0xCF, 0x04, 0xFF, 0x01, 0xF6, + 0x0D, 0x00, 0x01, 0x3F, 0x03, 0xFF, 0x01, 0xFE, 0x01, 0xA6, 0x01, 0x10, + 0x0D, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xFC, 0x01, 0x85, 0x01, 0x10, + 0x0E, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF6, 0x11, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x40, 0x11, 0x00, 0x01, 0x7F, 0x01, 0xF7, 0x02, 0x00, + 0x01, 0x10, 0x0F, 0x00, 0x01, 0xDF, 0x01, 0xE0, 0x01, 0x3A, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xFB, 0x01, 0x71, 0x0C, 0x00, 0x01, 0x01, 0x01, 0xFF, + 0x01, 0x99, 0x04, 0xFF, 0x01, 0xFE, 0x01, 0x60, 0x0B, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xDF, 0x05, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0x08, + 0x02, 0xFF, 0x01, 0xFE, 0x01, 0x72, 0x01, 0x11, 0x01, 0x5B, 0x02, 0xFF, + 0x01, 0x50, 0x0A, 0x00, 0x01, 0x0B, 0x02, 0xFF, 0x01, 0xC1, 0x03, 0x00, + 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xE1, 0x0A, 0x00, 0x01, 0x0D, 0x01, 0xFF, + 0x01, 0xFE, 0x01, 0x10, 0x03, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF7, + 0x0A, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xF6, 0x04, 0x00, 0x01, 0x01, + 0x01, 0xFF, 0x01, 0xFD, 0x0A, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xF1, + 0x05, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x10, 0x09, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x50, + 0x09, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x90, 0x05, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x70, 0x09, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x80, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x80, 0x09, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x70, 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x90, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x80, 0x05, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x80, 0x09, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x90, + 0x05, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0x70, 0x09, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x50, + 0x09, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF1, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x10, 0x09, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF8, + 0x04, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xFD, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x20, 0x03, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF6, + 0x0B, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xE3, 0x03, 0x00, 0x01, 0xAF, + 0x01, 0xFF, 0x01, 0xD0, 0x0B, 0x00, 0x01, 0x0C, 0x02, 0xFF, 0x01, 0xA6, + 0x01, 0x45, 0x01, 0x8E, 0x02, 0xFF, 0x01, 0x30, 0x0B, 0x00, 0x01, 0x01, + 0x01, 0xCF, 0x05, 0xFF, 0x01, 0xF5, 0x0D, 0x00, 0x01, 0x08, 0x04, 0xFF, + 0x01, 0xFC, 0x01, 0x30, 0x0E, 0x00, 0x01, 0x16, 0x01, 0xAC, 0x01, 0xED, + 0x01, 0xC8, 0x01, 0x30, 0xC0, 0x00, + + /* 34 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x67, 0x04, 0x77, 0x01, 0x63, 0x0E, 0x00, + 0x01, 0xEF, 0x05, 0xFF, 0x01, 0xD5, 0x0D, 0x00, 0x01, 0xEF, 0x06, 0xFF, + 0x01, 0x60, 0x0C, 0x00, 0x01, 0xEF, 0x01, 0xFD, 0x02, 0x99, 0x01, 0xAC, + 0x02, 0xFF, 0x01, 0xF1, 0x0C, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, + 0x01, 0x2D, 0x01, 0xFF, 0x01, 0xF5, 0x0C, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x03, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF8, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x04, 0x00, 0x01, 0xFF, 0x01, 0xF7, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x03, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x0C, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x2D, 0x01, 0xFF, 0x01, 0xE0, + 0x0C, 0x00, 0x01, 0xEF, 0x01, 0xFD, 0x02, 0x99, 0x01, 0xAC, 0x02, 0xFF, + 0x01, 0x40, 0x0C, 0x00, 0x01, 0xEF, 0x05, 0xFF, 0x01, 0xF3, 0x0D, 0x00, + 0x01, 0xEF, 0x05, 0xFF, 0x01, 0xFE, 0x01, 0x60, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xFC, 0x03, 0x88, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xF8, 0x0C, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x02, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0x30, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x5F, + 0x01, 0xFF, 0x01, 0x70, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, + 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x90, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x04, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0x90, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x04, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x70, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xFA, 0x03, 0x22, 0x01, 0x4B, 0x02, 0xFF, 0x01, 0x10, + 0x0B, 0x00, 0x01, 0xEF, 0x06, 0xFF, 0x01, 0xF8, 0x0C, 0x00, 0x01, 0xEF, + 0x06, 0xFF, 0x01, 0x80, 0x0C, 0x00, 0x01, 0xEF, 0x04, 0xFF, 0x01, 0xFD, + 0x01, 0x93, 0xD4, 0x00, + + /* 35 */ + 0xFF, 0x00, 0x56, 0x00, 0x06, 0x77, 0x01, 0x70, 0x0D, 0x00, 0x01, 0xEF, + 0x05, 0xFF, 0x01, 0xF0, 0x0D, 0x00, 0x01, 0xEF, 0x05, 0xFF, 0x01, 0xF0, + 0x0D, 0x00, 0x01, 0xEF, 0x01, 0xFD, 0x04, 0x99, 0x01, 0x90, 0x0D, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0xD9, 0x00, + + /* 36 */ + 0xFF, 0x00, 0x58, 0x00, 0x01, 0x57, 0x06, 0x77, 0x01, 0x20, 0x0C, 0x00, + 0x01, 0xCF, 0x06, 0xFF, 0x01, 0x50, 0x0C, 0x00, 0x01, 0xDF, 0x06, 0xFF, + 0x01, 0x50, 0x0C, 0x00, 0x01, 0xDF, 0x01, 0xFD, 0x03, 0x99, 0x01, 0xAF, + 0x01, 0xFF, 0x01, 0x50, 0x0C, 0x00, 0x01, 0xDF, 0x01, 0xFA, 0x03, 0x00, + 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, 0x0C, 0x00, 0x01, 0xEF, 0x01, 0xFA, + 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xFA, 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, 0x0C, 0x00, + 0x01, 0xEF, 0x01, 0xFA, 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, + 0x0C, 0x00, 0x01, 0xFF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, + 0x01, 0x50, 0x0C, 0x00, 0x01, 0xFF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x01, 0x01, 0xFF, 0x01, 0xF8, + 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xF6, 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, + 0x0B, 0x00, 0x01, 0x04, 0x01, 0xFF, 0x01, 0xF5, 0x03, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF3, + 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF0, 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, + 0x0B, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x90, + 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x6F, + 0x01, 0xFF, 0x01, 0x30, 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x50, + 0x0A, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFD, 0x04, 0x22, 0x01, 0x4F, + 0x01, 0xFF, 0x01, 0x50, 0x09, 0x00, 0x01, 0x6A, 0x01, 0xAE, 0x08, 0xFF, + 0x01, 0xCA, 0x01, 0xA0, 0x08, 0x00, 0x01, 0x9F, 0x0A, 0xFF, 0x01, 0xF0, + 0x08, 0x00, 0x01, 0x9F, 0x0A, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0x9F, + 0x01, 0xF5, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0x9F, + 0x01, 0xF5, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0x9F, + 0x01, 0xF5, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0x9F, + 0x01, 0xF5, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0x8E, + 0x01, 0xE5, 0x08, 0x00, 0x01, 0xDE, 0x01, 0xE0, 0x6C, 0x00, + + /* 37 */ + 0xFF, 0x00, 0x58, 0x00, 0x01, 0x28, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xFC, + 0x01, 0x71, 0x0E, 0x00, 0x01, 0x09, 0x05, 0xFF, 0x01, 0x60, 0x0C, 0x00, + 0x01, 0x01, 0x01, 0xCF, 0x05, 0xFF, 0x01, 0xF8, 0x0C, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x73, 0x01, 0x11, 0x01, 0x5B, 0x02, 0xFF, + 0x01, 0x50, 0x0B, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xC1, 0x03, 0x00, + 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xE0, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xFE, + 0x01, 0x10, 0x03, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF6, 0x0A, 0x00, + 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF5, 0x05, 0x00, 0x01, 0xDF, 0x01, 0xFC, + 0x0A, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xE0, 0x05, 0x00, 0x01, 0x7F, + 0x01, 0xFF, 0x0A, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xB0, 0x05, 0x00, + 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xC6, 0x05, 0x66, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x60, 0x09, 0x00, + 0x01, 0x1F, 0x09, 0xFF, 0x01, 0x70, 0x09, 0x00, 0x01, 0x2F, 0x09, 0xFF, + 0x01, 0x80, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xB6, 0x07, 0x66, + 0x01, 0x30, 0x09, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x80, 0x11, 0x00, + 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xB0, 0x11, 0x00, 0x01, 0x0A, 0x01, 0xFF, + 0x01, 0xF0, 0x05, 0x00, 0x01, 0x48, 0x01, 0x88, 0x0A, 0x00, 0x01, 0x06, + 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xEF, 0x01, 0xFC, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xFE, 0x01, 0x10, 0x03, 0x00, 0x01, 0x07, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xD2, 0x03, 0x00, + 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xE1, 0x0B, 0x00, 0x01, 0x0C, 0x02, 0xFF, + 0x01, 0xA6, 0x01, 0x45, 0x01, 0x7C, 0x02, 0xFF, 0x01, 0x50, 0x0B, 0x00, + 0x01, 0x01, 0x01, 0xCF, 0x05, 0xFF, 0x01, 0xF6, 0x0D, 0x00, 0x01, 0x08, + 0x04, 0xFF, 0x01, 0xFD, 0x01, 0x40, 0x0E, 0x00, 0x01, 0x16, 0x01, 0xAD, + 0x01, 0xEE, 0x01, 0xC9, 0x01, 0x40, 0xC0, 0x00, + + /* 38 */ + 0xFF, 0x00, 0x55, 0x00, 0x01, 0x03, 0x02, 0x77, 0x03, 0x00, 0x01, 0x01, + 0x01, 0x77, 0x01, 0x71, 0x03, 0x00, 0x01, 0x06, 0x01, 0x77, 0x01, 0x73, + 0x06, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xB0, 0x02, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xF4, 0x03, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xB0, + 0x06, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xFB, 0x02, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xF4, 0x02, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xFB, + 0x08, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xA0, 0x01, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xF4, 0x02, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xC0, + 0x08, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xFA, 0x01, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xF4, 0x01, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xFC, + 0x0A, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xA0, 0x01, 0x03, 0x01, 0xFF, + 0x01, 0xF4, 0x01, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xC0, 0x0A, 0x00, + 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF9, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF4, + 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0xBF, 0x01, 0xFF, + 0x01, 0x93, 0x01, 0xFF, 0x01, 0xF4, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xC1, + 0x0C, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xFB, 0x01, 0xFF, 0x01, 0xFB, + 0x01, 0xFF, 0x01, 0xFC, 0x01, 0x10, 0x0D, 0x00, 0x01, 0xCF, 0x04, 0xFF, + 0x01, 0xD1, 0x0E, 0x00, 0x01, 0x0D, 0x03, 0xFF, 0x01, 0xFD, 0x01, 0x10, + 0x0E, 0x00, 0x01, 0x5F, 0x04, 0xFF, 0x01, 0x60, 0x0D, 0x00, 0x01, 0x05, + 0x05, 0xFF, 0x01, 0xF6, 0x0D, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xE5, + 0x01, 0xFF, 0x01, 0xF5, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x60, 0x0B, 0x00, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x23, 0x01, 0xFF, 0x01, 0xF4, + 0x01, 0x1D, 0x01, 0xFF, 0x01, 0xF7, 0x0B, 0x00, 0x01, 0x6F, 0x01, 0xFF, + 0x01, 0xE2, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF4, 0x01, 0x01, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0x70, 0x09, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xFD, + 0x01, 0x20, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF4, 0x01, 0x00, 0x01, 0x1D, + 0x01, 0xFF, 0x01, 0xF7, 0x09, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xD1, + 0x01, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF4, 0x01, 0x00, 0x01, 0x01, + 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x70, 0x07, 0x00, 0x01, 0x07, 0x01, 0xFF, + 0x01, 0xFD, 0x01, 0x10, 0x01, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF4, + 0x02, 0x00, 0x01, 0x1C, 0x01, 0xFF, 0x01, 0xF8, 0x07, 0x00, 0x01, 0x7F, + 0x01, 0xFF, 0x01, 0xD1, 0x02, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF4, + 0x02, 0x00, 0x01, 0x01, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x80, 0x05, 0x00, + 0x01, 0x07, 0x01, 0xFF, 0x01, 0xFD, 0x01, 0x10, 0x02, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xF4, 0x03, 0x00, 0x01, 0x1C, 0x01, 0xFF, 0x01, 0xF8, + 0x05, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xD1, 0x03, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xF4, 0x03, 0x00, 0x01, 0x01, 0x01, 0xCF, 0x01, 0xFF, + 0x01, 0x80, 0xCC, 0x00, + + /* 39 */ + 0xFF, 0x00, 0x45, 0x00, 0x01, 0x01, 0x11, 0x00, 0x01, 0x17, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0xFE, 0x01, 0xA5, 0x0E, 0x00, 0x01, 0x06, 0x05, 0xFF, + 0x01, 0xD3, 0x0D, 0x00, 0x01, 0x5F, 0x06, 0xFF, 0x01, 0x30, 0x0C, 0x00, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xC5, 0x01, 0x21, 0x01, 0x26, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0xD0, 0x0B, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xFB, + 0x03, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF5, 0x0B, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xF3, 0x03, 0x00, 0x01, 0x01, 0x01, 0xFF, 0x01, 0xF9, + 0x0B, 0x00, 0x01, 0x05, 0x01, 0x88, 0x01, 0x80, 0x04, 0x00, 0x01, 0xFF, + 0x01, 0xFA, 0x11, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF9, 0x11, 0x00, + 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF4, 0x0E, 0x00, 0x01, 0x01, 0x01, 0x33, + 0x01, 0x36, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xB0, 0x0E, 0x00, 0x01, 0x09, + 0x03, 0xFF, 0x01, 0xFA, 0x01, 0x10, 0x0E, 0x00, 0x01, 0x09, 0x03, 0xFF, + 0x01, 0xFA, 0x01, 0x10, 0x0E, 0x00, 0x01, 0x08, 0x01, 0xEE, 0x03, 0xFF, + 0x01, 0xE3, 0x10, 0x00, 0x01, 0x01, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xFD, + 0x11, 0x00, 0x01, 0x02, 0x02, 0xFF, 0x01, 0x40, 0x0A, 0x00, 0x01, 0x06, + 0x01, 0x66, 0x01, 0x30, 0x04, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x70, + 0x0A, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xB0, 0x04, 0x00, 0x01, 0x4F, + 0x01, 0xFF, 0x01, 0x80, 0x0A, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xF1, + 0x04, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x60, 0x0A, 0x00, 0x01, 0x0A, + 0x01, 0xFF, 0x01, 0xFB, 0x03, 0x00, 0x01, 0x04, 0x02, 0xFF, 0x01, 0x10, + 0x0A, 0x00, 0x01, 0x02, 0x02, 0xFF, 0x01, 0xE8, 0x01, 0x53, 0x01, 0x46, + 0x01, 0xBF, 0x01, 0xFF, 0x01, 0xF8, 0x0C, 0x00, 0x01, 0x7F, 0x06, 0xFF, + 0x01, 0xB0, 0x0C, 0x00, 0x01, 0x06, 0x01, 0xEF, 0x04, 0xFF, 0x01, 0xF7, + 0x0E, 0x00, 0x01, 0x05, 0x01, 0x9C, 0x01, 0xDE, 0x01, 0xDC, 0x01, 0x95, + 0xC1, 0x00, + + /* 40 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x74, 0x04, 0x00, 0x01, 0x05, + 0x01, 0x77, 0x01, 0x76, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, + 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x04, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x03, 0x00, 0x01, 0x05, 0x02, 0xFF, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x0E, 0x02, 0xFF, 0x01, 0xFE, + 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x7F, 0x01, 0xFF, + 0x01, 0xCF, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x01, 0x01, 0xFF, 0x01, 0xF9, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xE1, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x3F, 0x01, 0xFF, 0x01, 0x70, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0xCF, 0x01, 0xFD, 0x01, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x00, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF4, 0x01, 0x00, 0x01, 0x9F, 0x01, 0xFE, + 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x00, 0x01, 0x0E, 0x01, 0xFF, + 0x01, 0xB0, 0x01, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x20, 0x01, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF8, 0x02, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xE0, 0x02, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x4F, + 0x01, 0xFF, 0x01, 0x60, 0x02, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x01, 0xDF, 0x01, 0xFC, 0x03, 0x00, 0x01, 0x9F, + 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xF3, 0x03, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xA0, + 0x03, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x02, 0xFF, + 0x01, 0x10, 0x03, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xF7, 0x04, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xE0, 0x04, 0x00, 0x01, 0x9F, 0x01, 0xFE, + 0xD2, 0x00, + + /* 41 */ + 0xCA, 0x00, 0x01, 0x2A, 0x01, 0xA2, 0x03, 0x00, 0x01, 0x3A, 0x01, 0xA2, + 0x0D, 0x00, 0x01, 0x2F, 0x01, 0xF9, 0x03, 0x00, 0x01, 0xAF, 0x01, 0xF1, + 0x0D, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0x82, 0x01, 0x00, 0x01, 0x29, + 0x01, 0xFF, 0x01, 0xC0, 0x0D, 0x00, 0x01, 0x05, 0x05, 0xFF, 0x01, 0x30, + 0x0E, 0x00, 0x01, 0x7F, 0x03, 0xFF, 0x01, 0xF6, 0x0F, 0x00, 0x01, 0x02, + 0x01, 0x8B, 0x01, 0xDD, 0x01, 0xB8, 0x01, 0x10, 0x21, 0x00, 0x01, 0x67, + 0x01, 0x74, 0x04, 0x00, 0x01, 0x05, 0x01, 0x77, 0x01, 0x76, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xFE, + 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0xCF, 0x01, 0xFF, + 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x05, + 0x02, 0xFF, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, + 0x01, 0x0E, 0x02, 0xFF, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x03, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xCF, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x01, 0x01, 0xFF, 0x01, 0xF9, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF1, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0x70, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0xCF, 0x01, 0xFD, 0x01, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF4, + 0x01, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x01, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xB0, 0x01, 0x00, 0x01, 0x9F, + 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x20, 0x01, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x02, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xE0, 0x02, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x60, 0x02, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0xDF, + 0x01, 0xFC, 0x03, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, + 0x02, 0xFF, 0x01, 0xF3, 0x03, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, + 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xA0, 0x03, 0x00, 0x01, 0x9F, 0x01, 0xFE, + 0x0B, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0x10, 0x03, 0x00, 0x01, 0x9F, + 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xF7, 0x04, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xE0, + 0x04, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0xD2, 0x00, + + /* 42 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x74, 0x04, 0x00, 0x01, 0x67, + 0x01, 0x77, 0x01, 0x10, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x03, 0x00, + 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF6, 0x0C, 0x00, 0x01, 0xEF, 0x01, 0xF8, + 0x03, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x60, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xF8, 0x02, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF5, 0x0D, 0x00, + 0x01, 0xEF, 0x01, 0xF8, 0x02, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x50, + 0x0D, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x01, 0x00, 0x01, 0x0A, 0x01, 0xFF, + 0x01, 0xF5, 0x0E, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x01, 0x00, 0x01, 0xAF, + 0x01, 0xFF, 0x01, 0x50, 0x0E, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x01, 0x0A, + 0x01, 0xFF, 0x01, 0xF4, 0x0F, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x40, 0x0F, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xF4, + 0x10, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0x40, 0x10, 0x00, 0x01, 0xEF, + 0x02, 0xFF, 0x01, 0xA0, 0x10, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xFA, + 0x10, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xB0, + 0x0F, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xFB, + 0x0F, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x01, 0x00, 0x01, 0xAF, 0x01, 0xFF, + 0x01, 0xB0, 0x0E, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x01, 0x00, 0x01, 0x0A, + 0x01, 0xFF, 0x01, 0xFB, 0x0E, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x02, 0x00, + 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xC0, 0x0D, 0x00, 0x01, 0xEF, 0x01, 0xF8, + 0x02, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xFC, 0x0D, 0x00, 0x01, 0xEF, + 0x01, 0xF8, 0x03, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xC0, 0x0C, 0x00, + 0x01, 0xEF, 0x01, 0xF8, 0x03, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xFC, + 0x0C, 0x00, 0x01, 0xEF, 0x01, 0xF8, 0x04, 0x00, 0x01, 0x9F, 0x01, 0xFF, + 0x01, 0xC1, 0xD2, 0x00, + + /* 43 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x02, 0x06, 0x77, 0x01, 0x75, 0x0C, 0x00, + 0x01, 0x05, 0x06, 0xFF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x05, 0x06, 0xFF, + 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xFB, 0x03, 0xAA, + 0x01, 0xEF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, + 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x05, 0x01, 0xFF, + 0x01, 0xF2, 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF2, 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, 0x0C, 0x00, + 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, + 0x0C, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x03, 0x00, 0x01, 0xBF, + 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x03, 0x00, + 0x01, 0xBF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, + 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x08, 0x01, 0xFF, + 0x01, 0xF0, 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF0, 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, 0x0C, 0x00, + 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xD0, 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, + 0x0C, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xB0, 0x03, 0x00, 0x01, 0xBF, + 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x80, 0x03, 0x00, + 0x01, 0xBF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x3F, 0x01, 0xFF, 0x01, 0x40, + 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x9F, 0x01, 0xFF, + 0x01, 0x10, 0x03, 0x00, 0x01, 0xBF, 0x01, 0xFC, 0x0B, 0x00, 0x01, 0x04, + 0x01, 0xFF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0xBF, 0x01, 0xFC, 0x0B, 0x00, + 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xF2, 0x04, 0x00, 0x01, 0xBF, 0x01, 0xFC, + 0x0B, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x70, 0x04, 0x00, 0x01, 0xBF, + 0x01, 0xFC, 0x0B, 0x00, 0x01, 0x9F, 0x01, 0xF6, 0x05, 0x00, 0x01, 0xBF, + 0x01, 0xFC, 0x0B, 0x00, 0x01, 0x34, 0xC7, 0x00, + + /* 44 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x77, 0x01, 0x30, 0x04, 0x00, + 0x01, 0x03, 0x02, 0x77, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xD0, + 0x04, 0x00, 0x01, 0x0B, 0x02, 0xFF, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, + 0x01, 0xF3, 0x04, 0x00, 0x01, 0x2F, 0x02, 0xFF, 0x0A, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0xFA, 0x04, 0x00, 0x01, 0x9F, 0x02, 0xFF, 0x0A, 0x00, + 0x01, 0xEF, 0x02, 0xFF, 0x01, 0x10, 0x03, 0x00, 0x03, 0xFF, 0x0A, 0x00, + 0x01, 0xEF, 0x02, 0xFF, 0x01, 0x80, 0x02, 0x00, 0x01, 0x06, 0x03, 0xFF, + 0x0A, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xE0, 0x02, 0x00, 0x01, 0x0D, + 0x03, 0xFF, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFD, 0x01, 0xFF, 0x01, 0xF5, + 0x02, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0xDF, 0x01, 0xFF, 0x0A, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x01, 0xDF, 0x01, 0xFC, 0x02, 0x00, 0x01, 0xAF, + 0x01, 0xFE, 0x01, 0x8F, 0x01, 0xFF, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x30, 0x01, 0x01, 0x01, 0xFF, 0x01, 0xF8, + 0x01, 0x7F, 0x01, 0xFF, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x90, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF2, 0x01, 0x7F, + 0x01, 0xFF, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x0A, 0x01, 0xFF, + 0x01, 0xF1, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xB0, 0x01, 0x7F, 0x01, 0xFF, + 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF7, + 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x40, 0x01, 0x7F, 0x01, 0xFF, 0x0A, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x00, 0x01, 0xCF, 0x01, 0xFD, 0x01, 0xCF, + 0x01, 0xFE, 0x01, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x0A, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0x00, 0x01, 0x6F, 0x02, 0xFF, 0x01, 0xF7, 0x01, 0x00, + 0x01, 0x7F, 0x01, 0xFF, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x00, + 0x01, 0x0F, 0x02, 0xFF, 0x01, 0xF1, 0x01, 0x00, 0x01, 0x7F, 0x01, 0xFF, + 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x00, 0x01, 0x09, 0x02, 0xFF, + 0x01, 0xA0, 0x01, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x0A, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0x00, 0x01, 0x02, 0x02, 0xFF, 0x01, 0x40, 0x01, 0x00, + 0x01, 0x7F, 0x01, 0xFF, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0xCF, 0x01, 0xFD, 0x02, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x0A, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x5F, 0x01, 0xF7, 0x02, 0x00, + 0x01, 0x7F, 0x01, 0xFF, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x06, 0x01, 0x61, 0x02, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x0A, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x06, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0xD1, 0x00, + + /* 45 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x74, 0x05, 0x00, 0x01, 0x77, + 0x01, 0x73, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xFD, 0x05, 0xAA, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x07, 0xFF, 0x01, 0xF8, 0x0B, 0x00, + 0x01, 0xEF, 0x07, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xFC, + 0x05, 0x77, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0xD2, 0x00, + + /* 46 */ + 0xFF, 0x00, 0x58, 0x00, 0x01, 0x39, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xEB, + 0x01, 0x60, 0x0E, 0x00, 0x01, 0x1B, 0x04, 0xFF, 0x01, 0xFE, 0x01, 0x50, + 0x0C, 0x00, 0x01, 0x02, 0x01, 0xEF, 0x05, 0xFF, 0x01, 0xF8, 0x0C, 0x00, + 0x01, 0x0D, 0x02, 0xFF, 0x01, 0x83, 0x01, 0x12, 0x01, 0x5C, 0x02, 0xFF, + 0x01, 0x50, 0x0B, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xD1, 0x03, 0x00, + 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xE1, 0x0A, 0x00, 0x01, 0x01, 0x01, 0xFF, + 0x01, 0xFE, 0x01, 0x10, 0x03, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF7, + 0x0A, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF7, 0x04, 0x00, 0x01, 0x01, + 0x01, 0xFF, 0x01, 0xFD, 0x0A, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF1, + 0x05, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x10, 0x09, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x50, + 0x09, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x90, 0x05, 0x00, 0x01, 0x3F, + 0x01, 0xFF, 0x01, 0x70, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x80, + 0x05, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x80, 0x09, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x70, 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x90, + 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x80, 0x05, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x80, 0x09, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x90, + 0x05, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x70, 0x09, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x50, + 0x09, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF1, 0x05, 0x00, 0x01, 0xAF, + 0x01, 0xFF, 0x01, 0x10, 0x09, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF8, + 0x04, 0x00, 0x01, 0x01, 0x01, 0xFF, 0x01, 0xFD, 0x0B, 0x00, 0x02, 0xFF, + 0x01, 0x20, 0x03, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF6, 0x0B, 0x00, + 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xE3, 0x03, 0x00, 0x01, 0xAF, 0x01, 0xFF, + 0x01, 0xD0, 0x0B, 0x00, 0x01, 0x0C, 0x02, 0xFF, 0x01, 0xA5, 0x01, 0x34, + 0x01, 0x7E, 0x02, 0xFF, 0x01, 0x30, 0x0B, 0x00, 0x01, 0x01, 0x01, 0xCF, + 0x05, 0xFF, 0x01, 0xF5, 0x0D, 0x00, 0x01, 0x19, 0x04, 0xFF, 0x01, 0xFC, + 0x01, 0x30, 0x0E, 0x00, 0x01, 0x27, 0x01, 0xBD, 0x01, 0xEE, 0x01, 0xC9, + 0x01, 0x40, 0xC0, 0x00, + + /* 47 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x67, 0x07, 0x77, 0x01, 0x73, 0x0B, 0x00, + 0x01, 0xEF, 0x07, 0xFF, 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x07, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xFD, 0x05, 0xAA, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0xD2, 0x00, + + /* 48 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x72, 0x01, 0x00, 0x01, 0x29, + 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xC7, 0x01, 0x10, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xF4, 0x01, 0x08, 0x04, 0xFF, 0x01, 0xF6, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xF4, 0x01, 0xAF, 0x05, 0xFF, 0x01, 0x80, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xFC, 0x01, 0xFF, 0x01, 0xF9, 0x01, 0x42, 0x01, 0x37, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0xF6, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xFE, + 0x01, 0x30, 0x02, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x10, + 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xF3, 0x04, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x70, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x90, + 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x0A, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x30, 0x04, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF2, + 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFE, 0x05, 0x00, 0x01, 0x05, 0x01, 0xFF, + 0x01, 0xF5, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFB, 0x05, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF7, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFA, 0x06, 0x00, + 0x01, 0xFF, 0x01, 0xF8, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x06, 0x00, + 0x01, 0xFF, 0x01, 0xF9, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFA, 0x06, 0x00, + 0x01, 0xFF, 0x01, 0xF9, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFB, 0x05, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFE, + 0x05, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF5, 0x0A, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x30, 0x04, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF2, + 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xD0, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xF4, + 0x04, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x70, 0x0A, 0x00, 0x01, 0xEF, + 0x02, 0xFF, 0x01, 0x40, 0x02, 0x00, 0x01, 0x1B, 0x01, 0xFF, 0x01, 0xFE, + 0x01, 0x10, 0x0A, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xFB, 0x01, 0x64, + 0x01, 0x58, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xF5, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0xAF, 0x05, 0xFF, 0x01, 0x70, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0x08, 0x04, 0xFF, 0x01, 0xE4, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0x00, 0x01, 0x28, 0x01, 0xCE, 0x01, 0xED, 0x01, 0xA5, + 0x0D, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xDE, 0x01, 0xE8, + 0x25, 0x00, + + /* 49 */ + 0xFF, 0x00, 0x58, 0x00, 0x01, 0x38, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xEA, + 0x01, 0x50, 0x0E, 0x00, 0x01, 0x19, 0x04, 0xFF, 0x01, 0xFD, 0x01, 0x20, + 0x0C, 0x00, 0x01, 0x01, 0x01, 0xCF, 0x05, 0xFF, 0x01, 0xF2, 0x0C, 0x00, + 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x73, 0x01, 0x12, 0x01, 0x6D, + 0x01, 0xFF, 0x01, 0xFD, 0x0C, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xC1, + 0x03, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x60, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xFE, 0x01, 0x10, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xB0, + 0x0A, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF6, 0x04, 0x00, 0x01, 0x0A, + 0x01, 0xFF, 0x01, 0xF0, 0x0A, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF1, + 0x04, 0x00, 0x01, 0x04, 0x01, 0xBB, 0x01, 0xB1, 0x0A, 0x00, 0x01, 0x0D, + 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x90, + 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x80, 0x11, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x70, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x80, + 0x11, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x90, 0x11, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xC0, 0x05, 0x00, 0x01, 0x55, 0x01, 0x52, 0x0A, 0x00, + 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF1, 0x04, 0x00, 0x01, 0x04, 0x01, 0xFF, + 0x01, 0xF4, 0x0A, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF6, 0x04, 0x00, + 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF1, 0x0B, 0x00, 0x01, 0xFF, 0x01, 0xFE, + 0x01, 0x10, 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xC0, 0x0B, 0x00, + 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xD2, 0x02, 0x00, 0x01, 0x01, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x60, 0x0B, 0x00, 0x01, 0x0C, 0x02, 0xFF, 0x01, 0x94, + 0x01, 0x34, 0x01, 0x8E, 0x01, 0xFF, 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x01, + 0x01, 0xDF, 0x05, 0xFF, 0x01, 0xE1, 0x0D, 0x00, 0x01, 0x19, 0x04, 0xFF, + 0x01, 0xFA, 0x01, 0x10, 0x0E, 0x00, 0x01, 0x27, 0x01, 0xCD, 0x01, 0xEE, + 0x01, 0xC8, 0x01, 0x20, 0xC0, 0x00, + + /* 50 */ + 0xFF, 0x00, 0x55, 0x00, 0x01, 0x47, 0x06, 0x77, 0x01, 0x76, 0x0C, 0x00, + 0x01, 0x9F, 0x06, 0xFF, 0x01, 0xFE, 0x0C, 0x00, 0x01, 0x9F, 0x06, 0xFF, + 0x01, 0xFE, 0x0C, 0x00, 0x01, 0x6A, 0x02, 0xAA, 0x01, 0xDF, 0x01, 0xFF, + 0x02, 0xAA, 0x01, 0xA9, 0x0F, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, 0x01, 0x9F, 0x01, 0xFE, 0x12, 0x00, + 0x01, 0x9F, 0x01, 0xFE, 0xD7, 0x00, + + /* 51 */ + 0xFF, 0x00, 0x55, 0x00, 0x01, 0x67, 0x01, 0x75, 0x05, 0x00, 0x01, 0x05, + 0x01, 0x77, 0x01, 0x70, 0x0A, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x05, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xB0, 0x0A, 0x00, 0x01, 0x5F, 0x01, 0xFF, + 0x01, 0x50, 0x04, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x50, 0x0A, 0x00, + 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xB0, 0x04, 0x00, 0x01, 0xBF, 0x01, 0xFF, + 0x0B, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF0, 0x03, 0x00, 0x01, 0x01, + 0x01, 0xFF, 0x01, 0xF9, 0x0B, 0x00, 0x01, 0x04, 0x01, 0xFF, 0x01, 0xF5, + 0x03, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF3, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xFB, 0x03, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xD0, 0x0C, 0x00, + 0x01, 0x9F, 0x01, 0xFF, 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x70, + 0x0C, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x50, 0x02, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x20, 0x0C, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xB0, + 0x02, 0x00, 0x01, 0xEF, 0x01, 0xFB, 0x0D, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xF1, 0x01, 0x00, 0x01, 0x04, 0x01, 0xFF, 0x01, 0xF5, 0x0D, 0x00, + 0x01, 0x04, 0x01, 0xFF, 0x01, 0xF5, 0x01, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xF0, 0x0E, 0x00, 0x01, 0xEF, 0x01, 0xFB, 0x01, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0x90, 0x0E, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x10, + 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x40, 0x0E, 0x00, 0x01, 0x3F, 0x01, 0xFF, + 0x01, 0x50, 0x01, 0xBF, 0x01, 0xFD, 0x0F, 0x00, 0x01, 0x0D, 0x01, 0xFF, + 0x01, 0xB1, 0x01, 0xFF, 0x01, 0xF8, 0x0F, 0x00, 0x01, 0x08, 0x01, 0xFF, + 0x01, 0xF7, 0x01, 0xFF, 0x01, 0xF2, 0x0F, 0x00, 0x01, 0x03, 0x03, 0xFF, + 0x01, 0xC0, 0x10, 0x00, 0x01, 0xDF, 0x02, 0xFF, 0x01, 0x60, 0x10, 0x00, + 0x01, 0x8F, 0x02, 0xFF, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xFA, + 0x11, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF4, 0x11, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x80, + 0x11, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x20, 0x11, 0x00, 0x01, 0xEF, + 0x01, 0xFC, 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF6, 0x0F, 0x00, + 0x01, 0x05, 0x01, 0x76, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xD0, 0x0F, 0x00, + 0x01, 0x09, 0x03, 0xFF, 0x01, 0x50, 0x0F, 0x00, 0x01, 0x09, 0x02, 0xFF, + 0x01, 0xF7, 0x10, 0x00, 0x01, 0x05, 0x01, 0xCE, 0x01, 0xDA, 0x01, 0x30, + 0x24, 0x00, + + /* 52 */ + 0xE3, 0x00, 0x01, 0x05, 0x01, 0x99, 0x01, 0x80, 0x11, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, + 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, + 0x0C, 0x00, 0x01, 0x01, 0x01, 0x8D, 0x01, 0xFF, 0x01, 0xEB, 0x01, 0x40, + 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, 0x01, 0x02, 0x01, 0x9E, 0x01, 0xFF, + 0x01, 0xEA, 0x01, 0x50, 0x07, 0x00, 0x01, 0x6F, 0x03, 0xFF, 0x01, 0xFA, + 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, 0x01, 0x5F, 0x03, 0xFF, 0x01, 0xFC, + 0x01, 0x20, 0x05, 0x00, 0x01, 0x06, 0x05, 0xFF, 0x01, 0x98, 0x01, 0xFF, + 0x01, 0xE4, 0x05, 0xFF, 0x01, 0xD1, 0x05, 0x00, 0x01, 0x3F, 0x01, 0xFF, + 0x01, 0xFC, 0x01, 0x53, 0x01, 0x36, 0x01, 0xCF, 0x01, 0xFC, 0x01, 0xFF, + 0x01, 0xFD, 0x01, 0xFF, 0x01, 0x83, 0x01, 0x24, 0x01, 0x9F, 0x01, 0xFF, + 0x01, 0xFB, 0x05, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x90, 0x02, 0x00, + 0x01, 0x0A, 0x03, 0xFF, 0x01, 0xE2, 0x02, 0x00, 0x01, 0x03, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x40, 0x03, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xFC, + 0x04, 0x00, 0x01, 0xDF, 0x02, 0xFF, 0x01, 0x40, 0x03, 0x00, 0x01, 0x5F, + 0x01, 0xFF, 0x01, 0xB0, 0x03, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF4, + 0x04, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xFB, 0x04, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF1, 0x03, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xE0, + 0x04, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xF6, 0x04, 0x00, 0x01, 0x07, + 0x01, 0xFF, 0x01, 0xF4, 0x03, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xB0, + 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF2, 0x04, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xF7, 0x03, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0x90, + 0x04, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF0, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF9, 0x03, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0x80, 0x04, 0x00, + 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF0, 0x05, 0x00, 0x01, 0xFF, 0x01, 0xFA, + 0x03, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x70, 0x04, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xE0, 0x05, 0x00, 0x01, 0xEF, 0x01, 0xFB, 0x03, 0x00, + 0x01, 0x2F, 0x01, 0xFF, 0x01, 0x80, 0x04, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xF0, 0x05, 0x00, 0x01, 0xFF, 0x01, 0xFA, 0x03, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0x90, 0x04, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF0, + 0x05, 0x00, 0x01, 0xFF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x0F, 0x01, 0xFF, + 0x01, 0xB0, 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF3, 0x04, 0x00, + 0x01, 0x03, 0x01, 0xFF, 0x01, 0xF7, 0x03, 0x00, 0x01, 0x0C, 0x01, 0xFF, + 0x01, 0xF0, 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xF7, 0x04, 0x00, + 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF4, 0x03, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xF5, 0x04, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xFC, 0x04, 0x00, + 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF1, 0x03, 0x00, 0x01, 0x04, 0x01, 0xFF, + 0x01, 0xFC, 0x04, 0x00, 0x01, 0xDF, 0x02, 0xFF, 0x01, 0x40, 0x03, 0x00, + 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xB0, 0x04, 0x00, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0xA0, 0x02, 0x00, 0x01, 0x0B, 0x03, 0xFF, 0x01, 0xE3, 0x02, 0x00, + 0x01, 0x04, 0x02, 0xFF, 0x01, 0x40, 0x04, 0x00, 0x01, 0x5F, 0x01, 0xFF, + 0x01, 0xFD, 0x01, 0x74, 0x01, 0x47, 0x01, 0xDF, 0x01, 0xFE, 0x03, 0xFF, + 0x01, 0x95, 0x01, 0x45, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xFB, 0x05, 0x00, + 0x01, 0x08, 0x05, 0xFF, 0x01, 0xB8, 0x01, 0xFF, 0x01, 0xE6, 0x05, 0xFF, + 0x01, 0xD1, 0x06, 0x00, 0x01, 0x7F, 0x03, 0xFF, 0x01, 0xFA, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xE0, 0x01, 0x6F, 0x03, 0xFF, 0x01, 0xFA, 0x01, 0x10, + 0x06, 0x00, 0x01, 0x02, 0x01, 0x8C, 0x01, 0xEF, 0x01, 0xDB, 0x01, 0x50, + 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, 0x01, 0x02, 0x01, 0x8D, 0x01, 0xEE, + 0x01, 0xD9, 0x01, 0x30, 0x0C, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, + 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, + 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, + 0x11, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xE0, 0x1E, 0x00, + + /* 53 */ + 0xFF, 0x00, 0x55, 0x00, 0x01, 0x37, 0x01, 0x77, 0x01, 0x30, 0x04, 0x00, + 0x01, 0x17, 0x01, 0x77, 0x01, 0x40, 0x0A, 0x00, 0x01, 0x0D, 0x01, 0xFF, + 0x01, 0xE1, 0x04, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x20, 0x0A, 0x00, + 0x01, 0x03, 0x01, 0xFF, 0x01, 0xFB, 0x03, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xF6, 0x0C, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x50, 0x02, 0x00, + 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xB0, 0x0C, 0x00, 0x01, 0x0D, 0x01, 0xFF, + 0x01, 0xE1, 0x02, 0x00, 0x01, 0xCF, 0x01, 0xFE, 0x01, 0x10, 0x0C, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xFB, 0x01, 0x00, 0x01, 0x07, 0x01, 0xFF, + 0x01, 0xF5, 0x0E, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0x60, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x90, 0x0E, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF2, + 0x01, 0xCF, 0x01, 0xFD, 0x0F, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xFE, + 0x01, 0xFF, 0x01, 0xF3, 0x10, 0x00, 0x01, 0x6F, 0x02, 0xFF, 0x01, 0x70, + 0x10, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xFC, 0x11, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xFD, 0x11, 0x00, 0x01, 0x4F, 0x02, 0xFF, 0x01, 0x80, + 0x0F, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xF3, 0x0F, 0x00, + 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xE3, 0x01, 0xEF, 0x01, 0xFD, 0x0F, 0x00, + 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x50, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0x90, + 0x0D, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xFB, 0x01, 0x00, 0x01, 0x0A, + 0x01, 0xFF, 0x01, 0xF4, 0x0D, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xE1, + 0x01, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFD, 0x0D, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0x50, 0x02, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x90, + 0x0B, 0x00, 0x01, 0x03, 0x01, 0xFF, 0x01, 0xFA, 0x03, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xF4, 0x0B, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xE1, + 0x03, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFE, 0x01, 0x10, 0x0A, 0x00, + 0x01, 0x9F, 0x01, 0xFF, 0x01, 0x50, 0x04, 0x00, 0x01, 0x6F, 0x01, 0xFF, + 0x01, 0xA0, 0x0A, 0x00, 0x02, 0x11, 0x05, 0x00, 0x01, 0x01, 0x01, 0x11, + 0x01, 0x10, 0xBE, 0x00, + + /* 54 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x74, 0x05, 0x00, 0x01, 0x77, + 0x01, 0x73, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x00, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x05, 0x11, 0x01, 0xFF, + 0x01, 0xF7, 0x0B, 0x00, 0x01, 0xEF, 0x07, 0xFF, 0x01, 0xFC, 0x01, 0x99, + 0x0A, 0x00, 0x01, 0xEF, 0x09, 0xFF, 0x0A, 0x00, 0x01, 0xEF, 0x09, 0xFF, + 0x12, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x12, 0x00, 0x01, 0x0E, 0x01, 0xFF, + 0x12, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x12, 0x00, 0x01, 0x0E, 0x01, 0xFF, + 0x12, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x6D, 0x00, + + /* 55 */ + 0xFF, 0x00, 0x55, 0x00, 0x01, 0x02, 0x01, 0x77, 0x01, 0x71, 0x04, 0x00, + 0x01, 0x77, 0x01, 0x73, 0x0B, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, + 0x04, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0x05, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF2, 0x04, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, + 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, 0x04, 0x00, 0x01, 0xFF, 0x01, 0xF8, + 0x0B, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, 0x04, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x0B, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, 0x04, 0x00, + 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, + 0x04, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0x05, 0x01, 0xFF, + 0x01, 0xF2, 0x04, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0x03, + 0x01, 0xFF, 0x01, 0xF6, 0x04, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x0C, 0x00, + 0x02, 0xFF, 0x01, 0x85, 0x03, 0x55, 0x01, 0xFF, 0x01, 0xF8, 0x0C, 0x00, + 0x01, 0x6F, 0x06, 0xFF, 0x01, 0xF8, 0x0C, 0x00, 0x01, 0x07, 0x06, 0xFF, + 0x01, 0xF8, 0x0D, 0x00, 0x01, 0x17, 0x01, 0xBC, 0x03, 0xCC, 0x01, 0xFF, + 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x12, 0x00, 0x01, 0x11, 0x01, 0x10, 0xBF, 0x00, + + /* 56 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x66, 0x01, 0x64, 0x02, 0x00, 0x01, 0x01, + 0x01, 0x66, 0x01, 0x62, 0x02, 0x00, 0x01, 0x02, 0x01, 0x66, 0x01, 0x60, + 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, + 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, + 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, + 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, + 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, + 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, + 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, + 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, + 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, + 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x11, 0x01, 0x13, + 0x01, 0xFF, 0x01, 0xF6, 0x02, 0x11, 0x01, 0x17, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0xEF, 0x0A, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, + 0x0A, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x0A, 0xFF, 0x01, 0xF1, + 0xCF, 0x00, + + /* 57 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x66, 0x01, 0x63, 0x02, 0x00, 0x01, 0x01, + 0x01, 0x66, 0x01, 0x62, 0x02, 0x00, 0x01, 0x02, 0x01, 0x66, 0x01, 0x60, + 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, + 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, + 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, + 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, + 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, + 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, + 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, + 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, + 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x02, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, + 0x01, 0xFF, 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xFF, + 0x01, 0xF1, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x11, 0x01, 0x13, + 0x01, 0xFF, 0x01, 0xF6, 0x02, 0x11, 0x01, 0x17, 0x01, 0xFF, 0x01, 0xF1, + 0x08, 0x00, 0x01, 0xEF, 0x0A, 0xFF, 0x01, 0xF9, 0x01, 0x95, 0x07, 0x00, + 0x01, 0xEF, 0x0B, 0xFF, 0x01, 0xF9, 0x07, 0x00, 0x01, 0xEF, 0x0B, 0xFF, + 0x01, 0xF9, 0x12, 0x00, 0x01, 0x5F, 0x01, 0xF9, 0x12, 0x00, 0x01, 0x5F, + 0x01, 0xF9, 0x12, 0x00, 0x01, 0x5F, 0x01, 0xF9, 0x12, 0x00, 0x01, 0x5F, + 0x01, 0xF9, 0x12, 0x00, 0x01, 0x5F, 0x01, 0xF9, 0x6A, 0x00, + + /* 58 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x56, 0x01, 0x63, 0x12, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x02, 0xEE, 0x01, 0xED, + 0x01, 0xC9, 0x01, 0x60, 0x0D, 0x00, 0x01, 0xEF, 0x06, 0xFF, 0x01, 0x70, + 0x0C, 0x00, 0x01, 0xEF, 0x06, 0xFF, 0x01, 0xFA, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xFA, 0x02, 0x33, 0x01, 0x34, 0x01, 0x6A, 0x02, 0xFF, 0x01, 0x50, + 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x6F, 0x01, 0xFF, + 0x01, 0xD0, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x0C, + 0x01, 0xFF, 0x01, 0xF1, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, + 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF3, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x04, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF4, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x04, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x2F, 0x01, 0xFF, 0x01, 0xE0, + 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x11, 0x01, 0x38, 0x02, 0xFF, + 0x01, 0x70, 0x0B, 0x00, 0x01, 0xEF, 0x06, 0xFF, 0x01, 0xFC, 0x0C, 0x00, + 0x01, 0xEF, 0x06, 0xFF, 0x01, 0xC1, 0x0C, 0x00, 0x01, 0xEF, 0x05, 0xFF, + 0x01, 0xB5, 0x0D, 0x00, 0x05, 0x11, 0xC2, 0x00, + + /* 59 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x56, 0x01, 0x63, 0x07, 0x00, 0x01, 0x02, + 0x01, 0x66, 0x01, 0x60, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x07, 0x00, + 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x07, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x07, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x07, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, + 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x07, 0x00, 0x01, 0x07, 0x01, 0xFF, + 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x07, 0x00, 0x01, 0x07, + 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x07, 0x00, + 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xFF, + 0x02, 0xEE, 0x01, 0xED, 0x01, 0xC9, 0x01, 0x60, 0x02, 0x00, 0x01, 0x07, + 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x06, 0xFF, 0x01, 0x70, + 0x01, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, + 0x06, 0xFF, 0x01, 0xFA, 0x01, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, + 0x08, 0x00, 0x01, 0xEF, 0x01, 0xFA, 0x02, 0x33, 0x01, 0x34, 0x01, 0x6B, + 0x02, 0xFF, 0x01, 0x50, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xD0, + 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF1, 0x01, 0x07, 0x01, 0xFF, + 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF3, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF4, + 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x04, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF2, 0x01, 0x07, 0x01, 0xFF, + 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x04, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xE0, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x11, 0x01, 0x37, 0x02, 0xFF, 0x01, 0x70, + 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x06, 0xFF, + 0x01, 0xFC, 0x01, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, + 0x01, 0xEF, 0x06, 0xFF, 0x01, 0xC1, 0x01, 0x00, 0x01, 0x07, 0x01, 0xFF, + 0x01, 0xF0, 0x08, 0x00, 0x01, 0xEF, 0x05, 0xFF, 0x01, 0xB5, 0x02, 0x00, + 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF0, 0x08, 0x00, 0x05, 0x11, 0x05, 0x00, + 0x01, 0x11, 0x01, 0x10, 0xBB, 0x00, + + /* 60 */ + 0xFF, 0x00, 0x55, 0x00, 0x01, 0x36, 0x04, 0x66, 0x01, 0x63, 0x0E, 0x00, + 0x01, 0x9F, 0x04, 0xFF, 0x01, 0xF8, 0x0E, 0x00, 0x01, 0x9F, 0x04, 0xFF, + 0x01, 0xF8, 0x0E, 0x00, 0x01, 0x6A, 0x03, 0xAA, 0x01, 0xFF, 0x01, 0xF8, + 0x12, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, 0x01, 0xF8, + 0x12, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x12, 0x00, 0x01, 0xFF, 0x01, 0xF8, + 0x12, 0x00, 0x02, 0xFF, 0x02, 0xEE, 0x01, 0xED, 0x01, 0xC9, 0x01, 0x50, + 0x0D, 0x00, 0x06, 0xFF, 0x01, 0xFE, 0x01, 0x60, 0x0C, 0x00, 0x07, 0xFF, + 0x01, 0xF9, 0x0C, 0x00, 0x01, 0xFF, 0x01, 0xFA, 0x02, 0x33, 0x01, 0x34, + 0x01, 0x6B, 0x02, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0xFF, 0x01, 0xF8, + 0x04, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0xC0, 0x0B, 0x00, 0x01, 0xFF, + 0x01, 0xF8, 0x04, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF1, 0x0B, 0x00, + 0x01, 0xFF, 0x01, 0xF8, 0x04, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF3, + 0x0B, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x04, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xF3, 0x0B, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x04, 0x00, 0x01, 0x0B, + 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, 0x01, 0xFF, 0x01, 0xF8, 0x04, 0x00, + 0x01, 0x3F, 0x01, 0xFF, 0x01, 0xE0, 0x0B, 0x00, 0x01, 0xFF, 0x01, 0xF9, + 0x03, 0x11, 0x01, 0x38, 0x02, 0xFF, 0x01, 0x70, 0x0B, 0x00, 0x07, 0xFF, + 0x01, 0xFC, 0x0C, 0x00, 0x07, 0xFF, 0x01, 0xB1, 0x0C, 0x00, 0x06, 0xFF, + 0x01, 0xB5, 0x0D, 0x00, 0x05, 0x11, 0xBF, 0x00, + + /* 61 */ + 0xFF, 0x00, 0x57, 0x00, 0x01, 0x02, 0x01, 0x8C, 0x01, 0xFF, 0x01, 0xFD, + 0x01, 0x94, 0x0F, 0x00, 0x01, 0x9F, 0x04, 0xFF, 0x01, 0xB2, 0x0D, 0x00, + 0x01, 0x0C, 0x05, 0xFF, 0x01, 0xFE, 0x01, 0x20, 0x0C, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0xF8, 0x01, 0x42, 0x01, 0x36, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0xE1, 0x0B, 0x00, 0x01, 0x01, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x20, + 0x02, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xFA, 0x0B, 0x00, 0x01, 0x07, + 0x01, 0xFF, 0x01, 0xF5, 0x04, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x20, + 0x0A, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xE0, 0x04, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0x90, 0x0A, 0x00, 0x01, 0x0A, 0x01, 0xCC, 0x01, 0x80, + 0x04, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xE0, 0x11, 0x00, 0x01, 0x08, + 0x01, 0xFF, 0x01, 0xF1, 0x0D, 0x00, 0x01, 0x69, 0x03, 0x99, 0x01, 0x9B, + 0x01, 0xFF, 0x01, 0xF4, 0x0D, 0x00, 0x01, 0xAF, 0x05, 0xFF, 0x01, 0xF5, + 0x0D, 0x00, 0x01, 0xAF, 0x05, 0xFF, 0x01, 0xF6, 0x0D, 0x00, 0x01, 0x58, + 0x03, 0x88, 0x01, 0x8A, 0x01, 0xFF, 0x01, 0xF5, 0x11, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF4, 0x0A, 0x00, 0x01, 0x05, 0x01, 0x55, 0x01, 0x10, + 0x04, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF2, 0x0A, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0x80, 0x04, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xE0, + 0x0A, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xD0, 0x04, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xA0, 0x0A, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xF5, + 0x04, 0x00, 0x01, 0xBF, 0x01, 0xFF, 0x01, 0x40, 0x0A, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x20, 0x02, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xFC, 0x0C, 0x00, 0x01, 0x9F, 0x01, 0xFF, 0x01, 0xF9, 0x01, 0x42, + 0x01, 0x37, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xF2, 0x0C, 0x00, 0x01, 0x0B, + 0x06, 0xFF, 0x01, 0x40, 0x0D, 0x00, 0x01, 0x8F, 0x04, 0xFF, 0x01, 0xC2, + 0x0E, 0x00, 0x01, 0x01, 0x01, 0x8C, 0x01, 0xEF, 0x01, 0xED, 0x01, 0x94, + 0xC1, 0x00, + + /* 62 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x56, 0x01, 0x63, 0x04, 0x00, 0x01, 0x05, + 0x01, 0xAE, 0x01, 0xFF, 0x01, 0xED, 0x01, 0x83, 0x09, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x03, 0x00, 0x01, 0x03, 0x01, 0xDF, 0x04, 0xFF, 0x01, 0xA1, + 0x08, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x6F, 0x05, 0xFF, + 0x01, 0xFE, 0x01, 0x20, 0x07, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0x04, 0x02, 0xFF, 0x01, 0xD6, 0x01, 0x32, 0x01, 0x48, 0x02, 0xFF, + 0x01, 0xE0, 0x07, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x1C, 0x01, 0xFF, 0x01, 0xF9, + 0x07, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x7F, 0x01, 0xFF, + 0x01, 0xB0, 0x03, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x10, + 0x06, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0x20, 0x04, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x70, 0x06, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x00, 0x01, 0x02, 0x01, 0xFF, 0x01, 0xFB, + 0x05, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xB0, 0x06, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, + 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xE0, 0x06, 0x00, 0x01, 0xEF, 0x01, 0xFD, + 0x01, 0x99, 0x01, 0x9C, 0x01, 0xFF, 0x01, 0xF3, 0x05, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xF1, 0x06, 0x00, 0x01, 0xEF, 0x04, 0xFF, 0x01, 0xF2, + 0x05, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF2, 0x06, 0x00, 0x01, 0xEF, + 0x04, 0xFF, 0x01, 0xF1, 0x05, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF3, + 0x06, 0x00, 0x01, 0xEF, 0x01, 0xFC, 0x01, 0x88, 0x01, 0x8C, 0x01, 0xFF, + 0x01, 0xF2, 0x05, 0x00, 0x01, 0x07, 0x01, 0xFF, 0x01, 0xF2, 0x06, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x01, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF3, + 0x05, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xF1, 0x06, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0x00, 0x01, 0x04, 0x01, 0xFF, 0x01, 0xF6, 0x05, 0x00, + 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF0, 0x06, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x01, 0x00, 0x01, 0x01, 0x01, 0xFF, 0x01, 0xFB, 0x05, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xB0, 0x06, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, + 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x20, 0x04, 0x00, 0x01, 0x7F, 0x01, 0xFF, + 0x01, 0x70, 0x06, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x6F, + 0x01, 0xFF, 0x01, 0xB0, 0x03, 0x00, 0x01, 0x01, 0x01, 0xEF, 0x01, 0xFF, + 0x01, 0x10, 0x06, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x0E, + 0x01, 0xFF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x2D, 0x01, 0xFF, 0x01, 0xF9, + 0x07, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x04, 0x02, 0xFF, + 0x01, 0xD7, 0x01, 0x32, 0x01, 0x49, 0x02, 0xFF, 0x01, 0xD0, 0x07, 0x00, + 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x6F, 0x05, 0xFF, 0x01, 0xFD, + 0x01, 0x20, 0x07, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x03, 0x00, 0x01, 0x03, + 0x01, 0xDF, 0x04, 0xFF, 0x01, 0xA1, 0x08, 0x00, 0x01, 0x11, 0x01, 0x10, + 0x04, 0x00, 0x01, 0x05, 0x01, 0xAD, 0x01, 0xFF, 0x01, 0xEC, 0x01, 0x82, + 0xBC, 0x00, + + /* 63 */ + 0xFF, 0x00, 0x58, 0x00, 0x01, 0x14, 0x05, 0x66, 0x01, 0x60, 0x0C, 0x00, + 0x01, 0x2B, 0x06, 0xFF, 0x01, 0xF2, 0x0B, 0x00, 0x01, 0x02, 0x01, 0xEF, + 0x06, 0xFF, 0x01, 0xF2, 0x0B, 0x00, 0x01, 0x0C, 0x02, 0xFF, 0x01, 0xEB, + 0x02, 0xAA, 0x01, 0xAC, 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, 0x01, 0x4F, + 0x01, 0xFF, 0x01, 0xF5, 0x03, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, + 0x0B, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0x70, 0x03, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0x30, + 0x03, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, 0x01, 0x9F, + 0x01, 0xFF, 0x01, 0x20, 0x03, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, + 0x0B, 0x00, 0x01, 0x6F, 0x01, 0xFF, 0x01, 0x70, 0x03, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xF8, + 0x01, 0x20, 0x02, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, + 0x01, 0x08, 0x07, 0xFF, 0x01, 0xF2, 0x0C, 0x00, 0x01, 0x8F, 0x06, 0xFF, + 0x01, 0xF2, 0x0C, 0x00, 0x01, 0x02, 0x01, 0x9D, 0x05, 0xFF, 0x01, 0xF2, + 0x0D, 0x00, 0x01, 0x01, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x62, 0x01, 0x27, + 0x01, 0xFF, 0x01, 0xF2, 0x0D, 0x00, 0x01, 0x0C, 0x01, 0xFF, 0x01, 0xF7, + 0x01, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, 0x0D, 0x00, 0x01, 0xCF, + 0x01, 0xFF, 0x01, 0x80, 0x01, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, + 0x0C, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF9, 0x02, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF2, 0x0C, 0x00, 0x01, 0xAF, 0x01, 0xFF, 0x01, 0xA0, + 0x02, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, 0x0B, 0x00, 0x01, 0x09, + 0x01, 0xFF, 0x01, 0xFA, 0x03, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, + 0x0B, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x01, 0xB0, 0x03, 0x00, 0x01, 0x05, + 0x01, 0xFF, 0x01, 0xF2, 0x0A, 0x00, 0x01, 0x08, 0x01, 0xFF, 0x01, 0xFB, + 0x04, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, 0x0A, 0x00, 0x01, 0x7F, + 0x01, 0xFF, 0x01, 0xC0, 0x04, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF2, + 0x0A, 0x00, 0x02, 0x11, 0x06, 0x00, 0x01, 0x11, 0x01, 0x10, 0xBE, 0x00, + + /* 64 */ + 0x2C, 0x00, 0x01, 0xBD, 0x01, 0xDD, 0x01, 0x60, 0x01, 0x05, 0x01, 0xDD, + 0x01, 0xDC, 0x0E, 0x00, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x70, 0x01, 0x06, + 0x01, 0xFF, 0x01, 0xFE, 0x0E, 0x00, 0x01, 0xDF, 0x01, 0xFF, 0x01, 0x70, + 0x01, 0x06, 0x01, 0xFF, 0x01, 0xFE, 0x0E, 0x00, 0x01, 0xDF, 0x01, 0xFF, + 0x01, 0x70, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xFE, 0x0E, 0x00, 0x01, 0x67, + 0x01, 0x77, 0x01, 0x30, 0x01, 0x02, 0x01, 0x77, 0x01, 0x76, 0x33, 0x00, + 0x01, 0x1C, 0x0A, 0xCC, 0x09, 0x00, 0x01, 0x1F, 0x0A, 0xFF, 0x09, 0x00, + 0x01, 0x1F, 0x0A, 0xFF, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xE8, + 0x08, 0x88, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xFE, 0x07, 0xEE, + 0x01, 0xE4, 0x09, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xF5, 0x09, 0x00, + 0x01, 0x1F, 0x09, 0xFF, 0x01, 0xF5, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xE7, 0x07, 0x77, 0x01, 0x72, 0x09, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, + 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xC0, 0x11, 0x00, 0x01, 0x1F, 0x01, 0xFF, + 0x01, 0xD4, 0x08, 0x44, 0x01, 0x30, 0x08, 0x00, 0x01, 0x1F, 0x0A, 0xFF, + 0x01, 0xB0, 0x08, 0x00, 0x01, 0x1F, 0x0A, 0xFF, 0x01, 0xB0, 0x08, 0x00, + 0x01, 0x1F, 0x0A, 0xFF, 0x01, 0xB0, 0x08, 0x00, 0x01, 0x01, 0x0A, 0x11, + 0xBC, 0x00, + + /* 65 */ + 0xB6, 0x00, 0x01, 0x01, 0x02, 0x55, 0x01, 0x00, 0x01, 0x04, 0x01, 0x55, + 0x01, 0x52, 0x0D, 0x00, 0x01, 0x05, 0x02, 0xFF, 0x01, 0x00, 0x01, 0x0D, + 0x01, 0xFF, 0x01, 0xF7, 0x0D, 0x00, 0x01, 0x05, 0x02, 0xFF, 0x01, 0x00, + 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF7, 0x0D, 0x00, 0x01, 0x05, 0x02, 0xFF, + 0x01, 0x00, 0x01, 0x0D, 0x01, 0xFF, 0x01, 0xF7, 0x0D, 0x00, 0x01, 0x04, + 0x02, 0xEE, 0x01, 0x00, 0x01, 0x0C, 0x01, 0xEE, 0x01, 0xE6, 0x4A, 0x00, + 0x01, 0x17, 0x01, 0xBE, 0x01, 0xFF, 0x01, 0xDB, 0x01, 0x60, 0x0E, 0x00, + 0x01, 0x07, 0x04, 0xFF, 0x01, 0xFE, 0x01, 0x50, 0x0D, 0x00, 0x01, 0xBF, + 0x05, 0xFF, 0x01, 0xF7, 0x0C, 0x00, 0x01, 0x0A, 0x02, 0xFF, 0x01, 0x94, + 0x01, 0x23, 0x01, 0x6C, 0x02, 0xFF, 0x01, 0x50, 0x0B, 0x00, 0x01, 0x6F, + 0x01, 0xFF, 0x01, 0xD2, 0x03, 0x00, 0x01, 0x7F, 0x01, 0xFF, 0x01, 0xD0, + 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xFE, 0x01, 0x10, 0x03, 0x00, 0x01, 0x07, + 0x01, 0xFF, 0x01, 0xF6, 0x0A, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF6, + 0x05, 0x00, 0x01, 0xEF, 0x01, 0xFB, 0x0A, 0x00, 0x01, 0x09, 0x01, 0xFF, + 0x01, 0xF0, 0x05, 0x00, 0x01, 0x8F, 0x01, 0xFF, 0x0A, 0x00, 0x01, 0x0D, + 0x01, 0xFF, 0x01, 0xB0, 0x05, 0x00, 0x01, 0x4F, 0x01, 0xFF, 0x01, 0x30, + 0x09, 0x00, 0x01, 0x0F, 0x01, 0xFF, 0x01, 0xB5, 0x05, 0x55, 0x01, 0x7F, + 0x01, 0xFF, 0x01, 0x50, 0x09, 0x00, 0x01, 0x1F, 0x09, 0xFF, 0x01, 0x70, + 0x09, 0x00, 0x01, 0x2F, 0x09, 0xFF, 0x01, 0x70, 0x09, 0x00, 0x01, 0x1F, + 0x01, 0xFF, 0x01, 0xB7, 0x07, 0x77, 0x01, 0x40, 0x09, 0x00, 0x01, 0x0F, + 0x01, 0xFF, 0x01, 0x80, 0x11, 0x00, 0x01, 0x0E, 0x01, 0xFF, 0x01, 0xB0, + 0x11, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xE0, 0x05, 0x00, 0x01, 0x37, + 0x01, 0x77, 0x0A, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF5, 0x05, 0x00, + 0x01, 0xDF, 0x01, 0xFD, 0x0B, 0x00, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x10, + 0x03, 0x00, 0x01, 0x06, 0x01, 0xFF, 0x01, 0xF8, 0x0B, 0x00, 0x01, 0x8F, + 0x01, 0xFF, 0x01, 0xC1, 0x03, 0x00, 0x01, 0x5F, 0x01, 0xFF, 0x01, 0xF1, + 0x0B, 0x00, 0x01, 0x0C, 0x02, 0xFF, 0x01, 0x94, 0x01, 0x23, 0x01, 0x6B, + 0x02, 0xFF, 0x01, 0x60, 0x0B, 0x00, 0x01, 0x01, 0x01, 0xCF, 0x05, 0xFF, + 0x01, 0xF8, 0x0D, 0x00, 0x01, 0x19, 0x04, 0xFF, 0x01, 0xFE, 0x01, 0x50, + 0x0E, 0x00, 0x01, 0x27, 0x01, 0xCE, 0x01, 0xFF, 0x01, 0xDA, 0x01, 0x50, + 0xC0, 0x00, + + /* 48 */ + 0xFF, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x72, 0x01, 0x00, 0x01, 0x29, + 0x01, 0xDF, 0x01, 0xFF, 0x01, 0xC7, 0x01, 0x10, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xF4, 0x01, 0x08, 0x04, 0xFF, 0x01, 0xF6, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xF4, 0x01, 0xAF, 0x05, 0xFF, 0x01, 0x80, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xFC, 0x01, 0xFF, 0x01, 0xF9, 0x01, 0x42, 0x01, 0x37, 0x01, 0xDF, + 0x01, 0xFF, 0x01, 0xF6, 0x0B, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xFE, + 0x01, 0x30, 0x02, 0x00, 0x01, 0x09, 0x01, 0xFF, 0x01, 0xFE, 0x01, 0x10, + 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xF3, 0x04, 0x00, 0x01, 0xBF, + 0x01, 0xFF, 0x01, 0x70, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0x90, + 0x04, 0x00, 0x01, 0x1F, 0x01, 0xFF, 0x01, 0xD0, 0x0A, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x30, 0x04, 0x00, 0x01, 0x0A, 0x01, 0xFF, 0x01, 0xF2, + 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFE, 0x05, 0x00, 0x01, 0x05, 0x01, 0xFF, + 0x01, 0xF5, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFB, 0x05, 0x00, 0x01, 0x02, + 0x01, 0xFF, 0x01, 0xF7, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFA, 0x06, 0x00, + 0x01, 0xFF, 0x01, 0xF8, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x06, 0x00, + 0x01, 0xFF, 0x01, 0xF9, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFA, 0x06, 0x00, + 0x01, 0xFF, 0x01, 0xF9, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFB, 0x05, 0x00, + 0x01, 0x02, 0x01, 0xFF, 0x01, 0xF8, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFE, + 0x05, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x01, 0xF5, 0x0A, 0x00, 0x01, 0xEF, + 0x01, 0xFF, 0x01, 0x30, 0x04, 0x00, 0x01, 0x0B, 0x01, 0xFF, 0x01, 0xF2, + 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xA0, 0x04, 0x00, 0x01, 0x2F, + 0x01, 0xFF, 0x01, 0xD0, 0x0A, 0x00, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xF4, + 0x04, 0x00, 0x01, 0xCF, 0x01, 0xFF, 0x01, 0x70, 0x0A, 0x00, 0x01, 0xEF, + 0x02, 0xFF, 0x01, 0x40, 0x02, 0x00, 0x01, 0x1B, 0x01, 0xFF, 0x01, 0xFE, + 0x01, 0x10, 0x0A, 0x00, 0x01, 0xEF, 0x02, 0xFF, 0x01, 0xFB, 0x01, 0x64, + 0x01, 0x58, 0x01, 0xEF, 0x01, 0xFF, 0x01, 0xF5, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0xAF, 0x05, 0xFF, 0x01, 0x70, 0x0B, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0x08, 0x04, 0xFF, 0x01, 0xE4, 0x0C, 0x00, 0x01, 0xEF, + 0x01, 0xF9, 0x01, 0x00, 0x01, 0x28, 0x01, 0xCE, 0x01, 0xED, 0x01, 0xA5, + 0x0D, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, + 0x12, 0x00, 0x01, 0xEF, 0x01, 0xF9, 0x12, 0x00, 0x01, 0xDE, 0x01, 0xE8, + 0x25, 0x00, +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.cpp diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.png b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.png similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.png rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.png diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.svg b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.svg similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.svg rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/cyrillic_char_set_bitmap_31.svg diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.pbm b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.pbm similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.pbm rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.pbm diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.png b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.png similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.png rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/romfont_31.png diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.png b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.png similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.png rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.png diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.svg b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.svg similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.svg rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_bitmaps/western_char_set_bitmap_31.svg diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.cpp diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/font_size_t.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.cpp diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/standard_char_set.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp similarity index 87% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp index 39b8759204e9..ca25dea3ca9d 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp @@ -44,7 +44,7 @@ return false; } - bool FTDI::has_utf8_chars(progmem_str _str) { + bool FTDI::has_utf8_chars(FSTR_P _str) { const char *str = (const char *) _str; for (;;) { const char c = pgm_read_byte(str++); @@ -66,17 +66,19 @@ * character (this is not the unicode codepoint) */ - utf8_char_t FTDI::get_utf8_char_and_inc(const char *&c) { + utf8_char_t FTDI::get_utf8_char_and_inc(char *&c) { utf8_char_t val = *(uint8_t*)c++; - while ((*c & 0xC0) == 0x80) - val = (val << 8) | *(uint8_t*)c++; + if ((val & 0xC0) == 0xC0) + while ((*c & 0xC0) == 0x80) + val = (val << 8) | *(uint8_t*)c++; return val; } utf8_char_t FTDI::get_utf8_char_and_inc(char *&c) { utf8_char_t val = *(uint8_t*)c++; - while ((*c & 0xC0) == 0x80) - val = (val << 8) | *(uint8_t*)c++; + if ((val & 0xC0) == 0xC0) + while ((*c & 0xC0) == 0x80) + val = (val << 8) | *(uint8_t*)c++; return val; } @@ -95,9 +97,9 @@ * fs - A scaling object used to specify the font size. */ - static uint16_t render_utf8_text(CommandProcessor* cmd, int x, int y, const char *str, font_size_t fs) { + static uint16_t render_utf8_text(CommandProcessor* cmd, int x, int y, const char *str, font_size_t fs, size_t maxlen=SIZE_MAX) { const int start_x = x; - while (*str) { + while (*str && maxlen--) { const utf8_char_t c = get_utf8_char_and_inc(str); #ifdef TOUCH_UI_UTF8_CYRILLIC_CHARSET CyrillicCharSet::render_glyph(cmd, x, y, fs, c) || @@ -138,6 +140,7 @@ */ void FTDI::load_utf8_bitmaps(CommandProcessor &cmd) { + cmd.cmd(SAVE_CONTEXT()); #ifdef TOUCH_UI_UTF8_CYRILLIC_CHARSET CyrillicCharSet::load_bitmaps(cmd); #endif @@ -145,6 +148,7 @@ WesternCharSet::load_bitmaps(cmd); #endif StandardCharSet::load_bitmaps(cmd); + cmd.cmd(RESTORE_CONTEXT()); } /** @@ -183,11 +187,11 @@ * Returns: A width in pixels */ - uint16_t FTDI::get_utf8_text_width(const char *str, font_size_t fs) { - return render_utf8_text(nullptr, 0, 0, str, fs); + uint16_t FTDI::get_utf8_text_width(const char *str, font_size_t fs, size_t maxlen) { + return render_utf8_text(nullptr, 0, 0, str, fs, maxlen); } - uint16_t FTDI::get_utf8_text_width(progmem_str pstr, font_size_t fs) { + uint16_t FTDI::get_utf8_text_width(FSTR_P pstr, font_size_t fs) { char str[strlen_P((const char*)pstr) + 1]; strcpy_P(str, (const char*)pstr); return get_utf8_text_width(str, fs); @@ -208,9 +212,10 @@ * * options - Text alignment options (i.e. OPT_CENTERX, OPT_CENTERY, OPT_CENTER or OPT_RIGHTX) * + * maxlen - Maximum characters to draw */ - void FTDI::draw_utf8_text(CommandProcessor& cmd, int x, int y, const char *str, font_size_t fs, uint16_t options) { + void FTDI::draw_utf8_text(CommandProcessor& cmd, int x, int y, const char *str, font_size_t fs, uint16_t options, size_t maxlen) { cmd.cmd(SAVE_CONTEXT()); cmd.cmd(BITMAP_TRANSFORM_A(fs.get_coefficient())); cmd.cmd(BITMAP_TRANSFORM_E(fs.get_coefficient())); @@ -218,18 +223,18 @@ // Apply alignment options if (options & OPT_CENTERX) - x -= get_utf8_text_width(str, fs) / 2; + x -= get_utf8_text_width(str, fs, maxlen) / 2; else if (options & OPT_RIGHTX) - x -= get_utf8_text_width(str, fs); + x -= get_utf8_text_width(str, fs, maxlen); if (options & OPT_CENTERY) y -= fs.get_height()/2; // Render the text - render_utf8_text(&cmd, x, y, str, fs); + render_utf8_text(&cmd, x, y, str, fs, maxlen); cmd.cmd(RESTORE_CONTEXT()); } - void FTDI::draw_utf8_text(CommandProcessor& cmd, int x, int y, progmem_str pstr, font_size_t fs, uint16_t options) { + void FTDI::draw_utf8_text(CommandProcessor& cmd, int x, int y, FSTR_P pstr, font_size_t fs, uint16_t options) { char str[strlen_P((const char*)pstr) + 1]; strcpy_P(str, (const char*)pstr); draw_utf8_text(cmd, x, y, (const char*) str, fs, options); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h similarity index 86% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h index 5bb87d96843c..7818957fcc2d 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.h @@ -40,7 +40,7 @@ namespace FTDI { /* Returns true if the string has UTF8 string characters */ - bool has_utf8_chars(progmem_str str); + bool has_utf8_chars(FSTR_P str); bool has_utf8_chars(const char *str); /* Returns the next character in a UTF8 string and increments the @@ -51,14 +51,14 @@ namespace FTDI { /* Returns the next character in a UTF8 string, without incrementing */ - inline utf8_char_t get_utf8_char(const char *c) {return get_utf8_char_and_inc(c);} + inline utf8_char_t get_utf8_char(const char *c) { return get_utf8_char_and_inc(c); } void load_utf8_data(uint32_t addr); #else typedef char utf8_char_t; - inline utf8_char_t get_utf8_char_and_inc(const char *&c) {return *c++;} - inline utf8_char_t get_utf8_char(const char *c) {return *c;} + inline utf8_char_t get_utf8_char_and_inc(const char *&c) { return *c++; } + inline utf8_char_t get_utf8_char(const char *c) { return *c; } inline void load_utf8_data(uint32_t) {} #endif @@ -66,11 +66,11 @@ namespace FTDI { void load_utf8_bitmaps(CommandProcessor& cmd); uint16_t get_utf8_char_width(utf8_char_t, font_size_t); - uint16_t get_utf8_text_width(progmem_str, font_size_t); - uint16_t get_utf8_text_width(const char *, font_size_t); + uint16_t get_utf8_text_width(FSTR_P, font_size_t); + uint16_t get_utf8_text_width(const char *, font_size_t, size_t maxlen=SIZE_MAX); - void draw_utf8_text(CommandProcessor&, int x, int y, progmem_str, font_size_t, uint16_t options = 0); - void draw_utf8_text(CommandProcessor&, int x, int y, const char *, font_size_t, uint16_t options = 0); + void draw_utf8_text(CommandProcessor&, int x, int y, FSTR_P, font_size_t, uint16_t options = 0); + void draw_utf8_text(CommandProcessor&, int x, int y, const char *, font_size_t, uint16_t options = 0, size_t maxlen=SIZE_MAX); // Similar to CLCD::FontMetrics, but can be used with UTF8 encoded strings. diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.cpp similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.cpp diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set_bitmap_31.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set_bitmap_31.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set_bitmap_31.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/western_char_set_bitmap_31.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/ftdi_eve_lib.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/ftdi_eve_lib.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/ftdi_eve_lib.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/ftdi_eve_lib.h diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py new file mode 100755 index 000000000000..6aa8947b9858 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/file2cpp.py @@ -0,0 +1,47 @@ +#!/usr/bin/python + +# Written By Marcio Teixeira 2021 - SynDaver Labs, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# To view a copy of the GNU General Public License, go to the following +# location: . + +from __future__ import print_function +import argparse +import textwrap +import os +import zlib + +def deflate(data): + return zlib.compress(data) + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Converts a file into a packed C array for use as data') + parser.add_argument("input") + parser.add_argument("-d", "--deflate", action="store_true", help="Packs the data using the deflate algorithm") + args = parser.parse_args() + + varname = os.path.splitext(os.path.basename(args.input))[0]; + + with open(args.input, "rb") as in_file: + data = in_file.read() + if args.deflate: + data = deflate(data) + data = bytearray(data) + data = list(map(lambda a: "0x" + format(a, '02x'), data)) + nElements = len(data) + data = ', '.join(data) + data = textwrap.fill(data, 75, initial_indent = ' ', subsequent_indent = ' ') + + print("const unsigned char " + varname + "[" + format(nElements) + "] PROGMEM = {") + print(data) + print("};") diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/bitmap2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py old mode 100644 new mode 100755 similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/bitmap2cpp.py rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/font2cpp.py diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py new file mode 100755 index 000000000000..74be57430049 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/img2cpp.py @@ -0,0 +1,113 @@ +#!/usr/bin/python + +# Written By Marcio Teixeira 2021 - SynDaver Labs, Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# To view a copy of the GNU General Public License, go to the following +# location: . + +from __future__ import print_function +from PIL import Image +import argparse +import textwrap +import os +import sys +import zlib + +class WriteSource: + def __init__(self, mode): + self.values = [] + self.mode = mode + self.offset = 8 + self.byte = 0 + + def finish_byte(self): + if self.offset != 8: + self.values.append(self.byte) + self.offset = 8 + self.byte = 0 + + def add_bits_to_byte(self, value, size = 1): + self.offset -= size + self.byte = self.byte | value << self.offset + if self.offset == 0: + self.finish_byte() + + def append_rgb565(self, color): + value = ((color[0] & 0xF8) << 8) + ((color[1] & 0xFC) << 3) + ((color[2] & 0xF8) >> 3) + self.values.append((value & 0x00FF) >> 0); + self.values.append((value & 0xFF00) >> 8); + + def append_rgb332(self, color): + value = (color[0] & 0xE0) + ((color[1] & 0xE0) >> 3) + ((color[2] & 0xC0) >> 6) + self.values.append(value); + + def append_grayscale(self, color, bits): + luminance = int(0.2126 * color[0] + 0.7152 * color[1] + 0.0722 * color[2]) + self.add_bits_to_byte(luminance >> (8 - bits), bits) + + def deflate(self, data): + return zlib.compress(data) + + def add_pixel(self, color): + if self.mode == "l1": + self.append_grayscale(color, 1) + elif self.mode == "l2": + self.append_grayscale(color, 2) + elif self.mode == "l4": + self.append_grayscale(color, 4) + elif self.mode == "l8": + self.append_grayscale(color, 8) + elif self.mode == "rgb565": + self.append_rgb565(color) + elif self.mode == "rgb332": + self.append_rgb332(color) + + def end_row(self, y): + if self.mode in ["l1", "l2", "l3"]: + self.finish_byte() + + def write(self, varname, deflate): + print("Length of uncompressed data: ", len(self.values), file=sys.stderr) + data = bytes(bytearray(self.values)) + if deflate: + data = self.deflate(data) + print("Length of data after compression: ", len(data), file=sys.stderr) + data = bytearray(data) + data = list(map(lambda a: "0x" + format(a, '02x'), data)) + nElements = len(data) + data = ', '.join(data) + data = textwrap.fill(data, 75, initial_indent = ' ', subsequent_indent = ' ') + + print("const unsigned char " + varname + "[" + format(nElements) + "] PROGMEM = {") + print(data) + print("};") + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Converts a bitmap into a C array') + parser.add_argument("input") + parser.add_argument("-d", "--deflate", action="store_true", help="Packs the data using the deflate algorithm") + parser.add_argument("-m", "--mode", default="l1", help="Mode, can be l1, l2, l4, l8, rgb332 or rgb565") + args = parser.parse_args() + + varname = os.path.splitext(os.path.basename(args.input))[0]; + + writer = WriteSource(args.mode) + + img = Image.open(args.input) + print("Image height: ", img.height, file=sys.stderr) + print("Image width: ", img.width, file=sys.stderr) + for y in range(img.height): + for x in range(img.width): + writer.add_pixel(img.getpixel((x,y))) + writer.end_row(y) + writer.write(varname, args.deflate) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/svg2cpp.py b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py similarity index 98% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/svg2cpp.py rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py index c6eba3946c63..cfc262545356 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/svg2cpp.py +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/scripts/svg2cpp.py @@ -16,7 +16,7 @@ # location: . from __future__ import print_function -import argparse, re, sys +import argparse,re,sys usage = ''' This program extracts line segments from a SVG file and writes @@ -164,7 +164,7 @@ def process_svg_path_L_or_M(self, cmd, x, y): def process_svg_path_data_cmd(self, id, cmd, a, b): """Converts the various types of moves into L or M commands - and dispatches to process_svg_path_L_or_M for futher processing.""" + and dispatches to process_svg_path_L_or_M for further processing.""" if cmd == "Z" or cmd == "z": self.process_svg_path_L_or_M("L", self.initial_x, self.initial_y) elif cmd == "H": diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp similarity index 78% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp index 952f0cac0235..6cb85e47c49c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/about_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.cpp @@ -21,13 +21,12 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_ABOUT_SCREEN #define GRID_COLS 4 -#define GRID_ROWS 7 +#define GRID_ROWS 8 using namespace FTDI; using namespace Theme; @@ -45,15 +44,12 @@ void AboutScreen::onRedraw(draw_mode_t) { .cmd(COLOR_RGB(bg_text_enabled)) .tag(0); - #define HEADING_POS BTN_POS(1,2), BTN_SIZE(4,1) + #define HEADING_POS BTN_POS(1,1), BTN_SIZE(4,2) #define FW_VERS_POS BTN_POS(1,3), BTN_SIZE(4,1) #define FW_INFO_POS BTN_POS(1,4), BTN_SIZE(4,1) - #define LICENSE_POS BTN_POS(1,5), BTN_SIZE(4,2) - #define STATS_POS BTN_POS(1,7), BTN_SIZE(2,1) - #define BACK_POS BTN_POS(3,7), BTN_SIZE(2,1) - - #define _INSET_POS(x,y,w,h) x + w/10, y, w - w/5, h - #define INSET_POS(pos) _INSET_POS(pos) + #define LICENSE_POS BTN_POS(1,5), BTN_SIZE(4,3) + #define STATS_POS BTN_POS(1,8), BTN_SIZE(2,1) + #define BACK_POS BTN_POS(3,8), BTN_SIZE(2,1) char about_str[1 + strlen_P(GET_TEXT(MSG_ABOUT_TOUCH_PANEL_2)) @@ -80,32 +76,36 @@ void AboutScreen::onRedraw(draw_mode_t) { #endif , OPT_CENTER, font_xlarge ); - cmd.tag(3); + #if BOTH(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) + cmd.tag(3); + #endif draw_text_box(cmd, FW_VERS_POS, #ifdef TOUCH_UI_VERSION F(TOUCH_UI_VERSION) #else - progmem_str(getFirmwareName_str()) + FPSTR(getFirmwareName_str()) #endif , OPT_CENTER, font_medium); cmd.tag(0); draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium); - draw_text_box(cmd, INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny); + draw_text_box(cmd, LICENSE_POS, GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny); - cmd.font(font_medium) - .colors(normal_btn) - .tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU)) - .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + cmd.font(font_medium); + #if BOTH(PRINTCOUNTER, FTDI_STATISTICS_SCREEN) + cmd.colors(normal_btn) + .tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU)); + #endif + cmd.colors(action_btn) + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } bool AboutScreen::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); break; - #if ENABLED(PRINTCOUNTER) + #if BOTH(PRINTCOUNTER, FTDI_STATISTICS_SCREEN) case 2: GOTO_SCREEN(StatisticsScreen); break; #endif - #if ENABLED(TOUCH_UI_DEVELOPER_MENU) + #if BOTH(TOUCH_UI_DEVELOPER_MENU, FTDI_DEVELOPER_MENU) case 3: GOTO_SCREEN(DeveloperMenu); break; #endif default: return false; @@ -113,4 +113,4 @@ bool AboutScreen::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_ABOUT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.h new file mode 100644 index 000000000000..b9d94f08b3cf --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/about_screen.h @@ -0,0 +1,33 @@ +/****************** + * about_screen.h * + ******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_ABOUT_SCREEN +#define FTDI_ABOUT_SCREEN_CLASS AboutScreen + +class AboutScreen : public BaseScreen, public UncachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp index 9036fc144b4c..a83cc075156c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/advanced_settings_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" +#ifdef FTDI_ADVANCED_SETTINGS_MENU using namespace FTDI; using namespace ExtUI; @@ -112,7 +111,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) { .enabled(ENABLED(BACKLASH_GCODE)) .tag(8).button(BACKLASH_POS, GET_TEXT_F(MSG_BACKLASH)) .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } @@ -123,7 +122,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { case 2: GOTO_SCREEN(ZOffsetScreen); break; #endif case 3: GOTO_SCREEN(StepsScreen); break; - #if ENABLED(HAS_MULTI_HOTEND) + #if HAS_MULTI_HOTEND case 4: GOTO_SCREEN(NozzleOffsetScreen); break; #endif case 5: GOTO_SCREEN(MaxVelocityScreen); break; @@ -153,4 +152,4 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && !TOUCH_UI_LULZBOT_BIO +#endif // FTDI_ADVANCED_SETTINGS_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.h new file mode 100644 index 000000000000..a7e34fe6fe6e --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.h @@ -0,0 +1,32 @@ +/*************************** + * advance_settings_menu.h * + ***************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_ADVANCED_SETTINGS_MENU +#define FTDI_ADVANCED_SETTINGS_MENU_CLASS AdvancedSettingsMenu + +class AdvancedSettingsMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/alert_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.cpp similarity index 80% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/alert_dialog_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.cpp index d63119afe547..86b4eb175a6a 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/alert_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.cpp @@ -21,18 +21,19 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) +#ifdef FTDI_ALERT_DIALOG_BOX -#include "screens.h" -#include "screen_data.h" +constexpr static AlertDialogBoxData &mydata = screen_data.AlertDialogBox; using namespace FTDI; using namespace Theme; void AlertDialogBox::onEntry() { BaseScreen::onEntry(); - sound.play(screen_data.AlertDialog.isError ? sad_trombone : twinkle, PLAY_ASYNCHRONOUS); + sound.play(mydata.isError ? sad_trombone : twinkle, PLAY_ASYNCHRONOUS); } void AlertDialogBox::onRedraw(draw_mode_t what) { @@ -42,18 +43,18 @@ void AlertDialogBox::onRedraw(draw_mode_t what) { } template -void AlertDialogBox::show(const T message) { +void AlertDialogBox::show(T message) { drawMessage(message); storeBackground(); - screen_data.AlertDialog.isError = false; + mydata.isError = false; GOTO_SCREEN(AlertDialogBox); } template -void AlertDialogBox::showError(const T message) { +void AlertDialogBox::showError(T message) { drawMessage(message); storeBackground(); - screen_data.AlertDialog.isError = true; + mydata.isError = true; GOTO_SCREEN(AlertDialogBox); } @@ -63,8 +64,8 @@ void AlertDialogBox::hide() { } template void AlertDialogBox::show(const char *); -template void AlertDialogBox::show(const progmem_str); +template void AlertDialogBox::show(FSTR_P); template void AlertDialogBox::showError(const char *); -template void AlertDialogBox::showError(const progmem_str); +template void AlertDialogBox::showError(FSTR_P); -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_ALERT_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.h new file mode 100644 index 000000000000..0186acf7a088 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/alert_dialog_box.h @@ -0,0 +1,39 @@ +/********************** + * alert_dialog_box.h * + **********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_ALERT_DIALOG_BOX +#define FTDI_ALERT_DIALOG_BOX_CLASS AlertDialogBox + +struct AlertDialogBoxData { + bool isError; +}; + +class AlertDialogBox : public DialogBoxBaseClass, public CachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + template static void show(T); + template static void showError(T); + static void hide(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/backlash_compensation_screen.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/backlash_compensation_screen.cpp index 58f4544ffc5b..c3fcb25f4385 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/backlash_compensation_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/backlash_compensation_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, BACKLASH_GCODE) - -#include "screens.h" +#ifdef FTDI_BACKLASH_COMP_SCREEN using namespace FTDI; using namespace ExtUI; @@ -73,4 +72,4 @@ bool BacklashCompensationScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_BACKLASH_COMP_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/backlash_compensation_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/backlash_compensation_screen.h new file mode 100644 index 000000000000..b9e46eb27f38 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/backlash_compensation_screen.h @@ -0,0 +1,32 @@ +/********************************** + * backlash_compensation_screen.h * + **********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BACKLASH_COMP_SCREEN +#define FTDI_BACKLASH_COMP_SCREEN_CLASS BacklashCompensationScreen + +class BacklashCompensationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.cpp similarity index 88% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.cpp index 5271df3022c7..4415ed50fcee 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_numeric_adjustment_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.cpp @@ -21,15 +21,16 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_BASE_NUMERIC_ADJ_SCREEN using namespace FTDI; using namespace Theme; +constexpr static BaseNumericAdjustmentScreenData &mydata = screen_data.BaseNumericAdjustmentScreen; + #if ENABLED(TOUCH_UI_PORTRAIT) #define GRID_COLS 13 #define GRID_ROWS 10 @@ -50,6 +51,8 @@ BaseNumericAdjustmentScreen::widgets_t::widgets_t(draw_mode_t what) : _what(what .cmd(COLOR_RGB(bg_text_enabled)) .tag(0); } + else + cmd.colors(normal_btn); cmd.font(font_medium); _button(cmd, 1, @@ -58,7 +61,7 @@ BaseNumericAdjustmentScreen::widgets_t::widgets_t(draw_mode_t what) : _what(what #else BTN_POS(15,7), BTN_SIZE(4,1), #endif - GET_TEXT_F(MSG_BACK), true, true + GET_TEXT_F(MSG_BUTTON_DONE), true, true ); _line = 1; @@ -106,7 +109,7 @@ void BaseNumericAdjustmentScreen::widgets_t::_button_style(CommandProcessor &cmd * Speed optimization for drawing buttons. Draw all unpressed buttons in the * background layer and draw only the pressed button in the foreground layer. */ -void BaseNumericAdjustmentScreen::widgets_t::_button(CommandProcessor &cmd, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, progmem_str text, bool enabled, bool highlight) { +void BaseNumericAdjustmentScreen::widgets_t::_button(CommandProcessor &cmd, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, FSTR_P text, bool enabled, bool highlight) { if (_what & BACKGROUND) enabled = true; if ((_what & BACKGROUND) || buttonIsPressed(tag) || highlight || !enabled) { _button_style(cmd, (!enabled) ? BTN_DISABLED : (highlight ? BTN_ACTION : BTN_NORMAL)); @@ -116,13 +119,13 @@ void BaseNumericAdjustmentScreen::widgets_t::_button(CommandProcessor &cmd, uint BaseNumericAdjustmentScreen::widgets_t &BaseNumericAdjustmentScreen::widgets_t::precision(uint8_t decimals, precision_default_t initial) { _decimals = decimals; - if (screen_data.BaseNumericAdjustment.increment == 0) { - screen_data.BaseNumericAdjustment.increment = 243 + (initial - DEFAULT_LOWEST) - _decimals; + if (mydata.increment == 0) { + mydata.increment = 243 + (initial - DEFAULT_LOWEST) - _decimals; } return *this; } -void BaseNumericAdjustmentScreen::widgets_t::heading(progmem_str label) { +void BaseNumericAdjustmentScreen::widgets_t::heading(FSTR_P label) { if (_what & BACKGROUND) { CommandProcessor cmd; _button_style(cmd, TEXT_LABEL); @@ -154,7 +157,7 @@ void BaseNumericAdjustmentScreen::widgets_t::heading(progmem_str label) { void BaseNumericAdjustmentScreen::widgets_t::_draw_increment_btn(CommandProcessor &cmd, uint8_t, const uint8_t tag) { const char *label = PSTR("?"); uint8_t pos; - uint8_t & increment = screen_data.BaseNumericAdjustment.increment; + uint8_t & increment = mydata.increment; if (increment == 0) { increment = tag; // Set the default value to be the first. @@ -173,13 +176,13 @@ void BaseNumericAdjustmentScreen::widgets_t::_draw_increment_btn(CommandProcesso switch (pos) { #if ENABLED(TOUCH_UI_PORTRAIT) - case 0: _button(cmd, tag, BTN_POS(5,_line), BTN_SIZE(2,1), progmem_str(label), true, highlight); break; - case 1: _button(cmd, tag, BTN_POS(7,_line), BTN_SIZE(2,1), progmem_str(label), true, highlight); break; - case 2: _button(cmd, tag, BTN_POS(9,_line), BTN_SIZE(2,1), progmem_str(label), true, highlight); break; + case 0: _button(cmd, tag, BTN_POS(5,_line), BTN_SIZE(2,1), FPSTR(label), true, highlight); break; + case 1: _button(cmd, tag, BTN_POS(7,_line), BTN_SIZE(2,1), FPSTR(label), true, highlight); break; + case 2: _button(cmd, tag, BTN_POS(9,_line), BTN_SIZE(2,1), FPSTR(label), true, highlight); break; #else - case 0: _button(cmd, tag, BTN_POS(15,2), BTN_SIZE(4,1), progmem_str(label), true, highlight); break; - case 1: _button(cmd, tag, BTN_POS(15,3), BTN_SIZE(4,1), progmem_str(label), true, highlight); break; - case 2: _button(cmd, tag, BTN_POS(15,4), BTN_SIZE(4,1), progmem_str(label), true, highlight); break; + case 0: _button(cmd, tag, BTN_POS(15,2), BTN_SIZE(4,1), FPSTR(label), true, highlight); break; + case 1: _button(cmd, tag, BTN_POS(15,3), BTN_SIZE(4,1), FPSTR(label), true, highlight); break; + case 2: _button(cmd, tag, BTN_POS(15,4), BTN_SIZE(4,1), FPSTR(label), true, highlight); break; #endif } } @@ -210,7 +213,7 @@ void BaseNumericAdjustmentScreen::widgets_t::increments() { #endif } -void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, progmem_str label, const char *value, bool is_enabled) { +void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, FSTR_P label, const char *value, bool is_enabled) { CommandProcessor cmd; if (_what & BACKGROUND) { @@ -236,7 +239,7 @@ void BaseNumericAdjustmentScreen::widgets_t::adjuster_sram_val(uint8_t tag, prog _line++; } -void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str label, const char *value, bool is_enabled) { +void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, FSTR_P label, const char *value, bool is_enabled) { if (_what & BACKGROUND) { adjuster_sram_val(tag, label, nullptr); } @@ -248,7 +251,7 @@ void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str l } } -void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str label, float value, bool is_enabled) { +void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, FSTR_P label, float value, bool is_enabled) { if (_what & BACKGROUND) { adjuster_sram_val(tag, label, nullptr); } @@ -262,7 +265,7 @@ void BaseNumericAdjustmentScreen::widgets_t::adjuster(uint8_t tag, progmem_str l } } -void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, progmem_str label, bool is_enabled) { +void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, FSTR_P label, bool is_enabled) { CommandProcessor cmd; cmd.font(LAYOUT_FONT); _button(cmd, tag, BTN_POS(5,_line), BTN_SIZE(9,1), label, is_enabled); @@ -270,7 +273,7 @@ void BaseNumericAdjustmentScreen::widgets_t::button(uint8_t tag, progmem_str lab _line++; } -void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, progmem_str label, const char *value, bool is_enabled) { +void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, FSTR_P label, const char *value, bool is_enabled) { CommandProcessor cmd; if (_what & BACKGROUND) { @@ -292,7 +295,7 @@ void BaseNumericAdjustmentScreen::widgets_t::text_field(uint8_t tag, progmem_str _line++; } -void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, progmem_str label1, uint8_t tag2, progmem_str label2, bool is_enabled) { +void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, FSTR_P label1, uint8_t tag2, FSTR_P label2, bool is_enabled) { CommandProcessor cmd; cmd.font(LAYOUT_FONT); _button(cmd, tag1, BTN_POS(5,_line), BTN_SIZE(4.5,1), label1, is_enabled); @@ -301,7 +304,7 @@ void BaseNumericAdjustmentScreen::widgets_t::two_buttons(uint8_t tag1, progmem_s _line++; } -void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, progmem_str label, bool value, bool is_enabled) { +void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, FSTR_P label, bool value, bool is_enabled) { CommandProcessor cmd; if (_what & BACKGROUND) { @@ -318,7 +321,7 @@ void BaseNumericAdjustmentScreen::widgets_t::toggle(uint8_t tag, progmem_str lab } if (_what & FOREGROUND) { - _button_style(cmd, BTN_TOGGLE); + _button_style(cmd, is_enabled ? BTN_TOGGLE : BTN_DISABLED); cmd.tag(is_enabled ? tag : 0) .enabled(is_enabled) .font(font_small) @@ -358,7 +361,7 @@ void BaseNumericAdjustmentScreen::widgets_t::home_buttons(uint8_t tag) { } void BaseNumericAdjustmentScreen::onEntry() { - screen_data.BaseNumericAdjustment.increment = 0; // This will force the increment to be picked while drawing. + mydata.increment = 0; // This will force the increment to be picked while drawing. BaseScreen::onEntry(); CommandProcessor cmd; cmd.set_button_style_callback(nullptr); @@ -367,14 +370,14 @@ void BaseNumericAdjustmentScreen::onEntry() { bool BaseNumericAdjustmentScreen::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); return true; - case 240 ... 245: screen_data.BaseNumericAdjustment.increment = tag; break; + case 240 ... 245: mydata.increment = tag; break; default: return current_screen.onTouchHeld(tag); } return true; } float BaseNumericAdjustmentScreen::getIncrement() { - switch (screen_data.BaseNumericAdjustment.increment) { + switch (mydata.increment) { case 240: return 0.001; case 241: return 0.01; case 242: return 0.1; @@ -385,4 +388,4 @@ float BaseNumericAdjustmentScreen::getIncrement() { } } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_BASE_NUMERIC_ADJ_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.h new file mode 100644 index 000000000000..fc0ef951bdc4 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_numeric_adjustment_screen.h @@ -0,0 +1,87 @@ +/************************************ + * base_numeric_adjustment_screen.h * + ************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BASE_NUMERIC_ADJ_SCREEN +#define FTDI_BASE_NUMERIC_ADJ_SCREEN_CLASS BaseNumericAdjustmentScreen + +struct BaseNumericAdjustmentScreenData { + uint8_t increment; +}; + +class BaseNumericAdjustmentScreen : public BaseScreen { + public: + enum precision_default_t { + DEFAULT_LOWEST, + DEFAULT_MIDRANGE, + DEFAULT_HIGHEST + }; + + protected: + class widgets_t { + private: + draw_mode_t _what; + uint8_t _line; + uint32_t _color; + uint8_t _decimals; + FSTR_P _units; + enum style_t { + BTN_NORMAL, + BTN_ACTION, + BTN_TOGGLE, + BTN_DISABLED, + TEXT_AREA, + TEXT_LABEL + } _style; + + protected: + void _draw_increment_btn(CommandProcessor &, uint8_t line, const uint8_t tag); + void _button(CommandProcessor &, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, FSTR_P, bool enabled = true, bool highlight = false); + void _button_style(CommandProcessor &cmd, style_t style); + public: + widgets_t(draw_mode_t); + + widgets_t &color(uint32_t color) {_color = color; return *this;} + widgets_t &units(FSTR_P units) {_units = units; return *this;} + widgets_t &draw_mode(draw_mode_t what) {_what = what; return *this;} + widgets_t &precision(uint8_t decimals, precision_default_t = DEFAULT_HIGHEST); + + void heading (FSTR_P label); + void adjuster_sram_val (uint8_t tag, FSTR_P label, const char *value, bool is_enabled = true); + void adjuster (uint8_t tag, FSTR_P label, const char *value, bool is_enabled = true); + void adjuster (uint8_t tag, FSTR_P label, float value=0, bool is_enabled = true); + void button (uint8_t tag, FSTR_P label, bool is_enabled = true); + void text_field (uint8_t tag, FSTR_P label, const char *value, bool is_enabled = true); + void two_buttons (uint8_t tag1, FSTR_P label1, + uint8_t tag2, FSTR_P label2, bool is_enabled = true); + void toggle (uint8_t tag, FSTR_P label, bool value, bool is_enabled = true); + void home_buttons (uint8_t tag); + void increments (); + }; + + static float getIncrement(); + + public: + static void onEntry(); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_screen.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_screen.cpp index 16b26e68214d..0a8bebea3c9d 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/base_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_BASE_SCREEN using namespace FTDI; using namespace Theme; @@ -46,7 +45,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t return false; } - #if LCD_TIMEOUT_TO_STATUS > 0 + #if SCREENS_CAN_TIME_OUT if (EventLoop::get_pressed_tag() != 0) { reset_menu_timeout(); } @@ -66,7 +65,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t } void BaseScreen::onIdle() { - #if LCD_TIMEOUT_TO_STATUS > 0 + #if SCREENS_CAN_TIME_OUT if ((millis() - last_interaction) > LCD_TIMEOUT_TO_STATUS) { reset_menu_timeout(); #if ENABLED(TOUCH_UI_DEBUG) @@ -78,13 +77,11 @@ void BaseScreen::onIdle() { } void BaseScreen::reset_menu_timeout() { - #if LCD_TIMEOUT_TO_STATUS > 0 - last_interaction = millis(); - #endif + TERN_(SCREENS_CAN_TIME_OUT, last_interaction = millis()); } -#if LCD_TIMEOUT_TO_STATUS > 0 +#if SCREENS_CAN_TIME_OUT uint32_t BaseScreen::last_interaction; #endif -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_BASE_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_screen.h new file mode 100644 index 000000000000..030fa51a2aaf --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/base_screen.h @@ -0,0 +1,43 @@ +/***************** + * base_screen.h * + *****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BASE_SCREEN +#define FTDI_BASE_SCREEN_CLASS BaseScreen + +class BaseScreen : public UIScreen { + protected: + #if SCREENS_CAN_TIME_OUT + static uint32_t last_interaction; + #endif + + static bool buttonIsPressed(uint8_t tag); + + public: + static bool buttonStyleCallback(CommandProcessor &, uint8_t, uint8_t &, uint16_t &, bool); + + static void reset_menu_timeout(); + + static void onEntry(); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_base.cpp similarity index 54% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_base.cpp index 9fb2b2002564..14f219645337 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_base.cpp @@ -1,6 +1,6 @@ -/*********************** - * bed_mesh_screen.cpp * - ***********************/ +/********************* + * bed_mesh_base.cpp * + *********************/ /**************************************************************************** * Written By Marcio Teixeira 2020 * @@ -20,43 +20,19 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, HAS_MESH) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_BED_MESH_BASE using namespace FTDI; -using namespace Theme; -using namespace ExtUI; - -#if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_COLS 2 - #define GRID_ROWS 10 - - #define MESH_POS BTN_POS(1, 2), BTN_SIZE(2,5) - #define MESSAGE_POS BTN_POS(1, 7), BTN_SIZE(2,1) - #define Z_LABEL_POS BTN_POS(1, 8), BTN_SIZE(1,1) - #define Z_VALUE_POS BTN_POS(2, 8), BTN_SIZE(1,1) - #define OKAY_POS BTN_POS(1,10), BTN_SIZE(2,1) -#else - #define GRID_COLS 5 - #define GRID_ROWS 5 - - #define MESH_POS BTN_POS(1,1), BTN_SIZE(3,5) - #define MESSAGE_POS BTN_POS(4,1), BTN_SIZE(2,1) - #define Z_LABEL_POS BTN_POS(4,2), BTN_SIZE(2,1) - #define Z_VALUE_POS BTN_POS(4,3), BTN_SIZE(2,1) - #define OKAY_POS BTN_POS(4,5), BTN_SIZE(2,1) -#endif -void BedMeshScreen::drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI::bed_mesh_t data, uint8_t opts, float autoscale_max) { - constexpr uint8_t rows = GRID_MAX_POINTS_Y; - constexpr uint8_t cols = GRID_MAX_POINTS_X; +void BedMeshBase::_drawMesh(CommandProcessor &cmd, int16_t x, int16_t y, int16_t w, int16_t h, uint8_t opts, float autoscale_max, uint8_t highlightedTag, mesh_getter_ptr func, void *data) { + constexpr uint8_t rows = GRID_MAX_POINTS_Y; + constexpr uint8_t cols = GRID_MAX_POINTS_X; - #define VALUE(X,Y) (data ? data[X][Y] : 0) - #define ISVAL(X,Y) (data ? !isnan(VALUE(X,Y)) : true) - #define HEIGHT(X,Y) (ISVAL(X,Y) ? (VALUE(X,Y) - val_min) * scale_z : 0) + #define VALUE(X,Y) (func ? func(X,Y,data) : 0) + #define ISVAL(X,Y) (func ? !isnan(VALUE(X,Y)) : true) + #define HEIGHT(X,Y) (ISVAL(X,Y) ? (VALUE(X,Y) - val_min) * scale_z : 0) // Compute the mean, min and max for the points @@ -65,7 +41,7 @@ void BedMeshScreen::drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI:: float val_min = INFINITY; uint8_t val_cnt = 0; - if (data && (opts & USE_AUTOSCALE)) { + if (opts & USE_AUTOSCALE) { for (uint8_t y = 0; y < rows; y++) { for (uint8_t x = 0; x < cols; x++) { if (ISVAL(x,y)) { @@ -138,7 +114,6 @@ void BedMeshScreen::drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI:: const uint16_t basePointSize = min(w,h) / max(cols,rows); - CommandProcessor cmd; cmd.cmd(SAVE_CONTEXT()) .cmd(TAG_MASK(false)) .cmd(SAVE_CONTEXT()); @@ -165,10 +140,19 @@ void BedMeshScreen::drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI:: for (uint8_t x = 0; x < cols; x++) { if (ISVAL(x,y)) { if (opts & USE_COLORS) { - const float val_dev = VALUE(x, y) - val_mean; - const uint8_t neg_byte = sq(val_dev) / (val_dev < 0 ? sq_min : sq_max) * 0xFF; - const uint8_t pos_byte = 255 - neg_byte; - cmd.cmd(COLOR_RGB(pos_byte, pos_byte, 0xFF)); + const float val_dev = sq(VALUE(x, y) - val_mean); + float r = 0, b = 0; + if (sq_min != sq_max) { + if (VALUE(x, y) < 0) + r = val_dev / sq_min; + else + b = val_dev / sq_max; + } + #ifdef BED_MESH_POINTS_GRAY + cmd.cmd(COLOR_RGB((1.0f - b + r) * 0x7F, (1.0f - b - r) * 0x7F, (1.0f - r + b) * 0x7F)); + #else + cmd.cmd(COLOR_RGB((1.0f - b) * 0xFF, (1.0f - b - r) * 0xFF, (1.0f - r) * 0xFF)); + #endif } cmd.cmd(VERTEX2F(TRANSFORM(x, y, HEIGHT(x, y)))); } @@ -196,146 +180,45 @@ void BedMeshScreen::drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI:: } if (opts & USE_HIGHLIGHT) { - const uint8_t tag = screen_data.BedMesh.highlightedTag; - uint8_t x, y; - if (tagToPoint(tag, x, y)) { + const uint8_t tag = highlightedTag; + xy_uint8_t pt; + if (tagToPoint(tag, pt)) { cmd.cmd(COLOR_A(128)) .cmd(POINT_SIZE(basePointSize * 6)) .cmd(BEGIN(POINTS)) - .tag(tag).cmd(VERTEX2F(TRANSFORM(x, y, HEIGHT(x, y)))); + .tag(tag).cmd(VERTEX2F(TRANSFORM(pt.x, pt.y, HEIGHT(pt.x, pt.y)))); } } cmd.cmd(END()); cmd.cmd(RESTORE_CONTEXT()); } -uint8_t BedMeshScreen::pointToTag(uint8_t x, uint8_t y) { - return y * (GRID_MAX_POINTS_X) + x + 10; +uint8_t BedMeshBase::pointToTag(uint8_t x, uint8_t y) { + return x >= 0 && x < GRID_MAX_POINTS_X && y >= 0 && y < GRID_MAX_POINTS_Y ? y * (GRID_MAX_POINTS_X) + x + 10 : 0; } -bool BedMeshScreen::tagToPoint(uint8_t tag, uint8_t &x, uint8_t &y) { +bool BedMeshBase::tagToPoint(uint8_t tag, xy_uint8_t &pt) { if (tag < 10) return false; - x = (tag - 10) % (GRID_MAX_POINTS_X); - y = (tag - 10) / (GRID_MAX_POINTS_X); - return true; -} - -void BedMeshScreen::onEntry() { - screen_data.BedMesh.highlightedTag = 0; - screen_data.BedMesh.count = GRID_MAX_POINTS; - screen_data.BedMesh.message = screen_data.BedMesh.MSG_NONE; - BaseScreen::onEntry(); -} - -float BedMeshScreen::getHightlightedValue() { - if (screen_data.BedMesh.highlightedTag) { - xy_uint8_t pt; - tagToPoint(screen_data.BedMesh.highlightedTag, pt.x, pt.y); - return ExtUI::getMeshPoint(pt); - } - return NAN; -} - -void BedMeshScreen::drawHighlightedPointValue() { - char str[16]; - const float val = getHightlightedValue(); - const bool isGood = !isnan(val); - if (isGood) - dtostrf(val, 5, 3, str); - else - strcpy_P(str, PSTR("-")); - - CommandProcessor cmd; - cmd.font(Theme::font_medium) - .text(Z_LABEL_POS, GET_TEXT_F(MSG_MESH_EDIT_Z)) - .text(Z_VALUE_POS, str) - .colors(action_btn) - .tag(1).button(OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY)) - .tag(0); - - switch (screen_data.BedMesh.message) { - case screen_data.BedMesh.MSG_MESH_COMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break; - case screen_data.BedMesh.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break; - default: break; - } -} - -void BedMeshScreen::onRedraw(draw_mode_t what) { - #define _INSET_POS(x,y,w,h) x + min(w,h)/10, y + min(w,h)/10, w - min(w,h)/5, h - min(w,h)/5 - #define INSET_POS(pos) _INSET_POS(pos) - - if (what & BACKGROUND) { - CommandProcessor cmd; - cmd.cmd(CLEAR_COLOR_RGB(bg_color)) - .cmd(CLEAR(true,true,true)); - - // Draw the shadow and tags - cmd.cmd(COLOR_RGB(0x444444)); - BedMeshScreen::drawMesh(INSET_POS(MESH_POS), nullptr, USE_POINTS | USE_TAGS); - cmd.cmd(COLOR_RGB(bg_text_enabled)); - } - - if (what & FOREGROUND) { - constexpr float autoscale_max_amplitude = 0.03; - const bool gotAllPoints = screen_data.BedMesh.count >= GRID_MAX_POINTS; - if (gotAllPoints) { - drawHighlightedPointValue(); - } - const float levelingProgress = sq(float(screen_data.BedMesh.count) / GRID_MAX_POINTS); - BedMeshScreen::drawMesh(INSET_POS(MESH_POS), ExtUI::getMeshArray(), - USE_POINTS | USE_HIGHLIGHT | USE_AUTOSCALE | (gotAllPoints ? USE_COLORS : 0), - autoscale_max_amplitude * levelingProgress - ); - } -} - -bool BedMeshScreen::onTouchStart(uint8_t tag) { - screen_data.BedMesh.highlightedTag = tag; + pt.x = (tag - 10) % (GRID_MAX_POINTS_X); + pt.y = (tag - 10) / (GRID_MAX_POINTS_X); return true; } -bool BedMeshScreen::onTouchEnd(uint8_t tag) { - switch (tag) { - case 1: - GOTO_PREVIOUS(); - return true; - default: - return false; - } -} - -void BedMeshScreen::onMeshUpdate(const int8_t, const int8_t, const float) { - if (AT_SCREEN(BedMeshScreen)) - onRefresh(); +void BedMeshBase::drawMeshBackground(CommandProcessor &cmd, int16_t x, int16_t y, int16_t w, int16_t h) { + cmd.cmd(COLOR_RGB(Theme::bed_mesh_shadow_rgb)); + _drawMesh(cmd, x, y, w, h, USE_POINTS | USE_TAGS, 0.1, 0, nullptr, nullptr); } -void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { - switch (state) { - case ExtUI::MESH_START: - screen_data.BedMesh.count = 0; - screen_data.BedMesh.message = screen_data.BedMesh.MSG_NONE; - break; - case ExtUI::MESH_FINISH: - if (screen_data.BedMesh.count == GRID_MAX_POINTS && ExtUI::getMeshValid()) - screen_data.BedMesh.message = screen_data.BedMesh.MSG_MESH_COMPLETE; - else - screen_data.BedMesh.message = screen_data.BedMesh.MSG_MESH_INCOMPLETE; - screen_data.BedMesh.count = GRID_MAX_POINTS; - break; - case ExtUI::PROBE_START: - screen_data.BedMesh.highlightedTag = pointToTag(x, y); - break; - case ExtUI::PROBE_FINISH: - screen_data.BedMesh.count++; - break; - } - BedMeshScreen::onMeshUpdate(x, y, 0); -} +void BedMeshBase::drawMeshForeground(CommandProcessor &cmd, int16_t x, int16_t y, int16_t w, int16_t h, mesh_getter_ptr func, void *data, uint8_t highlightedTag, float progress) { + constexpr float autoscale_max_amplitude = 0.03; -void BedMeshScreen::startMeshProbe() { - GOTO_SCREEN(BedMeshScreen); - screen_data.BedMesh.count = 0; - injectCommands_P(PSTR(BED_LEVELING_COMMANDS)); + cmd.cmd(COLOR_RGB(Theme::bed_mesh_lines_rgb)); + _drawMesh(cmd, x, y, w, h, + USE_POINTS | USE_HIGHLIGHT | USE_AUTOSCALE | (progress > 0.95 ? USE_COLORS : 0), + autoscale_max_amplitude * progress, + highlightedTag, + func, data + ); } -#endif // TOUCH_UI_FTDI_EVE && HAS_MESH +#endif // FTDI_BED_MESH_BASE diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_base.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_base.h new file mode 100644 index 000000000000..7cc92793febf --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_base.h @@ -0,0 +1,46 @@ +/******************* + * bed_mesh_base.h * + *******************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2020 * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BED_MESH_BASE + +class BedMeshBase : public BaseScreen { + protected: + typedef float (*mesh_getter_ptr)(uint8_t x, uint8_t y, void *data); + + private: + enum MeshOpts { + USE_POINTS = 0x01, + USE_COLORS = 0x02, + USE_TAGS = 0x04, + USE_HIGHLIGHT = 0x08, + USE_AUTOSCALE = 0x10 + }; + + static void _drawMesh(CommandProcessor &, int16_t x, int16_t y, int16_t w, int16_t h, uint8_t opts, float autoscale_max, uint8_t highlightedTag, mesh_getter_ptr func, void *data); + + protected: + static void drawMeshForeground(CommandProcessor &cmd, int16_t x, int16_t y, int16_t w, int16_t h, mesh_getter_ptr func, void *data, uint8_t highlightedTag = 0, float progress = 1.0); + static void drawMeshBackground(CommandProcessor &cmd, int16_t x, int16_t y, int16_t w, int16_t h); + static uint8_t pointToTag(uint8_t x, uint8_t y); + static bool tagToPoint(uint8_t tag, xy_uint8_t &pt); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp new file mode 100644 index 000000000000..c7d0cc3f7314 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp @@ -0,0 +1,200 @@ +/**************************** + * bed_mesh_edit_screen.cpp * + ****************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2020 * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" +#include "../screen_data.h" + +#ifdef FTDI_BED_MESH_EDIT_SCREEN + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +constexpr static BedMeshEditScreenData &mydata = screen_data.BedMeshEditScreen; +constexpr static float gaugeThickness = 0.1; + +#if ENABLED(TOUCH_UI_PORTRAIT) + #define GRID_COLS 3 + #define GRID_ROWS 10 + + #define MESH_POS BTN_POS(1, 2), BTN_SIZE(3,5) + #define MESSAGE_POS BTN_POS(1, 7), BTN_SIZE(3,1) + #define Z_LABEL_POS BTN_POS(1, 8), BTN_SIZE(1,1) + #define Z_VALUE_POS BTN_POS(2, 8), BTN_SIZE(2,1) + #define BACK_POS BTN_POS(1,10), BTN_SIZE(2,1) + #define SAVE_POS BTN_POS(3,10), BTN_SIZE(1,1) +#else + #define GRID_COLS 5 + #define GRID_ROWS 5 + + #define MESH_POS BTN_POS(1,1), BTN_SIZE(3,5) + #define MESSAGE_POS BTN_POS(4,1), BTN_SIZE(2,1) + #define Z_LABEL_POS BTN_POS(4,2), BTN_SIZE(2,1) + #define Z_VALUE_POS BTN_POS(4,3), BTN_SIZE(2,1) + #define BACK_POS BTN_POS(4,5), BTN_SIZE(1,1) + #define SAVE_POS BTN_POS(5,5), BTN_SIZE(1,1) +#endif + +constexpr uint8_t NONE = 255; + +static float meshGetter(uint8_t x, uint8_t y, void*) { + xy_uint8_t pos; + pos.x = x; + pos.y = y; + return ExtUI::getMeshPoint(pos) + (mydata.highlight.x != NONE && mydata.highlight == pos ? mydata.zAdjustment : 0); +} + +void BedMeshEditScreen::onEntry() { + mydata.needSave = false; + mydata.highlight.x = NONE; + mydata.zAdjustment = 0; + mydata.savedMeshLevelingState = ExtUI::getLevelingActive(); + mydata.savedEndstopState = ExtUI::getSoftEndstopState(); + makeMeshValid(); + BaseScreen::onEntry(); +} + +void BedMeshEditScreen::makeMeshValid() { + bed_mesh_t &mesh = ExtUI::getMeshArray(); + GRID_LOOP(x, y) { + if (isnan(mesh[x][y])) mesh[x][y] = 0; + } +} + +void BedMeshEditScreen::onExit() { + ExtUI::setLevelingActive(mydata.savedMeshLevelingState); + ExtUI::setSoftEndstopState(mydata.savedEndstopState); +} + +float BedMeshEditScreen::getHighlightedValue() { + const float val = ExtUI::getMeshPoint(mydata.highlight); + return (isnan(val) ? 0 : val) + mydata.zAdjustment; +} + +void BedMeshEditScreen::setHighlightedValue(float value) { + ExtUI::setMeshPoint(mydata.highlight, value); +} + +void BedMeshEditScreen::moveToHighlightedValue() { + if (ExtUI::getMeshValid()) { + ExtUI::setLevelingActive(true); + ExtUI::setSoftEndstopState(false); + ExtUI::moveToMeshPoint(mydata.highlight, gaugeThickness + mydata.zAdjustment); + } +} + +void BedMeshEditScreen::adjustHighlightedValue(float increment) { + if (mydata.highlight.x != NONE) { + mydata.zAdjustment += increment; + moveToHighlightedValue(); + mydata.needSave = true; + } +} + +void BedMeshEditScreen::saveAdjustedHighlightedValue() { + if (mydata.zAdjustment && mydata.highlight.x != -1) { + setHighlightedValue(getHighlightedValue()); + mydata.zAdjustment = 0; + } +} + +bool BedMeshEditScreen::changeHighlightedValue(uint8_t tag) { + saveAdjustedHighlightedValue(); + if (tagToPoint(tag, mydata.highlight)) { + moveToHighlightedValue(); + return true; + } + return false; +} + +void BedMeshEditScreen::drawHighlightedPointValue() { + CommandProcessor cmd; + cmd.font(Theme::font_medium) + .cmd(COLOR_RGB(bg_text_enabled)) + .text(Z_LABEL_POS, GET_TEXT_F(MSG_MESH_EDIT_Z)) + .colors(normal_btn) + .font(font_small); + if (mydata.highlight.x != NONE) + draw_adjuster(cmd, Z_VALUE_POS, 3, getHighlightedValue(), GET_TEXT_F(MSG_UNITS_MM), 4, 3); + cmd.colors(mydata.needSave ? normal_btn : action_btn) + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)) + .colors(mydata.needSave ? action_btn : normal_btn) + .enabled(mydata.needSave) + .tag(2).button(SAVE_POS, GET_TEXT_F(MSG_TOUCHMI_SAVE)); +} + +void BedMeshEditScreen::onRedraw(draw_mode_t what) { + #define _INSET_POS(x,y,w,h) x + min(w,h)/10, y + min(w,h)/10, w - min(w,h)/5, h - min(w,h)/5 + #define INSET_POS(pos) _INSET_POS(pos) + + CommandProcessor cmd; + + if (what & BACKGROUND) { + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)); + drawMeshBackground(cmd, INSET_POS(MESH_POS)); + } + + if (what & FOREGROUND) { + drawHighlightedPointValue(); + drawMeshForeground(cmd, INSET_POS(MESH_POS), meshGetter, nullptr, pointToTag(mydata.highlight.x,mydata.highlight.y)); + } +} + +bool BedMeshEditScreen::onTouchHeld(uint8_t tag) { + constexpr float increment = 0.01; + switch (tag) { + case 3: adjustHighlightedValue(-increment); return true; + case 4: adjustHighlightedValue( increment); return true; + } + return false; +} + +bool BedMeshEditScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: + // On Cancel, reload saved mesh, discarding changes + GOTO_PREVIOUS(); + injectCommands_P(PSTR("G29 L1")); + return true; + case 2: + saveAdjustedHighlightedValue(); + injectCommands_P(PSTR("G29 S1")); + mydata.needSave = false; + return true; + case 3: + case 4: + return onTouchHeld(tag); + default: return changeHighlightedValue(tag); + } + return true; +} + +void BedMeshEditScreen::show() { + // On entry, always home (to account for possible Z offset changes) and save current mesh + SpinnerDialogBox::enqueueAndWait(F("G28\nG29 S1")); + // After the spinner, go to this screen. + current_screen.forget(); + PUSH_SCREEN(BedMeshEditScreen); +} + +#endif // FTDI_BED_MESH_EDIT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.h new file mode 100644 index 000000000000..45a53f0f1372 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.h @@ -0,0 +1,50 @@ +/************************** + * bed_mesh_edit_screen.h * + *************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2020 * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BED_MESH_EDIT_SCREEN +#define FTDI_BED_MESH_EDIT_SCREEN_CLASS BedMeshEditScreen + +struct BedMeshEditScreenData { + bool needSave, savedMeshLevelingState, savedEndstopState; + xy_uint8_t highlight; + float zAdjustment; +}; + +class BedMeshEditScreen : public BedMeshBase, public CachedScreen { + private: + static void makeMeshValid(); + static float getHighlightedValue(); + static void setHighlightedValue(float value); + static void moveToHighlightedValue(); + static void adjustHighlightedValue(float increment); + static void saveAdjustedHighlightedValue(); + static bool changeHighlightedValue(uint8_t tag); + static void drawHighlightedPointValue(); + public: + static void onEntry(); + static void onExit(); + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static void show(); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp new file mode 100644 index 000000000000..8db2d2ef708c --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp @@ -0,0 +1,165 @@ +/**************************** + * bed_mesh_view_screen.cpp * + ****************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2020 * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" +#include "../screen_data.h" + +#ifdef FTDI_BED_MESH_VIEW_SCREEN + +using namespace FTDI; +using namespace Theme; +using namespace ExtUI; + +constexpr static BedMeshViewScreenData &mydata = screen_data.BedMeshViewScreen; +constexpr static float gaugeThickness = 0.25; + +#if ENABLED(TOUCH_UI_PORTRAIT) + #define GRID_COLS 3 + #define GRID_ROWS 10 + + #define MESH_POS BTN_POS(1, 2), BTN_SIZE(3,5) + #define MESSAGE_POS BTN_POS(1, 7), BTN_SIZE(3,1) + #define Z_LABEL_POS BTN_POS(1, 8), BTN_SIZE(1,1) + #define Z_VALUE_POS BTN_POS(2, 8), BTN_SIZE(2,1) + #define OKAY_POS BTN_POS(1,10), BTN_SIZE(3,1) +#else + #define GRID_COLS 5 + #define GRID_ROWS 5 + + #define MESH_POS BTN_POS(1,1), BTN_SIZE(3,5) + #define MESSAGE_POS BTN_POS(4,1), BTN_SIZE(2,1) + #define Z_LABEL_POS BTN_POS(4,2), BTN_SIZE(2,1) + #define Z_VALUE_POS BTN_POS(4,3), BTN_SIZE(2,1) + #define OKAY_POS BTN_POS(4,5), BTN_SIZE(2,1) +#endif + +static float meshGetter(uint8_t x, uint8_t y, void*) { + xy_uint8_t pos; + pos.x = x; + pos.y = y; + return ExtUI::getMeshPoint(pos); +} + +void BedMeshViewScreen::onEntry() { + mydata.highlight.x = -1; + mydata.count = GRID_MAX_POINTS; + mydata.message = nullptr; + BaseScreen::onEntry(); +} + +void BedMeshViewScreen::drawHighlightedPointValue() { + CommandProcessor cmd; + cmd.font(Theme::font_medium) + .cmd(COLOR_RGB(bg_text_enabled)) + .text(Z_LABEL_POS, GET_TEXT_F(MSG_MESH_EDIT_Z)) + .font(font_small); + + if (mydata.highlight.x != -1) + draw_adjuster_value(cmd, Z_VALUE_POS, ExtUI::getMeshPoint(mydata.highlight), GET_TEXT_F(MSG_UNITS_MM), 4, 3); + + cmd.colors(action_btn) + .tag(1).button(OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY)) + .tag(0); + + if (mydata.message) cmd.text(MESSAGE_POS, mydata.message); +} + +void BedMeshViewScreen::onRedraw(draw_mode_t what) { + #define _INSET_POS(x,y,w,h) x + min(w,h)/10, y + min(w,h)/10, w - min(w,h)/5, h - min(w,h)/5 + #define INSET_POS(pos) _INSET_POS(pos) + + CommandProcessor cmd; + + if (what & BACKGROUND) { + cmd.cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)); + drawMeshBackground(cmd, INSET_POS(MESH_POS)); + } + + if (what & FOREGROUND) { + const float progress = sq(float(mydata.count) / GRID_MAX_POINTS); + if (progress >= 1.0) + drawHighlightedPointValue(); + drawMeshForeground(cmd, INSET_POS(MESH_POS), meshGetter, nullptr, pointToTag(mydata.highlight.x, mydata.highlight.y), progress); + } +} + +bool BedMeshViewScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); return true; + default: return tagToPoint(tag, mydata.highlight); + } + return true; +} + +void BedMeshViewScreen::onMeshUpdate(const int8_t, const int8_t, const float) { + if (AT_SCREEN(BedMeshViewScreen)) { + onRefresh(); + ExtUI::yield(); + } +} + +void BedMeshViewScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { + switch (state) { + case ExtUI::G29_START: + mydata.message = nullptr; + mydata.count = 0; + break; + case ExtUI::G29_FINISH: + if (mydata.count == GRID_MAX_POINTS && ExtUI::getMeshValid()) + mydata.message = GET_TEXT_F(MSG_BED_MAPPING_DONE); + else + mydata.message = GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE); + mydata.count = GRID_MAX_POINTS; + break; + case ExtUI::G26_START: + mydata.message = nullptr; + mydata.count = 0; + break; + case ExtUI::G26_FINISH: + GOTO_SCREEN(StatusScreen); + break; + case ExtUI::G29_POINT_START: + case ExtUI::G26_POINT_START: + mydata.highlight.x = x; + mydata.highlight.y = y; + break; + case ExtUI::G29_POINT_FINISH: + case ExtUI::G26_POINT_FINISH: + mydata.count++; + break; + } + BedMeshViewScreen::onMeshUpdate(x, y, 0); +} + +void BedMeshViewScreen::doProbe() { + GOTO_SCREEN(BedMeshViewScreen); + mydata.count = 0; + injectCommands_P(PSTR(BED_LEVELING_COMMANDS)); +} + +void BedMeshViewScreen::show() { + injectCommands_P(PSTR("G29 L1")); + GOTO_SCREEN(BedMeshViewScreen); +} + +#endif // FTDI_BED_MESH_VIEW_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h new file mode 100644 index 000000000000..b9791fff7a15 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.h @@ -0,0 +1,47 @@ +/************************** + * bed_mesh_view_screen.h * + *************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2020 * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BED_MESH_VIEW_SCREEN +#define FTDI_BED_MESH_VIEW_SCREEN_CLASS BedMeshViewScreen + +struct BedMeshViewScreenData { + FSTR_P message; + uint8_t count; + xy_uint8_t highlight; +}; + +class BedMeshViewScreen : public BedMeshBase, public CachedScreen { + private: + static float getHighlightedValue(); + static bool changeHighlightedValue(uint8_t tag); + static void drawHighlightedPointValue(); + public: + static void onMeshUpdate(const int8_t x, const int8_t y, const float val); + static void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t); + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + + static void doProbe(); + static void show(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp index a6a870535014..c0940bed5ce4 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/boot_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.cpp @@ -22,12 +22,10 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) +#ifdef FTDI_BOOT_SCREEN -#include "screens.h" - -#include "../ftdi_eve_lib/extras/poly_ui.h" #include "../archim2-flash/flash_storage.h" #if ENABLED(SHOW_CUSTOM_BOOTSCREEN) @@ -85,8 +83,10 @@ void BootScreen::onIdle() { if (UIData::animations_enabled()) { // If there is a startup video in the flash SPI, play // that, otherwise show a static splash screen. - if (!MediaPlayerScreen::playBootMedia()) - showSplashScreen(); + #ifdef FTDI_MEDIA_PLAYER_SCREEN + if (!MediaPlayerScreen::playBootMedia()) + #endif + showSplashScreen(); } #endif @@ -127,4 +127,4 @@ void BootScreen::showSplashScreen() { ExtUI::delay_ms(2500); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_BOOT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.h new file mode 100644 index 000000000000..a267faba6a53 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/boot_screen.h @@ -0,0 +1,35 @@ +/***************** + * boot_screen.h * + *****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_BOOT_SCREEN +#define FTDI_BOOT_SCREEN_CLASS BootScreen + +class BootScreen : public BaseScreen, public UncachedScreen { + private: + static void showSplashScreen(); + public: + static void onRedraw(draw_mode_t); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/case_light_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/case_light_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.cpp index 5b2b7d4116a8..8fbb400a681b 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/case_light_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.cpp @@ -20,10 +20,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, CASE_LIGHT_ENABLE) - -#include "screens.h" +#ifdef FTDI_CASE_LIGHT_SCREEN using namespace FTDI; using namespace ExtUI; @@ -59,4 +58,4 @@ bool CaseLightScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_CASE_LIGHT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.h new file mode 100644 index 000000000000..55d5fe902f53 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/case_light_screen.h @@ -0,0 +1,31 @@ +/*********************** + * case_light_screen.h * + ***********************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_CASE_LIGHT_SCREEN +#define FTDI_CASE_LIGHT_SCREEN_CLASS CaseLightScreen + +class CaseLightScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.cpp similarity index 84% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.cpp index 624bb263eb09..fa0748c17b37 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/change_filament_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.cpp @@ -21,16 +21,17 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_CHANGE_FILAMENT_SCREEN using namespace ExtUI; using namespace FTDI; using namespace Theme; +constexpr static ChangeFilamentScreenData &mydata = screen_data.ChangeFilamentScreen; + #ifdef TOUCH_UI_PORTRAIT #define GRID_COLS 2 #define GRID_ROWS 11 @@ -75,7 +76,7 @@ using namespace Theme; /****************** COLOR SCALE ***********************/ -uint32_t getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high) { +uint32_t ChangeFilamentScreen::getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high) { rgb_t R0, R1, mix; float t; @@ -122,17 +123,17 @@ void ChangeFilamentScreen::drawTempGradient(uint16_t x, uint16_t y, uint16_t w, void ChangeFilamentScreen::onEntry() { BaseScreen::onEntry(); - screen_data.ChangeFilament.e_tag = ExtUI::getActiveTool() + 10; - screen_data.ChangeFilament.t_tag = 0; - screen_data.ChangeFilament.repeat_tag = 0; - screen_data.ChangeFilament.saved_extruder = getActiveTool(); + mydata.e_tag = ExtUI::getActiveTool() + 10; + mydata.t_tag = 0; + mydata.repeat_tag = 0; + mydata.saved_extruder = getActiveTool(); #if FILAMENT_UNLOAD_PURGE_LENGTH > 0 - screen_data.ChangeFilament.need_purge = true; + mydata.need_purge = true; #endif } void ChangeFilamentScreen::onExit() { - setActiveTool(screen_data.ChangeFilament.saved_extruder, true); + setActiveTool(mydata.saved_extruder, true); } void ChangeFilamentScreen::onRedraw(draw_mode_t what) { @@ -170,7 +171,7 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) { const bool t_ok = getActualTemp_celsius(e) > getSoftenTemp() - 10; - if (screen_data.ChangeFilament.t_tag && !t_ok) { + if (mydata.t_tag && !t_ok) { cmd.text(HEATING_LBL_POS, GET_TEXT_F(MSG_HEATING)); } else if (getActualTemp_celsius(e) > 100) { cmd.cmd(COLOR_RGB(0xFF0000)) @@ -181,12 +182,12 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) { #define TOG_STYLE(A) colors(A ? action_btn : normal_btn) - const bool tog2 = screen_data.ChangeFilament.t_tag == 2; - const bool tog3 = screen_data.ChangeFilament.t_tag == 3; - const bool tog4 = screen_data.ChangeFilament.t_tag == 4; - const bool tog10 = screen_data.ChangeFilament.e_tag == 10; + const bool tog2 = mydata.t_tag == 2; + const bool tog3 = mydata.t_tag == 3; + const bool tog4 = mydata.t_tag == 4; + const bool tog10 = mydata.e_tag == 10; #if HAS_MULTI_HOTEND - const bool tog11 = screen_data.ChangeFilament.e_tag == 11; + const bool tog11 = mydata.e_tag == 11; #endif cmd.TOG_STYLE(tog10) @@ -200,8 +201,8 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) { if (!t_ok) reset_menu_timeout(); - const bool tog7 = screen_data.ChangeFilament.repeat_tag == 7; - const bool tog8 = screen_data.ChangeFilament.repeat_tag == 8; + const bool tog7 = mydata.repeat_tag == 7; + const bool tog8 = mydata.repeat_tag == 8; { char str[30]; @@ -223,12 +224,12 @@ void ChangeFilamentScreen::onRedraw(draw_mode_t what) { .tag(6) .enabled(t_ok).button (LOAD_MOMN_POS, GET_TEXT_F(MSG_MOMENTARY)) .tag(7).TOG_STYLE(tog7).enabled(t_ok).button (UNLD_CONT_POS, GET_TEXT_F(MSG_CONTINUOUS)) .tag(8).TOG_STYLE(tog8).enabled(t_ok).button (LOAD_CONT_POS, GET_TEXT_F(MSG_CONTINUOUS)) - .tag(1).colors(action_btn) .button (BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).colors(action_btn) .button (BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } uint8_t ChangeFilamentScreen::getSoftenTemp() { - switch (screen_data.ChangeFilament.t_tag) { + switch (mydata.t_tag) { case 2: return LOW_TEMP; case 3: return MED_TEMP; case 4: return HIGH_TEMP; @@ -237,7 +238,7 @@ uint8_t ChangeFilamentScreen::getSoftenTemp() { } ExtUI::extruder_t ChangeFilamentScreen::getExtruder() { - switch (screen_data.ChangeFilament.e_tag) { + switch (mydata.e_tag) { case 13: return ExtUI::E3; case 12: return ExtUI::E2; case 11: return ExtUI::E1; @@ -248,8 +249,8 @@ ExtUI::extruder_t ChangeFilamentScreen::getExtruder() { void ChangeFilamentScreen::doPurge() { #if FILAMENT_UNLOAD_PURGE_LENGTH > 0 constexpr float purge_distance_mm = FILAMENT_UNLOAD_PURGE_LENGTH; - if (screen_data.ChangeFilament.need_purge) { - screen_data.ChangeFilament.need_purge = false; + if (mydata.need_purge) { + mydata.need_purge = false; MoveAxisScreen::setManualFeedrate(getExtruder(), purge_distance_mm); ExtUI::setAxisPosition_mm(ExtUI::getAxisPosition_mm(getExtruder()) + purge_distance_mm, getExtruder()); } @@ -277,23 +278,23 @@ bool ChangeFilamentScreen::onTouchEnd(uint8_t tag) { case 3: case 4: // Change temperature - screen_data.ChangeFilament.t_tag = tag; + mydata.t_tag = tag; setTargetTemp_celsius(getSoftenTemp(), getExtruder()); break; case 7: - screen_data.ChangeFilament.repeat_tag = (screen_data.ChangeFilament.repeat_tag == 7) ? 0 : 7; + mydata.repeat_tag = (mydata.repeat_tag == 7) ? 0 : 7; break; case 8: - screen_data.ChangeFilament.repeat_tag = (screen_data.ChangeFilament.repeat_tag == 8) ? 0 : 8; + mydata.repeat_tag = (mydata.repeat_tag == 8) ? 0 : 8; break; case 10: case 11: // Change extruder - screen_data.ChangeFilament.e_tag = tag; - screen_data.ChangeFilament.t_tag = 0; - screen_data.ChangeFilament.repeat_tag = 0; + mydata.e_tag = tag; + mydata.t_tag = 0; + mydata.repeat_tag = 0; #if FILAMENT_UNLOAD_PURGE_LENGTH > 0 - screen_data.ChangeFilament.need_purge = true; + mydata.need_purge = true; #endif setActiveTool(getExtruder(), true); break; @@ -319,7 +320,7 @@ bool ChangeFilamentScreen::onTouchHeld(uint8_t tag) { void ChangeFilamentScreen::onIdle() { reset_menu_timeout(); - if (screen_data.ChangeFilament.repeat_tag) onTouchHeld(screen_data.ChangeFilament.repeat_tag); + if (mydata.repeat_tag) onTouchHeld(mydata.repeat_tag); if (refresh_timer.elapsed(STATUS_UPDATE_INTERVAL)) { onRefresh(); refresh_timer.start(); @@ -327,4 +328,4 @@ void ChangeFilamentScreen::onIdle() { BaseScreen::onIdle(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_CHANGE_FILAMENT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.h new file mode 100644 index 000000000000..42eaf25f4ae3 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/change_filament_screen.h @@ -0,0 +1,51 @@ +/**************************** + * change_filament_screen.h * + ****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_CHANGE_FILAMENT_SCREEN +#define FTDI_CHANGE_FILAMENT_SCREEN_CLASS ChangeFilamentScreen + +struct ChangeFilamentScreenData { + uint8_t e_tag, t_tag, repeat_tag; + ExtUI::extruder_t saved_extruder; + #if FILAMENT_UNLOAD_PURGE_LENGTH > 0 + bool need_purge; + #endif +}; + +class ChangeFilamentScreen : public BaseScreen, public CachedScreen { + private: + static uint8_t getSoftenTemp(); + static ExtUI::extruder_t getExtruder(); + static void drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h); + static void doPurge(); + public: + static uint32_t getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high); + static void onEntry(); + static void onExit(); + static void onRedraw(draw_mode_t); + static bool onTouchStart(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static bool onTouchHeld(uint8_t tag); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_abort_print_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_abort_print_dialog_box.cpp similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_abort_print_dialog_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_abort_print_dialog_box.cpp index 528d93d5d17f..02e48efa01d6 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_abort_print_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_abort_print_dialog_box.cpp @@ -21,12 +21,11 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) +#ifdef FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX -#include "screens.h" - -#include "../../../../../feature/host_actions.h" +#include "../../../../feature/host_actions.h" using namespace ExtUI; @@ -50,4 +49,4 @@ bool ConfirmAbortPrintDialogBox::onTouchEnd(uint8_t tag) { } } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_abort_print_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_abort_print_dialog_box.h new file mode 100644 index 000000000000..a97a2000a093 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_abort_print_dialog_box.h @@ -0,0 +1,32 @@ +/************************************ + * confirm_abort_print_dialog_box.h * + ************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX +#define FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX_CLASS ConfirmAbortPrintDialogBox + +class ConfirmAbortPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.cpp similarity index 94% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.cpp index f7c85672aff9..748cc1d7ef7b 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_auto_calibration_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, CALIBRATION_GCODE) - -#include "screens.h" +#ifdef FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX using namespace ExtUI; using namespace Theme; @@ -45,4 +44,4 @@ bool ConfirmAutoCalibrationDialogBox::onTouchEnd(uint8_t tag) { } } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.h new file mode 100644 index 000000000000..5093b68c7342 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.h @@ -0,0 +1,32 @@ +/***************************************** + * confirm_auto_calibration_dialog_box.h * + *****************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX +#define FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX_CLASS ConfirmAutoCalibrationDialogBox + +class ConfirmAutoCalibrationDialogBox : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_erase_flash_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_erase_flash_dialog_box.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_erase_flash_dialog_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_erase_flash_dialog_box.cpp index baf5959c1b0e..b4ddebea5ef4 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_erase_flash_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_erase_flash_dialog_box.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_DEVELOPER_MENU) - -#include "screens.h" +#ifdef FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX #include "../archim2-flash/flash_storage.h" @@ -51,4 +50,4 @@ bool ConfirmEraseFlashDialogBox::onTouchEnd(uint8_t tag) { } } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_erase_flash_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_erase_flash_dialog_box.h new file mode 100644 index 000000000000..a06f886176ed --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_erase_flash_dialog_box.h @@ -0,0 +1,32 @@ +/************************************ + * confirm_erase_flash_dialog_box.h * + ************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX +#define FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX_CLASS ConfirmEraseFlashDialogBox + +class ConfirmEraseFlashDialogBox : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_start_print_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_start_print_dialog_box.cpp similarity index 82% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_start_print_dialog_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_start_print_dialog_box.cpp index eeca88f2809a..7f566539a19e 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_start_print_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_start_print_dialog_box.cpp @@ -21,18 +21,19 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_CONFIRM_START_PRINT_DIALOG_BOX using namespace FTDI; using namespace Theme; using namespace ExtUI; +constexpr static ConfirmStartPrintDialogBoxData &mydata = screen_data.ConfirmStartPrintDialogBox; + void ConfirmStartPrintDialogBox::onRedraw(draw_mode_t) { - const char *filename = getLongFilename(); + const char *filename = getFilename(); char buffer[strlen_P(GET_TEXT(MSG_START_PRINT_CONFIRMATION)) + strlen(filename) + 1]; sprintf_P(buffer, GET_TEXT(MSG_START_PRINT_CONFIRMATION), filename); drawMessage((const char *)buffer); @@ -51,15 +52,15 @@ bool ConfirmStartPrintDialogBox::onTouchEnd(uint8_t tag) { } } -const char *ConfirmStartPrintDialogBox::getFilename(bool longName) { +const char *ConfirmStartPrintDialogBox::getFilename(bool shortName) { FileList files; - files.seek(screen_data.ConfirmStartPrintDialog.file_index, true); - return longName ? files.longFilename() : files.shortFilename(); + files.seek(mydata.file_index, true); + return shortName ? files.shortFilename() : files.filename(); } void ConfirmStartPrintDialogBox::show(uint8_t file_index) { - screen_data.ConfirmStartPrintDialog.file_index = file_index; + mydata.file_index = file_index; GOTO_SCREEN(ConfirmStartPrintDialogBox); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_CONFIRM_START_PRINT_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_start_print_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_start_print_dialog_box.h new file mode 100644 index 000000000000..1f74fde94b6b --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_start_print_dialog_box.h @@ -0,0 +1,42 @@ +/************************************ + * confirm_start_print_dialog_box.h * + ************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_CONFIRM_START_PRINT_DIALOG_BOX +#define FTDI_CONFIRM_START_PRINT_DIALOG_BOX_CLASS ConfirmStartPrintDialogBox + +struct ConfirmStartPrintDialogBoxData { + uint8_t file_index; +}; + +class ConfirmStartPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen { + private: + inline static const char *getShortFilename() {return getFilename(true);} + + static const char *getFilename(bool shortName = false); + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t); + + static void show(uint8_t file_index); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp similarity index 78% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp index 59e1c8220de4..8c06fa9a9e0e 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.cpp @@ -21,11 +21,10 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_CONFIRM_USER_REQUEST_ALERT_BOX using namespace FTDI; @@ -36,12 +35,15 @@ void ConfirmUserRequestAlertBox::onRedraw(draw_mode_t mode) { bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) { switch (tag) { case 1: - if (ExtUI::isPrintingPaused()) { - // The TuneMenu will call ExtUI::setUserConfirmed() - GOTO_SCREEN(TuneMenu); - current_screen.forget(); - } - else { + #ifdef FTDI_TUNE_MENU + if (ExtUI::isPrintingPaused()) { + // The TuneMenu will call ExtUI::setUserConfirmed() + GOTO_SCREEN(TuneMenu); + current_screen.forget(); + } + else + #endif + { ExtUI::setUserConfirmed(); GOTO_PREVIOUS(); } @@ -51,11 +53,12 @@ bool ConfirmUserRequestAlertBox::onTouchEnd(uint8_t tag) { } } -void ConfirmUserRequestAlertBox::show(const char* msg) { +void ConfirmUserRequestAlertBox::show(const char *msg) { drawMessage(msg); storeBackground(); - screen_data.AlertDialog.isError = false; - GOTO_SCREEN(ConfirmUserRequestAlertBox); + screen_data.AlertDialogBox.isError = false; + if (!AT_SCREEN(ConfirmUserRequestAlertBox)) + GOTO_SCREEN(ConfirmUserRequestAlertBox); } void ConfirmUserRequestAlertBox::hide() { @@ -63,4 +66,4 @@ void ConfirmUserRequestAlertBox::hide() { GOTO_PREVIOUS(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_CONFIRM_USER_REQUEST_ALERT_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.h new file mode 100644 index 000000000000..f83b1a24f5d5 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_user_request_alert_box.h @@ -0,0 +1,34 @@ +/************************************ + * confirm_user_request_alert_box.h * + ************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_CONFIRM_USER_REQUEST_ALERT_BOX +#define FTDI_CONFIRM_USER_REQUEST_ALERT_BOX_CLASS ConfirmUserRequestAlertBox + +class ConfirmUserRequestAlertBox : public AlertDialogBox { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t); + static void hide(); + static void show(const char*); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp index 20f90d5a4119..880748089772 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/custom_user_menus.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp @@ -21,24 +21,20 @@ */ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, CUSTOM_USER_MENUS) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" +#ifdef FTDI_CUSTOM_USER_MENUS using namespace FTDI; using namespace ExtUI; using namespace Theme; #define _ITEM_TAG(N) (10+N) -#define _USER_DESC(N) USER_DESC_##N -#define _USER_GCODE(N) USER_GCODE_##N +#define _USER_DESC(N) MAIN_MENU_ITEM_##N##_DESC +#define _USER_GCODE(N) MAIN_MENU_ITEM_##N##_GCODE #define _USER_ITEM(N) .tag(_ITEM_TAG(N)).button(USER_ITEM_POS(N), _USER_DESC(N)) #define _USER_ACTION(N) case _ITEM_TAG(N): injectCommands_P(PSTR(_USER_GCODE(N))); TERN_(USER_SCRIPT_RETURN, GOTO_SCREEN(StatusScreen)); break; -#define _HAS_1(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N)) -#define HAS_USER_ITEM(V...) DO(HAS,||,V) - void CustomUserMenus::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { CommandProcessor cmd; @@ -139,7 +135,7 @@ void CustomUserMenus::onRedraw(draw_mode_t what) { _USER_ITEM(20) #endif .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } @@ -212,4 +208,4 @@ bool CustomUserMenus::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && CUSTOM_USER_MENUS && !TOUCH_UI_LULZBOT_BIO && !TOUCH_UI_COCOA_PRESS +#endif // FTDI_CUSTOM_USER_MENUS diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.h new file mode 100644 index 000000000000..693549480975 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.h @@ -0,0 +1,31 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define FTDI_CUSTOM_USER_MENUS +#define FTDI_CUSTOM_USER_MENUS_CLASS CustomUserMenus + +class CustomUserMenus : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/default_acceleration_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/default_acceleration_screen.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/default_acceleration_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/default_acceleration_screen.cpp index de617d437427..07473d66a121 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/default_acceleration_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/default_acceleration_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_DEFAULT_ACCELERATION_SCREEN using namespace FTDI; using namespace ExtUI; @@ -60,4 +59,4 @@ bool DefaultAccelerationScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_DEFAULT_ACCELERATION_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/default_acceleration_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/default_acceleration_screen.h new file mode 100644 index 000000000000..9042f6d2b846 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/default_acceleration_screen.h @@ -0,0 +1,32 @@ +/********************************* + * default_acceleration_screen.h * + *********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_DEFAULT_ACCELERATION_SCREEN +#define FTDI_DEFAULT_ACCELERATION_SCREEN_CLASS DefaultAccelerationScreen + +class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/developer_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp similarity index 98% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/developer_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp index 9df060a6c4d1..34c754d53566 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/developer_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_DEVELOPER_MENU) - -#include "screens.h" +#ifdef FTDI_DEVELOPER_MENU #include "../archim2-flash/flash_storage.h" @@ -147,4 +146,4 @@ bool DeveloperMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_DEVELOPER_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.h new file mode 100644 index 000000000000..87572483295f --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/developer_menu.h @@ -0,0 +1,32 @@ +/******************** + * developer_menu.h * + ********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_DEVELOPER_MENU +#define FTDI_DEVELOPER_MENU_CLASS DeveloperMenu + +class DeveloperMenu : public BaseScreen, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/dialog_box_base_class.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp similarity index 84% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/dialog_box_base_class.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp index 6fe7be492d01..b6f69bc33e95 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/dialog_box_base_class.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_DIALOG_BOX_BASE_CLASS using namespace FTDI; using namespace Theme; @@ -33,19 +32,19 @@ using namespace Theme; #define GRID_ROWS 8 template -void DialogBoxBaseClass::drawMessage(const T message, int16_t font) { +void DialogBoxBaseClass::drawMessage(T message, int16_t font) { CommandProcessor cmd; cmd.cmd(CMD_DLSTART) .cmd(CLEAR_COLOR_RGB(bg_color)) .cmd(CLEAR(true,true,true)) .cmd(COLOR_RGB(bg_text_enabled)) .tag(0); - draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,3), message, OPT_CENTER, font ? font : font_large); + draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,6), message, OPT_CENTER, font ? font : font_large); cmd.colors(normal_btn); } template void DialogBoxBaseClass::drawMessage(const char *, int16_t font); -template void DialogBoxBaseClass::drawMessage(progmem_str, int16_t font); +template void DialogBoxBaseClass::drawMessage(FSTR_P, int16_t font); void DialogBoxBaseClass::drawYesNoButtons(uint8_t default_btn) { CommandProcessor cmd; @@ -60,17 +59,15 @@ void DialogBoxBaseClass::drawOkayButton() { .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_OKAY)); } -void DialogBoxBaseClass::drawButton(const progmem_str label) { +template +void DialogBoxBaseClass::drawButton(T label) { CommandProcessor cmd; cmd.font(font_medium) .tag(1).button(BTN_POS(1,8), BTN_SIZE(2,1), label); } -void DialogBoxBaseClass::drawSpinner() { - CommandProcessor cmd; - cmd.cmd(COLOR_RGB(bg_text_enabled)) - .spinner(BTN_POS(1,4), BTN_SIZE(2,3)).execute(); -} +template void DialogBoxBaseClass::drawButton(const char *); +template void DialogBoxBaseClass::drawButton(FSTR_P); bool DialogBoxBaseClass::onTouchEnd(uint8_t tag) { switch (tag) { @@ -84,4 +81,4 @@ void DialogBoxBaseClass::onIdle() { reset_menu_timeout(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_DIALOG_BOX_BASE_CLASS diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h new file mode 100644 index 000000000000..c87640992866 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/dialog_box_base_class.h @@ -0,0 +1,39 @@ +/*************************** + * dialog_box_base_class.h * + ***************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_DIALOG_BOX_BASE_CLASS +#define FTDI_DIALOG_BOX_BASE_CLASS_CLASS DialogBoxBaseClass + +class DialogBoxBaseClass : public BaseScreen { + protected: + template static void drawMessage(T, int16_t font = 0); + template static void drawButton(T); + static void drawYesNoButtons(uint8_t default_btn = 0); + static void drawOkayButton(); + + static void onRedraw(draw_mode_t) {}; + public: + static bool onTouchEnd(uint8_t tag); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/display_tuning_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/display_tuning_screen.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/display_tuning_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/display_tuning_screen.cpp index 1a4d9fd70548..504ebde1695c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/display_tuning_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/display_tuning_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_DISPLAY_TUNING_SCREEN using namespace FTDI; using namespace Theme; @@ -58,4 +57,4 @@ bool DisplayTuningScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_DISPLAY_TUNING_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/display_tuning_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/display_tuning_screen.h new file mode 100644 index 000000000000..3de840b82e2f --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/display_tuning_screen.h @@ -0,0 +1,32 @@ +/*************************** + * display_tuning_screen.h * + ***************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_DISPLAY_TUNING_SCREEN +#define FTDI_DISPLAY_TUNING_SCREEN_CLASS DisplayTuningScreen + +class DisplayTuningScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp index a091197a87ae..c7042e760e48 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/endstop_state_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_ENDSTOP_STATE_SCREEN using namespace FTDI; using namespace Theme; @@ -61,32 +60,32 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { ) .text(BTN_POS(1,1), BTN_SIZE(6,1), GET_TEXT_F(MSG_LCD_ENDSTOPS)) .font(font_tiny); - #if PIN_EXISTS(X_MAX) + #if HAS_X_MAX PIN_ENABLED (1, 2, PSTR(STR_X_MAX), X_MAX, X_MAX_ENDSTOP_INVERTING) #else PIN_DISABLED(1, 2, PSTR(STR_X_MAX), X_MAX) #endif - #if PIN_EXISTS(Y_MAX) + #if HAS_Y_MAX PIN_ENABLED (3, 2, PSTR(STR_Y_MAX), Y_MAX, Y_MAX_ENDSTOP_INVERTING) #else PIN_DISABLED(3, 2, PSTR(STR_Y_MAX), Y_MAX) #endif - #if PIN_EXISTS(Z_MAX) + #if HAS_Z_MAX PIN_ENABLED (5, 2, PSTR(STR_Z_MAX), Z_MAX, Z_MAX_ENDSTOP_INVERTING) #else PIN_DISABLED(5, 2, PSTR(STR_Z_MAX), Z_MAX) #endif - #if PIN_EXISTS(X_MIN) + #if HAS_X_MIN PIN_ENABLED (1, 3, PSTR(STR_X_MIN), X_MIN, X_MIN_ENDSTOP_INVERTING) #else PIN_DISABLED(1, 3, PSTR(STR_X_MIN), X_MIN) #endif - #if PIN_EXISTS(Y_MIN) + #if HAS_Y_MIN PIN_ENABLED (3, 3, PSTR(STR_Y_MIN), Y_MIN, Y_MIN_ENDSTOP_INVERTING) #else PIN_DISABLED(3, 3, PSTR(STR_Y_MIN), Y_MIN) #endif - #if PIN_EXISTS(Z_MIN) + #if HAS_Z_MIN PIN_ENABLED (5, 3, PSTR(STR_Z_MIN), Z_MIN, Z_MIN_ENDSTOP_INVERTING) #else PIN_DISABLED(5, 3, PSTR(STR_Z_MIN), Z_MIN) @@ -121,7 +120,7 @@ void EndstopStatesScreen::onRedraw(draw_mode_t) { cmd.font(font_medium) .colors(action_btn) - .tag(1).button(BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button(BTN_POS(1,7), BTN_SIZE(6,1), GET_TEXT_F(MSG_BUTTON_DONE)); #undef GRID_COLS #undef GRID_ROWS } @@ -149,4 +148,4 @@ void EndstopStatesScreen::onIdle() { BaseScreen::onIdle(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_ENDSTOP_STATE_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.h new file mode 100644 index 000000000000..c0eaccbe014c --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/endstop_state_screen.h @@ -0,0 +1,35 @@ +/************************** + * endstop_state_screen.h * + **************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_ENDSTOP_STATE_SCREEN +#define FTDI_ENDSTOP_STATE_SCREEN_CLASS EndstopStatesScreen + +class EndstopStatesScreen : public BaseScreen, public UncachedScreen { + public: + static void onEntry(); + static void onExit(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/feedrate_percent_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/feedrate_percent_screen.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/feedrate_percent_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/feedrate_percent_screen.cpp index 28f0e6a73158..80eb295f6481 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/feedrate_percent_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/feedrate_percent_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_FEEDRATE_PERCENT_SCREEN using namespace FTDI; using namespace ExtUI; @@ -49,4 +48,4 @@ bool FeedratePercentScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_FEEDRATE_PERCENT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/feedrate_percent_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/feedrate_percent_screen.h new file mode 100644 index 000000000000..076cfe97ca96 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/feedrate_percent_screen.h @@ -0,0 +1,32 @@ +/***************************** + * feedrate_percent_screen.h * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_FEEDRATE_PERCENT_SCREEN +#define FTDI_FEEDRATE_PERCENT_SCREEN_CLASS FeedratePercentScreen + +class FeedratePercentScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp similarity index 94% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp index f63fc416dd4c..9c9e70cebfc1 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && ANY(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) - -#include "screens.h" +#ifdef FTDI_FILAMENT_MENU using namespace FTDI; using namespace ExtUI; @@ -64,7 +63,7 @@ void FilamentMenu::onRedraw(draw_mode_t what) { .enabled(ENABLED(LIN_ADVANCE)) .tag(3).button(LIN_ADVANCE_POS, GET_TEXT_F(MSG_LINEAR_ADVANCE)) .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } @@ -82,4 +81,4 @@ bool FilamentMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_FILAMENT_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.h new file mode 100644 index 000000000000..73ceec29a5e0 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_menu.h @@ -0,0 +1,32 @@ +/******************* + * filament_menu.h * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_FILAMENT_MENU +#define FTDI_FILAMENT_MENU_CLASS FilamentMenu + +class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp index 41e3be22efa8..68948b0c5e5d 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/filament_runout_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, FILAMENT_RUNOUT_SENSOR) - -#include "screens.h" +#ifdef FTDI_FILAMENT_RUNOUT_SCREEN using namespace FTDI; using namespace ExtUI; @@ -40,7 +39,7 @@ void FilamentRunoutScreen::onRedraw(draw_mode_t what) { w.units(GET_TEXT_F(MSG_UNITS_MM)); w.precision(0); w.color(e_axis); - w.adjuster( 10, progmem_str(NUL_STR), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled()); + w.adjuster( 10, FPSTR(NUL_STR), getFilamentRunoutDistance_mm(), getFilamentRunoutEnabled()); w.increments(); #endif } @@ -62,4 +61,4 @@ bool FilamentRunoutScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_FILAMENT_RUNOUT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.h new file mode 100644 index 000000000000..ebe7d020cbaf --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/filament_runout_screen.h @@ -0,0 +1,32 @@ +/**************************** + * filament_runout_screen.h * + ****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_FILAMENT_RUNOUT_SCREEN +#define FTDI_FILAMENT_RUNOUT_SCREEN_CLASS FilamentRunoutScreen + +class FilamentRunoutScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp new file mode 100644 index 000000000000..5076e58adf6e --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.cpp @@ -0,0 +1,286 @@ +/******************** + * files_screen.cpp * + ********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" +#include "../screen_data.h" + +#ifdef FTDI_FILES_SCREEN + +#if ENABLED(TOUCH_UI_PORTRAIT) + #define GRID_COLS 6 + #define GRID_ROWS 15 + #define FILES_PER_PAGE 11 + #define PREV_DIR LEFT + #define NEXT_DIR RIGHT + + #define PREV_POS BTN_POS(1,1), BTN_SIZE(1,2) + #define HEAD_POS BTN_POS(2,1), BTN_SIZE(4,2) + #define NEXT_POS BTN_POS(6,1), BTN_SIZE(1,2) + #define LIST_POS BTN_POS(1,3), BTN_SIZE(6,FILES_PER_PAGE) + #define BTN1_POS BTN_POS(1,14), BTN_SIZE(3,2) + #define BTN2_POS BTN_POS(4,14), BTN_SIZE(3,2) +#else + #define GRID_COLS 12 + #define GRID_ROWS 8 + #define FILES_PER_PAGE 6 + #define PREV_DIR UP + #define NEXT_DIR DOWN + + #define PREV_POS BTN_POS(12,2), BTN_SIZE(1,3) + #define HEAD_POS BTN_POS( 1,1), BTN_SIZE(12,1) + #define NEXT_POS BTN_POS(12,5), BTN_SIZE(1,4) + #define LIST_POS BTN_POS( 1,2), BTN_SIZE(11,FILES_PER_PAGE) + #define BTN1_POS BTN_POS( 1,8), BTN_SIZE(6,1) + #define BTN2_POS BTN_POS( 7,8), BTN_SIZE(5,1) +#endif + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +constexpr static FilesScreenData &mydata = screen_data.FilesScreen; + +void FilesScreen::onEntry() { + mydata.cur_page = 0; + mydata.selected_tag = 0xFF; + #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) + CLCD::mem_write_32(CLCD::REG::MACRO_0,DL::NOP); + #endif + gotoPage(0); + BaseScreen::onEntry(); +} + +const char *FilesScreen::getSelectedFilename(bool shortName) { + FileList files; + files.seek(getSelectedFileIndex(), true); + return shortName ? files.shortFilename() : files.filename(); +} + +void FilesScreen::drawSelectedFile() { + if(mydata.selected_tag == 0xFF) return; + FileList files; + files.seek(getSelectedFileIndex(), true); + mydata.flags.is_dir = files.isDir(); + drawFileButton( + files.filename(), + mydata.selected_tag, + mydata.flags.is_dir, + true + ); +} + +uint16_t FilesScreen::getSelectedFileIndex() { + return getFileForTag(mydata.selected_tag); +} + +uint16_t FilesScreen::getFileForTag(uint8_t tag) { + return mydata.cur_page * FILES_PER_PAGE + tag - 2; +} + +void FilesScreen::drawFileButton(int x, int y, int w, int h, const char *filename, uint8_t tag, bool is_dir, bool is_highlighted) { + #define SUB_COLS 6 + #define SUB_ROWS FILES_PER_PAGE + + const int bx = SUB_X(1); + const int by = SUB_Y(getLineForTag(tag)+1); + const int bw = SUB_W(6); + const int bh = SUB_H(1); + + CommandProcessor cmd; + cmd.tag(tag); + cmd.cmd(COLOR_RGB(is_highlighted ? fg_action : bg_color)); + cmd.font(font_medium).rectangle(bx, by, bw, bh); + cmd.cmd(COLOR_RGB(is_highlighted ? normal_btn.rgb : bg_text_enabled)); + #if ENABLED(SCROLL_LONG_FILENAMES) + if (is_highlighted) { + cmd.cmd(SAVE_CONTEXT()); + cmd.cmd(SCISSOR_XY(x,y)); + cmd.cmd(SCISSOR_SIZE(w,h)); + cmd.cmd(MACRO(0)); + cmd.text(bx, by, bw, bh, filename, OPT_CENTERY | OPT_NOFIT); + } else + #endif + draw_text_with_ellipsis(cmd, bx,by, bw - (is_dir ? 20 : 0), bh, filename, OPT_CENTERY, font_medium); + if (is_dir && !is_highlighted) cmd.text(bx, by, bw, bh, F("> "), OPT_CENTERY | OPT_RIGHTX); + #if ENABLED(SCROLL_LONG_FILENAMES) + if (is_highlighted) cmd.cmd(RESTORE_CONTEXT()); + #endif +} + +void FilesScreen::drawFileList() { + FileList files; + mydata.num_page = max(1,ceil(float(files.count()) / FILES_PER_PAGE)); + mydata.cur_page = min(mydata.cur_page, mydata.num_page-1); + mydata.flags.is_root = files.isAtRootDir(); + mydata.flags.is_empty = true; + + uint16_t fileIndex = mydata.cur_page * FILES_PER_PAGE; + for (uint8_t i = 0; i < FILES_PER_PAGE; i++, fileIndex++) { + if (!files.seek(fileIndex)) break; + drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false); + mydata.flags.is_empty = false; + } +} + +void FilesScreen::drawHeader() { + char str[16]; + sprintf_P(str, PSTR("Page %d of %d"), mydata.cur_page + 1, mydata.num_page); + + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(font_small) + .tag(0).button(HEAD_POS, str, OPT_CENTER | OPT_FLAT); +} + +void FilesScreen::drawArrows() { + const bool prev_enabled = mydata.cur_page > 0; + const bool next_enabled = mydata.cur_page < (mydata.num_page - 1); + + CommandProcessor cmd; + cmd.colors(normal_btn); + cmd.tag(242).enabled(prev_enabled).button(PREV_POS, F("")); if (prev_enabled) drawArrow(PREV_POS, PREV_DIR); + cmd.tag(243).enabled(next_enabled).button(NEXT_POS, F("")); if (next_enabled) drawArrow(NEXT_POS, NEXT_DIR); +} + +void FilesScreen::drawFooter() { + const bool has_selection = mydata.selected_tag != 0xFF; + + CommandProcessor cmd; + cmd.colors(normal_btn) + .font(font_medium) + .colors(has_selection ? normal_btn : action_btn); + + if (mydata.flags.is_root) + cmd.tag(240).button(BTN2_POS, GET_TEXT_F(MSG_BUTTON_DONE)); + else + cmd.tag(245).button(BTN2_POS, F("Up Dir")); + + cmd.enabled(has_selection) + .colors(has_selection ? action_btn : normal_btn); + + if (mydata.flags.is_dir) + cmd.tag(244).button(BTN1_POS, GET_TEXT_F(MSG_BUTTON_OPEN)); + else + cmd.tag(241).button(BTN1_POS, GET_TEXT_F(MSG_BUTTON_PRINT)); +} + +void FilesScreen::drawFileButton(const char *filename, uint8_t tag, bool is_dir, bool is_highlighted) { + #undef MARGIN_L + #undef MARGIN_R + #define MARGIN_L 0 + #define MARGIN_R 0 + drawFileButton(LIST_POS, filename, tag, is_dir, is_highlighted); +} + +void FilesScreen::onRedraw(draw_mode_t what) { + if (what & FOREGROUND) { + drawHeader(); + drawArrows(); + drawSelectedFile(); + drawFooter(); + } +} + +void FilesScreen::gotoPage(uint8_t page) { + mydata.selected_tag = 0xFF; + mydata.cur_page = page; + CommandProcessor cmd; + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .colors(normal_btn); + drawFileList(); + storeBackground(); +} + +bool FilesScreen::onTouchEnd(uint8_t tag) { + switch (tag) { + case 240: // Done button + GOTO_PREVIOUS(); + return true; + case 241: // Print highlighted file + ConfirmStartPrintDialogBox::show(getSelectedFileIndex()); + return true; + case 242: // Previous page + if (mydata.cur_page > 0) { + gotoPage(mydata.cur_page-1); + } + break; + case 243: // Next page + if (mydata.cur_page < (mydata.num_page-1)) { + gotoPage(mydata.cur_page+1); + } + break; + case 244: // Select directory + { + FileList files; + files.changeDir(getSelectedShortFilename()); + gotoPage(0); + } + break; + case 245: // Up directory + { + FileList files; + files.upDir(); + gotoPage(0); + } + break; + default: // File selected + if (tag < 240) { + mydata.selected_tag = tag; + #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) + mydata.scroll_pos = 0; + mydata.scroll_max = 0; + if (FTDI::ftdi_chip >= 810) { + const char *filename = getSelectedFilename(); + if (filename[0]) { + CommandProcessor cmd; + constexpr int dim[4] = {LIST_POS}; + const uint16_t text_width = cmd.font(font_medium).text_width(filename); + if (text_width > dim[2]) + mydata.scroll_max = text_width - dim[2] + MARGIN_L + MARGIN_R + 10; + } + } + #endif + } + break; + } + return true; +} + +void FilesScreen::onIdle() { + #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) + if (FTDI::ftdi_chip >= 810) { + CLCD::mem_write_32(CLCD::REG::MACRO_0, + VERTEX_TRANSLATE_X(-int32_t(mydata.scroll_pos))); + if (mydata.scroll_pos < mydata.scroll_max * 16) + mydata.scroll_pos++; + } + #endif +} + +void FilesScreen::onMediaRemoved() { + if (AT_SCREEN(FilesScreen)) GOTO_SCREEN(StatusScreen); +} + +#endif // FTDI_FILES_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.h new file mode 100644 index 000000000000..cb950d4cac5d --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/files_screen.h @@ -0,0 +1,68 @@ +/****************** + * files_screen.h * + ******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_FILES_SCREEN +#define FTDI_FILES_SCREEN_CLASS FilesScreen + +struct FilesScreenData { + struct { + uint8_t is_dir : 1; + uint8_t is_root : 1; + uint8_t is_empty : 1; + } flags; + uint8_t selected_tag; + uint8_t num_page; + uint8_t cur_page; + #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) + uint16_t scroll_pos; + uint16_t scroll_max; + #endif +}; + +class FilesScreen : public BaseScreen, public CachedScreen { + private: + static uint8_t getTagForLine(uint8_t line) {return line + 2;} + static uint8_t getLineForTag(uint8_t tag) {return tag - 2;} + static uint16_t getFileForTag(uint8_t tag); + static uint16_t getSelectedFileIndex(); + + inline static const char *getSelectedShortFilename() {return getSelectedFilename(true);} + static const char *getSelectedFilename(bool shortName = false); + + static void drawFileButton(int x, int y, int w, int h, const char *filename, uint8_t tag, bool is_dir, bool is_highlighted); + static void drawFileButton(const char *filename, uint8_t tag, bool is_dir, bool is_highlighted); + static void drawFileList(); + static void drawHeader(); + static void drawArrows(); + static void drawFooter(); + static void drawSelectedFile(); + + static void gotoPage(uint8_t); + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); + static void onMediaRemoved(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/z_offset_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/flow_percent_screen.cpp similarity index 62% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/z_offset_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/flow_percent_screen.cpp index 0acfbb07d624..be350bd9a7f3 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/z_offset_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/flow_percent_screen.cpp @@ -1,10 +1,9 @@ -/*********************** - * z_offset_screen.cpp * - ***********************/ +/*************************** + * flow_percent_screen.cpp * + ***************************/ /**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2021 - Cocoa Press * * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -21,34 +20,31 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && BOTH(HAS_LEVELING, HAS_BED_PROBE) - -#include "screens.h" +#ifdef FTDI_FLOW_PERCENT_SCREEN using namespace FTDI; using namespace ExtUI; -using namespace Theme; -void ZOffsetScreen::onRedraw(draw_mode_t what) { +void FlowPercentScreen::onRedraw(draw_mode_t what) { widgets_t w(what); - w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(GET_TEXT_F(MSG_UNITS_MM)); + w.precision(0).units(GET_TEXT_F(MSG_UNITS_PERCENT)); - w.heading( GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); - w.color(z_axis).adjuster(4, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), getZOffset_mm()); + w.heading(GET_TEXT_F(MSG_FLOW)); + w.adjuster(4, GET_TEXT_F(MSG_FLOW), getFlow_percent(E0)); w.increments(); } -bool ZOffsetScreen::onTouchHeld(uint8_t tag) { +bool FlowPercentScreen::onTouchHeld(uint8_t tag) { const float increment = getIncrement(); switch (tag) { - case 4: UI_DECREMENT(ZOffset_mm); break; - case 5: UI_INCREMENT(ZOffset_mm); break; + case 4: UI_DECREMENT(Flow_percent, E0); break; + case 5: UI_INCREMENT(Flow_percent, E0); break; default: return false; } - SaveSettingsDialogBox::settingsChanged(); return true; } -#endif // TOUCH_UI_FTDI_EVE && HAS_BED_PROBE +#endif // FTDI_FLOW_PERCENT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/flow_percent_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/flow_percent_screen.h new file mode 100644 index 000000000000..3e37531d1d6a --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/flow_percent_screen.h @@ -0,0 +1,31 @@ +/************************* + * flow_percent_screen.h * + *************************/ + +/**************************************************************************** + * Written By Marcio Teixeira 2021 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_FLOW_PERCENT_SCREEN +#define FTDI_FLOW_PERCENT_SCREEN_CLASS FlowPercentScreen + +class FlowPercentScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp similarity index 81% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp index 3d50b616fc55..5b160c80dfa6 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.cpp @@ -21,18 +21,17 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_INTERFACE_SETTINGS_SCREEN #include "../archim2-flash/flash_storage.h" -#include "../../../../../module/settings.h" +#include "../../../../module/settings.h" #if ENABLED(LULZBOT_PRINTCOUNTER) - #include "../../../../../module/printcounter.h" + #include "../../../../module/printcounter.h" #endif bool restoreEEPROM(); @@ -42,13 +41,14 @@ using namespace ExtUI; using namespace Theme; constexpr bool PERSISTENT_STORE_SUCCESS = false; // persistentStore uses true for error +constexpr static InterfaceSettingsScreenData &mydata = screen_data.InterfaceSettingsScreen; void InterfaceSettingsScreen::onStartup() { } void InterfaceSettingsScreen::onEntry() { - screen_data.InterfaceSettings.brightness = CLCD::get_brightness(); - screen_data.InterfaceSettings.volume = SoundPlayer::get_volume(); + mydata.brightness = CLCD::get_brightness(); + mydata.volume = SoundPlayer::get_volume(); BaseScreen::onEntry(); } @@ -58,11 +58,7 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { #define GRID_COLS 4 - #if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 7 - #else - #define GRID_ROWS 6 - #endif + #define GRID_ROWS TERN(TOUCH_UI_PORTRAIT, 7, 6) cmd.cmd(CLEAR_COLOR_RGB(bg_color)) .cmd(CLEAR(true,true,true)) @@ -77,44 +73,46 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { #if DISABLED(LCD_FYSETC_TFT81050) .text(BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_LCD_BRIGHTNESS), OPT_RIGHTX | OPT_CENTERY) #endif - .text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY) - .text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_SCREEN_LOCK), OPT_RIGHTX | OPT_CENTERY); + .text(BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY); + #if ENABLED(FTDI_LOCK_SCREEN) + cmd.text(BTN_POS(1,4), BTN_SIZE(2,1), GET_TEXT_F(MSG_SCREEN_LOCK), OPT_RIGHTX | OPT_CENTERY); + #endif #if DISABLED(TOUCH_UI_NO_BOOTSCREEN) - cmd.text(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BOOT_SCREEN), OPT_RIGHTX | OPT_CENTERY); + cmd.text(BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_BOOT_SCREEN), OPT_RIGHTX | OPT_CENTERY); #endif #undef EDGE_R } if (what & FOREGROUND) { - #if ENABLED(TOUCH_UI_PORTRAIT) - constexpr uint8_t w = 2; - #else - constexpr uint8_t w = 1; + #if ENABLED(FTDI_LOCK_SCREEN) || DISABLED(TOUCH_UI_NO_BOOTSCREEN) + constexpr uint8_t w = TERN(TOUCH_UI_PORTRAIT, 2, 1); #endif cmd.font(font_medium) #define EDGE_R 30 .colors(ui_slider) #if DISABLED(LCD_FYSETC_TFT81050) - .tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettings.brightness, 128) + .tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), mydata.brightness, 128) #endif - .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), screen_data.InterfaceSettings.volume, 0xFF) + .tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), mydata.volume, 0xFF) + #if ENABLED(FTDI_LOCK_SCREEN) .colors(ui_toggle) .tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled()) + #endif #if DISABLED(TOUCH_UI_NO_BOOTSCREEN) .tag(5).toggle2(BTN_POS(3,5), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::animations_enabled()) #endif #undef EDGE_R #define EDGE_R 0 - #if ENABLED(TOUCH_UI_PORTRAIT) .colors(normal_btn) + #if ENABLED(TOUCH_UI_PORTRAIT) .tag(6).button (BTN_POS(1,6), BTN_SIZE(4,1), GET_TEXT_F(MSG_SOUNDS)) .colors(action_btn) - .tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button (BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE)); #else .tag(6).button (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUNDS)) .colors(action_btn) - .tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button (BTN_POS(3,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_BUTTON_DONE)); #endif } } @@ -122,12 +120,14 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) { bool InterfaceSettingsScreen::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); return true; - case 4: - if (!LockScreen::is_enabled()) - LockScreen::enable(); - else - LockScreen::disable(); - break; + #if ENABLED(FTDI_LOCK_SCREEN) + case 4: + if (!LockScreen::is_enabled()) + LockScreen::enable(); + else + LockScreen::disable(); + break; + #endif case 5: UIData::enable_animations(!UIData::animations_enabled());; break; case 6: GOTO_SCREEN(InterfaceSoundsScreen); return true; default: @@ -161,13 +161,13 @@ void InterfaceSettingsScreen::onIdle() { CommandProcessor cmd; switch (cmd.track_tag(value)) { case 2: - screen_data.InterfaceSettings.brightness = max(11, (value * 128UL) / 0xFFFF); - CLCD::set_brightness(screen_data.InterfaceSettings.brightness); + mydata.brightness = max(11, (value * 128UL) / 0xFFFF); + CLCD::set_brightness(mydata.brightness); SaveSettingsDialogBox::settingsChanged(); break; case 3: - screen_data.InterfaceSettings.volume = value >> 8; - SoundPlayer::set_volume(screen_data.InterfaceSettings.volume); + mydata.volume = value >> 8; + SoundPlayer::set_volume(mydata.volume); SaveSettingsDialogBox::settingsChanged(); break; default: @@ -179,8 +179,7 @@ void InterfaceSettingsScreen::onIdle() { } void InterfaceSettingsScreen::failSafeSettings() { - // Reset settings that may make the printer interface - // unusable. + // Reset settings that may make the printer interface unusable. CLCD::mem_write_32(CLCD::REG::ROTATE, 0); CLCD::default_touch_transform(); CLCD::default_display_orientation(); @@ -191,7 +190,7 @@ void InterfaceSettingsScreen::failSafeSettings() { } void InterfaceSettingsScreen::defaultSettings() { - LockScreen::passcode = 0; + TERN_(FTDI_LOCK_SCREEN, LockScreen::passcode = 0); SoundPlayer::set_volume(255); CLCD::set_brightness(255); UIData::reset_persistent_data(); @@ -210,7 +209,7 @@ void InterfaceSettingsScreen::saveSettings(char *buff) { persistent_data_t eeprom; - eeprom.passcode = LockScreen::passcode; + eeprom.passcode = TERN0(FTDI_LOCK_SCREEN, LockScreen::passcode); eeprom.sound_volume = SoundPlayer::get_volume(); eeprom.display_brightness = CLCD::get_brightness(); eeprom.bit_flags = UIData::get_persistent_data(); @@ -239,7 +238,9 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) { SERIAL_ECHOLNPGM("Loading setting from EEPROM"); - LockScreen::passcode = eeprom.passcode; + #if ENABLED(FTDI_LOCK_SCREEN) + LockScreen::passcode = eeprom.passcode; + #endif SoundPlayer::set_volume(eeprom.sound_volume); UIData::set_persistent_data(eeprom.bit_flags); CLCD::set_brightness(eeprom.display_brightness); @@ -258,7 +259,7 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) { } #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE - #include "../../../../../HAL/shared/eeprom_api.h" + #include "../../../../HAL/shared/eeprom_api.h" bool restoreEEPROM() { uint8_t data[ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE]; @@ -268,10 +269,7 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) { if (success) success = persistentStore.write_data(0, data, ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE) == PERSISTENT_STORE_SUCCESS; - if (success) - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_EEPROM_RESTORED)); - else - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_EEPROM_RESET)); + StatusScreen::setStatusMessage(success ? GET_TEXT_F(MSG_EEPROM_RESTORED) : GET_TEXT_F(MSG_EEPROM_RESET)); return success; } @@ -288,4 +286,4 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) { } #endif -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_INTERFACE_SETTINGS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.h new file mode 100644 index 000000000000..f5ddbb10043a --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_settings_screen.h @@ -0,0 +1,67 @@ +/******************************* + * interface_settings_screen.h * + *******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_INTERFACE_SETTINGS_SCREEN +#define FTDI_INTERFACE_SETTINGS_SCREEN_CLASS InterfaceSettingsScreen + +struct InterfaceSettingsScreenData { + uint8_t volume; + uint8_t brightness; +}; + +class InterfaceSettingsScreen : public BaseScreen, public CachedScreen { + private: + struct persistent_data_t { + uint32_t touch_transform_a; + uint32_t touch_transform_b; + uint32_t touch_transform_c; + uint32_t touch_transform_d; + uint32_t touch_transform_e; + uint32_t touch_transform_f; + uint16_t passcode; + uint8_t display_brightness; + int8_t display_h_offset_adj; + int8_t display_v_offset_adj; + uint8_t sound_volume; + uint8_t bit_flags; + uint8_t event_sounds[InterfaceSoundsScreen::NUM_EVENTS]; + }; + + public: + #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE + static bool backupEEPROM(); + #endif + + static void saveSettings(char *); + static void loadSettings(const char *); + static void defaultSettings(); + static void failSafeSettings(); + + static void onStartup(); + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchStart(uint8_t tag); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp similarity index 70% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp index 9f21c6b8c737..889fd606840c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.cpp @@ -21,11 +21,10 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_INTERFACE_SOUNDS_SCREEN using namespace FTDI; using namespace Theme; @@ -75,8 +74,7 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) { #undef EDGE_R #define EDGE_R 30 .font(font_small) - .tag(0).text (BTN_POS(1,2), BTN_SIZE(2,1), GET_TEXT_F(MSG_SOUND_VOLUME), OPT_RIGHTX | OPT_CENTERY) - .text (BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_CLICK_SOUNDS), OPT_RIGHTX | OPT_CENTERY) + .tag(0).text (BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_CLICK_SOUNDS), OPT_RIGHTX | OPT_CENTERY) .text (BTN_POS(1,5), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_STARTING), OPT_RIGHTX | OPT_CENTERY) .text (BTN_POS(1,6), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_FINISHED), OPT_RIGHTX | OPT_CENTERY) .text (BTN_POS(1,7), BTN_SIZE(2,1), GET_TEXT_F(MSG_PRINT_ERROR), OPT_RIGHTX | OPT_CENTERY); @@ -90,35 +88,33 @@ void InterfaceSoundsScreen::onRedraw(draw_mode_t what) { constexpr uint8_t w = 1; #endif - cmd.font(font_medium) - .colors(ui_slider) + cmd.font(font_small) #define EDGE_R 30 - .tag(2).slider (BTN_POS(3,2), BTN_SIZE(2,1), screen_data.InterfaceSettings.volume, 0xFF) .colors(ui_toggle) - .tag(3).toggle2 (BTN_POS(3,3), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::touch_sounds_enabled()) + .tag(2).toggle2 (BTN_POS(3,3), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::touch_sounds_enabled()) #undef EDGE_R .colors(normal_btn) #define EDGE_R 0 - .tag(4).button (BTN_POS(3,5), BTN_SIZE(2,1), getSoundSelection(PRINTING_STARTED)) - .tag(5).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED)) - .tag(6).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED)) + .tag(3).button (BTN_POS(3,5), BTN_SIZE(2,1), getSoundSelection(PRINTING_STARTED)) + .tag(4).button (BTN_POS(3,6), BTN_SIZE(2,1), getSoundSelection(PRINTING_FINISHED)) + .tag(5).button (BTN_POS(3,7), BTN_SIZE(2,1), getSoundSelection(PRINTING_FAILED)) .colors(action_btn) - .tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button (BTN_POS(1,9), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE)); } } void InterfaceSoundsScreen::onEntry() { - screen_data.InterfaceSettings.volume = SoundPlayer::get_volume(); + screen_data.InterfaceSettingsScreen.volume = SoundPlayer::get_volume(); BaseScreen::onEntry(); } bool InterfaceSoundsScreen::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_PREVIOUS(); return true; - case 3: UIData::enable_touch_sounds(!UIData::touch_sounds_enabled()); break; - case 4: toggleSoundSelection(PRINTING_STARTED); break; - case 5: toggleSoundSelection(PRINTING_FINISHED); break; - case 6: toggleSoundSelection(PRINTING_FAILED); break; + case 2: UIData::enable_touch_sounds(!UIData::touch_sounds_enabled()); break; + case 3: toggleSoundSelection(PRINTING_STARTED); break; + case 4: toggleSoundSelection(PRINTING_FINISHED); break; + case 5: toggleSoundSelection(PRINTING_FAILED); break; default: return false; } @@ -126,35 +122,4 @@ bool InterfaceSoundsScreen::onTouchEnd(uint8_t tag) { return true; } -bool InterfaceSoundsScreen::onTouchStart(uint8_t tag) { - CommandProcessor cmd; - #undef EDGE_R - #define EDGE_R 30 - switch (tag) { - case 2: cmd.track_linear(BTN_POS(3,2), BTN_SIZE(2,1), 2).execute(); break; - default: break; - } - return true; -} - -void InterfaceSoundsScreen::onIdle() { - if (refresh_timer.elapsed(TOUCH_UPDATE_INTERVAL)) { - refresh_timer.start(); - - uint16_t value; - CommandProcessor cmd; - switch (cmd.track_tag(value)) { - case 2: - screen_data.InterfaceSettings.volume = value >> 8; - SoundPlayer::set_volume(screen_data.InterfaceSettings.volume); - SaveSettingsDialogBox::settingsChanged(); - break; - default: - return; - } - onRefresh(); - } - BaseScreen::onIdle(); -} - -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_INTERFACE_SOUNDS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.h new file mode 100644 index 000000000000..258fc77c26c0 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/interface_sounds_screen.h @@ -0,0 +1,55 @@ +/***************************** + * interface_sounds_screen.h * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_INTERFACE_SOUNDS_SCREEN +#define FTDI_INTERFACE_SOUNDS_SCREEN_CLASS InterfaceSoundsScreen + +class InterfaceSoundsScreen : public BaseScreen, public CachedScreen { + public: + enum event_t { + PRINTING_STARTED = 0, + PRINTING_FINISHED = 1, + PRINTING_FAILED = 2, + + NUM_EVENTS + }; + + private: + friend class InterfaceSettingsScreen; + + static uint8_t event_sounds[NUM_EVENTS]; + + static const char* getSoundSelection(event_t); + static void toggleSoundSelection(event_t); + static void setSoundSelection(event_t, const FTDI::SoundPlayer::sound_t*); + + public: + static void playEventSound(event_t, FTDI::play_mode_t = FTDI::PLAY_ASYNCHRONOUS); + + static void defaultSettings(); + + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/jerk_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/jerk_screen.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/jerk_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/jerk_screen.cpp index 9c751bc34521..4331cb7089cb 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/jerk_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/jerk_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, CLASSIC_JERK) - -#include "screens.h" +#ifdef FTDI_JERK_SCREEN using namespace FTDI; using namespace ExtUI; @@ -62,4 +61,4 @@ bool JerkScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && CLASSIC_JERK +#endif // FTDI_JERK_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/jerk_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/jerk_screen.h new file mode 100644 index 000000000000..5f7acb29608d --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/jerk_screen.h @@ -0,0 +1,32 @@ +/***************** + * jerk_screen.h * + *****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_JERK_SCREEN +#define FTDI_JERK_SCREEN_CLASS JerkScreen + +class JerkScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/junction_deviation_screen.cpp similarity index 90% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/junction_deviation_screen.cpp index 329fa6c97f42..98e48167908f 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/junction_deviation_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/junction_deviation_screen.cpp @@ -1,6 +1,6 @@ -/******************* - * boot_screen.cpp * - *******************/ +/********************************* + * junction_deviation_screen.cpp * + *********************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, HAS_JUNCTION_DEVIATION) - -#include "screens.h" +#ifdef FTDI_JUNCTION_DEVIATION_SCREEN using namespace FTDI; using namespace ExtUI; @@ -51,4 +50,4 @@ bool JunctionDeviationScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && !CLASSIC_JERK +#endif // FTDI_JUNCTION_DEVIATION_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/junction_deviation_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/junction_deviation_screen.h new file mode 100644 index 000000000000..2239e2a4500e --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/junction_deviation_screen.h @@ -0,0 +1,32 @@ +/******************************* + * junction_deviation_screen.h * + *******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_JUNCTION_DEVIATION_SCREEN +#define FTDI_JUNCTION_DEVIATION_SCREEN_CLASS JunctionDeviationScreen + +class JunctionDeviationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/kill_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/kill_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.cpp index 273da348c1d9..bb44a8717693 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/kill_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_KILL_SCREEN using namespace FTDI; @@ -59,4 +58,4 @@ void KillScreen::show(const char *message) { InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED, PLAY_SYNCHRONOUS); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_KILL_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.h new file mode 100644 index 000000000000..b6d94958848a --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/kill_screen.h @@ -0,0 +1,33 @@ +/***************** + * kill_screen.h * + *****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_KILL_SCREEN +#define FTDI_KILL_SCREEN_CLASS KillScreen + +class KillScreen { + // The KillScreen is behaves differently than the + // others, so we do not bother extending UIScreen. + public: + static void show(const char*); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/language_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/language_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp index 6c5dfcfa9fb5..ce6045018b10 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/language_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.cpp @@ -21,11 +21,11 @@ ****************************************************************************/ #include "../config.h" -#include "../language/language.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && NUM_LANGUAGES > 1 +#ifdef FTDI_LANGUAGE_MENU -#include "screens.h" +#include "../language/language.h" using namespace FTDI; using namespace Theme; @@ -63,4 +63,4 @@ bool LanguageMenu::onTouchEnd(uint8_t tag) { return false; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_LANGUAGE_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.h new file mode 100644 index 000000000000..a86333363f4b --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/language_menu.h @@ -0,0 +1,32 @@ +/******************* + * language_menu.h * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_LANGUAGE_MENU +#define FTDI_LANGUAGE_MENU_CLASS LanguageMenu + +class LanguageMenu : public BaseScreen, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp new file mode 100644 index 000000000000..05845a975521 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -0,0 +1,140 @@ +/********************* + * leveling_menu.cpp * + *********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" + +#ifdef FTDI_LEVELING_MENU + +#if BOTH(HAS_BED_PROBE,BLTOUCH) + #include "../../../../feature/bltouch.h" +#endif + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +#if ENABLED(TOUCH_UI_PORTRAIT) + #define GRID_ROWS 8 + #define GRID_COLS 2 + #define LEVELING_TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1) + #define LEVEL_AXIS_POS BTN_POS(1,2), BTN_SIZE(2,1) + #define BED_MESH_TITLE_POS BTN_POS(1,3), BTN_SIZE(2,1) + #define PROBE_BED_POS BTN_POS(1,4), BTN_SIZE(1,1) + #define TEST_MESH_POS BTN_POS(2,4), BTN_SIZE(1,1) + #define SHOW_MESH_POS BTN_POS(1,5), BTN_SIZE(1,1) + #define EDIT_MESH_POS BTN_POS(2,5), BTN_SIZE(1,1) + #define BLTOUCH_TITLE_POS BTN_POS(1,6), BTN_SIZE(2,1) + #define BLTOUCH_RESET_POS BTN_POS(1,7), BTN_SIZE(1,1) + #define BLTOUCH_TEST_POS BTN_POS(2,7), BTN_SIZE(1,1) + #define BACK_POS BTN_POS(1,8), BTN_SIZE(2,1) +#else + #define GRID_ROWS 6 + #define GRID_COLS 3 + #define LEVELING_TITLE_POS BTN_POS(1,1), BTN_SIZE(3,1) + #define LEVEL_AXIS_POS BTN_POS(1,2), BTN_SIZE(3,1) + #define BED_MESH_TITLE_POS BTN_POS(1,3), BTN_SIZE(2,1) + #define PROBE_BED_POS BTN_POS(1,4), BTN_SIZE(1,1) + #define TEST_MESH_POS BTN_POS(2,4), BTN_SIZE(1,1) + #define SHOW_MESH_POS BTN_POS(1,5), BTN_SIZE(1,1) + #define EDIT_MESH_POS BTN_POS(2,5), BTN_SIZE(1,1) + #define BLTOUCH_TITLE_POS BTN_POS(3,3), BTN_SIZE(1,1) + #define BLTOUCH_RESET_POS BTN_POS(3,4), BTN_SIZE(1,1) + #define BLTOUCH_TEST_POS BTN_POS(3,5), BTN_SIZE(1,1) + #define BACK_POS BTN_POS(1,6), BTN_SIZE(3,1) +#endif + +void LevelingMenu::onRedraw(draw_mode_t what) { + if (what & BACKGROUND) { + CommandProcessor cmd; + cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) + .cmd(CLEAR(true,true,true)) + .tag(0); + } + + if (what & FOREGROUND) { + CommandProcessor cmd; + cmd.font(font_large) + .cmd(COLOR_RGB(bg_text_enabled)) + .text(LEVELING_TITLE_POS, GET_TEXT_F(MSG_AXIS_LEVELING)) + .text(BED_MESH_TITLE_POS, GET_TEXT_F(MSG_BED_LEVELING)) + #if ENABLED(BLTOUCH) + .text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH)) + #endif + .font(font_medium).colors(normal_btn) + .enabled(EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)) + .tag(2).button(LEVEL_AXIS_POS, GET_TEXT_F(MSG_LEVEL_X_AXIS)) + .enabled(ENABLED(HAS_BED_PROBE)) + .tag(3).button(PROBE_BED_POS, GET_TEXT_F(MSG_PROBE_BED)) + .enabled(ENABLED(HAS_MESH)) + .tag(4).button(SHOW_MESH_POS, GET_TEXT_F(MSG_MESH_VIEW)) + .enabled(ENABLED(HAS_MESH)) + .tag(5).button(EDIT_MESH_POS, GET_TEXT_F(MSG_EDIT_MESH)) + .enabled(ENABLED(G26_MESH_VALIDATION)) + .tag(6).button(TEST_MESH_POS, GET_TEXT_F(MSG_PRINT_TEST)) + #if ENABLED(BLTOUCH) + .tag(7).button(BLTOUCH_RESET_POS, GET_TEXT_F(MSG_BLTOUCH_RESET)) + .tag(8).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST)) + #endif + .colors(action_btn) + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); + } +} + +bool LevelingMenu::onTouchEnd(uint8_t tag) { + switch (tag) { + case 1: GOTO_PREVIOUS(); break; + #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) + case 2: SpinnerDialogBox::enqueueAndWait(F("G34")); break; + #endif + #if HAS_BED_PROBE + case 3: + #ifndef BED_LEVELING_COMMANDS + #define BED_LEVELING_COMMANDS "G29" + #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) + BedMeshViewScreen::doProbe(); + #else + SpinnerDialogBox::enqueueAndWait(F(BED_LEVELING_COMMANDS)); + #endif + break; + #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) + case 4: BedMeshViewScreen::show(); break; + case 5: BedMeshEditScreen::show(); break; + #endif + #if ENABLED(G26_MESH_VALIDATION) + case 6: + GOTO_SCREEN(StatusScreen); + injectCommands_P(PSTR("G28\nM117 Heating...\nG26 R X0 Y0\nG27")); + break; + #endif + #if ENABLED(BLTOUCH) + case 7: injectCommands_P(PSTR("M280 P0 S60")); break; + case 8: SpinnerDialogBox::enqueueAndWait(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; + #endif + default: return false; + } + return true; +} + +#endif // FTDI_LEVELING_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.h new file mode 100644 index 000000000000..aaf852be6cf6 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.h @@ -0,0 +1,32 @@ +/******************* + * leveling_menu.h * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_LEVELING_MENU +#define FTDI_LEVELING_MENU_CLASS LevelingMenu + +class LevelingMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/linear_advance_screen.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/linear_advance_screen.cpp index 2feaa032955e..e3b59eef5ce3 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/linear_advance_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/linear_advance_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, LIN_ADVANCE) - -#include "screens.h" +#ifdef FTDI_LINEAR_ADVANCE_SCREEN using namespace FTDI; using namespace ExtUI; @@ -74,4 +73,4 @@ bool LinearAdvanceScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_LINEAR_ADVANCE_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/linear_advance_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/linear_advance_screen.h new file mode 100644 index 000000000000..8c083c8aebaf --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/linear_advance_screen.h @@ -0,0 +1,32 @@ +/*************************** + * linear_advance_screen.h * + ***************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_LINEAR_ADVANCE_SCREEN +#define FTDI_LINEAR_ADVANCE_SCREEN_CLASS LinearAdvanceScreen + +class LinearAdvanceScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/lock_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.cpp similarity index 89% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/lock_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.cpp index 766f414a110a..df8eabbe61be 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/lock_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.cpp @@ -21,21 +21,21 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_LOCK_SCREEN using namespace FTDI; using namespace Theme; uint16_t LockScreen::passcode = 0; +constexpr static LockScreenData &mydata = screen_data.LockScreen; void LockScreen::onEntry() { - const uint8_t siz = sizeof(screen_data.Lock.passcode); - memset(screen_data.Lock.passcode, '_', siz-1); - screen_data.Lock.passcode[siz-1] = '\0'; + const uint8_t siz = sizeof(mydata.passcode); + memset(mydata.passcode, '_', siz-1); + mydata.passcode[siz-1] = '\0'; BaseScreen::onEntry(); } @@ -63,7 +63,7 @@ void LockScreen::onRedraw(draw_mode_t what) { #define MARGIN_T 3 #define MARGIN_B 3 - progmem_str message; + FSTR_P message; switch (message_style()) { case 'w': message = GET_TEXT_F(MSG_PASSCODE_REJECTED); @@ -84,11 +84,11 @@ void LockScreen::onRedraw(draw_mode_t what) { #if ENABLED(TOUCH_UI_PORTRAIT) .text(BTN_POS(1,2), BTN_SIZE(1,1), message) .font(font_xlarge) - .text(BTN_POS(1,4), BTN_SIZE(1,1), screen_data.Lock.passcode) + .text(BTN_POS(1,4), BTN_SIZE(1,1), mydata.passcode) #else .text(BTN_POS(1,1), BTN_SIZE(1,1), message) .font(font_xlarge) - .text(BTN_POS(1,2), BTN_SIZE(1,1), screen_data.Lock.passcode) + .text(BTN_POS(1,2), BTN_SIZE(1,1), mydata.passcode) #endif .font(font_large) .colors(normal_btn) @@ -117,8 +117,8 @@ void LockScreen::onRedraw(draw_mode_t what) { char &LockScreen::message_style() { // We use the last byte of the passcode string as a flag to indicate, // which message to show. - constexpr uint8_t last_char = sizeof(screen_data.Lock.passcode)-1; - return screen_data.Lock.passcode[last_char]; + constexpr uint8_t last_char = sizeof(mydata.passcode)-1; + return mydata.passcode[last_char]; } void LockScreen::onPasscodeEntered() { @@ -145,10 +145,10 @@ void LockScreen::onPasscodeEntered() { } bool LockScreen::onTouchEnd(uint8_t tag) { - char *c = strchr(screen_data.Lock.passcode,'_'); + char *c = strchr(mydata.passcode,'_'); if (c) { if (tag == '<') { - if (c != screen_data.Lock.passcode) { + if (c != mydata.passcode) { // Backspace deletes previous entered characters. *--c = '_'; } @@ -167,7 +167,7 @@ bool LockScreen::onTouchEnd(uint8_t tag) { uint16_t LockScreen::compute_checksum() { uint16_t checksum = 0; - const char* c = screen_data.Lock.passcode; + const char* c = mydata.passcode; while (*c) { checksum = (checksum << 2) ^ *c++; } @@ -202,4 +202,4 @@ void LockScreen::enable() { GOTO_SCREEN(LockScreen); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_LOCK_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h new file mode 100644 index 000000000000..b73424fc5a5f --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/lock_screen.h @@ -0,0 +1,53 @@ +/***************** + * lock_screen.h * + *****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_LOCK_SCREEN +#define FTDI_LOCK_SCREEN_CLASS LockScreen + +struct LockScreenData { + char passcode[5]; +}; + +class LockScreen : public BaseScreen, public CachedScreen { + private: + friend InterfaceSettingsScreen; + + static uint16_t passcode; + + static char & message_style(); + static uint16_t compute_checksum(); + static void onPasscodeEntered(); + public: + static bool is_enabled(); + static void check_passcode(); + static void enable(); + static void disable(); + + static void set_hash(uint16_t pass) { passcode = pass; } + static uint16_t get_hash() { return passcode; } + + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp similarity index 89% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp index 146b799c2062..a6c39db79606 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp @@ -22,10 +22,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && NONE(TOUCH_UI_LULZBOT_BIO,TOUCH_UI_COCOA_PRESS) - -#include "screens.h" +#ifdef FTDI_MAIN_MENU using namespace FTDI; using namespace Theme; @@ -42,9 +41,9 @@ void MainMenu::onRedraw(draw_mode_t what) { #define GRID_COLS 2 #define ABOUT_PRINTER_POS BTN_POS(1,1), BTN_SIZE(2,1) #define ADVANCED_SETTINGS_POS BTN_POS(1,2), BTN_SIZE(2,1) - #if ENABLED(CUSTOM_USER_MENUS) + #if ENABLED(CUSTOM_MENU_MAIN) #define FILAMENTCHANGE_POS BTN_POS(1,3), BTN_SIZE(1,1) - #define CUSTOM_USER_MENUS_POS BTN_POS(2,3), BTN_SIZE(1,1) + #define CUSTOM_MENU_POS BTN_POS(2,3), BTN_SIZE(1,1) #else #define FILAMENTCHANGE_POS BTN_POS(1,3), BTN_SIZE(2,1) #endif @@ -64,10 +63,10 @@ void MainMenu::onRedraw(draw_mode_t what) { #define CLEAN_NOZZLE_POS BTN_POS(4,2), BTN_SIZE(3,1) #define MOVE_AXIS_POS BTN_POS(1,3), BTN_SIZE(3,1) #define DISABLE_STEPPERS_POS BTN_POS(4,3), BTN_SIZE(3,1) - #if ENABLED(CUSTOM_USER_MENUS) + #if ENABLED(CUSTOM_MENU_MAIN) #define TEMPERATURE_POS BTN_POS(1,4), BTN_SIZE(2,1) #define FILAMENTCHANGE_POS BTN_POS(3,4), BTN_SIZE(2,1) - #define CUSTOM_USER_MENUS_POS BTN_POS(5,4), BTN_SIZE(2,1) + #define CUSTOM_MENU_POS BTN_POS(5,4), BTN_SIZE(2,1) #else #define TEMPERATURE_POS BTN_POS(1,4), BTN_SIZE(3,1) #define FILAMENTCHANGE_POS BTN_POS(4,4), BTN_SIZE(3,1) @@ -92,11 +91,11 @@ void MainMenu::onRedraw(draw_mode_t what) { .enabled(TERN_(HAS_LEVELING, 1)) .tag( 9).button(LEVELING_POS, GET_TEXT_F(MSG_LEVELING)) .tag(10).button(ABOUT_PRINTER_POS, GET_TEXT_F(MSG_INFO_MENU)) - #if ENABLED(CUSTOM_USER_MENUS) - .tag(11).button(CUSTOM_USER_MENUS_POS, GET_TEXT_F(MSG_USER_MENU)) + #if ENABLED(CUSTOM_MENU_MAIN) + .tag(11).button(CUSTOM_MENU_POS, GET_TEXT_F(MSG_CUSTOM_COMMANDS)) #endif .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } } @@ -105,7 +104,7 @@ bool MainMenu::onTouchEnd(uint8_t tag) { switch (tag) { case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; - case 2: SpinnerDialogBox::enqueueAndWait_P(F("G28")); break; + case 2: SpinnerDialogBox::enqueueAndWait(F("G28")); break; #if ENABLED(NOZZLE_CLEAN_FEATURE) case 3: injectCommands_P(PSTR("G12")); GOTO_SCREEN(StatusScreen); break; #endif @@ -118,7 +117,7 @@ bool MainMenu::onTouchEnd(uint8_t tag) { case 9: GOTO_SCREEN(LevelingMenu); break; #endif case 10: GOTO_SCREEN(AboutScreen); break; - #if ENABLED(CUSTOM_USER_MENUS) + #if ENABLED(CUSTOM_MENU_MAIN) case 11: GOTO_SCREEN(CustomUserMenus); break; #endif @@ -128,4 +127,4 @@ bool MainMenu::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && !TOUCH_UI_LULZBOT_BIO +#endif // FTDI_MAIN_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.h new file mode 100644 index 000000000000..ac1300e1b8e4 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.h @@ -0,0 +1,33 @@ +/*************** + * main_menu.h * + ***************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2019 - Cocoa Press * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_MAIN_MENU +#define FTDI_MAIN_MENU_CLASS MainMenu + +class MainMenu : public BaseScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/max_acceleration_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_acceleration_screen.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/max_acceleration_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_acceleration_screen.cpp index fdbb9623b5e5..be3a24438018 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/max_acceleration_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_acceleration_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_MAX_ACCELERATION_SCREEN using namespace FTDI; using namespace ExtUI; @@ -83,4 +82,4 @@ bool MaxAccelerationScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_MAX_ACCELERATION_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_acceleration_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_acceleration_screen.h new file mode 100644 index 000000000000..87a79b3bd9bc --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_acceleration_screen.h @@ -0,0 +1,32 @@ +/***************************** + * max_acceleration_screen.h * + *****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_MAX_ACCELERATION_SCREEN +#define FTDI_MAX_ACCELERATION_SCREEN_CLASS MaxAccelerationScreen + +class MaxAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/max_velocity_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/max_velocity_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.cpp index ac1374b99aef..bca533c94f19 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/max_velocity_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_MAX_VELOCITY_SCREEN using namespace FTDI; using namespace ExtUI; @@ -87,4 +86,4 @@ bool MaxVelocityScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_MAX_VELOCITY_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.h new file mode 100644 index 000000000000..e904a2c05899 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.h @@ -0,0 +1,32 @@ +/************************* + * max_velocity_screen.h * + *************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_MAX_VELOCITY_SCREEN +#define FTDI_MAX_VELOCITY_SCREEN_CLASS MaxVelocityScreen + +class MaxVelocityScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/media_player_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.cpp similarity index 98% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/media_player_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.cpp index eb0b78a325fe..061c8555df54 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/media_player_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.cpp @@ -21,6 +21,7 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" /** * The MediaPlayerScreen allows an AVI to be played. @@ -39,9 +40,7 @@ * ffmpeg -i video.avi -i silence.wav -c copy -map 0:v:0 -map 1:a:0 startup.avi */ -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_MEDIA_PLAYER_SCREEN #include "../archim2-flash/flash_storage.h" #include "../archim2-flash/media_file_reader.h" @@ -165,4 +164,4 @@ void MediaPlayerScreen::playStream(void *obj, media_streamer_func_t *data_stream #endif // FTDI_API_LEVEL >= 810 } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_MEDIA_PLAYER_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.h new file mode 100644 index 000000000000..510d5a938634 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/media_player_screen.h @@ -0,0 +1,40 @@ +/************************* + * media_player_screen.h * + *************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_MEDIA_PLAYER_SCREEN +#define FTDI_MEDIA_PLAYER_SCREEN_CLASS MediaPlayerScreen + +class MediaPlayerScreen : public BaseScreen, public UncachedScreen { + private: + typedef int16_t media_streamer_func_t(void *obj, void *buff, size_t bytes); + + public: + static bool playCardMedia(); + static bool playBootMedia(); + + static void onEntry(); + static void onRedraw(draw_mode_t); + + static void playStream(void *obj, media_streamer_func_t*); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/move_axis_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp similarity index 66% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/move_axis_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp index ba38918b1c85..a3c3b503d89c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/move_axis_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.cpp @@ -21,15 +21,16 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_MOVE_AXIS_SCREEN using namespace FTDI; using namespace ExtUI; +constexpr static MoveAxisScreenData &mydata = screen_data.MoveAxisScreen; + void BaseMoveAxisScreen::onEntry() { // Since Marlin keeps only one absolute position for all the extruders, // we have to keep track of the relative motion of individual extruders @@ -37,7 +38,7 @@ void BaseMoveAxisScreen::onEntry() { // screen is entered. LOOP_L_N(i, ExtUI::extruderCount) { - screen_data.MoveAxis.e_rel[i] = 0; + mydata.e_rel[i] = 0; } BaseNumericAdjustmentScreen::onEntry(); } @@ -54,23 +55,26 @@ void MoveAxisScreen::onRedraw(draw_mode_t what) { w.color(Theme::e_axis); #if EXTRUDERS == 1 - w.adjuster( 8, GET_TEXT_F(MSG_AXIS_E), screen_data.MoveAxis.e_rel[0], canMove(E0)); + w.adjuster( 8, GET_TEXT_F(MSG_AXIS_E), mydata.e_rel[0], canMove(E0)); #elif HAS_MULTI_EXTRUDER - w.adjuster( 8, GET_TEXT_F(MSG_AXIS_E1), screen_data.MoveAxis.e_rel[0], canMove(E0)); - w.adjuster( 10, GET_TEXT_F(MSG_AXIS_E2), screen_data.MoveAxis.e_rel[1], canMove(E1)); + w.adjuster( 8, GET_TEXT_F(MSG_AXIS_E1), mydata.e_rel[0], canMove(E0)); + w.adjuster( 10, GET_TEXT_F(MSG_AXIS_E2), mydata.e_rel[1], canMove(E1)); #if EXTRUDERS > 2 - w.adjuster( 12, GET_TEXT_F(MSG_AXIS_E3), screen_data.MoveAxis.e_rel[2], canMove(E2)); + w.adjuster( 12, GET_TEXT_F(MSG_AXIS_E3), mydata.e_rel[2], canMove(E2)); #endif #if EXTRUDERS > 3 - w.adjuster( 14, GET_TEXT_F(MSG_AXIS_E4), screen_data.MoveAxis.e_rel[3], canMove(E3)); + w.adjuster( 14, GET_TEXT_F(MSG_AXIS_E4), mydata.e_rel[3], canMove(E3)); #endif #endif + #if Z_HOME_TO_MIN + w.button(24, GET_TEXT_F(MSG_MOVE_Z_TO_TOP), !axis_should_home(Z_AXIS)); + #endif w.increments(); } bool BaseMoveAxisScreen::onTouchHeld(uint8_t tag) { - #define UI_INCREMENT_AXIS(axis) UI_INCREMENT(AxisPosition_mm, axis); - #define UI_DECREMENT_AXIS(axis) UI_DECREMENT(AxisPosition_mm, axis); + #define UI_INCREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_INCREMENT(AxisPosition_mm, axis); + #define UI_DECREMENT_AXIS(axis) setManualFeedrate(axis, increment); UI_DECREMENT(AxisPosition_mm, axis); const float increment = getIncrement(); switch (tag) { case 2: UI_DECREMENT_AXIS(X); break; @@ -80,24 +84,25 @@ bool BaseMoveAxisScreen::onTouchHeld(uint8_t tag) { case 6: UI_DECREMENT_AXIS(Z); break; case 7: UI_INCREMENT_AXIS(Z); break; // For extruders, also update relative distances. - case 8: UI_DECREMENT_AXIS(E0); screen_data.MoveAxis.e_rel[0] -= increment; break; - case 9: UI_INCREMENT_AXIS(E0); screen_data.MoveAxis.e_rel[0] += increment; break; + case 8: UI_DECREMENT_AXIS(E0); mydata.e_rel[0] -= increment; break; + case 9: UI_INCREMENT_AXIS(E0); mydata.e_rel[0] += increment; break; #if HAS_MULTI_EXTRUDER - case 10: UI_DECREMENT_AXIS(E1); screen_data.MoveAxis.e_rel[1] -= increment; break; - case 11: UI_INCREMENT_AXIS(E1); screen_data.MoveAxis.e_rel[1] += increment; break; + case 10: UI_DECREMENT_AXIS(E1); mydata.e_rel[1] -= increment; break; + case 11: UI_INCREMENT_AXIS(E1); mydata.e_rel[1] += increment; break; #endif #if EXTRUDERS > 2 - case 12: UI_DECREMENT_AXIS(E2); screen_data.MoveAxis.e_rel[2] -= increment; break; - case 13: UI_INCREMENT_AXIS(E2); screen_data.MoveAxis.e_rel[2] += increment; break; + case 12: UI_DECREMENT_AXIS(E2); mydata.e_rel[2] -= increment; break; + case 13: UI_INCREMENT_AXIS(E2); mydata.e_rel[2] += increment; break; #endif #if EXTRUDERS > 3 - case 14: UI_DECREMENT_AXIS(E3); screen_data.MoveAxis.e_rel[3] -= increment; break; - case 15: UI_INCREMENT_AXIS(E3); screen_data.MoveAxis.e_rel[3] += increment; break; + case 14: UI_DECREMENT_AXIS(E3); mydata.e_rel[3] -= increment; break; + case 15: UI_INCREMENT_AXIS(E3); mydata.e_rel[3] += increment; break; #endif - case 20: SpinnerDialogBox::enqueueAndWait_P(F("G28X")); break; - case 21: SpinnerDialogBox::enqueueAndWait_P(F("G28Y")); break; - case 22: SpinnerDialogBox::enqueueAndWait_P(F("G28Z")); break; - case 23: SpinnerDialogBox::enqueueAndWait_P(F("G28")); break; + case 20: SpinnerDialogBox::enqueueAndWait(F("G28X")); break; + case 21: SpinnerDialogBox::enqueueAndWait(F("G28Y")); break; + case 22: SpinnerDialogBox::enqueueAndWait(F("G28Z")); break; + case 23: SpinnerDialogBox::enqueueAndWait(F("G28")); break; + case 24: raiseZtoTop(); break; default: return false; } @@ -106,12 +111,17 @@ bool BaseMoveAxisScreen::onTouchHeld(uint8_t tag) { return true; } +void BaseMoveAxisScreen::raiseZtoTop() { + constexpr xyze_feedrate_t homing_feedrate = HOMING_FEEDRATE_MM_M; + setAxisPosition_mm(Z_MAX_POS - 5, Z, homing_feedrate[Z_AXIS]); +} + float BaseMoveAxisScreen::getManualFeedrate(uint8_t axis, float increment_mm) { // Compute feedrate so that the tool lags the adjuster when it is // being held down, this allows enough margin for the planner to // connect segments and even out the motion. constexpr xyze_feedrate_t max_manual_feedrate = MANUAL_FEEDRATE; - return min(max_manual_feedrate[axis] / 60.0f, abs(increment_mm * (TOUCH_REPEATS_PER_SECOND) * 0.80f)); + return min(max_manual_feedrate[axis] / 60.0f, ABS(increment_mm * (TOUCH_REPEATS_PER_SECOND) * 0.80f)); } void BaseMoveAxisScreen::setManualFeedrate(ExtUI::axis_t axis, float increment_mm) { @@ -130,4 +140,4 @@ void MoveAxisScreen::onIdle() { BaseScreen::onIdle(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_MOVE_AXIS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h new file mode 100644 index 000000000000..16723cfc13bc --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/move_axis_screen.h @@ -0,0 +1,49 @@ +/********************** + * move_axis_screen.h * + **********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_MOVE_AXIS_SCREEN +#define FTDI_MOVE_AXIS_SCREEN_CLASS MoveAxisScreen + +struct MoveAxisScreenData { + struct BaseNumericAdjustmentScreenData placeholder; + float e_rel[ExtUI::extruderCount]; +}; + +class BaseMoveAxisScreen : public BaseNumericAdjustmentScreen { + private: + static float getManualFeedrate(uint8_t axis, float increment_mm); + public: + static void raiseZtoTop(); + static void setManualFeedrate(ExtUI::axis_t, float increment_mm); + static void setManualFeedrate(ExtUI::extruder_t, float increment_mm); + + static void onEntry(); + static bool onTouchHeld(uint8_t tag); +}; + +class MoveAxisScreen : public BaseMoveAxisScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nozzle_offsets_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nozzle_offsets_screen.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nozzle_offsets_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nozzle_offsets_screen.cpp index 85c7206b049f..288d06ea8e76 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nozzle_offsets_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nozzle_offsets_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, HAS_MULTI_HOTEND) - -#include "screens.h" +#ifdef FTDI_NOZZLE_OFFSETS_SCREEN using namespace FTDI; using namespace ExtUI; @@ -70,4 +69,4 @@ bool NozzleOffsetScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_NOZZLE_OFFSETS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nozzle_offsets_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nozzle_offsets_screen.h new file mode 100644 index 000000000000..763f3364ce3a --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nozzle_offsets_screen.h @@ -0,0 +1,33 @@ +/*************************** + * nozzle_offsets_screen.h * + ***************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_NOZZLE_OFFSETS_SCREEN +#define FTDI_NOZZLE_OFFSETS_SCREEN_CLASS NozzleOffsetScreen + +class NozzleOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nudge_nozzle_screen.cpp similarity index 70% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nudge_nozzle_screen.cpp index f0d3f7eec5ba..c1611100a98e 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/nudge_nozzle_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nudge_nozzle_screen.cpp @@ -21,22 +21,23 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if BOTH(TOUCH_UI_FTDI_EVE, BABYSTEPPING) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_NUDGE_NOZZLE_SCREEN using namespace FTDI; using namespace Theme; using namespace ExtUI; +constexpr static NudgeNozzleScreenData &mydata = screen_data.NudgeNozzleScreen; + void NudgeNozzleScreen::onEntry() { - screen_data.NudgeNozzle.show_offsets = false; + mydata.show_offsets = false; #if HAS_MULTI_EXTRUDER - screen_data.NudgeNozzle.link_nozzles = true; + mydata.link_nozzles = true; #endif - screen_data.NudgeNozzle.rel.reset(); + mydata.rel.reset(); BaseNumericAdjustmentScreen::onEntry(); } @@ -47,19 +48,19 @@ void NudgeNozzleScreen::onRedraw(draw_mode_t what) { w.heading(GET_TEXT_F(MSG_NUDGE_NOZZLE)); #if ENABLED(BABYSTEP_XY) - w.color(x_axis).adjuster(2, GET_TEXT_F(MSG_AXIS_X), screen_data.NudgeNozzle.rel.x / getAxisSteps_per_mm(X)); - w.color(y_axis).adjuster(4, GET_TEXT_F(MSG_AXIS_Y), screen_data.NudgeNozzle.rel.y / getAxisSteps_per_mm(Y)); + w.color(x_axis).adjuster(2, GET_TEXT_F(MSG_AXIS_X), mydata.rel.x / getAxisSteps_per_mm(X)); + w.color(y_axis).adjuster(4, GET_TEXT_F(MSG_AXIS_Y), mydata.rel.y / getAxisSteps_per_mm(Y)); #endif - w.color(z_axis).adjuster(6, GET_TEXT_F(MSG_AXIS_Z), screen_data.NudgeNozzle.rel.z / getAxisSteps_per_mm(Z)); + w.color(z_axis).adjuster(6, GET_TEXT_F(MSG_AXIS_Z), mydata.rel.z / getAxisSteps_per_mm(Z)); w.increments(); #if HAS_MULTI_EXTRUDER - w.toggle(8, GET_TEXT_F(MSG_ADJUST_BOTH_NOZZLES), screen_data.NudgeNozzle.link_nozzles); + w.toggle(8, GET_TEXT_F(MSG_ADJUST_BOTH_NOZZLES), mydata.link_nozzles); #endif #if HAS_MULTI_EXTRUDER || HAS_BED_PROBE - w.toggle(9, GET_TEXT_F(MSG_SHOW_OFFSETS), screen_data.NudgeNozzle.show_offsets); + w.toggle(9, GET_TEXT_F(MSG_SHOW_OFFSETS), mydata.show_offsets); - if (screen_data.NudgeNozzle.show_offsets) { + if (mydata.show_offsets) { char str[19]; w.draw_mode(BOTH); @@ -83,22 +84,22 @@ void NudgeNozzleScreen::onRedraw(draw_mode_t what) { bool NudgeNozzleScreen::onTouchHeld(uint8_t tag) { const float inc = getIncrement(); #if HAS_MULTI_EXTRUDER - const bool link = screen_data.NudgeNozzle.link_nozzles; + const bool link = mydata.link_nozzles; #else constexpr bool link = true; #endif int16_t steps; switch (tag) { - case 2: steps = mmToWholeSteps(inc, X); smartAdjustAxis_steps(-steps, X, link); screen_data.NudgeNozzle.rel.x -= steps; break; - case 3: steps = mmToWholeSteps(inc, X); smartAdjustAxis_steps( steps, X, link); screen_data.NudgeNozzle.rel.x += steps; break; - case 4: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps(-steps, Y, link); screen_data.NudgeNozzle.rel.y -= steps; break; - case 5: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps( steps, Y, link); screen_data.NudgeNozzle.rel.y += steps; break; - case 6: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps(-steps, Z, link); screen_data.NudgeNozzle.rel.z -= steps; break; - case 7: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps( steps, Z, link); screen_data.NudgeNozzle.rel.z += steps; break; + case 2: steps = mmToWholeSteps(inc, X); smartAdjustAxis_steps(-steps, X, link); mydata.rel.x -= steps; break; + case 3: steps = mmToWholeSteps(inc, X); smartAdjustAxis_steps( steps, X, link); mydata.rel.x += steps; break; + case 4: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps(-steps, Y, link); mydata.rel.y -= steps; break; + case 5: steps = mmToWholeSteps(inc, Y); smartAdjustAxis_steps( steps, Y, link); mydata.rel.y += steps; break; + case 6: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps(-steps, Z, link); mydata.rel.z -= steps; break; + case 7: steps = mmToWholeSteps(inc, Z); smartAdjustAxis_steps( steps, Z, link); mydata.rel.z += steps; break; #if HAS_MULTI_EXTRUDER - case 8: screen_data.NudgeNozzle.link_nozzles = !link; break; + case 8: mydata.link_nozzles = !link; break; #endif - case 9: screen_data.NudgeNozzle.show_offsets = !screen_data.NudgeNozzle.show_offsets; break; + case 9: mydata.show_offsets = !mydata.show_offsets; break; default: return false; } #if HAS_MULTI_EXTRUDER || HAS_BED_PROBE @@ -120,4 +121,4 @@ void NudgeNozzleScreen::onIdle() { reset_menu_timeout(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_NUDGE_NOZZLE_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nudge_nozzle_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nudge_nozzle_screen.h new file mode 100644 index 000000000000..c490a25fea40 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/nudge_nozzle_screen.h @@ -0,0 +1,44 @@ +/****************** + * nudge_nozzle.h * + ******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_NUDGE_NOZZLE_SCREEN +#define FTDI_NUDGE_NOZZLE_SCREEN_CLASS NudgeNozzleScreen + +struct NudgeNozzleScreenData { + struct BaseNumericAdjustmentScreenData placeholder; + xyz_int_t rel; + #if HAS_MULTI_EXTRUDER + bool link_nozzles; + #endif + bool show_offsets; +}; + +class NudgeNozzleScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + static bool onTouchHeld(uint8_t tag); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/restore_failsafe_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/restore_failsafe_dialog_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.cpp index 9be2239797d6..2dfd64fa5b1c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/restore_failsafe_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_RESTORE_FAILSAFE_DIALOG_BOX using namespace ExtUI; @@ -48,4 +47,4 @@ bool RestoreFailsafeDialogBox::onTouchEnd(uint8_t tag) { } } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_RESTORE_FAILSAFE_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.h new file mode 100644 index 000000000000..84a994730d32 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.h @@ -0,0 +1,32 @@ +/********************************* + * restore_failsafe_dialog_box.h * + *********************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_RESTORE_FAILSAFE_DIALOG_BOX +#define FTDI_RESTORE_FAILSAFE_DIALOG_BOX_CLASS RestoreFailsafeDialogBox + +class RestoreFailsafeDialogBox : public DialogBoxBaseClass, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/save_settings_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/save_settings_dialog_box.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp index eff0431a940d..5d92052aceaa 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/save_settings_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_SAVE_SETTINGS_DIALOG_BOX using namespace ExtUI; @@ -61,4 +60,8 @@ void SaveSettingsDialogBox::promptToSaveSettings() { GOTO_PREVIOUS(); // No save needed. } -#endif // TOUCH_UI_FTDI_EVE +void SaveSettingsDialogBox::promptToSaveAndStay() { + if (needs_save) GOTO_SCREEN(SaveSettingsDialogBox); +} + +#endif // FTDI_SAVE_SETTINGS_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.h new file mode 100644 index 000000000000..0cbadfbbe6c9 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.h @@ -0,0 +1,39 @@ +/****************************** + * save_settings_dialog_box.h * + ******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_SAVE_SETTINGS_DIALOG_BOX +#define FTDI_SAVE_SETTINGS_DIALOG_BOX_CLASS SaveSettingsDialogBox + +class SaveSettingsDialogBox : public DialogBoxBaseClass, public UncachedScreen { + private: + static bool needs_save; + + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + + static void promptToSaveSettings(); + static void promptToSaveAndStay(); + static void settingsChanged() {needs_save = true;} +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h new file mode 100644 index 000000000000..b88e51757690 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h @@ -0,0 +1,224 @@ +/************* + * screens.h * + *************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +/********************************* DL CACHE SLOTS ******************************/ + +// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This +// is done using the CLCD::DLCache class, which takes a unique ID for each +// cache location. These IDs are defined here: + +enum { + STATUS_SCREEN_CACHE, + MENU_SCREEN_CACHE, + TUNE_SCREEN_CACHE, + ALERT_BOX_CACHE, + SPINNER_CACHE, + ADVANCED_SETTINGS_SCREEN_CACHE, + MOVE_AXIS_SCREEN_CACHE, + TEMPERATURE_SCREEN_CACHE, + STEPS_SCREEN_CACHE, + MAX_FEEDRATE_SCREEN_CACHE, + MAX_VELOCITY_SCREEN_CACHE, + MAX_ACCELERATION_SCREEN_CACHE, + DEFAULT_ACCELERATION_SCREEN_CACHE, + FLOW_PERCENT_SCREEN_CACHE, + #if HAS_LEVELING + LEVELING_SCREEN_CACHE, + #if HAS_BED_PROBE + ZOFFSET_SCREEN_CACHE, + #endif + #if HAS_MESH + BED_MESH_VIEW_SCREEN_CACHE, + BED_MESH_EDIT_SCREEN_CACHE, + #endif + #endif + #if ENABLED(BABYSTEPPING) + ADJUST_OFFSETS_SCREEN_CACHE, + #endif + #if HAS_TRINAMIC_CONFIG + STEPPER_CURRENT_SCREEN_CACHE, + STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE, + #endif + #if HAS_MULTI_HOTEND + NOZZLE_OFFSET_SCREEN_CACHE, + #endif + #if ENABLED(BACKLASH_GCODE) + BACKLASH_COMPENSATION_SCREEN_CACHE, + #endif + #if HAS_JUNCTION_DEVIATION + JUNC_DEV_SCREEN_CACHE, + #else + JERK_SCREEN_CACHE, + #endif + #if ENABLED(CASE_LIGHT_ENABLE) + CASE_LIGHT_SCREEN_CACHE, + #endif + #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + FILAMENT_MENU_CACHE, + #endif + #if ENABLED(LIN_ADVANCE) + LINEAR_ADVANCE_SCREEN_CACHE, + #endif + #if ENABLED(FILAMENT_RUNOUT_SENSOR) + FILAMENT_RUNOUT_SCREEN_CACHE, + #endif + #if ENABLED(SDSUPPORT) + FILES_SCREEN_CACHE, + #endif + #if ENABLED(CUSTOM_MENU_MAIN) + CUSTOM_USER_MENUS_SCREEN_CACHE, + #endif + CHANGE_FILAMENT_SCREEN_CACHE, + INTERFACE_SETTINGS_SCREEN_CACHE, + INTERFACE_SOUNDS_SCREEN_CACHE, + LOCK_SCREEN_CACHE, + DISPLAY_TIMINGS_SCREEN_CACHE +}; + +// To save MCU RAM, the status message is "baked" in to the status screen +// cache, so we reserve a large chunk of memory for the DL cache + +#define STATUS_SCREEN_DL_SIZE 4096 +#define ALERT_BOX_DL_SIZE 3072 +#define SPINNER_DL_SIZE 3072 +#define FILE_SCREEN_DL_SIZE 4160 +#define PRINTING_SCREEN_DL_SIZE 2048 + +/************************* MENU SCREEN DECLARATIONS *************************/ + +#include "base_screen.h" +#include "base_numeric_adjustment_screen.h" +#include "dialog_box_base_class.h" +#include "status_screen.h" +#include "main_menu.h" +#include "advanced_settings_menu.h" +#include "tune_menu.h" +#include "boot_screen.h" +#include "about_screen.h" +#include "kill_screen.h" +#include "alert_dialog_box.h" +#include "spinner_dialog_box.h" +#include "restore_failsafe_dialog_box.h" +#include "save_settings_dialog_box.h" +#include "confirm_start_print_dialog_box.h" +#include "confirm_abort_print_dialog_box.h" +#include "confirm_user_request_alert_box.h" +#include "touch_calibration_screen.h" +#include "touch_registers_screen.h" +#include "change_filament_screen.h" +#include "move_axis_screen.h" +#include "steps_screen.h" +#include "feedrate_percent_screen.h" +#include "max_velocity_screen.h" +#include "max_acceleration_screen.h" +#include "default_acceleration_screen.h" +#include "temperature_screen.h" +#include "interface_sounds_screen.h" +#include "interface_settings_screen.h" +#include "lock_screen.h" +#include "endstop_state_screen.h" +#include "display_tuning_screen.h" +#include "media_player_screen.h" + +#if ENABLED(PRINTCOUNTER) + #include "statistics_screen.h" +#endif + +#if HAS_TRINAMIC_CONFIG + #include "stepper_current_screen.h" + #include "stepper_bump_sensitivity_screen.h" +#endif + +#if HAS_MULTI_HOTEND + #include "nozzle_offsets_screen.h" +#endif + +#if HAS_LEVELING + #if ENABLED(TOUCH_UI_SYNDAVER_LEVEL) + #include "syndaver_level/leveling_menu.h" + #else + #include "leveling_menu.h" + #endif + #if HAS_BED_PROBE + #include "z_offset_screen.h" + #endif + #if HAS_MESH + #include "bed_mesh_base.h" + #include "bed_mesh_view_screen.h" + #include "bed_mesh_edit_screen.h" + #endif +#endif + +#if ENABLED(CALIBRATION_GCODE) + #include "confirm_auto_calibration_dialog_box.h" +#endif + +#if ENABLED(BABYSTEPPING) + #include "nudge_nozzle_screen.h" +#endif + +#if ENABLED(BACKLASH_GCODE) + #include "backlash_compensation_screen.h" +#endif + +#if HAS_JUNCTION_DEVIATION + #include "junction_deviation_screen.h" +#else + #include "jerk_screen.h" +#endif + +#if ENABLED(CASE_LIGHT_ENABLE) + #include "case_light_screen.h" +#endif + +#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) + #include "filament_menu.h" +#endif + +#if ENABLED(FILAMENT_RUNOUT_SENSOR) + #include "filament_runout_screen.h" +#endif + +#if ENABLED(LIN_ADVANCE) + #include "linear_advance_screen.h" +#endif + +#if ENABLED(SDSUPPORT) + #include "files_screen.h" +#endif + +#if ENABLED(CUSTOM_MENU_MAIN) + #include "custom_user_menus.h" +#endif + +#if ENABLED(TOUCH_UI_DEVELOPER_MENU) + #include "developer_menu.h" + #include "confirm_erase_flash_dialog_box.h" + #include "widget_demo_screen.h" + #include "stress_test_screen.h" +#endif + +#if NUM_LANGUAGES > 1 + #include "language_menu.h" +#endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp new file mode 100644 index 000000000000..9117bcee1051 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp @@ -0,0 +1,108 @@ +/************************** + * spinner_dialog_box.cpp * + **************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" +#include "../screen_data.h" + +#ifdef FTDI_SPINNER_DIALOG_BOX + +#define GRID_COLS 2 +#define GRID_ROWS 8 + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +constexpr static SpinnerDialogBoxData &mydata = screen_data.SpinnerDialogBox; + +void SpinnerDialogBox::onEntry() { + UIScreen::onEntry(); + mydata.auto_hide = true; +} + +void SpinnerDialogBox::onExit() { + CommandProcessor cmd; + cmd.stop().execute(); +} + +void SpinnerDialogBox::onRefresh() { + using namespace FTDI; + DLCache dlcache(SPINNER_CACHE); + CommandProcessor cmd; + cmd.cmd(CMD_DLSTART); + if (dlcache.has_data()) + dlcache.append(); + else + dlcache.store(SPINNER_DL_SIZE); + cmd.spinner(BTN_POS(1,4), BTN_SIZE(2,3)).execute(); +} + +void SpinnerDialogBox::onRedraw(draw_mode_t) { +} + +void SpinnerDialogBox::show(FSTR_P message) { + CommandProcessor cmd; + if (AT_SCREEN(SpinnerDialogBox)) cmd.stop().execute(); + cmd.cmd(CMD_DLSTART) + .cmd(CLEAR_COLOR_RGB(bg_color)) + .cmd(CLEAR(true,true,true)) + .cmd(COLOR_RGB(bg_text_enabled)) + .tag(0); + draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,3), message, OPT_CENTER, font_large); + DLCache dlcache(SPINNER_CACHE); + if (!dlcache.store(SPINNER_DL_SIZE)) { + SERIAL_ECHO_MSG("CachedScreen::storeBackground() failed: not enough DL cache space"); + cmd.cmd(CMD_DLSTART).cmd(CLEAR(true,true,true)); + dlcache.store(SPINNER_DL_SIZE); + } + if (AT_SCREEN(SpinnerDialogBox)) + cmd.spinner(BTN_POS(1,4), BTN_SIZE(2,3)).execute(); + else + GOTO_SCREEN(SpinnerDialogBox); + mydata.auto_hide = false; +} + +void SpinnerDialogBox::hide() { + GOTO_PREVIOUS(); +} + +void SpinnerDialogBox::enqueueAndWait(FSTR_P message, FSTR_P commands) { + show(message); + ExtUI::injectCommands_P((const char*)commands); + mydata.auto_hide = true; +} + +void SpinnerDialogBox::enqueueAndWait(FSTR_P message, char *commands) { + show(message); + ExtUI::injectCommands(commands); + mydata.auto_hide = true; +} + +void SpinnerDialogBox::onIdle() { + if (mydata.auto_hide && !commandsInQueue() && TERN1(HOST_KEEPALIVE_FEATURE, GcodeSuite::busy_state == GcodeSuite::NOT_BUSY)) { + mydata.auto_hide = false; + hide(); + } +} + +#endif // FTDI_SPINNER_DIALOG_BOX diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h new file mode 100644 index 000000000000..0f51d97653a6 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.h @@ -0,0 +1,48 @@ +/************************ + * spinner_dialog_box.h * + ************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_SPINNER_DIALOG_BOX +#define FTDI_SPINNER_DIALOG_BOX_CLASS SpinnerDialogBox + +struct SpinnerDialogBoxData { + bool auto_hide; +}; + +class SpinnerDialogBox : public UIScreen { + public: + static void onEntry(); + static void onExit(); + static void onRedraw(draw_mode_t); + static void onRefresh(); + static void onIdle(); + + static void show(FSTR_P); + static void hide(); + + template + static void enqueueAndWait(T commands) {enqueueAndWait(GET_TEXT_F(MSG_PLEASE_WAIT), commands);} + + static void enqueueAndWait(FSTR_P message, char *commands); + static void enqueueAndWait(FSTR_P message, FSTR_P commands); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/statistics_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/statistics_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.cpp index 0e224da9670c..b6d9770e9d2d 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/statistics_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, PRINTCOUNTER) - -#include "screens.h" +#ifdef FTDI_STATISTICS_SCREEN using namespace FTDI; using namespace ExtUI; @@ -64,7 +63,7 @@ void StatisticsScreen::onRedraw(draw_mode_t what) { if (what & FOREGROUND) { cmd.font(Theme::font_medium) .colors(action_btn) - .tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BACK)); + .tag(1).button(BTN_POS(1,7), BTN_SIZE(4,1), GET_TEXT_F(MSG_BUTTON_DONE)); } } @@ -75,4 +74,4 @@ bool StatisticsScreen::onTouchEnd(uint8_t tag) { } } -#endif // TOUCH_UI_FTDI_EVE && PRINTCOUNTER +#endif // FTDI_STATISTICS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.h new file mode 100644 index 000000000000..4176f54101e0 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/statistics_screen.h @@ -0,0 +1,32 @@ +/*********************** + * statistics_screen.h * + ***********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_STATISTICS_SCREEN +#define FTDI_STATISTICS_SCREEN_CLASS StatisticsScreen + +class StatisticsScreen : public BaseScreen, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp index 51f50343e01a..4e76450683e9 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.cpp @@ -21,11 +21,10 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_STATUS_SCREEN #include "../archim2-flash/flash_storage.h" @@ -317,15 +316,15 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) { cmd.colors(normal_btn) .font(Theme::font_medium) .colors(has_media ? action_btn : normal_btn) - .enabled(has_media) - .tag(3).button(MEDIA_BTN_POS, isPrintingFromMedia() ? GET_TEXT_F(MSG_PRINTING) : GET_TEXT_F(MSG_BUTTON_MEDIA)) + .enabled(has_media && !isPrinting()) + .tag(3).button(MEDIA_BTN_POS, isPrinting() ? GET_TEXT_F(MSG_PRINTING) : GET_TEXT_F(MSG_BUTTON_MEDIA)) .colors(!has_media ? action_btn : normal_btn) .tag(4).button(MENU_BTN_POS, GET_TEXT_F(MSG_BUTTON_MENU)); } #undef GRID_COLS } -void StatusScreen::draw_status_message(draw_mode_t what, const char* message) { +void StatusScreen::draw_status_message(draw_mode_t what, const char *message) { #define GRID_COLS 1 #if ENABLED(TOUCH_UI_PORTRAIT) @@ -345,13 +344,13 @@ void StatusScreen::draw_status_message(draw_mode_t what, const char* message) { #undef GRID_COLS } -void StatusScreen::setStatusMessage(progmem_str message) { +void StatusScreen::setStatusMessage(FSTR_P message) { char buff[strlen_P((const char * const)message)+1]; strcpy_P(buff, (const char * const) message); setStatusMessage((const char *) buff); } -void StatusScreen::setStatusMessage(const char* message) { +void StatusScreen::setStatusMessage(const char *message) { if (CommandProcessor::is_processing()) { #if ENABLED(TOUCH_UI_DEBUG) SERIAL_ECHO_MSG("Cannot update status message, command processor busy"); @@ -462,4 +461,14 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +void StatusScreen::onMediaInserted() { + if (AT_SCREEN(StatusScreen)) + setStatusMessage(GET_TEXT_F(MSG_MEDIA_INSERTED)); +} + +void StatusScreen::onMediaRemoved() { + if (AT_SCREEN(StatusScreen) || ExtUI::isPrintingFromMedia()) + setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED)); +} + +#endif // FTDI_STATUS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.h new file mode 100644 index 000000000000..62e632756a5b --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/status_screen.h @@ -0,0 +1,47 @@ +/******************* + * status_screen.h * + *******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_STATUS_SCREEN +#define FTDI_STATUS_SCREEN_CLASS StatusScreen + +class StatusScreen : public BaseScreen, public CachedScreen { + private: + static void draw_axis_position(draw_mode_t); + static void draw_temperature(draw_mode_t); + static void draw_progress(draw_mode_t); + static void draw_interaction_buttons(draw_mode_t); + static void draw_status_message(draw_mode_t, const char * const); + static void _format_time(char *outstr, uint32_t time); + public: + static void loadBitmaps(); + static void setStatusMessage(const char *); + static void setStatusMessage(FSTR_P); + static void onRedraw(draw_mode_t); + static void onStartup(); + static void onEntry(); + static void onIdle(); + static bool onTouchEnd(uint8_t tag); + static void onMediaInserted(); + static void onMediaRemoved(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_bump_sensitivity_screen.cpp similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_bump_sensitivity_screen.cpp index 84d76dcefa85..ddbe648c32f3 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_bump_sensitivity_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_bump_sensitivity_screen.cpp @@ -1,5 +1,5 @@ -/************************************** - * stepper_bump_sensiivity_screen.cpp * +/*************************************** + * stepper_bump_sensitivity_screen.cpp * **************************************/ /**************************************************************************** @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, HAS_TRINAMIC_CONFIG) - -#include "screens.h" +#ifdef FTDI_STEPPER_BUMP_SENSITIVITY_SCREEN using namespace FTDI; using namespace ExtUI; @@ -56,4 +55,4 @@ bool StepperBumpSensitivityScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE && HAS_TRINAMIC_CONFIG +#endif // FTDI_STEPPER_BUMP_SENSITIVITY_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_bump_sensitivity_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_bump_sensitivity_screen.h new file mode 100644 index 000000000000..b37b8014e8e9 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_bump_sensitivity_screen.h @@ -0,0 +1,32 @@ +/************************************* + * stepper_bump_sensitivity_screen.h * + *************************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_STEPPER_BUMP_SENSITIVITY_SCREEN +#define FTDI_STEPPER_BUMP_SENSITIVITY_SCREEN_CLASS StepperBumpSensitivityScreen + +class StepperBumpSensitivityScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_current_screen.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_current_screen.cpp index d6e36c1efa5d..ddd273aa4719 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stepper_current_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_current_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, HAS_TRINAMIC_CONFIG) - -#include "screens.h" +#ifdef FTDI_STEPPER_CURRENT_SCREEN using namespace FTDI; using namespace ExtUI; @@ -124,4 +123,4 @@ bool StepperCurrentScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_STEPPER_CURRENT_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_current_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_current_screen.h new file mode 100644 index 000000000000..9186eb1637bb --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stepper_current_screen.h @@ -0,0 +1,32 @@ +/**************************** + * stepper_current_screen.h * + ****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_STEPPER_CURRENT_SCREEN +#define FTDI_STEPPER_CURRENT_SCREEN_CLASS StepperCurrentScreen + +class StepperCurrentScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/steps_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/steps_screen.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/steps_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/steps_screen.cpp index e9bc50ae453f..c73c49493e0b 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/steps_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/steps_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_STEPS_SCREEN using namespace FTDI; using namespace ExtUI; @@ -83,4 +82,4 @@ bool StepsScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_STEPS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/steps_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/steps_screen.h new file mode 100644 index 000000000000..68a3ced8fae3 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/steps_screen.h @@ -0,0 +1,32 @@ +/****************** + * steps_screen.h * + ******************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_STEPS_SCREEN +#define FTDI_STEPS_SCREEN_CLASS StepsScreen + +class StepsScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.cpp similarity index 82% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.cpp index 6c4aab6d31a8..ab1f96a399c6 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.cpp @@ -21,11 +21,10 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" +#include "../screen_data.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_DEVELOPER_MENU) - -#include "screens.h" -#include "screen_data.h" +#ifdef FTDI_STRESS_TEST_SCREEN #define STRESS_TEST_CHANGE_INTERVAL 6000 @@ -36,6 +35,8 @@ using namespace FTDI; using namespace Theme; using namespace ExtUI; +constexpr static StressTestScreenData &mydata = screen_data.StressTestScreen; + void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) { CommandProcessor cmd; for (uint8_t i = 0; i < 100; i++) { @@ -47,8 +48,8 @@ void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) } bool StressTestScreen::watchDogTestNow() { - return screen_data.StressTest.next_watchdog_trigger && - ELAPSED(millis(), screen_data.StressTest.next_watchdog_trigger); + return mydata.next_watchdog_trigger && + ELAPSED(millis(), mydata.next_watchdog_trigger); } void StressTestScreen::onRedraw(draw_mode_t) { @@ -58,7 +59,7 @@ void StressTestScreen::onRedraw(draw_mode_t) { .cmd(CLEAR(true,true,true)) .cmd(COLOR_RGB(bg_text_enabled)) .font(font_medium) - .text(BTN_POS(1,1), BTN_SIZE(4,1), progmem_str(screen_data.StressTest.message)); + .text(BTN_POS(1,1), BTN_SIZE(4,1), FPSTR(mydata.message)); drawDots(BTN_POS(1,3), BTN_SIZE(4,4)); @@ -92,25 +93,23 @@ void StressTestScreen::startupCheck() { } void StressTestScreen::onEntry() { - screen_data.StressTest.next_watchdog_trigger = millis() + 10000 + random(40000); - screen_data.StressTest.message = PSTR("Test 1: Stress testing..."); + mydata.next_watchdog_trigger = millis() + 10000 + random(40000); + mydata.message = PSTR("Test 1: Stress testing..."); // Turn off heaters. - setTargetTemp_celsius(0, E0); - setTargetTemp_celsius(0, E1); - setTargetTemp_celsius(0, BED); + coolDown(); runTestOnBootup(true); } void StressTestScreen::recursiveLockup() { - screen_data.StressTest.message = PSTR("Test 2: Printer will restart."); + mydata.message = PSTR("Test 2: Printer will restart."); current_screen.onRefresh(); recursiveLockup(); } void StressTestScreen::iterativeLockup() { - screen_data.StressTest.message = PSTR("Test 3: Printer will restart."); + mydata.message = PSTR("Test 3: Printer will restart."); for (;;) current_screen.onRefresh(); } @@ -126,7 +125,7 @@ void StressTestScreen::onIdle() { injectCommands_P(PSTR( "G0 X100 Y100 Z100 F6000\n" "T0\nG4 S1" - TERN_(HAS_MULTI_EXTRUDER, "\nT1\nG4 S1") + E_TERN_("\nT1\nG4 S1") "\nG0 X150 Y150 Z150" )); } @@ -146,4 +145,4 @@ void StressTestScreen::onIdle() { BaseScreen::onIdle(); } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_STRESS_TEST_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.h new file mode 100644 index 000000000000..f35f11adb6d0 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.h @@ -0,0 +1,48 @@ +/************************ + * stress_test_screen.h * + ************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_STRESS_TEST_SCREEN +#define FTDI_STRESS_TEST_SCREEN_CLASS StressTestScreen + +struct StressTestScreenData { + uint32_t next_watchdog_trigger; + const char* message; +}; + +class StressTestScreen : public BaseScreen, public UncachedScreen { + private: + static void drawDots(uint16_t x, uint16_t y, uint16_t h, uint16_t v); + static bool watchDogTestNow(); + static void recursiveLockup(); + static void iterativeLockup(); + static void runTestOnBootup(bool enable); + + public: + static void startupCheck(); + + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/string_format.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.cpp similarity index 54% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/string_format.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.cpp index c3114a39227d..ed24a9d9ed95 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/string_format.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.cpp @@ -23,39 +23,66 @@ #if ENABLED(TOUCH_UI_FTDI_EVE) -#include "screens.h" +#include "../screens.h" #define ROUND(val) uint16_t((val)+0.5) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wno-format" +#if GCC_VERSION <= 50000 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wno-format" +#endif /** * Formats a temperature string (e.g. "100°C") */ -void format_temp(char *str, float t1) { - sprintf_P(str, PSTR("%3d" S_FMT), ROUND(t1), GET_TEXT(MSG_UNITS_C)); +void format_temp(char *str, const_celsius_float_t t1) { + #ifdef TOUCH_UI_LCD_TEMP_PRECISION + char num1[7]; + dtostrf(t1, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num1); + sprintf_P(str, PSTR("%s" S_FMT), num1, GET_TEXT(MSG_UNITS_C)); + #else + sprintf_P(str, PSTR("%3d" S_FMT), ROUND(t1), GET_TEXT(MSG_UNITS_C)); + #endif } /** * Formats a temperature string for an idle heater (e.g. "100 °C / idle") */ -void format_temp_and_idle(char *str, float t1) { - sprintf_P(str, PSTR("%3d" S_FMT " / " S_FMT), ROUND(t1), GET_TEXT(MSG_UNITS_C), GET_TEXT(MSG_IDLE)); +void format_temp_and_idle(char *str, const_celsius_float_t t1) { + #ifdef TOUCH_UI_LCD_TEMP_PRECISION + char num1[7]; + dtostrf(t1, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num1); + sprintf_P(str, PSTR("%s" S_FMT " / " S_FMT), num1, GET_TEXT(MSG_UNITS_C), GET_TEXT(MSG_IDLE)); + #else + sprintf_P(str, PSTR("%3d" S_FMT " / " S_FMT), ROUND(t1), GET_TEXT(MSG_UNITS_C), GET_TEXT(MSG_IDLE)); + #endif } /** * Formats a temperature string for an active heater (e.g. "100 / 200°C") */ -void format_temp_and_temp(char *str, float t1, float t2) { - sprintf_P(str, PSTR("%3d / %3d" S_FMT), ROUND(t1), ROUND(t2), GET_TEXT(MSG_UNITS_C)); +void format_temp_and_temp(char *str, const_celsius_float_t t1, const_celsius_float_t t2) { + #ifdef TOUCH_UI_LCD_TEMP_PRECISION + char num1[7], num2[7]; + dtostrf(t1, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num1); + dtostrf(t2, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num2); + sprintf_P(str, PSTR("%s / %s" S_FMT), num1, num2, GET_TEXT(MSG_UNITS_C)); + #else + sprintf_P(str, PSTR("%3d / %3d" S_FMT), ROUND(t1), ROUND(t2), GET_TEXT(MSG_UNITS_C)); + #endif } /** * Formats a temperature string for a material (e.g. "100°C (PLA)") */ -void format_temp_and_material(char *str, float t1, const char *material) { - sprintf_P(str, PSTR("%3d" S_FMT " (" S_FMT ")"), ROUND(t1), GET_TEXT(MSG_UNITS_C), material); +void format_temp_and_material(char *str, const_celsius_float_t t1, const char *material) { + #ifdef TOUCH_UI_LCD_TEMP_PRECISION + char num1[7]; + dtostrf(t1, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num1); + sprintf_P(str, PSTR("%s" S_FMT " (" S_FMT ")"), num1, GET_TEXT(MSG_UNITS_C), material); + #else + sprintf_P(str, PSTR("%3d" S_FMT " (" S_FMT ")"), ROUND(t1), GET_TEXT(MSG_UNITS_C), material); + #endif } /** @@ -78,6 +105,8 @@ void format_position(char *str, float x, float y, float z) { sprintf_P(str, PSTR("%s; %s; %s " S_FMT), num1, num2, num3, GET_TEXT(MSG_UNITS_MM)); } -#pragma GCC diagnostic pop +#if GCC_VERSION <= 50000 + #pragma GCC diagnostic pop +#endif #endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/string_format.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.h similarity index 82% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/string_format.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.h index 545c701700a7..44583f08ecbe 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/string_format.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/string_format.h @@ -21,9 +21,9 @@ #pragma once -void format_temp(char *str, float t1); -void format_temp_and_idle(char *str, float t1); -void format_temp_and_temp(char *str, float t1, float t2); -void format_temp_and_material(char *str, float t1, const char *material); +void format_temp(char *str, const_celsius_float_t t1); +void format_temp_and_idle(char *str, const_celsius_float_t t1); +void format_temp_and_temp(char *str, const_celsius_float_t t1, const_celsius_float_t t2); +void format_temp_and_material(char *str, const_celsius_float_t t1, const char *material); void format_position(char *str, float p, uint8_t decimals = 1); void format_position(char *str, float x, float y, float z); diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.cpp similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.cpp index bdd434b5dec0..ee53a82bee18 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/temperature_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.cpp @@ -1,6 +1,6 @@ -/******************* - * boot_screen.cpp * - *******************/ +/************************** + * temperature_screen.cpp * + **************************/ /**************************************************************************** * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_TEMPERATURE_SCREEN using namespace FTDI; using namespace Theme; @@ -102,13 +101,8 @@ bool TemperatureScreen::onTouchHeld(uint8_t tag) { case 11: UI_INCREMENT(TargetFan_percent, FAN0); break; #endif case 30: - #define _HOTEND_OFF(N) setTargetTemp_celsius(0, E##N); - REPEAT(HOTENDS, _HOTEND_OFF); - TERN_(HAS_HEATED_BED, setTargetTemp_celsius(0, BED)); + coolDown(); TERN_(HAS_HEATED_CHAMBER, setTargetTemp_celsius(0, CHAMBER)); - #if HAS_FAN - setTargetFan_percent(0, FAN0); - #endif break; default: return false; @@ -116,4 +110,4 @@ bool TemperatureScreen::onTouchHeld(uint8_t tag) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_TEMPERATURE_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.h new file mode 100644 index 000000000000..de928c8978cc --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/temperature_screen.h @@ -0,0 +1,32 @@ +/************************ + * temperature_screen.h * + ************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_TEMPERATURE_SCREEN +#define FTDI_TEMPERATURE_SCREEN_CLASS TemperatureScreen + +class TemperatureScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/touch_calibration_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_calibration_screen.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/touch_calibration_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_calibration_screen.cpp index b5312add5aa9..c7c21368dfc4 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/touch_calibration_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_calibration_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens.h" +#ifdef FTDI_TOUCH_CALIBRATION_SCREEN using namespace FTDI; using namespace Theme; @@ -91,4 +90,4 @@ void TouchCalibrationScreen::onIdle() { } } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_TOUCH_CALIBRATION_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_calibration_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_calibration_screen.h new file mode 100644 index 000000000000..b4e6cfb66cf1 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_calibration_screen.h @@ -0,0 +1,34 @@ +/****************************** + * touch_calibration_screen.h * + ******************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_TOUCH_CALIBRATION_SCREEN +#define FTDI_TOUCH_CALIBRATION_SCREEN_CLASS TouchCalibrationScreen + +class TouchCalibrationScreen : public BaseScreen, public UncachedScreen { + public: + static void onRefresh(); + static void onEntry(); + static void onRedraw(draw_mode_t); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/touch_registers_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/touch_registers_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.cpp index 373941321300..5475d67a80b7 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/touch_registers_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_DEVELOPER_MENU) - -#include "screens.h" +#ifdef FTDI_TOUCH_REGISTERS_SCREEN using namespace FTDI; using namespace Theme; @@ -83,4 +82,4 @@ void TouchRegistersScreen::onRedraw(draw_mode_t) { return true; } -#endif // TOUCH_UI_FTDI_EVE +#endif // FTDI_TOUCH_REGISTERS_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.h new file mode 100644 index 000000000000..b6d4ba8e00cd --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/touch_registers_screen.h @@ -0,0 +1,32 @@ +/**************************** + * touch_registers_screen.h * + ****************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_TOUCH_REGISTERS_SCREEN +#define FTDI_TOUCH_REGISTERS_SCREEN_CLASS TouchRegistersScreen + +class TouchRegistersScreen : public BaseScreen, public UncachedScreen { + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp similarity index 90% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp index 5a290109ff01..6f4beb66731c 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/tune_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.cpp @@ -21,12 +21,11 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if ENABLED(TOUCH_UI_FTDI_EVE) && DISABLED(TOUCH_UI_LULZBOT_BIO) +#ifdef FTDI_TUNE_MENU -#include "screens.h" - -#include "../../../../../feature/host_actions.h" +#include "../../../../feature/host_actions.h" using namespace FTDI; using namespace Theme; @@ -63,7 +62,7 @@ void TuneMenu::onRedraw(draw_mode_t what) { #define FILAMENT_POS BTN_POS(1,4), BTN_SIZE(1,1) #define CASE_LIGHT_POS BTN_POS(2,4), BTN_SIZE(1,1) #define ADVANCED_SETTINGS_POS BTN_POS(1,5), BTN_SIZE(1,1) - #define BACK_POS BTN_POS(2,5), BTN_SIZE(2,1) + #define BACK_POS BTN_POS(2,5), BTN_SIZE(1,1) #endif if (what & FOREGROUND) { @@ -78,8 +77,11 @@ void TuneMenu::onRedraw(draw_mode_t what) { .tag(3).button(FIL_CHANGE_POS, GET_TEXT_F(MSG_FILAMENTCHANGE)) .enabled(EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)) .tag(9).button(FILAMENT_POS, GET_TEXT_F(MSG_FILAMENT)) - .enabled(BOTH(HAS_LEVELING, HAS_BED_PROBE) || ENABLED(BABYSTEPPING)) - .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(TERN(BABYSTEPPING, MSG_NUDGE_NOZZLE, MSG_ZPROBE_ZOFFSET))) + #if ENABLED(BABYSTEPPING) && HAS_MULTI_HOTEND + .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(MSG_NUDGE_NOZZLE)) + #elif BOTH(HAS_LEVELING, HAS_BED_PROBE) + .tag(4).button(NUDGE_NOZ_POS, GET_TEXT_F(MSG_ZPROBE_ZOFFSET)) + #endif .tag(5).button(SPEED_POS, GET_TEXT_F(MSG_PRINT_SPEED)) .enabled(sdOrHostPrinting) .tag(sdOrHostPaused ? 7 : 6) @@ -90,7 +92,7 @@ void TuneMenu::onRedraw(draw_mode_t what) { .tag(10).button(CASE_LIGHT_POS, GET_TEXT_F(MSG_CASE_LIGHT)) .tag(11).button(ADVANCED_SETTINGS_POS, GET_TEXT_F(MSG_ADVANCED_SETTINGS)) .tag(1).colors(action_btn) - .button(BACK_POS, GET_TEXT_F(MSG_BACK)); + .button(BACK_POS, GET_TEXT_F(MSG_BUTTON_DONE)); } #undef GRID_COLS #undef GRID_ROWS @@ -100,11 +102,11 @@ bool TuneMenu::onTouchEnd(uint8_t tag) { using namespace Theme; using namespace ExtUI; switch (tag) { - case 1: GOTO_PREVIOUS(); break; + case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; case 2: GOTO_SCREEN(TemperatureScreen); break; case 3: GOTO_SCREEN(ChangeFilamentScreen); break; case 4: - #if ENABLED(BABYSTEPPING) + #if ENABLED(BABYSTEPPING) && HAS_MULTI_HOTEND GOTO_SCREEN(NudgeNozzleScreen); #elif BOTH(HAS_LEVELING, HAS_BED_PROBE) GOTO_SCREEN(ZOffsetScreen); @@ -153,4 +155,4 @@ void TuneMenu::resumePrint() { GOTO_SCREEN(StatusScreen); } -#endif // TOUCH_UI_FTDI_EVE && !TOUCH_UI_LULZBOT_BIO +#endif // FTDI_TUNE_MENU diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.h new file mode 100644 index 000000000000..b8f9373b1902 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/tune_menu.h @@ -0,0 +1,35 @@ +/*************** + * tune_menu.h * + ***************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_TUNE_MENU +#define FTDI_TUNE_MENU_CLASS TuneMenu + +class TuneMenu : public BaseScreen, public CachedScreen { + private: + static void pausePrint(); + static void resumePrint(); + public: + static void onRedraw(draw_mode_t); + static bool onTouchEnd(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/widget_demo_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/widget_demo_screen.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/widget_demo_screen.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/widget_demo_screen.cpp index 96887102dc2a..d02397abf907 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/widget_demo_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/widget_demo_screen.cpp @@ -21,10 +21,9 @@ ****************************************************************************/ #include "../config.h" +#include "../screens.h" -#if BOTH(TOUCH_UI_FTDI_EVE, TOUCH_UI_DEVELOPER_MENU) - -#include "screens.h" +#ifdef FTDI_WIDGET_DEMO_SCREEN using namespace FTDI; using namespace ExtUI; @@ -155,4 +154,4 @@ void WidgetsScreen::onIdle() { BaseScreen::onIdle(); } -#endif // TOUCH_UI_FTDI_EVE && TOUCH_UI_DEVELOPER_MENU +#endif // FTDI_WIDGET_DEMO_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/widget_demo_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/widget_demo_screen.h new file mode 100644 index 000000000000..e0f7422d1211 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/widget_demo_screen.h @@ -0,0 +1,34 @@ +/************************ + * widget_demo_screen.h * + ************************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_WIDGET_DEMO_SCREEN +#define FTDI_WIDGET_DEMO_SCREEN_CLASS WidgetsScreen + +class WidgetsScreen : public BaseScreen, public UncachedScreen { + public: + static void onEntry(); + static void onRedraw(draw_mode_t); + static bool onTouchStart(uint8_t tag); + static void onIdle(); +}; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp new file mode 100644 index 000000000000..eb367987940e --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.cpp @@ -0,0 +1,111 @@ +/*********************** + * z_offset_screen.cpp * + ***********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "../config.h" +#include "../screens.h" +#include "../screen_data.h" + +#ifdef FTDI_Z_OFFSET_SCREEN + +using namespace FTDI; +using namespace ExtUI; +using namespace Theme; + +#define SHEET_THICKNESS 0.1 + +constexpr static ZOffsetScreenData &mydata = screen_data.ZOffsetScreen; + +void ZOffsetScreen::onEntry() { + mydata.z = SHEET_THICKNESS; + mydata.softEndstopState = getSoftEndstopState(); + BaseNumericAdjustmentScreen::onEntry(); + if (wizardRunning()) + setSoftEndstopState(false); +} + +void ZOffsetScreen::onExit() { + setSoftEndstopState(mydata.softEndstopState); +} + +void ZOffsetScreen::onRedraw(draw_mode_t what) { + widgets_t w(what); + w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(GET_TEXT_F(MSG_UNITS_MM)); + + w.heading( GET_TEXT_F(MSG_ZPROBE_ZOFFSET)); + w.color(z_axis).adjuster(4, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), getZOffset_mm()); + w.increments(); + w.button(2, GET_TEXT_F(MSG_PROBE_WIZARD), !isPrinting() && !wizardRunning()); +} + +void ZOffsetScreen::move(float mm, int16_t steps) { + if (wizardRunning()) { + mydata.z += mm; + setAxisPosition_mm(mydata.z, Z); + } + else { + // Otherwise doing a manual adjustment, possibly during a print. + TERN(BABYSTEPPING, babystepAxis_steps(steps, Z), UNUSED(steps)); + } +} + +void ZOffsetScreen::runWizard() { + // Restore the default Z offset + constexpr float offset[] = NOZZLE_TO_PROBE_OFFSET; + setZOffset_mm(offset[Z_AXIS]); + // Move above probe point + char cmd[64], str[10]; + strcpy_P(cmd, PSTR("G28 Z\nG0 F1000 X")); + dtostrf(TERN(Z_SAFE_HOMING,Z_SAFE_HOMING_X_POINT,X_CENTER), 3, 1, str); + strcat(cmd, str); + strcat_P(cmd, PSTR("Y")); + dtostrf(TERN(Z_SAFE_HOMING,Z_SAFE_HOMING_Y_POINT,Y_CENTER), 3, 1, str); + strcat(cmd, str); + strcat_P(cmd, PSTR("Z")); + dtostrf(SHEET_THICKNESS, 3, 1, str); + strcat(cmd, str); + injectCommands(cmd); + // Show instructions for user. + AlertDialogBox::show(F("After the printer finishes homing, adjust the Z Offset so that a sheet of paper can pass between the nozzle and bed with slight resistance.")); +} + +bool ZOffsetScreen::wizardRunning() { + // We can't store state after the call to the AlertBox, so + // check whether the current Z position equals mydata.z in order + // to know whether the user started the wizard. + return getAxisPosition_mm(Z) == mydata.z; +} + +bool ZOffsetScreen::onTouchHeld(uint8_t tag) { + const int16_t steps = TERN(BABYSTEPPING, mmToWholeSteps(getIncrement(), Z), 0); + const float increment = TERN(BABYSTEPPING, mmFromWholeSteps(steps, Z), getIncrement()); + switch (tag) { + case 2: runWizard(); break; + case 4: UI_DECREMENT(ZOffset_mm); move(-increment, -steps); break; + case 5: UI_INCREMENT(ZOffset_mm); move( increment, steps); break; + default: + return false; + } + SaveSettingsDialogBox::settingsChanged(); + return true; +} + +#endif // FTDI_Z_OFFSET_SCREEN diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.h new file mode 100644 index 000000000000..0df9209b1fdd --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/z_offset_screen.h @@ -0,0 +1,43 @@ +/*********************** + * z_offset_screen.h * + ***********************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#define FTDI_Z_OFFSET_SCREEN +#define FTDI_Z_OFFSET_SCREEN_CLASS ZOffsetScreen + +struct ZOffsetScreenData : public BaseNumericAdjustmentScreenData { + float z; + bool softEndstopState; +}; + +class ZOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen { + private: + static void move(float mm, int16_t steps); + static void runWizard(); + static bool wizardRunning(); + public: + static void onEntry(); + static void onExit(); + static void onRedraw(draw_mode_t); + static bool onTouchHeld(uint8_t tag); +}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp index e4ecdc8b4900..bf684e43f917 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.cpp @@ -20,8 +20,8 @@ ****************************************************************************/ -#include "../../../../../MarlinCore.h" - -#include "language.h" - -uint8_t lang = 0; +#include "../../../../MarlinCore.h" +#if ENABLED(TOUCH_UI_FTDI_EVE) + #include "language.h" + uint8_t lang = 0; +#endif diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language.h diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language_en.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h similarity index 92% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language_en.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h index c898e7b73751..2e2597aec435 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/language/language_en.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/language/language_en.h @@ -70,7 +70,7 @@ namespace Language_en { PROGMEM Language_Str MSG_ABOUT_TOUCH_PANEL_2 = WEBSITE_URL; PROGMEM Language_Str MSG_LICENSE = u8"This program is free software: you can redistribute it and/or modify it under the terms of " "the GNU General Public License as published by the Free Software Foundation, either version 3 " - "of the License, or (at your option) any later version.\n\nTo view a copy of the GNU General " + "of the License, or (at your option) any later version. To view a copy of the GNU General " "Public License, go to the following location: https://www.gnu.org/licenses."; PROGMEM Language_Str MSG_RUNOUT_1 = u8"Runout 1"; PROGMEM Language_Str MSG_RUNOUT_2 = u8"Runout 2"; @@ -130,7 +130,7 @@ namespace Language_en { PROGMEM Language_Str MSG_EEPROM_RESTORED = u8"Settings restored from backup"; PROGMEM Language_Str MSG_EEPROM_RESET = u8"Settings restored to default"; PROGMEM Language_Str MSG_EEPROM_SAVED = u8"Settings saved!"; - PROGMEM Language_Str MSG_EEPROM_SAVE_PROMPT = u8"Do you wish to save these settings as defaults?"; + PROGMEM Language_Str MSG_EEPROM_SAVE_PROMPT = u8"Settings applied. Save these settings for next power-on?"; PROGMEM Language_Str MSG_EEPROM_RESET_WARNING = u8"Are you sure? Customizations will be lost."; PROGMEM Language_Str MSG_PASSCODE_REJECTED = u8"Wrong passcode!"; @@ -140,11 +140,14 @@ namespace Language_en { PROGMEM Language_Str MSG_TOUCH_CALIBRATION_START = u8"Release to begin screen calibration"; PROGMEM Language_Str MSG_TOUCH_CALIBRATION_PROMPT = u8"Touch the dots to calibrate"; - PROGMEM Language_Str MSG_AUTOLEVEL_X_AXIS = u8"Level X Axis"; PROGMEM Language_Str MSG_BED_MAPPING_DONE = u8"Bed mapping finished"; PROGMEM Language_Str MSG_BED_MAPPING_INCOMPLETE = u8"Not all points probed"; PROGMEM Language_Str MSG_LEVELING = u8"Leveling"; - PROGMEM Language_Str MSG_SHOW_MESH = u8"Show Bed Mesh"; + PROGMEM Language_Str MSG_AXIS_LEVELING = u8"Axis Leveling"; + PROGMEM Language_Str MSG_PROBE_BED = u8"Probe Mesh"; + PROGMEM Language_Str MSG_MESH_VIEW = u8"View Mesh"; + PROGMEM Language_Str MSG_PRINT_TEST = u8"Print Test (PLA)"; + PROGMEM Language_Str MSG_MOVE_Z_TO_TOP = u8"Raise Z to Top"; #if ENABLED(TOUCH_UI_LULZBOT_BIO) PROGMEM Language_Str MSG_MOVE_TO_HOME = u8"Move to Home"; @@ -157,13 +160,13 @@ namespace Language_en { #ifdef TOUCH_UI_COCOA_PRESS PROGMEM Language_Str MSG_BODY = u8"Body"; - PROGMEM Language_Str MSG_INTERNAL = u8"Internal"; + PROGMEM Language_Str MSG_SELECT_CHOCOLATE_TYPE = u8"Select Chocolate Type"; PROGMEM Language_Str MSG_EXTERNAL = u8"External"; PROGMEM Language_Str MSG_CHOCOLATE = u8"Chocolate"; PROGMEM Language_Str MSG_UNLOAD_CARTRIDGE = u8"Unload Cartridge"; - PROGMEM Language_Str MSG_LOAD_CHOCOLATE = u8"Load Chocolate"; - PROGMEM Language_Str MSG_CARTRIDGE_IN = u8"Cartridge In"; - PROGMEM Language_Str MSG_CARTRIDGE_OUT = u8"Cartridge Out"; + PROGMEM Language_Str MSG_LOAD_UNLOAD = u8"Load/Unload"; + PROGMEM Language_Str MSG_FULL_LOAD = u8"Full Load"; + PROGMEM Language_Str MSG_FULL_UNLOAD = u8"Full Unload"; PROGMEM Language_Str MSG_PREHEAT_CHOCOLATE = u8"Preheat Chocolate"; PROGMEM Language_Str MSG_PREHEAT_FINISHED = u8"Preheat finished"; PROGMEM Language_Str MSG_PREHEAT = u8"Preheat"; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/pin_mappings.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/pin_mappings.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h index ae95a647091c..7c0bdd88e920 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/pin_mappings.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/pin_mappings.h @@ -27,7 +27,7 @@ * without adding new pin definitions to the board. */ -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" #if ENABLED(F6_TFT_PINMAP) // FYSETC F6 - ATmega2560 @@ -53,7 +53,7 @@ #elif ENABLED(AO_EXP1_DEPRECATED_PINMAP) /** - * This AlephObjects pinout re-purposes the UltraLCD + * This LulzBot pinout re-purposes the UltraLCD * connector EXP1 for Software SPI (rev B, obsolete) */ @@ -74,7 +74,7 @@ /** * AO_EXP1_PINMAP with TOUCH_UI_ULTIPANEL * - * This AlephObjects mapping re-purposes the UltraLCD + * This LulzBot mapping re-purposes the UltraLCD * connector EXP1 for Software SPI for display (rev C): * * EXP2: FTDI: SD -or- USB [1]: ULTRA_LCD: @@ -106,7 +106,7 @@ /** * AO_EXP2_PINMAP with TOUCH_UI_ULTIPANEL * - * The AlephObjects mapping for re-purposing the UltraLCD + * The LulzBot mapping for re-purposing the UltraLCD * connector EXP2 for hardware SPI for display and SD card * or USB (rev C): * diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h new file mode 100644 index 000000000000..057054a6af17 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screen_data.h @@ -0,0 +1,69 @@ +/***************** + * screen_data.h * + *****************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "ftdi_eve_lib/ftdi_eve_lib.h" + +// To save RAM, store state information related to a particular screen +// in a union. The values should be initialized in the onEntry method. + +/** + * The DECL_DATA_IF_INCLUDED macro: + * + * union screen_data_t { + * DECL_DATA_IF_INCLUDED(FTDI_EXAMPLE_SCREEN) + * } + * + * Is a shorthand for: + * + * union screen_data_t { + * #ifdef FTDI_EXAMPLE_SCREEN + * struct ExampleScreenData ExampleScreen; + * #endif + * } + * + */ +#define __DECL_DATA_IF_INCLUDED(CLASS) struct CLASS ## Data CLASS ; +#define _DECL_DATA_IF_INCLUDED(CLASS) __DECL_DATA_IF_INCLUDED(CLASS) +#define DECL_DATA_IF_INCLUDED(HEADER) TERN(HEADER, _DECL_DATA_IF_INCLUDED(HEADER ## _CLASS), ) + +union screen_data_t { + DECL_DATA_IF_INCLUDED(FTDI_INTERFACE_SETTINGS_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_LOCK_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_SPINNER_DIALOG_BOX) + DECL_DATA_IF_INCLUDED(FTDI_CONFIRM_START_PRINT_DIALOG_BOX) + DECL_DATA_IF_INCLUDED(FTDI_CHANGE_FILAMENT_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_FILES_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_MOVE_AXIS_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_BED_MESH_VIEW_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_BED_MESH_EDIT_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_STRESS_TEST_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_NUDGE_NOZZLE_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_Z_OFFSET_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_BASE_NUMERIC_ADJ_SCREEN) + DECL_DATA_IF_INCLUDED(FTDI_ALERT_DIALOG_BOX) + DECL_DATA_IF_INCLUDED(COCOA_PREHEAT_SCREEN) + DECL_DATA_IF_INCLUDED(COCOA_LOAD_CHOCOLATE_SCREEN) +}; + +extern screen_data_t screen_data; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp new file mode 100644 index 000000000000..ec627e313b13 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.cpp @@ -0,0 +1,126 @@ +/*************** + * screens.cpp * + ***************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#include "config.h" + +#if ENABLED(TOUCH_UI_FTDI_EVE) +#include "screens.h" +tiny_timer_t refresh_timer; + + +/** + * DECL_SCREEN_IF_INCLUDED allows for a concise + * definition of SCREEN_TABLE: + * + * SCREEN_TABLE { + * DECL_SCREEN_IF_INCLUDED(MY_HEADER) + * } + * + * Is a shorthand for: + * + * SCREEN_TABLE { + * #ifdef MY_HEADER + * DECL_SCREEN(MY_HEADER), + * #endif + * } + * + */ +#define COMMA , +#define __DECL_SCREEN_IF_INCLUDED(O,C) THIRD(O, DECL_SCREEN(C) COMMA,) +#define _DECL_SCREEN_IF_INCLUDED(O,C) __DECL_SCREEN_IF_INCLUDED(O ## COMMA, C) +#define DECL_SCREEN_IF_INCLUDED(H) _DECL_SCREEN_IF_INCLUDED(H, H ## _CLASS) + +SCREEN_TABLE { + DECL_SCREEN_IF_INCLUDED(FTDI_BOOT_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_LANGUAGE_MENU) + DECL_SCREEN_IF_INCLUDED(FTDI_TOUCH_CALIBRATION_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_STATUS_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_MAIN_MENU) + DECL_SCREEN_IF_INCLUDED(FTDI_TUNE_MENU) + DECL_SCREEN_IF_INCLUDED(FTDI_ADVANCED_SETTINGS_MENU) + DECL_SCREEN_IF_INCLUDED(FTDI_ALERT_DIALOG_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_CONFIRM_USER_REQUEST_ALERT_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_RESTORE_FAILSAFE_DIALOG_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_SAVE_SETTINGS_DIALOG_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_CONFIRM_START_PRINT_DIALOG_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_CONFIRM_ABORT_PRINT_DIALOG_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_CONFIRM_AUTO_CALIBRATION_DIALOG_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_CUSTOM_USER_MENUS) + DECL_SCREEN_IF_INCLUDED(FTDI_SPINNER_DIALOG_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_ABOUT_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_STATISTICS_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_NUDGE_NOZZLE_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_MOVE_AXIS_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_STEPS_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_STEPPER_CURRENT_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_STEPPER_BUMP_SENSITIVITY_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_LEVELING_MENU) + DECL_SCREEN_IF_INCLUDED(FTDI_Z_OFFSET_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_BED_MESH_VIEW_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_BED_MESH_EDIT_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_NOZZLE_OFFSETS_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_BACKLASH_COMP_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_FEEDRATE_PERCENT_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_FLOW_PERCENT_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_MAX_VELOCITY_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_MAX_ACCELERATION_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_DEFAULT_ACCELERATION_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_JUNCTION_DEVIATION_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_JERK_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_CASE_LIGHT_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_FILAMENT_MENU) + DECL_SCREEN_IF_INCLUDED(FTDI_FILAMENT_RUNOUT_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_LINEAR_ADVANCE_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_TEMPERATURE_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_CHANGE_FILAMENT_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_INTERFACE_SETTINGS_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_INTERFACE_SOUNDS_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_LOCK_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_FILES_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_ENDSTOP_STATE_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_BIO_PRINTING_DIALOG_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_BIO_CONFIRMOME_XYZ) + DECL_SCREEN_IF_INCLUDED(FTDI_BIO_CONFIRMOME_E) + DECL_SCREEN_IF_INCLUDED(FTDI_DEVELOPER_MENU) + DECL_SCREEN_IF_INCLUDED(FTDI_CONFIRM_ERASE_FLASH_DIALOG_BOX) + DECL_SCREEN_IF_INCLUDED(FTDI_WIDGET_DEMO_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_TOUCH_REGISTERS_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_STRESS_TEST_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_MEDIA_PLAYER_SCREEN) + DECL_SCREEN_IF_INCLUDED(FTDI_DISPLAY_TUNING_SCREEN) + DECL_SCREEN_IF_INCLUDED(COCOA_STATUS_SCREEN) + DECL_SCREEN_IF_INCLUDED(COCOA_MAIN_MENU) + DECL_SCREEN_IF_INCLUDED(COCOA_ADVANCED_SETTINGS_MENU) + DECL_SCREEN_IF_INCLUDED(COCOA_PREHEAT_MENU) + DECL_SCREEN_IF_INCLUDED(COCOA_PREHEAT_SCREEN) + DECL_SCREEN_IF_INCLUDED(COCOA_LOAD_CHOCOLATE_SCREEN) + DECL_SCREEN_IF_INCLUDED(COCOA_LEVELING_MENU) + DECL_SCREEN_IF_INCLUDED(COCOA_MOVE_XYZ_SCREEN) + DECL_SCREEN_IF_INCLUDED(COCOA_MOVE_E_SCREEN) +}; + +SCREEN_TABLE_POST + +#include "screen_data.h" +screen_data_t screen_data; + +#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h new file mode 100644 index 000000000000..fb3e909d2f24 --- /dev/null +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/screens.h @@ -0,0 +1,50 @@ +/************* + * screens.h * + *************/ + +/**************************************************************************** + * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * + * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * To view a copy of the GNU General Public License, go to the following * + * location: . * + ****************************************************************************/ + +#pragma once + +#include "config.h" + +#if ENABLED(TOUCH_UI_FTDI_EVE) + +#include "ftdi_eve_lib/ftdi_eve_lib.h" +#include "language/language.h" +#include "theme/theme.h" +#include "generic/string_format.h" + +#ifndef BED_LEVELING_COMMANDS + #define BED_LEVELING_COMMANDS "G29" +#endif + +extern tiny_timer_t refresh_timer; + +#if ENABLED(TOUCH_UI_LULZBOT_BIO) + #include "bioprinter/screens.h" +#elif ENABLED(TOUCH_UI_COCOA_PRESS) + #include "cocoa_press/screens.h" +#elif ENABLED(TOUCH_UI_SYNDAVER_LEVEL) + #include "syndaver_level/screens.h" +#else + #include "generic/screens.h" +#endif + +#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/bitmaps.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h similarity index 58% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/bitmaps.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h index 8c0366ebebad..c194225d99ae 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/bitmaps.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bitmaps.h @@ -36,7 +36,7 @@ namespace Theme { .height = 23, }; - constexpr PROGMEM unsigned char Extruder_Icon[] = { + constexpr PROGMEM unsigned char Extruder_Icon[69] = { 0x3F, 0xFF, 0xFC, 0x7F, 0xFF, 0xFE, 0xC0, 0x00, 0x03, @@ -68,12 +68,12 @@ namespace Theme { .filter = BILINEAR, .wrapx = BORDER, .wrapy = BORDER, - .RAMG_offset = 8100, + .RAMG_offset = 8069, .width = 32, .height = 23, }; - constexpr PROGMEM unsigned char Bed_Heat_Icon[] = { + constexpr PROGMEM unsigned char Bed_Heat_Icon[92] = { 0x01, 0x81, 0x81, 0x80, 0x01, 0x81, 0x81, 0x80, 0x00, 0xC0, 0xC0, 0xC0, @@ -105,12 +105,12 @@ namespace Theme { .filter = BILINEAR, .wrapx = BORDER, .wrapy = BORDER, - .RAMG_offset = 8300, + .RAMG_offset = 8161, .width = 32, .height = 32, }; - constexpr PROGMEM unsigned char Fan_Icon[] = { + constexpr PROGMEM unsigned char Fan_Icon[128] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x1F, @@ -151,12 +151,12 @@ namespace Theme { .filter = BILINEAR, .wrapx = BORDER, .wrapy = BORDER, - .RAMG_offset = 9000, + .RAMG_offset = 8289, .width = 50, .height = 20, }; - constexpr PROGMEM unsigned char TD_Icon[] = { + constexpr PROGMEM unsigned char TD_Icon[140] = { 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00, // Thumb Drive Widget 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x03, 0x80, @@ -179,5 +179,81 @@ namespace Theme { 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xFC, 0x00 }; - constexpr PROGMEM uint32_t UTF8_FONT_OFFSET = 10000; -}; // namespace Theme + constexpr PROGMEM bitmap_info_t File_Icon_Info = { + .format = L1, + .linestride = 4, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8429, + .width = 25, + .height = 32, + }; + + const unsigned char File_Icon[128] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFE, 0x00, 0x00, 0x40, 0x03, 0x00, 0x00, + 0x40, 0x02, 0x80, 0x00, 0x40, 0x02, 0x40, 0x00, 0x40, 0x02, 0x20, 0x00, + 0x40, 0x02, 0x10, 0x00, 0x40, 0x02, 0x08, 0x00, 0x40, 0x02, 0x04, 0x00, + 0x40, 0x02, 0x02, 0x00, 0x40, 0x03, 0xFF, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, 0x40, 0x00, 0x01, 0x00, + 0x7F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + constexpr PROGMEM bitmap_info_t Clock_Icon_Info = { + .format = L1, + .linestride = 4, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8557, + .width = 32, + .height = 32, + }; + + const unsigned char Clock_Icon[128] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x7E, 0x7E, 0x00, + 0x00, 0xE0, 0x07, 0x00, 0x03, 0x80, 0x01, 0xC0, 0x07, 0x01, 0x00, 0xE0, + 0x0C, 0x01, 0x80, 0x70, 0x0C, 0x01, 0x80, 0x30, 0x18, 0x01, 0x80, 0x18, + 0x30, 0x01, 0x80, 0x08, 0x30, 0x01, 0x80, 0x0C, 0x20, 0x01, 0x80, 0x0C, + 0x60, 0x01, 0x80, 0x04, 0x60, 0x01, 0x80, 0x06, 0x60, 0x01, 0x80, 0x06, + 0x60, 0x01, 0xFF, 0x06, 0x60, 0x01, 0xFF, 0x06, 0x60, 0x00, 0x00, 0x06, + 0x60, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x0C, + 0x30, 0x00, 0x00, 0x0C, 0x30, 0x00, 0x00, 0x08, 0x18, 0x00, 0x00, 0x18, + 0x0C, 0x00, 0x00, 0x30, 0x0E, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0xE0, + 0x03, 0x80, 0x01, 0xC0, 0x00, 0xE0, 0x07, 0x00, 0x00, 0x7F, 0xFE, 0x00, + 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + constexpr PROGMEM bitmap_info_t Light_Bulb_Info = { + .format = L1, + .linestride = 4, + .filter = BILINEAR, + .wrapx = BORDER, + .wrapy = BORDER, + .RAMG_offset = 8685, + .width = 31, + .height = 32, + }; + + const unsigned char Light_Bulb[128] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x40, + 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x01, 0x00, 0x00, 0x80, 0x02, 0x00, + 0x00, 0x0F, 0xE0, 0x00, 0x00, 0x18, 0x30, 0x00, 0x00, 0x36, 0x18, 0x00, + 0x00, 0x2C, 0x08, 0x00, 0x00, 0x58, 0x04, 0x00, 0x00, 0x50, 0x04, 0x00, + 0x7C, 0x50, 0x04, 0x7C, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, + 0x00, 0x60, 0x0C, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x10, 0x10, 0x00, + 0x00, 0x10, 0x10, 0x00, 0x00, 0x88, 0x22, 0x00, 0x01, 0x08, 0x21, 0x00, + 0x02, 0x08, 0x20, 0x80, 0x04, 0x0F, 0xE0, 0x40, 0x00, 0x07, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + constexpr PROGMEM uint32_t UTF8_FONT_OFFSET = 10000; + constexpr PROGMEM uint32_t BACKGROUND_OFFSET = 40000; +} // namespace Theme diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h index 5d9735892deb..169a306afcaa 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/bootscreen_logo_portrait.h @@ -20,7 +20,6 @@ * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the * start of a new closed path. */ - #pragma once constexpr float x_min = 0.000000, x_max = 272.000000, diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/colors.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/colors.h similarity index 96% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/colors.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/colors.h index cdcf00a21b25..995379fcdab7 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/colors.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/colors.h @@ -85,6 +85,9 @@ namespace Theme { constexpr uint32_t logo_bg_rgb = accent_color_1; constexpr uint32_t logo_fill_rgb = accent_color_0; constexpr uint32_t logo_stroke_rgb = accent_color_4; + + constexpr uint32_t bed_mesh_lines_rgb = 0xFFFFFF; + constexpr uint32_t bed_mesh_shadow_rgb = 0x444444; #elif ANY(TOUCH_UI_COCOA_THEME, TOUCH_UI_FROZEN_THEME) constexpr uint32_t theme_darkest = accent_color_1; constexpr uint32_t theme_dark = accent_color_4; @@ -102,6 +105,10 @@ namespace Theme { constexpr uint32_t logo_bg_rgb = accent_color_5; constexpr uint32_t logo_fill_rgb = accent_color_6; constexpr uint32_t logo_stroke_rgb = accent_color_2; + + constexpr uint32_t bed_mesh_lines_rgb = accent_color_6; + constexpr uint32_t bed_mesh_shadow_rgb = 0x444444; + #define BED_MESH_POINTS_GRAY #else constexpr uint32_t theme_darkest = gray_color_1; constexpr uint32_t theme_dark = gray_color_2; @@ -119,6 +126,9 @@ namespace Theme { constexpr uint32_t logo_bg_rgb = accent_color_4; constexpr uint32_t logo_fill_rgb = accent_color_3; constexpr uint32_t logo_stroke_rgb = 0x000000; + + constexpr uint32_t bed_mesh_lines_rgb = 0xFFFFFF; + constexpr uint32_t bed_mesh_shadow_rgb = 0x444444; #endif constexpr uint32_t shadow_rgb = gray_color_6; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/fonts.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/fonts.h similarity index 98% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/fonts.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/fonts.h index 7cc4e078ada1..63ecdfcb3c7e 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/fonts.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/fonts.h @@ -55,7 +55,7 @@ namespace Theme { constexpr int16_t font_small = 27; constexpr int16_t font_medium = 28; constexpr int16_t font_large = 30; - constexpr int16_t font_xlarge = 31; + constexpr int16_t font_xlarge = 30; constexpr float icon_scale = 0.6; #endif #elif defined(TOUCH_UI_320x240) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h index e023599a27c1..1231d31dc387 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_landscape.h @@ -21,7 +21,6 @@ * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the * start of a new closed path. */ - #pragma once constexpr float x_min = 0.000000; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h index e3a30a6dfeff..c6065af7f7ca 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/marlin_bootscreen_portrait.h @@ -21,7 +21,6 @@ * 0x0000 and 0xFFFE. A single 0xFFFF in the data stream indicates the * start of a new closed path. */ - #pragma once constexpr float x_min = 0.000000; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/sounds.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/sounds.cpp rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp index afbed0cab123..efeed1920114 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/sounds.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.cpp @@ -20,7 +20,7 @@ * location: . * ****************************************************************************/ -#include "../compat.h" +#include "../config.h" #if ENABLED(TOUCH_UI_FTDI_EVE) @@ -385,7 +385,7 @@ namespace Theme { {CHACK}, {SILENCE, END_SONG, 0} }; -}; // namespace Theme +} // namespace Theme #define N_ELEMENTS(a) (sizeof(a)/sizeof(a[0])) diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/sounds.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.h similarity index 99% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/sounds.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.h index 66c1cb810ca8..0ca78d4b6293 100644 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/sounds.h +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/sounds.h @@ -40,4 +40,4 @@ namespace Theme { extern const PROGMEM SoundPlayer::sound_t warble[]; extern const PROGMEM SoundPlayer::sound_t carousel[]; extern const PROGMEM SoundPlayer::sound_t all_instruments[]; -}; // namespace Theme +} // namespace Theme diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/theme.h b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/theme.h similarity index 100% rename from Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/theme/theme.h rename to Marlin/src/lcd/extui/ftdi_eve_touch_ui/theme/theme.h diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp b/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp deleted file mode 100644 index 19f8ec81bc5b..000000000000 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * lcd/extui/lib/FileNavigator.cpp - * - * Extensible_UI implementation for Anycubic Chiron - * Written By Nick Wells, 2020 [https://github.com/SwiftNick] - * (not affiliated with Anycubic, Ltd.) - */ - -/*************************************************************************** - * The AC panel wants files in block of 4 and can only display a flat list * - * This library allows full folder traversal. * - ***************************************************************************/ - -#include "../../../../inc/MarlinConfigPre.h" - -#if ENABLED(ANYCUBIC_LCD_CHIRON) - -#include "FileNavigator.h" -#include "chiron_tft.h" - -using namespace ExtUI; - -namespace Anycubic { - - FileNavigator filenavigator; - - FileList FileNavigator::filelist; // Instance of the Marlin file API - char FileNavigator::currentfoldername[MAX_PATH_LEN]; // Current folder path - uint16_t FileNavigator::lastindex; - uint8_t FileNavigator::folderdepth; - uint16_t FileNavigator::currentindex; // override the panel request - - FileNavigator::FileNavigator() { reset(); } - - void FileNavigator::reset() { - currentfoldername[0] = '\0'; - folderdepth = 0; - currentindex = 0; - lastindex = 0; - // Start at root folder - while (!filelist.isAtRootDir()) filelist.upDir(); - refresh(); - } - - void FileNavigator::refresh() { filelist.refresh(); } - - void FileNavigator::getFiles(uint16_t index) { - uint8_t files = 4; - if (index == 0) currentindex = 0; - - // Each time we change folder we reset the file index to 0 and keep track - // of the current position as the TFT panel isnt aware of folders trees. - if (index > 0) { - --currentindex; // go back a file to take account off the .. we added to the root. - if (index > lastindex) - currentindex += files; - else - currentindex = currentindex < 4 ? 0 : currentindex - files; - } - lastindex = index; - - #if ACDEBUG(AC_FILE) - SERIAL_ECHOLNPAIR("index=", index, " currentindex=", currentindex); - #endif - - if (currentindex == 0 && folderdepth > 0) { // Add a link to go up a folder - TFTSer.println("<<"); - TFTSer.println(".."); - files--; - } - - for (uint16_t seek = currentindex; seek < currentindex + files; seek++) { - if (filelist.seek(seek)) { - sendFile(); - #if ACDEBUG(AC_FILE) - SERIAL_ECHOLNPAIR("-", seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'\n"); - #endif - } - } - } - - void FileNavigator::sendFile() { - // send the file and folder info to the panel - // this info will be returned when the file is selected - // Permitted special characters in file name -_*#~ - // Panel can display 22 characters per line - if (filelist.isDir()) { - //TFTSer.print(currentfoldername); - TFTSer.println(filelist.shortFilename()); - TFTSer.print(filelist.shortFilename()); - TFTSer.println("/"); - } - else { - // Logical Name - TFTSer.print("/"); - if (folderdepth > 0) TFTSer.print(currentfoldername); - - TFTSer.println(filelist.shortFilename()); - - // Display Name - TFTSer.println(filelist.longFilename()); - } - } - void FileNavigator::changeDIR(char *folder) { - #if ACDEBUG(AC_FILE) - SERIAL_ECHOLNPAIR("currentfolder: ", currentfoldername, " New: ", folder); - #endif - if (folderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth - strcat(currentfoldername, folder); - strcat(currentfoldername, "/"); - filelist.changeDir(folder); - refresh(); - folderdepth++; - currentindex = 0; - } - - void FileNavigator::upDIR() { - filelist.upDir(); - refresh(); - folderdepth--; - currentindex = 0; - // Remove the last child folder from the stored path - if (folderdepth == 0) { - currentfoldername[0] = '\0'; - reset(); - } - else { - char *pos = nullptr; - for (uint8_t f = 0; f < folderdepth; f++) - pos = strchr(currentfoldername, '/'); - - *(pos + 1) = '\0'; - } - #if ACDEBUG(AC_FILE) - SERIAL_ECHOLNPAIR("depth: ", folderdepth, " currentfoldername: ", currentfoldername); - #endif - } - - char* FileNavigator::getCurrentFolderName() { return currentfoldername; } -} - -#endif // ANYCUBIC_LCD_CHIRON diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp deleted file mode 100644 index 61057b5b10e7..000000000000 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp +++ /dev/null @@ -1,885 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -/** - * lcd/extui/lib/chiron_tft.cpp - * - * Extensible_UI implementation for Anycubic Chiron - * Written By Nick Wells, 2020 [https://github.com/SwiftNick] - * (not affiliated with Anycubic, Ltd.) - */ - -#include "../../../../inc/MarlinConfigPre.h" - -#if ENABLED(ANYCUBIC_LCD_CHIRON) - -#include "chiron_tft.h" -#include "Tunes.h" -#include "FileNavigator.h" - -#include "../../../../gcode/queue.h" -#include "../../../../sd/cardreader.h" -#include "../../../../libs/numtostr.h" -#include "../../../../MarlinCore.h" - -namespace Anycubic { - - printer_state_t ChironTFT::printer_state; - paused_state_t ChironTFT::pause_state; - heater_state_t ChironTFT::hotend_state; - heater_state_t ChironTFT::hotbed_state; - xy_uint8_t ChironTFT::selectedmeshpoint; - char ChironTFT::selectedfile[MAX_PATH_LEN]; - char ChironTFT::panel_command[MAX_CMND_LEN]; - uint8_t ChironTFT::command_len; - float ChironTFT::live_Zoffset; - file_menu_t ChironTFT::file_menu; - - ChironTFT Chiron; - - ChironTFT::ChironTFT(){} - - void ChironTFT::Startup() { - selectedfile[0] = '\0'; - panel_command[0] = '\0'; - command_len = 0; - printer_state = AC_printer_idle; - pause_state = AC_paused_idle; - hotend_state = AC_heater_off; - hotbed_state = AC_heater_off; - live_Zoffset = 0.0; - file_menu = AC_menu_file; - - // Setup pins for powerloss detection - // Two IO pins are connected on the Trigorilla Board - // On a power interruption the OUTAGECON_PIN goes low. - - #if ENABLED(POWER_LOSS_RECOVERY) - OUT_WRITE(OUTAGECON_PIN, HIGH); - #endif - - // Filament runout is handled by Marlin settings in Configuration.h - // opt_set FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present. - // opt_enable FIL_RUNOUT_PULLUP - - TFTSer.begin(115200); - - // Signal Board has reset - SendtoTFTLN(AC_msg_main_board_has_reset); - - safe_delay(200); - - // Enable leveling and Disable end stops during print - // as Z home places nozzle above the bed so we need to allow it past the end stops - injectCommands_P(AC_cmnd_enable_leveling); - - // Startup tunes are defined in Tunes.h - //PlayTune(BEEPER_PIN, Anycubic_PowerOn, 1); - PlayTune(BEEPER_PIN, GB_PowerOn, 1); - #if ACDEBUGLEVEL - SERIAL_ECHOLNPAIR("AC Debug Level ", ACDEBUGLEVEL); - #endif - SendtoTFTLN(AC_msg_ready); - } - - void ChironTFT::IdleLoop() { - if (ReadTFTCommand()) { - ProcessPanelRequest(); - command_len = 0; - } - CheckHeaters(); - } - - void ChironTFT::PrinterKilled(PGM_P error,PGM_P component) { - SendtoTFTLN(AC_msg_kill_lcd); - #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("PrinterKilled()\nerror: ", error , "\ncomponent: ", component); - #endif - } - - void ChironTFT::MediaEvent(media_event_t event) { - #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("ProcessMediaStatus() ", event); - #endif - switch (event) { - case AC_media_inserted: - SendtoTFTLN(AC_msg_sd_card_inserted); - break; - - case AC_media_removed: - SendtoTFTLN(AC_msg_sd_card_removed); - break; - - case AC_media_error: - SendtoTFTLN(AC_msg_no_sd_card); - break; - } - } - - void ChironTFT::TimerEvent(timer_event_t event) { - #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("TimerEvent() ", event); - SERIAL_ECHOLNPAIR("Printer State: ", printer_state); - #endif - - switch (event) { - case AC_timer_started: { - live_Zoffset = 0.0; // reset print offset - setSoftEndstopState(false); // disable endstops to print - printer_state = AC_printer_printing; - SendtoTFTLN(AC_msg_print_from_sd_card); - } break; - - case AC_timer_paused: { - printer_state = AC_printer_paused; - pause_state = AC_paused_idle; - SendtoTFTLN(AC_msg_paused); - } break; - - case AC_timer_stopped: { - if (printer_state != AC_printer_idle) { - printer_state = AC_printer_stopping; - SendtoTFTLN(AC_msg_print_complete); - } - setSoftEndstopState(true); // enable endstops - } break; - } - } - - void ChironTFT::FilamentRunout() { - #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("FilamentRunout() printer_state ", printer_state); - #endif - // 1 Signal filament out - SendtoTFTLN(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block); - //printer_state = AC_printer_filament_out; - PlayTune(BEEPER_PIN, FilamentOut, 1); - } - - void ChironTFT::ConfirmationRequest(const char * const msg) { - // M108 continue - #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("ConfirmationRequest() ", msg, " printer_state:", printer_state); - #endif - switch (printer_state) { - case AC_printer_pausing: { - if (strcmp_P(msg, MARLIN_msg_print_paused) == 0 || strcmp_P(msg, MARLIN_msg_nozzle_parked) == 0) { - SendtoTFTLN(AC_msg_paused); // enable continue button - printer_state = AC_printer_paused; - } - } break; - - case AC_printer_resuming_from_power_outage: - case AC_printer_printing: - case AC_printer_paused: { - // Heater timout, send acknowledgement - if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) { - pause_state = AC_paused_heater_timed_out; - SendtoTFTLN(AC_msg_paused); // enable continue button - PlayTune(BEEPER_PIN,Heater_Timedout,1); - } - // Reheat finished, send acknowledgement - else if (strcmp_P(msg, MARLIN_msg_reheat_done) == 0) { - pause_state = AC_paused_idle; - SendtoTFTLN(AC_msg_paused); // enable continue button - } - // Filament Purging, send acknowledgement enter run mode - else if (strcmp_P(msg, MARLIN_msg_filament_purging) == 0) { - pause_state = AC_paused_purging_filament; - SendtoTFTLN(AC_msg_paused); // enable continue button - } - } break; - default: - break; - } - } - - void ChironTFT::StatusChange(const char * const msg) { - #if ACDEBUG(AC_MARLIN) - SERIAL_ECHOLNPAIR("StatusChange() ", msg); - SERIAL_ECHOLNPAIR("printer_state:", printer_state); - #endif - bool msg_matched = false; - // The only way to get printer status is to parse messages - // Use the state to minimise the work we do here. - switch (printer_state) { - case AC_printer_probing: { - // If probing completes ok save the mesh and park - // Ignore the custom machine name - if (strcmp_P(msg + strlen(CUSTOM_MACHINE_NAME), MARLIN_msg_ready) == 0) { - injectCommands_P(PSTR("M500\nG27")); - SendtoTFTLN(AC_msg_probing_complete); - printer_state = AC_printer_idle; - msg_matched = true; - } - // If probing fails dont save the mesh raise the probe above the bad point - if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) { - PlayTune(BEEPER_PIN, BeepBeepBeeep, 1); - injectCommands_P(PSTR("G1 Z50 F500")); - SendtoTFTLN(AC_msg_probing_complete); - printer_state = AC_printer_idle; - msg_matched = true; - } - } break; - - case AC_printer_printing: { - if (strcmp_P(msg, MARLIN_msg_reheating) == 0) { - SendtoTFTLN(AC_msg_paused); // enable continue button - msg_matched = true; - } - } break; - - case AC_printer_pausing: { - if (strcmp_P(msg, MARLIN_msg_print_paused) == 0) { - SendtoTFTLN(AC_msg_paused); - printer_state = AC_printer_paused; - pause_state = AC_paused_idle; - msg_matched = true; - } - } break; - - case AC_printer_stopping: { - if (strcmp_P(msg, MARLIN_msg_print_aborted) == 0) { - SendtoTFTLN(AC_msg_stop); - printer_state = AC_printer_idle; - msg_matched = true; - } - } break; - default: - break; - } - - // If not matched earlier see if this was a heater message - if (!msg_matched) { - if (strcmp_P(msg, MARLIN_msg_extruder_heating) == 0) { - SendtoTFTLN(AC_msg_nozzle_heating); - hotend_state = AC_heater_temp_set; - } - else if (strcmp_P(msg, MARLIN_msg_bed_heating) == 0) { - SendtoTFTLN(AC_msg_bed_heating); - hotbed_state = AC_heater_temp_set; - } - } - } - - void ChironTFT::PowerLossRecovery() { - printer_state = AC_printer_resuming_from_power_outage; // Play tune to notify user we can recover. - PlayTune(BEEPER_PIN, SOS, 1); - SERIAL_ECHOLNPGM("Resuming from power outage..."); - SERIAL_ECHOLNPGM("Select SD file then press resume"); - } - - void ChironTFT::SendtoTFT(PGM_P str) { // A helper to print PROGMEN string to the panel - #if ACDEBUG(AC_SOME) - serialprintPGM(str); - #endif - while (const char c = pgm_read_byte(str++)) TFTSer.print(c); - } - - void ChironTFT::SendtoTFTLN(PGM_P str = nullptr) { - if (str) { - #if ACDEBUG(AC_SOME) - SERIAL_ECHOPGM("> "); - #endif - SendtoTFT(str); - #if ACDEBUG(AC_SOME) - SERIAL_EOL(); - #endif - } - TFTSer.println(""); - } - - bool ChironTFT::ReadTFTCommand() { - bool command_ready = false; - while(TFTSer.available() > 0 && command_len < MAX_CMND_LEN) { - panel_command[command_len] = TFTSer.read(); - if (panel_command[command_len] == '\n') { - command_ready = true; - break; - } - command_len++; - } - - if (command_ready) { - panel_command[command_len] = 0x00; - #if ACDEBUG(AC_ALL) - SERIAL_ECHOLNPAIR("< ", panel_command); - #endif - #if ACDEBUG(AC_SOME) - // Ignore status request commands - uint8_t req = atoi(&panel_command[1]); - if (req > 7 && req != 20) { - SERIAL_ECHOLNPAIR("> ", panel_command); - SERIAL_ECHOLNPAIR("printer_state:", printer_state); - } - #endif - } - return command_ready; - } - - int8_t ChironTFT::Findcmndpos(const char * buff, char q) { - int8_t pos = 0; - do { if (buff[pos] == q) return pos; } while(++pos < MAX_CMND_LEN); - return -1; - } - - void ChironTFT::CheckHeaters() { - uint8_t faultDuration = 0; - float temp = 0; - - // if the hotend temp is abnormal, confirm state before signalling panel - temp = getActualTemp_celsius(E0); - while (!WITHIN(temp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP)) { - faultDuration++; - if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) { - SendtoTFTLN(AC_msg_nozzle_temp_abnormal); - SERIAL_ECHOLNPAIR("Extruder temp abnormal! : ", temp); - break; - } - delay_ms(500); - temp = getActualTemp_celsius(E0); - } - - // If the hotbed temp is abnormal, confirm state before signaling panel - faultDuration = 0; - temp = getActualTemp_celsius(BED); - while (!WITHIN(temp, BED_MINTEMP, BED_MAXTEMP)) { - faultDuration++; - if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) { - SendtoTFTLN(AC_msg_nozzle_temp_abnormal); - SERIAL_ECHOLNPAIR("Bed temp abnormal! : ", temp); - break; - } - delay_ms(500); - temp = getActualTemp_celsius(E0); - } - - // Update panel with hotend heater status - if (hotend_state != AC_heater_temp_reached) { - if (WITHIN(getActualTemp_celsius(E0) - getTargetTemp_celsius(E0), -1, 1)) { - SendtoTFTLN(AC_msg_nozzle_heating_done); - hotend_state = AC_heater_temp_reached; - } - } - - // Update panel with bed heater status - if (hotbed_state != AC_heater_temp_reached) { - if (WITHIN(getActualTemp_celsius(BED) - getTargetTemp_celsius(BED), -0.5, 0.5)) { - SendtoTFTLN(AC_msg_bed_heating_done); - hotbed_state = AC_heater_temp_reached; - } - } - } - - void ChironTFT::SendFileList(int8_t startindex) { - // Respond to panel request for 4 files starting at index - #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("## SendFileList ## ", startindex); - #endif - SendtoTFTLN(PSTR("FN ")); - filenavigator.getFiles(startindex); - SendtoTFTLN(PSTR("END")); - } - - void ChironTFT::SelectFile() { - strncpy(selectedfile, panel_command + 4, command_len - 4); - selectedfile[command_len - 5] = '\0'; - #if ACDEBUG(AC_FILE) - SERIAL_ECHOLNPAIR_F(" Selected File: ",selectedfile); - #endif - switch (selectedfile[0]) { - case '/': // Valid file selected - SendtoTFTLN(AC_msg_sd_file_open_success); - break; - - case '<': // .. (go up folder level) - filenavigator.upDIR(); - SendtoTFTLN(AC_msg_sd_file_open_failed); - SendFileList( 0 ); - break; - default: // enter sub folder - filenavigator.changeDIR(selectedfile); - SendtoTFTLN(AC_msg_sd_file_open_failed); - SendFileList( 0 ); - break; - } - } - - void ChironTFT::InjectCommandandWait(PGM_P cmd) { - //injectCommands_P(cmnd); queue.enqueue_now_P(cmd); - //SERIAL_ECHOLN(PSTR("Inject>")); - } - - void ChironTFT::ProcessPanelRequest() { - // Break these up into logical blocks // as its easier to navigate than one huge switch case! - int8_t req = atoi(&panel_command[1]); - - // Information requests A0 - A8 and A33 - if (req <= 8 || req == 33) PanelInfo(req); - - // Simple Actions A9 - A28 - else if ( req <= 28) PanelAction(req); - - // Process Initiation - else if (req <= 34) PanelProcess(req); - - else SendtoTFTLN(); - } - - void ChironTFT::PanelInfo(uint8_t req) { - // information requests A0-A8 and A33 - switch (req) { - case 0: // A0 Get HOTEND Temp - SendtoTFT(PSTR("A0V ")); - TFTSer.println(getActualTemp_celsius(E0)); - break; - - case 1: // A1 Get HOTEND Target Temp - SendtoTFT(PSTR("A1V ")); - TFTSer.println(getTargetTemp_celsius(E0)); - break; - - case 2: // A2 Get BED Temp - SendtoTFT(PSTR("A2V ")); - TFTSer.println(getActualTemp_celsius(BED)); - break; - - case 3: // A3 Get BED Target Temp - SendtoTFT(PSTR("A3V ")); - TFTSer.println(getTargetTemp_celsius(BED)); - break; - - case 4: // A4 Get FAN Speed - SendtoTFT(PSTR("A4V ")); - TFTSer.println(getActualFan_percent(FAN0)); - break; - - case 5: // A5 Get Current Coordinates - SendtoTFT(PSTR("A5V X: ")); - TFTSer.print(getAxisPosition_mm(X)); - SendtoTFT(PSTR(" Y: ")); - TFTSer.print(getAxisPosition_mm(Y)); - SendtoTFT(PSTR(" Z: ")); - TFTSer.println(getAxisPosition_mm(Z)); - break; - - case 6: // A6 Get printing progress - if (isPrintingFromMedia()) { - SendtoTFT(PSTR("A6V ")); - TFTSer.println(ui8tostr2(getProgress_percent())); - } - else - SendtoTFTLN(PSTR("A6V ---")); - break; - - case 7: { // A7 Get Printing Time - uint32_t time = getProgress_seconds_elapsed() / 60; - SendtoTFT(PSTR("A7V ")); - TFTSer.print(ui8tostr2(time / 60)); - SendtoTFT(PSTR(" H ")); - TFTSer.print(ui8tostr2(time % 60)); - SendtoTFT(PSTR(" M")); - #if ACDEBUG(AC_ALL) - SERIAL_ECHOLNPAIR("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60)); - #endif - } break; - - case 8: // A8 Get SD Card list A8 S0 - if (!isMediaInserted()) safe_delay(500); - if (!isMediaInserted()) // Make sure the card is removed - SendtoTFTLN(AC_msg_no_sd_card); - else if (panel_command[3] == 'S') - SendFileList( atoi( &panel_command[4] ) ); - break; - - case 33: // A33 Get firmware info - SendtoTFT(PSTR("J33 ")); - SendtoTFTLN(PSTR(SHORT_BUILD_VERSION)); - break; - } - } - - void ChironTFT::PanelAction(uint8_t req) { - switch (req) { - case 9: // A9 Pause SD print - if (isPrintingFromMedia()) { - SendtoTFTLN(AC_msg_pause); - pausePrint(); - printer_state = AC_printer_pausing; - } - else - SendtoTFTLN(AC_msg_stop); - break; - - case 10: // A10 Resume SD Print - if (pause_state == AC_paused_idle || printer_state == AC_printer_resuming_from_power_outage) - resumePrint(); - else - setUserConfirmed(); - break; - - case 11: // A11 Stop SD print - if (isPrintingFromMedia()) { - printer_state = AC_printer_stopping; - stopPrint(); - } - else { - if (printer_state == AC_printer_resuming_from_power_outage) - injectCommands_P(PSTR("M1000 C")); // Cancel recovery - SendtoTFTLN(AC_msg_stop); - printer_state = AC_printer_idle; - } - break; - - case 12: // A12 Kill printer - kill(); // from marlincore.h - break; - - case 13: // A13 Select file - SelectFile(); - break; - - case 14: { // A14 Start Printing - // Allows printer to restart the job if we dont want to recover - if (printer_state == AC_printer_resuming_from_power_outage) { - injectCommands_P(PSTR("M1000 C")); // Cancel recovery - printer_state = AC_printer_idle; - } - #if ACDebugLevel >= 1 - SERIAL_ECHOLNPAIR_F("Print: ", selectedfile); - #endif - // the card library needs a path starting // but the File api doesn't... - char file[MAX_PATH_LEN]; - file[0] = '/'; - strcpy(file + 1, selectedfile); - printFile(file); - SendtoTFTLN(AC_msg_print_from_sd_card); - } break; - - case 15: // A15 Resuming from outage - if (printer_state == AC_printer_resuming_from_power_outage) { - // Need to home here to restore the Z position - injectCommands(AC_cmnd_power_loss_recovery); - injectCommands("M1000"); // home and start recovery - } - break; - - case 16: { // A16 Set HotEnd temp A17 S170 - const float set_Htemp = atof(&panel_command[5]); - hotend_state = set_Htemp ? AC_heater_temp_set : AC_heater_off; - switch ((char)panel_command[4]) { - // Set Temp - case 'S': case 'C': setTargetTemp_celsius(set_Htemp, E0); - } - } break; - - case 17: { // A17 Set bed temp - const float set_Btemp = atof(&panel_command[5]); - hotbed_state = set_Btemp ? AC_heater_temp_set : AC_heater_off; - if (panel_command[4] == 'S') - setTargetTemp_celsius(set_Btemp, BED); - } break; - - case 18: // A18 Set Fan Speed - if (panel_command[4] == 'S') - setTargetFan_percent(atof(&panel_command[5]), FAN0); - break; - - case 19: // A19 Motors off - if (!isPrinting()) { - disable_all_steppers(); // from marlincore.h - SendtoTFTLN(AC_msg_ready); - } - break; - - case 20: // A20 Read/write print speed - if (panel_command[4] == 'S') - setFeedrate_percent(atoi(&panel_command[5])); - else { - SendtoTFT(PSTR("A20V ")); - TFTSer.println(getFeedrate_percent()); - } - break; - - case 21: // A21 Home Axis A21 X - if (!isPrinting()) { - switch ((char)panel_command[4]) { - case 'X': injectCommands_P(PSTR("G28X")); break; - case 'Y': injectCommands_P(PSTR("G28Y")); break; - case 'Z': injectCommands_P(PSTR("G28Z")); break; - case 'C': injectCommands_P(G28_STR); break; - } - } - break; - - case 22: // A22 Move Axis A22 Y +10F3000 - // Ignore request if printing - if (!isPrinting()) { - // setAxisPosition_mm() uses pre defined manual feedrates so ignore the feedrate from the panel - setSoftEndstopState(true); // enable endstops - float newposition = atof(&panel_command[6]); - - #if ACDEBUG(AC_ACTION) - SERIAL_ECHOLNPAIR("Nudge ", panel_command[4], " axis ", newposition); - #endif - - switch (panel_command[4]) { - case 'X': setAxisPosition_mm(getAxisPosition_mm(X) + newposition, X); break; - case 'Y': setAxisPosition_mm(getAxisPosition_mm(Y) + newposition, Y); break; - case 'Z': setAxisPosition_mm(getAxisPosition_mm(Z) + newposition, Z); break; - case 'E': // The only time we get this command is from the filament load/unload menu - // the standard movement is too slow so we will use the load unlod GCode to speed it up a bit - if (canMove(E0) && !commandsInQueue()) - injectCommands_P(newposition > 0 ? AC_cmnd_manual_load_filament : AC_cmnd_manual_unload_filament); - break; - } - } - break; - - case 23: // A23 Preheat PLA - // Ignore request if printing - if (!isPrinting()) { - // Temps defined in configuration.h - setTargetTemp_celsius(PREHEAT_1_TEMP_BED, BED); - setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, E0); - SendtoTFTLN(); - hotbed_state = AC_heater_temp_set; - hotend_state = AC_heater_temp_set; - } - break; - - case 24: // A24 Preheat ABS - // Ignore request if printing - if (!isPrinting()) { - setTargetTemp_celsius(PREHEAT_2_TEMP_BED, BED); - setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, E0); - SendtoTFTLN(); - hotbed_state = AC_heater_temp_set; - hotend_state = AC_heater_temp_set; - } - break; - - case 25: // A25 Cool Down - // Ignore request if printing - if (!isPrinting()) { - setTargetTemp_celsius(0, E0); - setTargetTemp_celsius(0, BED); - SendtoTFTLN(AC_msg_ready); - hotbed_state = AC_heater_off; - hotend_state = AC_heater_off; - } - break; - - case 26: // A26 Refresh SD - // M22 M21 maybe needed here to reset sd card - filenavigator.reset(); - break; - - case 27: // A27 Servo Angles adjust - break; - - case 28: // A28 Filament set A28 O/C - // Ignore request if printing - if (isPrinting()) break; - SendtoTFTLN(); - break; - } - } - - void ChironTFT::PanelProcess(uint8_t req) { - switch (req) { - case 29: { // A29 Read Mesh Point A29 X1 Y1 - xy_uint8_t pos; - float pos_z; - pos.x = atoi(&panel_command[5]); - pos.y = atoi(&panel_command[8]); - pos_z = getMeshPoint(pos); - - SendtoTFT(PSTR("A29V ")); - TFTSer.println(pos_z * 100); - if (!isPrinting()) { - setSoftEndstopState(true); // disable endstops - // If the same meshpoint is selected twice in a row, move the head to that ready for adjustment - if ((selectedmeshpoint.x == pos.x) && (selectedmeshpoint.y == pos.y)) { - if (!isPositionKnown()) - injectCommands_P(G28_STR); // home - - if (isPositionKnown()) { - #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z); - #endif - // Go up before moving - setAxisPosition_mm(3.0,Z); - - setAxisPosition_mm(17 + (93 * pos.x), X); - setAxisPosition_mm(20 + (93 * pos.y), Y); - setAxisPosition_mm(0.0, Z); - #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Current Z: ", getAxisPosition_mm(Z)); - #endif - } - } - selectedmeshpoint.x = pos.x; - selectedmeshpoint.y = pos.y; - } - } break; - - case 30: { // A30 Auto leveling - if (panel_command[3] == 'S') { // Start probing - // Ignore request if printing - if (isPrinting()) - SendtoTFTLN(AC_msg_probing_not_allowed); // forbid auto leveling - else { - injectCommands_P(PSTR("G28O\nG29")); - printer_state = AC_printer_probing; - SendtoTFTLN(AC_msg_start_probing); - } - } - else SendtoTFTLN(AC_msg_start_probing); - } break; - - case 31: { // A31 Adjust all Probe Points - switch (panel_command[3]) { - case 'C': // Restore and apply original offsets - if (!isPrinting()) { - injectCommands_P(PSTR("M501\nM420 S1")); - selectedmeshpoint.x = selectedmeshpoint.y = 99; - } - break; - case 'D': // Save Z Offset tables and restore leveling state - if (!isPrinting()) { - setAxisPosition_mm(1.0,Z); - injectCommands_P(PSTR("M500")); - selectedmeshpoint.x = selectedmeshpoint.y = 99; - } - break; - case 'G': // Get current offset - SendtoTFT(PSTR("A31V ")); - // When printing use the live z Offset position - // we will use babystepping to move the print head - if (isPrinting()) - TFTSer.println(live_Zoffset); - else { - TFTSer.println(getZOffset_mm()); - selectedmeshpoint.x = selectedmeshpoint.y = 99; - } - break; - case 'S': { // Set offset (adjusts all points by value) - float Zshift = atof(&panel_command[4]); - setSoftEndstopState(false); // disable endstops - // Allow temporary Z position nudging during print - // From the leveling panel use the all points UI to adjust the print pos. - if (isPrinting()) { - #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift); - #endif - if (isAxisPositionKnown(Z)) { - #if ACDEBUG(AC_INFO) - const float currZpos = getAxisPosition_mm(Z); - SERIAL_ECHOLNPAIR("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05)); - #endif - // Use babystepping to adjust the head position - int16_t steps = mmToWholeSteps(constrain(Zshift,-0.05,0.05), Z); - #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Steps to move Z: ", steps); - #endif - babystepAxis_steps(steps, Z); - live_Zoffset += Zshift; - } - SendtoTFT(PSTR("A31V ")); - TFTSer.println(live_Zoffset); - } - else { - GRID_LOOP(x, y) { - const xy_uint8_t pos { x, y }; - const float currval = getMeshPoint(pos); - setMeshPoint(pos, constrain(currval + Zshift, AC_LOWEST_MESHPOINT_VAL, 2)); - } - const float currZOffset = getZOffset_mm(); - #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Change probe offset from ", currZOffset, " to ", currZOffset + Zshift); - #endif - - setZOffset_mm(currZOffset + Zshift); - SendtoTFT(PSTR("A31V ")); - TFTSer.println(getZOffset_mm()); - - if (isAxisPositionKnown(Z)) { - // Move Z axis - const float currZpos = getAxisPosition_mm(Z); - #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05)); - #endif - setAxisPosition_mm(currZpos+constrain(Zshift,-0.05,0.05),Z); - } - } - } break; - } // end switch - } break; - - case 32: { // A32 clean leveling beep flag - // Ignore request if printing - //if (isPrinting()) break; - //injectCommands_P(PSTR("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000")); - //TFTSer.println(""); - } break; - - // A33 firmware info request seet PanelInfo() - - case 34: { // A34 Adjust single mesh point A34 C/S X1 Y1 V123 - if (panel_command[3] == 'C') { // Restore original offsets - injectCommands_P(PSTR("M501\nM420 S1")); - selectedmeshpoint.x = selectedmeshpoint.y = 99; - //printer_state = AC_printer_idle; - } - else { - xy_uint8_t pos; - pos.x = atoi(&panel_command[5]); - pos.y = atoi(&panel_command[8]); - - float currmesh = getMeshPoint(pos); - float newval = atof(&panel_command[11])/100; - #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Change mesh point x:", pos.x, " y:", pos.y); - SERIAL_ECHOLNPAIR("from ", currmesh, " to ", newval); - #endif - // Update Meshpoint - setMeshPoint(pos,newval); - if (printer_state == AC_printer_idle || printer_state == AC_printer_probing /*!isPrinting()*/) { - // if we are at the current mesh point indicated on the panel Move Z pos +/- 0.05mm - // (The panel changes the mesh value by +/- 0.05mm on each button press) - if (selectedmeshpoint.x == pos.x && selectedmeshpoint.y == pos.y) { - setSoftEndstopState(false); - float currZpos = getAxisPosition_mm(Z); - #if ACDEBUG(AC_INFO) - SERIAL_ECHOLNPAIR("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05)); - #endif - setAxisPosition_mm(currZpos + constrain(newval - currmesh, -0.05, 0.05), Z); - } - } - } - } break; - } - } -} // namespace - -#endif // ANYCUBIC_LCD_CHIRON diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.h b/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.h deleted file mode 100644 index 267f2fe9783f..000000000000 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#pragma once - -/** - * lcd/extui/lib/chiron_tft.h - * - * Extensible_UI implementation for Anycubic Chiron - * Written By Nick Wells, 2020 [https://github.com/SwiftNick] - * (not affiliated with Anycubic, Ltd.) - */ - -#include "chiron_tft_defs.h" -#include "../../../../inc/MarlinConfigPre.h" -#include "../../ui_api.h" -namespace Anycubic { - - class ChironTFT { - static printer_state_t printer_state; - static paused_state_t pause_state; - static heater_state_t hotend_state; - static heater_state_t hotbed_state; - static xy_uint8_t selectedmeshpoint; - static char panel_command[MAX_CMND_LEN]; - static uint8_t command_len; - static char selectedfile[MAX_PATH_LEN]; - static float live_Zoffset; - static file_menu_t file_menu; - public: - ChironTFT(); - void Startup(); - void IdleLoop(); - void PrinterKilled(PGM_P,PGM_P); - void MediaEvent(media_event_t); - void TimerEvent(timer_event_t); - void FilamentRunout(); - void ConfirmationRequest(const char * const ); - void StatusChange(const char * const ); - void PowerLossRecovery(); - - private: - void SendtoTFT(PGM_P); - void SendtoTFTLN(PGM_P); - bool ReadTFTCommand(); - int8_t Findcmndpos(const char *, char); - void CheckHeaters(); - void SendFileList(int8_t); - void SelectFile(); - void InjectCommandandWait(PGM_P); - void ProcessPanelRequest(); - void PanelInfo(uint8_t); - void PanelAction(uint8_t); - void PanelProcess(uint8_t); - }; - - extern ChironTFT Chiron; - -} diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h deleted file mode 100644 index 6bb920885a5b..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/boards.h +++ /dev/null @@ -1,184 +0,0 @@ -/************ - * boards.h * - ************/ - -/**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#pragma once - -#define HAS_RESOLUTION (defined(TOUCH_UI_320x240) || defined(TOUCH_UI_480x272) || defined(TOUCH_UI_800x480)) - -#define IS_FT800 \ - constexpr uint16_t ftdi_chip = 800; \ - using namespace FTDI_FT800; \ - namespace DL { \ - using namespace FTDI_FT800_DL; \ - } \ - typedef ft800_memory_map ftdi_memory_map; \ - typedef ft800_registers ftdi_registers; - -#define IS_FT810 \ - constexpr uint16_t ftdi_chip = 810; \ - using namespace FTDI_FT810; \ - namespace DL { \ - using namespace FTDI_FT800_DL; \ - using namespace FTDI_FT810_DL; \ - } \ - typedef ft810_memory_map ftdi_memory_map; \ - typedef ft810_registers ftdi_registers; - -#ifdef LCD_FTDI_VM800B35A - #if !HAS_RESOLUTION - #define TOUCH_UI_320x240 - #endif - #ifndef FTDI_API_LEVEL - #define FTDI_API_LEVEL 800 - #endif - namespace FTDI { - IS_FT800 - constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated - constexpr bool GPIO_0_Audio_Enable = false; /* 1 = does use GPIO00 for amplifier control, 0 = not in use for Audio */ - constexpr bool GPIO_1_Audio_Shutdown = true; /* 1 = does use GPIO01 for amplifier control, 0 = not in use for Audio */ - constexpr uint8_t Swizzle = 2; - constexpr uint8_t CSpread = 1; - - constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */ - } - -/** - * Settings for the Haoyu Electronics, 4.3" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY43B) - * and 5" Graphical LCD Touchscreen, 480x272, SPI, FT800 (FT800CB-HY50B) - * http://www.hotmcu.com/43-graphical-lcd-touchscreen-480x272-spi-ft800-p-111.html?cPath=6_16 - * http://www.hotmcu.com/5-graphical-lcd-touchscreen-480x272-spi-ft800-p-124.html?cPath=6_16 - * Datasheet: - * https://www.hantronix.com/files/data/1278363262430-3.pdf - * https://www.haoyuelectronics.com/Attachment/HY43-LCD/LCD%20DataSheet.pdf - * https://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf - */ -#elif defined(LCD_HAOYU_FT800CB) - #if !HAS_RESOLUTION - #define TOUCH_UI_480x272 - #endif - #ifndef FTDI_API_LEVEL - #define FTDI_API_LEVEL 800 - #endif - namespace FTDI { - IS_FT800 - constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated - constexpr bool GPIO_0_Audio_Enable = false; - constexpr bool GPIO_1_Audio_Shutdown = false; - constexpr uint8_t Swizzle = 0; - constexpr uint8_t CSpread = 1; - constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ - } - -/** - * Settings for the Haoyu Electronics, 5" Graphical LCD Touchscreen, 800x480, SPI, FT810 - * http://www.hotmcu.com/5-graphical-lcd-touchscreen-800x480-spi-ft810-p-286.html - * Datasheet: - * https://www.haoyuelectronics.com/Attachment/HY5-LCD-HD/KD50G21-40NT-A1.pdf - */ -#elif defined(LCD_HAOYU_FT810CB) - #if !HAS_RESOLUTION - #define TOUCH_UI_800x480 - #endif - #ifndef FTDI_API_LEVEL - #define FTDI_API_LEVEL 810 - #endif - namespace FTDI { - IS_FT810 - constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated - constexpr bool GPIO_0_Audio_Enable = false; - constexpr bool GPIO_1_Audio_Shutdown = false; - constexpr uint8_t Swizzle = 0; - constexpr uint8_t CSpread = 1; - constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ - } - -/** - * Settings for the 4D Systems, 4.3" Embedded SPI Display 480x272, SPI, FT800 (4DLCD-FT843) - * https://4dsystems.com.au/4dlcd-ft843 - * Datasheet: - * https://4dsystems.com.au/mwdownloads/download/link/id/52/ - */ -#elif defined(LCD_4DSYSTEMS_4DLCD_FT843) - #if !HAS_RESOLUTION - #define TOUCH_UI_480x272 - #endif - #ifndef FTDI_API_LEVEL - #define FTDI_API_LEVEL 800 - #endif - namespace FTDI { - IS_FT800 - constexpr bool Use_Crystal = true; // 0 = use internal oscillator, 1 = module has a crystal populated - constexpr bool GPIO_0_Audio_Enable = false; - constexpr bool GPIO_1_Audio_Shutdown = true; - constexpr uint8_t Swizzle = 0; - constexpr uint8_t CSpread = 1; - constexpr uint16_t touch_threshold = 1200; /* touch-sensitivity */ - } - -/** - * Settings for the Aleph Objects Color LCD User Interface - * Datasheet https://www.hantronix.com/files/data/s1501799605s500-gh7.pdf - */ -#elif defined(LCD_ALEPHOBJECTS_CLCD_UI) - #if !HAS_RESOLUTION - #define TOUCH_UI_800x480 - #endif - #ifndef FTDI_API_LEVEL - #define FTDI_API_LEVEL 810 - #endif - namespace FTDI { - IS_FT810 - constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated - constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio - constexpr bool GPIO_1_Audio_Shutdown = false; - constexpr uint8_t Swizzle = 0; - constexpr uint8_t CSpread = 0; - constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ - } - -/** - * FYSETC Color LCD - * https://www.aliexpress.com/item/4000627651757.html - * Product information: - * https://github.com/FYSETC/TFT81050 - */ -#elif defined(LCD_FYSETC_TFT81050) - #if !HAS_RESOLUTION - #define TOUCH_UI_800x480 - #endif - #ifndef FTDI_API_LEVEL - #define FTDI_API_LEVEL 810 - #endif - namespace FTDI { - IS_FT810 - constexpr bool Use_Crystal = false; // 0 = use internal oscillator, 1 = module has a crystal populated - constexpr bool GPIO_0_Audio_Enable = true; // The AO CLCD uses GPIO0 to enable audio - constexpr bool GPIO_1_Audio_Shutdown = false; - constexpr uint8_t Swizzle = 0; - constexpr uint8_t CSpread = 0; - constexpr uint16_t touch_threshold = 2000; /* touch-sensitivity */ - } -#else - - #error "Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify this file." - -#endif diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h deleted file mode 100644 index 00bfe3706b15..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/cyrillic_char_set_bitmap_31.h +++ /dev/null @@ -1,2529 +0,0 @@ -/******************************** - * cyrillic_char_set_bitmap_31.h * - ********************************/ - -/**************************************************************************** - * Written By Kirill Shashlov 2020 * - * Marcio Teixeira 2019 - Aleph Objects, Inc. * - * * - * Used GNU FreeFont FreeSans font (licensed under the GPL) * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#pragma once - -const uint8_t cyrillic_font_widths[] PROGMEM = { - 27, // А (0) - 26, // Б - 26, // В - 24, // Г - 33, // Д - 25, // Е - 37, // Ж - 26, // З - - 28, // И (8) - 28, // Й - 26, // К - 25, // Л - 33, // М - 27, // Н - 31, // О - 27, // П - - 26, // Р (16) - 29, // С - 28, // Т - 26, // У - 34, // Ф - 27, // Х - 30, // Ц - 23, // Ч - - 32, // Ш (24) - 34, // Щ - 26, // Ь - 34, // Ы - 34, // Ъ - 28, // Э - 40, // Ю - 26, // Я - - 22, // а (32) - 21, // б - 20, // в - 16, // г - 24, // д - 21, // е - 31, // ж - 19, // з - - 21, // и (40) - 21, // й - 20, // к - 19, // л - 23, // м - 21, // н - 21, // о - 21, // п - - 22, // р (48) - 20, // с - 17, // т - 19, // у - 34, // ф - 19, // х - 23, // ц - 19, // ч - 26, // ш - 28, // щ - 20, // ь - 26, // ы - 26, // ъ - 20, // э - 30, // ю - 20, // я - - 26, // Ё - 21, // ё -}; - - -/* This is a dump of "font_bitmaps/cyrillic_char_set_bitmap_31.png" - * using the tool "bitmap2cpp.py". The tool converts the image into - * 16-level grayscale and packs two pixels per byte. The resulting - * bytes are then RLE compressed to yield (count, byte) pairs. - */ - -const unsigned char cyrillic_font[] PROGMEM = { - /* 0 */ - 0xb9, 0x00, 0x01, 0x2f, 0x02, 0xff, 0x01, 0x30, 0x10, 0x00, 0x01, 0x7f, - 0x02, 0xff, 0x01, 0x90, 0x10, 0x00, 0x01, 0xdf, 0x02, 0xff, 0x01, 0xe0, - 0x0f, 0x00, 0x01, 0x03, 0x03, 0xff, 0x01, 0xf4, 0x0f, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xfb, 0x01, 0xff, 0x01, 0xfa, 0x0f, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xf1, 0x02, 0xff, 0x0f, 0x00, 0x01, 0x5f, 0x01, 0xff, - 0x01, 0x90, 0x01, 0xaf, 0x01, 0xff, 0x01, 0x50, 0x0e, 0x00, 0x01, 0xaf, - 0x01, 0xff, 0x01, 0x40, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xb0, 0x0d, 0x00, - 0x01, 0x01, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xf1, 0x0d, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf8, 0x01, 0x00, - 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf7, 0x0d, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x01, 0x00, 0x01, 0x04, 0x01, 0xff, 0x01, 0xfc, 0x0d, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0xef, 0x01, 0xff, - 0x01, 0x20, 0x0c, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0x60, 0x02, 0x00, - 0x01, 0x9f, 0x01, 0xff, 0x01, 0x80, 0x0c, 0x00, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0x10, 0x02, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xd0, 0x0b, 0x00, - 0x01, 0x03, 0x01, 0xff, 0x01, 0xfa, 0x03, 0x00, 0x01, 0x0e, 0x01, 0xff, - 0x01, 0xf3, 0x0b, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf5, 0x03, 0x00, - 0x01, 0x09, 0x01, 0xff, 0x01, 0xf9, 0x0b, 0x00, 0x01, 0x0e, 0x01, 0xff, - 0x01, 0xe0, 0x03, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0x4f, 0x01, 0xff, 0x01, 0xb4, 0x04, 0x44, 0x02, 0xff, 0x01, 0x40, - 0x0a, 0x00, 0x01, 0xaf, 0x08, 0xff, 0x01, 0xa0, 0x0a, 0x00, 0x09, 0xff, - 0x01, 0xf0, 0x09, 0x00, 0x01, 0x06, 0x02, 0xff, 0x05, 0xee, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xf5, 0x09, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf5, - 0x05, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xfb, 0x09, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xf0, 0x05, 0x00, 0x01, 0x02, 0x02, 0xff, 0x01, 0x10, - 0x08, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0x90, 0x06, 0x00, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0x70, 0x08, 0x00, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x40, - 0x06, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xfe, 0x07, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xf2, - 0x07, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf8, 0x07, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf8, 0x07, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xf2, - 0x07, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xfd, 0x07, 0x00, 0x01, 0x4f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x01, 0x02, 0xff, 0x01, 0x30, - 0x06, 0x00, 0x01, 0x8d, 0x01, 0xdd, 0x01, 0x60, 0x08, 0x00, 0x01, 0xad, - 0x01, 0xdd, 0x01, 0x70, 0xce, 0x00, - - /* 1 */ - 0xb5, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xf4, 0x09, 0x00, 0x01, 0x1f, - 0x09, 0xff, 0x01, 0xf4, 0x09, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xf4, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd5, 0x07, 0x55, 0x01, 0x51, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xfe, - 0x04, 0xee, 0x01, 0xdb, 0x01, 0x84, 0x0b, 0x00, 0x01, 0x1f, 0x08, 0xff, - 0x01, 0xe7, 0x0a, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xd2, 0x09, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd6, 0x04, 0x66, 0x01, 0x68, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0xfd, 0x01, 0x10, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x05, 0x00, 0x01, 0x04, 0x01, 0xef, 0x01, 0xff, 0x01, 0x90, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x3f, - 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x06, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf5, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf7, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf9, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x06, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf7, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf4, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x06, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xe0, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x05, 0x02, 0xff, 0x01, 0x80, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xe7, 0x04, 0x77, 0x01, 0x89, - 0x01, 0xdf, 0x01, 0xff, 0x01, 0xfe, 0x09, 0x00, 0x01, 0x1f, 0x09, 0xff, - 0x01, 0xe2, 0x09, 0x00, 0x01, 0x1f, 0x08, 0xff, 0x01, 0xfb, 0x01, 0x10, - 0x09, 0x00, 0x01, 0x1d, 0x06, 0xdd, 0x01, 0xdc, 0x01, 0xb7, 0x01, 0x20, - 0xd1, 0x00, - - /* 2 */ - 0xb5, 0x00, 0x01, 0x1f, 0x06, 0xff, 0x01, 0xec, 0x01, 0x94, 0x0b, 0x00, - 0x01, 0x1f, 0x08, 0xff, 0x01, 0xc3, 0x0a, 0x00, 0x01, 0x1f, 0x09, 0xff, - 0x01, 0x40, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd6, 0x03, 0x66, - 0x01, 0x67, 0x01, 0x9d, 0x02, 0xff, 0x01, 0xe1, 0x09, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x4e, 0x01, 0xff, 0x01, 0xf9, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x04, - 0x02, 0xff, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, - 0x01, 0xdf, 0x01, 0xff, 0x01, 0x20, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x06, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0x30, 0x08, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0xaf, 0x01, 0xff, - 0x01, 0x20, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, - 0x01, 0xcf, 0x01, 0xff, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x05, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xfa, 0x09, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x1d, 0x01, 0xff, 0x01, 0xf2, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd2, 0x03, 0x22, 0x01, 0x23, - 0x01, 0x59, 0x02, 0xff, 0x01, 0x50, 0x09, 0x00, 0x01, 0x1f, 0x08, 0xff, - 0x01, 0xd3, 0x0a, 0x00, 0x01, 0x1f, 0x08, 0xff, 0x01, 0xb3, 0x0a, 0x00, - 0x01, 0x1f, 0x09, 0xff, 0x01, 0xa0, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xd4, 0x04, 0x44, 0x01, 0x45, 0x01, 0x9f, 0x01, 0xff, 0x01, 0xfd, - 0x01, 0x10, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, - 0x01, 0x01, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xa0, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf6, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x06, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf9, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x07, - 0x01, 0xff, 0x01, 0xf7, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x06, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf5, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x05, - 0x01, 0xef, 0x01, 0xff, 0x01, 0x90, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xe7, 0x04, 0x77, 0x01, 0x79, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xfe, - 0x01, 0x10, 0x08, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xe3, 0x09, 0x00, - 0x01, 0x1f, 0x08, 0xff, 0x01, 0xfa, 0x01, 0x10, 0x09, 0x00, 0x01, 0x1d, - 0x07, 0xdd, 0x01, 0xb7, 0x01, 0x20, 0xd1, 0x00, - - /* 3 */ - 0xb5, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xf4, 0x09, 0x00, 0x01, 0x1f, - 0x09, 0xff, 0x01, 0xf4, 0x09, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xf4, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd5, 0x07, 0x55, 0x01, 0x51, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1e, - 0x01, 0xee, 0x01, 0xb0, 0xd8, 0x00, - - /* 4 */ - 0xb8, 0x00, 0x01, 0x08, 0x09, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, - 0x09, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x09, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xfa, 0x05, 0x66, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf6, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf6, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf6, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf5, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf5, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xf4, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf3, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf2, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xf0, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xf0, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x6f, - 0x01, 0xff, 0x01, 0xa0, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0x70, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0x30, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x08, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xfe, 0x06, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x08, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x08, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xf1, - 0x06, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x05, 0x00, 0x01, 0x02, - 0x01, 0x22, 0x01, 0x28, 0x02, 0xff, 0x01, 0xc7, 0x06, 0x77, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0x52, 0x01, 0x22, 0x04, 0x00, 0x01, 0x0f, 0x0f, 0xff, - 0x04, 0x00, 0x01, 0x0f, 0x0f, 0xff, 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xed, 0x0b, 0xdd, 0x01, 0xef, 0x01, 0xff, 0x04, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x04, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x5f, 0x01, 0xff, - 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x5f, - 0x01, 0xff, 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, - 0x01, 0x5f, 0x01, 0xff, 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x50, - 0x0b, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x04, 0x00, 0x01, 0x06, 0x01, 0x66, - 0x01, 0x20, 0x0b, 0x00, 0x01, 0x26, 0x01, 0x66, 0x54, 0x00, - - /* 5 */ - 0xb5, 0x00, 0x01, 0x1f, 0x0a, 0xff, 0x09, 0x00, 0x01, 0x1f, 0x0a, 0xff, - 0x09, 0x00, 0x01, 0x1f, 0x0a, 0xff, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xd6, 0x07, 0x66, 0x01, 0x65, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc1, 0x07, 0x11, 0x01, 0x10, 0x09, 0x00, - 0x01, 0x1f, 0x09, 0xff, 0x01, 0xf5, 0x09, 0x00, 0x01, 0x1f, 0x09, 0xff, - 0x01, 0xf5, 0x09, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xf5, 0x09, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd4, 0x07, 0x44, 0x01, 0x41, 0x09, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xe7, 0x08, 0x77, 0x01, 0x50, 0x08, 0x00, - 0x01, 0x1f, 0x0a, 0xff, 0x01, 0xb0, 0x08, 0x00, 0x01, 0x1f, 0x0a, 0xff, - 0x01, 0xb0, 0x08, 0x00, 0x01, 0x1e, 0x0a, 0xee, 0x01, 0xa0, 0xcf, 0x00, - - /* 6 */ - 0xb5, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0xf3, 0x04, 0x00, 0x01, 0x4f, - 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xe1, - 0x03, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x10, 0x03, 0x00, - 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, 0x01, 0x0a, 0x02, 0xff, - 0x01, 0x30, 0x03, 0x00, 0x01, 0x01, 0x01, 0xef, 0x01, 0xff, 0x01, 0xb0, - 0x03, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, 0x01, 0x7f, - 0x01, 0xff, 0x01, 0xf5, 0x05, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xf8, - 0x03, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x03, - 0x02, 0xff, 0x01, 0x80, 0x05, 0x00, 0x01, 0x05, 0x02, 0xff, 0x01, 0x50, - 0x02, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x1e, - 0x01, 0xff, 0x01, 0xfb, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0xf2, - 0x02, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xfd, - 0x02, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xfe, 0x01, 0x20, 0x07, 0x00, 0x01, 0x01, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0xb0, 0x01, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, - 0x01, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xf4, 0x09, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xf7, 0x01, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, - 0x01, 0x02, 0x02, 0xff, 0x01, 0x70, 0x09, 0x00, 0x01, 0x05, 0x02, 0xff, - 0x01, 0x40, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x1d, 0x01, 0xff, - 0x01, 0xfa, 0x0b, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xe2, 0x01, 0x4f, - 0x01, 0xff, 0x01, 0x90, 0x01, 0xbf, 0x01, 0xff, 0x01, 0xc0, 0x0b, 0x00, - 0x01, 0x0b, 0x01, 0xff, 0x01, 0xfc, 0x01, 0x5f, 0x01, 0xff, 0x01, 0x98, - 0x01, 0xff, 0x01, 0xfe, 0x01, 0x10, 0x0c, 0x00, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0xdf, 0x01, 0xff, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xf3, 0x0d, 0x00, - 0x01, 0x2e, 0x05, 0xff, 0x01, 0x60, 0x0d, 0x00, 0x01, 0x07, 0x04, 0xff, - 0x01, 0xfc, 0x0e, 0x00, 0x01, 0x2e, 0x05, 0xff, 0x01, 0x60, 0x0c, 0x00, - 0x01, 0x01, 0x01, 0xef, 0x01, 0xff, 0x01, 0xef, 0x01, 0xff, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xf4, 0x0c, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xfd, - 0x01, 0x5f, 0x01, 0xff, 0x01, 0x9a, 0x02, 0xff, 0x01, 0x30, 0x0b, 0x00, - 0x01, 0xbf, 0x01, 0xff, 0x01, 0xe2, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, - 0x01, 0xbf, 0x01, 0xff, 0x01, 0xe2, 0x0a, 0x00, 0x01, 0x09, 0x02, 0xff, - 0x01, 0x30, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x0d, 0x01, 0xff, - 0x01, 0xfd, 0x01, 0x10, 0x09, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xf4, - 0x01, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x01, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xc0, 0x08, 0x00, 0x01, 0x06, 0x02, 0xff, 0x01, 0x50, - 0x01, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, 0x01, 0x3f, - 0x01, 0xff, 0x01, 0xfb, 0x08, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xf7, - 0x02, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, 0x01, 0x04, - 0x02, 0xff, 0x01, 0x90, 0x06, 0x00, 0x01, 0x03, 0x02, 0xff, 0x01, 0x80, - 0x02, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x6f, - 0x01, 0xff, 0x01, 0xf7, 0x06, 0x00, 0x01, 0x2e, 0x01, 0xff, 0x01, 0xfa, - 0x03, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x08, - 0x02, 0xff, 0x01, 0x50, 0x04, 0x00, 0x01, 0x01, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0xb0, 0x03, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, - 0x01, 0xaf, 0x01, 0xff, 0x01, 0xf4, 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xfc, 0x04, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, - 0x01, 0x0b, 0x02, 0xff, 0x01, 0x20, 0x03, 0x00, 0x01, 0xaf, 0x01, 0xff, - 0x01, 0xd1, 0x04, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, - 0x01, 0xdf, 0x01, 0xff, 0x01, 0xe1, 0x02, 0x00, 0x01, 0x08, 0x01, 0xff, - 0x01, 0xfe, 0x01, 0x20, 0x04, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x90, - 0x04, 0x00, 0x01, 0x2e, 0x01, 0xff, 0x01, 0xfd, 0x01, 0x10, 0x01, 0x00, - 0x01, 0x5d, 0x01, 0xdd, 0x01, 0xd3, 0x05, 0x00, 0x01, 0x3d, 0x01, 0xdd, - 0x01, 0x80, 0x04, 0x00, 0x01, 0x03, 0x02, 0xdd, 0x01, 0x90, 0xc9, 0x00, - - /* 7 */ - 0xa5, 0x00, 0x01, 0x45, 0x01, 0x67, 0x01, 0x65, 0x01, 0x20, 0x0e, 0x00, - 0x01, 0x06, 0x01, 0xcf, 0x03, 0xff, 0x01, 0xfe, 0x01, 0x92, 0x0c, 0x00, - 0x01, 0x04, 0x01, 0xef, 0x06, 0xff, 0x01, 0x90, 0x0b, 0x00, 0x01, 0x6f, - 0x02, 0xff, 0x01, 0xfd, 0x01, 0xcb, 0x01, 0xcf, 0x02, 0xff, 0x01, 0xfc, - 0x0a, 0x00, 0x01, 0x04, 0x02, 0xff, 0x01, 0xd6, 0x01, 0x10, 0x02, 0x00, - 0x01, 0x39, 0x02, 0xff, 0x01, 0xa0, 0x09, 0x00, 0x01, 0x0d, 0x01, 0xff, - 0x01, 0xf9, 0x05, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xf3, 0x09, 0x00, - 0x01, 0x4f, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xf9, 0x09, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x06, 0x00, - 0x01, 0xff, 0x01, 0xfe, 0x09, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x07, 0x00, - 0x01, 0xdf, 0x01, 0xff, 0x09, 0x00, 0x01, 0xac, 0x01, 0xcb, 0x07, 0x00, - 0x01, 0xef, 0x01, 0xff, 0x01, 0x10, 0x10, 0x00, 0x01, 0x04, 0x02, 0xff, - 0x11, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xfc, 0x10, 0x00, 0x01, 0x01, - 0x01, 0xbf, 0x01, 0xff, 0x01, 0xf5, 0x10, 0x00, 0x01, 0x5d, 0x02, 0xff, - 0x01, 0xa0, 0x0d, 0x00, 0x02, 0x99, 0x01, 0xbe, 0x02, 0xff, 0x01, 0xf8, - 0x0e, 0x00, 0x05, 0xff, 0x01, 0x40, 0x0e, 0x00, 0x05, 0xff, 0x01, 0xf9, - 0x0e, 0x00, 0x02, 0xbb, 0x01, 0xcd, 0x03, 0xff, 0x01, 0xd1, 0x10, 0x00, - 0x01, 0x16, 0x01, 0xef, 0x01, 0xff, 0x01, 0xfc, 0x11, 0x00, 0x01, 0x0a, - 0x02, 0xff, 0x01, 0x60, 0x11, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xc0, - 0x07, 0x00, 0x01, 0x07, 0x01, 0x99, 0x01, 0x80, 0x07, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xf0, 0x07, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf0, - 0x07, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf1, 0x07, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xf2, 0x07, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf1, - 0x07, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, 0x07, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xe0, 0x07, 0x00, 0x01, 0x01, 0x02, 0xff, 0x01, 0x20, - 0x06, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xa0, 0x08, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0xd2, 0x05, 0x00, 0x01, 0x03, 0x02, 0xff, 0x01, 0x30, - 0x08, 0x00, 0x01, 0x1e, 0x02, 0xff, 0x01, 0x81, 0x03, 0x00, 0x01, 0x01, - 0x01, 0x8f, 0x01, 0xff, 0x01, 0xfa, 0x09, 0x00, 0x01, 0x03, 0x01, 0xef, - 0x02, 0xff, 0x01, 0xda, 0x01, 0x98, 0x01, 0x9a, 0x01, 0xdf, 0x02, 0xff, - 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x2d, 0x07, 0xff, 0x01, 0xfa, 0x0c, 0x00, - 0x01, 0x6d, 0x05, 0xff, 0x01, 0xfb, 0x01, 0x30, 0x0d, 0x00, 0x01, 0x27, - 0x01, 0x9b, 0x01, 0xcd, 0x01, 0xba, 0x01, 0x95, 0x01, 0x10, 0xbe, 0x00, - - /* 8 */ - 0xb5, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x07, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x06, 0x00, 0x01, 0x07, 0x02, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x90, 0x06, 0x00, 0x01, 0x2f, 0x02, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x06, 0x00, 0x01, 0xcf, - 0x02, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x05, 0x00, 0x01, 0x06, 0x03, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x90, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x05, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xfa, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, 0x01, 0x1e, 0x01, 0xff, - 0x01, 0xe1, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x60, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x03, 0x00, 0x01, 0x04, 0x01, 0xff, 0x01, 0xfb, 0x01, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x03, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf2, 0x01, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x03, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x70, 0x01, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x02, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xfd, 0x02, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x02, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf3, 0x02, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x02, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0x80, 0x02, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x01, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xfd, 0x03, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x01, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf4, 0x03, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x01, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x01, 0x01, 0x01, 0xef, 0x01, 0xfe, 0x01, 0x10, 0x03, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf5, 0x04, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x01, 0x5f, 0x01, 0xff, 0x01, 0xb0, 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x10, 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x99, 0x01, 0xff, 0x01, 0xf6, - 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x03, 0xff, 0x01, 0x20, - 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, - 0x02, 0xff, 0x01, 0xf7, 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x02, 0xff, 0x01, 0xd0, 0x06, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x02, 0xff, 0x01, 0x30, - 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1e, - 0x01, 0xee, 0x01, 0xe8, 0x07, 0x00, 0x01, 0x0e, 0x01, 0xee, 0x01, 0xa0, - 0xce, 0x00, - - /* 9 */ - 0x2c, 0x00, 0x01, 0x7f, 0x01, 0xf1, 0x03, 0x00, 0x01, 0x9f, 0x01, 0xe0, - 0x0d, 0x00, 0x01, 0x5f, 0x01, 0xf8, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, - 0x01, 0xb0, 0x0d, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xb6, 0x01, 0x45, - 0x01, 0x9f, 0x01, 0xff, 0x01, 0x50, 0x0d, 0x00, 0x01, 0x05, 0x04, 0xff, - 0x01, 0xfb, 0x0f, 0x00, 0x01, 0x5e, 0x03, 0xff, 0x01, 0x90, 0x10, 0x00, - 0x01, 0x46, 0x01, 0x87, 0x01, 0x51, 0x20, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x07, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x06, 0x00, 0x01, 0x07, 0x02, 0xff, - 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x06, 0x00, - 0x01, 0x2f, 0x02, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x06, 0x00, 0x01, 0xbf, 0x02, 0xff, 0x01, 0xa0, 0x07, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x05, 0x00, 0x01, 0x06, 0x03, 0xff, - 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x05, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xef, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x05, 0x00, 0x01, 0xaf, 0x01, 0xff, - 0x01, 0x4f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x04, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xfa, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x04, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xe1, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, - 0x01, 0x9f, 0x01, 0xff, 0x01, 0x60, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, 0x01, 0x04, - 0x01, 0xff, 0x01, 0xfb, 0x01, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, 0x01, 0x0d, - 0x01, 0xff, 0x01, 0xf2, 0x01, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x70, 0x01, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xfd, 0x02, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf3, 0x02, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x7f, - 0x01, 0xff, 0x01, 0x80, 0x02, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xfd, 0x03, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xf4, 0x03, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, 0x01, 0x6f, - 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x01, 0x01, 0xef, - 0x01, 0xfe, 0x01, 0x10, 0x03, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x0a, 0x01, 0xff, - 0x01, 0xf5, 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xb0, - 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x90, 0x01, 0xef, 0x01, 0xff, 0x01, 0x10, 0x04, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x99, 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0xc0, 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, - 0x01, 0x1f, 0x03, 0xff, 0x01, 0x20, 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x02, 0xff, 0x01, 0xf7, 0x06, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x02, 0xff, - 0x01, 0xd0, 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, - 0x01, 0x1f, 0x02, 0xff, 0x01, 0x30, 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0xe8, 0x07, 0x00, - 0x01, 0x0e, 0x01, 0xee, 0x01, 0xa0, 0xce, 0x00, - - /* 10 */ - 0xb5, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x1d, - 0x01, 0xff, 0x01, 0xfa, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x04, 0x00, 0x01, 0x01, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xa0, 0x09, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x04, 0x00, 0x01, 0x1d, 0x01, 0xff, - 0x01, 0xf9, 0x0a, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x03, 0x00, - 0x01, 0x01, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x90, 0x0a, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x03, 0x00, 0x01, 0x2d, 0x01, 0xff, 0x01, 0xf9, - 0x0b, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0x02, - 0x01, 0xef, 0x01, 0xff, 0x01, 0x90, 0x0b, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x02, 0x00, 0x01, 0x2e, 0x01, 0xff, 0x01, 0xf8, 0x0c, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x01, 0x00, 0x01, 0x02, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x80, 0x0c, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x01, 0x00, 0x01, 0x2e, 0x01, 0xff, 0x01, 0xf8, 0x0d, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x01, 0x02, 0x01, 0xef, 0x01, 0xff, 0x01, 0x80, - 0x0d, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x01, 0x2e, 0x01, 0xff, - 0x01, 0xf7, 0x0e, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc3, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x70, 0x0e, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xee, - 0x01, 0xff, 0x01, 0xf7, 0x0f, 0x00, 0x01, 0x1f, 0x03, 0xff, 0x01, 0x70, - 0x0f, 0x00, 0x01, 0x1f, 0x03, 0xff, 0x01, 0x20, 0x0f, 0x00, 0x01, 0x1f, - 0x03, 0xff, 0x01, 0xe2, 0x0f, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xdd, - 0x01, 0xff, 0x01, 0xfe, 0x01, 0x20, 0x0e, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc1, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xe2, 0x0e, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x01, 0x1d, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x20, - 0x0d, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x01, 0x01, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0xe2, 0x0d, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x01, 0x00, 0x01, 0x1d, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x20, 0x0c, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x01, 0x00, 0x01, 0x01, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0xe2, 0x0c, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x02, 0x00, 0x01, 0x1d, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x20, 0x0b, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0x01, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0xe2, 0x0b, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x03, 0x00, 0x01, 0x1d, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x30, 0x0a, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x03, 0x00, 0x01, 0x02, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xe3, 0x0a, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x04, 0x00, 0x01, 0x2e, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x30, 0x09, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x04, 0x00, 0x01, 0x02, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xe3, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x05, 0x00, 0x01, 0x2e, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x30, 0x08, 0x00, - 0x01, 0x1e, 0x01, 0xee, 0x01, 0xb0, 0x05, 0x00, 0x01, 0x02, 0x01, 0xde, - 0x01, 0xee, 0x01, 0xd2, 0xcf, 0x00, - - /* 11 */ - 0xb6, 0x00, 0x01, 0x08, 0x09, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, - 0x09, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x09, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xfa, 0x05, 0x66, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf6, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf6, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf6, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf5, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf4, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0a, - 0x01, 0xff, 0x01, 0xf4, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf3, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf1, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xf0, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xe0, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xc0, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x4f, - 0x01, 0xff, 0x01, 0x90, 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0x60, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x20, - 0x05, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x08, 0x00, 0x01, 0x01, - 0x01, 0xff, 0x01, 0xfe, 0x06, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x08, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf9, 0x06, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x30, 0x08, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xf2, - 0x06, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x07, 0x00, 0x01, 0x1a, - 0x02, 0xff, 0x01, 0xa0, 0x06, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, - 0x07, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x10, 0x06, 0x00, - 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x07, 0x00, 0x01, 0x2f, 0x01, 0xff, - 0x01, 0xf4, 0x07, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x07, 0x00, - 0x01, 0x2f, 0x01, 0xfb, 0x01, 0x20, 0x07, 0x00, 0x01, 0xae, 0x01, 0xee, - 0x01, 0x30, 0x07, 0x00, 0x01, 0x03, 0x01, 0x10, 0xc6, 0x00, - - /* 12 */ - 0xb5, 0x00, 0x01, 0x1e, 0x02, 0xee, 0x01, 0x70, 0x08, 0x00, 0x02, 0xee, - 0x01, 0xe7, 0x05, 0x00, 0x01, 0x1f, 0x02, 0xff, 0x01, 0xc0, 0x07, 0x00, - 0x01, 0x05, 0x02, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x02, 0xff, - 0x01, 0xf2, 0x07, 0x00, 0x01, 0x0b, 0x02, 0xff, 0x01, 0xf8, 0x05, 0x00, - 0x01, 0x1f, 0x02, 0xff, 0x01, 0xf7, 0x07, 0x00, 0x01, 0x1f, 0x02, 0xff, - 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x02, 0xff, 0x01, 0xfd, 0x07, 0x00, - 0x01, 0x6f, 0x02, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xcf, 0x01, 0xff, 0x01, 0x30, 0x06, 0x00, 0x01, 0xbf, 0x01, 0xfc, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x9d, - 0x01, 0xff, 0x01, 0x80, 0x05, 0x00, 0x01, 0x01, 0x01, 0xff, 0x01, 0xf7, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x98, - 0x01, 0xff, 0x01, 0xe0, 0x05, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xe2, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x92, - 0x01, 0xff, 0x01, 0xf3, 0x05, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0x92, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x01, 0xdf, 0x01, 0xf9, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x42, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x01, 0x7f, 0x01, 0xfe, 0x05, 0x00, 0x01, 0x6f, 0x01, 0xfe, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x01, 0x2f, 0x01, 0xff, 0x01, 0x40, 0x04, 0x00, 0x01, 0xcf, 0x01, 0xf9, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x01, 0x0c, 0x01, 0xff, 0x01, 0x90, 0x03, 0x00, 0x01, 0x01, - 0x01, 0xff, 0x01, 0xf3, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x07, 0x01, 0xff, 0x01, 0xe0, - 0x03, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xe0, 0x01, 0x02, 0x01, 0xff, - 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x01, - 0x01, 0xff, 0x01, 0xf4, 0x03, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0x80, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x01, 0x00, 0x01, 0xcf, 0x01, 0xfa, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x30, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, 0x01, 0x6f, 0x01, 0xff, - 0x03, 0x00, 0x01, 0x7f, 0x01, 0xfd, 0x01, 0x00, 0x01, 0x02, 0x01, 0xff, - 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0x50, 0x02, 0x00, 0x01, 0xcf, 0x01, 0xf8, - 0x01, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xa0, - 0x01, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf3, 0x01, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x01, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x01, 0x00, 0x01, 0x07, - 0x01, 0xff, 0x01, 0xd0, 0x01, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0xff, - 0x01, 0xf6, 0x01, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0x80, 0x01, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0x90, 0x02, 0x00, 0x01, 0xaf, 0x01, 0xfb, 0x01, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x20, 0x01, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x5f, - 0x01, 0xff, 0x01, 0x10, 0x01, 0x7f, 0x01, 0xfd, 0x02, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x02, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x60, 0x01, 0xdf, 0x01, 0xf7, - 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xc2, - 0x01, 0xff, 0x01, 0xf2, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, 0x01, 0x04, - 0x01, 0xff, 0x01, 0xfa, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x03, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0x70, 0x02, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x03, 0x00, 0x01, 0x9f, 0x02, 0xff, 0x01, 0x20, 0x02, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x03, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xfc, 0x03, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf8, 0x05, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0x80, - 0x03, 0x00, 0x01, 0x0d, 0x01, 0xee, 0x01, 0xe6, 0x03, 0x00, 0x01, 0x02, - 0x01, 0xee, 0x01, 0xe7, 0xcc, 0x00, - - /* 13 */ - 0xb5, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x0b, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x0b, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x0b, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd4, - 0x07, 0x44, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1e, - 0x01, 0xee, 0x01, 0xb0, 0x07, 0x00, 0x01, 0x8e, 0x01, 0xee, 0x01, 0x40, - 0xce, 0x00, - - /* 14 */ - 0xa6, 0x00, 0x01, 0x13, 0x01, 0x56, 0x01, 0x64, 0x01, 0x31, 0x0e, 0x00, - 0x01, 0x02, 0x01, 0x8d, 0x04, 0xff, 0x01, 0xc7, 0x01, 0x10, 0x0b, 0x00, - 0x01, 0x01, 0x01, 0x9f, 0x06, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0x3e, - 0x08, 0xff, 0x01, 0xd2, 0x09, 0x00, 0x01, 0x04, 0x02, 0xff, 0x01, 0xfc, - 0x01, 0x72, 0x01, 0x00, 0x01, 0x01, 0x01, 0x38, 0x01, 0xdf, 0x02, 0xff, - 0x01, 0x30, 0x08, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x50, - 0x04, 0x00, 0x01, 0x07, 0x02, 0xff, 0x01, 0xe2, 0x07, 0x00, 0x01, 0x01, - 0x01, 0xef, 0x01, 0xff, 0x01, 0xd1, 0x06, 0x00, 0x01, 0x2e, 0x01, 0xff, - 0x01, 0xfd, 0x07, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x10, - 0x06, 0x00, 0x01, 0x02, 0x02, 0xff, 0x01, 0x60, 0x06, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xf4, 0x08, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xe0, - 0x06, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xa0, 0x08, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf5, 0x06, 0x00, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x30, - 0x08, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xfb, 0x05, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xfd, 0x0a, 0x00, 0x02, 0xff, 0x05, 0x00, 0x01, 0x06, - 0x01, 0xff, 0x01, 0xf9, 0x0a, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x30, - 0x04, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf5, 0x0a, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x50, 0x04, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf4, - 0x0a, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0x70, 0x04, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xf2, 0x0a, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0x80, - 0x04, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf2, 0x0a, 0x00, 0x01, 0x4f, - 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf3, - 0x0a, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0x80, 0x04, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf4, 0x0a, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0x60, - 0x04, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf7, 0x0a, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x50, 0x04, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xfb, - 0x0a, 0x00, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x10, 0x05, 0x00, 0x02, 0xff, - 0x01, 0x10, 0x08, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xfd, 0x06, 0x00, - 0x01, 0xbf, 0x01, 0xff, 0x01, 0x70, 0x08, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xf8, 0x06, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xe1, 0x08, 0x00, - 0x01, 0x2f, 0x01, 0xff, 0x01, 0xf1, 0x06, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xfa, 0x08, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xa0, 0x06, 0x00, - 0x01, 0x04, 0x02, 0xff, 0x01, 0x80, 0x06, 0x00, 0x01, 0x0a, 0x01, 0xff, - 0x01, 0xfe, 0x01, 0x10, 0x07, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0x01, 0x01, 0xbf, 0x01, 0xff, 0x01, 0xf5, 0x08, 0x00, - 0x01, 0x0b, 0x02, 0xff, 0x01, 0xe6, 0x01, 0x10, 0x02, 0x00, 0x01, 0x02, - 0x01, 0x8f, 0x02, 0xff, 0x01, 0x80, 0x09, 0x00, 0x01, 0xaf, 0x02, 0xff, - 0x01, 0xfc, 0x01, 0xa8, 0x01, 0x8a, 0x01, 0xdf, 0x02, 0xff, 0x01, 0xf6, - 0x0a, 0x00, 0x01, 0x06, 0x01, 0xef, 0x06, 0xff, 0x01, 0xfd, 0x01, 0x40, - 0x0b, 0x00, 0x01, 0x18, 0x01, 0xef, 0x04, 0xff, 0x01, 0xfd, 0x01, 0x60, - 0x0d, 0x00, 0x01, 0x03, 0x01, 0x7a, 0x01, 0xcd, 0x01, 0xdc, 0x01, 0xa7, - 0x01, 0x30, 0xbd, 0x00, - - /* 15 */ - 0xb5, 0x00, 0x01, 0x1f, 0x0b, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x0b, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x0b, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xe6, 0x07, 0x66, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1e, - 0x01, 0xee, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9e, 0x01, 0xee, 0x01, 0x40, - 0xce, 0x00, - - /* 16 */ - 0xb5, 0x00, 0x01, 0x1e, 0x06, 0xee, 0x01, 0xec, 0x01, 0x95, 0x0b, 0x00, - 0x01, 0x1f, 0x08, 0xff, 0x01, 0xe5, 0x0a, 0x00, 0x01, 0x1f, 0x09, 0xff, - 0x01, 0x80, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd6, 0x03, 0x66, - 0x01, 0x67, 0x01, 0x9d, 0x02, 0xff, 0x01, 0xf5, 0x09, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x4e, 0x01, 0xff, 0x01, 0xfe, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x03, - 0x02, 0xff, 0x01, 0x50, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x06, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x90, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xb0, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x3f, - 0x01, 0xff, 0x01, 0xd0, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x06, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xc0, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xa0, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x70, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x05, 0x00, 0x01, 0x1b, 0x02, 0xff, 0x01, 0x10, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc1, 0x03, 0x11, 0x01, 0x12, 0x01, 0x48, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xf9, 0x09, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xc0, - 0x09, 0x00, 0x01, 0x1f, 0x08, 0xff, 0x01, 0xfb, 0x01, 0x10, 0x09, 0x00, - 0x01, 0x1f, 0x07, 0xff, 0x01, 0xfb, 0x01, 0x40, 0x0a, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd4, 0x04, 0x44, 0x01, 0x32, 0x0c, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0xb0, 0xd8, 0x00, - - /* 17 */ - 0xa6, 0x00, 0x01, 0x35, 0x01, 0x66, 0x01, 0x54, 0x01, 0x10, 0x0e, 0x00, - 0x01, 0x06, 0x01, 0xcf, 0x03, 0xff, 0x01, 0xfd, 0x01, 0x71, 0x0c, 0x00, - 0x01, 0x05, 0x01, 0xef, 0x06, 0xff, 0x01, 0x60, 0x0b, 0x00, 0x01, 0xaf, - 0x07, 0xff, 0x01, 0xf8, 0x0a, 0x00, 0x01, 0x0a, 0x02, 0xff, 0x01, 0xd7, - 0x01, 0x20, 0x01, 0x00, 0x01, 0x03, 0x01, 0x9f, 0x02, 0xff, 0x01, 0x70, - 0x09, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xf8, 0x04, 0x00, 0x01, 0x01, - 0x01, 0xbf, 0x01, 0xff, 0x01, 0xf2, 0x08, 0x00, 0x01, 0x02, 0x02, 0xff, - 0x01, 0x60, 0x05, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xfa, 0x08, 0x00, - 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0x02, 0x02, 0xff, - 0x01, 0x10, 0x07, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, - 0x01, 0xaf, 0x01, 0xff, 0x01, 0x60, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, - 0x01, 0x60, 0x07, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xa0, 0x07, 0x00, - 0x01, 0xef, 0x01, 0xff, 0x01, 0x10, 0x07, 0x00, 0x01, 0x05, 0x01, 0x55, - 0x01, 0x40, 0x06, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xfb, 0x11, 0x00, - 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, - 0x01, 0xf5, 0x11, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf3, 0x11, 0x00, - 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf2, 0x11, 0x00, 0x01, 0x0b, 0x01, 0xff, - 0x01, 0xf2, 0x11, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf3, 0x11, 0x00, - 0x01, 0x09, 0x01, 0xff, 0x01, 0xf4, 0x11, 0x00, 0x01, 0x07, 0x01, 0xff, - 0x01, 0xf6, 0x11, 0x00, 0x01, 0x04, 0x01, 0xff, 0x01, 0xfa, 0x08, 0x00, - 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf6, 0x06, 0x00, 0x01, 0x01, 0x01, 0xff, - 0x01, 0xfe, 0x08, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf3, 0x07, 0x00, - 0x01, 0xcf, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xf0, 0x07, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xb0, 0x07, 0x00, - 0x01, 0x7f, 0x01, 0xff, 0x01, 0xb0, 0x07, 0x00, 0x01, 0x1e, 0x01, 0xff, - 0x01, 0xf5, 0x07, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0x60, 0x07, 0x00, - 0x01, 0x07, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x20, 0x05, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xfe, 0x01, 0x10, 0x08, 0x00, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0xe3, 0x05, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xf7, 0x09, 0x00, - 0x01, 0x3f, 0x02, 0xff, 0x01, 0x92, 0x03, 0x00, 0x01, 0x29, 0x02, 0xff, - 0x01, 0xc0, 0x09, 0x00, 0x01, 0x04, 0x03, 0xff, 0x01, 0xda, 0x01, 0x88, - 0x01, 0x9c, 0x02, 0xff, 0x01, 0xfe, 0x01, 0x10, 0x0a, 0x00, 0x01, 0x3d, - 0x07, 0xff, 0x01, 0xc1, 0x0c, 0x00, 0x01, 0x7e, 0x05, 0xff, 0x01, 0xd6, - 0x0e, 0x00, 0x01, 0x37, 0x01, 0xac, 0x01, 0xdd, 0x01, 0xca, 0x01, 0x73, - 0xbe, 0x00, - - /* 18 */ - 0xb4, 0x00, 0x01, 0x2f, 0x0b, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x2f, - 0x0b, 0xff, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x2f, 0x0b, 0xff, 0x01, 0xa0, - 0x07, 0x00, 0x01, 0x16, 0x04, 0x66, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xd6, - 0x04, 0x66, 0x01, 0x40, 0x0c, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x2e, 0x01, 0xee, 0x01, 0xa0, 0xd4, 0x00, - - /* 19 */ - 0xb4, 0x00, 0x01, 0x8e, 0x01, 0xee, 0x01, 0xe2, 0x07, 0x00, 0x01, 0xde, - 0x01, 0xee, 0x01, 0xa0, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xfa, - 0x06, 0x00, 0x01, 0x06, 0x02, 0xff, 0x01, 0x30, 0x07, 0x00, 0x01, 0x08, - 0x02, 0xff, 0x01, 0x20, 0x05, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xfa, - 0x08, 0x00, 0x01, 0x01, 0x02, 0xff, 0x01, 0x90, 0x05, 0x00, 0x01, 0x6f, - 0x01, 0xff, 0x01, 0xf2, 0x09, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xf2, - 0x05, 0x00, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xa0, 0x09, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x06, 0x02, 0xff, 0x01, 0x20, - 0x09, 0x00, 0x01, 0x08, 0x02, 0xff, 0x01, 0x20, 0x03, 0x00, 0x01, 0x0d, - 0x01, 0xff, 0x01, 0xfa, 0x0a, 0x00, 0x01, 0x01, 0x01, 0xef, 0x01, 0xff, - 0x01, 0x90, 0x03, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, - 0x01, 0x8f, 0x01, 0xff, 0x01, 0xf2, 0x03, 0x00, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0x90, 0x0b, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x05, 0x02, 0xff, 0x01, 0x20, 0x0b, 0x00, 0x01, 0x07, 0x02, 0xff, - 0x01, 0x20, 0x01, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf9, 0x0d, 0x00, - 0x01, 0xef, 0x01, 0xff, 0x01, 0x90, 0x01, 0x00, 0x01, 0x5f, 0x01, 0xff, - 0x01, 0xf1, 0x0d, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xf2, 0x01, 0x00, - 0x01, 0xdf, 0x01, 0xff, 0x01, 0x80, 0x0d, 0x00, 0x01, 0x0e, 0x01, 0xff, - 0x01, 0xf9, 0x01, 0x05, 0x02, 0xff, 0x01, 0x10, 0x0d, 0x00, 0x01, 0x07, - 0x02, 0xff, 0x01, 0x2d, 0x01, 0xff, 0x01, 0xf8, 0x0f, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xf1, 0x0f, 0x00, 0x01, 0x7f, - 0x03, 0xff, 0x01, 0x80, 0x0f, 0x00, 0x01, 0x0e, 0x02, 0xff, 0x01, 0xfe, - 0x01, 0x10, 0x0f, 0x00, 0x01, 0x06, 0x02, 0xff, 0x01, 0xf7, 0x11, 0x00, - 0x01, 0xef, 0x01, 0xff, 0x01, 0xe0, 0x10, 0x00, 0x01, 0x01, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x70, 0x10, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xfe, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xf6, 0x11, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0xe0, 0x10, 0x00, 0x01, 0x02, 0x02, 0xff, 0x01, 0x60, - 0x10, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xfe, 0x11, 0x00, 0x01, 0x3f, - 0x01, 0xff, 0x01, 0xf6, 0x11, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xd0, - 0x10, 0x00, 0x01, 0x05, 0x02, 0xff, 0x01, 0x50, 0x10, 0x00, 0x01, 0x0c, - 0x01, 0xee, 0x01, 0xec, 0xd7, 0x00, - - /* 20 */ - 0xbb, 0x00, 0x01, 0x0b, 0x01, 0xee, 0x01, 0xe2, 0x11, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf2, 0x11, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf2, - 0x10, 0x00, 0x01, 0x01, 0x01, 0x2d, 0x01, 0xff, 0x01, 0xf4, 0x01, 0x10, - 0x0d, 0x00, 0x01, 0x48, 0x01, 0xce, 0x05, 0xff, 0x01, 0xfd, 0x01, 0x96, - 0x01, 0x10, 0x09, 0x00, 0x01, 0x7d, 0x09, 0xff, 0x01, 0xfa, 0x01, 0x20, - 0x07, 0x00, 0x01, 0x2d, 0x0b, 0xff, 0x01, 0xf6, 0x06, 0x00, 0x01, 0x03, - 0x01, 0xef, 0x02, 0xff, 0x01, 0xfb, 0x01, 0x75, 0x01, 0x4d, 0x01, 0xff, - 0x01, 0xf6, 0x01, 0x56, 0x01, 0x9d, 0x03, 0xff, 0x01, 0x80, 0x05, 0x00, - 0x01, 0x1e, 0x02, 0xff, 0x01, 0xe6, 0x02, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x02, 0x00, 0x01, 0x3b, 0x02, 0xff, 0x01, 0xf5, 0x05, 0x00, - 0x01, 0x8f, 0x01, 0xff, 0x01, 0xfb, 0x01, 0x10, 0x02, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf2, 0x03, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xfe, - 0x05, 0x00, 0x02, 0xff, 0x01, 0xc0, 0x03, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x03, 0x00, 0x01, 0x07, 0x02, 0xff, 0x01, 0x50, 0x03, 0x00, - 0x01, 0x05, 0x02, 0xff, 0x01, 0x20, 0x03, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xb0, 0x03, 0x00, - 0x01, 0x08, 0x01, 0xff, 0x01, 0xfc, 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xe0, 0x03, 0x00, - 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf8, 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xf0, 0x03, 0x00, - 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf7, 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xf1, 0x03, 0x00, - 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf7, 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xf1, 0x03, 0x00, - 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf8, 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xf0, 0x03, 0x00, - 0x01, 0x08, 0x01, 0xff, 0x01, 0xfc, 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xe0, 0x03, 0x00, - 0x01, 0x05, 0x02, 0xff, 0x01, 0x30, 0x03, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xb0, 0x04, 0x00, - 0x02, 0xff, 0x01, 0xd1, 0x03, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf2, - 0x03, 0x00, 0x01, 0x08, 0x02, 0xff, 0x01, 0x60, 0x04, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0xfc, 0x01, 0x10, 0x02, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf2, 0x03, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xfe, 0x05, 0x00, - 0x01, 0x1e, 0x02, 0xff, 0x01, 0xf7, 0x01, 0x10, 0x01, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf2, 0x02, 0x00, 0x01, 0x4c, 0x02, 0xff, 0x01, 0xf6, - 0x05, 0x00, 0x01, 0x04, 0x03, 0xff, 0x01, 0xfb, 0x01, 0x86, 0x01, 0x5d, - 0x01, 0xff, 0x01, 0xf6, 0x01, 0x67, 0x01, 0xae, 0x03, 0xff, 0x01, 0xa0, - 0x06, 0x00, 0x01, 0x4e, 0x0b, 0xff, 0x01, 0xf8, 0x07, 0x00, 0x01, 0x01, - 0x01, 0x8e, 0x09, 0xff, 0x01, 0xfb, 0x01, 0x30, 0x09, 0x00, 0x01, 0x48, - 0x01, 0xbe, 0x05, 0xff, 0x01, 0xed, 0x01, 0xa6, 0x01, 0x10, 0x0d, 0x00, - 0x01, 0x1c, 0x01, 0xff, 0x01, 0xf3, 0x01, 0x10, 0x10, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf2, 0x11, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf2, - 0x11, 0x00, 0x01, 0x0b, 0x01, 0xee, 0x01, 0xe2, 0xd2, 0x00, - - /* 21 */ - 0xb4, 0x00, 0x01, 0x0b, 0x01, 0xee, 0x01, 0xec, 0x07, 0x00, 0x01, 0x2e, - 0x01, 0xee, 0x01, 0xe7, 0x07, 0x00, 0x01, 0x02, 0x02, 0xff, 0x01, 0x80, - 0x06, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0xc0, 0x08, 0x00, 0x01, 0x6f, - 0x01, 0xff, 0x01, 0xf3, 0x05, 0x00, 0x01, 0x06, 0x02, 0xff, 0x01, 0x20, - 0x08, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xfd, 0x05, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xf6, 0x09, 0x00, 0x01, 0x01, 0x01, 0xef, 0x01, 0xff, - 0x01, 0x80, 0x04, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0xb0, 0x0a, 0x00, - 0x01, 0x5f, 0x01, 0xff, 0x01, 0xf3, 0x03, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xfe, 0x01, 0x10, 0x0a, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xfd, - 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xf5, 0x0b, 0x00, 0x01, 0x01, - 0x01, 0xef, 0x01, 0xff, 0x01, 0x80, 0x02, 0x00, 0x01, 0xbf, 0x01, 0xff, - 0x01, 0x90, 0x0c, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xf3, 0x01, 0x00, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xfd, 0x0d, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xfd, 0x01, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xf3, 0x0e, 0x00, - 0x01, 0xdf, 0x01, 0xff, 0x01, 0x80, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x70, - 0x0e, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xf9, 0x01, 0xff, 0x01, 0xfc, - 0x0f, 0x00, 0x01, 0x08, 0x03, 0xff, 0x01, 0xf2, 0x10, 0x00, 0x01, 0xcf, - 0x02, 0xff, 0x01, 0x50, 0x10, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xfc, - 0x11, 0x00, 0x01, 0xaf, 0x02, 0xff, 0x01, 0x30, 0x0f, 0x00, 0x01, 0x05, - 0x03, 0xff, 0x01, 0xd0, 0x0f, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xfd, - 0x01, 0xff, 0x01, 0xf9, 0x0f, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x91, - 0x01, 0xef, 0x01, 0xff, 0x01, 0x50, 0x0d, 0x00, 0x01, 0x07, 0x01, 0xff, - 0x01, 0xfd, 0x01, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xe1, 0x0d, 0x00, - 0x01, 0x3f, 0x01, 0xff, 0x01, 0xf3, 0x01, 0x00, 0x01, 0x0b, 0x01, 0xff, - 0x01, 0xfb, 0x0d, 0x00, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x80, 0x01, 0x00, - 0x01, 0x01, 0x02, 0xff, 0x01, 0x60, 0x0b, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xfd, 0x03, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, - 0x01, 0x4f, 0x01, 0xff, 0x01, 0xf3, 0x03, 0x00, 0x01, 0x0b, 0x01, 0xff, - 0x01, 0xfc, 0x0a, 0x00, 0x01, 0x01, 0x01, 0xef, 0x01, 0xff, 0x01, 0x80, - 0x03, 0x00, 0x01, 0x01, 0x02, 0xff, 0x01, 0x80, 0x09, 0x00, 0x01, 0x0a, - 0x01, 0xff, 0x01, 0xfd, 0x05, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xf4, - 0x09, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xf3, 0x05, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xfe, 0x01, 0x10, 0x07, 0x00, 0x01, 0x02, 0x02, 0xff, - 0x01, 0x80, 0x05, 0x00, 0x01, 0x01, 0x02, 0xff, 0x01, 0xa0, 0x07, 0x00, - 0x01, 0x0c, 0x01, 0xff, 0x01, 0xfd, 0x07, 0x00, 0x01, 0x6f, 0x01, 0xff, - 0x01, 0xf5, 0x07, 0x00, 0x01, 0x6e, 0x01, 0xee, 0x01, 0xe3, 0x07, 0x00, - 0x01, 0x0b, 0x01, 0xee, 0x01, 0xed, 0x01, 0x10, 0xce, 0x00, - - /* 22 */ - 0xb5, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0xc0, 0x07, 0x00, 0x01, 0x9e, - 0x01, 0xee, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, - 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x07, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xe6, 0x07, 0x66, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x51, - 0x01, 0x10, 0x06, 0x00, 0x01, 0x1f, 0x0c, 0xff, 0x01, 0xf1, 0x06, 0x00, - 0x01, 0x1f, 0x0c, 0xff, 0x01, 0xf1, 0x06, 0x00, 0x01, 0x1f, 0x0c, 0xff, - 0x01, 0xf1, 0x11, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf1, 0x11, 0x00, - 0x01, 0x03, 0x01, 0xff, 0x01, 0xf1, 0x11, 0x00, 0x01, 0x03, 0x01, 0xff, - 0x01, 0xf1, 0x11, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf1, 0x11, 0x00, - 0x01, 0x03, 0x01, 0xff, 0x01, 0xf1, 0x11, 0x00, 0x01, 0x01, 0x01, 0x77, - 0x01, 0x70, 0x55, 0x00, - - /* 23 */ - 0xb4, 0x00, 0x01, 0x04, 0x01, 0xee, 0x01, 0xe8, 0x06, 0x00, 0x01, 0xbe, - 0x01, 0xee, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, - 0x06, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, - 0x08, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, - 0x06, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, - 0x08, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, - 0x06, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, - 0x08, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf8, - 0x06, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, 0x08, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, - 0x08, 0x00, 0x01, 0x04, 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x10, 0x08, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xfa, - 0x06, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, 0x09, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x40, 0x05, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, - 0x09, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xfd, 0x01, 0xba, 0x04, 0xaa, - 0x01, 0xef, 0x01, 0xff, 0x01, 0x10, 0x09, 0x00, 0x01, 0x0b, 0x09, 0xff, - 0x01, 0x10, 0x0a, 0x00, 0x01, 0x8f, 0x08, 0xff, 0x01, 0x10, 0x0a, 0x00, - 0x01, 0x01, 0x01, 0x69, 0x05, 0xaa, 0x01, 0xef, 0x01, 0xff, 0x01, 0x10, - 0x11, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, 0x11, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x10, 0x11, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, - 0x11, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, 0x11, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x10, 0x11, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, - 0x11, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, 0x11, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x10, 0x11, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, - 0x11, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x10, 0x11, 0x00, 0x01, 0xbe, - 0x01, 0xee, 0x01, 0x10, 0xd0, 0x00, - - /* 24 */ - 0xb5, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0xc0, 0x03, 0x00, 0x01, 0x1e, - 0x01, 0xee, 0x01, 0xc0, 0x03, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0xc0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xe6, 0x03, 0x66, 0x01, 0x7f, - 0x01, 0xff, 0x01, 0xe6, 0x03, 0x66, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x0d, 0xff, 0x01, 0xd0, 0x05, 0x00, 0x01, 0x1f, - 0x0d, 0xff, 0x01, 0xd0, 0x05, 0x00, 0x01, 0x1f, 0x0d, 0xff, 0x01, 0xc0, - 0xcc, 0x00, - - /* 25 */ - 0xb5, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0xc0, 0x03, 0x00, 0x01, 0x1e, - 0x01, 0xee, 0x01, 0xc0, 0x03, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0xc0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xe6, 0x03, 0x66, 0x01, 0x7f, - 0x01, 0xff, 0x01, 0xe6, 0x03, 0x66, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xd1, - 0x01, 0x10, 0x04, 0x00, 0x01, 0x1f, 0x0e, 0xff, 0x01, 0xfa, 0x04, 0x00, - 0x01, 0x1f, 0x0e, 0xff, 0x01, 0xfa, 0x04, 0x00, 0x01, 0x1f, 0x0e, 0xff, - 0x01, 0xfa, 0x12, 0x00, 0x01, 0xbf, 0x01, 0xfa, 0x12, 0x00, 0x01, 0xbf, - 0x01, 0xfa, 0x12, 0x00, 0x01, 0xbf, 0x01, 0xfa, 0x12, 0x00, 0x01, 0xbf, - 0x01, 0xfa, 0x12, 0x00, 0x01, 0xbf, 0x01, 0xfa, 0x12, 0x00, 0x01, 0x57, - 0x01, 0x74, 0x53, 0x00, - - /* 26 */ - 0xb5, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xe8, - 0x03, 0x88, 0x01, 0x76, 0x01, 0x53, 0x0c, 0x00, 0x01, 0x1f, 0x07, 0xff, - 0x01, 0xfb, 0x01, 0x50, 0x0a, 0x00, 0x01, 0x1f, 0x08, 0xff, 0x01, 0xfd, - 0x01, 0x30, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xfc, 0x03, 0xcc, - 0x01, 0xcd, 0x01, 0xef, 0x02, 0xff, 0x01, 0xf5, 0x09, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x04, 0x00, 0x01, 0x01, 0x01, 0x7e, 0x02, 0xff, - 0x01, 0x20, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, - 0x01, 0x02, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xb0, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xf6, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x06, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf8, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x04, 0x01, 0xff, 0x01, 0xf9, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf8, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x06, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf6, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xf2, - 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0xaf, - 0x01, 0xff, 0x01, 0xc0, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x05, 0x00, 0x01, 0x1a, 0x02, 0xff, 0x01, 0x40, 0x08, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd6, 0x04, 0x66, 0x01, 0x7b, 0x02, 0xff, 0x01, 0xf9, - 0x09, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xa0, 0x09, 0x00, 0x01, 0x1f, - 0x08, 0xff, 0x01, 0xe6, 0x0a, 0x00, 0x01, 0x1e, 0x06, 0xee, 0x01, 0xed, - 0x01, 0xa5, 0xd2, 0x00, - - /* 27 */ - 0xb5, 0x00, 0x01, 0x1e, 0x01, 0xee, 0x01, 0xb0, 0x0a, 0x00, 0x01, 0x3e, - 0x01, 0xee, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x0a, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, - 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x3f, - 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x0a, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, - 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x3f, - 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x0a, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, - 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x3f, - 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x0a, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xe8, 0x03, 0x88, 0x01, 0x76, 0x01, 0x52, 0x05, 0x00, - 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, 0x07, 0xff, - 0x01, 0xfb, 0x01, 0x50, 0x03, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, - 0x04, 0x00, 0x01, 0x1f, 0x08, 0xff, 0x01, 0xfd, 0x01, 0x30, 0x02, 0x00, - 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xfd, 0x04, 0xdd, 0x01, 0xef, 0x02, 0xff, 0x01, 0xf5, 0x02, 0x00, - 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x04, 0x00, 0x01, 0x01, 0x01, 0x7e, 0x02, 0xff, 0x01, 0x20, - 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x02, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0xb0, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x3f, 0x01, 0xff, - 0x01, 0xf1, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x0b, 0x01, 0xff, - 0x01, 0xf6, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xf8, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x04, 0x01, 0xff, - 0x01, 0xf9, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x05, 0x01, 0xff, - 0x01, 0xf8, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xf6, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0x0e, 0x01, 0xff, - 0x01, 0xf2, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x06, 0x00, 0x01, 0xaf, 0x01, 0xff, - 0x01, 0xc0, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x1a, 0x02, 0xff, - 0x01, 0x40, 0x01, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd6, 0x04, 0x66, 0x01, 0x7a, 0x02, 0xff, - 0x01, 0xf9, 0x02, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, - 0x01, 0x1f, 0x09, 0xff, 0x01, 0xa0, 0x02, 0x00, 0x01, 0x3f, 0x01, 0xff, - 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1f, 0x08, 0xff, 0x01, 0xe6, 0x03, 0x00, - 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x1e, 0x06, 0xee, - 0x01, 0xed, 0x01, 0xa5, 0x04, 0x00, 0x01, 0x3e, 0x01, 0xee, 0x01, 0xa0, - 0xcb, 0x00, - - /* 28 */ - 0xb4, 0x00, 0x01, 0x2e, 0x06, 0xee, 0x01, 0x50, 0x0c, 0x00, 0x01, 0x2f, - 0x06, 0xff, 0x01, 0x50, 0x0c, 0x00, 0x01, 0x2f, 0x06, 0xff, 0x01, 0x50, - 0x0c, 0x00, 0x01, 0x17, 0x04, 0x77, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x50, - 0x11, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, - 0x11, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, - 0x11, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, 0x11, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0xb8, 0x03, 0x88, 0x01, 0x76, 0x01, 0x41, 0x0c, 0x00, - 0x01, 0x8f, 0x07, 0xff, 0x01, 0xe8, 0x01, 0x20, 0x0a, 0x00, 0x01, 0x8f, - 0x08, 0xff, 0x01, 0xf9, 0x0a, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xed, - 0x04, 0xdd, 0x03, 0xff, 0x01, 0xc0, 0x09, 0x00, 0x01, 0x8f, 0x01, 0xff, - 0x01, 0x50, 0x04, 0x00, 0x01, 0x03, 0x01, 0xbf, 0x01, 0xff, 0x01, 0xfb, - 0x09, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, 0x05, 0x00, 0x01, 0x07, - 0x02, 0xff, 0x01, 0x40, 0x08, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, - 0x06, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0xa0, 0x08, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x50, 0x06, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xe0, - 0x08, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, 0x06, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, - 0x06, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x50, 0x06, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, 0x06, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, - 0x06, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xb0, 0x08, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x50, 0x05, 0x00, 0x01, 0x02, 0x02, 0xff, 0x01, 0x50, - 0x08, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, 0x05, 0x00, 0x01, 0x4e, - 0x01, 0xff, 0x01, 0xfd, 0x09, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x96, - 0x04, 0x66, 0x01, 0x8d, 0x02, 0xff, 0x01, 0xf3, 0x09, 0x00, 0x01, 0x8f, - 0x08, 0xff, 0x01, 0xfe, 0x01, 0x40, 0x09, 0x00, 0x01, 0x8f, 0x08, 0xff, - 0x01, 0xb2, 0x0a, 0x00, 0x01, 0x7e, 0x06, 0xee, 0x01, 0xec, 0x01, 0x83, - 0xce, 0x00, - - /* 29 */ - 0xa5, 0x00, 0x01, 0x14, 0x01, 0x56, 0x01, 0x54, 0x01, 0x20, 0x0e, 0x00, - 0x01, 0x02, 0x01, 0x8e, 0x03, 0xff, 0x01, 0xfe, 0x01, 0xa4, 0x0d, 0x00, - 0x01, 0x8f, 0x06, 0xff, 0x01, 0xc2, 0x0b, 0x00, 0x01, 0x0c, 0x08, 0xff, - 0x01, 0x50, 0x0a, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0xfd, 0x01, 0x73, - 0x01, 0x00, 0x01, 0x01, 0x01, 0x49, 0x02, 0xff, 0x01, 0xf6, 0x09, 0x00, - 0x01, 0x05, 0x02, 0xff, 0x01, 0x80, 0x04, 0x00, 0x01, 0x2c, 0x02, 0xff, - 0x01, 0x30, 0x08, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xf8, 0x06, 0x00, - 0x01, 0xaf, 0x01, 0xff, 0x01, 0xd0, 0x08, 0x00, 0x01, 0x5f, 0x01, 0xff, - 0x01, 0xd0, 0x06, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf6, 0x08, 0x00, - 0x01, 0xaf, 0x01, 0xff, 0x01, 0x60, 0x06, 0x00, 0x01, 0x03, 0x01, 0xff, - 0x01, 0xfe, 0x08, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0x10, 0x07, 0x00, - 0x01, 0xbf, 0x01, 0xff, 0x01, 0x40, 0x07, 0x00, 0x01, 0x55, 0x01, 0x54, - 0x08, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0x90, 0x11, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf1, - 0x11, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf4, 0x0a, 0x00, 0x01, 0xbf, - 0x08, 0xff, 0x01, 0xf5, 0x0a, 0x00, 0x01, 0xbf, 0x08, 0xff, 0x01, 0xf6, - 0x0a, 0x00, 0x01, 0xbf, 0x08, 0xff, 0x01, 0xf7, 0x0a, 0x00, 0x01, 0x35, - 0x06, 0x55, 0x01, 0x5a, 0x01, 0xff, 0x01, 0xf6, 0x11, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xf5, 0x11, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf3, - 0x06, 0x00, 0x01, 0x09, 0x01, 0xee, 0x01, 0xe5, 0x08, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xf0, 0x06, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf8, - 0x08, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xd0, 0x06, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xfd, 0x08, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x70, - 0x06, 0x00, 0x01, 0x01, 0x02, 0xff, 0x01, 0x20, 0x07, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x20, 0x07, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x90, - 0x06, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xfb, 0x08, 0x00, 0x01, 0x5f, - 0x01, 0xff, 0x01, 0xf3, 0x06, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xf3, - 0x08, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x20, 0x04, 0x00, - 0x01, 0x06, 0x02, 0xff, 0x01, 0xa0, 0x08, 0x00, 0x01, 0x03, 0x02, 0xff, - 0x01, 0xe6, 0x03, 0x00, 0x01, 0x03, 0x01, 0xbf, 0x01, 0xff, 0x01, 0xfd, - 0x0a, 0x00, 0x01, 0x5f, 0x02, 0xff, 0x01, 0xfb, 0x01, 0x87, 0x01, 0x8a, - 0x01, 0xef, 0x02, 0xff, 0x01, 0xd1, 0x0a, 0x00, 0x01, 0x04, 0x01, 0xef, - 0x06, 0xff, 0x01, 0xfb, 0x01, 0x10, 0x0b, 0x00, 0x01, 0x19, 0x05, 0xff, - 0x01, 0xfc, 0x01, 0x50, 0x0d, 0x00, 0x01, 0x15, 0x01, 0x9b, 0x01, 0xde, - 0x01, 0xdc, 0x01, 0xa7, 0x01, 0x20, 0xbe, 0x00, - - /* 30 */ - 0xab, 0x00, 0x01, 0x13, 0x01, 0x56, 0x01, 0x54, 0x01, 0x20, 0x06, 0x00, - 0x01, 0x1e, 0x01, 0xee, 0x01, 0xb0, 0x05, 0x00, 0x01, 0x02, 0x01, 0x8d, - 0x03, 0xff, 0x01, 0xfe, 0x01, 0x93, 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x04, 0x00, 0x01, 0x01, 0x01, 0x9f, 0x06, 0xff, 0x01, 0xb2, - 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x04, 0x00, 0x01, 0x3e, - 0x08, 0xff, 0x01, 0x50, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, - 0x03, 0x00, 0x01, 0x03, 0x02, 0xff, 0x01, 0xfc, 0x01, 0x62, 0x01, 0x00, - 0x01, 0x02, 0x01, 0x6b, 0x02, 0xff, 0x01, 0xf6, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x03, 0x00, 0x01, 0x1e, 0x01, 0xff, 0x01, 0xfe, - 0x01, 0x40, 0x04, 0x00, 0x01, 0x3d, 0x02, 0xff, 0x01, 0x30, 0x02, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x03, 0x00, 0x01, 0xbf, 0x01, 0xff, - 0x01, 0xd1, 0x05, 0x00, 0x01, 0x01, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xd0, - 0x02, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0x04, - 0x02, 0xff, 0x01, 0x10, 0x06, 0x00, 0x01, 0x1e, 0x01, 0xff, 0x01, 0xf7, - 0x02, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf6, 0x07, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xfd, - 0x02, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xe0, 0x08, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x40, - 0x01, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0x7f, - 0x01, 0xff, 0x01, 0x80, 0x08, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0x90, - 0x01, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x20, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x01, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x02, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x09, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xf0, 0x01, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x01, 0x00, 0x01, 0x01, 0x01, 0xff, - 0x01, 0xfc, 0x09, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf3, 0x01, 0x00, - 0x01, 0x1f, 0x05, 0xff, 0x01, 0xfb, 0x09, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xf4, 0x01, 0x00, 0x01, 0x1f, 0x05, 0xff, 0x01, 0xfa, 0x09, 0x00, - 0x01, 0x08, 0x01, 0xff, 0x01, 0xf5, 0x01, 0x00, 0x01, 0x1f, 0x05, 0xff, - 0x01, 0xf9, 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf5, 0x01, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xe5, 0x01, 0x55, 0x01, 0x57, 0x01, 0xff, - 0x01, 0xfa, 0x09, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf4, 0x01, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x01, 0x00, 0x01, 0x01, 0x01, 0xff, - 0x01, 0xfb, 0x09, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf3, 0x01, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x02, 0x00, 0x01, 0xff, 0x01, 0xfd, - 0x09, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf1, 0x01, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x02, 0x00, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x10, - 0x08, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xe0, 0x01, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x02, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x50, - 0x08, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xa0, 0x01, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x02, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xb0, - 0x08, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x50, 0x01, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x02, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xf2, - 0x07, 0x00, 0x01, 0x01, 0x01, 0xff, 0x01, 0xfe, 0x02, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x02, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xfb, - 0x07, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf6, 0x02, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x02, 0x00, 0x01, 0x01, 0x02, 0xff, 0x01, 0x70, - 0x06, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xd0, 0x02, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xf7, - 0x05, 0x00, 0x01, 0x06, 0x02, 0xff, 0x01, 0x30, 0x02, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x09, 0x02, 0xff, 0x01, 0xc4, - 0x03, 0x00, 0x01, 0x03, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xf6, 0x03, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x04, 0x00, 0x01, 0x9f, 0x02, 0xff, - 0x01, 0xea, 0x01, 0x87, 0x01, 0x8a, 0x01, 0xef, 0x02, 0xff, 0x01, 0x50, - 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x04, 0x00, 0x01, 0x06, - 0x07, 0xff, 0x01, 0xd4, 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, - 0x05, 0x00, 0x01, 0x19, 0x05, 0xff, 0x01, 0xe7, 0x0e, 0x00, 0x01, 0x04, - 0x01, 0x9b, 0x01, 0xce, 0x01, 0xdc, 0x01, 0x95, 0xb9, 0x00, - - /* 31 */ - 0xb7, 0x00, 0x01, 0x04, 0x01, 0x9c, 0x01, 0xde, 0x06, 0xee, 0x01, 0xc0, - 0x09, 0x00, 0x01, 0x04, 0x01, 0xdf, 0x08, 0xff, 0x01, 0xd0, 0x09, 0x00, - 0x01, 0x6f, 0x09, 0xff, 0x01, 0xd0, 0x08, 0x00, 0x01, 0x04, 0x02, 0xff, - 0x01, 0xfb, 0x01, 0x87, 0x04, 0x77, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xd0, - 0x08, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xfc, 0x01, 0x20, 0x05, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x08, 0x00, 0x01, 0x4f, 0x01, 0xff, - 0x01, 0xe1, 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x08, 0x00, - 0x01, 0x9f, 0x01, 0xff, 0x01, 0x60, 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xd0, 0x08, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x30, 0x06, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x08, 0x00, 0x01, 0xcf, 0x01, 0xff, - 0x01, 0x10, 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x08, 0x00, - 0x01, 0xaf, 0x01, 0xff, 0x01, 0x20, 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xd0, 0x08, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0x50, 0x06, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x08, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x08, 0x00, - 0x01, 0x0a, 0x01, 0xff, 0x01, 0xfa, 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xd0, 0x08, 0x00, 0x01, 0x02, 0x01, 0xef, 0x01, 0xff, 0x01, 0xe8, - 0x01, 0x54, 0x04, 0x44, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xd0, 0x09, 0x00, - 0x01, 0x4f, 0x09, 0xff, 0x01, 0xd0, 0x09, 0x00, 0x01, 0x03, 0x01, 0xdf, - 0x08, 0xff, 0x01, 0xd0, 0x0a, 0x00, 0x01, 0x05, 0x01, 0xae, 0x07, 0xff, - 0x01, 0xd0, 0x0c, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x32, - 0x01, 0x22, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xd0, 0x0c, 0x00, 0x01, 0xaf, - 0x01, 0xff, 0x01, 0xe2, 0x02, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, - 0x0b, 0x00, 0x01, 0x08, 0x02, 0xff, 0x01, 0x30, 0x02, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xd0, 0x0b, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xf5, - 0x03, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x0a, 0x00, 0x01, 0x04, - 0x02, 0xff, 0x01, 0x60, 0x03, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, - 0x0a, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xf7, 0x04, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xd0, 0x09, 0x00, 0x01, 0x02, 0x01, 0xef, 0x01, 0xff, - 0x01, 0x90, 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x09, 0x00, - 0x01, 0x1d, 0x01, 0xff, 0x01, 0xfb, 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xd0, 0x09, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x08, 0x00, 0x01, 0x0b, 0x01, 0xff, - 0x01, 0xfd, 0x01, 0x10, 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, - 0x08, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0xe1, 0x06, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x07, 0x02, 0xff, 0x01, 0x20, - 0x06, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, 0x07, 0x00, 0x01, 0x5f, - 0x01, 0xff, 0x01, 0xf4, 0x07, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xd0, - 0xcf, 0x00, - - /* 32 */ - 0xff, 0x00, 0x45, 0x00, 0x01, 0x01, 0x01, 0x11, 0x10, 0x00, 0x01, 0x02, - 0x01, 0x8d, 0x02, 0xff, 0x01, 0xfd, 0x01, 0x93, 0x0e, 0x00, 0x01, 0x9f, - 0x05, 0xff, 0x01, 0xb0, 0x0c, 0x00, 0x01, 0x0b, 0x06, 0xff, 0x01, 0xfb, - 0x0c, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xf8, 0x01, 0x42, 0x01, 0x12, - 0x01, 0x4a, 0x02, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0xcf, 0x01, 0xff, - 0x01, 0x30, 0x03, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0x90, 0x0b, 0x00, - 0x01, 0xff, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xb0, - 0x0a, 0x00, 0x01, 0x02, 0x01, 0xdd, 0x01, 0xd5, 0x04, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xc0, - 0x11, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xc0, 0x0e, 0x00, 0x01, 0x02, - 0x01, 0x57, 0x01, 0xad, 0x02, 0xff, 0x01, 0xc0, 0x0c, 0x00, 0x01, 0x16, - 0x01, 0xad, 0x05, 0xff, 0x01, 0xc0, 0x0b, 0x00, 0x01, 0x09, 0x04, 0xff, - 0x01, 0xfe, 0x01, 0x9d, 0x01, 0xff, 0x01, 0xc0, 0x0b, 0x00, 0x01, 0xcf, - 0x02, 0xff, 0x01, 0xc9, 0x01, 0x64, 0x01, 0x10, 0x01, 0x0b, 0x01, 0xff, - 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x71, - 0x03, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xf2, 0x04, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xc0, - 0x0a, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x70, - 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0xc0, - 0x0a, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xf2, 0x03, 0x00, 0x01, 0x0a, - 0x02, 0xff, 0x01, 0xc0, 0x0a, 0x00, 0x01, 0x07, 0x02, 0xff, 0x01, 0x83, - 0x01, 0x12, 0x01, 0x48, 0x01, 0xef, 0x02, 0xff, 0x01, 0xf4, 0x0b, 0x00, - 0x01, 0xcf, 0x05, 0xff, 0x01, 0x76, 0x02, 0xff, 0x01, 0xf6, 0x0a, 0x00, - 0x01, 0x1b, 0x04, 0xff, 0x01, 0xc3, 0x01, 0x01, 0x01, 0xef, 0x01, 0xff, - 0x01, 0xf6, 0x0b, 0x00, 0x01, 0x39, 0x01, 0xce, 0x01, 0xdc, 0x01, 0x94, - 0x02, 0x00, 0x01, 0x2a, 0x01, 0xde, 0x01, 0xb3, 0xbd, 0x00, - - /* 33 */ - 0x93, 0x00, 0x01, 0x03, 0x01, 0xcc, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xd0, 0x10, 0x00, 0x01, 0x26, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0xa0, 0x0d, 0x00, 0x01, 0x02, 0x01, 0x69, 0x01, 0xbe, 0x03, 0xff, - 0x01, 0x40, 0x0c, 0x00, 0x01, 0x02, 0x01, 0xcf, 0x04, 0xff, 0x01, 0xf6, - 0x0d, 0x00, 0x01, 0x3f, 0x03, 0xff, 0x01, 0xfe, 0x01, 0xa6, 0x01, 0x10, - 0x0d, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xfc, 0x01, 0x85, 0x01, 0x10, - 0x0e, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf6, 0x11, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x40, 0x11, 0x00, 0x01, 0x7f, 0x01, 0xf7, 0x02, 0x00, - 0x01, 0x10, 0x0f, 0x00, 0x01, 0xdf, 0x01, 0xe0, 0x01, 0x3a, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xfb, 0x01, 0x71, 0x0c, 0x00, 0x01, 0x01, 0x01, 0xff, - 0x01, 0x99, 0x04, 0xff, 0x01, 0xfe, 0x01, 0x60, 0x0b, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xdf, 0x05, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0x08, - 0x02, 0xff, 0x01, 0xfe, 0x01, 0x72, 0x01, 0x11, 0x01, 0x5b, 0x02, 0xff, - 0x01, 0x50, 0x0a, 0x00, 0x01, 0x0b, 0x02, 0xff, 0x01, 0xc1, 0x03, 0x00, - 0x01, 0x7f, 0x01, 0xff, 0x01, 0xe1, 0x0a, 0x00, 0x01, 0x0d, 0x01, 0xff, - 0x01, 0xfe, 0x01, 0x10, 0x03, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf7, - 0x0a, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xf6, 0x04, 0x00, 0x01, 0x01, - 0x01, 0xff, 0x01, 0xfd, 0x0a, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xf1, - 0x05, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0x10, 0x09, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0x50, - 0x09, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x90, 0x05, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x70, 0x09, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x80, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x80, 0x09, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x70, 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x90, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x80, 0x05, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x80, 0x09, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x90, - 0x05, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0x70, 0x09, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0x50, - 0x09, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf1, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x10, 0x09, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf8, - 0x04, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xfd, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x20, 0x03, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf6, - 0x0b, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xe3, 0x03, 0x00, 0x01, 0xaf, - 0x01, 0xff, 0x01, 0xd0, 0x0b, 0x00, 0x01, 0x0c, 0x02, 0xff, 0x01, 0xa6, - 0x01, 0x45, 0x01, 0x8e, 0x02, 0xff, 0x01, 0x30, 0x0b, 0x00, 0x01, 0x01, - 0x01, 0xcf, 0x05, 0xff, 0x01, 0xf5, 0x0d, 0x00, 0x01, 0x08, 0x04, 0xff, - 0x01, 0xfc, 0x01, 0x30, 0x0e, 0x00, 0x01, 0x16, 0x01, 0xac, 0x01, 0xed, - 0x01, 0xc8, 0x01, 0x30, 0xc0, 0x00, - - /* 34 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x67, 0x04, 0x77, 0x01, 0x63, 0x0e, 0x00, - 0x01, 0xef, 0x05, 0xff, 0x01, 0xd5, 0x0d, 0x00, 0x01, 0xef, 0x06, 0xff, - 0x01, 0x60, 0x0c, 0x00, 0x01, 0xef, 0x01, 0xfd, 0x02, 0x99, 0x01, 0xac, - 0x02, 0xff, 0x01, 0xf1, 0x0c, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, - 0x01, 0x2d, 0x01, 0xff, 0x01, 0xf5, 0x0c, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x03, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf8, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x04, 0x00, 0x01, 0xff, 0x01, 0xf7, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x03, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x0c, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x2d, 0x01, 0xff, 0x01, 0xe0, - 0x0c, 0x00, 0x01, 0xef, 0x01, 0xfd, 0x02, 0x99, 0x01, 0xac, 0x02, 0xff, - 0x01, 0x40, 0x0c, 0x00, 0x01, 0xef, 0x05, 0xff, 0x01, 0xf3, 0x0d, 0x00, - 0x01, 0xef, 0x05, 0xff, 0x01, 0xfe, 0x01, 0x60, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xfc, 0x03, 0x88, 0x01, 0xaf, 0x01, 0xff, 0x01, 0xf8, 0x0c, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x02, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0x30, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x5f, - 0x01, 0xff, 0x01, 0x70, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, - 0x01, 0x2f, 0x01, 0xff, 0x01, 0x90, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x04, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0x90, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x04, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0x70, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xfa, 0x03, 0x22, 0x01, 0x4b, 0x02, 0xff, 0x01, 0x10, - 0x0b, 0x00, 0x01, 0xef, 0x06, 0xff, 0x01, 0xf8, 0x0c, 0x00, 0x01, 0xef, - 0x06, 0xff, 0x01, 0x80, 0x0c, 0x00, 0x01, 0xef, 0x04, 0xff, 0x01, 0xfd, - 0x01, 0x93, 0xd4, 0x00, - - /* 35 */ - 0xff, 0x00, 0x56, 0x00, 0x06, 0x77, 0x01, 0x70, 0x0d, 0x00, 0x01, 0xef, - 0x05, 0xff, 0x01, 0xf0, 0x0d, 0x00, 0x01, 0xef, 0x05, 0xff, 0x01, 0xf0, - 0x0d, 0x00, 0x01, 0xef, 0x01, 0xfd, 0x04, 0x99, 0x01, 0x90, 0x0d, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0xd9, 0x00, - - /* 36 */ - 0xff, 0x00, 0x58, 0x00, 0x01, 0x57, 0x06, 0x77, 0x01, 0x20, 0x0c, 0x00, - 0x01, 0xcf, 0x06, 0xff, 0x01, 0x50, 0x0c, 0x00, 0x01, 0xdf, 0x06, 0xff, - 0x01, 0x50, 0x0c, 0x00, 0x01, 0xdf, 0x01, 0xfd, 0x03, 0x99, 0x01, 0xaf, - 0x01, 0xff, 0x01, 0x50, 0x0c, 0x00, 0x01, 0xdf, 0x01, 0xfa, 0x03, 0x00, - 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, 0x0c, 0x00, 0x01, 0xef, 0x01, 0xfa, - 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xfa, 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, 0x0c, 0x00, - 0x01, 0xef, 0x01, 0xfa, 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, - 0x0c, 0x00, 0x01, 0xff, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, - 0x01, 0x50, 0x0c, 0x00, 0x01, 0xff, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x01, 0x01, 0xff, 0x01, 0xf8, - 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xf6, 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, - 0x0b, 0x00, 0x01, 0x04, 0x01, 0xff, 0x01, 0xf5, 0x03, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf3, - 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf0, 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, - 0x0b, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x90, - 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x6f, - 0x01, 0xff, 0x01, 0x30, 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x50, - 0x0a, 0x00, 0x01, 0x01, 0x01, 0xef, 0x01, 0xfd, 0x04, 0x22, 0x01, 0x4f, - 0x01, 0xff, 0x01, 0x50, 0x09, 0x00, 0x01, 0x6a, 0x01, 0xae, 0x08, 0xff, - 0x01, 0xca, 0x01, 0xa0, 0x08, 0x00, 0x01, 0x9f, 0x0a, 0xff, 0x01, 0xf0, - 0x08, 0x00, 0x01, 0x9f, 0x0a, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0x9f, - 0x01, 0xf5, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf0, 0x08, 0x00, 0x01, 0x9f, - 0x01, 0xf5, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf0, 0x08, 0x00, 0x01, 0x9f, - 0x01, 0xf5, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf0, 0x08, 0x00, 0x01, 0x9f, - 0x01, 0xf5, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf0, 0x08, 0x00, 0x01, 0x8e, - 0x01, 0xe5, 0x08, 0x00, 0x01, 0xde, 0x01, 0xe0, 0x6c, 0x00, - - /* 37 */ - 0xff, 0x00, 0x58, 0x00, 0x01, 0x28, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xfc, - 0x01, 0x71, 0x0e, 0x00, 0x01, 0x09, 0x05, 0xff, 0x01, 0x60, 0x0c, 0x00, - 0x01, 0x01, 0x01, 0xcf, 0x05, 0xff, 0x01, 0xf8, 0x0c, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xfe, 0x01, 0x73, 0x01, 0x11, 0x01, 0x5b, 0x02, 0xff, - 0x01, 0x50, 0x0b, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xc1, 0x03, 0x00, - 0x01, 0x5f, 0x01, 0xff, 0x01, 0xe0, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xfe, - 0x01, 0x10, 0x03, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf6, 0x0a, 0x00, - 0x01, 0x05, 0x01, 0xff, 0x01, 0xf5, 0x05, 0x00, 0x01, 0xdf, 0x01, 0xfc, - 0x0a, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xe0, 0x05, 0x00, 0x01, 0x7f, - 0x01, 0xff, 0x0a, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xb0, 0x05, 0x00, - 0x01, 0x4f, 0x01, 0xff, 0x01, 0x30, 0x09, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xc6, 0x05, 0x66, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x60, 0x09, 0x00, - 0x01, 0x1f, 0x09, 0xff, 0x01, 0x70, 0x09, 0x00, 0x01, 0x2f, 0x09, 0xff, - 0x01, 0x80, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xb6, 0x07, 0x66, - 0x01, 0x30, 0x09, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x80, 0x11, 0x00, - 0x01, 0x0e, 0x01, 0xff, 0x01, 0xb0, 0x11, 0x00, 0x01, 0x0a, 0x01, 0xff, - 0x01, 0xf0, 0x05, 0x00, 0x01, 0x48, 0x01, 0x88, 0x0a, 0x00, 0x01, 0x06, - 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xef, 0x01, 0xfc, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xfe, 0x01, 0x10, 0x03, 0x00, 0x01, 0x07, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xd2, 0x03, 0x00, - 0x01, 0x6f, 0x01, 0xff, 0x01, 0xe1, 0x0b, 0x00, 0x01, 0x0c, 0x02, 0xff, - 0x01, 0xa6, 0x01, 0x45, 0x01, 0x7c, 0x02, 0xff, 0x01, 0x50, 0x0b, 0x00, - 0x01, 0x01, 0x01, 0xcf, 0x05, 0xff, 0x01, 0xf6, 0x0d, 0x00, 0x01, 0x08, - 0x04, 0xff, 0x01, 0xfd, 0x01, 0x40, 0x0e, 0x00, 0x01, 0x16, 0x01, 0xad, - 0x01, 0xee, 0x01, 0xc9, 0x01, 0x40, 0xc0, 0x00, - - /* 38 */ - 0xff, 0x00, 0x55, 0x00, 0x01, 0x03, 0x02, 0x77, 0x03, 0x00, 0x01, 0x01, - 0x01, 0x77, 0x01, 0x71, 0x03, 0x00, 0x01, 0x06, 0x01, 0x77, 0x01, 0x73, - 0x06, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0xb0, 0x02, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xf4, 0x03, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0xb0, - 0x06, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xfb, 0x02, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xf4, 0x02, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xfb, - 0x08, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0xa0, 0x01, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xf4, 0x02, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0xc0, - 0x08, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xfa, 0x01, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xf4, 0x01, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xfc, - 0x0a, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0xa0, 0x01, 0x03, 0x01, 0xff, - 0x01, 0xf4, 0x01, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0xc0, 0x0a, 0x00, - 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf9, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf4, - 0x01, 0x08, 0x01, 0xff, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0xbf, 0x01, 0xff, - 0x01, 0x93, 0x01, 0xff, 0x01, 0xf4, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xc1, - 0x0c, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xfb, 0x01, 0xff, 0x01, 0xfb, - 0x01, 0xff, 0x01, 0xfc, 0x01, 0x10, 0x0d, 0x00, 0x01, 0xcf, 0x04, 0xff, - 0x01, 0xd1, 0x0e, 0x00, 0x01, 0x0d, 0x03, 0xff, 0x01, 0xfd, 0x01, 0x10, - 0x0e, 0x00, 0x01, 0x5f, 0x04, 0xff, 0x01, 0x60, 0x0d, 0x00, 0x01, 0x05, - 0x05, 0xff, 0x01, 0xf6, 0x0d, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xe5, - 0x01, 0xff, 0x01, 0xf5, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x60, 0x0b, 0x00, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x23, 0x01, 0xff, 0x01, 0xf4, - 0x01, 0x1d, 0x01, 0xff, 0x01, 0xf7, 0x0b, 0x00, 0x01, 0x6f, 0x01, 0xff, - 0x01, 0xe2, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf4, 0x01, 0x01, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0x70, 0x09, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xfd, - 0x01, 0x20, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf4, 0x01, 0x00, 0x01, 0x1d, - 0x01, 0xff, 0x01, 0xf7, 0x09, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xd1, - 0x01, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf4, 0x01, 0x00, 0x01, 0x01, - 0x01, 0xdf, 0x01, 0xff, 0x01, 0x70, 0x07, 0x00, 0x01, 0x07, 0x01, 0xff, - 0x01, 0xfd, 0x01, 0x10, 0x01, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf4, - 0x02, 0x00, 0x01, 0x1c, 0x01, 0xff, 0x01, 0xf8, 0x07, 0x00, 0x01, 0x7f, - 0x01, 0xff, 0x01, 0xd1, 0x02, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf4, - 0x02, 0x00, 0x01, 0x01, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x80, 0x05, 0x00, - 0x01, 0x07, 0x01, 0xff, 0x01, 0xfd, 0x01, 0x10, 0x02, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xf4, 0x03, 0x00, 0x01, 0x1c, 0x01, 0xff, 0x01, 0xf8, - 0x05, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xd1, 0x03, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xf4, 0x03, 0x00, 0x01, 0x01, 0x01, 0xcf, 0x01, 0xff, - 0x01, 0x80, 0xcc, 0x00, - - /* 39 */ - 0xff, 0x00, 0x45, 0x00, 0x01, 0x01, 0x11, 0x00, 0x01, 0x17, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0xfe, 0x01, 0xa5, 0x0e, 0x00, 0x01, 0x06, 0x05, 0xff, - 0x01, 0xd3, 0x0d, 0x00, 0x01, 0x5f, 0x06, 0xff, 0x01, 0x30, 0x0c, 0x00, - 0x01, 0xef, 0x01, 0xff, 0x01, 0xc5, 0x01, 0x21, 0x01, 0x26, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0xd0, 0x0b, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xfb, - 0x03, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf5, 0x0b, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xf3, 0x03, 0x00, 0x01, 0x01, 0x01, 0xff, 0x01, 0xf9, - 0x0b, 0x00, 0x01, 0x05, 0x01, 0x88, 0x01, 0x80, 0x04, 0x00, 0x01, 0xff, - 0x01, 0xfa, 0x11, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf9, 0x11, 0x00, - 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf4, 0x0e, 0x00, 0x01, 0x01, 0x01, 0x33, - 0x01, 0x36, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xb0, 0x0e, 0x00, 0x01, 0x09, - 0x03, 0xff, 0x01, 0xfa, 0x01, 0x10, 0x0e, 0x00, 0x01, 0x09, 0x03, 0xff, - 0x01, 0xfa, 0x01, 0x10, 0x0e, 0x00, 0x01, 0x08, 0x01, 0xee, 0x03, 0xff, - 0x01, 0xe3, 0x10, 0x00, 0x01, 0x01, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xfd, - 0x11, 0x00, 0x01, 0x02, 0x02, 0xff, 0x01, 0x40, 0x0a, 0x00, 0x01, 0x06, - 0x01, 0x66, 0x01, 0x30, 0x04, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0x70, - 0x0a, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xb0, 0x04, 0x00, 0x01, 0x4f, - 0x01, 0xff, 0x01, 0x80, 0x0a, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xf1, - 0x04, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0x60, 0x0a, 0x00, 0x01, 0x0a, - 0x01, 0xff, 0x01, 0xfb, 0x03, 0x00, 0x01, 0x04, 0x02, 0xff, 0x01, 0x10, - 0x0a, 0x00, 0x01, 0x02, 0x02, 0xff, 0x01, 0xe8, 0x01, 0x53, 0x01, 0x46, - 0x01, 0xbf, 0x01, 0xff, 0x01, 0xf8, 0x0c, 0x00, 0x01, 0x7f, 0x06, 0xff, - 0x01, 0xb0, 0x0c, 0x00, 0x01, 0x06, 0x01, 0xef, 0x04, 0xff, 0x01, 0xf7, - 0x0e, 0x00, 0x01, 0x05, 0x01, 0x9c, 0x01, 0xde, 0x01, 0xdc, 0x01, 0x95, - 0xc1, 0x00, - - /* 40 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x74, 0x04, 0x00, 0x01, 0x05, - 0x01, 0x77, 0x01, 0x76, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, - 0x01, 0x3f, 0x01, 0xff, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x04, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x03, 0x00, 0x01, 0x05, 0x02, 0xff, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x0e, 0x02, 0xff, 0x01, 0xfe, - 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x7f, 0x01, 0xff, - 0x01, 0xcf, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x01, 0x01, 0xff, 0x01, 0xf9, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xe1, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x3f, 0x01, 0xff, 0x01, 0x70, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0xcf, 0x01, 0xfd, 0x01, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x00, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xf4, 0x01, 0x00, 0x01, 0x9f, 0x01, 0xfe, - 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x00, 0x01, 0x0e, 0x01, 0xff, - 0x01, 0xb0, 0x01, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x20, 0x01, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf8, 0x02, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xe0, 0x02, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x4f, - 0x01, 0xff, 0x01, 0x60, 0x02, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x01, 0xdf, 0x01, 0xfc, 0x03, 0x00, 0x01, 0x9f, - 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0xf3, 0x03, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0xa0, - 0x03, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x02, 0xff, - 0x01, 0x10, 0x03, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xf7, 0x04, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xff, 0x01, 0xe0, 0x04, 0x00, 0x01, 0x9f, 0x01, 0xfe, - 0xd2, 0x00, - - /* 41 */ - 0xca, 0x00, 0x01, 0x2a, 0x01, 0xa2, 0x03, 0x00, 0x01, 0x3a, 0x01, 0xa2, - 0x0d, 0x00, 0x01, 0x2f, 0x01, 0xf9, 0x03, 0x00, 0x01, 0xaf, 0x01, 0xf1, - 0x0d, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0x82, 0x01, 0x00, 0x01, 0x29, - 0x01, 0xff, 0x01, 0xc0, 0x0d, 0x00, 0x01, 0x05, 0x05, 0xff, 0x01, 0x30, - 0x0e, 0x00, 0x01, 0x7f, 0x03, 0xff, 0x01, 0xf6, 0x0f, 0x00, 0x01, 0x02, - 0x01, 0x8b, 0x01, 0xdd, 0x01, 0xb8, 0x01, 0x10, 0x21, 0x00, 0x01, 0x67, - 0x01, 0x74, 0x04, 0x00, 0x01, 0x05, 0x01, 0x77, 0x01, 0x76, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0xfe, - 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0xcf, 0x01, 0xff, - 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x05, - 0x02, 0xff, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, - 0x01, 0x0e, 0x02, 0xff, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x03, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xcf, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x01, 0x01, 0xff, 0x01, 0xf9, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf1, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0x70, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0xcf, 0x01, 0xfd, 0x01, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x01, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf4, - 0x01, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x01, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xb0, 0x01, 0x00, 0x01, 0x9f, - 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x20, 0x01, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x02, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xe0, 0x02, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x60, 0x02, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0xdf, - 0x01, 0xfc, 0x03, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, - 0x02, 0xff, 0x01, 0xf3, 0x03, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, - 0x01, 0xef, 0x02, 0xff, 0x01, 0xa0, 0x03, 0x00, 0x01, 0x9f, 0x01, 0xfe, - 0x0b, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0x10, 0x03, 0x00, 0x01, 0x9f, - 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xf7, 0x04, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xe0, - 0x04, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0xd2, 0x00, - - /* 42 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x74, 0x04, 0x00, 0x01, 0x67, - 0x01, 0x77, 0x01, 0x10, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x03, 0x00, - 0x01, 0x09, 0x01, 0xff, 0x01, 0xf6, 0x0c, 0x00, 0x01, 0xef, 0x01, 0xf8, - 0x03, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x60, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xf8, 0x02, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf5, 0x0d, 0x00, - 0x01, 0xef, 0x01, 0xf8, 0x02, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0x50, - 0x0d, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x01, 0x00, 0x01, 0x0a, 0x01, 0xff, - 0x01, 0xf5, 0x0e, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x01, 0x00, 0x01, 0xaf, - 0x01, 0xff, 0x01, 0x50, 0x0e, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x01, 0x0a, - 0x01, 0xff, 0x01, 0xf4, 0x0f, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x40, 0x0f, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0xf4, - 0x10, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0x40, 0x10, 0x00, 0x01, 0xef, - 0x02, 0xff, 0x01, 0xa0, 0x10, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0xfa, - 0x10, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x01, 0xaf, 0x01, 0xff, 0x01, 0xb0, - 0x0f, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xfb, - 0x0f, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x01, 0x00, 0x01, 0xaf, 0x01, 0xff, - 0x01, 0xb0, 0x0e, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x01, 0x00, 0x01, 0x0a, - 0x01, 0xff, 0x01, 0xfb, 0x0e, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x02, 0x00, - 0x01, 0x9f, 0x01, 0xff, 0x01, 0xc0, 0x0d, 0x00, 0x01, 0xef, 0x01, 0xf8, - 0x02, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xfc, 0x0d, 0x00, 0x01, 0xef, - 0x01, 0xf8, 0x03, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0xc0, 0x0c, 0x00, - 0x01, 0xef, 0x01, 0xf8, 0x03, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xfc, - 0x0c, 0x00, 0x01, 0xef, 0x01, 0xf8, 0x04, 0x00, 0x01, 0x9f, 0x01, 0xff, - 0x01, 0xc1, 0xd2, 0x00, - - /* 43 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x02, 0x06, 0x77, 0x01, 0x75, 0x0c, 0x00, - 0x01, 0x05, 0x06, 0xff, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x05, 0x06, 0xff, - 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xfb, 0x03, 0xaa, - 0x01, 0xef, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, - 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x05, 0x01, 0xff, - 0x01, 0xf2, 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf2, 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, 0x0c, 0x00, - 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, - 0x0c, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x03, 0x00, 0x01, 0xbf, - 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x03, 0x00, - 0x01, 0xbf, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, - 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x08, 0x01, 0xff, - 0x01, 0xf0, 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf0, 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, 0x0c, 0x00, - 0x01, 0x0b, 0x01, 0xff, 0x01, 0xd0, 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, - 0x0c, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xb0, 0x03, 0x00, 0x01, 0xbf, - 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x80, 0x03, 0x00, - 0x01, 0xbf, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x3f, 0x01, 0xff, 0x01, 0x40, - 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x9f, 0x01, 0xff, - 0x01, 0x10, 0x03, 0x00, 0x01, 0xbf, 0x01, 0xfc, 0x0b, 0x00, 0x01, 0x04, - 0x01, 0xff, 0x01, 0xf9, 0x04, 0x00, 0x01, 0xbf, 0x01, 0xfc, 0x0b, 0x00, - 0x01, 0x8f, 0x01, 0xff, 0x01, 0xf2, 0x04, 0x00, 0x01, 0xbf, 0x01, 0xfc, - 0x0b, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x70, 0x04, 0x00, 0x01, 0xbf, - 0x01, 0xfc, 0x0b, 0x00, 0x01, 0x9f, 0x01, 0xf6, 0x05, 0x00, 0x01, 0xbf, - 0x01, 0xfc, 0x0b, 0x00, 0x01, 0x34, 0xc7, 0x00, - - /* 44 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x77, 0x01, 0x30, 0x04, 0x00, - 0x01, 0x03, 0x02, 0x77, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xd0, - 0x04, 0x00, 0x01, 0x0b, 0x02, 0xff, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, - 0x01, 0xf3, 0x04, 0x00, 0x01, 0x2f, 0x02, 0xff, 0x0a, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0xfa, 0x04, 0x00, 0x01, 0x9f, 0x02, 0xff, 0x0a, 0x00, - 0x01, 0xef, 0x02, 0xff, 0x01, 0x10, 0x03, 0x00, 0x03, 0xff, 0x0a, 0x00, - 0x01, 0xef, 0x02, 0xff, 0x01, 0x80, 0x02, 0x00, 0x01, 0x06, 0x03, 0xff, - 0x0a, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0xe0, 0x02, 0x00, 0x01, 0x0d, - 0x03, 0xff, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfd, 0x01, 0xff, 0x01, 0xf5, - 0x02, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0xdf, 0x01, 0xff, 0x0a, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x01, 0xdf, 0x01, 0xfc, 0x02, 0x00, 0x01, 0xaf, - 0x01, 0xfe, 0x01, 0x8f, 0x01, 0xff, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x01, 0x7f, 0x01, 0xff, 0x01, 0x30, 0x01, 0x01, 0x01, 0xff, 0x01, 0xf8, - 0x01, 0x7f, 0x01, 0xff, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x90, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf2, 0x01, 0x7f, - 0x01, 0xff, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x0a, 0x01, 0xff, - 0x01, 0xf1, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xb0, 0x01, 0x7f, 0x01, 0xff, - 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x03, 0x01, 0xff, 0x01, 0xf7, - 0x01, 0x5f, 0x01, 0xff, 0x01, 0x40, 0x01, 0x7f, 0x01, 0xff, 0x0a, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x01, 0x00, 0x01, 0xcf, 0x01, 0xfd, 0x01, 0xcf, - 0x01, 0xfe, 0x01, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x0a, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0x00, 0x01, 0x6f, 0x02, 0xff, 0x01, 0xf7, 0x01, 0x00, - 0x01, 0x7f, 0x01, 0xff, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x00, - 0x01, 0x0f, 0x02, 0xff, 0x01, 0xf1, 0x01, 0x00, 0x01, 0x7f, 0x01, 0xff, - 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x01, 0x00, 0x01, 0x09, 0x02, 0xff, - 0x01, 0xa0, 0x01, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x0a, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0x00, 0x01, 0x02, 0x02, 0xff, 0x01, 0x40, 0x01, 0x00, - 0x01, 0x7f, 0x01, 0xff, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0xcf, 0x01, 0xfd, 0x02, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x0a, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x5f, 0x01, 0xf7, 0x02, 0x00, - 0x01, 0x7f, 0x01, 0xff, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x06, 0x01, 0x61, 0x02, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x0a, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x06, 0x00, 0x01, 0x7f, 0x01, 0xff, 0xd1, 0x00, - - /* 45 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x74, 0x05, 0x00, 0x01, 0x77, - 0x01, 0x73, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xfd, 0x05, 0xaa, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x07, 0xff, 0x01, 0xf8, 0x0b, 0x00, - 0x01, 0xef, 0x07, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xfc, - 0x05, 0x77, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf8, 0xd2, 0x00, - - /* 46 */ - 0xff, 0x00, 0x58, 0x00, 0x01, 0x39, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xeb, - 0x01, 0x60, 0x0e, 0x00, 0x01, 0x1b, 0x04, 0xff, 0x01, 0xfe, 0x01, 0x50, - 0x0c, 0x00, 0x01, 0x02, 0x01, 0xef, 0x05, 0xff, 0x01, 0xf8, 0x0c, 0x00, - 0x01, 0x0d, 0x02, 0xff, 0x01, 0x83, 0x01, 0x12, 0x01, 0x5c, 0x02, 0xff, - 0x01, 0x50, 0x0b, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0xd1, 0x03, 0x00, - 0x01, 0x7f, 0x01, 0xff, 0x01, 0xe1, 0x0a, 0x00, 0x01, 0x01, 0x01, 0xff, - 0x01, 0xfe, 0x01, 0x10, 0x03, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf7, - 0x0a, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf7, 0x04, 0x00, 0x01, 0x01, - 0x01, 0xff, 0x01, 0xfd, 0x0a, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf1, - 0x05, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0x10, 0x09, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0x50, - 0x09, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x90, 0x05, 0x00, 0x01, 0x3f, - 0x01, 0xff, 0x01, 0x70, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x80, - 0x05, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x80, 0x09, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x70, 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x90, - 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x80, 0x05, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x80, 0x09, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x90, - 0x05, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x70, 0x09, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0x50, - 0x09, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf1, 0x05, 0x00, 0x01, 0xaf, - 0x01, 0xff, 0x01, 0x10, 0x09, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf8, - 0x04, 0x00, 0x01, 0x01, 0x01, 0xff, 0x01, 0xfd, 0x0b, 0x00, 0x02, 0xff, - 0x01, 0x20, 0x03, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf6, 0x0b, 0x00, - 0x01, 0x8f, 0x01, 0xff, 0x01, 0xe3, 0x03, 0x00, 0x01, 0xaf, 0x01, 0xff, - 0x01, 0xd0, 0x0b, 0x00, 0x01, 0x0c, 0x02, 0xff, 0x01, 0xa5, 0x01, 0x34, - 0x01, 0x7e, 0x02, 0xff, 0x01, 0x30, 0x0b, 0x00, 0x01, 0x01, 0x01, 0xcf, - 0x05, 0xff, 0x01, 0xf5, 0x0d, 0x00, 0x01, 0x19, 0x04, 0xff, 0x01, 0xfc, - 0x01, 0x30, 0x0e, 0x00, 0x01, 0x27, 0x01, 0xbd, 0x01, 0xee, 0x01, 0xc9, - 0x01, 0x40, 0xc0, 0x00, - - /* 47 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x67, 0x07, 0x77, 0x01, 0x73, 0x0b, 0x00, - 0x01, 0xef, 0x07, 0xff, 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x07, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xfd, 0x05, 0xaa, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0xd2, 0x00, - - /* 48 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x72, 0x01, 0x00, 0x01, 0x29, - 0x01, 0xdf, 0x01, 0xff, 0x01, 0xc7, 0x01, 0x10, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xf4, 0x01, 0x08, 0x04, 0xff, 0x01, 0xf6, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xf4, 0x01, 0xaf, 0x05, 0xff, 0x01, 0x80, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xfc, 0x01, 0xff, 0x01, 0xf9, 0x01, 0x42, 0x01, 0x37, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0xf6, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xfe, - 0x01, 0x30, 0x02, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x10, - 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xf3, 0x04, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x70, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0x90, - 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x0a, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x30, 0x04, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf2, - 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfe, 0x05, 0x00, 0x01, 0x05, 0x01, 0xff, - 0x01, 0xf5, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfb, 0x05, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf7, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfa, 0x06, 0x00, - 0x01, 0xff, 0x01, 0xf8, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x06, 0x00, - 0x01, 0xff, 0x01, 0xf9, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfa, 0x06, 0x00, - 0x01, 0xff, 0x01, 0xf9, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfb, 0x05, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfe, - 0x05, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf5, 0x0a, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x30, 0x04, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf2, - 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xd0, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xf4, - 0x04, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x70, 0x0a, 0x00, 0x01, 0xef, - 0x02, 0xff, 0x01, 0x40, 0x02, 0x00, 0x01, 0x1b, 0x01, 0xff, 0x01, 0xfe, - 0x01, 0x10, 0x0a, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0xfb, 0x01, 0x64, - 0x01, 0x58, 0x01, 0xef, 0x01, 0xff, 0x01, 0xf5, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0xaf, 0x05, 0xff, 0x01, 0x70, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0x08, 0x04, 0xff, 0x01, 0xe4, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0x00, 0x01, 0x28, 0x01, 0xce, 0x01, 0xed, 0x01, 0xa5, - 0x0d, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xde, 0x01, 0xe8, - 0x25, 0x00, - - /* 49 */ - 0xff, 0x00, 0x58, 0x00, 0x01, 0x38, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xea, - 0x01, 0x50, 0x0e, 0x00, 0x01, 0x19, 0x04, 0xff, 0x01, 0xfd, 0x01, 0x20, - 0x0c, 0x00, 0x01, 0x01, 0x01, 0xcf, 0x05, 0xff, 0x01, 0xf2, 0x0c, 0x00, - 0x01, 0x0c, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x73, 0x01, 0x12, 0x01, 0x6d, - 0x01, 0xff, 0x01, 0xfd, 0x0c, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xc1, - 0x03, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x60, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xfe, 0x01, 0x10, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xb0, - 0x0a, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf6, 0x04, 0x00, 0x01, 0x0a, - 0x01, 0xff, 0x01, 0xf0, 0x0a, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf1, - 0x04, 0x00, 0x01, 0x04, 0x01, 0xbb, 0x01, 0xb1, 0x0a, 0x00, 0x01, 0x0d, - 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x90, - 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x80, 0x11, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x70, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x80, - 0x11, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x90, 0x11, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xc0, 0x05, 0x00, 0x01, 0x55, 0x01, 0x52, 0x0a, 0x00, - 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf1, 0x04, 0x00, 0x01, 0x04, 0x01, 0xff, - 0x01, 0xf4, 0x0a, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf6, 0x04, 0x00, - 0x01, 0x09, 0x01, 0xff, 0x01, 0xf1, 0x0b, 0x00, 0x01, 0xff, 0x01, 0xfe, - 0x01, 0x10, 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xc0, 0x0b, 0x00, - 0x01, 0x8f, 0x01, 0xff, 0x01, 0xd2, 0x02, 0x00, 0x01, 0x01, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x60, 0x0b, 0x00, 0x01, 0x0c, 0x02, 0xff, 0x01, 0x94, - 0x01, 0x34, 0x01, 0x8e, 0x01, 0xff, 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x01, - 0x01, 0xdf, 0x05, 0xff, 0x01, 0xe1, 0x0d, 0x00, 0x01, 0x19, 0x04, 0xff, - 0x01, 0xfa, 0x01, 0x10, 0x0e, 0x00, 0x01, 0x27, 0x01, 0xcd, 0x01, 0xee, - 0x01, 0xc8, 0x01, 0x20, 0xc0, 0x00, - - /* 50 */ - 0xff, 0x00, 0x55, 0x00, 0x01, 0x47, 0x06, 0x77, 0x01, 0x76, 0x0c, 0x00, - 0x01, 0x9f, 0x06, 0xff, 0x01, 0xfe, 0x0c, 0x00, 0x01, 0x9f, 0x06, 0xff, - 0x01, 0xfe, 0x0c, 0x00, 0x01, 0x6a, 0x02, 0xaa, 0x01, 0xdf, 0x01, 0xff, - 0x02, 0xaa, 0x01, 0xa9, 0x0f, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, 0x01, 0x9f, 0x01, 0xfe, 0x12, 0x00, - 0x01, 0x9f, 0x01, 0xfe, 0xd7, 0x00, - - /* 51 */ - 0xff, 0x00, 0x55, 0x00, 0x01, 0x67, 0x01, 0x75, 0x05, 0x00, 0x01, 0x05, - 0x01, 0x77, 0x01, 0x70, 0x0a, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x05, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xb0, 0x0a, 0x00, 0x01, 0x5f, 0x01, 0xff, - 0x01, 0x50, 0x04, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0x50, 0x0a, 0x00, - 0x01, 0x0f, 0x01, 0xff, 0x01, 0xb0, 0x04, 0x00, 0x01, 0xbf, 0x01, 0xff, - 0x0b, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf0, 0x03, 0x00, 0x01, 0x01, - 0x01, 0xff, 0x01, 0xf9, 0x0b, 0x00, 0x01, 0x04, 0x01, 0xff, 0x01, 0xf5, - 0x03, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf3, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xfb, 0x03, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xd0, 0x0c, 0x00, - 0x01, 0x9f, 0x01, 0xff, 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x70, - 0x0c, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x50, 0x02, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x20, 0x0c, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xb0, - 0x02, 0x00, 0x01, 0xef, 0x01, 0xfb, 0x0d, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xf1, 0x01, 0x00, 0x01, 0x04, 0x01, 0xff, 0x01, 0xf5, 0x0d, 0x00, - 0x01, 0x04, 0x01, 0xff, 0x01, 0xf5, 0x01, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xf0, 0x0e, 0x00, 0x01, 0xef, 0x01, 0xfb, 0x01, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0x90, 0x0e, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0x10, - 0x01, 0x5f, 0x01, 0xff, 0x01, 0x40, 0x0e, 0x00, 0x01, 0x3f, 0x01, 0xff, - 0x01, 0x50, 0x01, 0xbf, 0x01, 0xfd, 0x0f, 0x00, 0x01, 0x0d, 0x01, 0xff, - 0x01, 0xb1, 0x01, 0xff, 0x01, 0xf8, 0x0f, 0x00, 0x01, 0x08, 0x01, 0xff, - 0x01, 0xf7, 0x01, 0xff, 0x01, 0xf2, 0x0f, 0x00, 0x01, 0x03, 0x03, 0xff, - 0x01, 0xc0, 0x10, 0x00, 0x01, 0xdf, 0x02, 0xff, 0x01, 0x60, 0x10, 0x00, - 0x01, 0x8f, 0x02, 0xff, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xfa, - 0x11, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf4, 0x11, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x80, - 0x11, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x20, 0x11, 0x00, 0x01, 0xef, - 0x01, 0xfc, 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf6, 0x0f, 0x00, - 0x01, 0x05, 0x01, 0x76, 0x01, 0xaf, 0x01, 0xff, 0x01, 0xd0, 0x0f, 0x00, - 0x01, 0x09, 0x03, 0xff, 0x01, 0x50, 0x0f, 0x00, 0x01, 0x09, 0x02, 0xff, - 0x01, 0xf7, 0x10, 0x00, 0x01, 0x05, 0x01, 0xce, 0x01, 0xda, 0x01, 0x30, - 0x24, 0x00, - - /* 52 */ - 0xe3, 0x00, 0x01, 0x05, 0x01, 0x99, 0x01, 0x80, 0x11, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, - 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, - 0x0c, 0x00, 0x01, 0x01, 0x01, 0x8d, 0x01, 0xff, 0x01, 0xeb, 0x01, 0x40, - 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, 0x01, 0x02, 0x01, 0x9e, 0x01, 0xff, - 0x01, 0xea, 0x01, 0x50, 0x07, 0x00, 0x01, 0x6f, 0x03, 0xff, 0x01, 0xfa, - 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, 0x01, 0x5f, 0x03, 0xff, 0x01, 0xfc, - 0x01, 0x20, 0x05, 0x00, 0x01, 0x06, 0x05, 0xff, 0x01, 0x98, 0x01, 0xff, - 0x01, 0xe4, 0x05, 0xff, 0x01, 0xd1, 0x05, 0x00, 0x01, 0x3f, 0x01, 0xff, - 0x01, 0xfc, 0x01, 0x53, 0x01, 0x36, 0x01, 0xcf, 0x01, 0xfc, 0x01, 0xff, - 0x01, 0xfd, 0x01, 0xff, 0x01, 0x83, 0x01, 0x24, 0x01, 0x9f, 0x01, 0xff, - 0x01, 0xfb, 0x05, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x90, 0x02, 0x00, - 0x01, 0x0a, 0x03, 0xff, 0x01, 0xe2, 0x02, 0x00, 0x01, 0x03, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x40, 0x03, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xfc, - 0x04, 0x00, 0x01, 0xdf, 0x02, 0xff, 0x01, 0x40, 0x03, 0x00, 0x01, 0x5f, - 0x01, 0xff, 0x01, 0xb0, 0x03, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf4, - 0x04, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xfb, 0x04, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf1, 0x03, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xe0, - 0x04, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xf6, 0x04, 0x00, 0x01, 0x07, - 0x01, 0xff, 0x01, 0xf4, 0x03, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xb0, - 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf2, 0x04, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xf7, 0x03, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0x90, - 0x04, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf0, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf9, 0x03, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0x80, 0x04, 0x00, - 0x01, 0x09, 0x01, 0xff, 0x01, 0xf0, 0x05, 0x00, 0x01, 0xff, 0x01, 0xfa, - 0x03, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0x70, 0x04, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xe0, 0x05, 0x00, 0x01, 0xef, 0x01, 0xfb, 0x03, 0x00, - 0x01, 0x2f, 0x01, 0xff, 0x01, 0x80, 0x04, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xf0, 0x05, 0x00, 0x01, 0xff, 0x01, 0xfa, 0x03, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0x90, 0x04, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf0, - 0x05, 0x00, 0x01, 0xff, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x0f, 0x01, 0xff, - 0x01, 0xb0, 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf3, 0x04, 0x00, - 0x01, 0x03, 0x01, 0xff, 0x01, 0xf7, 0x03, 0x00, 0x01, 0x0c, 0x01, 0xff, - 0x01, 0xf0, 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xf7, 0x04, 0x00, - 0x01, 0x07, 0x01, 0xff, 0x01, 0xf4, 0x03, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xf5, 0x04, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xfc, 0x04, 0x00, - 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf1, 0x03, 0x00, 0x01, 0x04, 0x01, 0xff, - 0x01, 0xfc, 0x04, 0x00, 0x01, 0xdf, 0x02, 0xff, 0x01, 0x40, 0x03, 0x00, - 0x01, 0x5f, 0x01, 0xff, 0x01, 0xb0, 0x04, 0x00, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0xa0, 0x02, 0x00, 0x01, 0x0b, 0x03, 0xff, 0x01, 0xe3, 0x02, 0x00, - 0x01, 0x04, 0x02, 0xff, 0x01, 0x40, 0x04, 0x00, 0x01, 0x5f, 0x01, 0xff, - 0x01, 0xfd, 0x01, 0x74, 0x01, 0x47, 0x01, 0xdf, 0x01, 0xfe, 0x03, 0xff, - 0x01, 0x95, 0x01, 0x45, 0x01, 0xaf, 0x01, 0xff, 0x01, 0xfb, 0x05, 0x00, - 0x01, 0x08, 0x05, 0xff, 0x01, 0xb8, 0x01, 0xff, 0x01, 0xe6, 0x05, 0xff, - 0x01, 0xd1, 0x06, 0x00, 0x01, 0x7f, 0x03, 0xff, 0x01, 0xfa, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xe0, 0x01, 0x6f, 0x03, 0xff, 0x01, 0xfa, 0x01, 0x10, - 0x06, 0x00, 0x01, 0x02, 0x01, 0x8c, 0x01, 0xef, 0x01, 0xdb, 0x01, 0x50, - 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, 0x01, 0x02, 0x01, 0x8d, 0x01, 0xee, - 0x01, 0xd9, 0x01, 0x30, 0x0c, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, - 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, - 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, - 0x11, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xe0, 0x1e, 0x00, - - /* 53 */ - 0xff, 0x00, 0x55, 0x00, 0x01, 0x37, 0x01, 0x77, 0x01, 0x30, 0x04, 0x00, - 0x01, 0x17, 0x01, 0x77, 0x01, 0x40, 0x0a, 0x00, 0x01, 0x0d, 0x01, 0xff, - 0x01, 0xe1, 0x04, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x20, 0x0a, 0x00, - 0x01, 0x03, 0x01, 0xff, 0x01, 0xfb, 0x03, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xf6, 0x0c, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x50, 0x02, 0x00, - 0x01, 0x2f, 0x01, 0xff, 0x01, 0xb0, 0x0c, 0x00, 0x01, 0x0d, 0x01, 0xff, - 0x01, 0xe1, 0x02, 0x00, 0x01, 0xcf, 0x01, 0xfe, 0x01, 0x10, 0x0c, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xfb, 0x01, 0x00, 0x01, 0x07, 0x01, 0xff, - 0x01, 0xf5, 0x0e, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0x60, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x90, 0x0e, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf2, - 0x01, 0xcf, 0x01, 0xfd, 0x0f, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xfe, - 0x01, 0xff, 0x01, 0xf3, 0x10, 0x00, 0x01, 0x6f, 0x02, 0xff, 0x01, 0x70, - 0x10, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xfc, 0x11, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xfd, 0x11, 0x00, 0x01, 0x4f, 0x02, 0xff, 0x01, 0x80, - 0x0f, 0x00, 0x01, 0x01, 0x01, 0xef, 0x02, 0xff, 0x01, 0xf3, 0x0f, 0x00, - 0x01, 0x0a, 0x01, 0xff, 0x01, 0xe3, 0x01, 0xef, 0x01, 0xfd, 0x0f, 0x00, - 0x01, 0x6f, 0x01, 0xff, 0x01, 0x50, 0x01, 0x5f, 0x01, 0xff, 0x01, 0x90, - 0x0d, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xfb, 0x01, 0x00, 0x01, 0x0a, - 0x01, 0xff, 0x01, 0xf4, 0x0d, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xe1, - 0x01, 0x00, 0x01, 0x01, 0x01, 0xef, 0x01, 0xfd, 0x0d, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0x50, 0x02, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0x90, - 0x0b, 0x00, 0x01, 0x03, 0x01, 0xff, 0x01, 0xfa, 0x03, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xf4, 0x0b, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xe1, - 0x03, 0x00, 0x01, 0x01, 0x01, 0xef, 0x01, 0xfe, 0x01, 0x10, 0x0a, 0x00, - 0x01, 0x9f, 0x01, 0xff, 0x01, 0x50, 0x04, 0x00, 0x01, 0x6f, 0x01, 0xff, - 0x01, 0xa0, 0x0a, 0x00, 0x02, 0x11, 0x05, 0x00, 0x01, 0x01, 0x01, 0x11, - 0x01, 0x10, 0xbe, 0x00, - - /* 54 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x74, 0x05, 0x00, 0x01, 0x77, - 0x01, 0x73, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x00, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x05, 0x11, 0x01, 0xff, - 0x01, 0xf7, 0x0b, 0x00, 0x01, 0xef, 0x07, 0xff, 0x01, 0xfc, 0x01, 0x99, - 0x0a, 0x00, 0x01, 0xef, 0x09, 0xff, 0x0a, 0x00, 0x01, 0xef, 0x09, 0xff, - 0x12, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x12, 0x00, 0x01, 0x0e, 0x01, 0xff, - 0x12, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x12, 0x00, 0x01, 0x0e, 0x01, 0xff, - 0x12, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x6d, 0x00, - - /* 55 */ - 0xff, 0x00, 0x55, 0x00, 0x01, 0x02, 0x01, 0x77, 0x01, 0x71, 0x04, 0x00, - 0x01, 0x77, 0x01, 0x73, 0x0b, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, - 0x04, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0x05, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf2, 0x04, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, - 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, 0x04, 0x00, 0x01, 0xff, 0x01, 0xf8, - 0x0b, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, 0x04, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x0b, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, 0x04, 0x00, - 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, - 0x04, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0x05, 0x01, 0xff, - 0x01, 0xf2, 0x04, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0x03, - 0x01, 0xff, 0x01, 0xf6, 0x04, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x0c, 0x00, - 0x02, 0xff, 0x01, 0x85, 0x03, 0x55, 0x01, 0xff, 0x01, 0xf8, 0x0c, 0x00, - 0x01, 0x6f, 0x06, 0xff, 0x01, 0xf8, 0x0c, 0x00, 0x01, 0x07, 0x06, 0xff, - 0x01, 0xf8, 0x0d, 0x00, 0x01, 0x17, 0x01, 0xbc, 0x03, 0xcc, 0x01, 0xff, - 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x12, 0x00, 0x01, 0x11, 0x01, 0x10, 0xbf, 0x00, - - /* 56 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x66, 0x01, 0x64, 0x02, 0x00, 0x01, 0x01, - 0x01, 0x66, 0x01, 0x62, 0x02, 0x00, 0x01, 0x02, 0x01, 0x66, 0x01, 0x60, - 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, - 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, - 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, - 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, - 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, - 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, - 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, - 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, - 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, - 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x11, 0x01, 0x13, - 0x01, 0xff, 0x01, 0xf6, 0x02, 0x11, 0x01, 0x17, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0xef, 0x0a, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, - 0x0a, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x0a, 0xff, 0x01, 0xf1, - 0xcf, 0x00, - - /* 57 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x66, 0x01, 0x63, 0x02, 0x00, 0x01, 0x01, - 0x01, 0x66, 0x01, 0x62, 0x02, 0x00, 0x01, 0x02, 0x01, 0x66, 0x01, 0x60, - 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, - 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, - 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, - 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, - 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, - 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, - 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, - 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, - 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x02, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, - 0x01, 0xff, 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf5, 0x02, 0x00, 0x01, 0x06, 0x01, 0xff, - 0x01, 0xf1, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x11, 0x01, 0x13, - 0x01, 0xff, 0x01, 0xf6, 0x02, 0x11, 0x01, 0x17, 0x01, 0xff, 0x01, 0xf1, - 0x08, 0x00, 0x01, 0xef, 0x0a, 0xff, 0x01, 0xf9, 0x01, 0x95, 0x07, 0x00, - 0x01, 0xef, 0x0b, 0xff, 0x01, 0xf9, 0x07, 0x00, 0x01, 0xef, 0x0b, 0xff, - 0x01, 0xf9, 0x12, 0x00, 0x01, 0x5f, 0x01, 0xf9, 0x12, 0x00, 0x01, 0x5f, - 0x01, 0xf9, 0x12, 0x00, 0x01, 0x5f, 0x01, 0xf9, 0x12, 0x00, 0x01, 0x5f, - 0x01, 0xf9, 0x12, 0x00, 0x01, 0x5f, 0x01, 0xf9, 0x6a, 0x00, - - /* 58 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x56, 0x01, 0x63, 0x12, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xff, 0x02, 0xee, 0x01, 0xed, - 0x01, 0xc9, 0x01, 0x60, 0x0d, 0x00, 0x01, 0xef, 0x06, 0xff, 0x01, 0x70, - 0x0c, 0x00, 0x01, 0xef, 0x06, 0xff, 0x01, 0xfa, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xfa, 0x02, 0x33, 0x01, 0x34, 0x01, 0x6a, 0x02, 0xff, 0x01, 0x50, - 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x6f, 0x01, 0xff, - 0x01, 0xd0, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x0c, - 0x01, 0xff, 0x01, 0xf1, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, - 0x01, 0x09, 0x01, 0xff, 0x01, 0xf3, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x04, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf4, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x04, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x2f, 0x01, 0xff, 0x01, 0xe0, - 0x0b, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x03, 0x11, 0x01, 0x38, 0x02, 0xff, - 0x01, 0x70, 0x0b, 0x00, 0x01, 0xef, 0x06, 0xff, 0x01, 0xfc, 0x0c, 0x00, - 0x01, 0xef, 0x06, 0xff, 0x01, 0xc1, 0x0c, 0x00, 0x01, 0xef, 0x05, 0xff, - 0x01, 0xb5, 0x0d, 0x00, 0x05, 0x11, 0xc2, 0x00, - - /* 59 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x56, 0x01, 0x63, 0x07, 0x00, 0x01, 0x02, - 0x01, 0x66, 0x01, 0x60, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x07, 0x00, - 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x07, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x07, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x07, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, - 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x07, 0x00, 0x01, 0x07, 0x01, 0xff, - 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x07, 0x00, 0x01, 0x07, - 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x07, 0x00, - 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x01, 0xff, - 0x02, 0xee, 0x01, 0xed, 0x01, 0xc9, 0x01, 0x60, 0x02, 0x00, 0x01, 0x07, - 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x06, 0xff, 0x01, 0x70, - 0x01, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, - 0x06, 0xff, 0x01, 0xfa, 0x01, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, - 0x08, 0x00, 0x01, 0xef, 0x01, 0xfa, 0x02, 0x33, 0x01, 0x34, 0x01, 0x6b, - 0x02, 0xff, 0x01, 0x50, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xd0, - 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf1, 0x01, 0x07, 0x01, 0xff, - 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf3, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf4, - 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x04, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf2, 0x01, 0x07, 0x01, 0xff, - 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x04, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xe0, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x03, 0x11, 0x01, 0x37, 0x02, 0xff, 0x01, 0x70, - 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x06, 0xff, - 0x01, 0xfc, 0x01, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, - 0x01, 0xef, 0x06, 0xff, 0x01, 0xc1, 0x01, 0x00, 0x01, 0x07, 0x01, 0xff, - 0x01, 0xf0, 0x08, 0x00, 0x01, 0xef, 0x05, 0xff, 0x01, 0xb5, 0x02, 0x00, - 0x01, 0x07, 0x01, 0xff, 0x01, 0xf0, 0x08, 0x00, 0x05, 0x11, 0x05, 0x00, - 0x01, 0x11, 0x01, 0x10, 0xbb, 0x00, - - /* 60 */ - 0xff, 0x00, 0x55, 0x00, 0x01, 0x36, 0x04, 0x66, 0x01, 0x63, 0x0e, 0x00, - 0x01, 0x9f, 0x04, 0xff, 0x01, 0xf8, 0x0e, 0x00, 0x01, 0x9f, 0x04, 0xff, - 0x01, 0xf8, 0x0e, 0x00, 0x01, 0x6a, 0x03, 0xaa, 0x01, 0xff, 0x01, 0xf8, - 0x12, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, 0x01, 0xf8, - 0x12, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x12, 0x00, 0x01, 0xff, 0x01, 0xf8, - 0x12, 0x00, 0x02, 0xff, 0x02, 0xee, 0x01, 0xed, 0x01, 0xc9, 0x01, 0x50, - 0x0d, 0x00, 0x06, 0xff, 0x01, 0xfe, 0x01, 0x60, 0x0c, 0x00, 0x07, 0xff, - 0x01, 0xf9, 0x0c, 0x00, 0x01, 0xff, 0x01, 0xfa, 0x02, 0x33, 0x01, 0x34, - 0x01, 0x6b, 0x02, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0xff, 0x01, 0xf8, - 0x04, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0xc0, 0x0b, 0x00, 0x01, 0xff, - 0x01, 0xf8, 0x04, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf1, 0x0b, 0x00, - 0x01, 0xff, 0x01, 0xf8, 0x04, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf3, - 0x0b, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x04, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xf3, 0x0b, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x04, 0x00, 0x01, 0x0b, - 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, 0x01, 0xff, 0x01, 0xf8, 0x04, 0x00, - 0x01, 0x3f, 0x01, 0xff, 0x01, 0xe0, 0x0b, 0x00, 0x01, 0xff, 0x01, 0xf9, - 0x03, 0x11, 0x01, 0x38, 0x02, 0xff, 0x01, 0x70, 0x0b, 0x00, 0x07, 0xff, - 0x01, 0xfc, 0x0c, 0x00, 0x07, 0xff, 0x01, 0xb1, 0x0c, 0x00, 0x06, 0xff, - 0x01, 0xb5, 0x0d, 0x00, 0x05, 0x11, 0xbf, 0x00, - - /* 61 */ - 0xff, 0x00, 0x57, 0x00, 0x01, 0x02, 0x01, 0x8c, 0x01, 0xff, 0x01, 0xfd, - 0x01, 0x94, 0x0f, 0x00, 0x01, 0x9f, 0x04, 0xff, 0x01, 0xb2, 0x0d, 0x00, - 0x01, 0x0c, 0x05, 0xff, 0x01, 0xfe, 0x01, 0x20, 0x0c, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0xf8, 0x01, 0x42, 0x01, 0x36, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0xe1, 0x0b, 0x00, 0x01, 0x01, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x20, - 0x02, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xfa, 0x0b, 0x00, 0x01, 0x07, - 0x01, 0xff, 0x01, 0xf5, 0x04, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x20, - 0x0a, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xe0, 0x04, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0x90, 0x0a, 0x00, 0x01, 0x0a, 0x01, 0xcc, 0x01, 0x80, - 0x04, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xe0, 0x11, 0x00, 0x01, 0x08, - 0x01, 0xff, 0x01, 0xf1, 0x0d, 0x00, 0x01, 0x69, 0x03, 0x99, 0x01, 0x9b, - 0x01, 0xff, 0x01, 0xf4, 0x0d, 0x00, 0x01, 0xaf, 0x05, 0xff, 0x01, 0xf5, - 0x0d, 0x00, 0x01, 0xaf, 0x05, 0xff, 0x01, 0xf6, 0x0d, 0x00, 0x01, 0x58, - 0x03, 0x88, 0x01, 0x8a, 0x01, 0xff, 0x01, 0xf5, 0x11, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf4, 0x0a, 0x00, 0x01, 0x05, 0x01, 0x55, 0x01, 0x10, - 0x04, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf2, 0x0a, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0x80, 0x04, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xe0, - 0x0a, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xd0, 0x04, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xa0, 0x0a, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xf5, - 0x04, 0x00, 0x01, 0xbf, 0x01, 0xff, 0x01, 0x40, 0x0a, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xfe, 0x01, 0x20, 0x02, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xfc, 0x0c, 0x00, 0x01, 0x9f, 0x01, 0xff, 0x01, 0xf9, 0x01, 0x42, - 0x01, 0x37, 0x01, 0xdf, 0x01, 0xff, 0x01, 0xf2, 0x0c, 0x00, 0x01, 0x0b, - 0x06, 0xff, 0x01, 0x40, 0x0d, 0x00, 0x01, 0x8f, 0x04, 0xff, 0x01, 0xc2, - 0x0e, 0x00, 0x01, 0x01, 0x01, 0x8c, 0x01, 0xef, 0x01, 0xed, 0x01, 0x94, - 0xc1, 0x00, - - /* 62 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x56, 0x01, 0x63, 0x04, 0x00, 0x01, 0x05, - 0x01, 0xae, 0x01, 0xff, 0x01, 0xed, 0x01, 0x83, 0x09, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x03, 0x00, 0x01, 0x03, 0x01, 0xdf, 0x04, 0xff, 0x01, 0xa1, - 0x08, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x6f, 0x05, 0xff, - 0x01, 0xfe, 0x01, 0x20, 0x07, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0x04, 0x02, 0xff, 0x01, 0xd6, 0x01, 0x32, 0x01, 0x48, 0x02, 0xff, - 0x01, 0xe0, 0x07, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x1c, 0x01, 0xff, 0x01, 0xf9, - 0x07, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x7f, 0x01, 0xff, - 0x01, 0xb0, 0x03, 0x00, 0x01, 0x01, 0x01, 0xef, 0x01, 0xff, 0x01, 0x10, - 0x06, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0x20, 0x04, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0x70, 0x06, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x01, 0x00, 0x01, 0x02, 0x01, 0xff, 0x01, 0xfb, - 0x05, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xb0, 0x06, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, - 0x01, 0x0b, 0x01, 0xff, 0x01, 0xe0, 0x06, 0x00, 0x01, 0xef, 0x01, 0xfd, - 0x01, 0x99, 0x01, 0x9c, 0x01, 0xff, 0x01, 0xf3, 0x05, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xf1, 0x06, 0x00, 0x01, 0xef, 0x04, 0xff, 0x01, 0xf2, - 0x05, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf2, 0x06, 0x00, 0x01, 0xef, - 0x04, 0xff, 0x01, 0xf1, 0x05, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf3, - 0x06, 0x00, 0x01, 0xef, 0x01, 0xfc, 0x01, 0x88, 0x01, 0x8c, 0x01, 0xff, - 0x01, 0xf2, 0x05, 0x00, 0x01, 0x07, 0x01, 0xff, 0x01, 0xf2, 0x06, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x01, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf3, - 0x05, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xf1, 0x06, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0x00, 0x01, 0x04, 0x01, 0xff, 0x01, 0xf6, 0x05, 0x00, - 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf0, 0x06, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x01, 0x00, 0x01, 0x01, 0x01, 0xff, 0x01, 0xfb, 0x05, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xb0, 0x06, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, - 0x01, 0xcf, 0x01, 0xff, 0x01, 0x20, 0x04, 0x00, 0x01, 0x7f, 0x01, 0xff, - 0x01, 0x70, 0x06, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x6f, - 0x01, 0xff, 0x01, 0xb0, 0x03, 0x00, 0x01, 0x01, 0x01, 0xef, 0x01, 0xff, - 0x01, 0x10, 0x06, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x0e, - 0x01, 0xff, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x2d, 0x01, 0xff, 0x01, 0xf9, - 0x07, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x04, 0x02, 0xff, - 0x01, 0xd7, 0x01, 0x32, 0x01, 0x49, 0x02, 0xff, 0x01, 0xd0, 0x07, 0x00, - 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x6f, 0x05, 0xff, 0x01, 0xfd, - 0x01, 0x20, 0x07, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x03, 0x00, 0x01, 0x03, - 0x01, 0xdf, 0x04, 0xff, 0x01, 0xa1, 0x08, 0x00, 0x01, 0x11, 0x01, 0x10, - 0x04, 0x00, 0x01, 0x05, 0x01, 0xad, 0x01, 0xff, 0x01, 0xec, 0x01, 0x82, - 0xbc, 0x00, - - /* 63 */ - 0xff, 0x00, 0x58, 0x00, 0x01, 0x14, 0x05, 0x66, 0x01, 0x60, 0x0c, 0x00, - 0x01, 0x2b, 0x06, 0xff, 0x01, 0xf2, 0x0b, 0x00, 0x01, 0x02, 0x01, 0xef, - 0x06, 0xff, 0x01, 0xf2, 0x0b, 0x00, 0x01, 0x0c, 0x02, 0xff, 0x01, 0xeb, - 0x02, 0xaa, 0x01, 0xac, 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, 0x01, 0x4f, - 0x01, 0xff, 0x01, 0xf5, 0x03, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, - 0x0b, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0x70, 0x03, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0x30, - 0x03, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, 0x01, 0x9f, - 0x01, 0xff, 0x01, 0x20, 0x03, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, - 0x0b, 0x00, 0x01, 0x6f, 0x01, 0xff, 0x01, 0x70, 0x03, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xf8, - 0x01, 0x20, 0x02, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, - 0x01, 0x08, 0x07, 0xff, 0x01, 0xf2, 0x0c, 0x00, 0x01, 0x8f, 0x06, 0xff, - 0x01, 0xf2, 0x0c, 0x00, 0x01, 0x02, 0x01, 0x9d, 0x05, 0xff, 0x01, 0xf2, - 0x0d, 0x00, 0x01, 0x01, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x62, 0x01, 0x27, - 0x01, 0xff, 0x01, 0xf2, 0x0d, 0x00, 0x01, 0x0c, 0x01, 0xff, 0x01, 0xf7, - 0x01, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, 0x0d, 0x00, 0x01, 0xcf, - 0x01, 0xff, 0x01, 0x80, 0x01, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, - 0x0c, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf9, 0x02, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf2, 0x0c, 0x00, 0x01, 0xaf, 0x01, 0xff, 0x01, 0xa0, - 0x02, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, 0x0b, 0x00, 0x01, 0x09, - 0x01, 0xff, 0x01, 0xfa, 0x03, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, - 0x0b, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x01, 0xb0, 0x03, 0x00, 0x01, 0x05, - 0x01, 0xff, 0x01, 0xf2, 0x0a, 0x00, 0x01, 0x08, 0x01, 0xff, 0x01, 0xfb, - 0x04, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, 0x0a, 0x00, 0x01, 0x7f, - 0x01, 0xff, 0x01, 0xc0, 0x04, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf2, - 0x0a, 0x00, 0x02, 0x11, 0x06, 0x00, 0x01, 0x11, 0x01, 0x10, 0xbe, 0x00, - - /* 64 */ - 0x2c, 0x00, 0x01, 0xbd, 0x01, 0xdd, 0x01, 0x60, 0x01, 0x05, 0x01, 0xdd, - 0x01, 0xdc, 0x0e, 0x00, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x70, 0x01, 0x06, - 0x01, 0xff, 0x01, 0xfe, 0x0e, 0x00, 0x01, 0xdf, 0x01, 0xff, 0x01, 0x70, - 0x01, 0x06, 0x01, 0xff, 0x01, 0xfe, 0x0e, 0x00, 0x01, 0xdf, 0x01, 0xff, - 0x01, 0x70, 0x01, 0x06, 0x01, 0xff, 0x01, 0xfe, 0x0e, 0x00, 0x01, 0x67, - 0x01, 0x77, 0x01, 0x30, 0x01, 0x02, 0x01, 0x77, 0x01, 0x76, 0x33, 0x00, - 0x01, 0x1c, 0x0a, 0xcc, 0x09, 0x00, 0x01, 0x1f, 0x0a, 0xff, 0x09, 0x00, - 0x01, 0x1f, 0x0a, 0xff, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xe8, - 0x08, 0x88, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xfe, 0x07, 0xee, - 0x01, 0xe4, 0x09, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0xf5, 0x09, 0x00, - 0x01, 0x1f, 0x09, 0xff, 0x01, 0xf5, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xe7, 0x07, 0x77, 0x01, 0x72, 0x09, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, - 0x01, 0x1f, 0x01, 0xff, 0x01, 0xc0, 0x11, 0x00, 0x01, 0x1f, 0x01, 0xff, - 0x01, 0xd4, 0x08, 0x44, 0x01, 0x30, 0x08, 0x00, 0x01, 0x1f, 0x0a, 0xff, - 0x01, 0xb0, 0x08, 0x00, 0x01, 0x1f, 0x0a, 0xff, 0x01, 0xb0, 0x08, 0x00, - 0x01, 0x1f, 0x0a, 0xff, 0x01, 0xb0, 0x08, 0x00, 0x01, 0x01, 0x0a, 0x11, - 0xbc, 0x00, - - /* 65 */ - 0xb6, 0x00, 0x01, 0x01, 0x02, 0x55, 0x01, 0x00, 0x01, 0x04, 0x01, 0x55, - 0x01, 0x52, 0x0d, 0x00, 0x01, 0x05, 0x02, 0xff, 0x01, 0x00, 0x01, 0x0d, - 0x01, 0xff, 0x01, 0xf7, 0x0d, 0x00, 0x01, 0x05, 0x02, 0xff, 0x01, 0x00, - 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf7, 0x0d, 0x00, 0x01, 0x05, 0x02, 0xff, - 0x01, 0x00, 0x01, 0x0d, 0x01, 0xff, 0x01, 0xf7, 0x0d, 0x00, 0x01, 0x04, - 0x02, 0xee, 0x01, 0x00, 0x01, 0x0c, 0x01, 0xee, 0x01, 0xe6, 0x4a, 0x00, - 0x01, 0x17, 0x01, 0xbe, 0x01, 0xff, 0x01, 0xdb, 0x01, 0x60, 0x0e, 0x00, - 0x01, 0x07, 0x04, 0xff, 0x01, 0xfe, 0x01, 0x50, 0x0d, 0x00, 0x01, 0xbf, - 0x05, 0xff, 0x01, 0xf7, 0x0c, 0x00, 0x01, 0x0a, 0x02, 0xff, 0x01, 0x94, - 0x01, 0x23, 0x01, 0x6c, 0x02, 0xff, 0x01, 0x50, 0x0b, 0x00, 0x01, 0x6f, - 0x01, 0xff, 0x01, 0xd2, 0x03, 0x00, 0x01, 0x7f, 0x01, 0xff, 0x01, 0xd0, - 0x0b, 0x00, 0x01, 0xef, 0x01, 0xfe, 0x01, 0x10, 0x03, 0x00, 0x01, 0x07, - 0x01, 0xff, 0x01, 0xf6, 0x0a, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf6, - 0x05, 0x00, 0x01, 0xef, 0x01, 0xfb, 0x0a, 0x00, 0x01, 0x09, 0x01, 0xff, - 0x01, 0xf0, 0x05, 0x00, 0x01, 0x8f, 0x01, 0xff, 0x0a, 0x00, 0x01, 0x0d, - 0x01, 0xff, 0x01, 0xb0, 0x05, 0x00, 0x01, 0x4f, 0x01, 0xff, 0x01, 0x30, - 0x09, 0x00, 0x01, 0x0f, 0x01, 0xff, 0x01, 0xb5, 0x05, 0x55, 0x01, 0x7f, - 0x01, 0xff, 0x01, 0x50, 0x09, 0x00, 0x01, 0x1f, 0x09, 0xff, 0x01, 0x70, - 0x09, 0x00, 0x01, 0x2f, 0x09, 0xff, 0x01, 0x70, 0x09, 0x00, 0x01, 0x1f, - 0x01, 0xff, 0x01, 0xb7, 0x07, 0x77, 0x01, 0x40, 0x09, 0x00, 0x01, 0x0f, - 0x01, 0xff, 0x01, 0x80, 0x11, 0x00, 0x01, 0x0e, 0x01, 0xff, 0x01, 0xb0, - 0x11, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xe0, 0x05, 0x00, 0x01, 0x37, - 0x01, 0x77, 0x0a, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf5, 0x05, 0x00, - 0x01, 0xdf, 0x01, 0xfd, 0x0b, 0x00, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x10, - 0x03, 0x00, 0x01, 0x06, 0x01, 0xff, 0x01, 0xf8, 0x0b, 0x00, 0x01, 0x8f, - 0x01, 0xff, 0x01, 0xc1, 0x03, 0x00, 0x01, 0x5f, 0x01, 0xff, 0x01, 0xf1, - 0x0b, 0x00, 0x01, 0x0c, 0x02, 0xff, 0x01, 0x94, 0x01, 0x23, 0x01, 0x6b, - 0x02, 0xff, 0x01, 0x60, 0x0b, 0x00, 0x01, 0x01, 0x01, 0xcf, 0x05, 0xff, - 0x01, 0xf8, 0x0d, 0x00, 0x01, 0x19, 0x04, 0xff, 0x01, 0xfe, 0x01, 0x50, - 0x0e, 0x00, 0x01, 0x27, 0x01, 0xce, 0x01, 0xff, 0x01, 0xda, 0x01, 0x50, - 0xc0, 0x00, - - /* 48 */ - 0xff, 0x00, 0x56, 0x00, 0x01, 0x67, 0x01, 0x72, 0x01, 0x00, 0x01, 0x29, - 0x01, 0xdf, 0x01, 0xff, 0x01, 0xc7, 0x01, 0x10, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xf4, 0x01, 0x08, 0x04, 0xff, 0x01, 0xf6, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xf4, 0x01, 0xaf, 0x05, 0xff, 0x01, 0x80, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xfc, 0x01, 0xff, 0x01, 0xf9, 0x01, 0x42, 0x01, 0x37, 0x01, 0xdf, - 0x01, 0xff, 0x01, 0xf6, 0x0b, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xfe, - 0x01, 0x30, 0x02, 0x00, 0x01, 0x09, 0x01, 0xff, 0x01, 0xfe, 0x01, 0x10, - 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xf3, 0x04, 0x00, 0x01, 0xbf, - 0x01, 0xff, 0x01, 0x70, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0x90, - 0x04, 0x00, 0x01, 0x1f, 0x01, 0xff, 0x01, 0xd0, 0x0a, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x30, 0x04, 0x00, 0x01, 0x0a, 0x01, 0xff, 0x01, 0xf2, - 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfe, 0x05, 0x00, 0x01, 0x05, 0x01, 0xff, - 0x01, 0xf5, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfb, 0x05, 0x00, 0x01, 0x02, - 0x01, 0xff, 0x01, 0xf7, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfa, 0x06, 0x00, - 0x01, 0xff, 0x01, 0xf8, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x06, 0x00, - 0x01, 0xff, 0x01, 0xf9, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfa, 0x06, 0x00, - 0x01, 0xff, 0x01, 0xf9, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfb, 0x05, 0x00, - 0x01, 0x02, 0x01, 0xff, 0x01, 0xf8, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xfe, - 0x05, 0x00, 0x01, 0x05, 0x01, 0xff, 0x01, 0xf5, 0x0a, 0x00, 0x01, 0xef, - 0x01, 0xff, 0x01, 0x30, 0x04, 0x00, 0x01, 0x0b, 0x01, 0xff, 0x01, 0xf2, - 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xa0, 0x04, 0x00, 0x01, 0x2f, - 0x01, 0xff, 0x01, 0xd0, 0x0a, 0x00, 0x01, 0xef, 0x01, 0xff, 0x01, 0xf4, - 0x04, 0x00, 0x01, 0xcf, 0x01, 0xff, 0x01, 0x70, 0x0a, 0x00, 0x01, 0xef, - 0x02, 0xff, 0x01, 0x40, 0x02, 0x00, 0x01, 0x1b, 0x01, 0xff, 0x01, 0xfe, - 0x01, 0x10, 0x0a, 0x00, 0x01, 0xef, 0x02, 0xff, 0x01, 0xfb, 0x01, 0x64, - 0x01, 0x58, 0x01, 0xef, 0x01, 0xff, 0x01, 0xf5, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0xaf, 0x05, 0xff, 0x01, 0x70, 0x0b, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0x08, 0x04, 0xff, 0x01, 0xe4, 0x0c, 0x00, 0x01, 0xef, - 0x01, 0xf9, 0x01, 0x00, 0x01, 0x28, 0x01, 0xce, 0x01, 0xed, 0x01, 0xa5, - 0x0d, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, - 0x12, 0x00, 0x01, 0xef, 0x01, 0xf9, 0x12, 0x00, 0x01, 0xde, 0x01, 0xe8, - 0x25, 0x00, -}; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h deleted file mode 100644 index 669513404636..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extras/circular_progress.h +++ /dev/null @@ -1,105 +0,0 @@ -/*********************** - * circular_progress.h * - ***********************/ - -/**************************************************************************** - * Written By Marcio Teixeira 2019 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#pragma once - -/* This function draws a circular progress "ring" */ - -void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, char *text, uint32_t bgcolor, uint32_t fgcolor) { - using namespace FTDI; - - const float rim = 0.3; - const float a = percent/100.0*2.0*PI; - const float a1 = min(PI/2, a); - const float a2 = min(PI/2, a-a1); - const float a3 = min(PI/2, a-a1-a2); - const float a4 = min(PI/2, a-a1-a2-a3); - - const int ro = min(w,h) * 8; - const int rr = ro * rim; - const int cx = x * 16 + w * 8; - const int cy = y * 16 + h * 8; - - // Load a rim shape into stencil buffer - cmd.cmd(SAVE_CONTEXT()); - cmd.cmd(TAG_MASK(0)); - cmd.cmd(CLEAR(0,1,0)); - cmd.cmd(COLOR_MASK(0,0,0,0)); - cmd.cmd(STENCIL_OP(STENCIL_OP_KEEP, STENCIL_OP_INVERT)); - cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_ALWAYS, 255, 255)); - cmd.cmd(BEGIN(POINTS)); - cmd.cmd(POINT_SIZE(ro)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(POINT_SIZE(ro - rr)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(RESTORE_CONTEXT()); - - // Mask further drawing by stencil buffer - cmd.cmd(SAVE_CONTEXT()); - cmd.cmd(STENCIL_FUNC(STENCIL_FUNC_NOTEQUAL, 0, 255)); - - // Fill the background - cmd.cmd(COLOR_RGB(bgcolor)); - cmd.cmd(BEGIN(POINTS)); - cmd.cmd(POINT_SIZE(ro)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(COLOR_RGB(fgcolor)); - - // Paint upper-right quadrant - cmd.cmd(BEGIN(EDGE_STRIP_A)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(VERTEX2F(cx + ro*sin(a1) + 16,cy - ro*cos(a1) + 8)); - - // Paint lower-right quadrant - if (a > PI/2) { - cmd.cmd(BEGIN(EDGE_STRIP_R)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(VERTEX2F(cx + ro*cos(a2),cy + ro*sin(a2) + 16)); - } - - // Paint lower-left quadrant - if (a > PI) { - cmd.cmd(BEGIN(EDGE_STRIP_B)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(VERTEX2F(cx - ro*sin(a3) - 8,cy + ro*cos(a3))); - } - - // Paint upper-left quadrant - if (a > 1.5*PI) { - cmd.cmd(BEGIN(EDGE_STRIP_L)); - cmd.cmd(VERTEX2F(cx, cy)); - cmd.cmd(VERTEX2F(cx - ro*cos(a4),cy - ro*sin(a4))); - } - cmd.cmd(RESTORE_CONTEXT()); - - // Draw the text - - cmd.cmd(SAVE_CONTEXT()); - cmd.cmd(COLOR_RGB(fgcolor)); - cmd.text(x,y,w,h,text, OPT_CENTERX | OPT_CENTERY); - cmd.cmd(RESTORE_CONTEXT()); -} - -void draw_circular_progress(CommandProcessor& cmd, int x, int y, int w, int h, float percent, uint32_t bgcolor, uint32_t fgcolor) { - char str[5]; - sprintf(str,"%d\%%",int(percent)); - draw_circular_progress(cmd, x, y, w, h, percent, str, bgcolor, fgcolor); -} diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp deleted file mode 100644 index fc9b5d0a702a..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/********************* - * marlin_events.cpp * - *********************/ - -/**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#include "compat.h" - -#if ENABLED(TOUCH_UI_FTDI_EVE) - -#include "screens/screens.h" - -namespace ExtUI { - using namespace Theme; - using namespace FTDI; - - void onStartup() { - EventLoop::setup(); - } - - void onIdle() { - EventLoop::loop(); - } - - void onPrinterKilled(PGM_P const error, PGM_P const component) { - char str[strlen_P(error) + strlen_P(component) + 3]; - sprintf_P(str, PSTR(S_FMT ": " S_FMT), error, component); - KillScreen::show(str); - } - - void onMediaInserted() { - if (AT_SCREEN(StatusScreen)) - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_MEDIA_INSERTED)); - sound.play(media_inserted, PLAY_ASYNCHRONOUS); - } - - void onMediaRemoved() { - if (isPrintingFromMedia()) { - stopPrint(); - InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED); - } - else - sound.play(media_removed, PLAY_ASYNCHRONOUS); - - if (AT_SCREEN(StatusScreen) || isPrintingFromMedia()) - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED)); - - #if ENABLED(SDSUPPORT) - if (AT_SCREEN(FilesScreen)) GOTO_SCREEN(StatusScreen); - #endif - } - - void onMediaError() { - sound.play(sad_trombone, PLAY_ASYNCHRONOUS); - AlertDialogBox::showError(F("Unable to read media.")); - } - - void onStatusChanged(const char* lcd_msg) { - StatusScreen::setStatusMessage(lcd_msg); - } - - void onStatusChanged(progmem_str lcd_msg) { - StatusScreen::setStatusMessage(lcd_msg); - } - - void onPrintTimerStarted() { - InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_STARTED); - } - - void onPrintTimerStopped() { - InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FINISHED); - } - - void onPrintTimerPaused() {} - - void onPrintFinished() {} - - void onFilamentRunout(const extruder_t extruder) { - char lcd_msg[30]; - sprintf_P(lcd_msg, PSTR("Extruder %d Filament Error"), extruder + 1); - StatusScreen::setStatusMessage(lcd_msg); - InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED, FTDI::PLAY_SYNCHRONOUS); - } - - void onHomingStart() {} - void onHomingComplete() {} - - void onFactoryReset() { - InterfaceSettingsScreen::defaultSettings(); - } - - void onStoreSettings(char *buff) { - InterfaceSettingsScreen::saveSettings(buff); - } - - void onLoadSettings(const char *buff) { - InterfaceSettingsScreen::loadSettings(buff); - } - - void onConfigurationStoreWritten(bool success) { - #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE - if (success && InterfaceSettingsScreen::backupEEPROM()) { - SERIAL_ECHOLNPGM("Made backup of EEPROM to SPI Flash"); - } - #else - UNUSED(success); - #endif - } - - void onConfigurationStoreRead(bool) { - } - - void onPlayTone(const uint16_t frequency, const uint16_t duration) { - sound.play_tone(frequency, duration); - } - - void onUserConfirmRequired(const char * const msg) { - if (msg) - ConfirmUserRequestAlertBox::show(msg); - else - ConfirmUserRequestAlertBox::hide(); - } - - #if HAS_LEVELING && HAS_MESH - void onMeshLevelingStart() {} - - void onMeshUpdate(const int8_t x, const int8_t y, const float val) { - BedMeshScreen::onMeshUpdate(x, y, val); - } - - void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) { - BedMeshScreen::onMeshUpdate(x, y, state); - } - #endif - - #if ENABLED(POWER_LOSS_RECOVERY) - void onPowerLossResume() { - // Called on resume from power-loss - } - #endif - - #if HAS_PID_HEATING - void onPidTuning(const result_t rst) { - // Called for temperature PID tuning result - //SERIAL_ECHOLNPAIR("OnPidTuning:", rst); - switch (rst) { - case PID_BAD_EXTRUDER_NUM: - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_BAD_EXTRUDER_NUM)); - break; - case PID_TEMP_TOO_HIGH: - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_TEMP_TOO_HIGH)); - break; - case PID_TUNING_TIMEOUT: - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_TIMEOUT)); - break; - case PID_DONE: - StatusScreen::setStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE_DONE)); - break; - } - GOTO_SCREEN(StatusScreen); - } - #endif // HAS_PID_HEATING - - void onSteppersDisabled() {} - void onSteppersEnabled() {} -} - -#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp deleted file mode 100644 index 36dc3404b90d..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_load_chocolate.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/************************************ - * cocoa_press_unload_cartridge.cpp * - ************************************/ - -/**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2020 - Cocoa Press * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#include "../config.h" - -#if ENABLED(TOUCH_UI_FTDI_EVE) && ENABLED(TOUCH_UI_COCOA_PRESS) - -#include "screens.h" -#include "screen_data.h" - -using namespace ExtUI; -using namespace FTDI; -using namespace Theme; - -#define GRID_COLS 2 -#define GRID_ROWS 6 - -#define TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1) -#define DESCRIPTION_POS BTN_POS(1,2), BTN_SIZE(2,3) -#define CARTRIDGE_OUT_BTN_POS BTN_POS(1,5), BTN_SIZE(1,1) -#define CARTRIDGE_IN_BTN_POS BTN_POS(2,5), BTN_SIZE(1,1) -#define BACK_BTN_POS BTN_POS(1,6), BTN_SIZE(2,1) - -void LoadChocolateScreen::onRedraw(draw_mode_t what) { - CommandProcessor cmd; - - if (what & BACKGROUND) { - cmd.cmd(CLEAR_COLOR_RGB(bg_color)) - .cmd(CLEAR(true,true,true)) - .cmd(COLOR_RGB(bg_text_enabled)) - .tag(0) - .font(font_large) - .text(TITLE_POS, GET_TEXT_F(MSG_LOAD_CHOCOLATE)); - draw_text_box(cmd, DESCRIPTION_POS, F( - "Drop your chocolate refill into the cartridge. " - "Press and hold the Cartridge Out button until " - "the plunger adapter is visible at the bottom of " - "the extruder. Securely attach a red plunger to " - "the plunger adapter and load the cartridge onto " - "the plunger. Press and hold Cartridge In button " - "until cartridge is fully loaded into the extruder, " - "and use the buttons to help follow the locking path " - "to lock"), - OPT_CENTERY, font_medium); - } - - if (what & FOREGROUND) { - cmd.font(font_medium) - .colors(normal_btn) - .tag(2).button(CARTRIDGE_OUT_BTN_POS, GET_TEXT_F(MSG_CARTRIDGE_OUT)) - .tag(3).button(CARTRIDGE_IN_BTN_POS, GET_TEXT_F(MSG_CARTRIDGE_IN)) - .colors(action_btn) - .tag(1).button(BACK_BTN_POS, GET_TEXT_F(MSG_BACK)); - } -} - -bool LoadChocolateScreen::onTouchEnd(uint8_t tag) { - using namespace ExtUI; - switch (tag) { - case 1: GOTO_PREVIOUS(); break; - } - return true; -} - -bool LoadChocolateScreen::onTouchHeld(uint8_t tag) { - if (ExtUI::isMoving()) return false; // Don't allow moves to accumulate - constexpr float increment = 0.25; - MoveAxisScreen::setManualFeedrate(E0, increment); - #define UI_INCREMENT_AXIS(axis) UI_INCREMENT(AxisPosition_mm, axis); - #define UI_DECREMENT_AXIS(axis) UI_DECREMENT(AxisPosition_mm, axis); - switch (tag) { - case 2: UI_DECREMENT_AXIS(E0); break; - case 3: UI_INCREMENT_AXIS(E0); break; - default: return false; - } - #undef UI_DECREMENT_AXIS - #undef UI_INCREMENT_AXIS - return false; -} - -#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_unload_cartridge.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_unload_cartridge.cpp deleted file mode 100644 index 2e7109337026..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/cocoa_press_unload_cartridge.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/************************************ - * cocoa_press_unload_cartridge.cpp * - ************************************/ - -/**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2020 - Cocoa Press * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#include "../config.h" - -#if ENABLED(TOUCH_UI_FTDI_EVE) && ENABLED(TOUCH_UI_COCOA_PRESS) - -#include "screens.h" -#include "screen_data.h" - -using namespace ExtUI; -using namespace FTDI; -using namespace Theme; - -#define GRID_COLS 2 -#define GRID_ROWS 6 - -#define TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1) -#define DESCRIPTION_POS BTN_POS(1,2), BTN_SIZE(2,3) -#define CARTRIDGE_OUT_BTN_POS BTN_POS(1,5), BTN_SIZE(1,1) -#define CARTRIDGE_IN_BTN_POS BTN_POS(2,5), BTN_SIZE(1,1) -#define BACK_BTN_POS BTN_POS(1,6), BTN_SIZE(2,1) - -void UnloadCartridgeScreen::onRedraw(draw_mode_t what) { - CommandProcessor cmd; - - if (what & BACKGROUND) { - cmd.cmd(CLEAR_COLOR_RGB(bg_color)) - .cmd(CLEAR(true,true,true)) - .cmd(COLOR_RGB(bg_text_enabled)) - .tag(0) - .font(font_large) - .text(TITLE_POS, GET_TEXT_F(MSG_UNLOAD_CARTRIDGE)); - draw_text_box(cmd, DESCRIPTION_POS, F( - "Press and hold the buttons below to help " - "you unlock the cartridge. After unlocking, " - "press and hold the Cartridge Out button " - "until the cartridge is sticking out of the " - "extruder enough to grip and remove. After " - "removing the cartridge, continue holding the " - "Cartridge Out button until the plunger adapter is " - "visible at the bottom of the extruder." - ), - OPT_CENTERY, font_medium); - } - - if (what & FOREGROUND) { - cmd.font(font_medium) - .colors(normal_btn) - .tag(2).button(CARTRIDGE_OUT_BTN_POS, GET_TEXT_F(MSG_CARTRIDGE_OUT)) - .tag(3).button(CARTRIDGE_IN_BTN_POS, GET_TEXT_F(MSG_CARTRIDGE_IN)) - .colors(action_btn) - .tag(1).button(BACK_BTN_POS, GET_TEXT_F(MSG_BACK)); - } -} - -bool UnloadCartridgeScreen::onTouchEnd(uint8_t tag) { - using namespace ExtUI; - switch (tag) { - case 1: GOTO_PREVIOUS(); break; - } - return true; -} - -bool UnloadCartridgeScreen::onTouchHeld(uint8_t tag) { - if (ExtUI::isMoving()) return false; // Don't allow moves to accumulate - constexpr float increment = 0.25; - MoveAxisScreen::setManualFeedrate(E0, increment); - #define UI_INCREMENT_AXIS(axis) UI_INCREMENT(AxisPosition_mm, axis); - #define UI_DECREMENT_AXIS(axis) UI_DECREMENT(AxisPosition_mm, axis); - switch (tag) { - case 2: UI_DECREMENT_AXIS(E0); break; - case 3: UI_INCREMENT_AXIS(E0); break; - default: return false; - } - #undef UI_DECREMENT_AXIS - #undef UI_INCREMENT_AXIS - return false; -} - -#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp deleted file mode 100644 index cadc58226708..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/******************** - * files_screen.cpp * - ********************/ - -/**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#include "../config.h" - -#if BOTH(TOUCH_UI_FTDI_EVE, SDSUPPORT) - -#include "screens.h" -#include "screen_data.h" - -using namespace FTDI; -using namespace ExtUI; -using namespace Theme; - -void FilesScreen::onEntry() { - screen_data.Files.cur_page = 0; - screen_data.Files.selected_tag = 0xFF; - #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) - CLCD::mem_write_32(CLCD::REG::MACRO_0,DL::NOP); - #endif - gotoPage(0); - BaseScreen::onEntry(); -} - -const char *FilesScreen::getSelectedFilename(bool longName) { - FileList files; - files.seek(getSelectedFileIndex(), true); - return longName ? files.longFilename() : files.shortFilename(); -} - -void FilesScreen::drawSelectedFile() { - FileList files; - files.seek(getSelectedFileIndex(), true); - screen_data.Files.flags.is_dir = files.isDir(); - drawFileButton( - files.filename(), - screen_data.Files.selected_tag, - screen_data.Files.flags.is_dir, - true - ); -} - -uint16_t FilesScreen::getSelectedFileIndex() { - return getFileForTag(screen_data.Files.selected_tag); -} - -uint16_t FilesScreen::getFileForTag(uint8_t tag) { - return screen_data.Files.cur_page * files_per_page + tag - 2; -} - -#if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_COLS 6 - #define GRID_ROWS (files_per_page + header_h + footer_h) -#else - #define GRID_COLS 6 - #define GRID_ROWS (files_per_page + header_h + footer_h) -#endif - -void FilesScreen::drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted) { - const uint8_t line = getLineForTag(tag)+1; - CommandProcessor cmd; - cmd.tag(tag); - cmd.cmd(COLOR_RGB(is_highlighted ? fg_action : bg_color)); - cmd.font(font_medium) - .rectangle( 0, BTN_Y(header_h+line), display_width, BTN_H(1)); - cmd.cmd(COLOR_RGB(is_highlighted ? normal_btn.rgb : bg_text_enabled)); - constexpr uint16_t dim[2] = {BTN_SIZE(6,1)}; - #define POS_AND_SHORTEN(SHORTEN) BTN_POS(1,header_h+line), dim[0] - (SHORTEN), dim[1] - #define POS_AND_SIZE POS_AND_SHORTEN(0) - #if ENABLED(SCROLL_LONG_FILENAMES) - if (is_highlighted) { - cmd.cmd(SAVE_CONTEXT()); - cmd.cmd(MACRO(0)); - cmd.text(POS_AND_SIZE, filename, OPT_CENTERY | OPT_NOFIT); - } else - #endif - draw_text_with_ellipsis(cmd, POS_AND_SHORTEN(is_dir ? 20 : 0), filename, OPT_CENTERY, font_medium); - if (is_dir && !is_highlighted) { - cmd.text(POS_AND_SIZE, F("> "), OPT_CENTERY | OPT_RIGHTX); - } - #if ENABLED(SCROLL_LONG_FILENAMES) - if (is_highlighted) { - cmd.cmd(RESTORE_CONTEXT()); - } - #endif -} - -void FilesScreen::drawFileList() { - FileList files; - screen_data.Files.num_page = max(1,ceil(float(files.count()) / files_per_page)); - screen_data.Files.cur_page = min(screen_data.Files.cur_page, screen_data.Files.num_page-1); - screen_data.Files.flags.is_root = files.isAtRootDir(); - - #undef MARGIN_T - #undef MARGIN_B - #define MARGIN_T 0 - #define MARGIN_B 0 - uint16_t fileIndex = screen_data.Files.cur_page * files_per_page; - for (uint8_t i = 0; i < files_per_page; i++, fileIndex++) { - if (files.seek(fileIndex)) { - drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false); - } - else { - break; - } - } -} - -void FilesScreen::drawHeader() { - const bool prev_enabled = screen_data.Files.cur_page > 0; - const bool next_enabled = screen_data.Files.cur_page < (screen_data.Files.num_page - 1); - - #undef MARGIN_T - #undef MARGIN_B - #define MARGIN_T 0 - #define MARGIN_B 2 - - char str[16]; - sprintf_P(str, PSTR("Page %d of %d"), - screen_data.Files.cur_page + 1, screen_data.Files.num_page); - - CommandProcessor cmd; - cmd.colors(normal_btn) - .font(font_small) - .tag(0).button(BTN_POS(2,1), BTN_SIZE(4,header_h), str, OPT_CENTER | OPT_FLAT) - .font(font_medium) - .colors(action_btn) - .tag(241).enabled(prev_enabled).button(BTN_POS(1,1), BTN_SIZE(1,header_h), F("<")) - .tag(242).enabled(next_enabled).button(BTN_POS(6,1), BTN_SIZE(1,header_h), F(">")); -} - -void FilesScreen::drawFooter() { - #undef MARGIN_T - #undef MARGIN_B - #if ENABLED(TOUCH_UI_PORTRAIT) - #define MARGIN_T 15 - #define MARGIN_B 5 - #else - #define MARGIN_T 5 - #define MARGIN_B 5 - #endif - const bool has_selection = screen_data.Files.selected_tag != 0xFF; - const uint8_t back_tag = screen_data.Files.flags.is_root ? 240 : 245; - const uint8_t y = GRID_ROWS - footer_h + 1; - const uint8_t h = footer_h; - - CommandProcessor cmd; - cmd.colors(normal_btn) - .font(font_medium) - .colors(has_selection ? normal_btn : action_btn) - .tag(back_tag).button(BTN_POS(4,y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BACK)) - .enabled(has_selection) - .colors(has_selection ? action_btn : normal_btn); - - if (screen_data.Files.flags.is_dir) - cmd.tag(244).button(BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_OPEN)); - else - cmd.tag(243).button(BTN_POS(1, y), BTN_SIZE(3,h), GET_TEXT_F(MSG_BUTTON_PRINT)); -} - -void FilesScreen::onRedraw(draw_mode_t what) { - if (what & FOREGROUND) { - drawHeader(); - drawSelectedFile(); - drawFooter(); - } -} - -void FilesScreen::gotoPage(uint8_t page) { - screen_data.Files.selected_tag = 0xFF; - screen_data.Files.cur_page = page; - CommandProcessor cmd; - cmd.cmd(CMD_DLSTART) - .cmd(CLEAR_COLOR_RGB(bg_color)) - .cmd(CLEAR(true,true,true)) - .colors(normal_btn); - drawFileList(); - storeBackground(); -} - -bool FilesScreen::onTouchEnd(uint8_t tag) { - switch (tag) { - case 240: GOTO_PREVIOUS(); return true; - case 241: - if (screen_data.Files.cur_page > 0) { - gotoPage(screen_data.Files.cur_page-1); - } - break; - case 242: - if (screen_data.Files.cur_page < (screen_data.Files.num_page-1)) { - gotoPage(screen_data.Files.cur_page+1); - } - break; - case 243: - ConfirmStartPrintDialogBox::show(getSelectedFileIndex()); - return true; - case 244: - { - FileList files; - files.changeDir(getSelectedShortFilename()); - gotoPage(0); - } - break; - case 245: - { - FileList files; - files.upDir(); - gotoPage(0); - } - break; - default: - if (tag < 240) { - screen_data.Files.selected_tag = tag; - #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) - if (FTDI::ftdi_chip >= 810) { - const char *longFilename = getSelectedLongFilename(); - if (longFilename[0]) { - CommandProcessor cmd; - uint16_t text_width = cmd.font(font_medium).text_width(longFilename); - screen_data.Files.scroll_pos = 0; - if (text_width > display_width) - screen_data.Files.scroll_max = text_width - display_width + MARGIN_L + MARGIN_R; - else - screen_data.Files.scroll_max = 0; - } - } - #endif - } - break; - } - return true; -} - -void FilesScreen::onIdle() { - #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) - if (FTDI::ftdi_chip >= 810) { - CLCD::mem_write_32(CLCD::REG::MACRO_0, - VERTEX_TRANSLATE_X(-int32_t(screen_data.Files.scroll_pos))); - if (screen_data.Files.scroll_pos < screen_data.Files.scroll_max * 16) - screen_data.Files.scroll_pos++; - } - #endif -} - -#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/leveling_menu.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/leveling_menu.cpp deleted file mode 100644 index 8d372309bdc9..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/leveling_menu.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/********************* - * leveling_menu.cpp * - *********************/ - -/**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#include "../config.h" - -#if BOTH(TOUCH_UI_FTDI_EVE,HAS_LEVELING) - -#include "screens.h" - -#if BOTH(HAS_BED_PROBE,BLTOUCH) - #include "../../../../../feature/bltouch.h" -#endif - -using namespace FTDI; -using namespace ExtUI; -using namespace Theme; - -#if ENABLED(TOUCH_UI_PORTRAIT) - #define GRID_ROWS 9 - #define GRID_COLS 2 - #define TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1) - #define LEVEL_AXIS_POS BTN_POS(1,2), BTN_SIZE(2,1) - #define LEVEL_BED_POS BTN_POS(1,3), BTN_SIZE(2,1) - #define SHOW_MESH_POS BTN_POS(1,4), BTN_SIZE(2,1) - #define BLTOUCH_TITLE_POS BTN_POS(1,6), BTN_SIZE(2,1) - #define BLTOUCH_RESET_POS BTN_POS(1,7), BTN_SIZE(1,1) - #define BLTOUCH_TEST_POS BTN_POS(2,7), BTN_SIZE(1,1) - #define BACK_POS BTN_POS(1,9), BTN_SIZE(2,1) -#else - #define GRID_ROWS 7 - #define GRID_COLS 2 - #define TITLE_POS BTN_POS(1,1), BTN_SIZE(2,1) - #define LEVEL_AXIS_POS BTN_POS(1,2), BTN_SIZE(2,1) - #define LEVEL_BED_POS BTN_POS(1,3), BTN_SIZE(2,1) - #define SHOW_MESH_POS BTN_POS(1,4), BTN_SIZE(2,1) - #define BLTOUCH_TITLE_POS BTN_POS(1,5), BTN_SIZE(2,1) - #define BLTOUCH_RESET_POS BTN_POS(1,6), BTN_SIZE(1,1) - #define BLTOUCH_TEST_POS BTN_POS(2,6), BTN_SIZE(1,1) - #define BACK_POS BTN_POS(1,7), BTN_SIZE(2,1) -#endif - -void LevelingMenu::onRedraw(draw_mode_t what) { - if (what & BACKGROUND) { - CommandProcessor cmd; - cmd.cmd(CLEAR_COLOR_RGB(Theme::bg_color)) - .cmd(CLEAR(true,true,true)) - .tag(0); - } - - if (what & FOREGROUND) { - CommandProcessor cmd; - cmd.font(font_large) - .cmd(COLOR_RGB(bg_text_enabled)) - .text(TITLE_POS, GET_TEXT_F(MSG_LEVELING)) - #if ENABLED(BLTOUCH) - .text(BLTOUCH_TITLE_POS, GET_TEXT_F(MSG_BLTOUCH)) - #endif - .font(font_medium).colors(normal_btn) - #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) - .tag(2).button(LEVEL_AXIS_POS, GET_TEXT_F(MSG_AUTOLEVEL_X_AXIS)) - #endif - .tag(3).button(LEVEL_BED_POS, GET_TEXT_F(MSG_LEVEL_BED)) - .enabled(ENABLED(HAS_MESH)) - .tag(4).button(SHOW_MESH_POS, GET_TEXT_F(MSG_SHOW_MESH)) - #if ENABLED(BLTOUCH) - .tag(5).button(BLTOUCH_RESET_POS, GET_TEXT_F(MSG_BLTOUCH_RESET)) - .tag(6).button(BLTOUCH_TEST_POS, GET_TEXT_F(MSG_BLTOUCH_SELFTEST)) - #endif - .colors(action_btn) - .tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK)); - } -} - -bool LevelingMenu::onTouchEnd(uint8_t tag) { - switch (tag) { - case 1: GOTO_PREVIOUS(); break; - #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) - case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break; - #endif - case 3: - #ifndef BED_LEVELING_COMMANDS - #define BED_LEVELING_COMMANDS "G29" - #endif - #if ENABLED(AUTO_BED_LEVELING_UBL) - BedMeshScreen::startMeshProbe(); - #else - SpinnerDialogBox::enqueueAndWait_P(F(BED_LEVELING_COMMANDS)); - #endif - break; - #if ENABLED(AUTO_BED_LEVELING_UBL) - case 4: GOTO_SCREEN(BedMeshScreen); break; - #endif - #if ENABLED(BLTOUCH) - case 5: injectCommands_P(PSTR("M280 P0 S60")); break; - case 6: SpinnerDialogBox::enqueueAndWait_P(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; - #endif - default: return false; - } - return true; -} - -#endif // TOUCH_UI_FTDI_EVE && HAS_LEVELING diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screen_data.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screen_data.h deleted file mode 100644 index fe35fc457b48..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screen_data.h +++ /dev/null @@ -1,97 +0,0 @@ -/***************** - * screen_data.h * - *****************/ - -/**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#pragma once - -#include "../ftdi_eve_lib/ftdi_eve_lib.h" - -// To save RAM, store state information related to a particular screen -// in a union. The values should be initialized in the onEntry method. - -struct base_numeric_adjustment_t {uint8_t increment;}; - -union screen_data_t { - struct base_numeric_adjustment_t BaseNumericAdjustment; - struct {uint8_t volume; uint8_t brightness;} InterfaceSettings; - struct {char passcode[5];} Lock; - struct {bool isError;} AlertDialog; - struct {bool auto_hide;} SpinnerDialog; - struct {uint8_t file_index;} ConfirmStartPrintDialog; - struct { - uint8_t e_tag, t_tag, repeat_tag; - ExtUI::extruder_t saved_extruder; - #if FILAMENT_UNLOAD_PURGE_LENGTH > 0 - bool need_purge; - #endif - } ChangeFilament; - struct { - struct { - uint8_t is_dir : 1; - uint8_t is_root : 1; - } flags; - uint8_t selected_tag; - uint8_t num_page; - uint8_t cur_page; - #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810) - uint16_t scroll_pos; - uint16_t scroll_max; - #endif - } Files; - struct { - struct base_numeric_adjustment_t placeholder; - float e_rel[ExtUI::extruderCount]; - } MoveAxis; - #if HAS_MESH - struct { - enum : uint8_t { - MSG_NONE, - MSG_MESH_COMPLETE, - MSG_MESH_INCOMPLETE - } message; - uint8_t count; - uint8_t highlightedTag; - } BedMesh; - #endif - #if ENABLED(TOUCH_UI_DEVELOPER_MENU) - struct { - uint32_t next_watchdog_trigger; - const char* message; - } StressTest; - #endif - #if ENABLED(TOUCH_UI_COCOA_PRESS) - struct { - uint32_t start_ms; - } PreheatTimer; - #endif - #if ENABLED(BABYSTEPPING) - struct { - struct base_numeric_adjustment_t placeholder; - xyz_int_t rel; - #if HAS_MULTI_EXTRUDER - bool link_nozzles; - #endif - bool show_offsets; - } NudgeNozzle; - #endif -}; - -extern screen_data_t screen_data; diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp deleted file mode 100644 index 5841c38f53eb..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.cpp +++ /dev/null @@ -1,139 +0,0 @@ -/*************** - * screens.cpp * - ***************/ - -/**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#include "../config.h" - -#if ENABLED(TOUCH_UI_FTDI_EVE) -#include "screens.h" -#include "screen_data.h" - -tiny_timer_t refresh_timer; -screen_data_t screen_data; - -SCREEN_TABLE { - DECL_SCREEN(BootScreen), - #if NUM_LANGUAGES > 1 - DECL_SCREEN(LanguageMenu), - #endif - DECL_SCREEN(TouchCalibrationScreen), - DECL_SCREEN(StatusScreen), - DECL_SCREEN(MainMenu), - DECL_SCREEN(TuneMenu), - DECL_SCREEN(AdvancedSettingsMenu), - DECL_SCREEN(AlertDialogBox), - DECL_SCREEN(ConfirmUserRequestAlertBox), - DECL_SCREEN(RestoreFailsafeDialogBox), - DECL_SCREEN(SaveSettingsDialogBox), - DECL_SCREEN(ConfirmStartPrintDialogBox), - DECL_SCREEN(ConfirmAbortPrintDialogBox), - #if ENABLED(CALIBRATION_GCODE) - DECL_SCREEN(ConfirmAutoCalibrationDialogBox), - #endif - #if ENABLED(CUSTOM_USER_MENUS) - DECL_SCREEN(CustomUserMenus), - #endif - DECL_SCREEN(SpinnerDialogBox), - DECL_SCREEN(AboutScreen), - #if ENABLED(PRINTCOUNTER) - DECL_SCREEN(StatisticsScreen), - #endif - #if ENABLED(BABYSTEPPING) - DECL_SCREEN(NudgeNozzleScreen), - #endif - DECL_SCREEN(MoveAxisScreen), - DECL_SCREEN(StepsScreen), - #if HAS_TRINAMIC_CONFIG - DECL_SCREEN(StepperCurrentScreen), - DECL_SCREEN(StepperBumpSensitivityScreen), - #endif - #if HAS_LEVELING - DECL_SCREEN(LevelingMenu), - #if HAS_BED_PROBE - DECL_SCREEN(ZOffsetScreen), - #endif - #if HAS_MESH - DECL_SCREEN(BedMeshScreen), - #endif - #endif - #if HAS_MULTI_HOTEND - DECL_SCREEN(NozzleOffsetScreen), - #endif - #if ENABLED(BACKLASH_GCODE) - DECL_SCREEN(BacklashCompensationScreen), - #endif - DECL_SCREEN(FeedratePercentScreen), - DECL_SCREEN(MaxVelocityScreen), - DECL_SCREEN(MaxAccelerationScreen), - DECL_SCREEN(DefaultAccelerationScreen), - #if HAS_JUNCTION_DEVIATION - DECL_SCREEN(JunctionDeviationScreen), - #else - DECL_SCREEN(JerkScreen), - #endif - #if ENABLED(CASE_LIGHT_ENABLE) - DECL_SCREEN(CaseLightScreen), - #endif - #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) - DECL_SCREEN(FilamentMenu), - #endif - #if ENABLED(FILAMENT_RUNOUT_SENSOR) - DECL_SCREEN(FilamentRunoutScreen), - #endif - #if ENABLED(LIN_ADVANCE) - DECL_SCREEN(LinearAdvanceScreen), - #endif - DECL_SCREEN(TemperatureScreen), - DECL_SCREEN(ChangeFilamentScreen), - DECL_SCREEN(InterfaceSettingsScreen), - DECL_SCREEN(InterfaceSoundsScreen), - DECL_SCREEN(LockScreen), - #if ENABLED(SDSUPPORT) - DECL_SCREEN(FilesScreen), - #endif - DECL_SCREEN(EndstopStatesScreen), - #if ENABLED(TOUCH_UI_LULZBOT_BIO) - DECL_SCREEN(BioPrintingDialogBox), - DECL_SCREEN(BioConfirmHomeXYZ), - DECL_SCREEN(BioConfirmHomeE), - #endif - #if ENABLED(TOUCH_UI_COCOA_PRESS) - DECL_SCREEN(PreheatMenu), - DECL_SCREEN(PreheatTimerScreen), - DECL_SCREEN(UnloadCartridgeScreen), - DECL_SCREEN(LoadChocolateScreen), - DECL_SCREEN(MoveXYZScreen), - DECL_SCREEN(MoveEScreen), - #endif - #if ENABLED(TOUCH_UI_DEVELOPER_MENU) - DECL_SCREEN(DeveloperMenu), - DECL_SCREEN(ConfirmEraseFlashDialogBox), - DECL_SCREEN(WidgetsScreen), - DECL_SCREEN(TouchRegistersScreen), - DECL_SCREEN(StressTestScreen), - #endif - DECL_SCREEN(MediaPlayerScreen), - DECL_SCREEN(DisplayTuningScreen) -}; - -SCREEN_TABLE_POST - -#endif // TOUCH_UI_FTDI_EVE diff --git a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h b/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h deleted file mode 100644 index 51fc76f15b46..000000000000 --- a/Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/screens.h +++ /dev/null @@ -1,911 +0,0 @@ -/************* - * screens.h * - *************/ - -/**************************************************************************** - * Written By Mark Pelletier 2017 - Aleph Objects, Inc. * - * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 3 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * To view a copy of the GNU General Public License, go to the following * - * location: . * - ****************************************************************************/ - -#pragma once - -#include "../ftdi_eve_lib/ftdi_eve_lib.h" -#include "../language/language.h" -#include "../theme/theme.h" -#include "string_format.h" - -#ifndef BED_LEVELING_COMMANDS - #define BED_LEVELING_COMMANDS "G29" -#endif - -extern tiny_timer_t refresh_timer; - -/********************************* DL CACHE SLOTS ******************************/ - -// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This -// is done using the CLCD::DLCache class, which takes a unique ID for each -// cache location. These IDs are defined here: - -enum { - STATUS_SCREEN_CACHE, - MENU_SCREEN_CACHE, - TUNE_SCREEN_CACHE, - ALERT_BOX_CACHE, - SPINNER_CACHE, - ADVANCED_SETTINGS_SCREEN_CACHE, - MOVE_AXIS_SCREEN_CACHE, - TEMPERATURE_SCREEN_CACHE, - STEPS_SCREEN_CACHE, - MAX_FEEDRATE_SCREEN_CACHE, - MAX_VELOCITY_SCREEN_CACHE, - MAX_ACCELERATION_SCREEN_CACHE, - DEFAULT_ACCELERATION_SCREEN_CACHE, - #if HAS_LEVELING - LEVELING_SCREEN_CACHE, - #if HAS_BED_PROBE - ZOFFSET_SCREEN_CACHE, - #endif - #if HAS_MESH - BED_MESH_SCREEN_CACHE, - #endif - #endif - #if ENABLED(BABYSTEPPING) - ADJUST_OFFSETS_SCREEN_CACHE, - #endif - #if HAS_TRINAMIC_CONFIG - STEPPER_CURRENT_SCREEN_CACHE, - STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE, - #endif - #if HAS_MULTI_HOTEND - NOZZLE_OFFSET_SCREEN_CACHE, - #endif - #if ENABLED(BACKLASH_GCODE) - BACKLASH_COMPENSATION_SCREEN_CACHE, - #endif - #if HAS_JUNCTION_DEVIATION - JUNC_DEV_SCREEN_CACHE, - #else - JERK_SCREEN_CACHE, - #endif - #if ENABLED(CASE_LIGHT_ENABLE) - CASE_LIGHT_SCREEN_CACHE, - #endif - #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) - FILAMENT_MENU_CACHE, - #endif - #if ENABLED(LIN_ADVANCE) - LINEAR_ADVANCE_SCREEN_CACHE, - #endif - #if ENABLED(FILAMENT_RUNOUT_SENSOR) - FILAMENT_RUNOUT_SCREEN_CACHE, - #endif - #if ENABLED(TOUCH_UI_LULZBOT_BIO) - PRINTING_SCREEN_CACHE, - #endif - #if ENABLED(TOUCH_UI_COCOA_PRESS) - PREHEAT_MENU_CACHE, - PREHEAT_TIMER_SCREEN_CACHE, - UNLOAD_CARTRIDGE_SCREEN_CACHE, - LOAD_CHOCOLATE_SCREEN_CACHE, - MOVE_XYZ_SCREEN_CACHE, - MOVE_E_SCREEN_CACHE, - #endif - #if ENABLED(SDSUPPORT) - FILES_SCREEN_CACHE, - #endif - #if ENABLED(CUSTOM_USER_MENUS) - CUSTOM_USER_MENUS_SCREEN_CACHE, - #endif - CHANGE_FILAMENT_SCREEN_CACHE, - INTERFACE_SETTINGS_SCREEN_CACHE, - INTERFACE_SOUNDS_SCREEN_CACHE, - LOCK_SCREEN_CACHE, - DISPLAY_TIMINGS_SCREEN_CACHE -}; - -// To save MCU RAM, the status message is "baked" in to the status screen -// cache, so we reserve a large chunk of memory for the DL cache - -#define STATUS_SCREEN_DL_SIZE 4096 -#define ALERT_BOX_DL_SIZE 3072 -#define SPINNER_DL_SIZE 3072 -#define FILE_SCREEN_DL_SIZE 4160 -#define PRINTING_SCREEN_DL_SIZE 2048 - -/************************* MENU SCREEN DECLARATIONS *************************/ - -class BaseScreen : public UIScreen { - protected: - #if LCD_TIMEOUT_TO_STATUS > 0 - static uint32_t last_interaction; - #endif - - static bool buttonIsPressed(uint8_t tag); - - public: - static bool buttonStyleCallback(CommandProcessor &, uint8_t, uint8_t &, uint16_t &, bool); - - static void reset_menu_timeout(); - - static void onEntry(); - static void onIdle(); -}; - -class BootScreen : public BaseScreen, public UncachedScreen { - private: - static void showSplashScreen(); - public: - static void onRedraw(draw_mode_t); - static void onIdle(); -}; - -class AboutScreen : public BaseScreen, public UncachedScreen { - public: - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); -}; - -#if ENABLED(PRINTCOUNTER) - class StatisticsScreen : public BaseScreen, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; -#endif - -class KillScreen { - // The KillScreen is behaves differently than the - // others, so we do not bother extending UIScreen. - public: - static void show(const char*); -}; - -class DialogBoxBaseClass : public BaseScreen { - protected: - template static void drawMessage(const T, int16_t font = 0); - static void drawYesNoButtons(uint8_t default_btn = 0); - static void drawOkayButton(); - static void drawSpinner(); - static void drawButton(const progmem_str); - - static void onRedraw(draw_mode_t) {}; - public: - static bool onTouchEnd(uint8_t tag); - static void onIdle(); -}; - -class AlertDialogBox : public DialogBoxBaseClass, public CachedScreen { - public: - static void onEntry(); - static void onRedraw(draw_mode_t); - template static void show(T); - template static void showError(T); - static void hide(); -}; - -class RestoreFailsafeDialogBox : public DialogBoxBaseClass, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); -}; - -class SaveSettingsDialogBox : public DialogBoxBaseClass, public UncachedScreen { - private: - static bool needs_save; - - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - - static void promptToSaveSettings(); - static void settingsChanged() {needs_save = true;} -}; - -class ConfirmStartPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen { - private: - inline static const char *getShortFilename() {return getFilename(false);} - inline static const char *getLongFilename() {return getFilename(true);} - - static const char *getFilename(bool longName); - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t); - - static void show(uint8_t file_index); -}; - -class ConfirmAbortPrintDialogBox : public DialogBoxBaseClass, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); -}; - -#if ENABLED(CALIBRATION_GCODE) -class ConfirmAutoCalibrationDialogBox : public DialogBoxBaseClass, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); -}; -#endif - -class ConfirmUserRequestAlertBox : public AlertDialogBox { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t); - static void hide(); - static void show(const char*); -}; - -#if ENABLED(CUSTOM_USER_MENUS) - class CustomUserMenus : public BaseScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; -#endif - -class SpinnerDialogBox : public DialogBoxBaseClass, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static void onIdle(); - - static void show(const progmem_str); - static void hide(); - static void enqueueAndWait_P(const progmem_str commands); - static void enqueueAndWait_P(const progmem_str message, const progmem_str commands); -}; - -#if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS) -class StatusScreen : public BaseScreen, public CachedScreen { - private: - static void draw_axis_position(draw_mode_t); - static void draw_temperature(draw_mode_t); - static void draw_progress(draw_mode_t); - static void draw_interaction_buttons(draw_mode_t); - static void draw_status_message(draw_mode_t, const char * const); - static void _format_time(char *outstr, uint32_t time); - public: - static void loadBitmaps(); - static void setStatusMessage(const char *); - static void setStatusMessage(progmem_str); - static void onRedraw(draw_mode_t); - static void onStartup(); - static void onEntry(); - static void onIdle(); - static bool onTouchEnd(uint8_t tag); -}; -#else - class StatusScreen : public BaseScreen, public CachedScreen { - private: - static float increment; - static bool jog_xy; - static bool fine_motion; - - static void draw_progress(draw_mode_t what); - static void draw_temperature(draw_mode_t what); - static void draw_syringe(draw_mode_t what); - static void draw_arrows(draw_mode_t what); - static void draw_overlay_icons(draw_mode_t what); - static void draw_fine_motion(draw_mode_t what); - static void draw_buttons(draw_mode_t what); - public: - static void loadBitmaps(); - static void unlockMotors(); - - static void setStatusMessage(const char *); - static void setStatusMessage(progmem_str); - - static void onRedraw(draw_mode_t); - - static bool onTouchStart(uint8_t tag); - static bool onTouchHeld(uint8_t tag); - static bool onTouchEnd(uint8_t tag); - static void onIdle(); - - }; -#endif - -#if ENABLED(TOUCH_UI_LULZBOT_BIO) - class BioPrintingDialogBox : public BaseScreen, public CachedScreen { - private: - static void draw_status_message(draw_mode_t, const char * const); - static void draw_progress(draw_mode_t); - static void draw_time_remaining(draw_mode_t); - static void draw_interaction_buttons(draw_mode_t); - public: - static void onRedraw(draw_mode_t); - - static void show(); - - static void setStatusMessage(const char *); - static void setStatusMessage(progmem_str); - - static void onIdle(); - static bool onTouchEnd(uint8_t tag); - }; - - class BioConfirmHomeXYZ : public DialogBoxBaseClass, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; - - class BioConfirmHomeE : public DialogBoxBaseClass, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; -#endif - -class MainMenu : public BaseScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); -}; - -class TuneMenu : public BaseScreen, public CachedScreen { - private: - static void pausePrint(); - static void resumePrint(); - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); -}; - -class TouchCalibrationScreen : public BaseScreen, public UncachedScreen { - public: - static void onRefresh(); - static void onEntry(); - static void onRedraw(draw_mode_t); - static void onIdle(); -}; - -class TouchRegistersScreen : public BaseScreen, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); -}; - -class AdvancedSettingsMenu : public BaseScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); -}; - -class ChangeFilamentScreen : public BaseScreen, public CachedScreen { - private: - static uint8_t getSoftenTemp(); - static ExtUI::extruder_t getExtruder(); - static void drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h); - static uint32_t getTempColor(uint32_t temp); - static void doPurge(); - public: - static void onEntry(); - static void onExit(); - static void onRedraw(draw_mode_t); - static bool onTouchStart(uint8_t tag); - static bool onTouchEnd(uint8_t tag); - static bool onTouchHeld(uint8_t tag); - static void onIdle(); -}; - -class BaseNumericAdjustmentScreen : public BaseScreen { - public: - enum precision_default_t { - DEFAULT_LOWEST, - DEFAULT_MIDRANGE, - DEFAULT_HIGHEST - }; - - protected: - class widgets_t { - private: - draw_mode_t _what; - uint8_t _line; - uint32_t _color; - uint8_t _decimals; - progmem_str _units; - enum style_t { - BTN_NORMAL, - BTN_ACTION, - BTN_TOGGLE, - BTN_DISABLED, - TEXT_AREA, - TEXT_LABEL - } _style; - - protected: - void _draw_increment_btn(CommandProcessor &, uint8_t line, const uint8_t tag); - void _button(CommandProcessor &, uint8_t tag, int16_t x, int16_t y, int16_t w, int16_t h, progmem_str, bool enabled = true, bool highlight = false); - void _button_style(CommandProcessor &cmd, style_t style); - public: - widgets_t(draw_mode_t); - - widgets_t &color(uint32_t color) {_color = color; return *this;} - widgets_t &units(progmem_str units) {_units = units; return *this;} - widgets_t &draw_mode(draw_mode_t what) {_what = what; return *this;} - widgets_t &precision(uint8_t decimals, precision_default_t = DEFAULT_HIGHEST); - - void heading (progmem_str label); - void adjuster_sram_val (uint8_t tag, progmem_str label, const char *value, bool is_enabled = true); - void adjuster (uint8_t tag, progmem_str label, const char *value, bool is_enabled = true); - void adjuster (uint8_t tag, progmem_str label, float value=0, bool is_enabled = true); - void button (uint8_t tag, progmem_str label, bool is_enabled = true); - void text_field (uint8_t tag, progmem_str label, const char *value, bool is_enabled = true); - void two_buttons (uint8_t tag1, progmem_str label1, - uint8_t tag2, progmem_str label2, bool is_enabled = true); - void toggle (uint8_t tag, progmem_str label, bool value, bool is_enabled = true); - void home_buttons (uint8_t tag); - void increments (); - }; - - static float getIncrement(); - - public: - static void onEntry(); - static bool onTouchEnd(uint8_t tag); -}; - -class BaseMoveAxisScreen : public BaseNumericAdjustmentScreen { - private: - static float getManualFeedrate(uint8_t axis, float increment_mm); - public: - static void setManualFeedrate(ExtUI::axis_t, float increment_mm); - static void setManualFeedrate(ExtUI::extruder_t, float increment_mm); - - static void onEntry(); - static bool onTouchHeld(uint8_t tag); -}; - -class MoveAxisScreen : public BaseMoveAxisScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static void onIdle(); -}; - -class StepsScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); -}; - -#if HAS_TRINAMIC_CONFIG - class StepperCurrentScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; - - class StepperBumpSensitivityScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; -#endif - -#if HAS_MULTI_HOTEND - class NozzleOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; -#endif - -#if HAS_LEVELING - - class LevelingMenu : public BaseScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; - - #if HAS_BED_PROBE - class ZOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; - #endif - - #if HAS_MESH - - class BedMeshScreen : public BaseScreen, public CachedScreen { - private: - enum MeshOpts { - USE_POINTS = 0x01, - USE_COLORS = 0x02, - USE_TAGS = 0x04, - USE_HIGHLIGHT = 0x08, - USE_AUTOSCALE = 0x10 - }; - - static uint8_t pointToTag(uint8_t x, uint8_t y); - static bool tagToPoint(uint8_t tag, uint8_t &x, uint8_t &y); - static float getHightlightedValue(); - static void drawHighlightedPointValue(); - static void drawMesh(int16_t x, int16_t y, int16_t w, int16_t h, ExtUI::bed_mesh_t data, uint8_t opts, float autoscale_max = 0.1); - - public: - static void onMeshUpdate(const int8_t x, const int8_t y, const float val); - static void onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t); - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchStart(uint8_t tag); - static bool onTouchEnd(uint8_t tag); - - static void startMeshProbe(); - }; - - #endif // HAS_MESH - -#endif // HAS_LEVELING - -#if ENABLED(BABYSTEPPING) - class NudgeNozzleScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - static bool onTouchHeld(uint8_t tag); - static void onIdle(); - }; -#endif - -#if ENABLED(BACKLASH_GCODE) - class BacklashCompensationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; -#endif - -class FeedratePercentScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); -}; - -class MaxVelocityScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); -}; - -class MaxAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); -}; - -class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); -}; - -#if HAS_JUNCTION_DEVIATION - class JunctionDeviationScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; -#else - class JerkScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; -#endif - -#if ENABLED(CASE_LIGHT_ENABLE) - class CaseLightScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; -#endif - -#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR) - class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; -#endif - -#if ENABLED(FILAMENT_RUNOUT_SENSOR) - class FilamentRunoutScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; -#endif - -#if ENABLED(LIN_ADVANCE) - class LinearAdvanceScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); - }; -#endif - -class TemperatureScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); -}; - -class InterfaceSoundsScreen : public BaseScreen, public CachedScreen { - public: - enum event_t { - PRINTING_STARTED = 0, - PRINTING_FINISHED = 1, - PRINTING_FAILED = 2, - - NUM_EVENTS - }; - - private: - friend class InterfaceSettingsScreen; - - static uint8_t event_sounds[NUM_EVENTS]; - - static const char* getSoundSelection(event_t); - static void toggleSoundSelection(event_t); - static void setSoundSelection(event_t, const FTDI::SoundPlayer::sound_t*); - - public: - static void playEventSound(event_t, FTDI::play_mode_t = FTDI::PLAY_ASYNCHRONOUS); - - static void defaultSettings(); - - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchStart(uint8_t tag); - static bool onTouchEnd(uint8_t tag); - static void onIdle(); -}; - -class InterfaceSettingsScreen : public BaseScreen, public CachedScreen { - private: - struct persistent_data_t { - uint32_t touch_transform_a; - uint32_t touch_transform_b; - uint32_t touch_transform_c; - uint32_t touch_transform_d; - uint32_t touch_transform_e; - uint32_t touch_transform_f; - uint16_t passcode; - uint8_t display_brightness; - int8_t display_h_offset_adj; - int8_t display_v_offset_adj; - uint8_t sound_volume; - uint8_t bit_flags; - uint8_t event_sounds[InterfaceSoundsScreen::NUM_EVENTS]; - }; - - public: - #ifdef ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE - static bool backupEEPROM(); - #endif - - static void saveSettings(char *); - static void loadSettings(const char *); - static void defaultSettings(); - static void failSafeSettings(); - - static void onStartup(); - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchStart(uint8_t tag); - static bool onTouchEnd(uint8_t tag); - static void onIdle(); -}; - -class LockScreen : public BaseScreen, public CachedScreen { - private: - friend InterfaceSettingsScreen; - - static uint16_t passcode; - - static char & message_style(); - static uint16_t compute_checksum(); - static void onPasscodeEntered(); - public: - static bool is_enabled(); - static void check_passcode(); - static void enable(); - static void disable(); - - static void set_hash(uint16_t pass) {passcode = pass;}; - static uint16_t get_hash() {return passcode;}; - - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); -}; - -#if ENABLED(SDSUPPORT) - - class FilesScreen : public BaseScreen, public CachedScreen { - private: - #if ENABLED(TOUCH_UI_PORTRAIT) - static constexpr uint8_t header_h = 2; - static constexpr uint8_t footer_h = 2; - static constexpr uint8_t files_per_page = 11; - #else - static constexpr uint8_t header_h = 1; - static constexpr uint8_t footer_h = 1; - static constexpr uint8_t files_per_page = 6; - #endif - - static uint8_t getTagForLine(uint8_t line) {return line + 2;} - static uint8_t getLineForTag(uint8_t tag) {return tag - 2;} - static uint16_t getFileForTag(uint8_t tag); - static uint16_t getSelectedFileIndex(); - - inline static const char *getSelectedShortFilename() {return getSelectedFilename(false);} - inline static const char *getSelectedLongFilename() {return getSelectedFilename(true);} - static const char *getSelectedFilename(bool longName); - - static void drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted); - static void drawFileList(); - static void drawHeader(); - static void drawFooter(); - static void drawSelectedFile(); - - static void gotoPage(uint8_t); - public: - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - static void onIdle(); - }; - -#endif // SDSUPPORT - -class EndstopStatesScreen : public BaseScreen, public UncachedScreen { - public: - static void onEntry(); - static void onExit(); - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - static void onIdle(); -}; - -class DisplayTuningScreen : public BaseNumericAdjustmentScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchHeld(uint8_t tag); -}; - -#if ENABLED(TOUCH_UI_DEVELOPER_MENU) - - class DeveloperMenu : public BaseScreen, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; - - class ConfirmEraseFlashDialogBox : public DialogBoxBaseClass, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; - - class WidgetsScreen : public BaseScreen, public UncachedScreen { - public: - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchStart(uint8_t tag); - static void onIdle(); - }; - - class StressTestScreen : public BaseScreen, public UncachedScreen { - private: - static void drawDots(uint16_t x, uint16_t y, uint16_t h, uint16_t v); - static bool watchDogTestNow(); - static void recursiveLockup(); - static void iterativeLockup(); - static void runTestOnBootup(bool enable); - - public: - static void startupCheck(); - - static void onEntry(); - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - static void onIdle(); - }; - -#endif // TOUCH_UI_DEVELOPER_MENU - -class MediaPlayerScreen : public BaseScreen, public UncachedScreen { - private: - typedef int16_t media_streamer_func_t(void *obj, void *buff, size_t bytes); - - public: - static bool playCardMedia(); - static bool playBootMedia(); - - static void onEntry(); - static void onRedraw(draw_mode_t); - - static void playStream(void *obj, media_streamer_func_t*); -}; - -#if NUM_LANGUAGES > 1 - class LanguageMenu : public BaseScreen, public UncachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; -#endif - -#if ENABLED(TOUCH_UI_COCOA_PRESS) - - class PreheatMenu : public BaseScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - }; - - class PreheatTimerScreen : public BaseScreen, public CachedScreen { - private: - static uint16_t secondsRemaining(); - - static void draw_message(draw_mode_t); - static void draw_time_remaining(draw_mode_t); - static void draw_interaction_buttons(draw_mode_t); - static void draw_adjuster(draw_mode_t, uint8_t tag, progmem_str label, float value, int16_t x, int16_t y, int16_t w, int16_t h); - public: - static void onRedraw(draw_mode_t); - - static void onEntry(); - static void onIdle(); - static bool onTouchHeld(uint8_t tag); - static bool onTouchEnd(uint8_t tag); - }; - - class UnloadCartridgeScreen : public BaseScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - static bool onTouchHeld(uint8_t tag); - }; - - class LoadChocolateScreen : public BaseScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static bool onTouchEnd(uint8_t tag); - static bool onTouchHeld(uint8_t tag); - }; - - class MoveXYZScreen : public BaseMoveAxisScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static void onIdle(); - }; - - class MoveEScreen : public BaseMoveAxisScreen, public CachedScreen { - public: - static void onRedraw(draw_mode_t); - static void onIdle(); - }; - -#endif // TOUCH_UI_COCOA_PRESS diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp deleted file mode 100644 index 0694f89d747a..000000000000 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp +++ /dev/null @@ -1,770 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#include "../../../../inc/MarlinConfigPre.h" - -#if HAS_TFT_LVGL_UI - -#include "draw_ui.h" -#include - -#include "../../../../gcode/gcode.h" -#include "../../../../gcode/queue.h" -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" - -#if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" -#endif - -#if HAS_TRINAMIC_CONFIG - #include "../../../../module/stepper/indirection.h" - #include "../../../../feature/tmc_util.h" -#endif - -#if HAS_BED_PROBE - #include "../../../../module/probe.h" -#endif - -extern lv_group_t *g; -static lv_obj_t *scr; -static lv_obj_t *buttonValue = nullptr; -static lv_obj_t *labelValue = nullptr; - -static char key_value[11] = { 0 }; -static uint8_t cnt = 0; -static bool point_flag = true; - -enum { - ID_NUM_KEY1 = 1, - ID_NUM_KEY2, - ID_NUM_KEY3, - ID_NUM_KEY4, - ID_NUM_KEY5, - ID_NUM_KEY6, - ID_NUM_KEY7, - ID_NUM_KEY8, - ID_NUM_KEY9, - ID_NUM_KEY0, - ID_NUM_BACK, - ID_NUM_RESET, - ID_NUM_CONFIRM, - ID_NUM_POINT, - ID_NUM_NEGATIVE -}; - -static void disp_key_value() { - char *temp; - #if HAS_TRINAMIC_CONFIG - float milliamps; - #endif - - switch (value) { - case PrintAcceleration: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.acceleration); - break; - case RetractAcceleration: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.retract_acceleration); - break; - case TravelAcceleration: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.travel_acceleration); - break; - case XAcceleration: - sprintf_P(public_buf_m, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[X_AXIS]); - break; - case YAcceleration: - sprintf_P(public_buf_m, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); - break; - case ZAcceleration: - sprintf_P(public_buf_m, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[Z_AXIS]); - break; - case E0Acceleration: - sprintf_P(public_buf_m, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[E_AXIS]); - break; - case E1Acceleration: - sprintf_P(public_buf_m, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)]); - break; - case XMaxFeedRate: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[X_AXIS]); - break; - case YMaxFeedRate: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[Y_AXIS]); - break; - case ZMaxFeedRate: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[Z_AXIS]); - break; - case E0MaxFeedRate: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[E_AXIS]); - break; - case E1MaxFeedRate: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[E_AXIS_N(1)]); - break; - - case XJerk: - #if HAS_CLASSIC_JERK - sprintf_P(public_buf_m, PSTR("%.1f"), planner.max_jerk[X_AXIS]); - #endif - break; - case YJerk: - #if HAS_CLASSIC_JERK - sprintf_P(public_buf_m, PSTR("%.1f"), planner.max_jerk[Y_AXIS]); - #endif - break; - case ZJerk: - #if HAS_CLASSIC_JERK - sprintf_P(public_buf_m, PSTR("%.1f"), planner.max_jerk[Z_AXIS]); - #endif - break; - case EJerk: - #if HAS_CLASSIC_JERK - sprintf_P(public_buf_m, PSTR("%.1f"), planner.max_jerk[E_AXIS]); - #endif - break; - - case Xstep: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.axis_steps_per_mm[X_AXIS]); - - break; - case Ystep: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.axis_steps_per_mm[Y_AXIS]); - - break; - case Zstep: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.axis_steps_per_mm[Z_AXIS]); - - break; - case E0step: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.axis_steps_per_mm[E_AXIS]); - - break; - case E1step: - sprintf_P(public_buf_m, PSTR("%.1f"), planner.settings.axis_steps_per_mm[E_AXIS_N(1)]); - break; - - case Xcurrent: - #if AXIS_IS_TMC(X) - milliamps = stepperX.getMilliamps(); - sprintf_P(public_buf_m, PSTR("%.1f"), milliamps); - #endif - break; - - case Ycurrent: - #if AXIS_IS_TMC(Y) - milliamps = stepperY.getMilliamps(); - sprintf_P(public_buf_m, PSTR("%.1f"), milliamps); - #endif - break; - - case Zcurrent: - #if AXIS_IS_TMC(Z) - milliamps = stepperZ.getMilliamps(); - sprintf_P(public_buf_m, PSTR("%.1f"), milliamps); - #endif - break; - - case E0current: - #if AXIS_IS_TMC(E0) - milliamps = stepperE0.getMilliamps(); - sprintf_P(public_buf_m, PSTR("%.1f"), milliamps); - #endif - break; - - case E1current: - #if AXIS_IS_TMC(E1) - milliamps = stepperE1.getMilliamps(); - sprintf_P(public_buf_m, PSTR("%.1f"), milliamps); - #endif - break; - - case pause_pos_x: - sprintf_P(public_buf_m, PSTR("%.1f"), gCfgItems.pausePosX); - break; - case pause_pos_y: - sprintf_P(public_buf_m, PSTR("%.1f"), gCfgItems.pausePosY); - break; - case pause_pos_z: - sprintf_P(public_buf_m, PSTR("%.1f"), gCfgItems.pausePosZ); - break; - case level_pos_x1: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[0][0]); - break; - case level_pos_y1: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[0][1]); - break; - case level_pos_x2: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[1][0]); - break; - case level_pos_y2: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[1][1]); - break; - case level_pos_x3: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[2][0]); - break; - case level_pos_y3: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[2][1]); - break; - case level_pos_x4: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[3][0]); - break; - case level_pos_y4: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[3][1]); - break; - case level_pos_x5: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[4][0]); - break; - case level_pos_y5: - sprintf_P(public_buf_m, PSTR("%d"), (int)gCfgItems.levelingPos[4][1]); - break; - #if HAS_BED_PROBE - case x_offset: - #if HAS_PROBE_XY_OFFSET - sprintf_P(public_buf_m, PSTR("%.1f"), probe.offset.x); - #endif - break; - case y_offset: - #if HAS_PROBE_XY_OFFSET - sprintf_P(public_buf_m, PSTR("%.1f"), probe.offset.y); - #endif - break; - case z_offset: - sprintf_P(public_buf_m, PSTR("%.1f"), probe.offset.z); - break; - #endif - case load_length: - sprintf_P(public_buf_m, PSTR("%d"), gCfgItems.filamentchange_load_length); - break; - case load_speed: - sprintf_P(public_buf_m, PSTR("%d"), gCfgItems.filamentchange_load_speed); - break; - case unload_length: - sprintf_P(public_buf_m, PSTR("%d"), gCfgItems.filamentchange_unload_length); - break; - case unload_speed: - sprintf_P(public_buf_m, PSTR("%d"), gCfgItems.filamentchange_unload_speed); - break; - case filament_temp: - sprintf_P(public_buf_m, PSTR("%d"), gCfgItems.filament_limit_temper); - break; - case x_sensitivity: - #if X_SENSORLESS - sprintf_P(public_buf_m, PSTR("%d"), TERN(X_SENSORLESS, stepperX.homing_threshold(), 0)); - #endif - break; - case y_sensitivity: - #if Y_SENSORLESS - sprintf_P(public_buf_m, PSTR("%d"), TERN(Y_SENSORLESS, stepperY.homing_threshold(), 0)); - #endif - break; - case z_sensitivity: - #if Z_SENSORLESS - sprintf_P(public_buf_m, PSTR("%d"), TERN(Z_SENSORLESS, stepperZ.homing_threshold(), 0)); - #endif - break; - case z2_sensitivity: - #if Z2_SENSORLESS - sprintf_P(public_buf_m, PSTR("%d"), TERN(Z2_SENSORLESS, stepperZ2.homing_threshold(), 0)); - #endif - break; - } - - strcpy(key_value, public_buf_m); - cnt = strlen(key_value); - temp = strchr(key_value, '.'); - point_flag = !temp; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - -} - -static void set_value_confirm() { - #if HAS_TRINAMIC_CONFIG - uint16_t current_mA; - #endif - switch (value) { - case PrintAcceleration: - planner.settings.acceleration = atof(key_value); - break; - case RetractAcceleration: - planner.settings.retract_acceleration = atof(key_value); - break; - case TravelAcceleration: - planner.settings.travel_acceleration = atof(key_value); - break; - case XAcceleration: - planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value); - break; - case YAcceleration: - planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = atof(key_value); - break; - case ZAcceleration: - planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = atof(key_value); - break; - case E0Acceleration: - planner.settings.max_acceleration_mm_per_s2[E_AXIS] = atof(key_value); - break; - case E1Acceleration: - planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)] = atof(key_value); - break; - case XMaxFeedRate: - planner.settings.max_feedrate_mm_s[X_AXIS] = atof(key_value); - break; - case YMaxFeedRate: - planner.settings.max_feedrate_mm_s[Y_AXIS] = atof(key_value); - break; - case ZMaxFeedRate: - planner.settings.max_feedrate_mm_s[Z_AXIS] = atof(key_value); - break; - case E0MaxFeedRate: - planner.settings.max_feedrate_mm_s[E_AXIS] = atof(key_value); - break; - case E1MaxFeedRate: - planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value); - break; - case XJerk: - #if HAS_CLASSIC_JERK - planner.max_jerk[X_AXIS] = atof(key_value); - #endif - break; - case YJerk: - #if HAS_CLASSIC_JERK - planner.max_jerk[Y_AXIS] = atof(key_value); - #endif - break; - case ZJerk: - #if HAS_CLASSIC_JERK - planner.max_jerk[Z_AXIS] = atof(key_value); - #endif - break; - case EJerk: - #if HAS_CLASSIC_JERK - planner.max_jerk[E_AXIS] = atof(key_value); - #endif - break; - case Xstep: - planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value); - planner.refresh_positioning(); - break; - case Ystep: - planner.settings.axis_steps_per_mm[Y_AXIS] = atof(key_value); - planner.refresh_positioning(); - break; - case Zstep: - planner.settings.axis_steps_per_mm[Z_AXIS] = atof(key_value); - planner.refresh_positioning(); - break; - case E0step: - planner.settings.axis_steps_per_mm[E_AXIS] = atof(key_value); - planner.refresh_positioning(); - break; - case E1step: - planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value); - planner.refresh_positioning(); - break; - case Xcurrent: - #if AXIS_IS_TMC(X) - current_mA = atoi(key_value); - stepperX.rms_current(current_mA); - #endif - break; - case Ycurrent: - #if AXIS_IS_TMC(Y) - current_mA = atoi(key_value); - stepperY.rms_current(current_mA); - #endif - break; - case Zcurrent: - #if AXIS_IS_TMC(Z) - current_mA = atoi(key_value); - stepperZ.rms_current(current_mA); - #endif - break; - case E0current: - #if AXIS_IS_TMC(E0) - current_mA = atoi(key_value); - stepperE0.rms_current(current_mA); - #endif - break; - case E1current: - #if AXIS_IS_TMC(E1) - current_mA = atoi(key_value); - stepperE1.rms_current(current_mA); - #endif - break; - case pause_pos_x: - gCfgItems.pausePosX = atof(key_value); - update_spi_flash(); - break; - case pause_pos_y: - gCfgItems.pausePosY = atof(key_value); - update_spi_flash(); - break; - case pause_pos_z: - gCfgItems.pausePosZ = atof(key_value); - update_spi_flash(); - break; - case level_pos_x1: - gCfgItems.levelingPos[0][0] = atoi(key_value); - update_spi_flash(); - break; - case level_pos_y1: - gCfgItems.levelingPos[0][1] = atoi(key_value); - update_spi_flash(); - break; - case level_pos_x2: - gCfgItems.levelingPos[1][0] = atoi(key_value); - update_spi_flash(); - break; - case level_pos_y2: - gCfgItems.levelingPos[1][1] = atoi(key_value); - update_spi_flash(); - break; - case level_pos_x3: - gCfgItems.levelingPos[2][0] = atoi(key_value); - update_spi_flash(); - break; - case level_pos_y3: - gCfgItems.levelingPos[2][1] = atoi(key_value); - update_spi_flash(); - break; - case level_pos_x4: - gCfgItems.levelingPos[3][0] = atoi(key_value); - update_spi_flash(); - break; - case level_pos_y4: - gCfgItems.levelingPos[3][1] = atoi(key_value); - update_spi_flash(); - break; - case level_pos_x5: - gCfgItems.levelingPos[4][0] = atoi(key_value); - update_spi_flash(); - break; - case level_pos_y5: - gCfgItems.levelingPos[4][1] = atoi(key_value); - update_spi_flash(); - break; - #if HAS_BED_PROBE - case x_offset: - #if HAS_PROBE_XY_OFFSET - float x; - x = atof(key_value); - if (WITHIN(x, -(X_BED_SIZE), X_BED_SIZE)) - probe.offset.x = x; - #endif - break; - case y_offset: - #if HAS_PROBE_XY_OFFSET - float y; - y = atof(key_value); - if (WITHIN(y, -(Y_BED_SIZE), Y_BED_SIZE)) - probe.offset.y = y; - #endif - break; - case z_offset: - float z; - z = atof(key_value); - if (WITHIN(z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) - probe.offset.z = z; - break; - #endif - case load_length: - gCfgItems.filamentchange_load_length = atoi(key_value); - uiCfg.filament_loading_time = (uint32_t)((gCfgItems.filamentchange_load_length*60.0/gCfgItems.filamentchange_load_speed)+0.5); - update_spi_flash(); - break; - case load_speed: - gCfgItems.filamentchange_load_speed = atoi(key_value); - uiCfg.filament_loading_time = (uint32_t)((gCfgItems.filamentchange_load_length*60.0/gCfgItems.filamentchange_load_speed)+0.5); - update_spi_flash(); - break; - case unload_length: - gCfgItems.filamentchange_unload_length = atoi(key_value); - uiCfg.filament_unloading_time = (uint32_t)((gCfgItems.filamentchange_unload_length*60.0/gCfgItems.filamentchange_unload_speed)+0.5); - update_spi_flash(); - break; - case unload_speed: - gCfgItems.filamentchange_unload_speed = atoi(key_value); - uiCfg.filament_unloading_time = (uint32_t)((gCfgItems.filamentchange_unload_length*60.0/gCfgItems.filamentchange_unload_speed)+0.5); - update_spi_flash(); - break; - case filament_temp: - gCfgItems.filament_limit_temper = atoi(key_value); - update_spi_flash(); - break; - case x_sensitivity: - #if X_SENSORLESS - stepperX.homing_threshold(atoi(key_value)); - #endif - break; - case y_sensitivity: - #if Y_SENSORLESS - stepperY.homing_threshold(atoi(key_value)); - #endif - break; - case z_sensitivity: - #if Z_SENSORLESS - stepperZ.homing_threshold(atoi(key_value)); - #endif - break; - case z2_sensitivity: - #if Z2_SENSORLESS - stepperZ2.homing_threshold(atoi(key_value)); - #endif - break; - } - gcode.process_subcommands_now_P(PSTR("M500")); -} - -static void event_handler(lv_obj_t *obj, lv_event_t event) { - if (event != LV_EVENT_RELEASED) return; - switch (obj->mks_obj_id) { - case ID_NUM_KEY1: - if (cnt <= 10) { - key_value[cnt] = (char)'1'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_KEY2: - if (cnt <= 10) { - key_value[cnt] = (char)'2'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_KEY3: - if (cnt <= 10) { - key_value[cnt] = (char)'3'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_KEY4: - if (cnt <= 10) { - key_value[cnt] = (char)'4'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_KEY5: - if (cnt <= 10) { - key_value[cnt] = (char)'5'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_KEY6: - if (cnt <= 10) { - key_value[cnt] = (char)'6'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_KEY7: - if (cnt <= 10) { - key_value[cnt] = (char)'7'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_KEY8: - if (cnt <= 10) { - key_value[cnt] = (char)'8'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_KEY9: - if (cnt <= 10) { - key_value[cnt] = (char)'9'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_KEY0: - if (cnt <= 10) { - key_value[cnt] = (char)'0'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_BACK: - if (cnt > 0) cnt--; - if (key_value[cnt] == (char)'.') point_flag = true; - key_value[cnt] = (char)'\0'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - break; - case ID_NUM_RESET: - ZERO(key_value); - cnt = 0; - key_value[cnt] = (char)'0'; - point_flag = true; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - break; - case ID_NUM_POINT: - if (cnt != 0 && point_flag) { - point_flag = false; - key_value[cnt] = (char)'.'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_NEGATIVE: - if (cnt == 0) { - key_value[cnt] = (char)'-'; - lv_label_set_text(labelValue, key_value); - lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); - cnt++; - } - break; - case ID_NUM_CONFIRM: - last_disp_state = NUMBER_KEY_UI; - if (strlen(key_value) != 0) set_value_confirm(); - lv_clear_number_key(); - draw_return_ui(); - break; - } -} - -void lv_draw_number_key() { - scr = lv_screen_create(NUMBER_KEY_UI, ""); - - buttonValue = lv_btn_create(scr, 92, 40, 296, 40, event_handler, ID_NUM_KEY1, &style_num_text); - labelValue = lv_label_create_empty(buttonValue); - - lv_obj_t *NumberKey_1 = lv_btn_create(scr, 92, 90, 68, 40, event_handler, ID_NUM_KEY1, &style_num_key_pre); - lv_obj_t *labelKey_1 = lv_label_create_empty(NumberKey_1); - lv_label_set_text(labelKey_1, machine_menu.key_1); - lv_obj_align(labelKey_1, NumberKey_1, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *NumberKey_2 = lv_btn_create(scr, 168, 90, 68, 40, event_handler, ID_NUM_KEY2, &style_num_key_pre); - lv_obj_t *labelKey_2 = lv_label_create_empty(NumberKey_2); - lv_label_set_text(labelKey_2, machine_menu.key_2); - lv_obj_align(labelKey_2, NumberKey_2, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *NumberKey_3 = lv_btn_create(scr, 244, 90, 68, 40, event_handler, ID_NUM_KEY3, &style_num_key_pre); - lv_obj_t *labelKey_3 = lv_label_create_empty(NumberKey_3); - lv_label_set_text(labelKey_3, machine_menu.key_3); - lv_obj_align(labelKey_3, NumberKey_3, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *NumberKey_4 = lv_btn_create(scr, 92, 140, 68, 40, event_handler, ID_NUM_KEY4, &style_num_key_pre); - lv_obj_t *labelKey_4 = lv_label_create_empty(NumberKey_4); - lv_label_set_text(labelKey_4, machine_menu.key_4); - lv_obj_align(labelKey_4, NumberKey_4, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *NumberKey_5 = lv_btn_create(scr, 168, 140, 68, 40, event_handler, ID_NUM_KEY5, &style_num_key_pre); - lv_obj_t *labelKey_5 = lv_label_create_empty(NumberKey_5); - lv_label_set_text(labelKey_5, machine_menu.key_5); - lv_obj_align(labelKey_5, NumberKey_5, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *NumberKey_6 = lv_btn_create(scr, 244, 140, 68, 40, event_handler, ID_NUM_KEY6, &style_num_key_pre); - lv_obj_t *labelKey_6 = lv_label_create_empty(NumberKey_6); - lv_label_set_text(labelKey_6, machine_menu.key_6); - lv_obj_align(labelKey_6, NumberKey_6, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *NumberKey_7 = lv_btn_create(scr, 92, 190, 68, 40, event_handler, ID_NUM_KEY7, &style_num_key_pre); - lv_obj_t *labelKey_7 = lv_label_create_empty(NumberKey_7); - lv_label_set_text(labelKey_7, machine_menu.key_7); - lv_obj_align(labelKey_7, NumberKey_7, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *NumberKey_8 = lv_btn_create(scr, 168, 190, 68, 40, event_handler, ID_NUM_KEY8, &style_num_key_pre); - lv_obj_t *labelKey_8 = lv_label_create_empty(NumberKey_8); - lv_label_set_text(labelKey_8, machine_menu.key_8); - lv_obj_align(labelKey_8, NumberKey_8, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *NumberKey_9 = lv_btn_create(scr, 244, 190, 68, 40, event_handler, ID_NUM_KEY9, &style_num_key_pre); - lv_obj_t *labelKey_9 = lv_label_create_empty(NumberKey_9); - lv_label_set_text(labelKey_9, machine_menu.key_9); - lv_obj_align(labelKey_9, NumberKey_9, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *NumberKey_0 = lv_btn_create(scr, 92, 240, 68, 40, event_handler, ID_NUM_KEY0, &style_num_key_pre); - lv_obj_t *labelKey_0 = lv_label_create_empty(NumberKey_0); - lv_label_set_text(labelKey_0, machine_menu.key_0); - lv_obj_align(labelKey_0, NumberKey_0, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *KeyBack = lv_btn_create(scr, 320, 90, 68, 40, event_handler, ID_NUM_BACK, &style_num_key_pre); - lv_obj_t *labelKeyBack = lv_label_create_empty(KeyBack); - lv_label_set_text(labelKeyBack, machine_menu.key_back); - lv_obj_align(labelKeyBack, KeyBack, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *KeyReset = lv_btn_create(scr, 320, 140, 68, 40, event_handler, ID_NUM_RESET, &style_num_key_pre); - lv_obj_t *labelKeyReset = lv_label_create_empty(KeyReset); - lv_label_set_text(labelKeyReset, machine_menu.key_reset); - lv_obj_align(labelKeyReset, KeyReset, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *KeyConfirm = lv_btn_create(scr, 320, 190, 68, 90, event_handler, ID_NUM_CONFIRM, &style_num_key_pre); - lv_obj_t *labelKeyConfirm = lv_label_create_empty(KeyConfirm); - lv_label_set_text(labelKeyConfirm, machine_menu.key_confirm); - lv_obj_align(labelKeyConfirm, KeyConfirm, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *KeyPoint = lv_btn_create(scr, 244, 240, 68, 40, event_handler, ID_NUM_POINT, &style_num_key_pre); - lv_obj_t *labelKeyPoint = lv_label_create_empty(KeyPoint); - lv_label_set_text(labelKeyPoint, machine_menu.key_point); - lv_obj_align(labelKeyPoint, KeyPoint, LV_ALIGN_CENTER, 0, 0); - - lv_obj_t *Minus = lv_btn_create(scr, 168, 240, 68, 40, event_handler, ID_NUM_NEGATIVE, &style_num_key_pre); - lv_obj_t *labelMinus = lv_label_create_empty(Minus); - lv_label_set_text(labelMinus, machine_menu.negative); - lv_obj_align(labelMinus, Minus, LV_ALIGN_CENTER, 0, 0); - - #if HAS_ROTARY_ENCODER - if (gCfgItems.encoder_enable) { - lv_group_add_obj(g, NumberKey_1); - lv_group_add_obj(g, NumberKey_2); - lv_group_add_obj(g, NumberKey_3); - lv_group_add_obj(g, KeyBack); - lv_group_add_obj(g, NumberKey_4); - lv_group_add_obj(g, NumberKey_5); - lv_group_add_obj(g, NumberKey_6); - lv_group_add_obj(g, KeyReset); - lv_group_add_obj(g, NumberKey_7); - lv_group_add_obj(g, NumberKey_8); - lv_group_add_obj(g, NumberKey_9); - lv_group_add_obj(g, NumberKey_0); - lv_group_add_obj(g, Minus); - lv_group_add_obj(g, KeyPoint); - lv_group_add_obj(g, KeyConfirm); - } - #endif - - disp_key_value(); -} - -void lv_clear_number_key() { - #if HAS_ROTARY_ENCODER - if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g); - #endif - lv_obj_del(scr); -} - -#endif // HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp deleted file mode 100644 index 97200efb08fb..000000000000 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#include "../../../../inc/MarlinConfigPre.h" - -#if HAS_TFT_LVGL_UI - -#include "draw_ready_print.h" -#include "draw_tool.h" -#include -#include "tft_lvgl_configuration.h" -#include "mks_hardware_test.h" -#include "draw_ui.h" - -#include - -#include "../../../../module/temperature.h" -#include "../../../../inc/MarlinConfig.h" - -#if ENABLED(TOUCH_SCREEN_CALIBRATION) - #include "../../../tft_io/touch_calibration.h" - #include "draw_touch_calibration.h" -#endif - -#include - -extern lv_group_t* g; -static lv_obj_t *scr; -#if ENABLED(MKS_TEST) - uint8_t curent_disp_ui = 0; -#endif - -enum { - ID_TOOL = 1, - ID_SET, - ID_PRINT -}; - -static void event_handler(lv_obj_t *obj, lv_event_t event) { - if (event != LV_EVENT_RELEASED) return; - lv_clear_ready_print(); - - switch (obj->mks_obj_id) { - case ID_TOOL: - lv_draw_tool(); - break; - case ID_SET: - lv_draw_set(); - break; - case ID_PRINT: - lv_draw_print_file(); - break; - } -} - -lv_obj_t *limit_info, *det_info; -lv_style_t limit_style, det_style; -void disp_Limit_ok() { - limit_style.text.color.full = 0xFFFF; - lv_obj_set_style(limit_info, &limit_style); - lv_label_set_text(limit_info, "Limit:ok"); -} -void disp_Limit_error() { - limit_style.text.color.full = 0xF800; - lv_obj_set_style(limit_info, &limit_style); - lv_label_set_text(limit_info, "Limit:error"); -} - -void disp_det_ok() { - det_style.text.color.full = 0xFFFF; - lv_obj_set_style(det_info, &det_style); - lv_label_set_text(det_info, "det:ok"); -} -void disp_det_error() { - det_style.text.color.full = 0xF800; - lv_obj_set_style(det_info, &det_style); - lv_label_set_text(det_info, "det:error"); -} - -lv_obj_t *e1, *e2, *e3, *bed; -void mks_disp_test() { - char buf[30] = {0}; - sprintf_P(buf, PSTR("e1:%d"), (int)thermalManager.temp_hotend[0].celsius); - lv_label_set_text(e1, buf); - #if HAS_MULTI_HOTEND - sprintf_P(buf, PSTR("e2:%d"), (int)thermalManager.temp_hotend[1].celsius); - lv_label_set_text(e2, buf); - #endif - #if HAS_HEATED_BED - sprintf_P(buf, PSTR("bed:%d"), (int)thermalManager.temp_bed.celsius); - lv_label_set_text(bed, buf); - #endif -} - -void lv_draw_ready_print() { - char buf[30] = {0}; - lv_obj_t *buttonTool; - - disp_state_stack._disp_index = 0; - ZERO(disp_state_stack._disp_state); - scr = lv_screen_create(PRINT_READY_UI, ""); - - if (mks_test_flag == 0x1E) { - // Create image buttons - buttonTool = lv_imgbtn_create(scr, "F:/bmp_tool.bin", event_handler, ID_TOOL); - - lv_obj_set_pos(buttonTool, 360, 180); - - lv_obj_t *label_tool = lv_label_create_empty(buttonTool); - if (gCfgItems.multiple_language) { - lv_label_set_text(label_tool, main_menu.tool); - lv_obj_align(label_tool, buttonTool, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } - - #if 1 - e1 = lv_label_create_empty(scr); - lv_obj_set_pos(e1, 20, 20); - sprintf_P(buf, PSTR("e1: %d"), (int)thermalManager.temp_hotend[0].celsius); - lv_label_set_text(e1, buf); - #if HAS_MULTI_HOTEND - e2 = lv_label_create_empty(scr); - lv_obj_set_pos(e2, 20, 45); - sprintf_P(buf, PSTR("e1: %d"), (int)thermalManager.temp_hotend[1].celsius); - lv_label_set_text(e2, buf); - #endif - - #if HAS_HEATED_BED - bed = lv_label_create_empty(scr); - lv_obj_set_pos(bed, 20, 95); - sprintf_P(buf, PSTR("bed: %d"), (int)thermalManager.temp_bed.celsius); - lv_label_set_text(bed, buf); - #endif - - limit_info = lv_label_create_empty(scr); - - lv_style_copy(&limit_style, &lv_style_scr); - limit_style.body.main_color.full = 0X0000; - limit_style.body.grad_color.full = 0X0000; - limit_style.text.color.full = 0Xffff; - lv_obj_set_style(limit_info, &limit_style); - - lv_obj_set_pos(limit_info, 20, 120); - lv_label_set_text(limit_info, " "); - - det_info = lv_label_create_empty(scr); - - lv_style_copy(&det_style, &lv_style_scr); - det_style.body.main_color.full = 0X0000; - det_style.body.grad_color.full = 0X0000; - det_style.text.color.full = 0Xffff; - lv_obj_set_style(det_info, &det_style); - - lv_obj_set_pos(det_info, 20, 145); - lv_label_set_text(det_info, " "); - #endif // if 1 - - } - else { - lv_big_button_create(scr, "F:/bmp_tool.bin", main_menu.tool, 20, 90, event_handler, ID_TOOL); - lv_big_button_create(scr, "F:/bmp_set.bin", main_menu.set, 180, 90, event_handler, ID_SET); - lv_big_button_create(scr, "F:/bmp_printing.bin", main_menu.print, 340, 90, event_handler, ID_PRINT); - } - - #if ENABLED(TOUCH_SCREEN_CALIBRATION) - // If calibration is required, let's trigger it now, handles the case when there is default value in configuration files - if (!touch_calibration.calibration_loaded()) { - lv_clear_ready_print(); - lv_draw_touch_calibration_screen(); - } - #endif -} - -void lv_clear_ready_print() { - #if HAS_ROTARY_ENCODER - if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g); - #endif - lv_obj_del(scr); -} - -#endif // HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.h b/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.h deleted file mode 100644 index d0ea4e376fac..000000000000 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ -#pragma once - -/** - * @file lcd/extui/lib/mks_ui/tft_lvgl_configuration.h - * @date 2020-02-21 - */ - -#ifdef __cplusplus - extern "C" { /* C-declarations for C++ */ -#endif - -#include - -//#define TFT_ROTATION TFT_ROTATE_180 - -extern uint8_t bmp_public_buf[14 * 1024]; -extern uint8_t public_buf[513]; - -extern void tft_lvgl_init(); -extern void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p); -extern bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data); -extern bool my_mousewheel_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); - -extern void LCD_Clear(uint16_t Color); -extern void tft_set_point(uint16_t x, uint16_t y, uint16_t point); -extern void LCD_setWindowArea(uint16_t StartX, uint16_t StartY, uint16_t width, uint16_t heigh); -extern void LCD_WriteRAM_Prepare(); -extern void lcd_draw_logo(); -extern void lv_encoder_pin_init(); -extern void lv_update_encoder(); - -extern lv_fs_res_t spi_flash_open_cb (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode); -extern lv_fs_res_t spi_flash_close_cb (lv_fs_drv_t * drv, void * file_p); -extern lv_fs_res_t spi_flash_read_cb (lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); -extern lv_fs_res_t spi_flash_seek_cb(lv_fs_drv_t * drv, void * file_p, uint32_t pos); -extern lv_fs_res_t spi_flash_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); - -extern lv_fs_res_t sd_open_cb (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode); -extern lv_fs_res_t sd_close_cb (lv_fs_drv_t * drv, void * file_p); -extern lv_fs_res_t sd_read_cb (lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); -extern lv_fs_res_t sd_seek_cb(lv_fs_drv_t * drv, void * file_p, uint32_t pos); -extern lv_fs_res_t sd_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); - -extern void lv_fill_rect(lv_coord_t x1, lv_coord_t y1, lv_coord_t x2, lv_coord_t y2, lv_color_t bk_color); - -#ifdef __cplusplus - } /* C-declarations for C++ */ -#endif diff --git a/Marlin/src/lcd/extui/malyan_lcd.cpp b/Marlin/src/lcd/extui/malyan/malyan.cpp similarity index 69% rename from Marlin/src/lcd/extui/malyan_lcd.cpp rename to Marlin/src/lcd/extui/malyan/malyan.cpp index 6c55eea16d8e..8c9bfc32e5ad 100644 --- a/Marlin/src/lcd/extui/malyan_lcd.cpp +++ b/Marlin/src/lcd/extui/malyan/malyan.cpp @@ -21,7 +21,7 @@ */ /** - * malyan_lcd.cpp + * lcd/extui/malyan/malyan.cpp * * LCD implementation for Malyan's LCD, a separate ESP8266 MCU running * on Serial1 for the M200 board. This module outputs a pseudo-gcode @@ -41,25 +41,26 @@ * Copyright (c) 2017 Jason Nelson (xC0000005) */ -#include "../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if ENABLED(MALYAN_LCD) //#define DEBUG_MALYAN_LCD -#include "ui_api.h" +#include "malyan.h" +#include "../ui_api.h" +#include "../../marlinui.h" -#include "../marlinui.h" -#include "../../sd/cardreader.h" -#include "../../module/temperature.h" -#include "../../module/stepper.h" -#include "../../module/motion.h" -#include "../../libs/duration_t.h" -#include "../../module/printcounter.h" -#include "../../gcode/queue.h" +#include "../../../sd/cardreader.h" +#include "../../../module/temperature.h" +#include "../../../module/stepper.h" +#include "../../../module/motion.h" +#include "../../../libs/duration_t.h" +#include "../../../module/printcounter.h" +#include "../../../gcode/queue.h" #define DEBUG_OUT ENABLED(DEBUG_MALYAN_LCD) -#include "../../core/debug_out.h" +#include "../../../core/debug_out.h" // This is based on longest sys command + a filename, plus some buffer // in case we encounter some data we don't recognize @@ -94,7 +95,7 @@ void write_to_lcd(const char * const message) { } // {E:} is for error states. -void set_lcd_error_P(PGM_P const error, PGM_P const component=nullptr) { +void set_lcd_error_P(PGM_P const error, PGM_P const component/*=nullptr*/) { write_to_lcd_P(PSTR("{E:")); write_to_lcd_P(error); if (component) { @@ -118,10 +119,10 @@ void set_lcd_error_P(PGM_P const error, PGM_P const component=nullptr) { * * the command portion begins after the : */ -void process_lcd_c_command(const char* command) { +void process_lcd_c_command(const char *command) { const int target_val = command[1] ? atoi(command + 1) : -1; if (target_val < 0) { - DEBUG_ECHOLNPAIR("UNKNOWN C COMMAND ", command); + DEBUG_ECHOLNPGM("UNKNOWN C COMMAND ", command); return; } switch (command[0]) { @@ -142,7 +143,7 @@ void process_lcd_c_command(const char* command) { case 'P': ExtUI::setTargetTemp_celsius(target_val, ExtUI::heater_t::BED); break; #endif - default: DEBUG_ECHOLNPAIR("UNKNOWN C COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN C COMMAND ", command); } } @@ -153,7 +154,7 @@ void process_lcd_c_command(const char* command) { * time remaining (HH:MM:SS). The UI can't handle displaying a second hotend, * but the stock firmware always sends it, and it's always zero. */ -void process_lcd_eb_command(const char* command) { +void process_lcd_eb_command(const char *command) { char elapsed_buffer[10]; static uint8_t iteration = 0; duration_t elapsed; @@ -172,23 +173,19 @@ void process_lcd_eb_command(const char* command) { sprintf_P(message_buffer, PSTR("{T0:%03i/%03i}{T1:000/000}{TP:%03i/%03i}{TQ:%03i}{TT:%s}"), - int(thermalManager.degHotend(0)), thermalManager.degTargetHotend(0), + thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), #if HAS_HEATED_BED - int(thermalManager.degBed()), thermalManager.degTargetBed(), + thermalManager.wholeDegBed(), thermalManager.degTargetBed(), #else 0, 0, #endif - #if ENABLED(SDSUPPORT) - done_pct, - #else - 0, - #endif + TERN(SDSUPPORT, done_pct, 0), elapsed_buffer ); write_to_lcd(message_buffer); } break; - default: DEBUG_ECHOLNPAIR("UNKNOWN E/B COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN E/B COMMAND ", command); } } @@ -203,19 +200,19 @@ void process_lcd_eb_command(const char* command) { * X, Y, Z, A (extruder) */ template -void j_move_axis(const char* command, const T axis) { +void j_move_axis(const char *command, const T axis) { const float dist = atof(command + 1) / 10.0; ExtUI::setAxisPosition_mm(ExtUI::getAxisPosition_mm(axis) + dist, axis); }; -void process_lcd_j_command(const char* command) { +void process_lcd_j_command(const char *command) { switch (command[0]) { case 'E': break; case 'A': j_move_axis(command, ExtUI::extruder_t::E0); break; case 'Y': j_move_axis(command, ExtUI::axis_t::Y); break; case 'Z': j_move_axis(command, ExtUI::axis_t::Z); break; case 'X': j_move_axis(command, ExtUI::axis_t::X); break; - default: DEBUG_ECHOLNPAIR("UNKNOWN J COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN J COMMAND ", command); } } @@ -241,7 +238,7 @@ void process_lcd_j_command(const char* command) { * T:-2537.4 E:0 * Note only the curly brace stuff matters. */ -void process_lcd_p_command(const char* command) { +void process_lcd_p_command(const char *command) { switch (command[0]) { case 'P': @@ -301,15 +298,15 @@ void process_lcd_p_command(const char* command) { * {FILE:fcupdate.flg} * {SYS:OK} */ -void process_lcd_s_command(const char* command) { +void process_lcd_s_command(const char *command) { switch (command[0]) { case 'I': { // temperature information char message_buffer[MAX_CURLY_COMMAND]; sprintf_P(message_buffer, PSTR("{T0:%03i/%03i}{T1:000/000}{TP:%03i/%03i}"), - int(thermalManager.degHotend(0)), thermalManager.degTargetHotend(0), + thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), #if HAS_HEATED_BED - int(thermalManager.degBed()), thermalManager.degTargetBed() + thermalManager.wholeDegBed(), thermalManager.degTargetBed() #else 0, 0 #endif @@ -339,7 +336,7 @@ void process_lcd_s_command(const char* command) { #endif } break; - default: DEBUG_ECHOLNPAIR("UNKNOWN S COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN S COMMAND ", command); } } @@ -348,7 +345,7 @@ void process_lcd_s_command(const char* command) { * Currently {E:0} is not handled. Its function is unknown, * but it occurs during the temp window after a sys build. */ -void process_lcd_command(const char* command) { +void process_lcd_command(const char *command) { const char *current = command; byte command_code = *current++; @@ -363,11 +360,11 @@ void process_lcd_command(const char* command) { case 'C': process_lcd_c_command(current); break; case 'B': case 'E': process_lcd_eb_command(current); break; - default: DEBUG_ECHOLNPAIR("UNKNOWN COMMAND ", command); + default: DEBUG_ECHOLNPGM("UNKNOWN COMMAND ", command); } } else - DEBUG_ECHOLNPAIR("UNKNOWN COMMAND FORMAT ", command); + DEBUG_ECHOLNPGM("UNKNOWN COMMAND FORMAT ", command); } // @@ -414,130 +411,10 @@ void update_usb_status(const bool forceUpdate) { // This is mildly different than stock, which // appears to use the usb discovery status. // This is more logical. - if (last_usb_connected_status != MYSERIAL0.connected() || forceUpdate) { - last_usb_connected_status = MYSERIAL0.connected(); + if (last_usb_connected_status != MYSERIAL1.connected() || forceUpdate) { + last_usb_connected_status = MYSERIAL1.connected(); write_to_lcd_P(last_usb_connected_status ? PSTR("{R:UC}\r\n") : PSTR("{R:UD}\r\n")); } } -namespace ExtUI { - void onStartup() { - /** - * The Malyan LCD actually runs as a separate MCU on Serial 1. - * This code's job is to siphon the weird curly-brace commands from - * it and translate into ExtUI operations where possible. - */ - inbound_count = 0; - - #ifndef LCD_BAUDRATE - #define LCD_BAUDRATE 500000 - #endif - LCD_SERIAL.begin(LCD_BAUDRATE); - - // Signal init - write_to_lcd_P(PSTR("{SYS:STARTED}\r\n")); - - // send a version that says "unsupported" - write_to_lcd_P(PSTR("{VER:99}\r\n")); - - // No idea why it does this twice. - write_to_lcd_P(PSTR("{SYS:STARTED}\r\n")); - update_usb_status(true); - } - - void onIdle() { - /** - * - from printer on startup: - * {SYS:STARTED}{VER:29}{SYS:STARTED}{R:UD} - */ - - // First report USB status. - update_usb_status(false); - - // now drain commands... - while (LCD_SERIAL.available()) - parse_lcd_byte((byte)LCD_SERIAL.read()); - - #if ENABLED(SDSUPPORT) - // The way last printing status works is simple: - // The UI needs to see at least one TQ which is not 100% - // and then when the print is complete, one which is. - static uint8_t last_percent_done = 100; - - // If there was a print in progress, we need to emit the final - // print status as {TQ:100}. Reset last percent done so a new print will - // issue a percent of 0. - const uint8_t percent_done = (ExtUI::isPrinting() || ExtUI::isPrintingFromMediaPaused()) ? ExtUI::getProgress_percent() : last_printing_status ? 100 : 0; - if (percent_done != last_percent_done) { - char message_buffer[16]; - sprintf_P(message_buffer, PSTR("{TQ:%03i}"), percent_done); - write_to_lcd(message_buffer); - last_percent_done = percent_done; - last_printing_status = ExtUI::isPrinting(); - } - #endif - } - - void onPrinterKilled(PGM_P const error, PGM_P const component) { - set_lcd_error_P(error, component); - } - - #if HAS_PID_HEATING - - void onPidTuning(const result_t rst) { - // Called for temperature PID tuning result - //SERIAL_ECHOLNPAIR("OnPidTuning:", rst); - switch (rst) { - case PID_BAD_EXTRUDER_NUM: - set_lcd_error_P(GET_TEXT(MSG_PID_BAD_EXTRUDER_NUM)); - break; - case PID_TEMP_TOO_HIGH: - set_lcd_error_P(GET_TEXT(MSG_PID_TEMP_TOO_HIGH)); - break; - case PID_TUNING_TIMEOUT: - set_lcd_error_P(GET_TEXT(MSG_PID_TIMEOUT)); - break; - case PID_DONE: - set_lcd_error_P(GET_TEXT(MSG_PID_AUTOTUNE_DONE)); - break; - } - } - - #endif - - void onPrintTimerStarted() { write_to_lcd_P(PSTR("{SYS:BUILD}")); } - void onPrintTimerPaused() {} - void onPrintTimerStopped() { write_to_lcd_P(PSTR("{TQ:100}")); } - - // Not needed for Malyan LCD - void onStatusChanged(const char * const) {} - void onMediaInserted() {} - void onMediaError() {} - void onMediaRemoved() {} - void onPlayTone(const uint16_t, const uint16_t) {} - void onFilamentRunout(const extruder_t extruder) {} - void onUserConfirmRequired(const char * const) {} - void onHomingStart() {} - void onHomingComplete() {} - void onPrintFinished() {} - void onFactoryReset() {} - void onStoreSettings(char*) {} - void onLoadSettings(const char*) {} - void onConfigurationStoreWritten(bool) {} - void onConfigurationStoreRead(bool) {} - - #if HAS_MESH - void onMeshLevelingStart() {} - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {} - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {} - #endif - - #if ENABLED(POWER_LOSS_RECOVERY) - void onPowerLossResume() {} - #endif - - void onSteppersDisabled() {} - void onSteppersEnabled() {} -} - #endif // MALYAN_LCD diff --git a/Marlin/src/lcd/extui/malyan/malyan.h b/Marlin/src/lcd/extui/malyan/malyan.h new file mode 100644 index 000000000000..e8afbd4a59bd --- /dev/null +++ b/Marlin/src/lcd/extui/malyan/malyan.h @@ -0,0 +1,53 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * lcd/extui/malyan/malyan.h + */ + +#include "../../../HAL/shared/Marduino.h" + +// Track incoming command bytes from the LCD +extern uint16_t inbound_count; + +// For sending print completion messages +extern bool last_printing_status; + +void write_to_lcd_P(PGM_P const message); +void write_to_lcd(const char * const message); + +void set_lcd_error_P(PGM_P const error, PGM_P const component=nullptr); + +void process_lcd_c_command(const char *command); +void process_lcd_eb_command(const char *command); + +template +void j_move_axis(const char *command, const T axis); + +void process_lcd_j_command(const char *command); +void process_lcd_p_command(const char *command); +void process_lcd_s_command(const char *command); +void process_lcd_command(const char *command); + +void parse_lcd_byte(const byte b); +void update_usb_status(const bool forceUpdate); diff --git a/Marlin/src/lcd/extui/malyan/malyan_extui.cpp b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp new file mode 100644 index 000000000000..cae534de3b8e --- /dev/null +++ b/Marlin/src/lcd/extui/malyan/malyan_extui.cpp @@ -0,0 +1,167 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/extui/malyan/malyan_extui.cpp + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(MALYAN_LCD) + +#include "../ui_api.h" +#include "malyan.h" + +//#include "../../marlinui.h" +//#include "../../../sd/cardreader.h" +//#include "../../../module/temperature.h" +//#include "../../../module/stepper.h" +//#include "../../../module/motion.h" +//#include "../../../libs/duration_t.h" +//#include "../../../module/printcounter.h" +//#include "../../../gcode/queue.h" + +namespace ExtUI { + void onStartup() { + /** + * The Malyan LCD actually runs as a separate MCU on Serial 1. + * This code's job is to siphon the weird curly-brace commands from + * it and translate into ExtUI operations where possible. + */ + inbound_count = 0; + + #ifndef LCD_BAUDRATE + #define LCD_BAUDRATE 500000 + #endif + LCD_SERIAL.begin(LCD_BAUDRATE); + + // Signal init + write_to_lcd_P(PSTR("{SYS:STARTED}\r\n")); + + // send a version that says "unsupported" + write_to_lcd_P(PSTR("{VER:99}\r\n")); + + // No idea why it does this twice. + write_to_lcd_P(PSTR("{SYS:STARTED}\r\n")); + update_usb_status(true); + } + + void onIdle() { + /** + * - from printer on startup: + * {SYS:STARTED}{VER:29}{SYS:STARTED}{R:UD} + */ + + // First report USB status. + update_usb_status(false); + + // now drain commands... + while (LCD_SERIAL.available()) + parse_lcd_byte((byte)LCD_SERIAL.read()); + + #if ENABLED(SDSUPPORT) + // The way last printing status works is simple: + // The UI needs to see at least one TQ which is not 100% + // and then when the print is complete, one which is. + static uint8_t last_percent_done = 100; + + // If there was a print in progress, we need to emit the final + // print status as {TQ:100}. Reset last percent done so a new print will + // issue a percent of 0. + const uint8_t percent_done = (ExtUI::isPrinting() || ExtUI::isPrintingFromMediaPaused()) ? ExtUI::getProgress_percent() : last_printing_status ? 100 : 0; + if (percent_done != last_percent_done) { + char message_buffer[16]; + sprintf_P(message_buffer, PSTR("{TQ:%03i}"), percent_done); + write_to_lcd(message_buffer); + last_percent_done = percent_done; + last_printing_status = ExtUI::isPrinting(); + } + #endif + } + + void onPrinterKilled(PGM_P const error, PGM_P const component) { + set_lcd_error_P(error, component); + } + + #if HAS_PID_HEATING + + void onPidTuning(const result_t rst) { + // Called for temperature PID tuning result + //SERIAL_ECHOLNPGM("OnPidTuning:", rst); + switch (rst) { + case PID_STARTED: + set_lcd_error_P(GET_TEXT(MSG_PID_AUTOTUNE)); + break; + case PID_BAD_EXTRUDER_NUM: + set_lcd_error_P(GET_TEXT(MSG_PID_BAD_EXTRUDER_NUM)); + break; + case PID_TEMP_TOO_HIGH: + set_lcd_error_P(GET_TEXT(MSG_PID_TEMP_TOO_HIGH)); + break; + case PID_TUNING_TIMEOUT: + set_lcd_error_P(GET_TEXT(MSG_PID_TIMEOUT)); + break; + case PID_DONE: + set_lcd_error_P(GET_TEXT(MSG_PID_AUTOTUNE_DONE)); + break; + } + } + + #endif + + void onPrintTimerStarted() { write_to_lcd_P(PSTR("{SYS:BUILD}")); } + void onPrintTimerPaused() {} + void onPrintTimerStopped() { write_to_lcd_P(PSTR("{TQ:100}")); } + + // Not needed for Malyan LCD + void onStatusChanged(const char * const) {} + void onMediaInserted() {} + void onMediaError() {} + void onMediaRemoved() {} + void onPlayTone(const uint16_t, const uint16_t) {} + void onFilamentRunout(const extruder_t extruder) {} + void onUserConfirmRequired(const char * const) {} + void onHomingStart() {} + void onHomingComplete() {} + void onPrintFinished() {} + void onFactoryReset() {} + void onStoreSettings(char*) {} + void onLoadSettings(const char*) {} + void onPostprocessSettings() {} + void onConfigurationStoreWritten(bool) {} + void onConfigurationStoreRead(bool) {} + + #if HAS_MESH + void onMeshLevelingStart() {} + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) {} + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) {} + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + void onPowerLossResume() {} + #endif + + void onSteppersDisabled() {} + void onSteppersEnabled() {} +} + +#endif // MALYAN_LCD diff --git a/Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.cpp b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.cpp rename to Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp index e1c46811fe51..2fb28415a156 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.cpp +++ b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.cpp @@ -20,11 +20,11 @@ * */ -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" #include "SPIFlashStorage.h" extern W25QXXFlash W25QXX; @@ -43,9 +43,9 @@ uint32_t SPIFlashStorage::m_startAddress; static uint32_t rle_compress(T *output, uint32_t outputLength, T *input, uint32_t inputLength, uint32_t& inputProcessed) { uint32_t count = 0, out = 0, index, i; T pixel; - //32767 for uint16_t - //127 for uint16_t - //calculated at compile time + // 32767 for uint16_t + // 127 for uint16_t + // calculated at compile time constexpr T max = (0xFFFFFFFF >> (8 * (4 - sizeof(T)))) / 2; inputProcessed = 0; @@ -167,7 +167,7 @@ void SPIFlashStorage::endWrite() { #endif } -void SPIFlashStorage::savePage(uint8_t* buffer) { +void SPIFlashStorage::savePage(uint8_t *buffer) { W25QXX.SPI_FLASH_BufferWrite(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize); // Test env // char fname[256]; @@ -177,7 +177,7 @@ void SPIFlashStorage::savePage(uint8_t* buffer) { // fclose(fp); } -void SPIFlashStorage::loadPage(uint8_t* buffer) { +void SPIFlashStorage::loadPage(uint8_t *buffer) { W25QXX.SPI_FLASH_BufferRead(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize); // Test env // char fname[256]; @@ -204,7 +204,7 @@ void SPIFlashStorage::flushPage() { return; } - // Part of the m_pageData was compressed, so ajust the pointers, freeing what was processed, shift the buffer + // Part of the m_pageData was compressed, so adjust the pointers, freeing what was processed, shift the buffer // TODO: To avoid this copy, use a circular buffer memmove(m_pageData, m_pageData + inputProcessed, m_pageDataUsed - inputProcessed); m_pageDataUsed -= inputProcessed; @@ -256,7 +256,7 @@ void SPIFlashStorage::readPage() { #endif } -uint16_t SPIFlashStorage::inData(uint8_t* data, uint16_t size) { +uint16_t SPIFlashStorage::inData(uint8_t *data, uint16_t size) { // Don't write more than we can NOMORE(size, pageDataFree()); memcpy(m_pageData + m_pageDataUsed, data, size); @@ -264,7 +264,7 @@ uint16_t SPIFlashStorage::inData(uint8_t* data, uint16_t size) { return size; } -void SPIFlashStorage::writeData(uint8_t* data, uint16_t size) { +void SPIFlashStorage::writeData(uint8_t *data, uint16_t size) { // Flush a page if needed if (pageDataFree() == 0) flushPage(); @@ -289,7 +289,7 @@ void SPIFlashStorage::beginRead(uint32_t startAddress) { #endif } -uint16_t SPIFlashStorage::outData(uint8_t* data, uint16_t size) { +uint16_t SPIFlashStorage::outData(uint8_t *data, uint16_t size) { // Don't read more than we have NOMORE(size, pageDataFree()); memcpy(data, m_pageData + m_pageDataUsed, size); @@ -297,7 +297,7 @@ uint16_t SPIFlashStorage::outData(uint8_t* data, uint16_t size) { return size; } -void SPIFlashStorage::readData(uint8_t* data, uint16_t size) { +void SPIFlashStorage::readData(uint8_t *data, uint16_t size) { // Read a page if needed if (pageDataFree() == 0) readPage(); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.h b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h similarity index 89% rename from Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.h rename to Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h index 98c8067bd3c2..4683ff935187 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.h +++ b/Marlin/src/lcd/extui/mks_ui/SPIFlashStorage.h @@ -21,7 +21,7 @@ */ #pragma once -#include "../../../../libs/W25Qxx.h" +#include "../../../libs/W25Qxx.h" #define HAS_SPI_FLASH_COMPRESSION 1 @@ -55,7 +55,7 @@ * * When reading, it loads a full page from SPI Flash at once and * keeps it in a private SRAM buffer. Data is loaded as needed to - * fullfill requests. Sequential reads are optimal. + * fulfill requests. Sequential reads are optimal. * * SPIFlashStorage.beginRead(myStartAddress); * while (there is data to read) @@ -77,21 +77,21 @@ class SPIFlashStorage { // Write operation static void beginWrite(uint32_t startAddress); static void endWrite(); - static void writeData(uint8_t* data, uint16_t size); + static void writeData(uint8_t *data, uint16_t size); // Read operation static void beginRead(uint32_t startAddress); - static void readData(uint8_t* data, uint16_t size); + static void readData(uint8_t *data, uint16_t size); static uint32_t getCurrentPage() { return m_currentPage; } private: static void flushPage(); - static void savePage(uint8_t* buffer); - static void loadPage(uint8_t* buffer); + static void savePage(uint8_t *buffer); + static void loadPage(uint8_t *buffer); static void readPage(); - static uint16_t inData(uint8_t* data, uint16_t size); - static uint16_t outData(uint8_t* data, uint16_t size); + static uint16_t inData(uint8_t *data, uint16_t size); + static uint16_t outData(uint8_t *data, uint16_t size); static uint8_t m_pageData[SPI_FLASH_PageSize]; static uint32_t m_currentPage; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/SPI_TFT.cpp b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp similarity index 89% rename from Marlin/src/lcd/extui/lib/mks_ui/SPI_TFT.cpp rename to Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp index 76a4de35618e..42abd4bf6453 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/SPI_TFT.cpp +++ b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.cpp @@ -20,7 +20,7 @@ * */ -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -28,7 +28,7 @@ #include "pic_manager.h" #include "tft_lvgl_configuration.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" #include @@ -69,14 +69,14 @@ void TFT::LCD_init() { } void TFT::LCD_clear(uint16_t color) { - setWindow(0, 0, (TFT_WIDTH), (TFT_HEIGHT)); - tftio.WriteMultiple(color, (uint32_t)(TFT_WIDTH) * (TFT_HEIGHT)); + setWindow(0, 0, TFT_WIDTH, TFT_HEIGHT); + tftio.WriteMultiple(color, uint32_t(TFT_WIDTH) * uint32_t(TFT_HEIGHT)); } void TFT::LCD_Draw_Logo() { #if HAS_LOGO_IN_FLASH setWindow(0, 0, TFT_WIDTH, TFT_HEIGHT); - for (uint16_t i = 0; i < (TFT_HEIGHT); i ++) { + for (uint16_t i = 0; i < (TFT_HEIGHT); i++) { Pic_Logo_Read((uint8_t *)"", (uint8_t *)bmp_public_buf, (TFT_WIDTH) * 2); tftio.WriteSequence((uint16_t *)bmp_public_buf, TFT_WIDTH); } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/SPI_TFT.h b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.h similarity index 90% rename from Marlin/src/lcd/extui/lib/mks_ui/SPI_TFT.h rename to Marlin/src/lcd/extui/mks_ui/SPI_TFT.h index f3be3dc0baaa..62a084fb1196 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/SPI_TFT.h +++ b/Marlin/src/lcd/extui/mks_ui/SPI_TFT.h @@ -21,11 +21,8 @@ */ #pragma once -#include "../../../../inc/MarlinConfigPre.h" - -#if HAS_TFT_LVGL_UI - -#include "../../../tft_io/tft_io.h" +#include "../../tft_io/tft_io.h" +#include class TFT { public: @@ -39,5 +36,3 @@ class TFT { }; extern TFT SPI_TFT; - -#endif // HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_about.cpp b/Marlin/src/lcd/extui/mks_ui/draw_about.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_about.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_about.cpp index a57dfc504b05..3424bf7a0e6a 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_about.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_about.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_about.h b/Marlin/src/lcd/extui/mks_ui/draw_about.h similarity index 94% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_about.h rename to Marlin/src/lcd/extui/mks_ui/draw_about.h index 77d66aef1118..4e7b318eda54 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_about.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_about.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_about(); -extern void lv_clear_about(); +void lv_draw_about(); +void lv_clear_about(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.cpp similarity index 84% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.cpp index 04c5ee77cbc9..5de4a13c88d3 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.cpp @@ -19,15 +19,16 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -109,33 +110,32 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { void lv_draw_acceleration_settings() { scr = lv_screen_create(ACCELERATION_UI, machine_menu.AccelerationConfTitle); - if (!uiCfg.para_ui_page) { - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.acceleration); + dtostrf(planner.settings.acceleration, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.PrintAcceleration, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_ACCE_PRINT, 0, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.retract_acceleration); + dtostrf(planner.settings.retract_acceleration, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.RetractAcceleration, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_ACCE_RETRA, 1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.travel_acceleration); + dtostrf(planner.settings.travel_acceleration, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.TravelAcceleration, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_ACCE_TRAVEL, 2, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[X_AXIS]); + itoa(planner.settings.max_acceleration_mm_per_s2[X_AXIS], public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.X_Acceleration, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_ACCE_X, 3, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.next, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_ACCE_DOWN, true); } else { - sprintf_P(public_buf_l, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[Y_AXIS]); + itoa(planner.settings.max_acceleration_mm_per_s2[Y_AXIS], public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.Y_Acceleration, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_ACCE_Y, 0, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[Z_AXIS]); + itoa(planner.settings.max_acceleration_mm_per_s2[Z_AXIS], public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.Z_Acceleration, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_ACCE_Z, 1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[E_AXIS]); + itoa(planner.settings.max_acceleration_mm_per_s2[E_AXIS], public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.E0_Acceleration, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_ACCE_E0, 2, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), (int)planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)]); + itoa(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)], public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.E1_Acceleration, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_ACCE_E1, 3, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.previous, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_ACCE_UP, true); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.h similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.h index dc727391067c..e333e0ae5118 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_acceleration_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_acceleration_settings(); -extern void lv_clear_acceleration_settings(); +void lv_draw_acceleration_settings(); +void lv_clear_acceleration_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_advance_settings.cpp similarity index 94% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_advance_settings.cpp index feefc4107c92..28958b6d2c38 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_advance_settings.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -56,9 +57,9 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { break; #if ENABLED(MKS_WIFI_MODULE) case ID_WIFI_PARA: - lv_clear_advance_settings(); - lv_draw_wifi_settings(); - break; + lv_clear_advance_settings(); + lv_draw_wifi_settings(); + break; #endif #if HAS_ROTARY_ENCODER case ID_ENCODER_SETTINGS: diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_advance_settings.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_advance_settings.h index 8885fc6a4ea7..8848c34451bc 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_advance_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_advance_settings(); -extern void lv_clear_advance_settings(); +void lv_draw_advance_settings(); +void lv_clear_advance_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_auto_level_offset_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.cpp similarity index 88% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_auto_level_offset_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.cpp index e41ad44c7ab5..5ac24c4413f1 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_auto_level_offset_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.cpp @@ -19,15 +19,16 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if BOTH(HAS_TFT_LVGL_UI, HAS_BED_PROBE) #include "draw_ui.h" #include -#include "../../../../module/probe.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/probe.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -67,13 +68,13 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { void lv_draw_auto_level_offset_settings() { scr = lv_screen_create(NOZZLE_PROBE_OFFSET_UI, machine_menu.OffsetConfTitle); - sprintf_P(public_buf_l, PSTR("%.1f"), TERN(HAS_PROBE_XY_OFFSET, probe.offset.x, 0)); + dtostrf(TERN0(HAS_PROBE_XY_OFFSET, probe.offset.x), 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.Xoffset, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_OFFSET_X, 0, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), TERN(HAS_PROBE_XY_OFFSET, probe.offset.y, 0)); + dtostrf(TERN0(HAS_PROBE_XY_OFFSET, probe.offset.y), 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.Yoffset, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_OFFSET_Y, 1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), probe.offset.z); + dtostrf(TERN0(HAS_PROBE_XY_OFFSET, probe.offset.z), 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.Zoffset, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_OFFSET_Z, 2, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", common_menu.text_back, PARA_UI_BACL_POS_X, PARA_UI_BACL_POS_Y, event_handler, ID_OFFSET_RETURN, true); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_auto_level_offset_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.h similarity index 90% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_auto_level_offset_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.h index ec61862a241e..38314f6bc2df 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_auto_level_offset_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_auto_level_offset_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_auto_level_offset_settings(); -extern void lv_clear_auto_level_offset_settings(); +void lv_draw_auto_level_offset_settings(); +void lv_clear_auto_level_offset_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.cpp b/Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.cpp similarity index 82% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.cpp index 255f6e8f8ac1..c7e6a623413a 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.cpp @@ -19,23 +19,24 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../gcode/queue.h" -#include "../../../../gcode/gcode.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../gcode/queue.h" +#include "../../../gcode/gcode.h" +#include "../../../inc/MarlinConfig.h" #if ENABLED(EEPROM_SETTINGS) - #include "../../../../module/settings.h" + #include "../../../module/settings.h" #endif #if HAS_BED_PROBE - #include "../../../../module/probe.h" + #include "../../../module/probe.h" #endif extern lv_group_t *g; @@ -54,47 +55,48 @@ enum { ID_BABY_STEP_RETURN }; -static float babystep_dist=0.01; +static float babystep_dist = 0.01; static uint8_t has_adjust_z = 0; static void event_handler(lv_obj_t *obj, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; char baby_buf[30] = { 0 }; + char str_1[16]; switch (obj->mks_obj_id) { case ID_BABY_STEP_X_P: - sprintf_P(baby_buf, PSTR("M290 X%.3f"), babystep_dist); + sprintf_P(baby_buf, PSTR("M290 X%s"), dtostrf(babystep_dist, 1, 3, str_1)); gcode.process_subcommands_now_P(PSTR(baby_buf)); has_adjust_z = 1; break; case ID_BABY_STEP_X_N: - sprintf_P(baby_buf, PSTR("M290 X%.3f"), -babystep_dist); + sprintf_P(baby_buf, PSTR("M290 X%s"), dtostrf(-babystep_dist, 1, 3, str_1)); gcode.process_subcommands_now_P(PSTR(baby_buf)); has_adjust_z = 1; break; case ID_BABY_STEP_Y_P: - sprintf_P(baby_buf, PSTR("M290 Y%.3f"), babystep_dist); + sprintf_P(baby_buf, PSTR("M290 Y%s"), dtostrf(babystep_dist, 1, 3, str_1)); gcode.process_subcommands_now_P(PSTR(baby_buf)); has_adjust_z = 1; break; case ID_BABY_STEP_Y_N: - sprintf_P(baby_buf, PSTR("M290 Y%.3f"), -babystep_dist); + sprintf_P(baby_buf, PSTR("M290 Y%s"), dtostrf(-babystep_dist, 1, 3, str_1)); gcode.process_subcommands_now_P(PSTR(baby_buf)); has_adjust_z = 1; break; case ID_BABY_STEP_Z_P: - sprintf_P(baby_buf, PSTR("M290 Z%.3f"), babystep_dist); + sprintf_P(baby_buf, PSTR("M290 Z%s"), dtostrf(babystep_dist, 1, 3, str_1)); gcode.process_subcommands_now_P(PSTR(baby_buf)); has_adjust_z = 1; break; case ID_BABY_STEP_Z_N: - sprintf_P(baby_buf, PSTR("M290 Z%.3f"), -babystep_dist); + sprintf_P(baby_buf, PSTR("M290 Z%s"), dtostrf(-babystep_dist, 1, 3, str_1)); gcode.process_subcommands_now_P(PSTR(baby_buf)); has_adjust_z = 1; break; case ID_BABY_STEP_DIST: - if (abs((int)(100 * babystep_dist)) == 1) + if (ABS((int)(100 * babystep_dist)) == 1) babystep_dist = 0.05; - else if (abs((int)(100 * babystep_dist)) == 5) + else if (ABS((int)(100 * babystep_dist)) == 5) babystep_dist = 0.1; else babystep_dist = 0.01; @@ -122,9 +124,8 @@ void lv_draw_baby_stepping() { buttonV = lv_imgbtn_create(scr, nullptr, BTN_X_PIXEL * 3 + INTERVAL_V * 4, titleHeight, event_handler, ID_BABY_STEP_DIST); labelV = lv_label_create_empty(buttonV); #if HAS_ROTARY_ENCODER - if (gCfgItems.encoder_enable) { + if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonV); - } #endif lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_BABY_STEP_RETURN); @@ -161,7 +162,12 @@ void disp_baby_step_dist() { void disp_z_offset_value() { char buf[20]; - sprintf_P(buf, PSTR("offset Z: %.3f"), (float)TERN(HAS_BED_PROBE, probe.offset.z, 0)); + #if HAS_BED_PROBE + char str_1[16]; + sprintf_P(buf, PSTR("Offset Z: %s mm"), dtostrf(probe.offset.z, 1, 3, str_1)); + #else + strcpy_P(buf, PSTR("Offset Z: 0 mm")); + #endif lv_label_set_text(zOffsetText, buf); } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.h b/Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.h similarity index 87% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.h rename to Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.h index 8793ad772fca..f8efeabc4093 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_baby_stepping.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_baby_stepping.h @@ -25,10 +25,10 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_baby_stepping(); -extern void lv_clear_baby_stepping(); -extern void disp_baby_step_dist(); -extern void disp_z_offset_value(); +void lv_draw_baby_stepping(); +void lv_clear_baby_stepping(); +void disp_baby_step_dist(); +void disp_z_offset_value(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp b/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp similarity index 98% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp index 635625950b30..5248816f54a3 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_change_speed.cpp @@ -19,15 +19,16 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.h b/Marlin/src/lcd/extui/mks_ui/draw_change_speed.h similarity index 86% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.h rename to Marlin/src/lcd/extui/mks_ui/draw_change_speed.h index 75e4fe309936..66662d8811a1 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_change_speed.h @@ -28,11 +28,11 @@ #define MIN_EXT_SPEED_PERCENT 10 #define MAX_EXT_SPEED_PERCENT 999 -extern void lv_draw_change_speed(); -extern void lv_clear_change_speed(); -extern void disp_speed_step(); -extern void disp_print_speed(); -extern void disp_speed_type(); +void lv_draw_change_speed(); +void lv_clear_change_speed(); +void disp_speed_step(); +void disp_print_speed(); +void disp_speed_type(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_cloud_bind.cpp b/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_cloud_bind.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp index ae8fe3a3212b..1d0ae7775b2c 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_cloud_bind.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.cpp @@ -19,22 +19,23 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) #include "lv_conf.h" #include "draw_ui.h" -#include "../../../../MarlinCore.h" -#include "../../../../module/temperature.h" +#include "../../../MarlinCore.h" +#include "../../../module/temperature.h" #include "QR_Encode.h" extern lv_group_t * g; static lv_obj_t * scr; -static lv_obj_t *button_bind_or_not = NULL, *label_bind_or_not = NULL; -static lv_obj_t *buttonReleaseBind = NULL, *label_ReleaseBind = NULL; +static lv_obj_t *button_bind_or_not = nullptr, *label_bind_or_not = nullptr; +static lv_obj_t *buttonReleaseBind = nullptr, *label_ReleaseBind = nullptr; static lv_obj_t * text_id; static uint8_t unbinding_flag = 0; @@ -61,29 +62,29 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) { } void lv_draw_cloud_bind() { - lv_obj_t *buttonBack = NULL, *label_Back = NULL; + lv_obj_t *buttonBack = nullptr, *label_Back = nullptr; scr = lv_screen_create(BIND_UI); - button_bind_or_not = lv_btn_create(scr, NULL); + button_bind_or_not = lv_btn_create(scr, nullptr); lv_obj_set_pos(button_bind_or_not, TFT_WIDTH - 130, TFT_HEIGHT - 80 * 3); lv_obj_set_size(button_bind_or_not, PARA_UI_VALUE_BTN_X_SIZE + 15, PARA_UI_VALUE_BTN_Y_SIZE + 15); - lv_obj_set_event_cb_mks(button_bind_or_not, event_handler, ID_CLOUD_BIND_OR_NOT, NULL, 0); + lv_obj_set_event_cb_mks(button_bind_or_not, event_handler, ID_CLOUD_BIND_OR_NOT, nullptr, 0); lv_btn_set_style(button_bind_or_not, LV_BTN_STYLE_REL, &style_para_value); lv_btn_set_style(button_bind_or_not, LV_BTN_STYLE_PR, &style_para_value); label_bind_or_not = lv_label_create_empty(button_bind_or_not); - buttonReleaseBind = lv_btn_create(scr, NULL); + buttonReleaseBind = lv_btn_create(scr, nullptr); lv_obj_set_pos(buttonReleaseBind, TFT_WIDTH - 130, TFT_HEIGHT - 80 * 2); lv_obj_set_size(buttonReleaseBind, PARA_UI_VALUE_BTN_X_SIZE + 15, PARA_UI_VALUE_BTN_Y_SIZE + 15); - lv_obj_set_event_cb_mks(buttonReleaseBind, event_handler, ID_CLOUD_RELEASE_BIND, NULL, 0); + lv_obj_set_event_cb_mks(buttonReleaseBind, event_handler, ID_CLOUD_RELEASE_BIND, nullptr, 0); label_ReleaseBind = lv_label_create_empty(buttonReleaseBind); lv_label_set_text(label_ReleaseBind, cloud_menu.unbind); lv_obj_align(label_ReleaseBind, buttonReleaseBind, LV_ALIGN_CENTER, 0, 0); - buttonBack = lv_btn_create(scr, NULL); + buttonBack = lv_btn_create(scr, nullptr); lv_obj_set_pos(buttonBack, TFT_WIDTH - 130, TFT_HEIGHT - 80); lv_obj_set_size(buttonBack, PARA_UI_VALUE_BTN_X_SIZE + 15, PARA_UI_VALUE_BTN_Y_SIZE + 15); - lv_obj_set_event_cb_mks(buttonBack, event_handler, ID_CLOUD_BIND_RETURN, NULL, 0); + lv_obj_set_event_cb_mks(buttonBack, event_handler, ID_CLOUD_BIND_RETURN, nullptr, 0); lv_btn_set_style(buttonBack, LV_BTN_STYLE_REL, &style_para_back); lv_btn_set_style(buttonBack, LV_BTN_STYLE_PR, &style_para_back); label_Back = lv_label_create_empty(buttonBack); @@ -190,7 +191,7 @@ void display_qrcode(uint8_t *qrcode_data) { } void cloud_unbind() { - package_to_wifi(WIFI_CLOUD_UNBIND, (uint8_t *)0, 0); + package_to_wifi(WIFI_CLOUD_UNBIND, nullptr, 0); unbinding_flag = 1; } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_cloud_bind.h b/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.h similarity index 79% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_cloud_bind.h rename to Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.h index 1626680051ca..ff60f121a106 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_cloud_bind.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_cloud_bind.h @@ -22,15 +22,15 @@ #pragma once #ifdef __cplusplus -extern "C" { /* C-declarations for C++ */ + extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_cloud_bind(); -extern void lv_clear_cloud_bind(); -extern void disp_bind_state(); -extern void refresh_bind_ui(); -extern void display_qrcode(uint8_t *qrcode_data); -extern void cloud_unbind(); +void lv_draw_cloud_bind(); +void lv_clear_cloud_bind(); +void disp_bind_state(); +void refresh_bind_ui(); +void display_qrcode(uint8_t *qrcode_data); +void cloud_unbind(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp similarity index 82% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp index 6130e92224af..a390bd92e31b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.cpp @@ -24,34 +24,34 @@ * draw_dialog.cpp */ -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../sd/cardreader.h" -#include "../../../../gcode/queue.h" -#include "../../../../module/temperature.h" -#include "../../../../module/planner.h" -#include "../../../../gcode/gcode.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../sd/cardreader.h" +#include "../../../gcode/queue.h" +#include "../../../module/temperature.h" +#include "../../../module/planner.h" +#include "../../../gcode/gcode.h" +#include "../../../inc/MarlinConfig.h" #if ENABLED(EEPROM_SETTINGS) - #include "../../../../module/settings.h" + #include "../../../module/settings.h" #endif #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../feature/powerloss.h" #endif #if ENABLED(PARK_HEAD_ON_PAUSE) - #include "../../../../feature/pause.h" + #include "../../../feature/pause.h" #endif #if ENABLED(TOUCH_SCREEN_CALIBRATION) - #include "../../../tft_io/touch_calibration.h" + #include "../../tft_io/touch_calibration.h" #include "draw_touch_calibration.h" #endif @@ -61,10 +61,17 @@ static lv_obj_t *scr, *tempText1, *filament_bar; extern uint8_t sel_id; extern bool once_flag, gcode_preview_over; extern int upload_result; -extern uint32_t upload_time; +extern uint32_t upload_time_sec; extern uint32_t upload_size; extern bool temps_update_flag; +//#define CANCEL_ON_RIGHT // Put 'Cancel' on the right (as it was before) + +#define BTN_OK_X TERN(CANCEL_ON_RIGHT, 100, 280) +#define BTN_CANCEL_X TERN(CANCEL_ON_RIGHT, 280, 100) +#define BTN_OK_Y 180 +#define BTN_CANCEL_Y 180 + static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; if (DIALOG_IS(TYPE_PRINT_FILE)) { @@ -84,8 +91,8 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) { cur_name = strrchr(list_file.file_name[sel_id], '/'); SdFile file, *curDir; - card.endFilePrint(); - const char * const fname = card.diveToFile(true, curDir, cur_name); + card.abortFilePrintNow(); + const char * const fname = card.diveToFile(false, curDir, cur_name); if (!fname) return; if (file.open(curDir, fname, O_READ)) { gCfgItems.curFilesize = file.fileSize(); @@ -96,15 +103,13 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) { if (card.isFileOpen()) { feedrate_percentage = 100; planner.flow_percentage[0] = 100; - planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; + planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; #if HAS_MULTI_EXTRUDER planner.flow_percentage[1] = 100; - planner.e_factor[1] = planner.flow_percentage[1] * 0.01f; - #endif - card.startFileprint(); - #if ENABLED(POWER_LOSS_RECOVERY) - recovery.prepare(); + planner.e_factor[1] = planner.flow_percentage[1] * 0.01f; #endif + card.startOrResumeFilePrinting(); + TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); once_flag = false; } } @@ -117,8 +122,8 @@ static void btn_ok_event_cb(lv_obj_t *btn, lv_event_t event) { lv_draw_ready_print(); #if ENABLED(SDSUPPORT) - uiCfg.print_state = IDLE; - card.flag.abort_sd_printing = true; + uiCfg.print_state = IDLE; + card.abortFilePrintSoon(); #endif } else if (DIALOG_IS(TYPE_FINISH_PRINT)) { @@ -191,7 +196,7 @@ static void btn_cancel_event_cb(lv_obj_t *btn, lv_event_t event) { TERN_(ADVANCED_PAUSE_FEATURE, pause_menu_response = PAUSE_RESPONSE_RESUME_PRINT); } else if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT, TYPE_FILAMENT_UNLOAD_HEAT, TYPE_FILAMENT_HEAT_LOAD_COMPLETED, TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED)) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target= uiCfg.desireSprayerTempBak; + thermalManager.setTargetHotend(uiCfg.hotendTargetTempBak, uiCfg.extruderIndex); clear_cur_ui(); draw_return_ui(); } @@ -204,7 +209,7 @@ static void btn_cancel_event_cb(lv_obj_t *btn, lv_event_t event) { uiCfg.filament_loading_time_cnt = 0; uiCfg.filament_unloading_time_flg = false; uiCfg.filament_unloading_time_cnt = 0; - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = uiCfg.desireSprayerTempBak; + thermalManager.setTargetHotend(uiCfg.hotendTargetTempBak, uiCfg.extruderIndex); clear_cur_ui(); draw_return_ui(); } @@ -222,16 +227,16 @@ void lv_draw_dialog(uint8_t type) { lv_obj_t *labelDialog = lv_label_create(scr, ""); if (DIALOG_IS(TYPE_FINISH_PRINT, PAUSE_MESSAGE_RESUME)) { - btnOk = lv_button_btn_create(scr, BTN_OK_X + 90, BTN_OK_Y, 100, 50, btn_ok_event_cb); - lv_obj_t *labelOk = lv_label_create_empty(btnOk); // Add a label to the button - lv_label_set_text(labelOk, print_file_dialog_menu.confirm); // Set the labels text + btnOk = lv_button_btn_create(scr, BTN_OK_X + 90, BTN_OK_Y, 100, 50, btn_ok_event_cb); + lv_obj_t *labelOk = lv_label_create_empty(btnOk); // Add a label to the button + lv_label_set_text(labelOk, print_file_dialog_menu.confirm); // Set the labels text } else if (DIALOG_IS(PAUSE_MESSAGE_WAITING, PAUSE_MESSAGE_INSERT, PAUSE_MESSAGE_HEAT)) { btnOk = lv_button_btn_create(scr, BTN_OK_X + 90, BTN_OK_Y, 100, 50, btn_ok_event_cb); - lv_obj_t *labelOk = lv_label_create_empty(btnOk); // Add a label to the button - lv_label_set_text(labelOk, print_file_dialog_menu.confirm); // Set the labels text + lv_obj_t *labelOk = lv_label_create_empty(btnOk); // Add a label to the button + lv_label_set_text(labelOk, print_file_dialog_menu.confirm); // Set the labels text } - else if (DIALOG_IS(PAUSE_MESSAGE_PAUSING, PAUSE_MESSAGE_CHANGING, PAUSE_MESSAGE_UNLOAD, PAUSE_MESSAGE_LOAD, PAUSE_MESSAGE_PURGE, PAUSE_MESSAGE_RESUME, PAUSE_MESSAGE_HEATING)) { + else if (DIALOG_IS(PAUSE_MESSAGE_PARKING, PAUSE_MESSAGE_CHANGING, PAUSE_MESSAGE_UNLOAD, PAUSE_MESSAGE_LOAD, PAUSE_MESSAGE_PURGE, PAUSE_MESSAGE_RESUME, PAUSE_MESSAGE_HEATING)) { // nothing to do } else if (DIALOG_IS(WIFI_ENABLE_TIPS)) { @@ -262,7 +267,7 @@ void lv_draw_dialog(uint8_t type) { } #endif else if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT, TYPE_FILAMENT_UNLOAD_HEAT)) { - btnCancel = lv_button_btn_create(scr, BTN_OK_X+90, BTN_OK_Y, 100, 50, btn_cancel_event_cb); + btnCancel = lv_button_btn_create(scr, BTN_OK_X + 90, BTN_OK_Y, 100, 50, btn_cancel_event_cb); lv_obj_t *labelCancel = lv_label_create_empty(btnCancel); lv_label_set_text(labelCancel, print_file_dialog_menu.cancel); @@ -280,7 +285,7 @@ void lv_draw_dialog(uint8_t type) { lv_label_set_text(labelCancel, print_file_dialog_menu.cancel); filament_bar = lv_bar_create(scr, nullptr); - lv_obj_set_pos(filament_bar, (TFT_WIDTH-400)/2, ((TFT_HEIGHT - titleHeight)-40)/2); + lv_obj_set_pos(filament_bar, (TFT_WIDTH - 400) / 2, ((TFT_HEIGHT - titleHeight) - 40) / 2); lv_obj_set_size(filament_bar, 400, 25); lv_bar_set_style(filament_bar, LV_BAR_STYLE_INDIC, &lv_bar_style_indic); lv_bar_set_anim_time(filament_bar, 1000); @@ -294,11 +299,11 @@ void lv_draw_dialog(uint8_t type) { lv_obj_t *labelCancel = lv_label_create_empty(btnCancel); // Add a label to the button if (DIALOG_IS(PAUSE_MESSAGE_OPTION)) { - lv_label_set_text(labelOk, pause_msg_menu.purgeMore); // Set the labels text + lv_label_set_text(labelOk, pause_msg_menu.purgeMore); // Set the labels text lv_label_set_text(labelCancel, pause_msg_menu.continuePrint); } else { - lv_label_set_text(labelOk, print_file_dialog_menu.confirm); // Set the labels text + lv_label_set_text(labelOk, print_file_dialog_menu.confirm); // Set the labels text lv_label_set_text(labelCancel, print_file_dialog_menu.cancel); } } @@ -317,7 +322,7 @@ void lv_draw_dialog(uint8_t type) { lv_label_set_text(labelDialog, print_file_dialog_menu.print_finish); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } - else if (DIALOG_IS(PAUSE_MESSAGE_PAUSING)) { + else if (DIALOG_IS(PAUSE_MESSAGE_PARKING)) { lv_label_set_text(labelDialog, pause_msg_menu.pausing); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } @@ -399,28 +404,24 @@ void lv_draw_dialog(uint8_t type) { char buf[200]; int _index = 0; - strcpy(buf, DIALOG_UPLOAD_FINISH_EN); + strcpy_P(buf, PSTR(DIALOG_UPLOAD_FINISH_EN)); _index = strlen(buf); - buf[_index] = '\n'; - _index++; - strcat(buf, DIALOG_UPLOAD_SIZE_EN); + buf[_index++] = '\n'; + strcat_P(buf, PSTR(DIALOG_UPLOAD_SIZE_EN)); _index = strlen(buf); - buf[_index] = ':'; - _index++; - sprintf(&buf[_index], " %d KBytes\n", (int)(upload_size / 1024)); + buf[_index++] = ':'; + sprintf_P(&buf[_index], PSTR(" %d KBytes\n"), (int)(upload_size / 1024)); - strcat(buf, DIALOG_UPLOAD_TIME_EN); + strcat_P(buf, PSTR(DIALOG_UPLOAD_TIME_EN)); _index = strlen(buf); - buf[_index] = ':'; - _index++; - sprintf(&buf[_index], " %d s\n", (int)upload_time); + buf[_index++] = ':'; + sprintf_P(&buf[_index], PSTR(" %d s\n"), (int)upload_time_sec); - strcat(buf, DIALOG_UPLOAD_SPEED_EN); + strcat_P(buf, PSTR(DIALOG_UPLOAD_SPEED_EN)); _index = strlen(buf); - buf[_index] = ':'; - _index++; - sprintf(&buf[_index], " %d KBytes/s\n", (int)(upload_size / upload_time / 1024)); + buf[_index++] = ':'; + sprintf_P(&buf[_index], PSTR(" %d KBytes/s\n"), (int)(upload_size / upload_time_sec / 1024)); lv_label_set_text(labelDialog, buf); lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); @@ -428,7 +429,7 @@ void lv_draw_dialog(uint8_t type) { } else if (DIALOG_IS(TYPE_UPDATE_ESP_FIRMWARE)) { lv_label_set_text(labelDialog, DIALOG_UPDATE_WIFI_FIRMWARE_EN); - lv_obj_align(labelDialog, NULL, LV_ALIGN_CENTER, 0, -20); + lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -20); } #endif // MKS_WIFI_MODULE else if (DIALOG_IS(TYPE_FILAMENT_LOAD_HEAT)) { @@ -466,7 +467,7 @@ void lv_draw_dialog(uint8_t type) { #if ENABLED(MKS_WIFI_MODULE) else if (DIALOG_IS(TYPE_UNBIND)) { lv_label_set_text(labelDialog, common_menu.unbind_printer_tips); - lv_obj_align(labelDialog, NULL, LV_ALIGN_CENTER, 0, -70); + lv_obj_align(labelDialog, nullptr, LV_ALIGN_CENTER, 0, -70); } #endif #if HAS_ROTARY_ENCODER @@ -479,9 +480,9 @@ void lv_draw_dialog(uint8_t type) { void filament_sprayer_temp() { char buf[20] = {0}; - sprintf(buf, preheat_menu.value_state, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target); + sprintf(buf, preheat_menu.value_state, thermalManager.wholeDegHotend(uiCfg.extruderIndex), thermalManager.degTargetHotend(uiCfg.extruderIndex)); - strcpy(public_buf_l, uiCfg.curSprayerChoose < 1 ? extrude_menu.ext1 : extrude_menu.ext2); + strcpy(public_buf_l, uiCfg.extruderIndex < 1 ? extrude_menu.ext1 : extrude_menu.ext2); strcat_P(public_buf_l, PSTR(": ")); strcat(public_buf_l, buf); lv_label_set_text(tempText1, public_buf_l); @@ -500,7 +501,7 @@ void filament_dialog_handle() { planner.synchronize(); uiCfg.filament_loading_time_flg = true; uiCfg.filament_loading_time_cnt = 0; - sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E%d F%d\nG90"), uiCfg.curSprayerChoose, gCfgItems.filamentchange_load_length, gCfgItems.filamentchange_load_speed); + sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E%d F%d\nG90"), uiCfg.extruderIndex, gCfgItems.filamentchange_load_length, gCfgItems.filamentchange_load_speed); queue.inject(public_buf_m); } if (uiCfg.filament_heat_completed_unload) { @@ -510,17 +511,17 @@ void filament_dialog_handle() { planner.synchronize(); uiCfg.filament_unloading_time_flg = true; uiCfg.filament_unloading_time_cnt = 0; - sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E-%d F%d\nG90"), uiCfg.curSprayerChoose, gCfgItems.filamentchange_unload_length, gCfgItems.filamentchange_unload_speed); + sprintf_P(public_buf_m, PSTR("T%d\nG91\nG1 E-%d F%d\nG90"), uiCfg.extruderIndex, gCfgItems.filamentchange_unload_length, gCfgItems.filamentchange_unload_speed); queue.inject(public_buf_m); } - if (((abs((int)((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius - gCfgItems.filament_limit_temper)) <= 1) - || ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius > gCfgItems.filament_limit_temper)) - && (uiCfg.filament_load_heat_flg) - ) { - uiCfg.filament_load_heat_flg = false; - lv_clear_dialog(); - lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_LOAD_COMPLETED); + if (uiCfg.filament_load_heat_flg) { + const celsius_t diff = thermalManager.wholeDegHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temp; + if (ABS(diff) < 2 || diff > 0) { + uiCfg.filament_load_heat_flg = false; + lv_clear_dialog(); + lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_LOAD_COMPLETED); + } } if (uiCfg.filament_loading_completed) { @@ -529,13 +530,14 @@ void filament_dialog_handle() { lv_clear_dialog(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_LOAD_COMPLETED); } - if (((abs((int)((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius - gCfgItems.filament_limit_temper)) <= 1) - || ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius > gCfgItems.filament_limit_temper)) - && uiCfg.filament_unload_heat_flg - ) { - uiCfg.filament_unload_heat_flg = false; - lv_clear_dialog(); - lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED); + + if (uiCfg.filament_unload_heat_flg) { + const celsius_t diff = thermalManager.wholeDegHotend(uiCfg.extruderIndex) - gCfgItems.filament_limit_temp; + if (ABS(diff) < 2 || diff > 0) { + uiCfg.filament_unload_heat_flg = false; + lv_clear_dialog(); + lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED); + } } if (uiCfg.filament_unloading_completed) { diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.h b/Marlin/src/lcd/extui/mks_ui/draw_dialog.h similarity index 87% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.h rename to Marlin/src/lcd/extui/mks_ui/draw_dialog.h index c43a79a1418b..7e98a80c0a2b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_dialog.h @@ -54,7 +54,7 @@ enum { DIALOG_WIFI_ENABLE_TIPS, - DIALOG_PAUSE_MESSAGE_PAUSING, + DIALOG_PAUSE_MESSAGE_PARKING, DIALOG_PAUSE_MESSAGE_CHANGING, DIALOG_PAUSE_MESSAGE_UNLOAD, DIALOG_PAUSE_MESSAGE_WAITING, @@ -74,16 +74,11 @@ enum { DIALOG_TRANSFER_NO_DEVICE }; -#define BTN_OK_X 100 -#define BTN_OK_Y 180 -#define BTN_CANCEL_X 280 -#define BTN_CANCEL_Y 180 - -extern void lv_draw_dialog(uint8_t type); -extern void lv_clear_dialog(); -extern void filament_sprayer_temp(); -extern void filament_dialog_handle(); -extern void lv_filament_setbar(); +void lv_draw_dialog(uint8_t type); +void lv_clear_dialog(); +void filament_sprayer_temp(); +void filament_dialog_handle(); +void lv_filament_setbar(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_eeprom_settings.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_eeprom_settings.cpp index 15e319f4a699..c518d85ab553 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_eeprom_settings.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_eeprom_settings.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_eeprom_settings.h index 3d9f7cae001e..575ebbc6a2e6 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_eeprom_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_eeprom_settings(); -extern void lv_clear_eeprom_settings(); +void lv_draw_eeprom_settings(); +void lv_clear_eeprom_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_encoder_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_encoder_settings.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_encoder_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_encoder_settings.cpp index e090c6a3b594..04c6b51e2a4d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_encoder_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_encoder_settings.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" #if BUTTONS_EXIST(EN1, EN2) diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_encoder_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_encoder_settings.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_encoder_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_encoder_settings.h index 392dc67db776..bbf0c3485877 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_encoder_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_encoder_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_encoder_settings(); -extern void lv_clear_encoder_settings(); +void lv_draw_encoder_settings(); +void lv_clear_encoder_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.cpp b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp index bdae725cbb28..6955e1803dde 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_error_message.cpp @@ -19,18 +19,17 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include - #include "tft_lvgl_configuration.h" - #include "SPI_TFT.h" -#include "mks_hardware_test.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" +#include "mks_hardware.h" static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h b/Marlin/src/lcd/extui/mks_ui/draw_error_message.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h rename to Marlin/src/lcd/extui/mks_ui/draw_error_message.h index 35e3bd6cf51a..6999ecf5e486 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_error_message.h @@ -29,8 +29,8 @@ #define PGM_P const char * #endif -extern void lv_draw_error_message(PGM_P const msg); -extern void lv_clear_error_message(); +void lv_draw_error_message(PGM_P const msg); +void lv_clear_error_message(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp b/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp similarity index 62% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp index b9af6d33a814..b18bd283390f 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_extrusion.cpp @@ -19,16 +19,17 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/temperature.h" -#include "../../../../gcode/queue.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/temperature.h" +#include "../../../gcode/queue.h" +#include "../../../inc/MarlinConfig.h" static lv_obj_t *scr; extern lv_group_t *g; @@ -54,7 +55,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; switch (obj->mks_obj_id) { case ID_E_ADD: - if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= EXTRUDE_MINTEMP) { + if (thermalManager.degHotend(uiCfg.extruderIndex) >= EXTRUDE_MINTEMP) { sprintf_P((char *)public_buf_l, PSTR("G91\nG1 E%d F%d\nG90"), uiCfg.extruStep, 60 * uiCfg.extruSpeed); queue.inject(public_buf_l); extrudeAmount += uiCfg.extruStep; @@ -62,7 +63,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { } break; case ID_E_DEC: - if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= EXTRUDE_MINTEMP) { + if (thermalManager.degHotend(uiCfg.extruderIndex) >= EXTRUDE_MINTEMP) { sprintf_P((char *)public_buf_l, PSTR("G91\nG1 E%d F%d\nG90"), 0 - uiCfg.extruStep, 60 * uiCfg.extruSpeed); queue.enqueue_one_now(public_buf_l); extrudeAmount -= uiCfg.extruStep; @@ -71,17 +72,17 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { break; case ID_E_TYPE: if (ENABLED(HAS_MULTI_EXTRUDER)) { - if (uiCfg.curSprayerChoose == 0) { - uiCfg.curSprayerChoose = 1; + if (uiCfg.extruderIndex == 0) { + uiCfg.extruderIndex = 1; queue.inject_P(PSTR("T1")); } else { - uiCfg.curSprayerChoose = 0; + uiCfg.extruderIndex = 0; queue.inject_P(PSTR("T0")); } } else - uiCfg.curSprayerChoose = 0; + uiCfg.extruderIndex = 0; extrudeAmount = 0; disp_hotend_temp(); @@ -89,20 +90,18 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { disp_extru_amount(); break; case ID_E_STEP: - switch (abs(uiCfg.extruStep)) { - case 1: uiCfg.extruStep = 5; break; - case 5: uiCfg.extruStep = 10; break; - case 10: uiCfg.extruStep = 1; break; - default: break; + switch (uiCfg.extruStep) { + case uiCfg.eStepMin: uiCfg.extruStep = uiCfg.eStepMed; break; + case uiCfg.eStepMed: uiCfg.extruStep = uiCfg.eStepMax; break; + case uiCfg.eStepMax: uiCfg.extruStep = uiCfg.eStepMin; break; } disp_ext_step(); break; case ID_E_SPEED: switch (uiCfg.extruSpeed) { - case 1: uiCfg.extruSpeed = 10; break; - case 10: uiCfg.extruSpeed = 20; break; - case 20: uiCfg.extruSpeed = 1; break; - default: break; + case uiCfg.eSpeedL: uiCfg.extruSpeed = uiCfg.eSpeedN; break; + case uiCfg.eSpeedN: uiCfg.extruSpeed = uiCfg.eSpeedH; break; + case uiCfg.eSpeedH: uiCfg.extruSpeed = uiCfg.eSpeedL; break; } disp_ext_speed(); break; @@ -153,49 +152,38 @@ void lv_draw_extrusion() { } void disp_ext_type() { - if (uiCfg.curSprayerChoose == 1) { + if (uiCfg.extruderIndex == 1) { lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru2.bin"); - if (gCfgItems.multiple_language) { - lv_label_set_text(labelType, extrude_menu.ext2); - lv_obj_align(labelType, buttonType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } + if (gCfgItems.multiple_language) lv_label_set_text(labelType, extrude_menu.ext2); } else { lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru1.bin"); - if (gCfgItems.multiple_language) { - lv_label_set_text(labelType, extrude_menu.ext1); - lv_obj_align(labelType, buttonType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } + if (gCfgItems.multiple_language) lv_label_set_text(labelType, extrude_menu.ext1); } + if (gCfgItems.multiple_language) + lv_obj_align(labelType, buttonType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); } void disp_ext_speed() { - if (uiCfg.extruSpeed == 20) - lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_high.bin"); - else if (uiCfg.extruSpeed == 1) - lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_slow.bin"); - else - lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_normal.bin"); + switch (uiCfg.extruSpeed) { + case uiCfg.eSpeedH: lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_high.bin"); break; + case uiCfg.eSpeedL: lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_slow.bin"); break; + case uiCfg.eSpeedN: lv_imgbtn_set_src_both(buttonSpeed, "F:/bmp_speed_normal.bin"); break; + } if (gCfgItems.multiple_language) { - if (uiCfg.extruSpeed == 20) { - lv_label_set_text(labelSpeed, extrude_menu.high); - lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } - else if (uiCfg.extruSpeed == 1) { - lv_label_set_text(labelSpeed, extrude_menu.low); - lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } - else { - lv_label_set_text(labelSpeed, extrude_menu.normal); - lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); + switch (uiCfg.extruSpeed) { + case uiCfg.eSpeedH: lv_label_set_text(labelSpeed, extrude_menu.high); break; + case uiCfg.eSpeedL: lv_label_set_text(labelSpeed, extrude_menu.low); break; + case uiCfg.eSpeedN: lv_label_set_text(labelSpeed, extrude_menu.normal); break; } + lv_obj_align(labelSpeed, buttonSpeed, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); } } void disp_hotend_temp() { char buf[20] = {0}; - sprintf(buf, extrude_menu.temp_value, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target); + sprintf(buf, extrude_menu.temp_value, thermalManager.wholeDegHotend(uiCfg.extruderIndex), thermalManager.degTargetHotend(uiCfg.extruderIndex)); strcpy(public_buf_l, extrude_menu.temper_text); strcat(public_buf_l, buf); lv_label_set_text(tempText, public_buf_l); @@ -213,7 +201,7 @@ void disp_extru_amount() { sprintf(buf1, extrude_menu.count_value_cm, extrudeAmount / 10); else sprintf(buf1, extrude_menu.count_value_m, extrudeAmount / 1000); - strcat(public_buf_l, uiCfg.curSprayerChoose < 1 ? extrude_menu.ext1 : extrude_menu.ext2); + strcat(public_buf_l, uiCfg.extruderIndex == 0 ? extrude_menu.ext1 : extrude_menu.ext2); strcat(public_buf_l, buf1); lv_label_set_text(ExtruText, public_buf_l); @@ -221,33 +209,28 @@ void disp_extru_amount() { } void disp_ext_step() { - if (uiCfg.extruStep == 1) - lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step1_mm.bin"); - else if (uiCfg.extruStep == 5) - lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step5_mm.bin"); - else if (uiCfg.extruStep == 10) - lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step10_mm.bin"); + char buf3[12]; + sprintf_P(buf3, PSTR("%dmm"), uiCfg.extruStep); + + switch (uiCfg.extruStep) { + case uiCfg.eStepMin: lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step1_mm.bin"); break; + case uiCfg.eStepMed: lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step5_mm.bin"); break; + case uiCfg.eStepMax: lv_imgbtn_set_src_both(buttonStep, "F:/bmp_step10_mm.bin"); break; + } if (gCfgItems.multiple_language) { - if (uiCfg.extruStep == 1) { - lv_label_set_text(labelStep, extrude_menu.step_1mm); - lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } - else if (uiCfg.extruStep == 5) { - lv_label_set_text(labelStep, extrude_menu.step_5mm); - lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); - } - else if (uiCfg.extruStep == 10) { - lv_label_set_text(labelStep, extrude_menu.step_10mm); - lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); + switch (uiCfg.extruStep) { + case uiCfg.eStepMin: lv_label_set_text(labelStep, buf3); break; + case uiCfg.eStepMed: lv_label_set_text(labelStep, buf3); break; + case uiCfg.eStepMax: lv_label_set_text(labelStep, buf3); break; } + lv_obj_align(labelStep, buttonStep, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); } } void lv_clear_extrusion() { - #if HAS_ROTARY_ENCODER - if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g); - #endif + if (TERN0(HAS_ROTARY_ENCODER, gCfgItems.encoder_enable)) + lv_group_remove_all_objs(g); lv_obj_del(scr); } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.h b/Marlin/src/lcd/extui/mks_ui/draw_extrusion.h similarity index 82% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.h rename to Marlin/src/lcd/extui/mks_ui/draw_extrusion.h index 75db2fbab521..025276776784 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_extrusion.h @@ -25,13 +25,13 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_extrusion(); -extern void lv_clear_extrusion(); -extern void disp_ext_type(); -extern void disp_ext_step(); -extern void disp_ext_speed(); -extern void disp_hotend_temp(); -extern void disp_extru_amount(); +void lv_draw_extrusion(); +void lv_clear_extrusion(); +void disp_ext_type(); +void disp_ext_step(); +void disp_ext_speed(); +void disp_hotend_temp(); +void disp_extru_amount(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_fan.cpp b/Marlin/src/lcd/extui/mks_ui/draw_fan.cpp similarity index 68% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_fan.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_fan.cpp index af8b441f24c2..b2107709a4a3 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_fan.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_fan.cpp @@ -19,21 +19,21 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/temperature.h" -#include "../../../../gcode/queue.h" -#include "../../../../gcode/gcode.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/temperature.h" +#include "../../../gcode/queue.h" +#include "../../../gcode/gcode.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; -static lv_obj_t *scr; -static lv_obj_t *fanText; +static lv_obj_t *scr, *fanText; enum { ID_F_ADD = 1, @@ -44,46 +44,29 @@ enum { ID_F_RETURN }; -static uint8_t fanSpeed; - +uint8_t fanPercent = 0; static void event_handler(lv_obj_t *obj, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; - + const uint8_t temp = map(thermalManager.fan_speed[0], 0, 255, 0, 100); + if (abs(fanPercent - temp) > 2) fanPercent = temp; switch (obj->mks_obj_id) { - case ID_F_ADD: - if (fanSpeed < 254) fanSpeed++; - break; - case ID_F_DEC: - if (fanSpeed > 0) fanSpeed--; - break; - case ID_F_HIGH: - fanSpeed = 255; - break; - case ID_F_MID: - fanSpeed = 127; - break; - case ID_F_OFF: - gcode.process_subcommands_now_P(PSTR("M107")); - return; - case ID_F_RETURN: - clear_cur_ui(); - draw_return_ui(); - return; + case ID_F_ADD: if (fanPercent < 100) fanPercent++; break; + case ID_F_DEC: if (fanPercent != 0) fanPercent--; break; + case ID_F_HIGH: fanPercent = 100; break; + case ID_F_MID: fanPercent = 50; break; + case ID_F_OFF: fanPercent = 0; break; + case ID_F_RETURN: clear_cur_ui(); draw_return_ui(); return; } - sprintf_P(public_buf_l, PSTR("M106 S%d"), fanSpeed); - gcode.process_subcommands_now(public_buf_l); + thermalManager.set_fan_speed(0, map(fanPercent, 0, 100, 0, 255)); + if (obj->mks_obj_id != ID_F_RETURN) disp_fan_value(); } void lv_draw_fan() { lv_obj_t *buttonAdd; - #if HAS_FAN - fanSpeed = thermalManager.fan_speed[0]; - #endif - scr = lv_screen_create(FAN_UI); // Create an Image button - buttonAdd = lv_big_button_create(scr, "F:/bmp_Add.bin", fan_menu.add, INTERVAL_V, titleHeight, event_handler, ID_F_ADD); + buttonAdd = lv_big_button_create(scr, "F:/bmp_Add.bin", fan_menu.add, INTERVAL_V, titleHeight, event_handler, ID_F_ADD); lv_obj_clear_protect(buttonAdd, LV_PROTECT_FOLLOW); lv_big_button_create(scr, "F:/bmp_Dec.bin", fan_menu.dec, BTN_X_PIXEL * 3 + INTERVAL_V * 4, titleHeight, event_handler, ID_F_DEC); lv_big_button_create(scr, "F:/bmp_speed255.bin", fan_menu.full, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_F_HIGH); @@ -97,12 +80,11 @@ void lv_draw_fan() { } void disp_fan_value() { - char buf1[10] = {0}; - public_buf_l[0] = '\0'; - strcat(public_buf_l, fan_menu.state); - strcat_P(public_buf_l, PSTR(": ")); - sprintf_P(buf1, PSTR("%3d"), thermalManager.fan_speed[0]); - strcat(public_buf_l, buf1); + #if HAS_FAN + sprintf_P(public_buf_l, PSTR("%s: %3d%%"), fan_menu.state, fanPercent); + #else + sprintf_P(public_buf_l, PSTR("%s: ---"), fan_menu.state); + #endif lv_label_set_text(fanText, public_buf_l); lv_obj_align(fanText, nullptr, LV_ALIGN_CENTER, 0, -65); } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_fan.h b/Marlin/src/lcd/extui/mks_ui/draw_fan.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_fan.h rename to Marlin/src/lcd/extui/mks_ui/draw_fan.h index d9b23fbbe4ae..0db87eb4f64e 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_fan.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_fan.h @@ -25,9 +25,9 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_fan(); -extern void lv_clear_fan(); -extern void disp_fan_value(); +void lv_draw_fan(); +void lv_clear_fan(); +void disp_fan_value(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.cpp b/Marlin/src/lcd/extui/mks_ui/draw_filament_change.cpp similarity index 69% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_filament_change.cpp index cff99119e8e8..8432c74b1a37 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_filament_change.cpp @@ -19,18 +19,19 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/temperature.h" -#include "../../../../gcode/gcode.h" -#include "../../../../module/motion.h" -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/temperature.h" +#include "../../../gcode/gcode.h" +#include "../../../module/motion.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -50,25 +51,26 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { switch (obj->mks_obj_id) { case ID_FILAMNT_IN: uiCfg.filament_load_heat_flg = true; - if ((abs(thermalManager.temp_hotend[uiCfg.curSprayerChoose].target - thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius) <= 1) - || (gCfgItems.filament_limit_temper <= thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius)) { + if (ABS(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.wholeDegHotend(uiCfg.extruderIndex)) <= 1 + || gCfgItems.filament_limit_temp <= thermalManager.wholeDegHotend(uiCfg.extruderIndex) + ) { lv_clear_filament_change(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_LOAD_COMPLETED); } else { lv_clear_filament_change(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_LOAD_HEAT); - if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].target < gCfgItems.filament_limit_temper) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = gCfgItems.filament_limit_temper; - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + if (thermalManager.degTargetHotend(uiCfg.extruderIndex) < gCfgItems.filament_limit_temp) { + thermalManager.setTargetHotend(gCfgItems.filament_limit_temp, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } } break; case ID_FILAMNT_OUT: uiCfg.filament_unload_heat_flg = true; - if ((thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > 0) - && ((abs((int)((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target - thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius)) <= 1) - || ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius >= gCfgItems.filament_limit_temper)) + if (thermalManager.degTargetHotend(uiCfg.extruderIndex) + && (ABS(thermalManager.degTargetHotend(uiCfg.extruderIndex) - thermalManager.wholeDegHotend(uiCfg.extruderIndex)) <= 1 + || thermalManager.wholeDegHotend(uiCfg.extruderIndex) >= gCfgItems.filament_limit_temp) ) { lv_clear_filament_change(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_HEAT_UNLOAD_COMPLETED); @@ -76,28 +78,28 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { else { lv_clear_filament_change(); lv_draw_dialog(DIALOG_TYPE_FILAMENT_UNLOAD_HEAT); - if (thermalManager.temp_hotend[uiCfg.curSprayerChoose].target < gCfgItems.filament_limit_temper) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = gCfgItems.filament_limit_temper; - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + if (thermalManager.degTargetHotend(uiCfg.extruderIndex) < gCfgItems.filament_limit_temp) { + thermalManager.setTargetHotend(gCfgItems.filament_limit_temp, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } filament_sprayer_temp(); } break; case ID_FILAMNT_TYPE: #if HAS_MULTI_EXTRUDER - uiCfg.curSprayerChoose = !uiCfg.curSprayerChoose; + uiCfg.extruderIndex = !uiCfg.extruderIndex; #endif disp_filament_type(); break; case ID_FILAMNT_RETURN: #if HAS_MULTI_EXTRUDER if (uiCfg.print_state != IDLE && uiCfg.print_state != REPRINTED) - gcode.process_subcommands_now_P(uiCfg.curSprayerChoose_bak == 1 ? PSTR("T1") : PSTR("T0")); + gcode.process_subcommands_now_P(uiCfg.extruderIndexBak == 1 ? PSTR("T1") : PSTR("T0")); #endif feedrate_mm_s = (float)uiCfg.moveSpeed_bak; if (uiCfg.print_state == PAUSED) planner.set_e_position_mm((destination.e = current_position.e = uiCfg.current_e_position_bak)); - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = uiCfg.desireSprayerTempBak; + thermalManager.setTargetHotend(uiCfg.hotendTargetTempBak, uiCfg.extruderIndex); clear_cur_ui(); draw_return_ui(); @@ -114,9 +116,8 @@ void lv_draw_filament_change() { buttonType = lv_imgbtn_create(scr, nullptr, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_FILAMNT_TYPE); #if HAS_ROTARY_ENCODER - if (gCfgItems.encoder_enable) { + if (gCfgItems.encoder_enable) lv_group_add_obj(g, buttonType); - } #endif lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_FILAMNT_RETURN); @@ -132,7 +133,7 @@ void lv_draw_filament_change() { } void disp_filament_type() { - if (uiCfg.curSprayerChoose == 1) { + if (uiCfg.extruderIndex == 1) { lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru2.bin"); if (gCfgItems.multiple_language) { lv_label_set_text(labelType, preheat_menu.ext2); @@ -153,8 +154,8 @@ void disp_filament_temp() { public_buf_l[0] = '\0'; - strcat(public_buf_l, uiCfg.curSprayerChoose < 1 ? preheat_menu.ext1 : preheat_menu.ext2); - sprintf(buf, preheat_menu.value_state, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target); + strcat(public_buf_l, uiCfg.extruderIndex < 1 ? preheat_menu.ext1 : preheat_menu.ext2); + sprintf(buf, preheat_menu.value_state, thermalManager.wholeDegHotend(uiCfg.extruderIndex), thermalManager.degTargetHotend(uiCfg.extruderIndex)); strcat_P(public_buf_l, PSTR(": ")); strcat(public_buf_l, buf); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.h b/Marlin/src/lcd/extui/mks_ui/draw_filament_change.h similarity index 87% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.h rename to Marlin/src/lcd/extui/mks_ui/draw_filament_change.h index 9c1c9a876750..d3536a380ad1 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_change.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_filament_change.h @@ -25,10 +25,10 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_filament_change(); -extern void lv_clear_filament_change(); -extern void disp_filament_type(); -extern void disp_filament_temp(); +void lv_draw_filament_change(); +void lv_clear_filament_change(); +void disp_filament_type(); +void disp_filament_temp(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_filament_settings.cpp similarity index 89% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_filament_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_filament_settings.cpp index 128989a27cff..e3ca75da5140 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_filament_settings.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -92,22 +93,22 @@ void lv_draw_filament_settings() { scr = lv_screen_create(FILAMENT_SETTINGS_UI, machine_menu.FilamentConfTitle); if (!uiCfg.para_ui_page) { - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.filamentchange_load_length); + itoa(gCfgItems.filamentchange_load_length, public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.InLength, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_FILAMENT_SET_IN_LENGTH, 0, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.filamentchange_load_speed); + itoa(gCfgItems.filamentchange_load_speed, public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.InSpeed, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_FILAMENT_SET_IN_SPEED, 1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.filamentchange_unload_length); + itoa(gCfgItems.filamentchange_unload_length, public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.OutLength, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_FILAMENT_SET_OUT_LENGTH, 2, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.filamentchange_unload_speed); + itoa(gCfgItems.filamentchange_unload_speed, public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.OutSpeed, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_FILAMENT_SET_OUT_SPEED, 3, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.next, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_FILAMENT_SET_DOWN, true); } else { - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.filament_limit_temper); + itoa(gCfgItems.filament_limit_temp, public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.FilamentTemperature, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_FILAMENT_SET_TEMP, 0, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.previous, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_FILAMENT_SET_UP, true); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_filament_settings.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_filament_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_filament_settings.h index f9967df31f20..3d190e99c731 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_filament_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_filament_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_filament_settings(); -extern void lv_clear_filament_settings(); +void lv_draw_filament_settings(); +void lv_clear_filament_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_gcode.cpp b/Marlin/src/lcd/extui/mks_ui/draw_gcode.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_gcode.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_gcode.cpp index bd7028720aca..fa9f7b0c4776 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_gcode.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_gcode.cpp @@ -19,17 +19,18 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; -static lv_obj_t *scr,*outL,*outV = 0; +static lv_obj_t *scr, *outL, *outV = 0; static int currentWritePos = 0; extern uint8_t public_buf[513]; extern "C" { extern char public_buf_m[100]; } @@ -58,7 +59,7 @@ void lv_show_gcode_output(void * that, const char * txt) { if (!memcmp(txt, "echo:", 5)) { public_buf[0] = 0; // Clear output buffer return; - } + } // Avoid overflow if the answer is too large size_t len = strlen((const char*)public_buf), tlen = strlen(txt); @@ -68,19 +69,19 @@ void lv_show_gcode_output(void * that, const char * txt) { } } -void lv_serial_capt_hook(void * userPointer, uint8_t c) -{ +void lv_serial_capt_hook(void * userPointer, uint8_t c) { if (c == '\n' || currentWritePos == sizeof(public_buf_m) - 1) { // End of line, probably end of command anyway public_buf_m[currentWritePos] = 0; lv_show_gcode_output(userPointer, public_buf_m); currentWritePos = 0; } - else public_buf_m[currentWritePos++] = c; + else + public_buf_m[currentWritePos++] = c; } -void lv_eom_hook(void *) -{ + +void lv_eom_hook(void *) { // Message is done, let's remove the hook now - MYSERIAL0.setHook(); + MYSERIAL1.setHook(); // We are back from the keyboard, so let's redraw ourselves draw_return_ui(); } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_gcode.h b/Marlin/src/lcd/extui/mks_ui/draw_gcode.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_gcode.h rename to Marlin/src/lcd/extui/mks_ui/draw_gcode.h index 30a378a15a72..4e1610431ef9 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_gcode.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_gcode.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_gcode(bool clear = false); -extern void lv_clear_gcode(); +void lv_draw_gcode(bool clear = false); +void lv_clear_gcode(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_home.cpp b/Marlin/src/lcd/extui/mks_ui/draw_home.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_home.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_home.cpp index 588b940bb645..8dba33756a9d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_home.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_home.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -28,8 +29,8 @@ #include "draw_ui.h" #include -#include "../../../../gcode/queue.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../gcode/queue.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_home.h b/Marlin/src/lcd/extui/mks_ui/draw_home.h similarity index 94% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_home.h rename to Marlin/src/lcd/extui/mks_ui/draw_home.h index 779cbb01303a..7375dc7aa8cb 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_home.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_home.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_home(); -extern void lv_clear_home(); +void lv_draw_home(); +void lv_clear_home(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_homing_sensitivity_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_homing_sensitivity_settings.cpp similarity index 81% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_homing_sensitivity_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_homing_sensitivity_settings.cpp index 9a1c9dec2a3c..212f2b4995cd 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_homing_sensitivity_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_homing_sensitivity_settings.cpp @@ -19,17 +19,18 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfig.h" + +#include "../../../inc/MarlinConfig.h" #if HAS_TFT_LVGL_UI && USE_SENSORLESS #include "draw_ui.h" #include -#include "../../../../module/planner.h" -#include "../../../../module/probe.h" -#include "../../../../module/stepper/indirection.h" -#include "../../../../feature/tmc_util.h" +#include "../../../module/planner.h" +#include "../../../module/probe.h" +#include "../../../module/stepper/indirection.h" +#include "../../../feature/tmc_util.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -66,10 +67,10 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { break; #if Z2_SENSORLESS case ID_SENSITIVITY_Z2: - value = z2_sensitivity; - lv_clear_homing_sensitivity_settings(); - lv_draw_number_key(); - break; + value = z2_sensitivity; + lv_clear_homing_sensitivity_settings(); + lv_draw_number_key(); + break; #endif } } @@ -77,17 +78,17 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { void lv_draw_homing_sensitivity_settings() { scr = lv_screen_create(HOMING_SENSITIVITY_UI, machine_menu.HomingSensitivityConfTitle); - sprintf_P(public_buf_l, PSTR("%d"), TERN(X_SENSORLESS, stepperX.homing_threshold(), 0)); + itoa(TERN(X_SENSORLESS, stepperX.homing_threshold(), 0), public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.X_Sensitivity, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_SENSITIVITY_X, 0, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), TERN(Y_SENSORLESS, stepperY.homing_threshold(), 0)); + itoa(TERN(Y_SENSORLESS, stepperY.homing_threshold(), 0), public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.Y_Sensitivity, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_SENSITIVITY_Y, 1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), TERN(Z_SENSORLESS, stepperZ.homing_threshold(), 0)); + itoa(TERN(Z_SENSORLESS, stepperZ.homing_threshold(), 0), public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.Z_Sensitivity, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_SENSITIVITY_Z, 2, public_buf_l); #if Z2_SENSORLESS - sprintf_P(public_buf_l, PSTR("%d"), TERN(Z2_SENSORLESS, stepperZ2.homing_threshold(), 0)); + itoa(TERN(Z2_SENSORLESS, stepperZ2.homing_threshold(), 0), public_buf_l, 10); lv_screen_menu_item_1_edit(scr, machine_menu.Z2_Sensitivity, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_SENSITIVITY_Z2, 3, public_buf_l); #endif diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_homing_sensitivity_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_homing_sensitivity_settings.h similarity index 90% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_homing_sensitivity_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_homing_sensitivity_settings.h index c6f0e1145739..e08639137341 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_homing_sensitivity_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_homing_sensitivity_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_homing_sensitivity_settings(); -extern void lv_clear_homing_sensitivity_settings(); +void lv_draw_homing_sensitivity_settings(); +void lv_clear_homing_sensitivity_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp similarity index 87% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp index 1c4ac9da6123..d410b2003c25 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.cpp @@ -19,15 +19,16 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if BOTH(HAS_TFT_LVGL_UI, HAS_CLASSIC_JERK) #include "draw_ui.h" #include -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -73,16 +74,16 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { void lv_draw_jerk_settings() { scr = lv_screen_create(JERK_UI, machine_menu.JerkConfTitle); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.max_jerk[X_AXIS]); + dtostrf(planner.max_jerk[X_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.X_Jerk, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_JERK_X, 0, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.max_jerk[Y_AXIS]); + dtostrf(planner.max_jerk[Y_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.Y_Jerk, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_JERK_Y, 1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.max_jerk[Z_AXIS]); + dtostrf(planner.max_jerk[Z_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.Z_Jerk, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_JERK_Z, 2, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.max_jerk[E_AXIS]); + dtostrf(planner.max_jerk[E_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.E_Jerk, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_JERK_E, 3, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", common_menu.text_back, PARA_UI_BACL_POS_X, PARA_UI_BACL_POS_Y, event_handler, ID_JERK_RETURN, true); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.h similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.h index 69fd34460981..7f5ffc3ac50d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_jerk_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_jerk_settings(); -extern void lv_clear_jerk_settings(); +void lv_draw_jerk_settings(); +void lv_clear_jerk_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_keyboard.cpp b/Marlin/src/lcd/extui/mks_ui/draw_keyboard.cpp similarity index 79% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_keyboard.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_keyboard.cpp index 2cf6f05a99ac..e1184c21955b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_keyboard.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_keyboard.cpp @@ -19,15 +19,16 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" -#include "../../../../gcode/queue.h" +#include "../../../inc/MarlinConfig.h" +#include "../../../gcode/queue.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -40,10 +41,10 @@ static const char * kb_map_lc[] = {"1#", "q", "w", "e", "r", "t", "y", "u", "i", LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; static const lv_btnm_ctrl_t kb_ctrl_lc_map[] = { - LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, - LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; + LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, + LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; static const char * kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", LV_SYMBOL_BACKSPACE, "\n", "abc", "A", "S", "D", "F", "G", "H", "J", "K", "L", LV_SYMBOL_NEW_LINE, "\n", @@ -51,32 +52,33 @@ static const char * kb_map_uc[] = {"1#", "Q", "W", "E", "R", "T", "Y", "U", "I", LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; static const lv_btnm_ctrl_t kb_ctrl_uc_map[] = { - LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, - LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; + LV_KB_CTRL_BTN_FLAGS | 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, + LV_KB_CTRL_BTN_FLAGS | 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; -static const char * kb_map_spec[] = {"0", "1", "2", "3", "4" ,"5", "6", "7", "8", "9", ".", LV_SYMBOL_BACKSPACE, "\n", +static const char * kb_map_spec[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", LV_SYMBOL_BACKSPACE, "\n", "abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n", "\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n", LV_SYMBOL_CLOSE, LV_SYMBOL_LEFT, " ", LV_SYMBOL_RIGHT, LV_SYMBOL_OK, ""}; static const lv_btnm_ctrl_t kb_ctrl_spec_map[] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, - LV_KB_CTRL_BTN_FLAGS | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, + LV_KB_CTRL_BTN_FLAGS | 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + LV_KB_CTRL_BTN_FLAGS | 2, 2, 6, 2, LV_KB_CTRL_BTN_FLAGS | 2}; static const lv_btnm_ctrl_t kb_ctrl_num_map[] = { - 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, - 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, - 1, 1, 1, 2, - 1, 1, 1, 1, 1}; + 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, + 1, 1, 1, LV_KB_CTRL_BTN_FLAGS | 2, + 1, 1, 1, 2, + 1, 1, 1, 1, 1 +}; static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) { if (event != LV_EVENT_VALUE_CHANGED) return; - lv_kb_ext_t * ext = (lv_kb_ext_t * )lv_obj_get_ext_attr(kb); + lv_kb_ext_t *ext = (lv_kb_ext_t*)lv_obj_get_ext_attr(kb); const uint16_t btn_id = lv_btnm_get_active_btn(kb); if (btn_id == LV_BTNM_BTN_NONE) return; if (lv_btnm_get_btn_ctrl(kb, btn_id, LV_BTNM_CTRL_HIDDEN | LV_BTNM_CTRL_INACTIVE)) return; @@ -119,12 +121,12 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) { switch (keyboard_value) { #if ENABLED(MKS_WIFI_MODULE) case wifiName: - memcpy(uiCfg.wifi_name,ret_ta_txt,sizeof(uiCfg.wifi_name)); + memcpy(uiCfg.wifi_name, ret_ta_txt, sizeof(uiCfg.wifi_name)); lv_clear_keyboard(); draw_return_ui(); break; case wifiPassWord: - memcpy(uiCfg.wifi_key,ret_ta_txt,sizeof(uiCfg.wifi_name)); + memcpy(uiCfg.wifi_key, ret_ta_txt, sizeof(uiCfg.wifi_name)); lv_clear_keyboard(); draw_return_ui(); break; @@ -137,7 +139,7 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) { gCfgItems.wifi_mode_sel = STA_MODEL; - package_to_wifi(WIFI_PARA_SET, (uint8_t *)0, 0); + package_to_wifi(WIFI_PARA_SET, nullptr, 0); public_buf_l[0] = 0xA5; public_buf_l[1] = 0x09; @@ -148,7 +150,7 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) { public_buf_l[6] = 0x00; raw_send_to_wifi((uint8_t*)public_buf_l, 6); - last_disp_state = KEY_BOARD_UI; + last_disp_state = KEYBOARD_UI; lv_clear_keyboard(); wifi_tips_type = TIPS_TYPE_JOINING; lv_draw_wifi_tips(); @@ -156,15 +158,15 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) { #endif // MKS_WIFI_MODULE case autoLevelGcodeCommand: uint8_t buf[100]; - strncpy((char *)buf,ret_ta_txt,sizeof(buf)); - update_gcode_command(AUTO_LEVELING_COMMAND_ADDR,buf); + strncpy((char *)buf, ret_ta_txt, sizeof(buf)); + update_gcode_command(AUTO_LEVELING_COMMAND_ADDR, buf); lv_clear_keyboard(); draw_return_ui(); break; case GCodeCommand: - if (queue.length <= (BUFSIZE - 3)) { + if (!queue.ring_buffer.full(3)) { // Hook anything that goes to the serial port - MYSERIAL0.setHook(lv_serial_capt_hook, lv_eom_hook, 0); + MYSERIAL1.setHook(lv_serial_capt_hook, lv_eom_hook, 0); queue.enqueue_one_now(ret_ta_txt); } lv_clear_keyboard(); @@ -175,7 +177,7 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) { } else lv_kb_set_ta(kb, nullptr); // De-assign the text area to hide it cursor if needed - return; + return; } // Add the characters to the text area if set @@ -216,22 +218,22 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) { } void lv_draw_keyboard() { - scr = lv_screen_create(KEY_BOARD_UI, ""); + scr = lv_screen_create(KEYBOARD_UI, ""); // Create styles for the keyboard static lv_style_t rel_style, pr_style; lv_style_copy(&rel_style, &lv_style_btn_rel); - rel_style.body.radius = 0; + rel_style.body.radius = 0; rel_style.body.border.width = 1; - rel_style.body.main_color = lv_color_make(0xA9, 0x62, 0x1D); - rel_style.body.grad_color = lv_color_make(0xA7, 0x59, 0x0E); + rel_style.body.main_color = lv_color_make(0xA9, 0x62, 0x1D); + rel_style.body.grad_color = lv_color_make(0xA7, 0x59, 0x0E); lv_style_copy(&pr_style, &lv_style_btn_pr); - pr_style.body.radius = 0; + pr_style.body.radius = 0; pr_style.body.border.width = 1; - pr_style.body.main_color = lv_color_make(0x72, 0x42, 0x15); - pr_style.body.grad_color = lv_color_make(0x6A, 0x3A, 0x0C); + pr_style.body.main_color = lv_color_make(0x72, 0x42, 0x15); + pr_style.body.grad_color = lv_color_make(0x6A, 0x3A, 0x0C); // Create a keyboard and apply the styles lv_obj_t *kb = lv_kb_create(scr, nullptr); @@ -250,9 +252,9 @@ void lv_draw_keyboard() { lv_obj_align(ta, nullptr, LV_ALIGN_IN_TOP_MID, 0, 10); switch (keyboard_value) { case autoLevelGcodeCommand: - get_gcode_command(AUTO_LEVELING_COMMAND_ADDR,(uint8_t *)public_buf_m); - public_buf_m[sizeof(public_buf_m)-1] = 0; - lv_ta_set_text(ta, public_buf_m); + get_gcode_command(AUTO_LEVELING_COMMAND_ADDR, (uint8_t *)public_buf_m); + public_buf_m[sizeof(public_buf_m) - 1] = '\0'; + lv_ta_set_text(ta, public_buf_m); break; case GCodeCommand: // Start with uppercase by default @@ -260,7 +262,7 @@ void lv_draw_keyboard() { lv_btnm_set_ctrl_map(kb, kb_ctrl_uc_map); // Fallthrough default: - lv_ta_set_text(ta, ""); + lv_ta_set_text(ta, ""); } // Assign the text area to the keyboard @@ -271,5 +273,4 @@ void lv_clear_keyboard() { lv_obj_del(scr); } - #endif // HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_keyboard.h b/Marlin/src/lcd/extui/mks_ui/draw_keyboard.h similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_keyboard.h rename to Marlin/src/lcd/extui/mks_ui/draw_keyboard.h index 0013dc4030ea..d89806c272d4 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_keyboard.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_keyboard.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_keyboard(); -extern void lv_clear_keyboard(); +void lv_draw_keyboard(); +void lv_clear_keyboard(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_language.cpp b/Marlin/src/lcd/extui/mks_ui/draw_language.cpp similarity index 98% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_language.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_language.cpp index 5953d0418402..3ef8c6a0ee9d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_language.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_language.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" #include enum { diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_language.h b/Marlin/src/lcd/extui/mks_ui/draw_language.h similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_language.h rename to Marlin/src/lcd/extui/mks_ui/draw_language.h index 9e769e36926d..4f51856f4f55 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_language.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_language.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_language(); -extern void lv_clear_language(); +void lv_draw_language(); +void lv_clear_language(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_level_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_level_settings.cpp similarity index 90% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_level_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_level_settings.cpp index b5c18903091c..6fc8704607f4 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_level_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_level_settings.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -46,7 +47,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { draw_return_ui(); break; case ID_LEVEL_POSITION: - lv_draw_manual_level_pos_settings(); + lv_draw_tramming_pos_settings(); break; case ID_LEVEL_COMMAND: keyboard_value = autoLevelGcodeCommand; @@ -62,7 +63,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { void lv_draw_level_settings() { scr = lv_screen_create(LEVELING_PARA_UI, machine_menu.LevelingParaConfTitle); - lv_screen_menu_item(scr, machine_menu.LevelingManuPosConf, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_LEVEL_POSITION, 0); + lv_screen_menu_item(scr, machine_menu.TrammingPosConf, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_LEVEL_POSITION, 0); lv_screen_menu_item(scr, machine_menu.LevelingAutoCommandConf, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_LEVEL_COMMAND, 1); #if HAS_BED_PROBE lv_screen_menu_item(scr, machine_menu.LevelingAutoZoffsetConf, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_LEVEL_ZOFFSET, 2); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_level_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_level_settings.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_level_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_level_settings.h index 95a4e2e2e570..06283d20955b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_level_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_level_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_level_settings(); -extern void lv_clear_level_settings(); +void lv_draw_level_settings(); +void lv_clear_level_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.cpp b/Marlin/src/lcd/extui/mks_ui/draw_machine_para.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_machine_para.cpp index 971ea8a69e00..57c32c733eb1 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_machine_para.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.h b/Marlin/src/lcd/extui/mks_ui/draw_machine_para.h similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.h rename to Marlin/src/lcd/extui/mks_ui/draw_machine_para.h index 652a7e1eb7c0..f495e8b35e5e 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_machine_para.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_machine_para(); -extern void lv_clear_machine_para(); +void lv_draw_machine_para(); +void lv_clear_machine_para(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_machine_settings.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_machine_settings.cpp index b79605d74fcf..b14dc6b7599c 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_machine_settings.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_machine_settings.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_machine_settings.h index dd988ede723a..f113f65fc1b0 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_machine_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_machine_settings(); -extern void lv_clear_machine_settings(); +void lv_draw_machine_settings(); +void lv_clear_machine_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.cpp b/Marlin/src/lcd/extui/mks_ui/draw_manuaLevel.cpp similarity index 90% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_manuaLevel.cpp index 495acda06bda..60724aa4f3be 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_manuaLevel.cpp @@ -19,15 +19,18 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../gcode/queue.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../gcode/queue.h" +#include "../../../inc/MarlinConfig.h" + +extern const char G28_STR[]; extern lv_group_t *g; static lv_obj_t *scr; @@ -46,13 +49,13 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { switch (obj->mks_obj_id) { case ID_M_POINT1 ... ID_M_POINT5: - if (queue.length == 0) { + if (queue.ring_buffer.empty()) { if (uiCfg.leveling_first_time) { uiCfg.leveling_first_time = false; queue.inject_P(G28_STR); } const int ind = obj->mks_obj_id - ID_M_POINT1; - sprintf_P(public_buf_l, PSTR("G1 Z10\nG1 X%d Y%d\nG1 Z0"), (int)gCfgItems.levelingPos[ind][0], (int)gCfgItems.levelingPos[ind][1]); + sprintf_P(public_buf_l, PSTR("G1Z10\nG1X%dY%d\nG1Z0"), gCfgItems.trammingPos[ind].x, gCfgItems.trammingPos[ind].y); queue.inject(public_buf_l); } break; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.h b/Marlin/src/lcd/extui/mks_ui/draw_manuaLevel.h similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.h rename to Marlin/src/lcd/extui/mks_ui/draw_manuaLevel.h index 4e9b8275ba1c..29c8fa144ed3 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_manuaLevel.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_manualLevel(); -extern void lv_clear_manualLevel(); +void lv_draw_manualLevel(); +void lv_clear_manualLevel(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_max_feedrate_settings.cpp similarity index 85% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_max_feedrate_settings.cpp index 47bd906a512f..1dd6a93d62ed 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_max_feedrate_settings.cpp @@ -19,15 +19,16 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -83,22 +84,22 @@ void lv_draw_max_feedrate_settings() { scr = lv_screen_create(MAXFEEDRATE_UI, machine_menu.MaxFeedRateConfTitle); if (!uiCfg.para_ui_page) { - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[X_AXIS]); + dtostrf(planner.settings.max_feedrate_mm_s[X_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.XMaxFeedRate, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_FEED_X, 0, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[Y_AXIS]); + dtostrf(planner.settings.max_feedrate_mm_s[Y_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.YMaxFeedRate, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_FEED_Y, 1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[Z_AXIS]); + dtostrf(planner.settings.max_feedrate_mm_s[Z_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.ZMaxFeedRate, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_FEED_Z, 2, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[E_AXIS]); + dtostrf(planner.settings.max_feedrate_mm_s[E_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.E0MaxFeedRate, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_FEED_E0, 3, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.next, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_FEED_DOWN, true); } else { - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.max_feedrate_mm_s[E_AXIS_N(1)]); + dtostrf(planner.settings.max_feedrate_mm_s[E_AXIS_N(1)], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.E1MaxFeedRate, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_FEED_E1, 0, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.previous, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_FEED_UP, true); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_max_feedrate_settings.h similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_max_feedrate_settings.h index f82ffd0eaaa2..45c3fd29db22 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_max_feedrate_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_max_feedrate_settings(); -extern void lv_clear_max_feedrate_settings(); +void lv_draw_max_feedrate_settings(); +void lv_clear_max_feedrate_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp b/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp new file mode 100644 index 000000000000..81c82dc02dfa --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/draw_media_select.cpp @@ -0,0 +1,73 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../../../inc/MarlinConfigPre.h" + +#if BOTH(HAS_TFT_LVGL_UI, MULTI_VOLUME) + +#include "draw_ui.h" +#include + +#include "../../../inc/MarlinConfig.h" +#include "../../../sd/cardreader.h" + +extern lv_group_t *g; +static lv_obj_t *scr; + +enum { + ID_T_USB_DISK = 1, + ID_T_SD_DISK, + ID_T_RETURN +}; + +#if ENABLED(MKS_TEST) + extern uint8_t current_disp_ui; +#endif + +static void event_handler(lv_obj_t *obj, lv_event_t event) { + if (event != LV_EVENT_RELEASED) return; + lv_clear_media_select(); + switch (obj->mks_obj_id) { + case ID_T_USB_DISK: card.changeMedia(&card.media_driver_usbFlash); break; + case ID_T_SD_DISK: card.changeMedia(&card.media_driver_sdcard); break; + case ID_T_RETURN: + TERN_(MKS_TEST, current_disp_ui = 1); + lv_draw_ready_print(); + return; + } + lv_draw_print_file(); +} + +void lv_draw_media_select() { + scr = lv_screen_create(MEDIA_SELECT_UI); + lv_big_button_create(scr, "F:/bmp_sd.bin", media_select_menu.sd_disk, INTERVAL_V, titleHeight, event_handler, ID_T_SD_DISK); + lv_big_button_create(scr, "F:/bmp_usb_disk.bin", media_select_menu.usb_disk, BTN_X_PIXEL + INTERVAL_V * 2, titleHeight, event_handler, ID_T_USB_DISK); + lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_T_RETURN); +} + +void lv_clear_media_select() { + #if HAS_ROTARY_ENCODER + if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g); + #endif + lv_obj_del(scr); +} + +#endif // HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/mks_ui/draw_media_select.h b/Marlin/src/lcd/extui/mks_ui/draw_media_select.h new file mode 100644 index 000000000000..a698714a9dce --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/draw_media_select.h @@ -0,0 +1,33 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#ifdef __cplusplus + extern "C" { /* C-declarations for C++ */ +#endif + +extern void lv_draw_media_select(); +extern void lv_clear_media_select(); + +#ifdef __cplusplus + } /* C-declarations for C++ */ +#endif diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_more.cpp b/Marlin/src/lcd/extui/mks_ui/draw_more.cpp similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_more.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_more.cpp index 62769ae89fa4..6c5fa2fa3d23 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_more.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_more.cpp @@ -19,22 +19,21 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI -#include "../../../../MarlinCore.h" +#include "../../../MarlinCore.h" #include "draw_ready_print.h" #include "draw_set.h" #include "lv_conf.h" #include "draw_ui.h" -#include "../../../../gcode/queue.h" +#include "../../../gcode/queue.h" extern lv_group_t * g; static lv_obj_t * scr; -#define HAS_USER_ITEM(N) (ENABLED(CUSTOM_USER_MENUS) && defined(USER_DESC_##N) && defined(USER_GCODE_##N)) - enum { ID_GCODE = 1, #if HAS_USER_ITEM(1) @@ -63,22 +62,22 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) { switch (obj->mks_obj_id) { case ID_GCODE: lv_clear_more(); lv_draw_gcode(true); break; #if HAS_USER_ITEM(1) - case ID_CUSTOM_1: queue.inject_P(PSTR(USER_GCODE_1)); break; + case ID_CUSTOM_1: queue.inject_P(PSTR(MAIN_MENU_ITEM_1_GCODE)); break; #endif #if HAS_USER_ITEM(2) - case ID_CUSTOM_2: queue.inject_P(PSTR(USER_GCODE_2)); break; + case ID_CUSTOM_2: queue.inject_P(PSTR(MAIN_MENU_ITEM_2_GCODE)); break; #endif #if HAS_USER_ITEM(3) - case ID_CUSTOM_3: queue.inject_P(PSTR(USER_GCODE_3)); break; + case ID_CUSTOM_3: queue.inject_P(PSTR(MAIN_MENU_ITEM_3_GCODE)); break; #endif #if HAS_USER_ITEM(4) - case ID_CUSTOM_4: queue.inject_P(PSTR(USER_GCODE_4)); break; + case ID_CUSTOM_4: queue.inject_P(PSTR(MAIN_MENU_ITEM_4_GCODE)); break; #endif #if HAS_USER_ITEM(5) - case ID_CUSTOM_5: queue.inject_P(PSTR(USER_GCODE_5)); break; + case ID_CUSTOM_5: queue.inject_P(PSTR(MAIN_MENU_ITEM_5_GCODE)); break; #endif #if HAS_USER_ITEM(6) - case ID_CUSTOM_6: queue.inject_P(PSTR(USER_GCODE_6)); break; + case ID_CUSTOM_6: queue.inject_P(PSTR(MAIN_MENU_ITEM_6_GCODE)); break; #endif case ID_M_RETURN: lv_clear_more(); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_more.h b/Marlin/src/lcd/extui/mks_ui/draw_more.h similarity index 90% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_more.h rename to Marlin/src/lcd/extui/mks_ui/draw_more.h index 2a68d3da99af..86ee6f895fab 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_more.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_more.h @@ -22,11 +22,11 @@ #pragma once #ifdef __cplusplus -extern "C" { /* C-declarations for C++ */ + extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_more(); -extern void lv_clear_more(); +void lv_draw_more(); +void lv_clear_more(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_motor_settings.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_motor_settings.cpp index ec948f10be82..7367cec1c25d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_motor_settings.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_motor_settings.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_motor_settings.h index 632f7bd24d4d..5d26a402d034 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_motor_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_motor_settings(); -extern void lv_clear_motor_settings(); +void lv_draw_motor_settings(); +void lv_clear_motor_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp b/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp similarity index 89% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp index d10175344d7c..baa8d48da350 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_move_motor.cpp @@ -19,16 +19,17 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../gcode/queue.h" -#include "../../../../module/motion.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../gcode/queue.h" +#include "../../../module/motion.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -38,8 +39,6 @@ static lv_task_t *updatePosTask; static char cur_label = 'Z'; static float cur_pos = 0; -void disp_cur_pos(); - enum { ID_M_X_P = 1, ID_M_X_N, @@ -51,9 +50,16 @@ enum { ID_M_RETURN }; +void disp_cur_pos() { + char str_1[16]; + sprintf_P(public_buf_l, PSTR("%c:%s mm"), cur_label, dtostrf(cur_pos, 1, 1, str_1)); + if (labelP) lv_label_set_text(labelP, public_buf_l); +} + static void event_handler(lv_obj_t *obj, lv_event_t event) { + char str_1[16]; if (event != LV_EVENT_RELEASED) return; - if (queue.length <= (BUFSIZE - 3)) { + if (!queue.ring_buffer.full(3)) { bool do_inject = true; float dist = uiCfg.move_dist; switch (obj->mks_obj_id) { @@ -63,14 +69,14 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { default: do_inject = false; } if (do_inject) { - sprintf_P(public_buf_l, PSTR("G91\nG1 %c%3.1f F%d\nG90"), cur_label, dist, uiCfg.moveSpeed); + sprintf_P(public_buf_l, PSTR("G91\nG1 %c%s F%d\nG90"), cur_label, dtostrf(dist, 1, 3, str_1), uiCfg.moveSpeed); queue.inject(public_buf_l); } } switch (obj->mks_obj_id) { case ID_M_STEP: - if (abs(10 * (int)uiCfg.move_dist) == 100) + if (ABS(10 * (int)uiCfg.move_dist) == 100) uiCfg.move_dist = 0.1; else uiCfg.move_dist *= 10.0f; @@ -114,21 +120,16 @@ void lv_draw_move_motor() { lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_M_RETURN); // We need to patch the title to leave some space on the right for displaying the status - lv_obj_t * title = lv_obj_get_child_back(scr, NULL); - if (title != NULL) lv_obj_set_width(title, TFT_WIDTH - 101); + lv_obj_t * title = lv_obj_get_child_back(scr, nullptr); + if (title != nullptr) lv_obj_set_width(title, TFT_WIDTH - 101); labelP = lv_label_create(scr, TFT_WIDTH - 100, TITLE_YPOS, "Z:0.0mm"); - if (labelP != NULL) + if (labelP != nullptr) updatePosTask = lv_task_create(refresh_pos, 300, LV_TASK_PRIO_LOWEST, 0); disp_move_dist(); disp_cur_pos(); } -void disp_cur_pos() { - sprintf_P(public_buf_l, PSTR("%c:%3.1fmm"), cur_label, cur_pos); - if (labelP) lv_label_set_text(labelP, public_buf_l); -} - void disp_move_dist() { if ((int)(10 * uiCfg.move_dist) == 1) lv_imgbtn_set_src_both(buttonV, "F:/bmp_step_move0_1.bin"); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.h b/Marlin/src/lcd/extui/mks_ui/draw_move_motor.h similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.h rename to Marlin/src/lcd/extui/mks_ui/draw_move_motor.h index a9b75c1d13e3..133a0444c157 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_move_motor.h @@ -25,9 +25,9 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_move_motor(); -extern void lv_clear_move_motor(); -extern void disp_move_dist(); +void lv_draw_move_motor(); +void lv_clear_move_motor(); +void disp_move_dist(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp b/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp new file mode 100644 index 000000000000..a3cb7f6c1c01 --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/draw_number_key.cpp @@ -0,0 +1,540 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if HAS_TFT_LVGL_UI + +#include "draw_ui.h" +#include + +#include "../../../gcode/gcode.h" +#include "../../../gcode/queue.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(POWER_LOSS_RECOVERY) + #include "../../../feature/powerloss.h" +#endif + +#if HAS_TRINAMIC_CONFIG + #include "../../../module/stepper/indirection.h" + #include "../../../feature/tmc_util.h" +#endif + +#if HAS_BED_PROBE + #include "../../../module/probe.h" +#endif + +extern lv_group_t *g; +static lv_obj_t *scr; +static lv_obj_t *buttonValue = nullptr; +static lv_obj_t *labelValue = nullptr; + +static char key_value[11] = { 0 }; +static uint8_t cnt = 0; +static bool point_flag = true; + +enum { + ID_NUM_KEY1 = 1, + ID_NUM_KEY2, + ID_NUM_KEY3, + ID_NUM_KEY4, + ID_NUM_KEY5, + ID_NUM_KEY6, + ID_NUM_KEY7, + ID_NUM_KEY8, + ID_NUM_KEY9, + ID_NUM_KEY0, + ID_NUM_BACK, + ID_NUM_RESET, + ID_NUM_CONFIRM, + ID_NUM_POINT, + ID_NUM_NEGATIVE +}; + +static void disp_key_value() { + char *temp; + TERN_(HAS_TRINAMIC_CONFIG, float milliamps); + + switch (value) { + case PrintAcceleration: + dtostrf(planner.settings.acceleration, 1, 1, public_buf_m); + break; + case RetractAcceleration: + dtostrf(planner.settings.retract_acceleration, 1, 1, public_buf_m); + break; + case TravelAcceleration: + dtostrf(planner.settings.travel_acceleration, 1, 1, public_buf_m); + break; + case XAcceleration: + itoa(planner.settings.max_acceleration_mm_per_s2[X_AXIS], public_buf_m, 10); + break; + case YAcceleration: + itoa(planner.settings.max_acceleration_mm_per_s2[Y_AXIS], public_buf_m, 10); + break; + case ZAcceleration: + itoa(planner.settings.max_acceleration_mm_per_s2[Z_AXIS], public_buf_m, 10); + break; + case E0Acceleration: + itoa(planner.settings.max_acceleration_mm_per_s2[E_AXIS], public_buf_m, 10); + break; + case E1Acceleration: + itoa(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)], public_buf_m, 10); + break; + case XMaxFeedRate: + dtostrf(planner.settings.max_feedrate_mm_s[X_AXIS], 1, 1, public_buf_m); + break; + case YMaxFeedRate: + dtostrf(planner.settings.max_feedrate_mm_s[Y_AXIS], 1, 1, public_buf_m); + break; + case ZMaxFeedRate: + dtostrf(planner.settings.max_feedrate_mm_s[Z_AXIS], 1, 1, public_buf_m); + break; + case E0MaxFeedRate: + dtostrf(planner.settings.max_feedrate_mm_s[E_AXIS], 1, 1, public_buf_m); + break; + case E1MaxFeedRate: + dtostrf(planner.settings.max_feedrate_mm_s[E_AXIS_N(1)], 1, 1, public_buf_m); + break; + + case XJerk: + #if HAS_CLASSIC_JERK + dtostrf(planner.max_jerk[X_AXIS], 1, 1, public_buf_m); + #endif + break; + case YJerk: + #if HAS_CLASSIC_JERK + dtostrf(planner.max_jerk[Y_AXIS], 1, 1, public_buf_m); + #endif + break; + case ZJerk: + #if HAS_CLASSIC_JERK + dtostrf(planner.max_jerk[Z_AXIS], 1, 1, public_buf_m); + #endif + break; + case EJerk: + #if HAS_CLASSIC_JERK + dtostrf(planner.max_jerk[E_AXIS], 1, 1, public_buf_m); + #endif + break; + + case Xstep: + dtostrf(planner.settings.axis_steps_per_mm[X_AXIS], 1, 1, public_buf_m); + break; + case Ystep: + dtostrf(planner.settings.axis_steps_per_mm[Y_AXIS], 1, 1, public_buf_m); + + break; + case Zstep: + dtostrf(planner.settings.axis_steps_per_mm[Z_AXIS], 1, 1, public_buf_m); + + break; + case E0step: + dtostrf(planner.settings.axis_steps_per_mm[E_AXIS], 1, 1, public_buf_m); + + break; + case E1step: + dtostrf(planner.settings.axis_steps_per_mm[E_AXIS_N(1)], 1, 1, public_buf_m); + break; + + case Xcurrent: + #if AXIS_IS_TMC(X) + milliamps = stepperX.getMilliamps(); + dtostrf(milliamps, 1, 1, public_buf_m); + #endif + break; + + case Ycurrent: + #if AXIS_IS_TMC(Y) + milliamps = stepperY.getMilliamps(); + dtostrf(milliamps, 1, 1, public_buf_m); + #endif + break; + + case Zcurrent: + #if AXIS_IS_TMC(Z) + milliamps = stepperZ.getMilliamps(); + dtostrf(milliamps, 1, 1, public_buf_m); + #endif + break; + + case E0current: + #if AXIS_IS_TMC(E0) + milliamps = stepperE0.getMilliamps(); + dtostrf(milliamps, 1, 1, public_buf_m); + #endif + break; + + case E1current: + #if AXIS_IS_TMC(E1) + milliamps = stepperE1.getMilliamps(); + dtostrf(milliamps, 1, 1, public_buf_m); + #endif + break; + + case pause_pos_x: + dtostrf(gCfgItems.pausePosX, 1, 1, public_buf_m); + break; + case pause_pos_y: + dtostrf(gCfgItems.pausePosY, 1, 1, public_buf_m); + break; + case pause_pos_z: + dtostrf(gCfgItems.pausePosZ, 1, 1, public_buf_m); + break; + case level_pos_x1: + itoa(gCfgItems.trammingPos[0].x, public_buf_m, 10); + break; + case level_pos_y1: + itoa(gCfgItems.trammingPos[0].y, public_buf_m, 10); + break; + case level_pos_x2: + itoa(gCfgItems.trammingPos[1].x, public_buf_m, 10); + break; + case level_pos_y2: + itoa(gCfgItems.trammingPos[1].y, public_buf_m, 10); + break; + case level_pos_x3: + itoa(gCfgItems.trammingPos[2].x, public_buf_m, 10); + break; + case level_pos_y3: + itoa(gCfgItems.trammingPos[2].y, public_buf_m, 10); + break; + case level_pos_x4: + itoa(gCfgItems.trammingPos[3].x, public_buf_m, 10); + break; + case level_pos_y4: + itoa(gCfgItems.trammingPos[3].y, public_buf_m, 10); + break; + case level_pos_x5: + itoa(gCfgItems.trammingPos[4].x, public_buf_m, 10); + break; + case level_pos_y5: + itoa(gCfgItems.trammingPos[4].y, public_buf_m, 10); + break; + #if HAS_BED_PROBE + case x_offset: + #if HAS_PROBE_XY_OFFSET + dtostrf(probe.offset.x, 1, 3, public_buf_m); + #endif + break; + case y_offset: + #if HAS_PROBE_XY_OFFSET + dtostrf(probe.offset.y, 1, 3, public_buf_m); + #endif + break; + case z_offset: + dtostrf(probe.offset.z, 1, 3, public_buf_m); + break; + #endif + case load_length: + itoa(gCfgItems.filamentchange_load_length, public_buf_m, 10); + break; + case load_speed: + itoa(gCfgItems.filamentchange_load_speed, public_buf_m, 10); + break; + case unload_length: + itoa(gCfgItems.filamentchange_unload_length, public_buf_m, 10); + break; + case unload_speed: + itoa(gCfgItems.filamentchange_unload_speed, public_buf_m, 10); + break; + case filament_temp: + itoa(gCfgItems.filament_limit_temp, public_buf_m, 10); + break; + case x_sensitivity: + #if X_SENSORLESS + itoa(TERN(X_SENSORLESS, stepperX.homing_threshold(), 0), public_buf_m, 10); + #endif + break; + case y_sensitivity: + #if Y_SENSORLESS + itoa(TERN(Y_SENSORLESS, stepperY.homing_threshold(), 0), public_buf_m, 10); + #endif + break; + case z_sensitivity: + #if Z_SENSORLESS + itoa(TERN(Z_SENSORLESS, stepperZ.homing_threshold(), 0), public_buf_m, 10); + #endif + break; + case z2_sensitivity: + #if Z2_SENSORLESS + itoa(TERN(Z2_SENSORLESS, stepperZ2.homing_threshold(), 0), public_buf_m, 10); + #endif + break; + } + + strcpy(key_value, public_buf_m); + cnt = strlen(key_value); + temp = strchr(key_value, '.'); + point_flag = !temp; + lv_label_set_text(labelValue, key_value); + lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); + +} + +static void set_value_confirm() { + switch (value) { + case PrintAcceleration: planner.settings.acceleration = atof(key_value); break; + case RetractAcceleration: planner.settings.retract_acceleration = atof(key_value); break; + case TravelAcceleration: planner.settings.travel_acceleration = atof(key_value); break; + case XAcceleration: planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value); break; + case YAcceleration: planner.settings.max_acceleration_mm_per_s2[Y_AXIS] = atof(key_value); break; + case ZAcceleration: planner.settings.max_acceleration_mm_per_s2[Z_AXIS] = atof(key_value); break; + case E0Acceleration: planner.settings.max_acceleration_mm_per_s2[E_AXIS] = atof(key_value); break; + case E1Acceleration: planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(1)] = atof(key_value); break; + case XMaxFeedRate: planner.settings.max_feedrate_mm_s[X_AXIS] = atof(key_value); break; + case YMaxFeedRate: planner.settings.max_feedrate_mm_s[Y_AXIS] = atof(key_value); break; + case ZMaxFeedRate: planner.settings.max_feedrate_mm_s[Z_AXIS] = atof(key_value); break; + case E0MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS] = atof(key_value); break; + case E1MaxFeedRate: planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value); break; + case XJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk[X_AXIS] = atof(key_value)); break; + case YJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk[Y_AXIS] = atof(key_value)); break; + case ZJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk[Z_AXIS] = atof(key_value)); break; + case EJerk: TERN_(HAS_CLASSIC_JERK, planner.max_jerk[E_AXIS] = atof(key_value)); break; + case Xstep: planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value); planner.refresh_positioning(); break; + case Ystep: planner.settings.axis_steps_per_mm[Y_AXIS] = atof(key_value); planner.refresh_positioning(); break; + case Zstep: planner.settings.axis_steps_per_mm[Z_AXIS] = atof(key_value); planner.refresh_positioning(); break; + case E0step: planner.settings.axis_steps_per_mm[E_AXIS] = atof(key_value); planner.refresh_positioning(); break; + case E1step: planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value); planner.refresh_positioning(); break; + case Xcurrent: + #if AXIS_IS_TMC(X) + stepperX.rms_current(atoi(key_value)); + #endif + break; + case Ycurrent: + #if AXIS_IS_TMC(Y) + stepperY.rms_current(atoi(key_value)); + #endif + break; + case Zcurrent: + #if AXIS_IS_TMC(Z) + stepperZ.rms_current(atoi(key_value)); + #endif + break; + case E0current: + #if AXIS_IS_TMC(E0) + stepperE0.rms_current(atoi(key_value)); + #endif + break; + case E1current: + #if AXIS_IS_TMC(E1) + stepperE1.rms_current(atoi(key_value)); + #endif + break; + case pause_pos_x: gCfgItems.pausePosX = atof(key_value); update_spi_flash(); break; + case pause_pos_y: gCfgItems.pausePosY = atof(key_value); update_spi_flash(); break; + case pause_pos_z: gCfgItems.pausePosZ = atof(key_value); update_spi_flash(); break; + case level_pos_x1: gCfgItems.trammingPos[0].x = atoi(key_value); update_spi_flash(); break; + case level_pos_y1: gCfgItems.trammingPos[0].y = atoi(key_value); update_spi_flash(); break; + case level_pos_x2: gCfgItems.trammingPos[1].x = atoi(key_value); update_spi_flash(); break; + case level_pos_y2: gCfgItems.trammingPos[1].y = atoi(key_value); update_spi_flash(); break; + case level_pos_x3: gCfgItems.trammingPos[2].x = atoi(key_value); update_spi_flash(); break; + case level_pos_y3: gCfgItems.trammingPos[2].y = atoi(key_value); update_spi_flash(); break; + case level_pos_x4: gCfgItems.trammingPos[3].x = atoi(key_value); update_spi_flash(); break; + case level_pos_y4: gCfgItems.trammingPos[3].y = atoi(key_value); update_spi_flash(); break; + case level_pos_x5: gCfgItems.trammingPos[4].x = atoi(key_value); update_spi_flash(); break; + case level_pos_y5: gCfgItems.trammingPos[4].y = atoi(key_value); update_spi_flash(); break; + #if HAS_BED_PROBE + case x_offset: { + #if HAS_PROBE_XY_OFFSET + const float x = atof(key_value); + if (WITHIN(x, -(X_BED_SIZE), X_BED_SIZE)) + probe.offset.x = x; + #endif + } break; + case y_offset: { + #if HAS_PROBE_XY_OFFSET + const float y = atof(key_value); + if (WITHIN(y, -(Y_BED_SIZE), Y_BED_SIZE)) + probe.offset.y = y; + #endif + } break; + case z_offset: { + const float z = atof(key_value); + if (WITHIN(z, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) + probe.offset.z = z; + } break; + #endif + case load_length: + gCfgItems.filamentchange_load_length = atoi(key_value); + uiCfg.filament_loading_time = (uint32_t)((gCfgItems.filamentchange_load_length*60.0/gCfgItems.filamentchange_load_speed)+0.5); + update_spi_flash(); + break; + case load_speed: + gCfgItems.filamentchange_load_speed = atoi(key_value); + uiCfg.filament_loading_time = (uint32_t)((gCfgItems.filamentchange_load_length*60.0/gCfgItems.filamentchange_load_speed)+0.5); + update_spi_flash(); + break; + case unload_length: + gCfgItems.filamentchange_unload_length = atoi(key_value); + uiCfg.filament_unloading_time = (uint32_t)((gCfgItems.filamentchange_unload_length*60.0/gCfgItems.filamentchange_unload_speed)+0.5); + update_spi_flash(); + break; + case unload_speed: + gCfgItems.filamentchange_unload_speed = atoi(key_value); + uiCfg.filament_unloading_time = (uint32_t)((gCfgItems.filamentchange_unload_length*60.0/gCfgItems.filamentchange_unload_speed)+0.5); + update_spi_flash(); + break; + case filament_temp: + gCfgItems.filament_limit_temp = atoi(key_value); + update_spi_flash(); + break; + case x_sensitivity: TERN_(X_SENSORLESS, stepperX.homing_threshold(atoi(key_value))); break; + case y_sensitivity: TERN_(Y_SENSORLESS, stepperY.homing_threshold(atoi(key_value))); break; + case z_sensitivity: TERN_(Z_SENSORLESS, stepperZ.homing_threshold(atoi(key_value))); break; + case z2_sensitivity: TERN_(Z2_SENSORLESS, stepperZ2.homing_threshold(atoi(key_value))); break; + } + gcode.process_subcommands_now_P(PSTR("M500")); +} + +static void event_handler(lv_obj_t *obj, lv_event_t event) { + if (event != LV_EVENT_RELEASED) return; + switch (obj->mks_obj_id) { + case ID_NUM_KEY1 ... ID_NUM_KEY0: + if (cnt <= 10) { + key_value[cnt] = (obj->mks_obj_id == ID_NUM_KEY0) ? (char)'0' : char('1' + obj->mks_obj_id - ID_NUM_KEY1); + lv_label_set_text(labelValue, key_value); + lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); + cnt++; + } + break; + case ID_NUM_BACK: + if (cnt > 0) cnt--; + if (key_value[cnt] == (char)'.') point_flag = true; + key_value[cnt] = (char)'\0'; + lv_label_set_text(labelValue, key_value); + lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); + break; + case ID_NUM_RESET: + ZERO(key_value); + cnt = 0; + key_value[cnt] = (char)'0'; + point_flag = true; + lv_label_set_text(labelValue, key_value); + lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); + break; + case ID_NUM_POINT: + if (cnt != 0 && point_flag) { + point_flag = false; + key_value[cnt] = (char)'.'; + lv_label_set_text(labelValue, key_value); + lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); + cnt++; + } + break; + case ID_NUM_NEGATIVE: + if (cnt == 0) { + key_value[cnt] = (char)'-'; + lv_label_set_text(labelValue, key_value); + lv_obj_align(labelValue, buttonValue, LV_ALIGN_CENTER, 0, 0); + cnt++; + } + break; + case ID_NUM_CONFIRM: + last_disp_state = NUMBER_KEY_UI; + if (strlen(key_value) != 0) set_value_confirm(); + lv_clear_number_key(); + draw_return_ui(); + break; + } +} + +void lv_draw_number_key() { + scr = lv_screen_create(NUMBER_KEY_UI, ""); + + buttonValue = lv_btn_create(scr, 92, 40, 296, 40, event_handler, ID_NUM_KEY1, &style_num_text); + labelValue = lv_label_create_empty(buttonValue); + + #define DRAW_NUMBER_KEY(N,X,Y) \ + lv_obj_t *NumberKey_##N = lv_btn_create(scr, X, Y, 68, 40, event_handler, ID_NUM_KEY##N, &style_num_key_pre); \ + lv_obj_t *labelKey_##N = lv_label_create_empty(NumberKey_##N); \ + lv_label_set_text(labelKey_##N, machine_menu.key_##N); \ + lv_obj_align(labelKey_##N, NumberKey_##N, LV_ALIGN_CENTER, 0, 0) + + DRAW_NUMBER_KEY(1, 92, 90); + DRAW_NUMBER_KEY(2, 168, 90); + DRAW_NUMBER_KEY(3, 244, 90); + DRAW_NUMBER_KEY(4, 92, 140); + DRAW_NUMBER_KEY(5, 168, 140); + DRAW_NUMBER_KEY(6, 244, 140); + DRAW_NUMBER_KEY(7, 92, 190); + DRAW_NUMBER_KEY(8, 168, 190); + DRAW_NUMBER_KEY(9, 244, 190); + DRAW_NUMBER_KEY(0, 92, 240); + + lv_obj_t *KeyBack = lv_btn_create(scr, 320, 90, 68, 40, event_handler, ID_NUM_BACK, &style_num_key_pre); + lv_obj_t *labelKeyBack = lv_label_create_empty(KeyBack); + lv_label_set_text(labelKeyBack, machine_menu.key_back); + lv_obj_align(labelKeyBack, KeyBack, LV_ALIGN_CENTER, 0, 0); + + lv_obj_t *KeyReset = lv_btn_create(scr, 320, 140, 68, 40, event_handler, ID_NUM_RESET, &style_num_key_pre); + lv_obj_t *labelKeyReset = lv_label_create_empty(KeyReset); + lv_label_set_text(labelKeyReset, machine_menu.key_reset); + lv_obj_align(labelKeyReset, KeyReset, LV_ALIGN_CENTER, 0, 0); + + lv_obj_t *KeyConfirm = lv_btn_create(scr, 320, 190, 68, 90, event_handler, ID_NUM_CONFIRM, &style_num_key_pre); + lv_obj_t *labelKeyConfirm = lv_label_create_empty(KeyConfirm); + lv_label_set_text(labelKeyConfirm, machine_menu.key_confirm); + lv_obj_align(labelKeyConfirm, KeyConfirm, LV_ALIGN_CENTER, 0, 0); + + lv_obj_t *KeyPoint = lv_btn_create(scr, 244, 240, 68, 40, event_handler, ID_NUM_POINT, &style_num_key_pre); + lv_obj_t *labelKeyPoint = lv_label_create_empty(KeyPoint); + lv_label_set_text(labelKeyPoint, machine_menu.key_point); + lv_obj_align(labelKeyPoint, KeyPoint, LV_ALIGN_CENTER, 0, 0); + + lv_obj_t *Minus = lv_btn_create(scr, 168, 240, 68, 40, event_handler, ID_NUM_NEGATIVE, &style_num_key_pre); + lv_obj_t *labelMinus = lv_label_create_empty(Minus); + lv_label_set_text(labelMinus, machine_menu.negative); + lv_obj_align(labelMinus, Minus, LV_ALIGN_CENTER, 0, 0); + + #if HAS_ROTARY_ENCODER + if (gCfgItems.encoder_enable) { + lv_group_add_obj(g, NumberKey_1); + lv_group_add_obj(g, NumberKey_2); + lv_group_add_obj(g, NumberKey_3); + lv_group_add_obj(g, KeyBack); + lv_group_add_obj(g, NumberKey_4); + lv_group_add_obj(g, NumberKey_5); + lv_group_add_obj(g, NumberKey_6); + lv_group_add_obj(g, KeyReset); + lv_group_add_obj(g, NumberKey_7); + lv_group_add_obj(g, NumberKey_8); + lv_group_add_obj(g, NumberKey_9); + lv_group_add_obj(g, NumberKey_0); + lv_group_add_obj(g, Minus); + lv_group_add_obj(g, KeyPoint); + lv_group_add_obj(g, KeyConfirm); + } + #endif + + disp_key_value(); +} + +void lv_clear_number_key() { + #if HAS_ROTARY_ENCODER + if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g); + #endif + lv_obj_del(scr); +} + +#endif // HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.h b/Marlin/src/lcd/extui/mks_ui/draw_number_key.h similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.h rename to Marlin/src/lcd/extui/mks_ui/draw_number_key.h index dbf9015452ae..fcff280d3b52 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_number_key.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_number_key(); -extern void lv_clear_number_key(); +void lv_draw_number_key(); +void lv_clear_number_key(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_operation.cpp b/Marlin/src/lcd/extui/mks_ui/draw_operation.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_operation.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_operation.cpp index eb4b3708387d..8be74c6b9af8 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_operation.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_operation.cpp @@ -19,17 +19,18 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/temperature.h" -#include "../../../../module/motion.h" -#include "../../../../sd/cardreader.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/temperature.h" +#include "../../../module/motion.h" +#include "../../../sd/cardreader.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -66,7 +67,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { break; case ID_O_FILAMENT: #if HAS_MULTI_EXTRUDER - uiCfg.curSprayerChoose_bak = active_extruder; + uiCfg.extruderIndexBak = active_extruder; #endif if (uiCfg.print_state == WORKING) { #if ENABLED(SDSUPPORT) @@ -76,7 +77,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { #endif } uiCfg.moveSpeed_bak = (uint16_t)feedrate_mm_s; - uiCfg.desireSprayerTempBak = thermalManager.temp_hotend[active_extruder].target; + uiCfg.hotendTargetTempBak = thermalManager.degTargetHotend(active_extruder); lv_clear_operation(); lv_draw_filament_change(); break; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_operation.h b/Marlin/src/lcd/extui/mks_ui/draw_operation.h similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_operation.h rename to Marlin/src/lcd/extui/mks_ui/draw_operation.h index e034f7070b2c..d58b3307b8f6 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_operation.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_operation.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_operation(); -extern void lv_clear_operation(); +void lv_draw_operation(); +void lv_clear_operation(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.cpp b/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp similarity index 90% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp index 3eb717b71230..e5f6a5963a6b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_pause_message.cpp @@ -19,19 +19,20 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if BOTH(HAS_TFT_LVGL_UI, ADVANCED_PAUSE_FEATURE) #include "draw_ui.h" #include -#include "../../../../feature/pause.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../feature/pause.h" +#include "../../../inc/MarlinConfig.h" void lv_draw_pause_message(const PauseMessage msg) { switch (msg) { - case PAUSE_MESSAGE_PAUSING: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_PAUSING); break; + case PAUSE_MESSAGE_PARKING: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_PARKING); break; case PAUSE_MESSAGE_CHANGING: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_CHANGING); break; case PAUSE_MESSAGE_UNLOAD: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_UNLOAD); break; case PAUSE_MESSAGE_WAITING: clear_cur_ui(); lv_draw_dialog(DIALOG_PAUSE_MESSAGE_WAITING); break; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.h b/Marlin/src/lcd/extui/mks_ui/draw_pause_message.h similarity index 94% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.h rename to Marlin/src/lcd/extui/mks_ui/draw_pause_message.h index 88222f0e1a58..c3df8118a42d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_pause_message.h @@ -25,7 +25,7 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_pause_message(const PauseMessage msg); +void lv_draw_pause_message(const PauseMessage msg); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.cpp b/Marlin/src/lcd/extui/mks_ui/draw_pause_position.cpp similarity index 88% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_pause_position.cpp index 46aa1a58d125..8e107d4cee5d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_pause_position.cpp @@ -19,15 +19,16 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -62,13 +63,13 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { void lv_draw_pause_position() { scr = lv_screen_create(PAUSE_POS_UI, machine_menu.PausePosText); - sprintf_P(public_buf_l, PSTR("%.1f"), gCfgItems.pausePosX); + dtostrf(gCfgItems.pausePosX, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.xPos, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_PAUSE_X, 0, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), gCfgItems.pausePosY); + dtostrf(gCfgItems.pausePosY, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.yPos, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_PAUSE_Y, 1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), gCfgItems.pausePosZ); + dtostrf(gCfgItems.pausePosZ, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.zPos, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_PAUSE_Z, 2, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", common_menu.text_back, PARA_UI_BACL_POS_X, PARA_UI_BACL_POS_Y, event_handler, ID_PAUSE_RETURN, true); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.h b/Marlin/src/lcd/extui/mks_ui/draw_pause_position.h similarity index 92% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.h rename to Marlin/src/lcd/extui/mks_ui/draw_pause_position.h index e7c92a73965b..fd5459c64767 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_pause_position.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_pause_position(); -extern void lv_clear_pause_position(); +void lv_draw_pause_position(); +void lv_clear_pause_position(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp b/Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp similarity index 57% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp index 273462ac90f1..4d657f2394af 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_preHeat.cpp @@ -19,22 +19,30 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/temperature.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/temperature.h" +#include "../../../inc/MarlinConfig.h" static lv_obj_t *scr; extern lv_group_t* g; -static lv_obj_t *buttonType, *buttonStep; +static lv_obj_t *buttonType, *buttonStep, *buttonAdd, *buttonDec; static lv_obj_t *labelType; static lv_obj_t *labelStep; static lv_obj_t *tempText1; +static lv_obj_t *btn_pla; +static lv_obj_t *btn_abs; +static lv_obj_t *label_abs; +static lv_obj_t *label_pla; + +static lv_style_t btn_style_pre; +static lv_style_t btn_style_rel; enum { ID_P_ADD = 1, @@ -42,85 +50,84 @@ enum { ID_P_TYPE, ID_P_STEP, ID_P_OFF, - ID_P_RETURN + ID_P_RETURN, + ID_P_ABS, + ID_P_PLA }; static void event_handler(lv_obj_t *obj, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; switch (obj->mks_obj_id) { - case ID_P_ADD: + case ID_P_ADD: { if (uiCfg.curTempType == 0) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target += uiCfg.stepHeat; - if (uiCfg.curSprayerChoose == 0) { - if ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > (HEATER_0_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1))) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = (float)HEATER_0_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1); - } + int16_t max_target; + thermalManager.temp_hotend[uiCfg.extruderIndex].target += uiCfg.stepHeat; + if (uiCfg.extruderIndex == 0) + max_target = HEATER_0_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1); + else { + #if HAS_MULTI_HOTEND + max_target = HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1); + #endif } - #if DISABLED(SINGLENOZZLE) && HAS_MULTI_EXTRUDER - else if ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > (HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1))) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = (float)HEATER_1_MAXTEMP - (WATCH_TEMP_INCREASE + TEMP_HYSTERESIS + 1); - } - #endif - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + if (thermalManager.degTargetHotend(uiCfg.extruderIndex) > max_target) + thermalManager.setTargetHotend(max_target, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } - #if HAS_HEATED_BED - else { + else { + #if HAS_HEATED_BED + constexpr int16_t max_target = BED_MAXTEMP - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1); thermalManager.temp_bed.target += uiCfg.stepHeat; - if ((int)thermalManager.temp_bed.target > BED_MAXTEMP - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1)) { - thermalManager.temp_bed.target = (float)BED_MAXTEMP - (WATCH_BED_TEMP_INCREASE + TEMP_BED_HYSTERESIS + 1); - } + if (thermalManager.degTargetBed() > max_target) + thermalManager.setTargetBed(max_target); thermalManager.start_watching_bed(); - } - #endif + #endif + } disp_desire_temp(); - break; + } break; + case ID_P_DEC: if (uiCfg.curTempType == 0) { - if ((int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target > uiCfg.stepHeat) - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target -= uiCfg.stepHeat; + if (thermalManager.degTargetHotend(uiCfg.extruderIndex) > uiCfg.stepHeat) + thermalManager.temp_hotend[uiCfg.extruderIndex].target -= uiCfg.stepHeat; else - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = 0; - - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + thermalManager.setTargetHotend(0, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } - #if HAS_HEATED_BED - else { - if ((int)thermalManager.temp_bed.target > uiCfg.stepHeat) + else { + #if HAS_HEATED_BED + if (thermalManager.degTargetBed() > uiCfg.stepHeat) thermalManager.temp_bed.target -= uiCfg.stepHeat; else - thermalManager.temp_bed.target = 0; + thermalManager.setTargetBed(0); thermalManager.start_watching_bed(); - } - #endif + #endif + } disp_desire_temp(); break; case ID_P_TYPE: if (uiCfg.curTempType == 0) { if (ENABLED(HAS_MULTI_EXTRUDER)) { - if (uiCfg.curSprayerChoose == 0) { - uiCfg.curSprayerChoose = 1; + if (uiCfg.extruderIndex == 0) { + uiCfg.extruderIndex = 1; } - else if (uiCfg.curSprayerChoose == 1) { - if (TEMP_SENSOR_BED != 0) { + else if (uiCfg.extruderIndex == 1) { + if (ENABLED(HAS_HEATED_BED)) { uiCfg.curTempType = 1; } else { - uiCfg.curTempType = 0; - uiCfg.curSprayerChoose = 0; + uiCfg.curTempType = 0; + uiCfg.extruderIndex = 0; } } } - else if (uiCfg.curSprayerChoose == 0) { - if (TEMP_SENSOR_BED != 0) - uiCfg.curTempType = 1; - else - uiCfg.curTempType = 0; + else if (uiCfg.extruderIndex == 0) { + uiCfg.curTempType = TERN(HAS_HEATED_BED, 1, 0); } } else if (uiCfg.curTempType == 1) { - uiCfg.curSprayerChoose = 0; - uiCfg.curTempType = 0; + uiCfg.extruderIndex = 0; + uiCfg.curTempType = 0; } disp_temp_type(); break; @@ -135,33 +142,54 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { break; case ID_P_OFF: if (uiCfg.curTempType == 0) { - thermalManager.temp_hotend[uiCfg.curSprayerChoose].target = 0; - thermalManager.start_watching_hotend(uiCfg.curSprayerChoose); + thermalManager.setTargetHotend(0, uiCfg.extruderIndex); + thermalManager.start_watching_hotend(uiCfg.extruderIndex); } - #if HAS_HEATED_BED - else { + else { + #if HAS_HEATED_BED thermalManager.temp_bed.target = 0; thermalManager.start_watching_bed(); - } - #endif + #endif + } disp_desire_temp(); break; case ID_P_RETURN: clear_cur_ui(); draw_return_ui(); break; + case ID_P_ABS: + if (uiCfg.curTempType == 0) + thermalManager.setTargetHotend(PREHEAT_2_TEMP_HOTEND, 0); + else if (uiCfg.curTempType == 1) + thermalManager.setTargetBed(PREHEAT_2_TEMP_BED); + break; + case ID_P_PLA: + if (uiCfg.curTempType == 0) + thermalManager.setTargetHotend(PREHEAT_1_TEMP_HOTEND, 0); + else if (uiCfg.curTempType == 1) + thermalManager.setTargetBed(PREHEAT_1_TEMP_BED); + break; } } +void disp_add_dec() { + // Create image buttons + buttonAdd = lv_big_button_create(scr, "F:/bmp_Add.bin", preheat_menu.add, INTERVAL_V, titleHeight, event_handler, ID_P_ADD); + buttonDec = lv_big_button_create(scr, "F:/bmp_Dec.bin", preheat_menu.dec, BTN_X_PIXEL * 3 + INTERVAL_V * 4, titleHeight, event_handler, ID_P_DEC); +} + void lv_draw_preHeat() { scr = lv_screen_create(PRE_HEAT_UI); // Create image buttons - lv_big_button_create(scr, "F:/bmp_Add.bin", preheat_menu.add, INTERVAL_V, titleHeight, event_handler, ID_P_ADD); - lv_big_button_create(scr, "F:/bmp_Dec.bin", preheat_menu.dec, BTN_X_PIXEL * 3 + INTERVAL_V * 4, titleHeight, event_handler, ID_P_DEC); + disp_add_dec(); buttonType = lv_imgbtn_create(scr, nullptr, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_P_TYPE); buttonStep = lv_imgbtn_create(scr, nullptr, BTN_X_PIXEL + INTERVAL_V * 2, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_P_STEP); + + if (uiCfg.curTempType == 0) disp_ext_heart(); + if (uiCfg.curTempType == 1) disp_ext_heart(); + #if HAS_ROTARY_ENCODER if (gCfgItems.encoder_enable) { lv_group_add_obj(g, buttonType); @@ -184,26 +212,38 @@ void lv_draw_preHeat() { disp_desire_temp(); } +void disp_ext_heart() { + btn_abs = lv_btn_create(scr, 160, 40, 80, 40, event_handler, ID_P_ABS); + btn_pla = lv_btn_create(scr, 260, 40, 80, 40, event_handler, ID_P_PLA); + + lv_btn_set_style(btn_abs, LV_BTN_STYLE_PR, &btn_style_pre); + lv_btn_set_style(btn_abs, LV_BTN_STYLE_REL, &btn_style_rel); + lv_btn_set_style(btn_pla, LV_BTN_STYLE_PR, &btn_style_pre); + lv_btn_set_style(btn_pla, LV_BTN_STYLE_REL, &btn_style_rel); + + label_abs = lv_label_create(btn_abs, PREHEAT_2_LABEL); + label_pla = lv_label_create(btn_pla, PREHEAT_1_LABEL); +} + void disp_temp_type() { if (uiCfg.curTempType == 0) { - if (uiCfg.curSprayerChoose == 1) { - lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru2.bin"); + if (uiCfg.extruderIndex == 1) { + lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru2.bin"); if (gCfgItems.multiple_language) { lv_label_set_text(labelType, preheat_menu.ext2); lv_obj_align(labelType, buttonType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); } } else { - lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru1.bin"); + lv_imgbtn_set_src_both(buttonType, "F:/bmp_extru1.bin"); if (gCfgItems.multiple_language) { lv_label_set_text(labelType, preheat_menu.ext1); lv_obj_align(labelType, buttonType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); } } - } else { - lv_imgbtn_set_src_both(buttonType, "F:/bmp_bed.bin"); + lv_imgbtn_set_src_both(buttonType, "F:/bmp_bed.bin"); if (gCfgItems.multiple_language) { lv_label_set_text(labelType, preheat_menu.hotbed); lv_obj_align(labelType, buttonType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); @@ -212,20 +252,19 @@ void disp_temp_type() { } void disp_desire_temp() { - char buf[20] = {0}; - + char buf[20] = { 0 }; public_buf_l[0] = '\0'; if (uiCfg.curTempType == 0) { - strcat(public_buf_l, uiCfg.curSprayerChoose < 1 ? preheat_menu.ext1 : preheat_menu.ext2); - sprintf(buf, preheat_menu.value_state, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].celsius, (int)thermalManager.temp_hotend[uiCfg.curSprayerChoose].target); + strcat(public_buf_l, uiCfg.extruderIndex < 1 ? preheat_menu.ext1 : preheat_menu.ext2); + sprintf(buf, preheat_menu.value_state, thermalManager.wholeDegHotend(uiCfg.extruderIndex), thermalManager.degTargetHotend(uiCfg.extruderIndex)); } - #if HAS_HEATED_BED - else { + else { + #if HAS_HEATED_BED strcat(public_buf_l, preheat_menu.hotbed); - sprintf(buf, preheat_menu.value_state, (int)thermalManager.temp_bed.celsius, (int)thermalManager.temp_bed.target); - } - #endif + sprintf(buf, preheat_menu.value_state, thermalManager.wholeDegBed(), thermalManager.degTargetBed()); + #endif + } strcat_P(public_buf_l, PSTR(": ")); strcat(public_buf_l, buf); lv_label_set_text(tempText1, public_buf_l); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.h b/Marlin/src/lcd/extui/mks_ui/draw_preHeat.h similarity index 85% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.h rename to Marlin/src/lcd/extui/mks_ui/draw_preHeat.h index da3ce8838410..023f1228b33a 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_preHeat.h @@ -25,11 +25,13 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_preHeat(); -extern void lv_clear_preHeat(); -extern void disp_temp_type(); -extern void disp_step_heat(); -extern void disp_desire_temp(); +void lv_draw_preHeat(); +void lv_clear_preHeat(); +void disp_temp_type(); +void disp_step_heat(); +void disp_desire_temp(); +void disp_ext_heart(); +void disp_add_dec(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp index 0a8f81ea86a2..ebad70859741 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_print_file.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -30,8 +31,8 @@ //#include "../lvgl/src/lv_core/lv_disp.h" //#include "../lvgl/src/lv_core/lv_refr.h" -#include "../../../../sd/cardreader.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../sd/cardreader.h" +#include "../../../inc/MarlinConfig.h" static lv_obj_t *scr; extern lv_group_t* g; @@ -66,8 +67,10 @@ uint8_t sel_id = 0; //root2.rewind(); //SERIAL_ECHOLN(list_file.curDirPath); - if (curDirLever != 0) card.cd(list_file.curDirPath); - else card.cdroot(); // while(card.cdup()); + if (curDirLever != 0) + card.cd(list_file.curDirPath); + else + card.cdroot(); const uint16_t fileCnt = card.get_num_Files(); @@ -175,7 +178,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { } else { lv_clear_print_file(); - lv_draw_ready_print(); + TERN(MULTI_VOLUME, lv_draw_media_select(), lv_draw_ready_print()); } } else { @@ -246,6 +249,7 @@ static char test_public_buf_l[40]; void disp_gcode_icon(uint8_t file_num) { uint8_t i; + // TODO: set current media title?! scr = lv_screen_create(PRINT_FILE_UI, ""); // Create image buttons @@ -357,7 +361,7 @@ void disp_gcode_icon(uint8_t file_num) { uint32_t lv_open_gcode_file(char *path) { #if ENABLED(SDSUPPORT) uint32_t *ps4; - uint32_t pre_sread_cnt = UINT32_MAX; + uintptr_t pre_sread_cnt = UINTPTR_MAX; char *cur_name; cur_name = strrchr(path, '/'); @@ -367,7 +371,7 @@ uint32_t lv_open_gcode_file(char *path) { ps4 = (uint32_t *)strstr((char *)public_buf, ";simage:"); // Ignore the beginning message of gcode file if (ps4) { - pre_sread_cnt = (uint32_t)ps4 - (uint32_t)((uint32_t *)(&public_buf[0])); + pre_sread_cnt = (uintptr_t)ps4 - (uintptr_t)((uint32_t *)(&public_buf[0])); card.setIndex(pre_sread_cnt); } return pre_sread_cnt; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.h b/Marlin/src/lcd/extui/mks_ui/draw_print_file.h similarity index 79% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.h rename to Marlin/src/lcd/extui/mks_ui/draw_print_file.h index 759ccdc1c03b..85eadc0a6bcc 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_print_file.h @@ -49,15 +49,15 @@ typedef struct { } LIST_FILE; extern LIST_FILE list_file; -extern void disp_gcode_icon(uint8_t file_num); -extern void lv_draw_print_file(); -extern uint32_t lv_open_gcode_file(char *path); -extern void lv_gcode_file_read(uint8_t *data_buf); -extern void lv_close_gcode_file(); -extern void cutFileName(char *path, int len, int bytePerLine, char *outStr); -extern int ascii2dec_test(char *ascii); -extern void lv_clear_print_file(); -extern void lv_gcode_file_seek(uint32_t pos); +void disp_gcode_icon(uint8_t file_num); +void lv_draw_print_file(); +uint32_t lv_open_gcode_file(char *path); +void lv_gcode_file_read(uint8_t *data_buf); +void lv_close_gcode_file(); +void cutFileName(char *path, int len, int bytePerLine, char *outStr); +int ascii2dec_test(char *ascii); +void lv_clear_print_file(); +void lv_gcode_file_seek(uint32_t pos); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp b/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp similarity index 74% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_printing.cpp index 169cf1af7cd9..58bbbfbd5b6a 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_printing.cpp @@ -19,27 +19,28 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../MarlinCore.h" // for marlin_state -#include "../../../../module/temperature.h" -#include "../../../../module/motion.h" -#include "../../../../sd/cardreader.h" -#include "../../../../gcode/queue.h" -#include "../../../../gcode/gcode.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../MarlinCore.h" // for marlin_state +#include "../../../module/temperature.h" +#include "../../../module/motion.h" +#include "../../../sd/cardreader.h" +#include "../../../gcode/queue.h" +#include "../../../gcode/gcode.h" +#include "../../../inc/MarlinConfig.h" #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../feature/powerloss.h" #endif #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) - #include "../../../marlinui.h" + #include "../../marlinui.h" #endif extern lv_group_t *g; @@ -47,18 +48,26 @@ static lv_obj_t *scr; static lv_obj_t *labelExt1, *labelFan, *labelZpos, *labelTime; static lv_obj_t *labelPause, *labelStop, *labelOperat; static lv_obj_t *bar1, *bar1ValueText; -static lv_obj_t *buttonPause, *buttonOperat, *buttonStop; +static lv_obj_t *buttonPause, *buttonOperat, *buttonStop, *buttonExt1, *buttonFanstate, *buttonZpos; -TERN_(HAS_MULTI_EXTRUDER, static lv_obj_t *labelExt2); +#if HAS_MULTI_EXTRUDER + static lv_obj_t *labelExt2; + static lv_obj_t *buttonExt2; +#endif #if HAS_HEATED_BED static lv_obj_t* labelBed; + static lv_obj_t* buttonBedstate; #endif enum { ID_PAUSE = 1, ID_STOP, - ID_OPTION + ID_OPTION, + ID_TEMP_EXT, + ID_TEMP_BED, + ID_BABYSTEP, + ID_FAN }; bool once_flag; // = false @@ -98,7 +107,6 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { } #endif break; - case ID_STOP: lv_clear_printing(); lv_draw_dialog(DIALOG_TYPE_STOP); @@ -107,6 +115,24 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { lv_clear_printing(); lv_draw_operation(); break; + case ID_TEMP_EXT: + uiCfg.curTempType = 0; + lv_clear_printing(); + lv_draw_preHeat(); + break; + case ID_TEMP_BED: + uiCfg.curTempType = 1; + lv_clear_printing(); + lv_draw_preHeat(); + break; + case ID_BABYSTEP: + lv_clear_printing(); + lv_draw_baby_stepping(); + break; + case ID_FAN: + lv_clear_printing(); + lv_draw_fan(); + break; } } @@ -116,36 +142,26 @@ void lv_draw_printing() { scr = lv_screen_create(PRINTING_UI); // Create image buttons - lv_obj_t *buttonExt1 = lv_img_create(scr, nullptr); - lv_img_set_src(buttonExt1, "F:/bmp_ext1_state.bin"); - lv_obj_set_pos(buttonExt1, 205, 136); + buttonExt1 = lv_imgbtn_create(scr, "F:/bmp_ext1_state.bin", 206, 136, event_handler, ID_TEMP_EXT); #if HAS_MULTI_EXTRUDER - lv_obj_t *buttonExt2 = lv_img_create(scr, nullptr); - lv_img_set_src(buttonExt2, "F:/bmp_ext2_state.bin"); - lv_obj_set_pos(buttonExt2, 350, 136); + buttonExt2 = lv_imgbtn_create(scr, "F:/bmp_ext2_state.bin", 350, 136, event_handler, ID_TEMP_EXT); #endif #if HAS_HEATED_BED - lv_obj_t *buttonBedstate = lv_img_create(scr, nullptr); - lv_img_set_src(buttonBedstate, "F:/bmp_bed_state.bin"); - lv_obj_set_pos(buttonBedstate, 205, 186); + buttonBedstate = lv_imgbtn_create(scr, "F:/bmp_bed_state.bin", 206, 186, event_handler, ID_TEMP_BED); #endif - lv_obj_t *buttonFanstate = lv_img_create(scr, nullptr); - lv_img_set_src(buttonFanstate, "F:/bmp_fan_state.bin"); - lv_obj_set_pos(buttonFanstate, 350, 186); + buttonFanstate = lv_imgbtn_create(scr, "F:/bmp_fan_state.bin", 350, 186, event_handler, ID_FAN); lv_obj_t *buttonTime = lv_img_create(scr, nullptr); lv_img_set_src(buttonTime, "F:/bmp_time_state.bin"); - lv_obj_set_pos(buttonTime, 205, 86); + lv_obj_set_pos(buttonTime, 206, 86); - lv_obj_t *buttonZpos = lv_img_create(scr, nullptr); - lv_img_set_src(buttonZpos, "F:/bmp_zpos_state.bin"); - lv_obj_set_pos(buttonZpos, 350, 86); + buttonZpos = lv_imgbtn_create(scr, "F:/bmp_zpos_state.bin", 350, 86, event_handler, ID_BABYSTEP); - buttonPause = lv_imgbtn_create(scr, uiCfg.print_state == WORKING ? "F:/bmp_pause.bin" : "F:/bmp_resume.bin", 5, 240, event_handler, ID_PAUSE); - buttonStop = lv_imgbtn_create(scr, "F:/bmp_stop.bin", 165, 240, event_handler, ID_STOP); + buttonPause = lv_imgbtn_create(scr, uiCfg.print_state == WORKING ? "F:/bmp_pause.bin" : "F:/bmp_resume.bin", 5, 240, event_handler, ID_PAUSE); + buttonStop = lv_imgbtn_create(scr, "F:/bmp_stop.bin", 165, 240, event_handler, ID_STOP); buttonOperat = lv_imgbtn_create(scr, "F:/bmp_operate.bin", 325, 240, event_handler, ID_OPTION); #if HAS_ROTARY_ENCODER @@ -153,6 +169,9 @@ void lv_draw_printing() { lv_group_add_obj(g, buttonPause); lv_group_add_obj(g, buttonStop); lv_group_add_obj(g, buttonOperat); + lv_group_add_obj(g, buttonPause); + lv_group_add_obj(g, buttonPause); + lv_group_add_obj(g, buttonPause); } #endif @@ -166,7 +185,7 @@ void lv_draw_printing() { labelBed = lv_label_create(scr, 250, 196, nullptr); #endif - labelFan = lv_label_create(scr, 395, 196, nullptr); + labelFan = lv_label_create(scr, 395, 196, nullptr); labelTime = lv_label_create(scr, 250, 96, nullptr); labelZpos = lv_label_create(scr, 395, 96, nullptr); @@ -191,8 +210,8 @@ void lv_draw_printing() { lv_bar_set_style(bar1, LV_BAR_STYLE_INDIC, &lv_bar_style_indic); lv_bar_set_anim_time(bar1, 1000); lv_bar_set_value(bar1, 0, LV_ANIM_ON); - bar1ValueText = lv_label_create_empty(bar1); - lv_label_set_text(bar1ValueText,"0%"); + bar1ValueText = lv_label_create_empty(bar1); + lv_label_set_text(bar1ValueText, "0%"); lv_obj_align(bar1ValueText, bar1, LV_ALIGN_CENTER, 0, 0); disp_ext_temp(); @@ -203,24 +222,24 @@ void lv_draw_printing() { } void disp_ext_temp() { - sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.temp_hotend[0].celsius, (int)thermalManager.temp_hotend[0].target); + sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); lv_label_set_text(labelExt1, public_buf_l); #if HAS_MULTI_EXTRUDER - sprintf(public_buf_l, printing_menu.temp1, (int)thermalManager.temp_hotend[1].celsius, (int)thermalManager.temp_hotend[1].target); + sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); lv_label_set_text(labelExt2, public_buf_l); #endif } void disp_bed_temp() { #if HAS_HEATED_BED - sprintf(public_buf_l, printing_menu.bed_temp, (int)thermalManager.temp_bed.celsius, (int)thermalManager.temp_bed.target); + sprintf(public_buf_l, printing_menu.bed_temp, thermalManager.wholeDegBed(), thermalManager.degTargetBed()); lv_label_set_text(labelBed, public_buf_l); #endif } void disp_fan_speed() { - sprintf_P(public_buf_l, PSTR("%3d"), thermalManager.fan_speed[0]); + sprintf_P(public_buf_l, PSTR("%d%%"), (int)thermalManager.fanSpeedPercent(0)); lv_label_set_text(labelFan, public_buf_l); } @@ -235,7 +254,7 @@ void disp_print_time() { } void disp_fan_Zpos() { - sprintf_P(public_buf_l, PSTR("%.3f"), current_position[Z_AXIS]); + dtostrf(current_position.z, 1, 3, public_buf_l); lv_label_set_text(labelZpos, public_buf_l); } @@ -272,7 +291,7 @@ void setProBarRate() { if (disp_state == PRINTING_UI) { lv_bar_set_value(bar1, rate, LV_ANIM_ON); sprintf_P(public_buf_l, "%d%%", rate); - lv_label_set_text(bar1ValueText,public_buf_l); + lv_label_set_text(bar1ValueText, public_buf_l); lv_obj_align(bar1ValueText, bar1, LV_ALIGN_CENTER, 0, 0); if (marlin_state == MF_SD_COMPLETE) { diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_printing.h b/Marlin/src/lcd/extui/mks_ui/draw_printing.h similarity index 76% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_printing.h rename to Marlin/src/lcd/extui/mks_ui/draw_printing.h index 7c98fd767b96..b2a02a62da54 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_printing.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_printing.h @@ -36,17 +36,17 @@ enum { STOP }; -extern void lv_draw_printing(); -extern void lv_clear_printing(); -extern void disp_ext_temp(); -extern void disp_bed_temp(); -extern void disp_fan_speed(); -extern void disp_print_time(); -extern void disp_fan_Zpos(); -extern void reset_print_time(); -extern void start_print_time(); -extern void stop_print_time(); -extern void setProBarRate(); +void lv_draw_printing(); +void lv_clear_printing(); +void disp_ext_temp(); +void disp_bed_temp(); +void disp_fan_speed(); +void disp_print_time(); +void disp_fan_Zpos(); +void reset_print_time(); +void start_print_time(); +void stop_print_time(); +void setProBarRate(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp new file mode 100644 index 000000000000..1596944bd899 --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp @@ -0,0 +1,249 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if HAS_TFT_LVGL_UI + +#include "draw_ready_print.h" +#include "draw_tool.h" +#include +#include "tft_lvgl_configuration.h" +#include "draw_ui.h" + +#include + +#include "../../../module/temperature.h" +#include "../../../inc/MarlinConfig.h" + +#if ENABLED(TOUCH_SCREEN_CALIBRATION) + #include "../../tft_io/touch_calibration.h" + #include "draw_touch_calibration.h" +#endif + +#include "mks_hardware.h" +#include + +#define ICON_POS_Y 260 +#define TARGET_LABEL_MOD_Y -36 +#define LABEL_MOD_Y 30 + +extern lv_group_t* g; +static lv_obj_t *scr; +static lv_obj_t *buttonExt1, *labelExt1, *buttonFanstate, *labelFan; + +#if HAS_MULTI_HOTEND + static lv_obj_t *labelExt2; + static lv_obj_t *buttonExt2; +#endif + +#if HAS_HEATED_BED + static lv_obj_t* labelBed; + static lv_obj_t* buttonBedstate; +#endif + +#if ENABLED(MKS_TEST) + uint8_t current_disp_ui = 0; +#endif + +enum { ID_TOOL = 1, ID_SET, ID_PRINT, ID_INFO_EXT, ID_INFO_BED, ID_INFO_FAN }; + +static void event_handler(lv_obj_t *obj, lv_event_t event) { + if (event != LV_EVENT_RELEASED) return; + lv_clear_ready_print(); + switch (obj->mks_obj_id) { + case ID_TOOL: lv_draw_tool(); break; + case ID_SET: lv_draw_set(); break; + case ID_INFO_EXT: uiCfg.curTempType = 0; lv_draw_preHeat(); break; + case ID_INFO_BED: uiCfg.curTempType = 1; lv_draw_preHeat(); break; + case ID_INFO_FAN: lv_draw_fan(); break; + case ID_PRINT: TERN(MULTI_VOLUME, lv_draw_media_select(), lv_draw_print_file()); break; + } +} + +lv_obj_t *limit_info, *det_info; +lv_style_t limit_style, det_style; +void disp_Limit_ok() { + limit_style.text.color.full = 0xFFFF; + lv_obj_set_style(limit_info, &limit_style); + lv_label_set_text(limit_info, "Limit:ok"); +} +void disp_Limit_error() { + limit_style.text.color.full = 0xF800; + lv_obj_set_style(limit_info, &limit_style); + lv_label_set_text(limit_info, "Limit:error"); +} + +void disp_det_ok() { + det_style.text.color.full = 0xFFFF; + lv_obj_set_style(det_info, &det_style); + lv_label_set_text(det_info, "det:ok"); +} + +void disp_det_error() { + det_style.text.color.full = 0xF800; + lv_obj_set_style(det_info, &det_style); + lv_label_set_text(det_info, "det:error"); +} + +lv_obj_t *e1, *e2, *e3, *bed; +void mks_disp_test() { + char buf[30] = {0}; + #if HAS_HOTEND + sprintf_P(buf, PSTR("e1:%d"), thermalManager.wholeDegHotend(0)); + lv_label_set_text(e1, buf); + #endif + #if HAS_MULTI_HOTEND + sprintf_P(buf, PSTR("e2:%d"), thermalManager.wholeDegHotend(1)); + lv_label_set_text(e2, buf); + #endif + #if HAS_HEATED_BED + sprintf_P(buf, PSTR("bed:%d"), thermalManager.wholeDegBed()); + lv_label_set_text(bed, buf); + #endif +} + +void lv_draw_ready_print() { + char buf[30] = {0}; + lv_obj_t *buttonTool; + + disp_state_stack._disp_index = 0; + ZERO(disp_state_stack._disp_state); + scr = lv_screen_create(PRINT_READY_UI, ""); + + if (mks_test_flag == 0x1E) { + // Create image buttons + buttonTool = lv_imgbtn_create(scr, "F:/bmp_tool.bin", event_handler, ID_TOOL); + + lv_obj_set_pos(buttonTool, 360, 180); + + lv_obj_t *label_tool = lv_label_create_empty(buttonTool); + if (gCfgItems.multiple_language) { + lv_label_set_text(label_tool, main_menu.tool); + lv_obj_align(label_tool, buttonTool, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET); + } + + #if HAS_HOTEND + e1 = lv_label_create_empty(scr); + lv_obj_set_pos(e1, 20, 20); + sprintf_P(buf, PSTR("e1: %d"), thermalManager.wholeDegHotend(0)); + lv_label_set_text(e1, buf); + #endif + #if HAS_MULTI_HOTEND + e2 = lv_label_create_empty(scr); + lv_obj_set_pos(e2, 20, 45); + sprintf_P(buf, PSTR("e2: %d"), thermalManager.wholeDegHotend(1)); + lv_label_set_text(e2, buf); + #endif + #if HAS_HEATED_BED + bed = lv_label_create_empty(scr); + lv_obj_set_pos(bed, 20, 95); + sprintf_P(buf, PSTR("bed: %d"), thermalManager.wholeDegBed()); + lv_label_set_text(bed, buf); + #endif + + limit_info = lv_label_create_empty(scr); + + lv_style_copy(&limit_style, &lv_style_scr); + limit_style.body.main_color.full = 0x0000; + limit_style.body.grad_color.full = 0x0000; + limit_style.text.color.full = 0xFFFF; + lv_obj_set_style(limit_info, &limit_style); + + lv_obj_set_pos(limit_info, 20, 120); + lv_label_set_text(limit_info, " "); + + det_info = lv_label_create_empty(scr); + + lv_style_copy(&det_style, &lv_style_scr); + det_style.body.main_color.full = 0x0000; + det_style.body.grad_color.full = 0x0000; + det_style.text.color.full = 0xFFFF; + lv_obj_set_style(det_info, &det_style); + + lv_obj_set_pos(det_info, 20, 145); + lv_label_set_text(det_info, " "); + } + else { + lv_big_button_create(scr, "F:/bmp_tool.bin", main_menu.tool, 20, 90, event_handler, ID_TOOL); + lv_big_button_create(scr, "F:/bmp_set.bin", main_menu.set, 180, 90, event_handler, ID_SET); + lv_big_button_create(scr, "F:/bmp_printing.bin", main_menu.print, 340, 90, event_handler, ID_PRINT); + + // Monitoring + #if HAS_HOTEND + buttonExt1 = lv_big_button_create(scr, "F:/bmp_ext1_state.bin", " ", 20, ICON_POS_Y, event_handler, ID_INFO_EXT); + #endif + #if HAS_MULTI_HOTEND + buttonExt2 = lv_big_button_create(scr, "F:/bmp_ext2_state.bin", " ", 180, ICON_POS_Y, event_handler, ID_INFO_EXT); + #endif + #if HAS_HEATED_BED + buttonBedstate = lv_big_button_create(scr, "F:/bmp_bed_state.bin", " ", TERN(HAS_MULTI_HOTEND, 271, 210), ICON_POS_Y, event_handler, ID_INFO_BED); + #endif + + TERN_(HAS_HOTEND, labelExt1 = lv_label_create_empty(scr)); + TERN_(HAS_MULTI_HOTEND, labelExt2 = lv_label_create_empty(scr)); + TERN_(HAS_HEATED_BED, labelBed = lv_label_create_empty(scr)); + TERN_(HAS_FAN, labelFan = lv_label_create_empty(scr)); + + lv_temp_refr(); + } + + #if ENABLED(TOUCH_SCREEN_CALIBRATION) + // If calibration is required, let's trigger it now, handles the case when there is default value in configuration files + if (!touch_calibration.calibration_loaded()) { + lv_clear_ready_print(); + lv_draw_touch_calibration_screen(); + } + #endif +} + +void lv_temp_refr() { + #if HAS_HOTEND + sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); + lv_label_set_text(labelExt1, public_buf_l); + lv_obj_align(labelExt1, buttonExt1, LV_ALIGN_OUT_RIGHT_MID, 0, 0); + #endif + #if HAS_MULTI_HOTEND + sprintf(public_buf_l, printing_menu.temp1, thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); + lv_label_set_text(labelExt2, public_buf_l); + lv_obj_align(labelExt2, buttonExt2, LV_ALIGN_OUT_RIGHT_MID, 0, 0); + #endif + #if HAS_HEATED_BED + sprintf(public_buf_l, printing_menu.bed_temp, thermalManager.wholeDegBed(), thermalManager.degTargetBed()); + lv_label_set_text(labelBed, public_buf_l); + lv_obj_align(labelBed, buttonBedstate, LV_ALIGN_OUT_RIGHT_MID, 0, 0); + #endif + #if HAS_FAN + sprintf_P(public_buf_l, PSTR("%d%%"), (int)thermalManager.fanSpeedPercent(0)); + lv_label_set_text(labelFan, public_buf_l); + lv_obj_align(labelFan, buttonFanstate, LV_ALIGN_OUT_RIGHT_MID, 0, 0); + #endif +} + +void lv_clear_ready_print() { + #if HAS_ROTARY_ENCODER + if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g); + #endif + lv_obj_del(scr); +} + +#endif // HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.h b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.h similarity index 82% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.h rename to Marlin/src/lcd/extui/mks_ui/draw_ready_print.h index a3cfd6766578..873be528ed1d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.h @@ -25,13 +25,14 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_ready_print(); -extern void mks_disp_test(); -extern void disp_Limit_ok(); -extern void disp_Limit_error(); -extern void disp_det_error(); -extern void disp_det_ok(); -extern void lv_clear_ready_print(); +void lv_draw_ready_print(); +void mks_disp_test(); +void disp_Limit_ok(); +void disp_Limit_error(); +void disp_det_error(); +void disp_det_ok(); +void lv_clear_ready_print(); +void lv_temp_refr(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_set.cpp b/Marlin/src/lcd/extui/mks_ui/draw_set.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_set.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_set.cpp index 6b06793f281c..2dd3a9dfd9b9 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_set.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_set.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -30,11 +31,11 @@ #include "pic_manager.h" -#include "../../../../gcode/queue.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../gcode/queue.h" +#include "../../../inc/MarlinConfig.h" #if HAS_SUICIDE - #include "../../../../MarlinCore.h" + #include "../../../MarlinCore.h" #endif static lv_obj_t *scr; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_set.h b/Marlin/src/lcd/extui/mks_ui/draw_set.h similarity index 94% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_set.h rename to Marlin/src/lcd/extui/mks_ui/draw_set.h index 8ad8b9f2eafe..a270308e074e 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_set.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_set.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_set(); -extern void lv_clear_set(); +void lv_draw_set(); +void lv_clear_set(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_step_settings.cpp similarity index 85% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_step_settings.cpp index c5cf45143f0e..fc920728b425 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_step_settings.cpp @@ -19,15 +19,16 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -82,22 +83,22 @@ void lv_draw_step_settings() { scr = lv_screen_create(STEPS_UI, machine_menu.StepsConfTitle); if (!uiCfg.para_ui_page) { - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.axis_steps_per_mm[X_AXIS]); + dtostrf(planner.settings.axis_steps_per_mm[X_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.X_Steps, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_STEP_X, 0, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.axis_steps_per_mm[Y_AXIS]); + dtostrf(planner.settings.axis_steps_per_mm[Y_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.Y_Steps, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_STEP_Y, 1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.axis_steps_per_mm[Z_AXIS]); + dtostrf(planner.settings.axis_steps_per_mm[Z_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.Z_Steps, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_STEP_Z, 2, public_buf_l); - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.axis_steps_per_mm[E_AXIS]); + dtostrf(planner.settings.axis_steps_per_mm[E_AXIS], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.E0_Steps, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_STEP_E0, 3, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.next, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_STEP_DOWN, true); } else { - sprintf_P(public_buf_l, PSTR("%.1f"), planner.settings.axis_steps_per_mm[E_AXIS_N(1)]); + dtostrf(planner.settings.axis_steps_per_mm[E_AXIS_N(1)], 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.E1_Steps, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_STEP_E1, 0, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.previous, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_STEP_UP, true); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_step_settings.h similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_step_settings.h index 249e5a7942d7..4f32f0a6c2b0 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_step_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_step_settings(); -extern void lv_clear_step_settings(); +void lv_draw_step_settings(); +void lv_clear_step_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.cpp similarity index 90% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.cpp index 61ee3be1c3f4..60a3562b9d8a 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.cpp @@ -19,16 +19,17 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if BOTH(HAS_TFT_LVGL_UI, HAS_TRINAMIC_CONFIG) #include "draw_ui.h" #include -#include "../../../../module/stepper/indirection.h" -#include "../../../../feature/tmc_util.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/stepper/indirection.h" +#include "../../../feature/tmc_util.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -101,7 +102,7 @@ void lv_draw_tmc_current_settings() { #else milliamps = -1; #endif - sprintf_P(public_buf_l, PSTR("%.1f"), milliamps); + dtostrf(milliamps, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.X_Current, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_TMC_CURRENT_X, 0, public_buf_l); #if AXIS_IS_TMC(Y) @@ -109,7 +110,7 @@ void lv_draw_tmc_current_settings() { #else milliamps = -1; #endif - sprintf_P(public_buf_l, PSTR("%.1f"), milliamps); + dtostrf(milliamps, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.Y_Current, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_TMC_CURRENT_Y, 1, public_buf_l); #if AXIS_IS_TMC(Z) @@ -117,7 +118,7 @@ void lv_draw_tmc_current_settings() { #else milliamps = -1; #endif - sprintf_P(public_buf_l, PSTR("%.1f"), milliamps); + dtostrf(milliamps, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.Z_Current, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_TMC_CURRENT_Z, 2, public_buf_l); #if AXIS_IS_TMC(E0) @@ -125,7 +126,7 @@ void lv_draw_tmc_current_settings() { #else milliamps = -1; #endif - sprintf_P(public_buf_l, PSTR("%.1f"), milliamps); + dtostrf(milliamps, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.E0_Current, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_TMC_CURRENT_E0, 3, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.next, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_TMC_CURRENT_DOWN, true); @@ -136,7 +137,7 @@ void lv_draw_tmc_current_settings() { #else milliamps = -1; #endif - sprintf_P(public_buf_l, PSTR("%.1f"), milliamps); + dtostrf(milliamps, 1, 1, public_buf_l); lv_screen_menu_item_1_edit(scr, machine_menu.E1_Current, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_TMC_CURRENT_E1, 0, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.previous, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_TMC_CURRENT_UP, true); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.h similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.h index 8310305e6170..99589a3a17c7 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_tmc_current_settings.h @@ -25,10 +25,9 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_tmc_current_settings(); -extern void lv_clear_tmc_current_settings(); +void lv_draw_tmc_current_settings(); +void lv_clear_tmc_current_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ #endif - diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.cpp similarity index 67% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.cpp index 08d442f8a36b..f25f850c2a53 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.cpp @@ -19,19 +19,20 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if BOTH(HAS_TFT_LVGL_UI, HAS_STEALTHCHOP) #include "draw_ui.h" #include -#include "../../../../module/stepper/indirection.h" -#include "../../../../feature/tmc_util.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/stepper/indirection.h" +#include "../../../feature/tmc_util.h" +#include "../../../inc/MarlinConfig.h" #if ENABLED(EEPROM_SETTINGS) - #include "../../../../module/settings.h" + #include "../../../module/settings.h" #endif extern lv_group_t *g; @@ -68,30 +69,20 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { draw_return_ui(); break; - #if AXIS_HAS_STEALTHCHOP(X) - case ID_TMC_MODE_X: - toggle_chop(stepperX, buttonXState); - break; + #if X_HAS_STEALTHCHOP + case ID_TMC_MODE_X: toggle_chop(stepperX, buttonXState); break; #endif - #if AXIS_HAS_STEALTHCHOP(Y) - case ID_TMC_MODE_Y: - toggle_chop(stepperY, buttonYState); - break; + #if Y_HAS_STEALTHCHOP + case ID_TMC_MODE_Y: toggle_chop(stepperY, buttonYState); break; #endif - #if AXIS_HAS_STEALTHCHOP(Z) - case ID_TMC_MODE_Z: - toggle_chop(stepperZ, buttonZState); - break; + #if Z_HAS_STEALTHCHOP + case ID_TMC_MODE_Z: toggle_chop(stepperZ, buttonZState); break; #endif - #if AXIS_HAS_STEALTHCHOP(E0) - case ID_TMC_MODE_E0: - toggle_chop(stepperE0, buttonE0State); - break; + #if E0_HAS_STEALTHCHOP + case ID_TMC_MODE_E0: toggle_chop(stepperE0, buttonE0State); break; #endif - #if AXIS_HAS_STEALTHCHOP(E1) - case ID_TMC_MODE_E1: - toggle_chop(stepperE1, buttonE1State); - break; + #if E1_HAS_STEALTHCHOP + case ID_TMC_MODE_E1: toggle_chop(stepperE1, buttonE1State); break; #endif case ID_TMC_MODE_UP: @@ -113,26 +104,16 @@ void lv_draw_tmc_step_mode_settings() { scr = lv_screen_create(TMC_MODE_UI, machine_menu.TmcStepModeConfTitle); bool stealth_X = false, stealth_Y = false, stealth_Z = false, stealth_E0 = false, stealth_E1 = false; - #if AXIS_HAS_STEALTHCHOP(X) - stealth_X = stepperX.get_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - stealth_Y = stepperY.get_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - stealth_Z = stepperZ.get_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E0) - stealth_E0 = stepperE0.get_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - stealth_E1 = stepperE1.get_stealthChop(); - #endif + TERN_(X_HAS_STEALTHCHOP, stealth_X = stepperX.get_stealthChop()); + TERN_(Y_HAS_STEALTHCHOP, stealth_Y = stepperY.get_stealthChop()); + TERN_(Z_HAS_STEALTHCHOP, stealth_Z = stepperZ.get_stealthChop()); + TERN_(E0_HAS_STEALTHCHOP, stealth_E0 = stepperE0.get_stealthChop()); + TERN_(E1_HAS_STEALTHCHOP, stealth_E1 = stepperE1.get_stealthChop()); if (!uiCfg.para_ui_page) { - buttonXState = lv_screen_menu_item_onoff(scr, machine_menu.X_StepMode, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_TMC_MODE_X, 0, stealth_X); - buttonYState = lv_screen_menu_item_onoff(scr, machine_menu.Y_StepMode, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_TMC_MODE_Y, 1, stealth_Y); - buttonZState = lv_screen_menu_item_onoff(scr, machine_menu.Z_StepMode, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_TMC_MODE_Z, 2, stealth_Z); + buttonXState = lv_screen_menu_item_onoff(scr, machine_menu.X_StepMode, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_TMC_MODE_X, 0, stealth_X); + buttonYState = lv_screen_menu_item_onoff(scr, machine_menu.Y_StepMode, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_TMC_MODE_Y, 1, stealth_Y); + buttonZState = lv_screen_menu_item_onoff(scr, machine_menu.Z_StepMode, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_TMC_MODE_Z, 2, stealth_Z); buttonE0State = lv_screen_menu_item_onoff(scr, machine_menu.E0_StepMode, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_TMC_MODE_E0, 2, stealth_E0); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.next, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_TMC_MODE_DOWN, true); } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.h similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.h index a15baf21e828..aa42d9b87dba 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_tmc_step_mode_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_tmc_step_mode_settings(); -extern void lv_clear_tmc_step_mode_settings(); +void lv_draw_tmc_step_mode_settings(); +void lv_clear_tmc_step_mode_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp b/Marlin/src/lcd/extui/mks_ui/draw_tool.cpp similarity index 85% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_tool.cpp index aa6d3869a6dc..9a0462f1480d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_tool.cpp @@ -19,16 +19,17 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../gcode/queue.h" -#include "../../../../module/temperature.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../gcode/queue.h" +#include "../../../module/temperature.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -45,7 +46,7 @@ enum { }; #if ENABLED(MKS_TEST) - extern uint8_t curent_disp_ui; + extern uint8_t current_disp_ui; #endif static void event_handler(lv_obj_t *obj, lv_event_t event) { @@ -59,8 +60,8 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { case ID_T_HOME: lv_draw_home(); break; case ID_T_LEVELING: #if ENABLED(AUTO_BED_LEVELING_BILINEAR) - get_gcode_command(AUTO_LEVELING_COMMAND_ADDR,(uint8_t *)public_buf_m); - public_buf_m[sizeof(public_buf_m)-1] = 0; + get_gcode_command(AUTO_LEVELING_COMMAND_ADDR, (uint8_t *)public_buf_m); + public_buf_m[sizeof(public_buf_m) - 1] = 0; queue.inject_P(PSTR(public_buf_m)); #else uiCfg.leveling_first_time = true; @@ -68,14 +69,14 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { #endif break; case ID_T_FILAMENT: - uiCfg.desireSprayerTempBak = thermalManager.temp_hotend[uiCfg.curSprayerChoose].target; + uiCfg.hotendTargetTempBak = thermalManager.degTargetHotend(uiCfg.extruderIndex); lv_draw_filament_change(); break; case ID_T_MORE: lv_draw_more(); break; case ID_T_RETURN: - TERN_(MKS_TEST, curent_disp_ui = 1); + TERN_(MKS_TEST, current_disp_ui = 1); lv_draw_ready_print(); break; } @@ -88,7 +89,7 @@ void lv_draw_tool() { lv_big_button_create(scr, "F:/bmp_mov.bin", tool_menu.move, BTN_X_PIXEL * 2 + INTERVAL_V * 3, titleHeight, event_handler, ID_T_MOV); lv_big_button_create(scr, "F:/bmp_zero.bin", tool_menu.home, BTN_X_PIXEL * 3 + INTERVAL_V * 4, titleHeight, event_handler, ID_T_HOME); lv_big_button_create(scr, "F:/bmp_leveling.bin", tool_menu.TERN(AUTO_BED_LEVELING_BILINEAR, autoleveling, leveling), INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_T_LEVELING); - lv_big_button_create(scr, "F:/bmp_filamentchange.bin", tool_menu.filament, BTN_X_PIXEL+INTERVAL_V*2,BTN_Y_PIXEL+INTERVAL_H+titleHeight, event_handler,ID_T_FILAMENT); + lv_big_button_create(scr, "F:/bmp_filamentchange.bin", tool_menu.filament, BTN_X_PIXEL + INTERVAL_V * 2, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_T_FILAMENT); lv_big_button_create(scr, "F:/bmp_more.bin", tool_menu.more, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_T_MORE); lv_big_button_create(scr, "F:/bmp_return.bin", common_menu.text_back, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_T_RETURN); } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_tool.h b/Marlin/src/lcd/extui/mks_ui/draw_tool.h similarity index 94% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_tool.h rename to Marlin/src/lcd/extui/mks_ui/draw_tool.h index 1cfd297aba2a..0dc86b703072 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_tool.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_tool.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_tool(); -extern void lv_clear_tool(); +void lv_draw_tool(); +void lv_clear_tool(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_touch_calibration.cpp b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp similarity index 88% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_touch_calibration.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp index 8b9371fbe79d..c7e2d5bc3148 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_touch_calibration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if BOTH(HAS_TFT_LVGL_UI, TOUCH_SCREEN_CALIBRATION) @@ -27,13 +28,17 @@ #include "draw_touch_calibration.h" #include -#include "../../../../inc/MarlinConfig.h" -#include "../../../tft_io/touch_calibration.h" +#include "../../../inc/MarlinConfig.h" +#include "../../tft_io/touch_calibration.h" #include "SPI_TFT.h" static lv_obj_t *scr; static lv_obj_t *status_label; +#if ENABLED(MKS_TEST) + extern uint8_t current_disp_ui; +#endif + static void event_handler(lv_obj_t *obj, lv_event_t event); enum { @@ -66,9 +71,9 @@ void lv_update_touch_calibration_screen() { if (calibration_stage < CALIBRATION_SUCCESS) { // handle current state switch (calibration_stage) { - case CALIBRATION_TOP_LEFT: str = GET_TEXT(MSG_TOP_LEFT); break; - case CALIBRATION_BOTTOM_LEFT: str = GET_TEXT(MSG_BOTTOM_LEFT); break; - case CALIBRATION_TOP_RIGHT: str = GET_TEXT(MSG_TOP_RIGHT); break; + case CALIBRATION_TOP_LEFT: str = GET_TEXT(MSG_TOP_LEFT); break; + case CALIBRATION_BOTTOM_LEFT: str = GET_TEXT(MSG_BOTTOM_LEFT); break; + case CALIBRATION_TOP_RIGHT: str = GET_TEXT(MSG_TOP_RIGHT); break; case CALIBRATION_BOTTOM_RIGHT: str = GET_TEXT(MSG_BOTTOM_RIGHT); break; default: break; } @@ -93,7 +98,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { if (event != LV_EVENT_RELEASED) return; switch (obj->mks_obj_id) { case ID_TC_RETURN: - TERN_(MKS_TEST, curent_disp_ui = 1); + TERN_(MKS_TEST, current_disp_ui = 1); lv_clear_touch_calibration_screen(); draw_return_ui(); break; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_touch_calibration.h b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.h similarity index 87% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_touch_calibration.h rename to Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.h index 63749a2b3c2a..567256a792e1 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_touch_calibration.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_touch_calibration.h @@ -25,9 +25,9 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_touch_calibration_screen(); -extern void lv_clear_touch_calibration_screen(); -extern void lv_update_touch_calibration_screen(); +void lv_draw_touch_calibration_screen(); +void lv_clear_touch_calibration_screen(); +void lv_update_touch_calibration_screen(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_manual_level_pos_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_tramming_pos_settings.cpp similarity index 76% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_manual_level_pos_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_tramming_pos_settings.cpp index 6cbd703f9ca1..d6e52606c06d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_manual_level_pos_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_tramming_pos_settings.cpp @@ -19,15 +19,16 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" extern lv_group_t *g; static lv_obj_t *scr; @@ -53,7 +54,7 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { switch (obj->mks_obj_id) { case ID_MANUAL_POS_RETURN: uiCfg.para_ui_page = false; - lv_clear_manual_level_pos_settings(); + lv_clear_tramming_pos_settings(); draw_return_ui(); return; case ID_MANUAL_POS_X1: @@ -81,54 +82,54 @@ static void event_handler(lv_obj_t *obj, lv_event_t event) { value = level_pos_y4; break; case ID_MANUAL_POS_X5: - value = level_pos_y5; + value = level_pos_x5; break; case ID_MANUAL_POS_Y5: value = level_pos_y5; break; case ID_MANUAL_POS_UP: uiCfg.para_ui_page = false; - lv_clear_manual_level_pos_settings(); - lv_draw_manual_level_pos_settings(); + lv_clear_tramming_pos_settings(); + lv_draw_tramming_pos_settings(); return; case ID_MANUAL_POS_DOWN: uiCfg.para_ui_page = true; - lv_clear_manual_level_pos_settings(); - lv_draw_manual_level_pos_settings(); + lv_clear_tramming_pos_settings(); + lv_draw_tramming_pos_settings(); return; } - lv_clear_manual_level_pos_settings(); + lv_clear_tramming_pos_settings(); lv_draw_number_key(); } -void lv_draw_manual_level_pos_settings() { +void lv_draw_tramming_pos_settings() { char buf2[50]; scr = lv_screen_create(MANUAL_LEVELING_POSIGION_UI, machine_menu.LevelingParaConfTitle); if (!uiCfg.para_ui_page) { - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.levelingPos[0][0]); - sprintf_P(buf2, PSTR("%d"), gCfgItems.levelingPos[0][1]); + itoa(gCfgItems.trammingPos[0].x, public_buf_l, 10); + itoa(gCfgItems.trammingPos[0].y, buf2, 10); lv_screen_menu_item_2_edit(scr, leveling_menu.position1, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_MANUAL_POS_Y1, 0, buf2, ID_MANUAL_POS_X1, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.levelingPos[1][0]); - sprintf_P(buf2, PSTR("%d"), gCfgItems.levelingPos[1][1]); + itoa(gCfgItems.trammingPos[1].x, public_buf_l, 10); + itoa(gCfgItems.trammingPos[1].y, buf2, 10); lv_screen_menu_item_2_edit(scr, leveling_menu.position2, PARA_UI_POS_X, PARA_UI_POS_Y * 2, event_handler, ID_MANUAL_POS_Y2, 1, buf2, ID_MANUAL_POS_X2, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.levelingPos[2][0]); - sprintf_P(buf2, PSTR("%d"), gCfgItems.levelingPos[2][1]); + itoa(gCfgItems.trammingPos[2].x, public_buf_l, 10); + itoa(gCfgItems.trammingPos[2].y, buf2, 10); lv_screen_menu_item_2_edit(scr, leveling_menu.position3, PARA_UI_POS_X, PARA_UI_POS_Y * 3, event_handler, ID_MANUAL_POS_Y3, 2, buf2, ID_MANUAL_POS_X3, public_buf_l); - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.levelingPos[3][0]); - sprintf_P(buf2, PSTR("%d"), gCfgItems.levelingPos[3][1]); + itoa(gCfgItems.trammingPos[3].x, public_buf_l, 10); + itoa(gCfgItems.trammingPos[3].y, buf2, 10); lv_screen_menu_item_2_edit(scr, leveling_menu.position4, PARA_UI_POS_X, PARA_UI_POS_Y * 4, event_handler, ID_MANUAL_POS_Y4, 3, buf2, ID_MANUAL_POS_X4, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.next, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_MANUAL_POS_DOWN, true); } else { - sprintf_P(public_buf_l, PSTR("%d"), gCfgItems.levelingPos[4][0]); - sprintf_P(buf2, PSTR("%d"), gCfgItems.levelingPos[4][1]); - lv_screen_menu_item_2_edit(scr, leveling_menu.position4, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_MANUAL_POS_Y5, 0, buf2, ID_MANUAL_POS_X5, public_buf_l); + itoa(gCfgItems.trammingPos[4].x, public_buf_l, 10); + itoa(gCfgItems.trammingPos[4].y, buf2, 10); + lv_screen_menu_item_2_edit(scr, leveling_menu.position5, PARA_UI_POS_X, PARA_UI_POS_Y, event_handler, ID_MANUAL_POS_Y5, 0, buf2, ID_MANUAL_POS_X5, public_buf_l); lv_big_button_create(scr, "F:/bmp_back70x40.bin", machine_menu.previous, PARA_UI_TURN_PAGE_POS_X, PARA_UI_TURN_PAGE_POS_Y, event_handler, ID_MANUAL_POS_UP, true); } @@ -136,7 +137,7 @@ void lv_draw_manual_level_pos_settings() { lv_big_button_create(scr, "F:/bmp_back70x40.bin", common_menu.text_back, PARA_UI_BACL_POS_X + 10, PARA_UI_BACL_POS_Y, event_handler, ID_MANUAL_POS_RETURN, true); } -void lv_clear_manual_level_pos_settings() { +void lv_clear_tramming_pos_settings() { #if HAS_ROTARY_ENCODER if (gCfgItems.encoder_enable) lv_group_remove_all_objs(g); #endif diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_manual_level_pos_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_tramming_pos_settings.h similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_manual_level_pos_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_tramming_pos_settings.h index 83fd225bd3b7..863ff6fc7e84 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_manual_level_pos_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_tramming_pos_settings.h @@ -25,8 +25,8 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_manual_level_pos_settings(); -extern void lv_clear_manual_level_pos_settings(); +void lv_draw_tramming_pos_settings(); +void lv_clear_tramming_pos_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp similarity index 84% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_ui.cpp index 9d13ca31209e..c44bdfea9311 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -30,28 +31,31 @@ #include "pic_manager.h" #include "draw_ui.h" -#include "mks_hardware_test.h" #include -#include "../../../../MarlinCore.h" // for marlin_state -#include "../../../../sd/cardreader.h" -#include "../../../../module/motion.h" -#include "../../../../module/planner.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../MarlinCore.h" // for marlin_state +#include "../../../sd/cardreader.h" +#include "../../../module/motion.h" +#include "../../../module/planner.h" +#include "../../../inc/MarlinConfig.h" #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../feature/powerloss.h" #endif #if ENABLED(PARK_HEAD_ON_PAUSE) - #include "../../../../feature/pause.h" + #include "../../../feature/pause.h" #endif #if ENABLED(TOUCH_SCREEN_CALIBRATION) #include "draw_touch_calibration.h" #endif +#if ENABLED(MKS_TEST) + #include "mks_hardware.h" +#endif + CFG_ITMES gCfgItems; UI_CFG uiCfg; DISP_STATE_STACK disp_state_stack; @@ -72,7 +76,7 @@ extern bool once_flag; extern uint8_t sel_id; extern lv_group_t *g; -extern void LCD_IO_WriteData(uint16_t RegValue); +void LCD_IO_WriteData(uint16_t RegValue); static const char custom_gcode_command[][100] = { "G29N\nM500", @@ -125,16 +129,16 @@ void gCfgItems_init() { gCfgItems.pausePosX = -1; gCfgItems.pausePosY = -1; gCfgItems.pausePosZ = 5; - gCfgItems.levelingPos[0][0] = X_MIN_POS + 30; - gCfgItems.levelingPos[0][1] = Y_MIN_POS + 30; - gCfgItems.levelingPos[1][0] = X_MAX_POS - 30; - gCfgItems.levelingPos[1][1] = Y_MIN_POS + 30; - gCfgItems.levelingPos[2][0] = X_MAX_POS - 30; - gCfgItems.levelingPos[2][1] = Y_MAX_POS - 30; - gCfgItems.levelingPos[3][0] = X_MIN_POS + 30; - gCfgItems.levelingPos[3][1] = Y_MAX_POS - 30; - gCfgItems.levelingPos[4][0] = X_BED_SIZE / 2; - gCfgItems.levelingPos[4][1] = Y_BED_SIZE / 2; + gCfgItems.trammingPos[0].x = X_MIN_POS + 30; + gCfgItems.trammingPos[0].y = Y_MIN_POS + 30; + gCfgItems.trammingPos[1].x = X_MAX_POS - 30; + gCfgItems.trammingPos[1].y = Y_MIN_POS + 30; + gCfgItems.trammingPos[2].x = X_MAX_POS - 30; + gCfgItems.trammingPos[2].y = Y_MAX_POS - 30; + gCfgItems.trammingPos[3].x = X_MIN_POS + 30; + gCfgItems.trammingPos[3].y = Y_MAX_POS - 30; + gCfgItems.trammingPos[4].x = X_BED_SIZE / 2; + gCfgItems.trammingPos[4].y = Y_BED_SIZE / 2; gCfgItems.cloud_enable = false; gCfgItems.wifi_mode_sel = STA_MODEL; gCfgItems.fileSysType = FILE_SYS_SD; @@ -143,7 +147,7 @@ void gCfgItems_init() { gCfgItems.filamentchange_load_speed = 1000; gCfgItems.filamentchange_unload_length = 200; gCfgItems.filamentchange_unload_speed = 1000; - gCfgItems.filament_limit_temper = 200; + gCfgItems.filament_limit_temp = 200; gCfgItems.encoder_enable = true; @@ -155,7 +159,7 @@ void gCfgItems_init() { gCfgItems.spi_flash_flag = FLASH_INF_VALID_FLAG; W25QXX.SPI_FLASH_SectorErase(VAR_INF_ADDR); W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&gCfgItems, VAR_INF_ADDR, sizeof(gCfgItems)); - //init gcode command + // init gcode command W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&custom_gcode_command[0], AUTO_LEVELING_COMMAND_ADDR, 100); W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&custom_gcode_command[1], OTHERS_COMMAND_ADDR_1, 100); W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&custom_gcode_command[2], OTHERS_COMMAND_ADDR_2, 100); @@ -179,14 +183,14 @@ void gCfgItems_init() { void ui_cfg_init() { uiCfg.curTempType = 0; - uiCfg.curSprayerChoose = 0; + uiCfg.extruderIndex = 0; uiCfg.stepHeat = 10; uiCfg.leveling_first_time = false; uiCfg.para_ui_page = false; - uiCfg.extruStep = 5; - uiCfg.extruSpeed = 10; + uiCfg.extruStep = uiCfg.eStepMed; + uiCfg.extruSpeed = uiCfg.eSpeedN; uiCfg.move_dist = 1; - uiCfg.moveSpeed = 3000; + uiCfg.moveSpeed = 1000; uiCfg.stepPrintSpeed = 10; uiCfg.command_send = false; uiCfg.dialogType = 0; @@ -202,65 +206,65 @@ void ui_cfg_init() { #if ENABLED(MKS_WIFI_MODULE) memset(&wifiPara, 0, sizeof(wifiPara)); memset(&ipPara, 0, sizeof(ipPara)); - strcpy(wifiPara.ap_name, WIFI_AP_NAME); - strcpy(wifiPara.keyCode, WIFI_KEY_CODE); - //client - strcpy(ipPara.ip_addr, IP_ADDR); - strcpy(ipPara.mask, IP_MASK); - strcpy(ipPara.gate, IP_GATE); - strcpy(ipPara.dns, IP_DNS); + strcpy_P(wifiPara.ap_name, PSTR(WIFI_AP_NAME)); + strcpy_P(wifiPara.keyCode, PSTR(WIFI_KEY_CODE)); + // client + strcpy_P(ipPara.ip_addr, PSTR(IP_ADDR)); + strcpy_P(ipPara.mask, PSTR(IP_MASK)); + strcpy_P(ipPara.gate, PSTR(IP_GATE)); + strcpy_P(ipPara.dns, PSTR(IP_DNS)); ipPara.dhcp_flag = IP_DHCP_FLAG; - //AP - strcpy(ipPara.dhcpd_ip, AP_IP_ADDR); - strcpy(ipPara.dhcpd_mask, AP_IP_MASK); - strcpy(ipPara.dhcpd_gate, AP_IP_GATE); - strcpy(ipPara.dhcpd_dns, AP_IP_DNS); - strcpy(ipPara.start_ip_addr, IP_START_IP); - strcpy(ipPara.end_ip_addr, IP_END_IP); + // AP + strcpy_P(ipPara.dhcpd_ip, PSTR(AP_IP_ADDR)); + strcpy_P(ipPara.dhcpd_mask, PSTR(AP_IP_MASK)); + strcpy_P(ipPara.dhcpd_gate, PSTR(AP_IP_GATE)); + strcpy_P(ipPara.dhcpd_dns, PSTR(AP_IP_DNS)); + strcpy_P(ipPara.start_ip_addr, PSTR(IP_START_IP)); + strcpy_P(ipPara.end_ip_addr, PSTR(IP_END_IP)); ipPara.dhcpd_flag = AP_IP_DHCP_FLAG; - strcpy((char*)uiCfg.cloud_hostUrl, "baizhongyun.cn"); + strcpy_P((char*)uiCfg.cloud_hostUrl, PSTR("baizhongyun.cn")); uiCfg.cloud_port = 10086; #endif - uiCfg.filament_loading_time = (uint32_t)((gCfgItems.filamentchange_load_length * 60.0 / gCfgItems.filamentchange_load_speed) + 0.5); - uiCfg.filament_unloading_time = (uint32_t)((gCfgItems.filamentchange_unload_length * 60.0 / gCfgItems.filamentchange_unload_speed) + 0.5); + uiCfg.filament_loading_time = (uint32_t)((gCfgItems.filamentchange_load_length * 60.0f / gCfgItems.filamentchange_load_speed) + 0.5f); + uiCfg.filament_unloading_time = (uint32_t)((gCfgItems.filamentchange_unload_length * 60.0f / gCfgItems.filamentchange_unload_speed) + 0.5f); } void update_spi_flash() { uint8_t command_buf[512]; W25QXX.init(SPI_QUARTER_SPEED); - //read back the gcode command befor erase spi flash + // read back the gcode command before erase spi flash W25QXX.SPI_FLASH_BufferRead((uint8_t *)&command_buf, GCODE_COMMAND_ADDR, sizeof(command_buf)); W25QXX.SPI_FLASH_SectorErase(VAR_INF_ADDR); W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&gCfgItems, VAR_INF_ADDR, sizeof(gCfgItems)); W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&command_buf, GCODE_COMMAND_ADDR, sizeof(command_buf)); } -void update_gcode_command(int addr,uint8_t *s) { +void update_gcode_command(int addr, uint8_t *s) { uint8_t command_buf[512]; W25QXX.init(SPI_QUARTER_SPEED); - //read back the gcode command befor erase spi flash + // read back the gcode command before erase spi flash W25QXX.SPI_FLASH_BufferRead((uint8_t *)&command_buf, GCODE_COMMAND_ADDR, sizeof(command_buf)); W25QXX.SPI_FLASH_SectorErase(VAR_INF_ADDR); W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&gCfgItems, VAR_INF_ADDR, sizeof(gCfgItems)); switch (addr) { - case AUTO_LEVELING_COMMAND_ADDR: memcpy(&command_buf[0*100], s, 100); break; - case OTHERS_COMMAND_ADDR_1: memcpy(&command_buf[1*100], s, 100); break; - case OTHERS_COMMAND_ADDR_2: memcpy(&command_buf[2*100], s, 100); break; - case OTHERS_COMMAND_ADDR_3: memcpy(&command_buf[3*100], s, 100); break; - case OTHERS_COMMAND_ADDR_4: memcpy(&command_buf[4*100], s, 100); break; + case AUTO_LEVELING_COMMAND_ADDR: memcpy(&command_buf[0 * 100], s, 100); break; + case OTHERS_COMMAND_ADDR_1: memcpy(&command_buf[1 * 100], s, 100); break; + case OTHERS_COMMAND_ADDR_2: memcpy(&command_buf[2 * 100], s, 100); break; + case OTHERS_COMMAND_ADDR_3: memcpy(&command_buf[3 * 100], s, 100); break; + case OTHERS_COMMAND_ADDR_4: memcpy(&command_buf[4 * 100], s, 100); break; default: break; } W25QXX.SPI_FLASH_BufferWrite((uint8_t *)&command_buf, GCODE_COMMAND_ADDR, sizeof(command_buf)); } -void get_gcode_command(int addr,uint8_t *d) { +void get_gcode_command(int addr, uint8_t *d) { W25QXX.init(SPI_QUARTER_SPEED); W25QXX.SPI_FLASH_BufferRead((uint8_t *)d, addr, 100); } @@ -344,13 +348,8 @@ void tft_style_init() { style_num_key_rel.body.grad_color = LV_COLOR_KEY_BACKGROUND; style_num_key_rel.text.color = LV_COLOR_TEXT; style_num_key_rel.text.sel_color = LV_COLOR_TEXT; - #if HAS_SPI_FLASH_FONT - style_num_key_pre.text.font = &gb2312_puhui32; - style_num_key_rel.text.font = &gb2312_puhui32; - #else - style_num_key_pre.text.font = LV_FONT_DEFAULT; - style_num_key_rel.text.font = LV_FONT_DEFAULT; - #endif + style_num_key_pre.text.font = TERN(HAS_SPI_FLASH_FONT, &gb2312_puhui32, LV_FONT_DEFAULT); + style_num_key_rel.text.font = TERN(HAS_SPI_FLASH_FONT, &gb2312_puhui32, LV_FONT_DEFAULT); style_num_key_pre.line.width = 0; style_num_key_rel.line.width = 0; @@ -370,14 +369,14 @@ void tft_style_init() { style_num_text.text.line_space = -5; lv_style_copy(&style_sel_text, &lv_style_scr); - style_sel_text.body.main_color = LV_COLOR_BACKGROUND; - style_sel_text.body.grad_color = LV_COLOR_BACKGROUND; - style_sel_text.text.color = LV_COLOR_YELLOW; - style_sel_text.text.sel_color = LV_COLOR_YELLOW; - style_sel_text.text.font = &gb2312_puhui32; - style_sel_text.line.width = 0; - style_sel_text.text.letter_space = 0; - style_sel_text.text.line_space = -5; + style_sel_text.body.main_color = LV_COLOR_BACKGROUND; + style_sel_text.body.grad_color = LV_COLOR_BACKGROUND; + style_sel_text.text.color = LV_COLOR_YELLOW; + style_sel_text.text.sel_color = LV_COLOR_YELLOW; + style_sel_text.text.font = TERN(HAS_SPI_FLASH_FONT, &gb2312_puhui32, LV_FONT_DEFAULT); + style_sel_text.line.width = 0; + style_sel_text.text.letter_space = 0; + style_sel_text.text.line_space = -5; lv_style_copy(&style_line, &lv_style_plain); style_line.line.color = LV_COLOR_MAKE(0x49, 0x54, 0xFF); style_line.line.width = 1; @@ -447,111 +446,63 @@ char *getDispText(int index) { ZERO(public_buf_l); switch (disp_state_stack._disp_state[index]) { - case PRINT_READY_UI: - strcpy(public_buf_l, main_menu.title); - break; - case PRINT_FILE_UI: - strcpy(public_buf_l, file_menu.title); - break; + case PRINT_READY_UI: strcpy(public_buf_l, main_menu.title); break; + case PRINT_FILE_UI: strcpy(public_buf_l, file_menu.title); break; case PRINTING_UI: - if (disp_state_stack._disp_state[disp_state_stack._disp_index] == PRINTING_UI - #ifndef TFT35 - || disp_state_stack._disp_state[disp_state_stack._disp_index] == OPERATE_UI - || disp_state_stack._disp_state[disp_state_stack._disp_index] == PAUSE_UI - #endif - ) strcpy(public_buf_l, common_menu.print_special_title); - else strcpy(public_buf_l, printing_menu.title); - break; - case MOVE_MOTOR_UI: - strcpy(public_buf_l, move_menu.title); + switch (disp_state_stack._disp_state[disp_state_stack._disp_index]) { + IF_DISABLED(TFT35, case OPERATE_UI: case PAUSE_UI:) + case PRINTING_UI: strcpy(public_buf_l, common_menu.print_special_title); break; + default: strcpy(public_buf_l, printing_menu.title); break; + } break; + case MOVE_MOTOR_UI: strcpy(public_buf_l, move_menu.title); break; case OPERATE_UI: - if (disp_state_stack._disp_state[disp_state_stack._disp_index] == PRINTING_UI - #ifndef TFT35 - || disp_state_stack._disp_state[disp_state_stack._disp_index] == OPERATE_UI - || disp_state_stack._disp_state[disp_state_stack._disp_index] == PAUSE_UI - #endif - ) strcpy(public_buf_l, common_menu.operate_special_title); - else strcpy(public_buf_l, operation_menu.title); + switch (disp_state_stack._disp_state[disp_state_stack._disp_index]) { + IF_DISABLED(TFT35, case OPERATE_UI: case PAUSE_UI:) + case PRINTING_UI: strcpy(public_buf_l, common_menu.operate_special_title); break; + default: strcpy(public_buf_l, operation_menu.title); break; + } break; case PAUSE_UI: - if (disp_state_stack._disp_state[disp_state_stack._disp_index] == PRINTING_UI - || disp_state_stack._disp_state[disp_state_stack._disp_index] == OPERATE_UI - || disp_state_stack._disp_state[disp_state_stack._disp_index] == PAUSE_UI - ) strcpy(public_buf_l, common_menu.pause_special_title); - else strcpy(public_buf_l, pause_menu.title); - break; - - case EXTRUSION_UI: - strcpy(public_buf_l, extrude_menu.title); - break; - case CHANGE_SPEED_UI: - strcpy(public_buf_l, speed_menu.title); - break; - case FAN_UI: - strcpy(public_buf_l, fan_menu.title); + switch (disp_state_stack._disp_state[disp_state_stack._disp_index]) { + case OPERATE_UI: + case PAUSE_UI: + case PRINTING_UI: strcpy(public_buf_l, common_menu.pause_special_title); break; + default: strcpy(public_buf_l, pause_menu.title); break; + } break; + case EXTRUSION_UI: strcpy(public_buf_l, extrude_menu.title); break; + case CHANGE_SPEED_UI: strcpy(public_buf_l, speed_menu.title); break; + case FAN_UI: strcpy(public_buf_l, fan_menu.title); break; case PRE_HEAT_UI: - if ((disp_state_stack._disp_state[disp_state_stack._disp_index - 1] == OPERATE_UI)) - strcpy(public_buf_l, preheat_menu.adjust_title); - else strcpy(public_buf_l, preheat_menu.title); - break; - case SET_UI: - strcpy(public_buf_l, set_menu.title); - break; - case ZERO_UI: - strcpy(public_buf_l, home_menu.title); - break; - case SPRAYER_UI: break; - case MACHINE_UI: break; - case LANGUAGE_UI: - strcpy(public_buf_l, language_menu.title); - break; - case ABOUT_UI: - strcpy(public_buf_l, about_menu.title); - break; - case LOG_UI: break; - case DISK_UI: - strcpy(public_buf_l, filesys_menu.title); - break; - case DIALOG_UI: - strcpy(public_buf_l, common_menu.dialog_confirm_title); - break; - case WIFI_UI: - strcpy(public_buf_l, wifi_menu.title); + switch (disp_state_stack._disp_state[disp_state_stack._disp_index]) { + case OPERATE_UI: strcpy(public_buf_l, preheat_menu.adjust_title); + default: strcpy(public_buf_l, preheat_menu.title); break; + } break; + case SET_UI: strcpy(public_buf_l, set_menu.title); break; + case ZERO_UI: strcpy(public_buf_l, home_menu.title); break; + case SPRAYER_UI: break; + case MACHINE_UI: break; + case LANGUAGE_UI: strcpy(public_buf_l, language_menu.title); break; + case ABOUT_UI: strcpy(public_buf_l, about_menu.title); break; + case LOG_UI: break; + case DISK_UI: strcpy(public_buf_l, filesys_menu.title); break; + case DIALOG_UI: strcpy(public_buf_l, common_menu.dialog_confirm_title); break; + case WIFI_UI: strcpy(public_buf_l, wifi_menu.title); break; case MORE_UI: - case PRINT_MORE_UI: - strcpy(public_buf_l, more_menu.title); - break; - case FILAMENTCHANGE_UI: - strcpy(public_buf_l, filament_menu.title); - break; + case PRINT_MORE_UI: strcpy(public_buf_l, more_menu.title); break; + case FILAMENTCHANGE_UI: strcpy(public_buf_l, filament_menu.title); break; case LEVELING_UI: - case MESHLEVELING_UI: - strcpy(public_buf_l, leveling_menu.title); - break; - case BIND_UI: - strcpy(public_buf_l, cloud_menu.title); - break; - case TOOL_UI: - strcpy(public_buf_l, tool_menu.title); - break; - case WIFI_LIST_UI: - #if ENABLED(MKS_WIFI_MODULE) - strcpy(public_buf_l, list_menu.title); - break; - #endif - case MACHINE_PARA_UI: - strcpy(public_buf_l, MachinePara_menu.title); - break; - case BABY_STEP_UI: - strcpy(public_buf_l, operation_menu.babystep); - break; - case EEPROM_SETTINGS_UI: - strcpy(public_buf_l, eeprom_menu.title); - break; + case MESHLEVELING_UI: strcpy(public_buf_l, leveling_menu.title); break; + case BIND_UI: strcpy(public_buf_l, cloud_menu.title); break; + case TOOL_UI: strcpy(public_buf_l, tool_menu.title); break; + case WIFI_LIST_UI: TERN_(MKS_WIFI_MODULE, strcpy(public_buf_l, list_menu.title)); break; + case MACHINE_PARA_UI: strcpy(public_buf_l, MachinePara_menu.title); break; + case BABY_STEP_UI: strcpy(public_buf_l, operation_menu.babystep); break; + case EEPROM_SETTINGS_UI: strcpy(public_buf_l, eeprom_menu.title); break; + case MEDIA_SELECT_UI: strcpy(public_buf_l, media_select_menu.title); break; default: break; } @@ -605,11 +556,11 @@ char *creat_title_text() { #if HAS_GCODE_PREVIEW - uint32_t gPicturePreviewStart = 0; + uintptr_t gPicturePreviewStart = 0; void preview_gcode_prehandle(char *path) { #if ENABLED(SDSUPPORT) - uint32_t pre_read_cnt = 0; + uintptr_t pre_read_cnt = 0; uint32_t *p1; char *cur_name; @@ -620,7 +571,7 @@ char *creat_title_text() { p1 = (uint32_t *)strstr((char *)public_buf, ";simage:"); if (p1) { - pre_read_cnt = (uint32_t)p1 - (uint32_t)((uint32_t *)(&public_buf[0])); + pre_read_cnt = (uintptr_t)p1 - (uintptr_t)((uint32_t *)(&public_buf[0])); To_pre_view = pre_read_cnt; gcode_preview_over = true; @@ -649,14 +600,14 @@ char *creat_title_text() { if (gPicturePreviewStart <= 0) { while (1) { uint32_t br = card.read(public_buf, 400); - uint32_t* p1 = (uint32_t *)strstr((char *)public_buf, ";gimage:"); + uint32_t *p1 = (uint32_t *)strstr((char *)public_buf, ";gimage:"); if (p1) { - gPicturePreviewStart += (uint32_t)p1 - (uint32_t)((uint32_t *)(&public_buf[0])); + gPicturePreviewStart += (uintptr_t)p1 - (uintptr_t)((uint32_t *)(&public_buf[0])); break; } - else { + else gPicturePreviewStart += br; - } + if (br < 400) break; } } @@ -668,15 +619,12 @@ char *creat_title_text() { while (1) { card.read(public_buf, 400); - for (i = 0; i < 400;) { + for (i = 0; i < 400; i += 2, j++) bmp_public_buf[j] = ascii2dec_test((char*)&public_buf[i]) << 4 | ascii2dec_test((char*)&public_buf[i + 1]); - i += 2; - j++; - } if (j >= 400) break; } for (i = 0; i < 400; i += 2) { - p_index = (uint16_t *)(&bmp_public_buf[i]); + p_index = (uint16_t *)(&bmp_public_buf[i]); if (*p_index == 0x0000) *p_index = LV_COLOR_BACKGROUND.full; } SPI_TFT.tftio.WriteSequence((uint16_t*)bmp_public_buf, 200); @@ -686,21 +634,18 @@ char *creat_title_text() { W25QXX.SPI_FLASH_BufferWrite(bmp_public_buf, BAK_VIEW_ADDR_TFT35 + row * 400, 400); #endif row++; + card.abortFilePrintNow(); if (row >= 200) { size = 809; row = 0; gcode_preview_over = false; - card.closefile(); - char *cur_name; - - cur_name = strrchr(list_file.file_name[sel_id], '/'); + char *cur_name = strrchr(list_file.file_name[sel_id], '/'); SdFile file; SdFile *curDir; - card.endFilePrint(); - const char * const fname = card.diveToFile(true, curDir, cur_name); + const char * const fname = card.diveToFile(false, curDir, cur_name); if (!fname) return; if (file.open(curDir, fname, O_READ)) { gCfgItems.curFilesize = file.fileSize(); @@ -717,13 +662,12 @@ char *creat_title_text() { planner.flow_percentage[1] = 100; planner.e_factor[1] = planner.flow_percentage[1] * 0.01; #endif - card.startFileprint(); + card.startOrResumeFilePrinting(); TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); once_flag = false; } return; } - card.closefile(); #endif // SDSUPPORT } @@ -805,6 +749,10 @@ void GUI_RefreshPage() { } break; case PRINT_READY_UI: + if (temps_update_flag) { + temps_update_flag = false; + lv_temp_refr(); + } break; case PRINT_FILE_UI: break; @@ -824,11 +772,9 @@ void GUI_RefreshPage() { } break; - case OPERATE_UI: - break; + case OPERATE_UI: break; - case PAUSE_UI: - break; + case PAUSE_UI: break; case FAN_UI: if (temps_update_flag) { @@ -837,21 +783,19 @@ void GUI_RefreshPage() { } break; - case MOVE_MOTOR_UI: - break; + case MOVE_MOTOR_UI: break; #if ENABLED(MKS_WIFI_MODULE) case WIFI_UI: if (temps_update_flag) { - disp_wifi_state(); temps_update_flag = false; + disp_wifi_state(); } break; - case BIND_UI: - refresh_bind_ui(); - break; + case BIND_UI: refresh_bind_ui(); break; #endif + case FILAMENTCHANGE_UI: if (temps_update_flag) { temps_update_flag = false; @@ -862,10 +806,8 @@ void GUI_RefreshPage() { filament_dialog_handle(); TERN_(MKS_WIFI_MODULE, wifi_scan_handle()); break; - case MESHLEVELING_UI: - break; - case HARDWARE_TEST_UI: - break; + case MESHLEVELING_UI: break; + case HARDWARE_TEST_UI: break; case WIFI_LIST_UI: #if ENABLED(MKS_WIFI_MODULE) if (printing_rate_update_flag) { @@ -874,8 +816,8 @@ void GUI_RefreshPage() { } #endif break; - case KEY_BOARD_UI: - break; + case KEYBOARD_UI: break; + #if ENABLED(MKS_WIFI_MODULE) case WIFI_TIPS_UI: switch (wifi_tips_type) { @@ -928,6 +870,7 @@ void GUI_RefreshPage() { disp_z_offset_value(); } break; + default: break; } @@ -978,7 +921,7 @@ void clear_cur_ui() { #if ENABLED(MKS_WIFI_MODULE) case WIFI_LIST_UI: lv_clear_wifi_list(); break; #endif - case KEY_BOARD_UI: lv_clear_keyboard(); break; + case KEYBOARD_UI: lv_clear_keyboard(); break; #if ENABLED(MKS_WIFI_MODULE) case WIFI_TIPS_UI: lv_clear_wifi_tips(); break; #endif @@ -994,7 +937,7 @@ void clear_cur_ui() { case LEVELING_SETTIGNS_UI: break; case LEVELING_PARA_UI: lv_clear_level_settings(); break; case DELTA_LEVELING_PARA_UI: break; - case MANUAL_LEVELING_POSIGION_UI: lv_clear_manual_level_pos_settings(); break; + case MANUAL_LEVELING_POSIGION_UI: lv_clear_tramming_pos_settings(); break; case MAXFEEDRATE_UI: lv_clear_max_feedrate_settings(); break; case STEPS_UI: lv_clear_step_settings(); break; case ACCELERATION_UI: lv_clear_acceleration_settings(); break; @@ -1009,9 +952,9 @@ void clear_cur_ui() { case NUMBER_KEY_UI: lv_clear_number_key(); break; case BABY_STEP_UI: lv_clear_baby_stepping(); break; case PAUSE_POS_UI: lv_clear_pause_position(); break; - #if HAS_TRINAMIC_CONFIG - case TMC_CURRENT_UI: lv_clear_tmc_current_settings(); break; - #endif + #if HAS_TRINAMIC_CONFIG + case TMC_CURRENT_UI: lv_clear_tmc_current_settings(); break; + #endif case EEPROM_SETTINGS_UI: lv_clear_eeprom_settings(); break; #if HAS_STEALTHCHOP case TMC_MODE_UI: lv_clear_tmc_step_mode_settings(); break; @@ -1028,6 +971,9 @@ void clear_cur_ui() { #if ENABLED(TOUCH_SCREEN_CALIBRATION) case TOUCH_CALIBRATION_UI: lv_clear_touch_calibration_screen(); break; #endif + #if ENABLED(MULTI_VOLUME) + case MEDIA_SELECT_UI: lv_clear_media_select(); break; + #endif default: break; } } @@ -1083,7 +1029,7 @@ void draw_return_ui() { #if ENABLED(MKS_WIFI_MODULE) case WIFI_LIST_UI: lv_draw_wifi_list(); break; #endif - case KEY_BOARD_UI: lv_draw_keyboard(); break; + case KEYBOARD_UI: lv_draw_keyboard(); break; #if ENABLED(MKS_WIFI_MODULE) case WIFI_TIPS_UI: lv_draw_wifi_tips(); break; #endif @@ -1099,7 +1045,7 @@ void draw_return_ui() { case LEVELING_SETTIGNS_UI: break; case LEVELING_PARA_UI: lv_draw_level_settings(); break; case DELTA_LEVELING_PARA_UI: break; - case MANUAL_LEVELING_POSIGION_UI: lv_draw_manual_level_pos_settings(); break; + case MANUAL_LEVELING_POSIGION_UI: lv_draw_tramming_pos_settings(); break; case MAXFEEDRATE_UI: lv_draw_max_feedrate_settings(); break; case STEPS_UI: lv_draw_step_settings(); break; case ACCELERATION_UI: lv_draw_acceleration_settings(); break; @@ -1169,7 +1115,7 @@ void lv_btn_set_style_both(lv_obj_t *btn, lv_style_t *style) { } // Create a screen -lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char* title) { +lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char *title) { lv_obj_t *scr = lv_obj_create(nullptr, nullptr); lv_obj_set_style(scr, &tft_style_scr); lv_scr_load(scr); @@ -1344,19 +1290,19 @@ lv_obj_t* lv_screen_menu_item(lv_obj_t *par, const char *text, lv_coord_t x, lv_ } lv_obj_t* lv_screen_menu_item_1_edit(lv_obj_t *par, const char *text, lv_coord_t x, lv_coord_t y, lv_event_cb_t cb, const int id, const int index, const char *editValue) { - lv_obj_t* btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false); - lv_obj_t* btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X, y + PARA_UI_VALUE_V, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, id); - lv_obj_t* labelValue = lv_label_create_empty(btnValue); + lv_obj_t *btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false); + lv_obj_t *btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X, y + PARA_UI_VALUE_V, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, id); + lv_obj_t *labelValue = lv_label_create_empty(btnValue); lv_label_set_text(labelValue, editValue); lv_obj_align(labelValue, btnValue, LV_ALIGN_CENTER, 0, 0); return btn; } lv_obj_t* lv_screen_menu_item_2_edit(lv_obj_t *par, const char *text, lv_coord_t x, lv_coord_t y, lv_event_cb_t cb, const int id, const int index, const char *editValue, const int idEdit2, const char *editValue2) { - lv_obj_t* btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false); + lv_obj_t *btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false); - lv_obj_t* btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X_2, y + PARA_UI_VALUE_V_2, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, idEdit2); - lv_obj_t* labelValue = lv_label_create_empty(btnValue); + lv_obj_t *btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X_2, y + PARA_UI_VALUE_V_2, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, idEdit2); + lv_obj_t *labelValue = lv_label_create_empty(btnValue); lv_label_set_text(labelValue, editValue2); lv_obj_align(labelValue, btnValue, LV_ALIGN_CENTER, 0, 0); @@ -1370,8 +1316,8 @@ lv_obj_t* lv_screen_menu_item_2_edit(lv_obj_t *par, const char *text, lv_coord_t lv_obj_t* lv_screen_menu_item_onoff(lv_obj_t *par, const char *text, lv_coord_t x, lv_coord_t y, lv_event_cb_t cb, const int id, const int index, const bool curValue) { lv_screen_menu_item(par, text, x, y, cb, -1, index, false); - lv_obj_t* btnValue = lv_imgbtn_create(par, curValue ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin", PARA_UI_STATE_POS_X, y + PARA_UI_STATE_V, cb, id); - lv_obj_t* labelValue = lv_label_create_empty(btnValue); + lv_obj_t *btnValue = lv_imgbtn_create(par, curValue ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin", PARA_UI_STATE_POS_X, y + PARA_UI_STATE_V, cb, id); + lv_obj_t *labelValue = lv_label_create_empty(btnValue); lv_label_set_text(labelValue, curValue ? machine_menu.enable : machine_menu.disable); lv_obj_align(labelValue, btnValue, LV_ALIGN_CENTER, 0, 0); return btnValue; @@ -1407,12 +1353,15 @@ extern volatile uint32_t systick_uptime_millis; void print_time_count() { if ((systick_uptime_millis % 1000) == 0) - if (print_time.start == 1) print_time.seconds++; + if (print_time.start == 1) print_time.seconds++; } void LV_TASK_HANDLER() { lv_task_handler(); - if (mks_test_flag == 0x1E) mks_hardware_test(); + + #if BOTH(MKS_TEST, SDSUPPORT) + if (mks_test_flag == 0x1E) mks_hardware_test(); + #endif TERN_(HAS_GCODE_PREVIEW, disp_pre_gcode(2, 36)); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h b/Marlin/src/lcd/extui/mks_ui/draw_ui.h similarity index 87% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h rename to Marlin/src/lcd/extui/mks_ui/draw_ui.h index 34c6b1f254ac..edb513a8b5d8 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_ui.h @@ -69,16 +69,17 @@ #include "draw_max_feedrate_settings.h" #include "draw_tmc_step_mode_settings.h" #include "draw_level_settings.h" -#include "draw_manual_level_pos_settings.h" +#include "draw_tramming_pos_settings.h" #include "draw_auto_level_offset_settings.h" #include "draw_filament_change.h" #include "draw_filament_settings.h" #include "draw_homing_sensitivity_settings.h" #include "draw_baby_stepping.h" #include "draw_keyboard.h" +#include "draw_media_select.h" #include "draw_encoder_settings.h" -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #if ENABLED(MKS_WIFI_MODULE) #include "wifiSerial.h" @@ -184,36 +185,34 @@ extern char public_buf_m[100]; extern char public_buf_l[30]; typedef struct { - uint32_t spi_flash_flag; - uint8_t disp_rotation_180; - bool multiple_language; - uint8_t language; - uint8_t leveling_mode; - bool from_flash_pic; - bool finish_power_off; - bool pause_reprint; - uint8_t wifi_mode_sel; - uint8_t fileSysType; - uint8_t wifi_type; - bool cloud_enable, - encoder_enable; - int levelingPos[5][2]; - int filamentchange_load_length, - filamentchange_load_speed, - filamentchange_unload_length, - filamentchange_unload_speed, - filament_limit_temper; - float pausePosX, - pausePosY, - pausePosZ; - uint32_t curFilesize; + uint32_t spi_flash_flag; + uint8_t disp_rotation_180; + bool multiple_language; + uint8_t language; + uint8_t leveling_mode; + bool from_flash_pic; + bool finish_power_off; + bool pause_reprint; + uint8_t wifi_mode_sel; + uint8_t fileSysType; + uint8_t wifi_type; + bool cloud_enable, + encoder_enable; + xy_int_t trammingPos[5]; + int filamentchange_load_length, + filamentchange_load_speed, + filamentchange_unload_length, + filamentchange_unload_speed; + celsius_t filament_limit_temp; + float pausePosX, pausePosY, pausePosZ; + uint32_t curFilesize; } CFG_ITMES; -typedef struct { +typedef struct UI_Config_Struct { uint8_t curTempType:1, - curSprayerChoose:3, + extruderIndex:3, stepHeat:4, - curSprayerChoose_bak:4; + extruderIndexBak:4; bool leveling_first_time:1, para_ui_page:1, configWifi:1, @@ -229,8 +228,16 @@ typedef struct { uint8_t wifi_name[32]; uint8_t wifi_key[64]; uint8_t cloud_hostUrl[96]; + // Extruder Steps distances (mm) uint8_t extruStep; + static constexpr uint8_t eStepMin = 1, + eStepMed = 5, + eStepMax = 10; + // Extruder speed (mm/s) uint8_t extruSpeed; + static constexpr uint8_t eSpeedH = 1, + eSpeedN = 10, + eSpeedL = 20; uint8_t print_state; uint8_t stepPrintSpeed; uint8_t waitEndMoves; @@ -246,7 +253,7 @@ typedef struct { filament_loading_time_cnt, filament_unloading_time_cnt; float move_dist; - float desireSprayerTempBak; + celsius_t hotendTargetTempBak; float current_x_position_bak, current_y_position_bak, current_z_position_bak, @@ -291,7 +298,7 @@ typedef enum { TOOL_UI, HARDWARE_TEST_UI, WIFI_LIST_UI, - KEY_BOARD_UI, + KEYBOARD_UI, WIFI_TIPS_UI, MACHINE_PARA_UI, MACHINE_SETTINGS_UI, @@ -329,6 +336,7 @@ typedef enum { ENCODER_SETTINGS_UI, TOUCH_CALIBRATION_UI, GCODE_UI, + MEDIA_SELECT_UI, } DISP_STATE; typedef struct { @@ -444,28 +452,28 @@ extern lv_style_t style_btn_rel; extern lv_point_t line_points[4][2]; -extern void gCfgItems_init(); -extern void ui_cfg_init(); -extern void tft_style_init(); +void gCfgItems_init(); +void ui_cfg_init(); +void tft_style_init(); extern char *creat_title_text(); -extern void preview_gcode_prehandle(char *path); -extern void update_spi_flash(); -extern void update_gcode_command(int addr,uint8_t *s); -extern void get_gcode_command(int addr,uint8_t *d); -extern void lv_serial_capt_hook(void *, uint8_t); -extern void lv_eom_hook(void *); +void preview_gcode_prehandle(char *path); +void update_spi_flash(); +void update_gcode_command(int addr, uint8_t *s); +void get_gcode_command(int addr, uint8_t *d); +void lv_serial_capt_hook(void *, uint8_t); +void lv_eom_hook(void *); #if HAS_GCODE_PREVIEW - extern void disp_pre_gcode(int xpos_pixel, int ypos_pixel); + void disp_pre_gcode(int xpos_pixel, int ypos_pixel); #endif -extern void GUI_RefreshPage(); -extern void clear_cur_ui(); -extern void draw_return_ui(); -extern void sd_detection(); -extern void gCfg_to_spiFlah(); -extern void print_time_count(); +void GUI_RefreshPage(); +void clear_cur_ui(); +void draw_return_ui(); +void sd_detection(); +void gCfg_to_spiFlah(); +void print_time_count(); -extern void LV_TASK_HANDLER(); -extern void lv_ex_line(lv_obj_t *line, lv_point_t *points); +void LV_TASK_HANDLER(); +void lv_ex_line(lv_obj_t *line, lv_point_t *points); #ifdef __cplusplus } /* C-declarations for C++ */ @@ -484,7 +492,7 @@ void lv_btn_use_label_style(lv_obj_t *btn); void lv_btn_set_style_both(lv_obj_t *btn, lv_style_t *style); // Create a screen -lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char* title = nullptr); +lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char *title = nullptr); // Create an empty label lv_obj_t* lv_label_create_empty(lv_obj_t *par); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi.cpp b/Marlin/src/lcd/extui/mks_ui/draw_wifi.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_wifi.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_wifi.cpp index fe22923b441d..c12449f31623 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -70,7 +71,7 @@ void lv_draw_wifi() { if (gCfgItems.wifi_mode_sel == STA_MODEL) { if (gCfgItems.cloud_enable) - buttonCloud = lv_imgbtn_create(scr, "F:/bmp_cloud.bin", BTN_X_PIXEL+INTERVAL_V*2, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_W_CLOUD); + buttonCloud = lv_imgbtn_create(scr, "F:/bmp_cloud.bin", BTN_X_PIXEL + INTERVAL_V * 2, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_W_CLOUD); buttonReconnect = lv_imgbtn_create(scr, "F:/bmp_wifi.bin", BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight, event_handler, ID_W_RECONNECT); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi.h b/Marlin/src/lcd/extui/mks_ui/draw_wifi.h similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_wifi.h rename to Marlin/src/lcd/extui/mks_ui/draw_wifi.h index 1187741ad66d..4fa642b39c1e 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi.h @@ -26,13 +26,10 @@ #endif -extern void lv_draw_wifi(); -extern void lv_clear_wifi(); -extern void disp_wifi_state(); +void lv_draw_wifi(); +void lv_clear_wifi(); +void disp_wifi_state(); #ifdef __cplusplus } /* C-declarations for C++ */ #endif - - - diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_list.cpp b/Marlin/src/lcd/extui/mks_ui/draw_wifi_list.cpp similarity index 99% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_list.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_wifi_list.cpp index bda6306e6c0d..6283b1dc58d0 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_list.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi_list.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_list.h b/Marlin/src/lcd/extui/mks_ui/draw_wifi_list.h similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_list.h rename to Marlin/src/lcd/extui/mks_ui/draw_wifi_list.h index e42b738f143e..8dbedf832e78 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_list.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi_list.h @@ -25,11 +25,11 @@ extern "C" { /* C-declarations for C++ */ #endif -extern void lv_draw_wifi_list(); -extern void lv_clear_wifi_list(); -extern void disp_wifi_list(); -extern void cutWifiName(char *name, int len,char *outStr); -extern void wifi_scan_handle(); +void lv_draw_wifi_list(); +void lv_clear_wifi_list(); +void disp_wifi_list(); +void cutWifiName(char *name, int len, char *outStr); +void wifi_scan_handle(); #define NUMBER_OF_PAGE 5 diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_settings.cpp b/Marlin/src/lcd/extui/mks_ui/draw_wifi_settings.cpp similarity index 99% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_settings.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_wifi_settings.cpp index fd2c6467e77e..e087f74286b3 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_settings.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi_settings.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_settings.h b/Marlin/src/lcd/extui/mks_ui/draw_wifi_settings.h similarity index 93% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_settings.h rename to Marlin/src/lcd/extui/mks_ui/draw_wifi_settings.h index 605423b13187..ff2739704953 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_settings.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi_settings.h @@ -28,8 +28,8 @@ #define WIFI_AP_TEXT "AP" #define WIFI_STA_TEXT "STA" -extern void lv_draw_wifi_settings(); -extern void lv_clear_wifi_settings(); +void lv_draw_wifi_settings(); +void lv_clear_wifi_settings(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_tips.cpp b/Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.cpp similarity index 95% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_tips.cpp rename to Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.cpp index 3db89a87c967..a5207d56690d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_tips.cpp +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -37,7 +38,7 @@ TIPS_DISP tips_disp; tips_menu_def tips_menu; void lv_draw_wifi_tips() { - static lv_obj_t *text_tips,*wifi_name; + static lv_obj_t *text_tips, *wifi_name; scr = lv_screen_create(WIFI_TIPS_UI, ""); diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_tips.h b/Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.h similarity index 95% rename from Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_tips.h rename to Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.h index f9896edcc86f..4ffe6c1312a3 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_wifi_tips.h +++ b/Marlin/src/lcd/extui/mks_ui/draw_wifi_tips.h @@ -26,8 +26,8 @@ #endif -extern void lv_draw_wifi_tips(); -extern void lv_clear_wifi_tips(); +void lv_draw_wifi_tips(); +void lv_clear_wifi_tips(); typedef enum { TIPS_TYPE_JOINING, @@ -48,4 +48,3 @@ extern TIPS_DISP tips_disp; #ifdef __cplusplus } /* C-declarations for C++ */ #endif - diff --git a/Marlin/src/lcd/extui/lib/mks_ui/gb2312_puhui16.cpp b/Marlin/src/lcd/extui/mks_ui/gb2312_puhui16.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/mks_ui/gb2312_puhui16.cpp rename to Marlin/src/lcd/extui/mks_ui/gb2312_puhui16.cpp index f3585cc6cb59..672783f6561d 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/gb2312_puhui16.cpp +++ b/Marlin/src/lcd/extui/mks_ui/gb2312_puhui16.cpp @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "pic_manager.h" #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" #if HAS_SPI_FLASH_FONT diff --git a/Marlin/src/lcd/extui/lib/mks_ui/irq_overrid.cpp b/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp similarity index 78% rename from Marlin/src/lcd/extui/lib/mks_ui/irq_overrid.cpp rename to Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp index 98b4aff881c0..f3c87c03c4b5 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/irq_overrid.cpp +++ b/Marlin/src/lcd/extui/mks_ui/irq_overrid.cpp @@ -19,13 +19,13 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" +#ifdef __STM32F1__ -#if HAS_TFT_LVGL_UI +#include "../../../inc/MarlinConfigPre.h" -#include "tft_lvgl_configuration.h" +#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) -#if ENABLED(MKS_WIFI_MODULE) +#include "tft_lvgl_configuration.h" #include "draw_ui.h" #include "wifiSerial.h" @@ -36,7 +36,7 @@ #include #include -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" #ifdef __cplusplus extern "C" { /* C-declarations for C++ */ @@ -46,15 +46,15 @@ #define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW); void __irq_usart1() { - if ((USART1_BASE->CR1 & USART_CR1_RXNEIE) && (USART1_BASE->SR & USART_SR_RXNE)) - WRITE(WIFI_IO1_PIN, HIGH); + if ((USART1_BASE->CR1 & USART_CR1_RXNEIE) && (USART1_BASE->SR & USART_SR_RXNE)) + WRITE(WIFI_IO1_PIN, HIGH); - WIFISERIAL.wifi_usart_irq(USART1_BASE); + WIFISERIAL.wifi_usart_irq(USART1_BASE); } #ifdef __cplusplus } /* C-declarations for C++ */ #endif -#endif // MKS_WIFI_MODULE -#endif // HAS_TFT_LVGL_UI +#endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE +#endif // __STM32F1__ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/mks_hardware_test.cpp b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp similarity index 78% rename from Marlin/src/lcd/extui/lib/mks_ui/mks_hardware_test.cpp rename to Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp index 8cbe319d147f..3bd04563ba3e 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/mks_hardware_test.cpp +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -27,94 +28,169 @@ #include "tft_lvgl_configuration.h" #include "draw_ready_print.h" -#include "mks_hardware_test.h" #include "draw_ui.h" #include "pic_manager.h" #include -#include "../../../../MarlinCore.h" -#include "../../../../module/temperature.h" -#include "../../../../sd/cardreader.h" +#include "../../../MarlinCore.h" +#include "../../../module/temperature.h" +#include "../../../sd/cardreader.h" -uint8_t pw_det_sta, pw_off_sta, mt_det_sta, mt_det3_sta; -#if PIN_EXISTS(MT_DET_2) - uint8_t mt_det2_sta; -#endif -uint8_t endstopx1_sta, endstopx2_sta, endstopy1_sta, endstopy2_sta, endstopz1_sta, endstopz2_sta; -void test_gpio_readlevel_L() { - #if ENABLED(MKS_TEST) - volatile uint32_t itest; +#if ENABLED(MKS_TEST) + + #include "mks_hardware.h" + #include "../../../module/endstops.h" + + bool pw_det_sta, pw_off_sta, mt_det_sta; + #if PIN_EXISTS(MT_DET_2) + bool mt_det2_sta; + #endif + #if HAS_X_MIN || HAS_X_MAX + bool endstopx1_sta; + #else + constexpr static bool endstopx1_sta = true; + #endif + #if HAS_X2_MIN || HAS_X2_MAX + bool endstopx2_sta; + #else + constexpr static bool endstopx2_sta = true; + #endif + #if HAS_Y_MIN || HAS_Y_MAX + bool endstopy1_sta; + #else + constexpr static bool endstopy1_sta = true; + #endif + #if HAS_Y2_MIN || HAS_Y2_MAX + bool endstopy2_sta; + #else + constexpr static bool endstopy2_sta = true; + #endif + #if HAS_Z_MIN || HAS_Z_MAX + bool endstopz1_sta; + #else + constexpr static bool endstopz1_sta = true; + #endif + #if HAS_Z2_MIN || HAS_Z2_MAX + bool endstopz2_sta; + #else + constexpr static bool endstopz2_sta = true; + #endif + + #define ESTATE(S) (READ(S##_PIN) != S##_ENDSTOP_INVERTING) + + void test_gpio_readlevel_L() { WRITE(WIFI_IO0_PIN, HIGH); - itest = 10000; - while (itest--); - pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == 0); - pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == 0); - mt_det_sta = (READ(MT_DET_1_PIN) == 0); + delay(10); + pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == LOW); + pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == LOW); + mt_det_sta = (READ(MT_DET_1_PIN) == LOW); #if PIN_EXISTS(MT_DET_2) - mt_det2_sta = (READ(MT_DET_2_PIN) == 0); + mt_det2_sta = (READ(MT_DET_2_PIN) == LOW); #endif - endstopx1_sta = (READ(X_MIN_PIN) == 0); - endstopy1_sta = (READ(Y_MIN_PIN) == 0); - endstopz1_sta = (READ(Z_MIN_PIN) == 0); - endstopz2_sta = (READ(Z_MAX_PIN) == 0); - #endif -} + #if HAS_X_MIN + endstopx1_sta = ESTATE(X_MIN); + #elif HAS_X_MAX + endstopx1_sta = ESTATE(X_MAX); + #endif + #if HAS_X2_MIN + endstopx2_sta = ESTATE(X2_MIN); + #elif HAS_X2_MAX + endstopx2_sta = ESTATE(X2_MAX); + #endif + #if HAS_Y_MIN + endstopy1_sta = ESTATE(Y_MIN); + #elif HAS_Y_MAX + endstopy1_sta = ESTATE(Y_MAX); + #endif + #if HAS_Y2_MIN + endstopy2_sta = ESTATE(Y2_MIN); + #elif HAS_Y2_MAX + endstopy2_sta = ESTATE(Y2_MAX); + #endif + #if HAS_Z_MIN + endstopz1_sta = ESTATE(Z_MIN); + #elif HAS_Z_MAX + endstopz1_sta = ESTATE(Z_MAX); + #endif + #if HAS_Z2_MIN + endstopz2_sta = ESTATE(Z2_MIN); + #elif HAS_Z2_MAX + endstopz2_sta = ESTATE(Z2_MAX); + #endif + } -void test_gpio_readlevel_H() { - #if ENABLED(MKS_TEST) - volatile uint32_t itest; + void test_gpio_readlevel_H() { WRITE(WIFI_IO0_PIN, LOW); - itest = 10000; - while (itest--); - pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == 1); - pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == 1); - mt_det_sta = (READ(MT_DET_1_PIN) == 1); + delay(10); + pw_det_sta = (READ(MKS_TEST_POWER_LOSS_PIN) == HIGH); + pw_off_sta = (READ(MKS_TEST_PS_ON_PIN) == HIGH); + mt_det_sta = (READ(MT_DET_1_PIN) == HIGH); #if PIN_EXISTS(MT_DET_2) - mt_det2_sta = (READ(MT_DET_2_PIN) == 1); + mt_det2_sta = (READ(MT_DET_2_PIN) == HIGH); #endif - endstopx1_sta = (READ(X_MIN_PIN) == 1); - endstopy1_sta = (READ(Y_MIN_PIN) == 1); - endstopz1_sta = (READ(Z_MIN_PIN) == 1); - endstopz2_sta = (READ(Z_MAX_PIN) == 1); - #endif -} + #if HAS_X_MIN + endstopx1_sta = !ESTATE(X_MIN); + #elif HAS_X_MAX + endstopx1_sta = !ESTATE(X_MAX); + #endif + #if HAS_X2_MIN + endstopx2_sta = !ESTATE(X2_MIN); + #elif HAS_X2_MAX + endstopx2_sta = !ESTATE(X2_MAX); + #endif + #if HAS_Y_MIN + endstopy1_sta = !ESTATE(Y_MIN); + #elif HAS_Y_MAX + endstopy1_sta = !ESTATE(Y_MAX); + #endif + #if HAS_Y2_MIN + endstopy2_sta = !ESTATE(Y2_MIN); + #elif HAS_Y2_MAX + endstopy2_sta = !ESTATE(Y2_MAX); + #endif + #if HAS_Z_MIN + endstopz1_sta = !ESTATE(Z_MIN); + #elif HAS_Z_MAX + endstopz1_sta = !ESTATE(Z_MAX); + #endif + #if HAS_Z2_MIN + endstopz2_sta = !ESTATE(Z2_MIN); + #elif HAS_Z2_MAX + endstopz2_sta = !ESTATE(Z2_MAX); + #endif + } -void init_test_gpio() { - #ifdef MKS_TEST - SET_INPUT_PULLUP(X_MIN_PIN); - SET_INPUT_PULLUP(Y_MIN_PIN); - SET_INPUT_PULLUP(Z_MIN_PIN); - SET_INPUT_PULLUP(Z_MAX_PIN); + void init_test_gpio() { + endstops.init(); SET_OUTPUT(WIFI_IO0_PIN); - SET_INPUT_PULLUP(MT_DET_1_PIN); + #if PIN_EXISTS(MT_DET_1) + SET_INPUT_PULLUP(MT_DET_1_PIN); + #endif #if PIN_EXISTS(MT_DET_2) SET_INPUT_PULLUP(MT_DET_2_PIN); #endif SET_INPUT_PULLUP(MKS_TEST_POWER_LOSS_PIN); SET_INPUT_PULLUP(MKS_TEST_PS_ON_PIN); - SET_INPUT_PULLUP(SERVO0_PIN); - SET_OUTPUT(X_ENABLE_PIN); - SET_OUTPUT(Y_ENABLE_PIN); - SET_OUTPUT(Z_ENABLE_PIN); - SET_OUTPUT(E0_ENABLE_PIN); - #if !MB(MKS_ROBIN_E3P) - SET_OUTPUT(E1_ENABLE_PIN); + OUT_WRITE(X_ENABLE_PIN, LOW); + #if HAS_Y_AXIS + OUT_WRITE(Y_ENABLE_PIN, LOW); #endif - - WRITE(X_ENABLE_PIN, LOW); - WRITE(Y_ENABLE_PIN, LOW); - WRITE(Z_ENABLE_PIN, LOW); - WRITE(E0_ENABLE_PIN, LOW); - #if !MB(MKS_ROBIN_E3P) - WRITE(E1_ENABLE_PIN, LOW); + #if HAS_Z_AXIS + OUT_WRITE(Z_ENABLE_PIN, LOW); + #endif + #if HAS_EXTRUDERS + OUT_WRITE(E0_ENABLE_PIN, LOW); + #endif + #if HAS_MULTI_EXTRUDER && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + OUT_WRITE(E1_ENABLE_PIN, LOW); #endif - #if MB(MKS_ROBIN_E3P) + #if ENABLED(MKS_HARDWARE_TEST_ONLY_E0) SET_INPUT_PULLUP(PA1); SET_INPUT_PULLUP(PA3); SET_INPUT_PULLUP(PC2); @@ -123,103 +199,112 @@ void init_test_gpio() { SET_INPUT_PULLUP(PE6); SET_INPUT_PULLUP(PE7); #endif - #endif -} + } -void mks_test_beeper() { - #ifdef MKS_TEST + void mks_test_beeper() { WRITE(BEEPER_PIN, HIGH); delay(100); WRITE(BEEPER_PIN, LOW); delay(100); - #endif -} + } -void mks_gpio_test() { - #if ENABLED(MKS_TEST) - init_test_gpio(); - - test_gpio_readlevel_L(); - test_gpio_readlevel_H(); - test_gpio_readlevel_L(); - if ((pw_det_sta == 1) - && (pw_off_sta == 1) - && (mt_det_sta == 1) - #if PIN_EXISTS(MT_DET_2) - && (mt_det2_sta == 1) - #endif - #if MB(MKS_ROBIN_E3P) - && (READ(PA1) == 0) - && (READ(PA3) == 0) - && (READ(PC2) == 0) - && (READ(PD8) == 0) - && (READ(PE5) == 0) - && (READ(PE6) == 0) - && (READ(PE7) == 0) - #endif - ) - disp_det_ok(); - else - disp_det_error(); - - if ( (endstopx1_sta == 1) - && (endstopy1_sta == 1) - && (endstopz1_sta == 1) - && (endstopz2_sta == 1) - ) - disp_Limit_ok(); - else - disp_Limit_error(); - #endif -} + #if ENABLED(SDSUPPORT) -void mks_hardware_test() { - #if ENABLED(MKS_TEST) - if (millis() % 2000 < 1000) { - WRITE(X_DIR_PIN, LOW); - WRITE(Y_DIR_PIN, LOW); - WRITE(Z_DIR_PIN, LOW); - WRITE(E0_DIR_PIN, LOW); - #if !MB(MKS_ROBIN_E3P) - WRITE(E1_DIR_PIN, LOW); - #endif - thermalManager.fan_speed[0] = 255; - #if !MB(MKS_ROBIN_E3P) - WRITE(HEATER_1_PIN, HIGH); // HE1 - #endif - WRITE(HEATER_0_PIN, HIGH); // HE0 - WRITE(HEATER_BED_PIN, HIGH); // HOT-BED - } - else { - WRITE(X_DIR_PIN, HIGH); - WRITE(Y_DIR_PIN, HIGH); - WRITE(Z_DIR_PIN, HIGH); - WRITE(E0_DIR_PIN, HIGH); - #if !MB(MKS_ROBIN_E3P) - WRITE(E1_DIR_PIN, HIGH); - #endif - thermalManager.fan_speed[0] = 0; - #if !MB(MKS_ROBIN_E3P) - WRITE(HEATER_1_PIN, LOW); // HE1 - #endif - WRITE(HEATER_0_PIN, LOW); // HE0 - WRITE(HEATER_BED_PIN, LOW); // HOT-BED - } + void mks_gpio_test() { + init_test_gpio(); - if ( (endstopx1_sta == 1) && (endstopx2_sta == 1) - && (endstopy1_sta == 1) && (endstopy2_sta == 1) - && (endstopz1_sta == 1) && (endstopz2_sta == 1) - ) { - // nothing here - } - else { + test_gpio_readlevel_L(); + test_gpio_readlevel_H(); + test_gpio_readlevel_L(); + if (pw_det_sta && pw_off_sta && mt_det_sta + #if PIN_EXISTS(MT_DET_2) + && mt_det2_sta + #endif + #if ENABLED(MKS_HARDWARE_TEST_ONLY_E0) + && (READ(PA1) == LOW) + && (READ(PA3) == LOW) + && (READ(PC2) == LOW) + && (READ(PD8) == LOW) + && (READ(PE5) == LOW) + && (READ(PE6) == LOW) + && (READ(PE7) == LOW) + #endif + ) + disp_det_ok(); + else + disp_det_error(); + + if (endstopx1_sta && endstopy1_sta && endstopz1_sta && endstopz2_sta) + disp_Limit_ok(); + else + disp_Limit_error(); } - if (disp_state == PRINT_READY_UI) - mks_disp_test(); + void mks_hardware_test() { + if (millis() % 2000 < 1000) { + thermalManager.fan_speed[0] = 255; + WRITE(X_DIR_PIN, LOW); + #if HAS_Y_AXIS + WRITE(Y_DIR_PIN, LOW); + #endif + #if HAS_Z_AXIS + WRITE(Z_DIR_PIN, LOW); + #endif + #if HAS_EXTRUDERS + WRITE(E0_DIR_PIN, LOW); + #endif + #if HAS_MULTI_EXTRUDER && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + WRITE(E1_DIR_PIN, LOW); + #endif + #if HAS_MULTI_HOTEND && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + WRITE(HEATER_1_PIN, HIGH); // HE1 + #endif + #if HAS_HOTEND + WRITE(HEATER_0_PIN, HIGH); // HE0 + #endif + #if HAS_HEATED_BED + WRITE(HEATER_BED_PIN, HIGH); // HOT-BED + #endif + } + else { + thermalManager.fan_speed[0] = 0; + WRITE(X_DIR_PIN, HIGH); + #if HAS_Y_AXIS + WRITE(Y_DIR_PIN, HIGH); + #endif + #if HAS_Y_AXIS + WRITE(Z_DIR_PIN, HIGH); + #endif + #if HAS_EXTRUDERS + WRITE(E0_DIR_PIN, HIGH); + #endif + #if HAS_MULTI_EXTRUDER && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + WRITE(E1_DIR_PIN, HIGH); + #endif + #if HAS_MULTI_HOTEND && DISABLED(MKS_HARDWARE_TEST_ONLY_E0) + WRITE(HEATER_1_PIN, LOW); // HE1 + #endif + #if HAS_HOTEND + WRITE(HEATER_0_PIN, LOW); // HE0 + #endif + #if HAS_HEATED_BED + WRITE(HEATER_BED_PIN, LOW); // HOT-BED + #endif + } + + if (endstopx1_sta && endstopx2_sta && endstopy1_sta && endstopy2_sta && endstopz1_sta && endstopz2_sta) { + // nothing here + } + else { + } + + if (disp_state == PRINT_READY_UI) + mks_disp_test(); + } #endif -} + +#endif // MKS_TEST static const uint16_t ASCII_Table_16x24[] PROGMEM = { // Space ' ' @@ -629,14 +714,13 @@ void disp_assets_update_progress(const char *msg) { char buf[30]; memset(buf, ' ', COUNT(buf)); strncpy(buf, msg, strlen(msg)); - buf[COUNT(buf)-1] = '\0'; + buf[COUNT(buf) - 1] = '\0'; disp_string(100, 165, buf, 0xFFFF, 0x0000); } -uint8_t mks_test_flag = 0; -const char *MKSTestPath = "MKS_TEST"; - -#if ENABLED(SDSUPPORT) +#if BOTH(MKS_TEST, SDSUPPORT) + uint8_t mks_test_flag = 0; + const char *MKSTestPath = "MKS_TEST"; void mks_test_get() { SdFile dir, root = card.getroot(); if (dir.open(&root, MKSTestPath, O_RDONLY)) diff --git a/Marlin/src/lcd/extui/lib/mks_ui/mks_hardware_test.h b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h similarity index 79% rename from Marlin/src/lcd/extui/lib/mks_ui/mks_hardware_test.h rename to Marlin/src/lcd/extui/mks_ui/mks_hardware.h index 0e2d8096bac9..531326566277 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/mks_hardware_test.h +++ b/Marlin/src/lcd/extui/mks_ui/mks_hardware.h @@ -21,13 +21,21 @@ */ #pragma once +#include "../../../inc/MarlinConfigPre.h" + #include -void mks_gpio_test(); -void disp_char_1624(uint16_t x, uint16_t y, uint8_t c, uint16_t charColor, uint16_t bkColor); +// Functions for MKS_TEST +#if BOTH(MKS_TEST, SDSUPPORT) + void mks_hardware_test(); + void mks_test_get(); + void mks_gpio_test(); + extern uint8_t mks_test_flag; +#else + #define mks_test_flag 0 +#endif + +// String display and assets void disp_string(uint16_t x, uint16_t y, const char * string, uint16_t charColor, uint16_t bkColor); -void mks_hardware_test(); void disp_assets_update(); void disp_assets_update_progress(const char *msg); -void mks_test_get(); -extern uint8_t mks_test_flag; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp similarity index 94% rename from Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp rename to Marlin/src/lcd/extui/mks_ui/pic_manager.cpp index 8b96587fea1a..833370907471 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp +++ b/Marlin/src/lcd/extui/mks_ui/pic_manager.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -27,13 +28,11 @@ #include "draw_ui.h" #include "pic_manager.h" #include "draw_ready_print.h" -#include "mks_hardware_test.h" - +#include "mks_hardware.h" #include "SPIFlashStorage.h" -#include "../../../../libs/W25Qxx.h" - -#include "../../../../sd/cardreader.h" -#include "../../../../MarlinCore.h" +#include "../../../libs/W25Qxx.h" +#include "../../../sd/cardreader.h" +#include "../../../MarlinCore.h" extern uint16_t DeviceCode; @@ -197,6 +196,13 @@ static const char assets[][LONG_FILENAME_LENGTH] = { "bmp_cloud.bin", #endif + #if ENABLED(MULTI_VOLUME) + "bmp_usb_disk.bin", + // "bmp_usb_disk_sel.bin", + "bmp_sd.bin", + // "bmp_sd_sel.bin", + #endif + // Babystep screen "bmp_baby_move0_01.bin", "bmp_baby_move0_05.bin", @@ -228,7 +234,7 @@ uint32_t lv_get_pic_addr(uint8_t *Pname) { currentFlashPage = 0; #if ENABLED(MARLIN_DEV_MODE) - SERIAL_ECHOLNPAIR("Getting picture SPI Flash Address: ", (const char*)Pname); + SERIAL_ECHOLNPGM("Getting picture SPI Flash Address: ", (const char*)Pname); #endif W25QXX.init(SPI_QUARTER_SPEED); @@ -259,12 +265,12 @@ const char *bakPath = "_assets"; void spiFlashErase_PIC() { volatile uint32_t pic_sectorcnt = 0; W25QXX.init(SPI_QUARTER_SPEED); - //erase 0x001000 -64K + // erase 0x001000 -64K for (pic_sectorcnt = 0; pic_sectorcnt < (64 - 4) / 4; pic_sectorcnt++) { watchdog_refresh(); W25QXX.SPI_FLASH_SectorErase(PICINFOADDR + pic_sectorcnt * 4 * 1024); } - //erase 64K -- 6M + // erase 64K -- 6M for (pic_sectorcnt = 0; pic_sectorcnt < (PIC_SIZE_xM * 1024 / 64 - 1); pic_sectorcnt++) { watchdog_refresh(); W25QXX.SPI_FLASH_BlockErase((pic_sectorcnt + 1) * 64 * 1024); @@ -275,7 +281,7 @@ void spiFlashErase_PIC() { void spiFlashErase_FONT() { volatile uint32_t Font_sectorcnt = 0; W25QXX.init(SPI_QUARTER_SPEED); - for (Font_sectorcnt = 0; Font_sectorcnt < 32-1; Font_sectorcnt++) { + for (Font_sectorcnt = 0; Font_sectorcnt < 32 - 1; Font_sectorcnt++) { watchdog_refresh(); W25QXX.SPI_FLASH_BlockErase(FONTINFOADDR + Font_sectorcnt * 64 * 1024); } @@ -370,7 +376,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { #if ENABLED(SDSUPPORT) - static void dosName2LongName(const char dosName[11], char* longName) { + static void dosName2LongName(const char dosName[11], char *longName) { uint8_t j = 0; LOOP_L_N(i, 11) { if (i == 8) longName[j++] = '.'; @@ -380,7 +386,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { longName[j] = '\0'; } - static int8_t arrayFindStr(const char arr[][LONG_FILENAME_LENGTH], uint8_t arraySize, const char* str) { + static int8_t arrayFindStr(const char arr[][LONG_FILENAME_LENGTH], uint8_t arraySize, const char *str) { for (uint8_t a = 0; a < arraySize; a++) { if (strcasecmp(arr[a], str) == 0) return a; @@ -403,7 +409,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { createFilename(dosFilename, entry); if (!file.open(&dir, dosFilename, O_READ)) { #if ENABLED(MARLIN_DEV_MODE) - SERIAL_ECHOLNPAIR("Error opening Asset: ", fn); + SERIAL_ECHOLNPGM("Error opening Asset: ", fn); #endif return; } @@ -458,7 +464,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { } while (pbr >= BMP_WRITE_BUF_LEN); #endif #if ENABLED(MARLIN_DEV_MODE) - SERIAL_ECHOLNPAIR("Space used: ", fn, " - ", (SPIFlash.getCurrentPage() + 1) * SPI_FLASH_PageSize / 1024, "KB"); + SERIAL_ECHOLNPGM("Space used: ", fn, " - ", (SPIFlash.getCurrentPage() + 1) * SPI_FLASH_PageSize / 1024, "KB"); totalCompressed += (SPIFlash.getCurrentPage() + 1) * SPI_FLASH_PageSize; #endif SPIFlash.endWrite(); @@ -476,7 +482,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { file.close(); #if ENABLED(MARLIN_DEV_MODE) - SERIAL_ECHOLNPAIR("Asset added: ", fn); + SERIAL_ECHOLNPGM("Asset added: ", fn); #endif } @@ -498,7 +504,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { disp_assets_update_progress("Reading files..."); dir_t d; while (dir.readDir(&d, card.longFilename) > 0) { - // If we dont get a long name, but gets a short one, try it + // If we don't get a long name, but gets a short one, try it if (card.longFilename[0] == 0 && d.name[0] != 0) dosName2LongName((const char*)d.name, card.longFilename); if (card.longFilename[0] == 0) continue; @@ -532,8 +538,8 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) { #if ENABLED(MARLIN_DEV_MODE) uint8_t pic_counter = 0; W25QXX.SPI_FLASH_BufferRead(&pic_counter, PIC_COUNTER_ADDR, 1); - SERIAL_ECHOLNPAIR("Total assets loaded: ", pic_counter); - SERIAL_ECHOLNPAIR("Total Uncompressed: ", totalSizes, ", Compressed: ", totalCompressed); + SERIAL_ECHOLNPGM("Total assets loaded: ", pic_counter); + SERIAL_ECHOLNPGM("Total Uncompressed: ", totalSizes, ", Compressed: ", totalCompressed); #endif } @@ -559,7 +565,7 @@ void Pic_Read(uint8_t *Pname, uint8_t *P_Rbuff) { W25QXX.SPI_FLASH_BufferRead(&PIC.name[j], PIC_NAME_ADDR + tmp_cnt, 1); tmp_cnt++; } while (PIC.name[j++] != '\0'); - //pic size + // pic size W25QXX.SPI_FLASH_BufferRead(PIC.size.bytes, PIC_SIZE_ADDR + i * 4, 4); if ((strcmp((char*)Pname, (char*)PIC.name)) == 0) { diff --git a/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h b/Marlin/src/lcd/extui/mks_ui/pic_manager.h similarity index 71% rename from Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h rename to Marlin/src/lcd/extui/mks_ui/pic_manager.h index 0abfd7834a3d..95405af1cf24 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h +++ b/Marlin/src/lcd/extui/mks_ui/pic_manager.h @@ -21,9 +21,9 @@ */ #pragma once -#include "../../../../inc/MarlinConfig.h" +#include "../../../inc/MarlinConfig.h" -#include "../../../../libs/W25Qxx.h" +#include "../../../libs/W25Qxx.h" #include @@ -55,19 +55,19 @@ #define PIC_MAX_CN 100 // Maximum number of pictures #define PIC_NAME_MAX_LEN 50 // Picture name maximum length -#define LOGO_MAX_SIZE_TFT35 (300*1024) -#define LOGO_MAX_SIZE_TFT32 (150*1024) -#define TITLELOGO_MAX_SIZE (150*1024) // Little logo maximum -#define DEFAULT_VIEW_MAX_SIZE (200*200*2) -#define FLASH_VIEW_MAX_SIZE (200*200*2) +#define LOGO_MAX_SIZE_TFT35 (300 * 1024) +#define LOGO_MAX_SIZE_TFT32 (150 * 1024) +#define TITLELOGO_MAX_SIZE (150 * 1024) // Little logo maximum +#define DEFAULT_VIEW_MAX_SIZE (200 * 200 * 2) +#define FLASH_VIEW_MAX_SIZE (200 * 200 * 2) -#define PER_PIC_MAX_SPACE_TFT35 (9*1024) -#define PER_PIC_MAX_SPACE_TFT32 (16*1024) -#define PER_FONT_MAX_SPACE (16*1024) +#define PER_PIC_MAX_SPACE_TFT35 (9 * 1024) +#define PER_PIC_MAX_SPACE_TFT32 (16 * 1024) +#define PER_FONT_MAX_SPACE (16 * 1024) #if SPI_FLASH_SIZE == 0x200000 - //pic - //Robin_pro pic addr + // pic + // Robin_pro pic addr #define PIC_NAME_ADDR 0x001000 // Pic information addr #define PIC_SIZE_ADDR 0x001800 // Pic size information addr #define PIC_COUNTER_ADDR 0x002000 // Pic total number @@ -77,8 +77,8 @@ // TFT35 #define DEFAULT_VIEW_ADDR_TFT35 0x1EA070 - #define BAK_VIEW_ADDR_TFT35 (DEFAULT_VIEW_ADDR_TFT35+90*1024) - #define PIC_ICON_LOGO_ADDR_TFT35 (BAK_VIEW_ADDR_TFT35+80*1024) + #define BAK_VIEW_ADDR_TFT35 (DEFAULT_VIEW_ADDR_TFT35 + 90 * 1024) + #define PIC_ICON_LOGO_ADDR_TFT35 (BAK_VIEW_ADDR_TFT35 + 80 * 1024) #define PIC_DATA_ADDR_TFT35 0x003000 // (PIC_ICON_LOGO_ADDR_TFT35+350*1024) //0xC5800 #define PIC_DATA_ADDR_TFT32 0x00F000 @@ -87,11 +87,11 @@ // font #define FONTINFOADDR 0x150000 // 6M -- font addr - #define UNIGBK_FLASH_ADDR (FONTINFOADDR+4096) // 4*1024 + #define UNIGBK_FLASH_ADDR (FONTINFOADDR + 4096) // 4*1024 #else - //pic - //Robin_pro pic addr + // pic + // Robin_pro pic addr #define PIC_NAME_ADDR 0x003000 // Pic information addr #define PIC_SIZE_ADDR 0x007000 // Pic size information addr #define PIC_COUNTER_ADDR 0x008000 // Pic total number @@ -99,9 +99,9 @@ // TFT35 #define DEFAULT_VIEW_ADDR_TFT35 0xC5800 - #define BAK_VIEW_ADDR_TFT35 (DEFAULT_VIEW_ADDR_TFT35+90*1024) - #define PIC_ICON_LOGO_ADDR_TFT35 (BAK_VIEW_ADDR_TFT35+80*1024) - #define PIC_DATA_ADDR_TFT35 (PIC_ICON_LOGO_ADDR_TFT35+350*1024) //0xC5800 + #define BAK_VIEW_ADDR_TFT35 (DEFAULT_VIEW_ADDR_TFT35 + 90 * 1024) + #define PIC_ICON_LOGO_ADDR_TFT35 (BAK_VIEW_ADDR_TFT35 + 80 * 1024) + #define PIC_DATA_ADDR_TFT35 (PIC_ICON_LOGO_ADDR_TFT35 + 350 * 1024) // 0xC5800 // TFT32 #define PIC_DATA_ADDR_TFT32 0x02F000 @@ -110,20 +110,20 @@ // font #define FONTINFOADDR 0x600000 // 6M -- font addr - #define UNIGBK_FLASH_ADDR (FONTINFOADDR+4096) // 4*1024 - #define GBK_FLASH_ADDR (UNIGBK_FLASH_ADDR+180224) // 176*1024 + #define UNIGBK_FLASH_ADDR (FONTINFOADDR + 4096) // 4*1024 + #define GBK_FLASH_ADDR (UNIGBK_FLASH_ADDR + 180224) // 176*1024 #endif // Flash flag -#define REFLSHE_FLGA_ADD (0X800000-32) +#define REFLSHE_FLGA_ADD (0x800000 - 32) // SD card information first addr #define VAR_INF_ADDR 0x000000 #define FLASH_INF_VALID_FLAG 0x20201118 -//Store some gcode commands, such as auto leveling commands -#define GCODE_COMMAND_ADDR VAR_INF_ADDR + 3*1024 +// Store some gcode commands, such as auto leveling commands +#define GCODE_COMMAND_ADDR VAR_INF_ADDR + 3 * 1024 #define AUTO_LEVELING_COMMAND_ADDR GCODE_COMMAND_ADDR #define OTHERS_COMMAND_ADDR_1 AUTO_LEVELING_COMMAND_ADDR + 100 #define OTHERS_COMMAND_ADDR_2 OTHERS_COMMAND_ADDR_1 + 100 @@ -154,14 +154,14 @@ typedef struct pic_msg PIC_MSG; #define PIC_SIZE_xM 6 #define FONT_SIZE_xM 2 -extern void Pic_Read(uint8_t *Pname, uint8_t *P_Rbuff); -extern void Pic_Logo_Read(uint8_t *LogoName,uint8_t *Logo_Rbuff,uint32_t LogoReadsize); -extern void lv_pic_test(uint8_t *P_Rbuff, uint32_t addr, uint32_t size); -extern uint32_t lv_get_pic_addr(uint8_t *Pname); -extern void get_spi_flash_data(const char *rec_buf, int offset, int size); -extern void spi_flash_read_test(); -extern void default_view_Read(uint8_t *default_view_Rbuff, uint32_t default_view_Readsize); -extern void flash_view_Read(uint8_t *flash_view_Rbuff, uint32_t flash_view_Readsize); +void Pic_Read(uint8_t *Pname, uint8_t *P_Rbuff); +void Pic_Logo_Read(uint8_t *LogoName, uint8_t *Logo_Rbuff, uint32_t LogoReadsize); +void lv_pic_test(uint8_t *P_Rbuff, uint32_t addr, uint32_t size); +uint32_t lv_get_pic_addr(uint8_t *Pname); +void get_spi_flash_data(const char *rec_buf, int offset, int size); +void spi_flash_read_test(); +void default_view_Read(uint8_t *default_view_Rbuff, uint32_t default_view_Readsize); +void flash_view_Read(uint8_t *flash_view_Rbuff, uint32_t flash_view_Readsize); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp similarity index 72% rename from Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp rename to Marlin/src/lcd/extui/mks_ui/printer_operation.cpp index 4467df59d965..04d8f16fccf8 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp +++ b/Marlin/src/lcd/extui/mks_ui/printer_operation.cpp @@ -19,29 +19,31 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI #include "draw_ui.h" #include -#include "../../../../gcode/gcode.h" -#include "../../../../module/planner.h" -#include "../../../../module/motion.h" -#include "../../../../sd/cardreader.h" -#include "../../../../inc/MarlinConfig.h" -#include "../../../../MarlinCore.h" -#include "../../../../gcode/queue.h" +#include "../../../gcode/gcode.h" +#include "../../../module/planner.h" +#include "../../../module/motion.h" +#include "../../../sd/cardreader.h" +#include "../../../inc/MarlinConfig.h" +#include "../../../MarlinCore.h" +#include "../../../gcode/queue.h" #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../feature/powerloss.h" #endif extern uint32_t To_pre_view; extern bool flash_preview_begin, default_preview_flg, gcode_preview_over; void printer_state_polling() { + char str_1[16]; if (uiCfg.print_state == PAUSING) { #if ENABLED(SDSUPPORT) if (!planner.has_blocks_queued() && card.getIndex() > MIN_FILE_PRINTED) @@ -53,17 +55,17 @@ void printer_state_polling() { gcode.process_subcommands_now_P(PSTR("M25")); - //save the positon + // save the position uiCfg.current_x_position_bak = current_position.x; uiCfg.current_y_position_bak = current_position.y; uiCfg.current_z_position_bak = current_position.z; if (gCfgItems.pausePosZ != (float)-1) { - sprintf_P(public_buf_l, PSTR("G91\nG1 Z%.1f\nG90"), gCfgItems.pausePosZ); + sprintf_P(public_buf_l, PSTR("G91\nG1 Z%s\nG90"), dtostrf(gCfgItems.pausePosZ, 1, 1, str_1)); gcode.process_subcommands_now(public_buf_l); } if (gCfgItems.pausePosX != (float)-1 && gCfgItems.pausePosY != (float)-1) { - sprintf_P(public_buf_l, PSTR("G1 X%.1f Y%.1f"), gCfgItems.pausePosX, gCfgItems.pausePosY); + sprintf_P(public_buf_l, PSTR("G1 X%s Y%s"), dtostrf(gCfgItems.pausePosX, 1, 1, str_1), dtostrf(gCfgItems.pausePosY, 1, 1, str_1)); gcode.process_subcommands_now(public_buf_l); } uiCfg.print_state = PAUSED; @@ -83,12 +85,12 @@ void printer_state_polling() { if (uiCfg.print_state == RESUMING) { if (IS_SD_PAUSED()) { if (gCfgItems.pausePosX != (float)-1 && gCfgItems.pausePosY != (float)-1) { - sprintf_P(public_buf_m, PSTR("G1 X%.1f Y%.1f"), uiCfg.current_x_position_bak, uiCfg.current_y_position_bak); + sprintf_P(public_buf_m, PSTR("G1 X%s Y%s"), dtostrf(uiCfg.current_x_position_bak, 1, 1, str_1), dtostrf(uiCfg.current_y_position_bak, 1, 1, str_1)); gcode.process_subcommands_now(public_buf_m); } if (gCfgItems.pausePosZ != (float)-1) { ZERO(public_buf_m); - sprintf_P(public_buf_m, PSTR("G1 Z%.1f"), uiCfg.current_z_position_bak); + sprintf_P(public_buf_m, PSTR("G1 Z%s"), dtostrf(uiCfg.current_z_position_bak, 1, 1, str_1)); gcode.process_subcommands_now(public_buf_m); } gcode.process_subcommands_now_P(M24_STR); @@ -126,7 +128,7 @@ void printer_state_polling() { gcode.process_subcommands_now(public_buf_m); if (gCfgItems.pause_reprint && gCfgItems.pausePosZ != -1.0f) { - sprintf_P(public_buf_l, PSTR("G91\nG1 Z-%.1f\nG90"), gCfgItems.pausePosZ); + sprintf_P(public_buf_l, PSTR("G91\nG1 Z-%s\nG90"), dtostrf(gCfgItems.pausePosZ, 1, 1, str_2)); gcode.process_subcommands_now(public_buf_l); } #endif @@ -157,19 +159,12 @@ void filament_pin_setup() { } void filament_check() { - const int FIL_DELAY = 20; + #if ANY_PIN(MT_DET_1, MT_DET_2, MT_DET_3) + const int FIL_DELAY = 20; + #endif #if PIN_EXISTS(MT_DET_1) static int fil_det_count_1 = 0; - if (!READ(MT_DET_1_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_1++; - else if (READ(MT_DET_1_PIN) && MT_DET_PIN_INVERTING) - fil_det_count_1++; - else if (fil_det_count_1 > 0) - fil_det_count_1--; - - if (!READ(MT_DET_1_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_1++; - else if (READ(MT_DET_1_PIN) && MT_DET_PIN_INVERTING) + if (READ(MT_DET_1_PIN) == MT_DET_PIN_STATE) fil_det_count_1++; else if (fil_det_count_1 > 0) fil_det_count_1--; @@ -177,16 +172,7 @@ void filament_check() { #if PIN_EXISTS(MT_DET_2) static int fil_det_count_2 = 0; - if (!READ(MT_DET_2_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_2++; - else if (READ(MT_DET_2_PIN) && MT_DET_PIN_INVERTING) - fil_det_count_2++; - else if (fil_det_count_2 > 0) - fil_det_count_2--; - - if (!READ(MT_DET_2_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_2++; - else if (READ(MT_DET_2_PIN) && MT_DET_PIN_INVERTING) + if (READ(MT_DET_2_PIN) == MT_DET_PIN_STATE) fil_det_count_2++; else if (fil_det_count_2 > 0) fil_det_count_2--; @@ -194,16 +180,7 @@ void filament_check() { #if PIN_EXISTS(MT_DET_3) static int fil_det_count_3 = 0; - if (!READ(MT_DET_3_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_3++; - else if (READ(MT_DET_3_PIN) && MT_DET_PIN_INVERTING) - fil_det_count_3++; - else if (fil_det_count_3 > 0) - fil_det_count_3--; - - if (!READ(MT_DET_3_PIN) && !MT_DET_PIN_INVERTING) - fil_det_count_3++; - else if (READ(MT_DET_3_PIN) && MT_DET_PIN_INVERTING) + if (READ(MT_DET_3_PIN) == MT_DET_PIN_STATE) fil_det_count_3++; else if (fil_det_count_3 > 0) fil_det_count_3--; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/printer_operation.h b/Marlin/src/lcd/extui/mks_ui/printer_operation.h similarity index 91% rename from Marlin/src/lcd/extui/lib/mks_ui/printer_operation.h rename to Marlin/src/lcd/extui/mks_ui/printer_operation.h index f30415882451..499799c6c78b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/printer_operation.h +++ b/Marlin/src/lcd/extui/mks_ui/printer_operation.h @@ -27,9 +27,9 @@ #define MIN_FILE_PRINTED 100 //5000 -extern void printer_state_polling(); -extern void filament_pin_setup(); -extern void filament_check(); +void printer_state_polling(); +void filament_pin_setup(); +void filament_check(); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_en.h similarity index 97% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h rename to Marlin/src/lcd/extui/mks_ui/tft_Language_en.h index 5fa1c8202739..a41864eec479 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_en.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_en.h @@ -99,13 +99,13 @@ #define LEVELING_CONF_TITLE_EN "Machine Settings>Leveling settings" #define LEVELING_PARA_CONF_EN "Leveling settings" -#define LEVELING_MANUAL_POS_EN "Manual leveling coordinate settings" +#define TRAMMING_POS_EN "Manual leveling coordinate settings" #define LEVELING_AUTO_COMMAND_EN "AutoLeveling command settings" #define LEVELING_AUTO_ZOFFSET_EN "Nozzle-to-probe offsets settings" #define LEVELING_PARA_CONF_TITLE_EN "leveling setting" #define AUTO_LEVELING_ENABLE_EN "Enable auto leveling" -#define BLTOUCH_LEVELING_ENABLE_EN "Enable BLtouch" +#define BLTOUCH_LEVELING_ENABLE_EN "Enable BLTouch" #define PROBE_PORT_EN "Probe connector" #define PROBE_X_OFFSET_EN "Probe X-axis offset" #define PROBE_Y_OFFSET_EN "Probe Y-axis offset" @@ -503,7 +503,7 @@ #define TEXT_WIFI_FORGET_EN "Forget Network" #define TEXT_DISCONECTED_EN "Wi-Fi Connected" -//wifi-list +// wifi-list #define MAIN_BUILT_EN "Build" #define MAIN_FILAMENT_EN "Filament" #define MAIN_SETUP_EN "Setup" @@ -512,7 +512,7 @@ #define FILE_MENU_BUILD_EN "Build" #define FILE_MENU_MENU_EN " < Menu" -//about +// about #define ABOUT_TITLE_EN "About" #define ABOUT_BUILT_MACHINES_EN "Built Machines" #define ABOUT_SPARK_EN "Spark" @@ -520,51 +520,52 @@ #define ABOUT_SERIAL_NUMBER_EN "Serial Number:" #define ABOUT_S_NUMBER_EN "DCPLX02KFC6P" -//set +// set #define SETUP_TITLE_EN "Setup" #define SETUP_WIFI_EN "Wi-Fi" #define SETUP_MANUAL_IP_EN "Manual IP" #define SETUP_WIFI_NOT_CONNECTED_EN "Not Connected" #define SETUP_WIFI_NETWORK_EN "WiFi_Network" -//build +// build #define BUILD_TITLE_EN "Build" #define BUILD_SD_CARD_EN "SD Card" #define BUILD_USB_DRIVE_EN "USB Drive" -//SD card +// SD card #define SD_CARD_TITLE_EN "SD Card" #define SD_CARD_BACK_EN "< Back" -//USB Drive +// USB Drive #define USB_DRIVE_TITLE_EN "USB Drive" #define USB_DRIVE_BACK_EN "< Back" #define FILE_PAGES_EN "%d/%d" #define FILE_NEXT_PAGE_EN "Next Page" +#define MEDIA_SELECT_TITLE_EN "Select Media" -//BUILD PLATE +// BUILD PLATE #define PLATE_TITLE_EN "Build Plate" #define PLATE_BACK_EN "< Back" #define PLATE_CONFIRM_EN "Confirm >" #define PLATE_TIPS_EN "Confirm that there is a Clear\nBuild Plate installed in the\nmachine." -//build model +// build model #define MODEL_TITLE_EN "Build Model" #define MODEL_START_BUILD_EN "Start Build" #define MODEL_BACK_EN "< Back" -//building +// building #define BUILDING_TITLE_EN "Building" #define BUILDING_MENU_EN "Build Menu" #define BUILDING_COMPLETED "Build\nComplete" -//building menu +// building menu #define BUILDING_MENU_TITLE_EN "Build Menu" #define BUILDING_MENU_SETTINGS_EN "Build Settings" #define BUILDING_MENU_PAUSE_EN "Pause Build" #define BUILDING_MENU_CANCEL_EN "Cancel Build" #define BUILDING_MENU_BACK_EN "< Back" -//build settings +// build settings #define SETTINGS_TITLE_EN "Build Settings" #define SETTINGS_NOZZLE_TEMPER_EN "Nozzle Temp:" #define SETTINGS_NOZZLE_VALUE_EN "%d" @@ -574,13 +575,13 @@ #define SETTINGS_SPEED_VALUE_EN "Standard" #define SETTINGS_BACK_EN "< Back" -//build paused +// build paused #define PAUSED_TITLE_EN "Build Paused" #define PAUSED_RESUME_EN "Resume Build" #define PAUSED_CANCEL_EN "Cancel Build" #define PAUSED_BACK_EN "< Back" -//build cancel +// build cancel #define CANCEL_TITLE_EN "Cancel Build" #define CANCEL_BUILD_EN "Cancel Build" #define CANCEL_TIPS_EN "Are you sure you want to\ncancel this build? The model\nwill be deleted from this\nmachine. It will need to be\nresent from your computer\nbefore it can be built in the\nfuture." @@ -588,31 +589,31 @@ #define CANCEL_BUILD_DISPLAY_EN "Build\nCanceled" #define CANCEL_OVER_PLATE_TIPS_EN "Confirm that the Build Plate\nhas been removed from the\nmachine." -//filament model enter +// filament model enter #define FILAMENT_MODEL_ENTER_TITLE_EN "Model-PLA" #define FILAMENT_MODEL_ENTER_BACK_EN "< Back" #define FILAMENT_MODEL_ENTER_BEGIN_EN "Begin >" #define FILAMENT_MODEL_ENTER_TIPS_EN "The Model Filament spool\ncompartment is located on\nthe right side of the machine." -//filament model PLA +// filament model PLA #define FILAMENT_MODEL_PLA_TITLE_EN "Model-PLA" #define FILAMENT_PLA_LOAD_TITLE_EN "Load Filament" #define FILAMENT_PLA_UNLOAD_TITLE_EN "Unload Filament" #define FILAMENT_MODEL_PLA_LOAD_EN "Load Filament" #define FILAMENT_MODEL_PLA_UNLOAD_EN "Unload Filament" -//filament support enter +// filament support enter #define FILAMENT_SUPPORT_ENTER_TITLE_EN "Support-PVA" #define FILAMENT_SUPPORT_ENTER_BACK_EN "< Back" #define FILAMENT_SUPPORT_ENTER_BEGIN_EN "Begin >" #define FILAMENT_SUPPORT_ENTER_TIPS_EN "The Support Filament spool\ncompartment is located on\nthe left side of the machine." -//filament heating +// filament heating #define FILAMENT_HEATING_LOAD_TITLE_EN "Load Filament" #define FILAMENT_HEATING_UNLOAD_TITLE_EN "Unload Filament" #define FILAMENT_HEATING_CANCEL_EN "< Cancel" #define FILAMENT_HEATING_MATERIAL_EN "Material:" #define FILAMENT_HEATING_PLA_EN "Model-PLA" #define FILAMENT_HEATING_TIPS_EN "Print head is heating..." -//rotate left +// rotate left #define ROTATE_LEFT_LOAD_TITLE_EN "Load Filament" #define ROTATE_LEFT_UNLOAD_TITLE_EN "Unload Filament" #define ROTATE_LEFT_CANCEL_EN "< Cancel" @@ -621,7 +622,7 @@ #define ROTATE_LEFT_NEXT_EN "Next >" #define ROTATE_LEFT_TIPS_EN "Rotate extruder selection\ndial to the left." -//hang spool +// hang spool #define HANG_SPOOL_TITLE_EN "Load Filament" #define HANG_SPOOL_PREVIOUS_EN "< Previous" #define HANG_SPOOL_MATERIAL_EN "Material:" @@ -629,7 +630,7 @@ #define HANG_SPOOL_NEXT_EN "Next >" #define HANG_SPOOL_TIPS_EN "Hang the spool in the spool\ncompartment as shown." -//feed filament +// feed filament #define FEED_FILAMENT_TITLE_EN "Load Filament" #define FEED_FILAMENT_PREVIOUS_EN "< Previous" #define FEED_FILAMENT_MATERIAL_EN "Material:" @@ -637,7 +638,7 @@ #define FEED_FILAMENT_NEXT_EN "Next >" #define FEED_FILAMENT_TIPS_EN "Feed filament into extruder\nup beyond the gears." -//feed filament +// feed filament #define ROTATE_UP_TITLE_EN "Load Filament" #define ROTATE_UP_PREVIOUS_EN "< Previous" #define ROTATE_UP_MATERIAL_EN "Material:" @@ -645,20 +646,20 @@ #define ROTATE_UP_NEXT_EN "Next >" #define ROTATE_UP_TIPS_EN "Rotate extruder selection\ndial up." -//filament begin +// filament begin #define FEED_BEGIN_TITLE_EN "Load Filament" #define FEED_BEGIN_MATERIAL_EN "Material:" #define FEED_BEGIN_PLA_EN "Model-PLA" #define FEED_BEGIN_NEXT_EN "Next >" #define FEED_BEGIN_TIPS_EN "Press Next when filament\nbegins to extrude." -//filament finish +// filament finish #define FEED_FINISH_TITLE_EN "Load Filament" #define FEED_FINISH_MATERIAL_EN "Material:" #define FEED_FINISH_PLA_EN "Model-PLA" #define FEED_FINISH_NEXT_EN "Finish >" #define FEED_FINISH_TIPS_EN "Remove filament from the\nnozzle and discard." -//fiament remove +// fiament remove #define REMOVE_SPOOL_TITLE_EN "Unload Filament" #define REMOVE_SPOOL_PREVIOUS_EN "< Previous" #define REMOVE_SPOOL_FINISH_EN "Finish >" @@ -670,7 +671,7 @@ #define LOAD_FINISH_EN "Load\nFilament\nComplete" #define UNLOAD_FINISH_EN "Unload\nFilament\nComplete" -//manual ip +// manual ip #define MANUAL_IP_TITLE_EN "Manual IP" #define MANUAL_IP_CANCEL_EN "< Cancel" #define MANUAL_IP_APPLY_EN "Join >" @@ -728,10 +729,9 @@ #define EEPROM_READ_TIPS_EN "Read settings from EEPROM?" #define EEPROM_REVERT_TIPS_EN "Revert settings to factory defaults?" -#define MORE_CUSTOM1_TEXT_EN USER_DESC_1 -#define MORE_CUSTOM2_TEXT_EN USER_DESC_2 -#define MORE_CUSTOM3_TEXT_EN USER_DESC_3 -#define MORE_CUSTOM4_TEXT_EN USER_DESC_4 -#define MORE_CUSTOM5_TEXT_EN USER_DESC_5 -#define MORE_CUSTOM6_TEXT_EN USER_DESC_6 -#define MORE_CUSTOM7_TEXT_EN USER_DESC_7 +#define MORE_CUSTOM1_TEXT_EN MAIN_MENU_ITEM_1_DESC +#define MORE_CUSTOM2_TEXT_EN MAIN_MENU_ITEM_2_DESC +#define MORE_CUSTOM3_TEXT_EN MAIN_MENU_ITEM_3_DESC +#define MORE_CUSTOM4_TEXT_EN MAIN_MENU_ITEM_4_DESC +#define MORE_CUSTOM5_TEXT_EN MAIN_MENU_ITEM_5_DESC +#define MORE_CUSTOM6_TEXT_EN MAIN_MENU_ITEM_6_DESC diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_fr.h similarity index 97% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h rename to Marlin/src/lcd/extui/mks_ui/tft_Language_fr.h index 55416f025407..f0b19d4e0275 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_fr.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_fr.h @@ -260,10 +260,9 @@ #define EEPROM_READ_TIPS_FR "Lire les paramètres de l'EEPROM?" #define EEPROM_REVERT_TIPS_FR "Rétablir les paramètres par défaut d'usine?" -#define MORE_CUSTOM1_TEXT_FR USER_DESC_1 -#define MORE_CUSTOM2_TEXT_FR USER_DESC_2 -#define MORE_CUSTOM3_TEXT_FR USER_DESC_3 -#define MORE_CUSTOM4_TEXT_FR USER_DESC_4 -#define MORE_CUSTOM5_TEXT_FR USER_DESC_5 -#define MORE_CUSTOM6_TEXT_FR USER_DESC_6 -#define MORE_CUSTOM7_TEXT_FR USER_DESC_7 +#define MORE_CUSTOM1_TEXT_FR MAIN_MENU_ITEM_1_DESC +#define MORE_CUSTOM2_TEXT_FR MAIN_MENU_ITEM_2_DESC +#define MORE_CUSTOM3_TEXT_FR MAIN_MENU_ITEM_3_DESC +#define MORE_CUSTOM4_TEXT_FR MAIN_MENU_ITEM_4_DESC +#define MORE_CUSTOM5_TEXT_FR MAIN_MENU_ITEM_5_DESC +#define MORE_CUSTOM6_TEXT_FR MAIN_MENU_ITEM_6_DESC diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_it.h similarity index 97% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h rename to Marlin/src/lcd/extui/mks_ui/tft_Language_it.h index d46cccfeb8e7..b74842afef1c 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_it.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_it.h @@ -257,10 +257,9 @@ #define EEPROM_READ_TIPS_IT "Leggi le impostazioni dalla EEPROM?" #define EEPROM_REVERT_TIPS_IT "Ripristinare le impostazioni predefinite?" -#define MORE_CUSTOM1_TEXT_IT USER_DESC_1 -#define MORE_CUSTOM2_TEXT_IT USER_DESC_2 -#define MORE_CUSTOM3_TEXT_IT USER_DESC_3 -#define MORE_CUSTOM4_TEXT_IT USER_DESC_4 -#define MORE_CUSTOM5_TEXT_IT USER_DESC_5 -#define MORE_CUSTOM6_TEXT_IT USER_DESC_6 -#define MORE_CUSTOM7_TEXT_IT USER_DESC_7 +#define MORE_CUSTOM1_TEXT_IT MAIN_MENU_ITEM_1_DESC +#define MORE_CUSTOM2_TEXT_IT MAIN_MENU_ITEM_2_DESC +#define MORE_CUSTOM3_TEXT_IT MAIN_MENU_ITEM_3_DESC +#define MORE_CUSTOM4_TEXT_IT MAIN_MENU_ITEM_4_DESC +#define MORE_CUSTOM5_TEXT_IT MAIN_MENU_ITEM_5_DESC +#define MORE_CUSTOM6_TEXT_IT MAIN_MENU_ITEM_6_DESC diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_ru.h similarity index 97% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h rename to Marlin/src/lcd/extui/mks_ui/tft_Language_ru.h index f5955c38d1c6..12c600f0886e 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_ru.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_ru.h @@ -194,7 +194,6 @@ #define TITLE_HOME_RU "Home" #define TITLE_EXTRUDE_RU "экструзия" #define TITLE_LEVELING_RU "уровень" -#define TITLE_MLEVELING_RU "углы" #define TITLE_SET_RU "настройки" #define TITLE_MORE_RU "больше" #define TITLE_CHOOSEFILE_RU "файла" @@ -216,7 +215,7 @@ #define AUTO_SHUTDOWN_RU "авто-откл" #define MANUAL_SHUTDOWN_RU "ручн-откл" -#define DIALOG_CONFIRM_RU "да"//"подтвердить" +#define DIALOG_CONFIRM_RU "да" // "подтвердить" #define DIALOG_CANCLE_RU "отмена" #define DIALOG_OK_RU "да" #define DIALOG_RESET_RU "сброс" @@ -255,17 +254,13 @@ #define EEPROM_SETTINGS_READ_RU "Чтение настроек из EEPROM" #define EEPROM_SETTINGS_REVERT_RU "Bосстановить заводские настройки по умолчанию" -#define MORE_CUSTOM1_TEXT_RU USER_DESC_1 -#define MORE_CUSTOM2_TEXT_RU USER_DESC_2 -#define MORE_CUSTOM3_TEXT_RU USER_DESC_3 -#define MORE_CUSTOM4_TEXT_RU USER_DESC_4 -#define MORE_CUSTOM5_TEXT_RU USER_DESC_5 -#define MORE_CUSTOM6_TEXT_RU USER_DESC_6 -#define MORE_CUSTOM7_TEXT_RU USER_DESC_7 - -//Malderin translate -// -// +#define MORE_CUSTOM1_TEXT_RU MAIN_MENU_ITEM_1_DESC +#define MORE_CUSTOM2_TEXT_RU MAIN_MENU_ITEM_2_DESC +#define MORE_CUSTOM3_TEXT_RU MAIN_MENU_ITEM_3_DESC +#define MORE_CUSTOM4_TEXT_RU MAIN_MENU_ITEM_4_DESC +#define MORE_CUSTOM5_TEXT_RU MAIN_MENU_ITEM_5_DESC +#define MORE_CUSTOM6_TEXT_RU MAIN_MENU_ITEM_6_DESC + #define EEPROM_STORE_TIPS_RU "Cохранить настройки в EEPROM?" #define EEPROM_READ_TIPS_RU "читать настройки из EEPROM?" #define EEPROM_REVERT_TIPS_RU "Cбросить настройки к значениям по умолчанию?" @@ -287,7 +282,7 @@ #define LEVELING_CONF_TITLE_RU "Hастройки принтера>Hастройки уровня" #define LEVELING_PARA_CONF_RU "настройки уровня" -#define LEVELING_MANUAL_POS_RU "настройки координат для уровня" +#define TRAMMING_POS_RU "настройки координат для уровня" #define LEVELING_AUTO_COMMAND_RU "настройки комманд увтоуровня" #define LEVELING_AUTO_ZOFFSET_RU "координаты смещения сопла" @@ -365,5 +360,3 @@ #define ENCODER_CONF_TITLE_RU "Hастройки принтера>Hастройки энкодера" #define ENCODER_CONF_TEXT_RU "энкодер используется?" - -//end of Malderin translate diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_s_cn.h similarity index 98% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h rename to Marlin/src/lcd/extui/mks_ui/tft_Language_s_cn.h index 7ae87b5d3fe2..59de8c7db93e 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_s_cn.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_s_cn.h @@ -84,13 +84,13 @@ #define LEVELING_CONF_TITLE_CN "机器参数>调平设置" #define LEVELING_PARA_CONF_CN "调平设置" -#define LEVELING_MANUAL_POS_CN "手动调平坐标设置" +#define TRAMMING_POS_CN "手动调平坐标设置" #define LEVELING_AUTO_COMMAND_CN "自动调平指令设置" #define LEVELING_AUTO_ZOFFSET_CN "挤出头与调平开关偏移设置" #define LEVELING_PARA_CONF_TITLE_CN "调平参数" #define AUTO_LEVELING_ENABLE_CN "自动调平" -#define BLTOUCH_LEVELING_ENABLE_CN "启动BLtouch" +#define BLTOUCH_LEVELING_ENABLE_CN "启动BLTouch" #define PROBE_PORT_CN "调平探针接口" #define PROBE_X_OFFSET_CN "探针X方向偏移" #define PROBE_Y_OFFSET_CN "探针Y方向偏移" @@ -495,10 +495,9 @@ #define EEPROM_READ_TIPS_CN "是否使用EEPROM参数?" #define EEPROM_REVERT_TIPS_CN "是否恢复默认参数?" -#define MORE_CUSTOM1_TEXT_CN USER_DESC_1 -#define MORE_CUSTOM2_TEXT_CN USER_DESC_2 -#define MORE_CUSTOM3_TEXT_CN USER_DESC_3 -#define MORE_CUSTOM4_TEXT_CN USER_DESC_4 -#define MORE_CUSTOM5_TEXT_CN USER_DESC_5 -#define MORE_CUSTOM6_TEXT_CN USER_DESC_6 -#define MORE_CUSTOM7_TEXT_CN USER_DESC_7 +#define MORE_CUSTOM1_TEXT_CN MAIN_MENU_ITEM_1_DESC +#define MORE_CUSTOM2_TEXT_CN MAIN_MENU_ITEM_2_DESC +#define MORE_CUSTOM3_TEXT_CN MAIN_MENU_ITEM_3_DESC +#define MORE_CUSTOM4_TEXT_CN MAIN_MENU_ITEM_4_DESC +#define MORE_CUSTOM5_TEXT_CN MAIN_MENU_ITEM_5_DESC +#define MORE_CUSTOM6_TEXT_CN MAIN_MENU_ITEM_6_DESC diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_sp.h similarity index 96% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h rename to Marlin/src/lcd/extui/mks_ui/tft_Language_sp.h index 28afe186f14c..6bba3a3edfe2 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_sp.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_sp.h @@ -29,7 +29,6 @@ #define PRINT_TEXT_SP "Imprimir" #define EXTRUDE_TEXT_SP "Extrusor" #define LEVELING_TEXT_SP "Leveling" -#define MLEVELING_TEXT_SP "Leveling" #define AUTO_LEVELING_TEXT_SP "Autolevel" #define SET_TEXT_SP "Config" #define MORE_TEXT_SP "Más" @@ -53,7 +52,6 @@ #define TOOL_MOVE_SP "Mover" #define TOOL_HOME_SP "Origen" #define TOOL_LEVELING_SP "Leveling" -#define TOOL_MLEVELING_SP "Leveling" #define TOOL_AUTO_LEVELING_SP "Autolevel" #define TOOL_FILAMENT_SP "Filamento" #define TOOL_MORE_SP "Más" @@ -266,10 +264,9 @@ #define EEPROM_READ_TIPS_SP "Leer la configuración de EEPROM?" #define EEPROM_REVERT_TIPS_SP "Revert settings to factory defaults?" -#define MORE_CUSTOM1_TEXT_SP USER_DESC_1 -#define MORE_CUSTOM2_TEXT_SP USER_DESC_2 -#define MORE_CUSTOM3_TEXT_SP USER_DESC_3 -#define MORE_CUSTOM4_TEXT_SP USER_DESC_4 -#define MORE_CUSTOM5_TEXT_SP USER_DESC_5 -#define MORE_CUSTOM6_TEXT_SP USER_DESC_6 -#define MORE_CUSTOM7_TEXT_SP USER_DESC_7 +#define MORE_CUSTOM1_TEXT_SP MAIN_MENU_ITEM_1_DESC +#define MORE_CUSTOM2_TEXT_SP MAIN_MENU_ITEM_2_DESC +#define MORE_CUSTOM3_TEXT_SP MAIN_MENU_ITEM_3_DESC +#define MORE_CUSTOM4_TEXT_SP MAIN_MENU_ITEM_4_DESC +#define MORE_CUSTOM5_TEXT_SP MAIN_MENU_ITEM_5_DESC +#define MORE_CUSTOM6_TEXT_SP MAIN_MENU_ITEM_6_DESC diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h b/Marlin/src/lcd/extui/mks_ui/tft_Language_t_cn.h similarity index 98% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h rename to Marlin/src/lcd/extui/mks_ui/tft_Language_t_cn.h index 8d38bc3c9a16..c9607187ef78 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_Language_t_cn.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_Language_t_cn.h @@ -84,13 +84,13 @@ #define LEVELING_CONF_TITLE_T_CN "機器參數>調平設置" #define LEVELING_PARA_CONF_T_CN "調平設置" -#define LEVELING_MANUAL_POS_T_CN "手動調平坐標設置" +#define TRAMMING_POS_T_CN "手動調平坐標設置" #define LEVELING_AUTO_COMMAND_T_CN "自動調平指令設置" #define LEVELING_AUTO_ZOFFSET_T_CN "擠出頭與調平開關偏移設置" #define LEVELING_PARA_CONF_TITLE_T_CN "調平參數" #define AUTO_LEVELING_ENABLE_T_CN "自動調平" -#define BLTOUCH_LEVELING_ENABLE_T_CN "啟動BLtouch" +#define BLTOUCH_LEVELING_ENABLE_T_CN "啟動BLTouch" #define PROBE_PORT_T_CN "調平探針接口" #define PROBE_X_OFFSET_T_CN "探針X方向偏移" #define PROBE_Y_OFFSET_T_CN "探针Y方向偏移" @@ -493,10 +493,9 @@ #define EEPROM_READ_TIPS_T_CN "是否使用EEPROM參數?" #define EEPROM_REVERT_TIPS_T_CN "是否恢復默認參數?" -#define MORE_CUSTOM1_TEXT_T_CN USER_DESC_1 -#define MORE_CUSTOM2_TEXT_T_CN USER_DESC_2 -#define MORE_CUSTOM3_TEXT_T_CN USER_DESC_3 -#define MORE_CUSTOM4_TEXT_T_CN USER_DESC_4 -#define MORE_CUSTOM5_TEXT_T_CN USER_DESC_5 -#define MORE_CUSTOM6_TEXT_T_CN USER_DESC_6 -#define MORE_CUSTOM7_TEXT_T_CN USER_DESC_7 +#define MORE_CUSTOM1_TEXT_T_CN MAIN_MENU_ITEM_1_DESC +#define MORE_CUSTOM2_TEXT_T_CN MAIN_MENU_ITEM_2_DESC +#define MORE_CUSTOM3_TEXT_T_CN MAIN_MENU_ITEM_3_DESC +#define MORE_CUSTOM4_TEXT_T_CN MAIN_MENU_ITEM_4_DESC +#define MORE_CUSTOM5_TEXT_T_CN MAIN_MENU_ITEM_5_DESC +#define MORE_CUSTOM6_TEXT_T_CN MAIN_MENU_ITEM_6_DESC diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp similarity index 86% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp rename to Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp index b7441f71f4c3..837d7470d600 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_lvgl_configuration.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -29,24 +30,32 @@ #include "draw_ready_print.h" #include "pic_manager.h" -#include "mks_hardware_test.h" +#include "mks_hardware.h" #include "draw_ui.h" #include "SPIFlashStorage.h" #include -#include "../../../../MarlinCore.h" -#include "../../../../inc/MarlinConfig.h" +#include "../../../MarlinCore.h" +#include "../../../inc/MarlinConfig.h" -#include HAL_PATH(../../../../HAL, tft/xpt2046.h) -#include "../../../marlinui.h" +#include HAL_PATH(../../../HAL, tft/xpt2046.h) +#include "../../marlinui.h" XPT2046 touch; #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../feature/powerloss.h" +#endif + +#if HAS_SERVOS + #include "../../../module/servo.h" +#endif + +#if EITHER(PROBE_TARE, HAS_Z_SERVO_PROBE) + #include "../../../module/probe.h" #endif #if ENABLED(TOUCH_SCREEN_CALIBRATION) - #include "../../../tft_io/touch_calibration.h" + #include "../../tft_io/touch_calibration.h" #include "draw_touch_calibration.h" #endif @@ -64,13 +73,13 @@ XPT2046 touch; #endif #if HAS_SPI_FLASH_FONT - extern void init_gb2312_font(); + void init_gb2312_font(); #endif static lv_disp_buf_t disp_buf; lv_group_t* g; #if ENABLED(SDSUPPORT) - extern void UpdateAssets(); + void UpdateAssets(); #endif uint16_t DeviceCode = 0x9488; extern uint8_t sel_id; @@ -131,10 +140,9 @@ void tft_lvgl_init() { #if ENABLED(SDSUPPORT) UpdateAssets(); watchdog_refresh(); // LVGL init takes time + TERN_(MKS_TEST, mks_test_get()); #endif - mks_test_get(); - touch.Init(); lv_init(); @@ -185,18 +193,18 @@ void tft_lvgl_init() { systick_attach_callback(SysTick_Callback); - #if HAS_SPI_FLASH_FONT - init_gb2312_font(); - #endif + TERN_(HAS_SPI_FLASH_FONT, init_gb2312_font()); tft_style_init(); - filament_pin_setup(); - lv_encoder_pin_init(); - TERN_(MKS_WIFI_MODULE, mks_wifi_firmware_update()); - + #if ENABLED(MKS_WIFI_MODULE) + mks_esp_wifi_init(); + mks_wifi_firmware_update(); + #endif + TERN_(HAS_SERVOS, servo_init()); + TERN_(HAS_Z_SERVO_PROBE, probe.servo_probe_init()); bool ready = true; #if ENABLED(POWER_LOSS_RECOVERY) recovery.load(); @@ -209,16 +217,22 @@ void tft_lvgl_init() { uiCfg.print_state = REPRINTING; - strncpy(public_buf_m, recovery.info.sd_filename, sizeof(public_buf_m)); - card.printLongPath(public_buf_m); - strncpy(list_file.long_name[sel_id], card.longFilename, sizeof(list_file.long_name[sel_id])); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + strncpy(public_buf_m, recovery.info.sd_filename, sizeof(public_buf_m)); + card.printLongPath(public_buf_m); + strncpy(list_file.long_name[sel_id], card.longFilename, sizeof(list_file.long_name[0])); + #else + strncpy(list_file.long_name[sel_id], recovery.info.sd_filename, sizeof(list_file.long_name[0])); + #endif lv_draw_printing(); } #endif if (ready) lv_draw_ready_print(); - if (mks_test_flag == 0x1E) mks_gpio_test(); + #if BOTH(MKS_TEST, SDSUPPORT) + if (mks_test_flag == 0x1E) mks_gpio_test(); + #endif } void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p) { @@ -227,8 +241,7 @@ void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * co SPI_TFT.setWindow((uint16_t)area->x1, (uint16_t)area->y1, width, height); - for (uint16_t i = 0; i < height; i++) - SPI_TFT.tftio.WriteSequence((uint16_t*)(color_p + width * i), width); + SPI_TFT.tftio.WriteSequence((uint16_t*)color_p, width * height); lv_disp_flush_ready(disp); // Indicate you are ready with the flushing @@ -251,9 +264,7 @@ unsigned int getTickDiff(unsigned int curTick, unsigned int lastTick) { } static bool get_point(int16_t *x, int16_t *y) { - bool is_touched = touch.getRawPoint(x, y); - - if (!is_touched) return false; + if (!touch.getRawPoint(x, y)) return false; #if ENABLED(TOUCH_SCREEN_CALIBRATION) const calibrationState state = touch_calibration.get_calibration_state(); @@ -273,34 +284,26 @@ static bool get_point(int16_t *x, int16_t *y) { bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data) { static int16_t last_x = 0, last_y = 0; - static uint8_t last_touch_state = LV_INDEV_STATE_REL; - static int32_t touch_time1 = 0; - uint32_t tmpTime, diffTime = 0; - - tmpTime = millis(); - diffTime = getTickDiff(tmpTime, touch_time1); - if (diffTime > 20) { - if (get_point(&last_x, &last_y)) { - - if (last_touch_state == LV_INDEV_STATE_PR) return false; - data->state = LV_INDEV_STATE_PR; - - // Set the coordinates (if released use the last-pressed coordinates) + if (get_point(&last_x, &last_y)) { + #if TFT_ROTATION == TFT_ROTATE_180 + data->point.x = TFT_WIDTH - last_x; + data->point.y = TFT_HEIGHT - last_y; + #else data->point.x = last_x; data->point.y = last_y; - - last_x = last_y = 0; - last_touch_state = LV_INDEV_STATE_PR; - } - else { - if (last_touch_state == LV_INDEV_STATE_PR) - data->state = LV_INDEV_STATE_REL; - last_touch_state = LV_INDEV_STATE_REL; - } - - touch_time1 = tmpTime; + #endif + data->state = LV_INDEV_STATE_PR; + } + else { + #if TFT_ROTATION == TFT_ROTATE_180 + data->point.x = TFT_WIDTH - last_x; + data->point.y = TFT_HEIGHT - last_y; + #else + data->point.x = last_x; + data->point.y = last_y; + #endif + data->state = LV_INDEV_STATE_REL; } - return false; // Return `false` since no data is buffering or left to read } @@ -319,7 +322,7 @@ bool my_mousewheel_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data) { extern uint8_t currentFlashPage; -//spi_flash +// spi_flash uint32_t pic_read_base_addr = 0, pic_read_addr_offset = 0; lv_fs_res_t spi_flash_open_cb (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode) { static char last_path_name[30]; @@ -368,7 +371,7 @@ lv_fs_res_t spi_flash_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p return LV_FS_RES_OK; } -//sd +// sd char *cur_namefff; uint32_t sd_read_base_addr = 0, sd_read_addr_offset = 0, small_image_size = 409; lv_fs_res_t sd_open_cb (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode) { @@ -383,7 +386,7 @@ lv_fs_res_t sd_open_cb (lv_fs_drv_t * drv, void * file_p, const char * path, lv_ // find small image size card.read(public_buf, 512); public_buf[511] = '\0'; - char* eol = strpbrk((const char*)public_buf, "\n\r"); + const char* eol = strpbrk((const char*)public_buf, "\n\r"); small_image_size = (uintptr_t)eol - (uintptr_t)((uint32_t *)(&public_buf[0])) + 1; return LV_FS_RES_OK; } @@ -515,4 +518,10 @@ void lv_encoder_pin_init() { #endif // HAS_ENCODER_ACTION +#if __PLAT_NATIVE_SIM__ + #include + typedef void (*lv_log_print_g_cb_t)(lv_log_level_t level, const char *, uint32_t, const char *); + extern "C" void lv_log_register_print_cb(lv_log_print_g_cb_t print_cb) {} +#endif + #endif // HAS_TFT_LVGL_UI diff --git a/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h new file mode 100644 index 000000000000..e2786fd452cf --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.h @@ -0,0 +1,69 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * @file lcd/extui/mks_ui/tft_lvgl_configuration.h + * @date 2020-02-21 + */ + +#ifdef __cplusplus + extern "C" { /* C-declarations for C++ */ +#endif + +#include + +//#define TFT_ROTATION TFT_ROTATE_180 + +extern uint8_t bmp_public_buf[14 * 1024]; +extern uint8_t public_buf[513]; + +void tft_lvgl_init(); +void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p); +bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data); +bool my_mousewheel_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data); + +void LCD_Clear(uint16_t Color); +void tft_set_point(uint16_t x, uint16_t y, uint16_t point); +void LCD_setWindowArea(uint16_t StartX, uint16_t StartY, uint16_t width, uint16_t height); +void LCD_WriteRAM_Prepare(); +void lcd_draw_logo(); +void lv_encoder_pin_init(); +void lv_update_encoder(); + +lv_fs_res_t spi_flash_open_cb(lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode); +lv_fs_res_t spi_flash_close_cb(lv_fs_drv_t * drv, void * file_p); +lv_fs_res_t spi_flash_read_cb(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); +lv_fs_res_t spi_flash_seek_cb(lv_fs_drv_t * drv, void * file_p, uint32_t pos); +lv_fs_res_t spi_flash_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); + +lv_fs_res_t sd_open_cb(lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode); +lv_fs_res_t sd_close_cb(lv_fs_drv_t * drv, void * file_p); +lv_fs_res_t sd_read_cb(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br); +lv_fs_res_t sd_seek_cb(lv_fs_drv_t * drv, void * file_p, uint32_t pos); +lv_fs_res_t sd_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p); + +void lv_fill_rect(lv_coord_t x1, lv_coord_t y1, lv_coord_t x2, lv_coord_t y2, lv_color_t bk_color); + +#ifdef __cplusplus + } /* C-declarations for C++ */ +#endif diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp similarity index 96% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp rename to Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp index 1fd17c20f754..c69ccf65872b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.cpp +++ b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if HAS_TFT_LVGL_UI @@ -56,6 +57,9 @@ tool_menu_def tool_menu; MachinePara_menu_def MachinePara_menu; pause_msg_def pause_msg_menu; eeprom_def eeprom_menu; +media_select_menu_def media_select_menu; + +// TODO: Make all strings PSTR and update accessors for the benefit of AVR machine_common_def machine_menu; void machine_setting_disp() { @@ -119,7 +123,7 @@ void machine_setting_disp() { machine_menu.LevelingParaConfTitle = LEVELING_CONF_TITLE_CN; machine_menu.LevelingParaConf = LEVELING_PARA_CONF_CN; - machine_menu.LevelingManuPosConf = LEVELING_MANUAL_POS_CN; + machine_menu.TrammingPosConf = TRAMMING_POS_CN; machine_menu.LevelingAutoCommandConf = LEVELING_AUTO_COMMAND_CN; machine_menu.LevelingAutoZoffsetConf = LEVELING_AUTO_ZOFFSET_CN; @@ -347,7 +351,7 @@ void machine_setting_disp() { machine_menu.LevelingParaConfTitle = LEVELING_CONF_TITLE_T_CN; machine_menu.LevelingParaConf = LEVELING_PARA_CONF_T_CN; - machine_menu.LevelingManuPosConf = LEVELING_MANUAL_POS_T_CN; + machine_menu.TrammingPosConf = TRAMMING_POS_T_CN; machine_menu.LevelingAutoCommandConf = LEVELING_AUTO_COMMAND_T_CN; machine_menu.LevelingAutoZoffsetConf = LEVELING_AUTO_ZOFFSET_T_CN; @@ -576,7 +580,7 @@ void machine_setting_disp() { machine_menu.LevelingParaConfTitle = LEVELING_CONF_TITLE_EN; machine_menu.LevelingParaConf = LEVELING_PARA_CONF_EN; - machine_menu.LevelingManuPosConf = LEVELING_MANUAL_POS_EN; + machine_menu.TrammingPosConf = TRAMMING_POS_EN; machine_menu.LevelingAutoCommandConf = LEVELING_AUTO_COMMAND_EN; machine_menu.LevelingAutoZoffsetConf = LEVELING_AUTO_ZOFFSET_EN; @@ -815,12 +819,16 @@ void disp_language_init() { wifi_menu.disconnected = WIFI_DISCONNECTED_TEXT; wifi_menu.exception = WIFI_EXCEPTION_TEXT; - printing_menu.temp1 = TEXT_VALUE; - printing_menu.temp2 = TEXT_VALUE; - printing_menu.bed_temp = TEXT_VALUE; + printing_menu.temp1 = TEXT_VALUE_TARGET; + printing_menu.temp2 = TEXT_VALUE_TARGET; + printing_menu.bed_temp = TEXT_VALUE_TARGET; filament_menu.stat_temp = TEXT_VALUE; + media_select_menu.title = MEDIA_SELECT_TITLE_EN; + media_select_menu.sd_disk = SD_CARD_TITLE_EN; + media_select_menu.usb_disk = USB_DRIVE_TITLE_EN; + machine_menu.key_0 = KEYBOARD_KEY0_EN; machine_menu.key_1 = KEYBOARD_KEY1_EN; machine_menu.key_2 = KEYBOARD_KEY2_EN; @@ -945,13 +953,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_CN; more_menu.gcode = MORE_GCODE_CN; more_menu.entergcode = MORE_ENTER_GCODE_CN; - TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_CN); - TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_CN); - TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_CN); - TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_CN); - TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_CN); - TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_CN); - TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_CN); + #if HAS_USER_ITEM(1) + more_menu.custom1 = MORE_CUSTOM1_TEXT_CN; + #endif + #if HAS_USER_ITEM(2) + more_menu.custom2 = MORE_CUSTOM2_TEXT_CN; + #endif + #if HAS_USER_ITEM(3) + more_menu.custom3 = MORE_CUSTOM3_TEXT_CN; + #endif + #if HAS_USER_ITEM(4) + more_menu.custom4 = MORE_CUSTOM4_TEXT_CN; + #endif + #if HAS_USER_ITEM(5) + more_menu.custom5 = MORE_CUSTOM5_TEXT_CN; + #endif + #if HAS_USER_ITEM(6) + more_menu.custom6 = MORE_CUSTOM6_TEXT_CN; + #endif // WIFI wifi_menu.title = WIFI_TEXT; wifi_menu.cloud = CLOUD_TEXT_CN; @@ -1077,8 +1096,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_CN; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_CN; eeprom_menu.storeTips = EEPROM_STORE_TIPS_CN; - eeprom_menu.readTips = EEPROM_READ_TIPS_CN; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_CN; + eeprom_menu.readTips = EEPROM_READ_TIPS_CN; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_CN; break; #if 1 @@ -1179,13 +1198,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_T_CN; more_menu.gcode = MORE_GCODE_T_CN; more_menu.entergcode = MORE_ENTER_GCODE_T_CN; - TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_T_CN); - TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_T_CN); - TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_T_CN); - TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_T_CN); - TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_T_CN); - TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_T_CN); - TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_T_CN); + #if HAS_USER_ITEM(1) + more_menu.custom1 = MORE_CUSTOM1_TEXT_CN; + #endif + #if HAS_USER_ITEM(2) + more_menu.custom2 = MORE_CUSTOM2_TEXT_CN; + #endif + #if HAS_USER_ITEM(3) + more_menu.custom3 = MORE_CUSTOM3_TEXT_CN; + #endif + #if HAS_USER_ITEM(4) + more_menu.custom4 = MORE_CUSTOM4_TEXT_CN; + #endif + #if HAS_USER_ITEM(5) + more_menu.custom5 = MORE_CUSTOM5_TEXT_CN; + #endif + #if HAS_USER_ITEM(6) + more_menu.custom6 = MORE_CUSTOM6_TEXT_CN; + #endif // WIFI wifi_menu.title = WIFI_TEXT; wifi_menu.cloud = CLOUD_TEXT_T_CN; @@ -1310,8 +1340,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_T_CN; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_T_CN; eeprom_menu.storeTips = EEPROM_STORE_TIPS_T_CN; - eeprom_menu.readTips = EEPROM_READ_TIPS_T_CN; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_T_CN; + eeprom_menu.readTips = EEPROM_READ_TIPS_T_CN; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_T_CN; break; case LANG_ENGLISH: common_menu.dialog_confirm_title = TITLE_DIALOG_CONFIRM_EN; @@ -1400,13 +1430,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_EN; more_menu.gcode = MORE_GCODE_EN; more_menu.entergcode = MORE_ENTER_GCODE_EN; - TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_EN); - TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_EN); - TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_EN); - TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_EN); - TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_EN); - TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_EN); - TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_EN); + #if HAS_USER_ITEM(1) + more_menu.custom1 = MORE_CUSTOM1_TEXT_EN; + #endif + #if HAS_USER_ITEM(2) + more_menu.custom2 = MORE_CUSTOM2_TEXT_EN; + #endif + #if HAS_USER_ITEM(3) + more_menu.custom3 = MORE_CUSTOM3_TEXT_EN; + #endif + #if HAS_USER_ITEM(4) + more_menu.custom4 = MORE_CUSTOM4_TEXT_EN; + #endif + #if HAS_USER_ITEM(5) + more_menu.custom5 = MORE_CUSTOM5_TEXT_EN; + #endif + #if HAS_USER_ITEM(6) + more_menu.custom6 = MORE_CUSTOM6_TEXT_EN; + #endif // filesys_menu.title = TITLE_FILESYS_EN; @@ -1533,8 +1574,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_EN; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_EN; eeprom_menu.storeTips = EEPROM_STORE_TIPS_EN; - eeprom_menu.readTips = EEPROM_READ_TIPS_EN; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_EN; + eeprom_menu.readTips = EEPROM_READ_TIPS_EN; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_EN; break; case LANG_RUSSIAN: common_menu.dialog_confirm_title = TITLE_DIALOG_CONFIRM_RU; @@ -1622,27 +1663,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_RU; more_menu.gcode = MORE_GCODE_RU; more_menu.entergcode = MORE_ENTER_GCODE_RU; - #if ENABLED(USER_CMD_1_ENABLE) + #if HAS_USER_ITEM(1) more_menu.custom1 = MORE_CUSTOM1_TEXT_RU; #endif - #if ENABLED(USER_CMD_2_ENABLE) + #if HAS_USER_ITEM(2) more_menu.custom2 = MORE_CUSTOM2_TEXT_RU; #endif - #if ENABLED(USER_CMD_3_ENABLE) + #if HAS_USER_ITEM(3) more_menu.custom3 = MORE_CUSTOM3_TEXT_RU; #endif - #if ENABLED(USER_CMD_4_ENABLE) + #if HAS_USER_ITEM(4) more_menu.custom4 = MORE_CUSTOM4_TEXT_RU; #endif - #if ENABLED(USER_CMD_5_ENABLE) + #if HAS_USER_ITEM(5) more_menu.custom5 = MORE_CUSTOM5_TEXT_RU; #endif - #if ENABLED(USER_CMD_6_ENABLE) + #if HAS_USER_ITEM(6) more_menu.custom6 = MORE_CUSTOM6_TEXT_RU; #endif - #if ENABLED(USER_CMD_7_ENABLE) - more_menu.custom7 = MORE_CUSTOM7_TEXT_RU; - #endif // filesys_menu.title = TITLE_FILESYS_RU; filesys_menu.sd_sys = SD_CARD_TEXT_RU; @@ -1678,7 +1716,7 @@ void disp_language_init() { machine_menu.LevelingParaConfTitle = LEVELING_CONF_TITLE_RU; machine_menu.LevelingParaConf = LEVELING_PARA_CONF_RU; - machine_menu.LevelingManuPosConf = LEVELING_MANUAL_POS_RU; + machine_menu.TrammingPosConf = TRAMMING_POS_RU; machine_menu.LevelingAutoCommandConf = LEVELING_AUTO_COMMAND_RU; machine_menu.LevelingAutoZoffsetConf = LEVELING_AUTO_ZOFFSET_RU; @@ -1861,8 +1899,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_RU; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_RU; eeprom_menu.storeTips = EEPROM_STORE_TIPS_RU; - eeprom_menu.readTips = EEPROM_READ_TIPS_RU; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_RU; + eeprom_menu.readTips = EEPROM_READ_TIPS_RU; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_RU; break; case LANG_SPANISH: common_menu.dialog_confirm_title = TITLE_DIALOG_CONFIRM_SP; @@ -1954,27 +1992,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_SP; more_menu.gcode = MORE_GCODE_SP; more_menu.entergcode = MORE_ENTER_GCODE_SP; - #if ENABLED(USER_CMD_1_ENABLE) + #if HAS_USER_ITEM(1) more_menu.custom1 = MORE_CUSTOM1_TEXT_SP; #endif - #if ENABLED(USER_CMD_2_ENABLE) + #if HAS_USER_ITEM(2) more_menu.custom2 = MORE_CUSTOM2_TEXT_SP; #endif - #if ENABLED(USER_CMD_3_ENABLE) + #if HAS_USER_ITEM(3) more_menu.custom3 = MORE_CUSTOM3_TEXT_SP; #endif - #if ENABLED(USER_CMD_4_ENABLE) + #if HAS_USER_ITEM(4) more_menu.custom4 = MORE_CUSTOM4_TEXT_SP; #endif - #if ENABLED(USER_CMD_5_ENABLE) + #if HAS_USER_ITEM(5) more_menu.custom5 = MORE_CUSTOM5_TEXT_SP; #endif - #if ENABLED(USER_CMD_6_ENABLE) + #if HAS_USER_ITEM(6) more_menu.custom6 = MORE_CUSTOM6_TEXT_SP; #endif - #if ENABLED(USER_CMD_7_ENABLE) - more_menu.custom7 = MORE_CUSTOM7_TEXT_SP; - #endif // filesys_menu.title = TITLE_FILESYS_SP; filesys_menu.sd_sys = SD_CARD_TEXT_SP; @@ -2101,8 +2136,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_SP; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_SP; eeprom_menu.storeTips = EEPROM_STORE_TIPS_SP; - eeprom_menu.readTips = EEPROM_READ_TIPS_SP; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_SP; + eeprom_menu.readTips = EEPROM_READ_TIPS_SP; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_SP; break; #endif // if 1 @@ -2191,27 +2226,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_FR; more_menu.gcode = MORE_GCODE_FR; more_menu.entergcode = MORE_ENTER_GCODE_FR; - #if ENABLED(USER_CMD_1_ENABLE) + #if HAS_USER_ITEM(1) more_menu.custom1 = MORE_CUSTOM1_TEXT_FR; #endif - #if ENABLED(USER_CMD_2_ENABLE) + #if HAS_USER_ITEM(2) more_menu.custom2 = MORE_CUSTOM2_TEXT_FR; #endif - #if ENABLED(USER_CMD_3_ENABLE) + #if HAS_USER_ITEM(3) more_menu.custom3 = MORE_CUSTOM3_TEXT_FR; #endif - #if ENABLED(USER_CMD_4_ENABLE) + #if HAS_USER_ITEM(4) more_menu.custom4 = MORE_CUSTOM4_TEXT_FR; #endif - #if ENABLED(USER_CMD_5_ENABLE) + #if HAS_USER_ITEM(5) more_menu.custom5 = MORE_CUSTOM5_TEXT_FR; #endif - #if ENABLED(USER_CMD_6_ENABLE) + #if HAS_USER_ITEM(6) more_menu.custom6 = MORE_CUSTOM6_TEXT_FR; #endif - #if ENABLED(USER_CMD_7_ENABLE) - more_menu.custom7 = MORE_CUSTOM7_TEXT_FR; - #endif // filesys_menu.title = TITLE_FILESYS_FR; filesys_menu.sd_sys = SD_CARD_TEXT_FR; @@ -2338,8 +2370,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_FR; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_FR; eeprom_menu.storeTips = EEPROM_STORE_TIPS_FR; - eeprom_menu.readTips = EEPROM_READ_TIPS_FR; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_FR; + eeprom_menu.readTips = EEPROM_READ_TIPS_FR; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_FR; break; case LANG_ITALY: @@ -2429,27 +2461,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_IT; more_menu.gcode = MORE_GCODE_IT; more_menu.entergcode = MORE_ENTER_GCODE_IT; - #if ENABLED(USER_CMD_1_ENABLE) + #if HAS_USER_ITEM(1) more_menu.custom1 = MORE_CUSTOM1_TEXT_IT; #endif - #if ENABLED(USER_CMD_2_ENABLE) + #if HAS_USER_ITEM(2) more_menu.custom2 = MORE_CUSTOM2_TEXT_IT; #endif - #if ENABLED(USER_CMD_3_ENABLE) + #if HAS_USER_ITEM(3) more_menu.custom3 = MORE_CUSTOM3_TEXT_IT; #endif - #if ENABLED(USER_CMD_4_ENABLE) + #if HAS_USER_ITEM(4) more_menu.custom4 = MORE_CUSTOM4_TEXT_IT; #endif - #if ENABLED(USER_CMD_5_ENABLE) + #if HAS_USER_ITEM(5) more_menu.custom5 = MORE_CUSTOM5_TEXT_IT; #endif - #if ENABLED(USER_CMD_6_ENABLE) + #if HAS_USER_ITEM(6) more_menu.custom6 = MORE_CUSTOM6_TEXT_IT; #endif - #if ENABLED(USER_CMD_7_ENABLE) - more_menu.custom7 = MORE_CUSTOM7_TEXT_IT; - #endif // filesys_menu.title = TITLE_FILESYS_IT; filesys_menu.sd_sys = SD_CARD_TEXT_IT; @@ -2574,8 +2603,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_IT; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_IT; eeprom_menu.storeTips = EEPROM_STORE_TIPS_IT; - eeprom_menu.readTips = EEPROM_READ_TIPS_IT; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_IT; + eeprom_menu.readTips = EEPROM_READ_TIPS_IT; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_IT; break; #endif // if 1 @@ -2667,13 +2696,24 @@ void disp_language_init() { more_menu.title = TITLE_MORE_EN; more_menu.gcode = MORE_GCODE_EN; more_menu.entergcode = MORE_ENTER_GCODE_EN; - TERN_(USER_CMD_1_ENABLE, more_menu.custom1 = MORE_CUSTOM1_TEXT_EN); - TERN_(USER_CMD_2_ENABLE, more_menu.custom2 = MORE_CUSTOM2_TEXT_EN); - TERN_(USER_CMD_3_ENABLE, more_menu.custom3 = MORE_CUSTOM3_TEXT_EN); - TERN_(USER_CMD_4_ENABLE, more_menu.custom4 = MORE_CUSTOM4_TEXT_EN); - TERN_(USER_CMD_5_ENABLE, more_menu.custom5 = MORE_CUSTOM5_TEXT_EN); - TERN_(USER_CMD_6_ENABLE, more_menu.custom6 = MORE_CUSTOM6_TEXT_EN); - TERN_(USER_CMD_7_ENABLE, more_menu.custom7 = MORE_CUSTOM7_TEXT_EN); + #if HAS_USER_ITEM(1) + more_menu.custom1 = MORE_CUSTOM1_TEXT_EN; + #endif + #if HAS_USER_ITEM(2) + more_menu.custom2 = MORE_CUSTOM2_TEXT_EN; + #endif + #if HAS_USER_ITEM(3) + more_menu.custom3 = MORE_CUSTOM3_TEXT_EN; + #endif + #if HAS_USER_ITEM(4) + more_menu.custom4 = MORE_CUSTOM4_TEXT_EN; + #endif + #if HAS_USER_ITEM(5) + more_menu.custom5 = MORE_CUSTOM5_TEXT_EN; + #endif + #if HAS_USER_ITEM(6) + more_menu.custom6 = MORE_CUSTOM6_TEXT_EN; + #endif // filesys_menu.title = TITLE_FILESYS_EN; filesys_menu.sd_sys = SD_CARD_TEXT_EN; @@ -2799,8 +2839,8 @@ void disp_language_init() { eeprom_menu.read = EEPROM_SETTINGS_READ_EN; eeprom_menu.revert = EEPROM_SETTINGS_REVERT_EN; eeprom_menu.storeTips = EEPROM_STORE_TIPS_EN; - eeprom_menu.readTips = EEPROM_READ_TIPS_EN; - eeprom_menu.revertTips = EEPROM_REVERT_TIPS_EN; + eeprom_menu.readTips = EEPROM_READ_TIPS_EN; + eeprom_menu.revertTips = EEPROM_REVERT_TIPS_EN; break; } } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.h b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.h similarity index 98% rename from Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.h rename to Marlin/src/lcd/extui/mks_ui/tft_multi_language.h index 731b2eaecdf9..0d0285f322af 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/tft_multi_language.h +++ b/Marlin/src/lcd/extui/mks_ui/tft_multi_language.h @@ -29,7 +29,7 @@ #include "tft_Language_sp.h" #include "tft_Language_it.h" -extern void disp_language_init(); +void disp_language_init(); #define LANG_SIMPLE_CHINESE 1 #define LANG_COMPLEX_CHINESE 2 @@ -48,7 +48,7 @@ extern void disp_language_init(); #define MULTI_LANGUAGE_ENABLE 1 #define MULTI_LANGUAGE_DISABLE 0 -typedef struct machine_common_disp{ +typedef struct machine_common_disp { const char *default_value; const char *next; @@ -103,7 +103,7 @@ typedef struct machine_common_disp{ const char *LevelingParaConfTitle; const char *LevelingParaConf; - const char *LevelingManuPosConf; + const char *TrammingPosConf; const char *LevelingAutoCommandConf; const char *LevelingAutoZoffsetConf; @@ -706,6 +706,14 @@ typedef struct tool_menu_disp { extern tool_menu_def tool_menu; +typedef struct media_select_menu_disp { + const char *title; + const char *sd_disk; + const char *usb_disk; +} media_select_menu_def; + +extern media_select_menu_def media_select_menu; + typedef struct MachinePara_menu_disp { const char *title; const char *MachineSetting; @@ -734,7 +742,7 @@ typedef struct pause_msg_disp { extern pause_msg_def pause_msg_menu; -typedef struct eeprom_disp{ +typedef struct eeprom_disp { const char *title; const char *store; const char *read; @@ -748,6 +756,7 @@ extern eeprom_def eeprom_menu; /*****************************************/ // #define TEXT_VALUE "%d/%d" +#define TEXT_VALUE_TARGET "%d -> %d" #define TEXT_VALUE_T ": %d℃" #define TEXT_VALUE_mm ": %dmm" diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial.h b/Marlin/src/lcd/extui/mks_ui/wifiSerial.h new file mode 100644 index 000000000000..1a3e9aae9b2d --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial.h @@ -0,0 +1,44 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#ifdef SERIAL_PORT_2 + #error "SERIAL_PORT_2 must be disabled with TFT_LVGL_UI* and MKS_WIFI_MODULE." +#endif + +#define WIFI_BAUDRATE 115200 +#define WIFI_UPLOAD_BAUDRATE 1958400 +#define USART_SAFE_INSERT + +#define WIFI_RX_BUF_SIZE (1024) +#define WIFI_TX_BUF_SIZE (64) + +#include "tft_lvgl_configuration.h" + +#ifdef __STM32F1__ + #include "wifiSerial_STM32F1.h" +#else + #include "wifiSerial_STM32.h" +#endif + +extern WifiSerial WifiSerial1; +#define WIFISERIAL WifiSerial1 diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp new file mode 100644 index 000000000000..6607e7531f0e --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp @@ -0,0 +1,354 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#include "../../../HAL/platforms.h" + +#ifdef HAL_STM32 + +#include "../../../inc/MarlinConfigPre.h" + +#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) + +#include "tft_lvgl_configuration.h" + +#include "draw_ui.h" +#include "wifiSerial.h" + +WifiSerial WifiSerial1(USART1); + +void WifiSerial::setRx(uint32_t _rx) { _serial.pin_rx = digitalPinToPinName(_rx); } +void WifiSerial::setTx(uint32_t _tx) { _serial.pin_tx = digitalPinToPinName(_tx); } +void WifiSerial::setRx(PinName _rx) { _serial.pin_rx = _rx; } +void WifiSerial::setTx(PinName _tx) { _serial.pin_tx = _tx; } + +void WifiSerial::init(PinName _rx, PinName _tx) { + _serial.pin_rx = (_rx == _tx) ? NC : _rx; + _serial.pin_tx = _tx; + _serial.rx_buff = wifiRxBuf; + _serial.rx_head = 0; + _serial.rx_tail = 0; + _serial.tx_buff = wifiTxBuf; + _serial.tx_head = 0; + _serial.tx_tail = 0; +} + +WifiSerial::WifiSerial(void *peripheral) { + // If PIN_SERIALy_RX is not defined assume half-duplex + _serial.pin_rx = NC; + // If Serial is defined in variant set + // the Rx/Tx pins for com port if defined + #if defined(Serial) && defined(PIN_SERIAL_TX) + if ((void *)this == (void *)&Serial) { + #ifdef PIN_SERIAL_RX + setRx(PIN_SERIAL_RX); + #endif + setTx(PIN_SERIAL_TX); + } else + #endif + #if defined(PIN_SERIAL1_TX) && defined(USART1_BASE) + if (peripheral == USART1) { + #ifdef PIN_SERIAL1_RX + setRx(PIN_SERIAL1_RX); + #endif + setTx(PIN_SERIAL1_TX); + } else + #endif + #if defined(PIN_SERIAL2_TX) && defined(USART2_BASE) + if (peripheral == USART2) { + #ifdef PIN_SERIAL2_RX + setRx(PIN_SERIAL2_RX); + #endif + setTx(PIN_SERIAL2_TX); + } else + #endif + #if defined(PIN_SERIAL3_TX) && defined(USART3_BASE) + if (peripheral == USART3) { + #ifdef PIN_SERIAL3_RX + setRx(PIN_SERIAL3_RX); + #endif + setTx(PIN_SERIAL3_TX); + } else + #endif + #ifdef PIN_SERIAL4_TX + if (false + #ifdef USART4_BASE + || peripheral == USART4 + #elif defined(UART4_BASE) + || peripheral == UART4 + #endif + ) { + #ifdef PIN_SERIAL4_RX + setRx(PIN_SERIAL4_RX); + #endif + setTx(PIN_SERIAL4_TX); + } else + #endif + #ifdef PIN_SERIAL5_TX + if (false + #ifdef USART5_BASE + || peripheral == USART5 + #elif defined(UART5_BASE) + || peripheral == UART5 + #endif + ) { + #ifdef PIN_SERIAL5_RX + setRx(PIN_SERIAL5_RX); + #endif + setTx(PIN_SERIAL5_TX); + } else + #endif + #if defined(PIN_SERIAL6_TX) && defined(USART6_BASE) + if (peripheral == USART6) { + #ifdef PIN_SERIAL6_RX + setRx(PIN_SERIAL6_RX); + #endif + setTx(PIN_SERIAL6_TX); + } else + #endif + #ifdef PIN_SERIAL7_TX + if (false + #ifdef USART7_BASE + || peripheral == USART7 + #elif defined(UART7_BASE) + || peripheral == UART7 + #endif + ) { + #ifdef PIN_SERIAL7_RX + setRx(PIN_SERIAL7_RX); + #endif + setTx(PIN_SERIAL7_TX); + } else + #endif + #ifdef PIN_SERIAL8_TX + if (false + #ifdef USART8_BASE + || peripheral == USART8 + #elif defined(UART8_BASE) + || peripheral == UART8 + #endif + ) { + #ifdef PIN_SERIAL8_RX + setRx(PIN_SERIAL8_RX); + #endif + setTx(PIN_SERIAL8_TX); + } else + #endif + #if defined(PIN_SERIAL9_TX) && defined(UART9_BASE) + if (peripheral == UART9) { + #ifdef PIN_SERIAL9_RX + setRx(PIN_SERIAL9_RX); + #endif + setTx(PIN_SERIAL9_TX); + } else + #endif + #ifdef PIN_SERIAL10_TX + if (false + #ifdef USART10_BASE + || peripheral == USART10 + #elif defined(UART10_BASE) + || peripheral == UART10 + #endif + ) { + #ifdef PIN_SERIAL10_RX + setRx(PIN_SERIAL10_RX); + #endif + setTx(PIN_SERIAL10_TX); + } else + #endif + #if defined(PIN_SERIALLP1_TX) && defined(LPUART1_BASE) + if (peripheral == LPUART1) { + #ifdef PIN_SERIALLP1_RX + setRx(PIN_SERIALLP1_RX); + #endif + setTx(PIN_SERIALLP1_TX); + } else + #endif + // else get the pins of the first peripheral occurrence in PinMap + { + _serial.pin_rx = pinmap_pin(peripheral, PinMap_UART_RX); + _serial.pin_tx = pinmap_pin(peripheral, PinMap_UART_TX); + } + //if (halfDuplex == HALF_DUPLEX_ENABLED) _serial.pin_rx = NC; + init(_serial.pin_rx, _serial.pin_tx); +} + +void WifiSerial::flush() { + // If we have never written a byte, no need to flush. This special + // case is needed since there is no way to force the TXC (transmit + // complete) bit to 1 during initialization + if (!_written) return; + + while ((_serial.tx_head != _serial.tx_tail)) { + // nop, the interrupt handler will free up space for us + } + // If we get here, nothing is queued anymore (DRIE is disabled) and + // the hardware finished transmission (TXC is set). +} + +bool WifiSerial::isHalfDuplex() const { return _serial.pin_rx == NC; } + +void WifiSerial::enableHalfDuplexRx() { + if (isHalfDuplex()) { + // In half-duplex mode we have to wait for all TX characters to + // be transmitted before we can receive data. + flush(); + if (!_rx_enabled) { + _rx_enabled = true; + uart_enable_rx(&_serial); + } + } +} + +// Actual interrupt handlers ////////////////////////////////////////////////////////////// + +void WifiSerial::_rx_complete_irq(serial_t *obj) { + // No Parity error, read byte and store it in the buffer if there is room + unsigned char c; + + if (uart_getc(obj, &c) == 0) { + + WRITE(WIFI_IO1_PIN, HIGH); + + rx_buffer_index_t i = (unsigned int)(obj->rx_head + 1) % WIFI_RX_BUF_SIZE; + + // if we should be storing the received character into the location + // just before the tail (meaning that the head would advance to the + // current location of the tail), we're about to overflow the buffer + // and so we don't write the character or advance the head. + if (i != obj->rx_tail) { + obj->rx_buff[obj->rx_head] = c; + obj->rx_head = i; + } + } +} + +// Actual interrupt handlers ////////////////////////////////////////////////////////////// + +int WifiSerial::_tx_complete_irq(serial_t *obj) { + // If interrupts are enabled, there must be more data in the output + // buffer. Send the next byte + obj->tx_tail = (obj->tx_tail + 1) % WIFI_TX_BUF_SIZE; + + return (obj->tx_head == obj->tx_tail) ? -1 : 0; +} + +void WifiSerial::begin(unsigned long baud) { begin(baud, SERIAL_8N1); } + +void WifiSerial::begin(unsigned long baud, byte config) { + uint32_t databits = 0, stopbits = 0, parity = 0; + + _baud = baud; + _config = config; + + // Manage databits + switch (config & 0x07) { + case 0x02: databits = 6; break; + case 0x04: databits = 7; break; + case 0x06: databits = 8; break; + default: databits = 0; break; + } + + if ((config & 0x30) == 0x30) { + parity = UART_PARITY_ODD; + databits++; + } + else if ((config & 0x20) == 0x20) { + parity = UART_PARITY_EVEN; + databits++; + } + else + parity = UART_PARITY_NONE; + + stopbits = ((config & 0x08) == 0x08) ? UART_STOPBITS_2 : UART_STOPBITS_1; + + switch (databits) { + #ifdef UART_WORDLENGTH_7B + case 7: databits = UART_WORDLENGTH_7B; break; + #endif + case 8: databits = UART_WORDLENGTH_8B; break; + case 9: databits = UART_WORDLENGTH_9B; break; + default: + case 0: Error_Handler(); break; + } + + uart_init(&_serial, (uint32_t)baud, databits, parity, stopbits); + enableHalfDuplexRx(); + if (baud == WIFI_BAUDRATE) + uart_attach_rx_callback(&_serial, _rx_complete_irq); + else + USART1->CR1 |= USART_CR1_RE; // Preserve word length, etc. Use 'or' to preserve USART_CR1_M_8N1 +} + +void WifiSerial::end() { + // wait for transmission of outgoing data + flush(); + + uart_deinit(&_serial); + + // clear any received data + _serial.rx_head = _serial.rx_tail; +} + +int WifiSerial::available() { + return ((unsigned int)(WIFI_RX_BUF_SIZE + _serial.rx_head - _serial.rx_tail)) % WIFI_RX_BUF_SIZE; +} + +// +// I/O +// +int WifiSerial::read() { + enableHalfDuplexRx(); + // if the head isn't ahead of the tail, we don't have any characters + if (_serial.rx_head == _serial.rx_tail) return -1; + + unsigned char c = _serial.rx_buff[_serial.rx_tail]; + _serial.rx_tail = (rx_buffer_index_t)(_serial.rx_tail + 1) % WIFI_RX_BUF_SIZE; + return c; +} + +int WifiSerial::write(uint8_t c) { + _written = true; + if (isHalfDuplex()) { + if (_rx_enabled) { + _rx_enabled = false; + uart_enable_tx(&_serial); + } + } + + tx_buffer_index_t i = (_serial.tx_head + 1) % WIFI_TX_BUF_SIZE; + + // If the output buffer is full, there's nothing for it other than to + // wait for the interrupt handler to empty it a bit + while (i == _serial.tx_tail) { + // nop, the interrupt handler will free up space for us + } + + _serial.tx_buff[_serial.tx_head] = c; + _serial.tx_head = i; + + if (!serial_tx_active(&_serial)) + uart_attach_tx_callback(&_serial, _tx_complete_irq); + + return 1; +} + +#endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE +#endif // HAL_STM32 diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h new file mode 100644 index 000000000000..cf32bad3969c --- /dev/null +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h @@ -0,0 +1,63 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include +#include "Stream.h" +#include "uart.h" + +class WifiSerial { + protected: + // Has any byte been written to the UART since begin() + bool _written; + serial_t _serial; + public: + uint8_t wifiRxBuf[WIFI_RX_BUF_SIZE]; + uint8_t wifiTxBuf[WIFI_TX_BUF_SIZE]; + WifiSerial(void *peripheral); + + // Set up / tear down + void begin(uint32_t baud); + void begin(uint32_t baud, uint8_t config); + void end(); + int available(void); + int read(void); + int write(uint8_t); + + // Interrupt handlers + static int _tx_complete_irq(serial_t *obj); + static void _rx_complete_irq(serial_t *obj); + + void flush(void); + bool isHalfDuplex(void) const; + void enableHalfDuplexRx(void); + + private: + void setRx(uint32_t _rx); + void setTx(uint32_t _tx); + void setRx(PinName _rx); + void setTx(PinName _tx); + void init(PinName _rx, PinName _tx); + bool _rx_enabled; + uint8_t _config; + unsigned long _baud; +}; diff --git a/Marlin/src/lcd/extui/lib/mks_ui/wifiSerial.cpp b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp similarity index 85% rename from Marlin/src/lcd/extui/lib/mks_ui/wifiSerial.cpp rename to Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp index 9e528821d7c3..654fca6cb334 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/wifiSerial.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.cpp @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm @@ -19,13 +19,13 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" +#ifdef __STM32F1__ -#if HAS_TFT_LVGL_UI +#include "../../../inc/MarlinConfigPre.h" -#include "tft_lvgl_configuration.h" +#if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) -#if ENABLED(MKS_WIFI_MODULE) +#include "tft_lvgl_configuration.h" #include "draw_ui.h" #include "wifiSerial.h" @@ -36,7 +36,7 @@ #include #include -#include "../../../../MarlinCore.h" +#include "../../../MarlinCore.h" DEFINE_WFSERIAL(WifiSerial1, 1); @@ -59,19 +59,20 @@ WifiSerial::WifiSerial(usart_dev *usart_device, uint8 tx_pin, uint8 rx_pin) { if (with_irq) usart_enable(usart_device); else { usart_reg_map *regs = usart_device->regs; - regs->CR1 |= (USART_CR1_TE | USART_CR1_RE); // don't change the word length etc, and 'or' in the pattern not overwrite |USART_CR1_M_8N1); + regs->CR1 |= (USART_CR1_TE | USART_CR1_RE); // Preserve word length, etc. Use 'or' to preserve USART_CR1_M_8N1 regs->CR1 |= USART_CR1_UE; } } #elif STM32_MCU_SERIES == STM32_SERIES_F2 || STM32_MCU_SERIES == STM32_SERIES_F4 - #define disable_timer_if_necessary(dev, ch) ((void)0) + #define disable_timer_if_necessary(dev, ch) NOOP static void usart_enable_no_irq(usart_dev *usart_device, bool with_irq) { - if (with_irq) usart_enable(usart_device); + if (with_irq) + usart_enable(usart_device); else { usart_reg_map *regs = usart_device->regs; - regs->CR1 |= (USART_CR1_TE | USART_CR1_RE); // don't change the word length etc, and 'or' in the pattern not overwrite |USART_CR1_M_8N1); + regs->CR1 |= (USART_CR1_TE | USART_CR1_RE); // Preserve word length, etc. Use 'or' to preserve USART_CR1_M_8N1 regs->CR1 |= USART_CR1_UE; } } @@ -137,5 +138,5 @@ int WifiSerial::wifi_rb_is_full() { return rb_is_full(this->usart_device->rb); } -#endif // MKS_WIFI_MODULE -#endif // HAS_TFT_LVGL_UI +#endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE +#endif // __STM32F1__ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/wifiSerial.h b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.h similarity index 73% rename from Marlin/src/lcd/extui/lib/mks_ui/wifiSerial.h rename to Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.h index fcc35a6a657c..d0fee4e3ac0b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/wifiSerial.h +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32F1.h @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm @@ -21,20 +21,6 @@ */ #pragma once -#include "tft_lvgl_configuration.h" - -#if ENABLED(MKS_WIFI_MODULE) - -#ifdef SERIAL_PORT_2 - #error "SERIAL_PORT_2 must be disabled with TFT_LVGL_UI* and MKS_WIFI_MODULE." -#endif - -#define WIFI_BAUDRATE 115200 -#define WIFI_UPLOAD_BAUDRATE 1958400 -#define USART_SAFE_INSERT - -#define WIFI_RX_BUF_SIZE (1024+1) - #include #include #include @@ -42,10 +28,7 @@ #include #include -#define DEFINE_WFSERIAL(name, n)\ - WifiSerial name(USART##n, \ - BOARD_USART##n##_TX_PIN, \ - BOARD_USART##n##_RX_PIN) +#define DEFINE_WFSERIAL(name, n) WifiSerial name(USART##n, BOARD_USART##n##_TX_PIN, BOARD_USART##n##_RX_PIN) class WifiSerial { public: @@ -56,7 +39,7 @@ class WifiSerial { /* Set up/tear down */ void begin(uint32 baud); - void begin(uint32 baud,uint8_t config); + void begin(uint32 baud, uint8_t config); void end(); int available(); int read(); @@ -71,7 +54,7 @@ class WifiSerial { if ((regs->CR1 & USART_CR1_RXNEIE) && (regs->SR & USART_SR_RXNE)) { #ifdef USART_SAFE_INSERT /* If the buffer is full and the user defines USART_SAFE_INSERT, - * ignore new bytes. */ + * ignore new bytes. */ rb_safe_insert(this->usart_device->rb, (uint8)regs->DR); #else /* By default, push bytes around in the ring buffer. */ @@ -81,22 +64,14 @@ class WifiSerial { /* TXE signifies readiness to send a byte to DR. */ if ((regs->CR1 & USART_CR1_TXEIE) && (regs->SR & USART_SR_TXE)) { if (!rb_is_empty(this->usart_device->wb)) - regs->DR=rb_remove(this->usart_device->wb); + regs->DR = rb_remove(this->usart_device->wb); else - regs->CR1 &= ~((uint32)USART_CR1_TXEIE); // disable TXEIE + regs->CR1 &= ~((uint32)USART_CR1_TXEIE); // disable TXEIE } } - int wifi_rb_is_full(); - struct usart_dev *usart_device; - private: + private: uint8 tx_pin; uint8 rx_pin; }; - -extern WifiSerial WifiSerial1; - -#define WIFISERIAL WifiSerial1 - -#endif // MKS_WIFI_MODULE diff --git a/Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp similarity index 65% rename from Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp rename to Marlin/src/lcd/extui/mks_ui/wifi_module.cpp index 785e854c520e..e4140edc793b 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) @@ -28,42 +29,39 @@ #include "wifi_upload.h" #include "SPI_TFT.h" -#include "../../../../MarlinCore.h" -#include "../../../../module/temperature.h" -#include "../../../../gcode/queue.h" -#include "../../../../gcode/gcode.h" -#include "../../../../lcd/marlinui.h" -#include "../../../../sd/cardreader.h" -#include "../../../../module/planner.h" -#include "../../../../module/servo.h" -#include "../../../../module/probe.h" +#include "../../marlinui.h" + +#include "../../../MarlinCore.h" +#include "../../../module/temperature.h" +#include "../../../gcode/queue.h" +#include "../../../gcode/gcode.h" +#include "../../../sd/cardreader.h" +#include "../../../module/planner.h" +#include "../../../module/servo.h" +#include "../../../module/probe.h" #if DISABLED(EMERGENCY_PARSER) - #include "../../../../module/motion.h" + #include "../../../module/motion.h" #endif #if ENABLED(POWER_LOSS_RECOVERY) - #include "../../../../feature/powerloss.h" + #include "../../../feature/powerloss.h" #endif #if ENABLED(PARK_HEAD_ON_PAUSE) - #include "../../../../feature/pause.h" + #include "../../../feature/pause.h" #endif #define WIFI_SET() WRITE(WIFI_RESET_PIN, HIGH); #define WIFI_RESET() WRITE(WIFI_RESET_PIN, LOW); -#define WIFI_IO1_SET() WRITE(WIFI_IO1_PIN, HIGH); -#define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW); +#define WIFI_IO1_SET() WRITE(WIFI_IO1_PIN, HIGH); +#define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW); -extern uint8_t Explore_Disk (char* path , uint8_t recu_level); +extern uint8_t Explore_Disk(char *path, uint8_t recu_level); extern uint8_t commands_in_queue; extern uint8_t sel_id; +extern unsigned int getTickDiff(unsigned int curTick, unsigned int lastTick); -int usartFifoAvailable(SZ_USART_FIFO *fifo); -int readUsartFifo(SZ_USART_FIFO *fifo, int8_t *buf, int32_t len); -int writeUsartFifo(SZ_USART_FIFO * fifo, int8_t * buf, int32_t len); -extern unsigned int getTickDiff(unsigned int curTick, unsigned int lastTick); - -volatile SZ_USART_FIFO WifiRxFifo; +volatile SZ_USART_FIFO WifiRxFifo; #define WAIT_ESP_TRANS_TIMEOUT_TICK 10500 @@ -78,12 +76,12 @@ extern uint8_t pause_resum; uint8_t wifi_connect_flg = 0; extern volatile uint8_t get_temp_flag; -#define WIFI_MODE 2 +#define WIFI_MODE 2 #define WIFI_AP_MODE 3 int upload_result = 0; -uint32_t upload_time = 0; +uint32_t upload_time_sec = 0; uint32_t upload_size = 0; volatile WIFI_STATE wifi_link_state; @@ -119,29 +117,19 @@ extern bool flash_dma_mode; uint32_t getWifiTick() { return millis(); } uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick) { - if (lastTick <= curTick) - return (curTick - lastTick) * TICK_CYCLE; - else - return (0xFFFFFFFF - lastTick + curTick) * TICK_CYCLE; + return (lastTick <= curTick ? curTick - lastTick : 0xFFFFFFFF - lastTick + curTick) * TICK_CYCLE; } void wifi_delay(int n) { - uint32_t begin = getWifiTick(); - uint32_t end = begin; - while (getWifiTickDiff(begin, end) < (uint32_t)n) { + const uint32_t start = getWifiTick(); + while (getWifiTickDiff(start, getWifiTick()) < (uint32_t)n) watchdog_refresh(); - end = getWifiTick(); - } } void wifi_reset() { - uint32_t start, now; - start = getWifiTick(); - now = start; + uint32_t start = getWifiTick(); WIFI_RESET(); - while (getWifiTickDiff(start, now) < 500) - now = getWifiTick(); - + while (getWifiTickDiff(start, getWifiTick()) < 500) { /* nada */ } WIFI_SET(); } @@ -153,82 +141,83 @@ void mount_file_sys(uint8_t disk_type) { } } -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - -void changeFlashMode(const bool dmaMode) { - if (flash_dma_mode != dmaMode) { - flash_dma_mode = dmaMode; - if (!flash_dma_mode) { - dma_disable(DMA1, DMA_CH5); - dma_clear_isr_bits(DMA1, DMA_CH4); - } - } -} +static bool longName2DosName(const char *longName, char *dosName) { + uint8_t i = FILENAME_LENGTH; + while (i) dosName[--i] = '\0'; -static bool longName2DosName(const char *longName, uint8_t *dosName) { - uint8_t i; - for (i = FILENAME_LENGTH; i--;) dosName[i] = '\0'; while (*longName) { uint8_t c = *longName++; if (c == '.') { // For a dot... if (i == 0) return false; - strcat_P((char *)dosName, PSTR(".GCO")); - break; + strcat_P(dosName, PSTR(".GCO")); + return dosName[0] != '\0'; } else { - if (c < 0x21 || c == 0x7F) return false; // Check size, non-printable characters // Fail for illegal characters PGM_P p = PSTR("|<>^+=?/[];,*\"\\"); - while (const uint8_t b = pgm_read_byte(p++)) if (b == c) return false; - dosName[i++] = c + (WITHIN(c, 'a', 'z') ? 'A' - 'a' : 0); // Uppercase required for 8.3 name + while (uint8_t b = pgm_read_byte(p++)) if (b == c) return false; + if (c < 0x21 || c == 0x7F) return false; // Check size, non-printable characters + dosName[i++] = (c < 'a' || c > 'z') ? (c) : (c + ('A' - 'a')); // Uppercase required for 8.3 name } if (i >= 5) { - strcat_P((char *)dosName, PSTR("~1.GCO")); - break; + strcat_P(dosName, PSTR("~1.GCO")); + return dosName[0] != '\0'; } } return dosName[0] != '\0'; // Return true if any name was set } -static int storeRcvData(volatile uint8_t *bufToCpy, int32_t len) { - unsigned char tmpW = wifiDmaRcvFifo.write_cur; +#ifdef __STM32F1__ + + #include + #include + #include - if (len > UDISKBUFLEN) return 0; + #include + #include - if (wifiDmaRcvFifo.state[tmpW] == udisk_buf_empty) { - memcpy((unsigned char *) wifiDmaRcvFifo.bufferAddr[tmpW], (uint8_t *)bufToCpy, len); - wifiDmaRcvFifo.state[tmpW] = udisk_buf_full; - wifiDmaRcvFifo.write_cur = (tmpW + 1) % TRANS_RCV_FIFO_BLOCK_NUM; - return 1; + #include + #include + + #include + #include + #include + #include + + void changeFlashMode(const bool dmaMode) { + if (flash_dma_mode != dmaMode) { + flash_dma_mode = dmaMode; + if (!flash_dma_mode) { + dma_disable(DMA1, DMA_CH5); + dma_clear_isr_bits(DMA1, DMA_CH4); + } + } + } + + static int storeRcvData(volatile uint8_t *bufToCpy, int32_t len) { + unsigned char tmpW = wifiDmaRcvFifo.write_cur; + if (len > UDISKBUFLEN) return 0; + if (wifiDmaRcvFifo.state[tmpW] == udisk_buf_empty) { + memcpy((unsigned char *) wifiDmaRcvFifo.bufferAddr[tmpW], (uint8_t *)bufToCpy, len); + wifiDmaRcvFifo.state[tmpW] = udisk_buf_full; + wifiDmaRcvFifo.write_cur = (tmpW + 1) % TRANS_RCV_FIFO_BLOCK_NUM; + return 1; + } + return 0; } - return 0; -} -static void esp_dma_pre() { - dma_channel_reg_map *channel_regs = dma_tube_regs(DMA1, DMA_CH5); + static void esp_dma_pre() { + dma_channel_reg_map *channel_regs = dma_tube_regs(DMA1, DMA_CH5); - CBI32(channel_regs->CCR, 0); - channel_regs->CMAR = (uint32_t)WIFISERIAL.usart_device->rb->buf; - channel_regs->CNDTR = 0x0000; - channel_regs->CNDTR = UART_RX_BUFFER_SIZE; - DMA1->regs->IFCR = 0xF0000; - SBI32(channel_regs->CCR, 0); -} + CBI32(channel_regs->CCR, 0); + channel_regs->CMAR = (uint32_t)WIFISERIAL.usart_device->rb->buf; + channel_regs->CNDTR = 0x0000; + channel_regs->CNDTR = UART_RX_BUFFER_SIZE; + DMA1->regs->IFCR = 0xF0000; + SBI32(channel_regs->CCR, 0); + } -static void dma_ch5_irq_handle() { + static void dma_ch5_irq_handle() { uint8 status_bits = dma_get_isr_bits(DMA1, DMA_CH5); dma_clear_isr_bits(DMA1, DMA_CH5); if (status_bits & 0x8) { @@ -237,7 +226,7 @@ static void dma_ch5_irq_handle() { else if (status_bits & 0x2) { // DMA transmit complete if (esp_state == TRANSFER_IDLE) - esp_state = TRANSFERING; + esp_state = TRANSFERRING; if (storeRcvData(WIFISERIAL.usart_device->rb->buf, UART_RX_BUFFER_SIZE)) { esp_dma_pre(); @@ -253,74 +242,329 @@ static void dma_ch5_irq_handle() { // DMA transmit half WIFI_IO1_SET(); } -} - -static void wifi_usart_dma_init() { - dma_init(DMA1); - uint32_t flags = ( DMA_MINC_MODE | DMA_TRNS_CMPLT | DMA_HALF_TRNS | DMA_TRNS_ERR); - dma_xfer_size dma_bit_size = DMA_SIZE_8BITS; - dma_setup_transfer(DMA1, DMA_CH5, &USART1_BASE->DR, dma_bit_size, - (volatile void*)WIFISERIAL.usart_device->rb->buf, dma_bit_size, flags);// Transmit buffer DMA - dma_set_priority(DMA1, DMA_CH5, DMA_PRIORITY_LOW); - dma_attach_interrupt(DMA1, DMA_CH5, &dma_ch5_irq_handle); - - dma_clear_isr_bits(DMA1, DMA_CH5); - dma_set_num_transfers(DMA1, DMA_CH5, UART_RX_BUFFER_SIZE); + } - bb_peri_set_bit(&USART1_BASE->CR3, USART_CR3_DMAR_BIT, 1); - dma_enable(DMA1, DMA_CH5); // enable transmit + static void wifi_usart_dma_init() { + dma_init(DMA1); + uint32_t flags = ( DMA_MINC_MODE | DMA_TRNS_CMPLT | DMA_HALF_TRNS | DMA_TRNS_ERR); + dma_xfer_size dma_bit_size = DMA_SIZE_8BITS; + dma_setup_transfer(DMA1, DMA_CH5, &USART1_BASE->DR, dma_bit_size, + (volatile void*)WIFISERIAL.usart_device->rb->buf, dma_bit_size, flags);// Transmit buffer DMA + dma_set_priority(DMA1, DMA_CH5, DMA_PRIORITY_LOW); + dma_attach_interrupt(DMA1, DMA_CH5, &dma_ch5_irq_handle); - for (uint8_t i = 0; i < TRANS_RCV_FIFO_BLOCK_NUM; i++) { - wifiDmaRcvFifo.bufferAddr[i] = &bmp_public_buf[1024 * i]; - wifiDmaRcvFifo.state[i] = udisk_buf_empty; - } + dma_clear_isr_bits(DMA1, DMA_CH5); + dma_set_num_transfers(DMA1, DMA_CH5, UART_RX_BUFFER_SIZE); - memset(wifiDmaRcvFifo.bufferAddr[0], 0, 1024 * TRANS_RCV_FIFO_BLOCK_NUM); - wifiDmaRcvFifo.read_cur = 0; - wifiDmaRcvFifo.write_cur = 0; -} + bb_peri_set_bit(&USART1_BASE->CR3, USART_CR3_DMAR_BIT, 1); + dma_enable(DMA1, DMA_CH5); // enable transmit -void esp_port_begin(uint8_t interrupt) { - WifiRxFifo.uart_read_point = 0; - WifiRxFifo.uart_write_point = 0; + for (uint8_t i = 0; i < TRANS_RCV_FIFO_BLOCK_NUM; i++) { + wifiDmaRcvFifo.bufferAddr[i] = &bmp_public_buf[1024 * i]; + wifiDmaRcvFifo.state[i] = udisk_buf_empty; + } - #if 1 + memset(wifiDmaRcvFifo.bufferAddr[0], 0, 1024 * TRANS_RCV_FIFO_BLOCK_NUM); + wifiDmaRcvFifo.read_cur = 0; + wifiDmaRcvFifo.write_cur = 0; + } + void esp_port_begin(uint8_t interrupt) { + WifiRxFifo.uart_read_point = 0; + WifiRxFifo.uart_write_point = 0; #if ENABLED(MKS_WIFI_MODULE) - WIFISERIAL.end(); if (interrupt) { + WIFISERIAL.end(); for (uint16_t i = 0; i < 65535; i++) { /*nada*/ } WIFISERIAL.begin(WIFI_BAUDRATE); millis_t serial_connect_timeout = millis() + 1000UL; while (PENDING(millis(), serial_connect_timeout)) { /*nada*/ } } else { + WIFISERIAL.end(); WIFISERIAL.usart_device->regs->CR1 &= ~USART_CR1_RXNEIE; WIFISERIAL.begin(WIFI_UPLOAD_BAUDRATE); wifi_usart_dma_init(); } #endif + } - #else +#else // !__STM32F1__ - #if MKS_WIFI_MODULE - WIFISERIAL.end(); - for (uint16_t i = 0; i < 65535; i++) { /*nada*/ } - WIFISERIAL.begin(interrupt ? WIFI_BAUDRATE : WIFI_UPLOAD_BAUDRATE); - millis_t serial_connect_timeout = millis() + 1000UL; - while (PENDING(millis(), serial_connect_timeout)) { /*nada*/ } - #endif - if (!interrupt) wifi_usart_dma_init(); + DMA_HandleTypeDef wifiUsartDMArx; + + void changeFlashMode(const bool dmaMode) { + if (flash_dma_mode != dmaMode) { + flash_dma_mode = dmaMode; + if (flash_dma_mode == 1) { + } + else { + } + } + } + + #ifdef STM32F1xx + + HAL_StatusTypeDef HAL_DMA_PollForTransferCustomize(DMA_HandleTypeDef *hdma, uint32_t CompleteLevel, uint32_t Timeout) { + uint32_t temp; + uint32_t tickstart = 0U; + + if (HAL_DMA_STATE_BUSY != hdma->State) { // No transfer ongoing + hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; + __HAL_UNLOCK(hdma); + return HAL_ERROR; + } + // Polling mode not supported in circular mode + if (RESET != (hdma->Instance->CCR & DMA_CCR_CIRC)) { + hdma->ErrorCode = HAL_DMA_ERROR_NOT_SUPPORTED; + return HAL_ERROR; + } + + // Get the level transfer complete flag + temp = (CompleteLevel == HAL_DMA_FULL_TRANSFER + ? __HAL_DMA_GET_TC_FLAG_INDEX(hdma) // Transfer Complete flag + : __HAL_DMA_GET_HT_FLAG_INDEX(hdma) // Half Transfer Complete flag + ); + + // Get tick + tickstart = HAL_GetTick(); + + while (__HAL_DMA_GET_FLAG(hdma, temp) == RESET) { + if ((__HAL_DMA_GET_FLAG(hdma, __HAL_DMA_GET_HT_FLAG_INDEX(hdma)) != RESET)) { + __HAL_DMA_CLEAR_FLAG(hdma, __HAL_DMA_GET_HT_FLAG_INDEX(hdma)); // Clear the half transfer complete flag + WIFI_IO1_SET(); + } + + if ((__HAL_DMA_GET_FLAG(hdma, __HAL_DMA_GET_TE_FLAG_INDEX(hdma)) != RESET)) { + /** + * When a DMA transfer error occurs + * A hardware clear of its EN bits is performed + * Clear all flags + */ + hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << hdma->ChannelIndex); + + SET_BIT(hdma->ErrorCode, HAL_DMA_ERROR_TE); // Update error code + hdma->State= HAL_DMA_STATE_READY; // Change the DMA state + __HAL_UNLOCK(hdma); // Process Unlocked + return HAL_ERROR; + } + + // Check for the Timeout + if (Timeout != HAL_MAX_DELAY && (!Timeout || (HAL_GetTick() - tickstart) > Timeout)) { + SET_BIT(hdma->ErrorCode, HAL_DMA_ERROR_TIMEOUT); // Update error code + hdma->State = HAL_DMA_STATE_READY; // Change the DMA state + __HAL_UNLOCK(hdma); // Process Unlocked + return HAL_ERROR; + } + } + + if (CompleteLevel == HAL_DMA_FULL_TRANSFER) { + // Clear the transfer complete flag + __HAL_DMA_CLEAR_FLAG(hdma, __HAL_DMA_GET_TC_FLAG_INDEX(hdma)); + + /* The selected Channelx EN bit is cleared (DMA is disabled and + all transfers are complete) */ + hdma->State = HAL_DMA_STATE_READY; + } + else + __HAL_DMA_CLEAR_FLAG(hdma, __HAL_DMA_GET_HT_FLAG_INDEX(hdma)); // Clear the half transfer complete flag + + __HAL_UNLOCK(hdma); // Process unlocked + + return HAL_OK; + } + + #else // !STM32F1xx + + typedef struct { + __IO uint32_t ISR; //!< DMA interrupt status register + __IO uint32_t Reserved0; + __IO uint32_t IFCR; //!< DMA interrupt flag clear register + } MYDMA_Base_Registers; + + HAL_StatusTypeDef HAL_DMA_PollForTransferCustomize(DMA_HandleTypeDef *hdma, HAL_DMA_LevelCompleteTypeDef CompleteLevel, uint32_t Timeout) { + HAL_StatusTypeDef status = HAL_OK; + uint32_t mask_cpltlevel; + uint32_t tickstart = HAL_GetTick(); + uint32_t tmpisr; + + MYDMA_Base_Registers *regs; // Calculate DMA base and stream number + + if (HAL_DMA_STATE_BUSY != hdma->State) { // No transfer ongoing + hdma->ErrorCode = HAL_DMA_ERROR_NO_XFER; + __HAL_UNLOCK(hdma); + return HAL_ERROR; + } + + // Polling mode not supported in circular mode and double buffering mode + if ((hdma->Instance->CR & DMA_SxCR_CIRC) != RESET) { + hdma->ErrorCode = HAL_DMA_ERROR_NOT_SUPPORTED; + return HAL_ERROR; + } + + // Get the level transfer complete flag + mask_cpltlevel = (CompleteLevel == HAL_DMA_FULL_TRANSFER + ? DMA_FLAG_TCIF0_4 << hdma->StreamIndex // Transfer Complete flag + : DMA_FLAG_HTIF0_4 << hdma->StreamIndex // Half Transfer Complete flag + ); + + regs = (MYDMA_Base_Registers *)hdma->StreamBaseAddress; + tmpisr = regs->ISR; + + while (((tmpisr & mask_cpltlevel) == RESET) && ((hdma->ErrorCode & HAL_DMA_ERROR_TE) == RESET)) { + // Check for the Timeout (Not applicable in circular mode) + if (Timeout != HAL_MAX_DELAY) { + if (!Timeout || (HAL_GetTick() - tickstart) > Timeout) { + hdma->ErrorCode = HAL_DMA_ERROR_TIMEOUT; // Update error code + __HAL_UNLOCK(hdma); // Process Unlocked + hdma->State = HAL_DMA_STATE_READY; // Change the DMA state + return HAL_TIMEOUT; + } + } + + tmpisr = regs->ISR; // Get the ISR register value + + if ((tmpisr & (DMA_FLAG_HTIF0_4 << hdma->StreamIndex)) != RESET) { + regs->IFCR = DMA_FLAG_HTIF0_4 << hdma->StreamIndex; // Clear the Direct Mode error flag + WIFI_IO1_SET(); + } + + if ((tmpisr & (DMA_FLAG_TEIF0_4 << hdma->StreamIndex)) != RESET) { + hdma->ErrorCode |= HAL_DMA_ERROR_TE; // Update error code + regs->IFCR = DMA_FLAG_TEIF0_4 << hdma->StreamIndex; // Clear the transfer error flag + } + + if ((tmpisr & (DMA_FLAG_FEIF0_4 << hdma->StreamIndex)) != RESET) { + hdma->ErrorCode |= HAL_DMA_ERROR_FE; // Update error code + regs->IFCR = DMA_FLAG_FEIF0_4 << hdma->StreamIndex; // Clear the FIFO error flag + } + + if ((tmpisr & (DMA_FLAG_DMEIF0_4 << hdma->StreamIndex)) != RESET) { + hdma->ErrorCode |= HAL_DMA_ERROR_DME; // Update error code + regs->IFCR = DMA_FLAG_DMEIF0_4 << hdma->StreamIndex; // Clear the Direct Mode error flag + } + } + + if (hdma->ErrorCode != HAL_DMA_ERROR_NONE && (hdma->ErrorCode & HAL_DMA_ERROR_TE) != RESET) { + HAL_DMA_Abort(hdma); + regs->IFCR = (DMA_FLAG_HTIF0_4 | DMA_FLAG_TCIF0_4) << hdma->StreamIndex; // Clear the half transfer and transfer complete flags + __HAL_UNLOCK(hdma); // Process Unlocked + hdma->State= HAL_DMA_STATE_READY; // Change the DMA state + return HAL_ERROR; + } + + // Get the level transfer complete flag + if (CompleteLevel == HAL_DMA_FULL_TRANSFER) { + regs->IFCR = (DMA_FLAG_HTIF0_4 | DMA_FLAG_TCIF0_4) << hdma->StreamIndex; // Clear the half transfer and transfer complete flags + __HAL_UNLOCK(hdma); // Process Unlocked + hdma->State = HAL_DMA_STATE_READY; + } + else + regs->IFCR = (DMA_FLAG_HTIF0_4) << hdma->StreamIndex; // Clear the half transfer and transfer complete flags + + return status; + } #endif -} + + static void dmaTransmitBegin() { + wifiUsartDMArx.Init.MemInc = DMA_MINC_ENABLE; + if (HAL_DMA_Init((DMA_HandleTypeDef *)&wifiUsartDMArx) != HAL_OK) + Error_Handler(); + + if (HAL_DMA_Start(&wifiUsartDMArx, (uint32_t)&(USART1->DR), (uint32_t)WIFISERIAL.wifiRxBuf, UART_RX_BUFFER_SIZE)) + Error_Handler(); + + USART1->CR1 |= USART_CR1_UE; + + SET_BIT(USART1->CR3, USART_CR3_DMAR); + WIFI_IO1_RESET(); + } + + static int storeRcvData(volatile uint8_t *bufToCpy, int32_t len) { + unsigned char tmpW = wifiDmaRcvFifo.write_cur; + + if (len > UDISKBUFLEN) return 0; + + if (wifiDmaRcvFifo.state[tmpW] == udisk_buf_empty) { + const int timeOut = 2000; // millisecond + dmaTransmitBegin(); + if (HAL_DMA_PollForTransferCustomize(&wifiUsartDMArx, HAL_DMA_FULL_TRANSFER, timeOut) == HAL_OK) { + memcpy((unsigned char *) wifiDmaRcvFifo.bufferAddr[tmpW], (uint8_t *)bufToCpy, len); + wifiDmaRcvFifo.state[tmpW] = udisk_buf_full; + wifiDmaRcvFifo.write_cur = (tmpW + 1) % TRANS_RCV_FIFO_BLOCK_NUM; + return 1; + } + } + return 0; + } + + static void wifi_usart_dma_init() { + #ifdef STM32F1xx + __HAL_RCC_DMA1_CLK_ENABLE(); + wifiUsartDMArx.Instance = DMA1_Channel5; + #else + __HAL_RCC_DMA2_CLK_ENABLE(); + wifiUsartDMArx.Instance = DMA2_Stream2; + wifiUsartDMArx.Init.Channel = DMA_CHANNEL_4; + #endif + wifiUsartDMArx.Init.Direction = DMA_PERIPH_TO_MEMORY; + wifiUsartDMArx.Init.PeriphInc = DMA_PINC_DISABLE; + wifiUsartDMArx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; + wifiUsartDMArx.Init.MemDataAlignment = DMA_PDATAALIGN_BYTE; + wifiUsartDMArx.Init.Mode = DMA_NORMAL; + #ifdef STM32F4xx + wifiUsartDMArx.Init.FIFOMode = DMA_FIFOMODE_DISABLE; + #endif + wifiUsartDMArx.Init.MemInc = DMA_MINC_ENABLE; + if (HAL_DMA_Init((DMA_HandleTypeDef *)&wifiUsartDMArx) != HAL_OK) + Error_Handler(); + + if (HAL_DMA_Start(&wifiUsartDMArx, (uint32_t)&(USART1->DR), (uint32_t)WIFISERIAL.wifiRxBuf, UART_RX_BUFFER_SIZE)) + Error_Handler(); + + USART1->CR1 |= USART_CR1_UE; + + SET_BIT(USART1->CR3, USART_CR3_DMAR); // Enable Rx DMA Request + + for (uint8_t i = 0; i < TRANS_RCV_FIFO_BLOCK_NUM; i++) { + wifiDmaRcvFifo.bufferAddr[i] = &bmp_public_buf[1024 * i]; + wifiDmaRcvFifo.state[i] = udisk_buf_empty; + } + + memset(wifiDmaRcvFifo.bufferAddr[0], 0, 1024 * TRANS_RCV_FIFO_BLOCK_NUM); + wifiDmaRcvFifo.read_cur = 0; + wifiDmaRcvFifo.write_cur = 0; + } + + void esp_port_begin(uint8_t interrupt) { + WifiRxFifo.uart_read_point = 0; + WifiRxFifo.uart_write_point = 0; + + #if ENABLED(MKS_WIFI_MODULE) + if (interrupt) { + WIFISERIAL.end(); + for (uint16_t i = 0; i < 65535; i++) { /*nada*/ } + WIFISERIAL.begin(WIFI_BAUDRATE); + uint32_t serial_connect_timeout = millis() + 1000UL; + while (PENDING(millis(), serial_connect_timeout)) { /*nada*/ } + } + else { + WIFISERIAL.end(); + USART1->CR1 &= ~USART_CR1_RXNEIE; + WIFISERIAL.begin(WIFI_UPLOAD_BAUDRATE); + wifi_usart_dma_init(); + } + #endif + } + +#endif // !__STM32F1__ #if ENABLED(MKS_WIFI_MODULE) int raw_send_to_wifi(uint8_t *buf, int len) { if (buf == 0 || len <= 0) return 0; - for (int i = 0; i < len; i++) - WIFISERIAL.write(*(buf + i)); + for (int i = 0; i < len; i++) WIFISERIAL.write(*(buf + i)); return len; } @@ -335,9 +579,9 @@ int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len) { uint8_t wifi_ret_tail = 0xFC; if (type == WIFI_PARA_SET) { - int data_offset = 4; - int apLen = strlen((const char *)uiCfg.wifi_name); - int keyLen = strlen((const char *)uiCfg.wifi_key); + int data_offset = 4, + apLen = strlen((const char *)uiCfg.wifi_name), + keyLen = strlen((const char *)uiCfg.wifi_key); ZERO(buf_to_wifi); index_to_wifi = 0; @@ -368,18 +612,18 @@ int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len) { return 0; } - if (len > 0) { + if (len > 0) { memcpy(&buf_to_wifi[4 + index_to_wifi], buf, len); index_to_wifi += len; if (index_to_wifi < 1) return 0; - if (buf_to_wifi[index_to_wifi + 3] == '\n') { + if (buf_to_wifi[index_to_wifi + 3] == '\n') { // mask "wait" "busy" "X:" - if (((buf_to_wifi[4] == 'w') && (buf_to_wifi[5] == 'a') && (buf_to_wifi[6] == 'i') && (buf_to_wifi[7] == 't') ) - || ((buf_to_wifi[4] == 'b') && (buf_to_wifi[5] == 'u') && (buf_to_wifi[6] == 's') && (buf_to_wifi[7] == 'y') ) - || ((buf_to_wifi[4] == 'X') && (buf_to_wifi[5] == ':') ) + if ( ((buf_to_wifi[4] == 'w') && (buf_to_wifi[5] == 'a') && (buf_to_wifi[6] == 'i') && (buf_to_wifi[7] == 't')) + || ((buf_to_wifi[4] == 'b') && (buf_to_wifi[5] == 'u') && (buf_to_wifi[6] == 's') && (buf_to_wifi[7] == 'y')) + || ((buf_to_wifi[4] == 'X') && (buf_to_wifi[5] == ':')) ) { ZERO(buf_to_wifi); index_to_wifi = 0; @@ -457,6 +701,7 @@ int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len) { return 1; } + #define SEND_OK_TO_WIFI send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n")) int send_to_wifi(uint8_t *buf, int len) { return package_to_wifi(WIFI_TRANS_INF, buf, len); } @@ -505,7 +750,7 @@ int write_to_file(char *buf, int len) { if (res == -1) { upload_file.close(); - const char * const fname = card.diveToFile(true, upload_curDir, saveFilePath); + const char * const fname = card.diveToFile(false, upload_curDir, saveFilePath); if (upload_file.open(upload_curDir, fname, O_WRITE)) { upload_file.setpos(&pos); @@ -523,21 +768,21 @@ int write_to_file(char *buf, int len) { if (res == -1) { ZERO(public_buf); file_writer.write_index = 0; - return -1; + return -1; } return 0; } -#define ESP_PROTOC_HEAD (uint8_t)0xA5 -#define ESP_PROTOC_TAIL (uint8_t)0xFC +#define ESP_PROTOC_HEAD (uint8_t)0xA5 +#define ESP_PROTOC_TAIL (uint8_t)0xFC -#define ESP_TYPE_NET (uint8_t)0x0 -#define ESP_TYPE_GCODE (uint8_t)0x1 +#define ESP_TYPE_NET (uint8_t)0x0 +#define ESP_TYPE_GCODE (uint8_t)0x1 #define ESP_TYPE_FILE_FIRST (uint8_t)0x2 -#define ESP_TYPE_FILE_FRAGMENT (uint8_t)0x3 +#define ESP_TYPE_FILE_FRAGMENT (uint8_t)0x3 -#define ESP_TYPE_WIFI_LIST (uint8_t)0x4 +#define ESP_TYPE_WIFI_LIST (uint8_t)0x4 uint8_t esp_msg_buf[UART_RX_BUFFER_SIZE] = { 0 }; uint16_t esp_msg_index = 0; @@ -566,7 +811,7 @@ static int cut_msg_head(uint8_t *msg, uint16_t msgLen, uint16_t cutLen) { return msgLen - cutLen; } -uint8_t Explore_Disk(char* path , uint8_t recu_level) { +uint8_t Explore_Disk(char *path , uint8_t recu_level) { char tmp[200]; char Fstream[200]; @@ -595,7 +840,7 @@ uint8_t Explore_Disk(char* path , uint8_t recu_level) { static void wifi_gcode_exec(uint8_t *cmd_line) { int8_t tempBuf[100] = { 0 }; uint8_t *tmpStr = 0; - int cmd_value; + int cmd_value; volatile int print_rate; if (strchr((char *)cmd_line, '\n') && (strchr((char *)cmd_line, 'G') || strchr((char *)cmd_line, 'M') || strchr((char *)cmd_line, 'T'))) { tmpStr = (uint8_t *)strchr((char *)cmd_line, '\n'); @@ -621,9 +866,9 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { if (tmpStr == 0) { gCfgItems.fileSysType = FILE_SYS_SD; - send_to_wifi((uint8_t *)"Begin file list\r\n", strlen("Begin file list\r\n")); + send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n")); get_file_list((char *)"0:/"); - send_to_wifi((uint8_t *)"End file list\r\n", strlen("End file list\r\n")); + send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n")); SEND_OK_TO_WIFI; break; } @@ -634,7 +879,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { char *path = (char *)tempBuf; if (strlen((char *)&tmpStr[index]) < 80) { - send_to_wifi((uint8_t *)"Begin file list\r\n", strlen("Begin file list\r\n")); + send_to_wifi((uint8_t *)(STR_BEGIN_FILE_LIST "\r\n"), strlen(STR_BEGIN_FILE_LIST "\r\n")); if (strncmp((char *)&tmpStr[index], "1:", 2) == 0) gCfgItems.fileSysType = FILE_SYS_SD; @@ -643,20 +888,17 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { strcpy((char *)path, (char *)&tmpStr[index]); get_file_list(path); - send_to_wifi((uint8_t *)"End file list\r\n", strlen("End file list\r\n")); + send_to_wifi((uint8_t *)(STR_END_FILE_LIST "\r\n"), strlen(STR_END_FILE_LIST "\r\n")); } SEND_OK_TO_WIFI; } } break; - case 21: - /*init sd card*/ - SEND_OK_TO_WIFI; - break; + case 21: SEND_OK_TO_WIFI; break; // Init SD card case 23: - /*select the file*/ + // Select the file if (uiCfg.print_state == IDLE) { int index = 0; while (tmpStr[index] == ' ') index++; @@ -680,7 +922,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { strcat_P((char *)list_file.file_name[sel_id], PSTR("/")); if (file_writer.fileTransfer == 1) { - uint8_t dosName[FILENAME_LENGTH]; + char dosName[FILENAME_LENGTH]; uint8_t fileName[sizeof(list_file.file_name[sel_id])]; fileName[0] = '\0'; if (has_path_selected == 1) { @@ -690,8 +932,8 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { else strcat((char *)fileName, (char *)&tmpStr[index]); if (!longName2DosName((const char *)fileName, dosName)) strcpy_P(list_file.file_name[sel_id], PSTR("notValid")); - strcat((char *)list_file.file_name[sel_id], (char *)dosName); - strcat((char *)list_file.long_name[sel_id], (char *)dosName); + strcat((char *)list_file.file_name[sel_id], dosName); + strcat((char *)list_file.long_name[sel_id], dosName); } else { strcat((char *)list_file.file_name[sel_id], (char *)&tmpStr[index]); @@ -732,12 +974,10 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { if (!gcode_preview_over) { char *cur_name = strrchr(list_file.file_name[sel_id], '/'); - card.endFilePrint(); - SdFile file; SdFile *curDir; - card.endFilePrint(); - const char * const fname = card.diveToFile(true, curDir, cur_name); + card.abortFilePrintNow(); + const char * const fname = card.diveToFile(false, curDir, cur_name); if (!fname) return; if (file.open(curDir, fname, O_READ)) { gCfgItems.curFilesize = file.fileSize(); @@ -748,13 +988,15 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { if (card.isFileOpen()) { //saved_feedrate_percentage = feedrate_percentage; feedrate_percentage = 100; - planner.flow_percentage[0] = 100; - planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; - #if EXTRUDERS == 2 + #if HAS_EXTRUDERS + planner.flow_percentage[0] = 100; + planner.e_factor[0] = planner.flow_percentage[0] * 0.01f; + #endif + #if HAS_MULTI_EXTRUDER planner.flow_percentage[1] = 100; planner.e_factor[1] = planner.flow_percentage[1] * 0.01f; #endif - card.startFileprint(); + card.startOrResumeFilePrinting(); TERN_(POWER_LOSS_RECOVERY, recovery.prepare()); once_flag = false; } @@ -787,7 +1029,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { break; case 25: - /*pause print file*/ + // Pause print file if (uiCfg.print_state == WORKING) { stop_print_time(); @@ -807,14 +1049,14 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { break; case 26: - /*stop print file*/ + // Stop print file if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED) || (uiCfg.print_state == REPRINTING)) { stop_print_time(); clear_cur_ui(); #if ENABLED(SDSUPPORT) uiCfg.print_state = IDLE; - card.flag.abort_sd_printing = true; + card.abortFilePrintSoon(); #endif lv_draw_ready_print(); @@ -824,7 +1066,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { break; case 27: - /*report print rate*/ + // Report print rate if ((uiCfg.print_state == WORKING) || (uiCfg.print_state == PAUSED)|| (uiCfg.print_state == REPRINTING)) { print_rate = uiCfg.totalSend; ZERO(tempBuf); @@ -834,7 +1076,7 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { break; case 28: - /*begin to transfer file to filesys*/ + // Begin to transfer file to filesys if (uiCfg.print_state == IDLE) { int index = 0; @@ -874,42 +1116,55 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { } } break; + case 105: case 991: ZERO(tempBuf); if (cmd_value == 105) { + SEND_OK_TO_WIFI; - sprintf_P((char *)tempBuf, PSTR("T:%.1f /%.1f B:%.1f /%.1f T0:%.1f /%.1f T1:%.1f /%.1f @:0 B@:0\r\n"), - (float)thermalManager.temp_hotend[0].celsius, (float)thermalManager.temp_hotend[0].target, + char *outBuf = (char *)tempBuf; + char tbuf[34]; + + sprintf_P(tbuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0)); + + const int tlen = strlen(tbuf); + sprintf_P(outBuf, PSTR("T:%s"), tbuf); + outBuf += 2 + tlen; + + strcpy_P(outBuf, PSTR(" B:")); + outBuf += 3; #if HAS_HEATED_BED - (float)thermalManager.temp_bed.celsius, (float)thermalManager.temp_bed.target, + sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegBed(), thermalManager.degTargetBed()); #else - 0.0f, 0.0f, + strcpy_P(outBuf, PSTR("0 /0")); #endif - (float)thermalManager.temp_hotend[0].celsius, (float)thermalManager.temp_hotend[0].target, - #if DISABLED(SINGLENOZZLE) && HAS_MULTI_EXTRUDER - (float)thermalManager.temp_hotend[1].celsius, (float)thermalManager.temp_hotend[1].target + outBuf += 4; + + strcat_P(outBuf, PSTR(" T0:")); + strcat(outBuf, tbuf); + outBuf += 4 + tlen; + + strcat_P(outBuf, PSTR(" T1:")); + outBuf += 4; + #if HAS_MULTI_HOTEND + sprintf_P(outBuf, PSTR("%d /%d"), thermalManager.wholeDegHotend(1), thermalManager.degTargetHotend(1)); #else - 0.0f, 0.0f + strcpy_P(outBuf, PSTR("0 /0")); #endif - ); + outBuf += 4; + + strcat_P(outBuf, PSTR(" @:0 B@:0\r\n")); } else { sprintf_P((char *)tempBuf, PSTR("T:%d /%d B:%d /%d T0:%d /%d T1:%d /%d @:0 B@:0\r\n"), - - (int)thermalManager.temp_hotend[0].celsius, (int)thermalManager.temp_hotend[0].target, - #if HAS_HEATED_BED - (int)thermalManager.temp_bed.celsius, (int)thermalManager.temp_bed.target, - #else - 0, 0, - #endif - (int)thermalManager.temp_hotend[0].celsius, (int)thermalManager.temp_hotend[0].target, - #if DISABLED(SINGLENOZZLE) && HAS_MULTI_EXTRUDER - (int)thermalManager.temp_hotend[1].celsius, (int)thermalManager.temp_hotend[1].target - #else - 0, 0 - #endif + thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), + TERN0(HAS_HEATED_BED, thermalManager.wholeDegBed()), + TERN0(HAS_HEATED_BED, thermalManager.degTargetBed()), + thermalManager.wholeDegHotend(0), thermalManager.degTargetHotend(0), + TERN0(HAS_MULTI_HOTEND, thermalManager.wholeDegHotend(1)), + TERN0(HAS_MULTI_HOTEND, thermalManager.degTargetHotend(1)) ); } @@ -958,11 +1213,8 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { case 998: if (uiCfg.print_state == IDLE) { - int v = atoi((char *)tmpStr); - if (v == 0) - set_cur_file_sys(0); - else if (v == 1) - set_cur_file_sys(1); + const int v = atoi((char *)tmpStr); + if (v == 0 || v == 1) set_cur_file_sys(v); wifi_ret_ack(); } break; @@ -977,18 +1229,14 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { strcat_P((char *)cmd_line, PSTR("\n")); if (espGcodeFifo.wait_tick > 5) { - uint32_t left; - if (espGcodeFifo.r > espGcodeFifo.w) - left = espGcodeFifo.r - espGcodeFifo.w - 1; - else - left = WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; + const uint32_t left = espGcodeFifo.r > espGcodeFifo.w + ? espGcodeFifo.r - espGcodeFifo.w - 1 + : WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; if (left >= strlen((const char *)cmd_line)) { - uint32_t index = 0; - while (index < strlen((const char *)cmd_line)) { + for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index] ; espGcodeFifo.w = (espGcodeFifo.w + 1) % WIFI_GCODE_BUFFER_SIZE; - index++; } if (left - WIFI_GCODE_BUFFER_LEAST_SIZE >= strlen((const char *)cmd_line)) SEND_OK_TO_WIFI; @@ -1003,18 +1251,14 @@ static void wifi_gcode_exec(uint8_t *cmd_line) { strcat_P((char *)cmd_line, PSTR("\n")); if (espGcodeFifo.wait_tick > 5) { - uint32_t left_g; - if (espGcodeFifo.r > espGcodeFifo.w) - left_g = espGcodeFifo.r - espGcodeFifo.w - 1; - else - left_g = WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; + const uint32_t left_g = espGcodeFifo.r > espGcodeFifo.w + ? espGcodeFifo.r - espGcodeFifo.w - 1 + : WIFI_GCODE_BUFFER_SIZE + espGcodeFifo.r - espGcodeFifo.w - 1; if (left_g >= strlen((const char *)cmd_line)) { - uint32_t index = 0; - while (index < strlen((const char *)cmd_line)) { + for (uint32_t index = 0; index < strlen((const char *)cmd_line); index++) { espGcodeFifo.Buffer[espGcodeFifo.w] = cmd_line[index] ; espGcodeFifo.w = (espGcodeFifo.w + 1) % WIFI_GCODE_BUFFER_SIZE; - index++; } if (left_g - WIFI_GCODE_BUFFER_LEAST_SIZE >= strlen((const char *)cmd_line)) SEND_OK_TO_WIFI; @@ -1042,11 +1286,10 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { if (msgLen <= 0) return; - // ip + // IP address sprintf_P(ipPara.ip_addr, PSTR("%d.%d.%d.%d"), msg[0], msg[1], msg[2], msg[3]); - // port - // connect state + // port connect state switch (msg[6]) { case 0x0A: wifi_link_state = WIFI_CONNECTED; break; case 0x0E: wifi_link_state = WIFI_EXCEPTION; break; @@ -1056,7 +1299,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { // mode wifiPara.mode = msg[7]; - // wifi name + // WiFi name wifiNameLen = msg[8]; wifiKeyLen = msg[9 + wifiNameLen]; if (wifiNameLen < 32) { @@ -1066,7 +1309,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { memset(&wifi_list.wifiConnectedName, 0, sizeof(wifi_list.wifiConnectedName)); memcpy(&wifi_list.wifiConnectedName, &msg[9], wifiNameLen); - // wifi key + // WiFi key if (wifiKeyLen < 64) { ZERO(wifiPara.keyCode); memcpy(wifiPara.keyCode, &msg[10 + wifiNameLen], wifiKeyLen); @@ -1083,7 +1326,7 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { cloud_para.port = msg[12 + wifiNameLen + wifiKeyLen + hostLen] + (msg[13 + wifiNameLen + wifiKeyLen + hostLen] << 8); } - // id + // ID id_len = msg[14 + wifiNameLen + wifiKeyLen + hostLen]; if (id_len == 20) { ZERO(cloud_para.id); @@ -1106,10 +1349,10 @@ static void net_msg_handle(uint8_t * msg, uint16_t msgLen) { if (cfg_cloud_flag == 1) { if (((cloud_para.state >> 4) != (char)gCfgItems.cloud_enable) || (strncmp(cloud_para.hostUrl, (const char *)uiCfg.cloud_hostUrl, 96) != 0) - || (cloud_para.port != uiCfg.cloud_port)) { - package_to_wifi(WIFI_CLOUD_CFG, (uint8_t *)0, 0); - } - else cfg_cloud_flag = 0; + || (cloud_para.port != uiCfg.cloud_port) + ) package_to_wifi(WIFI_CLOUD_CFG, (uint8_t *)0, 0); + else + cfg_cloud_flag = 0; } } @@ -1122,7 +1365,7 @@ static void wifi_list_msg_handle(uint8_t * msg, uint16_t msgLen) { int8_t valid_name_num; if (msgLen <= 0) return; - if (disp_state == KEY_BOARD_UI) return; + if (disp_state == KEYBOARD_UI) return; wifi_list.getNameNum = msg[0]; @@ -1203,16 +1446,12 @@ void utf8_2_unicode(uint8_t *source, uint8_t Len) { ZERO(FileName_unicode); - while (1) { + for (;;) { char_byte_num = source[i] & 0xF0; - if (source[i] < 0X80) { - //ASCII --1byte - FileName_unicode[char_i] = source[i]; - i += 1; - char_i += 1; + if (source[i] < 0x80) { // ASCII -- 1 byte + FileName_unicode[char_i++] = source[i++]; } - else if (char_byte_num == 0XC0 || char_byte_num == 0XD0) { - //--2byte + else if (char_byte_num == 0xC0 || char_byte_num == 0xD0) { // -- 2 byte u16_h = (((uint16_t)source[i] << 8) & 0x1F00) >> 2; u16_l = ((uint16_t)source[i + 1] & 0x003F); u16_value = (u16_h | u16_l); @@ -1221,8 +1460,7 @@ void utf8_2_unicode(uint8_t *source, uint8_t Len) { i += 2; char_i += 2; } - else if (char_byte_num == 0XE0) { - //--3byte + else if (char_byte_num == 0xE0) { // -- 3 byte u16_h = (((uint16_t)source[i] << 8) & 0x0F00) << 4; u16_m = (((uint16_t)source[i + 1] << 8) & 0x3F00) >> 2; u16_l = ((uint16_t)source[i + 2] & 0x003F); @@ -1232,8 +1470,7 @@ void utf8_2_unicode(uint8_t *source, uint8_t Len) { i += 3; char_i += 2; } - else if (char_byte_num == 0XF0) { - //--4byte + else if (char_byte_num == 0xF0) { // -- 4 byte i += 4; //char_i += 3; } @@ -1255,7 +1492,7 @@ static void file_first_msg_handle(uint8_t * msg, uint16_t msgLen) { memcpy(file_writer.saveFileName, msg + 5, fileNameLen); - utf8_2_unicode(file_writer.saveFileName,fileNameLen); + utf8_2_unicode(file_writer.saveFileName, fileNameLen); ZERO(public_buf); @@ -1268,7 +1505,7 @@ static void file_first_msg_handle(uint8_t * msg, uint16_t msgLen) { TERN_(SDSUPPORT, card.mount()); } else if (gCfgItems.fileSysType == FILE_SYS_USB) { - + // nothing } file_writer.write_index = 0; lastFragment = -1; @@ -1283,9 +1520,9 @@ static void file_first_msg_handle(uint8_t * msg, uint16_t msgLen) { #if ENABLED(SDSUPPORT) - uint8_t dosName[FILENAME_LENGTH]; + char dosName[FILENAME_LENGTH]; - if (!longName2DosName((const char *)file_writer.saveFileName,dosName)) { + if (!longName2DosName((const char *)file_writer.saveFileName, dosName)) { clear_cur_ui(); upload_result = 2; wifiTransError.flag = 1; @@ -1293,11 +1530,11 @@ static void file_first_msg_handle(uint8_t * msg, uint16_t msgLen) { lv_draw_dialog(DIALOG_TYPE_UPLOAD_FILE); return; } - sprintf_P((char *)saveFilePath, PSTR("%s"), dosName); + strcpy((char *)saveFilePath, dosName); card.cdroot(); upload_file.close(); - const char * const fname = card.diveToFile(true, upload_curDir, saveFilePath); + const char * const fname = card.diveToFile(false, upload_curDir, saveFilePath); if (!upload_file.open(upload_curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) { clear_cur_ui(); @@ -1347,10 +1584,11 @@ static void file_fragment_msg_handle(uint8_t * msg, uint16_t msgLen) { lastFragment = frag; if ((frag & (~FRAG_MASK)) != 0) { + wifiDmaRcvFifo.receiveEspData = false; int res = upload_file.write(public_buf, file_writer.write_index); if (res == -1) { upload_file.close(); - const char * const fname = card.diveToFile(true, upload_curDir, saveFilePath); + const char * const fname = card.diveToFile(false, upload_curDir, saveFilePath); if (upload_file.open(upload_curDir, fname, O_WRITE)) { upload_file.setpos(&pos); res = upload_file.write(public_buf, file_writer.write_index); @@ -1358,7 +1596,7 @@ static void file_fragment_msg_handle(uint8_t * msg, uint16_t msgLen) { } upload_file.close(); SdFile file, *curDir; - const char * const fname = card.diveToFile(true, curDir, saveFilePath); + const char * const fname = card.diveToFile(false, curDir, saveFilePath); if (file.open(curDir, fname, O_RDWR)) { gCfgItems.curFilesize = file.fileSize(); file.close(); @@ -1373,7 +1611,7 @@ static void file_fragment_msg_handle(uint8_t * msg, uint16_t msgLen) { ZERO(public_buf); file_writer.write_index = 0; file_writer.tick_end = getWifiTick(); - upload_time = getWifiTickDiff(file_writer.tick_begin, file_writer.tick_end) / 1000; + upload_time_sec = getWifiTickDiff(file_writer.tick_begin, file_writer.tick_end) / 1000; upload_size = gCfgItems.curFilesize; wifi_link_state = WIFI_CONNECTED; upload_result = 3; @@ -1507,7 +1745,7 @@ int32_t readWifiFifo(uint8_t *retBuf, uint32_t bufLen) { void stopEspTransfer() { if (wifi_link_state == WIFI_TRANS_FILE) - wifi_link_state = WIFI_CONNECTED; + wifi_link_state = WIFI_CONNECTED; TERN_(SDSUPPORT, card.closefile()); @@ -1521,9 +1759,16 @@ void stopEspTransfer() { WIFI_IO1_SET(); // disable dma - dma_clear_isr_bits(DMA1, DMA_CH5); - bb_peri_set_bit(&USART1_BASE->CR3, USART_CR3_DMAR_BIT, 0); - dma_disable(DMA1, DMA_CH5); + #ifdef __STM32F1__ + dma_clear_isr_bits(DMA1, DMA_CH5); + bb_peri_set_bit(&USART1_BASE->CR3, USART_CR3_DMAR_BIT, 0); + dma_disable(DMA1, DMA_CH5); + #else + // First, abort any running dma + HAL_DMA_Abort(&wifiUsartDMArx); + // DeInit objects + HAL_DMA_DeInit(&wifiUsartDMArx); + #endif wifi_delay(200); changeFlashMode(true); // Set SPI flash to use DMA mode @@ -1552,6 +1797,9 @@ void wifi_rcv_handle() { } } #else + #ifndef __STM32F1__ + if (wifiDmaRcvFifo.receiveEspData) storeRcvData(WIFISERIAL.wifiRxBuf, UART_RX_BUFFER_SIZE); + #endif len = readWifiFifo(ucStr, UART_RX_BUFFER_SIZE); #endif if (len > 0) { @@ -1563,15 +1811,16 @@ void wifi_rcv_handle() { } getDataF = 1; } - if (esp_state == TRANSFER_STORE) { - if (storeRcvData(WIFISERIAL.usart_device->rb->buf, UART_RX_BUFFER_SIZE)) { - esp_state = TRANSFERING; - esp_dma_pre(); - if (wifiTransError.flag != 0x1) WIFI_IO1_RESET(); + #ifdef __STM32F1__ + if (esp_state == TRANSFER_STORE) { + if (storeRcvData(WIFISERIAL.wifiRxBuf, UART_RX_BUFFER_SIZE)) { + esp_state = TRANSFERRING; + esp_dma_pre(); + if (wifiTransError.flag != 0x1) WIFI_IO1_RESET(); + } + else WIFI_IO1_SET(); } - else - WIFI_IO1_SET(); - } + #endif } else { len = readWifiBuf((int8_t *)ucStr, UART_RX_BUFFER_SIZE); @@ -1583,19 +1832,22 @@ void wifi_rcv_handle() { esp_port_begin(0); wifi_delay(10); tick_net_time1 = 0; + #ifndef __STM32F1__ + wifiDmaRcvFifo.receiveEspData = true; + return; + #endif } if (wifiTransError.flag != 0x1) WIFI_IO1_RESET(); getDataF = 1; } - if (need_ok_later && (queue.length < BUFSIZE)) { + if (need_ok_later && !queue.ring_buffer.full()) { need_ok_later = false; send_to_wifi((uint8_t *)"ok\r\n", strlen("ok\r\n")); } } - if (getDataF == 1) { + if (getDataF == 1) tick_net_time1 = getWifiTick(); - } else { tick_net_time2 = getWifiTick(); @@ -1645,74 +1897,68 @@ void mks_esp_wifi_init() { esp_state = TRANSFER_IDLE; esp_port_begin(1); - + watchdog_refresh(); wifi_reset(); #if 0 if (update_flag == 0) { res = f_open(&esp_upload.uploadFile, ESP_WEB_FIRMWARE_FILE, FA_OPEN_EXISTING | FA_READ); + if (res == FR_OK) { + f_close(&esp_upload.uploadFile); - if (res == FR_OK) { - f_close(&esp_upload.uploadFile); - - wifi_delay(2000); + wifi_delay(2000); - if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) { - return; - } - - clear_cur_ui(); + if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) return; - draw_dialog(DIALOG_TYPE_UPDATE_ESP_FIRMWARE); - if (wifi_upload(1) >= 0) { + clear_cur_ui(); - f_unlink("1:/MKS_WIFI_CUR"); - f_rename(ESP_WEB_FIRMWARE_FILE,"/MKS_WIFI_CUR"); - } - draw_return_ui(); - update_flag = 1; + draw_dialog(DIALOG_TYPE_UPDATE_ESP_FIRMWARE); + if (wifi_upload(1) >= 0) { + f_unlink("1:/MKS_WIFI_CUR"); + f_rename(ESP_WEB_FIRMWARE_FILE,"/MKS_WIFI_CUR"); } - + draw_return_ui(); + update_flag = 1; } - if (update_flag == 0) { - res = f_open(&esp_upload.uploadFile, ESP_WEB_FILE, FA_OPEN_EXISTING | FA_READ); - if (res == FR_OK) { - f_close(&esp_upload.uploadFile); + } - wifi_delay(2000); + if (update_flag == 0) { + res = f_open(&esp_upload.uploadFile, ESP_WEB_FILE, FA_OPEN_EXISTING | FA_READ); + if (res == FR_OK) { + f_close(&esp_upload.uploadFile); - if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) { - return; - } + wifi_delay(2000); - clear_cur_ui(); + if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) return; - draw_dialog(DIALOG_TYPE_UPDATE_ESP_DATA); + clear_cur_ui(); - if (wifi_upload(2) >= 0) { + draw_dialog(DIALOG_TYPE_UPDATE_ESP_DATA); - f_unlink("1:/MKS_WEB_CONTROL_CUR"); - f_rename(ESP_WEB_FILE,"/MKS_WEB_CONTROL_CUR"); - } - draw_return_ui(); + if (wifi_upload(2) >= 0) { + f_unlink("1:/MKS_WEB_CONTROL_CUR"); + f_rename(ESP_WEB_FILE,"/MKS_WEB_CONTROL_CUR"); } + draw_return_ui(); } + } #endif + wifiPara.decodeType = WIFI_DECODE_TYPE; wifiPara.baud = 115200; wifi_link_state = WIFI_NOT_CONFIG; } void mks_wifi_firmware_update() { + watchdog_refresh(); card.openFileRead((char *)ESP_FIRMWARE_FILE); if (card.isFileOpen()) { card.closefile(); wifi_delay(2000); - - if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) - return; + watchdog_refresh(); + if (usartFifoAvailable((SZ_USART_FIFO *)&WifiRxFifo) < 20) return; clear_cur_ui(); @@ -1724,7 +1970,7 @@ void mks_wifi_firmware_update() { if (wifi_upload(0) >= 0) { card.removeFile((char *)ESP_FIRMWARE_FILE_RENAME); SdFile file, *curDir; - const char * const fname = card.diveToFile(true, curDir, ESP_FIRMWARE_FILE); + const char * const fname = card.diveToFile(false, curDir, ESP_FIRMWARE_FILE); if (file.open(curDir, fname, O_READ)) { file.rename(curDir, (char *)ESP_FIRMWARE_FILE_RENAME); file.close(); @@ -1734,19 +1980,13 @@ void mks_wifi_firmware_update() { } } -#define BUF_INC_POINTER(p) ((p + 1 == UART_FIFO_BUFFER_SIZE) ? 0:(p + 1)) - -int usartFifoAvailable(SZ_USART_FIFO *fifo) { - return WIFISERIAL.available(); -} - void get_wifi_commands() { static char wifi_line_buffer[MAX_CMD_SIZE]; static bool wifi_comment_mode = false; static int wifi_read_count = 0; if (espGcodeFifo.wait_tick > 5) { - while ((queue.length < BUFSIZE) && (espGcodeFifo.r != espGcodeFifo.w)) { + while (!queue.ring_buffer.full() && (espGcodeFifo.r != espGcodeFifo.w)) { espGcodeFifo.wait_tick = 0; @@ -1769,18 +2009,14 @@ void get_wifi_commands() { char* command = wifi_line_buffer; while (*command == ' ') command++; // skip any leading spaces - // Movement commands alert when stopped - if (IsStopped()) { + // Movement commands alert when stopped + if (IsStopped()) { char* gpos = strchr(command, 'G'); if (gpos) { switch (strtol(gpos + 1, nullptr, 10)) { case 0 ... 1: - #if ENABLED(ARC_SUPPORT) - case 2 ... 3: - #endif - #if ENABLED(BEZIER_CURVE_SUPPORT) - case 5: - #endif + TERN_(ARC_SUPPORT, case 2 ... 3:) + TERN_(BEZIER_CURVE_SUPPORT, case 5:) SERIAL_ECHOLNPGM(STR_ERR_STOPPED); LCD_MESSAGEPGM(MSG_STOPPED); break; @@ -1821,4 +2057,6 @@ int readWifiBuf(int8_t *buf, int32_t len) { return i; } +int usartFifoAvailable(SZ_USART_FIFO *fifo) { return WIFISERIAL.available(); } + #endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE diff --git a/Marlin/src/lcd/extui/lib/mks_ui/wifi_module.h b/Marlin/src/lcd/extui/mks_ui/wifi_module.h similarity index 77% rename from Marlin/src/lcd/extui/lib/mks_ui/wifi_module.h rename to Marlin/src/lcd/extui/mks_ui/wifi_module.h index 07ae6f72dbd3..15b90ab367c5 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/wifi_module.h +++ b/Marlin/src/lcd/extui/mks_ui/wifi_module.h @@ -25,7 +25,7 @@ extern "C" { /* C-declarations for C++ */ #endif -#include "../../../../inc/MarlinConfigPre.h" +#include "../../../inc/MarlinConfigPre.h" #include #include @@ -56,7 +56,7 @@ #define UDISKBUFLEN 1024 -typedef enum{ +typedef enum { udisk_buf_empty = 0, udisk_buf_full, } UDISK_DATA_BUFFER_STATE; @@ -64,6 +64,7 @@ typedef enum{ #define TRANS_RCV_FIFO_BLOCK_NUM 14 typedef struct { + bool receiveEspData; unsigned char *bufferAddr[TRANS_RCV_FIFO_BLOCK_NUM]; unsigned char *p; UDISK_DATA_BUFFER_STATE state[TRANS_RCV_FIFO_BLOCK_NUM]; @@ -73,41 +74,41 @@ typedef struct { typedef struct { uint8_t flag; // 0x0: no error; 0x01: error - uint32_t start_tick; //error start time + uint32_t start_tick; // error start time uint32_t now_tick; } WIFI_TRANS_ERROR; extern volatile WIFI_TRANS_ERROR wifiTransError; typedef struct { - char ap_name[32]; //wifi-name - char keyCode[64]; //wifi password - int decodeType; - int baud; - int mode; + char ap_name[32]; // wifi-name + char keyCode[64]; // wifi password + int decodeType; + int baud; + int mode; } WIFI_PARA; typedef struct { char state; char hostUrl[96]; - int port; + int port; char id[21]; } CLOUD_PARA; typedef struct { - char dhcp_flag; - char ip_addr[16]; - char mask[16]; - char gate[16]; - char dns[16]; - - char dhcpd_flag; - char dhcpd_ip[16]; - char dhcpd_mask[16]; - char dhcpd_gate[16]; - char dhcpd_dns[16]; - char start_ip_addr[16]; - char end_ip_addr[16]; + char dhcp_flag; + char ip_addr[16]; + char mask[16]; + char gate[16]; + char dns[16]; + + char dhcpd_flag; + char dhcpd_ip[16]; + char dhcpd_mask[16]; + char dhcpd_gate[16]; + char dhcpd_dns[16]; + char start_ip_addr[16]; + char end_ip_addr[16]; } IP_PARA; typedef enum { @@ -136,15 +137,15 @@ typedef enum { typedef enum { TRANSFER_IDLE, - TRANSFERING, + TRANSFERRING, TRANSFER_STORE, } TRANSFER_STATE; extern volatile TRANSFER_STATE esp_state; typedef struct { char buf[20][80]; - int rd_index; - int wt_index; + int rd_index; + int wt_index; } QUEUE; typedef enum { @@ -178,19 +179,22 @@ extern CLOUD_PARA cloud_para; extern WIFI_GCODE_BUFFER espGcodeFifo; -extern uint32_t getWifiTick(); -extern uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick); - -extern void mks_esp_wifi_init(); -extern int cfg_cloud_flag; -extern int send_to_wifi(uint8_t *buf, int len); -extern void wifi_looping(); -extern int raw_send_to_wifi(uint8_t *buf, int len); -extern int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len); -extern void get_wifi_list_command_send(); -extern void get_wifi_commands(); -extern int readWifiBuf(int8_t *buf, int32_t len); -extern void mks_wifi_firmware_update(); +uint32_t getWifiTick(); +uint32_t getWifiTickDiff(int32_t lastTick, int32_t curTick); + +void mks_esp_wifi_init(); +extern int cfg_cloud_flag; +int send_to_wifi(uint8_t *buf, int len); +void wifi_looping(); +int raw_send_to_wifi(uint8_t *buf, int len); +int package_to_wifi(WIFI_RET_TYPE type, uint8_t *buf, int len); +void get_wifi_list_command_send(); +void get_wifi_commands(); +int readWifiBuf(int8_t *buf, int32_t len); +void mks_wifi_firmware_update(); +int usartFifoAvailable(SZ_USART_FIFO *fifo); +int readUsartFifo(SZ_USART_FIFO *fifo, int8_t *buf, int32_t len); +void esp_port_begin(uint8_t interrupt); #ifdef __cplusplus } /* C-declarations for C++ */ diff --git a/Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.cpp b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp similarity index 97% rename from Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.cpp rename to Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp index 378de6d58455..675e0eb666d2 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.cpp +++ b/Marlin/src/lcd/extui/mks_ui/wifi_upload.cpp @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#include "../../../../inc/MarlinConfigPre.h" + +#include "../../../inc/MarlinConfigPre.h" #if BOTH(HAS_TFT_LVGL_UI, MKS_WIFI_MODULE) @@ -27,21 +28,20 @@ #include "wifi_module.h" #include "wifi_upload.h" -#include "../../../../MarlinCore.h" -#include "../../../../sd/cardreader.h" +#include "../../../MarlinCore.h" +#include "../../../sd/cardreader.h" #define WIFI_SET() WRITE(WIFI_RESET_PIN, HIGH); #define WIFI_RESET() WRITE(WIFI_RESET_PIN, LOW); #define WIFI_IO1_SET() WRITE(WIFI_IO1_PIN, HIGH); #define WIFI_IO1_RESET() WRITE(WIFI_IO1_PIN, LOW); -extern SZ_USART_FIFO WifiRxFifo; +extern SZ_USART_FIFO WifiRxFifo; extern int readUsartFifo(SZ_USART_FIFO *fifo, int8_t *buf, int32_t len); extern int writeUsartFifo(SZ_USART_FIFO * fifo, int8_t * buf, int32_t len); -extern void esp_port_begin(uint8_t interrupt); -extern int usartFifoAvailable(SZ_USART_FIFO *fifo); -extern void wifi_delay(int n); +void esp_port_begin(uint8_t interrupt); +void wifi_delay(int n); #define ARRAY_SIZE(a) sizeof(a) / sizeof((a)[0]) @@ -280,7 +280,7 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t switch (state) { case begin: // expecting frame start c = uploadPort_read(); - if (c == (uint8_t)0xC0) break; + if (c != (uint8_t)0xC0) break; state = header; needBytes = 2; break; @@ -301,7 +301,7 @@ EspUploadResult readPacket(uint8_t op, uint32_t *valp, size_t *bodyLen, uint32_t return stat; } else if (state == header) { - //store the header byte + // store the header byte hdr[hdrIdx++] = c; if (hdrIdx >= headerLength) { // get the body length, prepare a buffer for it @@ -423,7 +423,7 @@ EspUploadResult doCommand(uint8_t op, const uint8_t *data, size_t dataLen, uint3 EspUploadResult Sync(uint16_t timeout) { uint8_t buf[36]; EspUploadResult stat; - int i ; + int i; // compose the data for the sync attempt memset(buf, 0x55, sizeof(buf)); @@ -449,8 +449,8 @@ EspUploadResult Sync(uint16_t timeout) { if (rc != success || bodyLen != 2) break; } } - //DEBUG - //else debug//printf("stat=%d\n", (int)stat); + // DEBUG + //else printf("stat=%d\n", (int)stat); return stat; } @@ -625,7 +625,7 @@ void upload_spin() { // Try to upload the given file at the given address void SendUpdateFile(const char *file, uint32_t address) { - const char * const fname = card.diveToFile(true, update_curDir, ESP_FIRMWARE_FILE); + const char * const fname = card.diveToFile(false, update_curDir, ESP_FIRMWARE_FILE); if (!update_file.open(update_curDir, fname, O_READ)) return; esp_upload.fileSize = update_file.fileSize(); @@ -644,10 +644,7 @@ static const uint32_t FirmwareAddress = 0x00000000, WebFilesAddress = 0x00100000 void ResetWiFiForUpload(int begin_or_end) { //#if 0 - uint32_t start, now; - - start = getWifiTick(); - now = start; + uint32_t start = getWifiTick(); if (begin_or_end == 0) { SET_OUTPUT(WIFI_IO0_PIN); @@ -657,7 +654,7 @@ void ResetWiFiForUpload(int begin_or_end) { SET_INPUT_PULLUP(WIFI_IO0_PIN); WIFI_RESET(); - while (getWifiTickDiff(start, now) < 500) now = getWifiTick(); + while (getWifiTickDiff(start, getWifiTick()) < 500) { /* nada */ } WIFI_SET(); //#endif } diff --git a/Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.h b/Marlin/src/lcd/extui/mks_ui/wifi_upload.h similarity index 100% rename from Marlin/src/lcd/extui/lib/mks_ui/wifi_upload.h rename to Marlin/src/lcd/extui/mks_ui/wifi_upload.h diff --git a/Marlin/src/lcd/extui/nextion/FileNavigator.cpp b/Marlin/src/lcd/extui/nextion/FileNavigator.cpp new file mode 100644 index 000000000000..07f1256deda4 --- /dev/null +++ b/Marlin/src/lcd/extui/nextion/FileNavigator.cpp @@ -0,0 +1,174 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/* **************************************** + * lcd/extui/nextion/FileNavigator.cpp + * **************************************** + * Extensible_UI implementation for Nextion + * https://github.com/Skorpi08 + * ***************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(NEXTION_TFT) + +#include "FileNavigator.h" +#include "nextion_tft.h" + +using namespace ExtUI; + +#define DEBUG_OUT NEXDEBUGLEVEL +#include "../../../core/debug_out.h" + +FileList FileNavigator::filelist; // Instance of the Marlin file API +char FileNavigator::currentfoldername[MAX_PATH_LEN]; // Current folder path +uint16_t FileNavigator::lastindex; +uint8_t FileNavigator::folderdepth; +uint16_t FileNavigator::currentindex; // override the panel request + +FileNavigator filenavigator; + +FileNavigator::FileNavigator() { reset(); } + +void FileNavigator::reset() { + currentfoldername[0] = '\0'; + folderdepth = 0; + currentindex = 0; + lastindex = 0; + // Start at root folder + while (!filelist.isAtRootDir()) filelist.upDir(); + refresh(); +} + +void FileNavigator::refresh() { filelist.refresh(); } + +void FileNavigator::getFiles(uint16_t index) { + uint16_t files = 7, fseek = 0, fcnt = 0; + if (index == 0) + currentindex = 0; + else { + // Each time we change folder we reset the file index to 0 and keep track + // of the current position as the TFT panel isn't aware of folder trees. + --currentindex; // go back a file to take account of the .. added to the root. + if (index > lastindex) + currentindex += files + 1; + else if (currentindex >= files) + currentindex -= files - 1; + else + currentindex = 0; + } + lastindex = index; + + #if NEXDEBUG(AC_FILE) + DEBUG_ECHOLNPGM("index=", index, " currentindex=", currentindex); + #endif + + if (currentindex == 0 && folderdepth > 0) { // Add a link to go up a folder + nextion.SendtoTFT(PSTR("vis p0,1")); + nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + SEND_VAL("tmpUP", "0"); + files--; + } + else { + nextion.SendtoTFT(PSTR("vis p0,0")); + nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + } + + for (uint16_t seek = currentindex; seek < currentindex + files; seek++) { + if (filelist.seek(seek)) { + nextion.SendtoTFT(PSTR("s")); + LCD_SERIAL.print(fcnt); + nextion.SendtoTFT(PSTR(".txt=\"")); + if (filelist.isDir()) { + LCD_SERIAL.print(filelist.shortFilename()); + nextion.SendtoTFT(PSTR("/\"")); + nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + + nextion.SendtoTFT(PSTR("l")); + LCD_SERIAL.print(fcnt); + nextion.SendtoTFT(PSTR(".txt=\"")); + LCD_SERIAL.print(filelist.filename()); + nextion.SendtoTFT(PSTR("\"")); + nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + SEND_PCO2("l", fcnt, "1055"); + } + else { + LCD_SERIAL.print(currentfoldername); + LCD_SERIAL.print(filelist.shortFilename()); + nextion.SendtoTFT(PSTR("\"")); + nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + + nextion.SendtoTFT(PSTR("l")); + LCD_SERIAL.print(fcnt); + nextion.SendtoTFT(PSTR(".txt=\"")); + LCD_SERIAL.print(filelist.longFilename()); + nextion.SendtoTFT(PSTR("\"")); + nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + } + fcnt++; + fseek = seek; + #if NEXDEBUG(AC_FILE) + DEBUG_ECHOLNPGM("-", seek, " '", filelist.longFilename(), "' '", currentfoldername, "", filelist.shortFilename(), "'\n"); + #endif + } + } + SEND_VAL("n0", filelist.count()); + SEND_VAL("n1", fseek + 1); +} + +void FileNavigator::changeDIR(char *folder) { + #if NEXDEBUG(AC_FILE) + DEBUG_ECHOLNPGM("currentfolder: ", currentfoldername, " New: ", folder); + #endif + if (folderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth + strcat(currentfoldername, folder); + strcat(currentfoldername, "/"); + filelist.changeDir(folder); + refresh(); + folderdepth++; + currentindex = 0; +} + +void FileNavigator::upDIR() { + filelist.upDir(); + refresh(); + folderdepth--; + currentindex = 0; + // Remove the last child folder from the stored path + if (folderdepth == 0) { + currentfoldername[0] = '\0'; + reset(); + } + else { + char *pos = nullptr; + for (uint8_t f = 0; f < folderdepth; f++) + pos = strchr(currentfoldername, '/'); + pos[1] = '\0'; + } + #if NEXDEBUG(AC_FILE) + DEBUG_ECHOLNPGM("depth: ", folderdepth, " currentfoldername: ", currentfoldername); + #endif +} + +char* FileNavigator::getCurrentFolderName() { return currentfoldername; } + +#endif // NEXTION_TFT diff --git a/Marlin/src/lcd/extui/nextion/FileNavigator.h b/Marlin/src/lcd/extui/nextion/FileNavigator.h new file mode 100644 index 000000000000..fd29bceadea7 --- /dev/null +++ b/Marlin/src/lcd/extui/nextion/FileNavigator.h @@ -0,0 +1,53 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/* **************************************** + * lcd/extui/nextion/FileNavigator.cpp + * **************************************** + * Extensible_UI implementation for Nextion + * https://github.com/Skorpi08 + * ***************************************/ + +#include "nextion_tft_defs.h" // for MAX_PATH_LEN +#include "../ui_api.h" + +using namespace ExtUI; + +class FileNavigator { + public: + FileNavigator(); + static void reset(); + static void getFiles(uint16_t); + static void upDIR(); + static void changeDIR(char *); + static void refresh(); + static char* getCurrentFolderName(); + private: + static FileList filelist; + static char currentfoldername[MAX_PATH_LEN]; + static uint16_t lastindex; + static uint8_t folderdepth; + static uint16_t currentindex; +}; + +extern FileNavigator filenavigator; diff --git a/Marlin/src/lcd/extui/nextion/nextion_extui.cpp b/Marlin/src/lcd/extui/nextion/nextion_extui.cpp new file mode 100644 index 000000000000..a825bd502f1d --- /dev/null +++ b/Marlin/src/lcd/extui/nextion/nextion_extui.cpp @@ -0,0 +1,121 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * lcd/extui/nextion_lcd.cpp + * + * Nextion TFT support for Marlin + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(NEXTION_TFT) + +#include "../ui_api.h" +#include "nextion_tft.h" + +namespace ExtUI { + + void onStartup() { nextion.Startup(); } + void onIdle() { nextion.IdleLoop(); } + void onPrinterKilled(PGM_P const error, PGM_P const component) { nextion.PrinterKilled(error,component); } + void onMediaInserted() {} + void onMediaError() {} + void onMediaRemoved() {} + void onPlayTone(const uint16_t frequency, const uint16_t duration) {} + void onPrintTimerStarted() {} + void onPrintTimerPaused() {} + void onPrintTimerStopped() {} + void onFilamentRunout(const extruder_t) {} + void onUserConfirmRequired(const char * const msg) { nextion.ConfirmationRequest(msg); } + void onStatusChanged(const char * const msg) { nextion.StatusChange(msg); } + + void onHomingStart() {} + void onHomingComplete() {} + void onPrintFinished() { nextion.PrintFinished(); } + + void onFactoryReset() {} + + void onStoreSettings(char *buff) { + // Called when saving to EEPROM (i.e. M500). If the ExtUI needs + // permanent data to be stored, it can write up to eeprom_data_size bytes + // into buff. + + // Example: + // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // memcpy(buff, &myDataStruct, sizeof(myDataStruct)); + } + + void onLoadSettings(const char *buff) { + // Called while loading settings from EEPROM. If the ExtUI + // needs to retrieve data, it should copy up to eeprom_data_size bytes + // from buff + + // Example: + // static_assert(sizeof(myDataStruct) <= ExtUI::eeprom_data_size); + // memcpy(&myDataStruct, buff, sizeof(myDataStruct)); + } + + void onPostprocessSettings() { + // Called after loading or resetting stored settings + } + + void onConfigurationStoreWritten(bool success) { + // Called after the entire EEPROM has been written, + // whether successful or not. + } + + void onConfigurationStoreRead(bool success) { + // Called after the entire EEPROM has been read, + // whether successful or not. + } + + #if HAS_MESH + void onMeshLevelingStart() {} + + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { + // Called when any mesh points are updated + } + + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const ExtUI::probe_state_t state) { + // Called to indicate a special condition + } + #endif + + #if ENABLED(POWER_LOSS_RECOVERY) + void onPowerLossResume() { + // Called on resume from power-loss + } + #endif + + #if HAS_PID_HEATING + void onPidTuning(const result_t rst) { + // Called for temperature PID tuning result + nextion.PanelInfo(37); + } + #endif + + void onSteppersDisabled() {} + void onSteppersEnabled() {} +} + +#endif // NEXTION_TFT diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp new file mode 100644 index 000000000000..c4e0e66a39bc --- /dev/null +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp @@ -0,0 +1,737 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/* **************************************** + * lcd/extui/nextion/nextion_tft.h + * **************************************** + * Extensible_UI implementation for Nextion + * https://github.com/Skorpi08 + * ***************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +#if ENABLED(NEXTION_TFT) + +#include "../../../MarlinCore.h" +#include "../../../feature/pause.h" +#include "../../../module/stepper.h" +#include "../../../gcode/queue.h" +#include "../../../libs/numtostr.h" +#include "../../../sd/cardreader.h" +#include "FileNavigator.h" +#include "nextion_tft.h" + +#define DEBUG_OUT NEXDEBUGLEVEL +#include "../../../core/debug_out.h" + +char NextionTFT::selectedfile[MAX_PATH_LEN]; +char NextionTFT::nextion_command[MAX_CMND_LEN]; +uint8_t NextionTFT::command_len; + +uint32_t layer = 0; + +NextionTFT nextion; + +NextionTFT::NextionTFT() {} + +void NextionTFT::Startup() { + selectedfile[0] = '\0'; + nextion_command[0] = '\0'; + command_len = 0; + LCD_SERIAL.begin(115200); + + SEND_VAL("tmppage.connected", 0); + delay_ms(100); + SEND_VAL("tmppage.connected", 1); + + SEND_VALasTXT("tmppage.marlin", SHORT_BUILD_VERSION); + SEND_VALasTXT("tmppage.compiled", __DATE__ " / " __TIME__); + SEND_VALasTXT("tmppage.extruder", EXTRUDERS); + SEND_VALasTXT("tmppage.printer", MACHINE_NAME); + SEND_VALasTXT("tmppage.author", STRING_CONFIG_H_AUTHOR); + SEND_VALasTXT("tmppage.released", STRING_DISTRIBUTION_DATE); + SEND_VALasTXT("tmppage.bedx", X_BED_SIZE); + SEND_VALasTXT("tmppage.bedy", Y_BED_SIZE); + SEND_VALasTXT("tmppage.bedz", Z_MAX_POS); + + DEBUG_ECHOLNPGM("Nextion Debug Level ", NEXDEBUGLEVEL); +} + +void NextionTFT::IdleLoop() { + if (ReadTFTCommand()) { + ProcessPanelRequest(); + command_len = 0; + } + UpdateOnChange(); +} + +void NextionTFT::PrinterKilled(PGM_P error, PGM_P component) { + SEND_TXT_END("page error"); + SEND_TXT("t3", "Error"); + SEND_TXT_P("t4", component); + SEND_TXT_P("t5", error); + SEND_TXT("t6", "Need reset"); +} + +void NextionTFT::PrintFinished() { + SEND_TXT_END("page printfinished"); +} + +void NextionTFT::ConfirmationRequest(const char * const msg) { + SEND_VALasTXT("tmppage.M117", msg); + #if NEXDEBUG(N_MARLIN) + DEBUG_ECHOLNPGM("ConfirmationRequest() ", msg, " printer_state:", printer_state); + #endif +} + +void NextionTFT::StatusChange(const char * const msg) { + #if NEXDEBUG(N_MARLIN) + DEBUG_ECHOLNPGM("StatusChange() ", msg, "\nprinter_state:", printer_state); + #endif + SEND_VALasTXT("tmppage.M117", msg); +} + +void NextionTFT::SendtoTFT(PGM_P str) { // A helper to print PROGMEM string to the panel + #if NEXDEBUG(N_SOME) + DEBUG_ECHOPGM_P(str); + #endif + while (const char c = pgm_read_byte(str++)) + LCD_SERIAL.write(c); +} + +bool NextionTFT::ReadTFTCommand() { + bool command_ready = false; + while ((LCD_SERIAL.available() > 0) && (command_len < MAX_CMND_LEN)) { + nextion_command[command_len] = LCD_SERIAL.read(); + if (nextion_command[command_len] == 10) { + command_ready = true; + break; + } + command_len++; + } + + if (command_ready) { + nextion_command[command_len] = 0x00; + if (nextion_command[0] == 'G' || nextion_command[0] == 'M' || nextion_command[0] == 'T') + injectCommands(nextion_command); + #if NEXDEBUG(N_ALL) + DEBUG_ECHOLNPGM("< ", nextion_command); + #endif + #if NEXDEBUG(N_SOME) + uint8_t req = atoi(&nextion_command[1]); + if (req > 7 && req != 20) + DEBUG_ECHOLNPGM( "> ", AS_CHAR(nextion_command[0]), + "\n> ", AS_CHAR(nextion_command[1]), + "\n> ", AS_CHAR(nextion_command[2]), + "\n> ", AS_CHAR(nextion_command[3]), + "\nprinter_state:", printer_state); + #endif + } + return command_ready; +} + +void NextionTFT::SendFileList(int8_t startindex) { + // respond to panel request for 7 files starting at index + #if NEXDEBUG(N_INFO) + DEBUG_ECHOLNPGM("## SendFileList ## ", startindex); + #endif + filenavigator.getFiles(startindex); +} + +void NextionTFT::SelectFile() { + strncpy(selectedfile, nextion_command + 4, command_len - 4); + selectedfile[command_len - 5] = '\0'; + #if NEXDEBUG(N_FILE) + DEBUG_ECHOLNPAIR_F(" Selected File: ", selectedfile); + #endif + switch (selectedfile[0]) { + case '/': // Valid file selected + //SEND_TXT("tmppage.M117", msg_sd_file_open_success); + break; + case '<': // .. (go up folder level) + filenavigator.upDIR(); + SendFileList(0); + break; + default: // enter sub folder + filenavigator.changeDIR(selectedfile); + SendFileList(0); + break; + } +} + +void NextionTFT::_format_time(char *outstr, uint32_t time) { + const uint8_t hrs = time / 3600, + min = (time / 60) % 60, + sec = time % 60; + if (hrs) + sprintf_P(outstr, PSTR("%02d:%02dm"), hrs, min); + else + sprintf_P(outstr, PSTR("%02d:%02ds"), min, sec); +} + +void NextionTFT::ProcessPanelRequest() { + // Break these up into logical blocks as its easier to navigate than one huge switch case! + if (nextion_command[0] == 'X') { + int8_t req = atoi(&nextion_command[1]); + + // Information requests + if (req <= 49) + PanelInfo(req); + + // Simple Actions + else if (req >= 50) + PanelAction(req); + } +} + +#define SEND_NA(A) SEND_TXT(A, "n/a") + +void NextionTFT::PanelInfo(uint8_t req) { + switch (req) { + case 0: break; + + case 1: // Get SD Card list + if (!isPrinting()) { + if (!isMediaInserted()) safe_delay(500); + if (!isMediaInserted()) { // Make sure the card is removed + //SEND_TXT("tmppage.M117", msg_no_sd_card); + } + else if (nextion_command[3] == 'S') + SendFileList(atoi(&nextion_command[4])); + } + break; + + case 2: // Printer Info + if (!isPrinting()) { + SEND_VAL("tmppage.connected", 1); + SEND_VALasTXT("tmppage.marlin", SHORT_BUILD_VERSION); + SEND_VALasTXT("tmppage.compiled", __DATE__ " / " __TIME__); + SEND_VALasTXT("tmppage.extruder", EXTRUDERS); + SEND_VALasTXT("tmppage.printer", MACHINE_NAME); + SEND_VALasTXT("tmppage.author", STRING_CONFIG_H_AUTHOR); + SEND_VALasTXT("tmppage.released", STRING_DISTRIBUTION_DATE); + SEND_VALasTXT("tmppage.bedx", X_BED_SIZE); + SEND_VALasTXT("tmppage.bedy", Y_BED_SIZE); + SEND_VALasTXT("tmppage.bedz", Z_MAX_POS); + SEND_TEMP("tmppage.t0", ui8tostr3rj(getActualTemp_celsius(E0)), " / ", ui8tostr3rj(getTargetTemp_celsius(E0))); + SEND_TEMP("tmppage.t1", ui8tostr3rj(getActualTemp_celsius(E1)), " / ", ui8tostr3rj(getTargetTemp_celsius(E1))); + SEND_TEMP("tmppage.t2", ui8tostr3rj(getActualTemp_celsius(BED)), " / ", ui8tostr3rj(getTargetTemp_celsius(BED))); + SEND_VALasTXT("tmppage.tool", getActiveTool()); + SEND_VALasTXT("tmppage.fan", ui8tostr3rj(getActualFan_percent(FAN0))); + SEND_VALasTXT("tmppage.speed", getFeedrate_percent()); + SEND_VALasTXT("tmppage.flow", getFlow_percent(getActiveTool())); + SEND_VALasTXT("tmppage.progress", ui8tostr3rj(getProgress_percent())); + SEND_VALasTXT("tmppage.layer", layer); + SEND_VALasTXT("tmppage.x", getAxisPosition_mm(X)); + SEND_VALasTXT("tmppage.y", getAxisPosition_mm(Y)); + SEND_VALasTXT("tmppage.z", getAxisPosition_mm(Z)); + SEND_VAL("tmppage.homed", isPositionKnown()); + SEND_VAL("tmppage.homedx", isAxisPositionKnown(X)); + SEND_VAL("tmppage.homedy", isAxisPositionKnown(Y)); + SEND_VAL("tmppage.homedz", isAxisPositionKnown(Z)); + #if ENABLED(DUAL_X_CARRIAGE) + SEND_VAL("tmppage.idexmode", getIDEX_Mode()); + #endif + SEND_TXT("tmppage.M117", msg_welcome); + } + break; + + case 23: // Linear Advance + #if ENABLED(LIN_ADVANCE) + SEND_VALasTXT("linadvance", getLinearAdvance_mm_mm_s(getActiveTool())); + #else + SEND_NA("linadvance"); + #endif + break; + + case 24: // TMC Motor Current + #if HAS_TRINAMIC_CONFIG + #define SEND_TRINAMIC_CURR(A, B) SEND_VALasTXT(A, getAxisCurrent_mA(B)) + #else + #define SEND_TRINAMIC_CURR(A, B) SEND_NA(A) + #endif + SEND_TRINAMIC_CURR("x", X); + SEND_TRINAMIC_CURR("x2", X2); + SEND_TRINAMIC_CURR("y", Y); + SEND_TRINAMIC_CURR("y2", Y2); + SEND_TRINAMIC_CURR("z", Z); + SEND_TRINAMIC_CURR("z2", Z2); + SEND_TRINAMIC_CURR("e", E0); + SEND_TRINAMIC_CURR("e1", E1); + break; + + case 25: // TMC Bump Sensitivity + #if HAS_TRINAMIC_CONFIG + #define SEND_TRINAMIC_BUMP(A, B) SEND_VALasTXT(A, getTMCBumpSensitivity(B)) + #else + #define SEND_TRINAMIC_BUMP(A, B) SEND_NA(A) + #endif + SEND_TRINAMIC_BUMP("x", X); + SEND_TRINAMIC_BUMP("x2", X2); + SEND_TRINAMIC_BUMP("y", Y); + SEND_TRINAMIC_BUMP("y2", Y2); + SEND_TRINAMIC_BUMP("z", Z); + SEND_TRINAMIC_BUMP("z2", Z2); + break; + + case 26: // TMC Hybrid Threshold Speed + #if 0 && BOTH(HAS_TRINAMIC_CONFIG, HYBRID_THRESHOLD) + #define SEND_TRINAMIC_THRS(A, B) SEND_VALasTXT(A, getAxisPWMthrs(B)) + #else + #define SEND_TRINAMIC_THRS(A, B) SEND_NA(A) + #endif + SEND_TRINAMIC_THRS("x", X); + SEND_TRINAMIC_THRS("x2", X2); + SEND_TRINAMIC_THRS("y", Y); + SEND_TRINAMIC_THRS("y2", Y2); + SEND_TRINAMIC_THRS("z", Z); + SEND_TRINAMIC_THRS("z2", Z2); + SEND_TRINAMIC_THRS("e", E0); + SEND_TRINAMIC_THRS("e1", E1); + break; + + case 27: // Printcounter + #if ENABLED(PRINTCOUNTER) + char buffer[21]; + #define SEND_PRINT_INFO(A, B) SEND_VALasTXT(A, B(buffer)) + #else + #define SEND_PRINT_INFO(A, B) SEND_NA(A) + #endif + SEND_PRINT_INFO("t5", getTotalPrints_str); + SEND_PRINT_INFO("t3", getFinishedPrints_str); + SEND_PRINT_INFO("t4", getFailedPrints_str); + SEND_PRINT_INFO("t6", getTotalPrintTime_str); + SEND_PRINT_INFO("t7", getLongestPrint_str); + SEND_PRINT_INFO("t8", getFilamentUsed_str); + break; + + case 28: // Filament laod/unload + #if ENABLED(ADVANCED_PAUSE_FEATURE) + #define SEND_PAUSE_INFO(A, B) SEND_VALasTXT(A, fc_settings[getActiveTool()].B) + #else + #define SEND_PAUSE_INFO(A, B) SEND_NA(A) + #endif + SEND_PAUSE_INFO("filamentin", load_length); + SEND_PAUSE_INFO("filamentout", unload_length); + break; + + case 29: // Preheat + #if PREHEAT_COUNT + if (!isPrinting()) { + // Preheat PLA + if (nextion_command[4] == 'P') { + SEND_VALasTXT("pe", getMaterial_preset_E(0)); + #if HAS_HEATED_BED + SEND_VALasTXT("pb", getMaterial_preset_B(0)); + #endif + } + + // Preheat ABS + if (nextion_command[4] == 'A') { + SEND_VALasTXT("ae", getMaterial_preset_E(1)); + #if HAS_HEATED_BED + SEND_VALasTXT("ab", getMaterial_preset_B(1)); + #endif + } + + // Preheat PETG + if (nextion_command[4] == 'G') { + #ifdef PREHEAT_3_TEMP_HOTEND + SEND_VALasTXT("ge", getMaterial_preset_E(2)); + #if HAS_HEATED_BED + SEND_VALasTXT("gb", getMaterial_preset_B(2)); + #endif + #endif + } + } + #endif + break; + + case 30: // Velocity + SEND_VALasTXT("x", getAxisMaxFeedrate_mm_s(X)); + SEND_VALasTXT("y", getAxisMaxFeedrate_mm_s(Y)); + SEND_VALasTXT("z", getAxisMaxFeedrate_mm_s(Z)); + SEND_VALasTXT("e", getAxisMaxFeedrate_mm_s(getActiveTool())); + SEND_VALasTXT("min", getMinFeedrate_mm_s()); + SEND_VALasTXT("tmin", getMinTravelFeedrate_mm_s()); + break; + + case 31: // Jerk + #if ENABLED(CLASSIC_JERK) + #define SEND_JERK_INFO(A, B) SEND_VALasTXT(A, getAxisMaxJerk_mm_s(B)) + #else + #define SEND_JERK_INFO(A, B) SEND_NA(A) + //SEND_VALasTXT("x", getJunctionDeviation_mm()); + SEND_TXT("tmppage.M117", "classic Jerk not enabled"); + #endif + SEND_JERK_INFO("x", X); + SEND_JERK_INFO("y", Y); + SEND_JERK_INFO("z", Z); + SEND_JERK_INFO("e", getActiveTool()); + break; + + case 32: // Steps-per-mm + SEND_VALasTXT("x", getAxisSteps_per_mm(X)); + SEND_VALasTXT("y", getAxisSteps_per_mm(Y)); + SEND_VALasTXT("z", getAxisSteps_per_mm(Z)); + SEND_VALasTXT("e0", getAxisSteps_per_mm(E0)); + SEND_VALasTXT("e1", getAxisSteps_per_mm(E1)); + break; + + case 33: // Acceleration + SEND_VALasTXT("x", ui16tostr5rj(getAxisMaxAcceleration_mm_s2(X))); + SEND_VALasTXT("y", ui16tostr5rj(getAxisMaxAcceleration_mm_s2(Y))); + SEND_VALasTXT("z", ui16tostr5rj(getAxisMaxAcceleration_mm_s2(Z))); + SEND_VALasTXT("e", ui16tostr5rj(getAxisMaxAcceleration_mm_s2(getActiveTool()))); + SEND_VALasTXT("print", ui16tostr5rj(getPrintingAcceleration_mm_s2())); + SEND_VALasTXT("retract", ui16tostr5rj(getRetractAcceleration_mm_s2())); + SEND_VALasTXT("travel", ui16tostr5rj(getTravelAcceleration_mm_s2())); + break; + + case 34: // Dual X carriage offset + #if ENABLED(DUAL_X_CARRIAGE) + #define SEND_IDEX_INFO(A, B) SEND_VALasTXT(A, getNozzleOffset_mm(B, getActiveTool())) + #else + #define SEND_IDEX_INFO(A, B) SEND_NA(A) + #endif + SEND_IDEX_INFO("x", X); + SEND_IDEX_INFO("y", Y); + SEND_IDEX_INFO("z", Z); + break; + + case 35: // Probe offset + #if HAS_PROBE_XY_OFFSET + #define SEND_PROBE_INFO(A, B) SEND_VALasTXT(A, getProbeOffset_mm(B)) + #else + #define SEND_PROBE_INFO(A, B) SEND_NA(A) + #endif + SEND_PROBE_INFO("x", X); + SEND_PROBE_INFO("y", Y); + SEND_VALasTXT("z", getZOffset_mm()); + break; + + case 36: // Endstop Info + #if HAS_X_MIN + SEND_VALasTXT("x1", READ(X_MIN_PIN) != X_MIN_ENDSTOP_INVERTING ? "triggered" : "open"); + #endif + #if HAS_X_MAX + SEND_VALasTXT("x2", READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTING ? "triggered" : "open"); + #endif + #if HAS_Y_MIN + SEND_VALasTXT("y1", READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTING ? "triggered" : "open"); + #endif + #if HAS_Z_MIN + SEND_VALasTXT("z1", READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING ? "triggered" : "open"); + #endif + #if HAS_Z_MAX + SEND_VALasTXT("z2", READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING ? "triggered" : "open"); + #endif + #if HAS_Z2_MIN + SEND_VALasTXT("z2", READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING ? "triggered" : "open"); + #endif + #if HAS_Z2_MAX + SEND_VALasTXT("z2", READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING ? "triggered" : "open"); + #endif + #if HAS_BED_PROBE + //SEND_VALasTXT("bltouch", READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING ? "triggered" : "open"); + #else + SEND_NA("bltouch"); + #endif + break; + + case 37: // PID + #if ENABLED(PIDTEMP) + #define SEND_PID_INFO_0(A, B) SEND_VALasTXT(A, getPIDValues_K##B(E0)) + #else + #define SEND_PID_INFO_0(A, B) SEND_NA(A) + #endif + #if BOTH(PIDTEMP, HAS_MULTI_EXTRUDER) + #define SEND_PID_INFO_1(A, B) SEND_VALasTXT(A, getPIDValues_K##B(E1)) + #else + #define SEND_PID_INFO_1(A, B) SEND_NA(A) + #endif + #if ENABLED(PIDTEMPBED) + #define SEND_PID_INFO_BED(A, B) SEND_VALasTXT(A, getBedPIDValues_K##B()) + #else + #define SEND_PID_INFO_BED(A, B) SEND_NA(A) + #endif + SEND_PID_INFO_0("p0", p); + SEND_PID_INFO_0("i0", i); + SEND_PID_INFO_0("d0", d); + + SEND_PID_INFO_1("p1", p); + SEND_PID_INFO_1("i1", i); + SEND_PID_INFO_1("d1", d); + + SEND_PID_INFO_BED("hbp", p); + SEND_PID_INFO_BED("hbi", i); + SEND_PID_INFO_BED("hbd", d); + break; + } +} + +void NextionTFT::PanelAction(uint8_t req) { + switch (req) { + + case 50: // Pause SD print + //if (isPrintingFromMedia()) { + //SEND_TXT("tmppage.M117", "Paused"); + pausePrint(); + SEND_TXT_END("qpause.picc=29"); + //} + break; + + case 51: // Resume SD Print + resumePrint(); + SEND_TXT_END("qpause.picc=28"); + break; + + case 52: // Stop SD print + //if (isPrintingFromMedia()) { + stopPrint(); + SEND_TXT_END("page prepare"); + //} + break; + + case 54: // A13 Select file + SelectFile(); + break; + + case 65: // Cool Down + if (!isPrinting()) coolDown(); + break; + + case 66: // Refresh SD + if (!isPrinting()) { + injectCommands_P(PSTR("M21")); + filenavigator.reset(); + } + break; + + case 56: // Set Fan, Flow, Print Speed + switch (nextion_command[4]) { + case 'S': setTargetFan_percent(atof(&nextion_command[5]), FAN0); break; + case 'P': setFeedrate_percent(atoi(&nextion_command[5])); break; + case 'F': setFlow_percent(atoi(&nextion_command[5]), getActiveTool()); break; + } + break; + + case 57: // Disable Motors + if (!isPrinting()) { + stepper.disable_all_steppers(); + SEND_TXT("tmppage.M117", "Motors disabled"); + } + break; + + case 58: // Load/Unload Filament + #if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) + if (canMove(getActiveTool())) { + switch (nextion_command[4]) { + case 'L': injectCommands_P(PSTR("M701")); break; + case 'U': injectCommands_P(PSTR("M702")); break; + } + } + else { + SEND_TXT("tmppage.M117", "Preheat first"); + SEND_TXT_END("page preheat"); + } + #else + SEND_TXT("tmppage.M117", "Filament loading disabled"); + #endif + break; + + case 63: // Preheat // Temps defined in configuration.h + #if PREHEAT_COUNT + if (!isPrinting()) switch (nextion_command[4]) { + // Preheat PLA + case 'P': + #if HAS_HEATED_BED + setTargetTemp_celsius(getMaterial_preset_B(0), BED); + #endif + setTargetTemp_celsius(getMaterial_preset_E(0), getActiveTool()); + break; + + // Preheat ABS + case 'A': + #if HAS_HEATED_BED + setTargetTemp_celsius(getMaterial_preset_B(1), BED); + #endif + setTargetTemp_celsius(getMaterial_preset_E(1), getActiveTool()); + break; + + // Preheat PETG + case 'G': + #if HAS_HEATED_BED + setTargetTemp_celsius(getMaterial_preset_B(2), BED); + #endif + setTargetTemp_celsius(getMaterial_preset_E(2), getActiveTool()); + break; + } + #else + SEND_TXT("tmppage.M117", "Preheat disabled"); + #endif + break; + } +} + +void NextionTFT::UpdateOnChange() { + const millis_t ms = millis(); + static millis_t next_event_ms = 0; + static celsius_float_t last_degBed = 999, last_degHotend0 = 999, last_degHotend1 = 999, + last_degTargetBed = 999, last_degTargetHotend0 = 999, last_degTargetHotend1 = 999; + + // tmppage Temperature + if (!WITHIN(last_degHotend0 - getActualTemp_celsius(E0), -0.2, 0.2) || !WITHIN(last_degTargetHotend0 - getTargetTemp_celsius(E0), -0.5, 0.5)) { + SEND_TEMP("tmppage.t0", ui8tostr3rj(getActualTemp_celsius(E0)), " / ", ui8tostr3rj(getTargetTemp_celsius(E0))); + last_degHotend0 = getActualTemp_celsius(E0); + last_degTargetHotend0 = getTargetTemp_celsius(E0); + } + + if (!WITHIN(last_degHotend1 - getActualTemp_celsius(E1), -0.2, 0.2) || !WITHIN(last_degTargetHotend1 - getTargetTemp_celsius(E1), -0.5, 0.5)) { + SEND_TEMP("tmppage.t1", ui8tostr3rj(getActualTemp_celsius(E1)), " / ", ui8tostr3rj(getTargetTemp_celsius(E1))); + last_degHotend1 = getActualTemp_celsius(E1); + last_degTargetHotend1 = getTargetTemp_celsius(E1); + } + + if (!WITHIN(last_degBed - getActualTemp_celsius(BED), -0.2, 0.2) || !WITHIN(last_degTargetBed - getTargetTemp_celsius(BED), -0.5, 0.5)) { + SEND_TEMP("tmppage.t2", ui8tostr3rj(getActualTemp_celsius(BED)), " / ", ui8tostr3rj(getTargetTemp_celsius(BED))); + last_degBed = getActualTemp_celsius(BED); + last_degTargetBed = getTargetTemp_celsius(BED); + } + + // tmppage Tool + static uint8_t last_active_extruder = 99; + if (last_active_extruder != getActiveTool()) { + SEND_VALasTXT("tmppage.tool", getActiveTool()); + last_active_extruder = getActiveTool(); + } + + // tmppage Fan Speed + static uint8_t last_fan_speed = 99; + if (last_fan_speed != getActualFan_percent(FAN0)) { + SEND_VALasTXT("tmppage.fan", ui8tostr3rj(getActualFan_percent(FAN0))); + last_fan_speed = getActualFan_percent(FAN0); + } + + // tmppage Print Speed + static uint8_t last_print_speed = 99; + if (last_print_speed != getFeedrate_percent()) { + SEND_VALasTXT("tmppage.speed", ui8tostr3rj(getFeedrate_percent())); + last_print_speed = getFeedrate_percent(); + } + + // tmppage Flow + static uint8_t last_flow_speed = 99; + if (last_flow_speed != getFlow_percent(getActiveTool())) { + SEND_VALasTXT("tmppage.flow", getFlow_percent(getActiveTool())); + last_flow_speed = getFlow_percent(getActiveTool()); + } + + // tmppage Axis + static float last_get_axis_position_mmX = 999, last_get_axis_position_mmY = 999, last_get_axis_position_mmZ = 999; + + // tmppage Progress + Layer + Time + if (isPrinting()) { + + if (ELAPSED(ms, next_event_ms)) { + next_event_ms = ms + 1000; + #if ENABLED(SHOW_REMAINING_TIME) + const uint32_t remaining = getProgress_seconds_remaining(); + char remaining_str[10]; + _format_time(remaining_str, remaining); + SEND_VALasTXT("tmppage.remaining", remaining_str); + #endif + const uint32_t elapsed = getProgress_seconds_elapsed(); + char elapsed_str[10]; + _format_time(elapsed_str, elapsed); + SEND_VALasTXT("tmppage.elapsed", elapsed_str); + } + + static uint8_t last_progress = 99; + if (last_progress != getProgress_percent()) { + SEND_VALasTXT("tmppage.progress", ui8tostr3rj(getProgress_percent())); + last_progress = getProgress_percent(); + } + + if (last_get_axis_position_mmZ < getAxisPosition_mm(Z)) { + layer++; + SEND_VALasTXT("tmppage.layer", layer); + } + + if (last_get_axis_position_mmZ > getAxisPosition_mm(Z)) { + layer--; + SEND_VALasTXT("tmppage.layer", layer); + } + } + + if (!WITHIN(last_get_axis_position_mmX - getAxisPosition_mm(X), -0.1, 0.1)) { + if (ELAPSED(ms, next_event_ms)) { + next_event_ms = ms + 30; + SEND_VALasTXT("tmppage.x", getAxisPosition_mm(X)); + last_get_axis_position_mmX = getAxisPosition_mm(X); + } + } + + if (!WITHIN(last_get_axis_position_mmY - getAxisPosition_mm(Y), -0.1, 0.1)) { + if (ELAPSED(ms, next_event_ms)) { + next_event_ms = ms + 30; + SEND_VALasTXT("tmppage.y", getAxisPosition_mm(Y)); + last_get_axis_position_mmY = getAxisPosition_mm(Y); + } + } + + if (!WITHIN(last_get_axis_position_mmZ - getAxisPosition_mm(Z), -0.1, 0.1)) { + SEND_VALasTXT("tmppage.z", getAxisPosition_mm(Z)); + last_get_axis_position_mmZ = getAxisPosition_mm(Z); + } + + // tmppage homed + static bool last_homed = false, last_homedX = false, last_homedY = false, last_homedZ = false; + + if (last_homed != isPositionKnown()) { + SEND_VAL("tmppage.homed", isPositionKnown()); + last_homed = isPositionKnown(); + } + if (last_homedX != isAxisPositionKnown(X)) { + SEND_VAL("tmppage.homedx", isAxisPositionKnown(X)); + last_homedX = isAxisPositionKnown(X); + } + if (last_homedY != isAxisPositionKnown(Y)) { + SEND_VAL("tmppage.homedy", isAxisPositionKnown(Y)); + last_homedY = isAxisPositionKnown(Y); + } + if (last_homedZ != isAxisPositionKnown(Z)) { + SEND_VAL("tmppage.homedz", isAxisPositionKnown(Z)); + last_homedZ = isAxisPositionKnown(Z); + } + + #if ENABLED(DUAL_X_CARRIAGE) + // tmppage IDEX Mode + static uint8_t last_IDEX_Mode = 99; + if (last_IDEX_Mode != getIDEX_Mode()) { + SEND_VAL("tmppage.idexmode", getIDEX_Mode()); + last_IDEX_Mode = getIDEX_Mode(); + } + #endif +} + +#endif // NEXTION_TFT diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.h b/Marlin/src/lcd/extui/nextion/nextion_tft.h new file mode 100644 index 000000000000..4eb5fbe0b7fb --- /dev/null +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.h @@ -0,0 +1,62 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/* **************************************** + * lcd/extui/nextion/nextion_tft.h + * **************************************** + * Extensible_UI implementation for Nextion + * https://github.com/Skorpi08 + * ***************************************/ + +#include "nextion_tft_defs.h" +#include "../../../inc/MarlinConfigPre.h" +#include "../ui_api.h" + +class NextionTFT { + private: + static uint8_t command_len; + static char nextion_command[MAX_CMND_LEN]; + static char selectedfile[MAX_PATH_LEN]; + + public: + NextionTFT(); + static void Startup(); + static void IdleLoop(); + static void PrinterKilled(PGM_P, PGM_P); + static void ConfirmationRequest(const char * const ); + static void StatusChange(const char * const ); + static void SendtoTFT(PGM_P); + static void UpdateOnChange(); + static void PrintFinished(); + static void PanelInfo(uint8_t); + + private: + static bool ReadTFTCommand(); + static void SendFileList(int8_t); + static void SelectFile(); + static void ProcessPanelRequest(); + static void PanelAction(uint8_t); + static void _format_time(char *, uint32_t); +}; + +extern NextionTFT nextion; diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft_defs.h b/Marlin/src/lcd/extui/nextion/nextion_tft_defs.h new file mode 100644 index 000000000000..32d3ea329552 --- /dev/null +++ b/Marlin/src/lcd/extui/nextion/nextion_tft_defs.h @@ -0,0 +1,63 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/* **************************************** + * lcd/extui/nextion/nextion_tft_defs.h + * **************************************** + * Extensible_UI implementation for Nextion + * https://github.com/Skorpi08 + * ***************************************/ + +#include "../../../inc/MarlinConfigPre.h" + +//#define NEXDEBUGLEVEL 255 +#if NEXDEBUGLEVEL + // Bit-masks for selective debug: + enum NexDebugMask : uint8_t { + N_INFO = _BV(0), + N_ACTION = _BV(1), + N_FILE = _BV(2), + N_PANEL = _BV(3), + N_MARLIN = _BV(4), + N_SOME = _BV(5), + N_ALL = _BV(6) + }; + #define NEXDEBUG(M) (((M) & NEXDEBUGLEVEL) == M) // Debug flag macro +#else + #define NEXDEBUG(M) false +#endif + +#define MAX_FOLDER_DEPTH 4 // Limit folder depth TFT has a limit for the file path +#define MAX_CMND_LEN 16 * MAX_FOLDER_DEPTH // Maximum Length for a Panel command +#define MAX_PATH_LEN 16 * MAX_FOLDER_DEPTH // Maximum number of characters in a SD file path + + // TFT panel commands +#define msg_welcome MACHINE_NAME " Ready." + +#define SEND_TEMP(x,y,t,z) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".txt=\"")), LCD_SERIAL.print(y), nextion.SendtoTFT(PSTR(t)), LCD_SERIAL.print(z), nextion.SendtoTFT(PSTR("\"\xFF\xFF\xFF"))) +#define SEND_VAL(x,y) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".val=")), LCD_SERIAL.print(y), nextion.SendtoTFT(PSTR("\xFF\xFF\xFF"))) +#define SEND_TXT(x,y) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".txt=\"")), nextion.SendtoTFT(PSTR(y)), nextion.SendtoTFT(PSTR("\"\xFF\xFF\xFF"))) +#define SEND_TXT_P(x,y) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".txt=\"")), nextion.SendtoTFT(y), nextion.SendtoTFT(PSTR("\"\xFF\xFF\xFF"))) +#define SEND_VALasTXT(x,y) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".txt=\"")), LCD_SERIAL.print(y), nextion.SendtoTFT(PSTR("\"\xFF\xFF\xFF"))) +#define SEND_TXT_END(x) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR("\xFF\xFF\xFF"))) +#define SEND_PCO2(x,y,z) (nextion.SendtoTFT(PSTR(x)), LCD_SERIAL.print(y), nextion.SendtoTFT(PSTR(".pco=")), nextion.SendtoTFT(PSTR(z)), nextion.SendtoTFT(PSTR("\xFF\xFF\xFF"))) diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index d1ffb4c4379b..d37b277110ac 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -47,6 +47,7 @@ #include "../marlinui.h" #include "../../gcode/queue.h" +#include "../../gcode/gcode.h" #include "../../module/motion.h" #include "../../module/planner.h" #include "../../module/probe.h" @@ -54,6 +55,7 @@ #include "../../module/printcounter.h" #include "../../libs/duration_t.h" #include "../../HAL/shared/Delay.h" +#include "../../MarlinCore.h" #include "../../sd/cardreader.h" #if ENABLED(PRINTCOUNTER) @@ -100,11 +102,16 @@ #include "../../feature/host_actions.h" #endif +#if M600_PURGE_MORE_RESUMABLE + #include "../../feature/pause.h" +#endif + namespace ExtUI { static struct { uint8_t printer_killed : 1; - TERN_(JOYSTICK, uint8_t jogging : 1); - TERN_(SDSUPPORT, uint8_t was_sd_printing : 1); + #if ENABLED(JOYSTICK) + uint8_t jogging : 1; + #endif } flags; #ifdef __SAM3X8E__ @@ -175,7 +182,12 @@ namespace ExtUI { #if HAS_HEATED_BED case BED: thermalManager.reset_bed_idle_timer(); return; #endif - TERN_(HAS_HEATED_CHAMBER, case CHAMBER: return); // Chamber has no idle timer + #if HAS_HEATED_CHAMBER + case CHAMBER: return; // Chamber has no idle timer + #endif + #if HAS_COOLER + case COOLER: return; // Cooler has no idle timer + #endif default: TERN_(HAS_HOTEND, thermalManager.reset_hotend_idle_timer(heater - H0)); break; @@ -233,8 +245,12 @@ namespace ExtUI { bool isHeaterIdle(const heater_t heater) { #if HEATER_IDLE_HANDLER switch (heater) { - TERN_(HAS_HEATED_BED, case BED: return thermalManager.heater_idle[thermalManager.IDLE_INDEX_BED].timed_out); - TERN_(HAS_HEATED_CHAMBER, case CHAMBER: return false); // Chamber has no idle timer + #if HAS_HEATED_BED + case BED: return thermalManager.heater_idle[thermalManager.IDLE_INDEX_BED].timed_out; + #endif + #if HAS_HEATED_CHAMBER + case CHAMBER: return false; // Chamber has no idle timer + #endif default: return TERN0(HAS_HOTEND, thermalManager.heater_idle[heater - H0].timed_out); } @@ -250,61 +266,61 @@ namespace ExtUI { #define GET_TEMP_ADJUSTMENT(A) A #endif - float getActualTemp_celsius(const heater_t heater) { + celsius_float_t getActualTemp_celsius(const heater_t heater) { switch (heater) { - TERN_(HAS_HEATED_BED, case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degBed())); - TERN_(HAS_HEATED_CHAMBER, case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degChamber())); + #if HAS_HEATED_BED + case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degBed()); + #endif + #if HAS_HEATED_CHAMBER + case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degChamber()); + #endif default: return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(heater - H0)); } } - float getActualTemp_celsius(const extruder_t extruder) { + celsius_float_t getActualTemp_celsius(const extruder_t extruder) { return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(extruder - E0)); } - float getTargetTemp_celsius(const heater_t heater) { + celsius_float_t getTargetTemp_celsius(const heater_t heater) { switch (heater) { - TERN_(HAS_HEATED_BED, case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed())); - TERN_(HAS_HEATED_CHAMBER, case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetChamber())); + #if HAS_HEATED_BED + case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed()); + #endif + #if HAS_HEATED_CHAMBER + case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetChamber()); + #endif default: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(heater - H0)); } } - float getTargetTemp_celsius(const extruder_t extruder) { + celsius_float_t getTargetTemp_celsius(const extruder_t extruder) { return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(extruder - E0)); } float getTargetFan_percent(const fan_t fan) { - #if HAS_FAN - return thermalManager.fanPercent(thermalManager.fan_speed[fan - FAN0]); - #else - UNUSED(fan); - return 0; - #endif + UNUSED(fan); + return TERN0(HAS_FAN, thermalManager.fanSpeedPercent(fan - FAN0)); } float getActualFan_percent(const fan_t fan) { - #if HAS_FAN - return thermalManager.fanPercent(thermalManager.scaledFanSpeed(fan - FAN0)); - #else - UNUSED(fan); - return 0; - #endif + UNUSED(fan); + return TERN0(HAS_FAN, thermalManager.scaledFanSpeedPercent(fan - FAN0)); } float getAxisPosition_mm(const axis_t axis) { - return TERN_(JOYSTICK, flags.jogging ? destination[axis] :) current_position[axis]; + return current_position[axis]; } float getAxisPosition_mm(const extruder_t extruder) { const extruder_t old_tool = getActiveTool(); setActiveTool(extruder, true); - const float epos = TERN_(JOYSTICK, flags.jogging ? destination.e :) current_position.e; + const float epos = TERN0(JOYSTICK, flags.jogging) ? destination.e : current_position.e; setActiveTool(old_tool, true); return epos; } - void setAxisPosition_mm(const float position, const axis_t axis, const feedRate_t feedrate/*=0*/) { + void setAxisPosition_mm(const_float_t position, const axis_t axis, const feedRate_t feedrate/*=0*/) { // Get motion limit from software endstops, if any float min, max; soft_endstop.get_manual_axis_limits((AxisEnum)axis, min, max); @@ -322,7 +338,7 @@ namespace ExtUI { line_to_current_position(feedrate ?: manual_feedrate_mm_s[axis]); } - void setAxisPosition_mm(const float position, const extruder_t extruder, const feedRate_t feedrate/*=0*/) { + void setAxisPosition_mm(const_float_t position, const extruder_t extruder, const feedRate_t feedrate/*=0*/) { setActiveTool(extruder, true); current_position.e = position; @@ -340,25 +356,24 @@ namespace ExtUI { #endif } - extruder_t getActiveTool() { - switch (active_extruder) { - case 5: return E5; - case 4: return E4; - case 3: return E3; - case 2: return E2; - case 1: return E1; - default: return E0; + extruder_t getTool(const uint8_t extruder) { + switch (extruder) { + default: + case 0: return E0; case 1: return E1; case 2: return E2; case 3: return E3; + case 4: return E4; case 5: return E5; case 6: return E6; case 7: return E7; } } + extruder_t getActiveTool() { return getTool(active_extruder); } + bool isMoving() { return planner.has_blocks_queued(); } bool canMove(const axis_t axis) { switch (axis) { #if IS_KINEMATIC || ENABLED(NO_MOTION_BEFORE_HOMING) case X: return axis_should_home(X_AXIS); - case Y: return axis_should_home(Y_AXIS); - case Z: return axis_should_home(Z_AXIS); + OPTCODE(HAS_Y_AXIS, case Y: return axis_should_home(Y_AXIS)) + OPTCODE(HAS_Z_AXIS, case Z: return axis_should_home(Z_AXIS)) #else case X: case Y: case Z: return true; #endif @@ -370,6 +385,9 @@ namespace ExtUI { return !thermalManager.tooColdToExtrude(extruder - E0); } + GcodeSuite::MarlinBusyState getHostKeepaliveState() { return TERN0(HOST_KEEPALIVE_FEATURE, gcode.busy_state); } + bool getHostKeepaliveIsPaused() { return TERN0(HOST_KEEPALIVE_FEATURE, gcode.host_keepalive_is_paused()); } + #if HAS_SOFTWARE_ENDSTOPS bool getSoftEndstopState() { return soft_endstop._enabled; } void setSoftEndstopState(const bool value) { soft_endstop._enabled = value; } @@ -381,21 +399,36 @@ namespace ExtUI { #if AXIS_IS_TMC(X) case X: return stepperX.getMilliamps(); #endif - #if AXIS_IS_TMC(X2) - case X2: return stepperX2.getMilliamps(); - #endif #if AXIS_IS_TMC(Y) case Y: return stepperY.getMilliamps(); #endif - #if AXIS_IS_TMC(Y2) - case Y2: return stepperY2.getMilliamps(); - #endif #if AXIS_IS_TMC(Z) case Z: return stepperZ.getMilliamps(); #endif + #if AXIS_IS_TMC(I) + case I: return stepperI.getMilliamps(); + #endif + #if AXIS_IS_TMC(J) + case J: return stepperJ.getMilliamps(); + #endif + #if AXIS_IS_TMC(K) + case K: return stepperK.getMilliamps(); + #endif + #if AXIS_IS_TMC(X2) + case X2: return stepperX2.getMilliamps(); + #endif + #if AXIS_IS_TMC(Y2) + case Y2: return stepperY2.getMilliamps(); + #endif #if AXIS_IS_TMC(Z2) case Z2: return stepperZ2.getMilliamps(); #endif + #if AXIS_IS_TMC(Z3) + case Z3: return stepperZ3.getMilliamps(); + #endif + #if AXIS_IS_TMC(Z4) + case Z4: return stepperZ4.getMilliamps(); + #endif default: return NAN; }; } @@ -430,31 +463,46 @@ namespace ExtUI { }; } - void setAxisCurrent_mA(const float mA, const axis_t axis) { + void setAxisCurrent_mA(const_float_t mA, const axis_t axis) { switch (axis) { #if AXIS_IS_TMC(X) case X: stepperX.rms_current(constrain(mA, 400, 1500)); break; #endif - #if AXIS_IS_TMC(X2) - case X2: stepperX2.rms_current(constrain(mA, 400, 1500)); break; - #endif #if AXIS_IS_TMC(Y) case Y: stepperY.rms_current(constrain(mA, 400, 1500)); break; #endif - #if AXIS_IS_TMC(Y2) - case Y2: stepperY2.rms_current(constrain(mA, 400, 1500)); break; - #endif #if AXIS_IS_TMC(Z) case Z: stepperZ.rms_current(constrain(mA, 400, 1500)); break; #endif + #if AXIS_IS_TMC(I) + case I: stepperI.rms_current(constrain(mA, 400, 1500)); break; + #endif + #if AXIS_IS_TMC(J) + case J: stepperJ.rms_current(constrain(mA, 400, 1500)); break; + #endif + #if AXIS_IS_TMC(K) + case K: stepperK.rms_current(constrain(mA, 400, 1500)); break; + #endif + #if AXIS_IS_TMC(X2) + case X2: stepperX2.rms_current(constrain(mA, 400, 1500)); break; + #endif + #if AXIS_IS_TMC(Y2) + case Y2: stepperY2.rms_current(constrain(mA, 400, 1500)); break; + #endif #if AXIS_IS_TMC(Z2) case Z2: stepperZ2.rms_current(constrain(mA, 400, 1500)); break; #endif + #if AXIS_IS_TMC(Z3) + case Z3: stepperZ3.rms_current(constrain(mA, 400, 1500)); break; + #endif + #if AXIS_IS_TMC(Z4) + case Z4: stepperZ4.rms_current(constrain(mA, 400, 1500)); break; + #endif default: break; }; } - void setAxisCurrent_mA(const float mA, const extruder_t extruder) { + void setAxisCurrent_mA(const_float_t mA, const extruder_t extruder) { switch (extruder) { #if AXIS_IS_TMC(E0) case E0: stepperE0.rms_current(constrain(mA, 400, 1500)); break; @@ -486,50 +534,59 @@ namespace ExtUI { int getTMCBumpSensitivity(const axis_t axis) { switch (axis) { - TERN_(X_SENSORLESS, case X: return stepperX.homing_threshold()); - TERN_(X2_SENSORLESS, case X2: return stepperX2.homing_threshold()); - TERN_(Y_SENSORLESS, case Y: return stepperY.homing_threshold()); - TERN_(Y2_SENSORLESS, case Y2: return stepperY2.homing_threshold()); - TERN_(Z_SENSORLESS, case Z: return stepperZ.homing_threshold()); - TERN_(Z2_SENSORLESS, case Z2: return stepperZ2.homing_threshold()); - TERN_(Z3_SENSORLESS, case Z3: return stepperZ3.homing_threshold()); - TERN_(Z4_SENSORLESS, case Z4: return stepperZ4.homing_threshold()); + OPTCODE(X_SENSORLESS, case X: return stepperX.homing_threshold()) + OPTCODE(Y_SENSORLESS, case Y: return stepperY.homing_threshold()) + OPTCODE(Z_SENSORLESS, case Z: return stepperZ.homing_threshold()) + OPTCODE(I_SENSORLESS, case I: return stepperI.homing_threshold()) + OPTCODE(J_SENSORLESS, case J: return stepperJ.homing_threshold()) + OPTCODE(K_SENSORLESS, case K: return stepperK.homing_threshold()) + OPTCODE(X2_SENSORLESS, case X2: return stepperX2.homing_threshold()) + OPTCODE(Y2_SENSORLESS, case Y2: return stepperY2.homing_threshold()) + OPTCODE(Z2_SENSORLESS, case Z2: return stepperZ2.homing_threshold()) + OPTCODE(Z3_SENSORLESS, case Z3: return stepperZ3.homing_threshold()) + OPTCODE(Z4_SENSORLESS, case Z4: return stepperZ4.homing_threshold()) default: return 0; } } - void setTMCBumpSensitivity(const float value, const axis_t axis) { + void setTMCBumpSensitivity(const_float_t value, const axis_t axis) { switch (axis) { - #if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS - #if X_SENSORLESS - case X: stepperX.homing_threshold(value); break; - #endif - #if X2_SENSORLESS - case X2: stepperX2.homing_threshold(value); break; - #endif - #if Y_SENSORLESS - case Y: stepperY.homing_threshold(value); break; - #endif - #if Y2_SENSORLESS - case Y2: stepperY2.homing_threshold(value); break; - #endif - #if Z_SENSORLESS - case Z: stepperZ.homing_threshold(value); break; - #endif - #if Z2_SENSORLESS - case Z2: stepperZ2.homing_threshold(value); break; - #endif - #if Z3_SENSORLESS - case Z3: stepperZ3.homing_threshold(value); break; - #endif - #if Z4_SENSORLESS - case Z4: stepperZ4.homing_threshold(value); break; - #endif - #else - UNUSED(value); + #if X_SENSORLESS + case X: stepperX.homing_threshold(value); break; + #endif + #if Y_SENSORLESS + case Y: stepperY.homing_threshold(value); break; + #endif + #if Z_SENSORLESS + case Z: stepperZ.homing_threshold(value); break; + #endif + #if I_SENSORLESS + case I: stepperI.homing_threshold(value); break; + #endif + #if J_SENSORLESS + case J: stepperJ.homing_threshold(value); break; + #endif + #if K_SENSORLESS + case K: stepperK.homing_threshold(value); break; + #endif + #if X2_SENSORLESS + case X2: stepperX2.homing_threshold(value); break; + #endif + #if Y2_SENSORLESS + case Y2: stepperY2.homing_threshold(value); break; + #endif + #if Z2_SENSORLESS + case Z2: stepperZ2.homing_threshold(value); break; + #endif + #if Z3_SENSORLESS + case Z3: stepperZ3.homing_threshold(value); break; + #endif + #if Z4_SENSORLESS + case Z4: stepperZ4.homing_threshold(value); break; #endif default: break; } + UNUSED(value); } #endif @@ -538,17 +595,17 @@ namespace ExtUI { } float getAxisSteps_per_mm(const extruder_t extruder) { - UNUSED_E(extruder); + UNUSED(extruder); return planner.settings.axis_steps_per_mm[E_AXIS_N(extruder - E0)]; } - void setAxisSteps_per_mm(const float value, const axis_t axis) { + void setAxisSteps_per_mm(const_float_t value, const axis_t axis) { planner.settings.axis_steps_per_mm[axis] = value; planner.refresh_positioning(); } - void setAxisSteps_per_mm(const float value, const extruder_t extruder) { - UNUSED_E(extruder); + void setAxisSteps_per_mm(const_float_t value, const extruder_t extruder) { + UNUSED(extruder); planner.settings.axis_steps_per_mm[E_AXIS_N(extruder - E0)] = value; planner.refresh_positioning(); } @@ -558,7 +615,7 @@ namespace ExtUI { } feedRate_t getAxisMaxFeedrate_mm_s(const extruder_t extruder) { - UNUSED_E(extruder); + UNUSED(extruder); return planner.settings.max_feedrate_mm_s[E_AXIS_N(extruder - E0)]; } @@ -567,7 +624,7 @@ namespace ExtUI { } void setAxisMaxFeedrate_mm_s(const feedRate_t value, const extruder_t extruder) { - UNUSED_E(extruder); + UNUSED(extruder); planner.set_max_feedrate(E_AXIS_N(extruder - E0), value); } @@ -576,19 +633,17 @@ namespace ExtUI { } float getAxisMaxAcceleration_mm_s2(const extruder_t extruder) { - UNUSED_E(extruder); + UNUSED(extruder); return planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(extruder - E0)]; } - void setAxisMaxAcceleration_mm_s2(const float value, const axis_t axis) { + void setAxisMaxAcceleration_mm_s2(const_float_t value, const axis_t axis) { planner.set_max_acceleration(axis, value); - planner.reset_acceleration_rates(); } - void setAxisMaxAcceleration_mm_s2(const float value, const extruder_t extruder) { - UNUSED_E(extruder); + void setAxisMaxAcceleration_mm_s2(const_float_t value, const extruder_t extruder) { + UNUSED(extruder); planner.set_max_acceleration(E_AXIS_N(extruder - E0), value); - planner.reset_acceleration_rates(); } #if HAS_FILAMENT_SENSOR @@ -599,7 +654,7 @@ namespace ExtUI { #if HAS_FILAMENT_RUNOUT_DISTANCE float getFilamentRunoutDistance_mm() { return runout.runout_distance(); } - void setFilamentRunoutDistance_mm(const float value) { runout.set_runout_distance(constrain(value, 0, 999)); } + void setFilamentRunoutDistance_mm(const_float_t value) { runout.set_runout_distance(constrain(value, 0, 999)); } #endif #endif @@ -612,7 +667,7 @@ namespace ExtUI { #if CASELIGHT_USES_BRIGHTNESS float getCaseLightBrightness_percent() { return ui8_to_percent(caselight.brightness); } - void setCaseLightBrightness_percent(const float value) { + void setCaseLightBrightness_percent(const_float_t value) { caselight.brightness = map(constrain(value, 0, 100), 0, 100, 0, 255); caselight.update_brightness(); } @@ -624,7 +679,7 @@ namespace ExtUI { return (extruder < EXTRUDERS) ? planner.extruder_advance_K[extruder - E0] : 0; } - void setLinearAdvance_mm_mm_s(const float value, const extruder_t extruder) { + void setLinearAdvance_mm_mm_s(const_float_t value, const extruder_t extruder) { if (extruder < EXTRUDERS) planner.extruder_advance_K[extruder - E0] = constrain(value, 0, 10); } @@ -632,36 +687,33 @@ namespace ExtUI { #if HAS_JUNCTION_DEVIATION - float getJunctionDeviation_mm() { - return planner.junction_deviation_mm; - } + float getJunctionDeviation_mm() { return planner.junction_deviation_mm; } - void setJunctionDeviation_mm(const float value) { + void setJunctionDeviation_mm(const_float_t value) { planner.junction_deviation_mm = constrain(value, 0.001, 0.3); TERN_(LIN_ADVANCE, planner.recalculate_max_e_jerk()); } #else + float getAxisMaxJerk_mm_s(const axis_t axis) { return planner.max_jerk[axis]; } + float getAxisMaxJerk_mm_s(const extruder_t) { return planner.max_jerk.e; } + void setAxisMaxJerk_mm_s(const_float_t value, const axis_t axis) { planner.set_max_jerk((AxisEnum)axis, value); } + void setAxisMaxJerk_mm_s(const_float_t value, const extruder_t) { planner.set_max_jerk(E_AXIS, value); } + #endif - float getAxisMaxJerk_mm_s(const axis_t axis) { - return planner.max_jerk[axis]; - } - - float getAxisMaxJerk_mm_s(const extruder_t) { - return planner.max_jerk.e; - } - - void setAxisMaxJerk_mm_s(const float value, const axis_t axis) { - planner.set_max_jerk((AxisEnum)axis, value); - } + #if ENABLED(DUAL_X_CARRIAGE) + uint8_t getIDEX_Mode() { return dual_x_carriage_mode; } + #endif - void setAxisMaxJerk_mm_s(const float value, const extruder_t) { - planner.set_max_jerk(E_AXIS, value); - } + #if PREHEAT_COUNT + uint16_t getMaterial_preset_E(const uint16_t index) { return ui.material_preset[index].hotend_temp; } + #if HAS_HEATED_BED + uint16_t getMaterial_preset_B(const uint16_t index) { return ui.material_preset[index].bed_temp; } + #endif #endif feedRate_t getFeedrate_mm_s() { return feedrate_mm_s; } - int16_t getFlowPercentage(const extruder_t extr) { return planner.flow_percentage[extr]; } + int16_t getFlow_percent(const extruder_t extr) { return planner.flow_percentage[extr]; } feedRate_t getMinFeedrate_mm_s() { return planner.settings.min_feedrate_mm_s; } feedRate_t getMinTravelFeedrate_mm_s() { return planner.settings.min_travel_feedrate_mm_s; } float getPrintingAcceleration_mm_s2() { return planner.settings.acceleration; } @@ -671,18 +723,23 @@ namespace ExtUI { void setFlow_percent(const int16_t flow, const extruder_t extr) { planner.set_flow(extr, flow); } void setMinFeedrate_mm_s(const feedRate_t fr) { planner.settings.min_feedrate_mm_s = fr; } void setMinTravelFeedrate_mm_s(const feedRate_t fr) { planner.settings.min_travel_feedrate_mm_s = fr; } - void setPrintingAcceleration_mm_s2(const float acc) { planner.settings.acceleration = acc; } - void setRetractAcceleration_mm_s2(const float acc) { planner.settings.retract_acceleration = acc; } - void setTravelAcceleration_mm_s2(const float acc) { planner.settings.travel_acceleration = acc; } + void setPrintingAcceleration_mm_s2(const_float_t acc) { planner.settings.acceleration = acc; } + void setRetractAcceleration_mm_s2(const_float_t acc) { planner.settings.retract_acceleration = acc; } + void setTravelAcceleration_mm_s2(const_float_t acc) { planner.settings.travel_acceleration = acc; } #if ENABLED(BABYSTEPPING) + bool babystepAxis_steps(const int16_t steps, const axis_t axis) { switch (axis) { #if ENABLED(BABYSTEP_XY) case X: babystep.add_steps(X_AXIS, steps); break; - case Y: babystep.add_steps(Y_AXIS, steps); break; + #if HAS_Y_AXIS + case Y: babystep.add_steps(Y_AXIS, steps); break; + #endif + #endif + #if HAS_Z_AXIS + case Z: babystep.add_steps(Z_AXIS, steps); break; #endif - case Z: babystep.add_steps(Z_AXIS, steps); break; default: return false; }; return true; @@ -698,7 +755,7 @@ namespace ExtUI { * what nozzle is printing. */ void smartAdjustAxis_steps(const int16_t steps, const axis_t axis, bool linked_nozzles) { - const float mm = steps * planner.steps_to_mm[axis]; + const float mm = steps * planner.mm_per_step[axis]; UNUSED(mm); if (!babystepAxis_steps(steps, axis)) return; @@ -721,8 +778,8 @@ namespace ExtUI { hotend_offset[e][axis] += mm; normalizeNozzleOffset(X); - normalizeNozzleOffset(Y); - normalizeNozzleOffset(Z); + TERN_(HAS_Y_AXIS, normalizeNozzleOffset(Y)); + TERN_(HAS_Z_AXIS, normalizeNozzleOffset(Z)); } #else UNUSED(linked_nozzles); @@ -733,23 +790,28 @@ namespace ExtUI { * Converts a mm displacement to a number of whole number of * steps that is at least mm long. */ - int16_t mmToWholeSteps(const float mm, const axis_t axis) { - const float steps = mm / planner.steps_to_mm[axis]; + int16_t mmToWholeSteps(const_float_t mm, const axis_t axis) { + const float steps = mm / planner.mm_per_step[axis]; return steps > 0 ? CEIL(steps) : FLOOR(steps); } - #endif + + float mmFromWholeSteps(int16_t steps, const axis_t axis) { + return steps * planner.mm_per_step[axis]; + } + + #endif // BABYSTEPPING float getZOffset_mm() { return (0.0f #if HAS_BED_PROBE + probe.offset.z #elif ENABLED(BABYSTEP_DISPLAY_TOTAL) - + planner.steps_to_mm[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)] + + planner.mm_per_step[Z_AXIS] * babystep.axis_total[BS_AXIS_IND(Z_AXIS)] #endif ); } - void setZOffset_mm(const float value) { + void setZOffset_mm(const_float_t value) { #if HAS_BED_PROBE if (WITHIN(value, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) probe.offset.z = value; @@ -767,7 +829,7 @@ namespace ExtUI { return hotend_offset[extruder - E0][axis]; } - void setNozzleOffset_mm(const float value, const axis_t axis, const extruder_t extruder) { + void setNozzleOffset_mm(const_float_t value, const axis_t axis, const extruder_t extruder) { if (extruder - E0 >= HOTENDS) return; hotend_offset[extruder - E0][axis] = value; } @@ -785,25 +847,21 @@ namespace ExtUI { #endif // HAS_HOTEND_OFFSET #if HAS_BED_PROBE - float getProbeOffset_mm(const axis_t axis) { - return probe.offset.pos[axis]; - } - void setProbeOffset_mm(const float val, const axis_t axis) { - probe.offset.pos[axis] = val; - } + float getProbeOffset_mm(const axis_t axis) { return probe.offset.pos[axis]; } + void setProbeOffset_mm(const_float_t val, const axis_t axis) { probe.offset.pos[axis] = val; } #endif #if ENABLED(BACKLASH_GCODE) float getAxisBacklash_mm(const axis_t axis) { return backlash.distance_mm[axis]; } - void setAxisBacklash_mm(const float value, const axis_t axis) + void setAxisBacklash_mm(const_float_t value, const axis_t axis) { backlash.distance_mm[axis] = constrain(value,0,5); } float getBacklashCorrection_percent() { return ui8_to_percent(backlash.correction); } - void setBacklashCorrection_percent(const float value) { backlash.correction = map(constrain(value, 0, 100), 0, 100, 0, 255); } + void setBacklashCorrection_percent(const_float_t value) { backlash.correction = map(constrain(value, 0, 100), 0, 100, 0, 255); } #ifdef BACKLASH_SMOOTHING_MM float getBacklashSmoothing_mm() { return backlash.smoothing_mm; } - void setBacklashSmoothing_mm(const float value) { backlash.smoothing_mm = constrain(value, 0, 999); } + void setBacklashSmoothing_mm(const_float_t value) { backlash.smoothing_mm = constrain(value, 0, 999); } #endif #endif @@ -813,26 +871,58 @@ namespace ExtUI { } #if HAS_LEVELING + bool getLevelingActive() { return planner.leveling_active; } void setLevelingActive(const bool state) { set_bed_leveling_enabled(state); } bool getMeshValid() { return leveling_is_valid(); } + #if HAS_MESH + bed_mesh_t& getMeshArray() { return Z_VALUES_ARR; } float getMeshPoint(const xy_uint8_t &pos) { return Z_VALUES(pos.x, pos.y); } - void setMeshPoint(const xy_uint8_t &pos, const float zoff) { - if (WITHIN(pos.x, 0, GRID_MAX_POINTS_X) && WITHIN(pos.y, 0, GRID_MAX_POINTS_Y)) { + void setMeshPoint(const xy_uint8_t &pos, const_float_t zoff) { + if (WITHIN(pos.x, 0, (GRID_MAX_POINTS_X) - 1) && WITHIN(pos.y, 0, (GRID_MAX_POINTS_Y) - 1)) { Z_VALUES(pos.x, pos.y) = zoff; TERN_(ABL_BILINEAR_SUBDIVISION, bed_level_virt_interpolate()); } } - #endif - #endif + + void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z) { + #if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) + const feedRate_t old_feedrate = feedrate_mm_s; + const float x_target = MESH_MIN_X + pos.x * (MESH_X_DIST), + y_target = MESH_MIN_Y + pos.y * (MESH_Y_DIST); + if (x_target != current_position.x || y_target != current_position.y) { + // If moving across bed, raise nozzle to safe height over bed + feedrate_mm_s = Z_PROBE_FEEDRATE_FAST; + destination = current_position; + destination.z = Z_CLEARANCE_BETWEEN_PROBES; + prepare_line_to_destination(); + feedrate_mm_s = XY_PROBE_FEEDRATE; + destination.x = x_target; + destination.y = y_target; + prepare_line_to_destination(); + } + feedrate_mm_s = Z_PROBE_FEEDRATE_FAST; + destination.z = z; + prepare_line_to_destination(); + feedrate_mm_s = old_feedrate; + #else + UNUSED(pos); + UNUSED(z); + #endif + } + + #endif // HAS_MESH + + #endif // HAS_LEVELING #if ENABLED(HOST_PROMPT_SUPPORT) void setHostResponse(const uint8_t response) { host_response_handler(response); } #endif #if ENABLED(PRINTCOUNTER) + char* getFailedPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().totalPrints - print_job_timer.getStats().finishedPrints)); return buffer; } char* getTotalPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().totalPrints)); return buffer; } char* getFinishedPrints_str(char buffer[21]) { strcpy(buffer,i16tostr3left(print_job_timer.getStats().finishedPrints)); return buffer; } char* getTotalPrintTime_str(char buffer[21]) { return duration_t(print_job_timer.getStats().printTime).toString(buffer); } @@ -851,14 +941,14 @@ namespace ExtUI { float getPIDValues_Ki(const extruder_t tool) { return unscalePID_i(PID_PARAM(Ki, tool)); } float getPIDValues_Kd(const extruder_t tool) { return unscalePID_d(PID_PARAM(Kd, tool)); } - void setPIDValues(const float p, const float i, const float d, extruder_t tool) { + void setPIDValues(const_float_t p, const_float_t i, const_float_t d, extruder_t tool) { thermalManager.temp_hotend[tool].pid.Kp = p; thermalManager.temp_hotend[tool].pid.Ki = scalePID_i(i); thermalManager.temp_hotend[tool].pid.Kd = scalePID_d(d); thermalManager.updatePID(); } - void startPIDTune(const float temp, extruder_t tool) { + void startPIDTune(const celsius_t temp, extruder_t tool) { thermalManager.PID_autotune(temp, (heater_id_t)tool, 8, true); } #endif @@ -868,14 +958,14 @@ namespace ExtUI { float getBedPIDValues_Ki() { return unscalePID_i(thermalManager.temp_bed.pid.Ki); } float getBedPIDValues_Kd() { return unscalePID_d(thermalManager.temp_bed.pid.Kd); } - void setBedPIDValues(const float p, const float i, const float d) { + void setBedPIDValues(const_float_t p, const_float_t i, const_float_t d) { thermalManager.temp_bed.pid.Kp = p; thermalManager.temp_bed.pid.Ki = scalePID_i(i); thermalManager.temp_bed.pid.Kd = scalePID_d(d); thermalManager.updatePID(); } - void startBedPIDTune(const float temp) { + void startBedPIDTune(const celsius_t temp) { thermalManager.PID_autotune(temp, H_BED, 4, true); } #endif @@ -895,41 +985,44 @@ namespace ExtUI { return firmware_name; } - void setTargetTemp_celsius(float value, const heater_t heater) { + void setTargetTemp_celsius(const_float_t inval, const heater_t heater) { + float value = inval; #ifdef TOUCH_UI_LCD_TEMP_SCALING value *= TOUCH_UI_LCD_TEMP_SCALING; #endif enableHeater(heater); - #if HAS_HEATED_CHAMBER - if (heater == CHAMBER) - thermalManager.setTargetChamber(LROUND(constrain(value, 0, CHAMBER_MAXTEMP - 10))); - else - #endif - #if HAS_HEATED_BED - if (heater == BED) - thermalManager.setTargetBed(LROUND(constrain(value, 0, BED_MAX_TARGET))); - else - #endif - { + switch (heater) { + #if HAS_HEATED_CHAMBER + case CHAMBER: thermalManager.setTargetChamber(LROUND(constrain(value, 0, CHAMBER_MAX_TARGET))); break; + #endif + #if HAS_COOLER + case COOLER: thermalManager.setTargetCooler(LROUND(constrain(value, 0, COOLER_MAXTEMP))); break; + #endif + #if HAS_HEATED_BED + case BED: thermalManager.setTargetBed(LROUND(constrain(value, 0, BED_MAX_TARGET))); break; + #endif + default: { #if HAS_HOTEND const int16_t e = heater - H0; - thermalManager.setTargetHotend(LROUND(constrain(value, 0, thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT)), e); + thermalManager.setTargetHotend(LROUND(constrain(value, 0, thermalManager.hotend_max_target(e))), e); #endif - } + } break; + } } - void setTargetTemp_celsius(float value, const extruder_t extruder) { + void setTargetTemp_celsius(const_float_t inval, const extruder_t extruder) { + float value = inval; #ifdef TOUCH_UI_LCD_TEMP_SCALING value *= TOUCH_UI_LCD_TEMP_SCALING; #endif #if HAS_HOTEND const int16_t e = extruder - E0; enableHeater(extruder); - thermalManager.setTargetHotend(LROUND(constrain(value, 0, thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT)), e); + thermalManager.setTargetHotend(LROUND(constrain(value, 0, thermalManager.hotend_max_target(e))), e); #endif } - void setTargetFan_percent(const float value, const fan_t fan) { + void setTargetFan_percent(const_float_t value, const fan_t fan) { #if HAS_FAN if (fan < FAN_COUNT) thermalManager.set_fan_speed(fan - FAN0, map(constrain(value, 0, 100), 0, 100, 0, 255)); @@ -939,53 +1032,50 @@ namespace ExtUI { #endif } - void setFeedrate_percent(const float value) { - feedrate_percentage = constrain(value, 10, 500); + void setFeedrate_percent(const_float_t value) { feedrate_percentage = constrain(value, 10, 500); } + + void coolDown() { + #if HAS_HOTEND + HOTEND_LOOP() thermalManager.setTargetHotend(0, e); + #endif + TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(0)); + TERN_(HAS_FAN, thermalManager.zero_fan_speeds()); } bool awaitingUserConfirm() { - return wait_for_user; + return TERN0(HAS_RESUME_CONTINUE, wait_for_user) || getHostKeepaliveIsPaused(); } + void setUserConfirmed() { TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); } - void setUserConfirmed() { - TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); - } + #if M600_PURGE_MORE_RESUMABLE + void setPauseMenuResponse(PauseMenuResponse response) { pause_menu_response = response; } + PauseMessage pauseModeStatus = PAUSE_MESSAGE_STATUS; + PauseMode getPauseMode() { return pause_mode;} + #endif void printFile(const char *filename) { - UNUSED(filename); - IFSD(card.openAndPrintFile(filename), NOOP); + TERN(SDSUPPORT, card.openAndPrintFile(filename), UNUSED(filename)); } bool isPrintingFromMediaPaused() { - return IFSD(isPrintingFromMedia() && !IS_SD_PRINTING(), false); + return TERN0(SDSUPPORT, IS_SD_PAUSED()); } - bool isPrintingFromMedia() { - #if ENABLED(SDSUPPORT) - // Account for when IS_SD_PRINTING() reports the end of the - // print when there is still SD card data in the planner. - flags.was_sd_printing = card.isFileOpen() || (flags.was_sd_printing && commandsInQueue()); - return flags.was_sd_printing; - #else - return false; - #endif - } + bool isPrintingFromMedia() { return TERN0(SDSUPPORT, IS_SD_PRINTING() || IS_SD_PAUSED()); } bool isPrinting() { - return (commandsInQueue() || isPrintingFromMedia() || IFSD(IS_SD_PRINTING(), false)) || print_job_timer.isRunning() || print_job_timer.isPaused(); + return commandsInQueue() || isPrintingFromMedia() || printJobOngoing() || printingIsPaused(); } bool isPrintingPaused() { return isPrinting() && (isPrintingFromMediaPaused() || print_job_timer.isPaused()); } - bool isMediaInserted() { - return IFSD(IS_SD_INSERTED() && card.isMounted(), false); - } + bool isMediaInserted() { return TERN0(SDSUPPORT, IS_SD_INSERTED()); } - void pausePrint() { ui.pause_print(); } + void pausePrint() { ui.pause_print(); } void resumePrint() { ui.resume_print(); } - void stopPrint() { ui.abort_print(); } + void stopPrint() { ui.abort_print(); } void onUserConfirmRequired_P(PGM_P const pstr) { char msg[strlen_P(pstr) + 1]; @@ -1016,27 +1106,27 @@ namespace ExtUI { } const char* FileList::filename() { - return IFSD(card.longest_filename(), ""); + return TERN(SDSUPPORT, card.longest_filename(), ""); } const char* FileList::shortFilename() { - return IFSD(card.filename, ""); + return TERN(SDSUPPORT, card.filename, ""); } const char* FileList::longFilename() { - return IFSD(card.longFilename, ""); + return TERN(SDSUPPORT, card.longFilename, ""); } bool FileList::isDir() { - return IFSD(card.flag.filenameIsDir, false); + return TERN0(SDSUPPORT, card.flag.filenameIsDir); } uint16_t FileList::count() { - return IFSD((num_files = (num_files == 0xFFFF ? card.get_num_Files() : num_files)), 0); + return TERN0(SDSUPPORT, (num_files = (num_files == 0xFFFF ? card.get_num_Files() : num_files))); } bool FileList::isAtRootDir() { - return IFSD(card.flag.workDirIsRoot, true); + return TERN1(SDSUPPORT, card.flag.workDirIsRoot); } void FileList::upDir() { diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index bfd658b0d9b0..9e1ae3a9c094 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -44,6 +44,10 @@ #include "../../inc/MarlinConfig.h" #include "../marlinui.h" +#include "../../gcode/gcode.h" +#if M600_PURGE_MORE_RESUMABLE + #include "../../feature/pause.h" +#endif namespace ExtUI { @@ -53,11 +57,11 @@ namespace ExtUI { static constexpr size_t eeprom_data_size = 48; - enum axis_t : uint8_t { X, Y, Z, X2, Y2, Z2, Z3, Z4 }; + enum axis_t : uint8_t { X, Y, Z, I, J, K, X2, Y2, Z2, Z3, Z4 }; enum extruder_t : uint8_t { E0, E1, E2, E3, E4, E5, E6, E7 }; - enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER }; + enum heater_t : uint8_t { H0, H1, H2, H3, H4, H5, BED, CHAMBER, COOLER }; enum fan_t : uint8_t { FAN0, FAN1, FAN2, FAN3, FAN4, FAN5, FAN6, FAN7 }; - enum result_t : uint8_t { PID_BAD_EXTRUDER_NUM, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; + enum result_t : uint8_t { PID_STARTED, PID_BAD_EXTRUDER_NUM, PID_TEMP_TOO_HIGH, PID_TUNING_TIMEOUT, PID_DONE }; constexpr uint8_t extruderCount = EXTRUDERS; constexpr uint8_t hotendCount = HOTENDS; @@ -78,6 +82,9 @@ namespace ExtUI { void injectCommands(char * const); bool commandsInQueue(); + GcodeSuite::MarlinBusyState getHostKeepaliveState(); + bool getHostKeepaliveIsPaused(); + bool isHeaterIdle(const heater_t); bool isHeaterIdle(const extruder_t); void enableHeater(const heater_t); @@ -102,17 +109,17 @@ namespace ExtUI { #if HAS_TRINAMIC_CONFIG float getAxisCurrent_mA(const axis_t); float getAxisCurrent_mA(const extruder_t); - void setAxisCurrent_mA(const float, const axis_t); - void setAxisCurrent_mA(const float, const extruder_t); + void setAxisCurrent_mA(const_float_t, const axis_t); + void setAxisCurrent_mA(const_float_t, const extruder_t); int getTMCBumpSensitivity(const axis_t); - void setTMCBumpSensitivity(const float, const axis_t); + void setTMCBumpSensitivity(const_float_t, const axis_t); #endif - float getActualTemp_celsius(const heater_t); - float getActualTemp_celsius(const extruder_t); - float getTargetTemp_celsius(const heater_t); - float getTargetTemp_celsius(const extruder_t); + celsius_float_t getActualTemp_celsius(const heater_t); + celsius_float_t getActualTemp_celsius(const extruder_t); + celsius_float_t getTargetTemp_celsius(const heater_t); + celsius_float_t getTargetTemp_celsius(const extruder_t); float getTargetFan_percent(const fan_t); float getActualFan_percent(const fan_t); float getAxisPosition_mm(const axis_t); @@ -125,11 +132,12 @@ namespace ExtUI { float getAxisMaxAcceleration_mm_s2(const extruder_t); feedRate_t getMinFeedrate_mm_s(); feedRate_t getMinTravelFeedrate_mm_s(); + feedRate_t getFeedrate_mm_s(); float getPrintingAcceleration_mm_s2(); float getRetractAcceleration_mm_s2(); float getTravelAcceleration_mm_s2(); float getFeedrate_percent(); - int16_t getFlowPercentage(const extruder_t); + int16_t getFlow_percent(const extruder_t); inline uint8_t getProgress_percent() { return ui.get_progress_percent(); } @@ -139,6 +147,17 @@ namespace ExtUI { uint32_t getProgress_seconds_elapsed(); + #if PREHEAT_COUNT + uint16_t getMaterial_preset_E(const uint16_t); + #if HAS_HEATED_BED + uint16_t getMaterial_preset_B(const uint16_t); + #endif + #endif + + #if ENABLED(DUAL_X_CARRIAGE) + uint8_t getIDEX_Mode(); + #endif + #if ENABLED(SHOW_REMAINING_TIME) inline uint32_t getProgress_seconds_remaining() { return ui.get_remaining_time(); } #endif @@ -150,16 +169,21 @@ namespace ExtUI { #if HAS_MESH bed_mesh_t& getMeshArray(); float getMeshPoint(const xy_uint8_t &pos); - void setMeshPoint(const xy_uint8_t &pos, const float zval); + void setMeshPoint(const xy_uint8_t &pos, const_float_t zval); + void moveToMeshPoint(const xy_uint8_t &pos, const_float_t z); void onMeshLevelingStart(); - void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval); - inline void onMeshUpdate(const xy_int8_t &pos, const float zval) { onMeshUpdate(pos.x, pos.y, zval); } + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval); + inline void onMeshUpdate(const xy_int8_t &pos, const_float_t zval) { onMeshUpdate(pos.x, pos.y, zval); } typedef enum : uint8_t { - MESH_START, // Prior to start of probe - MESH_FINISH, // Following probe of all points - PROBE_START, // Beginning probe of grid location - PROBE_FINISH // Finished probe of grid location + G29_START, // Prior to start of probe + G29_FINISH, // Following probe of all points + G29_POINT_START, // Beginning probe of grid location + G29_POINT_FINISH, // Finished probe of grid location + G26_START, + G26_FINISH, + G26_POINT_START, + G26_POINT_FINISH } probe_state_t; void onMeshUpdate(const int8_t xpos, const int8_t ypos, probe_state_t state); inline void onMeshUpdate(const xy_int8_t &pos, probe_state_t state) { onMeshUpdate(pos.x, pos.y, state); } @@ -170,7 +194,14 @@ namespace ExtUI { void setHostResponse(const uint8_t); #endif + inline void simulateUserClick() { + #if ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_JYERSUI) + ui.lcd_clicked = true; + #endif + } + #if ENABLED(PRINTCOUNTER) + char* getFailedPrints_str(char buffer[21]); char* getTotalPrints_str(char buffer[21]); char* getFinishedPrints_str(char buffer[21]); char* getTotalPrintTime_str(char buffer[21]); @@ -178,48 +209,57 @@ namespace ExtUI { char* getFilamentUsed_str(char buffer[21]); #endif - void setTargetTemp_celsius(const float, const heater_t); - void setTargetTemp_celsius(const float, const extruder_t); - void setTargetFan_percent(const float, const fan_t); - void setAxisPosition_mm(const float, const axis_t, const feedRate_t=0); - void setAxisPosition_mm(const float, const extruder_t, const feedRate_t=0); - void setAxisSteps_per_mm(const float, const axis_t); - void setAxisSteps_per_mm(const float, const extruder_t); + void setTargetTemp_celsius(const_float_t, const heater_t); + void setTargetTemp_celsius(const_float_t, const extruder_t); + void setTargetFan_percent(const_float_t, const fan_t); + void coolDown(); + void setAxisPosition_mm(const_float_t, const axis_t, const feedRate_t=0); + void setAxisPosition_mm(const_float_t, const extruder_t, const feedRate_t=0); + void setAxisSteps_per_mm(const_float_t, const axis_t); + void setAxisSteps_per_mm(const_float_t, const extruder_t); void setAxisMaxFeedrate_mm_s(const feedRate_t, const axis_t); void setAxisMaxFeedrate_mm_s(const feedRate_t, const extruder_t); - void setAxisMaxAcceleration_mm_s2(const float, const axis_t); - void setAxisMaxAcceleration_mm_s2(const float, const extruder_t); + void setAxisMaxAcceleration_mm_s2(const_float_t, const axis_t); + void setAxisMaxAcceleration_mm_s2(const_float_t, const extruder_t); void setFeedrate_mm_s(const feedRate_t); void setMinFeedrate_mm_s(const feedRate_t); void setMinTravelFeedrate_mm_s(const feedRate_t); - void setPrintingAcceleration_mm_s2(const float); - void setRetractAcceleration_mm_s2(const float); - void setTravelAcceleration_mm_s2(const float); - void setFeedrate_percent(const float); + void setPrintingAcceleration_mm_s2(const_float_t); + void setRetractAcceleration_mm_s2(const_float_t); + void setTravelAcceleration_mm_s2(const_float_t); + void setFeedrate_percent(const_float_t); void setFlow_percent(const int16_t, const extruder_t); bool awaitingUserConfirm(); void setUserConfirmed(); + #if M600_PURGE_MORE_RESUMABLE + void setPauseMenuResponse(PauseMenuResponse); + extern PauseMessage pauseModeStatus; + PauseMode getPauseMode(); + #endif + #if ENABLED(LIN_ADVANCE) float getLinearAdvance_mm_mm_s(const extruder_t); - void setLinearAdvance_mm_mm_s(const float, const extruder_t); + void setLinearAdvance_mm_mm_s(const_float_t, const extruder_t); #endif #if HAS_JUNCTION_DEVIATION float getJunctionDeviation_mm(); - void setJunctionDeviation_mm(const float); + void setJunctionDeviation_mm(const_float_t); #else float getAxisMaxJerk_mm_s(const axis_t); float getAxisMaxJerk_mm_s(const extruder_t); - void setAxisMaxJerk_mm_s(const float, const axis_t); - void setAxisMaxJerk_mm_s(const float, const extruder_t); + void setAxisMaxJerk_mm_s(const_float_t, const axis_t); + void setAxisMaxJerk_mm_s(const_float_t, const extruder_t); #endif + extruder_t getTool(const uint8_t extruder); extruder_t getActiveTool(); void setActiveTool(const extruder_t, bool no_move); #if ENABLED(BABYSTEPPING) - int16_t mmToWholeSteps(const float mm, const axis_t axis); + int16_t mmToWholeSteps(const_float_t mm, const axis_t axis); + float mmFromWholeSteps(int16_t steps, const axis_t axis); bool babystepAxis_steps(const int16_t steps, const axis_t axis); void smartAdjustAxis_steps(const int16_t steps, const axis_t axis, bool linked_nozzles); @@ -227,28 +267,28 @@ namespace ExtUI { #if HAS_HOTEND_OFFSET float getNozzleOffset_mm(const axis_t, const extruder_t); - void setNozzleOffset_mm(const float, const axis_t, const extruder_t); + void setNozzleOffset_mm(const_float_t, const axis_t, const extruder_t); void normalizeNozzleOffset(const axis_t axis); #endif float getZOffset_mm(); - void setZOffset_mm(const float); + void setZOffset_mm(const_float_t); #if HAS_BED_PROBE float getProbeOffset_mm(const axis_t); - void setProbeOffset_mm(const float, const axis_t); + void setProbeOffset_mm(const_float_t, const axis_t); #endif #if ENABLED(BACKLASH_GCODE) float getAxisBacklash_mm(const axis_t); - void setAxisBacklash_mm(const float, const axis_t); + void setAxisBacklash_mm(const_float_t, const axis_t); float getBacklashCorrection_percent(); - void setBacklashCorrection_percent(const float); + void setBacklashCorrection_percent(const_float_t); #ifdef BACKLASH_SMOOTHING_MM float getBacklashSmoothing_mm(); - void setBacklashSmoothing_mm(const float); + void setBacklashSmoothing_mm(const_float_t); #endif #endif @@ -260,7 +300,7 @@ namespace ExtUI { #if HAS_FILAMENT_RUNOUT_DISTANCE float getFilamentRunoutDistance_mm(); - void setFilamentRunoutDistance_mm(const float); + void setFilamentRunoutDistance_mm(const_float_t); #endif #endif @@ -270,7 +310,7 @@ namespace ExtUI { #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) float getCaseLightBrightness_percent(); - void setCaseLightBrightness_percent(const float); + void setCaseLightBrightness_percent(const_float_t); #endif #endif @@ -278,16 +318,16 @@ namespace ExtUI { float getPIDValues_Kp(const extruder_t); float getPIDValues_Ki(const extruder_t); float getPIDValues_Kd(const extruder_t); - void setPIDValues(const float, const float, const float, extruder_t); - void startPIDTune(const float, extruder_t); + void setPIDValues(const_float_t, const_float_t , const_float_t , extruder_t); + void startPIDTune(const celsius_t, extruder_t); #endif #if ENABLED(PIDTEMPBED) float getBedPIDValues_Kp(); float getBedPIDValues_Ki(); float getBedPIDValues_Kd(); - void setBedPIDValues(const float, const float, const float); - void startBedPIDTune(const float); + void setBedPIDValues(const_float_t, const_float_t , const_float_t); + void startBedPIDTune(const celsius_t); #endif /** @@ -370,6 +410,7 @@ namespace ExtUI { void onFactoryReset(); void onStoreSettings(char *); void onLoadSettings(const char *); + void onPostprocessSettings(); void onConfigurationStoreWritten(bool success); void onConfigurationStoreRead(bool success); #if ENABLED(POWER_LOSS_RECOVERY) diff --git a/Marlin/src/lcd/fontutils.cpp b/Marlin/src/lcd/fontutils.cpp index 65c8c06409a1..50b671ea33a5 100644 --- a/Marlin/src/lcd/fontutils.cpp +++ b/Marlin/src/lcd/fontutils.cpp @@ -1,3 +1,25 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + /** * @file fontutils.cpp * @brief help functions for font and char @@ -149,7 +171,7 @@ uint8_t* get_utf8_value_cb(uint8_t *pstart, read_byte_cb_t cb_read_byte, wchar_t static inline uint8_t utf8_strlen_cb(const char *pstart, read_byte_cb_t cb_read_byte) { uint8_t cnt = 0; uint8_t *p = (uint8_t *)pstart; - for (;;) { + if (p) for (;;) { const uint8_t b = cb_read_byte(p); if (!b) break; if (utf8_is_start_byte_of_char(b)) cnt++; diff --git a/Marlin/src/lcd/fontutils.h b/Marlin/src/lcd/fontutils.h index 04ff81148f96..3901d4439fde 100644 --- a/Marlin/src/lcd/fontutils.h +++ b/Marlin/src/lcd/fontutils.h @@ -1,3 +1,25 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + /** * @file fontutils.h * @brief help functions for font and char diff --git a/Marlin/src/lcd/language/language_an.h b/Marlin/src/lcd/language/language_an.h index 0513de7f7d8f..4669f0c233fc 100644 --- a/Marlin/src/lcd/language/language_an.h +++ b/Marlin/src/lcd/language/language_an.h @@ -34,183 +34,188 @@ namespace Language_an { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 1; - PROGMEM Language_Str LANGUAGE = _UxGT("Aragonese"); + constexpr uint8_t CHARSIZE = 1; + LSTR LANGUAGE = _UxGT("Aragonese"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" parada."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Tarcheta mesa"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Tarcheta sacada"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - PROGMEM Language_Str MSG_MAIN = _UxGT("Menu prencipal"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Inicio automatico"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Amortar motors"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Levar a l'orichen"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Orichen X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Orichen Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Orichen Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Orichen XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Encetar (pretar)"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Vinient punto"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Nivelacion feita!"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Achustar desfases"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Desfase aplicau"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Establir orichen"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" parada."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Tarcheta mesa"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Tarcheta sacada"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters + LSTR MSG_MAIN = _UxGT("Menu prencipal"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Inicio automatico"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Amortar motors"); + LSTR MSG_HOMING = _UxGT("Orichen"); + LSTR MSG_AUTO_HOME = _UxGT("Levar a l'orichen"); + LSTR MSG_AUTO_HOME_X = _UxGT("Orichen X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Orichen Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Orichen Z"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Orichen XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Encetar (pretar)"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Vinient punto"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Nivelacion feita!"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Achustar desfases"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Desfase aplicau"); + LSTR MSG_SET_ORIGIN = _UxGT("Establir orichen"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Precalentar ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Precalentar ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Boquilla"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Boquilla ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Precalentar ") PREHEAT_1_LABEL _UxGT(" Tot"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Precalentar ") PREHEAT_1_LABEL _UxGT(" Base"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Precalentar ") PREHEAT_1_LABEL _UxGT(" Conf"); + LSTR MSG_PREHEAT_1 = _UxGT("Precalentar ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Precalentar ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Boquilla"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Boquilla ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Precalentar ") PREHEAT_1_LABEL _UxGT(" Tot"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Precalentar ") PREHEAT_1_LABEL _UxGT(" Base"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Precalentar ") PREHEAT_1_LABEL _UxGT(" Conf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Precalentar $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Precalentar $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Precal. $ Boquilla"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Precal. $ Boquilla ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Precalentar $ Tot"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Precalentar $ Base"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Precalentar $ Conf"); + LSTR MSG_PREHEAT_M = _UxGT("Precalentar $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Precalentar $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Precal. $ Boquilla"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Precal. $ Boquilla ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Precalentar $ Tot"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Precalentar $ Base"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Precalentar $ Conf"); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Enfriar"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Enchegar Fuent"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Amortar Fuent"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extruir"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Retraer"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mover Eixes"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelar base"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivelar base"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Mover X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Mover Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Mover Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extrusor"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extrusor *"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Mover %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mover 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mover 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Velocidat"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Base Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Boquilla"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Boquilla ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Base"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Ixoriador"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Ixoriador ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Fluxo"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Fluxo ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Control"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Temperatura Auto."); - PROGMEM Language_Str MSG_SELECT = _UxGT("Trigar"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Trigar *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Aceleracion"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vel. viache min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Accel"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Acel. max") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Acel. max") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Acel. max") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Acel. max") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Acel. max *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Acel. retrac."); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Acel. Viaje"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Trangos/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" trangos/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" trangos/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" trangos/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E trangos/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* trangos/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Movimiento"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filamento"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Contraste"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Alzar memoria"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Cargar memoria"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Restaurar memoria"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Tornar a cargar"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Informacion"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Preparar"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Achustar"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pausar impresion"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Contin. impresion"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Detener Impresion"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Menu de SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("No i hai tarcheta"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Reposo..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Aguardand ordines"); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Impres. cancelada"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Sin movimiento"); - PROGMEM Language_Str MSG_KILLED = _UxGT("Aturada d'emerch."); - PROGMEM Language_Str MSG_STOPPED = _UxGT("Aturada."); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retraer mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Retraer mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retraer F"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Devantar mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("DesRet mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Swap DesRet mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("DesRet F"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Retraccion auto."); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Cambear filamento"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Cambear filamento *"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Encetan. tarcheta"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Cambiar tarcheta"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sonda Z fuera"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Desfase Z"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Micropaso X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Micropaso Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Cancelado - Endstop"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Error: en calentar"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Error: temperatura"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("Error de temperatura"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Error: Temp Max"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Error: Temp Min"); - PROGMEM Language_Str MSG_HALTED = _UxGT("IMPRESORA ATURADA"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Per favor reinic."); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); - PROGMEM Language_Str MSG_HEATING = _UxGT("Calentando..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Calentando base..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Calibracion Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); + LSTR MSG_COOLDOWN = _UxGT("Enfriar"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Enchegar Fuent"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Amortar Fuent"); + LSTR MSG_EXTRUDE = _UxGT("Extruir"); + LSTR MSG_RETRACT = _UxGT("Retraer"); + LSTR MSG_MOVE_AXIS = _UxGT("Mover Eixes"); + LSTR MSG_BED_LEVELING = _UxGT("Nivelar base"); + LSTR MSG_LEVEL_BED = _UxGT("Nivelar base"); + LSTR MSG_MOVE_X = _UxGT("Mover X"); + LSTR MSG_MOVE_Y = _UxGT("Mover Y"); + LSTR MSG_MOVE_Z = _UxGT("Mover Z"); + LSTR MSG_MOVE_E = _UxGT("Extrusor"); + LSTR MSG_MOVE_EN = _UxGT("Extrusor *"); + LSTR MSG_MOVE_N_MM = _UxGT("Mover %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Mover 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Mover 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Mover 100mm"); + LSTR MSG_SPEED = _UxGT("Velocidat"); + LSTR MSG_BED_Z = _UxGT("Base Z"); + LSTR MSG_NOZZLE = _UxGT("Boquilla"); + LSTR MSG_NOZZLE_N = _UxGT("Boquilla ~"); + LSTR MSG_BED = _UxGT("Base"); + LSTR MSG_FAN_SPEED = _UxGT("Ixoriador"); + LSTR MSG_FAN_SPEED_N = _UxGT("Ixoriador ~"); + LSTR MSG_FLOW = _UxGT("Fluxo"); + LSTR MSG_FLOW_N = _UxGT("Fluxo ~"); + LSTR MSG_CONTROL = _UxGT("Control"); + LSTR MSG_AUTOTEMP = _UxGT("Temperatura Auto."); + LSTR MSG_SELECT = _UxGT("Trigar"); + LSTR MSG_SELECT_E = _UxGT("Trigar *"); + LSTR MSG_ACC = _UxGT("Aceleracion"); + LSTR MSG_VTRAV_MIN = _UxGT("Vel. viache min"); + LSTR MSG_ACCELERATION = _UxGT("Accel"); + LSTR MSG_AMAX_A = _UxGT("Acel. max ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Acel. max ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Acel. max ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Acel. max ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Acel. max ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Acel. max ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Acel. max ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Acel. max *"); + LSTR MSG_A_RETRACT = _UxGT("Acel. retrac."); + LSTR MSG_A_TRAVEL = _UxGT("Acel. Viaje"); + LSTR MSG_STEPS_PER_MM = _UxGT("Trangos/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" trangos/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" trangos/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" trangos/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" trangos/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" trangos/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" trangos/mm"); + LSTR MSG_E_STEPS = _UxGT("E trangos/mm"); + LSTR MSG_EN_STEPS = _UxGT("* trangos/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatura"); + LSTR MSG_MOTION = _UxGT("Movimiento"); + LSTR MSG_FILAMENT = _UxGT("Filamento"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); + LSTR MSG_CONTRAST = _UxGT("Contraste"); + LSTR MSG_STORE_EEPROM = _UxGT("Alzar memoria"); + LSTR MSG_LOAD_EEPROM = _UxGT("Cargar memoria"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restaurar memoria"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Tornar a cargar"); + LSTR MSG_INFO_SCREEN = _UxGT("Informacion"); + LSTR MSG_PREPARE = _UxGT("Preparar"); + LSTR MSG_TUNE = _UxGT("Achustar"); + LSTR MSG_PAUSE_PRINT = _UxGT("Pausar impresion"); + LSTR MSG_RESUME_PRINT = _UxGT("Contin. impresion"); + LSTR MSG_STOP_PRINT = _UxGT("Detener Impresion"); + LSTR MSG_MEDIA_MENU = _UxGT("Menu de SD"); + LSTR MSG_NO_MEDIA = _UxGT("No i hai tarcheta"); + LSTR MSG_DWELL = _UxGT("Reposo..."); + LSTR MSG_USERWAIT = _UxGT("Aguardand ordines"); + LSTR MSG_PRINT_ABORTED = _UxGT("Impres. cancelada"); + LSTR MSG_NO_MOVE = _UxGT("Sin movimiento"); + LSTR MSG_KILLED = _UxGT("Aturada d'emerch."); + LSTR MSG_STOPPED = _UxGT("Aturada."); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retraer mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Retraer mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retraer F"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Devantar mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("DesRet mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Swap DesRet mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("DesRet F"); + LSTR MSG_AUTORETRACT = _UxGT("Retraccion auto."); + LSTR MSG_FILAMENTCHANGE = _UxGT("Cambear filamento"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Cambear filamento *"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Encetan. tarcheta"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Cambiar tarcheta"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z fuera"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desfase Z"); + LSTR MSG_BABYSTEP_X = _UxGT("Micropaso X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Micropaso Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Cancelado - Endstop"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Error: en calentar"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Error: temperatura"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("Error de temperatura"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Error: Temp Max"); + LSTR MSG_ERR_MINTEMP = _UxGT("Error: Temp Min"); + LSTR MSG_HALTED = _UxGT("IMPRESORA ATURADA"); + LSTR MSG_PLEASE_RESET = _UxGT("Per favor reinic."); + LSTR MSG_HEATING = _UxGT("Calentando..."); + LSTR MSG_BED_HEATING = _UxGT("Calentando base..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Calibracion Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Inf. Impresora"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Inf. Impresora"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Estadisticas Imp."); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Inf. Controlador"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistors"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extrusors"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baudios"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protocolo"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Luz"); + LSTR MSG_INFO_MENU = _UxGT("Inf. Impresora"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Inf. Impresora"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Estadisticas Imp."); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Inf. Controlador"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistors"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrusors"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baudios"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protocolo"); + LSTR MSG_CASE_LIGHT = _UxGT("Luz"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Conteo de impresion"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Tiempo total d'imp."); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Impresion mas larga"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Total d'extrusion"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Conteo de impresion"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Tiempo total d'imp."); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Impresion mas larga"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Total d'extrusion"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Impresions"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Mas larga"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extrusion"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Impresions"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Mas larga"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extrusion"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Temperatura menima"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temperatura maxima"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Fuente de aliment"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Temperatura menima"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Temperatura maxima"); + LSTR MSG_INFO_PSU = _UxGT("Fuente de aliment"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Fuerza d'o driver"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Escri. DAC EEPROM"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Resumir imp."); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Fuerza d'o driver"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Escri. DAC EEPROM"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Resumir imp."); // // Filament Change screens show up to 3 lines on a 4-line display @@ -219,15 +224,15 @@ namespace Language_an { #if LCD_HEIGHT >= 4 // Up to 3 lines allowed - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Aguardand iniciar", "d'o filamento", "cambear")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Meta o filamento", "y prete lo boton", "pa continar...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Aguardand iniciar", "d'o filamento", "cambear")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Meta o filamento", "y prete lo boton", "pa continar...")); #else // LCD_HEIGHT < 4 // Up to 2 lines allowed - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("Aguardand iniciar", "d'o fil. cambear")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_2_LINE("Meta o filamento", "y prete lo boton")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("Aguardand iniciar", "d'o fil. cambear")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_2_LINE("Meta o filamento", "y prete lo boton")); #endif // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Aguardando a", "expulsar filament")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Aguardando a", "cargar filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Aguardando impre.", "pa continar")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Aguardando a", "expulsar filament")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Aguardando a", "cargar filamento")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Aguardando impre.", "pa continar")); } diff --git a/Marlin/src/lcd/language/language_bg.h b/Marlin/src/lcd/language/language_bg.h index 59646521567a..3d332ca0580d 100644 --- a/Marlin/src/lcd/language/language_bg.h +++ b/Marlin/src/lcd/language/language_bg.h @@ -33,123 +33,127 @@ namespace Language_bg { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Bulgarian"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Bulgarian"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Готов."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Картата е поставена"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Картата е извадена"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Меню"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Изкл. двигатели"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Паркиране"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Задай Начало"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Изходна точка"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Готов."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Картата е поставена"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Картата е извадена"); + LSTR MSG_MAIN = _UxGT("Меню"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Изкл. двигатели"); + LSTR MSG_AUTO_HOME = _UxGT("Паркиране"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Задай Начало"); + LSTR MSG_SET_ORIGIN = _UxGT("Изходна точка"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Подгряване ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Подгряване ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Подгряване ") PREHEAT_1_LABEL _UxGT(" Дюза"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Подгряване ") PREHEAT_1_LABEL _UxGT(" Дюза ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Подгр. ") PREHEAT_1_LABEL _UxGT(" Всички"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Подгр. ") PREHEAT_1_LABEL _UxGT(" Легло"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Настройки ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1 = _UxGT("Подгряване ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Подгряване ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Подгряване ") PREHEAT_1_LABEL _UxGT(" Дюза"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Подгряване ") PREHEAT_1_LABEL _UxGT(" Дюза ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Подгр. ") PREHEAT_1_LABEL _UxGT(" Всички"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Подгр. ") PREHEAT_1_LABEL _UxGT(" Легло"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Настройки ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Подгряване $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Подгряване $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Подгряване $ Дюза"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Подгряване $ Дюза ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Подгр. $ Всички"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Подгр. $ Легло"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Настройки $"); + LSTR MSG_PREHEAT_M = _UxGT("Подгряване $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Подгряване $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Подгряване $ Дюза"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Подгряване $ Дюза ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Подгр. $ Всички"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Подгр. $ Легло"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Настройки $"); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Охлаждане"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Вкл. захранване"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Изкл. захранване"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Екструзия"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Откат"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Движение по ос"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Нивелиране"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Нивелиране"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Движение по X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Движение по Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Движение по Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Екструдер"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Екструдер *"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Премести с %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Премести с 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Премести с 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Премести с 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Скорост"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Bed Z"); - PROGMEM Language_Str MSG_NOZZLE = " " LCD_STR_THERMOMETER _UxGT(" Дюза"); - PROGMEM Language_Str MSG_NOZZLE_N = " " LCD_STR_THERMOMETER _UxGT(" Дюза ~"); - PROGMEM Language_Str MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" Легло"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Вентилатор"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Вентилатор ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Поток"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Поток ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Управление"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Минимум"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Максимум"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Фактор"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Авто-темп."); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Вкл."); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Изкл."); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-откат"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-travel"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Стъпки/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("стъпки/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("стъпки/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("стъпки/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E стъпки/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* стъпки/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Температура"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Движение"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Нишка"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Диам. нишка"); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Диам. нишка *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD контраст"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Запази в EPROM"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Зареди от EPROM"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Фабрични настройки"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Обнови"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Преглед"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Действия"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Настройка"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Пауза"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Възобнови печата"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Спри печата"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Меню карта"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Няма карта"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Почивка..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Изчакване"); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Печатът е прекъснат"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Няма движение"); - PROGMEM Language_Str MSG_KILLED = _UxGT("УБИТО."); - PROGMEM Language_Str MSG_STOPPED = _UxGT("СПРЯНО."); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Откат mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Смяна Откат mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Откат V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Скок mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Възврат mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Смяна Възврат mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Възврат V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Автоoткат"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Смяна нишка"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Смяна нишка *"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Иниц. SD-Карта"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Смяна SD-Карта"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z-сондата е извадена"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Z Отстояние"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Министъпка X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Министъпка Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Министъпка Z"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Стоп Кр.Изключватели"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Делта Калибровка"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Калибровка X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Калибровка Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Калибровка Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Калибровка Център"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Неправилен принтер"); + LSTR MSG_COOLDOWN = _UxGT("Охлаждане"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Вкл. захранване"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Изкл. захранване"); + LSTR MSG_EXTRUDE = _UxGT("Екструзия"); + LSTR MSG_RETRACT = _UxGT("Откат"); + LSTR MSG_MOVE_AXIS = _UxGT("Движение по ос"); + LSTR MSG_BED_LEVELING = _UxGT("Нивелиране"); + LSTR MSG_LEVEL_BED = _UxGT("Нивелиране"); + LSTR MSG_MOVE_X = _UxGT("Движение по X"); + LSTR MSG_MOVE_Y = _UxGT("Движение по Y"); + LSTR MSG_MOVE_Z = _UxGT("Движение по Z"); + LSTR MSG_MOVE_E = _UxGT("Екструдер"); + LSTR MSG_MOVE_EN = _UxGT("Екструдер *"); + LSTR MSG_MOVE_N_MM = _UxGT("Премести с %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Премести с 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Премести с 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Премести с 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Премести с 100mm"); + LSTR MSG_SPEED = _UxGT("Скорост"); + LSTR MSG_BED_Z = _UxGT("Bed Z"); + LSTR MSG_NOZZLE = " " LCD_STR_THERMOMETER _UxGT(" Дюза"); + LSTR MSG_NOZZLE_N = " " LCD_STR_THERMOMETER _UxGT(" Дюза ~"); + LSTR MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" Легло"); + LSTR MSG_FAN_SPEED = _UxGT("Вентилатор"); + LSTR MSG_FAN_SPEED_N = _UxGT("Вентилатор ~"); + LSTR MSG_FLOW = _UxGT("Поток"); + LSTR MSG_FLOW_N = _UxGT("Поток ~"); + LSTR MSG_CONTROL = _UxGT("Управление"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Минимум"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Максимум"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Фактор"); + LSTR MSG_AUTOTEMP = _UxGT("Авто-темп."); + LSTR MSG_LCD_ON = _UxGT("Вкл."); + LSTR MSG_LCD_OFF = _UxGT("Изкл."); + LSTR MSG_A_RETRACT = _UxGT("A-откат"); + LSTR MSG_A_TRAVEL = _UxGT("A-travel"); + LSTR MSG_STEPS_PER_MM = _UxGT("Стъпки/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" стъпки/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" стъпки/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" стъпки/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" стъпки/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" стъпки/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" стъпки/mm"); + LSTR MSG_E_STEPS = _UxGT("E стъпки/mm"); + LSTR MSG_EN_STEPS = _UxGT("* стъпки/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Температура"); + LSTR MSG_MOTION = _UxGT("Движение"); + LSTR MSG_FILAMENT = _UxGT("Нишка"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Диам. нишка"); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Диам. нишка *"); + LSTR MSG_CONTRAST = _UxGT("LCD контраст"); + LSTR MSG_STORE_EEPROM = _UxGT("Запази в EPROM"); + LSTR MSG_LOAD_EEPROM = _UxGT("Зареди от EPROM"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Фабрични настройки"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Обнови"); + LSTR MSG_INFO_SCREEN = _UxGT("Преглед"); + LSTR MSG_PREPARE = _UxGT("Действия"); + LSTR MSG_TUNE = _UxGT("Настройка"); + LSTR MSG_PAUSE_PRINT = _UxGT("Пауза"); + LSTR MSG_RESUME_PRINT = _UxGT("Възобнови печата"); + LSTR MSG_STOP_PRINT = _UxGT("Спри печата"); + LSTR MSG_MEDIA_MENU = _UxGT("Меню карта"); + LSTR MSG_NO_MEDIA = _UxGT("Няма карта"); + LSTR MSG_DWELL = _UxGT("Почивка..."); + LSTR MSG_USERWAIT = _UxGT("Изчакване"); + LSTR MSG_PRINT_ABORTED = _UxGT("Печатът е прекъснат"); + LSTR MSG_NO_MOVE = _UxGT("Няма движение"); + LSTR MSG_KILLED = _UxGT("УБИТО."); + LSTR MSG_STOPPED = _UxGT("СПРЯНО."); + LSTR MSG_CONTROL_RETRACT = _UxGT("Откат mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Смяна Откат mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Откат V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Скок mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Възврат mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Смяна Възврат mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Възврат V"); + LSTR MSG_AUTORETRACT = _UxGT("Автоoткат"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Смяна нишка"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Смяна нишка *"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Иниц. SD-Карта"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Смяна SD-Карта"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z-сондата е извадена"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Отстояние"); + LSTR MSG_BABYSTEP_X = _UxGT("Министъпка X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Министъпка Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Министъпка Z"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Стоп Кр.Изключватели"); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Делта Калибровка"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Калибровка X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Калибровка Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Калибровка Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Калибровка Център"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Неправилен принтер"); } diff --git a/Marlin/src/lcd/language/language_ca.h b/Marlin/src/lcd/language/language_ca.h index 6709a0ce5543..c8f0d26a32b1 100644 --- a/Marlin/src/lcd/language/language_ca.h +++ b/Marlin/src/lcd/language/language_ca.h @@ -30,199 +30,201 @@ namespace Language_ca { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Catalan"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Catalan"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" preparada."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Targeta detectada."); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Targeta extreta."); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstops"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menú principal"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Inici automatic"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Desactiva motors"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu de depuracio"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test barra progres"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Ves a l'origen"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("X a origen"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Y a origen"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Z a origen"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Origen XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Premeu per iniciar"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Següent punt"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Anivellament fet!"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Ajusta decalatge"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Decalatge aplicat"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Estableix origen"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" preparada."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Targeta detectada."); + LSTR MSG_MEDIA_REMOVED = _UxGT("Targeta extreta."); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); + LSTR MSG_MAIN = _UxGT("Menú principal"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Inici automatic"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Desactiva motors"); + LSTR MSG_DEBUG_MENU = _UxGT("Menu de depuracio"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test barra progres"); + LSTR MSG_HOMING = _UxGT("Origen"); + LSTR MSG_AUTO_HOME = _UxGT("Ves a l'origen"); + LSTR MSG_AUTO_HOME_X = _UxGT("X a origen"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Y a origen"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Z a origen"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Origen XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Premeu per iniciar"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Següent punt"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Anivellament fet!"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Ajusta decalatge"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Decalatge aplicat"); + LSTR MSG_SET_ORIGIN = _UxGT("Estableix origen"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Preescalfa ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Preescalfa ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" End"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" End ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" Tot"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" Llit"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" Conf."); + LSTR MSG_PREHEAT_1 = _UxGT("Preescalfa ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Preescalfa ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" End"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" End ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" Tot"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" Llit"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Preescalfa ") PREHEAT_1_LABEL _UxGT(" Conf."); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Preescalfa $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Preescalfa $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Preescalfa $ End"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Preescalfa $ End ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Preescalfa $ Tot"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Preescalfa $ Llit"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Preescalfa $ Conf."); + LSTR MSG_PREHEAT_M = _UxGT("Preescalfa $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Preescalfa $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Preescalfa $ End"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Preescalfa $ End ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Preescalfa $ Tot"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Preescalfa $ Llit"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Preescalfa $ Conf."); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Refreda"); + LSTR MSG_COOLDOWN = _UxGT("Refreda"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrudeix"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Retreu"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mou eixos"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Anivella llit"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Anivella llit"); + LSTR MSG_EXTRUDE = _UxGT("Extrudeix"); + LSTR MSG_RETRACT = _UxGT("Retreu"); + LSTR MSG_MOVE_AXIS = _UxGT("Mou eixos"); + LSTR MSG_BED_LEVELING = _UxGT("Anivella llit"); + LSTR MSG_LEVEL_BED = _UxGT("Anivella llit"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Movent.."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("XY lliures"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Mou X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Mou Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Mou Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extrusor"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extrusor *"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Mou %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mou 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mou 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mou 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Velocitat"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Llit Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Nozzle"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Nozzle ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Llit"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Vel. Ventilador"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Vel. Ventilador ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Flux"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flux ~"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VViatge min"); + LSTR MSG_MOVING = _UxGT("Movent.."); + LSTR MSG_FREE_XY = _UxGT("XY lliures"); + LSTR MSG_MOVE_X = _UxGT("Mou X"); + LSTR MSG_MOVE_Y = _UxGT("Mou Y"); + LSTR MSG_MOVE_Z = _UxGT("Mou Z"); + LSTR MSG_MOVE_E = _UxGT("Extrusor"); + LSTR MSG_MOVE_EN = _UxGT("Extrusor *"); + LSTR MSG_MOVE_N_MM = _UxGT("Mou %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Mou 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Mou 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Mou 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Mou 100mm"); + LSTR MSG_SPEED = _UxGT("Velocitat"); + LSTR MSG_BED_Z = _UxGT("Llit Z"); + LSTR MSG_NOZZLE = _UxGT("Nozzle"); + LSTR MSG_NOZZLE_N = _UxGT("Nozzle ~"); + LSTR MSG_BED = _UxGT("Llit"); + LSTR MSG_FAN_SPEED = _UxGT("Vel. Ventilador"); + LSTR MSG_FAN_SPEED_N = _UxGT("Vel. Ventilador ~"); + LSTR MSG_FLOW = _UxGT("Flux"); + LSTR MSG_FLOW_N = _UxGT("Flux ~"); + LSTR MSG_VTRAV_MIN = _UxGT("VViatge min"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Accel. retracc"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Accel. Viatge"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Passos/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("passos/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("passos/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("passos/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("Epassos/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*passos/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Moviment"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E en mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Diam. Fil."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Diam. Fil. *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Contrast de LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Desa memoria"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Carrega memoria"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Restaura valors"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Actualitza"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Pantalla Info."); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Prepara"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Ajusta"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pausa impressio"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Repren impressio"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Atura impressio."); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Imprimeix de SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("No hi ha targeta"); - PROGMEM Language_Str MSG_DWELL = _UxGT("En repos..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Esperant usuari.."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Imp. cancelada"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Sense moviment."); - PROGMEM Language_Str MSG_KILLED = _UxGT("MATAT."); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ATURADA."); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retreu mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Retreure mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retreu V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Aixeca mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("DesRet +mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Swap DesRet +mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("DesRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto retraccio"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Canvia filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Canvia filament *"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Inicialitza SD"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Canvia SD"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sonda Z fora"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reinicia BLTouch"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Home %s%s%s primer"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Decalatge Z"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Micropas X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Micropas Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Micropas Z"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Cancel. Endstop"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Error al escalfar"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP REDUNDANT"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err: TEMP MAXIMA"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err: TEMP MINIMA"); - PROGMEM Language_Str MSG_HALTED = _UxGT("IMPRESSORA PARADA"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Reinicieu"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Escalfant..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Escalfant llit..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Calibratge Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibra X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibra Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibra Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibra el centre"); + LSTR MSG_A_RETRACT = _UxGT("Accel. retracc"); + LSTR MSG_A_TRAVEL = _UxGT("Accel. Viatge"); + LSTR MSG_STEPS_PER_MM = _UxGT("Passos/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" passos/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" passos/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" passos/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" passos/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" passos/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" passos/mm"); + LSTR MSG_E_STEPS = _UxGT("Epassos/mm"); + LSTR MSG_EN_STEPS = _UxGT("*passos/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatura"); + LSTR MSG_MOTION = _UxGT("Moviment"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E en mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Diam. Fil."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Diam. Fil. *"); + LSTR MSG_CONTRAST = _UxGT("Contrast de LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Desa memoria"); + LSTR MSG_LOAD_EEPROM = _UxGT("Carrega memoria"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restaura valors"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Actualitza"); + LSTR MSG_INFO_SCREEN = _UxGT("Pantalla Info."); + LSTR MSG_PREPARE = _UxGT("Prepara"); + LSTR MSG_TUNE = _UxGT("Ajusta"); + LSTR MSG_PAUSE_PRINT = _UxGT("Pausa impressio"); + LSTR MSG_RESUME_PRINT = _UxGT("Repren impressio"); + LSTR MSG_STOP_PRINT = _UxGT("Atura impressio."); + LSTR MSG_MEDIA_MENU = _UxGT("Imprimeix de SD"); + LSTR MSG_NO_MEDIA = _UxGT("No hi ha targeta"); + LSTR MSG_DWELL = _UxGT("En repos..."); + LSTR MSG_USERWAIT = _UxGT("Esperant usuari.."); + LSTR MSG_PRINT_ABORTED = _UxGT("Imp. cancelada"); + LSTR MSG_NO_MOVE = _UxGT("Sense moviment."); + LSTR MSG_KILLED = _UxGT("MATAT."); + LSTR MSG_STOPPED = _UxGT("ATURADA."); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retreu mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Retreure mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retreu V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Aixeca mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("DesRet +mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Swap DesRet +mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("DesRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto retraccio"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Canvia filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Canvia filament *"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Inicialitza SD"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Canvia SD"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z fora"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reinicia BLTouch"); + LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s primer"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Decalatge Z"); + LSTR MSG_BABYSTEP_X = _UxGT("Micropas X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Micropas Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Micropas Z"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Cancel. Endstop"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Error al escalfar"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP REDUNDANT"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Err: TEMP MAXIMA"); + LSTR MSG_ERR_MINTEMP = _UxGT("Err: TEMP MINIMA"); + LSTR MSG_HALTED = _UxGT("IMPRESSORA PARADA"); + LSTR MSG_PLEASE_RESET = _UxGT("Reinicieu"); + LSTR MSG_HEATING = _UxGT("Escalfant..."); + LSTR MSG_BED_HEATING = _UxGT("Escalfant llit..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Calibratge Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibra X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibra Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibra Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibra el centre"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Quant a la impr."); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Info Impressora"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Estadistiques"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Info placa"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistors"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extrusors"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baud"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protocol"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Llum"); + LSTR MSG_INFO_MENU = _UxGT("Quant a la impr."); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Info Impressora"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Estadistiques"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Info placa"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistors"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrusors"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baud"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protocol"); + LSTR MSG_CASE_LIGHT = _UxGT("Llum"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Total impressions"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Acabades"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Temps imprimint"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Treball mes llarg"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Total extrudit"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Total impressions"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Acabades"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Temps imprimint"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Treball mes llarg"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Total extrudit"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Impressions"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Acabades"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Mes llarg"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extrudit"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Impressions"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Acabades"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Mes llarg"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extrudit"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Temp. mínima"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp. màxima"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Font alimentacio"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Temp. mínima"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Temp. màxima"); + LSTR MSG_INFO_PSU = _UxGT("Font alimentacio"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Força motor"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Força motor"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Repren impressió"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Repren impressió"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Impressora incorrecta"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Impressora incorrecta"); // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Esperant per", "iniciar el canvi", "de filament")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Esperant per", "treure filament")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Poseu filament", "i premeu el boto", "per continuar...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Premeu boto per", "escalfar nozzle.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Escalfant nozzle", "Espereu...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Esperant carrega", "de filament")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Esperant per", "reprendre")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Esperant per", "iniciar el canvi", "de filament")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Esperant per", "treure filament")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Poseu filament", "i premeu el boto", "per continuar...")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Premeu boto per", "escalfar nozzle.")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Escalfant nozzle", "Espereu...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Esperant carrega", "de filament")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Esperant per", "reprendre")); #else // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Espereu...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Expulsant...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insereix i prem")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Escalfant...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Carregant...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Reprenent...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Espereu...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Expulsant...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insereix i prem")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Escalfant...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Carregant...")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Reprenent...")); #endif // LCD_HEIGHT < 4 } diff --git a/Marlin/src/lcd/language/language_cz.h b/Marlin/src/lcd/language/language_cz.h index adcbba772015..2ee0534f9d3c 100644 --- a/Marlin/src/lcd/language/language_cz.h +++ b/Marlin/src/lcd/language/language_cz.h @@ -38,557 +38,567 @@ namespace Language_cz { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Czech"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Czech"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" připraven."); - PROGMEM Language_Str MSG_YES = _UxGT("ANO"); - PROGMEM Language_Str MSG_NO = _UxGT("NE"); - PROGMEM Language_Str MSG_BACK = _UxGT("Zpět"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Rušení..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Médium vloženo"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Médium vyjmuto"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Čekání na médium"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Chyba čtení média"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB odstraněno"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Chyba USB"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstopy"); // max 8 znaku - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstopy"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Hlavní nabídka"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Další nastavení"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Konfigurace"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autostart"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Uvolnit motory"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Nabídka ladění"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" připraven."); + LSTR MSG_YES = _UxGT("ANO"); + LSTR MSG_NO = _UxGT("NE"); + LSTR MSG_BACK = _UxGT("Zpět"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Rušení..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Médium vloženo"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Médium vyjmuto"); + LSTR MSG_MEDIA_WAITING = _UxGT("Čekání na médium"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Chyba čtení média"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB odstraněno"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Chyba USB"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstopy"); // max 8 znaku + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstopy"); + LSTR MSG_MAIN = _UxGT("Hlavní nabídka"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Další nastavení"); + LSTR MSG_CONFIGURATION = _UxGT("Konfigurace"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Uvolnit motory"); + LSTR MSG_DEBUG_MENU = _UxGT("Nabídka ladění"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test ukaz. průběhu"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test ukaz. průběhu"); #else - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test uk. průběhu"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test uk. průběhu"); #endif - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Domovská pozice"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Domů osa X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Domů osa Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Domů osa Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto srovnání Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Měření podložky"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Kliknutím spusťte"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Další bod"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Měření hotovo!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Výška srovnávání"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Nastavit ofsety"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofsety nastaveny"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Nastavit počátek"); + LSTR MSG_AUTO_HOME = _UxGT("Domovská pozice"); + LSTR MSG_AUTO_HOME_X = _UxGT("Domů osa X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Domů osa Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Domů osa Z"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto srovnání Z"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Měření podložky"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Kliknutím spusťte"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Další bod"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Měření hotovo!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Výška srovnávání"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Nastavit ofsety"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofsety nastaveny"); + LSTR MSG_SET_ORIGIN = _UxGT("Nastavit počátek"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Zahřát ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Zahřát ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" end"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" end ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" vše"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" podlož"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" nast"); + LSTR MSG_PREHEAT_1 = _UxGT("Zahřát ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Zahřát ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" end"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" end ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" vše"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" podlož"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Zahřát ") PREHEAT_1_LABEL _UxGT(" nast"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Zahřát $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Zahřát $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Zahřát $ end"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Zahřát $ end ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Zahřát $ vše"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Zahřát $ podlož"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Zahřát $ nast"); + LSTR MSG_PREHEAT_M = _UxGT("Zahřát $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Zahřát $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Zahřát $ end"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Zahřát $ end ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Zahřát $ vše"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Zahřát $ podlož"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Zahřát $ nast"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Zahřát vlastní"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Zchladit"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Ovládání laseru"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Výkon laseru"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Vřeteno ovládání"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Vřeteno výkon"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Vřeteno opačně"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Zapnout napájení"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Vypnout napájení"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Vytlačit (extr.)"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Zatlačit (retr.)"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Posunout osy"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Vyrovnat podložku"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Vyrovnat podložku"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Vyrovnat rohy"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Další roh"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor sítě"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Upravit síť bodů"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Konec úprav sítě"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Měření bodu"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Hodnota Z"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Zahřát vlastní"); + LSTR MSG_COOLDOWN = _UxGT("Zchladit"); + LSTR MSG_LASER_MENU = _UxGT("Ovládání laseru"); + LSTR MSG_LASER_POWER = _UxGT("Výkon laseru"); + LSTR MSG_SPINDLE_MENU = _UxGT("Vřeteno ovládání"); + LSTR MSG_SPINDLE_POWER = _UxGT("Vřeteno výkon"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Vřeteno opačně"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Zapnout napájení"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Vypnout napájení"); + LSTR MSG_EXTRUDE = _UxGT("Vytlačit (extr.)"); + LSTR MSG_RETRACT = _UxGT("Zatlačit (retr.)"); + LSTR MSG_MOVE_AXIS = _UxGT("Posunout osy"); + LSTR MSG_BED_LEVELING = _UxGT("Vyrovnat podložku"); + LSTR MSG_LEVEL_BED = _UxGT("Vyrovnat podložku"); + LSTR MSG_BED_TRAMMING = _UxGT("Vyrovnat rohy"); + LSTR MSG_NEXT_CORNER = _UxGT("Další roh"); + LSTR MSG_MESH_EDITOR = _UxGT("Editor sítě"); + LSTR MSG_EDIT_MESH = _UxGT("Upravit síť bodů"); + LSTR MSG_EDITING_STOPPED = _UxGT("Konec úprav sítě"); + LSTR MSG_PROBING_POINT = _UxGT("Měření bodu"); + LSTR MSG_MESH_X = _UxGT("Index X"); + LSTR MSG_MESH_Y = _UxGT("Index Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Hodnota Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Vlastní příkazy"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 test sondy"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 bod"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Odchylka"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("Režim IDEX"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Ofsety nástrojů"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplikace"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Zrcadlení"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Plná kontrola"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2. tryska X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2. tryska Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2. tryska Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Vlastní příkazy"); + LSTR MSG_M48_TEST = _UxGT("M48 test sondy"); + LSTR MSG_M48_POINT = _UxGT("M48 bod"); + LSTR MSG_M48_DEVIATION = _UxGT("Odchylka"); + LSTR MSG_IDEX_MENU = _UxGT("Režim IDEX"); + LSTR MSG_OFFSETS_MENU = _UxGT("Ofsety nástrojů"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplikace"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Zrcadlení"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Plná kontrola"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2. tryska X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2. tryska Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. tryska Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Provádím G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL nástroje"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Vyrovnání bodu"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Manuální síť bodů"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Vložte kartu, změřte"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Změřte"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Odstraňte a změřte"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Přesun na další"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Aktivovat UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Deaktivovat UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Teplota podložky"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Teplota podložky"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Teplota hotendu"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Teplota hotendu"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Úprava sítě bodů"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Upravit vlastní síť"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Doladit síť bodů"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Konec úprav sítě"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Vlastní síť"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Vytvořit síť"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Provádím G29"); + LSTR MSG_UBL_TOOLS = _UxGT("UBL nástroje"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Vyrovnání bodu"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Manuální síť bodů"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Vložte kartu, změřte"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Změřte"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Odstraňte a změřte"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Přesun na další"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Aktivovat UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Deaktivovat UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Teplota podložky"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Teplota podložky"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Teplota hotendu"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Teplota hotendu"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Úprava sítě bodů"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Upravit vlastní síť"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Doladit síť bodů"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Konec úprav sítě"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Vlastní síť"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Vytvořit síť"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Síť bodů $"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Kontrola sítě $"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Síť bodů $"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Kontrola sítě $"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Studená síť bodů"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Upravit výšku sítě"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Výška"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Zkontrolovat síť"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Kontrola vlast. sítě"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 zahřívání podl."); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 zařívání trysky"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Ruční zavedení..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Pevné zavední"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Done Priming"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Canceled"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Leaving G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Pokračovat v síťi"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Síťové rovnání"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-bodové rovnání"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Mřížkové rovnání"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Srovnat podložku"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Postranní body"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Typ sítě bodu"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Exportovat síť"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Exportovat do PC"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Exportovat do CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Záloha do PC"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Info o UBL do PC"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Hustota mřížky"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Ruční hustota"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Chytrá hustota"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Zaplnit mřížku"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Zrušit všechno"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Zrušit poslední"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Upravit všechny"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Upravit poslední"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Uložiště sítí"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Paměťový slot"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Načíst síť bodů"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Uložit síť bodů"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Síť %i načtena"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Síť %i uložena"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Nedostatek místa"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Ch.: Uložit UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Ch.: Obnovit UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-ofset: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Konec Z-ofsetu"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL Postupně"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Studená síť bodů"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. Chytrá hustota"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Zkontrolovat síť"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Upravit všechny"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Zkontrolovat síť"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Upravit všechny"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. Uložit síť bodů"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Studená síť bodů"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Upravit výšku sítě"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Výška"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Zkontrolovat síť"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Kontrola vlast. sítě"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 zahřívání podl."); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 zařívání trysky"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Ruční zavedení..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Pevné zavední"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Done Priming"); + LSTR MSG_G26_CANCELED = _UxGT("G26 Canceled"); + LSTR MSG_G26_LEAVING = _UxGT("Leaving G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Pokračovat v síťi"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Síťové rovnání"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-bodové rovnání"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Mřížkové rovnání"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Srovnat podložku"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Postranní body"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Typ sítě bodu"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Exportovat síť"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Exportovat do PC"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Exportovat do CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Záloha do PC"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Info o UBL do PC"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Hustota mřížky"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Ruční hustota"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Chytrá hustota"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Zaplnit mřížku"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Zrušit všechno"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Zrušit poslední"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Upravit všechny"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Upravit poslední"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Uložiště sítí"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Paměťový slot"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Načíst síť bodů"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Uložit síť bodů"); + LSTR MSG_MESH_LOADED = _UxGT("Síť %i načtena"); + LSTR MSG_MESH_SAVED = _UxGT("Síť %i uložena"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Nedostatek místa"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Ch.: Uložit UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Ch.: Obnovit UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-ofset: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Konec Z-ofsetu"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL Postupně"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Studená síť bodů"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2. Chytrá hustota"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Zkontrolovat síť"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Upravit všechny"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Zkontrolovat síť"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Upravit všechny"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Uložit síť bodů"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Nastavení LED"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Světla"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Světla Předvolby"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Červená"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Oranžová"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Žlutá"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Zelená"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Modrá"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Fialová"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Bílá"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Výchozí"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Vlastní světla"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Červená intenzita"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Zelená intezita"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Modrá intenzita"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Bílá intenzita"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Jas"); + LSTR MSG_LED_CONTROL = _UxGT("Nastavení LED"); + LSTR MSG_LEDS = _UxGT("Světla"); + LSTR MSG_LED_PRESETS = _UxGT("Světla Předvolby"); + LSTR MSG_SET_LEDS_RED = _UxGT("Červená"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Oranžová"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Žlutá"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Zelená"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Modrá"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Fialová"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Bílá"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Výchozí"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Vlastní světla"); + LSTR MSG_INTENSITY_R = _UxGT("Červená intenzita"); + LSTR MSG_INTENSITY_G = _UxGT("Zelená intezita"); + LSTR MSG_INTENSITY_B = _UxGT("Modrá intenzita"); + LSTR MSG_INTENSITY_W = _UxGT("Bílá intenzita"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Jas"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Posouvání..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Uvolnit XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Posunout X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Posunout Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Posunout Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extrudér"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extrudér *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Hotend je studený"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Posunout o %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Posunout o 0,1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Posunout o 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Posunout o 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Rychlost"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Výška podl."); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Tryska"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Tryska ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Podložka"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Komora"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Rychlost vent."); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Rychlost vent. ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Ulož. vent. ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Rychlost ex. vent."); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Rychlost ex. vent. ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Průtok"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Průtok ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Ovládaní"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" fakt"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Autoteplota"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Zap"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Vyp"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID automatika"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID automatika *"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Vybrat"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Vybrat *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Zrychl"); - PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Odchylka spoje"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Rychlost"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VTrav Min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Akcelerace"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retrakt"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-přejezd"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Kroků/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("kroků/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("kroků/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("kroků/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("Ekroků/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*kroků/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Teplota"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Pohyb"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E na mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Fil. Prum."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Fil. Prum. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Vysunout mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Zavést mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("K pro posun"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("K pro posun *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Kontrast LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Uložit nastavení"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Načíst nastavení"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Obnovit výchozí"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Inic. EEPROM"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Aktualizace z SD"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Reset tiskárny"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Obnovit"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info obrazovka"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Připrava tisku"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Doladění tisku"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Spustit tisk"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Další"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Inicializace"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Stop"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Tisk"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Zrušit"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Hotovo"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Zpět"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Pokračovat"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pozastavit tisk"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Obnovit tisk"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Zastavit tisk"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Tisk objektu"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Zrušit objekt"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Zrušit objekt ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Obnova výpadku"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Tisknout z SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Žádná SD karta"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Uspáno..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Čekání na uživ..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Tisk pozastaven"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Tisknu..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Tisk zrušen"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Žádný pohyb."); - PROGMEM Language_Str MSG_KILLED = _UxGT("PŘERUSENO. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ZASTAVENO. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retrakt mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Výměna Re.mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retraktovat V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Zvednuti Z mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto-Retract"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Délka retrakce"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Délka zavedení"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Výměna nástroje"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Zdvih Z"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Rychlost primár."); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Rychlost retrak."); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Tryska standby"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Vyměnit filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Vyměnit filament *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Zavést filament"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Zavést filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Vysunout filament"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Vysunout filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Vysunout vše"); + LSTR MSG_MOVING = _UxGT("Posouvání..."); + LSTR MSG_FREE_XY = _UxGT("Uvolnit XY"); + LSTR MSG_MOVE_X = _UxGT("Posunout X"); + LSTR MSG_MOVE_Y = _UxGT("Posunout Y"); + LSTR MSG_MOVE_Z = _UxGT("Posunout Z"); + LSTR MSG_MOVE_E = _UxGT("Extrudér"); + LSTR MSG_MOVE_EN = _UxGT("Extrudér *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Hotend je studený"); + LSTR MSG_MOVE_N_MM = _UxGT("Posunout o %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Posunout o 0,1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Posunout o 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Posunout o 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Posunout o 100mm"); + LSTR MSG_SPEED = _UxGT("Rychlost"); + LSTR MSG_BED_Z = _UxGT("Výška podl."); + LSTR MSG_NOZZLE = _UxGT("Tryska"); + LSTR MSG_NOZZLE_N = _UxGT("Tryska ~"); + LSTR MSG_BED = _UxGT("Podložka"); + LSTR MSG_CHAMBER = _UxGT("Komora"); + LSTR MSG_FAN_SPEED = _UxGT("Rychlost vent."); + LSTR MSG_FAN_SPEED_N = _UxGT("Rychlost vent. ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Ulož. vent. ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Rychlost ex. vent."); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Rychlost ex. vent. ~"); + LSTR MSG_FLOW = _UxGT("Průtok"); + LSTR MSG_FLOW_N = _UxGT("Průtok ~"); + LSTR MSG_CONTROL = _UxGT("Ovládaní"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" fakt"); + LSTR MSG_AUTOTEMP = _UxGT("Autoteplota"); + LSTR MSG_LCD_ON = _UxGT("Zap"); + LSTR MSG_LCD_OFF = _UxGT("Vyp"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID automatika"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID automatika *"); + LSTR MSG_SELECT = _UxGT("Vybrat"); + LSTR MSG_SELECT_E = _UxGT("Vybrat *"); + LSTR MSG_ACC = _UxGT("Zrychl"); + LSTR MSG_JERK = _UxGT("Jerk"); + LSTR MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + LSTR MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + LSTR MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + LSTR MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + LSTR MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + LSTR MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + LSTR MSG_VE_JERK = _UxGT("Max E Jerk"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Odchylka spoje"); + LSTR MSG_VELOCITY = _UxGT("Rychlost"); + LSTR MSG_VMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Rychlost"); + LSTR MSG_VMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Rychlost"); + LSTR MSG_VMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Rychlost"); + LSTR MSG_VMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Rychlost"); + LSTR MSG_VMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Rychlost"); + LSTR MSG_VMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Rychlost"); + LSTR MSG_VMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Rychlost"); + LSTR MSG_VMAX_EN = _UxGT("Max * Rychlost"); + LSTR MSG_VMIN = _UxGT("Vmin"); + LSTR MSG_VTRAV_MIN = _UxGT("VTrav Min"); + LSTR MSG_ACCELERATION = _UxGT("Akcelerace"); + LSTR MSG_AMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Akcel"); + LSTR MSG_AMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Akcel"); + LSTR MSG_AMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Akcel"); + LSTR MSG_AMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Akcel"); + LSTR MSG_AMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Akcel"); + LSTR MSG_AMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Akcel"); + LSTR MSG_AMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Akcel"); + LSTR MSG_AMAX_EN = _UxGT("Max * Akcel"); + LSTR MSG_A_RETRACT = _UxGT("A-retrakt"); + LSTR MSG_A_TRAVEL = _UxGT("A-přejezd"); + LSTR MSG_STEPS_PER_MM = _UxGT("Kroků/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" kroků/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" kroků/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" kroků/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" kroků/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" kroků/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" kroků/mm"); + LSTR MSG_E_STEPS = _UxGT("E kroků/mm"); + LSTR MSG_EN_STEPS = _UxGT("* kroků/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Teplota"); + LSTR MSG_MOTION = _UxGT("Pohyb"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E na mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Fil. Prum."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Fil. Prum. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Vysunout mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Zavést mm"); + LSTR MSG_ADVANCE_K = _UxGT("K pro posun"); + LSTR MSG_ADVANCE_K_E = _UxGT("K pro posun *"); + LSTR MSG_CONTRAST = _UxGT("Kontrast LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Uložit nastavení"); + LSTR MSG_LOAD_EEPROM = _UxGT("Načíst nastavení"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Obnovit výchozí"); + LSTR MSG_INIT_EEPROM = _UxGT("Inic. EEPROM"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Aktualizace z SD"); + LSTR MSG_RESET_PRINTER = _UxGT("Reset tiskárny"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Obnovit"); + LSTR MSG_INFO_SCREEN = _UxGT("Info obrazovka"); + LSTR MSG_PREPARE = _UxGT("Připrava tisku"); + LSTR MSG_TUNE = _UxGT("Doladění tisku"); + LSTR MSG_START_PRINT = _UxGT("Spustit tisk"); + LSTR MSG_BUTTON_NEXT = _UxGT("Další"); + LSTR MSG_BUTTON_INIT = _UxGT("Inicializace"); + LSTR MSG_BUTTON_STOP = _UxGT("Stop"); + LSTR MSG_BUTTON_PRINT = _UxGT("Tisk"); + LSTR MSG_BUTTON_RESET = _UxGT("Reset"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Zrušit"); + LSTR MSG_BUTTON_DONE = _UxGT("Hotovo"); + LSTR MSG_BUTTON_BACK = _UxGT("Zpět"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Pokračovat"); + LSTR MSG_PAUSE_PRINT = _UxGT("Pozastavit tisk"); + LSTR MSG_RESUME_PRINT = _UxGT("Obnovit tisk"); + LSTR MSG_STOP_PRINT = _UxGT("Zastavit tisk"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Tisk objektu"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušit objekt"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušit objekt ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Obnova výpadku"); + LSTR MSG_MEDIA_MENU = _UxGT("Tisknout z SD"); + LSTR MSG_NO_MEDIA = _UxGT("Žádná SD karta"); + LSTR MSG_DWELL = _UxGT("Uspáno..."); + LSTR MSG_USERWAIT = _UxGT("Čekání na uživ..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Tisk pozastaven"); + LSTR MSG_PRINTING = _UxGT("Tisknu..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Tisk zrušen"); + LSTR MSG_NO_MOVE = _UxGT("Žádný pohyb."); + LSTR MSG_KILLED = _UxGT("PŘERUSENO. "); + LSTR MSG_STOPPED = _UxGT("ZASTAVENO. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retrakt mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Výměna Re.mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retraktovat V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Zvednuti Z mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto-Retract"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Délka retrakce"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Délka zavedení"); + LSTR MSG_TOOL_CHANGE = _UxGT("Výměna nástroje"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Zdvih Z"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Rychlost primár."); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Rychlost retrak."); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Tryska standby"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Vyměnit filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Vyměnit filament *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Zavést filament"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Zavést filament *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Vysunout filament"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Vysunout filament *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Vysunout vše"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Načíst médium"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Vyměnit médium"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Vysunout médium"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sonda Z mimo podl"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Faktor zkosení"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch self-test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("BLTouch reset"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("BLTouch zasunout"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("BLTouch vysunout"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("SW výsun BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("BLTouch 5V režim"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("BLTouch OD režim"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Uložit režim"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Nastavit 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Nastacit OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Vypsat nastavení"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("VAROVANÍ: Špatné nastavení může způsobit škody! Pokračovat?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Inic. TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Test Z Ofsetu"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Uložiy"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("vysunout TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Vysunout Z-sondu"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Zasunout Z-sondu"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Domů %s%s%s první"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Z ofset"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Babystep X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Babystep Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Babystep Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Celkem"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Endstop abort"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Chyba zahřívání"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("REDUND. TEPLOTA"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("TEPLOTNÍ ÚNIK"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("TEPL. ÚNIK PODL."); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("TEPL. ÚNIK KOMORA"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("VYSOKÁ TEPLOTA"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("NÍZKA TEPLOTA"); - PROGMEM Language_Str MSG_HALTED = _UxGT("TISK. ZASTAVENA"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Proveďte reset"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); - PROGMEM Language_Str MSG_HEATING = _UxGT("Zahřívání..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Chlazení..."); + LSTR MSG_ATTACH_MEDIA = _UxGT("Načíst médium"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Vyměnit médium"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Vysunout médium"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z mimo podl"); + LSTR MSG_SKEW_FACTOR = _UxGT("Faktor zkosení"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch self-test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("BLTouch reset"); + LSTR MSG_BLTOUCH_STOW = _UxGT("BLTouch zasunout"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("BLTouch vysunout"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("SW výsun BLTouch"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("BLTouch 5V režim"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("BLTouch OD režim"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Uložit režim"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Nastavit 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Nastacit OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Vypsat nastavení"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("VAROVANÍ: Špatné nastavení může způsobit škody! Pokračovat?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Inic. TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Test Z Ofsetu"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Uložiy"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("vysunout TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Vysunout Z-sondu"); + LSTR MSG_MANUAL_STOW = _UxGT("Zasunout Z-sondu"); + LSTR MSG_HOME_FIRST = _UxGT("Domů %s%s%s první"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z ofset"); + LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Celkem"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop abort"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Chyba zahřívání"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("REDUND. TEPLOTA"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("TEPLOTNÍ ÚNIK"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TEPL. ÚNIK PODL."); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("TEPL. ÚNIK KOMORA"); + LSTR MSG_ERR_MAXTEMP = _UxGT("VYSOKÁ TEPLOTA"); + LSTR MSG_ERR_MINTEMP = _UxGT("NÍZKA TEPLOTA"); + LSTR MSG_HALTED = _UxGT("TISK. ZASTAVENA"); + LSTR MSG_PLEASE_RESET = _UxGT("Proveďte reset"); + LSTR MSG_HEATING = _UxGT("Zahřívání..."); + LSTR MSG_COOLING = _UxGT("Chlazení..."); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Zahřívání podložky"); + LSTR MSG_BED_HEATING = _UxGT("Zahřívání podložky"); #else - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Zahřívání podl."); + LSTR MSG_BED_HEATING = _UxGT("Zahřívání podl."); #endif #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Chlazení podložky"); + LSTR MSG_BED_COOLING = _UxGT("Chlazení podložky"); #else - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Chlazení podl."); + LSTR MSG_BED_COOLING = _UxGT("Chlazení podl."); #endif - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Zahřívání komory..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Chlazení komory..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrace"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibrovat X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibrovat Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibrovat Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibrovat Střed"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta nastavení"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Autokalibrace"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Nast.výšku delty"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Nast. Z-ofset"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diag rameno"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Výška"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Poloměr"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("O tiskárně"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Info o tiskárně"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-bodové rovnání"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Lineárni rovnání"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilineární rovnání"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Mřížkové rovnání"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Statistika"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Info o desce"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistory"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extrudéry"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Rychlost"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokol"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Sledování úniku: VYP"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Sledování úniku: ZAP"); + LSTR MSG_CHAMBER_HEATING = _UxGT("Zahřívání komory..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Chlazení komory..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrace"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibrovat X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibrovat Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibrovat Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibrovat Střed"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Delta nastavení"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Autokalibrace"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Nast.výšku delty"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Nast. Z-ofset"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Diag rameno"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Výška"); + LSTR MSG_DELTA_RADIUS = _UxGT("Poloměr"); + LSTR MSG_INFO_MENU = _UxGT("O tiskárně"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Info o tiskárně"); + LSTR MSG_3POINT_LEVELING = _UxGT("3-bodové rovnání"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Lineárni rovnání"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Bilineární rovnání"); + LSTR MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); + LSTR MSG_MESH_LEVELING = _UxGT("Mřížkové rovnání"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Statistika"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Info o desce"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistory"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrudéry"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Rychlost"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protokol"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Sledování úniku: VYP"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Sledování úniku: ZAP"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Osvětlení"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Jas světla"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("NESPRÁVNÁ TISKÁRNA"); + LSTR MSG_CASE_LIGHT = _UxGT("Osvětlení"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Jas světla"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("NESPRÁVNÁ TISKÁRNA"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Počet tisků"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Dokončeno"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Celkový čas"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Nejdelší tisk"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Celkem vytlačeno"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Počet tisků"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Dokončeno"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Celkový čas"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Nejdelší tisk"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Celkem vytlačeno"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Tisky"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Hotovo"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Čas"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Nejdelší"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Vytlačeno"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Tisky"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Hotovo"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Čas"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Nejdelší"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Vytlačeno"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Teplota min"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Teplota max"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Nap. zdroj"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Buzení motorů"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Motor %"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC uložit EEPROM"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CHYBA SPOJENÍ"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("VÝMĚNA FILAMENTU"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("TISK POZASTAVEN"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("ZAVEDENÍ FILAMENTU"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("VYSUNUTÍ FILAMENTU"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("MOŽNOSTI OBNOVENÍ:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Vytlačit víc"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Obnovit tisk"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Tryska: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Senzor filamentu"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Délka mm senz.fil."); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Parkování selhalo"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Kalibrace selhala"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Teplota min"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Teplota max"); + LSTR MSG_INFO_PSU = _UxGT("Nap. zdroj"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Buzení motorů"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Motor %"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("DAC uložit EEPROM"); + LSTR MSG_ERROR_TMC = _UxGT("TMC CHYBA SPOJENÍ"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("VÝMĚNA FILAMENTU"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("TISK POZASTAVEN"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("ZAVEDENÍ FILAMENTU"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("VYSUNUTÍ FILAMENTU"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("MOŽNOSTI OBNOVENÍ:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Vytlačit víc"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Obnovit tisk"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Tryska: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Senzor filamentu"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Délka mm senz.fil."); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Parkování selhalo"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Kalibrace selhala"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("VYBERTE FILAMENT"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Aktual. MMU firmware!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU potř. pozornost."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Obnovit tisk"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Obnovování..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Zavést filament"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Zavést všechny"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Zavést do trysky"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Vysunout filament"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Vysun. filament ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Vytáhnout filament"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Zavádění fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Vytahování fil. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Vysouvání fil...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Všechny"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Resetovat MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("Resetování MMU..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Vytáhněte, klikněte"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("VYBERTE FILAMENT"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Aktual. MMU firmware!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU potř. pozornost."); + LSTR MSG_MMU2_RESUME = _UxGT("Obnovit tisk"); + LSTR MSG_MMU2_RESUMING = _UxGT("Obnovování..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Zavést filament"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Zavést všechny"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Zavést do trysky"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Vysunout filament"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Vysun. filament ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Vytáhnout filament"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Zavádění fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Vytahování fil. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Vysouvání fil...."); + LSTR MSG_MMU2_ALL = _UxGT("Všechny"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); + LSTR MSG_MMU2_RESET = _UxGT("Resetovat MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("Resetování MMU..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Vytáhněte, klikněte"); - PROGMEM Language_Str MSG_MIX = _UxGT("Mix"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Komponenta ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Mixér"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Přechod"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Celý přechod"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Přepnout mix"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Střídat mix"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Přechod mix"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Opačný přechod"); + LSTR MSG_MIX = _UxGT("Mix"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponenta ="); + LSTR MSG_MIXER = _UxGT("Mixér"); + LSTR MSG_GRADIENT = _UxGT("Přechod"); + LSTR MSG_FULL_GRADIENT = _UxGT("Celý přechod"); + LSTR MSG_TOGGLE_MIX = _UxGT("Přepnout mix"); + LSTR MSG_CYCLE_MIX = _UxGT("Střídat mix"); + LSTR MSG_GRADIENT_MIX = _UxGT("Přechod mix"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Opačný přechod"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Aktivní V-nástroj"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Spustit V-nástroj"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT("Ukončit V-nástroj"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias V-nástroje"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Resetovat V-nástroj"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Uložit V-nástroj mix"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-nástroj resetovat"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Aktivní V-nástroj"); + LSTR MSG_START_VTOOL = _UxGT("Spustit V-nástroj"); + LSTR MSG_END_VTOOL = _UxGT("Ukončit V-nástroj"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias V-nástroje"); + LSTR MSG_RESET_VTOOLS = _UxGT("Resetovat V-nástroj"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Uložit V-nástroj mix"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-nástroj resetovat"); #else - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Aktivní V-nástr."); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Spustit V-nástr."); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT("Ukončit V-nástr."); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias V-nástr."); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Reset. V-nástr."); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Uložit V-nás. mix"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-nástr. reset."); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Aktivní V-nástr."); + LSTR MSG_START_VTOOL = _UxGT("Spustit V-nástr."); + LSTR MSG_END_VTOOL = _UxGT("Ukončit V-nástr."); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias V-nástr."); + LSTR MSG_RESET_VTOOLS = _UxGT("Reset. V-nástr."); + LSTR MSG_COMMIT_VTOOL = _UxGT("Uložit V-nás. mix"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-nástr. reset."); #endif - PROGMEM Language_Str MSG_START_Z = _UxGT("Počáteční Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" Koncové Z:"); + LSTR MSG_START_Z = _UxGT("Počáteční Z:"); + LSTR MSG_END_Z = _UxGT(" Koncové Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Hry"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Bludiště"); + LSTR MSG_GAMES = _UxGT("Hry"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Bludiště"); #if LCD_HEIGHT >= 4 // Up to 3 lines allowed - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Stikněte tlačítko", "pro obnovení tisku")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkování...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Čekejte prosím", "na zahájení", "výměny filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Vložte filament", "a stiskněte", "tlačítko...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Klikněte pro", "nahřátí trysky")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Čekejte prosím", "na nahřátí tr.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Čekejte prosím", "na vysunuti", "filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Čekejte prosím", "na zavedení", "filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Vyčkejte na", "vytlačení")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Klikněte pro", "ukončení", "vytlačování")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Čekejte prosím", "na pokračování", "tisku")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Stikněte tlačítko", "pro obnovení tisku")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkování...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Čekejte prosím", "na zahájení", "výměny filamentu")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Vložte filament", "a stiskněte", "tlačítko...")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Klikněte pro", "nahřátí trysky")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Čekejte prosím", "na nahřátí tr.")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Čekejte prosím", "na vysunuti", "filamentu")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Čekejte prosím", "na zavedení", "filamentu")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Vyčkejte na", "vytlačení")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Klikněte pro", "ukončení", "vytlačování")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Čekejte prosím", "na pokračování", "tisku")); #else // LCD_HEIGHT < 4 // Up to 2 lines allowed - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Stikněte tlač.", "pro obnovení")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkování...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Čekejte...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Vložte, klikněte")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Klikněte pro", "nahřátí")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Nahřívání...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Vysouvání...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Zavádění...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Vytlačování...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Klikněte pro", "ukončení")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Pokračování...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Stikněte tlač.", "pro obnovení")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkování...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Čekejte...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Vložte, klikněte")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Klikněte pro", "nahřátí")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Nahřívání...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Vysouvání...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Zavádění...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Vytlačování...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Klikněte pro", "ukončení")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Pokračování...")); #endif // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC budiče"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Proud budičů"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hybridní práh"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Domů bez senzorů"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Režim kroků"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop povolen"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" za:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Vůle"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korekce"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Vyhlazení"); + LSTR MSG_TMC_DRIVERS = _UxGT("TMC budiče"); + LSTR MSG_TMC_CURRENT = _UxGT("Proud budičů"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hybridní práh"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Domů bez senzorů"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Režim kroků"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop povolen"); + LSTR MSG_SERVICE_RESET = _UxGT("Reset"); + LSTR MSG_SERVICE_IN = _UxGT(" za:"); + LSTR MSG_BACKLASH = _UxGT("Vůle"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Korekce"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Vyhlazení"); } diff --git a/Marlin/src/lcd/language/language_da.h b/Marlin/src/lcd/language/language_da.h index 925881284376..ef11906ed6fe 100644 --- a/Marlin/src/lcd/language/language_da.h +++ b/Marlin/src/lcd/language/language_da.h @@ -33,170 +33,171 @@ namespace Language_da { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Danish"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Danish"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" er klar"); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Kort isat"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Kort fjernet"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menu"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Slå alle steppere fra"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Auto Home"); // G28 - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Klik når du er klar"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Næste punkt"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Bed level er færdig!"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Sæt forsk. af home"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Forsk. er nu aktiv"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Sæt origin"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" er klar"); + LSTR MSG_MEDIA_INSERTED = _UxGT("Kort isat"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Kort fjernet"); + LSTR MSG_MAIN = _UxGT("Menu"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Slå alle steppere fra"); + LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); // G28 + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Klik når du er klar"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Næste punkt"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Bed level er færdig!"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Sæt forsk. af home"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Forsk. er nu aktiv"); + LSTR MSG_SET_ORIGIN = _UxGT("Sæt origin"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Forvarm ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Forvarm ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" end"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" end ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" Alle"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" Bed"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" conf"); + LSTR MSG_PREHEAT_1 = _UxGT("Forvarm ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Forvarm ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" end"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" end ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" Alle"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" Bed"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Forvarm ") PREHEAT_1_LABEL _UxGT(" conf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Forvarm $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Forvarm $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Forvarm $ end"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Forvarm $ end ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Forvarm $ Alle"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Forvarm $ Bed"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Forvarm $ conf"); + LSTR MSG_PREHEAT_M = _UxGT("Forvarm $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Forvarm $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Forvarm $ end"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Forvarm $ end ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Forvarm $ Alle"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Forvarm $ Bed"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Forvarm $ conf"); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Afkøl"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Slå strøm til"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Slå strøm fra"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extruder"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Flyt akser"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Juster bed"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Juster bed"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Flyt X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Flyt Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Flyt Z"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Flyt %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Flyt 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Flyt 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Flyt 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Hastighed"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Plade Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Dyse"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Dyse ~"); + LSTR MSG_COOLDOWN = _UxGT("Afkøl"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Slå strøm til"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Slå strøm fra"); + LSTR MSG_EXTRUDE = _UxGT("Extruder"); + LSTR MSG_MOVE_AXIS = _UxGT("Flyt akser"); + LSTR MSG_BED_LEVELING = _UxGT("Juster bed"); + LSTR MSG_LEVEL_BED = _UxGT("Juster bed"); + LSTR MSG_MOVE_X = _UxGT("Flyt X"); + LSTR MSG_MOVE_Y = _UxGT("Flyt Y"); + LSTR MSG_MOVE_Z = _UxGT("Flyt Z"); + LSTR MSG_MOVE_N_MM = _UxGT("Flyt %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Flyt 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Flyt 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Flyt 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Flyt 100mm"); + LSTR MSG_SPEED = _UxGT("Hastighed"); + LSTR MSG_BED_Z = _UxGT("Plade Z"); + LSTR MSG_NOZZLE = _UxGT("Dyse"); + LSTR MSG_NOZZLE_N = _UxGT("Dyse ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Plade"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Blæser hastighed"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Blæser hastighed ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Kontrol"); - PROGMEM Language_Str MSG_MIN = _UxGT(" \002 Min"); - PROGMEM Language_Str MSG_MAX = _UxGT(" \002 Max"); - PROGMEM Language_Str MSG_FACTOR = _UxGT(" \002 Fact"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Autotemp"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Til"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Fra"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Vælg"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Vælg *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retract"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-rejse"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatur"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Bevægelse"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E i mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD kontrast"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Gem i EEPROM"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Hent fra EEPROM"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Gendan Defaults"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Genopfrisk"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info skærm"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Forbered"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pause printet"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Forsæt printet"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Stop printet"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Print fra SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Intet SD kort"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Dvale..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Venter på bruger..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Print annulleret"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Ingen bevægelse."); - PROGMEM Language_Str MSG_KILLED = _UxGT("DRÆBT. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("STOPPET. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Tilbagetræk mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Skift Re.mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Tilbagetræk V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Skift Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto-Retract"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Skift filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Skift filament *"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Skift SD kort"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Probe udenfor plade"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Selv-Test"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Home %s%s%s først"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Opvarmning fejlet"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Fejl: reserve temp"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("Temp løber løbsk"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Fejl: Maks temp"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Fejl: Min temp"); - PROGMEM Language_Str MSG_HALTED = _UxGT("PRINTER STOPPET"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Reset Venligst"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // Kun et bogstav - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // Kun et bogstav - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // Kun et bogstav - PROGMEM Language_Str MSG_HEATING = _UxGT("Opvarmer..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Opvarmer plade..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrering"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibrer X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibrer Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibrer Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibrerings Center"); + LSTR MSG_BED = _UxGT("Plade"); + LSTR MSG_FAN_SPEED = _UxGT("Blæser hastighed"); + LSTR MSG_FAN_SPEED_N = _UxGT("Blæser hastighed ~"); + LSTR MSG_CONTROL = _UxGT("Kontrol"); + LSTR MSG_MIN = _UxGT(" \002 Min"); + LSTR MSG_MAX = _UxGT(" \002 Max"); + LSTR MSG_FACTOR = _UxGT(" \002 Fact"); + LSTR MSG_AUTOTEMP = _UxGT("Autotemp"); + LSTR MSG_LCD_ON = _UxGT("Til"); + LSTR MSG_LCD_OFF = _UxGT("Fra"); + LSTR MSG_SELECT = _UxGT("Vælg"); + LSTR MSG_SELECT_E = _UxGT("Vælg *"); + LSTR MSG_A_RETRACT = _UxGT("A-retract"); + LSTR MSG_A_TRAVEL = _UxGT("A-rejse"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatur"); + LSTR MSG_MOTION = _UxGT("Bevægelse"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E i mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); + LSTR MSG_CONTRAST = _UxGT("LCD kontrast"); + LSTR MSG_STORE_EEPROM = _UxGT("Gem i EEPROM"); + LSTR MSG_LOAD_EEPROM = _UxGT("Hent fra EEPROM"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Gendan Defaults"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Genopfrisk"); + LSTR MSG_INFO_SCREEN = _UxGT("Info skærm"); + LSTR MSG_PREPARE = _UxGT("Forbered"); + LSTR MSG_PAUSE_PRINT = _UxGT("Pause printet"); + LSTR MSG_RESUME_PRINT = _UxGT("Forsæt printet"); + LSTR MSG_STOP_PRINT = _UxGT("Stop printet"); + LSTR MSG_MEDIA_MENU = _UxGT("Print fra SD"); + LSTR MSG_NO_MEDIA = _UxGT("Intet SD kort"); + LSTR MSG_DWELL = _UxGT("Dvale..."); + LSTR MSG_USERWAIT = _UxGT("Venter på bruger..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Print annulleret"); + LSTR MSG_NO_MOVE = _UxGT("Ingen bevægelse."); + LSTR MSG_KILLED = _UxGT("DRÆBT. "); + LSTR MSG_STOPPED = _UxGT("STOPPET. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Tilbagetræk mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Skift Re.mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Tilbagetræk V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Skift Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto-Retract"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Skift filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Skift filament *"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Skift SD kort"); + LSTR MSG_ZPROBE_OUT = _UxGT("Probe udenfor plade"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Selv-Test"); + LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s først"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Opvarmning fejlet"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Fejl: reserve temp"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("Temp løber løbsk"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Fejl: Maks temp"); + LSTR MSG_ERR_MINTEMP = _UxGT("Fejl: Min temp"); + LSTR MSG_HALTED = _UxGT("PRINTER STOPPET"); + LSTR MSG_PLEASE_RESET = _UxGT("Reset Venligst"); + LSTR MSG_HEATING = _UxGT("Opvarmer..."); + LSTR MSG_BED_HEATING = _UxGT("Opvarmer plade..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrering"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibrer X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibrer Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibrer Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibrerings Center"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Om Printer"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Kort Info"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistors"); + LSTR MSG_INFO_MENU = _UxGT("Om Printer"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Kort Info"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistors"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Ant. Prints"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Færdige"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total print tid"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Længste print"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Total Extruderet"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Ant. Prints"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Færdige"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total print tid"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Længste print"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Total Extruderet"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Prints"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Færdige"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Længste"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extruderet"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Prints"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Færdige"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Længste"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruderet"); #endif - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Strømfors."); + LSTR MSG_INFO_PSU = _UxGT("Strømfors."); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Driv Styrke"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driv %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driv %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driv %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driv %"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Driv Styrke"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driv %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driv %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driv %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driv %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driv %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driv %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Driv %"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Skriv"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Skriv"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Forsæt print"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Forsæt print"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Forkert printer"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Forkert printer"); #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Vent på start", "af filament", "skift")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Vent på", "filament udskyd.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Indsæt filament", "og tryk på knap", "for at fortsætte...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Vent på", "filament indtag")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Vent på at print", "fortsætter")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Vent på start", "af filament", "skift")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Vent på", "filament udskyd.")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Indsæt filament", "og tryk på knap", "for at fortsætte...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Vent på", "filament indtag")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Vent på at print", "fortsætter")); #else // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Vent venligst...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Udskyder...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Indsæt og klik")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Indtager...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Fortsætter...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Vent venligst...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Udskyder...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Indsæt og klik")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Indtager...")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Fortsætter...")); #endif // LCD_HEIGHT < 4 } diff --git a/Marlin/src/lcd/language/language_de.h b/Marlin/src/lcd/language/language_de.h index 68791d9eaa16..4aef4ac45c6f 100644 --- a/Marlin/src/lcd/language/language_de.h +++ b/Marlin/src/lcd/language/language_de.h @@ -31,602 +31,613 @@ namespace Language_de { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Deutsch"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Deutsch"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" bereit"); - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("JA"); - PROGMEM Language_Str MSG_NO = _UxGT("NEIN"); - PROGMEM Language_Str MSG_BACK = _UxGT("Zurück"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Abbruch..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Medium erkannt"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Medium entfernt"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Warten auf Medium"); - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("SD Init fehlgesch."); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Medium Lesefehler"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB Gerät entfernt"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB Start fehlge."); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall überschritten"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstopp"); // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Software-Endstopp"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Hauptmenü"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Erw. Einstellungen"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Konfiguration"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autostart"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Motoren deaktivieren"); // M84 :: Max length 19 characters - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Debug-Menü"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Statusbalken-Test"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Auto Home"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Home X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Home Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Home Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Z-Achsen ausgleichen"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Bett ausrichten"); // Bettausrichtung - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("XYZ homen"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Klick zum Starten"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Nächste Koordinate"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Nivellieren fertig!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Ausblendhöhe"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Setze Homeversatz"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Homeversatz aktiv"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Setze Nullpunkte"); //"G92 X0 Y0 Z0" commented out in marlinui.cpp + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" bereit"); + LSTR MSG_YES = _UxGT("JA"); + LSTR MSG_NO = _UxGT("NEIN"); + LSTR MSG_BACK = _UxGT("Zurück"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Abbruch..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Medium erkannt"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Medium entfernt"); + LSTR MSG_MEDIA_WAITING = _UxGT("Warten auf Medium"); + LSTR MSG_SD_INIT_FAIL = _UxGT("SD Init fehlgesch."); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Medium Lesefehler"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB Gerät entfernt"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB Start fehlge."); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall überschritten"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstopp"); // Max length 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Software-Endstopp"); + LSTR MSG_MAIN = _UxGT("Hauptmenü"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Erw. Einstellungen"); + LSTR MSG_CONFIGURATION = _UxGT("Konfiguration"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Motoren deaktivieren"); // M84 :: Max length 19 characters + LSTR MSG_DEBUG_MENU = _UxGT("Debug-Menü"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Statusbalken-Test"); + LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); + LSTR MSG_AUTO_HOME_X = _UxGT("Home X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Home Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Home Z"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Z-Achsen ausgleichen"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("XYZ homen"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Klick zum Starten"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Nächste Koordinate"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Nivellieren fertig!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Ausblendhöhe"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Setze Homeversatz"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Homeversatz aktiv"); + LSTR MSG_SET_ORIGIN = _UxGT("Setze Nullpunkte"); //"G92 X0 Y0 Z0" commented out in marlinui.cpp #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = PREHEAT_1_LABEL _UxGT(" Vorwärmen"); - PROGMEM Language_Str MSG_PREHEAT_1_H = PREHEAT_1_LABEL _UxGT(" Vorwärmen ~"); - PROGMEM Language_Str MSG_PREHEAT_1_END = PREHEAT_1_LABEL _UxGT(" Extr. Vorwärmen"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = PREHEAT_1_LABEL _UxGT(" Extr. Vorwärm. ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = PREHEAT_1_LABEL _UxGT(" Alles Vorwärmen"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = PREHEAT_1_LABEL _UxGT(" Bett Vorwärmen"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = PREHEAT_1_LABEL _UxGT(" Einstellungen"); + LSTR MSG_PREHEAT_1 = PREHEAT_1_LABEL _UxGT(" Vorwärmen"); + LSTR MSG_PREHEAT_1_H = PREHEAT_1_LABEL _UxGT(" Vorwärmen ~"); + LSTR MSG_PREHEAT_1_END = PREHEAT_1_LABEL _UxGT(" Extr. Vorwärmen"); + LSTR MSG_PREHEAT_1_END_E = PREHEAT_1_LABEL _UxGT(" Extr. Vorwärm. ~"); + LSTR MSG_PREHEAT_1_ALL = PREHEAT_1_LABEL _UxGT(" Alles Vorwärmen"); + LSTR MSG_PREHEAT_1_BEDONLY = PREHEAT_1_LABEL _UxGT(" Bett Vorwärmen"); + LSTR MSG_PREHEAT_1_SETTINGS = PREHEAT_1_LABEL _UxGT(" Einstellungen"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("$ Vorwärmen"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("$ Vorwärmen") " ~"; - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("$ Extr. Vorwärmen"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("$ Extr. Vorwärm. ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("$ Alles Vorwärmen"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("$ Bett Vorwärmen"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("$ Einstellungen"); + LSTR MSG_PREHEAT_M = _UxGT("$ Vorwärmen"); + LSTR MSG_PREHEAT_M_H = _UxGT("$ Vorwärmen") " ~"; + LSTR MSG_PREHEAT_M_END = _UxGT("$ Extr. Vorwärmen"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("$ Extr. Vorwärm. ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("$ Alles Vorwärmen"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("$ Bett Vorwärmen"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("$ Einstellungen"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("benutzerdef. Heizen"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Abkühlen"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frequenz"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Laser"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Laserleistung"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Spindel-Steuerung"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Spindelleistung"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Spindelrichtung"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Netzteil ein"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Netzteil aus"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrudieren"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Einzug"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Achsen bewegen"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Bett-Nivellierung"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Bett nivellieren"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Ecken nivellieren"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Nächste Ecke"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Netz Editor"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Netz bearbeiten"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Netzbearb. angeh."); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Messpunkt"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z-Wert"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Benutzer-Menü"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Sondentest"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Punkt"); - PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Zu weit draußen"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Abweichung"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX-Modus"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Werkzeugversätze"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Autom. parken"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplizieren"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Spiegelkopie"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("vollstä. Kontrolle"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2. Düse X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2. Düse Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2. Düse Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("G29 ausführen"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL-Werkzeuge"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Berührungspunkt"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Netz manuell erst."); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Unterlegen & messen"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Messen"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Entfernen & messen"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Nächster Punkt..."); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("UBL aktivieren"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL deaktivieren"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Betttemperatur"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Betttemperatur"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hotend-Temp."); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend-Temp."); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Netz bearbeiten"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Eigenes Netz bearb."); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Feineinstellung..."); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Bearbeitung beendet"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Eigenes Netz erst."); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Netz erstellen"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("benutzerdef. Heizen"); + LSTR MSG_COOLDOWN = _UxGT("Abkühlen"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frequenz"); + LSTR MSG_LASER_MENU = _UxGT("Laser"); + LSTR MSG_LASER_POWER = _UxGT("Laserleistung"); + LSTR MSG_SPINDLE_MENU = _UxGT("Spindel-Steuerung"); + LSTR MSG_SPINDLE_POWER = _UxGT("Spindelleistung"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Spindelrichtung"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Netzteil ein"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Netzteil aus"); + LSTR MSG_EXTRUDE = _UxGT("Extrudieren"); + LSTR MSG_RETRACT = _UxGT("Einzug"); + LSTR MSG_MOVE_AXIS = _UxGT("Achsen bewegen"); + LSTR MSG_BED_LEVELING = _UxGT("Bett-Nivellierung"); + LSTR MSG_LEVEL_BED = _UxGT("Bett nivellieren"); + LSTR MSG_BED_TRAMMING = _UxGT("Bett ausrichten"); + LSTR MSG_NEXT_CORNER = _UxGT("Nächste Ecke"); + LSTR MSG_MESH_EDITOR = _UxGT("Netz Editor"); + LSTR MSG_EDIT_MESH = _UxGT("Netz bearbeiten"); + LSTR MSG_EDITING_STOPPED = _UxGT("Netzbearb. angeh."); + LSTR MSG_PROBING_POINT = _UxGT("Messpunkt"); + LSTR MSG_MESH_X = _UxGT("Index X"); + LSTR MSG_MESH_Y = _UxGT("Index Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Z-Wert"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Benutzer-Menü"); + LSTR MSG_M48_TEST = _UxGT("M48 Sondentest"); + LSTR MSG_M48_POINT = _UxGT("M48 Punkt"); + LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Zu weit draußen"); + LSTR MSG_M48_DEVIATION = _UxGT("Abweichung"); + LSTR MSG_IDEX_MENU = _UxGT("IDEX-Modus"); + LSTR MSG_OFFSETS_MENU = _UxGT("Werkzeugversätze"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Autom. parken"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplizieren"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Spiegelkopie"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("vollstä. Kontrolle"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2. Düse X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2. Düse Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. Düse Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("G29 ausführen"); + LSTR MSG_UBL_TOOLS = _UxGT("UBL-Werkzeuge"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Berührungspunkt"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Netz manuell erst."); + LSTR MSG_UBL_BC_INSERT = _UxGT("Unterlegen & messen"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Messen"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Entfernen & messen"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Nächster Punkt..."); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL aktivieren"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL deaktivieren"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Betttemperatur"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Betttemperatur"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hotend-Temp."); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend-Temp."); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Netz bearbeiten"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Eigenes Netz bearb."); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Feineinstellung..."); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Bearbeitung beendet"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Eigenes Netz erst."); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Netz erstellen"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("$ Netz erstellen"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("$ Netz validieren"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("$ Netz erstellen"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("$ Netz validieren"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Netz erstellen kalt"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Netzhöhe einst."); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Höhe"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Netz validieren"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Eig. Netz validieren"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 heizt Bett"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Düse aufheizen"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Manuell Prime..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Feste Länge Prime"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Priming fertig"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 abgebrochen"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("G26 verlassen"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Netzerst. forts."); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Netz-Nivellierung"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Punkt-Nivell."); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Gitternetz-Nivell."); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Netz nivellieren"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Eckpunkte"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Kartentyp"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Karte ausgeben"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Ausgabe für Host"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Ausgabe für CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Externe Sicherung"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("UBL-Info ausgeben"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Menge an Füllung"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Manuelles Füllen"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Cleveres Füllen"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Netz Füllen"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Alles annullieren"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Nächstlieg. ann."); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Feineinst. Alles"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Feineinst. Nächstl."); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Netz-Speicherplatz"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Speicherort"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Bettnetz laden"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Bettnetz speichern"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Netz %i geladen"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Netz %i gespeichert"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Kein Speicher"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Err:UBL speichern"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Err:UBL wiederherst."); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Versatz: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Versatz angehalten"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Schrittweises UBL"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Netz erstellen kalt"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Cleveres Füllen"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Netz validieren"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Feineinst. Alles"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Netz validieren"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Feineinst. Alles"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Bettnetz speichern"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Netz erstellen kalt"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Netzhöhe einst."); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Höhe"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Netz validieren"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Eig. Netz validieren"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 heizt Bett"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Düse aufheizen"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Manuell Prime..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Feste Länge Prime"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Priming fertig"); + LSTR MSG_G26_CANCELED = _UxGT("G26 abgebrochen"); + LSTR MSG_G26_LEAVING = _UxGT("G26 verlassen"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Netzerst. forts."); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Netz-Nivellierung"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Punkt-Nivell."); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Gitternetz-Nivell."); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Netz nivellieren"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Eckpunkte"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Kartentyp"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Karte ausgeben"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Ausgabe für Host"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Ausgabe für CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Externe Sicherung"); + LSTR MSG_UBL_INFO_UBL = _UxGT("UBL-Info ausgeben"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Menge an Füllung"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Manuelles Füllen"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Cleveres Füllen"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Netz Füllen"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Alles annullieren"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Nächstlieg. ann."); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Feineinst. Alles"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Feineinst. Nächstl."); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Netz-Speicherplatz"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Speicherort"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Bettnetz laden"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Bettnetz speichern"); + LSTR MSG_MESH_LOADED = _UxGT("Netz %i geladen"); + LSTR MSG_MESH_SAVED = _UxGT("Netz %i gespeichert"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Kein Speicher"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Err:UBL speichern"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Err:UBL wiederherst."); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Versatz: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Versatz angehalten"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Schrittweises UBL"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Netz erstellen kalt"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Cleveres Füllen"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Netz validieren"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Feineinst. Alles"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Netz validieren"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Feineinst. Alles"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Bettnetz speichern"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Licht-Steuerung"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Licht"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Licht-Einstellung"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Rot"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Orange"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Gelb"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Grün"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Blau"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Violett"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Weiß"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Benutzerdefiniert"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Intensität Rot"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Intensität Grün"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Intensität Blau"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Intensität Weiß"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Helligkeit"); + LSTR MSG_LED_CONTROL = _UxGT("Licht-Steuerung"); + LSTR MSG_LEDS = _UxGT("Licht"); + LSTR MSG_LED_PRESETS = _UxGT("Licht-Einstellung"); + LSTR MSG_SET_LEDS_RED = _UxGT("Rot"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Gelb"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Grün"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Blau"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violett"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Weiß"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Benutzerdefiniert"); + LSTR MSG_INTENSITY_R = _UxGT("Intensität Rot"); + LSTR MSG_INTENSITY_G = _UxGT("Intensität Grün"); + LSTR MSG_INTENSITY_B = _UxGT("Intensität Blau"); + LSTR MSG_INTENSITY_W = _UxGT("Intensität Weiß"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Helligkeit"); - PROGMEM Language_Str MSG_MOVING = _UxGT("In Bewegung..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Abstand XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Bewege X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Bewege Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Bewege Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Bewege Extruder"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Bewege Extruder *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Hotend zu kalt"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT(" %s mm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT(" 0,1 mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT(" 1,0 mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("10,0 mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Geschw."); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Bett Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Düse"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Düse ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Düse geparkt"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Düse bereit"); - PROGMEM Language_Str MSG_BED = _UxGT("Bett"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Gehäuse"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Lüfter"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Lüfter ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Gespeich. Lüfter ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Geschw. Extralüfter"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Geschw. Extralüfter ~"); - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Lüfter Kontroller"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Lüfter Leerlauf"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Motorlast Modus"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Lüfter Motorlast"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Ausschalt Delay"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Flussrate"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flussrate ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Einstellungen"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Faktor"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Auto Temperatur"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("an"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("aus"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID Tuning fertig"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune fehlge. Falscher Extruder"); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune fehlge. Temperatur zu hoch."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Autotune fehlge.! Timeout."); - PROGMEM Language_Str MSG_SELECT = _UxGT("Auswählen"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Auswählen *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Beschleunigung"); - PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V ") LCD_STR_A _UxGT(" Jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V ") LCD_STR_B _UxGT(" Jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V ") LCD_STR_C _UxGT(" Jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("V E Jerk"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Geschwindigkeit"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("V max ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("V max ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("V max ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("V max ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("V max *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("V min "); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("V min Leerfahrt"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Beschleunigung"); - PROGMEM Language_Str MSG_AMAX = _UxGT("A max "); // space intentional - PROGMEM Language_Str MSG_AMAX_A = _UxGT("A max ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("A max ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("A max ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("A max ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("A max *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A Einzug"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A Leerfahrt"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("max. Frequenz"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("min. Vorschub"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Steps/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" Steps/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" Steps/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" Steps/mm"); - PROGMEM Language_Str MSG_E_STEPS = LCD_STR_E _UxGT(" Steps/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* Steps/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatur"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Bewegung"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Filamentdurchmesser"); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Filamentdurchmesser *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Entladen mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Laden mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Vorschubfaktor"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Vorschubfaktor *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD-Kontrast"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Konfig. speichern"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Konfig. laden"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Standardwerte laden"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Werkseinstellungen"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Fehler"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Fehler"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Fehler"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Einstell. gespei."); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("FW Update vom Medium"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Drucker neustarten"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Aktualisieren"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Vorbereitung"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Justierung"); - PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("Power Monitor"); - PROGMEM Language_Str MSG_CURRENT = _UxGT("Strom"); - PROGMEM Language_Str MSG_VOLTAGE = _UxGT("Spannung"); - PROGMEM Language_Str MSG_POWER = _UxGT("Power"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Starte Druck"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Weiter"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Bestätigen"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Stop"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Drucken"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Reseten"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("Ignorieren"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Abbrechen"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Fertig"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Zurück"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Weiter"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("Pause..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("SD-Druck pausieren"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("SD-Druck fortsetzen"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("SD-Druck abbrechen"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Objekt drucken"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Objekt abbrechen"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Objekt abbrechen ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Wiederh. n. Stroma."); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Druck vom Medium"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Kein Medium"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Warten..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Klick zum Fortsetzen"); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Druck pausiert..."); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Druckt..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Druck abgebrochen"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Druck fertig"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Motoren angeschaltet"); - PROGMEM Language_Str MSG_KILLED = _UxGT("ABGEBROCHEN"); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ANGEHALTEN"); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Einzug mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Wechs. Einzug mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("V Einzug"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Z-Sprung mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Wechs. Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Autom. Einzug"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Einzugslänge"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra Einzug"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Entladelänge"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Werkzeugwechsel"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z anheben"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Prime-Geschwin."); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Einzug-Geschwin."); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Kopf parken"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Rückzugsgeschwindigkeit"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Lüfter Geschwindigkeit"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Lüfter Zeit"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto AN"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto AUS"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Werkzeugmigration"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-Migration"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Letzter Extruder"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrieren zu *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Filament wechseln"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Filament wechseln *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Filament laden"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Filament laden *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Filament entladen"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Filament entladen *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Alles entladen"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Medium initial."); // Manually initialize the SD-card via user interface - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Medium getauscht"); // SD-card changed by user. For machines with no autocarddetect. Both send "M21" - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Medium freigeben"); // if Marlin gets confused - M22 - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z-Sonde außerhalb"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Korrekturfaktor"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Selbsttest"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Zurücksetzen"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Einfahren"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Ausfahren"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("SW-Modus"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("5V-Modus"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("OD-Modus"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Setze auf 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Setze auf OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Modus: "); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("ACHTUNG: Falsche Einstellung - kann zu Beschädigung führen! Fortfahren?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("TouchMI initial."); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Test Z-Versatz"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Speichern"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI ausfahren"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Z-Sonde ausfahren"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Z-Sonde einfahren"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Vorher %s%s%s homen"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Sondenversatz"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Sondenversatz X"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Sondenversatz Y"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Sondenversatz Z"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Babystep X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Babystep Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Babystep Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Total"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Abbr. mit Endstopp"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("HEIZEN ERFOLGLOS"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("REDUND. TEMP-ABWEI."); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("BETT") " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("GEH.") " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = " " LCD_STR_THERMOMETER _UxGT(" ÜBERSCHRITTEN"); - PROGMEM Language_Str MSG_ERR_MINTEMP = " " LCD_STR_THERMOMETER _UxGT(" UNTERSCHRITTEN"); - PROGMEM Language_Str MSG_HALTED = _UxGT("DRUCKER GESTOPPT"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Bitte neustarten"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("t"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("heizt..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("kühlt..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Bett heizt..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Bett kühlt..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Gehäuse heizt..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Gehäuse kühlt..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta kalibrieren"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibriere X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibriere Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibriere Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibriere Mitte"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta Einst. anzeig."); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Autom. Kalibrierung"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta Höhe setzen"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Sondenversatz Z"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diag Rod"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Höhe"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Radius"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Über den Drucker"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Drucker-Info"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-Punkt-Nivellierung"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Lineare Nivellierung"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilineare Nivell."); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Netz-Nivellierung"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Drucker-Statistik"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Board-Info"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistoren"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extruder"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baudrate"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokoll"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Runaway Watch: AUS"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Runaway Watch: AN"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend Idle Timeout"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Beleuchtung"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Helligkeit"); + LSTR MSG_MOVING = _UxGT("In Bewegung..."); + LSTR MSG_FREE_XY = _UxGT("Abstand XY"); + LSTR MSG_MOVE_X = _UxGT("Bewege X"); + LSTR MSG_MOVE_Y = _UxGT("Bewege Y"); + LSTR MSG_MOVE_Z = _UxGT("Bewege Z"); + LSTR MSG_MOVE_E = _UxGT("Bewege Extruder"); + LSTR MSG_MOVE_EN = _UxGT("Bewege Extruder *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Hotend zu kalt"); + LSTR MSG_MOVE_N_MM = _UxGT(" %s mm"); + LSTR MSG_MOVE_01MM = _UxGT(" 0,1 mm"); + LSTR MSG_MOVE_1MM = _UxGT(" 1,0 mm"); + LSTR MSG_MOVE_10MM = _UxGT(" 10,0 mm"); + LSTR MSG_MOVE_100MM = _UxGT("100,0 mm"); + LSTR MSG_SPEED = _UxGT("Geschw."); + LSTR MSG_BED_Z = _UxGT("Bett Z"); + LSTR MSG_NOZZLE = _UxGT("Düse"); + LSTR MSG_NOZZLE_N = _UxGT("Düse ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Düse geparkt"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Düse bereit"); + LSTR MSG_BED = _UxGT("Bett"); + LSTR MSG_CHAMBER = _UxGT("Gehäuse"); + LSTR MSG_FAN_SPEED = _UxGT("Lüfter"); + LSTR MSG_FAN_SPEED_N = _UxGT("Lüfter ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Gespeich. Lüfter ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Geschw. Extralüfter"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Geschw. Extralüfter ~"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Lüfter Kontroller"); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Lüfter Leerlauf"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Motorlast Modus"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Lüfter Motorlast"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Ausschalt Delay"); + LSTR MSG_FLOW = _UxGT("Flussrate"); + LSTR MSG_FLOW_N = _UxGT("Flussrate ~"); + LSTR MSG_CONTROL = _UxGT("Einstellungen"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Faktor"); + LSTR MSG_AUTOTEMP = _UxGT("Auto Temperatur"); + LSTR MSG_LCD_ON = _UxGT("an"); + LSTR MSG_LCD_OFF = _UxGT("aus"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID Tuning fertig"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune fehlge. Falscher Extruder"); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune fehlge. Temperatur zu hoch."); + LSTR MSG_PID_TIMEOUT = _UxGT("Autotune fehlge.! Timeout."); + LSTR MSG_SELECT = _UxGT("Auswählen"); + LSTR MSG_SELECT_E = _UxGT("Auswählen *"); + LSTR MSG_ACC = _UxGT("Beschleunigung"); + LSTR MSG_JERK = _UxGT("Jerk"); + LSTR MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + LSTR MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + LSTR MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + LSTR MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + LSTR MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + LSTR MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + LSTR MSG_VE_JERK = _UxGT("Max E Jerk"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); + LSTR MSG_VELOCITY = _UxGT("Geschwindigkeit"); + LSTR MSG_VMAX_A = _UxGT("V max ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("V max ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("V max ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("V max ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("V max ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("V max ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("V max ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("V max *"); + LSTR MSG_VMIN = _UxGT("V min "); + LSTR MSG_VTRAV_MIN = _UxGT("V min Leerfahrt"); + LSTR MSG_ACCELERATION = _UxGT("Beschleunigung"); + LSTR MSG_AMAX = _UxGT("A max "); // space intentional + LSTR MSG_AMAX_A = _UxGT("A max ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("A max ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("A max ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("A max ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("A max ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("A max ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("A max ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("A max *"); + LSTR MSG_A_RETRACT = _UxGT("A Einzug"); + LSTR MSG_A_TRAVEL = _UxGT("A Leerfahrt"); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("max. Frequenz"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("min. Vorschub"); + LSTR MSG_STEPS_PER_MM = _UxGT("Steps/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" Steps/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" Steps/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" Steps/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" Steps/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" Steps/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" Steps/mm"); + LSTR MSG_E_STEPS = LCD_STR_E _UxGT(" Steps/mm"); + LSTR MSG_EN_STEPS = _UxGT("* Steps/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatur"); + LSTR MSG_MOTION = _UxGT("Bewegung"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit in mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Filamentdurchmesser"); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Filamentdurchmesser *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Entladen mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Laden mm"); + LSTR MSG_ADVANCE_K = _UxGT("Vorschubfaktor"); + LSTR MSG_ADVANCE_K_E = _UxGT("Vorschubfaktor *"); + LSTR MSG_CONTRAST = _UxGT("LCD-Kontrast"); + LSTR MSG_STORE_EEPROM = _UxGT("Konfig. speichern"); + LSTR MSG_LOAD_EEPROM = _UxGT("Konfig. laden"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Standardwerte laden"); + LSTR MSG_INIT_EEPROM = _UxGT("Werkseinstellungen"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Fehler"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Fehler"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Fehler"); + LSTR MSG_SETTINGS_STORED = _UxGT("Einstell. gespei."); + LSTR MSG_MEDIA_UPDATE = _UxGT("FW Update vom Medium"); + LSTR MSG_RESET_PRINTER = _UxGT("Drucker neustarten"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Aktualisieren"); + LSTR MSG_INFO_SCREEN = _UxGT("Info"); + LSTR MSG_PREPARE = _UxGT("Vorbereitung"); + LSTR MSG_TUNE = _UxGT("Justierung"); + LSTR MSG_POWER_MONITOR = _UxGT("Power Monitor"); + LSTR MSG_CURRENT = _UxGT("Strom"); + LSTR MSG_VOLTAGE = _UxGT("Spannung"); + LSTR MSG_POWER = _UxGT("Power"); + LSTR MSG_START_PRINT = _UxGT("Starte Druck"); + LSTR MSG_BUTTON_NEXT = _UxGT("Weiter"); + LSTR MSG_BUTTON_INIT = _UxGT("Bestätigen"); + LSTR MSG_BUTTON_STOP = _UxGT("Stop"); + LSTR MSG_BUTTON_PRINT = _UxGT("Drucken"); + LSTR MSG_BUTTON_RESET = _UxGT("Reseten"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Ignorieren"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Abbrechen"); + LSTR MSG_BUTTON_DONE = _UxGT("Fertig"); + LSTR MSG_BUTTON_BACK = _UxGT("Zurück"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Weiter"); + LSTR MSG_PAUSING = _UxGT("Pause..."); + LSTR MSG_PAUSE_PRINT = _UxGT("SD-Druck pausieren"); + LSTR MSG_RESUME_PRINT = _UxGT("SD-Druck fortsetzen"); + LSTR MSG_STOP_PRINT = _UxGT("SD-Druck abbrechen"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Objekt drucken"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Objekt abbrechen"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objekt abbrechen ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Wiederh. n. Stroma."); + LSTR MSG_MEDIA_MENU = _UxGT("Druck vom Medium"); + LSTR MSG_NO_MEDIA = _UxGT("Kein Medium"); + LSTR MSG_DWELL = _UxGT("Warten..."); + LSTR MSG_USERWAIT = _UxGT("Klick zum Fortsetzen"); + LSTR MSG_PRINT_PAUSED = _UxGT("Druck pausiert..."); + LSTR MSG_PRINTING = _UxGT("Druckt..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Druck abgebrochen"); + LSTR MSG_PRINT_DONE = _UxGT("Druck fertig"); + LSTR MSG_NO_MOVE = _UxGT("Motoren angeschaltet"); + LSTR MSG_KILLED = _UxGT("ABGEBROCHEN"); + LSTR MSG_STOPPED = _UxGT("ANGEHALTEN"); + LSTR MSG_CONTROL_RETRACT = _UxGT("Einzug mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Wechs. Einzug mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("V Einzug"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Z-Sprung mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Wechs. Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Autom. Einzug"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Einzugslänge"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra Einzug"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Entladelänge"); + LSTR MSG_TOOL_CHANGE = _UxGT("Werkzeugwechsel"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z anheben"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Prime-Geschwin."); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Einzug-Geschwin."); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Kopf parken"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Rückzugsgeschwindigkeit"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Lüfter Geschwindigkeit"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Lüfter Zeit"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto AN"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Auto AUS"); + LSTR MSG_TOOL_MIGRATION = _UxGT("Werkzeugmigration"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-Migration"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Letzter Extruder"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrieren zu *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Filament wechseln"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Filament wechseln *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Filament laden"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Filament laden *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Filament entladen"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Filament entladen *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Alles entladen"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Medium initial."); // Manually initialize the SD-card via user interface + LSTR MSG_CHANGE_MEDIA = _UxGT("Medium getauscht"); // SD-card changed by user. For machines with no autocarddetect. Both send "M21" + LSTR MSG_RELEASE_MEDIA = _UxGT("Medium freigeben"); // if Marlin gets confused - M22 + LSTR MSG_ZPROBE_OUT = _UxGT("Z-Sonde außerhalb"); + LSTR MSG_SKEW_FACTOR = _UxGT("Korrekturfaktor"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Selbsttest"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Zurücksetzen"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Einfahren"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Ausfahren"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("SW-Modus"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("5V-Modus"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("OD-Modus"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Setze auf 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Setze auf OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Modus: "); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("ACHTUNG: Falsche Einstellung - kann zu Beschädigung führen! Fortfahren?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("TouchMI initial."); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Test Z-Versatz"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Speichern"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI ausfahren"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Z-Sonde ausfahren"); + LSTR MSG_MANUAL_STOW = _UxGT("Z-Sonde einfahren"); + LSTR MSG_HOME_FIRST = _UxGT("Vorher %s%s%s homen"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Sondenversatz"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Sondenversatz X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Sondenversatz Y"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Sondenversatz Z"); + LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Abbr. mit Endstopp"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("HEIZEN ERFOLGLOS"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("REDUND. TEMP-ABWEI."); + LSTR MSG_THERMAL_RUNAWAY = " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("BETT") " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("GEH.") " " LCD_STR_THERMOMETER _UxGT(" NICHT ERREICHT"); + LSTR MSG_ERR_MAXTEMP = " " LCD_STR_THERMOMETER _UxGT(" ÜBERSCHRITTEN"); + LSTR MSG_ERR_MINTEMP = " " LCD_STR_THERMOMETER _UxGT(" UNTERSCHRITTEN"); + LSTR MSG_HALTED = _UxGT("DRUCKER GESTOPPT"); + LSTR MSG_PLEASE_RESET = _UxGT("Bitte neustarten"); + LSTR MSG_SHORT_DAY = _UxGT("t"); // One character only + LSTR MSG_SHORT_HOUR = _UxGT("h"); // One character only + LSTR MSG_SHORT_MINUTE = _UxGT("m"); // One character only + LSTR MSG_HEATING = _UxGT("heizt..."); + LSTR MSG_COOLING = _UxGT("kühlt..."); + LSTR MSG_BED_HEATING = _UxGT("Bett heizt..."); + LSTR MSG_BED_COOLING = _UxGT("Bett kühlt..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Gehäuse heizt..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Gehäuse kühlt..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta kalibrieren"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibriere X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibriere Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibriere Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibriere Mitte"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Delta Einst. anzeig."); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Autom. Kalibrierung"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta Höhe setzen"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Sondenversatz Z"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Diag Rod"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Höhe"); + LSTR MSG_DELTA_RADIUS = _UxGT("Radius"); + LSTR MSG_INFO_MENU = _UxGT("Über den Drucker"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Drucker-Info"); + LSTR MSG_3POINT_LEVELING = _UxGT("3-Punkt-Nivellierung"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Lineare Nivellierung"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Bilineare Nivell."); + LSTR MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); + LSTR MSG_MESH_LEVELING = _UxGT("Netz-Nivellierung"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Drucker-Statistik"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Board-Info"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistoren"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extruder"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baudrate"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protokoll"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Runaway Watch: AUS"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Runaway Watch: AN"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend Idle Timeout"); + LSTR MSG_CASE_LIGHT = _UxGT("Beleuchtung"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Helligkeit"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Falscher Drucker"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Falscher Drucker"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Gesamte Drucke"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Komplette Drucke"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Gesamte Druckzeit"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Längste Druckzeit"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Gesamt Extrudiert"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Gesamte Drucke"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Komplette Drucke"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Gesamte Druckzeit"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Längste Druckzeit"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Gesamt Extrudiert"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Drucke"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Komplette"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Gesamte"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Längste"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extrud."); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Drucke"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Komplette"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Gesamte"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Längste"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extrud."); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Netzteil"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Motorleistung"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Treiber %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Treiber %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Treiber %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Treiber %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC Verbindungsfehler"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Werte speichern"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("FILAMENT WECHSEL"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("DRUCK PAUSIERT"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("FILAMENT LADEN"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("FILAMENT ENTLADEN"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("FORTS. OPTIONEN:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Mehr entladen"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Druck weiter"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Düse: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Runout-Sensor"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Runout-Weg mm"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Homing gescheitert"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Probing gescheitert"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); + LSTR MSG_INFO_PSU = _UxGT("Netzteil"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Motorleistung"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Treiber %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Treiber %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Treiber %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Treiber %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Treiber %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Treiber %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Treiber %"); + LSTR MSG_ERROR_TMC = _UxGT("TMC Verbindungsfehler"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Werte speichern"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("FILAMENT WECHSEL"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("DRUCK PAUSIERT"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("FILAMENT LADEN"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("FILAMENT ENTLADEN"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("FORTS. OPTIONEN:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Mehr entladen"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Druck weiter"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Düse: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Runout-Sensor"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Runout-Weg mm"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Homing gescheitert"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Probing gescheitert"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("FILAMENT WÄHLEN"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Update MMU Firmware!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU handeln erfor."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Druck fortsetzen"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Fortfahren..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Filament laden"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Lade alle"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Düse laden"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Filament auswerfen"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Filament ~ auswerfen"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Filament entladen "); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Lade Fila. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Fila. auswerfen..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Fila. entladen..."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Alle"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("setze MMU zurück"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("MMU zurücksetzen..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Entfernen, klicken"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("FILAMENT WÄHLEN"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Update MMU Firmware!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU handeln erfor."); + LSTR MSG_MMU2_RESUME = _UxGT("Druck fortsetzen"); + LSTR MSG_MMU2_RESUMING = _UxGT("Fortfahren..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Filament laden"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Lade alle"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Düse laden"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Filament auswerfen"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Filament ~ auswerfen"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Filament entladen "); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Lade Fila. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Fila. auswerfen..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Fila. entladen..."); + LSTR MSG_MMU2_ALL = _UxGT("Alle"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); + LSTR MSG_MMU2_RESET = _UxGT("setze MMU zurück"); + LSTR MSG_MMU2_RESETTING = _UxGT("MMU zurücksetzen..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Entfernen, klicken"); - PROGMEM Language_Str MSG_MIX = _UxGT("Mix"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Komponente ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Mixer"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Gradient"); // equal Farbverlauf - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Volle Gradient"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Mix umschalten"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Zyklus Mix"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Gradient Mix"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Umgekehrte Gradient"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Aktives V-Tool"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("V-Tool Start"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT("V-Tool Ende"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("V-Tool Alias"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("V-Tools Reseten"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("V-Tool Mix sichern"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-Tools ist resetet"); - PROGMEM Language_Str MSG_START_Z = _UxGT("Z Start:"); - PROGMEM Language_Str MSG_END_Z = _UxGT("Z Ende:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Spiele"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Maze"); + LSTR MSG_MIX = _UxGT("Mix"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponente ="); + LSTR MSG_MIXER = _UxGT("Mixer"); + LSTR MSG_GRADIENT = _UxGT("Gradient"); // equal Farbverlauf + LSTR MSG_FULL_GRADIENT = _UxGT("Volle Gradient"); + LSTR MSG_TOGGLE_MIX = _UxGT("Mix umschalten"); + LSTR MSG_CYCLE_MIX = _UxGT("Zyklus Mix"); + LSTR MSG_GRADIENT_MIX = _UxGT("Gradient Mix"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Umgekehrte Gradient"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Aktives V-Tool"); + LSTR MSG_START_VTOOL = _UxGT("V-Tool Start"); + LSTR MSG_END_VTOOL = _UxGT("V-Tool Ende"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("V-Tool Alias"); + LSTR MSG_RESET_VTOOLS = _UxGT("V-Tools Reseten"); + LSTR MSG_COMMIT_VTOOL = _UxGT("V-Tool Mix sichern"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-Tools ist resetet"); + LSTR MSG_START_Z = _UxGT("Z Start:"); + LSTR MSG_END_Z = _UxGT("Z Ende:"); + LSTR MSG_GAMES = _UxGT("Spiele"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Maze"); - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("ungült. Seitenzahl"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("ungült. Seitengeschw."); + LSTR MSG_BAD_PAGE = _UxGT("ungült. Seitenzahl"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("ungült. Seitengeschw."); - PROGMEM Language_Str MSG_EDIT_PASSWORD = _UxGT("Passwort bearbeiten"); - PROGMEM Language_Str MSG_LOGIN_REQUIRED = _UxGT("Login erforderlich"); - PROGMEM Language_Str MSG_PASSWORD_SETTINGS = _UxGT("Passwort Einstellungen"); - PROGMEM Language_Str MSG_ENTER_DIGIT = _UxGT("PIN eingeben"); - PROGMEM Language_Str MSG_CHANGE_PASSWORD = _UxGT("Passwort ändern"); - PROGMEM Language_Str MSG_REMOVE_PASSWORD = _UxGT("Passwort löschen"); - PROGMEM Language_Str MSG_PASSWORD_SET = _UxGT("Passwort ist "); - PROGMEM Language_Str MSG_START_OVER = _UxGT("von vorn beginnen"); - PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Bald speichern!"); - PROGMEM Language_Str MSG_PASSWORD_REMOVED = _UxGT("Passwort gelöscht"); + LSTR MSG_EDIT_PASSWORD = _UxGT("Passwort bearbeiten"); + LSTR MSG_LOGIN_REQUIRED = _UxGT("Login erforderlich"); + LSTR MSG_PASSWORD_SETTINGS = _UxGT("Passwort Einstellungen"); + LSTR MSG_ENTER_DIGIT = _UxGT("PIN eingeben"); + LSTR MSG_CHANGE_PASSWORD = _UxGT("Passwort ändern"); + LSTR MSG_REMOVE_PASSWORD = _UxGT("Passwort löschen"); + LSTR MSG_PASSWORD_SET = _UxGT("Passwort ist "); + LSTR MSG_START_OVER = _UxGT("von vorn beginnen"); + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Bald speichern!"); + LSTR MSG_PASSWORD_REMOVED = _UxGT("Passwort gelöscht"); // // Die Filament-Change-Bildschirme können bis zu 3 Zeilen auf einem 4-Zeilen-Display anzeigen // ...oder 2 Zeilen auf einem 3-Zeilen-Display. #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Knopf drücken um", "Druck fortzusetzen")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_2_LINE("Druck ist", "pausiert...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Warte auf den", "Start des", "Filamentwechsels...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Filament einlegen", "und Knopf drücken", "um fortzusetzen")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Knopf drücken um", "Düse aufzuheizen")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Düse heizt auf", "bitte warten...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Warte auf", "Entnahme", "des Filaments...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Warte auf", "Laden des", "Filaments...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_3_LINE("Warte auf", "Spülung", "der Düse...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Klicke um", "die Düsenspülung", "zu beenden")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Warte auf", "Fortsetzen des", "Drucks...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Knopf drücken um", "Druck fortzusetzen")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_2_LINE("Druck ist", "pausiert...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Warte auf den", "Start des", "Filamentwechsels...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Filament einlegen", "und Knopf drücken", "um fortzusetzen")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Knopf drücken um", "Düse aufzuheizen")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Düse heizt auf", "bitte warten...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Warte auf", "Entnahme", "des Filaments...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Warte auf", "Laden des", "Filaments...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_3_LINE("Warte auf", "Spülung", "der Düse...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Klicke um", "die Düsenspülung", "zu beenden")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Warte auf", "Fortsetzen des", "Drucks...")); #else // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Klick zum Fortsetzen")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Pausiert...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Bitte warten...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Laden und Klick")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Klick zum Heizen")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Heizen...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Entnehmen...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Laden...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Spülen...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Klick zum beenden", "der Düsenspülung")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Fortsetzen...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Klick zum Fortsetzen")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Pausiert...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Bitte warten...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Laden und Klick")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Klick zum Heizen")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Heizen...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Entnehmen...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Laden...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Spülen...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Klick zum beenden", "der Düsenspülung")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Fortsetzen...")); #endif // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC Treiber"); // Max length 18 characters - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Treiber Strom"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hybrid threshold"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Sensorloses Homing"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Schrittmodus"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop einsch."); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" im:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Spiel"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korrektur"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Glätten"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("X Achse leveln"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Auto. Kalibiren"); + LSTR MSG_TMC_DRIVERS = _UxGT("TMC Treiber"); // Max length 18 characters + LSTR MSG_TMC_CURRENT = _UxGT("Treiber Strom"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hybrid threshold"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Sensorloses Homing"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Schrittmodus"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop einsch."); + LSTR MSG_SERVICE_RESET = _UxGT("Reset"); + LSTR MSG_SERVICE_IN = _UxGT(" im:"); + LSTR MSG_BACKLASH = _UxGT("Spiel"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Korrektur"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Glätten"); + LSTR MSG_LEVEL_X_AXIS = _UxGT("X Achse leveln"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto. Kalibiren"); #if ENABLED(TOUCH_UI_FTDI_EVE) - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Idle Timeout, Temperatur fällt. Drücke Okay, um erneut aufzuheizen und fortzufahren."); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Idle Timeout, Temperatur fällt. Drücke Okay, um erneut aufzuheizen und fortzufahren."); #else - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Heizungs Timeout"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Heizungs Timeout"); #endif - PROGMEM Language_Str MSG_REHEAT = _UxGT("Erneut aufheizen"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Erneut aufhei. ..."); + LSTR MSG_REHEAT = _UxGT("Erneut aufheizen"); + LSTR MSG_REHEATING = _UxGT("Erneut aufhei. ..."); } diff --git a/Marlin/src/lcd/language/language_el.h b/Marlin/src/lcd/language/language_el.h index ebe27fecbd9a..21f5ca6503cc 100644 --- a/Marlin/src/lcd/language/language_el.h +++ b/Marlin/src/lcd/language/language_el.h @@ -33,160 +33,185 @@ namespace Language_el { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Greek"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Greek (Greece)"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" έτοιμο."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Εισαγωγή κάρτας"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Αφαίρεση κάρτας"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Βασική Οθόνη"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Αυτόματη εκκίνηση"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Απενεργοποίηση Μοτέρ"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Αυτομ. επαναφορά στο αρχικό σημείο"); //SHORTEN - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Αρχικό σημείο X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Αρχικό σημείο Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Αρχικό σημείο Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Επαναφορά Επ. Εκτύπωσης"); //SHORTEN - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Επιπεδοποίηση επ. Εκτύπωσης περιμενει"); //SHORTEN - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Επόμενο σημείο"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Ολοκλήρωση επιπεδοποίησης!"); //SHORTEN - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Ορισμός βασικών μετατοπίσεων"); //SHORTEN - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Εφαρμόστηκαν οι μετατοπίσεις"); //SHORTEN - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Ορισμός προέλευσης"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" έτοιμος."); + LSTR MSG_YES = _UxGT("ΝΑΙ"); + LSTR MSG_NO = _UxGT("ΟΧΙ"); + LSTR MSG_BACK = _UxGT("Πίσω"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Προχωρημένες ρυθμίσεις"); + LSTR MSG_CONFIGURATION = _UxGT("Διαμόρφωση"); + + LSTR MSG_MEDIA_INSERTED = _UxGT("Κάρτα εισήχθη"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Κάρτα αφαιρέθη"); + LSTR MSG_MEDIA_WAITING = _UxGT("Αναμονή για κάρτα"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Ματαίωση..."); + LSTR MSG_MEDIA_READ_ERROR = MEDIA_TYPE_EN _UxGT(" σφάλμα ανάγνωσης"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB αφαιρέθη"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Αποτυχία εκκίνησης USB"); + LSTR MSG_SD_INIT_FAIL = _UxGT("Αποτυχία αρχικοποίησης SD"); + LSTR MSG_MAIN = _UxGT("Αρχική Οθόνη"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Αυτόματη εκκίνηση"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Απενεργοποίηση μοτέρ"); + LSTR MSG_AUTO_HOME = _UxGT("Αυτόμ. επαναφορά XYZ"); + LSTR MSG_AUTO_HOME_X = _UxGT("Επαναφορά X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Επαναφορά Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Επαναφορά Z"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Αυτόμ. επαναφορά XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Πιέστε για έναρξη"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Επόμενο σημείο"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Τέλος επιπεδοποίησης!"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Ορισμός μετατοπίσεων"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Εφαρμογή μετατοπίσεων"); + LSTR MSG_SET_ORIGIN = _UxGT("Ορισμός προέλευσης"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" End"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" End ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" όλα"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" bed"); //SHORTEN - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" επιβεβαίωση"); //SHORTEN + LSTR MSG_PREHEAT_1 = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" End"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" End ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" όλα"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" bed"); //SHORTEN + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" επιβεβαίωση"); //SHORTEN - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Προθέρμανση $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Προθέρμανση $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Προθέρμανση $ End"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Προθέρμανση $ End ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Προθέρμανση $ όλα"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Προθέρμανση $ bed"); //SHORTEN - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Προθέρμανση $ επιβεβαίωση"); //SHORTEN + LSTR MSG_PREHEAT_M = _UxGT("Προθέρμανση $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Προθέρμανση $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Προθέρμανση $ End"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Προθέρμανση $ End ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Προθέρμανση $ όλα"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Προθέρμανση $ bed"); //SHORTEN + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Προθέρμανση $ επιβεβαίωση"); //SHORTEN #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Μειωση θερμοκρασιας"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Ενεργοποίηση"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Απενεργοποίηση"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Εξώθηση"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Ανάσυρση"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Μετακίνηση άξονα"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Επιπεδοποίηση Επ. Εκτύπωσης"); //SHORTEN - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Επιπεδοποίηση Επ. Εκτύπωσης"); //SHORTEN - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Μετακίνηση X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Μετακίνηση Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Μετακίνηση Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Εξωθητήρας"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Εξωθητήρας *"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Μετακίνηση %s μμ"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Μετακίνηση 0,1 μμ"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Μετακίνηση 1 μμ"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Μετακίνηση 10 μμ"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Ταχύτητα"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Επ. Εκτύπωσης Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Ακροφύσιο"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Ακροφύσιο ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Κλίνη"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Ταχύτητα ανεμιστήρα"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Ταχύτητα ανεμιστήρα ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Ροή"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Ροή ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Έλεγχος"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Αυτομ ρύθμιση θερ/σίας"); //SHORTEN - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Ενεργοποιημένο"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Απενεργοποιημένο"); - PROGMEM Language_Str MSG_ACC = _UxGT("Επιτάχυνση"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("Vαντίδραση ") LCD_STR_A; - PROGMEM Language_Str MSG_VB_JERK = _UxGT("Vαντίδραση ") LCD_STR_B; - PROGMEM Language_Str MSG_VC_JERK = _UxGT("Vαντίδραση ") LCD_STR_C; - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Vαντίδραση E"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("V Μέγιστο") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("V Μέγιστο") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("V Μέγιστο") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("V Μέγιστο") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("V Μέγιστο *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("V Ελάχιστο"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vελάχ. μετατόπιση"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Accel"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Aμεγ ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Aμεγ ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Aμεγ ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Aμεγ ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Aμεγ *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Α-ανάσυρση"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Α-μετατόπιση"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Bήματα ανά μμ"); - PROGMEM Language_Str MSG_A_STEPS = _UxGT("Bήματα ") LCD_STR_A _UxGT(" ανά μμ"); - PROGMEM Language_Str MSG_B_STEPS = _UxGT("Bήματα ") LCD_STR_B _UxGT(" ανά μμ"); - PROGMEM Language_Str MSG_C_STEPS = _UxGT("Bήματα ") LCD_STR_C _UxGT(" ανά μμ"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("Bήματα Ε ανά μμ"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("Bήματα * ανά μμ"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Θερμοκρασία"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Κίνηση"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Νήμα"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("Ε σε μμ") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Διάμετρος νήματος"); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Διάμετρος νήματος *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Κοντράστ LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Αποθήκευση"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Φόρτωση"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Επαναφορά ασφαλούς αντιγράφου"); //SHORTEN - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Ανανέωση"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Οθόνη πληροφόρησης"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Προετοιμασία"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Συντονισμός"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Παύση εκτύπωσης"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Συνέχιση εκτύπωσης"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Διακοπή εκτύπωσης"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Εκτύπωση από SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Δεν βρέθηκε SD"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Αναστολή λειτουργίας"); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Αναμονή για χρήστη"); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Διακόπτεται η εκτύπωση"); //SHORTEN - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Καμία κίνηση."); - PROGMEM Language_Str MSG_KILLED = _UxGT("ΤΕΡΜΑΤΙΣΜΟΣ. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ΔΙΑΚΟΠΗ. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Ανάσυρση μμ"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Εναλλαγή ανάσυρσης μμ"); //SHORTEN - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Ανάσυρση V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Μεταπήδηση μμ"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Αυτόματη ανάσυρση"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Αλλαγή νήματος"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Αλλαγή νήματος *"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Προετοιμασία κάρτας SD"); //SHORTEN - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Αλλαγή κάρτας SD"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Διερεύνηση Z εκτός Επ.Εκτύπωσης"); //SHORTEN - PROGMEM Language_Str MSG_YX_UNHOMED = _UxGT("Επαναφορά Χ/Υ πριν από Ζ"); //SHORTEN - PROGMEM Language_Str MSG_XYZ_UNHOMED = _UxGT("Επαναφορά ΧΥΖ πρώτα"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Μετατόπιση Ζ"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Μικρό βήμα Χ"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Μικρό βήμα Υ"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Ζ"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Ακύρωση endstop "); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Ανεπιτυχής θέρμανση"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("ΠΛΕΟΝΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("ΔΙΑΦΥΓΗ ΘΕΡΜΟΚΡΑΣΙΑΣ"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("ΠΕΡΙΤΗ ΘΕΡΜΟΚΡΑΣΙΑ"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("ΜΗ ΕΠΑΡΚΗΣ ΘΕΡΜΟΚΡΑΣΙΑΣ"); //SHORTEN - PROGMEM Language_Str MSG_HALTED = _UxGT("H εκτύπωση διακόπηκε"); - PROGMEM Language_Str MSG_HEATING = _UxGT("Θερμαίνεται…"); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Θέρμανση ΕΠ. Εκτύπωσης"); //SHORTEN - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Βαθμονόμηση Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Βαθμονόμηση X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Βαθμονόμηση Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Βαθμονόμηση Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Βαθμονόμηση κέντρου"); + LSTR MSG_COOLDOWN = _UxGT("Αποθέρμανση"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Ενεργοποίηση"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Απενεργοποίηση"); + LSTR MSG_EXTRUDE = _UxGT("Εξώθηση"); + LSTR MSG_RETRACT = _UxGT("Ανάσυρση"); + LSTR MSG_MOVE_AXIS = _UxGT("Μετακίνηση άξονα"); + LSTR MSG_BED_LEVELING = _UxGT("Επιπεδοποίηση κλίνης"); + LSTR MSG_LEVEL_BED = _UxGT("Επιπεδοποίηση κλίνης"); + LSTR MSG_MOVE_X = _UxGT("Μετακίνηση X"); + LSTR MSG_MOVE_Y = _UxGT("Μετακίνηση Y"); + LSTR MSG_MOVE_Z = _UxGT("Μετακίνηση Z"); + LSTR MSG_MOVE_E = _UxGT("Εξωθητής"); + LSTR MSG_MOVE_EN = _UxGT("Εξωθητής *"); + LSTR MSG_MOVE_N_MM = _UxGT("Μετακίνηση %s μμ"); + LSTR MSG_MOVE_01MM = _UxGT("Μετακίνηση 0,1 μμ"); + LSTR MSG_MOVE_1MM = _UxGT("Μετακίνηση 1 μμ"); + LSTR MSG_MOVE_10MM = _UxGT("Μετακίνηση 10 μμ"); + LSTR MSG_MOVE_100MM = _UxGT("Μετακίνηση 100 μμ"); + LSTR MSG_SPEED = _UxGT("Ταχύτητα"); + LSTR MSG_BED_Z = _UxGT("Επ. Εκτύπωσης Z"); + LSTR MSG_NOZZLE = _UxGT("Ακροφύσιο"); + LSTR MSG_NOZZLE_N = _UxGT("Ακροφύσιο ~"); + LSTR MSG_BED = _UxGT("Επ. Εκτύπωσης"); + LSTR MSG_FAN_SPEED = _UxGT("Ταχύτητα ανεμιστήρα"); + LSTR MSG_FAN_SPEED_N = _UxGT("Ταχύτητα ανεμιστήρα ~"); + LSTR MSG_FLOW = _UxGT("Ροή"); + LSTR MSG_FLOW_N = _UxGT("Ροή ~"); + LSTR MSG_CONTROL = _UxGT("Έλεγχος"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); + LSTR MSG_AUTOTEMP = _UxGT("Αυτορρύθμιση θερ/σίας"); + LSTR MSG_LCD_ON = _UxGT("Ενεργοποιημένο"); + LSTR MSG_LCD_OFF = _UxGT("Απενεργοποιημένο"); + LSTR MSG_ACC = _UxGT("Επιτάχυνση"); + LSTR MSG_VA_JERK = _UxGT("Vαντίδραση ") LCD_STR_A; + LSTR MSG_VB_JERK = _UxGT("Vαντίδραση ") LCD_STR_B; + LSTR MSG_VC_JERK = _UxGT("Vαντίδραση ") LCD_STR_C; + LSTR MSG_VI_JERK = _UxGT("Vαντίδραση ") LCD_STR_I; + LSTR MSG_VJ_JERK = _UxGT("Vαντίδραση ") LCD_STR_J; + LSTR MSG_VK_JERK = _UxGT("Vαντίδραση ") LCD_STR_K; + LSTR MSG_VE_JERK = _UxGT("Vαντίδραση E"); + LSTR MSG_VMAX_A = _UxGT("V Μέγιστο") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("V Μέγιστο") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("V Μέγιστο") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("V Μέγιστο") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("V Μέγιστο") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("V Μέγιστο") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("V Μέγιστο") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("V Μέγιστο *"); + LSTR MSG_VMIN = _UxGT("V Ελάχιστο"); + LSTR MSG_VTRAV_MIN = _UxGT("Vελάχ. μετατόπιση"); + LSTR MSG_ACCELERATION = _UxGT("Accel"); + LSTR MSG_AMAX_A = _UxGT("Aμεγ ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Aμεγ ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Aμεγ ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Aμεγ ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Aμεγ ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Aμεγ ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Aμεγ ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Aμεγ *"); + LSTR MSG_A_RETRACT = _UxGT("Α-ανάσυρση"); + LSTR MSG_A_TRAVEL = _UxGT("Α-μετατόπιση"); + LSTR MSG_STEPS_PER_MM = _UxGT("Bήματα ανά μμ"); + LSTR MSG_A_STEPS = _UxGT("Bήματα ") LCD_STR_A _UxGT(" ανά μμ"); + LSTR MSG_B_STEPS = _UxGT("Bήματα ") LCD_STR_B _UxGT(" ανά μμ"); + LSTR MSG_C_STEPS = _UxGT("Bήματα ") LCD_STR_C _UxGT(" ανά μμ"); + LSTR MSG_I_STEPS = _UxGT("Bήματα ") LCD_STR_I _UxGT(" ανά μμ"); + LSTR MSG_J_STEPS = _UxGT("Bήματα ") LCD_STR_J _UxGT(" ανά μμ"); + LSTR MSG_K_STEPS = _UxGT("Bήματα ") LCD_STR_K _UxGT(" ανά μμ"); + LSTR MSG_E_STEPS = _UxGT("Bήματα Ε ανά μμ"); + LSTR MSG_EN_STEPS = _UxGT("Bήματα * ανά μμ"); + LSTR MSG_TEMPERATURE = _UxGT("Θερμοκρασία"); + LSTR MSG_MOTION = _UxGT("Κίνηση"); + LSTR MSG_FILAMENT = _UxGT("Νήμα"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("Ε σε mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Διάμετρος νήματος"); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Διάμετρος νήματος *"); + LSTR MSG_CONTRAST = _UxGT("Αντίθεση LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Αποθήκευση σε EEPROM"); + LSTR MSG_LOAD_EEPROM = _UxGT("Φόρτωση από EEPROM"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Επαναφορά προεπιλογών"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Ανανέωση"); + LSTR MSG_INFO_SCREEN = _UxGT("Οθόνη πληροφόρησης"); + LSTR MSG_PREPARE = _UxGT("Προετοιμασία"); + LSTR MSG_TUNE = _UxGT("Συντονισμός"); + LSTR MSG_PAUSE_PRINT = _UxGT("Παύση εκτύπωσης"); + LSTR MSG_RESUME_PRINT = _UxGT("Συνέχιση εκτύπωσης"); + LSTR MSG_STOP_PRINT = _UxGT("Διακοπή εκτύπωσης"); + LSTR MSG_MEDIA_MENU = _UxGT("Εκτύπωση από SD"); + LSTR MSG_NO_MEDIA = _UxGT("Δεν βρέθηκε SD"); + LSTR MSG_DWELL = _UxGT("Αναστολή λειτουργίας"); + LSTR MSG_USERWAIT = _UxGT("Αναμονή για χρήστη"); + LSTR MSG_PRINT_ABORTED = _UxGT("Εκτύπωση διεκόπη"); + LSTR MSG_NO_MOVE = _UxGT("Καμία κίνηση."); + LSTR MSG_KILLED = _UxGT("ΤΕΡΜΑΤΙΣΜΟΣ. "); + LSTR MSG_STOPPED = _UxGT("ΔΙΑΚΟΠΗ. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Ανάσυρση μμ"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Εναλλαγή ανάσυρσης mm"); //SHORTEN + LSTR MSG_CONTROL_RETRACTF = _UxGT("Ανάσυρση V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Μεταπήδηση mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_AUTORETRACT = _UxGT("Αυτόματη ανάσυρση"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Αλλαγή νήματος"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Αλλαγή νήματος *"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Προετοιμασία SD"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Αλλαγή κάρτας SD"); + LSTR MSG_ZPROBE_OUT = _UxGT("Διερεύνηση Z εκτός Επ.Εκτύπωσης"); //SHORTEN + LSTR MSG_YX_UNHOMED = _UxGT("Επαναφορά Χ/Υ πρώτα"); + LSTR MSG_XYZ_UNHOMED = _UxGT("Επαναφορά ΧΥΖ πρώτα"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Μετατόπιση Ζ"); + LSTR MSG_BABYSTEP_X = _UxGT("Μικρό βήμα Χ"); + LSTR MSG_BABYSTEP_Y = _UxGT("Μικρό βήμα Υ"); + LSTR MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Ζ"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Ακύρωση endstop"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Αποτυχία θέρμανσης"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("ΠΛΕΟΝΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("ΘΕΡΜΙΚΗ ΔΙΑΦΥΓΗ"); + LSTR MSG_ERR_MAXTEMP = _UxGT("ΠΕΡΙΤΤΗ ΘΕΡΜΟΚΡΑΣΙΑ"); + LSTR MSG_ERR_MINTEMP = _UxGT("ΑΝΕΠΑΡΚΗΣ ΘΕΡΜΟΚΡΑΣΙΑ"); + LSTR MSG_HALTED = _UxGT("Εκτυπωτής διεκόπη"); + LSTR MSG_HEATING = _UxGT("Θερμαίνεται…"); + LSTR MSG_BED_HEATING = _UxGT("Θέρμανση κλίνης"); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Βαθμονόμηση Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Βαθμονόμηση X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Βαθμονόμηση Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Βαθμονόμηση Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Βαθμονόμηση κέντρου"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Εσφαλμένος εκτυπωτής"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Εσφαλμένος εκτυπωτής"); } diff --git a/Marlin/src/lcd/language/language_el_CY.h b/Marlin/src/lcd/language/language_el_CY.h new file mode 100644 index 000000000000..68e9ee14597f --- /dev/null +++ b/Marlin/src/lcd/language/language_el_CY.h @@ -0,0 +1,38 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Greek (Cyprus) + * + * LCD Menu Messages + * See also https://marlinfw.org/docs/development/lcd_language.html + */ + +#include "language_el.h" + +namespace Language_el_CY { + using namespace Language_el; // Inherit undefined strings from Greek (or English) + + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Greek (Cyprus)"); +} diff --git a/Marlin/src/lcd/language/language_el_gr.h b/Marlin/src/lcd/language/language_el_gr.h index e6909ad5bfb7..5259962f02ed 100644 --- a/Marlin/src/lcd/language/language_el_gr.h +++ b/Marlin/src/lcd/language/language_el_gr.h @@ -33,161 +33,174 @@ namespace Language_el_gr { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Greek (Greece)"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Greek (Greece)"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" έτοιμο."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Εισαγωγή κάρτας"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Αφαίρεση κάρτας"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - PROGMEM Language_Str MSG_MAIN = _UxGT("Βασική Οθόνη"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Αυτόματη εκκίνηση"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Απενεργοποίηση βηματιστή"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Αυτομ. επαναφορά στο αρχικό σημείο"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Αρχικό σημείο X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Αρχικό σημείο Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Αρχικό σημείο Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Επαναφορά στο αρχικό σημείο ΧΥΖ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Κάντε κλικ για να ξεκινήσετε"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Επόμενο σημείο"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Ολοκλήρωση επιπεδοποίησης!"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Ορισμός βασικών μετατοπίσεων"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Εφαρμόστηκαν οι μετατοπίσεις"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Ορισμός προέλευσης"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" έτοιμο."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Εισαγωγή κάρτας"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Αφαίρεση κάρτας"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters + LSTR MSG_MAIN = _UxGT("Βασική Οθόνη"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Αυτόματη εκκίνηση"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Απενεργοποίηση βηματιστή"); + LSTR MSG_AUTO_HOME = _UxGT("Αυτομ. επαναφορά στο αρχικό σημείο"); + LSTR MSG_AUTO_HOME_X = _UxGT("Αρχικό σημείο X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Αρχικό σημείο Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Αρχικό σημείο Z"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Επαναφορά στο αρχικό σημείο ΧΥΖ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Κάντε κλικ για να ξεκινήσετε"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Επόμενο σημείο"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Ολοκλήρωση επιπεδοποίησης!"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Ορισμός βασικών μετατοπίσεων"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Εφαρμόστηκαν οι μετατοπίσεις"); + LSTR MSG_SET_ORIGIN = _UxGT("Ορισμός προέλευσης"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" End"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" End ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" όλα"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" κλίνη"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" επιβεβαίωση"); + LSTR MSG_PREHEAT_1 = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" End"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" End ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" όλα"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" κλίνη"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Προθέρμανση ") PREHEAT_1_LABEL _UxGT(" επιβεβαίωση"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Προθέρμανση $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Προθέρμανση $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Προθέρμανση $ End"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Προθέρμανση $ End ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Προθέρμανση $ όλα"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Προθέρμανση $ κλίνη"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Προθέρμανση $ επιβεβαίωση"); + LSTR MSG_PREHEAT_M = _UxGT("Προθέρμανση $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Προθέρμανση $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Προθέρμανση $ End"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Προθέρμανση $ End ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Προθέρμανση $ όλα"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Προθέρμανση $ κλίνη"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Προθέρμανση $ επιβεβαίωση"); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Μειωση θερμοκρασιας"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Ενεργοποίηση"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Απενεργοποίηση"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Εξώθηση"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Ανάσυρση"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Μετακίνηση άξονα"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Επιπεδοποίηση κλίνης"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Επιπεδοποίηση κλίνης"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Μετακίνηση X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Μετακίνηση Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Μετακίνηση Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Εξωθητήρας"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Εξωθητήρας *"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Μετακίνηση %s μμ"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Μετακίνηση 0,1 μμ"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Μετακίνηση 1 μμ"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Μετακίνηση 10 μμ"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Ταχύτητα"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Κλίνη Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Ακροφύσιο"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Ακροφύσιο ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Κλίνη"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Ταχύτητα ανεμιστήρα"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Ταχύτητα ανεμιστήρα ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Ροή"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Ροή ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Έλεγχος"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Αυτομ. ρύθμιση θερμοκρασίας"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Ενεργοποιημένο"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Απενεργοποιημένο"); - PROGMEM Language_Str MSG_ACC = _UxGT("Επιτάχυνση"); - PROGMEM Language_Str MSG_JERK = _UxGT("Vαντίδραση"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("Vαντίδραση ") LCD_STR_A; - PROGMEM Language_Str MSG_VB_JERK = _UxGT("Vαντίδραση ") LCD_STR_B; - PROGMEM Language_Str MSG_VC_JERK = _UxGT("Vαντίδραση ") LCD_STR_C; - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Vαντίδραση E"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vμεγ ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vμεγ ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vμεγ ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vμεγ ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vμεγ *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vελαχ"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vελάχ. μετατόπιση"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Accel"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Aμεγ ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Aμεγ ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Aμεγ ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Aμεγ ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Aμεγ *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Α-ανάσυρση"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Α-μετατόπιση"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Bήματα ανά μμ"); - PROGMEM Language_Str MSG_A_STEPS = _UxGT("Bήματα ") LCD_STR_A _UxGT(" ανά μμ"); - PROGMEM Language_Str MSG_B_STEPS = _UxGT("Bήματα ") LCD_STR_B _UxGT(" ανά μμ"); - PROGMEM Language_Str MSG_C_STEPS = _UxGT("Bήματα ") LCD_STR_C _UxGT(" ανά μμ"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("Bήματα Ε ανά μμ"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("Bήματα * ανά μμ"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Θερμοκρασία"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Κίνηση"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Νήμα"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("Ε σε μμ") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Διάμετρος νήματος"); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Διάμετρος νήματος *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Κοντράστ LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Αποθήκευση"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Φόρτωση"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Επαναφορά ασφαλούς αντιγράφου"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Ανανέωση"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Οθόνη πληροφόρησης"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Προετοιμασία"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Συντονισμός"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Παύση εκτύπωσης"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Συνέχιση εκτύπωσης"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Διακοπή εκτύπωσης"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Εκτύπωση από SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Δεν βρέθηκε SD"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Αναστολή λειτουργίας…"); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Αναμονή για χρήστη…"); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Διακόπτεται η εκτύπωση"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Καμία κίνηση."); - PROGMEM Language_Str MSG_KILLED = _UxGT("ΤΕΡΜΑΤΙΣΜΟΣ. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ΔΙΑΚΟΠΗ. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Ανάσυρση μμ"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Εναλλαγή ανάσυρσης μμ"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Ανάσυρση V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Μεταπήδηση μμ"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Αυτόματη ανάσυρση"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Αλλαγή νήματος"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Αλλαγή νήματος *"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Προετοιμασία κάρτας SD"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Αλλαγή κάρτας SD"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Διερεύνηση Z εκτός κλίνης"); - PROGMEM Language_Str MSG_YX_UNHOMED = _UxGT("Επαναφορά Χ/Υ πριν από Ζ"); - PROGMEM Language_Str MSG_XYZ_UNHOMED = _UxGT("Επαναφορά ΧΥΖ πρώτα"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Μετατόπιση Ζ"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Μικρό βήμα Χ"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Μικρό βήμα Υ"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Ζ"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Ματαίωση endstop "); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Ανεπιτυχής θέρμανση"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Λάθος: ΠΛΕΟΝΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("ΔΙΑΦΥΓΗ ΘΕΡΜΟΤΗΤΑΣ"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Λάθος: ΜΕΓΙΣΤΗ ΘΕΡΜΟΤΗΤΑ"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Λάθος: ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΤΗΤΑ"); - PROGMEM Language_Str MSG_HEATING = _UxGT("Θερμαίνεται…"); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Θέρμανση κλίνης…"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Βαθμονόμηση Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Βαθμονόμηση X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Βαθμονόμηση Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Βαθμονόμηση Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Βαθμονόμηση κέντρου"); + LSTR MSG_COOLDOWN = _UxGT("Μειωση θερμοκρασιας"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Ενεργοποίηση"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Απενεργοποίηση"); + LSTR MSG_EXTRUDE = _UxGT("Εξώθηση"); + LSTR MSG_RETRACT = _UxGT("Ανάσυρση"); + LSTR MSG_MOVE_AXIS = _UxGT("Μετακίνηση άξονα"); + LSTR MSG_BED_LEVELING = _UxGT("Επιπεδοποίηση κλίνης"); + LSTR MSG_LEVEL_BED = _UxGT("Επιπεδοποίηση κλίνης"); + LSTR MSG_MOVE_X = _UxGT("Μετακίνηση X"); + LSTR MSG_MOVE_Y = _UxGT("Μετακίνηση Y"); + LSTR MSG_MOVE_Z = _UxGT("Μετακίνηση Z"); + LSTR MSG_MOVE_E = _UxGT("Εξωθητήρας"); + LSTR MSG_MOVE_EN = _UxGT("Εξωθητήρας *"); + LSTR MSG_MOVE_N_MM = _UxGT("Μετακίνηση %s μμ"); + LSTR MSG_MOVE_01MM = _UxGT("Μετακίνηση 0,1 μμ"); + LSTR MSG_MOVE_1MM = _UxGT("Μετακίνηση 1 μμ"); + LSTR MSG_MOVE_10MM = _UxGT("Μετακίνηση 10 μμ"); + LSTR MSG_MOVE_100MM = _UxGT("Μετακίνηση 100 μμ"); + LSTR MSG_SPEED = _UxGT("Ταχύτητα"); + LSTR MSG_BED_Z = _UxGT("Κλίνη Z"); + LSTR MSG_NOZZLE = _UxGT("Ακροφύσιο"); + LSTR MSG_NOZZLE_N = _UxGT("Ακροφύσιο ~"); + LSTR MSG_BED = _UxGT("Κλίνη"); + LSTR MSG_FAN_SPEED = _UxGT("Ταχύτητα ανεμιστήρα"); + LSTR MSG_FAN_SPEED_N = _UxGT("Ταχύτητα ανεμιστήρα ~"); + LSTR MSG_FLOW = _UxGT("Ροή"); + LSTR MSG_FLOW_N = _UxGT("Ροή ~"); + LSTR MSG_CONTROL = _UxGT("Έλεγχος"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); + LSTR MSG_AUTOTEMP = _UxGT("Αυτομ. ρύθμιση θερμοκρασίας"); + LSTR MSG_LCD_ON = _UxGT("Ενεργοποιημένο"); + LSTR MSG_LCD_OFF = _UxGT("Απενεργοποιημένο"); + LSTR MSG_ACC = _UxGT("Επιτάχυνση"); + LSTR MSG_JERK = _UxGT("Vαντίδραση"); + LSTR MSG_VA_JERK = _UxGT("Vαντίδραση ") LCD_STR_A; + LSTR MSG_VB_JERK = _UxGT("Vαντίδραση ") LCD_STR_B; + LSTR MSG_VC_JERK = _UxGT("Vαντίδραση ") LCD_STR_C; + LSTR MSG_VI_JERK = _UxGT("Vαντίδραση ") LCD_STR_I; + LSTR MSG_VJ_JERK = _UxGT("Vαντίδραση ") LCD_STR_J; + LSTR MSG_VK_JERK = _UxGT("Vαντίδραση ") LCD_STR_K; + LSTR MSG_VE_JERK = _UxGT("Vαντίδραση E"); + LSTR MSG_VMAX_A = _UxGT("Vμεγ ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("Vμεγ ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Vμεγ ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Vμεγ ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Vμεγ ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Vμεγ ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Vμεγ ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Vμεγ *"); + LSTR MSG_VMIN = _UxGT("Vελαχ"); + LSTR MSG_VTRAV_MIN = _UxGT("Vελάχ. μετατόπιση"); + LSTR MSG_ACCELERATION = _UxGT("Accel"); + LSTR MSG_AMAX_A = _UxGT("Aμεγ ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Aμεγ ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Aμεγ ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Aμεγ ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Aμεγ ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Aμεγ ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Aμεγ ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Aμεγ *"); + LSTR MSG_A_RETRACT = _UxGT("Α-ανάσυρση"); + LSTR MSG_A_TRAVEL = _UxGT("Α-μετατόπιση"); + LSTR MSG_STEPS_PER_MM = _UxGT("Bήματα ανά μμ"); + LSTR MSG_A_STEPS = _UxGT("Bήματα ") LCD_STR_A _UxGT(" ανά μμ"); + LSTR MSG_B_STEPS = _UxGT("Bήματα ") LCD_STR_B _UxGT(" ανά μμ"); + LSTR MSG_C_STEPS = _UxGT("Bήματα ") LCD_STR_C _UxGT(" ανά μμ"); + LSTR MSG_I_STEPS = _UxGT("Bήματα ") LCD_STR_I _UxGT(" ανά μμ"); + LSTR MSG_J_STEPS = _UxGT("Bήματα ") LCD_STR_J _UxGT(" ανά μμ"); + LSTR MSG_K_STEPS = _UxGT("Bήματα ") LCD_STR_K _UxGT(" ανά μμ"); + LSTR MSG_E_STEPS = _UxGT("Bήματα Ε ανά μμ"); + LSTR MSG_EN_STEPS = _UxGT("Bήματα * ανά μμ"); + LSTR MSG_TEMPERATURE = _UxGT("Θερμοκρασία"); + LSTR MSG_MOTION = _UxGT("Κίνηση"); + LSTR MSG_FILAMENT = _UxGT("Νήμα"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("Ε σε μμ") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Διάμετρος νήματος"); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Διάμετρος νήματος *"); + LSTR MSG_CONTRAST = _UxGT("Κοντράστ LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Αποθήκευση"); + LSTR MSG_LOAD_EEPROM = _UxGT("Φόρτωση"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Επαναφορά ασφαλούς αντιγράφου"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Ανανέωση"); + LSTR MSG_INFO_SCREEN = _UxGT("Οθόνη πληροφόρησης"); + LSTR MSG_PREPARE = _UxGT("Προετοιμασία"); + LSTR MSG_TUNE = _UxGT("Συντονισμός"); + LSTR MSG_PAUSE_PRINT = _UxGT("Παύση εκτύπωσης"); + LSTR MSG_RESUME_PRINT = _UxGT("Συνέχιση εκτύπωσης"); + LSTR MSG_STOP_PRINT = _UxGT("Διακοπή εκτύπωσης"); + LSTR MSG_MEDIA_MENU = _UxGT("Εκτύπωση από SD"); + LSTR MSG_NO_MEDIA = _UxGT("Δεν βρέθηκε SD"); + LSTR MSG_DWELL = _UxGT("Αναστολή λειτουργίας…"); + LSTR MSG_USERWAIT = _UxGT("Αναμονή για χρήστη…"); + LSTR MSG_PRINT_ABORTED = _UxGT("Διακόπτεται η εκτύπωση"); + LSTR MSG_NO_MOVE = _UxGT("Καμία κίνηση."); + LSTR MSG_KILLED = _UxGT("ΤΕΡΜΑΤΙΣΜΟΣ. "); + LSTR MSG_STOPPED = _UxGT("ΔΙΑΚΟΠΗ. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Ανάσυρση μμ"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Εναλλαγή ανάσυρσης μμ"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Ανάσυρση V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Μεταπήδηση μμ"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_AUTORETRACT = _UxGT("Αυτόματη ανάσυρση"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Αλλαγή νήματος"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Αλλαγή νήματος *"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Προετοιμασία κάρτας SD"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Αλλαγή κάρτας SD"); + LSTR MSG_ZPROBE_OUT = _UxGT("Διερεύνηση Z εκτός κλίνης"); + LSTR MSG_YX_UNHOMED = _UxGT("Επαναφορά Χ/Υ πριν από Ζ"); + LSTR MSG_XYZ_UNHOMED = _UxGT("Επαναφορά ΧΥΖ πρώτα"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Μετατόπιση Ζ"); + LSTR MSG_BABYSTEP_X = _UxGT("Μικρό βήμα Χ"); + LSTR MSG_BABYSTEP_Y = _UxGT("Μικρό βήμα Υ"); + LSTR MSG_BABYSTEP_Z = _UxGT("Μικρό βήμα Ζ"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Ματαίωση endstop "); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Ανεπιτυχής θέρμανση"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Λάθος: ΠΛΕΟΝΑΖΟΥΣΑ ΘΕΡΜΟΤΗΤΑ"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("ΔΙΑΦΥΓΗ ΘΕΡΜΟΤΗΤΑΣ"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Λάθος: ΜΕΓΙΣΤΗ ΘΕΡΜΟΤΗΤΑ"); + LSTR MSG_ERR_MINTEMP = _UxGT("Λάθος: ΕΛΑΧΙΣΤΗ ΘΕΡΜΟΤΗΤΑ"); + LSTR MSG_HEATING = _UxGT("Θερμαίνεται…"); + LSTR MSG_BED_HEATING = _UxGT("Θέρμανση κλίνης…"); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Βαθμονόμηση Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Βαθμονόμηση X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Βαθμονόμηση Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Βαθμονόμηση Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Βαθμονόμηση κέντρου"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Εσφαλμένος εκτυπωτής"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Εσφαλμένος εκτυπωτής"); } diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index b17e81d831db..8c7a78cd4688 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -41,658 +41,734 @@ #endif #undef en +#define MEDIA_TYPE_EN "Media" + namespace Language_en { - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("English"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("English"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Ready."); - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("YES"); - PROGMEM Language_Str MSG_NO = _UxGT("NO"); - PROGMEM Language_Str MSG_BACK = _UxGT("Back"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Aborting..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Media Inserted"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Media Removed"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Waiting for media"); - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("SD Init Fail"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Media read error"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB device removed"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB start failed"); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Main"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Advanced Settings"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Configuration"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Run Auto Files"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Disable Steppers"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Debug Menu"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Progress Bar Test"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Auto Home"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Home X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Home Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Home Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Align"); - PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Iteration: %i"); - PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Accuracy Decreasing!"); - PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Accuracy Achieved"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Homing XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Click to Begin"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Next Point"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Leveling Done!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Fade Height"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Set Home Offsets"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets Applied"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Set Origin"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Assisted Tramming"); - PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Tramming Wizard"); - PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Select Origin"); - PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Last value "); + // These strings should be translated + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Ready."); + LSTR MSG_YES = _UxGT("YES"); + LSTR MSG_NO = _UxGT("NO"); + LSTR MSG_BACK = _UxGT("Back"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Aborting..."); + LSTR MSG_MEDIA_INSERTED = MEDIA_TYPE_EN _UxGT(" Inserted"); + LSTR MSG_MEDIA_REMOVED = MEDIA_TYPE_EN _UxGT(" Removed"); + LSTR MSG_MEDIA_WAITING = _UxGT("Waiting for card"); + LSTR MSG_SD_INIT_FAIL = _UxGT("SD Init Fail"); + LSTR MSG_MEDIA_READ_ERROR = MEDIA_TYPE_EN _UxGT(" read error"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB device removed"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB start failed"); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Subcall Overflow"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); + LSTR MSG_MAIN = _UxGT("Main"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Advanced Settings"); + LSTR MSG_CONFIGURATION = _UxGT("Configuration"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Run Auto Files"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Disable Steppers"); + LSTR MSG_DEBUG_MENU = _UxGT("Debug Menu"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Progress Bar Test"); + LSTR MSG_HOMING = _UxGT("Homing"); + LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); + LSTR MSG_AUTO_HOME_X = _UxGT("Home X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Home Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Home Z"); + LSTR MSG_AUTO_HOME_I = _UxGT("Home ") LCD_STR_I; + LSTR MSG_AUTO_HOME_J = _UxGT("Home ") LCD_STR_J; + LSTR MSG_AUTO_HOME_K = _UxGT("Home ") LCD_STR_K; + LSTR MSG_FILAMENT_SET = _UxGT("Filament Settings"); + LSTR MSG_FILAMENT_MAN = _UxGT("Filament Management"); + LSTR MSG_LEVBED_FL = _UxGT("Front Left"); + LSTR MSG_LEVBED_FR = _UxGT("Front Right"); + LSTR MSG_LEVBED_C = _UxGT("Center"); + LSTR MSG_LEVBED_BL = _UxGT("Back Left"); + LSTR MSG_LEVBED_BR = _UxGT("Back Right"); + LSTR MSG_MANUAL_MESH = _UxGT("Manual Mesh"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Align"); + LSTR MSG_ITERATION = _UxGT("G34 Iteration: %i"); + LSTR MSG_DECREASING_ACCURACY = _UxGT("Accuracy Decreasing!"); + LSTR MSG_ACCURACY_ACHIEVED = _UxGT("Accuracy Achieved"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Homing XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Click to Begin"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Next Point"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Leveling Done!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Fade Height"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Set Home Offsets"); + LSTR MSG_HOME_OFFSET_X = _UxGT("Home Offset X"); + LSTR MSG_HOME_OFFSET_Y = _UxGT("Home Offset Y"); + LSTR MSG_HOME_OFFSET_Z = _UxGT("Home Offset Z"); + LSTR MSG_HOME_OFFSET_I = _UxGT("Home Offset ") LCD_STR_I; + LSTR MSG_HOME_OFFSET_J = _UxGT("Home Offset ") LCD_STR_J; + LSTR MSG_HOME_OFFSET_K = _UxGT("Home Offset ") LCD_STR_K; + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets Applied"); + LSTR MSG_SET_ORIGIN = _UxGT("Set Origin"); + LSTR MSG_TRAMMING_WIZARD = _UxGT("Tramming Wizard"); + LSTR MSG_SELECT_ORIGIN = _UxGT("Select Origin"); + LSTR MSG_LAST_VALUE_SP = _UxGT("Last value "); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Preheat ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Preheat ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" End"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" End ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" All"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" Bed"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" Conf"); + LSTR MSG_PREHEAT_1 = _UxGT("Preheat ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Preheat ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" End"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" End ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" All"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" Bed"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Preheat ") PREHEAT_1_LABEL _UxGT(" Conf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Preheat $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Preheat $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Preheat $ End"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Preheat $ End ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Preheat $ All"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Preheat $ Bed"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Preheat $ Conf"); + LSTR MSG_PREHEAT_M = _UxGT("Preheat $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Preheat $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Preheat $ End"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Preheat $ End ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Preheat $ All"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Preheat $ Bed"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Preheat $ Conf"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Preheat Custom"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Cooldown"); - - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frequency"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Laser Control"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Spindle Control"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Laser Power"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Spindle Pwr"); - PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Toggle Laser"); - PROGMEM Language_Str MSG_LASER_PULSE_MS = _UxGT("Test Pulse ms"); - PROGMEM Language_Str MSG_LASER_FIRE_PULSE = _UxGT("Fire Pulse"); - PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Toggle Spindle"); - PROGMEM Language_Str MSG_SPINDLE_FORWARD = _UxGT("Spindle Forward"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Spindle Reverse"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Preheat Custom"); + LSTR MSG_COOLDOWN = _UxGT("Cooldown"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Switch Power On"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Switch Power Off"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrude"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Retract"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Move Axis"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Bed Leveling"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Level Bed"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Level Corners"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Raise Bed Until Probe Triggered"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("All Corners Within Tolerance. Level Bed"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Good Points: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Last Z: "); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Next Corner"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Mesh Editor"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Edit Mesh"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Mesh Editing Stopped"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Probing Point"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Value"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Custom Commands"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probe Test"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Point"); - PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Probe out of bounds"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Deviation"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX Mode"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Tool Offsets"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplication"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Mirrored Copy"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Control"); - PROGMEM Language_Str MSG_IDEX_DUPE_GAP = _UxGT("Duplicate X-Gap"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2nd Nozzle X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2nd Nozzle Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2nd Nozzle Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Doing G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL Tools"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Tilting Point"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Manually Build Mesh"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Place Shim & Measure"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Measure"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Remove & Measure Bed"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Moving to next"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Activate UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Deactivate UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Bed Temp"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hotend Temp"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Mesh Edit"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit Custom Mesh"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Fine Tuning Mesh"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Done Editing Mesh"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Build Custom Mesh"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Build Mesh"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Build Mesh ($)"); - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Build Cold Mesh"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Adjust Mesh Height"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Height Amount"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validate Mesh"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Validate Mesh ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validate Custom Mesh"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Heating Bed"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Heating Nozzle"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Manual priming..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Fixed Length Prime"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Done Priming"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Canceled"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Leaving G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Continue Bed Mesh"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Mesh Leveling"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Point Leveling"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Grid Mesh Leveling"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Level Mesh"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Side Points"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Map Type"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Output Mesh Map"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Output for Host"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Output for CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Off Printer Backup"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Output UBL Info"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Fill-in Amount"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Manual Fill-in"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Smart Fill-in"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Fill-in Mesh"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidate All"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidate Closest"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Fine Tune All"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Fine Tune Closest"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Storage"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Memory Slot"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Load Bed Mesh"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Save Bed Mesh"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Mesh %i Loaded"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Mesh %i Saved"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("No Storage"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Err: UBL Save"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Err: UBL Restore"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Stopped"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Step-By-Step UBL"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Build Cold Mesh"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. Smart Fill-in"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Validate Mesh"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Fine Tune All"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Validate Mesh"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Fine Tune All"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. Save Bed Mesh"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frequency"); + LSTR MSG_LASER_MENU = _UxGT("Laser Control"); + LSTR MSG_SPINDLE_MENU = _UxGT("Spindle Control"); + LSTR MSG_LASER_POWER = _UxGT("Laser Power"); + LSTR MSG_SPINDLE_POWER = _UxGT("Spindle Pwr"); + LSTR MSG_LASER_TOGGLE = _UxGT("Toggle Laser"); + LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Toggle Blower"); + LSTR MSG_LASER_ASSIST_TOGGLE = _UxGT("Air Assist"); + LSTR MSG_LASER_PULSE_MS = _UxGT("Test Pulse ms"); + LSTR MSG_LASER_FIRE_PULSE = _UxGT("Fire Pulse"); + LSTR MSG_FLOWMETER_FAULT = _UxGT("Coolant Flow Fault"); + LSTR MSG_SPINDLE_TOGGLE = _UxGT("Toggle Spindle"); + LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Toggle Vacuum"); + LSTR MSG_SPINDLE_FORWARD = _UxGT("Spindle Forward"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Spindle Reverse"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Switch Power On"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Switch Power Off"); + LSTR MSG_EXTRUDE = _UxGT("Extrude"); + LSTR MSG_RETRACT = _UxGT("Retract"); + LSTR MSG_MOVE_AXIS = _UxGT("Move Axis"); + LSTR MSG_BED_LEVELING = _UxGT("Bed Leveling"); + LSTR MSG_LEVEL_BED = _UxGT("Level Bed"); + LSTR MSG_BED_TRAMMING = _UxGT("Bed Tramming"); + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Adjust bed until the probe triggers."); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Corners within tolerance. Bed trammed."); + LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Good Points: "); + LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Last Z: "); + LSTR MSG_NEXT_CORNER = _UxGT("Next Corner"); + LSTR MSG_MESH_EDITOR = _UxGT("Mesh Editor"); + LSTR MSG_EDIT_MESH = _UxGT("Edit Mesh"); + LSTR MSG_MESH_VIEW = _UxGT("View Mesh"); + LSTR MSG_EDITING_STOPPED = _UxGT("Mesh Editing Stopped"); + LSTR MSG_PROBING_POINT = _UxGT("Probing Point"); + LSTR MSG_MESH_X = _UxGT("Index X"); + LSTR MSG_MESH_Y = _UxGT("Index Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Z Value"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Custom Commands"); + LSTR MSG_M48_TEST = _UxGT("M48 Probe Test"); + LSTR MSG_M48_POINT = _UxGT("M48 Point"); + LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Probe out of bounds"); + LSTR MSG_M48_DEVIATION = _UxGT("Deviation"); + LSTR MSG_IDEX_MENU = _UxGT("IDEX Mode"); + LSTR MSG_OFFSETS_MENU = _UxGT("Tool Offsets"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplication"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Mirrored Copy"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Control"); + LSTR MSG_IDEX_DUPE_GAP = _UxGT("Duplicate X-Gap"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2nd Nozzle X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2nd Nozzle Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2nd Nozzle Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Doing G29"); + LSTR MSG_UBL_TOOLS = _UxGT("UBL Tools"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Tilting Point"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Manually Build Mesh"); + LSTR MSG_UBL_MESH_WIZARD = _UxGT("UBL Mesh Wizard"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Place Shim & Measure"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Measure"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Remove & Measure Bed"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Moving to next"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activate UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Deactivate UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Bed Temp"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hotend Temp"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Mesh Edit"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit Custom Mesh"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Fine Tuning Mesh"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Done Editing Mesh"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Build Custom Mesh"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Build Mesh"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Build Mesh ($)"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Build Cold Mesh"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Adjust Mesh Height"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Height Amount"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validate Mesh"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Validate Mesh ($)"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validate Custom Mesh"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 Heating Bed"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Heating Nozzle"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Manual priming..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Fixed Length Prime"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Done Priming"); + LSTR MSG_G26_CANCELED = _UxGT("G26 Canceled"); + LSTR MSG_G26_LEAVING = _UxGT("Leaving G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Continue Bed Mesh"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Mesh Leveling"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Point Leveling"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Grid Mesh Leveling"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Level Mesh"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Side Points"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Map Type"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Output Mesh Map"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Output for Host"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Output for CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Off Printer Backup"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Output UBL Info"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Fill-in Amount"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Manual Fill-in"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Smart Fill-in"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Fill-in Mesh"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidate All"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidate Closest"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Fine Tune All"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Fine Tune Closest"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Storage"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Memory Slot"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Load Bed Mesh"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Save Bed Mesh"); + LSTR MSG_MESH_LOADED = _UxGT("Mesh %i Loaded"); + LSTR MSG_MESH_SAVED = _UxGT("Mesh %i Saved"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("No Storage"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Err: UBL Save"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Err: UBL Restore"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Stopped"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Step-By-Step UBL"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Build Cold Mesh"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2. Smart Fill-in"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Validate Mesh"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Fine Tune All"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Validate Mesh"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Fine Tune All"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Save Bed Mesh"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("LED Control"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Lights"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Light Presets"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Red"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Orange"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Yellow"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Green"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Blue"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Violet"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("White"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Default"); - PROGMEM Language_Str MSG_LED_CHANNEL_N = _UxGT("Channel ="); - PROGMEM Language_Str MSG_LEDS2 = _UxGT("Lights #2"); - PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Light #2 Presets"); - PROGMEM Language_Str MSG_NEO2_BRIGHTNESS = _UxGT("Brightness"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Custom Lights"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Red Intensity"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Green Intensity"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Blue Intensity"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("White Intensity"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Brightness"); + LSTR MSG_LED_CONTROL = _UxGT("LED Control"); + LSTR MSG_LEDS = _UxGT("Lights"); + LSTR MSG_LED_PRESETS = _UxGT("Light Presets"); + LSTR MSG_SET_LEDS_RED = _UxGT("Red"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Yellow"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Green"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Blue"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violet"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("White"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Default"); + LSTR MSG_LED_CHANNEL_N = _UxGT("Channel ="); + LSTR MSG_LEDS2 = _UxGT("Lights #2"); + LSTR MSG_NEO2_PRESETS = _UxGT("Light #2 Presets"); + LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Brightness"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Custom Lights"); + LSTR MSG_INTENSITY_R = _UxGT("Red Intensity"); + LSTR MSG_INTENSITY_G = _UxGT("Green Intensity"); + LSTR MSG_INTENSITY_B = _UxGT("Blue Intensity"); + LSTR MSG_INTENSITY_W = _UxGT("White Intensity"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Brightness"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Moving..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Free XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Move X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Move Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Move Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extruder"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extruder *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Hotend too cold"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Move %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Move 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Move 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Move 10mm"); - PROGMEM Language_Str MSG_MOVE_0001IN = _UxGT("Move 0.001in"); - PROGMEM Language_Str MSG_MOVE_001IN = _UxGT("Move 0.01in"); - PROGMEM Language_Str MSG_MOVE_01IN = _UxGT("Move 0.1in"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Speed"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Bed Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Nozzle"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Nozzle ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Nozzle Parked"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Nozzle Standby"); - PROGMEM Language_Str MSG_BED = _UxGT("Bed"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Enclosure"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Fan Speed"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Fan Speed ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Stored Fan ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra Fan Speed"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra Fan Speed ~"); - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Controller Fan"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Idle Speed"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto Mode"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Active Speed"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Idle Period"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Flow"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flow ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Control"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Autotemp"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("On"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Off"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed. Bad extruder."); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed. Temperature too high."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout."); - PROGMEM Language_Str MSG_PID_P = _UxGT("PID-P"); - PROGMEM Language_Str MSG_PID_P_E = _UxGT("PID-P *"); - PROGMEM Language_Str MSG_PID_I = _UxGT("PID-I"); - PROGMEM Language_Str MSG_PID_I_E = _UxGT("PID-I *"); - PROGMEM Language_Str MSG_PID_D = _UxGT("PID-D"); - PROGMEM Language_Str MSG_PID_D_E = _UxGT("PID-D *"); - PROGMEM Language_Str MSG_PID_C = _UxGT("PID-C"); - PROGMEM Language_Str MSG_PID_C_E = _UxGT("PID-C *"); - PROGMEM Language_Str MSG_PID_F = _UxGT("PID-F"); - PROGMEM Language_Str MSG_PID_F_E = _UxGT("PID-F *"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Select"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Select *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Accel"); - PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocity"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VTrav Min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Acceleration"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-Retract"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-Travel"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequency max"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Feed min"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Steps/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" Steps/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" Steps/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" Steps/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E steps/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* Steps/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperature"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Motion"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Unload mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Load mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Advance K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Advance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD Contrast"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Store Settings"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Load Settings"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Restore Defaults"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Initialize EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Error"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Error"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Error"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Settings Stored"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Media Update"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Reset Printer"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Refresh"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info Screen"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Prepare"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Tune"); - PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("Power monitor"); - PROGMEM Language_Str MSG_CURRENT = _UxGT("Current"); - PROGMEM Language_Str MSG_VOLTAGE = _UxGT("Voltage"); - PROGMEM Language_Str MSG_POWER = _UxGT("Power"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Start Print"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Next"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Init"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Stop"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Print"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("Ignore"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Cancel"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Done"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Back"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Proceed"); - PROGMEM Language_Str MSG_BUTTON_SKIP = _UxGT("Skip"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("Pausing..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pause Print"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Resume Print"); - PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Host Start"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Stop Print"); - PROGMEM Language_Str MSG_END_LOOPS = _UxGT("End Repeat Loops"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Printing Object"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Power Outage"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Print from Media"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("No Media"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Sleep..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Click to Resume..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Print Paused"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Printing..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Print Aborted"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Print Done"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("No Move."); - PROGMEM Language_Str MSG_KILLED = _UxGT("KILLED. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("STOPPED. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retract mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Re.mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retract V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto-Retract"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Swap Length"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Swap Extra"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Purge Length"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Tool Change"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Raise"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Prime Speed"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Retract Speed"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Park Head"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Recover Speed"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Fan Speed"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Fan Time"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto ON"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto OFF"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Tool Migration"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-migration"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Last Extruder"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrate to *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Change Filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Change Filament *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Load Filament"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Load *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Unload Filament"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Unload *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Unload All"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Attach Media"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Change Media"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Release Media"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Skew Factor"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Self-Test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Stow"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Deploy"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("SW-Mode"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("5V-Mode"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("OD-Mode"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Set BLTouch to 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Set BLTouch to OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Report Drain"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("DANGER: Bad settings can cause damage! Proceed anyway?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Init TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Z Offset Test"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Save"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Deploy TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Deploy Z-Probe"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Stow Z-Probe"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Home %s%s%s First"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Probe Offsets"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Probe Y Offset"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Probe Z Offset"); - PROGMEM Language_Str MSG_MOVE_NOZZLE_TO_BED = _UxGT("Move Nozzle to Bed"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Babystep X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Babystep Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Babystep Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Total"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Endstop Abort"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Heating Failed"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: REDUNDANT TEMP"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("BED THERMAL RUNAWAY"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("CHAMBER T. RUNAWAY"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err: MAXTEMP"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err: MINTEMP"); - PROGMEM Language_Str MSG_HALTED = _UxGT("PRINTER HALTED"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Please Reset"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Heating..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Cooling..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Bed Heating..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Bed Cooling..."); - PROGMEM Language_Str MSG_PROBE_HEATING = _UxGT("Probe Heating..."); - PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Probe Cooling..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Chamber Heating..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Chamber Cooling..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Calibration"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibrate X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrate Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrate Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrate Center"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta Settings"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibration"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Set Delta Height"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Probe Z-offset"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diag Rod"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Height"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Radius"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("About Printer"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Printer Info"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-Point Leveling"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Linear Leveling"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilinear Leveling"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Mesh Leveling"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Printer Stats"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Board Info"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistors"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extruders"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baud"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protocol"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Runaway Watch: OFF"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Runaway Watch: ON"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend Idle Timeout"); + LSTR MSG_MOVING = _UxGT("Moving..."); + LSTR MSG_FREE_XY = _UxGT("Free XY"); + LSTR MSG_MOVE_X = _UxGT("Move X"); + LSTR MSG_MOVE_Y = _UxGT("Move Y"); + LSTR MSG_MOVE_Z = _UxGT("Move Z"); + LSTR MSG_MOVE_I = _UxGT("Move ") LCD_STR_I; + LSTR MSG_MOVE_J = _UxGT("Move ") LCD_STR_J; + LSTR MSG_MOVE_K = _UxGT("Move ") LCD_STR_K; + LSTR MSG_MOVE_E = _UxGT("Move Extruder"); + LSTR MSG_MOVE_EN = _UxGT("Move E*"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Hotend too cold"); + LSTR MSG_MOVE_N_MM = _UxGT("Move %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Move 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Move 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Move 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Move 100mm"); + LSTR MSG_MOVE_0001IN = _UxGT("Move 0.001in"); + LSTR MSG_MOVE_001IN = _UxGT("Move 0.01in"); + LSTR MSG_MOVE_01IN = _UxGT("Move 0.1in"); + LSTR MSG_MOVE_1IN = _UxGT("Move 1.0in"); + LSTR MSG_SPEED = _UxGT("Speed"); + LSTR MSG_MAXSPEED = _UxGT("Max Speed (mm/s)"); + LSTR MSG_MAXSPEED_X = _UxGT("Max ") LCD_STR_A _UxGT(" Speed"); + LSTR MSG_MAXSPEED_Y = _UxGT("Max ") LCD_STR_B _UxGT(" Speed"); + LSTR MSG_MAXSPEED_Z = _UxGT("Max ") LCD_STR_C _UxGT(" Speed"); + LSTR MSG_MAXSPEED_E = _UxGT("Max ") LCD_STR_E _UxGT(" Speed"); + LSTR MSG_BED_Z = _UxGT("Bed Z"); + LSTR MSG_NOZZLE = _UxGT("Nozzle"); + LSTR MSG_NOZZLE_N = _UxGT("Nozzle ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Nozzle Parked"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Nozzle Standby"); + LSTR MSG_BED = _UxGT("Bed"); + LSTR MSG_CHAMBER = _UxGT("Enclosure"); + LSTR MSG_COOLER = _UxGT("Laser Coolant"); + LSTR MSG_COOLER_TOGGLE = _UxGT("Toggle Cooler"); + LSTR MSG_FLOWMETER_SAFETY = _UxGT("Flow Safety"); + LSTR MSG_LASER = _UxGT("Laser"); + LSTR MSG_FAN_SPEED = _UxGT("Fan Speed"); + LSTR MSG_FAN_SPEED_N = _UxGT("Fan Speed ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Stored Fan ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Extra Fan Speed"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra Fan Speed ~"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Controller Fan"); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Idle Speed"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto Mode"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Active Speed"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Idle Period"); + LSTR MSG_FLOW = _UxGT("Flow"); + LSTR MSG_FLOW_N = _UxGT("Flow ~"); + LSTR MSG_CONTROL = _UxGT("Control"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); + LSTR MSG_AUTOTEMP = _UxGT("Autotemp"); + LSTR MSG_LCD_ON = _UxGT("On"); + LSTR MSG_LCD_OFF = _UxGT("Off"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); + LSTR MSG_PID_CYCLE = _UxGT("PID Cycles"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed. Bad extruder."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed. Temperature too high."); + LSTR MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout."); + LSTR MSG_SELECT = _UxGT("Select"); + LSTR MSG_SELECT_E = _UxGT("Select *"); + LSTR MSG_ACC = _UxGT("Accel"); + LSTR MSG_JERK = _UxGT("Jerk"); + LSTR MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + LSTR MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + LSTR MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + LSTR MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + LSTR MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + LSTR MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + LSTR MSG_VE_JERK = _UxGT("Max E Jerk"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); + LSTR MSG_VELOCITY = _UxGT("Velocity"); + LSTR MSG_VMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Vel"); + LSTR MSG_VMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Vel"); + LSTR MSG_VMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Vel"); + LSTR MSG_VMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Vel"); + LSTR MSG_VMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Vel"); + LSTR MSG_VMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Vel"); + LSTR MSG_VMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Vel"); + LSTR MSG_VMAX_EN = _UxGT("Max * Vel"); + LSTR MSG_VMIN = _UxGT("Min Velocity"); + LSTR MSG_VTRAV_MIN = _UxGT("Min Travel Vel"); + LSTR MSG_ACCELERATION = _UxGT("Acceleration"); + LSTR MSG_AMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Accel"); + LSTR MSG_AMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Accel"); + LSTR MSG_AMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Accel"); + LSTR MSG_AMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Accel"); + LSTR MSG_AMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Accel"); + LSTR MSG_AMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Accel"); + LSTR MSG_AMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Accel"); + LSTR MSG_AMAX_EN = _UxGT("Max * Accel"); + LSTR MSG_A_RETRACT = _UxGT("Retract Accel"); + LSTR MSG_A_TRAVEL = _UxGT("Travel Accel"); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("XY Freq Limit"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min FR Factor"); + LSTR MSG_STEPS_PER_MM = _UxGT("Steps/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" Steps/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" Steps/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" Steps/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" Steps/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" Steps/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" Steps/mm"); + LSTR MSG_E_STEPS = _UxGT("E steps/mm"); + LSTR MSG_EN_STEPS = _UxGT("* Steps/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperature"); + LSTR MSG_MOTION = _UxGT("Motion"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit in mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Unload mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Load mm"); + LSTR MSG_ADVANCE_K = _UxGT("Advance K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Advance K *"); + LSTR MSG_CONTRAST = _UxGT("LCD Contrast"); + LSTR MSG_BRIGHTNESS = _UxGT("LCD Brightness"); + LSTR MSG_STORE_EEPROM = _UxGT("Store Settings"); + LSTR MSG_LOAD_EEPROM = _UxGT("Load Settings"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restore Defaults"); + LSTR MSG_INIT_EEPROM = _UxGT("Initialize EEPROM"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Error"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Error"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Error"); + LSTR MSG_SETTINGS_STORED = _UxGT("Settings Stored"); + LSTR MSG_MEDIA_UPDATE = MEDIA_TYPE_EN _UxGT(" Update"); + LSTR MSG_RESET_PRINTER = _UxGT("Reset Printer"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Refresh"); + LSTR MSG_INFO_SCREEN = _UxGT("Info Screen"); + LSTR MSG_PREPARE = _UxGT("Prepare"); + LSTR MSG_TUNE = _UxGT("Tune"); + LSTR MSG_POWER_MONITOR = _UxGT("Power monitor"); + LSTR MSG_CURRENT = _UxGT("Current"); + LSTR MSG_VOLTAGE = _UxGT("Voltage"); + LSTR MSG_POWER = _UxGT("Power"); + LSTR MSG_START_PRINT = _UxGT("Start Print"); + LSTR MSG_BUTTON_NEXT = _UxGT("Next"); + LSTR MSG_BUTTON_INIT = _UxGT("Init"); + LSTR MSG_BUTTON_STOP = _UxGT("Stop"); + LSTR MSG_BUTTON_PRINT = _UxGT("Print"); + LSTR MSG_BUTTON_RESET = _UxGT("Reset"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Ignore"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Cancel"); + LSTR MSG_BUTTON_DONE = _UxGT("Done"); + LSTR MSG_BUTTON_BACK = _UxGT("Back"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Proceed"); + LSTR MSG_BUTTON_SKIP = _UxGT("Skip"); + LSTR MSG_PAUSING = _UxGT("Pausing..."); + LSTR MSG_PAUSE_PRINT = _UxGT("Pause Print"); + LSTR MSG_RESUME_PRINT = _UxGT("Resume Print"); + LSTR MSG_HOST_START_PRINT = _UxGT("Start Host Print"); + LSTR MSG_STOP_PRINT = _UxGT("Stop Print"); + LSTR MSG_END_LOOPS = _UxGT("End Repeat Loops"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Printing Object"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Power Outage"); + LSTR MSG_MEDIA_MENU = _UxGT("Print from ") MEDIA_TYPE_EN; + LSTR MSG_NO_MEDIA = _UxGT("No ") MEDIA_TYPE_EN; + LSTR MSG_DWELL = _UxGT("Sleep..."); + LSTR MSG_USERWAIT = _UxGT("Click to Resume..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Print Paused"); + LSTR MSG_PRINTING = _UxGT("Printing..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Print Aborted"); + LSTR MSG_PRINT_DONE = _UxGT("Print Done"); + LSTR MSG_NO_MOVE = _UxGT("No Move."); + LSTR MSG_KILLED = _UxGT("KILLED. "); + LSTR MSG_STOPPED = _UxGT("STOPPED. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retract mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Re.mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retract V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto-Retract"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Swap Length"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Swap Extra"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Purge Length"); + LSTR MSG_TOOL_CHANGE = _UxGT("Tool Change"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Raise"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Prime Speed"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Retract Speed"); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Park Head"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Recover Speed"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Fan Speed"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Fan Time"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto ON"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Auto OFF"); + LSTR MSG_TOOL_MIGRATION = _UxGT("Tool Migration"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-migration"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Last Extruder"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrate to *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Change Filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Change Filament *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Load Filament"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Load *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Unload Filament"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Unload *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Unload All"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Attach ") MEDIA_TYPE_EN; + LSTR MSG_CHANGE_MEDIA = _UxGT("Change ") MEDIA_TYPE_EN; + LSTR MSG_RELEASE_MEDIA = _UxGT("Release ") MEDIA_TYPE_EN; + LSTR MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed"); + LSTR MSG_SKEW_FACTOR = _UxGT("Skew Factor"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Self-Test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reset"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Stow"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Deploy"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("SW-Mode"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("5V-Mode"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("OD-Mode"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Set BLTouch to 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Set BLTouch to OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Report Drain"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("DANGER: Bad settings can cause damage! Proceed anyway?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Init TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Z Offset Test"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Save"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Deploy TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Deploy Z-Probe"); + LSTR MSG_MANUAL_STOW = _UxGT("Stow Z-Probe"); + LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s First"); + LSTR MSG_ZPROBE_SETTINGS = _UxGT("Probe Settings"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Probe Offsets"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Probe Y Offset"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Probe Z Offset"); + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Move Nozzle to Bed"); + LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); + LSTR MSG_BABYSTEP_I = _UxGT("Babystep ") LCD_STR_I; + LSTR MSG_BABYSTEP_J = _UxGT("Babystep ") LCD_STR_J; + LSTR MSG_BABYSTEP_K = _UxGT("Babystep ") LCD_STR_K; + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop Abort"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Heating Failed"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: REDUNDANT TEMP"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("BED THERMAL RUNAWAY"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("CHAMBER T. RUNAWAY"); + LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("Cooler Runaway"); + LSTR MSG_COOLING_FAILED = _UxGT("Cooling Failed"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Err: MAXTEMP"); + LSTR MSG_ERR_MINTEMP = _UxGT("Err: MINTEMP"); + LSTR MSG_HALTED = _UxGT("PRINTER HALTED"); + LSTR MSG_PLEASE_RESET = _UxGT("Please Reset"); + LSTR MSG_HEATING = _UxGT("Heating..."); + LSTR MSG_COOLING = _UxGT("Cooling..."); + LSTR MSG_BED_HEATING = _UxGT("Bed Heating..."); + LSTR MSG_BED_COOLING = _UxGT("Bed Cooling..."); + LSTR MSG_PROBE_HEATING = _UxGT("Probe Heating..."); + LSTR MSG_PROBE_COOLING = _UxGT("Probe Cooling..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Chamber Heating..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Chamber Cooling..."); + LSTR MSG_LASER_COOLING = _UxGT("Laser Cooling..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Calibration"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrate X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrate Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrate Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrate Center"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Delta Settings"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibration"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Set Delta Height"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Probe Z-offset"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Diag Rod"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Height"); + LSTR MSG_DELTA_RADIUS = _UxGT("Radius"); + LSTR MSG_INFO_MENU = _UxGT("About Printer"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Printer Info"); + LSTR MSG_3POINT_LEVELING = _UxGT("3-Point Leveling"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Linear Leveling"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Bilinear Leveling"); + LSTR MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); + LSTR MSG_MESH_LEVELING = _UxGT("Mesh Leveling"); + LSTR MSG_MESH_DONE = _UxGT("Mesh probing done"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Printer Stats"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Board Info"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistors"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extruders"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baud"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protocol"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Runaway Watch: OFF"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Runaway Watch: ON"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend Idle Timeout"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Case Light"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER"); + LSTR MSG_CASE_LIGHT = _UxGT("Case Light"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Print Count"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completed"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total Print Time"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Longest Job Time"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded Total"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Print Count"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completed"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total Print Time"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest Job Time"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded Total"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Prints"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completed"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Longest"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Prints"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completed"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Drive Strength"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CONNECTION ERROR"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Write"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("FILAMENT CHANGE"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("PRINT PAUSED"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("LOAD FILAMENT"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("UNLOAD FILAMENT"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("RESUME OPTIONS:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purge more"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Continue"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozzle: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Runout Sensor"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Runout Dist mm"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Homing Failed"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Probing Failed"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); + LSTR MSG_INFO_PSU = _UxGT("PSU"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Drive Strength"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Driver %"); + LSTR MSG_ERROR_TMC = _UxGT("TMC CONNECTION ERROR"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Write"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("FILAMENT CHANGE"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("PRINT PAUSED"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("LOAD FILAMENT"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("UNLOAD FILAMENT"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("RESUME OPTIONS:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purge more"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Continue"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozzle: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Runout Sensor"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Runout Dist mm"); + LSTR MSG_RUNOUT_ENABLE = _UxGT("Enable Runout"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Homing Failed"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Probing Failed"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("CHOOSE FILAMENT"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Update MMU Firmware!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Needs Attention."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("MMU Resume"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("MMU Resuming..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU Load"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("MMU Load All"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Load to Nozzle"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU Eject"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU Eject ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU Unload"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Loading Fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Ejecting Fil. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Unloading Fil...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("All"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Reset MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("MMU Resetting..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Remove, click"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("CHOOSE FILAMENT"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Update MMU Firmware!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Needs Attention."); + LSTR MSG_MMU2_RESUME = _UxGT("MMU Resume"); + LSTR MSG_MMU2_RESUMING = _UxGT("MMU Resuming..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU Load"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("MMU Load All"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Load to Nozzle"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU Eject"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU Eject ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU Unload"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Loading Fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Ejecting Fil. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Unloading Fil...."); + LSTR MSG_MMU2_ALL = _UxGT("All"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); + LSTR MSG_MMU2_RESET = _UxGT("Reset MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("MMU Resetting..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Remove, click"); - PROGMEM Language_Str MSG_MIX = _UxGT("Mix"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Component ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Mixer"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Gradient"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Full Gradient"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Toggle Mix"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Cycle Mix"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Gradient Mix"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Reverse Gradient"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Active V-tool"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Start V-tool"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" End V-tool"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Reset V-tools"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Commit V-tool Mix"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-tools Were Reset"); - PROGMEM Language_Str MSG_START_Z = _UxGT("Start Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" End Z:"); + LSTR MSG_MIX = _UxGT("Mix"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Component ="); + LSTR MSG_MIXER = _UxGT("Mixer"); + LSTR MSG_GRADIENT = _UxGT("Gradient"); + LSTR MSG_FULL_GRADIENT = _UxGT("Full Gradient"); + LSTR MSG_TOGGLE_MIX = _UxGT("Toggle Mix"); + LSTR MSG_CYCLE_MIX = _UxGT("Cycle Mix"); + LSTR MSG_GRADIENT_MIX = _UxGT("Gradient Mix"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Reverse Gradient"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Active V-tool"); + LSTR MSG_START_VTOOL = _UxGT("Start V-tool"); + LSTR MSG_END_VTOOL = _UxGT(" End V-tool"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); + LSTR MSG_RESET_VTOOLS = _UxGT("Reset V-tools"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Commit V-tool Mix"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-tools Were Reset"); + LSTR MSG_START_Z = _UxGT("Start Z:"); + LSTR MSG_END_Z = _UxGT(" End Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Games"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Maze"); + LSTR MSG_GAMES = _UxGT("Games"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Maze"); - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("Bad page index"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Bad page speed"); + LSTR MSG_BAD_PAGE = _UxGT("Bad page index"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Bad page speed"); - PROGMEM Language_Str MSG_EDIT_PASSWORD = _UxGT("Edit Password"); - PROGMEM Language_Str MSG_LOGIN_REQUIRED = _UxGT("Login Required"); - PROGMEM Language_Str MSG_PASSWORD_SETTINGS = _UxGT("Password Settings"); - PROGMEM Language_Str MSG_ENTER_DIGIT = _UxGT("Enter Digit"); - PROGMEM Language_Str MSG_CHANGE_PASSWORD = _UxGT("Set/Edit Password"); - PROGMEM Language_Str MSG_REMOVE_PASSWORD = _UxGT("Remove Password"); - PROGMEM Language_Str MSG_PASSWORD_SET = _UxGT("Password is "); - PROGMEM Language_Str MSG_START_OVER = _UxGT("Start Over"); - PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Remember to Save!"); - PROGMEM Language_Str MSG_PASSWORD_REMOVED = _UxGT("Password Removed"); + LSTR MSG_EDIT_PASSWORD = _UxGT("Edit Password"); + LSTR MSG_LOGIN_REQUIRED = _UxGT("Login Required"); + LSTR MSG_PASSWORD_SETTINGS = _UxGT("Password Settings"); + LSTR MSG_ENTER_DIGIT = _UxGT("Enter Digit"); + LSTR MSG_CHANGE_PASSWORD = _UxGT("Set/Edit Password"); + LSTR MSG_REMOVE_PASSWORD = _UxGT("Remove Password"); + LSTR MSG_PASSWORD_SET = _UxGT("Password is "); + LSTR MSG_START_OVER = _UxGT("Start Over"); + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Remember to Save!"); + LSTR MSG_PASSWORD_REMOVED = _UxGT("Password Removed"); // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Press Button", "to resume print")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parking...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Wait for", "filament change", "to start")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Insert filament", "and press button", "to continue")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Press button", "to heat nozzle")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nozzle heating", "Please wait...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Wait for", "filament unload")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Wait for", "filament load")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Wait for", "filament purge")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Click to finish", "filament purge")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Wait for print", "to resume...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Press Button", "to resume print")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parking...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Wait for", "filament change", "to start")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Insert filament", "and press button", "to continue")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Press button", "to heat nozzle")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nozzle heating", "Please wait...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Wait for", "filament unload")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Wait for", "filament load")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Wait for", "filament purge")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Click to finish", "filament purge")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Wait for print", "to resume...")); #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Click to continue")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parking...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Please wait...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insert and Click")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Click to heat")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Heating...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Ejecting...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Loading...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purging...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Click to finish")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Resuming...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Click to continue")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parking...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Please wait...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insert and Click")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Click to heat")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Heating...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Ejecting...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Loading...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purging...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Click to finish")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Resuming...")); #endif - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC Drivers"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Driver Current"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hybrid Threshold"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Sensorless Homing"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Stepping Mode"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Enabled"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" in:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Backlash"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Correction"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Smoothing"); + LSTR MSG_TMC_DRIVERS = _UxGT("TMC Drivers"); + LSTR MSG_TMC_CURRENT = _UxGT("Driver Current"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hybrid Threshold"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Sensorless Homing"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Stepping Mode"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Enabled"); + LSTR MSG_SERVICE_RESET = _UxGT("Reset"); + LSTR MSG_SERVICE_IN = _UxGT(" in:"); + LSTR MSG_BACKLASH = _UxGT("Backlash"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Correction"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Smoothing"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Level X Axis"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Auto Calibrate"); + LSTR MSG_LEVEL_X_AXIS = _UxGT("Level X Axis"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto Calibrate"); #if ENABLED(TOUCH_UI_FTDI_EVE) - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Idle timeout, temperature decreased. Press Okay to reheat and again to resume."); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Idle timeout, temperature decreased. Press Okay to reheat and again to resume."); #else - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Heater Timeout"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Heater Timeout"); #endif - PROGMEM Language_Str MSG_REHEAT = _UxGT("Reheat"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Reheating..."); + LSTR MSG_REHEAT = _UxGT("Reheat"); + LSTR MSG_REHEATING = _UxGT("Reheating..."); + LSTR MSG_REHEATDONE = _UxGT("Reheat Done"); + + LSTR MSG_PROBE_WIZARD = _UxGT("Z Probe Wizard"); + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Probing Z Reference"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Moving to Probing Pos"); + + LSTR MSG_SOUND = _UxGT("Sound"); + + LSTR MSG_TOP_LEFT = _UxGT("Top Left"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Bottom Left"); + LSTR MSG_TOP_RIGHT = _UxGT("Top Right"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Bottom Right"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Calibration Completed"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Calibration Failed"); - PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Z Probe Wizard"); - PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Probing Z Reference"); - PROGMEM Language_Str MSG_PROBE_WIZARD_MOVING = _UxGT("Moving to Probing Pos"); + LSTR MSG_DRIVER_BACKWARD = _UxGT(" driver backward"); - PROGMEM Language_Str MSG_SOUND = _UxGT("Sound"); + LSTR MSG_SD_CARD = _UxGT("SD Card"); + LSTR MSG_USB_DISK = _UxGT("USB Disk"); - PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Top Left"); - PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Bottom Left"); - PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Top Right"); - PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Bottom Right"); - PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Calibration Completed"); - PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Calibration Failed"); + // These strings can be the same in all languages + LSTR MSG_MARLIN = _UxGT("Marlin"); + LSTR MSG_SHORT_DAY = _UxGT("d"); // One character only + LSTR MSG_SHORT_HOUR = _UxGT("h"); // One character only + LSTR MSG_SHORT_MINUTE = _UxGT("m"); // One character only + LSTR MSG_PID_P = _UxGT("PID-P"); + LSTR MSG_PID_P_E = _UxGT("PID-P *"); + LSTR MSG_PID_I = _UxGT("PID-I"); + LSTR MSG_PID_I_E = _UxGT("PID-I *"); + LSTR MSG_PID_D = _UxGT("PID-D"); + LSTR MSG_PID_D_E = _UxGT("PID-D *"); + LSTR MSG_PID_C = _UxGT("PID-C"); + LSTR MSG_PID_C_E = _UxGT("PID-C *"); + LSTR MSG_PID_F = _UxGT("PID-F"); + LSTR MSG_PID_F_E = _UxGT("PID-F *"); + LSTR MSG_BACKLASH_A = LCD_STR_A; + LSTR MSG_BACKLASH_B = LCD_STR_B; + LSTR MSG_BACKLASH_C = LCD_STR_C; + LSTR MSG_BACKLASH_I = LCD_STR_I; + LSTR MSG_BACKLASH_J = LCD_STR_J; + LSTR MSG_BACKLASH_K = LCD_STR_K; } #if FAN_COUNT == 1 diff --git a/Marlin/src/lcd/language/language_es.h b/Marlin/src/lcd/language/language_es.h index 58559a4ff507..315a8413df5b 100644 --- a/Marlin/src/lcd/language/language_es.h +++ b/Marlin/src/lcd/language/language_es.h @@ -31,556 +31,565 @@ namespace Language_es { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Spanish"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Spanish"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Lista"); - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("SI"); - PROGMEM Language_Str MSG_NO = _UxGT("NO"); - PROGMEM Language_Str MSG_BACK = _UxGT("Atrás"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Cancelando..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("SD/USB insertado"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("SD/USB retirado"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Esperando al SD/USB"); - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("Fallo al iniciar SD"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Error lectura SD/USB"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("Disp. USB retirado"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Inicio USB fallido"); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Desbordamiento de subllamada"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menú principal"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Ajustes avanzados"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Configuración"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Inicio automático"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Apagar motores"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menú depuración"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Prob. barra progreso"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Llevar al origen"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Origen X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Origen Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Origen Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto alineado Z"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Recorrido asistido"); - PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Iteración: %i"); - PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("¡Precisión disminuyendo!"); - PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Precisión conseguida"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Origen XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Pulsar para comenzar"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Siguiente punto"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("¡Nivelación lista!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Compen. Altura"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Ajustar desfases"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Desfase aplicada"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Establecer origen"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Lista"); + LSTR MSG_YES = _UxGT("SI"); + LSTR MSG_NO = _UxGT("NO"); + LSTR MSG_BACK = _UxGT("Atrás"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Cancelando..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("SD/USB insertado"); + LSTR MSG_MEDIA_REMOVED = _UxGT("SD/USB retirado"); + LSTR MSG_MEDIA_WAITING = _UxGT("Esperando al SD/USB"); + LSTR MSG_SD_INIT_FAIL = _UxGT("Fallo al iniciar SD"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Error lectura SD/USB"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("Disp. USB retirado"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Inicio USB fallido"); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Desbordamiento de subllamada"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); + LSTR MSG_MAIN = _UxGT("Menú principal"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Ajustes avanzados"); + LSTR MSG_CONFIGURATION = _UxGT("Configuración"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Inicio automático"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Apagar motores"); + LSTR MSG_DEBUG_MENU = _UxGT("Menú depuración"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Prob. barra progreso"); + LSTR MSG_HOMING = _UxGT("Origen"); + LSTR MSG_AUTO_HOME = _UxGT("Llevar al origen"); + LSTR MSG_AUTO_HOME_X = _UxGT("Origen X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Origen Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Origen Z"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto alineado Z"); + LSTR MSG_ITERATION = _UxGT("G34 Iteración: %i"); + LSTR MSG_DECREASING_ACCURACY = _UxGT("¡Precisión disminuyendo!"); + LSTR MSG_ACCURACY_ACHIEVED = _UxGT("Precisión conseguida"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Origen XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Pulsar para comenzar"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Siguiente punto"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("¡Nivelación lista!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Compen. Altura"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Ajustar desfases"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Desfase aplicada"); + LSTR MSG_SET_ORIGIN = _UxGT("Establecer origen"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Precal. ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Precal. ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Fusor"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Fusor ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Todo"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Cama"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Ajuste"); + LSTR MSG_PREHEAT_1 = _UxGT("Precal. ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Precal. ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Fusor"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Fusor ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Todo"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Cama"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Precal. ") PREHEAT_1_LABEL _UxGT(" Ajuste"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Precal. $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Precal. $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Precal. $ Fusor"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Precal. $ Fusor ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Precal. $ Todo"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Precal. $ Cama"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Precal. $ Ajuste"); + LSTR MSG_PREHEAT_M = _UxGT("Precal. $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Precal. $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Precal. $ Fusor"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Precal. $ Fusor ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Precal. $ Todo"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Precal. $ Cama"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Precal. $ Ajuste"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Precal. manual"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Enfriar"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frecuencia"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Control Láser"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Potencia Láser"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Control Mandrino"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Potencia Mandrino"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Invertir giro"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Encender Fuente"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Apagar Fuente"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extruir"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Retraer"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mover ejes"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelando Cama"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivelar Cama"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Nivelar Esquinas"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Siguente Esquina"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mallado"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Mallado"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Ed. Mallado parada"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Sondear Punto"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Índice X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Índice Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valor Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Com. Personalizados"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probar Sonda"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Punto"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Desviación"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("Modo IDEX"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Desfase Herramienta"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Aparcado"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicar"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copia Reflejada"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Control Total"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2ª Fusor X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2ª Fusor Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2ª Fusor Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Hacer G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Herramientas UBL"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Nivelado UBL"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Punto de inclinación"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Crear Mallado man."); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Colocar cuña y Medir"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Medir"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Retirar y Medir Cama"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Mover al Siguente"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Activar UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Desactivar UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Temp. Cama"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. Cama perso."); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. Fusor"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. Fusor perso."); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Editar Mallado"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit. Mallado perso."); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Ajuste fino Mallado"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Term. edici. Mallado"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Crear Mallado Pers."); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Crear Mallado"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Precal. manual"); + LSTR MSG_COOLDOWN = _UxGT("Enfriar"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frecuencia"); + LSTR MSG_LASER_MENU = _UxGT("Control Láser"); + LSTR MSG_LASER_POWER = _UxGT("Potencia Láser"); + LSTR MSG_SPINDLE_MENU = _UxGT("Control Mandrino"); + LSTR MSG_SPINDLE_POWER = _UxGT("Potencia Mandrino"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Invertir giro"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Encender Fuente"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Apagar Fuente"); + LSTR MSG_EXTRUDE = _UxGT("Extruir"); + LSTR MSG_RETRACT = _UxGT("Retraer"); + LSTR MSG_MOVE_AXIS = _UxGT("Mover ejes"); + LSTR MSG_BED_LEVELING = _UxGT("Nivelando Cama"); + LSTR MSG_LEVEL_BED = _UxGT("Nivelar Cama"); + LSTR MSG_BED_TRAMMING = _UxGT("Recorrido Cama"); + LSTR MSG_NEXT_CORNER = _UxGT("Siguente Esquina"); + LSTR MSG_MESH_EDITOR = _UxGT("Editor Mallado"); + LSTR MSG_EDIT_MESH = _UxGT("Editar Mallado"); + LSTR MSG_EDITING_STOPPED = _UxGT("Ed. Mallado parada"); + LSTR MSG_PROBING_POINT = _UxGT("Sondear Punto"); + LSTR MSG_MESH_X = _UxGT("Índice X"); + LSTR MSG_MESH_Y = _UxGT("Índice Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Valor Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Com. Personalizados"); + LSTR MSG_M48_TEST = _UxGT("M48 Probar Sonda"); + LSTR MSG_M48_POINT = _UxGT("M48 Punto"); + LSTR MSG_M48_DEVIATION = _UxGT("Desviación"); + LSTR MSG_IDEX_MENU = _UxGT("Modo IDEX"); + LSTR MSG_OFFSETS_MENU = _UxGT("Desfase Herramienta"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Aparcado"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicar"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copia Reflejada"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Control Total"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2ª Fusor X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2ª Fusor Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2ª Fusor Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Hacer G29"); + LSTR MSG_UBL_TOOLS = _UxGT("Herramientas UBL"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Nivelado UBL"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Punto de inclinación"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Crear Mallado man."); + LSTR MSG_UBL_BC_INSERT = _UxGT("Colocar cuña y Medir"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Medir"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Retirar y Medir Cama"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Mover al Siguente"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activar UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Desactivar UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp. Cama"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. Cama perso."); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. Fusor"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. Fusor perso."); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Editar Mallado"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit. Mallado perso."); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Ajuste fino Mallado"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Term. edici. Mallado"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Crear Mallado Pers."); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Crear Mallado"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Crear Mallado ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Valid. Mall. ($)"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Crear Mallado ($)"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Valid. Mall. ($)"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Crear Mallado Frío"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Ajustar alt. Mallado"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Cantidad de altura"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Valid. Mallado"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valid. Mall. perso."); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Calentando Cama"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Calent. Boquilla"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Imprimado manual..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Impri. longit. fija"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Imprimación Lista"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Cancelado"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Dejando G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Contin. Mallado cama"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Nivelando Mallado"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Nivelando 3Puntos"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Niv. Mall. cuadri"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Nivel de Mallado"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Puntos Laterales"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Tipo de mapa "); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Salida Mapa mallado"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Salida para el host"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Salida para CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Cópia de seg. ext"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Salida Info. UBL"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Cantidad de relleno"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Relleno manual"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Relleno inteligente"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Mallado de relleno"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidar todo"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidar proximos"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Ajustar Fino Todo"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Ajustar Fino proxi."); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Almacen de Mallado"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Huecos memoria"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Cargar Mall. cama"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Guardar Mall. cama"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Malla %i Cargada"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Malla %i Guardada"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Sin guardar"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Error: Guardar UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Error: Restaurar UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Desfase de Z: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Desfase de Z Parado"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL Paso a Paso"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Crear Mall. Frío"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Relleno intelig."); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Valid. Mallado"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Ajustar Fino Todo"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Valid. Mallado"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Ajustar Fino Todo"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Guardar Mall. cama"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Crear Mallado Frío"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Ajustar alt. Mallado"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Cantidad de altura"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Valid. Mallado"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valid. Mall. perso."); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 Calentando Cama"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Calent. Boquilla"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Imprimado manual..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Impri. longit. fija"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Imprimación Lista"); + LSTR MSG_G26_CANCELED = _UxGT("G26 Cancelado"); + LSTR MSG_G26_LEAVING = _UxGT("Dejando G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Contin. Mallado cama"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Nivelando Mallado"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Nivelando 3Puntos"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Niv. Mall. cuadri"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Nivel de Mallado"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Puntos Laterales"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Tipo de mapa "); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Salida Mapa mallado"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Salida para el host"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Salida para CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Cópia de seg. ext"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Salida Info. UBL"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Cantidad de relleno"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Relleno manual"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Relleno inteligente"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Mallado de relleno"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidar todo"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidar proximos"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Ajustar Fino Todo"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Ajustar Fino proxi."); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Almacen de Mallado"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Huecos memoria"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Cargar Mall. cama"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Guardar Mall. cama"); + LSTR MSG_MESH_LOADED = _UxGT("Malla %i Cargada"); + LSTR MSG_MESH_SAVED = _UxGT("Malla %i Guardada"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Sin guardar"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Error: Guardar UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Error: Restaurar UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Desfase de Z: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Desfase de Z Parado"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL Paso a Paso"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Crear Mall. Frío"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Relleno intelig."); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Valid. Mallado"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Ajustar Fino Todo"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Valid. Mallado"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Ajustar Fino Todo"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Guardar Mall. cama"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Control LED"); - PROGMEM Language_Str MSG_LEDS = _UxGT("LEDS"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Color predefinido"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Rojo"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Naranja"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Amarillo"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Verde"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Azul"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Índigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Violeta"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Blanco"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Por defecto"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Color personalizado"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Intensidad Rojo"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Intensidad Verde"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Intensidad Azul"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Intensidad Blanco"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Brillo"); + LSTR MSG_LED_CONTROL = _UxGT("Control LED"); + LSTR MSG_LEDS = _UxGT("LEDS"); + LSTR MSG_LED_PRESETS = _UxGT("Color predefinido"); + LSTR MSG_SET_LEDS_RED = _UxGT("Rojo"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Naranja"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Amarillo"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Verde"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Azul"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Índigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violeta"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Blanco"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Por defecto"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Color personalizado"); + LSTR MSG_INTENSITY_R = _UxGT("Intensidad Rojo"); + LSTR MSG_INTENSITY_G = _UxGT("Intensidad Verde"); + LSTR MSG_INTENSITY_B = _UxGT("Intensidad Azul"); + LSTR MSG_INTENSITY_W = _UxGT("Intensidad Blanco"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Brillo"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Moviendo..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Libre XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Mover X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Mover Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Mover Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extrusor"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extrusor *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Hotend muy frio"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Mover %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mover 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mover 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Velocidad"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Cama Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Boquilla"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Boquilla ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Boquilla Aparcada"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Boquilla en Espera"); - PROGMEM Language_Str MSG_BED = _UxGT("Cama"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Recinto"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Ventilador"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Ventilador ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Vent. almacenado ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Vel. Ext. ventil."); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Vel. Ext. ventil. ~"); - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Controlador Vent."); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Velocidad en reposo"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Modo Auto"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Velocidad Activa"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Periodo de reposo"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Flujo"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flujo ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Control"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Factor"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Temp. Autom."); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Enc"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Apg"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Auto-ajuste"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Auto-ajuste *"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Seleccionar"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Seleccionar *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Aceleración"); - PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Desvi. Unión"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocidad"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vel. viaje min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Acceleración"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Acel. max") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Acel. max") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Acel. max") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Acel. max") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Acel. max *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Acel. retrac."); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Acel. Viaje"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Pasos/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" pasos/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" pasos/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" pasos/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E pasos/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* pasos/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Movimiento"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filamento"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E en mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Diámetro Fil."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Diámetro Fil. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Descarga mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Carga mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Avance K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Avance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Contraste LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Guardar EEPROM"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Cargar EEPROM"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Rest. fábrica"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Inicializar EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("Err: EEPROM CRC"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("Err: Índice EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("Err: Versión EEPROM"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Actualizar SD/USB"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Resetear Impresora"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Recargar"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Pantalla de Inf."); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Preparar"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Ajustar"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Iniciar impresión"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Siguinte"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Iniciar"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Parar"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Imprimir"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Reiniciar"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Cancelar"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Listo"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Retroceder"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Proceder"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pausar impresión"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Reanudar impresión"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Detener impresión"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Imprimiendo Objeto"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Cancelar Objeto"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Rec. Fallo electrico"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Imprim. desde SD/USB"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("SD/USB no presente"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Reposo..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Pulsar para Reanudar"); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Impresión Pausada"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Imprimiendo..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Impresión cancelada"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Impresión Completada"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Sin movimiento"); - PROGMEM Language_Str MSG_KILLED = _UxGT("MUERTA"); - PROGMEM Language_Str MSG_STOPPED = _UxGT("DETENIDA"); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retraer mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Interc. Retraer mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retraer V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Levantar mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("DesRet mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Interc. DesRet mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("DesRet V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Retracción Auto."); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Inter. longitud"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Purgar longitud"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Cambiar Herramienta"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Aumentar Z"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Vel. de Cebado"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vel. de retracción"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Cambiar filamento"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Cambiar filamento *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Cargar filamento"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Cargar filamento *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Descargar filamento"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Descargar fil. *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Descargar todo"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Iniciar SD/USB"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Cambiar SD/USB"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Lanzar SD/USB"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sonda Z fuera cama"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Factor de desviación"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Auto-Prueba"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reiniciar"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Subir pistón"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Bajar pistón"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("Modo Software"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("Modo 5V"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("Modo OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Modo almacenar"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Poner BLTouch a 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Poner BLTouch a OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Informe de drenaje"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("PELIGRO: ¡Una mala configuración puede producir daños! ¿Proceder igualmente?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Iniciar TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Test de desfase Z"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Guardar"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Subir TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Subir Sonda Z"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Bajar Sonda Z"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Origen %s%s%s Prim."); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Desf. Sonda"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Desf. Sonda X"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Desf. Sonda Y"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Desf. Sonda Z"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Micropaso X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Micropaso Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Total"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Cancelado - Endstop"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Calent. fallido"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP. REDUN."); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("FUGA TÉRMICA"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("FUGA TÉRMICA CAMA"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("FUGA TÉRMICA CAMARA"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err:TEMP. MÁX"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err:TEMP. MIN"); - PROGMEM Language_Str MSG_HALTED = _UxGT("IMPRESORA DETENIDA"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Por favor, reinicie"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Calentando..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Enfriando..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Calentando Cama..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Enfriando Cama..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Calentando Cámara..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Enfriando Cámara..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Calibración Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Configuración Delta"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibración"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Est. Altura Delta"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Ajustar Sonda Z"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Barra Diagonal"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Altura"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Radio"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Info. Impresora"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Info. Impresora"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("Nivelando 3puntos"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Nivelando Lineal"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Nivelando Bilineal"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Nivelando UBL"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Nivelando en Mallado"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Estadísticas Imp."); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Info. Controlador"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistores"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extrusores"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baudios"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protocolo"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Vig. Fuga Térm.: OFF"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Vig. Fuga Térm.: ON"); + LSTR MSG_MOVING = _UxGT("Moviendo..."); + LSTR MSG_FREE_XY = _UxGT("Libre XY"); + LSTR MSG_MOVE_X = _UxGT("Mover X"); + LSTR MSG_MOVE_Y = _UxGT("Mover Y"); + LSTR MSG_MOVE_Z = _UxGT("Mover Z"); + LSTR MSG_MOVE_E = _UxGT("Extrusor"); + LSTR MSG_MOVE_EN = _UxGT("Extrusor *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Hotend muy frio"); + LSTR MSG_MOVE_N_MM = _UxGT("Mover %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Mover 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Mover 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Mover 100mm"); + LSTR MSG_SPEED = _UxGT("Velocidad"); + LSTR MSG_BED_Z = _UxGT("Cama Z"); + LSTR MSG_NOZZLE = _UxGT("Boquilla"); + LSTR MSG_NOZZLE_N = _UxGT("Boquilla ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Boquilla Aparcada"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Boquilla en Espera"); + LSTR MSG_BED = _UxGT("Cama"); + LSTR MSG_CHAMBER = _UxGT("Recinto"); + LSTR MSG_FAN_SPEED = _UxGT("Ventilador"); + LSTR MSG_FAN_SPEED_N = _UxGT("Ventilador ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Vent. almacenado ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Vel. Ext. ventil."); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Vel. Ext. ventil. ~"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Controlador Vent."); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Velocidad en reposo"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Modo Auto"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Velocidad Activa"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Periodo de reposo"); + LSTR MSG_FLOW = _UxGT("Flujo"); + LSTR MSG_FLOW_N = _UxGT("Flujo ~"); + LSTR MSG_CONTROL = _UxGT("Control"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Factor"); + LSTR MSG_AUTOTEMP = _UxGT("Temp. Autom."); + LSTR MSG_LCD_ON = _UxGT("Enc"); + LSTR MSG_LCD_OFF = _UxGT("Apg"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID Auto-ajuste"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Auto-ajuste *"); + LSTR MSG_SELECT = _UxGT("Seleccionar"); + LSTR MSG_SELECT_E = _UxGT("Seleccionar *"); + LSTR MSG_ACC = _UxGT("Aceleración"); + LSTR MSG_JERK = _UxGT("Jerk"); + LSTR MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + LSTR MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + LSTR MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + LSTR MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + LSTR MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + LSTR MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + LSTR MSG_VE_JERK = _UxGT("Max E Jerk"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Desvi. Unión"); + LSTR MSG_VELOCITY = _UxGT("Velocidad"); + LSTR MSG_VMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Vel"); + LSTR MSG_VMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Vel"); + LSTR MSG_VMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Vel"); + LSTR MSG_VMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Vel"); + LSTR MSG_VMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Vel"); + LSTR MSG_VMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Vel"); + LSTR MSG_VMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Vel"); + LSTR MSG_VMAX_EN = _UxGT("Max * Vel"); + LSTR MSG_VMIN = _UxGT("Vmin"); + LSTR MSG_VTRAV_MIN = _UxGT("Vel. viaje min"); + LSTR MSG_ACCELERATION = _UxGT("Acceleración"); + LSTR MSG_AMAX_A = _UxGT("Acel. max") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Acel. max") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Acel. max") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Acel. max") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Acel. max") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Acel. max") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Acel. max") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Acel. max *"); + LSTR MSG_A_RETRACT = _UxGT("Acel. retrac."); + LSTR MSG_A_TRAVEL = _UxGT("Acel. Viaje"); + LSTR MSG_STEPS_PER_MM = _UxGT("Pasos/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" pasos/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" pasos/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" pasos/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" pasos/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" pasos/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" pasos/mm"); + LSTR MSG_E_STEPS = _UxGT("E pasos/mm"); + LSTR MSG_EN_STEPS = _UxGT("* pasos/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatura"); + LSTR MSG_MOTION = _UxGT("Movimiento"); + LSTR MSG_FILAMENT = _UxGT("Filamento"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E en mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Diámetro Fil."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Diámetro Fil. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Descarga mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Carga mm"); + LSTR MSG_ADVANCE_K = _UxGT("Avance K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Avance K *"); + LSTR MSG_CONTRAST = _UxGT("Contraste LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Guardar EEPROM"); + LSTR MSG_LOAD_EEPROM = _UxGT("Cargar EEPROM"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Rest. fábrica"); + LSTR MSG_INIT_EEPROM = _UxGT("Inicializar EEPROM"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("Err: EEPROM CRC"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Err: Índice EEPROM"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: Versión EEPROM"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Actualizar SD/USB"); + LSTR MSG_RESET_PRINTER = _UxGT("Resetear Impresora"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Recargar"); + LSTR MSG_INFO_SCREEN = _UxGT("Pantalla de Inf."); + LSTR MSG_PREPARE = _UxGT("Preparar"); + LSTR MSG_TUNE = _UxGT("Ajustar"); + LSTR MSG_START_PRINT = _UxGT("Iniciar impresión"); + LSTR MSG_BUTTON_NEXT = _UxGT("Siguinte"); + LSTR MSG_BUTTON_INIT = _UxGT("Iniciar"); + LSTR MSG_BUTTON_STOP = _UxGT("Parar"); + LSTR MSG_BUTTON_PRINT = _UxGT("Imprimir"); + LSTR MSG_BUTTON_RESET = _UxGT("Reiniciar"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Cancelar"); + LSTR MSG_BUTTON_DONE = _UxGT("Listo"); + LSTR MSG_BUTTON_BACK = _UxGT("Retroceder"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Proceder"); + LSTR MSG_PAUSE_PRINT = _UxGT("Pausar impresión"); + LSTR MSG_RESUME_PRINT = _UxGT("Reanudar impresión"); + LSTR MSG_STOP_PRINT = _UxGT("Detener impresión"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Imprimiendo Objeto"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Cancelar Objeto"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Rec. Fallo electrico"); + LSTR MSG_MEDIA_MENU = _UxGT("Imprim. desde SD/USB"); + LSTR MSG_NO_MEDIA = _UxGT("SD/USB no presente"); + LSTR MSG_DWELL = _UxGT("Reposo..."); + LSTR MSG_USERWAIT = _UxGT("Pulsar para Reanudar"); + LSTR MSG_PRINT_PAUSED = _UxGT("Impresión Pausada"); + LSTR MSG_PRINTING = _UxGT("Imprimiendo..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Impresión cancelada"); + LSTR MSG_PRINT_DONE = _UxGT("Impresión Completada"); + LSTR MSG_NO_MOVE = _UxGT("Sin movimiento"); + LSTR MSG_KILLED = _UxGT("MUERTA"); + LSTR MSG_STOPPED = _UxGT("DETENIDA"); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retraer mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Interc. Retraer mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retraer V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Levantar mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("DesRet mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Interc. DesRet mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("DesRet V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Retracción Auto."); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Inter. longitud"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Purgar longitud"); + LSTR MSG_TOOL_CHANGE = _UxGT("Cambiar Herramienta"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Aumentar Z"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Vel. de Cebado"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vel. de retracción"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Cambiar filamento"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Cambiar filamento *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Cargar filamento"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Cargar filamento *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Descargar filamento"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Descargar fil. *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Descargar todo"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Iniciar SD/USB"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Cambiar SD/USB"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Lanzar SD/USB"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z fuera cama"); + LSTR MSG_SKEW_FACTOR = _UxGT("Factor de desviación"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Auto-Prueba"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reiniciar"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Subir pistón"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Bajar pistón"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("Modo Software"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("Modo 5V"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("Modo OD"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Modo almacenar"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Poner BLTouch a 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Poner BLTouch a OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Informe de drenaje"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("PELIGRO: ¡Una mala configuración puede producir daños! ¿Proceder igualmente?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Iniciar TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Test de desfase Z"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Guardar"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Subir TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Subir Sonda Z"); + LSTR MSG_MANUAL_STOW = _UxGT("Bajar Sonda Z"); + LSTR MSG_HOME_FIRST = _UxGT("Origen %s%s%s Prim."); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Desf. Sonda"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Desf. Sonda X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Desf. Sonda Y"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desf. Sonda Z"); + LSTR MSG_BABYSTEP_X = _UxGT("Micropaso X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Micropaso Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Cancelado - Endstop"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Calent. fallido"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP. REDUN."); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("FUGA TÉRMICA"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("FUGA TÉRMICA CAMA"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("FUGA TÉRMICA CAMARA"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Err:TEMP. MÁX"); + LSTR MSG_ERR_MINTEMP = _UxGT("Err:TEMP. MIN"); + LSTR MSG_HALTED = _UxGT("IMPRESORA DETENIDA"); + LSTR MSG_PLEASE_RESET = _UxGT("Por favor, reinicie"); + LSTR MSG_HEATING = _UxGT("Calentando..."); + LSTR MSG_COOLING = _UxGT("Enfriando..."); + LSTR MSG_BED_HEATING = _UxGT("Calentando Cama..."); + LSTR MSG_BED_COOLING = _UxGT("Enfriando Cama..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Calentando Cámara..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Enfriando Cámara..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Calibración Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Configuración Delta"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibración"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Est. Altura Delta"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Ajustar Sonda Z"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Barra Diagonal"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Altura"); + LSTR MSG_DELTA_RADIUS = _UxGT("Radio"); + LSTR MSG_INFO_MENU = _UxGT("Info. Impresora"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Info. Impresora"); + LSTR MSG_3POINT_LEVELING = _UxGT("Nivelando 3puntos"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Nivelando Lineal"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Nivelando Bilineal"); + LSTR MSG_UBL_LEVELING = _UxGT("Nivelando UBL"); + LSTR MSG_MESH_LEVELING = _UxGT("Nivelando en Mallado"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Estadísticas Imp."); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Info. Controlador"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistores"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrusores"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baudios"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protocolo"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Vig. Fuga Térm.: OFF"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Vig. Fuga Térm.: ON"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Luz cabina"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Brillo cabina"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Impresora incorrecta"); + LSTR MSG_CASE_LIGHT = _UxGT("Luz cabina"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Brillo cabina"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Impresora incorrecta"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Cont. de impresión"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Tiempo total de imp."); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Impresión más larga"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Total Extruido"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Cont. de impresión"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Tiempo total de imp."); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Impresión más larga"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Total Extruido"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Impresiones"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Más larga"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extruido"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Impresiones"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Más larga"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruido"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Temp. Mínima"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp. Máxima"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("F. Aliment."); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Fuerza de empuje"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ERROR CONEX. TMC"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Escribe DAC EEPROM"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("CAMBIAR FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("IMPRESIÓN PAUSADA"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CARGAR FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("DESCARGAR FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPC. REINICIO:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purgar más"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Continuar imp."); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Boquilla: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Sens. filamento"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Dist. filamento mm"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Ir a origen Fallado"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Sondeo Fallado"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Temp. Mínima"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Temp. Máxima"); + LSTR MSG_INFO_PSU = _UxGT("F. Aliment."); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Fuerza de empuje"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Driver %"); + LSTR MSG_ERROR_TMC = _UxGT("ERROR CONEX. TMC"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Escribe DAC EEPROM"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("CAMBIAR FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("IMPRESIÓN PAUSADA"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CARGAR FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("DESCARGAR FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPC. REINICIO:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purgar más"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Continuar imp."); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Boquilla: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Sens. filamento"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Dist. filamento mm"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Ir a origen Fallado"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Sondeo Fallado"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ELIJE FILAMENTO"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("¡Actu. MMU Firmware!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Necesita Cuidado"); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Continuar imp."); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Resumiendo..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Cargar Filamento"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Cargar Todo"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Cargar hasta boqui."); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Expulsar Filamento"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Expulsar Filamento ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Descargar Filamento"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Cargando Fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Expulsando Fil. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Descargando Fil...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Todo"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filamento ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Reiniciar MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("Reiniciando MMU..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Retirar, y pulsar"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ELIJE FILAMENTO"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("¡Actu. MMU Firmware!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Necesita Cuidado"); + LSTR MSG_MMU2_RESUME = _UxGT("Continuar imp."); + LSTR MSG_MMU2_RESUMING = _UxGT("Resumiendo..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Cargar Filamento"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Cargar Todo"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Cargar hasta boqui."); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Expulsar Filamento"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Expulsar Filamento ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Descargar Filamento"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Cargando Fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Expulsando Fil. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Descargando Fil...."); + LSTR MSG_MMU2_ALL = _UxGT("Todo"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filamento ~"); + LSTR MSG_MMU2_RESET = _UxGT("Reiniciar MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("Reiniciando MMU..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Retirar, y pulsar"); - PROGMEM Language_Str MSG_MIX = _UxGT("Mezcla"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Componente ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Miezclador"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Degradado"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Degradado Total"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Mezcla Conmutada"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Mezcla Cíclica"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Mezcla de Degradado"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Degradado inverso"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Activar Herr.V"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Inicio Herr.V"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" Fin Herr.V"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias Herr.V"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Reiniciar Herr.V"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Cometer mezc. Herr.V"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("Herr.V reiniciados"); - PROGMEM Language_Str MSG_START_Z = _UxGT("Inicio Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" Fin Z:"); + LSTR MSG_MIX = _UxGT("Mezcla"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente ="); + LSTR MSG_MIXER = _UxGT("Miezclador"); + LSTR MSG_GRADIENT = _UxGT("Degradado"); + LSTR MSG_FULL_GRADIENT = _UxGT("Degradado Total"); + LSTR MSG_TOGGLE_MIX = _UxGT("Mezcla Conmutada"); + LSTR MSG_CYCLE_MIX = _UxGT("Mezcla Cíclica"); + LSTR MSG_GRADIENT_MIX = _UxGT("Mezcla de Degradado"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Degradado inverso"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Activar Herr.V"); + LSTR MSG_START_VTOOL = _UxGT("Inicio Herr.V"); + LSTR MSG_END_VTOOL = _UxGT(" Fin Herr.V"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias Herr.V"); + LSTR MSG_RESET_VTOOLS = _UxGT("Reiniciar Herr.V"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Cometer mezc. Herr.V"); + LSTR MSG_VTOOLS_RESET = _UxGT("Herr.V reiniciados"); + LSTR MSG_START_Z = _UxGT("Inicio Z:"); + LSTR MSG_END_Z = _UxGT(" Fin Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Juegos"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Maze"); + LSTR MSG_GAMES = _UxGT("Juegos"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Maze"); #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Pulsar el botón para", "reanudar impresión")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Aparcando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Esperando para", "iniciar el cambio", "de filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Inserte el filamento", "y pulse el botón", "para continuar...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Pulse el botón para", "calentar la boquilla")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Calentando boquilla", "Espere por favor...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Espere para", "liberar el filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Espere para", "cargar el filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Espere para", "purgar el filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Pulse para finalizar", "la purga de filamen.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Esperando impresora", "para reanudar...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Pulsar el botón para", "reanudar impresión")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Aparcando...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Esperando para", "iniciar el cambio", "de filamento")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Inserte el filamento", "y pulse el botón", "para continuar...")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Pulse el botón para", "calentar la boquilla")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Calentando boquilla", "Espere por favor...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Espere para", "liberar el filamento")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Espere para", "cargar el filamento")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Espere para", "purgar el filamento")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Pulse para finalizar", "la purga de filamen.")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Esperando impresora", "para reanudar...")); #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Pulse para continuar")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Aparcando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Por Favor espere...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Inserte y Pulse")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Pulse para Calentar")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Calentando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Liberando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Cargando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purgando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Pulse para finalizar")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Reanudando...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Pulse para continuar")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Aparcando...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Por Favor espere...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Inserte y Pulse")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Pulse para Calentar")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Calentando...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Liberando...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Cargando...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purgando...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Pulse para finalizar")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Reanudando...")); #endif - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("Controladores TMC"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Amperaje Controlador"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Límite Hibrido"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Origen sin sensores"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Modo de pasos"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Habilit."); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Reiniciar"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" dentro:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Backlash"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Corrección"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Suavizado"); + LSTR MSG_TMC_DRIVERS = _UxGT("Controladores TMC"); + LSTR MSG_TMC_CURRENT = _UxGT("Amperaje Controlador"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Límite Hibrido"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Origen sin sensores"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Modo de pasos"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Habilit."); + LSTR MSG_SERVICE_RESET = _UxGT("Reiniciar"); + LSTR MSG_SERVICE_IN = _UxGT(" dentro:"); + LSTR MSG_BACKLASH = _UxGT("Backlash"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Corrección"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Suavizado"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Nivel Eje X"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Auto Calibrar"); - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("T. de esp. Calent."); - PROGMEM Language_Str MSG_REHEAT = _UxGT("Recalentar"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Recalentando..."); + LSTR MSG_LEVEL_X_AXIS = _UxGT("Nivel Eje X"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto Calibrar"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("T. de esp. Calent."); + LSTR MSG_REHEAT = _UxGT("Recalentar"); + LSTR MSG_REHEATING = _UxGT("Recalentando..."); } diff --git a/Marlin/src/lcd/language/language_eu.h b/Marlin/src/lcd/language/language_eu.h index 1c1c9e423dcd..fc8f2e0f62ca 100644 --- a/Marlin/src/lcd/language/language_eu.h +++ b/Marlin/src/lcd/language/language_eu.h @@ -34,288 +34,295 @@ namespace Language_eu { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 1; - PROGMEM Language_Str LANGUAGE = _UxGT("Basque-Euskera"); + constexpr uint8_t CHARSIZE = 1; + LSTR LANGUAGE = _UxGT("Basque-Euskera"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" prest."); - PROGMEM Language_Str MSG_BACK = _UxGT("Atzera"); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Txartela sartuta"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Txartela kenduta"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menu nagusia"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Auto hasiera"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Itzali motoreak"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Arazketa Menua"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Prog. Barra Proba"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Hasierara joan"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("X jatorrira"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Y jatorrira"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Z jatorrira"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("XYZ hasieraratzen"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Klik egin hasteko"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Hurrengo Puntua"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Berdintzea eginda"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Etxe. offset eza."); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsetak ezarrita"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Hasiera ipini"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" prest."); + LSTR MSG_BACK = _UxGT("Atzera"); + LSTR MSG_MEDIA_INSERTED = _UxGT("Txartela sartuta"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Txartela kenduta"); + LSTR MSG_MAIN = _UxGT("Menu nagusia"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Auto hasiera"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Itzali motoreak"); + LSTR MSG_DEBUG_MENU = _UxGT("Arazketa Menua"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Prog. Barra Proba"); + LSTR MSG_AUTO_HOME = _UxGT("Hasierara joan"); + LSTR MSG_AUTO_HOME_X = _UxGT("X jatorrira"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Y jatorrira"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Z jatorrira"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("XYZ hasieraratzen"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Klik egin hasteko"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Hurrengo Puntua"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Berdintzea eginda"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Etxe. offset eza."); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsetak ezarrita"); + LSTR MSG_SET_ORIGIN = _UxGT("Hasiera ipini"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Berotu ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Berotu ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Amaia"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Amaia ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Guztia"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Ohea"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Ezarp."); + LSTR MSG_PREHEAT_1 = _UxGT("Berotu ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Berotu ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Amaia"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Amaia ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Guztia"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Ohea"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Berotu ") PREHEAT_1_LABEL _UxGT(" Ezarp."); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Berotu $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Berotu $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Berotu $ Amaia"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Berotu $ Amaia ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Berotu $ Guztia"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Berotu $ Ohea"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Berotu $ Ezarp."); + LSTR MSG_PREHEAT_M = _UxGT("Berotu $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Berotu $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Berotu $ Amaia"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Berotu $ Amaia ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Berotu $ Guztia"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Berotu $ Ohea"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Berotu $ Ezarp."); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Hoztu"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Energia piztu"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Energia itzali"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Estruitu"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Atzera eragin"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Ardatzak mugitu"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Ohe berdinketa"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Ohea berdindu"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Ertzak berdindu"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Hurrengo ertza"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Sarea editatu"); + LSTR MSG_COOLDOWN = _UxGT("Hoztu"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Energia piztu"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Energia itzali"); + LSTR MSG_EXTRUDE = _UxGT("Estruitu"); + LSTR MSG_RETRACT = _UxGT("Atzera eragin"); + LSTR MSG_MOVE_AXIS = _UxGT("Ardatzak mugitu"); + LSTR MSG_BED_LEVELING = _UxGT("Ohe berdinketa"); + LSTR MSG_LEVEL_BED = _UxGT("Ohea berdindu"); + LSTR MSG_BED_TRAMMING = _UxGT("Ertzak berdindu"); + LSTR MSG_NEXT_CORNER = _UxGT("Hurrengo ertza"); + LSTR MSG_EDIT_MESH = _UxGT("Sarea editatu"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("G29 exekutatzen"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL Tresnak"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Sarea eskuz sortu"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Neurtu"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("UBL aktibatu"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL desaktibatu"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Ohearen tenperatura"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Mutur beroaren tenp."); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Sarea editatu"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Sarea editatzea eginda"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Sarea sortu"); + LSTR MSG_UBL_DOING_G29 = _UxGT("G29 exekutatzen"); + LSTR MSG_UBL_TOOLS = _UxGT("UBL Tresnak"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Sarea eskuz sortu"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Neurtu"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL aktibatu"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL desaktibatu"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Ohearen tenperatura"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Mutur beroaren tenp."); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Sarea editatu"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Sarea editatzea eginda"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Sarea sortu"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("$ sarea sortu"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("$ sarea balioetsi"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("$ sarea sortu"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("$ sarea balioetsi"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Sare hotza sortu"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Sarearen altuera doitu"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Sarea balioetsi"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Ohe sarea balioetsi"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Sare berdinketa"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3 puntuko berdinketa"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Lauki-sare berdinketa"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Sarea berdindu"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Mapa mota"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("LED ezarpenak"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Argiak"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Argi aurrehautaketak"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Gorria"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Laranja"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Horia"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Berdea"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Urdina"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Bioleta"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Zuria"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Lehenetsia"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Argi pertsonalizatuak"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Intentsitate gorria"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Intentsitate berdea"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Intentsitate urdina"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Intentsitate zuria"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Distira"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Sare hotza sortu"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Sarearen altuera doitu"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Sarea balioetsi"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Ohe sarea balioetsi"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Sare berdinketa"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3 puntuko berdinketa"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Lauki-sare berdinketa"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Sarea berdindu"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Mapa mota"); + LSTR MSG_LED_CONTROL = _UxGT("LED ezarpenak"); + LSTR MSG_LEDS = _UxGT("Argiak"); + LSTR MSG_LED_PRESETS = _UxGT("Argi aurrehautaketak"); + LSTR MSG_SET_LEDS_RED = _UxGT("Gorria"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Laranja"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Horia"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Berdea"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Urdina"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Bioleta"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Zuria"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Lehenetsia"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Argi pertsonalizatuak"); + LSTR MSG_INTENSITY_R = _UxGT("Intentsitate gorria"); + LSTR MSG_INTENSITY_G = _UxGT("Intentsitate berdea"); + LSTR MSG_INTENSITY_B = _UxGT("Intentsitate urdina"); + LSTR MSG_INTENSITY_W = _UxGT("Intentsitate zuria"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Distira"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Mugitzen..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Askatu XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Mugitu X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Mugitu Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Mugitu Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Estrusorea"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Estrusorea *"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Mugitu %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mugitu 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mugitu 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mugitu 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Abiadura"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Z Ohea"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Pita"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Pita ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Ohea"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Haizagailu abiadura"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Haizagailu abiadura ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Haiz.gehig. abiadura"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Haiz.gehig. abiadura ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Fluxua"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Fluxua ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Kontrola"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fakt"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Auto tenperatura"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Aukeratu"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Aukeratu *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Azelerazioa"); - PROGMEM Language_Str MSG_JERK = _UxGT("Astindua"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-astindua"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-astindua"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-astindua"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-astindua"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VBidaia min"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retrakt"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-bidaia"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Pausoak/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" pausoak/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" pausoak/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" pausoak/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E pausoak/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* pausoak/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Tenperatura"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Mugimendua"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Harizpia"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E mm3-tan"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Hariz. Dia."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Hariz. Dia. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Deskargatu mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Kargatu mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("K Aurrerapena"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("K Aurrerapena *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD kontrastea"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Gorde memoria"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Kargatu memoria"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Larri. berriz."); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("EEPROM-a hasieratu"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Berriz kargatu"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Pantaila info"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Prestatu"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Doitu"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pausatu inprimak."); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Jarraitu inprima."); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Gelditu inprima."); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("SD-tik inprimatu"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Ez dago SD-rik"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Lo egin..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Aginduak zain..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Inprim. geldi."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Inprim. deusezta."); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Mugimendu gabe."); - PROGMEM Language_Str MSG_KILLED = _UxGT("AKABATUTA. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("GELDITUTA. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Atzera egin mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Atzera mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Atzera egin V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Igo mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Atzera egin mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Swap Atzera mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Atzera egin V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Atzera egin"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Aldatu harizpia"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Aldatu harizpia *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Harizpia kargatu"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Harizpia kargatu *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Harizpia deskargatu"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Harizpia deskargatu *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Erabat deskargatu"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Hasieratu SD-a"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Aldatu txartela"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z zunda kanpora"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Okertze faktorea"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch AutoProba"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("BLTouch berrabia."); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("BLTouch jaitsi/luzatu"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("BLTouch igo/jaso"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Etxera %s%s%s lehenengo"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Z Konpentsatu"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Mikro-urratsa X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Mikro-urratsa Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Mikro-urratsa Z"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Endstop deusezta."); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Err: Beroketa"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: Tenperatura"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("TENP. KONTROL EZA"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err: Tenp Maximoa"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err: Tenp Minimoa"); - PROGMEM Language_Str MSG_HALTED = _UxGT("INPRIMA. GELDIRIK"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Berrabia. Mesedez"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Berotzen..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Ohea Berotzen..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibraketa"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibratu X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibratu Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibratu Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibratu Zentrua"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta ezarpenak"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Kalibraketa"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta Alt. Ezar."); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Barra diagonala"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Altuera"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Erradioa"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Inprimagailu Inf."); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Inprimagailu Inf."); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3 puntuko berdinketa"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Berdinketa lineala"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Berdinketa bilinearra"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Sare berdinketa"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Inprima. estatis."); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Txartelaren Info."); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistoreak"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Estrusoreak"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baudioak"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokoloa"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Kabina Argia"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Argiaren Distira"); + LSTR MSG_MOVING = _UxGT("Mugitzen..."); + LSTR MSG_FREE_XY = _UxGT("Askatu XY"); + LSTR MSG_MOVE_X = _UxGT("Mugitu X"); + LSTR MSG_MOVE_Y = _UxGT("Mugitu Y"); + LSTR MSG_MOVE_Z = _UxGT("Mugitu Z"); + LSTR MSG_MOVE_E = _UxGT("Estrusorea"); + LSTR MSG_MOVE_EN = _UxGT("Estrusorea *"); + LSTR MSG_MOVE_N_MM = _UxGT("Mugitu %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Mugitu 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Mugitu 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Mugitu 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Mugitu 100mm"); + LSTR MSG_SPEED = _UxGT("Abiadura"); + LSTR MSG_BED_Z = _UxGT("Z Ohea"); + LSTR MSG_NOZZLE = _UxGT("Pita"); + LSTR MSG_NOZZLE_N = _UxGT("Pita ~"); + LSTR MSG_BED = _UxGT("Ohea"); + LSTR MSG_FAN_SPEED = _UxGT("Haizagailu abiadura"); + LSTR MSG_FAN_SPEED_N = _UxGT("Haizagailu abiadura ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Haiz.gehig. abiadura"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Haiz.gehig. abiadura ~"); + LSTR MSG_FLOW = _UxGT("Fluxua"); + LSTR MSG_FLOW_N = _UxGT("Fluxua ~"); + LSTR MSG_CONTROL = _UxGT("Kontrola"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fakt"); + LSTR MSG_AUTOTEMP = _UxGT("Auto tenperatura"); + LSTR MSG_SELECT = _UxGT("Aukeratu"); + LSTR MSG_SELECT_E = _UxGT("Aukeratu *"); + LSTR MSG_ACC = _UxGT("Azelerazioa"); + LSTR MSG_JERK = _UxGT("Astindua"); + LSTR MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-astindua"); + LSTR MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-astindua"); + LSTR MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-astindua"); + LSTR MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-astindua"); + LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-astindua"); + LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-astindua"); + LSTR MSG_VE_JERK = _UxGT("Ve-astindua"); + LSTR MSG_VTRAV_MIN = _UxGT("VBidaia min"); + LSTR MSG_A_RETRACT = _UxGT("A-retrakt"); + LSTR MSG_A_TRAVEL = _UxGT("A-bidaia"); + LSTR MSG_STEPS_PER_MM = _UxGT("Pausoak/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" pausoak/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" pausoak/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" pausoak/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" pausoak/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" pausoak/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" pausoak/mm"); + LSTR MSG_E_STEPS = _UxGT("E pausoak/mm"); + LSTR MSG_EN_STEPS = _UxGT("* pausoak/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Tenperatura"); + LSTR MSG_MOTION = _UxGT("Mugimendua"); + LSTR MSG_FILAMENT = _UxGT("Harizpia"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E mm3-tan"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Hariz. Dia."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Hariz. Dia. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Deskargatu mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Kargatu mm"); + LSTR MSG_ADVANCE_K = _UxGT("K Aurrerapena"); + LSTR MSG_ADVANCE_K_E = _UxGT("K Aurrerapena *"); + LSTR MSG_CONTRAST = _UxGT("LCD kontrastea"); + LSTR MSG_STORE_EEPROM = _UxGT("Gorde memoria"); + LSTR MSG_LOAD_EEPROM = _UxGT("Kargatu memoria"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Larri. berriz."); + LSTR MSG_INIT_EEPROM = _UxGT("EEPROM-a hasieratu"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Berriz kargatu"); + LSTR MSG_INFO_SCREEN = _UxGT("Pantaila info"); + LSTR MSG_PREPARE = _UxGT("Prestatu"); + LSTR MSG_TUNE = _UxGT("Doitu"); + LSTR MSG_PAUSE_PRINT = _UxGT("Pausatu inprimak."); + LSTR MSG_RESUME_PRINT = _UxGT("Jarraitu inprima."); + LSTR MSG_STOP_PRINT = _UxGT("Gelditu inprima."); + LSTR MSG_MEDIA_MENU = _UxGT("SD-tik inprimatu"); + LSTR MSG_NO_MEDIA = _UxGT("Ez dago SD-rik"); + LSTR MSG_DWELL = _UxGT("Lo egin..."); + LSTR MSG_USERWAIT = _UxGT("Aginduak zain..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Inprim. geldi."); + LSTR MSG_PRINT_ABORTED = _UxGT("Inprim. deusezta."); + LSTR MSG_NO_MOVE = _UxGT("Mugimendu gabe."); + LSTR MSG_KILLED = _UxGT("AKABATUTA. "); + LSTR MSG_STOPPED = _UxGT("GELDITUTA. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Atzera egin mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Atzera mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Atzera egin V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Igo mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Atzera egin mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Swap Atzera mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Atzera egin V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Atzera egin"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Aldatu harizpia"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Aldatu harizpia *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Harizpia kargatu"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Harizpia kargatu *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Harizpia deskargatu"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Harizpia deskargatu *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Erabat deskargatu"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Hasieratu SD-a"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Aldatu txartela"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z zunda kanpora"); + LSTR MSG_SKEW_FACTOR = _UxGT("Okertze faktorea"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch AutoProba"); + LSTR MSG_BLTOUCH_RESET = _UxGT("BLTouch berrabia."); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("BLTouch jaitsi/luzatu"); + LSTR MSG_BLTOUCH_STOW = _UxGT("BLTouch igo/jaso"); + LSTR MSG_HOME_FIRST = _UxGT("Etxera %s%s%s lehenengo"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Konpentsatu"); + LSTR MSG_BABYSTEP_X = _UxGT("Mikro-urratsa X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Mikro-urratsa Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Mikro-urratsa Z"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop deusezta."); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Err: Beroketa"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: Tenperatura"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("TENP. KONTROL EZA"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Err: Tenp Maximoa"); + LSTR MSG_ERR_MINTEMP = _UxGT("Err: Tenp Minimoa"); + LSTR MSG_HALTED = _UxGT("INPRIMA. GELDIRIK"); + LSTR MSG_PLEASE_RESET = _UxGT("Berrabia. Mesedez"); + LSTR MSG_HEATING = _UxGT("Berotzen..."); + LSTR MSG_BED_HEATING = _UxGT("Ohea Berotzen..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibraketa"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibratu X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibratu Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibratu Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibratu Zentrua"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Delta ezarpenak"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Kalibraketa"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta Alt. Ezar."); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Barra diagonala"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Altuera"); + LSTR MSG_DELTA_RADIUS = _UxGT("Erradioa"); + LSTR MSG_INFO_MENU = _UxGT("Inprimagailu Inf."); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Inprimagailu Inf."); + LSTR MSG_3POINT_LEVELING = _UxGT("3 puntuko berdinketa"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Berdinketa lineala"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Berdinketa bilinearra"); + LSTR MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); + LSTR MSG_MESH_LEVELING = _UxGT("Sare berdinketa"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Inprima. estatis."); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Txartelaren Info."); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistoreak"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Estrusoreak"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baudioak"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protokoloa"); + LSTR MSG_CASE_LIGHT = _UxGT("Kabina Argia"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Argiaren Distira"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Inprim. Zenbaketa"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Burututa"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Inprim. denbora"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Imprimatze luzeena"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Estruituta guztira"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Inprim. Zenbaketa"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Burututa"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Inprim. denbora"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Imprimatze luzeena"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Estruituta guztira"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Inprimatze"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Burututa"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Guztira"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Luzeena"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Estrusio"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Inprimatze"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Burututa"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Guztira"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Luzeena"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Estrusio"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Tenp. Minimoa"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Tenp. Maximoa"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Elikadura-iturria"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Driver-aren potentzia"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Idatzi DAC EEPROM"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("HARIZPIA ALDATU"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("HARIZPIA KARGATU"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("HARIZPIA DESKARGATU"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ALDAKETA AUKERAK:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Inprima. jarraitu"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Pita: "); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Hasi. huts egin du"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Neurketak huts egin du"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Tenp. Minimoa"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Tenp. Maximoa"); + LSTR MSG_INFO_PSU = _UxGT("Elikadura-iturria"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Driver-aren potentzia"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Driver %"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Idatzi DAC EEPROM"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("HARIZPIA ALDATU"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("HARIZPIA KARGATU"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("HARIZPIA DESKARGATU"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ALDAKETA AUKERAK:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Inprima. jarraitu"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Pita: "); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Hasi. huts egin du"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Neurketak huts egin du"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Inprimagailu okerra"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Inprimagailu okerra"); // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Mesedez, itxaron...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Deskargatzen...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Sartu eta click egin")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Berotzen...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Kargatzen...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Mesedez, itxaron...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Deskargatzen...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Sartu eta click egin")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Berotzen...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Kargatzen...")); } diff --git a/Marlin/src/lcd/language/language_fi.h b/Marlin/src/lcd/language/language_fi.h index 9954f1dd8aaf..075b5b2744c8 100644 --- a/Marlin/src/lcd/language/language_fi.h +++ b/Marlin/src/lcd/language/language_fi.h @@ -33,98 +33,99 @@ namespace Language_fi { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Finnish"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Finnish"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" valmis."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Kortti asetettu"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Kortti poistettu"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Palaa"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Automaatti"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Vapauta moottorit"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Aja referenssiin"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Aseta origo"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" valmis."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Kortti asetettu"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Kortti poistettu"); + LSTR MSG_MAIN = _UxGT("Palaa"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Automaatti"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Vapauta moottorit"); + LSTR MSG_AUTO_HOME = _UxGT("Aja referenssiin"); + LSTR MSG_SET_ORIGIN = _UxGT("Aseta origo"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Esilämmitä ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Esilämmitä ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Esilä. ") PREHEAT_1_LABEL _UxGT("Suutin"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Esilä. ") PREHEAT_1_LABEL _UxGT("Suutin ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Esilä. ") PREHEAT_1_LABEL _UxGT(" Kaikki"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Esilä. ") PREHEAT_1_LABEL _UxGT(" Alusta"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Esilämm. ") PREHEAT_1_LABEL _UxGT(" konf"); + LSTR MSG_PREHEAT_1 = _UxGT("Esilämmitä ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Esilämmitä ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Esilä. ") PREHEAT_1_LABEL _UxGT("Suutin"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Esilä. ") PREHEAT_1_LABEL _UxGT("Suutin ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Esilä. ") PREHEAT_1_LABEL _UxGT(" Kaikki"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Esilä. ") PREHEAT_1_LABEL _UxGT(" Alusta"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Esilämm. ") PREHEAT_1_LABEL _UxGT(" konf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Esilämmitä $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Esilämmitä $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Esilä. $Suutin"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Esilä. $Suutin ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Esilä. $ Kaikki"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Esilä. $ Alusta"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Esilämm. $ konf"); + LSTR MSG_PREHEAT_M = _UxGT("Esilämmitä $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Esilämmitä $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Esilä. $Suutin"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Esilä. $Suutin ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Esilä. $ Kaikki"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Esilä. $ Alusta"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Esilämm. $ konf"); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Jäähdytä"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Virta päälle"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Virta pois"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Pursota"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Vedä takaisin"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Liikuta akseleita"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Liikuta X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Liikuta Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Liikuta Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extruder"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extruder *"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Liikuta %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Liikuta 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Liikuta 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Liikuta 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Nopeus"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Suutin"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Suutin ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Alusta"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Tuul. nopeus"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Tuul. nopeus ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Virtaus"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Virtaus ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Kontrolli"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Kerr"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Autotemp"); - PROGMEM Language_Str MSG_ACC = _UxGT("Kiihtyv"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VLiike min"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-peruuta"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Lämpötila"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Liike"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD kontrasti"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Tallenna muistiin"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Lataa muistista"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Palauta oletus"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Päivitä"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Seuraa"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Valmistele"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Säädä"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Keskeytä tulostus"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Jatka tulostusta"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Pysäytä tulostus"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Korttivalikko"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Ei korttia"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Nukkumassa..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Odotet. valintaa"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Ei liiketta."); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Vedä mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Va. Vedä mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Vedä V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Z mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Va. Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("AutoVeto."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrointi"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibroi X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibroi Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibroi Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibroi Center"); + LSTR MSG_COOLDOWN = _UxGT("Jäähdytä"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Virta päälle"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Virta pois"); + LSTR MSG_EXTRUDE = _UxGT("Pursota"); + LSTR MSG_RETRACT = _UxGT("Vedä takaisin"); + LSTR MSG_MOVE_AXIS = _UxGT("Liikuta akseleita"); + LSTR MSG_MOVE_X = _UxGT("Liikuta X"); + LSTR MSG_MOVE_Y = _UxGT("Liikuta Y"); + LSTR MSG_MOVE_Z = _UxGT("Liikuta Z"); + LSTR MSG_MOVE_E = _UxGT("Extruder"); + LSTR MSG_MOVE_EN = _UxGT("Extruder *"); + LSTR MSG_MOVE_N_MM = _UxGT("Liikuta %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Liikuta 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Liikuta 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Liikuta 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Liikuta 100mm"); + LSTR MSG_SPEED = _UxGT("Nopeus"); + LSTR MSG_NOZZLE = _UxGT("Suutin"); + LSTR MSG_NOZZLE_N = _UxGT("Suutin ~"); + LSTR MSG_BED = _UxGT("Alusta"); + LSTR MSG_FAN_SPEED = _UxGT("Tuul. nopeus"); + LSTR MSG_FAN_SPEED_N = _UxGT("Tuul. nopeus ~"); + LSTR MSG_FLOW = _UxGT("Virtaus"); + LSTR MSG_FLOW_N = _UxGT("Virtaus ~"); + LSTR MSG_CONTROL = _UxGT("Kontrolli"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Kerr"); + LSTR MSG_AUTOTEMP = _UxGT("Autotemp"); + LSTR MSG_ACC = _UxGT("Kiihtyv"); + LSTR MSG_VTRAV_MIN = _UxGT("VLiike min"); + LSTR MSG_A_RETRACT = _UxGT("A-peruuta"); + LSTR MSG_TEMPERATURE = _UxGT("Lämpötila"); + LSTR MSG_MOTION = _UxGT("Liike"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_CONTRAST = _UxGT("LCD kontrasti"); + LSTR MSG_STORE_EEPROM = _UxGT("Tallenna muistiin"); + LSTR MSG_LOAD_EEPROM = _UxGT("Lataa muistista"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Palauta oletus"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Päivitä"); + LSTR MSG_INFO_SCREEN = _UxGT("Seuraa"); + LSTR MSG_PREPARE = _UxGT("Valmistele"); + LSTR MSG_TUNE = _UxGT("Säädä"); + LSTR MSG_PAUSE_PRINT = _UxGT("Keskeytä tulostus"); + LSTR MSG_RESUME_PRINT = _UxGT("Jatka tulostusta"); + LSTR MSG_STOP_PRINT = _UxGT("Pysäytä tulostus"); + LSTR MSG_MEDIA_MENU = _UxGT("Korttivalikko"); + LSTR MSG_NO_MEDIA = _UxGT("Ei korttia"); + LSTR MSG_DWELL = _UxGT("Nukkumassa..."); + LSTR MSG_USERWAIT = _UxGT("Odotet. valintaa"); + LSTR MSG_NO_MOVE = _UxGT("Ei liiketta."); + LSTR MSG_CONTROL_RETRACT = _UxGT("Vedä mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Va. Vedä mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Vedä V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Z mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Va. Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_AUTORETRACT = _UxGT("AutoVeto."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrointi"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibroi X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibroi Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibroi Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibroi Center"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Väärä tulostin"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Väärä tulostin"); } diff --git a/Marlin/src/lcd/language/language_fr.h b/Marlin/src/lcd/language/language_fr.h index 031db358bd31..a99659bf187d 100644 --- a/Marlin/src/lcd/language/language_fr.h +++ b/Marlin/src/lcd/language/language_fr.h @@ -33,571 +33,625 @@ namespace Language_fr { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Français"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Français"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" prête."); - PROGMEM Language_Str MSG_YES = _UxGT("Oui"); - PROGMEM Language_Str MSG_NO = _UxGT("Non"); - PROGMEM Language_Str MSG_BACK = _UxGT("Retour"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Annulation..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Média inséré"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Média retiré"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Attente média"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Err lecture média"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB débranché"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Erreur média USB"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Butées"); - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Butées SW"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menu principal"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Config. avancée"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Configuration"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Exéc. auto.gcode"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Arrêter moteurs"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu debug"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test barre progress."); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Origine auto"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Origine X auto"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Origine Y auto"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Origine Z auto"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Align. Z auto"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Origine XYZ..."); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Clic pour commencer"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Point suivant"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Mise à niveau OK!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Hauteur lissée"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Régl. décal origine"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Décalages appliqués"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Régler origine"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Assistant Molettes"); - PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Assistant Molettes"); - PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Molette du lit"); // Not a selection of the origin - PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Ecart origine "); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" prête."); + LSTR MSG_YES = _UxGT("Oui"); + LSTR MSG_NO = _UxGT("Non"); + LSTR MSG_BACK = _UxGT("Retour"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Annulation..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Média inséré"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Média retiré"); + LSTR MSG_MEDIA_WAITING = _UxGT("Attente média"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Err lecture média"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB débranché"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Erreur média USB"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Butées"); + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Butées SW"); + LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Config. avancée"); + LSTR MSG_CONFIGURATION = _UxGT("Configuration"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Exéc. auto.gcode"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Arrêter moteurs"); + LSTR MSG_DEBUG_MENU = _UxGT("Menu debug"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test barre progress."); + LSTR MSG_HOMING = _UxGT("Origine"); + LSTR MSG_AUTO_HOME = _UxGT("Origine auto"); + LSTR MSG_AUTO_HOME_X = _UxGT("Origine X auto"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Origine Y auto"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Origine Z auto"); + LSTR MSG_AUTO_HOME_I = _UxGT("Origine ") LCD_STR_I _UxGT(" auto"); + LSTR MSG_AUTO_HOME_J = _UxGT("Origine ") LCD_STR_J _UxGT(" auto"); + LSTR MSG_AUTO_HOME_K = _UxGT("Origine ") LCD_STR_K _UxGT(" auto"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Align. Z auto"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Origine XYZ..."); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Clic pour commencer"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Point suivant"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Mise à niveau OK!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Hauteur lissée"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Régl. décal origine"); + LSTR MSG_HOME_OFFSET_X = _UxGT("Décal. origine X"); + LSTR MSG_HOME_OFFSET_Y = _UxGT("Décal. origine Y"); + LSTR MSG_HOME_OFFSET_Z = _UxGT("Décal. origine Z"); + LSTR MSG_HOME_OFFSET_I = _UxGT("Décal. origine ") LCD_STR_I; + LSTR MSG_HOME_OFFSET_J = _UxGT("Décal. origine ") LCD_STR_J; + LSTR MSG_HOME_OFFSET_K = _UxGT("Décal. origine ") LCD_STR_K; + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Décalages appliqués"); + LSTR MSG_SET_ORIGIN = _UxGT("Régler origine"); + LSTR MSG_TRAMMING_WIZARD = _UxGT("Assistant Molettes"); + LSTR MSG_SELECT_ORIGIN = _UxGT("Molette du lit"); // Not a selection of the origin + LSTR MSG_LAST_VALUE_SP = _UxGT("Ecart origine "); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Préchauffage ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Préchauffage ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Préch. ") PREHEAT_1_LABEL _UxGT(" buse"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Préch. ") PREHEAT_1_LABEL _UxGT(" buse ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Préch. ") PREHEAT_1_LABEL _UxGT(" Tout"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Préch. ") PREHEAT_1_LABEL _UxGT(" lit"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Régler préch. ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1 = _UxGT("Préchauffage ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Préchauffage ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Préch. ") PREHEAT_1_LABEL _UxGT(" buse"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Préch. ") PREHEAT_1_LABEL _UxGT(" buse ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Préch. ") PREHEAT_1_LABEL _UxGT(" Tout"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Préch. ") PREHEAT_1_LABEL _UxGT(" lit"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Régler préch. ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Préchauffage $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Préchauffage $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Préch. $ buse"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Préch. $ buse ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Préch. $ Tout"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Préch. $ lit"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Régler préch. $"); + LSTR MSG_PREHEAT_M = _UxGT("Préchauffage $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Préchauffage $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Préch. $ buse"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Préch. $ buse ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Préch. $ Tout"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Préch. $ lit"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Régler préch. $"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Préchauf. perso"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Refroidir"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Contrôle Laser"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Puissance"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Inverser broches"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Allumer alim."); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Eteindre alim."); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrusion"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Rétractation"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Déplacer un axe"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Régler Niv. lit"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Niveau du lit"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Niveau des coins"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Relever le coin jusqu'à la sonde"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Coins dans la tolérance. Niveau lit "); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Coin suivant"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Modif. maille"); // 13 car. max - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Modifier grille"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Modification arrêtée"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Mesure point"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valeur Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Commandes perso"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Préchauf. perso"); + LSTR MSG_COOLDOWN = _UxGT("Refroidir"); + LSTR MSG_LASER_MENU = _UxGT("Contrôle Laser"); + LSTR MSG_LASER_POWER = _UxGT("Puissance"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Inverser broches"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Allumer alim."); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Eteindre alim."); + LSTR MSG_EXTRUDE = _UxGT("Extrusion"); + LSTR MSG_RETRACT = _UxGT("Rétractation"); + LSTR MSG_MOVE_AXIS = _UxGT("Déplacer un axe"); + LSTR MSG_BED_LEVELING = _UxGT("Régler Niv. lit"); + LSTR MSG_LEVEL_BED = _UxGT("Niveau du lit"); + LSTR MSG_BED_TRAMMING = _UxGT("Niveau des coins"); + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Relever le coin jusqu'à la sonde"); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Coins dans la tolérance. Niveau lit "); + LSTR MSG_NEXT_CORNER = _UxGT("Coin suivant"); + LSTR MSG_MESH_EDITOR = _UxGT("Modif. maille"); // 13 car. max + LSTR MSG_EDIT_MESH = _UxGT("Modifier grille"); + LSTR MSG_EDITING_STOPPED = _UxGT("Modification arrêtée"); + LSTR MSG_PROBING_POINT = _UxGT("Mesure point"); + LSTR MSG_MESH_X = _UxGT("Index X"); + LSTR MSG_MESH_Y = _UxGT("Index Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Valeur Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Commandes perso"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Mesure point"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("Ecart sonde Z M48"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Ecart"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("Point M48"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("Mode IDEX"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplication"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copie miroir"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Contrôle complet"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Offsets Outil"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("Buse 2 X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("Buse 2 Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("Buse 2 Z"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26: Chauffage du lit"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("Buse en chauffe..."); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Amorce manuelle..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Amorce longueur fixe"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Amorce terminée"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 annulé"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Sortie G26"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("G29 en cours"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Outils UBL"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Niveau lit unifié"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Maillage manuel"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Poser câle & mesurer"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Mesure"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("ôter et mesurer lit"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Aller au suivant"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Activer l'UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Désactiver l'UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Température lit"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Température lit"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Température buse"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Température buse"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Modifier grille"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Modif. grille perso"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Réglage fin"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Terminer"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Créer la grille"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Mesure point"); + LSTR MSG_M48_TEST = _UxGT("Ecart sonde Z M48"); + LSTR MSG_M48_DEVIATION = _UxGT("Ecart"); + LSTR MSG_M48_POINT = _UxGT("Point M48"); + LSTR MSG_IDEX_MENU = _UxGT("Mode IDEX"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplication"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copie miroir"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Contrôle complet"); + LSTR MSG_OFFSETS_MENU = _UxGT("Offsets Outil"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("Buse 2 X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("Buse 2 Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("Buse 2 Z"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26: Chauffage du lit"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("Buse en chauffe..."); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Amorce manuelle..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Amorce longueur fixe"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Amorce terminée"); + LSTR MSG_G26_CANCELED = _UxGT("G26 annulé"); + LSTR MSG_G26_LEAVING = _UxGT("Sortie G26"); + LSTR MSG_UBL_DOING_G29 = _UxGT("G29 en cours"); + LSTR MSG_UBL_TOOLS = _UxGT("Outils UBL"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Niveau lit unifié"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Maillage manuel"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Poser câle & mesurer"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Mesure"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("ôter et mesurer lit"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Aller au suivant"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activer l'UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Désactiver l'UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Température lit"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Température lit"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Température buse"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Température buse"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Modifier grille"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Modif. grille perso"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Réglage fin"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Terminer"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Créer la grille"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Créer grille $"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Impr. grille $"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Créer grille $"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Impr. grille $"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Créer grille ..."); - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Mesure à froid"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Ajuster haut. couche"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Hauteur (x0.1mm)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Vérifier grille"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Impr. grille ..."); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Continuer grille"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Niveau par mailles"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Niveau à 3 points"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Niveau par grille"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Effectuer mesures"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Points latéraux"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Type de carte"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Exporter grille"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Export pour hôte"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Export en CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Export sauvegarde"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Infos debug UBL"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Nombre de points"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Remplissage manuel"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Remplissage auto"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Remplissage grille"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Tout effacer"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Effacer le + près"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Réglage fin (tous)"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Réglage fin + près"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Stockage grille"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Slot mémoire"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Charger la grille"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Stocker la grille"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Grille %i chargée"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Grille %i enreg."); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Pas de mémoire"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Err: Enreg. UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Err: Ouvrir UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Décal. Z arrêté"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Assistant UBL"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Mesure à froid"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Compléter auto."); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Vérifier grille"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Réglage fin"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Vérifier grille"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Réglage fin"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Stocker grille"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Créer grille ..."); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Mesure à froid"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Ajuster haut. couche"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Hauteur (x0.1mm)"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Vérifier grille"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Impr. grille ..."); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Continuer grille"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Niveau par mailles"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Niveau à 3 points"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Niveau par grille"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Effectuer mesures"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Points latéraux"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Type de carte"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Exporter grille"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Export pour hôte"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Export en CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Export sauvegarde"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Infos debug UBL"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Nombre de points"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Remplissage manuel"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Remplissage auto"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Remplissage grille"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Tout effacer"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Effacer le + près"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Réglage fin (tous)"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Réglage fin + près"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Stockage grille"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Slot mémoire"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Charger la grille"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Stocker la grille"); + LSTR MSG_MESH_LOADED = _UxGT("Grille %i chargée"); + LSTR MSG_MESH_SAVED = _UxGT("Grille %i enreg."); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Pas de mémoire"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Err: Enreg. UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Err: Ouvrir UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Décal. Z arrêté"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Assistant UBL"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Mesure à froid"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Compléter auto."); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Vérifier grille"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Réglage fin"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Vérifier grille"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Réglage fin"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Stocker grille"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Contrôle LED"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Lumière"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Préregl. LED"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Rouge"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Orange"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Jaune"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Vert"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Bleu"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Violet"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Blanc"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Defaut"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("LEDs perso."); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Intensité rouge"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Intensité vert"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Intensité bleu"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Intensité blanc"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Luminosité"); + LSTR MSG_LED_CONTROL = _UxGT("Contrôle LED"); + LSTR MSG_LEDS = _UxGT("Lumière"); + LSTR MSG_LED_PRESETS = _UxGT("Préregl. LED"); + LSTR MSG_SET_LEDS_RED = _UxGT("Rouge"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Jaune"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Vert"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Bleu"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violet"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Blanc"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Defaut"); + LSTR MSG_CUSTOM_LEDS = _UxGT("LEDs perso."); + LSTR MSG_INTENSITY_R = _UxGT("Intensité rouge"); + LSTR MSG_INTENSITY_G = _UxGT("Intensité vert"); + LSTR MSG_INTENSITY_B = _UxGT("Intensité bleu"); + LSTR MSG_INTENSITY_W = _UxGT("Intensité blanc"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Luminosité"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Déplacement..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Débloquer XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Déplacer X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Déplacer Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Déplacer Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extrudeur"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extrudeur *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Buse trop froide"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Déplacer %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Déplacer 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Déplacer 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Déplacer 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Vitesse"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Lit Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Buse"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Buse ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Lit"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Caisson"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Vit. ventil. "); // 15 car. max - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Vit. ventil. ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Vit. enreg. ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra ventil. "); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra ventil. ~"); + LSTR MSG_MOVING = _UxGT("Déplacement..."); + LSTR MSG_FREE_XY = _UxGT("Débloquer XY"); + LSTR MSG_MOVE_X = _UxGT("Déplacer X"); + LSTR MSG_MOVE_Y = _UxGT("Déplacer Y"); + LSTR MSG_MOVE_Z = _UxGT("Déplacer Z"); + LSTR MSG_MOVE_I = _UxGT("Déplacer ") LCD_STR_I; + LSTR MSG_MOVE_J = _UxGT("Déplacer ") LCD_STR_J; + LSTR MSG_MOVE_K = _UxGT("Déplacer ") LCD_STR_K; + LSTR MSG_MOVE_E = _UxGT("Extruder"); + LSTR MSG_MOVE_EN = _UxGT("Extruder *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Buse trop froide"); + LSTR MSG_MOVE_N_MM = _UxGT("Déplacer %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Déplacer 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Déplacer 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Déplacer 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Déplacer 100mm"); + LSTR MSG_MOVE_0001IN = _UxGT("Déplacer 0.001\""); + LSTR MSG_MOVE_001IN = _UxGT("Déplacer 0.01\""); + LSTR MSG_MOVE_01IN = _UxGT("Déplacer 0.1\""); + LSTR MSG_MOVE_1IN = _UxGT("Déplacer 1\""); + LSTR MSG_SPEED = _UxGT("Vitesse"); + LSTR MSG_BED_Z = _UxGT("Lit Z"); + LSTR MSG_NOZZLE = _UxGT("Buse"); + LSTR MSG_NOZZLE_N = _UxGT("Buse ~"); + LSTR MSG_BED = _UxGT("Lit"); + LSTR MSG_CHAMBER = _UxGT("Caisson"); + LSTR MSG_FAN_SPEED = _UxGT("Vit. ventil. "); // 15 car. max + LSTR MSG_FAN_SPEED_N = _UxGT("Vit. ventil. ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Vit. enreg. ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Extra ventil. "); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra ventil. ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Flux"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flux ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Contrôler"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Facteur"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Temp. Auto."); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Marche"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Arrêt"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("Tuning PID terminé"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Echec Autotune! E incorrect"); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Echec Autotune! Temp. trop haute"); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Echec Autotune! Opér. expirée"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Sélectionner"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Sélectionner *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Accélération"); - PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT(" jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT(" jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT(" jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve jerk"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Vélocité"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Déviat. jonct."); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vmin course"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Accélération"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Acc.rétraction"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Acc.course"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Fréquence max"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Vitesse min"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Pas/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" pas/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" pas/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" pas/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E pas/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* pas/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Température"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Mouvement"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E en mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("Limite en mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("Limite *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Diamètre fil."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Diamètre fil. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Retrait mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Charger mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Avance K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Avance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Contraste LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Enregistrer config."); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Charger config."); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Restaurer défauts"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Initialiser EEPROM"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Config. enregistrée"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("MaJ Firmware SD"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("RaZ imprimante"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Actualiser"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Surveiller"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Préparer"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Régler"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Démarrer impression"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Suivant"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Init."); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Stop"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Imprimer"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("Ignorer"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Annuler"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Terminé"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Retour"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Procéder"); - PROGMEM Language_Str MSG_BUTTON_SKIP = _UxGT("Passer"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("Mise en pause..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pause impression"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Reprendre impr."); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Arrêter impr."); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Impression objet"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Annuler objet"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Annuler objet ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Récup. coup."); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Impression SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Pas de média"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Repos..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Attente utilis."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Impr. en pause"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Impression"); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Impr. annulée"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Moteurs bloqués"); - PROGMEM Language_Str MSG_KILLED = _UxGT("KILLED"); - PROGMEM Language_Str MSG_STOPPED = _UxGT("STOPPÉ"); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Rétractation mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Ech. rétr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Vit. rétract°"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Saut Z mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Rét.reprise mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Ech.reprise mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("V.rét. reprise"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("V.éch. reprise"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Rétraction auto"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Changement outil"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Augmenter Z"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Vitesse primaire"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vitesse rétract°"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Garer Extrudeur"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Vitesse reprise"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Vit. ventil."); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Temps ventil."); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto ON"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto OFF"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Migration d'outil"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Migration auto"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Extrudeur Final"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrer vers *"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Attente buse"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Longueur retrait"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Longueur Extra"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Longueur de purge"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Changer filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Changer filament *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Charger filament"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Charger filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Retrait filament"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Retrait filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Retirer tout"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Charger le média"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Actualiser média"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Retirer le média"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sonde Z hors lit"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Facteur écart"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Self-Test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Ranger"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Déployer"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("Mode SW"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("Mode 5V"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("Mode OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Appliquer Mode"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Mise en 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Mise en OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Afficher Mode"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Init. TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Test décalage Z"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Sauvegarde"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Déployer TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Déployer Sonde Z"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Ranger Sonde Z"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Origine %s%s%s Premier"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Position sonde Z"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Décalage X"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Décalage Y"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Décalage Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Total"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Butée abandon"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Err de chauffe"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Err TEMP. REDONDANTE"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("Err THERMIQUE"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err TEMP. MAX"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err TEMP. MIN"); + LSTR MSG_FLOW = _UxGT("Flux"); + LSTR MSG_FLOW_N = _UxGT("Flux ~"); + LSTR MSG_CONTROL = _UxGT("Contrôler"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Facteur"); + LSTR MSG_AUTOTEMP = _UxGT("Temp. Auto."); + LSTR MSG_LCD_ON = _UxGT("Marche"); + LSTR MSG_LCD_OFF = _UxGT("Arrêt"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Tuning PID terminé"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Echec Autotune! E incorrect"); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Echec Autotune! Temp. trop haute"); + LSTR MSG_PID_TIMEOUT = _UxGT("Echec Autotune! Opér. expirée"); + LSTR MSG_SELECT = _UxGT("Sélectionner"); + LSTR MSG_SELECT_E = _UxGT("Sélectionner *"); + LSTR MSG_ACC = _UxGT("Accélération"); + LSTR MSG_JERK = _UxGT("Jerk"); + LSTR MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT(" jerk"); + LSTR MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT(" jerk"); + LSTR MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT(" jerk"); + LSTR MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT(" jerk"); + LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT(" jerk"); + LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT(" jerk"); + LSTR MSG_VE_JERK = _UxGT("Ve jerk"); + LSTR MSG_VELOCITY = _UxGT("Vélocité"); + LSTR MSG_VMAX_A = _UxGT("Vit. Max ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("Vit. Max ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Vit. Max ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Vit. Max ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Vit. Max ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Vit. Max ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Vit. Max ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Vit. Max *"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Déviat. jonct."); + LSTR MSG_VMIN = _UxGT("Vit. Min"); + LSTR MSG_VTRAV_MIN = _UxGT("Vmin course"); + LSTR MSG_ACCELERATION = _UxGT("Accélération"); + LSTR MSG_AMAX_A = _UxGT("Max Accél. ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Max Accél. ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Max Accél. ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Max Accél. ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Max Accél. ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Max Accél. ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Max Accél. ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Max Accél. *"); + LSTR MSG_A_RETRACT = _UxGT("Acc.rétraction"); + LSTR MSG_A_TRAVEL = _UxGT("Acc.course"); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Fréquence max"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Vitesse min"); + LSTR MSG_STEPS_PER_MM = _UxGT("Pas/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" pas/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" pas/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" pas/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" pas/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" pas/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" pas/mm"); + LSTR MSG_E_STEPS = _UxGT("E pas/mm"); + LSTR MSG_EN_STEPS = _UxGT("* pas/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Température"); + LSTR MSG_MOTION = _UxGT("Mouvement"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E en mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("Limite en mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("Limite *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Diamètre fil."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Diamètre fil. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Retrait mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Charger mm"); + LSTR MSG_ADVANCE_K = _UxGT("Avance K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Avance K *"); + LSTR MSG_BRIGHTNESS = _UxGT("Luminosité LCD"); + LSTR MSG_CONTRAST = _UxGT("Contraste LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Enregistrer config."); + LSTR MSG_LOAD_EEPROM = _UxGT("Charger config."); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restaurer défauts"); + LSTR MSG_INIT_EEPROM = _UxGT("Initialiser EEPROM"); + LSTR MSG_SETTINGS_STORED = _UxGT("Config. enregistrée"); + LSTR MSG_MEDIA_UPDATE = _UxGT("MaJ Firmware SD"); + LSTR MSG_RESET_PRINTER = _UxGT("RaZ imprimante"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Actualiser"); + LSTR MSG_INFO_SCREEN = _UxGT("Surveiller"); + LSTR MSG_PREPARE = _UxGT("Préparer"); + LSTR MSG_TUNE = _UxGT("Régler"); + LSTR MSG_START_PRINT = _UxGT("Démarrer impression"); + LSTR MSG_BUTTON_NEXT = _UxGT("Suivant"); + LSTR MSG_BUTTON_INIT = _UxGT("Init."); + LSTR MSG_BUTTON_STOP = _UxGT("Stop"); + LSTR MSG_BUTTON_PRINT = _UxGT("Imprimer"); + LSTR MSG_BUTTON_RESET = _UxGT("Reset"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Ignorer"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Annuler"); + LSTR MSG_BUTTON_DONE = _UxGT("Terminé"); + LSTR MSG_BUTTON_BACK = _UxGT("Retour"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Procéder"); + LSTR MSG_BUTTON_SKIP = _UxGT("Passer"); + LSTR MSG_PAUSING = _UxGT("Mise en pause..."); + LSTR MSG_PAUSE_PRINT = _UxGT("Pause impression"); + LSTR MSG_RESUME_PRINT = _UxGT("Reprendre impr."); + LSTR MSG_STOP_PRINT = _UxGT("Arrêter impr."); + LSTR MSG_PRINTING_OBJECT = _UxGT("Impression objet"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Annuler objet"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Annuler objet ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Récup. coup."); + LSTR MSG_MEDIA_MENU = _UxGT("Impression SD"); + LSTR MSG_NO_MEDIA = _UxGT("Pas de média"); + LSTR MSG_DWELL = _UxGT("Repos..."); + LSTR MSG_USERWAIT = _UxGT("Attente utilis."); + LSTR MSG_PRINT_PAUSED = _UxGT("Impr. en pause"); + LSTR MSG_PRINTING = _UxGT("Impression"); + LSTR MSG_PRINT_ABORTED = _UxGT("Impr. annulée"); + LSTR MSG_NO_MOVE = _UxGT("Moteurs bloqués"); + LSTR MSG_KILLED = _UxGT("KILLED"); + LSTR MSG_STOPPED = _UxGT("STOPPÉ"); + LSTR MSG_CONTROL_RETRACT = _UxGT("Rétractation mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Ech. rétr. mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Vit. rétract°"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Saut Z mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Rét.reprise mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Ech.reprise mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("V.rét. reprise"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("V.éch. reprise"); + LSTR MSG_AUTORETRACT = _UxGT("Rétraction auto"); + LSTR MSG_TOOL_CHANGE = _UxGT("Changement outil"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Augmenter Z"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Vitesse primaire"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vitesse rétract°"); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Garer Extrudeur"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Vitesse reprise"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Vit. ventil."); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Temps ventil."); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto ON"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Auto OFF"); + LSTR MSG_TOOL_MIGRATION = _UxGT("Migration d'outil"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Migration auto"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Extrudeur Final"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrer vers *"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Attente buse"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Longueur retrait"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Longueur Extra"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Longueur de purge"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Changer filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Changer filament *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Charger filament"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Charger filament *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Retrait filament"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Retrait filament *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Retirer tout"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Charger le média"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Actualiser média"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Retirer le média"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sonde Z hors lit"); + LSTR MSG_SKEW_FACTOR = _UxGT("Facteur écart"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Self-Test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reset"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Ranger"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Déployer"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("Mode SW"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("Mode 5V"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("Mode OD"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Appliquer Mode"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Mise en 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Mise en OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Afficher Mode"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Init. TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Test décalage Z"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Sauvegarde"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Déployer TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Déployer Sonde Z"); + LSTR MSG_MANUAL_STOW = _UxGT("Ranger Sonde Z"); + LSTR MSG_HOME_FIRST = _UxGT("Origine %s%s%s Premier"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Position sonde Z"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Décalage X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Décalage Y"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Décalage Z"); + LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); + LSTR MSG_BABYSTEP_I = _UxGT("Babystep ") LCD_STR_I; + LSTR MSG_BABYSTEP_J = _UxGT("Babystep ") LCD_STR_J; + LSTR MSG_BABYSTEP_K = _UxGT("Babystep ") LCD_STR_K; + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Butée abandon"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Err de chauffe"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err TEMP. REDONDANTE"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("Err THERMIQUE"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Err TEMP. MAX"); + LSTR MSG_ERR_MINTEMP = _UxGT("Err TEMP. MIN"); - PROGMEM Language_Str MSG_HALTED = _UxGT("IMPR. STOPPÉE"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Redémarrer SVP"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("j"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only + LSTR MSG_HALTED = _UxGT("IMPR. STOPPÉE"); + LSTR MSG_PLEASE_RESET = _UxGT("Redémarrer SVP"); + LSTR MSG_SHORT_DAY = _UxGT("j"); // One character only + LSTR MSG_SHORT_HOUR = _UxGT("h"); // One character only + LSTR MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("en chauffe..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Refroidissement"); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Lit en chauffe..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Refroid. du lit..."); - PROGMEM Language_Str MSG_PROBE_HEATING = _UxGT("Probe en chauffe..."); - PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Refroid. Probe..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Chauffe caisson..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Refroid. caisson..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Calibration Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibrer X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrer Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrer Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrer centre"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Réglages Delta"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Calibration Auto"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Hauteur Delta"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Delta Z sonde"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diagonale"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Hauteur"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Rayon"); + LSTR MSG_HEATING = _UxGT("en chauffe..."); + LSTR MSG_COOLING = _UxGT("Refroidissement"); + LSTR MSG_BED_HEATING = _UxGT("Lit en chauffe..."); + LSTR MSG_BED_COOLING = _UxGT("Refroid. du lit..."); + LSTR MSG_PROBE_HEATING = _UxGT("Probe en chauffe..."); + LSTR MSG_PROBE_COOLING = _UxGT("Refroid. Probe..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Chauffe caisson..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Refroid. caisson..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Calibration Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrer X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrer Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrer Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrer centre"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Réglages Delta"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Calibration Auto"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Hauteur Delta"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Delta Z sonde"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Diagonale"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Hauteur"); + LSTR MSG_DELTA_RADIUS = _UxGT("Rayon"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Infos imprimante"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Infos imprimante"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("Niveau à 3 points"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Niveau linéaire"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Niveau bilinéaire"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Niveau lit unifié"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Niveau par grille"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Stats. imprimante"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Infos carte"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistances"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extrudeurs"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Bauds"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protocole"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Protection inactive"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Protection active"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend Idle Timeout"); + LSTR MSG_INFO_MENU = _UxGT("Infos imprimante"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Infos imprimante"); + LSTR MSG_3POINT_LEVELING = _UxGT("Niveau à 3 points"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Niveau linéaire"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Niveau bilinéaire"); + LSTR MSG_UBL_LEVELING = _UxGT("Niveau lit unifié"); + LSTR MSG_MESH_LEVELING = _UxGT("Niveau par grille"); + LSTR MSG_MESH_DONE = _UxGT("Niveau terminé"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Stats. imprimante"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Infos carte"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Thermistances"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrudeurs"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Bauds"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protocole"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Protection inactive"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Protection active"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend Idle Timeout"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Lumière caisson"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Luminosité"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Imprimante incorrecte"); + LSTR MSG_CASE_LIGHT = _UxGT("Lumière caisson"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Luminosité"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Imprimante incorrecte"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Nbre impressions"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Terminées"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Tps impr. total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Impr. la + longue"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Total filament"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Nbre impressions"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Terminées"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Tps impr. total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Impr. la + longue"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Total filament"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Impressions"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Terminées"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("+ long"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Filament"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Impressions"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Terminées"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("+ long"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Filament"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Temp Min"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp Max"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Alim."); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Puiss. moteur "); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM sauv."); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ERREUR CONNEXION TMC"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Temp Min"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Temp Max"); + LSTR MSG_INFO_PSU = _UxGT("Alim."); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Puiss. moteur "); + LSTR MSG_DAC_PERCENT_A = _UxGT("Driver ") LCD_STR_A _UxGT(" %"); + LSTR MSG_DAC_PERCENT_B = _UxGT("Driver ") LCD_STR_B _UxGT(" %"); + LSTR MSG_DAC_PERCENT_C = _UxGT("Driver ") LCD_STR_C _UxGT(" %"); + LSTR MSG_DAC_PERCENT_I = _UxGT("Driver ") LCD_STR_I _UxGT(" %"); + LSTR MSG_DAC_PERCENT_J = _UxGT("Driver ") LCD_STR_J _UxGT(" %"); + LSTR MSG_DAC_PERCENT_K = _UxGT("Driver ") LCD_STR_K _UxGT(" %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("Driver E %"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM sauv."); + LSTR MSG_ERROR_TMC = _UxGT("ERREUR CONNEXION TMC"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("CHANGER FILAMENT"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("IMPR. PAUSE"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CHARGER FIL"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("DECHARGER FIL"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPTIONS REPRISE:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purger encore"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Reprendre impr."); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Buse: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Capteur fil."); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Echec origine"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Echec sonde"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("CHANGER FILAMENT"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("IMPR. PAUSE"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CHARGER FIL"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("DECHARGER FIL"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPTIONS REPRISE:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purger encore"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Reprendre impr."); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Buse: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Capteur fil."); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Echec origine"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Echec sonde"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("MAJ firmware MMU!!"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("CHOISIR FILAMENT"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU ne répond plus"); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Continuer Imp. MMU"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Reprise MMU..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Charge dans MMU"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Charger tous dans MMU"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Charger dans buse"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Ejecter fil. du MMU"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Ejecter fil. ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Retrait filament"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Chargem. fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Ejection fil..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Retrait fil...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Tous"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Réinit. MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("Réinit. MMU..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Retrait, click"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("MAJ firmware MMU!!"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("CHOISIR FILAMENT"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU ne répond plus"); + LSTR MSG_MMU2_RESUME = _UxGT("Continuer Imp. MMU"); + LSTR MSG_MMU2_RESUMING = _UxGT("Reprise MMU..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Charge dans MMU"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Charger tous dans MMU"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Charger dans buse"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Ejecter fil. du MMU"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Ejecter fil. ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Retrait filament"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Chargem. fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Ejection fil..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Retrait fil...."); + LSTR MSG_MMU2_ALL = _UxGT("Tous"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); + LSTR MSG_MMU2_RESET = _UxGT("Réinit. MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("Réinit. MMU..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Retrait, click"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Composante ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Mixeur"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Dégradé"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Dégradé complet"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Toggle mix"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Cycle mix"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Mix dégradé"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Inverser dégradé"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Active V-tool"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Début V-tool"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" Fin V-tool"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Réinit. V-tools"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Valider Mix V-tool"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-tools réinit. ok"); - PROGMEM Language_Str MSG_START_Z = _UxGT("Début Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" Fin Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Jeux"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Casse-briques"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Labyrinthe"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Composante ="); + LSTR MSG_MIXER = _UxGT("Mixeur"); + LSTR MSG_GRADIENT = _UxGT("Dégradé"); + LSTR MSG_FULL_GRADIENT = _UxGT("Dégradé complet"); + LSTR MSG_TOGGLE_MIX = _UxGT("Toggle mix"); + LSTR MSG_CYCLE_MIX = _UxGT("Cycle mix"); + LSTR MSG_GRADIENT_MIX = _UxGT("Mix dégradé"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Inverser dégradé"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Active V-tool"); + LSTR MSG_START_VTOOL = _UxGT("Début V-tool"); + LSTR MSG_END_VTOOL = _UxGT(" Fin V-tool"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); + LSTR MSG_RESET_VTOOLS = _UxGT("Réinit. V-tools"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Valider Mix V-tool"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-tools réinit. ok"); + LSTR MSG_START_Z = _UxGT("Début Z:"); + LSTR MSG_END_Z = _UxGT(" Fin Z:"); + LSTR MSG_GAMES = _UxGT("Jeux"); + LSTR MSG_BRICKOUT = _UxGT("Casse-briques"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Labyrinthe"); - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("Erreur index page"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Erreur vitesse page"); + LSTR MSG_BAD_PAGE = _UxGT("Erreur index page"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Erreur vitesse page"); #if LCD_HEIGHT >= 4 // Up to 3 lines allowed - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Presser bouton", "pour reprendre")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parking...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("Attente filament", "pour démarrer")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Insérer filament", "et app. bouton", "pour continuer...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Presser le bouton", "pour chauffer...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Buse en chauffe", "Patienter SVP...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Attente", "retrait du filament")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Attente", "chargement filament")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Attente", "Purge filament")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Presser pour finir", "la purge du filament")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Attente reprise", "impression")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Presser bouton", "pour reprendre")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parking...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("Attente filament", "pour démarrer")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Insérer filament", "et app. bouton", "pour continuer...")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Presser le bouton", "pour chauffer...")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Buse en chauffe", "Patienter SVP...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Attente", "retrait du filament")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Attente", "chargement filament")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Attente", "Purge filament")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Presser pour finir", "la purge du filament")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Attente reprise", "impression")); #else // LCD_HEIGHT < 4 // Up to 2 lines allowed - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Clic pour continuer")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Patience...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insérer fil.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Chauffer ?")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Chauffage...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Retrait fil...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Chargement...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purge...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Terminer ?")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Reprise...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Clic pour continuer")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Patience...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insérer fil.")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Chauffer ?")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Chauffage...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Retrait fil...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Chargement...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purge...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Terminer ?")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Reprise...")); #endif // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Courant driver"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Seuil hybride"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Home sans capteur"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Mode pas à pas"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop activé"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Réinit."); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" dans:"); - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Correction"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Lissage"); + LSTR MSG_TMC_CURRENT = _UxGT("Courant driver"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Seuil hybride"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Home sans capteur"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Mode pas à pas"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop activé"); + LSTR MSG_SERVICE_RESET = _UxGT("Réinit."); + LSTR MSG_SERVICE_IN = _UxGT(" dans:"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Correction"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Lissage"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Niveau axe X"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Etalon. auto."); + LSTR MSG_LEVEL_X_AXIS = _UxGT("Niveau axe X"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Etalon. auto."); #if ENABLED(TOUCH_UI_FTDI_EVE) - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("En protection, temp. réduite. Ok pour rechauffer et continuer."); + LSTR MSG_HEATER_TIMEOUT = _UxGT("En protection, temp. réduite. Ok pour rechauffer et continuer."); #else - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("En protection"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("En protection"); #endif - PROGMEM Language_Str MSG_REHEAT = _UxGT("Chauffer"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Réchauffe..."); + LSTR MSG_REHEAT = _UxGT("Chauffer"); + LSTR MSG_REHEATING = _UxGT("Réchauffe..."); - PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Assistant Sonde Z"); - PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Mesure référence"); - PROGMEM Language_Str MSG_PROBE_WIZARD_MOVING = _UxGT("Dépl. vers pos"); + LSTR MSG_PROBE_WIZARD = _UxGT("Assistant Sonde Z"); + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Mesure référence"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Dépl. vers pos"); - PROGMEM Language_Str MSG_SOUND = _UxGT("Sons"); + LSTR MSG_SOUND = _UxGT("Sons"); - PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Coin haut gauche"); - PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Coin bas gauche"); - PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Coin haut droit"); - PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Coin bas droit"); - PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Calibration terminée"); - PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Échec de l'étalonnage"); + LSTR MSG_TOP_LEFT = _UxGT("Coin haut gauche"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Coin bas gauche"); + LSTR MSG_TOP_RIGHT = _UxGT("Coin haut droit"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Coin bas droit"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Calibration terminée"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Échec de l'étalonnage"); + + LSTR MSG_SD_CARD = _UxGT("Carte SD"); + LSTR MSG_USB_DISK = _UxGT("Clé USB"); } diff --git a/Marlin/src/lcd/language/language_gl.h b/Marlin/src/lcd/language/language_gl.h index d0ec16b35f82..ad85ac9b48c9 100644 --- a/Marlin/src/lcd/language/language_gl.h +++ b/Marlin/src/lcd/language/language_gl.h @@ -33,571 +33,580 @@ namespace Language_gl { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 1; - PROGMEM Language_Str LANGUAGE = _UxGT("Galician"); + constexpr uint8_t CHARSIZE = 1; + LSTR LANGUAGE = _UxGT("Galician"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" lista."); - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("SI"); - PROGMEM Language_Str MSG_NO = _UxGT("NON"); - PROGMEM Language_Str MSG_BACK = _UxGT("Atrás"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Cancelando..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Tarxeta inserida"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Tarxeta retirada"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Agardando ao SD/USB"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Erro lectura SD/USB"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("Disp. USB retirado"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Inicio USB fallido"); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Desbord. Subch."); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("FinCarro"); - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("FinCarro SW"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menú principal"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Axustes avanzados"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Configuración"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autoarranque"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Apagar motores"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menú depuración"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test barra progreso"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Ir a orixe"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Ir orixe X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Ir orixe Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Ir orixe Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Autoaliñar Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Ir orixes XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Prema pulsador"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Seguinte punto"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Fin Nivelación!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Compensación Altura"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Axustar Desfases"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Desfases aplicados"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Fixar orixe"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" lista."); + LSTR MSG_YES = _UxGT("SI"); + LSTR MSG_NO = _UxGT("NON"); + LSTR MSG_BACK = _UxGT("Atrás"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Cancelando..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Tarxeta inserida"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Tarxeta retirada"); + LSTR MSG_MEDIA_WAITING = _UxGT("Agardando ao SD/USB"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Erro lectura SD/USB"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("Disp. USB retirado"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Inicio USB fallido"); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Desbord. Subch."); + LSTR MSG_LCD_ENDSTOPS = _UxGT("FinCarro"); + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("FinCarro SW"); + LSTR MSG_MAIN = _UxGT("Menú principal"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Axustes avanzados"); + LSTR MSG_CONFIGURATION = _UxGT("Configuración"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Autoarranque"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Apagar motores"); + LSTR MSG_DEBUG_MENU = _UxGT("Menú depuración"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test barra progreso"); + LSTR MSG_AUTO_HOME = _UxGT("Ir a orixe"); + LSTR MSG_AUTO_HOME_X = _UxGT("Ir orixe X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Ir orixe Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Ir orixe Z"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Autoaliñar Z"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Ir orixes XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Prema pulsador"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Seguinte punto"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Fin Nivelación!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Compensación Altura"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Axustar Desfases"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Desfases aplicados"); + LSTR MSG_SET_ORIGIN = _UxGT("Fixar orixe"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Prequentar ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Prequentar ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" Bico"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" Bico ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" Todo"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" Cama"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" conf"); + LSTR MSG_PREHEAT_1 = _UxGT("Prequentar ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Prequentar ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" Bico"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" Bico ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" Todo"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" Cama"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Preque. ") PREHEAT_1_LABEL _UxGT(" conf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Prequentar $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Prequentar $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Preque. $ Bico"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Preque. $ Bico ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Preque. $ Todo"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Preque. $ Cama"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Preque. $ conf"); + LSTR MSG_PREHEAT_M = _UxGT("Prequentar $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Prequentar $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Preque. $ Bico"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Preque. $ Bico ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Preque. $ Todo"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Preque. $ Cama"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Preque. $ conf"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Preque. Personali."); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Arrefriar"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frecuencia"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Control Láser"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Potencia Láser"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Control Fuso"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Potencia Fuso"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Inverter xiro"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Acender"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Apagar"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extruír"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Retraer"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mover eixe"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelando Cama"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivelar Cama"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Nivelar Cantos"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Seguinte Canto"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mallado"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Mallado"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Ed. Mallado Detida"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Punto de Proba"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Índice X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Índice Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valor Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Comandos Personaliz."); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probar Sonda"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Punto"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Desviación"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("Modo IDEX"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Ferramentas Compens"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Estacionar"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicación"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copia Espello"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Control Total"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2º Bico X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2º Bico Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2º Bico Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Executando G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Ferramentas UBL"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Punto de inclinación"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Facer Malla Manual"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Colocar Calzo e Medir"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Medir"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Quitar e Medir Cama"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Mover ao Seguinte"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Activar UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Desactivar UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Temp Cama"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp Cama"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp Bico"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp Bico"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Editar Malla"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit. Malla Person."); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Axuste Fino da Malla"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Fin Edición da Malla"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Crear Malla Person."); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Crear Malla"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Preque. Personali."); + LSTR MSG_COOLDOWN = _UxGT("Arrefriar"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frecuencia"); + LSTR MSG_LASER_MENU = _UxGT("Control Láser"); + LSTR MSG_LASER_POWER = _UxGT("Potencia Láser"); + LSTR MSG_SPINDLE_MENU = _UxGT("Control Fuso"); + LSTR MSG_SPINDLE_POWER = _UxGT("Potencia Fuso"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Inverter xiro"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Acender"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Apagar"); + LSTR MSG_EXTRUDE = _UxGT("Extruír"); + LSTR MSG_RETRACT = _UxGT("Retraer"); + LSTR MSG_MOVE_AXIS = _UxGT("Mover eixe"); + LSTR MSG_BED_LEVELING = _UxGT("Nivelando Cama"); + LSTR MSG_LEVEL_BED = _UxGT("Nivelar Cama"); + LSTR MSG_BED_TRAMMING = _UxGT("Nivelar Cantos"); + LSTR MSG_NEXT_CORNER = _UxGT("Seguinte Canto"); + LSTR MSG_MESH_EDITOR = _UxGT("Editor Mallado"); + LSTR MSG_EDIT_MESH = _UxGT("Editar Mallado"); + LSTR MSG_EDITING_STOPPED = _UxGT("Ed. Mallado Detida"); + LSTR MSG_PROBING_POINT = _UxGT("Punto de Proba"); + LSTR MSG_MESH_X = _UxGT("Índice X"); + LSTR MSG_MESH_Y = _UxGT("Índice Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Valor Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Comandos Personaliz."); + LSTR MSG_M48_TEST = _UxGT("M48 Probar Sonda"); + LSTR MSG_M48_POINT = _UxGT("M48 Punto"); + LSTR MSG_M48_DEVIATION = _UxGT("Desviación"); + LSTR MSG_IDEX_MENU = _UxGT("Modo IDEX"); + LSTR MSG_OFFSETS_MENU = _UxGT("Ferramentas Compens"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Estacionar"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicación"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copia Espello"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Control Total"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2º Bico X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2º Bico Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2º Bico Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Executando G29"); + LSTR MSG_UBL_TOOLS = _UxGT("Ferramentas UBL"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Punto de inclinación"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Facer Malla Manual"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Colocar Calzo e Medir"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Medir"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Quitar e Medir Cama"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Mover ao Seguinte"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activar UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Desactivar UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp Cama"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp Cama"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp Bico"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp Bico"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Editar Malla"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit. Malla Person."); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Axuste Fino da Malla"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Fin Edición da Malla"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Crear Malla Person."); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Crear Malla"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Crear Malla ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Validar Malla ($)"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Crear Malla ($)"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Validar Malla ($)"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Crear Malla Fría"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Axustar Altura Malla"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Altura"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validar Malla"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validar Malla perso."); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Quentando Cama"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Quentando Bico"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Traballo manual..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Traballo Lonxit Fixa"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Fin Traballo"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Cancelado"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Saíndo de G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Continuar Malla"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Nivelación Malla"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Nivelación 3Puntos"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Nivelación Grid"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Nivelar Malla"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Puntos Laterais"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Tipo de Mapa "); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Gardar Mapa"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Enviar ao Host"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Gardar en CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Backup Externo"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Info do UBL"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Cantidade de Recheo"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Recheo Manual"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Recheo Intelixente"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Recheo da Malla"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidar todo"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidar cercanos"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Axustar Fino Todo"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Axustar Fino Cerc"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Almacenamento Malla"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Rañura Memoria"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Cargar Malla Cama"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Gardar Malla Cama"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Malla %i Cargada"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Malla %i Gardada"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Sen Gardar"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Erro: Gardadado UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Erro: Recuperación UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Desfase de Z: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Desfase de Z Detido"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL Paso a Paso"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Crear Malla Fría"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. Recheo Intelixente"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Validar Malla"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Axustar Fino Todo"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Validar Malla"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Axustar Fino Todo"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. Gardar Malla Cama"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Crear Malla Fría"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Axustar Altura Malla"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Altura"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validar Malla"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validar Malla perso."); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 Quentando Cama"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Quentando Bico"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Traballo manual..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Traballo Lonxit Fixa"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Fin Traballo"); + LSTR MSG_G26_CANCELED = _UxGT("G26 Cancelado"); + LSTR MSG_G26_LEAVING = _UxGT("Saíndo de G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Continuar Malla"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Nivelación Malla"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Nivelación 3Puntos"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Nivelación Grid"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Nivelar Malla"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Puntos Laterais"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Tipo de Mapa "); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Gardar Mapa"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Enviar ao Host"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Gardar en CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Backup Externo"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Info do UBL"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Cantidade de Recheo"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Recheo Manual"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Recheo Intelixente"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Recheo da Malla"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidar todo"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidar cercanos"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Axustar Fino Todo"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Axustar Fino Cerc"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Almacenamento Malla"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Rañura Memoria"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Cargar Malla Cama"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Gardar Malla Cama"); + LSTR MSG_MESH_LOADED = _UxGT("Malla %i Cargada"); + LSTR MSG_MESH_SAVED = _UxGT("Malla %i Gardada"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Sen Gardar"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Erro: Gardadado UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Erro: Recuperación UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Desfase de Z: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Desfase de Z Detido"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL Paso a Paso"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Crear Malla Fría"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2. Recheo Intelixente"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Validar Malla"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Axustar Fino Todo"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Validar Malla"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Axustar Fino Todo"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Gardar Malla Cama"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Control LED"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Luces"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Axustes Luz"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Vermello"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Laranxa"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Amarelo"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Verde"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Azul"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Índigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Violeta"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Branco"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Por defecto"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Luces personalizadas"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Intensidade Vermello"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Intensidade Verde"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Intensidade Azul"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Intensidade Branco"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Brillo"); + LSTR MSG_LED_CONTROL = _UxGT("Control LED"); + LSTR MSG_LEDS = _UxGT("Luces"); + LSTR MSG_LED_PRESETS = _UxGT("Axustes Luz"); + LSTR MSG_SET_LEDS_RED = _UxGT("Vermello"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Laranxa"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Amarelo"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Verde"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Azul"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Índigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violeta"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Branco"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Por defecto"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Luces personalizadas"); + LSTR MSG_INTENSITY_R = _UxGT("Intensidade Vermello"); + LSTR MSG_INTENSITY_G = _UxGT("Intensidade Verde"); + LSTR MSG_INTENSITY_B = _UxGT("Intensidade Azul"); + LSTR MSG_INTENSITY_W = _UxGT("Intensidade Branco"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Brillo"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Movendo..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Libre XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Mover X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Mover Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Mover Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extrusor"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extrusor *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Bico moi frío"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Mover %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mover 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mover 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Velocidade"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Cama Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Bico"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Bico ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Bico Estacionado"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Bico Standby"); - PROGMEM Language_Str MSG_BED = _UxGT("Cama"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Cámara"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Vel. Ventilador"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Vel. Ventilador ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Ventilador Mem. ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Vel. Vent. Extra"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Vel. Vent. Extra ~"); - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Controlador Vent."); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Velocidade Repouso"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Modo Auto"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Velocidade Activa"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Tempo Repouso"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Fluxo"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Fluxo ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Control"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Temperatura Auto."); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Acender"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Apagar"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("Auto-Sint. PID"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("Auto-Sint. PID *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("Fin Auto-Sint PID"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Auto-Sint. fallida. Extrusor danado."); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-Sint. fallida. Temperatura moi alta."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Auto-Sint. fallida. Tempo excedido."); - PROGMEM Language_Str MSG_SELECT = _UxGT("Escolla"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Escolla *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Acel"); - PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Desvío Unión"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocidade"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("V-viaxe min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Aceleración"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retrac."); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-viaxe"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Frecuencia max"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Avance min"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Pasos/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" pasos/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" pasos/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" pasos/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E pasos/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* pasos/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Movemento"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filamento"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E en mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Diam. fil."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Diam. fil. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Descarga mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Carga mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Avance K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Avance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Constraste LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Gardar Configuración"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Cargar Configuración"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Rest. Defecto"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Inicializar EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("Erro: CRC EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("Erro: Índice EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("Erro: Versión EEPROM"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Config Gardada"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Actualizar SD/USB"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Reiniciar Impresora"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Recargar"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Información"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Preparar"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Axustar"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Comezar impresión"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Seguinte"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Comezar"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Deter"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Imprimir"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Reiniciar"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Cancelar"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Listo"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Atrás"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Proceder"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("Pausando..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pausar impresión"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Retomar impresión"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Deter impresión"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Imprimindo Obxecto"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Cancelar Obxecto"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Obxecto ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Recuperar Impresión"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Tarxeta SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Sen tarxeta SD"); - PROGMEM Language_Str MSG_DWELL = _UxGT("En repouso..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Prema para Retomar.."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Impresión Pausada"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Imprimindo..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Impresión Cancelada"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Fin Impresión"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Sen movemento."); - PROGMEM Language_Str MSG_KILLED = _UxGT("MORTO."); - PROGMEM Language_Str MSG_STOPPED = _UxGT("DETIDO."); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retraer mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Cambio retra. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retraer V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Alzar Z mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Recup. retra. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Cambio recup. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Recuperacion V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto-Retracción"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Lonxitude Retracción"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Cambio Extra"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Lonxitude de Purga"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Cambiar Ferramenta"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Levantar Z"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Velocidade prim."); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vel. de Retracción"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Extrusor Est."); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Vel. Recuperación"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Vel. Ventilador"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Tempo Ventilador"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto ON"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto OFF"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Cambio Ferramenta"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Cambio Automático"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Último Extrusor"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Cambio a *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Cambiar Filamento"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Cambiar Filamento *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Cargar Filamento"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Cargar Filamento *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Descargar Filamento"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Descargar Filamento *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Descargar Todo"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Iniciar SD/USB"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Cambiar SD/USB"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Lanzar SD/USB"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sonda-Z fóra Cama"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Factor de Desviación"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Auto-Test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reiniciar"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Recoller"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Estender"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("Modo Software"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("Modo 5V"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("Modo OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Modo Almacenar"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Axustar BLTouch a 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Axustar BLTouch a OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Modo de Informe"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("PERIGO: Unha mala configuración pode producir daños! Proceder igualmente?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Iniciar TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Test de Desfase Z"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Gardar"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Estender TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Estender Sonda Z"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Recoller Sonda Z"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Orixe %s%s%s Primeiro"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Desfases Sonda"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Desfase Sonda X"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Desfase Sonda Y"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Desfase Z"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Micropaso X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Micropaso Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Total"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Erro FinCarro"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Fallo Quentando"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Erro:Temp Redundante"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("FUGA TÉRMICA"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("FUGA TÉRMICA CAMA"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("FUGA TÉRMICA CÁMARA"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Erro:TEMP MÁX"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Erro:TEMP MÍN"); - PROGMEM Language_Str MSG_HALTED = _UxGT("IMPRESORA DETIDA"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Debe reiniciar!"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Quentando..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Arrefriando..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Quentando cama..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Enfriando Cama..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Quentando Cámara..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Arrefriando Cámara..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Calibracion Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Configuración Delta"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibración"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Ax. Altura Delta"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Axustar Sonda Z"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Barra Diagonal"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Altura"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Radio"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Acerca de..."); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Información"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("Nivelación 3puntos"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Nivelación Lineal"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Nivelación Bilineal"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Nivelación UBL"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Nivelación en Malla"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Estatísticas"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Placa nai"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistores"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extrusores"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baudios"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protocolo"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Reloxo Traballo: OFF"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Reloxo Traballo: ON"); + LSTR MSG_MOVING = _UxGT("Movendo..."); + LSTR MSG_FREE_XY = _UxGT("Libre XY"); + LSTR MSG_MOVE_X = _UxGT("Mover X"); + LSTR MSG_MOVE_Y = _UxGT("Mover Y"); + LSTR MSG_MOVE_Z = _UxGT("Mover Z"); + LSTR MSG_MOVE_E = _UxGT("Extrusor"); + LSTR MSG_MOVE_EN = _UxGT("Extrusor *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Bico moi frío"); + LSTR MSG_MOVE_N_MM = _UxGT("Mover %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Mover 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Mover 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Mover 100mm"); + LSTR MSG_SPEED = _UxGT("Velocidade"); + LSTR MSG_BED_Z = _UxGT("Cama Z"); + LSTR MSG_NOZZLE = _UxGT("Bico"); + LSTR MSG_NOZZLE_N = _UxGT("Bico ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Bico Estacionado"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Bico Standby"); + LSTR MSG_BED = _UxGT("Cama"); + LSTR MSG_CHAMBER = _UxGT("Cámara"); + LSTR MSG_FAN_SPEED = _UxGT("Vel. Ventilador"); + LSTR MSG_FAN_SPEED_N = _UxGT("Vel. Ventilador ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Ventilador Mem. ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Vel. Vent. Extra"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Vel. Vent. Extra ~"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Controlador Vent."); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Velocidade Repouso"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Modo Auto"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Velocidade Activa"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Tempo Repouso"); + LSTR MSG_FLOW = _UxGT("Fluxo"); + LSTR MSG_FLOW_N = _UxGT("Fluxo ~"); + LSTR MSG_CONTROL = _UxGT("Control"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); + LSTR MSG_AUTOTEMP = _UxGT("Temperatura Auto."); + LSTR MSG_LCD_ON = _UxGT("Acender"); + LSTR MSG_LCD_OFF = _UxGT("Apagar"); + LSTR MSG_PID_AUTOTUNE = _UxGT("Auto-Sint. PID"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("Auto-Sint. PID *"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Fin Auto-Sint PID"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Auto-Sint. fallida. Extrusor danado."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-Sint. fallida. Temperatura moi alta."); + LSTR MSG_PID_TIMEOUT = _UxGT("Auto-Sint. fallida. Tempo excedido."); + LSTR MSG_SELECT = _UxGT("Escolla"); + LSTR MSG_SELECT_E = _UxGT("Escolla *"); + LSTR MSG_ACC = _UxGT("Acel"); + LSTR MSG_JERK = _UxGT("Jerk"); + LSTR MSG_VA_JERK = _UxGT("Max ") LCD_STR_A _UxGT(" Jerk"); + LSTR MSG_VB_JERK = _UxGT("Max ") LCD_STR_B _UxGT(" Jerk"); + LSTR MSG_VC_JERK = _UxGT("Max ") LCD_STR_C _UxGT(" Jerk"); + LSTR MSG_VI_JERK = _UxGT("Max ") LCD_STR_I _UxGT(" Jerk"); + LSTR MSG_VJ_JERK = _UxGT("Max ") LCD_STR_J _UxGT(" Jerk"); + LSTR MSG_VK_JERK = _UxGT("Max ") LCD_STR_K _UxGT(" Jerk"); + LSTR MSG_VE_JERK = _UxGT("Max E Jerk"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Desvío Unión"); + LSTR MSG_VELOCITY = _UxGT("Velocidade"); + LSTR MSG_VMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Vel"); + LSTR MSG_VMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Vel"); + LSTR MSG_VMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Vel"); + LSTR MSG_VMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Vel"); + LSTR MSG_VMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Vel"); + LSTR MSG_VMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Vel"); + LSTR MSG_VMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Vel"); + LSTR MSG_VMAX_EN = _UxGT("Max * Vel"); + LSTR MSG_VMIN = _UxGT("Vmin"); + LSTR MSG_VTRAV_MIN = _UxGT("V-viaxe min"); + LSTR MSG_ACCELERATION = _UxGT("Aceleración"); + LSTR MSG_AMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Accel"); + LSTR MSG_AMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Accel"); + LSTR MSG_AMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Accel"); + LSTR MSG_AMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Accel"); + LSTR MSG_AMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Accel"); + LSTR MSG_AMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Accel"); + LSTR MSG_AMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Accel"); + LSTR MSG_AMAX_EN = _UxGT("Max * Accel"); + LSTR MSG_A_RETRACT = _UxGT("A-retrac."); + LSTR MSG_A_TRAVEL = _UxGT("A-viaxe"); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Frecuencia max"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Avance min"); + LSTR MSG_STEPS_PER_MM = _UxGT("Pasos/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" pasos/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" pasos/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" pasos/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" pasos/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" pasos/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" pasos/mm"); + LSTR MSG_E_STEPS = _UxGT("E pasos/mm"); + LSTR MSG_EN_STEPS = _UxGT("* pasos/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatura"); + LSTR MSG_MOTION = _UxGT("Movemento"); + LSTR MSG_FILAMENT = _UxGT("Filamento"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E en mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Diam. fil."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Diam. fil. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Descarga mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Carga mm"); + LSTR MSG_ADVANCE_K = _UxGT("Avance K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Avance K *"); + LSTR MSG_CONTRAST = _UxGT("Constraste LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Gardar Configuración"); + LSTR MSG_LOAD_EEPROM = _UxGT("Cargar Configuración"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Rest. Defecto"); + LSTR MSG_INIT_EEPROM = _UxGT("Inicializar EEPROM"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("Erro: CRC EEPROM"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Erro: Índice EEPROM"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Erro: Versión EEPROM"); + LSTR MSG_SETTINGS_STORED = _UxGT("Config Gardada"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Actualizar SD/USB"); + LSTR MSG_RESET_PRINTER = _UxGT("Reiniciar Impresora"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Recargar"); + LSTR MSG_INFO_SCREEN = _UxGT("Información"); + LSTR MSG_PREPARE = _UxGT("Preparar"); + LSTR MSG_TUNE = _UxGT("Axustar"); + LSTR MSG_START_PRINT = _UxGT("Comezar impresión"); + LSTR MSG_BUTTON_NEXT = _UxGT("Seguinte"); + LSTR MSG_BUTTON_INIT = _UxGT("Comezar"); + LSTR MSG_BUTTON_STOP = _UxGT("Deter"); + LSTR MSG_BUTTON_PRINT = _UxGT("Imprimir"); + LSTR MSG_BUTTON_RESET = _UxGT("Reiniciar"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Cancelar"); + LSTR MSG_BUTTON_DONE = _UxGT("Listo"); + LSTR MSG_BUTTON_BACK = _UxGT("Atrás"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Proceder"); + LSTR MSG_PAUSING = _UxGT("Pausando..."); + LSTR MSG_PAUSE_PRINT = _UxGT("Pausar impresión"); + LSTR MSG_RESUME_PRINT = _UxGT("Retomar impresión"); + LSTR MSG_STOP_PRINT = _UxGT("Deter impresión"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Imprimindo Obxecto"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Cancelar Obxecto"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Obxecto ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Recuperar Impresión"); + LSTR MSG_MEDIA_MENU = _UxGT("Tarxeta SD"); + LSTR MSG_NO_MEDIA = _UxGT("Sen tarxeta SD"); + LSTR MSG_DWELL = _UxGT("En repouso..."); + LSTR MSG_USERWAIT = _UxGT("Prema para Retomar.."); + LSTR MSG_PRINT_PAUSED = _UxGT("Impresión Pausada"); + LSTR MSG_PRINTING = _UxGT("Imprimindo..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Impresión Cancelada"); + LSTR MSG_PRINT_DONE = _UxGT("Fin Impresión"); + LSTR MSG_NO_MOVE = _UxGT("Sen movemento."); + LSTR MSG_KILLED = _UxGT("MORTO."); + LSTR MSG_STOPPED = _UxGT("DETIDO."); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retraer mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Cambio retra. mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retraer V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Alzar Z mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Recup. retra. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Cambio recup. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Recuperacion V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto-Retracción"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Lonxitude Retracción"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Cambio Extra"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Lonxitude de Purga"); + LSTR MSG_TOOL_CHANGE = _UxGT("Cambiar Ferramenta"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Levantar Z"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Velocidade prim."); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Vel. de Retracción"); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Extrusor Est."); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Vel. Recuperación"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Vel. Ventilador"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Tempo Ventilador"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto ON"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Auto OFF"); + LSTR MSG_TOOL_MIGRATION = _UxGT("Cambio Ferramenta"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Cambio Automático"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Último Extrusor"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Cambio a *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Cambiar Filamento"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Cambiar Filamento *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Cargar Filamento"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Cargar Filamento *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Descargar Filamento"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Descargar Filamento *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Descargar Todo"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Iniciar SD/USB"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Cambiar SD/USB"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Lanzar SD/USB"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sonda-Z fóra Cama"); + LSTR MSG_SKEW_FACTOR = _UxGT("Factor de Desviación"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Auto-Test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reiniciar"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Recoller"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Estender"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("Modo Software"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("Modo 5V"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("Modo OD"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Modo Almacenar"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Axustar BLTouch a 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Axustar BLTouch a OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Modo de Informe"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("PERIGO: Unha mala configuración pode producir daños! Proceder igualmente?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Iniciar TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Test de Desfase Z"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Gardar"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Estender TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Estender Sonda Z"); + LSTR MSG_MANUAL_STOW = _UxGT("Recoller Sonda Z"); + LSTR MSG_HOME_FIRST = _UxGT("Orixe %s%s%s Primeiro"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Desfases Sonda"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Desfase Sonda X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Desfase Sonda Y"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desfase Z"); + LSTR MSG_BABYSTEP_X = _UxGT("Micropaso X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Micropaso Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Micropaso Z"); + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Erro FinCarro"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Fallo Quentando"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Erro:Temp Redundante"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("FUGA TÉRMICA"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("FUGA TÉRMICA CAMA"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("FUGA TÉRMICA CÁMARA"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Erro:TEMP MÁX"); + LSTR MSG_ERR_MINTEMP = _UxGT("Erro:TEMP MÍN"); + LSTR MSG_HALTED = _UxGT("IMPRESORA DETIDA"); + LSTR MSG_PLEASE_RESET = _UxGT("Debe reiniciar!"); + LSTR MSG_HEATING = _UxGT("Quentando..."); + LSTR MSG_COOLING = _UxGT("Arrefriando..."); + LSTR MSG_BED_HEATING = _UxGT("Quentando cama..."); + LSTR MSG_BED_COOLING = _UxGT("Enfriando Cama..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Quentando Cámara..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Arrefriando Cámara..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Calibracion Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Configuración Delta"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibración"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Ax. Altura Delta"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Axustar Sonda Z"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Barra Diagonal"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Altura"); + LSTR MSG_DELTA_RADIUS = _UxGT("Radio"); + LSTR MSG_INFO_MENU = _UxGT("Acerca de..."); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Información"); + LSTR MSG_3POINT_LEVELING = _UxGT("Nivelación 3puntos"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Nivelación Lineal"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Nivelación Bilineal"); + LSTR MSG_UBL_LEVELING = _UxGT("Nivelación UBL"); + LSTR MSG_MESH_LEVELING = _UxGT("Nivelación en Malla"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Estatísticas"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Placa nai"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistores"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrusores"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baudios"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protocolo"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Reloxo Traballo: OFF"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Reloxo Traballo: ON"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Luz da Caixa"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Brillo Luces"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("IMPRESORA INCORRECTA"); + LSTR MSG_CASE_LIGHT = _UxGT("Luz da Caixa"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Brillo Luces"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("IMPRESORA INCORRECTA"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Total Impresións"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Tempo Total Imp."); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Impresión máis longa"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Total Extruído"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Total Impresións"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Tempo Total Imp."); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Impresión máis longa"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Total Extruído"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Impresións"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Máis Longa"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extruido"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Impresións"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completadas"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Máis Longa"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruido"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Temp Mín"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp Máx"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Fonte Alimentación"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Forza do Motor"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ERRO CONEX. TMC"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Escribe DAC EEPROM"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("CAMBIAR FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("IMPRESIÓN PAUSADA"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CARGAR FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("DESCARGAR FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPCIÓN DE RETOMAR:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purgar máis"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Retomar traballo"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Bico: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Sensor Filamento"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Dist mm Sensor Fil"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Fallo ao ir á Orixe"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Fallo ao Sondar"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Temp Mín"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Temp Máx"); + LSTR MSG_INFO_PSU = _UxGT("Fonte Alimentación"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Forza do Motor"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Driver %"); + LSTR MSG_ERROR_TMC = _UxGT("ERRO CONEX. TMC"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Escribe DAC EEPROM"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("CAMBIAR FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("IMPRESIÓN PAUSADA"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CARGAR FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("DESCARGAR FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPCIÓN DE RETOMAR:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purgar máis"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Retomar traballo"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Bico: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Sensor Filamento"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Dist mm Sensor Fil"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Fallo ao ir á Orixe"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Fallo ao Sondar"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ESCOLLE FILAMENTO"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Actualizar FW MMU!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Precisa Atención."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Retomar impr."); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Retomando..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Cargar Filamento"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Cargar Todo"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Cargar até bico"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Expulsar Filamento"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Expulsar Filamento ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Descargar Filamento"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Cargando Fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Expulsando Fil. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Descargando Fil..."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Todo"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filamento ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Reiniciar MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("Reiniciando MMU..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Expulsar, premer"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ESCOLLE FILAMENTO"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Actualizar FW MMU!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Precisa Atención."); + LSTR MSG_MMU2_RESUME = _UxGT("Retomar impr."); + LSTR MSG_MMU2_RESUMING = _UxGT("Retomando..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Cargar Filamento"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Cargar Todo"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Cargar até bico"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Expulsar Filamento"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Expulsar Filamento ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Descargar Filamento"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Cargando Fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Expulsando Fil. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Descargando Fil..."); + LSTR MSG_MMU2_ALL = _UxGT("Todo"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filamento ~"); + LSTR MSG_MMU2_RESET = _UxGT("Reiniciar MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("Reiniciando MMU..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Expulsar, premer"); - PROGMEM Language_Str MSG_MIX = _UxGT("Mestura"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Compoñente ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Mesturadora"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Degradado"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Degradado Total"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Mestura Conmutada"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Mestura Cíclica"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Mestura de Degradado"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Degradado Inverso"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Activar Ferr-V"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Inicio Ferr-V"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" Fin Ferr-V"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias Ferr-V"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Reiniciar Ferr-V"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Commit mest. Ferr-V"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("Ferr-V reiniciadas"); - PROGMEM Language_Str MSG_START_Z = _UxGT("Inicio Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" Fin Z:"); + LSTR MSG_MIX = _UxGT("Mestura"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Compoñente ="); + LSTR MSG_MIXER = _UxGT("Mesturadora"); + LSTR MSG_GRADIENT = _UxGT("Degradado"); + LSTR MSG_FULL_GRADIENT = _UxGT("Degradado Total"); + LSTR MSG_TOGGLE_MIX = _UxGT("Mestura Conmutada"); + LSTR MSG_CYCLE_MIX = _UxGT("Mestura Cíclica"); + LSTR MSG_GRADIENT_MIX = _UxGT("Mestura de Degradado"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Degradado Inverso"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Activar Ferr-V"); + LSTR MSG_START_VTOOL = _UxGT("Inicio Ferr-V"); + LSTR MSG_END_VTOOL = _UxGT(" Fin Ferr-V"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias Ferr-V"); + LSTR MSG_RESET_VTOOLS = _UxGT("Reiniciar Ferr-V"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Commit mest. Ferr-V"); + LSTR MSG_VTOOLS_RESET = _UxGT("Ferr-V reiniciadas"); + LSTR MSG_START_Z = _UxGT("Inicio Z:"); + LSTR MSG_END_Z = _UxGT(" Fin Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Xogos"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Labirinto"); + LSTR MSG_GAMES = _UxGT("Xogos"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Labirinto"); #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Preme o botón para", "continuar impresión")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Estacionando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Agarde para", "comezar cambio", "de filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Introduza o", "filamento e", "faga click")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Prema o botón para", "quentar o bico")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Quentando bico", "Agarde, por favor...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Agarde pola", "descarga do", "filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Agarde pola", "carga do", "filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Agarde para", "purgar o filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Prema para finalizar", "a purga do filamen.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Agarde a que", "se retome", "a impresión")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Preme o botón para", "continuar impresión")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Estacionando...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Agarde para", "comezar cambio", "de filamento")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Introduza o", "filamento e", "faga click")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Prema o botón para", "quentar o bico")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Quentando bico", "Agarde, por favor...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Agarde pola", "descarga do", "filamento")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Agarde pola", "carga do", "filamento")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Agarde para", "purgar o filamento")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Prema para finalizar", "a purga do filamen.")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Agarde a que", "se retome", "a impresión")); #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Premer para continuar")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Estacionando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Agarde...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Introduza e click")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Prema para quentar")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Quentando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Descargando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Cargando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purgando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Prema para finalizar")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Retomando...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Premer para continuar")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Estacionando...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Agarde...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Introduza e click")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Prema para quentar")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Quentando...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Descargando...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Cargando...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purgando...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Prema para finalizar")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Retomando...")); #endif - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("Controladores TMC"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Controlador Actual"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Limiar Hibrido"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Orixe sen Sensores"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Modo de pasos"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Habilit."); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Reiniciar"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" dentro:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Reacción"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Corrección"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Suavizado"); + LSTR MSG_TMC_DRIVERS = _UxGT("Controladores TMC"); + LSTR MSG_TMC_CURRENT = _UxGT("Controlador Actual"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Limiar Hibrido"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Orixe sen Sensores"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Modo de pasos"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Habilit."); + LSTR MSG_SERVICE_RESET = _UxGT("Reiniciar"); + LSTR MSG_SERVICE_IN = _UxGT(" dentro:"); + LSTR MSG_BACKLASH = _UxGT("Reacción"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Corrección"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Suavizado"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Nivel Eixe X"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Auto Calibrar"); - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Tempo exc. Quent."); - PROGMEM Language_Str MSG_REHEAT = _UxGT("Requentar"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Requentando..."); + LSTR MSG_LEVEL_X_AXIS = _UxGT("Nivel Eixe X"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto Calibrar"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Tempo exc. Quent."); + LSTR MSG_REHEAT = _UxGT("Requentar"); + LSTR MSG_REHEATING = _UxGT("Requentando..."); } diff --git a/Marlin/src/lcd/language/language_hr.h b/Marlin/src/lcd/language/language_hr.h index 1684ad0e1bc2..e828b489f6ea 100644 --- a/Marlin/src/lcd/language/language_hr.h +++ b/Marlin/src/lcd/language/language_hr.h @@ -33,138 +33,138 @@ namespace Language_hr { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Croatian"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Croatian"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" spreman."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("SD kartica umetnuta"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("SD kartica uklonjena"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - PROGMEM Language_Str MSG_MAIN = _UxGT("Main"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Auto pokretanje"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Ugasi steppere"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Automatski homing"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Home-aj X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Home-aj Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Home-aj Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Home-aj XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Klikni za početak"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Sljedeća točka"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Niveliranje gotovo!"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Postavi home offsete"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets postavljeni"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Postavi ishodište"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" spreman."); + LSTR MSG_MEDIA_INSERTED = _UxGT("SD kartica umetnuta"); + LSTR MSG_MEDIA_REMOVED = _UxGT("SD kartica uklonjena"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters + LSTR MSG_MAIN = _UxGT("Main"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Auto pokretanje"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Ugasi steppere"); + LSTR MSG_AUTO_HOME = _UxGT("Automatski homing"); + LSTR MSG_AUTO_HOME_X = _UxGT("Home-aj X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Home-aj Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Home-aj Z"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Home-aj XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Klikni za početak"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Sljedeća točka"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Niveliranje gotovo!"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Postavi home offsete"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets postavljeni"); + LSTR MSG_SET_ORIGIN = _UxGT("Postavi ishodište"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Predgrij ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Predgrij ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" Dizna"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" Dizna ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" Sve"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" Bed"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" conf"); + LSTR MSG_PREHEAT_1 = _UxGT("Predgrij ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Predgrij ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" Dizna"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" Dizna ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" Sve"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" Bed"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Predgrij ") PREHEAT_1_LABEL _UxGT(" conf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Predgrij $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Predgrij $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Predgrij $ Dizna"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Predgrij $ Dizna ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Predgrij $ Sve"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Predgrij $ Bed"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Predgrij $ conf"); + LSTR MSG_PREHEAT_M = _UxGT("Predgrij $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Predgrij $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Predgrij $ Dizna"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Predgrij $ Dizna ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Predgrij $ Sve"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Predgrij $ Bed"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Predgrij $ conf"); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Hlađenje"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Uključi napajanje"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Isključi napajanje"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Miči os"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Niveliraj bed"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Niveliraj bed"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Miči X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Miči Y"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Miči %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Miči 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Miči 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Miči 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Brzina"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Bed Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Dizna"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Dizna ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Bed"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Brzina ventilatora"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Brzina ventilatora ~"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Odaberi"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Odaberi *"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperature"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Gibanje"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Kontrast LCD-a"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Pohrani u memoriju"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Učitaj memoriju"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Učitaj Defaults"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Osvježi"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info screen"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Pripremi"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pauziraj print"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Nastavi print"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Zaustavi print"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Printaj s SD kartice"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Nema SD kartice"); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Čekaj korisnika..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Print otkazan"); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ZAUSTAVLJEN. "); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Promijeni filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Promijeni filament *"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Init. SD karticu"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Promijeni SD karticu"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Grijanje neuspješno"); - PROGMEM Language_Str MSG_HEATING = _UxGT("Grijanje..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Grijanje Bed-a..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibracija"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibriraj X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibriraj Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibriraj Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibriraj Središte"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("O printeru"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Podaci o printeru"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Statistika printera"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Podaci o elektronici"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistori"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extruderi"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baud"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokol"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Osvjetljenje"); + LSTR MSG_COOLDOWN = _UxGT("Hlađenje"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Uključi napajanje"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Isključi napajanje"); + LSTR MSG_MOVE_AXIS = _UxGT("Miči os"); + LSTR MSG_BED_LEVELING = _UxGT("Niveliraj bed"); + LSTR MSG_LEVEL_BED = _UxGT("Niveliraj bed"); + LSTR MSG_MOVE_X = _UxGT("Miči X"); + LSTR MSG_MOVE_Y = _UxGT("Miči Y"); + LSTR MSG_MOVE_N_MM = _UxGT("Miči %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Miči 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Miči 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Miči 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Miči 100mm"); + LSTR MSG_SPEED = _UxGT("Brzina"); + LSTR MSG_BED_Z = _UxGT("Bed Z"); + LSTR MSG_NOZZLE = _UxGT("Dizna"); + LSTR MSG_NOZZLE_N = _UxGT("Dizna ~"); + LSTR MSG_BED = _UxGT("Bed"); + LSTR MSG_FAN_SPEED = _UxGT("Brzina ventilatora"); + LSTR MSG_FAN_SPEED_N = _UxGT("Brzina ventilatora ~"); + LSTR MSG_SELECT = _UxGT("Odaberi"); + LSTR MSG_SELECT_E = _UxGT("Odaberi *"); + LSTR MSG_TEMPERATURE = _UxGT("Temperature"); + LSTR MSG_MOTION = _UxGT("Gibanje"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); + LSTR MSG_CONTRAST = _UxGT("Kontrast LCD-a"); + LSTR MSG_STORE_EEPROM = _UxGT("Pohrani u memoriju"); + LSTR MSG_LOAD_EEPROM = _UxGT("Učitaj memoriju"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Učitaj Defaults"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Osvježi"); + LSTR MSG_INFO_SCREEN = _UxGT("Info screen"); + LSTR MSG_PREPARE = _UxGT("Pripremi"); + LSTR MSG_PAUSE_PRINT = _UxGT("Pauziraj print"); + LSTR MSG_RESUME_PRINT = _UxGT("Nastavi print"); + LSTR MSG_STOP_PRINT = _UxGT("Zaustavi print"); + LSTR MSG_MEDIA_MENU = _UxGT("Printaj s SD kartice"); + LSTR MSG_NO_MEDIA = _UxGT("Nema SD kartice"); + LSTR MSG_USERWAIT = _UxGT("Čekaj korisnika..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Print otkazan"); + LSTR MSG_STOPPED = _UxGT("ZAUSTAVLJEN. "); + LSTR MSG_FILAMENTCHANGE = _UxGT("Promijeni filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Promijeni filament *"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Init. SD karticu"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Promijeni SD karticu"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Grijanje neuspješno"); + LSTR MSG_HEATING = _UxGT("Grijanje..."); + LSTR MSG_BED_HEATING = _UxGT("Grijanje Bed-a..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibracija"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibriraj X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibriraj Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibriraj Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibriraj Središte"); + LSTR MSG_INFO_MENU = _UxGT("O printeru"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Podaci o printeru"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Statistika printera"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Podaci o elektronici"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistori"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extruderi"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baud"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protokol"); + LSTR MSG_CASE_LIGHT = _UxGT("Osvjetljenje"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Neispravan pisač"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Neispravan pisač"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Broj printova"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Završeni"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Ukupno printanja"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Najduži print"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extrudirano ukupno"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Broj printova"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Završeni"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Ukupno printanja"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Najduži print"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extrudirano ukupno"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Printovi"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Završeni"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Ukupno"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Najduži"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extrudirano"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Printovi"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Završeni"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Ukupno"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Najduži"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extrudirano"); #endif - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Napajanje"); + LSTR MSG_INFO_PSU = _UxGT("Napajanje"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Nastavi print"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Nastavi print"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Čekaj", "filament unload")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Pričekaj", "filament load")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Nastavljam...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Čekaj", "filament unload")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Pričekaj", "filament load")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Nastavljam...")); #if LCD_HEIGHT >= 4 // Up to 3 lines allowed - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Čekaj početak", "filamenta", "promijeni")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Umetni filament", "i pritisni tipku", "za nastavak...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Čekaj početak", "filamenta", "promijeni")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Umetni filament", "i pritisni tipku", "za nastavak...")); #else // Up to 2 lines allowed - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT("Pričekaj..."); - //PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_2_LINE("?", "?")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT("Pričekaj..."); #endif } diff --git a/Marlin/src/lcd/language/language_hu.h b/Marlin/src/lcd/language/language_hu.h index 523f9c1c69de..2c06a51c19d8 100644 --- a/Marlin/src/lcd/language/language_hu.h +++ b/Marlin/src/lcd/language/language_hu.h @@ -22,589 +22,706 @@ #pragma once /** - * Magyar - * - * LCD Menü Üzenetek. Lásd még https://marlinfw.org/docs/development/lcd_language.html - * Marlin 2.0.x bugfix Magyar fordítása. A fordítást folyamatosan javítom és frissítem. - * A Magyar fordítást készítette: AntoszHUN + * Hungarian / Magyar * + * LCD Menu Messages. See also https://marlinfw.org/docs/development/lcd_language.html + * Hungarian translation by AntoszHUN. I am constantly improving and updating the translation. + * Translation last updated: 08/30/2021 - 22:20 * + * LCD Menü Üzenetek. Lásd még https://marlinfw.org/docs/development/lcd_language.html + * A Magyar fordítást készítette: AntoszHUN. A fordítást folyamatosan javítom és frissítem. + * A Fordítás utolsó frissítése: 2021.08.30. - 22:20 */ namespace Language_hu { using namespace Language_en; // A fordítás az örökölt Amerikai Angol (English) karakterláncokat használja. + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Magyar"); - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Magyar"); - - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Kész."); - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("IGEN"); - PROGMEM Language_Str MSG_NO = _UxGT("NEM"); - PROGMEM Language_Str MSG_BACK = _UxGT("Vissza"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Megszakítás..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Tároló Behelyezve"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Tároló Eltávolítva"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Várakozás a tárolóra"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Tároló olvasási hiba"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB eltávolítva"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB eszköz hiba"); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Túlfolyás"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Végállás"); // Maximum 8 karakter - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Szoft. Végállás"); - PROGMEM Language_Str MSG_MAIN = _UxGT(""); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("További Beállítások"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Konfiguráció"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autoinditás"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Motorok kikapcsolása"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Hiba Menü"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Haladás sáv teszt"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("XYZ Auto kezdöpont"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("X Kezdöpont"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Y Kezdöpont"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Z Kezdöpont"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Igazítás"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("XYZ Kezdöpont"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Kattints a kezdéshez."); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Következö Pont"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Szintezés Kész!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Szint Csökkentés"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Kezdöpont eltolás"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Eltolás beállítva."); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Eredeti Be"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Kész."); + LSTR MSG_YES = _UxGT("IGEN"); + LSTR MSG_NO = _UxGT("NEM"); + LSTR MSG_BACK = _UxGT("Vissza"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Megszakítás..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Tároló behelyezve"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Tároló eltávolítva"); + LSTR MSG_MEDIA_WAITING = _UxGT("Várakozás a tárolóra"); + LSTR MSG_SD_INIT_FAIL = _UxGT("SD-kártya hiba"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Tároló olvasási hiba"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB eltávolítva"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB eszköz hiba"); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Túlfolyás"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Végállás"); // Maximum 8 karakter + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Szoft. végállás"); + LSTR MSG_MAIN = _UxGT(""); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("További beállítások"); + LSTR MSG_CONFIGURATION = _UxGT("Konfiguráció"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Fájl auto. futtatás"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Motorok kikapcsolása"); + LSTR MSG_DEBUG_MENU = _UxGT("Hiba Menü"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Haladás sáv teszt"); + LSTR MSG_AUTO_HOME = _UxGT("X-Y-Z auto kezdöpont"); + LSTR MSG_AUTO_HOME_X = _UxGT("X kezdöpont"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Y kezdöpont"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Z kezdöpont"); + LSTR MSG_AUTO_HOME_I = _UxGT("Kezdö ") LCD_STR_I; + LSTR MSG_AUTO_HOME_J = _UxGT("Kezdö ") LCD_STR_J; + LSTR MSG_AUTO_HOME_K = _UxGT("Kezdö ") LCD_STR_K; + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-igazítás"); + LSTR MSG_ITERATION = _UxGT("G34 Ismétlés: %i"); + LSTR MSG_DECREASING_ACCURACY = _UxGT("Pontosság csökken!"); + LSTR MSG_ACCURACY_ACHIEVED = _UxGT("Pontosság elérve"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("X-Y-Z kezdöpont"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Kattints a kezdéshez."); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Következö pont"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Szintezés kész!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Szint csökkentés"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Kezdöpont eltolás"); + LSTR MSG_HOME_OFFSET_X = _UxGT("X Kezdö eltol."); + LSTR MSG_HOME_OFFSET_Y = _UxGT("Y Kezdö eltol."); + LSTR MSG_HOME_OFFSET_Z = _UxGT("Z Kezdö eltol."); + LSTR MSG_HOME_OFFSET_I = _UxGT("Kezdö eltol. ") LCD_STR_I; + LSTR MSG_HOME_OFFSET_J = _UxGT("Kezdö eltol. ") LCD_STR_J; + LSTR MSG_HOME_OFFSET_K = _UxGT("Kezdö eltol. ") LCD_STR_K; + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Eltolás beállítva."); + LSTR MSG_SET_ORIGIN = _UxGT("Eredeti Be"); + LSTR MSG_TRAMMING_WIZARD = _UxGT("Elektromos varázsló"); + LSTR MSG_SELECT_ORIGIN = _UxGT("Eredeti választása"); + LSTR MSG_LAST_VALUE_SP = _UxGT("Utolsó érték "); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Fütés ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Fütés ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Fej"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Fej ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Mind"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Ágy"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Beáll"); + LSTR MSG_PREHEAT_1 = _UxGT("Fütés ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Fütés ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Fej"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Fej ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Mind"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Ágy"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Fütés ") PREHEAT_1_LABEL _UxGT(" Beáll"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Fütés $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Fütés $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Fütés $ Fej"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Fütés $ Fej ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Fütés $ Mind"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Fütés $ Ágy"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Fütés $ Beáll"); + LSTR MSG_PREHEAT_M = _UxGT("Fütés $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Fütés $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Fütés $ Fej"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Fütés $ Fej ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Fütés $ Mind"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Fütés $ Ágy"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Fütés $ Beáll"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Egyedi Elömelegítés"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Visszahütés"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frekvencia"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Lézer Vezérlés"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Lézer Teljesítmény"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Orsó Vezérlés"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Orsó Teljesítmény"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Orsó Hátra"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Bekapcsolás"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Kikapcsolás"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrudál"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Visszahúz"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Tengelyek Mozgatása"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Ágy Szintezés"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Ágy szintezése"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Sarok szint"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Következö sarok"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Háló Szerkesztö"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Háló Szerkesztése"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Háló Szerk. Állj"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Próbapont"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Érték"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Egyéni Parancs"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probe Teszt"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Pont"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Eltérés"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX Mód"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Eszköz Eltolás"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Parkolás"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplikálás"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Tükrözött másolás"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Teljes felügyelet"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2. fúvóka X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2. fúvóka Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2. fúvóka Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Szintezz! G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL Eszköz"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Egységes Ágy Szint"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Döntési Pont"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Kézi Háló Építés"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Tégy alátétet és mérj"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Mérés"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Üres ágyat mérj"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Továbblépés"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("UBL Aktivál"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL Deaktivál"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Ágy Höfok"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Ágy Höfok"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Fúvóka Höfok"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Fúvóka Höfok"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Háló Szerkesztés"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Egyéni Háló Szerkesztés"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Finomított Háló"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Háló Kész"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Egyéni Háló Építés"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Háló Építés"); - #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Háló Építés ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Háló Elfogadás ($)"); - #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Hideg Háló Építés"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("AHáló Magasság Állítása"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Összmagasság"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Háló Elfogadás"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valódi Háló Elfogadása"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Ágy Fűtés"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Fúvóka Fűtés"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Kézi alapozás..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Fix hosszúságú alap"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Alapozás Kész"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Törölve"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Kilépö G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Ágy Háló Folyt."); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Háló Szintezés"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Pontos Szintezés"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Rács Szintezés"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Háló Szint"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Oldal pontok"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Térkép Típus"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Háló Térkép Kimenet"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Host Kimenet"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("CSV Kimenet"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Nyomtató Backup Ki"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("UBL Infó Kimenet"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Kitöltési Költség"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Kézi Kitöltés"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Okos Kitöltés"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Háló Kitöltés"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Minden Érvénytelen"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Közelebbi Érvénytelen"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Mindet Finomhangolja"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Közelebbi Finomhangolása"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Háló Tárolás"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Memória Foglalat"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Ágy háló Betöltés"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Ágy háló Mentés"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("M117 Háló %i Betöltve"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("M117 Háló %i Mentve"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Nincs tároló"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Hiba: UBL Mentés"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Hiba: UBL Visszaáll"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Eltolás: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Eltolás Leállítva"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Lépésröl Lépésre UBL"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Hideg Háló Készítés"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. Inteligens Kitöltés"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Háló Érvényesítés"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Minden Finomítása"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Háló Érvényesítés"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Minden Finomítása"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. Ágy Háló Mentése"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Egyedi elömelegítés"); + LSTR MSG_COOLDOWN = _UxGT("Visszahütés"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("LED Vezérlés"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Világítás"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Beállított Színek"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Piros"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Narancs"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Sárga"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Zöld"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Kék"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indigó"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Viola"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Fehér"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Alapérték"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Egyéni Szín"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Piros Intenzitás"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Zöld Intenzitás"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Kék Intenzitás"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Fehér Intenzitás"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Fényerö"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frekvencia"); + LSTR MSG_LASER_MENU = _UxGT("Lézer vezérlés"); + LSTR MSG_SPINDLE_MENU = _UxGT("Orsó vezérlés"); + LSTR MSG_LASER_POWER = _UxGT("Lézer telj."); + LSTR MSG_SPINDLE_POWER = _UxGT("Orsó telj."); + LSTR MSG_LASER_TOGGLE = _UxGT("Lézer váltás"); + LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Hütés váltás"); + LSTR MSG_LASER_ASSIST_TOGGLE = _UxGT("Levegö segéd"); + LSTR MSG_LASER_PULSE_MS = _UxGT("Impulzus teszt ms"); + LSTR MSG_LASER_FIRE_PULSE = _UxGT("Tüz impulzus"); + LSTR MSG_FLOWMETER_FAULT = _UxGT("Áramlási hiba"); + LSTR MSG_SPINDLE_TOGGLE = _UxGT("Orsóváltás"); + LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Vákuum váltás"); + LSTR MSG_SPINDLE_FORWARD = _UxGT("Orsó elöre"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Orsó hátra"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Bekapcsolás"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Kikapcsolás"); + LSTR MSG_EXTRUDE = _UxGT("Adagol"); + LSTR MSG_RETRACT = _UxGT("Visszahúz"); + LSTR MSG_MOVE_AXIS = _UxGT("Tengelyek mozgatása"); + LSTR MSG_BED_LEVELING = _UxGT("Ágy szintezés"); + LSTR MSG_LEVEL_BED = _UxGT("Ágy szintezése"); + LSTR MSG_BED_TRAMMING = _UxGT("Sarok szint"); + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Ágy emelése a szonda váltásig"); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Minden sarok tolerancián belül. Szint jó."); + LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Jó pontok: "); + LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Utolsó Z: "); + LSTR MSG_NEXT_CORNER = _UxGT("Következö sarok"); + LSTR MSG_MESH_EDITOR = _UxGT("Háló szerkesztö"); + LSTR MSG_EDIT_MESH = _UxGT("Háló szerkesztése"); + LSTR MSG_EDITING_STOPPED = _UxGT("Háló szerk. állj"); + LSTR MSG_PROBING_POINT = _UxGT("Próbapont"); + LSTR MSG_MESH_X = _UxGT("Index X"); + LSTR MSG_MESH_Y = _UxGT("Index Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Z érték"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Egyéni parancs"); + LSTR MSG_M48_TEST = _UxGT("M48 Szonda teszt"); + LSTR MSG_M48_POINT = _UxGT("M48 Pont"); + LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Szonda határon kívül"); + LSTR MSG_M48_DEVIATION = _UxGT("Eltérés"); + LSTR MSG_IDEX_MENU = _UxGT("IDEX mód"); + LSTR MSG_OFFSETS_MENU = _UxGT("Eszköz eltolás"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Automata parkolás"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplikálás"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Tükrözött másolás"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Teljes felügyelet"); + LSTR MSG_IDEX_DUPE_GAP = _UxGT("X-hézag másolása"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2. fej X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2. fej Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. fej Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Szintezz! G29"); + LSTR MSG_UBL_TOOLS = _UxGT("UBL eszköz"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Egységes ágy szint"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Döntési pont"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Kézi háló építés"); + LSTR MSG_UBL_MESH_WIZARD = _UxGT("UBL Háló varázsló"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Tégy alátétet és mérj"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Mérés"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Üres ágyat mérj"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Továbblépés"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL aktívál"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL deaktívál"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Ágy höfok"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Egyéni ágy höfok"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Fejhöfok"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Egyéni fejhöfok"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Háló szerkesztés"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Egyéni háló szerkesztés"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Finomított háló"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Háló kész"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Egyéni háló építés"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Háló építés"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Háló építés ($)"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Hideg háló építés"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Háló magasság állítás"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Magasság összege"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Háló elfogadás"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Háló elfogadás ($)"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valódi háló elfogadása"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 Ágy fütés"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Fej fütés"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Kézi alapozás..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Fix hosszúságú alap"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Alapozás kész"); + LSTR MSG_G26_CANCELED = _UxGT("G26 Törölve"); + LSTR MSG_G26_LEAVING = _UxGT("Kilépö G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Ágy háló folyt."); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Háló szintezés"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Pontos szintezés"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Rács szintezés"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Háló szint"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Oldal pontok"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Térkép típus"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Háló térkép kimenet"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Host kimenet"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("CSV kimenet"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Nyomtató bizt.mentés"); + LSTR MSG_UBL_INFO_UBL = _UxGT("UBL infó kimenet"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Kitöltési költség"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Kézi kitöltés"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Okos kitöltés"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Háló kitöltés"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Minden érvénytelen"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Közelebbi érvénytelen"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Mindet finomhangolja"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Közelebbi finomhangolása"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Háló tárolás"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Memória foglalat"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Ágy háló betöltés"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Ágy háló mentés"); + LSTR MSG_MESH_LOADED = _UxGT("M117 Háló %i betöltve"); + LSTR MSG_MESH_SAVED = _UxGT("M117 Háló %i mentve"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Nincs tároló"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Hiba: UBL mentés"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Hiba: UBL visszaáll."); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-eltolás: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-eltolás leállítva"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Lépésröl lépésre UBL"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Hideg háló készítés"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2. Inteligens kitöltés"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Háló érvényesítés"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Minden finomítása"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Háló érvényesítés"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Minden finomítása"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Ágy háló mentése"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Mozgás..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("XY Szabad"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("X Mozgás"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Y Mozgás"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Z Mozgás"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Adagoló"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Adagoló *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("A fúvóka túl hideg"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Mozgás %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mozgás 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mozgás 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mozgás 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Sebesség"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Z ágy"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Fúvóka"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Fúvóka ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Fej Parkolva"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Fej Készenlétbe"); - PROGMEM Language_Str MSG_BED = _UxGT("Ágy"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Burkolat"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Hütés sebesség"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Hütés sebesség ="); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Tárolt Hütés ="); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra hütés sebesség"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra hütés sebesség ="); - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Hűtésvezérlés"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Alapjárat"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Automatikus Mód"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktív Sebesség"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Készenlét"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Folyás"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Folyás ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Konfiguráció"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Minimum"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Maximum"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Tényezö"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Automata Höfok"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Be"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Ki"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Hangolás"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Hangolás *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID hangolás kész"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Hangolási hiba. Rossz Adagoló."); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Hangolási hiba. Magas hömérséklet."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Hangolási hiba! Idötúllépés."); - PROGMEM Language_Str MSG_SELECT = _UxGT("Kiválaszt"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Kiválaszt *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Gyorsítás"); - PROGMEM Language_Str MSG_JERK = _UxGT("Rántás"); - PROGMEM Language_Str MSG_VA_JERK = LCD_STR_A _UxGT(" Ránt. Seb."); - PROGMEM Language_Str MSG_VB_JERK = LCD_STR_B _UxGT(" Ránt. Seb."); - PROGMEM Language_Str MSG_VC_JERK = LCD_STR_C _UxGT(" Ránt. Seb."); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("E Ránt. Seb."); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Csomopont Eltérés"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Sebesség"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Max Sebesség ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Max Sebesség ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Max Sebesség ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Max Sebesség ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Max Sebesség *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Min Sebesség"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Min Utazó.seb."); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Gyorsulás"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max Gyors. ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max Gyors. ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max Gyors. ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max Gyors. ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max Gyorsulás *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Visszahúzás"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Utazás"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Max Frekvencia"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min Elötolás"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Lépés/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" lépés/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" lépés/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" lépés/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E lépés/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*lépés/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Höfok"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Mozgatások"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Nyomtatószál"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E mm") SUPERSCRIPT_THREE _UxGT("-ben"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Szál. Átm."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Szál. Átm. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Kiadás mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Betöltés mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Haladó K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Haladó K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD kontraszt"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Mentés EEPROM"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Betöltés EEPROM"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Alapértelmezett"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("EEPROM Inicializálás"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("Hiba: EEPROM CRC"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("Hiba: EEPROM Index"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("Hiba: EEPROM Verzió"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Beállítások Mentve"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Tároló Frissítés"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Nyomtató Újraindítása"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Frissítés"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT(""); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Vezérlés"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Hangolás"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Nyomtatás Indítása"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Tovább"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Kezdet"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Állj"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Nyomtatás"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Újraindítás"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Mégse"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Kész"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Vissza"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Folytatás"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("Szüneteltetve..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Nyomtatás Szünetelés"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Nyomtatás folytatása"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Nyomtatás leállítása"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Objektum Nyomtatása"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Objektum Törlése"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Objektum Törlése ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Kiesés Helyreáll."); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Nyomtatás Tárolóról"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Nincs Tároló"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Alvás..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Katt a folytatáshoz..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Nyomtatás szünetelve"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Nyomtatás..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Nyomtatás leállítva"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Nyomtatás Kész"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Nincs mozgás."); - PROGMEM Language_Str MSG_KILLED = _UxGT("HALOTT! "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("MEGÁLLT! "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Visszahúzás mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Visszahúzás Cs. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Viszahúzás"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Ugrás mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Visszah.helyre mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Csere.Visszah.helyre mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Visszavonás V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S Vi.vo V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("AutoVisszah."); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Visszahúzás Távolság"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra Csere"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Tisztítási Távolság"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Szerszámcsere"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Emelés"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Fösebesség"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Visszah. Sebesség"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Fej Parkolás"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Visszahúzás Sebesség"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("FAN Sebesség"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("FAN idö"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto BE"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto KI"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Szerszámcsere"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Automata Csere"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Utolsó Adagoló"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Csere *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Szál csere"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Szál csere *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Szál betöltés"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Szál betöltés *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Szál eltávolítás"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Szál eltávolítás *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Mindet Eltávolít"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Tároló"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Tároló csere"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Tároló Kiadása"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z szonda tálcán kivül"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Ferdeség Faktor"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Önteszt"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Visszaállítás"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Elhelyez"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Telepít"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("SW-Mód"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("5V-Mód"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("OD-Mód"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Módok"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("BLTouch 5V Mód"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("BLTouch OD Mód"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Jelentés"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("VESZÉLY: A rossz beállítások kárt okozhatnak! Biztos továbblép?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Kezd TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Z Eltolás Teszt"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Mentés"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI Használ"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Z-Szonda Használ"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Z-Szonda Elhelyezés"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Elsö %s%s%s Kell"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Szonda Eltolások"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Szonda X Eltolás"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Szonda Y Eltolás"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Szonda Z Eltolás"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Mikrolépés X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Mikrolépés Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Mikrolépés Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Teljes"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Végállás megszakítva!"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Fütés hiba!"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Hiba: SZÜKSÉGTELEN HÖFOK"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("FÜTÉSKIMARADÁS"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("ÁGY FÜTÉSKIMARADÁS"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("KAMRA FÜTÉSKIMARADÁS"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Hiba: MAX Höfok"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Hiba: MIN Höfok"); - PROGMEM Language_Str MSG_HALTED = _UxGT("A NYOMTATÓ LEFAGYOTT"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Indítsd újra!"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("n"); // Csak egy karakter - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("ó"); // Csak egy karakter - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("p"); // Csak egy karakter - PROGMEM Language_Str MSG_HEATING = _UxGT("Fütés..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Hütés..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Ágy fütés..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Ágy hütés..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Kamra fütés..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Kamra hütés..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibráció"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("X Kalibrálás"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Y Kalibrálás"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Z Kalibrálás"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Központ Kalibrálás"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta Beállítások"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Kalibráció"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta Magasság Kalib."); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z Szonda Eltolás"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diag Rúd"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Magasság"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Sugár"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("A Nyomtatóról"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Nyomtató Infó"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-Pontos Szintezés"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Lineáris Szintezés"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilineáris Szintezés"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Egységes Ágy Szintezés"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Háló Szintezés"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Statisztikák"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Alaplap Infó"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termisztorok"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Adagolók"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Átviteli sebesség"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokoll"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Futáselemzés: KI"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Futáselemzés: BE"); + LSTR MSG_LED_CONTROL = _UxGT("LED vezérlés"); + LSTR MSG_LEDS = _UxGT("Világítás"); + LSTR MSG_LED_PRESETS = _UxGT("Beállított színek"); + LSTR MSG_SET_LEDS_RED = _UxGT("Piros"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Narancs"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Sárga"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Zöld"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Kék"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indigó"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Viola"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Fehér"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Alapérték"); + LSTR MSG_LED_CHANNEL_N = _UxGT("Csatorna ="); + LSTR MSG_LEDS2 = _UxGT("LED-ek #2"); + LSTR MSG_NEO2_PRESETS = _UxGT("Fény #2 megadott"); + LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Fényerö"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Egyéni szín"); + LSTR MSG_INTENSITY_R = _UxGT("Piros intenzitás"); + LSTR MSG_INTENSITY_G = _UxGT("Zöld intenzitás"); + LSTR MSG_INTENSITY_B = _UxGT("Kék intenzitás"); + LSTR MSG_INTENSITY_W = _UxGT("Fehér intenzitás"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Fényerö"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Munkalámpa"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Fényerösség"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("HELYTELEN NYOMTATÓ"); + LSTR MSG_MOVING = _UxGT("Mozgás..."); + LSTR MSG_FREE_XY = _UxGT("XY szabad"); + LSTR MSG_MOVE_X = _UxGT("X mozgás"); + LSTR MSG_MOVE_Y = _UxGT("Y mozgás"); + LSTR MSG_MOVE_Z = _UxGT("Z mozgás"); + LSTR MSG_MOVE_I = _UxGT("Mozgás ") LCD_STR_I; + LSTR MSG_MOVE_J = _UxGT("Mozgás ") LCD_STR_J; + LSTR MSG_MOVE_K = _UxGT("Mozgás ") LCD_STR_K; + LSTR MSG_MOVE_E = _UxGT("Adagoló"); + LSTR MSG_MOVE_EN = _UxGT("Adagoló *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("A fej túl hideg"); + LSTR MSG_MOVE_N_MM = _UxGT("Mozgás %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Mozgás 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Mozgás 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Mozgás 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Mozgás 100mm"); + LSTR MSG_MOVE_0001IN = _UxGT("Mozgás 0.025mm"); + LSTR MSG_MOVE_001IN = _UxGT("Mozgás 0.254mm"); + LSTR MSG_MOVE_01IN = _UxGT("Mozgás 2.54mm"); + LSTR MSG_MOVE_1IN = _UxGT("Mozgáá 25.4mm"); + LSTR MSG_SPEED = _UxGT("Sebesség"); + LSTR MSG_BED_Z = _UxGT("Z ágy"); + LSTR MSG_NOZZLE = _UxGT("Fej"); + LSTR MSG_NOZZLE_N = _UxGT("Fej ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Fej parkolva"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Fej készenlétbe"); + LSTR MSG_BED = _UxGT("Ágy"); + LSTR MSG_CHAMBER = _UxGT("Burkolat"); + LSTR MSG_COOLER = _UxGT("Lézer hütövíz"); + LSTR MSG_COOLER_TOGGLE = _UxGT("Hütö kapcsoló"); + LSTR MSG_FLOWMETER_SAFETY = _UxGT("Áramlásbiztonság"); + LSTR MSG_LASER = _UxGT("Lézer"); + LSTR MSG_FAN_SPEED = _UxGT("Hütés sebesség"); + LSTR MSG_FAN_SPEED_N = _UxGT("Hütés sebesség ="); + LSTR MSG_STORED_FAN_N = _UxGT("Tárolt hütés ="); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Extra hütés sebesség"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra hütés sebesség ="); + LSTR MSG_CONTROLLER_FAN = _UxGT("Hütésvezérlés"); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Alapjárat"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Automatikus mód"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktív sebesség"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Készenlét"); + LSTR MSG_FLOW = _UxGT("Folyás"); + LSTR MSG_FLOW_N = _UxGT("Folyás ~"); + LSTR MSG_CONTROL = _UxGT("Konfiguráció"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Minimum"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Maximum"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Tényezö"); + LSTR MSG_AUTOTEMP = _UxGT("Automata höfok"); + LSTR MSG_LCD_ON = _UxGT("Be"); + LSTR MSG_LCD_OFF = _UxGT("Ki"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID hangolás"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID hangolás *"); + LSTR MSG_PID_CYCLE = _UxGT("PID ciklus"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID hangolás kész"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Hangolási hiba. Rossz adagoló."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Hangolási hiba. Magas hömérséklet."); + LSTR MSG_PID_TIMEOUT = _UxGT("Hangolási hiba! Idötúllépés."); + LSTR MSG_SELECT = _UxGT("Kiválaszt"); + LSTR MSG_SELECT_E = _UxGT("Kiválaszt *"); + LSTR MSG_ACC = _UxGT("Gyorsítás"); + LSTR MSG_JERK = _UxGT("Rántás"); + LSTR MSG_VA_JERK = _UxGT("Seb.") LCD_STR_A _UxGT("-Rántás"); + LSTR MSG_VB_JERK = _UxGT("Seb.") LCD_STR_B _UxGT("-Rántás"); + LSTR MSG_VC_JERK = _UxGT("Seb.") LCD_STR_C _UxGT("-Rántás"); + LSTR MSG_VI_JERK = _UxGT("Seb.") LCD_STR_I _UxGT("-Rántás"); + LSTR MSG_VJ_JERK = _UxGT("Seb.") LCD_STR_J _UxGT("-Rántás"); + LSTR MSG_VK_JERK = _UxGT("Seb.") LCD_STR_K _UxGT("-Rántás"); + LSTR MSG_VE_JERK = _UxGT("E ránt. seb."); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Csomopont eltérés"); + LSTR MSG_VELOCITY = _UxGT("Sebesség"); + LSTR MSG_VMAX_A = _UxGT("Max Seb. ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("Max Seb. ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Max Seb. ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Max Seb. ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Max Seb. ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Max Seb. ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Max Seb. ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Max sebesség *"); + LSTR MSG_VMIN = _UxGT("Min sebesség"); + LSTR MSG_VTRAV_MIN = _UxGT("Min utazó.seb."); + LSTR MSG_ACCELERATION = _UxGT("Gyorsulás"); + LSTR MSG_AMAX_A = _UxGT("Max gyors. ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Max gyors. ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Max gyors. ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Max gyors. ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Max gyors. ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Max gyors. ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Max gyors. ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Max gyorsulás *"); + LSTR MSG_A_RETRACT = _UxGT("Visszahúzás"); + LSTR MSG_A_TRAVEL = _UxGT("Utazás"); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Max frekvencia"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min elötolás"); + LSTR MSG_STEPS_PER_MM = _UxGT("Lépés/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" Lépés/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" Lépés/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" Lépés/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" Lépés/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" Lépés/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" Lépés/mm"); + LSTR MSG_E_STEPS = _UxGT("E lépés/mm"); + LSTR MSG_EN_STEPS = _UxGT("*Lépés/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Höfok"); + LSTR MSG_MOTION = _UxGT("Mozgatások"); + LSTR MSG_FILAMENT = _UxGT("Nyomtatószál"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E mm³-ben"); + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit mm³-ben"); + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Szál. átm."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Szál. átm. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Kiadás mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Betöltés mm"); + LSTR MSG_ADVANCE_K = _UxGT("Haladó K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Haladó K *"); + LSTR MSG_CONTRAST = _UxGT("LCD kontraszt"); + LSTR MSG_STORE_EEPROM = _UxGT("Mentés EEPROM"); + LSTR MSG_LOAD_EEPROM = _UxGT("Betöltés EEPROM"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Alapértelmezett"); + LSTR MSG_INIT_EEPROM = _UxGT("EEPROM inicializálás"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("Hiba: EEPROM CRC"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Hiba: EEPROM index"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Hiba: EEPROM verzió"); + LSTR MSG_SETTINGS_STORED = _UxGT("Beállítások mentve"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Tároló frissítés"); + LSTR MSG_RESET_PRINTER = _UxGT("Nyomtató újraindítása"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Frissítés"); + LSTR MSG_INFO_SCREEN = _UxGT(""); + LSTR MSG_PREPARE = _UxGT("Vezérlés"); + LSTR MSG_TUNE = _UxGT("Hangolás"); + LSTR MSG_POWER_MONITOR = _UxGT("Teljesítménymonitor"); + LSTR MSG_CURRENT = _UxGT("Jelenlegi"); + LSTR MSG_VOLTAGE = _UxGT("Feszültség"); + LSTR MSG_POWER = _UxGT("Energia"); + LSTR MSG_START_PRINT = _UxGT("Nyomtatás indítása"); + LSTR MSG_BUTTON_NEXT = _UxGT("Tovább"); + LSTR MSG_BUTTON_INIT = _UxGT("Kezdet"); + LSTR MSG_BUTTON_STOP = _UxGT("Állj"); + LSTR MSG_BUTTON_PRINT = _UxGT("Nyomtatás"); + LSTR MSG_BUTTON_RESET = _UxGT("Újraindítás"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Mellöz"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Mégse"); + LSTR MSG_BUTTON_DONE = _UxGT("Kész"); + LSTR MSG_BUTTON_BACK = _UxGT("Vissza"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Folytatás"); + LSTR MSG_BUTTON_SKIP = _UxGT("Kihagy"); + LSTR MSG_PAUSING = _UxGT("Szüneteltetve..."); + LSTR MSG_PAUSE_PRINT = _UxGT("Nyomtatás szünetelés"); + LSTR MSG_RESUME_PRINT = _UxGT("Nyomtatás folytatása"); + LSTR MSG_HOST_START_PRINT = _UxGT("Hoszt indítás"); + LSTR MSG_STOP_PRINT = _UxGT("Nyomtatás leállítása"); + LSTR MSG_END_LOOPS = _UxGT("Hurok ismétlés vége"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Objektum nyomtatása"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Objektum törlése"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Objektum törlése ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Kiesés helyreáll."); + LSTR MSG_MEDIA_MENU = _UxGT("Nyomtatás tárolóról"); + LSTR MSG_NO_MEDIA = _UxGT("Nincs tároló"); + LSTR MSG_DWELL = _UxGT("Alvás..."); + LSTR MSG_USERWAIT = _UxGT("Katt a folytatáshoz..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Nyomtatás szünetelve"); + LSTR MSG_PRINTING = _UxGT("Nyomtatás..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Nyomtatás leállítva"); + LSTR MSG_PRINT_DONE = _UxGT("Nyomtatás kész"); + LSTR MSG_NO_MOVE = _UxGT("Nincs mozgás."); + LSTR MSG_KILLED = _UxGT("HALOTT! "); + LSTR MSG_STOPPED = _UxGT("MEGÁLLT! "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Visszahúzás mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Visszahúzás cs. mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Viszahúzás"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Ugrás mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Visszah.helyre mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Csere.visszah.helyre mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Visszahúzás V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S Vissza.h V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto visszah."); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Visszahúzás távolság"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra csere"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Tisztítási távolság"); + LSTR MSG_TOOL_CHANGE = _UxGT("Szerszámcsere"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z emelés"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Fösebesség"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Visszah. sebesség"); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Fej parkolás"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Visszav.visszah. sebesség"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("FAN sebesség"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("FAN idö"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto BE"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Auto KI"); + LSTR MSG_TOOL_MIGRATION = _UxGT("Szerszámcsere"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Automata csere"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Utolsó adagoló"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Csere *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Szálcsere"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Szálcsere *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Szál betöltés"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Szál betöltés *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Szál eltávolítás"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Szál eltávolítás *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Mindet eltávolít"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Tároló"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Tároló csere"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Tároló Kiadása"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z szonda tálcán kivül"); + LSTR MSG_SKEW_FACTOR = _UxGT("Ferdeség faktor"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Önteszt"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Visszaállítás"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Elhelyez"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Telepít"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("SW-Mód"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("5V-Mód"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("OD-Mód"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Módok"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("BLTouch 5V mód"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("BLTouch OD mód"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Jelentés"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("VESZÉLY: A rossz beállítások kárt okozhatnak! Biztos továbblép?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Kezd TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Z eltolás teszt"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Mentés"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI használ"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Z-Szonda telepítés"); + LSTR MSG_MANUAL_STOW = _UxGT("Z-Szonda elhelyezés"); + LSTR MSG_HOME_FIRST = _UxGT("Elöször %s%s%s kell"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Szonda eltolások"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("X szonda eltolás"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y szonda eltolás"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z szonda eltolás"); + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Fej az ágyhoz"); + LSTR MSG_BABYSTEP_X = _UxGT("Mikrolépés X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Mikrolépés Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Mikrolépés Z"); + LSTR MSG_BABYSTEP_I = _UxGT("Mikrolépés ") LCD_STR_I; + LSTR MSG_BABYSTEP_J = _UxGT("Mikrolépés ") LCD_STR_J; + LSTR MSG_BABYSTEP_K = _UxGT("Mikrolépés ") LCD_STR_K; + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Teljes"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Végállás megszakítva!"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Fütés hiba!"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Hiba: SZÜKSÉGTELEN HÖFOK"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("FÜTÉS KIMARADÁS"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("ÁGY FÜTÉS KIMARADÁS"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("KAMRA FÜTÉS KIMARADÁS"); + LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("Hütés kimaradás"); + LSTR MSG_COOLING_FAILED = _UxGT("Hütés sikertelen"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Hiba: MAX höfok"); + LSTR MSG_ERR_MINTEMP = _UxGT("Hiba: MIN höfok"); + LSTR MSG_HALTED = _UxGT("A NYOMTATÓ LEÁLLT"); + LSTR MSG_PLEASE_RESET = _UxGT("Indítsd újra!"); + LSTR MSG_SHORT_DAY = _UxGT("n"); // Csak egy karakter + LSTR MSG_SHORT_HOUR = _UxGT("ó"); // Csak egy karakter + LSTR MSG_SHORT_MINUTE = _UxGT("p"); // Csak egy karakter + LSTR MSG_HEATING = _UxGT("Fütés..."); + LSTR MSG_COOLING = _UxGT("Hütés..."); + LSTR MSG_BED_HEATING = _UxGT("Ágy fütés..."); + LSTR MSG_BED_COOLING = _UxGT("Ágy hütés..."); + LSTR MSG_PROBE_HEATING = _UxGT("Szonda fütése..."); + LSTR MSG_PROBE_COOLING = _UxGT("Szonda hütése..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Kamra fütés..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Kamra hütés..."); + LSTR MSG_LASER_COOLING = _UxGT("Lézer hütés..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta kalibráció"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("X kalibrálás"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Y kalibrálás"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Z kalibrálás"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Központ kalibrálás"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Delta beállítások"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto kalibráció"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta magasság kalib."); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z eltolás"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Diag rúd"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Magasság"); + LSTR MSG_DELTA_RADIUS = _UxGT("Sugár"); + LSTR MSG_INFO_MENU = _UxGT("A Nyomtatóról"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Nyomtató infó"); + LSTR MSG_3POINT_LEVELING = _UxGT("3-Pontos szintezés"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Lineáris szintezés"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Bilineáris szintezés"); + LSTR MSG_UBL_LEVELING = _UxGT("Egységes ágy szintezés"); + LSTR MSG_MESH_LEVELING = _UxGT("Háló szintezés"); + LSTR MSG_MESH_DONE = _UxGT("Háló szintezés kész"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Statisztikák"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Alaplap infó"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termisztorok"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Adagolók"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Átviteli sebesség"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protokol"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Futáselemzés: KI"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Futáselemzés: BE"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Fej üresjárati idök."); + + LSTR MSG_CASE_LIGHT = _UxGT("Munkalámpa"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Fényerösség"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("HELYTELEN NYOMTATÓ"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Nyomtatás Számláló"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Befejezett"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Összes nyomtatási idö"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Leghosszabb munkaidö"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Összes anyag"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Nyomtatás számláló"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Befejezett"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Összes nyomtatási idö"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Leghosszabb munkaidö"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Összes anyag"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Nyomtatások"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Befejezett"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Összes"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Leghosszabb"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Kiadott"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Nyomtatások"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Befejezett"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Összes"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Leghosszabb"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Kiadott"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Min Höfok"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Höfok"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Meghajtási Erö"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Meghajtó %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Meghajtó %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Meghajtó %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Meghajtó %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CSATLAKOZÁSI HIBA"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Írása"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("NYOMTATÓSZÁL CSERE"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("NYOMTATÁS SZÜNETEL"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("SZÁL BETÖLTÉS"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("SZÁL ELTÁVOLÍTÁS"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("FOLYTATÁSI OPCIÓ:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Tisztítsd meg"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Folytatás"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Fúvóka: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Túlfutás Szenzor"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Túlfutás Táv. mm"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Tájolási hiba"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Szondázás hiba"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Min höfok"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Max höfok"); + LSTR MSG_INFO_PSU = _UxGT("PSU"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Meghajtási erö"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Meghajtó %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Meghajtó %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Meghajtó %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Meghajtó %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Meghajtó %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Meghajtó %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E meghajtó %"); + LSTR MSG_ERROR_TMC = _UxGT("TMC CSATLAKOZÁSI HIBA"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM írása"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("NYOMTATÓSZÁL CSERE"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("NYOMTATÁS SZÜNETEL"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("SZÁL BETÖLTÉS"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("SZÁL ELTÁVOLÍTÁS"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("FOLYTATÁSI OPCIÓ:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Tisztítsd meg"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Folytatás"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Fej: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Túlfutás szenzor"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Túlfutás táv. mm"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Tájolási hiba"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Szondázás hiba"); + + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("SZÁLVÁLASZTÁS"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("MMU szoftver feltöltése!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU figyelmeztetés."); + LSTR MSG_MMU2_RESUME = _UxGT("Nyomtatás folytatása"); + LSTR MSG_MMU2_RESUMING = _UxGT("Folytatás..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Szál betöltése"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Összes betöltése"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Fej betöltése"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Szál kidobás"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Szál kidobás ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Kiadja a szálat"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Szál betölt. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Szál kidobás. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Szál kiadása...."); + LSTR MSG_MMU2_ALL = _UxGT("Mind"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Nyomtatószál ~"); + LSTR MSG_MMU2_RESET = _UxGT("MMU újraindítás"); + LSTR MSG_MMU2_RESETTING = _UxGT("MMU újraindul..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Kidob, kattint"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("SZÁLVÁLASZTÁS"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("MMU Szoftver Feltöltése!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Figyelmeztetés."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Nyomtatás Folytatása"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Folytatás..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Szál Betöltése"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Összes Betöltése"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Fúvóka Betöltése"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Szál Kiadása"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Szál Kiadása ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Kiadja a szálat"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Szál betölt. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Szál kiadás...."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Szál kiadása...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Mind"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Nyomtatószál ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("MMU Újraindítás"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("MMU Újraindul..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Eltávolít, kattint"); + LSTR MSG_MIX = _UxGT("Kever"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Összetevö ="); + LSTR MSG_MIXER = _UxGT("Keverö"); + LSTR MSG_GRADIENT = _UxGT("Színátm."); + LSTR MSG_FULL_GRADIENT = _UxGT("Teljes színátm."); + LSTR MSG_TOGGLE_MIX = _UxGT("Váltás keverésre"); + LSTR MSG_CYCLE_MIX = _UxGT("Ciklikus keverés"); + LSTR MSG_GRADIENT_MIX = _UxGT("Színátm. keverés"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Fordított színátm."); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Aktív V-szerszám"); + LSTR MSG_START_VTOOL = _UxGT("Kezdés V-szerszám"); + LSTR MSG_END_VTOOL = _UxGT(" Vége V-szerszám"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Ál V-szerszám"); + LSTR MSG_RESET_VTOOLS = _UxGT("Újra V-szerszám"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Gyors V-szerszám Kev."); + LSTR MSG_VTOOLS_RESET = _UxGT("V-szersz. visszaáll."); + LSTR MSG_START_Z = _UxGT("Kezdés Z:"); + LSTR MSG_END_Z = _UxGT(" Vége Z:"); - PROGMEM Language_Str MSG_MIX = _UxGT("Kever"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Összetevö ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Keverö"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Színátm."); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Teljes Színátm."); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Váltás Keverésre"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Ciklikus Keverés"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Színátm. Keverés"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Fordított Színátm."); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Aktív V-szerszám"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Kezdés V-szerszám"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" Vége V-szerszám"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Ál V-szerszám"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Újra V-szerszám"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Gyors V-szerszám Kev."); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-szersz. visszaáll."); - PROGMEM Language_Str MSG_START_Z = _UxGT("Kezdés Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" Vége Z:"); + LSTR MSG_GAMES = _UxGT("Játékok"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Maze"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Játékok"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Maze"); + LSTR MSG_BAD_PAGE = _UxGT("Rossz oldalindex"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Rossz oldalsebesség"); + + LSTR MSG_EDIT_PASSWORD = _UxGT("Jelszó szerkesztése"); + LSTR MSG_LOGIN_REQUIRED = _UxGT("Belépés szükséges"); + LSTR MSG_PASSWORD_SETTINGS = _UxGT("Jelszóbeállítások"); + LSTR MSG_ENTER_DIGIT = _UxGT("Írja be a számokat"); + LSTR MSG_CHANGE_PASSWORD = _UxGT("Jelszó Beáll/Szerk"); + LSTR MSG_REMOVE_PASSWORD = _UxGT("Jelszó törlése"); + LSTR MSG_PASSWORD_SET = _UxGT("A jelszó "); + LSTR MSG_START_OVER = _UxGT("Újrakezdés"); + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Mentsd el!"); + LSTR MSG_PASSWORD_REMOVED = _UxGT("Jelszó törölve"); // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Nyomj gombot", "nyomtatás folytatáshoz")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkolás...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Várj míg", "szál csere", "indítás")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Szál behelyezés", "majd nyomj gombot", "a folytatáshoz")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Nyomj gombot", "a fúvóka fűtéséhez")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Fúvóka fűtése", "Kérlek várj...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Várj a", "szál kiadására")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Várj a", "szál betöltésére")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Várj a", "szál tisztításra")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Kattints a készre", "szál tiszta")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Várj a nyomtatóra", "majd folytat...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Nyomj gombot", "nyomtatás folytatáshoz")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkolás...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Várj míg", "szálcsere", "indítás")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Szál behelyezés", "majd nyomj gombot", "a folytatáshoz")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Nyomj gombot", "a fej fütéséhez")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Fej fütése", "Kérlek várj...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Várj a", "szál kiadására")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Várj a", "szál betöltésére")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Várj a", "szál tisztításra")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Kattints a készre", "szál tiszta")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Várj a nyomtatóra", "majd folytat...")); + #else + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Katt a folytatáshoz")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkolás...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Kérlek várj...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Behelyez majd katt")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Katt a fütéshez")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Fütés...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Kiadás...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Betöltés...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Tisztítás...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Katt ha kész")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Folytatás...")); + #endif + LSTR MSG_TMC_DRIVERS = _UxGT("TMC meghajtók"); + LSTR MSG_TMC_CURRENT = _UxGT("Meghajtó áram"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hibrid küszöbérték"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Motoros kezdöpont"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Léptetö mód"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop mód"); + LSTR MSG_SERVICE_RESET = _UxGT("Újraindítás"); + LSTR MSG_SERVICE_IN = _UxGT(" be:"); + LSTR MSG_BACKLASH = _UxGT("Holtjáték"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Korrekció"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Simítás"); + + LSTR MSG_LEVEL_X_AXIS = _UxGT("X tengely szint"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Önkalibrálás"); + #if ENABLED(TOUCH_UI_FTDI_EVE) + LSTR MSG_HEATER_TIMEOUT = _UxGT("Tétlenségi idökorlát, a hömérséklet csökkent. Nyomd meg az OK gombot az ismételt felfütéshez, és újra a folytatáshoz."); #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Katt a folytatáshoz")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkolás...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Kérlek Várj...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Behelyez majd katt")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Katt a fűtéshez")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Fűtés...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Kiadás...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Betöltés...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Tisztítás...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Katt ha kész")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Folytatás...")); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Fütés idökorlátja"); #endif - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC Meghajtók"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Meghajtó áram"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hibrid Küszöbérték"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Motoros Kezdöpont"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Léptetö Mód"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Mód"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Újraindítás"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" be:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Holtjáték"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korrekció"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Simítás"); + LSTR MSG_REHEAT = _UxGT("Újrafüt"); + LSTR MSG_REHEATING = _UxGT("Újrafütés..."); + + LSTR MSG_PROBE_WIZARD = _UxGT("Z szonda varázsló"); + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Z referencia mérés"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Menj a próba pontra"); + + LSTR MSG_SOUND = _UxGT("Hang"); + + LSTR MSG_TOP_LEFT = _UxGT("Bal felsö"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Bal alsó"); + LSTR MSG_TOP_RIGHT = _UxGT("Jobb felsö"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Jobb alsó"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Kalibrálás befejezve"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Kalibrálási hiba"); + + LSTR MSG_DRIVER_BACKWARD = _UxGT(" meghajtók hátra"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("X Tengely Szint"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Önkalibrálás"); - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Fűtéskimaradás"); - PROGMEM Language_Str MSG_REHEAT = _UxGT("Újrafűt"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Újrafűtés..."); + LSTR MSG_SD_CARD = _UxGT("SD Kártya"); + LSTR MSG_USB_DISK = _UxGT("USB Lemez"); } #if FAN_COUNT == 1 diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 5bfb6aa9aa22..e00556798520 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -40,643 +40,694 @@ namespace Language_it { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 1; - PROGMEM Language_Str LANGUAGE = _UxGT("Italiano"); + constexpr uint8_t CHARSIZE = 1; + LSTR LANGUAGE = _UxGT("Italiano"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" pronta."); - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("Si"); - PROGMEM Language_Str MSG_NO = _UxGT("No"); - PROGMEM Language_Str MSG_BACK = _UxGT("Indietro"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Annullando..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Media inserito"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Media rimosso"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Aspettando media"); - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("Inizial.SD fallita"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Err.leggendo media"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("Dispos.USB rimosso"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Avvio USB fallito"); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Overflow subchiamate"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Finecor."); // Max 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Finecorsa Soft"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menu principale"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Impostaz. avanzate"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Configurazione"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autostart"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Disabilita Motori"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu di debug"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test barra avanzam."); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Auto Home"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Home asse X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Home asse Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Home asse Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Allineam.automat. Z"); - PROGMEM Language_Str MSG_ITERATION = _UxGT("Iterazione G34: %i"); - PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Precisione in calo!"); - PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Precisione raggiunta"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Home assi XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Premi per iniziare"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Punto successivo"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Livel. terminato!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Fade Height"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Imp. offset home"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offset applicato"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Imposta Origine"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Tramming assistito"); - PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Wizard Tramming"); - PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Selez. origine"); - PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Ultimo valore "); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" pronta."); + LSTR MSG_YES = _UxGT("Si"); + LSTR MSG_NO = _UxGT("No"); + LSTR MSG_BACK = _UxGT("Indietro"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Annullando..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Media inserito"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Media rimosso"); + LSTR MSG_MEDIA_WAITING = _UxGT("Aspettando media"); + LSTR MSG_SD_INIT_FAIL = _UxGT("Inizial.SD fallita"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Err.leggendo media"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("Dispos.USB rimosso"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Avvio USB fallito"); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Overflow subchiamate"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Finecor."); // Max 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Finecorsa Soft"); + LSTR MSG_MAIN = _UxGT("Menu principale"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Impostaz. avanzate"); + LSTR MSG_CONFIGURATION = _UxGT("Configurazione"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Esegui files auto"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Disabilita Motori"); + LSTR MSG_DEBUG_MENU = _UxGT("Menu di debug"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test barra avanzam."); + LSTR MSG_AUTO_HOME = _UxGT("Auto Home"); + LSTR MSG_AUTO_HOME_X = _UxGT("Home X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Home Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Home Z"); + LSTR MSG_AUTO_HOME_I = _UxGT("Home ") LCD_STR_I; + LSTR MSG_AUTO_HOME_J = _UxGT("Home ") LCD_STR_J; + LSTR MSG_AUTO_HOME_K = _UxGT("Home ") LCD_STR_K; + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Allineam.automat. Z"); + LSTR MSG_ITERATION = _UxGT("Iterazione G34: %i"); + LSTR MSG_DECREASING_ACCURACY = _UxGT("Precisione in calo!"); + LSTR MSG_ACCURACY_ACHIEVED = _UxGT("Precisione raggiunta"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Home assi XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Premi per iniziare"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Punto successivo"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Livel. terminato!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Fade Height"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Imp. offset home"); + LSTR MSG_HOME_OFFSET_X = _UxGT("Offset home X"); + LSTR MSG_HOME_OFFSET_Y = _UxGT("Offset home Y"); + LSTR MSG_HOME_OFFSET_Z = _UxGT("Offset home Z"); + LSTR MSG_HOME_OFFSET_I = _UxGT("Offset home ") LCD_STR_I; + LSTR MSG_HOME_OFFSET_J = _UxGT("Offset home ") LCD_STR_J; + LSTR MSG_HOME_OFFSET_K = _UxGT("Offset home ") LCD_STR_K; + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offset applicato"); + LSTR MSG_SET_ORIGIN = _UxGT("Imposta Origine"); + LSTR MSG_TRAMMING_WIZARD = _UxGT("Wizard Tramming"); + LSTR MSG_SELECT_ORIGIN = _UxGT("Selez. origine"); + LSTR MSG_LAST_VALUE_SP = _UxGT("Ultimo valore "); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Preriscalda ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Preriscalda ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Ugello"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Ugello ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Tutto"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Piatto"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" conf"); + LSTR MSG_PREHEAT_1 = _UxGT("Preriscalda ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Preriscalda ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Ugello"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Ugello ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Tutto"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" Piatto"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Preris.") PREHEAT_1_LABEL _UxGT(" conf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Preriscalda $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Preriscalda $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Preris.$ Ugello"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Preris.$ Ugello ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Preris.$ Tutto"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Preris.$ Piatto"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Preris.$ conf"); + LSTR MSG_PREHEAT_M = _UxGT("Preriscalda $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Preriscalda $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Preris.$ Ugello"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Preris.$ Ugello ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Preris.$ Tutto"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Preris.$ Piatto"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Preris.$ conf"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Prerisc.personal."); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Raffredda"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Prerisc.personal."); + LSTR MSG_COOLDOWN = _UxGT("Raffredda"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frequenza"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Controllo laser"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Controllo mandrino"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Potenza laser"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Potenza mandrino"); - PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Alterna Laser"); - PROGMEM Language_Str MSG_LASER_PULSE_MS = _UxGT("ms impulso di test"); - PROGMEM Language_Str MSG_LASER_FIRE_PULSE = _UxGT("Spara impulso"); - PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Alterna mandrino"); - PROGMEM Language_Str MSG_SPINDLE_FORWARD = _UxGT("Mandrino in avanti"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Inverti mandrino"); - - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Accendi aliment."); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Spegni aliment."); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Estrudi"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Ritrai"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Muovi Asse"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Livella piano"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Livella piano"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Calibra piano"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Regola la vite finche' la sonda non rileva il piano."); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Tolleranza raggiunta su tutti gli angoli. Piano livellato!"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Punti buoni: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Ultimo Z: "); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Prossimo punto"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mesh"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Modifica Mesh"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Modif. Mesh Fermata"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Punto sondato"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Indice X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Indice Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valore di Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Comandi personaliz."); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("Test sonda M48"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("Punto M48"); - PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Sonda oltre i limiti"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Deviazione"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("Modo IDEX"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Strumenti Offsets"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicazione"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copia speculare"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Pieno controllo"); - PROGMEM Language_Str MSG_IDEX_DUPE_GAP = _UxGT("X-Gap-X duplicato"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2° ugello X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2° ugello Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2° ugello Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("G29 in corso"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Strumenti UBL"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Livel.letto unificato"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Punto inclinaz."); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Mesh Manuale"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Metti spes. e misura"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Misura"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Rimuovi e mis.piatto"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Spostamento succes."); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Attiva UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Disattiva UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Temp. Piatto"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. Piatto"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. Ugello"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. Ugello"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Modifica Mesh"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Modif.Mesh personal."); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Ritocca Mesh"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Modif.Mesh fatta"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Crea Mesh personal."); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Crea Mesh"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frequenza"); + LSTR MSG_LASER_MENU = _UxGT("Controllo laser"); + LSTR MSG_SPINDLE_MENU = _UxGT("Controllo mandrino"); + LSTR MSG_LASER_POWER = _UxGT("Potenza laser"); + LSTR MSG_SPINDLE_POWER = _UxGT("Potenza mandrino"); + LSTR MSG_LASER_TOGGLE = _UxGT("Alterna Laser"); + LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Alterna soffiatore"); + LSTR MSG_LASER_ASSIST_TOGGLE = _UxGT("Alterna aria supp."); + LSTR MSG_LASER_PULSE_MS = _UxGT("ms impulso di test"); + LSTR MSG_LASER_FIRE_PULSE = _UxGT("Spara impulso"); + LSTR MSG_FLOWMETER_FAULT = _UxGT("Err.flusso refrig."); + LSTR MSG_SPINDLE_TOGGLE = _UxGT("Alterna mandrino"); + LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Alterna vuoto"); + LSTR MSG_SPINDLE_FORWARD = _UxGT("Mandrino in avanti"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Inverti mandrino"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Accendi aliment."); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Spegni aliment."); + LSTR MSG_EXTRUDE = _UxGT("Estrudi"); + LSTR MSG_RETRACT = _UxGT("Ritrai"); + LSTR MSG_MOVE_AXIS = _UxGT("Muovi Asse"); + LSTR MSG_BED_LEVELING = _UxGT("Livella piano"); + LSTR MSG_LEVEL_BED = _UxGT("Livella piano"); + LSTR MSG_BED_TRAMMING = _UxGT("Tramming piano"); + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Regola la vite finché la sonda non rileva il piano."); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Tolleranza raggiunta su tutti gli angoli. Piano livellato!"); + LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Punti buoni: "); + LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Ultimo Z: "); + LSTR MSG_NEXT_CORNER = _UxGT("Prossimo punto"); + LSTR MSG_MESH_EDITOR = _UxGT("Editor Mesh"); + LSTR MSG_EDIT_MESH = _UxGT("Modifica Mesh"); + LSTR MSG_EDITING_STOPPED = _UxGT("Modif. Mesh Fermata"); + LSTR MSG_PROBING_POINT = _UxGT("Punto sondato"); + LSTR MSG_MESH_X = _UxGT("Indice X"); + LSTR MSG_MESH_Y = _UxGT("Indice Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Valore di Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Comandi personaliz."); + LSTR MSG_M48_TEST = _UxGT("Test sonda M48"); + LSTR MSG_M48_POINT = _UxGT("Punto M48"); + LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Sonda oltre i limiti"); + LSTR MSG_M48_DEVIATION = _UxGT("Deviazione"); + LSTR MSG_IDEX_MENU = _UxGT("Modo IDEX"); + LSTR MSG_OFFSETS_MENU = _UxGT("Strumenti Offsets"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicazione"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Copia speculare"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Pieno controllo"); + LSTR MSG_IDEX_DUPE_GAP = _UxGT("X-Gap-X duplicato"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2° ugello X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2° ugello Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2° ugello Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("G29 in corso"); + LSTR MSG_UBL_TOOLS = _UxGT("Strumenti UBL"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Livel.letto unificato"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Punto inclinaz."); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Mesh Manuale"); + LSTR MSG_UBL_MESH_WIZARD = _UxGT("Creaz.guid.mesh UBL"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Metti spes. e misura"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Misura"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Rimuovi e mis.piatto"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Spostamento succes."); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Attiva UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Disattiva UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp. Piatto"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. Piatto"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. Ugello"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. Ugello"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Modifica Mesh"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Modif.Mesh personal."); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Ritocca Mesh"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Modif.Mesh fatta"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Crea Mesh personal."); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Crea Mesh"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Crea Mesh ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Valida Mesh ($)"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Crea Mesh ($)"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Valida Mesh ($)"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Crea Mesh a freddo"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Aggiusta Alt. Mesh"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Altezza"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Valida Mesh"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 riscald.letto"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 riscald.ugello"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Priming manuale..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Prime a lung.fissa"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Priming terminato"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Annullato"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Uscita da G26"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valida Mesh pers."); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Continua Mesh"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Livell. Mesh"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Livell. 3 Punti"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Livell. Griglia Mesh"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Livella Mesh"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Punti laterali"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Tipo di Mappa"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Esporta Mappa"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Esporta per Host"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Esporta in CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Backup esterno"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Esporta Info UBL"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Riempimento"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Riempimento Manuale"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Riempimento Smart"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Riempimento Mesh"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Invalida Tutto"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalid.Punto Vicino"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Ritocca All"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Ritocca Punto Vicino"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Salvate"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Slot di memoria"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Carica Mesh Piatto"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Salva Mesh Piatto"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Mesh %i caricata"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Mesh %i salvata"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Nessuna memoria"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Err: Salvataggio UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Err: Ripristino UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Fermato"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL passo passo"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Crea Mesh a freddo"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Riempimento Smart"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Valida Mesh"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Ritocca All"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Valida Mesh"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Ritocca All"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Salva Mesh Piatto"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Crea Mesh a freddo"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Aggiusta Alt. Mesh"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Altezza"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Valida Mesh"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 riscald.letto"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 riscald.ugello"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Priming manuale..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Prime a lung.fissa"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Priming terminato"); + LSTR MSG_G26_CANCELED = _UxGT("G26 Annullato"); + LSTR MSG_G26_LEAVING = _UxGT("Uscita da G26"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Valida Mesh pers."); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Continua Mesh"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Livell. Mesh"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Livell. 3 Punti"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Livell. Griglia Mesh"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Livella Mesh"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Punti laterali"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Tipo di Mappa"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Esporta Mappa"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Esporta per Host"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Esporta in CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Backup esterno"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Esporta Info UBL"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Riempimento"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Riempimento Manuale"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Riempimento Smart"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Riempimento Mesh"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Invalida Tutto"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalid.Punto Vicino"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Ritocca All"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Ritocca Punto Vicino"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Salvate"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Slot di memoria"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Carica Mesh Piatto"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Salva Mesh Piatto"); + LSTR MSG_MESH_LOADED = _UxGT("Mesh %i caricata"); + LSTR MSG_MESH_SAVED = _UxGT("Mesh %i salvata"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Nessuna memoria"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Err: Salvataggio UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Err: Ripristino UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Fermato"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL passo passo"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Crea Mesh a freddo"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Riempimento Smart"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Valida Mesh"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Ritocca All"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Valida Mesh"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Ritocca All"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Salva Mesh Piatto"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Controllo LED"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Luci"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Preset luce"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Rosso"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Arancione"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Giallo"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Verde"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Blu"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indaco"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Viola"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Bianco"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Predefinito"); - PROGMEM Language_Str MSG_LED_CHANNEL_N = _UxGT("Canale ="); - PROGMEM Language_Str MSG_LEDS2 = _UxGT("Luci #2"); - PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Luce #2 Presets"); - PROGMEM Language_Str MSG_NEO2_BRIGHTNESS = _UxGT("Luminosità"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Luci personalizzate"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Intensità rosso"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Intensità verde"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Intensità blu"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Intensità bianco"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Luminosità"); + LSTR MSG_LED_CONTROL = _UxGT("Controllo LED"); + LSTR MSG_LEDS = _UxGT("Luci"); + LSTR MSG_LED_PRESETS = _UxGT("Presets luce"); + LSTR MSG_SET_LEDS_RED = _UxGT("Rosso"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Arancione"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Giallo"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Verde"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Blu"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indaco"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Viola"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Bianco"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Predefinito"); + LSTR MSG_LED_CHANNEL_N = _UxGT("Canale ="); + LSTR MSG_LEDS2 = _UxGT("Luci #2"); + LSTR MSG_NEO2_PRESETS = _UxGT("Presets luce #2"); + LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Luminosità"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Luci personalizzate"); + LSTR MSG_INTENSITY_R = _UxGT("Intensità rosso"); + LSTR MSG_INTENSITY_G = _UxGT("Intensità verde"); + LSTR MSG_INTENSITY_B = _UxGT("Intensità blu"); + LSTR MSG_INTENSITY_W = _UxGT("Intensità bianco"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Luminosità"); - PROGMEM Language_Str MSG_MOVING = _UxGT("In movimento..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("XY liberi"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Muovi X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Muovi Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Muovi Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Estrusore"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Estrusore *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Ugello freddo"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Muovi di %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Muovi di 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Muovi di 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Muovi di 10mm"); - PROGMEM Language_Str MSG_MOVE_0001IN = _UxGT("Muovi di 0.001in"); - PROGMEM Language_Str MSG_MOVE_001IN = _UxGT("Muovi di 0.01in"); - PROGMEM Language_Str MSG_MOVE_01IN = _UxGT("Muovi di 0.1in"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Velocità"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Piatto Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Ugello"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Ugello ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Ugello parcheggiato"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Ugello in pausa"); - PROGMEM Language_Str MSG_BED = _UxGT("Piatto"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Camera"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Vel. ventola"); // Max 15 characters - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Vel. ventola ~"); // Max 15 characters - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Ventola mem. ~"); // Max 15 characters - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra vel.vent."); // Max 15 characters - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra v.vent. ~"); // Max 15 characters - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Controller vent."); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Vel. inattivo"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Modo autom."); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Vel. attivo"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Tempo inattivo"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Flusso"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flusso ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Controllo"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Autotemp"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("On"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Off"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("Calibrazione PID"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("Calibraz. PID *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("Calibr.PID eseguita"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Calibrazione fallita. Estrusore errato."); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Calibrazione fallita. Temperatura troppo alta."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Calibrazione fallita! Tempo scaduto."); - PROGMEM Language_Str MSG_SELECT = _UxGT("Seleziona"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Seleziona *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Accel"); - PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-jerk"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Deviaz. giunzioni"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocità"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VTrav min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Accelerazione"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-Ritrazione"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-Spostamento"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequenza max"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Feed min"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Passi/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("passi/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("passi/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("passi/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("Epassi/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*passi/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Movimento"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filamento"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("Limite E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("Limite E *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Diam. filo"); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Diam. filo *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Rimuovi mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Carica mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("K Avanzamento"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("K Avanzamento *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Contrasto LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Salva impostazioni"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Carica impostazioni"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Ripristina imp."); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Inizializza EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("Err: CRC EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("Err: Indice EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("Err: Versione EEPROM"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Impostazioni mem."); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Aggiorna media"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Resetta stampante"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Aggiorna"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Schermata info"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Prepara"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Regola"); - PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("Controllo aliment."); - PROGMEM Language_Str MSG_CURRENT = _UxGT("Corrente"); - PROGMEM Language_Str MSG_VOLTAGE = _UxGT("Tensione"); - PROGMEM Language_Str MSG_POWER = _UxGT("Potenza"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Avvia stampa"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Prossimo"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Inizializza"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Stop"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Stampa"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Resetta"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("Ignora"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Annulla"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Fatto"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Indietro"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Procedi"); - PROGMEM Language_Str MSG_BUTTON_SKIP = _UxGT("Salta"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("Messa in pausa..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pausa stampa"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Riprendi stampa"); - PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Host Avvio"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Arresta stampa"); - PROGMEM Language_Str MSG_END_LOOPS = _UxGT("Fine cicli di rip."); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Stampa Oggetto"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Cancella Oggetto"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Canc. Oggetto ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Ripresa da PowerLoss"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Stampa da media"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Media non presente"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Sospensione..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Premi tasto.."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Stampa sospesa"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Stampa..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Stampa Annullata"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Stampa Eseguita"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Nessun Movimento"); - PROGMEM Language_Str MSG_KILLED = _UxGT("UCCISO. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ARRESTATO. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Ritrai mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Scamb. Ritrai mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Ritrai V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Salta mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Avanza mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Scamb. Avanza mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Avanza V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Scamb. Avanza V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("AutoRitrai"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Lunghezza scambio"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra scambio"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Lunghezza spurgo"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Cambio utensile"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Risalita Z"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Velocità innesco"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Velocità ritrazione"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Parcheggia testa"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Recover Speed"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Velocità ventola"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Tempo ventola"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto ON"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto OFF"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Migrazione utensile"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-migrazione"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Ultimo estrusore"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Migra a *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Cambia filamento"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Cambia filam. *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Carica filamento"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Carica filamento *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Rimuovi filamento"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Rimuovi filam. *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Rimuovi tutto"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Collega media"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Cambia media"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Rilascia media"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z probe fuori piatto"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Fattore distorsione"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Autotest BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Resetta BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Estendi BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("BLTouch modo SW"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("BLTouch modo 5V"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("BLTouch modo OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("BLTouch modo mem."); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Metti BLTouch a 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Metti BLTouch a OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Segnala modo"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("PERICOLO: impostazioni errate possono cause danni! Procedo comunque?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Inizializ.TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Test Z offset"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Memorizzare"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Estendi TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Estendi Sonda-Z"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Ritrai BLTouch"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Ritrai Sonda-Z"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Home %s%s%s prima"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Offsets sonda"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Offset X sonda"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Offset Y sonda"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Offset Z sonda"); - PROGMEM Language_Str MSG_MOVE_NOZZLE_TO_BED = _UxGT("Muovi ugel.su letto"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Babystep X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Babystep Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Babystep Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Totali"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Finecorsa annullati"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Risc.Fallito"); // Max 12 caratteri - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP RIDONDANTE"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("TEMP FUORI CONTROLLO"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("TEMP PIAT.FUORI CTRL"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("T.CAMERA FUORI CTRL"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err: TEMP MASSIMA"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err: TEMP MINIMA"); - PROGMEM Language_Str MSG_HALTED = _UxGT("STAMPANTE FERMATA"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Riavviare prego"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("g"); // Un solo carattere - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // Un solo carattere - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // Un solo carattere - PROGMEM Language_Str MSG_HEATING = _UxGT("Riscaldamento..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Raffreddamento.."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Risc. piatto..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Raffr. piatto..."); - PROGMEM Language_Str MSG_PROBE_HEATING = _UxGT("Risc. sonda..."); - PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Raffr. sonda..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Risc. camera..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Raffr. camera..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Calibraz. Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibra X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibra Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibra Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibra centro"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Impostaz. Delta"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto calibrazione"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Imp. altezza Delta"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Offset sonda-Z"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Barra Diagonale"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Altezza"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Raggio"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Riguardo stampante"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Info. stampante"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("Livel. a 3 punti"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Livel. Lineare"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Livel. Bilineare"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Livel.piatto unific."); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Livel. Mesh"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Statistiche"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Info. scheda"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistori"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Estrusori"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baud"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protocollo"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Controllo fuga: OFF"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Controllo fuga: ON"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Timeout inatt.ugello"); + LSTR MSG_MOVING = _UxGT("In movimento..."); + LSTR MSG_FREE_XY = _UxGT("XY liberi"); + LSTR MSG_MOVE_X = _UxGT("Muovi X"); + LSTR MSG_MOVE_Y = _UxGT("Muovi Y"); + LSTR MSG_MOVE_Z = _UxGT("Muovi Z"); + LSTR MSG_MOVE_I = _UxGT("Muovi ") LCD_STR_I; + LSTR MSG_MOVE_J = _UxGT("Muovi ") LCD_STR_J; + LSTR MSG_MOVE_K = _UxGT("Muovi ") LCD_STR_K; + LSTR MSG_MOVE_E = _UxGT("Estrusore"); + LSTR MSG_MOVE_EN = _UxGT("Estrusore *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Ugello freddo"); + LSTR MSG_MOVE_N_MM = _UxGT("Muovi di %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Muovi di 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Muovi di 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Muovi di 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Muovi di 100mm"); + LSTR MSG_MOVE_0001IN = _UxGT("Muovi di 0.001\""); + LSTR MSG_MOVE_001IN = _UxGT("Muovi di 0.01\""); + LSTR MSG_MOVE_01IN = _UxGT("Muovi di 0.1\""); + LSTR MSG_MOVE_1IN = _UxGT("Muovi di 1\""); + LSTR MSG_SPEED = _UxGT("Velocità"); + LSTR MSG_BED_Z = _UxGT("Piatto Z"); + LSTR MSG_NOZZLE = _UxGT("Ugello"); + LSTR MSG_NOZZLE_N = _UxGT("Ugello ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Ugello parcheggiato"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Ugello in pausa"); + LSTR MSG_BED = _UxGT("Piatto"); + LSTR MSG_CHAMBER = _UxGT("Camera"); + LSTR MSG_COOLER = _UxGT("Raffreddam. laser"); + LSTR MSG_COOLER_TOGGLE = _UxGT("Alterna raffreddam."); + LSTR MSG_FLOWMETER_SAFETY = _UxGT("Sicurezza flusso"); + LSTR MSG_LASER = _UxGT("Laser"); + LSTR MSG_FAN_SPEED = _UxGT("Vel. ventola"); // Max 15 characters + LSTR MSG_FAN_SPEED_N = _UxGT("Vel. ventola ~"); // Max 15 characters + LSTR MSG_STORED_FAN_N = _UxGT("Ventola mem. ~"); // Max 15 characters + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Extra vel.vent."); // Max 15 characters + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra v.vent. ~"); // Max 15 characters + LSTR MSG_CONTROLLER_FAN = _UxGT("Controller vent."); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Vel. inattivo"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Modo autom."); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Vel. attivo"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Tempo inattivo"); + LSTR MSG_FLOW = _UxGT("Flusso"); + LSTR MSG_FLOW_N = _UxGT("Flusso ~"); + LSTR MSG_CONTROL = _UxGT("Controllo"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); + LSTR MSG_AUTOTEMP = _UxGT("Autotemp"); + LSTR MSG_LCD_ON = _UxGT("On"); + LSTR MSG_LCD_OFF = _UxGT("Off"); + LSTR MSG_PID_AUTOTUNE = _UxGT("Calibrazione PID"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("Calibraz. PID *"); + LSTR MSG_PID_CYCLE = _UxGT("Ciclo PID"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Calibr.PID eseguita"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Calibrazione fallita. Estrusore errato."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Calibrazione fallita. Temperatura troppo alta."); + LSTR MSG_PID_TIMEOUT = _UxGT("Calibrazione fallita! Tempo scaduto."); + LSTR MSG_SELECT = _UxGT("Seleziona"); + LSTR MSG_SELECT_E = _UxGT("Seleziona *"); + LSTR MSG_ACC = _UxGT("Accel"); + LSTR MSG_JERK = _UxGT("Jerk"); + LSTR MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-jerk"); + LSTR MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-jerk"); + LSTR MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-jerk"); + LSTR MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-jerk"); + LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-jerk"); + LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-jerk"); + LSTR MSG_VE_JERK = _UxGT("Ve-jerk"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Deviaz. giunzioni"); + LSTR MSG_VELOCITY = _UxGT("Velocità"); + LSTR MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Vmax ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Vmax ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Vmax ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Vmax *"); + LSTR MSG_VMIN = _UxGT("Vmin"); + LSTR MSG_VTRAV_MIN = _UxGT("VTrav min"); + LSTR MSG_ACCELERATION = _UxGT("Accelerazione"); + LSTR MSG_AMAX_A = _UxGT("Max ") LCD_STR_A _UxGT(" Accel"); + LSTR MSG_AMAX_B = _UxGT("Max ") LCD_STR_B _UxGT(" Accel"); + LSTR MSG_AMAX_C = _UxGT("Max ") LCD_STR_C _UxGT(" Accel"); + LSTR MSG_AMAX_I = _UxGT("Max ") LCD_STR_I _UxGT(" Accel"); + LSTR MSG_AMAX_J = _UxGT("Max ") LCD_STR_J _UxGT(" Accel"); + LSTR MSG_AMAX_K = _UxGT("Max ") LCD_STR_K _UxGT(" Accel"); + LSTR MSG_AMAX_E = _UxGT("Max ") LCD_STR_E _UxGT(" Accel"); + LSTR MSG_AMAX_EN = _UxGT("Max * Accel"); + LSTR MSG_A_RETRACT = _UxGT("A-Ritrazione"); + LSTR MSG_A_TRAVEL = _UxGT("A-Spostamento"); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequenza max"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Feed min"); + LSTR MSG_STEPS_PER_MM = _UxGT("Passi/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" passi/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" passi/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" passi/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" passi/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" passi/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" passi/mm"); + LSTR MSG_E_STEPS = _UxGT("E passi/mm"); + LSTR MSG_EN_STEPS = _UxGT("* passi/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatura"); + LSTR MSG_MOTION = _UxGT("Movimento"); + LSTR MSG_FILAMENT = _UxGT("Filamento"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("Limite E in mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("Limite E *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Diam. filo"); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Diam. filo *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Rimuovi mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Carica mm"); + LSTR MSG_ADVANCE_K = _UxGT("K Avanzamento"); + LSTR MSG_ADVANCE_K_E = _UxGT("K Avanzamento *"); + LSTR MSG_CONTRAST = _UxGT("Contrasto LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Salva impostazioni"); + LSTR MSG_LOAD_EEPROM = _UxGT("Carica impostazioni"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Ripristina imp."); + LSTR MSG_INIT_EEPROM = _UxGT("Inizializza EEPROM"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("Err: CRC EEPROM"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Err: Indice EEPROM"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Err: Versione EEPROM"); + LSTR MSG_SETTINGS_STORED = _UxGT("Impostazioni mem."); + LSTR MSG_MEDIA_UPDATE = _UxGT("Aggiorna media"); + LSTR MSG_RESET_PRINTER = _UxGT("Resetta stampante"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Aggiorna"); + LSTR MSG_INFO_SCREEN = _UxGT("Schermata info"); + LSTR MSG_PREPARE = _UxGT("Prepara"); + LSTR MSG_TUNE = _UxGT("Regola"); + LSTR MSG_POWER_MONITOR = _UxGT("Controllo aliment."); + LSTR MSG_CURRENT = _UxGT("Corrente"); + LSTR MSG_VOLTAGE = _UxGT("Tensione"); + LSTR MSG_POWER = _UxGT("Potenza"); + LSTR MSG_START_PRINT = _UxGT("Avvia stampa"); + LSTR MSG_BUTTON_NEXT = _UxGT("Prossimo"); + LSTR MSG_BUTTON_INIT = _UxGT("Inizializza"); + LSTR MSG_BUTTON_STOP = _UxGT("Stop"); + LSTR MSG_BUTTON_PRINT = _UxGT("Stampa"); + LSTR MSG_BUTTON_RESET = _UxGT("Resetta"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Ignora"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Annulla"); + LSTR MSG_BUTTON_DONE = _UxGT("Fatto"); + LSTR MSG_BUTTON_BACK = _UxGT("Indietro"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Procedi"); + LSTR MSG_BUTTON_SKIP = _UxGT("Salta"); + LSTR MSG_PAUSING = _UxGT("Messa in pausa..."); + LSTR MSG_PAUSE_PRINT = _UxGT("Pausa stampa"); + LSTR MSG_RESUME_PRINT = _UxGT("Riprendi stampa"); + LSTR MSG_HOST_START_PRINT = _UxGT("Host Avvio"); + LSTR MSG_STOP_PRINT = _UxGT("Arresta stampa"); + LSTR MSG_END_LOOPS = _UxGT("Fine cicli di rip."); + LSTR MSG_PRINTING_OBJECT = _UxGT("Stampa Oggetto"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Cancella Oggetto"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Canc. Oggetto ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Ripresa da PowerLoss"); + LSTR MSG_MEDIA_MENU = _UxGT("Stampa da media"); + LSTR MSG_NO_MEDIA = _UxGT("Media non presente"); + LSTR MSG_DWELL = _UxGT("Sospensione..."); + LSTR MSG_USERWAIT = _UxGT("Premi tasto.."); + LSTR MSG_PRINT_PAUSED = _UxGT("Stampa sospesa"); + LSTR MSG_PRINTING = _UxGT("Stampa..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Stampa Annullata"); + LSTR MSG_PRINT_DONE = _UxGT("Stampa Eseguita"); + LSTR MSG_NO_MOVE = _UxGT("Nessun Movimento"); + LSTR MSG_KILLED = _UxGT("UCCISO. "); + LSTR MSG_STOPPED = _UxGT("ARRESTATO. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Ritrai mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Scamb. Ritrai mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Ritrai V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Salta mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Avanza mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Scamb. Avanza mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Avanza V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Scamb. Avanza V"); + LSTR MSG_AUTORETRACT = _UxGT("AutoRitrai"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Lunghezza scambio"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Extra scambio"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Lunghezza spurgo"); + LSTR MSG_TOOL_CHANGE = _UxGT("Cambio utensile"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Risalita Z"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Velocità innesco"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Velocità ritrazione"); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Parcheggia testa"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Recover Speed"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Velocità ventola"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Tempo ventola"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto ON"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Auto OFF"); + LSTR MSG_TOOL_MIGRATION = _UxGT("Migrazione utensile"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-migrazione"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Ultimo estrusore"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Migra a *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Cambia filamento"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Cambia filam. *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Carica filamento"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Carica filamento *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Rimuovi filamento"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Rimuovi filam. *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Rimuovi tutto"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Collega media"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Cambia media"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Rilascia media"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z probe fuori piatto"); + LSTR MSG_SKEW_FACTOR = _UxGT("Fattore distorsione"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Autotest BLTouch"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Resetta BLTouch"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Estendi BLTouch"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("BLTouch modo SW"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("BLTouch modo 5V"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("BLTouch modo OD"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("BLTouch modo mem."); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Metti BLTouch a 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Metti BLTouch a OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Segnala modo"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("PERICOLO: impostazioni errate possono cause danni! Procedo comunque?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Inizializ.TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Test Z offset"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Memorizzare"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Estendi TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Estendi Sonda-Z"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Ritrai BLTouch"); + LSTR MSG_MANUAL_STOW = _UxGT("Ritrai Sonda-Z"); + LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s prima"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Offsets sonda"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Offset X sonda"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Offset Y sonda"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Offset Z sonda"); + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Muovi ugel.su letto"); + LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); + LSTR MSG_BABYSTEP_I = _UxGT("Babystep ") LCD_STR_I; + LSTR MSG_BABYSTEP_J = _UxGT("Babystep ") LCD_STR_J; + LSTR MSG_BABYSTEP_K = _UxGT("Babystep ") LCD_STR_K; + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Totali"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Interrompi se FC"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Risc.Fallito"); // Max 12 characters + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: TEMP RIDONDANTE"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("TEMP FUORI CONTROLLO"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TEMP PIAT.FUORI CTRL"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("T.CAMERA FUORI CTRL"); + LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("RAFFREDAM.FUORI CTRL"); + LSTR MSG_COOLING_FAILED = _UxGT("Raffreddam. fallito"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Err: TEMP MASSIMA"); + LSTR MSG_ERR_MINTEMP = _UxGT("Err: TEMP MINIMA"); + LSTR MSG_HALTED = _UxGT("STAMPANTE FERMATA"); + LSTR MSG_PLEASE_RESET = _UxGT("Riavviare prego"); + LSTR MSG_SHORT_DAY = _UxGT("g"); // One character + LSTR MSG_SHORT_HOUR = _UxGT("h"); // One character + LSTR MSG_SHORT_MINUTE = _UxGT("m"); // One character + LSTR MSG_HEATING = _UxGT("Riscaldamento..."); + LSTR MSG_COOLING = _UxGT("Raffreddamento.."); + LSTR MSG_BED_HEATING = _UxGT("Risc. piatto..."); + LSTR MSG_BED_COOLING = _UxGT("Raffr. piatto..."); + LSTR MSG_PROBE_HEATING = _UxGT("Risc. sonda..."); + LSTR MSG_PROBE_COOLING = _UxGT("Raffr. sonda..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Risc. camera..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Raffr. camera..."); + LSTR MSG_LASER_COOLING = _UxGT("Raffr. laser..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Calibraz. Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibra X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibra Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibra Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibra centro"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Impostaz. Delta"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto calibrazione"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Imp. altezza Delta"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Offset sonda-Z"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Barra Diagonale"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Altezza"); + LSTR MSG_DELTA_RADIUS = _UxGT("Raggio"); + LSTR MSG_INFO_MENU = _UxGT("Info su stampante"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Info. stampante"); + LSTR MSG_3POINT_LEVELING = _UxGT("Livel. a 3 punti"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Livel. Lineare"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Livel. Bilineare"); + LSTR MSG_UBL_LEVELING = _UxGT("Livel.piatto unific."); + LSTR MSG_MESH_LEVELING = _UxGT("Livel. Mesh"); + LSTR MSG_MESH_DONE = _UxGT("Sond.mesh eseguito"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Statistiche"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Info. scheda"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistori"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Estrusori"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baud"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protocollo"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Controllo fuga: OFF"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Controllo fuga: ON"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Timeout inatt.ugello"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Luci Case"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Luminosità Luci"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("STAMPANTE ERRATA"); + LSTR MSG_CASE_LIGHT = _UxGT("Luci Case"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Luminosità Luci"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("STAMPANTE ERRATA"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Contat. stampa"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completati"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Tempo totale"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Lavoro più lungo"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Totale estruso"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Contat. stampa"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completati"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Tempo totale"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Lavoro più lungo"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Totale estruso"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Stampe"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completati"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Durata"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Più lungo"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Estruso"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Stampe"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completati"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Durata"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Più lungo"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Estruso"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Temp min"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp max"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Alimentatore"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Potenza Drive"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ERR.CONNESSIONE TMC"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Scrivi DAC EEPROM"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("CAMBIO FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("STAMPA IN PAUSA"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CARICA FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("RIMUOVI FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPZIONI RIPRESA:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Spurga di più"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Riprendi stampa"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Ugello: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Sens.filo termin."); // Max 17 characters - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Dist mm filo term."); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Home fallito"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Sondaggio fallito"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Temp min"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Temp max"); + LSTR MSG_INFO_PSU = _UxGT("Alimentatore"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Potenza Drive"); + LSTR MSG_DAC_PERCENT_A = _UxGT("Driver ") LCD_STR_A _UxGT(" %"); + LSTR MSG_DAC_PERCENT_B = _UxGT("Driver ") LCD_STR_B _UxGT(" %"); + LSTR MSG_DAC_PERCENT_C = _UxGT("Driver ") LCD_STR_C _UxGT(" %"); + LSTR MSG_DAC_PERCENT_I = _UxGT("Driver ") LCD_STR_I _UxGT(" %"); + LSTR MSG_DAC_PERCENT_J = _UxGT("Driver ") LCD_STR_J _UxGT(" %"); + LSTR MSG_DAC_PERCENT_K = _UxGT("Driver ") LCD_STR_K _UxGT(" %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("Driver E %"); + LSTR MSG_ERROR_TMC = _UxGT("ERR.CONNESSIONE TMC"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Scrivi DAC EEPROM"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("CAMBIO FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("STAMPA IN PAUSA"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CARICA FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("RIMUOVI FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPZIONI RIPRESA:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Spurga di più"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Riprendi stampa"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Ugello: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Sens.filo termin."); // Max 17 characters + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Dist mm filo term."); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Home fallito"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Sondaggio fallito"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("SCELTA FILAMENTO"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Agg.firmware MMU!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU chiede attenz."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("MMU riprendi"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("MMU ripresa..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU carica"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("MMU carica tutto"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Carica fino ugello"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU espelli"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU espelli ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU scarica"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Caric.fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Esplus.filam. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Scaric.filam. ..."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Tutto"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filamento ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Azzera MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("Azzeramento MMU..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Rimuovi, click"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("SCELTA FILAMENTO"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Agg.firmware MMU!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU chiede attenz."); + LSTR MSG_MMU2_RESUME = _UxGT("MMU riprendi"); + LSTR MSG_MMU2_RESUMING = _UxGT("MMU ripresa..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU carica"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("MMU carica tutto"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Carica fino ugello"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU espelli"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU espelli ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU scarica"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Caric.fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Esplus.filam. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Scaric.filam. ..."); + LSTR MSG_MMU2_ALL = _UxGT("Tutto"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filamento ~"); + LSTR MSG_MMU2_RESET = _UxGT("Azzera MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("Azzeramento MMU..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Rimuovi, click"); - PROGMEM Language_Str MSG_MIX = _UxGT("Miscela"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Componente ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Miscelatore"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Gradiente"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Gradiente pieno"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Alterna miscela"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Ciclo miscela"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Miscela gradiente"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Inverti gradiente"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("V-tool attivo"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("V-tool iniziale"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT("V-tool finale"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("V-tool alias"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Ripristina V-tools"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Commit mix V-tool"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-tools ripristin."); - PROGMEM Language_Str MSG_START_Z = _UxGT("Z inizio:"); - PROGMEM Language_Str MSG_END_Z = _UxGT("Z fine:"); + LSTR MSG_MIX = _UxGT("Miscela"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Componente ="); + LSTR MSG_MIXER = _UxGT("Miscelatore"); + LSTR MSG_GRADIENT = _UxGT("Gradiente"); + LSTR MSG_FULL_GRADIENT = _UxGT("Gradiente pieno"); + LSTR MSG_TOGGLE_MIX = _UxGT("Alterna miscela"); + LSTR MSG_CYCLE_MIX = _UxGT("Ciclo miscela"); + LSTR MSG_GRADIENT_MIX = _UxGT("Miscela gradiente"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Inverti gradiente"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("V-tool attivo"); + LSTR MSG_START_VTOOL = _UxGT("V-tool iniziale"); + LSTR MSG_END_VTOOL = _UxGT("V-tool finale"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("V-tool alias"); + LSTR MSG_RESET_VTOOLS = _UxGT("Ripristina V-tools"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Commit mix V-tool"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-tools ripristin."); + LSTR MSG_START_Z = _UxGT("Z inizio:"); + LSTR MSG_END_Z = _UxGT("Z fine:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Giochi"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Maze"); + LSTR MSG_GAMES = _UxGT("Giochi"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Maze"); - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("Indice pag. errato"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Vel. pag. errata"); + LSTR MSG_BAD_PAGE = _UxGT("Indice pag. errato"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Vel. pag. errata"); - PROGMEM Language_Str MSG_EDIT_PASSWORD = _UxGT("Modif.password"); - PROGMEM Language_Str MSG_LOGIN_REQUIRED = _UxGT("Login richiesto"); - PROGMEM Language_Str MSG_PASSWORD_SETTINGS = _UxGT("Impostaz.password"); - PROGMEM Language_Str MSG_ENTER_DIGIT = _UxGT("Inserisci cifra"); - PROGMEM Language_Str MSG_CHANGE_PASSWORD = _UxGT("Imp./Modif.password"); - PROGMEM Language_Str MSG_REMOVE_PASSWORD = _UxGT("Elimina password"); - PROGMEM Language_Str MSG_PASSWORD_SET = _UxGT("La password è "); - PROGMEM Language_Str MSG_START_OVER = _UxGT("Ricominciare"); - PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Ricordati di mem.!"); - PROGMEM Language_Str MSG_PASSWORD_REMOVED = _UxGT("Password eliminata"); + LSTR MSG_EDIT_PASSWORD = _UxGT("Modif.password"); + LSTR MSG_LOGIN_REQUIRED = _UxGT("Login richiesto"); + LSTR MSG_PASSWORD_SETTINGS = _UxGT("Impostaz.password"); + LSTR MSG_ENTER_DIGIT = _UxGT("Inserisci cifra"); + LSTR MSG_CHANGE_PASSWORD = _UxGT("Imp./Modif.password"); + LSTR MSG_REMOVE_PASSWORD = _UxGT("Elimina password"); + LSTR MSG_PASSWORD_SET = _UxGT("La password è "); + LSTR MSG_START_OVER = _UxGT("Ricominciare"); + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Ricordati di mem.!"); + LSTR MSG_PASSWORD_REMOVED = _UxGT("Password eliminata"); // - // Le schermate di Cambio Filamento possono visualizzare fino a 3 linee su un display a 4 righe - // ...o fino a 2 linee su un display a 3 righe. + // Filament Change screens show up to 3 lines on a 4-line display + // ...or up to 2 lines on a 3-line display + // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_3_LINE("Premi per", "riprendere", "la stampa")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parcheggiando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Attendere avvio", "del cambio", "di filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Inserisci il", "filamento e premi", "per continuare")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Premi per", "riscaldare ugello")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Riscaldam. ugello", "Attendere prego...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Attendere", "l'espulsione", "del filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Attendere", "il caricamento", "del filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_3_LINE("Attendere", "lo spurgo", "del filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Premi x terminare", "lo spurgo", "del filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Attendere", "la ripresa", "della stampa...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_3_LINE("Premi per", "riprendere", "la stampa")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parcheggiando...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Attendere avvio", "del cambio", "di filamento")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Inserisci il", "filamento e premi", "per continuare")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Premi per", "riscaldare ugello")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Riscaldam. ugello", "Attendere prego...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Attendere", "l'espulsione", "del filamento")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Attendere", "il caricamento", "del filamento")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_3_LINE("Attendere", "lo spurgo", "del filamento")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Premi x terminare", "lo spurgo", "del filamento")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Attendere", "la ripresa", "della stampa...")); #else // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Premi x continuare")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Attendere...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Inserisci e premi")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Riscalda ugello")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Riscaldamento...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Espulsione...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Caricamento...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Spurgo filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Premi x terminare")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Ripresa...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Premi x continuare")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Attendere...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Inserisci e premi")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Riscalda ugello")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Riscaldamento...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Espulsione...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Caricamento...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Spurgo filamento")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Premi x terminare")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Ripresa...")); #endif // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("Driver TMC"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Correnti driver"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Soglia modo ibrido"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Sensorless homing"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Stealthchop"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("Stealthchop"); + LSTR MSG_TMC_DRIVERS = _UxGT("Driver TMC"); + LSTR MSG_TMC_CURRENT = _UxGT("Correnti driver"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Soglia modo ibrido"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Sensorless homing"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Stealthchop"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("Stealthchop"); + + LSTR MSG_SERVICE_RESET = _UxGT("Resetta"); + LSTR MSG_SERVICE_IN = _UxGT(" tra:"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Resetta"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" tra:"); + LSTR MSG_BACKLASH = _UxGT("Gioco"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Correzione"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Appianamento"); + + LSTR MSG_LEVEL_X_AXIS = _UxGT("Livello asse X"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto Calibra"); + #if ENABLED(TOUCH_UI_FTDI_EVE) + LSTR MSG_HEATER_TIMEOUT = _UxGT("Timeout inattività, temperatura diminuita. Premere OK per riscaldare e riprendere di nuovo."); + #else + LSTR MSG_HEATER_TIMEOUT = _UxGT("Timeout riscaldatore"); + #endif + LSTR MSG_REHEAT = _UxGT("Riscalda"); + LSTR MSG_REHEATING = _UxGT("Riscaldando..."); + LSTR MSG_REHEATDONE = _UxGT("Riscaldato"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Gioco"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Correzione"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Appianamento"); + LSTR MSG_PROBE_WIZARD = _UxGT("Wizard Z offset"); + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Altezza di riferimento sonda"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Spostati in posizione di rilevazione"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Livello asse X"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Auto Calibra"); - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Timeout riscaldatore"); - PROGMEM Language_Str MSG_REHEAT = _UxGT("Riscalda"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Riscaldando..."); + LSTR MSG_SOUND = _UxGT("Suoni"); - PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Wizard Z offset"); - PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Altezza di riferimento sonda"); - PROGMEM Language_Str MSG_PROBE_WIZARD_MOVING = _UxGT("Spostati in posizione di rilevazione"); + LSTR MSG_TOP_LEFT = _UxGT("Alto sinistra"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Basso sinistra"); + LSTR MSG_TOP_RIGHT = _UxGT("Alto destra"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Basso destra"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Calibrazione completata"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Calibrazione fallita"); - PROGMEM Language_Str MSG_SOUND = _UxGT("Suoni"); + LSTR MSG_DRIVER_BACKWARD = _UxGT(" driver invertito"); - PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Alto sinistra"); - PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Basso sinistra"); - PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Alto destra"); - PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Basso destra"); - PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Calibrazione completata"); - PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Calibrazione fallita"); + LSTR MSG_SD_CARD = _UxGT("Scheda SD"); + LSTR MSG_USB_DISK = _UxGT("Disco USB"); } diff --git a/Marlin/src/lcd/language/language_jp_kana.h b/Marlin/src/lcd/language/language_jp_kana.h index 8431d86d1c66..1d291ed3ad03 100644 --- a/Marlin/src/lcd/language/language_jp_kana.h +++ b/Marlin/src/lcd/language/language_jp_kana.h @@ -34,219 +34,226 @@ namespace Language_jp_kana { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 3; - PROGMEM Language_Str LANGUAGE = _UxGT("Japanese"); + constexpr uint8_t CHARSIZE = 3; + LSTR LANGUAGE = _UxGT("Japanese"); // This is just to show the potential benefit of Unicode. // This translation can be improved by using the full charset of unicode codeblock U+30A0 to U+30FF. // 片仮名表示定義 - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" ジュンビカンリョウ"); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("メディアガソウニュウサレマシタ"); // "Card inserted" - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("メディアガアリマセン"); // "Card removed" - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("メディアノトリダシ"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("エンドストップ"); // "Endstops" // Max length 8 characters - PROGMEM Language_Str MSG_MAIN = _UxGT("メイン"); // "Main" - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("ジドウカイシ"); // "Autostart" - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("モーターデンゲン オフ"); // "Disable steppers" - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("デバッグメニュー"); // "Debug Menu" - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("プログレスバー テスト"); // "Progress Bar Test" - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("ゲンテンフッキ"); // "Auto home" - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Xジク ゲンテンフッキ"); // "Home X" - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Yジク ゲンテンフッキ"); // "Home Y" - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Zジク ゲンテンフッキ"); // "Home Z" - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("ゲンテンフッキチュウ"); // "Homing XYZ" - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("レベリングカイシ"); // "Click to Begin" - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("ツギノソクテイテンヘ"); // "Next Point" - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("レベリングカンリョウ"); // "Leveling Done!" - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("キジュンオフセットセッテイ"); // "Set home offsets" - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("オフセットガテキヨウサレマシタ"); // "Offsets applied" - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("キジュンセット"); // "Set origin" + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" ジュンビカンリョウ"); + LSTR MSG_MEDIA_INSERTED = _UxGT("メディアガソウニュウサレマシタ"); // "Card inserted" + LSTR MSG_MEDIA_REMOVED = _UxGT("メディアガアリマセン"); // "Card removed" + LSTR MSG_RELEASE_MEDIA = _UxGT("メディアノトリダシ"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("エンドストップ"); // "Endstops" // Max length 8 characters + LSTR MSG_MAIN = _UxGT("メイン"); // "Main" + LSTR MSG_RUN_AUTO_FILES = _UxGT("ジドウカイシ"); // "Autostart" + LSTR MSG_DISABLE_STEPPERS = _UxGT("モーターデンゲン オフ"); // "Disable steppers" + LSTR MSG_DEBUG_MENU = _UxGT("デバッグメニュー"); // "Debug Menu" + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("プログレスバー テスト"); // "Progress Bar Test" + LSTR MSG_AUTO_HOME = _UxGT("ゲンテンフッキ"); // "Auto home" + LSTR MSG_AUTO_HOME_X = _UxGT("Xジク ゲンテンフッキ"); // "Home X" + LSTR MSG_AUTO_HOME_Y = _UxGT("Yジク ゲンテンフッキ"); // "Home Y" + LSTR MSG_AUTO_HOME_Z = _UxGT("Zジク ゲンテンフッキ"); // "Home Z" + LSTR MSG_LEVEL_BED_HOMING = _UxGT("ゲンテンフッキチュウ"); // "Homing XYZ" + LSTR MSG_LEVEL_BED_WAITING = _UxGT("レベリングカイシ"); // "Click to Begin" + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("ツギノソクテイテンヘ"); // "Next Point" + LSTR MSG_LEVEL_BED_DONE = _UxGT("レベリングカンリョウ"); // "Leveling Done!" + LSTR MSG_SET_HOME_OFFSETS = _UxGT("キジュンオフセットセッテイ"); // "Set home offsets" + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("オフセットガテキヨウサレマシタ"); // "Offsets applied" + LSTR MSG_SET_ORIGIN = _UxGT("キジュンセット"); // "Set origin" #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = PREHEAT_1_LABEL _UxGT(" ヨネツ"); // "Preheat " PREHEAT_1_LABEL - PROGMEM Language_Str MSG_PREHEAT_1_H = PREHEAT_1_LABEL _UxGT(" ヨネツ ~"); // "Preheat " PREHEAT_1_LABEL - PROGMEM Language_Str MSG_PREHEAT_1_END = PREHEAT_1_LABEL _UxGT(" ヨネツノズル"); // " Nozzle" - PROGMEM Language_Str MSG_PREHEAT_1_END_E = PREHEAT_1_LABEL _UxGT(" ヨネツノズル ~"); // " Nozzle" - PROGMEM Language_Str MSG_PREHEAT_1_ALL = PREHEAT_1_LABEL _UxGT(" スベテヨネツ"); // " All" - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = PREHEAT_1_LABEL _UxGT(" ベッドヨネツ"); // " Bed" - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = PREHEAT_1_LABEL _UxGT(" ヨネツセッテイ"); // " conf" + LSTR MSG_PREHEAT_1 = PREHEAT_1_LABEL _UxGT(" ヨネツ"); // "Preheat " PREHEAT_1_LABEL + LSTR MSG_PREHEAT_1_H = PREHEAT_1_LABEL _UxGT(" ヨネツ ~"); // "Preheat " PREHEAT_1_LABEL + LSTR MSG_PREHEAT_1_END = PREHEAT_1_LABEL _UxGT(" ヨネツノズル"); // " Nozzle" + LSTR MSG_PREHEAT_1_END_E = PREHEAT_1_LABEL _UxGT(" ヨネツノズル ~"); // " Nozzle" + LSTR MSG_PREHEAT_1_ALL = PREHEAT_1_LABEL _UxGT(" スベテヨネツ"); // " All" + LSTR MSG_PREHEAT_1_BEDONLY = PREHEAT_1_LABEL _UxGT(" ベッドヨネツ"); // " Bed" + LSTR MSG_PREHEAT_1_SETTINGS = PREHEAT_1_LABEL _UxGT(" ヨネツセッテイ"); // " conf" - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("$ ヨネツ"); // "Preheat " PREHEAT_1_LABEL - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("$ ヨネツ ~"); // "Preheat " PREHEAT_1_LABEL - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("$ ヨネツノズル"); // " Nozzle" - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("$ ヨネツノズル ~"); // " Nozzle" - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("$ スベテヨネツ"); // " All" - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("$ ベッドヨネツ"); // " Bed" - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("$ ヨネツセッテイ"); // " conf" + LSTR MSG_PREHEAT_M = _UxGT("$ ヨネツ"); // "Preheat " PREHEAT_1_LABEL + LSTR MSG_PREHEAT_M_H = _UxGT("$ ヨネツ ~"); // "Preheat " PREHEAT_1_LABEL + LSTR MSG_PREHEAT_M_END = _UxGT("$ ヨネツノズル"); // " Nozzle" + LSTR MSG_PREHEAT_M_END_E = _UxGT("$ ヨネツノズル ~"); // " Nozzle" + LSTR MSG_PREHEAT_M_ALL = _UxGT("$ スベテヨネツ"); // " All" + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("$ ベッドヨネツ"); // " Bed" + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("$ ヨネツセッテイ"); // " conf" #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("カネツテイシ"); // "Cooldown" - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("デンゲン オン"); // "Switch power on" - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("デンゲン オフ"); // "Switch power off" - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("オシダシ"); // "Extrude" - PROGMEM Language_Str MSG_RETRACT = _UxGT("ヒキコミセッテイ"); // "Retract" - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("ジクイドウ"); // "Move axis" - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("ベッドレベリング"); // "Bed leveling" - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("ベッドレベリング"); // "Level bed" + LSTR MSG_COOLDOWN = _UxGT("カネツテイシ"); // "Cooldown" + LSTR MSG_SWITCH_PS_ON = _UxGT("デンゲン オン"); // "Switch power on" + LSTR MSG_SWITCH_PS_OFF = _UxGT("デンゲン オフ"); // "Switch power off" + LSTR MSG_EXTRUDE = _UxGT("オシダシ"); // "Extrude" + LSTR MSG_RETRACT = _UxGT("ヒキコミセッテイ"); // "Retract" + LSTR MSG_MOVE_AXIS = _UxGT("ジクイドウ"); // "Move axis" + LSTR MSG_BED_LEVELING = _UxGT("ベッドレベリング"); // "Bed leveling" + LSTR MSG_LEVEL_BED = _UxGT("ベッドレベリング"); // "Level bed" - PROGMEM Language_Str MSG_MOVING = _UxGT("イドウチュウ"); // "Moving..." - PROGMEM Language_Str MSG_FREE_XY = _UxGT("XYジク カイホウ"); // "Free XY" - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Xジク イドウ"); // "Move X" - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Yジク イドウ"); // "Move Y" - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Zジク イドウ"); // "Move Z" - PROGMEM Language_Str MSG_MOVE_E = _UxGT("エクストルーダー"); // "Extruder" - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("%smm イドウ"); // "Move 0.025mm" - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("0.1mm イドウ"); // "Move 0.1mm" - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT(" 1mm イドウ"); // "Move 1mm" - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT(" 10mm イドウ"); // "Move 10mm" - PROGMEM Language_Str MSG_SPEED = _UxGT("ソクド"); // "Speed" - PROGMEM Language_Str MSG_BED_Z = _UxGT("Zオフセット"); // "Bed Z" - PROGMEM Language_Str MSG_NOZZLE = _UxGT("ノズル"); // "Nozzle" - PROGMEM Language_Str MSG_BED = _UxGT("ベッド"); // "Bed" - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("ファンソクド"); // "Fan speed" - PROGMEM Language_Str MSG_FLOW = _UxGT("トシュツリョウ"); // "Flow" - PROGMEM Language_Str MSG_CONTROL = _UxGT("セイギョ"); // "Control" - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" サイテイ"); // " Min" - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" サイコウ"); // " Max" - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" ファクター"); // " Fact" - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("ジドウオンドセイギョ"); // "Autotemp" - PROGMEM Language_Str MSG_LCD_ON = _UxGT("オン"); // "On" - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("オフ"); // "Off" - PROGMEM Language_Str MSG_SELECT = _UxGT("センタク"); // "Select" - PROGMEM Language_Str MSG_SELECT_E = _UxGT("センタク *"); - PROGMEM Language_Str MSG_ACC = _UxGT("カソクド mm/s") SUPERSCRIPT_TWO; // "Accel" - PROGMEM Language_Str MSG_JERK = _UxGT("ヤクドウ mm/s"); // "Jerk" - PROGMEM Language_Str MSG_VA_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_A; // "Va-jerk" - PROGMEM Language_Str MSG_VB_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_B; // "Vb-jerk" - PROGMEM Language_Str MSG_VC_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_C; // "Vc-jerk" - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("ステップ/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("ステップ/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("ステップ/mm"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("エクストルーダー ヤクド"); // "Ve-jerk" - PROGMEM Language_Str MSG_VMAX_A = _UxGT("サイダイオクリソクド ") LCD_STR_A; // "Vmax A" - PROGMEM Language_Str MSG_VMAX_B = _UxGT("サイダイオクリソクド ") LCD_STR_A; // "Vmax B" - PROGMEM Language_Str MSG_VMAX_C = _UxGT("サイダイオクリソクド ") LCD_STR_A; // "Vmax C" - PROGMEM Language_Str MSG_VMAX_E = _UxGT("サイダイオクリソクド ") LCD_STR_A; // "Vmax E" - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("サイダイオクリソクド *"); // "Vmax E1" - PROGMEM Language_Str MSG_VMIN = _UxGT("サイショウオクリソクド"); // "Vmin" - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("サイショウイドウソクド"); // "VTrav min" - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("カソクド mm/s") SUPERSCRIPT_TWO; // "Accel" - PROGMEM Language_Str MSG_AMAX = _UxGT("サイダイカソクド "); // "Amax " - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("ヒキコミカソクド"); // "A-retract" - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("イドウカソクド"); // "A-travel" - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("オンド"); // "Temperature" - PROGMEM Language_Str MSG_MOTION = _UxGT("ウゴキセッテイ"); // "Motion" - PROGMEM Language_Str MSG_FILAMENT = _UxGT("フィラメント"); // "Filament" - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("フィラメントチョッケイ"); // "Fil. Dia." - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("フィラメントチョッケイ *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCDコントラスト"); // "LCD contrast" - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("EEPROMヘホゾン"); // "Store memory" - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("EEPROMカラヨミコミ"); // "Load memory" - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("セッテイリセット"); // "Restore Defaults" - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("リフレッシュ"); // "Refresh" - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("ジョウホウガメン"); // "Info screen" - PROGMEM Language_Str MSG_PREPARE = _UxGT("ジュンビセッテイ"); // "Prepare" - PROGMEM Language_Str MSG_TUNE = _UxGT("チョウセイ"); // "Tune" - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("イチジテイシ"); // "Pause print" - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("プリントサイカイ"); // "Resume print" - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("プリントテイシ"); // "Stop print" - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("メディアカラプリント"); // "Print from SD" - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("メディアガアリマセン"); // "Card removed" - PROGMEM Language_Str MSG_DWELL = _UxGT("キュウシ"); // "Sleep..." - PROGMEM Language_Str MSG_USERWAIT = _UxGT("ツヅケルニハクリックシテクダサイ"); // "Wait for user..." - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("プリントガチュウシサレマシタ"); // "Print aborted" - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("ウゴキマセン"); // "No move." - PROGMEM Language_Str MSG_KILLED = _UxGT("ヒジョウテイシ"); // "KILLED. " - PROGMEM Language_Str MSG_STOPPED = _UxGT("テイシシマシタ"); // "STOPPED. " - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("ヒキコミリョウ mm"); // "Retract mm" - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("ヒキコミリョウS mm"); // "Swap Re.mm" - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("ヒキコミソクド mm/s"); // "Retract V" - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("ノズルタイヒ mm"); // "Hop mm" - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("ホショウリョウ mm"); // "Unretr. mm" - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("ホショウリョウS mm"); // "S Unretr. mm" - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("ホショウソクド mm/s"); // "Unretract V" - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("ジドウヒキコミ"); // "Auto-Retract" - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("フィラメントコウカン"); // "Change filament" - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("メディアサイヨミコミ"); // "Init. SD card" - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("メディアコウカン"); // "Change SD card" - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Zプローブ ベッドガイ"); // "Z probe out. bed" - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch ジコシンダン"); // "BLTouch Self-Test" - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("BLTouch リセット"); // "Reset BLTouch" - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("サキニ %s%s%s ヲフッキサセテクダサイ"); // "Home ... first" - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Zオフセット"); // "Z Offset" - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Xジク ビドウ"); // "Babystep X" - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Yジク ビドウ"); // "Babystep Y" - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Zジク ビドウ"); // "Babystep Z" - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("イドウゲンカイケンチキノウ"); // "Endstop abort" - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("カネツシッパイ"); // "Heating failed" - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("エラー:ジョウチョウサーミスターキノウ"); // "Err: REDUNDANT TEMP" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("ネツボウソウ"); // "THERMAL RUNAWAY" - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("エラー:サイコウオンチョウカ"); // "Err: MAXTEMP" - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("エラー:サイテイオンミマン"); // "Err: MINTEMP" - PROGMEM Language_Str MSG_HALTED = _UxGT("プリンターハテイシシマシタ"); // "PRINTER HALTED" - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("リセットシテクダサイ"); // "Please reset" - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("カネツチュウ"); // "Heating..." - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("ベッド カネツチュウ"); // "Bed Heating..." - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("デルタ コウセイ"); // "Delta Calibration" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Xジク コウセイ"); // "Calibrate X" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Yジク コウセイ"); // "Calibrate Y" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Zジク コウセイ"); // "Calibrate Z" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("チュウシン コウセイ"); // "Calibrate Center" - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("コノプリンターニツイテ"); // "About Printer" - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("プリンタージョウホウ"); // "Printer Info" - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("プリントジョウキョウ"); // "Printer Stats" - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("セイギョケイジョウホウ"); // "Board Info" - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("サーミスター"); // "Thermistors" - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("エクストルーダースウ"); // "Extruders" - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("ボーレート"); // "Baud" - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("プロトコル"); // "Protocol" - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("キョウタイナイショウメイ"); // "Case light" - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("プリントスウ "); // "Print Count" - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("カンリョウスウ"); // "Completed" - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("プリントジカンルイケイ"); // "Total print time" - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("サイチョウプリントジカン"); // "Longest job time" - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("フィラメントシヨウリョウルイケイ"); // "Extruded total" - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("セッテイサイテイオン"); // "Min Temp" - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("セッテイサイコウオン"); // "Max Temp" - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("デンゲンシュベツ"); // "Power Supply" - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("モータークドウリョク"); // "Drive Strength" - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X DACシュツリョク %"); // "X Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y DACシュツリョク %"); // "Y Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z DACシュツリョク %"); // "Z Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E DACシュツリョク %"); // "E Driver %" - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("EEPROMヘホゾン"); // "Store memory" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("イチジテイシ"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("プリントサイカイ"); // "Resume print" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("コウカンヲカイシシマス", "シバラクオマチクダサイ")); // "Wait for start of the filament" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("フィラメントヌキダシチュウ", "シバラクオマチクダサイ")); // "Wait for filament unload" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_2_LINE("フィラメントヲソウニュウシ,", "クリックスルトゾッコウシマス")); // "Insert filament and press button" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("フィラメントソウテンチュウ", "シバラクオマチクダサイ")); // "Wait for filament load" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("プリントヲサイカイシマス", "シバラクオマチクダサイ")); // "Wait for print to resume" + LSTR MSG_MOVING = _UxGT("イドウチュウ"); // "Moving..." + LSTR MSG_FREE_XY = _UxGT("XYジク カイホウ"); // "Free XY" + LSTR MSG_MOVE_X = _UxGT("Xジク イドウ"); // "Move X" + LSTR MSG_MOVE_Y = _UxGT("Yジク イドウ"); // "Move Y" + LSTR MSG_MOVE_Z = _UxGT("Zジク イドウ"); // "Move Z" + LSTR MSG_MOVE_E = _UxGT("エクストルーダー"); // "Extruder" + LSTR MSG_MOVE_N_MM = _UxGT("%smm イドウ"); // "Move 0.025mm" + LSTR MSG_MOVE_01MM = _UxGT("0.1mm イドウ"); // "Move 0.1mm" + LSTR MSG_MOVE_1MM = _UxGT(" 1mm イドウ"); // "Move 1mm" + LSTR MSG_MOVE_10MM = _UxGT(" 10mm イドウ"); // "Move 10mm" + LSTR MSG_MOVE_100MM = _UxGT(" 100mm イドウ"); // "Move 100mm" + LSTR MSG_SPEED = _UxGT("ソクド"); // "Speed" + LSTR MSG_BED_Z = _UxGT("Zオフセット"); // "Bed Z" + LSTR MSG_NOZZLE = _UxGT("ノズル"); // "Nozzle" + LSTR MSG_BED = _UxGT("ベッド"); // "Bed" + LSTR MSG_FAN_SPEED = _UxGT("ファンソクド"); // "Fan speed" + LSTR MSG_FLOW = _UxGT("トシュツリョウ"); // "Flow" + LSTR MSG_CONTROL = _UxGT("セイギョ"); // "Control" + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" サイテイ"); // " Min" + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" サイコウ"); // " Max" + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" ファクター"); // " Fact" + LSTR MSG_AUTOTEMP = _UxGT("ジドウオンドセイギョ"); // "Autotemp" + LSTR MSG_LCD_ON = _UxGT("オン"); // "On" + LSTR MSG_LCD_OFF = _UxGT("オフ"); // "Off" + LSTR MSG_SELECT = _UxGT("センタク"); // "Select" + LSTR MSG_SELECT_E = _UxGT("センタク *"); + LSTR MSG_ACC = _UxGT("カソクド mm/s") SUPERSCRIPT_TWO; // "Accel" + LSTR MSG_JERK = _UxGT("ヤクドウ mm/s"); // "Jerk" + LSTR MSG_VA_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_A; // "Va-jerk" + LSTR MSG_VB_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_B; // "Vb-jerk" + LSTR MSG_VC_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_C; // "Vc-jerk" + LSTR MSG_VI_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_I; // "Va-jerk" + LSTR MSG_VJ_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_J; // "Vb-jerk" + LSTR MSG_VK_JERK = _UxGT("ジク ヤクドウ mm/s") LCD_STR_K; // "Vc-jerk" + LSTR MSG_A_STEPS = LCD_STR_A _UxGT("ステップ/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT("ステップ/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT("ステップ/mm"); + LSTR MSG_VE_JERK = _UxGT("エクストルーダー ヤクド"); // "Ve-jerk" + LSTR MSG_VMAX_A = _UxGT("サイダイオクリソクド ") LCD_STR_A; // "Vmax A" + LSTR MSG_VMAX_B = _UxGT("サイダイオクリソクド ") LCD_STR_B; // "Vmax B" + LSTR MSG_VMAX_C = _UxGT("サイダイオクリソクド ") LCD_STR_C; // "Vmax C" + LSTR MSG_VMAX_I = _UxGT("サイダイオクリソクド ") LCD_STR_I; // "Vmax I" + LSTR MSG_VMAX_J = _UxGT("サイダイオクリソクド ") LCD_STR_J; // "Vmax J" + LSTR MSG_VMAX_K = _UxGT("サイダイオクリソクド ") LCD_STR_K; // "Vmax K" + LSTR MSG_VMAX_E = _UxGT("サイダイオクリソクド ") LCD_STR_E; // "Vmax E" + LSTR MSG_VMAX_EN = _UxGT("サイダイオクリソクド *"); // "Vmax E1" + LSTR MSG_VMIN = _UxGT("サイショウオクリソクド"); // "Vmin" + LSTR MSG_VTRAV_MIN = _UxGT("サイショウイドウソクド"); // "VTrav min" + LSTR MSG_ACCELERATION = _UxGT("カソクド mm/s") SUPERSCRIPT_TWO; // "Accel" + LSTR MSG_AMAX = _UxGT("サイダイカソクド "); // "Amax " + LSTR MSG_A_RETRACT = _UxGT("ヒキコミカソクド"); // "A-retract" + LSTR MSG_A_TRAVEL = _UxGT("イドウカソクド"); // "A-travel" + LSTR MSG_TEMPERATURE = _UxGT("オンド"); // "Temperature" + LSTR MSG_MOTION = _UxGT("ウゴキセッテイ"); // "Motion" + LSTR MSG_FILAMENT = _UxGT("フィラメント"); // "Filament" + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("フィラメントチョッケイ"); // "Fil. Dia." + LSTR MSG_FILAMENT_DIAM_E = _UxGT("フィラメントチョッケイ *"); + LSTR MSG_CONTRAST = _UxGT("LCDコントラスト"); // "LCD contrast" + LSTR MSG_STORE_EEPROM = _UxGT("EEPROMヘホゾン"); // "Store memory" + LSTR MSG_LOAD_EEPROM = _UxGT("EEPROMカラヨミコミ"); // "Load memory" + LSTR MSG_RESTORE_DEFAULTS = _UxGT("セッテイリセット"); // "Restore Defaults" + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("リフレッシュ"); // "Refresh" + LSTR MSG_INFO_SCREEN = _UxGT("ジョウホウガメン"); // "Info screen" + LSTR MSG_PREPARE = _UxGT("ジュンビセッテイ"); // "Prepare" + LSTR MSG_TUNE = _UxGT("チョウセイ"); // "Tune" + LSTR MSG_PAUSE_PRINT = _UxGT("イチジテイシ"); // "Pause print" + LSTR MSG_RESUME_PRINT = _UxGT("プリントサイカイ"); // "Resume print" + LSTR MSG_STOP_PRINT = _UxGT("プリントテイシ"); // "Stop print" + LSTR MSG_MEDIA_MENU = _UxGT("メディアカラプリント"); // "Print from SD" + LSTR MSG_NO_MEDIA = _UxGT("メディアガアリマセン"); // "Card removed" + LSTR MSG_DWELL = _UxGT("キュウシ"); // "Sleep..." + LSTR MSG_USERWAIT = _UxGT("ツヅケルニハクリックシテクダサイ"); // "Wait for user..." + LSTR MSG_PRINT_ABORTED = _UxGT("プリントガチュウシサレマシタ"); // "Print aborted" + LSTR MSG_NO_MOVE = _UxGT("ウゴキマセン"); // "No move." + LSTR MSG_KILLED = _UxGT("ヒジョウテイシ"); // "KILLED. " + LSTR MSG_STOPPED = _UxGT("テイシシマシタ"); // "STOPPED. " + LSTR MSG_CONTROL_RETRACT = _UxGT("ヒキコミリョウ mm"); // "Retract mm" + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("ヒキコミリョウS mm"); // "Swap Re.mm" + LSTR MSG_CONTROL_RETRACTF = _UxGT("ヒキコミソクド mm/s"); // "Retract V" + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("ノズルタイヒ mm"); // "Hop mm" + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("ホショウリョウ mm"); // "Unretr. mm" + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("ホショウリョウS mm"); // "S Unretr. mm" + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("ホショウソクド mm/s"); // "Unretract V" + LSTR MSG_AUTORETRACT = _UxGT("ジドウヒキコミ"); // "Auto-Retract" + LSTR MSG_FILAMENTCHANGE = _UxGT("フィラメントコウカン"); // "Change filament" + LSTR MSG_ATTACH_MEDIA = _UxGT("メディアサイヨミコミ"); // "Init. SD card" + LSTR MSG_CHANGE_MEDIA = _UxGT("メディアコウカン"); // "Change SD card" + LSTR MSG_ZPROBE_OUT = _UxGT("Zプローブ ベッドガイ"); // "Z probe out. bed" + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch ジコシンダン"); // "BLTouch Self-Test" + LSTR MSG_BLTOUCH_RESET = _UxGT("BLTouch リセット"); // "Reset BLTouch" + LSTR MSG_HOME_FIRST = _UxGT("サキニ %s%s%s ヲフッキサセテクダサイ"); // "Home ... first" + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Zオフセット"); // "Z Offset" + LSTR MSG_BABYSTEP_X = _UxGT("Xジク ビドウ"); // "Babystep X" + LSTR MSG_BABYSTEP_Y = _UxGT("Yジク ビドウ"); // "Babystep Y" + LSTR MSG_BABYSTEP_Z = _UxGT("Zジク ビドウ"); // "Babystep Z" + LSTR MSG_ENDSTOP_ABORT = _UxGT("イドウゲンカイケンチキノウ"); // "Endstop abort" + LSTR MSG_HEATING_FAILED_LCD = _UxGT("カネツシッパイ"); // "Heating failed" + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("エラー:ジョウチョウサーミスターキノウ"); // "Err: REDUNDANT TEMP" + LSTR MSG_THERMAL_RUNAWAY = _UxGT("ネツボウソウ"); // "THERMAL RUNAWAY" + LSTR MSG_ERR_MAXTEMP = _UxGT("エラー:サイコウオンチョウカ"); // "Err: MAXTEMP" + LSTR MSG_ERR_MINTEMP = _UxGT("エラー:サイテイオンミマン"); // "Err: MINTEMP" + LSTR MSG_HALTED = _UxGT("プリンターハテイシシマシタ"); // "PRINTER HALTED" + LSTR MSG_PLEASE_RESET = _UxGT("リセットシテクダサイ"); // "Please reset" + LSTR MSG_HEATING = _UxGT("カネツチュウ"); // "Heating..." + LSTR MSG_BED_HEATING = _UxGT("ベッド カネツチュウ"); // "Bed Heating..." + LSTR MSG_DELTA_CALIBRATE = _UxGT("デルタ コウセイ"); // "Delta Calibration" + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Xジク コウセイ"); // "Calibrate X" + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Yジク コウセイ"); // "Calibrate Y" + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Zジク コウセイ"); // "Calibrate Z" + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("チュウシン コウセイ"); // "Calibrate Center" + LSTR MSG_INFO_MENU = _UxGT("コノプリンターニツイテ"); // "About Printer" + LSTR MSG_INFO_PRINTER_MENU = _UxGT("プリンタージョウホウ"); // "Printer Info" + LSTR MSG_INFO_STATS_MENU = _UxGT("プリントジョウキョウ"); // "Printer Stats" + LSTR MSG_INFO_BOARD_MENU = _UxGT("セイギョケイジョウホウ"); // "Board Info" + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("サーミスター"); // "Thermistors" + LSTR MSG_INFO_EXTRUDERS = _UxGT("エクストルーダースウ"); // "Extruders" + LSTR MSG_INFO_BAUDRATE = _UxGT("ボーレート"); // "Baud" + LSTR MSG_INFO_PROTOCOL = _UxGT("プロトコル"); // "Protocol" + LSTR MSG_CASE_LIGHT = _UxGT("キョウタイナイショウメイ"); // "Case light" + LSTR MSG_INFO_PRINT_COUNT = _UxGT("プリントスウ "); // "Print Count" + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("カンリョウスウ"); // "Completed" + LSTR MSG_INFO_PRINT_TIME = _UxGT("プリントジカンルイケイ"); // "Total print time" + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("サイチョウプリントジカン"); // "Longest job time" + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("フィラメントシヨウリョウルイケイ"); // "Extruded total" + LSTR MSG_INFO_MIN_TEMP = _UxGT("セッテイサイテイオン"); // "Min Temp" + LSTR MSG_INFO_MAX_TEMP = _UxGT("セッテイサイコウオン"); // "Max Temp" + LSTR MSG_INFO_PSU = _UxGT("デンゲンシュベツ"); // "Power Supply" + LSTR MSG_DRIVE_STRENGTH = _UxGT("モータークドウリョク"); // "Drive Strength" + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" DACシュツリョク %"); // "X Driver %" + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" DACシュツリョク %"); // "Y Driver %" + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" DACシュツリョク %"); // "Z Driver %" + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" DACシュツリョク %"); // "I Driver %" + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" DACシュツリョク %"); // "J Driver %" + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" DACシュツリョク %"); // "K Driver %" + LSTR MSG_DAC_PERCENT_E = _UxGT("E DACシュツリョク %"); // "E Driver %" + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("EEPROMヘホゾン"); // "Store memory" + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("イチジテイシ"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("プリントサイカイ"); // "Resume print" + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("コウカンヲカイシシマス", "シバラクオマチクダサイ")); // "Wait for start of the filament" + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("フィラメントヌキダシチュウ", "シバラクオマチクダサイ")); // "Wait for filament unload" + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_2_LINE("フィラメントヲソウニュウシ,", "クリックスルトゾッコウシマス")); // "Insert filament and press button" + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("フィラメントソウテンチュウ", "シバラクオマチクダサイ")); // "Wait for filament load" + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("プリントヲサイカイシマス", "シバラクオマチクダサイ")); // "Wait for print to resume" - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("マチガッタプリンター"); // "Wrong printer" + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("マチガッタプリンター"); // "Wrong printer" - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("セッテイカンリ"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("ショウサイセッテイ"); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("コショカイフク"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("EEPROMショキカ"); + LSTR MSG_CONFIGURATION = _UxGT("セッテイカンリ"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("ショウサイセッテイ"); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("コショカイフク"); + LSTR MSG_INIT_EEPROM = _UxGT("EEPROMショキカ"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("ツギヘ"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("ショキカ"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("ストップ"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("プリント"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("リセット"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("キャンセル"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("カンリョウ"); + LSTR MSG_BUTTON_NEXT = _UxGT("ツギヘ"); + LSTR MSG_BUTTON_INIT = _UxGT("ショキカ"); + LSTR MSG_BUTTON_STOP = _UxGT("ストップ"); + LSTR MSG_BUTTON_PRINT = _UxGT("プリント"); + LSTR MSG_BUTTON_RESET = _UxGT("リセット"); + LSTR MSG_BUTTON_CANCEL = _UxGT("キャンセル"); + LSTR MSG_BUTTON_DONE = _UxGT("カンリョウ"); - PROGMEM Language_Str MSG_YES = _UxGT("ハイ"); - PROGMEM Language_Str MSG_NO = _UxGT("イイエ"); - PROGMEM Language_Str MSG_BACK = _UxGT("モドリ"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("ソクド"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("ステップ/mm"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("ユーザーコマンド"); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("プリントガイチジテイシサレマシタ"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("プリントチュウ..."); + LSTR MSG_YES = _UxGT("ハイ"); + LSTR MSG_NO = _UxGT("イイエ"); + LSTR MSG_BACK = _UxGT("モドリ"); + LSTR MSG_VELOCITY = _UxGT("ソクド"); + LSTR MSG_STEPS_PER_MM = _UxGT("ステップ/mm"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("ユーザーコマンド"); + LSTR MSG_PRINT_PAUSED = _UxGT("プリントガイチジテイシサレマシタ"); + LSTR MSG_PRINTING = _UxGT("プリントチュウ..."); } diff --git a/Marlin/src/lcd/language/language_ko_KR.h b/Marlin/src/lcd/language/language_ko_KR.h index 20700896c1c1..4ecdd5bb2d00 100644 --- a/Marlin/src/lcd/language/language_ko_KR.h +++ b/Marlin/src/lcd/language/language_ko_KR.h @@ -30,77 +30,77 @@ namespace Language_ko_KR { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 1; - PROGMEM Language_Str LANGUAGE = _UxGT("Korean"); + constexpr uint8_t CHARSIZE = 1; + LSTR LANGUAGE = _UxGT("Korean"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" 준비."); - PROGMEM Language_Str MSG_BACK = _UxGT("뒤로"); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("카드 삽입됨"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("카드 제거됨"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("엔드스탑"); - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("소프트 엔드스탑"); - PROGMEM Language_Str MSG_MAIN = _UxGT("뒤로"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("고급 설정"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("설정"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("자동 시작"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("모터 정지"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("디버깅 메뉴"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("프로그레스바 테스트"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("오토홈"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("X 홈으로"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Y 홈으로"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Z 홈으로"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("XYZ 홈으로"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("누르면 시작합니다"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("다음 Point"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("레벨링 완료!"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" 준비."); + LSTR MSG_BACK = _UxGT("뒤로"); + LSTR MSG_MEDIA_INSERTED = _UxGT("카드 삽입됨"); + LSTR MSG_MEDIA_REMOVED = _UxGT("카드 제거됨"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("엔드스탑"); + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("소프트 엔드스탑"); + LSTR MSG_MAIN = _UxGT("뒤로"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("고급 설정"); + LSTR MSG_CONFIGURATION = _UxGT("설정"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("자동 시작"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("모터 정지"); + LSTR MSG_DEBUG_MENU = _UxGT("디버깅 메뉴"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("프로그레스바 테스트"); + LSTR MSG_AUTO_HOME = _UxGT("오토홈"); + LSTR MSG_AUTO_HOME_X = _UxGT("X 홈으로"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Y 홈으로"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Z 홈으로"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("XYZ 홈으로"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("누르면 시작합니다"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("다음 Point"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("레벨링 완료!"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("예열하기 - ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("예열하기 - ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("예열하기 - ") PREHEAT_1_LABEL _UxGT(" 노즐"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("예열하기 - ") PREHEAT_1_LABEL _UxGT(" 노즐 ~"); + LSTR MSG_PREHEAT_1 = _UxGT("예열하기 - ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("예열하기 - ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("예열하기 - ") PREHEAT_1_LABEL _UxGT(" 노즐"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("예열하기 - ") PREHEAT_1_LABEL _UxGT(" 노즐 ~"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("예열하기 - $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("예열하기 - $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("예열하기 - $ 노즐"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("예열하기 - $ 노즐 ~"); + LSTR MSG_PREHEAT_M = _UxGT("예열하기 - $"); + LSTR MSG_PREHEAT_M_H = _UxGT("예열하기 - $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("예열하기 - $ 노즐"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("예열하기 - $ 노즐 ~"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Custom 예열"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("식히기"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("스위치 전원 켜기"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("스위치 전원 끄기"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("밀어내기"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("당기기"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("축 이동"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("베드 레벨링"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("미러 사본"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("오토레벨링 하기"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("노즐"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("노즐 ~"); - PROGMEM Language_Str MSG_BED = _UxGT("베드"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("펜 속도"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("펜 속도 ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("엑스트라 펜 속도"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("엑스트라 펜 속도 ~"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("온도"); - PROGMEM Language_Str MSG_MOTION = _UxGT("동작"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("설정 저장하기"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("설정 읽어오기"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("설정 되돌리기"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("EEPROM 초기화"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("새로고침"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("처음으로"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("준비하기"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("일시정지"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("재시작"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("출력중지"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("SD 카드출력"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("SD 카드없음"); - PROGMEM Language_Str MSG_DWELL = _UxGT("슬립모드..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("일시 정지됨"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("출력중..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("취소됨"); - PROGMEM Language_Str MSG_KILLED = _UxGT("죽음. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("멈춤. "); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("잘못된 프린터"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Custom 예열"); + LSTR MSG_COOLDOWN = _UxGT("식히기"); + LSTR MSG_SWITCH_PS_ON = _UxGT("스위치 전원 켜기"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("스위치 전원 끄기"); + LSTR MSG_EXTRUDE = _UxGT("밀어내기"); + LSTR MSG_RETRACT = _UxGT("당기기"); + LSTR MSG_MOVE_AXIS = _UxGT("축 이동"); + LSTR MSG_BED_LEVELING = _UxGT("베드 레벨링"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("미러 사본"); + LSTR MSG_UBL_DOING_G29 = _UxGT("오토레벨링 하기"); + LSTR MSG_NOZZLE = _UxGT("노즐"); + LSTR MSG_NOZZLE_N = _UxGT("노즐 ~"); + LSTR MSG_BED = _UxGT("베드"); + LSTR MSG_FAN_SPEED = _UxGT("펜 속도"); + LSTR MSG_FAN_SPEED_N = _UxGT("펜 속도 ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("엑스트라 펜 속도"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("엑스트라 펜 속도 ~"); + LSTR MSG_TEMPERATURE = _UxGT("온도"); + LSTR MSG_MOTION = _UxGT("동작"); + LSTR MSG_STORE_EEPROM = _UxGT("설정 저장하기"); + LSTR MSG_LOAD_EEPROM = _UxGT("설정 읽어오기"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("설정 되돌리기"); + LSTR MSG_INIT_EEPROM = _UxGT("EEPROM 초기화"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("새로고침"); + LSTR MSG_INFO_SCREEN = _UxGT("처음으로"); + LSTR MSG_PREPARE = _UxGT("준비하기"); + LSTR MSG_PAUSE_PRINT = _UxGT("일시정지"); + LSTR MSG_RESUME_PRINT = _UxGT("재시작"); + LSTR MSG_STOP_PRINT = _UxGT("출력중지"); + LSTR MSG_MEDIA_MENU = _UxGT("SD 카드출력"); + LSTR MSG_NO_MEDIA = _UxGT("SD 카드없음"); + LSTR MSG_DWELL = _UxGT("슬립모드..."); + LSTR MSG_PRINT_PAUSED = _UxGT("일시 정지됨"); + LSTR MSG_PRINTING = _UxGT("출력중..."); + LSTR MSG_PRINT_ABORTED = _UxGT("취소됨"); + LSTR MSG_KILLED = _UxGT("죽음. "); + LSTR MSG_STOPPED = _UxGT("멈춤. "); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("잘못된 프린터"); } diff --git a/Marlin/src/lcd/language/language_nl.h b/Marlin/src/lcd/language/language_nl.h index 82e5c292c68b..b44d09d07ca7 100644 --- a/Marlin/src/lcd/language/language_nl.h +++ b/Marlin/src/lcd/language/language_nl.h @@ -34,198 +34,196 @@ namespace Language_nl { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 1; - PROGMEM Language_Str LANGUAGE = _UxGT("Dutch"); + constexpr uint8_t CHARSIZE = 1; + LSTR LANGUAGE = _UxGT("Dutch"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" gereed."); - PROGMEM Language_Str MSG_BACK = _UxGT("Terug"); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Kaart ingestoken"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Kaart verwijderd"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - PROGMEM Language_Str MSG_MAIN = _UxGT("Hoofdmenu"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autostart"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Motoren uit"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Debug Menu"); // accepted English terms - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Vooruitgang Test"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" gereed."); + LSTR MSG_BACK = _UxGT("Terug"); + LSTR MSG_MEDIA_INSERTED = _UxGT("Kaart ingestoken"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Kaart verwijderd"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters + LSTR MSG_MAIN = _UxGT("Hoofdmenu"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Motoren uit"); + LSTR MSG_DEBUG_MENU = _UxGT("Debug Menu"); // accepted English terms + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Vooruitgang Test"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Klik voor begin"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Volgende Plaats"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Bed level kompl."); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Zet home offsets"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("H offset toegep."); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Nulpunt instellen"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Klik voor begin"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Volgende Plaats"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Bed level kompl."); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Zet home offsets"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("H offset toegep."); + LSTR MSG_SET_ORIGIN = _UxGT("Nulpunt instellen"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = PREHEAT_1_LABEL _UxGT(" voorverwarmen"); - PROGMEM Language_Str MSG_PREHEAT_1_H = PREHEAT_1_LABEL _UxGT(" voorverw. ~"); - PROGMEM Language_Str MSG_PREHEAT_1_END = PREHEAT_1_LABEL _UxGT(" voorverw. Einde"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = PREHEAT_1_LABEL _UxGT(" voorverw. Einde ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = PREHEAT_1_LABEL _UxGT(" voorverw. aan"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = PREHEAT_1_LABEL _UxGT(" voorverw. Bed"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = PREHEAT_1_LABEL _UxGT(" verw. conf"); + LSTR MSG_PREHEAT_1 = PREHEAT_1_LABEL _UxGT(" voorverwarmen"); + LSTR MSG_PREHEAT_1_H = PREHEAT_1_LABEL _UxGT(" voorverw. ~"); + LSTR MSG_PREHEAT_1_END = PREHEAT_1_LABEL _UxGT(" voorverw. Einde"); + LSTR MSG_PREHEAT_1_END_E = PREHEAT_1_LABEL _UxGT(" voorverw. Einde ~"); + LSTR MSG_PREHEAT_1_ALL = PREHEAT_1_LABEL _UxGT(" voorverw. aan"); + LSTR MSG_PREHEAT_1_BEDONLY = PREHEAT_1_LABEL _UxGT(" voorverw. Bed"); + LSTR MSG_PREHEAT_1_SETTINGS = PREHEAT_1_LABEL _UxGT(" verw. conf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("$ voorverwarmen"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("$ voorverw. ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("$ voorverw. Einde"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("$ voorverw. Einde ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("$ voorverw. aan"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("$ voorverw. Bed"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("$ verw. conf"); + LSTR MSG_PREHEAT_M = _UxGT("$ voorverwarmen"); + LSTR MSG_PREHEAT_M_H = _UxGT("$ voorverw. ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("$ voorverw. Einde"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("$ voorverw. Einde ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("$ voorverw. aan"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("$ voorverw. Bed"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("$ verw. conf"); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Afkoelen"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Stroom aan"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Stroom uit"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrude"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Retract"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("As verplaatsen"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Bed Leveling"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Level bed"); + LSTR MSG_COOLDOWN = _UxGT("Afkoelen"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Stroom aan"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Stroom uit"); + LSTR MSG_EXTRUDE = _UxGT("Extrude"); + LSTR MSG_RETRACT = _UxGT("Retract"); + LSTR MSG_MOVE_AXIS = _UxGT("As verplaatsen"); + LSTR MSG_BED_LEVELING = _UxGT("Bed Leveling"); + LSTR MSG_LEVEL_BED = _UxGT("Level bed"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Verplaatsen..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Vrij XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Verplaats X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Verplaats Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Verplaats Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extruder"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extruder *"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Verplaats %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Verplaats 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Verplaats 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Verplaats 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Snelheid"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Bed Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Nozzle"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Nozzle ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Bed"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Fan snelheid"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Fan snelheid ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Flow"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flow ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Control"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Autotemp"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Aan"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Uit"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Selecteer"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Selecteer *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Versn"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatuur"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Beweging"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Advance K"); // accepted english dutch - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Advance K *"); // accepted english dutch - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD contrast"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Geheugen opslaan"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Geheugen laden"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Noodstop reset"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Ververs"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info scherm"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Voorbereiden"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Afstellen"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Print pauzeren"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Print hervatten"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Print stoppen"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Print van SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Geen SD kaart"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Slapen..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Wachten..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Print afgebroken"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Geen beweging."); - PROGMEM Language_Str MSG_KILLED = _UxGT("Afgebroken. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("Gestopt. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retract mm"); // accepted English term in Dutch - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Ruil Retract mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retract F"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Ruil Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretr. FR"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto-Retract"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Verv. Filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Verv. Filament *"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Init. SD kaart"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Verv. SD Kaart"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z probe uit. bed"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Zelf-Test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Home %s%s%s Eerst"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Z Offset"); // accepted English term in Dutch - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Babystap X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Babystap Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Babystap Z"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Endstop afbr."); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Voorverw. fout"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Redun. temp fout"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("Therm. wegloop"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err: Max. temp"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err: Min. temp"); - PROGMEM Language_Str MSG_HALTED = _UxGT("PRINTER GESTOPT"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Reset A.U.B."); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only. Keep English standard - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Voorwarmen..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Bed voorverw..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Calibratie"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibreer X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibreer Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibreer Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibreer Midden"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibratie"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Zet Delta Hoogte"); + LSTR MSG_MOVING = _UxGT("Verplaatsen..."); + LSTR MSG_FREE_XY = _UxGT("Vrij XY"); + LSTR MSG_MOVE_X = _UxGT("Verplaats X"); + LSTR MSG_MOVE_Y = _UxGT("Verplaats Y"); + LSTR MSG_MOVE_Z = _UxGT("Verplaats Z"); + LSTR MSG_MOVE_E = _UxGT("Extruder"); + LSTR MSG_MOVE_EN = _UxGT("Extruder *"); + LSTR MSG_MOVE_N_MM = _UxGT("Verplaats %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Verplaats 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Verplaats 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Verplaats 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Verplaats 100mm"); + LSTR MSG_SPEED = _UxGT("Snelheid"); + LSTR MSG_BED_Z = _UxGT("Bed Z"); + LSTR MSG_NOZZLE = _UxGT("Nozzle"); + LSTR MSG_NOZZLE_N = _UxGT("Nozzle ~"); + LSTR MSG_BED = _UxGT("Bed"); + LSTR MSG_FAN_SPEED = _UxGT("Fan snelheid"); + LSTR MSG_FAN_SPEED_N = _UxGT("Fan snelheid ~"); + LSTR MSG_FLOW = _UxGT("Flow"); + LSTR MSG_FLOW_N = _UxGT("Flow ~"); + LSTR MSG_CONTROL = _UxGT("Control"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); + LSTR MSG_AUTOTEMP = _UxGT("Autotemp"); + LSTR MSG_LCD_ON = _UxGT("Aan"); + LSTR MSG_LCD_OFF = _UxGT("Uit"); + LSTR MSG_SELECT = _UxGT("Selecteer"); + LSTR MSG_SELECT_E = _UxGT("Selecteer *"); + LSTR MSG_ACC = _UxGT("Versn"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatuur"); + LSTR MSG_MOTION = _UxGT("Beweging"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_ADVANCE_K = _UxGT("Advance K"); // accepted english dutch + LSTR MSG_ADVANCE_K_E = _UxGT("Advance K *"); // accepted english dutch + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); + LSTR MSG_CONTRAST = _UxGT("LCD contrast"); + LSTR MSG_STORE_EEPROM = _UxGT("Geheugen opslaan"); + LSTR MSG_LOAD_EEPROM = _UxGT("Geheugen laden"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Noodstop reset"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Ververs"); + LSTR MSG_INFO_SCREEN = _UxGT("Info scherm"); + LSTR MSG_PREPARE = _UxGT("Voorbereiden"); + LSTR MSG_TUNE = _UxGT("Afstellen"); + LSTR MSG_PAUSE_PRINT = _UxGT("Print pauzeren"); + LSTR MSG_RESUME_PRINT = _UxGT("Print hervatten"); + LSTR MSG_STOP_PRINT = _UxGT("Print stoppen"); + LSTR MSG_MEDIA_MENU = _UxGT("Print van SD"); + LSTR MSG_NO_MEDIA = _UxGT("Geen SD kaart"); + LSTR MSG_DWELL = _UxGT("Slapen..."); + LSTR MSG_USERWAIT = _UxGT("Wachten..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Print afgebroken"); + LSTR MSG_NO_MOVE = _UxGT("Geen beweging."); + LSTR MSG_KILLED = _UxGT("Afgebroken. "); + LSTR MSG_STOPPED = _UxGT("Gestopt. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retract mm"); // accepted English term in Dutch + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Ruil Retract mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retract F"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Ruil Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretr. FR"); + LSTR MSG_AUTORETRACT = _UxGT("Auto-Retract"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Verv. Filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Verv. Filament *"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Init. SD kaart"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Verv. SD Kaart"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z probe uit. bed"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Zelf-Test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch"); + LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s Eerst"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Offset"); // accepted English term in Dutch + LSTR MSG_BABYSTEP_X = _UxGT("Babystap X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Babystap Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Babystap Z"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop afbr."); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Voorverw. fout"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Redun. temp fout"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("Therm. wegloop"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Err: Max. temp"); + LSTR MSG_ERR_MINTEMP = _UxGT("Err: Min. temp"); + LSTR MSG_HALTED = _UxGT("PRINTER GESTOPT"); + LSTR MSG_PLEASE_RESET = _UxGT("Reset A.U.B."); + LSTR MSG_HEATING = _UxGT("Voorwarmen..."); + LSTR MSG_BED_HEATING = _UxGT("Bed voorverw..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Calibratie"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibreer X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibreer Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibreer Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibreer Midden"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibratie"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Zet Delta Hoogte"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Case licht"); + LSTR MSG_CASE_LIGHT = _UxGT("Case licht"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Onjuiste printer"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Onjuiste printer"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Printed Aantal"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Totaal Voltooid"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Totale Printtijd"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Langste Printtijd"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Totaal Extrudeert"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Printed Aantal"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Totaal Voltooid"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Totale Printtijd"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Langste Printtijd"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Totaal Extrudeert"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Aantal"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Voltooid"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Printtijd "); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Langste"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extrud."); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Aantal"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Voltooid"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Printtijd "); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Langste"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extrud."); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); // accepted English term in Dutch + LSTR MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); + LSTR MSG_INFO_PSU = _UxGT("PSU"); // accepted English term in Dutch - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Motorstroom"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Motorstroom"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC Opslaan"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Hervat print"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozzle: "); // accepted English term + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("DAC Opslaan"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Hervat print"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozzle: "); // accepted English term // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 // Up to 3 lines - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Wacht voor start", "filament te", "verwisselen")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Wacht voor", "filament uit", "te laden")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Klik knop om...", "verw. nozzle.")); //nozzle accepted English term - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nozzle verw.", "Wacht a.u.b.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Laad filament", "en druk knop", "om verder...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Wacht voor", "filament te", "laden")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Wacht voor print", "om verder", "te gaan")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Wacht voor start", "filament te", "verwisselen")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Wacht voor", "filament uit", "te laden")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Klik knop om...", "verw. nozzle.")); //nozzle accepted English term + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nozzle verw.", "Wacht a.u.b.")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Laad filament", "en druk knop", "om verder...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Wacht voor", "filament te", "laden")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Wacht voor print", "om verder", "te gaan")); #else // Up to 2 lines - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("Wacht voor", "start...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Wacht voor", "uitladen...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Klik knop om...", "verw. nozzle.")); //nozzle accepted English term - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Verwarmen...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_2_LINE("Laad filament", "en druk knop")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Wacht voor", "inladen...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Wacht voor", "printing...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("Wacht voor", "start...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Wacht voor", "uitladen...")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Klik knop om...", "verw. nozzle.")); //nozzle accepted English term + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Verwarmen...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_2_LINE("Laad filament", "en druk knop")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Wacht voor", "inladen...")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Wacht voor", "printing...")); #endif } diff --git a/Marlin/src/lcd/language/language_pl.h b/Marlin/src/lcd/language/language_pl.h index bf7d32e2223a..b37e1d80cf63 100644 --- a/Marlin/src/lcd/language/language_pl.h +++ b/Marlin/src/lcd/language/language_pl.h @@ -26,6 +26,13 @@ * * LCD Menu Messages * See also https://marlinfw.org/docs/development/lcd_language.html + * + * Substitutions are applied for the following characters when used + * in menu items that call lcd_put_u8str_ind_P with an index: + * + * = displays '0'....'10' for indexes 0 - 10 + * ~ displays '1'....'11' for indexes 0 - 10 + * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) */ #define DISPLAY_CHARSET_ISO10646_PL @@ -33,497 +40,522 @@ namespace Language_pl { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Polish"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Polski"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" gotowy."); - PROGMEM Language_Str MSG_YES = _UxGT("TAK"); - PROGMEM Language_Str MSG_NO = _UxGT("NIE"); - PROGMEM Language_Str MSG_BACK = _UxGT("Wstecz"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Przerywanie..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Karta włożona"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Karta usunięta"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Oczekiwanie na kartę"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Bład odczytu karty"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("Urządzenie USB usunięte"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Błąd uruchomienia USB"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Krańców."); // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Progr. Krańcówki"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menu główne"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Ustawienie zaawansowane"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Konfiguracja"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autostart"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Wyłącz silniki"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu Debugowania"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Testowy pasek postępu"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Pozycja zerowa"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Zeruj X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Zeruj Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Zeruj Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Autowyrównanie Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Pozycja zerowa"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Kliknij by rozp."); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Następny punkt"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Wypoziomowano!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Wys. zanikania"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Ust. poz. zer."); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Poz. zerowa ust."); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Ustaw punkt zero"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" gotowy."); + LSTR MSG_YES = _UxGT("TAK"); + LSTR MSG_NO = _UxGT("NIE"); + LSTR MSG_BACK = _UxGT("Wstecz"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Przerywanie..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Karta włożona"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Karta usunięta"); + LSTR MSG_MEDIA_WAITING = _UxGT("Oczekiwanie na kartę"); + LSTR MSG_SD_INIT_FAIL = _UxGT("Błąd inicializacji karty"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Bład odczytu karty"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("Urządzenie USB usunięte"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Błąd uruchomienia USB"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Krańców."); // Max length 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Progr. Krańcówki"); + LSTR MSG_MAIN = _UxGT("Menu główne"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Ustawienie zaawansowane"); + LSTR MSG_CONFIGURATION = _UxGT("Konfiguracja"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Wyłącz silniki"); + LSTR MSG_DEBUG_MENU = _UxGT("Menu Debugowania"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Testowy pasek postępu"); + LSTR MSG_AUTO_HOME = _UxGT("Pozycja zerowa"); + LSTR MSG_AUTO_HOME_X = _UxGT("Zeruj X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Zeruj Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Zeruj Z"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Autowyrównanie Z"); + LSTR MSG_DECREASING_ACCURACY = _UxGT("Spadek dokładności!"); + LSTR MSG_ACCURACY_ACHIEVED = _UxGT("Osiągnięto dokładność"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Pozycja zerowa"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Kliknij by rozp."); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Następny punkt"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Wypoziomowano!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Wys. zanikania"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Ust. poz. zer."); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Poz. zerowa ust."); + LSTR MSG_SET_ORIGIN = _UxGT("Ustaw punkt zero"); + LSTR MSG_SELECT_ORIGIN = _UxGT("Wybierz punkt zero"); + LSTR MSG_LAST_VALUE_SP = _UxGT("Poprzednia wartość "); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Rozgrzej ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Rozgrzej ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" Dysza"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" Dysza ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" wsz."); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" stół"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" ustaw."); + LSTR MSG_PREHEAT_1 = _UxGT("Rozgrzej ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Rozgrzej ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" Dysza"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" Dysza ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" wsz."); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" stół"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Rozgrzej ") PREHEAT_1_LABEL _UxGT(" ustaw."); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Rozgrzej $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Rozgrzej $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Rozgrzej $ Dysza"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Rozgrzej $ Dysza ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Rozgrzej $ wsz."); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Rozgrzej $ stół"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Rozgrzej $ ustaw."); - #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Rozgrzej własne ust."); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Chłodzenie"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Sterowanie Lasera"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Zasilanie Lasera"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Sterowanie wrzeciona"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Zasilanie wrzeciona"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Rewers wrzeciona"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Włącz zasilacz"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Wyłącz zasilacz"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Ekstruzja"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Wycofanie"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Ruch osi"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Poziomowanie stołu"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Wypoziomuj stół"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Narożniki poziomowania"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Nastepny narożnik"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Edytor siatki"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Edycja siatki"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Edycja siatki zatrzymana"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Punkt pomiarowy"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Indeks X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Indeks Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Wartość Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Własne Polecenia"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Test sondy"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Punky"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Odchylenie"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("Tryb IDEX"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Przesunięcie narzędzia"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Parkowanie"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplikowanie"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Kopia lustrzana"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Pełne sterowanie"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2ga dysza X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2ga dysza Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2ga dysza Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Wykonywanie G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Narzędzia UBL"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Punkt pochylenia"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Ręczne Budowanie Siatki"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Umieść podkładkę i zmierz"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Zmierz"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Usuń & Zmierz Stół"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Przesuwanie do następnego"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Aktywacja UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Dezaktywacja UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Temperatura stołu"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temperatura stołu"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temperatura dyszy"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temperatura dyszy"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Edycja siatki"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edycja własnej siatki"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Dostrajanie siatki"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Koniec edycji siati"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Buduj własna siatkę"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Buduj siatkę"); - #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Buduj siatkę ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Sprawdzenie siatki ($)"); + LSTR MSG_PREHEAT_M = _UxGT("Rozgrzej $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Rozgrzej $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Rozgrzej $ Dysza"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Rozgrzej $ Dysza ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Rozgrzej $ wsz."); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Rozgrzej $ stół"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Rozgrzej $ ustaw."); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Buduj siatkę na zimno"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Dostrojenie wysokości siatki"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Wartość wysokości"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Sprawdzenie siatki"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Sprawdzenie własnej siatki"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Nagrzewanie stołu"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Nagrzewanie dyszy"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Napełnianie ręczne..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Napełnij kreśloną długością"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Napełnianie zakończone"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Przewane"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Opuszczanie G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Kontynuuj tworzenie siatki"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Poziomowanie siatką"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Poziomowaie 3-punktowe"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Poziomowaie według siatki"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Poziomuj siatkę"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Punkty boczne"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Rodzaj mapy"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Wyslij mapę siatki"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Wyslij do Hosta"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Wyslij do CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Kopia poza drukarką"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Wyslij info UBL"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Stopień wypełnienia"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Ręczne wypełnienie"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Inteligentne wypełnienie"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Wypełnienie siatki"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Unieważnij wszystko"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Unieważnij najbliższy"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Dostrajaj wszystko"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Dostrajaj najbliższy"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Przechowywanie siatki"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Slot Pamięci"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Załaduj siatkę stołu"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Zapisz siatkę stołu"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Siatka %i załadowana"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Siatka %i zapisana"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Brak magazynu"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Błąd: Zapis UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Bład: Odczyt UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Przesunięcie Z: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Przesunięcie Z zatrzymane"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL Krok po kroku"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Tworzenie zimnej siatki"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. Inteligentne wypełnienie"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Sprawdzenie siatki"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Dostrojenie wszystkiego"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Sprawdzenie siatki"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Dostrojenie wszystkiego"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. Zapis siatki stołu"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Rozgrzej własne ust."); + LSTR MSG_COOLDOWN = _UxGT("Chłodzenie"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Sterowanie LED"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Światła"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Ustawienia świateł"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Czerwony"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Pomarańczowy"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Zółty"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Zielony"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Niebieski"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indygo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Fioletowy"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Biały"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Domyślny"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Własne światła"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Czerwony"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Zielony"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Niebieski"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Biały"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Jasność"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Częstotliwość"); + LSTR MSG_LASER_MENU = _UxGT("Sterowanie Lasera"); + LSTR MSG_SPINDLE_MENU = _UxGT("Sterowanie wrzeciona"); + LSTR MSG_LASER_POWER = _UxGT("Zasilanie Lasera"); + LSTR MSG_SPINDLE_POWER = _UxGT("Zasilanie wrzeciona"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Rewers wrzeciona"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Włącz zasilacz"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Wyłącz zasilacz"); + LSTR MSG_EXTRUDE = _UxGT("Ekstruzja"); + LSTR MSG_RETRACT = _UxGT("Wycofanie"); + LSTR MSG_MOVE_AXIS = _UxGT("Ruch osi"); + LSTR MSG_BED_LEVELING = _UxGT("Poziomowanie stołu"); + LSTR MSG_LEVEL_BED = _UxGT("Wypoziomuj stół"); + LSTR MSG_BED_TRAMMING = _UxGT("Narożniki poziomowania"); + LSTR MSG_NEXT_CORNER = _UxGT("Nastepny narożnik"); + LSTR MSG_MESH_EDITOR = _UxGT("Edytor siatki"); + LSTR MSG_EDIT_MESH = _UxGT("Edycja siatki"); + LSTR MSG_EDITING_STOPPED = _UxGT("Edycja siatki zatrzymana"); + LSTR MSG_PROBING_POINT = _UxGT("Punkt pomiarowy"); + LSTR MSG_MESH_X = _UxGT("Indeks X"); + LSTR MSG_MESH_Y = _UxGT("Indeks Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Wartość Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Własne Polecenia"); + LSTR MSG_M48_TEST = _UxGT("M48 Test sondy"); + LSTR MSG_M48_POINT = _UxGT("M48 Punky"); + LSTR MSG_M48_DEVIATION = _UxGT("Odchylenie"); + LSTR MSG_IDEX_MENU = _UxGT("Tryb IDEX"); + LSTR MSG_OFFSETS_MENU = _UxGT("Przesunięcie narzędzia"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Parkowanie"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplikowanie"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Kopia lustrzana"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Pełne sterowanie"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2ga dysza X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2ga dysza Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2ga dysza Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Wykonywanie G29"); + LSTR MSG_UBL_TOOLS = _UxGT("Narzędzia UBL"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Punkt pochylenia"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Ręczne Budowanie Siatki"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Umieść podkładkę i zmierz"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Zmierz"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Usuń & Zmierz Stół"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Przesuwanie do następnego"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Aktywacja UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Dezaktywacja UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temperatura stołu"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temperatura stołu"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temperatura dyszy"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temperatura dyszy"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Edycja siatki"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edycja własnej siatki"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Dostrajanie siatki"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Koniec edycji siati"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Buduj własna siatkę"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Buduj siatkę"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Buduj siatkę ($)"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Buduj siatkę na zimno"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Dostrojenie wysokości siatki"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Wartość wysokości"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Sprawdzenie siatki"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Sprawdzenie siatki ($)"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Sprawdzenie własnej siatki"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 Nagrzewanie stołu"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Nagrzewanie dyszy"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Napełnianie ręczne..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Napełnij kreśloną długością"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Napełnianie zakończone"); + LSTR MSG_G26_CANCELED = _UxGT("G26 Przewane"); + LSTR MSG_G26_LEAVING = _UxGT("Opuszczanie G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Kontynuuj tworzenie siatki"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Poziomowanie siatką"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Poziomowaie 3-punktowe"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Poziomowaie według siatki"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Poziomuj siatkę"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Punkty boczne"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Rodzaj mapy"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Wyslij mapę siatki"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Wyslij do Hosta"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Wyslij do CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Kopia poza drukarką"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Wyslij info UBL"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Stopień wypełnienia"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Ręczne wypełnienie"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Inteligentne wypełnienie"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Wypełnienie siatki"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Unieważnij wszystko"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Unieważnij najbliższy"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Dostrajaj wszystko"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Dostrajaj najbliższy"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Przechowywanie siatki"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Slot Pamięci"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Załaduj siatkę stołu"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Zapisz siatkę stołu"); + LSTR MSG_MESH_LOADED = _UxGT("Siatka %i załadowana"); + LSTR MSG_MESH_SAVED = _UxGT("Siatka %i zapisana"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Brak magazynu"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Błąd: Zapis UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Bład: Odczyt UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Przesunięcie Z: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Przesunięcie Z zatrzymane"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL Krok po kroku"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Tworzenie zimnej siatki"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2. Inteligentne wypełnienie"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Sprawdzenie siatki"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Dostrojenie wszystkiego"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Sprawdzenie siatki"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Dostrojenie wszystkiego"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Zapis siatki stołu"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Ruch..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Swobodne XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Przesuń w X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Przesuń w Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Przesuń w Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Ekstruzja (os E)"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Ekstruzja (os E) *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Dysza za zimna"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Przesuń co %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Przesuń co .1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Przesuń co 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Przesuń co 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Predkość"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Stół Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Dysza"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Dysza ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Stół"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Obudowa"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Obroty wiatraka"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Obroty wiatraka ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Obroty dodatkowego wiatraka"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Obroty dodatkowego wiatraka ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Przepływ"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Przepływ ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Ustawienia"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Mnożnik"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Auto. temperatura"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Wł."); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Wył."); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Autostrojenie"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Autostrojenie *"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Wybierz"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Wybierz *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Przyspieszenie"); - PROGMEM Language_Str MSG_JERK = _UxGT("Zryw"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("Zryw V") LCD_STR_A; - PROGMEM Language_Str MSG_VB_JERK = _UxGT("Zryw V") LCD_STR_B; - PROGMEM Language_Str MSG_VC_JERK = _UxGT("Zryw V") LCD_STR_C; - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Zryw Ve"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Prędkość (V)"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vskok min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Przyspieszenie (A)"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-wycofanie"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-przesuń."); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("kroki/mm"); - PROGMEM Language_Str MSG_A_STEPS = _UxGT("kroki") LCD_STR_A _UxGT("/mm"); - PROGMEM Language_Str MSG_B_STEPS = _UxGT("kroki") LCD_STR_B _UxGT("/mm"); - PROGMEM Language_Str MSG_C_STEPS = _UxGT("kroki") LCD_STR_C _UxGT("/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("krokiE/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("kroki */mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Ruch"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E w mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Śr. fil."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Śr. fil. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Wysuń mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Wsuń mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Advance K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Advance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Kontrast LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Zapisz w pamięci"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Wczytaj z pamięci"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Ustaw. fabryczne"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Initializuj EEPROM"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Uaktualnij kartę"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Resetuj drukarkę"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Odswież"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Ekran główny"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Przygotuj"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Strojenie"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Start wydruku"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Następny"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Inic."); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Stop"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Drukuj"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Resetuj"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Przerwij"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Gotowe"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Wstrzymaj druk"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Wznowienie"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Stop"); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Odzyskiwanie po awarii"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Karta SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Brak karty"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Uśpij..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Oczekiwanie..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Druk wstrzymany"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Drukowanie..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Druk przerwany"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Brak ruchu"); - PROGMEM Language_Str MSG_KILLED = _UxGT("Ubity. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("Zatrzymany. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Wycofaj mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Z Wycof. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Wycofaj V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Skok Z mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Cof. wycof. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Z Cof. wyc. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Cof. wycof. V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto. wycofanie"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Długość zmiany"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Długość oczyszczania"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Zmiana narzędzia"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Podniesienie Z"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Prędkość napełniania"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Prędkość wycofania"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Dysza w oczekiwaniu"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Zmień filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Zmień filament *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Wsuń Filament"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Wsuń Filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Wysuń Filament"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Wysuń Filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Wysuń wszystkie"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Inicjal. karty SD"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Zmiana karty SD"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Zwolnienie karty"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sonda Z za stołem"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Współczynik skrzywienia"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Self-Test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Stow"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Deploy"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("SW-Mode"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("5V-Mode"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("OD-Mode"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Set BLTouch to 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Set BLTouch to OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Report Drain"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("UWAGA: Złe ustawienia mogą uszkodzić drukarkę. Kontynuować?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Init TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Z Offset Test"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Save"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Deploy TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Deploy Z-Probe"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Stow Z-Probe"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Najpierw Home %s%s%s"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Offset Z"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Babystep X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Babystep Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Babystep Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Łącznie"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Błąd krańcówki"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Rozgrz. nieudane"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Błąd temperatury"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("ZANIK TEMPERATURY"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("ZANIK TEMP. STOŁU"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ZANIK TEMP.KOMORY"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Błąd: MAXTEMP"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Błąd: MINTEMP"); - PROGMEM Language_Str MSG_HALTED = _UxGT("Drukarka zatrzym."); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Proszę zresetować"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("g"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Rozgrzewanie..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Chłodzenie..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Rozgrzewanie stołu..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Chłodzenie stołu..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Rozgrzewanie komory..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Chłodzenie komory..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Kalibrowanie Delty"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibruj X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibruj Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibruj Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibruj środek"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Ustawienia delty"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto kalibrowanie"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Ustaw wysokość delty"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Przesun. Z sondy"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Ukośne ramię"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Wysokość"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Promień"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("O drukarce"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Info drukarki"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("Poziomowanie 3-punktowe"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Poziomowanie liniowe"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Poziomowanie biliniowe"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Poziomowanie siatką"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Statystyki"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Info płyty"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistory"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Ekstrudery"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Predkość USB"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokół"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Zegar pracy: OFF"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Zegar pracy: ON"); + LSTR MSG_LED_CONTROL = _UxGT("Sterowanie LED"); + LSTR MSG_LEDS = _UxGT("Światła"); + LSTR MSG_LED_PRESETS = _UxGT("Ustawienia świateł"); + LSTR MSG_SET_LEDS_RED = _UxGT("Czerwony"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Pomarańczowy"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Zółty"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Zielony"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Niebieski"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indygo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Fioletowy"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Biały"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Domyślny"); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanał ="); + LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Jasność"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Własne światła"); + LSTR MSG_INTENSITY_R = _UxGT("Czerwony"); + LSTR MSG_INTENSITY_G = _UxGT("Zielony"); + LSTR MSG_INTENSITY_B = _UxGT("Niebieski"); + LSTR MSG_INTENSITY_W = _UxGT("Biały"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Jasność"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Oświetlenie obudowy"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Jasność oświetlenia"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Niepoprawna drukarka"); + LSTR MSG_MOVING = _UxGT("Ruch..."); + LSTR MSG_FREE_XY = _UxGT("Swobodne XY"); + LSTR MSG_MOVE_X = _UxGT("Przesuń w X"); + LSTR MSG_MOVE_Y = _UxGT("Przesuń w Y"); + LSTR MSG_MOVE_Z = _UxGT("Przesuń w Z"); + LSTR MSG_MOVE_E = _UxGT("Ekstruzja (os E)"); + LSTR MSG_MOVE_EN = _UxGT("Ekstruzja (os E) *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Dysza za zimna"); + LSTR MSG_MOVE_N_MM = _UxGT("Przesuń co %s mm"); + LSTR MSG_MOVE_01MM = _UxGT("Przesuń co .1 mm"); + LSTR MSG_MOVE_1MM = _UxGT("Przesuń co 1 mm"); + LSTR MSG_MOVE_10MM = _UxGT("Przesuń co 10 mm"); + LSTR MSG_MOVE_100MM = _UxGT("Przesuń co 100 mm"); + LSTR MSG_MOVE_0001IN = _UxGT("Przesuń co 0.001 cala"); + LSTR MSG_MOVE_001IN = _UxGT("Przesuń co 0.01 cala"); + LSTR MSG_MOVE_01IN = _UxGT("Przesuń co 0.1 cala"); + LSTR MSG_SPEED = _UxGT("Predkość"); + LSTR MSG_BED_Z = _UxGT("Stół Z"); + LSTR MSG_NOZZLE = _UxGT("Dysza"); + LSTR MSG_NOZZLE_N = _UxGT("Dysza ~"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Dysza w oczekiwaniu"); + LSTR MSG_BED = _UxGT("Stół"); + LSTR MSG_CHAMBER = _UxGT("Obudowa"); + LSTR MSG_FAN_SPEED = _UxGT("Obroty wentylatora"); + LSTR MSG_FAN_SPEED_N = _UxGT("Obroty wentylatora ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Obroty dodatkowego wentylatora"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Obroty dodatkowego wentylatora ~"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Wentylator kontrolera"); + LSTR MSG_FLOW = _UxGT("Przepływ"); + LSTR MSG_FLOW_N = _UxGT("Przepływ ~"); + LSTR MSG_CONTROL = _UxGT("Ustawienia"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Mnożnik"); + LSTR MSG_AUTOTEMP = _UxGT("Auto. temperatura"); + LSTR MSG_LCD_ON = _UxGT("Wł."); + LSTR MSG_LCD_OFF = _UxGT("Wył."); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autostrojenie"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autostrojenie *"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Strojenie PID zakończone"); + LSTR MSG_SELECT = _UxGT("Wybierz"); + LSTR MSG_SELECT_E = _UxGT("Wybierz *"); + LSTR MSG_ACC = _UxGT("Przyspieszenie"); + LSTR MSG_JERK = _UxGT("Zryw"); + LSTR MSG_VA_JERK = _UxGT("Zryw V") LCD_STR_A; + LSTR MSG_VB_JERK = _UxGT("Zryw V") LCD_STR_B; + LSTR MSG_VC_JERK = _UxGT("Zryw V") LCD_STR_C; + LSTR MSG_VI_JERK = _UxGT("Zryw V") LCD_STR_I; + LSTR MSG_VJ_JERK = _UxGT("Zryw V") LCD_STR_J; + LSTR MSG_VK_JERK = _UxGT("Zryw V") LCD_STR_K; + LSTR MSG_VE_JERK = _UxGT("Zryw Ve"); + LSTR MSG_VELOCITY = _UxGT("Prędkość (V)"); + + LSTR MSG_VTRAV_MIN = _UxGT("Vskok min"); + LSTR MSG_ACCELERATION = _UxGT("Przyspieszenie (A)"); + + LSTR MSG_A_RETRACT = _UxGT("A-wycofanie"); + LSTR MSG_A_TRAVEL = _UxGT("A-przesuń."); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Częstotliwość max"); + LSTR MSG_STEPS_PER_MM = _UxGT("kroki/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" kroki/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" kroki/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" kroki/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" kroki/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" kroki/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" kroki/mm"); + LSTR MSG_E_STEPS = _UxGT("E kroki/mm"); + LSTR MSG_EN_STEPS = _UxGT("* kroki/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatura"); + LSTR MSG_MOTION = _UxGT("Ruch"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E w mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Śr. fil."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Śr. fil. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Wysuń mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Wsuń mm"); + LSTR MSG_CONTRAST = _UxGT("Kontrast LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Zapisz w pamięci"); + LSTR MSG_LOAD_EEPROM = _UxGT("Wczytaj z pamięci"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Ustaw. fabryczne"); + LSTR MSG_INIT_EEPROM = _UxGT("Initializuj EEPROM"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Uaktualnij kartę"); + LSTR MSG_RESET_PRINTER = _UxGT("Resetuj drukarkę"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Odswież"); + LSTR MSG_INFO_SCREEN = _UxGT("Ekran główny"); + LSTR MSG_PREPARE = _UxGT("Przygotuj"); + LSTR MSG_TUNE = _UxGT("Strojenie"); + LSTR MSG_CURRENT = _UxGT("Natężenie"); + LSTR MSG_VOLTAGE = _UxGT("Napięcie"); + LSTR MSG_POWER = _UxGT("Moc"); + LSTR MSG_START_PRINT = _UxGT("Start wydruku"); + LSTR MSG_BUTTON_NEXT = _UxGT("Następny"); + LSTR MSG_BUTTON_INIT = _UxGT("Inic."); + LSTR MSG_BUTTON_PRINT = _UxGT("Drukuj"); + LSTR MSG_BUTTON_RESET = _UxGT("Resetuj"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Ignoruj"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Przerwij"); + LSTR MSG_BUTTON_DONE = _UxGT("Gotowe"); + LSTR MSG_BUTTON_BACK = _UxGT("Wstecz"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Kontynuuj"); + LSTR MSG_BUTTON_SKIP = _UxGT("Pomiń"); + LSTR MSG_PAUSING = _UxGT("Wstrzymywanie..."); + LSTR MSG_PAUSE_PRINT = _UxGT("Wstrzymaj druk"); + LSTR MSG_RESUME_PRINT = _UxGT("Wznowienie"); + LSTR MSG_STOP_PRINT = _UxGT("Stop"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Drukowanie obiektu"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Anunuj obiekt"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Anunuj obiekt ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Odzyskiwanie po awarii"); + LSTR MSG_MEDIA_MENU = _UxGT("Karta SD"); + LSTR MSG_NO_MEDIA = _UxGT("Brak karty"); + LSTR MSG_DWELL = _UxGT("Uśpij..."); + LSTR MSG_USERWAIT = _UxGT("Oczekiwanie..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Druk wstrzymany"); + LSTR MSG_PRINTING = _UxGT("Drukowanie..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Druk przerwany"); + LSTR MSG_PRINT_DONE = _UxGT("Druk zakończony"); + LSTR MSG_NO_MOVE = _UxGT("Brak ruchu"); + LSTR MSG_KILLED = _UxGT("Ubity. "); + LSTR MSG_STOPPED = _UxGT("Zatrzymany. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Wycofaj mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Z Wycof. mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Wycofaj V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Skok Z mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Cof. wycof. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Z Cof. wyc. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Cof. wycof. V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto. wycofanie"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Długość zmiany"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Długość oczyszczania"); + LSTR MSG_TOOL_CHANGE = _UxGT("Zmiana narzędzia"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Podniesienie Z"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Prędkość napełniania"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Prędkość wycofania"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Zmień filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Zmień filament *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Wsuń Filament"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Wsuń Filament *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Wysuń Filament"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Wysuń Filament *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Wysuń wszystkie"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Inicjal. karty SD"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Zmiana karty SD"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Zwolnienie karty"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z za stołem"); + LSTR MSG_SKEW_FACTOR = _UxGT("Współczynik skrzywienia"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch Self-Test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reset BLTouch"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("UWAGA: Złe ustawienia mogą uszkodzić drukarkę. Kontynuować?"); + LSTR MSG_HOME_FIRST = _UxGT("Najpierw Home %s%s%s"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Offset Z"); + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Przesuń dyszę do stołu"); + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Łącznie"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Błąd krańcówki"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Rozgrz. nieudane"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Błąd temperatury"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("ZANIK TEMPERATURY"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("ZANIK TEMP. STOŁU"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ZANIK TEMP.KOMORY"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Błąd: MAXTEMP"); + LSTR MSG_ERR_MINTEMP = _UxGT("Błąd: MINTEMP"); + LSTR MSG_HALTED = _UxGT("Drukarka zatrzym."); + LSTR MSG_PLEASE_RESET = _UxGT("Proszę zresetować"); + LSTR MSG_SHORT_HOUR = _UxGT("g"); // One character only + LSTR MSG_HEATING = _UxGT("Rozgrzewanie..."); + LSTR MSG_COOLING = _UxGT("Chłodzenie..."); + LSTR MSG_BED_HEATING = _UxGT("Rozgrzewanie stołu..."); + LSTR MSG_BED_COOLING = _UxGT("Chłodzenie stołu..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Rozgrzewanie komory..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Chłodzenie komory..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Kalibrowanie Delty"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibruj X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibruj Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibruj Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibruj środek"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Ustawienia delty"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto kalibrowanie"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Ustaw wysokość delty"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Przesun. Z sondy"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Ukośne ramię"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Wysokość"); + LSTR MSG_DELTA_RADIUS = _UxGT("Promień"); + LSTR MSG_INFO_MENU = _UxGT("O drukarce"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Info drukarki"); + LSTR MSG_3POINT_LEVELING = _UxGT("Poziomowanie 3-punktowe"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Poziomowanie liniowe"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Poziomowanie biliniowe"); + LSTR MSG_MESH_LEVELING = _UxGT("Poziomowanie siatką"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Statystyki"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Info płyty"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistory"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Ekstrudery"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Predkość USB"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protokół"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Zegar pracy: OFF"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Zegar pracy: ON"); + + LSTR MSG_CASE_LIGHT = _UxGT("Oświetlenie obudowy"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Jasność oświetlenia"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Niepoprawna drukarka"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Wydrukowano"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Ukończono"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Czas druku"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Najdł. druk"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Użyty fil."); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Wydrukowano"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Ukończono"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Czas druku"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Najdł. druk"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Użyty fil."); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Wydrukowano"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Ukończono"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Razem"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Najdł. druk"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Użyty fil."); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Wydrukowano"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Ukończono"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Razem"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Najdł. druk"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Użyty fil."); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Zasilacz"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Siła silnika"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Siła %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Siła %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Siła %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Siła %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC BŁĄD POŁĄCZENIA"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Zapisz DAC EEPROM"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("ZMIEŃ FILAMENT"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("WYDRUK WSTRZYMANY"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("WSUŃ FILAMENT"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("WYSUŃ FILAMENT"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPCJE WZNOWIENIA:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Oczyść więcej"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Kontynuuj"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Dysza: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Czujnik filamentu"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Dystans do czujnika mm"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Zerowanie nieudane"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Sondowanie nieudane"); + LSTR MSG_INFO_PSU = _UxGT("Zasilacz"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Siła silnika"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Siła %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Siła %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Siła %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Siła %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Siła %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Siła %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Siła %"); + LSTR MSG_ERROR_TMC = _UxGT("TMC BŁĄD POŁĄCZENIA"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Zapisz DAC EEPROM"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("ZMIEŃ FILAMENT"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("WYDRUK WSTRZYMANY"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("WSUŃ FILAMENT"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("WYSUŃ FILAMENT"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("OPCJE WZNOWIENIA:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Oczyść więcej"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Kontynuuj"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Dysza: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Czujnik filamentu"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Dystans do czujnika mm"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Zerowanie nieudane"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Sondowanie nieudane"); + + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("WYBIERZ FILAMENT"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Uaktualnij firmware MMU!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU wymaga uwagi."); + LSTR MSG_MMU2_RESUME = _UxGT("Wznów wydruk"); + LSTR MSG_MMU2_RESUMING = _UxGT("Wznawianie..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Wsuń filament"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Wsuń wszystko"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Wsuń do dyszy"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Wysuń filament"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Wysuń filament ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Wysuń filament"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Wsuwanie fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Wysuwanie fil. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Wysuwanie fil...."); + LSTR MSG_MMU2_ALL = _UxGT("Wszystko"); + LSTR MSG_MMU2_RESET = _UxGT("Resetuj MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("Resetowanie MMU..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Usuń, kliknij"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("WYBIERZ FILAMENT"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Uaktualnij firmware MMU!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU wymaga uwagi."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Wznów wydruk"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Wznawianie..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Wsuń filament"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Wsuń wszystko"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Wsuń do dyszy"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Wysuń filament"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Wysuń filament ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Wysuń filament"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Wsuwanie fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Wysuwanie fil. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Wysuwanie fil...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Wszystko"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Resetuj MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("Resetowanie MMU..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Usuń, kliknij"); + LSTR MSG_MIX = _UxGT("Miks"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent ="); + LSTR MSG_MIXER = _UxGT("Mikser"); + LSTR MSG_FULL_GRADIENT = _UxGT("Pełny gradient"); + LSTR MSG_TOGGLE_MIX = _UxGT("Przełacz miks"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Odwrotny gradient"); - PROGMEM Language_Str MSG_MIX = _UxGT("Miks"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Komponent ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Mikser"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Gradient"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Pełny gradient"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Przełacz miks"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Cycle Mix"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Gradient Mix"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Odwrotny gradient"); + LSTR MSG_GAMES = _UxGT("Gry"); + + + LSTR MSG_EDIT_PASSWORD = _UxGT("Zmień hasło"); + LSTR MSG_LOGIN_REQUIRED = _UxGT("Wymagane zalogowanie"); + LSTR MSG_PASSWORD_SETTINGS = _UxGT("Ustawienia hasła"); + LSTR MSG_ENTER_DIGIT = _UxGT("Wprowadź cyfrę"); + LSTR MSG_CHANGE_PASSWORD = _UxGT("Ustaw/zmień hasło"); + LSTR MSG_REMOVE_PASSWORD = _UxGT("Usuń hasło"); + LSTR MSG_PASSWORD_SET = _UxGT("Hasło to "); + LSTR MSG_START_OVER = _UxGT("Od nowa"); + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Pamiętaj by zapisać!"); + LSTR MSG_PASSWORD_REMOVED = _UxGT("Hasło usunięte"); // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Nacisnik przycisk", "by wznowić drukowanie")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkowanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Czekam na", "zmianę filamentu", "by wystartować")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Włóż filament", "i naciśnij przycisk", "by kontynuować")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Naciśnij przycisk", "by nagrzać dyszę")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nagrzewanie dyszy", "Proszę czekać...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Czekam na", "wyjęcie filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Czekam na", "włożenie filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Czekam na", "oczyszczenie filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Kliknij by zakończyć", "oczyszczanie filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Czekam na", "wznowienie wydruku...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Nacisnik przycisk", "by wznowić drukowanie")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkowanie...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Czekam na", "zmianę filamentu", "by wystartować")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Włóż filament", "i naciśnij przycisk", "by kontynuować")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Naciśnij przycisk", "by nagrzać dyszę")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nagrzewanie dyszy", "Proszę czekać...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Czekam na", "wyjęcie filamentu")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Czekam na", "włożenie filamentu")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Czekam na", "oczyszczenie filamentu")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Kliknij by zakończyć", "oczyszczanie filamentu")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Czekam na", "wznowienie wydruku...")); #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Kliknij by kontynuować")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkowanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Proszę czekać...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Włóż i kliknij")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Kliknij by nagrzać")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Nagrzewanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Wysuwanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Wsuwanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Oczyszczanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Kliknij by zakończyć")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Wznawianie...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Kliknij by kontynuować")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkowanie...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Proszę czekać...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Włóż i kliknij")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Kliknij by nagrzać")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Nagrzewanie...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Wysuwanie...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Wsuwanie...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Oczyszczanie...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Kliknij by zakończyć")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Wznawianie...")); #endif + LSTR MSG_TMC_DRIVERS = _UxGT("Sterowniki TMC"); + LSTR MSG_TMC_CURRENT = _UxGT("Prąd sterownika"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Zerowanie bezczujnikowe"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Korekcja"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Wygładzanie"); + + LSTR MSG_LEVEL_X_AXIS = _UxGT("Wypoziomuj oś X"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Autokalibracja"); + + LSTR MSG_SOUND = _UxGT("Dźwięk"); + + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Kalibracja zakończona"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Kalibracja nie powiodła się"); + } + +#if FAN_COUNT == 1 + #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED + #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED +#else + #define MSG_FIRST_FAN_SPEED MSG_FAN_SPEED_N + #define MSG_EXTRA_FIRST_FAN_SPEED MSG_EXTRA_FAN_SPEED_N +#endif diff --git a/Marlin/src/lcd/language/language_pt.h b/Marlin/src/lcd/language/language_pt.h index 60b0c550564f..13f62f693bfb 100644 --- a/Marlin/src/lcd/language/language_pt.h +++ b/Marlin/src/lcd/language/language_pt.h @@ -34,137 +34,141 @@ namespace Language_pt { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Portuguese"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Portuguese"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" pronta."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Cartão inserido"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Cartão removido"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menu principal"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Desactivar motores"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Ir para origem"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Ir para origem X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Ir para origem Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Ir para origem Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Indo para origem"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Click para iniciar"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Próximo ponto"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Pronto !"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Definir desvio"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets aplicados"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Definir origem"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" pronta."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Cartão inserido"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Cartão removido"); + LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Desactivar motores"); + LSTR MSG_AUTO_HOME = _UxGT("Ir para origem"); + LSTR MSG_AUTO_HOME_X = _UxGT("Ir para origem X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Ir para origem Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Ir para origem Z"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Indo para origem"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Click para iniciar"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Próximo ponto"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Pronto !"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Definir desvio"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offsets aplicados"); + LSTR MSG_SET_ORIGIN = _UxGT("Definir origem"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL _UxGT(" Bico"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL _UxGT(" Bico ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Pre-aq. ") PREHEAT_1_LABEL _UxGT(" Tudo"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Pre-aq. ") PREHEAT_1_LABEL _UxGT(" ") LCD_STR_THERMOMETER _UxGT("Base"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Definições ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1 = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL _UxGT(" Bico"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL _UxGT(" Bico ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Pre-aq. ") PREHEAT_1_LABEL _UxGT(" Tudo"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Pre-aq. ") PREHEAT_1_LABEL _UxGT(" ") LCD_STR_THERMOMETER _UxGT("Base"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Definições ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Pre-aquecer $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Pre-aquecer $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Pre-aquecer $ Bico"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Pre-aquecer $ Bico ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Pre-aq. $ Tudo"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Pre-aq. $ ") LCD_STR_THERMOMETER _UxGT("Base"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Definições $"); + LSTR MSG_PREHEAT_M = _UxGT("Pre-aquecer $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Pre-aquecer $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Pre-aquecer $ Bico"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Pre-aquecer $ Bico ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Pre-aq. $ Tudo"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Pre-aq. $ ") LCD_STR_THERMOMETER _UxGT("Base"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Definições $"); #endif - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Arrefecer"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Ligar"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Desligar"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrudir"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Retrair"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mover eixo"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Mover X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Mover Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Mover Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Mover Extrusor"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Mover Extrusor *"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Mover %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mover 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mover 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Velocidade"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Base Z"); - PROGMEM Language_Str MSG_NOZZLE = " " LCD_STR_THERMOMETER _UxGT(" Bico"); - PROGMEM Language_Str MSG_NOZZLE_N = " " LCD_STR_THERMOMETER _UxGT(" Bico ~"); - PROGMEM Language_Str MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" Base"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Vel. ventoinha"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Vel. ventoinha ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Fluxo"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Fluxo ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Controlo"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retracção"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-movimento"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Passo/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" passo/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" passo/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" passo/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E passo/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* passo/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Movimento"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filamento"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E em mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Fil. Diam."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Fil. Diam. *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Contraste"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Guardar na memoria"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Carregar da memoria"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Rest. de emergen."); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT(" Recarregar"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Monitorizar"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Preparar"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Afinar"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pausar impressão"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Retomar impressão"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Parar impressão"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Imprimir do SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Sem cartão SD"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Em espera..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Á espera de ordem"); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Impressão cancelada"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Sem movimento"); - PROGMEM Language_Str MSG_KILLED = _UxGT("EMERGÊNCIA. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("PARADO. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT(" Retrair mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Troca Retrair mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT(" Retrair V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT(" Levantar mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT(" DesRet mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Troca DesRet mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT(" DesRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT(" Auto-Retract"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Trocar filamento"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Trocar filamento *"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Inici. cartão SD"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Trocar cartão SD"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sensor fora/base"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Desvio Z"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Fim de curso"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Aquecimento falhou"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err: T Máxima"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err: T Mínima"); - PROGMEM Language_Str MSG_HEATING = _UxGT("Aquecendo..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Aquecendo base..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Calibração Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); + LSTR MSG_COOLDOWN = _UxGT("Arrefecer"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Ligar"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Desligar"); + LSTR MSG_EXTRUDE = _UxGT("Extrudir"); + LSTR MSG_RETRACT = _UxGT("Retrair"); + LSTR MSG_MOVE_AXIS = _UxGT("Mover eixo"); + LSTR MSG_MOVE_X = _UxGT("Mover X"); + LSTR MSG_MOVE_Y = _UxGT("Mover Y"); + LSTR MSG_MOVE_Z = _UxGT("Mover Z"); + LSTR MSG_MOVE_E = _UxGT("Mover Extrusor"); + LSTR MSG_MOVE_EN = _UxGT("Mover Extrusor *"); + LSTR MSG_MOVE_N_MM = _UxGT("Mover %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Mover 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Mover 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Mover 100mm"); + LSTR MSG_SPEED = _UxGT("Velocidade"); + LSTR MSG_BED_Z = _UxGT("Base Z"); + LSTR MSG_NOZZLE = " " LCD_STR_THERMOMETER _UxGT(" Bico"); + LSTR MSG_NOZZLE_N = " " LCD_STR_THERMOMETER _UxGT(" Bico ~"); + LSTR MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" Base"); + LSTR MSG_FAN_SPEED = _UxGT("Vel. ventoinha"); + LSTR MSG_FAN_SPEED_N = _UxGT("Vel. ventoinha ~"); + LSTR MSG_FLOW = _UxGT("Fluxo"); + LSTR MSG_FLOW_N = _UxGT("Fluxo ~"); + LSTR MSG_CONTROL = _UxGT("Controlo"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); + LSTR MSG_A_RETRACT = _UxGT("A-retracção"); + LSTR MSG_A_TRAVEL = _UxGT("A-movimento"); + LSTR MSG_STEPS_PER_MM = _UxGT("Passo/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" passo/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" passo/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" passo/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" passo/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" passo/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" passo/mm"); + LSTR MSG_E_STEPS = _UxGT("E passo/mm"); + LSTR MSG_EN_STEPS = _UxGT("* passo/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatura"); + LSTR MSG_MOTION = _UxGT("Movimento"); + LSTR MSG_FILAMENT = _UxGT("Filamento"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E em mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Fil. Diam."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Fil. Diam. *"); + LSTR MSG_CONTRAST = _UxGT("Contraste"); + LSTR MSG_STORE_EEPROM = _UxGT("Guardar na memoria"); + LSTR MSG_LOAD_EEPROM = _UxGT("Carregar da memoria"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Rest. de emergen."); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT(" Recarregar"); + LSTR MSG_INFO_SCREEN = _UxGT("Monitorizar"); + LSTR MSG_PREPARE = _UxGT("Preparar"); + LSTR MSG_TUNE = _UxGT("Afinar"); + LSTR MSG_PAUSE_PRINT = _UxGT("Pausar impressão"); + LSTR MSG_RESUME_PRINT = _UxGT("Retomar impressão"); + LSTR MSG_STOP_PRINT = _UxGT("Parar impressão"); + LSTR MSG_MEDIA_MENU = _UxGT("Imprimir do SD"); + LSTR MSG_NO_MEDIA = _UxGT("Sem cartão SD"); + LSTR MSG_DWELL = _UxGT("Em espera..."); + LSTR MSG_USERWAIT = _UxGT("Á espera de ordem"); + LSTR MSG_PRINT_ABORTED = _UxGT("Impressão cancelada"); + LSTR MSG_NO_MOVE = _UxGT("Sem movimento"); + LSTR MSG_KILLED = _UxGT("EMERGÊNCIA. "); + LSTR MSG_STOPPED = _UxGT("PARADO. "); + LSTR MSG_CONTROL_RETRACT = _UxGT(" Retrair mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Troca Retrair mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT(" Retrair V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT(" Levantar mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT(" DesRet mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Troca DesRet mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT(" DesRet V"); + LSTR MSG_AUTORETRACT = _UxGT(" Auto-Retract"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Trocar filamento"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Trocar filamento *"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Inici. cartão SD"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Trocar cartão SD"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sensor fora/base"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Desvio Z"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Fim de curso"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Aquecimento falhou"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Err: T Máxima"); + LSTR MSG_ERR_MINTEMP = _UxGT("Err: T Mínima"); + LSTR MSG_HEATING = _UxGT("Aquecendo..."); + LSTR MSG_BED_HEATING = _UxGT("Aquecendo base..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Calibração Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Fim de curso"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Fim de curso"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Impressora Incorreta"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Impressora Incorreta"); - PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Superior Esquerdo"); - PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Inferior Esquerdo"); - PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Superior Direto"); - PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Inferior Direto"); - PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Calibração Completa"); - PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Calibração Falhou"); + LSTR MSG_TOP_LEFT = _UxGT("Superior Esquerdo"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Inferior Esquerdo"); + LSTR MSG_TOP_RIGHT = _UxGT("Superior Direto"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Inferior Direto"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Calibração Completa"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Calibração Falhou"); } diff --git a/Marlin/src/lcd/language/language_pt_br.h b/Marlin/src/lcd/language/language_pt_br.h index 4ddf424b3d67..45e1879d4c34 100644 --- a/Marlin/src/lcd/language/language_pt_br.h +++ b/Marlin/src/lcd/language/language_pt_br.h @@ -31,458 +31,462 @@ namespace Language_pt_br { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Portuguese (BR)"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Portuguese (BR)"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" pronto."); - PROGMEM Language_Str MSG_YES = _UxGT("SIM"); - PROGMEM Language_Str MSG_NO = _UxGT("NÃO"); - PROGMEM Language_Str MSG_BACK = _UxGT("Voltar"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Abortando..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Cartão inserido"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Cartão removido"); - PROGMEM Language_Str MSG_MEDIA_RELEASED = _UxGT("Cartão liberado"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Aguardando cartão"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Erro de leitura"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB removido"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB falhou"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Fins de curso"); - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Fins curso"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Menu principal"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Config. Avançada"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Configuração"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Início automático"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Desabilit. motores"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu Debug"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Testar Barra Progres"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Ir a origem XYZ"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Ir na origem X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Ir na origem Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Ir na origem Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto alinhar Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Indo para origem"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Clique para Iniciar"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Próximo Ponto"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Fim nivelação!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Suavizar altura"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Compensar origem"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Alteração aplicada"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Ajustar Origem"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" pronto."); + LSTR MSG_YES = _UxGT("SIM"); + LSTR MSG_NO = _UxGT("NÃO"); + LSTR MSG_BACK = _UxGT("Voltar"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Abortando..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Cartão inserido"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Cartão removido"); + LSTR MSG_MEDIA_RELEASED = _UxGT("Cartão liberado"); + LSTR MSG_MEDIA_WAITING = _UxGT("Aguardando cartão"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Erro de leitura"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB removido"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB falhou"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Fins de curso"); + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Fins curso"); + LSTR MSG_MAIN = _UxGT("Menu principal"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Config. Avançada"); + LSTR MSG_CONFIGURATION = _UxGT("Configuração"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Início automático"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Desabilit. motores"); + LSTR MSG_DEBUG_MENU = _UxGT("Menu Debug"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Testar Barra Progres"); + LSTR MSG_AUTO_HOME = _UxGT("Ir a origem XYZ"); + LSTR MSG_AUTO_HOME_X = _UxGT("Ir na origem X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Ir na origem Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Ir na origem Z"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto alinhar Z"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Indo para origem"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Clique para Iniciar"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Próximo Ponto"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Fim nivelação!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Suavizar altura"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Compensar origem"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Alteração aplicada"); + LSTR MSG_SET_ORIGIN = _UxGT("Ajustar Origem"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Extrusora ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Extrusora ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Pre-aq.Todo ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Pre-aq.Mesa ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Ajustar ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1 = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Pre-aquecer ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Extrusora ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_END_E = _UxGT("Extrusora ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_ALL = _UxGT("Pre-aq.Todo ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Pre-aq.Mesa ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Ajustar ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Pre-aquecer $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Pre-aquecer $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Extrusora $"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Extrusora $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Pre-aq.Todo $"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Pre-aq.Mesa $"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Ajustar $"); + LSTR MSG_PREHEAT_M = _UxGT("Pre-aquecer $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Pre-aquecer $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Extrusora $"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Extrusora $ ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Pre-aq.Todo $"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Pre-aq.Mesa $"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Ajustar $"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Customizar Pre-aq."); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Esfriar"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Ligar"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Desligar"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrusar"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Retrair"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Mover eixo"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelação Mesa"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivelar Mesa"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Nivelar Cantos"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Próximo Canto"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor de Malha"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editar Malha"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Fim da Edição"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Sondando ponto"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Índice X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Índice Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valor Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Comando customizado"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Teste de sonda"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Ponto"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("Modo IDEX"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Estacionar"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicação"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Cópia espelhada"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Controle Total"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2o bico X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2o bico Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2o bico Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Executando G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Ferramentas UBL"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Nivel. Mesa Unif."); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Fazer malha manual"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Calçar e calibrar"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Medir"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Remover e calibrar"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Movendo para Próximo"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Ativar UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Desativar UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Temp. Mesa"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. Mesa"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. Extrusora"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. Extrusora"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Editar Malha"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Editar Malha Custom"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Ajuste Fino da Malha"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Fim da Edição"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Montar Malha Custom"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Montar "); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Customizar Pre-aq."); + LSTR MSG_COOLDOWN = _UxGT("Esfriar"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Ligar"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Desligar"); + LSTR MSG_EXTRUDE = _UxGT("Extrusar"); + LSTR MSG_RETRACT = _UxGT("Retrair"); + LSTR MSG_MOVE_AXIS = _UxGT("Mover eixo"); + LSTR MSG_BED_LEVELING = _UxGT("Nivelação Mesa"); + LSTR MSG_LEVEL_BED = _UxGT("Nivelar Mesa"); + LSTR MSG_BED_TRAMMING = _UxGT("Nivelar Cantos"); + LSTR MSG_NEXT_CORNER = _UxGT("Próximo Canto"); + LSTR MSG_MESH_EDITOR = _UxGT("Editor de Malha"); + LSTR MSG_EDIT_MESH = _UxGT("Editar Malha"); + LSTR MSG_EDITING_STOPPED = _UxGT("Fim da Edição"); + LSTR MSG_PROBING_POINT = _UxGT("Sondando ponto"); + LSTR MSG_MESH_X = _UxGT("Índice X"); + LSTR MSG_MESH_Y = _UxGT("Índice Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Valor Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Comando customizado"); + LSTR MSG_M48_TEST = _UxGT("M48 Teste de sonda"); + LSTR MSG_M48_POINT = _UxGT("M48 Ponto"); + LSTR MSG_IDEX_MENU = _UxGT("Modo IDEX"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Estacionar"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicação"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Cópia espelhada"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Controle Total"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2o bico X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2o bico Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2o bico Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Executando G29"); + LSTR MSG_UBL_TOOLS = _UxGT("Ferramentas UBL"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Nivel. Mesa Unif."); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Fazer malha manual"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Calçar e calibrar"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Medir"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Remover e calibrar"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Movendo para Próximo"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Ativar UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Desativar UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Temp. Mesa"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Temp. Mesa"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Temp. Extrusora"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Temp. Extrusora"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Editar Malha"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Editar Malha Custom"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Ajuste Fino da Malha"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Fim da Edição"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Montar Malha Custom"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Montar "); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Montar $"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Checar $"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Montar $"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Checar $"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Montar Malha fria"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Ajustar Altura"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Quant. de Altura"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validar Malha"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validar Malha Custom"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Aquecendo Mesa"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Aquecendo Ext."); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Cancelado"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("G26 Saindo"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Continuar Malha"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Nivelação da Malha"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Nivelação 3 pontos"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Nivelação Grid"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Nivelar Malha"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Cantos"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Tipo de Mapa"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Salvar Mapa da Malha"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Enviar Para Host"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Salvar Malha CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Salvar Backup"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Informação do UBL"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Qtd de Enchimento"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Enchimento Manual"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Enchimento Smart"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Preencher malha"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidar tudo"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidar próximo"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Ajuste Fino de Todos"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Ajustar Mais Próximo"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Armazenamento Malha"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Slot de Memória"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Ler Malha"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Salvar Malha"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Malha %i carregada"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Malha %i salva"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Sem armazenamento"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Erro ao salvar UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Erro no restauro UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Compensação Z: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Compensação Z parou"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL passo a passo"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Montar Malha fria"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Enchimento Smart"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Validar Malha"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Ajuste Fino de Todos"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Validar Malha"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Ajuste Fino de Todos"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Salvar Malha"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Montar Malha fria"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Ajustar Altura"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Quant. de Altura"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validar Malha"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validar Malha Custom"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 Aquecendo Mesa"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Aquecendo Ext."); + LSTR MSG_G26_CANCELED = _UxGT("G26 Cancelado"); + LSTR MSG_G26_LEAVING = _UxGT("G26 Saindo"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Continuar Malha"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Nivelação da Malha"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Nivelação 3 pontos"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Nivelação Grid"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Nivelar Malha"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Cantos"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Tipo de Mapa"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Salvar Mapa da Malha"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Enviar Para Host"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Salvar Malha CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Salvar Backup"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Informação do UBL"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Qtd de Enchimento"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Enchimento Manual"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Enchimento Smart"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Preencher malha"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidar tudo"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidar próximo"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Ajuste Fino de Todos"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Ajustar Mais Próximo"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Armazenamento Malha"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Slot de Memória"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Ler Malha"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Salvar Malha"); + LSTR MSG_MESH_LOADED = _UxGT("Malha %i carregada"); + LSTR MSG_MESH_SAVED = _UxGT("Malha %i salva"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Sem armazenamento"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Erro ao salvar UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Erro no restauro UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Compensação Z: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Compensação Z parou"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL passo a passo"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Montar Malha fria"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Enchimento Smart"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Validar Malha"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Ajuste Fino de Todos"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Validar Malha"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Ajuste Fino de Todos"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Salvar Malha"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Controle do LED"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Luz"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Configuração da Luz"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Luz Vermelha"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Luz Laranja"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Luz Amarela"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Luz Verde"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Luz Azul"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Luz Indigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Luz Violeta"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Luz Branca"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Luz Padrão"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Luz Customizada"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Intensidade Vermelho"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Intensidade Verde"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Intensidade Azul"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Intensidade Branco"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Brilho"); + LSTR MSG_LED_CONTROL = _UxGT("Controle do LED"); + LSTR MSG_LEDS = _UxGT("Luz"); + LSTR MSG_LED_PRESETS = _UxGT("Configuração da Luz"); + LSTR MSG_SET_LEDS_RED = _UxGT("Luz Vermelha"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Luz Laranja"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Luz Amarela"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Luz Verde"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Luz Azul"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Luz Indigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Luz Violeta"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Luz Branca"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Luz Padrão"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Luz Customizada"); + LSTR MSG_INTENSITY_R = _UxGT("Intensidade Vermelho"); + LSTR MSG_INTENSITY_G = _UxGT("Intensidade Verde"); + LSTR MSG_INTENSITY_B = _UxGT("Intensidade Azul"); + LSTR MSG_INTENSITY_W = _UxGT("Intensidade Branco"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Brilho"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Movendo..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Liberar XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Mover X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Mover Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Mover Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Mover Extrusor"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Mover Extrusor *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Extrus. mto fria"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Mover %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Mover 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Mover 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Velocidade"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Base Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Bocal"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Bocal ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Mesa"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Vel. Ventoinha"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Vel. Ventoinha ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("+Vel. Ventoinha"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("+Vel. Ventoinha ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Vazão"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Vazão ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Controle"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Máx"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fator"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Temp. Automática"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Ligado"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Desligado"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Selecionar"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Selecionar *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Acel."); - PROGMEM Language_Str MSG_JERK = _UxGT("Arrancada"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("arrancada V") LCD_STR_A; - PROGMEM Language_Str MSG_VB_JERK = _UxGT("arrancada V") LCD_STR_B; - PROGMEM Language_Str MSG_VC_JERK = _UxGT("arrancada V") LCD_STR_C; - PROGMEM Language_Str MSG_VE_JERK = _UxGT("arrancada VE"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Desv. Junção"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocidade"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VDeslocamento min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Aceleração"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Retrair A"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Movimento A"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Passo/mm"); - PROGMEM Language_Str MSG_A_STEPS = _UxGT("Passo ") LCD_STR_A _UxGT("/mm"); - PROGMEM Language_Str MSG_B_STEPS = _UxGT("Passo ") LCD_STR_B _UxGT("/mm"); - PROGMEM Language_Str MSG_C_STEPS = _UxGT("Passo ") LCD_STR_C _UxGT("/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatura"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Movimento"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filamento"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("Extrusão em mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Diâmetro Fil."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Diâmetro Fil. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Descarr. mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Carregar mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Avanço K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Avanço K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Contraste"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Salvar Configuração"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Ler Configuração"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Restauro seguro"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Iniciar EEPROM"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Atualiz. SD"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Resetar Impressora"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Atualização"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Informações"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Preparar"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Ajustar"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Iniciar Impressão"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Prox."); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Iniciar"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Parar"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Imprimir"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Resetar"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Cancelar"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Pronto"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Voltar"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Continuar"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pausar impressão"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Continuar impressão"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Parar impressão"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Imprimindo objeto"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Cancelar Objeto"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Recuperar Impressão"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Imprimir do SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Sem cartão SD"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Dormindo..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Clique para retomar"); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Impressão Pausada"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Imprimindo..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Impressão Abortada"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Sem movimento"); - PROGMEM Language_Str MSG_KILLED = _UxGT("PARADA DE EMERGÊNCIA"); - PROGMEM Language_Str MSG_STOPPED = _UxGT("PAROU. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retrair mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Retrair Troca mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retrair V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Saltar mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Des-Retrair mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Des-RetTroca mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Des-Retrair V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Des-RetTroca V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Retração Automática"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Distancia Retração"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Distancia Purga"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Mudar Ferramenta"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Levantar Z"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Preparar Veloc."); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Veloc. Retração"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Standby bico"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Trocar Filamento"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Trocar Filamento *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Carregar Filamento"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Carregar Filamento *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Descarreg. Filamento"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Descarreg. Filamento *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Descarregar Todos"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Iniciar SD"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Trocar SD"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Liberar SD"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sonda fora da mesa"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Fator de Cisalho"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Testar BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reiniciar BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Recolher BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Estender BLTouch"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Estender Sonda-Z"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Recolher Sonda-Z"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Home %s%s%s Primeiro"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Compensar Sonda"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Compensar Sonda em X"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Compensar Sonda em Y"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Compensar Sonda em Z"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Passinho X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Passinho Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Passinho Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Total"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Abortar Fim de Curso"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Aquecimento falhou"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Erro:Temp Redundante"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("ESCAPE TÉRMICO"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("ESCAPE TÉRMICO MESA"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ESCAPE TÉRMICO CAMARA"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Erro:Temp Máxima"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Erro:Temp Mínima"); - PROGMEM Language_Str MSG_HALTED = _UxGT("IMPRESSORA PAROU"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Favor resetar"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); - PROGMEM Language_Str MSG_HEATING = _UxGT("Aquecendo..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Resfriando..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Aquecendo mesa..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Esfriando mesa..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Aquecendo Câmara..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Esfriando Câmara..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Calibrar Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Configuração Delta"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto-Calibração"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Calibrar Altura"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Desloc. Sonda Z"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Haste Diagonal"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Altura"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Raio"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Sobre"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Impressora"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("Nivelamento 3 pontos"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Nivelamento Linear"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Nivelamento Bilinear"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Nivelamento UBL"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Nivelamento da Malha"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Estatísticas"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Info. da Placa"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistores"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extrusoras"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Taxa de Transmissão"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protocolo"); + LSTR MSG_MOVING = _UxGT("Movendo..."); + LSTR MSG_FREE_XY = _UxGT("Liberar XY"); + LSTR MSG_MOVE_X = _UxGT("Mover X"); + LSTR MSG_MOVE_Y = _UxGT("Mover Y"); + LSTR MSG_MOVE_Z = _UxGT("Mover Z"); + LSTR MSG_MOVE_E = _UxGT("Mover Extrusor"); + LSTR MSG_MOVE_EN = _UxGT("Mover Extrusor *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Extrus. mto fria"); + LSTR MSG_MOVE_N_MM = _UxGT("Mover %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Mover 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Mover 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Mover 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Mover 100mm"); + LSTR MSG_SPEED = _UxGT("Velocidade"); + LSTR MSG_BED_Z = _UxGT("Base Z"); + LSTR MSG_NOZZLE = _UxGT("Bocal"); + LSTR MSG_NOZZLE_N = _UxGT("Bocal ~"); + LSTR MSG_BED = _UxGT("Mesa"); + LSTR MSG_FAN_SPEED = _UxGT("Vel. Ventoinha"); + LSTR MSG_FAN_SPEED_N = _UxGT("Vel. Ventoinha ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("+Vel. Ventoinha"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("+Vel. Ventoinha ~"); + LSTR MSG_FLOW = _UxGT("Vazão"); + LSTR MSG_FLOW_N = _UxGT("Vazão ~"); + LSTR MSG_CONTROL = _UxGT("Controle"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Máx"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fator"); + LSTR MSG_AUTOTEMP = _UxGT("Temp. Automática"); + LSTR MSG_LCD_ON = _UxGT("Ligado"); + LSTR MSG_LCD_OFF = _UxGT("Desligado"); + LSTR MSG_SELECT = _UxGT("Selecionar"); + LSTR MSG_SELECT_E = _UxGT("Selecionar *"); + LSTR MSG_ACC = _UxGT("Acel."); + LSTR MSG_JERK = _UxGT("Arrancada"); + LSTR MSG_VA_JERK = _UxGT("arrancada V") LCD_STR_A; + LSTR MSG_VB_JERK = _UxGT("arrancada V") LCD_STR_B; + LSTR MSG_VC_JERK = _UxGT("arrancada V") LCD_STR_C; + LSTR MSG_VI_JERK = _UxGT("arrancada V") LCD_STR_I; + LSTR MSG_VJ_JERK = _UxGT("arrancada V") LCD_STR_J; + LSTR MSG_VK_JERK = _UxGT("arrancada V") LCD_STR_K; + LSTR MSG_VE_JERK = _UxGT("arrancada VE"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Desv. Junção"); + LSTR MSG_VELOCITY = _UxGT("Velocidade"); + LSTR MSG_VTRAV_MIN = _UxGT("VDeslocamento min"); + LSTR MSG_ACCELERATION = _UxGT("Aceleração"); + LSTR MSG_A_RETRACT = _UxGT("Retrair A"); + LSTR MSG_A_TRAVEL = _UxGT("Movimento A"); + LSTR MSG_STEPS_PER_MM = _UxGT("Passo/mm"); + LSTR MSG_A_STEPS = _UxGT("Passo ") LCD_STR_A _UxGT("/mm"); + LSTR MSG_B_STEPS = _UxGT("Passo ") LCD_STR_B _UxGT("/mm"); + LSTR MSG_C_STEPS = _UxGT("Passo ") LCD_STR_C _UxGT("/mm"); + LSTR MSG_I_STEPS = _UxGT("Passo ") LCD_STR_I _UxGT("/mm"); + LSTR MSG_J_STEPS = _UxGT("Passo ") LCD_STR_J _UxGT("/mm"); + LSTR MSG_K_STEPS = _UxGT("Passo ") LCD_STR_K _UxGT("/mm"); + LSTR MSG_E_STEPS = _UxGT("E/mm"); + LSTR MSG_EN_STEPS = _UxGT("*/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatura"); + LSTR MSG_MOTION = _UxGT("Movimento"); + LSTR MSG_FILAMENT = _UxGT("Filamento"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("Extrusão em mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Diâmetro Fil."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Diâmetro Fil. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Descarr. mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Carregar mm"); + LSTR MSG_ADVANCE_K = _UxGT("Avanço K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Avanço K *"); + LSTR MSG_CONTRAST = _UxGT("Contraste"); + LSTR MSG_STORE_EEPROM = _UxGT("Salvar Configuração"); + LSTR MSG_LOAD_EEPROM = _UxGT("Ler Configuração"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restauro seguro"); + LSTR MSG_INIT_EEPROM = _UxGT("Iniciar EEPROM"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Atualiz. SD"); + LSTR MSG_RESET_PRINTER = _UxGT("Resetar Impressora"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Atualização"); + LSTR MSG_INFO_SCREEN = _UxGT("Informações"); + LSTR MSG_PREPARE = _UxGT("Preparar"); + LSTR MSG_TUNE = _UxGT("Ajustar"); + LSTR MSG_START_PRINT = _UxGT("Iniciar Impressão"); + LSTR MSG_BUTTON_NEXT = _UxGT("Prox."); + LSTR MSG_BUTTON_INIT = _UxGT("Iniciar"); + LSTR MSG_BUTTON_STOP = _UxGT("Parar"); + LSTR MSG_BUTTON_PRINT = _UxGT("Imprimir"); + LSTR MSG_BUTTON_RESET = _UxGT("Resetar"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Cancelar"); + LSTR MSG_BUTTON_DONE = _UxGT("Pronto"); + LSTR MSG_BUTTON_BACK = _UxGT("Voltar"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Continuar"); + LSTR MSG_PAUSE_PRINT = _UxGT("Pausar impressão"); + LSTR MSG_RESUME_PRINT = _UxGT("Continuar impressão"); + LSTR MSG_STOP_PRINT = _UxGT("Parar impressão"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Imprimindo objeto"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Cancelar Objeto"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancelar Objeto ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Recuperar Impressão"); + LSTR MSG_MEDIA_MENU = _UxGT("Imprimir do SD"); + LSTR MSG_NO_MEDIA = _UxGT("Sem cartão SD"); + LSTR MSG_DWELL = _UxGT("Dormindo..."); + LSTR MSG_USERWAIT = _UxGT("Clique para retomar"); + LSTR MSG_PRINT_PAUSED = _UxGT("Impressão Pausada"); + LSTR MSG_PRINTING = _UxGT("Imprimindo..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Impressão Abortada"); + LSTR MSG_NO_MOVE = _UxGT("Sem movimento"); + LSTR MSG_KILLED = _UxGT("PARADA DE EMERGÊNCIA"); + LSTR MSG_STOPPED = _UxGT("PAROU. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retrair mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Retrair Troca mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retrair V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Saltar mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Des-Retrair mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Des-RetTroca mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Des-Retrair V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Des-RetTroca V"); + LSTR MSG_AUTORETRACT = _UxGT("Retração Automática"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Distancia Retração"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Distancia Purga"); + LSTR MSG_TOOL_CHANGE = _UxGT("Mudar Ferramenta"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Levantar Z"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Preparar Veloc."); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Veloc. Retração"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Standby bico"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Trocar Filamento"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Trocar Filamento *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Carregar Filamento"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Carregar Filamento *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Descarreg. Filamento"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Descarreg. Filamento *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Descarregar Todos"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Iniciar SD"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Trocar SD"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Liberar SD"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sonda fora da mesa"); + LSTR MSG_SKEW_FACTOR = _UxGT("Fator de Cisalho"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Testar BLTouch"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reiniciar BLTouch"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Recolher BLTouch"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Estender BLTouch"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Estender Sonda-Z"); + LSTR MSG_MANUAL_STOW = _UxGT("Recolher Sonda-Z"); + LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s Primeiro"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Compensar Sonda"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Compensar Sonda em X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Compensar Sonda em Y"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Compensar Sonda em Z"); + LSTR MSG_BABYSTEP_X = _UxGT("Passinho X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Passinho Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Passinho Z"); + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Abortar Fim de Curso"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Aquecimento falhou"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Erro:Temp Redundante"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("ESCAPE TÉRMICO"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("ESCAPE TÉRMICO MESA"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ESCAPE TÉRMICO CAMARA"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Erro:Temp Máxima"); + LSTR MSG_ERR_MINTEMP = _UxGT("Erro:Temp Mínima"); + LSTR MSG_HALTED = _UxGT("IMPRESSORA PAROU"); + LSTR MSG_PLEASE_RESET = _UxGT("Favor resetar"); + LSTR MSG_HEATING = _UxGT("Aquecendo..."); + LSTR MSG_COOLING = _UxGT("Resfriando..."); + LSTR MSG_BED_HEATING = _UxGT("Aquecendo mesa..."); + LSTR MSG_BED_COOLING = _UxGT("Esfriando mesa..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Aquecendo Câmara..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Esfriando Câmara..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Calibrar Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrar X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrar Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrar Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrar Centro"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Configuração Delta"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto-Calibração"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Calibrar Altura"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Desloc. Sonda Z"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Haste Diagonal"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Altura"); + LSTR MSG_DELTA_RADIUS = _UxGT("Raio"); + LSTR MSG_INFO_MENU = _UxGT("Sobre"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Impressora"); + LSTR MSG_3POINT_LEVELING = _UxGT("Nivelamento 3 pontos"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Nivelamento Linear"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Nivelamento Bilinear"); + LSTR MSG_UBL_LEVELING = _UxGT("Nivelamento UBL"); + LSTR MSG_MESH_LEVELING = _UxGT("Nivelamento da Malha"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Estatísticas"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Info. da Placa"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistores"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrusoras"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Taxa de Transmissão"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protocolo"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Luz da Impressora"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Intensidade Brilho"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Impressora Incorreta"); + LSTR MSG_CASE_LIGHT = _UxGT("Luz da Impressora"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Intensidade Brilho"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Impressora Incorreta"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Total de Impressões"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Realizadas"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Tempo de Impressão"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Trabalho Mais longo"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Total de Extrusão"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Total de Impressões"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Realizadas"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Tempo de Impressão"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Trabalho Mais longo"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Total de Extrusão"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Qtd de Impressões"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Realizadas"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Tempo de Impressão"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Maior trabalho"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("T. Extrusão"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Qtd de Impressões"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Realizadas"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Tempo de Impressão"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Maior trabalho"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("T. Extrusão"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Temp Mín"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temp Máx"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Força do Motor"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Escrever EEPROM DAC"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("TROCA DE FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("IMPRESSÃO PAUSADA"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CARREGAR FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("DESCARREG. FILAMENTO"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("Config. de Retomada"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purgar mais"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Continuar Impressão"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Bocal: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Sensor filamento"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Falha ao ir à origem"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Falha ao sondar"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Temp Mín"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Temp Máx"); + LSTR MSG_INFO_PSU = _UxGT("PSU"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Força do Motor"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Escrever EEPROM DAC"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("TROCA DE FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("IMPRESSÃO PAUSADA"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("CARREGAR FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("DESCARREG. FILAMENTO"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("Config. de Retomada"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purgar mais"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Continuar Impressão"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Bocal: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Sensor filamento"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Falha ao ir à origem"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Falha ao sondar"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ESCOLHER FILAMENTO"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ESCOLHER FILAMENTO"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Continuar Impressão"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Continuando..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Carregar Filamento"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Carregar Todos"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Carregar para bocal"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Ejetar Filamento"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Ejetar Filamento ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Liberar Filamento"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Carregando Fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Ejetando Fil. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Carregando Fil...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Todos"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filamento ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Resetar MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("Resetando MMU..."); + LSTR MSG_MMU2_RESUME = _UxGT("Continuar Impressão"); + LSTR MSG_MMU2_RESUMING = _UxGT("Continuando..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Carregar Filamento"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Carregar Todos"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Carregar para bocal"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Ejetar Filamento"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Ejetar Filamento ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Liberar Filamento"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Carregando Fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Ejetando Fil. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Carregando Fil...."); + LSTR MSG_MMU2_ALL = _UxGT("Todos"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filamento ~"); + LSTR MSG_MMU2_RESET = _UxGT("Resetar MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("Resetando MMU..."); - PROGMEM Language_Str MSG_GAMES = _UxGT("Jogos"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Labirinto"); + LSTR MSG_GAMES = _UxGT("Jogos"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Labirinto"); #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Aperte o botão para", "continuar impressão")); - PROGMEM Language_Str MSG_PAUSE_PRINT_INIT = _UxGT(MSG_1_LINE("Estacionando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Esperando o", "inicio da", "troca de filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Coloque filamento", "pressione o botão", "para continuar...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Pressione o botão", "p/ aquecer o bocal")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Aquecendo o bocal", "Aguarde...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Esperando", "remoção de filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Esperando", "filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Espere pela", "purga de filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Clique para finaliz.", "purga de filamento")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Esperando impressão", "continuar")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Aperte o botão para", "continuar impressão")); + LSTR MSG_PAUSE_PRINT_INIT = _UxGT(MSG_1_LINE("Estacionando...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Esperando o", "inicio da", "troca de filamento")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Coloque filamento", "pressione o botão", "para continuar...")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Pressione o botão", "p/ aquecer o bocal")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Aquecendo o bocal", "Aguarde...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Esperando", "remoção de filamento")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Esperando", "filamento")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Espere pela", "purga de filamento")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Clique para finaliz.", "purga de filamento")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Esperando impressão", "continuar")); #else // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Clique p. continuar")); - PROGMEM Language_Str MSG_PAUSE_PRINT_INIT = _UxGT(MSG_1_LINE("Estacionando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Aguarde...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insira e Clique")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Clique para Aquecer")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Aquecendo...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Ejetando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Carregando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purgando...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Clique p. finalizar")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Continuando...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Clique p. continuar")); + LSTR MSG_PAUSE_PRINT_INIT = _UxGT(MSG_1_LINE("Estacionando...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Aguarde...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insira e Clique")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Clique para Aquecer")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Aquecendo...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Ejetando...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Carregando...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Purgando...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Clique p. finalizar")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Continuando...")); #endif - PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Superior Esquerdo"); - PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Inferior Esquerdo"); - PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Superior Direto"); - PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Inferior Direto"); - PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Calibração Completa"); - PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Calibração Falhou"); + LSTR MSG_TOP_LEFT = _UxGT("Superior Esquerdo"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Inferior Esquerdo"); + LSTR MSG_TOP_RIGHT = _UxGT("Superior Direto"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Inferior Direto"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Calibração Completa"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Calibração Falhou"); } diff --git a/Marlin/src/lcd/language/language_ro.h b/Marlin/src/lcd/language/language_ro.h index bd7e1b7a64b0..6db2fe38fac8 100644 --- a/Marlin/src/lcd/language/language_ro.h +++ b/Marlin/src/lcd/language/language_ro.h @@ -32,587 +32,596 @@ namespace Language_ro { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Romanian"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Romanian"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Pregatit."); - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("DA"); - PROGMEM Language_Str MSG_NO = _UxGT("NU"); - PROGMEM Language_Str MSG_BACK = _UxGT("Inapoi"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Abandon..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Media Introdus"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Media Inlaturat"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Astept Media"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Eroare Citire Media"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("Dispozitiv USB Inlaturat"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Pornire USB Esuata"); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Eroare:Subcall Overflow"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Principal"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Setari Avansate"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Configurare"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autostart"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Dezactivare Motoare"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Meniu Debug"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test Bara Progres"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Auto Acasa"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Acasa X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Acasa Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Acasa Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto Aliniere-Z"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Acasa XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Click pentru a incepe"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Urmatorul Punct"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Nivelare Terminata!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Fade Inaltime"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Seteaza Offseturile Acasa"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offseturi Aplicate"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Seteaza Originea"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Pregatit."); + LSTR MSG_YES = _UxGT("DA"); + LSTR MSG_NO = _UxGT("NU"); + LSTR MSG_BACK = _UxGT("Inapoi"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Abandon..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Media Introdus"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Media Inlaturat"); + LSTR MSG_MEDIA_WAITING = _UxGT("Astept Media"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Eroare Citire Media"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("Dispozitiv USB Inlaturat"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Pornire USB Esuata"); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Eroare:Subcall Overflow"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstops"); // Max length 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft Endstops"); + LSTR MSG_MAIN = _UxGT("Principal"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Setari Avansate"); + LSTR MSG_CONFIGURATION = _UxGT("Configurare"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostart"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Dezactivare Motoare"); + LSTR MSG_DEBUG_MENU = _UxGT("Meniu Debug"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test Bara Progres"); + LSTR MSG_AUTO_HOME = _UxGT("Auto Acasa"); + LSTR MSG_AUTO_HOME_X = _UxGT("Acasa X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Acasa Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Acasa Z"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto Aliniere-Z"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Acasa XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Click pentru a incepe"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Urmatorul Punct"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Nivelare Terminata!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Fade Inaltime"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Seteaza Offseturile Acasa"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offseturi Aplicate"); + LSTR MSG_SET_ORIGIN = _UxGT("Seteaza Originea"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Preincalzeste ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Preincalzeste ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Capatul"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Capatul ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Tot"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Patul"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Conf"); + LSTR MSG_PREHEAT_1 = _UxGT("Preincalzeste ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Preincalzeste ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Capatul"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Capatul ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Tot"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Patul"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Preincalzeste ") PREHEAT_1_LABEL _UxGT(" Conf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Preincalzeste $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Preincalzeste $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Preincalzeste $ Capatul"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Preincalzeste $ Capatul ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Preincalzeste $ Tot"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Preincalzeste $ Patul"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Preincalzeste $ Conf"); + LSTR MSG_PREHEAT_M = _UxGT("Preincalzeste $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Preincalzeste $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Preincalzeste $ Capatul"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Preincalzeste $ Capatul ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Preincalzeste $ Tot"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Preincalzeste $ Patul"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Preincalzeste $ Conf"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Preincalzeste Personalizat"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Racire"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frecventa"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Control Laser"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Puterea Laserului"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Controlul Spindle"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Puterea Spindle"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Spindle Invers"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Porneste"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Opreste"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrudeaza"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Retracteaza"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Muta Axa"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Nivelarea Patului"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Niveleaza Patul"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Niveleaza Colturile"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Urmatorul Colt"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor Mesh"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Editeaza Mesh"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Editarea Meshului Oprita"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Punctul de Probare"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Valoare Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Comenzi Personalizate"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Probe Test"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Point"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Deviation"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX Mode"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Tool Offsets"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplication"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Mirrored Copy"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Control"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2nd Nozzle X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2nd Nozzle Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2nd Nozzle Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Doing G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL Tools"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Tilting Point"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Manually Build Mesh"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Place Shim & Measure"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Measure"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Remove & Measure Bed"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Moving to next"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Activate UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Deactivate UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Bed Temp"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hotend Temp"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Mesh Edit"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit Custom Mesh"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Fine Tuning Mesh"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Done Editing Mesh"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Build Custom Mesh"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Build Mesh"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Preincalzeste Personalizat"); + LSTR MSG_COOLDOWN = _UxGT("Racire"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frecventa"); + LSTR MSG_LASER_MENU = _UxGT("Control Laser"); + LSTR MSG_LASER_POWER = _UxGT("Puterea Laserului"); + LSTR MSG_SPINDLE_MENU = _UxGT("Controlul Spindle"); + LSTR MSG_SPINDLE_POWER = _UxGT("Puterea Spindle"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Spindle Invers"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Porneste"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Opreste"); + LSTR MSG_EXTRUDE = _UxGT("Extrudeaza"); + LSTR MSG_RETRACT = _UxGT("Retracteaza"); + LSTR MSG_MOVE_AXIS = _UxGT("Muta Axa"); + LSTR MSG_BED_LEVELING = _UxGT("Nivelarea Patului"); + LSTR MSG_LEVEL_BED = _UxGT("Niveleaza Patul"); + LSTR MSG_BED_TRAMMING = _UxGT("Niveleaza Colturile"); + LSTR MSG_NEXT_CORNER = _UxGT("Urmatorul Colt"); + LSTR MSG_MESH_EDITOR = _UxGT("Editor Mesh"); + LSTR MSG_EDIT_MESH = _UxGT("Editeaza Mesh"); + LSTR MSG_EDITING_STOPPED = _UxGT("Editarea Meshului Oprita"); + LSTR MSG_PROBING_POINT = _UxGT("Punctul de Probare"); + LSTR MSG_MESH_X = _UxGT("Index X"); + LSTR MSG_MESH_Y = _UxGT("Index Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Valoare Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Comenzi Personalizate"); + LSTR MSG_M48_TEST = _UxGT("M48 Probe Test"); + LSTR MSG_M48_POINT = _UxGT("M48 Point"); + LSTR MSG_M48_DEVIATION = _UxGT("Deviation"); + LSTR MSG_IDEX_MENU = _UxGT("IDEX Mode"); + LSTR MSG_OFFSETS_MENU = _UxGT("Tool Offsets"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplication"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Mirrored Copy"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Control"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2nd Nozzle X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2nd Nozzle Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2nd Nozzle Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Doing G29"); + LSTR MSG_UBL_TOOLS = _UxGT("UBL Tools"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Unified Bed Leveling"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Tilting Point"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Manually Build Mesh"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Place Shim & Measure"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Measure"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Remove & Measure Bed"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Moving to next"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Activate UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Deactivate UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Bed Temp"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hotend Temp"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Mesh Edit"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Edit Custom Mesh"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Fine Tuning Mesh"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Done Editing Mesh"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Build Custom Mesh"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Build Mesh"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Build Mesh ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Validate Mesh ($)"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Build Mesh ($)"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Validate Mesh ($)"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Build Cold Mesh"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Adjust Mesh Height"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Height Amount"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validate Mesh"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validate Custom Mesh"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Heating Bed"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Heating Nozzle"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Manual priming..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Fixed Length Prime"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Done Priming"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Canceled"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Leaving G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Continue Bed Mesh"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Mesh Leveling"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Point Leveling"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Grid Mesh Leveling"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Level Mesh"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Side Points"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Map Type"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Output Mesh Map"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Output for Host"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Output for CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Off Imprimanta Backup"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Output UBL Info"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Fill-in Amount"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Manual Fill-in"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Smart Fill-in"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Fill-in Mesh"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidate All"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidate Closest"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Fine Tune All"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Fine Tune Closest"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Storage"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Memory Slot"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Load Bed Mesh"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Save Bed Mesh"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Mesh %i Loaded"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Mesh %i Saved"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("No Storage"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Err: UBL Save"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Err: UBL Restore"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Stopped"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Step-By-Step UBL"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Build Cold Mesh"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. Smart Fill-in"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Validate Mesh"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Fine Tune All"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Validate Mesh"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Fine Tune All"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. Save Bed Mesh"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Build Cold Mesh"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Adjust Mesh Height"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Height Amount"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validate Mesh"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validate Custom Mesh"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 Heating Bed"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Heating Nozzle"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Manual priming..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Fixed Length Prime"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Done Priming"); + LSTR MSG_G26_CANCELED = _UxGT("G26 Canceled"); + LSTR MSG_G26_LEAVING = _UxGT("Leaving G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Continue Bed Mesh"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Mesh Leveling"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Point Leveling"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Grid Mesh Leveling"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Level Mesh"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Side Points"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Map Type"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Output Mesh Map"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Output for Host"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Output for CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Off Imprimanta Backup"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Output UBL Info"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Fill-in Amount"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Manual Fill-in"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Smart Fill-in"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Fill-in Mesh"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Invalidate All"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Invalidate Closest"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Fine Tune All"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Fine Tune Closest"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Storage"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Memory Slot"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Load Bed Mesh"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Save Bed Mesh"); + LSTR MSG_MESH_LOADED = _UxGT("Mesh %i Loaded"); + LSTR MSG_MESH_SAVED = _UxGT("Mesh %i Saved"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("No Storage"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Err: UBL Save"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Err: UBL Restore"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Stopped"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Step-By-Step UBL"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Build Cold Mesh"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2. Smart Fill-in"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Validate Mesh"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Fine Tune All"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Validate Mesh"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Fine Tune All"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Save Bed Mesh"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("LED Control"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Lights"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Light Presets"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Red"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Orange"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Yellow"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Green"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Blue"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Violet"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("White"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Default"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Custom Lights"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Red Intensity"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Green Intensity"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Blue Intensity"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("White Intensity"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Brightness"); + LSTR MSG_LED_CONTROL = _UxGT("LED Control"); + LSTR MSG_LEDS = _UxGT("Lights"); + LSTR MSG_LED_PRESETS = _UxGT("Light Presets"); + LSTR MSG_SET_LEDS_RED = _UxGT("Red"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Yellow"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Green"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Blue"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violet"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("White"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Default"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Custom Lights"); + LSTR MSG_INTENSITY_R = _UxGT("Red Intensity"); + LSTR MSG_INTENSITY_G = _UxGT("Green Intensity"); + LSTR MSG_INTENSITY_B = _UxGT("Blue Intensity"); + LSTR MSG_INTENSITY_W = _UxGT("White Intensity"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Brightness"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Moving..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Free XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Move X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Move Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Move Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extruder"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extruder *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Capat Prea Rece"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Move %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Move 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Move 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Move 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Speed"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Bed Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Nozzle"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Nozzle ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Nozzle Parked"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Nozzle Standby"); - PROGMEM Language_Str MSG_BED = _UxGT("Bed"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Enclosure"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Fan Speed"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Fan Speed ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Stored Fan ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra Fan Speed"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra Fan Speed ~"); - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Controller Fan"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Idle Speed"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto Mode"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Active Speed"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Idle Period"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Flow"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flow ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Control"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Autotemp"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("On"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Off"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed. Bad extruder."); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed. Temperature too high."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout."); - PROGMEM Language_Str MSG_SELECT = _UxGT("Select"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Select *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Accel"); - PROGMEM Language_Str MSG_JERK = _UxGT("Jerk"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Jerk"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Jerk"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Velocity"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VTrav Min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Acceleration"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-Retract"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-Travel"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequency max"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Feed min"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Steps/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("steps/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("steps/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("steps/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("Esteps/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*steps/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperature"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Motion"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit in mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Unload mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Load mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Advance K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Advance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD Contrast"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Store Settings"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Load Settings"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Restore Defaults"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Initialize EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Error"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Error"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Error"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Settings Stored"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Media Update"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Reset Imprimanta"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Refresh"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info Screen"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Prepare"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Tune"); - PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("Power monitor"); - PROGMEM Language_Str MSG_CURRENT = _UxGT("Intensitate"); - PROGMEM Language_Str MSG_VOLTAGE = _UxGT("Voltaj"); - PROGMEM Language_Str MSG_POWER = _UxGT("Putere"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Start Imprimare"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Urmatorul"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Initiere"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Stop"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Imprimeaza"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Reseteaza"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("Ignora"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Anuleaza"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("OK"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Inapoi"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Proceed"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("Pausing..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pause Print"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Resume Print"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Stop Print"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Printing Object"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Outage Recovery"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Print from Media"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("No Media"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Sleep..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Click to Resume..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Print Paused"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Printing..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Print Aborted"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Print Done"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("No Move."); - PROGMEM Language_Str MSG_KILLED = _UxGT("KILLED. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("STOPPED. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retract mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Re.mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retract V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto-Retract"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Swap Length"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Swap Extra"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Purge Length"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Tool Inlocuire"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Raise"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Prime Speed"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Retract Speed"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Park Head"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Recover Speed"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Fan Speed"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Fan Time"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto Pornit"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto Oprit"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Tool Migration"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-migrare"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Last Extruder"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrate to *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Inlocuire Filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Inlocuire Filament *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Incarcare Filament"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Incarcare Filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Scoatere Filament"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Scoatere Filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Scoate Tot"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Atasare Media"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Inlocuire Media"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Eliberare Media"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Skew Factor"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Self-Test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Stow"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Deploy"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("SW-Mode"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("5V-Mode"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("OD-Mode"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Set BLTouch to 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Set BLTouch to OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Report Drain"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("DANGER: Bad settings can cause damage! Proceed anyway?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Init TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Z Offset Test"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Save"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Deploy TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Deploy Z-Probe"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Stow Z-Probe"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Home %s%s%s First"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Probe Offsets"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Probe Y Offset"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Probe Z Offset"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Babystep X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Babystep Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Babystep Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Total"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Endstop Abort"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Heating Failed"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: REDUNDANT TEMP"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("BED THERMAL RUNAWAY"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("CHAMBER T. RUNAWAY"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Err: MAXTEMP"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Err: MINTEMP"); - PROGMEM Language_Str MSG_HALTED = _UxGT("PRINTER HALTED"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Please Reset"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Heating..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Cooling..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Bed Heating..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Bed Cooling..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Chamber Heating..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Chamber Cooling..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Calibration"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Calibrate X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrate Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrate Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrate Center"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta Settings"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibration"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Set Delta Height"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Probe Z-offset"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diag Rod"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Inaltime"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Radius"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Despre Imprimanta"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Info Imprimanta"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("Nivelare in 3 puncte"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Nivelare Lineara"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Nivelare Bilineara"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Nivelarea Patului Unificata"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Nivelare Mesh"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Status Imprimanta"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Informatii Placa"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistoare"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extrudere"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baud"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protocol"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Runaway Watch: OFF"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Runaway Watch: ON"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend Idle Timeout"); + LSTR MSG_MOVING = _UxGT("Moving..."); + LSTR MSG_FREE_XY = _UxGT("Free XY"); + LSTR MSG_MOVE_X = _UxGT("Move X"); + LSTR MSG_MOVE_Y = _UxGT("Move Y"); + LSTR MSG_MOVE_Z = _UxGT("Move Z"); + LSTR MSG_MOVE_E = _UxGT("Extruder"); + LSTR MSG_MOVE_EN = _UxGT("Extruder *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Capat Prea Rece"); + LSTR MSG_MOVE_N_MM = _UxGT("Move %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Move 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Move 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Move 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Move 100mm"); + LSTR MSG_SPEED = _UxGT("Speed"); + LSTR MSG_BED_Z = _UxGT("Bed Z"); + LSTR MSG_NOZZLE = _UxGT("Nozzle"); + LSTR MSG_NOZZLE_N = _UxGT("Nozzle ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Nozzle Parked"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Nozzle Standby"); + LSTR MSG_BED = _UxGT("Bed"); + LSTR MSG_CHAMBER = _UxGT("Enclosure"); + LSTR MSG_FAN_SPEED = _UxGT("Fan Speed"); + LSTR MSG_FAN_SPEED_N = _UxGT("Fan Speed ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Stored Fan ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Extra Fan Speed"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra Fan Speed ~"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Controller Fan"); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Idle Speed"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto Mode"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Active Speed"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Idle Period"); + LSTR MSG_FLOW = _UxGT("Flow"); + LSTR MSG_FLOW_N = _UxGT("Flow ~"); + LSTR MSG_CONTROL = _UxGT("Control"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fact"); + LSTR MSG_AUTOTEMP = _UxGT("Autotemp"); + LSTR MSG_LCD_ON = _UxGT("On"); + LSTR MSG_LCD_OFF = _UxGT("Off"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autotune"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autotune *"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autotune failed. Bad extruder."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autotune failed. Temperature too high."); + LSTR MSG_PID_TIMEOUT = _UxGT("Autotune failed! Timeout."); + LSTR MSG_SELECT = _UxGT("Select"); + LSTR MSG_SELECT_E = _UxGT("Select *"); + LSTR MSG_ACC = _UxGT("Accel"); + LSTR MSG_JERK = _UxGT("Jerk"); + LSTR MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Jerk"); + LSTR MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Jerk"); + LSTR MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Jerk"); + LSTR MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-Jerk"); + LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-Jerk"); + LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-Jerk"); + LSTR MSG_VE_JERK = _UxGT("Ve-Jerk"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); + LSTR MSG_VELOCITY = _UxGT("Velocity"); + LSTR MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Vmax ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Vmax ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Vmax ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Vmax *"); + LSTR MSG_VMIN = _UxGT("Vmin"); + LSTR MSG_VTRAV_MIN = _UxGT("VTrav Min"); + LSTR MSG_ACCELERATION = _UxGT("Acceleration"); + LSTR MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Amax ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Amax ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Amax ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Amax *"); + LSTR MSG_A_RETRACT = _UxGT("A-Retract"); + LSTR MSG_A_TRAVEL = _UxGT("A-Travel"); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Frequency max"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Feed min"); + LSTR MSG_STEPS_PER_MM = _UxGT("Steps/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" steps/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" steps/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" steps/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" steps/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" steps/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" steps/mm"); + LSTR MSG_E_STEPS = _UxGT("Esteps/mm"); + LSTR MSG_EN_STEPS = _UxGT("*steps/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperature"); + LSTR MSG_MOTION = _UxGT("Motion"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E in mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit in mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Fil. Dia."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Fil. Dia. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Unload mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Load mm"); + LSTR MSG_ADVANCE_K = _UxGT("Advance K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Advance K *"); + LSTR MSG_CONTRAST = _UxGT("LCD Contrast"); + LSTR MSG_STORE_EEPROM = _UxGT("Store Settings"); + LSTR MSG_LOAD_EEPROM = _UxGT("Load Settings"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Restore Defaults"); + LSTR MSG_INIT_EEPROM = _UxGT("Initialize EEPROM"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Error"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Error"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Error"); + LSTR MSG_SETTINGS_STORED = _UxGT("Settings Stored"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Media Update"); + LSTR MSG_RESET_PRINTER = _UxGT("Reset Imprimanta"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Refresh"); + LSTR MSG_INFO_SCREEN = _UxGT("Info Screen"); + LSTR MSG_PREPARE = _UxGT("Prepare"); + LSTR MSG_TUNE = _UxGT("Tune"); + LSTR MSG_POWER_MONITOR = _UxGT("Power monitor"); + LSTR MSG_CURRENT = _UxGT("Intensitate"); + LSTR MSG_VOLTAGE = _UxGT("Voltaj"); + LSTR MSG_POWER = _UxGT("Putere"); + LSTR MSG_START_PRINT = _UxGT("Start Imprimare"); + LSTR MSG_BUTTON_NEXT = _UxGT("Urmatorul"); + LSTR MSG_BUTTON_INIT = _UxGT("Initiere"); + LSTR MSG_BUTTON_STOP = _UxGT("Stop"); + LSTR MSG_BUTTON_PRINT = _UxGT("Imprimeaza"); + LSTR MSG_BUTTON_RESET = _UxGT("Reseteaza"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Ignora"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Anuleaza"); + LSTR MSG_BUTTON_DONE = _UxGT("OK"); + LSTR MSG_BUTTON_BACK = _UxGT("Inapoi"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Proceed"); + LSTR MSG_PAUSING = _UxGT("Pausing..."); + LSTR MSG_PAUSE_PRINT = _UxGT("Pause Print"); + LSTR MSG_RESUME_PRINT = _UxGT("Resume Print"); + LSTR MSG_STOP_PRINT = _UxGT("Stop Print"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Printing Object"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Cancel Object"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Cancel Object ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Outage Recovery"); + LSTR MSG_MEDIA_MENU = _UxGT("Print from Media"); + LSTR MSG_NO_MEDIA = _UxGT("No Media"); + LSTR MSG_DWELL = _UxGT("Sleep..."); + LSTR MSG_USERWAIT = _UxGT("Click to Resume..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Print Paused"); + LSTR MSG_PRINTING = _UxGT("Printing..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Print Aborted"); + LSTR MSG_PRINT_DONE = _UxGT("Print Done"); + LSTR MSG_NO_MOVE = _UxGT("No Move."); + LSTR MSG_KILLED = _UxGT("KILLED. "); + LSTR MSG_STOPPED = _UxGT("STOPPED. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retract mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Re.mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retract V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto-Retract"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Swap Length"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Swap Extra"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Purge Length"); + LSTR MSG_TOOL_CHANGE = _UxGT("Tool Inlocuire"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Raise"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Prime Speed"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Retract Speed"); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Park Head"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Recover Speed"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Fan Speed"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Fan Time"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto Pornit"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Auto Oprit"); + LSTR MSG_TOOL_MIGRATION = _UxGT("Tool Migration"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-migrare"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Last Extruder"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrate to *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Inlocuire Filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Inlocuire Filament *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Incarcare Filament"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Incarcare Filament *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Scoatere Filament"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Scoatere Filament *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Scoate Tot"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Atasare Media"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Inlocuire Media"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Eliberare Media"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z Probe Past Bed"); + LSTR MSG_SKEW_FACTOR = _UxGT("Skew Factor"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Self-Test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reset"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Stow"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Deploy"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("SW-Mode"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("5V-Mode"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("OD-Mode"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Set BLTouch to 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Set BLTouch to OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Report Drain"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("DANGER: Bad settings can cause damage! Proceed anyway?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Init TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Z Offset Test"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Save"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Deploy TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Deploy Z-Probe"); + LSTR MSG_MANUAL_STOW = _UxGT("Stow Z-Probe"); + LSTR MSG_HOME_FIRST = _UxGT("Home %s%s%s First"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Probe Offsets"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Probe X Offset"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Probe Y Offset"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Probe Z Offset"); + LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop Abort"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Heating Failed"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Err: REDUNDANT TEMP"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("THERMAL RUNAWAY"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("BED THERMAL RUNAWAY"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("CHAMBER T. RUNAWAY"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Err: MAXTEMP"); + LSTR MSG_ERR_MINTEMP = _UxGT("Err: MINTEMP"); + LSTR MSG_HALTED = _UxGT("PRINTER HALTED"); + LSTR MSG_PLEASE_RESET = _UxGT("Please Reset"); + LSTR MSG_HEATING = _UxGT("Heating..."); + LSTR MSG_COOLING = _UxGT("Cooling..."); + LSTR MSG_BED_HEATING = _UxGT("Bed Heating..."); + LSTR MSG_BED_COOLING = _UxGT("Bed Cooling..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Chamber Heating..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Chamber Cooling..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Calibration"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Calibrate X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Calibrate Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Calibrate Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Calibrate Center"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Delta Settings"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Calibration"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Set Delta Height"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Probe Z-offset"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Diag Rod"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Inaltime"); + LSTR MSG_DELTA_RADIUS = _UxGT("Radius"); + LSTR MSG_INFO_MENU = _UxGT("Despre Imprimanta"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Info Imprimanta"); + LSTR MSG_3POINT_LEVELING = _UxGT("Nivelare in 3 puncte"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Nivelare Lineara"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Nivelare Bilineara"); + LSTR MSG_UBL_LEVELING = _UxGT("Nivelarea Patului Unificata"); + LSTR MSG_MESH_LEVELING = _UxGT("Nivelare Mesh"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Status Imprimanta"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Informatii Placa"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistoare"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrudere"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baud"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protocol"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Runaway Watch: OFF"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Runaway Watch: ON"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hotend Idle Timeout"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Case Light"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER"); + LSTR MSG_CASE_LIGHT = _UxGT("Case Light"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Light Brightness"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INCORRECT PRINTER"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Total Printuri"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completat"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Timp Imprimare Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Longest Job Time"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Total Extrudat"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Total Printuri"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completat"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Timp Imprimare Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest Job Time"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Total Extrudat"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Prints"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Completed"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Longest"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Prints"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Completed"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Longest"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruded"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Temperatura Minima"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Temperatura Maxima"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Drive Strength"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC CONNECTION ERROR"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Write"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("FILAMENT CHANGE"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("PRINT PAUSED"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("LOAD FILAMENT"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("UNLOAD FILAMENT"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("RESUME OPTIONS:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purge more"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Continue"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozzle: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Runout Sensor"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Runout Dist mm"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Homing Failed"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Probing Failed"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Temperatura Minima"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Temperatura Maxima"); + LSTR MSG_INFO_PSU = _UxGT("PSU"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Drive Strength"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Driver %"); + LSTR MSG_ERROR_TMC = _UxGT("TMC CONNECTION ERROR"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Write"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("FILAMENT CHANGE"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("PRINT PAUSED"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("LOAD FILAMENT"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("UNLOAD FILAMENT"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("RESUME OPTIONS:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Purge more"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Continue"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozzle: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Runout Sensor"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Runout Dist mm"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Homing Failed"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Probing Failed"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("CHOOSE FILAMENT"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Update MMU Firmware!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Needs Attention."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("MMU Resume"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("MMU Resuming..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU Load"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("MMU Load All"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Load to Nozzle"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU Eject"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU Eject ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU Unload"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Loading Fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Ejecting Fil. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Unloading Fil...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("All"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Reset MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("MMU Resetting..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Remove, click"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("CHOOSE FILAMENT"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Update MMU Firmware!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Needs Attention."); + LSTR MSG_MMU2_RESUME = _UxGT("MMU Resume"); + LSTR MSG_MMU2_RESUMING = _UxGT("MMU Resuming..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU Load"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("MMU Load All"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Load to Nozzle"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU Eject"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU Eject ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU Unload"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Loading Fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Ejecting Fil. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Unloading Fil...."); + LSTR MSG_MMU2_ALL = _UxGT("All"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); + LSTR MSG_MMU2_RESET = _UxGT("Reset MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("MMU Resetting..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Remove, click"); - PROGMEM Language_Str MSG_MIX = _UxGT("Mix"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Component ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Mixer"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Gradient"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Full Gradient"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Toggle Mix"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Cycle Mix"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Gradient Mix"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Reverse Gradient"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Active V-tool"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Start V-tool"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" End V-tool"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Reset V-tools"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Commit V-tool Mix"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-tools Were Reset"); - PROGMEM Language_Str MSG_START_Z = _UxGT("Start Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" End Z:"); + LSTR MSG_MIX = _UxGT("Mix"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Component ="); + LSTR MSG_MIXER = _UxGT("Mixer"); + LSTR MSG_GRADIENT = _UxGT("Gradient"); + LSTR MSG_FULL_GRADIENT = _UxGT("Full Gradient"); + LSTR MSG_TOGGLE_MIX = _UxGT("Toggle Mix"); + LSTR MSG_CYCLE_MIX = _UxGT("Cycle Mix"); + LSTR MSG_GRADIENT_MIX = _UxGT("Gradient Mix"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Reverse Gradient"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Active V-tool"); + LSTR MSG_START_VTOOL = _UxGT("Start V-tool"); + LSTR MSG_END_VTOOL = _UxGT(" End V-tool"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); + LSTR MSG_RESET_VTOOLS = _UxGT("Reset V-tools"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Commit V-tool Mix"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-tools Were Reset"); + LSTR MSG_START_Z = _UxGT("Start Z:"); + LSTR MSG_END_Z = _UxGT(" End Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Jocuri"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Maze"); + LSTR MSG_GAMES = _UxGT("Jocuri"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Maze"); - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("Bad page index"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Bad page speed"); + LSTR MSG_BAD_PAGE = _UxGT("Bad page index"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Bad page speed"); // // Filament Inlocuire screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Apasa Butonul", "pentru a reveni la print")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parcare...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Astept ca", "inlocuirea filamentului", "sa inceapa")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Insert filament", "and press button", "to continue")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Press button", "to heat nozzle")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nozzle heating", "Please wait...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Wait for", "filament unload")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Wait for", "filament load")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Wait for", "filament purge")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Click to finish", "filament purge")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Wait for print", "to resume...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Apasa Butonul", "pentru a reveni la print")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parcare...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Astept ca", "inlocuirea filamentului", "sa inceapa")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Insert filament", "and press button", "to continue")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Press button", "to heat nozzle")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nozzle heating", "Please wait...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Wait for", "filament unload")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Wait for", "filament load")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Wait for", "filament purge")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Click to finish", "filament purge")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Wait for print", "to resume...")); #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Click to continue")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parcare...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Va rog asteptati...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insert and Click")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Click pentru incalzire")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Incalzire...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Ejectare...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Incarcare...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Curatare...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Click pentru a termina")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Se Reia...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Click to continue")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parcare...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Va rog asteptati...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Insert and Click")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Click pentru incalzire")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Incalzire...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Ejectare...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Incarcare...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Curatare...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Click pentru a termina")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Se Reia...")); #endif - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC Drivers"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Driver Current"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hybrid Threshold"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Sensorless Homing"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Stepping Mode"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Enabled"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" in:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Backlash"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Corectare"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Smoothing"); + LSTR MSG_TMC_DRIVERS = _UxGT("TMC Drivers"); + LSTR MSG_TMC_CURRENT = _UxGT("Driver Current"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hybrid Threshold"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Sensorless Homing"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Stepping Mode"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Enabled"); + LSTR MSG_SERVICE_RESET = _UxGT("Reset"); + LSTR MSG_SERVICE_IN = _UxGT(" in:"); + LSTR MSG_BACKLASH = _UxGT("Backlash"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Corectare"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Smoothing"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Nivelare Axa X"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Auto Calibrare"); - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Timeout Incalzitor"); - PROGMEM Language_Str MSG_REHEAT = _UxGT("Reincalzire"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Reincalzire..."); + LSTR MSG_LEVEL_X_AXIS = _UxGT("Nivelare Axa X"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto Calibrare"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Timeout Incalzitor"); + LSTR MSG_REHEAT = _UxGT("Reincalzire"); + LSTR MSG_REHEATING = _UxGT("Reincalzire..."); } #if FAN_COUNT == 1 diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index b3176c0a5443..25ea5fd471ea 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -32,792 +32,880 @@ namespace Language_ru { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Russian"); - - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Готов."); - PROGMEM Language_Str MSG_YES = _UxGT("Да"); - PROGMEM Language_Str MSG_NO = _UxGT("Нет"); - PROGMEM Language_Str MSG_BACK = _UxGT("Назад"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Прерывание..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("SD-карта вставлена"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("SD-карта извлечена"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Вставьте SD-карту"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("Сбой инициализации SD"); - #else - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("Сбой инициализ. SD"); - #endif - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Ошибка считывания"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB диск удалён"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Ошибка USB диска"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переполнение вызова"); - #else - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переполн. вызова"); - #endif - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Прогр. эндстопы"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Эндстопы"); // Max length 8 characters - PROGMEM Language_Str MSG_MAIN = _UxGT("Основное меню"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Другие настройки"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Конфигурация"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Выключить двигатели"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Меню отладки"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Тест индикатора"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Парковка XYZ"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Парковка X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Парковка Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Парковка Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Авто Z-выравнивание"); - PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Итерация: %i"); - PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Уменьшение точности!"); - PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Точность достигнута"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Нулевое положение"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Нажмите чтобы начать"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Следующая точка"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Выравнивание готово!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Высота спада"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Установ. смещения дома"); - #else - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Установ.смещ.дома"); - #endif - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Смещения применены"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Установить ноль"); - #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Преднагрев ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Нагрев ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" сопло"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" сопло ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" всё"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" стол"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" правка"); - - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Преднагрев $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Нагрев $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Нагрев $ сопло"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Нагрев $ сопло ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Нагрев $ всё"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Нагрев $ стол"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Нагрев $ правка"); - #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Нагрев Свой"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Охлаждение"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Частота"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Управление лазером"); - PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Переключить лазер"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Мощность лазера"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Управление шпинделем"); - PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Переключить шпиндель"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Мощность шпинделя"); - #else - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Мощн.шпинделя"); - #endif - PROGMEM Language_Str MSG_SPINDLE_FORWARD = _UxGT("Шпиндель вперёд"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Инверсия шпинделя"); - - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Включить питание"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Выключить питание"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Экструзия"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Втягивание"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Движение по осям"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Выравнивание стола"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Выровнять стол"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Выровнять углы"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Следующий угол"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Смещение по Z"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Правка сетки окончена"); - #else - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Смещение Z"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Правка окончена"); - #endif - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Редактировать сетку"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Точка сетки"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Индекс X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Индекс Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Значение Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Свои команды"); - - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 тест Z-зонда"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Отклонение"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 точка"); - PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Зонд за пределами"); - - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("Меню IDEX"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Размещение сопел"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Авто парковка"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Размножение"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Зеркальная копия"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Полный контроль"); - PROGMEM Language_Str MSG_IDEX_DUPE_GAP = _UxGT("Дублировать X-зазор"); - - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2-е сопло X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2-е сопло Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2-е сопло Z"); - - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Выполняем G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Инструменты UBL"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Настройка UBL"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Точка разворота"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Ручной ввод сетки"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Разместить шайбу и измерить"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Убрать и замерить стол"); - #else - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Разм.шайбу,измерить"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Убрать, измер. стол"); - #endif - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Измерение"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Двигаемся дальше"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Активировать UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Деактивировать UBL"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Редактор сеток"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Править свою сетку"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Температура стола"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Температура стола"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Температура сопла"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Температура сопла"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Построить свою сетку"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Правка сетки завершена"); - #else - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" стола, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = LCD_STR_THERMOMETER _UxGT(" стола, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Построить свою"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Правка завершена"); - #endif - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Точная правка сетки"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Построить сетку"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Russian"); + + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Готов."); + LSTR MSG_YES = _UxGT("Да"); + LSTR MSG_NO = _UxGT("Нет"); + LSTR MSG_BACK = _UxGT("Назад"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Прерывание..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("SD карта вставлена"); + LSTR MSG_MEDIA_REMOVED = _UxGT("SD карта извлечена"); + LSTR MSG_MEDIA_WAITING = _UxGT("Вставьте SD карту"); + #if LCD_WIDTH > 21 + LSTR MSG_SD_INIT_FAIL = _UxGT("Сбой инициализации SD"); + #else + LSTR MSG_SD_INIT_FAIL = _UxGT("Сбой инициализ. SD"); + #endif + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Ошибка считывания"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB диск удалён"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Ошибка USB диска"); + #if LCD_WIDTH > 21 + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переполнение вызова"); + #else + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переполн. вызова"); + #endif + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Прогр. эндстопы"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Эндстопы"); // Max length 8 characters + LSTR MSG_MAIN = _UxGT("Основное меню"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Другие настройки"); + LSTR MSG_CONFIGURATION = _UxGT("Конфигурация"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Выключить двигатели"); + LSTR MSG_DEBUG_MENU = _UxGT("Меню отладки"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Тест индикатора"); + LSTR MSG_AUTO_HOME = _UxGT("Парковка XYZ"); + LSTR MSG_AUTO_HOME_X = _UxGT("Парковка X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Парковка Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Парковка Z"); + LSTR MSG_AUTO_HOME_I = _UxGT("Парковка ") LCD_STR_I; + LSTR MSG_AUTO_HOME_J = _UxGT("Парковка ") LCD_STR_J; + LSTR MSG_AUTO_HOME_K = _UxGT("Парковка ") LCD_STR_K; + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Авто Z-выравнивание"); + LSTR MSG_ITERATION = _UxGT("G34 Итерация: %i"); + LSTR MSG_DECREASING_ACCURACY = _UxGT("Уменьшение точности!"); + LSTR MSG_ACCURACY_ACHIEVED = _UxGT("Точность достигнута"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Нулевое положение"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Нажмите чтобы начать"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Следующая точка"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Выравнивание готово!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Высота спада"); + #if LCD_WIDTH > 21 + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Установ. смещения дома"); + LSTR MSG_HOME_OFFSET_X = _UxGT("Смещение дома X"); + LSTR MSG_HOME_OFFSET_Y = _UxGT("Смещение дома Y"); + LSTR MSG_HOME_OFFSET_Z = _UxGT("Смещение дома Z"); + LSTR MSG_HOME_OFFSET_I = _UxGT("Смещение дома ") LCD_STR_I; + LSTR MSG_HOME_OFFSET_J = _UxGT("Смещение дома ") LCD_STR_J; + LSTR MSG_HOME_OFFSET_K = _UxGT("Смещение дома ") LCD_STR_K; + #else + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Установ.смещ.дома"); + LSTR MSG_HOME_OFFSET_X = _UxGT("Смещ. дома X"); + LSTR MSG_HOME_OFFSET_Y = _UxGT("Смещ. дома Y"); + LSTR MSG_HOME_OFFSET_Z = _UxGT("Смещ. дома Z"); + LSTR MSG_HOME_OFFSET_I = _UxGT("Смещ. дома ") LCD_STR_I; + LSTR MSG_HOME_OFFSET_J = _UxGT("Смещ. дома ") LCD_STR_J; + LSTR MSG_HOME_OFFSET_K = _UxGT("Смещ. дома ") LCD_STR_K; + #endif + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Смещения применены"); + LSTR MSG_SET_ORIGIN = _UxGT("Установить ноль"); + LSTR MSG_SELECT_ORIGIN = _UxGT("Выберите ноль"); + #if LCD_WIDTH > 21 + LSTR MSG_LAST_VALUE_SP = _UxGT("Последнее знач. "); + #else + LSTR MSG_LAST_VALUE_SP = _UxGT("Послед. знач. "); + #endif #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Построить сетку $"); - #endif - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Построить холодную сетку"); - #else - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Строить холод.сетку"); - #endif - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Правка высоты сетки"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Высота"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Проверить сетку"); - #if LCD_WIDTH > 21 - #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Проверить сетку $"); - #endif - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Проверить свою сетку"); - #else - #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Провер. сетку $"); - #endif - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Провер. свою сетку"); - #endif - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 нагрев стола"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 нагрев сопла"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Ручная грунтовка"); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Грунт фикс. длины"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Грунтовка сделана"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 завершена"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Выйти из G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Продолжить сетку"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Выравнивание сетки"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-х точечное выравнивание"); - #else - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-точечное выравн."); - #endif - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Калибровка растера"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Выровнять сетку"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Крайние точки"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Тип карты"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Вывести карту сетки"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Вывести на хост"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Вывести в CSV"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Сохранить сетку снаружи"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Вывод информации UBL"); - #else - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Сохранить снаружи"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Информация UBL"); - #endif - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Кол-во заполнителя"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Ручное заполнение"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Умное заполнение"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Заполнить сетку"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Аннулировать всё"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Аннулир. ближайшую"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Точно править всё"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Настр. ближ. точку"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Хранилище сеток"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Слот памяти"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Загрузить сетку"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Сохранить сетку"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Сетка %i загружена"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Сетка %i сохранена"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Нет хранилища"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Ошибка: Сохран. UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Ошибка: Восстан.UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Смещение Z: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Смещение Z останов."); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL пошагово"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Строить холодную"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Умное заполнение"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Проверить сетку"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Точно настр. всё"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Проверить сетку"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Точно настр. всё"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Сохранить сетку"); - - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Настройка подсветки"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Подсветка"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Предустановки света"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Красный"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Оранжевый"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Жёлтый"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Зелёный"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Синий"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Индиго"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Фиолетовый"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Белый"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Свет по умолчанию"); - PROGMEM Language_Str MSG_LED_CHANNEL_N = _UxGT("Канал ="); - PROGMEM Language_Str MSG_LEDS2 = _UxGT("Свет #2"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Свет #2 предустановки"); - #else - PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Свет #2 предустан."); - #endif - PROGMEM Language_Str MSG_NEO2_BRIGHTNESS = _UxGT("Яркость"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Свой цвет подсветки"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Уровень красного"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Уровень зелёного"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Уровень синего"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Уровень белого"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Яркость"); - - PROGMEM Language_Str MSG_MOVING = _UxGT("Движемся..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Освободить XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Движение по X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Движение по Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Движение по Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Экструдер"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Экструдер *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Сопло не нагрето"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Движение %sмм"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Движение 0.1мм"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Движение 1мм"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Движение 10мм"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Скорость"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Z стола"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Сопло, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Сопло ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Сопло запарковано"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Сопло ожидает"); - PROGMEM Language_Str MSG_BED = _UxGT("Стол, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Кулер"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Кулер ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Сохранённый кулер ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Дополн. кулер"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Дополн. кулер ~"); - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Контроллер кулера"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Холостые обороты"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Автовключение"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Рабочие обороты"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Период простоя"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Поток"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Поток ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Настройки"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER ", " LCD_STR_DEGREE _UxGT("С мин"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER ", " LCD_STR_DEGREE _UxGT("С макс"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Фактор"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Автотемпер."); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Вкл"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Выкл"); - - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("Автоподбор PID"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("Автоподбор PID *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("Подбор PID выполнен"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Сбой автоподбора. Плохой экструдер."); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Сбой автоподбора. Температура повышена."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Сбой автоподбора! Завершение времени."); - - PROGMEM Language_Str MSG_SELECT = _UxGT("Выбор"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Выбор *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Ускорение"); - PROGMEM Language_Str MSG_JERK = _UxGT("Рывок"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-рывок"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-рывок"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-рывок"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-рывок"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Отклонение узла"); - #else - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Отклон. узла"); - #endif - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Скорость, мм/с"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Скор.макс ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Скор.макс ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Скор.макс ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Скор.макс ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Скор.макс *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Скор.мин"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Перемещение мин"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Ускорение, мм/с2"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Ускор.макс ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Ускор.макс ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Ускор.макс ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Ускор.макс ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Ускор.макс *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Ускор.втягив."); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Ускор.путеш."); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Частота макс."); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Подача мин."); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Шагов/мм"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" шаг/мм"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" шаг/мм"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" шаг/мм"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E шаг/мм"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* шаг/мм"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Температура"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Движение"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Филамент"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E в мм") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("E огран.,мм") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("E огран. *"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Диам. филамента"); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Диам. филамента *"); - #else - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Диам. филам."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Диам. филам. *"); - #endif - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Загрузка, мм"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Выгрузка, мм"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Kоэф. продвиж."); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Kоэф. продвиж. *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Контраст экрана"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Сохранить настройки"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Загрузить настройки"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("На базовые параметры"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Инициализация EEPROM"); - #else - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Инициализ. EEPROM"); - #endif - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("Сбой EEPROM: CRC"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("Сбой EEPROM: индекс"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("Сбой EEPROM: версия"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Параметры сохранены"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Обновление прошивки"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Сброс принтера"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT(" Обновить"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Главный экран"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Подготовить"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Настроить"); - PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("Монитор питания"); - PROGMEM Language_Str MSG_CURRENT = _UxGT("Ток"); - PROGMEM Language_Str MSG_VOLTAGE = _UxGT("Напряжение"); - PROGMEM Language_Str MSG_POWER = _UxGT("Мощность"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Начало печати"); - - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Дальше"); //short text for buttons - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Иниц-я"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Стоп"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Печать"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Сброс"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("Игнорир."); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Отмена"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Готово"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Назад"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Продолжить"); - PROGMEM Language_Str MSG_BUTTON_SKIP = _UxGT("Пропустить"); - - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Пауза печати"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Продолжить печать"); - PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Старт с хоста"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Остановить печать"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Печать объекта"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Завершить объект"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Завершить объект ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Восстановение сбоя"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Печать с SD карты"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Нет SD карты"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Сон..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Продолжить..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Печать на паузе"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Печать..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Печать отменена"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Печать завершена"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Нет движения."); - PROGMEM Language_Str MSG_KILLED = _UxGT("УБИТО. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ОСТАНОВЛЕНО. "); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Втягивание, мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Смена втягив., мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Возврат смены, мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Возврат смены, V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Автовтягивание"); - #else - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Втягив., мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Смена втяг.,мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Возвр.смены,мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Возвр.смены V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Автовтягив."); - #endif - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Подскок, мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Втягивание V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Возврат, мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Возврат V"); - - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Поменять длины"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Поменять дополнительно"); - #else - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Поменять дополнит."); - #endif - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Очистить длину"); - - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Смена сопел"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Поднятие по Z"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Начальная скор."); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Скорость втягив."); - #else - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Началь.скор."); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Скор.втягив."); - #endif - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Парковать голову"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Вернуть скорость"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Обороти кулера"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Время кулера"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Авто Вкл."); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Авто Выкл."); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Замена инструмента"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Авто замена"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Последний экструдер"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Замена на *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Смена филамента"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Смена филамента *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Загрузить филамент"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Загрузить филамент *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Выгрузить филамент *"); - #else - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Подать филамент *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Убрать филамент *"); - #endif - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Выгрузить всё"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Установить SD карту"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Сменить SD карту"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Освободить SD карту"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z-зонд вне стола"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Фактор наклона"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("Z-зонд BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Тестирование BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Сброс BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Поднять BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Опустить BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("Режим SW"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("Режим 5V"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("Режим OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Режим сохранения"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Установить на 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Установить на OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Слив отчёта"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("ОПАСНОСТЬ: Неправильные параметры приводят к повреждениям! Продолжить?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("Z-Зонд TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Инициализация"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Тест Z-смещения"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Сохранить"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Установить TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Установить зонд"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Загрузить зонд"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Сначала паркуй %s%s%s"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Смещения Z-зонда"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Смещение X"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Смещение Y"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Смещение Z"); - PROGMEM Language_Str MSG_MOVE_NOZZLE_TO_BED = _UxGT("Двигать сопло к столу"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Микрошаг X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Микрошаг Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Микрошаг Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Сумарно"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Сработал концевик"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Разогрев не удался"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Ошибка:Избыточная Т"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("УТЕЧКА ТЕПЛА"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("УТЕЧКА ТЕПЛА СТОЛА"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("УТЕЧКА ТЕПЛА КАМЕРЫ"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Ошибка: Т макс."); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Ошибка: Т мин."); - PROGMEM Language_Str MSG_HALTED = _UxGT("ПРИНТЕР ОСТАНОВЛЕН"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Сделайте сброс"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("д"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("ч"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("м"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Нагрев..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Охлаждение..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Нагрев стола..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Охлаждение стола..."); - PROGMEM Language_Str MSG_PROBE_HEATING = _UxGT("Нагрев зонда..."); - PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Охлаждение зонда..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Нагрев камеры..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Охладжение камеры..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Калибровка Delta"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Калибровать X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Калибровать Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Калибровать Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Калибровать центр"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Настройки Delta"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Авто калибровка"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Высота Delta"); - #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Зондировать Z-смещение"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Стержень диагонали"); - #else - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Зондир. Z-смещения"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Стержень диаг."); - #endif - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Высота"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Радиус"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("О принтере"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Данные принтера"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-точечное выравнивание"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Линейное выравнивание"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Билинейное выравнивание"); - #else - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-точ. выравнив."); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Линейное выравн."); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Билин. выравнив."); - #endif - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Управление UBL"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Выравнивание сетки"); - - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Статистика принтера"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Данные платы"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Термисторы"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Экструдеры"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Скорость,БОД"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Протокол"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Контроль утечки Т: Выкл"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Контроль утечки Т: Вкл"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Время простоя хотенда"); - #else - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Контр.утечки Т:Выкл"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Контр.утечки Т:Вкл"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Время прост.хот-а"); - #endif - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Подсветка корпуса"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Яркость подсветки"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Неверный принтер"); - - #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Счётчик печати"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Общее время печати"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Наидольшее задание"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Длина филамента"); - #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Отпечатков"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Всего"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Наидольшее"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Выдавлено"); - #endif - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Завершено"); - - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Мин. ") LCD_STR_THERMOMETER; - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Макс. ") LCD_STR_THERMOMETER; - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("БП"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Сила привода"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Привод, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Привод, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Привод, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Привод, %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("СБОЙ СВЯЗИ С TMC"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Запись DAC в EEPROM"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("ЗАМЕНА ФИЛАМЕНТА"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("ПЕЧАТЬ НА ПАУЗЕ"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("ЗАГРУЗКА ФИЛАМЕНТА"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("ВЫГРУЗКА ФИЛАМЕНТА"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ОПЦИИ ПРОДОЛЖЕНИЯ:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Выдавить ещё"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Возобновить печать"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Сопла: "); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Датчик оконч. филамента"); - #else - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Датчик оконч.филам."); - #endif - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("До конца, мм"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Ошибка парковки"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Ошибка зондирования"); - - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ВЫБИРЕТЕ ФИЛАМЕНТ"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("Настройки MMU"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Обновить прошивку MMU!"); - #else - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Обнови прошивку MMU"); - #endif - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU требует внимания"); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Продолжить печать"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Продолжение..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Загрузить филамент"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Загрузить всё"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Загрузить в сопло"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Извлечь филамент"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Извлечь филамент ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Выгрузить филамент"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Загрузка %i..."); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Извлечение филамента..."); - #else - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Извлеч.филамента..."); - #endif - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Выгрузка...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Всё"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Филамент ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Перезапуск MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("Перезапуск MMU..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Удалите и нажмите"); - - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_MIX = _UxGT("Смешивание"); - #else - PROGMEM Language_Str MSG_MIX = _UxGT("Смешив."); - #endif - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Компонент ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Смеситель"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Градиент"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Полный градиент"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Цикличное смешивание"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Градиент смешивания"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Сменить градиент"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Переключить смешивание"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Активация В-инструм."); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Начало В-инструмента"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT("Конец В-инструмента"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Псевдоним В-инструмента"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Сброс В-инструментов"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Смешать В-инструменты"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("В-инструменты сброшены"); - #else - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Перекл. смешивание"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Актив.В-инструм."); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("В-инструм.нач."); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT("В-инструм.кон."); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Псевдоним В-инстр."); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Сброс В-инструм."); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Смешать В-инструм."); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("В-инструм. сброшены"); - #endif - PROGMEM Language_Str MSG_START_Z = _UxGT("Начало Z"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" Конец Z"); - - PROGMEM Language_Str MSG_GAMES = _UxGT("Игры"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Кирпичи"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Вторжение"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Змейка"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Лабиринт"); - - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("Плохой индекс страницы"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Плохая скорость страницы"); - #else - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("Плохая страница"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Плохая скор.стран."); - #endif - - PROGMEM Language_Str MSG_EDIT_PASSWORD = _UxGT("Редактировать пароль"); - PROGMEM Language_Str MSG_LOGIN_REQUIRED = _UxGT("Нужен логин"); - PROGMEM Language_Str MSG_PASSWORD_SETTINGS = _UxGT("Настройки пароля"); - PROGMEM Language_Str MSG_ENTER_DIGIT = _UxGT("Введите цифру"); - PROGMEM Language_Str MSG_CHANGE_PASSWORD = _UxGT("Смените пароль"); - PROGMEM Language_Str MSG_REMOVE_PASSWORD = _UxGT("Удалить пароль"); - PROGMEM Language_Str MSG_PASSWORD_SET = _UxGT("Пароль это "); - PROGMEM Language_Str MSG_START_OVER = _UxGT("Старт через"); + LSTR MSG_PREHEAT_1 = _UxGT("Преднагрев ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Нагрев ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" сопло"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" сопло ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" всё"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" стол"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Нагрев ") PREHEAT_1_LABEL _UxGT(" правка"); + + LSTR MSG_PREHEAT_M = _UxGT("Преднагрев $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Нагрев $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Нагрев $ сопло"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Нагрев $ сопло ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Нагрев $ всё"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Нагрев $ стол"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Нагрев $ правка"); + #endif + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Нагрев Свой"); + LSTR MSG_COOLDOWN = _UxGT("Охлаждение"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Частота"); + LSTR MSG_LASER_MENU = _UxGT("Управление лазером"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Запомни для сохранения!"); + LSTR MSG_SPINDLE_MENU = _UxGT("Управление шпинделем"); + LSTR MSG_LASER_TOGGLE = _UxGT("Переключить лазер"); + LSTR MSG_SPINDLE_TOGGLE = _UxGT("Переключ.шпиндель"); + LSTR MSG_SPINDLE_POWER = _UxGT("Мощность шпинделя"); + LSTR MSG_LASER_POWER = _UxGT("Мощность лазера"); + LSTR MSG_LASER_PULSE_MS = _UxGT("Тестовый импульс мс"); + LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Переключить обдув"); + LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Переключить вакуум"); + #else + LSTR MSG_SPINDLE_MENU = _UxGT("Управление шпинд."); + LSTR MSG_LASER_TOGGLE = _UxGT("Переключ.лазер"); + LSTR MSG_SPINDLE_TOGGLE = _UxGT("Переключ.шпинд"); + LSTR MSG_SPINDLE_POWER = _UxGT("Мощн.шпинделя"); + LSTR MSG_LASER_POWER = _UxGT("Мощн. лазера"); + LSTR MSG_LASER_PULSE_MS = _UxGT("Тест. имп. мс"); + LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Переключ. обдув"); + LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Переключ. вакуум"); + #endif + LSTR MSG_LASER_ASSIST_TOGGLE = _UxGT("Управление обдувом"); + LSTR MSG_FLOWMETER_FAULT = _UxGT("Ошибка обдува"); + LSTR MSG_LASER_FIRE_PULSE = _UxGT("Импульс лазера"); + LSTR MSG_SPINDLE_FORWARD = _UxGT("Шпиндель вперёд"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Инверсия шпинделя"); + + LSTR MSG_SWITCH_PS_ON = _UxGT("Включить питание"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Выключить питание"); + LSTR MSG_EXTRUDE = _UxGT("Экструзия"); + LSTR MSG_RETRACT = _UxGT("Втягивание"); + LSTR MSG_MOVE_AXIS = _UxGT("Движение по осям"); + LSTR MSG_BED_LEVELING = _UxGT("Выравнивание стола"); + LSTR MSG_LEVEL_BED = _UxGT("Выровнять стол"); + LSTR MSG_BED_TRAMMING = _UxGT("Выровнять углы"); + LSTR MSG_NEXT_CORNER = _UxGT("Следующий угол"); + #if LCD_WIDTH > 21 + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Вверх до срабатыв. зонда"); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Углы в норме. Вырав.стола"); #else - PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Запомни, сохрани!"); + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Вверх до сраб. зонда"); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Углы в норме. Вырав."); #endif - PROGMEM Language_Str MSG_PASSWORD_REMOVED = _UxGT("Пароль удалён"); + LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Хорошие точки: "); + LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Последняя Z: "); + #if LCD_WIDTH > 21 + LSTR MSG_MESH_EDITOR = _UxGT("Смещение по Z"); + LSTR MSG_EDITING_STOPPED = _UxGT("Правка сетки окончена"); + #else + LSTR MSG_MESH_EDITOR = _UxGT("Смещение Z"); + LSTR MSG_EDITING_STOPPED = _UxGT("Правка окончена"); + #endif + LSTR MSG_EDIT_MESH = _UxGT("Редактировать сетку"); + LSTR MSG_PROBING_POINT = _UxGT("Точка сетки"); + LSTR MSG_MESH_X = _UxGT("Индекс X"); + LSTR MSG_MESH_Y = _UxGT("Индекс Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Значение Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Свои команды"); + + LSTR MSG_M48_TEST = _UxGT("M48 тест Z-зонда"); + LSTR MSG_M48_DEVIATION = _UxGT("Отклонение"); + LSTR MSG_M48_POINT = _UxGT("M48 точка"); + LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Зонд за пределами"); + + LSTR MSG_IDEX_MENU = _UxGT("Меню IDEX"); + LSTR MSG_OFFSETS_MENU = _UxGT("Размещение сопел"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Авто парковка"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Размножение"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Зеркальная копия"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Полный контроль"); + LSTR MSG_IDEX_DUPE_GAP = _UxGT("Дублировать X-зазор"); + + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2-е сопло X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2-е сопло Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2-е сопло Z"); + + LSTR MSG_UBL_DOING_G29 = _UxGT("Выполняем G29"); + LSTR MSG_UBL_TOOLS = _UxGT("Инструменты UBL"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Настройка UBL"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Точка разворота"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Ручной ввод сетки"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_BC_INSERT = _UxGT("Разместить шайбу,измерить"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Убрать и замерить стол"); + #else + LSTR MSG_UBL_BC_INSERT = _UxGT("Разм.шайбу, измерить"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Убрать, измер. стол"); + #endif + LSTR MSG_UBL_MESH_WIZARD = _UxGT("Мастер сеток UBL"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Измерение"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Двигаемся дальше"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Активировать UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Деактивировать UBL"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Редактор сеток"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Править свою сетку"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Температура стола"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Температура стола"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Температура сопла"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Температура сопла"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Построить свою сетку"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Правка сетки завершена"); + #else + LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" стола, ") LCD_STR_DEGREE "C"; + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" стола,") LCD_STR_DEGREE "C"; + LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE "C"; + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" сопла,") LCD_STR_DEGREE "C"; + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Построить свою"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Правка завершена"); + #endif + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Точная правка сетки"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Построить сетку"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Построить сетку $"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Построить холодную сетку"); + #else + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Строить холод.сетку"); + #endif + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Правка высоты сетки"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Высота"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Проверить сетку"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Проверить сетку $"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Проверить свою сетку"); + #else + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Провер. сетку $"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Провер. свою сетку"); + #endif + LSTR MSG_G26_HEATING_BED = _UxGT("G26 нагрев стола"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 нагрев сопла"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Ручная грунтовка"); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Грунт фикс. длины"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Грунтовка сделана"); + LSTR MSG_G26_CANCELED = _UxGT("G26 завершена"); + LSTR MSG_G26_LEAVING = _UxGT("Выйти из G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Продолжить сетку"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Выравнивание сетки"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-х точечное выравнивание"); + #else + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-точечное выравн."); + #endif + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Калибровка растера"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Выровнять сетку"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Крайние точки"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Тип карты"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Вывести карту сетки"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Вывести на хост"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Вывести в CSV"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Сохранить сетку снаружи"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Вывод информации UBL"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Кол-во заполнителя"); + #else + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Сохранить снаружи"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Информация UBL"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Кол-во заполн."); + #endif + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Ручное заполнение"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Умное заполнение"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Заполнить сетку"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Аннулировать всё"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Аннулир. ближайшую"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Точно править всё"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Настр. ближ. точку"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Хранилище сеток"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Слот памяти"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Загрузить сетку"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Сохранить сетку"); + LSTR MSG_MESH_LOADED = _UxGT("Сетка %i загружена"); + LSTR MSG_MESH_SAVED = _UxGT("Сетка %i сохранена"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Нет хранилища"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Ошибка: Сохран. UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Ошибка: Восстан.UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Смещение Z: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Смещение Z останов."); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL пошагово"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Строить холодную"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Умное заполнение"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Проверить сетку"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Точно настр. всё"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Проверить сетку"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Точно настр. всё"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Сохранить сетку"); + + LSTR MSG_LED_CONTROL = _UxGT("Настройка подсветки"); + LSTR MSG_LEDS = _UxGT("Подсветка"); + LSTR MSG_LED_PRESETS = _UxGT("Предустановки света"); + LSTR MSG_SET_LEDS_RED = _UxGT("Красный"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Оранжевый"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Жёлтый"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Зелёный"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Синий"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Индиго"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Фиолетовый"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Белый"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Свет по умолчанию"); + LSTR MSG_LED_CHANNEL_N = _UxGT("Канал ="); + LSTR MSG_LEDS2 = _UxGT("Свет #2"); + #if LCD_WIDTH > 21 + LSTR MSG_NEO2_PRESETS = _UxGT("Свет #2 предустановки"); + #else + LSTR MSG_NEO2_PRESETS = _UxGT("Свет #2 предустан."); + #endif + LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Яркость"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Свой цвет подсветки"); + LSTR MSG_INTENSITY_R = _UxGT("Уровень красного"); + LSTR MSG_INTENSITY_G = _UxGT("Уровень зелёного"); + LSTR MSG_INTENSITY_B = _UxGT("Уровень синего"); + LSTR MSG_INTENSITY_W = _UxGT("Уровень белого"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Яркость"); + + LSTR MSG_MOVING = _UxGT("Движемся..."); + LSTR MSG_FREE_XY = _UxGT("Освободить XY"); + LSTR MSG_MOVE_X = _UxGT("Движение по X"); + LSTR MSG_MOVE_Y = _UxGT("Движение по Y"); + LSTR MSG_MOVE_Z = _UxGT("Движение по Z"); + LSTR MSG_MOVE_I = _UxGT("Движение по ") LCD_STR_I; + LSTR MSG_MOVE_J = _UxGT("Движение по ") LCD_STR_J; + LSTR MSG_MOVE_K = _UxGT("Движение по ") LCD_STR_K; + LSTR MSG_MOVE_E = _UxGT("Экструдер"); + LSTR MSG_MOVE_EN = _UxGT("Экструдер *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Сопло не нагрето"); + LSTR MSG_MOVE_N_MM = _UxGT("Движение %sмм"); + LSTR MSG_MOVE_01MM = _UxGT("Движение 0.1мм"); + LSTR MSG_MOVE_1MM = _UxGT("Движение 1мм"); + LSTR MSG_MOVE_10MM = _UxGT("Движение 10мм"); + LSTR MSG_MOVE_100MM = _UxGT("Движение 100mm"); + LSTR MSG_SPEED = _UxGT("Скорость"); + LSTR MSG_BED_Z = _UxGT("Z стола"); + LSTR MSG_NOZZLE = _UxGT("Сопло, ") LCD_STR_DEGREE "C"; + LSTR MSG_NOZZLE_N = _UxGT("Сопло ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Сопло запарковано"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Сопло ожидает"); + LSTR MSG_BED = _UxGT("Стол, ") LCD_STR_DEGREE "C"; + LSTR MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; + #if LCD_WIDTH > 21 + LSTR MSG_COOLER = _UxGT("Охлаждение лазера"); + LSTR MSG_COOLER_TOGGLE = _UxGT("Переключ. охлажд."); + LSTR MSG_FLOWMETER_SAFETY = _UxGT("Безопасн. потока"); + #else + LSTR MSG_COOLER = _UxGT("Охлажд. лазера"); + LSTR MSG_COOLER_TOGGLE = _UxGT("Переключ. охл."); + LSTR MSG_FLOWMETER_SAFETY = _UxGT("Безопас.потока"); + #endif + LSTR MSG_LASER = _UxGT("Лазер"); + LSTR MSG_FAN_SPEED = _UxGT("Кулер"); + LSTR MSG_FAN_SPEED_N = _UxGT("Кулер ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Сохранённый кулер ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Дополн. кулер"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Дополн. кулер ~"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Контроллер кулера"); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Холостые обороты"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Автовключение"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Рабочие обороты"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Период простоя"); + LSTR MSG_FLOW = _UxGT("Поток"); + LSTR MSG_FLOW_N = _UxGT("Поток ~"); + LSTR MSG_CONTROL = _UxGT("Настройки"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER ", " LCD_STR_DEGREE _UxGT("С мин"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER ", " LCD_STR_DEGREE _UxGT("С макс"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Фактор"); + LSTR MSG_AUTOTEMP = _UxGT("Автотемпер."); + LSTR MSG_LCD_ON = _UxGT("Вкл"); + LSTR MSG_LCD_OFF = _UxGT("Выкл"); + + LSTR MSG_PID_AUTOTUNE = _UxGT("Автоподбор PID"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("Автоподбор PID *"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Подбор PID выполнен"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Сбой автоподбора. Плохой экструдер."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Сбой автоподбора. Температура повышена."); + LSTR MSG_PID_TIMEOUT = _UxGT("Сбой автоподбора! Завершение времени."); + + LSTR MSG_SELECT = _UxGT("Выбор"); + LSTR MSG_SELECT_E = _UxGT("Выбор *"); + LSTR MSG_ACC = _UxGT("Ускорение"); + LSTR MSG_JERK = _UxGT("Рывок"); + LSTR MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-рывок"); + LSTR MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-рывок"); + LSTR MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-рывок"); + LSTR MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-рывок"); + LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-рывок"); + LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-рывок"); + LSTR MSG_VE_JERK = _UxGT("Ve-рывок"); + #if LCD_WIDTH > 21 + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Отклонение узла"); + #else + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Отклон. узла"); + #endif + LSTR MSG_VELOCITY = _UxGT("Скорость, мм/с"); + LSTR MSG_VMAX_A = _UxGT("Скор.макс ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("Скор.макс ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Скор.макс ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Скор.макс ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Скор.макс ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Скор.макс ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Скор.макс ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Скор.макс *"); + LSTR MSG_VMIN = _UxGT("Скор.мин"); + LSTR MSG_VTRAV_MIN = _UxGT("Перемещение мин"); + LSTR MSG_ACCELERATION = _UxGT("Ускорение, мм/с2"); + LSTR MSG_AMAX_A = _UxGT("Ускор.макс ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Ускор.макс ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Ускор.макс ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Ускор.макс ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Ускор.макс ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Ускор.макс ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Ускор.макс ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Ускор.макс *"); + LSTR MSG_A_RETRACT = _UxGT("Ускор.втягив."); + LSTR MSG_A_TRAVEL = _UxGT("Ускор.путеш."); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Частота макс."); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Подача мин."); + LSTR MSG_STEPS_PER_MM = _UxGT("Шагов/мм"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" шаг/мм"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" шаг/мм"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" шаг/мм"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" шаг/мм"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" шаг/мм"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" шаг/мм"); + LSTR MSG_E_STEPS = _UxGT("E шаг/мм"); + LSTR MSG_EN_STEPS = _UxGT("* шаг/мм"); + LSTR MSG_TEMPERATURE = _UxGT("Температура"); + LSTR MSG_MOTION = _UxGT("Движение"); + LSTR MSG_FILAMENT = _UxGT("Филамент"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E в мм") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E огран.,мм") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E огран. *"); + #if LCD_WIDTH > 21 + LSTR MSG_FILAMENT_DIAM = _UxGT("Диам. филамента"); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Диам. филамента *"); + #else + LSTR MSG_FILAMENT_DIAM = _UxGT("Диам. филам."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Диам. филам. *"); + #endif + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Загрузка, мм"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Выгрузка, мм"); + LSTR MSG_ADVANCE_K = _UxGT("Kоэф. продвиж."); + LSTR MSG_ADVANCE_K_E = _UxGT("Kоэф. продвиж. *"); + LSTR MSG_CONTRAST = _UxGT("Контраст экрана"); + LSTR MSG_STORE_EEPROM = _UxGT("Сохранить настройки"); + LSTR MSG_LOAD_EEPROM = _UxGT("Загрузить настройки"); + #if LCD_WIDTH > 21 + LSTR MSG_RESTORE_DEFAULTS = _UxGT("На базовые параметры"); + LSTR MSG_INIT_EEPROM = _UxGT("Инициализация EEPROM"); + #else + LSTR MSG_RESTORE_DEFAULTS = _UxGT("На базовые парам."); + LSTR MSG_INIT_EEPROM = _UxGT("Инициализ. EEPROM"); + #endif + LSTR MSG_ERR_EEPROM_CRC = _UxGT("Сбой EEPROM: CRC"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Сбой EEPROM: индекс"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Сбой EEPROM: версия"); + LSTR MSG_SETTINGS_STORED = _UxGT("Параметры сохранены"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Обновление прошивки"); + LSTR MSG_RESET_PRINTER = _UxGT("Сброс принтера"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT(" Обновить"); + LSTR MSG_INFO_SCREEN = _UxGT("Главный экран"); + LSTR MSG_PREPARE = _UxGT("Подготовить"); + LSTR MSG_TUNE = _UxGT("Настроить"); + LSTR MSG_POWER_MONITOR = _UxGT("Монитор питания"); + LSTR MSG_CURRENT = _UxGT("Ток"); + LSTR MSG_VOLTAGE = _UxGT("Напряжение"); + LSTR MSG_POWER = _UxGT("Мощность"); + LSTR MSG_START_PRINT = _UxGT("Начало печати"); + + LSTR MSG_BUTTON_NEXT = _UxGT("Дальше"); //short text for buttons + LSTR MSG_BUTTON_INIT = _UxGT("Иниц-я"); + LSTR MSG_BUTTON_STOP = _UxGT("Стоп"); + LSTR MSG_BUTTON_PRINT = _UxGT("Печать"); + LSTR MSG_BUTTON_RESET = _UxGT("Сброс"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Игнорир."); + LSTR MSG_BUTTON_CANCEL = _UxGT("Отмена"); + LSTR MSG_BUTTON_DONE = _UxGT("Готово"); + LSTR MSG_BUTTON_BACK = _UxGT("Назад"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Продолжить"); + LSTR MSG_BUTTON_SKIP = _UxGT("Пропустить"); + + LSTR MSG_PAUSE_PRINT = _UxGT("Пауза печати"); + LSTR MSG_RESUME_PRINT = _UxGT("Продолжить печать"); + LSTR MSG_HOST_START_PRINT = _UxGT("Старт с хоста"); + LSTR MSG_STOP_PRINT = _UxGT("Остановить печать"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Печать объекта"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Завершить объект"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершить объект ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Восстановение сбоя"); + LSTR MSG_MEDIA_MENU = _UxGT("Печать с SD карты"); + LSTR MSG_NO_MEDIA = _UxGT("Нет SD карты"); + LSTR MSG_DWELL = _UxGT("Сон..."); + LSTR MSG_USERWAIT = _UxGT("Продолжить..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Печать на паузе"); + LSTR MSG_PRINTING = _UxGT("Печать..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Печать отменена"); + LSTR MSG_PRINT_DONE = _UxGT("Печать завершена"); + LSTR MSG_NO_MOVE = _UxGT("Нет движения."); + LSTR MSG_KILLED = _UxGT("УБИТО. "); + LSTR MSG_STOPPED = _UxGT("ОСТАНОВЛЕНО. "); + #if LCD_WIDTH > 21 + LSTR MSG_CONTROL_RETRACT = _UxGT("Втягивание, мм"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Смена втягив., мм"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Возврат смены, мм"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Возврат смены, V"); + LSTR MSG_AUTORETRACT = _UxGT("Автовтягивание"); + #else + LSTR MSG_CONTROL_RETRACT = _UxGT("Втягив., мм"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Смена втяг.,мм"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Возвр.смены,мм"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Возвр.смены V"); + LSTR MSG_AUTORETRACT = _UxGT("Автовтягив."); + #endif + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Подскок, мм"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Втягивание V"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Возврат, мм"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Возврат V"); + + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Поменять длины"); + #if LCD_WIDTH > 21 + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Поменять дополнительно"); + #else + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Поменять дополнит."); + #endif + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Очистить длину"); + + LSTR MSG_TOOL_CHANGE = _UxGT("Смена сопел"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Поднятие по Z"); + #if LCD_WIDTH > 21 + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Начальная скор."); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Скорость втягив."); + #else + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Началь.скор."); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Скор.втягив."); + #endif + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Парковать голову"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Вернуть скорость"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Обороти кулера"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Время кулера"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Авто Вкл."); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Авто Выкл."); + LSTR MSG_TOOL_MIGRATION = _UxGT("Замена инструмента"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Авто замена"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Последний экструдер"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Замена на *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Смена филамента"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Смена филамента *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Загрузить филамент"); + #if LCD_WIDTH > 21 + LSTR MSG_FILAMENTLOAD_E = _UxGT("Загрузить филамент *"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Выгрузить филамент *"); + #else + LSTR MSG_FILAMENTLOAD_E = _UxGT("Подать филамент *"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Убрать филамент *"); + #endif + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Выгрузить всё"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Установить SD карту"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Сменить SD карту"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Освободить SD карту"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z-зонд вне стола"); + LSTR MSG_SKEW_FACTOR = _UxGT("Фактор наклона"); + LSTR MSG_BLTOUCH = _UxGT("Z-зонд BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Тестирование BLTouch"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Сброс BLTouch"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Поднять BLTouch"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Опустить BLTouch"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("Режим SW"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("Режим 5V"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("Режим OD"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Режим сохранения"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Установить на 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Установить на OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Слив отчёта"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("ОПАСНОСТЬ: Неправильные параметры приводят к повреждениям! Продолжить?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("Z-Зонд TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Инициализация"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Тест Z-смещения"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Сохранить"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Установить TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Установить зонд"); + LSTR MSG_MANUAL_STOW = _UxGT("Загрузить зонд"); + LSTR MSG_HOME_FIRST = _UxGT("Сначала паркуй %s%s%s"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Смещения Z-зонда"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Смещение X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Смещение Y"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Смещение Z"); + #if LCD_WIDTH > 21 + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Двигать сопло к столу"); + #else + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Двиг. сопло к столу"); + #endif + LSTR MSG_BABYSTEP_X = _UxGT("Микрошаг X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Микрошаг Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Микрошаг Z"); + LSTR MSG_BABYSTEP_I = _UxGT("Микрошаг ") LCD_STR_I; + LSTR MSG_BABYSTEP_J = _UxGT("Микрошаг ") LCD_STR_J; + LSTR MSG_BABYSTEP_K = _UxGT("Микрошаг ") LCD_STR_K; + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Сумарно"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Сработал концевик"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Разогрев не удался"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Ошибка:Избыточная Т"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("УТЕЧКА ТЕПЛА"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("УТЕЧКА ТЕПЛА СТОЛА"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("УТЕЧКА ТЕПЛА КАМЕРЫ"); + LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("УТЕЧКА ОХЛАЖДЕНИЯ"); + LSTR MSG_COOLING_FAILED = _UxGT("ОХЛАДИТЬ НЕ УДАЛОСЬ"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Ошибка: Т макс."); + LSTR MSG_ERR_MINTEMP = _UxGT("Ошибка: Т мин."); + LSTR MSG_HALTED = _UxGT("ПРИНТЕР ОСТАНОВЛЕН"); + LSTR MSG_PLEASE_RESET = _UxGT("Сделайте сброс"); + LSTR MSG_SHORT_DAY = _UxGT("д"); // One character only + LSTR MSG_SHORT_HOUR = _UxGT("ч"); // One character only + LSTR MSG_SHORT_MINUTE = _UxGT("м"); // One character only + LSTR MSG_HEATING = _UxGT("Нагрев..."); + LSTR MSG_COOLING = _UxGT("Охлаждение..."); + LSTR MSG_BED_HEATING = _UxGT("Нагрев стола..."); + LSTR MSG_BED_COOLING = _UxGT("Охлаждение стола..."); + LSTR MSG_PROBE_HEATING = _UxGT("Нагрев зонда..."); + LSTR MSG_PROBE_COOLING = _UxGT("Охлаждение зонда..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Нагрев камеры..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Охладжение камеры..."); + LSTR MSG_LASER_COOLING = _UxGT("Охлаждение лазера..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Калибровка Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Калибровать X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Калибровать Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Калибровать Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Калибровать центр"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Настройки Delta"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Авто калибровка"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Высота Delta"); + #if LCD_WIDTH > 21 + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Зондировать Z-смещения"); + #else + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Зондир. Z-смещения"); + #endif + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Стержень диаг."); + LSTR MSG_DELTA_HEIGHT = _UxGT("Высота"); + LSTR MSG_DELTA_RADIUS = _UxGT("Радиус"); + LSTR MSG_INFO_MENU = _UxGT("О принтере"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Данные принтера"); + #if LCD_WIDTH > 21 + LSTR MSG_3POINT_LEVELING = _UxGT("3-точечное выравнивание"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Линейное выравнивание"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Билинейное выравнивание"); + #else + LSTR MSG_3POINT_LEVELING = _UxGT("3-точ. выравнив."); + LSTR MSG_LINEAR_LEVELING = _UxGT("Линейное выравн."); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Билин. выравнив."); + #endif + LSTR MSG_UBL_LEVELING = _UxGT("Управление UBL"); + LSTR MSG_MESH_LEVELING = _UxGT("Выравнивание сетки"); + #if LCD_WIDTH > 21 + LSTR MSG_MESH_DONE = _UxGT("Зондирование выполнено"); + #else + LSTR MSG_MESH_DONE = _UxGT("Зондиров. выполнено"); + #endif + + LSTR MSG_INFO_STATS_MENU = _UxGT("Статистика принтера"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Данные платы"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Термисторы"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Экструдеры"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Скорость,БОД"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Протокол"); + #if LCD_WIDTH > 21 + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Контроль утечки Т: Выкл"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Контроль утечки Т: Вкл"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Время простоя хотенда"); + #else + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Контр.утечки Т:Выкл"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Контр.утечки Т:Вкл"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Время прост.хот-а"); + #endif + LSTR MSG_CASE_LIGHT = _UxGT("Подсветка корпуса"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Яркость подсветки"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Неверный принтер"); + + #if LCD_WIDTH > 21 + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Счётчик печати"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Общее время печати"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Наидольшее задание"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Длина филамента"); + #else + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Напечатано"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Общее время"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Наидольшее"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Выдавлено"); + #endif + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Завершено"); + + LSTR MSG_INFO_MIN_TEMP = _UxGT("Мин. ") LCD_STR_THERMOMETER; + LSTR MSG_INFO_MAX_TEMP = _UxGT("Макс. ") LCD_STR_THERMOMETER; + LSTR MSG_INFO_PSU = _UxGT("БП"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Сила привода"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Привод, %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Привод, %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Привод, %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Привод, %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Привод, %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Привод, %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Привод, %"); + LSTR MSG_ERROR_TMC = _UxGT("СБОЙ СВЯЗИ С TMC"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Запись DAC в EEPROM"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("ЗАМЕНА ФИЛАМЕНТА"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("ПЕЧАТЬ НА ПАУЗЕ"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("ЗАГРУЗКА ФИЛАМЕНТА"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("ВЫГРУЗКА ФИЛАМЕНТА"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ОПЦИИ ПРОДОЛЖЕНИЯ:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Выдавить ещё"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Возобновить печать"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Сопла: "); + #if LCD_WIDTH > 21 + LSTR MSG_RUNOUT_SENSOR = _UxGT("Датчик оконч. филамента"); + #else + LSTR MSG_RUNOUT_SENSOR = _UxGT("Датчик оконч.филам."); + #endif + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("До конца, мм"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Ошибка парковки"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Ошибка зондирования"); + + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ВЫБИРЕТЕ ФИЛАМЕНТ"); + LSTR MSG_MMU2_MENU = _UxGT("Настройки MMU"); + #if LCD_WIDTH > 21 + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Обновить прошивку MMU!"); + #else + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Обнови прошивку MMU"); + #endif + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU требует внимания"); + LSTR MSG_MMU2_RESUME = _UxGT("Продолжить печать"); + LSTR MSG_MMU2_RESUMING = _UxGT("Продолжение..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Загрузить филамент"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Загрузить всё"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Загрузить в сопло"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Извлечь филамент"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Извлечь филамент ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Выгрузить филамент"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Загрузка %i..."); + #if LCD_WIDTH > 21 + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Извлечение филамента..."); + #else + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Извлеч.филамента..."); + #endif + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Выгрузка...."); + LSTR MSG_MMU2_ALL = _UxGT("Всё"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Филамент ~"); + LSTR MSG_MMU2_RESET = _UxGT("Перезапуск MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("Перезапуск MMU..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Удалите и нажмите"); + + #if LCD_WIDTH > 21 + LSTR MSG_MIX = _UxGT("Смешивание"); + #else + LSTR MSG_MIX = _UxGT("Смешив."); + #endif + LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент ="); + LSTR MSG_MIXER = _UxGT("Смеситель"); + LSTR MSG_GRADIENT = _UxGT("Градиент"); + LSTR MSG_FULL_GRADIENT = _UxGT("Полный градиент"); + LSTR MSG_CYCLE_MIX = _UxGT("Цикличное смешивание"); + LSTR MSG_GRADIENT_MIX = _UxGT("Градиент смешивания"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Сменить градиент"); + #if LCD_WIDTH > 21 + LSTR MSG_TOGGLE_MIX = _UxGT("Переключить смешивание"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Активация В-инструм."); + LSTR MSG_START_VTOOL = _UxGT("Начало В-инструмента"); + LSTR MSG_END_VTOOL = _UxGT("Конец В-инструмента"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Псевдоним В-инструмента"); + LSTR MSG_RESET_VTOOLS = _UxGT("Сброс В-инструментов"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Смешать В-инструменты"); + LSTR MSG_VTOOLS_RESET = _UxGT("В-инструменты сброшены"); + #else + LSTR MSG_TOGGLE_MIX = _UxGT("Перекл. смешивание"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Актив.В-инструм."); + LSTR MSG_START_VTOOL = _UxGT("В-инструм.нач."); + LSTR MSG_END_VTOOL = _UxGT("В-инструм.кон."); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Псевдоним В-инстр."); + LSTR MSG_RESET_VTOOLS = _UxGT("Сброс В-инструм."); + LSTR MSG_COMMIT_VTOOL = _UxGT("Смешать В-инструм."); + LSTR MSG_VTOOLS_RESET = _UxGT("В-инструм. сброшены"); + #endif + LSTR MSG_START_Z = _UxGT("Начало Z"); + LSTR MSG_END_Z = _UxGT(" Конец Z"); + + LSTR MSG_GAMES = _UxGT("Игры"); + LSTR MSG_BRICKOUT = _UxGT("Кирпичи"); + LSTR MSG_INVADERS = _UxGT("Вторжение"); + LSTR MSG_SNAKE = _UxGT("Змейка"); + LSTR MSG_MAZE = _UxGT("Лабиринт"); + + #if LCD_WIDTH > 21 + LSTR MSG_BAD_PAGE = _UxGT("Плохой индекс страницы"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Плохая скорость страницы"); + #else + LSTR MSG_BAD_PAGE = _UxGT("Плохая страница"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Плохая скор.стран."); + #endif + + LSTR MSG_EDIT_PASSWORD = _UxGT("Редактировать пароль"); + LSTR MSG_LOGIN_REQUIRED = _UxGT("Нужен логин"); + LSTR MSG_PASSWORD_SETTINGS = _UxGT("Настройки пароля"); + LSTR MSG_ENTER_DIGIT = _UxGT("Введите цифру"); + LSTR MSG_CHANGE_PASSWORD = _UxGT("Смените пароль"); + LSTR MSG_REMOVE_PASSWORD = _UxGT("Удалить пароль"); + LSTR MSG_PASSWORD_SET = _UxGT("Пароль это "); + LSTR MSG_START_OVER = _UxGT("Старт через"); + #if LCD_WIDTH > 21 + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Запомни для сохранения!"); + #else + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Запомни, сохрани!"); + #endif + LSTR MSG_PASSWORD_REMOVED = _UxGT("Пароль удалён"); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Парковка...")); // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Парковка...")); #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_3_LINE("Нажмите кнопку", "для продолжения", "печати")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("Ожидайте начала", "смены филамента")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Вставьте филамент", "и нажмите кнопку", "для продолжения")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_3_LINE("Нажмите кнопку", "для нагрева", "сопла...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Нагрев сопла", "Ждите...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Ожидайте", "выгрузки", "филамента")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Ожидайте", "загрузки", "филамента")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_3_LINE("Ожидайте", "экструзии", "филамента")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Нажмите кнопку", "для завершения", "очистки филамента")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Ожидайте", "возобновления", "печати")); - #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Продолжить печать")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Ожидайте...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Вставь и нажми")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Нагреть сопло")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Нагрев...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Выгрузка...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Загрузка...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Выдавливание...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Завершить очистку")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Возобновление...")); - #endif - - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("Драйвера TMC"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Ток двигателей"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Гибридный режим"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Режим без эндстопов"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Режим драйвера"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("Тихий режим вкл"); - - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Сброс"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" в:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Люфт"); - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Исправление"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Сглаживание"); - - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Уровень оси X"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Авто калибровка"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Время нагревателя вышло"); - #else - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Время нагрев. вышло"); - #endif - PROGMEM Language_Str MSG_REHEAT = _UxGT("Возобновить нагрев"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Нагрев..."); - - PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Мастер Z-зонда"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Зондиров. контрольной точки Z"); - PROGMEM Language_Str MSG_PROBE_WIZARD_MOVING = _UxGT("Движение к точке зондирования"); - #else - PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Зондир.контр.точки Z"); - PROGMEM Language_Str MSG_PROBE_WIZARD_MOVING = _UxGT("Движ. к точке зондир."); - #endif - - PROGMEM Language_Str MSG_SOUND = _UxGT("Звук"); - - PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Верхний левый"); - PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Нижний левый"); - PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Верхний правый"); - PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Нижний правый"); - PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Калибровка успешна"); - PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Ошибка калибровки"); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_3_LINE("Нажмите кнопку", "для продолжения", "печати")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_2_LINE("Ожидайте начала", "смены филамента")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Вставьте филамент", "и нажмите кнопку", "для продолжения")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_3_LINE("Нажмите кнопку", "для нагрева", "сопла...")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Нагрев сопла", "Ждите...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Ожидайте", "выгрузки", "филамента")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Ожидайте", "загрузки", "филамента")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_3_LINE("Ожидайте", "экструзии", "филамента")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Нажмите кнопку", "для завершения", "очистки филамента")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Ожидайте", "возобновления", "печати")); + #else + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Продолжить печать")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Ожидайте...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Вставь и нажми")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Нагреть сопло")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Нагрев...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Выгрузка...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Загрузка...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Выдавливание...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Завершить очистку")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Возобновление...")); + #endif + + LSTR MSG_TMC_DRIVERS = _UxGT("Драйвера TMC"); + LSTR MSG_TMC_CURRENT = _UxGT("Ток двигателей"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Гибридный режим"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Режим без эндстопов"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Режим драйвера"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("Тихий режим вкл"); + + LSTR MSG_SERVICE_RESET = _UxGT("Сброс"); + LSTR MSG_SERVICE_IN = _UxGT(" в:"); + LSTR MSG_BACKLASH = _UxGT("Люфт"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Исправление"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Сглаживание"); + + LSTR MSG_LEVEL_X_AXIS = _UxGT("Уровень оси X"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Авто калибровка"); + #if LCD_WIDTH > 21 + LSTR MSG_HEATER_TIMEOUT = _UxGT("Время нагревателя вышло"); + #else + LSTR MSG_HEATER_TIMEOUT = _UxGT("Время нагрев. вышло"); + #endif + LSTR MSG_REHEAT = _UxGT("Возобновить нагрев"); + LSTR MSG_REHEATING = _UxGT("Нагрев..."); + + LSTR MSG_PROBE_WIZARD = _UxGT("Мастер Z-зонда"); + #if LCD_WIDTH > 21 + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Зондиров. контр. точки Z"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Движение к точке зондиров."); + #else + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Зондир.контр.точки Z"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Движ. к точке зондир."); + #endif + + LSTR MSG_SOUND = _UxGT("Звук"); + + LSTR MSG_TOP_LEFT = _UxGT("Верхний левый"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Нижний левый"); + LSTR MSG_TOP_RIGHT = _UxGT("Верхний правый"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Нижний правый"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Калибровка успешна"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Ошибка калибровки"); + + LSTR MSG_DRIVER_BACKWARD = _UxGT(" драйвер назад"); + + LSTR MSG_SD_CARD = _UxGT("SD Карта"); + LSTR MSG_USB_DISK = _UxGT("USB Диск"); } #if FAN_COUNT == 1 diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index 1900f5371945..3a9eb23a8f3b 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -30,632 +30,717 @@ * * Translated by Michal Holeš, Farma MaM * https://www.facebook.com/farmamam + * + * Substitutions are applied for the following characters when used + * in menu items that call lcd_put_u8str_ind_P with an index: + * + * = displays '0'....'10' for indexes 0 - 10 + * ~ displays '1'....'11' for indexes 0 - 10 + * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) */ #define DISPLAY_CHARSET_ISO10646_SK namespace Language_sk { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Slovak"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Slovenčina"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" pripravená."); - PROGMEM Language_Str MSG_YES = _UxGT("ÁNO"); - PROGMEM Language_Str MSG_NO = _UxGT("NIE"); - PROGMEM Language_Str MSG_BACK = _UxGT("Naspäť"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Ruším..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Karta vložená"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Karta vybraná"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Čakám na kartu"); - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("Inicial. SD zlyhala"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Chyba čítania karty"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB zaria. odstrán."); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Chyba spúšťania USB"); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Preteč. podprogramu"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Endstopy"); // max 8 znakov - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft. endstopy"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Hlavná ponuka"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Pokročilé nastav."); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Konfigurácia"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Auto-štart"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Uvolniť motory"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Ponuka ladenia"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Test uk. priebehu"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Domovská pozícia"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Domov os X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Domov os Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Domov os Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto-zarovn. Z"); - PROGMEM Language_Str MSG_ITERATION = _UxGT("Iterácia G34: %i"); - PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Klesajúca presnosť!"); - PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Dosiahnutá presnosť"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Parkovanie XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Kliknutím začnete"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Ďalší bod"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Vyrovnanie hotové!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Výška rovnania"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Nastaviť ofsety"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofsety nastavené"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Nastaviť začiatok"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Asist. vyrovnanie"); - PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Spriev. vyrovn."); - PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Vyberte začiatok"); - PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Posl. hodnota "); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" pripravená."); + LSTR MSG_YES = _UxGT("ÁNO"); + LSTR MSG_NO = _UxGT("NIE"); + LSTR MSG_BACK = _UxGT("Naspäť"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Ruším..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Karta vložená"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Karta vybraná"); + LSTR MSG_MEDIA_WAITING = _UxGT("Čakám na kartu"); + LSTR MSG_SD_INIT_FAIL = _UxGT("Inicial. SD zlyhala"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Chyba čítania karty"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB zaria. odstrán."); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Chyba spúšťania USB"); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Preteč. podprogramu"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Endstopy"); // max 8 znakov + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Soft. endstopy"); + LSTR MSG_MAIN = _UxGT("Hlavná ponuka"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Pokročilé nastav."); + LSTR MSG_CONFIGURATION = _UxGT("Konfigurácia"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Auto-štart"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Uvolniť motory"); + LSTR MSG_DEBUG_MENU = _UxGT("Ponuka ladenia"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Test uk. priebehu"); + LSTR MSG_HOMING = _UxGT("Parkovanie"); + LSTR MSG_AUTO_HOME = _UxGT("Domovská pozícia"); + LSTR MSG_AUTO_HOME_X = _UxGT("Domov os X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Domov os Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Domov os Z"); + LSTR MSG_AUTO_HOME_I = _UxGT("Domov os ") LCD_STR_I; + LSTR MSG_AUTO_HOME_J = _UxGT("Domov os ") LCD_STR_J; + LSTR MSG_AUTO_HOME_K = _UxGT("Domov os ") LCD_STR_K; + LSTR MSG_FILAMENT_SET = _UxGT("Nastav. filamentu"); + LSTR MSG_FILAMENT_MAN = _UxGT("Správa filamentu"); + LSTR MSG_LEVBED_FL = _UxGT("Ľavý predný"); + LSTR MSG_LEVBED_FR = _UxGT("Pravý predný"); + LSTR MSG_LEVBED_C = _UxGT("Stred"); + LSTR MSG_LEVBED_BL = _UxGT("Ľavý zadný"); + LSTR MSG_LEVBED_BR = _UxGT("Pravý zadný"); + LSTR MSG_MANUAL_MESH = _UxGT("Ručná mriežka"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto-zarovn. Z"); + LSTR MSG_ITERATION = _UxGT("Iterácia G34: %i"); + LSTR MSG_DECREASING_ACCURACY = _UxGT("Klesajúca presnosť!"); + LSTR MSG_ACCURACY_ACHIEVED = _UxGT("Dosiahnutá presnosť"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Parkovanie XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Kliknutím začnete"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Ďalší bod"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Vyrovnanie hotové!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Výška rovnania"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Nastav. dom. ofsety"); + LSTR MSG_HOME_OFFSET_X = _UxGT("X Ofset"); + LSTR MSG_HOME_OFFSET_Y = _UxGT("Y Ofset"); + LSTR MSG_HOME_OFFSET_Z = _UxGT("Z Ofset"); + LSTR MSG_HOME_OFFSET_I = LCD_STR_I _UxGT(" Ofset"); + LSTR MSG_HOME_OFFSET_J = LCD_STR_J _UxGT(" Ofset"); + LSTR MSG_HOME_OFFSET_K = LCD_STR_K _UxGT(" Ofset"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofsety nastavené"); + LSTR MSG_SET_ORIGIN = _UxGT("Nastaviť začiatok"); + LSTR MSG_TRAMMING_WIZARD = _UxGT("Spriev. vyrovn."); + LSTR MSG_SELECT_ORIGIN = _UxGT("Vyberte začiatok"); + LSTR MSG_LAST_VALUE_SP = _UxGT("Posl. hodnota "); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Zahriať ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Zahriať ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" hotend"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" hotend ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" všetko"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" podlož"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" nast."); + LSTR MSG_PREHEAT_1 = _UxGT("Zahriať ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Zahriať ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" hotend"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" hotend ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" všetko"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" podlož"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Zahriať ") PREHEAT_1_LABEL _UxGT(" nast."); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Zahriať $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Zahriať $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Zahriať $ hotend"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Zahriať $ hotend ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Zahriať $ všetko"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Zahriať $ podlož"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Zahriať $ nast."); + LSTR MSG_PREHEAT_M = _UxGT("Zahriať $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Zahriať $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Zahriať $ hotend"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Zahriať $ hotend ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Zahriať $ všetko"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Zahriať $ podlož"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Zahriať $ nast."); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Vlastná teplota"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Schladiť"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frekvencia"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Nastavenie lasera"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Výkon lasera"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Nastavenie vretena"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Výkon vretena"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Spätný chod"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Zapnúť napájanie"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Vypnúť napájanie"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Vytlačiť (extr.)"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Vytiahnuť (retr.)"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Posunúť osy"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Vyrovnanie podložky"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Vyrovnať podložku"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Vyrovnať rohy"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Ďalší roh"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Editor sieťe bodov"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Upraviť sieť bodov"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Koniec úprav siete"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Skúšam bod"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Hodnota Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Vlastné príkazy"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Test sondy"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Bod"); - PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Sonda mimo hraníc"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Odchýlka"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX režim"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Ofset nástrojov"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-parkovanie"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplikácia"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Zrkadlená kópia"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Plná kontrola"); - PROGMEM Language_Str MSG_IDEX_DUPE_GAP = _UxGT("Duplik. medz.-X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2. tryska X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2. tryska Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2. tryska Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Vykonávam G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Nástroje UBL"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("UBL rovnanie"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Vyrovnávam bod"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Manuálna sieť bodov"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Položte a zmerajte"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Zmerajte"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Odstráňte a zmerajte"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Presun na ďalší"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Aktivovať UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Deaktivovať UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Teplota podložky"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Teplota podložky"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Teplota hotendu"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Teplota hotendu"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Úprava siete bodov"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Upraviť vlastnú sieť"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Doladiť sieť bodov"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Koniec úprav siete"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Vlastná sieť"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Vytvoriť sieť"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Sieť bodov ($)"); - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Studená sieť bodov"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Upraviť výšku siete"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Výška"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Skontrolovať sieť"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Kontrola siete ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Kontrola vlast.siete"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 ohrev podlž."); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 ohrev trysky"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Ručné čistenie..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Čistenie pevn. dĺž."); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Čistenie dokončené"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 zrušený"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Opúšťam G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Pokračovať v sieti"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Sieťové rovnanie"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-bodové rovnanie"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Mriežkové rovnanie"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Vyrovnať podložku"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Postranné body"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Typ siete bodov"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Exportovať sieť"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Export do hosta"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Export do CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Externá záloha"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Info. o výst. UBL"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Hustota mriežky"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Ručné vyplnenie"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Chytré vyplnenie"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Vyplniť mriežku"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Zrušiť všetko"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Zrušiť najbližší"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Upraviť všetky"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Upraviť najbližší"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Úložisko sietí"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Pamäťový slot"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Načítať sieť bodov"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Uložiť sieť bodov"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Sieť %i načítaná"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Sieť %i uložená"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Nedostatok miesta"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Chyba: Ukladanie UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Chyba: Obnovenie UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Ofset: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Koniec kompenz. Z"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Postupné UBL"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Studená sieť bodov"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Chytré vyplnenie"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Skontrolovať sieť"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Upraviť všetky"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Skontrolovať sieť"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Upraviť všetky"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Uložiť sieť bodov"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Vlastná teplota"); + LSTR MSG_COOLDOWN = _UxGT("Schladiť"); + + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frekvencia"); + LSTR MSG_LASER_MENU = _UxGT("Nastavenie lasera"); + LSTR MSG_SPINDLE_MENU = _UxGT("Nastavenie vretena"); + LSTR MSG_LASER_POWER = _UxGT("Výkon lasera"); + LSTR MSG_SPINDLE_POWER = _UxGT("Výkon vretena"); + LSTR MSG_LASER_TOGGLE = _UxGT("Prepnúť laser"); + LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Prepnúť odsávanie"); + LSTR MSG_LASER_ASSIST_TOGGLE = _UxGT("Prepnúť ofuk"); + LSTR MSG_LASER_PULSE_MS = _UxGT("Test. impulz ms"); + LSTR MSG_LASER_FIRE_PULSE = _UxGT("Vystreliť impulz"); + LSTR MSG_FLOWMETER_FAULT = _UxGT("Chyba chladenia"); + LSTR MSG_SPINDLE_TOGGLE = _UxGT("Prepnúť vreteno"); + LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Prepnúť odsávanie"); + LSTR MSG_SPINDLE_FORWARD = _UxGT("Dopredný chod"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Spätný chod"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Zapnúť napájanie"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Vypnúť napájanie"); + LSTR MSG_EXTRUDE = _UxGT("Vytlačiť (extr.)"); + LSTR MSG_RETRACT = _UxGT("Vytiahnuť (retr.)"); + LSTR MSG_MOVE_AXIS = _UxGT("Posunúť osy"); + LSTR MSG_BED_LEVELING = _UxGT("Vyrovnanie podložky"); + LSTR MSG_LEVEL_BED = _UxGT("Vyrovnať podložku"); + LSTR MSG_BED_TRAMMING = _UxGT("Vyrovnať rohy"); + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Zdvyhnite podl., kým sa nezopne sonda"); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Rohy sú vrámci odchyl. Vyrovnajte podl."); + LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Dobré body: "); + LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Posl. Z: "); + LSTR MSG_NEXT_CORNER = _UxGT("Ďalší roh"); + LSTR MSG_MESH_EDITOR = _UxGT("Editor sieťe bodov"); + LSTR MSG_EDIT_MESH = _UxGT("Upraviť sieť bodov"); + LSTR MSG_EDITING_STOPPED = _UxGT("Koniec úprav siete"); + LSTR MSG_PROBING_POINT = _UxGT("Skúšam bod"); + LSTR MSG_MESH_X = _UxGT("Index X"); + LSTR MSG_MESH_Y = _UxGT("Index Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Hodnota Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Vlastné príkazy"); + LSTR MSG_M48_TEST = _UxGT("M48 Test sondy"); + LSTR MSG_M48_POINT = _UxGT("M48 Bod"); + LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Sonda mimo hraníc"); + LSTR MSG_M48_DEVIATION = _UxGT("Odchýlka"); + LSTR MSG_IDEX_MENU = _UxGT("IDEX režim"); + LSTR MSG_OFFSETS_MENU = _UxGT("Ofset nástrojov"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-parkovanie"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplikácia"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Zrkadlená kópia"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Plná kontrola"); + LSTR MSG_IDEX_DUPE_GAP = _UxGT("Duplik. medz.-X"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2. tryska X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2. tryska Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. tryska Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Vykonávam G29"); + LSTR MSG_UBL_TOOLS = _UxGT("Nástroje UBL"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("UBL rovnanie"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Vyrovnávam bod"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Manuálna sieť bodov"); + LSTR MSG_UBL_MESH_WIZARD = _UxGT("Spriev. UBL rovnan."); + LSTR MSG_UBL_BC_INSERT = _UxGT("Položte a zmerajte"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Zmerajte"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Odstráňte a zmerajte"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Presun na ďalší"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Aktivovať UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Deaktivovať UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Teplota podložky"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Teplota podložky"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Teplota hotendu"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Teplota hotendu"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Úprava siete bodov"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Upraviť vlastnú sieť"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Doladiť sieť bodov"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Koniec úprav siete"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Vlastná sieť"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Vytvoriť sieť"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Sieť bodov ($)"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Studená sieť bodov"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Upraviť výšku siete"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Výška"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Skontrolovať sieť"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Kontrola siete ($)"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Kontrola vlast.siete"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 ohrev podlž."); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 ohrev trysky"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Ručné čistenie..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Čistenie pevn. dĺž."); + LSTR MSG_G26_PRIME_DONE = _UxGT("Čistenie dokončené"); + LSTR MSG_G26_CANCELED = _UxGT("G26 zrušený"); + LSTR MSG_G26_LEAVING = _UxGT("Opúšťam G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Pokračovať v sieti"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Sieťové rovnanie"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-bodové rovnanie"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Mriežkové rovnanie"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Vyrovnať podložku"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Postranné body"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Typ siete bodov"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Exportovať sieť"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Export do hosta"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Export do CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Externá záloha"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Info. o výst. UBL"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Hustota mriežky"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Ručné vyplnenie"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Chytré vyplnenie"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Vyplniť mriežku"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Zrušiť všetko"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Zrušiť najbližší"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Upraviť všetky"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Upraviť najbližší"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Úložisko sietí"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Pamäťový slot"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Načítať sieť bodov"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Uložiť sieť bodov"); + LSTR MSG_MESH_LOADED = _UxGT("Sieť %i načítaná"); + LSTR MSG_MESH_SAVED = _UxGT("Sieť %i uložená"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Nedostatok miesta"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Chyba: Ukladanie UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Chyba: Obnovenie UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Ofset: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Koniec kompenz. Z"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Postupné UBL"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Studená sieť bodov"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Chytré vyplnenie"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Skontrolovať sieť"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Upraviť všetky"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Skontrolovať sieť"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Upraviť všetky"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Uložiť sieť bodov"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Nastavenie LED"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Svetlo"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Predvolby svetla"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Červená"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Oranžová"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Žltá"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Zelená"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Modrá"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Fialová"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Biela"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Obnoviť nastavenie"); - PROGMEM Language_Str MSG_LED_CHANNEL_N = _UxGT("Kanál ="); - PROGMEM Language_Str MSG_LEDS2 = _UxGT("Svetlo #2"); - PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Predvolby svetla #2"); - PROGMEM Language_Str MSG_NEO2_BRIGHTNESS = _UxGT("Jas"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Vlastná farba"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Inten. červenej"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Inten. zelenej"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Inten. modrej"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Inten. bielej"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Jas"); + LSTR MSG_LED_CONTROL = _UxGT("Nastavenie LED"); + LSTR MSG_LEDS = _UxGT("Svetlo"); + LSTR MSG_LED_PRESETS = _UxGT("Predvolby svetla"); + LSTR MSG_SET_LEDS_RED = _UxGT("Červená"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Oranžová"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Žltá"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Zelená"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Modrá"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Fialová"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Biela"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Obnoviť nastavenie"); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanál ="); + LSTR MSG_LEDS2 = _UxGT("Svetlo #2"); + LSTR MSG_NEO2_PRESETS = _UxGT("Predvolby svetla #2"); + LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Jas"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Vlastná farba"); + LSTR MSG_INTENSITY_R = _UxGT("Inten. červenej"); + LSTR MSG_INTENSITY_G = _UxGT("Inten. zelenej"); + LSTR MSG_INTENSITY_B = _UxGT("Inten. modrej"); + LSTR MSG_INTENSITY_W = _UxGT("Inten. bielej"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Jas"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Posúvam..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Uvolniť XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Posunúť X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Posunúť Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Posunúť Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extrudér"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extrudér *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Hotend je studený"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Posunúť o %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Posunúť o 0,1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Posunúť o 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Posunúť o 10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Rýchlosť"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Výška podl."); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Tryska"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Tryska ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Tryska zaparkovaná"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Záložná tryska"); - PROGMEM Language_Str MSG_BED = _UxGT("Podložka"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Komora"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Rýchlosť vent."); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Rýchlosť vent. ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Ulož. vent. ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Rýchlosť ex. vent."); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Rýchlosť ex. vent. ~"); - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Vent. riad. jedn."); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Voľno. rýchl."); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto-režim"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktív. rýchl."); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Doba nečinnosti"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Prietok"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Prietok ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Ovládanie"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fakt"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Auto-teplota"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Zap"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Vyp"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID kalibrácia"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID kalibrácia *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID kal. dokončená"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Auto-kal. zlyhala. Zlý extrúder."); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-kal. zlyhala. Príliš vysoká tepl."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Auto-kal. zlyhala! Čas vypršal."); - PROGMEM Language_Str MSG_SELECT = _UxGT("Vybrať"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Vybrať *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Zrýchlenie"); - PROGMEM Language_Str MSG_JERK = _UxGT("Skok"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-skok"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-skok"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-skok"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-skok"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Rýchlosť"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VPrej Min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Akcelerácia"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-retrakt"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-prejazd"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Max. frekvencia"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min. posun"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Kroky/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("krokov/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("krokov/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("krokov/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("Ekrokov/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("*krokov/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Teplota"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Pohyb"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filament"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E v mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit v mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Priem. fil."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Priem. fil. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Vysunúť mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Zaviesť mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("K pre posun"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("K pre posun *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Kontrast LCD"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Uložiť nastavenie"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Načítať nastavenie"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Obnoviť nastavenie"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Inicializ. EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("Chyba: EEPROM CRC"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("Chyba: EEPROM Index"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("Chyba: Verzia EEPROM"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Nastavenie uložené"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Aktualizovať z SD"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Reštart. tlačiar."); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Obnoviť"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info. obrazovka"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Príprava tlače"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Doladenie tlače"); - PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("Monitor napájania"); - PROGMEM Language_Str MSG_CURRENT = _UxGT("Prúd"); - PROGMEM Language_Str MSG_VOLTAGE = _UxGT("Napätie"); - PROGMEM Language_Str MSG_POWER = _UxGT("Výkon"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Spustiť tlač"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Ďalší"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Inicial."); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Zastaviť"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Tlačiť"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Vynulovať"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("Ignorovať"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Zrušiť"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Hotovo"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Naspäť"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Pokračovať"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("Pozastavujem..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pozastaviť tlač"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Obnoviť tlač"); - PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Spustiť z hosta"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Zastaviť tlač"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Tlačím objekt"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Zrušiť objekt"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť objekt ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Obnova po výp. nap."); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Tlačiť z SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Žiadna SD karta"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Spím..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Pokrač. kliknutím..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Tlač pozastavená"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Tlačím..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Tlač zrušená"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Tlač dokončená"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Žiadny pohyb."); - PROGMEM Language_Str MSG_KILLED = _UxGT("PRERUŠENÉ. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ZASTAVENÉ. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Retrakt mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Výmena Re.mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Retraktovať V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Zdvih Z mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto-Retract"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Dĺžka výmeny"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Vymeniť naviac"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Dĺžka vytlačenia"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Výmena nástroja"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Zdvihnúť Z"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Primárna rýchl."); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Rýchl. retrakcie"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Parkovať hlavu"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Rýchl. obnovenia"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Rýchlosť vent."); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Doba fúkania"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto-Zap"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto-Vyp"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Výmena nástroja"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-výmena"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Posl. extruder"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Vymeniť za *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Vymeniť filament"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Vymeniť filament *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Zaviesť filament"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Zaviesť filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Vysunúť filament"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Vysunúť filament *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Vysunúť všetko"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Načítať SD kartu"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Vymeniť SD kartu"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Odpojiť SD kartu"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Sonda Z mimo podl."); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Faktor skosenia"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Self-Test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Zasunúť"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Vysunúť"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("Režim SW"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("Režim 5V"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("Režim OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Ulož. režim"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Prepnúť do 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Prepnúť do OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Zobraziť režim"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("POZOR: Zlé nastav. môže spôsobiť poškoden. Pokračovať?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Inicializ. TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Test Z ofsetu"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Uložiť"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Zasunúť TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Zasunúť sondu Z"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Vysunúť sondu Z"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Najskôr os %s%s%s domov"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Ofsety sondy Z"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("X ofset"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Y ofset"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Z ofset"); - PROGMEM Language_Str MSG_MOVE_NOZZLE_TO_BED = _UxGT("Pos. trysku k podl."); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Babystep X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Babystep Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Babystep Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Celkom"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Zastavenie Endstop"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Chyba ohrevu"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Chyba: REDUND. TEP."); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("TEPLOTNÝ SKOK"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("TEPLOTNÝ SKOK PODL."); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("TEPLOTNÝ SKOK KOMO."); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Chyba: MAXTEMP"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Chyba: MINTEMP"); - PROGMEM Language_Str MSG_HALTED = _UxGT("TLAČIAREŇ ZASTAVENÁ"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Reštartuje ju"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("h"); - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); - PROGMEM Language_Str MSG_HEATING = _UxGT("Ohrev..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Ochladzovanie..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Ohrev podložky..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Ochladz. podložky..."); - PROGMEM Language_Str MSG_PROBE_HEATING = _UxGT("Ohrev sondy..."); - PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Ochladz. sondy..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Ohrev komory..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Ochladz. komory..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta kalibrácia"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibrovať X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibrovať Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibrovať Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibrovať stred"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta nastavenia"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto-kalibrácia"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Nast. výšku delty"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Ofset sondy Z"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diag. rameno"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Výška"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Polomer"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("O tlačiarni"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Info. o tlačiarni"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-bodové rovnanie"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Lineárne rovnanie"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilineárne rovnanie"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("UBL rovnanie"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Mriežkové rovnanie"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Štatistika"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Info. o doske"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistory"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extrudéry"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Rýchlosť"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokol"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Tepl. ochrana: VYP"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Tepl. ochrana: ZAP"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Vypr.čas nečinnosti"); + LSTR MSG_MOVING = _UxGT("Posúvam..."); + LSTR MSG_FREE_XY = _UxGT("Uvolniť XY"); + LSTR MSG_MOVE_X = _UxGT("Posunúť X"); + LSTR MSG_MOVE_Y = _UxGT("Posunúť Y"); + LSTR MSG_MOVE_Z = _UxGT("Posunúť Z"); + LSTR MSG_MOVE_I = _UxGT("Posunúť ") LCD_STR_I; + LSTR MSG_MOVE_J = _UxGT("Posunúť ") LCD_STR_J; + LSTR MSG_MOVE_K = _UxGT("Posunúť ") LCD_STR_K; + LSTR MSG_MOVE_E = _UxGT("Extrudér"); + LSTR MSG_MOVE_EN = _UxGT("Extrudér *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Hotend je studený"); + LSTR MSG_MOVE_N_MM = _UxGT("Posunúť o %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Posunúť o 0,1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Posunúť o 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Posunúť o 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Posunúť o 100mm"); + LSTR MSG_MOVE_0001IN = _UxGT("Posunúť o 0,001in"); + LSTR MSG_MOVE_001IN = _UxGT("Posunúť o 0,01in"); + LSTR MSG_MOVE_01IN = _UxGT("Posunúť o 0,1in"); + LSTR MSG_MOVE_1IN = _UxGT("Posunúť o 1,0in"); + LSTR MSG_SPEED = _UxGT("Rýchlosť"); + LSTR MSG_MAXSPEED = _UxGT("Max rýchl. (mm/s)"); + LSTR MSG_MAXSPEED_X = _UxGT("Max rýchl. ") LCD_STR_A; + LSTR MSG_MAXSPEED_Y = _UxGT("Max rýchl. ") LCD_STR_B; + LSTR MSG_MAXSPEED_Z = _UxGT("Max rýchl. ") LCD_STR_C; + LSTR MSG_MAXSPEED_E = _UxGT("Max rýchl. ") LCD_STR_E; + LSTR MSG_BED_Z = _UxGT("Výška podl."); + LSTR MSG_NOZZLE = _UxGT("Tryska"); + LSTR MSG_NOZZLE_N = _UxGT("Tryska ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Tryska zaparkovaná"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Záložná tryska"); + LSTR MSG_BED = _UxGT("Podložka"); + LSTR MSG_CHAMBER = _UxGT("Komora"); + LSTR MSG_COOLER = _UxGT("Chladen. lasera"); + LSTR MSG_COOLER_TOGGLE = _UxGT("Prepnúť chladenie"); + LSTR MSG_FLOWMETER_SAFETY = _UxGT("Bezpeč. prietok"); + LSTR MSG_LASER = _UxGT("Laser"); + LSTR MSG_FAN_SPEED = _UxGT("Rýchlosť vent."); + LSTR MSG_FAN_SPEED_N = _UxGT("Rýchlosť vent. ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Ulož. vent. ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Rýchlosť ex. vent."); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Rýchlosť ex. vent. ~"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Vent. riad. jedn."); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Voľno. rýchl."); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto-režim"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktív. rýchl."); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Doba nečinnosti"); + LSTR MSG_FLOW = _UxGT("Prietok"); + LSTR MSG_FLOW_N = _UxGT("Prietok ~"); + LSTR MSG_CONTROL = _UxGT("Ovládanie"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fakt"); + LSTR MSG_AUTOTEMP = _UxGT("Auto-teplota"); + LSTR MSG_LCD_ON = _UxGT("Zap"); + LSTR MSG_LCD_OFF = _UxGT("Vyp"); + LSTR MSG_PID_AUTOTUNE = _UxGT("Kalibrácia PID"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("Kalibrácia PID *"); + LSTR MSG_PID_CYCLE = _UxGT("Cykly PID"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Kal. PID dokončená"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Auto-kal. zlyhala. Zlý extrúder."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Auto-kal. zlyhala. Príliš vysoká tepl."); + LSTR MSG_PID_TIMEOUT = _UxGT("Auto-kal. zlyhala! Čas vypršal."); + LSTR MSG_SELECT = _UxGT("Vybrať"); + LSTR MSG_SELECT_E = _UxGT("Vybrať *"); + LSTR MSG_ACC = _UxGT("Zrýchlenie"); + LSTR MSG_JERK = _UxGT("Skok"); + LSTR MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-skok"); + LSTR MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-skok"); + LSTR MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-skok"); + LSTR MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-skok"); + LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-skok"); + LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-skok"); + LSTR MSG_VE_JERK = _UxGT("Ve-skok"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Junction Dev"); + LSTR MSG_VELOCITY = _UxGT("Rýchlosť"); + LSTR MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Vmax ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Vmax ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Vmax ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Vmax *"); + LSTR MSG_VMIN = _UxGT("Vmin"); + LSTR MSG_VTRAV_MIN = _UxGT("VPrej Min"); + LSTR MSG_ACCELERATION = _UxGT("Akcelerácia"); + LSTR MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Amax ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Amax ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Amax ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Amax *"); + LSTR MSG_A_RETRACT = _UxGT("A-retrakt"); + LSTR MSG_A_TRAVEL = _UxGT("A-prejazd"); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Max. frekvencia"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min. posun"); + LSTR MSG_STEPS_PER_MM = _UxGT("Kroky/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" krokov/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" krokov/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" krokov/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" krokov/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" krokov/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" krokov/mm"); + LSTR MSG_E_STEPS = _UxGT("Ekrokov/mm"); + LSTR MSG_EN_STEPS = _UxGT("*krokov/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Teplota"); + LSTR MSG_MOTION = _UxGT("Pohyb"); + LSTR MSG_FILAMENT = _UxGT("Filament"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E v mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E Limit v mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Limit *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Priem. fil."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Priem. fil. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Vysunúť mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Zaviesť mm"); + LSTR MSG_ADVANCE_K = _UxGT("K pre posun"); + LSTR MSG_ADVANCE_K_E = _UxGT("K pre posun *"); + LSTR MSG_CONTRAST = _UxGT("Kontrast LCD"); + LSTR MSG_STORE_EEPROM = _UxGT("Uložiť nastavenie"); + LSTR MSG_LOAD_EEPROM = _UxGT("Načítať nastavenie"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Obnoviť nastavenie"); + LSTR MSG_INIT_EEPROM = _UxGT("Inicializ. EEPROM"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("Chyba: EEPROM CRC"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Chyba: EEPROM Index"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Chyba: Verzia EEPROM"); + LSTR MSG_SETTINGS_STORED = _UxGT("Nastavenie uložené"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Aktualizovať z SD"); + LSTR MSG_RESET_PRINTER = _UxGT("Reštart. tlačiar."); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Obnoviť"); + LSTR MSG_INFO_SCREEN = _UxGT("Info. obrazovka"); + LSTR MSG_PREPARE = _UxGT("Príprava tlače"); + LSTR MSG_TUNE = _UxGT("Doladenie tlače"); + LSTR MSG_POWER_MONITOR = _UxGT("Monitor napájania"); + LSTR MSG_CURRENT = _UxGT("Prúd"); + LSTR MSG_VOLTAGE = _UxGT("Napätie"); + LSTR MSG_POWER = _UxGT("Výkon"); + LSTR MSG_START_PRINT = _UxGT("Spustiť tlač"); + LSTR MSG_BUTTON_NEXT = _UxGT("Ďalší"); + LSTR MSG_BUTTON_INIT = _UxGT("Inicial."); + LSTR MSG_BUTTON_STOP = _UxGT("Zastaviť"); + LSTR MSG_BUTTON_PRINT = _UxGT("Tlačiť"); + LSTR MSG_BUTTON_RESET = _UxGT("Vynulovať"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Ignorovať"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Zrušiť"); + LSTR MSG_BUTTON_DONE = _UxGT("Hotovo"); + LSTR MSG_BUTTON_BACK = _UxGT("Naspäť"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Pokračovať"); + LSTR MSG_BUTTON_SKIP = _UxGT("Preskočiť"); + LSTR MSG_PAUSING = _UxGT("Pozastavujem..."); + LSTR MSG_PAUSE_PRINT = _UxGT("Pozastaviť tlač"); + LSTR MSG_RESUME_PRINT = _UxGT("Obnoviť tlač"); + LSTR MSG_HOST_START_PRINT = _UxGT("Spustiť z hosta"); + LSTR MSG_STOP_PRINT = _UxGT("Zastaviť tlač"); + LSTR MSG_END_LOOPS = _UxGT("Koniec opak. sluč."); + LSTR MSG_PRINTING_OBJECT = _UxGT("Tlačím objekt"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Zrušiť objekt"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Zrušiť objekt ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Obnova po výp. nap."); + LSTR MSG_MEDIA_MENU = _UxGT("Tlačiť z SD"); + LSTR MSG_NO_MEDIA = _UxGT("Žiadna SD karta"); + LSTR MSG_DWELL = _UxGT("Spím..."); + LSTR MSG_USERWAIT = _UxGT("Pokrač. kliknutím..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Tlač pozastavená"); + LSTR MSG_PRINTING = _UxGT("Tlačím..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Tlač zrušená"); + LSTR MSG_PRINT_DONE = _UxGT("Tlač dokončená"); + LSTR MSG_NO_MOVE = _UxGT("Žiadny pohyb."); + LSTR MSG_KILLED = _UxGT("PRERUŠENÉ. "); + LSTR MSG_STOPPED = _UxGT("ZASTAVENÉ. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Retrakt mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Výmena Re.mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Retraktovať V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Zdvih Z mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto-Retract"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Dĺžka výmeny"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Vymeniť naviac"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Dĺžka vytlačenia"); + LSTR MSG_TOOL_CHANGE = _UxGT("Výmena nástroja"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Zdvihnúť Z"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Primárna rýchl."); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Rýchl. retrakcie"); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Parkovať hlavu"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Rýchl. obnovenia"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Rýchlosť vent."); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Doba fúkania"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto-Zap"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Auto-Vyp"); + LSTR MSG_TOOL_MIGRATION = _UxGT("Výmena nástroja"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-výmena"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Posl. extruder"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Vymeniť za *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Vymeniť filament"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Vymeniť filament *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Zaviesť filament"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Zaviesť filament *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Vysunúť filament"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Vysunúť filament *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Vysunúť všetko"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Načítať SD kartu"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Vymeniť SD kartu"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Odpojiť SD kartu"); + LSTR MSG_ZPROBE_OUT = _UxGT("Sonda Z mimo podl."); + LSTR MSG_SKEW_FACTOR = _UxGT("Faktor skosenia"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Self-Test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reset"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Zasunúť"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Vysunúť"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("Režim SW"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("Režim 5V"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("Režim OD"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Ulož. režim"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Prepnúť do 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Prepnúť do OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Zobraziť režim"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("POZOR: Zlé nastav. môže spôsobiť poškoden. Pokračovať?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Inicializ. TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Test Z ofsetu"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Uložiť"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Zasunúť TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Zasunúť sondu Z"); + LSTR MSG_MANUAL_STOW = _UxGT("Vysunúť sondu Z"); + LSTR MSG_HOME_FIRST = _UxGT("Najskôr os %s%s%s domov"); + LSTR MSG_ZPROBE_SETTINGS = _UxGT("Nastav. sondy"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Ofsety sondy Z"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("X ofset"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y ofset"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z ofset"); + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Pos. trysku k podl."); + LSTR MSG_BABYSTEP_X = _UxGT("Babystep X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Babystep Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Babystep Z"); + LSTR MSG_BABYSTEP_I = _UxGT("Babystep ") LCD_STR_I; + LSTR MSG_BABYSTEP_J = _UxGT("Babystep ") LCD_STR_J; + LSTR MSG_BABYSTEP_K = _UxGT("Babystep ") LCD_STR_K; + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Celkom"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Zastavenie Endstop"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Chyba ohrevu"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Chyba: REDUND. TEP."); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("TEPLOTNÝ SKOK"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TEPLOTNÝ SKOK PODL."); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("TEPLOTNÝ SKOK KOMO."); + LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("TEPLOTNÝ SKOK CHLAD."); + LSTR MSG_COOLING_FAILED = _UxGT("Ochladz. zlyhalo"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Chyba: MAXTEMP"); + LSTR MSG_ERR_MINTEMP = _UxGT("Chyba: MINTEMP"); + LSTR MSG_HALTED = _UxGT("TLAČIAREŇ ZASTAVENÁ"); + LSTR MSG_PLEASE_RESET = _UxGT("Reštartuje ju"); + LSTR MSG_HEATING = _UxGT("Ohrev..."); + LSTR MSG_COOLING = _UxGT("Ochladzovanie..."); + LSTR MSG_BED_HEATING = _UxGT("Ohrev podložky..."); + LSTR MSG_BED_COOLING = _UxGT("Ochladz. podložky..."); + LSTR MSG_PROBE_HEATING = _UxGT("Ohrev sondy..."); + LSTR MSG_PROBE_COOLING = _UxGT("Ochladz. sondy..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Ohrev komory..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Ochladz. komory..."); + LSTR MSG_LASER_COOLING = _UxGT("Ochladz. lasera..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta kalibrácia"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibrovať X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibrovať Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibrovať Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibrovať stred"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Delta nastavenia"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto-kalibrácia"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Nast. výšku delty"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Ofset sondy Z"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Diag. rameno"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Výška"); + LSTR MSG_DELTA_RADIUS = _UxGT("Polomer"); + LSTR MSG_INFO_MENU = _UxGT("O tlačiarni"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Info. o tlačiarni"); + LSTR MSG_3POINT_LEVELING = _UxGT("3-bodové rovnanie"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Lineárne rovnanie"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Bilineárne rovnanie"); + LSTR MSG_UBL_LEVELING = _UxGT("UBL rovnanie"); + LSTR MSG_MESH_LEVELING = _UxGT("Mriežkové rovnanie"); + LSTR MSG_MESH_DONE = _UxGT("Mriežka dokončená"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Štatistika"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Info. o doske"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistory"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extrudéry"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Rýchlosť"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protokol"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Tepl. ochrana: VYP"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Tepl. ochrana: ZAP"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Vypr.čas nečinnosti"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Osvetlenie"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Jas svetla"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Nesprávna tlačiareň"); + LSTR MSG_CASE_LIGHT = _UxGT("Osvetlenie"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Jas svetla"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Nesprávna tlačiareň"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Počet tlačí"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Dokončené"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Celkový čas"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Najdlhšia tlač"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Celkom vytlačené"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Počet tlačí"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Dokončené"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Celkový čas"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Najdlhšia tlač"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Celkom vytlačené"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Tlače"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Hotovo"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Čas"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Najdlhšia"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Vytlačené"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Tlače"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Hotovo"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Čas"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Najdlhšia"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Vytlačené"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Teplota min"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Teplota max"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Nap. zdroj"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Budenie motorov"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Motor %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Motor %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("CHYBA KOMUNIKÁ. TMC"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Uložiť do EEPROM"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("VÝMENA FILAMENTU"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("PAUZA TLAČE"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("ZAVEDENIE FILAMENTU"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("VYSUNUTIE FILAMENTU"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("MOŽNOSTI POKRAČ.:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Vytlačiť viacej"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Obnoviť tlač"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Tryska: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Senzor filamentu"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Vzd. mm fil. senz."); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Parkovanie zlyhalo"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Kalibrácia zlyhala"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Teplota min"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Teplota max"); + LSTR MSG_INFO_PSU = _UxGT("Nap. zdroj"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Budenie motorov"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Motor %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Motor %"); + LSTR MSG_ERROR_TMC = _UxGT("CHYBA KOMUNIKÁ. TMC"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Uložiť do EEPROM"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("VÝMENA FILAMENTU"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("PAUZA TLAČE"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("ZAVEDENIE FILAMENTU"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("VYSUNUTIE FILAMENTU"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("MOŽNOSTI POKRAČ.:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Vytlačiť viacej"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Obnoviť tlač"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Tryska: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Senzor filamentu"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Vzd. mm fil. senz."); + LSTR MSG_RUNOUT_ENABLE = _UxGT("Zapnúť senzor"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Parkovanie zlyhalo"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Kalibrácia zlyhala"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("VYBERTE FILAMENT"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU2"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Aktualizujte FW MMU!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU potrebuje zásah."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Obnoviť tlač"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Obnovovanie..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Zaviesť filament"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Zaviesť všetky"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Zaviesť po trysku"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Vysunúť filament"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Vysunúť filament ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Vyňať filament"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Zavádzanie fil. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Vysúvanie fil. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Vysúvanie fil. ..."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Všetky"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Reštartovať MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("Reštart MMU..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Odstráňte, kliknite"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("VYBERTE FILAMENT"); + LSTR MSG_MMU2_MENU = _UxGT("MMU2"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Aktualizujte FW MMU!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU potrebuje zásah."); + LSTR MSG_MMU2_RESUME = _UxGT("Obnoviť tlač"); + LSTR MSG_MMU2_RESUMING = _UxGT("Obnovovanie..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Zaviesť filament"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Zaviesť všetky"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Zaviesť po trysku"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Vysunúť filament"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Vysunúť filament ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Vyňať filament"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Zavádzanie fil. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Vysúvanie fil. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Vysúvanie fil. ..."); + LSTR MSG_MMU2_ALL = _UxGT("Všetky"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filament ~"); + LSTR MSG_MMU2_RESET = _UxGT("Reštartovať MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("Reštart MMU..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Odstráňte, kliknite"); - PROGMEM Language_Str MSG_MIX = _UxGT("Mix"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Zložka ~"); - PROGMEM Language_Str MSG_MIXER = _UxGT("Mixér"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Gradient"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Plný gradient"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Prepnúť mix"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Cyklický mix"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Gradientný mix"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Otočiť gradient"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Aktívny V-tool"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Počiat. V-tool"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT("Konečn. V-tool"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Vynulovať V-tools"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Uložiť V-tool Mix"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-tools vynulované"); - PROGMEM Language_Str MSG_START_Z = _UxGT("Počiat.Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT("Konečn.Z:"); + LSTR MSG_MIX = _UxGT("Mix"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Zložka ~"); + LSTR MSG_MIXER = _UxGT("Mixér"); + LSTR MSG_GRADIENT = _UxGT("Gradient"); + LSTR MSG_FULL_GRADIENT = _UxGT("Plný gradient"); + LSTR MSG_TOGGLE_MIX = _UxGT("Prepnúť mix"); + LSTR MSG_CYCLE_MIX = _UxGT("Cyklický mix"); + LSTR MSG_GRADIENT_MIX = _UxGT("Gradientný mix"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Otočiť gradient"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Aktívny V-tool"); + LSTR MSG_START_VTOOL = _UxGT("Počiat. V-tool"); + LSTR MSG_END_VTOOL = _UxGT("Konečn. V-tool"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); + LSTR MSG_RESET_VTOOLS = _UxGT("Vynulovať V-tools"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Uložiť V-tool Mix"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-tools vynulované"); + LSTR MSG_START_Z = _UxGT("Počiat.Z:"); + LSTR MSG_END_Z = _UxGT("Konečn.Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Hry"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Nájazdníci"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Had"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Bludisko"); + LSTR MSG_GAMES = _UxGT("Hry"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Nájazdníci"); + LSTR MSG_SNAKE = _UxGT("Had"); + LSTR MSG_MAZE = _UxGT("Bludisko"); - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("Chyb. index stránky"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Chyb. rých. stránky"); + LSTR MSG_BAD_PAGE = _UxGT("Chyb. index stránky"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Chyb. rých. stránky"); - PROGMEM Language_Str MSG_EDIT_PASSWORD = _UxGT("Zmeniť heslo"); - PROGMEM Language_Str MSG_LOGIN_REQUIRED = _UxGT("Vyžad. sa prihl."); - PROGMEM Language_Str MSG_PASSWORD_SETTINGS = _UxGT("Nastavenie hesla"); - PROGMEM Language_Str MSG_ENTER_DIGIT = _UxGT("Zvoľte číslo"); - PROGMEM Language_Str MSG_CHANGE_PASSWORD = _UxGT("Zmeniť heslo"); - PROGMEM Language_Str MSG_REMOVE_PASSWORD = _UxGT("Odstrániť heslo"); - PROGMEM Language_Str MSG_PASSWORD_SET = _UxGT("Heslo je "); - PROGMEM Language_Str MSG_START_OVER = _UxGT("Začať odznova"); - PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Nezabudnite uložiť!"); - PROGMEM Language_Str MSG_PASSWORD_REMOVED = _UxGT("Heslo odstránené"); + LSTR MSG_EDIT_PASSWORD = _UxGT("Zmeniť heslo"); + LSTR MSG_LOGIN_REQUIRED = _UxGT("Vyžad. sa prihl."); + LSTR MSG_PASSWORD_SETTINGS = _UxGT("Nastavenie hesla"); + LSTR MSG_ENTER_DIGIT = _UxGT("Zvoľte číslo"); + LSTR MSG_CHANGE_PASSWORD = _UxGT("Zmeniť heslo"); + LSTR MSG_REMOVE_PASSWORD = _UxGT("Odstrániť heslo"); + LSTR MSG_PASSWORD_SET = _UxGT("Heslo je "); + LSTR MSG_START_OVER = _UxGT("Začať odznova"); + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Nezabudnite uložiť!"); + LSTR MSG_PASSWORD_REMOVED = _UxGT("Heslo odstránené"); // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Stlačte tlačidlo", "pre obnovu tlače")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkovanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Čakajte prosím", "na spustenie", "výmeny filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Vložte filament", "a stlačte tlačidlo", "pre pokračovanie")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Stlačte tlačidlo", "pre ohrev trysky")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Ohrev trysky", "Čakajte prosím...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Čakajte prosím", "na vysunutie", "filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Čakajte prosím", "na zavedenie", "filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_3_LINE("Čakajte prosím", "na vytlačenie", "filamentu")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Stlačte tlačidlo", "pre dokončenie", "vytláčania filam.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Čakajte prosím na", "obnovenie tlače...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Stlačte tlačidlo", "pre obnovu tlače")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkovanie...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Čakajte prosím", "na spustenie", "výmeny filamentu")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Vložte filament", "a stlačte tlačidlo", "pre pokračovanie")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Stlačte tlačidlo", "pre ohrev trysky")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Ohrev trysky", "Čakajte prosím...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_3_LINE("Čakajte prosím", "na vysunutie", "filamentu")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_3_LINE("Čakajte prosím", "na zavedenie", "filamentu")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_3_LINE("Čakajte prosím", "na vytlačenie", "filamentu")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Stlačte tlačidlo", "pre dokončenie", "vytláčania filam.")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Čakajte prosím na", "obnovenie tlače...")); #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Kliknite pre pokr.")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkovanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Čakajte prosím...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Vložte a kliknite")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Kliknite pre ohrev")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Ohrev...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Vysúvanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Zavádzanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Vytlačovanie...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Klik. pre dokonč.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Pokračovanie...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Kliknite pre pokr.")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkovanie...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Čakajte prosím...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Vložte a kliknite")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Kliknite pre ohrev")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Ohrev...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Vysúvanie...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Zavádzanie...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Vytlačovanie...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Klik. pre dokonč.")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Pokračovanie...")); #endif - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("Ovládače TMC"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Prúd ovládača"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hybridný prah"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Bezsenzor. domov"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Režim krokovania"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop zapnutý"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Vynulovať"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT("za:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Kompenz. vôle"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korekcia"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Vyhladzovanie"); + LSTR MSG_TMC_DRIVERS = _UxGT("Ovládače TMC"); + LSTR MSG_TMC_CURRENT = _UxGT("Prúd ovládača"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hybridný prah"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Bezsenzor. domov"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Režim krokovania"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop zapnutý"); + LSTR MSG_SERVICE_RESET = _UxGT("Vynulovať"); + LSTR MSG_SERVICE_IN = _UxGT("za:"); + LSTR MSG_BACKLASH = _UxGT("Kompenz. vôle"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Korekcia"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Vyhladzovanie"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Vyrovnať os X"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Auto-kalibrovať"); + LSTR MSG_LEVEL_X_AXIS = _UxGT("Vyrovnať os X"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto-kalibrovať"); #if ENABLED(TOUCH_UI_FTDI_EVE) - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Vypršal čas ohrevu, znížená teplota. Stlačte OK pre ohrev a ešte raz pre obnovu."); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Vypršal čas ohrevu, znížená teplota. Stlačte OK pre ohrev a ešte raz pre obnovu."); #else - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Vypršal čas ohrevu"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Vypršal čas ohrevu"); #endif - PROGMEM Language_Str MSG_REHEAT = _UxGT("Zohriať"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Zohrievanie..."); + LSTR MSG_REHEAT = _UxGT("Zohriať"); + LSTR MSG_REHEATING = _UxGT("Zohrievanie..."); + LSTR MSG_REHEATDONE = _UxGT("Zohrievanie dokonč."); + + LSTR MSG_PROBE_WIZARD = _UxGT("Sprievodca sondy Z"); + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Referencia Z"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Presúvam na pozíciu"); + + LSTR MSG_SOUND = _UxGT("Zvuk"); - PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Sprievodca sondy Z"); + LSTR MSG_TOP_LEFT = _UxGT("Ľavý horný"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Ľavý dolný"); + LSTR MSG_TOP_RIGHT = _UxGT("Pravý horný"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Pravý dolný"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Kalibrácia dokončená"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Kalibrácia zlyhala"); - PROGMEM Language_Str MSG_SOUND = _UxGT("Zvuk"); + LSTR MSG_DRIVER_BACKWARD = _UxGT(" spätný chod ovl."); - PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Ľavý horný"); - PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Ľavý dolný"); - PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Pravý horný"); - PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Pravý dolný"); - PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Kalibrácia dokončená"); - PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Kalibrácia zlyhala"); + LSTR MSG_SD_CARD = _UxGT("SD karta"); + LSTR MSG_USB_DISK = _UxGT("USB disk"); } diff --git a/Marlin/src/lcd/language/language_sv.h b/Marlin/src/lcd/language/language_sv.h index 722443fb21c1..91a842fe2dec 100644 --- a/Marlin/src/lcd/language/language_sv.h +++ b/Marlin/src/lcd/language/language_sv.h @@ -33,649 +33,658 @@ namespace Language_sv { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Swedish"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Swedish"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Redo."); - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("JA"); - PROGMEM Language_Str MSG_NO = _UxGT("NEJ"); - PROGMEM Language_Str MSG_BACK = _UxGT("Bakåt"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Avbryter..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Media Instatt"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Media Borttaget"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Väntar på media"); - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("SD init misslyckades"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Media läsningsfel"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB enhet borttagen"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB start misslyckad"); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Underanrop överskriden"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Slutstop"); // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Mjuk slutstopp"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Huvud"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Advancerade inställningar"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Konfiguration"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Autostarta Filer"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Inaktivera Stegare"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Debug Meny"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Framstegsindikator Test"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Auto Hem"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Hem X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Hem Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Hem Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Justering"); - PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Iteration: %i"); - PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Noggrannhet Minskar!"); - PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Noggrannhet uppnådd"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Hemning XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Klicka för att börja"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Nästa Punkt"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Nivellering Färdig!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Falna Höjd"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Sätt Hem Offset"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Offset Tillämpad"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Sätt Origo"); - PROGMEM Language_Str MSG_ASSISTED_TRAMMING = _UxGT("Assisterad justering"); - PROGMEM Language_Str MSG_TRAMMING_WIZARD = _UxGT("Justerings Wizard"); - PROGMEM Language_Str MSG_SELECT_ORIGIN = _UxGT("Välj Origo"); - PROGMEM Language_Str MSG_LAST_VALUE_SP = _UxGT("Senaste värde "); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Redo."); + LSTR MSG_YES = _UxGT("JA"); + LSTR MSG_NO = _UxGT("NEJ"); + LSTR MSG_BACK = _UxGT("Bakåt"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Avbryter..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Media Instatt"); + LSTR MSG_MEDIA_REMOVED = _UxGT("Media Borttaget"); + LSTR MSG_MEDIA_WAITING = _UxGT("Väntar på media"); + LSTR MSG_SD_INIT_FAIL = _UxGT("SD init misslyckades"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Media läsningsfel"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB enhet borttagen"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB start misslyckad"); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Underanrop överskriden"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Slutstop"); // Max length 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Mjuk slutstopp"); + LSTR MSG_MAIN = _UxGT("Huvud"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Advancerade inställningar"); + LSTR MSG_CONFIGURATION = _UxGT("Konfiguration"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Autostarta Filer"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Inaktivera Stegare"); + LSTR MSG_DEBUG_MENU = _UxGT("Debug Meny"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Framstegsindikator Test"); + LSTR MSG_AUTO_HOME = _UxGT("Auto Hem"); + LSTR MSG_AUTO_HOME_X = _UxGT("Hem X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Hem Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Hem Z"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Auto Z-Justering"); + LSTR MSG_ITERATION = _UxGT("G34 Iteration: %i"); + LSTR MSG_DECREASING_ACCURACY = _UxGT("Noggrannhet Minskar!"); + LSTR MSG_ACCURACY_ACHIEVED = _UxGT("Noggrannhet uppnådd"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Hemning XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Klicka för att börja"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Nästa Punkt"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Nivellering Färdig!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Falna Höjd"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Sätt Hem Offset"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Offset Tillämpad"); + LSTR MSG_SET_ORIGIN = _UxGT("Sätt Origo"); + LSTR MSG_TRAMMING_WIZARD = _UxGT("Justerings Wizard"); + LSTR MSG_SELECT_ORIGIN = _UxGT("Välj Origo"); + LSTR MSG_LAST_VALUE_SP = _UxGT("Senaste värde "); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Förvärmning ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Förvärmning ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Stoppa"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Stoppa ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Alla"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Bädd"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Konf"); + LSTR MSG_PREHEAT_1 = _UxGT("Förvärmning ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Förvärmning ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Stoppa"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Stoppa ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Alla"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Bädd"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Förvärmning ") PREHEAT_1_LABEL _UxGT(" Konf"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Förvärmning $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Förvärmning $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Förvärmning $ Stoppa"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Förvärmning $ Stoppa ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Förvärmning $ Alla"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Förvärmning $ Bädd"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Förvärmning $ Donf"); + LSTR MSG_PREHEAT_M = _UxGT("Förvärmning $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Förvärmning $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Förvärmning $ Stoppa"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Förvärmning $ Stoppa ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Förvärmning $ Alla"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Förvärmning $ Bädd"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Förvärmning $ Donf"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Förvärmning Anpassad"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Nedkylning"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Frekvens"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Laser kontroll"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Spindel Kontroll"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Laser Styrka"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Spindel Styrka"); - PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Växla Laser"); - PROGMEM Language_Str MSG_LASER_PULSE_MS = _UxGT("Test Puls ms"); - PROGMEM Language_Str MSG_LASER_FIRE_PULSE = _UxGT("Avfyra Puls"); - PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Växla Spindel"); - PROGMEM Language_Str MSG_SPINDLE_FORWARD = _UxGT("Spindel Framåt"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Spindel Bakåt"); - PROGMEM Language_Str MSG_LASER_OFF = _UxGT("Laser Av"); - PROGMEM Language_Str MSG_LASER_ON = _UxGT("Laser På"); - PROGMEM Language_Str MSG_SPINDLE_OFF = _UxGT("Spindel Av"); - PROGMEM Language_Str MSG_SPINDLE_ON = _UxGT("Spindel På"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Sätt på ström"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Stäng av ström"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrudera"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Dra tillbaka"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Flytta Axel"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Bädd Nivellering"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Nivellera Bädd"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Nivellera Hörn"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Höj Bädd tills nästa Sond Triggad"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Alla Hörn inom Tolerans. Nivellering Bädd"); - PROGMEM Language_Str MSG_LEVEL_CORNERS_GOOD_POINTS = _UxGT("Bra Punkter: "); - PROGMEM Language_Str MSG_LEVEL_CORNERS_LAST_Z = _UxGT("Senaste Z: "); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Nästa Hörn"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Nät Redigerare"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Redigera Nät"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Nätredigering Stoppad"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Sonderingspunkt"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Index X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Index Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Värde"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Anpassade Kommandon"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Sond Test"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Punkt"); - PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Sond utan för gränser"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Avvikelse"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX Läge"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Verktygsoffset"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Parkera"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicering"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Speglad Kopia"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Kontroll"); - PROGMEM Language_Str MSG_IDEX_DUPE_GAP = _UxGT("Duplicera X-Avstånd"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2:a Munstycke X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2:a Munstycke Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2:a Munstycke Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Utför G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL Verktyg"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Enad Bädd Nivellering (UBL)"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Lutningspunkt"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Manuellt skapa nät"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Placera Shim & Mät"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Mät"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Ta bort & Mät bädd"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Flyttar till nästa"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Aktivera UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Avaktivera UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Bädd Temp"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bädd Temp"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hetände Temp"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hetände Temp"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Nät Redigera"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Redigera Anpassat Nät"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Finjustera Nät"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Färdig Redigera Nät"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Bygg Anpassat Nät"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Bygg Nät"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Bygg Nät ($)"); - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Bygg Kallt Nät"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Justera Nät Höjd"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Höjd Antal"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validera Nät"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Validera Nät ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validera Anpassat Nät"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Värma Bädd"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Värma Munstycke"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Manuel grundning..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Fastlängd Grundning"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Färdig Grundning"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 Avbruten"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Nivellera G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Fortsätt Bädd Nät"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Nät Nivellering"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Punkts Nivellering"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Rutnät Nivellering"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Nivellera Nät"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Sidopunkter"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Kart Typ"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Utmatning Nät Map"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Utmatning för Värd"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Utmatning för CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Utanför skrivare Backup"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Utmatning UBL Info"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Ifyllnad Mängd"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Manuell Ifyllnad"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Smart Ifyllnad"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Ifyllnad Nät"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Ogiltigförklara Alla"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Ogiltigförklara Närmast"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Finjustera Alla"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Finjustera Närmast"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Nät Lagra"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Minnesöppning"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Ladda Bädd Nät"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Spara Bädd Nät"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Nät %i Ladda"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Nät %i Sparad"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Ingen Lagring"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Fel: UBL Sparad"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Fel: UBL Återställd"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Stoppad"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Steg-för-Steg UBL"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Bygg Kallt Nät"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. Smart Ifyllnad"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Validera Nät"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Finjustera Alla"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Validera Nät"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Finjustera Alla"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. Spara Bädd Nät"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Förvärmning Anpassad"); + LSTR MSG_COOLDOWN = _UxGT("Nedkylning"); + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Frekvens"); + LSTR MSG_LASER_MENU = _UxGT("Laser kontroll"); + LSTR MSG_SPINDLE_MENU = _UxGT("Spindel Kontroll"); + LSTR MSG_LASER_POWER = _UxGT("Laser Styrka"); + LSTR MSG_SPINDLE_POWER = _UxGT("Spindel Styrka"); + LSTR MSG_LASER_TOGGLE = _UxGT("Växla Laser"); + LSTR MSG_LASER_PULSE_MS = _UxGT("Test Puls ms"); + LSTR MSG_LASER_FIRE_PULSE = _UxGT("Avfyra Puls"); + LSTR MSG_SPINDLE_TOGGLE = _UxGT("Växla Spindel"); + LSTR MSG_SPINDLE_FORWARD = _UxGT("Spindel Framåt"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Spindel Bakåt"); + LSTR MSG_LASER_OFF = _UxGT("Laser Av"); + LSTR MSG_LASER_ON = _UxGT("Laser På"); + LSTR MSG_SPINDLE_OFF = _UxGT("Spindel Av"); + LSTR MSG_SPINDLE_ON = _UxGT("Spindel På"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Sätt på ström"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Stäng av ström"); + LSTR MSG_EXTRUDE = _UxGT("Extrudera"); + LSTR MSG_RETRACT = _UxGT("Dra tillbaka"); + LSTR MSG_MOVE_AXIS = _UxGT("Flytta Axel"); + LSTR MSG_BED_LEVELING = _UxGT("Bädd Nivellering"); + LSTR MSG_LEVEL_BED = _UxGT("Nivellera Bädd"); + LSTR MSG_BED_TRAMMING = _UxGT("Bädd Justering"); + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Höj Bädd tills nästa Sond Triggad"); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Alla Hörn inom Tolerans. Nivellering Bädd"); + LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Bra Punkter: "); + LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Senaste Z: "); + LSTR MSG_NEXT_CORNER = _UxGT("Nästa Hörn"); + LSTR MSG_MESH_EDITOR = _UxGT("Nät Redigerare"); + LSTR MSG_EDIT_MESH = _UxGT("Redigera Nät"); + LSTR MSG_EDITING_STOPPED = _UxGT("Nätredigering Stoppad"); + LSTR MSG_PROBING_POINT = _UxGT("Sonderingspunkt"); + LSTR MSG_MESH_X = _UxGT("Index X"); + LSTR MSG_MESH_Y = _UxGT("Index Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Z Värde"); + LSTR MSG_USER_MENU = _UxGT("Anpassade Kommandon"); + LSTR MSG_M48_TEST = _UxGT("M48 Sond Test"); + LSTR MSG_M48_POINT = _UxGT("M48 Punkt"); + LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Sond utan för gränser"); + LSTR MSG_M48_DEVIATION = _UxGT("Avvikelse"); + LSTR MSG_IDEX_MENU = _UxGT("IDEX Läge"); + LSTR MSG_OFFSETS_MENU = _UxGT("Verktygsoffset"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Parkera"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplicering"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Speglad Kopia"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Kontroll"); + LSTR MSG_IDEX_DUPE_GAP = _UxGT("Duplicera X-Avstånd"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2:a Munstycke X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2:a Munstycke Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2:a Munstycke Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("Utför G29"); + LSTR MSG_UBL_TOOLS = _UxGT("UBL Verktyg"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Enad Bädd Nivellering (UBL)"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Lutningspunkt"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Manuellt skapa nät"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Placera Shim & Mät"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Mät"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Ta bort & Mät bädd"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Flyttar till nästa"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Aktivera UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Avaktivera UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Bädd Temp"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bädd Temp"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Hetände Temp"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hetände Temp"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Nät Redigera"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Redigera Anpassat Nät"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Finjustera Nät"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Färdig Redigera Nät"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Bygg Anpassat Nät"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Bygg Nät"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Bygg Nät ($)"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Bygg Kallt Nät"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Justera Nät Höjd"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Höjd Antal"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Validera Nät"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Validera Nät ($)"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Validera Anpassat Nät"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 Värma Bädd"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Värma Munstycke"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Manuel grundning..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Fastlängd Grundning"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Färdig Grundning"); + LSTR MSG_G26_CANCELED = _UxGT("G26 Avbruten"); + LSTR MSG_G26_LEAVING = _UxGT("Nivellera G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Fortsätt Bädd Nät"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Nät Nivellering"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Punkts Nivellering"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Rutnät Nivellering"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Nivellera Nät"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Sidopunkter"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Kart Typ"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Utmatning Nät Map"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Utmatning för Värd"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Utmatning för CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Utanför skrivare Backup"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Utmatning UBL Info"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Ifyllnad Mängd"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Manuell Ifyllnad"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Smart Ifyllnad"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Ifyllnad Nät"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Ogiltigförklara Alla"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Ogiltigförklara Närmast"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Finjustera Alla"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Finjustera Närmast"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Nät Lagra"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Minnesöppning"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Ladda Bädd Nät"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Spara Bädd Nät"); + LSTR MSG_MESH_LOADED = _UxGT("Nät %i Ladda"); + LSTR MSG_MESH_SAVED = _UxGT("Nät %i Sparad"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Ingen Lagring"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Fel: UBL Sparad"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Fel: UBL Återställd"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Offset: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Offset Stoppad"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Steg-för-Steg UBL"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. Bygg Kallt Nät"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2. Smart Ifyllnad"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. Validera Nät"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. Finjustera Alla"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. Validera Nät"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. Finjustera Alla"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. Spara Bädd Nät"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("LED Kontroll"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Ljus"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Ljus Förinställd"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Röd"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Orange"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Gul"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Grön"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Blå"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Violet"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Vitt"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); - PROGMEM Language_Str MSG_LED_CHANNEL_N = _UxGT("Kanal ="); - PROGMEM Language_Str MSG_LEDS2 = _UxGT("Ljus #2"); - PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Ljus #2 Förinställd"); - PROGMEM Language_Str MSG_NEO2_BRIGHTNESS = _UxGT("Ljusstyrka"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Anpassat Ljus"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Rör Intensitet"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Grön Intensitet"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Blå Intensitet"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Vit Intensitet"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Brightness"); + LSTR MSG_LED_CONTROL = _UxGT("LED Kontroll"); + LSTR MSG_LEDS = _UxGT("Ljus"); + LSTR MSG_LED_PRESETS = _UxGT("Ljus Förinställd"); + LSTR MSG_SET_LEDS_RED = _UxGT("Röd"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Orange"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Gul"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Grön"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Blå"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Indigo"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Violet"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Vitt"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Standard"); + LSTR MSG_LED_CHANNEL_N = _UxGT("Kanal ="); + LSTR MSG_LEDS2 = _UxGT("Ljus #2"); + LSTR MSG_NEO2_PRESETS = _UxGT("Ljus #2 Förinställd"); + LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Ljusstyrka"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Anpassat Ljus"); + LSTR MSG_INTENSITY_R = _UxGT("Rör Intensitet"); + LSTR MSG_INTENSITY_G = _UxGT("Grön Intensitet"); + LSTR MSG_INTENSITY_B = _UxGT("Blå Intensitet"); + LSTR MSG_INTENSITY_W = _UxGT("Vit Intensitet"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Brightness"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Flyttar..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Fri XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Flytta X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Flytta Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Flytta Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Extruder"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Extruder *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Hetände för kall"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Flytta %smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Flytta 0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Flytta 1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Flytta 10mm"); - PROGMEM Language_Str MSG_MOVE_0001IN = _UxGT("Flytta 0.001tum"); - PROGMEM Language_Str MSG_MOVE_001IN = _UxGT("Flytta 0.01tum"); - PROGMEM Language_Str MSG_MOVE_01IN = _UxGT("Flytta 0.1tum"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Hastighet"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Bädd Z"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Munstycke"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Munstycke ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Munstycke Parkerad"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Munstycke Standby"); - PROGMEM Language_Str MSG_BED = _UxGT("Bädd"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Inkapsling"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Fläkt Hastighet"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Fläkt Hastighet ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Lagrad Fläkt ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Extra Fläkt Hastighet"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra Fläkt Hastighet ~"); - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Kontroller Fläkt"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Overksam Hastighet"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto läga"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktive Hastighet"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Overksam Period"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Flöde"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Flöde ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Kontroll"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fakt"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Autotemp"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("På"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Av"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Autojustera"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Autojustera *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autojustera misslyckad. Dålig extruder."); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Autojustera misslyckad. Temperatur för hög."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Autojustera misslyckad! Tidsgräns."); - PROGMEM Language_Str MSG_SELECT = _UxGT("Välj"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Välj *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Accel"); - PROGMEM Language_Str MSG_JERK = _UxGT("Ryck"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Ryck"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Ryck"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Ryck"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Ryck"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Knutpunkt Avv"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Hastighet"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vmax *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Vmin"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("VTrav Min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Acceleration"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Amax *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("A-Dra tillbaka"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("A-Färdas"); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Frekvens max"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Flöde min"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Steg/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" Steg/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" Steg/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" Steg/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E Steg/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* Steg/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Temperatur"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Rörelse"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Tråd"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E i mm³"); - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("E Gräns i mm³"); - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Gräns *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Tråd Dia."); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Tråd Dia. *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Lossa mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Ladda mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Advancera K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Advancera K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD Kontrast"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Spara Inställningar"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Ladda Inställningar"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Återställ Standard"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Initiera EEPROM"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Fel"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Fel"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Fel"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Inställningar Lagrad"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Media Uppdatera"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Återställ Skrivare"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Uppdatera"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Info Skärm"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Förbered"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Justera"); - PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("Ström övervakning"); - PROGMEM Language_Str MSG_CURRENT = _UxGT("Ström"); - PROGMEM Language_Str MSG_VOLTAGE = _UxGT("Spänning"); - PROGMEM Language_Str MSG_POWER = _UxGT("Ström"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Start Utskrift"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Nästa"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Initiera"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Stoppa"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Skriv"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Återställa"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("Ignorera"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Avbryt"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Färdig"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Bakåt"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Fortsätt"); - PROGMEM Language_Str MSG_BUTTON_SKIP = _UxGT("Hoppa över"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("Paus.."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Pausera Utskrift"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Återuppta Utskrift"); - PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Värd Start"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Stoppa Utskrift"); - PROGMEM Language_Str MSG_END_LOOPS = _UxGT("Slut Upprepningsloop"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Skriver Objekt"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Avbryt Objekt"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Avbryt Objekt ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Ström Avbrott"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Skriv fråm Media"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Inget Media"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Sov..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Klick för att återuppta..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Utskrift Pausad"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Skriver..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Utskrift Avbruten"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Utskrift Färdig"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Ingen Flytt."); - PROGMEM Language_Str MSG_KILLED = _UxGT("DÖDAD. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("STOPPAD. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Dra tillbaka mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Byt Dra.mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Dra tillbaka V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hoppa mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Åter dra tillbaka. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Byt åter dra t. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Återdrat. V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Byt åter dra. V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Auto-Dra-tillbka"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Byt Längd"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Byt Extra"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Rensa Längd"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Byt verktyg"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Höj"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Grund Hastighet"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Återgå Hastighet"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Parkera Huvud"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Återgår Hastighet"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Fläkt Hastighet"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Fläkt Tid"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Auto PÅ"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Auto AV"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Verktyg Migration"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-migration"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Senast Extruder"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrera till *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Byt Tråd"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Byt Tråd *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Ladda Tråd"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Ladda *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Lossa Tråd"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Lossa *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Lossa All"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Bifoga Media"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Byt Media"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Släpp Media"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z Sond Utanför Bädd"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Skev Faktor"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Själv-Test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Återställ"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Stuva undan"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Fällut"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("SW-Läge"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("5V-Läge"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("OD-Läge"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Läge-Lägring"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Sätt BLTouch to 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Sätt BLTouch to OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Reportera Dränering"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("FARA: Dålig inställningar kan orsaka skada! Fortsätt ändå?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Initiera TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Z Offset Test"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Spara"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Fällut TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Fällut Z-Sond"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Stuva undan Z-Sond"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Hem %s%s%s Först"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Sond Offsets"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Sond X Offset"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Sond Y Offset"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Sond Z Offset"); - PROGMEM Language_Str MSG_MOVE_NOZZLE_TO_BED = _UxGT("Flytta Munstycke till Bädd"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Småsteg X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Småsteg Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Småsteg Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Total"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Slutstopp Avbrott"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Värma Misslyckad"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Fel: REDUNDANT TEMP"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("TERMISK ÖVERDRIFT"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("BÄDD TERMISK ÖVERDRIFT"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("KAMMARE T. ÖVERDRIFT"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Fel: MAXTEMP"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Fel: MINTEMP"); - PROGMEM Language_Str MSG_HALTED = _UxGT("Utskrift stoppad"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Snälla Återställ"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("d"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("t"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("m"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Värmer..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Kyler..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Bädd Värmer..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Bädd Kyler..."); - PROGMEM Language_Str MSG_PROBE_HEATING = _UxGT("Sond Värmer..."); - PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Sond Kyler..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Kammare Värmer..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Kammare Kyler..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrering"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Kalibrera X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibrera Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibrera Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibrera Center"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta Inställningar"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Kalibrering"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Sätt Delta Höjd"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Sond Z-offset"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Diag Rod"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Höjd"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Radius"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Om Skrivaren"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Skrivare Info"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-Punkt Nivellering"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Linjär Nivellering"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Bilinjär Nivellering"); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Enhetlig Bädd Nivellering (UBL)"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Nät Nivellering"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Skrivar Stats"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Kort Info"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistor"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Extruderare"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baud"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokoll"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Överdrift Övervakning: AV"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Överdrift Övervakning: PÅ"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hetände Overksam Tidsgräns"); + LSTR MSG_MOVING = _UxGT("Flyttar..."); + LSTR MSG_FREE_XY = _UxGT("Fri XY"); + LSTR MSG_MOVE_X = _UxGT("Flytta X"); + LSTR MSG_MOVE_Y = _UxGT("Flytta Y"); + LSTR MSG_MOVE_Z = _UxGT("Flytta Z"); + LSTR MSG_MOVE_E = _UxGT("Extruder"); + LSTR MSG_MOVE_EN = _UxGT("Extruder *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Hetände för kall"); + LSTR MSG_MOVE_N_MM = _UxGT("Flytta %smm"); + LSTR MSG_MOVE_01MM = _UxGT("Flytta 0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("Flytta 1mm"); + LSTR MSG_MOVE_10MM = _UxGT("Flytta 10mm"); + LSTR MSG_MOVE_100MM = _UxGT("Flytta 100mm"); + LSTR MSG_MOVE_0001IN = _UxGT("Flytta 0.001tum"); + LSTR MSG_MOVE_001IN = _UxGT("Flytta 0.01tum"); + LSTR MSG_MOVE_01IN = _UxGT("Flytta 0.1tum"); + LSTR MSG_SPEED = _UxGT("Hastighet"); + LSTR MSG_BED_Z = _UxGT("Bädd Z"); + LSTR MSG_NOZZLE = _UxGT("Munstycke"); + LSTR MSG_NOZZLE_N = _UxGT("Munstycke ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Munstycke Parkerad"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Munstycke Standby"); + LSTR MSG_BED = _UxGT("Bädd"); + LSTR MSG_CHAMBER = _UxGT("Inkapsling"); + LSTR MSG_FAN_SPEED = _UxGT("Fläkt Hastighet"); + LSTR MSG_FAN_SPEED_N = _UxGT("Fläkt Hastighet ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Lagrad Fläkt ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Extra Fläkt Hastighet"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Extra Fläkt Hastighet ~"); + LSTR MSG_CONTROLLER_FAN = _UxGT("Kontroller Fläkt"); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Overksam Hastighet"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Auto läga"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Aktive Hastighet"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Overksam Period"); + LSTR MSG_FLOW = _UxGT("Flöde"); + LSTR MSG_FLOW_N = _UxGT("Flöde ~"); + LSTR MSG_CONTROL = _UxGT("Kontroll"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Fakt"); + LSTR MSG_AUTOTEMP = _UxGT("Autotemp"); + LSTR MSG_LCD_ON = _UxGT("På"); + LSTR MSG_LCD_OFF = _UxGT("Av"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID Autojustera"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Autojustera *"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID tuning done"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Autojustera misslyckad. Dålig extruder."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Autojustera misslyckad. Temperatur för hög."); + LSTR MSG_PID_TIMEOUT = _UxGT("Autojustera misslyckad! Tidsgräns."); + LSTR MSG_SELECT = _UxGT("Välj"); + LSTR MSG_SELECT_E = _UxGT("Välj *"); + LSTR MSG_ACC = _UxGT("Accel"); + LSTR MSG_JERK = _UxGT("Ryck"); + LSTR MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Ryck"); + LSTR MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Ryck"); + LSTR MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Ryck"); + LSTR MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-Ryck"); + LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-Ryck"); + LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-Ryck"); + LSTR MSG_VE_JERK = _UxGT("Ve-Ryck"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Knutpunkt Avv"); + LSTR MSG_VELOCITY = _UxGT("Hastighet"); + LSTR MSG_VMAX_A = _UxGT("Vmax ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("Vmax ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Vmax ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Vmax ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Vmax ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Vmax ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Vmax ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Vmax *"); + LSTR MSG_VMIN = _UxGT("Vmin"); + LSTR MSG_VTRAV_MIN = _UxGT("VTrav Min"); + LSTR MSG_ACCELERATION = _UxGT("Acceleration"); + LSTR MSG_AMAX_A = _UxGT("Amax ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Amax ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Amax ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Amax ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Amax ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Amax ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Amax ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Amax *"); + LSTR MSG_A_RETRACT = _UxGT("A-Dra tillbaka"); + LSTR MSG_A_TRAVEL = _UxGT("A-Färdas"); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Frekvens max"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Flöde min"); + LSTR MSG_STEPS_PER_MM = _UxGT("Steg/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" Steg/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" Steg/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" Steg/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" Steg/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" Steg/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" Steg/mm"); + LSTR MSG_E_STEPS = _UxGT("E Steg/mm"); + LSTR MSG_EN_STEPS = _UxGT("* Steg/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Temperatur"); + LSTR MSG_MOTION = _UxGT("Rörelse"); + LSTR MSG_FILAMENT = _UxGT("Tråd"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E i mm³"); + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E Gräns i mm³"); + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E Gräns *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Tråd Dia."); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Tråd Dia. *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Lossa mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Ladda mm"); + LSTR MSG_ADVANCE_K = _UxGT("Advancera K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Advancera K *"); + LSTR MSG_CONTRAST = _UxGT("LCD Kontrast"); + LSTR MSG_STORE_EEPROM = _UxGT("Spara Inställningar"); + LSTR MSG_LOAD_EEPROM = _UxGT("Ladda Inställningar"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Återställ Standard"); + LSTR MSG_INIT_EEPROM = _UxGT("Initiera EEPROM"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC Fel"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index Fel"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version Fel"); + LSTR MSG_SETTINGS_STORED = _UxGT("Inställningar Lagrad"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Media Uppdatera"); + LSTR MSG_RESET_PRINTER = _UxGT("Återställ Skrivare"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Uppdatera"); + LSTR MSG_INFO_SCREEN = _UxGT("Info Skärm"); + LSTR MSG_PREPARE = _UxGT("Förbered"); + LSTR MSG_TUNE = _UxGT("Justera"); + LSTR MSG_POWER_MONITOR = _UxGT("Ström övervakning"); + LSTR MSG_CURRENT = _UxGT("Ström"); + LSTR MSG_VOLTAGE = _UxGT("Spänning"); + LSTR MSG_POWER = _UxGT("Ström"); + LSTR MSG_START_PRINT = _UxGT("Start Utskrift"); + LSTR MSG_BUTTON_NEXT = _UxGT("Nästa"); + LSTR MSG_BUTTON_INIT = _UxGT("Initiera"); + LSTR MSG_BUTTON_STOP = _UxGT("Stoppa"); + LSTR MSG_BUTTON_PRINT = _UxGT("Skriv"); + LSTR MSG_BUTTON_RESET = _UxGT("Återställa"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Ignorera"); + LSTR MSG_BUTTON_CANCEL = _UxGT("Avbryt"); + LSTR MSG_BUTTON_DONE = _UxGT("Färdig"); + LSTR MSG_BUTTON_BACK = _UxGT("Bakåt"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Fortsätt"); + LSTR MSG_BUTTON_SKIP = _UxGT("Hoppa över"); + LSTR MSG_PAUSING = _UxGT("Paus.."); + LSTR MSG_PAUSE_PRINT = _UxGT("Pausera Utskrift"); + LSTR MSG_RESUME_PRINT = _UxGT("Återuppta Utskrift"); + LSTR MSG_HOST_START_PRINT = _UxGT("Värd Start"); + LSTR MSG_STOP_PRINT = _UxGT("Stoppa Utskrift"); + LSTR MSG_END_LOOPS = _UxGT("Slut Upprepningsloop"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Skriver Objekt"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Avbryt Objekt"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Avbryt Objekt ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Ström Avbrott"); + LSTR MSG_MEDIA_MENU = _UxGT("Skriv fråm Media"); + LSTR MSG_NO_MEDIA = _UxGT("Inget Media"); + LSTR MSG_DWELL = _UxGT("Sov..."); + LSTR MSG_USERWAIT = _UxGT("Klick för att återuppta..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Utskrift Pausad"); + LSTR MSG_PRINTING = _UxGT("Skriver..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Utskrift Avbruten"); + LSTR MSG_PRINT_DONE = _UxGT("Utskrift Färdig"); + LSTR MSG_NO_MOVE = _UxGT("Ingen Flytt."); + LSTR MSG_KILLED = _UxGT("DÖDAD. "); + LSTR MSG_STOPPED = _UxGT("STOPPAD. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Dra tillbaka mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Byt Dra.mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Dra tillbaka V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hoppa mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Åter dra tillbaka. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Byt åter dra t. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Återdrat. V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Byt åter dra. V"); + LSTR MSG_AUTORETRACT = _UxGT("Auto-Dra-tillbka"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Byt Längd"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Byt Extra"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Rensa Längd"); + LSTR MSG_TOOL_CHANGE = _UxGT("Byt verktyg"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Höj"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Grund Hastighet"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Återgå Hastighet"); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Parkera Huvud"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Återgår Hastighet"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Fläkt Hastighet"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Fläkt Tid"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Auto PÅ"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Auto AV"); + LSTR MSG_TOOL_MIGRATION = _UxGT("Verktyg Migration"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Auto-migration"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Senast Extruder"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Migrera till *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Byt Tråd"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Byt Tråd *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Ladda Tråd"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Ladda *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Lossa Tråd"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Lossa *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Lossa All"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Bifoga Media"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Byt Media"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Släpp Media"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z Sond Utanför Bädd"); + LSTR MSG_SKEW_FACTOR = _UxGT("Skev Faktor"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Själv-Test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Återställ"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Stuva undan"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Fällut"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("SW-Läge"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("5V-Läge"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("OD-Läge"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Läge-Lägring"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Sätt BLTouch to 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Sätt BLTouch to OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Reportera Dränering"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("FARA: Dålig inställningar kan orsaka skada! Fortsätt ändå?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Initiera TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Z Offset Test"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Spara"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Fällut TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Fällut Z-Sond"); + LSTR MSG_MANUAL_STOW = _UxGT("Stuva undan Z-Sond"); + LSTR MSG_HOME_FIRST = _UxGT("Hem %s%s%s Först"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Sond Offsets"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Sond X Offset"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Sond Y Offset"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Sond Z Offset"); + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Flytta Munstycke till Bädd"); + LSTR MSG_BABYSTEP_X = _UxGT("Småsteg X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Småsteg Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Småsteg Z"); + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Total"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Slutstopp Avbrott"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Värma Misslyckad"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Fel: REDUNDANT TEMP"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("TERMISK ÖVERDRIFT"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("BÄDD TERMISK ÖVERDRIFT"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("KAMMARE T. ÖVERDRIFT"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Fel: MAXTEMP"); + LSTR MSG_ERR_MINTEMP = _UxGT("Fel: MINTEMP"); + LSTR MSG_HALTED = _UxGT("Utskrift stoppad"); + LSTR MSG_PLEASE_RESET = _UxGT("Snälla Återställ"); + LSTR MSG_SHORT_HOUR = _UxGT("t"); // One character only + LSTR MSG_HEATING = _UxGT("Värmer..."); + LSTR MSG_COOLING = _UxGT("Kyler..."); + LSTR MSG_BED_HEATING = _UxGT("Bädd Värmer..."); + LSTR MSG_BED_COOLING = _UxGT("Bädd Kyler..."); + LSTR MSG_PROBE_HEATING = _UxGT("Sond Värmer..."); + LSTR MSG_PROBE_COOLING = _UxGT("Sond Kyler..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Kammare Värmer..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Kammare Kyler..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrering"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Kalibrera X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Kalibrera Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Kalibrera Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Kalibrera Center"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Delta Inställningar"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Auto Kalibrering"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Sätt Delta Höjd"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Sond Z-offset"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Diag Rod"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Höjd"); + LSTR MSG_DELTA_RADIUS = _UxGT("Radius"); + LSTR MSG_INFO_MENU = _UxGT("Om Skrivaren"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Skrivare Info"); + LSTR MSG_3POINT_LEVELING = _UxGT("3-Punkt Nivellering"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Linjär Nivellering"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Bilinjär Nivellering"); + LSTR MSG_UBL_LEVELING = _UxGT("Enhetlig Bädd Nivellering (UBL)"); + LSTR MSG_MESH_LEVELING = _UxGT("Nät Nivellering"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Skrivar Stats"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Kort Info"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistor"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Extruderare"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Baud"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protokoll"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Överdrift Övervakning: AV"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Överdrift Övervakning: PÅ"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Hetände Overksam Tidsgräns"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Lådljus"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Ljus ljusstyrka"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("INKORREKT SKRIVARE"); + LSTR MSG_CASE_LIGHT = _UxGT("Lådljus"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Ljus ljusstyrka"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("INKORREKT SKRIVARE"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Utskriftsantal"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Färdiga"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total Utskriftstid"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Längsta Jobbtid"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extruderade Totalt"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Utskriftsantal"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Färdiga"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total Utskriftstid"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Längsta Jobbtid"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruderade Totalt"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Utskrift"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Färdig"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Total"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Längsta"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Extruderad"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Utskrift"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Färdig"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Total"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Längsta"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Extruderad"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("PSU"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Driv Styrka"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Driver %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Driver %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC KOPPLNINGSFEL"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Skriv"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("TRÅDBYTE"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("UTSKRIFTSPAUSERAD"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("LADDA TRÅD"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("LOSSA TRÅD"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ÅTERGÅ VAÖ:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Rensa mer"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Fortsätt"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Munstycke: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Utskjut Sensor"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Utskjut Dist mm"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Hemning Misslyckad"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Sondering Misslyckad"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Min Temp"); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Max Temp"); + LSTR MSG_INFO_PSU = _UxGT("PSU"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Driv Styrka"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Driver %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Driver %"); + LSTR MSG_ERROR_TMC = _UxGT("TMC KOPPLNINGSFEL"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Skriv"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("TRÅDBYTE"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("UTSKRIFTSPAUSERAD"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("LADDA TRÅD"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("LOSSA TRÅD"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ÅTERGÅ VAÖ:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Rensa mer"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Fortsätt"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Munstycke: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Utskjut Sensor"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Utskjut Dist mm"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Hemning Misslyckad"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Sondering Misslyckad"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("VÄLJ TRÅD"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Uppdatera MMU Firmware!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Behöver uppmärksamhet."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("MMU Återuppta"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("MMU Återupptas..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU Ladda"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("MMU Ladda Alla"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Ladda till Munstycke"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU Mata ut"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU Mata ut ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU Lossa"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Ladda Tråd %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Mata ut Tråd ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Lossa Tråd..."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Alla"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Tråd ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("Återställ MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("MMU Återställer..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Ta bort, Klicka"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("VÄLJ TRÅD"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Uppdatera MMU Firmware!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Behöver uppmärksamhet."); + LSTR MSG_MMU2_RESUME = _UxGT("MMU Återuppta"); + LSTR MSG_MMU2_RESUMING = _UxGT("MMU Återupptas..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU Ladda"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("MMU Ladda Alla"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Ladda till Munstycke"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU Mata ut"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU Mata ut ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU Lossa"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Ladda Tråd %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Mata ut Tråd ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Lossa Tråd..."); + LSTR MSG_MMU2_ALL = _UxGT("Alla"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Tråd ~"); + LSTR MSG_MMU2_RESET = _UxGT("Återställ MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("MMU Återställer..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Ta bort, Klicka"); - PROGMEM Language_Str MSG_MIX = _UxGT("Mixa"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Komponent ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Mixer"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Gradient"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Full Gradient"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Växla Mix"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Totera Mix"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Gradient Mix"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Omvänd Gradient"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Aktive V-verktyg"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Start V-verktyg"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" Slut V-verktyg"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias V-verktyg"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Återställ V-verktyg"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Kommitta V-verktyg Mix"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-verktyg blev Återställda"); - PROGMEM Language_Str MSG_START_Z = _UxGT("Start Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" Slut Z:"); + LSTR MSG_MIX = _UxGT("Mixa"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Komponent ="); + LSTR MSG_MIXER = _UxGT("Mixer"); + LSTR MSG_GRADIENT = _UxGT("Gradient"); + LSTR MSG_FULL_GRADIENT = _UxGT("Full Gradient"); + LSTR MSG_TOGGLE_MIX = _UxGT("Växla Mix"); + LSTR MSG_CYCLE_MIX = _UxGT("Totera Mix"); + LSTR MSG_GRADIENT_MIX = _UxGT("Gradient Mix"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Omvänd Gradient"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Aktive V-verktyg"); + LSTR MSG_START_VTOOL = _UxGT("Start V-verktyg"); + LSTR MSG_END_VTOOL = _UxGT(" Slut V-verktyg"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias V-verktyg"); + LSTR MSG_RESET_VTOOLS = _UxGT("Återställ V-verktyg"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Kommitta V-verktyg Mix"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-verktyg blev Återställda"); + LSTR MSG_START_Z = _UxGT("Start Z:"); + LSTR MSG_END_Z = _UxGT(" Slut Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Spel"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Labyrint"); + LSTR MSG_GAMES = _UxGT("Spel"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Labyrint"); - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("Dålig sida index"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Dålig sida hastighet"); + LSTR MSG_BAD_PAGE = _UxGT("Dålig sida index"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Dålig sida hastighet"); - PROGMEM Language_Str MSG_EDIT_PASSWORD = _UxGT("Redigera Lösenord"); - PROGMEM Language_Str MSG_LOGIN_REQUIRED = _UxGT("Login Krävs"); - PROGMEM Language_Str MSG_PASSWORD_SETTINGS = _UxGT("Lösenordsinställningar"); - PROGMEM Language_Str MSG_ENTER_DIGIT = _UxGT("Ange Siffra"); - PROGMEM Language_Str MSG_CHANGE_PASSWORD = _UxGT("Sätt/Redigera Lösenord"); - PROGMEM Language_Str MSG_REMOVE_PASSWORD = _UxGT("Ta bort Lösenord"); - PROGMEM Language_Str MSG_PASSWORD_SET = _UxGT("Lösenord är "); - PROGMEM Language_Str MSG_START_OVER = _UxGT("Börja om"); - PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Kom ihåg att Spara!"); - PROGMEM Language_Str MSG_PASSWORD_REMOVED = _UxGT("Lösenord Bort taget"); + LSTR MSG_EDIT_PASSWORD = _UxGT("Redigera Lösenord"); + LSTR MSG_LOGIN_REQUIRED = _UxGT("Login Krävs"); + LSTR MSG_PASSWORD_SETTINGS = _UxGT("Lösenordsinställningar"); + LSTR MSG_ENTER_DIGIT = _UxGT("Ange Siffra"); + LSTR MSG_CHANGE_PASSWORD = _UxGT("Sätt/Redigera Lösenord"); + LSTR MSG_REMOVE_PASSWORD = _UxGT("Ta bort Lösenord"); + LSTR MSG_PASSWORD_SET = _UxGT("Lösenord är "); + LSTR MSG_START_OVER = _UxGT("Börja om"); + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Kom ihåg att Spara!"); + LSTR MSG_PASSWORD_REMOVED = _UxGT("Lösenord Bort taget"); // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Tryck på knappen", "för att fortsätta utskrift")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkera...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Vänta på", "trådbyte", "att börja")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Sätt in tråd", "och tryck på knappen", "för att fortsätta")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Tryck på knappen", "för att värma munstycke")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Munstycke värms", "Var snäll och vänta...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Väntar på", "trådlossning")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Väntar på", "trådladdning")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Väntar på", "tråd utrensning")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Klicka för att slutföra", "tråd utrensning")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Väntar på utskrift", "att återstarta...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Tryck på knappen", "för att fortsätta utskrift")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkera...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Vänta på", "trådbyte", "att börja")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Sätt in tråd", "och tryck på knappen", "för att fortsätta")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Tryck på knappen", "för att värma munstycke")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Munstycke värms", "Var snäll och vänta...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Väntar på", "trådlossning")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Väntar på", "trådladdning")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Väntar på", "tråd utrensning")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Klicka för att slutföra", "tråd utrensning")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Väntar på utskrift", "att återstarta...")); #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Klick för att fortsätta")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkera...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Vänta...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Sätt in och klicka")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Klicka för att värma")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Värmer...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Lossar...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Laddar...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Rensar...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Klicka för att slutföra")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Återgår...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Klick för att fortsätta")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Parkera...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Vänta...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Sätt in och klicka")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Klicka för att värma")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Värmer...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Lossar...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Laddar...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Rensar...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Klicka för att slutföra")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Återgår...")); #endif - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC Drivers"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Driver Ström"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hybrid Tröskelvärde"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Sensorlös Hemning"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Stegningsläge"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("Smyghack Aktiverad"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Återställ"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" in:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Backlash"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Korrigering"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Glättning"); + LSTR MSG_TMC_DRIVERS = _UxGT("TMC Drivers"); + LSTR MSG_TMC_CURRENT = _UxGT("Driver Ström"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hybrid Tröskelvärde"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Sensorlös Hemning"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Stegningsläge"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("Smyghack Aktiverad"); + LSTR MSG_SERVICE_RESET = _UxGT("Återställ"); + LSTR MSG_SERVICE_IN = _UxGT(" in:"); + LSTR MSG_BACKLASH = _UxGT("Backlash"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Korrigering"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Glättning"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Nivå X Axel"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Auto Kalibrera"); + LSTR MSG_LEVEL_X_AXIS = _UxGT("Nivå X Axel"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Auto Kalibrera"); #if ENABLED(TOUCH_UI_FTDI_EVE) - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Overksam tidsgräns, temperatur minskning. Tryck ok för att återvärma och igen för att fortsätta."); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Overksam tidsgräns, temperatur minskning. Tryck ok för att återvärma och igen för att fortsätta."); #else - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Värmare Tidsgräns"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Värmare Tidsgräns"); #endif - PROGMEM Language_Str MSG_REHEAT = _UxGT("Återvärm"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Återvärmning..."); + LSTR MSG_REHEAT = _UxGT("Återvärm"); + LSTR MSG_REHEATING = _UxGT("Återvärmning..."); - PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Z Sond Wizard"); - PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Sondering Z Referens"); - PROGMEM Language_Str MSG_PROBE_WIZARD_MOVING = _UxGT("Flyttar till Sonderings Pos"); + LSTR MSG_PROBE_WIZARD = _UxGT("Z Sond Wizard"); + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Sondering Z Referens"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Flyttar till Sonderings Pos"); - PROGMEM Language_Str MSG_SOUND = _UxGT("Ljud"); + LSTR MSG_SOUND = _UxGT("Ljud"); - PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Uppe Vänster"); - PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Nere Vänster"); - PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Uppe Höger"); - PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Nere Höger"); - PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Kalibrering Färdig"); - PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Kalibrering Misslyckad"); + LSTR MSG_TOP_LEFT = _UxGT("Uppe Vänster"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Nere Vänster"); + LSTR MSG_TOP_RIGHT = _UxGT("Uppe Höger"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Nere Höger"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Kalibrering Färdig"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Kalibrering Misslyckad"); } diff --git a/Marlin/src/lcd/language/language_test.h b/Marlin/src/lcd/language/language_test.h index 16cafbebbe2e..20b5a7e686ab 100644 --- a/Marlin/src/lcd/language/language_test.h +++ b/Marlin/src/lcd/language/language_test.h @@ -116,121 +116,121 @@ namespace Language_test { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 1; + constexpr uint8_t CHARSIZE = 1; #if ENABLED(DISPLAYTEST) - PROGMEM Language_Str WELCOME_MSG = _UxGT("Language TEST"); + LSTR WELCOME_MSG = _UxGT("Language TEST"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Display test"); - PROGMEM Language_Str MSG_PREPARE = STRG_OKTAL_b; - PROGMEM Language_Str MSG_CONTROL = STRG_OKTAL_c; + LSTR MSG_INFO_SCREEN = _UxGT("Display test"); + LSTR MSG_PREPARE = STRG_OKTAL_b; + LSTR MSG_CONTROL = STRG_OKTAL_c; #endif #if ENABLED(WEST) - PROGMEM Language_Str WELCOME_MSG = _UxGT("Language TEST"); - - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("\001\002\003\004\005\006\007\010\011"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("UTF8"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("ASCII"); - - PROGMEM Language_Str MSG_MAIN = _UxGT(".."); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = STRG_C2_8; - PROGMEM Language_Str MSG_AUTO_HOME = STRG_C2_9; - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = STRG_C2_a; - PROGMEM Language_Str MSG_PREHEAT_1 = STRG_C2_b; - PROGMEM Language_Str MSG_PREHEAT_2 = STRG_C3_8; - PROGMEM Language_Str MSG_COOLDOWN = STRG_C3_9; - PROGMEM Language_Str MSG_SWITCH_PS_OFF = STRG_C3_a; - PROGMEM Language_Str MSG_MOVE_AXIS = STRG_C3_b; - - PROGMEM Language_Str MSG_MAIN = STRG_OKTAL_2; - PROGMEM Language_Str MSG_TEMPERATURE = STRG_OKTAL_3; - PROGMEM Language_Str MSG_MOTION = STRG_OKTAL_4; - PROGMEM Language_Str MSG_FILAMENT = STRG_OKTAL_5; - PROGMEM Language_Str MSG_CONTRAST = STRG_OKTAL_6; - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = STRG_OKTAL_7; - - PROGMEM Language_Str MSG_NOZZLE = STRG_OKTAL_8; - PROGMEM Language_Str MSG_NOZZLE_N = STRG_OKTAL_8 " ~"; - PROGMEM Language_Str MSG_FAN_SPEED = STRG_OKTAL_9; - PROGMEM Language_Str MSG_FAN_SPEED_N = STRG_OKTAL_9; - PROGMEM Language_Str MSG_AUTOTEMP = STRG_OKTAL_a; - PROGMEM Language_Str MSG_MIN = STRG_OKTAL_b; - PROGMEM Language_Str MSG_MAX = STRG_OKTAL_c; - PROGMEM Language_Str MSG_FACTOR = STRG_OKTAL_d; - PROGMEM Language_Str MSG_PID_P = STRG_OKTAL_e; - PROGMEM Language_Str MSG_PID_I = STRG_OKTAL_f; + LSTR WELCOME_MSG = _UxGT("Language TEST"); + + LSTR MSG_INFO_SCREEN = _UxGT("\001\002\003\004\005\006\007\010\011"); + LSTR MSG_PREPARE = _UxGT("UTF8"); + LSTR MSG_CONTROL = _UxGT("ASCII"); + + LSTR MSG_MAIN = _UxGT(".."); + LSTR MSG_DISABLE_STEPPERS = STRG_C2_8; + LSTR MSG_AUTO_HOME = STRG_C2_9; + LSTR MSG_SET_HOME_OFFSETS = STRG_C2_a; + LSTR MSG_PREHEAT_1 = STRG_C2_b; + LSTR MSG_PREHEAT_2 = STRG_C3_8; + LSTR MSG_COOLDOWN = STRG_C3_9; + LSTR MSG_SWITCH_PS_OFF = STRG_C3_a; + LSTR MSG_MOVE_AXIS = STRG_C3_b; + + LSTR MSG_MAIN = STRG_OKTAL_2; + LSTR MSG_TEMPERATURE = STRG_OKTAL_3; + LSTR MSG_MOTION = STRG_OKTAL_4; + LSTR MSG_FILAMENT = STRG_OKTAL_5; + LSTR MSG_CONTRAST = STRG_OKTAL_6; + LSTR MSG_RESTORE_DEFAULTS = STRG_OKTAL_7; + + LSTR MSG_NOZZLE = STRG_OKTAL_8; + LSTR MSG_NOZZLE_N = STRG_OKTAL_8 " ~"; + LSTR MSG_FAN_SPEED = STRG_OKTAL_9; + LSTR MSG_FAN_SPEED_N = STRG_OKTAL_9; + LSTR MSG_AUTOTEMP = STRG_OKTAL_a; + LSTR MSG_MIN = STRG_OKTAL_b; + LSTR MSG_MAX = STRG_OKTAL_c; + LSTR MSG_FACTOR = STRG_OKTAL_d; + LSTR MSG_PID_P = STRG_OKTAL_e; + LSTR MSG_PID_I = STRG_OKTAL_f; #endif #if ENABLED(CYRIL) - PROGMEM Language_Str WELCOME_MSG = _UxGT("Language TEST"); - - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("\001\002\003\004\005\006\007\010\011"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("UTF8"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("ASCII"); - - PROGMEM Language_Str MSG_MAIN = _UxGT(".."); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = STRG_D0_8; - PROGMEM Language_Str MSG_AUTO_HOME = STRG_D0_9; - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = STRG_D0_a; - PROGMEM Language_Str MSG_PREHEAT_1 = STRG_D0_b; - PROGMEM Language_Str MSG_PREHEAT_2 = STRG_D1_8; - PROGMEM Language_Str MSG_COOLDOWN = STRG_D1_9; - PROGMEM Language_Str MSG_SWITCH_PS_OFF = STRG_D1_a; - PROGMEM Language_Str MSG_MOVE_AXIS = STRG_D1_b; - - PROGMEM Language_Str MSG_MAIN = STRG_OKTAL_2; - PROGMEM Language_Str MSG_TEMPERATURE = STRG_OKTAL_3; - PROGMEM Language_Str MSG_MOTION = STRG_OKTAL_4; - PROGMEM Language_Str MSG_FILAMENT = STRG_OKTAL_5; - PROGMEM Language_Str MSG_CONTRAST = STRG_OKTAL_6; - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = STRG_OKTAL_7; - - PROGMEM Language_Str MSG_NOZZLE = STRG_OKTAL_8; - PROGMEM Language_Str MSG_NOZZLE_N = STRG_OKTAL_8 " ~"; - PROGMEM Language_Str MSG_FAN_SPEED_N = STRG_OKTAL_9; - PROGMEM Language_Str MSG_AUTOTEMP = STRG_OKTAL_a; - PROGMEM Language_Str MSG_MIN = STRG_OKTAL_b; - PROGMEM Language_Str MSG_MAX = STRG_OKTAL_c; - PROGMEM Language_Str MSG_FACTOR = STRG_OKTAL_d; - PROGMEM Language_Str MSG_PID_P = STRG_OKTAL_e; - PROGMEM Language_Str MSG_PID_I = STRG_OKTAL_f; + LSTR WELCOME_MSG = _UxGT("Language TEST"); + + LSTR MSG_INFO_SCREEN = _UxGT("\001\002\003\004\005\006\007\010\011"); + LSTR MSG_PREPARE = _UxGT("UTF8"); + LSTR MSG_CONTROL = _UxGT("ASCII"); + + LSTR MSG_MAIN = _UxGT(".."); + LSTR MSG_DISABLE_STEPPERS = STRG_D0_8; + LSTR MSG_AUTO_HOME = STRG_D0_9; + LSTR MSG_SET_HOME_OFFSETS = STRG_D0_a; + LSTR MSG_PREHEAT_1 = STRG_D0_b; + LSTR MSG_PREHEAT_2 = STRG_D1_8; + LSTR MSG_COOLDOWN = STRG_D1_9; + LSTR MSG_SWITCH_PS_OFF = STRG_D1_a; + LSTR MSG_MOVE_AXIS = STRG_D1_b; + + LSTR MSG_MAIN = STRG_OKTAL_2; + LSTR MSG_TEMPERATURE = STRG_OKTAL_3; + LSTR MSG_MOTION = STRG_OKTAL_4; + LSTR MSG_FILAMENT = STRG_OKTAL_5; + LSTR MSG_CONTRAST = STRG_OKTAL_6; + LSTR MSG_RESTORE_DEFAULTS = STRG_OKTAL_7; + + LSTR MSG_NOZZLE = STRG_OKTAL_8; + LSTR MSG_NOZZLE_N = STRG_OKTAL_8 " ~"; + LSTR MSG_FAN_SPEED_N = STRG_OKTAL_9; + LSTR MSG_AUTOTEMP = STRG_OKTAL_a; + LSTR MSG_MIN = STRG_OKTAL_b; + LSTR MSG_MAX = STRG_OKTAL_c; + LSTR MSG_FACTOR = STRG_OKTAL_d; + LSTR MSG_PID_P = STRG_OKTAL_e; + LSTR MSG_PID_I = STRG_OKTAL_f; #endif #if ENABLED(KANA) - PROGMEM Language_Str WELCOME_MSG = _UxGT("Language TEST"); - - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("\001\002\003\004\005\006\007\010\011"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("UTF8"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("ASCII"); - - PROGMEM Language_Str MSG_MAIN = _UxGT(".."); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = STRG_E382_8; - PROGMEM Language_Str MSG_AUTO_HOME = STRG_E382_9; - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = STRG_E382_a; - PROGMEM Language_Str MSG_PREHEAT_1 = STRG_E382_b; - PROGMEM Language_Str MSG_PREHEAT_2 = STRG_E383_8; - PROGMEM Language_Str MSG_COOLDOWN = STRG_E383_9; - PROGMEM Language_Str MSG_SWITCH_PS_OFF = STRG_E383_a; - PROGMEM Language_Str MSG_MOVE_AXIS = STRG_E383_b; - - PROGMEM Language_Str MSG_MAIN = STRG_OKTAL_2; - PROGMEM Language_Str MSG_TEMPERATURE = STRG_OKTAL_3; - PROGMEM Language_Str MSG_MOTION = STRG_OKTAL_4; - PROGMEM Language_Str MSG_FILAMENT = STRG_OKTAL_5; - PROGMEM Language_Str MSG_CONTRAST = STRG_OKTAL_6; - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = STRG_OKTAL_7; - - PROGMEM Language_Str MSG_NOZZLE = STRG_OKTAL_8; - PROGMEM Language_Str MSG_NOZZLE_N = STRG_OKTAL_8 " ~"; - PROGMEM Language_Str MSG_FAN_SPEED_N = STRG_OKTAL_9; - PROGMEM Language_Str MSG_AUTOTEMP = STRG_OKTAL_a; - PROGMEM Language_Str MSG_MIN = STRG_OKTAL_b; - PROGMEM Language_Str MSG_MAX = STRG_OKTAL_c; - PROGMEM Language_Str MSG_FACTOR = STRG_OKTAL_d; - PROGMEM Language_Str MSG_PID_P = STRG_OKTAL_e; - PROGMEM Language_Str MSG_PID_I = STRG_OKTAL_f; + LSTR WELCOME_MSG = _UxGT("Language TEST"); + + LSTR MSG_INFO_SCREEN = _UxGT("\001\002\003\004\005\006\007\010\011"); + LSTR MSG_PREPARE = _UxGT("UTF8"); + LSTR MSG_CONTROL = _UxGT("ASCII"); + + LSTR MSG_MAIN = _UxGT(".."); + LSTR MSG_DISABLE_STEPPERS = STRG_E382_8; + LSTR MSG_AUTO_HOME = STRG_E382_9; + LSTR MSG_SET_HOME_OFFSETS = STRG_E382_a; + LSTR MSG_PREHEAT_1 = STRG_E382_b; + LSTR MSG_PREHEAT_2 = STRG_E383_8; + LSTR MSG_COOLDOWN = STRG_E383_9; + LSTR MSG_SWITCH_PS_OFF = STRG_E383_a; + LSTR MSG_MOVE_AXIS = STRG_E383_b; + + LSTR MSG_MAIN = STRG_OKTAL_2; + LSTR MSG_TEMPERATURE = STRG_OKTAL_3; + LSTR MSG_MOTION = STRG_OKTAL_4; + LSTR MSG_FILAMENT = STRG_OKTAL_5; + LSTR MSG_CONTRAST = STRG_OKTAL_6; + LSTR MSG_RESTORE_DEFAULTS = STRG_OKTAL_7; + + LSTR MSG_NOZZLE = STRG_OKTAL_8; + LSTR MSG_NOZZLE_N = STRG_OKTAL_8 " ~"; + LSTR MSG_FAN_SPEED_N = STRG_OKTAL_9; + LSTR MSG_AUTOTEMP = STRG_OKTAL_a; + LSTR MSG_MIN = STRG_OKTAL_b; + LSTR MSG_MAX = STRG_OKTAL_c; + LSTR MSG_FACTOR = STRG_OKTAL_d; + LSTR MSG_PID_P = STRG_OKTAL_e; + LSTR MSG_PID_I = STRG_OKTAL_f; #endif } diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index a7a4056c0b2b..9525a952a115 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -37,496 +37,511 @@ namespace Language_tr { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Turkish"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Turkish"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" hazır."); - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("EVET"); - PROGMEM Language_Str MSG_NO = _UxGT("HAYIR"); - PROGMEM Language_Str MSG_BACK = _UxGT("Geri"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Durduruluyor..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("SD K. Yerleştirildi."); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("SD Kart Çıkarıldı."); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("SD Kart Bekleniyor"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Kart Okuma Hatası"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB Çıkarıldı"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB Başlat. Hatası"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Enstops"); // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Yazılımsal Endstops"); - PROGMEM Language_Str MSG_MAIN = _UxGT("Ana"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Gelişmiş Ayarlar"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Yapılandırma"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Oto. Başlat"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Motorları Durdur"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Hata Ayıklama"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Durum Çubuğu Testi"); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Eksenleri Sıfırla"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("X Sıfırla"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Y Sıfırla"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Z Sıfırla"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Oto. Z-Hizalama"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("XYZ Sıfırlanıyor"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Başlatmak için tıkla"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Sonraki Nokta"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Hizalama Tamam!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Kaçınma Yüksekliği"); - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Ofset Ayarla"); - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofset Tamam"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Sıfır Belirle"); + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" hazır."); + LSTR MSG_YES = _UxGT("EVET"); + LSTR MSG_NO = _UxGT("HAYIR"); + LSTR MSG_BACK = _UxGT("Geri"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Durduruluyor..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("SD K. Yerleştirildi."); + LSTR MSG_MEDIA_REMOVED = _UxGT("SD Kart Çıkarıldı."); + LSTR MSG_MEDIA_WAITING = _UxGT("SD Kart Bekleniyor"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Kart Okuma Hatası"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB Çıkarıldı"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB Başlat. Hatası"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Enstops"); // Max length 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Yazılımsal Endstops"); + LSTR MSG_MAIN = _UxGT("Ana"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Gelişmiş Ayarlar"); + LSTR MSG_CONFIGURATION = _UxGT("Yapılandırma"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Oto. Başlat"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Motorları Durdur"); + LSTR MSG_DEBUG_MENU = _UxGT("Hata Ayıklama"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Durum Çubuğu Testi"); + LSTR MSG_AUTO_HOME = _UxGT("Eksenleri Sıfırla"); + LSTR MSG_AUTO_HOME_X = _UxGT("X Sıfırla"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Y Sıfırla"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Z Sıfırla"); + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Oto. Z-Hizalama"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("XYZ Sıfırlanıyor"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Başlatmak için tıkla"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Sonraki Nokta"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Hizalama Tamam!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Kaçınma Yüksekliği"); + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Ofset Ayarla"); + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Ofset Tamam"); + LSTR MSG_SET_ORIGIN = _UxGT("Sıfır Belirle"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Ön Isınma ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Ön Isınma ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Nozul"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Nozul ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Tüm"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Tabla"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Ayarlar"); + LSTR MSG_PREHEAT_1 = _UxGT("Ön Isınma ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Ön Isınma ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Nozul"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Nozul ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Tüm"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Tabla"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Ön Isınma ") PREHEAT_1_LABEL _UxGT(" Ayarlar"); - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Ön Isınma $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Ön Isınma $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Ön Isınma $ Nozul"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Ön Isınma $ Nozul ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Ön Isınma $ Tüm"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Ön Isınma $ Tabla"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Ön Isınma $ Ayarlar"); + LSTR MSG_PREHEAT_M = _UxGT("Ön Isınma $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Ön Isınma $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Ön Isınma $ Nozul"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Ön Isınma $ Nozul ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Ön Isınma $ Tüm"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Ön Isınma $ Tabla"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Ön Isınma $ Ayarlar"); #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Özel Ön Isınma"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Soğut/(Durdur)"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Lazer Kontrolü"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Lazer Gücü"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Spindle Kontrolü"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Spindle Gücü"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Spindle Ters Yön"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Gücü Aç"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Gücü Kapat"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Ekstrüzyon"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Geri Çek"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Eksen Hareketleri"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Tabla Hizalama"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Tabla Hizası"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Hizalama Köşeleri"); - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Sonraki Köşe"); - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Mesh Editörü"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Mesh Düzenle"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Mesh Düzenleme Durdu"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Prop Noktası"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("İndeks X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("İndeks Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z Değeri"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Özel Komutlar"); - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 Prob Testi"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 Nokta"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Sapma"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX Modu"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Takım Ofsetleri"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Oto-Park"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Kopyala"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Yansıtılmış kopya"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Tam Kontrol"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2. nozul X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2. nozul Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2. nozul Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("G29 Çalışıyor"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL Araçları"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("UBL Yatak Hizalama"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Eğim Noktası"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Elle Mesh Oluştur"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Altlık & Ölçü Ver"); - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Ölçü"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Yataktan Ölçü Kaldır"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Sonrakine Git"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("UBL'yi Etkinleştir"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL'yi Etkisizleştir"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Yatak Sıcaklığı"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Yatak Sıcaklığı"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Nozul Sıcaklığı"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Nozul Sıcaklığı"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Mesh Düzenleme"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Özel Mesh Düzenleme"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("İnce Ayar Mesh"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Mesh Düzenleme Tamam"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Özel Mesh Oluştur"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Mesh Oluştur"); + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Özel Ön Isınma"); + LSTR MSG_COOLDOWN = _UxGT("Soğut/(Durdur)"); + LSTR MSG_LASER_MENU = _UxGT("Lazer Kontrolü"); + LSTR MSG_LASER_POWER = _UxGT("Lazer Gücü"); + LSTR MSG_SPINDLE_MENU = _UxGT("Spindle Kontrolü"); + LSTR MSG_SPINDLE_POWER = _UxGT("Spindle Gücü"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Spindle Ters Yön"); + LSTR MSG_SWITCH_PS_ON = _UxGT("Gücü Aç"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Gücü Kapat"); + LSTR MSG_EXTRUDE = _UxGT("Ekstrüzyon"); + LSTR MSG_RETRACT = _UxGT("Geri Çek"); + LSTR MSG_MOVE_AXIS = _UxGT("Eksen Hareketleri"); + LSTR MSG_BED_LEVELING = _UxGT("Tabla Hizalama"); + LSTR MSG_LEVEL_BED = _UxGT("Tabla Hizası"); + LSTR MSG_BED_TRAMMING = _UxGT("Hizalama Köşeleri"); + LSTR MSG_NEXT_CORNER = _UxGT("Sonraki Köşe"); + LSTR MSG_MESH_EDITOR = _UxGT("Mesh Editörü"); + LSTR MSG_EDIT_MESH = _UxGT("Mesh Düzenle"); + LSTR MSG_EDITING_STOPPED = _UxGT("Mesh Düzenleme Durdu"); + LSTR MSG_PROBING_POINT = _UxGT("Prop Noktası"); + LSTR MSG_MESH_X = _UxGT("İndeks X"); + LSTR MSG_MESH_Y = _UxGT("İndeks Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Z Değeri"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Özel Komutlar"); + LSTR MSG_M48_TEST = _UxGT("M48 Prob Testi"); + LSTR MSG_M48_POINT = _UxGT("M48 Nokta"); + LSTR MSG_M48_DEVIATION = _UxGT("Sapma"); + LSTR MSG_IDEX_MENU = _UxGT("IDEX Modu"); + LSTR MSG_OFFSETS_MENU = _UxGT("Takım Ofsetleri"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Oto-Park"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Kopyala"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Yansıtılmış kopya"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Tam Kontrol"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2. nozul X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2. nozul Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2. nozul Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("G29 Çalışıyor"); + LSTR MSG_UBL_TOOLS = _UxGT("UBL Araçları"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("UBL Yatak Hizalama"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Eğim Noktası"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Elle Mesh Oluştur"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Altlık & Ölçü Ver"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Ölçü"); + LSTR MSG_UBL_BC_REMOVE = _UxGT("Yataktan Ölçü Kaldır"); + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Sonrakine Git"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("UBL'yi Etkinleştir"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("UBL'yi Etkisizleştir"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Yatak Sıcaklığı"); + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Yatak Sıcaklığı"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Nozul Sıcaklığı"); + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Nozul Sıcaklığı"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Mesh Düzenleme"); + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Özel Mesh Düzenleme"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("İnce Ayar Mesh"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Mesh Düzenleme Tamam"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Özel Mesh Oluştur"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Mesh Oluştur"); #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Mesh Oluştur ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Doğrulama Mesh ($)"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Mesh Oluştur ($)"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Doğrulama Mesh ($)"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Soğuk Mesh Oluştur"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Mesh Yükseklik Ayarı"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Yükseklik miktarı"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Doğrulama Mesh"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Özel Mesh Doğrulama"); - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 Isıtma Tablası"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 Isıtma Memesi"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Manuel çalışma..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Birincil Sabit Uzunluk"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Çalışma Tamamlandı"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 İptal edildi"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Çıkış G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Tabla Mesh Devam et"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Mesh Hizalama"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Nokta Hizalama"); - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Kafes Mesh Hizalama"); - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Mesh Seviyesi"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Yan Noktalar"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Haritalama Türü"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Mesh Çıkış Haritası"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Host için Çıktı"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("CSV için Çıktı"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Yazıcıda Yedek Kpalı"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("UBL Çıkış Bilgisi"); - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Dolgu Miktarı"); - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Manuel Dolgu"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Akıllı Dogu"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Mesh Dolgu"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Tümünü Geçersiz Kıl"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Yakını Geçersiz Kıl"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Tümünü İnce Ayarla"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Yakını İnce Ayarla"); - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Depolama"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Bellek Yuvası"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Yatak Mesh Yükle"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Yatak Mesh Kayıt Et"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Mesh %i yüklendi"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Mesh %i kayıtlandı"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Depolama Yok"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Hata: UBL Kayıt"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Hata: UBL Yenileme"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-Ofset: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Ofset Durduruldu"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Adım Adım UBL"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Soğuk Mesh Oluştur"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Akıllı Dogu"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Doğrulama Mesh"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Tümünü İnce Ayarla"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Doğrulama Mesh"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Tümünü İnce Ayarla"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Yatak Mesh Kayıt Et"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Soğuk Mesh Oluştur"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Mesh Yükseklik Ayarı"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Yükseklik miktarı"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Doğrulama Mesh"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Özel Mesh Doğrulama"); + LSTR MSG_G26_HEATING_BED = _UxGT("G26 Isıtma Tablası"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 Isıtma Memesi"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Manuel çalışma..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Birincil Sabit Uzunluk"); + LSTR MSG_G26_PRIME_DONE = _UxGT("Çalışma Tamamlandı"); + LSTR MSG_G26_CANCELED = _UxGT("G26 İptal edildi"); + LSTR MSG_G26_LEAVING = _UxGT("Çıkış G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Tabla Mesh Devam et"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Mesh Hizalama"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-Nokta Hizalama"); + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Kafes Mesh Hizalama"); + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Mesh Seviyesi"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Yan Noktalar"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Haritalama Türü"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Mesh Çıkış Haritası"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Host için Çıktı"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("CSV için Çıktı"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Yazıcıda Yedek Kpalı"); + LSTR MSG_UBL_INFO_UBL = _UxGT("UBL Çıkış Bilgisi"); + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Dolgu Miktarı"); + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Manuel Dolgu"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Akıllı Dogu"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Mesh Dolgu"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Tümünü Geçersiz Kıl"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Yakını Geçersiz Kıl"); + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Tümünü İnce Ayarla"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Yakını İnce Ayarla"); + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Mesh Depolama"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Bellek Yuvası"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Yatak Mesh Yükle"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Yatak Mesh Kayıt Et"); + LSTR MSG_MESH_LOADED = _UxGT("Mesh %i yüklendi"); + LSTR MSG_MESH_SAVED = _UxGT("Mesh %i kayıtlandı"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Depolama Yok"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Hata: UBL Kayıt"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Hata: UBL Yenileme"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-Ofset: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z-Ofset Durduruldu"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Adım Adım UBL"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Soğuk Mesh Oluştur"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Akıllı Dogu"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Doğrulama Mesh"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Tümünü İnce Ayarla"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Doğrulama Mesh"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Tümünü İnce Ayarla"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Yatak Mesh Kayıt Et"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("LED Kontrolü"); - PROGMEM Language_Str MSG_LEDS = _UxGT("LEDler"); - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("LED Hazır Ayarları"); - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Kırmızı"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Turuncu"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Sarı"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Yeşil"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Mavi"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Lacivert"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Menekşe"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Beyaz"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Varsayılan"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Özel Işıklar"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Kırmızı Şiddeti"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Yeşil Şiddeti"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Mavi Şiddeti"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Beyaz Şiddeti"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Parlaklık"); + LSTR MSG_LED_CONTROL = _UxGT("LED Kontrolü"); + LSTR MSG_LEDS = _UxGT("LEDler"); + LSTR MSG_LED_PRESETS = _UxGT("LED Hazır Ayarları"); + LSTR MSG_SET_LEDS_RED = _UxGT("Kırmızı"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Turuncu"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Sarı"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Yeşil"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Mavi"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Lacivert"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Menekşe"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Beyaz"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Varsayılan"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Özel Işıklar"); + LSTR MSG_INTENSITY_R = _UxGT("Kırmızı Şiddeti"); + LSTR MSG_INTENSITY_G = _UxGT("Yeşil Şiddeti"); + LSTR MSG_INTENSITY_B = _UxGT("Mavi Şiddeti"); + LSTR MSG_INTENSITY_W = _UxGT("Beyaz Şiddeti"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Parlaklık"); - PROGMEM Language_Str MSG_MOVING = _UxGT("Hareket Ediyor.."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Durdur XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("X Hareketi"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Y Hareketi"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Z Hareketi"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Ekstruder"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Ekstruder *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Nozul Çok Soğuk"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("%smm"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("0.1mm"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("1mm"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("10mm"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Hız"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Z Mesafesi"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Nozul"); - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Nozul ~"); - PROGMEM Language_Str MSG_BED = _UxGT("Tabla"); - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Çevirme"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Fan Hızı"); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Fan Hızı ~"); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Depolanan Fan ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Ekstra Fan Hızı"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Ekstra Fan Hızı ~"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Akış"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Akış ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Kontrol"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Çarpan"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Oto. Sıcaklık"); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Açık"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Kapalı"); - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("PID Kalibrasyon"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("PID Kalibrasyon *"); - PROGMEM Language_Str MSG_SELECT = _UxGT("Seç"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Seç *"); - PROGMEM Language_Str MSG_ACC = _UxGT("İvme"); + LSTR MSG_MOVING = _UxGT("Hareket Ediyor.."); + LSTR MSG_FREE_XY = _UxGT("Durdur XY"); + LSTR MSG_MOVE_X = _UxGT("X Hareketi"); + LSTR MSG_MOVE_Y = _UxGT("Y Hareketi"); + LSTR MSG_MOVE_Z = _UxGT("Z Hareketi"); + LSTR MSG_MOVE_E = _UxGT("Ekstruder"); + LSTR MSG_MOVE_EN = _UxGT("Ekstruder *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Nozul Çok Soğuk"); + LSTR MSG_MOVE_N_MM = _UxGT("%smm"); + LSTR MSG_MOVE_01MM = _UxGT("0.1mm"); + LSTR MSG_MOVE_1MM = _UxGT("1mm"); + LSTR MSG_MOVE_10MM = _UxGT("10mm"); + LSTR MSG_MOVE_100MM = _UxGT("100mm"); + LSTR MSG_SPEED = _UxGT("Hız"); + LSTR MSG_BED_Z = _UxGT("Z Mesafesi"); + LSTR MSG_NOZZLE = _UxGT("Nozul"); + LSTR MSG_NOZZLE_N = _UxGT("Nozul ~"); + LSTR MSG_BED = _UxGT("Tabla"); + LSTR MSG_CHAMBER = _UxGT("Çevirme"); + LSTR MSG_FAN_SPEED = _UxGT("Fan Hızı"); + LSTR MSG_FAN_SPEED_N = _UxGT("Fan Hızı ~"); + LSTR MSG_STORED_FAN_N = _UxGT("Depolanan Fan ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Ekstra Fan Hızı"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Ekstra Fan Hızı ~"); + LSTR MSG_FLOW = _UxGT("Akış"); + LSTR MSG_FLOW_N = _UxGT("Akış ~"); + LSTR MSG_CONTROL = _UxGT("Kontrol"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Min"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Max"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Çarpan"); + LSTR MSG_AUTOTEMP = _UxGT("Oto. Sıcaklık"); + LSTR MSG_LCD_ON = _UxGT("Açık"); + LSTR MSG_LCD_OFF = _UxGT("Kapalı"); + LSTR MSG_PID_AUTOTUNE = _UxGT("PID Kalibrasyon"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("PID Kalibrasyon *"); + LSTR MSG_SELECT = _UxGT("Seç"); + LSTR MSG_SELECT_E = _UxGT("Seç *"); + LSTR MSG_ACC = _UxGT("İvme"); - PROGMEM Language_Str MSG_JERK = _UxGT("Sarsım"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Sarsım"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Sarsım"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Sarsım"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-Sarsım"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Jonksiyon Sapması"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Hız Vektörü"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("HızVektör.max ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("HızVektör.max ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("HızVektör.max ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("HızVektör.max ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("HızVektör.max *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("HızVektör.min"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("HV.gezinme min"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Ivme"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Max. ivme ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Max. ivme ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Max. ivme ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Max. ivme ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Max. ivme *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Ivme-geri çekme"); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Ivme-gezinme"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Adım/mm"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" adım/mm"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" adım/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" adım/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E adım/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* adım/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Sıcaklık"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Hareket"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Filaman"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("Ekstrüzyon/mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Filaman Çapı"); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Filaman Çapı *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Çıkart mm"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Yükle mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("K İlerlet"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("K İlerlet *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD Kontrast"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Hafızaya Al"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Hafızadan Yükle"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Fabrika Ayarları"); - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("EEPROM'u başlat"); - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("Hata: EEPROM CRC"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("Hata: EEPROM Indeks"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("Hata: EEPROM Versiyonu"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("SD Güncellemesi"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Yazıcıyı Resetle"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Yenile"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Bilgi Ekranı"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Hazırlık"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Ayar"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Yaz. Başlat"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("İleri"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("İçinde"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Durdur"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Yazdır"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Resetle"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("İptal"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Tamamlandı"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Geri"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Devam ediyor"); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Duraklat"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Sürdür"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Durdur"); - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Yazdırma Nesnesi"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Nesneyi İptal Et"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Kesinti Kurtarma"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("SD Karttan Yazdır"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("SD Kart Yok!"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Uyku..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Operatör bekleniyor."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Baskı Duraklatıldı"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Baskı Yapılıyor..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Baskı Durduruldu!"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("İşlem yok."); - PROGMEM Language_Str MSG_KILLED = _UxGT("Kilitlendi. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("Durdu. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Geri Çek mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Re.mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Geri Çekme V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Atlama mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Oto. Geri Çekme"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("G.Çekme Boyu"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Tasfiye uzunluğu"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Takım Değişimi"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Yükselt"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Birincil Hız"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Geri Çekme Hızı"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Nozul Beklemede"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Filaman Değiştir"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Filaman Değiştir *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Filaman Yükle"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Filaman Yükle *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Filaman Çıkart"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Filaman Çıkart *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Tümünü Çıkart"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("SD Kart Başlatılıyor"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("SD Kart Değiştir"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("SD Kart Çıkart"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z Prob Açık. Tabla"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Çarpıklık Faktörü"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch K. Test"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Reset"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Kapat"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Aç"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("SW-Modu"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("5V-Modu"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("OD-Modu"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("BLTouch 5V Ayarla"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("BLTouch OD Ayarla"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Drenaj Raporu"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("TEHLIKE: Kötü ayarlar hasara neden olabilir! Yine de devam edilsin mi?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Init TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Z Ofset Testi"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Kaydet"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI Aç"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Z-Probe Aç"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Z-Probe Kapat"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Önce %s%s%s Sıfırla"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Prob Ofsetleri"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("X Prob Ofset"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Y Prob Ofset"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Z Prob Ofset"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Miniadım X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Miniadım Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Miniadım Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Toplam"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Endstop iptal"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Isınma başarısız"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Hata: Sıcaklık Aşımı"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("TERMAL PROBLEM"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("TABLA TERMAL PROBLEM"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ODA TERMAL PROBLEM"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Hata: MAX.SICAKLIK"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Hata: MIN.SICAKLIK"); - PROGMEM Language_Str MSG_HALTED = _UxGT("YAZICI DURDURULDU"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Lütfen Resetleyin"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("G"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("S"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("D"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Isınıyor..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Soğuyor..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Tabla Isınıyor..."); - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Tabla Soğuyor..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Oda Isınıyor..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Oda Soğuyor..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrasyonu"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Ayarla X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Ayarla Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Ayarla Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Ayarla Merkez"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Delta Ayarları"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Oto Kalibrasyon"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta Yük. Ayarla"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z Prob Ofseti"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Çapral Mil"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Yükseklik"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Yarıçap"); - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Yazıcı Hakkında"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Yazıcı Bilgisi"); - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-Nokta Hizalama"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Doğrusal Hizalama"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("İki Yönlü Doğ. Hiza."); - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("Birleşik Tabla Hiza."); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Mesh Hizalama"); - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("İstatistikler"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Kontrolcü Bilgisi"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Termistörler"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Ekstruderler"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("İletişim Hızı"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Protokol"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Aydınlatmayı Aç"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Aydınlatma Parlaklğı"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("Yanlış Yazıcı"); + LSTR MSG_JERK = _UxGT("Sarsım"); + LSTR MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-Sarsım"); + LSTR MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-Sarsım"); + LSTR MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-Sarsım"); + LSTR MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-Sarsım"); + LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-Sarsım"); + LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-Sarsım"); + LSTR MSG_VE_JERK = _UxGT("Ve-Sarsım"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Jonksiyon Sapması"); + LSTR MSG_VELOCITY = _UxGT("Hız Vektörü"); + LSTR MSG_VMAX_A = _UxGT("HızVektör.max ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("HızVektör.max ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("HızVektör.max ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("HızVektör.max ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("HızVektör.max ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("HızVektör.max ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("HızVektör.max ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("HızVektör.max *"); + LSTR MSG_VMIN = _UxGT("HızVektör.min"); + LSTR MSG_VTRAV_MIN = _UxGT("HV.gezinme min"); + LSTR MSG_ACCELERATION = _UxGT("Ivme"); + LSTR MSG_AMAX_A = _UxGT("Max. ivme ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Max. ivme ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Max. ivme ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Max. ivme ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Max. ivme ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Max. ivme ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Max. ivme ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Max. ivme *"); + LSTR MSG_A_RETRACT = _UxGT("Ivme-geri çekme"); + LSTR MSG_A_TRAVEL = _UxGT("Ivme-gezinme"); + LSTR MSG_STEPS_PER_MM = _UxGT("Adım/mm"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" adım/mm"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" adım/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" adım/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" adım/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" adım/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" adım/mm"); + LSTR MSG_E_STEPS = _UxGT("E adım/mm"); + LSTR MSG_EN_STEPS = _UxGT("* adım/mm"); + LSTR MSG_TEMPERATURE = _UxGT("Sıcaklık"); + LSTR MSG_MOTION = _UxGT("Hareket"); + LSTR MSG_FILAMENT = _UxGT("Filaman"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("Ekstrüzyon/mm") SUPERSCRIPT_THREE; + LSTR MSG_FILAMENT_DIAM = _UxGT("Filaman Çapı"); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Filaman Çapı *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Çıkart mm"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Yükle mm"); + LSTR MSG_ADVANCE_K = _UxGT("K İlerlet"); + LSTR MSG_ADVANCE_K_E = _UxGT("K İlerlet *"); + LSTR MSG_CONTRAST = _UxGT("LCD Kontrast"); + LSTR MSG_STORE_EEPROM = _UxGT("Hafızaya Al"); + LSTR MSG_LOAD_EEPROM = _UxGT("Hafızadan Yükle"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Fabrika Ayarları"); + LSTR MSG_INIT_EEPROM = _UxGT("EEPROM'u başlat"); + LSTR MSG_ERR_EEPROM_CRC = _UxGT("Hata: EEPROM CRC"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Hata: EEPROM Indeks"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Hata: EEPROM Versiyonu"); + LSTR MSG_MEDIA_UPDATE = _UxGT("SD Güncellemesi"); + LSTR MSG_RESET_PRINTER = _UxGT("Yazıcıyı Resetle"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Yenile"); + LSTR MSG_INFO_SCREEN = _UxGT("Bilgi Ekranı"); + LSTR MSG_PREPARE = _UxGT("Hazırlık"); + LSTR MSG_TUNE = _UxGT("Ayar"); + LSTR MSG_START_PRINT = _UxGT("Yaz. Başlat"); + LSTR MSG_BUTTON_NEXT = _UxGT("İleri"); + LSTR MSG_BUTTON_INIT = _UxGT("İçinde"); + LSTR MSG_BUTTON_STOP = _UxGT("Durdur"); + LSTR MSG_BUTTON_PRINT = _UxGT("Yazdır"); + LSTR MSG_BUTTON_RESET = _UxGT("Resetle"); + LSTR MSG_BUTTON_CANCEL = _UxGT("İptal"); + LSTR MSG_BUTTON_DONE = _UxGT("Tamamlandı"); + LSTR MSG_BUTTON_BACK = _UxGT("Geri"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Devam ediyor"); + LSTR MSG_PAUSE_PRINT = _UxGT("Duraklat"); + LSTR MSG_RESUME_PRINT = _UxGT("Sürdür"); + LSTR MSG_STOP_PRINT = _UxGT("Durdur"); + LSTR MSG_PRINTING_OBJECT = _UxGT("Yazdırma Nesnesi"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Nesneyi İptal Et"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Nesneyi İptal Et ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Kesinti Kurtarma"); + LSTR MSG_MEDIA_MENU = _UxGT("SD Karttan Yazdır"); + LSTR MSG_NO_MEDIA = _UxGT("SD Kart Yok!"); + LSTR MSG_DWELL = _UxGT("Uyku..."); + LSTR MSG_USERWAIT = _UxGT("Operatör bekleniyor."); + LSTR MSG_PRINT_PAUSED = _UxGT("Baskı Duraklatıldı"); + LSTR MSG_PRINTING = _UxGT("Baskı Yapılıyor..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Baskı Durduruldu!"); + LSTR MSG_NO_MOVE = _UxGT("İşlem yok."); + LSTR MSG_KILLED = _UxGT("Kilitlendi. "); + LSTR MSG_STOPPED = _UxGT("Durdu. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Geri Çek mm"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Swap Re.mm"); + LSTR MSG_CONTROL_RETRACTF = _UxGT("Geri Çekme V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Atlama mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("S Unretr. mm"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Unretract V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); + LSTR MSG_AUTORETRACT = _UxGT("Oto. Geri Çekme"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("G.Çekme Boyu"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Tasfiye uzunluğu"); + LSTR MSG_TOOL_CHANGE = _UxGT("Takım Değişimi"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z Yükselt"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Birincil Hız"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Geri Çekme Hızı"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Nozul Beklemede"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Filaman Değiştir"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Filaman Değiştir *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Filaman Yükle"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Filaman Yükle *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Filaman Çıkart"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Filaman Çıkart *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Tümünü Çıkart"); + LSTR MSG_ATTACH_MEDIA = _UxGT("SD Kart Başlatılıyor"); + LSTR MSG_CHANGE_MEDIA = _UxGT("SD Kart Değiştir"); + LSTR MSG_RELEASE_MEDIA = _UxGT("SD Kart Çıkart"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z Prob Açık. Tabla"); + LSTR MSG_SKEW_FACTOR = _UxGT("Çarpıklık Faktörü"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch K. Test"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Reset"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Kapat"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Aç"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("SW-Modu"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("5V-Modu"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("OD-Modu"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Mode-Store"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("BLTouch 5V Ayarla"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("BLTouch OD Ayarla"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Drenaj Raporu"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("TEHLIKE: Kötü ayarlar hasara neden olabilir! Yine de devam edilsin mi?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Init TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Z Ofset Testi"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Kaydet"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("TouchMI Aç"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Z-Probe Aç"); + LSTR MSG_MANUAL_STOW = _UxGT("Z-Probe Kapat"); + LSTR MSG_HOME_FIRST = _UxGT("Önce %s%s%s Sıfırla"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Prob Ofsetleri"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("X Prob Ofset"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Y Prob Ofset"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Z Prob Ofset"); + LSTR MSG_BABYSTEP_X = _UxGT("Miniadım X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Miniadım Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Miniadım Z"); + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Toplam"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Endstop iptal"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Isınma başarısız"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Hata: Sıcaklık Aşımı"); + LSTR MSG_THERMAL_RUNAWAY = _UxGT("TERMAL PROBLEM"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("TABLA TERMAL PROBLEM"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ODA TERMAL PROBLEM"); + LSTR MSG_ERR_MAXTEMP = _UxGT("Hata: MAX.SICAKLIK"); + LSTR MSG_ERR_MINTEMP = _UxGT("Hata: MIN.SICAKLIK"); + LSTR MSG_HALTED = _UxGT("YAZICI DURDURULDU"); + LSTR MSG_PLEASE_RESET = _UxGT("Lütfen Resetleyin"); + LSTR MSG_SHORT_DAY = _UxGT("G"); // One character only + LSTR MSG_SHORT_HOUR = _UxGT("S"); // One character only + LSTR MSG_SHORT_MINUTE = _UxGT("D"); // One character only + LSTR MSG_HEATING = _UxGT("Isınıyor..."); + LSTR MSG_COOLING = _UxGT("Soğuyor..."); + LSTR MSG_BED_HEATING = _UxGT("Tabla Isınıyor..."); + LSTR MSG_BED_COOLING = _UxGT("Tabla Soğuyor..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Oda Isınıyor..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Oda Soğuyor..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("Delta Kalibrasyonu"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Ayarla X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Ayarla Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Ayarla Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Ayarla Merkez"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Delta Ayarları"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Oto Kalibrasyon"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Delta Yük. Ayarla"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z Prob Ofseti"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Çapral Mil"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Yükseklik"); + LSTR MSG_DELTA_RADIUS = _UxGT("Yarıçap"); + LSTR MSG_INFO_MENU = _UxGT("Yazıcı Hakkında"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Yazıcı Bilgisi"); + LSTR MSG_3POINT_LEVELING = _UxGT("3-Nokta Hizalama"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Doğrusal Hizalama"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("İki Yönlü Doğ. Hiza."); + LSTR MSG_UBL_LEVELING = _UxGT("Birleşik Tabla Hiza."); + LSTR MSG_MESH_LEVELING = _UxGT("Mesh Hizalama"); + LSTR MSG_INFO_STATS_MENU = _UxGT("İstatistikler"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Kontrolcü Bilgisi"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Termistörler"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Ekstruderler"); + LSTR MSG_INFO_BAUDRATE = _UxGT("İletişim Hızı"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Protokol"); + LSTR MSG_CASE_LIGHT = _UxGT("Aydınlatmayı Aç"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Aydınlatma Parlaklğı"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("Yanlış Yazıcı"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Baskı Sayısı"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Tamamlanan"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Toplam Baskı Süresi"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("En Uzun Baskı Süresi"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Toplam Filaman"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Baskı Sayısı"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Tamamlanan"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Toplam Baskı Süresi"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("En Uzun Baskı Süresi"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Toplam Filaman"); #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Baskı"); - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Tamamlanan"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Süre"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("En Uzun"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Filaman"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Baskı"); + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Tamamlanan"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Süre"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("En Uzun"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Filaman"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Min Sıc."); - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Max Sıc."); - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Güç Kaynağı"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Sürücü Gücü"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X Sürücü %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y Sürücü %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z Sürücü %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E Sürücü %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC BAĞLANTI HATASI"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Yaz"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("FILAMAN DEGISTIR"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("BASKI DURAKLATILDI"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("FILAMAN YüKLE"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("FILAMAN ÇIKART"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("Seçenekler:"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Daha Fazla Tasviye"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Baskıyı sürdür"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozul: "); - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Runout Sensörü"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Aşınma Farkı mm"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Sıfırlama Başarısız"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Probing Başarısız"); + LSTR MSG_INFO_MIN_TEMP = _UxGT("Min Sıc."); + LSTR MSG_INFO_MAX_TEMP = _UxGT("Max Sıc."); + LSTR MSG_INFO_PSU = _UxGT("Güç Kaynağı"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Sürücü Gücü"); + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" Sürücü %"); + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" Sürücü %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" Sürücü %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" Sürücü %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" Sürücü %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" Sürücü %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E Sürücü %"); + LSTR MSG_ERROR_TMC = _UxGT("TMC BAĞLANTI HATASI"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("DAC EEPROM Yaz"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("FILAMAN DEGISTIR"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("BASKI DURAKLATILDI"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("FILAMAN YüKLE"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("FILAMAN ÇIKART"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("Seçenekler:"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Daha Fazla Tasviye"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Baskıyı sürdür"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Nozul: "); + LSTR MSG_RUNOUT_SENSOR = _UxGT("Runout Sensörü"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Aşınma Farkı mm"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Sıfırlama Başarısız"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Probing Başarısız"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("FILAMAN SEÇ"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("MMU Yaz. Güncelle!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Dikkat Gerektirir."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("Yaz. Devam Et"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("Sürdürülüyor..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("Filaman Yükle"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("Tümünü Yükle"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Nozula Yükle"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("Filaman Çıkart"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Filaman Çıkart ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Filamenti Boşalt"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("Fil. Yükleniyor %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("Fil Çıkartılıyor. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Fil. Boşaltılıyor...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("Tümü"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("Filaman ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("MMU Resetle"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("MMU Resetleniyot..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("Kaldır, tıkla"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("FILAMAN SEÇ"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("MMU Yaz. Güncelle!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU Dikkat Gerektirir."); + LSTR MSG_MMU2_RESUME = _UxGT("Yaz. Devam Et"); + LSTR MSG_MMU2_RESUMING = _UxGT("Sürdürülüyor..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("Filaman Yükle"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("Tümünü Yükle"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("Nozula Yükle"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("Filaman Çıkart"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("Filaman Çıkart ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("Filamenti Boşalt"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Fil. Yükleniyor %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Fil Çıkartılıyor. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Fil. Boşaltılıyor...."); + LSTR MSG_MMU2_ALL = _UxGT("Tümü"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Filaman ~"); + LSTR MSG_MMU2_RESET = _UxGT("MMU Resetle"); + LSTR MSG_MMU2_RESETTING = _UxGT("MMU Resetleniyot..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Kaldır, tıkla"); - PROGMEM Language_Str MSG_MIX = _UxGT("Karışım"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Bileşen ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Karıştırıcı"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Gradyan"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Tam Gradyan"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Karışım Geçişi"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Döngü Karışımı"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Gradyan Karışımı"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Ters Gradyan"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Aktif V-tool"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Başlat V-tool"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" Bitir V-tool"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Reset V-tools"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("V-tool Karışıö Yap"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-tools Resetlendi"); - PROGMEM Language_Str MSG_START_Z = _UxGT("Başlat Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" Bitir Z:"); + LSTR MSG_MIX = _UxGT("Karışım"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Bileşen ="); + LSTR MSG_MIXER = _UxGT("Karıştırıcı"); + LSTR MSG_GRADIENT = _UxGT("Gradyan"); + LSTR MSG_FULL_GRADIENT = _UxGT("Tam Gradyan"); + LSTR MSG_TOGGLE_MIX = _UxGT("Karışım Geçişi"); + LSTR MSG_CYCLE_MIX = _UxGT("Döngü Karışımı"); + LSTR MSG_GRADIENT_MIX = _UxGT("Gradyan Karışımı"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Ters Gradyan"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Aktif V-tool"); + LSTR MSG_START_VTOOL = _UxGT("Başlat V-tool"); + LSTR MSG_END_VTOOL = _UxGT(" Bitir V-tool"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Alias V-tool"); + LSTR MSG_RESET_VTOOLS = _UxGT("Reset V-tools"); + LSTR MSG_COMMIT_VTOOL = _UxGT("V-tool Karışıö Yap"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-tools Resetlendi"); + LSTR MSG_START_Z = _UxGT("Başlat Z:"); + LSTR MSG_END_Z = _UxGT(" Bitir Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("Oyunlar"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Brickout"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Invaders"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Sn4k3"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Maze"); + LSTR MSG_GAMES = _UxGT("Oyunlar"); + LSTR MSG_BRICKOUT = _UxGT("Brickout"); + LSTR MSG_INVADERS = _UxGT("Invaders"); + LSTR MSG_SNAKE = _UxGT("Sn4k3"); + LSTR MSG_MAZE = _UxGT("Maze"); // // Filament Değişim ekranları 4 satırlı ekranda 3 satıra kadar gösterilir @@ -534,44 +549,41 @@ namespace Language_tr { // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Baskıya devam etmek", "için Butona bas")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Park Ediliyor...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Filaman değişimi", "için başlama", "bekleniyor")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Filamanı yükle", "ve devam için", "tuşa bas...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Nozulü Isıtmak için", "Butona Bas.")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nozul Isınıyor", "Lütfen Bekleyin...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Filamanın çıkması", "bekleniyor")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Filamanın yüklenmesi", "bekleniyor..")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Filaman Temizlemesi", "için bekle")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Filaman Temizlemesi", "bitirmek için tıkla")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Baskının devam ", "etmesi için bekle")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Baskıya devam etmek", "için Butona bas")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Park Ediliyor...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Filaman değişimi", "için başlama", "bekleniyor")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Filamanı yükle", "ve devam için", "tuşa bas...")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Nozulü Isıtmak için", "Butona Bas.")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Nozul Isınıyor", "Lütfen Bekleyin...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Filamanın çıkması", "bekleniyor")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Filamanın yüklenmesi", "bekleniyor..")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Filaman Temizlemesi", "için bekle")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Filaman Temizlemesi", "bitirmek için tıkla")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Baskının devam ", "etmesi için bekle")); #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Sürdürmek İçin Tıkla")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Park Ediliyor...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Lütfen bekleyiniz...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Yükle ve bas")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Isıtmak için Tıkla")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Isınıyor...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Çıkartılıyor...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Yüklüyor...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Temizleniyor...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Bitirmek için Tıkla")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Sürdürülüyor...")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Sürdürmek İçin Tıkla")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Park Ediliyor...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Lütfen bekleyiniz...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Yükle ve bas")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Isıtmak için Tıkla")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Isınıyor...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Çıkartılıyor...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Yüklüyor...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Temizleniyor...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Bitirmek için Tıkla")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Sürdürülüyor...")); #endif - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC Sürücüleri"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Sürücü Akımı"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Hibrit Eşiği"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Sensörsüz Sıfırlama"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Adım Modu"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Aktif"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Resetle"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" içinde:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Ters Tepki"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Düzeltme"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Yumuşatma"); + LSTR MSG_TMC_DRIVERS = _UxGT("TMC Sürücüleri"); + LSTR MSG_TMC_CURRENT = _UxGT("Sürücü Akımı"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Hibrit Eşiği"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Sensörsüz Sıfırlama"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Adım Modu"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop Aktif"); + LSTR MSG_SERVICE_RESET = _UxGT("Resetle"); + LSTR MSG_SERVICE_IN = _UxGT(" içinde:"); + LSTR MSG_BACKLASH = _UxGT("Ters Tepki"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Düzeltme"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Yumuşatma"); } #if FAN_COUNT == 1 diff --git a/Marlin/src/lcd/language/language_uk.h b/Marlin/src/lcd/language/language_uk.h index 069ad7066df1..4cfe96930715 100644 --- a/Marlin/src/lcd/language/language_uk.h +++ b/Marlin/src/lcd/language/language_uk.h @@ -33,801 +33,883 @@ namespace Language_uk { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Ukranian"); - - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Готовий."); - PROGMEM Language_Str MSG_YES = _UxGT("ТАК"); - PROGMEM Language_Str MSG_NO = _UxGT("НІ"); - PROGMEM Language_Str MSG_BACK = _UxGT("Назад"); - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Переривання..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("SD-картка вставлена"); - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("SD-картка видалена"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Вставте SD-картку"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("Збій ініціалізації SD"); - #else - PROGMEM Language_Str MSG_SD_INIT_FAIL = _UxGT("Збій ініціаліз. SD"); - #endif - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Помилка зчитування"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB диск видалений"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("Помилка USB диску"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переповнення виклику"); - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Програмні кінцевики"); - #else - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переповн. виклику"); - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Прогр.кінцевики"); - #endif - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Кінцевик"); // Max length 8 characters - PROGMEM Language_Str MSG_MAIN = _UxGT("Основне меню"); - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Інші налаштування"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Конфігурація"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Вимкнути двигуни"); - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Меню Debug"); - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Тест лінії прогр."); - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Авто паркування"); - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Паркування X"); - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Паркування Y"); - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Паркування Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Авто Z-вирівнювання"); - PROGMEM Language_Str MSG_ITERATION = _UxGT("G34 Ітерація: %i"); - PROGMEM Language_Str MSG_DECREASING_ACCURACY = _UxGT("Зменьшення точності!"); - PROGMEM Language_Str MSG_ACCURACY_ACHIEVED = _UxGT("Точність досягнута"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Паркування XYZ"); - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Почати"); - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Наступна точка"); - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("Завершено!"); - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Висота спаду"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Встанов. зміщення дому"); - #else - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Встанов. зміщ. дому"); - #endif - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Зміщення прийняті"); - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Встановити нуль"); - #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Нагрів ") PREHEAT_1_LABEL; - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Нагрів ") PREHEAT_1_LABEL " ~"; - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" сопло"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" сопло ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" все"); - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" стіл"); - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" налашт"); - - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Нагрів $"); - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Нагрів $ ~"); - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Нагрів $ сопло"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Нагрів $ сопло ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Нагрів $ все"); - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Нагрів $ стіл"); - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Нагрів $ налашт"); - #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Нагрів свого"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Вимкнути нагрів"); - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("Частота"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("Керування лазером"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Потужність лазера"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Керування шпінделем"); - #else - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("Потуж.лазера"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("Керув. шпінделем"); - #endif - PROGMEM Language_Str MSG_SPINDLE_TOGGLE = _UxGT("Перемкнути шпіндель"); - PROGMEM Language_Str MSG_LASER_TOGGLE = _UxGT("Перемкнути лазер"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Потуж. шпінделя"); - #else - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("Потуж. шпінд."); - #endif - PROGMEM Language_Str MSG_SPINDLE_FORWARD = _UxGT("Шпіндель вперед"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("Шпіндель назад"); - - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Увімкнути живлення"); - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Вимкнути живлення"); - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Екструзія"); - PROGMEM Language_Str MSG_RETRACT = _UxGT("Втягування"); - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Рух по осям"); - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Вирівнювання столу"); - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Вирівняти стіл"); - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Вирівняти кути"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Вгору до спрацювання зонду"); // not sure about this one - #else - PROGMEM Language_Str MSG_LEVEL_CORNERS_RAISE = _UxGT("Вгору до спрацюв. зонду"); - #endif - PROGMEM Language_Str MSG_LEVEL_CORNERS_IN_RANGE = _UxGT("Кути в межах. Вирівнювання столу"); // Too long? - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Наступний кут"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Зміщення по Z"); - #else - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("Зміщення Z"); - #endif - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Редагувати сітку"); - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Редагув. зупинено"); - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("Точка сітки"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("Індекс X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Індекс Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Значення Z"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Власні команди"); - - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 тест зонду"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 точка"); - PROGMEM Language_Str MSG_M48_OUT_OF_BOUNDS = _UxGT("Зонд за межами"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("Відхилення"); - - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("Режим IDEX"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Зміщення сопел"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Авто паркування"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Дуплікація"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Дзеркальна копія"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Повний контроль"); - PROGMEM Language_Str MSG_IDEX_DUPE_GAP = _UxGT("Дублюв. X-проміжок"); - - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("Друге сопло X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("Друге сопло Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("Друге сопло Z"); - - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Виконується G29"); - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Інструменти UBL"); - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("Налаштування UBL"); - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("Точка нахилу"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Ручне введення сітки"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Розмістити шайбу і вимір."); - #else - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Ручне введ. сітки"); - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Розм. шайбу і вимір."); - #endif - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Вимірювання"); - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Видалити і виміряти стіл"); - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Рух до наступної"); - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Активувати UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Деактивувати UBL"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Температура столу"); - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Температура свого столу"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Температура сопла"); - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Температура свого сопла"); - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Редагувати свою сітку"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Точне редагування сітки"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Будувати свою сітку"); - #else - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" столу, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = LCD_STR_THERMOMETER _UxGT(" столу, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Редагувати свою"); - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Точне редаг. сітки"); - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Будувати свою"); - #endif - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Редагування сітки"); - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Сітка побудована"); - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Будувати сітку"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Ukrainian"); + + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Готовий."); + LSTR MSG_YES = _UxGT("ТАК"); + LSTR MSG_NO = _UxGT("НІ"); + LSTR MSG_BACK = _UxGT("Назад"); + LSTR MSG_MEDIA_ABORTING = _UxGT("Переривання..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("SD-картка вставлена"); + LSTR MSG_MEDIA_REMOVED = _UxGT("SD-картка видалена"); + LSTR MSG_MEDIA_WAITING = _UxGT("Вставте SD-картку"); + #if LCD_WIDTH > 21 + LSTR MSG_SD_INIT_FAIL = _UxGT("Збій ініціалізації SD"); + #else + LSTR MSG_SD_INIT_FAIL = _UxGT("Збій ініціаліз. SD"); + #endif + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Помилка зчитування"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB диск видалений"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("Помилка USB диску"); + #if LCD_WIDTH > 21 + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переповнення виклику"); + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Програмні кінцевики"); + #else + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("Переповн. виклику"); + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Прогр.кінцевики"); + #endif + LSTR MSG_LCD_ENDSTOPS = _UxGT("Кінцевик"); // Max length 8 characters + LSTR MSG_MAIN = _UxGT("Основне меню"); + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Інші налаштування"); + LSTR MSG_CONFIGURATION = _UxGT("Конфігурація"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("Автостарт"); + LSTR MSG_DISABLE_STEPPERS = _UxGT("Вимкнути двигуни"); + LSTR MSG_DEBUG_MENU = _UxGT("Меню Debug"); + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Тест лінії прогр."); + LSTR MSG_AUTO_HOME = _UxGT("Авто паркування"); + LSTR MSG_AUTO_HOME_X = _UxGT("Паркування X"); + LSTR MSG_AUTO_HOME_Y = _UxGT("Паркування Y"); + LSTR MSG_AUTO_HOME_Z = _UxGT("Паркування Z"); + LSTR MSG_AUTO_HOME_I = _UxGT("Паркування ") LCD_STR_I; + LSTR MSG_AUTO_HOME_J = _UxGT("Паркування ") LCD_STR_J; + LSTR MSG_AUTO_HOME_K = _UxGT("Паркування ") LCD_STR_K; + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Авто Z-вирівнювання"); + LSTR MSG_ITERATION = _UxGT("G34 Ітерація: %i"); + LSTR MSG_DECREASING_ACCURACY = _UxGT("Зменьшення точності!"); + LSTR MSG_ACCURACY_ACHIEVED = _UxGT("Точність досягнута"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Паркування XYZ"); + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Почати"); + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Наступна точка"); + LSTR MSG_LEVEL_BED_DONE = _UxGT("Завершено!"); + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Висота спаду"); + #if LCD_WIDTH > 21 + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Встанов. зміщення дому"); + LSTR MSG_HOME_OFFSET_X = _UxGT("Зміщення дому X"); + LSTR MSG_HOME_OFFSET_Y = _UxGT("Зміщення дому Y"); + LSTR MSG_HOME_OFFSET_Z = _UxGT("Зміщення дому Z"); + LSTR MSG_HOME_OFFSET_I = _UxGT("Зміщення дому ") LCD_STR_I; + LSTR MSG_HOME_OFFSET_J = _UxGT("Зміщення дому ") LCD_STR_J; + LSTR MSG_HOME_OFFSET_K = _UxGT("Зміщення дому ") LCD_STR_K; + #else + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Встан. зміщ. дому"); + LSTR MSG_HOME_OFFSET_X = _UxGT("Зміщ. дому X"); + LSTR MSG_HOME_OFFSET_Y = _UxGT("Зміщ. дому Y"); + LSTR MSG_HOME_OFFSET_Z = _UxGT("Зміщ. дому Z"); + LSTR MSG_HOME_OFFSET_I = _UxGT("Зміщ. дому ") LCD_STR_I; + LSTR MSG_HOME_OFFSET_J = _UxGT("Зміщ. дому ") LCD_STR_J; + LSTR MSG_HOME_OFFSET_K = _UxGT("Зміщ. дому ") LCD_STR_K; + #endif + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Зміщення прийняті"); + LSTR MSG_SET_ORIGIN = _UxGT("Встановити нуль"); + LSTR MSG_SELECT_ORIGIN = _UxGT("Оберіть нуль"); + #if LCD_WIDTH > 21 + LSTR MSG_LAST_VALUE_SP = _UxGT("Останнє значення "); + #else + LSTR MSG_LAST_VALUE_SP = _UxGT("Останнє знач. "); + #endif #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Будувати сітку ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Підтвердити ($)"); - #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Буд. холодну сітку"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Встан.висоту сітки"); - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Висота"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Підтвердити сітку"); - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Підтвердити свою"); - - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 нагрів столу"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 нагрів сопла"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("Ручне грунтування"); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("Фікс. довж. грунт."); // ґ is not supported - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("Грунтув. виконане"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26 скасовано"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("Вийти з G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Продовжити сітку"); - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Вирівнювання сітки"); - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-точкове вирівн."); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Вирівнювання растру"); - #else - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Вирівнюв. растру"); - #endif - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Вирівняти сітку"); - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Крайні точки"); - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Тип мапи сітки"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Вивести мапу сітки"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Вивести на хост"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Вивести в CSV"); - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Зберегти зовні"); - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Інформація по UBL"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Обсяг заповнювача"); - #else - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Обсяг заповн."); - #endif - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Ручне заповнення"); - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Розумне заповнення"); - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Заповнити сітку"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Анулювати все"); - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Анулювати найближчу"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Точно налаштувати все"); - #else - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Точно налашт. все"); - #endif - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Точно налашт.найближчу"); - #else - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Точно найближчу"); - #endif - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Збереження сітки"); - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Слот пам'яті"); - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Завантажити сітку"); - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Зберегти сітку"); - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("Сітка %i завантажена"); - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("Сітка %i збережена"); - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("Немає носія"); - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Збій: збереж. UBL"); - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Збій: відновл. UBL"); - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Зміщення Z: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Зміщення Z зупинено"); - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL покроково"); - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Збудувати холодну"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Розумне заповн-я"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Затвердити сітку"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Точно налашт.все"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Затвердити сітку"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Точно налашт.все"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Зберегти сітку"); - - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Керування світлом"); - PROGMEM Language_Str MSG_LEDS = _UxGT("Підсвітка"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Передустановки світла"); - #else - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Передустан. світла"); - #endif - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Червоний"); - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Помаранчевий"); - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Жовтий"); - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Зелений"); - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Синій"); - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Індіго"); - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Фіолетовий"); - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Білий"); - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("За умовчанням"); - PROGMEM Language_Str MSG_LED_CHANNEL_N = _UxGT("Канал ="); - PROGMEM Language_Str MSG_LEDS2 = _UxGT("Світло #2"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Передустановка світла #2"); - #else - PROGMEM Language_Str MSG_NEO2_PRESETS = _UxGT("Передустан. світла #2"); - #endif - PROGMEM Language_Str MSG_NEO2_BRIGHTNESS = _UxGT("Яскравість"); - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Своє світло"); - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Рівень червоного"); - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Рівень зеленого"); - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Рівень синього"); - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Рівень білого"); - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("Яскравість"); - - PROGMEM Language_Str MSG_MOVING = _UxGT("Рух..."); - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Звільнити XY"); - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Рух по X"); - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Рух по Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Рух по Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Екструдер"); - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Екструдер *"); - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Сопло дуже холодне"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("Рух %sмм"); - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Рух 0.1мм"); - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Рух 1мм"); - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Рух 10мм"); - PROGMEM Language_Str MSG_SPEED = _UxGT("Швидкість"); - PROGMEM Language_Str MSG_BED_Z = _UxGT("Z Столу"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Сопло, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Сопло ~"); - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("Сопло запарковане"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("Сопло очікує"); - PROGMEM Language_Str MSG_BED = _UxGT("Стіл, ") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Швидк. вент."); - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Швидк. вент. ~"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Збереж. швидк. вент. ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Дод. швидк. вент. ~"); - #else - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Збереж. вент. ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Додат.вент. ~"); - #endif - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("Вент. контролера"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Дод. швидк. вент."); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Холості оберти"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Авто-режим"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("Робочі оберти"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("Період простою"); - PROGMEM Language_Str MSG_FLOW = _UxGT("Потік"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Потік ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Налаштування"); - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER ", " LCD_STR_DEGREE _UxGT("С мін"); - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER ", " LCD_STR_DEGREE _UxGT("С макс"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Фактор"); - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Автотемпер."); - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Увімк"); - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Вимк."); - - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("Автопідбір PID"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("Автопідбір PID *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("Підбір PID виконано"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Збій автопідбору. Поганий екструдер."); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("Збій автопідбору. Температура завищена."); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("Збій автопідбору! Вичерпан час."); - - PROGMEM Language_Str MSG_SELECT = _UxGT("Вибрати"); - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Вибрати *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Прискорорення"); - PROGMEM Language_Str MSG_JERK = _UxGT("Ривок"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-ривок"); - PROGMEM Language_Str MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-ривок"); - PROGMEM Language_Str MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-ривок"); - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Ve-ривок"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Відхилення вузла"); - #else - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Відхил.вузла"); - #endif - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Швидкість, мм/с"); - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Швидк.макс ") LCD_STR_A; - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Швидк.макс ") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Швидк.макс ") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Швидк.макс ") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Швидк.макс *"); - PROGMEM Language_Str MSG_VMIN = _UxGT("Швидк.мін"); - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Переміщення мін"); - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Прискорення, мм/с2"); - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Приск.макс ") LCD_STR_A; - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Приск.макс ") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Приск.макс ") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Приск.макс ") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Приск.макс *"); - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("Приск.втягув."); - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("Приск.переміщ."); - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("Частота макс."); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Подача мін."); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Кроків на мм"); - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT(" кроків/мм"); - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT(" кроків/мм"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT(" кроків/мм"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E кроків/мм"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* кроків/мм"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Температура"); - PROGMEM Language_Str MSG_MOTION = _UxGT("Рух"); - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Пруток"); - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E, мм") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("E обмеж.,мм") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("E обмеж. *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Діам. прутка"); - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Діам. прутка *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Вивантаж., мм"); - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Завантаж., мм"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Kоеф. просув."); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Kоеф. просув. *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Контраст екрану"); - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Зберегти в EEPROM"); - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Зчитати з EEPROM"); - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("На базові параметри"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Ініціалізація EEPROM"); - #else - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Ініціаліз. EEPROM"); - #endif - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("Збій EEPROM: CRC"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("Збій EEPROM: індекс"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("Збій EEPROM: версія"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("Параметри збережені"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Оновити SD-картку"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Зкинути принтер"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT(" Поновити"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Головний екран"); - PROGMEM Language_Str MSG_PREPARE = _UxGT("Підготувати"); - PROGMEM Language_Str MSG_TUNE = _UxGT("Підлаштування"); - PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("Монітор живлення"); - PROGMEM Language_Str MSG_CURRENT = _UxGT("Струм"); - PROGMEM Language_Str MSG_VOLTAGE = _UxGT("Напруга"); - PROGMEM Language_Str MSG_POWER = _UxGT("Потужність"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("Почати друк"); - - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("Далі"); //short text for buttons - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("Ініц-я"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("Зупинка"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("Друк"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("Зкинути"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("Ігнорув."); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("Відміна"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("Готово"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("Назад"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("Продовжити"); - PROGMEM Language_Str MSG_BUTTON_SKIP = _UxGT("Пропустити"); - - PROGMEM Language_Str MSG_PAUSING = _UxGT("Призупинення..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Призупинити друк"); - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Відновити друк"); - PROGMEM Language_Str MSG_HOST_START_PRINT = _UxGT("Старт з хосту"); - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Скасувати друк"); - PROGMEM Language_Str MSG_END_LOOPS = _UxGT("End Repeat Loops"); // needs translation - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("Друк об'єкта"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("Завершити об'єкт"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("Завершити об'єкт ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Віднов. після збою"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("Друкувати з SD"); - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("SD-картки немає"); - PROGMEM Language_Str MSG_DWELL = _UxGT("Сон..."); - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Продовжити..."); - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("Друк призупинено"); - PROGMEM Language_Str MSG_PRINTING = _UxGT("Друк..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("Друк скасовано"); - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("Друк завершено"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Немає руху."); - PROGMEM Language_Str MSG_KILLED = _UxGT("ПЕРЕРВАНО. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ЗУПИНЕНО. "); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Втягування, мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Зміна втягув.,мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Ретракт V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Стрибок, мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Повернення, мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Поверн.зміни, мм"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Автовтягування"); - #else - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Втягув., мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Зміна втяг.мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("Поверн., мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Повер.зміни,мм"); - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("Автовтягув."); - #endif - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Втягування V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Підскок, мм"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Повернення V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Поверн.зміни V"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Змінити довжини"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("Змінити додатково"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("Очистити довжину"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Зміна сопла"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Підняти по Z"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Початк.швидкість"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Швидкість втягув."); - #else - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Початк.швидк."); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Швидк.втягув."); - #endif - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("Паркувати голову"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Відновити швидкість"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Оберти вентилятора"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Час вентилятора"); - #else - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Оберти вент."); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Час вент."); - #endif - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("Авто Увімк."); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("Авто Вимкн."); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("Заміна інструменту"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("Авто заміна"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("Останній екструдер"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("Заміна на *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Заміна прутка"); - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Заміна прутка *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Подати пруток"); - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Подати пруток *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Видалити пруток"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Видалити пруток *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Видалити все"); - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Вставити SD-картку"); - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Заміна SD-картки"); - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Видаліть SD-картку"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z-Зонд поза столом"); - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Фактор нахилу"); - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Само-тест"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Зкинути зонд"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Підняти зонд"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Опустити зонд"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("Режим SW"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("Режим 5V"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("Режим OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("Режим збереження"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Встановити BLT на 5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Встановити BLT на OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("Звітувати злив"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("НЕБЕЗПЕКА: Неправильні параметри приводять до пошкоджень! Продовжити?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("Z-Зонд TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("Ініц. TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Тест Z-зміщення"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("Зберегти"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Установити TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Установити Z-зонд"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Завантажити Z-зонд"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Спочатку дім %s%s%s"); - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("Зміщення зонду"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("Зміщення по X"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("Зміщення по Y"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Зміщення по Z"); - PROGMEM Language_Str MSG_MOVE_NOZZLE_TO_BED = _UxGT("Рухати сопло до столу"); - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Мікрокрок X"); - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Мікрокрок Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Мікрокрок Z"); - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("Сумарно"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Кінцевик спрацював"); - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Збій нагріву"); - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("ЗАВИЩЕНА Т") LCD_STR_DEGREE; - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("ВИТІК ТЕПЛА"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("ВИТІК ТЕПЛА СТОЛУ"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ВИТІК ТЕПЛА КАМЕРИ"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("МАКСИМАЛЬНА Т"); - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("МІНІМАЛЬНА Т") LCD_STR_DEGREE; - PROGMEM Language_Str MSG_HALTED = _UxGT("ПРИНТЕР ЗУПИНЕНО"); - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Перезавантажте"); - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("д"); // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("г"); // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("х"); // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Нагрівання..."); - PROGMEM Language_Str MSG_COOLING = _UxGT("Охолодження..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Нагрів столу..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("Нагрів камери..."); - PROGMEM Language_Str MSG_PROBE_HEATING = _UxGT("Нагрів зонду..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Калібрування Delta"); + LSTR MSG_PREHEAT_1 = _UxGT("Нагрів ") PREHEAT_1_LABEL; + LSTR MSG_PREHEAT_1_H = _UxGT("Нагрів ") PREHEAT_1_LABEL " ~"; + LSTR MSG_PREHEAT_1_END = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" сопло"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" сопло ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" все"); + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" стіл"); + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Нагрів ") PREHEAT_1_LABEL _UxGT(" налашт"); + + LSTR MSG_PREHEAT_M = _UxGT("Нагрів $"); + LSTR MSG_PREHEAT_M_H = _UxGT("Нагрів $ ~"); + LSTR MSG_PREHEAT_M_END = _UxGT("Нагрів $ сопло"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Нагрів $ сопло ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Нагрів $ все"); + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Нагрів $ стіл"); + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Нагрів $ налашт"); + #endif + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Нагрів свого"); + LSTR MSG_COOLDOWN = _UxGT("Вимкнути нагрів"); + + LSTR MSG_CUTTER_FREQUENCY = _UxGT("Частота"); + LSTR MSG_LASER_MENU = _UxGT("Керування лазером"); + LSTR MSG_SPINDLE_MENU = _UxGT("Керування шпінделем"); + #if LCD_WIDTH > 21 + LSTR MSG_LASER_POWER = _UxGT("Потужність лазера"); + LSTR MSG_SPINDLE_TOGGLE = _UxGT("Перемкн. шпіндель"); + LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Перемкнути вакуум"); + LSTR MSG_LASER_TOGGLE = _UxGT("Перемкнути лазер"); + LSTR MSG_SPINDLE_POWER = _UxGT("Потужн. шпінделя"); + LSTR MSG_LASER_PULSE_MS = _UxGT("Тестовий імпульс мс"); + LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Перемкнути обдув"); + #else + LSTR MSG_LASER_POWER = _UxGT("Потужн. лазера"); + LSTR MSG_SPINDLE_TOGGLE = _UxGT("Перемк. шпінд."); + LSTR MSG_SPINDLE_EVAC_TOGGLE = _UxGT("Перемк. вакуум"); + LSTR MSG_LASER_TOGGLE = _UxGT("Перемкн. лазер"); + LSTR MSG_SPINDLE_POWER = _UxGT("Потужн. шпінд."); + LSTR MSG_LASER_PULSE_MS = _UxGT("Тест. імп., мс"); + LSTR MSG_LASER_EVAC_TOGGLE = _UxGT("Перемкн. обдув"); + #endif + LSTR MSG_LASER_ASSIST_TOGGLE = _UxGT("Керування обдувом"); + LSTR MSG_FLOWMETER_FAULT = _UxGT("Помилка обдуву"); + LSTR MSG_LASER_FIRE_PULSE = _UxGT("Імпульс лазеру"); + LSTR MSG_SPINDLE_FORWARD = _UxGT("Шпіндель вперед"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("Шпіндель назад"); + + LSTR MSG_SWITCH_PS_ON = _UxGT("Увімкнути живлення"); + LSTR MSG_SWITCH_PS_OFF = _UxGT("Вимкнути живлення"); + LSTR MSG_EXTRUDE = _UxGT("Екструзія"); + LSTR MSG_RETRACT = _UxGT("Втягування"); + LSTR MSG_MOVE_AXIS = _UxGT("Рух по осям"); + LSTR MSG_BED_LEVELING = _UxGT("Вирівнювання столу"); + LSTR MSG_LEVEL_BED = _UxGT("Вирівняти стіл"); + LSTR MSG_BED_TRAMMING = _UxGT("Вирівняти кути"); + #if LCD_WIDTH > 21 + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Вгору до спрацюв. зонду"); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Кути в межах. Вирів.столу"); + #else + LSTR MSG_BED_TRAMMING_RAISE = _UxGT("Вгору до спрац.зонду"); + LSTR MSG_BED_TRAMMING_IN_RANGE = _UxGT("Кути в межах. Вирівн"); + #endif + LSTR MSG_BED_TRAMMING_GOOD_POINTS = _UxGT("Хороші точки: "); + LSTR MSG_BED_TRAMMING_LAST_Z = _UxGT("Остання Z: "); + LSTR MSG_NEXT_CORNER = _UxGT("Наступний кут"); + #if LCD_WIDTH > 21 + LSTR MSG_MESH_EDITOR = _UxGT("Зміщення по Z"); + #else + LSTR MSG_MESH_EDITOR = _UxGT("Зміщення Z"); + #endif + LSTR MSG_EDIT_MESH = _UxGT("Редагувати сітку"); + LSTR MSG_EDITING_STOPPED = _UxGT("Редагув. зупинено"); + LSTR MSG_PROBING_POINT = _UxGT("Точка сітки"); + LSTR MSG_MESH_X = _UxGT("Індекс X"); + LSTR MSG_MESH_Y = _UxGT("Індекс Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Значення Z"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Власні команди"); + + LSTR MSG_M48_TEST = _UxGT("M48 тест зонду"); + LSTR MSG_M48_POINT = _UxGT("M48 точка"); + LSTR MSG_M48_OUT_OF_BOUNDS = _UxGT("Зонд за межами"); + LSTR MSG_M48_DEVIATION = _UxGT("Відхилення"); + + LSTR MSG_IDEX_MENU = _UxGT("Режим IDEX"); + LSTR MSG_OFFSETS_MENU = _UxGT("Зміщення сопел"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Авто паркування"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Дуплікація"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Дзеркальна копія"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Повний контроль"); + LSTR MSG_IDEX_DUPE_GAP = _UxGT("Дублюв. X-проміжок"); + + LSTR MSG_HOTEND_OFFSET_X = _UxGT("Друге сопло X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("Друге сопло Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("Друге сопло Z"); + + LSTR MSG_UBL_DOING_G29 = _UxGT("Виконується G29"); + LSTR MSG_UBL_TOOLS = _UxGT("Інструменти UBL"); + LSTR MSG_UBL_LEVEL_BED = _UxGT("Налаштування UBL"); + LSTR MSG_LCD_TILTING_MESH = _UxGT("Точка нахилу"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Ручне введення сітки"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Розмістити шайбу і вимір."); + #else + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Ручне введ. сітки"); + LSTR MSG_UBL_BC_INSERT = _UxGT("Розм. шайбу і вимір."); + #endif + LSTR MSG_UBL_MESH_WIZARD = _UxGT("Майстер сіток UBL"); + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Вимірювання"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_BC_REMOVE = _UxGT("Видалити і виміряти стіл"); + #else + LSTR MSG_UBL_BC_REMOVE = _UxGT("Видали і вимір. стіл"); + #endif + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Рух до наступної"); + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Активувати UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Деактивувати UBL"); + LSTR MSG_UBL_SET_TEMP_BED = LCD_STR_THERMOMETER _UxGT(" столу, ") LCD_STR_DEGREE "C"; + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" столу,") LCD_STR_DEGREE "C"; + LSTR MSG_UBL_SET_TEMP_HOTEND = LCD_STR_THERMOMETER _UxGT(" сопла, ") LCD_STR_DEGREE "C"; + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Своя ") LCD_STR_THERMOMETER _UxGT(" сопла,") LCD_STR_DEGREE "C"; + #if LCD_WIDTH > 21 + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Редагувати свою сітку"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Точне редагування сітки"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Будувати свою сітку"); + #else + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Редагувати свою"); + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Точне редаг. сітки"); + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Будувати свою"); + #endif + LSTR MSG_UBL_MESH_EDIT = _UxGT("Редагування сітки"); + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Сітка побудована"); + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Будувати сітку"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Будувати сітку ($)"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Підтвердити ($)"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Буд. холодну сітку"); + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Встан.висоту сітки"); + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Висота"); + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Підтвердити сітку"); + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Підтвердити свою"); + + LSTR MSG_G26_HEATING_BED = _UxGT("G26 нагрів столу"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 нагрів сопла"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("Ручне грунтування"); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("Фікс. довж. грунт."); + LSTR MSG_G26_PRIME_DONE = _UxGT("Грунтув. виконане"); + LSTR MSG_G26_CANCELED = _UxGT("G26 скасовано"); + LSTR MSG_G26_LEAVING = _UxGT("Вийти з G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Продовжити сітку"); + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Вирівнювання сітки"); + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("3-точкове вирівн."); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Вирівнювання растру"); + #else + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Вирівнюв. растру"); + #endif + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Вирівняти сітку"); + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Крайні точки"); + LSTR MSG_UBL_MAP_TYPE = _UxGT("Тип мапи сітки"); + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Вивести мапу сітки"); + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Вивести на хост"); + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Вивести в CSV"); + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Зберегти зовні"); + LSTR MSG_UBL_INFO_UBL = _UxGT("Інформація по UBL"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Обсяг заповнюв."); + #else + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Обсяг заповн."); + #endif + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Ручне заповнення"); + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Розумне заповнення"); + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Заповнити сітку"); + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Анулювати все"); + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Анулювати найближчу"); + #if LCD_WIDTH > 21 + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Точно налаштувати все"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Точно налашт.найближчу"); + #else + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Точно налашт. все"); + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Точно найближчу"); + #endif + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Збереження сітки"); + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Слот пам'яті"); + LSTR MSG_UBL_LOAD_MESH = _UxGT("Завантажити сітку"); + LSTR MSG_UBL_SAVE_MESH = _UxGT("Зберегти сітку"); + LSTR MSG_MESH_LOADED = _UxGT("Сітка %i завантажена"); + LSTR MSG_MESH_SAVED = _UxGT("Сітка %i збережена"); + LSTR MSG_UBL_NO_STORAGE = _UxGT("Немає носія"); + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Збій: збереж. UBL"); + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Збій: відновл. UBL"); + LSTR MSG_UBL_Z_OFFSET = _UxGT("Зміщення Z: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Зміщення Z зупинено"); + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("UBL покроково"); + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Збудувати холодну"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Розумне заповн-я"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Затвердити сітку"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Точно налашт.все"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Затвердити сітку"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Точно налашт.все"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Зберегти сітку"); + + LSTR MSG_LED_CONTROL = _UxGT("Керування світлом"); + LSTR MSG_LEDS = _UxGT("Підсвітка"); + #if LCD_WIDTH > 21 + LSTR MSG_LED_PRESETS = _UxGT("Передустановки світла"); + #else + LSTR MSG_LED_PRESETS = _UxGT("Передустан. світла"); + #endif + LSTR MSG_SET_LEDS_RED = _UxGT("Червоний"); + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Помаранчевий"); + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Жовтий"); + LSTR MSG_SET_LEDS_GREEN = _UxGT("Зелений"); + LSTR MSG_SET_LEDS_BLUE = _UxGT("Синій"); + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Індіго"); + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Фіолетовий"); + LSTR MSG_SET_LEDS_WHITE = _UxGT("Білий"); + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("За умовчанням"); + LSTR MSG_LED_CHANNEL_N = _UxGT("Канал ="); + LSTR MSG_LEDS2 = _UxGT("Світло #2"); + #if LCD_WIDTH > 21 + LSTR MSG_NEO2_PRESETS = _UxGT("Передустановка світла #2"); + #else + LSTR MSG_NEO2_PRESETS = _UxGT("Передуст. світла #2"); + #endif + LSTR MSG_NEO2_BRIGHTNESS = _UxGT("Яскравість"); + LSTR MSG_CUSTOM_LEDS = _UxGT("Своє світло"); + LSTR MSG_INTENSITY_R = _UxGT("Рівень червоного"); + LSTR MSG_INTENSITY_G = _UxGT("Рівень зеленого"); + LSTR MSG_INTENSITY_B = _UxGT("Рівень синього"); + LSTR MSG_INTENSITY_W = _UxGT("Рівень білого"); + LSTR MSG_LED_BRIGHTNESS = _UxGT("Яскравість"); + + LSTR MSG_MOVING = _UxGT("Рух..."); + LSTR MSG_FREE_XY = _UxGT("Звільнити XY"); + LSTR MSG_MOVE_X = _UxGT("Рух по X"); + LSTR MSG_MOVE_Y = _UxGT("Рух по Y"); + LSTR MSG_MOVE_Z = _UxGT("Рух по Z"); + LSTR MSG_MOVE_I = _UxGT("Рух по ") LCD_STR_I; + LSTR MSG_MOVE_J = _UxGT("Рух по ") LCD_STR_J; + LSTR MSG_MOVE_K = _UxGT("Рух по ") LCD_STR_K; + LSTR MSG_MOVE_E = _UxGT("Екструдер"); + LSTR MSG_MOVE_EN = _UxGT("Екструдер *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Сопло дуже холодне"); + LSTR MSG_MOVE_N_MM = _UxGT("Рух %sмм"); + LSTR MSG_MOVE_01MM = _UxGT("Рух 0.1мм"); + LSTR MSG_MOVE_1MM = _UxGT("Рух 1мм"); + LSTR MSG_MOVE_10MM = _UxGT("Рух 10мм"); + LSTR MSG_MOVE_100MM = _UxGT("Рух 100mm"); + LSTR MSG_SPEED = _UxGT("Швидкість"); + LSTR MSG_BED_Z = _UxGT("Z Столу"); + LSTR MSG_NOZZLE = _UxGT("Сопло, ") LCD_STR_DEGREE "C"; + LSTR MSG_NOZZLE_N = _UxGT("Сопло ~"); + LSTR MSG_NOZZLE_PARKED = _UxGT("Сопло запарковане"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("Сопло очікує"); + LSTR MSG_BED = _UxGT("Стіл, ") LCD_STR_DEGREE "C"; + LSTR MSG_CHAMBER = _UxGT("Камера,") LCD_STR_DEGREE "C"; + #if LCD_WIDTH > 21 + LSTR MSG_COOLER = _UxGT("Охолодження лазеру"); + LSTR MSG_COOLER_TOGGLE = _UxGT("Перемк. охолодж."); + #else + LSTR MSG_COOLER = _UxGT("Охолодж. лазеру"); + LSTR MSG_COOLER_TOGGLE = _UxGT("Перемк.охолод"); + #endif + LSTR MSG_FLOWMETER_SAFETY = _UxGT("Безпека потоку"); + LSTR MSG_LASER = _UxGT("Лазер"); + LSTR MSG_FAN_SPEED = _UxGT("Швидк. вент."); + LSTR MSG_FAN_SPEED_N = _UxGT("Швидк. вент. ~"); + #if LCD_WIDTH > 21 + LSTR MSG_STORED_FAN_N = _UxGT("Збереж.швидк.вент. ~"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Дод. швидк. вент. ~"); + #else + LSTR MSG_STORED_FAN_N = _UxGT("Збереж. вент. ~"); + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Додат.вент. ~"); + #endif + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Дод. швидк. вент."); + LSTR MSG_CONTROLLER_FAN = _UxGT("Вент. контролера"); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("Холості оберти"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("Авто-режим"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("Робочі оберти"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("Період простою"); + LSTR MSG_FLOW = _UxGT("Потік"); + LSTR MSG_FLOW_N = _UxGT("Потік ~"); + LSTR MSG_CONTROL = _UxGT("Налаштування"); + LSTR MSG_MIN = " " LCD_STR_THERMOMETER ", " LCD_STR_DEGREE _UxGT("С мін"); + LSTR MSG_MAX = " " LCD_STR_THERMOMETER ", " LCD_STR_DEGREE _UxGT("С макс"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Фактор"); + LSTR MSG_AUTOTEMP = _UxGT("Автотемпер."); + LSTR MSG_LCD_ON = _UxGT("Увім"); + LSTR MSG_LCD_OFF = _UxGT("Вимк"); + + LSTR MSG_PID_AUTOTUNE = _UxGT("Автопідбір PID"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("Автопідбір PID *"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("Підбір PID виконано"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("Збій автопідбору. Поганий екструдер."); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("Збій автопідбору. Температура завищена."); + LSTR MSG_PID_TIMEOUT = _UxGT("Збій автопідбору! Вичерпан час."); + + LSTR MSG_SELECT = _UxGT("Вибрати"); + LSTR MSG_SELECT_E = _UxGT("Вибрати *"); + LSTR MSG_ACC = _UxGT("Прискорорення"); + LSTR MSG_JERK = _UxGT("Ривок"); + LSTR MSG_VA_JERK = _UxGT("V") LCD_STR_A _UxGT("-ривок"); + LSTR MSG_VB_JERK = _UxGT("V") LCD_STR_B _UxGT("-ривок"); + LSTR MSG_VC_JERK = _UxGT("V") LCD_STR_C _UxGT("-ривок"); + LSTR MSG_VI_JERK = _UxGT("V") LCD_STR_I _UxGT("-ривок"); + LSTR MSG_VJ_JERK = _UxGT("V") LCD_STR_J _UxGT("-ривок"); + LSTR MSG_VK_JERK = _UxGT("V") LCD_STR_K _UxGT("-ривок"); + LSTR MSG_VE_JERK = _UxGT("Ve-ривок"); + #if LCD_WIDTH > 21 + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Відхилення вузла"); + #else + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Відхил.вузла"); + #endif + LSTR MSG_VELOCITY = _UxGT("Швидкість, мм/с"); + LSTR MSG_VMAX_A = _UxGT("Швидк.макс ") LCD_STR_A; + LSTR MSG_VMAX_B = _UxGT("Швидк.макс ") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Швидк.макс ") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Швидк.макс ") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Швидк.макс ") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Швидк.макс ") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Швидк.макс ") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Швидк.макс *"); + LSTR MSG_VMIN = _UxGT("Швидк. мін"); + #if LCD_WIDTH > 21 + LSTR MSG_VTRAV_MIN = _UxGT("Переміщення мін"); + #else + LSTR MSG_VTRAV_MIN = _UxGT("Переміщ. мін"); + #endif + LSTR MSG_ACCELERATION = _UxGT("Прискорення, мм/с2"); + LSTR MSG_AMAX_A = _UxGT("Приск.макс ") LCD_STR_A; + LSTR MSG_AMAX_B = _UxGT("Приск.макс ") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Приск.макс ") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Приск.макс ") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("Приск.макс ") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Приск.макс ") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Приск.макс ") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Приск.макс *"); + LSTR MSG_A_RETRACT = _UxGT("Приск.втягув."); + LSTR MSG_A_TRAVEL = _UxGT("Приск.переміщ."); + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Частота макс."); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Подача мін."); + LSTR MSG_STEPS_PER_MM = _UxGT("Кроків на мм"); + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" кроків/мм"); + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" кроків/мм"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" кроків/мм"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" кроків/мм"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" кроків/мм"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" кроків/мм"); + LSTR MSG_E_STEPS = _UxGT("E кроків/мм"); + LSTR MSG_EN_STEPS = _UxGT("* кроків/мм"); + LSTR MSG_TEMPERATURE = _UxGT("Температура"); + LSTR MSG_MOTION = _UxGT("Рух"); + LSTR MSG_FILAMENT = _UxGT("Пруток"); + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E, мм") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E обмеж.,мм") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E обмеж. *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("Діам. прутка"); + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Діам. прутка *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Вивантаж., мм"); + LSTR MSG_FILAMENT_LOAD = _UxGT("Завантаж., мм"); + LSTR MSG_ADVANCE_K = _UxGT("Kоеф. просув."); + LSTR MSG_ADVANCE_K_E = _UxGT("Kоеф. просув. *"); + LSTR MSG_CONTRAST = _UxGT("Контраст екрану"); + LSTR MSG_STORE_EEPROM = _UxGT("Зберегти в EEPROM"); + LSTR MSG_LOAD_EEPROM = _UxGT("Зчитати з EEPROM"); + LSTR MSG_RESTORE_DEFAULTS = _UxGT("На базові параметри"); + #if LCD_WIDTH > 21 + LSTR MSG_INIT_EEPROM = _UxGT("Ініціалізація EEPROM"); + #else + LSTR MSG_INIT_EEPROM = _UxGT("Ініціаліз. EEPROM"); + #endif + LSTR MSG_ERR_EEPROM_CRC = _UxGT("Збій EEPROM: CRC"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("Збій EEPROM: індекс"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("Збій EEPROM: версія"); + LSTR MSG_SETTINGS_STORED = _UxGT("Параметри збережені"); + LSTR MSG_MEDIA_UPDATE = _UxGT("Оновити SD-картку"); + LSTR MSG_RESET_PRINTER = _UxGT("Зкинути принтер"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT(" Поновити"); + LSTR MSG_INFO_SCREEN = _UxGT("Головний екран"); + LSTR MSG_PREPARE = _UxGT("Підготувати"); + LSTR MSG_TUNE = _UxGT("Підлаштування"); + LSTR MSG_POWER_MONITOR = _UxGT("Монітор живлення"); + LSTR MSG_CURRENT = _UxGT("Струм"); + LSTR MSG_VOLTAGE = _UxGT("Напруга"); + LSTR MSG_POWER = _UxGT("Потужність"); + LSTR MSG_START_PRINT = _UxGT("Почати друк"); + + LSTR MSG_BUTTON_NEXT = _UxGT("Далі"); //short text for buttons + LSTR MSG_BUTTON_INIT = _UxGT("Ініц-я"); + LSTR MSG_BUTTON_STOP = _UxGT("Зупинка"); + LSTR MSG_BUTTON_PRINT = _UxGT("Друк"); + LSTR MSG_BUTTON_RESET = _UxGT("Зкинути"); + LSTR MSG_BUTTON_IGNORE = _UxGT("Ігнорув."); + LSTR MSG_BUTTON_CANCEL = _UxGT("Відміна"); + LSTR MSG_BUTTON_DONE = _UxGT("Готово"); + LSTR MSG_BUTTON_BACK = _UxGT("Назад"); + LSTR MSG_BUTTON_PROCEED = _UxGT("Продовжити"); + LSTR MSG_BUTTON_SKIP = _UxGT("Пропустити"); + + LSTR MSG_PAUSING = _UxGT("Призупинення..."); + LSTR MSG_PAUSE_PRINT = _UxGT("Призупинити друк"); + LSTR MSG_RESUME_PRINT = _UxGT("Відновити друк"); + LSTR MSG_HOST_START_PRINT = _UxGT("Старт з хосту"); + LSTR MSG_STOP_PRINT = _UxGT("Скасувати друк"); + LSTR MSG_END_LOOPS = _UxGT("End Repeat Loops"); // needs translation + LSTR MSG_PRINTING_OBJECT = _UxGT("Друк об'єкта"); + LSTR MSG_CANCEL_OBJECT = _UxGT("Завершити об'єкт"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("Завершити об'єкт ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Віднов. після збою"); + LSTR MSG_MEDIA_MENU = _UxGT("Друкувати з SD"); + LSTR MSG_NO_MEDIA = _UxGT("SD-картки немає"); + LSTR MSG_DWELL = _UxGT("Сон..."); + LSTR MSG_USERWAIT = _UxGT("Продовжити..."); + LSTR MSG_PRINT_PAUSED = _UxGT("Друк призупинено"); + LSTR MSG_PRINTING = _UxGT("Друк..."); + LSTR MSG_PRINT_ABORTED = _UxGT("Друк скасовано"); + LSTR MSG_PRINT_DONE = _UxGT("Друк завершено"); + LSTR MSG_NO_MOVE = _UxGT("Немає руху."); + LSTR MSG_KILLED = _UxGT("ПЕРЕРВАНО. "); + LSTR MSG_STOPPED = _UxGT("ЗУПИНЕНО. "); + #if LCD_WIDTH > 21 + LSTR MSG_CONTROL_RETRACT = _UxGT("Втягування, мм"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Зміна втягув.,мм"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Повернення, мм"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Поверн.зміни, мм"); + LSTR MSG_AUTORETRACT = _UxGT("Автовтягування"); + #else + LSTR MSG_CONTROL_RETRACT = _UxGT("Втягув., мм"); + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Зміна втяг.мм"); + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("Поверн., мм"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("Повер.зміни,мм"); + LSTR MSG_AUTORETRACT = _UxGT("Автовтягув."); + #endif + LSTR MSG_CONTROL_RETRACTF = _UxGT("Втягування V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Підскок, мм"); + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("Повернення V"); + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("Поверн.зміни V"); + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Змінити довжини"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("Змінити додатково"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("Очистити довжину"); + LSTR MSG_TOOL_CHANGE = _UxGT("Зміна сопла"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Підняти по Z"); + #if LCD_WIDTH > 21 + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Початк.швидкість"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Швидкість втягув."); + #else + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Початк.швидк."); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Швидк.втягув."); + #endif + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("Паркувати голову"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("Відновити швидкість"); + #if LCD_WIDTH > 21 + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Оберти вентилятора"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Час вентилятора"); + #else + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("Оберти вент."); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("Час вент."); + #endif + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("Авто Увімк."); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("Авто Вимкн."); + LSTR MSG_TOOL_MIGRATION = _UxGT("Заміна інструменту"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("Авто заміна"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("Останній екструдер"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("Заміна на *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("Заміна прутка"); + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Заміна прутка *"); + LSTR MSG_FILAMENTLOAD = _UxGT("Подати пруток"); + LSTR MSG_FILAMENTLOAD_E = _UxGT("Подати пруток *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("Видалити пруток"); + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Видалити пруток *"); + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Видалити все"); + LSTR MSG_ATTACH_MEDIA = _UxGT("Вставити SD-картку"); + LSTR MSG_CHANGE_MEDIA = _UxGT("Заміна SD-картки"); + LSTR MSG_RELEASE_MEDIA = _UxGT("Видаліть SD-картку"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z-Зонд поза столом"); + LSTR MSG_SKEW_FACTOR = _UxGT("Фактор нахилу"); + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Само-тест"); + LSTR MSG_BLTOUCH_RESET = _UxGT("Зкинути зонд"); + LSTR MSG_BLTOUCH_STOW = _UxGT("Підняти зонд"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Опустити зонд"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("Режим SW"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("Режим 5V"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("Режим OD"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("Режим збереження"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("Встановити BLT на 5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("Встановити BLT на OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("Звітувати злив"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("НЕБЕЗПЕКА: Неправильні параметри приводять до пошкоджень! Продовжити?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("Z-Зонд TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("Ініц. TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Тест Z-зміщення"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("Зберегти"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("Установити TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("Установити Z-зонд"); + LSTR MSG_MANUAL_STOW = _UxGT("Завантажити Z-зонд"); + LSTR MSG_HOME_FIRST = _UxGT("Спочатку дім %s%s%s"); + LSTR MSG_ZPROBE_OFFSETS = _UxGT("Зміщення зонду"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("Зміщення по X"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("Зміщення по Y"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Зміщення по Z"); + LSTR MSG_MOVE_NOZZLE_TO_BED = _UxGT("Рухати сопло до столу"); + LSTR MSG_BABYSTEP_X = _UxGT("Мікрокрок X"); + LSTR MSG_BABYSTEP_Y = _UxGT("Мікрокрок Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Мікрокрок Z"); + LSTR MSG_BABYSTEP_I = _UxGT("Мікрокрок ") LCD_STR_I; + LSTR MSG_BABYSTEP_J = _UxGT("Мікрокрок ") LCD_STR_J; + LSTR MSG_BABYSTEP_K = _UxGT("Мікрокрок ") LCD_STR_K; + LSTR MSG_BABYSTEP_TOTAL = _UxGT("Сумарно"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Кінцевик спрацював"); + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Збій нагріву"); + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("ЗАВИЩЕНА Т") LCD_STR_DEGREE; + LSTR MSG_THERMAL_RUNAWAY = _UxGT("ВИТІК ТЕПЛА"); + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("ВИТІК ТЕПЛА СТОЛУ"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("ВИТІК ТЕПЛА КАМЕРИ"); + LSTR MSG_THERMAL_RUNAWAY_COOLER = _UxGT("ВИТІК ОХОЛОДЖЕННЯ"); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Охолодження столу..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Охолодження камери..."); - PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Охолодження зонду..."); - #else - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Охол. столу..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("Охол. камери..."); - PROGMEM Language_Str MSG_PROBE_COOLING = _UxGT("Охол. зонду..."); - #endif - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Калібрувати X"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Калібрувати Y"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Калібрувати Z"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Калібр. центр"); - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Параметри Delta"); - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Автокалібрування"); - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Встан. Висоту Delta"); - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z-зміщення зонду"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Діагональ стрижня"); - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Висота"); - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Радіус"); - - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Про принтер"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Дані принтера"); - - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-точкове вирівнювання"); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Лінійне вирівнювання"); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Білінійне вирівнювання"); - #else - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("3-точкове вирівн."); - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("Лінійне вирівн."); - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("Білінійне вирівн."); - #endif - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("UBL"); - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Вирівнювання сітки"); - - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Статистика принтера"); - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Про плату"); - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Термістори"); - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Екструдери"); - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Бод"); - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Протокол"); - #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Контроль витіку ") LCD_STR_THERMOMETER _UxGT(" Вимк"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Контроль витіку ") LCD_STR_THERMOMETER _UxGT(" Увімк"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Час простою хотенду"); - #else - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("Контр.витіку ") LCD_STR_THERMOMETER _UxGT(" Вимк"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("Контр.витіку ") LCD_STR_THERMOMETER _UxGT(" Увімк"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Час прост. хот-у"); - #endif - - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Підсвітка"); - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Яскравість світла"); - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("НЕ ТОЙ ПРИНТЕР"); - - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Завершено"); - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Екструдовано"); + LSTR MSG_COOLING_FAILED = _UxGT("ОХОЛОДЖЕННЯ НЕ ВДАЛОСЬ"); + #else + LSTR MSG_COOLING_FAILED = _UxGT("ОХОЛОДЖ. НЕ ВДАЛОСЬ"); + #endif + LSTR MSG_ERR_MAXTEMP = _UxGT("МАКСИМАЛЬНА Т") LCD_STR_DEGREE; + LSTR MSG_ERR_MINTEMP = _UxGT("МІНІМАЛЬНА Т") LCD_STR_DEGREE; + LSTR MSG_HALTED = _UxGT("ПРИНТЕР ЗУПИНЕНО"); + LSTR MSG_PLEASE_RESET = _UxGT("Перезавантажте"); + LSTR MSG_SHORT_DAY = _UxGT("д"); // One character only + LSTR MSG_SHORT_HOUR = _UxGT("г"); // One character only + LSTR MSG_SHORT_MINUTE = _UxGT("х"); // One character only + LSTR MSG_HEATING = _UxGT("Нагрівання..."); + LSTR MSG_COOLING = _UxGT("Охолодження..."); + LSTR MSG_BED_HEATING = _UxGT("Нагрів столу..."); + LSTR MSG_PROBE_HEATING = _UxGT("Нагрів зонду..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("Нагрів камери..."); #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Кількість друків"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Весь час друку"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Найдовший час"); - #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Друків"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Загалом"); - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Найдовше"); - #endif + LSTR MSG_BED_COOLING = _UxGT("Охолодження столу..."); + LSTR MSG_PROBE_COOLING = _UxGT("Охолодження зонду..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Охолодження камери..."); + LSTR MSG_LASER_COOLING = _UxGT("Охолодження лазеру..."); + #else + LSTR MSG_BED_COOLING = _UxGT("Охолодж. столу..."); + LSTR MSG_PROBE_COOLING = _UxGT("Охолодж. зонду..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("Охолодж. камери..."); + LSTR MSG_LASER_COOLING = _UxGT("Охолодж. лазеру..."); + #endif + LSTR MSG_DELTA_CALIBRATE = _UxGT("Калібрування Delta"); + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Калібрувати X"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Калібрувати Y"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Калібрувати Z"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Калібр. центр"); + LSTR MSG_DELTA_SETTINGS = _UxGT("Параметри Delta"); + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Автокалібрування"); + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Встан. Висоту Delta"); + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z-зміщення зонду"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Діагональ стрижня"); + LSTR MSG_DELTA_HEIGHT = _UxGT("Висота"); + LSTR MSG_DELTA_RADIUS = _UxGT("Радіус"); + + LSTR MSG_INFO_MENU = _UxGT("Про принтер"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Дані принтера"); - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Мін. ") LCD_STR_THERMOMETER; - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Макс. ") LCD_STR_THERMOMETER; - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Блок жив-ня"); - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Сила мотору"); - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("Драйвер X, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Драйвер Y, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Драйвер Z, %"); - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("Драйвер E, %"); - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("ЗБІЙ ЗВ'ЯЗКУ З TMC"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Запис ЦАП у EEPROM"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("ЗАМІНА ПРУТКА"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("ЗУПИНКА ДРУКУ"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("ЗАВАНТАЖИТИ ПРУТОК"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("ВИВАНТАЖИТИ ПРУТОК"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ПАРАМЕТРИ ПРОДОВЖЕННЯ:"); + LSTR MSG_3POINT_LEVELING = _UxGT("3-точкове вирівнювання"); + LSTR MSG_LINEAR_LEVELING = _UxGT("Лінійне вирівнювання"); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Білінійне вирівнювання"); #else - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ПАРАМ.ПРОДОВЖЕННЯ:"); + LSTR MSG_3POINT_LEVELING = _UxGT("3-точкове вирівн."); + LSTR MSG_LINEAR_LEVELING = _UxGT("Лінійне вирівн."); + LSTR MSG_BILINEAR_LEVELING = _UxGT("Білінійне вирівн."); #endif - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Видавити ще"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Відновити друк"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Сопло: "); + LSTR MSG_UBL_LEVELING = _UxGT("UBL"); + LSTR MSG_MESH_LEVELING = _UxGT("Вирівнювання сітки"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Датчик закінчення прутка"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("Відстань закінч.,мм"); + LSTR MSG_MESH_DONE = _UxGT("Зондування сітки виконано"); #else - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("Датчик закінч.прутка"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("До закінч.,мм"); + LSTR MSG_MESH_DONE = _UxGT("Зондування виконано"); #endif - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Помилка паркування"); - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("Помилка зондування"); - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ОБЕРІТЬ ПРУТОК"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("Онови прошивку MMU!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU потребує уваги"); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("MMU Продовжити"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("MMU Продовження..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU Завантажити"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("MMU Завантажити все"); + LSTR MSG_INFO_STATS_MENU = _UxGT("Статистика принтера"); + LSTR MSG_INFO_BOARD_MENU = _UxGT("Про плату"); + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Термістори"); + LSTR MSG_INFO_EXTRUDERS = _UxGT("Екструдери"); + LSTR MSG_INFO_BAUDRATE = _UxGT("Бод"); + LSTR MSG_INFO_PROTOCOL = _UxGT("Протокол"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Завантажити в сопло"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Контроль витіку ") LCD_STR_THERMOMETER _UxGT(" Вимк"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Контроль витіку ") LCD_STR_THERMOMETER _UxGT(" Увімк"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Час простою хотенду"); #else - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Завантаж. в сопло"); + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("Контр.витіку ") LCD_STR_THERMOMETER _UxGT(" Вимк"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("Контр.витіку ") LCD_STR_THERMOMETER _UxGT(" Увімк"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("Час прост. хот-у"); #endif - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU Звільнити"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU Звільнити ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU Вивантажити"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("MMU Завантаж. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("MMU Звільнення..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("MMU Вивантаження..."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("MMU Все"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("MMU Пруток ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("MMU Перезапуск"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("MMU Перезапуск..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("MMU Видаліть, натисніть"); + LSTR MSG_CASE_LIGHT = _UxGT("Підсвітка"); + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Яскравість світла"); + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("НЕ ТОЙ ПРИНТЕР"); + + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Завершено"); + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Екструдовано"); + #if LCD_WIDTH >= 20 + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Кількість друків"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Весь час друку"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Найдовший час"); + #else + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Друків"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Загалом"); + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Найдовше"); + #endif + + LSTR MSG_INFO_MIN_TEMP = _UxGT("Мін. ") LCD_STR_THERMOMETER; + LSTR MSG_INFO_MAX_TEMP = _UxGT("Макс. ") LCD_STR_THERMOMETER; + LSTR MSG_INFO_PSU = _UxGT("Блок жив-ня"); + LSTR MSG_DRIVE_STRENGTH = _UxGT("Сила мотору"); + LSTR MSG_DAC_PERCENT_A = _UxGT("Драйвер ") LCD_STR_A _UxGT(", %"); + LSTR MSG_DAC_PERCENT_B = _UxGT("Драйвер ") LCD_STR_B _UxGT(", %"); + LSTR MSG_DAC_PERCENT_C = _UxGT("Драйвер ") LCD_STR_C _UxGT(", %"); + LSTR MSG_DAC_PERCENT_I = _UxGT("Драйвер ") LCD_STR_I _UxGT(", %"); + LSTR MSG_DAC_PERCENT_J = _UxGT("Драйвер ") LCD_STR_J _UxGT(", %"); + LSTR MSG_DAC_PERCENT_K = _UxGT("Драйвер ") LCD_STR_K _UxGT(", %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("Драйвер E, %"); + LSTR MSG_ERROR_TMC = _UxGT("ЗБІЙ ЗВ'ЯЗКУ З TMC"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Запис ЦАП у EEPROM"); + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("ЗАМІНА ПРУТКА"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("ЗУПИНКА ДРУКУ"); + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("ЗАВАНТАЖИТИ ПРУТОК"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("ВИВАНТАЖИТИ ПРУТОК"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_MIX = _UxGT("Змішування"); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ПАРАМЕТРИ ПРОДОВЖЕННЯ:"); #else - PROGMEM Language_Str MSG_MIX = _UxGT("Змішув."); + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("ПАРАМ.ПРОДОВЖЕННЯ:"); #endif - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("Компонент ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("Змішувач"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("Градієнт"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("Повний градієнт"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("Змішування переключ."); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("Циклічне змішування"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("Градієнт змішування"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("Змінити градієнт"); + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Видавити ще"); + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Відновити друк"); + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Сопло: "); + #if LCD_WIDTH > 21 + LSTR MSG_RUNOUT_SENSOR = _UxGT("Датчик закінчення прутка"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("Відстань закінч.,мм"); + #else + LSTR MSG_RUNOUT_SENSOR = _UxGT("Датчик закінч.прутка"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("До закінч.,мм"); + #endif + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Помилка паркування"); + LSTR MSG_LCD_PROBING_FAILED = _UxGT("Помилка зондування"); + + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("ОБЕРІТЬ ПРУТОК"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("Онови прошивку MMU!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU потребує уваги"); + LSTR MSG_MMU2_RESUME = _UxGT("MMU Продовжити"); + LSTR MSG_MMU2_RESUMING = _UxGT("MMU Продовження..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU Завантажити"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("MMU Завантажити все"); + #if LCD_WIDTH > 21 + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Завантажити в сопло"); + #else + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU Завант. в сопло"); + #endif + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU Звільнити"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU Звільнити ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU Вивантажити"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("Завантаж. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("Викидання прутка..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("Вивантаження..."); + LSTR MSG_MMU2_ALL = _UxGT("Все"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("Пруток ~"); + LSTR MSG_MMU2_RESET = _UxGT("Перезапуск MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("MMU Перезапуск..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("Видаліть, натисніть"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Активація В-інструменту"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Псевдонім В-інструменту"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Зкидання В-інструментів"); + LSTR MSG_MIX = _UxGT("Змішування"); #else - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("Актив. В-інструм."); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("Псевдонім В-інструм."); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("Зкидання В-інструм."); + LSTR MSG_MIX = _UxGT("Змішув."); #endif - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("Початок В-інструменту"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT("Кінець В-інструменту"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("Змішати В-інструменти"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("В-інструменти зкинуті"); - - PROGMEM Language_Str MSG_START_Z = _UxGT("Початок Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" Кінець Z:"); - - PROGMEM Language_Str MSG_GAMES = _UxGT("Ігри"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("Цеглини"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("Вторгнення"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("Zм!йк@"); - PROGMEM Language_Str MSG_MAZE = _UxGT("Лабіринт"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("Компонент ="); + LSTR MSG_MIXER = _UxGT("Змішувач"); + LSTR MSG_GRADIENT = _UxGT("Градієнт"); + LSTR MSG_FULL_GRADIENT = _UxGT("Повний градієнт"); + #if LCD_WIDTH > 21 + LSTR MSG_TOGGLE_MIX = _UxGT("Переключити змішування"); + #else + LSTR MSG_TOGGLE_MIX = _UxGT("Переключ.змішування"); + #endif + LSTR MSG_CYCLE_MIX = _UxGT("Циклічне змішування"); + LSTR MSG_GRADIENT_MIX = _UxGT("Градієнт змішування"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("Змінити градієнт"); - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("Погана сторінка"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Погана швидкість стор."); + LSTR MSG_ACTIVE_VTOOL = _UxGT("Активація В-інструменту"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Псевдонім В-інструменту"); + LSTR MSG_RESET_VTOOLS = _UxGT("Зкидання В-інструментів"); + #else + LSTR MSG_ACTIVE_VTOOL = _UxGT("Актив. В-інструм."); + LSTR MSG_GRADIENT_ALIAS = _UxGT("Псевдонім В-інструм"); + LSTR MSG_RESET_VTOOLS = _UxGT("Зкидання В-інструм."); + #endif + LSTR MSG_START_VTOOL = _UxGT("Початок В-інструменту"); + LSTR MSG_END_VTOOL = _UxGT("Кінець В-інструменту"); + LSTR MSG_COMMIT_VTOOL = _UxGT("Змішати В-інструменти"); + LSTR MSG_VTOOLS_RESET = _UxGT("В-інструменти зкинуті"); + LSTR MSG_START_Z = _UxGT("Початок Z:"); + LSTR MSG_END_Z = _UxGT(" Кінець Z:"); + + LSTR MSG_GAMES = _UxGT("Ігри"); + LSTR MSG_BRICKOUT = _UxGT("Цеглини"); + LSTR MSG_INVADERS = _UxGT("Вторгнення"); + LSTR MSG_SNAKE = _UxGT("Zм!йк@"); + LSTR MSG_MAZE = _UxGT("Лабіринт"); + + LSTR MSG_BAD_PAGE = _UxGT("Погана сторінка"); + #if LCD_WIDTH > 21 + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Погана швидкість стор."); #else - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("Погана швидк. стор."); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("Погана швидк. стор."); #endif - PROGMEM Language_Str MSG_EDIT_PASSWORD = _UxGT("Редагувати пароль"); - PROGMEM Language_Str MSG_LOGIN_REQUIRED = _UxGT("Потрібен логін"); - PROGMEM Language_Str MSG_PASSWORD_SETTINGS = _UxGT("Параметри паролю"); - PROGMEM Language_Str MSG_ENTER_DIGIT = _UxGT("Введіть цифру"); - PROGMEM Language_Str MSG_CHANGE_PASSWORD = _UxGT("Змінити пароль"); - PROGMEM Language_Str MSG_REMOVE_PASSWORD = _UxGT("Видалити пароль"); - PROGMEM Language_Str MSG_PASSWORD_SET = _UxGT("Пароль: "); - PROGMEM Language_Str MSG_START_OVER = _UxGT("Старт через"); - PROGMEM Language_Str MSG_REMINDER_SAVE_SETTINGS = _UxGT("Не забудь зберегти!"); - PROGMEM Language_Str MSG_PASSWORD_REMOVED = _UxGT("Пароль видалений"); - - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Паркування...")); + LSTR MSG_EDIT_PASSWORD = _UxGT("Редагувати пароль"); + LSTR MSG_LOGIN_REQUIRED = _UxGT("Потрібен логін"); + LSTR MSG_PASSWORD_SETTINGS = _UxGT("Параметри паролю"); + LSTR MSG_ENTER_DIGIT = _UxGT("Введіть цифру"); + LSTR MSG_CHANGE_PASSWORD = _UxGT("Змінити пароль"); + LSTR MSG_REMOVE_PASSWORD = _UxGT("Видалити пароль"); + LSTR MSG_PASSWORD_SET = _UxGT("Пароль: "); + LSTR MSG_START_OVER = _UxGT("Старт через"); + LSTR MSG_REMINDER_SAVE_SETTINGS = _UxGT("Не забудь зберегти!"); + LSTR MSG_PASSWORD_REMOVED = _UxGT("Пароль видалений"); + // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("Паркування...")); #if LCD_HEIGHT >= 4 // Up to 3 lines allowed - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_3_LINE("Натисніть кнопку", "для продовження", "друку")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Зачекайте", "на початок", "заміни прутка")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Вставте пруток", "та натисніть", "для продовження")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Натисніть кнопку", "для нагріву сопла")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Сопло нагрівається", "зачекайте...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Зачекайте", "на вивід прутка")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Зачекайте", "на ввід прутка")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Дочекайтесь", "очищення прутка")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Натисніть кнопку", "для завершення", "очищення прутка")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Зачекайте", "на відновлення", "друку")); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_3_LINE("Натисніть кнопку", "для продовження", "друку")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Зачекайте", "на початок", "заміни прутка")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Вставте пруток", "та натисніть", "для продовження")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Натисніть кнопку", "для нагріву сопла")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Сопло нагрівається", "зачекайте...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Зачекайте", "на вивід прутка")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Зачекайте", "на ввід прутка")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Дочекайтесь", "очищення прутка")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_3_LINE("Натисніть кнопку", "для завершення", "очищення прутка")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_3_LINE("Зачекайте", "на відновлення", "друку")); #else // Up to 2 lines allowed - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Продовжити друк")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Зачекайте...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Вставте і натисніть")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Нагріти сопло")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Нагрів сопла...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Вивід прутка...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Ввід прутка...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Очищення прутка...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Завершити очищення")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Поновлення друку...")); - #endif - - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("Драйвери TMC"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Струм драйвера"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Гібридний поріг"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Дім без кінцевиків"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Режим мікрокроку"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("Тихий режим увімк."); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("Зкидання"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" в:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("Люфт"); - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("Виправлення"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("Зглажування"); - - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("Рівень вісі X"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("Авто калібрування"); + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Продовжити друк")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Зачекайте...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Вставте і натисніть")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Нагріти сопло")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Нагрів сопла...")); + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Вивід прутка...")); + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Ввід прутка...")); + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Очищення прутка...")); + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Завершити очищення")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Поновлення друку...")); + #endif + + LSTR MSG_TMC_DRIVERS = _UxGT("Драйвери TMC"); + LSTR MSG_TMC_CURRENT = _UxGT("Струм драйвера"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Гібридний поріг"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("Дім без кінцевиків"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Режим мікрокроку"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("Тихий режим увімк."); + LSTR MSG_SERVICE_RESET = _UxGT("Зкидання"); + LSTR MSG_SERVICE_IN = _UxGT(" в:"); + LSTR MSG_BACKLASH = _UxGT("Люфт"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("Виправлення"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("Зглажування"); + + LSTR MSG_LEVEL_X_AXIS = _UxGT("Рівень вісі X"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("Авто калібрування"); #if ENABLED(TOUCH_UI_FTDI_EVE) - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Час простою збіг, температура впала. Натисніть ОК, щоби знову нагріти та продовжити"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Час простою збіг, температура впала. Натисніть ОК, щоби знову нагріти та продовжити"); #else - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("Час нагрівача збіг"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("Час нагрівача збіг"); #endif - PROGMEM Language_Str MSG_REHEAT = _UxGT("Поновити нагрів"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("Нагрівання..."); + LSTR MSG_REHEAT = _UxGT("Поновити нагрів"); + LSTR MSG_REHEATING = _UxGT("Нагрівання..."); - PROGMEM Language_Str MSG_PROBE_WIZARD = _UxGT("Майстер Z-зонда"); + LSTR MSG_PROBE_WIZARD = _UxGT("Майстер Z-зонда"); #if LCD_WIDTH > 21 - PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Зондув. контрольної точки Z"); - PROGMEM Language_Str MSG_PROBE_WIZARD_MOVING = _UxGT("Рух до точки зондування"); + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Зондув. контрольної точки Z"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Рух до точки зондування"); #else - PROGMEM Language_Str MSG_PROBE_WIZARD_PROBING = _UxGT("Зондув.контр.точки Z"); - PROGMEM Language_Str MSG_PROBE_WIZARD_MOVING = _UxGT("Рух до точки зондув."); + LSTR MSG_PROBE_WIZARD_PROBING = _UxGT("Зондув.контр.точки Z"); + LSTR MSG_PROBE_WIZARD_MOVING = _UxGT("Рух до точки зондув."); #endif - PROGMEM Language_Str MSG_SOUND = _UxGT("Звук"); + LSTR MSG_SOUND = _UxGT("Звук"); + + LSTR MSG_TOP_LEFT = _UxGT("Верхній лівий"); + LSTR MSG_BOTTOM_LEFT = _UxGT("Нижній лівий"); + LSTR MSG_TOP_RIGHT = _UxGT("Верхній правий"); + LSTR MSG_BOTTOM_RIGHT = _UxGT("Нижній правий"); + LSTR MSG_CALIBRATION_COMPLETED = _UxGT("Калібрування успішне"); + LSTR MSG_CALIBRATION_FAILED = _UxGT("Збій калібрування"); + + LSTR MSG_DRIVER_BACKWARD = _UxGT(" драйвер назад"); - PROGMEM Language_Str MSG_TOP_LEFT = _UxGT("Верхній лівий"); - PROGMEM Language_Str MSG_BOTTOM_LEFT = _UxGT("Нижній лівий"); - PROGMEM Language_Str MSG_TOP_RIGHT = _UxGT("Верхній правий"); - PROGMEM Language_Str MSG_BOTTOM_RIGHT = _UxGT("Нижній правий"); - PROGMEM Language_Str MSG_CALIBRATION_COMPLETED = _UxGT("Калібрування успішне"); - PROGMEM Language_Str MSG_CALIBRATION_FAILED = _UxGT("Збій калібрування"); + LSTR MSG_SD_CARD = _UxGT("SD Картка"); + LSTR MSG_USB_DISK = _UxGT("USB Диск"); } #if FAN_COUNT == 1 diff --git a/Marlin/src/lcd/language/language_vi.h b/Marlin/src/lcd/language/language_vi.h index fad32507cee5..9a4ef464b5c6 100644 --- a/Marlin/src/lcd/language/language_vi.h +++ b/Marlin/src/lcd/language/language_vi.h @@ -30,411 +30,427 @@ namespace Language_vi { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 2; - PROGMEM Language_Str LANGUAGE = _UxGT("Vietnamese"); + constexpr uint8_t CHARSIZE = 2; + LSTR LANGUAGE = _UxGT("Vietnamese"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT(" Sẵn sàng."); // Ready - PROGMEM Language_Str MSG_BACK = _UxGT("Trở lại"); // Back - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("Đang hủy bỏ..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("Phương tiện được cắm vào"); // Media inserted - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("Phương tiện được rút ra"); - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("Chờ đợi phương tiện"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("Lỗi đọc phương tiện"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB được rút ra"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB khởi thất bại"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("Công tắc"); // Endstops - công tắc hành trình - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("Công tắc mềm"); // soft Endstops - PROGMEM Language_Str MSG_MAIN = _UxGT("Chính"); // Main - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("Thiết lập cấp cao"); // Advanced Settings - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("Cấu hình"); // Configuration - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("Khởi chạy tự động"); // Autostart - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("Tắt động cơ bước"); // Disable steppers - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("Menu gỡ lỗi"); // Debug Menu - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("Kiểm tra tiến độ"); // Progress bar test - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("Về nhà tự động"); // Auto home - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("Về nhà X"); // home x - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("Về nhà Y"); // home y - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("Về nhà Z"); - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("Chỉnh canh Z tự động"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("Đang về nhà XYZ"); // Homing XYZ - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("Nhấn để bắt đầu"); // Click to Begin - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("Điểm tiếp theo"); // Next Point - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("San lấp được hoàn thành"); // Leveling Done! - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("Chiều cao mờ dần"); // Fade Height - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("Đặt bù đắp nhà"); // Set home offsets - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("Bù đắp được áp dụng"); // Offsets applied - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("Đặt nguồn gốc"); // Set origin + LSTR WELCOME_MSG = MACHINE_NAME _UxGT(" Sẵn sàng."); // Ready + LSTR MSG_BACK = _UxGT("Trở lại"); // Back + LSTR MSG_MEDIA_ABORTING = _UxGT("Đang hủy bỏ..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("Phương tiện được cắm vào"); // Media inserted + LSTR MSG_MEDIA_REMOVED = _UxGT("Phương tiện được rút ra"); + LSTR MSG_MEDIA_WAITING = _UxGT("Chờ đợi phương tiện"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("Lỗi đọc phương tiện"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB được rút ra"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB khởi thất bại"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("Công tắc"); // Endstops - công tắc hành trình + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("Công tắc mềm"); // soft Endstops + LSTR MSG_MAIN = _UxGT("Chính"); // Main + LSTR MSG_ADVANCED_SETTINGS = _UxGT("Thiết lập cấp cao"); // Advanced Settings + LSTR MSG_CONFIGURATION = _UxGT("Cấu hình"); // Configuration + LSTR MSG_RUN_AUTO_FILES = _UxGT("Khởi chạy tự động"); // Autostart + LSTR MSG_DISABLE_STEPPERS = _UxGT("Tắt động cơ bước"); // Disable steppers + LSTR MSG_DEBUG_MENU = _UxGT("Menu gỡ lỗi"); // Debug Menu + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("Kiểm tra tiến độ"); // Progress bar test + LSTR MSG_AUTO_HOME = _UxGT("Về nhà tự động"); // Auto home + LSTR MSG_AUTO_HOME_X = _UxGT("Về nhà X"); // home X + LSTR MSG_AUTO_HOME_Y = _UxGT("Về nhà Y"); // home Y + LSTR MSG_AUTO_HOME_Z = _UxGT("Về nhà Z"); // home Z + LSTR MSG_AUTO_Z_ALIGN = _UxGT("Chỉnh canh Z tự động"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("Đang về nhà XYZ"); // Homing XYZ + LSTR MSG_LEVEL_BED_WAITING = _UxGT("Nhấn để bắt đầu"); // Click to Begin + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("Điểm tiếp theo"); // Next Point + LSTR MSG_LEVEL_BED_DONE = _UxGT("San lấp được hoàn thành"); // Leveling Done! + LSTR MSG_Z_FADE_HEIGHT = _UxGT("Chiều cao mờ dần"); // Fade Height + LSTR MSG_SET_HOME_OFFSETS = _UxGT("Đặt bù đắp nhà"); // Set home offsets + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("Bù đắp được áp dụng"); // Offsets applied + LSTR MSG_SET_ORIGIN = _UxGT("Đặt nguồn gốc"); // Set origin #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" trước"); // Preheat - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" trước ~"); // Preheat - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Đầu"); - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Đầu ~"); - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Tất cả"); // all - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Bàn"); // bed -- using vietnamese term for 'table' instead - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Cấu hình"); // conf + LSTR MSG_PREHEAT_1 = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" trước"); // Preheat + LSTR MSG_PREHEAT_1_H = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" trước ~"); // Preheat + LSTR MSG_PREHEAT_1_END = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Đầu"); + LSTR MSG_PREHEAT_1_END_E = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Đầu ~"); + LSTR MSG_PREHEAT_1_ALL = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Tất cả"); // all + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Bàn"); // bed -- using vietnamese term for 'table' instead + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("Làm nóng ") PREHEAT_1_LABEL _UxGT(" Cấu hình"); // conf - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("Làm nóng $ trước"); // Preheat - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("Làm nóng $ trước ~"); // Preheat - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("Làm nóng $ Đầu"); - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("Làm nóng $ Đầu ~"); - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("Làm nóng $ Tất cả"); // all - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("Làm nóng $ Bàn"); // bed -- using vietnamese term for 'table' instead - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("Làm nóng $ Cấu hình"); // conf + LSTR MSG_PREHEAT_M = _UxGT("Làm nóng $ trước"); // Preheat + LSTR MSG_PREHEAT_M_H = _UxGT("Làm nóng $ trước ~"); // Preheat + LSTR MSG_PREHEAT_M_END = _UxGT("Làm nóng $ Đầu"); + LSTR MSG_PREHEAT_M_END_E = _UxGT("Làm nóng $ Đầu ~"); + LSTR MSG_PREHEAT_M_ALL = _UxGT("Làm nóng $ Tất cả"); // all + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Làm nóng $ Bàn"); // bed -- using vietnamese term for 'table' instead + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Làm nóng $ Cấu hình"); // conf #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("Sự nóng trước tự chọn"); // Preheat Custom - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("Nguội xuống"); // Cooldown - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Bật nguồn"); // Switch power on - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Tắt nguồn"); // Switch power off - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Ép đùn"); // Extrude - PROGMEM Language_Str MSG_RETRACT = _UxGT("Rút lại"); // Retract - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Di chuyển trục"); // Move axis - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("San Lấp Bàn"); // Bed Leveling - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Làm bằng mặt bàn"); // Level bed - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("Làm bằng góc bàn"); // Level corners - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("Góc tiếp theo"); // Next corner - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("Chỉnh lưới đã dừng"); // Mesh Editing Stopped - PROGMEM Language_Str MSG_MESH_X = _UxGT("Mục lục X"); // Index X - PROGMEM Language_Str MSG_MESH_Y = _UxGT("Mục lục Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Giá trị Z"); // Z Value - PROGMEM Language_Str MSG_USER_MENU = _UxGT("Các lệnh tự chọn"); // Custom Commands - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("Đang chạy G29"); // Doing G29 - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("Công cụ UBL"); // UBL tools - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("San Lấp Bàn Thống Nhất (UBL)"); // Unified Bed Leveling - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("chế độ IDEX"); // IDEX Mode - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Đậu tự động"); // Auto-Park - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Sự gấp đôi"); // Duplication - PROGMEM Language_Str MSG_IDEX_MODE_SCALED_COPY = _UxGT("Bản sao thu nhỏ"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Toàn quyền điều khiển"); // Full control - PROGMEM Language_Str MSG_IDEX_X_OFFSET = _UxGT("Đầu phun X nhì"); // 2nd nozzle X - PROGMEM Language_Str MSG_IDEX_Y_OFFSET = _UxGT("Đầu phun Y nhì"); - PROGMEM Language_Str MSG_IDEX_Z_OFFSET = _UxGT("Đầu phun Z nhì"); - PROGMEM Language_Str MSG_IDEX_SAVE_OFFSETS = _UxGT("Lưu bù đắp"); // Save offsets - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("Tự xây dựng lưới"); // Manually Build Mesh - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("Đặt chêm và đo"); // Place shim & measure - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("Đo"); // Measure - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("Tháo và đo bàn"); // Remove & measure bed - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("Chuyển sang tiếp theo"); // moving to next - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("Bật UBL"); - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("Tắt UBL"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("Nhiệt độ bàn"); // Bed Temp - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("Nhiệt độ đầu phun"); // Hotend Temp - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("Chỉnh sửa lưới"); // Mesh Edit - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Chỉnh sửa lưới tự chọn"); // Edit Custom Mesh - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("Chỉnh lưới chính xác"); // Fine tuning mesh - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("Chỉnh sửa xong lưới"); // Done Editing Mesh - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Xây dựng lưới tự chọn"); // Build Custom Mesh - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("Xây dựng lưới"); // Build Mesh + LSTR MSG_PREHEAT_CUSTOM = _UxGT("Sự nóng trước tự chọn"); // Preheat Custom + LSTR MSG_COOLDOWN = _UxGT("Nguội xuống"); // Cooldown + LSTR MSG_SWITCH_PS_ON = _UxGT("Bật nguồn"); // Switch power on + LSTR MSG_SWITCH_PS_OFF = _UxGT("Tắt nguồn"); // Switch power off + LSTR MSG_EXTRUDE = _UxGT("Ép đùn"); // Extrude + LSTR MSG_RETRACT = _UxGT("Rút lại"); // Retract + LSTR MSG_MOVE_AXIS = _UxGT("Di chuyển trục"); // Move axis + LSTR MSG_BED_LEVELING = _UxGT("San Lấp Bàn"); // Bed Leveling + LSTR MSG_LEVEL_BED = _UxGT("Làm bằng mặt bàn"); // Level bed + LSTR MSG_BED_TRAMMING = _UxGT("Làm bằng góc bàn"); // Level corners + LSTR MSG_NEXT_CORNER = _UxGT("Góc tiếp theo"); // Next corner + LSTR MSG_EDITING_STOPPED = _UxGT("Chỉnh lưới đã dừng"); // Mesh Editing Stopped + LSTR MSG_MESH_X = _UxGT("Mục lục X"); // Index X + LSTR MSG_MESH_Y = _UxGT("Mục lục Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Giá trị Z"); // Z Value + LSTR MSG_CUSTOM_COMMANDS = _UxGT("Các lệnh tự chọn"); // Custom Commands + LSTR MSG_UBL_DOING_G29 = _UxGT("Đang chạy G29"); // Doing G29 + LSTR MSG_UBL_TOOLS = _UxGT("Công cụ UBL"); // UBL tools + LSTR MSG_UBL_LEVEL_BED = _UxGT("San Lấp Bàn Thống Nhất (UBL)"); // Unified Bed Leveling + LSTR MSG_IDEX_MENU = _UxGT("chế độ IDEX"); // IDEX Mode + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Đậu tự động"); // Auto-Park + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Sự gấp đôi"); // Duplication + LSTR MSG_IDEX_MODE_SCALED_COPY = _UxGT("Bản sao thu nhỏ"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Toàn quyền điều khiển"); // Full control + LSTR MSG_IDEX_X_OFFSET = _UxGT("Đầu phun X nhì"); // 2nd nozzle X + LSTR MSG_IDEX_Y_OFFSET = _UxGT("Đầu phun Y nhì"); + LSTR MSG_IDEX_Z_OFFSET = _UxGT("Đầu phun Z nhì"); + LSTR MSG_IDEX_SAVE_OFFSETS = _UxGT("Lưu bù đắp"); // Save offsets + LSTR MSG_UBL_MANUAL_MESH = _UxGT("Tự xây dựng lưới"); // Manually Build Mesh + LSTR MSG_UBL_BC_INSERT = _UxGT("Đặt chêm và đo"); // Place shim & measure + LSTR MSG_UBL_BC_INSERT2 = _UxGT("Đo"); // Measure + LSTR MSG_UBL_BC_REMOVE = _UxGT("Tháo và đo bàn"); // Remove & measure bed + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("Chuyển sang tiếp theo"); // moving to next + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("Bật UBL"); + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("Tắt UBL"); + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("Nhiệt độ bàn"); // Bed Temp + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("Bed Temp"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("Nhiệt độ đầu phun"); // Hotend Temp + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("Hotend Temp"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("Chỉnh sửa lưới"); // Mesh Edit + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("Chỉnh sửa lưới tự chọn"); // Edit Custom Mesh + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("Chỉnh lưới chính xác"); // Fine tuning mesh + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("Chỉnh sửa xong lưới"); // Done Editing Mesh + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("Xây dựng lưới tự chọn"); // Build Custom Mesh + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("Xây dựng lưới"); // Build Mesh #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("Xây dựng lưới ($)"); - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("Thẩm tra lưới ($)"); + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("Xây dựng lưới ($)"); + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("Thẩm tra lưới ($)"); #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("Xây dựng lưới lạnh"); // Build cold mesh - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Điều chỉnh chiều cao lưới"); // Adjust Mesh Height - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Số lượng chiều cao"); // Height Amount - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Thẩm tra lưới"); // Validate Mesh - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Thẩm tra lưới tự chọn"); // validate custom mesh - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("Tiếp tục xây lưới bàn"); // Continue Bed Mesh - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("Đang san lấp lưới"); // Mesh Leveling - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Đang san lấp 3-điểm"); // 3-Point Leveling - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("Đang san lấp lưới phẳng"); // Grid (planar) Mesh Leveling - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("Làm bằng lưới"); // Level Mesh - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("Điểm bên cạnh"); // Side Points - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("Loại bản đồ"); // Map Type - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("Đầu ra bản đồ lưới"); // Output Mesh Map - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Đầu ra cho máy chủ"); // Output for Host - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Đầu ra cho CSV"); // Output for CSV - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Hỗ trợ lưới"); // Off Printer Backup | backup mesh - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("Đầu ra thông tin UBL"); // Output UBL Info - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("Chỉnh sửa lưới"); // Edit mesh - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("Số lượng lấp đầy"); // Fill-in Amount - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("Tự lấp đầy"); // Manual Fill-in - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("Lấp đầy thông minh"); // Smart Fill-in - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("Lưới lấp đầy"); // Fill-in Mesh - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("Bác bỏ tất cả"); // Invalidate All - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Bác bỏ gần nhất"); // Invalidate Closest - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("Chỉnh chính xác tất cả"); // Fine Tune ALl - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Chỉnh chính xác gần nhất"); // Fine Tune Closest - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("Lưu trữ lưới"); // Mesh Storage - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("Khe nhớ"); // Memory Slot - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("Tải lưới bàn"); // Load Bed Mesh - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("Lưu lưới bàn"); // Save Bed Mesh - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("%i lưới được nạp"); // Mesh %i loaded - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("%i lưới đã lưu"); - PROGMEM Language_Str MSG_NO_STORAGE = _UxGT("Không lưu trữ"); // No Storage - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("Điều sai: Lưu UBL"); // Err: UBL Save - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("Điều Sai: Khôi Phục UBL"); // Err: UBL Restore - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Đầu Dò-Z Đã Ngừng"); // Z-Offset Stopped - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Bước-Từng-Bước UBL"); // Step-By-Step UBL - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Xây dựng lưới lạnh"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2.Lấp đầy thông minh"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Thẩm tra lưới"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Chỉnh chính xác tất cả"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Thẩm tra lưới"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Chỉnh chính xác tất cả"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7.Lưu lưới bàn"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("Xây dựng lưới lạnh"); // Build cold mesh + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("Điều chỉnh chiều cao lưới"); // Adjust Mesh Height + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("Số lượng chiều cao"); // Height Amount + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("Thẩm tra lưới"); // Validate Mesh + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("Thẩm tra lưới tự chọn"); // validate custom mesh + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("Tiếp tục xây lưới bàn"); // Continue Bed Mesh + LSTR MSG_UBL_MESH_LEVELING = _UxGT("Đang san lấp lưới"); // Mesh Leveling + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("Đang san lấp 3-điểm"); // 3-Point Leveling + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("Đang san lấp lưới phẳng"); // Grid (planar) Mesh Leveling + LSTR MSG_UBL_MESH_LEVEL = _UxGT("Làm bằng lưới"); // Level Mesh + LSTR MSG_UBL_SIDE_POINTS = _UxGT("Điểm bên cạnh"); // Side Points + LSTR MSG_UBL_MAP_TYPE = _UxGT("Loại bản đồ"); // Map Type + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("Đầu ra bản đồ lưới"); // Output Mesh Map + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("Đầu ra cho máy chủ"); // Output for Host + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("Đầu ra cho CSV"); // Output for CSV + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("Hỗ trợ lưới"); // Off Printer Backup | backup mesh + LSTR MSG_UBL_INFO_UBL = _UxGT("Đầu ra thông tin UBL"); // Output UBL Info + LSTR MSG_EDIT_MESH = _UxGT("Chỉnh sửa lưới"); // Edit mesh + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("Số lượng lấp đầy"); // Fill-in Amount + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("Tự lấp đầy"); // Manual Fill-in + LSTR MSG_UBL_SMART_FILLIN = _UxGT("Lấp đầy thông minh"); // Smart Fill-in + LSTR MSG_UBL_FILLIN_MESH = _UxGT("Lưới lấp đầy"); // Fill-in Mesh + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("Bác bỏ tất cả"); // Invalidate All + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("Bác bỏ gần nhất"); // Invalidate Closest + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("Chỉnh chính xác tất cả"); // Fine Tune ALl + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("Chỉnh chính xác gần nhất"); // Fine Tune Closest + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("Lưu trữ lưới"); // Mesh Storage + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("Khe nhớ"); // Memory Slot + LSTR MSG_UBL_LOAD_MESH = _UxGT("Tải lưới bàn"); // Load Bed Mesh + LSTR MSG_UBL_SAVE_MESH = _UxGT("Lưu lưới bàn"); // Save Bed Mesh + LSTR MSG_MESH_LOADED = _UxGT("%i lưới được nạp"); // Mesh %i loaded + LSTR MSG_MESH_SAVED = _UxGT("%i lưới đã lưu"); + LSTR MSG_NO_STORAGE = _UxGT("Không lưu trữ"); // No Storage + LSTR MSG_UBL_SAVE_ERROR = _UxGT("Điều sai: Lưu UBL"); // Err: UBL Save + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("Điều Sai: Khôi Phục UBL"); // Err: UBL Restore + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Đầu Dò-Z Đã Ngừng"); // Z-Offset Stopped + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("Bước-Từng-Bước UBL"); // Step-By-Step UBL + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1.Xây dựng lưới lạnh"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2.Lấp đầy thông minh"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3.Thẩm tra lưới"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4.Chỉnh chính xác tất cả"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5.Thẩm tra lưới"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6.Chỉnh chính xác tất cả"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7.Lưu lưới bàn"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("Điều khiển LED"); // LED Control - PROGMEM Language_Str MSG_LEDS = _UxGT("Đèn"); // Lights - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("Đèn định sẵn"); // Light Presets - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("Đỏ"); // Red - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("Cam"); // Orange - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("Vàng"); // Yellow - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("Xanh Lá"); // Green - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("Xanh"); // Blue - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("Xanh Đậm"); // Indigo - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("Tím"); // Violet - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("Trắng"); // White - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("Mặc định"); // Default - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("Đèn Tự Chọn"); // Custom Lights - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("Cường Độ Đỏ"); // Red Intensity - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("Cường Độ Xanh Lá"); // Green Intensity - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("Cường Độ Xanh"); // Blue Intensity - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("Cường Độ Trắng"); // White Intensity - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("độ sáng"); // Brightness + LSTR MSG_LED_CONTROL = _UxGT("Điều khiển LED"); // LED Control + LSTR MSG_LEDS = _UxGT("Đèn"); // Lights + LSTR MSG_LED_PRESETS = _UxGT("Đèn định sẵn"); // Light Presets + LSTR MSG_SET_LEDS_RED = _UxGT("Đỏ"); // Red + LSTR MSG_SET_LEDS_ORANGE = _UxGT("Cam"); // Orange + LSTR MSG_SET_LEDS_YELLOW = _UxGT("Vàng"); // Yellow + LSTR MSG_SET_LEDS_GREEN = _UxGT("Xanh Lá"); // Green + LSTR MSG_SET_LEDS_BLUE = _UxGT("Xanh"); // Blue + LSTR MSG_SET_LEDS_INDIGO = _UxGT("Xanh Đậm"); // Indigo + LSTR MSG_SET_LEDS_VIOLET = _UxGT("Tím"); // Violet + LSTR MSG_SET_LEDS_WHITE = _UxGT("Trắng"); // White + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("Mặc định"); // Default + LSTR MSG_CUSTOM_LEDS = _UxGT("Đèn Tự Chọn"); // Custom Lights + LSTR MSG_INTENSITY_R = _UxGT("Cường Độ Đỏ"); // Red Intensity + LSTR MSG_INTENSITY_G = _UxGT("Cường Độ Xanh Lá"); // Green Intensity + LSTR MSG_INTENSITY_B = _UxGT("Cường Độ Xanh"); // Blue Intensity + LSTR MSG_INTENSITY_W = _UxGT("Cường Độ Trắng"); // White Intensity + LSTR MSG_LED_BRIGHTNESS = _UxGT("độ sáng"); // Brightness - PROGMEM Language_Str MSG_MOVING = _UxGT("Di chuyển..."); // Moving - PROGMEM Language_Str MSG_FREE_XY = _UxGT("Giải phóng XY"); // Free XY - PROGMEM Language_Str MSG_MOVE_X = _UxGT("Di chuyển X"); // Move X - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("Di chuyển Y"); - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("Di chuyển Z"); - PROGMEM Language_Str MSG_MOVE_E = _UxGT("Máy đùn"); // Extruder - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("Máy đùn *"); // Extruder - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("Đầu nóng quá lạnh"); // Hotend too cold - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("Di chuyển 0.1mm"); // Move 0.1mm - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("Di chuyển 1mm"); // Move 1mm - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("Di chuyển 10mm"); // Move 10mm - PROGMEM Language_Str MSG_SPEED = _UxGT("Tốc độ"); // Speed - PROGMEM Language_Str MSG_BED_Z = _UxGT("Z Bàn"); - PROGMEM Language_Str MSG_NOZZLE = _UxGT("Đầu phun"); // Nozzle - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("Đầu phun ~"); // Nozzle - PROGMEM Language_Str MSG_BED = _UxGT("Bàn"); // bed - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("Tốc độ quạt"); // fan speed - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("Tốc độ quạt ~"); // fan speed - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("Tốc độ quạt phụ"); // Extra fan speed - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("Tốc độ quạt phụ ~"); // Extra fan speed - PROGMEM Language_Str MSG_FLOW = _UxGT("Lưu Lượng"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("Lưu Lượng ~"); - PROGMEM Language_Str MSG_CONTROL = _UxGT("Điều khiển"); // Control - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Đa"); // min - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Thiểu"); - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Hệ Số"); // factor - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("Nhiệt độ tự động"); // Autotemp - PROGMEM Language_Str MSG_LCD_ON = _UxGT("Bật"); // on - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("Tắt"); // off - PROGMEM Language_Str MSG_SELECT = _UxGT("Lựa"); // Select - PROGMEM Language_Str MSG_SELECT_E = _UxGT("Lựa *"); - PROGMEM Language_Str MSG_ACC = _UxGT("Tăng Tốc"); - PROGMEM Language_Str MSG_JERK = _UxGT("Giật"); - PROGMEM Language_Str MSG_VA_JERK = _UxGT("Giật-V") LCD_STR_A; - PROGMEM Language_Str MSG_VB_JERK = _UxGT("Giật-V") LCD_STR_B; - PROGMEM Language_Str MSG_VC_JERK = _UxGT("Giật-V") LCD_STR_C; - PROGMEM Language_Str MSG_VE_JERK = _UxGT("Giật-Ve"); - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("Độ Lệch Chỗ Giao"); // Junction Dev - PROGMEM Language_Str MSG_VELOCITY = _UxGT("Vận tốc"); // velocity - PROGMEM Language_Str MSG_VMAX_A = _UxGT("Vđa") LCD_STR_A; // Vmax - PROGMEM Language_Str MSG_VMAX_B = _UxGT("Vđa") LCD_STR_B; // Vmax - PROGMEM Language_Str MSG_VMAX_C = _UxGT("Vđa") LCD_STR_C; // Vmax - PROGMEM Language_Str MSG_VMAX_E = _UxGT("Vđa") LCD_STR_E; // Vmax - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("Vđa *"); // Vmax - PROGMEM Language_Str MSG_VMIN = _UxGT("Vthiểu"); // Vmin - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("Vchuyển thiểu"); // VTrav min - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("Sự tăng tốc"); // Acceleration - PROGMEM Language_Str MSG_AMAX_A = _UxGT("Tăng tốc ca") LCD_STR_A; // Amax - PROGMEM Language_Str MSG_AMAX_B = _UxGT("Tăng tốc ca") LCD_STR_B; // Amax - PROGMEM Language_Str MSG_AMAX_C = _UxGT("Tăng tốc ca") LCD_STR_C; // Amax - PROGMEM Language_Str MSG_AMAX_E = _UxGT("Tăng tốc ca") LCD_STR_E; // Amax - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("Tăng tốc ca *"); // Amax - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("TT-Rút"); // A-retract - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("TT-Chuyển"); // A-travel - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("Bước/mm"); // Steps - PROGMEM Language_Str MSG_A_STEPS = _UxGT("Bước") LCD_STR_A _UxGT("/mm"); // Asteps/mm - PROGMEM Language_Str MSG_B_STEPS = _UxGT("Bước") LCD_STR_B _UxGT("/mm"); - PROGMEM Language_Str MSG_C_STEPS = _UxGT("Bước") LCD_STR_C _UxGT("/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("BướcE/mm"); - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("Bước */mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("Nhiệt độ"); // Temperature - PROGMEM Language_Str MSG_MOTION = _UxGT("Chuyển động"); // Motion - PROGMEM Language_Str MSG_FILAMENT = _UxGT("Vật liệu in"); // dây nhựa - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E bằng mm") SUPERSCRIPT_THREE; // E in mm - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("Đường kính nhựa"); // Fil. Dai. - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("Đường kính nhựa *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("Dỡ mm"); // unload mm - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("Nạp mm"); - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("K Cấp Cao"); // Advance K - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("K Cấp Cao *"); // Advance K - PROGMEM Language_Str MSG_CONTRAST = _UxGT("Độ tương phản LCD"); // LCD contrast - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("Lưu các thiết lập"); // Store settings - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("Tải các cài đặt"); // Load settings - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("Khôi phục phòng hư"); // Restore Defaults - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("Khởi Tạo EEPROM"); // Initialize EEPROM - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("Cập Nhật phương tiện"); // Update media - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("Bặt Lại Máy In"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("Cập Nhật"); // Refresh - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("Màn Hình Thông Tin"); // Info screen - PROGMEM Language_Str MSG_PREPARE = _UxGT("Chuẩn bị"); // Prepare - PROGMEM Language_Str MSG_TUNE = _UxGT("Điều Chỉnh"); // Tune - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("Tạm dừng in"); // Pause print - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("Tiếp tục in"); // Resume print - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("Ngừng in"); // Stop print - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("Phục Hồi Mất Điện"); // Outage Recovery - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("In từ phương tiện"); // Print from media - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("Không có phương tiện"); // No media - PROGMEM Language_Str MSG_DWELL = _UxGT("Ngủ..."); // Sleep - PROGMEM Language_Str MSG_USERWAIT = _UxGT("Nhấn để tiếp tục..."); // Click to resume (same as 'continue') - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("In tạm dừng"); // print paused - PROGMEM Language_Str MSG_PRINTING = _UxGT("Đang in..."); // printing - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("In đã hủy bỏ"); // Print aborted - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Không di chuyển."); // No move. - PROGMEM Language_Str MSG_KILLED = _UxGT("ĐÃ CHẾT. "); - PROGMEM Language_Str MSG_STOPPED = _UxGT("ĐÃ NGỪNG. "); - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Rút mm"); // Retract mm - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Rút Trao.mm"); // Swap Re.mm - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Rút V"); - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Nhảy mm"); // hop - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("BỏRút mm"); // Unretr. mm - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("BỏRút T mm"); // S Unretr. mm - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("BỏRút V"); // UnRet V - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("BỏRút T V"); // S UnRet V - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("RútTựĐộng"); // Auto-Retract - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("Khoảng Cách Rút"); // Retract Distance - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("Thay Đổi Công Cụ"); // Tool Change - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Đưa Lên Z"); // Z Raise - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Tốc Độ Tuôn Ra"); // Prime Speed - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Tốc Độ Rút Lại"); // Retract Speed - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("Thay dây nhựa"); // change filament - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("Thay dây nhựa *"); // change filament - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("Nạp dây nhựa"); // load filament - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("Nạp dây nhựa *"); // load filament - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("Dỡ dây nhựa"); // unload filament - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("Dỡ dây nhựa *"); // unload filament - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("Dỡ tất cả"); // Unload All - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("Khởi tạo phương tiện"); // Attach media - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("Thay phương tiện"); // Change midea - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("Phát hành phương tiện"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Đầu Dò Z qua bàn"); // Z Probe past bed - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("Hệ số nghiêng"); // Skew Factor - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTOUCH"); // BLTouch - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("Tự kiểm tra BLTOUCH "); // BLTouch Self-Test - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("Bặt lại BLTouch"); // Reset BLTouch - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("Đem BLTouch"); // Deploy BLTouch - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("Cất BLTouch"); // Stow BLTouch - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("Đem Đầu Dò-Z"); // Deploy Z-Probe - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("Cất Đầu Dò-Z"); // Stow Z-Probe - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("Về nhà %s%s%s Trước"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("Đầu Dò Bù Đắp Z"); // Probe Z Offset - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("Nhít X"); // Babystep X - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("Nhít Y"); - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("Nhít Z"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("Hủy bỏ công tắc"); // Endstop abort - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("Sưởi đầu phun không thành công"); // Heating failed - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("Điều sai: nhiệt độ dư"); // Err: REDUNDANT TEMP - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("Vấn đề nhiệt"); // THERMAL RUNAWAY | problem - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("Vấn đề nhiệt bàn"); // BED THERMAL RUNAWAY - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("Điều sai: nhiệt độ tối đa"); // Err: MAXTEMP - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("Điều sai: nhiệt độ tối thiểu"); // Err: MINTEMP - PROGMEM Language_Str MSG_HALTED = _UxGT("MÁY IN ĐÃ DỪNG LẠI"); // PRINTER HALTED - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("Xin bặt lại"); // Please reset - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("n"); // d - ngày - One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("g"); // h - giờ - One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("p"); // m - phút - One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("Đang sưởi nóng..."); // heating - PROGMEM Language_Str MSG_COOLING = _UxGT("Đang làm nguội..."); // cooling - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("Đang sưởi nong bàn..."); // bed heating - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("Đang làm nguội bàn..."); // bed cooling - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("Cân Chỉnh Delta"); // Delta calibration - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("Chỉnh X lại"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("Chỉnh Y lại"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("Chỉnh Z lại"); - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("Chỉnh Z Center"); // Calibrate Center - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("Cài Đặt Delta"); // Delta Settings - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("Cân Chỉnh Tự Động"); // Auto Calibration - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Đặt Chiều Cao Delta"); // Set Delta Height - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Đầu Dò Z-Bù Đắp"); // Probe Z-offset - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("Gậy Chéo"); // Diag Rod - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("Chiều Cao"); // Height - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("Bán Kính"); // Radius - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("Về Máy In"); - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("Thông Tin Máy In"); // Printer Info - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("San lấp 3-Điểm"); // 3-Point Leveling - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("San Lấp Tuyến Tính"); // Linear Leveling - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("San Lấp Song Tuyến"); // Bilinear Leveling - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("San Lấp Bàn Thống Nhất"); // Unified Bed Leveling - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("Lưới San Lấp"); // Mesh Leveling - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("Thống Kê Máy In"); // Printer Stats - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("Thông Tin Bo Mạch"); // Board Info - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("Điện Trở Nhiệt"); // Thermistors - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("Máy đùn"); // Extruders - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("Baud"); // Baud - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("Giao Thức"); // Protocol - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("Đèn Khuông"); // Case light - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Độ Sáng"); // Light Brightness + LSTR MSG_MOVING = _UxGT("Di chuyển..."); // Moving + LSTR MSG_FREE_XY = _UxGT("Giải phóng XY"); // Free XY + LSTR MSG_MOVE_X = _UxGT("Di chuyển X"); // Move X + LSTR MSG_MOVE_Y = _UxGT("Di chuyển Y"); + LSTR MSG_MOVE_Z = _UxGT("Di chuyển Z"); + LSTR MSG_MOVE_E = _UxGT("Máy đùn"); // Extruder + LSTR MSG_MOVE_EN = _UxGT("Máy đùn *"); + LSTR MSG_HOTEND_TOO_COLD = _UxGT("Đầu nóng quá lạnh"); // Hotend too cold + LSTR MSG_MOVE_01MM = _UxGT("Di chuyển 0.1mm"); // Move 0.1mm + LSTR MSG_MOVE_1MM = _UxGT("Di chuyển 1mm"); // Move 1mm + LSTR MSG_MOVE_10MM = _UxGT("Di chuyển 10mm"); // Move 10mm + LSTR MSG_MOVE_100MM = _UxGT("Di chuyển 100mm"); // Move 100mm + LSTR MSG_SPEED = _UxGT("Tốc độ"); // Speed + LSTR MSG_BED_Z = _UxGT("Z Bàn"); + LSTR MSG_NOZZLE = _UxGT("Đầu phun"); // Nozzle + LSTR MSG_NOZZLE_N = _UxGT("Đầu phun ~"); + LSTR MSG_BED = _UxGT("Bàn"); // bed + LSTR MSG_FAN_SPEED = _UxGT("Tốc độ quạt"); // fan speed + LSTR MSG_FAN_SPEED_N = _UxGT("Tốc độ quạt ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("Tốc độ quạt phụ"); // Extra fan speed + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("Tốc độ quạt phụ ~"); + LSTR MSG_FLOW = _UxGT("Lưu Lượng"); + LSTR MSG_FLOW_N = _UxGT("Lưu Lượng ~"); + LSTR MSG_CONTROL = _UxGT("Điều khiển"); // Control + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" Đa"); // min + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" Thiểu"); + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" Hệ Số"); // factor + LSTR MSG_AUTOTEMP = _UxGT("Nhiệt độ tự động"); // Autotemp + LSTR MSG_LCD_ON = _UxGT("Bật"); // on + LSTR MSG_LCD_OFF = _UxGT("Tắt"); // off + LSTR MSG_SELECT = _UxGT("Lựa"); // Select + LSTR MSG_SELECT_E = _UxGT("Lựa *"); + LSTR MSG_ACC = _UxGT("Tăng Tốc"); + LSTR MSG_JERK = _UxGT("Giật"); + LSTR MSG_VA_JERK = _UxGT("Giật-V") LCD_STR_A; + LSTR MSG_VB_JERK = _UxGT("Giật-V") LCD_STR_B; + LSTR MSG_VC_JERK = _UxGT("Giật-V") LCD_STR_C; + LSTR MSG_VI_JERK = _UxGT("Giật-V") LCD_STR_I; + LSTR MSG_VJ_JERK = _UxGT("Giật-V") LCD_STR_J; + LSTR MSG_VK_JERK = _UxGT("Giật-V") LCD_STR_K; + LSTR MSG_VE_JERK = _UxGT("Giật-Ve"); + LSTR MSG_JUNCTION_DEVIATION = _UxGT("Độ Lệch Chỗ Giao"); // Junction Dev + LSTR MSG_VELOCITY = _UxGT("Vận tốc"); // velocity + LSTR MSG_VMAX_A = _UxGT("Vđa") LCD_STR_A; // Vmax + LSTR MSG_VMAX_B = _UxGT("Vđa") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("Vđa") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("Vđa") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("Vđa") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("Vđa") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("Vđa") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("Vđa *"); + LSTR MSG_VMIN = _UxGT("Vthiểu"); // Vmin + LSTR MSG_VTRAV_MIN = _UxGT("Vchuyển thiểu"); // VTrav min + LSTR MSG_ACCELERATION = _UxGT("Sự tăng tốc"); // Acceleration + LSTR MSG_AMAX_A = _UxGT("Tăng tốc ca") LCD_STR_A; // Amax + LSTR MSG_AMAX_B = _UxGT("Tăng tốc ca") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("Tăng tốc ca") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("Tăng tốc ca") LCD_STR_I; // Amax + LSTR MSG_AMAX_J = _UxGT("Tăng tốc ca") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("Tăng tốc ca") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("Tăng tốc ca") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("Tăng tốc ca *"); + LSTR MSG_A_RETRACT = _UxGT("TT-Rút"); // A-retract + LSTR MSG_A_TRAVEL = _UxGT("TT-Chuyển"); // A-travel + LSTR MSG_STEPS_PER_MM = _UxGT("Bước/mm"); // Steps + LSTR MSG_A_STEPS = _UxGT("Bước") LCD_STR_A _UxGT("/mm"); // Steps/mm + LSTR MSG_B_STEPS = _UxGT("Bước") LCD_STR_B _UxGT("/mm"); + LSTR MSG_C_STEPS = _UxGT("Bước") LCD_STR_C _UxGT("/mm"); + LSTR MSG_I_STEPS = _UxGT("Bước") LCD_STR_I _UxGT("/mm"); // Steps/mm + LSTR MSG_J_STEPS = _UxGT("Bước") LCD_STR_J _UxGT("/mm"); + LSTR MSG_K_STEPS = _UxGT("Bước") LCD_STR_K _UxGT("/mm"); + LSTR MSG_E_STEPS = _UxGT("BướcE/mm"); + LSTR MSG_EN_STEPS = _UxGT("Bước */mm"); + LSTR MSG_TEMPERATURE = _UxGT("Nhiệt độ"); // Temperature + LSTR MSG_MOTION = _UxGT("Chuyển động"); // Motion + LSTR MSG_FILAMENT = _UxGT("Vật liệu in"); // dây nhựa + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E bằng mm") SUPERSCRIPT_THREE; // E in mm + LSTR MSG_FILAMENT_DIAM = _UxGT("Đường kính nhựa"); // Fil. Dai. + LSTR MSG_FILAMENT_DIAM_E = _UxGT("Đường kính nhựa *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("Dỡ mm"); // unload mm + LSTR MSG_FILAMENT_LOAD = _UxGT("Nạp mm"); + LSTR MSG_ADVANCE_K = _UxGT("K Cấp Cao"); // Advance K + LSTR MSG_ADVANCE_K_E = _UxGT("K Cấp Cao *"); // Advance K + LSTR MSG_CONTRAST = _UxGT("Độ tương phản LCD"); // LCD contrast + LSTR MSG_STORE_EEPROM = _UxGT("Lưu các thiết lập"); // Store settings + LSTR MSG_LOAD_EEPROM = _UxGT("Tải các cài đặt"); // Load settings + LSTR MSG_RESTORE_DEFAULTS = _UxGT("Khôi phục phòng hư"); // Restore Defaults + LSTR MSG_INIT_EEPROM = _UxGT("Khởi Tạo EEPROM"); // Initialize EEPROM + LSTR MSG_MEDIA_UPDATE = _UxGT("Cập Nhật phương tiện"); // Update media + LSTR MSG_RESET_PRINTER = _UxGT("Bặt Lại Máy In"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("Cập Nhật"); // Refresh + LSTR MSG_INFO_SCREEN = _UxGT("Màn Hình Thông Tin"); // Info screen + LSTR MSG_PREPARE = _UxGT("Chuẩn bị"); // Prepare + LSTR MSG_TUNE = _UxGT("Điều Chỉnh"); // Tune + LSTR MSG_PAUSE_PRINT = _UxGT("Tạm dừng in"); // Pause print + LSTR MSG_RESUME_PRINT = _UxGT("Tiếp tục in"); // Resume print + LSTR MSG_STOP_PRINT = _UxGT("Ngừng in"); // Stop print + LSTR MSG_OUTAGE_RECOVERY = _UxGT("Phục Hồi Mất Điện"); // Outage Recovery + LSTR MSG_MEDIA_MENU = _UxGT("In từ phương tiện"); // Print from media + LSTR MSG_NO_MEDIA = _UxGT("Không có phương tiện"); // No media + LSTR MSG_DWELL = _UxGT("Ngủ..."); // Sleep + LSTR MSG_USERWAIT = _UxGT("Nhấn để tiếp tục..."); // Click to resume (same as 'continue') + LSTR MSG_PRINT_PAUSED = _UxGT("In tạm dừng"); // print paused + LSTR MSG_PRINTING = _UxGT("Đang in..."); // printing + LSTR MSG_PRINT_ABORTED = _UxGT("In đã hủy bỏ"); // Print aborted + LSTR MSG_NO_MOVE = _UxGT("Không di chuyển."); // No move. + LSTR MSG_KILLED = _UxGT("ĐÃ CHẾT. "); + LSTR MSG_STOPPED = _UxGT("ĐÃ NGỪNG. "); + LSTR MSG_CONTROL_RETRACT = _UxGT("Rút mm"); // Retract mm + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("Rút Trao.mm"); // Swap Re.mm + LSTR MSG_CONTROL_RETRACTF = _UxGT("Rút V"); + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Nhảy mm"); // hop + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("BỏRút mm"); // Unretr. mm + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("BỏRút T mm"); // S Unretr. mm + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("BỏRút V"); // UnRet V + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("BỏRút T V"); // S UnRet V + LSTR MSG_AUTORETRACT = _UxGT("RútTựĐộng"); // Auto-Retract + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("Khoảng Cách Rút"); // Retract Distance + LSTR MSG_TOOL_CHANGE = _UxGT("Thay Đổi Công Cụ"); // Tool Change + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Đưa Lên Z"); // Z Raise + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("Tốc Độ Tuôn Ra"); // Prime Speed + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("Tốc Độ Rút Lại"); // Retract Speed + LSTR MSG_FILAMENTCHANGE = _UxGT("Thay dây nhựa"); // change filament + LSTR MSG_FILAMENTCHANGE_E = _UxGT("Thay dây nhựa *"); // change filament + LSTR MSG_FILAMENTLOAD = _UxGT("Nạp dây nhựa"); // load filament + LSTR MSG_FILAMENTLOAD_E = _UxGT("Nạp dây nhựa *"); // load filament + LSTR MSG_FILAMENTUNLOAD = _UxGT("Dỡ dây nhựa"); // unload filament + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("Dỡ dây nhựa *"); // unload filament + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("Dỡ tất cả"); // Unload All + LSTR MSG_ATTACH_MEDIA = _UxGT("Khởi tạo phương tiện"); // Attach media + LSTR MSG_CHANGE_MEDIA = _UxGT("Thay phương tiện"); // Change midea + LSTR MSG_RELEASE_MEDIA = _UxGT("Phát hành phương tiện"); + LSTR MSG_ZPROBE_OUT = _UxGT("Đầu Dò Z qua bàn"); // Z Probe past bed + LSTR MSG_SKEW_FACTOR = _UxGT("Hệ số nghiêng"); // Skew Factor + LSTR MSG_BLTOUCH = _UxGT("BLTOUCH"); // BLTouch + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("Tự kiểm tra BLTOUCH "); // BLTouch Self-Test + LSTR MSG_BLTOUCH_RESET = _UxGT("Bặt lại BLTouch"); // Reset BLTouch + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("Đem BLTouch"); // Deploy BLTouch + LSTR MSG_BLTOUCH_STOW = _UxGT("Cất BLTouch"); // Stow BLTouch + LSTR MSG_MANUAL_DEPLOY = _UxGT("Đem Đầu Dò-Z"); // Deploy Z-Probe + LSTR MSG_MANUAL_STOW = _UxGT("Cất Đầu Dò-Z"); // Stow Z-Probe + LSTR MSG_HOME_FIRST = _UxGT("Về nhà %s%s%s Trước"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("Đầu Dò Bù Đắp Z"); // Probe Z Offset + LSTR MSG_BABYSTEP_X = _UxGT("Nhít X"); // Babystep X + LSTR MSG_BABYSTEP_Y = _UxGT("Nhít Y"); + LSTR MSG_BABYSTEP_Z = _UxGT("Nhít Z"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("Hủy bỏ công tắc"); // Endstop abort + LSTR MSG_HEATING_FAILED_LCD = _UxGT("Sưởi đầu phun không thành công"); // Heating failed + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("Điều sai: nhiệt độ dư"); // Err: REDUNDANT TEMP + LSTR MSG_THERMAL_RUNAWAY = _UxGT("Vấn đề nhiệt"); // THERMAL RUNAWAY | problem + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("Vấn đề nhiệt bàn"); // BED THERMAL RUNAWAY + LSTR MSG_ERR_MAXTEMP = _UxGT("Điều sai: nhiệt độ tối đa"); // Err: MAXTEMP + LSTR MSG_ERR_MINTEMP = _UxGT("Điều sai: nhiệt độ tối thiểu"); // Err: MINTEMP + LSTR MSG_HALTED = _UxGT("MÁY IN ĐÃ DỪNG LẠI"); // PRINTER HALTED + LSTR MSG_PLEASE_RESET = _UxGT("Xin bặt lại"); // Please reset + LSTR MSG_SHORT_DAY = _UxGT("n"); // d - ngày - One character only + LSTR MSG_SHORT_HOUR = _UxGT("g"); // h - giờ - One character only + LSTR MSG_SHORT_MINUTE = _UxGT("p"); // m - phút - One character only + LSTR MSG_HEATING = _UxGT("Đang sưởi nóng..."); // heating + LSTR MSG_COOLING = _UxGT("Đang làm nguội..."); // cooling + LSTR MSG_BED_HEATING = _UxGT("Đang sưởi nong bàn..."); // bed heating + LSTR MSG_BED_COOLING = _UxGT("Đang làm nguội bàn..."); // bed cooling + LSTR MSG_DELTA_CALIBRATE = _UxGT("Cân Chỉnh Delta"); // Delta calibration + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("Chỉnh X lại"); + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("Chỉnh Y lại"); + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("Chỉnh Z lại"); + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("Chỉnh Z Center"); // Calibrate Center + LSTR MSG_DELTA_SETTINGS = _UxGT("Cài Đặt Delta"); // Delta Settings + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("Cân Chỉnh Tự Động"); // Auto Calibration + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("Đặt Chiều Cao Delta"); // Set Delta Height + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Đầu Dò Z-Bù Đắp"); // Probe Z-offset + LSTR MSG_DELTA_DIAG_ROD = _UxGT("Gậy Chéo"); // Diag Rod + LSTR MSG_DELTA_HEIGHT = _UxGT("Chiều Cao"); // Height + LSTR MSG_DELTA_RADIUS = _UxGT("Bán Kính"); // Radius + LSTR MSG_INFO_MENU = _UxGT("Về Máy In"); + LSTR MSG_INFO_PRINTER_MENU = _UxGT("Thông Tin Máy In"); // Printer Info + LSTR MSG_3POINT_LEVELING = _UxGT("San lấp 3-Điểm"); // 3-Point Leveling + LSTR MSG_LINEAR_LEVELING = _UxGT("San Lấp Tuyến Tính"); // Linear Leveling + LSTR MSG_BILINEAR_LEVELING = _UxGT("San Lấp Song Tuyến"); // Bilinear Leveling + LSTR MSG_UBL_LEVELING = _UxGT("San Lấp Bàn Thống Nhất"); // Unified Bed Leveling + LSTR MSG_MESH_LEVELING = _UxGT("Lưới San Lấp"); // Mesh Leveling + LSTR MSG_INFO_STATS_MENU = _UxGT("Thống Kê Máy In"); // Printer Stats + LSTR MSG_INFO_BOARD_MENU = _UxGT("Thông Tin Bo Mạch"); // Board Info + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("Điện Trở Nhiệt"); // Thermistors + LSTR MSG_INFO_EXTRUDERS = _UxGT("Máy đùn"); // Extruders + LSTR MSG_INFO_BAUDRATE = _UxGT("Baud"); // Baud + LSTR MSG_INFO_PROTOCOL = _UxGT("Giao Thức"); // Protocol + LSTR MSG_CASE_LIGHT = _UxGT("Đèn Khuông"); // Case light + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("Độ Sáng"); // Light Brightness #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("Số In"); // Print Count - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Đã hoàn thành"); - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Tổng số thời gian in"); // Total print time - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Thời gian việc lâu nhất"); // Longest job time - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Tổng số đùn"); // Extruded total + LSTR MSG_INFO_PRINT_COUNT = _UxGT("Số In"); // Print Count + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Đã hoàn thành"); + LSTR MSG_INFO_PRINT_TIME = _UxGT("Tổng số thời gian in"); // Total print time + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Thời gian việc lâu nhất"); // Longest job time + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Tổng số đùn"); // Extruded total #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("In"); // prints - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("Đã hoàn thành"); // Completed - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("Tổng số"); // total - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("Dài nhất"); // Longest - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("Đã ép đùn"); + LSTR MSG_INFO_PRINT_COUNT = _UxGT("In"); // prints + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("Đã hoàn thành"); // Completed + LSTR MSG_INFO_PRINT_TIME = _UxGT("Tổng số"); // total + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("Dài nhất"); // Longest + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("Đã ép đùn"); #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("Nhiệt độ tối thiểu"); // Min Temp - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("Nhiệt độ tối đa"); // Max temp - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("Bộ nguồn"); // PSU - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("Sức mạnh ổ đĩa"); // Drive Strength - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X % trình điều khiển"); // X Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y % trình điều khiển"); // Y Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z % trình điều khiển"); // Z Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E % trình điều khiển"); // E Driver % - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("Ghi DAC EEPROM"); // DAC EEPROM Write - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("In tạm dừng"); // PRINT PAUSED - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("Nạp dây nhựa"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("Dỡ dây nhựa"); // unload filament - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("Tùy chọn hồi phục:"); // RESUME OPTIONS - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Xả thêm"); // Purge more - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Tiếp tục"); // continue - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Đầu Phun: "); // Nozzle - PROGMEM Language_Str MSG_RUNOUT_SENSOR_ENABLE = _UxGT("Cảm Biến Hết"); // Runout Sensor - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("Sự nhà không thành công"); // Homing failed - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT(" không thành công"); // Probing failed + LSTR MSG_INFO_MIN_TEMP = _UxGT("Nhiệt độ tối thiểu"); // Min Temp + LSTR MSG_INFO_MAX_TEMP = _UxGT("Nhiệt độ tối đa"); // Max temp + LSTR MSG_INFO_PSU = _UxGT("Bộ nguồn"); // PSU + LSTR MSG_DRIVE_STRENGTH = _UxGT("Sức mạnh ổ đĩa"); // Drive Strength + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" % trình điều khiển"); // X Driver % + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" % trình điều khiển"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" % trình điều khiển"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" % trình điều khiển"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" % trình điều khiển"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" % trình điều khiển"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E % trình điều khiển"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("Ghi DAC EEPROM"); // DAC EEPROM Write + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("In tạm dừng"); // PRINT PAUSED + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("Nạp dây nhựa"); + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("Dỡ dây nhựa"); // unload filament + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("Tùy chọn hồi phục:"); // RESUME OPTIONS + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("Xả thêm"); // Purge more + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("Tiếp tục"); // continue + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" Đầu Phun: "); // Nozzle + LSTR MSG_RUNOUT_SENSOR_ENABLE = _UxGT("Cảm Biến Hết"); // Runout Sensor + LSTR MSG_KILL_HOMING_FAILED = _UxGT("Sự nhà không thành công"); // Homing failed + LSTR MSG_LCD_PROBING_FAILED = _UxGT(" không thành công"); // Probing failed // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Nhấn nút", "để tiếp tục in")); // Press button to resume print - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Chờ cho sự", "thay đổi dây nhựa", "bắt đầu")); // wait for filament change to start - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Đút dây nhựa vào", "và nhấn nút", "để tiếp tục")); // insert filament and press button to continue // - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Nhấn nút", "để làm nóng đầu phun")); // Press button to heat nozzle - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Đầu phun đang nóng lên", "Xin chờ...")); // Nozzle heating Please wait - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Chờ tro", "dây nhựa ra")); // Wait for filament unload - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Chờ tro", "dây nhựa vào")); // Wait for filament load - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Chờ tro", "xả dây nhựa")); // wait for filament purge - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Nhấn nút để kết thúc", "xả dây nhựa")); // Click to finish dây nhựa purge - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Chờ tro in", "tiếp tục...")); // Wait for print to resume + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("Nhấn nút", "để tiếp tục in")); // Press button to resume print + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("Chờ cho sự", "thay đổi dây nhựa", "bắt đầu")); // wait for filament change to start + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("Đút dây nhựa vào", "và nhấn nút", "để tiếp tục")); // insert filament and press button to continue // + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("Nhấn nút", "để làm nóng đầu phun")); // Press button to heat nozzle + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("Đầu phun đang nóng lên", "Xin chờ...")); // Nozzle heating Please wait + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("Chờ tro", "dây nhựa ra")); // Wait for filament unload + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("Chờ tro", "dây nhựa vào")); // Wait for filament load + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("Chờ tro", "xả dây nhựa")); // wait for filament purge + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("Nhấn nút để kết thúc", "xả dây nhựa")); // Click to finish dây nhựa purge + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("Chờ tro in", "tiếp tục...")); // Wait for print to resume #else // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Nhấn nút để tiếp tục")); // Click to continue - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Xin chờ...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Chèn và nhấn")); // Insert and Click - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Nhấn để sưởi")); // Click to heat - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Đang sưởi nóng")); // Heating - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Đang dỡ ra...")); // Ejecting - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Đang nạp...")); // Loading - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Đang xả...")); // Purging - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Nhấn nút để kết thúc")); // Click to finish - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Đang tiếp tục...")); // Resuming + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("Nhấn nút để tiếp tục")); // Click to continue + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("Xin chờ...")); + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("Chèn và nhấn")); // Insert and Click + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("Nhấn để sưởi")); // Click to heat + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("Đang sưởi nóng")); // Heating + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("Đang dỡ ra...")); // Ejecting + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("Đang nạp...")); // Loading + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("Đang xả...")); // Purging + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("Nhấn nút để kết thúc")); // Click to finish + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("Đang tiếp tục...")); // Resuming #endif // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("Trình điều khiển TMC"); // TMC drivers - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("Dòng điện trình điều khiển"); // Driver current - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("Ngưỡng Hỗn Hợp"); // Hybrid threshold - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("Vô cảm biến"); // Sensorless homing - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("Chế độ từng bước"); // Stepping mode - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("CắtTàngHình được kích hoạt"); // StealthChop enabled + LSTR MSG_TMC_DRIVERS = _UxGT("Trình điều khiển TMC"); // TMC drivers + LSTR MSG_TMC_CURRENT = _UxGT("Dòng điện trình điều khiển"); // Driver current + LSTR MSG_TMC_HYBRID_THRS = _UxGT("Ngưỡng Hỗn Hợp"); // Hybrid threshold + LSTR MSG_TMC_HOMING_THRS = _UxGT("Vô cảm biến"); // Sensorless homing + LSTR MSG_TMC_STEPPING_MODE = _UxGT("Chế độ từng bước"); // Stepping mode + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("CắtTàngHình được kích hoạt"); // StealthChop enabled } diff --git a/Marlin/src/lcd/language/language_zh_CN.h b/Marlin/src/lcd/language/language_zh_CN.h index 5e7c5e7cb5e0..60ffb273372d 100644 --- a/Marlin/src/lcd/language/language_zh_CN.h +++ b/Marlin/src/lcd/language/language_zh_CN.h @@ -30,588 +30,601 @@ namespace Language_zh_CN { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 3; - PROGMEM Language_Str LANGUAGE = _UxGT("简体中文"); + constexpr uint8_t CHARSIZE = 3; + LSTR LANGUAGE = _UxGT("Simplified Chinese"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT("已就绪."); //" ready." - PROGMEM Language_Str MSG_MARLIN = _UxGT("马林"); - PROGMEM Language_Str MSG_YES = _UxGT("是"); - PROGMEM Language_Str MSG_NO = _UxGT("否"); - PROGMEM Language_Str MSG_BACK = _UxGT("返回"); // ”Back“ - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("放弃中..."); - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("存储卡已插入"); //"Card inserted" - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("存储卡被拔出"); //"Card removed" - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("等待存储器"); - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("存储器读取错误"); - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB设备已弹出"); - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB启动错误"); - PROGMEM Language_Str MSG_KILL_SUBCALL_OVERFLOW = _UxGT("子响应溢出"); - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("挡块"); //"Endstops" // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("软挡块"); - PROGMEM Language_Str MSG_MAIN = _UxGT("主菜单"); //"Main" - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("高级设置"); - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("配置"); - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("自动开始"); //"Autostart" - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("关闭步进电机"); //"Disable steppers" - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("调试菜单"); // "Debug Menu" - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("进度条测试"); // "Progress Bar Test" - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("自动回原点"); //"Auto home" - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("回X原位"); //"Home X" - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("回Y原位"); //"Home Y" - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("回Z原位"); //"Home Z" - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("自动Z对齐"); - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("平台调平XYZ归原位"); //"Homing XYZ" - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("单击开始热床调平"); //"Click to Begin" - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("下个热床调平点"); //"Next Point" - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("完成热床调平"); //"Leveling Done!" - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("淡出高度"); // "Fade Height" - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("设置原点偏移"); //"Set home offsets" - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("偏移已启用"); //"Offsets applied" - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("设置原点"); //"Set origin" + LSTR WELCOME_MSG = MACHINE_NAME _UxGT("已就绪."); // " ready." + LSTR MSG_MARLIN = _UxGT("马林"); + LSTR MSG_YES = _UxGT("是"); + LSTR MSG_NO = _UxGT("否"); + LSTR MSG_BACK = _UxGT("返回"); // ”Back“ + LSTR MSG_MEDIA_ABORTING = _UxGT("放弃中..."); + LSTR MSG_MEDIA_INSERTED = _UxGT("存储卡已插入"); // "Card inserted" + LSTR MSG_MEDIA_REMOVED = _UxGT("存储卡被拔出"); // "Card removed" + LSTR MSG_MEDIA_WAITING = _UxGT("等待存储器"); + LSTR MSG_MEDIA_READ_ERROR = _UxGT("存储器读取错误"); + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB设备已弹出"); + LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB启动错误"); + LSTR MSG_KILL_SUBCALL_OVERFLOW = _UxGT("子响应溢出"); + LSTR MSG_LCD_ENDSTOPS = _UxGT("挡块"); // "Endstops" // Max length 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("软挡块"); + LSTR MSG_MAIN = _UxGT("主菜单"); // "Main" + LSTR MSG_ADVANCED_SETTINGS = _UxGT("高级设置"); + LSTR MSG_CONFIGURATION = _UxGT("配置"); + LSTR MSG_RUN_AUTO_FILES = _UxGT("自动开始"); // "Autostart" + LSTR MSG_DISABLE_STEPPERS = _UxGT("关闭步进电机"); // "Disable steppers" + LSTR MSG_DEBUG_MENU = _UxGT("调试菜单"); // "Debug Menu" + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("进度条测试"); // "Progress Bar Test" + LSTR MSG_AUTO_HOME = _UxGT("自动回原点"); // "Auto home" + LSTR MSG_AUTO_HOME_X = _UxGT("回X原位"); // "Home X" + LSTR MSG_AUTO_HOME_Y = _UxGT("回Y原位"); // "Home Y" + LSTR MSG_AUTO_HOME_Z = _UxGT("回Z原位"); // "Home Z" + LSTR MSG_AUTO_Z_ALIGN = _UxGT("自动Z对齐"); + LSTR MSG_LEVEL_BED_HOMING = _UxGT("平台调平XYZ归原位"); // "Homing XYZ" + LSTR MSG_LEVEL_BED_WAITING = _UxGT("单击开始热床调平"); // "Click to Begin" + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("下个热床调平点"); // "Next Point" + LSTR MSG_LEVEL_BED_DONE = _UxGT("完成热床调平"); // "Leveling Done!" + LSTR MSG_Z_FADE_HEIGHT = _UxGT("淡出高度"); // "Fade Height" + LSTR MSG_SET_HOME_OFFSETS = _UxGT("设置原点偏移"); // "Set home offsets" + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("偏移已启用"); // "Offsets applied" + LSTR MSG_SET_ORIGIN = _UxGT("设置原点"); // "Set origin" #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("预热 ") PREHEAT_1_LABEL; //"Preheat PREHEAT_2_LABEL" - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("预热 ") PREHEAT_1_LABEL " ~"; //"Preheat PREHEAT_2_LABEL" - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 喷嘴"); //MSG_PREHEAT_1 " " - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 喷嘴 ~"); //MSG_PREHEAT_1 " " - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 全部"); //MSG_PREHEAT_1 " All" - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 热床"); //MSG_PREHEAT_1 " Bed" - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 设置"); //MSG_PREHEAT_1 " conf" + LSTR MSG_PREHEAT_1 = _UxGT("预热 ") PREHEAT_1_LABEL; // "Preheat PREHEAT_2_LABEL" + LSTR MSG_PREHEAT_1_H = _UxGT("预热 ") PREHEAT_1_LABEL " ~"; // "Preheat PREHEAT_2_LABEL" + LSTR MSG_PREHEAT_1_END = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 喷嘴"); //MSG_PREHEAT_1 " " + LSTR MSG_PREHEAT_1_END_E = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 喷嘴 ~"); //MSG_PREHEAT_1 " " + LSTR MSG_PREHEAT_1_ALL = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 全部"); //MSG_PREHEAT_1 " All" + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 热床"); //MSG_PREHEAT_1 " Bed" + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("预热 ") PREHEAT_1_LABEL _UxGT(" 设置"); //MSG_PREHEAT_1 " conf" - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("预热 $"); //"Preheat PREHEAT_2_LABEL" - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("预热 $ ~"); //"Preheat PREHEAT_2_LABEL" - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("预热 $ 喷嘴"); //MSG_PREHEAT_1 " " - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("预热 $ 喷嘴 ~"); //MSG_PREHEAT_1 " " - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("预热 $ 全部"); //MSG_PREHEAT_1 " All" - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("预热 $ 热床"); //MSG_PREHEAT_1 " Bed" - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("预热 $ 设置"); //MSG_PREHEAT_1 " conf" + LSTR MSG_PREHEAT_M = _UxGT("预热 $"); // "Preheat PREHEAT_2_LABEL" + LSTR MSG_PREHEAT_M_H = _UxGT("预热 $ ~"); // "Preheat PREHEAT_2_LABEL" + LSTR MSG_PREHEAT_M_END = _UxGT("预热 $ 喷嘴"); //MSG_PREHEAT_1 " " + LSTR MSG_PREHEAT_M_END_E = _UxGT("预热 $ 喷嘴 ~"); //MSG_PREHEAT_1 " " + LSTR MSG_PREHEAT_M_ALL = _UxGT("预热 $ 全部"); //MSG_PREHEAT_1 " All" + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("预热 $ 热床"); //MSG_PREHEAT_1 " Bed" + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("预热 $ 设置"); //MSG_PREHEAT_1 " conf" #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("预热自定义"); - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("降温"); //"Cooldown" - PROGMEM Language_Str MSG_CUTTER_FREQUENCY = _UxGT("切割频率"); - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("激光控制"); - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("激光电源"); - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("主轴控制"); - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("主轴电源"); - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("主轴反转"); - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("电源打开"); //"Switch power on" - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("电源关闭"); //"Switch power off" - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("挤出"); //"Extrude" - PROGMEM Language_Str MSG_RETRACT = _UxGT("回抽"); //"Retract" - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("移动轴"); //"Move axis" - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("调平热床"); //"Bed leveling" - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("调平热床"); //"Level bed" - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("调平边角"); // "Level corners" - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("下个边角"); // "Next corner" - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("网格编辑器"); - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("编辑网格"); // "Edit Mesh" - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("网格编辑已停止"); // "Mesh Editing Stopped" - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("探测点"); - PROGMEM Language_Str MSG_MESH_X = _UxGT("索引X"); - PROGMEM Language_Str MSG_MESH_Y = _UxGT("索引Y"); - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z 值"); - PROGMEM Language_Str MSG_USER_MENU = _UxGT("定制命令"); // "Custom Commands" - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48探测"); - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48点"); - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("M48偏差"); - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX模式"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("工具偏移量"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("自动停靠"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("复制"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("镜像复制"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("完全控制"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("第二喷头是X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("第二喷头是Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("第二喷头是Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("执行G29"); // "Doing G29" - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL工具"); // "UBL Tools" - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("统一热床调平(UBL)"); // "Unified Bed Leveling" - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("倾斜點"); - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("手工创设网格"); // "Manually Build Mesh" - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("放置垫片并测量"); // "Place shim & measure" - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("测量"); // "Measure" - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("移除并测量热床"); // "Remove & measure bed" - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("移动到下一个"); // "Moving to next" - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("激活UBL"); // "Activate UBL" - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("关闭UBL"); // "Deactivate UBL" - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("热床温度"); // "Bed Temp" - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("热床温度"); - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("热端温度"); // "Hotend Temp" - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("热端温度"); - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("网格编辑"); // "Mesh Edit" - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("编辑客户网格"); // "Edit Custom Mesh" - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("细调网格"); // "Fine Tuning Mesh" - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("完成编辑网格"); // "Done Editing Mesh" - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("创设客户网格"); // "Build Custom Mesh" - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("创设网格"); // "Build Mesh" + LSTR MSG_PREHEAT_CUSTOM = _UxGT("预热自定义"); + LSTR MSG_COOLDOWN = _UxGT("降温"); // "Cooldown" + LSTR MSG_CUTTER_FREQUENCY = _UxGT("切割频率"); + LSTR MSG_LASER_MENU = _UxGT("激光控制"); + LSTR MSG_LASER_POWER = _UxGT("激光电源"); + LSTR MSG_SPINDLE_MENU = _UxGT("主轴控制"); + LSTR MSG_SPINDLE_POWER = _UxGT("主轴电源"); + LSTR MSG_SPINDLE_REVERSE = _UxGT("主轴反转"); + LSTR MSG_SWITCH_PS_ON = _UxGT("电源打开"); // "Switch power on" + LSTR MSG_SWITCH_PS_OFF = _UxGT("电源关闭"); // "Switch power off" + LSTR MSG_EXTRUDE = _UxGT("挤出"); // "Extrude" + LSTR MSG_RETRACT = _UxGT("回抽"); // "Retract" + LSTR MSG_MOVE_AXIS = _UxGT("移动轴"); // "Move axis" + LSTR MSG_BED_LEVELING = _UxGT("调平热床"); // "Bed leveling" + LSTR MSG_LEVEL_BED = _UxGT("调平热床"); // "Level bed" + LSTR MSG_BED_TRAMMING = _UxGT("调平边角"); // "Bed Tramming" + LSTR MSG_NEXT_CORNER = _UxGT("下个边角"); // "Next corner" + LSTR MSG_MESH_EDITOR = _UxGT("网格编辑器"); + LSTR MSG_EDIT_MESH = _UxGT("编辑网格"); // "Edit Mesh" + LSTR MSG_EDITING_STOPPED = _UxGT("网格编辑已停止"); // "Mesh Editing Stopped" + LSTR MSG_PROBING_POINT = _UxGT("探测点"); + LSTR MSG_MESH_X = _UxGT("索引X"); + LSTR MSG_MESH_Y = _UxGT("索引Y"); + LSTR MSG_MESH_EDIT_Z = _UxGT("Z 值"); + LSTR MSG_CUSTOM_COMMANDS = _UxGT("定制命令"); // "Custom Commands" + LSTR MSG_M48_TEST = _UxGT("M48探测"); + LSTR MSG_M48_POINT = _UxGT("M48点"); + LSTR MSG_M48_DEVIATION = _UxGT("M48偏差"); + LSTR MSG_IDEX_MENU = _UxGT("IDEX模式"); + LSTR MSG_OFFSETS_MENU = _UxGT("工具偏移量"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("自动停靠"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("复制"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("镜像复制"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("完全控制"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("第二喷头是X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("第二喷头是Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("第二喷头是Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("执行G29"); // "Doing G29" + LSTR MSG_UBL_TOOLS = _UxGT("UBL工具"); // "UBL Tools" + LSTR MSG_UBL_LEVEL_BED = _UxGT("统一热床调平(UBL)"); // "Unified Bed Leveling" + LSTR MSG_LCD_TILTING_MESH = _UxGT("倾斜點"); + LSTR MSG_UBL_MANUAL_MESH = _UxGT("手工创设网格"); // "Manually Build Mesh" + LSTR MSG_UBL_BC_INSERT = _UxGT("放置垫片并测量"); // "Place shim & measure" + LSTR MSG_UBL_BC_INSERT2 = _UxGT("测量"); // "Measure" + LSTR MSG_UBL_BC_REMOVE = _UxGT("移除并测量热床"); // "Remove & measure bed" + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("移动到下一个"); // "Moving to next" + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("激活UBL"); // "Activate UBL" + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("关闭UBL"); // "Deactivate UBL" + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("热床温度"); // "Bed Temp" + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("热床温度"); + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("热端温度"); // "Hotend Temp" + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("热端温度"); + LSTR MSG_UBL_MESH_EDIT = _UxGT("网格编辑"); // "Mesh Edit" + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("编辑客户网格"); // "Edit Custom Mesh" + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("细调网格"); // "Fine Tuning Mesh" + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("完成编辑网格"); // "Done Editing Mesh" + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("创设客户网格"); // "Build Custom Mesh" + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("创设网格"); // "Build Mesh" #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("创设 $ 网格"); // "Build PREHEAT_1_LABEL Mesh" - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("批准 $ 网格"); // "Validate PREHEAT_1_LABEL Mesh" + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("创设 $ 网格"); // "Build PREHEAT_1_LABEL Mesh" + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("批准 $ 网格"); // "Validate PREHEAT_1_LABEL Mesh" #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("创设冷网格"); // "Build Cold Mesh" - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("调整网格高度"); // "Adjust Mesh Height" - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("高度合计"); // "Height Amount" - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("批准网格"); // "Validate Mesh" - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("批准客户网格"); // "Validate Custom Mesh" - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26加热热床"); - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26加热喷嘴"); - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("手动填装中..."); - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("固定距离填装"); - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("填装完成"); - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26已取消"); - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("离开G26"); - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("继续热床网格"); // "Continue Bed Mesh" - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("网格调平"); // "Mesh Leveling" - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("三点调平"); // "3-Point Leveling" - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("格子网格调平"); // "Grid Mesh Leveling" - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("调平网格"); // "Level Mesh" - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("边点"); // "Side Points" - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("图类型"); // "Map Type" - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("输出网格图"); // "Output Mesh Map" - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("输出到主机"); // "Output for Host" - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("输出到CSV"); // "Output for CSV" - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("输出到备份"); // "Off Printer Backup" - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("输出UBL信息"); // "Output UBL Info" - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("填充合计"); // "Fill-in Amount" - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("手工填充"); // "Manual Fill-in" - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("聪明填充"); // "Smart Fill-in" - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("填充网格"); // "Fill-in Mesh" - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("作废所有的"); // "Invalidate All" - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("作废最近的"); // "Invalidate Closest" - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("细调所有的"); // "Fine Tune All" - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("细调最近的"); // "Fine Tune Closest" - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("网格存储"); // "Mesh Storage" - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("存储槽"); // "Memory Slot" - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("装载热床网格"); // "Load Bed Mesh" - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("保存热床网格"); // "Save Bed Mesh" - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("网格 %i 已装载"); // "Mesh %i loaded" - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("网格 %i 已保存"); // "Mesh %i saved" - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("没有存储"); // "No storage" - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("错误: UBL保存"); // "Err: UBL Save" - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("错误: UBL还原"); // "Err: UBL Restore" - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z偏移量: "); - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z偏移已停止"); // "Z-Offset Stopped" - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("一步步UBL"); // "Step-By-Step UBL" - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. 创设冷网格"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. 聪明填充"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. 批准网格"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. 细调所有的"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. 批准网格"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. 细调所有的"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存热床网格"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("创设冷网格"); // "Build Cold Mesh" + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("调整网格高度"); // "Adjust Mesh Height" + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("高度合计"); // "Height Amount" + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("批准网格"); // "Validate Mesh" + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("批准客户网格"); // "Validate Custom Mesh" + LSTR MSG_G26_HEATING_BED = _UxGT("G26加热热床"); + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26加热喷嘴"); + LSTR MSG_G26_MANUAL_PRIME = _UxGT("手动填装中..."); + LSTR MSG_G26_FIXED_LENGTH = _UxGT("固定距离填装"); + LSTR MSG_G26_PRIME_DONE = _UxGT("填装完成"); + LSTR MSG_G26_CANCELED = _UxGT("G26已取消"); + LSTR MSG_G26_LEAVING = _UxGT("离开G26"); + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("继续热床网格"); // "Continue Bed Mesh" + LSTR MSG_UBL_MESH_LEVELING = _UxGT("网格调平"); // "Mesh Leveling" + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("三点调平"); // "3-Point Leveling" + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("格子网格调平"); // "Grid Mesh Leveling" + LSTR MSG_UBL_MESH_LEVEL = _UxGT("调平网格"); // "Level Mesh" + LSTR MSG_UBL_SIDE_POINTS = _UxGT("边点"); // "Side Points" + LSTR MSG_UBL_MAP_TYPE = _UxGT("图类型"); // "Map Type" + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("输出网格图"); // "Output Mesh Map" + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("输出到主机"); // "Output for Host" + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("输出到CSV"); // "Output for CSV" + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("输出到备份"); // "Off Printer Backup" + LSTR MSG_UBL_INFO_UBL = _UxGT("输出UBL信息"); // "Output UBL Info" + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("填充合计"); // "Fill-in Amount" + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("手工填充"); // "Manual Fill-in" + LSTR MSG_UBL_SMART_FILLIN = _UxGT("聪明填充"); // "Smart Fill-in" + LSTR MSG_UBL_FILLIN_MESH = _UxGT("填充网格"); // "Fill-in Mesh" + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("作废所有的"); // "Invalidate All" + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("作废最近的"); // "Invalidate Closest" + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("细调所有的"); // "Fine Tune All" + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("细调最近的"); // "Fine Tune Closest" + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("网格存储"); // "Mesh Storage" + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("存储槽"); // "Memory Slot" + LSTR MSG_UBL_LOAD_MESH = _UxGT("装载热床网格"); // "Load Bed Mesh" + LSTR MSG_UBL_SAVE_MESH = _UxGT("保存热床网格"); // "Save Bed Mesh" + LSTR MSG_MESH_LOADED = _UxGT("网格 %i 已装载"); // "Mesh %i loaded" + LSTR MSG_MESH_SAVED = _UxGT("网格 %i 已保存"); // "Mesh %i saved" + LSTR MSG_UBL_NO_STORAGE = _UxGT("没有存储"); // "No storage" + LSTR MSG_UBL_SAVE_ERROR = _UxGT("错误: UBL保存"); // "Err: UBL Save" + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("错误: UBL还原"); // "Err: UBL Restore" + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z偏移量: "); + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z偏移已停止"); // "Z-Offset Stopped" + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("一步步UBL"); // "Step-By-Step UBL" + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. 创设冷网格"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2. 聪明填充"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. 批准网格"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. 细调所有的"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. 批准网格"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. 细调所有的"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存热床网格"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("LED控制"); // "LED Control") - PROGMEM Language_Str MSG_LEDS = _UxGT("灯"); // "Lights") - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("灯预置"); // "Light Presets") - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("红"); // "Red") - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange") - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("黄"); // "Yellow") - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("绿"); // "Green") - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("蓝"); // "Blue") - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("青"); // "Indigo") - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("紫"); // "Violet") - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("白"); // "White") - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("缺省"); // "Default") - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("定制灯"); // "Custom Lights") - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("红饱和度"); // "Red Intensity") - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("绿饱和度"); // "Green Intensity") - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("蓝饱和度"); // "Blue Intensity") - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("白饱和度"); // "White Intensity") - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("亮度"); // "Brightness") + LSTR MSG_LED_CONTROL = _UxGT("LED控制"); // "LED Control") + LSTR MSG_LEDS = _UxGT("灯"); // "Lights") + LSTR MSG_LED_PRESETS = _UxGT("灯预置"); // "Light Presets") + LSTR MSG_SET_LEDS_RED = _UxGT("红"); // "Red") + LSTR MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange") + LSTR MSG_SET_LEDS_YELLOW = _UxGT("黄"); // "Yellow") + LSTR MSG_SET_LEDS_GREEN = _UxGT("绿"); // "Green") + LSTR MSG_SET_LEDS_BLUE = _UxGT("蓝"); // "Blue") + LSTR MSG_SET_LEDS_INDIGO = _UxGT("青"); // "Indigo") + LSTR MSG_SET_LEDS_VIOLET = _UxGT("紫"); // "Violet") + LSTR MSG_SET_LEDS_WHITE = _UxGT("白"); // "White") + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("缺省"); // "Default") + LSTR MSG_CUSTOM_LEDS = _UxGT("定制灯"); // "Custom Lights") + LSTR MSG_INTENSITY_R = _UxGT("红饱和度"); // "Red Intensity") + LSTR MSG_INTENSITY_G = _UxGT("绿饱和度"); // "Green Intensity") + LSTR MSG_INTENSITY_B = _UxGT("蓝饱和度"); // "Blue Intensity") + LSTR MSG_INTENSITY_W = _UxGT("白饱和度"); // "White Intensity") + LSTR MSG_LED_BRIGHTNESS = _UxGT("亮度"); // "Brightness") - PROGMEM Language_Str MSG_MOVING = _UxGT("移动..."); // "Moving...") - PROGMEM Language_Str MSG_FREE_XY = _UxGT("释放 XY"); // "Free XY") - PROGMEM Language_Str MSG_MOVE_X = _UxGT("移动X"); //"Move X" - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("移动Y"); //"Move Y" - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("移动Z"); //"Move Z" - PROGMEM Language_Str MSG_MOVE_E = _UxGT("挤出机"); //"Extruder" - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("挤出机 *"); //"Extruder" - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("热端太冷"); - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("移动 %s mm"); //"Move 0.025mm" - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("移动 0.1 mm"); //"Move 0.1mm" - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("移动 1 mm"); //"Move 1mm" - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("移动 10 mm"); //"Move 10mm" - PROGMEM Language_Str MSG_SPEED = _UxGT("速率"); //"Speed" - PROGMEM Language_Str MSG_BED_Z = _UxGT("热床Z"); //"Bed Z" - PROGMEM Language_Str MSG_NOZZLE = _UxGT("喷嘴"); //"Nozzle" 噴嘴 - PROGMEM Language_Str MSG_NOZZLE_N = _UxGT("喷嘴 ~"); //"Nozzle" 噴嘴 - PROGMEM Language_Str MSG_NOZZLE_PARKED = _UxGT("喷嘴已停靠"); - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("喷嘴待命中"); - PROGMEM Language_Str MSG_BED = _UxGT("热床"); //"Bed" - PROGMEM Language_Str MSG_CHAMBER = _UxGT("机箱壳"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("风扇速率"); //"Fan speed" - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("风扇速率 ~"); //"Fan speed" - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("存储的风扇 ~"); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("额外风扇速率"); // "Extra fan speed" - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("额外风扇速率 ~"); // "Extra fan speed" - PROGMEM Language_Str MSG_CONTROLLER_FAN = _UxGT("控制器风扇"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("空闲速度"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("自动模式"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_SPEED = _UxGT("工作速度"); - PROGMEM Language_Str MSG_CONTROLLER_FAN_DURATION = _UxGT("空闲周期"); - PROGMEM Language_Str MSG_FLOW = _UxGT("挤出速率"); //"Flow" - PROGMEM Language_Str MSG_FLOW_N = _UxGT("挤出速率 ~"); //"Flow" - PROGMEM Language_Str MSG_CONTROL = _UxGT("控制"); //"Control" - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" 最小"); //" " LCD_STR_THERMOMETER " Min" - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" 最大"); //" " LCD_STR_THERMOMETER " Max" - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" 因数"); //" " LCD_STR_THERMOMETER " Fact" - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("自动控温"); //"Autotemp" - PROGMEM Language_Str MSG_LCD_ON = _UxGT("开"); //"On" - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("关"); //"Off" - PROGMEM Language_Str MSG_PID_AUTOTUNE = _UxGT("自动PID"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_E = _UxGT("自动PID *"); - PROGMEM Language_Str MSG_PID_AUTOTUNE_DONE = _UxGT("PID调整完成"); - PROGMEM Language_Str MSG_PID_BAD_EXTRUDER_NUM = _UxGT("自动调失败. 坏的挤出机"); - PROGMEM Language_Str MSG_PID_TEMP_TOO_HIGH = _UxGT("自动调失败. 温度太高"); - PROGMEM Language_Str MSG_PID_TIMEOUT = _UxGT("自动调失败! 超时"); - PROGMEM Language_Str MSG_SELECT = _UxGT("选择"); //"Select" - PROGMEM Language_Str MSG_SELECT_E = _UxGT("选择 *"); - PROGMEM Language_Str MSG_ACC = _UxGT("加速度"); //"Accel" acceleration - PROGMEM Language_Str MSG_JERK = _UxGT("抖动速率"); // "Jerk" - PROGMEM Language_Str MSG_VA_JERK = _UxGT("轴抖动速率") LCD_STR_A; //"Va-jerk" - PROGMEM Language_Str MSG_VB_JERK = _UxGT("轴抖动速率") LCD_STR_B; //"Vb-jerk" - PROGMEM Language_Str MSG_VC_JERK = _UxGT("轴抖动速率") LCD_STR_C; //"Vc-jerk" - PROGMEM Language_Str MSG_VE_JERK = _UxGT("挤出机抖动速率"); //"Ve-jerk" - PROGMEM Language_Str MSG_JUNCTION_DEVIATION = _UxGT("接点差"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("速度"); // "Velocity" - PROGMEM Language_Str MSG_VMAX_A = _UxGT("最大进料速率") LCD_STR_A; //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMAX_B = _UxGT("最大进料速率") LCD_STR_B; //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMAX_C = _UxGT("最大进料速率") LCD_STR_C; //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMAX_E = _UxGT("最大进料速率") LCD_STR_E; //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("最大进料速率 *"); //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMIN = _UxGT("最小进料速率"); //"Vmin" min_feedrate_mm_s - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("最小移动速率"); //"VTrav min" min_travel_feedrate_mm_s, (target) speed of the move - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("加速度"); // "Acceleration" - PROGMEM Language_Str MSG_AMAX_A = _UxGT("最大打印加速度") LCD_STR_A; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_AMAX_B = _UxGT("最大打印加速度") LCD_STR_B; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_AMAX_C = _UxGT("最大打印加速度") LCD_STR_C; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_AMAX_E = _UxGT("最大打印加速度") LCD_STR_E; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("最大打印加速度 *"); //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("收进加速度"); //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("非打印移动加速度"); //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - PROGMEM Language_Str MSG_XY_FREQUENCY_LIMIT = _UxGT("频率最大"); - PROGMEM Language_Str MSG_XY_FREQUENCY_FEEDRATE = _UxGT("进给速度"); - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("轴步数/mm"); //"Steps/mm" axis_steps_per_mm, axis steps-per-unit G92 - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("步数/mm"); //"Asteps/mm" - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("步数/mm"); //"Bsteps/mm" - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("步数/mm"); //"Csteps/mm" - PROGMEM Language_Str MSG_E_STEPS = _UxGT("E 步数/mm"); //"Esteps/mm" - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("* 步数/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("温度"); //"Temperature" - PROGMEM Language_Str MSG_MOTION = _UxGT("运动"); //"Motion" - PROGMEM Language_Str MSG_FILAMENT = _UxGT("料丝"); //"Filament" menu_advanced_filament - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("E 在 mm") SUPERSCRIPT_THREE; //"E in mm3" volumetric_enabled - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT = _UxGT("E 限制 在 mm") SUPERSCRIPT_THREE; - PROGMEM Language_Str MSG_VOLUMETRIC_LIMIT_E = _UxGT("E 限制 *"); - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("丝料直径"); //"Fil. Dia." - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("丝料直径 *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("卸载 mm"); // "Unload mm" - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("装载 mm"); // "Load mm" - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Advance K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Advance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD对比度"); //"LCD contrast" - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("保存设置"); //"Store memory" - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("装载设置"); //"Load memory" - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("恢复安全值"); //"Restore Defaults" - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("初始化设置"); // "Initialize EEPROM" - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC 错误"); - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index 错误"); - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version 错误"); - PROGMEM Language_Str MSG_SETTINGS_STORED = _UxGT("设置已保存"); - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("存储器更新"); - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("复位打印机"); - PROGMEM Language_Str MSG_REFRESH = LCD_STR_REFRESH _UxGT("刷新"); - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("信息屏"); //"Info screen" - PROGMEM Language_Str MSG_PREPARE = _UxGT("准备"); //"Prepare" - PROGMEM Language_Str MSG_TUNE = _UxGT("调整"); //"Tune" - PROGMEM Language_Str MSG_POWER_MONITOR = _UxGT("电源监控"); - PROGMEM Language_Str MSG_CURRENT = _UxGT("电流"); - PROGMEM Language_Str MSG_VOLTAGE = _UxGT("电压"); - PROGMEM Language_Str MSG_POWER = _UxGT("功率"); - PROGMEM Language_Str MSG_START_PRINT = _UxGT("开始打印"); - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("下一个"); - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("初始"); - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("停止"); - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("打印"); - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("复位"); - PROGMEM Language_Str MSG_BUTTON_IGNORE = _UxGT("忽略"); - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("取消"); - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("完成"); - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("返回"); - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("继续"); - PROGMEM Language_Str MSG_PAUSING = _UxGT("暂停中..."); - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("暂停打印"); //"Pause print" - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("恢复打印"); //"Resume print" - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("停止打印"); //"Stop print" - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("打印物体"); - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("取消物体"); - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("取消物体 ="); - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("中断恢复"); - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("从存储卡上打印"); //"Print from SD" - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("无存储卡"); //"No SD card" - PROGMEM Language_Str MSG_DWELL = _UxGT("休眠中 ..."); //"Sleep..." - PROGMEM Language_Str MSG_USERWAIT = _UxGT("点击继续 ..."); //"Click to resume..." - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("暫停打印"); // "Print paused" - PROGMEM Language_Str MSG_PRINTING = _UxGT("打印中..."); - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("已取消打印"); //"Print aborted" - PROGMEM Language_Str MSG_PRINT_DONE = _UxGT("打印已完成"); - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("无移动"); //"No move." - PROGMEM Language_Str MSG_KILLED = _UxGT("已杀掉"); //"KILLED. " - PROGMEM Language_Str MSG_STOPPED = _UxGT("已停止"); //"STOPPED. " - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("回抽长度mm"); //"Retract mm" retract_length, retract length (positive mm) - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("换手回抽长度mm"); //"Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("回抽速率mm/s"); //"Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); //"Hop mm" retract_zraise, retract Z-lift - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("回抽恢复长度mm"); //"UnRet +mm" retract_recover_extra, additional recover length (mm, added to retract length when recovering) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("换手回抽恢复长度mm"); //"S UnRet+mm" swap_retract_recover_extra, additional swap recover length (mm, added to retract length when recovering from extruder change) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("回抽恢复后进料速率mm/s"); //"Unretract V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); // "S UnRet V" - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("自动抽回"); //"Auto-Retract" autoretract_enabled, - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("交换长度"); - PROGMEM Language_Str MSG_FILAMENT_SWAP_EXTRA = _UxGT("额外的交换"); - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("清洗长度"); - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("换工具"); - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z抬起"); - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("进给速度"); - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("回抽速度"); - PROGMEM Language_Str MSG_FILAMENT_PARK_ENABLED = _UxGT("停靠头"); - PROGMEM Language_Str MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("恢复速度"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("风扇速度"); - PROGMEM Language_Str MSG_SINGLENOZZLE_FAN_TIME = _UxGT("风扇时间"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_ON = _UxGT("自动开"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_OFF = _UxGT("自动关"); - PROGMEM Language_Str MSG_TOOL_MIGRATION = _UxGT("工具迁移"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_AUTO = _UxGT("自动迁移"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_END = _UxGT("上一个挤出机"); - PROGMEM Language_Str MSG_TOOL_MIGRATION_SWAP = _UxGT("迁移至 *"); - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("更换丝料"); //"Change filament" - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("更换丝料 *"); //"Change filament" - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("装载丝料"); // "Load filament" - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("装载丝料 *"); // "Load filament" - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("卸载丝料"); // "Unload filament" - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("卸载丝料 *"); // "Unload filament" - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("卸载全部"); // "Unload All" - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("初始化存储卡"); //"Init. SD card" - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("更换存储卡"); //"Change SD card" - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("释放存储卡"); - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z探针在热床之外"); //"Z probe out. bed" Z probe is not within the physical limits - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("偏斜因数"); // "Skew Factor" - PROGMEM Language_Str MSG_BLTOUCH = _UxGT("BLTouch"); // "BLTouch" - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("自检"); - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("重置"); - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("装载"); - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("部署"); - PROGMEM Language_Str MSG_BLTOUCH_SW_MODE = _UxGT("SW模式"); - PROGMEM Language_Str MSG_BLTOUCH_5V_MODE = _UxGT("5V模式"); - PROGMEM Language_Str MSG_BLTOUCH_OD_MODE = _UxGT("OD模式"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE = _UxGT("模式保存"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_5V = _UxGT("设置BLTouch为5V"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_STORE_OD = _UxGT("设置BLTouch为OD"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_ECHO = _UxGT("报告开漏"); - PROGMEM Language_Str MSG_BLTOUCH_MODE_CHANGE = _UxGT("危险: 错误的设置将引起损坏! 是否继续?"); - PROGMEM Language_Str MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_INIT = _UxGT("初始化TouchMI"); - PROGMEM Language_Str MSG_TOUCHMI_ZTEST = _UxGT("Z偏移量测试"); - PROGMEM Language_Str MSG_TOUCHMI_SAVE = _UxGT("保存"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("部署TouchMI"); - PROGMEM Language_Str MSG_MANUAL_DEPLOY = _UxGT("部署Z探针"); - PROGMEM Language_Str MSG_MANUAL_STOW = _UxGT("收好Z探针"); - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("归位 %s%s%s 先"); //"Home ... first" - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("探针偏移量"); - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("探针X偏移"); - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("探针Y偏移"); - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("探针Z偏移"); //"Z Offset" - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("微量调整X轴"); //"Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("微量调整Y轴"); //"Babystep Y" - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("微量调整Z轴"); //"Babystep Z" - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("总计"); - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("挡块终止"); //"Endstop abort" - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("加热失败"); //"Heating failed" - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("错误:冗余温度"); //"Err: REDUNDANT TEMP" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("温控失控"); //"THERMAL RUNAWAY" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("热床热量失控"); - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("机箱热量失控"); - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("错误:最高温度"); //"Err: MAXTEMP" - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("错误:最低温度"); //"Err: MINTEMP" - PROGMEM Language_Str MSG_HALTED = _UxGT("打印停机"); //"PRINTER HALTED" - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("请重置"); //"Please reset" - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("天"); //"d" // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("时"); //"h" // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("分"); //"m" // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("加热中 ..."); //"Heating..." - PROGMEM Language_Str MSG_COOLING = _UxGT("冷却中 ..."); - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("加热热床中 ..."); //"Bed Heating..." - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("热床冷却中 ..."); - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("机箱加热中 ..."); - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("机箱冷却中 ..."); - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("⊿校准"); //"Delta Calibration" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("⊿校准X"); //"Calibrate X" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("⊿校准Y"); //"Calibrate Y" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("⊿校准Z"); //"Calibrate Z" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("⊿校准中心"); //"Calibrate Center" - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("⊿设置"); // "Delta Settings" - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("⊿自动校准"); // "Auto Calibration" - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("设置⊿高度"); // "Set Delta Height" - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("探针Z偏移量"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("⊿斜柱"); // "Diag Rod" - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("⊿高度"); // "Height" - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("⊿半径"); // "Radius" - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("关于打印机"); //"About Printer" - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("打印机信息"); //"Printer Info" - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("三点调平"); // "3-Point Leveling" - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("线性调平"); // "Linear Leveling" - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT("双线性调平"); // "Bilinear Leveling" - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("统一热床调平(UBL)"); // "Unified Bed Leveling" - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("网格调平"); // "Mesh Leveling" - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("打印机统计"); //"Printer Stats" - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("主板信息"); //"Board Info" - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("温度计"); //"Thermistors" - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT("挤出机"); //"Extruders" - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("波特率"); //"Baud" - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("协议"); //"Protocol" - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("监控温度失控:关"); - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("监控温度失控:开"); - PROGMEM Language_Str MSG_HOTEND_IDLE_TIMEOUT = _UxGT("热端空闲超时"); + LSTR MSG_MOVING = _UxGT("移动..."); // "Moving...") + LSTR MSG_FREE_XY = _UxGT("释放 XY"); // "Free XY") + LSTR MSG_MOVE_X = _UxGT("移动X"); // "Move X" + LSTR MSG_MOVE_Y = _UxGT("移动Y"); // "Move Y" + LSTR MSG_MOVE_Z = _UxGT("移动Z"); // "Move Z" + LSTR MSG_MOVE_E = _UxGT("挤出机"); // "Extruder" + LSTR MSG_MOVE_EN = _UxGT("挤出机 *"); // "Extruder" + LSTR MSG_HOTEND_TOO_COLD = _UxGT("热端太冷"); + LSTR MSG_MOVE_N_MM = _UxGT("移动 %s mm"); // "Move 0.025mm" + LSTR MSG_MOVE_01MM = _UxGT("移动 0.1 mm"); // "Move 0.1mm" + LSTR MSG_MOVE_1MM = _UxGT("移动 1 mm"); // "Move 1mm" + LSTR MSG_MOVE_10MM = _UxGT("移动 10 mm"); // "Move 10mm" + LSTR MSG_MOVE_100MM = _UxGT("移动 100 mm"); // "Move 100mm" + LSTR MSG_SPEED = _UxGT("速率"); // "Speed" + LSTR MSG_BED_Z = _UxGT("热床Z"); // "Bed Z" + LSTR MSG_NOZZLE = _UxGT("喷嘴"); // "Nozzle" 噴嘴 + LSTR MSG_NOZZLE_N = _UxGT("喷嘴 ~"); // "Nozzle" 噴嘴 + LSTR MSG_NOZZLE_PARKED = _UxGT("喷嘴已停靠"); + LSTR MSG_NOZZLE_STANDBY = _UxGT("喷嘴待命中"); + LSTR MSG_BED = _UxGT("热床"); // "Bed" + LSTR MSG_CHAMBER = _UxGT("机箱壳"); + LSTR MSG_FAN_SPEED = _UxGT("风扇速率"); // "Fan speed" + LSTR MSG_FAN_SPEED_N = _UxGT("风扇速率 ~"); // "Fan speed" + LSTR MSG_STORED_FAN_N = _UxGT("存储的风扇 ~"); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("额外风扇速率"); // "Extra fan speed" + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("额外风扇速率 ~"); // "Extra fan speed" + LSTR MSG_CONTROLLER_FAN = _UxGT("控制器风扇"); + LSTR MSG_CONTROLLER_FAN_IDLE_SPEED = _UxGT("空闲速度"); + LSTR MSG_CONTROLLER_FAN_AUTO_ON = _UxGT("自动模式"); + LSTR MSG_CONTROLLER_FAN_SPEED = _UxGT("工作速度"); + LSTR MSG_CONTROLLER_FAN_DURATION = _UxGT("空闲周期"); + LSTR MSG_FLOW = _UxGT("挤出速率"); // "Flow" + LSTR MSG_FLOW_N = _UxGT("挤出速率 ~"); // "Flow" + LSTR MSG_CONTROL = _UxGT("控制"); // "Control" + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" 最小"); // " " LCD_STR_THERMOMETER " Min" + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" 最大"); // " " LCD_STR_THERMOMETER " Max" + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" 因数"); // " " LCD_STR_THERMOMETER " Fact" + LSTR MSG_AUTOTEMP = _UxGT("自动控温"); // "Autotemp" + LSTR MSG_LCD_ON = _UxGT("开"); // "On" + LSTR MSG_LCD_OFF = _UxGT("关"); // "Off" + LSTR MSG_PID_AUTOTUNE = _UxGT("自动PID"); + LSTR MSG_PID_AUTOTUNE_E = _UxGT("自动PID *"); + LSTR MSG_PID_AUTOTUNE_DONE = _UxGT("PID调整完成"); + LSTR MSG_PID_BAD_EXTRUDER_NUM = _UxGT("自动调失败. 坏的挤出机"); + LSTR MSG_PID_TEMP_TOO_HIGH = _UxGT("自动调失败. 温度太高"); + LSTR MSG_PID_TIMEOUT = _UxGT("自动调失败! 超时"); + LSTR MSG_SELECT = _UxGT("选择"); // "Select" + LSTR MSG_SELECT_E = _UxGT("选择 *"); + LSTR MSG_ACC = _UxGT("加速度"); // "Accel" acceleration + LSTR MSG_JERK = _UxGT("抖动速率"); // "Jerk" + LSTR MSG_VA_JERK = _UxGT("轴抖动速率") LCD_STR_A; // "Va-jerk" + LSTR MSG_VB_JERK = _UxGT("轴抖动速率") LCD_STR_B; // "Vb-jerk" + LSTR MSG_VC_JERK = _UxGT("轴抖动速率") LCD_STR_C; // "Vc-jerk" + LSTR MSG_VI_JERK = _UxGT("轴抖动速率") LCD_STR_I; // "Vi-jerk" + LSTR MSG_VJ_JERK = _UxGT("轴抖动速率") LCD_STR_J; // "Vj-jerk" + LSTR MSG_VK_JERK = _UxGT("轴抖动速率") LCD_STR_K; // "Vk-jerk" + LSTR MSG_VE_JERK = _UxGT("挤出机抖动速率"); // "Ve-jerk" + LSTR MSG_JUNCTION_DEVIATION = _UxGT("接点差"); + LSTR MSG_VELOCITY = _UxGT("速度"); // "Velocity" + LSTR MSG_VMAX_A = _UxGT("最大进料速率") LCD_STR_A; // "Vmax " max_feedrate_mm_s + LSTR MSG_VMAX_B = _UxGT("最大进料速率") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("最大进料速率") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("最大进料速率") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("最大进料速率") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("最大进料速率") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("最大进料速率") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("最大进料速率 *"); + LSTR MSG_VMIN = _UxGT("最小进料速率"); // "Vmin" min_feedrate_mm_s + LSTR MSG_VTRAV_MIN = _UxGT("最小移动速率"); // "VTrav min" min_travel_feedrate_mm_s, (target) speed of the move + LSTR MSG_ACCELERATION = _UxGT("加速度"); // "Acceleration" + LSTR MSG_AMAX_A = _UxGT("最大打印加速度") LCD_STR_A; // "Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves + LSTR MSG_AMAX_B = _UxGT("最大打印加速度") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("最大打印加速度") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("最大打印加速度") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("最大打印加速度") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("最大打印加速度") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("最大打印加速度") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("最大打印加速度 *"); + LSTR MSG_A_RETRACT = _UxGT("收进加速度"); // "A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts + LSTR MSG_A_TRAVEL = _UxGT("非打印移动加速度"); // "A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves + LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("频率最大"); + LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("进给速度"); + LSTR MSG_STEPS_PER_MM = _UxGT("轴步数/mm"); // "Steps/mm" axis_steps_per_mm, axis steps-per-unit G92 + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" 步数/mm"); // "Asteps/mm" + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" 步数/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" 步数/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" 步数/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" 步数/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" 步数/mm"); + LSTR MSG_E_STEPS = _UxGT("E 步数/mm"); // "Esteps/mm" + LSTR MSG_EN_STEPS = _UxGT("* 步数/mm"); + LSTR MSG_TEMPERATURE = _UxGT("温度"); // "Temperature" + LSTR MSG_MOTION = _UxGT("运动"); // "Motion" + LSTR MSG_FILAMENT = _UxGT("料丝"); // "Filament" menu_advanced_filament + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("E 在 mm") SUPERSCRIPT_THREE; // "E in mm3" volumetric_enabled + LSTR MSG_VOLUMETRIC_LIMIT = _UxGT("E 限制 在 mm") SUPERSCRIPT_THREE; + LSTR MSG_VOLUMETRIC_LIMIT_E = _UxGT("E 限制 *"); + LSTR MSG_FILAMENT_DIAM = _UxGT("丝料直径"); // "Fil. Dia." + LSTR MSG_FILAMENT_DIAM_E = _UxGT("丝料直径 *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("卸载 mm"); // "Unload mm" + LSTR MSG_FILAMENT_LOAD = _UxGT("装载 mm"); // "Load mm" + LSTR MSG_ADVANCE_K = _UxGT("Advance K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Advance K *"); + LSTR MSG_CONTRAST = _UxGT("LCD对比度"); // "LCD contrast" + LSTR MSG_STORE_EEPROM = _UxGT("保存设置"); // "Store memory" + LSTR MSG_LOAD_EEPROM = _UxGT("装载设置"); // "Load memory" + LSTR MSG_RESTORE_DEFAULTS = _UxGT("恢复安全值"); // "Restore Defaults" + LSTR MSG_INIT_EEPROM = _UxGT("初始化设置"); // "Initialize EEPROM" + LSTR MSG_ERR_EEPROM_CRC = _UxGT("EEPROM CRC 错误"); + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("EEPROM Index 错误"); + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("EEPROM Version 错误"); + LSTR MSG_SETTINGS_STORED = _UxGT("设置已保存"); + LSTR MSG_MEDIA_UPDATE = _UxGT("存储器更新"); + LSTR MSG_RESET_PRINTER = _UxGT("复位打印机"); + LSTR MSG_REFRESH = LCD_STR_REFRESH _UxGT("刷新"); + LSTR MSG_INFO_SCREEN = _UxGT("信息屏"); // "Info screen" + LSTR MSG_PREPARE = _UxGT("准备"); // "Prepare" + LSTR MSG_TUNE = _UxGT("调整"); // "Tune" + LSTR MSG_POWER_MONITOR = _UxGT("电源监控"); + LSTR MSG_CURRENT = _UxGT("电流"); + LSTR MSG_VOLTAGE = _UxGT("电压"); + LSTR MSG_POWER = _UxGT("功率"); + LSTR MSG_START_PRINT = _UxGT("开始打印"); + LSTR MSG_BUTTON_NEXT = _UxGT("下一个"); + LSTR MSG_BUTTON_INIT = _UxGT("初始"); + LSTR MSG_BUTTON_STOP = _UxGT("停止"); + LSTR MSG_BUTTON_PRINT = _UxGT("打印"); + LSTR MSG_BUTTON_RESET = _UxGT("复位"); + LSTR MSG_BUTTON_IGNORE = _UxGT("忽略"); + LSTR MSG_BUTTON_CANCEL = _UxGT("取消"); + LSTR MSG_BUTTON_DONE = _UxGT("完成"); + LSTR MSG_BUTTON_BACK = _UxGT("返回"); + LSTR MSG_BUTTON_PROCEED = _UxGT("继续"); + LSTR MSG_PAUSING = _UxGT("暂停中..."); + LSTR MSG_PAUSE_PRINT = _UxGT("暂停打印"); // "Pause print" + LSTR MSG_RESUME_PRINT = _UxGT("恢复打印"); // "Resume print" + LSTR MSG_STOP_PRINT = _UxGT("停止打印"); // "Stop print" + LSTR MSG_PRINTING_OBJECT = _UxGT("打印物体"); + LSTR MSG_CANCEL_OBJECT = _UxGT("取消物体"); + LSTR MSG_CANCEL_OBJECT_N = _UxGT("取消物体 ="); + LSTR MSG_OUTAGE_RECOVERY = _UxGT("中断恢复"); + LSTR MSG_MEDIA_MENU = _UxGT("从存储卡上打印"); // "Print from SD" + LSTR MSG_NO_MEDIA = _UxGT("无存储卡"); // "No SD card" + LSTR MSG_DWELL = _UxGT("休眠中 ..."); // "Sleep..." + LSTR MSG_USERWAIT = _UxGT("点击继续 ..."); // "Click to resume..." + LSTR MSG_PRINT_PAUSED = _UxGT("暫停打印"); // "Print paused" + LSTR MSG_PRINTING = _UxGT("打印中..."); + LSTR MSG_PRINT_ABORTED = _UxGT("已取消打印"); // "Print aborted" + LSTR MSG_PRINT_DONE = _UxGT("打印已完成"); + LSTR MSG_NO_MOVE = _UxGT("无移动"); // "No move." + LSTR MSG_KILLED = _UxGT("已杀掉"); // "KILLED. " + LSTR MSG_STOPPED = _UxGT("已停止"); // "STOPPED. " + LSTR MSG_CONTROL_RETRACT = _UxGT("回抽长度mm"); // "Retract mm" retract_length, retract length (positive mm) + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("换手回抽长度mm"); // "Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change + LSTR MSG_CONTROL_RETRACTF = _UxGT("回抽速率mm/s"); // "Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); // "Hop mm" retract_zraise, retract Z-lift + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("回抽恢复长度mm"); // "UnRet +mm" retract_recover_extra, additional recover length (mm, added to retract length when recovering) + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("换手回抽恢复长度mm"); // "S UnRet+mm" swap_retract_recover_extra, additional swap recover length (mm, added to retract length when recovering from extruder change) + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("回抽恢复后进料速率mm/s"); // "Unretract V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); // "S UnRet V" + LSTR MSG_AUTORETRACT = _UxGT("自动抽回"); // "Auto-Retract" autoretract_enabled, + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("交换长度"); + LSTR MSG_FILAMENT_SWAP_EXTRA = _UxGT("额外的交换"); + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("清洗长度"); + LSTR MSG_TOOL_CHANGE = _UxGT("换工具"); + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z抬起"); + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("进给速度"); + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("回抽速度"); + LSTR MSG_FILAMENT_PARK_ENABLED = _UxGT("停靠头"); + LSTR MSG_SINGLENOZZLE_UNRETRACT_SPEED = _UxGT("恢复速度"); + LSTR MSG_SINGLENOZZLE_FAN_SPEED = _UxGT("风扇速度"); + LSTR MSG_SINGLENOZZLE_FAN_TIME = _UxGT("风扇时间"); + LSTR MSG_TOOL_MIGRATION_ON = _UxGT("自动开"); + LSTR MSG_TOOL_MIGRATION_OFF = _UxGT("自动关"); + LSTR MSG_TOOL_MIGRATION = _UxGT("工具迁移"); + LSTR MSG_TOOL_MIGRATION_AUTO = _UxGT("自动迁移"); + LSTR MSG_TOOL_MIGRATION_END = _UxGT("上一个挤出机"); + LSTR MSG_TOOL_MIGRATION_SWAP = _UxGT("迁移至 *"); + LSTR MSG_FILAMENTCHANGE = _UxGT("更换丝料"); // "Change filament" + LSTR MSG_FILAMENTCHANGE_E = _UxGT("更换丝料 *"); // "Change filament" + LSTR MSG_FILAMENTLOAD = _UxGT("装载丝料"); // "Load filament" + LSTR MSG_FILAMENTLOAD_E = _UxGT("装载丝料 *"); // "Load filament" + LSTR MSG_FILAMENTUNLOAD = _UxGT("卸载丝料"); // "Unload filament" + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("卸载丝料 *"); // "Unload filament" + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("卸载全部"); // "Unload All" + LSTR MSG_ATTACH_MEDIA = _UxGT("初始化存储卡"); // "Init. SD card" + LSTR MSG_CHANGE_MEDIA = _UxGT("更换存储卡"); // "Change SD card" + LSTR MSG_RELEASE_MEDIA = _UxGT("释放存储卡"); + LSTR MSG_ZPROBE_OUT = _UxGT("Z探针在热床之外"); // "Z probe out. bed" Z probe is not within the physical limits + LSTR MSG_SKEW_FACTOR = _UxGT("偏斜因数"); // "Skew Factor" + LSTR MSG_BLTOUCH = _UxGT("BLTouch"); // "BLTouch" + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("自检"); + LSTR MSG_BLTOUCH_RESET = _UxGT("重置"); + LSTR MSG_BLTOUCH_STOW = _UxGT("装载"); + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("部署"); + LSTR MSG_BLTOUCH_SW_MODE = _UxGT("SW模式"); + LSTR MSG_BLTOUCH_5V_MODE = _UxGT("5V模式"); + LSTR MSG_BLTOUCH_OD_MODE = _UxGT("OD模式"); + LSTR MSG_BLTOUCH_MODE_STORE = _UxGT("模式保存"); + LSTR MSG_BLTOUCH_MODE_STORE_5V = _UxGT("设置BLTouch为5V"); + LSTR MSG_BLTOUCH_MODE_STORE_OD = _UxGT("设置BLTouch为OD"); + LSTR MSG_BLTOUCH_MODE_ECHO = _UxGT("报告开漏"); + LSTR MSG_BLTOUCH_MODE_CHANGE = _UxGT("危险: 错误的设置将引起损坏! 是否继续?"); + LSTR MSG_TOUCHMI_PROBE = _UxGT("TouchMI"); + LSTR MSG_TOUCHMI_INIT = _UxGT("初始化TouchMI"); + LSTR MSG_TOUCHMI_ZTEST = _UxGT("Z偏移量测试"); + LSTR MSG_TOUCHMI_SAVE = _UxGT("保存"); + LSTR MSG_MANUAL_DEPLOY_TOUCHMI = _UxGT("部署TouchMI"); + LSTR MSG_MANUAL_DEPLOY = _UxGT("部署Z探针"); + LSTR MSG_MANUAL_STOW = _UxGT("收好Z探针"); + LSTR MSG_HOME_FIRST = _UxGT("归位 %s%s%s 先"); // "Home ... first" + LSTR MSG_ZPROBE_OFFSETS = _UxGT("探针偏移量"); + LSTR MSG_ZPROBE_XOFFSET = _UxGT("探针X偏移"); + LSTR MSG_ZPROBE_YOFFSET = _UxGT("探针Y偏移"); + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("探针Z偏移"); // "Z Offset" + LSTR MSG_BABYSTEP_X = _UxGT("微量调整X轴"); // "Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts + LSTR MSG_BABYSTEP_Y = _UxGT("微量调整Y轴"); // "Babystep Y" + LSTR MSG_BABYSTEP_Z = _UxGT("微量调整Z轴"); // "Babystep Z" + LSTR MSG_BABYSTEP_TOTAL = _UxGT("总计"); + LSTR MSG_ENDSTOP_ABORT = _UxGT("挡块终止"); // "Endstop abort" + LSTR MSG_HEATING_FAILED_LCD = _UxGT("加热失败"); // "Heating failed" + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("错误:冗余温度"); // "Err: REDUNDANT TEMP" + LSTR MSG_THERMAL_RUNAWAY = _UxGT("温控失控"); // "THERMAL RUNAWAY" + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("热床热量失控"); + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("机箱热量失控"); + LSTR MSG_ERR_MAXTEMP = _UxGT("错误:最高温度"); // "Err: MAXTEMP" + LSTR MSG_ERR_MINTEMP = _UxGT("错误:最低温度"); // "Err: MINTEMP" + LSTR MSG_HALTED = _UxGT("打印停机"); // "PRINTER HALTED" + LSTR MSG_PLEASE_RESET = _UxGT("请重置"); // "Please reset" + LSTR MSG_SHORT_DAY = _UxGT("天"); // "d" // One character only + LSTR MSG_SHORT_HOUR = _UxGT("时"); // "h" // One character only + LSTR MSG_SHORT_MINUTE = _UxGT("分"); // "m" // One character only + LSTR MSG_HEATING = _UxGT("加热中 ..."); // "Heating..." + LSTR MSG_COOLING = _UxGT("冷却中 ..."); + LSTR MSG_BED_HEATING = _UxGT("加热热床中 ..."); // "Bed Heating..." + LSTR MSG_BED_COOLING = _UxGT("热床冷却中 ..."); + LSTR MSG_CHAMBER_HEATING = _UxGT("机箱加热中 ..."); + LSTR MSG_CHAMBER_COOLING = _UxGT("机箱冷却中 ..."); + LSTR MSG_DELTA_CALIBRATE = _UxGT("⊿校准"); // "Delta Calibration" + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("⊿校准X"); // "Calibrate X" + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("⊿校准Y"); // "Calibrate Y" + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("⊿校准Z"); // "Calibrate Z" + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("⊿校准中心"); // "Calibrate Center" + LSTR MSG_DELTA_SETTINGS = _UxGT("⊿设置"); // "Delta Settings" + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("⊿自动校准"); // "Auto Calibration" + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("设置⊿高度"); // "Set Delta Height" + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("探针Z偏移量"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("⊿斜柱"); // "Diag Rod" + LSTR MSG_DELTA_HEIGHT = _UxGT("⊿高度"); // "Height" + LSTR MSG_DELTA_RADIUS = _UxGT("⊿半径"); // "Radius" + LSTR MSG_INFO_MENU = _UxGT("关于打印机"); // "About Printer" + LSTR MSG_INFO_PRINTER_MENU = _UxGT("打印机信息"); // "Printer Info" + LSTR MSG_3POINT_LEVELING = _UxGT("三点调平"); // "3-Point Leveling" + LSTR MSG_LINEAR_LEVELING = _UxGT("线性调平"); // "Linear Leveling" + LSTR MSG_BILINEAR_LEVELING = _UxGT("双线性调平"); // "Bilinear Leveling" + LSTR MSG_UBL_LEVELING = _UxGT("统一热床调平(UBL)"); // "Unified Bed Leveling" + LSTR MSG_MESH_LEVELING = _UxGT("网格调平"); // "Mesh Leveling" + LSTR MSG_INFO_STATS_MENU = _UxGT("打印机统计"); // "Printer Stats" + LSTR MSG_INFO_BOARD_MENU = _UxGT("主板信息"); // "Board Info" + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("温度计"); // "Thermistors" + LSTR MSG_INFO_EXTRUDERS = _UxGT("挤出机"); // "Extruders" + LSTR MSG_INFO_BAUDRATE = _UxGT("波特率"); // "Baud" + LSTR MSG_INFO_PROTOCOL = _UxGT("协议"); // "Protocol" + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("监控温度失控:关"); + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("监控温度失控:开"); + LSTR MSG_HOTEND_IDLE_TIMEOUT = _UxGT("热端空闲超时"); - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("外壳灯"); // "Case light" - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("灯亮度"); // "Light BRIGHTNESS" + LSTR MSG_CASE_LIGHT = _UxGT("外壳灯"); // "Case light" + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("灯亮度"); // "Light BRIGHTNESS" - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("打印机不正确"); // "The printer is incorrect" + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("打印机不正确"); // "The printer is incorrect" #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("打印计数"); //"Print Count" - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("完成了"); //"Completed" - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("总打印时间"); //"Total print time" - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最长工作时间"); //"Longest job time" - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("总计挤出"); //"Extruded total" + LSTR MSG_INFO_PRINT_COUNT = _UxGT("打印计数"); // "Print Count" + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("完成了"); // "Completed" + LSTR MSG_INFO_PRINT_TIME = _UxGT("总打印时间"); // "Total print time" + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("最长工作时间"); // "Longest job time" + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("总计挤出"); // "Extruded total" #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("打印数"); //"Prints" - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("完成"); //"Completed" - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("总共"); //"Total" - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最长"); //"Longest" - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("已挤出"); //"Extruded" + LSTR MSG_INFO_PRINT_COUNT = _UxGT("打印数"); // "Prints" + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("完成"); // "Completed" + LSTR MSG_INFO_PRINT_TIME = _UxGT("总共"); // "Total" + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("最长"); // "Longest" + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("已挤出"); // "Extruded" #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("最低温度"); //"Min Temp" - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("最高温度"); //"Max Temp" - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("电源供应"); //"Power Supply" - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("驱动力度"); // "Drive Strength" - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X 驱动 %"); // "X Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y 驱动 %"); // "Y Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z 驱动 %"); // "Z Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E 驱动 %"); // "E Driver %" - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC 连接错误"); - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("保存驱动设置"); // "DAC EEPROM Write" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("更换料"); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("打印已暂停"); // "PRINT PAUSED" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("装载丝料"); // "LOAD FILAMENT" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("卸载丝料"); // "UNLOAD FILAMENT" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("恢复选项:"); // "RESUME OPTIONS:" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("清除更多"); // "Purge more" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("恢复打印"); //"Resume print" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" 喷嘴: "); // " Nozzle: " - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("断料传感器"); - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("断料距离mm"); - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("归原位失败"); // "Homing failed" - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("探针探测失败"); // "Probing failed" + LSTR MSG_INFO_MIN_TEMP = _UxGT("最低温度"); // "Min Temp" + LSTR MSG_INFO_MAX_TEMP = _UxGT("最高温度"); // "Max Temp" + LSTR MSG_INFO_PSU = _UxGT("电源供应"); // "Power Supply" + LSTR MSG_DRIVE_STRENGTH = _UxGT("驱动力度"); // "Drive Strength" + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" 驱动 %"); // "X Driver %" + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" 驱动 %"); + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" 驱动 %"); + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" 驱动 %"); + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" 驱动 %"); + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" 驱动 %"); + LSTR MSG_DAC_PERCENT_E = _UxGT("E 驱动 %"); // "E Driver %" + LSTR MSG_ERROR_TMC = _UxGT("TMC 连接错误"); + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("保存驱动设置"); // "DAC EEPROM Write" + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("更换料"); + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("打印已暂停"); // "PRINT PAUSED" + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("装载丝料"); // "LOAD FILAMENT" + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("卸载丝料"); // "UNLOAD FILAMENT" + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("恢复选项:"); // "RESUME OPTIONS:" + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("清除更多"); // "Purge more" + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("恢复打印"); // "Resume print" + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" 喷嘴: "); // " Nozzle: " + LSTR MSG_RUNOUT_SENSOR = _UxGT("断料传感器"); + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("断料距离mm"); + LSTR MSG_KILL_HOMING_FAILED = _UxGT("归原位失败"); // "Homing failed" + LSTR MSG_LCD_PROBING_FAILED = _UxGT("探针探测失败"); // "Probing failed" - PROGMEM Language_Str MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("选择料"); - PROGMEM Language_Str MSG_MMU2_MENU = _UxGT("MMU"); - PROGMEM Language_Str MSG_KILL_MMU2_FIRMWARE = _UxGT("升级MMU固件!"); - PROGMEM Language_Str MSG_MMU2_NOT_RESPONDING = _UxGT("MMU需要专注."); - PROGMEM Language_Str MSG_MMU2_RESUME = _UxGT("MMU恢复"); - PROGMEM Language_Str MSG_MMU2_RESUMING = _UxGT("MMU恢复中..."); - PROGMEM Language_Str MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU加载"); - PROGMEM Language_Str MSG_MMU2_LOAD_ALL = _UxGT("MMU加载全部"); - PROGMEM Language_Str MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU加载到喷嘴"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU弹出"); - PROGMEM Language_Str MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU弹出 ~"); - PROGMEM Language_Str MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU卸载"); - PROGMEM Language_Str MSG_MMU2_LOADING_FILAMENT = _UxGT("加载填充. %i..."); - PROGMEM Language_Str MSG_MMU2_EJECTING_FILAMENT = _UxGT("弹出填充. ..."); - PROGMEM Language_Str MSG_MMU2_UNLOADING_FILAMENT = _UxGT("卸载填充...."); - PROGMEM Language_Str MSG_MMU2_ALL = _UxGT("全部"); - PROGMEM Language_Str MSG_MMU2_FILAMENT_N = _UxGT("料 ~"); - PROGMEM Language_Str MSG_MMU2_RESET = _UxGT("复位MMU"); - PROGMEM Language_Str MSG_MMU2_RESETTING = _UxGT("MMU复位中..."); - PROGMEM Language_Str MSG_MMU2_EJECT_RECOVER = _UxGT("移出, 按下"); + LSTR MSG_MMU2_CHOOSE_FILAMENT_HEADER = _UxGT("选择料"); + LSTR MSG_MMU2_MENU = _UxGT("MMU"); + LSTR MSG_KILL_MMU2_FIRMWARE = _UxGT("升级MMU固件!"); + LSTR MSG_MMU2_NOT_RESPONDING = _UxGT("MMU需要专注."); + LSTR MSG_MMU2_RESUME = _UxGT("MMU恢复"); + LSTR MSG_MMU2_RESUMING = _UxGT("MMU恢复中..."); + LSTR MSG_MMU2_LOAD_FILAMENT = _UxGT("MMU加载"); + LSTR MSG_MMU2_LOAD_ALL = _UxGT("MMU加载全部"); + LSTR MSG_MMU2_LOAD_TO_NOZZLE = _UxGT("MMU加载到喷嘴"); + LSTR MSG_MMU2_EJECT_FILAMENT = _UxGT("MMU弹出"); + LSTR MSG_MMU2_EJECT_FILAMENT_N = _UxGT("MMU弹出 ~"); + LSTR MSG_MMU2_UNLOAD_FILAMENT = _UxGT("MMU卸载"); + LSTR MSG_MMU2_LOADING_FILAMENT = _UxGT("加载填充. %i..."); + LSTR MSG_MMU2_EJECTING_FILAMENT = _UxGT("弹出填充. ..."); + LSTR MSG_MMU2_UNLOADING_FILAMENT = _UxGT("卸载填充...."); + LSTR MSG_MMU2_ALL = _UxGT("全部"); + LSTR MSG_MMU2_FILAMENT_N = _UxGT("料 ~"); + LSTR MSG_MMU2_RESET = _UxGT("复位MMU"); + LSTR MSG_MMU2_RESETTING = _UxGT("MMU复位中..."); + LSTR MSG_MMU2_EJECT_RECOVER = _UxGT("移出, 按下"); - PROGMEM Language_Str MSG_MIX = _UxGT("混合"); - PROGMEM Language_Str MSG_MIX_COMPONENT_N = _UxGT("器件 ="); - PROGMEM Language_Str MSG_MIXER = _UxGT("混合器"); - PROGMEM Language_Str MSG_GRADIENT = _UxGT("梯度"); - PROGMEM Language_Str MSG_FULL_GRADIENT = _UxGT("全梯度"); - PROGMEM Language_Str MSG_TOGGLE_MIX = _UxGT("开关混合"); - PROGMEM Language_Str MSG_CYCLE_MIX = _UxGT("循环混合"); - PROGMEM Language_Str MSG_GRADIENT_MIX = _UxGT("梯度混合"); - PROGMEM Language_Str MSG_REVERSE_GRADIENT = _UxGT("反向梯度"); - PROGMEM Language_Str MSG_ACTIVE_VTOOL = _UxGT("激活 V-tool"); - PROGMEM Language_Str MSG_START_VTOOL = _UxGT("开始 V-tool"); - PROGMEM Language_Str MSG_END_VTOOL = _UxGT(" 结束 V-tool"); - PROGMEM Language_Str MSG_GRADIENT_ALIAS = _UxGT("别名 V-tool"); - PROGMEM Language_Str MSG_RESET_VTOOLS = _UxGT("复位 V-tools"); - PROGMEM Language_Str MSG_COMMIT_VTOOL = _UxGT("提交 V-tool Mix"); - PROGMEM Language_Str MSG_VTOOLS_RESET = _UxGT("V-tools 已复位"); - PROGMEM Language_Str MSG_START_Z = _UxGT("开始 Z:"); - PROGMEM Language_Str MSG_END_Z = _UxGT(" 结束 Z:"); + LSTR MSG_MIX = _UxGT("混合"); + LSTR MSG_MIX_COMPONENT_N = _UxGT("器件 ="); + LSTR MSG_MIXER = _UxGT("混合器"); + LSTR MSG_GRADIENT = _UxGT("梯度"); + LSTR MSG_FULL_GRADIENT = _UxGT("全梯度"); + LSTR MSG_TOGGLE_MIX = _UxGT("开关混合"); + LSTR MSG_CYCLE_MIX = _UxGT("循环混合"); + LSTR MSG_GRADIENT_MIX = _UxGT("梯度混合"); + LSTR MSG_REVERSE_GRADIENT = _UxGT("反向梯度"); + LSTR MSG_ACTIVE_VTOOL = _UxGT("激活 V-tool"); + LSTR MSG_START_VTOOL = _UxGT("开始 V-tool"); + LSTR MSG_END_VTOOL = _UxGT(" 结束 V-tool"); + LSTR MSG_GRADIENT_ALIAS = _UxGT("别名 V-tool"); + LSTR MSG_RESET_VTOOLS = _UxGT("复位 V-tools"); + LSTR MSG_COMMIT_VTOOL = _UxGT("提交 V-tool Mix"); + LSTR MSG_VTOOLS_RESET = _UxGT("V-tools 已复位"); + LSTR MSG_START_Z = _UxGT("开始 Z:"); + LSTR MSG_END_Z = _UxGT(" 结束 Z:"); - PROGMEM Language_Str MSG_GAMES = _UxGT("游戏"); - PROGMEM Language_Str MSG_BRICKOUT = _UxGT("敲方块"); - PROGMEM Language_Str MSG_INVADERS = _UxGT("入侵者"); - PROGMEM Language_Str MSG_SNAKE = _UxGT("贪吃蛇"); - PROGMEM Language_Str MSG_MAZE = _UxGT("迷宫"); + LSTR MSG_GAMES = _UxGT("游戏"); + LSTR MSG_BRICKOUT = _UxGT("敲方块"); + LSTR MSG_INVADERS = _UxGT("入侵者"); + LSTR MSG_SNAKE = _UxGT("贪吃蛇"); + LSTR MSG_MAZE = _UxGT("迷宫"); - PROGMEM Language_Str MSG_BAD_PAGE = _UxGT("错误页面索引"); - PROGMEM Language_Str MSG_BAD_PAGE_SPEED = _UxGT("错误页面速度"); + LSTR MSG_BAD_PAGE = _UxGT("错误页面索引"); + LSTR MSG_BAD_PAGE_SPEED = _UxGT("错误页面速度"); // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("按下按钮", "恢复打印")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停靠中...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("等待开始", "丝料", "变更")); // "Wait for start of the filament change" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("插入料", "并按下", "以继续")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("按下按钮来", "加热喷嘴.")); // "Press button to heat nozzle." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("加热喷嘴", "请等待 ...")); // "Heating nozzle Please wait..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("等待", "卸下丝料")); // "Wait for filament unload" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("等待", "进料")); // "Wait for filament load" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("等待", "丝料清除")); // "Wait for filament purge" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("按下已完成", "料的清洗")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("等待打印", "恢复")); // "Wait for print to resume" + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("按下按钮", "恢复打印")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停靠中...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("等待开始", "丝料", "变更")); // "Wait for start of the filament change" + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("插入料", "并按下", "以继续")); + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("按下按钮来", "加热喷嘴.")); // "Press button to heat nozzle." + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("加热喷嘴", "请等待 ...")); // "Heating nozzle Please wait..." + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("等待", "卸下丝料")); // "Wait for filament unload" + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("等待", "进料")); // "Wait for filament load" + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("等待", "丝料清除")); // "Wait for filament purge" + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("按下已完成", "料的清洗")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("等待打印", "恢复")); // "Wait for print to resume" #else - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("按下继续")); - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停靠中...")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("请等待 ...")); //"Please wait..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("插入并单击")); //"Insert and Click" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("按下加热")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("加热中 ...")); // "Heating..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("退出中 ...")); //"Ejecting..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("装载中 ...")); //"Loading..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("清除中 ...")); // "Purging..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("按下完成")); - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("恢复中 ...")); //"Resuming..." + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("按下继续")); + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停靠中...")); + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("请等待 ...")); // "Please wait..." + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("插入并单击")); // "Insert and Click" + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("按下加热")); + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("加热中 ...")); // "Heating..." + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("退出中 ...")); // "Ejecting..." + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("装载中 ...")); // "Loading..." + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("清除中 ...")); // "Purging..." + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("按下完成")); + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("恢复中 ...")); // "Resuming..." #endif - PROGMEM Language_Str MSG_TMC_DRIVERS = _UxGT("TMC驱动器"); - PROGMEM Language_Str MSG_TMC_CURRENT = _UxGT("驱动电流"); - PROGMEM Language_Str MSG_TMC_HYBRID_THRS = _UxGT("混合阈值"); - PROGMEM Language_Str MSG_TMC_HOMING_THRS = _UxGT("无感回零"); - PROGMEM Language_Str MSG_TMC_STEPPING_MODE = _UxGT("步进模式"); - PROGMEM Language_Str MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop已使能"); - PROGMEM Language_Str MSG_SERVICE_RESET = _UxGT("复位"); - PROGMEM Language_Str MSG_SERVICE_IN = _UxGT(" 在:"); - PROGMEM Language_Str MSG_BACKLASH = _UxGT("回差"); - PROGMEM Language_Str MSG_BACKLASH_A = LCD_STR_A; - PROGMEM Language_Str MSG_BACKLASH_B = LCD_STR_B; - PROGMEM Language_Str MSG_BACKLASH_C = LCD_STR_C; - PROGMEM Language_Str MSG_BACKLASH_CORRECTION = _UxGT("校正"); - PROGMEM Language_Str MSG_BACKLASH_SMOOTHING = _UxGT("平滑的"); + LSTR MSG_TMC_DRIVERS = _UxGT("TMC驱动器"); + LSTR MSG_TMC_CURRENT = _UxGT("驱动电流"); + LSTR MSG_TMC_HYBRID_THRS = _UxGT("混合阈值"); + LSTR MSG_TMC_HOMING_THRS = _UxGT("无感回零"); + LSTR MSG_TMC_STEPPING_MODE = _UxGT("步进模式"); + LSTR MSG_TMC_STEALTH_ENABLED = _UxGT("StealthChop已使能"); + LSTR MSG_SERVICE_RESET = _UxGT("复位"); + LSTR MSG_SERVICE_IN = _UxGT(" 在:"); + LSTR MSG_BACKLASH = _UxGT("回差"); + LSTR MSG_BACKLASH_CORRECTION = _UxGT("校正"); + LSTR MSG_BACKLASH_SMOOTHING = _UxGT("平滑的"); - PROGMEM Language_Str MSG_LEVEL_X_AXIS = _UxGT("X轴调平"); - PROGMEM Language_Str MSG_AUTO_CALIBRATE = _UxGT("自动校准"); - PROGMEM Language_Str MSG_HEATER_TIMEOUT = _UxGT("加热器超时"); - PROGMEM Language_Str MSG_REHEAT = _UxGT("重新加热"); - PROGMEM Language_Str MSG_REHEATING = _UxGT("重新加热中..."); + LSTR MSG_LEVEL_X_AXIS = _UxGT("X轴调平"); + LSTR MSG_AUTO_CALIBRATE = _UxGT("自动校准"); + LSTR MSG_HEATER_TIMEOUT = _UxGT("加热器超时"); + LSTR MSG_REHEAT = _UxGT("重新加热"); + LSTR MSG_REHEATING = _UxGT("重新加热中..."); } #if FAN_COUNT == 1 diff --git a/Marlin/src/lcd/language/language_zh_TW.h b/Marlin/src/lcd/language/language_zh_TW.h index f86b15351fdf..fd43fefd2960 100644 --- a/Marlin/src/lcd/language/language_zh_TW.h +++ b/Marlin/src/lcd/language/language_zh_TW.h @@ -30,468 +30,482 @@ namespace Language_zh_TW { using namespace Language_en; // Inherit undefined strings from English - constexpr uint8_t CHARSIZE = 3; - PROGMEM Language_Str LANGUAGE = _UxGT("Traditional Chinese"); + constexpr uint8_t CHARSIZE = 3; + LSTR LANGUAGE = _UxGT("Traditional Chinese"); - PROGMEM Language_Str WELCOME_MSG = MACHINE_NAME _UxGT("已就緒."); //" ready." - PROGMEM Language_Str MSG_MARLIN = _UxGT("Marlin"); - PROGMEM Language_Str MSG_YES = _UxGT("是"); //"YES" - PROGMEM Language_Str MSG_NO = _UxGT("否"); //"NO" - PROGMEM Language_Str MSG_BACK = _UxGT("返回"); // "Back" - PROGMEM Language_Str MSG_MEDIA_ABORTING = _UxGT("正在中止..."); //"Aborting..." - PROGMEM Language_Str MSG_MEDIA_INSERTED = _UxGT("記憶卡已插入"); //"Card inserted" - PROGMEM Language_Str MSG_MEDIA_REMOVED = _UxGT("記憶卡被拔出"); //"Card removed" - PROGMEM Language_Str MSG_MEDIA_WAITING = _UxGT("等待記憶卡"); //"Waiting for media" - PROGMEM Language_Str MSG_MEDIA_READ_ERROR = _UxGT("記憶卡讀取錯誤"); //"Media read error" - PROGMEM Language_Str MSG_MEDIA_USB_REMOVED = _UxGT("USB裝置已移除"); //"USB device removed" - PROGMEM Language_Str MSG_MEDIA_USB_FAILED = _UxGT("USB啟動失敗"); //"USB start failed" - PROGMEM Language_Str MSG_LCD_ENDSTOPS = _UxGT("擋塊"); //"Endstops" // Max length 8 characters - PROGMEM Language_Str MSG_LCD_SOFT_ENDSTOPS = _UxGT("軟體擋塊"); //"Soft Endstops" - PROGMEM Language_Str MSG_MAIN = _UxGT("主選單"); //"Main" - PROGMEM Language_Str MSG_ADVANCED_SETTINGS = _UxGT("進階設置"); //"Advanced Settings" - PROGMEM Language_Str MSG_CONFIGURATION = _UxGT("設置"); //Configuration - PROGMEM Language_Str MSG_RUN_AUTO_FILES = _UxGT("自動開始"); //"Autostart" - PROGMEM Language_Str MSG_DISABLE_STEPPERS = _UxGT("關閉步進馬達"); //"Disable steppers" - PROGMEM Language_Str MSG_DEBUG_MENU = _UxGT("除錯選單"); // "Debug Menu" - PROGMEM Language_Str MSG_PROGRESS_BAR_TEST = _UxGT("進度條測試"); // "Progress Bar Test" - PROGMEM Language_Str MSG_AUTO_HOME = _UxGT("自動回原點"); //"Auto home" - PROGMEM Language_Str MSG_AUTO_HOME_X = _UxGT("回X原點"); //"Home X" - PROGMEM Language_Str MSG_AUTO_HOME_Y = _UxGT("回Y原點"); //"Home Y" - PROGMEM Language_Str MSG_AUTO_HOME_Z = _UxGT("回Z原點"); //"Home Z" - PROGMEM Language_Str MSG_AUTO_Z_ALIGN = _UxGT("自動Z對齊"); //"Auto Z-Align" - PROGMEM Language_Str MSG_LEVEL_BED_HOMING = _UxGT("平台調平XYZ歸原點"); //"Homing XYZ" - PROGMEM Language_Str MSG_LEVEL_BED_WAITING = _UxGT("單擊開始熱床調平"); //"Click to Begin" - PROGMEM Language_Str MSG_LEVEL_BED_NEXT_POINT = _UxGT("下個熱床調平點"); //"Next Point" - PROGMEM Language_Str MSG_LEVEL_BED_DONE = _UxGT("完成熱床調平"); //"Leveling Done!" - PROGMEM Language_Str MSG_Z_FADE_HEIGHT = _UxGT("淡出高度"); // "Fade Height" - PROGMEM Language_Str MSG_SET_HOME_OFFSETS = _UxGT("設置原點偏移"); //"Set home offsets" - PROGMEM Language_Str MSG_HOME_OFFSETS_APPLIED = _UxGT("偏移已啟用"); //"Offsets applied" - PROGMEM Language_Str MSG_SET_ORIGIN = _UxGT("設置原點"); //"Set origin" + LSTR WELCOME_MSG = MACHINE_NAME _UxGT("已就緒."); // " ready." + LSTR MSG_YES = _UxGT("是"); // "YES" + LSTR MSG_NO = _UxGT("否"); // "NO" + LSTR MSG_BACK = _UxGT("返回"); // "Back" + LSTR MSG_MEDIA_ABORTING = _UxGT("正在中止..."); // "Aborting..." + LSTR MSG_MEDIA_INSERTED = _UxGT("記憶卡已插入"); // "Card inserted" + LSTR MSG_MEDIA_REMOVED = _UxGT("記憶卡被拔出"); // "Card removed" + LSTR MSG_MEDIA_WAITING = _UxGT("等待記憶卡"); // "Waiting for media" + LSTR MSG_MEDIA_READ_ERROR = _UxGT("記憶卡讀取錯誤"); //"Media read error" + LSTR MSG_MEDIA_USB_REMOVED = _UxGT("USB裝置已移除"); // "USB device removed" + LSTR MSG_MEDIA_USB_FAILED = _UxGT("USB啟動失敗"); // "USB start failed" + LSTR MSG_LCD_ENDSTOPS = _UxGT("擋塊"); // "Endstops" // Max length 8 characters + LSTR MSG_LCD_SOFT_ENDSTOPS = _UxGT("軟體擋塊"); // "Soft Endstops" + LSTR MSG_MAIN = _UxGT("主選單"); // "Main" + LSTR MSG_ADVANCED_SETTINGS = _UxGT("進階設置"); // "Advanced Settings" + LSTR MSG_CONFIGURATION = _UxGT("設置"); //Configuration + LSTR MSG_RUN_AUTO_FILES = _UxGT("自動開始"); // "Autostart" + LSTR MSG_DISABLE_STEPPERS = _UxGT("關閉步進馬達"); // "Disable steppers" + LSTR MSG_DEBUG_MENU = _UxGT("除錯選單"); // "Debug Menu" + LSTR MSG_PROGRESS_BAR_TEST = _UxGT("進度條測試"); // "Progress Bar Test" + LSTR MSG_AUTO_HOME = _UxGT("自動回原點"); // "Auto home" + LSTR MSG_AUTO_HOME_X = _UxGT("回X原點"); // "Home X" + LSTR MSG_AUTO_HOME_Y = _UxGT("回Y原點"); // "Home Y" + LSTR MSG_AUTO_HOME_Z = _UxGT("回Z原點"); // "Home Z" + LSTR MSG_AUTO_Z_ALIGN = _UxGT("自動Z對齊"); // "Auto Z-Align" + LSTR MSG_LEVEL_BED_HOMING = _UxGT("平台調平XYZ歸原點"); // "Homing XYZ" + LSTR MSG_LEVEL_BED_WAITING = _UxGT("單擊開始熱床調平"); // "Click to Begin" + LSTR MSG_LEVEL_BED_NEXT_POINT = _UxGT("下個熱床調平點"); // "Next Point" + LSTR MSG_LEVEL_BED_DONE = _UxGT("完成熱床調平"); // "Leveling Done!" + LSTR MSG_Z_FADE_HEIGHT = _UxGT("淡出高度"); // "Fade Height" + LSTR MSG_SET_HOME_OFFSETS = _UxGT("設置原點偏移"); // "Set home offsets" + LSTR MSG_HOME_OFFSETS_APPLIED = _UxGT("偏移已啟用"); // "Offsets applied" + LSTR MSG_SET_ORIGIN = _UxGT("設置原點"); // "Set origin" #if PREHEAT_COUNT - PROGMEM Language_Str MSG_PREHEAT_1 = _UxGT("預熱 ") PREHEAT_1_LABEL; //"Preheat PREHEAT_1_LABEL" - PROGMEM Language_Str MSG_PREHEAT_1_H = _UxGT("預熱 ") PREHEAT_1_LABEL " ~"; //"Preheat PREHEAT_1_LABEL" - PROGMEM Language_Str MSG_PREHEAT_1_END = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 噴嘴"); //MSG_PREHEAT_1 " " - PROGMEM Language_Str MSG_PREHEAT_1_END_E = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 噴嘴 ~"); //MSG_PREHEAT_1 " " - PROGMEM Language_Str MSG_PREHEAT_1_ALL = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 全部"); //MSG_PREHEAT_1 " All" - PROGMEM Language_Str MSG_PREHEAT_1_BEDONLY = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 熱床"); //MSG_PREHEAT_1 " Bed" - PROGMEM Language_Str MSG_PREHEAT_1_SETTINGS = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 設置"); //MSG_PREHEAT_1 " conf" + LSTR MSG_PREHEAT_1 = _UxGT("預熱 ") PREHEAT_1_LABEL; // "Preheat PREHEAT_1_LABEL" + LSTR MSG_PREHEAT_1_H = _UxGT("預熱 ") PREHEAT_1_LABEL " ~"; // "Preheat PREHEAT_1_LABEL" + LSTR MSG_PREHEAT_1_END = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 噴嘴"); //MSG_PREHEAT_1 " " + LSTR MSG_PREHEAT_1_END_E = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 噴嘴 ~"); //MSG_PREHEAT_1 " " + LSTR MSG_PREHEAT_1_ALL = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 全部"); //MSG_PREHEAT_1 " All" + LSTR MSG_PREHEAT_1_BEDONLY = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 熱床"); //MSG_PREHEAT_1 " Bed" + LSTR MSG_PREHEAT_1_SETTINGS = _UxGT("預熱 ") PREHEAT_1_LABEL _UxGT(" 設置"); //MSG_PREHEAT_1 " conf" - PROGMEM Language_Str MSG_PREHEAT_M = _UxGT("預熱 $"); //"Preheat PREHEAT_1_LABEL" - PROGMEM Language_Str MSG_PREHEAT_M_H = _UxGT("預熱 $ ~"); //"Preheat PREHEAT_1_LABEL" - PROGMEM Language_Str MSG_PREHEAT_M_END = _UxGT("預熱 $ 噴嘴"); //MSG_PREHEAT_1 " " - PROGMEM Language_Str MSG_PREHEAT_M_END_E = _UxGT("預熱 $ 噴嘴 ~"); //MSG_PREHEAT_1 " " - PROGMEM Language_Str MSG_PREHEAT_M_ALL = _UxGT("預熱 $ 全部"); //MSG_PREHEAT_1 " All" - PROGMEM Language_Str MSG_PREHEAT_M_BEDONLY = _UxGT("預熱 $ 熱床"); //MSG_PREHEAT_1 " Bed" - PROGMEM Language_Str MSG_PREHEAT_M_SETTINGS = _UxGT("預熱 $ 設置"); //MSG_PREHEAT_1 " conf" + LSTR MSG_PREHEAT_M = _UxGT("預熱 $"); // "Preheat PREHEAT_1_LABEL" + LSTR MSG_PREHEAT_M_H = _UxGT("預熱 $ ~"); // "Preheat PREHEAT_1_LABEL" + LSTR MSG_PREHEAT_M_END = _UxGT("預熱 $ 噴嘴"); //MSG_PREHEAT_1 " " + LSTR MSG_PREHEAT_M_END_E = _UxGT("預熱 $ 噴嘴 ~"); //MSG_PREHEAT_1 " " + LSTR MSG_PREHEAT_M_ALL = _UxGT("預熱 $ 全部"); //MSG_PREHEAT_1 " All" + LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("預熱 $ 熱床"); //MSG_PREHEAT_1 " Bed" + LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("預熱 $ 設置"); //MSG_PREHEAT_1 " conf" #endif - PROGMEM Language_Str MSG_PREHEAT_CUSTOM = _UxGT("自定預熱"); //"Preheat Custom" - PROGMEM Language_Str MSG_COOLDOWN = _UxGT("降溫"); //"Cooldown" - PROGMEM Language_Str MSG_LASER_MENU = _UxGT("激光控制"); //"Laser Control" - PROGMEM Language_Str MSG_LASER_POWER = _UxGT("激光電源"); //"Laser Power" - PROGMEM Language_Str MSG_SPINDLE_MENU = _UxGT("主軸控告制"); //"Spindle Control" - PROGMEM Language_Str MSG_SPINDLE_POWER = _UxGT("主軸電源"); //"Spindle Power" - PROGMEM Language_Str MSG_SPINDLE_REVERSE = _UxGT("主軸反轉"); //"Spindle Reverse" - PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("電源打開"); //"Switch power on" - PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("電源關閉"); //"Switch power off" - PROGMEM Language_Str MSG_EXTRUDE = _UxGT("擠出"); //"Extrude" - PROGMEM Language_Str MSG_RETRACT = _UxGT("回縮"); //"Retract" - PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("移動軸"); //"Move axis" - PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("調平熱床"); //"Bed leveling" - PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("調平熱床"); //"Level bed" - PROGMEM Language_Str MSG_LEVEL_CORNERS = _UxGT("調平邊角"); // "Level corners" - PROGMEM Language_Str MSG_NEXT_CORNER = _UxGT("下個邊角"); // "Next corner" - PROGMEM Language_Str MSG_MESH_EDITOR = _UxGT("網格編輯器"); //"Mesh Editor" - PROGMEM Language_Str MSG_EDIT_MESH = _UxGT("編輯網格"); // "Edit Mesh" - PROGMEM Language_Str MSG_EDITING_STOPPED = _UxGT("網格編輯已停止"); // "Mesh Editing Stopped" - PROGMEM Language_Str MSG_PROBING_MESH = _UxGT("探測點"); //"Probing Point" - PROGMEM Language_Str MSG_MESH_X = _UxGT("索引 X"); //"Index X" - PROGMEM Language_Str MSG_MESH_Y = _UxGT("索引 Y"); //"Index Y" - PROGMEM Language_Str MSG_MESH_EDIT_Z = _UxGT("Z 值"); //"Z Value" - PROGMEM Language_Str MSG_USER_MENU = _UxGT("自定命令"); // "Custom Commands" - PROGMEM Language_Str MSG_M48_TEST = _UxGT("M48 探測測試"); //"M48 Probe Test" - PROGMEM Language_Str MSG_M48_POINT = _UxGT("M48 探測點"); //"M48 Point" - PROGMEM Language_Str MSG_M48_DEVIATION = _UxGT("偏差"); //"Deviation" - PROGMEM Language_Str MSG_IDEX_MENU = _UxGT("IDEX Mode"); - PROGMEM Language_Str MSG_OFFSETS_MENU = _UxGT("Tool Offsets"); - PROGMEM Language_Str MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); - PROGMEM Language_Str MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplication"); - PROGMEM Language_Str MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Mirrored Copy"); - PROGMEM Language_Str MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Control"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_X = _UxGT("2nd Nozzle X"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Y = _UxGT("2nd Nozzle Y"); - PROGMEM Language_Str MSG_HOTEND_OFFSET_Z = _UxGT("2nd Nozzle Z"); - PROGMEM Language_Str MSG_UBL_DOING_G29 = _UxGT("執行G29"); // "Doing G29" - PROGMEM Language_Str MSG_UBL_TOOLS = _UxGT("UBL工具"); // "UBL Tools" - PROGMEM Language_Str MSG_UBL_LEVEL_BED = _UxGT("統一熱床調平(UBL)"); // "Unified Bed Leveling" - PROGMEM Language_Str MSG_LCD_TILTING_MESH = _UxGT("傾斜點"); //"Tilting Point" - PROGMEM Language_Str MSG_UBL_MANUAL_MESH = _UxGT("手工建網"); // "Manually Build Mesh" - PROGMEM Language_Str MSG_UBL_BC_INSERT = _UxGT("放置墊片並測量"); // "Place shim & measure" - PROGMEM Language_Str MSG_UBL_BC_INSERT2 = _UxGT("測量"); // "Measure" - PROGMEM Language_Str MSG_UBL_BC_REMOVE = _UxGT("移除並測量熱床"); // "Remove & measure bed" - PROGMEM Language_Str MSG_UBL_MOVING_TO_NEXT = _UxGT("移動到下一個"); // "Moving to next" - PROGMEM Language_Str MSG_UBL_ACTIVATE_MESH = _UxGT("啟動UBL"); // "Activate UBL" - PROGMEM Language_Str MSG_UBL_DEACTIVATE_MESH = _UxGT("關閉UBL"); // "Deactivate UBL" - PROGMEM Language_Str MSG_UBL_SET_TEMP_BED = _UxGT("置設熱床溫度"); // "Bed Temp" - PROGMEM Language_Str MSG_UBL_BED_TEMP_CUSTOM = _UxGT("置設熱床溫度"); //"Bed Temp") - PROGMEM Language_Str MSG_UBL_SET_TEMP_HOTEND = _UxGT("置設噴嘴溫度"); // "Hotend Temp" - PROGMEM Language_Str MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("熱端溫度"); //"Hotend Temp" - PROGMEM Language_Str MSG_UBL_MESH_EDIT = _UxGT("網格編輯"); // "Mesh Edit" - PROGMEM Language_Str MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("編輯客戶網格"); // "Edit Custom Mesh" - PROGMEM Language_Str MSG_UBL_FINE_TUNE_MESH = _UxGT("細調網格"); // "Fine Tuning Mesh" - PROGMEM Language_Str MSG_UBL_DONE_EDITING_MESH = _UxGT("完成編輯網格"); // "Done Editing Mesh" - PROGMEM Language_Str MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("創設客戶網格"); // "Build Custom Mesh" - PROGMEM Language_Str MSG_UBL_BUILD_MESH_MENU = _UxGT("創設網格"); // "Build Mesh" + LSTR MSG_PREHEAT_CUSTOM = _UxGT("自定預熱"); // "Preheat Custom" + LSTR MSG_COOLDOWN = _UxGT("降溫"); // "Cooldown" + LSTR MSG_LASER_MENU = _UxGT("激光控制"); // "Laser Control" + LSTR MSG_LASER_POWER = _UxGT("激光電源"); // "Laser Power" + LSTR MSG_SPINDLE_MENU = _UxGT("主軸控告制"); // "Spindle Control" + LSTR MSG_SPINDLE_POWER = _UxGT("主軸電源"); // "Spindle Power" + LSTR MSG_SPINDLE_REVERSE = _UxGT("主軸反轉"); // "Spindle Reverse" + LSTR MSG_SWITCH_PS_ON = _UxGT("電源打開"); // "Switch power on" + LSTR MSG_SWITCH_PS_OFF = _UxGT("電源關閉"); // "Switch power off" + LSTR MSG_EXTRUDE = _UxGT("擠出"); // "Extrude" + LSTR MSG_RETRACT = _UxGT("回縮"); // "Retract" + LSTR MSG_MOVE_AXIS = _UxGT("移動軸"); // "Move axis" + LSTR MSG_BED_LEVELING = _UxGT("調平熱床"); // "Bed leveling" + LSTR MSG_LEVEL_BED = _UxGT("調平熱床"); // "Level bed" + LSTR MSG_BED_TRAMMING = _UxGT("調平邊角"); // "Bed Tramming" + LSTR MSG_NEXT_CORNER = _UxGT("下個邊角"); // "Next corner" + LSTR MSG_MESH_EDITOR = _UxGT("網格編輯器"); // "Mesh Editor" + LSTR MSG_EDIT_MESH = _UxGT("編輯網格"); // "Edit Mesh" + LSTR MSG_EDITING_STOPPED = _UxGT("網格編輯已停止"); // "Mesh Editing Stopped" + LSTR MSG_PROBING_POINT = _UxGT("探測點"); // "Probing Point" + LSTR MSG_MESH_X = _UxGT("索引 X"); // "Index X" + LSTR MSG_MESH_Y = _UxGT("索引 Y"); // "Index Y" + LSTR MSG_MESH_EDIT_Z = _UxGT("Z 值"); // "Z Value" + LSTR MSG_CUSTOM_COMMANDS = _UxGT("自定命令"); // "Custom Commands" + LSTR MSG_M48_TEST = _UxGT("M48 探測測試"); // "M48 Probe Test" + LSTR MSG_M48_POINT = _UxGT("M48 探測點"); // "M48 Point" + LSTR MSG_M48_DEVIATION = _UxGT("偏差"); // "Deviation" + LSTR MSG_IDEX_MENU = _UxGT("IDEX Mode"); + LSTR MSG_OFFSETS_MENU = _UxGT("Tool Offsets"); + LSTR MSG_IDEX_MODE_AUTOPARK = _UxGT("Auto-Park"); + LSTR MSG_IDEX_MODE_DUPLICATE = _UxGT("Duplication"); + LSTR MSG_IDEX_MODE_MIRRORED_COPY = _UxGT("Mirrored Copy"); + LSTR MSG_IDEX_MODE_FULL_CTRL = _UxGT("Full Control"); + LSTR MSG_HOTEND_OFFSET_X = _UxGT("2nd Nozzle X"); + LSTR MSG_HOTEND_OFFSET_Y = _UxGT("2nd Nozzle Y"); + LSTR MSG_HOTEND_OFFSET_Z = _UxGT("2nd Nozzle Z"); + LSTR MSG_UBL_DOING_G29 = _UxGT("執行G29"); // "Doing G29" + LSTR MSG_UBL_TOOLS = _UxGT("UBL工具"); // "UBL Tools" + LSTR MSG_UBL_LEVEL_BED = _UxGT("統一熱床調平(UBL)"); // "Unified Bed Leveling" + LSTR MSG_LCD_TILTING_MESH = _UxGT("傾斜點"); // "Tilting Point" + LSTR MSG_UBL_MANUAL_MESH = _UxGT("手工建網"); // "Manually Build Mesh" + LSTR MSG_UBL_BC_INSERT = _UxGT("放置墊片並測量"); // "Place shim & measure" + LSTR MSG_UBL_BC_INSERT2 = _UxGT("測量"); // "Measure" + LSTR MSG_UBL_BC_REMOVE = _UxGT("移除並測量熱床"); // "Remove & measure bed" + LSTR MSG_UBL_MOVING_TO_NEXT = _UxGT("移動到下一個"); // "Moving to next" + LSTR MSG_UBL_ACTIVATE_MESH = _UxGT("啟動UBL"); // "Activate UBL" + LSTR MSG_UBL_DEACTIVATE_MESH = _UxGT("關閉UBL"); // "Deactivate UBL" + LSTR MSG_UBL_SET_TEMP_BED = _UxGT("置設熱床溫度"); // "Bed Temp" + LSTR MSG_UBL_BED_TEMP_CUSTOM = _UxGT("置設熱床溫度"); // "Bed Temp") + LSTR MSG_UBL_SET_TEMP_HOTEND = _UxGT("置設噴嘴溫度"); // "Hotend Temp" + LSTR MSG_UBL_HOTEND_TEMP_CUSTOM = _UxGT("熱端溫度"); // "Hotend Temp" + LSTR MSG_UBL_MESH_EDIT = _UxGT("網格編輯"); // "Mesh Edit" + LSTR MSG_UBL_EDIT_CUSTOM_MESH = _UxGT("編輯客戶網格"); // "Edit Custom Mesh" + LSTR MSG_UBL_FINE_TUNE_MESH = _UxGT("細調網格"); // "Fine Tuning Mesh" + LSTR MSG_UBL_DONE_EDITING_MESH = _UxGT("完成編輯網格"); // "Done Editing Mesh" + LSTR MSG_UBL_BUILD_CUSTOM_MESH = _UxGT("創設客戶網格"); // "Build Custom Mesh" + LSTR MSG_UBL_BUILD_MESH_MENU = _UxGT("創設網格"); // "Build Mesh" #if PREHEAT_COUNT - PROGMEM Language_Str MSG_UBL_BUILD_MESH_M = _UxGT("創設 $ 網格"); // "Build PREHEAT_1_LABEL Mesh" - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_M = _UxGT("批准 $ 網格"); // "Validate PREHEAT_1_LABEL Mesh" + LSTR MSG_UBL_BUILD_MESH_M = _UxGT("創設 $ 網格"); // "Build PREHEAT_1_LABEL Mesh" + LSTR MSG_UBL_VALIDATE_MESH_M = _UxGT("批准 $ 網格"); // "Validate PREHEAT_1_LABEL Mesh" #endif - PROGMEM Language_Str MSG_UBL_BUILD_COLD_MESH = _UxGT("創設冷網格"); // "Build Cold Mesh" - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("調整網格高度"); // "Adjust Mesh Height" - PROGMEM Language_Str MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("高度合計"); // "Height Amount" - PROGMEM Language_Str MSG_UBL_VALIDATE_MESH_MENU = _UxGT("批准網格"); // "Validate Mesh" - PROGMEM Language_Str MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("批准客戶網格"); // "Validate Custom Mesh" - PROGMEM Language_Str MSG_G26_HEATING_BED = _UxGT("G26 加熱熱床"); //"G26 Heating Bed" - PROGMEM Language_Str MSG_G26_HEATING_NOZZLE = _UxGT("G26 加熱噴嘴"); //"G26 Heating Nozzle" - PROGMEM Language_Str MSG_G26_MANUAL_PRIME = _UxGT("手動填裝"); //"Manual priming..." - PROGMEM Language_Str MSG_G26_FIXED_LENGTH = _UxGT("固定距離填裝"); //"Fixed Length Prime" - PROGMEM Language_Str MSG_G26_PRIME_DONE = _UxGT("完成填裝"); //"Done Priming" - PROGMEM Language_Str MSG_G26_CANCELED = _UxGT("G26已取消"); //"G26 Canceled" - PROGMEM Language_Str MSG_G26_LEAVING = _UxGT("離開 G26"); //"Leaving G26" - PROGMEM Language_Str MSG_UBL_CONTINUE_MESH = _UxGT("繼續熱床網格"); // "Continue Bed Mesh" - PROGMEM Language_Str MSG_UBL_MESH_LEVELING = _UxGT("網格調平"); // "Mesh Leveling" - PROGMEM Language_Str MSG_UBL_3POINT_MESH_LEVELING = _UxGT("三點調平"); // "3-Point Leveling" - PROGMEM Language_Str MSG_UBL_GRID_MESH_LEVELING = _UxGT("格子網格調平"); // "Grid Mesh Leveling" - PROGMEM Language_Str MSG_UBL_MESH_LEVEL = _UxGT("調平網格"); // "Level Mesh" - PROGMEM Language_Str MSG_UBL_SIDE_POINTS = _UxGT("邊點"); // "Side Points" - PROGMEM Language_Str MSG_UBL_MAP_TYPE = _UxGT("圖類型"); // "Map Type" - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP = _UxGT("輸出網格圖"); // "Output Mesh Map" - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_HOST = _UxGT("輸出到主機"); // "Output for Host" - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_CSV = _UxGT("輸出到CSV"); // "Output for CSV" - PROGMEM Language_Str MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("輸出到備份"); // "Off Printer Backup" - PROGMEM Language_Str MSG_UBL_INFO_UBL = _UxGT("輸出UBL信息"); // "Output UBL Info" - PROGMEM Language_Str MSG_UBL_FILLIN_AMOUNT = _UxGT("填充合計"); // "Fill-in Amount" - PROGMEM Language_Str MSG_UBL_MANUAL_FILLIN = _UxGT("手工填充"); // "Manual Fill-in" - PROGMEM Language_Str MSG_UBL_SMART_FILLIN = _UxGT("聰明填充"); // "Smart Fill-in" - PROGMEM Language_Str MSG_UBL_FILLIN_MESH = _UxGT("填充網格"); // "Fill-in Mesh" - PROGMEM Language_Str MSG_UBL_INVALIDATE_ALL = _UxGT("作廢所有的"); // "Invalidate All" - PROGMEM Language_Str MSG_UBL_INVALIDATE_CLOSEST = _UxGT("作廢最近的"); // "Invalidate Closest" - PROGMEM Language_Str MSG_UBL_FINE_TUNE_ALL = _UxGT("細調所有的"); // "Fine Tune All" - PROGMEM Language_Str MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("細調最近的"); // "Fine Tune Closest" - PROGMEM Language_Str MSG_UBL_STORAGE_MESH_MENU = _UxGT("網格存儲"); // "Mesh Storage" - PROGMEM Language_Str MSG_UBL_STORAGE_SLOT = _UxGT("存儲槽"); // "Memory Slot" - PROGMEM Language_Str MSG_UBL_LOAD_MESH = _UxGT("裝載熱床網格"); // "Load Bed Mesh" - PROGMEM Language_Str MSG_UBL_SAVE_MESH = _UxGT("保存熱床網格"); // "Save Bed Mesh" - PROGMEM Language_Str MSG_MESH_LOADED = _UxGT("網格 %i 已裝載"); // "Mesh %i loaded" - PROGMEM Language_Str MSG_MESH_SAVED = _UxGT("網格 %i 已保存"); // "Mesh %i saved" - PROGMEM Language_Str MSG_UBL_NO_STORAGE = _UxGT("沒有存儲"); // "No storage" - PROGMEM Language_Str MSG_UBL_SAVE_ERROR = _UxGT("錯誤: UBL保存"); // "Err: UBL Save" - PROGMEM Language_Str MSG_UBL_RESTORE_ERROR = _UxGT("錯誤: UBL還原"); // "Err: UBL Restore" - PROGMEM Language_Str MSG_UBL_Z_OFFSET = _UxGT("Z-偏移:"); //"Z-Offset: " - PROGMEM Language_Str MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z偏移已停止"); // "Z-Offset Stopped" - PROGMEM Language_Str MSG_UBL_STEP_BY_STEP_MENU = _UxGT("一步步UBL"); // "Step-By-Step UBL" - PROGMEM Language_Str MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. 創設冷網格"); - PROGMEM Language_Str MSG_UBL_2_SMART_FILLIN = _UxGT("2. 聰明填充"); - PROGMEM Language_Str MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. 批准網格"); - PROGMEM Language_Str MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. 細調所有的"); - PROGMEM Language_Str MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. 批准網格"); - PROGMEM Language_Str MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. 細調所有的"); - PROGMEM Language_Str MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存熱床網格"); + LSTR MSG_UBL_BUILD_COLD_MESH = _UxGT("創設冷網格"); // "Build Cold Mesh" + LSTR MSG_UBL_MESH_HEIGHT_ADJUST = _UxGT("調整網格高度"); // "Adjust Mesh Height" + LSTR MSG_UBL_MESH_HEIGHT_AMOUNT = _UxGT("高度合計"); // "Height Amount" + LSTR MSG_UBL_VALIDATE_MESH_MENU = _UxGT("批准網格"); // "Validate Mesh" + LSTR MSG_UBL_VALIDATE_CUSTOM_MESH = _UxGT("批准客戶網格"); // "Validate Custom Mesh" + LSTR MSG_G26_HEATING_BED = _UxGT("G26 加熱熱床"); // "G26 Heating Bed" + LSTR MSG_G26_HEATING_NOZZLE = _UxGT("G26 加熱噴嘴"); //"G26 Heating Nozzle" + LSTR MSG_G26_MANUAL_PRIME = _UxGT("手動填裝"); // "Manual priming..." + LSTR MSG_G26_FIXED_LENGTH = _UxGT("固定距離填裝"); // "Fixed Length Prime" + LSTR MSG_G26_PRIME_DONE = _UxGT("完成填裝"); // "Done Priming" + LSTR MSG_G26_CANCELED = _UxGT("G26已取消"); // "G26 Canceled" + LSTR MSG_G26_LEAVING = _UxGT("離開 G26"); // "Leaving G26" + LSTR MSG_UBL_CONTINUE_MESH = _UxGT("繼續熱床網格"); // "Continue Bed Mesh" + LSTR MSG_UBL_MESH_LEVELING = _UxGT("網格調平"); // "Mesh Leveling" + LSTR MSG_UBL_3POINT_MESH_LEVELING = _UxGT("三點調平"); // "3-Point Leveling" + LSTR MSG_UBL_GRID_MESH_LEVELING = _UxGT("格子網格調平"); // "Grid Mesh Leveling" + LSTR MSG_UBL_MESH_LEVEL = _UxGT("調平網格"); // "Level Mesh" + LSTR MSG_UBL_SIDE_POINTS = _UxGT("邊點"); // "Side Points" + LSTR MSG_UBL_MAP_TYPE = _UxGT("圖類型"); // "Map Type" + LSTR MSG_UBL_OUTPUT_MAP = _UxGT("輸出網格圖"); // "Output Mesh Map" + LSTR MSG_UBL_OUTPUT_MAP_HOST = _UxGT("輸出到主機"); // "Output for Host" + LSTR MSG_UBL_OUTPUT_MAP_CSV = _UxGT("輸出到CSV"); // "Output for CSV" + LSTR MSG_UBL_OUTPUT_MAP_BACKUP = _UxGT("輸出到備份"); // "Off Printer Backup" + LSTR MSG_UBL_INFO_UBL = _UxGT("輸出UBL信息"); // "Output UBL Info" + LSTR MSG_UBL_FILLIN_AMOUNT = _UxGT("填充合計"); // "Fill-in Amount" + LSTR MSG_UBL_MANUAL_FILLIN = _UxGT("手工填充"); // "Manual Fill-in" + LSTR MSG_UBL_SMART_FILLIN = _UxGT("聰明填充"); // "Smart Fill-in" + LSTR MSG_UBL_FILLIN_MESH = _UxGT("填充網格"); // "Fill-in Mesh" + LSTR MSG_UBL_INVALIDATE_ALL = _UxGT("作廢所有的"); // "Invalidate All" + LSTR MSG_UBL_INVALIDATE_CLOSEST = _UxGT("作廢最近的"); // "Invalidate Closest" + LSTR MSG_UBL_FINE_TUNE_ALL = _UxGT("細調所有的"); // "Fine Tune All" + LSTR MSG_UBL_FINE_TUNE_CLOSEST = _UxGT("細調最近的"); // "Fine Tune Closest" + LSTR MSG_UBL_STORAGE_MESH_MENU = _UxGT("網格存儲"); // "Mesh Storage" + LSTR MSG_UBL_STORAGE_SLOT = _UxGT("存儲槽"); // "Memory Slot" + LSTR MSG_UBL_LOAD_MESH = _UxGT("裝載熱床網格"); // "Load Bed Mesh" + LSTR MSG_UBL_SAVE_MESH = _UxGT("保存熱床網格"); // "Save Bed Mesh" + LSTR MSG_MESH_LOADED = _UxGT("網格 %i 已裝載"); // "Mesh %i loaded" + LSTR MSG_MESH_SAVED = _UxGT("網格 %i 已保存"); // "Mesh %i saved" + LSTR MSG_UBL_NO_STORAGE = _UxGT("沒有存儲"); // "No storage" + LSTR MSG_UBL_SAVE_ERROR = _UxGT("錯誤: UBL保存"); // "Err: UBL Save" + LSTR MSG_UBL_RESTORE_ERROR = _UxGT("錯誤: UBL還原"); // "Err: UBL Restore" + LSTR MSG_UBL_Z_OFFSET = _UxGT("Z-偏移:"); // "Z-Offset: " + LSTR MSG_UBL_Z_OFFSET_STOPPED = _UxGT("Z偏移已停止"); // "Z-Offset Stopped" + LSTR MSG_UBL_STEP_BY_STEP_MENU = _UxGT("一步步UBL"); // "Step-By-Step UBL" + LSTR MSG_UBL_1_BUILD_COLD_MESH = _UxGT("1. 創設冷網格"); + LSTR MSG_UBL_2_SMART_FILLIN = _UxGT("2. 聰明填充"); + LSTR MSG_UBL_3_VALIDATE_MESH_MENU = _UxGT("3. 批准網格"); + LSTR MSG_UBL_4_FINE_TUNE_ALL = _UxGT("4. 細調所有的"); + LSTR MSG_UBL_5_VALIDATE_MESH_MENU = _UxGT("5. 批准網格"); + LSTR MSG_UBL_6_FINE_TUNE_ALL = _UxGT("6. 細調所有的"); + LSTR MSG_UBL_7_SAVE_MESH = _UxGT("7. 保存熱床網格"); - PROGMEM Language_Str MSG_LED_CONTROL = _UxGT("燈管控制"); // "LED Control") - PROGMEM Language_Str MSG_LEDS = _UxGT("燈"); // "Lights") - PROGMEM Language_Str MSG_LED_PRESETS = _UxGT("燈預置"); // "Light Presets") - PROGMEM Language_Str MSG_SET_LEDS_RED = _UxGT("红"); // "Red") - PROGMEM Language_Str MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange") - PROGMEM Language_Str MSG_SET_LEDS_YELLOW = _UxGT("黃"); // "Yellow") - PROGMEM Language_Str MSG_SET_LEDS_GREEN = _UxGT("綠"); // "Green") - PROGMEM Language_Str MSG_SET_LEDS_BLUE = _UxGT("藍"); // "Blue") - PROGMEM Language_Str MSG_SET_LEDS_INDIGO = _UxGT("青"); // "Indigo") - PROGMEM Language_Str MSG_SET_LEDS_VIOLET = _UxGT("紫"); // "Violet") - PROGMEM Language_Str MSG_SET_LEDS_WHITE = _UxGT("白"); // "White") - PROGMEM Language_Str MSG_SET_LEDS_DEFAULT = _UxGT("復歸"); // "Default") - PROGMEM Language_Str MSG_CUSTOM_LEDS = _UxGT("定制燈"); // "Custom Lights") - PROGMEM Language_Str MSG_INTENSITY_R = _UxGT("紅飽和度"); // "Red Intensity") - PROGMEM Language_Str MSG_INTENSITY_G = _UxGT("綠飽和度"); // "Green Intensity") - PROGMEM Language_Str MSG_INTENSITY_B = _UxGT("藍飽和度"); // "Blue Intensity") - PROGMEM Language_Str MSG_INTENSITY_W = _UxGT("白飽和度"); // "White Intensity") - PROGMEM Language_Str MSG_LED_BRIGHTNESS = _UxGT("亮度"); // "Brightness") + LSTR MSG_LED_CONTROL = _UxGT("燈管控制"); // "LED Control") + LSTR MSG_LEDS = _UxGT("燈"); // "Lights") + LSTR MSG_LED_PRESETS = _UxGT("燈預置"); // "Light Presets") + LSTR MSG_SET_LEDS_RED = _UxGT("红"); // "Red") + LSTR MSG_SET_LEDS_ORANGE = _UxGT("橙"); // "Orange") + LSTR MSG_SET_LEDS_YELLOW = _UxGT("黃"); // "Yellow") + LSTR MSG_SET_LEDS_GREEN = _UxGT("綠"); // "Green") + LSTR MSG_SET_LEDS_BLUE = _UxGT("藍"); // "Blue") + LSTR MSG_SET_LEDS_INDIGO = _UxGT("青"); // "Indigo") + LSTR MSG_SET_LEDS_VIOLET = _UxGT("紫"); // "Violet") + LSTR MSG_SET_LEDS_WHITE = _UxGT("白"); // "White") + LSTR MSG_SET_LEDS_DEFAULT = _UxGT("復歸"); // "Default") + LSTR MSG_CUSTOM_LEDS = _UxGT("定制燈"); // "Custom Lights") + LSTR MSG_INTENSITY_R = _UxGT("紅飽和度"); // "Red Intensity") + LSTR MSG_INTENSITY_G = _UxGT("綠飽和度"); // "Green Intensity") + LSTR MSG_INTENSITY_B = _UxGT("藍飽和度"); // "Blue Intensity") + LSTR MSG_INTENSITY_W = _UxGT("白飽和度"); // "White Intensity") + LSTR MSG_LED_BRIGHTNESS = _UxGT("亮度"); // "Brightness") - PROGMEM Language_Str MSG_MOVING = _UxGT("移動 ..."); // "Moving...") - PROGMEM Language_Str MSG_FREE_XY = _UxGT("釋放 XY"); // "Free XY") - PROGMEM Language_Str MSG_MOVE_X = _UxGT("移動X"); //"Move X" - PROGMEM Language_Str MSG_MOVE_Y = _UxGT("移動Y"); //"Move Y" - PROGMEM Language_Str MSG_MOVE_Z = _UxGT("移動Z"); //"Move Z" - PROGMEM Language_Str MSG_MOVE_E = _UxGT("擠出機"); //"Extruder" - PROGMEM Language_Str MSG_MOVE_EN = _UxGT("擠出機 *"); //"Extruder *" - PROGMEM Language_Str MSG_HOTEND_TOO_COLD = _UxGT("噴嘴溫度不夠"); //"Hotend too cold" - PROGMEM Language_Str MSG_MOVE_N_MM = _UxGT("移動 %s mm"); //"Move 0.025mm" - PROGMEM Language_Str MSG_MOVE_01MM = _UxGT("移動 0.1 mm"); //"Move 0.1mm" - PROGMEM Language_Str MSG_MOVE_1MM = _UxGT("移動 1 mm"); //"Move 1mm" - PROGMEM Language_Str MSG_MOVE_10MM = _UxGT("移動 10 mm"); //"Move 10mm" - PROGMEM Language_Str MSG_SPEED = _UxGT("速率"); //"Speed" - PROGMEM Language_Str MSG_BED_Z = _UxGT("熱床Z"); //"Bed Z" - PROGMEM Language_Str MSG_NOZZLE = " " LCD_STR_THERMOMETER _UxGT(" 噴嘴"); //"Nozzle" 噴嘴 - PROGMEM Language_Str MSG_NOZZLE_N = " " LCD_STR_THERMOMETER _UxGT(" 噴嘴 ~"); - PROGMEM Language_Str MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" 熱床"); //"Bed" - PROGMEM Language_Str MSG_CHAMBER = _UxGT("Enclosure"); - PROGMEM Language_Str MSG_FAN_SPEED = _UxGT("風扇速率"); //"Fan speed" - PROGMEM Language_Str MSG_FAN_SPEED_N = _UxGT("風扇速率 ="); - PROGMEM Language_Str MSG_STORED_FAN_N = _UxGT("Stored Fan ="); - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED = _UxGT("額外風扇速率"); // "Extra fan speed" - PROGMEM Language_Str MSG_EXTRA_FAN_SPEED_N = _UxGT("額外風扇速率 ="); - PROGMEM Language_Str MSG_FLOW = _UxGT("擠出速率"); - PROGMEM Language_Str MSG_FLOW_N = _UxGT("擠出速率 ~"); //"Flow" - PROGMEM Language_Str MSG_CONTROL = _UxGT("控制"); //"Control" - PROGMEM Language_Str MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" 最小"); //" " LCD_STR_THERMOMETER " Min" - PROGMEM Language_Str MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" 最大"); //" " LCD_STR_THERMOMETER " Max" - PROGMEM Language_Str MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" 系數"); //" " LCD_STR_THERMOMETER " Fact" - PROGMEM Language_Str MSG_AUTOTEMP = _UxGT("自動控溫"); //"Autotemp" - PROGMEM Language_Str MSG_LCD_ON = _UxGT("開 "); //"On" - PROGMEM Language_Str MSG_LCD_OFF = _UxGT("關 "); //"Off" + LSTR MSG_MOVING = _UxGT("移動 ..."); // "Moving...") + LSTR MSG_FREE_XY = _UxGT("釋放 XY"); // "Free XY") + LSTR MSG_MOVE_X = _UxGT("移動X"); // "Move X" + LSTR MSG_MOVE_Y = _UxGT("移動Y"); // "Move Y" + LSTR MSG_MOVE_Z = _UxGT("移動Z"); // "Move Z" + LSTR MSG_MOVE_E = _UxGT("擠出機"); // "Extruder" + LSTR MSG_MOVE_EN = _UxGT("擠出機 *"); // "Extruder *" + LSTR MSG_HOTEND_TOO_COLD = _UxGT("噴嘴溫度不夠"); // "Hotend too cold" + LSTR MSG_MOVE_N_MM = _UxGT("移動 %s mm"); // "Move 0.025mm" + LSTR MSG_MOVE_01MM = _UxGT("移動 0.1 mm"); // "Move 0.1mm" + LSTR MSG_MOVE_1MM = _UxGT("移動 1 mm"); // "Move 1mm" + LSTR MSG_MOVE_10MM = _UxGT("移動 10 mm"); // "Move 10mm" + LSTR MSG_MOVE_100MM = _UxGT("移動 100 mm"); // "Move 100mm" + LSTR MSG_SPEED = _UxGT("速率"); // "Speed" + LSTR MSG_BED_Z = _UxGT("熱床Z"); // "Bed Z" + LSTR MSG_NOZZLE = " " LCD_STR_THERMOMETER _UxGT(" 噴嘴"); // "Nozzle" 噴嘴 + LSTR MSG_NOZZLE_N = " " LCD_STR_THERMOMETER _UxGT(" 噴嘴 ~"); + LSTR MSG_BED = " " LCD_STR_THERMOMETER _UxGT(" 熱床"); // "Bed" + LSTR MSG_CHAMBER = _UxGT("Enclosure"); + LSTR MSG_FAN_SPEED = _UxGT("風扇速率"); // "Fan speed" + LSTR MSG_FAN_SPEED_N = _UxGT("風扇速率 ="); + LSTR MSG_STORED_FAN_N = _UxGT("Stored Fan ="); + LSTR MSG_EXTRA_FAN_SPEED = _UxGT("額外風扇速率"); // "Extra fan speed" + LSTR MSG_EXTRA_FAN_SPEED_N = _UxGT("額外風扇速率 ="); + LSTR MSG_FLOW = _UxGT("擠出速率"); + LSTR MSG_FLOW_N = _UxGT("擠出速率 ~"); // "Flow" + LSTR MSG_CONTROL = _UxGT("控制"); // "Control" + LSTR MSG_MIN = " " LCD_STR_THERMOMETER _UxGT(" 最小"); // " " LCD_STR_THERMOMETER " Min" + LSTR MSG_MAX = " " LCD_STR_THERMOMETER _UxGT(" 最大"); // " " LCD_STR_THERMOMETER " Max" + LSTR MSG_FACTOR = " " LCD_STR_THERMOMETER _UxGT(" 系數"); // " " LCD_STR_THERMOMETER " Fact" + LSTR MSG_AUTOTEMP = _UxGT("自動控溫"); // "Autotemp" + LSTR MSG_LCD_ON = _UxGT("開 "); // "On" + LSTR MSG_LCD_OFF = _UxGT("關 "); // "Off" - PROGMEM Language_Str MSG_SELECT = _UxGT("選擇"); //"Select" - PROGMEM Language_Str MSG_SELECT_E = _UxGT("選擇 *"); - PROGMEM Language_Str MSG_ACC = _UxGT("加速度"); //"Accel" acceleration - PROGMEM Language_Str MSG_JERK = _UxGT("抖動速率"); //"Jerk" - PROGMEM Language_Str MSG_VA_JERK = _UxGT("軸抖動速率") LCD_STR_A; //"Va-jerk" - PROGMEM Language_Str MSG_VB_JERK = _UxGT("軸抖動速率") LCD_STR_B; //"Vb-jerk" - PROGMEM Language_Str MSG_VC_JERK = _UxGT("軸抖動速率") LCD_STR_C; //"Vc-jerk" - PROGMEM Language_Str MSG_VE_JERK = _UxGT("擠出機抖動速率"); //"Ve-jerk" + LSTR MSG_SELECT = _UxGT("選擇"); // "Select" + LSTR MSG_SELECT_E = _UxGT("選擇 *"); + LSTR MSG_ACC = _UxGT("加速度"); // "Accel" acceleration + LSTR MSG_JERK = _UxGT("抖動速率"); // "Jerk" + LSTR MSG_VA_JERK = _UxGT("軸抖動速率") LCD_STR_A; // "Va-jerk" + LSTR MSG_VB_JERK = _UxGT("軸抖動速率") LCD_STR_B; + LSTR MSG_VC_JERK = _UxGT("軸抖動速率") LCD_STR_C; + LSTR MSG_VI_JERK = _UxGT("軸抖動速率") LCD_STR_I; + LSTR MSG_VJ_JERK = _UxGT("軸抖動速率") LCD_STR_J; + LSTR MSG_VK_JERK = _UxGT("軸抖動速率") LCD_STR_K; + LSTR MSG_VE_JERK = _UxGT("擠出機抖動速率"); - PROGMEM Language_Str MSG_VELOCITY = _UxGT("速度"); // "Velocity" - PROGMEM Language_Str MSG_VMAX_A = _UxGT("最大進料速率") LCD_STR_A; //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMAX_B = _UxGT("最大進料速率") LCD_STR_B; - PROGMEM Language_Str MSG_VMAX_C = _UxGT("最大進料速率") LCD_STR_C; - PROGMEM Language_Str MSG_VMAX_E = _UxGT("最大進料速率") LCD_STR_E; - PROGMEM Language_Str MSG_VMAX_EN = _UxGT("最大進料速率 *"); //"Vmax " max_feedrate_mm_s - PROGMEM Language_Str MSG_VMIN = _UxGT("最小進料速率"); //"Vmin" min_feedrate_mm_s - PROGMEM Language_Str MSG_VTRAV_MIN = _UxGT("最小移動速率"); //"VTrav min" min_travel_feedrate_mm_s, (target) speed of the move - PROGMEM Language_Str MSG_ACCELERATION = _UxGT("加速度"); // "Acceleration" - PROGMEM Language_Str MSG_AMAX_A = _UxGT("最大列印加速度") LCD_STR_A; //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_AMAX_B = _UxGT("最大列印加速度") LCD_STR_B; - PROGMEM Language_Str MSG_AMAX_C = _UxGT("最大列印加速度") LCD_STR_C; - PROGMEM Language_Str MSG_AMAX_E = _UxGT("最大列印加速度") LCD_STR_E; - PROGMEM Language_Str MSG_AMAX_EN = _UxGT("最大列印加速度 *"); //"Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves - PROGMEM Language_Str MSG_A_RETRACT = _UxGT("回縮加速度"); //"A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts - PROGMEM Language_Str MSG_A_TRAVEL = _UxGT("非列印移動加速度"); //"A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves - PROGMEM Language_Str MSG_STEPS_PER_MM = _UxGT("軸步數/mm"); //"Steps/mm" axis_steps_per_mm, axis steps-per-unit G92 - PROGMEM Language_Str MSG_A_STEPS = LCD_STR_A _UxGT("軸步數/mm"); //"Asteps/mm" axis_steps_per_mm, axis steps-per-unit G92 - PROGMEM Language_Str MSG_B_STEPS = LCD_STR_B _UxGT("軸步數/mm"); - PROGMEM Language_Str MSG_C_STEPS = LCD_STR_C _UxGT("軸步數/mm"); - PROGMEM Language_Str MSG_E_STEPS = _UxGT("擠出機步數/mm"); //"Esteps/mm" - PROGMEM Language_Str MSG_EN_STEPS = _UxGT("擠出機~步數/mm"); - PROGMEM Language_Str MSG_TEMPERATURE = _UxGT("溫度"); //"Temperature" - PROGMEM Language_Str MSG_MOTION = _UxGT("運作"); //"Motion" - PROGMEM Language_Str MSG_FILAMENT = _UxGT("絲料測容"); //"Filament" menu_control_volumetric - PROGMEM Language_Str MSG_VOLUMETRIC_ENABLED = _UxGT("測容積mm") SUPERSCRIPT_THREE; //"E in mm3" volumetric_enabled - PROGMEM Language_Str MSG_FILAMENT_DIAM = _UxGT("絲料直徑"); //"Fil. Dia." - PROGMEM Language_Str MSG_FILAMENT_DIAM_E = _UxGT("絲料直徑 *"); - PROGMEM Language_Str MSG_FILAMENT_UNLOAD = _UxGT("卸載 mm"); // "Unload mm" - PROGMEM Language_Str MSG_FILAMENT_LOAD = _UxGT("装載 mm"); // "Load mm" - PROGMEM Language_Str MSG_ADVANCE_K = _UxGT("Advance K"); - PROGMEM Language_Str MSG_ADVANCE_K_E = _UxGT("Advance K *"); - PROGMEM Language_Str MSG_CONTRAST = _UxGT("LCD對比度"); //"LCD contrast" - PROGMEM Language_Str MSG_STORE_EEPROM = _UxGT("保存設置"); //"Store memory" - PROGMEM Language_Str MSG_LOAD_EEPROM = _UxGT("載入設置"); //"Load memory" - PROGMEM Language_Str MSG_RESTORE_DEFAULTS = _UxGT("恢復安全值"); //"Restore failsafe" - PROGMEM Language_Str MSG_INIT_EEPROM = _UxGT("初始化設置"); // "Initialize EEPROM" - PROGMEM Language_Str MSG_ERR_EEPROM_CRC = _UxGT("錯誤: EEPROM CRC"); //"Err: EEPROM CRC" - PROGMEM Language_Str MSG_ERR_EEPROM_INDEX = _UxGT("錯誤: EEPROM Index"); //"Err: EEPROM Index" - PROGMEM Language_Str MSG_ERR_EEPROM_VERSION = _UxGT("錯誤: EEPROM Version"); //"EEPROM Version" - PROGMEM Language_Str MSG_MEDIA_UPDATE = _UxGT("媒體更新"); //"Media Update" - PROGMEM Language_Str MSG_RESET_PRINTER = _UxGT("重置打印機"); //"Reset Printer - PROGMEM Language_Str MSG_REFRESH = _UxGT("刷新"); //"Refresh" - PROGMEM Language_Str MSG_INFO_SCREEN = _UxGT("資訊界面"); //"Info screen" - PROGMEM Language_Str MSG_PREPARE = _UxGT("準備"); //"Prepare" - PROGMEM Language_Str MSG_TUNE = _UxGT("調整"); //"Tune" - PROGMEM Language_Str MSG_START_PRINT = _UxGT("開始列印"); //"Start Print" - PROGMEM Language_Str MSG_BUTTON_NEXT = _UxGT("下一個"); //"Next" - PROGMEM Language_Str MSG_BUTTON_INIT = _UxGT("初始 "); //"Init" - PROGMEM Language_Str MSG_BUTTON_STOP = _UxGT("停止 "); //"Stop" - PROGMEM Language_Str MSG_BUTTON_PRINT = _UxGT("列印 "); //"Print" - PROGMEM Language_Str MSG_BUTTON_RESET = _UxGT("復歸 "); //"Reset" - PROGMEM Language_Str MSG_BUTTON_CANCEL = _UxGT("放棄 "); //"Cancel" - PROGMEM Language_Str MSG_BUTTON_DONE = _UxGT("確認 "); //"Done" - PROGMEM Language_Str MSG_BUTTON_BACK = _UxGT("返回 "); //"Back" - PROGMEM Language_Str MSG_BUTTON_PROCEED = _UxGT("繼續 "); //"Proceed" - PROGMEM Language_Str MSG_PAUSE_PRINT = _UxGT("暫停列印"); //"Pause print" - PROGMEM Language_Str MSG_RESUME_PRINT = _UxGT("恢復列印"); //"Resume print" - PROGMEM Language_Str MSG_STOP_PRINT = _UxGT("停止列印"); //"Stop print" - PROGMEM Language_Str MSG_PRINTING_OBJECT = _UxGT("列印物件"); //"Printing Object" - PROGMEM Language_Str MSG_CANCEL_OBJECT = _UxGT("中止物件"); //"Cancel Object" - PROGMEM Language_Str MSG_CANCEL_OBJECT_N = _UxGT("中止物件 ="); //"Cancel Object =" - PROGMEM Language_Str MSG_OUTAGE_RECOVERY = _UxGT("中斷恢復"); //"Outage Recovery" - PROGMEM Language_Str MSG_MEDIA_MENU = _UxGT("從記憶卡上列印"); //"Print from SD" - PROGMEM Language_Str MSG_NO_MEDIA = _UxGT("無記憶卡"); //"No SD card" - PROGMEM Language_Str MSG_DWELL = _UxGT("休眠 ..."); //"Sleep..." - PROGMEM Language_Str MSG_USERWAIT = _UxGT("點擊繼續 ..."); //"Click to resume..." - PROGMEM Language_Str MSG_PRINT_PAUSED = _UxGT("列印已暫停"); // "Print paused" - PROGMEM Language_Str MSG_PRINTING = _UxGT("列印中 ..."); //"Printing..." - PROGMEM Language_Str MSG_PRINT_ABORTED = _UxGT("已取消列印"); //"Print aborted" - PROGMEM Language_Str MSG_NO_MOVE = _UxGT("無移動"); //"No move." - PROGMEM Language_Str MSG_KILLED = _UxGT("已砍掉"); //"KILLED. " - PROGMEM Language_Str MSG_STOPPED = _UxGT("已停止"); //"STOPPED. " - PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("回縮長度mm"); //"Retract mm" retract_length, retract length (positive mm) - PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("換手回抽長度mm"); //"Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change - PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("回縮速率mm/s"); //"Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) - PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); //"Hop mm" retract_zraise, retract Z-lift - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER = _UxGT("回縮恢復長度mm"); //"UnRet +mm" retract_recover_extra, additional recover length (mm, added to retract length when recovering) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("換手回縮恢復長度mm"); //"S UnRet+mm" swap_retract_recover_extra, additional swap recover length (mm, added to retract length when recovering from extruder change) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVERF = _UxGT("回縮恢復後進料速率mm/s"); //"Unretract V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) - PROGMEM Language_Str MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); // "S UnRet V" - PROGMEM Language_Str MSG_AUTORETRACT = _UxGT("自動回縮"); //"Auto-Retract" autoretract_enabled, - PROGMEM Language_Str MSG_FILAMENT_SWAP_LENGTH = _UxGT("交換長度"); //"Swap Length" - PROGMEM Language_Str MSG_FILAMENT_PURGE_LENGTH = _UxGT("清除長度"); //"Purge Length" - PROGMEM Language_Str MSG_TOOL_CHANGE = _UxGT("交換工具"); //"Tool Change" - PROGMEM Language_Str MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z軸提昇"); //"Z Raise" - PROGMEM Language_Str MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("最高速度"); //"Prime Speed" - PROGMEM Language_Str MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("收回速度"); //"Retract Speed" - PROGMEM Language_Str MSG_NOZZLE_STANDBY = _UxGT("噴嘴待機"); //"Nozzle Standby" - PROGMEM Language_Str MSG_FILAMENTCHANGE = _UxGT("更換絲料"); //"Change filament" - PROGMEM Language_Str MSG_FILAMENTCHANGE_E = _UxGT("更換絲料 *"); - PROGMEM Language_Str MSG_FILAMENTLOAD = _UxGT("裝載絲料"); // "Load filament" - PROGMEM Language_Str MSG_FILAMENTLOAD_E = _UxGT("裝載絲料 *"); - PROGMEM Language_Str MSG_FILAMENTUNLOAD = _UxGT("卸載絲料"); // "Unload filament" - PROGMEM Language_Str MSG_FILAMENTUNLOAD_E = _UxGT("卸載絲料 *"); // "Unload filament" - PROGMEM Language_Str MSG_FILAMENTUNLOAD_ALL = _UxGT("卸載全部"); // "Unload All" - PROGMEM Language_Str MSG_INIT_MEDIA = _UxGT("初始化記憶卡"); //"Init. SD card" - PROGMEM Language_Str MSG_ATTACH_MEDIA = _UxGT("連接記憶卡"); //"Attach Media - PROGMEM Language_Str MSG_CHANGE_MEDIA = _UxGT("更換記憶卡"); //"Change SD card" - PROGMEM Language_Str MSG_RELEASE_MEDIA = _UxGT("釋放媒體"); //"Release Media" - PROGMEM Language_Str MSG_ZPROBE_OUT = _UxGT("Z探針在熱床之外"); //"Z probe out. bed" Z probe is not within the physical limits - PROGMEM Language_Str MSG_SKEW_FACTOR = _UxGT("偏斜因數"); // "Skew Factor" + LSTR MSG_VELOCITY = _UxGT("速度"); // "Velocity" + LSTR MSG_VMAX_A = _UxGT("最大進料速率") LCD_STR_A; // "Vmax " max_feedrate_mm_s + LSTR MSG_VMAX_B = _UxGT("最大進料速率") LCD_STR_B; + LSTR MSG_VMAX_C = _UxGT("最大進料速率") LCD_STR_C; + LSTR MSG_VMAX_I = _UxGT("最大進料速率") LCD_STR_I; + LSTR MSG_VMAX_J = _UxGT("最大進料速率") LCD_STR_J; + LSTR MSG_VMAX_K = _UxGT("最大進料速率") LCD_STR_K; + LSTR MSG_VMAX_E = _UxGT("最大進料速率") LCD_STR_E; + LSTR MSG_VMAX_EN = _UxGT("最大進料速率 *"); // "Vmax " max_feedrate_mm_s + LSTR MSG_VMIN = _UxGT("最小進料速率"); // "Vmin" min_feedrate_mm_s + LSTR MSG_VTRAV_MIN = _UxGT("最小移動速率"); // "VTrav min" min_travel_feedrate_mm_s, (target) speed of the move + LSTR MSG_ACCELERATION = _UxGT("加速度"); // "Acceleration" + LSTR MSG_AMAX_A = _UxGT("最大列印加速度") LCD_STR_A; // "Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves + LSTR MSG_AMAX_B = _UxGT("最大列印加速度") LCD_STR_B; + LSTR MSG_AMAX_C = _UxGT("最大列印加速度") LCD_STR_C; + LSTR MSG_AMAX_I = _UxGT("最大列印加速度") LCD_STR_I; + LSTR MSG_AMAX_J = _UxGT("最大列印加速度") LCD_STR_J; + LSTR MSG_AMAX_K = _UxGT("最大列印加速度") LCD_STR_K; + LSTR MSG_AMAX_E = _UxGT("最大列印加速度") LCD_STR_E; + LSTR MSG_AMAX_EN = _UxGT("最大列印加速度 *"); // "Amax " max_acceleration_mm_per_s2, acceleration in units/s^2 for print moves + LSTR MSG_A_RETRACT = _UxGT("回縮加速度"); // "A-retract" retract_acceleration, E acceleration in mm/s^2 for retracts + LSTR MSG_A_TRAVEL = _UxGT("非列印移動加速度"); // "A-travel" travel_acceleration, X, Y, Z acceleration in mm/s^2 for travel (non printing) moves + LSTR MSG_STEPS_PER_MM = _UxGT("軸步數/mm"); // "Steps/mm" axis_steps_per_mm, axis steps-per-unit G92 + LSTR MSG_A_STEPS = LCD_STR_A _UxGT(" 軸步數/mm"); // "Asteps/mm" axis_steps_per_mm, axis steps-per-unit G92 + LSTR MSG_B_STEPS = LCD_STR_B _UxGT(" 軸步數/mm"); + LSTR MSG_C_STEPS = LCD_STR_C _UxGT(" 軸步數/mm"); + LSTR MSG_I_STEPS = LCD_STR_I _UxGT(" 軸步數/mm"); + LSTR MSG_J_STEPS = LCD_STR_J _UxGT(" 軸步數/mm"); + LSTR MSG_K_STEPS = LCD_STR_K _UxGT(" 軸步數/mm"); + LSTR MSG_E_STEPS = _UxGT("擠出機步數/mm"); // "Esteps/mm" + LSTR MSG_EN_STEPS = _UxGT("擠出機~步數/mm"); + LSTR MSG_TEMPERATURE = _UxGT("溫度"); // "Temperature" + LSTR MSG_MOTION = _UxGT("運作"); // "Motion" + LSTR MSG_FILAMENT = _UxGT("絲料測容"); // "Filament" menu_control_volumetric + LSTR MSG_VOLUMETRIC_ENABLED = _UxGT("測容積mm") SUPERSCRIPT_THREE; // "E in mm3" volumetric_enabled + LSTR MSG_FILAMENT_DIAM = _UxGT("絲料直徑"); // "Fil. Dia." + LSTR MSG_FILAMENT_DIAM_E = _UxGT("絲料直徑 *"); + LSTR MSG_FILAMENT_UNLOAD = _UxGT("卸載 mm"); // "Unload mm" + LSTR MSG_FILAMENT_LOAD = _UxGT("装載 mm"); // "Load mm" + LSTR MSG_ADVANCE_K = _UxGT("Advance K"); + LSTR MSG_ADVANCE_K_E = _UxGT("Advance K *"); + LSTR MSG_CONTRAST = _UxGT("LCD對比度"); // "LCD contrast" + LSTR MSG_STORE_EEPROM = _UxGT("保存設置"); // "Store memory" + LSTR MSG_LOAD_EEPROM = _UxGT("載入設置"); // "Load memory" + LSTR MSG_RESTORE_DEFAULTS = _UxGT("恢復安全值"); // "Restore failsafe" + LSTR MSG_INIT_EEPROM = _UxGT("初始化設置"); // "Initialize EEPROM" + LSTR MSG_ERR_EEPROM_CRC = _UxGT("錯誤: EEPROM CRC"); // "Err: EEPROM CRC" + LSTR MSG_ERR_EEPROM_INDEX = _UxGT("錯誤: EEPROM Index"); // "Err: EEPROM Index" + LSTR MSG_ERR_EEPROM_VERSION = _UxGT("錯誤: EEPROM Version"); // "EEPROM Version" + LSTR MSG_MEDIA_UPDATE = _UxGT("媒體更新"); // "Media Update" + LSTR MSG_RESET_PRINTER = _UxGT("重置打印機"); // "Reset Printer + LSTR MSG_REFRESH = _UxGT("刷新"); // "Refresh" + LSTR MSG_INFO_SCREEN = _UxGT("資訊界面"); // "Info screen" + LSTR MSG_PREPARE = _UxGT("準備"); // "Prepare" + LSTR MSG_TUNE = _UxGT("調整"); // "Tune" + LSTR MSG_START_PRINT = _UxGT("開始列印"); // "Start Print" + LSTR MSG_BUTTON_NEXT = _UxGT("下一個"); // "Next" + LSTR MSG_BUTTON_INIT = _UxGT("初始 "); // "Init" + LSTR MSG_BUTTON_STOP = _UxGT("停止 "); // "Stop" + LSTR MSG_BUTTON_PRINT = _UxGT("列印 "); // "Print" + LSTR MSG_BUTTON_RESET = _UxGT("復歸 "); // "Reset" + LSTR MSG_BUTTON_CANCEL = _UxGT("放棄 "); // "Cancel" + LSTR MSG_BUTTON_DONE = _UxGT("確認 "); // "Done" + LSTR MSG_BUTTON_BACK = _UxGT("返回 "); // "Back" + LSTR MSG_BUTTON_PROCEED = _UxGT("繼續 "); // "Proceed" + LSTR MSG_PAUSE_PRINT = _UxGT("暫停列印"); // "Pause print" + LSTR MSG_RESUME_PRINT = _UxGT("恢復列印"); // "Resume print" + LSTR MSG_STOP_PRINT = _UxGT("停止列印"); // "Stop print" + LSTR MSG_PRINTING_OBJECT = _UxGT("列印物件"); // "Printing Object" + LSTR MSG_CANCEL_OBJECT = _UxGT("中止物件"); // "Cancel Object" + LSTR MSG_CANCEL_OBJECT_N = _UxGT("中止物件 ="); // "Cancel Object =" + LSTR MSG_OUTAGE_RECOVERY = _UxGT("中斷恢復"); // "Outage Recovery" + LSTR MSG_MEDIA_MENU = _UxGT("從記憶卡上列印"); // "Print from SD" + LSTR MSG_NO_MEDIA = _UxGT("無記憶卡"); // "No SD card" + LSTR MSG_DWELL = _UxGT("休眠 ..."); // "Sleep..." + LSTR MSG_USERWAIT = _UxGT("點擊繼續 ..."); // "Click to resume..." + LSTR MSG_PRINT_PAUSED = _UxGT("列印已暫停"); // "Print paused" + LSTR MSG_PRINTING = _UxGT("列印中 ..."); // "Printing..." + LSTR MSG_PRINT_ABORTED = _UxGT("已取消列印"); // "Print aborted" + LSTR MSG_NO_MOVE = _UxGT("無移動"); // "No move." + LSTR MSG_KILLED = _UxGT("已砍掉"); // "KILLED. " + LSTR MSG_STOPPED = _UxGT("已停止"); // "STOPPED. " + LSTR MSG_CONTROL_RETRACT = _UxGT("回縮長度mm"); // "Retract mm" retract_length, retract length (positive mm) + LSTR MSG_CONTROL_RETRACT_SWAP = _UxGT("換手回抽長度mm"); // "Swap Re.mm" swap_retract_length, swap retract length (positive mm), for extruder change + LSTR MSG_CONTROL_RETRACTF = _UxGT("回縮速率mm/s"); // "Retract V" retract_feedrate_mm_s, feedrate for retracting (mm/s) + LSTR MSG_CONTROL_RETRACT_ZHOP = _UxGT("Hop mm"); // "Hop mm" retract_zraise, retract Z-lift + LSTR MSG_CONTROL_RETRACT_RECOVER = _UxGT("回縮恢復長度mm"); // "UnRet +mm" retract_recover_extra, additional recover length (mm, added to retract length when recovering) + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAP = _UxGT("換手回縮恢復長度mm"); // "S UnRet+mm" swap_retract_recover_extra, additional swap recover length (mm, added to retract length when recovering from extruder change) + LSTR MSG_CONTROL_RETRACT_RECOVERF = _UxGT("回縮恢復後進料速率mm/s"); // "Unretract V" retract_recover_feedrate_mm_s, feedrate for recovering from retraction (mm/s) + LSTR MSG_CONTROL_RETRACT_RECOVER_SWAPF = _UxGT("S UnRet V"); // "S UnRet V" + LSTR MSG_AUTORETRACT = _UxGT("自動回縮"); // "Auto-Retract" autoretract_enabled, + LSTR MSG_FILAMENT_SWAP_LENGTH = _UxGT("交換長度"); // "Swap Length" + LSTR MSG_FILAMENT_PURGE_LENGTH = _UxGT("清除長度"); // "Purge Length" + LSTR MSG_TOOL_CHANGE = _UxGT("交換工具"); //"Tool Change" + LSTR MSG_TOOL_CHANGE_ZLIFT = _UxGT("Z軸提昇"); // "Z Raise" + LSTR MSG_SINGLENOZZLE_PRIME_SPEED = _UxGT("最高速度"); // "Prime Speed" + LSTR MSG_SINGLENOZZLE_RETRACT_SPEED = _UxGT("收回速度"); // "Retract Speed" + LSTR MSG_NOZZLE_STANDBY = _UxGT("噴嘴待機"); //"Nozzle Standby" + LSTR MSG_FILAMENTCHANGE = _UxGT("更換絲料"); // "Change filament" + LSTR MSG_FILAMENTCHANGE_E = _UxGT("更換絲料 *"); + LSTR MSG_FILAMENTLOAD = _UxGT("裝載絲料"); // "Load filament" + LSTR MSG_FILAMENTLOAD_E = _UxGT("裝載絲料 *"); + LSTR MSG_FILAMENTUNLOAD = _UxGT("卸載絲料"); // "Unload filament" + LSTR MSG_FILAMENTUNLOAD_E = _UxGT("卸載絲料 *"); // "Unload filament" + LSTR MSG_FILAMENTUNLOAD_ALL = _UxGT("卸載全部"); // "Unload All" + LSTR MSG_INIT_MEDIA = _UxGT("初始化記憶卡"); // "Init. SD card" + LSTR MSG_ATTACH_MEDIA = _UxGT("連接記憶卡"); // "Attach Media + LSTR MSG_CHANGE_MEDIA = _UxGT("更換記憶卡"); // "Change SD card" + LSTR MSG_RELEASE_MEDIA = _UxGT("釋放媒體"); // "Release Media" + LSTR MSG_ZPROBE_OUT = _UxGT("Z探針在熱床之外"); // "Z probe out. bed" Z probe is not within the physical limits + LSTR MSG_SKEW_FACTOR = _UxGT("偏斜因數"); // "Skew Factor" - PROGMEM Language_Str MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch 自檢"); // "BLTouch Self-Test" - PROGMEM Language_Str MSG_BLTOUCH_RESET = _UxGT("重置BLTouch"); // "Reset BLTouch" - PROGMEM Language_Str MSG_BLTOUCH_STOW = _UxGT("裝載BLTouch"); // "Stow BLTouch" - PROGMEM Language_Str MSG_BLTOUCH_DEPLOY = _UxGT("部署BLTouch"); // "Deploy BLTouch" + LSTR MSG_BLTOUCH_SELFTEST = _UxGT("BLTouch 自檢"); // "BLTouch Self-Test" + LSTR MSG_BLTOUCH_RESET = _UxGT("重置BLTouch"); // "Reset BLTouch" + LSTR MSG_BLTOUCH_STOW = _UxGT("裝載BLTouch"); // "Stow BLTouch" + LSTR MSG_BLTOUCH_DEPLOY = _UxGT("部署BLTouch"); // "Deploy BLTouch" - PROGMEM Language_Str MSG_HOME_FIRST = _UxGT("歸位 %s%s%s 先"); //"Home ... first" - PROGMEM Language_Str MSG_ZPROBE_OFFSETS = _UxGT("探針偏移"); //Probe Offsets - PROGMEM Language_Str MSG_ZPROBE_XOFFSET = _UxGT("探針X偏移量"); //Probe X Offset - PROGMEM Language_Str MSG_ZPROBE_YOFFSET = _UxGT("探針Y偏移量"); //Probe Y Offset - PROGMEM Language_Str MSG_ZPROBE_ZOFFSET = _UxGT("探針Z偏移量"); //Probe Z Offset - PROGMEM Language_Str MSG_BABYSTEP_X = _UxGT("微量調整X軸"); //"Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts - PROGMEM Language_Str MSG_BABYSTEP_Y = _UxGT("微量調整Y軸"); //"Babystep Y" - PROGMEM Language_Str MSG_BABYSTEP_Z = _UxGT("微量調整Z軸"); //"Babystep Z" - PROGMEM Language_Str MSG_BABYSTEP_TOTAL = _UxGT("總計"); //"Total" - PROGMEM Language_Str MSG_ENDSTOP_ABORT = _UxGT("擋塊終止"); //"Endstop abort" - PROGMEM Language_Str MSG_HEATING_FAILED_LCD = _UxGT("加熱失敗"); //"Heating failed" - PROGMEM Language_Str MSG_ERR_REDUNDANT_TEMP = _UxGT("錯誤:冗餘溫度"); //"Err: REDUNDANT TEMP" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY = _UxGT("溫度失控"); //"THERMAL RUNAWAY" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_BED = _UxGT("熱床溫度失控"); //"BED THERMAL RUNAWAY" - PROGMEM Language_Str MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("機箱溫度失控"); //"CHAMBER T. RUNAWAY" - PROGMEM Language_Str MSG_ERR_MAXTEMP = _UxGT("錯誤:最高溫度"); //"Err: MAXTEMP" - PROGMEM Language_Str MSG_ERR_MINTEMP = _UxGT("錯誤:最低溫度"); //"Err: MINTEMP" - PROGMEM Language_Str MSG_HALTED = _UxGT("印表機停機"); //"PRINTER HALTED" - PROGMEM Language_Str MSG_PLEASE_RESET = _UxGT("請重置"); //"Please reset" - PROGMEM Language_Str MSG_SHORT_DAY = _UxGT("天"); //"d" // One character only - PROGMEM Language_Str MSG_SHORT_HOUR = _UxGT("時"); //"h" // One character only - PROGMEM Language_Str MSG_SHORT_MINUTE = _UxGT("分"); //"m" // One character only - PROGMEM Language_Str MSG_HEATING = _UxGT("加熱中 ..."); //"Heating..." - PROGMEM Language_Str MSG_COOLING = _UxGT("冷卻中 ..."); //"Cooling..." - PROGMEM Language_Str MSG_BED_HEATING = _UxGT("加熱熱床中 ..."); //"Bed Heating..." - PROGMEM Language_Str MSG_BED_COOLING = _UxGT("熱床冷卻中 ..."); //"Bed Cooling..." - PROGMEM Language_Str MSG_CHAMBER_HEATING = _UxGT("機箱加熱中 .."); //"Chamber Heating..." - PROGMEM Language_Str MSG_CHAMBER_COOLING = _UxGT("機箱冷卻中 ..."); //Chamber Cooling... - PROGMEM Language_Str MSG_DELTA_CALIBRATE = _UxGT("⊿校準"); //"Delta Calibration" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_X = _UxGT("⊿校準X"); //"Calibrate X" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Y = _UxGT("⊿校準Y"); //"Calibrate Y" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_Z = _UxGT("⊿校準Z"); //"Calibrate Z" - PROGMEM Language_Str MSG_DELTA_CALIBRATE_CENTER = _UxGT("⊿校準中心"); //"Calibrate Center" - PROGMEM Language_Str MSG_DELTA_SETTINGS = _UxGT("⊿設置"); // "Delta Settings" - PROGMEM Language_Str MSG_DELTA_AUTO_CALIBRATE = _UxGT("⊿自動校準"); // "Auto Calibration" - PROGMEM Language_Str MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("設置⊿高度"); // "Set Delta Height" - PROGMEM Language_Str MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z偏移"); - PROGMEM Language_Str MSG_DELTA_DIAG_ROD = _UxGT("⊿斜柱"); // "Diag Rod" - PROGMEM Language_Str MSG_DELTA_HEIGHT = _UxGT("⊿高度"); // "Height" - PROGMEM Language_Str MSG_DELTA_RADIUS = _UxGT("⊿半徑"); // "Radius" - PROGMEM Language_Str MSG_INFO_MENU = _UxGT("關於印表機"); //"About Printer" - PROGMEM Language_Str MSG_INFO_PRINTER_MENU = _UxGT("印表機訊息"); //"Printer Info" - PROGMEM Language_Str MSG_3POINT_LEVELING = _UxGT("三點調平"); // "3-Point Leveling" - PROGMEM Language_Str MSG_LINEAR_LEVELING = _UxGT("線性調平"); // "Linear Leveling" - PROGMEM Language_Str MSG_BILINEAR_LEVELING = _UxGT(" 雙線性調平"); // "Bilinear Leveling" - PROGMEM Language_Str MSG_UBL_LEVELING = _UxGT("統一熱床調平(UBL)"); // "Unified Bed Leveling" - PROGMEM Language_Str MSG_MESH_LEVELING = _UxGT("網格調平"); // "Mesh Leveling" - PROGMEM Language_Str MSG_INFO_STATS_MENU = _UxGT("印表機統計"); //"Printer Stats" - PROGMEM Language_Str MSG_INFO_BOARD_MENU = _UxGT("主板訊息"); //"Board Info" - PROGMEM Language_Str MSG_INFO_THERMISTOR_MENU = _UxGT("溫度計"); //"Thermistors" - PROGMEM Language_Str MSG_INFO_EXTRUDERS = _UxGT(" 擠出機"); //"Extruders" - PROGMEM Language_Str MSG_INFO_BAUDRATE = _UxGT("傳輸率"); //"Baud" - PROGMEM Language_Str MSG_INFO_PROTOCOL = _UxGT("協議"); //"Protocol" - PROGMEM Language_Str MSG_INFO_RUNAWAY_OFF = _UxGT("監測溫度失控:關"); //"Runaway Watch: OFF" - PROGMEM Language_Str MSG_INFO_RUNAWAY_ON = _UxGT("監測溫度失控:開"); //"Runaway Watch: ON" + LSTR MSG_HOME_FIRST = _UxGT("歸位 %s%s%s 先"); // "Home ... first" + LSTR MSG_ZPROBE_OFFSETS = _UxGT("探針偏移"); //Probe Offsets + LSTR MSG_ZPROBE_XOFFSET = _UxGT("探針X偏移量"); //Probe X Offset + LSTR MSG_ZPROBE_YOFFSET = _UxGT("探針Y偏移量"); //Probe Y Offset + LSTR MSG_ZPROBE_ZOFFSET = _UxGT("探針Z偏移量"); //Probe Z Offset + LSTR MSG_BABYSTEP_X = _UxGT("微量調整X軸"); // "Babystep X" lcd_babystep_x, Babystepping enables the user to control the axis in tiny amounts + LSTR MSG_BABYSTEP_Y = _UxGT("微量調整Y軸"); // "Babystep Y" + LSTR MSG_BABYSTEP_Z = _UxGT("微量調整Z軸"); // "Babystep Z" + LSTR MSG_BABYSTEP_TOTAL = _UxGT("總計"); // "Total" + LSTR MSG_ENDSTOP_ABORT = _UxGT("擋塊終止"); // "Endstop abort" + LSTR MSG_HEATING_FAILED_LCD = _UxGT("加熱失敗"); // "Heating failed" + LSTR MSG_ERR_REDUNDANT_TEMP = _UxGT("錯誤:冗餘溫度"); // "Err: REDUNDANT TEMP" + LSTR MSG_THERMAL_RUNAWAY = _UxGT("溫度失控"); // "THERMAL RUNAWAY" + LSTR MSG_THERMAL_RUNAWAY_BED = _UxGT("熱床溫度失控"); // "BED THERMAL RUNAWAY" + LSTR MSG_THERMAL_RUNAWAY_CHAMBER = _UxGT("機箱溫度失控"); // "CHAMBER T. RUNAWAY" + LSTR MSG_ERR_MAXTEMP = _UxGT("錯誤:最高溫度"); // "Err: MAXTEMP" + LSTR MSG_ERR_MINTEMP = _UxGT("錯誤:最低溫度"); // "Err: MINTEMP" + LSTR MSG_HALTED = _UxGT("印表機停機"); // "PRINTER HALTED" + LSTR MSG_PLEASE_RESET = _UxGT("請重置"); // "Please reset" + LSTR MSG_SHORT_DAY = _UxGT("天"); // "d" // One character only + LSTR MSG_SHORT_HOUR = _UxGT("時"); // "h" // One character only + LSTR MSG_SHORT_MINUTE = _UxGT("分"); // "m" // One character only + LSTR MSG_HEATING = _UxGT("加熱中 ..."); // "Heating..." + LSTR MSG_COOLING = _UxGT("冷卻中 ..."); // "Cooling..." + LSTR MSG_BED_HEATING = _UxGT("加熱熱床中 ..."); // "Bed Heating..." + LSTR MSG_BED_COOLING = _UxGT("熱床冷卻中 ..."); // "Bed Cooling..." + LSTR MSG_CHAMBER_HEATING = _UxGT("機箱加熱中 .."); // "Chamber Heating..." + LSTR MSG_CHAMBER_COOLING = _UxGT("機箱冷卻中 ..."); //Chamber Cooling... + LSTR MSG_DELTA_CALIBRATE = _UxGT("⊿校準"); // "Delta Calibration" + LSTR MSG_DELTA_CALIBRATE_X = _UxGT("⊿校準X"); // "Calibrate X" + LSTR MSG_DELTA_CALIBRATE_Y = _UxGT("⊿校準Y"); // "Calibrate Y" + LSTR MSG_DELTA_CALIBRATE_Z = _UxGT("⊿校準Z"); // "Calibrate Z" + LSTR MSG_DELTA_CALIBRATE_CENTER = _UxGT("⊿校準中心"); // "Calibrate Center" + LSTR MSG_DELTA_SETTINGS = _UxGT("⊿設置"); // "Delta Settings" + LSTR MSG_DELTA_AUTO_CALIBRATE = _UxGT("⊿自動校準"); // "Auto Calibration" + LSTR MSG_DELTA_HEIGHT_CALIBRATE = _UxGT("設置⊿高度"); // "Set Delta Height" + LSTR MSG_DELTA_Z_OFFSET_CALIBRATE = _UxGT("Z偏移"); + LSTR MSG_DELTA_DIAG_ROD = _UxGT("⊿斜柱"); // "Diag Rod" + LSTR MSG_DELTA_HEIGHT = _UxGT("⊿高度"); // "Height" + LSTR MSG_DELTA_RADIUS = _UxGT("⊿半徑"); // "Radius" + LSTR MSG_INFO_MENU = _UxGT("關於印表機"); // "About Printer" + LSTR MSG_INFO_PRINTER_MENU = _UxGT("印表機訊息"); // "Printer Info" + LSTR MSG_3POINT_LEVELING = _UxGT("三點調平"); // "3-Point Leveling" + LSTR MSG_LINEAR_LEVELING = _UxGT("線性調平"); // "Linear Leveling" + LSTR MSG_BILINEAR_LEVELING = _UxGT(" 雙線性調平"); // "Bilinear Leveling" + LSTR MSG_UBL_LEVELING = _UxGT("統一熱床調平(UBL)"); // "Unified Bed Leveling" + LSTR MSG_MESH_LEVELING = _UxGT("網格調平"); // "Mesh Leveling" + LSTR MSG_INFO_STATS_MENU = _UxGT("印表機統計"); // "Printer Stats" + LSTR MSG_INFO_BOARD_MENU = _UxGT("主板訊息"); // "Board Info" + LSTR MSG_INFO_THERMISTOR_MENU = _UxGT("溫度計"); // "Thermistors" + LSTR MSG_INFO_EXTRUDERS = _UxGT(" 擠出機"); // "Extruders" + LSTR MSG_INFO_BAUDRATE = _UxGT("傳輸率"); // "Baud" + LSTR MSG_INFO_PROTOCOL = _UxGT("協議"); // "Protocol" + LSTR MSG_INFO_RUNAWAY_OFF = _UxGT("監測溫度失控:關"); // "Runaway Watch: OFF" + LSTR MSG_INFO_RUNAWAY_ON = _UxGT("監測溫度失控:開"); // "Runaway Watch: ON" - PROGMEM Language_Str MSG_CASE_LIGHT = _UxGT("外殼燈"); // "Case light" - PROGMEM Language_Str MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("燈亮度"); // "Light BRIGHTNESS" - PROGMEM Language_Str MSG_KILL_EXPECTED_PRINTER = _UxGT("打印機不正確"); // "The printer is incorrect" + LSTR MSG_CASE_LIGHT = _UxGT("外殼燈"); // "Case light" + LSTR MSG_CASE_LIGHT_BRIGHTNESS = _UxGT("燈亮度"); // "Light BRIGHTNESS" + LSTR MSG_KILL_EXPECTED_PRINTER = _UxGT("打印機不正確"); // "The printer is incorrect" #if LCD_WIDTH >= 20 - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("列印計數"); //"Print Count" - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("已完成"); //"Completed" - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("總列印時間"); //"Total print time" - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最長工作時間"); //"Longest job time" - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("總計擠出"); //"Extruded total" + LSTR MSG_INFO_PRINT_COUNT = _UxGT("列印計數"); // "Print Count" + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("已完成"); // "Completed" + LSTR MSG_INFO_PRINT_TIME = _UxGT("總列印時間"); // "Total print time" + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("最長工作時間"); // "Longest job time" + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("總計擠出"); // "Extruded total" #else - PROGMEM Language_Str MSG_INFO_PRINT_COUNT = _UxGT("列印數"); //"Prints" - PROGMEM Language_Str MSG_INFO_COMPLETED_PRINTS = _UxGT("完成"); //"Completed" - PROGMEM Language_Str MSG_INFO_PRINT_TIME = _UxGT("總共"); //"Total" - PROGMEM Language_Str MSG_INFO_PRINT_LONGEST = _UxGT("最長"); //"Longest" - PROGMEM Language_Str MSG_INFO_PRINT_FILAMENT = _UxGT("已擠出"); //"Extruded" + LSTR MSG_INFO_PRINT_COUNT = _UxGT("列印數"); // "Prints" + LSTR MSG_INFO_COMPLETED_PRINTS = _UxGT("完成"); // "Completed" + LSTR MSG_INFO_PRINT_TIME = _UxGT("總共"); // "Total" + LSTR MSG_INFO_PRINT_LONGEST = _UxGT("最長"); // "Longest" + LSTR MSG_INFO_PRINT_FILAMENT = _UxGT("已擠出"); // "Extruded" #endif - PROGMEM Language_Str MSG_INFO_MIN_TEMP = _UxGT("最低溫度"); //"Min Temp" - PROGMEM Language_Str MSG_INFO_MAX_TEMP = _UxGT("最高溫度"); //"Max Temp" - PROGMEM Language_Str MSG_INFO_PSU = _UxGT("電源供應"); //"Power Supply" - PROGMEM Language_Str MSG_DRIVE_STRENGTH = _UxGT("驅動力度"); // "Drive Strength" - PROGMEM Language_Str MSG_DAC_PERCENT = _UxGT("驅動 %"); // "Driver %" - PROGMEM Language_Str MSG_DAC_PERCENT_X = _UxGT("X 驅動 %"); //X Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_Y = _UxGT("Y 驅動 %"); //Y Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_Z = _UxGT("Z 驅動 %"); //Z Driver % - PROGMEM Language_Str MSG_DAC_PERCENT_E = _UxGT("E 驅動 %"); //E Driver % - PROGMEM Language_Str MSG_ERROR_TMC = _UxGT("TMC連接錯誤"); //"TMC CONNECTION ERROR" - PROGMEM Language_Str MSG_DAC_EEPROM_WRITE = _UxGT("保存驅動設置"); // "DAC EEPROM Write" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER = _UxGT("更換絲料"); //"FILAMENT CHANGE" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("列印已暫停"); // "PRINT PAUSED" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("裝載絲料"); // "LOAD FILAMENT" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("卸載絲料"); // "UNLOAD FILAMENT" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("恢複選項:"); // "RESUME OPTIONS:" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("清除更多"); // "Purge more" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("恢復列印"); //"Resume print" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" 噴嘴: "); // " Nozzle: " - PROGMEM Language_Str MSG_RUNOUT_SENSOR = _UxGT("斷絲偵測"); //"Runout Sensor" - PROGMEM Language_Str MSG_RUNOUT_DISTANCE_MM = _UxGT("絲距離mm"); //"Runout Dist mm" - PROGMEM Language_Str MSG_KILL_HOMING_FAILED = _UxGT("歸原位失敗"); // "Homing failed" - PROGMEM Language_Str MSG_LCD_PROBING_FAILED = _UxGT("探針探測失敗"); // "Probing failed" + LSTR MSG_INFO_MIN_TEMP = _UxGT("最低溫度"); // "Min Temp" + LSTR MSG_INFO_MAX_TEMP = _UxGT("最高溫度"); // "Max Temp" + LSTR MSG_INFO_PSU = _UxGT("電源供應"); // "Power Supply" + LSTR MSG_DRIVE_STRENGTH = _UxGT("驅動力度"); // "Drive Strength" + LSTR MSG_DAC_PERCENT_A = LCD_STR_A _UxGT(" 驅動 %"); // X Driver % + LSTR MSG_DAC_PERCENT_B = LCD_STR_B _UxGT(" 驅動 %"); // Y Driver % + LSTR MSG_DAC_PERCENT_C = LCD_STR_C _UxGT(" 驅動 %"); // Z Driver % + LSTR MSG_DAC_PERCENT_I = LCD_STR_I _UxGT(" 驅動 %"); // I Driver % + LSTR MSG_DAC_PERCENT_J = LCD_STR_J _UxGT(" 驅動 %"); // J Driver % + LSTR MSG_DAC_PERCENT_K = LCD_STR_K _UxGT(" 驅動 %"); // K Driver % + LSTR MSG_DAC_PERCENT_E = _UxGT("E 驅動 %"); //E Driver % + LSTR MSG_ERROR_TMC = _UxGT("TMC連接錯誤"); // "TMC CONNECTION ERROR" + LSTR MSG_DAC_EEPROM_WRITE = _UxGT("保存驅動設置"); // "DAC EEPROM Write" + LSTR MSG_FILAMENT_CHANGE_HEADER = _UxGT("更換絲料"); // "FILAMENT CHANGE" + LSTR MSG_FILAMENT_CHANGE_HEADER_PAUSE = _UxGT("列印已暫停"); // "PRINT PAUSED" + LSTR MSG_FILAMENT_CHANGE_HEADER_LOAD = _UxGT("裝載絲料"); // "LOAD FILAMENT" + LSTR MSG_FILAMENT_CHANGE_HEADER_UNLOAD = _UxGT("卸載絲料"); // "UNLOAD FILAMENT" + LSTR MSG_FILAMENT_CHANGE_OPTION_HEADER = _UxGT("恢複選項:"); // "RESUME OPTIONS:" + LSTR MSG_FILAMENT_CHANGE_OPTION_PURGE = _UxGT("清除更多"); // "Purge more" + LSTR MSG_FILAMENT_CHANGE_OPTION_RESUME = _UxGT("恢復列印"); // "Resume print" + LSTR MSG_FILAMENT_CHANGE_NOZZLE = _UxGT(" 噴嘴: "); // " Nozzle: " + LSTR MSG_RUNOUT_SENSOR = _UxGT("斷絲偵測"); // "Runout Sensor" + LSTR MSG_RUNOUT_DISTANCE_MM = _UxGT("絲距離mm"); // "Runout Dist mm" + LSTR MSG_KILL_HOMING_FAILED = _UxGT("歸原位失敗"); // "Homing failed" + LSTR MSG_LCD_PROBING_FAILED = _UxGT("探針探測失敗"); // "Probing failed" // // Filament Change screens show up to 3 lines on a 4-line display // ...or up to 2 lines on a 3-line display // #if LCD_HEIGHT >= 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("按下按鈕", "恢復列印")); //"Press Button to resume print" - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停車中 ...")); //"Parking..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("等待開始", "絲料", "變更")); //"Wait for start of the filament change" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("等待", "卸下絲料")); //"Wait for filament unload" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("插入絲料", "並按鍵", "繼續 ...")); //"Insert filament and press button to continue..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("按下按鈕", "加熱噴嘴.")); // "Press button to heat nozzle." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("加熱噴嘴", "請等待 ...")); // "Heating nozzle Please wait..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("等待", "進料")); //"Wait for filament load" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("等待", "絲料清除")); // "Wait for filament purge" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("按下完成","絲料清除")); //"Press button to filament purge" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("等待列印", "恢復")); //"Wait for print to resume" + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_2_LINE("按下按鈕", "恢復列印")); //"Press Button to resume print" + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停車中 ...")); // "Parking..." + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_3_LINE("等待開始", "絲料", "變更")); // "Wait for start of the filament change" + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_2_LINE("等待", "卸下絲料")); // "Wait for filament unload" + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_3_LINE("插入絲料", "並按鍵", "繼續 ...")); // "Insert filament and press button to continue..." + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_2_LINE("按下按鈕", "加熱噴嘴.")); // "Press button to heat nozzle." + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_2_LINE("加熱噴嘴", "請等待 ...")); // "Heating nozzle Please wait..." + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_2_LINE("等待", "進料")); // "Wait for filament load" + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_2_LINE("等待", "絲料清除")); // "Wait for filament purge" + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_2_LINE("按下完成","絲料清除")); //"Press button to filament purge" + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_2_LINE("等待列印", "恢復")); // "Wait for print to resume" #else // LCD_HEIGHT < 4 - PROGMEM Language_Str MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("按下繼續..")); //"Click to continue" - PROGMEM Language_Str MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停車中 ...")); //"Parking..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("請等待 ...")); //"Please wait..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("插入並點擊")); //"Insert and Click" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("按下加熱..")); //"Click to heat" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("加熱中 ...")); //"Heating..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("退出中 ...")); //"Ejecting..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("載入中 ...")); //"Loading..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("清除中 ...")); //"Purging..." - PROGMEM Language_Str MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("按下完成..")); //"Click to finish" - PROGMEM Language_Str MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("恢復中 ...")); //"Resuming..." + LSTR MSG_ADVANCED_PAUSE_WAITING = _UxGT(MSG_1_LINE("按下繼續..")); // "Click to continue" + LSTR MSG_PAUSE_PRINT_PARKING = _UxGT(MSG_1_LINE("停車中 ...")); // "Parking..." + LSTR MSG_FILAMENT_CHANGE_INIT = _UxGT(MSG_1_LINE("請等待 ...")); // "Please wait..." + LSTR MSG_FILAMENT_CHANGE_INSERT = _UxGT(MSG_1_LINE("插入並點擊")); // "Insert and Click" + LSTR MSG_FILAMENT_CHANGE_HEAT = _UxGT(MSG_1_LINE("按下加熱..")); // "Click to heat" + LSTR MSG_FILAMENT_CHANGE_HEATING = _UxGT(MSG_1_LINE("加熱中 ...")); // "Heating..." + LSTR MSG_FILAMENT_CHANGE_UNLOAD = _UxGT(MSG_1_LINE("退出中 ...")); // "Ejecting..." + LSTR MSG_FILAMENT_CHANGE_LOAD = _UxGT(MSG_1_LINE("載入中 ...")); // "Loading..." + LSTR MSG_FILAMENT_CHANGE_PURGE = _UxGT(MSG_1_LINE("清除中 ...")); // "Purging..." + LSTR MSG_FILAMENT_CHANGE_CONT_PURGE = _UxGT(MSG_1_LINE("按下完成..")); // "Click to finish" + LSTR MSG_FILAMENT_CHANGE_RESUME = _UxGT(MSG_1_LINE("恢復中 ...")); // "Resuming..." #endif // LCD_HEIGHT < 4 } diff --git a/Marlin/src/lcd/lcdprint.cpp b/Marlin/src/lcd/lcdprint.cpp index 32f425168f8d..b2c939557d0f 100644 --- a/Marlin/src/lcd/lcdprint.cpp +++ b/Marlin/src/lcd/lcdprint.cpp @@ -26,7 +26,7 @@ #include "../inc/MarlinConfigPre.h" -#if HAS_WIRED_LCD && !HAS_GRAPHICAL_TFT +#if HAS_WIRED_LCD && !HAS_GRAPHICAL_TFT && !IS_DWIN_MARLINUI #include "marlinui.h" #include "lcdprint.h" @@ -41,6 +41,7 @@ * * displays 'E1'...'E11' for indexes 0 - 10 (By default. Uses LCD_FIRST_TOOL) */ lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const int8_t ind, PGM_P const inStr/*=nullptr*/, const lcd_uint_t maxlen/*=LCD_WIDTH*/) { + const uint8_t prop = USE_WIDE_GLYPH ? 2 : 1; uint8_t *p = (uint8_t*)pstr; int8_t n = maxlen; while (n > 0) { @@ -73,10 +74,27 @@ lcd_uint_t lcd_put_u8str_ind_P(PGM_P const pstr, const int8_t ind, PGM_P const i } else { lcd_put_wchar(ch); - n--; + n -= ch > 255 ? prop : 1; } } return n; } +// Calculate UTF8 width with a simple check +int calculateWidth(PGM_P const pstr) { + if (!USE_WIDE_GLYPH) return utf8_strlen_P(pstr) * MENU_FONT_WIDTH; + const uint8_t prop = 2; + uint8_t *p = (uint8_t*)pstr; + int n = 0; + + do { + wchar_t ch; + p = get_utf8_value_cb(p, read_byte_rom, &ch); + if (!ch) break; + n += (ch > 255) ? prop : 1; + } while (1); + + return n * MENU_FONT_WIDTH; +} + #endif // HAS_WIRED_LCD diff --git a/Marlin/src/lcd/lcdprint.h b/Marlin/src/lcd/lcdprint.h index b7732d319889..f6ac818ae564 100644 --- a/Marlin/src/lcd/lcdprint.h +++ b/Marlin/src/lcd/lcdprint.h @@ -34,7 +34,21 @@ #include "../inc/MarlinConfig.h" -#if HAS_MARLINUI_U8GLIB +#if IS_DWIN_MARLINUI + + #include "e3v2/marlinui/marlinui_dwin.h" + + #define LCD_PIXEL_WIDTH DWIN_WIDTH + #define LCD_PIXEL_HEIGHT DWIN_HEIGHT + #define LCD_WIDTH ((LCD_PIXEL_WIDTH) / (MENU_FONT_WIDTH)) + #define LCD_HEIGHT ((LCD_PIXEL_HEIGHT) / (MENU_LINE_HEIGHT)) + + // The DWIN lcd_moveto function uses row / column, not pixels + #define LCD_COL_X(col) (col) + #define LCD_ROW_Y(row) (row) + #define LCD_COL_X_RJ(len) (LCD_WIDTH - LCD_COL_X(len)) + +#elif HAS_MARLINUI_U8GLIB #include "dogm/u8g_fontutf8.h" typedef u8g_uint_t lcd_uint_t; @@ -76,8 +90,9 @@ #define INFO_FONT_HEIGHT (INFO_FONT_ASCENT + INFO_FONT_DESCENT) #define INFO_FONT_WIDTH 6 + // Graphical LCD uses the menu font size for cursor positioning #define LCD_COL_X(col) (( (col)) * (MENU_FONT_WIDTH)) - #define LCD_ROW_Y(row) ((1 + (row)) * (MENU_FONT_HEIGHT)) + #define LCD_ROW_Y(row) ((1 + (row)) * (MENU_LINE_HEIGHT)) #else @@ -94,18 +109,24 @@ #define LCD_PIXEL_WIDTH LCD_WIDTH #define LCD_PIXEL_HEIGHT LCD_HEIGHT + // Character LCD uses direct cursor positioning #define LCD_COL_X(col) (col) #define LCD_ROW_Y(row) (row) #endif -#define LCD_COL_X_RJ(len) (LCD_PIXEL_WIDTH - LCD_COL_X(len)) -#define LCD_BOTTOM_ROW (LCD_PIXEL_HEIGHT - 1) +#ifndef MENU_LINE_HEIGHT + #define MENU_LINE_HEIGHT MENU_FONT_HEIGHT +#endif + +#ifndef LCD_COL_X_RJ + #define LCD_COL_X_RJ(len) (LCD_PIXEL_WIDTH - LCD_COL_X(len)) +#endif + #define SETCURSOR(col, row) lcd_moveto(LCD_COL_X(col), LCD_ROW_Y(row)) #define SETCURSOR_RJ(len, row) lcd_moveto(LCD_COL_X_RJ(len), LCD_ROW_Y(row)) #define SETCURSOR_X(col) SETCURSOR(col, _lcdLineNr) #define SETCURSOR_X_RJ(len) SETCURSOR_RJ(len, _lcdLineNr) -#define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U) int lcd_glyph_height(); @@ -162,7 +183,7 @@ inline lcd_uint_t lcd_put_u8str_ind_P(const lcd_uint_t col, const lcd_uint_t row return lcd_put_u8str_ind_P(pstr, ind, inStr, maxlen); } -inline int lcd_put_u8str(const char* str) { return lcd_put_u8str_max(str, PIXEL_LEN_NOLIMIT); } +inline int lcd_put_u8str(const char *str) { return lcd_put_u8str_max(str, PIXEL_LEN_NOLIMIT); } inline int lcd_put_u8str(const lcd_uint_t col, const lcd_uint_t row, PGM_P const str) { lcd_moveto(col, row); return lcd_put_u8str(str); @@ -173,3 +194,5 @@ inline int lcd_put_wchar(const lcd_uint_t col, const lcd_uint_t row, const wchar lcd_moveto(col, row); return lcd_put_wchar(c); } + +int calculateWidth(PGM_P const pstr); diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index 46db57193669..5c8298cf5204 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -22,6 +22,8 @@ #include "../inc/MarlinConfig.h" +#include "../MarlinCore.h" // for printingIsPaused + #ifdef LED_BACKLIGHT_TIMEOUT #include "../feature/leds/leds.h" #endif @@ -30,7 +32,7 @@ #include "../feature/host_actions.h" #endif -#if ENABLED(BROWSE_MEDIA_ON_INSERT, PASSWORD_ON_SD_PRINT_MENU) +#if BOTH(BROWSE_MEDIA_ON_INSERT, PASSWORD_ON_SD_PRINT_MENU) #include "../feature/password/password.h" #endif @@ -39,14 +41,25 @@ MarlinUI ui; #if HAS_DISPLAY - #include "../module/printcounter.h" - #include "../MarlinCore.h" #include "../gcode/queue.h" #include "fontutils.h" #include "../sd/cardreader.h" - #if EITHER(EXTENSIBLE_UI, DWIN_CREALITY_LCD) - #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U) - #endif +#endif + +#if ENABLED(DWIN_CREALITY_LCD) + #include "e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "e3v2/enhanced/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #include "e3v2/jyersui/dwin.h" +#endif + +#if ENABLED(LCD_PROGRESS_BAR) && !IS_TFTGLCD_PANEL + #define BASIC_PROGRESS_BAR 1 +#endif + +#if ANY(HAS_DISPLAY, HAS_STATUS_MESSAGE, BASIC_PROGRESS_BAR) + #include "../module/printcounter.h" #endif #if LCD_HAS_WAIT_FOR_MOVE @@ -55,31 +68,51 @@ MarlinUI ui; constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; -#if HAS_WIRED_LCD - #if ENABLED(STATUS_MESSAGE_SCROLLING) +#if HAS_STATUS_MESSAGE + #if BOTH(HAS_WIRED_LCD, STATUS_MESSAGE_SCROLLING) uint8_t MarlinUI::status_scroll_offset; // = 0 - constexpr uint8_t MAX_MESSAGE_LENGTH = _MAX(LONG_FILENAME_LENGTH, MAX_LANG_CHARSIZE * 2 * (LCD_WIDTH)); - #else - constexpr uint8_t MAX_MESSAGE_LENGTH = MAX_LANG_CHARSIZE * (LCD_WIDTH); #endif -#elif EITHER(EXTENSIBLE_UI, DWIN_CREALITY_LCD) - constexpr uint8_t MAX_MESSAGE_LENGTH = 63; -#endif - -#if EITHER(HAS_WIRED_LCD, EXTENSIBLE_UI) - uint8_t MarlinUI::alert_level; // = 0 char MarlinUI::status_message[MAX_MESSAGE_LENGTH + 1]; + uint8_t MarlinUI::alert_level; // = 0 #endif #if ENABLED(LCD_SET_PROGRESS_MANUALLY) MarlinUI::progress_t MarlinUI::progress_override; // = 0 - #if BOTH(LCD_SET_PROGRESS_MANUALLY, USE_M73_REMAINING_TIME) + #if ENABLED(USE_M73_REMAINING_TIME) uint32_t MarlinUI::remaining_time; #endif #endif #if HAS_MULTI_LANGUAGE uint8_t MarlinUI::language; // Initialized by settings.load() + void MarlinUI::set_language(const uint8_t lang) { + if (lang < NUM_LANGUAGES) { + language = lang; + TERN_(HAS_MARLINUI_U8GLIB, update_language_font()); + return_to_status(); + refresh(); + } + } +#endif + +#if HAS_LCD_CONTRAST + uint8_t MarlinUI::contrast; // Initialized by settings.load() + + void MarlinUI::set_contrast(const uint8_t value) { + contrast = constrain(value, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX); + _set_contrast(); + } +#endif + +#if HAS_LCD_BRIGHTNESS + uint8_t MarlinUI::brightness = DEFAULT_LCD_BRIGHTNESS; + bool MarlinUI::backlight = true; + + void MarlinUI::set_brightness(const uint8_t value) { + backlight = !!value; + if (backlight) brightness = constrain(value, LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX); + _set_brightness(); + } #endif #if ENABLED(SOUND_MENU_ITEM) @@ -104,1202 +137,1206 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; #if PREHEAT_COUNT preheat_t MarlinUI::material_preset[PREHEAT_COUNT]; // Initialized by settings.load() PGM_P MarlinUI::get_preheat_label(const uint8_t m) { - #ifdef PREHEAT_1_LABEL - static PGMSTR(preheat_0_label, PREHEAT_1_LABEL); - #endif - #ifdef PREHEAT_2_LABEL - static PGMSTR(preheat_1_label, PREHEAT_2_LABEL); - #endif - #ifdef PREHEAT_3_LABEL - static PGMSTR(preheat_2_label, PREHEAT_3_LABEL); - #endif - #ifdef PREHEAT_4_LABEL - static PGMSTR(preheat_3_label, PREHEAT_4_LABEL); - #endif - #ifdef PREHEAT_5_LABEL - static PGMSTR(preheat_4_label, PREHEAT_5_LABEL); - #endif - + #define _PDEF(N) static PGMSTR(preheat_##N##_label, PREHEAT_##N##_LABEL); #define _PLBL(N) preheat_##N##_label, - static PGM_P const preheat_labels[PREHEAT_COUNT] PROGMEM = { REPEAT(PREHEAT_COUNT, _PLBL) }; - + REPEAT_1(PREHEAT_COUNT, _PDEF); + static PGM_P const preheat_labels[PREHEAT_COUNT] PROGMEM = { REPEAT_1(PREHEAT_COUNT, _PLBL) }; return (PGM_P)pgm_read_ptr(&preheat_labels[m]); } #endif -#if HAS_WIRED_LCD - -#if HAS_MARLINUI_U8GLIB - #include "dogm/marlinui_DOGM.h" +#if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) + bool MarlinUI::lcd_clicked; #endif -#include "lcdprint.h" - -#include "../sd/cardreader.h" +#if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI) -#include "../module/temperature.h" -#include "../module/planner.h" -#include "../module/motion.h" + bool MarlinUI::get_blink() { + static uint8_t blink = 0; + static millis_t next_blink_ms = 0; + millis_t ms = millis(); + if (ELAPSED(ms, next_blink_ms)) { + blink ^= 0xFF; + next_blink_ms = ms + 1000 - (LCD_UPDATE_INTERVAL) / 2; + } + return blink != 0; + } -#if HAS_LCD_MENU - #include "../module/settings.h" #endif -#if ENABLED(AUTO_BED_LEVELING_UBL) - #include "../feature/bedlevel/bedlevel.h" -#endif +#if HAS_WIRED_LCD -#if HAS_TRINAMIC_CONFIG - #include "../feature/tmc_util.h" -#endif + #if HAS_MARLINUI_U8GLIB + #include "dogm/marlinui_DOGM.h" + #endif -#if HAS_ADC_BUTTONS - #include "../module/thermistor/thermistors.h" -#endif + #include "lcdprint.h" -#if HAS_POWER_MONITOR - #include "../feature/power_monitor.h" -#endif + #include "../sd/cardreader.h" + + #include "../module/temperature.h" + #include "../module/planner.h" + #include "../module/motion.h" -#if HAS_ENCODER_ACTION - volatile uint8_t MarlinUI::buttons; - #if HAS_SLOW_BUTTONS - volatile uint8_t MarlinUI::slow_buttons; + #if HAS_LCD_MENU + #include "../module/settings.h" #endif - #if HAS_TOUCH_BUTTONS - #include "touch/touch_buttons.h" - bool MarlinUI::on_edit_screen = false; + + #if ENABLED(AUTO_BED_LEVELING_UBL) + #include "../feature/bedlevel/bedlevel.h" #endif -#endif -#if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS > 0 - bool MarlinUI::defer_return_to_status; -#endif + #if HAS_TRINAMIC_CONFIG + #include "../feature/tmc_util.h" + #endif -uint8_t MarlinUI::lcd_status_update_delay = 1; // First update one loop delayed + #if HAS_ADC_BUTTONS + #include "../module/thermistor/thermistors.h" + #endif -#if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) - millis_t MarlinUI::next_filament_display; // = 0 -#endif + #if HAS_POWER_MONITOR + #include "../feature/power_monitor.h" + #endif -millis_t MarlinUI::next_button_update_ms; // = 0 + #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT) + #include "../feature/power.h" + #endif -#if HAS_MARLINUI_U8GLIB - bool MarlinUI::drawing_screen, MarlinUI::first_page; // = false -#endif + #if HAS_ENCODER_ACTION + volatile uint8_t MarlinUI::buttons; + #if HAS_SLOW_BUTTONS + volatile uint8_t MarlinUI::slow_buttons; + #endif + #if HAS_TOUCH_BUTTONS + #include "touch/touch_buttons.h" + bool MarlinUI::on_edit_screen = false; + #endif + #endif -// Encoder Handling -#if HAS_ENCODER_ACTION - uint32_t MarlinUI::encoderPosition; - volatile int8_t encoderDiff; // Updated in update_buttons, added to encoderPosition every LCD update -#endif + #if SCREENS_CAN_TIME_OUT + bool MarlinUI::defer_return_to_status; + millis_t MarlinUI::return_to_status_ms = 0; + #endif -#if ENABLED(SDSUPPORT) + uint8_t MarlinUI::lcd_status_update_delay = 1; // First update one loop delayed - #include "../sd/cardreader.h" + #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + millis_t MarlinUI::next_filament_display; // = 0 + #endif + + millis_t MarlinUI::next_button_update_ms; // = 0 - #if MARLINUI_SCROLL_NAME - uint8_t MarlinUI::filename_scroll_pos, MarlinUI::filename_scroll_max; + #if HAS_MARLINUI_U8GLIB + bool MarlinUI::drawing_screen, MarlinUI::first_page; // = false #endif - const char * MarlinUI::scrolled_filename(CardReader &theCard, const uint8_t maxlen, uint8_t hash, const bool doScroll) { - const char *outstr = theCard.longest_filename(); - if (theCard.longFilename[0]) { - #if MARLINUI_SCROLL_NAME - if (doScroll) { - for (uint8_t l = FILENAME_LENGTH; l--;) - hash = ((hash << 1) | (hash >> 7)) ^ theCard.filename[l]; // rotate, xor - static uint8_t filename_scroll_hash; - if (filename_scroll_hash != hash) { // If the hash changed... - filename_scroll_hash = hash; // Save the new hash - filename_scroll_max = _MAX(0, utf8_strlen(theCard.longFilename) - maxlen); // Update the scroll limit - filename_scroll_pos = 0; // Reset scroll to the start - lcd_status_update_delay = 8; // Don't scroll right away - } - // Advance byte position corresponding to filename_scroll_pos char position - outstr += TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(outstr, filename_scroll_pos), filename_scroll_pos); - } - #else - theCard.longFilename[ - TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(theCard.longFilename, maxlen), maxlen) - ] = '\0'; // cutoff at screen edge - #endif - } - return outstr; - } + #if IS_DWIN_MARLINUI + bool MarlinUI::did_first_redraw; + #endif -#endif + // Encoder Handling + #if HAS_ENCODER_ACTION + uint32_t MarlinUI::encoderPosition; + volatile int8_t encoderDiff; // Updated in update_buttons, added to encoderPosition every LCD update + #endif -#if HAS_LCD_MENU - #include "menu/menu.h" + #if ENABLED(SDSUPPORT) - screenFunc_t MarlinUI::currentScreen; // Initialized in CTOR - bool MarlinUI::screen_changed; + #include "../sd/cardreader.h" - #if ENABLED(ENCODER_RATE_MULTIPLIER) - bool MarlinUI::encoderRateMultiplierEnabled; - millis_t MarlinUI::lastEncoderMovementMillis = 0; - void MarlinUI::enable_encoder_multiplier(const bool onoff) { - encoderRateMultiplierEnabled = onoff; - lastEncoderMovementMillis = 0; - } - #endif + #if MARLINUI_SCROLL_NAME + uint8_t MarlinUI::filename_scroll_pos, MarlinUI::filename_scroll_max; + #endif - #if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) - int8_t MarlinUI::encoderDirection = ENCODERBASE; - #endif + const char * MarlinUI::scrolled_filename(CardReader &theCard, const uint8_t maxlen, uint8_t hash, const bool doScroll) { + const char *outstr = theCard.longest_filename(); + if (theCard.longFilename[0]) { + #if MARLINUI_SCROLL_NAME + if (doScroll) { + for (uint8_t l = FILENAME_LENGTH; l--;) + hash = ((hash << 1) | (hash >> 7)) ^ theCard.filename[l]; // rotate, xor + static uint8_t filename_scroll_hash; + if (filename_scroll_hash != hash) { // If the hash changed... + filename_scroll_hash = hash; // Save the new hash + filename_scroll_max = _MAX(0, utf8_strlen(theCard.longFilename) - maxlen); // Update the scroll limit + filename_scroll_pos = 0; // Reset scroll to the start + lcd_status_update_delay = 8; // Don't scroll right away + } + // Advance byte position corresponding to filename_scroll_pos char position + outstr += TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(outstr, filename_scroll_pos), filename_scroll_pos); + } + #else + theCard.longFilename[ + TERN(UTF_FILENAME_SUPPORT, utf8_byte_pos_by_char_num(theCard.longFilename, maxlen), maxlen) + ] = '\0'; // cutoff at screen edge + #endif + } + return outstr; + } - #if HAS_TOUCH_BUTTONS - uint8_t MarlinUI::touch_buttons; - uint8_t MarlinUI::repeat_delay; #endif - bool MarlinUI::lcd_clicked; + #if HAS_LCD_MENU + #include "menu/menu.h" - bool MarlinUI::use_click() { - const bool click = lcd_clicked; - lcd_clicked = false; - return click; - } + screenFunc_t MarlinUI::currentScreen; // Initialized in CTOR + bool MarlinUI::screen_changed; - #if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) + #if ENABLED(ENCODER_RATE_MULTIPLIER) + bool MarlinUI::encoderRateMultiplierEnabled; + millis_t MarlinUI::lastEncoderMovementMillis = 0; + void MarlinUI::enable_encoder_multiplier(const bool onoff) { + encoderRateMultiplierEnabled = onoff; + lastEncoderMovementMillis = 0; + } + #endif - bool MarlinUI::external_control; // = false + #if EITHER(REVERSE_MENU_DIRECTION, REVERSE_SELECT_DIRECTION) + int8_t MarlinUI::encoderDirection = ENCODERBASE; + #endif - void MarlinUI::wait_for_release() { - while (button_pressed()) safe_delay(50); - safe_delay(50); - } + #if HAS_TOUCH_BUTTONS + uint8_t MarlinUI::touch_buttons; + uint8_t MarlinUI::repeat_delay; + #endif - #endif + #if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION) - #if !HAS_GRAPHICAL_TFT + bool MarlinUI::external_control; // = false - void _wrap_string(uint8_t &col, uint8_t &row, const char * const string, read_byte_cb_t cb_read_byte, bool wordwrap/*=false*/) { - SETCURSOR(col, row); - if (!string) return; + void MarlinUI::wait_for_release() { + while (button_pressed()) safe_delay(50); + safe_delay(50); + } - auto _newline = [&col, &row]{ - col = 0; row++; // Move col to string len (plus space) - SETCURSOR(0, row); // Simulate carriage return - }; + #endif - uint8_t *p = (uint8_t*)string; - wchar_t ch; - if (wordwrap) { - uint8_t *wrd = nullptr, c = 0; - // find the end of the part - for (;;) { - if (!wrd) wrd = p; // Get word start /before/ advancing - p = get_utf8_value_cb(p, cb_read_byte, &ch); - const bool eol = !ch; // zero ends the string - // End or a break between phrases? - if (eol || ch == ' ' || ch == '-' || ch == '+' || ch == '.') { - if (!c && ch == ' ') { if (wrd) wrd++; continue; } // collapse extra spaces - // Past the right and the word is not too long? - if (col + c > LCD_WIDTH && col >= (LCD_WIDTH) / 4) _newline(); // should it wrap? - c += !eol; // +1 so the space will be printed - col += c; // advance col to new position - while (c) { // character countdown - --c; // count down to zero - wrd = get_utf8_value_cb(wrd, cb_read_byte, &ch); // get characters again - lcd_put_wchar(ch); // character to the LCD + #if !HAS_GRAPHICAL_TFT + + void _wrap_string(uint8_t &col, uint8_t &row, const char * const string, read_byte_cb_t cb_read_byte, bool wordwrap/*=false*/) { + SETCURSOR(col, row); + if (!string) return; + + auto _newline = [&col, &row]{ + col = 0; row++; // Move col to string len (plus space) + SETCURSOR(0, row); // Simulate carriage return + }; + + uint8_t *p = (uint8_t*)string; + wchar_t ch; + if (wordwrap) { + uint8_t *wrd = nullptr, c = 0; + // find the end of the part + for (;;) { + if (!wrd) wrd = p; // Get word start /before/ advancing + p = get_utf8_value_cb(p, cb_read_byte, &ch); + const bool eol = !ch; // zero ends the string + // End or a break between phrases? + if (eol || ch == ' ' || ch == '-' || ch == '+' || ch == '.') { + if (!c && ch == ' ') { if (wrd) wrd++; continue; } // collapse extra spaces + // Past the right and the word is not too long? + if (col + c > LCD_WIDTH && col >= (LCD_WIDTH) / 4) _newline(); // should it wrap? + c += !eol; // +1 so the space will be printed + col += c; // advance col to new position + while (c) { // character countdown + --c; // count down to zero + wrd = get_utf8_value_cb(wrd, cb_read_byte, &ch); // get characters again + lcd_put_wchar(ch); // character to the LCD + } + if (eol) break; // all done! + wrd = nullptr; // set up for next word } - if (eol) break; // all done! - wrd = nullptr; // set up for next word + else c++; // count word characters } - else c++; // count word characters } - } - else { - for (;;) { - p = get_utf8_value_cb(p, cb_read_byte, &ch); - if (!ch) break; - lcd_put_wchar(ch); - col++; - if (col >= LCD_WIDTH) _newline(); + else { + for (;;) { + p = get_utf8_value_cb(p, cb_read_byte, &ch); + if (!ch) break; + lcd_put_wchar(ch); + col++; + if (col >= LCD_WIDTH) _newline(); + } } } - } - void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { - const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0; - uint8_t col = 0, row = 0; - if (!string && plen + slen <= LCD_WIDTH) { - col = (LCD_WIDTH - plen - slen) / 2; - row = LCD_HEIGHT > 3 ? 1 : 0; - } - wrap_string_P(col, row, pref, true); - if (string) { - if (col) { col = 0; row++; } // Move to the start of the next line - wrap_string(col, row, string); + void MarlinUI::draw_select_screen_prompt(PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { + const uint8_t plen = utf8_strlen_P(pref), slen = suff ? utf8_strlen_P(suff) : 0; + uint8_t col = 0, row = 0; + if (!string && plen + slen <= LCD_WIDTH) { + col = (LCD_WIDTH - plen - slen) / 2; + row = LCD_HEIGHT > 3 ? 1 : 0; + } + if (LCD_HEIGHT >= 8) row = LCD_HEIGHT / 2 - 2; + wrap_string_P(col, row, pref, true); + if (string) { + if (col) { col = 0; row++; } // Move to the start of the next line + wrap_string(col, row, string); + } + if (suff) wrap_string_P(col, row, suff); } - if (suff) wrap_string_P(col, row, suff); - } - #endif // !HAS_GRAPHICAL_TFT + #endif // !HAS_GRAPHICAL_TFT -#endif // HAS_LCD_MENU + #endif // HAS_LCD_MENU -void MarlinUI::init() { + void MarlinUI::init() { - init_lcd(); + init_lcd(); - #if HAS_DIGITAL_BUTTONS - #if BUTTON_EXISTS(EN1) - SET_INPUT_PULLUP(BTN_EN1); - #endif - #if BUTTON_EXISTS(EN2) - SET_INPUT_PULLUP(BTN_EN2); - #endif - #if BUTTON_EXISTS(ENC) - SET_INPUT_PULLUP(BTN_ENC); - #endif - #if BUTTON_EXISTS(ENC_EN) - SET_INPUT_PULLUP(BTN_ENC_EN); - #endif - #if BUTTON_EXISTS(BACK) - SET_INPUT_PULLUP(BTN_BACK); - #endif - #if BUTTON_EXISTS(UP) - SET_INPUT(BTN_UP); - #endif - #if BUTTON_EXISTS(DWN) - SET_INPUT(BTN_DWN); - #endif - #if BUTTON_EXISTS(LFT) - SET_INPUT(BTN_LFT); - #endif - #if BUTTON_EXISTS(RT) - SET_INPUT(BTN_RT); + #if HAS_DIGITAL_BUTTONS + #if BUTTON_EXISTS(EN1) + SET_INPUT_PULLUP(BTN_EN1); + #endif + #if BUTTON_EXISTS(EN2) + SET_INPUT_PULLUP(BTN_EN2); + #endif + #if BUTTON_EXISTS(ENC) + SET_INPUT_PULLUP(BTN_ENC); + #endif + #if BUTTON_EXISTS(ENC_EN) + SET_INPUT_PULLUP(BTN_ENC_EN); + #endif + #if BUTTON_EXISTS(BACK) + SET_INPUT_PULLUP(BTN_BACK); + #endif + #if BUTTON_EXISTS(UP) + SET_INPUT(BTN_UP); + #endif + #if BUTTON_EXISTS(DWN) + SET_INPUT(BTN_DWN); + #endif + #if BUTTON_EXISTS(LFT) + SET_INPUT(BTN_LFT); + #endif + #if BUTTON_EXISTS(RT) + SET_INPUT(BTN_RT); + #endif #endif - #endif - - #if HAS_SHIFT_ENCODER - #if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register + #if HAS_SHIFT_ENCODER - SET_OUTPUT(SR_DATA_PIN); - SET_OUTPUT(SR_CLK_PIN); + #if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register - #elif PIN_EXISTS(SHIFT_CLK) + SET_OUTPUT(SR_DATA_PIN); + SET_OUTPUT(SR_CLK_PIN); - SET_OUTPUT(SHIFT_CLK_PIN); - OUT_WRITE(SHIFT_LD_PIN, HIGH); - #if PIN_EXISTS(SHIFT_EN) - OUT_WRITE(SHIFT_EN_PIN, LOW); - #endif - SET_INPUT_PULLUP(SHIFT_OUT_PIN); + #elif PIN_EXISTS(SHIFT_CLK) - #endif + SET_OUTPUT(SHIFT_CLK_PIN); + OUT_WRITE(SHIFT_LD_PIN, HIGH); + #if PIN_EXISTS(SHIFT_EN) + OUT_WRITE(SHIFT_EN_PIN, LOW); + #endif + SET_INPUT_PULLUP(SHIFT_OUT_PIN); - #endif // HAS_SHIFT_ENCODER + #endif - #if BOTH(HAS_ENCODER_ACTION, HAS_SLOW_BUTTONS) - slow_buttons = 0; - #endif + #endif // HAS_SHIFT_ENCODER - update_buttons(); + #if BOTH(HAS_ENCODER_ACTION, HAS_SLOW_BUTTONS) + slow_buttons = 0; + #endif - TERN_(HAS_ENCODER_ACTION, encoderDiff = 0); -} + update_buttons(); -bool MarlinUI::get_blink() { - static uint8_t blink = 0; - static millis_t next_blink_ms = 0; - millis_t ms = millis(); - if (ELAPSED(ms, next_blink_ms)) { - blink ^= 0xFF; - next_blink_ms = ms + 1000 - (LCD_UPDATE_INTERVAL) / 2; + TERN_(HAS_ENCODER_ACTION, encoderDiff = 0); } - return blink != 0; -} -//////////////////////////////////////////// -///////////// Keypad Handling ////////////// -//////////////////////////////////////////// + //////////////////////////////////////////// + ///////////// Keypad Handling ////////////// + //////////////////////////////////////////// -#if IS_RRW_KEYPAD && HAS_ENCODER_ACTION + #if IS_RRW_KEYPAD && HAS_ENCODER_ACTION - volatile uint8_t MarlinUI::keypad_buttons; + volatile uint8_t MarlinUI::keypad_buttons; - #if HAS_LCD_MENU && !HAS_ADC_BUTTONS + #if HAS_LCD_MENU && !HAS_ADC_BUTTONS - void lcd_move_x(); - void lcd_move_y(); - void lcd_move_z(); + void lcd_move_x(); + void lcd_move_y(); + void lcd_move_z(); - void _reprapworld_keypad_move(const AxisEnum axis, const int16_t dir) { - ui.manual_move.menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; - ui.encoderPosition = dir; - switch (axis) { - case X_AXIS: lcd_move_x(); break; - case Y_AXIS: lcd_move_y(); break; - case Z_AXIS: lcd_move_z(); - default: break; + void _reprapworld_keypad_move(const AxisEnum axis, const int16_t dir) { + ui.manual_move.menu_scale = REPRAPWORLD_KEYPAD_MOVE_STEP; + ui.encoderPosition = dir; + switch (axis) { + case X_AXIS: lcd_move_x(); break; + case Y_AXIS: lcd_move_y(); break; + case Z_AXIS: lcd_move_z(); + default: break; + } } - } - #endif + #endif - bool MarlinUI::handle_keypad() { + bool MarlinUI::handle_keypad() { - #if HAS_ADC_BUTTONS + #if HAS_ADC_BUTTONS - #define ADC_MIN_KEY_DELAY 100 - if (keypad_buttons) { - #if HAS_ENCODER_ACTION - refresh(LCDVIEW_REDRAW_NOW); - #if HAS_LCD_MENU - if (encoderDirection == -(ENCODERBASE)) { // HAS_ADC_BUTTONS forces REVERSE_MENU_DIRECTION, so this indicates menu navigation - if (RRK(EN_KEYPAD_UP)) encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; - else if (RRK(EN_KEYPAD_DOWN)) encoderPosition -= ENCODER_STEPS_PER_MENU_ITEM; - else if (RRK(EN_KEYPAD_LEFT)) { MenuItem_back::action(); quick_feedback(); } - else if (RRK(EN_KEYPAD_RIGHT)) { return_to_status(); quick_feedback(); } - } - else - #endif - { + #define ADC_MIN_KEY_DELAY 100 + if (keypad_buttons) { + #if HAS_ENCODER_ACTION + refresh(LCDVIEW_REDRAW_NOW); #if HAS_LCD_MENU - if (RRK(EN_KEYPAD_UP)) encoderPosition -= epps; - else if (RRK(EN_KEYPAD_DOWN)) encoderPosition += epps; - else if (RRK(EN_KEYPAD_LEFT)) { MenuItem_back::action(); quick_feedback(); } - else if (RRK(EN_KEYPAD_RIGHT)) encoderPosition = 0; - #else - if (RRK(EN_KEYPAD_UP) || RRK(EN_KEYPAD_LEFT)) encoderPosition -= epps; - else if (RRK(EN_KEYPAD_DOWN) || RRK(EN_KEYPAD_RIGHT)) encoderPosition += epps; + if (encoderDirection == -(ENCODERBASE)) { // HAS_ADC_BUTTONS forces REVERSE_MENU_DIRECTION, so this indicates menu navigation + if (RRK(EN_KEYPAD_UP)) encoderPosition += ENCODER_STEPS_PER_MENU_ITEM; + else if (RRK(EN_KEYPAD_DOWN)) encoderPosition -= ENCODER_STEPS_PER_MENU_ITEM; + else if (RRK(EN_KEYPAD_LEFT)) { MenuItem_back::action(); quick_feedback(); } + else if (RRK(EN_KEYPAD_RIGHT)) { return_to_status(); quick_feedback(); } + } + else #endif - } - #endif - next_button_update_ms = millis() + ADC_MIN_KEY_DELAY; - return true; - } - - #else // !HAS_ADC_BUTTONS + { + #if HAS_LCD_MENU + if (RRK(EN_KEYPAD_UP)) encoderPosition -= epps; + else if (RRK(EN_KEYPAD_DOWN)) encoderPosition += epps; + else if (RRK(EN_KEYPAD_LEFT)) { MenuItem_back::action(); quick_feedback(); } + else if (RRK(EN_KEYPAD_RIGHT)) encoderPosition = 0; + #else + if (RRK(EN_KEYPAD_UP) || RRK(EN_KEYPAD_LEFT)) encoderPosition -= epps; + else if (RRK(EN_KEYPAD_DOWN) || RRK(EN_KEYPAD_RIGHT)) encoderPosition += epps; + #endif + } + #endif + next_button_update_ms = millis() + ADC_MIN_KEY_DELAY; + return true; + } - static uint8_t keypad_debounce = 0; + #else // !HAS_ADC_BUTTONS - if (!RRK( EN_KEYPAD_F1 | EN_KEYPAD_F2 - | EN_KEYPAD_F3 | EN_KEYPAD_DOWN - | EN_KEYPAD_RIGHT | EN_KEYPAD_MIDDLE - | EN_KEYPAD_UP | EN_KEYPAD_LEFT ) - ) { - if (keypad_debounce > 0) keypad_debounce--; - } - else if (!keypad_debounce) { - keypad_debounce = 2; + static uint8_t keypad_debounce = 0; - const bool homed = all_axes_homed(); + if (!RRK( EN_KEYPAD_F1 | EN_KEYPAD_F2 + | EN_KEYPAD_F3 | EN_KEYPAD_DOWN + | EN_KEYPAD_RIGHT | EN_KEYPAD_MIDDLE + | EN_KEYPAD_UP | EN_KEYPAD_LEFT ) + ) { + if (keypad_debounce > 0) keypad_debounce--; + } + else if (!keypad_debounce) { + keypad_debounce = 2; - #if HAS_LCD_MENU + const bool homed = all_axes_homed(); - if (RRK(EN_KEYPAD_MIDDLE)) goto_screen(menu_move); + #if HAS_LCD_MENU - #if DISABLED(DELTA) && Z_HOME_DIR < 0 - if (RRK(EN_KEYPAD_F2)) _reprapworld_keypad_move(Z_AXIS, 1); - #endif + if (RRK(EN_KEYPAD_MIDDLE)) goto_screen(menu_move); - if (homed) { - #if ENABLED(DELTA) || Z_HOME_DIR != -1 - if (RRK(EN_KEYPAD_F2)) _reprapworld_keypad_move(Z_AXIS, 1); + #if NONE(DELTA, Z_HOME_TO_MAX) + if (RRK(EN_KEYPAD_F2)) _reprapworld_keypad_move(Z_AXIS, 1); #endif - if (RRK(EN_KEYPAD_F3)) _reprapworld_keypad_move(Z_AXIS, -1); - if (RRK(EN_KEYPAD_LEFT)) _reprapworld_keypad_move(X_AXIS, -1); - if (RRK(EN_KEYPAD_RIGHT)) _reprapworld_keypad_move(X_AXIS, 1); - if (RRK(EN_KEYPAD_DOWN)) _reprapworld_keypad_move(Y_AXIS, 1); - if (RRK(EN_KEYPAD_UP)) _reprapworld_keypad_move(Y_AXIS, -1); - } - #endif // HAS_LCD_MENU + if (homed) { + #if EITHER(DELTA, Z_HOME_TO_MAX) + if (RRK(EN_KEYPAD_F2)) _reprapworld_keypad_move(Z_AXIS, 1); + #endif + if (RRK(EN_KEYPAD_F3)) _reprapworld_keypad_move(Z_AXIS, -1); + if (RRK(EN_KEYPAD_LEFT)) _reprapworld_keypad_move(X_AXIS, -1); + if (RRK(EN_KEYPAD_RIGHT)) _reprapworld_keypad_move(X_AXIS, 1); + if (RRK(EN_KEYPAD_DOWN)) _reprapworld_keypad_move(Y_AXIS, 1); + if (RRK(EN_KEYPAD_UP)) _reprapworld_keypad_move(Y_AXIS, -1); + } - if (!homed && RRK(EN_KEYPAD_F1)) queue.inject_P(G28_STR); - return true; - } + #endif // HAS_LCD_MENU + + if (!homed && RRK(EN_KEYPAD_F1)) queue.inject_P(G28_STR); + return true; + } - #endif // !HAS_ADC_BUTTONS + #endif // !HAS_ADC_BUTTONS - return false; - } + return false; + } -#endif // IS_RRW_KEYPAD && HAS_ENCODER_ACTION + #endif // IS_RRW_KEYPAD && HAS_ENCODER_ACTION -/** - * Status Screen - * - * This is very display-dependent, so the lcd implementation draws this. - */ + /** + * Status Screen + * + * This is very display-dependent, so the lcd implementation draws this. + */ -#if ENABLED(LCD_PROGRESS_BAR) && !IS_TFTGLCD_PANEL - millis_t MarlinUI::progress_bar_ms; // = 0 - #if PROGRESS_MSG_EXPIRE > 0 - millis_t MarlinUI::expire_status_ms; // = 0 + #if BASIC_PROGRESS_BAR + millis_t MarlinUI::progress_bar_ms; // = 0 + #if PROGRESS_MSG_EXPIRE > 0 + millis_t MarlinUI::expire_status_ms; // = 0 + #endif #endif -#endif -void MarlinUI::status_screen() { + void MarlinUI::status_screen() { - TERN_(HAS_LCD_MENU, ENCODER_RATE_MULTIPLY(false)); + TERN_(HAS_LCD_MENU, ENCODER_RATE_MULTIPLY(false)); - #if ENABLED(LCD_PROGRESS_BAR) && !IS_TFTGLCD_PANEL + #if BASIC_PROGRESS_BAR - // - // HD44780 implements the following message blinking and - // message expiration because Status Line and Progress Bar - // share the same line on the display. - // + // + // HD44780 implements the following message blinking and + // message expiration because Status Line and Progress Bar + // share the same line on the display. + // - #if DISABLED(PROGRESS_MSG_ONCE) || (PROGRESS_MSG_EXPIRE > 0) - #define GOT_MS - const millis_t ms = millis(); - #endif + #if DISABLED(PROGRESS_MSG_ONCE) || (PROGRESS_MSG_EXPIRE > 0) + #define GOT_MS + const millis_t ms = millis(); + #endif - // If the message will blink rather than expire... - #if DISABLED(PROGRESS_MSG_ONCE) - if (ELAPSED(ms, progress_bar_ms + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME)) - progress_bar_ms = ms; - #endif + // If the message will blink rather than expire... + #if DISABLED(PROGRESS_MSG_ONCE) + if (ELAPSED(ms, progress_bar_ms + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME)) + progress_bar_ms = ms; + #endif - #if PROGRESS_MSG_EXPIRE > 0 + #if PROGRESS_MSG_EXPIRE > 0 - // Handle message expire - if (expire_status_ms) { + // Handle message expire + if (expire_status_ms) { - // Expire the message if a job is active and the bar has ticks - if (get_progress_percent() > 2 && !print_job_timer.isPaused()) { - if (ELAPSED(ms, expire_status_ms)) { - status_message[0] = '\0'; - expire_status_ms = 0; + // Expire the message if a job is active and the bar has ticks + if (get_progress_percent() > 2 && !print_job_timer.isPaused()) { + if (ELAPSED(ms, expire_status_ms)) { + status_message[0] = '\0'; + expire_status_ms = 0; + } + } + else { + // Defer message expiration before bar appears + // and during any pause (not just SD) + expire_status_ms += LCD_UPDATE_INTERVAL; } } - else { - // Defer message expiration before bar appears - // and during any pause (not just SD) - expire_status_ms += LCD_UPDATE_INTERVAL; - } - } - #endif // PROGRESS_MSG_EXPIRE + #endif // PROGRESS_MSG_EXPIRE - #endif // LCD_PROGRESS_BAR + #endif // BASIC_PROGRESS_BAR - #if HAS_LCD_MENU - if (use_click()) { - #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) - next_filament_display = millis() + 5000UL; // Show status message for 5s - #endif - goto_screen(menu_main); - #if DISABLED(NO_LCD_REINIT) - init_lcd(); // May revive the LCD if static electricity killed it - #endif - return; - } + #if HAS_LCD_MENU + if (use_click()) { + #if BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + next_filament_display = millis() + 5000UL; // Show status message for 5s + #endif + goto_screen(menu_main); + #if DISABLED(NO_LCD_REINIT) + init_lcd(); // May revive the LCD if static electricity killed it + #endif + return; + } - #endif + #endif - #if ENABLED(ULTIPANEL_FEEDMULTIPLY) + #if ENABLED(ULTIPANEL_FEEDMULTIPLY) - const int16_t old_frm = feedrate_percentage; - int16_t new_frm = old_frm + int16_t(encoderPosition); + const int16_t old_frm = feedrate_percentage; + int16_t new_frm = old_frm + int16_t(encoderPosition); - // Dead zone at 100% feedrate - if (old_frm == 100) { - if (int16_t(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) - new_frm -= ENCODER_FEEDRATE_DEADZONE; - else if (int16_t(encoderPosition) < -(ENCODER_FEEDRATE_DEADZONE)) - new_frm += ENCODER_FEEDRATE_DEADZONE; - else - new_frm = old_frm; - } - else if ((old_frm < 100 && new_frm > 100) || (old_frm > 100 && new_frm < 100)) - new_frm = 100; - - LIMIT(new_frm, 10, 999); - - if (old_frm != new_frm) { - feedrate_percentage = new_frm; - encoderPosition = 0; - #if BOTH(HAS_BUZZER, BEEP_ON_FEEDRATE_CHANGE) - static millis_t next_beep; - #ifndef GOT_MS - const millis_t ms = millis(); + // Dead zone at 100% feedrate + if (old_frm == 100) { + if (int16_t(encoderPosition) > ENCODER_FEEDRATE_DEADZONE) + new_frm -= ENCODER_FEEDRATE_DEADZONE; + else if (int16_t(encoderPosition) < -(ENCODER_FEEDRATE_DEADZONE)) + new_frm += ENCODER_FEEDRATE_DEADZONE; + else + new_frm = old_frm; + } + else if ((old_frm < 100 && new_frm > 100) || (old_frm > 100 && new_frm < 100)) + new_frm = 100; + + LIMIT(new_frm, 10, 999); + + if (old_frm != new_frm) { + feedrate_percentage = new_frm; + encoderPosition = 0; + #if BOTH(HAS_BUZZER, BEEP_ON_FEEDRATE_CHANGE) + static millis_t next_beep; + #ifndef GOT_MS + const millis_t ms = millis(); + #endif + if (ELAPSED(ms, next_beep)) { + buzz(FEEDRATE_CHANGE_BEEP_DURATION, FEEDRATE_CHANGE_BEEP_FREQUENCY); + next_beep = ms + 500UL; + } #endif - if (ELAPSED(ms, next_beep)) { - buzz(FEEDRATE_CHANGE_BEEP_DURATION, FEEDRATE_CHANGE_BEEP_FREQUENCY); - next_beep = ms + 500UL; - } - #endif - } + } - #endif // ULTIPANEL_FEEDMULTIPLY + #endif // ULTIPANEL_FEEDMULTIPLY - draw_status_screen(); -} + draw_status_screen(); + } -void MarlinUI::kill_screen(PGM_P lcd_error, PGM_P lcd_component) { - init(); - status_printf_P(1, PSTR(S_FMT ": " S_FMT), lcd_error, lcd_component); - TERN_(HAS_LCD_MENU, return_to_status()); + void MarlinUI::kill_screen(PGM_P lcd_error, PGM_P lcd_component) { + init(); + status_printf_P(1, PSTR(S_FMT ": " S_FMT), lcd_error, lcd_component); + TERN_(HAS_LCD_MENU, return_to_status()); - // RED ALERT. RED ALERT. - #ifdef LED_BACKLIGHT_TIMEOUT - leds.set_color(LEDColorRed()); - #ifdef NEOPIXEL_BKGD_LED_INDEX - neo.set_pixel_color(NEOPIXEL_BKGD_LED_INDEX, 255, 0, 0, 0); - neo.show(); + // RED ALERT. RED ALERT. + #ifdef LED_BACKLIGHT_TIMEOUT + leds.set_color(LEDColorRed()); + #ifdef NEOPIXEL_BKGD_INDEX_FIRST + neo.set_background_color(255, 0, 0, 0); + neo.show(); + #endif #endif - #endif - - draw_kill_screen(); -} - -void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) { - - TERN_(HAS_LCD_MENU, refresh()); - #if HAS_ENCODER_ACTION - if (clear_buttons) buttons = 0; - next_button_update_ms = millis() + 500; - #else - UNUSED(clear_buttons); - #endif + draw_kill_screen(); + } - #if HAS_CHIRP - chirp(); // Buzz and wait. Is the delay needed for buttons to settle? - #if BOTH(HAS_LCD_MENU, USE_BEEPER) - for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } - #elif HAS_LCD_MENU - delay(10); + #if HAS_TOUCH_SLEEP + #if HAS_TOUCH_BUTTONS + #include "touch/touch_buttons.h" + #else + #include "tft/touch.h" #endif + // Wake up a sleeping TFT + void MarlinUI::wakeup_screen() { + TERN(HAS_TOUCH_BUTTONS, touchBt.wakeUp(), touch.wakeUp()); + } #endif -} - -//////////////////////////////////////////// -/////////////// Manual Move //////////////// -//////////////////////////////////////////// - -#if HAS_LCD_MENU - ManualMove MarlinUI::manual_move{}; + void MarlinUI::quick_feedback(const bool clear_buttons/*=true*/) { + TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); // Wake up the TFT with most buttons + TERN_(HAS_LCD_MENU, refresh()); - millis_t ManualMove::start_time = 0; - float ManualMove::menu_scale = 1; - #if IS_KINEMATIC - float ManualMove::offset = 0; - xyze_pos_t ManualMove::all_axes_destination = { 0 }; - bool ManualMove::processing = false; - #endif - TERN_(MULTI_MANUAL, int8_t ManualMove::e_index = 0); - AxisEnum ManualMove::axis = NO_AXIS; - - /** - * If a manual move has been posted and its time has arrived, and if the planner - * has a space for it, then add a linear move to current_position the planner. - * - * If any manual move needs to be interrupted, make sure to force a manual move - * by setting manual_move.start_time to millis() after updating current_position. - * - * To post a manual move: - * - Update current_position to the new place you want to go. - * - Set manual_move.axis to an axis like X_AXIS. Use ALL_AXES for diagonal moves. - * - Set manual_move.start_time to a point in the future (in ms) when the move should be done. - * - * For kinematic machines: - * - Set manual_move.offset to modify one axis and post the move. - * This is used to achieve more rapid stepping on kinematic machines. - * - * Currently used by the _lcd_move_xyz function in menu_motion.cpp - * and the ubl_map_move_to_xy funtion in menu_ubl.cpp. - */ - void ManualMove::task() { + #if HAS_ENCODER_ACTION + if (clear_buttons) buttons = 0; + next_button_update_ms = millis() + 500; + #else + UNUSED(clear_buttons); + #endif - if (processing) return; // Prevent re-entry from idle() calls + #if HAS_CHIRP + chirp(); // Buzz and wait. Is the delay needed for buttons to settle? + #if BOTH(HAS_LCD_MENU, USE_BEEPER) + for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } + #elif HAS_LCD_MENU + delay(10); + #endif + #endif + } - // Add a manual move to the queue? - if (axis != NO_AXIS && ELAPSED(millis(), start_time) && !planner.is_full()) { + //////////////////////////////////////////// + /////////////// Manual Move //////////////// + //////////////////////////////////////////// - const feedRate_t fr_mm_s = (axis <= E_AXIS) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; + #if HAS_LCD_MENU - #if IS_KINEMATIC + ManualMove MarlinUI::manual_move{}; - #if HAS_MULTI_EXTRUDER - REMEMBER(ae, active_extruder); - if (axis == E_AXIS) active_extruder = e_index; - #endif + millis_t ManualMove::start_time = 0; + float ManualMove::menu_scale = 1; + #if IS_KINEMATIC + float ManualMove::offset = 0; + xyze_pos_t ManualMove::all_axes_destination = { 0 }; + bool ManualMove::processing = false; + #endif + #if MULTI_E_MANUAL + int8_t ManualMove::e_index = 0; + #endif + AxisEnum ManualMove::axis = NO_AXIS_ENUM; + + /** + * If a manual move has been posted and its time has arrived, and if the planner + * has a space for it, then add a linear move to current_position the planner. + * + * If any manual move needs to be interrupted, make sure to force a manual move + * by setting manual_move.start_time to millis() after updating current_position. + * + * To post a manual move: + * - Update current_position to the new place you want to go. + * - Set manual_move.axis to an axis like X_AXIS. Use ALL_AXES_ENUM for diagonal moves. + * - Set manual_move.start_time to a point in the future (in ms) when the move should be done. + * + * For kinematic machines: + * - Set manual_move.offset to modify one axis and post the move. + * This is used to achieve more rapid stepping on kinematic machines. + * + * Currently used by the _lcd_move_xyz function in menu_motion.cpp + * and the ubl_map_move_to_xy function in menu_ubl.cpp. + */ + void ManualMove::task() { + + if (processing) return; // Prevent re-entry from idle() calls + + // Add a manual move to the queue? + if (axis != NO_AXIS_ENUM && ELAPSED(millis(), start_time) && !planner.is_full()) { + + const feedRate_t fr_mm_s = (axis <= LOGICAL_AXES) ? manual_feedrate_mm_s[axis] : XY_PROBE_FEEDRATE_MM_S; + + #if IS_KINEMATIC + + #if HAS_MULTI_EXTRUDER + REMEMBER(ae, active_extruder); + #if MULTI_E_MANUAL + if (axis == E_AXIS) active_extruder = e_index; + #endif + #endif - // Apply a linear offset to a single axis - if (axis == ALL_AXES) - destination = all_axes_destination; - else if (axis <= XYZE) { - destination = current_position; - destination[axis] += offset; - } + // Apply a linear offset to a single axis + if (axis == ALL_AXES_ENUM) + destination = all_axes_destination; + else if (axis <= XYZE) { + destination = current_position; + destination[axis] += offset; + } - // Reset for the next move - offset = 0; - axis = NO_AXIS; + // Reset for the next move + offset = 0; + axis = NO_AXIS_ENUM; - // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to - // move_to_destination. This will cause idle() to be called, which can then call this function while the - // previous invocation is being blocked. Modifications to offset shouldn't be made while - // processing is true or the planner will get out of sync. - processing = true; - prepare_internal_move_to_destination(fr_mm_s); // will set current_position from destination - processing = false; + // DELTA and SCARA machines use segmented moves, which could fill the planner during the call to + // move_to_destination. This will cause idle() to be called, which can then call this function while the + // previous invocation is being blocked. Modifications to offset shouldn't be made while + // processing is true or the planner will get out of sync. + processing = true; + prepare_internal_move_to_destination(fr_mm_s); // will set current_position from destination + processing = false; - #else + #else - // For Cartesian / Core motion simply move to the current_position - planner.buffer_line(current_position, fr_mm_s, axis == E_AXIS ? e_index : active_extruder); + // For Cartesian / Core motion simply move to the current_position + planner.buffer_line(current_position, fr_mm_s, + TERN_(MULTI_E_MANUAL, axis == E_AXIS ? e_index :) active_extruder + ); - //SERIAL_ECHOLNPAIR("Add planner.move with Axis ", int(axis), " at FR ", fr_mm_s); + //SERIAL_ECHOLNPGM("Add planner.move with Axis ", AS_CHAR(axis_codes[axis]), " at FR ", fr_mm_s); - axis = NO_AXIS; + axis = NO_AXIS_ENUM; - #endif + #endif + } } - } - // - // Tell ui.update() to start a move to current_position after a short delay. - // - void ManualMove::soon(AxisEnum move_axis - #if MULTI_MANUAL - , const int8_t eindex/*=-1*/ - #endif - ) { - #if MULTI_MANUAL - if (move_axis == E_AXIS) e_index = eindex >= 0 ? eindex : active_extruder; - #endif - start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves - axis = move_axis; - //SERIAL_ECHOLNPAIR("Post Move with Axis ", int(axis), " soon."); - } + // + // Tell ui.update() to start a move to current_position after a short delay. + // + void ManualMove::soon(const AxisEnum move_axis + OPTARG(MULTI_E_MANUAL, const int8_t eindex/*=active_extruder*/) + ) { + TERN_(MULTI_E_MANUAL, if (move_axis == E_AXIS) e_index = eindex); + start_time = millis() + (menu_scale < 0.99f ? 0UL : 250UL); // delay for bigger moves + axis = move_axis; + //SERIAL_ECHOLNPGM("Post Move with Axis ", AS_CHAR(axis_codes[axis]), " soon."); + } - #if ENABLED(AUTO_BED_LEVELING_UBL) + #if ENABLED(AUTO_BED_LEVELING_UBL) - void MarlinUI::external_encoder() { - if (external_control && encoderDiff) { - ubl.encoder_diff += encoderDiff; // Encoder for UBL G29 mesh editing - encoderDiff = 0; // Hide encoder events from the screen handler - refresh(LCDVIEW_REDRAW_NOW); // ...but keep the refresh. + void MarlinUI::external_encoder() { + if (external_control && encoderDiff) { + ubl.encoder_diff += encoderDiff; // Encoder for UBL G29 mesh editing + encoderDiff = 0; // Hide encoder events from the screen handler + refresh(LCDVIEW_REDRAW_NOW); // ...but keep the refresh. + } } - } - - #endif -#endif // HAS_LCD_MENU + #endif -/** - * Update the LCD, read encoder buttons, etc. - * - Read button states - * - Check the SD Card slot state - * - Act on RepRap World keypad input - * - Update the encoder position - * - Apply acceleration to the encoder position - * - Do refresh(LCDVIEW_CALL_REDRAW_NOW) on controller events - * - Reset the Info Screen timeout if there's any input - * - Update status indicators, if any - * - * Run the current LCD menu handler callback function: - * - Call the handler only if lcdDrawUpdate != LCDVIEW_NONE - * - Before calling the handler, LCDVIEW_CALL_NO_REDRAW => LCDVIEW_NONE - * - Call the menu handler. Menu handlers should do the following: - * - If a value changes, set lcdDrawUpdate to LCDVIEW_REDRAW_NOW and draw the value - * (Encoder events automatically set lcdDrawUpdate for you.) - * - if (should_draw()) { redraw } - * - Before exiting the handler set lcdDrawUpdate to: - * - LCDVIEW_CLEAR_CALL_REDRAW to clear screen and set LCDVIEW_CALL_REDRAW_NEXT. - * - LCDVIEW_REDRAW_NOW to draw now (including remaining stripes). - * - LCDVIEW_CALL_REDRAW_NEXT to draw now and get LCDVIEW_REDRAW_NOW on the next loop. - * - LCDVIEW_CALL_NO_REDRAW to draw now and get LCDVIEW_NONE on the next loop. - * - NOTE: For graphical displays menu handlers may be called 2 or more times per loop, - * so don't change lcdDrawUpdate without considering this. - * - * After the menu handler callback runs (or not): - * - Clear the LCD if lcdDrawUpdate == LCDVIEW_CLEAR_CALL_REDRAW - * - Update lcdDrawUpdate for the next loop (i.e., move one state down, usually) - * - * This function is only called from the main thread. - */ + #endif // HAS_LCD_MENU -LCDViewAction MarlinUI::lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; -millis_t next_lcd_update_ms; -#if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS - millis_t MarlinUI::return_to_status_ms = 0; -#endif + /** + * Update the LCD, read encoder buttons, etc. + * - Read button states + * - Check the SD Card slot state + * - Act on RepRap World keypad input + * - Update the encoder position + * - Apply acceleration to the encoder position + * - Do refresh(LCDVIEW_CALL_REDRAW_NOW) on controller events + * - Reset the Info Screen timeout if there's any input + * - Update status indicators, if any + * + * Run the current LCD menu handler callback function: + * - Call the handler only if lcdDrawUpdate != LCDVIEW_NONE + * - Before calling the handler, LCDVIEW_CALL_NO_REDRAW => LCDVIEW_NONE + * - Call the menu handler. Menu handlers should do the following: + * - If a value changes, set lcdDrawUpdate to LCDVIEW_REDRAW_NOW and draw the value + * (Encoder events automatically set lcdDrawUpdate for you.) + * - if (should_draw()) { redraw } + * - Before exiting the handler set lcdDrawUpdate to: + * - LCDVIEW_CLEAR_CALL_REDRAW to clear screen and set LCDVIEW_CALL_REDRAW_NEXT. + * - LCDVIEW_REDRAW_NOW to draw now (including remaining stripes). + * - LCDVIEW_CALL_REDRAW_NEXT to draw now and get LCDVIEW_REDRAW_NOW on the next loop. + * - LCDVIEW_CALL_NO_REDRAW to draw now and get LCDVIEW_NONE on the next loop. + * - NOTE: For graphical displays menu handlers may be called 2 or more times per loop, + * so don't change lcdDrawUpdate without considering this. + * + * After the menu handler callback runs (or not): + * - Clear the LCD if lcdDrawUpdate == LCDVIEW_CLEAR_CALL_REDRAW + * - Update lcdDrawUpdate for the next loop (i.e., move one state down, usually) + * + * This function is only called from the main thread. + */ -inline bool can_encode() { - return !BUTTON_PRESSED(ENC_EN); // Update encoder only when ENC_EN is not LOW (pressed) -} + LCDViewAction MarlinUI::lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; + millis_t next_lcd_update_ms; -void MarlinUI::update() { + inline bool can_encode() { + return !BUTTON_PRESSED(ENC_EN); // Update encoder only when ENC_EN is not LOW (pressed) + } - static uint16_t max_display_update_time = 0; - millis_t ms = millis(); + void MarlinUI::update() { - #if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS > 0 - #define RESET_STATUS_TIMEOUT() (return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS) - #else - #define RESET_STATUS_TIMEOUT() NOOP - #endif + static uint16_t max_display_update_time = 0; + millis_t ms = millis(); - #ifdef LED_BACKLIGHT_TIMEOUT - leds.update_timeout(powersupply_on); - #endif + #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT) + leds.update_timeout(powerManager.psu_on); + #endif - #if HAS_LCD_MENU + #if HAS_LCD_MENU - // Handle any queued Move Axis motion - manual_move.task(); + // Handle any queued Move Axis motion + manual_move.task(); - // Update button states for button_pressed(), etc. - // If the state changes the next update may be delayed 300-500ms. - update_buttons(); + // Update button states for button_pressed(), etc. + // If the state changes the next update may be delayed 300-500ms. + update_buttons(); - // If the action button is pressed... - static bool wait_for_unclick; // = false + // If the action button is pressed... + static bool wait_for_unclick; // = false - auto do_click = [&]{ - wait_for_unclick = true; // - Set debounce flag to ignore continous clicks - lcd_clicked = !wait_for_user; // - Keep the click if not waiting for a user-click - wait_for_user = false; // - Any click clears wait for user - quick_feedback(); // - Always make a click sound - }; + auto do_click = [&]{ + wait_for_unclick = true; // - Set debounce flag to ignore continuous clicks + lcd_clicked = !wait_for_user; // - Keep the click if not waiting for a user-click + wait_for_user = false; // - Any click clears wait for user + quick_feedback(); // - Always make a click sound + }; - #if HAS_TOUCH_BUTTONS - if (touch_buttons) { - RESET_STATUS_TIMEOUT(); - if (touch_buttons & (EN_A | EN_B)) { // Menu arrows, in priority - if (ELAPSED(ms, next_button_update_ms)) { - encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * epps * encoderDirection; - if (touch_buttons & EN_A) encoderDiff *= -1; - TERN_(AUTO_BED_LEVELING_UBL, external_encoder()); - next_button_update_ms = ms + repeat_delay; // Assume the repeat delay - if (!wait_for_unclick) { - next_button_update_ms += 250; // Longer delay on first press - wait_for_unclick = true; // Avoid Back/Select click while repeating - chirp(); + #if HAS_TOUCH_BUTTONS + if (touch_buttons) { + reset_status_timeout(ms); + if (touch_buttons & (EN_A | EN_B)) { // Menu arrows, in priority + if (ELAPSED(ms, next_button_update_ms)) { + encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * epps * encoderDirection; + if (touch_buttons & EN_A) encoderDiff *= -1; + TERN_(AUTO_BED_LEVELING_UBL, external_encoder()); + next_button_update_ms = ms + repeat_delay; // Assume the repeat delay + if (!wait_for_unclick) { + next_button_update_ms += 250; // Longer delay on first press + wait_for_unclick = true; // Avoid Back/Select click while repeating + chirp(); + } } } + else if (!wait_for_unclick && (buttons & EN_C)) // OK button, if not waiting for a debounce release: + do_click(); } - else if (!wait_for_unclick && (buttons & EN_C)) // OK button, if not waiting for a debounce release: - do_click(); - } - // keep wait_for_unclick value - #endif + // keep wait_for_unclick value + #endif - if (!touch_buttons) { - // Integrated LCD click handling via button_pressed - if (!external_control && button_pressed()) { - if (!wait_for_unclick) do_click(); // Handle the click + if (!touch_buttons) { + // Integrated LCD click handling via button_pressed + if (!external_control && button_pressed()) { + if (!wait_for_unclick) do_click(); // Handle the click + } + else + wait_for_unclick = false; } - else - wait_for_unclick = false; - } - if (LCD_BACK_CLICKED()) { - quick_feedback(); - goto_previous_screen(); - } - - #endif // HAS_LCD_MENU + if (LCD_BACK_CLICKED()) { + quick_feedback(); + goto_previous_screen(); + } - if (ELAPSED(ms, next_lcd_update_ms) || TERN0(HAS_MARLINUI_U8GLIB, drawing_screen)) { + #endif // HAS_LCD_MENU - next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL; + if (ELAPSED(ms, next_lcd_update_ms) || TERN0(HAS_MARLINUI_U8GLIB, drawing_screen)) { - #if HAS_TOUCH_BUTTONS + next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL; - if (on_status_screen()) next_lcd_update_ms += (LCD_UPDATE_INTERVAL) * 2; + #if HAS_TOUCH_BUTTONS - TERN_(HAS_ENCODER_ACTION, touch_buttons = touch.read_buttons()); + if (on_status_screen()) next_lcd_update_ms += (LCD_UPDATE_INTERVAL) * 2; - #endif + TERN_(HAS_ENCODER_ACTION, touch_buttons = touchBt.read_buttons()); - TERN_(LCD_HAS_STATUS_INDICATORS, update_indicators()); + #endif - #if HAS_ENCODER_ACTION + TERN_(LCD_HAS_STATUS_INDICATORS, update_indicators()); - TERN_(HAS_SLOW_BUTTONS, slow_buttons = read_slow_buttons()); // Buttons that take too long to read in interrupt context + #if HAS_ENCODER_ACTION - if (TERN0(IS_RRW_KEYPAD, handle_keypad())) - RESET_STATUS_TIMEOUT(); + TERN_(HAS_SLOW_BUTTONS, slow_buttons = read_slow_buttons()); // Buttons that take too long to read in interrupt context - uint8_t abs_diff = ABS(encoderDiff); + if (TERN0(IS_RRW_KEYPAD, handle_keypad())) + reset_status_timeout(ms); - #if ENCODER_PULSES_PER_STEP > 1 - // When reversing the encoder direction, a movement step can be missed because - // encoderDiff has a non-zero residual value, making the controller unresponsive. - // The fix clears the residual value when the encoder is idle. - // Also check if past half the threshold to compensate for missed single steps. - static int8_t lastEncoderDiff; + uint8_t abs_diff = ABS(encoderDiff); - // Timeout? No decoder change since last check. 10 or 20 times per second. - if (encoderDiff == lastEncoderDiff && abs_diff <= epps / 2) // Same direction & size but not over a half-step? - encoderDiff = 0; // Clear residual pulses. - else if (WITHIN(abs_diff, epps / 2 + 1, epps - 1)) { // Past half of threshold? - abs_diff = epps; // Treat as a full step size - encoderDiff = (encoderDiff < 0 ? -1 : 1) * abs_diff; // ...in the spin direction. - } - lastEncoderDiff = encoderDiff; - #endif + #if ENCODER_PULSES_PER_STEP > 1 + // When reversing the encoder direction, a movement step can be missed because + // encoderDiff has a non-zero residual value, making the controller unresponsive. + // The fix clears the residual value when the encoder is idle. + // Also check if past half the threshold to compensate for missed single steps. + static int8_t lastEncoderDiff; - const bool encoderPastThreshold = (abs_diff >= epps); - if (encoderPastThreshold || lcd_clicked) { - if (encoderPastThreshold && TERN1(IS_TFTGLCD_PANEL, !external_control)) { + // Timeout? No decoder change since last check. 10 or 20 times per second. + if (encoderDiff == lastEncoderDiff && abs_diff <= epps / 2) // Same direction & size but not over a half-step? + encoderDiff = 0; // Clear residual pulses. + else if (WITHIN(abs_diff, epps / 2 + 1, epps - 1)) { // Past half of threshold? + abs_diff = epps; // Treat as a full step size + encoderDiff = (encoderDiff < 0 ? -1 : 1) * abs_diff; // ...in the spin direction. + } + TERN_(HAS_TOUCH_SLEEP, if (lastEncoderDiff != encoderDiff) wakeup_screen()); + lastEncoderDiff = encoderDiff; + #endif - #if BOTH(HAS_LCD_MENU, ENCODER_RATE_MULTIPLIER) + const bool encoderPastThreshold = (abs_diff >= epps); + if (encoderPastThreshold || lcd_clicked) { + if (encoderPastThreshold && TERN1(IS_TFTGLCD_PANEL, !external_control)) { - int32_t encoderMultiplier = 1; + #if BOTH(HAS_LCD_MENU, ENCODER_RATE_MULTIPLIER) - if (encoderRateMultiplierEnabled) { - const float encoderMovementSteps = float(abs_diff) / epps; + int32_t encoderMultiplier = 1; - if (lastEncoderMovementMillis) { - // Note that the rate is always calculated between two passes through the - // loop and that the abs of the encoderDiff value is tracked. - const float encoderStepRate = encoderMovementSteps / float(ms - lastEncoderMovementMillis) * 1000; + if (encoderRateMultiplierEnabled) { + const float encoderMovementSteps = float(abs_diff) / epps; - if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; - else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; + if (lastEncoderMovementMillis) { + // Note that the rate is always calculated between two passes through the + // loop and that the abs of the encoderDiff value is tracked. + const float encoderStepRate = encoderMovementSteps / float(ms - lastEncoderMovementMillis) * 1000; - // Enable to output the encoder steps per second value - //#define ENCODER_RATE_MULTIPLIER_DEBUG - #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR("Enc Step Rate: ", encoderStepRate); - SERIAL_ECHOPAIR(" Multiplier: ", encoderMultiplier); - SERIAL_ECHOPAIR(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); - SERIAL_ECHOPAIR(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); - SERIAL_EOL(); - #endif - } + if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100; + else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10; - lastEncoderMovementMillis = ms; - } // encoderRateMultiplierEnabled + // Enable to output the encoder steps per second value + //#define ENCODER_RATE_MULTIPLIER_DEBUG + #if ENABLED(ENCODER_RATE_MULTIPLIER_DEBUG) + SERIAL_ECHO_START(); + SERIAL_ECHOPGM("Enc Step Rate: ", encoderStepRate); + SERIAL_ECHOPGM(" Multiplier: ", encoderMultiplier); + SERIAL_ECHOPGM(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC); + SERIAL_ECHOPGM(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC); + SERIAL_EOL(); + #endif + } - #else + lastEncoderMovementMillis = ms; + } // encoderRateMultiplierEnabled - constexpr int32_t encoderMultiplier = 1; + #else - #endif // ENCODER_RATE_MULTIPLIER + constexpr int32_t encoderMultiplier = 1; - if (can_encode()) encoderPosition += (encoderDiff * encoderMultiplier) / epps; + #endif // ENCODER_RATE_MULTIPLIER - encoderDiff = 0; - } + if (can_encode()) encoderPosition += (encoderDiff * encoderMultiplier) / epps; - RESET_STATUS_TIMEOUT(); + encoderDiff = 0; + } - refresh(LCDVIEW_REDRAW_NOW); + reset_status_timeout(ms); - #ifdef LED_BACKLIGHT_TIMEOUT - leds.reset_timeout(ms); - #endif - } + refresh(LCDVIEW_REDRAW_NOW); - #endif + #if ENABLED(PSU_CONTROL) && defined(LED_BACKLIGHT_TIMEOUT) + if (!powerManager.psu_on) leds.reset_timeout(ms); + #endif + } - // This runs every ~100ms when idling often enough. - // Instead of tracking changes just redraw the Status Screen once per second. - if (on_status_screen() && !lcd_status_update_delay--) { - lcd_status_update_delay = TERN(HAS_MARLINUI_U8GLIB, 12, 9); - if (max_display_update_time) max_display_update_time--; // Be sure never go to a very big number - refresh(LCDVIEW_REDRAW_NOW); - } + #endif - #if BOTH(HAS_LCD_MENU, SCROLL_LONG_FILENAMES) - // If scrolling of long file names is enabled and we are in the sd card menu, - // cause a refresh to occur until all the text has scrolled into view. - if (currentScreen == menu_media && !lcd_status_update_delay--) { - lcd_status_update_delay = ++filename_scroll_pos >= filename_scroll_max ? 12 : 4; // Long delay at end and start - if (filename_scroll_pos > filename_scroll_max) filename_scroll_pos = 0; + // This runs every ~100ms when idling often enough. + // Instead of tracking changes just redraw the Status Screen once per second. + if (on_status_screen() && !lcd_status_update_delay--) { + lcd_status_update_delay = TERN(HAS_MARLINUI_U8GLIB, 12, 9); + if (max_display_update_time) max_display_update_time--; // Be sure never go to a very big number refresh(LCDVIEW_REDRAW_NOW); - RESET_STATUS_TIMEOUT(); } - #endif - - // Then we want to use only 50% of the time - const uint16_t bbr2 = planner.block_buffer_runtime() >> 1; - - if ((should_draw() || drawing_screen) && (!bbr2 || bbr2 > max_display_update_time)) { - // Change state of drawing flag between screen updates - if (!drawing_screen) switch (lcdDrawUpdate) { - case LCDVIEW_CALL_NO_REDRAW: - refresh(LCDVIEW_NONE); - break; - case LCDVIEW_CLEAR_CALL_REDRAW: - case LCDVIEW_CALL_REDRAW_NEXT: + #if BOTH(HAS_LCD_MENU, SCROLL_LONG_FILENAMES) + // If scrolling of long file names is enabled and we are in the sd card menu, + // cause a refresh to occur until all the text has scrolled into view. + if (currentScreen == menu_media && !lcd_status_update_delay--) { + lcd_status_update_delay = ++filename_scroll_pos >= filename_scroll_max ? 12 : 4; // Long delay at end and start + if (filename_scroll_pos > filename_scroll_max) filename_scroll_pos = 0; refresh(LCDVIEW_REDRAW_NOW); - case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT - case LCDVIEW_NONE: - break; - } // switch + reset_status_timeout(ms); + } + #endif - TERN_(HAS_ADC_BUTTONS, keypad_buttons = 0); + // Then we want to use only 50% of the time + const uint16_t bbr2 = planner.block_buffer_runtime() >> 1; + + if ((should_draw() || drawing_screen) && (!bbr2 || bbr2 > max_display_update_time)) { + + // Change state of drawing flag between screen updates + if (!drawing_screen) switch (lcdDrawUpdate) { + case LCDVIEW_CALL_NO_REDRAW: + refresh(LCDVIEW_NONE); + break; + case LCDVIEW_CLEAR_CALL_REDRAW: + case LCDVIEW_CALL_REDRAW_NEXT: + refresh(LCDVIEW_REDRAW_NOW); + case LCDVIEW_REDRAW_NOW: // set above, or by a handler through LCDVIEW_CALL_REDRAW_NEXT + case LCDVIEW_NONE: + break; + } // switch + + TERN_(HAS_ADC_BUTTONS, keypad_buttons = 0); + + #if HAS_MARLINUI_U8GLIB + + #if ENABLED(LIGHTWEIGHT_UI) + const bool in_status = on_status_screen(), + do_u8g_loop = !in_status; + lcd_in_status(in_status); + if (in_status) status_screen(); + #else + constexpr bool do_u8g_loop = true; + #endif - #if HAS_MARLINUI_U8GLIB + if (do_u8g_loop) { + if (!drawing_screen) { // If not already drawing pages + u8g.firstPage(); // Start the first page + drawing_screen = first_page = true; // Flag as drawing pages + } + set_font(FONT_MENU); // Setup font for every page draw + u8g.setColorIndex(1); // And reset the color + run_current_screen(); // Draw and process the current screen + first_page = false; + + // The screen handler can clear drawing_screen for an action that changes the screen. + // If still drawing and there's another page, update max-time and return now. + // The nextPage will already be set up on the next call. + if (drawing_screen && (drawing_screen = u8g.nextPage())) { + if (on_status_screen()) + NOLESS(max_display_update_time, millis() - ms); + return; + } + } - #if ENABLED(LIGHTWEIGHT_UI) - const bool in_status = on_status_screen(), - do_u8g_loop = !in_status; - lcd_in_status(in_status); - if (in_status) status_screen(); #else - constexpr bool do_u8g_loop = true; - #endif - if (do_u8g_loop) { - if (!drawing_screen) { // If not already drawing pages - u8g.firstPage(); // Start the first page - drawing_screen = first_page = true; // Flag as drawing pages - } - set_font(FONT_MENU); // Setup font for every page draw - u8g.setColorIndex(1); // And reset the color - run_current_screen(); // Draw and process the current screen - first_page = false; - - // The screen handler can clear drawing_screen for an action that changes the screen. - // If still drawing and there's another page, update max-time and return now. - // The nextPage will already be set up on the next call. - if (drawing_screen && (drawing_screen = u8g.nextPage())) { - if (on_status_screen()) - NOLESS(max_display_update_time, millis() - ms); - return; - } - } + run_current_screen(); - #else + // Apply all DWIN drawing after processing + TERN_(IS_DWIN_MARLINUI, DWIN_UpdateLCD()); - run_current_screen(); + #endif - #endif + TERN_(HAS_LCD_MENU, lcd_clicked = false); - TERN_(HAS_LCD_MENU, lcd_clicked = false); + // Keeping track of the longest time for an individual LCD update. + // Used to do screen throttling when the planner starts to fill up. + if (on_status_screen()) + NOLESS(max_display_update_time, millis() - ms); + } - // Keeping track of the longest time for an individual LCD update. - // Used to do screen throttling when the planner starts to fill up. - if (on_status_screen()) - NOLESS(max_display_update_time, millis() - ms); - } + #if SCREENS_CAN_TIME_OUT + // Return to Status Screen after a timeout + if (on_status_screen() || defer_return_to_status) + reset_status_timeout(ms); + else if (ELAPSED(ms, return_to_status_ms)) + return_to_status(); + #endif - #if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS > 0 - // Return to Status Screen after a timeout - if (on_status_screen() || defer_return_to_status) - RESET_STATUS_TIMEOUT(); - else if (ELAPSED(ms, return_to_status_ms)) - return_to_status(); - #endif + // Change state of drawing flag between screen updates + if (!drawing_screen) switch (lcdDrawUpdate) { + case LCDVIEW_CLEAR_CALL_REDRAW: + clear_lcd(); break; + case LCDVIEW_REDRAW_NOW: + refresh(LCDVIEW_NONE); + case LCDVIEW_NONE: + case LCDVIEW_CALL_REDRAW_NEXT: + case LCDVIEW_CALL_NO_REDRAW: + default: break; + } // switch - // Change state of drawing flag between screen updates - if (!drawing_screen) switch (lcdDrawUpdate) { - case LCDVIEW_CLEAR_CALL_REDRAW: - clear_lcd(); break; - case LCDVIEW_REDRAW_NOW: - refresh(LCDVIEW_NONE); - case LCDVIEW_NONE: - case LCDVIEW_CALL_REDRAW_NEXT: - case LCDVIEW_CALL_NO_REDRAW: - default: break; - } // switch + } // ELAPSED(ms, next_lcd_update_ms) - } // ELAPSED(ms, next_lcd_update_ms) + TERN_(HAS_GRAPHICAL_TFT, tft_idle()); + } - TERN_(HAS_GRAPHICAL_TFT, tft_idle()); -} + #if HAS_ADC_BUTTONS -#if HAS_ADC_BUTTONS + typedef struct { + uint16_t ADCKeyValueMin, ADCKeyValueMax; + uint8_t ADCKeyNo; + } _stADCKeypadTable_; - typedef struct { - uint16_t ADCKeyValueMin, ADCKeyValueMax; - uint8_t ADCKeyNo; - } _stADCKeypadTable_; + #ifndef ADC_BUTTONS_VALUE_SCALE + #define ADC_BUTTONS_VALUE_SCALE 1.0 // for the power voltage equal to the reference voltage + #endif + #ifndef ADC_BUTTONS_R_PULLUP + #define ADC_BUTTONS_R_PULLUP 4.7 // common pull-up resistor in the voltage divider + #endif + #ifndef ADC_BUTTONS_LEFT_R_PULLDOWN + #define ADC_BUTTONS_LEFT_R_PULLDOWN 0.47 // pull-down resistor for LEFT button voltage divider + #endif + #ifndef ADC_BUTTONS_RIGHT_R_PULLDOWN + #define ADC_BUTTONS_RIGHT_R_PULLDOWN 4.7 // pull-down resistor for RIGHT button voltage divider + #endif + #ifndef ADC_BUTTONS_UP_R_PULLDOWN + #define ADC_BUTTONS_UP_R_PULLDOWN 1.0 // pull-down resistor for UP button voltage divider + #endif + #ifndef ADC_BUTTONS_DOWN_R_PULLDOWN + #define ADC_BUTTONS_DOWN_R_PULLDOWN 10.0 // pull-down resistor for DOWN button voltage divider + #endif + #ifndef ADC_BUTTONS_MIDDLE_R_PULLDOWN + #define ADC_BUTTONS_MIDDLE_R_PULLDOWN 2.2 // pull-down resistor for MIDDLE button voltage divider + #endif - #ifndef ADC_BUTTONS_VALUE_SCALE - #define ADC_BUTTONS_VALUE_SCALE 1.0 // for the power voltage equal to the reference voltage - #endif - #ifndef ADC_BUTTONS_R_PULLUP - #define ADC_BUTTONS_R_PULLUP 4.7 // common pull-up resistor in the voltage divider - #endif - #ifndef ADC_BUTTONS_LEFT_R_PULLDOWN - #define ADC_BUTTONS_LEFT_R_PULLDOWN 0.47 // pull-down resistor for LEFT button voltage divider - #endif - #ifndef ADC_BUTTONS_RIGHT_R_PULLDOWN - #define ADC_BUTTONS_RIGHT_R_PULLDOWN 4.7 // pull-down resistor for RIGHT button voltage divider - #endif - #ifndef ADC_BUTTONS_UP_R_PULLDOWN - #define ADC_BUTTONS_UP_R_PULLDOWN 1.0 // pull-down resistor for UP button voltage divider - #endif - #ifndef ADC_BUTTONS_DOWN_R_PULLDOWN - #define ADC_BUTTONS_DOWN_R_PULLDOWN 10.0 // pull-down resistor for DOWN button voltage divider - #endif - #ifndef ADC_BUTTONS_MIDDLE_R_PULLDOWN - #define ADC_BUTTONS_MIDDLE_R_PULLDOWN 2.2 // pull-down resistor for MIDDLE button voltage divider - #endif + // Calculate the ADC value for the voltage divider with specified pull-down resistor value + #define ADC_BUTTON_VALUE(r) int(HAL_ADC_RANGE * (ADC_BUTTONS_VALUE_SCALE) * r / (r + ADC_BUTTONS_R_PULLUP)) + + static constexpr uint16_t adc_button_tolerance = HAL_ADC_RANGE * 25 / 1024, + adc_other_button = HAL_ADC_RANGE * 1000 / 1024; + static const _stADCKeypadTable_ stADCKeyTable[] PROGMEM = { + // VALUE_MIN, VALUE_MAX, KEY + { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F1 }, // F1 + { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F2 }, // F2 + { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F3 }, // F3 + { ADC_BUTTON_VALUE(ADC_BUTTONS_LEFT_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_LEFT_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_LEFT }, // LEFT ( 272 ... 472) + { ADC_BUTTON_VALUE(ADC_BUTTONS_RIGHT_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_RIGHT_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_RIGHT }, // RIGHT (1948 ... 2148) + { ADC_BUTTON_VALUE(ADC_BUTTONS_UP_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_UP_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_UP }, // UP ( 618 ... 818) + { ADC_BUTTON_VALUE(ADC_BUTTONS_DOWN_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_DOWN_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_DOWN }, // DOWN (2686 ... 2886) + { ADC_BUTTON_VALUE(ADC_BUTTONS_MIDDLE_R_PULLDOWN) - adc_button_tolerance, + ADC_BUTTON_VALUE(ADC_BUTTONS_MIDDLE_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_MIDDLE }, // ENTER (1205 ... 1405) + }; - // Calculate the ADC value for the voltage divider with specified pull-down resistor value - #define ADC_BUTTON_VALUE(r) int(HAL_ADC_RANGE * (ADC_BUTTONS_VALUE_SCALE) * r / (r + ADC_BUTTONS_R_PULLUP)) - - static constexpr uint16_t adc_button_tolerance = HAL_ADC_RANGE * 25 / 1024, - adc_other_button = HAL_ADC_RANGE * 1000 / 1024; - static const _stADCKeypadTable_ stADCKeyTable[] PROGMEM = { - // VALUE_MIN, VALUE_MAX, KEY - { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F1 }, // F1 - { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F2 }, // F2 - { adc_other_button, HAL_ADC_RANGE, 1 + BLEN_KEYPAD_F3 }, // F3 - { ADC_BUTTON_VALUE(ADC_BUTTONS_LEFT_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_LEFT_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_LEFT }, // LEFT ( 272 ... 472) - { ADC_BUTTON_VALUE(ADC_BUTTONS_RIGHT_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_RIGHT_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_RIGHT }, // RIGHT (1948 ... 2148) - { ADC_BUTTON_VALUE(ADC_BUTTONS_UP_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_UP_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_UP }, // UP ( 618 ... 818) - { ADC_BUTTON_VALUE(ADC_BUTTONS_DOWN_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_DOWN_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_DOWN }, // DOWN (2686 ... 2886) - { ADC_BUTTON_VALUE(ADC_BUTTONS_MIDDLE_R_PULLDOWN) - adc_button_tolerance, - ADC_BUTTON_VALUE(ADC_BUTTONS_MIDDLE_R_PULLDOWN) + adc_button_tolerance, 1 + BLEN_KEYPAD_MIDDLE }, // ENTER (1205 ... 1405) - }; - - uint8_t get_ADC_keyValue() { - if (thermalManager.ADCKey_count >= 16) { - const uint16_t currentkpADCValue = thermalManager.current_ADCKey_raw; - thermalManager.current_ADCKey_raw = HAL_ADC_RANGE; - thermalManager.ADCKey_count = 0; - if (currentkpADCValue < adc_other_button) - LOOP_L_N(i, ADC_KEY_NUM) { - const uint16_t lo = pgm_read_word(&stADCKeyTable[i].ADCKeyValueMin), - hi = pgm_read_word(&stADCKeyTable[i].ADCKeyValueMax); - if (WITHIN(currentkpADCValue, lo, hi)) return pgm_read_byte(&stADCKeyTable[i].ADCKeyNo); - } + uint8_t get_ADC_keyValue() { + if (thermalManager.ADCKey_count >= 16) { + const uint16_t currentkpADCValue = thermalManager.current_ADCKey_raw; + thermalManager.current_ADCKey_raw = HAL_ADC_RANGE; + thermalManager.ADCKey_count = 0; + if (currentkpADCValue < adc_other_button) + LOOP_L_N(i, ADC_KEY_NUM) { + const uint16_t lo = pgm_read_word(&stADCKeyTable[i].ADCKeyValueMin), + hi = pgm_read_word(&stADCKeyTable[i].ADCKeyValueMax); + if (WITHIN(currentkpADCValue, lo, hi)) return pgm_read_byte(&stADCKeyTable[i].ADCKeyNo); + } + } + return 0; } - return 0; - } -#endif // HAS_ADC_BUTTONS + #endif // HAS_ADC_BUTTONS -#if HAS_ENCODER_ACTION + #if HAS_ENCODER_ACTION - /** - * Read encoder buttons from the hardware registers - * Warning: This function is called from interrupt context! - */ - void MarlinUI::update_buttons() { - const millis_t now = millis(); - if (ELAPSED(now, next_button_update_ms)) { + /** + * Read encoder buttons from the hardware registers + * Warning: This function is called from interrupt context! + */ + void MarlinUI::update_buttons() { + const millis_t now = millis(); + if (ELAPSED(now, next_button_update_ms)) { - #if HAS_DIGITAL_BUTTONS + #if HAS_DIGITAL_BUTTONS - #if ANY_BUTTON(EN1, EN2, ENC, BACK) + #if ANY_BUTTON(EN1, EN2, ENC, BACK) - uint8_t newbutton = 0; - if (BUTTON_PRESSED(EN1)) newbutton |= EN_A; - if (BUTTON_PRESSED(EN2)) newbutton |= EN_B; - if (can_encode() && BUTTON_PRESSED(ENC)) newbutton |= EN_C; - if (BUTTON_PRESSED(BACK)) newbutton |= EN_D; + uint8_t newbutton = 0; + if (BUTTON_PRESSED(EN1)) newbutton |= EN_A; + if (BUTTON_PRESSED(EN2)) newbutton |= EN_B; + if (can_encode() && BUTTON_PRESSED(ENC)) newbutton |= EN_C; + if (BUTTON_PRESSED(BACK)) newbutton |= EN_D; - #else + #else - constexpr uint8_t newbutton = 0; + constexpr uint8_t newbutton = 0; - #endif + #endif - // - // Directional buttons - // - #if ANY_BUTTON(UP, DWN, LFT, RT) + // + // Directional buttons + // + #if ANY_BUTTON(UP, DWN, LFT, RT) - const int8_t pulses = epps * encoderDirection; + const int8_t pulses = epps * encoderDirection; - if (BUTTON_PRESSED(UP)) { - encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * pulses; - next_button_update_ms = now + 300; - } - else if (BUTTON_PRESSED(DWN)) { - encoderDiff = -(ENCODER_STEPS_PER_MENU_ITEM) * pulses; - next_button_update_ms = now + 300; - } - else if (BUTTON_PRESSED(LFT)) { - encoderDiff = -pulses; - next_button_update_ms = now + 300; - } - else if (BUTTON_PRESSED(RT)) { - encoderDiff = pulses; - next_button_update_ms = now + 300; - } + if (BUTTON_PRESSED(UP)) { + encoderDiff = (ENCODER_STEPS_PER_MENU_ITEM) * pulses; + next_button_update_ms = now + 300; + } + else if (BUTTON_PRESSED(DWN)) { + encoderDiff = -(ENCODER_STEPS_PER_MENU_ITEM) * pulses; + next_button_update_ms = now + 300; + } + else if (BUTTON_PRESSED(LFT)) { + encoderDiff = -pulses; + next_button_update_ms = now + 300; + } + else if (BUTTON_PRESSED(RT)) { + encoderDiff = pulses; + next_button_update_ms = now + 300; + } - #endif // UP || DWN || LFT || RT + #endif // UP || DWN || LFT || RT - buttons = (newbutton | TERN0(HAS_SLOW_BUTTONS, slow_buttons) - #if BOTH(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION) - | (touch_buttons & TERN(HAS_ENCODER_WHEEL, ~(EN_A | EN_B), 0xFF)) - #endif - ); + buttons = (newbutton | TERN0(HAS_SLOW_BUTTONS, slow_buttons) + #if BOTH(HAS_TOUCH_BUTTONS, HAS_ENCODER_ACTION) + | (touch_buttons & TERN(HAS_ENCODER_WHEEL, ~(EN_A | EN_B), 0xFF)) + #endif + ); - #elif HAS_ADC_BUTTONS + #elif HAS_ADC_BUTTONS - buttons = 0; + buttons = 0; - #endif + #endif - #if HAS_ADC_BUTTONS - if (keypad_buttons == 0) { - const uint8_t b = get_ADC_keyValue(); - if (WITHIN(b, 1, 8)) keypad_buttons = _BV(b - 1); - } - #endif + #if HAS_ADC_BUTTONS + if (keypad_buttons == 0) { + const uint8_t b = get_ADC_keyValue(); + if (WITHIN(b, 1, 8)) keypad_buttons = _BV(b - 1); + } + #endif - #if HAS_SHIFT_ENCODER - /** - * Set up Rotary Encoder bit values (for two pin encoders to indicate movement). - * These values are independent of which pins are used for EN_A / EN_B indications. - * The rotary encoder part is also independent of the LCD chipset. - */ - uint8_t val = 0; - WRITE(SHIFT_LD_PIN, LOW); - WRITE(SHIFT_LD_PIN, HIGH); - LOOP_L_N(i, 8) { - val >>= 1; - if (READ(SHIFT_OUT_PIN)) SBI(val, 7); - WRITE(SHIFT_CLK_PIN, HIGH); - WRITE(SHIFT_CLK_PIN, LOW); - } - TERN(REPRAPWORLD_KEYPAD, keypad_buttons, buttons) = ~val; - #endif + #if HAS_SHIFT_ENCODER + /** + * Set up Rotary Encoder bit values (for two pin encoders to indicate movement). + * These values are independent of which pins are used for EN_A / EN_B indications. + * The rotary encoder part is also independent of the LCD chipset. + */ + uint8_t val = 0; + WRITE(SHIFT_LD_PIN, LOW); + WRITE(SHIFT_LD_PIN, HIGH); + LOOP_L_N(i, 8) { + val >>= 1; + if (READ(SHIFT_OUT_PIN)) SBI(val, 7); + WRITE(SHIFT_CLK_PIN, HIGH); + WRITE(SHIFT_CLK_PIN, LOW); + } + TERN(REPRAPWORLD_KEYPAD, keypad_buttons, buttons) = ~val; + #endif - #if IS_TFTGLCD_PANEL - next_button_update_ms = now + (LCD_UPDATE_INTERVAL / 2); - buttons = slow_buttons; - TERN_(AUTO_BED_LEVELING_UBL, external_encoder()); - #endif + #if IS_TFTGLCD_PANEL + next_button_update_ms = now + (LCD_UPDATE_INTERVAL / 2); + buttons = slow_buttons; + TERN_(AUTO_BED_LEVELING_UBL, external_encoder()); + #endif - } // next_button_update_ms + } // next_button_update_ms - #if HAS_ENCODER_WHEEL - static uint8_t lastEncoderBits; + #if HAS_ENCODER_WHEEL + static uint8_t lastEncoderBits; - // Manage encoder rotation - #define ENCODER_SPIN(_E1, _E2) switch (lastEncoderBits) { case _E1: encoderDiff += encoderDirection; break; case _E2: encoderDiff -= encoderDirection; } + // Manage encoder rotation + #define ENCODER_SPIN(_E1, _E2) switch (lastEncoderBits) { case _E1: encoderDiff += encoderDirection; break; case _E2: encoderDiff -= encoderDirection; } - uint8_t enc = 0; - if (buttons & EN_A) enc |= B01; - if (buttons & EN_B) enc |= B10; - if (enc != lastEncoderBits) { - switch (enc) { - case ENCODER_PHASE_0: ENCODER_SPIN(ENCODER_PHASE_3, ENCODER_PHASE_1); break; - case ENCODER_PHASE_1: ENCODER_SPIN(ENCODER_PHASE_0, ENCODER_PHASE_2); break; - case ENCODER_PHASE_2: ENCODER_SPIN(ENCODER_PHASE_1, ENCODER_PHASE_3); break; - case ENCODER_PHASE_3: ENCODER_SPIN(ENCODER_PHASE_2, ENCODER_PHASE_0); break; + uint8_t enc = 0; + if (buttons & EN_A) enc |= B01; + if (buttons & EN_B) enc |= B10; + if (enc != lastEncoderBits) { + switch (enc) { + case ENCODER_PHASE_0: ENCODER_SPIN(ENCODER_PHASE_3, ENCODER_PHASE_1); break; + case ENCODER_PHASE_1: ENCODER_SPIN(ENCODER_PHASE_0, ENCODER_PHASE_2); break; + case ENCODER_PHASE_2: ENCODER_SPIN(ENCODER_PHASE_1, ENCODER_PHASE_3); break; + case ENCODER_PHASE_3: ENCODER_SPIN(ENCODER_PHASE_2, ENCODER_PHASE_0); break; + } + #if BOTH(HAS_LCD_MENU, AUTO_BED_LEVELING_UBL) + external_encoder(); + #endif + lastEncoderBits = enc; } - #if BOTH(HAS_LCD_MENU, AUTO_BED_LEVELING_UBL) - external_encoder(); - #endif - lastEncoderBits = enc; - } - #endif // HAS_ENCODER_WHEEL - } + #endif // HAS_ENCODER_WHEEL + } -#endif // HAS_ENCODER_ACTION + #endif // HAS_ENCODER_ACTION #endif // HAS_WIRED_LCD @@ -1345,6 +1382,7 @@ void MarlinUI::update() { /** * Reset the status message */ + void MarlinUI::reset_status(const bool no_welcome) { #if SERVICE_INTERVAL_1 > 0 static PGMSTR(service1, "> " SERVICE_NAME_1 "!"); @@ -1413,6 +1451,7 @@ void MarlinUI::update() { void MarlinUI::set_alert_status_P(PGM_P const message) { set_status_P(message, 1); + TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); TERN_(HAS_LCD_MENU, return_to_status()); } @@ -1430,17 +1469,17 @@ void MarlinUI::update() { void MarlinUI::finish_status(const bool persist) { - #if HAS_SPI_LCD + #if HAS_WIRED_LCD - #if !(ENABLED(LCD_PROGRESS_BAR) && (PROGRESS_MSG_EXPIRE) > 0) + #if !(BASIC_PROGRESS_BAR && (PROGRESS_MSG_EXPIRE) > 0) UNUSED(persist); #endif - #if ENABLED(LCD_PROGRESS_BAR) || BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #if BASIC_PROGRESS_BAR || BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) const millis_t ms = millis(); #endif - #if ENABLED(LCD_PROGRESS_BAR) + #if BASIC_PROGRESS_BAR progress_bar_ms = ms; #if PROGRESS_MSG_EXPIRE > 0 expire_status_ms = persist ? 0 : ms + PROGRESS_MSG_EXPIRE; @@ -1451,14 +1490,14 @@ void MarlinUI::update() { next_filament_display = ms + 5000UL; // Show status message for 5s #endif - #if ENABLED(STATUS_MESSAGE_SCROLLING) - status_scroll_offset = 0; - #endif - #else // HAS_SPI_LCD + TERN_(STATUS_MESSAGE_SCROLLING, status_scroll_offset = 0); + #else // HAS_WIRED_LCD UNUSED(persist); #endif TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(status_message)); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_StatusChanged(status_message)); + TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Update_Status(status_message)); } #if ENABLED(STATUS_MESSAGE_SCROLLING) @@ -1490,7 +1529,7 @@ void MarlinUI::update() { void MarlinUI::abort_print() { #if ENABLED(SDSUPPORT) wait_for_heatup = wait_for_user = false; - card.flag.abort_sd_printing = true; + card.abortFilePrintSoon(); #endif #ifdef ACTION_ON_CANCEL host_action_cancel(); @@ -1501,6 +1540,19 @@ void MarlinUI::update() { TERN_(HAS_LCD_MENU, return_to_status()); } + #if BOTH(PSU_CONTROL, PS_OFF_CONFIRM) + void MarlinUI::poweroff() { + queue.inject_P(PSTR("M81")); + goto_previous_screen(); + } + #endif + + void MarlinUI::flow_fault() { + LCD_ALERTMESSAGEPGM(MSG_FLOWMETER_FAULT); + TERN_(HAS_BUZZER, buzz(1000, 440)); + TERN_(HAS_LCD_MENU, return_to_status()); + } + #if ANY(PARK_HEAD_ON_PAUSE, SDSUPPORT) #include "../gcode/queue.h" #endif @@ -1511,6 +1563,7 @@ void MarlinUI::update() { defer_status_screen(); #endif + TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_PAUSE_RESUME, PSTR("UI Pause"), PSTR("Resume"))); LCD_MESSAGEPGM(MSG_PRINT_PAUSED); @@ -1579,7 +1632,7 @@ void MarlinUI::update() { #endif -#else // !HAS_DISPLAY +#elif !HAS_STATUS_MESSAGE // && !HAS_DISPLAY // // Send the status line as a host notification @@ -1594,7 +1647,7 @@ void MarlinUI::update() { TERN(HOST_PROMPT_SUPPORT, host_action_notify_P(message), UNUSED(message)); } -#endif // !HAS_DISPLAY +#endif // !HAS_DISPLAY && !HAS_STATUS_MESSAGE #if ENABLED(SDSUPPORT) @@ -1610,8 +1663,9 @@ void MarlinUI::update() { if (status) { if (old_status < 2) { - TERN_(EXTENSIBLE_UI, ExtUI::onMediaInserted()); // ExtUI response - #if ENABLED(BROWSE_MEDIA_ON_INSERT) + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onMediaInserted(); + #elif ENABLED(BROWSE_MEDIA_ON_INSERT) clear_menu_history(); quick_feedback(); goto_screen(MEDIA_MENU_GATEWAY); @@ -1622,8 +1676,9 @@ void MarlinUI::update() { } else { if (old_status < 2) { - TERN_(EXTENSIBLE_UI, ExtUI::onMediaRemoved()); // ExtUI response - #if PIN_EXISTS(SD_DETECT) + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onMediaRemoved(); + #elif PIN_EXISTS(SD_DETECT) LCD_MESSAGEPGM(MSG_MEDIA_REMOVED); #if HAS_LCD_MENU if (!defer_return_to_status) return_to_status(); @@ -1652,7 +1707,56 @@ void MarlinUI::update() { #endif // SDSUPPORT #if HAS_LCD_MENU - void MarlinUI::reset_settings() { settings.reset(); completion_feedback(); } + void MarlinUI::reset_settings() { + settings.reset(); + completion_feedback(); + #if ENABLED(TOUCH_SCREEN_CALIBRATION) + if (touch_calibration.need_calibration()) ui.goto_screen(touch_screen_calibration); + #endif + } + + #if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) + void MarlinUI::zoffset_overlay(const_float_t zvalue) { + // Determine whether the user is raising or lowering the nozzle. + static int8_t dir; + static float old_zvalue; + if (zvalue != old_zvalue) { + dir = zvalue ? zvalue < old_zvalue ? -1 : 1 : 0; + old_zvalue = zvalue; + } + zoffset_overlay(dir); + } + #endif + +#endif + +#if BOTH(EXTENSIBLE_UI, ADVANCED_PAUSE_FEATURE) + + void MarlinUI::pause_show_message( + const PauseMessage message, + const PauseMode mode/*=PAUSE_MODE_SAME*/, + const uint8_t extruder/*=active_extruder*/ + ) { + pause_mode = mode; + ExtUI::pauseModeStatus = message; + switch (message) { + case PAUSE_MESSAGE_PARKING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_PAUSE_PRINT_PARKING)); break; + case PAUSE_MESSAGE_CHANGING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_INIT)); break; + case PAUSE_MESSAGE_UNLOAD: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_UNLOAD)); break; + case PAUSE_MESSAGE_WAITING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_ADVANCED_PAUSE_WAITING)); break; + case PAUSE_MESSAGE_INSERT: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_INSERT)); break; + case PAUSE_MESSAGE_LOAD: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_LOAD)); break; + case PAUSE_MESSAGE_PURGE: + ExtUI::onUserConfirmRequired_P(GET_TEXT(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); break; + case PAUSE_MESSAGE_RESUME: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_RESUME)); break; + case PAUSE_MESSAGE_HEAT: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEAT)); break; + case PAUSE_MESSAGE_HEATING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEATING)); break; + case PAUSE_MESSAGE_OPTION: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_OPTION_HEADER)); break; + case PAUSE_MESSAGE_STATUS: + default: break; + } + } + #endif #if ENABLED(EEPROM_SETTINGS) diff --git a/Marlin/src/lcd/marlinui.h b/Marlin/src/lcd/marlinui.h index 2e55c9ad1d29..02d5bf06bd77 100644 --- a/Marlin/src/lcd/marlinui.h +++ b/Marlin/src/lcd/marlinui.h @@ -21,12 +21,11 @@ */ #pragma once -#include "../inc/MarlinConfig.h" - #include "../module/motion.h" - #include "buttons.h" +#include "../inc/MarlinConfig.h" + #if HAS_BUZZER #include "../libs/buzzer.h" #endif @@ -39,23 +38,35 @@ #include "tft_io/touch_calibration.h" #endif -#if EITHER(HAS_LCD_MENU, ULTIPANEL_FEEDMULTIPLY) +#if ANY(HAS_LCD_MENU, ULTIPANEL_FEEDMULTIPLY, SOFT_RESET_ON_KILL) #define HAS_ENCODER_ACTION 1 #endif +#if HAS_STATUS_MESSAGE + #define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U) +#endif + #if E_MANUAL > 1 - #define MULTI_MANUAL 1 + #define MULTI_E_MANUAL 1 #endif #if HAS_DISPLAY #include "../module/printcounter.h" #endif -#if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE) +#if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_LCD_MENU, EXTENSIBLE_UI, HAS_DWIN_E3V2) #include "../feature/pause.h" #include "../module/motion.h" // for active_extruder #endif +#if ENABLED(DWIN_CREALITY_LCD) + #include "e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "e3v2/enhanced/dwin.h" +#endif + +#define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80U) + #if HAS_WIRED_LCD enum LCDViewAction : uint8_t { @@ -70,8 +81,6 @@ uint8_t get_ADC_keyValue(); #endif - #define LCD_UPDATE_INTERVAL TERN(HAS_TOUCH_BUTTONS, 50, 100) - #if HAS_LCD_MENU #include "lcdprint.h" @@ -85,15 +94,14 @@ typedef void (*screenFunc_t)(); typedef void (*menuAction_t)(); - #if ENABLED(AUTO_BED_LEVELING_UBL) - void lcd_mesh_edit_setup(const float &initial); - float lcd_mesh_edit(); - #endif - #endif // HAS_LCD_MENU #endif // HAS_WIRED_LCD +#if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI) + #define LCD_UPDATE_INTERVAL TERN(HAS_TOUCH_BUTTONS, 50, 100) +#endif + #if HAS_MARLINUI_U8GLIB enum MarlinFont : uint8_t { FONT_STATUSMENU = 1, @@ -110,9 +118,15 @@ #if PREHEAT_COUNT typedef struct { - TERN_(HAS_HOTEND, uint16_t hotend_temp); - TERN_(HAS_HEATED_BED, uint16_t bed_temp ); - TERN_(HAS_FAN, uint16_t fan_speed ); + #if HAS_HOTEND + celsius_t hotend_temp; + #endif + #if HAS_HEATED_BED + celsius_t bed_temp; + #endif + #if HAS_FAN + uint16_t fan_speed; + #endif } preheat_t; #endif @@ -122,16 +136,20 @@ class ManualMove { private: static AxisEnum axis; - #if MULTI_MANUAL + #if MULTI_E_MANUAL static int8_t e_index; #else static int8_t constexpr e_index = 0; #endif static millis_t start_time; - TERN_(IS_KINEMATIC, static xyze_pos_t all_axes_destination); + #if IS_KINEMATIC + static xyze_pos_t all_axes_destination; + #endif public: static float menu_scale; - TERN_(IS_KINEMATIC, static float offset); + #if IS_KINEMATIC + static float offset; + #endif template void set_destination(const T& dest) { #if IS_KINEMATIC @@ -144,17 +162,34 @@ current_position.set(dest); #endif } + float axis_value(const AxisEnum axis) { + return NATIVE_TO_LOGICAL(processing ? destination[axis] : SUM_TERN(IS_KINEMATIC, current_position[axis], offset), axis); + } + bool apply_diff(const AxisEnum axis, const_float_t diff, const_float_t min, const_float_t max) { + #if IS_KINEMATIC + float &valref = offset; + const float rmin = min - current_position[axis], rmax = max - current_position[axis]; + #else + float &valref = current_position[axis]; + const float rmin = min, rmax = max; + #endif + valref += diff; + const float pre = valref; + if (min != max) { + if (diff < 0) + NOLESS(valref, rmin); + else + NOMORE(valref, rmax); + } + return pre != valref; + } #if IS_KINEMATIC static bool processing; #else static bool constexpr processing = false; #endif static void task(); - static void soon(AxisEnum axis - #if MULTI_MANUAL - , const int8_t eindex=-1 - #endif - ); + static void soon(const AxisEnum axis OPTARG(MULTI_E_MANUAL, const int8_t eindex=active_extruder)); }; #endif @@ -172,13 +207,11 @@ class MarlinUI { #if HAS_MULTI_LANGUAGE static uint8_t language; - static inline void set_language(const uint8_t lang) { - if (lang < NUM_LANGUAGES) { - language = lang; - return_to_status(); - refresh(); - } - } + static void set_language(const uint8_t lang); + #endif + + #if HAS_MARLINUI_U8GLIB + static void update_language_font(); #endif #if ENABLED(SOUND_MENU_ITEM) @@ -213,7 +246,24 @@ class MarlinUI { static void media_changed(const uint8_t old_stat, const uint8_t stat); #endif - #if ENABLED(DWIN_CREALITY_LCD) + #if HAS_LCD_BRIGHTNESS + #ifndef LCD_BRIGHTNESS_MIN + #define LCD_BRIGHTNESS_MIN 1 + #endif + #ifndef LCD_BRIGHTNESS_MAX + #define LCD_BRIGHTNESS_MAX 255 + #endif + #ifndef DEFAULT_LCD_BRIGHTNESS + #define DEFAULT_LCD_BRIGHTNESS LCD_BRIGHTNESS_MAX + #endif + static uint8_t brightness; + static bool backlight; + static void _set_brightness(); // Implementation-specific + static void set_brightness(const uint8_t value); + FORCE_INLINE static void refresh_brightness() { set_brightness(brightness); } + #endif + + #if HAS_DWIN_E3V2_BASIC static void refresh(); #else FORCE_INLINE static void refresh() { @@ -248,7 +298,7 @@ class MarlinUI { static inline uint32_t _calculated_remaining_time() { const duration_t elapsed = print_job_timer.duration(); const progress_t progress = _get_progress(); - return elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress; + return progress ? elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress : 0; } #if ENABLED(USE_M73_REMAINING_TIME) static uint32_t remaining_time; @@ -270,6 +320,17 @@ class MarlinUI { #endif #if HAS_STATUS_MESSAGE + + #if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_ENHANCED) + #if ENABLED(STATUS_MESSAGE_SCROLLING) + #define MAX_MESSAGE_LENGTH _MAX(LONG_FILENAME_LENGTH, MAX_LANG_CHARSIZE * 2 * (LCD_WIDTH)) + #else + #define MAX_MESSAGE_LENGTH (MAX_LANG_CHARSIZE * (LCD_WIDTH)) + #endif + #else + #define MAX_MESSAGE_LENGTH 63 + #endif + static char status_message[]; static uint8_t alert_level; // Higher levels block lower levels @@ -281,7 +342,7 @@ class MarlinUI { static bool has_status(); static void reset_status(const bool no_welcome=false); - static void set_status(const char* const message, const bool persist=false); + static void set_status(const char * const message, const bool persist=false); static void set_status_P(PGM_P const message, const int8_t level=0); static void status_printf_P(const uint8_t level, PGM_P const fmt, ...); static void set_alert_status_P(PGM_P const message); @@ -289,13 +350,19 @@ class MarlinUI { #else static constexpr bool has_status() { return false; } static inline void reset_status(const bool=false) {} - static void set_status(const char* message, const bool=false); + static void set_status(const char *message, const bool=false); static void set_status_P(PGM_P message, const int8_t=0); static void status_printf_P(const uint8_t, PGM_P message, ...); static inline void set_alert_status_P(PGM_P const) {} static inline void reset_alert_level() {} #endif + #if EITHER(HAS_DISPLAY, DWIN_CREALITY_LCD_ENHANCED) + static void kill_screen(PGM_P const lcd_error, PGM_P const lcd_component); + #else + static inline void kill_screen(PGM_P const, PGM_P const) {} + #endif + #if HAS_DISPLAY static void init(); @@ -304,6 +371,15 @@ class MarlinUI { static void abort_print(); static void pause_print(); static void resume_print(); + static void flow_fault(); + + #if BOTH(PSU_CONTROL, PS_OFF_CONFIRM) + static void poweroff(); + #endif + + #if EITHER(HAS_WIRED_LCD, DWIN_CREALITY_LCD_JYERSUI) + static bool get_blink(); + #endif #if HAS_WIRED_LCD @@ -325,32 +401,34 @@ class MarlinUI { static void draw_marlin_bootscreen(const bool line2=false); static void show_marlin_bootscreen(); static void show_bootscreen(); + static void bootscreen_completion(const millis_t sofar); #endif #if HAS_MARLINUI_U8GLIB - static void set_font(const MarlinFont font_nr); + #elif IS_DWIN_MARLINUI + static void set_font(const uint8_t font_nr); + #endif - #else - + #if HAS_MARLINUI_HD44780 static void set_custom_characters(const HD44780CharSet screen_charset=CHARSET_INFO); + #endif - #if ENABLED(LCD_PROGRESS_BAR) - static millis_t progress_bar_ms; // Start time for the current progress bar cycle - static void draw_progress_bar(const uint8_t percent); - #if PROGRESS_MSG_EXPIRE > 0 - static millis_t expire_status_ms; // = 0 - FORCE_INLINE static void reset_progress_bar_timeout() { expire_status_ms = 0; } - #endif + #if ENABLED(LCD_PROGRESS_BAR) && !HAS_MARLINUI_U8GLIB + static millis_t progress_bar_ms; // Start time for the current progress bar cycle + static void draw_progress_bar(const uint8_t percent); + #if PROGRESS_MSG_EXPIRE > 0 + static millis_t expire_status_ms; // = 0 + FORCE_INLINE static void reset_progress_bar_timeout() { expire_status_ms = 0; } #endif - #endif static uint8_t lcd_status_update_delay; #if HAS_LCD_CONTRAST - static int16_t contrast; - static void set_contrast(const int16_t value); + static uint8_t contrast; + static void _set_contrast(); // Implementation-specific + static void set_contrast(const uint8_t value); FORCE_INLINE static void refresh_contrast() { set_contrast(contrast); } #endif @@ -358,11 +436,15 @@ class MarlinUI { static millis_t next_filament_display; #endif + #if HAS_TOUCH_SLEEP + static void wakeup_screen(); + #endif + static void quick_feedback(const bool clear_buttons=true); #if HAS_BUZZER static void completion_feedback(const bool good=true); #else - static inline void completion_feedback(const bool=true) {} + static inline void completion_feedback(const bool=true) { TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); } #endif #if DISABLED(LIGHTWEIGHT_UI) @@ -388,8 +470,15 @@ class MarlinUI { static constexpr bool drawing_screen = false, first_page = true; #endif - static bool get_blink(); - static void kill_screen(PGM_P const lcd_error, PGM_P const lcd_component); + #if IS_DWIN_MARLINUI + static bool did_first_redraw; + #endif + + #if EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) + static void zoffset_overlay(const int8_t dir); + static void zoffset_overlay(const_float_t zvalue); + #endif + static void draw_kill_screen(); #else // No LCD @@ -415,10 +504,13 @@ class MarlinUI { static PGM_P get_preheat_label(const uint8_t m); #endif + #if SCREENS_CAN_TIME_OUT + static inline void reset_status_timeout(const millis_t ms) { return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; } + #else + static inline void reset_status_timeout(const millis_t) {} + #endif + #if HAS_LCD_MENU - #if LCD_TIMEOUT_TO_STATUS - static millis_t return_to_status_ms; - #endif #if HAS_TOUCH_BUTTONS static uint8_t touch_buttons; @@ -444,15 +536,12 @@ class MarlinUI { static void set_selection(const bool sel) { selection = sel; } static bool update_selection(); - static bool lcd_clicked; - static bool use_click(); - static void synchronize(PGM_P const msg=nullptr); static screenFunc_t currentScreen; static bool screen_changed; static void goto_screen(const screenFunc_t screen, const uint16_t encoder=0, const uint8_t top=0, const uint8_t items=0); - static void save_previous_screen(); + static void push_current_screen(); // goto_previous_screen and go_back may also be used as menu item callbacks static void _goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, const bool is_back)); @@ -467,12 +556,12 @@ class MarlinUI { static void lcd_in_status(const bool inStatus); #endif + FORCE_INLINE static bool screen_is_sticky() { + return TERN1(SCREENS_CAN_TIME_OUT, defer_return_to_status); + } + FORCE_INLINE static void defer_status_screen(const bool defer=true) { - #if LCD_TIMEOUT_TO_STATUS > 0 - defer_return_to_status = defer; - #else - UNUSED(defer); - #endif + TERN(SCREENS_CAN_TIME_OUT, defer_return_to_status = defer, UNUSED(defer)); } static inline void goto_previous_screen_no_defer() { @@ -488,17 +577,36 @@ class MarlinUI { static void ubl_plot(const uint8_t x_plot, const uint8_t y_plot); #endif + #if ENABLED(AUTO_BED_LEVELING_UBL) + static void ubl_mesh_edit_start(const_float_t initial); + static float ubl_mesh_value(); + #endif + static void draw_select_screen_prompt(PGM_P const pref, const char * const string=nullptr, PGM_P const suff=nullptr); - #elif HAS_WIRED_LCD + #else - static constexpr bool lcd_clicked = false; static constexpr bool on_status_screen() { return true; } - FORCE_INLINE static void run_current_screen() { status_screen(); } + #if HAS_WIRED_LCD + FORCE_INLINE static void run_current_screen() { status_screen(); } + #endif + + #endif + + #if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) + static bool lcd_clicked; + static inline bool use_click() { + const bool click = lcd_clicked; + lcd_clicked = false; + return click; + } + #else + static constexpr bool lcd_clicked = false; + static inline bool use_click() { return false; } #endif - #if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE) + #if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI) static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder); #else static inline void _pause_show_message() {} @@ -608,16 +716,18 @@ class MarlinUI { private: + #if SCREENS_CAN_TIME_OUT + static millis_t return_to_status_ms; + static bool defer_return_to_status; + #else + static constexpr bool defer_return_to_status = false; + #endif + #if HAS_STATUS_MESSAGE static void finish_status(const bool persist); #endif #if HAS_WIRED_LCD - #if HAS_LCD_MENU && LCD_TIMEOUT_TO_STATUS > 0 - static bool defer_return_to_status; - #else - static constexpr bool defer_return_to_status = false; - #endif static void draw_status_screen(); #if HAS_GRAPHICAL_TFT static void tft_idle(); diff --git a/Marlin/src/lcd/menu/game/brickout.cpp b/Marlin/src/lcd/menu/game/brickout.cpp index 4bdc9243801e..d738250b60a8 100644 --- a/Marlin/src/lcd/menu/game/brickout.cpp +++ b/Marlin/src/lcd/menu/game/brickout.cpp @@ -50,8 +50,8 @@ inline void reset_bricks(const uint16_t v) { void reset_ball() { constexpr uint8_t ball_dist = 24; bdat.bally = BTOF(PADDLE_Y - ball_dist); - bdat.ballv = FTOP(1.3f); - bdat.ballh = -FTOP(1.25f); + bdat.ballv = FTOF(1.3f); + bdat.ballh = -FTOF(1.25f); uint8_t bx = bdat.paddle_x + (PADDLE_W) / 2 + ball_dist; if (bx >= LCD_PIXEL_WIDTH - 10) { bx -= ball_dist * 2; bdat.ballh = -bdat.ballh; } bdat.ballx = BTOF(bx); diff --git a/Marlin/src/lcd/menu/game/game.h b/Marlin/src/lcd/menu/game/game.h index cba79e4f28e1..999aa781008d 100644 --- a/Marlin/src/lcd/menu/game/game.h +++ b/Marlin/src/lcd/menu/game/game.h @@ -53,10 +53,18 @@ // Pool game data to save SRAM union MarlinGameData { - TERN_(MARLIN_BRICKOUT, brickout_data_t brickout); - TERN_(MARLIN_INVADERS, invaders_data_t invaders); - TERN_(MARLIN_SNAKE, snake_data_t snake); - TERN_(MARLIN_MAZE, maze_data_t maze); + #if ENABLED(MARLIN_BRICKOUT) + brickout_data_t brickout; + #endif + #if ENABLED(MARLIN_INVADERS) + invaders_data_t invaders; + #endif + #if ENABLED(MARLIN_SNAKE) + snake_data_t snake; + #endif + #if ENABLED(MARLIN_MAZE) + maze_data_t maze; + #endif }; extern MarlinGameData marlin_game_data; diff --git a/Marlin/src/lcd/menu/game/snake.cpp b/Marlin/src/lcd/menu/game/snake.cpp index f8892a4e7a39..c88893a6e6c7 100644 --- a/Marlin/src/lcd/menu/game/snake.cpp +++ b/Marlin/src/lcd/menu/game/snake.cpp @@ -63,7 +63,7 @@ #define SNAKE_SIZ SNAKE_BOX #endif -constexpr fixed_t snakev = FTOP(0.20); +constexpr fixed_t snakev = FTOF(0.20); snake_data_t &sdat = marlin_game_data.snake; @@ -125,7 +125,7 @@ void snake_reset() { // Init the head and velocity sdat.snakex = BTOF(1); sdat.snakey = BTOF(GAME_H / 2); - //snakev = FTOP(0.25); + //snakev = FTOF(0.25); // Init the tail with a cw turn sdat.snake_dir = 0; diff --git a/Marlin/src/lcd/menu/game/types.h b/Marlin/src/lcd/menu/game/types.h index f6e6c78aa063..6e0a2051d74e 100644 --- a/Marlin/src/lcd/menu/game/types.h +++ b/Marlin/src/lcd/menu/game/types.h @@ -27,7 +27,7 @@ typedef struct { int8_t x, y; } pos_t; // Simple 8:8 fixed-point typedef int16_t fixed_t; -#define FTOP(F) fixed_t((F)*256.0f) +#define FTOF(F) fixed_t((F)*256.0f) #define PTOF(P) (float(P)*(1.0f/256.0f)) #define BTOF(X) (fixed_t(X)<<8) #define FTOB(X) int8_t(fixed_t(X)>>8) diff --git a/Marlin/src/lcd/menu/menu.cpp b/Marlin/src/lcd/menu/menu.cpp index add306b6e322..61a1a16c6a0d 100644 --- a/Marlin/src/lcd/menu/menu.cpp +++ b/Marlin/src/lcd/menu/menu.cpp @@ -50,9 +50,12 @@ int8_t encoderTopLine, encoderLine, screen_items; typedef struct { - screenFunc_t menu_function; - uint32_t encoder_position; - int8_t top_line, items; + screenFunc_t menu_function; // The screen's function + uint32_t encoder_position; // The position of the encoder + int8_t top_line, items; // The amount of scroll, and the number of items + #if SCREENS_CAN_TIME_OUT + bool sticky; // The screen is sticky + #endif } menuPosition; menuPosition screen_history[6]; uint8_t screen_history_depth = 0; @@ -75,9 +78,9 @@ bool MenuEditItemBase::liveEdit; void MarlinUI::return_to_status() { goto_screen(status_screen); } -void MarlinUI::save_previous_screen() { +void MarlinUI::push_current_screen() { if (screen_history_depth < COUNT(screen_history)) - screen_history[screen_history_depth++] = { currentScreen, encoderPosition, encoderTopLine, screen_items }; + screen_history[screen_history_depth++] = { currentScreen, encoderPosition, encoderTopLine, screen_items OPTARG(SCREENS_CAN_TIME_OUT, screen_is_sticky()) }; } void MarlinUI::_goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, const bool is_back/*=false*/)) { @@ -90,6 +93,7 @@ void MarlinUI::_goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, const bool is_b is_back ? 0 : sh.top_line, sh.items ); + defer_status_screen(TERN_(SCREENS_CAN_TIME_OUT, sh.sticky)); } else return_to_status(); @@ -147,7 +151,7 @@ void MenuEditItemBase::goto_edit_screen( ) { TERN_(HAS_TOUCH_BUTTONS, ui.on_edit_screen = true); ui.screen_changed = true; - ui.save_previous_screen(); + ui.push_current_screen(); ui.refresh(); editLabel = el; editValue = ev; @@ -175,6 +179,8 @@ bool printer_busy() { void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, const uint8_t top/*=0*/, const uint8_t items/*=0*/) { if (currentScreen != screen) { + TERN_(IS_DWIN_MARLINUI, did_first_redraw = false); + TERN_(HAS_TOUCH_BUTTONS, repeat_delay = BUTTON_DELAY_MENU); TERN_(LCD_SET_PROGRESS_MANUALLY, progress_reset()); @@ -237,7 +243,7 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co // void MarlinUI::synchronize(PGM_P const msg/*=nullptr*/) { static PGM_P sync_message = msg ?: GET_TEXT(MSG_MOVING); - save_previous_screen(); + push_current_screen(); goto_screen([]{ if (should_draw()) MenuItem_static::draw(LCD_HEIGHT >= 4, sync_message); }); @@ -251,9 +257,6 @@ void MarlinUI::synchronize(PGM_P const msg/*=nullptr*/) { * * encoderLine is the position based on the encoder * encoderTopLine is the top menu line to display - * _lcdLineNr is the index of the LCD line (e.g., 0-3) - * _menuLineNr is the menu item to draw and process - * _thisItemNr is the index of each MENU_ITEM or STATIC_ITEM * screen_items is the total number of items in the menu (after one call) */ void scroll_screen(const uint8_t limit, const bool is_menu) { @@ -279,6 +282,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) { #if HAS_BUZZER void MarlinUI::completion_feedback(const bool good/*=true*/) { + TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); // Wake up on rotary encoder click... if (good) { BUZZ(100, 659); BUZZ(100, 698); @@ -289,7 +293,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) { #if HAS_LINE_TO_Z - void line_to_z(const float &z) { + void line_to_z(const_float_t z) { current_position.z = z; line_to_current_position(manual_feedrate_mm_s.z); } @@ -308,7 +312,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) { const int16_t babystep_increment = int16_t(ui.encoderPosition) * (BABYSTEP_SIZE_Z); ui.encoderPosition = 0; - const float diff = planner.steps_to_mm[Z_AXIS] * babystep_increment, + const float diff = planner.mm_per_step[Z_AXIS] * babystep_increment, new_probe_offset = probe.offset.z + diff, new_offs = TERN(BABYSTEP_HOTEND_Z_OFFSET , do_probe ? new_probe_offset : hotend_offset[active_extruder].z - diff @@ -329,7 +333,7 @@ void scroll_screen(const uint8_t limit, const bool is_menu) { if (ui.should_draw()) { if (do_probe) { MenuEditItemBase::draw_edit_screen(GET_TEXT(MSG_ZPROBE_ZOFFSET), BABYSTEP_TO_STR(probe.offset.z)); - TERN_(BABYSTEP_ZPROBE_GFX_OVERLAY, _lcd_zoffset_overlay_gfx(probe.offset.z)); + TERN_(BABYSTEP_ZPROBE_GFX_OVERLAY, ui.zoffset_overlay(probe.offset.z)); } else { #if ENABLED(BABYSTEP_HOTEND_Z_OFFSET) @@ -371,6 +375,7 @@ void MenuItem_confirm::select_screen( selectFunc_t yesFunc, selectFunc_t noFunc, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/ ) { + ui.defer_status_screen(); const bool ui_selection = ui.update_selection(), got_click = ui.use_click(); if (got_click || ui.should_draw()) { draw_select_screen(yes, no, ui_selection, pref, string, suff); @@ -378,7 +383,6 @@ void MenuItem_confirm::select_screen( selectFunc_t callFunc = ui_selection ? yesFunc : noFunc; if (callFunc) callFunc(); else ui.goto_previous_screen(); } - ui.defer_status_screen(); } } diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index de11ee3a5af1..50842dcaf8d5 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -39,10 +39,6 @@ typedef void (*selectFunc_t)(); #define SS_INVERT 0x02 #define SS_DEFAULT SS_CENTER -#if HAS_MARLINUI_U8GLIB && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) - void _lcd_zoffset_overlay_gfx(const float zvalue); -#endif - #if ENABLED(BABYSTEP_ZPROBE_OFFSET) && Z_PROBE_OFFSET_RANGE_MIN >= -9 && Z_PROBE_OFFSET_RANGE_MAX <= 9 #define BABYSTEP_TO_STR(N) ftostr43sign(N) #elif ENABLED(BABYSTEPPING) @@ -114,7 +110,7 @@ class MenuItem_confirm : public MenuItemBase { static inline void select_screen( PGM_P const yes, PGM_P const no, selectFunc_t yesFunc, selectFunc_t noFunc, - PGM_P const pref, const progmem_str string, PGM_P const suff=nullptr + PGM_P const pref, FSTR_P const string, PGM_P const suff=nullptr ) { char str[strlen_P((PGM_P)string) + 1]; strcpy_P(str, (PGM_P)string); @@ -132,14 +128,15 @@ class MenuItem_confirm : public MenuItemBase { // The Menu Edit shadow value typedef union { - bool state; - float decimal; - int8_t int8; - int16_t int16; - int32_t int32; - uint8_t uint8; - uint16_t uint16; - uint32_t uint32; + bool state; + float decimal; + int8_t int8; + int16_t int16; + int32_t int32; + uint8_t uint8; + uint16_t uint16; + uint32_t uint32; + celsius_t celsius; } chimera_t; extern chimera_t editable; @@ -172,14 +169,14 @@ class MenuEditItemBase : public MenuItemBase { public: // Implemented for HD44780 and DOGM // Draw the current item at specified row with edit data - static void draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const inStr, const bool pgm=false); + static void draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const inStr, const bool pgm=false); // Implemented for HD44780 and DOGM // This low-level method is good to draw from anywhere - static void draw_edit_screen(PGM_P const pstr, const char* const value); + static void draw_edit_screen(PGM_P const pstr, const char * const value); // This method is for the current menu item - static inline void draw_edit_screen(const char* const value) { draw_edit_screen(editLabel, value); } + static inline void draw_edit_screen(const char * const value) { draw_edit_screen(editLabel, value); } }; #if ENABLED(SDSUPPORT) @@ -212,11 +209,7 @@ void _lcd_draw_homing(); #define HAS_LINE_TO_Z ANY(DELTA, PROBE_MANUALLY, MESH_BED_LEVELING, LEVEL_BED_CORNERS) #if HAS_LINE_TO_Z - void line_to_z(const float &z); -#endif - -#if HAS_MARLINUI_U8GLIB && EITHER(BABYSTEP_ZPROBE_GFX_OVERLAY, MESH_EDIT_GFX_OVERLAY) - void _lcd_zoffset_overlay_gfx(const float zvalue); + void line_to_z(const_float_t z); #endif #if ENABLED(PROBE_OFFSET_WIZARD) diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index cb7827168b9e..8d87a876b9a3 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -58,20 +58,17 @@ void menu_tmc(); void menu_backlash(); -#if ENABLED(HAS_MOTOR_CURRENT_DAC) +#if HAS_MOTOR_CURRENT_DAC #include "../../feature/dac/stepper_dac.h" void menu_dac() { static xyze_uint8_t driverPercent; - LOOP_XYZE(i) driverPercent[i] = stepper_dac.get_current_percent((AxisEnum)i); + LOOP_LOGICAL_AXES(i) driverPercent[i] = stepper_dac.get_current_percent((AxisEnum)i); START_MENU(); BACK_ITEM(MSG_ADVANCED_SETTINGS); #define EDIT_DAC_PERCENT(A) EDIT_ITEM(uint8, MSG_DAC_PERCENT_##A, &driverPercent[_AXIS(A)], 0, 100, []{ stepper_dac.set_current_percents(driverPercent); }) - EDIT_DAC_PERCENT(X); - EDIT_DAC_PERCENT(Y); - EDIT_DAC_PERCENT(Z); - EDIT_DAC_PERCENT(E); + LOGICAL_AXIS_CODE(EDIT_DAC_PERCENT(E), EDIT_DAC_PERCENT(A), EDIT_DAC_PERCENT(B), EDIT_DAC_PERCENT(C), EDIT_DAC_PERCENT(I), EDIT_DAC_PERCENT(J), EDIT_DAC_PERCENT(K)); ACTION_ITEM(MSG_DAC_EEPROM_WRITE, stepper_dac.commit_eeprom); END_MENU(); } @@ -177,18 +174,25 @@ void menu_backlash(); #if ENABLED(PIDTEMPBED) int16_t autotune_temp_bed = PREHEAT_1_TEMP_BED; #endif + #if ENABLED(PIDTEMPCHAMBER) + int16_t autotune_temp_chamber = PREHEAT_1_TEMP_CHAMBER; + #endif #include "../../gcode/queue.h" - void _lcd_autotune(const int16_t e) { + void _lcd_autotune(const heater_id_t hid) { char cmd[30]; - sprintf_P(cmd, PSTR("M303 U1 E%i S%i"), e, - #if HAS_PID_FOR_BOTH - e < 0 ? autotune_temp_bed : autotune_temp[e] - #else - TERN(PIDTEMPBED, autotune_temp_bed, autotune_temp[e]) + int16_t tune_temp; + switch (hid) { + #if ENABLED(PIDTEMPBED) + case H_BED: tune_temp = autotune_temp_bed; break; #endif - ); + #if ENABLED(PIDTEMPCHAMBER) + case H_CHAMBER: tune_temp = autotune_temp_chamber; break; + #endif + default: tune_temp = autotune_temp[hid]; break; + } + sprintf_P(cmd, PSTR("M303 U1 E%i S%i"), hid, tune_temp); queue.inject(cmd); ui.return_to_status(); } @@ -225,7 +229,7 @@ void menu_backlash(); #if ENABLED(PID_AUTOTUNE_MENU) #define DEFINE_PIDTEMP_FUNCS(N) \ _DEFINE_PIDTEMP_BASE_FUNCS(N); \ - void lcd_autotune_callback_E##N() { _lcd_autotune(N); } + void lcd_autotune_callback_E##N() { _lcd_autotune(heater_id_t(N)); } #else #define DEFINE_PIDTEMP_FUNCS(N) _DEFINE_PIDTEMP_BASE_FUNCS(N); #endif @@ -254,8 +258,8 @@ void menu_backlash(); // #if BOTH(AUTOTEMP, HAS_TEMP_HOTEND) EDIT_ITEM(bool, MSG_AUTOTEMP, &planner.autotemp_enabled); - EDIT_ITEM(float3, MSG_MIN, &planner.autotemp_min, 0, float(HEATER_0_MAXTEMP) - HOTEND_OVERSHOOT); - EDIT_ITEM(float3, MSG_MAX, &planner.autotemp_max, 0, float(HEATER_0_MAXTEMP) - HOTEND_OVERSHOOT); + EDIT_ITEM(int3, MSG_MIN, &planner.autotemp_min, 0, thermalManager.hotend_max_target(0)); + EDIT_ITEM(int3, MSG_MAX, &planner.autotemp_max, 0, thermalManager.hotend_max_target(0)); EDIT_ITEM(float42_52, MSG_FACTOR, &planner.autotemp_factor, 0, 10); #endif @@ -269,56 +273,70 @@ void menu_backlash(); // #if ENABLED(PID_EDIT_MENU) - #define __PID_BASE_MENU_ITEMS(N) \ - raw_Ki = unscalePID_i(TERN(PID_BED_MENU_SECTION, thermalManager.temp_bed.pid.Ki, PID_PARAM(Ki, N))); \ - raw_Kd = unscalePID_d(TERN(PID_BED_MENU_SECTION, thermalManager.temp_bed.pid.Kd, PID_PARAM(Kd, N))); \ - EDIT_ITEM_FAST_N(float41sign, N, MSG_PID_P_E, &TERN(PID_BED_MENU_SECTION, thermalManager.temp_bed.pid.Kp, PID_PARAM(Kp, N)), 1, 9990); \ + #define _PID_EDIT_ITEMS_TMPL(N,T) \ + raw_Ki = unscalePID_i(T.pid.Ki); \ + raw_Kd = unscalePID_d(T.pid.Kd); \ + EDIT_ITEM_FAST_N(float41sign, N, MSG_PID_P_E, &T.pid.Kp, 1, 9990); \ + EDIT_ITEM_FAST_N(float52sign, N, MSG_PID_I_E, &raw_Ki, 0.01f, 9990, []{ copy_and_scalePID_i(N); }); \ + EDIT_ITEM_FAST_N(float41sign, N, MSG_PID_D_E, &raw_Kd, 1, 9990, []{ copy_and_scalePID_d(N); }) + + #define __PID_HOTEND_MENU_ITEMS(N) \ + raw_Ki = unscalePID_i(PID_PARAM(Ki, N)); \ + raw_Kd = unscalePID_d(PID_PARAM(Kd, N)); \ + EDIT_ITEM_FAST_N(float41sign, N, MSG_PID_P_E, &PID_PARAM(Kp, N), 1, 9990); \ EDIT_ITEM_FAST_N(float52sign, N, MSG_PID_I_E, &raw_Ki, 0.01f, 9990, []{ copy_and_scalePID_i(N); }); \ EDIT_ITEM_FAST_N(float41sign, N, MSG_PID_D_E, &raw_Kd, 1, 9990, []{ copy_and_scalePID_d(N); }) #if ENABLED(PID_EXTRUSION_SCALING) - #define _PID_BASE_MENU_ITEMS(N) \ - __PID_BASE_MENU_ITEMS(N); \ + #define _PID_HOTEND_MENU_ITEMS(N) \ + __PID_HOTEND_MENU_ITEMS(N); \ EDIT_ITEM_N(float4, N, MSG_PID_C_E, &PID_PARAM(Kc, N), 1, 9990) #else - #define _PID_BASE_MENU_ITEMS(N) __PID_BASE_MENU_ITEMS(N) + #define _PID_HOTEND_MENU_ITEMS(N) __PID_HOTEND_MENU_ITEMS(N) #endif #if ENABLED(PID_FAN_SCALING) - #define _PID_EDIT_MENU_ITEMS(N) \ - _PID_BASE_MENU_ITEMS(N); \ + #define _HOTEND_PID_EDIT_MENU_ITEMS(N) \ + _PID_HOTEND_MENU_ITEMS(N); \ EDIT_ITEM_N(float4, N, MSG_PID_F_E, &PID_PARAM(Kf, N), 1, 9990) #else - #define _PID_EDIT_MENU_ITEMS(N) _PID_BASE_MENU_ITEMS(N) + #define _HOTEND_PID_EDIT_MENU_ITEMS(N) _PID_HOTEND_MENU_ITEMS(N) #endif #else - #define _PID_EDIT_MENU_ITEMS(N) NOOP + #define _HOTEND_PID_EDIT_MENU_ITEMS(N) NOOP #endif #if ENABLED(PID_AUTOTUNE_MENU) - #define PID_EDIT_MENU_ITEMS(N) \ - _PID_EDIT_MENU_ITEMS(N); \ - EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, thermalManager.heater_maxtemp[N] - HOTEND_OVERSHOOT, []{ _lcd_autotune(MenuItemBase::itemIndex); }); + #define HOTEND_PID_EDIT_MENU_ITEMS(N) \ + _HOTEND_PID_EDIT_MENU_ITEMS(N); \ + EDIT_ITEM_FAST_N(int3, N, MSG_PID_AUTOTUNE_E, &autotune_temp[N], 150, thermalManager.hotend_max_target(N), []{ _lcd_autotune(heater_id_t(MenuItemBase::itemIndex)); }); #else - #define PID_EDIT_MENU_ITEMS(N) _PID_EDIT_MENU_ITEMS(N); + #define HOTEND_PID_EDIT_MENU_ITEMS(N) _HOTEND_PID_EDIT_MENU_ITEMS(N); #endif - PID_EDIT_MENU_ITEMS(0); + HOTEND_PID_EDIT_MENU_ITEMS(0); #if ENABLED(PID_PARAMS_PER_HOTEND) - REPEAT_S(1, HOTENDS, PID_EDIT_MENU_ITEMS) + REPEAT_S(1, HOTENDS, HOTEND_PID_EDIT_MENU_ITEMS) #endif #if ENABLED(PIDTEMPBED) #if ENABLED(PID_EDIT_MENU) - #define PID_BED_MENU_SECTION - __PID_BASE_MENU_ITEMS(-1); - #undef PID_BED_MENU_SECTION + _PID_EDIT_ITEMS_TMPL(H_BED, thermalManager.temp_bed); + #endif + #if ENABLED(PID_AUTOTUNE_MENU) + EDIT_ITEM_FAST_N(int3, H_BED, MSG_PID_AUTOTUNE_E, &autotune_temp_bed, PREHEAT_1_TEMP_BED, BED_MAX_TARGET, []{ _lcd_autotune(H_BED); }); + #endif + #endif + + #if ENABLED(PIDTEMPCHAMBER) + #if ENABLED(PID_EDIT_MENU) + _PID_EDIT_ITEMS_TMPL(H_CHAMBER, thermalManager.temp_chamber); #endif #if ENABLED(PID_AUTOTUNE_MENU) - EDIT_ITEM_FAST_N(int3, -1, MSG_PID_AUTOTUNE_E, &autotune_temp_bed, PREHEAT_1_TEMP_BED, BED_MAX_TARGET, []{ _lcd_autotune(-1); }); + EDIT_ITEM_FAST_N(int3, H_CHAMBER, MSG_PID_AUTOTUNE_E, &autotune_temp_chamber, PREHEAT_1_TEMP_CHAMBER, CHAMBER_MAX_TARGET, []{ _lcd_autotune(H_CHAMBER); }); #endif #endif @@ -329,16 +347,6 @@ void menu_backlash(); #if DISABLED(SLIM_LCD_MENUS) - #if ENABLED(DISTINCT_E_FACTORS) - inline void _reset_e_acceleration_rate(const uint8_t e) { if (e == active_extruder) planner.reset_acceleration_rates(); } - inline void _planner_refresh_e_positioning(const uint8_t e) { - if (e == active_extruder) - planner.refresh_positioning(); - else - planner.steps_to_mm[E_AXIS_N(e)] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS_N(e)]; - } - #endif - // M203 / M205 Velocity options void menu_advanced_velocity() { // M203 Max Feedrate @@ -348,7 +356,7 @@ void menu_backlash(); #elif ENABLED(LIMITED_MAX_FR_EDITING) DEFAULT_MAX_FEEDRATE #else - { 9999, 9999, 9999, 9999 } + LOGICAL_AXIS_ARRAY(9999, 9999, 9999, 9999, 9999, 9999, 9999) #endif ; #if ENABLED(LIMITED_MAX_FR_EDITING) && !defined(MAX_FEEDRATE_EDIT_VALUES) @@ -361,9 +369,7 @@ void menu_backlash(); BACK_ITEM(MSG_ADVANCED_SETTINGS); #define EDIT_VMAX(N) EDIT_ITEM_FAST(float5, MSG_VMAX_##N, &planner.settings.max_feedrate_mm_s[_AXIS(N)], 1, max_fr_edit_scaled[_AXIS(N)]) - EDIT_VMAX(A); - EDIT_VMAX(B); - EDIT_VMAX(C); + LINEAR_AXIS_CODE(EDIT_VMAX(A), EDIT_VMAX(B), EDIT_VMAX(C), EDIT_VMAX(I), EDIT_VMAX(J), EDIT_VMAX(K)); #if E_STEPPERS EDIT_ITEM_FAST(float5, MSG_VMAX_E, &planner.settings.max_feedrate_mm_s[E_AXIS_N(active_extruder)], 1, max_fr_edit_scaled.e); @@ -393,7 +399,7 @@ void menu_backlash(); #elif ENABLED(LIMITED_MAX_ACCEL_EDITING) DEFAULT_MAX_ACCELERATION #else - { 99000, 99000, 99000, 99000 } + LOGICAL_AXIS_ARRAY(99000, 99000, 99000, 99000, 99000, 99000, 99000) #endif ; #if ENABLED(LIMITED_MAX_ACCEL_EDITING) && !defined(MAX_ACCEL_EDIT_VALUES) @@ -408,21 +414,27 @@ void menu_backlash(); // M204 P Acceleration EDIT_ITEM_FAST(float5_25, MSG_ACC, &planner.settings.acceleration, 25, max_accel); - // M204 R Retract Acceleration - EDIT_ITEM_FAST(float5, MSG_A_RETRACT, &planner.settings.retract_acceleration, 100, planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(active_extruder)]); + #if HAS_EXTRUDERS + // M204 R Retract Acceleration + EDIT_ITEM_FAST(float5, MSG_A_RETRACT, &planner.settings.retract_acceleration, 100, planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(active_extruder)]); + #endif // M204 T Travel Acceleration EDIT_ITEM_FAST(float5_25, MSG_A_TRAVEL, &planner.settings.travel_acceleration, 25, max_accel); #define EDIT_AMAX(Q,L) EDIT_ITEM_FAST(long5_25, MSG_AMAX_##Q, &planner.settings.max_acceleration_mm_per_s2[_AXIS(Q)], L, max_accel_edit_scaled[_AXIS(Q)], []{ planner.reset_acceleration_rates(); }) - EDIT_AMAX(A, 100); - EDIT_AMAX(B, 100); - EDIT_AMAX(C, 10); + LINEAR_AXIS_CODE( + EDIT_AMAX(A, 100), EDIT_AMAX(B, 100), EDIT_AMAX(C, 10), + EDIT_AMAX(I, 10), EDIT_AMAX(J, 10), EDIT_AMAX(K, 10) + ); #if ENABLED(DISTINCT_E_FACTORS) EDIT_ITEM_FAST(long5_25, MSG_AMAX_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(active_extruder)], 100, max_accel_edit_scaled.e, []{ planner.reset_acceleration_rates(); }); LOOP_L_N(n, E_STEPPERS) - EDIT_ITEM_FAST_N(long5_25, n, MSG_AMAX_EN, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(n)], 100, max_accel_edit_scaled.e, []{ _reset_e_acceleration_rate(MenuItemBase::itemIndex); }); + EDIT_ITEM_FAST_N(long5_25, n, MSG_AMAX_EN, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(n)], 100, max_accel_edit_scaled.e, []{ + if (MenuItemBase::itemIndex == active_extruder) + planner.reset_acceleration_rates(); + }); #elif E_STEPPERS EDIT_ITEM_FAST(long5_25, MSG_AMAX_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, max_accel_edit_scaled.e, []{ planner.reset_acceleration_rates(); }); #endif @@ -454,20 +466,25 @@ void menu_backlash(); #ifdef MAX_JERK_EDIT_VALUES MAX_JERK_EDIT_VALUES #elif ENABLED(LIMITED_JERK_EDITING) - { (DEFAULT_XJERK) * 2, (DEFAULT_YJERK) * 2, (DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 } + { LOGICAL_AXIS_LIST((DEFAULT_EJERK) * 2, + (DEFAULT_XJERK) * 2, (DEFAULT_YJERK) * 2, (DEFAULT_ZJERK) * 2, + (DEFAULT_IJERK) * 2, (DEFAULT_JJERK) * 2, (DEFAULT_KJERK) * 2) } #else - { 990, 990, 990, 990 } + { LOGICAL_AXIS_LIST(990, 990, 990, 990, 990, 990, 990) } #endif ; #define EDIT_JERK(N) EDIT_ITEM_FAST(float3, MSG_V##N##_JERK, &planner.max_jerk[_AXIS(N)], 1, max_jerk_edit[_AXIS(N)]) - EDIT_JERK(A); - EDIT_JERK(B); #if ENABLED(DELTA) - EDIT_JERK(C); + #define EDIT_JERK_C() EDIT_JERK(C) #else - EDIT_ITEM_FAST(float52sign, MSG_VC_JERK, &planner.max_jerk.c, 0.1f, max_jerk_edit.c); + #define EDIT_JERK_C() EDIT_ITEM_FAST(float52sign, MSG_VC_JERK, &planner.max_jerk.c, 0.1f, max_jerk_edit.c) #endif - #if HAS_CLASSIC_E_JERK + LINEAR_AXIS_CODE( + EDIT_JERK(A), EDIT_JERK(B), EDIT_JERK_C(), + EDIT_JERK(I), EDIT_JERK(J), EDIT_JERK(K) + ); + + #if HAS_EXTRUDERS EDIT_ITEM_FAST(float52sign, MSG_VE_JERK, &planner.max_jerk.e, 0.1f, max_jerk_edit.e); #endif @@ -503,13 +520,20 @@ void menu_advanced_steps_per_mm() { BACK_ITEM(MSG_ADVANCED_SETTINGS); #define EDIT_QSTEPS(Q) EDIT_ITEM_FAST(float51, MSG_##Q##_STEPS, &planner.settings.axis_steps_per_mm[_AXIS(Q)], 5, 9999, []{ planner.refresh_positioning(); }) - EDIT_QSTEPS(A); - EDIT_QSTEPS(B); - EDIT_QSTEPS(C); + LINEAR_AXIS_CODE( + EDIT_QSTEPS(A), EDIT_QSTEPS(B), EDIT_QSTEPS(C), + EDIT_QSTEPS(I), EDIT_QSTEPS(J), EDIT_QSTEPS(K) + ); #if ENABLED(DISTINCT_E_FACTORS) LOOP_L_N(n, E_STEPPERS) - EDIT_ITEM_FAST_N(float51, n, MSG_EN_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(n)], 5, 9999, []{ _planner_refresh_e_positioning(MenuItemBase::itemIndex); }); + EDIT_ITEM_FAST_N(float51, n, MSG_EN_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(n)], 5, 9999, []{ + const uint8_t e = MenuItemBase::itemIndex; + if (e == active_extruder) + planner.refresh_positioning(); + else + planner.mm_per_step[E_AXIS_N(e)] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS_N(e)]; + }); #elif E_STEPPERS EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, []{ planner.refresh_positioning(); }); #endif @@ -547,9 +571,7 @@ void menu_advanced_settings() { SUBMENU(MSG_JERK, menu_advanced_jerk); #elif HAS_JUNCTION_DEVIATION EDIT_ITEM(float43, MSG_JUNCTION_DEVIATION, &planner.junction_deviation_mm, 0.001f, 0.3f - #if ENABLED(LIN_ADVANCE) - , planner.recalculate_max_e_jerk - #endif + OPTARG(LIN_ADVANCE, planner.recalculate_max_e_jerk) ); #endif @@ -568,7 +590,7 @@ void menu_advanced_settings() { SUBMENU(MSG_BACKLASH, menu_backlash); #endif - #if ENABLED(HAS_MOTOR_CURRENT_DAC) + #if HAS_MOTOR_CURRENT_DAC SUBMENU(MSG_DRIVE_STRENGTH, menu_dac); #endif #if HAS_MOTOR_CURRENT_PWM diff --git a/Marlin/src/lcd/menu/menu_backlash.cpp b/Marlin/src/lcd/menu/menu_backlash.cpp index 9d0b970ae1d3..b9adacc5021d 100644 --- a/Marlin/src/lcd/menu/menu_backlash.cpp +++ b/Marlin/src/lcd/menu/menu_backlash.cpp @@ -38,10 +38,28 @@ void menu_backlash() { EDIT_ITEM_FAST(percent, MSG_BACKLASH_CORRECTION, &backlash.correction, all_off, all_on); + #if DISABLED(CORE_BACKLASH) || ENABLED(MARKFORGED_XY) + #define _CAN_CALI AXIS_CAN_CALIBRATE + #else + #define _CAN_CALI(A) true + #endif #define EDIT_BACKLASH_DISTANCE(N) EDIT_ITEM_FAST(float43, MSG_BACKLASH_##N, &backlash.distance_mm[_AXIS(N)], 0.0f, 9.9f); - if (AXIS_CAN_CALIBRATE(A)) EDIT_BACKLASH_DISTANCE(A); - if (AXIS_CAN_CALIBRATE(B)) EDIT_BACKLASH_DISTANCE(B); - if (AXIS_CAN_CALIBRATE(C)) EDIT_BACKLASH_DISTANCE(C); + if (_CAN_CALI(A)) EDIT_BACKLASH_DISTANCE(A); + #if HAS_Y_AXIS && _CAN_CALI(B) + EDIT_BACKLASH_DISTANCE(B); + #endif + #if HAS_Z_AXIS && _CAN_CALI(C) + EDIT_BACKLASH_DISTANCE(C); + #endif + #if LINEAR_AXES >= 4 && _CAN_CALI(I) + EDIT_BACKLASH_DISTANCE(I); + #endif + #if LINEAR_AXES >= 5 && _CAN_CALI(J) + EDIT_BACKLASH_DISTANCE(J); + #endif + #if LINEAR_AXES >= 6 && _CAN_CALI(K) + EDIT_BACKLASH_DISTANCE(K); + #endif #ifdef BACKLASH_SMOOTHING_MM EDIT_ITEM_FAST(float43, MSG_BACKLASH_SMOOTHING, &backlash.smoothing_mm, 0.0f, 9.9f); diff --git a/Marlin/src/lcd/menu/menu_bed_corners.cpp b/Marlin/src/lcd/menu/menu_bed_corners.cpp index 751be18600f6..ea9ef75aa199 100644 --- a/Marlin/src/lcd/menu/menu_bed_corners.cpp +++ b/Marlin/src/lcd/menu/menu_bed_corners.cpp @@ -87,7 +87,7 @@ constexpr int lco[] = LEVEL_CORNERS_LEVELING_ORDER; constexpr bool level_corners_3_points = COUNT(lco) == 2; static_assert(level_corners_3_points || COUNT(lco) == 4, "LEVEL_CORNERS_LEVELING_ORDER must have exactly 2 or 4 corners."); -constexpr int lcodiff = abs(lco[0] - lco[1]); +constexpr int lcodiff = ABS(lco[0] - lco[1]); static_assert(COUNT(lco) == 4 || lcodiff == 1 || lcodiff == 3, "The first two LEVEL_CORNERS_LEVELING_ORDER corners must be on the same edge."); constexpr int nr_edge_points = level_corners_3_points ? 3 : 4; @@ -102,7 +102,7 @@ static int8_t bed_corner; /** * Select next corner coordinates */ -static inline void _lcd_level_bed_corners_get_next_position() { +static void _lcd_level_bed_corners_get_next_position() { if (level_corners_3_points) { if (bed_corner >= available_points) bed_corner = 0; // Above max position -> move back to first corner @@ -172,14 +172,14 @@ static inline void _lcd_level_bed_corners_get_next_position() { TERN_(HAS_MARLINUI_U8GLIB, ui.set_font(FONT_MENU)); // Set up the font for extra info - MenuItem_static::draw(0, GET_TEXT(MSG_PROBING_MESH), SS_INVERT); // "Probing Mesh" heading + MenuItem_static::draw(0, GET_TEXT(MSG_PROBING_POINT), SS_INVERT); // "Probing Mesh" heading uint8_t cy = TERN(TFT_COLOR_UI, 3, LCD_HEIGHT - 1), y = LCD_ROW_Y(cy); // Display # of good points found vs total needed if (PAGE_CONTAINS(y - (MENU_FONT_HEIGHT), y)) { SETCURSOR(TERN(TFT_COLOR_UI, 2, 0), cy); - lcd_put_u8str_P(GET_TEXT(MSG_LEVEL_CORNERS_GOOD_POINTS)); + lcd_put_u8str_P(GET_TEXT(MSG_BED_TRAMMING_GOOD_POINTS)); IF_ENABLED(TFT_COLOR_UI, lcd_moveto(12, cy)); lcd_put_u8str(GOOD_POINTS_TO_STR(good_points)); lcd_put_wchar('/'); @@ -187,12 +187,12 @@ static inline void _lcd_level_bed_corners_get_next_position() { } --cy; - y -= MENU_FONT_HEIGHT; + y -= MENU_LINE_HEIGHT; // Display the Last Z value if (PAGE_CONTAINS(y - (MENU_FONT_HEIGHT), y)) { SETCURSOR(TERN(TFT_COLOR_UI, 2, 0), cy); - lcd_put_u8str_P(GET_TEXT(MSG_LEVEL_CORNERS_LAST_Z)); + lcd_put_u8str_P(GET_TEXT(MSG_BED_TRAMMING_LAST_Z)); IF_ENABLED(TFT_COLOR_UI, lcd_moveto(12, 2)); lcd_put_u8str(LAST_Z_TO_STR(last_z)); } @@ -201,10 +201,10 @@ static inline void _lcd_level_bed_corners_get_next_position() { void _lcd_draw_raise() { if (!ui.should_draw()) return; MenuItem_confirm::select_screen( - GET_TEXT(MSG_BUTTON_DONE), GET_TEXT(MSG_BUTTON_SKIP) + GET_TEXT(MSG_BUTTON_DONE), GET_TEXT(MSG_BUTTON_SKIP) , []{ corner_probing_done = true; wait_for_probe = false; } , []{ wait_for_probe = false; } - , GET_TEXT(MSG_LEVEL_CORNERS_RAISE) + , GET_TEXT(MSG_BED_TRAMMING_RAISE) , (const char*)nullptr, NUL_STR ); } @@ -212,11 +212,9 @@ static inline void _lcd_level_bed_corners_get_next_position() { void _lcd_draw_level_prompt() { if (!ui.should_draw()) return; MenuItem_confirm::confirm_screen( - []{ queue.inject_P(TERN(HAS_LEVELING, PSTR("G29N"), G28_STR)); - ui.return_to_status(); - } + []{ queue.inject_P(TERN(HAS_LEVELING, PSTR("G29N"), G28_STR)); ui.return_to_status(); } , []{ ui.goto_previous_screen_no_defer(); } - , GET_TEXT(MSG_LEVEL_CORNERS_IN_RANGE) + , GET_TEXT(MSG_BED_TRAMMING_IN_RANGE) , (const char*)nullptr, PSTR("?") ); } @@ -224,8 +222,8 @@ static inline void _lcd_level_bed_corners_get_next_position() { bool _lcd_level_bed_corners_probe(bool verify=false) { if (verify) do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP); // do clearance if needed TERN_(BLTOUCH_SLOW_MODE, bltouch.deploy()); // Deploy in LOW SPEED MODE on every probe action - do_blocking_move_to_z(last_z - LEVEL_CORNERS_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_SPEED_SLOW)); // Move down to lower tolerance - if (TEST(endstops.trigger_state(), TERN(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, Z_MIN, Z_MIN_PROBE))) { // check if probe triggered + do_blocking_move_to_z(last_z - LEVEL_CORNERS_PROBE_TOLERANCE, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW)); // Move down to lower tolerance + if (TEST(endstops.trigger_state(), Z_MIN_PROBE)) { // check if probe triggered endstops.hit_on_purpose(); set_current_from_steppers_for_axis(Z_AXIS); sync_plan_position(); @@ -268,13 +266,14 @@ static inline void _lcd_level_bed_corners_get_next_position() { ui.goto_screen(_lcd_draw_probing); do { ui.refresh(LCDVIEW_REDRAW_NOW); - _lcd_draw_probing(); // update screen with # of good points - do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP); // clearance + _lcd_draw_probing(); // update screen with # of good points + do_blocking_move_to_z(SUM_TERN(BLTOUCH_HS_MODE, current_position.z + LEVEL_CORNERS_Z_HOP, 7)); // clearance _lcd_level_bed_corners_get_next_position(); // Select next corner coordinates current_position -= probe.offset_xy; // Account for probe offsets do_blocking_move_to_xy(current_position); // Goto corner + TERN_(BLTOUCH_HS_MODE, bltouch.deploy()); // Deploy in HIGH SPEED MODE if (!_lcd_level_bed_corners_probe()) { // Probe down to tolerance if (_lcd_level_bed_corners_raise()) { // Prompt user to raise bed if needed #if ENABLED(LEVEL_CORNERS_VERIFY_RAISED) // Verify @@ -295,13 +294,19 @@ static inline void _lcd_level_bed_corners_get_next_position() { } while (good_points < nr_edge_points); // loop until all points within tolerance + #if ENABLED(BLTOUCH_HS_MODE) + // In HIGH SPEED MODE do clearance and stow at the very end + do_blocking_move_to_z(current_position.z + LEVEL_CORNERS_Z_HOP); + bltouch.stow(); + #endif + ui.goto_screen(_lcd_draw_level_prompt); // prompt for bed leveling ui.set_selection(true); } #else // !LEVEL_CORNERS_USE_PROBE - static inline void _lcd_goto_next_corner() { + static void _lcd_goto_next_corner() { line_to_z(LEVEL_CORNERS_Z_HOP); // Select next corner coordinates @@ -314,7 +319,7 @@ static inline void _lcd_level_bed_corners_get_next_position() { #endif // !LEVEL_CORNERS_USE_PROBE -static inline void _lcd_level_bed_corners_homing() { +static void _lcd_level_bed_corners_homing() { _lcd_draw_homing(); if (!all_axes_homed()) return; #if ENABLED(LEVEL_CORNERS_USE_PROBE) diff --git a/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/Marlin/src/lcd/menu/menu_bed_leveling.cpp index 6a9f89f118ba..f01c7899fbe3 100644 --- a/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/Marlin/src/lcd/menu/menu_bed_leveling.cpp @@ -63,16 +63,16 @@ // and allow the command queue to be processed. // // When G29 finishes the last move: - // - Raise Z to the "manual probe height" + // - Raise Z to the "Z after probing" height // - Don't return until done. // // ** This blocks the command queue! ** // void _lcd_level_bed_done() { if (!ui.wait_for_move) { - #if MANUAL_PROBE_HEIGHT > 0 && DISABLED(MESH_BED_LEVELING) + #if Z_AFTER_PROBING > 0 && DISABLED(MESH_BED_LEVELING) // Display "Done" screen and wait for moves to complete - line_to_z(MANUAL_PROBE_HEIGHT); + line_to_z(Z_AFTER_PROBING); ui.synchronize(GET_TEXT(MSG_LEVEL_BED_DONE)); #endif ui.goto_previous_screen_no_defer(); @@ -206,7 +206,7 @@ #if ENABLED(MESH_EDIT_MENU) inline void refresh_planner() { - set_current_from_steppers_for_axis(ALL_AXES); + set_current_from_steppers_for_axis(ALL_AXES_ENUM); sync_plan_position(); } @@ -214,8 +214,8 @@ static uint8_t xind, yind; // =0 START_MENU(); BACK_ITEM(MSG_BED_LEVELING); - EDIT_ITEM(uint8, MSG_MESH_X, &xind, 0, GRID_MAX_POINTS_X - 1); - EDIT_ITEM(uint8, MSG_MESH_Y, &yind, 0, GRID_MAX_POINTS_Y - 1); + EDIT_ITEM(uint8, MSG_MESH_X, &xind, 0, (GRID_MAX_POINTS_X) - 1); + EDIT_ITEM(uint8, MSG_MESH_Y, &yind, 0, (GRID_MAX_POINTS_Y) - 1); EDIT_ITEM_FAST(float43, MSG_MESH_EDIT_Z, &Z_VALUES(xind, yind), -(LCD_PROBE_Z_RANGE) * 0.5, (LCD_PROBE_Z_RANGE) * 0.5, refresh_planner); END_MENU(); } @@ -278,7 +278,12 @@ void menu_bed_leveling() { // Mesh Bed Leveling Z-Offset // #if ENABLED(MESH_BED_LEVELING) - EDIT_ITEM(float43, MSG_BED_Z, &mbl.z_offset, -1, 1); + #if WITHIN(Z_PROBE_OFFSET_RANGE_MIN, -9, 9) + #define LCD_Z_OFFSET_TYPE float43 // Values from -9.000 to +9.000 + #else + #define LCD_Z_OFFSET_TYPE float42_52 // Values from -99.99 to 99.99 + #endif + EDIT_ITEM(LCD_Z_OFFSET_TYPE, MSG_BED_Z, &mbl.z_offset, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX); #endif #if ENABLED(BABYSTEP_ZPROBE_OFFSET) @@ -288,7 +293,7 @@ void menu_bed_leveling() { #endif #if ENABLED(LEVEL_BED_CORNERS) - SUBMENU(MSG_LEVEL_CORNERS, _lcd_level_bed_corners); + SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners); #endif #if ENABLED(EEPROM_SETTINGS) diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp index 7b95f435baa0..c9227724ab23 100644 --- a/Marlin/src/lcd/menu/menu_configuration.cpp +++ b/Marlin/src/lcd/menu/menu_configuration.cpp @@ -130,6 +130,7 @@ void menu_advanced_settings(); #if ENABLED(TOOLCHANGE_MIGRATION_FEATURE) #include "../../module/motion.h" // for active_extruder + #include "../../gcode/queue.h" void menu_toolchange_migration() { PGM_P const msg_migrate = GET_TEXT(MSG_TOOL_MIGRATION_SWAP); @@ -216,7 +217,7 @@ void menu_advanced_settings(); #if ENABLED(BLTOUCH_LCD_VOLTAGE_MENU) void bltouch_report() { - SERIAL_ECHOLNPAIR("EEPROM Last BLTouch Mode - ", (int)bltouch.last_written_mode); + SERIAL_ECHOLNPGM("EEPROM Last BLTouch Mode - ", bltouch.last_written_mode); SERIAL_ECHOLNPGM("Configuration BLTouch Mode - " TERN(BLTOUCH_SET_5V_MODE, "5V", "OD")); char mess[21]; strcpy_P(mess, PSTR("BLTouch Mode - ")); @@ -325,10 +326,10 @@ void menu_advanced_settings(); EDIT_ITEM_N(percent, m, MSG_FAN_SPEED, &editable.uint8, 0, 255, []{ ui.material_preset[MenuItemBase::itemIndex].fan_speed = editable.uint8; }); #endif #if HAS_TEMP_HOTEND - EDIT_ITEM(uint16_3, MSG_NOZZLE, &ui.material_preset[m].hotend_temp, MINTEMP_ALL, MAXTEMP_ALL - HOTEND_OVERSHOOT); + EDIT_ITEM(int3, MSG_NOZZLE, &ui.material_preset[m].hotend_temp, MINTEMP_ALL, MAXTEMP_ALL - (HOTEND_OVERSHOOT)); #endif #if HAS_HEATED_BED - EDIT_ITEM(uint16_3, MSG_BED, &ui.material_preset[m].bed_temp, BED_MINTEMP, BED_MAX_TARGET); + EDIT_ITEM(int3, MSG_BED, &ui.material_preset[m].bed_temp, BED_MINTEMP, BED_MAX_TARGET); #endif #if ENABLED(EEPROM_SETTINGS) ACTION_ITEM(MSG_STORE_EEPROM, ui.store_settings); @@ -338,6 +339,125 @@ void menu_advanced_settings(); #endif +#if ENABLED(CUSTOM_MENU_CONFIG) + + void _lcd_custom_menus_configuration_gcode(PGM_P const cmd) { + queue.inject_P(cmd); + TERN_(CUSTOM_MENU_CONFIG_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback()); + TERN_(CUSTOM_MENU_CONFIG_SCRIPT_RETURN, ui.return_to_status()); + } + + void custom_menus_configuration() { + START_MENU(); + BACK_ITEM(MSG_MAIN); + + #define HAS_CUSTOM_ITEM_CONF(N) (defined(CONFIG_MENU_ITEM_##N##_DESC) && defined(CONFIG_MENU_ITEM_##N##_GCODE)) + + #ifdef CUSTOM_MENU_CONFIG_SCRIPT_DONE + #define _DONE_SCRIPT "\n" CUSTOM_MENU_CONFIG_SCRIPT_DONE + #else + #define _DONE_SCRIPT "" + #endif + #define GCODE_LAMBDA_CONF(N) []{ _lcd_custom_menus_configuration_gcode(PSTR(CONFIG_MENU_ITEM_##N##_GCODE _DONE_SCRIPT)); } + #define _CUSTOM_ITEM_CONF(N) ACTION_ITEM_P(PSTR(CONFIG_MENU_ITEM_##N##_DESC), GCODE_LAMBDA_CONF(N)); + #define _CUSTOM_ITEM_CONF_CONFIRM(N) \ + SUBMENU_P(PSTR(CONFIG_MENU_ITEM_##N##_DESC), []{ \ + MenuItem_confirm::confirm_screen( \ + GCODE_LAMBDA_CONF(N), \ + ui.goto_previous_screen, \ + PSTR(CONFIG_MENU_ITEM_##N##_DESC "?") \ + ); \ + }) + + #define CUSTOM_ITEM_CONF(N) do{ \ + constexpr char c = CONFIG_MENU_ITEM_##N##_GCODE[strlen(CONFIG_MENU_ITEM_##N##_GCODE) - 1]; \ + static_assert(c != '\n' && c != '\r', "CONFIG_MENU_ITEM_" STRINGIFY(N) "_GCODE cannot have a newline at the end. Please remove it."); \ + if (ENABLED(CONFIG_MENU_ITEM_##N##_CONFIRM)) \ + _CUSTOM_ITEM_CONF_CONFIRM(N); \ + else \ + _CUSTOM_ITEM_CONF(N); \ + }while(0) + + #if HAS_CUSTOM_ITEM_CONF(1) + CUSTOM_ITEM_CONF(1); + #endif + #if HAS_CUSTOM_ITEM_CONF(2) + CUSTOM_ITEM_CONF(2); + #endif + #if HAS_CUSTOM_ITEM_CONF(3) + CUSTOM_ITEM_CONF(3); + #endif + #if HAS_CUSTOM_ITEM_CONF(4) + CUSTOM_ITEM_CONF(4); + #endif + #if HAS_CUSTOM_ITEM_CONF(5) + CUSTOM_ITEM_CONF(5); + #endif + #if HAS_CUSTOM_ITEM_CONF(6) + CUSTOM_ITEM_CONF(6); + #endif + #if HAS_CUSTOM_ITEM_CONF(7) + CUSTOM_ITEM_CONF(7); + #endif + #if HAS_CUSTOM_ITEM_CONF(8) + CUSTOM_ITEM_CONF(8); + #endif + #if HAS_CUSTOM_ITEM_CONF(9) + CUSTOM_ITEM_CONF(9); + #endif + #if HAS_CUSTOM_ITEM_CONF(10) + CUSTOM_ITEM_CONF(10); + #endif + #if HAS_CUSTOM_ITEM_CONF(11) + CUSTOM_ITEM_CONF(11); + #endif + #if HAS_CUSTOM_ITEM_CONF(12) + CUSTOM_ITEM_CONF(12); + #endif + #if HAS_CUSTOM_ITEM_CONF(13) + CUSTOM_ITEM_CONF(13); + #endif + #if HAS_CUSTOM_ITEM_CONF(14) + CUSTOM_ITEM_CONF(14); + #endif + #if HAS_CUSTOM_ITEM_CONF(15) + CUSTOM_ITEM_CONF(15); + #endif + #if HAS_CUSTOM_ITEM_CONF(16) + CUSTOM_ITEM_CONF(16); + #endif + #if HAS_CUSTOM_ITEM_CONF(17) + CUSTOM_ITEM_CONF(17); + #endif + #if HAS_CUSTOM_ITEM_CONF(18) + CUSTOM_ITEM_CONF(18); + #endif + #if HAS_CUSTOM_ITEM_CONF(19) + CUSTOM_ITEM_CONF(19); + #endif + #if HAS_CUSTOM_ITEM_CONF(20) + CUSTOM_ITEM_CONF(20); + #endif + #if HAS_CUSTOM_ITEM_CONF(21) + CUSTOM_ITEM_CONF(21); + #endif + #if HAS_CUSTOM_ITEM_CONF(22) + CUSTOM_ITEM_CONF(22); + #endif + #if HAS_CUSTOM_ITEM_CONF(23) + CUSTOM_ITEM_CONF(23); + #endif + #if HAS_CUSTOM_ITEM_CONF(24) + CUSTOM_ITEM_CONF(24); + #endif + #if HAS_CUSTOM_ITEM_CONF(25) + CUSTOM_ITEM_CONF(25); + #endif + END_MENU(); + } + +#endif // CUSTOM_MENU_CONFIG + void menu_configuration() { const bool busy = printer_busy(); @@ -351,6 +471,16 @@ void menu_configuration() { SUBMENU(MSG_DEBUG_MENU, menu_debug); #endif + #if ENABLED(CUSTOM_MENU_CONFIG) + if (TERN1(CUSTOM_MENU_CONFIG_ONLY_IDLE, !busy)) { + #ifdef CUSTOM_MENU_CONFIG_TITLE + SUBMENU_P(PSTR(CUSTOM_MENU_CONFIG_TITLE), custom_menus_configuration); + #else + SUBMENU(MSG_CUSTOM_COMMANDS, custom_menus_configuration); + #endif + } + #endif + SUBMENU(MSG_ADVANCED_SETTINGS, menu_advanced_settings); #if ENABLED(BABYSTEP_ZPROBE_OFFSET) @@ -398,8 +528,11 @@ void menu_configuration() { #endif #endif + #if HAS_LCD_BRIGHTNESS + EDIT_ITEM_FAST(uint8, MSG_BRIGHTNESS, &ui.brightness, LCD_BRIGHTNESS_MIN, LCD_BRIGHTNESS_MAX, ui.refresh_brightness, true); + #endif #if HAS_LCD_CONTRAST - EDIT_ITEM(int3, MSG_CONTRAST, &ui.contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, ui.refresh_contrast, true); + EDIT_ITEM_FAST(uint8, MSG_CONTRAST, &ui.contrast, LCD_CONTRAST_MIN, LCD_CONTRAST_MAX, ui.refresh_contrast, true); #endif #if ENABLED(FWRETRACT) SUBMENU(MSG_RETRACT, menu_config_retract); diff --git a/Marlin/src/lcd/menu/menu_custom.cpp b/Marlin/src/lcd/menu/menu_custom.cpp deleted file mode 100644 index 7c54ec6e2616..000000000000 --- a/Marlin/src/lcd/menu/menu_custom.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/** - * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] - * - * Based on Sprinter and grbl. - * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -// -// Custom User Menu -// - -#include "../../inc/MarlinConfigPre.h" - -#if BOTH(HAS_LCD_MENU, CUSTOM_USER_MENUS) - -#include "menu_item.h" -#include "../../gcode/queue.h" - -#ifdef USER_SCRIPT_DONE - #define _DONE_SCRIPT "\n" USER_SCRIPT_DONE -#else - #define _DONE_SCRIPT "" -#endif - -void _lcd_user_gcode(PGM_P const cmd) { - queue.inject_P(cmd); - TERN_(USER_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback()); - TERN_(USER_SCRIPT_RETURN, ui.return_to_status()); -} - -void menu_user() { - START_MENU(); - BACK_ITEM(MSG_MAIN); - #define HAS_USER_ITEM(N) (defined(USER_DESC_##N) && defined(USER_GCODE_##N)) - #define USER_ITEM(N) ACTION_ITEM_P(PSTR(USER_DESC_##N), []{ _lcd_user_gcode(PSTR(USER_GCODE_##N _DONE_SCRIPT)); }); - #if HAS_USER_ITEM(1) - USER_ITEM(1); - #endif - #if HAS_USER_ITEM(2) - USER_ITEM(2); - #endif - #if HAS_USER_ITEM(3) - USER_ITEM(3); - #endif - #if HAS_USER_ITEM(4) - USER_ITEM(4); - #endif - #if HAS_USER_ITEM(5) - USER_ITEM(5); - #endif - #if HAS_USER_ITEM(6) - USER_ITEM(6); - #endif - #if HAS_USER_ITEM(7) - USER_ITEM(7); - #endif - #if HAS_USER_ITEM(8) - USER_ITEM(8); - #endif - #if HAS_USER_ITEM(9) - USER_ITEM(9); - #endif - #if HAS_USER_ITEM(10) - USER_ITEM(10); - #endif - #if HAS_USER_ITEM(11) - USER_ITEM(11); - #endif - #if HAS_USER_ITEM(12) - USER_ITEM(12); - #endif - #if HAS_USER_ITEM(13) - USER_ITEM(13); - #endif - #if HAS_USER_ITEM(14) - USER_ITEM(14); - #endif - #if HAS_USER_ITEM(15) - USER_ITEM(15); - #endif - #if HAS_USER_ITEM(16) - USER_ITEM(16); - #endif - #if HAS_USER_ITEM(17) - USER_ITEM(17); - #endif - #if HAS_USER_ITEM(18) - USER_ITEM(18); - #endif - #if HAS_USER_ITEM(19) - USER_ITEM(19); - #endif - #if HAS_USER_ITEM(20) - USER_ITEM(20); - #endif - #if HAS_USER_ITEM(21) - USER_ITEM(21); - #endif - #if HAS_USER_ITEM(22) - USER_ITEM(22); - #endif - #if HAS_USER_ITEM(23) - USER_ITEM(23); - #endif - #if HAS_USER_ITEM(24) - USER_ITEM(24); - #endif - #if HAS_USER_ITEM(25) - USER_ITEM(25); - #endif - END_MENU(); -} - -#endif // HAS_LCD_MENU && CUSTOM_USER_MENUS diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index a86ae74fce0d..c9bcb895fc81 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -31,13 +31,14 @@ #include "menu_item.h" #include "../../module/delta.h" #include "../../module/motion.h" +#include "../../module/planner.h" #if HAS_LEVELING #include "../../feature/bedlevel/bedlevel.h" #endif #if ENABLED(EXTENSIBLE_UI) - #include "../../lcd/extui/ui_api.h" + #include "../extui/ui_api.h" #endif void _man_probe_pt(const xy_pos_t &xy) { @@ -46,16 +47,16 @@ void _man_probe_pt(const xy_pos_t &xy) { do_blocking_move_to_xy_z(xy, Z_CLEARANCE_BETWEEN_PROBES); ui.wait_for_move = false; ui.synchronize(); - ui.manual_move.menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / float(DEFAULT_XYZ_STEPS_PER_UNIT)); + ui.manual_move.menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / planner.settings.axis_steps_per_mm[0]); // Use first axis as for delta XYZ should always match ui.goto_screen(lcd_move_z); } } #if ENABLED(DELTA_AUTO_CALIBRATION) - #include "../../MarlinCore.h" // for wait_for_user_response() - #include "../../gcode/gcode.h" - + #if HAS_RESUME_CONTINUE + #include "../../MarlinCore.h" // for wait_for_user_response() + #endif #if ENABLED(HOST_PROMPT_SUPPORT) #include "../../feature/host_actions.h" // for host_prompt_do #endif @@ -65,7 +66,7 @@ void _man_probe_pt(const xy_pos_t &xy) { ui.defer_status_screen(); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Delta Calibration in progress"), CONTINUE_STR)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Delta Calibration in progress"))); - wait_for_user_response(); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.goto_previous_screen_no_defer(); return current_position.z; } @@ -86,9 +87,10 @@ void _man_probe_pt(const xy_pos_t &xy) { ui.goto_screen(_lcd_calibrate_homing); } - void _goto_tower_a(const float &a) { + void _goto_tower_a(const_float_t a) { + constexpr float dcr = DELTA_PRINTABLE_RADIUS; xy_pos_t tower_vec = { cos(RADIANS(a)), sin(RADIANS(a)) }; - _man_probe_pt(tower_vec * delta_calibration_radius()); + _man_probe_pt(tower_vec * dcr); } void _goto_tower_x() { _goto_tower_a(210); } void _goto_tower_y() { _goto_tower_a(330); } @@ -105,7 +107,7 @@ void lcd_delta_settings() { START_MENU(); BACK_ITEM(MSG_DELTA_CALIBRATE); EDIT_ITEM(float52sign, MSG_DELTA_HEIGHT, &delta_height, delta_height - 10, delta_height + 10, _recalc_delta_settings); - #define EDIT_ENDSTOP_ADJ(LABEL,N) EDIT_ITEM_P(float43, PSTR(LABEL), &delta_endstop_adj.N, -5, 5, _recalc_delta_settings) + #define EDIT_ENDSTOP_ADJ(LABEL,N) EDIT_ITEM_P(float43, PSTR(LABEL), &delta_endstop_adj.N, -5, 0, _recalc_delta_settings) EDIT_ENDSTOP_ADJ("Ex", a); EDIT_ENDSTOP_ADJ("Ey", b); EDIT_ENDSTOP_ADJ("Ez", c); @@ -119,7 +121,9 @@ void lcd_delta_settings() { } void menu_delta_calibrate() { - TERN_(DELTA_CALIBRATION_MENU, const bool all_homed = all_axes_homed()); // Acquire ahead of loop + #if ENABLED(DELTA_CALIBRATION_MENU) + const bool all_homed = all_axes_homed(); // Acquire ahead of loop + #endif START_MENU(); BACK_ITEM(MSG_MAIN); diff --git a/Marlin/src/lcd/menu/menu_filament.cpp b/Marlin/src/lcd/menu/menu_filament.cpp index 19601d678e05..53fd67dbb258 100644 --- a/Marlin/src/lcd/menu/menu_filament.cpp +++ b/Marlin/src/lcd/menu/menu_filament.cpp @@ -67,7 +67,7 @@ static void _change_filament_with_preset() { } static void _change_filament_with_custom() { - _change_filament_with_temp(thermalManager.temp_hotend[MenuItemBase::itemIndex].target); + _change_filament_with_temp(thermalManager.degTargetHotend(MenuItemBase::itemIndex)); } // @@ -95,7 +95,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) { ACTION_ITEM_N_S(m, ui.get_preheat_label(m), MSG_PREHEAT_M, _change_filament_with_preset); #endif EDIT_ITEM_FAST_N(int3, extruder, MSG_PREHEAT_CUSTOM, &thermalManager.temp_hotend[extruder].target, - EXTRUDE_MINTEMP, thermalManager.heater_maxtemp[extruder] - HOTEND_OVERSHOOT, + EXTRUDE_MINTEMP, thermalManager.hotend_max_target(extruder), _change_filament_with_custom ); END_MENU(); @@ -106,10 +106,11 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) { * "Change Filament" submenu */ #if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) - bool printingIsPaused(); +#endif - void menu_change_filament() { +void menu_change_filament() { + #if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES) // Say "filament change" when no print is active editable.int8 = printingIsPaused() ? PAUSE_MODE_PAUSE_PRINT : PAUSE_MODE_CHANGE_FILAMENT; @@ -204,8 +205,16 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) { #endif END_MENU(); - } -#endif + + #else + + if (thermalManager.targetHotEnoughToExtrude(active_extruder)) + queue.inject_P(PSTR("M600B0")); + else + ui.goto_screen([]{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0); }); + + #endif +} static uint8_t hotend_status_extruder = 0; diff --git a/Marlin/src/lcd/menu/menu_info.cpp b/Marlin/src/lcd/menu/menu_info.cpp index a4cbc31d8b6b..388aebb74469 100644 --- a/Marlin/src/lcd/menu/menu_info.cpp +++ b/Marlin/src/lcd/menu/menu_info.cpp @@ -100,12 +100,13 @@ void menu_info_thermistors() { START_SCREEN(); - #if EXTRUDERS + #if HAS_EXTRUDERS #define THERMISTOR_ID TEMP_SENSOR_0 #include "../thermistornames.h" STATIC_ITEM_P(PSTR(LCD_STR_E0 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_0_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_0_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_1 != 0 @@ -115,6 +116,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E1 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_1_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_1_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_2 != 0 @@ -124,6 +126,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E2 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_2_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_2_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_3 != 0 @@ -133,6 +136,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E3 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_3_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_3_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_4 != 0 @@ -142,6 +146,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E4 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_4_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_4_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_5 != 0 @@ -151,6 +156,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E5 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_5_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_5_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_6 != 0 @@ -160,6 +166,7 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E6 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_6_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_6_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif #if TEMP_SENSOR_7 != 0 @@ -169,9 +176,6 @@ void menu_info_thermistors() { STATIC_ITEM_P(PSTR(LCD_STR_E7 ": " THERMISTOR_NAME), SS_INVERT); PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(HEATER_7_MINTEMP), SS_LEFT); PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(HEATER_7_MAXTEMP), SS_LEFT); - #endif - - #if EXTRUDERS STATIC_ITEM(TERN(WATCH_HOTENDS, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif @@ -195,6 +199,16 @@ void menu_info_thermistors() { STATIC_ITEM(TERN(WATCH_CHAMBER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); #endif + #if HAS_COOLER + #undef THERMISTOR_ID + #define THERMISTOR_ID TEMP_SENSOR_COOLER + #include "../thermistornames.h" + STATIC_ITEM_P(PSTR("COOL: " THERMISTOR_NAME), SS_INVERT); + PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(COOLER_MINTEMP), SS_LEFT); + PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(COOLER_MAXTEMP), SS_LEFT); + STATIC_ITEM(TERN(WATCH_COOLER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT); + #endif + END_SCREEN(); } @@ -240,7 +254,7 @@ void menu_info_board() { STATIC_ITEM(MSG_MARLIN, SS_DEFAULT|SS_INVERT); // Marlin STATIC_ITEM_P(PSTR(SHORT_BUILD_VERSION)); // x.x.x-Branch STATIC_ITEM_P(PSTR(STRING_DISTRIBUTION_DATE)); // YYYY-MM-DD HH:MM - STATIC_ITEM_P(PSTR(MACHINE_NAME)); // My3DPrinter + STATIC_ITEM_P(PSTR(MACHINE_NAME), SS_DEFAULT|SS_INVERT); // My3DPrinter STATIC_ITEM_P(PSTR(WEBSITE_URL)); // www.my3dprinter.com PSTRING_ITEM(MSG_INFO_EXTRUDERS, STRINGIFY(EXTRUDERS), SS_CENTER); // Extruders: 2 #if HAS_LEVELING @@ -268,7 +282,7 @@ void menu_info() { #else SUBMENU(MSG_INFO_PRINTER_MENU, menu_info_printer); // Printer Info > SUBMENU(MSG_INFO_BOARD_MENU, menu_info_board); // Board Info > - #if EXTRUDERS + #if HAS_EXTRUDERS SUBMENU(MSG_INFO_THERMISTOR_MENU, menu_info_thermistors); // Thermistors > #endif #endif diff --git a/Marlin/src/lcd/menu/menu_item.h b/Marlin/src/lcd/menu/menu_item.h index 6873f209b480..0a4f4bb7d191 100644 --- a/Marlin/src/lcd/menu/menu_item.h +++ b/Marlin/src/lcd/menu/menu_item.h @@ -39,7 +39,7 @@ class MenuItem_submenu : public MenuItemBase { FORCE_INLINE static void draw(const bool sel, const uint8_t row, PGM_P const pstr, ...) { _draw(sel, row, pstr, '>', LCD_STR_ARROW_RIGHT[0]); } - static inline void action(PGM_P const, const screenFunc_t func) { ui.save_previous_screen(); ui.goto_screen(func); } + static inline void action(PGM_P const, const screenFunc_t func) { ui.push_current_screen(); ui.goto_screen(func); } }; // Any menu item that invokes an immediate action @@ -77,8 +77,8 @@ template class TMenuEditItem : MenuEditItemBase { private: typedef typename NAME::type_t type_t; - static inline float scale(const float value) { return NAME::scale(value); } - static inline float unscale(const float value) { return NAME::unscale(value); } + static inline float scale(const_float_t value) { return NAME::scale(value); } + static inline float unscale(const_float_t value) { return NAME::unscale(value); } static const char* to_string(const int32_t value) { return NAME::strfunc(unscale(value)); } static void load(void *ptr, const int32_t value) { *((type_t*)ptr) = unscale(value); } public: @@ -111,17 +111,17 @@ class TMenuEditItem : MenuEditItemBase { // These items call the Edit Item draw method passing the prepared string. #define __DOFIXfloat PROBE() #define _DOFIX(TYPE,V) TYPE(TERN(IS_PROBE(__DOFIX##TYPE),FIXFLOAT(V),(V))) -#define DEFINE_MENU_EDIT_ITEM_TYPE(NAME, TYPE, STRFUNC, SCALE, V...) \ +#define DEFINE_MENU_EDIT_ITEM_TYPE(NAME, TYPE, STRFUNC, SCALE, ETC...) \ struct MenuEditItemInfo_##NAME { \ typedef TYPE type_t; \ - static inline float scale(const float value) { return value * (SCALE) + (V+0); } \ - static inline float unscale(const float value) { return value / (SCALE) + (V+0); } \ - static inline const char* strfunc(const float value) { return STRFUNC(_DOFIX(TYPE,value)); } \ + static inline float scale(const_float_t value) { return value * (SCALE) ETC; } \ + static inline float unscale(const_float_t value) { return value / (SCALE) ETC; } \ + static inline const char* strfunc(const_float_t value) { return STRFUNC(_DOFIX(TYPE,value)); } \ }; \ typedef TMenuEditItem MenuItem_##NAME -// NAME TYPE STRFUNC SCALE +ROUND -DEFINE_MENU_EDIT_ITEM_TYPE(percent ,uint8_t ,ui8tostr4pctrj , 100.f/255.f, 0.5f); // 100% right-justified +// NAME TYPE STRFUNC SCALE ROUND +DEFINE_MENU_EDIT_ITEM_TYPE(percent ,uint8_t ,ui8tostr4pctrj , 100.f/255.f, +0.5f); // 100% right-justified DEFINE_MENU_EDIT_ITEM_TYPE(percent_3 ,uint8_t ,pcttostrpctrj , 1 ); // 100% right-justified DEFINE_MENU_EDIT_ITEM_TYPE(int3 ,int16_t ,i16tostr3rj , 1 ); // 123, -12 right-justified DEFINE_MENU_EDIT_ITEM_TYPE(int4 ,int16_t ,i16tostr4signrj , 1 ); // 1234, -123 right-justified @@ -406,7 +406,7 @@ class MenuItem_bool : public MenuEditItemBase { #define _CONFIRM_ITEM_INNER_P(PLABEL, V...) do { \ if (encoderLine == _thisItemNr && ui.use_click()) { \ - ui.save_previous_screen(); \ + ui.push_current_screen(); \ ui.goto_screen([]{MenuItem_confirm::select_screen(V);}); \ return; \ } \ @@ -434,23 +434,23 @@ class MenuItem_bool : public MenuEditItemBase { }while(0) // Indexed items set a global index value -#define _CONFIRM_ITEM_N_P(N, V...) _CONFIRM_ITEM_N_S_P(N, nullptr, V) +#define _CONFIRM_ITEM_N_P(N, V...) _CONFIRM_ITEM_N_S_P(N, nullptr, V) -#define CONFIRM_ITEM_P(PLABEL,A,B,V...) _CONFIRM_ITEM_P(PLABEL, GET_TEXT(A), GET_TEXT(B), ##V) -#define CONFIRM_ITEM(LABEL, V...) CONFIRM_ITEM_P(GET_TEXT(LABEL), ##V) +#define CONFIRM_ITEM_P(PLABEL,A,B,V...) _CONFIRM_ITEM_P(PLABEL, GET_TEXT(A), GET_TEXT(B), ##V) +#define CONFIRM_ITEM(LABEL, V...) CONFIRM_ITEM_P(GET_TEXT(LABEL), ##V) -#define YESNO_ITEM_P(PLABEL, V...) _CONFIRM_ITEM_P(PLABEL, ##V) -#define YESNO_ITEM(LABEL, V...) YESNO_ITEM_P(GET_TEXT(LABEL), ##V) +#define YESNO_ITEM_P(PLABEL, V...) CONFIRM_ITEM_P(PLABEL, MSG_YES, MSG_NO, ##V) +#define YESNO_ITEM(LABEL, V...) YESNO_ITEM_P(GET_TEXT(LABEL), ##V) #define CONFIRM_ITEM_N_S_P(N,S,PLABEL,A,B,V...) _CONFIRM_ITEM_N_S_P(N, S, PLABEL, GET_TEXT(A), GET_TEXT(B), ##V) #define CONFIRM_ITEM_N_S(N,S,LABEL,V...) CONFIRM_ITEM_N_S_P(N, S, GET_TEXT(LABEL), ##V) #define CONFIRM_ITEM_N_P(N,PLABEL,A,B,V...) _CONFIRM_ITEM_N_P(N, PLABEL, GET_TEXT(A), GET_TEXT(B), ##V) #define CONFIRM_ITEM_N(N,LABEL, V...) CONFIRM_ITEM_N_P(N, GET_TEXT(LABEL), ##V) -#define YESNO_ITEM_N_S_P(N,S,PLABEL, V...) _CONFIRM_ITEM_N_S_P(N, S, PLABEL, ##V) -#define YESNO_ITEM_N_S(N,S,LABEL, V...) YESNO_ITEM_N_S_P(N, S, GET_TEXT(LABEL), ##V) -#define YESNO_ITEM_N_P(N,PLABEL, V...) _CONFIRM_ITEM_N_P(N, PLABEL, ##V) -#define YESNO_ITEM_N(N,LABEL, V...) YESNO_ITEM_N_P(N, GET_TEXT(LABEL), ##V) +#define YESNO_ITEM_N_S_P(N,S,PLABEL, V...) _CONFIRM_ITEM_N_S_P(N, S, PLABEL, MSG_YES, MSG_NO, ##V) +#define YESNO_ITEM_N_S(N,S,LABEL, V...) YESNO_ITEM_N_S_P(N, S, GET_TEXT(LABEL), ##V) +#define YESNO_ITEM_N_P(N,PLABEL, V...) CONFIRM_ITEM_N_P(N, PLABEL, MSG_YES, MSG_NO, ##V) +#define YESNO_ITEM_N(N,LABEL, V...) YESNO_ITEM_N_P(N, GET_TEXT(LABEL), ##V) #if ENABLED(LEVEL_BED_CORNERS) void _lcd_level_bed_corners(); @@ -473,7 +473,7 @@ class MenuItem_bool : public MenuEditItemBase { #define _FAN_EDIT_ITEMS(F,L) do{ \ editable.uint8 = thermalManager.fan_speed[F]; \ EDIT_ITEM_FAST_N(percent, F, MSG_##L, &editable.uint8, 0, 255, on_fan_update); \ - EDIT_EXTRA_FAN_SPEED(percent, F, MSG_EXTRA_##L, &thermalManager.new_fan_speed[F], 3, 255); \ + EDIT_EXTRA_FAN_SPEED(percent, F, MSG_EXTRA_##L, &thermalManager.extra_fan_speed[F].speed, 3, 255); \ }while(0) #if FAN_COUNT > 1 diff --git a/Marlin/src/lcd/menu/menu_led.cpp b/Marlin/src/lcd/menu/menu_led.cpp index 552c03a69f6e..3261ecc65874 100644 --- a/Marlin/src/lcd/menu/menu_led.cpp +++ b/Marlin/src/lcd/menu/menu_led.cpp @@ -30,6 +30,10 @@ #include "menu_item.h" +#if ENABLED(PSU_CONTROL) + #include "../../feature/power.h" +#endif + #if ENABLED(LED_CONTROL_MENU) #include "../../feature/leds/leds.h" @@ -84,18 +88,20 @@ EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds.color.r, 0, 255, leds.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_G, &leds.color.g, 0, 255, leds.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_B, &leds.color.b, 0, 255, leds.update, true); - #if EITHER(RGBW_LED, NEOPIXEL_LED) + #if HAS_WHITE_LED EDIT_ITEM(uint8, MSG_INTENSITY_W, &leds.color.w, 0, 255, leds.update, true); - #if ENABLED(NEOPIXEL_LED) - EDIT_ITEM(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true); - #endif + #endif + #if ENABLED(NEOPIXEL_LED) + EDIT_ITEM(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true); #endif #if ENABLED(NEOPIXEL2_SEPARATE) STATIC_ITEM_N(MSG_LED_CHANNEL_N, 2, SS_DEFAULT|SS_INVERT); EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds2.color.r, 0, 255, leds2.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_G, &leds2.color.g, 0, 255, leds2.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_B, &leds2.color.b, 0, 255, leds2.update, true); - EDIT_ITEM(uint8, MSG_INTENSITY_W, &leds2.color.w, 0, 255, leds2.update, true); + #if HAS_WHITE_LED2 + EDIT_ITEM(uint8, MSG_INTENSITY_W, &leds2.color.w, 0, 255, leds2.update, true); + #endif EDIT_ITEM(uint8, MSG_NEO2_BRIGHTNESS, &leds2.color.i, 0, 255, leds2.update, true); #endif END_MENU(); @@ -105,12 +111,14 @@ #if ENABLED(CASE_LIGHT_MENU) #include "../../feature/caselight.h" + #define CASELIGHT_TOGGLE_ITEM() EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&caselight.on, caselight.update_enabled) + #if CASELIGHT_USES_BRIGHTNESS void menu_case_light() { START_MENU(); BACK_ITEM(MSG_CONFIGURATION); EDIT_ITEM(percent, MSG_CASE_LIGHT_BRIGHTNESS, &caselight.brightness, 0, 255, caselight.update_brightness, true); - EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&caselight.on, caselight.update_enabled); + CASELIGHT_TOGGLE_ITEM(); END_MENU(); } #endif @@ -121,11 +129,15 @@ void menu_led() { BACK_ITEM(MSG_MAIN); #if ENABLED(LED_CONTROL_MENU) - editable.state = leds.lights_on; - EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle); + if (TERN1(PSU_CONTROL, powerManager.psu_on)) { + editable.state = leds.lights_on; + EDIT_ITEM(bool, MSG_LEDS, &editable.state, leds.toggle); + } + #if ENABLED(LED_COLOR_PRESETS) ACTION_ITEM(MSG_SET_LEDS_DEFAULT, leds.set_default); #endif + #if ENABLED(NEOPIXEL2_SEPARATE) editable.state = leds2.lights_on; EDIT_ITEM(bool, MSG_LEDS2, &editable.state, leds2.toggle); @@ -146,13 +158,14 @@ void menu_led() { // Set Case light on/off/brightness // #if ENABLED(CASE_LIGHT_MENU) - #if DISABLED(CASE_LIGHT_NO_BRIGHTNESS) - if (TERN1(CASE_LIGHT_USE_NEOPIXEL, PWM_PIN(CASE_LIGHT_PIN))) + #if CASELIGHT_USES_BRIGHTNESS + if (caselight.has_brightness()) SUBMENU(MSG_CASE_LIGHT, menu_case_light); else #endif - EDIT_ITEM(bool, MSG_CASE_LIGHT, (bool*)&caselight.on, caselight.update_enabled); + CASELIGHT_TOGGLE_ITEM(); #endif + END_MENU(); } diff --git a/Marlin/src/lcd/menu/menu_main.cpp b/Marlin/src/lcd/menu/menu_main.cpp index 878ac83a5a32..1bf6645e2e0a 100644 --- a/Marlin/src/lcd/menu/menu_main.cpp +++ b/Marlin/src/lcd/menu/menu_main.cpp @@ -35,6 +35,10 @@ #include "../../module/stepper.h" #include "../../sd/cardreader.h" +#if ENABLED(PSU_CONTROL) + #include "../../feature/power.h" +#endif + #if HAS_GAMES && DISABLED(LCD_INFO_MENU) #include "game/game.h" #endif @@ -47,7 +51,7 @@ #endif #if ENABLED(MMU2_MENUS) - #include "../../lcd/menu/menu_mmu2.h" + #include "menu_mmu2.h" #endif #if ENABLED(PASSWORD_FEATURE) @@ -68,10 +72,6 @@ void menu_motion(); void menu_temperature(); void menu_configuration(); -#if ENABLED(CUSTOM_USER_MENUS) - void menu_user(); -#endif - #if HAS_POWER_MONITOR void menu_power_monitor(); #endif @@ -81,7 +81,6 @@ void menu_configuration(); #endif #if ENABLED(ADVANCED_PAUSE_FEATURE) - void _menu_temp_filament_op(const PauseMode, const int8_t); void menu_change_filament(); #endif @@ -97,10 +96,133 @@ void menu_configuration(); void menu_spindle_laser(); #endif +#if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM) + void menu_preheat_only(); +#endif + #if HAS_MULTI_LANGUAGE void menu_language(); #endif +#if ENABLED(CUSTOM_MENU_MAIN) + + void _lcd_custom_menu_main_gcode(PGM_P const cmd) { + queue.inject_P(cmd); + TERN_(CUSTOM_MENU_MAIN_SCRIPT_AUDIBLE_FEEDBACK, ui.completion_feedback()); + TERN_(CUSTOM_MENU_MAIN_SCRIPT_RETURN, ui.return_to_status()); + } + + void custom_menus_main() { + START_MENU(); + BACK_ITEM(MSG_MAIN); + + #define HAS_CUSTOM_ITEM_MAIN(N) (defined(MAIN_MENU_ITEM_##N##_DESC) && defined(MAIN_MENU_ITEM_##N##_GCODE)) + + #ifdef CUSTOM_MENU_MAIN_SCRIPT_DONE + #define _DONE_SCRIPT "\n" CUSTOM_MENU_MAIN_SCRIPT_DONE + #else + #define _DONE_SCRIPT "" + #endif + #define GCODE_LAMBDA_MAIN(N) []{ _lcd_custom_menu_main_gcode(PSTR(MAIN_MENU_ITEM_##N##_GCODE _DONE_SCRIPT)); } + #define _CUSTOM_ITEM_MAIN(N) ACTION_ITEM_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), GCODE_LAMBDA_MAIN(N)); + #define _CUSTOM_ITEM_MAIN_CONFIRM(N) \ + SUBMENU_P(PSTR(MAIN_MENU_ITEM_##N##_DESC), []{ \ + MenuItem_confirm::confirm_screen( \ + GCODE_LAMBDA_MAIN(N), \ + ui.goto_previous_screen, \ + PSTR(MAIN_MENU_ITEM_##N##_DESC "?") \ + ); \ + }) + + #define CUSTOM_ITEM_MAIN(N) do{ \ + constexpr char c = MAIN_MENU_ITEM_##N##_GCODE[strlen(MAIN_MENU_ITEM_##N##_GCODE) - 1]; \ + static_assert(c != '\n' && c != '\r', "MAIN_MENU_ITEM_" STRINGIFY(N) "_GCODE cannot have a newline at the end. Please remove it."); \ + if (ENABLED(MAIN_MENU_ITEM_##N##_CONFIRM)) \ + _CUSTOM_ITEM_MAIN_CONFIRM(N); \ + else \ + _CUSTOM_ITEM_MAIN(N); \ + }while(0) + + #if HAS_CUSTOM_ITEM_MAIN(1) + CUSTOM_ITEM_MAIN(1); + #endif + #if HAS_CUSTOM_ITEM_MAIN(2) + CUSTOM_ITEM_MAIN(2); + #endif + #if HAS_CUSTOM_ITEM_MAIN(3) + CUSTOM_ITEM_MAIN(3); + #endif + #if HAS_CUSTOM_ITEM_MAIN(4) + CUSTOM_ITEM_MAIN(4); + #endif + #if HAS_CUSTOM_ITEM_MAIN(5) + CUSTOM_ITEM_MAIN(5); + #endif + #if HAS_CUSTOM_ITEM_MAIN(6) + CUSTOM_ITEM_MAIN(6); + #endif + #if HAS_CUSTOM_ITEM_MAIN(7) + CUSTOM_ITEM_MAIN(7); + #endif + #if HAS_CUSTOM_ITEM_MAIN(8) + CUSTOM_ITEM_MAIN(8); + #endif + #if HAS_CUSTOM_ITEM_MAIN(9) + CUSTOM_ITEM_MAIN(9); + #endif + #if HAS_CUSTOM_ITEM_MAIN(10) + CUSTOM_ITEM_MAIN(10); + #endif + #if HAS_CUSTOM_ITEM_MAIN(11) + CUSTOM_ITEM_MAIN(11); + #endif + #if HAS_CUSTOM_ITEM_MAIN(12) + CUSTOM_ITEM_MAIN(12); + #endif + #if HAS_CUSTOM_ITEM_MAIN(13) + CUSTOM_ITEM_MAIN(13); + #endif + #if HAS_CUSTOM_ITEM_MAIN(14) + CUSTOM_ITEM_MAIN(14); + #endif + #if HAS_CUSTOM_ITEM_MAIN(15) + CUSTOM_ITEM_MAIN(15); + #endif + #if HAS_CUSTOM_ITEM_MAIN(16) + CUSTOM_ITEM_MAIN(16); + #endif + #if HAS_CUSTOM_ITEM_MAIN(17) + CUSTOM_ITEM_MAIN(17); + #endif + #if HAS_CUSTOM_ITEM_MAIN(18) + CUSTOM_ITEM_MAIN(18); + #endif + #if HAS_CUSTOM_ITEM_MAIN(19) + CUSTOM_ITEM_MAIN(19); + #endif + #if HAS_CUSTOM_ITEM_MAIN(20) + CUSTOM_ITEM_MAIN(20); + #endif + #if HAS_CUSTOM_ITEM_MAIN(21) + CUSTOM_ITEM_MAIN(21); + #endif + #if HAS_CUSTOM_ITEM_MAIN(22) + CUSTOM_ITEM_MAIN(22); + #endif + #if HAS_CUSTOM_ITEM_MAIN(23) + CUSTOM_ITEM_MAIN(23); + #endif + #if HAS_CUSTOM_ITEM_MAIN(24) + CUSTOM_ITEM_MAIN(24); + #endif + #if HAS_CUSTOM_ITEM_MAIN(25) + CUSTOM_ITEM_MAIN(25); + #endif + END_MENU(); + } + +#endif // CUSTOM_MENU_MAIN + void menu_main() { const bool busy = printingIsActive() #if ENABLED(SDSUPPORT) @@ -112,6 +234,38 @@ void menu_main() { START_MENU(); BACK_ITEM(MSG_INFO_SCREEN); + #if ENABLED(SDSUPPORT) + + #if !defined(MEDIA_MENU_AT_TOP) && !HAS_ENCODER_WHEEL + #define MEDIA_MENU_AT_TOP + #endif + + auto sdcard_menu_items = [&]{ + #if ENABLED(MENU_ADDAUTOSTART) + ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); // Run Auto Files + #endif + + if (card_detected) { + if (!card_open) { + #if PIN_EXISTS(SD_DETECT) + GCODES_ITEM(MSG_CHANGE_MEDIA, PSTR("M21")); // M21 Change Media + #else // - or - + GCODES_ITEM(MSG_RELEASE_MEDIA, PSTR("M22")); // M22 Release Media + #endif + SUBMENU(MSG_MEDIA_MENU, MEDIA_MENU_GATEWAY); // Media Menu (or Password First) + } + } + else { + #if PIN_EXISTS(SD_DETECT) + ACTION_ITEM(MSG_NO_MEDIA, nullptr); // "No Media" + #else + GCODES_ITEM(MSG_ATTACH_MEDIA, PSTR("M21")); // M21 Attach Media + #endif + } + }; + + #endif + if (busy) { #if MACHINE_CAN_PAUSE ACTION_ITEM(MSG_PAUSE_PRINT, ui.pause_print); @@ -139,36 +293,9 @@ void menu_main() { } else { - #if !HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT) - - // *** IF THIS SECTION IS CHANGED, REPRODUCE BELOW *** - - // - // Run Auto Files - // - #if ENABLED(MENU_ADDAUTOSTART) - ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); - #endif - - if (card_detected) { - if (!card_open) { - SUBMENU(MSG_MEDIA_MENU, MEDIA_MENU_GATEWAY); - #if PIN_EXISTS(SD_DETECT) - GCODES_ITEM(MSG_CHANGE_MEDIA, PSTR("M21")); - #else - GCODES_ITEM(MSG_RELEASE_MEDIA, PSTR("M22")); - #endif - } - } - else { - #if PIN_EXISTS(SD_DETECT) - ACTION_ITEM(MSG_NO_MEDIA, nullptr); - #else - GCODES_ITEM(MSG_ATTACH_MEDIA, PSTR("M21")); - #endif - } - - #endif // !HAS_ENCODER_WHEEL && SDSUPPORT + #if BOTH(SDSUPPORT, MEDIA_MENU_AT_TOP) + sdcard_menu_items(); + #endif if (TERN0(MACHINE_CAN_PAUSE, printingIsPaused())) ACTION_ITEM(MSG_RESUME_PRINT, ui.resume_print); @@ -177,6 +304,10 @@ void menu_main() { ACTION_ITEM(MSG_HOST_START_PRINT, host_action_start); #endif + #if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM) + SUBMENU(MSG_PREHEAT_CUSTOM, menu_preheat_only); + #endif + SUBMENU(MSG_MOTION, menu_motion); } @@ -202,20 +333,22 @@ void menu_main() { SUBMENU(MSG_CONFIGURATION, menu_configuration); - #if ENABLED(CUSTOM_USER_MENUS) - #ifdef CUSTOM_USER_MENU_TITLE - SUBMENU_P(PSTR(CUSTOM_USER_MENU_TITLE), menu_user); - #else - SUBMENU(MSG_USER_MENU, menu_user); - #endif + #if ENABLED(CUSTOM_MENU_MAIN) + if (TERN1(CUSTOM_MENU_MAIN_ONLY_IDLE, !busy)) { + #ifdef CUSTOM_MENU_MAIN_TITLE + SUBMENU_P(PSTR(CUSTOM_MENU_MAIN_TITLE), custom_menus_main); + #else + SUBMENU(MSG_CUSTOM_COMMANDS, custom_menus_main); + #endif + } #endif #if ENABLED(ADVANCED_PAUSE_FEATURE) #if E_STEPPERS == 1 && DISABLED(FILAMENT_LOAD_UNLOAD_GCODES) - if (thermalManager.targetHotEnoughToExtrude(active_extruder)) - GCODES_ITEM(MSG_FILAMENTCHANGE, PSTR("M600 B0")); - else - SUBMENU(MSG_FILAMENTCHANGE, []{ _menu_temp_filament_op(PAUSE_MODE_CHANGE_FILAMENT, 0); }); + YESNO_ITEM(MSG_FILAMENTCHANGE, + menu_change_filament, ui.goto_previous_screen, + GET_TEXT(MSG_FILAMENTCHANGE), (const char *)nullptr, PSTR("?") + ); #else SUBMENU(MSG_FILAMENTCHANGE, menu_change_filament); #endif @@ -233,45 +366,23 @@ void menu_main() { // Switch power on/off // #if ENABLED(PSU_CONTROL) - if (powersupply_on) - GCODES_ITEM(MSG_SWITCH_PS_OFF, PSTR("M81")); + if (powerManager.psu_on) + #if ENABLED(PS_OFF_CONFIRM) + CONFIRM_ITEM(MSG_SWITCH_PS_OFF, + MSG_YES, MSG_NO, + ui.poweroff, ui.goto_previous_screen, + GET_TEXT(MSG_SWITCH_PS_OFF), (const char *)nullptr, PSTR("?") + ); + #else + GCODES_ITEM(MSG_SWITCH_PS_OFF, PSTR("M81")); + #endif else GCODES_ITEM(MSG_SWITCH_PS_ON, PSTR("M80")); #endif - #if BOTH(HAS_ENCODER_WHEEL, SDSUPPORT) - - if (!busy) { - - // *** IF THIS SECTION IS CHANGED, REPRODUCE ABOVE *** - - // - // Autostart - // - #if ENABLED(MENU_ADDAUTOSTART) - ACTION_ITEM(MSG_RUN_AUTO_FILES, card.autofile_begin); - #endif - - if (card_detected) { - if (!card_open) { - #if PIN_EXISTS(SD_DETECT) - GCODES_ITEM(MSG_CHANGE_MEDIA, PSTR("M21")); - #else - GCODES_ITEM(MSG_RELEASE_MEDIA, PSTR("M22")); - #endif - SUBMENU(MSG_MEDIA_MENU, MEDIA_MENU_GATEWAY); - } - } - else { - #if PIN_EXISTS(SD_DETECT) - ACTION_ITEM(MSG_NO_MEDIA, nullptr); - #else - GCODES_ITEM(MSG_ATTACH_MEDIA, PSTR("M21")); - #endif - } - } - - #endif // HAS_ENCODER_WHEEL && SDSUPPORT + #if ENABLED(SDSUPPORT) && DISABLED(MEDIA_MENU_AT_TOP) + sdcard_menu_items(); + #endif #if HAS_SERVICE_INTERVALS static auto _service_reset = [](const int index) { diff --git a/Marlin/src/lcd/menu/menu_media.cpp b/Marlin/src/lcd/menu/menu_media.cpp index 7a525d06b5a0..213ad257b849 100644 --- a/Marlin/src/lcd/menu/menu_media.cpp +++ b/Marlin/src/lcd/menu/menu_media.cpp @@ -48,6 +48,7 @@ void lcd_sd_updir() { goto_screen(menu_media, sd_encoder_position, sd_top_line, sd_items); sd_encoder_position = 0xFFFF; defer_status_screen(); + TERN_(HAS_TOUCH_SLEEP, ui.wakeup_screen()); } #endif @@ -104,7 +105,7 @@ class MenuItem_sdfolder : public MenuItem_sdbase { } }; -void menu_media() { +void menu_media_filelist() { ui.encoder_direction_menus(); #if HAS_MARLINUI_U8GLIB @@ -115,14 +116,18 @@ void menu_media() { #endif START_MENU(); - BACK_ITEM_P(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT(MSG_MAIN) : GET_TEXT(MSG_BACK)); + #if ENABLED(MULTI_VOLUME) + ACTION_ITEM(MSG_BACK, []{ ui.goto_screen(menu_media); }); + #else + BACK_ITEM_P(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT(MSG_MAIN) : GET_TEXT(MSG_BACK)); + #endif if (card.flag.workDirIsRoot) { #if !PIN_EXISTS(SD_DETECT) ACTION_ITEM(MSG_REFRESH, []{ encoderTopLine = 0; card.mount(); }); #endif } else if (card.isMounted()) - ACTION_ITEM_P(PSTR(LCD_STR_FOLDER ".."), lcd_sd_updir); + ACTION_ITEM_P(PSTR(LCD_STR_FOLDER " .."), lcd_sd_updir); if (ui.should_draw()) for (uint16_t i = 0; i < fileCnt; i++) { if (_menuLineNr == _thisItemNr) { @@ -138,4 +143,22 @@ void menu_media() { END_MENU(); } +#if ENABLED(MULTI_VOLUME) + void menu_media_select() { + START_MENU(); + BACK_ITEM_P(TERN1(BROWSE_MEDIA_ON_INSERT, screen_history_depth) ? GET_TEXT(MSG_MAIN) : GET_TEXT(MSG_BACK)); + #if ENABLED(VOLUME_SD_ONBOARD) + ACTION_ITEM(MSG_SD_CARD, []{ card.changeMedia(&card.media_driver_sdcard); card.mount(); ui.goto_screen(menu_media_filelist); }); + #endif + #if ENABLED(VOLUME_USB_FLASH_DRIVE) + ACTION_ITEM(MSG_USB_DISK, []{ card.changeMedia(&card.media_driver_usbFlash); card.mount(); ui.goto_screen(menu_media_filelist); }); + #endif + END_MENU(); + } +#endif + +void menu_media() { + TERN(MULTI_VOLUME, menu_media_select, menu_media_filelist)(); +} + #endif // HAS_LCD_MENU && SDSUPPORT diff --git a/Marlin/src/lcd/menu/menu_mmu2.cpp b/Marlin/src/lcd/menu/menu_mmu2.cpp index 7e71f00d2557..425a8ca75135 100644 --- a/Marlin/src/lcd/menu/menu_mmu2.cpp +++ b/Marlin/src/lcd/menu/menu_mmu2.cpp @@ -24,6 +24,7 @@ #if BOTH(HAS_LCD_MENU, MMU2_MENUS) +#include "../../MarlinCore.h" #include "../../feature/mmu/mmu2.h" #include "menu_mmu2.h" #include "menu_item.h" @@ -36,8 +37,7 @@ inline void action_mmu2_load_filament_to_nozzle(const uint8_t tool) { ui.reset_status(); ui.return_to_status(); ui.status_printf_P(0, GET_TEXT(MSG_MMU2_LOADING_FILAMENT), int(tool + 1)); - if (mmu2.load_filament_to_nozzle(tool)) - ui.reset_status(); + if (mmu2.load_filament_to_nozzle(tool)) ui.reset_status(); ui.return_to_status(); } diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 71fc4246c77a..948c8807b2e2 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -28,6 +28,8 @@ #if HAS_LCD_MENU +#define LARGE_AREA_TEST ((X_BED_SIZE) >= 1000 || (Y_BED_SIZE) >= 1000 || (Z_MAX_POS) >= 1000) + #include "menu_item.h" #include "menu_addon.h" @@ -73,65 +75,58 @@ static void _lcd_move_xyz(PGM_P const name, const AxisEnum axis) { // Get the new position const float diff = float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale; - #if IS_KINEMATIC - ui.manual_move.offset += diff; - if (int32_t(ui.encoderPosition) < 0) - NOLESS(ui.manual_move.offset, min - current_position[axis]); - else - NOMORE(ui.manual_move.offset, max - current_position[axis]); - #else - current_position[axis] += diff; - if (int32_t(ui.encoderPosition) < 0) - NOLESS(current_position[axis], min); - else - NOMORE(current_position[axis], max); - #endif - + (void)ui.manual_move.apply_diff(axis, diff, min, max); ui.manual_move.soon(axis); ui.refresh(LCDVIEW_REDRAW_NOW); } ui.encoderPosition = 0; if (ui.should_draw()) { - const float pos = NATIVE_TO_LOGICAL( - ui.manual_move.processing ? destination[axis] : current_position[axis] + TERN0(IS_KINEMATIC, ui.manual_move.offset), - axis - ); + const float pos = ui.manual_move.axis_value(axis); if (parser.using_inch_units()) { const float imp_pos = LINEAR_UNIT(pos); MenuEditItemBase::draw_edit_screen(name, ftostr63(imp_pos)); } else - MenuEditItemBase::draw_edit_screen(name, ui.manual_move.menu_scale >= 0.1f ? ftostr41sign(pos) : ftostr63(pos)); + MenuEditItemBase::draw_edit_screen(name, ui.manual_move.menu_scale >= 0.1f ? (LARGE_AREA_TEST ? ftostr51sign(pos) : ftostr41sign(pos)) : ftostr63(pos)); } } void lcd_move_x() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_X), X_AXIS); } -void lcd_move_y() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Y), Y_AXIS); } -void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); } +#if HAS_Y_AXIS + void lcd_move_y() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Y), Y_AXIS); } +#endif +#if HAS_Z_AXIS + void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); } +#endif +#if LINEAR_AXES >= 4 + void lcd_move_i() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_I), I_AXIS); } +#endif +#if LINEAR_AXES >= 5 + void lcd_move_j() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_J), J_AXIS); } +#endif +#if LINEAR_AXES >= 6 + void lcd_move_k() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_K), K_AXIS); } +#endif #if E_MANUAL - static void lcd_move_e(TERN_(MULTI_MANUAL, const int8_t eindex=-1)) { + static void lcd_move_e(TERN_(MULTI_E_MANUAL, const int8_t eindex=active_extruder)) { if (ui.use_click()) return ui.goto_previous_screen_no_defer(); if (ui.encoderPosition) { if (!ui.manual_move.processing) { const float diff = float(int32_t(ui.encoderPosition)) * ui.manual_move.menu_scale; TERN(IS_KINEMATIC, ui.manual_move.offset, current_position.e) += diff; - ui.manual_move.soon(E_AXIS - #if MULTI_MANUAL - , eindex - #endif - ); + ui.manual_move.soon(E_AXIS OPTARG(MULTI_E_MANUAL, eindex)); ui.refresh(LCDVIEW_REDRAW_NOW); } ui.encoderPosition = 0; } if (ui.should_draw()) { - TERN_(MULTI_MANUAL, MenuItemBase::init(eindex)); + TERN_(MULTI_E_MANUAL, MenuItemBase::init(eindex)); MenuEditItemBase::draw_edit_screen( - GET_TEXT(TERN(MULTI_MANUAL, MSG_MOVE_EN, MSG_MOVE_E)), + GET_TEXT(TERN(MULTI_E_MANUAL, MSG_MOVE_EN, MSG_MOVE_E)), ftostr41sign(current_position.e - + TERN0(IS_KINEMATIC, ui.manual_move.offset) - - TERN0(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin) + PLUS_TERN0(IS_KINEMATIC, ui.manual_move.offset) + MINUS_TERN0(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin) ) ); } // should_draw @@ -149,13 +144,13 @@ void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); } screenFunc_t _manual_move_func_ptr; -void _goto_manual_move(const float scale) { +void _goto_manual_move(const_float_t scale) { ui.defer_status_screen(); ui.manual_move.menu_scale = scale; ui.goto_screen(_manual_move_func_ptr); } -void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int8_t eindex=-1) { +void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int8_t eindex=active_extruder) { _manual_move_func_ptr = func; START_MENU(); if (LCD_HEIGHT >= 4) { @@ -172,11 +167,13 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int BACK_ITEM(MSG_MOVE_AXIS); if (parser.using_inch_units()) { + if (LARGE_AREA_TEST) SUBMENU(MSG_MOVE_1IN, []{ _goto_manual_move(IN_TO_MM(1.000f)); }); SUBMENU(MSG_MOVE_01IN, []{ _goto_manual_move(IN_TO_MM(0.100f)); }); SUBMENU(MSG_MOVE_001IN, []{ _goto_manual_move(IN_TO_MM(0.010f)); }); SUBMENU(MSG_MOVE_0001IN, []{ _goto_manual_move(IN_TO_MM(0.001f)); }); } else { + if (LARGE_AREA_TEST) SUBMENU(MSG_MOVE_100MM, []{ _goto_manual_move(100); }); SUBMENU(MSG_MOVE_10MM, []{ _goto_manual_move(10); }); SUBMENU(MSG_MOVE_1MM, []{ _goto_manual_move( 1); }); SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move( 0.1f); }); @@ -187,7 +184,6 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int PGM_P const label = GET_TEXT(MSG_MOVE_N_MM); char tmp[strlen_P(label) + 10 + 1], numstr[10]; sprintf_P(tmp, label, dtostrf(FINE_MANUAL_MOVE, 1, digs, numstr)); - #if DISABLED(HAS_GRAPHICAL_TFT) SUBMENU_P(NUL_STR, []{ _goto_manual_move(float(FINE_MANUAL_MOVE)); }); MENU_ITEM_ADDON_START(0 + ENABLED(HAS_MARLINUI_HD44780)); @@ -204,7 +200,7 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int #if E_MANUAL inline void _goto_menu_move_distance_e() { - ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(TERN_(MULTI_MANUAL, active_extruder)); }, -1); }); + ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(); }); }); } inline void _menu_move_distance_e_maybe() { @@ -237,14 +233,27 @@ void menu_move() { if (NONE(IS_KINEMATIC, NO_MOTION_BEFORE_HOMING) || all_axes_homed()) { if (TERN1(DELTA, current_position.z <= delta_clip_start_height)) { SUBMENU(MSG_MOVE_X, []{ _menu_move_distance(X_AXIS, lcd_move_x); }); - SUBMENU(MSG_MOVE_Y, []{ _menu_move_distance(Y_AXIS, lcd_move_y); }); + #if HAS_Y_AXIS + SUBMENU(MSG_MOVE_Y, []{ _menu_move_distance(Y_AXIS, lcd_move_y); }); + #endif } #if ENABLED(DELTA) else ACTION_ITEM(MSG_FREE_XY, []{ line_to_z(delta_clip_start_height); ui.synchronize(); }); #endif - SUBMENU(MSG_MOVE_Z, []{ _menu_move_distance(Z_AXIS, lcd_move_z); }); + #if HAS_Z_AXIS + SUBMENU(MSG_MOVE_Z, []{ _menu_move_distance(Z_AXIS, lcd_move_z); }); + #endif + #if LINEAR_AXES >= 4 + SUBMENU(MSG_MOVE_I, []{ _menu_move_distance(I_AXIS, lcd_move_i); }); + #endif + #if LINEAR_AXES >= 5 + SUBMENU(MSG_MOVE_J, []{ _menu_move_distance(J_AXIS, lcd_move_j); }); + #endif + #if LINEAR_AXES >= 6 + SUBMENU(MSG_MOVE_K, []{ _menu_move_distance(K_AXIS, lcd_move_k); }); + #endif } else GCODES_ITEM(MSG_AUTO_HOME, G28_STR); @@ -299,7 +308,7 @@ void menu_move() { SUBMENU_MOVE_E(E_MANUAL - 1); #endif - #elif MULTI_MANUAL + #elif MULTI_E_MANUAL // Independent extruders with one E-stepper per hotend LOOP_L_N(n, E_MANUAL) SUBMENU_MOVE_E(n); @@ -311,6 +320,36 @@ void menu_move() { END_MENU(); } +#if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) + // + // "Motion" > "Homing" submenu + // + void menu_home() { + START_MENU(); + BACK_ITEM(MSG_MOTION); + + GCODES_ITEM(MSG_AUTO_HOME, G28_STR); + GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X")); + #if HAS_Y_AXIS + GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y")); + #endif + #if HAS_Z_AXIS + GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z")); + #endif + #if LINEAR_AXES >= 4 + GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" AXIS4_STR)); + #endif + #if LINEAR_AXES >= 5 + GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" AXIS5_STR)); + #endif + #if LINEAR_AXES >= 6 + GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" AXIS6_STR)); + #endif + + END_MENU(); + } +#endif + #if ENABLED(AUTO_BED_LEVELING_UBL) void _lcd_ubl_level_bed(); #elif ENABLED(LCD_BED_LEVELING) @@ -338,11 +377,28 @@ void menu_motion() { // // Auto Home // - GCODES_ITEM(MSG_AUTO_HOME, G28_STR); - #if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) - GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X")); - GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y")); - GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z")); + #if ENABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU) + SUBMENU(MSG_HOMING, menu_home); + #else + GCODES_ITEM(MSG_AUTO_HOME, G28_STR); + #if ENABLED(INDIVIDUAL_AXIS_HOMING_MENU) + GCODES_ITEM(MSG_AUTO_HOME_X, PSTR("G28X")); + #if HAS_Y_AXIS + GCODES_ITEM(MSG_AUTO_HOME_Y, PSTR("G28Y")); + #endif + #if HAS_Z_AXIS + GCODES_ITEM(MSG_AUTO_HOME_Z, PSTR("G28Z")); + #endif + #if LINEAR_AXES >= 4 + GCODES_ITEM(MSG_AUTO_HOME_I, PSTR("G28" AXIS4_STR)); + #endif + #if LINEAR_AXES >= 5 + GCODES_ITEM(MSG_AUTO_HOME_J, PSTR("G28" AXIS5_STR)); + #endif + #if LINEAR_AXES >= 6 + GCODES_ITEM(MSG_AUTO_HOME_K, PSTR("G28" AXIS6_STR)); + #endif + #endif #endif // @@ -397,7 +453,7 @@ void menu_motion() { #endif #if ENABLED(LEVEL_BED_CORNERS) && DISABLED(LCD_BED_LEVELING) - SUBMENU(MSG_LEVEL_CORNERS, _lcd_level_bed_corners); + SUBMENU(MSG_BED_TRAMMING, _lcd_level_bed_corners); #endif #if ENABLED(Z_MIN_PROBE_REPEATABILITY_TEST) diff --git a/Marlin/src/lcd/menu/menu_password.cpp b/Marlin/src/lcd/menu/menu_password.cpp index 80c5c3dc66c3..d3a35abff2e0 100644 --- a/Marlin/src/lcd/menu/menu_password.cpp +++ b/Marlin/src/lcd/menu/menu_password.cpp @@ -44,12 +44,18 @@ static uint8_t digit_no; // Screen for both editing and setting the password // void Password::menu_password_entry() { + ui.defer_status_screen(!did_first_run); // No timeout to status before first auth + START_MENU(); // "Login" or "New Code" STATIC_ITEM_P(authenticating ? GET_TEXT(MSG_LOGIN_REQUIRED) : GET_TEXT(MSG_EDIT_PASSWORD), SS_CENTER|SS_INVERT); - STATIC_ITEM_P(NUL_STR, SS_CENTER|SS_INVERT, string); + STATIC_ITEM_P(NUL_STR, SS_CENTER, string); + + #if HAS_MARLINUI_U8GLIB + STATIC_ITEM_P(NUL_STR, SS_CENTER, ""); + #endif // Make the digit edit item look like a sub-menu PGM_P const label = GET_TEXT(MSG_ENTER_DIGIT); @@ -57,7 +63,7 @@ void Password::menu_password_entry() { MENU_ITEM_ADDON_START(utf8_strlen_P(label) + 1); lcd_put_wchar(' '); lcd_put_wchar('1' + digit_no); - SETCURSOR_X(LCD_WIDTH - 1); + SETCURSOR_X(LCD_WIDTH - 2); lcd_put_wchar('>'); MENU_ITEM_ADDON_END(); @@ -104,7 +110,7 @@ void Password::screen_password_entry() { value_entry = 0; digit_no = 0; editable.uint8 = 0; - memset(string, '-', PASSWORD_LENGTH); + memset(string, '_', PASSWORD_LENGTH); string[PASSWORD_LENGTH] = '\0'; menu_password_entry(); } @@ -120,7 +126,6 @@ void Password::authenticate_user(const screenFunc_t in_succ_scr, const screenFun if (is_set) { authenticating = true; ui.goto_screen(screen_password_entry); - ui.defer_status_screen(); ui.update(); } else { @@ -172,7 +177,7 @@ void Password::menu_password() { START_MENU(); BACK_ITEM(MSG_ADVANCED_SETTINGS); SUBMENU(MSG_CHANGE_PASSWORD, screen_set_password); - ACTION_ITEM(MSG_REMOVE_PASSWORD, []{ ui.save_previous_screen(); remove_password(); } ); + ACTION_ITEM(MSG_REMOVE_PASSWORD, []{ ui.push_current_screen(); remove_password(); } ); #if ENABLED(EEPROM_SETTINGS) ACTION_ITEM(MSG_STORE_EEPROM, ui.store_settings); #endif diff --git a/Marlin/src/lcd/menu/menu_power_monitor.cpp b/Marlin/src/lcd/menu/menu_power_monitor.cpp index d31ebd36b27f..b43327f63bc2 100644 --- a/Marlin/src/lcd/menu/menu_power_monitor.cpp +++ b/Marlin/src/lcd/menu/menu_power_monitor.cpp @@ -42,7 +42,7 @@ void menu_power_monitor() { } #endif - #if HAS_POWER_MONITOR_VREF + #if ENABLED(POWER_MONITOR_VOLTAGE) { bool ena = power_monitor.voltage_display_enabled(); EDIT_ITEM(bool, MSG_VOLTAGE, &ena, power_monitor.toggle_voltage_display); diff --git a/Marlin/src/lcd/menu/menu_probe_offset.cpp b/Marlin/src/lcd/menu/menu_probe_offset.cpp index 2f0c37b4338f..5ed217131a1f 100644 --- a/Marlin/src/lcd/menu/menu_probe_offset.cpp +++ b/Marlin/src/lcd/menu/menu_probe_offset.cpp @@ -42,7 +42,9 @@ // Global storage float z_offset_backup, calculated_z_offset, z_offset_ref; -TERN_(HAS_LEVELING, bool leveling_was_active); +#if HAS_LEVELING + bool leveling_was_active; +#endif inline void z_clearance_move() { do_z_clearance( @@ -56,14 +58,14 @@ inline void z_clearance_move() { ); } -void set_offset_and_go_back(const float &z) { +void set_offset_and_go_back(const_float_t z) { probe.offset.z = z; SET_SOFT_ENDSTOP_LOOSE(false); TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active)); ui.goto_previous_screen_no_defer(); } -void _goto_manual_move_z(const float scale) { +void _goto_manual_move_z(const_float_t scale) { ui.manual_move.menu_scale = scale; ui.goto_screen(lcd_move_z); } @@ -145,7 +147,7 @@ void prepare_for_probe_offset_wizard() { // Move Nozzle to Probing/Homing Position ui.wait_for_move = true; current_position += probe.offset_xy; - line_to_current_position(MMM_TO_MMS(XY_PROBE_SPEED)); + line_to_current_position(MMM_TO_MMS(XY_PROBE_FEEDRATE)); ui.synchronize(GET_TEXT(MSG_PROBE_WIZARD_MOVING)); ui.wait_for_move = false; diff --git a/Marlin/src/lcd/menu/menu_spindle_laser.cpp b/Marlin/src/lcd/menu/menu_spindle_laser.cpp index 93ef224e6f6d..26f555ad620d 100644 --- a/Marlin/src/lcd/menu/menu_spindle_laser.cpp +++ b/Marlin/src/lcd/menu/menu_spindle_laser.cpp @@ -41,7 +41,7 @@ START_MENU(); BACK_ITEM(MSG_MAIN); - #if ENABLED(SPINDLE_LASER_PWM) + #if ENABLED(SPINDLE_LASER_USE_PWM) // Change the cutter's "current power" value without turning the cutter on or off // Power is displayed and set in units and range according to CUTTER_POWER_UNIT EDIT_ITEM_FAST(CUTTER_MENU_POWER_TYPE, MSG_CUTTER(POWER), &cutter.menuPower, @@ -51,6 +51,16 @@ editable.state = is_enabled; EDIT_ITEM(bool, MSG_CUTTER(TOGGLE), &is_enabled, []{ if (editable.state) cutter.disable(); else cutter.enable_same_dir(); }); + #if ENABLED(AIR_EVACUATION) + bool evac_state = cutter.air_evac_state(); + EDIT_ITEM(bool, MSG_CUTTER(EVAC_TOGGLE), &evac_state, cutter.air_evac_toggle); + #endif + + #if ENABLED(AIR_ASSIST) + bool air_assist_state = cutter.air_assist_state(); + EDIT_ITEM(bool, MSG_CUTTER(ASSIST_TOGGLE), &air_assist_state, cutter.air_assist_toggle); + #endif + #if ENABLED(SPINDLE_CHANGE_DIR) if (!is_enabled) { editable.state = is_rev; diff --git a/Marlin/src/lcd/menu/menu_temperature.cpp b/Marlin/src/lcd/menu/menu_temperature.cpp index 01c1f8f5472f..65cef5b76df7 100644 --- a/Marlin/src/lcd/menu/menu_temperature.cpp +++ b/Marlin/src/lcd/menu/menu_temperature.cpp @@ -35,6 +35,10 @@ #include "../../module/motion.h" #endif +#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) + #include "../../feature/cooler.h" +#endif + #if ENABLED(SINGLENOZZLE_STANDBY_TEMP) #include "../../module/tool_change.h" #endif @@ -43,18 +47,24 @@ // "Temperature" submenu items // -void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t indb) { +void Temperature::lcd_preheat(const uint8_t e, const int8_t indh, const int8_t indb) { UNUSED(e); UNUSED(indh); UNUSED(indb); #if HAS_HOTEND if (indh >= 0 && ui.material_preset[indh].hotend_temp > 0) - setTargetHotend(_MIN(thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT, ui.material_preset[indh].hotend_temp), e); + setTargetHotend(_MIN(thermalManager.hotend_max_target(e), ui.material_preset[indh].hotend_temp), e); #endif #if HAS_HEATED_BED if (indb >= 0 && ui.material_preset[indb].bed_temp > 0) setTargetBed(ui.material_preset[indb].bed_temp); #endif #if HAS_FAN - if (indh >= 0) - set_fan_speed(active_extruder < (FAN_COUNT) ? active_extruder : 0, ui.material_preset[indh].fan_speed); + if (indh >= 0) { + const uint8_t fan_index = active_extruder < (FAN_COUNT) ? active_extruder : 0; + if (true + #if REDUNDANT_PART_COOLING_FAN + && fan_index != REDUNDANT_PART_COOLING_FAN + #endif + ) set_fan_speed(fan_index, ui.material_preset[indh].fan_speed); + } #endif ui.return_to_status(); } @@ -66,7 +76,11 @@ void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t i void do_preheat_end_m() { _preheat_end(editable.int8, 0); } #endif #if HAS_HEATED_BED - inline void _preheat_bed(const uint8_t m) { thermalManager.lcd_preheat(-1, -1, m); } + inline void _preheat_bed(const uint8_t m) { thermalManager.lcd_preheat(0, -1, m); } + #endif + #if HAS_COOLER + inline void _precool_laser(const uint8_t m, const uint8_t e) { thermalManager.lcd_preheat(e, m, -1); } + void do_precool_laser_m() { _precool_laser(editable.int8, thermalManager.temp_cooler.target); } #endif #if HAS_TEMP_HOTEND && HAS_HEATED_BED @@ -139,10 +153,14 @@ void menu_temperature() { #if HAS_TEMP_HOTEND || HAS_HEATED_BED bool has_heat = false; #if HAS_TEMP_HOTEND - HOTEND_LOOP() if (thermalManager.temp_hotend[HOTEND_INDEX].target) { has_heat = true; break; } + HOTEND_LOOP() if (thermalManager.degTargetHotend(HOTEND_INDEX)) { has_heat = true; break; } #endif #endif + #if HAS_COOLER + if (thermalManager.temp_cooler.target == 0) thermalManager.temp_cooler.target = COOLER_DEFAULT_TEMP; + #endif + START_MENU(); BACK_ITEM(MSG_MAIN); @@ -151,15 +169,18 @@ void menu_temperature() { // Nozzle [1-5]: // #if HOTENDS == 1 - EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - (HOTEND_OVERSHOOT), []{ thermalManager.start_watching_hotend(0); }); + editable.celsius = thermalManager.temp_hotend[0].target; + EDIT_ITEM_FAST(int3, MSG_NOZZLE, &editable.celsius, 0, thermalManager.hotend_max_target(0), []{ thermalManager.setTargetHotend(editable.celsius, 0); }); #elif HAS_MULTI_HOTEND - HOTEND_LOOP() - EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, thermalManager.heater_maxtemp[e] - (HOTEND_OVERSHOOT), []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); }); + HOTEND_LOOP() { + editable.celsius = thermalManager.temp_hotend[e].target; + EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &editable.celsius, 0, thermalManager.hotend_max_target(e), []{ thermalManager.setTargetHotend(editable.celsius, MenuItemBase::itemIndex); }); + } #endif #if ENABLED(SINGLENOZZLE_STANDBY_TEMP) LOOP_S_L_N(e, 1, EXTRUDERS) - EDIT_ITEM_FAST_N(uint16_3, e, MSG_NOZZLE_STANDBY, &thermalManager.singlenozzle_temp[e], 0, thermalManager.heater_maxtemp[0] - (HOTEND_OVERSHOOT)); + EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_STANDBY, &thermalManager.singlenozzle_temp[e], 0, thermalManager.hotend_max_target(0)); #endif // @@ -173,7 +194,24 @@ void menu_temperature() { // Chamber: // #if HAS_HEATED_CHAMBER - EDIT_ITEM_FAST(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 10, thermalManager.start_watching_chamber); + EDIT_ITEM_FAST(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAX_TARGET, thermalManager.start_watching_chamber); + #endif + + // + // Cooler: + // + #if HAS_COOLER + bool cstate = cooler.enabled; + EDIT_ITEM(bool, MSG_COOLER_TOGGLE, &cstate, cooler.toggle); + EDIT_ITEM_FAST(int3, MSG_COOLER, &thermalManager.temp_cooler.target, COOLER_MIN_TARGET, COOLER_MAX_TARGET, thermalManager.start_watching_cooler); + #endif + + // + // Flow Meter Safety Shutdown: + // + #if ENABLED(FLOWMETER_SAFETY) + bool fstate = cooler.flowsafety_enabled; + EDIT_ITEM(bool, MSG_FLOWMETER_SAFETY, &fstate, cooler.flowsafety_toggle); #endif // @@ -186,37 +224,37 @@ void menu_temperature() { #if HAS_FAN0 _FAN_EDIT_ITEMS(0,FIRST_FAN_SPEED); #endif - #if HAS_FAN1 + #if HAS_FAN1 && REDUNDANT_PART_COOLING_FAN != 1 FAN_EDIT_ITEMS(1); #elif SNFAN(1) singlenozzle_item(1); #endif - #if HAS_FAN2 + #if HAS_FAN2 && REDUNDANT_PART_COOLING_FAN != 2 FAN_EDIT_ITEMS(2); #elif SNFAN(2) singlenozzle_item(2); #endif - #if HAS_FAN3 + #if HAS_FAN3 && REDUNDANT_PART_COOLING_FAN != 3 FAN_EDIT_ITEMS(3); #elif SNFAN(3) singlenozzle_item(3); #endif - #if HAS_FAN4 + #if HAS_FAN4 && REDUNDANT_PART_COOLING_FAN != 4 FAN_EDIT_ITEMS(4); #elif SNFAN(4) singlenozzle_item(4); #endif - #if HAS_FAN5 + #if HAS_FAN5 && REDUNDANT_PART_COOLING_FAN != 5 FAN_EDIT_ITEMS(5); #elif SNFAN(5) singlenozzle_item(5); #endif - #if HAS_FAN6 + #if HAS_FAN6 && REDUNDANT_PART_COOLING_FAN != 6 FAN_EDIT_ITEMS(6); #elif SNFAN(6) singlenozzle_item(6); #endif - #if HAS_FAN7 + #if HAS_FAN7 && REDUNDANT_PART_COOLING_FAN != 7 FAN_EDIT_ITEMS(7); #elif SNFAN(7) singlenozzle_item(7); @@ -226,13 +264,13 @@ void menu_temperature() { #if PREHEAT_COUNT // - // Preheat for Materials 1 to 5 + // Preheat for all Materials // LOOP_L_N(m, PREHEAT_COUNT) { editable.int8 = m; #if HOTENDS > 1 || HAS_HEATED_BED SUBMENU_S(ui.get_preheat_label(m), MSG_PREHEAT_M, menu_preheat_m); - #else + #elif HAS_HOTEND ACTION_ITEM_S(ui.get_preheat_label(m), MSG_PREHEAT_M, do_preheat_end_m); #endif } @@ -242,11 +280,31 @@ void menu_temperature() { // // Cooldown // - if (TERN0(HAS_HEATED_BED, thermalManager.temp_bed.target)) has_heat = true; + if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed())) has_heat = true; if (has_heat) ACTION_ITEM(MSG_COOLDOWN, lcd_cooldown); #endif END_MENU(); } +#if ENABLED(PREHEAT_SHORTCUT_MENU_ITEM) + + void menu_preheat_only() { + START_MENU(); + BACK_ITEM(MSG_MAIN); + + LOOP_L_N(m, PREHEAT_COUNT) { + editable.int8 = m; + #if HOTENDS > 1 || HAS_HEATED_BED + SUBMENU_S(ui.get_preheat_label(m), MSG_PREHEAT_M, menu_preheat_m); + #else + ACTION_ITEM_S(ui.get_preheat_label(m), MSG_PREHEAT_M, do_preheat_end_m); + #endif + } + + END_MENU(); + } + +#endif + #endif // HAS_LCD_MENU && HAS_TEMPERATURE diff --git a/Marlin/src/lcd/menu/menu_tmc.cpp b/Marlin/src/lcd/menu/menu_tmc.cpp index 69193701eb1f..ad7d63205879 100644 --- a/Marlin/src/lcd/menu/menu_tmc.cpp +++ b/Marlin/src/lcd/menu/menu_tmc.cpp @@ -95,54 +95,22 @@ void menu_tmc_current() { void menu_tmc_hybrid_thrs() { START_MENU(); BACK_ITEM(MSG_TMC_DRIVERS); - #if AXIS_HAS_STEALTHCHOP(X) - TMC_EDIT_STORED_HYBRID_THRS(X, STR_X); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - TMC_EDIT_STORED_HYBRID_THRS(Y, STR_Y); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - TMC_EDIT_STORED_HYBRID_THRS(Z, STR_Z); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - TMC_EDIT_STORED_HYBRID_THRS(X2, STR_X2); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - TMC_EDIT_STORED_HYBRID_THRS(Y2, STR_Y2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - TMC_EDIT_STORED_HYBRID_THRS(Z2, STR_Z2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - TMC_EDIT_STORED_HYBRID_THRS(Z3, STR_Z3); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - TMC_EDIT_STORED_HYBRID_THRS(Z4, STR_Z4); - #endif - #if AXIS_HAS_STEALTHCHOP(E0) - TMC_EDIT_STORED_HYBRID_THRS(E0, LCD_STR_E0); - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - TMC_EDIT_STORED_HYBRID_THRS(E1, LCD_STR_E1); - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - TMC_EDIT_STORED_HYBRID_THRS(E2, LCD_STR_E2); - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - TMC_EDIT_STORED_HYBRID_THRS(E3, LCD_STR_E3); - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - TMC_EDIT_STORED_HYBRID_THRS(E4, LCD_STR_E4); - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - TMC_EDIT_STORED_HYBRID_THRS(E5, LCD_STR_E5); - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - TMC_EDIT_STORED_HYBRID_THRS(E6, LCD_STR_E6); - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - TMC_EDIT_STORED_HYBRID_THRS(E7, LCD_STR_E7); - #endif + TERN_(X_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(X, STR_X)); + TERN_(Y_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(Y, STR_Y)); + TERN_(Z_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(Z, STR_Z)); + TERN_(X2_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(X2, STR_X2)); + TERN_(Y2_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(Y2, STR_Y2)); + TERN_(Z2_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(Z2, STR_Z2)); + TERN_(Z3_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(Z3, STR_Z3)); + TERN_(Z4_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(Z4, STR_Z4)); + TERN_(E0_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(E0, LCD_STR_E0)); + TERN_(E1_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(E1, LCD_STR_E1)); + TERN_(E2_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(E2, LCD_STR_E2)); + TERN_(E3_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(E3, LCD_STR_E3)); + TERN_(E4_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(E4, LCD_STR_E4)); + TERN_(E5_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(E5, LCD_STR_E5)); + TERN_(E6_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(E6, LCD_STR_E6)); + TERN_(E7_HAS_STEALTHCHOP, TMC_EDIT_STORED_HYBRID_THRS(E7, LCD_STR_E7)); END_MENU(); } @@ -155,30 +123,17 @@ void menu_tmc_current() { void menu_tmc_homing_thrs() { START_MENU(); BACK_ITEM(MSG_TMC_DRIVERS); - #if X_SENSORLESS - TMC_EDIT_STORED_SGT(X); - #if X2_SENSORLESS - TMC_EDIT_STORED_SGT(X2); - #endif - #endif - #if Y_SENSORLESS - TMC_EDIT_STORED_SGT(Y); - #if Y2_SENSORLESS - TMC_EDIT_STORED_SGT(Y2); - #endif - #endif - #if Z_SENSORLESS - TMC_EDIT_STORED_SGT(Z); - #if Z2_SENSORLESS - TMC_EDIT_STORED_SGT(Z2); - #endif - #if Z3_SENSORLESS - TMC_EDIT_STORED_SGT(Z3); - #endif - #if Z4_SENSORLESS - TMC_EDIT_STORED_SGT(Z4); - #endif - #endif + TERN_( X_SENSORLESS, TMC_EDIT_STORED_SGT(X)); + TERN_(X2_SENSORLESS, TMC_EDIT_STORED_SGT(X2)); + TERN_( Y_SENSORLESS, TMC_EDIT_STORED_SGT(Y)); + TERN_(Y2_SENSORLESS, TMC_EDIT_STORED_SGT(Y2)); + TERN_( Z_SENSORLESS, TMC_EDIT_STORED_SGT(Z)); + TERN_(Z2_SENSORLESS, TMC_EDIT_STORED_SGT(Z2)); + TERN_(Z3_SENSORLESS, TMC_EDIT_STORED_SGT(Z3)); + TERN_(Z4_SENSORLESS, TMC_EDIT_STORED_SGT(Z4)); + TERN_( I_SENSORLESS, TMC_EDIT_STORED_SGT(I)); + TERN_( J_SENSORLESS, TMC_EDIT_STORED_SGT(J)); + TERN_( K_SENSORLESS, TMC_EDIT_STORED_SGT(K)); END_MENU(); } @@ -192,54 +147,22 @@ void menu_tmc_current() { START_MENU(); STATIC_ITEM(MSG_TMC_STEALTH_ENABLED); BACK_ITEM(MSG_TMC_DRIVERS); - #if AXIS_HAS_STEALTHCHOP(X) - TMC_EDIT_STEP_MODE(X, STR_X); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - TMC_EDIT_STEP_MODE(Y, STR_Y); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - TMC_EDIT_STEP_MODE(Z, STR_Z); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - TMC_EDIT_STEP_MODE(X2, STR_X2); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - TMC_EDIT_STEP_MODE(Y2, STR_Y2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - TMC_EDIT_STEP_MODE(Z2, STR_Z2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - TMC_EDIT_STEP_MODE(Z3, STR_Z3); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - TMC_EDIT_STEP_MODE(Z4, STR_Z4); - #endif - #if AXIS_HAS_STEALTHCHOP(E0) - TMC_EDIT_STEP_MODE(E0, LCD_STR_E0); - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - TMC_EDIT_STEP_MODE(E1, LCD_STR_E1); - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - TMC_EDIT_STEP_MODE(E2, LCD_STR_E2); - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - TMC_EDIT_STEP_MODE(E3, LCD_STR_E3); - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - TMC_EDIT_STEP_MODE(E4, LCD_STR_E4); - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - TMC_EDIT_STEP_MODE(E5, LCD_STR_E5); - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - TMC_EDIT_STEP_MODE(E6, LCD_STR_E6); - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - TMC_EDIT_STEP_MODE(E7, LCD_STR_E7); - #endif + TERN_( X_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(X, STR_X)); + TERN_(X2_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(X2, STR_X2)); + TERN_( Y_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(Y, STR_Y)); + TERN_(Y2_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(Y2, STR_Y2)); + TERN_( Z_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(Z, STR_Z)); + TERN_(Z2_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(Z2, STR_Z2)); + TERN_(Z3_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(Z3, STR_Z3)); + TERN_(Z4_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(Z4, STR_Z4)); + TERN_(E0_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(E0, LCD_STR_E0)); + TERN_(E1_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(E1, LCD_STR_E1)); + TERN_(E2_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(E2, LCD_STR_E2)); + TERN_(E3_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(E3, LCD_STR_E3)); + TERN_(E4_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(E4, LCD_STR_E4)); + TERN_(E5_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(E5, LCD_STR_E5)); + TERN_(E6_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(E6, LCD_STR_E6)); + TERN_(E7_HAS_STEALTHCHOP, TMC_EDIT_STEP_MODE(E7, LCD_STR_E7)); END_MENU(); } @@ -249,15 +172,9 @@ void menu_tmc() { START_MENU(); BACK_ITEM(MSG_ADVANCED_SETTINGS); SUBMENU(MSG_TMC_CURRENT, menu_tmc_current); - #if ENABLED(HYBRID_THRESHOLD) - SUBMENU(MSG_TMC_HYBRID_THRS, menu_tmc_hybrid_thrs); - #endif - #if ENABLED(SENSORLESS_HOMING) - SUBMENU(MSG_TMC_HOMING_THRS, menu_tmc_homing_thrs); - #endif - #if HAS_STEALTHCHOP - SUBMENU(MSG_TMC_STEPPING_MODE, menu_tmc_step_mode); - #endif + TERN_(HYBRID_THRESHOLD, SUBMENU(MSG_TMC_HYBRID_THRS, menu_tmc_hybrid_thrs)); + TERN_(SENSORLESS_HOMING, SUBMENU(MSG_TMC_HOMING_THRS, menu_tmc_homing_thrs)); + TERN_(HAS_STEALTHCHOP, SUBMENU(MSG_TMC_STEPPING_MODE, menu_tmc_step_mode)); END_MENU(); } diff --git a/Marlin/src/lcd/menu/menu_tramming.cpp b/Marlin/src/lcd/menu/menu_tramming.cpp index da7afd86ef79..9bc799129ecf 100644 --- a/Marlin/src/lcd/menu/menu_tramming.cpp +++ b/Marlin/src/lcd/menu/menu_tramming.cpp @@ -39,8 +39,10 @@ //#define DEBUG_OUT 1 #include "../../core/debug_out.h" -float z_measured[G35_PROBE_COUNT] = { 0 }; +static float z_measured[G35_PROBE_COUNT]; +static bool z_isvalid[G35_PROBE_COUNT]; static uint8_t tram_index = 0; +static int8_t reference_index; // = 0 #if HAS_LEVELING #include "../../feature/bedlevel/bedlevel.h" @@ -49,33 +51,32 @@ static uint8_t tram_index = 0; static bool probe_single_point() { do_blocking_move_to_z(TERN(BLTOUCH, Z_CLEARANCE_DEPLOY_PROBE, Z_CLEARANCE_BETWEEN_PROBES)); // Stow after each point with BLTouch "HIGH SPEED" mode for push-pin safety - const float z_probed_height = probe.probe_at_point(screws_tilt_adjust_pos[tram_index], TERN(BLTOUCH_HS_MODE, PROBE_PT_STOW, PROBE_PT_RAISE), 0, true); - DEBUG_ECHOLNPAIR("probe_single_point: ", z_probed_height, "mm"); + const float z_probed_height = probe.probe_at_point(tramming_points[tram_index], TERN(BLTOUCH_HS_MODE, PROBE_PT_STOW, PROBE_PT_RAISE), 0, true); z_measured[tram_index] = z_probed_height; + if (reference_index < 0) reference_index = tram_index; move_to_tramming_wait_pos(); - return !isnan(z_probed_height); + DEBUG_ECHOLNPGM("probe_single_point(", tram_index, ") = ", z_probed_height, "mm"); + return (z_isvalid[tram_index] = !isnan(z_probed_height)); } -static void _menu_single_probe(const uint8_t point) { - tram_index = point; - DEBUG_ECHOLNPAIR("Screen: single probe screen Arg:", point); +static void _menu_single_probe() { + DEBUG_ECHOLNPGM("Screen: single probe screen Arg:", tram_index); START_MENU(); - STATIC_ITEM(MSG_LEVEL_CORNERS, SS_LEFT); - STATIC_ITEM(MSG_LAST_VALUE_SP, SS_LEFT, ftostr42_52(z_measured[0] - z_measured[point])); // Print diff + STATIC_ITEM(MSG_BED_TRAMMING, SS_LEFT); + STATIC_ITEM(MSG_LAST_VALUE_SP, SS_LEFT, z_isvalid[tram_index] ? ftostr42_52(z_measured[reference_index] - z_measured[tram_index]) : "---"); ACTION_ITEM(MSG_UBL_BC_INSERT2, []{ if (probe_single_point()) ui.refresh(); }); - ACTION_ITEM(MSG_BUTTON_DONE, []{ ui.goto_previous_screen(); }); // Back + ACTION_ITEM(MSG_BUTTON_DONE, []{ ui.goto_previous_screen(); }); END_MENU(); } static void tramming_wizard_menu() { - DEBUG_ECHOLNPAIR("Screen: tramming_wizard_menu"); START_MENU(); STATIC_ITEM(MSG_SELECT_ORIGIN); // Draw a menu item for each tramming point - LOOP_L_N(i, G35_PROBE_COUNT) - SUBMENU_N_P(i, (char*)pgm_read_ptr(&tramming_point_name[i]), []{ _menu_single_probe(MenuItemBase::itemIndex); }); + for (tram_index = 0; tram_index < G35_PROBE_COUNT; tram_index++) + SUBMENU_P((char*)pgm_read_ptr(&tramming_point_name[tram_index]), _menu_single_probe); ACTION_ITEM(MSG_BUTTON_DONE, []{ probe.stow(); // Stow before exiting Tramming Wizard @@ -86,13 +87,16 @@ static void tramming_wizard_menu() { // Init the wizard and enter the submenu void goto_tramming_wizard() { - DEBUG_ECHOLNPAIR("Screen: goto_tramming_wizard", 1); - tram_index = 0; + DEBUG_ECHOLNPGM("Screen: goto_tramming_wizard", 1); ui.defer_status_screen(); + // Initialize measured point flags + ZERO(z_isvalid); + reference_index = -1; + // Inject G28, wait for homing to complete, set_all_unhomed(); - queue.inject_P(TERN(G28_L0_ENSURES_LEVELING_OFF, PSTR("G28L0"), G28_STR)); + queue.inject_P(TERN(CAN_SET_LEVELING_AFTER_G28, PSTR("G28L0"), G28_STR)); ui.goto_screen([]{ _lcd_draw_homing(); diff --git a/Marlin/src/lcd/menu/menu_tune.cpp b/Marlin/src/lcd/menu/menu_tune.cpp index 0fbb57f2ac17..37ffb679e923 100644 --- a/Marlin/src/lcd/menu/menu_tune.cpp +++ b/Marlin/src/lcd/menu/menu_tune.cpp @@ -65,8 +65,8 @@ babystep.add_steps(axis, steps); } if (ui.should_draw()) { - const float spm = planner.steps_to_mm[axis]; - MenuEditItemBase::draw_edit_screen(msg, BABYSTEP_TO_STR(spm * babystep.accum)); + const float mps = planner.mm_per_step[axis]; + MenuEditItemBase::draw_edit_screen(msg, BABYSTEP_TO_STR(mps * babystep.accum)); #if ENABLED(BABYSTEP_DISPLAY_TOTAL) const bool in_view = TERN1(HAS_MARLINUI_U8GLIB, PAGE_CONTAINS(LCD_PIXEL_HEIGHT - MENU_FONT_HEIGHT, LCD_PIXEL_HEIGHT - 1)); if (in_view) { @@ -81,7 +81,7 @@ lcd_put_u8str_P(GET_TEXT(MSG_BABYSTEP_TOTAL)); lcd_put_wchar(':'); #endif - lcd_put_u8str(BABYSTEP_TO_STR(spm * babystep.axis_total[BS_TOTAL_IND(axis)])); + lcd_put_u8str(BABYSTEP_TO_STR(mps * babystep.axis_total[BS_TOTAL_IND(axis)])); } #endif } @@ -126,15 +126,15 @@ void menu_tune() { // Nozzle [1-4]: // #if HOTENDS == 1 - EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(0); }); + EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, thermalManager.hotend_max_target(0), []{ thermalManager.start_watching_hotend(0); }); #elif HAS_MULTI_HOTEND HOTEND_LOOP() - EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, thermalManager.heater_maxtemp[e] - HOTEND_OVERSHOOT, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); }); + EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_N, &thermalManager.temp_hotend[e].target, 0, thermalManager.hotend_max_target(e), []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); }); #endif #if ENABLED(SINGLENOZZLE_STANDBY_TEMP) LOOP_S_L_N(e, 1, EXTRUDERS) - EDIT_ITEM_FAST_N(uint16_3, e, MSG_NOZZLE_STANDBY, &thermalManager.singlenozzle_temp[e], 0, thermalManager.heater_maxtemp[0] - HOTEND_OVERSHOOT); + EDIT_ITEM_FAST_N(int3, e, MSG_NOZZLE_STANDBY, &thermalManager.singlenozzle_temp[e], 0, thermalManager.hotend_max_target(0)); #endif // @@ -195,7 +195,7 @@ void menu_tune() { // // Flow: // - #if EXTRUDERS + #if HAS_EXTRUDERS EDIT_ITEM(int3, MSG_FLOW, &planner.flow_percentage[active_extruder], 10, 999, []{ planner.refresh_e_factor(active_extruder); }); // Flow En: #if HAS_MULTI_EXTRUDER diff --git a/Marlin/src/lcd/menu/menu_ubl.cpp b/Marlin/src/lcd/menu/menu_ubl.cpp index 95e64a0d82ff..8dea7d943dc6 100644 --- a/Marlin/src/lcd/menu/menu_ubl.cpp +++ b/Marlin/src/lcd/menu/menu_ubl.cpp @@ -37,7 +37,7 @@ #include "../../feature/bedlevel/bedlevel.h" static int16_t ubl_storage_slot = 0, - custom_hotend_temp = 190, + custom_hotend_temp = 150, side_points = 3, ubl_fillin_amount = 5, ubl_height_amount = 1; @@ -56,12 +56,24 @@ inline float rounded_mesh_value() { return float(rounded - (rounded % 5L)) / 1000; } -static void _lcd_mesh_fine_tune(PGM_P const msg) { +/** + * This screen displays the temporary mesh value and updates it based on encoder + * movement. While this screen is active ubl.fine_tune_mesh sits in a loop getting + * the current value via ubl_mesh_value, moves the Z axis, and updates the mesh + * value until the encoder button is pressed. + * + * - Update the 'mesh_edit_accumulator' from encoder rotation + * - Draw the mesh value (with draw_edit_screen) + * - Draw the graphical overlay, if enabled. + * - Update the 'refresh' state according to the display type + */ +void _lcd_mesh_fine_tune(PGM_P const msg) { + constexpr float mesh_edit_step = 1.0f / 200.0f; ui.defer_status_screen(); if (ubl.encoder_diff) { mesh_edit_accumulator += TERN(IS_TFTGLCD_PANEL, - ubl.encoder_diff * 0.005f / ENCODER_PULSES_PER_STEP, - ubl.encoder_diff > 0 ? 0.005f : -0.005f + ubl.encoder_diff * mesh_edit_step / ENCODER_PULSES_PER_STEP, + ubl.encoder_diff > 0 ? mesh_edit_step : -mesh_edit_step ); ubl.encoder_diff = 0; IF_DISABLED(IS_TFTGLCD_PANEL, ui.refresh(LCDVIEW_CALL_REDRAW_NEXT)); @@ -71,35 +83,25 @@ static void _lcd_mesh_fine_tune(PGM_P const msg) { if (ui.should_draw()) { const float rounded_f = rounded_mesh_value(); MenuEditItemBase::draw_edit_screen(msg, ftostr43sign(rounded_f)); - TERN_(MESH_EDIT_GFX_OVERLAY, _lcd_zoffset_overlay_gfx(rounded_f)); + TERN_(MESH_EDIT_GFX_OVERLAY, ui.zoffset_overlay(rounded_f)); TERN_(HAS_GRAPHICAL_TFT, ui.refresh(LCDVIEW_NONE)); } } // -// Called external to the menu system to acquire the result of an edit. +// Init mesh editing and go to the fine tuning screen (ubl.fine_tune_mesh) +// To capture encoder events UBL will also call ui.capture and ui.release. // -float lcd_mesh_edit() { return rounded_mesh_value(); } - -void lcd_mesh_edit_setup(const float &initial) { - TERN_(HAS_GRAPHICAL_TFT, ui.clear_lcd()); +void MarlinUI::ubl_mesh_edit_start(const_float_t initial) { + TERN_(HAS_GRAPHICAL_TFT, clear_lcd()); mesh_edit_accumulator = initial; - ui.goto_screen([]{ _lcd_mesh_fine_tune(GET_TEXT(MSG_MESH_EDIT_Z)); }); + goto_screen([]{ _lcd_mesh_fine_tune(GET_TEXT(MSG_MESH_EDIT_Z)); }); } -void _lcd_z_offset_edit() { - _lcd_mesh_fine_tune(GET_TEXT(MSG_UBL_Z_OFFSET)); -} - -float lcd_z_offset_edit() { - ui.goto_screen(_lcd_z_offset_edit); - return rounded_mesh_value(); -} - -void lcd_z_offset_edit_setup(const float &initial) { - mesh_edit_accumulator = initial; - ui.goto_screen(_lcd_z_offset_edit); -} +// +// Get the mesh value within a Z adjustment loop (ubl.fine_tune_mesh) +// +float MarlinUI::ubl_mesh_value() { return rounded_mesh_value(); } /** * UBL Build Custom Mesh Command @@ -126,7 +128,7 @@ void _lcd_ubl_custom_mesh() { START_MENU(); BACK_ITEM(MSG_UBL_BUILD_MESH_MENU); #if HAS_HOTEND - EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT); + EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, EXTRUDE_MINTEMP, thermalManager.hotend_max_target(0)); #endif #if HAS_HEATED_BED EDIT_ITEM(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP, BED_MAX_TARGET); @@ -174,7 +176,7 @@ void _menu_ubl_height_adjust() { void _lcd_ubl_edit_mesh() { START_MENU(); BACK_ITEM(MSG_UBL_TOOLS); - GCODES_ITEM(MSG_UBL_FINE_TUNE_ALL, PSTR("G29P4R999T")); + GCODES_ITEM(MSG_UBL_FINE_TUNE_ALL, PSTR("G29P4RT")); GCODES_ITEM(MSG_UBL_FINE_TUNE_CLOSEST, PSTR("G29P4T")); SUBMENU(MSG_UBL_MESH_HEIGHT_ADJUST, _menu_ubl_height_adjust); ACTION_ITEM(MSG_INFO_SCREEN, ui.return_to_status); @@ -190,9 +192,7 @@ void _lcd_ubl_edit_mesh() { char ubl_lcd_gcode[20]; sprintf_P(ubl_lcd_gcode, PSTR("G28\nG26CPH%" PRIi16 TERN_(HAS_HEATED_BED, "B%" PRIi16)) , custom_hotend_temp - #if HAS_HEATED_BED - , custom_bed_temp - #endif + OPTARG(HAS_HEATED_BED, custom_bed_temp) ); queue.inject(ubl_lcd_gcode); } @@ -428,7 +428,7 @@ void ubl_map_move_to_xy() { // Use the built-in manual move handler to move to the mesh point. ui.manual_move.set_destination(xy); - ui.manual_move.soon(ALL_AXES); + ui.manual_move.soon(ALL_AXES_ENUM); } inline int32_t grid_index(const uint8_t x, const uint8_t y) { @@ -476,14 +476,14 @@ void ubl_map_screen() { if (position_is_reachable(xy)) break; // Found a valid point ui.encoderPosition += step_dir; // Test the next point #endif - } while(ENABLED(IS_KINEMATIC)); + } while (ENABLED(IS_KINEMATIC)); // Determine number of points to edit #if IS_KINEMATIC n_edit_pts = 9; // TODO: Delta accessible edit points #else - const bool xc = WITHIN(x, 1, GRID_MAX_POINTS_X - 2), - yc = WITHIN(y, 1, GRID_MAX_POINTS_Y - 2); + const bool xc = WITHIN(x, 1, (GRID_MAX_POINTS_X) - 2), + yc = WITHIN(y, 1, (GRID_MAX_POINTS_Y) - 2); n_edit_pts = yc ? (xc ? 9 : 6) : (xc ? 6 : 4); // Corners #endif @@ -592,15 +592,60 @@ void _menu_ubl_tools() { GCODES_ITEM(MSG_UBL_1_BUILD_COLD_MESH, PSTR("G29NP1")); GCODES_ITEM(MSG_UBL_2_SMART_FILLIN, PSTR("G29P3T0")); SUBMENU(MSG_UBL_3_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh); - GCODES_ITEM(MSG_UBL_4_FINE_TUNE_ALL, PSTR("G29P4R999T")); + GCODES_ITEM(MSG_UBL_4_FINE_TUNE_ALL, PSTR("G29P4RT")); SUBMENU(MSG_UBL_5_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh); - GCODES_ITEM(MSG_UBL_6_FINE_TUNE_ALL, PSTR("G29P4R999T")); + GCODES_ITEM(MSG_UBL_6_FINE_TUNE_ALL, PSTR("G29P4RT")); ACTION_ITEM(MSG_UBL_7_SAVE_MESH, _lcd_ubl_save_mesh_cmd); END_MENU(); } #endif +#if ENABLED(UBL_MESH_WIZARD) + + /** + * UBL Mesh Wizard - One-click mesh creation with or without a probe + */ + void _lcd_ubl_mesh_wizard() { + char ubl_lcd_gcode[30]; + #if HAS_HEATED_BED && HAS_HOTEND + sprintf_P(ubl_lcd_gcode, PSTR("M1004B%iH%iS%i"), custom_bed_temp, custom_hotend_temp, ubl_storage_slot); + #elif HAS_HOTEND + sprintf_P(ubl_lcd_gcode, PSTR("M1004H%iS%i"), custom_hotend_temp, ubl_storage_slot); + #else + sprintf_P(ubl_lcd_gcode, PSTR("M1004S%i"), ubl_storage_slot); + #endif + queue.inject(ubl_lcd_gcode); + ui.return_to_status(); + } + + void _menu_ubl_mesh_wizard() { + const int16_t total_slots = settings.calc_num_meshes(); + START_MENU(); + BACK_ITEM(MSG_UBL_LEVEL_BED); + + #if HAS_HOTEND + EDIT_ITEM(int3, MSG_UBL_HOTEND_TEMP_CUSTOM, &custom_hotend_temp, HEATER_0_MINTEMP + 20, thermalManager.hotend_max_target(0)); + #endif + + #if HAS_HEATED_BED + EDIT_ITEM(int3, MSG_UBL_BED_TEMP_CUSTOM, &custom_bed_temp, BED_MINTEMP + 20, BED_MAX_TARGET); + #endif + + EDIT_ITEM(int3, MSG_UBL_STORAGE_SLOT, &ubl_storage_slot, 0, total_slots); + + ACTION_ITEM(MSG_UBL_MESH_WIZARD, _lcd_ubl_mesh_wizard); + + #if ENABLED(G26_MESH_VALIDATION) + SUBMENU(MSG_UBL_VALIDATE_MESH_MENU, _lcd_ubl_validate_mesh); + #endif + + ACTION_ITEM(MSG_INFO_SCREEN, ui.return_to_status); + END_MENU(); + } + +#endif + /** * UBL System submenu * @@ -621,18 +666,21 @@ void _lcd_ubl_level_bed() { GCODES_ITEM(MSG_UBL_DEACTIVATE_MESH, PSTR("G29D")); else GCODES_ITEM(MSG_UBL_ACTIVATE_MESH, PSTR("G29A")); + #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) + editable.decimal = planner.z_fade_height; + EDIT_ITEM_FAST(float3, MSG_Z_FADE_HEIGHT, &editable.decimal, 0, 100, []{ set_z_fade_height(editable.decimal); }); + #endif #if ENABLED(G26_MESH_VALIDATION) SUBMENU(MSG_UBL_STEP_BY_STEP_MENU, _lcd_ubl_step_by_step); #endif + #if ENABLED(UBL_MESH_WIZARD) + SUBMENU(MSG_UBL_MESH_WIZARD, _menu_ubl_mesh_wizard); + #endif ACTION_ITEM(MSG_UBL_MESH_EDIT, _ubl_goto_map_screen); SUBMENU(MSG_UBL_STORAGE_MESH_MENU, _lcd_ubl_storage_mesh); SUBMENU(MSG_UBL_OUTPUT_MAP, _lcd_ubl_output_map); SUBMENU(MSG_UBL_TOOLS, _menu_ubl_tools); GCODES_ITEM(MSG_UBL_INFO_UBL, PSTR("G29W")); - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - editable.decimal = planner.z_fade_height; - EDIT_ITEM_FAST(float3, MSG_Z_FADE_HEIGHT, &editable.decimal, 0, 100, []{ set_z_fade_height(editable.decimal); }); - #endif END_MENU(); } diff --git a/Marlin/src/lcd/tft/bitmaps/btn_42x39_rounded.bmp b/Marlin/src/lcd/tft/bitmaps/btn_42x39_rounded.bmp new file mode 100644 index 0000000000000000000000000000000000000000..a89c7964e9fc9c6b17cc36055cd899c834b3ddf8 GIT binary patch literal 5046 zcmeI0-AZCn6vy{G!@w{vFw8KJMyR1_fs_}e6?I`BXkf`$2pZ;;AF0vTOVnM^10+)F zl~%V#q+SGyANdA#>CBHK%}mVgId*dv?1gM${r6gD?Zy88t&Yq`A(;XHjrE=NmGwb< z#tV_+|1Y0$y6$}ySux+y}h})xv{a~^Z9-#W9#ede!o8y3Pqz)pe6i7 zA`y$lK=yb%PN#ErcGhmUPfbnXPxyLZ8Di8{ARP+fBc7shqw5{!^8c|U&UAJ|EB-d{!{N? zALp++f7JP-&YyqYAL{&7=kNQ^UmoXucz;(amH*~H@BiiH<*ltPMIZkJhiLckVLU=a zA`$q<&CQKoub-cvhy1exGlq`hhSS%1SjguZ7?ZU<(B;(`blarH5h!02^L?+AC)m8ZC$;pYt zzYh)$C^8!_FE0>bm^mte68giyz`)qp81;XCeg>5FFtHqXj_3U-hS+{)OiV@Nc<=hrjU% O&gG)xxP`z;_`d;x*W7Uc literal 0 HcmV?d00001 diff --git a/Marlin/src/lcd/tft/canvas.cpp b/Marlin/src/lcd/tft/canvas.cpp index 3c2cda4fd52d..e8b89bad7060 100644 --- a/Marlin/src/lcd/tft/canvas.cpp +++ b/Marlin/src/lcd/tft/canvas.cpp @@ -50,7 +50,7 @@ bool CANVAS::ToScreen() { } void CANVAS::SetBackground(uint16_t color) { - /* TODO: test and optimize perfomance */ + /* TODO: test and optimize performance */ /* uint32_t count = (endLine - startLine) * width; uint16_t *pixel = buffer; diff --git a/Marlin/src/lcd/tft/images/btn_rounded_42x39x4.cpp b/Marlin/src/lcd/tft/images/btn_rounded_42x39x4.cpp new file mode 100644 index 000000000000..bd7b9220ebaa --- /dev/null +++ b/Marlin/src/lcd/tft/images/btn_rounded_42x39x4.cpp @@ -0,0 +1,69 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../../inc/MarlinConfigPre.h" + +#if HAS_GRAPHICAL_TFT + +extern const uint8_t btn_rounded_42x39x4[819] = { + 0x87, 0x87, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x78, 0x78, + 0x87, 0x77, 0xAB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xB9, 0x77, 0x78, + 0x87, 0x8E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x68, + 0x87, 0xFF, 0x84, 0x32, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x37, 0xFF, 0x57, + 0x7B, 0xF6, 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x43, 0x6F, 0x95, + 0x7D, 0xC3, 0x45, 0x56, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x4D, 0xC4, + 0x7E, 0xC3, 0x56, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x6D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7E, 0xC3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x7D, 0xD3, + 0x7D, 0xD3, 0x57, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x77, 0x7E, 0xC3, + 0x88, 0xFA, 0x56, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0x77, 0xCF, 0x64, + 0x86, 0xBF, 0xDB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xCE, 0xFB, 0x34, + 0x87, 0x57, 0xEF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0x74, 0x45, + 0x87, 0x75, 0x33, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x33, 0x34, 0x56, + 0x87, 0x77, 0x65, 0x54, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x55, 0x67, + 0x87, 0x87, 0x77, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x67, 0x78 +}; + +#endif // HAS_GRAPHICAL_TFT diff --git a/Marlin/src/lcd/tft/tft.h b/Marlin/src/lcd/tft/tft.h index 99d335d135f6..1576518b4bb7 100644 --- a/Marlin/src/lcd/tft/tft.h +++ b/Marlin/src/lcd/tft/tft.h @@ -46,6 +46,9 @@ #elif HAS_UI_480x272 #define TFT_WIDTH 480 #define TFT_HEIGHT 272 +#elif HAS_UI_1024x600 + #define TFT_WIDTH 1024 + #define TFT_HEIGHT 600 #else #error "Unsupported display resolution!" #endif diff --git a/Marlin/src/lcd/tft/tft_color.h b/Marlin/src/lcd/tft/tft_color.h index a72a079f6ee4..a8668179e579 100644 --- a/Marlin/src/lcd/tft/tft_color.h +++ b/Marlin/src/lcd/tft/tft_color.h @@ -30,7 +30,8 @@ #define COLOR(color) RGB(((color >> 16) & 0xFF), ((color >> 8) & 0xFF), (color & 0xFF)) #define HALF(color) RGB(RED(color) >> 1, GREEN(color) >> 1, BLUE(color) >> 1) -// see https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html +// 16 bit color generator: https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html +// RGB565 color picker: https://trolsoft.ru/en/articles/rgb565-color-picker #define COLOR_BLACK 0x0000 // #000000 #define COLOR_WHITE 0xFFFF // #FFFFFF @@ -38,7 +39,7 @@ #define COLOR_GREY 0x7BEF // #808080 #define COLOR_DARKGREY 0x4208 // #404040 #define COLOR_DARKGREY2 0x39E7 // #303030 -#define COLOR_DARK 0x0003 // Some dark color +#define COLOR_DARK 0x0003 // #000019 #define COLOR_RED 0xF800 // #FF0000 #define COLOR_SCARLET 0xF904 // #FF2020 @@ -51,7 +52,7 @@ #define COLOR_CYAN 0x07FF // #00FFFF #define COLOR_AQUA 0x07FF // #00FFFF #define COLOR_DODGER_BLUE 0x041F // #0080FF -#define COLOR_VIVID_VIOLET 0x7933 // #772399 +#define COLOR_VIVID_VIOLET 0x7933 // #772399 #define COLOR_DARK_PURPLE 0x9930 // #992380 @@ -73,10 +74,10 @@ #define COLOR_BACKGROUND 0x20AC // #1E156E #endif #ifndef COLOR_SELECTION_BG - #define COLOR_SELECTION_BG 0x9930 // #992380 + #define COLOR_SELECTION_BG 0x9930 // #992380 #endif #ifndef COLOR_WEBSITE_URL - #define COLOR_WEBSITE_URL 0x03B7 + #define COLOR_WEBSITE_URL 0x03B7 // #0075BD #endif #ifndef COLOR_INACTIVE @@ -94,6 +95,9 @@ #ifndef COLOR_CHAMBER #define COLOR_CHAMBER COLOR_DARK_ORANGE #endif +#ifndef COLOR_COOLER + #define COLOR_COOLER COLOR_DARK_ORANGE +#endif #ifndef COLOR_FAN #define COLOR_FAN COLOR_AQUA #endif diff --git a/Marlin/src/lcd/tft/tft_image.cpp b/Marlin/src/lcd/tft/tft_image.cpp index f3480705e1e9..3651899dd717 100644 --- a/Marlin/src/lcd/tft/tft_image.cpp +++ b/Marlin/src/lcd/tft/tft_image.cpp @@ -53,6 +53,7 @@ const tImage Fan_Fast1_64x64x4 = { (void *)fan_fast1_64x64x4, 64, 64, GREYS const tImage SD_64x64x4 = { (void *)sd_64x64x4, 64, 64, GREYSCALE4 }; const tImage Home_64x64x4 = { (void *)home_64x64x4, 64, 64, GREYSCALE4 }; const tImage BtnRounded_64x52x4 = { (void *)btn_rounded_64x52x4, 64, 52, GREYSCALE4 }; +const tImage BtnRounded_42x39x4 = { (void *)btn_rounded_42x39x4, 42, 39, GREYSCALE4 }; const tImage Menu_64x64x4 = { (void *)menu_64x64x4, 64, 64, GREYSCALE4 }; const tImage Settings_64x64x4 = { (void *)settings_64x64x4, 64, 64, GREYSCALE4 }; const tImage Confirm_64x64x4 = { (void *)confirm_64x64x4, 64, 64, GREYSCALE4 }; @@ -106,6 +107,7 @@ const tImage Images[imgCount] = { Slider8x16x4, Home_64x64x4, BtnRounded_64x52x4, + BtnRounded_42x39x4, }; #endif // HAS_GRAPHICAL_TFT diff --git a/Marlin/src/lcd/tft/tft_image.h b/Marlin/src/lcd/tft/tft_image.h index 960a4e4356af..de046fb0c4c2 100644 --- a/Marlin/src/lcd/tft/tft_image.h +++ b/Marlin/src/lcd/tft/tft_image.h @@ -42,6 +42,7 @@ extern const uint8_t fan_fast0_64x64x4[], fan_fast1_64x64x4[]; extern const uint8_t sd_64x64x4[]; extern const uint8_t home_64x64x4[]; extern const uint8_t btn_rounded_64x52x4[]; +extern const uint8_t btn_rounded_42x39x4[]; extern const uint8_t menu_64x64x4[]; extern const uint8_t settings_64x64x4[]; extern const uint8_t confirm_64x64x4[]; @@ -95,6 +96,7 @@ enum MarlinImage : uint8_t { imgSlider, imgHome, imgBtn52Rounded, + imgBtn39Rounded, imgCount, noImage = imgCount, imgPageUp = imgLeft, @@ -145,6 +147,7 @@ extern const tImage Fan_Fast1_64x64x4; extern const tImage SD_64x64x4; extern const tImage Home_64x64x4; extern const tImage BtnRounded_64x52x4; +extern const tImage BtnRounded_42x39x4; extern const tImage Menu_64x64x4; extern const tImage Settings_64x64x4; extern const tImage Confirm_64x64x4; diff --git a/Marlin/src/lcd/tft/tft_queue.h b/Marlin/src/lcd/tft/tft_queue.h index 7eaa0c01c1a2..51387254c55d 100644 --- a/Marlin/src/lcd/tft/tft_queue.h +++ b/Marlin/src/lcd/tft/tft_queue.h @@ -134,7 +134,7 @@ class TFT_Queue { public: static void reset(); static void async(); - static void sync() { while (current_task != NULL) async(); } + static void sync() { while (current_task != nullptr) async(); } static void fill(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color); static void canvas(uint16_t x, uint16_t y, uint16_t width, uint16_t height); diff --git a/Marlin/src/lcd/tft/tft_string.cpp b/Marlin/src/lcd/tft/tft_string.cpp index c2a571e826ff..6f2d8690b298 100644 --- a/Marlin/src/lcd/tft/tft_string.cpp +++ b/Marlin/src/lcd/tft/tft_string.cpp @@ -45,21 +45,21 @@ void TFT_String::set_font(const uint8_t *font) { for (glyph = 0; glyph < 256; glyph++) glyphs[glyph] = nullptr; - DEBUG_ECHOLNPAIR("Format: ", font_header->Format); - DEBUG_ECHOLNPAIR("BBXWidth: ", font_header->BBXWidth); - DEBUG_ECHOLNPAIR("BBXHeight: ", font_header->BBXHeight); - DEBUG_ECHOLNPAIR("BBXOffsetX: ", font_header->BBXOffsetX); - DEBUG_ECHOLNPAIR("BBXOffsetY: ", font_header->BBXOffsetY); - DEBUG_ECHOLNPAIR("CapitalAHeight: ", font_header->CapitalAHeight); - DEBUG_ECHOLNPAIR("Encoding65Pos: ", font_header->Encoding65Pos); - DEBUG_ECHOLNPAIR("Encoding97Pos: ", font_header->Encoding97Pos); - DEBUG_ECHOLNPAIR("FontStartEncoding: ", font_header->FontStartEncoding); - DEBUG_ECHOLNPAIR("FontEndEncoding: ", font_header->FontEndEncoding); - DEBUG_ECHOLNPAIR("LowerGDescent: ", font_header->LowerGDescent); - DEBUG_ECHOLNPAIR("FontAscent: ", font_header->FontAscent); - DEBUG_ECHOLNPAIR("FontDescent: ", font_header->FontDescent); - DEBUG_ECHOLNPAIR("FontXAscent: ", font_header->FontXAscent); - DEBUG_ECHOLNPAIR("FontXDescent: ", font_header->FontXDescent); + DEBUG_ECHOLNPGM("Format: ", font_header->Format); + DEBUG_ECHOLNPGM("BBXWidth: ", font_header->BBXWidth); + DEBUG_ECHOLNPGM("BBXHeight: ", font_header->BBXHeight); + DEBUG_ECHOLNPGM("BBXOffsetX: ", font_header->BBXOffsetX); + DEBUG_ECHOLNPGM("BBXOffsetY: ", font_header->BBXOffsetY); + DEBUG_ECHOLNPGM("CapitalAHeight: ", font_header->CapitalAHeight); + DEBUG_ECHOLNPGM("Encoding65Pos: ", font_header->Encoding65Pos); + DEBUG_ECHOLNPGM("Encoding97Pos: ", font_header->Encoding97Pos); + DEBUG_ECHOLNPGM("FontStartEncoding: ", font_header->FontStartEncoding); + DEBUG_ECHOLNPGM("FontEndEncoding: ", font_header->FontEndEncoding); + DEBUG_ECHOLNPGM("LowerGDescent: ", font_header->LowerGDescent); + DEBUG_ECHOLNPGM("FontAscent: ", font_header->FontAscent); + DEBUG_ECHOLNPGM("FontDescent: ", font_header->FontDescent); + DEBUG_ECHOLNPGM("FontXAscent: ", font_header->FontXAscent); + DEBUG_ECHOLNPGM("FontXDescent: ", font_header->FontXDescent); add_glyphs(font); } diff --git a/Marlin/src/lcd/tft/touch.cpp b/Marlin/src/lcd/tft/touch.cpp index 7a45851a5da8..dc1f2ecb6c13 100644 --- a/Marlin/src/lcd/tft/touch.cpp +++ b/Marlin/src/lcd/tft/touch.cpp @@ -47,7 +47,10 @@ millis_t Touch::last_touch_ms = 0, Touch::time_to_hold, Touch::repeat_delay, Touch::touch_time; -TouchControlType Touch::touch_control_type = NONE; +TouchControlType Touch::touch_control_type = NONE; +#if HAS_TOUCH_SLEEP + millis_t Touch::next_sleep_ms; // = 0 +#endif #if HAS_RESUME_CONTINUE extern bool wait_for_user; #endif @@ -56,6 +59,7 @@ void Touch::init() { TERN_(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration_reset()); reset(); io.Init(); + TERN_(HAS_TOUCH_SLEEP, wakeUp()); enable(); } @@ -93,9 +97,7 @@ void Touch::idle() { } #endif - #if LCD_TIMEOUT_TO_STATUS - ui.return_to_status_ms = last_touch_ms + LCD_TIMEOUT_TO_STATUS; - #endif + ui.reset_status_timeout(last_touch_ms); if (touch_time) { #if ENABLED(TOUCH_SCREEN_CALIBRATION) @@ -184,24 +186,32 @@ void Touch::touch(touch_control_t *control) { int8_t heater; heater = control->data; ui.clear_lcd(); - if (heater >= 0) { // HotEnd - #if HOTENDS == 1 - MenuItem_int3::action((const char *)GET_TEXT_F(MSG_NOZZLE), &thermalManager.temp_hotend[0].target, 0, thermalManager.heater_maxtemp[0] - 15, []{ thermalManager.start_watching_hotend(0); }); - #else - MenuItemBase::itemIndex = heater; - MenuItem_int3::action((const char *)GET_TEXT_F(MSG_NOZZLE_N), &thermalManager.temp_hotend[heater].target, 0, thermalManager.heater_maxtemp[heater] - 15, []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); }); - #endif - } + #if HAS_HOTEND + if (heater >= 0) { // HotEnd + #if HOTENDS == 1 + MenuItem_int3::action((const char *)GET_TEXT_F(MSG_NOZZLE), &thermalManager.temp_hotend[0].target, 0, thermalManager.hotend_max_target(0), []{ thermalManager.start_watching_hotend(0); }); + #else + MenuItemBase::itemIndex = heater; + MenuItem_int3::action((const char *)GET_TEXT_F(MSG_NOZZLE_N), &thermalManager.temp_hotend[heater].target, 0, thermalManager.hotend_max_target(heater), []{ thermalManager.start_watching_hotend(MenuItemBase::itemIndex); }); + #endif + } + #endif #if HAS_HEATED_BED else if (heater == H_BED) { - MenuItem_int3::action((const char *)GET_TEXT_F(MSG_BED), &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 10, thermalManager.start_watching_bed); + MenuItem_int3::action((const char *)GET_TEXT_F(MSG_BED), &thermalManager.temp_bed.target, 0, BED_MAX_TARGET, thermalManager.start_watching_bed); } #endif #if HAS_HEATED_CHAMBER else if (heater == H_CHAMBER) { - MenuItem_int3::action((const char *)GET_TEXT_F(MSG_CHAMBER), &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 10, thermalManager.start_watching_chamber); + MenuItem_int3::action((const char *)GET_TEXT_F(MSG_CHAMBER), &thermalManager.temp_chamber.target, 0, CHAMBER_MAX_TARGET, thermalManager.start_watching_chamber); } #endif + #if HAS_COOLER + else if (heater == H_COOLER) { + MenuItem_int3::action((const char *)GET_TEXT_F(MSG_COOLER), &thermalManager.temp_cooler.target, 0, COOLER_MAX_TARGET, thermalManager.start_watching_cooler); + } + #endif + break; case FAN: ui.clear_lcd(); @@ -249,20 +259,52 @@ void Touch::hold(touch_control_t *control, millis_t delay) { } bool Touch::get_point(int16_t *x, int16_t *y) { - #if ENABLED(TOUCH_SCREEN_CALIBRATION) - bool is_touched = (touch_calibration.calibration.orientation == TOUCH_PORTRAIT ? io.getRawPoint(y, x) : io.getRawPoint(x, y)); + #if ENABLED(TFT_TOUCH_DEVICE_XPT2046) + #if ENABLED(TOUCH_SCREEN_CALIBRATION) + bool is_touched = (touch_calibration.calibration.orientation == TOUCH_PORTRAIT ? io.getRawPoint(y, x) : io.getRawPoint(x, y)); - if (is_touched && touch_calibration.calibration.orientation != TOUCH_ORIENTATION_NONE) { - *x = int16_t((int32_t(*x) * touch_calibration.calibration.x) >> 16) + touch_calibration.calibration.offset_x; - *y = int16_t((int32_t(*y) * touch_calibration.calibration.y) >> 16) + touch_calibration.calibration.offset_y; - } - #else - bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? io.getRawPoint(y, x) : io.getRawPoint(x, y)); - *x = uint16_t((uint32_t(*x) * TOUCH_CALIBRATION_X) >> 16) + TOUCH_OFFSET_X; - *y = uint16_t((uint32_t(*y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y; + if (is_touched && touch_calibration.calibration.orientation != TOUCH_ORIENTATION_NONE) { + *x = int16_t((int32_t(*x) * touch_calibration.calibration.x) >> 16) + touch_calibration.calibration.offset_x; + *y = int16_t((int32_t(*y) * touch_calibration.calibration.y) >> 16) + touch_calibration.calibration.offset_y; + } + #else + bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? io.getRawPoint(y, x) : io.getRawPoint(x, y)); + *x = uint16_t((uint32_t(*x) * TOUCH_CALIBRATION_X) >> 16) + TOUCH_OFFSET_X; + *y = uint16_t((uint32_t(*y) * TOUCH_CALIBRATION_Y) >> 16) + TOUCH_OFFSET_Y; + #endif + #elif ENABLED(TFT_TOUCH_DEVICE_GT911) + bool is_touched = (TOUCH_ORIENTATION == TOUCH_PORTRAIT ? io.getPoint(y, x) : io.getPoint(x, y)); + #endif + #if HAS_TOUCH_SLEEP + if (is_touched) + wakeUp(); + else if (!isSleeping() && ELAPSED(millis(), next_sleep_ms) && ui.on_status_screen()) + sleepTimeout(); #endif return is_touched; } + +#if HAS_TOUCH_SLEEP + + void Touch::sleepTimeout() { + #if PIN_EXISTS(TFT_BACKLIGHT) + OUT_WRITE(TFT_BACKLIGHT_PIN, LOW); + #endif + next_sleep_ms = TSLP_SLEEPING; + } + void Touch::wakeUp() { + if (isSleeping()) { + #if HAS_LCD_BRIGHTNESS + ui._set_brightness(); + #elif PIN_EXISTS(TFT_BACKLIGHT) + WRITE(TFT_BACKLIGHT_PIN, HIGH); + #endif + } + next_sleep_ms = millis() + SEC_TO_MS(TOUCH_IDLE_SLEEP); + } + +#endif // HAS_TOUCH_SLEEP + Touch touch; bool MarlinUI::touch_pressed() { diff --git a/Marlin/src/lcd/tft/touch.h b/Marlin/src/lcd/tft/touch.h index 6726f031ff99..238453f765ed 100644 --- a/Marlin/src/lcd/tft/touch.h +++ b/Marlin/src/lcd/tft/touch.h @@ -30,8 +30,15 @@ #include "../tft_io/touch_calibration.h" #endif -#include HAL_PATH(../../HAL, tft/xpt2046.h) -#define TOUCH_DRIVER XPT2046 +#if ENABLED(TFT_TOUCH_DEVICE_GT911) + #include HAL_PATH(../../HAL, tft/gt911.h) + #define TOUCH_DRIVER_CLASS GT911 +#elif ENABLED(TFT_TOUCH_DEVICE_XPT2046) + #include HAL_PATH(../../HAL, tft/xpt2046.h) + #define TOUCH_DRIVER_CLASS XPT2046 +#else + #error "Unknown Touch Screen Type." +#endif // Menu Navigation extern int8_t encoderTopLine, encoderLine, screen_items; @@ -83,9 +90,12 @@ typedef struct __attribute__((__packed__)) { #define UBL_REPEAT_DELAY 125 #define FREE_MOVE_RANGE 32 +#define TSLP_PREINIT 0 +#define TSLP_SLEEPING 1 + class Touch { private: - static TOUCH_DRIVER io; + static TOUCH_DRIVER_CLASS io; static int16_t x, y; static bool enabled; @@ -102,7 +112,7 @@ class Touch { public: static void init(); - static void reset() { controls_count = 0; touch_time = 0; current_control = NULL; } + static void reset() { controls_count = 0; touch_time = 0; current_control = nullptr; } static void clear() { controls_count = 0; } static void idle(); static bool is_clicked() { @@ -114,7 +124,12 @@ class Touch { } static void disable() { enabled = false; } static void enable() { enabled = true; } - + #if HAS_TOUCH_SLEEP + static millis_t next_sleep_ms; + static inline bool isSleeping() { return next_sleep_ms == TSLP_SLEEPING; } + static void sleepTimeout(); + static void wakeUp(); + #endif static void add_control(TouchControlType type, uint16_t x, uint16_t y, uint16_t width, uint16_t height, intptr_t data = 0); }; diff --git a/Marlin/src/lcd/tft/ui_1024x600.cpp b/Marlin/src/lcd/tft/ui_1024x600.cpp new file mode 100644 index 000000000000..456bd3275850 --- /dev/null +++ b/Marlin/src/lcd/tft/ui_1024x600.cpp @@ -0,0 +1,920 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#include "../../inc/MarlinConfigPre.h" + +#if HAS_UI_1024x600 + +#include "ui_common.h" + +#include "../marlinui.h" +#include "../menu/menu.h" +#include "../../libs/numtostr.h" + +#include "../../sd/cardreader.h" +#include "../../module/temperature.h" +#include "../../module/printcounter.h" +#include "../../module/planner.h" +#include "../../module/motion.h" + +#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT) + #include "../../feature/filwidth.h" + #include "../../gcode/parser.h" +#endif + +#if ENABLED(AUTO_BED_LEVELING_UBL) + #include "../../feature/bedlevel/bedlevel.h" +#endif + +void MarlinUI::tft_idle() { + #if ENABLED(TOUCH_SCREEN) + if (TERN0(HAS_TOUCH_SLEEP, lcd_sleep_task())) return; + if (draw_menu_navigation) { + add_control(164, TFT_HEIGHT - 50, PAGE_UP, imgPageUp, encoderTopLine > 0); + add_control(796, TFT_HEIGHT - 50, PAGE_DOWN, imgPageDown, encoderTopLine + LCD_HEIGHT < screen_items); + add_control(480, TFT_HEIGHT - 50, BACK, imgBack); + draw_menu_navigation = false; + } + #endif + + tft.queue.async(); + TERN_(TOUCH_SCREEN, touch.idle()); +} + +#if ENABLED(SHOW_BOOTSCREEN) + + void MarlinUI::show_bootscreen() { + tft.queue.reset(); + + tft.canvas(0, 0, TFT_WIDTH, TFT_HEIGHT); + #if ENABLED(BOOT_MARLIN_LOGO_SMALL) + #define BOOT_LOGO_W 195 // MarlinLogo195x59x16 + #define BOOT_LOGO_H 59 + #define SITE_URL_Y (TFT_HEIGHT - 70) + tft.set_background(COLOR_BACKGROUND); + #else + #define BOOT_LOGO_W TFT_WIDTH // MarlinLogo480x320x16 + #define BOOT_LOGO_H TFT_HEIGHT + #define SITE_URL_Y (TFT_HEIGHT - 90) + #endif + tft.add_image((TFT_WIDTH - BOOT_LOGO_W) / 2, (TFT_HEIGHT - BOOT_LOGO_H) / 2, imgBootScreen); + #ifdef WEBSITE_URL + tft_string.set(WEBSITE_URL); + tft.add_text(tft_string.center(TFT_WIDTH), SITE_URL_Y, COLOR_WEBSITE_URL, tft_string); + #endif + + tft.queue.sync(); + } + + void MarlinUI::bootscreen_completion(const millis_t sofar) { + if ((BOOTSCREEN_TIMEOUT) > sofar) safe_delay((BOOTSCREEN_TIMEOUT) - sofar); + clear_lcd(); + } + +#endif + +void MarlinUI::draw_kill_screen() { + tft.queue.reset(); + tft.fill(0, 0, TFT_WIDTH, TFT_HEIGHT, COLOR_KILL_SCREEN_BG); + + uint16_t line = 2; + + menu_line(line++, COLOR_KILL_SCREEN_BG); + tft_string.set(status_message); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_MENU_TEXT, tft_string); + + line++; + menu_line(line++, COLOR_KILL_SCREEN_BG); + tft_string.set(GET_TEXT(MSG_HALTED)); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_MENU_TEXT, tft_string); + + menu_line(line++, COLOR_KILL_SCREEN_BG); + tft_string.set(GET_TEXT(MSG_PLEASE_RESET)); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_MENU_TEXT, tft_string); + + tft.queue.sync(); +} + +void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { + MarlinImage image = imgHotEnd; + uint16_t Color; + celsius_t currentTemperature, targetTemperature; + + if (Heater >= 0) { // HotEnd + currentTemperature = thermalManager.wholeDegHotend(Heater); + targetTemperature = thermalManager.degTargetHotend(Heater); + } + #if HAS_HEATED_BED + else if (Heater == H_BED) { + currentTemperature = thermalManager.wholeDegBed(); + targetTemperature = thermalManager.degTargetBed(); + } + #endif + #if HAS_TEMP_CHAMBER + else if (Heater == H_CHAMBER) { + currentTemperature = thermalManager.wholeDegChamber(); + #if HAS_HEATED_CHAMBER + targetTemperature = thermalManager.degTargetChamber(); + #else + targetTemperature = ABSOLUTE_ZERO; + #endif + } + #endif + #if HAS_TEMP_COOLER + else if (Heater == H_COOLER) { + currentTemperature = thermalManager.wholeDegCooler(); + targetTemperature = TERN(HAS_COOLER, thermalManager.degTargetCooler(), ABSOLUTE_ZERO); + } + #endif + else return; + + TERN_(TOUCH_SCREEN, if (targetTemperature >= 0) touch.add_control(HEATER, x, y, 80, 120, Heater)); + tft.canvas(x, y, 80, 120); + tft.set_background(COLOR_BACKGROUND); + + Color = currentTemperature < 0 ? COLOR_INACTIVE : COLOR_COLD; + + if (Heater >= 0) { // HotEnd + if (currentTemperature >= 50) Color = COLOR_HOTEND; + } + #if HAS_HEATED_BED + else if (Heater == H_BED) { + if (currentTemperature >= 50) Color = COLOR_HEATED_BED; + image = targetTemperature > 0 ? imgBedHeated : imgBed; + } + #endif + #if HAS_TEMP_CHAMBER + else if (Heater == H_CHAMBER) { + if (currentTemperature >= 50) Color = COLOR_CHAMBER; + image = targetTemperature > 0 ? imgChamberHeated : imgChamber; + } + #endif + #if HAS_TEMP_COOLER + else if (Heater == H_COOLER) { + if (currentTemperature <= 26) Color = COLOR_COLD; + if (currentTemperature > 26) Color = COLOR_RED; + image = targetTemperature > 26 ? imgCoolerHot : imgCooler; + } + #endif + + tft.add_image(8, 28, image, Color); + + tft_string.set((uint8_t *)i16tostr3rj(currentTemperature)); + tft_string.add(LCD_STR_DEGREE); + tft_string.trim(); + tft.add_text(tft_string.center(80) + 2, 82, Color, tft_string); + + if (targetTemperature >= 0) { + tft_string.set((uint8_t *)i16tostr3rj(targetTemperature)); + tft_string.add(LCD_STR_DEGREE); + tft_string.trim(); + tft.add_text(tft_string.center(80) + 2, 8, Color, tft_string); + } +} + +void draw_fan_status(uint16_t x, uint16_t y, const bool blink) { + TERN_(TOUCH_SCREEN, touch.add_control(FAN, x, y, 80, 120)); + tft.canvas(x, y, 80, 120); + tft.set_background(COLOR_BACKGROUND); + + uint8_t fanSpeed = thermalManager.fan_speed[0]; + MarlinImage image; + + if (fanSpeed >= 127) + image = blink ? imgFanFast1 : imgFanFast0; + else if (fanSpeed > 0) + image = blink ? imgFanSlow1 : imgFanSlow0; + else + image = imgFanIdle; + + tft.add_image(8, 20, image, COLOR_FAN); + + tft_string.set((uint8_t *)ui8tostr4pctrj(thermalManager.fan_speed[0])); + tft_string.trim(); + tft.add_text(tft_string.center(80) + 6, 82, COLOR_FAN, tft_string); +} + +void MarlinUI::draw_status_screen() { + const bool blink = get_blink(); + + TERN_(TOUCH_SCREEN, touch.clear()); + + // heaters and fan + uint16_t i, x, y = TFT_STATUS_TOP_Y; + + for (i = 0 ; i < ITEMS_COUNT; i++) { + x = (TFT_WIDTH / ITEMS_COUNT - 80) / 2 + (TFT_WIDTH * i / ITEMS_COUNT); + switch (i) { + #ifdef ITEM_E0 + case ITEM_E0: draw_heater_status(x, y, H_E0); break; + #endif + #ifdef ITEM_E1 + case ITEM_E1: draw_heater_status(x, y, H_E1); break; + #endif + #ifdef ITEM_E2 + case ITEM_E2: draw_heater_status(x, y, H_E2); break; + #endif + #ifdef ITEM_BED + case ITEM_BED: draw_heater_status(x, y, H_BED); break; + #endif + #ifdef ITEM_CHAMBER + case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break; + #endif + #ifdef ITEM_COOLER + case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break; + #endif + #ifdef ITEM_FAN + case ITEM_FAN: draw_fan_status(x, y, blink); break; + #endif + } + } + + y += 200; + + // coordinates + tft.canvas(4, y, TFT_WIDTH - 8, FONT_LINE_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft.add_rectangle(0, 0, TFT_WIDTH - 8, FONT_LINE_HEIGHT, COLOR_AXIS_HOMED); + + tft.add_text(200, 3, COLOR_AXIS_HOMED , "X"); + tft.add_text(500, 3, COLOR_AXIS_HOMED , "Y"); + tft.add_text(800, 3, COLOR_AXIS_HOMED , "Z"); + + bool not_homed = axis_should_home(X_AXIS); + tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_X_POSITION(current_position.x))); + tft.add_text(300 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string); + + not_homed = axis_should_home(Y_AXIS); + tft_string.set(blink && not_homed ? "?" : ftostr4sign(LOGICAL_Y_POSITION(current_position.y))); + tft.add_text(600 - tft_string.width(), 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string); + + uint16_t offset = 32; + not_homed = axis_should_home(Z_AXIS); + if (blink && not_homed) + tft_string.set("?"); + else { + const float z = LOGICAL_Z_POSITION(current_position.z); + tft_string.set(ftostr52sp((int16_t)z)); + tft_string.rtrim(); + offset += tft_string.width(); + + tft_string.set(ftostr52sp(z)); + offset -= tft_string.width(); + } + tft.add_text(900 - tft_string.width() - offset, 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string); + TERN_(TOUCH_SCREEN, touch.add_control(MOVE_AXIS, 4, y, TFT_WIDTH - 8, FONT_LINE_HEIGHT)); + + y += 100; + // feed rate + tft.canvas(274, y, 100, 32); + tft.set_background(COLOR_BACKGROUND); + uint16_t color = feedrate_percentage == 100 ? COLOR_RATE_100 : COLOR_RATE_ALTERED; + tft.add_image(0, 0, imgFeedRate, color); + tft_string.set(i16tostr3rj(feedrate_percentage)); + tft_string.add('%'); + tft.add_text(36, 1, color , tft_string); + TERN_(TOUCH_SCREEN, touch.add_control(FEEDRATE, 274, y, 100, 32)); + + // flow rate + tft.canvas(650, y, 100, 32); + tft.set_background(COLOR_BACKGROUND); + color = planner.flow_percentage[0] == 100 ? COLOR_RATE_100 : COLOR_RATE_ALTERED; + tft.add_image(0, 0, imgFlowRate, color); + tft_string.set(i16tostr3rj(planner.flow_percentage[active_extruder])); + tft_string.add('%'); + tft.add_text(36, 1, color , tft_string); + TERN_(TOUCH_SCREEN, touch.add_control(FLOWRATE, 650, y, 100, 32, active_extruder)); + + #if ENABLED(TOUCH_SCREEN) + add_control(900, y, menu_main, imgSettings); + TERN_(SDSUPPORT, add_control(12, y, menu_media, imgSD, !printingIsActive(), COLOR_CONTROL_ENABLED, card.isMounted() && printingIsActive() ? COLOR_BUSY : COLOR_CONTROL_DISABLED)); + #endif + + y += 100; + // print duration + char buffer[14]; + duration_t elapsed = print_job_timer.duration(); + elapsed.toDigital(buffer); + + tft.canvas((TFT_WIDTH - 128) / 2, y, 128, 29); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(buffer); + tft.add_text(tft_string.center(128), 0, COLOR_PRINT_TIME, tft_string); + + y += 50; + // progress bar + const uint8_t progress = ui.get_progress_percent(); + tft.canvas(4, y, TFT_WIDTH - 8, 9); + tft.set_background(COLOR_PROGRESS_BG); + tft.add_rectangle(0, 0, TFT_WIDTH - 8, 9, COLOR_PROGRESS_FRAME); + if (progress) + tft.add_bar(1, 1, ((TFT_WIDTH - 10) * progress) / 100, 7, COLOR_PROGRESS_BAR); + + y += 50; + // status message + tft.canvas(0, y, TFT_WIDTH, FONT_LINE_HEIGHT - 5); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(status_message); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_STATUS_MESSAGE, tft_string); +} + +// Low-level draw_edit_screen can be used to draw an edit screen from anyplace +void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) { + ui.encoder_direction_normal(); + TERN_(TOUCH_SCREEN, touch.clear()); + + uint16_t line = 1; + + menu_line(line++); + tft_string.set(pstr, itemIndex, itemString); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); + + TERN_(AUTO_BED_LEVELING_UBL, if (ui.external_control) line++); // ftostr52() will overwrite *value so *value has to be displayed first + + menu_line(line); + tft_string.set(value); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + + #if ENABLED(AUTO_BED_LEVELING_UBL) + if (ui.external_control) { + menu_line(line - 1); + + tft_string.set(X_LBL); + tft.add_text((TFT_WIDTH / 2 - 120), MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); + tft_string.set(ftostr52(LOGICAL_X_POSITION(current_position.x))); + tft_string.trim(); + tft.add_text((TFT_WIDTH / 2 - 16) - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + + tft_string.set(Y_LBL); + tft.add_text((TFT_WIDTH / 2 + 16), MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); + tft_string.set(ftostr52(LOGICAL_X_POSITION(current_position.y))); + tft_string.trim(); + tft.add_text((TFT_WIDTH / 2 + 120) - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + } + #endif + + extern screenFunc_t _manual_move_func_ptr; + if (ui.currentScreen != _manual_move_func_ptr && !ui.external_control) { + + #define SLIDER_LENGTH 600 + #define SLIDER_Y_POSITION 200 + + tft.canvas((TFT_WIDTH - SLIDER_LENGTH) / 2, SLIDER_Y_POSITION, SLIDER_LENGTH, 16); + tft.set_background(COLOR_BACKGROUND); + + int16_t position = (SLIDER_LENGTH - 2) * ui.encoderPosition / maxEditValue; + tft.add_bar(0, 7, 1, 2, ui.encoderPosition == 0 ? COLOR_SLIDER_INACTIVE : COLOR_SLIDER); + tft.add_bar(1, 6, position, 4, COLOR_SLIDER); + tft.add_bar(position + 1, 6, SLIDER_LENGTH - 2 - position, 4, COLOR_SLIDER_INACTIVE); + tft.add_bar(SLIDER_LENGTH - 1, 7, 1, 2, int32_t(ui.encoderPosition) == maxEditValue ? COLOR_SLIDER : COLOR_SLIDER_INACTIVE); + + #if ENABLED(TOUCH_SCREEN) + tft.add_image((SLIDER_LENGTH - 8) * ui.encoderPosition / maxEditValue, 0, imgSlider, COLOR_SLIDER); + touch.add_control(SLIDER, (TFT_WIDTH - SLIDER_LENGTH) / 2, SLIDER_Y_POSITION - 8, SLIDER_LENGTH, 32, maxEditValue); + #endif + } + + tft.draw_edit_screen_buttons(); +} + +void TFT::draw_edit_screen_buttons() { + #if ENABLED(TOUCH_SCREEN) + add_control(164, TFT_HEIGHT - 64, DECREASE, imgDecrease); + add_control(796, TFT_HEIGHT - 64, INCREASE, imgIncrease); + add_control(480, TFT_HEIGHT - 64, CLICK, imgConfirm); + #endif +} + +// The Select Screen presents a prompt and two "buttons" +void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const bool yesno, PGM_P const pref, const char * const string/*=nullptr*/, PGM_P const suff/*=nullptr*/) { + uint16_t line = 1; + + if (!string) line++; + + menu_line(line++); + tft_string.set(pref); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_MENU_TEXT, tft_string); + + if (string) { + menu_line(line++); + tft_string.set(string); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_MENU_TEXT, tft_string); + } + + if (suff) { + menu_line(line); + tft_string.set(suff); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_MENU_TEXT, tft_string); + } + #if ENABLED(TOUCH_SCREEN) + add_control(88, TFT_HEIGHT - 64, CANCEL, imgCancel, true, yesno ? HALF(COLOR_CONTROL_CANCEL) : COLOR_CONTROL_CANCEL); + add_control(328, TFT_HEIGHT - 64, CONFIRM, imgConfirm, true, yesno ? COLOR_CONTROL_CONFIRM : HALF(COLOR_CONTROL_CONFIRM)); + #else + menu_line(++line); + if (no) { + tft_string.set(no); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH / 2), 0, !yesno ? COLOR_RED : COLOR_MENU_TEXT, tft_string); + } + + if (yes) { + tft_string.set(yes); + tft_string.trim(); + tft.add_text(TFT_WIDTH / 2 + tft_string.center(TFT_WIDTH / 2), 0, yesno ? COLOR_RED : COLOR_MENU_TEXT, tft_string); + } + #endif +} + +#if ENABLED(ADVANCED_PAUSE_FEATURE) + + void MarlinUI::draw_hotend_status(const uint8_t row, const uint8_t extruder) { + #if ENABLED(TOUCH_SCREEN) + touch.clear(); + draw_menu_navigation = false; + touch.add_control(RESUME_CONTINUE , 0, 0, TFT_WIDTH, TFT_HEIGHT); + #endif + + menu_line(row); + tft_string.set(GET_TEXT(MSG_FILAMENT_CHANGE_NOZZLE)); + tft_string.add('E'); + tft_string.add((char)('1' + extruder)); + tft_string.add(' '); + tft_string.add(i16tostr3rj(thermalManager.wholeDegHotend(extruder))); + tft_string.add(LCD_STR_DEGREE); + tft_string.add(" / "); + tft_string.add(i16tostr3rj(thermalManager.degTargetHotend(extruder))); + tft_string.add(LCD_STR_DEGREE); + tft_string.trim(); + tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_MENU_TEXT, tft_string); + } + +#endif // ADVANCED_PAUSE_FEATURE + +#if ENABLED(AUTO_BED_LEVELING_UBL) + #define GRID_OFFSET_X 8 + #define GRID_OFFSET_Y 8 + #define GRID_WIDTH 192 + #define GRID_HEIGHT 192 + #define CONTROL_OFFSET 16 + + void MarlinUI::ubl_plot(const uint8_t x_plot, const uint8_t y_plot) { + + tft.canvas(GRID_OFFSET_X, GRID_OFFSET_Y, GRID_WIDTH, GRID_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft.add_rectangle(0, 0, GRID_WIDTH, GRID_HEIGHT, COLOR_WHITE); + + for (uint16_t x = 0; x < GRID_MAX_POINTS_X ; x++) + for (uint16_t y = 0; y < GRID_MAX_POINTS_Y ; y++) + if (position_is_reachable({ ubl.mesh_index_to_xpos(x), ubl.mesh_index_to_ypos(y) })) + tft.add_bar(1 + (x * 2 + 1) * (GRID_WIDTH - 4) / GRID_MAX_POINTS_X / 2, GRID_HEIGHT - 3 - ((y * 2 + 1) * (GRID_HEIGHT - 4) / GRID_MAX_POINTS_Y / 2), 2, 2, COLOR_UBL); + + tft.add_rectangle((x_plot * 2 + 1) * (GRID_WIDTH - 4) / GRID_MAX_POINTS_X / 2 - 1, GRID_HEIGHT - 5 - ((y_plot * 2 + 1) * (GRID_HEIGHT - 4) / GRID_MAX_POINTS_Y / 2), 6, 6, COLOR_UBL); + + const xy_pos_t pos = { ubl.mesh_index_to_xpos(x_plot), ubl.mesh_index_to_ypos(y_plot) }, + lpos = pos.asLogical(); + + tft.canvas(320, GRID_OFFSET_Y + (GRID_HEIGHT - MENU_ITEM_HEIGHT) / 2 - MENU_ITEM_HEIGHT, 120, MENU_ITEM_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(X_LBL); + tft.add_text(0, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); + tft_string.set(ftostr52(lpos.x)); + tft_string.trim(); + tft.add_text(120 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + + tft.canvas(320, GRID_OFFSET_Y + (GRID_HEIGHT - MENU_ITEM_HEIGHT) / 2, 120, MENU_ITEM_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(Y_LBL); + tft.add_text(0, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); + tft_string.set(ftostr52(lpos.y)); + tft_string.trim(); + tft.add_text(120 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + + tft.canvas(320, GRID_OFFSET_Y + (GRID_HEIGHT - MENU_ITEM_HEIGHT) / 2 + MENU_ITEM_HEIGHT, 120, MENU_ITEM_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(Z_LBL); + tft.add_text(0, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); + tft_string.set(isnan(ubl.z_values[x_plot][y_plot]) ? "-----" : ftostr43sign(ubl.z_values[x_plot][y_plot])); + tft_string.trim(); + tft.add_text(120 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + + constexpr uint8_t w = (TFT_WIDTH) / 10; + tft.canvas(GRID_OFFSET_X + (GRID_WIDTH - w) / 2, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET - 5, w, MENU_ITEM_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(ui8tostr3rj(x_plot)); + tft_string.trim(); + tft.add_text(tft_string.center(w), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + + tft.canvas(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET + 16 - 24, GRID_OFFSET_Y + (GRID_HEIGHT - MENU_ITEM_HEIGHT) / 2, w, MENU_ITEM_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(ui8tostr3rj(y_plot)); + tft_string.trim(); + tft.add_text(tft_string.center(w), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + + #if ENABLED(TOUCH_SCREEN) + touch.clear(); + draw_menu_navigation = false; + add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + CONTROL_OFFSET, UBL, ENCODER_STEPS_PER_MENU_ITEM * GRID_MAX_POINTS_X, imgUp); + add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT - CONTROL_OFFSET - 32, UBL, - ENCODER_STEPS_PER_MENU_ITEM * GRID_MAX_POINTS_X, imgDown); + add_control(GRID_OFFSET_X + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, UBL, - ENCODER_STEPS_PER_MENU_ITEM, imgLeft); + add_control(GRID_OFFSET_X + GRID_WIDTH - CONTROL_OFFSET - 32, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, UBL, ENCODER_STEPS_PER_MENU_ITEM, imgRight); + add_control(320, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, CLICK, imgLeveling); + add_control(224, TFT_HEIGHT - 34, BACK, imgBack); + #endif + } +#endif // AUTO_BED_LEVELING_UBL + +#if ENABLED(BABYSTEP_ZPROBE_OFFSET) + #include "../../feature/babystep.h" +#endif + +#if HAS_BED_PROBE + #include "../../module/probe.h" +#endif + +#define Z_SELECTION_Z 1 +#define Z_SELECTION_Z_PROBE -1 + +struct MotionAxisState { + xy_int_t xValuePos, yValuePos, zValuePos, eValuePos, stepValuePos, zTypePos, eNamePos; + float currentStepSize = 10.0; + int z_selection = Z_SELECTION_Z; + uint8_t e_selection = 0; + bool blocked = false; + char message[32]; +}; + +MotionAxisState motionAxisState; + +#define E_BTN_COLOR COLOR_YELLOW +#define X_BTN_COLOR COLOR_CORAL_RED +#define Y_BTN_COLOR COLOR_VIVID_GREEN +#define Z_BTN_COLOR COLOR_LIGHT_BLUE + +#define BTN_WIDTH 64 +#define BTN_HEIGHT 52 +#define X_MARGIN 20 +#define Y_MARGIN 15 + +static void quick_feedback() { + #if HAS_CHIRP + ui.chirp(); // Buzz and wait. Is the delay needed for buttons to settle? + #if BOTH(HAS_LCD_MENU, USE_BEEPER) + for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } + #elif HAS_LCD_MENU + delay(10); + #endif + #endif +} + +#define CUR_STEP_VALUE_WIDTH 104 +static void drawCurStepValue() { + tft_string.set((uint8_t *)ftostr52sp(motionAxisState.currentStepSize)); + tft_string.add("mm"); + tft.canvas(motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(tft_string.center(CUR_STEP_VALUE_WIDTH), 0, COLOR_AXIS_HOMED, tft_string); +} + +static void drawCurZSelection() { + tft_string.set("Z"); + tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y, tft_string.width(), 34); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(0, 0, Z_BTN_COLOR, tft_string); + tft.queue.sync(); + tft_string.set("Offset"); + tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 34); + tft.set_background(COLOR_BACKGROUND); + if (motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { + tft.add_text(0, 0, Z_BTN_COLOR, tft_string); + } +} + +static void drawCurESelection() { + tft.canvas(motionAxisState.eNamePos.x, motionAxisState.eNamePos.y, BTN_WIDTH, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set("E"); + tft.add_text(0, 0, E_BTN_COLOR , tft_string); + tft.add_text(tft_string.width(), 0, E_BTN_COLOR, ui8tostr3rj(motionAxisState.e_selection)); +} + +static void drawMessage(const char *msg) { + tft.canvas(X_MARGIN, TFT_HEIGHT - Y_MARGIN - 34, TFT_HEIGHT / 2, 34); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(0, 0, COLOR_YELLOW, msg); +} + +static void drawAxisValue(const AxisEnum axis) { + const float value = ( + TERN_(HAS_BED_PROBE, axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE ? probe.offset.z :) + ui.manual_move.axis_value(axis) + ); + xy_int_t pos; + uint16_t color; + switch (axis) { + case X_AXIS: pos = motionAxisState.xValuePos; color = X_BTN_COLOR; break; + case Y_AXIS: pos = motionAxisState.yValuePos; color = Y_BTN_COLOR; break; + case Z_AXIS: pos = motionAxisState.zValuePos; color = Z_BTN_COLOR; break; + case E_AXIS: pos = motionAxisState.eValuePos; color = E_BTN_COLOR; break; + default: return; + } + tft.canvas(pos.x, pos.y, BTN_WIDTH + X_MARGIN, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(ftostr52sp(value)); + tft.add_text(0, 0, color, tft_string); +} + +static void moveAxis(const AxisEnum axis, const int8_t direction) { + quick_feedback(); + + #if ENABLED(PREVENT_COLD_EXTRUSION) + if (axis == E_AXIS && thermalManager.tooColdToExtrude(motionAxisState.e_selection)) { + drawMessage("Too cold"); + return; + } + #endif + + const float diff = motionAxisState.currentStepSize * direction; + + if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z; + const bool do_probe = DISABLED(BABYSTEP_HOTEND_Z_OFFSET) || active_extruder == 0; + const float bsDiff = planner.mm_per_step[Z_AXIS] * babystep_increment, + new_probe_offset = probe.offset.z + bsDiff, + new_offs = TERN(BABYSTEP_HOTEND_Z_OFFSET + , do_probe ? new_probe_offset : hotend_offset[active_extruder].z - bsDiff + , new_probe_offset + ); + if (WITHIN(new_offs, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) { + babystep.add_steps(Z_AXIS, babystep_increment); + if (do_probe) + probe.offset.z = new_offs; + else + TERN(BABYSTEP_HOTEND_Z_OFFSET, hotend_offset[active_extruder].z = new_offs, NOOP); + drawMessage(""); // clear the error + drawAxisValue(axis); + } + else { + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + #elif HAS_BED_PROBE + // only change probe.offset.z + probe.offset.z += diff; + if (direction < 0 && current_position[axis] < Z_PROBE_OFFSET_RANGE_MIN) { + current_position[axis] = Z_PROBE_OFFSET_RANGE_MIN; + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + else if (direction > 0 && current_position[axis] > Z_PROBE_OFFSET_RANGE_MAX) { + current_position[axis] = Z_PROBE_OFFSET_RANGE_MAX; + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + else { + drawMessage(""); // clear the error + } + drawAxisValue(axis); + #endif + return; + } + + if (!ui.manual_move.processing) { + // Get motion limit from software endstops, if any + float min, max; + soft_endstop.get_manual_axis_limits(axis, min, max); + + // Delta limits XY based on the current offset from center + // This assumes the center is 0,0 + #if ENABLED(DELTA) + if (axis != Z_AXIS && axis != E_AXIS) { + max = SQRT(sq((float)(DELTA_PRINTABLE_RADIUS)) - sq(current_position[Y_AXIS - axis])); // (Y_AXIS - axis) == the other axis + min = -max; + } + #endif + + // Get the new position + const bool limited = ui.manual_move.apply_diff(axis, diff, min, max); + #if IS_KINEMATIC + UNUSED(limited); + #else + PGM_P const msg = limited ? GET_TEXT(MSG_LCD_SOFT_ENDSTOPS) : NUL_STR; + drawMessage(msg); + #endif + + ui.manual_move.soon(axis OPTARG(MULTI_E_MANUAL, motionAxisState.e_selection)); + } + + drawAxisValue(axis); +} + +static void e_plus() { moveAxis(E_AXIS, 1); } +static void e_minus() { moveAxis(E_AXIS, -1); } +static void x_minus() { moveAxis(X_AXIS, -1); } +static void x_plus() { moveAxis(X_AXIS, 1); } +static void y_plus() { moveAxis(Y_AXIS, 1); } +static void y_minus() { moveAxis(Y_AXIS, -1); } +static void z_plus() { moveAxis(Z_AXIS, 1); } +static void z_minus() { moveAxis(Z_AXIS, -1); } + +#if ENABLED(TOUCH_SCREEN) + static void e_select() { + motionAxisState.e_selection++; + if (motionAxisState.e_selection >= EXTRUDERS) { + motionAxisState.e_selection = 0; + } + + quick_feedback(); + drawCurESelection(); + drawAxisValue(E_AXIS); + } + + static void do_home() { + quick_feedback(); + drawMessage(GET_TEXT(MSG_LEVEL_BED_HOMING)); + queue.inject_P(G28_STR); + // Disable touch until home is done + TERN_(TOUCH_SCREEN, touch.disable()); + drawAxisValue(E_AXIS); + drawAxisValue(X_AXIS); + drawAxisValue(Y_AXIS); + drawAxisValue(Z_AXIS); + } + + static void step_size() { + motionAxisState.currentStepSize = motionAxisState.currentStepSize / 10.0; + if (motionAxisState.currentStepSize < 0.0015) motionAxisState.currentStepSize = 10.0; + quick_feedback(); + drawCurStepValue(); + } +#endif + +#if HAS_BED_PROBE + static void z_select() { + motionAxisState.z_selection *= -1; + quick_feedback(); + drawCurZSelection(); + drawAxisValue(Z_AXIS); + } +#endif + +static void disable_steppers() { + quick_feedback(); + queue.inject_P(PSTR("M84")); +} + +static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) { + uint16_t width = Images[imgBtn52Rounded].width; + uint16_t height = Images[imgBtn52Rounded].height; + + if (!enabled) bgColor = COLOR_CONTROL_DISABLED; + + tft.canvas(x, y, width, height); + tft.set_background(COLOR_BACKGROUND); + tft.add_image(0, 0, imgBtn52Rounded, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); + + // TODO: Make an add_text() taking a font arg + if (label) { + tft_string.set(label); + tft_string.trim(); + tft.add_text(tft_string.center(width), height / 2 - tft_string.font_height() / 2, bgColor, tft_string); + } + else { + tft.add_image(0, 0, img, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); + } + + TERN_(TOUCH_SCREEN, if (enabled) touch.add_control(BUTTON, x, y, width, height, data)); +} + +void MarlinUI::move_axis_screen() { + // Reset + defer_status_screen(true); + motionAxisState.blocked = false; + TERN_(TOUCH_SCREEN, touch.enable()); + + ui.clear_lcd(); + + TERN_(TOUCH_SCREEN, touch.clear()); + + const bool busy = printingIsActive(); + + // Babysteps during printing? Select babystep for Z probe offset + if (busy && ENABLED(BABYSTEP_ZPROBE_OFFSET)) + motionAxisState.z_selection = Z_SELECTION_Z_PROBE; + + // ROW 1 -> E- Y- CurY Z+ + int x = X_MARGIN, y = Y_MARGIN, spacing = 0; + + drawBtn(x, y, "E+", (intptr_t)e_plus, imgUp, E_BTN_COLOR, !busy); + + spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; + x += BTN_WIDTH + spacing; + drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy); + + // Cur Y + x += BTN_WIDTH; + motionAxisState.yValuePos.x = x + 2; + motionAxisState.yValuePos.y = y; + drawAxisValue(Y_AXIS); + + x += spacing; + drawBtn(x, y, "Z+", (intptr_t)z_plus, imgUp, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step + + // ROW 2 -> "Ex" X- HOME X+ "Z" + y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3; + x = X_MARGIN; + spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; + + motionAxisState.eNamePos.x = x; + motionAxisState.eNamePos.y = y; + drawCurESelection(); + TERN_(TOUCH_SCREEN, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select)); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy); + + x += BTN_WIDTH + spacing; //imgHome is 64x64 + TERN_(TOUCH_SCREEN, add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy)); + + x += BTN_WIDTH + spacing; + uint16_t xplus_x = x; + drawBtn(x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy); + + x += BTN_WIDTH + spacing; + motionAxisState.zTypePos.x = x; + motionAxisState.zTypePos.y = y; + drawCurZSelection(); + #if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) + if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select); + #endif + + // ROW 3 -> E- CurX Y- Z- + y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3; + x = X_MARGIN; + spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; + + drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy); + + // Cur E + motionAxisState.eValuePos.x = x; + motionAxisState.eValuePos.y = y + BTN_HEIGHT + 2; + drawAxisValue(E_AXIS); + + // Cur X + motionAxisState.xValuePos.x = BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; //X- pos + motionAxisState.xValuePos.y = y - 10; + drawAxisValue(X_AXIS); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "Z-", (intptr_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step + + // Cur Z + motionAxisState.zValuePos.x = x; + motionAxisState.zValuePos.y = y + BTN_HEIGHT + 2; + drawAxisValue(Z_AXIS); + + // ROW 4 -> step_size disable steppers back + y = TFT_HEIGHT - Y_MARGIN - 32; // + x = TFT_WIDTH / 2 - CUR_STEP_VALUE_WIDTH / 2; + motionAxisState.stepValuePos.x = x; + motionAxisState.stepValuePos.y = y; + if (!busy) { + drawCurStepValue(); + TERN_(TOUCH_SCREEN, touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (intptr_t)step_size)); + } + + // aligned with x+ + drawBtn(xplus_x, TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT, "off", (intptr_t)disable_steppers, imgCancel, COLOR_WHITE, !busy); + + TERN_(TOUCH_SCREEN, add_control(TFT_WIDTH - X_MARGIN - BTN_WIDTH, y, BACK, imgBack)); +} + +#endif // HAS_UI_480x320 diff --git a/Marlin/src/lcd/tft/ui_1024x600.h b/Marlin/src/lcd/tft/ui_1024x600.h new file mode 100644 index 000000000000..dd8c1cc6ec47 --- /dev/null +++ b/Marlin/src/lcd/tft/ui_1024x600.h @@ -0,0 +1,43 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define MARLIN_LOGO_FULL_SIZE MarlinLogo480x320x16 + +#include "ui_common.h" + +#define TFT_STATUS_TOP_Y 4 +#define TFT_TOP_LINE_Y 4 + +#define MENU_TEXT_X_OFFSET 16 +#define MENU_TEXT_Y_OFFSET 7 + +#define MENU_ITEM_ICON_X 5 +#define MENU_ITEM_ICON_Y 5 +#define MENU_ITEM_ICON_SPACE 42 + +#define MENU_FONT_NAME Helvetica18 +#define SYMBOLS_FONT_NAME Helvetica18_symbols +#define MENU_ITEM_HEIGHT 43 +#define FONT_LINE_HEIGHT 34 + +#define MENU_LINE_HEIGHT (MENU_ITEM_HEIGHT + 2) diff --git a/Marlin/src/lcd/tft/ui_320x240.cpp b/Marlin/src/lcd/tft/ui_320x240.cpp index eadd09ef27ec..15d477c4854d 100644 --- a/Marlin/src/lcd/tft/ui_320x240.cpp +++ b/Marlin/src/lcd/tft/ui_320x240.cpp @@ -47,6 +47,7 @@ void MarlinUI::tft_idle() { #if ENABLED(TOUCH_SCREEN) + if (TERN0(HAS_TOUCH_SLEEP, lcd_sleep_task())) return; if (draw_menu_navigation) { add_control(48, 206, PAGE_UP, imgPageUp, encoderTopLine > 0); add_control(240, 206, PAGE_DOWN, imgPageDown, encoderTopLine + LCD_HEIGHT < screen_items); @@ -60,6 +61,7 @@ void MarlinUI::tft_idle() { } #if ENABLED(SHOW_BOOTSCREEN) + void MarlinUI::show_bootscreen() { tft.queue.reset(); @@ -81,9 +83,13 @@ void MarlinUI::tft_idle() { #endif tft.queue.sync(); - safe_delay(BOOTSCREEN_TIMEOUT); + } + + void MarlinUI::bootscreen_completion(const millis_t sofar) { + if ((BOOTSCREEN_TIMEOUT) > sofar) safe_delay((BOOTSCREEN_TIMEOUT) - sofar); clear_lcd(); } + #endif void MarlinUI::draw_kill_screen() { @@ -114,21 +120,21 @@ void MarlinUI::draw_kill_screen() { void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { MarlinImage image = imgHotEnd; uint16_t Color; - float currentTemperature, targetTemperature; + celsius_t currentTemperature, targetTemperature; if (Heater >= 0) { // HotEnd - currentTemperature = thermalManager.degHotend(Heater); + currentTemperature = thermalManager.wholeDegHotend(Heater); targetTemperature = thermalManager.degTargetHotend(Heater); } #if HAS_HEATED_BED else if (Heater == H_BED) { - currentTemperature = thermalManager.degBed(); + currentTemperature = thermalManager.wholeDegBed(); targetTemperature = thermalManager.degTargetBed(); } #endif #if HAS_TEMP_CHAMBER else if (Heater == H_CHAMBER) { - currentTemperature = thermalManager.degChamber(); + currentTemperature = thermalManager.wholeDegChamber(); #if HAS_HEATED_CHAMBER targetTemperature = thermalManager.degTargetChamber(); #else @@ -136,6 +142,12 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { #endif } #endif + #if HAS_TEMP_COOLER + else if (Heater == H_COOLER) { + currentTemperature = thermalManager.wholeDegCooler(); + targetTemperature = TERN(HAS_COOLER, thermalManager.degTargetCooler(), ABSOLUTE_ZERO); + } + #endif else return; TERN_(TOUCH_SCREEN, if (targetTemperature >= 0) touch.add_control(HEATER, x, y, 64, 100, Heater)); @@ -159,16 +171,23 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { image = targetTemperature > 0 ? imgChamberHeated : imgChamber; } #endif + #if HAS_TEMP_COOLER + else if (Heater == H_COOLER) { + if (currentTemperature <= 26) Color = COLOR_COLD; + if (currentTemperature > 26) Color = COLOR_RED; + image = targetTemperature > 26 ? imgCoolerHot : imgCooler; + } + #endif tft.add_image(0, 18, image, Color); - tft_string.set((uint8_t *)i16tostr3rj(currentTemperature + 0.5)); + tft_string.set((uint8_t *)i16tostr3rj(currentTemperature)); tft_string.add(LCD_STR_DEGREE); tft_string.trim(); tft.add_text(tft_string.center(64) + 2, 72, Color, tft_string); if (targetTemperature >= 0) { - tft_string.set((uint8_t *)i16tostr3rj(targetTemperature + 0.5)); + tft_string.set((uint8_t *)i16tostr3rj(targetTemperature)); tft_string.add(LCD_STR_DEGREE); tft_string.trim(); tft.add_text(tft_string.center(64) + 2, 8, Color, tft_string); @@ -223,6 +242,9 @@ void MarlinUI::draw_status_screen() { #ifdef ITEM_CHAMBER case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break; #endif + #ifdef ITEM_COOLER + case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break; + #endif #ifdef ITEM_FAN case ITEM_FAN: draw_fan_status(x, y, blink); break; #endif @@ -260,6 +282,7 @@ void MarlinUI::draw_status_screen() { offset -= tft_string.width(); } tft.add_text(301 - tft_string.width() - offset, 3, not_homed ? COLOR_AXIS_NOT_HOMED : COLOR_AXIS_HOMED, tft_string); + TERN_(TOUCH_SCREEN, touch.add_control(MOVE_AXIS, 0, 103, 312, 24)); // feed rate tft.canvas(70, 136, 80, 32); @@ -313,7 +336,7 @@ void MarlinUI::draw_status_screen() { } // Low-level draw_edit_screen can be used to draw an edit screen from anyplace -void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { +void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) { ui.encoder_direction_normal(); TERN_(TOUCH_SCREEN, touch.clear()); @@ -336,16 +359,16 @@ void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const valu menu_line(line - 1); tft_string.set(X_LBL); - tft.add_text(52, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); + tft.add_text(TFT_WIDTH / 2 - 120, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); tft_string.set(ftostr52(LOGICAL_X_POSITION(current_position.x))); tft_string.trim(); - tft.add_text(144 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + tft.add_text(TFT_WIDTH / 2 - 16 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); tft_string.set(Y_LBL); - tft.add_text(176, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); + tft.add_text(TFT_WIDTH / 2 + 16, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); tft_string.set(ftostr52(LOGICAL_X_POSITION(current_position.y))); tft_string.trim(); - tft.add_text(268 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); + tft.add_text(TFT_WIDTH / 2 + 120 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); } #endif @@ -375,9 +398,9 @@ void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const valu void TFT::draw_edit_screen_buttons() { #if ENABLED(TOUCH_SCREEN) - add_control(32, 176, DECREASE, imgDecrease); - add_control(224, 176, INCREASE, imgIncrease); - add_control(128, 176, CLICK, imgConfirm); + add_control(32, TFT_HEIGHT - 64, DECREASE, imgDecrease); + add_control(224, TFT_HEIGHT - 64, INCREASE, imgIncrease); + add_control(128, TFT_HEIGHT - 64, CLICK, imgConfirm); #endif } @@ -406,8 +429,8 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); } #if ENABLED(TOUCH_SCREEN) - add_control(48, 176, CANCEL, imgCancel, true, yesno ? HALF(COLOR_CONTROL_CANCEL) : COLOR_CONTROL_CANCEL); - add_control(208, 176, CONFIRM, imgConfirm, true, yesno ? COLOR_CONTROL_CONFIRM : HALF(COLOR_CONTROL_CONFIRM)); + add_control(48, TFT_HEIGHT - 64, CANCEL, imgCancel, true, yesno ? HALF(COLOR_CONTROL_CANCEL) : COLOR_CONTROL_CANCEL); + add_control(208, TFT_HEIGHT - 64, CONFIRM, imgConfirm, true, yesno ? COLOR_CONTROL_CONFIRM : HALF(COLOR_CONTROL_CONFIRM)); #endif } @@ -417,7 +440,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const #if ENABLED(TOUCH_SCREEN) touch.clear(); draw_menu_navigation = false; - touch.add_control(RESUME_CONTINUE , 0, 0, 320, 240); + touch.add_control(RESUME_CONTINUE , 0, 0, TFT_WIDTH, TFT_HEIGHT); #endif menu_line(row); @@ -425,7 +448,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const tft_string.add('E'); tft_string.add((char)('1' + extruder)); tft_string.add(' '); - tft_string.add(i16tostr3rj(thermalManager.degHotend(extruder))); + tft_string.add(i16tostr3rj(thermalManager.wholeDegHotend(extruder))); tft_string.add(LCD_STR_DEGREE); tft_string.add(" / "); tft_string.add(i16tostr3rj(thermalManager.degTargetHotend(extruder))); @@ -449,17 +472,17 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const tft.set_background(COLOR_BACKGROUND); tft.add_rectangle(0, 0, GRID_WIDTH, GRID_HEIGHT, COLOR_WHITE); - for (uint16_t x = 0; x < GRID_MAX_POINTS_X ; x++) - for (uint16_t y = 0; y < GRID_MAX_POINTS_Y ; y++) + for (uint16_t x = 0; x < (GRID_MAX_POINTS_X); x++) + for (uint16_t y = 0; y < (GRID_MAX_POINTS_Y); y++) if (position_is_reachable({ ubl.mesh_index_to_xpos(x), ubl.mesh_index_to_ypos(y) })) - tft.add_bar(1 + (x * 2 + 1) * (GRID_WIDTH - 4) / GRID_MAX_POINTS_X / 2, GRID_HEIGHT - 3 - ((y * 2 + 1) * (GRID_HEIGHT - 4) / GRID_MAX_POINTS_Y / 2), 2, 2, COLOR_UBL); + tft.add_bar(1 + (x * 2 + 1) * (GRID_WIDTH - 4) / (GRID_MAX_POINTS_X) / 2, GRID_HEIGHT - 3 - ((y * 2 + 1) * (GRID_HEIGHT - 4) / (GRID_MAX_POINTS_Y) / 2), 2, 2, COLOR_UBL); - tft.add_rectangle((x_plot * 2 + 1) * (GRID_WIDTH - 4) / GRID_MAX_POINTS_X / 2 - 1, GRID_HEIGHT - 5 - ((y_plot * 2 + 1) * (GRID_HEIGHT - 4) / GRID_MAX_POINTS_Y / 2), 6, 6, COLOR_UBL); + tft.add_rectangle((x_plot * 2 + 1) * (GRID_WIDTH - 4) / (GRID_MAX_POINTS_X) / 2 - 1, GRID_HEIGHT - 5 - ((y_plot * 2 + 1) * (GRID_HEIGHT - 4) / (GRID_MAX_POINTS_Y) / 2), 6, 6, COLOR_UBL); const xy_pos_t pos = { ubl.mesh_index_to_xpos(x_plot), ubl.mesh_index_to_ypos(y_plot) }, lpos = pos.asLogical(); - tft.canvas(216, GRID_OFFSET_Y + (GRID_HEIGHT - 32) / 2 - 32, 96, 32); + tft.canvas(216, GRID_OFFSET_Y + (GRID_HEIGHT - MENU_ITEM_HEIGHT) / 2 - MENU_ITEM_HEIGHT, 96, MENU_ITEM_HEIGHT); tft.set_background(COLOR_BACKGROUND); tft_string.set(X_LBL); tft.add_text(0, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); @@ -467,7 +490,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const tft_string.trim(); tft.add_text(96 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); - tft.canvas(216, GRID_OFFSET_Y + (GRID_HEIGHT - 32) / 2, 96, 32); + tft.canvas(216, GRID_OFFSET_Y + (GRID_HEIGHT - MENU_ITEM_HEIGHT) / 2, 96, MENU_ITEM_HEIGHT); tft.set_background(COLOR_BACKGROUND); tft_string.set(Y_LBL); tft.add_text(0, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); @@ -475,7 +498,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const tft_string.trim(); tft.add_text(96 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); - tft.canvas(216, GRID_OFFSET_Y + (GRID_HEIGHT - 32) / 2 + 32, 96, 32); + tft.canvas(216, GRID_OFFSET_Y + (GRID_HEIGHT - MENU_ITEM_HEIGHT) / 2 + MENU_ITEM_HEIGHT, 96, MENU_ITEM_HEIGHT); tft.set_background(COLOR_BACKGROUND); tft_string.set(Z_LBL); tft.add_text(0, MENU_TEXT_Y_OFFSET, COLOR_MENU_TEXT, tft_string); @@ -484,13 +507,13 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const tft.add_text(96 - tft_string.width(), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); constexpr uint8_t w = (TFT_WIDTH) / 10; - tft.canvas(GRID_OFFSET_X + (GRID_WIDTH - w) / 2, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET - 1, w, 32); + tft.canvas(GRID_OFFSET_X + (GRID_WIDTH - w) / 2, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET - 1, w, MENU_ITEM_HEIGHT); tft.set_background(COLOR_BACKGROUND); tft_string.set(ui8tostr3rj(x_plot)); tft_string.trim(); tft.add_text(tft_string.center(w), MENU_TEXT_Y_OFFSET, COLOR_MENU_VALUE, tft_string); - tft.canvas(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + (GRID_HEIGHT - 27) / 2, w, 32); + tft.canvas(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + (GRID_HEIGHT - 27) / 2, w, MENU_ITEM_HEIGHT); tft.set_background(COLOR_BACKGROUND); tft_string.set(ui8tostr3rj(y_plot)); tft_string.trim(); @@ -499,9 +522,9 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const #if ENABLED(TOUCH_SCREEN) touch.clear(); draw_menu_navigation = false; - add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + CONTROL_OFFSET, UBL, ENCODER_STEPS_PER_MENU_ITEM * GRID_MAX_POINTS_X, imgUp); - add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT - CONTROL_OFFSET - 32, UBL, - ENCODER_STEPS_PER_MENU_ITEM * GRID_MAX_POINTS_X, imgDown); - add_control(GRID_OFFSET_X + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, UBL, - ENCODER_STEPS_PER_MENU_ITEM, imgLeft); + add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + CONTROL_OFFSET, UBL, (ENCODER_STEPS_PER_MENU_ITEM) * (GRID_MAX_POINTS_X), imgUp); + add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT - CONTROL_OFFSET - 32, UBL, -(ENCODER_STEPS_PER_MENU_ITEM) * (GRID_MAX_POINTS_X), imgDown); + add_control(GRID_OFFSET_X + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, UBL, -(ENCODER_STEPS_PER_MENU_ITEM), imgLeft); add_control(GRID_OFFSET_X + GRID_WIDTH - CONTROL_OFFSET - 32, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, UBL, ENCODER_STEPS_PER_MENU_ITEM, imgRight); add_control(224, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, CLICK, imgLeveling); add_control(144, 206, BACK, imgBack); @@ -509,7 +532,374 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const } #endif // AUTO_BED_LEVELING_UBL +#if ENABLED(BABYSTEP_ZPROBE_OFFSET) + #include "../../feature/babystep.h" +#endif + +#if HAS_BED_PROBE + #include "../../module/probe.h" +#endif + +#define Z_SELECTION_Z 1 +#define Z_SELECTION_Z_PROBE -1 + +struct MotionAxisState { + xy_int_t xValuePos, yValuePos, zValuePos, eValuePos, stepValuePos, zTypePos, eNamePos; + float currentStepSize = 10.0; + int z_selection = Z_SELECTION_Z; + uint8_t e_selection = 0; + bool blocked = false; + char message[32]; +}; + +MotionAxisState motionAxisState; + +#define E_BTN_COLOR COLOR_YELLOW +#define X_BTN_COLOR COLOR_CORAL_RED +#define Y_BTN_COLOR COLOR_VIVID_GREEN +#define Z_BTN_COLOR COLOR_LIGHT_BLUE + +#define BTN_WIDTH 48 +#define BTN_HEIGHT 39 +#define X_MARGIN 15 +#define Y_MARGIN 11 + +static void quick_feedback() { + #if HAS_CHIRP + ui.chirp(); // Buzz and wait. Is the delay needed for buttons to settle? + #if BOTH(HAS_LCD_MENU, USE_BEEPER) + for (int8_t i = 5; i--;) { buzzer.tick(); delay(2); } + #elif HAS_LCD_MENU + delay(10); + #endif + #endif +} + +#define CUR_STEP_VALUE_WIDTH 38 +static void drawCurStepValue() { + tft_string.set((uint8_t *)ftostr52sp(motionAxisState.currentStepSize)); + tft.canvas(motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, 20); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(CUR_STEP_VALUE_WIDTH - tft_string.width(), 0, COLOR_AXIS_HOMED, tft_string); + tft.queue.sync(); + tft_string.set("mm"); + tft.canvas(motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y + 20, CUR_STEP_VALUE_WIDTH, 20); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(CUR_STEP_VALUE_WIDTH - tft_string.width(), 0, COLOR_AXIS_HOMED, tft_string); +} + +static void drawCurZSelection() { + tft_string.set("Z"); + tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y, tft_string.width(), 20); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(0, 0, Z_BTN_COLOR, tft_string); + tft.queue.sync(); + tft_string.set("Offset"); + tft.canvas(motionAxisState.zTypePos.x, motionAxisState.zTypePos.y + 34, tft_string.width(), 20); + tft.set_background(COLOR_BACKGROUND); + if (motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { + tft.add_text(0, 0, Z_BTN_COLOR, tft_string); + } +} + +static void drawCurESelection() { + tft.canvas(motionAxisState.eNamePos.x, motionAxisState.eNamePos.y, BTN_WIDTH, BTN_HEIGHT); + tft.set_background(COLOR_BACKGROUND); + tft_string.set("E"); + tft.add_text(0, 0, E_BTN_COLOR , tft_string); + tft.add_text(tft_string.width(), 0, E_BTN_COLOR, ui8tostr3rj(motionAxisState.e_selection)); +} + +static void drawMessage(const char *msg) { + tft.canvas(X_MARGIN, TFT_HEIGHT - Y_MARGIN - 29, (TFT_WIDTH / 2) - (BTN_WIDTH / 2) - X_MARGIN, 20); + tft.set_background(COLOR_BACKGROUND); + tft.add_text(0, 0, COLOR_YELLOW, msg); +} + +static void drawAxisValue(const AxisEnum axis) { + const float value = ( + TERN_(HAS_BED_PROBE, axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE ? probe.offset.z :) + ui.manual_move.axis_value(axis) + ); + xy_int_t pos; + uint16_t color; + switch (axis) { + case X_AXIS: pos = motionAxisState.xValuePos; color = X_BTN_COLOR; break; + case Y_AXIS: pos = motionAxisState.yValuePos; color = Y_BTN_COLOR; break; + case Z_AXIS: pos = motionAxisState.zValuePos; color = Z_BTN_COLOR; break; + case E_AXIS: pos = motionAxisState.eValuePos; color = E_BTN_COLOR; break; + default: return; + } + tft.canvas(pos.x, pos.y, BTN_WIDTH + X_MARGIN, 20); + tft.set_background(COLOR_BACKGROUND); + tft_string.set(ftostr52sp(value)); + tft.add_text(0, 0, color, tft_string); +} + +static void moveAxis(const AxisEnum axis, const int8_t direction) { + quick_feedback(); + + #if ENABLED(PREVENT_COLD_EXTRUSION) + if (axis == E_AXIS && thermalManager.tooColdToExtrude(motionAxisState.e_selection)) { + drawMessage("Too cold"); + return; + } + #endif + + const float diff = motionAxisState.currentStepSize * direction; + + if (axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE) { + #if ENABLED(BABYSTEP_ZPROBE_OFFSET) + const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z; + const bool do_probe = DISABLED(BABYSTEP_HOTEND_Z_OFFSET) || active_extruder == 0; + const float bsDiff = planner.mm_per_step[Z_AXIS] * babystep_increment, + new_probe_offset = probe.offset.z + bsDiff, + new_offs = TERN(BABYSTEP_HOTEND_Z_OFFSET + , do_probe ? new_probe_offset : hotend_offset[active_extruder].z - bsDiff + , new_probe_offset + ); + if (WITHIN(new_offs, Z_PROBE_OFFSET_RANGE_MIN, Z_PROBE_OFFSET_RANGE_MAX)) { + babystep.add_steps(Z_AXIS, babystep_increment); + if (do_probe) + probe.offset.z = new_offs; + else + TERN(BABYSTEP_HOTEND_Z_OFFSET, hotend_offset[active_extruder].z = new_offs, NOOP); + drawMessage(""); // clear the error + drawAxisValue(axis); + } + else { + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + #elif HAS_BED_PROBE + // only change probe.offset.z + probe.offset.z += diff; + if (direction < 0 && current_position[axis] < Z_PROBE_OFFSET_RANGE_MIN) { + current_position[axis] = Z_PROBE_OFFSET_RANGE_MIN; + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + else if (direction > 0 && current_position[axis] > Z_PROBE_OFFSET_RANGE_MAX) { + current_position[axis] = Z_PROBE_OFFSET_RANGE_MAX; + drawMessage(GET_TEXT(MSG_LCD_SOFT_ENDSTOPS)); + } + else { + drawMessage(""); // clear the error + } + drawAxisValue(axis); + #endif + return; + } + + if (!ui.manual_move.processing) { + // Get motion limit from software endstops, if any + float min, max; + soft_endstop.get_manual_axis_limits(axis, min, max); + + // Delta limits XY based on the current offset from center + // This assumes the center is 0,0 + #if ENABLED(DELTA) + if (axis != Z_AXIS && axis != E_AXIS) { + max = SQRT(sq((float)(DELTA_PRINTABLE_RADIUS)) - sq(current_position[Y_AXIS - axis])); // (Y_AXIS - axis) == the other axis + min = -max; + } + #endif + + // Get the new position + const bool limited = ui.manual_move.apply_diff(axis, diff, min, max); + #if IS_KINEMATIC + UNUSED(limited); + #else + PGM_P const msg = limited ? GET_TEXT(MSG_LCD_SOFT_ENDSTOPS) : NUL_STR; + drawMessage(msg); + #endif + + ui.manual_move.soon(axis OPTARG(MULTI_E_MANUAL, motionAxisState.e_selection)); + } + + drawAxisValue(axis); +} + +static void e_plus() { moveAxis(E_AXIS, 1); } +static void e_minus() { moveAxis(E_AXIS, -1); } +static void x_minus() { moveAxis(X_AXIS, -1); } +static void x_plus() { moveAxis(X_AXIS, 1); } +static void y_plus() { moveAxis(Y_AXIS, 1); } +static void y_minus() { moveAxis(Y_AXIS, -1); } +static void z_plus() { moveAxis(Z_AXIS, 1); } +static void z_minus() { moveAxis(Z_AXIS, -1); } + +#if ENABLED(TOUCH_SCREEN) + static void e_select() { + motionAxisState.e_selection++; + if (motionAxisState.e_selection >= EXTRUDERS) { + motionAxisState.e_selection = 0; + } + + quick_feedback(); + drawCurESelection(); + drawAxisValue(E_AXIS); + } + + static void do_home() { + quick_feedback(); + drawMessage(GET_TEXT(MSG_LEVEL_BED_HOMING)); + queue.inject_P(G28_STR); + // Disable touch until home is done + TERN_(HAS_TFT_XPT2046, touch.disable()); + drawAxisValue(E_AXIS); + drawAxisValue(X_AXIS); + drawAxisValue(Y_AXIS); + drawAxisValue(Z_AXIS); + } + + static void step_size() { + motionAxisState.currentStepSize = motionAxisState.currentStepSize / 10.0; + if (motionAxisState.currentStepSize < 0.0015) motionAxisState.currentStepSize = 10.0; + quick_feedback(); + drawCurStepValue(); + } +#endif + +#if HAS_BED_PROBE + static void z_select() { + motionAxisState.z_selection *= -1; + quick_feedback(); + drawCurZSelection(); + drawAxisValue(Z_AXIS); + } +#endif + +static void disable_steppers() { + quick_feedback(); + queue.inject_P(PSTR("M84")); +} + +static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) { + uint16_t width = Images[imgBtn39Rounded].width; + uint16_t height = Images[imgBtn39Rounded].height; + + if (!enabled) bgColor = COLOR_CONTROL_DISABLED; + + tft.canvas(x, y, width, height); + tft.set_background(COLOR_BACKGROUND); + tft.add_image(0, 0, imgBtn39Rounded, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); + + // TODO: Make an add_text() taking a font arg + if (label) { + tft_string.set(label); + tft_string.trim(); + tft.add_text(tft_string.center(width), height / 2 - tft_string.font_height() / 2, bgColor, tft_string); + } + else { + tft.add_image(0, 0, img, bgColor, COLOR_BACKGROUND, COLOR_DARKGREY); + } + + TERN_(HAS_TFT_XPT2046, if (enabled) touch.add_control(BUTTON, x, y, width, height, data)); +} void MarlinUI::move_axis_screen() { + // Reset + defer_status_screen(true); + motionAxisState.blocked = false; + TERN_(HAS_TFT_XPT2046, touch.enable()); + + ui.clear_lcd(); + + TERN_(TOUCH_SCREEN, touch.clear()); + + const bool busy = printingIsActive(); + + // Babysteps during printing? Select babystep for Z probe offset + if (busy && ENABLED(BABYSTEP_ZPROBE_OFFSET)) + motionAxisState.z_selection = Z_SELECTION_Z_PROBE; + + // ROW 1 -> E- Y- CurY Z+ + int x = X_MARGIN, y = Y_MARGIN, spacing = 0; + + drawBtn(x, y, "E+", (intptr_t)e_plus, imgUp, E_BTN_COLOR, !busy); + + spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; + x += BTN_WIDTH + spacing; + uint16_t yplus_x = x; + drawBtn(x, y, "Y+", (intptr_t)y_plus, imgUp, Y_BTN_COLOR, !busy); + + // Cur Y + x += BTN_WIDTH; + motionAxisState.yValuePos.x = x + 2; + motionAxisState.yValuePos.y = y; + drawAxisValue(Y_AXIS); + + x += spacing; + drawBtn(x, y, "Z+", (intptr_t)z_plus, imgUp, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step + + // ROW 2 -> "Ex" X- HOME X+ "Z" + y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3; + x = X_MARGIN; + spacing = (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; + + motionAxisState.eNamePos.x = x; + motionAxisState.eNamePos.y = y; + drawCurESelection(); + TERN_(HAS_TFT_XPT2046, if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, BTN_HEIGHT, (intptr_t)e_select)); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "X-", (intptr_t)x_minus, imgLeft, X_BTN_COLOR, !busy); + + x += BTN_WIDTH + spacing; //imgHome is 64x64 + TERN_(HAS_TFT_XPT2046, add_control(TFT_WIDTH / 2 - Images[imgHome].width / 2, y - (Images[imgHome].width - BTN_HEIGHT) / 2, BUTTON, (intptr_t)do_home, imgHome, !busy)); + + x += BTN_WIDTH + spacing; + uint16_t xplus_x = x; + drawBtn(x, y, "X+", (intptr_t)x_plus, imgRight, X_BTN_COLOR, !busy); + + x += BTN_WIDTH + spacing; + motionAxisState.zTypePos.x = x; + motionAxisState.zTypePos.y = y; + drawCurZSelection(); + #if BOTH(HAS_BED_PROBE, TOUCH_SCREEN) + if (!busy) touch.add_control(BUTTON, x, y, BTN_WIDTH, 34 * 2, (intptr_t)z_select); + #endif + + // ROW 3 -> E- CurX Y- Z- + y += BTN_HEIGHT + (TFT_HEIGHT - Y_MARGIN * 2 - 4 * BTN_HEIGHT) / 3; + x = X_MARGIN; + spacing = (TFT_WIDTH - X_MARGIN * 2 - 3 * BTN_WIDTH) / 2; + + drawBtn(x, y, "E-", (intptr_t)e_minus, imgDown, E_BTN_COLOR, !busy); + + // Cur E + motionAxisState.eValuePos.x = x; + motionAxisState.eValuePos.y = y + BTN_HEIGHT + 2; + drawAxisValue(E_AXIS); + + // Cur X + motionAxisState.xValuePos.x = BTN_WIDTH + (TFT_WIDTH - X_MARGIN * 2 - 5 * BTN_WIDTH) / 4; //X- pos + motionAxisState.xValuePos.y = y - 10; + drawAxisValue(X_AXIS); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "Y-", (intptr_t)y_minus, imgDown, Y_BTN_COLOR, !busy); + + x += BTN_WIDTH + spacing; + drawBtn(x, y, "Z-", (intptr_t)z_minus, imgDown, Z_BTN_COLOR, !busy || ENABLED(BABYSTEP_ZPROBE_OFFSET)); //only enabled when not busy or have baby step + + // Cur Z + motionAxisState.zValuePos.x = x; + motionAxisState.zValuePos.y = y + BTN_HEIGHT + 2; + drawAxisValue(Z_AXIS); + + // ROW 4 -> step_size disable steppers back + y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT; // + x = xplus_x - CUR_STEP_VALUE_WIDTH - 10; + motionAxisState.stepValuePos.x = yplus_x + BTN_WIDTH - CUR_STEP_VALUE_WIDTH; + motionAxisState.stepValuePos.y = TFT_HEIGHT - Y_MARGIN - BTN_HEIGHT; + if (!busy) { + drawCurStepValue(); + TERN_(HAS_TFT_XPT2046, touch.add_control(BUTTON, motionAxisState.stepValuePos.x, motionAxisState.stepValuePos.y, CUR_STEP_VALUE_WIDTH, BTN_HEIGHT, (intptr_t)step_size)); + } + + // aligned with x+ + drawBtn(xplus_x, y, "off", (intptr_t)disable_steppers, imgCancel, COLOR_WHITE, !busy); + + TERN_(HAS_TFT_XPT2046, add_control(TFT_WIDTH - X_MARGIN - BTN_WIDTH, y, BACK, imgBack)); } #endif // HAS_UI_320x240 diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 5000aedc39a5..424f29a182dc 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -47,6 +47,7 @@ void MarlinUI::tft_idle() { #if ENABLED(TOUCH_SCREEN) + if (TERN0(HAS_TOUCH_SLEEP, lcd_sleep_task())) return; if (draw_menu_navigation) { add_control(104, TFT_HEIGHT - 34, PAGE_UP, imgPageUp, encoderTopLine > 0); add_control(344, TFT_HEIGHT - 34, PAGE_DOWN, imgPageDown, encoderTopLine + LCD_HEIGHT < screen_items); @@ -60,6 +61,7 @@ void MarlinUI::tft_idle() { } #if ENABLED(SHOW_BOOTSCREEN) + void MarlinUI::show_bootscreen() { tft.queue.reset(); @@ -81,9 +83,13 @@ void MarlinUI::tft_idle() { #endif tft.queue.sync(); - safe_delay(BOOTSCREEN_TIMEOUT); + } + + void MarlinUI::bootscreen_completion(const millis_t sofar) { + if ((BOOTSCREEN_TIMEOUT) > sofar) safe_delay((BOOTSCREEN_TIMEOUT) - sofar); clear_lcd(); } + #endif void MarlinUI::draw_kill_screen() { @@ -114,21 +120,21 @@ void MarlinUI::draw_kill_screen() { void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { MarlinImage image = imgHotEnd; uint16_t Color; - float currentTemperature, targetTemperature; + celsius_t currentTemperature, targetTemperature; if (Heater >= 0) { // HotEnd - currentTemperature = thermalManager.degHotend(Heater); + currentTemperature = thermalManager.wholeDegHotend(Heater); targetTemperature = thermalManager.degTargetHotend(Heater); } #if HAS_HEATED_BED else if (Heater == H_BED) { - currentTemperature = thermalManager.degBed(); + currentTemperature = thermalManager.wholeDegBed(); targetTemperature = thermalManager.degTargetBed(); } #endif #if HAS_TEMP_CHAMBER else if (Heater == H_CHAMBER) { - currentTemperature = thermalManager.degChamber(); + currentTemperature = thermalManager.wholeDegChamber(); #if HAS_HEATED_CHAMBER targetTemperature = thermalManager.degTargetChamber(); #else @@ -136,6 +142,12 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { #endif } #endif + #if HAS_TEMP_COOLER + else if (Heater == H_COOLER) { + currentTemperature = thermalManager.wholeDegCooler(); + targetTemperature = TERN(HAS_COOLER, thermalManager.degTargetCooler(), ABSOLUTE_ZERO); + } + #endif else return; TERN_(TOUCH_SCREEN, if (targetTemperature >= 0) touch.add_control(HEATER, x, y, 80, 120, Heater)); @@ -159,16 +171,23 @@ void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) { image = targetTemperature > 0 ? imgChamberHeated : imgChamber; } #endif + #if HAS_TEMP_COOLER + else if (Heater == H_COOLER) { + if (currentTemperature <= 26) Color = COLOR_COLD; + if (currentTemperature > 26) Color = COLOR_RED; + image = targetTemperature > 26 ? imgCoolerHot : imgCooler; + } + #endif tft.add_image(8, 28, image, Color); - tft_string.set((uint8_t *)i16tostr3rj(currentTemperature + 0.5)); + tft_string.set((uint8_t *)i16tostr3rj(currentTemperature)); tft_string.add(LCD_STR_DEGREE); tft_string.trim(); tft.add_text(tft_string.center(80) + 2, 82, Color, tft_string); if (targetTemperature >= 0) { - tft_string.set((uint8_t *)i16tostr3rj(targetTemperature + 0.5)); + tft_string.set((uint8_t *)i16tostr3rj(targetTemperature)); tft_string.add(LCD_STR_DEGREE); tft_string.trim(); tft.add_text(tft_string.center(80) + 2, 8, Color, tft_string); @@ -223,6 +242,9 @@ void MarlinUI::draw_status_screen() { #ifdef ITEM_CHAMBER case ITEM_CHAMBER: draw_heater_status(x, y, H_CHAMBER); break; #endif + #ifdef ITEM_COOLER + case ITEM_COOLER: draw_heater_status(x, y, H_COOLER); break; + #endif #ifdef ITEM_FAN case ITEM_FAN: draw_fan_status(x, y, blink); break; #endif @@ -320,7 +342,7 @@ void MarlinUI::draw_status_screen() { } // Low-level draw_edit_screen can be used to draw an edit screen from anyplace -void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) { +void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) { ui.encoder_direction_normal(); TERN_(TOUCH_SCREEN, touch.clear()); @@ -432,7 +454,7 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const tft_string.add('E'); tft_string.add((char)('1' + extruder)); tft_string.add(' '); - tft_string.add(i16tostr3rj(thermalManager.degHotend(extruder))); + tft_string.add(i16tostr3rj(thermalManager.wholeDegHotend(extruder))); tft_string.add(LCD_STR_DEGREE); tft_string.add(" / "); tft_string.add(i16tostr3rj(thermalManager.degTargetHotend(extruder))); @@ -456,12 +478,12 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const tft.set_background(COLOR_BACKGROUND); tft.add_rectangle(0, 0, GRID_WIDTH, GRID_HEIGHT, COLOR_WHITE); - for (uint16_t x = 0; x < GRID_MAX_POINTS_X ; x++) - for (uint16_t y = 0; y < GRID_MAX_POINTS_Y ; y++) + for (uint16_t x = 0; x < (GRID_MAX_POINTS_X); x++) + for (uint16_t y = 0; y < (GRID_MAX_POINTS_Y); y++) if (position_is_reachable({ ubl.mesh_index_to_xpos(x), ubl.mesh_index_to_ypos(y) })) - tft.add_bar(1 + (x * 2 + 1) * (GRID_WIDTH - 4) / GRID_MAX_POINTS_X / 2, GRID_HEIGHT - 3 - ((y * 2 + 1) * (GRID_HEIGHT - 4) / GRID_MAX_POINTS_Y / 2), 2, 2, COLOR_UBL); + tft.add_bar(1 + (x * 2 + 1) * (GRID_WIDTH - 4) / (GRID_MAX_POINTS_X) / 2, GRID_HEIGHT - 3 - ((y * 2 + 1) * (GRID_HEIGHT - 4) / (GRID_MAX_POINTS_Y) / 2), 2, 2, COLOR_UBL); - tft.add_rectangle((x_plot * 2 + 1) * (GRID_WIDTH - 4) / GRID_MAX_POINTS_X / 2 - 1, GRID_HEIGHT - 5 - ((y_plot * 2 + 1) * (GRID_HEIGHT - 4) / GRID_MAX_POINTS_Y / 2), 6, 6, COLOR_UBL); + tft.add_rectangle((x_plot * 2 + 1) * (GRID_WIDTH - 4) / (GRID_MAX_POINTS_X) / 2 - 1, GRID_HEIGHT - 5 - ((y_plot * 2 + 1) * (GRID_HEIGHT - 4) / (GRID_MAX_POINTS_Y) / 2), 6, 6, COLOR_UBL); const xy_pos_t pos = { ubl.mesh_index_to_xpos(x_plot), ubl.mesh_index_to_ypos(y_plot) }, lpos = pos.asLogical(); @@ -506,9 +528,9 @@ void MenuItem_confirm::draw_select_screen(PGM_P const yes, PGM_P const no, const #if ENABLED(TOUCH_SCREEN) touch.clear(); draw_menu_navigation = false; - add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + CONTROL_OFFSET, UBL, ENCODER_STEPS_PER_MENU_ITEM * GRID_MAX_POINTS_X, imgUp); - add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT - CONTROL_OFFSET - 32, UBL, - ENCODER_STEPS_PER_MENU_ITEM * GRID_MAX_POINTS_X, imgDown); - add_control(GRID_OFFSET_X + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, UBL, - ENCODER_STEPS_PER_MENU_ITEM, imgLeft); + add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + CONTROL_OFFSET, UBL, (ENCODER_STEPS_PER_MENU_ITEM) * (GRID_MAX_POINTS_X), imgUp); + add_control(GRID_OFFSET_X + GRID_WIDTH + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT - CONTROL_OFFSET - 32, UBL, -(ENCODER_STEPS_PER_MENU_ITEM) * (GRID_MAX_POINTS_X), imgDown); + add_control(GRID_OFFSET_X + CONTROL_OFFSET, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, UBL, -(ENCODER_STEPS_PER_MENU_ITEM), imgLeft); add_control(GRID_OFFSET_X + GRID_WIDTH - CONTROL_OFFSET - 32, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, UBL, ENCODER_STEPS_PER_MENU_ITEM, imgRight); add_control(320, GRID_OFFSET_Y + GRID_HEIGHT + CONTROL_OFFSET, CLICK, imgLeveling); add_control(224, TFT_HEIGHT - 34, BACK, imgBack); @@ -532,7 +554,6 @@ struct MotionAxisState { float currentStepSize = 10.0; int z_selection = Z_SELECTION_Z; uint8_t e_selection = 0; - bool homming = false; bool blocked = false; char message[32]; }; @@ -597,16 +618,11 @@ static void drawMessage(const char *msg) { tft.add_text(0, 0, COLOR_YELLOW, msg); } -static void drawAxisValue(AxisEnum axis) { - const float value = - #if HAS_BED_PROBE - axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE ? - probe.offset.z : - #endif - NATIVE_TO_LOGICAL( - ui.manual_move.processing ? destination[axis] : current_position[axis] + TERN0(IS_KINEMATIC, ui.manual_move.offset), - axis - ); +static void drawAxisValue(const AxisEnum axis) { + const float value = ( + TERN_(HAS_BED_PROBE, axis == Z_AXIS && motionAxisState.z_selection == Z_SELECTION_Z_PROBE ? probe.offset.z :) + ui.manual_move.axis_value(axis) + ); xy_int_t pos; uint16_t color; switch (axis) { @@ -622,13 +638,15 @@ static void drawAxisValue(AxisEnum axis) { tft.add_text(0, 0, color, tft_string); } -static void moveAxis(AxisEnum axis, const int8_t direction) { +static void moveAxis(const AxisEnum axis, const int8_t direction) { quick_feedback(); - if (axis == E_AXIS && thermalManager.temp_hotend[motionAxisState.e_selection].celsius < EXTRUDE_MINTEMP) { - drawMessage("Too cold"); - return; - } + #if ENABLED(PREVENT_COLD_EXTRUSION) + if (axis == E_AXIS && thermalManager.tooColdToExtrude(motionAxisState.e_selection)) { + drawMessage("Too cold"); + return; + } + #endif const float diff = motionAxisState.currentStepSize * direction; @@ -636,7 +654,7 @@ static void moveAxis(AxisEnum axis, const int8_t direction) { #if ENABLED(BABYSTEP_ZPROBE_OFFSET) const int16_t babystep_increment = direction * BABYSTEP_SIZE_Z; const bool do_probe = DISABLED(BABYSTEP_HOTEND_Z_OFFSET) || active_extruder == 0; - const float bsDiff = planner.steps_to_mm[Z_AXIS] * babystep_increment, + const float bsDiff = planner.mm_per_step[Z_AXIS] * babystep_increment, new_probe_offset = probe.offset.z + bsDiff, new_offs = TERN(BABYSTEP_HOTEND_Z_OFFSET , do_probe ? new_probe_offset : hotend_offset[active_extruder].z - bsDiff @@ -688,31 +706,15 @@ static void moveAxis(AxisEnum axis, const int8_t direction) { #endif // Get the new position + const bool limited = ui.manual_move.apply_diff(axis, diff, min, max); #if IS_KINEMATIC - ui.manual_move.offset += diff; - if (direction < 0) - NOLESS(ui.manual_move.offset, min - current_position[axis]); - else - NOMORE(ui.manual_move.offset, max - current_position[axis]); + UNUSED(limited); #else - current_position[axis] += diff; - const char *msg = NUL_STR; // clear the error - if (direction < 0 && current_position[axis] < min) { - current_position[axis] = min; - msg = GET_TEXT(MSG_LCD_SOFT_ENDSTOPS); - } - else if (direction > 0 && current_position[axis] > max) { - current_position[axis] = max; - msg = GET_TEXT(MSG_LCD_SOFT_ENDSTOPS); - } + PGM_P const msg = limited ? GET_TEXT(MSG_LCD_SOFT_ENDSTOPS) : NUL_STR; drawMessage(msg); #endif - ui.manual_move.soon(axis - #if MULTI_MANUAL - , motionAxisState.e_selection - #endif - ); + ui.manual_move.soon(axis OPTARG(MULTI_E_MANUAL, motionAxisState.e_selection)); } drawAxisValue(axis); @@ -773,7 +775,7 @@ static void disable_steppers() { queue.inject_P(PSTR("M84")); } -static void drawBtn(int x, int y, const char* label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) { +static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) { uint16_t width = Images[imgBtn52Rounded].width; uint16_t height = Images[imgBtn52Rounded].height; @@ -902,7 +904,4 @@ void MarlinUI::move_axis_screen() { TERN_(HAS_TFT_XPT2046, add_control(TFT_WIDTH - X_MARGIN - BTN_WIDTH, y, BACK, imgBack)); } -#undef BTN_WIDTH -#undef BTN_HEIGHT - #endif // HAS_UI_480x320 diff --git a/Marlin/src/lcd/tft/ui_common.cpp b/Marlin/src/lcd/tft/ui_common.cpp index 842fc3909c2a..41862b5ad89c 100644 --- a/Marlin/src/lcd/tft/ui_common.cpp +++ b/Marlin/src/lcd/tft/ui_common.cpp @@ -37,6 +37,27 @@ static xy_uint_t cursor; bool draw_menu_navigation = false; #endif +#if HAS_TOUCH_SLEEP + + bool lcd_sleep_task() { + static bool sleepCleared; + if (touch.isSleeping()) { + tft.queue.reset(); + if (!sleepCleared) { + sleepCleared = true; + ui.clear_lcd(); + tft.queue.async(); + } + touch.idle(); + return true; + } + else + sleepCleared = false; + return false; + } + +#endif + void menu_line(const uint8_t row, uint16_t color) { cursor.set(0, row); tft.canvas(0, TFT_TOP_LINE_Y + cursor.y * MENU_LINE_HEIGHT, TFT_WIDTH, MENU_ITEM_HEIGHT); @@ -131,7 +152,7 @@ void MenuItemBase::_draw(const bool sel, const uint8_t row, PGM_P const pstr, co } // Draw a menu item with a (potentially) editable value -void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm) { +void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const data, const bool pgm) { menu_item(row, sel); tft_string.set(pstr, itemIndex, itemString); @@ -189,6 +210,15 @@ void MarlinUI::clear_lcd() { cursor.set(0, 0); } +#if HAS_LCD_BRIGHTNESS + void MarlinUI::_set_brightness() { + #if PIN_EXISTS(TFT_BACKLIGHT) + if (PWM_PIN(TFT_BACKLIGHT_PIN)) + analogWrite(pin_t(TFT_BACKLIGHT_PIN), brightness); + #endif + } +#endif + #if ENABLED(TOUCH_SCREEN_CALIBRATION) void MarlinUI::touch_calibration_screen() { diff --git a/Marlin/src/lcd/tft/ui_common.h b/Marlin/src/lcd/tft/ui_common.h index d40e471171b3..d3ffd4bc31ac 100644 --- a/Marlin/src/lcd/tft/ui_common.h +++ b/Marlin/src/lcd/tft/ui_common.h @@ -23,7 +23,7 @@ #include "../../inc/MarlinConfigPre.h" -#if !HAS_LCD_MENU +#if ENABLED(NO_LCD_MENUS) #error "Seriously? High resolution TFT screen without menu?" #endif @@ -39,6 +39,10 @@ #include "ui_320x240.h" #elif HAS_UI_480x320 || HAS_UI_480x272 #include "ui_480x320.h" +#elif HAS_UI_1024x600 + #include "ui_1024x600.h" +#else + #error "Unsupported display resolution!" #endif void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater); @@ -47,6 +51,10 @@ void draw_fan_status(uint16_t x, uint16_t y, const bool blink); void menu_line(const uint8_t row, uint16_t color=COLOR_BACKGROUND); void menu_item(const uint8_t row, bool sel = false); +#if HAS_TOUCH_SLEEP + bool lcd_sleep_task(); +#endif + #define ABSOLUTE_ZERO -273.15 #if HAS_TEMP_CHAMBER && HOTENDS > 1 @@ -62,6 +70,10 @@ void menu_item(const uint8_t row, bool sel = false); #define ITEM_CHAMBER 2 #define ITEM_FAN 3 #define ITEMS_COUNT 4 +#elif HAS_TEMP_COOLER + #define ITEM_COOLER 0 + #define ITEM_FAN 1 + #define ITEMS_COUNT 2 #elif HOTENDS > 1 #define ITEM_E0 0 #define ITEM_E1 1 diff --git a/Marlin/src/lcd/tft_io/st7796s.h b/Marlin/src/lcd/tft_io/st7796s.h index 8653a49ca2ef..6d79dd882ac2 100644 --- a/Marlin/src/lcd/tft_io/st7796s.h +++ b/Marlin/src/lcd/tft_io/st7796s.h @@ -144,37 +144,11 @@ static const uint16_t st7796s_init[] = { ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D, ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D, - ESC_REG(ST7796S_NORON), - ESC_REG(ST7796S_WRCTRLD), 0x0024, - ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I - ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II - ESC_REG(ST7796S_DISPON), - ESC_END -}; - -static const uint16_t lerdge_st7796s_init[] = { - DATASIZE_8BIT, - ESC_REG(ST7796S_CSCON), 0x00C3, // enable command 2 part I - ESC_REG(ST7796S_CSCON), 0x0096, // enable command 2 part II - - ESC_REG(ST7796S_MADCTL), ST7796S_MADCTL_DATA, - ESC_REG(ST7796S_COLMOD), 0x0055, - - ESC_REG(ST7796S_DIC), 0x0001, // 1-dot inversion - ESC_REG(ST7796S_EM), 0x00C6, - - ESC_REG(ST7796S_PWR2), 0x0015, - ESC_REG(ST7796S_PWR3), 0x00AF, - ESC_REG(0xC3), 0x0009, // Register not documented in datasheet - ESC_REG(ST7796S_VCMPCTL), 0x0022, - ESC_REG(ST7796S_VCMOST), 0x0000, - ESC_REG(ST7796S_DOCA), 0x0040, 0x008A, 0x0000, 0x0000, 0x0029, 0x0019, 0x00A5, 0x0033, - - /* Gamma Correction. */ - ESC_REG(ST7796S_PGC), 0x00F0, 0x0004, 0x0008, 0x0009, 0x0008, 0x0015, 0x002F, 0x0042, 0x0046, 0x0028, 0x0015, 0x0016, 0x0029, 0x002D, - ESC_REG(ST7796S_NGC), 0x00F0, 0x0004, 0x0009, 0x0009, 0x0008, 0x0015, 0x002E, 0x0046, 0x0046, 0x0028, 0x0015, 0x0015, 0x0029, 0x002D, - - ESC_REG(ST7796S_INVON), // Display inversion ON + #if ENABLED(ST7796S_INVERTED) + ESC_REG(ST7796S_INVON), // Display inversion ON + #else + ESC_REG(ST7796S_NORON), + #endif ESC_REG(ST7796S_WRCTRLD), 0x0024, ESC_REG(ST7796S_CSCON), 0x003C, // disable command 2 part I ESC_REG(ST7796S_CSCON), 0x0069, // disable command 2 part II diff --git a/Marlin/src/lcd/tft_io/tft_ids.h b/Marlin/src/lcd/tft_io/tft_ids.h new file mode 100644 index 000000000000..2de111366c45 --- /dev/null +++ b/Marlin/src/lcd/tft_io/tft_ids.h @@ -0,0 +1,34 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define LTDC_RGB 0xABAB +#define SSD1963 0x5761 +#define ST7735 0x89F0 +#define ST7789 0x8552 +#define ST7796 0x7796 +#define R61505 0x1505 +#define ILI9328 0x9328 +#define ILI9341 0x9341 +#define ILI9488 0x9488 +#define ILI9488_ID1 0x8066 // Some ILI9488 have 0x8066 in the 0x04 +#define AUTO 0xFFFF diff --git a/Marlin/src/lcd/tft_io/tft_io.cpp b/Marlin/src/lcd/tft_io/tft_io.cpp index cd535458a181..6ec3bedcdff6 100644 --- a/Marlin/src/lcd/tft_io/tft_io.cpp +++ b/Marlin/src/lcd/tft_io/tft_io.cpp @@ -20,18 +20,38 @@ * */ +#include "../../inc/MarlinConfigPre.h" + +#if HAS_SPI_TFT || HAS_FSMC_TFT || HAS_LTDC_TFT + #include "tft_io.h" +#include "tft_ids.h" -#if HAS_SPI_TFT || HAS_FSMC_TFT +#if TFT_DRIVER == ST7735 || TFT_DRIVER == AUTO + #include "st7735.h" +#endif +#if TFT_DRIVER == ST7789 || TFT_DRIVER == AUTO + #include "st7789v.h" +#endif +#if TFT_DRIVER == ST7796 || TFT_DRIVER == AUTO + #include "st7796s.h" +#endif +#if TFT_DRIVER == R61505 || TFT_DRIVER == AUTO + #include "r65105.h" +#endif +#if TFT_DRIVER == ILI9488 || TFT_DRIVER == ILI9488_ID1 || TFT_DRIVER == AUTO + #include "ili9488.h" +#endif +#if TFT_DRIVER == SSD1963 || TFT_DRIVER == AUTO + #include "ssd1963.h" +#endif -#include "st7735.h" -#include "st7789v.h" -#include "st7796s.h" -#include "r65105.h" -#include "ili9328.h" #include "ili9341.h" -#include "ili9488.h" -#include "ssd1963.h" +#include "ili9328.h" + +#if HAS_LCD_BRIGHTNESS + #include "../marlinui.h" +#endif #define DEBUG_OUT ENABLED(DEBUG_GRAPHICAL_TFT) #include "../../core/debug_out.h" @@ -49,13 +69,16 @@ if (lcd_id != 0xFFFFFFFF) return; #if PIN_EXISTS(TFT_RESET) OUT_WRITE(TFT_RESET_PIN, HIGH); delay(10); - OUT_WRITE(TFT_RESET_PIN, LOW); + WRITE(TFT_RESET_PIN, LOW); delay(10); - OUT_WRITE(TFT_RESET_PIN, HIGH); + WRITE(TFT_RESET_PIN, HIGH); #endif #if PIN_EXISTS(TFT_BACKLIGHT) - OUT_WRITE(TFT_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); + WRITE(TFT_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); + #if HAS_LCD_BRIGHTNESS && DISABLED(DELAYED_BACKLIGHT_INIT) + ui._set_brightness(); + #endif #endif // io.Init(); @@ -81,15 +104,13 @@ if (lcd_id != 0xFFFFFFFF) return; write_esc_sequence(ili9341_init); #elif TFT_DRIVER == ILI9488 write_esc_sequence(ili9488_init); - #elif TFT_DRIVER == LERDGE_ST7796 - lcd_id = ST7796; - write_esc_sequence(lerdge_st7796s_init); - #elif TFT_DRIVER == AUTO // autodetect lcd_id = io.GetID() & 0xFFFF; switch (lcd_id) { + case LTDC_RGB: + break; case ST7796: // ST7796S 480x320 DEBUG_ECHO_MSG(" ST7796S"); write_esc_sequence(st7796s_init); @@ -127,11 +148,12 @@ if (lcd_id != 0xFFFFFFFF) return; lcd_id = 0; } #else - #error Unsupported TFT driver + #error "Unsupported TFT driver" #endif #if PIN_EXISTS(TFT_BACKLIGHT) && ENABLED(DELAYED_BACKLIGHT_INIT) - OUT_WRITE(TFT_BACKLIGHT_PIN, HIGH); + WRITE(TFT_BACKLIGHT_PIN, HIGH); + TERN_(HAS_LCD_BRIGHTNESS, ui._set_brightness()); #endif } @@ -144,6 +166,17 @@ void TFT_IO::set_window(uint16_t Xmin, uint16_t Ymin, uint16_t Xmax, uint16_t Ym #endif switch (lcd_id) { + case LTDC_RGB: + io.WriteReg(0x01); + io.WriteData(Xmin); + io.WriteReg(0x02); + io.WriteData(Xmax); + io.WriteReg(0x03); + io.WriteData(Ymin); + io.WriteReg(0x04); + io.WriteData(Ymax); + io.WriteReg(0x00); + break; case ST7735: // ST7735 160x128 case ST7789: // ST7789V 320x240 case ST7796: // ST7796 480x320 @@ -223,4 +256,4 @@ void TFT_IO::write_esc_sequence(const uint16_t *Sequence) { io.DataTransferEnd(); } -#endif // HAS_SPI_TFT || HAS_FSMC_TFT +#endif // HAS_SPI_TFT || HAS_FSMC_TFT || HAS_LTDC_TFT diff --git a/Marlin/src/lcd/tft_io/tft_io.h b/Marlin/src/lcd/tft_io/tft_io.h index 245635857186..65602240d63a 100644 --- a/Marlin/src/lcd/tft_io/tft_io.h +++ b/Marlin/src/lcd/tft_io/tft_io.h @@ -23,19 +23,19 @@ #include "../../inc/MarlinConfig.h" -#if HAS_SPI_TFT || HAS_FSMC_TFT - #if HAS_SPI_TFT #include HAL_PATH(../../HAL, tft/tft_spi.h) #elif HAS_FSMC_TFT #include HAL_PATH(../../HAL, tft/tft_fsmc.h) +#elif HAS_LTDC_TFT + #include HAL_PATH(../../HAL, tft/tft_ltdc.h) #else - #error "TFT IO only supports SPI or FSMC interface" + #error "TFT IO only supports SPI, FSMC or LTDC interface" #endif -#define TFT_EXCHANGE_XY (1UL << 1) -#define TFT_INVERT_X (1UL << 2) -#define TFT_INVERT_Y (1UL << 3) +#define TFT_EXCHANGE_XY _BV32(1) +#define TFT_INVERT_X _BV32(2) +#define TFT_INVERT_Y _BV32(3) #define TFT_NO_ROTATION (0x00) #define TFT_ROTATE_90 (TFT_EXCHANGE_XY | TFT_INVERT_X) @@ -59,12 +59,11 @@ #define TFT_ROTATION TFT_NO_ROTATION #endif - // TFT_ORIENTATION is the "sum" of TFT_DEFAULT_ORIENTATION plus user TFT_ROTATION #define TFT_ORIENTATION ((TFT_DEFAULT_ORIENTATION) ^ (TFT_ROTATION)) -#define TFT_COLOR_RGB (1UL << 3) -#define TFT_COLOR_BGR (1UL << 4) +#define TFT_COLOR_RGB _BV32(3) +#define TFT_COLOR_BGR _BV32(4) // Each TFT Driver is responsible for its default color mode. // #ifndef TFT_COLOR @@ -91,26 +90,14 @@ #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif -#define SSD1963 0x5761 -#define ST7735 0x89F0 -#define ST7789 0x8552 -#define ST7796 0x7796 -#define R61505 0x1505 -#define ILI9328 0x9328 -#define ILI9341 0x9341 -#define ILI9488 0x9488 -#define ILI9488_ID1 0x8066 //Some ILI9488 have 0x8066 in the 0x04 -#define LERDGE_ST7796 0xFFFE -#define AUTO 0xFFFF - #ifndef TFT_DRIVER #define TFT_DRIVER AUTO #endif -#define ESC_REG(x) 0xFFFF, 0x00FF & (uint16_t)x -#define ESC_DELAY(x) 0xFFFF, 0x8000 | (x & 0x7FFF) -#define ESC_END 0xFFFF, 0x7FFF -#define ESC_FFFF 0xFFFF, 0xFFFF +#define ESC_REG(x) 0xFFFF, 0x00FF & (uint16_t)x +#define ESC_DELAY(x) 0xFFFF, 0x8000 | (x & 0x7FFF) +#define ESC_END 0xFFFF, 0x7FFF +#define ESC_FFFF 0xFFFF, 0xFFFF class TFT_IO { public: @@ -140,5 +127,3 @@ class TFT_IO { protected: static uint32_t lcd_id; }; - -#endif // HAS_SPI_TFT || HAS_FSMC_TFT diff --git a/Marlin/src/lcd/tft_io/touch_calibration.cpp b/Marlin/src/lcd/tft_io/touch_calibration.cpp index 0f9d25caeb62..44ebc73d71a2 100644 --- a/Marlin/src/lcd/tft_io/touch_calibration.cpp +++ b/Marlin/src/lcd/tft_io/touch_calibration.cpp @@ -1,6 +1,9 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -77,10 +80,10 @@ void TouchCalibration::validate_calibration() { if (calibration_state == CALIBRATION_SUCCESS) { SERIAL_ECHOLNPGM("Touch screen calibration completed"); - SERIAL_ECHOLNPAIR("TOUCH_CALIBRATION_X ", calibration.x); - SERIAL_ECHOLNPAIR("TOUCH_CALIBRATION_Y ", calibration.y); - SERIAL_ECHOLNPAIR("TOUCH_OFFSET_X ", calibration.offset_x); - SERIAL_ECHOLNPAIR("TOUCH_OFFSET_Y ", calibration.offset_y); + SERIAL_ECHOLNPGM("TOUCH_CALIBRATION_X ", calibration.x); + SERIAL_ECHOLNPGM("TOUCH_CALIBRATION_Y ", calibration.y); + SERIAL_ECHOLNPGM("TOUCH_OFFSET_X ", calibration.offset_x); + SERIAL_ECHOLNPGM("TOUCH_OFFSET_Y ", calibration.offset_y); SERIAL_ECHO_TERNARY(calibration.orientation == TOUCH_LANDSCAPE, "TOUCH_ORIENTATION ", "TOUCH_LANDSCAPE", "TOUCH_PORTRAIT", "\n"); TERN_(TOUCH_CALIBRATION_AUTO_SAVE, settings.save()); } @@ -95,7 +98,7 @@ bool TouchCalibration::handleTouch(uint16_t x, uint16_t y) { if (calibration_state < CALIBRATION_SUCCESS) { calibration_points[calibration_state].raw_x = x; calibration_points[calibration_state].raw_y = y; - DEBUG_ECHOLNPAIR("TouchCalibration - State: ", calibration_state, ", x: ", calibration_points[calibration_state].x, ", raw_x: ", x, ", y: ", calibration_points[calibration_state].y, ", raw_y: ", y); + DEBUG_ECHOLNPGM("TouchCalibration - State: ", calibration_state, ", x: ", calibration_points[calibration_state].x, ", raw_x: ", x, ", y: ", calibration_points[calibration_state].y, ", raw_y: ", y); } switch (calibration_state) { diff --git a/Marlin/src/lcd/tft_io/touch_calibration.h b/Marlin/src/lcd/tft_io/touch_calibration.h index f8cbf99bf000..abd566770007 100644 --- a/Marlin/src/lcd/tft_io/touch_calibration.h +++ b/Marlin/src/lcd/tft_io/touch_calibration.h @@ -1,6 +1,9 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/Marlin/src/lcd/thermistornames.h b/Marlin/src/lcd/thermistornames.h index f9f91ac49a5c..4f6dd23ece90 100644 --- a/Marlin/src/lcd/thermistornames.h +++ b/Marlin/src/lcd/thermistornames.h @@ -128,6 +128,8 @@ #define THERMISTOR_NAME "Pt100 1K" #elif THERMISTOR_ID == 666 #define THERMISTOR_NAME "Einstart S" +#elif THERMISTOR_ID == 2000 + #define THERMISTOR_NAME "TDK NTCG104LH104JT1" // High Temperature thermistors #elif THERMISTOR_ID == 61 diff --git a/Marlin/src/lcd/touch/touch_buttons.cpp b/Marlin/src/lcd/touch/touch_buttons.cpp index 975de58211f8..feaba8483b27 100644 --- a/Marlin/src/lcd/touch/touch_buttons.cpp +++ b/Marlin/src/lcd/touch/touch_buttons.cpp @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -24,13 +27,24 @@ #include "touch_buttons.h" #include "../scaled_tft.h" -#include HAL_PATH(../../HAL, tft/xpt2046.h) -XPT2046 touchIO; +#if ENABLED(TFT_TOUCH_DEVICE_GT911) + #include HAL_PATH(../../HAL, tft/gt911.h) + GT911 touchIO; +#elif ENABLED(TFT_TOUCH_DEVICE_XPT2046) + #include HAL_PATH(../../HAL, tft/xpt2046.h) + XPT2046 touchIO; +#else + #error "Unknown Touch Screen Type." +#endif #if ENABLED(TOUCH_SCREEN_CALIBRATION) #include "../tft_io/touch_calibration.h" #endif +#if HAS_TOUCH_SLEEP + millis_t TouchButtons::next_sleep_ms; +#endif + #include "../buttons.h" // For EN_C bit mask #include "../marlinui.h" // For ui.refresh #include "../tft_io/tft_io.h" @@ -43,15 +57,24 @@ XPT2046 touchIO; #define BUTTON_AREA_TOP BUTTON_Y_LO #define BUTTON_AREA_BOT BUTTON_Y_HI -TouchButtons touch; +TouchButtons touchBt; -void TouchButtons::init() { touchIO.Init(); } +void TouchButtons::init() { + touchIO.Init(); + TERN_(HAS_TOUCH_SLEEP, next_sleep_ms = millis() + SEC_TO_MS(TOUCH_IDLE_SLEEP)); +} uint8_t TouchButtons::read_buttons() { #ifdef HAS_WIRED_LCD int16_t x, y; const bool is_touched = (TERN(TOUCH_SCREEN_CALIBRATION, touch_calibration.calibration.orientation, TOUCH_ORIENTATION) == TOUCH_PORTRAIT ? touchIO.getRawPoint(&y, &x) : touchIO.getRawPoint(&x, &y)); + #if HAS_TOUCH_SLEEP + if (is_touched) + wakeUp(); + else if (!isSleeping() && ELAPSED(millis(), next_sleep_ms) && ui.on_status_screen()) + sleepTimeout(); + #endif if (!is_touched) return 0; #if ENABLED(TOUCH_SCREEN_CALIBRATION) @@ -89,4 +112,25 @@ uint8_t TouchButtons::read_buttons() { return 0; } +#if HAS_TOUCH_SLEEP + + void TouchButtons::sleepTimeout() { + #if PIN_EXISTS(TFT_BACKLIGHT) + OUT_WRITE(TFT_BACKLIGHT_PIN, LOW); + #endif + next_sleep_ms = TSLP_SLEEPING; + } + void TouchButtons::wakeUp() { + if (isSleeping()) { + #if HAS_LCD_BRIGHTNESS + ui._set_brightness(); + #elif PIN_EXISTS(TFT_BACKLIGHT) + WRITE(TFT_BACKLIGHT_PIN, HIGH); + #endif + } + next_sleep_ms = millis() + SEC_TO_MS(TOUCH_IDLE_SLEEP); + } + +#endif // HAS_TOUCH_SLEEP + #endif // HAS_TOUCH_BUTTONS diff --git a/Marlin/src/lcd/touch/touch_buttons.h b/Marlin/src/lcd/touch/touch_buttons.h index a79bb15be427..39768f2594b7 100644 --- a/Marlin/src/lcd/touch/touch_buttons.h +++ b/Marlin/src/lcd/touch/touch_buttons.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -50,10 +53,19 @@ #define BUTTON_Y_HI (TFT_HEIGHT) - BUTTON_SPACING #define BUTTON_Y_LO BUTTON_Y_HI - BUTTON_HEIGHT +#define TSLP_PREINIT 0 +#define TSLP_SLEEPING 1 + class TouchButtons { public: static void init(); static uint8_t read_buttons(); + #if HAS_TOUCH_SLEEP + static millis_t next_sleep_ms; + static bool isSleeping() { return next_sleep_ms == TSLP_SLEEPING; } + static void sleepTimeout(); + static void wakeUp(); + #endif }; -extern TouchButtons touch; +extern TouchButtons touchBt; diff --git a/Marlin/src/libs/BL24CXX.cpp b/Marlin/src/libs/BL24CXX.cpp index 8de320d57619..6407fac67086 100644 --- a/Marlin/src/libs/BL24CXX.cpp +++ b/Marlin/src/libs/BL24CXX.cpp @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -27,7 +30,12 @@ */ #include "BL24CXX.h" -#include +#ifdef __STM32F1__ + #include +#else + #include "../HAL/shared/Delay.h" + #define delay_us(n) DELAY_US(n) +#endif #ifndef EEPROM_WRITE_DELAY #define EEPROM_WRITE_DELAY 10 @@ -37,8 +45,13 @@ #endif // IO direction setting -#define SDA_IN() do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 8 << 12; }while(0) -#define SDA_OUT() do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 3 << 12; }while(0) +#ifdef __STM32F1__ + #define SDA_IN() do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 8 << 12; }while(0) + #define SDA_OUT() do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 3 << 12; }while(0) +#elif STM32F1 + #define SDA_IN() SET_INPUT(IIC_EEPROM_SDA) + #define SDA_OUT() SET_OUTPUT(IIC_EEPROM_SDA) +#endif // IO ops #define IIC_SCL_0() WRITE(IIC_EEPROM_SCL, LOW) diff --git a/Marlin/src/libs/L64XX/L64XX_Marlin.cpp b/Marlin/src/libs/L64XX/L64XX_Marlin.cpp index 7d36a02d673f..6f80652ce5b4 100644 --- a/Marlin/src/libs/L64XX/L64XX_Marlin.cpp +++ b/Marlin/src/libs/L64XX/L64XX_Marlin.cpp @@ -37,37 +37,46 @@ L64XX_Marlin L64xxManager; #include "../../module/planner.h" #include "../../HAL/shared/Delay.h" -void echo_yes_no(const bool yes) { serialprintPGM(yes ? PSTR(" YES") : PSTR(" NO ")); } - -static const char str_X[] PROGMEM = "X ", str_Y[] PROGMEM = "Y ", str_Z[] PROGMEM = "Z ", +static const char LINEAR_AXIS_LIST( + str_X[] PROGMEM = "X ", str_Y[] PROGMEM = "Y ", str_Z[] PROGMEM = "Z ", + str_I[] PROGMEM = AXIS4_STR " ", str_J[] PROGMEM = AXIS5_STR " ", str_K[] PROGMEM = AXIS6_STR " " + ), str_X2[] PROGMEM = "X2", str_Y2[] PROGMEM = "Y2", str_Z2[] PROGMEM = "Z2", str_Z3[] PROGMEM = "Z3", str_Z4[] PROGMEM = "Z4", - str_E0[] PROGMEM = "E0", str_E1[] PROGMEM = "E1", - str_E2[] PROGMEM = "E2", str_E3[] PROGMEM = "E3", - str_E4[] PROGMEM = "E4", str_E5[] PROGMEM = "E5", - str_E6[] PROGMEM = "E6", str_E7[] PROGMEM = "E7" + LIST_N(EXTRUDERS, + str_E0[] PROGMEM = "E0", str_E1[] PROGMEM = "E1", + str_E2[] PROGMEM = "E2", str_E3[] PROGMEM = "E3", + str_E4[] PROGMEM = "E4", str_E5[] PROGMEM = "E5", + str_E6[] PROGMEM = "E6", str_E7[] PROGMEM = "E7" + ) ; +#define _EN_ITEM(N) , str_E##N PGM_P const L64XX_Marlin::index_to_axis[] PROGMEM = { - str_X, str_Y, str_Z, str_X2, str_Y2, str_Z2, str_Z3, str_Z4, - str_E0, str_E1, str_E2, str_E3, str_E4, str_E5, str_E6, str_E7 + LINEAR_AXIS_LIST(str_X, str_Y, str_Z, str_I, str_J, str_K), + str_X2, str_Y2, str_Z2, str_Z3, str_Z4 + REPEAT(E_STEPPERS, _EN_ITEM) }; +#undef _EN_ITEM #define DEBUG_OUT ENABLED(L6470_CHITCHAT) #include "../../core/debug_out.h" +void echo_yes_no(const bool yes) { DEBUG_ECHOPGM_P(yes ? PSTR(" YES") : PSTR(" NO ")); UNUSED(yes); } + uint8_t L64XX_Marlin::dir_commands[MAX_L64XX]; // array to hold direction command for each driver +#define _EN_ITEM(N) , INVERT_E##N##_DIR const uint8_t L64XX_Marlin::index_to_dir[MAX_L64XX] = { - INVERT_X_DIR, INVERT_Y_DIR, INVERT_Z_DIR + LINEAR_AXIS_LIST(INVERT_X_DIR, INVERT_Y_DIR, INVERT_Z_DIR, INVERT_I_DIR, INVERT_J_DIR, INVERT_K_DIR) , (INVERT_X_DIR) ^ BOTH(X_DUAL_STEPPER_DRIVERS, INVERT_X2_VS_X_DIR) // X2 , (INVERT_Y_DIR) ^ BOTH(Y_DUAL_STEPPER_DRIVERS, INVERT_Y2_VS_Y_DIR) // Y2 , (INVERT_Z_DIR) ^ ENABLED(INVERT_Z2_VS_Z_DIR) // Z2 , (INVERT_Z_DIR) ^ ENABLED(INVERT_Z3_VS_Z_DIR) // Z3 , (INVERT_Z_DIR) ^ ENABLED(INVERT_Z4_VS_Z_DIR) // Z4 - , INVERT_E0_DIR, INVERT_E1_DIR, INVERT_E2_DIR, INVERT_E3_DIR - , INVERT_E4_DIR, INVERT_E5_DIR, INVERT_E6_DIR, INVERT_E7_DIR + REPEAT(E_STEPPERS, _EN_ITEM) }; +#undef _EN_ITEM volatile uint8_t L64XX_Marlin::spi_abort = false; uint8_t L64XX_Marlin::spi_active = false; @@ -326,6 +335,15 @@ void L64XX_Marlin::set_param(const L64XX_axis_t axis, const uint8_t param, const #if AXIS_IS_L64XX(Z) case Z : SET_L6470_PARAM(Z); break; #endif + #if AXIS_IS_L64XX(I) + case I : SET_L6470_PARAM(I); break; + #endif + #if AXIS_IS_L64XX(J) + case J : SET_L6470_PARAM(J); break; + #endif + #if AXIS_IS_L64XX(K) + case K : SET_L6470_PARAM(K); break; + #endif #if AXIS_IS_L64XX(X2) case X2: SET_L6470_PARAM(X2); break; #endif @@ -368,14 +386,13 @@ void L64XX_Marlin::set_param(const L64XX_axis_t axis, const uint8_t param, const } } -inline void echo_min_max(const char a, const float &min, const float &max) { +inline void echo_min_max(const char a, const_float_t min, const_float_t max) { DEBUG_CHAR(' '); DEBUG_CHAR(a); - DEBUG_ECHOPAIR(" min = ", min); - DEBUG_ECHOLNPAIR(" max = ", max); + DEBUG_ECHOLNPGM(" min = ", min, " max = ", max); } -inline void echo_oct_used(const float &oct, const uint8_t stall) { - DEBUG_ECHOPAIR("over_current_threshold used : ", oct); - serialprintPGM(stall ? PSTR(" (Stall") : PSTR(" (OCD")); +inline void echo_oct_used(const_float_t oct, const uint8_t stall) { + DEBUG_ECHOPGM("over_current_threshold used : ", oct); + DEBUG_ECHOPGM_P(stall ? PSTR(" (Stall") : PSTR(" (OCD")); DEBUG_ECHOLNPGM(" threshold)"); } inline void err_out_of_bounds() { DEBUG_ECHOLNPGM("Test aborted - motion out of bounds"); } @@ -395,7 +412,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in } uint8_t found_displacement = false; - LOOP_XYZE(i) if (uint16_t _displacement = parser.intval(axis_codes[i])) { + LOOP_LOGICAL_AXES(i) if (uint16_t _displacement = parser.intval(axis_codes[i])) { found_displacement = true; displacement = _displacement; uint8_t axis_offset = parser.byteval('J'); @@ -433,10 +450,15 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in // Position calcs & checks // - const float X_center = LOGICAL_X_POSITION(current_position.x), - Y_center = LOGICAL_Y_POSITION(current_position.y), - Z_center = LOGICAL_Z_POSITION(current_position.z), - E_center = current_position.e; + const float LOGICAL_AXIS_LIST( + E_center = current_position.e, + X_center = LOGICAL_X_POSITION(current_position.x), + Y_center = LOGICAL_Y_POSITION(current_position.y), + Z_center = LOGICAL_Z_POSITION(current_position.z), + I_center = LOGICAL_I_POSITION(current_position.i), + J_center = LOGICAL_J_POSITION(current_position.j), + K_center = LOGICAL_K_POSITION(current_position.k) + ); switch (axis_mon[0][0]) { default: position_max = position_min = 0; break; @@ -445,58 +467,79 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in position_min = X_center - displacement; position_max = X_center + displacement; echo_min_max('X', position_min, position_max); - if (false - #ifdef X_MIN_POS - || position_min < (X_MIN_POS) - #endif - #ifdef X_MAX_POS - || position_max > (X_MAX_POS) - #endif - ) { + if (TERN0(HAS_ENDSTOPS, position_min < (X_MIN_POS) || position_max > (X_MAX_POS))) { err_out_of_bounds(); return true; } } break; - case 'Y': { - position_min = Y_center - displacement; - position_max = Y_center + displacement; - echo_min_max('Y', position_min, position_max); - if (false - #ifdef Y_MIN_POS - || position_min < (Y_MIN_POS) - #endif - #ifdef Y_MAX_POS - || position_max > (Y_MAX_POS) - #endif - ) { - err_out_of_bounds(); - return true; - } - } break; + #if HAS_Y_AXIS + case 'Y': { + position_min = Y_center - displacement; + position_max = Y_center + displacement; + echo_min_max('Y', position_min, position_max); + if (TERN0(HAS_ENDSTOPS, position_min < (Y_MIN_POS) || position_max > (Y_MAX_POS))) { + err_out_of_bounds(); + return true; + } + } break; + #endif - case 'Z': { - position_min = Z_center - displacement; - position_max = Z_center + displacement; - echo_min_max('Z', position_min, position_max); - if (false - #ifdef Z_MIN_POS - || position_min < (Z_MIN_POS) - #endif - #ifdef Z_MAX_POS - || position_max > (Z_MAX_POS) - #endif - ) { - err_out_of_bounds(); - return true; - } - } break; + #if HAS_Z_AXIS + case 'Z': { + position_min = Z_center - displacement; + position_max = Z_center + displacement; + echo_min_max('Z', position_min, position_max); + if (TERN0(HAS_ENDSTOPS, position_min < (Z_MIN_POS) || position_max > (Z_MAX_POS))) { + err_out_of_bounds(); + return true; + } + } break; + #endif - case 'E': { - position_min = E_center - displacement; - position_max = E_center + displacement; - echo_min_max('E', position_min, position_max); - } break; + #if LINEAR_AXES >= 4 + case AXIS4_NAME: { + position_min = I_center - displacement; + position_max = I_center + displacement; + echo_min_max(AXIS4_NAME, position_min, position_max); + if (TERN0(HAS_ENDSTOPS, position_min < (I_MIN_POS) || position_max > (I_MAX_POS))) { + err_out_of_bounds(); + return true; + } + } break; + #endif + + #if LINEAR_AXES >= 5 + case AXIS5_NAME: { + position_min = J_center - displacement; + position_max = J_center + displacement; + echo_min_max(AXIS5_NAME, position_min, position_max); + if (TERN1(HAS_ENDSTOPS, position_min < (J_MIN_POS) || position_max > (J_MAX_POS))) { + err_out_of_bounds(); + return true; + } + } break; + #endif + + #if LINEAR_AXES >= 6 + case AXIS6_NAME: { + position_min = K_center - displacement; + position_max = K_center + displacement; + echo_min_max(AXIS6_NAME, position_min, position_max); + if (TERN2(HAS_ENDSTOPS, position_min < (K_MIN_POS) || position_max > (K_MAX_POS))) { + err_out_of_bounds(); + return true; + } + } break; + #endif + + #if HAS_EXTRUDERS + case 'E': { + position_min = E_center - displacement; + position_max = E_center + displacement; + echo_min_max('E', position_min, position_max); + } break; + #endif } // @@ -525,7 +568,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in } DEBUG_ECHOPGM("Monitoring:"); - for (j = 0; j < driver_count; j++) DEBUG_ECHOPAIR(" ", axis_mon[j]); + for (j = 0; j < driver_count; j++) DEBUG_ECHOPGM(" ", axis_mon[j]); DEBUG_EOL(); // now have a list of driver(s) to monitor @@ -546,19 +589,19 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in } // only print the tval from one of the drivers kval_hold = get_param(axis_index[0], L6474_TVAL); - DEBUG_ECHOLNPAIR("TVAL current (mA) = ", (kval_hold + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); + DEBUG_ECHOLNPGM("TVAL current (mA) = ", (kval_hold + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV); } else { kval_hold = parser.byteval('K'); if (kval_hold) { - DEBUG_ECHOLNPAIR("kval_hold = ", kval_hold); + DEBUG_ECHOLNPGM("kval_hold = ", kval_hold); for (j = 0; j < driver_count; j++) set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold); } else { // only print the KVAL_HOLD from one of the drivers kval_hold = get_param(axis_index[0], L6470_KVAL_HOLD); - DEBUG_ECHOLNPAIR("KVAL_HOLD = ", kval_hold); + DEBUG_ECHOLNPGM("KVAL_HOLD = ", kval_hold); } } @@ -586,7 +629,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in OCD_TH_actual = (OCD_TH_val_local + 1) * 375; } - DEBUG_ECHOLNPAIR("over_current_threshold specified: ", over_current_threshold); + DEBUG_ECHOLNPGM("over_current_threshold specified: ", over_current_threshold); if (!(sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT)) echo_oct_used((STALL_TH_val_local + 1) * 31.25, true); echo_oct_used((OCD_TH_val_local + 1) * 375, false); @@ -658,7 +701,7 @@ void L64XX_Marlin::say_axis(const L64XX_axis_t axis, const uint8_t label/*=true* ) { say_axis(axis); DEBUG_ECHOPGM(" THERMAL: "); - serialprintPGM((status & _status_axis_th_sd) ? PSTR("SHUTDOWN") : (status & _status_axis_th_wrn) ? PSTR("WARNING ") : PSTR("OK ")); + DEBUG_ECHOPGM_P((status & _status_axis_th_sd) ? PSTR("SHUTDOWN") : (status & _status_axis_th_wrn) ? PSTR("WARNING ") : PSTR("OK ")); DEBUG_ECHOPGM(" OVERCURRENT: "); echo_yes_no((status & _status_axis_ocd) != 0); if (!(_status_axis_layout == L6474_STATUS_LAYOUT)) { // L6474 doesn't have these bits @@ -681,7 +724,7 @@ void L64XX_Marlin::say_axis(const L64XX_axis_t axis, const uint8_t label/*=true* bool L64XX_Marlin::monitor_paused = false; // Flag to skip monitor during M122, M906, M916, M917, M918, etc. struct L6470_driver_data { - uint8_t driver_index; + L64XX_axis_t driver_index; uint32_t driver_status; uint8_t is_otw; uint8_t otw_counter; @@ -692,52 +735,61 @@ void L64XX_Marlin::say_axis(const L64XX_axis_t axis, const uint8_t label/*=true* L6470_driver_data driver_L6470_data[] = { #if AXIS_IS_L64XX(X) - { 0, 0, 0, 0, 0, 0, 0 }, + { X, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(Y) - { 1, 0, 0, 0, 0, 0, 0 }, + { Y, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(Z) - { 2, 0, 0, 0, 0, 0, 0 }, + { Z, 0, 0, 0, 0, 0, 0 }, + #endif + #if AXIS_IS_L64XX(I) + { I, 0, 0, 0, 0, 0, 0 }, + #endif + #if AXIS_IS_L64XX(J) + { J, 0, 0, 0, 0, 0, 0 }, + #endif + #if AXIS_IS_L64XX(K) + { K, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(X2) - { 3, 0, 0, 0, 0, 0, 0 }, + { X2, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(Y2) - { 4, 0, 0, 0, 0, 0, 0 }, + { Y2, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(Z2) - { 5, 0, 0, 0, 0, 0, 0 }, + { Z2, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(Z3) - { 6, 0, 0, 0, 0, 0, 0 }, + { Z3, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(Z4) - { 7, 0, 0, 0, 0, 0, 0 }, + { Z4, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(E0) - { 8, 0, 0, 0, 0, 0, 0 }, + { E0, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(E1) - { 9, 0, 0, 0, 0, 0, 0 }, + { E1, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(E2) - { 10, 0, 0, 0, 0, 0, 0 }, + { E2, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(E3) - { 11, 0, 0, 0, 0, 0, 0 }, + { E3, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(E4) - { 12, 0, 0, 0, 0, 0, 0 }, + { E4, 0, 0, 0, 0, 0, 0 }, #endif #if AXIS_IS_L64XX(E5) - { 13, 0, 0, 0, 0, 0, 0 } + { E5, 0, 0, 0, 0, 0, 0 } #endif #if AXIS_IS_L64XX(E6) - { 14, 0, 0, 0, 0, 0, 0 } + { E6, 0, 0, 0, 0, 0, 0 } #endif #if AXIS_IS_L64XX(E7) - { 16, 0, 0, 0, 0, 0, 0 } + { E7, 0, 0, 0, 0, 0, 0 } #endif }; @@ -884,6 +936,15 @@ void L64XX_Marlin::say_axis(const L64XX_axis_t axis, const uint8_t label/*=true* #if AXIS_IS_L64XX(Z) monitor_update(Z); #endif + #if AXIS_IS_L64XX(I) + monitor_update(I); + #endif + #if AXIS_IS_L64XX(J) + monitor_update(J); + #endif + #if AXIS_IS_L64XX(K) + monitor_update(K); + #endif #if AXIS_IS_L64XX(X2) monitor_update(X2); #endif @@ -917,6 +978,12 @@ void L64XX_Marlin::say_axis(const L64XX_axis_t axis, const uint8_t label/*=true* #if AXIS_IS_L64XX(E5) monitor_update(E5); #endif + #if AXIS_IS_L64XX(E6) + monitor_update(E6); + #endif + #if AXIS_IS_L64XX(E7) + monitor_update(E7); + #endif if (TERN0(L6470_DEBUG, report_L6470_status)) DEBUG_EOL(); diff --git a/Marlin/src/libs/L64XX/L64XX_Marlin.h b/Marlin/src/libs/L64XX/L64XX_Marlin.h index c8d273990f5a..e11d8e872e60 100644 --- a/Marlin/src/libs/L64XX/L64XX_Marlin.h +++ b/Marlin/src/libs/L64XX/L64XX_Marlin.h @@ -35,7 +35,9 @@ #define dSPIN_STEP_CLOCK_REV dSPIN_STEP_CLOCK+1 #define HAS_L64XX_EXTRUDER (AXIS_IS_L64XX(E0) || AXIS_IS_L64XX(E1) || AXIS_IS_L64XX(E2) || AXIS_IS_L64XX(E3) || AXIS_IS_L64XX(E4) || AXIS_IS_L64XX(E5) || AXIS_IS_L64XX(E6) || AXIS_IS_L64XX(E7)) -enum L64XX_axis_t : uint8_t { X, Y, Z, X2, Y2, Z2, Z3, Z4, E0, E1, E2, E3, E4, E5, E6, E7, MAX_L64XX }; +#define _EN_ITEM(N) , E##N +enum L64XX_axis_t : uint8_t { LINEAR_AXIS_LIST(X, Y, Z, I, J, K), X2, Y2, Z2, Z3, Z4 REPEAT(E_STEPPERS, _EN_ITEM), MAX_L64XX }; +#undef _EN_ITEM class L64XX_Marlin : public L64XXHelper { public: diff --git a/Marlin/src/libs/MAX31865.cpp b/Marlin/src/libs/MAX31865.cpp new file mode 100644 index 000000000000..df0702b9fb58 --- /dev/null +++ b/Marlin/src/libs/MAX31865.cpp @@ -0,0 +1,500 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on Based on Adafruit MAX31865 library: + * + * This is a library for the Adafruit PT100/P1000 RTD Sensor w/MAX31865 + * Designed specifically to work with the Adafruit RTD Sensor + * https://www.adafruit.com/products/3328 + * + * This sensor uses SPI to communicate, 4 pins are required to interface. + * + * Adafruit invests time and resources providing this open source code, + * please support Adafruit and open-source hardware by purchasing + * products from Adafruit! + * + * Written by Limor Fried/Ladyada for Adafruit Industries. + * + * Modifications by JoAnn Manges (@GadgetAngel) + * Copyright (c) 2020, JoAnn Manges + * All rights reserved. + */ + +// Useful for RTD debugging. +//#define MAX31865_DEBUG +//#define MAX31865_DEBUG_SPI + +#include "../inc/MarlinConfig.h" + +#if HAS_MAX31865 && !USE_ADAFRUIT_MAX31865 + +//#include // TODO: switch to SPIclass/SoftSPI +#include "MAX31865.h" + +// The maximum speed the MAX31865 can do is 5 MHz +SPISettings MAX31865::spiConfig = SPISettings( + #if defined(TARGET_LPC1768) + SPI_QUARTER_SPEED + #elif defined(ARDUINO_ARCH_STM32) + SPI_CLOCK_DIV4 + #else + 500000 + #endif + , MSBFIRST + , SPI_MODE_1 // CPOL0 CPHA1 +); + +#ifndef LARGE_PINMAP + + /** + * Create the interface object using software (bitbang) SPI for PIN values + * less than or equal to 127. + * + * @param spi_cs the SPI CS pin to use + * @param spi_mosi the SPI MOSI pin to use + * @param spi_miso the SPI MISO pin to use + * @param spi_clk the SPI clock pin to use + */ + MAX31865::MAX31865(int8_t spi_cs, int8_t spi_mosi, int8_t spi_miso, int8_t spi_clk) { + _cs = spi_cs; + _mosi = spi_mosi; + _miso = spi_miso; + _sclk = spi_clk; + } + + /** + * Create the interface object using hardware SPI for PIN for PIN values less + * than or equal to 127. + * + * @param spi_cs the SPI CS pin to use along with the default SPI device + */ + MAX31865::MAX31865(int8_t spi_cs) { + _cs = spi_cs; + _sclk = _miso = _mosi = -1; + } + +#else + + /** + * Create the interface object using software (bitbang) SPI for PIN values + * which are larger than 127. If you have PIN values less than or equal to + * 127 use the other call for SW SPI. + * + * @param spi_cs the SPI CS pin to use + * @param spi_mosi the SPI MOSI pin to use + * @param spi_miso the SPI MISO pin to use + * @param spi_clk the SPI clock pin to use + * @param pin_mapping set to 1 for positive pin values + */ + MAX31865::MAX31865(uint32_t spi_cs, uint32_t spi_mosi, + uint32_t spi_miso, uint32_t spi_clk, + uint8_t pin_mapping) { + _cs = spi_cs; + _mosi = spi_mosi; + _miso = spi_miso; + _sclk = spi_clk; + } + + /** + * Create the interface object using hardware SPI for PIN values which are + * larger than 127. If you have PIN values less than or equal to 127 use + * the other call for HW SPI. + * + * @param spi_cs the SPI CS pin to use along with the default SPI device + * @param pin_mapping set to 1 for positive pin values + */ + MAX31865::MAX31865(uint32_t spi_cs, uint8_t pin_mapping) { + _cs = spi_cs; + _sclk = _miso = _mosi = -1UL; //-1UL or 0xFFFFFFFF or 4294967295 + } + +#endif // LARGE_PINMAP + + +/** + * + * Instance & Class methods + * + */ + + +/** + * Initialize the SPI interface and set the number of RTD wires used + * + * @param wires The number of wires in enum format. Can be MAX31865_2WIRE, MAX31865_3WIRE, or MAX31865_4WIRE. + * @param zero The resistance of the RTD at 0 degC, in ohms. + * @param ref The resistance of the reference resistor, in ohms. + */ +void MAX31865::begin(max31865_numwires_t wires, float zero, float ref) { + Rzero = zero; + Rref = ref; + + OUT_WRITE(_cs, HIGH); + + if (_sclk != TERN(LARGE_PINMAP, -1UL, -1)) { + // Define pin modes for Software SPI + #ifdef MAX31865_DEBUG + SERIAL_ECHOLN("Initializing MAX31865 Software SPI"); + #endif + + OUT_WRITE(_sclk, LOW); + SET_OUTPUT(_mosi); + SET_INPUT(_miso); + } + else { + // Start and configure hardware SPI + #ifdef MAX31865_DEBUG + SERIAL_ECHOLN("Initializing MAX31865 Hardware SPI"); + #endif + + SPI.begin(); + } + + setWires(wires); + enableBias(false); + autoConvert(false); + clearFault(); + + #ifdef MAX31865_DEBUG_SPI + #ifndef LARGE_PINMAP + SERIAL_ECHOLNPGM( + "Regular begin call with _cs: ", _cs, + " _miso: ", _miso, + " _sclk: ", _sclk, + " _mosi: ", _mosi + ); + #else + SERIAL_ECHOLNPGM( + "LARGE_PINMAP begin call with _cs: ", _cs, + " _miso: ", _miso, + " _sclk: ", _sclk, + " _mosi: ", _mosi + ); + #endif // LARGE_PINMAP + + SERIAL_ECHOLNPGM("config: ", readRegister8(MAX31856_CONFIG_REG)); + SERIAL_EOL(); + #endif // MAX31865_DEBUG_SPI +} + +/** + * Read the raw 8-bit FAULTSTAT register + * + * @return The raw unsigned 8-bit FAULT status register + */ +uint8_t MAX31865::readFault() { + return readRegister8(MAX31856_FAULTSTAT_REG); +} + +/** + * Clear all faults in FAULTSTAT. + */ +void MAX31865::clearFault() { + setConfig(MAX31856_CONFIG_FAULTSTAT, 1); +} + +/** + * Whether we want to have continuous conversions (50/60 Hz) + * + * @param b If true, auto conversion is enabled + */ +void MAX31865::autoConvert(bool b) { + setConfig(MAX31856_CONFIG_MODEAUTO, b); +} + +/** + * Whether we want filter out 50Hz noise or 60Hz noise + * + * @param b If true, 50Hz noise is filtered, else 60Hz(default) + */ +void MAX31865::enable50HzFilter(bool b) { + setConfig(MAX31856_CONFIG_FILT50HZ, b); +} + +/** + * Enable the bias voltage on the RTD sensor + * + * @param b If true bias is enabled, else disabled + */ +void MAX31865::enableBias(bool b) { + setConfig(MAX31856_CONFIG_BIAS, b); + + // From the datasheet: + // Note that if VBIAS is off (to reduce supply current between conversions), any filter + // capacitors at the RTDIN inputs need to charge before an accurate conversion can be + // performed. Therefore, enable VBIAS and wait at least 10.5 time constants of the input + // RC network plus an additional 1ms before initiating the conversion. + if (b) + DELAY_US(11500); //11.5ms +} + +/** + * Start a one-shot temperature reading. + */ +void MAX31865::oneShot() { + setConfig(MAX31856_CONFIG_1SHOT, 1); + + // From the datasheet: + // Note that a single conversion requires approximately 52ms in 60Hz filter + // mode or 62.5ms in 50Hz filter mode to complete. 1-Shot is a self-clearing bit. + // TODO: switch this out depending on the filter mode. + DELAY_US(65000); // 65ms +} + +/** + * How many wires we have in our RTD setup, can be MAX31865_2WIRE, + * MAX31865_3WIRE, or MAX31865_4WIRE + * + * @param wires The number of wires in enum format + */ +void MAX31865::setWires(max31865_numwires_t wires) { + uint8_t t = readRegister8(MAX31856_CONFIG_REG); + if (wires == MAX31865_3WIRE) + t |= MAX31856_CONFIG_3WIRE; + else // 2 or 4 wire + t &= ~MAX31856_CONFIG_3WIRE; + writeRegister8(MAX31856_CONFIG_REG, t); +} + +/** + * Read the raw 16-bit value from the RTD_REG in one shot mode. This will include + * the fault bit, D0. + * + * @return The raw unsigned 16-bit register value with ERROR bit attached, NOT temperature! + */ +uint16_t MAX31865::readRaw() { + clearFault(); + enableBias(true); + + oneShot(); + uint16_t rtd = readRegister16(MAX31856_RTDMSB_REG); + + #ifdef MAX31865_DEBUG + SERIAL_ECHOLNPGM("RTD MSB:", (rtd >> 8), " RTD LSB:", (rtd & 0x00FF)); + #endif + + // Disable the bias to lower power dissipation between reads. + // If the ref resistor heats up, the temperature reading will be skewed. + enableBias(false); + + return rtd; +} + +/** + * Calculate and return the resistance value of the connected RTD. + * + * @param refResistor The value of the matching reference resistor, usually 430 or 4300 + * @return The raw RTD resistance value, NOT temperature! + */ +float MAX31865::readResistance() { + // Strip the error bit (D0) and convert to a float ratio. + // less precise method: (readRaw() * Rref) >> 16 + return (((readRaw() >> 1) / 32768.0f) * Rref); +} + +/** + * Read the RTD and pass it to temperature(float) for calculation. + * + * @return Temperature in C + */ +float MAX31865::temperature() { + return temperature(readResistance()); +} + +/** + * Given the 15-bit ADC value, calculate the resistance and pass it to temperature(float) for calculation. + * + * @return Temperature in C + */ +float MAX31865::temperature(uint16_t adcVal) { + return temperature(((adcVal) / 32768.0f) * Rref); +} + +/** + * Calculate the temperature in C from the RTD resistance. + * Uses the technique outlined in this PDF: + * http://www.analog.com/media/en/technical-documentation/application-notes/AN709_0.pdf + * + * @param Rrtd the resistance value in ohms + * @return the temperature in degC + */ +float MAX31865::temperature(float Rrtd) { + float temp = (RTD_Z1 + sqrt(RTD_Z2 + (RTD_Z3 * Rrtd))) / RTD_Z4; + + // From the PDF... + // + // The previous equation is valid only for temperatures of 0°C and above. + // The equation for RRTD(t) that defines negative temperature behavior is a + // fourth-order polynomial (after expanding the third term) and is quite + // impractical to solve for a single expression of temperature as a function + // of resistance. + // + if (temp < 0) { + Rrtd = (Rrtd / Rzero) * 100; // normalize to 100 ohm + float rpoly = Rrtd; + + temp = -242.02 + (2.2228 * rpoly); + rpoly *= Rrtd; // square + temp += 2.5859e-3 * rpoly; + rpoly *= Rrtd; // ^3 + temp -= 4.8260e-6 * rpoly; + rpoly *= Rrtd; // ^4 + temp -= 2.8183e-8 * rpoly; + rpoly *= Rrtd; // ^5 + temp += 1.5243e-10 * rpoly; + } + + return temp; +} + +// +// private: +// + + +/** + * Set a value in the configuration register. + * + * @param config 8-bit value for the config item + * @param enable whether to enable or disable the value + */ +void MAX31865::setConfig(uint8_t config, bool enable) { + uint8_t t = readRegister8(MAX31856_CONFIG_REG); + if (enable) + t |= config; + else + t &= ~config; // disable + writeRegister8(MAX31856_CONFIG_REG, t); +} + +/** + * Read a single byte from the specified register address. + * + * @param addr the register address + * @return the register contents + */ +uint8_t MAX31865::readRegister8(uint8_t addr) { + uint8_t ret = 0; + readRegisterN(addr, &ret, 1); + + return ret; +} + +/** + * Read two bytes: 1 from the specified register address, and 1 from the next address. + * + * @param addr the first register address + * @return both register contents as a single 16-bit int + */ +uint16_t MAX31865::readRegister16(uint8_t addr) { + uint8_t buffer[2] = {0, 0}; + readRegisterN(addr, buffer, 2); + + uint16_t ret = buffer[0]; + ret <<= 8; + ret |= buffer[1]; + + return ret; +} + +/** + * Read +n+ bytes from a specified address into +buffer+. Set D7 to 0 to specify a read. + * + * @param addr the first register address + * @param buffer storage for the read bytes + * @param n the number of bytes to read + */ +void MAX31865::readRegisterN(uint8_t addr, uint8_t buffer[], uint8_t n) { + addr &= 0x7F; // make sure top bit is not set + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + SPI.beginTransaction(spiConfig); + else + WRITE(_sclk, LOW); + + WRITE(_cs, LOW); + spixfer(addr); + + while (n--) { + buffer[0] = spixfer(0xFF); + #ifdef MAX31865_DEBUG_SPI + SERIAL_ECHOLNPGM("buffer read ", n, " data: ", buffer[0]); + #endif + buffer++; + } + + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + SPI.endTransaction(); + + WRITE(_cs, HIGH); +} + +/** + * Write an 8-bit value to a register. Set D7 to 1 to specify a write. + * + * @param addr the address to write to + * @param data the data to write + */ +void MAX31865::writeRegister8(uint8_t addr, uint8_t data) { + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + SPI.beginTransaction(spiConfig); + else + WRITE(_sclk, LOW); + + WRITE(_cs, LOW); + + spixfer(addr | 0x80); // make sure top bit is set + spixfer(data); + + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + SPI.endTransaction(); + + WRITE(_cs, HIGH); +} + +/** + * Transfer SPI data +x+ and read the response. From the datasheet... + * Input data (SDI) is latched on the internal strobe edge and output data (SDO) is + * shifted out on the shift edge. There is one clock for each bit transferred. + * Address and data bits are transferred in groups of eight, MSB first. + * + * @param x an 8-bit chunk of data to write + * @return the 8-bit response + */ +uint8_t MAX31865::spixfer(uint8_t x) { + if (_sclk == TERN(LARGE_PINMAP, -1UL, -1)) + return SPI.transfer(x); + + uint8_t reply = 0; + for (int i = 7; i >= 0; i--) { + reply <<= 1; + WRITE(_sclk, HIGH); + WRITE(_mosi, x & (1 << i)); + WRITE(_sclk, LOW); + if (READ(_miso)) + reply |= 1; + } + + return reply; +} + +#endif // HAS_MAX31865 && !USE_ADAFRUIT_MAX31865 diff --git a/Marlin/src/libs/MAX31865.h b/Marlin/src/libs/MAX31865.h new file mode 100644 index 000000000000..5d50e870ecd2 --- /dev/null +++ b/Marlin/src/libs/MAX31865.h @@ -0,0 +1,131 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * Based on Adafruit MAX31865 library: + * + * This is a library for the Adafruit PT100/P1000 RTD Sensor w/MAX31865 + * Designed specifically to work with the Adafruit RTD Sensor + * https://www.adafruit.com/products/3328 + * + * This sensor uses SPI to communicate, 4 pins are required to interface. + * + * Adafruit invests time and resources providing this open source code, + * please support Adafruit and open-source hardware by purchasing + * products from Adafruit! + * + * Written by Limor Fried/Ladyada for Adafruit Industries. + * + * Modifications by JoAnn Manges (@GadgetAngel) + * Copyright (c) 2020, JoAnn Manges + * All rights reserved. + */ +#pragma once + +#include "../inc/MarlinConfig.h" +#include "../HAL/shared/Delay.h" +#include HAL_PATH(../HAL, MarlinSPI.h) + +#define MAX31856_CONFIG_REG 0x00 +#define MAX31856_CONFIG_BIAS 0x80 +#define MAX31856_CONFIG_MODEAUTO 0x40 +#define MAX31856_CONFIG_MODEOFF 0x00 +#define MAX31856_CONFIG_1SHOT 0x20 +#define MAX31856_CONFIG_3WIRE 0x10 +#define MAX31856_CONFIG_24WIRE 0x00 +#define MAX31856_CONFIG_FAULTSTAT 0x02 +#define MAX31856_CONFIG_FILT50HZ 0x01 +#define MAX31856_CONFIG_FILT60HZ 0x00 + +#define MAX31856_RTDMSB_REG 0x01 +#define MAX31856_RTDLSB_REG 0x02 +#define MAX31856_HFAULTMSB_REG 0x03 +#define MAX31856_HFAULTLSB_REG 0x04 +#define MAX31856_LFAULTMSB_REG 0x05 +#define MAX31856_LFAULTLSB_REG 0x06 +#define MAX31856_FAULTSTAT_REG 0x07 + +#define MAX31865_FAULT_HIGHTHRESH 0x80 // D7 +#define MAX31865_FAULT_LOWTHRESH 0x40 // D6 +#define MAX31865_FAULT_REFINLOW 0x20 // D5 +#define MAX31865_FAULT_REFINHIGH 0x10 // D4 +#define MAX31865_FAULT_RTDINLOW 0x08 // D3 +#define MAX31865_FAULT_OVUV 0x04 // D2 + +// http://www.analog.com/media/en/technical-documentation/application-notes/AN709_0.pdf +// constants for calculating temperature from the measured RTD resistance. +#define RTD_Z1 -0.0039083 +#define RTD_Z2 0.00001758480889 +#define RTD_Z3 -0.0000000231 +#define RTD_Z4 -0.000001155 + +typedef enum max31865_numwires { + MAX31865_2WIRE = 0, + MAX31865_3WIRE = 1, + MAX31865_4WIRE = 0 +} max31865_numwires_t; + +/* Interface class for the MAX31865 RTD Sensor reader */ +class MAX31865 { +private: + static SPISettings spiConfig; + + TERN(LARGE_PINMAP, uint32_t, uint8_t) _sclk, _miso, _mosi, _cs; + float Rzero, Rref; + + void setConfig(uint8_t config, bool enable); + + void readRegisterN(uint8_t addr, uint8_t buffer[], uint8_t n); + uint8_t readRegister8(uint8_t addr); + uint16_t readRegister16(uint8_t addr); + + void writeRegister8(uint8_t addr, uint8_t reg); + uint8_t spixfer(uint8_t addr); + +public: + #ifdef LARGE_PINMAP + MAX31865(uint32_t spi_cs, uint8_t pin_mapping); + MAX31865(uint32_t spi_cs, uint32_t spi_mosi, uint32_t spi_miso, + uint32_t spi_clk, uint8_t pin_mapping); + #else + MAX31865(int8_t spi_cs); + MAX31865(int8_t spi_cs, int8_t spi_mosi, int8_t spi_miso, + int8_t spi_clk); + #endif + + void begin(max31865_numwires_t wires, float zero, float ref); + + uint8_t readFault(); + void clearFault(); + + void setWires(max31865_numwires_t wires); + void autoConvert(bool b); + void enable50HzFilter(bool b); + void enableBias(bool b); + void oneShot(); + + uint16_t readRaw(); + float readResistance(); + float temperature(); + float temperature(uint16_t adcVal); + float temperature(float Rrtd); +}; diff --git a/Marlin/src/libs/W25Qxx.cpp b/Marlin/src/libs/W25Qxx.cpp index be5b4290dd1a..b458a7c965ef 100644 --- a/Marlin/src/libs/W25Qxx.cpp +++ b/Marlin/src/libs/W25Qxx.cpp @@ -28,26 +28,14 @@ W25QXXFlash W25QXX; -#ifndef SPI_FLASH_MISO_PIN - #define SPI_FLASH_MISO_PIN W25QXX_MISO_PIN -#endif -#ifndef SPI_FLASH_MOSI_PIN - #define SPI_FLASH_MOSI_PIN W25QXX_MOSI_PIN -#endif -#ifndef SPI_FLASH_SCK_PIN - #define SPI_FLASH_SCK_PIN W25QXX_SCK_PIN -#endif -#ifndef SPI_FLASH_CS_PIN - #define SPI_FLASH_CS_PIN W25QXX_CS_PIN -#endif #ifndef NC #define NC -1 #endif MarlinSPI W25QXXFlash::mySPI(SPI_FLASH_MOSI_PIN, SPI_FLASH_MISO_PIN, SPI_FLASH_SCK_PIN, NC); -#define W25QXX_CS_H OUT_WRITE(SPI_FLASH_CS_PIN, HIGH) -#define W25QXX_CS_L OUT_WRITE(SPI_FLASH_CS_PIN, LOW) +#define SPI_FLASH_CS_H() OUT_WRITE(SPI_FLASH_CS_PIN, HIGH) +#define SPI_FLASH_CS_L() OUT_WRITE(SPI_FLASH_CS_PIN, LOW) bool flash_dma_mode = true; @@ -106,7 +94,7 @@ uint8_t W25QXXFlash::spi_flash_read_write_byte(uint8_t data) { * * @details Uses DMA */ -void W25QXXFlash::spi_flash_Read(uint8_t* buf, uint16_t nbyte) { +void W25QXXFlash::spi_flash_Read(uint8_t *buf, uint16_t nbyte) { mySPI.dmaTransfer(0, const_cast(buf), nbyte); } @@ -127,38 +115,38 @@ void W25QXXFlash::spi_flash_Send(uint8_t b) { mySPI.transfer(b); } * * @details Use DMA */ -void W25QXXFlash::spi_flash_SendBlock(uint8_t token, const uint8_t* buf) { +void W25QXXFlash::spi_flash_SendBlock(uint8_t token, const uint8_t *buf) { mySPI.transfer(token); mySPI.dmaSend(const_cast(buf), 512); } uint16_t W25QXXFlash::W25QXX_ReadID(void) { uint16_t Temp = 0; - W25QXX_CS_L; + SPI_FLASH_CS_L(); spi_flash_Send(0x90); spi_flash_Send(0x00); spi_flash_Send(0x00); spi_flash_Send(0x00); Temp |= spi_flash_Rec() << 8; Temp |= spi_flash_Rec(); - W25QXX_CS_H; + SPI_FLASH_CS_H(); return Temp; } void W25QXXFlash::SPI_FLASH_WriteEnable(void) { // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send "Write Enable" instruction spi_flash_Send(W25X_WriteEnable); // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); } /******************************************************************************* * Function Name : SPI_FLASH_WaitForWriteEnd * Description : Polls the status of the Write In Progress (WIP) flag in the -* FLASH's status register and loop until write opertaion -* has completed. +* FLASH's status register and loop until write operation has +* completed. * Input : None * Output : None * Return : None @@ -167,7 +155,7 @@ void W25QXXFlash::SPI_FLASH_WaitForWriteEnd(void) { uint8_t FLASH_Status = 0; // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send "Read Status Register" instruction spi_flash_Send(W25X_ReadStatusReg); @@ -179,7 +167,7 @@ void W25QXXFlash::SPI_FLASH_WaitForWriteEnd(void) { while ((FLASH_Status & WIP_Flag) == 0x01); // Write in progress // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); } void W25QXXFlash::SPI_FLASH_SectorErase(uint32_t SectorAddr) { @@ -188,35 +176,35 @@ void W25QXXFlash::SPI_FLASH_SectorErase(uint32_t SectorAddr) { // Sector Erase // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send Sector Erase instruction spi_flash_Send(W25X_SectorErase); - // Send SectorAddr high nibble address byte + // Send SectorAddr high nybble address byte spi_flash_Send((SectorAddr & 0xFF0000) >> 16); - // Send SectorAddr medium nibble address byte + // Send SectorAddr medium nybble address byte spi_flash_Send((SectorAddr & 0xFF00) >> 8); - // Send SectorAddr low nibble address byte + // Send SectorAddr low nybble address byte spi_flash_Send(SectorAddr & 0xFF); // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); // Wait the end of Flash writing SPI_FLASH_WaitForWriteEnd(); } void W25QXXFlash::SPI_FLASH_BlockErase(uint32_t BlockAddr) { SPI_FLASH_WriteEnable(); - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send Sector Erase instruction spi_flash_Send(W25X_BlockErase); - // Send SectorAddr high nibble address byte + // Send SectorAddr high nybble address byte spi_flash_Send((BlockAddr & 0xFF0000) >> 16); - // Send SectorAddr medium nibble address byte + // Send SectorAddr medium nybble address byte spi_flash_Send((BlockAddr & 0xFF00) >> 8); - // Send SectorAddr low nibble address byte + // Send SectorAddr low nybble address byte spi_flash_Send(BlockAddr & 0xFF); - W25QXX_CS_H; + SPI_FLASH_CS_H(); SPI_FLASH_WaitForWriteEnd(); } @@ -234,12 +222,12 @@ void W25QXXFlash::SPI_FLASH_BulkErase(void) { // Bulk Erase // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send Bulk Erase instruction spi_flash_Send(W25X_ChipErase); // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); // Wait the end of Flash writing SPI_FLASH_WaitForWriteEnd(); } @@ -257,19 +245,19 @@ void W25QXXFlash::SPI_FLASH_BulkErase(void) { * Output : None * Return : None *******************************************************************************/ -void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite) { +void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite) { // Enable the write access to the FLASH SPI_FLASH_WriteEnable(); // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send "Write to Memory " instruction spi_flash_Send(W25X_PageProgram); - // Send WriteAddr high nibble address byte to write to + // Send WriteAddr high nybble address byte to write to spi_flash_Send((WriteAddr & 0xFF0000) >> 16); - // Send WriteAddr medium nibble address byte to write to + // Send WriteAddr medium nybble address byte to write to spi_flash_Send((WriteAddr & 0xFF00) >> 8); - // Send WriteAddr low nibble address byte to write to + // Send WriteAddr low nybble address byte to write to spi_flash_Send(WriteAddr & 0xFF); NOMORE(NumByteToWrite, SPI_FLASH_PerWritePageSize); @@ -283,7 +271,7 @@ void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint } // Deselect the FLASH: Chip Select high - W25QXX_CS_H; + SPI_FLASH_CS_H(); // Wait the end of Flash writing SPI_FLASH_WaitForWriteEnd(); @@ -300,7 +288,7 @@ void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint * Output : None * Return : None *******************************************************************************/ -void W25QXXFlash::SPI_FLASH_BufferWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite) { +void W25QXXFlash::SPI_FLASH_BufferWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite) { uint8_t NumOfPage = 0, NumOfSingle = 0, Addr = 0, count = 0, temp = 0; Addr = WriteAddr % SPI_FLASH_PageSize; @@ -364,18 +352,18 @@ void W25QXXFlash::SPI_FLASH_BufferWrite(uint8_t* pBuffer, uint32_t WriteAddr, ui * Output : None * Return : None *******************************************************************************/ -void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t* pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead) { +void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead) { // Select the FLASH: Chip Select low - W25QXX_CS_L; + SPI_FLASH_CS_L(); // Send "Read from Memory " instruction spi_flash_Send(W25X_ReadData); - // Send ReadAddr high nibble address byte to read from + // Send ReadAddr high nybble address byte to read from spi_flash_Send((ReadAddr & 0xFF0000) >> 16); - // Send ReadAddr medium nibble address byte to read from + // Send ReadAddr medium nybble address byte to read from spi_flash_Send((ReadAddr & 0xFF00) >> 8); - // Send ReadAddr low nibble address byte to read from + // Send ReadAddr low nybble address byte to read from spi_flash_Send(ReadAddr & 0xFF); if (NumByteToRead <= 32 || !flash_dma_mode) { @@ -389,7 +377,7 @@ void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t* pBuffer, uint32_t ReadAddr, uint else spi_flash_Read(pBuffer, NumByteToRead); - W25QXX_CS_H; + SPI_FLASH_CS_H(); } #endif // HAS_SPI_FLASH diff --git a/Marlin/src/libs/W25Qxx.h b/Marlin/src/libs/W25Qxx.h index eddae6b1f27d..1133af2e74dd 100644 --- a/Marlin/src/libs/W25Qxx.h +++ b/Marlin/src/libs/W25Qxx.h @@ -57,18 +57,18 @@ class W25QXXFlash { void init(uint8_t spiRate); static uint8_t spi_flash_Rec(); static uint8_t spi_flash_read_write_byte(uint8_t data); - static void spi_flash_Read(uint8_t* buf, uint16_t nbyte); + static void spi_flash_Read(uint8_t *buf, uint16_t nbyte); static void spi_flash_Send(uint8_t b); - static void spi_flash_SendBlock(uint8_t token, const uint8_t* buf); + static void spi_flash_SendBlock(uint8_t token, const uint8_t *buf); static uint16_t W25QXX_ReadID(void); static void SPI_FLASH_WriteEnable(void); static void SPI_FLASH_WaitForWriteEnd(void); static void SPI_FLASH_SectorErase(uint32_t SectorAddr); static void SPI_FLASH_BlockErase(uint32_t BlockAddr); static void SPI_FLASH_BulkErase(void); - static void SPI_FLASH_PageWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite); - static void SPI_FLASH_BufferWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite); - static void SPI_FLASH_BufferRead(uint8_t* pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead); + static void SPI_FLASH_PageWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite); + static void SPI_FLASH_BufferWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite); + static void SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead); }; extern W25QXXFlash W25QXX; diff --git a/Marlin/src/libs/autoreport.h b/Marlin/src/libs/autoreport.h index 2c0a043fbf7b..a6bc5adbf770 100644 --- a/Marlin/src/libs/autoreport.h +++ b/Marlin/src/libs/autoreport.h @@ -28,8 +28,8 @@ struct AutoReporter { millis_t next_report_ms; uint8_t report_interval; #if HAS_MULTI_SERIAL - serial_index_t report_port_mask; - AutoReporter() : report_port_mask(SERIAL_ALL) {} + SerialMask report_port_mask; + AutoReporter() : report_port_mask(SerialMask::All) {} #endif inline void set_interval(uint8_t seconds, const uint8_t limit=60) { @@ -42,8 +42,9 @@ struct AutoReporter { const millis_t ms = millis(); if (ELAPSED(ms, next_report_ms)) { next_report_ms = ms + SEC_TO_MS(report_interval); - TERN_(HAS_MULTI_SERIAL, PORT_REDIRECT(report_port_mask)); + PORT_REDIRECT(report_port_mask); Helper::report(); + //PORT_RESTORE(); } } }; diff --git a/Marlin/src/libs/bresenham.h b/Marlin/src/libs/bresenham.h index ade231e26dc7..865c43c29e0b 100644 --- a/Marlin/src/libs/bresenham.h +++ b/Marlin/src/libs/bresenham.h @@ -120,11 +120,11 @@ class Bresenham { static void report(const uint8_t index) { if (index < Cfg::SIZE) { - SERIAL_ECHOPAIR("bresenham ", int(index), " : (", dividend[index], "/", divisor, ") "); + SERIAL_ECHOPGM("bresenham ", index, " : (", dividend[index], "/", divisor, ") "); if (counter[index] >= 0) SERIAL_CHAR(' '); if (labs(counter[index]) < 100) { SERIAL_CHAR(' '); if (labs(counter[index]) < 10) SERIAL_CHAR(' '); } SERIAL_ECHO(counter[index]); - SERIAL_ECHOLNPAIR(" ... ", value[index]); + SERIAL_ECHOLNPGM(" ... ", value[index]); } } diff --git a/Marlin/src/libs/buzzer.h b/Marlin/src/libs/buzzer.h index b86fe998fa05..21b69002ffd3 100644 --- a/Marlin/src/libs/buzzer.h +++ b/Marlin/src/libs/buzzer.h @@ -56,7 +56,7 @@ static CircularQueue buffer; /** - * @brief Inverts the sate of a digital PIN + * @brief Inverts the state of a digital PIN * @details This will invert the current state of an digital IO pin. */ FORCE_INLINE static void invert() { TOGGLE(BEEPER_PIN); } diff --git a/Marlin/src/libs/duration_t.h b/Marlin/src/libs/duration_t.h index bd654b7bad1e..4d722a296c92 100644 --- a/Marlin/src/libs/duration_t.h +++ b/Marlin/src/libs/duration_t.h @@ -113,9 +113,10 @@ struct duration_t { /** * @brief Formats the duration as a string - * @details String will be formated using a "full" representation of duration + * @details String will be formatted using a "full" representation of duration * - * @param buffer The array pointed to must be able to accommodate 21 bytes + * @param buffer The array pointed to must be able to accommodate 22 bytes + * (21 for the string, 1 more for the terminating nul) * * Output examples: * 123456789012345678901 (strlen) @@ -142,7 +143,7 @@ struct duration_t { /** * @brief Formats the duration as a string - * @details String will be formated using a "digital" representation of duration + * @details String will be formatted using a "digital" representation of duration * * @param buffer The array pointed to must be able to accommodate 10 bytes * diff --git a/Marlin/src/libs/hex_print.cpp b/Marlin/src/libs/hex_print.cpp index 0f746d628470..1958084abb2d 100644 --- a/Marlin/src/libs/hex_print.cpp +++ b/Marlin/src/libs/hex_print.cpp @@ -80,7 +80,7 @@ void print_hex_address(const void * const w) { SERIAL_ECHO(hex_address(w)); } void print_hex_long(const uint32_t w, const char delimiter) { SERIAL_ECHOPGM("0x"); - for (int B = 24; B >= 8; B -= 8){ + for (int B = 24; B >= 8; B -= 8) { print_hex_byte(w >> B); SERIAL_CHAR(delimiter); } diff --git a/Marlin/src/libs/least_squares_fit.cpp b/Marlin/src/libs/least_squares_fit.cpp index c7593c049fc4..aac21c019295 100644 --- a/Marlin/src/libs/least_squares_fit.cpp +++ b/Marlin/src/libs/least_squares_fit.cpp @@ -46,23 +46,23 @@ int finish_incremental_LSF(struct linear_fit_data *lsf) { if (N == 0.0) return 1; - lsf->xbar /= N; - lsf->ybar /= N; - lsf->zbar /= N; - lsf->x2bar = lsf->x2bar / N - sq(lsf->xbar); - lsf->y2bar = lsf->y2bar / N - sq(lsf->ybar); - lsf->z2bar = lsf->z2bar / N - sq(lsf->zbar); - lsf->xybar = lsf->xybar / N - lsf->xbar * lsf->ybar; - lsf->yzbar = lsf->yzbar / N - lsf->ybar * lsf->zbar; - lsf->xzbar = lsf->xzbar / N - lsf->xbar * lsf->zbar; - const float DD = lsf->x2bar * lsf->y2bar - sq(lsf->xybar); + const float RN = 1.0f / N, + xbar = lsf->xbar * RN, + ybar = lsf->ybar * RN, + zbar = lsf->zbar * RN, + x2bar = lsf->x2bar * RN - sq(xbar), + y2bar = lsf->y2bar * RN - sq(ybar), + xybar = lsf->xybar * RN - xbar * ybar, + yzbar = lsf->yzbar * RN - ybar * zbar, + xzbar = lsf->xzbar * RN - xbar * zbar, + DD = x2bar * y2bar - sq(xybar); if (ABS(DD) <= 1e-10 * (lsf->max_absx + lsf->max_absy)) return 1; - lsf->A = (lsf->yzbar * lsf->xybar - lsf->xzbar * lsf->y2bar) / DD; - lsf->B = (lsf->xzbar * lsf->xybar - lsf->yzbar * lsf->x2bar) / DD; - lsf->D = -(lsf->zbar + lsf->A * lsf->xbar + lsf->B * lsf->ybar); + lsf->A = (yzbar * xybar - xzbar * y2bar) / DD; + lsf->B = (xzbar * xybar - yzbar * x2bar) / DD; + lsf->D = -(zbar + lsf->A * xbar + lsf->B * ybar); return 0; } diff --git a/Marlin/src/libs/least_squares_fit.h b/Marlin/src/libs/least_squares_fit.h index 44ca8afc76d8..374a1f5adacd 100644 --- a/Marlin/src/libs/least_squares_fit.h +++ b/Marlin/src/libs/least_squares_fit.h @@ -37,7 +37,7 @@ struct linear_fit_data { float xbar, ybar, zbar, - x2bar, y2bar, z2bar, + x2bar, y2bar, xybar, xzbar, yzbar, max_absx, max_absy, A, B, D, N; @@ -47,7 +47,7 @@ inline void incremental_LSF_reset(struct linear_fit_data *lsf) { memset(lsf, 0, sizeof(linear_fit_data)); } -inline void incremental_WLSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z, const float &w) { +inline void incremental_WLSF(struct linear_fit_data *lsf, const_float_t x, const_float_t y, const_float_t z, const_float_t w) { // weight each accumulator by factor w, including the "number" of samples // (analogous to calling inc_LSF twice with same values to weight it by 2X) const float wx = w * x, wy = w * y, wz = w * z; @@ -56,7 +56,6 @@ inline void incremental_WLSF(struct linear_fit_data *lsf, const float &x, const lsf->zbar += wz; lsf->x2bar += wx * x; lsf->y2bar += wy * y; - lsf->z2bar += wz * z; lsf->xybar += wx * y; lsf->xzbar += wx * z; lsf->yzbar += wy * z; @@ -64,17 +63,16 @@ inline void incremental_WLSF(struct linear_fit_data *lsf, const float &x, const lsf->max_absx = _MAX(ABS(wx), lsf->max_absx); lsf->max_absy = _MAX(ABS(wy), lsf->max_absy); } -inline void incremental_WLSF(struct linear_fit_data *lsf, const xy_pos_t &pos, const float &z, const float &w) { +inline void incremental_WLSF(struct linear_fit_data *lsf, const xy_pos_t &pos, const_float_t z, const_float_t w) { incremental_WLSF(lsf, pos.x, pos.y, z, w); } -inline void incremental_LSF(struct linear_fit_data *lsf, const float &x, const float &y, const float &z) { +inline void incremental_LSF(struct linear_fit_data *lsf, const_float_t x, const_float_t y, const_float_t z) { lsf->xbar += x; lsf->ybar += y; lsf->zbar += z; lsf->x2bar += sq(x); lsf->y2bar += sq(y); - lsf->z2bar += sq(z); lsf->xybar += x * y; lsf->xzbar += x * z; lsf->yzbar += y * z; @@ -82,7 +80,7 @@ inline void incremental_LSF(struct linear_fit_data *lsf, const float &x, const f lsf->max_absy = _MAX(ABS(y), lsf->max_absy); lsf->N += 1.0; } -inline void incremental_LSF(struct linear_fit_data *lsf, const xy_pos_t &pos, const float &z) { +inline void incremental_LSF(struct linear_fit_data *lsf, const xy_pos_t &pos, const_float_t z) { incremental_LSF(lsf, pos.x, pos.y, z); } diff --git a/Marlin/src/libs/nozzle.cpp b/Marlin/src/libs/nozzle.cpp index 4277e8d8d047..e277216ab4e5 100644 --- a/Marlin/src/libs/nozzle.cpp +++ b/Marlin/src/libs/nozzle.cpp @@ -46,7 +46,9 @@ Nozzle nozzle; * @param strokes number of strokes to execute */ void Nozzle::stroke(const xyz_pos_t &start, const xyz_pos_t &end, const uint8_t &strokes) { - TERN_(NOZZLE_CLEAN_GOBACK, const xyz_pos_t oldpos = current_position); + #if ENABLED(NOZZLE_CLEAN_GOBACK) + const xyz_pos_t oldpos = current_position; + #endif // Move to the starting point #if ENABLED(NOZZLE_CLEAN_NO_Z) @@ -86,7 +88,9 @@ Nozzle nozzle; const xy_pos_t diff = end - start; if (!diff.x || !diff.y) return; - TERN_(NOZZLE_CLEAN_GOBACK, const xyz_pos_t back = current_position); + #if ENABLED(NOZZLE_CLEAN_GOBACK) + const xyz_pos_t back = current_position; + #endif #if ENABLED(NOZZLE_CLEAN_NO_Z) do_blocking_move_to_xy(start); @@ -126,10 +130,12 @@ Nozzle nozzle; * @param strokes number of strokes to execute * @param radius radius of circle */ - void Nozzle::circle(const xyz_pos_t &start, const xyz_pos_t &middle, const uint8_t &strokes, const float &radius) { + void Nozzle::circle(const xyz_pos_t &start, const xyz_pos_t &middle, const uint8_t &strokes, const_float_t radius) { if (strokes == 0) return; - TERN_(NOZZLE_CLEAN_GOBACK, const xyz_pos_t back = current_position); + #if ENABLED(NOZZLE_CLEAN_GOBACK) + const xyz_pos_t back = current_position; + #endif TERN(NOZZLE_CLEAN_NO_Z, do_blocking_move_to_xy, do_blocking_move_to)(start); LOOP_L_N(s, strokes) @@ -152,7 +158,7 @@ Nozzle nozzle; * @param pattern one of the available patterns * @param argument depends on the cleaning pattern */ - void Nozzle::clean(const uint8_t &pattern, const uint8_t &strokes, const float &radius, const uint8_t &objects, const uint8_t cleans) { + void Nozzle::clean(const uint8_t &pattern, const uint8_t &strokes, const_float_t radius, const uint8_t &objects, const uint8_t cleans) { xyz_pos_t start[HOTENDS] = NOZZLE_CLEAN_START_POINT, end[HOTENDS] = NOZZLE_CLEAN_END_POINT, middle[HOTENDS] = NOZZLE_CLEAN_CIRCLE_MIDDLE; const uint8_t arrPos = ANY(SINGLENOZZLE, MIXING_EXTRUDER) ? 0 : active_extruder; @@ -219,6 +225,18 @@ Nozzle nozzle; #if ENABLED(NOZZLE_PARK_FEATURE) + float Nozzle::park_mode_0_height(const_float_t park_z) { + // Apply a minimum raise, if specified. Use park.z as a minimum height instead. + return _MAX(park_z, // Minimum height over 0 based on input + _MIN(Z_MAX_POS, // Maximum height is fixed + #ifdef NOZZLE_PARK_Z_RAISE_MIN + NOZZLE_PARK_Z_RAISE_MIN + // Minimum raise... + #endif + current_position.z // ...over current position + ) + ); + } + void Nozzle::park(const uint8_t z_action, const xyz_pos_t &park/*=NOZZLE_PARK_POINT*/) { constexpr feedRate_t fr_xy = NOZZLE_PARK_XY_FEEDRATE, fr_z = NOZZLE_PARK_Z_FEEDRATE; @@ -231,15 +249,9 @@ Nozzle nozzle; do_blocking_move_to_z(_MIN(current_position.z + park.z, Z_MAX_POS), fr_z); break; - default: { - // Apply a minimum raise, overriding G27 Z - const float min_raised_z =_MIN(Z_MAX_POS, current_position.z - #ifdef NOZZLE_PARK_Z_RAISE_MIN - + NOZZLE_PARK_Z_RAISE_MIN - #endif - ); - do_blocking_move_to_z(_MAX(park.z, min_raised_z), fr_z); - } break; + default: // Raise by NOZZLE_PARK_Z_RAISE_MIN, use park.z as a minimum height + do_blocking_move_to_z(park_mode_0_height(park.z), fr_z); + break; } do_blocking_move_to_xy( diff --git a/Marlin/src/libs/nozzle.h b/Marlin/src/libs/nozzle.h index 81594b13817d..7bbd0e35c11b 100644 --- a/Marlin/src/libs/nozzle.h +++ b/Marlin/src/libs/nozzle.h @@ -62,7 +62,7 @@ class Nozzle { * @param strokes number of strokes to execute * @param radius radius of circle */ - static void circle(const xyz_pos_t &start, const xyz_pos_t &middle, const uint8_t &strokes, const float &radius) _Os; + static void circle(const xyz_pos_t &start, const xyz_pos_t &middle, const uint8_t &strokes, const_float_t radius) _Os; #endif // NOZZLE_CLEAN_FEATURE @@ -77,12 +77,13 @@ class Nozzle { * @param pattern one of the available patterns * @param argument depends on the cleaning pattern */ - static void clean(const uint8_t &pattern, const uint8_t &strokes, const float &radius, const uint8_t &objects, const uint8_t cleans) _Os; + static void clean(const uint8_t &pattern, const uint8_t &strokes, const_float_t radius, const uint8_t &objects, const uint8_t cleans) _Os; #endif // NOZZLE_CLEAN_FEATURE #if ENABLED(NOZZLE_PARK_FEATURE) + static float park_mode_0_height(const_float_t park_z) _Os; static void park(const uint8_t z_action, const xyz_pos_t &park=NOZZLE_PARK_POINT) _Os; #endif diff --git a/Marlin/src/libs/numtostr.cpp b/Marlin/src/libs/numtostr.cpp index 90696e9ad3c4..1e1ac0571012 100644 --- a/Marlin/src/libs/numtostr.cpp +++ b/Marlin/src/libs/numtostr.cpp @@ -177,8 +177,17 @@ const char* i16tostr4signrj(const int16_t i) { return &conv[3]; } +// Convert unsigned float to string with 1.1 format +const char* ftostr11ns(const_float_t f) { + const long i = UINTFLOAT(f, 1); + conv[4] = DIGIMOD(i, 10); + conv[5] = '.'; + conv[6] = DIGIMOD(i, 1); + return &conv[4]; +} + // Convert unsigned float to string with 1.23 format -const char* ftostr12ns(const float &f) { +const char* ftostr12ns(const_float_t f) { const long i = UINTFLOAT(f, 2); conv[3] = DIGIMOD(i, 100); conv[4] = '.'; @@ -188,7 +197,7 @@ const char* ftostr12ns(const float &f) { } // Convert unsigned float to string with 12.3 format -const char* ftostr31ns(const float &f) { +const char* ftostr31ns(const_float_t f) { const long i = UINTFLOAT(f, 1); conv[3] = DIGIMOD(i, 100); conv[4] = DIGIMOD(i, 10); @@ -198,7 +207,7 @@ const char* ftostr31ns(const float &f) { } // Convert unsigned float to string with 123.4 format -const char* ftostr41ns(const float &f) { +const char* ftostr41ns(const_float_t f) { const long i = UINTFLOAT(f, 1); conv[2] = DIGIMOD(i, 1000); conv[3] = DIGIMOD(i, 100); @@ -209,7 +218,7 @@ const char* ftostr41ns(const float &f) { } // Convert signed float to fixed-length string with 12.34 / _2.34 / -2.34 or -23.45 / 123.45 format -const char* ftostr42_52(const float &f) { +const char* ftostr42_52(const_float_t f) { if (f <= -10 || f >= 100) return ftostr52(f); // -23.45 / 123.45 long i = INTFLOAT(f, 2); conv[2] = (f >= 0 && f < 10) ? ' ' : MINUSOR(i, DIGIMOD(i, 1000)); @@ -221,7 +230,7 @@ const char* ftostr42_52(const float &f) { } // Convert signed float to fixed-length string with 023.45 / -23.45 format -const char* ftostr52(const float &f) { +const char* ftostr52(const_float_t f) { long i = INTFLOAT(f, 2); conv[1] = MINUSOR(i, DIGIMOD(i, 10000)); conv[2] = DIGIMOD(i, 1000); @@ -233,7 +242,7 @@ const char* ftostr52(const float &f) { } // Convert signed float to fixed-length string with 12.345 / _2.345 / -2.345 or -23.45 / 123.45 format -const char* ftostr53_63(const float &f) { +const char* ftostr53_63(const_float_t f) { if (f <= -10 || f >= 100) return ftostr63(f); // -23.456 / 123.456 long i = INTFLOAT(f, 3); conv[1] = (f >= 0 && f < 10) ? ' ' : MINUSOR(i, DIGIMOD(i, 10000)); @@ -246,7 +255,7 @@ const char* ftostr53_63(const float &f) { } // Convert signed float to fixed-length string with 023.456 / -23.456 format -const char* ftostr63(const float &f) { +const char* ftostr63(const_float_t f) { long i = INTFLOAT(f, 3); conv[0] = MINUSOR(i, DIGIMOD(i, 100000)); conv[1] = DIGIMOD(i, 10000); @@ -261,7 +270,7 @@ const char* ftostr63(const float &f) { #if ENABLED(LCD_DECIMAL_SMALL_XY) // Convert float to rj string with 1234, _123, -123, _-12, 12.3, _1.2, or -1.2 format - const char* ftostr4sign(const float &f) { + const char* ftostr4sign(const_float_t f) { const int i = INTFLOAT(f, 1); if (!WITHIN(i, -99, 999)) return i16tostr4signrj((int)f); const bool neg = i < 0; @@ -276,7 +285,7 @@ const char* ftostr63(const float &f) { #endif // Convert float to fixed-length string with +12.3 / -12.3 format -const char* ftostr31sign(const float &f) { +const char* ftostr31sign(const_float_t f) { int i = INTFLOAT(f, 1); conv[2] = MINUSOR(i, '+'); conv[3] = DIGIMOD(i, 100); @@ -287,7 +296,7 @@ const char* ftostr31sign(const float &f) { } // Convert float to fixed-length string with +123.4 / -123.4 format -const char* ftostr41sign(const float &f) { +const char* ftostr41sign(const_float_t f) { int i = INTFLOAT(f, 1); conv[1] = MINUSOR(i, '+'); conv[2] = DIGIMOD(i, 1000); @@ -299,7 +308,7 @@ const char* ftostr41sign(const float &f) { } // Convert signed float to string (6 digit) with -1.234 / _0.000 / +1.234 format -const char* ftostr43sign(const float &f, char plus/*=' '*/) { +const char* ftostr43sign(const_float_t f, char plus/*=' '*/) { long i = INTFLOAT(f, 3); conv[1] = i ? MINUSOR(i, plus) : ' '; conv[2] = DIGIMOD(i, 1000); @@ -311,7 +320,7 @@ const char* ftostr43sign(const float &f, char plus/*=' '*/) { } // Convert signed float to string (5 digit) with -1.2345 / _0.0000 / +1.2345 format -const char* ftostr54sign(const float &f, char plus/*=' '*/) { +const char* ftostr54sign(const_float_t f, char plus/*=' '*/) { long i = INTFLOAT(f, 4); conv[0] = i ? MINUSOR(i, plus) : ' '; conv[1] = DIGIMOD(i, 10000); @@ -324,13 +333,13 @@ const char* ftostr54sign(const float &f, char plus/*=' '*/) { } // Convert unsigned float to rj string with 12345 format -const char* ftostr5rj(const float &f) { +const char* ftostr5rj(const_float_t f) { const long i = UINTFLOAT(f, 0); return ui16tostr5rj(i); } // Convert signed float to string with +1234.5 format -const char* ftostr51sign(const float &f) { +const char* ftostr51sign(const_float_t f) { long i = INTFLOAT(f, 1); conv[0] = MINUSOR(i, '+'); conv[1] = DIGIMOD(i, 10000); @@ -343,7 +352,7 @@ const char* ftostr51sign(const float &f) { } // Convert signed float to string with +123.45 format -const char* ftostr52sign(const float &f) { +const char* ftostr52sign(const_float_t f) { long i = INTFLOAT(f, 2); conv[0] = MINUSOR(i, '+'); conv[1] = DIGIMOD(i, 10000); @@ -356,7 +365,7 @@ const char* ftostr52sign(const float &f) { } // Convert signed float to string with +12.345 format -const char* ftostr53sign(const float &f) { +const char* ftostr53sign(const_float_t f) { long i = INTFLOAT(f, 3); conv[0] = MINUSOR(i, '+'); conv[1] = DIGIMOD(i, 10000); @@ -369,7 +378,7 @@ const char* ftostr53sign(const float &f) { } // Convert unsigned float to string with ____4.5, __34.5, _234.5, 1234.5 format -const char* ftostr51rj(const float &f) { +const char* ftostr51rj(const_float_t f) { const long i = UINTFLOAT(f, 1); conv[0] = ' '; conv[1] = RJDIGIT(i, 10000); @@ -382,7 +391,7 @@ const char* ftostr51rj(const float &f) { } // Convert signed float to space-padded string with -_23.4_ format -const char* ftostr52sp(const float &f) { +const char* ftostr52sp(const_float_t f) { long i = INTFLOAT(f, 2); uint8_t dig; conv[0] = MINUSOR(i, ' '); diff --git a/Marlin/src/libs/numtostr.h b/Marlin/src/libs/numtostr.h index 40c298af425e..b058f3cdf6c6 100644 --- a/Marlin/src/libs/numtostr.h +++ b/Marlin/src/libs/numtostr.h @@ -21,7 +21,8 @@ */ #pragma once -#include +#include "../inc/MarlinConfigPre.h" +#include "../core/types.h" // Format uint8_t (0-100) as rj string with 123% / _12% / __1% format const char* pcttostrpctrj(const uint8_t i); @@ -61,68 +62,67 @@ const char* i16tostr3left(const int16_t xx); // Convert signed int to rj string with _123, -123, _-12, or __-1 format const char* i16tostr4signrj(const int16_t x); +// Convert unsigned float to string with 1.2 format +const char* ftostr11ns(const_float_t x); + // Convert unsigned float to string with 1.23 format -const char* ftostr12ns(const float &x); +const char* ftostr12ns(const_float_t x); // Convert unsigned float to string with 12.3 format -const char* ftostr31ns(const float &x); +const char* ftostr31ns(const_float_t x); // Convert unsigned float to string with 123.4 format -const char* ftostr41ns(const float &x); +const char* ftostr41ns(const_float_t x); // Convert signed float to fixed-length string with 12.34 / _2.34 / -2.34 or -23.45 / 123.45 format -const char* ftostr42_52(const float &x); +const char* ftostr42_52(const_float_t x); // Convert signed float to fixed-length string with 023.45 / -23.45 format -const char* ftostr52(const float &x); +const char* ftostr52(const_float_t x); // Convert signed float to fixed-length string with 12.345 / -2.345 or 023.456 / -23.456 format -const char* ftostr53_63(const float &x); +const char* ftostr53_63(const_float_t x); // Convert signed float to fixed-length string with 023.456 / -23.456 format -const char* ftostr63(const float &x); +const char* ftostr63(const_float_t x); // Convert float to fixed-length string with +12.3 / -12.3 format -const char* ftostr31sign(const float &x); +const char* ftostr31sign(const_float_t x); // Convert float to fixed-length string with +123.4 / -123.4 format -const char* ftostr41sign(const float &x); +const char* ftostr41sign(const_float_t x); // Convert signed float to string (6 digit) with -1.234 / _0.000 / +1.234 format -const char* ftostr43sign(const float &x, char plus=' '); +const char* ftostr43sign(const_float_t x, char plus=' '); // Convert signed float to string (5 digit) with -1.2345 / _0.0000 / +1.2345 format -const char* ftostr54sign(const float &x, char plus=' '); +const char* ftostr54sign(const_float_t x, char plus=' '); // Convert unsigned float to rj string with 12345 format -const char* ftostr5rj(const float &x); +const char* ftostr5rj(const_float_t x); // Convert signed float to string with +1234.5 format -const char* ftostr51sign(const float &x); +const char* ftostr51sign(const_float_t x); // Convert signed float to space-padded string with -_23.4_ format -const char* ftostr52sp(const float &x); +const char* ftostr52sp(const_float_t x); // Convert signed float to string with +123.45 format -const char* ftostr52sign(const float &x); +const char* ftostr52sign(const_float_t x); // Convert signed float to string with +12.345 format -const char* ftostr53sign(const float &f); +const char* ftostr53sign(const_float_t f); // Convert unsigned float to string with 1234.5 format omitting trailing zeros -const char* ftostr51rj(const float &x); - -#include "../core/macros.h" +const char* ftostr51rj(const_float_t x); // Convert float to rj string with 123 or -12 format -FORCE_INLINE const char* ftostr3(const float &x) { return i16tostr3rj(int16_t(x + (x < 0 ? -0.5f : 0.5f))); } - -#include "../inc/MarlinConfigPre.h" +FORCE_INLINE const char* ftostr3(const_float_t x) { return i16tostr3rj(int16_t(x + (x < 0 ? -0.5f : 0.5f))); } #if ENABLED(LCD_DECIMAL_SMALL_XY) // Convert float to rj string with 1234, _123, 12.3, _1.2, -123, _-12, or -1.2 format - const char* ftostr4sign(const float &fx); + const char* ftostr4sign(const_float_t fx); #else // Convert float to rj string with 1234, _123, -123, __12, _-12, ___1, or __-1 format - FORCE_INLINE const char* ftostr4sign(const float &x) { return i16tostr4signrj(int16_t(x + (x < 0 ? -0.5f : 0.5f))); } + FORCE_INLINE const char* ftostr4sign(const_float_t x) { return i16tostr4signrj(int16_t(x + (x < 0 ? -0.5f : 0.5f))); } #endif diff --git a/Marlin/src/libs/softspi.h b/Marlin/src/libs/softspi.h index 5d48f9fd8cb9..cc36d658cd2f 100644 --- a/Marlin/src/libs/softspi.h +++ b/Marlin/src/libs/softspi.h @@ -25,11 +25,7 @@ // Based on https://github.com/niteris/ArduinoSoftSpi // -#include "../HAL/shared/Marduino.h" - -#ifndef FORCE_INLINE - #define FORCE_INLINE inline __attribute__((always_inline)) -#endif +#include "../HAL/shared/Marduino.h" // CORE_TEENSY #define nop __asm__ volatile ("nop") // NOP for timing @@ -715,7 +711,7 @@ class SoftSPI { FORCE_INLINE bool MODE_CPHA(uint8_t mode) { return bool(mode & 1); } FORCE_INLINE bool MODE_CPOL(uint8_t mode) { return bool(mode & 2); } - FORCE_INLINE void receiveBit(uint8_t bit, uint8_t* data) { + FORCE_INLINE void receiveBit(uint8_t bit, uint8_t *data) { if (MODE_CPHA(Mode)) fastDigitalWrite(SckPin, !MODE_CPOL(Mode)); nop; nop; @@ -734,7 +730,7 @@ class SoftSPI { if (!MODE_CPHA(Mode)) fastDigitalWrite(SckPin, MODE_CPOL(Mode)); } - FORCE_INLINE void transferBit(uint8_t bit, uint8_t* rxData, uint8_t txData) { + FORCE_INLINE void transferBit(uint8_t bit, uint8_t *rxData, uint8_t txData) { if (MODE_CPHA(Mode)) fastDigitalWrite(SckPin, !MODE_CPOL(Mode)); fastDigitalWrite(MosiPin, txData & _BV(bit)); fastDigitalWrite(SckPin, diff --git a/Marlin/src/libs/stopwatch.cpp b/Marlin/src/libs/stopwatch.cpp index 601efe55178f..adfaa3b043e5 100644 --- a/Marlin/src/libs/stopwatch.cpp +++ b/Marlin/src/libs/stopwatch.cpp @@ -98,7 +98,7 @@ millis_t Stopwatch::duration() { void Stopwatch::debug(const char func[]) { if (DEBUGGING(INFO)) { SERIAL_ECHOPGM("Stopwatch::"); - serialprintPGM(func); + SERIAL_ECHOPGM_P(func); SERIAL_ECHOLNPGM("()"); } } diff --git a/Marlin/src/libs/vector_3.cpp b/Marlin/src/libs/vector_3.cpp index 6f87a523e0ad..4db8fb5f2e15 100644 --- a/Marlin/src/libs/vector_3.cpp +++ b/Marlin/src/libs/vector_3.cpp @@ -52,10 +52,9 @@ */ vector_3 vector_3::cross(const vector_3 &left, const vector_3 &right) { - const xyz_float_t &lv = left, &rv = right; - return vector_3(lv.y * rv.z - lv.z * rv.y, // YZ cross - lv.z * rv.x - lv.x * rv.z, // ZX cross - lv.x * rv.y - lv.y * rv.x); // XY cross + return vector_3(left.y * right.z - left.z * right.y, // YZ cross + left.z * right.x - left.x * right.z, // ZX cross + left.x * right.y - left.y * right.x); // XY cross } vector_3 vector_3::get_normal() const { @@ -64,20 +63,20 @@ vector_3 vector_3::get_normal() const { return normalized; } -void vector_3::normalize() { - *this *= RSQRT(sq(x) + sq(y) + sq(z)); -} +float vector_3::magnitude() const { return SQRT(sq(x) + sq(y) + sq(z)); } + +void vector_3::normalize() { *this *= RSQRT(sq(x) + sq(y) + sq(z)); } // Apply a rotation to the matrix void vector_3::apply_rotation(const matrix_3x3 &matrix) { const float _x = x, _y = y, _z = z; - *this = { matrix.vectors[0][0] * _x + matrix.vectors[1][0] * _y + matrix.vectors[2][0] * _z, - matrix.vectors[0][1] * _x + matrix.vectors[1][1] * _y + matrix.vectors[2][1] * _z, - matrix.vectors[0][2] * _x + matrix.vectors[1][2] * _y + matrix.vectors[2][2] * _z }; + *this = { matrix.vectors[0].x * _x + matrix.vectors[1].x * _y + matrix.vectors[2].x * _z, + matrix.vectors[0].y * _x + matrix.vectors[1].y * _y + matrix.vectors[2].y * _z, + matrix.vectors[0].z * _x + matrix.vectors[1].z * _y + matrix.vectors[2].z * _z }; } void vector_3::debug(PGM_P const title) { - serialprintPGM(title); + SERIAL_ECHOPGM_P(title); SERIAL_ECHOPAIR_F_P(SP_X_STR, x, 6); SERIAL_ECHOPAIR_F_P(SP_Y_STR, y, 6); SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, z, 6); @@ -87,8 +86,8 @@ void vector_3::debug(PGM_P const title) { * matrix_3x3 */ -void apply_rotation_xyz(const matrix_3x3 &matrix, float &_x, float &_y, float &_z) { - vector_3 vec = vector_3(_x, _y, _z); vec.apply_rotation(matrix); +void matrix_3x3::apply_rotation_xyz(float &_x, float &_y, float &_z) { + vector_3 vec = vector_3(_x, _y, _z); vec.apply_rotation(*this); _x = vec.x; _y = vec.y; _z = vec.z; } @@ -139,10 +138,7 @@ matrix_3x3 matrix_3x3::transpose(const matrix_3x3 &original) { } void matrix_3x3::debug(PGM_P const title) { - if (title) { - serialprintPGM(title); - SERIAL_EOL(); - } + if (title) SERIAL_ECHOLNPGM_P(title); LOOP_L_N(i, 3) { LOOP_L_N(j, 3) { if (vectors[i][j] >= 0.0) SERIAL_CHAR('+'); diff --git a/Marlin/src/libs/vector_3.h b/Marlin/src/libs/vector_3.h index 58428314d9d4..5d99fcec20db 100644 --- a/Marlin/src/libs/vector_3.h +++ b/Marlin/src/libs/vector_3.h @@ -44,13 +44,16 @@ class matrix_3x3; -struct vector_3 : xyz_float_t { - - vector_3(const float &_x, const float &_y, const float &_z) { set(_x, _y, _z); } - vector_3(const xy_float_t &in) { set(in.x, in.y); } - vector_3(const xyz_float_t &in) { set(in.x, in.y, in.z); } - vector_3(const xyze_float_t &in) { set(in.x, in.y, in.z); } - vector_3() { reset(); } +struct vector_3 { + union { + struct { float x, y, z; }; + float pos[3]; + }; + vector_3(const_float_t _x, const_float_t _y, const_float_t _z) : x(_x), y(_y), z(_z) {} + vector_3(const xy_float_t &in) { x = in.x; TERN_(HAS_Y_AXIS, y = in.y); } + vector_3(const xyz_float_t &in) { x = in.x; TERN_(HAS_Y_AXIS, y = in.y); TERN_(HAS_Z_AXIS, z = in.z); } + vector_3(const xyze_float_t &in) { x = in.x; TERN_(HAS_Y_AXIS, y = in.y); TERN_(HAS_Z_AXIS, z = in.z); } + vector_3() { x = y = z = 0; } // Factory method static vector_3 cross(const vector_3 &a, const vector_3 &b); @@ -60,19 +63,26 @@ struct vector_3 : xyz_float_t { void apply_rotation(const matrix_3x3 &matrix); // Accessors - float get_length() const; + float magnitude() const; vector_3 get_normal() const; // Operators - FORCE_INLINE vector_3 operator+(const vector_3 &v) const { vector_3 o = *this; o += v; return o; } - FORCE_INLINE vector_3 operator-(const vector_3 &v) const { vector_3 o = *this; o -= v; return o; } - FORCE_INLINE vector_3 operator*(const float &v) const { vector_3 o = *this; o *= v; return o; } + float& operator[](const int n) { return pos[n]; } + const float& operator[](const int n) const { return pos[n]; } + + vector_3& operator*=(const float &v) { x *= v; y *= v; z *= v; return *this; } + vector_3 operator+(const vector_3 &v) { return vector_3(x + v.x, y + v.y, z + v.z); } + vector_3 operator-(const vector_3 &v) { return vector_3(x - v.x, y - v.y, z - v.z); } + vector_3 operator*(const float &v) { return vector_3(x * v, y * v, z * v); } + + operator xy_float_t() { return xy_float_t({ x, y }); } + operator xyz_float_t() { return xyz_float_t({ x, y, z }); } void debug(PGM_P const title); }; struct matrix_3x3 { - abc_float_t vectors[3]; + vector_3 vectors[3]; // Factory methods static matrix_3x3 create_from_rows(const vector_3 &row_0, const vector_3 &row_1, const vector_3 &row_2); @@ -82,9 +92,6 @@ struct matrix_3x3 { void set_to_identity(); void debug(PGM_P const title); -}; -void apply_rotation_xyz(const matrix_3x3 &rotationMatrix, float &x, float &y, float &z); -FORCE_INLINE void apply_rotation_xyz(const matrix_3x3 &rotationMatrix, xyz_pos_t &pos) { - apply_rotation_xyz(rotationMatrix, pos.x, pos.y, pos.z); -} + void apply_rotation_xyz(float &x, float &y, float &z); +}; diff --git a/Marlin/src/module/delta.cpp b/Marlin/src/module/delta.cpp index 93238a69e364..2a4efb47da73 100644 --- a/Marlin/src/module/delta.cpp +++ b/Marlin/src/module/delta.cpp @@ -54,7 +54,7 @@ float delta_height; abc_float_t delta_endstop_adj{0}; float delta_radius, delta_diagonal_rod, - delta_segments_per_second; + segments_per_second; abc_float_t delta_tower_angle_trim; xy_float_t delta_tower[ABC]; abc_float_t delta_diagonal_rod_2_tower; @@ -82,28 +82,6 @@ void recalc_delta_settings() { set_all_unhomed(); } -/** - * Get a safe radius for calibration - */ - -#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) - - #if ENABLED(DELTA_AUTO_CALIBRATION) - float calibration_radius_factor = 1; - #endif - - float delta_calibration_radius() { - return calibration_radius_factor * ( - #if HAS_BED_PROBE - FLOOR((DELTA_PRINTABLE_RADIUS) - _MAX(HYPOT(probe.offset_xy.x, probe.offset_xy.y), PROBING_MARGIN)) - #else - DELTA_PRINTABLE_RADIUS - #endif - ); - } - -#endif - /** * Delta Inverse Kinematics * @@ -121,8 +99,8 @@ void recalc_delta_settings() { */ #define DELTA_DEBUG(VAR) do { \ - SERIAL_ECHOLNPAIR_P(PSTR("Cartesian X"), VAR.x, SP_Y_STR, VAR.y, SP_Z_STR, VAR.z); \ - SERIAL_ECHOLNPAIR_P(PSTR("Delta A"), delta.a, SP_B_STR, delta.b, SP_C_STR, delta.c); \ + SERIAL_ECHOLNPGM_P(PSTR("Cartesian X"), VAR.x, SP_Y_STR, VAR.y, SP_Z_STR, VAR.z); \ + SERIAL_ECHOLNPGM_P(PSTR("Delta A"), delta.a, SP_B_STR, delta.b, SP_C_STR, delta.c); \ }while(0) void inverse_kinematics(const xyz_pos_t &raw) { @@ -177,7 +155,7 @@ float delta_safe_distance_from_top() { * * The result is stored in the cartes[] array. */ -void forward_kinematics_DELTA(const float &z1, const float &z2, const float &z3) { +void forward_kinematics(const_float_t z1, const_float_t z2, const_float_t z3) { // Create a vector in old coordinates along x axis of new coordinate const float p12[3] = { delta_tower[B_AXIS].x - delta_tower[A_AXIS].x, delta_tower[B_AXIS].y - delta_tower[A_AXIS].y, z2 - z1 }, @@ -242,21 +220,28 @@ void home_delta() { // Disable stealthChop if used. Enable diag1 pin on driver. #if ENABLED(SENSORLESS_HOMING) - TERN_(X_SENSORLESS, sensorless_t stealth_states_x = start_sensorless_homing_per_axis(X_AXIS)); - TERN_(Y_SENSORLESS, sensorless_t stealth_states_y = start_sensorless_homing_per_axis(Y_AXIS)); - TERN_(Z_SENSORLESS, sensorless_t stealth_states_z = start_sensorless_homing_per_axis(Z_AXIS)); + TERN_(X_SENSORLESS, sensorless_t stealth_states_x = start_sensorless_homing_per_axis(X_AXIS)); + TERN_(Y_SENSORLESS, sensorless_t stealth_states_y = start_sensorless_homing_per_axis(Y_AXIS)); + TERN_(Z_SENSORLESS, sensorless_t stealth_states_z = start_sensorless_homing_per_axis(Z_AXIS)); + TERN_(I_SENSORLESS, sensorless_t stealth_states_i = start_sensorless_homing_per_axis(I_AXIS)); + TERN_(J_SENSORLESS, sensorless_t stealth_states_j = start_sensorless_homing_per_axis(J_AXIS)); + TERN_(K_SENSORLESS, sensorless_t stealth_states_k = start_sensorless_homing_per_axis(K_AXIS)); #endif // Move all carriages together linearly until an endstop is hit. - current_position.z = (delta_height + 10 - TERN0(HAS_BED_PROBE, probe.offset.z)); + current_position.z = DIFF_TERN(HAS_BED_PROBE, delta_height + 10, probe.offset.z); line_to_current_position(homing_feedrate(Z_AXIS)); planner.synchronize(); + TERN_(HAS_DELTA_SENSORLESS_PROBING, endstops.report_states()); // Re-enable stealthChop if used. Disable diag1 pin on driver. - #if ENABLED(SENSORLESS_HOMING) - TERN_(X_SENSORLESS, end_sensorless_homing_per_axis(X_AXIS, stealth_states_x)); - TERN_(Y_SENSORLESS, end_sensorless_homing_per_axis(Y_AXIS, stealth_states_y)); - TERN_(Z_SENSORLESS, end_sensorless_homing_per_axis(Z_AXIS, stealth_states_z)); + #if ENABLED(SENSORLESS_HOMING) && DISABLED(ENDSTOPS_ALWAYS_ON_DEFAULT) + TERN_(X_SENSORLESS, end_sensorless_homing_per_axis(X_AXIS, stealth_states_x)); + TERN_(Y_SENSORLESS, end_sensorless_homing_per_axis(Y_AXIS, stealth_states_y)); + TERN_(Z_SENSORLESS, end_sensorless_homing_per_axis(Z_AXIS, stealth_states_z)); + TERN_(I_SENSORLESS, end_sensorless_homing_per_axis(I_AXIS, stealth_states_i)); + TERN_(J_SENSORLESS, end_sensorless_homing_per_axis(J_AXIS, stealth_states_j)); + TERN_(K_SENSORLESS, end_sensorless_homing_per_axis(K_AXIS, stealth_states_k)); #endif endstops.validate_homing_move(); @@ -271,7 +256,7 @@ void home_delta() { // Do this here all at once for Delta, because // XYZ isn't ABC. Applying this per-tower would // give the impression that they are the same. - LOOP_XYZ(i) set_axis_is_at_home((AxisEnum)i); + LOOP_ABC(i) set_axis_is_at_home((AxisEnum)i); sync_plan_position(); diff --git a/Marlin/src/module/delta.h b/Marlin/src/module/delta.h index 5e9a78bd8672..f1e43c7e4c9d 100644 --- a/Marlin/src/module/delta.h +++ b/Marlin/src/module/delta.h @@ -32,7 +32,7 @@ extern float delta_height; extern abc_float_t delta_endstop_adj; extern float delta_radius, delta_diagonal_rod, - delta_segments_per_second; + segments_per_second; extern abc_float_t delta_tower_angle_trim; extern xy_float_t delta_tower[ABC]; extern abc_float_t delta_diagonal_rod_2_tower; @@ -45,19 +45,6 @@ extern abc_float_t delta_diagonal_rod_trim; */ void recalc_delta_settings(); -/** - * Get a safe radius for calibration - */ -#if ENABLED(DELTA_AUTO_CALIBRATION) - extern float calibration_radius_factor; -#else - constexpr float calibration_radius_factor = 1; -#endif - -#if EITHER(DELTA_AUTO_CALIBRATION, DELTA_CALIBRATION_MENU) - float delta_calibration_radius(); -#endif - /** * Delta Inverse Kinematics * @@ -120,10 +107,10 @@ float delta_safe_distance_from_top(); * * The result is stored in the cartes[] array. */ -void forward_kinematics_DELTA(const float &z1, const float &z2, const float &z3); +void forward_kinematics(const_float_t z1, const_float_t z2, const_float_t z3); -FORCE_INLINE void forward_kinematics_DELTA(const abc_float_t &point) { - forward_kinematics_DELTA(point.a, point.b, point.c); +FORCE_INLINE void forward_kinematics(const abc_float_t &point) { + forward_kinematics(point.a, point.b, point.c); } void home_delta(); diff --git a/Marlin/src/module/endstops.cpp b/Marlin/src/module/endstops.cpp index b9d2c1cdf561..d29fd3ecb3fd 100644 --- a/Marlin/src/module/endstops.cpp +++ b/Marlin/src/module/endstops.cpp @@ -56,12 +56,12 @@ Endstops endstops; // private: bool Endstops::enabled, Endstops::enabled_globally; // Initialized by settings.load() -volatile uint8_t Endstops::hit_state; -Endstops::esbits_t Endstops::live_state = 0; +volatile Endstops::endstop_mask_t Endstops::hit_state; +Endstops::endstop_mask_t Endstops::live_state = 0; #if ENDSTOP_NOISE_THRESHOLD - Endstops::esbits_t Endstops::validated_live_state; + Endstops::endstop_mask_t Endstops::validated_live_state; uint8_t Endstops::endstop_poll_count; #endif @@ -259,6 +259,66 @@ void Endstops::init() { #endif #endif + #if HAS_I_MIN + #if ENABLED(ENDSTOPPULLUP_IMIN) + SET_INPUT_PULLUP(I_MIN_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_IMIN) + SET_INPUT_PULLDOWN(I_MIN_PIN); + #else + SET_INPUT(I_MIN_PIN); + #endif + #endif + + #if HAS_I_MAX + #if ENABLED(ENDSTOPPULLUP_IMAX) + SET_INPUT_PULLUP(I_MAX_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_IMAX) + SET_INPUT_PULLDOWN(I_MAX_PIN); + #else + SET_INPUT(I_MAX_PIN); + #endif + #endif + + #if HAS_J_MIN + #if ENABLED(ENDSTOPPULLUP_JMIN) + SET_INPUT_PULLUP(J_MIN_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_IMIN) + SET_INPUT_PULLDOWN(J_MIN_PIN); + #else + SET_INPUT(J_MIN_PIN); + #endif + #endif + + #if HAS_J_MAX + #if ENABLED(ENDSTOPPULLUP_JMAX) + SET_INPUT_PULLUP(J_MAX_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_JMAX) + SET_INPUT_PULLDOWN(J_MAX_PIN); + #else + SET_INPUT(J_MAX_PIN); + #endif + #endif + + #if HAS_K_MIN + #if ENABLED(ENDSTOPPULLUP_KMIN) + SET_INPUT_PULLUP(K_MIN_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_KMIN) + SET_INPUT_PULLDOWN(K_MIN_PIN); + #else + SET_INPUT(K_MIN_PIN); + #endif + #endif + + #if HAS_K_MAX + #if ENABLED(ENDSTOPPULLUP_KMAX) + SET_INPUT_PULLUP(K_MAX_PIN); + #elif ENABLED(ENDSTOPPULLDOWN_KMIN) + SET_INPUT_PULLDOWN(K_MAX_PIN); + #else + SET_INPUT(K_MAX_PIN); + #endif + #endif + #if PIN_EXISTS(CALIBRATION) #if ENABLED(CALIBRATION_PIN_PULLUP) SET_INPUT_PULLUP(CALIBRATION_PIN); @@ -269,7 +329,7 @@ void Endstops::init() { #endif #endif - #if HAS_CUSTOM_PROBE_PIN + #if USES_Z_MIN_PROBE_PIN #if ENABLED(ENDSTOPPULLUP_ZMIN_PROBE) SET_INPUT_PULLUP(Z_MIN_PROBE_PIN); #elif ENABLED(ENDSTOPPULLDOWN_ZMIN_PROBE) @@ -356,46 +416,60 @@ void Endstops::resync() { #endif void Endstops::event_handler() { - static uint8_t prev_hit_state; // = 0 + static endstop_mask_t prev_hit_state; // = 0 if (hit_state == prev_hit_state) return; prev_hit_state = hit_state; if (hit_state) { - #if HAS_WIRED_LCD - char chrX = ' ', chrY = ' ', chrZ = ' ', chrP = ' '; + #if HAS_STATUS_MESSAGE + char LINEAR_AXIS_LIST(chrX = ' ', chrY = ' ', chrZ = ' ', chrI = ' ', chrJ = ' ', chrK = ' '), + chrP = ' '; #define _SET_STOP_CHAR(A,C) (chr## A = C) #else - #define _SET_STOP_CHAR(A,C) ; + #define _SET_STOP_CHAR(A,C) NOOP #endif #define _ENDSTOP_HIT_ECHO(A,C) do{ \ - SERIAL_ECHOPAIR(" " STRINGIFY(A) ":", planner.triggered_position_mm(_AXIS(A))); \ - _SET_STOP_CHAR(A,C); }while(0) + SERIAL_ECHOPGM(" " STRINGIFY(A) ":", planner.triggered_position_mm(_AXIS(A))); _SET_STOP_CHAR(A,C); }while(0) #define _ENDSTOP_HIT_TEST(A,C) \ - if (TEST(hit_state, A ##_MIN) || TEST(hit_state, A ##_MAX)) \ + if (TERN0(HAS_##A##_MIN, TEST(hit_state, A##_MIN)) || TERN0(HAS_##A##_MAX, TEST(hit_state, A##_MAX))) \ _ENDSTOP_HIT_ECHO(A,C) #define ENDSTOP_HIT_TEST_X() _ENDSTOP_HIT_TEST(X,'X') #define ENDSTOP_HIT_TEST_Y() _ENDSTOP_HIT_TEST(Y,'Y') #define ENDSTOP_HIT_TEST_Z() _ENDSTOP_HIT_TEST(Z,'Z') + #define ENDSTOP_HIT_TEST_I() _ENDSTOP_HIT_TEST(I,'I') + #define ENDSTOP_HIT_TEST_J() _ENDSTOP_HIT_TEST(J,'J') + #define ENDSTOP_HIT_TEST_K() _ENDSTOP_HIT_TEST(K,'K') SERIAL_ECHO_START(); SERIAL_ECHOPGM(STR_ENDSTOPS_HIT); - ENDSTOP_HIT_TEST_X(); - ENDSTOP_HIT_TEST_Y(); - ENDSTOP_HIT_TEST_Z(); - - #if HAS_CUSTOM_PROBE_PIN + LINEAR_AXIS_CODE( + ENDSTOP_HIT_TEST_X(), + ENDSTOP_HIT_TEST_Y(), + ENDSTOP_HIT_TEST_Z(), + _ENDSTOP_HIT_TEST(I,'I'), + _ENDSTOP_HIT_TEST(J,'J'), + _ENDSTOP_HIT_TEST(K,'K') + ); + + #if USES_Z_MIN_PROBE_PIN #define P_AXIS Z_AXIS if (TEST(hit_state, Z_MIN_PROBE)) _ENDSTOP_HIT_ECHO(P, 'P'); #endif SERIAL_EOL(); - TERN_(HAS_WIRED_LCD, ui.status_printf_P(0, PSTR(S_FMT " %c %c %c %c"), GET_TEXT(MSG_LCD_ENDSTOPS), chrX, chrY, chrZ, chrP)); + TERN_(HAS_STATUS_MESSAGE, + ui.status_printf_P(0, + PSTR(S_FMT GANG_N_1(LINEAR_AXES, " %c") " %c"), + GET_TEXT(MSG_LCD_ENDSTOPS), + LINEAR_AXIS_LIST(chrX, chrY, chrZ, chrI, chrJ, chrK), chrP + ) + ); #if BOTH(SD_ABORT_ON_ENDSTOP_HIT, SDSUPPORT) if (planner.abort_on_endstop_hit) { - card.endFilePrint(); + card.abortFilePrintNow(); quickstop_stepper(); thermalManager.disable_all_heaters(); print_job_timer.stop(); @@ -404,13 +478,21 @@ void Endstops::event_handler() { } } +#if GCC_VERSION <= 50000 + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wunused-function" +#endif + static void print_es_state(const bool is_hit, PGM_P const label=nullptr) { - if (label) serialprintPGM(label); + if (label) SERIAL_ECHOPGM_P(label); SERIAL_ECHOPGM(": "); - serialprintPGM(is_hit ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN)); - SERIAL_EOL(); + SERIAL_ECHOLNPGM_P(is_hit ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN)); } +#if GCC_VERSION <= 50000 + #pragma GCC diagnostic pop +#endif + void _O2 Endstops::report_states() { TERN_(BLTOUCH, bltouch._set_SW_mode()); SERIAL_ECHOLNPGM(STR_M119_REPORT); @@ -463,30 +545,46 @@ void _O2 Endstops::report_states() { #if HAS_Z4_MAX ES_REPORT(Z4_MAX); #endif + #if HAS_I_MIN + ES_REPORT(I_MIN); + #endif + #if HAS_I_MAX + ES_REPORT(I_MAX); + #endif + #if HAS_J_MIN + ES_REPORT(J_MIN); + #endif + #if HAS_J_MAX + ES_REPORT(J_MAX); + #endif + #if HAS_K_MIN + ES_REPORT(K_MIN); + #endif + #if HAS_K_MAX + ES_REPORT(K_MAX); + #endif #if BOTH(MARLIN_DEV_MODE, PROBE_ACTIVATION_SWITCH) print_es_state(probe_switch_activated(), PSTR(STR_PROBE_EN)); #endif - #if HAS_CUSTOM_PROBE_PIN + #if USES_Z_MIN_PROBE_PIN print_es_state(PROBE_TRIGGERED(), PSTR(STR_Z_PROBE)); #endif - #if HAS_FILAMENT_SENSOR - #if NUM_RUNOUT_SENSORS == 1 - print_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE, PSTR(STR_FILAMENT_RUNOUT_SENSOR)); - #else - #define _CASE_RUNOUT(N) case N: pin = FIL_RUNOUT##N##_PIN; state = FIL_RUNOUT##N##_STATE; break; - LOOP_S_LE_N(i, 1, NUM_RUNOUT_SENSORS) { - pin_t pin; - uint8_t state; - switch (i) { - default: continue; - REPEAT_S(1, INCREMENT(NUM_RUNOUT_SENSORS), _CASE_RUNOUT) - } - SERIAL_ECHOPGM(STR_FILAMENT_RUNOUT_SENSOR); - if (i > 1) SERIAL_CHAR(' ', '0' + i); - print_es_state(extDigitalRead(pin) != state); + #if MULTI_FILAMENT_SENSOR + #define _CASE_RUNOUT(N) case N: pin = FIL_RUNOUT##N##_PIN; state = FIL_RUNOUT##N##_STATE; break; + LOOP_S_LE_N(i, 1, NUM_RUNOUT_SENSORS) { + pin_t pin; + uint8_t state; + switch (i) { + default: continue; + REPEAT_1(NUM_RUNOUT_SENSORS, _CASE_RUNOUT) } - #undef _CASE_RUNOUT - #endif + SERIAL_ECHOPGM(STR_FILAMENT); + if (i > 1) SERIAL_CHAR(' ', '0' + i); + print_es_state(extDigitalRead(pin) != state); + } + #undef _CASE_RUNOUT + #elif HAS_FILAMENT_SENSOR + print_es_state(READ(FIL_RUNOUT1_PIN) != FIL_RUNOUT1_STATE, PSTR(STR_FILAMENT)); #endif TERN_(BLTOUCH, bltouch._reset_SW_mode()); @@ -497,9 +595,16 @@ void _O2 Endstops::report_states() { // The following routines are called from an ISR context. It could be the temperature ISR, the // endstop ISR or the Stepper ISR. -#define _ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX -#define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN -#define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING +#if HAS_DELTA_SENSORLESS_PROBING + #define __ENDSTOP(AXIS, ...) AXIS ##_MAX + #define _ENDSTOP_PIN(AXIS, ...) AXIS ##_MAX_PIN + #define _ENDSTOP_INVERTING(AXIS, ...) AXIS ##_MAX_ENDSTOP_INVERTING +#else + #define __ENDSTOP(AXIS, MINMAX) AXIS ##_## MINMAX + #define _ENDSTOP_PIN(AXIS, MINMAX) AXIS ##_## MINMAX ##_PIN + #define _ENDSTOP_INVERTING(AXIS, MINMAX) AXIS ##_## MINMAX ##_ENDSTOP_INVERTING +#endif +#define _ENDSTOP(AXIS, MINMAX) __ENDSTOP(AXIS, MINMAX) // Check endstops - Could be called from Temperature ISR! void Endstops::update() { @@ -511,20 +616,15 @@ void Endstops::update() { #define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX))) #define COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT)) - #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY) - // If G38 command is active check Z_MIN_PROBE for ALL movement - if (G38_move) UPDATE_ENDSTOP_BIT(Z, MIN_PROBE); + #if ENABLED(G38_PROBE_TARGET) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY) + #define HAS_G38_PROBE 1 + // For G38 moves check the probe's pin for ALL movement + if (G38_move) UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN)); #endif // With Dual X, endstops are only checked in the homing direction for the active extruder - #if ENABLED(DUAL_X_CARRIAGE) - #define E0_ACTIVE stepper.last_moved_extruder == 0 - #define X_MIN_TEST() ((X_HOME_DIR < 0 && E0_ACTIVE) || (X2_HOME_DIR < 0 && !E0_ACTIVE)) - #define X_MAX_TEST() ((X_HOME_DIR > 0 && E0_ACTIVE) || (X2_HOME_DIR > 0 && !E0_ACTIVE)) - #else - #define X_MIN_TEST() true - #define X_MAX_TEST() true - #endif + #define X_MIN_TEST() TERN1(DUAL_X_CARRIAGE, TERN0(X_HOME_TO_MIN, stepper.last_moved_extruder == 0) || TERN0(X2_HOME_TO_MIN, stepper.last_moved_extruder != 0)) + #define X_MAX_TEST() TERN1(DUAL_X_CARRIAGE, TERN0(X_HOME_TO_MAX, stepper.last_moved_extruder == 0) || TERN0(X2_HOME_TO_MAX, stepper.last_moved_extruder != 0)) // Use HEAD for core axes, AXIS for others #if ANY(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY) @@ -543,6 +643,10 @@ void Endstops::update() { #define Z_AXIS_HEAD Z_AXIS #endif + #define I_AXIS_HEAD I_AXIS + #define J_AXIS_HEAD J_AXIS + #define K_AXIS_HEAD K_AXIS + /** * Check and update endstops */ @@ -618,7 +722,7 @@ void Endstops::update() { #if HAS_BED_PROBE // When closing the gap check the enabled probe if (probe_switch_activated()) - UPDATE_ENDSTOP_BIT(Z, TERN(HAS_CUSTOM_PROBE_PIN, MIN_PROBE, MIN)); + UPDATE_ENDSTOP_BIT(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN)); #endif #if HAS_Z_MAX && !Z_SPI_SENSORLESS @@ -644,12 +748,90 @@ void Endstops::update() { COPY_LIVE_STATE(Z_MAX, Z4_MAX); #endif #endif - #elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN + #elif TERN1(USES_Z_MIN_PROBE_PIN, Z_MAX_PIN != Z_MIN_PROBE_PIN) // If this pin isn't the bed probe it's the Z endstop UPDATE_ENDSTOP_BIT(Z, MAX); #endif #endif + #if HAS_I_MIN && !I_SPI_SENSORLESS + #if ENABLED(I_DUAL_ENDSTOPS) + UPDATE_ENDSTOP_BIT(I, MIN); + #if HAS_I2_MIN + UPDATE_ENDSTOP_BIT(I2, MAX); + #else + COPY_LIVE_STATE(I_MIN, I2_MIN); + #endif + #else + UPDATE_ENDSTOP_BIT(I, MIN); + #endif + #endif + + #if HAS_I_MAX && !I_SPI_SENSORLESS + #if ENABLED(I_DUAL_ENDSTOPS) + UPDATE_ENDSTOP_BIT(I, MAX); + #if HAS_I2_MAX + UPDATE_ENDSTOP_BIT(I2, MAX); + #else + COPY_LIVE_STATE(I_MAX, I2_MAX); + #endif + #else + UPDATE_ENDSTOP_BIT(I, MAX); + #endif + #endif + + #if HAS_J_MIN && !J_SPI_SENSORLESS + #if ENABLED(J_DUAL_ENDSTOPS) + UPDATE_ENDSTOP_BIT(J, MIN); + #if HAS_J2_MIN + UPDATE_ENDSTOP_BIT(J2, MIN); + #else + COPY_LIVE_STATE(J_MIN, J2_MIN); + #endif + #else + UPDATE_ENDSTOP_BIT(J, MIN); + #endif + #endif + + #if HAS_J_MAX && !J_SPI_SENSORLESS + #if ENABLED(J_DUAL_ENDSTOPS) + UPDATE_ENDSTOP_BIT(J, MAX); + #if HAS_J2_MAX + UPDATE_ENDSTOP_BIT(J2, MAX); + #else + COPY_LIVE_STATE(J_MAX, J2_MAX); + #endif + #else + UPDATE_ENDSTOP_BIT(J, MAX); + #endif + #endif + + #if HAS_K_MIN && !K_SPI_SENSORLESS + #if ENABLED(K_DUAL_ENDSTOPS) + UPDATE_ENDSTOP_BIT(K, MIN); + #if HAS_K2_MIN + UPDATE_ENDSTOP_BIT(K2, MIN); + #else + COPY_LIVE_STATE(K_MIN, K2_MIN); + #endif + #else + UPDATE_ENDSTOP_BIT(K, MIN); + #endif + #endif + + #if HAS_K_MAX && !K_SPI_SENSORLESS + #if ENABLED(K_DUAL_ENDSTOPS) + UPDATE_ENDSTOP_BIT(K, MAX); + #if HAS_K2_MAX + UPDATE_ENDSTOP_BIT(K2, MAX); + #else + COPY_LIVE_STATE(K_MAX, K2_MAX); + #endif + #else + UPDATE_ENDSTOP_BIT(K, MAX); + #endif + #endif + #if ENDSTOP_NOISE_THRESHOLD /** @@ -662,7 +844,7 @@ void Endstops::update() { * still exist. The only way to reduce them further is to increase the number of samples. * To reduce the chance to 1% (1/128th) requires 7 samples (adding 7ms of delay). */ - static esbits_t old_live_state; + static endstop_mask_t old_live_state; if (old_live_state != live_state) { endstop_poll_count = ENDSTOP_NOISE_THRESHOLD; old_live_state = live_state; @@ -702,7 +884,7 @@ void Endstops::update() { const byte dual_hit = TEST_ENDSTOP(_ENDSTOP(A, MINMAX)) | (TEST_ENDSTOP(_ENDSTOP(A##2, MINMAX)) << 1); \ if (dual_hit) { \ _ENDSTOP_HIT(A, MINMAX); \ - /* if not performing home or if both endstops were trigged during homing... */ \ + /* if not performing home or if both endstops were triggered during homing... */ \ if (!stepper.separate_multi_axis || dual_hit == 0b11) \ planner.endstop_triggered(_AXIS(A)); \ } \ @@ -712,7 +894,7 @@ void Endstops::update() { const byte triple_hit = TEST_ENDSTOP(_ENDSTOP(A, MINMAX)) | (TEST_ENDSTOP(_ENDSTOP(A##2, MINMAX)) << 1) | (TEST_ENDSTOP(_ENDSTOP(A##3, MINMAX)) << 2); \ if (triple_hit) { \ _ENDSTOP_HIT(A, MINMAX); \ - /* if not performing home or if both endstops were trigged during homing... */ \ + /* if not performing home or if both endstops were triggered during homing... */ \ if (!stepper.separate_multi_axis || triple_hit == 0b111) \ planner.endstop_triggered(_AXIS(A)); \ } \ @@ -722,7 +904,7 @@ void Endstops::update() { const byte quad_hit = TEST_ENDSTOP(_ENDSTOP(A, MINMAX)) | (TEST_ENDSTOP(_ENDSTOP(A##2, MINMAX)) << 1) | (TEST_ENDSTOP(_ENDSTOP(A##3, MINMAX)) << 2) | (TEST_ENDSTOP(_ENDSTOP(A##4, MINMAX)) << 3); \ if (quad_hit) { \ _ENDSTOP_HIT(A, MINMAX); \ - /* if not performing home or if both endstops were trigged during homing... */ \ + /* if not performing home or if both endstops were triggered during homing... */ \ if (!stepper.separate_multi_axis || quad_hit == 0b1111) \ planner.endstop_triggered(_AXIS(A)); \ } \ @@ -750,17 +932,17 @@ void Endstops::update() { #define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX) #endif - #if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY) - #if ENABLED(G38_PROBE_AWAY) - #define _G38_OPEN_STATE (G38_move >= 4) - #else - #define _G38_OPEN_STATE LOW - #endif - // If G38 command is active check Z_MIN_PROBE for ALL movement - if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, MIN_PROBE)) != _G38_OPEN_STATE) { - if (stepper.axis_is_moving(X_AXIS)) { _ENDSTOP_HIT(X, MIN); planner.endstop_triggered(X_AXIS); } - else if (stepper.axis_is_moving(Y_AXIS)) { _ENDSTOP_HIT(Y, MIN); planner.endstop_triggered(Y_AXIS); } - else if (stepper.axis_is_moving(Z_AXIS)) { _ENDSTOP_HIT(Z, MIN); planner.endstop_triggered(Z_AXIS); } + #if HAS_G38_PROBE + #define _G38_OPEN_STATE TERN(G38_PROBE_AWAY, (G38_move >= 4), LOW) + // For G38 moves check the probe's pin for ALL movement + if (G38_move && TEST_ENDSTOP(_ENDSTOP(Z, TERN(USES_Z_MIN_PROBE_PIN, MIN_PROBE, MIN))) != _G38_OPEN_STATE) { + if (stepper.axis_is_moving(X_AXIS)) { _ENDSTOP_HIT(X, TERN(X_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(X_AXIS); } + #if HAS_Y_AXIS + else if (stepper.axis_is_moving(Y_AXIS)) { _ENDSTOP_HIT(Y, TERN(Y_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(Y_AXIS); } + #endif + #if HAS_Z_AXIS + else if (stepper.axis_is_moving(Z_AXIS)) { _ENDSTOP_HIT(Z, TERN(Z_HOME_TO_MIN, MIN, MAX)); planner.endstop_triggered(Z_AXIS); } + #endif G38_did_trigger = true; } #endif @@ -769,7 +951,7 @@ void Endstops::update() { if (stepper.axis_is_moving(X_AXIS)) { if (stepper.motor_direction(X_AXIS_HEAD)) { // -direction - #if HAS_X_MIN || (X_SPI_SENSORLESS && X_HOME_DIR < 0) + #if HAS_X_MIN || (X_SPI_SENSORLESS && X_HOME_TO_MIN) PROCESS_ENDSTOP_X(MIN); #if CORE_DIAG(XY, Y, MIN) PROCESS_CORE_ENDSTOP(Y,MIN,X,MIN); @@ -783,7 +965,7 @@ void Endstops::update() { #endif } else { // +direction - #if HAS_X_MAX || (X_SPI_SENSORLESS && X_HOME_DIR > 0) + #if HAS_X_MAX || (X_SPI_SENSORLESS && X_HOME_TO_MAX) PROCESS_ENDSTOP_X(MAX); #if CORE_DIAG(XY, Y, MIN) PROCESS_CORE_ENDSTOP(Y,MIN,X,MAX); @@ -798,79 +980,128 @@ void Endstops::update() { } } - if (stepper.axis_is_moving(Y_AXIS)) { - if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction - #if HAS_Y_MIN || (Y_SPI_SENSORLESS && Y_HOME_DIR < 0) - PROCESS_ENDSTOP_Y(MIN); - #if CORE_DIAG(XY, X, MIN) - PROCESS_CORE_ENDSTOP(X,MIN,Y,MIN); - #elif CORE_DIAG(XY, X, MAX) - PROCESS_CORE_ENDSTOP(X,MAX,Y,MIN); - #elif CORE_DIAG(YZ, Z, MIN) - PROCESS_CORE_ENDSTOP(Z,MIN,Y,MIN); - #elif CORE_DIAG(YZ, Z, MAX) - PROCESS_CORE_ENDSTOP(Z,MAX,Y,MIN); + #if HAS_Y_AXIS + if (stepper.axis_is_moving(Y_AXIS)) { + if (stepper.motor_direction(Y_AXIS_HEAD)) { // -direction + #if HAS_Y_MIN || (Y_SPI_SENSORLESS && Y_HOME_TO_MIN) + PROCESS_ENDSTOP_Y(MIN); + #if CORE_DIAG(XY, X, MIN) + PROCESS_CORE_ENDSTOP(X,MIN,Y,MIN); + #elif CORE_DIAG(XY, X, MAX) + PROCESS_CORE_ENDSTOP(X,MAX,Y,MIN); + #elif CORE_DIAG(YZ, Z, MIN) + PROCESS_CORE_ENDSTOP(Z,MIN,Y,MIN); + #elif CORE_DIAG(YZ, Z, MAX) + PROCESS_CORE_ENDSTOP(Z,MAX,Y,MIN); + #endif #endif - #endif + } + else { // +direction + #if HAS_Y_MAX || (Y_SPI_SENSORLESS && Y_HOME_TO_MAX) + PROCESS_ENDSTOP_Y(MAX); + #if CORE_DIAG(XY, X, MIN) + PROCESS_CORE_ENDSTOP(X,MIN,Y,MAX); + #elif CORE_DIAG(XY, X, MAX) + PROCESS_CORE_ENDSTOP(X,MAX,Y,MAX); + #elif CORE_DIAG(YZ, Z, MIN) + PROCESS_CORE_ENDSTOP(Z,MIN,Y,MAX); + #elif CORE_DIAG(YZ, Z, MAX) + PROCESS_CORE_ENDSTOP(Z,MAX,Y,MAX); + #endif + #endif + } } - else { // +direction - #if HAS_Y_MAX || (Y_SPI_SENSORLESS && Y_HOME_DIR > 0) - PROCESS_ENDSTOP_Y(MAX); - #if CORE_DIAG(XY, X, MIN) - PROCESS_CORE_ENDSTOP(X,MIN,Y,MAX); - #elif CORE_DIAG(XY, X, MAX) - PROCESS_CORE_ENDSTOP(X,MAX,Y,MAX); - #elif CORE_DIAG(YZ, Z, MIN) - PROCESS_CORE_ENDSTOP(Z,MIN,Y,MAX); - #elif CORE_DIAG(YZ, Z, MAX) - PROCESS_CORE_ENDSTOP(Z,MAX,Y,MAX); + #endif + + #if HAS_Z_AXIS + if (stepper.axis_is_moving(Z_AXIS)) { + if (stepper.motor_direction(Z_AXIS_HEAD)) { // Z -direction. Gantry down, bed up. + + #if HAS_Z_MIN || (Z_SPI_SENSORLESS && Z_HOME_TO_MIN) + if ( TERN1(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, z_probe_enabled) + && TERN1(USES_Z_MIN_PROBE_PIN, !z_probe_enabled) + ) PROCESS_ENDSTOP_Z(MIN); + #if CORE_DIAG(XZ, X, MIN) + PROCESS_CORE_ENDSTOP(X,MIN,Z,MIN); + #elif CORE_DIAG(XZ, X, MAX) + PROCESS_CORE_ENDSTOP(X,MAX,Z,MIN); + #elif CORE_DIAG(YZ, Y, MIN) + PROCESS_CORE_ENDSTOP(Y,MIN,Z,MIN); + #elif CORE_DIAG(YZ, Y, MAX) + PROCESS_CORE_ENDSTOP(Y,MAX,Z,MIN); + #endif #endif - #endif + + // When closing the gap check the enabled probe + #if USES_Z_MIN_PROBE_PIN + if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE); + #endif + } + else { // Z +direction. Gantry up, bed down. + #if HAS_Z_MAX || (Z_SPI_SENSORLESS && Z_HOME_TO_MAX) + #if ENABLED(Z_MULTI_ENDSTOPS) + PROCESS_ENDSTOP_Z(MAX); + #elif TERN1(USES_Z_MIN_PROBE_PIN, Z_MAX_PIN != Z_MIN_PROBE_PIN) // No probe or probe is Z_MIN || Probe is not Z_MAX + PROCESS_ENDSTOP(Z, MAX); + #endif + #if CORE_DIAG(XZ, X, MIN) + PROCESS_CORE_ENDSTOP(X,MIN,Z,MAX); + #elif CORE_DIAG(XZ, X, MAX) + PROCESS_CORE_ENDSTOP(X,MAX,Z,MAX); + #elif CORE_DIAG(YZ, Y, MIN) + PROCESS_CORE_ENDSTOP(Y,MIN,Z,MAX); + #elif CORE_DIAG(YZ, Y, MAX) + PROCESS_CORE_ENDSTOP(Y,MAX,Z,MAX); + #endif + #endif + } } - } + #endif - if (stepper.axis_is_moving(Z_AXIS)) { - if (stepper.motor_direction(Z_AXIS_HEAD)) { // Z -direction. Gantry down, bed up. - - #if HAS_Z_MIN || (Z_SPI_SENSORLESS && Z_HOME_DIR < 0) - if ( TERN1(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, z_probe_enabled) - && TERN1(HAS_CUSTOM_PROBE_PIN, !z_probe_enabled) - ) PROCESS_ENDSTOP_Z(MIN); - #if CORE_DIAG(XZ, X, MIN) - PROCESS_CORE_ENDSTOP(X,MIN,Z,MIN); - #elif CORE_DIAG(XZ, X, MAX) - PROCESS_CORE_ENDSTOP(X,MAX,Z,MIN); - #elif CORE_DIAG(YZ, Y, MIN) - PROCESS_CORE_ENDSTOP(Y,MIN,Z,MIN); - #elif CORE_DIAG(YZ, Y, MAX) - PROCESS_CORE_ENDSTOP(Y,MAX,Z,MIN); + #if LINEAR_AXES >= 4 + if (stepper.axis_is_moving(I_AXIS)) { + if (stepper.motor_direction(I_AXIS_HEAD)) { // -direction + #if HAS_I_MIN || (I_SPI_SENSORLESS && I_HOME_TO_MIN) + PROCESS_ENDSTOP(I, MIN); #endif - #endif + } + else { // +direction + #if HAS_I_MAX || (I_SPI_SENSORLESS && I_HOME_TO_MAX) + PROCESS_ENDSTOP(I, MAX); + #endif + } + } + #endif - // When closing the gap check the enabled probe - #if HAS_CUSTOM_PROBE_PIN - if (z_probe_enabled) PROCESS_ENDSTOP(Z, MIN_PROBE); - #endif + #if LINEAR_AXES >= 5 + if (stepper.axis_is_moving(J_AXIS)) { + if (stepper.motor_direction(J_AXIS_HEAD)) { // -direction + #if HAS_J_MIN || (J_SPI_SENSORLESS && J_HOME_TO_MIN) + PROCESS_ENDSTOP(J, MIN); + #endif + } + else { // +direction + #if HAS_J_MAX || (J_SPI_SENSORLESS && J_HOME_TO_MAX) + PROCESS_ENDSTOP(J, MAX); + #endif + } } - else { // Z +direction. Gantry up, bed down. - #if HAS_Z_MAX || (Z_SPI_SENSORLESS && Z_HOME_DIR > 0) - #if ENABLED(Z_MULTI_ENDSTOPS) - PROCESS_ENDSTOP_Z(MAX); - #elif !HAS_CUSTOM_PROBE_PIN || Z_MAX_PIN != Z_MIN_PROBE_PIN // No probe or probe is Z_MIN || Probe is not Z_MAX - PROCESS_ENDSTOP(Z, MAX); + #endif + + #if LINEAR_AXES >= 6 + if (stepper.axis_is_moving(K_AXIS)) { + if (stepper.motor_direction(K_AXIS_HEAD)) { // -direction + #if HAS_K_MIN || (K_SPI_SENSORLESS && K_HOME_TO_MIN) + PROCESS_ENDSTOP(K, MIN); #endif - #if CORE_DIAG(XZ, X, MIN) - PROCESS_CORE_ENDSTOP(X,MIN,Z,MAX); - #elif CORE_DIAG(XZ, X, MAX) - PROCESS_CORE_ENDSTOP(X,MAX,Z,MAX); - #elif CORE_DIAG(YZ, Y, MIN) - PROCESS_CORE_ENDSTOP(Y,MIN,Z,MAX); - #elif CORE_DIAG(YZ, Y, MAX) - PROCESS_CORE_ENDSTOP(Y,MAX,Z,MAX); + } + else { // +direction + #if HAS_K_MAX || (K_SPI_SENSORLESS && K_HOME_TO_MAX) + PROCESS_ENDSTOP(K, MAX); #endif - #endif + } } - } + #endif } // Endstops::update() #if ENABLED(SPI_ENDSTOPS) @@ -913,6 +1144,24 @@ void Endstops::update() { hit = true; } #endif + #if I_SPI_SENSORLESS + if (tmc_spi_homing.i && stepperI.test_stall_status()) { + SBI(live_state, I_ENDSTOP); + hit = true; + } + #endif + #if J_SPI_SENSORLESS + if (tmc_spi_homing.j && stepperJ.test_stall_status()) { + SBI(live_state, J_ENDSTOP); + hit = true; + } + #endif + #if K_SPI_SENSORLESS + if (tmc_spi_homing.k && stepperK.test_stall_status()) { + SBI(live_state, K_ENDSTOP); + hit = true; + } + #endif if (TERN0(ENDSTOP_INTERRUPTS_FEATURE, hit)) update(); @@ -923,6 +1172,9 @@ void Endstops::update() { TERN_(X_SPI_SENSORLESS, CBI(live_state, X_ENDSTOP)); TERN_(Y_SPI_SENSORLESS, CBI(live_state, Y_ENDSTOP)); TERN_(Z_SPI_SENSORLESS, CBI(live_state, Z_ENDSTOP)); + TERN_(I_SPI_SENSORLESS, CBI(live_state, I_ENDSTOP)); + TERN_(J_SPI_SENSORLESS, CBI(live_state, J_ENDSTOP)); + TERN_(K_SPI_SENSORLESS, CBI(live_state, K_ENDSTOP)); } #endif // SPI_ENDSTOPS @@ -999,9 +1251,27 @@ void Endstops::update() { #if HAS_Z4_MAX ES_GET_STATE(Z4_MAX); #endif + #if HAS_I_MAX + ES_GET_STATE(I_MAX); + #endif + #if HAS_I_MIN + ES_GET_STATE(I_MIN); + #endif + #if HAS_J_MAX + ES_GET_STATE(J_MAX); + #endif + #if HAS_J_MIN + ES_GET_STATE(J_MIN); + #endif + #if HAS_K_MAX + ES_GET_STATE(K_MAX); + #endif + #if HAS_K_MIN + ES_GET_STATE(K_MIN); + #endif uint16_t endstop_change = live_state_local ^ old_live_state_local; - #define ES_REPORT_CHANGE(S) if (TEST(endstop_change, S)) SERIAL_ECHOPAIR(" " STRINGIFY(S) ":", TEST(live_state_local, S)) + #define ES_REPORT_CHANGE(S) if (TEST(endstop_change, S)) SERIAL_ECHOPGM(" " STRINGIFY(S) ":", TEST(live_state_local, S)) if (endstop_change) { #if HAS_X_MIN @@ -1055,6 +1325,24 @@ void Endstops::update() { #if HAS_Z4_MAX ES_REPORT_CHANGE(Z4_MAX); #endif + #if HAS_I_MIN + ES_REPORT_CHANGE(I_MIN); + #endif + #if HAS_I_MAX + ES_REPORT_CHANGE(I_MAX); + #endif + #if HAS_J_MIN + ES_REPORT_CHANGE(J_MIN); + #endif + #if HAS_J_MAX + ES_REPORT_CHANGE(J_MAX); + #endif + #if HAS_K_MIN + ES_REPORT_CHANGE(K_MIN); + #endif + #if HAS_K_MAX + ES_REPORT_CHANGE(K_MAX); + #endif SERIAL_ECHOLNPGM("\n"); analogWrite(pin_t(LED_PIN), local_LED_status); local_LED_status ^= 255; diff --git a/Marlin/src/module/endstops.h b/Marlin/src/module/endstops.h index 05936a6bf34d..a35966a98c91 100644 --- a/Marlin/src/module/endstops.h +++ b/Marlin/src/module/endstops.h @@ -28,44 +28,96 @@ #include "../inc/MarlinConfig.h" #include +#define __ES_ITEM(N) N, +#define _ES_ITEM(K,N) TERN_(K,DEFER4(__ES_ITEM)(N)) + enum EndstopEnum : char { - X_MIN, Y_MIN, Z_MIN, Z_MIN_PROBE, - X_MAX, Y_MAX, Z_MAX, - X2_MIN, X2_MAX, - Y2_MIN, Y2_MAX, - Z2_MIN, Z2_MAX, - Z3_MIN, Z3_MAX, - Z4_MIN, Z4_MAX + // Common XYZ (ABC) endstops. Defined according to USE_[XYZ](MIN|MAX)_PLUG settings. + _ES_ITEM(HAS_X_MIN, X_MIN) + _ES_ITEM(HAS_X_MAX, X_MAX) + _ES_ITEM(HAS_Y_MIN, Y_MIN) + _ES_ITEM(HAS_Y_MAX, Y_MAX) + _ES_ITEM(HAS_Z_MIN, Z_MIN) + _ES_ITEM(HAS_Z_MAX, Z_MAX) + _ES_ITEM(HAS_I_MIN, I_MIN) + _ES_ITEM(HAS_I_MAX, I_MAX) + _ES_ITEM(HAS_J_MIN, J_MIN) + _ES_ITEM(HAS_J_MAX, J_MAX) + _ES_ITEM(HAS_K_MIN, K_MIN) + _ES_ITEM(HAS_K_MAX, K_MAX) + + // Extra Endstops for XYZ + _ES_ITEM(HAS_X2_MIN, X2_MIN) + _ES_ITEM(HAS_X2_MAX, X2_MAX) + _ES_ITEM(HAS_Y2_MIN, Y2_MIN) + _ES_ITEM(HAS_Y2_MAX, Y2_MAX) + _ES_ITEM(HAS_Z2_MIN, Z2_MIN) + _ES_ITEM(HAS_Z2_MAX, Z2_MAX) + _ES_ITEM(HAS_Z3_MIN, Z3_MIN) + _ES_ITEM(HAS_Z3_MAX, Z3_MAX) + _ES_ITEM(HAS_Z4_MIN, Z4_MIN) + _ES_ITEM(HAS_Z4_MAX, Z4_MAX) + + // Bed Probe state is distinct or shared with Z_MIN (i.e., when the probe is the only Z endstop) + #if !HAS_DELTA_SENSORLESS_PROBING + _ES_ITEM(HAS_BED_PROBE, Z_MIN_PROBE IF_DISABLED(USES_Z_MIN_PROBE_PIN, = Z_MIN)) + #endif + + // The total number of states + NUM_ENDSTOP_STATES + + // Endstops can be either MIN or MAX but not both + #if HAS_X_MIN || HAS_X_MAX + , X_ENDSTOP = TERN(X_HOME_TO_MAX, X_MAX, X_MIN) + #endif + #if HAS_Y_MIN || HAS_Y_MAX + , Y_ENDSTOP = TERN(Y_HOME_TO_MAX, Y_MAX, Y_MIN) + #endif + #if HAS_Z_MIN || HAS_Z_MAX || HOMING_Z_WITH_PROBE + , Z_ENDSTOP = TERN(Z_HOME_TO_MAX, Z_MAX, TERN(HOMING_Z_WITH_PROBE, Z_MIN_PROBE, Z_MIN)) + #endif + #if HAS_I_MIN || HAS_I_MAX + , I_ENDSTOP = TERN(I_HOME_TO_MAX, I_MAX, I_MIN) + #endif + #if HAS_J_MIN || HAS_J_MAX + , J_ENDSTOP = TERN(J_HOME_TO_MAX, J_MAX, J_MIN) + #endif + #if HAS_K_MIN || HAS_K_MAX + , K_ENDSTOP = TERN(K_HOME_TO_MAX, K_MAX, K_MIN) + #endif }; -#define X_ENDSTOP (X_HOME_DIR < 0 ? X_MIN : X_MAX) -#define Y_ENDSTOP (Y_HOME_DIR < 0 ? Y_MIN : Y_MAX) -#define Z_ENDSTOP (Z_HOME_DIR < 0 ? TERN(HOMING_Z_WITH_PROBE, Z_MIN, Z_MIN_PROBE) : Z_MAX) +#undef __ES_ITEM +#undef _ES_ITEM class Endstops { public: - #if HAS_EXTRA_ENDSTOPS - typedef uint16_t esbits_t; - TERN_(X_DUAL_ENDSTOPS, static float x2_endstop_adj); - TERN_(Y_DUAL_ENDSTOPS, static float y2_endstop_adj); - TERN_(Z_MULTI_ENDSTOPS, static float z2_endstop_adj); - #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 - static float z3_endstop_adj; - #endif - #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 - static float z4_endstop_adj; - #endif - #else - typedef uint8_t esbits_t; + + typedef IF<(NUM_ENDSTOP_STATES > 8), uint16_t, uint8_t>::type endstop_mask_t; + + #if ENABLED(X_DUAL_ENDSTOPS) + static float x2_endstop_adj; + #endif + #if ENABLED(Y_DUAL_ENDSTOPS) + static float y2_endstop_adj; + #endif + #if ENABLED(Z_MULTI_ENDSTOPS) + static float z2_endstop_adj; + #endif + #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 + static float z3_endstop_adj; + #endif + #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 + static float z4_endstop_adj; #endif private: static bool enabled, enabled_globally; - static esbits_t live_state; - static volatile uint8_t hit_state; // Use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT index + static endstop_mask_t live_state; + static volatile endstop_mask_t hit_state; // Use X_MIN, Y_MIN, Z_MIN and Z_MIN_PROBE as BIT index #if ENDSTOP_NOISE_THRESHOLD - static esbits_t validated_live_state; + static endstop_mask_t validated_live_state; static uint8_t endstop_poll_count; // Countdown from threshold for polling #endif @@ -101,12 +153,12 @@ class Endstops { /** * Get Endstop hit state. */ - FORCE_INLINE static uint8_t trigger_state() { return hit_state; } + FORCE_INLINE static endstop_mask_t trigger_state() { return hit_state; } /** * Get current endstops state */ - FORCE_INLINE static esbits_t state() { + FORCE_INLINE static endstop_mask_t state() { return #if ENDSTOP_NOISE_THRESHOLD validated_live_state @@ -172,7 +224,7 @@ class Endstops { typedef struct { union { bool any; - struct { bool x:1, y:1, z:1; }; + struct { bool LINEAR_AXIS_LIST(x:1, y:1, z:1, i:1, j:1, k:1); }; }; } tmc_spi_homing_t; static tmc_spi_homing_t tmc_spi_homing; diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index f7fc66b27af3..a56831c21428 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -51,7 +51,7 @@ #include "../feature/bltouch.h" #endif -#if HAS_DISPLAY +#if HAS_STATUS_MESSAGE #include "../lcd/marlinui.h" #endif @@ -74,17 +74,6 @@ #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) #include "../core/debug_out.h" -/** - * axis_homed - * Flags that each linear axis was homed. - * XYZ on cartesian, ABC on delta, ABZ on SCARA. - * - * axis_trusted - * Flags that the position is trusted in each linear axis. Set when homed. - * Cleared whenever a stepper powers off, potentially losing its position. - */ -uint8_t axis_homed, axis_trusted; // = 0 - // Relative Mode. Enable with G91, disable with G90. bool relative_mode; // = false; @@ -94,7 +83,13 @@ bool relative_mode; // = false; * Used by 'line_to_current_position' to do a move after changing it. * Used by 'sync_plan_position' to update 'planner.position'. */ -xyze_pos_t current_position = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS }; +#ifdef Z_IDLE_HEIGHT + #define Z_INIT_POS Z_IDLE_HEIGHT +#else + #define Z_INIT_POS Z_HOME_POS +#endif + +xyze_pos_t current_position = LOGICAL_AXIS_ARRAY(0, X_HOME_POS, Y_HOME_POS, Z_INIT_POS, I_HOME_POS, J_HOME_POS, K_HOME_POS); /** * Cartesian Destination @@ -107,7 +102,7 @@ xyze_pos_t destination; // {0} // G60/G61 Position Save and Return #if SAVED_POSITIONS uint8_t saved_slots[(SAVED_POSITIONS + 7) >> 3]; - xyz_pos_t stored_position[SAVED_POSITIONS]; + xyze_pos_t stored_position[SAVED_POSITIONS]; #endif // The active extruder (tool). Set with T command. @@ -129,7 +124,7 @@ xyze_pos_t destination; // {0} "Offsets for the first hotend must be 0.0." ); // Transpose from [XYZ][HOTENDS] to [HOTENDS][XYZ] - HOTEND_LOOP() LOOP_XYZ(a) hotend_offset[e][a] = tmp[a][e]; + HOTEND_LOOP() LOOP_ABC(a) hotend_offset[e][a] = tmp[a][e]; #if ENABLED(DUAL_X_CARRIAGE) hotend_offset[1].x = _MAX(X2_HOME_POS, X2_MAX_POS); #endif @@ -148,7 +143,7 @@ xyz_pos_t cartes; #if IS_KINEMATIC - abc_pos_t delta; + abce_pos_t delta; #if HAS_SCARA_OFFSET abc_pos_t scara_home_offset; @@ -185,7 +180,7 @@ xyz_pos_t cartes; #endif #if HAS_ABL_NOT_UBL - feedRate_t xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_SPEED); + feedRate_t xy_probe_feedrate_mm_s = MMM_TO_MMS(XY_PROBE_FEEDRATE); #endif /** @@ -200,19 +195,34 @@ inline void report_more_positions() { // Report the logical position for a given machine position inline void report_logical_position(const xyze_pos_t &rpos) { const xyze_pos_t lpos = rpos.asLogical(); - SERIAL_ECHOPAIR_P(X_LBL, lpos.x, SP_Y_LBL, lpos.y, SP_Z_LBL, lpos.z, SP_E_LBL, lpos.e); + SERIAL_ECHOPGM_P( + LIST_N(DOUBLE(LINEAR_AXES), + X_LBL, lpos.x, + SP_Y_LBL, lpos.y, + SP_Z_LBL, lpos.z, + SP_I_LBL, lpos.i, + SP_J_LBL, lpos.j, + SP_K_LBL, lpos.k + ) + #if HAS_EXTRUDERS + , SP_E_LBL, lpos.e + #endif + ); } // Report the real current position according to the steppers. // Forward kinematics and un-leveling are applied. void report_real_position() { get_cartesian_from_steppers(); - xyze_pos_t npos = cartes; - npos.e = planner.get_axis_position_mm(E_AXIS); + xyze_pos_t npos = LOGICAL_AXIS_ARRAY( + planner.get_axis_position_mm(E_AXIS), + cartes.x, cartes.y, cartes.z, + planner.get_axis_position_mm(I_AXIS), + planner.get_axis_position_mm(J_AXIS), + planner.get_axis_position_mm(K_AXIS) + ); - #if HAS_POSITION_MODIFIERS - planner.unapply_modifiers(npos, true); - #endif + TERN_(HAS_POSITION_MODIFIERS, planner.unapply_modifiers(npos, true)); report_logical_position(npos); report_more_positions(); @@ -235,6 +245,70 @@ void report_current_position_projected() { stepper.report_a_position(planner.position); } +#if ENABLED(AUTO_REPORT_POSITION) + //struct PositionReport { void report() { report_current_position_projected(); } }; + AutoReporter position_auto_reporter; +#endif + +#if EITHER(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS) + + M_StateEnum M_State_grbl = M_INIT; + + /** + * Output the current grbl compatible state to serial while moving + */ + void report_current_grblstate_moving() { SERIAL_ECHOLNPGM("S_XYZ:", int(M_State_grbl)); } + + /** + * Output the current position (processed) to serial while moving + */ + void report_current_position_moving() { + + get_cartesian_from_steppers(); + const xyz_pos_t lpos = cartes.asLogical(); + SERIAL_ECHOPGM( + "X:", lpos.x + #if HAS_Y_AXIS + , " Y:", lpos.y + #endif + #if HAS_Z_AXIS + , " Z:", lpos.z + #endif + #if HAS_EXTRUDERS + , " E:", current_position.e + #endif + ); + + stepper.report_positions(); + #if IS_SCARA + scara_report_positions(); + #endif + + report_current_grblstate_moving(); + } + + /** + * Set a Grbl-compatible state from the current marlin_state + */ + M_StateEnum grbl_state_for_marlin_state() { + switch (marlin_state) { + case MF_INITIALIZING: return M_INIT; + case MF_SD_COMPLETE: return M_ALARM; + case MF_WAITING: return M_IDLE; + case MF_STOPPED: return M_END; + case MF_RUNNING: return M_RUNNING; + case MF_PAUSED: return M_HOLD; + case MF_KILLED: return M_ERROR; + default: return M_IDLE; + } + } + +#endif + +void home_if_needed(const bool keeplev/*=false*/) { + if (!all_axes_trusted()) gcode.home_all_axes(keeplev); +} + /** * Run out the planner buffer and re-sync the current * position from the last-updated stepper positions. @@ -242,10 +316,24 @@ void report_current_position_projected() { void quickstop_stepper() { planner.quick_stop(); planner.synchronize(); - set_current_from_steppers_for_axis(ALL_AXES); + set_current_from_steppers_for_axis(ALL_AXES_ENUM); sync_plan_position(); } +#if ENABLED(REALTIME_REPORTING_COMMANDS) + + void quickpause_stepper() { + planner.quick_pause(); + //planner.synchronize(); + } + + void quickresume_stepper() { + planner.quick_resume(); + //planner.synchronize(); + } + +#endif + /** * Set the planner/stepper positions directly from current_position with * no kinematic translation. Used for homing axes and cartesian/core syncing. @@ -255,7 +343,9 @@ void sync_plan_position() { planner.set_position_mm(current_position); } -void sync_plan_position_e() { planner.set_e_position_mm(current_position.e); } +#if HAS_EXTRUDERS + void sync_plan_position_e() { planner.set_e_position_mm(current_position.e); } +#endif /** * Get the stepper positions in the cartes[] array. @@ -268,17 +358,22 @@ void sync_plan_position_e() { planner.set_e_position_mm(current_position.e); } */ void get_cartesian_from_steppers() { #if ENABLED(DELTA) - forward_kinematics_DELTA(planner.get_axis_positions_mm()); - #else - #if IS_SCARA - forward_kinematics_SCARA( - planner.get_axis_position_degrees(A_AXIS), - planner.get_axis_position_degrees(B_AXIS) - ); - #else - cartes.set(planner.get_axis_position_mm(X_AXIS), planner.get_axis_position_mm(Y_AXIS)); - #endif + forward_kinematics(planner.get_axis_positions_mm()); + #elif IS_SCARA + forward_kinematics( + planner.get_axis_position_degrees(A_AXIS), planner.get_axis_position_degrees(B_AXIS) + OPTARG(AXEL_TPARA, planner.get_axis_position_degrees(C_AXIS)) + ); cartes.z = planner.get_axis_position_mm(Z_AXIS); + #else + LINEAR_AXIS_CODE( + cartes.x = planner.get_axis_position_mm(X_AXIS), + cartes.y = planner.get_axis_position_mm(Y_AXIS), + cartes.z = planner.get_axis_position_mm(Z_AXIS), + cartes.i = planner.get_axis_position_mm(I_AXIS), + cartes.j = planner.get_axis_position_mm(J_AXIS), + cartes.k = planner.get_axis_position_mm(K_AXIS) + ); #endif } @@ -296,13 +391,12 @@ void get_cartesian_from_steppers() { void set_current_from_steppers_for_axis(const AxisEnum axis) { get_cartesian_from_steppers(); xyze_pos_t pos = cartes; - pos.e = planner.get_axis_position_mm(E_AXIS); - #if HAS_POSITION_MODIFIERS - planner.unapply_modifiers(pos, true); - #endif + TERN_(HAS_EXTRUDERS, pos.e = planner.get_axis_position_mm(E_AXIS)); - if (axis == ALL_AXES) + TERN_(HAS_POSITION_MODIFIERS, planner.unapply_modifiers(pos, true)); + + if (axis == ALL_AXES_ENUM) current_position = pos; else current_position[axis] = pos[axis]; @@ -312,12 +406,12 @@ void set_current_from_steppers_for_axis(const AxisEnum axis) { * Move the planner to the current position from wherever it last moved * (or from wherever it has been told it is located). */ -void line_to_current_position(const feedRate_t &fr_mm_s/*=feedrate_mm_s*/) { - planner.buffer_line(current_position, fr_mm_s, active_extruder); +void line_to_current_position(const_feedRate_t fr_mm_s/*=feedrate_mm_s*/) { + planner.buffer_line(current_position, fr_mm_s); } -#if EXTRUDERS - void unscaled_e_move(const float &length, const feedRate_t &fr_mm_s) { +#if HAS_EXTRUDERS + void unscaled_e_move(const_float_t length, const_feedRate_t fr_mm_s) { TERN_(HAS_FILAMENT_SENSOR, runout.reset()); current_position.e += length / planner.e_factor[active_extruder]; line_to_current_position(fr_mm_s); @@ -330,7 +424,7 @@ void line_to_current_position(const feedRate_t &fr_mm_s/*=feedrate_mm_s*/) { /** * Buffer a fast move without interpolation. Set current_position to destination */ - void prepare_fast_move_to_destination(const feedRate_t &scaled_fr_mm_s/*=MMS_SCALED(feedrate_mm_s)*/) { + void prepare_fast_move_to_destination(const_feedRate_t scaled_fr_mm_s/*=MMS_SCALED(feedrate_mm_s)*/) { if (DEBUGGING(LEVELING)) DEBUG_POS("prepare_fast_move_to_destination", destination); #if UBL_SEGMENTED @@ -339,7 +433,7 @@ void line_to_current_position(const feedRate_t &fr_mm_s/*=feedrate_mm_s*/) { #else if (current_position == destination) return; - planner.buffer_line(destination, scaled_fr_mm_s, active_extruder); + planner.buffer_line(destination, scaled_fr_mm_s); #endif current_position = destination; @@ -352,10 +446,8 @@ void line_to_current_position(const feedRate_t &fr_mm_s/*=feedrate_mm_s*/) { * - Move at normal speed regardless of feedrate percentage. * - Extrude the specified length regardless of flow percentage. */ -void _internal_move_to_destination(const feedRate_t &fr_mm_s/*=0.0f*/ - #if IS_KINEMATIC - , const bool is_fast/*=false*/ - #endif +void _internal_move_to_destination(const_feedRate_t fr_mm_s/*=0.0f*/ + OPTARG(IS_KINEMATIC, const bool is_fast/*=false*/) ) { const feedRate_t old_feedrate = feedrate_mm_s; if (fr_mm_s) feedrate_mm_s = fr_mm_s; @@ -363,49 +455,55 @@ void _internal_move_to_destination(const feedRate_t &fr_mm_s/*=0.0f*/ const uint16_t old_pct = feedrate_percentage; feedrate_percentage = 100; - #if EXTRUDERS + #if HAS_EXTRUDERS const float old_fac = planner.e_factor[active_extruder]; planner.e_factor[active_extruder] = 1.0f; #endif - #if IS_KINEMATIC - if (is_fast) - prepare_fast_move_to_destination(); - else - #endif - prepare_line_to_destination(); + if (TERN0(IS_KINEMATIC, is_fast)) + TERN(IS_KINEMATIC, prepare_fast_move_to_destination(), NOOP); + else + prepare_line_to_destination(); feedrate_mm_s = old_feedrate; feedrate_percentage = old_pct; - #if EXTRUDERS - planner.e_factor[active_extruder] = old_fac; - #endif + TERN_(HAS_EXTRUDERS, planner.e_factor[active_extruder] = old_fac); } /** - * Plan a move to (X, Y, Z) and set the current_position + * Plan a move to (X, Y, Z, [I, [J, [K]]]) and set the current_position + * Plan a move to (X, Y, Z) with separation of Z from other components. + * + * - If Z is moving up, the Z move is done before XY, etc. + * - If Z is moving down, the Z move is done after XY, etc. + * - Delta may lower Z first to get into the free motion zone. + * - Before returning, wait for the planner buffer to empty. */ -void do_blocking_move_to(const float rx, const float ry, const float rz, const feedRate_t &fr_mm_s/*=0.0*/) { +void do_blocking_move_to(LINEAR_AXIS_ARGS(const float), const_feedRate_t fr_mm_s/*=0.0f*/) { DEBUG_SECTION(log_move, "do_blocking_move_to", DEBUGGING(LEVELING)); - if (DEBUGGING(LEVELING)) DEBUG_XYZ("> ", rx, ry, rz); + if (DEBUGGING(LEVELING)) DEBUG_XYZ("> ", LINEAR_AXIS_ARGS()); - const feedRate_t z_feedrate = fr_mm_s ?: homing_feedrate(Z_AXIS), - xy_feedrate = fr_mm_s ?: feedRate_t(XY_PROBE_FEEDRATE_MM_S); + const feedRate_t xy_feedrate = fr_mm_s ?: feedRate_t(XY_PROBE_FEEDRATE_MM_S); - #if ENABLED(DELTA) + #if HAS_Z_AXIS + const feedRate_t z_feedrate = fr_mm_s ?: homing_feedrate(Z_AXIS); + #endif - if (!position_is_reachable(rx, ry)) return; + #if IS_KINEMATIC + if (!position_is_reachable(x, y)) return; + destination = current_position; // sync destination at the start + #endif - REMEMBER(fr, feedrate_mm_s, xy_feedrate); + #if ENABLED(DELTA) - destination = current_position; // sync destination at the start + REMEMBER(fr, feedrate_mm_s, xy_feedrate); if (DEBUGGING(LEVELING)) DEBUG_POS("destination = current_position", destination); // when in the danger zone if (current_position.z > delta_clip_start_height) { - if (rz > delta_clip_start_height) { // staying in the danger zone - destination.set(rx, ry, rz); // move directly (uninterpolated) + if (z > delta_clip_start_height) { // staying in the danger zone + destination.set(x, y, z); // move directly (uninterpolated) prepare_internal_fast_move_to_destination(); // set current_position from destination if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position); return; @@ -415,102 +513,157 @@ void do_blocking_move_to(const float rx, const float ry, const float rz, const f if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position); } - if (rz > current_position.z) { // raising? - destination.z = rz; + if (z > current_position.z) { // raising? + destination.z = z; prepare_internal_fast_move_to_destination(z_feedrate); // set current_position from destination if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position); } - destination.set(rx, ry); + destination.set(x, y); prepare_internal_move_to_destination(); // set current_position from destination if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position); - if (rz < current_position.z) { // lowering? - destination.z = rz; + if (z < current_position.z) { // lowering? + destination.z = z; prepare_internal_fast_move_to_destination(z_feedrate); // set current_position from destination if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position); } #elif IS_SCARA - if (!position_is_reachable(rx, ry)) return; - - destination = current_position; - // If Z needs to raise, do it before moving XY - if (destination.z < rz) { - destination.z = rz; + if (destination.z < z) { + destination.z = z; prepare_internal_fast_move_to_destination(z_feedrate); } - destination.set(rx, ry); + destination.set(x, y); prepare_internal_fast_move_to_destination(xy_feedrate); // If Z needs to lower, do it after moving XY - if (destination.z > rz) { - destination.z = rz; + if (destination.z > z) { + destination.z = z; prepare_internal_fast_move_to_destination(z_feedrate); } #else - // If Z needs to raise, do it before moving XY - if (current_position.z < rz) { - current_position.z = rz; - line_to_current_position(z_feedrate); - } + #if HAS_Z_AXIS + // If Z needs to raise, do it before moving XY + if (current_position.z < z) { + current_position.z = z; + line_to_current_position(z_feedrate); + } + #endif - current_position.set(rx, ry); + current_position.set(x, y); line_to_current_position(xy_feedrate); - // If Z needs to lower, do it after moving XY - if (current_position.z > rz) { - current_position.z = rz; - line_to_current_position(z_feedrate); - } + #if HAS_Z_AXIS + // If Z needs to lower, do it after moving XY + if (current_position.z > z) { + current_position.z = z; + line_to_current_position(z_feedrate); + } + #endif #endif planner.synchronize(); } -void do_blocking_move_to(const xy_pos_t &raw, const feedRate_t &fr_mm_s/*=0.0f*/) { - do_blocking_move_to(raw.x, raw.y, current_position.z, fr_mm_s); +void do_blocking_move_to(const xy_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f*/) { + do_blocking_move_to(LINEAR_AXIS_LIST(raw.x, raw.y, current_position.z, current_position.i, current_position.j, current_position.k), fr_mm_s); } -void do_blocking_move_to(const xyz_pos_t &raw, const feedRate_t &fr_mm_s/*=0.0f*/) { - do_blocking_move_to(raw.x, raw.y, raw.z, fr_mm_s); +void do_blocking_move_to(const xyz_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f*/) { + do_blocking_move_to(LINEAR_AXIS_ELEM(raw), fr_mm_s); } -void do_blocking_move_to(const xyze_pos_t &raw, const feedRate_t &fr_mm_s/*=0.0f*/) { - do_blocking_move_to(raw.x, raw.y, raw.z, fr_mm_s); +void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f*/) { + do_blocking_move_to(LINEAR_AXIS_ELEM(raw), fr_mm_s); } - -void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s/*=0.0*/) { - do_blocking_move_to(rx, current_position.y, current_position.z, fr_mm_s); -} -void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s/*=0.0*/) { - do_blocking_move_to(current_position.x, ry, current_position.z, fr_mm_s); -} -void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s/*=0.0*/) { - do_blocking_move_to_xy_z(current_position, rz, fr_mm_s); +void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) { + do_blocking_move_to( + LINEAR_AXIS_LIST(rx, current_position.y, current_position.z, current_position.i, current_position.j, current_position.k), + fr_mm_s + ); } -void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s/*=0.0*/) { - do_blocking_move_to(rx, ry, current_position.z, fr_mm_s); -} -void do_blocking_move_to_xy(const xy_pos_t &raw, const feedRate_t &fr_mm_s/*=0.0f*/) { - do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s); -} +#if HAS_Y_AXIS + void do_blocking_move_to_y(const_float_t ry, const_feedRate_t fr_mm_s/*=0.0*/) { + do_blocking_move_to( + LINEAR_AXIS_LIST(current_position.x, ry, current_position.z, current_position.i, current_position.j, current_position.k), + fr_mm_s + ); + } +#endif -void do_blocking_move_to_xy_z(const xy_pos_t &raw, const float &z, const feedRate_t &fr_mm_s/*=0.0f*/) { - do_blocking_move_to(raw.x, raw.y, z, fr_mm_s); -} +#if HAS_Z_AXIS + void do_blocking_move_to_z(const_float_t rz, const_feedRate_t fr_mm_s/*=0.0*/) { + do_blocking_move_to_xy_z(current_position, rz, fr_mm_s); + } +#endif -void do_z_clearance(const float &zclear, const bool z_trusted/*=true*/, const bool raise_on_untrusted/*=true*/, const bool lower_allowed/*=false*/) { - const bool rel = raise_on_untrusted && !z_trusted; - float zdest = zclear + (rel ? current_position.z : 0.0f); - if (!lower_allowed) NOLESS(zdest, current_position.z); - do_blocking_move_to_z(_MIN(zdest, Z_MAX_POS), TERN(HAS_BED_PROBE, z_probe_fast_mm_s, homing_feedrate(Z_AXIS))); -} +#if LINEAR_AXES >= 4 + void do_blocking_move_to_i(const_float_t ri, const_feedRate_t fr_mm_s/*=0.0*/) { + do_blocking_move_to_xyz_i(current_position, ri, fr_mm_s); + } + void do_blocking_move_to_xyz_i(const xyze_pos_t &raw, const_float_t i, const_feedRate_t fr_mm_s/*=0.0f*/) { + do_blocking_move_to( + LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, i, raw.j, raw.k), + fr_mm_s + ); + } +#endif + +#if LINEAR_AXES >= 5 + void do_blocking_move_to_j(const_float_t rj, const_feedRate_t fr_mm_s/*=0.0*/) { + do_blocking_move_to_xyzi_j(current_position, rj, fr_mm_s); + } + void do_blocking_move_to_xyzi_j(const xyze_pos_t &raw, const_float_t j, const_feedRate_t fr_mm_s/*=0.0f*/) { + do_blocking_move_to( + LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, j, raw.k), + fr_mm_s + ); + } +#endif + +#if LINEAR_AXES >= 6 + void do_blocking_move_to_k(const_float_t rk, const_feedRate_t fr_mm_s/*=0.0*/) { + do_blocking_move_to_xyzij_k(current_position, rk, fr_mm_s); + } + void do_blocking_move_to_xyzij_k(const xyze_pos_t &raw, const_float_t k, const_feedRate_t fr_mm_s/*=0.0f*/) { + do_blocking_move_to( + LINEAR_AXIS_LIST(raw.x, raw.y, raw.z, raw.i, raw.j, k), + fr_mm_s + ); + } +#endif + +#if HAS_Y_AXIS + void do_blocking_move_to_xy(const_float_t rx, const_float_t ry, const_feedRate_t fr_mm_s/*=0.0*/) { + do_blocking_move_to( + LINEAR_AXIS_LIST(rx, ry, current_position.z, current_position.i, current_position.j, current_position.k), + fr_mm_s + ); + } + void do_blocking_move_to_xy(const xy_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f*/) { + do_blocking_move_to_xy(raw.x, raw.y, fr_mm_s); + } +#endif + +#if HAS_Z_AXIS + void do_blocking_move_to_xy_z(const xy_pos_t &raw, const_float_t z, const_feedRate_t fr_mm_s/*=0.0f*/) { + do_blocking_move_to( + LINEAR_AXIS_LIST(raw.x, raw.y, z, current_position.i, current_position.j, current_position.k), + fr_mm_s + ); + } + void do_z_clearance(const_float_t zclear, const bool lower_allowed/*=false*/) { + float zdest = zclear; + if (!lower_allowed) NOLESS(zdest, current_position.z); + do_blocking_move_to_z(_MIN(zdest, Z_MAX_POS), TERN(HAS_BED_PROBE, z_probe_fast_mm_s, homing_feedrate(Z_AXIS))); + } +#endif // // Prepare to do endstop or probe moves with custom feedrates. @@ -536,8 +689,8 @@ void restore_feedrate_and_scaling() { // Software Endstops are based on the configured limits. soft_endstops_t soft_endstop = { true, false, - { X_MIN_POS, Y_MIN_POS, Z_MIN_POS }, - { X_MAX_POS, Y_MAX_POS, Z_MAX_POS } + LINEAR_AXIS_ARRAY(X_MIN_POS, Y_MIN_POS, Z_MIN_POS, I_MIN_POS, J_MIN_POS, K_MIN_POS), + LINEAR_AXIS_ARRAY(X_MAX_BED, Y_MAX_BED, Z_MAX_POS, I_MAX_POS, J_MAX_POS, K_MAX_POS) }; /** @@ -550,10 +703,7 @@ void restore_feedrate_and_scaling() { * at the same positions relative to the machine. */ void update_software_endstops(const AxisEnum axis - #if HAS_HOTEND_OFFSET - , const uint8_t old_tool_index/*=0*/ - , const uint8_t new_tool_index/*=0*/ - #endif + OPTARG(HAS_HOTEND_OFFSET, const uint8_t old_tool_index/*=0*/, const uint8_t new_tool_index/*=0*/) ) { #if ENABLED(DUAL_X_CARRIAGE) @@ -585,7 +735,7 @@ void restore_feedrate_and_scaling() { #elif ENABLED(DELTA) soft_endstop.min[axis] = base_min_pos(axis); - soft_endstop.max[axis] = (axis == Z_AXIS) ? delta_height - TERN0(HAS_BED_PROBE, probe.offset.z) : base_max_pos(axis); + soft_endstop.max[axis] = (axis == Z_AXIS) ? DIFF_TERN(HAS_BED_PROBE, delta_height, probe.offset.z) : base_max_pos(axis); switch (axis) { case X_AXIS: @@ -624,7 +774,7 @@ void restore_feedrate_and_scaling() { #endif if (DEBUGGING(LEVELING)) - SERIAL_ECHOLNPAIR("Axis ", XYZ_CHAR(axis), " min:", soft_endstop.min[axis], " max:", soft_endstop.max[axis]); + SERIAL_ECHOLNPGM("Axis ", AS_CHAR(AXIS_CHAR(axis)), " min:", soft_endstop.min[axis], " max:", soft_endstop.max[axis]); } /** @@ -666,25 +816,59 @@ void restore_feedrate_and_scaling() { #endif } - if (axis_was_homed(Y_AXIS)) { - #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_Y) - NOLESS(target.y, soft_endstop.min.y); + #if HAS_Y_AXIS + if (axis_was_homed(Y_AXIS)) { + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_Y) + NOLESS(target.y, soft_endstop.min.y); + #endif + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MAX_SOFTWARE_ENDSTOP_Y) + NOMORE(target.y, soft_endstop.max.y); + #endif + } + #endif + + #endif + + #if HAS_Z_AXIS + if (axis_was_homed(Z_AXIS)) { + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_Z) + NOLESS(target.z, soft_endstop.min.z); #endif - #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MAX_SOFTWARE_ENDSTOP_Y) - NOMORE(target.y, soft_endstop.max.y); + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MAX_SOFTWARE_ENDSTOP_Z) + NOMORE(target.z, soft_endstop.max.z); + #endif + } + #endif + #if LINEAR_AXES >= 4 + if (axis_was_homed(I_AXIS)) { + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_I) + NOLESS(target.i, soft_endstop.min.i); + #endif + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MAX_SOFTWARE_ENDSTOP_I) + NOMORE(target.i, soft_endstop.max.i); + #endif + } + #endif + #if LINEAR_AXES >= 5 + if (axis_was_homed(J_AXIS)) { + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_J) + NOLESS(target.j, soft_endstop.min.j); + #endif + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MAX_SOFTWARE_ENDSTOP_J) + NOMORE(target.j, soft_endstop.max.j); + #endif + } + #endif + #if LINEAR_AXES >= 6 + if (axis_was_homed(K_AXIS)) { + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_K) + NOLESS(target.k, soft_endstop.min.k); + #endif + #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MAX_SOFTWARE_ENDSTOP_K) + NOMORE(target.k, soft_endstop.max.k); #endif } - #endif - - if (axis_was_homed(Z_AXIS)) { - #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_Z) - NOLESS(target.z, soft_endstop.min.z); - #endif - #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MAX_SOFTWARE_ENDSTOP_Z) - NOMORE(target.z, soft_endstop.max.z); - #endif - } } #else // !HAS_SOFTWARE_ENDSTOPS @@ -744,7 +928,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { // If the move is only in Z/E don't split up the move if (!diff.x && !diff.y) { - planner.buffer_line(destination, scaled_fr_mm_s, active_extruder); + planner.buffer_line(destination, scaled_fr_mm_s); return false; // caller will update current_position } @@ -755,7 +939,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { float cartesian_mm = diff.magnitude(); // If the move is very short, check the E move distance - if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = ABS(diff.e); + TERN_(HAS_EXTRUDERS, if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = ABS(diff.e)); // No E move either? Game over. if (UNEAR_ZERO(cartesian_mm)) return true; @@ -765,7 +949,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { // The number of segments-per-second times the duration // gives the number of segments - uint16_t segments = delta_segments_per_second * seconds; + uint16_t segments = segments_per_second * seconds; // For SCARA enforce a minimum segment size #if IS_SCARA @@ -785,10 +969,10 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { #endif /* - SERIAL_ECHOPAIR("mm=", cartesian_mm); - SERIAL_ECHOPAIR(" seconds=", seconds); - SERIAL_ECHOPAIR(" segments=", segments); - SERIAL_ECHOPAIR(" segment_mm=", cartesian_segment_mm); + SERIAL_ECHOPGM("mm=", cartesian_mm); + SERIAL_ECHOPGM(" seconds=", seconds); + SERIAL_ECHOPGM(" segments=", segments); + SERIAL_ECHOPGM(" segment_mm=", cartesian_segment_mm); SERIAL_EOL(); //*/ @@ -800,19 +984,11 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { while (--segments) { segment_idle(next_idle_ms); raw += segment_distance; - if (!planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, cartesian_segment_mm - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif - )) break; + if (!planner.buffer_line(raw, scaled_fr_mm_s, active_extruder, cartesian_segment_mm OPTARG(SCARA_FEEDRATE_SCALING, inv_duration))) break; } // Ensure last segment arrives at target location. - planner.buffer_line(destination, scaled_fr_mm_s, active_extruder, cartesian_segment_mm - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif - ); + planner.buffer_line(destination, scaled_fr_mm_s, active_extruder, cartesian_segment_mm OPTARG(SCARA_FEEDRATE_SCALING, inv_duration)); return false; // caller will update current_position } @@ -828,13 +1004,13 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { * small incremental moves. This allows the planner to * apply more detailed bed leveling to the full move. */ - inline void segmented_line_to_destination(const feedRate_t &fr_mm_s, const float segment_size=LEVELED_SEGMENT_LENGTH) { + inline void segmented_line_to_destination(const_feedRate_t fr_mm_s, const float segment_size=LEVELED_SEGMENT_LENGTH) { const xyze_float_t diff = destination - current_position; // If the move is only in Z/E don't split up the move if (!diff.x && !diff.y) { - planner.buffer_line(destination, fr_mm_s, active_extruder); + planner.buffer_line(destination, fr_mm_s); return; } @@ -842,7 +1018,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { // If the move is very short, check the E move distance // No E move either? Game over. float cartesian_mm = diff.magnitude(); - if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = ABS(diff.e); + TERN_(HAS_EXTRUDERS, if (UNEAR_ZERO(cartesian_mm)) cartesian_mm = ABS(diff.e)); if (UNEAR_ZERO(cartesian_mm)) return; // The length divided by the segment size @@ -859,9 +1035,9 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { const float inv_duration = scaled_fr_mm_s / cartesian_segment_mm; #endif - // SERIAL_ECHOPAIR("mm=", cartesian_mm); - // SERIAL_ECHOLNPAIR(" segments=", segments); - // SERIAL_ECHOLNPAIR(" segment_mm=", cartesian_segment_mm); + //SERIAL_ECHOPGM("mm=", cartesian_mm); + //SERIAL_ECHOLNPGM(" segments=", segments); + //SERIAL_ECHOLNPGM(" segment_mm=", cartesian_segment_mm); // Get the raw current position as starting point xyze_pos_t raw = current_position; @@ -871,20 +1047,12 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { while (--segments) { segment_idle(next_idle_ms); raw += segment_distance; - if (!planner.buffer_line(raw, fr_mm_s, active_extruder, cartesian_segment_mm - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif - )) break; + if (!planner.buffer_line(raw, fr_mm_s, active_extruder, cartesian_segment_mm OPTARG(SCARA_FEEDRATE_SCALING, inv_duration))) break; } // Since segment_distance is only approximate, // the final move must be to the exact destination. - planner.buffer_line(destination, fr_mm_s, active_extruder, cartesian_segment_mm - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif - ); + planner.buffer_line(destination, fr_mm_s, active_extruder, cartesian_segment_mm OPTARG(SCARA_FEEDRATE_SCALING, inv_duration)); } #endif // SEGMENT_LEVELED_MOVES @@ -924,7 +1092,7 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { } #endif // HAS_MESH - planner.buffer_line(destination, scaled_fr_mm_s, active_extruder); + planner.buffer_line(destination, scaled_fr_mm_s); return false; // caller will update current_position } @@ -942,16 +1110,16 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { DualXMode dual_x_carriage_mode = DEFAULT_DUAL_X_CARRIAGE_MODE; float inactive_extruder_x = X2_MAX_POS, // Used in mode 0 & 1 - duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // Used in mode 2 + duplicate_extruder_x_offset = DEFAULT_DUPLICATION_X_OFFSET; // Used in mode 2 & 3 xyz_pos_t raised_parked_position; // Used in mode 1 - bool active_extruder_parked = false; // Used in mode 1 & 2 + bool active_extruder_parked = false; // Used in mode 1, 2 & 3 millis_t delayed_move_time = 0; // Used in mode 1 - int16_t duplicate_extruder_temp_offset = 0; // Used in mode 2 + celsius_t duplicate_extruder_temp_offset = 0; // Used in mode 2 & 3 bool idex_mirrored_mode = false; // Used in mode 3 float x_home_pos(const uint8_t extruder) { if (extruder == 0) - return base_home_pos(X_AXIS); + return X_HOME_POS; else /** * In dual carriage mode the extruder offset provides an override of the @@ -1006,12 +1174,12 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { // Un-park the active extruder // const feedRate_t fr_zfast = planner.settings.max_feedrate_mm_s[Z_AXIS]; - #define CURPOS current_position - #define RAISED raised_parked_position // 1. Move to the raised parked XYZ. Presumably the tool is already at XY. - if (planner.buffer_line(RAISED.x, RAISED.y, RAISED.z, CURPOS.e, fr_zfast, active_extruder)) { + xyze_pos_t raised = raised_parked_position; raised.e = current_position.e; + if (planner.buffer_line(raised, fr_zfast)) { // 2. Move to the current native XY and raised Z. Presumably this is a null move. - if (planner.buffer_line(CURPOS.x, CURPOS.y, RAISED.z, CURPOS.e, PLANNER_XY_FEEDRATE(), active_extruder)) { + xyze_pos_t curpos = current_position; curpos.z = raised_parked_position.z; + if (planner.buffer_line(curpos, PLANNER_XY_FEEDRATE())) { // 3. Lower Z back down line_to_current_position(fr_zfast); } @@ -1025,21 +1193,24 @@ FORCE_INLINE void segment_idle(millis_t &next_idle_ms) { case DXC_MIRRORED_MODE: case DXC_DUPLICATION_MODE: if (active_extruder == 0) { - xyze_pos_t new_pos = current_position; + // Restore planner to parked head (T1) X position + xyze_pos_t pos_now = current_position; + pos_now.x = inactive_extruder_x; + planner.set_position_mm(pos_now); + + // Keep the same X or add the duplication X offset + xyze_pos_t new_pos = pos_now; if (dual_x_carriage_mode == DXC_DUPLICATION_MODE) new_pos.x += duplicate_extruder_x_offset; - else - new_pos.x = inactive_extruder_x; - // Move duplicate extruder into correct duplication position. - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Set planner X", inactive_extruder_x, " ... Line to X", new_pos.x); - planner.set_position_mm(inactive_extruder_x, current_position.y, current_position.z, current_position.e); - if (!planner.buffer_line(new_pos, planner.settings.max_feedrate_mm_s[X_AXIS], 1)) break; + // Move duplicate extruder into the correct position + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Set planner X", inactive_extruder_x, " ... Line to X", new_pos.x); + if (!planner.buffer_line(new_pos, planner.settings.max_feedrate_mm_s[X_AXIS], 1)) break; planner.synchronize(); - sync_plan_position(); - set_duplication_enabled(true); - idex_set_parked(false); + sync_plan_position(); // Extra sync for good measure + set_duplication_enabled(true); // Enable Duplication + idex_set_parked(false); // No longer parked if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("set_duplication_enabled(true)\nidex_set_parked(false)"); } else if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Active extruder not 0"); @@ -1122,765 +1293,849 @@ void prepare_line_to_destination() { current_position = destination; } -uint8_t axes_should_home(uint8_t axis_bits/*=0x07*/) { - #define SHOULD_HOME(A) TERN(HOME_AFTER_DEACTIVATE, axis_is_trusted, axis_was_homed)(A) - // Clear test bits that are trusted - if (TEST(axis_bits, X_AXIS) && SHOULD_HOME(X_AXIS)) CBI(axis_bits, X_AXIS); - if (TEST(axis_bits, Y_AXIS) && SHOULD_HOME(Y_AXIS)) CBI(axis_bits, Y_AXIS); - if (TEST(axis_bits, Z_AXIS) && SHOULD_HOME(Z_AXIS)) CBI(axis_bits, Z_AXIS); - return axis_bits; -} +#if HAS_ENDSTOPS + + linear_axis_bits_t axis_homed, axis_trusted; // = 0 -bool homing_needed_error(uint8_t axis_bits/*=0x07*/) { - if ((axis_bits = axes_should_home(axis_bits))) { - PGM_P home_first = GET_TEXT(MSG_HOME_FIRST); - char msg[strlen_P(home_first)+1]; - sprintf_P(msg, home_first, - TEST(axis_bits, X_AXIS) ? "X" : "", - TEST(axis_bits, Y_AXIS) ? "Y" : "", - TEST(axis_bits, Z_AXIS) ? "Z" : "" + linear_axis_bits_t axes_should_home(linear_axis_bits_t axis_bits/*=linear_bits*/) { + auto set_should = [](linear_axis_bits_t &b, AxisEnum a) { + if (TEST(b, a) && TERN(HOME_AFTER_DEACTIVATE, axis_is_trusted, axis_was_homed)(a)) + CBI(b, a); + }; + // Clear test bits that are trusted + LINEAR_AXIS_CODE( + set_should(axis_bits, X_AXIS), set_should(axis_bits, Y_AXIS), set_should(axis_bits, Z_AXIS), + set_should(axis_bits, I_AXIS), set_should(axis_bits, J_AXIS), set_should(axis_bits, K_AXIS) ); - SERIAL_ECHO_START(); - SERIAL_ECHOLN(msg); - TERN_(HAS_DISPLAY, ui.set_status(msg)); - return true; + return axis_bits; } - return false; -} -/** - * Homing bump feedrate (mm/s) - */ -feedRate_t get_homing_bump_feedrate(const AxisEnum axis) { - #if HOMING_Z_WITH_PROBE - if (axis == Z_AXIS) return MMM_TO_MMS(Z_PROBE_SPEED_SLOW); - #endif - static const uint8_t homing_bump_divisor[] PROGMEM = HOMING_BUMP_DIVISOR; - uint8_t hbd = pgm_read_byte(&homing_bump_divisor[axis]); - if (hbd < 1) { - hbd = 10; - SERIAL_ECHO_MSG("Warning: Homing Bump Divisor < 1"); + bool homing_needed_error(linear_axis_bits_t axis_bits/*=linear_bits*/) { + if ((axis_bits = axes_should_home(axis_bits))) { + PGM_P home_first = GET_TEXT(MSG_HOME_FIRST); + char msg[strlen_P(home_first)+1]; + sprintf_P(msg, home_first, + LINEAR_AXIS_LIST( + TEST(axis_bits, X_AXIS) ? "X" : "", + TEST(axis_bits, Y_AXIS) ? "Y" : "", + TEST(axis_bits, Z_AXIS) ? "Z" : "", + TEST(axis_bits, I_AXIS) ? AXIS4_STR : "", + TEST(axis_bits, J_AXIS) ? AXIS5_STR : "", + TEST(axis_bits, K_AXIS) ? AXIS6_STR : "" + ) + ); + SERIAL_ECHO_START(); + SERIAL_ECHOLN(msg); + TERN_(HAS_STATUS_MESSAGE, ui.set_status(msg)); + return true; + } + return false; } - return homing_feedrate(axis) / float(hbd); -} -#if ENABLED(SENSORLESS_HOMING) /** - * Set sensorless homing if the axis has it, accounting for Core Kinematics. + * Homing bump feedrate (mm/s) */ - sensorless_t start_sensorless_homing_per_axis(const AxisEnum axis) { - sensorless_t stealth_states { false }; + feedRate_t get_homing_bump_feedrate(const AxisEnum axis) { + #if HOMING_Z_WITH_PROBE + if (axis == Z_AXIS) return MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW); + #endif + static const uint8_t homing_bump_divisor[] PROGMEM = HOMING_BUMP_DIVISOR; + uint8_t hbd = pgm_read_byte(&homing_bump_divisor[axis]); + if (hbd < 1) { + hbd = 10; + SERIAL_ECHO_MSG("Warning: Homing Bump Divisor < 1"); + } + return homing_feedrate(axis) / float(hbd); + } - switch (axis) { - default: break; - #if X_SENSORLESS - case X_AXIS: - stealth_states.x = tmc_enable_stallguard(stepperX); - #if AXIS_HAS_STALLGUARD(X2) - stealth_states.x2 = tmc_enable_stallguard(stepperX2); - #endif - #if EITHER(CORE_IS_XY, MARKFORGED_XY) && Y_SENSORLESS - stealth_states.y = tmc_enable_stallguard(stepperY); - #elif CORE_IS_XZ && Z_SENSORLESS - stealth_states.z = tmc_enable_stallguard(stepperZ); - #endif - break; - #endif - #if Y_SENSORLESS - case Y_AXIS: - stealth_states.y = tmc_enable_stallguard(stepperY); - #if AXIS_HAS_STALLGUARD(Y2) - stealth_states.y2 = tmc_enable_stallguard(stepperY2); - #endif - #if EITHER(CORE_IS_XY, MARKFORGED_XY) && X_SENSORLESS + #if ENABLED(SENSORLESS_HOMING) + /** + * Set sensorless homing if the axis has it, accounting for Core Kinematics. + */ + sensorless_t start_sensorless_homing_per_axis(const AxisEnum axis) { + sensorless_t stealth_states { false }; + + switch (axis) { + default: break; + #if X_SENSORLESS + case X_AXIS: stealth_states.x = tmc_enable_stallguard(stepperX); - #elif CORE_IS_YZ && Z_SENSORLESS + #if AXIS_HAS_STALLGUARD(X2) + stealth_states.x2 = tmc_enable_stallguard(stepperX2); + #endif + #if EITHER(CORE_IS_XY, MARKFORGED_XY) && Y_SENSORLESS + stealth_states.y = tmc_enable_stallguard(stepperY); + #elif CORE_IS_XZ && Z_SENSORLESS + stealth_states.z = tmc_enable_stallguard(stepperZ); + #endif + break; + #endif + #if Y_SENSORLESS + case Y_AXIS: + stealth_states.y = tmc_enable_stallguard(stepperY); + #if AXIS_HAS_STALLGUARD(Y2) + stealth_states.y2 = tmc_enable_stallguard(stepperY2); + #endif + #if EITHER(CORE_IS_XY, MARKFORGED_XY) && X_SENSORLESS + stealth_states.x = tmc_enable_stallguard(stepperX); + #elif CORE_IS_YZ && Z_SENSORLESS + stealth_states.z = tmc_enable_stallguard(stepperZ); + #endif + break; + #endif + #if Z_SENSORLESS + case Z_AXIS: stealth_states.z = tmc_enable_stallguard(stepperZ); + #if AXIS_HAS_STALLGUARD(Z2) + stealth_states.z2 = tmc_enable_stallguard(stepperZ2); + #endif + #if AXIS_HAS_STALLGUARD(Z3) + stealth_states.z3 = tmc_enable_stallguard(stepperZ3); + #endif + #if AXIS_HAS_STALLGUARD(Z4) + stealth_states.z4 = tmc_enable_stallguard(stepperZ4); + #endif + #if CORE_IS_XZ && X_SENSORLESS + stealth_states.x = tmc_enable_stallguard(stepperX); + #elif CORE_IS_YZ && Y_SENSORLESS + stealth_states.y = tmc_enable_stallguard(stepperY); + #endif + break; + #endif + } + + #if ENABLED(SPI_ENDSTOPS) + switch (axis) { + case X_AXIS: if (ENABLED(X_SPI_SENSORLESS)) endstops.tmc_spi_homing.x = true; break; + #if HAS_Y_AXIS + case Y_AXIS: if (ENABLED(Y_SPI_SENSORLESS)) endstops.tmc_spi_homing.y = true; break; #endif - break; - #endif - #if Z_SENSORLESS - case Z_AXIS: - stealth_states.z = tmc_enable_stallguard(stepperZ); - #if AXIS_HAS_STALLGUARD(Z2) - stealth_states.z2 = tmc_enable_stallguard(stepperZ2); + #if HAS_Z_AXIS + case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = true; break; #endif - #if AXIS_HAS_STALLGUARD(Z3) - stealth_states.z3 = tmc_enable_stallguard(stepperZ3); + #if LINEAR_AXES >= 4 + case I_AXIS: if (ENABLED(I_SPI_SENSORLESS)) endstops.tmc_spi_homing.i = true; break; #endif - #if AXIS_HAS_STALLGUARD(Z4) - stealth_states.z4 = tmc_enable_stallguard(stepperZ4); + #if LINEAR_AXES >= 5 + case J_AXIS: if (ENABLED(J_SPI_SENSORLESS)) endstops.tmc_spi_homing.j = true; break; #endif - #if CORE_IS_XZ && X_SENSORLESS - stealth_states.x = tmc_enable_stallguard(stepperX); - #elif CORE_IS_YZ && Y_SENSORLESS - stealth_states.y = tmc_enable_stallguard(stepperY); + #if LINEAR_AXES >= 6 + case K_AXIS: if (ENABLED(K_SPI_SENSORLESS)) endstops.tmc_spi_homing.k = true; break; #endif - break; + default: break; + } #endif + + TERN_(IMPROVE_HOMING_RELIABILITY, sg_guard_period = millis() + default_sg_guard_duration); + + return stealth_states; } - #if ENABLED(SPI_ENDSTOPS) + void end_sensorless_homing_per_axis(const AxisEnum axis, sensorless_t enable_stealth) { switch (axis) { - case X_AXIS: if (ENABLED(X_SPI_SENSORLESS)) endstops.tmc_spi_homing.x = true; break; - case Y_AXIS: if (ENABLED(Y_SPI_SENSORLESS)) endstops.tmc_spi_homing.y = true; break; - case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = true; break; default: break; - } - #endif - - TERN_(IMPROVE_HOMING_RELIABILITY, sg_guard_period = millis() + default_sg_guard_duration); - - return stealth_states; - } - - void end_sensorless_homing_per_axis(const AxisEnum axis, sensorless_t enable_stealth) { - switch (axis) { - default: break; - #if X_SENSORLESS - case X_AXIS: - tmc_disable_stallguard(stepperX, enable_stealth.x); - #if AXIS_HAS_STALLGUARD(X2) - tmc_disable_stallguard(stepperX2, enable_stealth.x2); - #endif - #if EITHER(CORE_IS_XY, MARKFORGED_XY) && Y_SENSORLESS - tmc_disable_stallguard(stepperY, enable_stealth.y); - #elif CORE_IS_XZ && Z_SENSORLESS - tmc_disable_stallguard(stepperZ, enable_stealth.z); - #endif - break; - #endif - #if Y_SENSORLESS - case Y_AXIS: - tmc_disable_stallguard(stepperY, enable_stealth.y); - #if AXIS_HAS_STALLGUARD(Y2) - tmc_disable_stallguard(stepperY2, enable_stealth.y2); - #endif - #if EITHER(CORE_IS_XY, MARKFORGED_XY) && X_SENSORLESS + #if X_SENSORLESS + case X_AXIS: tmc_disable_stallguard(stepperX, enable_stealth.x); - #elif CORE_IS_YZ && Z_SENSORLESS + #if AXIS_HAS_STALLGUARD(X2) + tmc_disable_stallguard(stepperX2, enable_stealth.x2); + #endif + #if EITHER(CORE_IS_XY, MARKFORGED_XY) && Y_SENSORLESS + tmc_disable_stallguard(stepperY, enable_stealth.y); + #elif CORE_IS_XZ && Z_SENSORLESS + tmc_disable_stallguard(stepperZ, enable_stealth.z); + #endif + break; + #endif + #if Y_SENSORLESS + case Y_AXIS: + tmc_disable_stallguard(stepperY, enable_stealth.y); + #if AXIS_HAS_STALLGUARD(Y2) + tmc_disable_stallguard(stepperY2, enable_stealth.y2); + #endif + #if EITHER(CORE_IS_XY, MARKFORGED_XY) && X_SENSORLESS + tmc_disable_stallguard(stepperX, enable_stealth.x); + #elif CORE_IS_YZ && Z_SENSORLESS + tmc_disable_stallguard(stepperZ, enable_stealth.z); + #endif + break; + #endif + #if Z_SENSORLESS + case Z_AXIS: tmc_disable_stallguard(stepperZ, enable_stealth.z); + #if AXIS_HAS_STALLGUARD(Z2) + tmc_disable_stallguard(stepperZ2, enable_stealth.z2); + #endif + #if AXIS_HAS_STALLGUARD(Z3) + tmc_disable_stallguard(stepperZ3, enable_stealth.z3); + #endif + #if AXIS_HAS_STALLGUARD(Z4) + tmc_disable_stallguard(stepperZ4, enable_stealth.z4); + #endif + #if CORE_IS_XZ && X_SENSORLESS + tmc_disable_stallguard(stepperX, enable_stealth.x); + #elif CORE_IS_YZ && Y_SENSORLESS + tmc_disable_stallguard(stepperY, enable_stealth.y); + #endif + break; + #endif + } + + #if ENABLED(SPI_ENDSTOPS) + switch (axis) { + case X_AXIS: if (ENABLED(X_SPI_SENSORLESS)) endstops.tmc_spi_homing.x = false; break; + #if HAS_Y_AXIS + case Y_AXIS: if (ENABLED(Y_SPI_SENSORLESS)) endstops.tmc_spi_homing.y = false; break; #endif - break; - #endif - #if Z_SENSORLESS - case Z_AXIS: - tmc_disable_stallguard(stepperZ, enable_stealth.z); - #if AXIS_HAS_STALLGUARD(Z2) - tmc_disable_stallguard(stepperZ2, enable_stealth.z2); + #if HAS_Z_AXIS + case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = false; break; #endif - #if AXIS_HAS_STALLGUARD(Z3) - tmc_disable_stallguard(stepperZ3, enable_stealth.z3); + #if LINEAR_AXES >= 4 + case I_AXIS: if (ENABLED(I_SPI_SENSORLESS)) endstops.tmc_spi_homing.i = false; break; #endif - #if AXIS_HAS_STALLGUARD(Z4) - tmc_disable_stallguard(stepperZ4, enable_stealth.z4); + #if LINEAR_AXES >= 5 + case J_AXIS: if (ENABLED(J_SPI_SENSORLESS)) endstops.tmc_spi_homing.j = false; break; #endif - #if CORE_IS_XZ && X_SENSORLESS - tmc_disable_stallguard(stepperX, enable_stealth.x); - #elif CORE_IS_YZ && Y_SENSORLESS - tmc_disable_stallguard(stepperY, enable_stealth.y); + #if LINEAR_AXES >= 6 + case K_AXIS: if (ENABLED(K_SPI_SENSORLESS)) endstops.tmc_spi_homing.k = false; break; #endif - break; + default: break; + } #endif } - #if ENABLED(SPI_ENDSTOPS) - switch (axis) { - case X_AXIS: if (ENABLED(X_SPI_SENSORLESS)) endstops.tmc_spi_homing.x = false; break; - case Y_AXIS: if (ENABLED(Y_SPI_SENSORLESS)) endstops.tmc_spi_homing.y = false; break; - case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = false; break; - default: break; - } - #endif - } + #endif // SENSORLESS_HOMING -#endif // SENSORLESS_HOMING + /** + * Home an individual linear axis + */ + void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t fr_mm_s=0.0, const bool final_approach=true) { + DEBUG_SECTION(log_move, "do_homing_move", DEBUGGING(LEVELING)); -/** - * Home an individual linear axis - */ -void do_homing_move(const AxisEnum axis, const float distance, const feedRate_t fr_mm_s=0.0, const bool final_approach=true) { - DEBUG_SECTION(log_move, "do_homing_move", DEBUGGING(LEVELING)); + const feedRate_t home_fr_mm_s = fr_mm_s ?: homing_feedrate(axis); - const feedRate_t home_fr_mm_s = fr_mm_s ?: homing_feedrate(axis); + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOPGM("...(", AS_CHAR(AXIS_CHAR(axis)), ", ", distance, ", "); + if (fr_mm_s) + DEBUG_ECHO(fr_mm_s); + else + DEBUG_ECHOPGM("[", home_fr_mm_s, "]"); + DEBUG_ECHOLNPGM(")"); + } - if (DEBUGGING(LEVELING)) { - DEBUG_ECHOPAIR("...(", axis_codes[axis], ", ", distance, ", "); - if (fr_mm_s) - DEBUG_ECHO(fr_mm_s); - else - DEBUG_ECHOPAIR("[", home_fr_mm_s, "]"); - DEBUG_ECHOLNPGM(")"); - } - - // Only do some things when moving towards an endstop - const int8_t axis_home_dir = TERN0(DUAL_X_CARRIAGE, axis == X_AXIS) - ? x_home_dir(active_extruder) : home_dir(axis); - const bool is_home_dir = (axis_home_dir > 0) == (distance > 0); + // Only do some things when moving towards an endstop + const int8_t axis_home_dir = TERN0(DUAL_X_CARRIAGE, axis == X_AXIS) + ? TOOL_X_HOME_DIR(active_extruder) : home_dir(axis); + const bool is_home_dir = (axis_home_dir > 0) == (distance > 0); - #if ENABLED(SENSORLESS_HOMING) - sensorless_t stealth_states; - #endif + #if ENABLED(SENSORLESS_HOMING) + sensorless_t stealth_states; + #endif - if (is_home_dir) { + if (is_home_dir) { - if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS)) { - #if ALL(HAS_HEATED_BED, WAIT_FOR_BED_HEATER) - // Wait for bed to heat back up between probing points - thermalManager.wait_for_bed_heating(); - #endif + if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS)) { + #if BOTH(HAS_HEATED_BED, WAIT_FOR_BED_HEATER) + // Wait for bed to heat back up between probing points + thermalManager.wait_for_bed_heating(); + #endif - TERN_(HAS_QUIET_PROBING, if (final_approach) probe.set_probing_paused(true)); - } + #if BOTH(HAS_HOTEND, WAIT_FOR_HOTEND) + // Wait for the hotend to heat back up between probing points + thermalManager.wait_for_hotend_heating(active_extruder); + #endif - // Disable stealthChop if used. Enable diag1 pin on driver. - TERN_(SENSORLESS_HOMING, stealth_states = start_sensorless_homing_per_axis(axis)); - } + TERN_(HAS_QUIET_PROBING, if (final_approach) probe.set_probing_paused(true)); + } - #if IS_SCARA - // Tell the planner the axis is at 0 - current_position[axis] = 0; - sync_plan_position(); - current_position[axis] = distance; - line_to_current_position(home_fr_mm_s); - #else - // Get the ABC or XYZ positions in mm - abce_pos_t target = planner.get_axis_positions_mm(); + // Disable stealthChop if used. Enable diag1 pin on driver. + TERN_(SENSORLESS_HOMING, stealth_states = start_sensorless_homing_per_axis(axis)); + } - target[axis] = 0; // Set the single homing axis to 0 - planner.set_machine_position_mm(target); // Update the machine position + #if EITHER(MORGAN_SCARA, MP_SCARA) + // Tell the planner the axis is at 0 + current_position[axis] = 0; + sync_plan_position(); + current_position[axis] = distance; + line_to_current_position(home_fr_mm_s); + #else + // Get the ABC or XYZ positions in mm + abce_pos_t target = planner.get_axis_positions_mm(); - #if HAS_DIST_MM_ARG - const xyze_float_t cart_dist_mm{0}; - #endif + target[axis] = 0; // Set the single homing axis to 0 + planner.set_machine_position_mm(target); // Update the machine position - // Set delta/cartesian axes directly - target[axis] = distance; // The move will be towards the endstop - planner.buffer_segment(target #if HAS_DIST_MM_ARG - , cart_dist_mm + const xyze_float_t cart_dist_mm{0}; #endif - , home_fr_mm_s, active_extruder - ); - #endif - planner.synchronize(); - - if (is_home_dir) { - - #if HOMING_Z_WITH_PROBE && HAS_QUIET_PROBING - if (axis == Z_AXIS && final_approach) probe.set_probing_paused(false); + // Set delta/cartesian axes directly + target[axis] = distance; // The move will be towards the endstop + planner.buffer_segment(target OPTARG(HAS_DIST_MM_ARG, cart_dist_mm), home_fr_mm_s, active_extruder); #endif - endstops.validate_homing_move(); - - // Re-enable stealthChop if used. Disable diag1 pin on driver. - TERN_(SENSORLESS_HOMING, end_sensorless_homing_per_axis(axis, stealth_states)); - } -} - -/** - * Set an axis' current position to its home position (after homing). - * - * For Core and Cartesian robots this applies one-to-one when an - * individual axis has been homed. - * - * DELTA should wait until all homing is done before setting the XYZ - * current_position to home, because homing is a single operation. - * In the case where the axis positions are trusted and previously - * homed, DELTA could home to X or Y individually by moving either one - * to the center. However, homing Z always homes XY and Z. - * - * SCARA should wait until all XY homing is done before setting the XY - * current_position to home, because neither X nor Y is at home until - * both are at home. Z can however be homed individually. - * - * Callers must sync the planner position after calling this! - */ -void set_axis_is_at_home(const AxisEnum axis) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_is_at_home(", axis_codes[axis], ")"); - - set_axis_trusted(axis); - set_axis_homed(axis); - - #if ENABLED(DUAL_X_CARRIAGE) - if (axis == X_AXIS && (active_extruder == 1 || dual_x_carriage_mode == DXC_DUPLICATION_MODE)) { - current_position.x = x_home_pos(active_extruder); - return; - } - #endif - - #if ENABLED(MORGAN_SCARA) - scara_set_axis_is_at_home(axis); - #elif ENABLED(DELTA) - current_position[axis] = (axis == Z_AXIS) ? delta_height - TERN0(HAS_BED_PROBE, probe.offset.z) : base_home_pos(axis); - #else - current_position[axis] = base_home_pos(axis); - #endif - - /** - * Z Probe Z Homing? Account for the probe's Z offset. - */ - #if HAS_BED_PROBE && Z_HOME_DIR < 0 - if (axis == Z_AXIS) { - #if HOMING_Z_WITH_PROBE - - current_position.z -= probe.offset.z; - - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> probe.offset.z = ", probe.offset.z); - - #else + planner.synchronize(); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("*** Z HOMED TO ENDSTOP ***"); + if (is_home_dir) { + #if HOMING_Z_WITH_PROBE && HAS_QUIET_PROBING + if (axis == Z_AXIS && final_approach) probe.set_probing_paused(false); #endif - } - #endif - - TERN_(I2C_POSITION_ENCODERS, I2CPEM.homed(axis)); - - TERN_(BABYSTEP_DISPLAY_TOTAL, babystep.reset_total(axis)); - #if HAS_POSITION_SHIFT - position_shift[axis] = 0; - update_workspace_offset(axis); - #endif + endstops.validate_homing_move(); - if (DEBUGGING(LEVELING)) { - #if HAS_HOME_OFFSET - DEBUG_ECHOLNPAIR("> home_offset[", axis_codes[axis], "] = ", home_offset[axis]); - #endif - DEBUG_POS("", current_position); - DEBUG_ECHOLNPAIR("<<< set_axis_is_at_home(", axis_codes[axis], ")"); + // Re-enable stealthChop if used. Disable diag1 pin on driver. + TERN_(SENSORLESS_HOMING, end_sensorless_homing_per_axis(axis, stealth_states)); + } } -} - -/** - * Set an axis to be unhomed. - */ -void set_axis_never_homed(const AxisEnum axis) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> set_axis_never_homed(", axis_codes[axis], ")"); - - set_axis_untrusted(axis); - set_axis_unhomed(axis); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("<<< set_axis_never_homed(", axis_codes[axis], ")"); - - TERN_(I2C_POSITION_ENCODERS, I2CPEM.unhomed(axis)); -} - -#ifdef TMC_HOME_PHASE /** - * Move the axis back to its home_phase if set and driver is capable (TMC) - * - * Improves homing repeatability by homing to stepper coil's nearest absolute - * phase position. Trinamic drivers use a stepper phase table with 1024 values - * spanning 4 full steps with 256 positions each (ergo, 1024 positions). + * Set an axis to be unhomed. (Unless we are on a machine - e.g. a cheap Chinese CNC machine - + * that has no endstops. Such machines should always be considered to be in a "known" and + * "trusted" position). */ - void backout_to_tmc_homing_phase(const AxisEnum axis) { - const xyz_long_t home_phase = TMC_HOME_PHASE; + void set_axis_never_homed(const AxisEnum axis) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")"); - // check if home phase is disabled for this axis. - if (home_phase[axis] < 0) return; + set_axis_untrusted(axis); + set_axis_unhomed(axis); - int16_t phasePerUStep, // TMC µsteps(phase) per Marlin µsteps - phaseCurrent, // The TMC µsteps(phase) count of the current position - effectorBackoutDir, // Direction in which the effector mm coordinates move away from endstop. - stepperBackoutDir; // Direction in which the TMC µstep count(phase) move away from endstop. + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< set_axis_never_homed(", AS_CHAR(AXIS_CHAR(axis)), ")"); - #define PHASE_PER_MICROSTEP(N) (256 / _MAX(1, N##_MICROSTEPS)) + TERN_(I2C_POSITION_ENCODERS, I2CPEM.unhomed(axis)); + } - switch (axis) { - #ifdef X_MICROSTEPS - case X_AXIS: - phasePerUStep = PHASE_PER_MICROSTEP(X); - phaseCurrent = stepperX.get_microstep_counter(); - effectorBackoutDir = -X_HOME_DIR; - stepperBackoutDir = INVERT_X_DIR ? effectorBackoutDir : -effectorBackoutDir; - break; - #endif - #ifdef Y_MICROSTEPS - case Y_AXIS: - phasePerUStep = PHASE_PER_MICROSTEP(Y); - phaseCurrent = stepperY.get_microstep_counter(); - effectorBackoutDir = -Y_HOME_DIR; - stepperBackoutDir = INVERT_Y_DIR ? effectorBackoutDir : -effectorBackoutDir; - break; - #endif - #ifdef Z_MICROSTEPS - case Z_AXIS: - phasePerUStep = PHASE_PER_MICROSTEP(Z); - phaseCurrent = stepperZ.get_microstep_counter(); - effectorBackoutDir = -Z_HOME_DIR; - stepperBackoutDir = INVERT_Z_DIR ? effectorBackoutDir : -effectorBackoutDir; - break; - #endif - default: return; - } + #ifdef TMC_HOME_PHASE + /** + * Move the axis back to its home_phase if set and driver is capable (TMC) + * + * Improves homing repeatability by homing to stepper coil's nearest absolute + * phase position. Trinamic drivers use a stepper phase table with 1024 values + * spanning 4 full steps with 256 positions each (ergo, 1024 positions). + */ + void backout_to_tmc_homing_phase(const AxisEnum axis) { + const xyz_long_t home_phase = TMC_HOME_PHASE; - // Phase distance to nearest home phase position when moving in the backout direction from endstop(may be negative). - int16_t phaseDelta = (home_phase[axis] - phaseCurrent) * stepperBackoutDir; + // check if home phase is disabled for this axis. + if (home_phase[axis] < 0) return; - // Check if home distance within endstop assumed repeatability noise of .05mm and warn. - if (ABS(phaseDelta) * planner.steps_to_mm[axis] / phasePerUStep < 0.05f) - SERIAL_ECHOLNPAIR("Selected home phase ", home_phase[axis], - " too close to endstop trigger phase ", phaseCurrent, - ". Pick a different phase for ", axis_codes[axis]); + int16_t phasePerUStep, // TMC µsteps(phase) per Marlin µsteps + phaseCurrent, // The TMC µsteps(phase) count of the current position + effectorBackoutDir, // Direction in which the effector mm coordinates move away from endstop. + stepperBackoutDir; // Direction in which the TMC µstep count(phase) move away from endstop. - // Skip to next if target position is behind current. So it only moves away from endstop. - if (phaseDelta < 0) phaseDelta += 1024; + #define PHASE_PER_MICROSTEP(N) (256 / _MAX(1, N##_MICROSTEPS)) - // Convert TMC µsteps(phase) to whole Marlin µsteps to effector backout direction to mm - const float mmDelta = int16_t(phaseDelta / phasePerUStep) * effectorBackoutDir * planner.steps_to_mm[axis]; + switch (axis) { + #ifdef X_MICROSTEPS + case X_AXIS: + phasePerUStep = PHASE_PER_MICROSTEP(X); + phaseCurrent = stepperX.get_microstep_counter(); + effectorBackoutDir = -X_HOME_DIR; + stepperBackoutDir = INVERT_X_DIR ? effectorBackoutDir : -effectorBackoutDir; + break; + #endif + #ifdef Y_MICROSTEPS + case Y_AXIS: + phasePerUStep = PHASE_PER_MICROSTEP(Y); + phaseCurrent = stepperY.get_microstep_counter(); + effectorBackoutDir = -Y_HOME_DIR; + stepperBackoutDir = INVERT_Y_DIR ? effectorBackoutDir : -effectorBackoutDir; + break; + #endif + #ifdef Z_MICROSTEPS + case Z_AXIS: + phasePerUStep = PHASE_PER_MICROSTEP(Z); + phaseCurrent = stepperZ.get_microstep_counter(); + effectorBackoutDir = -Z_HOME_DIR; + stepperBackoutDir = INVERT_Z_DIR ? effectorBackoutDir : -effectorBackoutDir; + break; + #endif + #ifdef I_MICROSTEPS + case I_AXIS: + phasePerUStep = PHASE_PER_MICROSTEP(I); + phaseCurrent = stepperI.get_microstep_counter(); + effectorBackoutDir = -I_HOME_DIR; + stepperBackoutDir = INVERT_I_DIR ? effectorBackoutDir : -effectorBackoutDir; + break; + #endif + #ifdef J_MICROSTEPS + case J_AXIS: + phasePerUStep = PHASE_PER_MICROSTEP(J); + phaseCurrent = stepperJ.get_microstep_counter(); + effectorBackoutDir = -J_HOME_DIR; + stepperBackoutDir = INVERT_J_DIR ? effectorBackoutDir : -effectorBackoutDir; + break; + #endif + #ifdef K_MICROSTEPS + case K_AXIS: + phasePerUStep = PHASE_PER_MICROSTEP(K); + phaseCurrent = stepperK.get_microstep_counter(); + effectorBackoutDir = -K_HOME_DIR; + stepperBackoutDir = INVERT_K_DIR ? effectorBackoutDir : -effectorBackoutDir; + break; + #endif + default: return; + } - // Optional debug messages - if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLNPAIR( - "Endstop ", axis_codes[axis], " hit at Phase:", phaseCurrent, - " Delta:", phaseDelta, " Distance:", mmDelta - ); - } + // Phase distance to nearest home phase position when moving in the backout direction from endstop(may be negative). + int16_t phaseDelta = (home_phase[axis] - phaseCurrent) * stepperBackoutDir; - if (mmDelta != 0) { - // Retrace by the amount computed in mmDelta. - do_homing_move(axis, mmDelta, get_homing_bump_feedrate(axis)); - } - } -#endif + // Check if home distance within endstop assumed repeatability noise of .05mm and warn. + if (ABS(phaseDelta) * planner.mm_per_step[axis] / phasePerUStep < 0.05f) + SERIAL_ECHOLNPGM("Selected home phase ", home_phase[axis], + " too close to endstop trigger phase ", phaseCurrent, + ". Pick a different phase for ", AS_CHAR(AXIS_CHAR(axis))); -/** - * Home an individual "raw axis" to its endstop. - * This applies to XYZ on Cartesian and Core robots, and - * to the individual ABC steppers on DELTA and SCARA. - * - * At the end of the procedure the axis is marked as - * homed and the current position of that axis is updated. - * Kinematic robots should wait till all axes are homed - * before updating the current position. - */ + // Skip to next if target position is behind current. So it only moves away from endstop. + if (phaseDelta < 0) phaseDelta += 1024; -void homeaxis(const AxisEnum axis) { + // Convert TMC µsteps(phase) to whole Marlin µsteps to effector backout direction to mm + const float mmDelta = int16_t(phaseDelta / phasePerUStep) * effectorBackoutDir * planner.mm_per_step[axis]; - #if IS_SCARA - // Only Z homing (with probe) is permitted - if (axis != Z_AXIS) { BUZZ(100, 880); return; } - #else - #define _CAN_HOME(A) (axis == _AXIS(A) && ( \ - ENABLED(A##_SPI_SENSORLESS) \ - || (_AXIS(A) == Z_AXIS && ENABLED(HOMING_Z_WITH_PROBE)) \ - || (A##_MIN_PIN > -1 && A##_HOME_DIR < 0) \ - || (A##_MAX_PIN > -1 && A##_HOME_DIR > 0) \ - )) - if (!_CAN_HOME(X) && !_CAN_HOME(Y) && !_CAN_HOME(Z)) return; - #endif + // Optional debug messages + if (DEBUGGING(LEVELING)) { + DEBUG_ECHOLNPGM( + "Endstop ", AS_CHAR(AXIS_CHAR(axis)), " hit at Phase:", phaseCurrent, + " Delta:", phaseDelta, " Distance:", mmDelta + ); + } - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> homeaxis(", axis_codes[axis], ")"); - - const int axis_home_dir = TERN0(DUAL_X_CARRIAGE, axis == X_AXIS) - ? x_home_dir(active_extruder) : home_dir(axis); - - // - // Homing Z with a probe? Raise Z (maybe) and deploy the Z probe. - // - if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && probe.deploy())) - return; - - // Set flags for X, Y, Z motor locking - #if HAS_EXTRA_ENDSTOPS - switch (axis) { - TERN_(X_DUAL_ENDSTOPS, case X_AXIS:) - TERN_(Y_DUAL_ENDSTOPS, case Y_AXIS:) - TERN_(Z_MULTI_ENDSTOPS, case Z_AXIS:) - stepper.set_separate_multi_axis(true); - default: break; + if (mmDelta != 0) { + // Retrace by the amount computed in mmDelta. + do_homing_move(axis, mmDelta, get_homing_bump_feedrate(axis)); + } } #endif - // - // Deploy BLTouch or tare the probe just before probing - // - #if HOMING_Z_WITH_PROBE - if (axis == Z_AXIS) { - if (TERN0(BLTOUCH, bltouch.deploy())) return; // BLTouch was deployed above, but get the alarm state. - if (TERN0(PROBE_TARE, probe.tare())) return; - } - #endif + /** + * Home an individual "raw axis" to its endstop. + * This applies to XYZ on Cartesian and Core robots, and + * to the individual ABC steppers on DELTA and SCARA. + * + * At the end of the procedure the axis is marked as + * homed and the current position of that axis is updated. + * Kinematic robots should wait till all axes are homed + * before updating the current position. + */ - // - // Back away to prevent an early X/Y sensorless trigger - // - #if DISABLED(DELTA) && defined(SENSORLESS_BACKOFF_MM) - const xy_float_t backoff = SENSORLESS_BACKOFF_MM; - if ((TERN0(X_SENSORLESS, axis == X_AXIS) || TERN0(Y_SENSORLESS, axis == Y_AXIS)) && backoff[axis]) { - const float backoff_length = -ABS(backoff[axis]) * axis_home_dir; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Sensorless backoff: ", backoff_length, "mm"); - do_homing_move(axis, backoff_length, homing_feedrate(axis)); - } - #endif + void homeaxis(const AxisEnum axis) { - // Determine if a homing bump will be done and the bumps distance - // When homing Z with probe respect probe clearance - const bool use_probe_bump = TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && home_bump_mm(Z_AXIS)); - const float bump = axis_home_dir * ( - use_probe_bump ? _MAX(TERN0(HOMING_Z_WITH_PROBE, Z_CLEARANCE_BETWEEN_PROBES), home_bump_mm(Z_AXIS)) : home_bump_mm(axis) - ); + #if EITHER(MORGAN_SCARA, MP_SCARA) + // Only Z homing (with probe) is permitted + if (axis != Z_AXIS) { BUZZ(100, 880); return; } + #else + #define _CAN_HOME(A) (axis == _AXIS(A) && ( \ + ENABLED(A##_SPI_SENSORLESS) \ + || TERN0(HAS_Z_AXIS, TERN0(HOMING_Z_WITH_PROBE, _AXIS(A) == Z_AXIS)) \ + || TERN0(A##_HOME_TO_MIN, A##_MIN_PIN > -1) \ + || TERN0(A##_HOME_TO_MAX, A##_MAX_PIN > -1) \ + )) + if (LINEAR_AXIS_GANG( + !_CAN_HOME(X), + && !_CAN_HOME(Y), + && !_CAN_HOME(Z), + && !_CAN_HOME(I), + && !_CAN_HOME(J), + && !_CAN_HOME(K)) + ) return; + #endif - // - // Fast move towards endstop until triggered - // - const float move_length = 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Home Fast: ", move_length, "mm"); - do_homing_move(axis, move_length, 0.0, !use_probe_bump); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")"); - #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE) - if (axis == Z_AXIS) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE) - #endif + const int axis_home_dir = TERN0(DUAL_X_CARRIAGE, axis == X_AXIS) + ? TOOL_X_HOME_DIR(active_extruder) : home_dir(axis); - // If a second homing move is configured... - if (bump) { - // Move away from the endstop by the axis HOMING_BUMP_MM - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Move Away: ", -bump, "mm"); - do_homing_move(axis, -bump, TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS) ? MMM_TO_MMS(Z_PROBE_SPEED_FAST) : 0, false); + // + // Homing Z with a probe? Raise Z (maybe) and deploy the Z probe. + // + if (TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && probe.deploy())) + return; - #if ENABLED(DETECT_BROKEN_ENDSTOP) - // Check for a broken endstop - EndstopEnum es; + // Set flags for X, Y, Z motor locking + #if HAS_EXTRA_ENDSTOPS switch (axis) { - default: - case X_AXIS: es = X_ENDSTOP; break; - case Y_AXIS: es = Y_ENDSTOP; break; - case Z_AXIS: es = Z_ENDSTOP; break; + TERN_(X_DUAL_ENDSTOPS, case X_AXIS:) + TERN_(Y_DUAL_ENDSTOPS, case Y_AXIS:) + TERN_(Z_MULTI_ENDSTOPS, case Z_AXIS:) + stepper.set_separate_multi_axis(true); + default: break; } - if (TEST(endstops.state(), es)) { - SERIAL_ECHO_MSG("Bad ", axis_codes[axis], " Endstop?"); - kill(GET_TEXT(MSG_KILL_HOMING_FAILED)); + #endif + + // + // Deploy BLTouch or tare the probe just before probing + // + #if HOMING_Z_WITH_PROBE + if (axis == Z_AXIS) { + if (TERN0(BLTOUCH, bltouch.deploy())) return; // BLTouch was deployed above, but get the alarm state. + if (TERN0(PROBE_TARE, probe.tare())) return; } #endif - #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE) - if (axis == Z_AXIS && bltouch.deploy()) return; // Intermediate DEPLOY (in LOW SPEED MODE) + // + // Back away to prevent an early sensorless trigger + // + #if DISABLED(DELTA) && defined(SENSORLESS_BACKOFF_MM) + const xyz_float_t backoff = SENSORLESS_BACKOFF_MM; + if ((TERN0(X_SENSORLESS, axis == X_AXIS) || TERN0(Y_SENSORLESS, axis == Y_AXIS) || TERN0(Z_SENSORLESS, axis == Z_AXIS) || TERN0(I_SENSORLESS, axis == I_AXIS) || TERN0(J_SENSORLESS, axis == J_AXIS) || TERN0(K_SENSORLESS, axis == K_AXIS)) && backoff[axis]) { + const float backoff_length = -ABS(backoff[axis]) * axis_home_dir; + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Sensorless backoff: ", backoff_length, "mm"); + do_homing_move(axis, backoff_length, homing_feedrate(axis)); + } #endif - // Slow move towards endstop until triggered - const float rebump = bump * 2; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Re-bump: ", rebump, "mm"); - do_homing_move(axis, rebump, get_homing_bump_feedrate(axis), true); + // Determine if a homing bump will be done and the bumps distance + // When homing Z with probe respect probe clearance + const bool use_probe_bump = TERN0(HOMING_Z_WITH_PROBE, axis == Z_AXIS && home_bump_mm(axis)); + const float bump = axis_home_dir * ( + use_probe_bump ? _MAX(TERN0(HOMING_Z_WITH_PROBE, Z_CLEARANCE_BETWEEN_PROBES), home_bump_mm(axis)) : home_bump_mm(axis) + ); + + // + // Fast move towards endstop until triggered + // + const float move_length = 1.5f * max_length(TERN(DELTA, Z_AXIS, axis)) * axis_home_dir; + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Home Fast: ", move_length, "mm"); + do_homing_move(axis, move_length, 0.0, !use_probe_bump); - #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) - if (axis == Z_AXIS) bltouch.stow(); // The final STOW + #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE) + if (axis == Z_AXIS) bltouch.stow(); // Intermediate STOW (in LOW SPEED MODE) #endif - } - #if HAS_EXTRA_ENDSTOPS - const bool pos_dir = axis_home_dir > 0; - #if ENABLED(X_DUAL_ENDSTOPS) - if (axis == X_AXIS) { - const float adj = ABS(endstops.x2_endstop_adj); - if (adj) { - if (pos_dir ? (endstops.x2_endstop_adj > 0) : (endstops.x2_endstop_adj < 0)) stepper.set_x_lock(true); else stepper.set_x2_lock(true); - do_homing_move(axis, pos_dir ? -adj : adj); - stepper.set_x_lock(false); - stepper.set_x2_lock(false); + // If a second homing move is configured... + if (bump) { + // Move away from the endstop by the axis HOMING_BUMP_MM + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Move Away: ", -bump, "mm"); + do_homing_move(axis, -bump, TERN(HOMING_Z_WITH_PROBE, (axis == Z_AXIS ? z_probe_fast_mm_s : 0), 0), false); + + #if ENABLED(DETECT_BROKEN_ENDSTOP) + // Check for a broken endstop + EndstopEnum es; + switch (axis) { + default: + case X_AXIS: es = X_ENDSTOP; break; + case Y_AXIS: es = Y_ENDSTOP; break; + case Z_AXIS: es = Z_ENDSTOP; break; + #if LINEAR_AXES >= 4 + case I_AXIS: es = I_ENDSTOP; break; + #endif + #if LINEAR_AXES >= 5 + case J_AXIS: es = J_ENDSTOP; break; + #endif + #if LINEAR_AXES >= 6 + case K_AXIS: es = K_ENDSTOP; break; + #endif } - } - #endif - #if ENABLED(Y_DUAL_ENDSTOPS) - if (axis == Y_AXIS) { - const float adj = ABS(endstops.y2_endstop_adj); - if (adj) { - if (pos_dir ? (endstops.y2_endstop_adj > 0) : (endstops.y2_endstop_adj < 0)) stepper.set_y_lock(true); else stepper.set_y2_lock(true); - do_homing_move(axis, pos_dir ? -adj : adj); - stepper.set_y_lock(false); - stepper.set_y2_lock(false); + if (TEST(endstops.state(), es)) { + SERIAL_ECHO_MSG("Bad ", AS_CHAR(AXIS_CHAR(axis)), " Endstop?"); + kill(GET_TEXT(MSG_KILL_HOMING_FAILED)); } - } - #endif + #endif - #if ENABLED(Z_MULTI_ENDSTOPS) - if (axis == Z_AXIS) { + #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH_SLOW_MODE) + if (axis == Z_AXIS && bltouch.deploy()) return; // Intermediate DEPLOY (in LOW SPEED MODE) + #endif - #if NUM_Z_STEPPER_DRIVERS == 2 + // Slow move towards endstop until triggered + const float rebump = bump * 2; + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Re-bump: ", rebump, "mm"); + do_homing_move(axis, rebump, get_homing_bump_feedrate(axis), true); - const float adj = ABS(endstops.z2_endstop_adj); + #if BOTH(HOMING_Z_WITH_PROBE, BLTOUCH) + if (axis == Z_AXIS) bltouch.stow(); // The final STOW + #endif + } + + #if HAS_EXTRA_ENDSTOPS + const bool pos_dir = axis_home_dir > 0; + #if ENABLED(X_DUAL_ENDSTOPS) + if (axis == X_AXIS) { + const float adj = ABS(endstops.x2_endstop_adj); if (adj) { - if (pos_dir ? (endstops.z2_endstop_adj > 0) : (endstops.z2_endstop_adj < 0)) stepper.set_z1_lock(true); else stepper.set_z2_lock(true); + if (pos_dir ? (endstops.x2_endstop_adj > 0) : (endstops.x2_endstop_adj < 0)) stepper.set_x_lock(true); else stepper.set_x2_lock(true); do_homing_move(axis, pos_dir ? -adj : adj); - stepper.set_z1_lock(false); - stepper.set_z2_lock(false); + stepper.set_x_lock(false); + stepper.set_x2_lock(false); } + } + #endif + #if ENABLED(Y_DUAL_ENDSTOPS) + if (axis == Y_AXIS) { + const float adj = ABS(endstops.y2_endstop_adj); + if (adj) { + if (pos_dir ? (endstops.y2_endstop_adj > 0) : (endstops.y2_endstop_adj < 0)) stepper.set_y_lock(true); else stepper.set_y2_lock(true); + do_homing_move(axis, pos_dir ? -adj : adj); + stepper.set_y_lock(false); + stepper.set_y2_lock(false); + } + } + #endif - #else - - // Handy arrays of stepper lock function pointers + #if ENABLED(Z_MULTI_ENDSTOPS) + if (axis == Z_AXIS) { - typedef void (*adjustFunc_t)(const bool); + #if NUM_Z_STEPPER_DRIVERS == 2 - adjustFunc_t lock[] = { - stepper.set_z1_lock, stepper.set_z2_lock, stepper.set_z3_lock - #if NUM_Z_STEPPER_DRIVERS >= 4 - , stepper.set_z4_lock - #endif - }; - float adj[] = { - 0, endstops.z2_endstop_adj, endstops.z3_endstop_adj - #if NUM_Z_STEPPER_DRIVERS >= 4 - , endstops.z4_endstop_adj - #endif - }; + const float adj = ABS(endstops.z2_endstop_adj); + if (adj) { + if (pos_dir ? (endstops.z2_endstop_adj > 0) : (endstops.z2_endstop_adj < 0)) stepper.set_z1_lock(true); else stepper.set_z2_lock(true); + do_homing_move(axis, pos_dir ? -adj : adj); + stepper.set_z1_lock(false); + stepper.set_z2_lock(false); + } - adjustFunc_t tempLock; - float tempAdj; + #else - // Manual bubble sort by adjust value - if (adj[1] < adj[0]) { - tempLock = lock[0], tempAdj = adj[0]; - lock[0] = lock[1], adj[0] = adj[1]; - lock[1] = tempLock, adj[1] = tempAdj; - } - if (adj[2] < adj[1]) { - tempLock = lock[1], tempAdj = adj[1]; - lock[1] = lock[2], adj[1] = adj[2]; - lock[2] = tempLock, adj[2] = tempAdj; - } - #if NUM_Z_STEPPER_DRIVERS >= 4 - if (adj[3] < adj[2]) { - tempLock = lock[2], tempAdj = adj[2]; - lock[2] = lock[3], adj[2] = adj[3]; - lock[3] = tempLock, adj[3] = tempAdj; + // Handy arrays of stepper lock function pointers + + typedef void (*adjustFunc_t)(const bool); + + adjustFunc_t lock[] = { + stepper.set_z1_lock, stepper.set_z2_lock, stepper.set_z3_lock + #if NUM_Z_STEPPER_DRIVERS >= 4 + , stepper.set_z4_lock + #endif + }; + float adj[] = { + 0, endstops.z2_endstop_adj, endstops.z3_endstop_adj + #if NUM_Z_STEPPER_DRIVERS >= 4 + , endstops.z4_endstop_adj + #endif + }; + + adjustFunc_t tempLock; + float tempAdj; + + // Manual bubble sort by adjust value + if (adj[1] < adj[0]) { + tempLock = lock[0], tempAdj = adj[0]; + lock[0] = lock[1], adj[0] = adj[1]; + lock[1] = tempLock, adj[1] = tempAdj; } if (adj[2] < adj[1]) { tempLock = lock[1], tempAdj = adj[1]; lock[1] = lock[2], adj[1] = adj[2]; lock[2] = tempLock, adj[2] = tempAdj; } - #endif - if (adj[1] < adj[0]) { - tempLock = lock[0], tempAdj = adj[0]; - lock[0] = lock[1], adj[0] = adj[1]; - lock[1] = tempLock, adj[1] = tempAdj; - } - - if (pos_dir) { - // normalize adj to smallest value and do the first move - (*lock[0])(true); - do_homing_move(axis, adj[1] - adj[0]); - // lock the second stepper for the final correction - (*lock[1])(true); - do_homing_move(axis, adj[2] - adj[1]); #if NUM_Z_STEPPER_DRIVERS >= 4 - // lock the third stepper for the final correction - (*lock[2])(true); - do_homing_move(axis, adj[3] - adj[2]); + if (adj[3] < adj[2]) { + tempLock = lock[2], tempAdj = adj[2]; + lock[2] = lock[3], adj[2] = adj[3]; + lock[3] = tempLock, adj[3] = tempAdj; + } + if (adj[2] < adj[1]) { + tempLock = lock[1], tempAdj = adj[1]; + lock[1] = lock[2], adj[1] = adj[2]; + lock[2] = tempLock, adj[2] = tempAdj; + } #endif - } - else { + if (adj[1] < adj[0]) { + tempLock = lock[0], tempAdj = adj[0]; + lock[0] = lock[1], adj[0] = adj[1]; + lock[1] = tempLock, adj[1] = tempAdj; + } + + if (pos_dir) { + // normalize adj to smallest value and do the first move + (*lock[0])(true); + do_homing_move(axis, adj[1] - adj[0]); + // lock the second stepper for the final correction + (*lock[1])(true); + do_homing_move(axis, adj[2] - adj[1]); + #if NUM_Z_STEPPER_DRIVERS >= 4 + // lock the third stepper for the final correction + (*lock[2])(true); + do_homing_move(axis, adj[3] - adj[2]); + #endif + } + else { + #if NUM_Z_STEPPER_DRIVERS >= 4 + (*lock[3])(true); + do_homing_move(axis, adj[2] - adj[3]); + #endif + (*lock[2])(true); + do_homing_move(axis, adj[1] - adj[2]); + (*lock[1])(true); + do_homing_move(axis, adj[0] - adj[1]); + } + + stepper.set_z1_lock(false); + stepper.set_z2_lock(false); + stepper.set_z3_lock(false); #if NUM_Z_STEPPER_DRIVERS >= 4 - (*lock[3])(true); - do_homing_move(axis, adj[2] - adj[3]); + stepper.set_z4_lock(false); #endif - (*lock[2])(true); - do_homing_move(axis, adj[1] - adj[2]); - (*lock[1])(true); - do_homing_move(axis, adj[0] - adj[1]); - } - stepper.set_z1_lock(false); - stepper.set_z2_lock(false); - stepper.set_z3_lock(false); - #if NUM_Z_STEPPER_DRIVERS >= 4 - stepper.set_z4_lock(false); #endif + } + #endif - #endif + // Reset flags for X, Y, Z motor locking + switch (axis) { + default: break; + TERN_(X_DUAL_ENDSTOPS, case X_AXIS:) + TERN_(Y_DUAL_ENDSTOPS, case Y_AXIS:) + TERN_(Z_MULTI_ENDSTOPS, case Z_AXIS:) + stepper.set_separate_multi_axis(false); } + + #endif // HAS_EXTRA_ENDSTOPS + + #ifdef TMC_HOME_PHASE + // move back to homing phase if configured and capable + backout_to_tmc_homing_phase(axis); #endif - // Reset flags for X, Y, Z motor locking - switch (axis) { - default: break; - TERN_(X_DUAL_ENDSTOPS, case X_AXIS:) - TERN_(Y_DUAL_ENDSTOPS, case Y_AXIS:) - TERN_(Z_MULTI_ENDSTOPS, case Z_AXIS:) - stepper.set_separate_multi_axis(false); - } - #endif + #if IS_SCARA - #ifdef TMC_HOME_PHASE - // move back to homing phase if configured and capable - backout_to_tmc_homing_phase(axis); - #endif + set_axis_is_at_home(axis); + sync_plan_position(); - #if IS_SCARA + #elif ENABLED(DELTA) - set_axis_is_at_home(axis); - sync_plan_position(); + // Delta has already moved all three towers up in G28 + // so here it re-homes each tower in turn. + // Delta homing treats the axes as normal linear axes. - #elif ENABLED(DELTA) + const float adjDistance = delta_endstop_adj[axis], + minDistance = (MIN_STEPS_PER_SEGMENT) * planner.mm_per_step[axis]; - // Delta has already moved all three towers up in G28 - // so here it re-homes each tower in turn. - // Delta homing treats the axes as normal linear axes. + // Retrace by the amount specified in delta_endstop_adj if more than min steps. + if (adjDistance * (Z_HOME_DIR) < 0 && ABS(adjDistance) > minDistance) { // away from endstop, more than min distance + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("adjDistance:", adjDistance); + do_homing_move(axis, adjDistance, get_homing_bump_feedrate(axis)); + } - const float adjDistance = delta_endstop_adj[axis], - minDistance = (MIN_STEPS_PER_SEGMENT) * planner.steps_to_mm[axis]; + #else // CARTESIAN / CORE / MARKFORGED_XY - // Retrace by the amount specified in delta_endstop_adj if more than min steps. - if (adjDistance * (Z_HOME_DIR) < 0 && ABS(adjDistance) > minDistance) { // away from endstop, more than min distance - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("adjDistance:", adjDistance); - do_homing_move(axis, adjDistance, get_homing_bump_feedrate(axis)); - } + set_axis_is_at_home(axis); + sync_plan_position(); - #else // CARTESIAN / CORE / MARKFORGED_XY + destination[axis] = current_position[axis]; - set_axis_is_at_home(axis); - sync_plan_position(); + if (DEBUGGING(LEVELING)) DEBUG_POS("> AFTER set_axis_is_at_home", current_position); - destination[axis] = current_position[axis]; + #endif - if (DEBUGGING(LEVELING)) DEBUG_POS("> AFTER set_axis_is_at_home", current_position); + // Put away the Z probe + #if HOMING_Z_WITH_PROBE + if (axis == Z_AXIS && probe.stow()) return; + #endif + + #if DISABLED(DELTA) && defined(HOMING_BACKOFF_POST_MM) + const xyz_float_t endstop_backoff = HOMING_BACKOFF_POST_MM; + if (endstop_backoff[axis]) { + current_position[axis] -= ABS(endstop_backoff[axis]) * axis_home_dir; + line_to_current_position( + #if HOMING_Z_WITH_PROBE + (axis == Z_AXIS) ? z_probe_fast_mm_s : + #endif + homing_feedrate(axis) + ); + + #if ENABLED(SENSORLESS_HOMING) + planner.synchronize(); + if (false + #if EITHER(IS_CORE, MARKFORGED_XY) + || axis != NORMAL_AXIS + #endif + ) safe_delay(200); // Short delay to allow belts to spring back + #endif + } + #endif + + // Clear retracted status if homing the Z axis + #if ENABLED(FWRETRACT) + if (axis == Z_AXIS) fwretract.current_hop = 0.0; + #endif + + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("<<< homeaxis(", AS_CHAR(AXIS_CHAR(axis)), ")"); + } // homeaxis() + +#endif // HAS_ENDSTOPS + +/** + * Set an axis' current position to its home position (after homing). + * + * For Core and Cartesian robots this applies one-to-one when an + * individual axis has been homed. + * + * DELTA should wait until all homing is done before setting the XYZ + * current_position to home, because homing is a single operation. + * In the case where the axis positions are trusted and previously + * homed, DELTA could home to X or Y individually by moving either one + * to the center. However, homing Z always homes XY and Z. + * + * SCARA should wait until all XY homing is done before setting the XY + * current_position to home, because neither X nor Y is at home until + * both are at home. Z can however be homed individually. + * + * Callers must sync the planner position after calling this! + */ +void set_axis_is_at_home(const AxisEnum axis) { + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM(">>> set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")"); + + set_axis_trusted(axis); + set_axis_homed(axis); + + #if ENABLED(DUAL_X_CARRIAGE) + if (axis == X_AXIS && (active_extruder == 1 || dual_x_carriage_mode == DXC_DUPLICATION_MODE)) { + current_position.x = x_home_pos(active_extruder); + return; + } #endif - // Put away the Z probe - #if HOMING_Z_WITH_PROBE - if (axis == Z_AXIS && probe.stow()) return; + #if EITHER(MORGAN_SCARA, AXEL_TPARA) + scara_set_axis_is_at_home(axis); + #elif ENABLED(DELTA) + current_position[axis] = (axis == Z_AXIS) ? DIFF_TERN(HAS_BED_PROBE, delta_height, probe.offset.z) : base_home_pos(axis); + #else + current_position[axis] = base_home_pos(axis); #endif - #if DISABLED(DELTA) && defined(HOMING_BACKOFF_POST_MM) - const xyz_float_t endstop_backoff = HOMING_BACKOFF_POST_MM; - if (endstop_backoff[axis]) { - current_position[axis] -= ABS(endstop_backoff[axis]) * axis_home_dir; - line_to_current_position( - #if HOMING_Z_WITH_PROBE - (axis == Z_AXIS) ? z_probe_fast_mm_s : - #endif - homing_feedrate(axis) - ); + /** + * Z Probe Z Homing? Account for the probe's Z offset. + */ + #if HAS_BED_PROBE && Z_HOME_TO_MIN + if (axis == Z_AXIS) { + #if HOMING_Z_WITH_PROBE + + current_position.z -= probe.offset.z; + + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("*** Z HOMED WITH PROBE (Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) ***\n> probe.offset.z = ", probe.offset.z); + + #else + + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("*** Z HOMED TO ENDSTOP ***"); - #if ENABLED(SENSORLESS_HOMING) - planner.synchronize(); - if (false - #if EITHER(IS_CORE, MARKFORGED_XY) - || axis != NORMAL_AXIS - #endif - ) safe_delay(200); // Short delay to allow belts to spring back #endif } #endif - // Clear retracted status if homing the Z axis - #if ENABLED(FWRETRACT) - if (axis == Z_AXIS) fwretract.current_hop = 0.0; - #endif + TERN_(I2C_POSITION_ENCODERS, I2CPEM.homed(axis)); - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("<<< homeaxis(", axis_codes[axis], ")"); + TERN_(BABYSTEP_DISPLAY_TOTAL, babystep.reset_total(axis)); + + #if HAS_POSITION_SHIFT + position_shift[axis] = 0; + update_workspace_offset(axis); + #endif -} // homeaxis() + if (DEBUGGING(LEVELING)) { + #if HAS_HOME_OFFSET + DEBUG_ECHOLNPGM("> home_offset[", AS_CHAR(AXIS_CHAR(axis)), "] = ", home_offset[axis]); + #endif + DEBUG_POS("", current_position); + DEBUG_ECHOLNPGM("<<< set_axis_is_at_home(", AS_CHAR(AXIS_CHAR(axis)), ")"); + } +} #if HAS_WORKSPACE_OFFSET void update_workspace_offset(const AxisEnum axis) { workspace_offset[axis] = home_offset[axis] + position_shift[axis]; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Axis ", XYZ_CHAR(axis), " home_offset = ", home_offset[axis], " position_shift = ", position_shift[axis]); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Axis ", AS_CHAR(AXIS_CHAR(axis)), " home_offset = ", home_offset[axis], " position_shift = ", position_shift[axis]); } #endif @@ -1893,4 +2148,4 @@ void homeaxis(const AxisEnum axis) { home_offset[axis] = v; update_workspace_offset(axis); } -#endif // HAS_M206_COMMAND +#endif diff --git a/Marlin/src/module/motion.h b/Marlin/src/module/motion.h index 887da1aa1886..50df5675e6c8 100644 --- a/Marlin/src/module/motion.h +++ b/Marlin/src/module/motion.h @@ -44,8 +44,8 @@ extern xyze_pos_t current_position, // High-level current tool position // G60/G61 Position Save and Return #if SAVED_POSITIONS - extern uint8_t saved_slots[(SAVED_POSITIONS + 7) >> 3]; - extern xyz_pos_t stored_position[SAVED_POSITIONS]; + extern uint8_t saved_slots[(SAVED_POSITIONS + 7) >> 3]; // TODO: Add support for LINEAR_AXES >= 4 + extern xyze_pos_t stored_position[SAVED_POSITIONS]; #endif // Scratch space for a cartesian result @@ -53,19 +53,21 @@ extern xyz_pos_t cartes; // Until kinematics.cpp is created, declare this here #if IS_KINEMATIC - extern abc_pos_t delta; + extern abce_pos_t delta; #endif #if HAS_ABL_NOT_UBL extern feedRate_t xy_probe_feedrate_mm_s; #define XY_PROBE_FEEDRATE_MM_S xy_probe_feedrate_mm_s -#elif defined(XY_PROBE_SPEED) - #define XY_PROBE_FEEDRATE_MM_S MMM_TO_MMS(XY_PROBE_SPEED) +#elif defined(XY_PROBE_FEEDRATE) + #define XY_PROBE_FEEDRATE_MM_S MMM_TO_MMS(XY_PROBE_FEEDRATE) #else #define XY_PROBE_FEEDRATE_MM_S PLANNER_XY_FEEDRATE() #endif -constexpr feedRate_t z_probe_fast_mm_s = MMM_TO_MMS(Z_PROBE_SPEED_FAST); +#if HAS_BED_PROBE + constexpr feedRate_t z_probe_fast_mm_s = MMM_TO_MMS(Z_PROBE_FEEDRATE_FAST); +#endif /** * Feed rates are often configured with mm/m @@ -73,16 +75,16 @@ constexpr feedRate_t z_probe_fast_mm_s = MMM_TO_MMS(Z_PROBE_SPEED_FAST); */ constexpr xyz_feedrate_t homing_feedrate_mm_m = HOMING_FEEDRATE_MM_M; FORCE_INLINE feedRate_t homing_feedrate(const AxisEnum a) { - float v; - #if ENABLED(DELTA) - v = homing_feedrate_mm_m.z; - #else - switch (a) { - case X_AXIS: v = homing_feedrate_mm_m.x; break; - case Y_AXIS: v = homing_feedrate_mm_m.y; break; - case Z_AXIS: - default: v = homing_feedrate_mm_m.z; - } + float v = TERN0(HAS_Z_AXIS, homing_feedrate_mm_m.z); + #if DISABLED(DELTA) + LINEAR_AXIS_CODE( + if (a == X_AXIS) v = homing_feedrate_mm_m.x, + else if (a == Y_AXIS) v = homing_feedrate_mm_m.y, + else if (a == Z_AXIS) v = homing_feedrate_mm_m.z, + else if (a == I_AXIS) v = homing_feedrate_mm_m.i, + else if (a == J_AXIS) v = homing_feedrate_mm_m.j, + else if (a == K_AXIS) v = homing_feedrate_mm_m.k + ); #endif return MMM_TO_MMS(v); } @@ -122,7 +124,7 @@ inline int8_t pgm_read_any(const int8_t *p) { return TERN(__IMXRT1062__, *p, pgm #define XYZ_DEFS(T, NAME, OPT) \ inline T NAME(const AxisEnum axis) { \ - static const XYZval NAME##_P DEFS_PROGMEM = { X_##OPT, Y_##OPT, Z_##OPT }; \ + static const XYZval NAME##_P DEFS_PROGMEM = LINEAR_AXIS_ARRAY(X_##OPT, Y_##OPT, Z_##OPT, I_##OPT, J_##OPT, K_##OPT); \ return pgm_read_any(&NAME##_P[axis]); \ } XYZ_DEFS(float, base_min_pos, MIN_POS); @@ -166,13 +168,36 @@ inline float home_bump_mm(const AxisEnum axis) { TERN_(MIN_SOFTWARE_ENDSTOP_X, amin = min.x); TERN_(MAX_SOFTWARE_ENDSTOP_X, amax = max.x); break; - case Y_AXIS: - TERN_(MIN_SOFTWARE_ENDSTOP_Y, amin = min.y); - TERN_(MAX_SOFTWARE_ENDSTOP_Y, amax = max.y); - break; - case Z_AXIS: - TERN_(MIN_SOFTWARE_ENDSTOP_Z, amin = min.z); - TERN_(MAX_SOFTWARE_ENDSTOP_Z, amax = max.z); + #if HAS_Y_AXIS + case Y_AXIS: + TERN_(MIN_SOFTWARE_ENDSTOP_Y, amin = min.y); + TERN_(MAX_SOFTWARE_ENDSTOP_Y, amax = max.y); + break; + #endif + #if HAS_Z_AXIS + case Z_AXIS: + TERN_(MIN_SOFTWARE_ENDSTOP_Z, amin = min.z); + TERN_(MAX_SOFTWARE_ENDSTOP_Z, amax = max.z); + break; + #endif + #if LINEAR_AXES >= 4 + case I_AXIS: + TERN_(MIN_SOFTWARE_ENDSTOP_I, amin = min.i); + TERN_(MIN_SOFTWARE_ENDSTOP_I, amax = max.i); + break; + #endif + #if LINEAR_AXES >= 5 + case J_AXIS: + TERN_(MIN_SOFTWARE_ENDSTOP_J, amin = min.j); + TERN_(MIN_SOFTWARE_ENDSTOP_J, amax = max.j); + break; + #endif + #if LINEAR_AXES >= 6 + case K_AXIS: + TERN_(MIN_SOFTWARE_ENDSTOP_K, amin = min.k); + TERN_(MIN_SOFTWARE_ENDSTOP_K, amax = max.k); + break; + #endif default: break; } #endif @@ -209,46 +234,86 @@ void report_real_position(); void report_current_position(); void report_current_position_projected(); +#if ENABLED(AUTO_REPORT_POSITION) + #include "../libs/autoreport.h" + struct PositionReport { static void report() { report_current_position_projected(); } }; + extern AutoReporter position_auto_reporter; +#endif + +#if EITHER(FULL_REPORT_TO_HOST_FEATURE, REALTIME_REPORTING_COMMANDS) + #define HAS_GRBL_STATE 1 + /** + * Machine states for GRBL or TinyG + */ + enum M_StateEnum : uint8_t { + M_INIT = 0, // 0 machine is initializing + M_RESET, // 1 machine is ready for use + M_ALARM, // 2 machine is in alarm state (soft shut down) + M_IDLE, // 3 program stop or no more blocks (M0, M1, M60) + M_END, // 4 program end via M2, M30 + M_RUNNING, // 5 motion is running + M_HOLD, // 6 motion is holding + M_PROBE, // 7 probe cycle active + M_CYCLING, // 8 machine is running (cycling) + M_HOMING, // 9 machine is homing + M_JOGGING, // 10 machine is jogging + M_ERROR // 11 machine is in hard alarm state (shut down) + }; + extern M_StateEnum M_State_grbl; + M_StateEnum grbl_state_for_marlin_state(); + void report_current_grblstate_moving(); + void report_current_position_moving(); + + #if ENABLED(FULL_REPORT_TO_HOST_FEATURE) + inline void set_and_report_grblstate(const M_StateEnum state) { + M_State_grbl = state; + report_current_grblstate_moving(); + } + #endif + + #if ENABLED(REALTIME_REPORTING_COMMANDS) + void quickpause_stepper(); + void quickresume_stepper(); + #endif +#endif + void get_cartesian_from_steppers(); void set_current_from_steppers_for_axis(const AxisEnum axis); void quickstop_stepper(); /** - * sync_plan_position - * * Set the planner/stepper positions directly from current_position with * no kinematic translation. Used for homing axes and cartesian/core syncing. */ void sync_plan_position(); -void sync_plan_position_e(); + +#if HAS_EXTRUDERS + void sync_plan_position_e(); +#endif /** * Move the planner to the current position from wherever it last moved * (or from wherever it has been told it is located). */ -void line_to_current_position(const feedRate_t &fr_mm_s=feedrate_mm_s); +void line_to_current_position(const_feedRate_t fr_mm_s=feedrate_mm_s); -#if EXTRUDERS - void unscaled_e_move(const float &length, const feedRate_t &fr_mm_s); +#if HAS_EXTRUDERS + void unscaled_e_move(const_float_t length, const_feedRate_t fr_mm_s); #endif void prepare_line_to_destination(); -void _internal_move_to_destination(const feedRate_t &fr_mm_s=0.0f - #if IS_KINEMATIC - , const bool is_fast=false - #endif -); +void _internal_move_to_destination(const_feedRate_t fr_mm_s=0.0f OPTARG(IS_KINEMATIC, const bool is_fast=false)); -inline void prepare_internal_move_to_destination(const feedRate_t &fr_mm_s=0.0f) { +inline void prepare_internal_move_to_destination(const_feedRate_t fr_mm_s=0.0f) { _internal_move_to_destination(fr_mm_s); } #if IS_KINEMATIC - void prepare_fast_move_to_destination(const feedRate_t &scaled_fr_mm_s=MMS_SCALED(feedrate_mm_s)); + void prepare_fast_move_to_destination(const_feedRate_t scaled_fr_mm_s=MMS_SCALED(feedrate_mm_s)); - inline void prepare_internal_fast_move_to_destination(const feedRate_t &fr_mm_s=0.0f) { + inline void prepare_internal_fast_move_to_destination(const_feedRate_t fr_mm_s=0.0f) { _internal_move_to_destination(fr_mm_s, true); } #endif @@ -256,55 +321,106 @@ inline void prepare_internal_move_to_destination(const feedRate_t &fr_mm_s=0.0f) /** * Blocking movement and shorthand functions */ -void do_blocking_move_to(const float rx, const float ry, const float rz, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to(const xyz_pos_t &raw, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f); - -void do_blocking_move_to_x(const float &rx, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to_y(const float &ry, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to_z(const float &rz, const feedRate_t &fr_mm_s=0.0f); +void do_blocking_move_to(LINEAR_AXIS_ARGS(const float), const_feedRate_t fr_mm_s=0.0f); +void do_blocking_move_to(const xy_pos_t &raw, const_feedRate_t fr_mm_s=0.0f); +void do_blocking_move_to(const xyz_pos_t &raw, const_feedRate_t fr_mm_s=0.0f); +void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s=0.0f); + +void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s=0.0f); +#if HAS_Y_AXIS + void do_blocking_move_to_y(const_float_t ry, const_feedRate_t fr_mm_s=0.0f); +#endif +#if HAS_Z_AXIS + void do_blocking_move_to_z(const_float_t rz, const_feedRate_t fr_mm_s=0.0f); +#endif +#if LINEAR_AXES >= 4 + void do_blocking_move_to_i(const_float_t ri, const_feedRate_t fr_mm_s=0.0f); + void do_blocking_move_to_xyz_i(const xyze_pos_t &raw, const_float_t i, const_feedRate_t fr_mm_s=0.0f); +#endif +#if LINEAR_AXES >= 5 + void do_blocking_move_to_j(const_float_t rj, const_feedRate_t fr_mm_s=0.0f); + void do_blocking_move_to_xyzi_j(const xyze_pos_t &raw, const_float_t j, const_feedRate_t fr_mm_s=0.0f); +#endif +#if LINEAR_AXES >= 6 + void do_blocking_move_to_k(const_float_t rk, const_feedRate_t fr_mm_s=0.0f); + void do_blocking_move_to_xyzij_k(const xyze_pos_t &raw, const_float_t k, const_feedRate_t fr_mm_s=0.0f); +#endif -void do_blocking_move_to_xy(const float &rx, const float &ry, const feedRate_t &fr_mm_s=0.0f); -void do_blocking_move_to_xy(const xy_pos_t &raw, const feedRate_t &fr_mm_s=0.0f); -FORCE_INLINE void do_blocking_move_to_xy(const xyz_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) { do_blocking_move_to_xy(xy_pos_t(raw), fr_mm_s); } -FORCE_INLINE void do_blocking_move_to_xy(const xyze_pos_t &raw, const feedRate_t &fr_mm_s=0.0f) { do_blocking_move_to_xy(xy_pos_t(raw), fr_mm_s); } +#if HAS_Y_AXIS + void do_blocking_move_to_xy(const_float_t rx, const_float_t ry, const_feedRate_t fr_mm_s=0.0f); + void do_blocking_move_to_xy(const xy_pos_t &raw, const_feedRate_t fr_mm_s=0.0f); + FORCE_INLINE void do_blocking_move_to_xy(const xyz_pos_t &raw, const_feedRate_t fr_mm_s=0.0f) { do_blocking_move_to_xy(xy_pos_t(raw), fr_mm_s); } + FORCE_INLINE void do_blocking_move_to_xy(const xyze_pos_t &raw, const_feedRate_t fr_mm_s=0.0f) { do_blocking_move_to_xy(xy_pos_t(raw), fr_mm_s); } +#endif -void do_blocking_move_to_xy_z(const xy_pos_t &raw, const float &z, const feedRate_t &fr_mm_s=0.0f); -FORCE_INLINE void do_blocking_move_to_xy_z(const xyz_pos_t &raw, const float &z, const feedRate_t &fr_mm_s=0.0f) { do_blocking_move_to_xy_z(xy_pos_t(raw), z, fr_mm_s); } -FORCE_INLINE void do_blocking_move_to_xy_z(const xyze_pos_t &raw, const float &z, const feedRate_t &fr_mm_s=0.0f) { do_blocking_move_to_xy_z(xy_pos_t(raw), z, fr_mm_s); } +#if HAS_Z_AXIS + void do_blocking_move_to_xy_z(const xy_pos_t &raw, const_float_t z, const_feedRate_t fr_mm_s=0.0f); + FORCE_INLINE void do_blocking_move_to_xy_z(const xyz_pos_t &raw, const_float_t z, const_feedRate_t fr_mm_s=0.0f) { do_blocking_move_to_xy_z(xy_pos_t(raw), z, fr_mm_s); } + FORCE_INLINE void do_blocking_move_to_xy_z(const xyze_pos_t &raw, const_float_t z, const_feedRate_t fr_mm_s=0.0f) { do_blocking_move_to_xy_z(xy_pos_t(raw), z, fr_mm_s); } +#endif void remember_feedrate_and_scaling(); void remember_feedrate_scaling_off(); void restore_feedrate_and_scaling(); -void do_z_clearance(const float &zclear, const bool z_trusted=true, const bool raise_on_untrusted=true, const bool lower_allowed=false); +#if HAS_Z_AXIS + void do_z_clearance(const_float_t zclear, const bool lower_allowed=false); +#else + inline void do_z_clearance(float, bool=false) {} +#endif /** * Homing and Trusted Axes */ -constexpr uint8_t xyz_bits = _BV(X_AXIS) | _BV(Y_AXIS) | _BV(Z_AXIS); -extern uint8_t axis_homed, axis_trusted; +typedef IF<(LINEAR_AXES > 8), uint16_t, uint8_t>::type linear_axis_bits_t; +constexpr linear_axis_bits_t linear_bits = _BV(LINEAR_AXES) - 1; -void homeaxis(const AxisEnum axis); void set_axis_is_at_home(const AxisEnum axis); -void set_axis_never_homed(const AxisEnum axis); -uint8_t axes_should_home(uint8_t axis_bits=0x07); -bool homing_needed_error(uint8_t axis_bits=0x07); - -FORCE_INLINE bool axis_was_homed(const AxisEnum axis) { return TEST(axis_homed, axis); } -FORCE_INLINE bool axis_is_trusted(const AxisEnum axis) { return TEST(axis_trusted, axis); } -FORCE_INLINE bool axis_should_home(const AxisEnum axis) { return (axes_should_home() & _BV(axis)) != 0; } -FORCE_INLINE bool no_axes_homed() { return !axis_homed; } -FORCE_INLINE bool all_axes_homed() { return xyz_bits == (axis_homed & xyz_bits); } -FORCE_INLINE bool homing_needed() { return !all_axes_homed(); } -FORCE_INLINE bool all_axes_trusted() { return xyz_bits == (axis_trusted & xyz_bits); } -FORCE_INLINE void set_axis_homed(const AxisEnum axis) { SBI(axis_homed, axis); } -FORCE_INLINE void set_axis_unhomed(const AxisEnum axis) { CBI(axis_homed, axis); } -FORCE_INLINE void set_axis_trusted(const AxisEnum axis) { SBI(axis_trusted, axis); } -FORCE_INLINE void set_axis_untrusted(const AxisEnum axis) { CBI(axis_trusted, axis); } -FORCE_INLINE void set_all_homed() { axis_homed = axis_trusted = xyz_bits; } -FORCE_INLINE void set_all_unhomed() { axis_homed = axis_trusted = 0; } + +#if HAS_ENDSTOPS + /** + * axis_homed + * Flags that each linear axis was homed. + * XYZ on cartesian, ABC on delta, ABZ on SCARA. + * + * axis_trusted + * Flags that the position is trusted in each linear axis. Set when homed. + * Cleared whenever a stepper powers off, potentially losing its position. + */ + extern linear_axis_bits_t axis_homed, axis_trusted; + void homeaxis(const AxisEnum axis); + void set_axis_never_homed(const AxisEnum axis); + linear_axis_bits_t axes_should_home(linear_axis_bits_t axis_bits=linear_bits); + bool homing_needed_error(linear_axis_bits_t axis_bits=linear_bits); + inline void set_axis_unhomed(const AxisEnum axis) { CBI(axis_homed, axis); } + inline void set_axis_untrusted(const AxisEnum axis) { CBI(axis_trusted, axis); } + inline void set_all_unhomed() { axis_homed = axis_trusted = 0; } + inline void set_axis_homed(const AxisEnum axis) { SBI(axis_homed, axis); } + inline void set_axis_trusted(const AxisEnum axis) { SBI(axis_trusted, axis); } + inline void set_all_homed() { axis_homed = axis_trusted = linear_bits; } +#else + constexpr linear_axis_bits_t axis_homed = linear_bits, axis_trusted = linear_bits; // Zero-endstop machines are always homed and trusted + inline void homeaxis(const AxisEnum axis) {} + inline void set_axis_never_homed(const AxisEnum) {} + inline linear_axis_bits_t axes_should_home(linear_axis_bits_t=linear_bits) { return false; } + inline bool homing_needed_error(linear_axis_bits_t=linear_bits) { return false; } + inline void set_axis_unhomed(const AxisEnum axis) {} + inline void set_axis_untrusted(const AxisEnum axis) {} + inline void set_all_unhomed() {} + inline void set_axis_homed(const AxisEnum axis) {} + inline void set_axis_trusted(const AxisEnum axis) {} + inline void set_all_homed() {} +#endif + +inline bool axis_was_homed(const AxisEnum axis) { return TEST(axis_homed, axis); } +inline bool axis_is_trusted(const AxisEnum axis) { return TEST(axis_trusted, axis); } +inline bool axis_should_home(const AxisEnum axis) { return (axes_should_home() & _BV(axis)) != 0; } +inline bool no_axes_homed() { return !axis_homed; } +inline bool all_axes_homed() { return linear_bits == (axis_homed & linear_bits); } +inline bool homing_needed() { return !all_axes_homed(); } +inline bool all_axes_trusted() { return linear_bits == (axis_trusted & linear_bits); } + +void home_if_needed(const bool keeplev=false); #if ENABLED(NO_MOTION_BEFORE_HOMING) #define MOTION_CONDITIONS (IsRunning() && !homing_needed_error()) @@ -351,16 +467,31 @@ FORCE_INLINE void set_all_unhomed() { axis_homed = axis_tr FORCE_INLINE void toNative(xyze_pos_t&) {} #endif #define LOGICAL_X_POSITION(POS) NATIVE_TO_LOGICAL(POS, X_AXIS) -#define LOGICAL_Y_POSITION(POS) NATIVE_TO_LOGICAL(POS, Y_AXIS) -#define LOGICAL_Z_POSITION(POS) NATIVE_TO_LOGICAL(POS, Z_AXIS) #define RAW_X_POSITION(POS) LOGICAL_TO_NATIVE(POS, X_AXIS) -#define RAW_Y_POSITION(POS) LOGICAL_TO_NATIVE(POS, Y_AXIS) -#define RAW_Z_POSITION(POS) LOGICAL_TO_NATIVE(POS, Z_AXIS) +#if HAS_Y_AXIS + #define LOGICAL_Y_POSITION(POS) NATIVE_TO_LOGICAL(POS, Y_AXIS) + #define RAW_Y_POSITION(POS) LOGICAL_TO_NATIVE(POS, Y_AXIS) +#endif +#if HAS_Z_AXIS + #define LOGICAL_Z_POSITION(POS) NATIVE_TO_LOGICAL(POS, Z_AXIS) + #define RAW_Z_POSITION(POS) LOGICAL_TO_NATIVE(POS, Z_AXIS) +#endif +#if LINEAR_AXES >= 4 + #define LOGICAL_I_POSITION(POS) NATIVE_TO_LOGICAL(POS, I_AXIS) + #define RAW_I_POSITION(POS) LOGICAL_TO_NATIVE(POS, I_AXIS) +#endif +#if LINEAR_AXES >= 5 + #define LOGICAL_J_POSITION(POS) NATIVE_TO_LOGICAL(POS, J_AXIS) + #define RAW_J_POSITION(POS) LOGICAL_TO_NATIVE(POS, J_AXIS) +#endif +#if LINEAR_AXES >= 6 + #define LOGICAL_K_POSITION(POS) NATIVE_TO_LOGICAL(POS, K_AXIS) + #define RAW_K_POSITION(POS) LOGICAL_TO_NATIVE(POS, K_AXIS) +#endif /** * position_is_reachable family of functions */ - #if IS_KINEMATIC // (DELTA or SCARA) #if HAS_SCARA_OFFSET @@ -368,10 +499,31 @@ FORCE_INLINE void set_all_unhomed() { axis_homed = axis_tr #endif // Return true if the given point is within the printable area - inline bool position_is_reachable(const float &rx, const float &ry, const float inset=0) { + inline bool position_is_reachable(const_float_t rx, const_float_t ry, const float inset=0) { #if ENABLED(DELTA) + return HYPOT2(rx, ry) <= sq(DELTA_PRINTABLE_RADIUS - inset + fslop); + + #elif ENABLED(POLARGRAPH) + + const float x1 = rx - (X_MIN_POS), x2 = (X_MAX_POS) - rx, y = ry - (Y_MAX_POS), + a = HYPOT(x1, y), b = HYPOT(x2, y); + return a < (POLARGRAPH_MAX_BELT_LEN) + 1 + && b < (POLARGRAPH_MAX_BELT_LEN) + 1 + && (a + b) > _MIN(X_BED_SIZE, Y_BED_SIZE); + + #elif ENABLED(AXEL_TPARA) + + const float R2 = HYPOT2(rx - TPARA_OFFSET_X, ry - TPARA_OFFSET_Y); + return ( + R2 <= sq(L1 + L2) - inset + #if MIDDLE_DEAD_ZONE_R > 0 + && R2 >= sq(float(MIDDLE_DEAD_ZONE_R)) + #endif + ); + #elif IS_SCARA + const float R2 = HYPOT2(rx - SCARA_OFFSET_X, ry - SCARA_OFFSET_Y); return ( R2 <= sq(L1 + L2) - inset @@ -379,6 +531,7 @@ FORCE_INLINE void set_all_unhomed() { axis_homed = axis_tr && R2 >= sq(float(MIDDLE_DEAD_ZONE_R)) #endif ); + #endif } @@ -389,15 +542,15 @@ FORCE_INLINE void set_all_unhomed() { axis_homed = axis_tr #else // CARTESIAN // Return true if the given position is within the machine bounds. - inline bool position_is_reachable(const float &rx, const float &ry) { - if (!WITHIN(ry, Y_MIN_POS - fslop, Y_MAX_POS + fslop)) return false; + inline bool position_is_reachable(const_float_t rx, const_float_t ry) { + if (!COORDINATE_OKAY(ry, Y_MIN_POS - fslop, Y_MAX_POS + fslop)) return false; #if ENABLED(DUAL_X_CARRIAGE) if (active_extruder) - return WITHIN(rx, X2_MIN_POS - fslop, X2_MAX_POS + fslop); + return COORDINATE_OKAY(rx, X2_MIN_POS - fslop, X2_MAX_POS + fslop); else - return WITHIN(rx, X1_MIN_POS - fslop, X1_MAX_POS + fslop); + return COORDINATE_OKAY(rx, X1_MIN_POS - fslop, X1_MAX_POS + fslop); #else - return WITHIN(rx, X_MIN_POS - fslop, X_MAX_POS + fslop); + return COORDINATE_OKAY(rx, X_MIN_POS - fslop, X_MAX_POS + fslop); #endif } inline bool position_is_reachable(const xy_pos_t &pos) { return position_is_reachable(pos.x, pos.y); } @@ -424,19 +577,19 @@ FORCE_INLINE void set_all_unhomed() { axis_homed = axis_tr }; extern DualXMode dual_x_carriage_mode; - extern float inactive_extruder_x, // Used in mode 0 & 1 - duplicate_extruder_x_offset; // Used in mode 2 & 3 - extern xyz_pos_t raised_parked_position; // Used in mode 1 - extern bool active_extruder_parked; // Used in mode 1, 2 & 3 - extern millis_t delayed_move_time; // Used in mode 1 - extern int16_t duplicate_extruder_temp_offset; // Used in mode 2 & 3 - extern bool idex_mirrored_mode; // Used in mode 3 + extern float inactive_extruder_x, // Used in mode 0 & 1 + duplicate_extruder_x_offset; // Used in mode 2 & 3 + extern xyz_pos_t raised_parked_position; // Used in mode 1 + extern bool active_extruder_parked; // Used in mode 1, 2 & 3 + extern millis_t delayed_move_time; // Used in mode 1 + extern celsius_t duplicate_extruder_temp_offset; // Used in mode 2 & 3 + extern bool idex_mirrored_mode; // Used in mode 3 FORCE_INLINE bool idex_is_duplicating() { return dual_x_carriage_mode >= DXC_DUPLICATION_MODE; } float x_home_pos(const uint8_t extruder); - FORCE_INLINE int x_home_dir(const uint8_t extruder) { return extruder ? X2_HOME_DIR : X_HOME_DIR; } + #define TOOL_X_HOME_DIR(T) ((T) ? X2_HOME_DIR : X_HOME_DIR) void set_duplication_enabled(const bool dupe, const int8_t tool_index=-1); void idex_set_mirrored_mode(const bool mirr); @@ -450,7 +603,7 @@ FORCE_INLINE void set_all_unhomed() { axis_homed = axis_tr FORCE_INLINE void set_duplication_enabled(const bool dupe) { extruder_duplication_enabled = dupe; } #endif - FORCE_INLINE int x_home_dir(const uint8_t) { return home_dir(X_AXIS); } + #define TOOL_X_HOME_DIR(T) X_HOME_DIR #endif diff --git a/Marlin/src/module/planner.cpp b/Marlin/src/module/planner.cpp index 5897d10cd581..c6edfb835e4b 100644 --- a/Marlin/src/module/planner.cpp +++ b/Marlin/src/module/planner.cpp @@ -136,9 +136,9 @@ planner_settings_t Planner::settings; // Initialized by settings.load( laser_state_t Planner::laser_inline; // Current state for blocks #endif -uint32_t Planner::max_acceleration_steps_per_s2[XYZE_N]; // (steps/s^2) Derived from mm_per_s2 +uint32_t Planner::max_acceleration_steps_per_s2[DISTINCT_AXES]; // (steps/s^2) Derived from mm_per_s2 -float Planner::steps_to_mm[XYZE_N]; // (mm) Millimeters per step +float Planner::mm_per_step[DISTINCT_AXES]; // (mm) Millimeters per step #if HAS_JUNCTION_DEVIATION float Planner::junction_deviation_mm; // (mm) M205 J @@ -164,7 +164,7 @@ float Planner::steps_to_mm[XYZE_N]; // (mm) Millimeters per step xyze_bool_t Planner::last_page_dir{0}; #endif -#if EXTRUDERS +#if HAS_EXTRUDERS int16_t Planner::flow_percentage[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(100); // Extrusion factor for each extruder float Planner::e_factor[EXTRUDERS] = ARRAY_BY_EXTRUDERS1(1.0f); // The flow percentage and volumetric multiplier combine to scale E movement #endif @@ -197,9 +197,9 @@ float Planner::steps_to_mm[XYZE_N]; // (mm) Millimeters per step skew_factor_t Planner::skew_factor; // Initialized by settings.load() #if ENABLED(AUTOTEMP) - float Planner::autotemp_max = 250, - Planner::autotemp_min = 210, - Planner::autotemp_factor = 0.1f; + celsius_t Planner::autotemp_max = 250, + Planner::autotemp_min = 210; + float Planner::autotemp_factor = 0.1f; bool Planner::autotemp_enabled = false; #endif @@ -207,13 +207,13 @@ skew_factor_t Planner::skew_factor; // Initialized by settings.load() xyze_long_t Planner::position{0}; -uint32_t Planner::cutoff_long; +uint32_t Planner::acceleration_long_cutoff; xyze_float_t Planner::previous_speed; float Planner::previous_nominal_speed_sqr; #if ENABLED(DISABLE_INACTIVE_EXTRUDER) - last_move_t Planner::g_uc_extruder_last_move[EXTRUDERS] = { 0 }; + last_move_t Planner::g_uc_extruder_last_move[E_STEPPERS] = { 0 }; #endif #ifdef XY_FREQUENCY_LIMIT @@ -381,7 +381,7 @@ void Planner::init() { r9 = (d >> 8) & 0xFF, r10 = (d >> 16) & 0xFF, r2,r3,r4,r5,r6,r7,r11,r12,r13,r14,r15,r16,r17,r18; - const uint8_t* ptab = inv_tab; + const uint8_t *ptab = inv_tab; __asm__ __volatile__( // %8:%7:%6 = interval @@ -418,11 +418,11 @@ void Planner::init() { L("2") A("cpi %16,0x10") // (nr & 0xF00000) == 0 ? A("brcc 3f") // No, skip this - A("swap %15") // Swap nibbles - A("swap %16") // Swap nibbles. Low nibble is 0 + A("swap %15") // Swap nybbles + A("swap %16") // Swap nybbles. Low nybble is 0 A("mov %14, %15") - A("andi %14,0x0F") // Isolate low nibble - A("andi %15,0xF0") // Keep proper nibble in %15 + A("andi %14,0x0F") // Isolate low nybble + A("andi %15,0xF0") // Keep proper nybble in %15 A("or %16, %14") // %16:%15 <<= 4 A("subi %3,-4") // idx += 4 @@ -473,10 +473,10 @@ void Planner::init() { L("9") A("sbrs %3,2") // shift by 4bits position? A("rjmp 16f") // No - A("swap %15") // Swap nibbles. lo nibble of %15 will always be 0 - A("swap %14") // Swap nibbles + A("swap %15") // Swap nybbles. lo nybble of %15 will always be 0 + A("swap %14") // Swap nybbles A("mov %12,%14") - A("andi %12,0x0F") // isolate low nibble + A("andi %12,0x0F") // isolate low nybble A("andi %14,0xF0") // and clear it A("or %15,%12") // %15:%16 <<= 4 L("16") @@ -504,11 +504,11 @@ void Planner::init() { L("11") A("sbrs %3,2") // shift by 4 bit position ? A("rjmp 12f") // No, skip it - A("swap %15") // Swap nibbles - A("andi %14, 0xF0") // Lose the lowest nibble - A("swap %14") // Swap nibbles. Upper nibble is 0 - A("or %14,%15") // Pass nibble from upper byte - A("andi %15, 0x0F") // And get rid of that nibble + A("swap %15") // Swap nybbles + A("andi %14, 0xF0") // Lose the lowest nybble + A("swap %14") // Swap nybbles. Upper nybble is 0 + A("or %14,%15") // Pass nybble from upper byte + A("andi %15, 0x0F") // And get rid of that nybble L("12") A("sbrs %3,3") // shift by 8 bit position ? A("rjmp 6f") // No, skip it @@ -775,7 +775,7 @@ block_t* Planner::get_current_block() { * is not and will not use the block while we modify it, so it is safe to * alter its values. */ -void Planner::calculate_trapezoid_for_block(block_t* const block, const float &entry_factor, const float &exit_factor) { +void Planner::calculate_trapezoid_for_block(block_t * const block, const_float_t entry_factor, const_float_t exit_factor) { uint32_t initial_rate = CEIL(block->nominal_rate * entry_factor), final_rate = CEIL(block->nominal_rate * exit_factor); // (steps per second) @@ -942,7 +942,7 @@ void Planner::calculate_trapezoid_for_block(block_t* const block, const float &e */ // The kernel called by recalculate() when scanning the plan from last to first entry. -void Planner::reverse_pass_kernel(block_t* const current, const block_t * const next) { +void Planner::reverse_pass_kernel(block_t * const current, const block_t * const next) { if (current) { // If entry speed is already at the maximum entry speed, and there was no change of speed // in the next block, there is no need to recheck. Block is cruising and there is no need to @@ -1015,8 +1015,8 @@ void Planner::reverse_pass() { // Perform the reverse pass block_t *current = &block_buffer[block_index]; - // Only consider non sync and page blocks - if (!TEST(current->flag, BLOCK_BIT_SYNC_POSITION) && !IS_PAGE(current)) { + // Only consider non sync-and-page blocks + if (!(current->flag & BLOCK_MASK_SYNC) && !IS_PAGE(current)) { reverse_pass_kernel(current, next); next = current; } @@ -1039,7 +1039,7 @@ void Planner::reverse_pass() { } // The kernel called by recalculate() when scanning the plan from first to last entry. -void Planner::forward_pass_kernel(const block_t* const previous, block_t* const current, const uint8_t block_index) { +void Planner::forward_pass_kernel(const block_t * const previous, block_t * const current, const uint8_t block_index) { if (previous) { // If the previous block is an acceleration block, too short to complete the full speed // change, adjust the entry speed accordingly. Entry speeds have already been reset, @@ -1111,7 +1111,7 @@ void Planner::forward_pass() { block = &block_buffer[block_index]; // Skip SYNC and page blocks - if (!TEST(block->flag, BLOCK_BIT_SYNC_POSITION) && !IS_PAGE(block)) { + if (!(block->flag & BLOCK_MASK_SYNC) && !IS_PAGE(block)) { // If there's no previous block or the previous block is not // BUSY (thus, modifiable) run the forward_pass_kernel. Otherwise, // the previous block became BUSY, so assume the current block's @@ -1147,7 +1147,7 @@ void Planner::recalculate_trapezoids() { block_t *prev = &block_buffer[prev_index]; // If not dealing with a sync block, we are done. The last block is not a SYNC block - if (!TEST(prev->flag, BLOCK_BIT_SYNC_POSITION)) break; + if (!(prev->flag & BLOCK_MASK_SYNC)) break; // Examine the previous block. This and all following are SYNC blocks head_block_index = prev_index; @@ -1161,7 +1161,7 @@ void Planner::recalculate_trapezoids() { next = &block_buffer[block_index]; // Skip sync and page blocks - if (!TEST(next->flag, BLOCK_BIT_SYNC_POSITION) && !IS_PAGE(next)) { + if (!(next->flag & BLOCK_MASK_SYNC) && !IS_PAGE(next)) { next_entry_speed = SQRT(next->entry_speed_sqr); if (block) { @@ -1248,42 +1248,73 @@ void Planner::recalculate() { recalculate_trapezoids(); } -#if ENABLED(AUTOTEMP) +#if HAS_FAN && DISABLED(LASER_SYNCHRONOUS_M106_M107) + #define HAS_TAIL_FAN_SPEED 1 +#endif - void Planner::getHighESpeed() { - static float oldt = 0; +/** + * Apply fan speeds + */ +#if HAS_FAN - if (!autotemp_enabled) return; - if (thermalManager.degTargetHotend(0) + 2 < autotemp_min) return; // probably temperature set to zero. + void Planner::sync_fan_speeds(uint8_t (&fan_speed)[FAN_COUNT]) { - float high = 0.0; - for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { - block_t* block = &block_buffer[b]; - if (block->steps.x || block->steps.y || block->steps.z) { - const float se = (float)block->steps.e / block->step_event_count * SQRT(block->nominal_speed_sqr); // mm/sec; - NOLESS(high, se); + #if FAN_MIN_PWM != 0 || FAN_MAX_PWM != 255 + #define CALC_FAN_SPEED(f) (fan_speed[f] ? map(fan_speed[f], 1, 255, FAN_MIN_PWM, FAN_MAX_PWM) : FAN_OFF_PWM) + #else + #define CALC_FAN_SPEED(f) (fan_speed[f] ?: FAN_OFF_PWM) + #endif + + #if ENABLED(FAN_SOFT_PWM) + #define _FAN_SET(F) thermalManager.soft_pwm_amount_fan[F] = CALC_FAN_SPEED(F); + #elif ENABLED(FAST_PWM_FAN) + #define _FAN_SET(F) set_pwm_duty(FAN##F##_PIN, CALC_FAN_SPEED(F)); + #else + #define _FAN_SET(F) analogWrite(pin_t(FAN##F##_PIN), CALC_FAN_SPEED(F)); + #endif + #define FAN_SET(F) do{ kickstart_fan(fan_speed, ms, F); _FAN_SET(F); }while(0) + + const millis_t ms = millis(); + TERN_(HAS_FAN0, FAN_SET(0)); + TERN_(HAS_FAN1, FAN_SET(1)); + TERN_(HAS_FAN2, FAN_SET(2)); + TERN_(HAS_FAN3, FAN_SET(3)); + TERN_(HAS_FAN4, FAN_SET(4)); + TERN_(HAS_FAN5, FAN_SET(5)); + TERN_(HAS_FAN6, FAN_SET(6)); + TERN_(HAS_FAN7, FAN_SET(7)); + } + + #if FAN_KICKSTART_TIME + + void Planner::kickstart_fan(uint8_t (&fan_speed)[FAN_COUNT], const millis_t &ms, const uint8_t f) { + static millis_t fan_kick_end[FAN_COUNT] = { 0 }; + if (fan_speed[f]) { + if (fan_kick_end[f] == 0) { + fan_kick_end[f] = ms + FAN_KICKSTART_TIME; + fan_speed[f] = 255; + } + else if (PENDING(ms, fan_kick_end[f])) + fan_speed[f] = 255; } + else + fan_kick_end[f] = 0; } - float t = autotemp_min + high * autotemp_factor; - LIMIT(t, autotemp_min, autotemp_max); - if (t < oldt) t = t * (1 - float(AUTOTEMP_OLDWEIGHT)) + oldt * float(AUTOTEMP_OLDWEIGHT); - oldt = t; - thermalManager.setTargetHotend(t, 0); - } + #endif -#endif // AUTOTEMP +#endif // HAS_FAN /** * Maintain fans, paste extruder pressure, */ void Planner::check_axes_activity() { - #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E) + #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_E) xyze_bool_t axis_active = { false }; #endif - #if HAS_FAN + #if HAS_TAIL_FAN_SPEED uint8_t tail_fan_speed[FAN_COUNT]; #endif @@ -1298,13 +1329,12 @@ void Planner::check_axes_activity() { if (has_blocks_queued()) { - #if HAS_FAN || ENABLED(BARICUDA) + #if EITHER(HAS_TAIL_FAN_SPEED, BARICUDA) block_t *block = &block_buffer[block_buffer_tail]; #endif - #if HAS_FAN - FANS_LOOP(i) - tail_fan_speed[i] = thermalManager.scaledFanSpeed(i, block->fan_speed[i]); + #if HAS_TAIL_FAN_SPEED + FANS_LOOP(i) tail_fan_speed[i] = thermalManager.scaledFanSpeed(i, block->fan_speed[i]); #endif #if ENABLED(BARICUDA) @@ -1312,13 +1342,18 @@ void Planner::check_axes_activity() { TERN_(HAS_HEATER_2, tail_e_to_p_pressure = block->e_to_p_pressure); #endif - #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_E) + #if ANY(DISABLE_X, DISABLE_Y, DISABLE_Z, DISABLE_I, DISABLE_J, DISABLE_K, DISABLE_E) for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { block_t *block = &block_buffer[b]; - if (ENABLED(DISABLE_X) && block->steps.x) axis_active.x = true; - if (ENABLED(DISABLE_Y) && block->steps.y) axis_active.y = true; - if (ENABLED(DISABLE_Z) && block->steps.z) axis_active.z = true; - if (ENABLED(DISABLE_E) && block->steps.e) axis_active.e = true; + LOGICAL_AXIS_CODE( + if (TERN0(DISABLE_E, block->steps.e)) axis_active.e = true, + if (TERN0(DISABLE_X, block->steps.x)) axis_active.x = true, + if (TERN0(DISABLE_Y, block->steps.y)) axis_active.y = true, + if (TERN0(DISABLE_Z, block->steps.z)) axis_active.z = true, + if (TERN0(DISABLE_I, block->steps.i)) axis_active.i = true, + if (TERN0(DISABLE_J, block->steps.j)) axis_active.j = true, + if (TERN0(DISABLE_K, block->steps.k)) axis_active.k = true + ); } #endif } @@ -1326,9 +1361,8 @@ void Planner::check_axes_activity() { TERN_(HAS_CUTTER, cutter.refresh()); - #if HAS_FAN - FANS_LOOP(i) - tail_fan_speed[i] = thermalManager.scaledFanSpeed(i); + #if HAS_TAIL_FAN_SPEED + FANS_LOOP(i) tail_fan_speed[i] = thermalManager.scaledFanSpeed(i); #endif #if ENABLED(BARICUDA) @@ -1340,57 +1374,23 @@ void Planner::check_axes_activity() { // // Disable inactive axes // - if (TERN0(DISABLE_X, !axis_active.x)) DISABLE_AXIS_X(); - if (TERN0(DISABLE_Y, !axis_active.y)) DISABLE_AXIS_Y(); - if (TERN0(DISABLE_Z, !axis_active.z)) DISABLE_AXIS_Z(); - if (TERN0(DISABLE_E, !axis_active.e)) disable_e_steppers(); + LOGICAL_AXIS_CODE( + if (TERN0(DISABLE_E, !axis_active.e)) stepper.disable_e_steppers(), + if (TERN0(DISABLE_X, !axis_active.x)) stepper.disable_axis(X_AXIS), + if (TERN0(DISABLE_Y, !axis_active.y)) stepper.disable_axis(Y_AXIS), + if (TERN0(DISABLE_Z, !axis_active.z)) stepper.disable_axis(Z_AXIS), + if (TERN0(DISABLE_I, !axis_active.i)) stepper.disable_axis(I_AXIS), + if (TERN0(DISABLE_J, !axis_active.j)) stepper.disable_axis(J_AXIS), + if (TERN0(DISABLE_K, !axis_active.k)) stepper.disable_axis(K_AXIS) + ); // // Update Fan speeds + // Only if synchronous M106/M107 is disabled // - #if HAS_FAN - - #if FAN_KICKSTART_TIME > 0 - static millis_t fan_kick_end[FAN_COUNT] = { 0 }; - #define KICKSTART_FAN(f) \ - if (tail_fan_speed[f]) { \ - millis_t ms = millis(); \ - if (fan_kick_end[f] == 0) { \ - fan_kick_end[f] = ms + FAN_KICKSTART_TIME; \ - tail_fan_speed[f] = 255; \ - } else if (PENDING(ms, fan_kick_end[f])) \ - tail_fan_speed[f] = 255; \ - } else fan_kick_end[f] = 0 - #else - #define KICKSTART_FAN(f) NOOP - #endif - - #if FAN_MIN_PWM != 0 || FAN_MAX_PWM != 255 - #define CALC_FAN_SPEED(f) (tail_fan_speed[f] ? map(tail_fan_speed[f], 1, 255, FAN_MIN_PWM, FAN_MAX_PWM) : FAN_OFF_PWM) - #else - #define CALC_FAN_SPEED(f) (tail_fan_speed[f] ?: FAN_OFF_PWM) - #endif + TERN_(HAS_TAIL_FAN_SPEED, sync_fan_speeds(tail_fan_speed)); - #if ENABLED(FAN_SOFT_PWM) - #define _FAN_SET(F) thermalManager.soft_pwm_amount_fan[F] = CALC_FAN_SPEED(F); - #elif ENABLED(FAST_PWM_FAN) - #define _FAN_SET(F) set_pwm_duty(FAN##F##_PIN, CALC_FAN_SPEED(F)); - #else - #define _FAN_SET(F) analogWrite(pin_t(FAN##F##_PIN), CALC_FAN_SPEED(F)); - #endif - #define FAN_SET(F) do{ KICKSTART_FAN(F); _FAN_SET(F); }while(0) - - TERN_(HAS_FAN0, FAN_SET(0)); - TERN_(HAS_FAN1, FAN_SET(1)); - TERN_(HAS_FAN2, FAN_SET(2)); - TERN_(HAS_FAN3, FAN_SET(3)); - TERN_(HAS_FAN4, FAN_SET(4)); - TERN_(HAS_FAN5, FAN_SET(5)); - TERN_(HAS_FAN6, FAN_SET(6)); - TERN_(HAS_FAN7, FAN_SET(7)); - #endif // HAS_FAN - - TERN_(AUTOTEMP, getHighESpeed()); + TERN_(AUTOTEMP, autotemp_task()); #if ENABLED(BARICUDA) TERN_(HAS_HEATER_1, analogWrite(pin_t(HEATER_1_PIN), tail_valve_pressure)); @@ -1398,6 +1398,72 @@ void Planner::check_axes_activity() { #endif } +#if ENABLED(AUTOTEMP) + + #if ENABLED(AUTOTEMP_PROPORTIONAL) + void Planner::_autotemp_update_from_hotend() { + const celsius_t target = thermalManager.degTargetHotend(active_extruder); + autotemp_min = target + AUTOTEMP_MIN_P; + autotemp_max = target + AUTOTEMP_MAX_P; + } + #endif + + /** + * Called after changing tools to: + * - Reset or re-apply the default proportional autotemp factor. + * - Enable autotemp if the factor is non-zero. + */ + void Planner::autotemp_update() { + _autotemp_update_from_hotend(); + autotemp_factor = TERN(AUTOTEMP_PROPORTIONAL, AUTOTEMP_FACTOR_P, 0); + autotemp_enabled = autotemp_factor != 0; + } + + /** + * Called by the M104/M109 commands after setting Hotend Temperature + * + */ + void Planner::autotemp_M104_M109() { + _autotemp_update_from_hotend(); + + if (parser.seenval('S')) autotemp_min = parser.value_celsius(); + if (parser.seenval('B')) autotemp_max = parser.value_celsius(); + + // When AUTOTEMP_PROPORTIONAL is enabled, F0 disables autotemp. + // Normally, leaving off F also disables autotemp. + autotemp_factor = parser.seen('F') ? parser.value_float() : TERN(AUTOTEMP_PROPORTIONAL, AUTOTEMP_FACTOR_P, 0); + autotemp_enabled = autotemp_factor != 0; + } + + /** + * Called every so often to adjust the hotend target temperature + * based on the extrusion speed, which is calculated from the blocks + * currently in the planner. + */ + void Planner::autotemp_task() { + static float oldt = 0; + + if (!autotemp_enabled) return; + if (thermalManager.degTargetHotend(active_extruder) < autotemp_min - 2) return; // Below the min? + + float high = 0.0; + for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) { + block_t *block = &block_buffer[b]; + if (LINEAR_AXIS_GANG(block->steps.x, || block->steps.y, || block->steps.z, || block->steps.i, || block->steps.j, || block->steps.k)) { + const float se = (float)block->steps.e / block->step_event_count * SQRT(block->nominal_speed_sqr); // mm/sec; + NOLESS(high, se); + } + } + + float t = autotemp_min + high * autotemp_factor; + LIMIT(t, autotemp_min, autotemp_max); + if (t < oldt) t *= (1.0f - (AUTOTEMP_OLDWEIGHT)) + oldt * (AUTOTEMP_OLDWEIGHT); + oldt = t; + thermalManager.setTargetHotend(t, active_extruder); + } + +#endif + #if DISABLED(NO_VOLUMETRICS) /** @@ -1405,7 +1471,7 @@ void Planner::check_axes_activity() { * This is the reciprocal of the circular cross-section area. * Return 1.0 with volumetric off or a diameter of 0.0. */ - inline float calculate_volumetric_multiplier(const float &diameter) { + inline float calculate_volumetric_multiplier(const_float_t diameter) { return (parser.volumetric_enabled && diameter) ? 1.0f / CIRCLE_AREA(diameter * 0.5f) : 1; } @@ -1459,6 +1525,34 @@ void Planner::check_axes_activity() { } #endif +#if ENABLED(IMPROVE_HOMING_RELIABILITY) + + void Planner::enable_stall_prevention(const bool onoff) { + static motion_state_t saved_motion_state; + if (onoff) { + saved_motion_state.acceleration.x = settings.max_acceleration_mm_per_s2[X_AXIS]; + saved_motion_state.acceleration.y = settings.max_acceleration_mm_per_s2[Y_AXIS]; + settings.max_acceleration_mm_per_s2[X_AXIS] = settings.max_acceleration_mm_per_s2[Y_AXIS] = 100; + #if ENABLED(DELTA) + saved_motion_state.acceleration.z = settings.max_acceleration_mm_per_s2[Z_AXIS]; + settings.max_acceleration_mm_per_s2[Z_AXIS] = 100; + #endif + #if HAS_CLASSIC_JERK + saved_motion_state.jerk_state = max_jerk; + max_jerk.set(0, 0 OPTARG(DELTA, 0)); + #endif + } + else { + settings.max_acceleration_mm_per_s2[X_AXIS] = saved_motion_state.acceleration.x; + settings.max_acceleration_mm_per_s2[Y_AXIS] = saved_motion_state.acceleration.y; + TERN_(DELTA, settings.max_acceleration_mm_per_s2[Z_AXIS] = saved_motion_state.acceleration.z); + TERN_(HAS_CLASSIC_JERK, max_jerk = saved_motion_state.jerk_state); + } + reset_acceleration_rates(); + } + +#endif + #if HAS_LEVELING constexpr xy_pos_t level_fulcrum = { @@ -1476,7 +1570,7 @@ void Planner::check_axes_activity() { #if ABL_PLANAR xy_pos_t d = raw - level_fulcrum; - apply_rotation_xyz(bed_level_matrix, d.x, d.y, raw.z); + bed_level_matrix.apply_rotation_xyz(d.x, d.y, raw.z); raw = d + level_fulcrum; #elif HAS_MESH @@ -1489,11 +1583,7 @@ void Planner::check_axes_activity() { raw.z += ( #if ENABLED(MESH_BED_LEVELING) - mbl.get_z(raw - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - , fade_scaling_factor - #endif - ) + mbl.get_z(raw OPTARG(ENABLE_LEVELING_FADE_HEIGHT, fade_scaling_factor)) #elif ENABLED(AUTO_BED_LEVELING_UBL) fade_scaling_factor ? fade_scaling_factor * ubl.get_z_correction(raw) : 0.0 #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) @@ -1513,7 +1603,7 @@ void Planner::check_axes_activity() { matrix_3x3 inverse = matrix_3x3::transpose(bed_level_matrix); xy_pos_t d = raw - level_fulcrum; - apply_rotation_xyz(inverse, d.x, d.y, raw.z); + inverse.apply_rotation_xyz(d.x, d.y, raw.z); raw = d + level_fulcrum; #elif HAS_MESH @@ -1526,11 +1616,7 @@ void Planner::check_axes_activity() { raw.z -= ( #if ENABLED(MESH_BED_LEVELING) - mbl.get_z(raw - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - , fade_scaling_factor - #endif - ) + mbl.get_z(raw OPTARG(ENABLE_LEVELING_FADE_HEIGHT, fade_scaling_factor)) #elif ENABLED(AUTO_BED_LEVELING_UBL) fade_scaling_factor ? fade_scaling_factor * ubl.get_z_correction(raw) : 0.0 #elif ENABLED(AUTO_BED_LEVELING_BILINEAR) @@ -1592,18 +1678,36 @@ void Planner::quick_stop() { stepper.quick_stop(); } +#if ENABLED(REALTIME_REPORTING_COMMANDS) + + void Planner::quick_pause() { + // Suspend until quick_resume is called + // Don't empty buffers or queues + const bool did_suspend = stepper.suspend(); + if (did_suspend) + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(M_HOLD)); + } + + // Resume if suspended + void Planner::quick_resume() { + TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(grbl_state_for_marlin_state())); + stepper.wake_up(); + } + +#endif + void Planner::endstop_triggered(const AxisEnum axis) { // Record stepper position and discard the current block stepper.endstop_triggered(axis); } float Planner::triggered_position_mm(const AxisEnum axis) { - return stepper.triggered_position(axis) * steps_to_mm[axis]; + return stepper.triggered_position(axis) * mm_per_step[axis]; } void Planner::finish_and_disable() { while (has_blocks_queued() || cleaning_buffer_counter) idle(); - disable_all_steppers(); + stepper.disable_all_steppers(); } /** @@ -1655,7 +1759,7 @@ float Planner::get_axis_position_mm(const AxisEnum axis) { #endif - return axis_steps * steps_to_mm[axis]; + return axis_steps * mm_per_step[axis]; } /** @@ -1681,30 +1785,24 @@ void Planner::synchronize() { * Returns true if movement was properly queued, false otherwise (if cleaning) */ bool Planner::_buffer_steps(const xyze_long_t &target - #if HAS_POSITION_FLOAT - , const xyze_pos_t &target_float - #endif - #if HAS_DIST_MM_ARG - , const xyze_float_t &cart_dist_mm - #endif - , feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters + OPTARG(HAS_POSITION_FLOAT, const xyze_pos_t &target_float) + OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm) + , feedRate_t fr_mm_s, const uint8_t extruder, const_float_t millimeters ) { - // If we are cleaning, do not accept queuing of movements - if (cleaning_buffer_counter) return false; - // Wait for the next available block uint8_t next_buffer_head; block_t * const block = get_next_free_block(next_buffer_head); + // If we are cleaning, do not accept queuing of movements + // This must be after get_next_free_block() because it calls idle() + // where cleaning_buffer_counter can be changed + if (cleaning_buffer_counter) return false; + // Fill the block with the specified movement if (!_populate_block(block, false, target - #if HAS_POSITION_FLOAT - , target_float - #endif - #if HAS_DIST_MM_ARG - , cart_dist_mm - #endif + OPTARG(HAS_POSITION_FLOAT, target_float) + OPTARG(HAS_DIST_MM_ARG, cart_dist_mm) , fr_mm_s, extruder, millimeters )) { // Movement was not queued, probably because it was too short. @@ -1745,32 +1843,36 @@ bool Planner::_buffer_steps(const xyze_long_t &target */ bool Planner::_populate_block(block_t * const block, bool split_move, const abce_long_t &target - #if HAS_POSITION_FLOAT - , const xyze_pos_t &target_float - #endif - #if HAS_DIST_MM_ARG - , const xyze_float_t &cart_dist_mm - #endif - , feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters/*=0.0*/ + OPTARG(HAS_POSITION_FLOAT, const xyze_pos_t &target_float) + OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm) + , feedRate_t fr_mm_s, const uint8_t extruder, const_float_t millimeters/*=0.0*/ ) { - - const int32_t da = target.a - position.a, - db = target.b - position.b, - dc = target.c - position.c; - - #if EXTRUDERS - int32_t de = target.e - position.e; - #else - constexpr int32_t de = 0; - #endif + int32_t LOGICAL_AXIS_LIST( + de = target.e - position.e, + da = target.a - position.a, + db = target.b - position.b, + dc = target.c - position.c, + di = target.i - position.i, + dj = target.j - position.j, + dk = target.k - position.k + ); /* <-- add a slash to enable - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " _populate_block FR:", fr_mm_s, " A:", target.a, " (", da, " steps)" " B:", target.b, " (", db, " steps)" " C:", target.c, " (", dc, " steps)" - #if EXTRUDERS + #if LINEAR_AXES >= 4 + " " AXIS4_STR ":", target.i, " (", di, " steps)" + #endif + #if LINEAR_AXES >= 5 + " " AXIS5_STR ":", target.j, " (", dj, " steps)" + #endif + #if LINEAR_AXES >= 6 + " " AXIS6_STR ":", target.k, " (", dk, " steps)" + #endif + #if HAS_EXTRUDERS " E:", target.e, " (", de, " steps)" #endif ); @@ -1811,39 +1913,57 @@ bool Planner::_populate_block(block_t * const block, bool split_move, #endif // PREVENT_COLD_EXTRUSION || PREVENT_LENGTHY_EXTRUDE // Compute direction bit-mask for this block - uint8_t dm = 0; + axis_bits_t dm = 0; #if CORE_IS_XY - if (da < 0) SBI(dm, X_HEAD); // Save the real Extruder (head) direction in X Axis + if (da < 0) SBI(dm, X_HEAD); // Save the toolhead's true direction in X if (db < 0) SBI(dm, Y_HEAD); // ...and Y if (dc < 0) SBI(dm, Z_AXIS); if (da + db < 0) SBI(dm, A_AXIS); // Motor A direction if (CORESIGN(da - db) < 0) SBI(dm, B_AXIS); // Motor B direction #elif CORE_IS_XZ - if (da < 0) SBI(dm, X_HEAD); // Save the real Extruder (head) direction in X Axis + if (da < 0) SBI(dm, X_HEAD); // Save the toolhead's true direction in X if (db < 0) SBI(dm, Y_AXIS); if (dc < 0) SBI(dm, Z_HEAD); // ...and Z if (da + dc < 0) SBI(dm, A_AXIS); // Motor A direction if (CORESIGN(da - dc) < 0) SBI(dm, C_AXIS); // Motor C direction #elif CORE_IS_YZ if (da < 0) SBI(dm, X_AXIS); - if (db < 0) SBI(dm, Y_HEAD); // Save the real Extruder (head) direction in Y Axis + if (db < 0) SBI(dm, Y_HEAD); // Save the toolhead's true direction in Y if (dc < 0) SBI(dm, Z_HEAD); // ...and Z if (db + dc < 0) SBI(dm, B_AXIS); // Motor B direction if (CORESIGN(db - dc) < 0) SBI(dm, C_AXIS); // Motor C direction #elif ENABLED(MARKFORGED_XY) - if (da < 0) SBI(dm, X_HEAD); // Save the real Extruder (head) direction in X Axis + if (da < 0) SBI(dm, X_HEAD); // Save the toolhead's true direction in X if (db < 0) SBI(dm, Y_HEAD); // ...and Y if (dc < 0) SBI(dm, Z_AXIS); if (da + db < 0) SBI(dm, A_AXIS); // Motor A direction if (db < 0) SBI(dm, B_AXIS); // Motor B direction #else - if (da < 0) SBI(dm, X_AXIS); - if (db < 0) SBI(dm, Y_AXIS); - if (dc < 0) SBI(dm, Z_AXIS); + LINEAR_AXIS_CODE( + if (da < 0) SBI(dm, X_AXIS), + if (db < 0) SBI(dm, Y_AXIS), + if (dc < 0) SBI(dm, Z_AXIS), + if (di < 0) SBI(dm, I_AXIS), + if (dj < 0) SBI(dm, J_AXIS), + if (dk < 0) SBI(dm, K_AXIS) + ); #endif - if (de < 0) SBI(dm, E_AXIS); - #if EXTRUDERS + #if IS_CORE + #if LINEAR_AXES >= 4 + if (di < 0) SBI(dm, I_AXIS); + #endif + #if LINEAR_AXES >= 5 + if (dj < 0) SBI(dm, J_AXIS); + #endif + #if LINEAR_AXES >= 6 + if (dk < 0) SBI(dm, K_AXIS); + #endif + #endif + + TERN_(HAS_EXTRUDERS, if (de < 0) SBI(dm, E_AXIS)); + + #if HAS_EXTRUDERS const float esteps_float = de * e_factor[extruder]; const uint32_t esteps = ABS(esteps_float) + 0.5f; #else @@ -1866,18 +1986,18 @@ bool Planner::_populate_block(block_t * const block, bool split_move, // Number of steps for each axis // See https://www.corexy.com/theory.html #if CORE_IS_XY - block->steps.set(ABS(da + db), ABS(da - db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da + db), ABS(da - db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #elif CORE_IS_XZ - block->steps.set(ABS(da + dc), ABS(db), ABS(da - dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da + dc), ABS(db), ABS(da - dc), ABS(di), ABS(dj), ABS(dk))); #elif CORE_IS_YZ - block->steps.set(ABS(da), ABS(db + dc), ABS(db - dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da), ABS(db + dc), ABS(db - dc), ABS(di), ABS(dj), ABS(dk))); #elif ENABLED(MARKFORGED_XY) - block->steps.set(ABS(da + db), ABS(db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da + db), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #elif IS_SCARA - block->steps.set(ABS(da), ABS(db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #else // default non-h-bot planning - block->steps.set(ABS(da), ABS(db), ABS(dc)); + block->steps.set(LINEAR_AXIS_LIST(ABS(da), ABS(db), ABS(dc), ABS(di), ABS(dj), ABS(dk))); #endif /** @@ -1890,71 +2010,105 @@ bool Planner::_populate_block(block_t * const block, bool split_move, */ struct DistanceMM : abce_float_t { #if EITHER(IS_CORE, MARKFORGED_XY) - xyz_pos_t head; + struct { float x, y, z; } head; #endif } steps_dist_mm; #if IS_CORE #if CORE_IS_XY - steps_dist_mm.head.x = da * steps_to_mm[A_AXIS]; - steps_dist_mm.head.y = db * steps_to_mm[B_AXIS]; - steps_dist_mm.z = dc * steps_to_mm[Z_AXIS]; - steps_dist_mm.a = (da + db) * steps_to_mm[A_AXIS]; - steps_dist_mm.b = CORESIGN(da - db) * steps_to_mm[B_AXIS]; + steps_dist_mm.head.x = da * mm_per_step[A_AXIS]; + steps_dist_mm.head.y = db * mm_per_step[B_AXIS]; + steps_dist_mm.z = dc * mm_per_step[Z_AXIS]; + steps_dist_mm.a = (da + db) * mm_per_step[A_AXIS]; + steps_dist_mm.b = CORESIGN(da - db) * mm_per_step[B_AXIS]; #elif CORE_IS_XZ - steps_dist_mm.head.x = da * steps_to_mm[A_AXIS]; - steps_dist_mm.y = db * steps_to_mm[Y_AXIS]; - steps_dist_mm.head.z = dc * steps_to_mm[C_AXIS]; - steps_dist_mm.a = (da + dc) * steps_to_mm[A_AXIS]; - steps_dist_mm.c = CORESIGN(da - dc) * steps_to_mm[C_AXIS]; + steps_dist_mm.head.x = da * mm_per_step[A_AXIS]; + steps_dist_mm.y = db * mm_per_step[Y_AXIS]; + steps_dist_mm.head.z = dc * mm_per_step[C_AXIS]; + steps_dist_mm.a = (da + dc) * mm_per_step[A_AXIS]; + steps_dist_mm.c = CORESIGN(da - dc) * mm_per_step[C_AXIS]; #elif CORE_IS_YZ - steps_dist_mm.x = da * steps_to_mm[X_AXIS]; - steps_dist_mm.head.y = db * steps_to_mm[B_AXIS]; - steps_dist_mm.head.z = dc * steps_to_mm[C_AXIS]; - steps_dist_mm.b = (db + dc) * steps_to_mm[B_AXIS]; - steps_dist_mm.c = CORESIGN(db - dc) * steps_to_mm[C_AXIS]; + steps_dist_mm.x = da * mm_per_step[X_AXIS]; + steps_dist_mm.head.y = db * mm_per_step[B_AXIS]; + steps_dist_mm.head.z = dc * mm_per_step[C_AXIS]; + steps_dist_mm.b = (db + dc) * mm_per_step[B_AXIS]; + steps_dist_mm.c = CORESIGN(db - dc) * mm_per_step[C_AXIS]; + #endif + #if LINEAR_AXES >= 4 + steps_dist_mm.i = di * mm_per_step[I_AXIS]; + #endif + #if LINEAR_AXES >= 5 + steps_dist_mm.j = dj * mm_per_step[J_AXIS]; + #endif + #if LINEAR_AXES >= 6 + steps_dist_mm.k = dk * mm_per_step[K_AXIS]; #endif #elif ENABLED(MARKFORGED_XY) - steps_dist_mm.head.x = da * steps_to_mm[A_AXIS]; - steps_dist_mm.head.y = db * steps_to_mm[B_AXIS]; - steps_dist_mm.z = dc * steps_to_mm[Z_AXIS]; - steps_dist_mm.a = (da - db) * steps_to_mm[A_AXIS]; - steps_dist_mm.b = db * steps_to_mm[B_AXIS]; + steps_dist_mm.head.x = da * mm_per_step[A_AXIS]; + steps_dist_mm.head.y = db * mm_per_step[B_AXIS]; + steps_dist_mm.z = dc * mm_per_step[Z_AXIS]; + steps_dist_mm.a = (da - db) * mm_per_step[A_AXIS]; + steps_dist_mm.b = db * mm_per_step[B_AXIS]; #else - steps_dist_mm.a = da * steps_to_mm[A_AXIS]; - steps_dist_mm.b = db * steps_to_mm[B_AXIS]; - steps_dist_mm.c = dc * steps_to_mm[C_AXIS]; + LINEAR_AXIS_CODE( + steps_dist_mm.a = da * mm_per_step[A_AXIS], + steps_dist_mm.b = db * mm_per_step[B_AXIS], + steps_dist_mm.c = dc * mm_per_step[C_AXIS], + steps_dist_mm.i = di * mm_per_step[I_AXIS], + steps_dist_mm.j = dj * mm_per_step[J_AXIS], + steps_dist_mm.k = dk * mm_per_step[K_AXIS] + ); #endif - #if EXTRUDERS - steps_dist_mm.e = esteps_float * steps_to_mm[E_AXIS_N(extruder)]; - #else - steps_dist_mm.e = 0.0f; - #endif + TERN_(HAS_EXTRUDERS, steps_dist_mm.e = esteps_float * mm_per_step[E_AXIS_N(extruder)]); TERN_(LCD_SHOW_E_TOTAL, e_move_accumulator += steps_dist_mm.e); - if (block->steps.a < MIN_STEPS_PER_SEGMENT && block->steps.b < MIN_STEPS_PER_SEGMENT && block->steps.c < MIN_STEPS_PER_SEGMENT) { - block->millimeters = (0 - #if EXTRUDERS - + ABS(steps_dist_mm.e) - #endif - ); + if (true LINEAR_AXIS_GANG( + && block->steps.a < MIN_STEPS_PER_SEGMENT, + && block->steps.b < MIN_STEPS_PER_SEGMENT, + && block->steps.c < MIN_STEPS_PER_SEGMENT, + && block->steps.i < MIN_STEPS_PER_SEGMENT, + && block->steps.j < MIN_STEPS_PER_SEGMENT, + && block->steps.k < MIN_STEPS_PER_SEGMENT + ) + ) { + block->millimeters = TERN0(HAS_EXTRUDERS, ABS(steps_dist_mm.e)); } else { if (millimeters) block->millimeters = millimeters; - else + else { block->millimeters = SQRT( #if EITHER(CORE_IS_XY, MARKFORGED_XY) - sq(steps_dist_mm.head.x) + sq(steps_dist_mm.head.y) + sq(steps_dist_mm.z) + LINEAR_AXIS_GANG( + sq(steps_dist_mm.head.x), + sq(steps_dist_mm.head.y), + sq(steps_dist_mm.z), + + sq(steps_dist_mm.i), + sq(steps_dist_mm.j), + sq(steps_dist_mm.k) + ) #elif CORE_IS_XZ - sq(steps_dist_mm.head.x) + sq(steps_dist_mm.y) + sq(steps_dist_mm.head.z) + LINEAR_AXIS_GANG( + sq(steps_dist_mm.head.x), + sq(steps_dist_mm.y), + sq(steps_dist_mm.head.z), + + sq(steps_dist_mm.i), + sq(steps_dist_mm.j), + sq(steps_dist_mm.k) + ) #elif CORE_IS_YZ - sq(steps_dist_mm.x) + sq(steps_dist_mm.head.y) + sq(steps_dist_mm.head.z) + LINEAR_AXIS_GANG( + sq(steps_dist_mm.x) + sq(steps_dist_mm.head.y) + sq(steps_dist_mm.head.z) + + sq(steps_dist_mm.i), + sq(steps_dist_mm.j), + sq(steps_dist_mm.k) + ) + #elif ENABLED(FOAMCUTTER_XYUV) + // Return the largest distance move from either X/Y or I/J plane + #if LINEAR_AXES >= 5 + _MAX(sq(steps_dist_mm.x) + sq(steps_dist_mm.y), sq(steps_dist_mm.i) + sq(steps_dist_mm.j)) + #else + sq(steps_dist_mm.x) + sq(steps_dist_mm.y) + #endif #else - sq(steps_dist_mm.x) + sq(steps_dist_mm.y) + sq(steps_dist_mm.z) + LINEAR_AXIS_GANG( + sq(steps_dist_mm.x), + sq(steps_dist_mm.y), + sq(steps_dist_mm.z), + + sq(steps_dist_mm.i), + sq(steps_dist_mm.j), + sq(steps_dist_mm.k) + ) #endif ); + } /** * At this point at least one of the axes has more steps than @@ -1968,18 +2122,16 @@ bool Planner::_populate_block(block_t * const block, bool split_move, TERN_(BACKLASH_COMPENSATION, backlash.add_correction_steps(da, db, dc, dm, block)); } - #if EXTRUDERS - block->steps.e = esteps; - #endif + TERN_(HAS_EXTRUDERS, block->steps.e = esteps); - block->step_event_count = _MAX(block->steps.a, block->steps.b, block->steps.c, esteps); + block->step_event_count = _MAX(LOGICAL_AXIS_LIST( + esteps, block->steps.a, block->steps.b, block->steps.c, block->steps.i, block->steps.j, block->steps.k + )); // Bail if this is a zero-length block if (block->step_event_count < MIN_STEPS_PER_SEGMENT) return false; - #if ENABLED(MIXING_EXTRUDER) - MIXER_POPULATE_BLOCK(); - #endif + TERN_(MIXING_EXTRUDER, mixer.populate_block(block->b_color)); TERN_(HAS_CUTTER, block->cutter_power = cutter.power); @@ -1992,77 +2144,97 @@ bool Planner::_populate_block(block_t * const block, bool split_move, block->e_to_p_pressure = baricuda_e_to_p_pressure; #endif - #if HAS_MULTI_EXTRUDER - block->extruder = extruder; - #endif + E_TERN_(block->extruder = extruder); #if ENABLED(AUTO_POWER_CONTROL) - if (block->steps.x || block->steps.y || block->steps.z) - powerManager.power_on(); + if (LINEAR_AXIS_GANG( + block->steps.x, + || block->steps.y, + || block->steps.z, + || block->steps.i, + || block->steps.j, + || block->steps.k + )) powerManager.power_on(); #endif // Enable active axes #if EITHER(CORE_IS_XY, MARKFORGED_XY) if (block->steps.a || block->steps.b) { - ENABLE_AXIS_X(); - ENABLE_AXIS_Y(); + stepper.enable_axis(X_AXIS); + stepper.enable_axis(Y_AXIS); } #if DISABLED(Z_LATE_ENABLE) - if (block->steps.z) ENABLE_AXIS_Z(); + if (block->steps.z) stepper.enable_axis(Z_AXIS); #endif #elif CORE_IS_XZ if (block->steps.a || block->steps.c) { - ENABLE_AXIS_X(); - ENABLE_AXIS_Z(); + stepper.enable_axis(X_AXIS); + stepper.enable_axis(Z_AXIS); } - if (block->steps.y) ENABLE_AXIS_Y(); + if (block->steps.y) stepper.enable_axis(Y_AXIS); #elif CORE_IS_YZ if (block->steps.b || block->steps.c) { - ENABLE_AXIS_Y(); - ENABLE_AXIS_Z(); + stepper.enable_axis(Y_AXIS); + stepper.enable_axis(Z_AXIS); } - if (block->steps.x) ENABLE_AXIS_X(); + if (block->steps.x) stepper.enable_axis(X_AXIS); #else - if (block->steps.x) ENABLE_AXIS_X(); - if (block->steps.y) ENABLE_AXIS_Y(); - #if DISABLED(Z_LATE_ENABLE) - if (block->steps.z) ENABLE_AXIS_Z(); + LINEAR_AXIS_CODE( + if (block->steps.x) stepper.enable_axis(X_AXIS), + if (block->steps.y) stepper.enable_axis(Y_AXIS), + if (TERN(Z_LATE_ENABLE, 0, block->steps.z)) stepper.enable_axis(Z_AXIS), + if (block->steps.i) stepper.enable_axis(I_AXIS), + if (block->steps.j) stepper.enable_axis(J_AXIS), + if (block->steps.k) stepper.enable_axis(K_AXIS) + ); + #endif + #if EITHER(IS_CORE, MARKFORGED_XY) + #if LINEAR_AXES >= 4 + if (block->steps.i) stepper.enable_axis(I_AXIS); + #endif + #if LINEAR_AXES >= 5 + if (block->steps.j) stepper.enable_axis(J_AXIS); + #endif + #if LINEAR_AXES >= 6 + if (block->steps.k) stepper.enable_axis(K_AXIS); #endif #endif // Enable extruder(s) - #if EXTRUDERS + #if HAS_EXTRUDERS if (esteps) { TERN_(AUTO_POWER_CONTROL, powerManager.power_on()); #if ENABLED(DISABLE_INACTIVE_EXTRUDER) // Enable only the selected extruder - LOOP_L_N(i, EXTRUDERS) + LOOP_L_N(i, E_STEPPERS) if (g_uc_extruder_last_move[i]) g_uc_extruder_last_move[i]--; + #define E_STEPPER_INDEX(E) TERN(SWITCHING_EXTRUDER, (E) / 2, E) + #define ENABLE_ONE_E(N) do{ \ - if (extruder == N) { \ - ENABLE_AXIS_E##N(); \ + if (E_STEPPER_INDEX(extruder) == N) { \ + stepper.ENABLE_EXTRUDER(N); \ g_uc_extruder_last_move[N] = (BLOCK_BUFFER_SIZE) * 2; \ if ((N) == 0 && TERN0(HAS_DUPLICATION_MODE, extruder_duplication_enabled)) \ - ENABLE_AXIS_E1(); \ + stepper.ENABLE_EXTRUDER(1); \ } \ else if (!g_uc_extruder_last_move[N]) { \ - DISABLE_AXIS_E##N(); \ + stepper.DISABLE_EXTRUDER(N); \ if ((N) == 0 && TERN0(HAS_DUPLICATION_MODE, extruder_duplication_enabled)) \ - DISABLE_AXIS_E1(); \ + stepper.DISABLE_EXTRUDER(1); \ } \ }while(0); #else - #define ENABLE_ONE_E(N) ENABLE_AXIS_E##N(); + #define ENABLE_ONE_E(N) stepper.ENABLE_EXTRUDER(N); #endif - REPEAT(EXTRUDERS, ENABLE_ONE_E); // (ENABLE_ONE_E must end with semicolon) + REPEAT(E_STEPPERS, ENABLE_ONE_E); // (ENABLE_ONE_E must end with semicolon) } - #endif // EXTRUDERS + #endif // HAS_EXTRUDERS if (esteps) NOLESS(fr_mm_s, settings.min_feedrate_mm_s); @@ -2125,7 +2297,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, float speed_factor = 1.0f; // factor <1 decreases speed // Linear axes first with less logic - LOOP_XYZ(i) { + LOOP_LINEAR_AXES(i) { current_speed[i] = steps_dist_mm[i] * inverse_secs; const feedRate_t cs = ABS(current_speed[i]), max_fr = settings.max_feedrate_mm_s[i]; @@ -2133,7 +2305,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, } // Limit speed on extruders, if any - #if EXTRUDERS + #if HAS_EXTRUDERS { current_speed.e = steps_dist_mm.e * inverse_secs; #if HAS_MIXER_SYNC_CHANNEL @@ -2159,10 +2331,10 @@ bool Planner::_populate_block(block_t * const block, bool split_move, if (max_vfr > 0 && cs > max_vfr) { NOMORE(speed_factor, max_vfr / cs); // respect volumetric extruder limit (if any) /* <-- add a slash to enable - SERIAL_ECHOPAIR("volumetric extruder limit enforced: ", (cs * CIRCLE_AREA(filament_size[extruder] * 0.5f))); - SERIAL_ECHOPAIR(" mm^3/s (", cs); - SERIAL_ECHOPAIR(" mm/s) limited to ", (max_vfr * CIRCLE_AREA(filament_size[extruder] * 0.5f))); - SERIAL_ECHOPAIR(" mm^3/s (", max_vfr); + SERIAL_ECHOPGM("volumetric extruder limit enforced: ", (cs * CIRCLE_AREA(filament_size[extruder] * 0.5f))); + SERIAL_ECHOPGM(" mm^3/s (", cs); + SERIAL_ECHOPGM(" mm/s) limited to ", (max_vfr * CIRCLE_AREA(filament_size[extruder] * 0.5f))); + SERIAL_ECHOPGM(" mm^3/s (", max_vfr); SERIAL_ECHOLNPGM(" mm/s)"); //*/ } @@ -2173,11 +2345,11 @@ bool Planner::_populate_block(block_t * const block, bool split_move, #ifdef XY_FREQUENCY_LIMIT - static uint8_t old_direction_bits; // = 0 + static axis_bits_t old_direction_bits; // = 0 if (xy_freq_limit_hz) { // Check and limit the xy direction change frequency - const uint8_t direction_change = block->direction_bits ^ old_direction_bits; + const axis_bits_t direction_change = block->direction_bits ^ old_direction_bits; old_direction_bits = block->direction_bits; segment_time_us = LROUND(float(segment_time_us) / speed_factor); @@ -2213,23 +2385,25 @@ bool Planner::_populate_block(block_t * const block, bool split_move, // Compute and limit the acceleration rate for the trapezoid generator. const float steps_per_mm = block->step_event_count * inverse_millimeters; uint32_t accel; - if (!block->steps.a && !block->steps.b && !block->steps.c) { - // convert to: acceleration steps/sec^2 - accel = CEIL(settings.retract_acceleration * steps_per_mm); - TERN_(LIN_ADVANCE, block->use_advance_lead = false); + if (LINEAR_AXIS_GANG( + !block->steps.a, && !block->steps.b, && !block->steps.c, + && !block->steps.i, && !block->steps.j, && !block->steps.k) + ) { // Is this a retract / recover move? + accel = CEIL(settings.retract_acceleration * steps_per_mm); // Convert to: acceleration steps/sec^2 + TERN_(LIN_ADVANCE, block->use_advance_lead = false); // No linear advance for simple retract/recover } else { #define LIMIT_ACCEL_LONG(AXIS,INDX) do{ \ if (block->steps[AXIS] && max_acceleration_steps_per_s2[AXIS+INDX] < accel) { \ - const uint32_t comp = max_acceleration_steps_per_s2[AXIS+INDX] * block->step_event_count; \ - if (accel * block->steps[AXIS] > comp) accel = comp / block->steps[AXIS]; \ + const uint32_t max_possible = max_acceleration_steps_per_s2[AXIS+INDX] * block->step_event_count / block->steps[AXIS]; \ + NOMORE(accel, max_possible); \ } \ }while(0) #define LIMIT_ACCEL_FLOAT(AXIS,INDX) do{ \ if (block->steps[AXIS] && max_acceleration_steps_per_s2[AXIS+INDX] < accel) { \ - const float comp = (float)max_acceleration_steps_per_s2[AXIS+INDX] * (float)block->step_event_count; \ - if ((float)accel * (float)block->steps[AXIS] > comp) accel = comp / (float)block->steps[AXIS]; \ + const float max_possible = float(max_acceleration_steps_per_s2[AXIS+INDX]) * float(block->step_event_count) / float(block->steps[AXIS]); \ + NOMORE(accel, max_possible); \ } \ }while(0) @@ -2278,23 +2452,33 @@ bool Planner::_populate_block(block_t * const block, bool split_move, #endif // Limit acceleration per axis - if (block->step_event_count <= cutoff_long) { - LIMIT_ACCEL_LONG(A_AXIS, 0); - LIMIT_ACCEL_LONG(B_AXIS, 0); - LIMIT_ACCEL_LONG(C_AXIS, 0); - LIMIT_ACCEL_LONG(E_AXIS, E_INDEX_N(extruder)); + if (block->step_event_count <= acceleration_long_cutoff) { + LOGICAL_AXIS_CODE( + LIMIT_ACCEL_LONG(E_AXIS, E_INDEX_N(extruder)), + LIMIT_ACCEL_LONG(A_AXIS, 0), + LIMIT_ACCEL_LONG(B_AXIS, 0), + LIMIT_ACCEL_LONG(C_AXIS, 0), + LIMIT_ACCEL_LONG(I_AXIS, 0), + LIMIT_ACCEL_LONG(J_AXIS, 0), + LIMIT_ACCEL_LONG(K_AXIS, 0) + ); } else { - LIMIT_ACCEL_FLOAT(A_AXIS, 0); - LIMIT_ACCEL_FLOAT(B_AXIS, 0); - LIMIT_ACCEL_FLOAT(C_AXIS, 0); - LIMIT_ACCEL_FLOAT(E_AXIS, E_INDEX_N(extruder)); + LOGICAL_AXIS_CODE( + LIMIT_ACCEL_FLOAT(E_AXIS, E_INDEX_N(extruder)), + LIMIT_ACCEL_FLOAT(A_AXIS, 0), + LIMIT_ACCEL_FLOAT(B_AXIS, 0), + LIMIT_ACCEL_FLOAT(C_AXIS, 0), + LIMIT_ACCEL_FLOAT(I_AXIS, 0), + LIMIT_ACCEL_FLOAT(J_AXIS, 0), + LIMIT_ACCEL_FLOAT(K_AXIS, 0) + ); } } block->acceleration_steps_per_s2 = accel; block->acceleration = accel / steps_per_mm; #if DISABLED(S_CURVE_ACCELERATION) - block->acceleration_rate = (uint32_t)(accel * (4096.0f * 4096.0f / (STEPPER_TIMER_RATE))); + block->acceleration_rate = (uint32_t)(accel * (sq(4096.0f) / (STEPPER_TIMER_RATE))); #endif #if ENABLED(LIN_ADVANCE) if (block->use_advance_lead) { @@ -2352,7 +2536,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, #if HAS_DIST_MM_ARG cart_dist_mm #else - { steps_dist_mm.x, steps_dist_mm.y, steps_dist_mm.z, steps_dist_mm.e } + LOGICAL_AXIS_ARRAY(steps_dist_mm.e, steps_dist_mm.x, steps_dist_mm.y, steps_dist_mm.z, steps_dist_mm.i, steps_dist_mm.j, steps_dist_mm.k) #endif ; @@ -2371,8 +2555,15 @@ bool Planner::_populate_block(block_t * const block, bool split_move, if (moves_queued && !UNEAR_ZERO(previous_nominal_speed_sqr)) { // Compute cosine of angle between previous and current path. (prev_unit_vec is negative) // NOTE: Max junction velocity is computed without sin() or acos() by trig half angle identity. - float junction_cos_theta = (-prev_unit_vec.x * unit_vec.x) + (-prev_unit_vec.y * unit_vec.y) - + (-prev_unit_vec.z * unit_vec.z) + (-prev_unit_vec.e * unit_vec.e); + float junction_cos_theta = LOGICAL_AXIS_GANG( + + (-prev_unit_vec.e * unit_vec.e), + (-prev_unit_vec.x * unit_vec.x), + + (-prev_unit_vec.y * unit_vec.y), + + (-prev_unit_vec.z * unit_vec.z), + + (-prev_unit_vec.i * unit_vec.i), + + (-prev_unit_vec.j * unit_vec.j), + + (-prev_unit_vec.k * unit_vec.k) + ); // NOTE: Computed without any expensive trig, sin() or acos(), by trig half angle identity of cos(theta). if (junction_cos_theta > 0.999999f) { @@ -2515,10 +2706,10 @@ bool Planner::_populate_block(block_t * const block, bool split_move, #ifndef TRAVEL_EXTRA_XYJERK #define TRAVEL_EXTRA_XYJERK 0 #endif - const float extra_xyjerk = (de <= 0) ? TRAVEL_EXTRA_XYJERK : 0; + const float extra_xyjerk = TERN0(HAS_EXTRUDERS, de <= 0) ? TRAVEL_EXTRA_XYJERK : 0; uint8_t limited = 0; - TERN(HAS_LINEAR_E_JERK, LOOP_XYZ, LOOP_XYZE)(i) { + TERN(HAS_LINEAR_E_JERK, LOOP_LINEAR_AXES, LOOP_LOGICAL_AXES)(i) { const float jerk = ABS(current_speed[i]), // cs : Starting from zero, change in speed for this axis maxj = (max_jerk[i] + (i == X_AXIS || i == Y_AXIS ? extra_xyjerk : 0.0f)); // mj : The max jerk setting for this axis if (jerk > maxj) { // cs > mj : New current speed too fast? @@ -2556,7 +2747,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move, vmax_junction = previous_nominal_speed; // Now limit the jerk in all axes. - TERN(HAS_LINEAR_E_JERK, LOOP_XYZ, LOOP_XYZE)(axis) { + TERN(HAS_LINEAR_E_JERK, LOOP_LINEAR_AXES, LOOP_LOGICAL_AXES)(axis) { // Limit an axis. We have to differentiate: coasting, reversal of an axis, full stop. float v_exit = previous_speed[axis] * smaller_speed_factor, v_entry = current_speed[axis]; @@ -2635,9 +2826,14 @@ bool Planner::_populate_block(block_t * const block, bool split_move, /** * Planner::buffer_sync_block - * Add a block to the buffer that just updates the position + * Add a block to the buffer that just updates the position, + * or in case of LASER_SYNCHRONOUS_M106_M107 the fan PWM */ -void Planner::buffer_sync_block() { +void Planner::buffer_sync_block(TERN_(LASER_SYNCHRONOUS_M106_M107, uint8_t sync_flag)) { + #if DISABLED(LASER_SYNCHRONOUS_M106_M107) + constexpr uint8_t sync_flag = BLOCK_FLAG_SYNC_POSITION; + #endif + // Wait for the next available block uint8_t next_buffer_head; block_t * const block = get_next_free_block(next_buffer_head); @@ -2645,10 +2841,14 @@ void Planner::buffer_sync_block() { // Clear block memset(block, 0, sizeof(block_t)); - block->flag = BLOCK_FLAG_SYNC_POSITION; + block->flag = sync_flag; block->position = position; + #if BOTH(HAS_FAN, LASER_SYNCHRONOUS_M106_M107) + FANS_LOOP(i) block->fan_speed[i] = thermalManager.fan_speed[i]; + #endif + // If this is the first added movement, reload the delay, otherwise, cancel it. if (block_buffer_head == block_buffer_tail) { // If it was the first queued block, restart the 1st block delivery delay, to @@ -2678,11 +2878,9 @@ void Planner::buffer_sync_block() { * * Return 'false' if no segment was queued due to cleaning, cold extrusion, full queue, etc. */ -bool Planner::buffer_segment(const float &a, const float &b, const float &c, const float &e - #if HAS_DIST_MM_ARG - , const xyze_float_t &cart_dist_mm - #endif - , const feedRate_t &fr_mm_s, const uint8_t extruder, const float &millimeters/*=0.0*/ +bool Planner::buffer_segment(const abce_pos_t &abce + OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm) + , const_feedRate_t fr_mm_s, const uint8_t extruder/*=active_extruder*/, const_float_t millimeters/*=0.0*/ ) { // If we are cleaning, do not accept queuing of movements @@ -2691,7 +2889,7 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con // When changing extruders recalculate steps corresponding to the E position #if ENABLED(DISTINCT_E_FACTORS) if (last_extruder != extruder && settings.axis_steps_per_mm[E_AXIS_N(extruder)] != settings.axis_steps_per_mm[E_AXIS_N(last_extruder)]) { - position.e = LROUND(position.e * settings.axis_steps_per_mm[E_AXIS_N(extruder)] * steps_to_mm[E_AXIS_N(last_extruder)]); + position.e = LROUND(position.e * settings.axis_steps_per_mm[E_AXIS_N(extruder)] * mm_per_step[E_AXIS_N(last_extruder)]); last_extruder = extruder; } #endif @@ -2699,61 +2897,77 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con // The target position of the tool in absolute steps // Calculate target position in absolute steps const abce_long_t target = { - int32_t(LROUND(a * settings.axis_steps_per_mm[A_AXIS])), - int32_t(LROUND(b * settings.axis_steps_per_mm[B_AXIS])), - int32_t(LROUND(c * settings.axis_steps_per_mm[C_AXIS])), - int32_t(LROUND(e * settings.axis_steps_per_mm[E_AXIS_N(extruder)])) + LOGICAL_AXIS_LIST( + int32_t(LROUND(abce.e * settings.axis_steps_per_mm[E_AXIS_N(extruder)])), + int32_t(LROUND(abce.a * settings.axis_steps_per_mm[A_AXIS])), + int32_t(LROUND(abce.b * settings.axis_steps_per_mm[B_AXIS])), + int32_t(LROUND(abce.c * settings.axis_steps_per_mm[C_AXIS])), + int32_t(LROUND(abce.i * settings.axis_steps_per_mm[I_AXIS])), + int32_t(LROUND(abce.j * settings.axis_steps_per_mm[J_AXIS])), + int32_t(LROUND(abce.k * settings.axis_steps_per_mm[K_AXIS])) + ) }; #if HAS_POSITION_FLOAT - const xyze_pos_t target_float = { a, b, c, e }; + const xyze_pos_t target_float = abce; #endif - // DRYRUN prevents E moves from taking place - if (DEBUGGING(DRYRUN) || TERN0(CANCEL_OBJECTS, cancelable.skipping)) { - position.e = target.e; - TERN_(HAS_POSITION_FLOAT, position_float.e = e); - } + #if HAS_EXTRUDERS + // DRYRUN prevents E moves from taking place + if (DEBUGGING(DRYRUN) || TERN0(CANCEL_OBJECTS, cancelable.skipping)) { + position.e = target.e; + TERN_(HAS_POSITION_FLOAT, position_float.e = abce.e); + } + #endif /* <-- add a slash to enable - SERIAL_ECHOPAIR(" buffer_segment FR:", fr_mm_s); + SERIAL_ECHOPGM(" buffer_segment FR:", fr_mm_s); #if IS_KINEMATIC - SERIAL_ECHOPAIR(" A:", a); - SERIAL_ECHOPAIR(" (", position.a); - SERIAL_ECHOPAIR("->", target.a); - SERIAL_ECHOPAIR(") B:", b); + SERIAL_ECHOPGM(" A:", abce.a, " (", position.a, "->", target.a, ") B:", abce.b); #else - SERIAL_ECHOPAIR_P(SP_X_LBL, a); - SERIAL_ECHOPAIR(" (", position.x); - SERIAL_ECHOPAIR("->", target.x); + SERIAL_ECHOPGM_P(SP_X_LBL, abce.a); + SERIAL_ECHOPGM(" (", position.x, "->", target.x); SERIAL_CHAR(')'); - SERIAL_ECHOPAIR_P(SP_Y_LBL, b); + SERIAL_ECHOPGM_P(SP_Y_LBL, abce.b); #endif - SERIAL_ECHOPAIR(" (", position.y); - SERIAL_ECHOPAIR("->", target.y); - #if ENABLED(DELTA) - SERIAL_ECHOPAIR(") C:", c); - #else + SERIAL_ECHOPGM(" (", position.y, "->", target.y); + #if LINEAR_AXES >= ABC + #if ENABLED(DELTA) + SERIAL_ECHOPGM(") C:", abce.c); + #else + SERIAL_CHAR(')'); + SERIAL_ECHOPGM_P(SP_Z_LBL, abce.c); + #endif + SERIAL_ECHOPGM(" (", position.z, "->", target.z); SERIAL_CHAR(')'); - SERIAL_ECHOPAIR_P(SP_Z_LBL, c); #endif - SERIAL_ECHOPAIR(" (", position.z); - SERIAL_ECHOPAIR("->", target.z); - SERIAL_CHAR(')'); - SERIAL_ECHOPAIR_P(SP_E_LBL, e); - SERIAL_ECHOPAIR(" (", position.e); - SERIAL_ECHOPAIR("->", target.e); - SERIAL_ECHOLNPGM(")"); + #if LINEAR_AXES >= 4 + SERIAL_ECHOPGM_P(SP_I_LBL, abce.i); + SERIAL_ECHOPGM(" (", position.i, "->", target.i); + SERIAL_CHAR(')'); + #endif + #if LINEAR_AXES >= 5 + SERIAL_ECHOPGM_P(SP_J_LBL, abce.j); + SERIAL_ECHOPGM(" (", position.j, "->", target.j); + SERIAL_CHAR(')'); + #endif + #if LINEAR_AXES >= 6 + SERIAL_ECHOPGM_P(SP_K_LBL, abce.k); + SERIAL_ECHOPGM(" (", position.k, "->", target.k); + SERIAL_CHAR(')'); + #endif + #if HAS_EXTRUDERS + SERIAL_ECHOPGM_P(SP_E_LBL, abce.e); + SERIAL_ECHOLNPGM(" (", position.e, "->", target.e, ")"); + #else + SERIAL_EOL(); + #endif //*/ // Queue the movement. Return 'false' if the move was not queued. if (!_buffer_steps(target - #if HAS_POSITION_FLOAT - , target_float - #endif - #if HAS_DIST_MM_ARG - , cart_dist_mm - #endif + OPTARG(HAS_POSITION_FLOAT, target_float) + OPTARG(HAS_DIST_MM_ARG, cart_dist_mm) , fr_mm_s, extruder, millimeters) ) return false; @@ -2766,34 +2980,34 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con * The target is cartesian. It's translated to * delta/scara if needed. * - * rx,ry,rz,e - target position in mm or degrees - * fr_mm_s - (target) speed of the move (mm/s) - * extruder - target extruder - * millimeters - the length of the movement, if known - * inv_duration - the reciprocal if the duration of the movement, if known (kinematic only if feeedrate scaling is enabled) + * cart - target position in mm or degrees + * fr_mm_s - (target) speed of the move (mm/s) + * extruder - target extruder + * millimeters - the length of the movement, if known + * inv_duration - the reciprocal if the duration of the movement, if known (kinematic only if feeedrate scaling is enabled) */ -bool Planner::buffer_line(const float &rx, const float &ry, const float &rz, const float &e, const feedRate_t &fr_mm_s, const uint8_t extruder, const float millimeters - #if ENABLED(SCARA_FEEDRATE_SCALING) - , const float &inv_duration - #endif +bool Planner::buffer_line(const xyze_pos_t &cart, const_feedRate_t fr_mm_s, const uint8_t extruder/*=active_extruder*/, const float millimeters/*=0.0*/ + OPTARG(SCARA_FEEDRATE_SCALING, const_float_t inv_duration/*=0.0*/) ) { - xyze_pos_t machine = { rx, ry, rz, e }; + xyze_pos_t machine = cart; TERN_(HAS_POSITION_MODIFIERS, apply_modifiers(machine)); #if IS_KINEMATIC #if HAS_JUNCTION_DEVIATION - const xyze_pos_t cart_dist_mm = { - rx - position_cart.x, ry - position_cart.y, - rz - position_cart.z, e - position_cart.e - }; + const xyze_pos_t cart_dist_mm = LOGICAL_AXIS_ARRAY( + cart.e - position_cart.e, + cart.x - position_cart.x, cart.y - position_cart.y, cart.z - position_cart.z, + cart.i - position_cart.i, cart.j - position_cart.j, cart.j - position_cart.k + ); #else - const xyz_pos_t cart_dist_mm = { rx - position_cart.x, ry - position_cart.y, rz - position_cart.z }; + const xyz_pos_t cart_dist_mm = LINEAR_AXIS_ARRAY( + cart.x - position_cart.x, cart.y - position_cart.y, cart.z - position_cart.z, + cart.i - position_cart.i, cart.j - position_cart.j, cart.j - position_cart.k + ); #endif - float mm = millimeters; - if (mm == 0.0) - mm = (cart_dist_mm.x != 0.0 || cart_dist_mm.y != 0.0) ? cart_dist_mm.magnitude() : ABS(cart_dist_mm.z); + const float mm = millimeters ?: (cart_dist_mm.x || cart_dist_mm.y) ? cart_dist_mm.magnitude() : TERN0(HAS_Z_AXIS, ABS(cart_dist_mm.z)); // Cartesian XYZ to kinematic ABC, stored in global 'delta' inverse_kinematics(machine); @@ -2807,17 +3021,12 @@ bool Planner::buffer_line(const float &rx, const float &ry, const float &rz, con #else const feedRate_t feedrate = fr_mm_s; #endif - if (buffer_segment(delta.a, delta.b, delta.c, machine.e - #if HAS_JUNCTION_DEVIATION - , cart_dist_mm - #endif - , feedrate, extruder, mm - )) { - position_cart.set(rx, ry, rz, e); + TERN_(HAS_EXTRUDERS, delta.e = machine.e); + if (buffer_segment(delta OPTARG(HAS_DIST_MM_ARG, cart_dist_mm), feedrate, extruder, mm)) { + position_cart = cart; return true; } - else - return false; + return false; #else return buffer_segment(machine, fr_mm_s, extruder, millimeters); #endif @@ -2836,20 +3045,16 @@ bool Planner::buffer_line(const float &rx, const float &ry, const float &rz, con block->flag = BLOCK_FLAG_IS_PAGE; - #if FAN_COUNT > 0 + #if HAS_FAN FANS_LOOP(i) block->fan_speed[i] = thermalManager.fan_speed[i]; #endif - #if HAS_MULTI_EXTRUDER - block->extruder = extruder; - #endif + E_TERN_(block->extruder = extruder); block->page_idx = page_idx; block->step_event_count = num_steps; - block->initial_rate = - block->final_rate = - block->nominal_rate = last_page_step_rate; // steps/s + block->initial_rate = block->final_rate = block->nominal_rate = last_page_step_rate; // steps/s block->accelerate_until = 0; block->decelerate_after = block->step_event_count; @@ -2880,26 +3085,32 @@ bool Planner::buffer_line(const float &rx, const float &ry, const float &rz, con // Move buffer head block_buffer_head = next_buffer_head; - enable_all_steppers(); + stepper.enable_all_steppers(); stepper.wake_up(); } #endif // DIRECT_STEPPING /** - * Directly set the planner ABC position (and stepper positions) + * Directly set the planner ABCE position (and stepper positions) * converting mm (or angles for SCARA) into steps. * - * The provided ABC position is in machine units. + * The provided ABCE position is in machine units. */ - -void Planner::set_machine_position_mm(const float &a, const float &b, const float &c, const float &e) { +void Planner::set_machine_position_mm(const abce_pos_t &abce) { TERN_(DISTINCT_E_FACTORS, last_extruder = active_extruder); - TERN_(HAS_POSITION_FLOAT, position_float.set(a, b, c, e)); - position.set(LROUND(a * settings.axis_steps_per_mm[A_AXIS]), - LROUND(b * settings.axis_steps_per_mm[B_AXIS]), - LROUND(c * settings.axis_steps_per_mm[C_AXIS]), - LROUND(e * settings.axis_steps_per_mm[E_AXIS_N(active_extruder)])); + TERN_(HAS_POSITION_FLOAT, position_float = abce); + position.set( + LOGICAL_AXIS_LIST( + LROUND(abce.e * settings.axis_steps_per_mm[E_AXIS_N(active_extruder)]), + LROUND(abce.a * settings.axis_steps_per_mm[A_AXIS]), + LROUND(abce.b * settings.axis_steps_per_mm[B_AXIS]), + LROUND(abce.c * settings.axis_steps_per_mm[C_AXIS]), + LROUND(abce.i * settings.axis_steps_per_mm[I_AXIS]), + LROUND(abce.j * settings.axis_steps_per_mm[J_AXIS]), + LROUND(abce.k * settings.axis_steps_per_mm[K_AXIS]) + ) + ); if (has_blocks_queued()) { //previous_nominal_speed_sqr = 0.0; // Reset planner junction speeds. Assume start from rest. //previous_speed.reset(); @@ -2909,74 +3120,84 @@ void Planner::set_machine_position_mm(const float &a, const float &b, const floa stepper.set_position(position); } -void Planner::set_position_mm(const float &rx, const float &ry, const float &rz, const float &e) { - xyze_pos_t machine = { rx, ry, rz, e }; - #if HAS_POSITION_MODIFIERS - apply_modifiers(machine, true); - #endif +void Planner::set_position_mm(const xyze_pos_t &xyze) { + xyze_pos_t machine = xyze; + TERN_(HAS_POSITION_MODIFIERS, apply_modifiers(machine, true)); #if IS_KINEMATIC - position_cart.set(rx, ry, rz, e); + position_cart = xyze; inverse_kinematics(machine); - set_machine_position_mm(delta.a, delta.b, delta.c, machine.e); + TERN_(HAS_EXTRUDERS, delta.e = machine.e); + set_machine_position_mm(delta); #else set_machine_position_mm(machine); #endif } -/** - * Setters for planner position (also setting stepper position). - */ -void Planner::set_e_position_mm(const float &e) { - const uint8_t axis_index = E_AXIS_N(active_extruder); - TERN_(DISTINCT_E_FACTORS, last_extruder = active_extruder); +#if HAS_EXTRUDERS + + /** + * Setters for planner position (also setting stepper position). + */ + void Planner::set_e_position_mm(const_float_t e) { + const uint8_t axis_index = E_AXIS_N(active_extruder); + TERN_(DISTINCT_E_FACTORS, last_extruder = active_extruder); - const float e_new = e - TERN0(FWRETRACT, fwretract.current_retract[active_extruder]); - position.e = LROUND(settings.axis_steps_per_mm[axis_index] * e_new); - TERN_(HAS_POSITION_FLOAT, position_float.e = e_new); - TERN_(IS_KINEMATIC, position_cart.e = e); + const float e_new = DIFF_TERN(FWRETRACT, e, fwretract.current_retract[active_extruder]); + position.e = LROUND(settings.axis_steps_per_mm[axis_index] * e_new); + TERN_(HAS_POSITION_FLOAT, position_float.e = e_new); + TERN_(IS_KINEMATIC, TERN_(HAS_EXTRUDERS, position_cart.e = e)); - if (has_blocks_queued()) - buffer_sync_block(); - else - stepper.set_axis_position(E_AXIS, position.e); -} + if (has_blocks_queued()) + buffer_sync_block(); + else + stepper.set_axis_position(E_AXIS, position.e); + } + +#endif // Recalculate the steps/s^2 acceleration rates, based on the mm/s^2 void Planner::reset_acceleration_rates() { - #if ENABLED(DISTINCT_E_FACTORS) - #define AXIS_CONDITION (i < E_AXIS || i == E_AXIS_N(active_extruder)) - #else - #define AXIS_CONDITION true - #endif uint32_t highest_rate = 1; - LOOP_XYZE_N(i) { + LOOP_DISTINCT_AXES(i) { max_acceleration_steps_per_s2[i] = settings.max_acceleration_mm_per_s2[i] * settings.axis_steps_per_mm[i]; - if (AXIS_CONDITION) NOLESS(highest_rate, max_acceleration_steps_per_s2[i]); + if (TERN1(DISTINCT_E_FACTORS, i < E_AXIS || i == E_AXIS_N(active_extruder))) + NOLESS(highest_rate, max_acceleration_steps_per_s2[i]); } - cutoff_long = 4294967295UL / highest_rate; // 0xFFFFFFFFUL + acceleration_long_cutoff = 4294967295UL / highest_rate; // 0xFFFFFFFFUL TERN_(HAS_LINEAR_E_JERK, recalculate_max_e_jerk()); } -// Recalculate position, steps_to_mm if settings.axis_steps_per_mm changes! +/** + * Recalculate 'position' and 'mm_per_step'. + * Must be called whenever settings.axis_steps_per_mm changes! + */ void Planner::refresh_positioning() { - LOOP_XYZE_N(i) steps_to_mm[i] = 1.0f / settings.axis_steps_per_mm[i]; + LOOP_DISTINCT_AXES(i) mm_per_step[i] = 1.0f / settings.axis_steps_per_mm[i]; set_position_mm(current_position); reset_acceleration_rates(); } +// Apply limits to a variable and give a warning if the value was out of range inline void limit_and_warn(float &val, const uint8_t axis, PGM_P const setting_name, const xyze_float_t &max_limit) { - const uint8_t lim_axis = axis > E_AXIS ? E_AXIS : axis; + const uint8_t lim_axis = TERN_(HAS_EXTRUDERS, axis > E_AXIS ? E_AXIS :) axis; const float before = val; LIMIT(val, 0.1, max_limit[lim_axis]); if (before != val) { - SERIAL_CHAR(axis_codes[lim_axis]); + SERIAL_CHAR(AXIS_CHAR(lim_axis)); SERIAL_ECHOPGM(" Max "); - serialprintPGM(setting_name); - SERIAL_ECHOLNPAIR(" limited to ", val); + SERIAL_ECHOPGM_P(setting_name); + SERIAL_ECHOLNPGM(" limited to ", val); } } -void Planner::set_max_acceleration(const uint8_t axis, float targetValue) { +/** + * For the specified 'axis' set the Maximum Acceleration to the given value (mm/s^2) + * The value may be limited with warning feedback, if configured. + * Calls reset_acceleration_rates to precalculate planner terms in steps. + * + * This hard limit is applied as a block is being added to the planner queue. + */ +void Planner::set_max_acceleration(const uint8_t axis, float inMaxAccelMMS2) { #if ENABLED(LIMITED_MAX_ACCEL_EDITING) #ifdef MAX_ACCEL_EDIT_VALUES constexpr xyze_float_t max_accel_edit = MAX_ACCEL_EDIT_VALUES; @@ -2985,15 +3206,21 @@ void Planner::set_max_acceleration(const uint8_t axis, float targetValue) { constexpr xyze_float_t max_accel_edit = DEFAULT_MAX_ACCELERATION; const xyze_float_t max_acc_edit_scaled = max_accel_edit * 2; #endif - limit_and_warn(targetValue, axis, PSTR("Acceleration"), max_acc_edit_scaled); + limit_and_warn(inMaxAccelMMS2, axis, PSTR("Acceleration"), max_acc_edit_scaled); #endif - settings.max_acceleration_mm_per_s2[axis] = targetValue; + settings.max_acceleration_mm_per_s2[axis] = inMaxAccelMMS2; // Update steps per s2 to agree with the units per s2 (since they are used in the planner) reset_acceleration_rates(); } -void Planner::set_max_feedrate(const uint8_t axis, float targetValue) { +/** + * For the specified 'axis' set the Maximum Feedrate to the given value (mm/s) + * The value may be limited with warning feedback, if configured. + * + * This hard limit is applied as a block is being added to the planner queue. + */ +void Planner::set_max_feedrate(const uint8_t axis, float inMaxFeedrateMMS) { #if ENABLED(LIMITED_MAX_FR_EDITING) #ifdef MAX_FEEDRATE_EDIT_VALUES constexpr xyze_float_t max_fr_edit = MAX_FEEDRATE_EDIT_VALUES; @@ -3002,13 +3229,20 @@ void Planner::set_max_feedrate(const uint8_t axis, float targetValue) { constexpr xyze_float_t max_fr_edit = DEFAULT_MAX_FEEDRATE; const xyze_float_t max_fr_edit_scaled = max_fr_edit * 2; #endif - limit_and_warn(targetValue, axis, PSTR("Feedrate"), max_fr_edit_scaled); + limit_and_warn(inMaxFeedrateMMS, axis, PSTR("Feedrate"), max_fr_edit_scaled); #endif - settings.max_feedrate_mm_s[axis] = targetValue; + settings.max_feedrate_mm_s[axis] = inMaxFeedrateMMS; } -void Planner::set_max_jerk(const AxisEnum axis, float targetValue) { - #if HAS_CLASSIC_JERK +#if HAS_CLASSIC_JERK + + /** + * For the specified 'axis' set the Maximum Jerk (instant change) to the given value (mm/s) + * The value may be limited with warning feedback, if configured. + * + * This hard limit is applied (to the block start speed) as the block is being added to the planner queue. + */ + void Planner::set_max_jerk(const AxisEnum axis, float inMaxJerkMMS) { #if ENABLED(LIMITED_JERK_EDITING) constexpr xyze_float_t max_jerk_edit = #ifdef MAX_JERK_EDIT_VALUES @@ -3018,13 +3252,12 @@ void Planner::set_max_jerk(const AxisEnum axis, float targetValue) { (DEFAULT_ZJERK) * 2, (DEFAULT_EJERK) * 2 } #endif ; - limit_and_warn(targetValue, axis, PSTR("Jerk"), max_jerk_edit); + limit_and_warn(inMaxJerkMMS, axis, PSTR("Jerk"), max_jerk_edit); #endif - max_jerk[axis] = targetValue; - #else - UNUSED(axis); UNUSED(targetValue); - #endif -} + max_jerk[axis] = inMaxJerkMMS; + } + +#endif #if HAS_WIRED_LCD @@ -3067,33 +3300,3 @@ void Planner::set_max_jerk(const AxisEnum axis, float targetValue) { } #endif - -#if ENABLED(AUTOTEMP) - -void Planner::autotemp_update() { - #if ENABLED(AUTOTEMP_PROPORTIONAL) - const int16_t target = thermalManager.degTargetHotend(active_extruder); - autotemp_min = target + AUTOTEMP_MIN_P; - autotemp_max = target + AUTOTEMP_MAX_P; - #endif - autotemp_factor = TERN(AUTOTEMP_PROPORTIONAL, AUTOTEMP_FACTOR_P, 0); - autotemp_enabled = autotemp_factor != 0; -} - - void Planner::autotemp_M104_M109() { - - #if ENABLED(AUTOTEMP_PROPORTIONAL) - const int16_t target = thermalManager.degTargetHotend(active_extruder); - autotemp_min = target + AUTOTEMP_MIN_P; - autotemp_max = target + AUTOTEMP_MAX_P; - #endif - - if (parser.seenval('S')) autotemp_min = parser.value_celsius(); - if (parser.seenval('B')) autotemp_max = parser.value_celsius(); - - // When AUTOTEMP_PROPORTIONAL is enabled, F0 disables autotemp. - // Normally, leaving off F also disables autotemp. - autotemp_factor = parser.seen('F') ? parser.value_float() : TERN(AUTOTEMP_PROPORTIONAL, AUTOTEMP_FACTOR_P, 0); - autotemp_enabled = autotemp_factor != 0; - } -#endif diff --git a/Marlin/src/module/planner.h b/Marlin/src/module/planner.h index cd906c5d134a..16d136be454f 100644 --- a/Marlin/src/module/planner.h +++ b/Marlin/src/module/planner.h @@ -48,6 +48,8 @@ #if ENABLED(DELTA) #include "delta.h" +#elif ENABLED(POLARGRAPH) + #include "polargraph.h" #endif #if ABL_PLANAR @@ -76,7 +78,9 @@ // Feedrate for manual moves #ifdef MANUAL_FEEDRATE constexpr xyze_feedrate_t _mf = MANUAL_FEEDRATE, - manual_feedrate_mm_s { _mf.x / 60.0f, _mf.y / 60.0f, _mf.z / 60.0f, _mf.e / 60.0f }; + manual_feedrate_mm_s = LOGICAL_AXIS_ARRAY(_mf.e / 60.0f, + _mf.x / 60.0f, _mf.y / 60.0f, _mf.z / 60.0f, + _mf.i / 60.0f, _mf.j / 60.0f, _mf.k / 60.0f); #endif #if IS_KINEMATIC && HAS_JUNCTION_DEVIATION @@ -102,6 +106,11 @@ enum BlockFlagBit : char { #if ENABLED(DIRECT_STEPPING) , BLOCK_BIT_IS_PAGE #endif + + // Sync the fan speeds from the block + #if ENABLED(LASER_SYNCHRONOUS_M106_M107) + , BLOCK_BIT_SYNC_FANS + #endif }; enum BlockFlag : char { @@ -112,8 +121,13 @@ enum BlockFlag : char { #if ENABLED(DIRECT_STEPPING) , BLOCK_FLAG_IS_PAGE = _BV(BLOCK_BIT_IS_PAGE) #endif + #if ENABLED(LASER_SYNCHRONOUS_M106_M107) + , BLOCK_FLAG_SYNC_FANS = _BV(BLOCK_BIT_SYNC_FANS) + #endif }; +#define BLOCK_MASK_SYNC ( BLOCK_FLAG_SYNC_POSITION | TERN0(LASER_SYNCHRONOUS_M106_M107, BLOCK_FLAG_SYNC_FANS) ) + #if ENABLED(LASER_POWER_INLINE) typedef struct { @@ -170,7 +184,9 @@ typedef struct block_t { static constexpr uint8_t extruder = 0; #endif - TERN_(MIXING_EXTRUDER, MIXER_BLOCK_FIELD); // Normalized color for the mixing steppers + #if ENABLED(MIXING_EXTRUDER) + mixer_comp_t b_color[MIXING_STEPPERS]; // Normalized color for the mixing steppers + #endif // Settings for the trapezoid generator uint32_t accelerate_until, // The index of the step event on which to stop acceleration @@ -186,7 +202,7 @@ typedef struct block_t { uint32_t acceleration_rate; // The acceleration rate used for acceleration calculation #endif - uint8_t direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h) + axis_bits_t direction_bits; // The direction bit set for this block (refers to *_DIRECTION_BIT in config.h) // Advance extrusion #if ENABLED(LIN_ADVANCE) @@ -256,10 +272,10 @@ typedef struct block_t { #endif typedef struct { - uint32_t max_acceleration_mm_per_s2[XYZE_N], // (mm/s^2) M201 XYZE + uint32_t max_acceleration_mm_per_s2[DISTINCT_AXES], // (mm/s^2) M201 XYZE min_segment_time_us; // (µs) M205 B - float axis_steps_per_mm[XYZE_N]; // (steps) M92 XYZE - Steps per millimeter - feedRate_t max_feedrate_mm_s[XYZE_N]; // (mm/s) M203 XYZE - Max speeds + float axis_steps_per_mm[DISTINCT_AXES]; // (steps) M92 XYZE - Steps per millimeter + feedRate_t max_feedrate_mm_s[DISTINCT_AXES]; // (mm/s) M203 XYZE - Max speeds float acceleration, // (mm/s^2) M204 S - Normal acceleration. DEFAULT ACCELERATION for all printing moves. retract_acceleration, // (mm/s^2) M204 R - Retract acceleration. Filament pull-back and push-forward while standing still in the other axes travel_acceleration; // (mm/s^2) M204 T - Travel acceleration. DEFAULT ACCELERATION for all NON printing moves. @@ -267,6 +283,15 @@ typedef struct { min_travel_feedrate_mm_s; // (mm/s) M205 T - Minimum travel feedrate } planner_settings_t; +#if ENABLED(IMPROVE_HOMING_RELIABILITY) + struct motion_state_t { + TERN(DELTA, xyz_ulong_t, xy_ulong_t) acceleration; + #if HAS_CLASSIC_JERK + TERN(DELTA, xyz_float_t, xy_float_t) jerk_state; + #endif + }; +#endif + #if DISABLED(SKEW_CORRECTION) #define XY_SKEW_FACTOR 0 #define XZ_SKEW_FACTOR 0 @@ -325,7 +350,7 @@ class Planner { static xyze_bool_t last_page_dir; // Last page direction given #endif - #if EXTRUDERS + #if HAS_EXTRUDERS static int16_t flow_percentage[EXTRUDERS]; // Extrusion factor for each extruder static float e_factor[EXTRUDERS]; // The flow percentage and volumetric multiplier combine to scale E movement #endif @@ -348,13 +373,13 @@ class Planner { static laser_state_t laser_inline; #endif - static uint32_t max_acceleration_steps_per_s2[XYZE_N]; // (steps/s^2) Derived from mm_per_s2 - static float steps_to_mm[XYZE_N]; // Millimeters per step + static uint32_t max_acceleration_steps_per_s2[DISTINCT_AXES]; // (steps/s^2) Derived from mm_per_s2 + static float mm_per_step[DISTINCT_AXES]; // Millimeters per step #if HAS_JUNCTION_DEVIATION - static float junction_deviation_mm; // (mm) M205 J + static float junction_deviation_mm; // (mm) M205 J #if HAS_LINEAR_E_JERK - static float max_e_jerk[DISTINCT_E]; // Calculated from junction_deviation_mm + static float max_e_jerk[DISTINCT_E]; // Calculated from junction_deviation_mm #endif #endif @@ -431,15 +456,15 @@ class Planner { /** * Limit where 64bit math is necessary for acceleration calculation */ - static uint32_t cutoff_long; + static uint32_t acceleration_long_cutoff; #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) static float last_fade_z; #endif #if ENABLED(DISABLE_INACTIVE_EXTRUDER) - // Counters to manage disabling inactive extruders - static last_move_t g_uc_extruder_last_move[EXTRUDERS]; + // Counters to manage disabling inactive extruder steppers + static last_move_t g_uc_extruder_last_move[E_STEPPERS]; #endif #if HAS_WIRED_LCD @@ -460,14 +485,29 @@ class Planner { * Static (class) Methods */ + // Recalculate steps/s^2 accelerations based on mm/s^2 settings static void reset_acceleration_rates(); + + /** + * Recalculate 'position' and 'mm_per_step'. + * Must be called whenever settings.axis_steps_per_mm changes! + */ static void refresh_positioning(); - static void set_max_acceleration(const uint8_t axis, float targetValue); - static void set_max_feedrate(const uint8_t axis, float targetValue); - static void set_max_jerk(const AxisEnum axis, float targetValue); + // For an axis set the Maximum Acceleration in mm/s^2 + static void set_max_acceleration(const uint8_t axis, float inMaxAccelMMS2); - #if EXTRUDERS + // For an axis set the Maximum Feedrate in mm/s + static void set_max_feedrate(const uint8_t axis, float inMaxFeedrateMMS); + + // For an axis set the Maximum Jerk (instant change) in mm/s + #if HAS_CLASSIC_JERK + static void set_max_jerk(const AxisEnum axis, float inMaxJerkMMS); + #else + static inline void set_max_jerk(const AxisEnum, const_float_t) {} + #endif + + #if HAS_EXTRUDERS FORCE_INLINE static void refresh_e_factor(const uint8_t e) { e_factor[e] = flow_percentage[e] * 0.01f * TERN(NO_VOLUMETRICS, 1.0f, volumetric_multiplier[e]); } @@ -482,6 +522,16 @@ class Planner { // Manage fans, paste pressure, etc. static void check_axes_activity(); + // Apply fan speeds + #if HAS_FAN + static void sync_fan_speeds(uint8_t (&fan_speed)[FAN_COUNT]); + #if FAN_KICKSTART_TIME + static void kickstart_fan(uint8_t (&fan_speed)[FAN_COUNT], const millis_t &ms, const uint8_t f); + #else + FORCE_INLINE static void kickstart_fan(uint8_t (&)[FAN_COUNT], const millis_t &, const uint8_t) {} + #endif + #endif + #if ENABLED(FILAMENT_WIDTH_SENSOR) void apply_filament_width_sensor(const int8_t encoded_ratio); @@ -493,6 +543,10 @@ class Planner { } #endif + #if ENABLED(IMPROVE_HOMING_RELIABILITY) + void enable_stall_prevention(const bool onoff); + #endif + #if DISABLED(NO_VOLUMETRICS) // Update multipliers based on new diameter measurements @@ -504,7 +558,7 @@ class Planner { static void calculate_volumetric_extruder_limits(); #endif - FORCE_INLINE static void set_filament_size(const uint8_t e, const float &v) { + FORCE_INLINE static void set_filament_size(const uint8_t e, const_float_t v) { filament_size[e] = v; if (v > 0) volumetric_area_nominal = CIRCLE_AREA(v * 0.5); //TODO: should it be per extruder // make sure all extruders have some sane value for the filament size @@ -515,7 +569,7 @@ class Planner { #endif #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) - FORCE_INLINE static void set_volumetric_extruder_limit(const uint8_t e, const float &v) { + FORCE_INLINE static void set_volumetric_extruder_limit(const uint8_t e, const_float_t v) { volumetric_extruder_limit[e] = v; calculate_volumetric_extruder_limit(e); } @@ -530,7 +584,7 @@ class Planner { * Returns 1.0 if planner.z_fade_height is 0.0. * Returns 0.0 if Z is past the specified 'Fade Height'. */ - static inline float fade_scaling_factor_for_z(const float &rz) { + static inline float fade_scaling_factor_for_z(const_float_t rz) { static float z_fade_factor = 1; if (!z_fade_height) return 1; if (rz >= z_fade_height) return 0; @@ -543,42 +597,42 @@ class Planner { FORCE_INLINE static void force_fade_recalc() { last_fade_z = -999.999f; } - FORCE_INLINE static void set_z_fade_height(const float &zfh) { + FORCE_INLINE static void set_z_fade_height(const_float_t zfh) { z_fade_height = zfh > 0 ? zfh : 0; inverse_z_fade_height = RECIPROCAL(z_fade_height); force_fade_recalc(); } - FORCE_INLINE static bool leveling_active_at_z(const float &rz) { + FORCE_INLINE static bool leveling_active_at_z(const_float_t rz) { return !z_fade_height || rz < z_fade_height; } #else - FORCE_INLINE static float fade_scaling_factor_for_z(const float&) { return 1; } + FORCE_INLINE static float fade_scaling_factor_for_z(const_float_t) { return 1; } - FORCE_INLINE static bool leveling_active_at_z(const float&) { return true; } + FORCE_INLINE static bool leveling_active_at_z(const_float_t) { return true; } #endif #if ENABLED(SKEW_CORRECTION) - FORCE_INLINE static void skew(float &cx, float &cy, const float &cz) { - if (WITHIN(cx, X_MIN_POS + 1, X_MAX_POS) && WITHIN(cy, Y_MIN_POS + 1, Y_MAX_POS)) { + FORCE_INLINE static void skew(float &cx, float &cy, const_float_t cz) { + if (COORDINATE_OKAY(cx, X_MIN_POS + 1, X_MAX_POS) && COORDINATE_OKAY(cy, Y_MIN_POS + 1, Y_MAX_POS)) { const float sx = cx - cy * skew_factor.xy - cz * (skew_factor.xz - (skew_factor.xy * skew_factor.yz)), sy = cy - cz * skew_factor.yz; - if (WITHIN(sx, X_MIN_POS, X_MAX_POS) && WITHIN(sy, Y_MIN_POS, Y_MAX_POS)) { + if (COORDINATE_OKAY(sx, X_MIN_POS, X_MAX_POS) && COORDINATE_OKAY(sy, Y_MIN_POS, Y_MAX_POS)) { cx = sx; cy = sy; } } } FORCE_INLINE static void skew(xyz_pos_t &raw) { skew(raw.x, raw.y, raw.z); } - FORCE_INLINE static void unskew(float &cx, float &cy, const float &cz) { - if (WITHIN(cx, X_MIN_POS, X_MAX_POS) && WITHIN(cy, Y_MIN_POS, Y_MAX_POS)) { + FORCE_INLINE static void unskew(float &cx, float &cy, const_float_t cz) { + if (COORDINATE_OKAY(cx, X_MIN_POS, X_MAX_POS) && COORDINATE_OKAY(cy, Y_MIN_POS, Y_MAX_POS)) { const float sx = cx + cy * skew_factor.xy + cz * skew_factor.xz, sy = cy + cz * skew_factor.yz; - if (WITHIN(sx, X_MIN_POS, X_MAX_POS) && WITHIN(sy, Y_MIN_POS, Y_MAX_POS)) { + if (COORDINATE_OKAY(sx, X_MIN_POS, X_MAX_POS) && COORDINATE_OKAY(sy, Y_MIN_POS, Y_MAX_POS)) { cx = sx; cy = sy; } } @@ -670,13 +724,9 @@ class Planner { * Returns true if movement was buffered, false otherwise */ static bool _buffer_steps(const xyze_long_t &target - #if HAS_POSITION_FLOAT - , const xyze_pos_t &target_float - #endif - #if HAS_DIST_MM_ARG - , const xyze_float_t &cart_dist_mm - #endif - , feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters=0.0 + OPTARG(HAS_POSITION_FLOAT, const xyze_pos_t &target_float) + OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm) + , feedRate_t fr_mm_s, const uint8_t extruder, const_float_t millimeters=0.0 ); /** @@ -691,22 +741,20 @@ class Planner { * * Returns true is movement is acceptable, false otherwise */ - static bool _populate_block(block_t * const block, bool split_move, - const xyze_long_t &target - #if HAS_POSITION_FLOAT - , const xyze_pos_t &target_float - #endif - #if HAS_DIST_MM_ARG - , const xyze_float_t &cart_dist_mm - #endif - , feedRate_t fr_mm_s, const uint8_t extruder, const float &millimeters=0.0 + static bool _populate_block(block_t * const block, bool split_move, const xyze_long_t &target + OPTARG(HAS_POSITION_FLOAT, const xyze_pos_t &target_float) + OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm) + , feedRate_t fr_mm_s, const uint8_t extruder, const_float_t millimeters=0.0 ); /** * Planner::buffer_sync_block - * Add a block to the buffer that just updates the position + * Add a block to the buffer that just updates the position or in + * case of LASER_SYNCHRONOUS_M106_M107 the fan pwm */ - static void buffer_sync_block(); + static void buffer_sync_block( + TERN_(LASER_SYNCHRONOUS_M106_M107, uint8_t sync_flag=BLOCK_FLAG_SYNC_POSITION) + ); #if IS_KINEMATIC private: @@ -727,26 +775,11 @@ class Planner { * extruder - target extruder * millimeters - the length of the movement, if known */ - static bool buffer_segment(const float &a, const float &b, const float &c, const float &e - #if HAS_DIST_MM_ARG - , const xyze_float_t &cart_dist_mm - #endif - , const feedRate_t &fr_mm_s, const uint8_t extruder, const float &millimeters=0.0 + static bool buffer_segment(const abce_pos_t &abce + OPTARG(HAS_DIST_MM_ARG, const xyze_float_t &cart_dist_mm) + , const_feedRate_t fr_mm_s, const uint8_t extruder=active_extruder, const_float_t millimeters=0.0 ); - FORCE_INLINE static bool buffer_segment(abce_pos_t &abce - #if HAS_DIST_MM_ARG - , const xyze_float_t &cart_dist_mm - #endif - , const feedRate_t &fr_mm_s, const uint8_t extruder, const float &millimeters=0.0 - ) { - return buffer_segment(abce.a, abce.b, abce.c, abce.e - #if HAS_DIST_MM_ARG - , cart_dist_mm - #endif - , fr_mm_s, extruder, millimeters); - } - public: /** @@ -754,30 +787,16 @@ class Planner { * The target is cartesian. It's translated to * delta/scara if needed. * - * rx,ry,rz,e - target position in mm or degrees + * cart - target position in mm or degrees * fr_mm_s - (target) speed of the move (mm/s) * extruder - target extruder * millimeters - the length of the movement, if known * inv_duration - the reciprocal if the duration of the movement, if known (kinematic only if feeedrate scaling is enabled) */ - static bool buffer_line(const float &rx, const float &ry, const float &rz, const float &e, const feedRate_t &fr_mm_s, const uint8_t extruder, const float millimeters=0.0 - #if ENABLED(SCARA_FEEDRATE_SCALING) - , const float &inv_duration=0.0 - #endif + static bool buffer_line(const xyze_pos_t &cart, const_feedRate_t fr_mm_s, const uint8_t extruder=active_extruder, const float millimeters=0.0 + OPTARG(SCARA_FEEDRATE_SCALING, const_float_t inv_duration=0.0) ); - FORCE_INLINE static bool buffer_line(const xyze_pos_t &cart, const feedRate_t &fr_mm_s, const uint8_t extruder, const float millimeters=0.0 - #if ENABLED(SCARA_FEEDRATE_SCALING) - , const float &inv_duration=0.0 - #endif - ) { - return buffer_line(cart.x, cart.y, cart.z, cart.e, fr_mm_s, extruder, millimeters - #if ENABLED(SCARA_FEEDRATE_SCALING) - , inv_duration - #endif - ); - } - #if ENABLED(DIRECT_STEPPING) static void buffer_page(const page_idx_t page_idx, const uint8_t extruder, const uint16_t num_steps); #endif @@ -795,9 +814,11 @@ class Planner { * * Clears previous speed values. */ - static void set_position_mm(const float &rx, const float &ry, const float &rz, const float &e); - FORCE_INLINE static void set_position_mm(const xyze_pos_t &cart) { set_position_mm(cart.x, cart.y, cart.z, cart.e); } - static void set_e_position_mm(const float &e); + static void set_position_mm(const xyze_pos_t &xyze); + + #if HAS_EXTRUDERS + static void set_e_position_mm(const_float_t e); + #endif /** * Set the planner.position and individual stepper positions. @@ -805,8 +826,7 @@ class Planner { * The supplied position is in machine space, and no additional * conversions are applied. */ - static void set_machine_position_mm(const float &a, const float &b, const float &c, const float &e); - FORCE_INLINE static void set_machine_position_mm(const abce_pos_t &abce) { set_machine_position_mm(abce.a, abce.b, abce.c, abce.e); } + static void set_machine_position_mm(const abce_pos_t &abce); /** * Get an axis position according to stepper position(s) @@ -815,12 +835,11 @@ class Planner { static float get_axis_position_mm(const AxisEnum axis); static inline abce_pos_t get_axis_positions_mm() { - const abce_pos_t out = { - get_axis_position_mm(A_AXIS), - get_axis_position_mm(B_AXIS), - get_axis_position_mm(C_AXIS), - get_axis_position_mm(E_AXIS) - }; + const abce_pos_t out = LOGICAL_AXIS_ARRAY( + get_axis_position_mm(E_AXIS), + get_axis_position_mm(A_AXIS), get_axis_position_mm(B_AXIS), get_axis_position_mm(C_AXIS), + get_axis_position_mm(I_AXIS), get_axis_position_mm(J_AXIS), get_axis_position_mm(K_AXIS) + ); return out; } @@ -833,7 +852,14 @@ class Planner { // a Full Shutdown is required, or when endstops are hit) static void quick_stop(); - // Called when an endstop is triggered. Causes the machine to stop inmediately + #if ENABLED(REALTIME_REPORTING_COMMANDS) + // Force a quick pause of the machine (e.g., when a pause is required in the middle of move). + // NOTE: Hard-stops will lose steps so encoders are highly recommended if using these! + static void quick_pause(); + static void quick_resume(); + #endif + + // Called when an endstop is triggered. Causes the machine to stop immediately static void endstop_triggered(const AxisEnum axis); // Triggered position of an axis in mm (not core-savvy) @@ -845,11 +871,9 @@ class Planner { // Wait for moves to finish and disable all steppers static void finish_and_disable(); - // Periodic tick to handle cleaning timeouts + // Periodic handler to manage the cleaning buffer counter // Called from the Temperature ISR at ~1kHz - static void tick() { - if (cleaning_buffer_counter) --cleaning_buffer_counter; - } + static void isr() { if (cleaning_buffer_counter) --cleaning_buffer_counter; } /** * Does the buffer have any blocks queued? @@ -881,11 +905,12 @@ class Planner { #endif #if ENABLED(AUTOTEMP) - static float autotemp_min, autotemp_max, autotemp_factor; + static celsius_t autotemp_min, autotemp_max; + static float autotemp_factor; static bool autotemp_enabled; - static void getHighESpeed(); - static void autotemp_M104_M109(); static void autotemp_update(); + static void autotemp_M104_M109(); + static void autotemp_task(); #endif #if HAS_LINEAR_E_JERK @@ -898,6 +923,14 @@ class Planner { private: + #if ENABLED(AUTOTEMP) + #if ENABLED(AUTOTEMP_PROPORTIONAL) + static void _autotemp_update_from_hotend(); + #else + static inline void _autotemp_update_from_hotend() {} + #endif + #endif + /** * Get the index of the next / previous block in the ring buffer */ @@ -908,7 +941,7 @@ class Planner { * Calculate the distance (not time) it takes to accelerate * from initial_rate to target_rate using the given acceleration: */ - static float estimate_acceleration_distance(const float &initial_rate, const float &target_rate, const float &accel) { + static float estimate_acceleration_distance(const_float_t initial_rate, const_float_t target_rate, const_float_t accel) { if (accel == 0) return 0; // accel was 0, set acceleration distance to 0 return (sq(target_rate) - sq(initial_rate)) / (accel * 2); } @@ -921,7 +954,7 @@ class Planner { * This is used to compute the intersection point between acceleration and deceleration * in cases where the "trapezoid" has no plateau (i.e., never reaches maximum speed) */ - static float intersection_distance(const float &initial_rate, const float &final_rate, const float &accel, const float &distance) { + static float intersection_distance(const_float_t initial_rate, const_float_t final_rate, const_float_t accel, const_float_t distance) { if (accel == 0) return 0; // accel was 0, set intersection distance to 0 return (accel * 2 * distance - sq(initial_rate) + sq(final_rate)) / (accel * 4); } @@ -931,7 +964,7 @@ class Planner { * to reach 'target_velocity_sqr' using 'acceleration' within a given * 'distance'. */ - static float max_allowable_speed_sqr(const float &accel, const float &target_velocity_sqr, const float &distance) { + static float max_allowable_speed_sqr(const_float_t accel, const_float_t target_velocity_sqr, const_float_t distance) { return target_velocity_sqr - 2 * accel * distance; } @@ -939,15 +972,15 @@ class Planner { /** * Calculate the speed reached given initial speed, acceleration and distance */ - static float final_speed(const float &initial_velocity, const float &accel, const float &distance) { + static float final_speed(const_float_t initial_velocity, const_float_t accel, const_float_t distance) { return SQRT(sq(initial_velocity) + 2 * accel * distance); } #endif - static void calculate_trapezoid_for_block(block_t* const block, const float &entry_factor, const float &exit_factor); + static void calculate_trapezoid_for_block(block_t * const block, const_float_t entry_factor, const_float_t exit_factor); - static void reverse_pass_kernel(block_t* const current, const block_t * const next); - static void forward_pass_kernel(const block_t * const previous, block_t* const current, uint8_t block_index); + static void reverse_pass_kernel(block_t * const current, const block_t * const next); + static void forward_pass_kernel(const block_t * const previous, block_t * const current, uint8_t block_index); static void reverse_pass(); static void forward_pass(); @@ -960,13 +993,13 @@ class Planner { FORCE_INLINE static void normalize_junction_vector(xyze_float_t &vector) { float magnitude_sq = 0; - LOOP_XYZE(idx) if (vector[idx]) magnitude_sq += sq(vector[idx]); + LOOP_LOGICAL_AXES(idx) if (vector[idx]) magnitude_sq += sq(vector[idx]); vector *= RSQRT(magnitude_sq); } - FORCE_INLINE static float limit_value_by_axis_maximum(const float &max_value, xyze_float_t &unit_vec) { + FORCE_INLINE static float limit_value_by_axis_maximum(const_float_t max_value, xyze_float_t &unit_vec) { float limit_value = max_value; - LOOP_XYZE(idx) { + LOOP_LOGICAL_AXES(idx) { if (unit_vec[idx]) { if (limit_value * ABS(unit_vec[idx]) > settings.max_acceleration_mm_per_s2[idx]) limit_value = ABS(settings.max_acceleration_mm_per_s2[idx] / unit_vec[idx]); diff --git a/Marlin/src/module/planner_bezier.cpp b/Marlin/src/module/planner_bezier.cpp index 02d878d5f51a..848906705fa2 100644 --- a/Marlin/src/module/planner_bezier.cpp +++ b/Marlin/src/module/planner_bezier.cpp @@ -43,7 +43,7 @@ #define SIGMA 0.1f // Compute the linear interpolation between two real numbers. -static inline float interp(const float &a, const float &b, const float &t) { return (1 - t) * a + t * b; } +static inline float interp(const_float_t a, const_float_t b, const_float_t t) { return (1 - t) * a + t * b; } /** * Compute a Bézier curve using the De Casteljau's algorithm (see @@ -51,7 +51,7 @@ static inline float interp(const float &a, const float &b, const float &t) { ret * easy to code and has good numerical stability (very important, * since Arudino works with limited precision real numbers). */ -static inline float eval_bezier(const float &a, const float &b, const float &c, const float &d, const float &t) { +static inline float eval_bezier(const_float_t a, const_float_t b, const_float_t c, const_float_t d, const_float_t t) { const float iab = interp(a, b, t), ibc = interp(b, c, t), icd = interp(c, d, t), @@ -64,7 +64,7 @@ static inline float eval_bezier(const float &a, const float &b, const float &c, * We approximate Euclidean distance with the sum of the coordinates * offset (so-called "norm 1"), which is quicker to compute. */ -static inline float dist1(const float &x1, const float &y1, const float &x2, const float &y2) { return ABS(x1 - x2) + ABS(y1 - y2); } +static inline float dist1(const_float_t x1, const_float_t y1, const_float_t x2, const_float_t y2) { return ABS(x1 - x2) + ABS(y1 - y2); } /** * The algorithm for computing the step is loosely based on the one in Kig @@ -109,7 +109,7 @@ void cubic_b_spline( const xyze_pos_t &position, // current position const xyze_pos_t &target, // target position const xy_pos_t (&offsets)[2], // a pair of offsets - const feedRate_t &scaled_fr_mm_s, // mm/s scaled by feedrate % + const_feedRate_t scaled_fr_mm_s, // mm/s scaled by feedrate % const uint8_t extruder ) { // Absolute first and second control points are recovered. @@ -181,11 +181,15 @@ void cubic_b_spline( t = new_t; // Compute and send new position - xyze_pos_t new_bez = { - new_pos0, new_pos1, - interp(position.z, target.z, t), // FIXME. These two are wrong, since the parameter t is - interp(position.e, target.e, t) // not linear in the distance. - }; + xyze_pos_t new_bez = LOGICAL_AXIS_ARRAY( + interp(position.e, target.e, t), // FIXME. Wrong, since t is not linear in the distance. + new_pos0, + new_pos1, + interp(position.z, target.z, t), // FIXME. Wrong, since t is not linear in the distance. + interp(position.i, target.i, t), // FIXME. Wrong, since t is not linear in the distance. + interp(position.j, target.j, t), // FIXME. Wrong, since t is not linear in the distance. + interp(position.k, target.k, t) // FIXME. Wrong, since t is not linear in the distance. + ); apply_motion_limits(new_bez); bez_target = new_bez; diff --git a/Marlin/src/module/planner_bezier.h b/Marlin/src/module/planner_bezier.h index 72048c42739a..eb48cf5e1a86 100644 --- a/Marlin/src/module/planner_bezier.h +++ b/Marlin/src/module/planner_bezier.h @@ -33,6 +33,6 @@ void cubic_b_spline( const xyze_pos_t &position, // current position const xyze_pos_t &target, // target position const xy_pos_t (&offsets)[2], // a pair of offsets - const feedRate_t &scaled_fr_mm_s, // mm/s scaled by feedrate % + const_feedRate_t scaled_fr_mm_s, // mm/s scaled by feedrate % const uint8_t extruder ); diff --git a/Marlin/src/module/polargraph.cpp b/Marlin/src/module/polargraph.cpp new file mode 100644 index 000000000000..b7eeeee8af5d --- /dev/null +++ b/Marlin/src/module/polargraph.cpp @@ -0,0 +1,47 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +/** + * polargraph.cpp + */ + +#include "../inc/MarlinConfig.h" + +#if ENABLED(POLARGRAPH) + +#include "polargraph.h" +#include "motion.h" + +// For homing: +#include "planner.h" +#include "endstops.h" +#include "../lcd/marlinui.h" +#include "../MarlinCore.h" + +float segments_per_second; // Initialized by settings.load() + +void inverse_kinematics(const xyz_pos_t &raw) { + const float x1 = raw.x - (X_MIN_POS), x2 = (X_MAX_POS) - raw.x, y = raw.y - (Y_MAX_POS); + delta.set(HYPOT(x1, y), HYPOT(x2, y), raw.z); +} + +#endif // POLARGRAPH diff --git a/Marlin/src/module/polargraph.h b/Marlin/src/module/polargraph.h new file mode 100644 index 000000000000..040603425334 --- /dev/null +++ b/Marlin/src/module/polargraph.h @@ -0,0 +1,33 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * polargraph.h - Polargraph-specific functions + */ + +#include "../core/types.h" +#include "../core/macros.h" + +extern float segments_per_second; + +void inverse_kinematics(const xyz_pos_t &raw); diff --git a/Marlin/src/module/printcounter.cpp b/Marlin/src/module/printcounter.cpp index 45072c8f0189..27dee76715d4 100644 --- a/Marlin/src/module/printcounter.cpp +++ b/Marlin/src/module/printcounter.cpp @@ -43,6 +43,7 @@ Stopwatch print_job_timer; // Global Print Job Timer instance #if PRINTCOUNTER_SYNC #include "../module/planner.h" + #warning "To prevent step loss, motion will pause for PRINTCOUNTER auto-save." #endif // Service intervals @@ -118,7 +119,7 @@ void PrintCounter::initStats() { inline bool _service_warn(const char * const msg) { _print_divider(); SERIAL_ECHO_START(); - serialprintPGM(msg); + SERIAL_ECHOPGM_P(msg); SERIAL_ECHOLNPGM("!"); _print_divider(); return true; @@ -177,8 +178,8 @@ void PrintCounter::saveStats() { #if HAS_SERVICE_INTERVALS inline void _service_when(char buffer[], const char * const msg, const uint32_t when) { SERIAL_ECHOPGM(STR_STATS); - serialprintPGM(msg); - SERIAL_ECHOLNPAIR(" in ", duration_t(when).toString(buffer)); + SERIAL_ECHOPGM_P(msg); + SERIAL_ECHOLNPGM(" in ", duration_t(when).toString(buffer)); } #endif @@ -186,7 +187,7 @@ void PrintCounter::showStats() { char buffer[22]; SERIAL_ECHOPGM(STR_STATS); - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( "Prints: ", data.totalPrints, ", Finished: ", data.finishedPrints, ", Failed: ", data.totalPrints - data.finishedPrints @@ -196,21 +197,21 @@ void PrintCounter::showStats() { SERIAL_ECHOPGM(STR_STATS); duration_t elapsed = data.printTime; elapsed.toString(buffer); - SERIAL_ECHOPAIR("Total time: ", buffer); + SERIAL_ECHOPGM("Total time: ", buffer); #if ENABLED(DEBUG_PRINTCOUNTER) - SERIAL_ECHOPAIR(" (", data.printTime); + SERIAL_ECHOPGM(" (", data.printTime); SERIAL_CHAR(')'); #endif elapsed = data.longestPrint; elapsed.toString(buffer); - SERIAL_ECHOPAIR(", Longest job: ", buffer); + SERIAL_ECHOPGM(", Longest job: ", buffer); #if ENABLED(DEBUG_PRINTCOUNTER) - SERIAL_ECHOPAIR(" (", data.longestPrint); + SERIAL_ECHOPGM(" (", data.longestPrint); SERIAL_CHAR(')'); #endif - SERIAL_ECHOPAIR("\n" STR_STATS "Filament used: ", data.filamentUsed / 1000); + SERIAL_ECHOPGM("\n" STR_STATS "Filament used: ", data.filamentUsed / 1000); SERIAL_CHAR('m'); SERIAL_EOL(); @@ -318,6 +319,7 @@ void PrintCounter::reset() { } bool PrintCounter::needsService(const int index) { + if (!loaded) loadStats(); switch (index) { #if SERVICE_INTERVAL_1 > 0 case 1: return data.nextService1 == 0; @@ -339,7 +341,7 @@ void PrintCounter::reset() { void PrintCounter::debug(const char func[]) { if (DEBUGGING(INFO)) { SERIAL_ECHOPGM("PrintCounter::"); - serialprintPGM(func); + SERIAL_ECHOPGM_P(func); SERIAL_ECHOLNPGM("()"); } } diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 94c409eb721f..638bb6be817a 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -48,8 +48,17 @@ #include "delta.h" #endif -#if ENABLED(BABYSTEP_ZPROBE_OFFSET) - #include "planner.h" +#if ANY(HAS_QUIET_PROBING, USE_SENSORLESS) + #include "stepper/indirection.h" + #if BOTH(HAS_QUIET_PROBING, PROBING_ESTEPPERS_OFF) + #include "stepper.h" + #endif + #if USE_SENSORLESS + #include "../feature/tmc_util.h" + #if ENABLED(IMPROVE_HOMING_RELIABILITY) + #include "planner.h" + #endif + #endif #endif #if ENABLED(MEASURE_BACKLASH_WHEN_PROBING) @@ -68,17 +77,10 @@ #include "servo.h" #endif -#if ENABLED(SENSORLESS_PROBING) - #include "stepper.h" - #include "../feature/tmc_util.h" -#endif - -#if HAS_QUIET_PROBING - #include "stepper/indirection.h" -#endif - #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif #define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) @@ -92,6 +94,10 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() const xy_pos_t &Probe::offset_xy = Probe::offset; #endif +#if ENABLED(SENSORLESS_PROBING) + Probe::sense_bool_t Probe::test_sensitivity; +#endif + #if ENABLED(Z_PROBE_SLED) #ifndef SLED_DOCKING_OFFSET @@ -105,7 +111,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() * If true, move to MAX_X and release the solenoid */ static void dock_sled(const bool stow) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("dock_sled(", stow, ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("dock_sled(", stow, ")"); // Dock sled a bit closer to ensure proper capturing do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET - ((stow) ? 1 : 0)); @@ -135,7 +141,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() ui.return_to_status(); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Deploy TouchMI"), CONTINUE_STR)); - wait_for_user_response(); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.reset_status(); ui.goto_screen(prev_screen); @@ -238,20 +244,28 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() #if HAS_QUIET_PROBING - void Probe::set_probing_paused(const bool p) { - TERN_(PROBING_HEATERS_OFF, thermalManager.pause(p)); - TERN_(PROBING_FANS_OFF, thermalManager.set_fans_paused(p)); - #if ENABLED(PROBING_STEPPERS_OFF) - disable_e_steppers(); - #if NONE(DELTA, HOME_AFTER_DEACTIVATE) - DISABLE_AXIS_X(); DISABLE_AXIS_Y(); - #endif + #ifndef DELAY_BEFORE_PROBING + #define DELAY_BEFORE_PROBING 25 + #endif + + void Probe::set_probing_paused(const bool dopause) { + TERN_(PROBING_HEATERS_OFF, thermalManager.pause_heaters(dopause)); + TERN_(PROBING_FANS_OFF, thermalManager.set_fans_paused(dopause)); + TERN_(PROBING_ESTEPPERS_OFF, if (dopause) stepper.disable_e_steppers()); + #if ENABLED(PROBING_STEPPERS_OFF) && DISABLED(DELTA) + static uint8_t old_trusted; + if (dopause) { + old_trusted = axis_trusted; + stepper.disable_axis(X_AXIS); + stepper.disable_axis(Y_AXIS); + } + else { + if (TEST(old_trusted, X_AXIS)) stepper.enable_axis(X_AXIS); + if (TEST(old_trusted, Y_AXIS)) stepper.enable_axis(Y_AXIS); + axis_trusted = old_trusted; + } #endif - if (p) safe_delay(25 - #if DELAY_BEFORE_PROBING > 25 - - 25 + DELAY_BEFORE_PROBING - #endif - ); + if (dopause) safe_delay(_MAX(DELAY_BEFORE_PROBING, 25)); } #endif // HAS_QUIET_PROBING @@ -260,7 +274,7 @@ xyz_pos_t Probe::offset; // Initialized by settings.load() * Raise Z to a minimum height to make room for a probe to move */ void Probe::do_z_raise(const float z_raise) { - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("Probe::do_z_raise(", z_raise, ")"); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe::do_z_raise(", z_raise, ")"); float z_dest = z_raise; if (offset.z < 0) z_dest -= offset.z; do_z_clearance(z_dest); @@ -270,7 +284,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #if ENABLED(PAUSE_BEFORE_DEPLOY_STOW) do { #if ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED) - if (deploy == PROBE_TRIGGERED()) break; + if (deploy != PROBE_TRIGGERED()) break; #endif BUZZ(100, 659); @@ -279,13 +293,12 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { PGM_P const ds_str = deploy ? GET_TEXT(MSG_MANUAL_DEPLOY) : GET_TEXT(MSG_MANUAL_STOW); ui.return_to_status(); // To display the new status message ui.set_status_P(ds_str, 99); - serialprintPGM(ds_str); - SERIAL_EOL(); + SERIAL_ECHOLNPGM_P(ds_str); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, PSTR("Stow Probe"), CONTINUE_STR)); TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Stow Probe"))); - - wait_for_user_response(); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Popup_Confirm(ICON_BLTouch, PSTR("Stow Probe"), CONTINUE_STR)); + TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.reset_status(); } while (ENABLED(PAUSE_PROBE_DEPLOY_WHEN_TRIGGERED)); @@ -327,30 +340,53 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { #if EITHER(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING) + #if ENABLED(PREHEAT_BEFORE_PROBING) + #ifndef PROBING_NOZZLE_TEMP + #define PROBING_NOZZLE_TEMP 0 + #endif + #ifndef PROBING_BED_TEMP + #define PROBING_BED_TEMP 0 + #endif + #endif + /** - * Do preheating as required before leveling or probing + * Do preheating as required before leveling or probing. + * - If a preheat input is higher than the current target, raise the target temperature. + * - If a preheat input is higher than the current temperature, wait for stabilization. */ - void Probe::preheat_for_probing(const uint16_t hotend_temp, const uint16_t bed_temp) { - #if PROBING_NOZZLE_TEMP || LEVELING_NOZZLE_TEMP + void Probe::preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp) { + #if HAS_HOTEND && (PROBING_NOZZLE_TEMP || LEVELING_NOZZLE_TEMP) #define WAIT_FOR_NOZZLE_HEAT #endif - #if PROBING_BED_TEMP || LEVELING_BED_TEMP + #if HAS_HEATED_BED && (PROBING_BED_TEMP || LEVELING_BED_TEMP) #define WAIT_FOR_BED_HEAT #endif - const uint16_t hotendPreheat = TERN0(WAIT_FOR_NOZZLE_HEAT, thermalManager.degHotend(0) < hotend_temp) ? hotend_temp : 0, - bedPreheat = TERN0(WAIT_FOR_BED_HEAT, thermalManager.degBed() < bed_temp) ? bed_temp : 0; + DEBUG_ECHOPGM("Preheating "); - if (hotendPreheat) { - DEBUG_ECHOPAIR("hotend (", hotendPreheat, ") "); - if (bedPreheat) DEBUG_ECHOPGM("and "); - } - if (bedPreheat) DEBUG_ECHOPAIR("bed (", bedPreheat, ") "); + + #if ENABLED(WAIT_FOR_NOZZLE_HEAT) + const celsius_t hotendPreheat = hotend_temp > thermalManager.degTargetHotend(0) ? hotend_temp : 0; + if (hotendPreheat) { + DEBUG_ECHOPGM("hotend (", hotendPreheat, ")"); + thermalManager.setTargetHotend(hotendPreheat, 0); + } + #elif ENABLED(WAIT_FOR_BED_HEAT) + constexpr celsius_t hotendPreheat = 0; + #endif + + #if ENABLED(WAIT_FOR_BED_HEAT) + const celsius_t bedPreheat = bed_temp > thermalManager.degTargetBed() ? bed_temp : 0; + if (bedPreheat) { + if (hotendPreheat) DEBUG_ECHOPGM(" and "); + DEBUG_ECHOPGM("bed (", bedPreheat, ")"); + thermalManager.setTargetBed(bedPreheat); + } + #endif + DEBUG_EOL(); - TERN_(WAIT_FOR_NOZZLE_HEAT, if (hotendPreheat) thermalManager.setTargetHotend(hotendPreheat, 0)); - TERN_(WAIT_FOR_BED_HEAT, if (bedPreheat) thermalManager.setTargetBed(bedPreheat)); - TERN_(WAIT_FOR_NOZZLE_HEAT, if (hotendPreheat) thermalManager.wait_for_hotend(0)); - TERN_(WAIT_FOR_BED_HEAT, if (bedPreheat) thermalManager.wait_for_bed_heating()); + TERN_(WAIT_FOR_NOZZLE_HEAT, if (hotend_temp > thermalManager.wholeDegHotend(0) + (TEMP_WINDOW)) thermalManager.wait_for_hotend(0)); + TERN_(WAIT_FOR_BED_HEAT, if (bed_temp > thermalManager.wholeDegBed() + (TEMP_BED_WINDOW)) thermalManager.wait_for_bed_heating()); } #endif @@ -364,7 +400,7 @@ bool Probe::set_deployed(const bool deploy) { if (DEBUGGING(LEVELING)) { DEBUG_POS("Probe::set_deployed", current_position); - DEBUG_ECHOLNPAIR("deploy: ", deploy); + DEBUG_ECHOLNPGM("deploy: ", deploy); } if (endstops.z_probe_enabled == deploy) return false; @@ -378,14 +414,7 @@ bool Probe::set_deployed(const bool deploy) { constexpr bool z_raise_wanted = true; #endif - // For beds that fall when Z is powered off only raise for trusted Z - #if ENABLED(UNKNOWN_Z_NO_RAISE) - const bool z_is_trusted = axis_is_trusted(Z_AXIS); - #else - constexpr float z_is_trusted = true; - #endif - - if (z_is_trusted && z_raise_wanted) + if (z_raise_wanted) do_z_raise(_MAX(Z_CLEARANCE_BETWEEN_PROBES, Z_CLEARANCE_DEPLOY_PROBE)); #if EITHER(Z_PROBE_SLED, Z_PROBE_ALLEN_KEY) @@ -448,24 +477,29 @@ bool Probe::set_deployed(const bool deploy) { * * @return TRUE if the probe failed to trigger. */ -bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) { +bool Probe::probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s) { DEBUG_SECTION(log_probe, "Probe::probe_down_to_z", DEBUGGING(LEVELING)); #if BOTH(HAS_HEATED_BED, WAIT_FOR_BED_HEATER) thermalManager.wait_for_bed_heating(); #endif + #if BOTH(HAS_TEMP_HOTEND, WAIT_FOR_HOTEND) + thermalManager.wait_for_hotend_heating(active_extruder); + #endif + if (TERN0(BLTOUCH_SLOW_MODE, bltouch.deploy())) return true; // Deploy in LOW SPEED MODE on every probe action // Disable stealthChop if used. Enable diag1 pin on driver. #if ENABLED(SENSORLESS_PROBING) sensorless_t stealth_states { false }; - #if ENABLED(DELTA) - stealth_states.x = tmc_enable_stallguard(stepperX); - stealth_states.y = tmc_enable_stallguard(stepperY); + #if HAS_DELTA_SENSORLESS_PROBING + if (probe.test_sensitivity.x) stealth_states.x = tmc_enable_stallguard(stepperX); // Delta watches all DIAG pins for a stall + if (probe.test_sensitivity.y) stealth_states.y = tmc_enable_stallguard(stepperY); #endif - stealth_states.z = tmc_enable_stallguard(stepperZ); + if (probe.test_sensitivity.z) stealth_states.z = tmc_enable_stallguard(stepperZ); // All machines will check Z-DIAG for stall endstops.enable(true); + set_homing_current(true); // The "homing" current also applies to probing #endif TERN_(HAS_QUIET_PROBING, set_probing_paused(true)); @@ -475,10 +509,10 @@ bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) { // Check to see if the probe was triggered const bool probe_triggered = - #if BOTH(DELTA, SENSORLESS_PROBING) - endstops.trigger_state() & (_BV(X_MIN) | _BV(Y_MIN) | _BV(Z_MIN)) + #if HAS_DELTA_SENSORLESS_PROBING + endstops.trigger_state() & (_BV(X_MAX) | _BV(Y_MAX) | _BV(Z_MAX)) #else - TEST(endstops.trigger_state(), TERN(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, Z_MIN, Z_MIN_PROBE)) + TEST(endstops.trigger_state(), Z_MIN_PROBE) #endif ; @@ -487,11 +521,12 @@ bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) { // Re-enable stealthChop if used. Disable diag1 pin on driver. #if ENABLED(SENSORLESS_PROBING) endstops.not_homing(); - #if ENABLED(DELTA) - tmc_disable_stallguard(stepperX, stealth_states.x); - tmc_disable_stallguard(stepperY, stealth_states.y); + #if HAS_DELTA_SENSORLESS_PROBING + if (probe.test_sensitivity.x) tmc_disable_stallguard(stepperX, stealth_states.x); + if (probe.test_sensitivity.y) tmc_disable_stallguard(stepperY, stealth_states.y); #endif - tmc_disable_stallguard(stepperZ, stealth_states.z); + if (probe.test_sensitivity.z) tmc_disable_stallguard(stepperZ, stealth_states.z); + set_homing_current(false); #endif if (probe_triggered && TERN0(BLTOUCH_SLOW_MODE, bltouch.stow())) // Stow in LOW SPEED MODE on every trigger @@ -557,7 +592,7 @@ bool Probe::probe_down_to_z(const float z, const feedRate_t fr_mm_s) { float Probe::run_z_probe(const bool sanity_check/*=true*/) { DEBUG_SECTION(log_probe, "Probe::run_z_probe", DEBUGGING(LEVELING)); - auto try_to_probe = [&](PGM_P const plbl, const float &z_probe_low_point, const feedRate_t fr_mm_s, const bool scheck, const float clearance) -> bool { + auto try_to_probe = [&](PGM_P const plbl, const_float_t z_probe_low_point, const feedRate_t fr_mm_s, const bool scheck, const float clearance) -> bool { // Tare the probe, if supported if (TERN0(PROBE_TARE, tare())) return true; @@ -566,7 +601,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { early_fail = (scheck && current_position.z > -offset.z + clearance); // Probe triggered too high? #if ENABLED(DEBUG_LEVELING_FEATURE) if (DEBUGGING(LEVELING) && (probe_fail || early_fail)) { - DEBUG_PRINT_P(plbl); + DEBUG_ECHOPGM_P(plbl); DEBUG_ECHOPGM(" Probe fail! -"); if (probe_fail) DEBUG_ECHOPGM(" No trigger."); if (early_fail) DEBUG_ECHOPGM(" Triggered early."); @@ -594,12 +629,12 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { const float first_probe_z = current_position.z; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("1st Probe Z:", first_probe_z); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("1st Probe Z:", first_probe_z); // Raise to give the probe clearance do_blocking_move_to_z(current_position.z + Z_CLEARANCE_MULTI_PROBE, z_probe_fast_mm_s); - #elif Z_PROBE_SPEED_FAST != Z_PROBE_SPEED_SLOW + #elif Z_PROBE_FEEDRATE_FAST != Z_PROBE_FEEDRATE_SLOW // If the nozzle is well over the travel height then // move down quickly before doing the slow probe @@ -630,7 +665,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { if (TERN0(PROBE_TARE, tare())) return true; // Probe downward slowly to find the bed - if (try_to_probe(PSTR("SLOW"), z_probe_low_point, MMM_TO_MMS(Z_PROBE_SPEED_SLOW), + if (try_to_probe(PSTR("SLOW"), z_probe_low_point, MMM_TO_MMS(Z_PROBE_FEEDRATE_SLOW), sanity_check, Z_CLEARANCE_MULTI_PROBE) ) return NAN; TERN_(MEASURE_BACKLASH_WHEN_PROBING, backlash.measure_with_probe()); @@ -688,7 +723,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { const float z2 = current_position.z; - if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR("2nd Probe Z:", z2, " Discrepancy:", first_probe_z - z2); + if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("2nd Probe Z:", z2, " Discrepancy:", first_probe_z - z2); // Return a weighted average of the fast and slow probes const float measured_z = (z2 * 3.0 + first_probe_z * 2.0) * 0.2; @@ -712,14 +747,14 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/) { * - Raise to the BETWEEN height * - Return the probed Z position */ -float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_after/*=PROBE_PT_NONE*/, const uint8_t verbose_level/*=0*/, const bool probe_relative/*=true*/, const bool sanity_check/*=true*/) { +float Probe::probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRaise raise_after/*=PROBE_PT_NONE*/, const uint8_t verbose_level/*=0*/, const bool probe_relative/*=true*/, const bool sanity_check/*=true*/) { DEBUG_SECTION(log_probe, "Probe::probe_at_point", DEBUGGING(LEVELING)); if (DEBUGGING(LEVELING)) { - DEBUG_ECHOLNPAIR( + DEBUG_ECHOLNPGM( "...(", LOGICAL_X_POSITION(rx), ", ", LOGICAL_Y_POSITION(ry), - ", ", raise_after == PROBE_PT_RAISE ? "raise" : raise_after == PROBE_PT_STOW ? "stow" : "none", - ", ", int(verbose_level), + ", ", raise_after == PROBE_PT_RAISE ? "raise" : raise_after == PROBE_PT_LAST_STOW ? "stow (last)" : raise_after == PROBE_PT_STOW ? "stow" : "none", + ", ", verbose_level, ", ", probe_relative ? "probe" : "nozzle", "_relative)" ); DEBUG_POS("", current_position); @@ -730,7 +765,7 @@ float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise #endif // On delta keep Z below clip height or do_blocking_move_to will abort - xyz_pos_t npos = { rx, ry, _MIN(TERN(DELTA, delta_clip_start_height, current_position.z), current_position.z) }; + xyz_pos_t npos = { rx, ry, TERN(DELTA, _MIN(delta_clip_start_height, current_position.z), current_position.z) }; if (probe_relative) { // The given position is in terms of the probe if (!can_reach(npos)) { if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Position Not Reachable"); @@ -749,11 +784,11 @@ float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise const bool big_raise = raise_after == PROBE_PT_BIG_RAISE; if (big_raise || raise_after == PROBE_PT_RAISE) do_blocking_move_to_z(current_position.z + (big_raise ? 25 : Z_CLEARANCE_BETWEEN_PROBES), z_probe_fast_mm_s); - else if (raise_after == PROBE_PT_STOW) + else if (raise_after == PROBE_PT_STOW || raise_after == PROBE_PT_LAST_STOW) if (stow()) measured_z = NAN; // Error on stow? if (verbose_level > 2) - SERIAL_ECHOLNPAIR("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z); + SERIAL_ECHOLNPGM("Bed X: ", LOGICAL_X_POSITION(rx), " Y: ", LOGICAL_Y_POSITION(ry), " Z: ", measured_z); } if (isnan(measured_z)) { @@ -783,4 +818,95 @@ float Probe::probe_at_point(const float &rx, const float &ry, const ProbePtRaise #endif // HAS_Z_SERVO_PROBE +#if USE_SENSORLESS + + sensorless_t stealth_states { false }; + + /** + * Disable stealthChop if used. Enable diag1 pin on driver. + */ + void Probe::enable_stallguard_diag1() { + #if ENABLED(SENSORLESS_PROBING) + #if HAS_DELTA_SENSORLESS_PROBING + stealth_states.x = tmc_enable_stallguard(stepperX); + stealth_states.y = tmc_enable_stallguard(stepperY); + #endif + stealth_states.z = tmc_enable_stallguard(stepperZ); + endstops.enable(true); + #endif + } + + /** + * Re-enable stealthChop if used. Disable diag1 pin on driver. + */ + void Probe::disable_stallguard_diag1() { + #if ENABLED(SENSORLESS_PROBING) + endstops.not_homing(); + #if HAS_DELTA_SENSORLESS_PROBING + tmc_disable_stallguard(stepperX, stealth_states.x); + tmc_disable_stallguard(stepperY, stealth_states.y); + #endif + tmc_disable_stallguard(stepperZ, stealth_states.z); + #endif + } + + /** + * Change the current in the TMC drivers to N##_CURRENT_HOME. And we save the current configuration of each TMC driver. + */ + void Probe::set_homing_current(const bool onoff) { + #define HAS_CURRENT_HOME(N) (defined(N##_CURRENT_HOME) && N##_CURRENT_HOME != N##_CURRENT) + #if HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(Y) || HAS_CURRENT_HOME(Z) + #if ENABLED(DELTA) + static int16_t saved_current_X, saved_current_Y; + #endif + #if HAS_CURRENT_HOME(Z) + static int16_t saved_current_Z; + #endif + #if ((ENABLED(DELTA) && (HAS_CURRENT_HOME(X) || HAS_CURRENT_HOME(Y))) || HAS_CURRENT_HOME(Z)) + auto debug_current_on = [](PGM_P const s, const int16_t a, const int16_t b) { + if (DEBUGGING(LEVELING)) { DEBUG_ECHOPGM_P(s); DEBUG_ECHOLNPGM(" current: ", a, " -> ", b); } + }; + #endif + if (onoff) { + #if ENABLED(DELTA) + #if HAS_CURRENT_HOME(X) + saved_current_X = stepperX.getMilliamps(); + stepperX.rms_current(X_CURRENT_HOME); + debug_current_on(PSTR("X"), saved_current_X, X_CURRENT_HOME); + #endif + #if HAS_CURRENT_HOME(Y) + saved_current_Y = stepperY.getMilliamps(); + stepperY.rms_current(Y_CURRENT_HOME); + debug_current_on(PSTR("Y"), saved_current_Y, Y_CURRENT_HOME); + #endif + #endif + #if HAS_CURRENT_HOME(Z) + saved_current_Z = stepperZ.getMilliamps(); + stepperZ.rms_current(Z_CURRENT_HOME); + debug_current_on(PSTR("Z"), saved_current_Z, Z_CURRENT_HOME); + #endif + TERN_(IMPROVE_HOMING_RELIABILITY, planner.enable_stall_prevention(true)); + } + else { + #if ENABLED(DELTA) + #if HAS_CURRENT_HOME(X) + stepperX.rms_current(saved_current_X); + debug_current_on(PSTR("X"), X_CURRENT_HOME, saved_current_X); + #endif + #if HAS_CURRENT_HOME(Y) + stepperY.rms_current(saved_current_Y); + debug_current_on(PSTR("Y"), Y_CURRENT_HOME, saved_current_Y); + #endif + #endif + #if HAS_CURRENT_HOME(Z) + stepperZ.rms_current(saved_current_Z); + debug_current_on(PSTR("Z"), Z_CURRENT_HOME, saved_current_Z); + #endif + TERN_(IMPROVE_HOMING_RELIABILITY, planner.enable_stall_prevention(false)); + } + #endif + } + +#endif // SENSORLESS_PROBING || SENSORLESS_HOMING + #endif // HAS_BED_PROBE diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index d28cdff53a8e..f9275ba9fdc4 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -33,26 +33,41 @@ enum ProbePtRaise : uint8_t { PROBE_PT_NONE, // No raise or stow after run_z_probe PROBE_PT_STOW, // Do a complete stow after run_z_probe + PROBE_PT_LAST_STOW, // Stow for sure, even in BLTouch HS mode PROBE_PT_RAISE, // Raise to "between" clearance after run_z_probe PROBE_PT_BIG_RAISE // Raise to big clearance after run_z_probe }; #endif -#if HAS_CUSTOM_PROBE_PIN +#if USES_Z_MIN_PROBE_PIN #define PROBE_TRIGGERED() (READ(Z_MIN_PROBE_PIN) != Z_MIN_PROBE_ENDSTOP_INVERTING) #else #define PROBE_TRIGGERED() (READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING) #endif +#if ENABLED(PREHEAT_BEFORE_LEVELING) + #ifndef LEVELING_NOZZLE_TEMP + #define LEVELING_NOZZLE_TEMP 0 + #endif + #ifndef LEVELING_BED_TEMP + #define LEVELING_BED_TEMP 0 + #endif +#endif + class Probe { public: + #if ENABLED(SENSORLESS_PROBING) + typedef struct { bool x:1, y:1, z:1; } sense_bool_t; + static sense_bool_t test_sensitivity; + #endif + #if HAS_BED_PROBE static xyz_pos_t offset; #if EITHER(PREHEAT_BEFORE_PROBING, PREHEAT_BEFORE_LEVELING) - static void preheat_for_probing(const uint16_t hotend_temp, const uint16_t bed_temp); + static void preheat_for_probing(const celsius_t hotend_temp, const celsius_t bed_temp); #endif static bool set_deployed(const bool deploy); @@ -62,12 +77,12 @@ class Probe { #if HAS_PROBE_XY_OFFSET // Return true if the both nozzle and the probe can reach the given point. // Note: This won't work on SCARA since the probe offset rotates with the arm. - static bool can_reach(const float &rx, const float &ry) { + static bool can_reach(const_float_t rx, const_float_t ry) { return position_is_reachable(rx - offset_xy.x, ry - offset_xy.y) // The nozzle can go where it needs to go? && position_is_reachable(rx, ry, ABS(PROBING_MARGIN)); // Can the nozzle also go near there? } #else - static bool can_reach(const float &rx, const float &ry) { + static bool can_reach(const_float_t rx, const_float_t ry) { return position_is_reachable(rx, ry, PROBING_MARGIN); } #endif @@ -81,37 +96,37 @@ class Probe { * Example: For a probe offset of -10,+10, then for the probe to reach 0,0 the * nozzle must be be able to reach +10,-10. */ - static bool can_reach(const float &rx, const float &ry) { + static bool can_reach(const_float_t rx, const_float_t ry) { return position_is_reachable(rx - offset_xy.x, ry - offset_xy.y) - && WITHIN(rx, min_x() - fslop, max_x() + fslop) - && WITHIN(ry, min_y() - fslop, max_y() + fslop); + && COORDINATE_OKAY(rx, min_x() - fslop, max_x() + fslop) + && COORDINATE_OKAY(ry, min_y() - fslop, max_y() + fslop); } #endif static void move_z_after_probing() { #ifdef Z_AFTER_PROBING - do_z_clearance(Z_AFTER_PROBING, true, true, true); // Move down still permitted + do_z_clearance(Z_AFTER_PROBING, true); // Move down still permitted #endif } - static float probe_at_point(const float &rx, const float &ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true); + static float probe_at_point(const_float_t rx, const_float_t ry, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true); static float probe_at_point(const xy_pos_t &pos, const ProbePtRaise raise_after=PROBE_PT_NONE, const uint8_t verbose_level=0, const bool probe_relative=true, const bool sanity_check=true) { return probe_at_point(pos.x, pos.y, raise_after, verbose_level, probe_relative, sanity_check); } #else - static constexpr xyz_pos_t offset = xyz_pos_t({ 0, 0, 0 }); // See #16767 + static constexpr xyz_pos_t offset = xyz_pos_t(LINEAR_AXIS_ARRAY(0, 0, 0, 0, 0, 0)); // See #16767 static bool set_deployed(const bool) { return false; } - static bool can_reach(const float &rx, const float &ry) { return position_is_reachable(rx, ry); } + static bool can_reach(const_float_t rx, const_float_t ry) { return position_is_reachable(rx, ry); } #endif static void move_z_after_homing() { #ifdef Z_AFTER_HOMING - do_z_clearance(Z_AFTER_HOMING, true, true, true); + do_z_clearance(Z_AFTER_HOMING, true); #elif BOTH(Z_AFTER_PROBING, HAS_BED_PROBE) move_z_after_probing(); #endif @@ -176,10 +191,10 @@ class Probe { ); } - static float min_x() { return _min_x() - TERN0(NOZZLE_AS_PROBE, TERN0(HAS_HOME_OFFSET, home_offset.x)); } - static float max_x() { return _max_x() - TERN0(NOZZLE_AS_PROBE, TERN0(HAS_HOME_OFFSET, home_offset.x)); } - static float min_y() { return _min_y() - TERN0(NOZZLE_AS_PROBE, TERN0(HAS_HOME_OFFSET, home_offset.y)); } - static float max_y() { return _max_y() - TERN0(NOZZLE_AS_PROBE, TERN0(HAS_HOME_OFFSET, home_offset.y)); } + static float min_x() { return _min_x() TERN_(NOZZLE_AS_PROBE, TERN_(HAS_HOME_OFFSET, - home_offset.x)); } + static float max_x() { return _max_x() TERN_(NOZZLE_AS_PROBE, TERN_(HAS_HOME_OFFSET, - home_offset.x)); } + static float min_y() { return _min_y() TERN_(NOZZLE_AS_PROBE, TERN_(HAS_HOME_OFFSET, - home_offset.y)); } + static float max_y() { return _max_y() TERN_(NOZZLE_AS_PROBE, TERN_(HAS_HOME_OFFSET, - home_offset.y)); } // constexpr helpers used in build-time static_asserts, relying on default probe offsets. class build_time { @@ -197,8 +212,8 @@ class Probe { #if IS_KINEMATIC return HYPOT2(x, y) <= sq(probe_radius(default_probe_xy_offset)); #else - return WITHIN(x, _min_x(default_probe_xy_offset) - fslop, _max_x(default_probe_xy_offset) + fslop) - && WITHIN(y, _min_y(default_probe_xy_offset) - fslop, _max_y(default_probe_xy_offset) + fslop); + return COORDINATE_OKAY(x, _min_x(default_probe_xy_offset) - fslop, _max_x(default_probe_xy_offset) + fslop) + && COORDINATE_OKAY(y, _min_y(default_probe_xy_offset) - fslop, _max_y(default_probe_xy_offset) + fslop); #endif } @@ -213,20 +228,20 @@ class Probe { #define VALIDATE_PROBE_PT(N) static_assert(Probe::build_time::can_reach(xy_pos_t{PROBE_PT_##N##_X, PROBE_PT_##N##_Y}), \ "PROBE_PT_" STRINGIFY(N) "_(X|Y) is unreachable using default NOZZLE_TO_PROBE_OFFSET and PROBING_MARGIN"); VALIDATE_PROBE_PT(1); VALIDATE_PROBE_PT(2); VALIDATE_PROBE_PT(3); - points[0].set(PROBE_PT_1_X, PROBE_PT_1_Y); - points[1].set(PROBE_PT_2_X, PROBE_PT_2_Y); - points[2].set(PROBE_PT_3_X, PROBE_PT_3_Y); + points[0] = xy_float_t({ PROBE_PT_1_X, PROBE_PT_1_Y }); + points[1] = xy_float_t({ PROBE_PT_2_X, PROBE_PT_2_Y }); + points[2] = xy_float_t({ PROBE_PT_3_X, PROBE_PT_3_Y }); #else #if IS_KINEMATIC constexpr float SIN0 = 0.0, SIN120 = 0.866025, SIN240 = -0.866025, COS0 = 1.0, COS120 = -0.5 , COS240 = -0.5; - points[0].set((X_CENTER) + probe_radius() * COS0, (Y_CENTER) + probe_radius() * SIN0); - points[1].set((X_CENTER) + probe_radius() * COS120, (Y_CENTER) + probe_radius() * SIN120); - points[2].set((X_CENTER) + probe_radius() * COS240, (Y_CENTER) + probe_radius() * SIN240); + points[0] = xy_float_t({ (X_CENTER) + probe_radius() * COS0, (Y_CENTER) + probe_radius() * SIN0 }); + points[1] = xy_float_t({ (X_CENTER) + probe_radius() * COS120, (Y_CENTER) + probe_radius() * SIN120 }); + points[2] = xy_float_t({ (X_CENTER) + probe_radius() * COS240, (Y_CENTER) + probe_radius() * SIN240 }); #else - points[0].set(min_x(), min_y()); - points[1].set(max_x(), min_y()); - points[2].set((min_x() + max_x()) / 2, max_y()); + points[0] = xy_float_t({ min_x(), min_y() }); + points[1] = xy_float_t({ max_x(), min_y() }); + points[2] = xy_float_t({ (min_x() + max_x()) / 2, max_y() }); #endif #endif } @@ -247,8 +262,15 @@ class Probe { static bool tare(); #endif + // Basic functions for Sensorless Homing and Probing + #if USE_SENSORLESS + static void enable_stallguard_diag1(); + static void disable_stallguard_diag1(); + static void set_homing_current(const bool onoff); + #endif + private: - static bool probe_down_to_z(const float z, const feedRate_t fr_mm_s); + static bool probe_down_to_z(const_float_t z, const_feedRate_t fr_mm_s); static void do_z_raise(const float z_raise); static float run_z_probe(const bool sanity_check=true); }; diff --git a/Marlin/src/module/scara.cpp b/Marlin/src/module/scara.cpp index e4b2f0b75c51..2527292e160c 100644 --- a/Marlin/src/module/scara.cpp +++ b/Marlin/src/module/scara.cpp @@ -32,79 +32,74 @@ #include "motion.h" #include "planner.h" -float delta_segments_per_second = SCARA_SEGMENTS_PER_SECOND; - -void scara_set_axis_is_at_home(const AxisEnum axis) { - if (axis == Z_AXIS) - current_position.z = Z_HOME_POS; - else { - - /** - * SCARA homes XY at the same time - */ - xyz_pos_t homeposition; - LOOP_XYZ(i) homeposition[i] = base_home_pos((AxisEnum)i); - - #if ENABLED(MORGAN_SCARA) - // MORGAN_SCARA uses arm angles for AB home position - // SERIAL_ECHOLNPAIR("homeposition A:", homeposition.a, " B:", homeposition.b); - inverse_kinematics(homeposition); - forward_kinematics_SCARA(delta.a, delta.b); - current_position[axis] = cartes[axis]; - #else - // MP_SCARA uses a Cartesian XY home position - // SERIAL_ECHOPGM("homeposition"); - // SERIAL_ECHOLNPAIR_P(SP_X_LBL, homeposition.x, SP_Y_LBL, homeposition.y); - current_position[axis] = homeposition[axis]; - #endif +#if ENABLED(AXEL_TPARA) + #include "endstops.h" + #include "../MarlinCore.h" +#endif + +float segments_per_second = TERN(AXEL_TPARA, TPARA_SEGMENTS_PER_SECOND, SCARA_SEGMENTS_PER_SECOND); + +#if EITHER(MORGAN_SCARA, MP_SCARA) + + static constexpr xy_pos_t scara_offset = { SCARA_OFFSET_X, SCARA_OFFSET_Y }; + + /** + * Morgan SCARA Forward Kinematics. Results in 'cartes'. + * Maths and first version by QHARLEY. + * Integrated into Marlin and slightly restructured by Joachim Cerny. + */ + void forward_kinematics(const_float_t a, const_float_t b) { + const float a_sin = sin(RADIANS(a)) * L1, + a_cos = cos(RADIANS(a)) * L1, + b_sin = sin(RADIANS(SUM_TERN(MP_SCARA, b, a))) * L2, + b_cos = cos(RADIANS(SUM_TERN(MP_SCARA, b, a))) * L2; + + cartes.x = a_cos + b_cos + scara_offset.x; // theta + cartes.y = a_sin + b_sin + scara_offset.y; // phi - // SERIAL_ECHOPGM("Cartesian"); - // SERIAL_ECHOLNPAIR_P(SP_X_LBL, current_position.x, SP_Y_LBL, current_position.y); - update_software_endstops(axis); + /* + DEBUG_ECHOLNPGM( + "SCARA FK Angle a=", a, + " b=", b, + " a_sin=", a_sin, + " a_cos=", a_cos, + " b_sin=", b_sin, + " b_cos=", b_cos + ); + DEBUG_ECHOLNPGM(" cartes (X,Y) = "(cartes.x, ", ", cartes.y, ")"); + //*/ } -} -static constexpr xy_pos_t scara_offset = { SCARA_OFFSET_X, SCARA_OFFSET_Y }; +#endif -/** - * Morgan SCARA Forward Kinematics. Results in 'cartes'. - * Maths and first version by QHARLEY. - * Integrated into Marlin and slightly restructured by Joachim Cerny. - */ -void forward_kinematics_SCARA(const float &a, const float &b) { - - const float a_sin = sin(RADIANS(a)) * L1, - a_cos = cos(RADIANS(a)) * L1, - b_sin = sin(RADIANS(b)) * L2, - b_cos = cos(RADIANS(b)) * L2; - - cartes.set(a_cos + b_cos + scara_offset.x, // theta - a_sin + b_sin + scara_offset.y); // theta+phi - - /* - SERIAL_ECHOLNPAIR( - "SCARA FK Angle a=", a, - " b=", b, - " a_sin=", a_sin, - " a_cos=", a_cos, - " b_sin=", b_sin, - " b_cos=", b_cos - ); - SERIAL_ECHOLNPAIR(" cartes (X,Y) = "(cartes.x, ", ", cartes.y, ")"); - //*/ -} +#if ENABLED(MORGAN_SCARA) -void inverse_kinematics(const xyz_pos_t &raw) { - - #if ENABLED(MORGAN_SCARA) - /** - * Morgan SCARA Inverse Kinematics. Results in 'delta'. - * - * See https://reprap.org/forum/read.php?185,283327 - * - * Maths and first version by QHARLEY. - * Integrated into Marlin and slightly restructured by Joachim Cerny. - */ + void scara_set_axis_is_at_home(const AxisEnum axis) { + if (axis == Z_AXIS) + current_position.z = Z_HOME_POS; + else { + // MORGAN_SCARA uses a Cartesian XY home position + xyz_pos_t homeposition = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS }; + //DEBUG_ECHOLNPGM_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y); + + delta = homeposition; + forward_kinematics(delta.a, delta.b); + current_position[axis] = cartes[axis]; + + //DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y); + update_software_endstops(axis); + } + } + + /** + * Morgan SCARA Inverse Kinematics. Results are stored in 'delta'. + * + * See https://reprap.org/forum/read.php?185,283327 + * + * Maths and first version by QHARLEY. + * Integrated into Marlin and slightly restructured by Joachim Cerny. + */ + void inverse_kinematics(const xyz_pos_t &raw) { float C2, S2, SK1, SK2, THETA, PSI; // Translate SCARA to standard XY with scaling factor @@ -116,6 +111,8 @@ void inverse_kinematics(const xyz_pos_t &raw) { else C2 = (H2 - (L1_2 + L2_2)) / (2.0f * L1 * L2); + LIMIT(C2, -1, 1); + S2 = SQRT(1.0f - sq(C2)); // Unrotated Arm1 plus rotated Arm2 gives the distance from Center to End @@ -130,16 +127,41 @@ void inverse_kinematics(const xyz_pos_t &raw) { // Angle of Arm2 PSI = ATAN2(S2, C2); - delta.set(DEGREES(THETA), DEGREES(THETA + PSI), raw.z); + delta.set(DEGREES(THETA), DEGREES(SUM_TERN(MORGAN_SCARA, PSI, THETA)), raw.z); /* DEBUG_POS("SCARA IK", raw); DEBUG_POS("SCARA IK", delta); - SERIAL_ECHOLNPAIR(" SCARA (x,y) ", sx, ",", sy, " C2=", C2, " S2=", S2, " Theta=", THETA, " Phi=", PHI); + DEBUG_ECHOLNPGM(" SCARA (x,y) ", sx, ",", sy, " C2=", C2, " S2=", S2, " Theta=", THETA, " Psi=", PSI); //*/ + } + +#elif ENABLED(MP_SCARA) + + void scara_set_axis_is_at_home(const AxisEnum axis) { + if (axis == Z_AXIS) + current_position.z = Z_HOME_POS; + else { + // MP_SCARA uses arm angles for AB home position + #ifndef SCARA_OFFSET_THETA1 + #define SCARA_OFFSET_THETA1 12 // degrees + #endif + #ifndef SCARA_OFFSET_THETA2 + #define SCARA_OFFSET_THETA2 131 // degrees + #endif + ab_float_t homeposition = { SCARA_OFFSET_THETA1, SCARA_OFFSET_THETA2 }; + //DEBUG_ECHOLNPGM("homeposition A:", homeposition.a, " B:", homeposition.b); + + inverse_kinematics(homeposition); + forward_kinematics(delta.a, delta.b); + current_position[axis] = cartes[axis]; - #else // MP_SCARA + //DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y); + update_software_endstops(axis); + } + } + void inverse_kinematics(const xyz_pos_t &raw) { const float x = raw.x, y = raw.y, c = HYPOT(x, y), THETA3 = ATAN2(y, x), THETA1 = THETA3 + ACOS((sq(c) + sq(L1) - sq(L2)) / (2.0f * c * L1)), @@ -150,14 +172,137 @@ void inverse_kinematics(const xyz_pos_t &raw) { /* DEBUG_POS("SCARA IK", raw); DEBUG_POS("SCARA IK", delta); - SERIAL_ECHOLNPAIR(" SCARA (x,y) ", x, ",", y," Theta1=", THETA1, " Theta2=", THETA2); + SERIAL_ECHOLNPGM(" SCARA (x,y) ", x, ",", y," Theta1=", THETA1, " Theta2=", THETA2); //*/ + } - #endif // MP_SCARA -} +#elif ENABLED(AXEL_TPARA) + + static constexpr xyz_pos_t robot_offset = { TPARA_OFFSET_X, TPARA_OFFSET_Y, TPARA_OFFSET_Z }; + + void scara_set_axis_is_at_home(const AxisEnum axis) { + if (axis == Z_AXIS) + current_position.z = Z_HOME_POS; + else { + xyz_pos_t homeposition = { X_HOME_POS, Y_HOME_POS, Z_HOME_POS }; + //DEBUG_ECHOLNPGM_P(PSTR("homeposition X"), homeposition.x, SP_Y_LBL, homeposition.y, SP_Z_LBL, homeposition.z); + + inverse_kinematics(homeposition); + forward_kinematics(delta.a, delta.b, delta.c); + current_position[axis] = cartes[axis]; + + //DEBUG_ECHOLNPGM_P(PSTR("Cartesian X"), current_position.x, SP_Y_LBL, current_position.y); + update_software_endstops(axis); + } + } + + // Convert ABC inputs in degrees to XYZ outputs in mm + void forward_kinematics(const_float_t a, const_float_t b, const_float_t c) { + const float w = c - b, + r = L1 * cos(RADIANS(b)) + L2 * sin(RADIANS(w - (90 - b))), + x = r * cos(RADIANS(a)), + y = r * sin(RADIANS(a)), + rho2 = L1_2 + L2_2 - 2.0f * L1 * L2 * cos(RADIANS(w)); + + cartes = robot_offset + xyz_pos_t({ x, y, SQRT(rho2 - sq(x) - sq(y)) }); + } + + // Home YZ together, then X (or all at once). Based on quick_home_xy & home_delta + void home_TPARA() { + // Init the current position of all carriages to 0,0,0 + current_position.reset(); + destination.reset(); + sync_plan_position(); + + // Disable stealthChop if used. Enable diag1 pin on driver. + #if ENABLED(SENSORLESS_HOMING) + TERN_(X_SENSORLESS, sensorless_t stealth_states_x = start_sensorless_homing_per_axis(X_AXIS)); + TERN_(Y_SENSORLESS, sensorless_t stealth_states_y = start_sensorless_homing_per_axis(Y_AXIS)); + TERN_(Z_SENSORLESS, sensorless_t stealth_states_z = start_sensorless_homing_per_axis(Z_AXIS)); + #endif + + //const int x_axis_home_dir = TOOL_X_HOME_DIR(active_extruder); + + //const xy_pos_t pos { max_length(X_AXIS) , max_length(Y_AXIS) }; + //const float mlz = max_length(X_AXIS), + + // Move all carriages together linearly until an endstop is hit. + //do_blocking_move_to_xy_z(pos, mlz, homing_feedrate(Z_AXIS)); + + current_position.x = 0 ; + current_position.y = 0 ; + current_position.z = max_length(Z_AXIS) ; + line_to_current_position(homing_feedrate(Z_AXIS)); + planner.synchronize(); + + // Re-enable stealthChop if used. Disable diag1 pin on driver. + #if ENABLED(SENSORLESS_HOMING) + TERN_(X_SENSORLESS, end_sensorless_homing_per_axis(X_AXIS, stealth_states_x)); + TERN_(Y_SENSORLESS, end_sensorless_homing_per_axis(Y_AXIS, stealth_states_y)); + TERN_(Z_SENSORLESS, end_sensorless_homing_per_axis(Z_AXIS, stealth_states_z)); + #endif + + endstops.validate_homing_move(); + + // At least one motor has reached its endstop. + // Now re-home each motor separately. + homeaxis(A_AXIS); + homeaxis(C_AXIS); + homeaxis(B_AXIS); + + // Set all carriages to their home positions + // Do this here all at once for Delta, because + // XYZ isn't ABC. Applying this per-tower would + // give the impression that they are the same. + LOOP_LINEAR_AXES(i) set_axis_is_at_home((AxisEnum)i); + + sync_plan_position(); + } + + void inverse_kinematics(const xyz_pos_t &raw) { + const xyz_pos_t spos = raw - robot_offset; + + const float RXY = SQRT(HYPOT2(spos.x, spos.y)), + RHO2 = NORMSQ(spos.x, spos.y, spos.z), + //RHO = SQRT(RHO2), + LSS = L1_2 + L2_2, + LM = 2.0f * L1 * L2, + + CG = (LSS - RHO2) / LM, + SG = SQRT(1 - POW(CG, 2)), // Method 2 + K1 = L1 - L2 * CG, + K2 = L2 * SG, + + // Angle of Body Joint + THETA = ATAN2(spos.y, spos.x), + + // Angle of Elbow Joint + //GAMMA = ACOS(CG), + GAMMA = ATAN2(SG, CG), // Method 2 + + // Angle of Shoulder Joint, elevation angle measured from horizontal (r+) + //PHI = asin(spos.z/RHO) + asin(L2 * sin(GAMMA) / RHO), + PHI = ATAN2(spos.z, RXY) + ATAN2(K2, K1), // Method 2 + + // Elbow motor angle measured from horizontal, same frame as shoulder (r+) + PSI = PHI + GAMMA; + + delta.set(DEGREES(THETA), DEGREES(PHI), DEGREES(PSI)); + + //SERIAL_ECHOLNPGM(" SCARA (x,y,z) ", spos.x , ",", spos.y, ",", spos.z, " Rho=", RHO, " Rho2=", RHO2, " Theta=", THETA, " Phi=", PHI, " Psi=", PSI, " Gamma=", GAMMA); + } + +#endif void scara_report_positions() { - SERIAL_ECHOLNPAIR("SCARA Theta:", planner.get_axis_position_degrees(A_AXIS), " Psi+Theta:", planner.get_axis_position_degrees(B_AXIS)); + SERIAL_ECHOLNPGM("SCARA Theta:", planner.get_axis_position_degrees(A_AXIS) + #if ENABLED(AXEL_TPARA) + , " Phi:", planner.get_axis_position_degrees(B_AXIS) + , " Psi:", planner.get_axis_position_degrees(C_AXIS) + #else + , " Psi" TERN_(MORGAN_SCARA, "+Theta") ":", planner.get_axis_position_degrees(B_AXIS) + #endif + ); SERIAL_EOL(); } diff --git a/Marlin/src/module/scara.h b/Marlin/src/module/scara.h index e2acaf30822c..8ce50e55e116 100644 --- a/Marlin/src/module/scara.h +++ b/Marlin/src/module/scara.h @@ -27,16 +27,27 @@ #include "../core/macros.h" -extern float delta_segments_per_second; +extern float segments_per_second; -// Float constants for SCARA calculations -float constexpr L1 = SCARA_LINKAGE_1, L2 = SCARA_LINKAGE_2, - L1_2 = sq(float(L1)), L1_2_2 = 2.0 * L1_2, - L2_2 = sq(float(L2)); +#if ENABLED(AXEL_TPARA) -void scara_set_axis_is_at_home(const AxisEnum axis); + float constexpr L1 = TPARA_LINKAGE_1, L2 = TPARA_LINKAGE_2, // Float constants for Robot arm calculations + L1_2 = sq(float(L1)), L1_2_2 = 2.0 * L1_2, + L2_2 = sq(float(L2)); -void inverse_kinematics(const xyz_pos_t &raw); -void forward_kinematics_SCARA(const float &a, const float &b); + void forward_kinematics(const_float_t a, const_float_t b, const_float_t c); + void home_TPARA(); + +#else + + float constexpr L1 = SCARA_LINKAGE_1, L2 = SCARA_LINKAGE_2, // Float constants for SCARA calculations + L1_2 = sq(float(L1)), L1_2_2 = 2.0 * L1_2, + L2_2 = sq(float(L2)); + void forward_kinematics(const_float_t a, const_float_t b); + +#endif + +void inverse_kinematics(const xyz_pos_t &raw); +void scara_set_axis_is_at_home(const AxisEnum axis); void scara_report_positions(); diff --git a/Marlin/src/module/servo.cpp b/Marlin/src/module/servo.cpp index 27e5a2af2e03..231efe84e1f2 100644 --- a/Marlin/src/module/servo.cpp +++ b/Marlin/src/module/servo.cpp @@ -32,24 +32,26 @@ HAL_SERVO_LIB servo[NUM_SERVOS]; -TERN_(EDITABLE_SERVO_ANGLES, uint16_t servo_angles[NUM_SERVOS][2]); +#if ENABLED(EDITABLE_SERVO_ANGLES) + uint16_t servo_angles[NUM_SERVOS][2]; +#endif void servo_init() { #if NUM_SERVOS >= 1 && HAS_SERVO_0 servo[0].attach(SERVO0_PIN); - servo[0].detach(); // Just set up the pin. We don't have a position yet. Don't move to a random position. + DETACH_SERVO(0); // Just set up the pin. We don't have a position yet. Don't move to a random position. #endif #if NUM_SERVOS >= 2 && HAS_SERVO_1 servo[1].attach(SERVO1_PIN); - servo[1].detach(); + DETACH_SERVO(1); #endif #if NUM_SERVOS >= 3 && HAS_SERVO_2 servo[2].attach(SERVO2_PIN); - servo[2].detach(); + DETACH_SERVO(2); #endif #if NUM_SERVOS >= 4 && HAS_SERVO_3 servo[3].attach(SERVO3_PIN); - servo[3].detach(); + DETACH_SERVO(3); #endif } diff --git a/Marlin/src/module/servo.h b/Marlin/src/module/servo.h index 29bd3b8798d4..73dbbdddb729 100644 --- a/Marlin/src/module/servo.h +++ b/Marlin/src/module/servo.h @@ -110,6 +110,7 @@ #endif // HAS_SERVO_ANGLES #define MOVE_SERVO(I, P) servo[I].move(P) +#define DETACH_SERVO(I) servo[I].detach() extern HAL_SERVO_LIB servo[NUM_SERVOS]; -extern void servo_init(); +void servo_init(); diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 6908635d6e35..a4b8bb19e63a 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -36,7 +36,7 @@ */ // Change EEPROM version if the structure changes -#define EEPROM_VERSION "V83" +#define EEPROM_VERSION "V85" #define EEPROM_OFFSET 100 // Check the integrity of data offsets. @@ -71,6 +71,10 @@ #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + #include "../lcd/e3v2/jyersui/dwin.h" #endif #if HAS_SERVOS @@ -129,9 +133,6 @@ #endif #include "../feature/controllerfan.h" -#if ENABLED(CONTROLLER_FAN_EDITABLE) - void M710_report(const bool forReplay); -#endif #if ENABLED(CASE_LIGHT_ENABLE) #include "../feature/caselight.h" @@ -153,20 +154,26 @@ #include "../libs/buzzer.h" #endif +#if ENABLED(DGUS_LCD_UI_MKS) + #include "../lcd/extui/dgus/DGUSScreenHandler.h" + #include "../lcd/extui/dgus/DGUSDisplayDef.h" +#endif + #pragma pack(push, 1) // No padding between variables #if HAS_ETHERNET void ETH0_report(); void MAC_report(); - void M552_report(); - void M553_report(); - void M554_report(); #endif -typedef struct { uint16_t X, Y, Z, X2, Y2, Z2, Z3, Z4, E0, E1, E2, E3, E4, E5, E6, E7; } tmc_stepper_current_t; -typedef struct { uint32_t X, Y, Z, X2, Y2, Z2, Z3, Z4, E0, E1, E2, E3, E4, E5, E6, E7; } tmc_hybrid_threshold_t; -typedef struct { int16_t X, Y, Z, X2, Y2, Z2, Z3, Z4; } tmc_sgt_t; -typedef struct { bool X, Y, Z, X2, Y2, Z2, Z3, Z4, E0, E1, E2, E3, E4, E5, E6, E7; } tmc_stealth_enabled_t; +#define _EN_ITEM(N) , E##N + +typedef struct { uint16_t LINEAR_AXIS_LIST(X, Y, Z, I, J, K), X2, Y2, Z2, Z3, Z4 REPEAT(E_STEPPERS, _EN_ITEM); } tmc_stepper_current_t; +typedef struct { uint32_t LINEAR_AXIS_LIST(X, Y, Z, I, J, K), X2, Y2, Z2, Z3, Z4 REPEAT(E_STEPPERS, _EN_ITEM); } tmc_hybrid_threshold_t; +typedef struct { int16_t LINEAR_AXIS_LIST(X, Y, Z, I, J, K), X2, Y2, Z2, Z3, Z4; } tmc_sgt_t; +typedef struct { bool LINEAR_AXIS_LIST(X, Y, Z, I, J, K), X2, Y2, Z2, Z3, Z4 REPEAT(E_STEPPERS, _EN_ITEM); } tmc_stealth_enabled_t; + +#undef _EN_ITEM // Limit an index to an array size #define ALIM(I,ARR) _MIN(I, (signed)COUNT(ARR) - 1) @@ -189,7 +196,7 @@ typedef struct SettingsDataStruct { // // DISTINCT_E_FACTORS // - uint8_t esteppers; // XYZE_N - XYZ + uint8_t esteppers; // DISTINCT_AXES - LINEAR_AXES planner_settings_t planner_settings; @@ -272,17 +279,24 @@ typedef struct SettingsDataStruct { bool bltouch_last_written_mode; // - // DELTA / [XYZ]_DUAL_ENDSTOPS + // Kinematic Settings + // + #if IS_KINEMATIC + float segments_per_second; // M665 S + #if ENABLED(DELTA) + float delta_height; // M666 H + abc_float_t delta_endstop_adj; // M666 X Y Z + float delta_radius, // M665 R + delta_diagonal_rod; // M665 L + abc_float_t delta_tower_angle_trim, // M665 X Y Z + delta_diagonal_rod_trim; // M665 A B C + #endif + #endif + + // + // Extra Endstops offsets // - #if ENABLED(DELTA) - float delta_height; // M666 H - abc_float_t delta_endstop_adj; // M666 X Y Z - float delta_radius, // M665 R - delta_diagonal_rod, // M665 L - delta_segments_per_second; // M665 S - abc_float_t delta_tower_angle_trim, // M665 X Y Z - delta_diagonal_rod_trim; // M665 A B C - #elif HAS_EXTRA_ENDSTOPS + #if HAS_EXTRA_ENDSTOPS float x2_endstop_adj, // M666 X y2_endstop_adj, // M666 Y z2_endstop_adj, // M666 (S2) Z @@ -318,6 +332,11 @@ typedef struct SettingsDataStruct { // PID_t bedPID; // M304 PID / M303 E-1 U + // + // PIDTEMPCHAMBER + // + PID_t chamberPID; // M309 PID / M303 E-2 U + // // User-defined Thermistors // @@ -333,7 +352,12 @@ typedef struct SettingsDataStruct { // // HAS_LCD_CONTRAST // - int16_t lcd_contrast; // M250 C + uint8_t lcd_contrast; // M250 C + + // + // HAS_LCD_BRIGHTNESS + // + uint8_t lcd_brightness; // M256 B // // Controller fan settings @@ -375,9 +399,9 @@ typedef struct SettingsDataStruct { // HAS_MOTOR_CURRENT_PWM // #ifndef MOTOR_CURRENT_COUNT - #define MOTOR_CURRENT_COUNT 3 + #define MOTOR_CURRENT_COUNT LINEAR_AXES #endif - uint32_t motor_current_setting[MOTOR_CURRENT_COUNT]; // M907 X Z E + uint32_t motor_current_setting[MOTOR_CURRENT_COUNT]; // M907 X Z E ... // // CNC_COORDINATE_SYSTEMS @@ -392,7 +416,7 @@ typedef struct SettingsDataStruct { // // ADVANCED_PAUSE_FEATURE // - #if EXTRUDERS + #if HAS_EXTRUDERS fil_change_settings_t fc_settings[EXTRUDERS]; // M603 T U L #endif @@ -414,10 +438,18 @@ typedef struct SettingsDataStruct { // EXTENSIBLE_UI // #if ENABLED(EXTENSIBLE_UI) - // This is a significant hardware change; don't reserve space when not present uint8_t extui_data[ExtUI::eeprom_data_size]; #endif + // + // Ender-3 V2 DWIN + // + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + uint8_t dwin_data[eeprom_data_size]; + #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + uint8_t dwin_settings[CrealityDWIN.eeprom_data_size]; + #endif + // // CASELIGHT_USES_BRIGHTNESS // @@ -456,6 +488,16 @@ typedef struct SettingsDataStruct { bool buzzer_enabled; #endif + // + // MKS UI controller + // + #if ENABLED(DGUS_LCD_UI_MKS) + uint8_t mks_language_index; // Display Language + xy_int_t mks_corner_offsets[5]; // Bed Tramming + xyz_int_t mks_park_pos; // Custom Parking (without NOZZLE_PARK) + celsius_t mks_min_extrusion_temp; // Min E Temp (shadow M302 value) + #endif + #if HAS_MULTI_LANGUAGE uint8_t ui_language; // M414 S #endif @@ -496,7 +538,7 @@ void MarlinSettings::postprocess() { #endif // Software endstops depend on home_offset - LOOP_XYZ(i) { + LOOP_LINEAR_AXES(i) { update_workspace_offset((AxisEnum)i); update_software_endstops((AxisEnum)i); } @@ -513,7 +555,9 @@ void MarlinSettings::postprocess() { TERN_(CASELIGHT_USES_BRIGHTNESS, caselight.update_brightness()); - // Refresh steps_to_mm with the reciprocal of axis_steps_per_mm + TERN_(EXTENSIBLE_UI, ExtUI::onPostprocessSettings()); + + // Refresh mm_per_step with the reciprocal of axis_steps_per_mm // and init stepper.count[], planner.position[] with current_position planner.refresh_positioning(); @@ -562,18 +606,15 @@ void MarlinSettings::postprocess() { "ARCHIM2_SPI_FLASH_EEPROM_BACKUP_SIZE is insufficient to capture all EEPROM data."); #endif -#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE) +// +// This file simply uses the DEBUG_ECHO macros to implement EEPROM_CHITCHAT. +// For deeper debugging of EEPROM issues enable DEBUG_EEPROM_READWRITE. +// +#define DEBUG_OUT EITHER(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) #include "../core/debug_out.h" #if ENABLED(EEPROM_SETTINGS) - #define EEPROM_START() if (!persistentStore.access_start()) { SERIAL_ECHO_MSG("No EEPROM."); return false; } \ - int eeprom_index = EEPROM_OFFSET - #define EEPROM_FINISH() persistentStore.access_finish() - #define EEPROM_SKIP(VAR) (eeprom_index += sizeof(VAR)) - #define EEPROM_WRITE(VAR) do{ persistentStore.write_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); }while(0) - #define EEPROM_READ(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc, !validating); }while(0) - #define EEPROM_READ_ALWAYS(VAR) do{ persistentStore.read_data(eeprom_index, (uint8_t*)&VAR, sizeof(VAR), &working_crc); }while(0) #define EEPROM_ASSERT(TST,ERR) do{ if (!(TST)) { SERIAL_ERROR_MSG(ERR); eeprom_error = true; } }while(0) #if ENABLED(DEBUG_EEPROM_READWRITE) @@ -589,6 +630,8 @@ void MarlinSettings::postprocess() { const char version[4] = EEPROM_VERSION; bool MarlinSettings::eeprom_error, MarlinSettings::validating; + int MarlinSettings::eeprom_index; + uint16_t MarlinSettings::working_crc; bool MarlinSettings::size_error(const uint16_t size) { if (size != datasize()) { @@ -605,9 +648,7 @@ void MarlinSettings::postprocess() { float dummyf = 0; char ver[4] = "ERR"; - uint16_t working_crc = 0; - - EEPROM_START(); + if (!EEPROM_START(EEPROM_OFFSET)) return false; eeprom_error = false; @@ -618,9 +659,8 @@ void MarlinSettings::postprocess() { working_crc = 0; // clear before first "real data" + const uint8_t esteppers = COUNT(planner.settings.axis_steps_per_mm) - LINEAR_AXES; _FIELD_TEST(esteppers); - - const uint8_t esteppers = COUNT(planner.settings.axis_steps_per_mm) - XYZ; EEPROM_WRITE(esteppers); // @@ -636,7 +676,7 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(dummyf); #endif #else - const xyze_pos_t planner_max_jerk = { 10, 10, 0.4, float(DEFAULT_EJERK) }; + const xyze_pos_t planner_max_jerk = LOGICAL_AXIS_ARRAY(float(DEFAULT_EJERK), 10, 10, 0.4, 0.4, 0.4, 0.4); EEPROM_WRITE(planner_max_jerk); #endif @@ -824,45 +864,49 @@ void MarlinSettings::postprocess() { } // - // DELTA Geometry or Dual Endstops offsets + // Kinematic Settings // + #if IS_KINEMATIC { + EEPROM_WRITE(segments_per_second); #if ENABLED(DELTA) - _FIELD_TEST(delta_height); - EEPROM_WRITE(delta_height); // 1 float EEPROM_WRITE(delta_endstop_adj); // 3 floats EEPROM_WRITE(delta_radius); // 1 float EEPROM_WRITE(delta_diagonal_rod); // 1 float - EEPROM_WRITE(delta_segments_per_second); // 1 float EEPROM_WRITE(delta_tower_angle_trim); // 3 floats EEPROM_WRITE(delta_diagonal_rod_trim); // 3 floats + #endif + } + #endif - #elif HAS_EXTRA_ENDSTOPS - - _FIELD_TEST(x2_endstop_adj); - - // Write dual endstops in X, Y, Z order. Unused = 0.0 - dummyf = 0; - EEPROM_WRITE(TERN(X_DUAL_ENDSTOPS, endstops.x2_endstop_adj, dummyf)); // 1 float - EEPROM_WRITE(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float - EEPROM_WRITE(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float + // + // Extra Endstops offsets + // + #if HAS_EXTRA_ENDSTOPS + { + _FIELD_TEST(x2_endstop_adj); - #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 - EEPROM_WRITE(endstops.z3_endstop_adj); // 1 float - #else - EEPROM_WRITE(dummyf); - #endif + // Write dual endstops in X, Y, Z order. Unused = 0.0 + dummyf = 0; + EEPROM_WRITE(TERN(X_DUAL_ENDSTOPS, endstops.x2_endstop_adj, dummyf)); // 1 float + EEPROM_WRITE(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float + EEPROM_WRITE(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float - #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 - EEPROM_WRITE(endstops.z4_endstop_adj); // 1 float - #else - EEPROM_WRITE(dummyf); - #endif + #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 + EEPROM_WRITE(endstops.z3_endstop_adj); // 1 float + #else + EEPROM_WRITE(dummyf); + #endif + #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 + EEPROM_WRITE(endstops.z4_endstop_adj); // 1 float + #else + EEPROM_WRITE(dummyf); #endif } + #endif #if ENABLED(Z_STEPPER_AUTO_ALIGN) EEPROM_WRITE(z_stepper_align.xy); @@ -926,6 +970,25 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(bed_pid); } + // + // PIDTEMPCHAMBER + // + { + _FIELD_TEST(chamberPID); + + const PID_t chamber_pid = { + #if DISABLED(PIDTEMPCHAMBER) + NAN, NAN, NAN + #else + // Store the unscaled PID values + thermalManager.temp_chamber.pid.Kp, + unscalePID_i(thermalManager.temp_chamber.pid.Ki), + unscalePID_d(thermalManager.temp_chamber.pid.Kd) + #endif + }; + EEPROM_WRITE(chamber_pid); + } + // // User-defined Thermistors // @@ -954,17 +1017,19 @@ void MarlinSettings::postprocess() { // { _FIELD_TEST(lcd_contrast); - - const int16_t lcd_contrast = - #if HAS_LCD_CONTRAST - ui.contrast - #else - 127 - #endif - ; + const uint8_t lcd_contrast = TERN(HAS_LCD_CONTRAST, ui.contrast, 127); EEPROM_WRITE(lcd_contrast); } + // + // LCD Brightness + // + { + _FIELD_TEST(lcd_brightness); + const uint8_t lcd_brightness = TERN(HAS_LCD_BRIGHTNESS, ui.brightness, 255); + EEPROM_WRITE(lcd_brightness); + } + // // Controller Fan // @@ -1038,7 +1103,7 @@ void MarlinSettings::postprocess() { { _FIELD_TEST(tmc_stepper_current); - tmc_stepper_current_t tmc_stepper_current = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + tmc_stepper_current_t tmc_stepper_current{0}; #if HAS_TRINAMIC_CONFIG #if AXIS_IS_TMC(X) @@ -1050,6 +1115,15 @@ void MarlinSettings::postprocess() { #if AXIS_IS_TMC(Z) tmc_stepper_current.Z = stepperZ.getMilliamps(); #endif + #if AXIS_IS_TMC(I) + tmc_stepper_current.I = stepperI.getMilliamps(); + #endif + #if AXIS_IS_TMC(J) + tmc_stepper_current.J = stepperJ.getMilliamps(); + #endif + #if AXIS_IS_TMC(K) + tmc_stepper_current.K = stepperK.getMilliamps(); + #endif #if AXIS_IS_TMC(X2) tmc_stepper_current.X2 = stepperX2.getMilliamps(); #endif @@ -1100,62 +1174,34 @@ void MarlinSettings::postprocess() { _FIELD_TEST(tmc_hybrid_threshold); #if ENABLED(HYBRID_THRESHOLD) - tmc_hybrid_threshold_t tmc_hybrid_threshold = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - #if AXIS_HAS_STEALTHCHOP(X) - tmc_hybrid_threshold.X = stepperX.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - tmc_hybrid_threshold.Y = stepperY.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - tmc_hybrid_threshold.Z = stepperZ.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - tmc_hybrid_threshold.X2 = stepperX2.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - tmc_hybrid_threshold.Y2 = stepperY2.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - tmc_hybrid_threshold.Z2 = stepperZ2.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - tmc_hybrid_threshold.Z3 = stepperZ3.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - tmc_hybrid_threshold.Z4 = stepperZ4.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(E0) - tmc_hybrid_threshold.E0 = stepperE0.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - tmc_hybrid_threshold.E1 = stepperE1.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - tmc_hybrid_threshold.E2 = stepperE2.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - tmc_hybrid_threshold.E3 = stepperE3.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - tmc_hybrid_threshold.E4 = stepperE4.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - tmc_hybrid_threshold.E5 = stepperE5.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - tmc_hybrid_threshold.E6 = stepperE6.get_pwm_thrs(); - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - tmc_hybrid_threshold.E7 = stepperE7.get_pwm_thrs(); - #endif + tmc_hybrid_threshold_t tmc_hybrid_threshold{0}; + TERN_(X_HAS_STEALTHCHOP, tmc_hybrid_threshold.X = stepperX.get_pwm_thrs()); + TERN_(Y_HAS_STEALTHCHOP, tmc_hybrid_threshold.Y = stepperY.get_pwm_thrs()); + TERN_(Z_HAS_STEALTHCHOP, tmc_hybrid_threshold.Z = stepperZ.get_pwm_thrs()); + TERN_(I_HAS_STEALTHCHOP, tmc_hybrid_threshold.I = stepperI.get_pwm_thrs()); + TERN_(J_HAS_STEALTHCHOP, tmc_hybrid_threshold.J = stepperJ.get_pwm_thrs()); + TERN_(K_HAS_STEALTHCHOP, tmc_hybrid_threshold.K = stepperK.get_pwm_thrs()); + TERN_(X2_HAS_STEALTHCHOP, tmc_hybrid_threshold.X2 = stepperX2.get_pwm_thrs()); + TERN_(Y2_HAS_STEALTHCHOP, tmc_hybrid_threshold.Y2 = stepperY2.get_pwm_thrs()); + TERN_(Z2_HAS_STEALTHCHOP, tmc_hybrid_threshold.Z2 = stepperZ2.get_pwm_thrs()); + TERN_(Z3_HAS_STEALTHCHOP, tmc_hybrid_threshold.Z3 = stepperZ3.get_pwm_thrs()); + TERN_(Z4_HAS_STEALTHCHOP, tmc_hybrid_threshold.Z4 = stepperZ4.get_pwm_thrs()); + TERN_(E0_HAS_STEALTHCHOP, tmc_hybrid_threshold.E0 = stepperE0.get_pwm_thrs()); + TERN_(E1_HAS_STEALTHCHOP, tmc_hybrid_threshold.E1 = stepperE1.get_pwm_thrs()); + TERN_(E2_HAS_STEALTHCHOP, tmc_hybrid_threshold.E2 = stepperE2.get_pwm_thrs()); + TERN_(E3_HAS_STEALTHCHOP, tmc_hybrid_threshold.E3 = stepperE3.get_pwm_thrs()); + TERN_(E4_HAS_STEALTHCHOP, tmc_hybrid_threshold.E4 = stepperE4.get_pwm_thrs()); + TERN_(E5_HAS_STEALTHCHOP, tmc_hybrid_threshold.E5 = stepperE5.get_pwm_thrs()); + TERN_(E6_HAS_STEALTHCHOP, tmc_hybrid_threshold.E6 = stepperE6.get_pwm_thrs()); + TERN_(E7_HAS_STEALTHCHOP, tmc_hybrid_threshold.E7 = stepperE7.get_pwm_thrs()); #else + #define _EN_ITEM(N) , .E##N = 30 const tmc_hybrid_threshold_t tmc_hybrid_threshold = { - .X = 100, .Y = 100, .Z = 3, - .X2 = 100, .Y2 = 100, .Z2 = 3, .Z3 = 3, .Z4 = 3, - .E0 = 30, .E1 = 30, .E2 = 30, - .E3 = 30, .E4 = 30, .E5 = 30 + LINEAR_AXIS_LIST(.X = 100, .Y = 100, .Z = 3, .I = 3, .J = 3, .K = 3), + .X2 = 100, .Y2 = 100, .Z2 = 3, .Z3 = 3, .Z4 = 3 + REPEAT(E_STEPPERS, _EN_ITEM) }; + #undef _EN_ITEM #endif EEPROM_WRITE(tmc_hybrid_threshold); } @@ -1166,11 +1212,16 @@ void MarlinSettings::postprocess() { { tmc_sgt_t tmc_sgt{0}; #if USE_SENSORLESS - TERN_(X_SENSORLESS, tmc_sgt.X = stepperX.homing_threshold()); + LINEAR_AXIS_CODE( + TERN_(X_SENSORLESS, tmc_sgt.X = stepperX.homing_threshold()), + TERN_(Y_SENSORLESS, tmc_sgt.Y = stepperY.homing_threshold()), + TERN_(Z_SENSORLESS, tmc_sgt.Z = stepperZ.homing_threshold()), + TERN_(I_SENSORLESS, tmc_sgt.I = stepperI.homing_threshold()), + TERN_(J_SENSORLESS, tmc_sgt.J = stepperJ.homing_threshold()), + TERN_(K_SENSORLESS, tmc_sgt.K = stepperK.homing_threshold()) + ); TERN_(X2_SENSORLESS, tmc_sgt.X2 = stepperX2.homing_threshold()); - TERN_(Y_SENSORLESS, tmc_sgt.Y = stepperY.homing_threshold()); TERN_(Y2_SENSORLESS, tmc_sgt.Y2 = stepperY2.homing_threshold()); - TERN_(Z_SENSORLESS, tmc_sgt.Z = stepperZ.homing_threshold()); TERN_(Z2_SENSORLESS, tmc_sgt.Z2 = stepperZ2.homing_threshold()); TERN_(Z3_SENSORLESS, tmc_sgt.Z3 = stepperZ3.homing_threshold()); TERN_(Z4_SENSORLESS, tmc_sgt.Z4 = stepperZ4.homing_threshold()); @@ -1185,54 +1236,25 @@ void MarlinSettings::postprocess() { _FIELD_TEST(tmc_stealth_enabled); tmc_stealth_enabled_t tmc_stealth_enabled = { false }; - #if AXIS_HAS_STEALTHCHOP(X) - tmc_stealth_enabled.X = stepperX.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - tmc_stealth_enabled.Y = stepperY.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - tmc_stealth_enabled.Z = stepperZ.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - tmc_stealth_enabled.X2 = stepperX2.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - tmc_stealth_enabled.Y2 = stepperY2.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - tmc_stealth_enabled.Z2 = stepperZ2.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - tmc_stealth_enabled.Z3 = stepperZ3.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - tmc_stealth_enabled.Z4 = stepperZ4.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E0) - tmc_stealth_enabled.E0 = stepperE0.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - tmc_stealth_enabled.E1 = stepperE1.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - tmc_stealth_enabled.E2 = stepperE2.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - tmc_stealth_enabled.E3 = stepperE3.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - tmc_stealth_enabled.E4 = stepperE4.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - tmc_stealth_enabled.E5 = stepperE5.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - tmc_stealth_enabled.E6 = stepperE6.get_stored_stealthChop(); - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - tmc_stealth_enabled.E7 = stepperE7.get_stored_stealthChop(); - #endif + TERN_(X_HAS_STEALTHCHOP, tmc_stealth_enabled.X = stepperX.get_stored_stealthChop()); + TERN_(Y_HAS_STEALTHCHOP, tmc_stealth_enabled.Y = stepperY.get_stored_stealthChop()); + TERN_(Z_HAS_STEALTHCHOP, tmc_stealth_enabled.Z = stepperZ.get_stored_stealthChop()); + TERN_(I_HAS_STEALTHCHOP, tmc_stealth_enabled.I = stepperI.get_stored_stealthChop()); + TERN_(J_HAS_STEALTHCHOP, tmc_stealth_enabled.J = stepperJ.get_stored_stealthChop()); + TERN_(K_HAS_STEALTHCHOP, tmc_stealth_enabled.K = stepperK.get_stored_stealthChop()); + TERN_(X2_HAS_STEALTHCHOP, tmc_stealth_enabled.X2 = stepperX2.get_stored_stealthChop()); + TERN_(Y2_HAS_STEALTHCHOP, tmc_stealth_enabled.Y2 = stepperY2.get_stored_stealthChop()); + TERN_(Z2_HAS_STEALTHCHOP, tmc_stealth_enabled.Z2 = stepperZ2.get_stored_stealthChop()); + TERN_(Z3_HAS_STEALTHCHOP, tmc_stealth_enabled.Z3 = stepperZ3.get_stored_stealthChop()); + TERN_(Z4_HAS_STEALTHCHOP, tmc_stealth_enabled.Z4 = stepperZ4.get_stored_stealthChop()); + TERN_(E0_HAS_STEALTHCHOP, tmc_stealth_enabled.E0 = stepperE0.get_stored_stealthChop()); + TERN_(E1_HAS_STEALTHCHOP, tmc_stealth_enabled.E1 = stepperE1.get_stored_stealthChop()); + TERN_(E2_HAS_STEALTHCHOP, tmc_stealth_enabled.E2 = stepperE2.get_stored_stealthChop()); + TERN_(E3_HAS_STEALTHCHOP, tmc_stealth_enabled.E3 = stepperE3.get_stored_stealthChop()); + TERN_(E4_HAS_STEALTHCHOP, tmc_stealth_enabled.E4 = stepperE4.get_stored_stealthChop()); + TERN_(E5_HAS_STEALTHCHOP, tmc_stealth_enabled.E5 = stepperE5.get_stored_stealthChop()); + TERN_(E6_HAS_STEALTHCHOP, tmc_stealth_enabled.E6 = stepperE6.get_stored_stealthChop()); + TERN_(E7_HAS_STEALTHCHOP, tmc_stealth_enabled.E7 = stepperE7.get_stored_stealthChop()); EEPROM_WRITE(tmc_stealth_enabled); } @@ -1284,7 +1306,7 @@ void MarlinSettings::postprocess() { // // Advanced Pause filament load & unload lengths // - #if EXTRUDERS + #if HAS_EXTRUDERS { #if DISABLED(ADVANCED_PAUSE_FEATURE) const fil_change_settings_t fc_settings[EXTRUDERS] = { 0, 0 }; @@ -1329,12 +1351,31 @@ void MarlinSettings::postprocess() { // Extensible UI User Data // #if ENABLED(EXTENSIBLE_UI) - { - char extui_data[ExtUI::eeprom_data_size] = { 0 }; - ExtUI::onStoreSettings(extui_data); - _FIELD_TEST(extui_data); - EEPROM_WRITE(extui_data); - } + { + char extui_data[ExtUI::eeprom_data_size] = { 0 }; + ExtUI::onStoreSettings(extui_data); + _FIELD_TEST(extui_data); + EEPROM_WRITE(extui_data); + } + #endif + + // + // Creality DWIN User Data + // + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + { + char dwin_data[eeprom_data_size] = { 0 }; + DWIN_StoreSettings(dwin_data); + _FIELD_TEST(dwin_data); + EEPROM_WRITE(dwin_data); + } + #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + { + char dwin_settings[CrealityDWIN.eeprom_data_size] = { 0 }; + CrealityDWIN.Save_Settings(dwin_settings); + _FIELD_TEST(dwin_settings); + EEPROM_WRITE(dwin_settings); + } #endif // @@ -1385,6 +1426,16 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(ui.buzzer_enabled); #endif + // + // MKS UI controller + // + #if ENABLED(DGUS_LCD_UI_MKS) + EEPROM_WRITE(mks_language_index); + EEPROM_WRITE(mks_corner_offsets); + EEPROM_WRITE(mks_park_pos); + EEPROM_WRITE(mks_min_extrusion_temp); + #endif + // // Selected LCD language // @@ -1406,8 +1457,7 @@ void MarlinSettings::postprocess() { EEPROM_WRITE(final_crc); // Report storage size - DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("Settings Stored (", eeprom_size, " bytes; crc ", (uint32_t)final_crc, ")"); + DEBUG_ECHO_MSG("Settings Stored (", eeprom_size, " bytes; crc ", (uint32_t)final_crc, ")"); eeprom_error |= size_error(eeprom_size); } @@ -1432,9 +1482,7 @@ void MarlinSettings::postprocess() { * M501 - Retrieve Configuration */ bool MarlinSettings::_load() { - uint16_t working_crc = 0; - - EEPROM_START(); + if (!EEPROM_START(EEPROM_OFFSET)) return false; char stored_ver[4]; EEPROM_READ_ALWAYS(stored_ver); @@ -1448,8 +1496,9 @@ void MarlinSettings::postprocess() { stored_ver[0] = '?'; stored_ver[1] = '\0'; } - DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("EEPROM version mismatch (EEPROM=", stored_ver, " Marlin=" EEPROM_VERSION ")"); + DEBUG_ECHO_MSG("EEPROM version mismatch (EEPROM=", stored_ver, " Marlin=" EEPROM_VERSION ")"); + TERN_(DWIN_CREALITY_LCD_ENHANCED, ui.set_status(GET_TEXT(MSG_ERR_EEPROM_VERSION))); + IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_version()); eeprom_error = true; } @@ -1469,16 +1518,16 @@ void MarlinSettings::postprocess() { { // Get only the number of E stepper parameters previously stored // Any steppers added later are set to their defaults - uint32_t tmp1[XYZ + esteppers]; - float tmp2[XYZ + esteppers]; - feedRate_t tmp3[XYZ + esteppers]; - EEPROM_READ(tmp1); // max_acceleration_mm_per_s2 + uint32_t tmp1[LINEAR_AXES + esteppers]; + float tmp2[LINEAR_AXES + esteppers]; + feedRate_t tmp3[LINEAR_AXES + esteppers]; + EEPROM_READ((uint8_t *)tmp1, sizeof(tmp1)); // max_acceleration_mm_per_s2 EEPROM_READ(planner.settings.min_segment_time_us); - EEPROM_READ(tmp2); // axis_steps_per_mm - EEPROM_READ(tmp3); // max_feedrate_mm_s + EEPROM_READ((uint8_t *)tmp2, sizeof(tmp2)); // axis_steps_per_mm + EEPROM_READ((uint8_t *)tmp3, sizeof(tmp3)); // max_feedrate_mm_s - if (!validating) LOOP_XYZE_N(i) { - const bool in = (i < esteppers + XYZ); + if (!validating) LOOP_DISTINCT_AXES(i) { + const bool in = (i < esteppers + LINEAR_AXES); planner.settings.max_acceleration_mm_per_s2[i] = in ? tmp1[i] : pgm_read_dword(&_DMA[ALIM(i, _DMA)]); planner.settings.axis_steps_per_mm[i] = in ? tmp2[i] : pgm_read_float(&_DASU[ALIM(i, _DASU)]); planner.settings.max_feedrate_mm_s[i] = in ? tmp3[i] : pgm_read_float(&_DMF[ALIM(i, _DMF)]); @@ -1496,7 +1545,7 @@ void MarlinSettings::postprocess() { EEPROM_READ(dummyf); #endif #else - for (uint8_t q = 4; q--;) EEPROM_READ(dummyf); + for (uint8_t q = LOGICAL_AXES; q--;) EEPROM_READ(dummyf); #endif EEPROM_READ(TERN(CLASSIC_JERK, dummyf, planner.junction_deviation_mm)); @@ -1565,7 +1614,7 @@ void MarlinSettings::postprocess() { #if ENABLED(MESH_BED_LEVELING) if (!validating) mbl.z_offset = dummyf; - if (mesh_num_x == GRID_MAX_POINTS_X && mesh_num_y == GRID_MAX_POINTS_Y) { + if (mesh_num_x == (GRID_MAX_POINTS_X) && mesh_num_y == (GRID_MAX_POINTS_Y)) { // EEPROM data fits the current mesh EEPROM_READ(mbl.z_values); } @@ -1612,7 +1661,7 @@ void MarlinSettings::postprocess() { EEPROM_READ_ALWAYS(grid_max_x); // 1 byte EEPROM_READ_ALWAYS(grid_max_y); // 1 byte #if ENABLED(AUTO_BED_LEVELING_BILINEAR) - if (grid_max_x == GRID_MAX_POINTS_X && grid_max_y == GRID_MAX_POINTS_Y) { + if (grid_max_x == (GRID_MAX_POINTS_X) && grid_max_y == (GRID_MAX_POINTS_Y)) { if (!validating) set_bed_leveling_enabled(false); EEPROM_READ(bilinear_grid_spacing); // 2 ints EEPROM_READ(bilinear_start); // 2 ints @@ -1686,42 +1735,46 @@ void MarlinSettings::postprocess() { } // - // DELTA Geometry or Dual Endstops offsets + // Kinematic Segments-per-second // + #if IS_KINEMATIC { + EEPROM_READ(segments_per_second); #if ENABLED(DELTA) - _FIELD_TEST(delta_height); - EEPROM_READ(delta_height); // 1 float EEPROM_READ(delta_endstop_adj); // 3 floats EEPROM_READ(delta_radius); // 1 float EEPROM_READ(delta_diagonal_rod); // 1 float - EEPROM_READ(delta_segments_per_second); // 1 float EEPROM_READ(delta_tower_angle_trim); // 3 floats EEPROM_READ(delta_diagonal_rod_trim); // 3 floats + #endif + } + #endif - #elif HAS_EXTRA_ENDSTOPS - - _FIELD_TEST(x2_endstop_adj); - - EEPROM_READ(TERN(X_DUAL_ENDSTOPS, endstops.x2_endstop_adj, dummyf)); // 1 float - EEPROM_READ(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float - EEPROM_READ(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float + // + // Extra Endstops offsets + // + #if HAS_EXTRA_ENDSTOPS + { + _FIELD_TEST(x2_endstop_adj); - #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 - EEPROM_READ(endstops.z3_endstop_adj); // 1 float - #else - EEPROM_READ(dummyf); - #endif - #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 - EEPROM_READ(endstops.z4_endstop_adj); // 1 float - #else - EEPROM_READ(dummyf); - #endif + EEPROM_READ(TERN(X_DUAL_ENDSTOPS, endstops.x2_endstop_adj, dummyf)); // 1 float + EEPROM_READ(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float + EEPROM_READ(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float + #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 + EEPROM_READ(endstops.z3_endstop_adj); // 1 float + #else + EEPROM_READ(dummyf); + #endif + #if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 + EEPROM_READ(endstops.z4_endstop_adj); // 1 float + #else + EEPROM_READ(dummyf); #endif } + #endif #if ENABLED(Z_STEPPER_AUTO_ALIGN) EEPROM_READ(z_stepper_align.xy); @@ -1787,6 +1840,22 @@ void MarlinSettings::postprocess() { #endif } + // + // Heated Chamber PID + // + { + PID_t pid; + EEPROM_READ(pid); + #if ENABLED(PIDTEMPCHAMBER) + if (!validating && !isnan(pid.Kp)) { + // Scale PID values since EEPROM values are unscaled + thermalManager.temp_chamber.pid.Kp = pid.Kp; + thermalManager.temp_chamber.pid.Ki = scalePID_i(pid.Ki); + thermalManager.temp_chamber.pid.Kd = scalePID_d(pid.Kd); + } + #endif + } + // // User-defined Thermistors // @@ -1815,13 +1884,23 @@ void MarlinSettings::postprocess() { // { _FIELD_TEST(lcd_contrast); - int16_t lcd_contrast; + uint8_t lcd_contrast; EEPROM_READ(lcd_contrast); if (!validating) { TERN_(HAS_LCD_CONTRAST, ui.set_contrast(lcd_contrast)); } } + // + // LCD Brightness + // + { + _FIELD_TEST(lcd_brightness); + uint8_t lcd_brightness; + EEPROM_READ(lcd_brightness); + TERN_(HAS_LCD_BRIGHTNESS, if (!validating) ui.set_brightness(lcd_brightness)); + } + // // Controller Fan // @@ -1933,6 +2012,15 @@ void MarlinSettings::postprocess() { #if AXIS_IS_TMC(Z4) SET_CURR(Z4); #endif + #if AXIS_IS_TMC(I) + SET_CURR(I); + #endif + #if AXIS_IS_TMC(J) + SET_CURR(J); + #endif + #if AXIS_IS_TMC(K) + SET_CURR(K); + #endif #if AXIS_IS_TMC(E0) SET_CURR(E0); #endif @@ -1969,54 +2057,25 @@ void MarlinSettings::postprocess() { #if ENABLED(HYBRID_THRESHOLD) if (!validating) { - #if AXIS_HAS_STEALTHCHOP(X) - stepperX.set_pwm_thrs(tmc_hybrid_threshold.X); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - stepperY.set_pwm_thrs(tmc_hybrid_threshold.Y); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - stepperZ.set_pwm_thrs(tmc_hybrid_threshold.Z); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - stepperX2.set_pwm_thrs(tmc_hybrid_threshold.X2); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - stepperY2.set_pwm_thrs(tmc_hybrid_threshold.Y2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - stepperZ2.set_pwm_thrs(tmc_hybrid_threshold.Z2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - stepperZ3.set_pwm_thrs(tmc_hybrid_threshold.Z3); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - stepperZ4.set_pwm_thrs(tmc_hybrid_threshold.Z4); - #endif - #if AXIS_HAS_STEALTHCHOP(E0) - stepperE0.set_pwm_thrs(tmc_hybrid_threshold.E0); - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - stepperE1.set_pwm_thrs(tmc_hybrid_threshold.E1); - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - stepperE2.set_pwm_thrs(tmc_hybrid_threshold.E2); - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - stepperE3.set_pwm_thrs(tmc_hybrid_threshold.E3); - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - stepperE4.set_pwm_thrs(tmc_hybrid_threshold.E4); - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - stepperE5.set_pwm_thrs(tmc_hybrid_threshold.E5); - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - stepperE6.set_pwm_thrs(tmc_hybrid_threshold.E6); - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - stepperE7.set_pwm_thrs(tmc_hybrid_threshold.E7); - #endif + TERN_(X_HAS_STEALTHCHOP, stepperX.set_pwm_thrs(tmc_hybrid_threshold.X)); + TERN_(Y_HAS_STEALTHCHOP, stepperY.set_pwm_thrs(tmc_hybrid_threshold.Y)); + TERN_(Z_HAS_STEALTHCHOP, stepperZ.set_pwm_thrs(tmc_hybrid_threshold.Z)); + TERN_(X2_HAS_STEALTHCHOP, stepperX2.set_pwm_thrs(tmc_hybrid_threshold.X2)); + TERN_(Y2_HAS_STEALTHCHOP, stepperY2.set_pwm_thrs(tmc_hybrid_threshold.Y2)); + TERN_(Z2_HAS_STEALTHCHOP, stepperZ2.set_pwm_thrs(tmc_hybrid_threshold.Z2)); + TERN_(Z3_HAS_STEALTHCHOP, stepperZ3.set_pwm_thrs(tmc_hybrid_threshold.Z3)); + TERN_(Z4_HAS_STEALTHCHOP, stepperZ4.set_pwm_thrs(tmc_hybrid_threshold.Z4)); + TERN_(I_HAS_STEALTHCHOP, stepperI.set_pwm_thrs(tmc_hybrid_threshold.I)); + TERN_(J_HAS_STEALTHCHOP, stepperJ.set_pwm_thrs(tmc_hybrid_threshold.J)); + TERN_(K_HAS_STEALTHCHOP, stepperK.set_pwm_thrs(tmc_hybrid_threshold.K)); + TERN_(E0_HAS_STEALTHCHOP, stepperE0.set_pwm_thrs(tmc_hybrid_threshold.E0)); + TERN_(E1_HAS_STEALTHCHOP, stepperE1.set_pwm_thrs(tmc_hybrid_threshold.E1)); + TERN_(E2_HAS_STEALTHCHOP, stepperE2.set_pwm_thrs(tmc_hybrid_threshold.E2)); + TERN_(E3_HAS_STEALTHCHOP, stepperE3.set_pwm_thrs(tmc_hybrid_threshold.E3)); + TERN_(E4_HAS_STEALTHCHOP, stepperE4.set_pwm_thrs(tmc_hybrid_threshold.E4)); + TERN_(E5_HAS_STEALTHCHOP, stepperE5.set_pwm_thrs(tmc_hybrid_threshold.E5)); + TERN_(E6_HAS_STEALTHCHOP, stepperE6.set_pwm_thrs(tmc_hybrid_threshold.E6)); + TERN_(E7_HAS_STEALTHCHOP, stepperE7.set_pwm_thrs(tmc_hybrid_threshold.E7)); } #endif } @@ -2030,11 +2089,16 @@ void MarlinSettings::postprocess() { EEPROM_READ(tmc_sgt); #if USE_SENSORLESS if (!validating) { - TERN_(X_SENSORLESS, stepperX.homing_threshold(tmc_sgt.X)); + LINEAR_AXIS_CODE( + TERN_(X_SENSORLESS, stepperX.homing_threshold(tmc_sgt.X)), + TERN_(Y_SENSORLESS, stepperY.homing_threshold(tmc_sgt.Y)), + TERN_(Z_SENSORLESS, stepperZ.homing_threshold(tmc_sgt.Z)), + TERN_(I_SENSORLESS, stepperI.homing_threshold(tmc_sgt.I)), + TERN_(J_SENSORLESS, stepperJ.homing_threshold(tmc_sgt.J)), + TERN_(K_SENSORLESS, stepperK.homing_threshold(tmc_sgt.K)) + ); TERN_(X2_SENSORLESS, stepperX2.homing_threshold(tmc_sgt.X2)); - TERN_(Y_SENSORLESS, stepperY.homing_threshold(tmc_sgt.Y)); TERN_(Y2_SENSORLESS, stepperY2.homing_threshold(tmc_sgt.Y2)); - TERN_(Z_SENSORLESS, stepperZ.homing_threshold(tmc_sgt.Z)); TERN_(Z2_SENSORLESS, stepperZ2.homing_threshold(tmc_sgt.Z2)); TERN_(Z3_SENSORLESS, stepperZ3.homing_threshold(tmc_sgt.Z3)); TERN_(Z4_SENSORLESS, stepperZ4.homing_threshold(tmc_sgt.Z4)); @@ -2053,54 +2117,25 @@ void MarlinSettings::postprocess() { #define SET_STEPPING_MODE(ST) stepper##ST.stored.stealthChop_enabled = tmc_stealth_enabled.ST; stepper##ST.refresh_stepping_mode(); if (!validating) { - #if AXIS_HAS_STEALTHCHOP(X) - SET_STEPPING_MODE(X); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - SET_STEPPING_MODE(Y); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - SET_STEPPING_MODE(Z); - #endif - #if AXIS_HAS_STEALTHCHOP(X2) - SET_STEPPING_MODE(X2); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - SET_STEPPING_MODE(Y2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - SET_STEPPING_MODE(Z2); - #endif - #if AXIS_HAS_STEALTHCHOP(Z3) - SET_STEPPING_MODE(Z3); - #endif - #if AXIS_HAS_STEALTHCHOP(Z4) - SET_STEPPING_MODE(Z4); - #endif - #if AXIS_HAS_STEALTHCHOP(E0) - SET_STEPPING_MODE(E0); - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - SET_STEPPING_MODE(E1); - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - SET_STEPPING_MODE(E2); - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - SET_STEPPING_MODE(E3); - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - SET_STEPPING_MODE(E4); - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - SET_STEPPING_MODE(E5); - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - SET_STEPPING_MODE(E6); - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - SET_STEPPING_MODE(E7); - #endif + TERN_(X_HAS_STEALTHCHOP, SET_STEPPING_MODE(X)); + TERN_(Y_HAS_STEALTHCHOP, SET_STEPPING_MODE(Y)); + TERN_(Z_HAS_STEALTHCHOP, SET_STEPPING_MODE(Z)); + TERN_(I_HAS_STEALTHCHOP, SET_STEPPING_MODE(I)); + TERN_(J_HAS_STEALTHCHOP, SET_STEPPING_MODE(J)); + TERN_(K_HAS_STEALTHCHOP, SET_STEPPING_MODE(K)); + TERN_(X2_HAS_STEALTHCHOP, SET_STEPPING_MODE(X2)); + TERN_(Y2_HAS_STEALTHCHOP, SET_STEPPING_MODE(Y2)); + TERN_(Z2_HAS_STEALTHCHOP, SET_STEPPING_MODE(Z2)); + TERN_(Z3_HAS_STEALTHCHOP, SET_STEPPING_MODE(Z3)); + TERN_(Z4_HAS_STEALTHCHOP, SET_STEPPING_MODE(Z4)); + TERN_(E0_HAS_STEALTHCHOP, SET_STEPPING_MODE(E0)); + TERN_(E1_HAS_STEALTHCHOP, SET_STEPPING_MODE(E1)); + TERN_(E2_HAS_STEALTHCHOP, SET_STEPPING_MODE(E2)); + TERN_(E3_HAS_STEALTHCHOP, SET_STEPPING_MODE(E3)); + TERN_(E4_HAS_STEALTHCHOP, SET_STEPPING_MODE(E4)); + TERN_(E5_HAS_STEALTHCHOP, SET_STEPPING_MODE(E5)); + TERN_(E6_HAS_STEALTHCHOP, SET_STEPPING_MODE(E6)); + TERN_(E7_HAS_STEALTHCHOP, SET_STEPPING_MODE(E7)); } #endif } @@ -2128,9 +2163,13 @@ void MarlinSettings::postprocess() { = DIGIPOT_MOTOR_CURRENT #endif ; - DEBUG_ECHOLNPGM("DIGIPOTS Loading"); + #if HAS_MOTOR_CURRENT_SPI + DEBUG_ECHO_MSG("DIGIPOTS Loading"); + #endif EEPROM_READ(motor_current_setting); - DEBUG_ECHOLNPGM("DIGIPOTS Loaded"); + #if HAS_MOTOR_CURRENT_SPI + DEBUG_ECHO_MSG("DIGIPOTS Loaded"); + #endif #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM if (!validating) COPY(stepper.motor_current_setting, motor_current_setting); @@ -2172,7 +2211,7 @@ void MarlinSettings::postprocess() { // // Advanced Pause filament load & unload lengths // - #if EXTRUDERS + #if HAS_EXTRUDERS { #if DISABLED(ADVANCED_PAUSE_FEATURE) fil_change_settings_t fc_settings[EXTRUDERS]; @@ -2198,7 +2237,7 @@ void MarlinSettings::postprocess() { const xyz_float_t &backlash_distance_mm = backlash.distance_mm; const uint8_t &backlash_correction = backlash.correction; #else - float backlash_distance_mm[XYZ]; + xyz_float_t backlash_distance_mm; uint8_t backlash_correction; #endif #if ENABLED(BACKLASH_GCODE) && defined(BACKLASH_SMOOTHING_MM) @@ -2216,13 +2255,31 @@ void MarlinSettings::postprocess() { // Extensible UI User Data // #if ENABLED(EXTENSIBLE_UI) - // This is a significant hardware change; don't reserve EEPROM space when not present - { - const char extui_data[ExtUI::eeprom_data_size] = { 0 }; - _FIELD_TEST(extui_data); - EEPROM_READ(extui_data); - if (!validating) ExtUI::onLoadSettings(extui_data); - } + { // This is a significant hardware change; don't reserve EEPROM space when not present + const char extui_data[ExtUI::eeprom_data_size] = { 0 }; + _FIELD_TEST(extui_data); + EEPROM_READ(extui_data); + if (!validating) ExtUI::onLoadSettings(extui_data); + } + #endif + + // + // Creality DWIN User Data + // + #if ENABLED(DWIN_CREALITY_LCD_ENHANCED) + { + const char dwin_data[eeprom_data_size] = { 0 }; + _FIELD_TEST(dwin_data); + EEPROM_READ(dwin_data); + if (!validating) DWIN_LoadSettings(dwin_data); + } + #elif ENABLED(DWIN_CREALITY_LCD_JYERSUI) + { + const char dwin_settings[CrealityDWIN.eeprom_data_size] = { 0 }; + _FIELD_TEST(dwin_settings); + EEPROM_READ(dwin_settings); + if (!validating) CrealityDWIN.Load_Settings(dwin_settings); + } #endif // @@ -2271,6 +2328,17 @@ void MarlinSettings::postprocess() { EEPROM_READ(ui.buzzer_enabled); #endif + // + // MKS UI controller + // + #if ENABLED(DGUS_LCD_UI_MKS) + _FIELD_TEST(mks_language_index); + EEPROM_READ(mks_language_index); + EEPROM_READ(mks_corner_offsets); + EEPROM_READ(mks_park_pos); + EEPROM_READ(mks_min_extrusion_temp); + #endif + // // Selected LCD language // @@ -2288,20 +2356,19 @@ void MarlinSettings::postprocess() { // eeprom_error = size_error(eeprom_index - (EEPROM_OFFSET)); if (eeprom_error) { - DEBUG_ECHO_START(); - DEBUG_ECHOLNPAIR("Index: ", int(eeprom_index - (EEPROM_OFFSET)), " Size: ", datasize()); + DEBUG_ECHO_MSG("Index: ", eeprom_index - (EEPROM_OFFSET), " Size: ", datasize()); IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_index()); } else if (working_crc != stored_crc) { eeprom_error = true; - DEBUG_ERROR_START(); - DEBUG_ECHOLNPAIR("EEPROM CRC mismatch - (stored) ", stored_crc, " != ", working_crc, " (calculated)!"); + DEBUG_ERROR_MSG("EEPROM CRC mismatch - (stored) ", stored_crc, " != ", working_crc, " (calculated)!"); + TERN_(DWIN_CREALITY_LCD_ENHANCED, ui.set_status(GET_TEXT(MSG_ERR_EEPROM_CRC))); IF_DISABLED(EEPROM_AUTO_INIT, ui.eeprom_alert_crc()); } else if (!validating) { DEBUG_ECHO_START(); DEBUG_ECHO(version); - DEBUG_ECHOLNPAIR(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET), " bytes; crc ", (uint32_t)working_crc, ")"); + DEBUG_ECHOLNPGM(" stored settings retrieved (", eeprom_index - (EEPROM_OFFSET), " bytes; crc ", (uint32_t)working_crc, ")"); } if (!validating && !eeprom_error) postprocess(); @@ -2311,7 +2378,6 @@ void MarlinSettings::postprocess() { ubl.report_state(); if (!ubl.sanity_check()) { - SERIAL_EOL(); #if BOTH(EEPROM_CHITCHAT, DEBUG_LEVELING_FEATURE) ubl.echo_name(); DEBUG_ECHOLNPGM(" initialized.\n"); @@ -2329,7 +2395,7 @@ void MarlinSettings::postprocess() { if (ubl.storage_slot >= 0) { load_mesh(ubl.storage_slot); - DEBUG_ECHOLNPAIR("Mesh ", ubl.storage_slot, " loaded from storage."); + DEBUG_ECHOLNPGM("Mesh ", ubl.storage_slot, " loaded from storage."); } else { ubl.reset(); @@ -2385,22 +2451,19 @@ void MarlinSettings::postprocess() { #if ENABLED(AUTO_BED_LEVELING_UBL) inline void ubl_invalid_slot(const int s) { - #if BOTH(EEPROM_CHITCHAT, DEBUG_OUT) - DEBUG_ECHOLNPGM("?Invalid slot."); - DEBUG_ECHO(s); - DEBUG_ECHOLNPGM(" mesh slots available."); - #else - UNUSED(s); - #endif + DEBUG_ECHOLNPGM("?Invalid slot.\n", s, " mesh slots available."); + UNUSED(s); } - const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129; // 128 (+1 because of the change to capacity rather than last valid address) - // is a placeholder for the size of the MAT; the MAT will always - // live at the very end of the eeprom + // 128 (+1 because of the change to capacity rather than last valid address) + // is a placeholder for the size of the MAT; the MAT will always + // live at the very end of the eeprom + const uint16_t MarlinSettings::meshes_end = persistentStore.capacity() - 129; uint16_t MarlinSettings::meshes_start_index() { - return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8; // Pad the end of configuration data so it can float up - // or down a little bit without disrupting the mesh data + // Pad the end of configuration data so it can float up + // or down a little bit without disrupting the mesh data + return (datasize() + EEPROM_OFFSET + 32) & 0xFFF8; } #define MESH_STORE_SIZE sizeof(TERN(OPTIMIZED_MESH_STORAGE, mesh_store_t, ubl.z_values)) @@ -2419,7 +2482,7 @@ void MarlinSettings::postprocess() { const int16_t a = calc_num_meshes(); if (!WITHIN(slot, 0, a - 1)) { ubl_invalid_slot(a); - DEBUG_ECHOLNPAIR("E2END=", persistentStore.capacity() - 1, " meshes_end=", meshes_end, " slot=", slot); + DEBUG_ECHOLNPGM("E2END=", persistentStore.capacity() - 1, " meshes_end=", meshes_end, " slot=", slot); DEBUG_EOL(); return; } @@ -2441,7 +2504,7 @@ void MarlinSettings::postprocess() { persistentStore.access_finish(); if (status) SERIAL_ECHOLNPGM("?Unable to save mesh data."); - else DEBUG_ECHOLNPAIR("Mesh saved in slot ", slot); + else DEBUG_ECHOLNPGM("Mesh saved in slot ", slot); #else @@ -2485,7 +2548,7 @@ void MarlinSettings::postprocess() { #endif if (status) SERIAL_ECHOLNPGM("?Unable to load mesh data."); - else DEBUG_ECHOLNPAIR("Mesh loaded from slot ", slot); + else DEBUG_ECHOLNPGM("Mesh loaded from slot ", slot); EEPROM_FINISH(); @@ -2514,10 +2577,10 @@ void MarlinSettings::postprocess() { * M502 - Reset Configuration */ void MarlinSettings::reset() { - LOOP_XYZE_N(i) { + LOOP_DISTINCT_AXES(i) { planner.settings.max_acceleration_mm_per_s2[i] = pgm_read_dword(&_DMA[ALIM(i, _DMA)]); - planner.settings.axis_steps_per_mm[i] = pgm_read_float(&_DASU[ALIM(i, _DASU)]); - planner.settings.max_feedrate_mm_s[i] = pgm_read_float(&_DMF[ALIM(i, _DMF)]); + planner.settings.axis_steps_per_mm[i] = pgm_read_float(&_DASU[ALIM(i, _DASU)]); + planner.settings.max_feedrate_mm_s[i] = pgm_read_float(&_DMF[ALIM(i, _DMF)]); } planner.settings.min_segment_time_us = DEFAULT_MINSEGMENTTIME; @@ -2531,19 +2594,28 @@ void MarlinSettings::reset() { #ifndef DEFAULT_XJERK #define DEFAULT_XJERK 0 #endif - #ifndef DEFAULT_YJERK + #if HAS_Y_AXIS && !defined(DEFAULT_YJERK) #define DEFAULT_YJERK 0 #endif - #ifndef DEFAULT_ZJERK + #if HAS_Z_AXIS && !defined(DEFAULT_ZJERK) #define DEFAULT_ZJERK 0 #endif - planner.max_jerk.set(DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK); - TERN_(HAS_CLASSIC_E_JERK, planner.max_jerk.e = DEFAULT_EJERK;); + #if LINEAR_AXES >= 4 && !defined(DEFAULT_IJERK) + #define DEFAULT_IJERK 0 + #endif + #if LINEAR_AXES >= 5 && !defined(DEFAULT_JJERK) + #define DEFAULT_JJERK 0 + #endif + #if LINEAR_AXES >= 6 && !defined(DEFAULT_KJERK) + #define DEFAULT_KJERK 0 + #endif + planner.max_jerk.set( + LINEAR_AXIS_LIST(DEFAULT_XJERK, DEFAULT_YJERK, DEFAULT_ZJERK, DEFAULT_IJERK, DEFAULT_JJERK, DEFAULT_KJERK) + ); + TERN_(HAS_CLASSIC_E_JERK, planner.max_jerk.e = DEFAULT_EJERK); #endif - #if HAS_JUNCTION_DEVIATION - planner.junction_deviation_mm = float(JUNCTION_DEVIATION_MM); - #endif + TERN_(HAS_JUNCTION_DEVIATION, planner.junction_deviation_mm = float(JUNCTION_DEVIATION_MM)); #if HAS_SCARA_OFFSET scara_home_offset.reset(); @@ -2607,6 +2679,8 @@ void MarlinSettings::reset() { #endif TERN_(EXTENSIBLE_UI, ExtUI::onFactoryReset()); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_SetDataDefaults()); + TERN_(DWIN_CREALITY_LCD_JYERSUI, CrealityDWIN.Reset_Settings()); // // Case Light Brightness @@ -2636,11 +2710,11 @@ void MarlinSettings::reset() { #if HAS_BED_PROBE constexpr float dpo[] = NOZZLE_TO_PROBE_OFFSET; - static_assert(COUNT(dpo) == 3, "NOZZLE_TO_PROBE_OFFSET must contain offsets for X, Y, and Z."); + static_assert(COUNT(dpo) == LINEAR_AXES, "NOZZLE_TO_PROBE_OFFSET must contain offsets for each linear axis X, Y, Z...."); #if HAS_PROBE_XY_OFFSET - LOOP_XYZ(a) probe.offset[a] = dpo[a]; + LOOP_LINEAR_AXES(a) probe.offset[a] = dpo[a]; #else - probe.offset.set(0, 0, dpo[Z_AXIS]); + probe.offset.set(LINEAR_AXIS_LIST(0, 0, dpo[Z_AXIS], 0, 0, 0)); #endif #endif @@ -2662,20 +2736,30 @@ void MarlinSettings::reset() { //#endif // - // Endstop Adjustments + // Kinematic settings // - #if ENABLED(DELTA) - const abc_float_t adj = DELTA_ENDSTOP_ADJ, dta = DELTA_TOWER_ANGLE_TRIM, ddr = DELTA_DIAGONAL_ROD_TRIM_TOWER; - delta_height = DELTA_HEIGHT; - delta_endstop_adj = adj; - delta_radius = DELTA_RADIUS; - delta_diagonal_rod = DELTA_DIAGONAL_ROD; - delta_segments_per_second = DELTA_SEGMENTS_PER_SECOND; - delta_tower_angle_trim = dta; - delta_diagonal_rod_trim = ddr; + #if IS_KINEMATIC + segments_per_second = ( + TERN_(DELTA, DELTA_SEGMENTS_PER_SECOND) + TERN_(IS_SCARA, SCARA_SEGMENTS_PER_SECOND) + TERN_(POLARGRAPH, POLAR_SEGMENTS_PER_SECOND) + ); + #if ENABLED(DELTA) + const abc_float_t adj = DELTA_ENDSTOP_ADJ, dta = DELTA_TOWER_ANGLE_TRIM, ddr = DELTA_DIAGONAL_ROD_TRIM_TOWER; + delta_height = DELTA_HEIGHT; + delta_endstop_adj = adj; + delta_radius = DELTA_RADIUS; + delta_diagonal_rod = DELTA_DIAGONAL_ROD; + delta_tower_angle_trim = dta; + delta_diagonal_rod_trim = ddr; + #endif #endif + // + // Endstop Adjustments + // + #if ENABLED(X_DUAL_ENDSTOPS) #ifndef X2_ENDSTOP_ADJUSTMENT #define X2_ENDSTOP_ADJUSTMENT 0 @@ -2713,25 +2797,20 @@ void MarlinSettings::reset() { // Preheat parameters // #if PREHEAT_COUNT + #define _PITEM(N,T) PREHEAT_##N##_##T, #if HAS_HOTEND - constexpr uint16_t hpre[] = ARRAY_N(PREHEAT_COUNT, PREHEAT_1_TEMP_HOTEND, PREHEAT_2_TEMP_HOTEND, PREHEAT_3_TEMP_HOTEND, PREHEAT_4_TEMP_HOTEND, PREHEAT_5_TEMP_HOTEND); + constexpr uint16_t hpre[] = { REPEAT2_S(1, INCREMENT(PREHEAT_COUNT), _PITEM, TEMP_HOTEND) }; #endif #if HAS_HEATED_BED - constexpr uint16_t bpre[] = ARRAY_N(PREHEAT_COUNT, PREHEAT_1_TEMP_BED, PREHEAT_2_TEMP_BED, PREHEAT_3_TEMP_BED, PREHEAT_4_TEMP_BED, PREHEAT_5_TEMP_BED); + constexpr uint16_t bpre[] = { REPEAT2_S(1, INCREMENT(PREHEAT_COUNT), _PITEM, TEMP_BED) }; #endif #if HAS_FAN - constexpr uint8_t fpre[] = ARRAY_N(PREHEAT_COUNT, PREHEAT_1_FAN_SPEED, PREHEAT_2_FAN_SPEED, PREHEAT_3_FAN_SPEED, PREHEAT_4_FAN_SPEED, PREHEAT_5_FAN_SPEED); + constexpr uint8_t fpre[] = { REPEAT2_S(1, INCREMENT(PREHEAT_COUNT), _PITEM, FAN_SPEED) }; #endif LOOP_L_N(i, PREHEAT_COUNT) { - #if HAS_HOTEND - ui.material_preset[i].hotend_temp = hpre[i]; - #endif - #if HAS_HEATED_BED - ui.material_preset[i].bed_temp = bpre[i]; - #endif - #if HAS_FAN - ui.material_preset[i].fan_speed = fpre[i]; - #endif + TERN_(HAS_HOTEND, ui.material_preset[i].hotend_temp = hpre[i]); + TERN_(HAS_HEATED_BED, ui.material_preset[i].bed_temp = bpre[i]); + TERN_(HAS_FAN, ui.material_preset[i].fan_speed = fpre[i]); } #endif @@ -2811,6 +2890,16 @@ void MarlinSettings::reset() { thermalManager.temp_bed.pid.Kd = scalePID_d(DEFAULT_bedKd); #endif + // + // Heated Chamber PID + // + + #if ENABLED(PIDTEMPCHAMBER) + thermalManager.temp_chamber.pid.Kp = DEFAULT_chamberKp; + thermalManager.temp_chamber.pid.Ki = scalePID_i(DEFAULT_chamberKi); + thermalManager.temp_chamber.pid.Kd = scalePID_d(DEFAULT_chamberKd); + #endif + // // User-Defined Thermistors // @@ -2826,6 +2915,11 @@ void MarlinSettings::reset() { // TERN_(HAS_LCD_CONTRAST, ui.set_contrast(DEFAULT_LCD_CONTRAST)); + // + // LCD Brightness + // + TERN_(HAS_LCD_BRIGHTNESS, ui.set_brightness(DEFAULT_LCD_BRIGHTNESS)); + // // Controller Fan // @@ -2926,65 +3020,26 @@ void MarlinSettings::reset() { #endif #endif + // + // MKS UI controller + // + TERN_(DGUS_LCD_UI_MKS, MKS_reset_settings()); + postprocess(); - DEBUG_ECHO_START(); - DEBUG_ECHOLNPGM("Hardcoded Default Settings Loaded"); + DEBUG_ECHO_MSG("Hardcoded Default Settings Loaded"); TERN_(EXTENSIBLE_UI, ExtUI::onFactoryReset()); } #if DISABLED(DISABLE_M503) - static void config_heading(const bool repl, PGM_P const pstr, const bool eol=true) { - if (!repl) { - SERIAL_ECHO_START(); - SERIAL_ECHOPGM("; "); - serialprintPGM(pstr); - if (eol) SERIAL_EOL(); - } - } + #define CONFIG_ECHO_START() gcode.report_echo_start(forReplay) + #define CONFIG_ECHO_MSG(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(V); }while(0) + #define CONFIG_ECHO_MSG_P(V...) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM_P(V); }while(0) + #define CONFIG_ECHO_HEADING(STR) gcode.report_heading(forReplay, PSTR(STR)) - #define CONFIG_ECHO_START() do{ if (!forReplay) SERIAL_ECHO_START(); }while(0) - #define CONFIG_ECHO_MSG(STR) do{ CONFIG_ECHO_START(); SERIAL_ECHOLNPGM(STR); }while(0) - #define CONFIG_ECHO_HEADING(STR) config_heading(forReplay, PSTR(STR)) - - #if HAS_TRINAMIC_CONFIG - inline void say_M906(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M906"); } - #if HAS_STEALTHCHOP - void say_M569(const bool forReplay, const char * const etc=nullptr, const bool newLine = false) { - CONFIG_ECHO_START(); - SERIAL_ECHOPGM(" M569 S1"); - if (etc) { - SERIAL_CHAR(' '); - serialprintPGM(etc); - } - if (newLine) SERIAL_EOL(); - } - #endif - #if ENABLED(HYBRID_THRESHOLD) - inline void say_M913(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M913"); } - #endif - #if USE_SENSORLESS - inline void say_M914() { SERIAL_ECHOPGM(" M914"); } - #endif - #endif - - #if ENABLED(ADVANCED_PAUSE_FEATURE) - inline void say_M603(const bool forReplay) { CONFIG_ECHO_START(); SERIAL_ECHOPGM(" M603 "); } - #endif - - inline void say_units(const bool colon) { - serialprintPGM( - #if ENABLED(INCH_MODE_SUPPORT) - parser.linear_unit_factor != 1.0 ? PSTR(" (in)") : - #endif - PSTR(" (mm)") - ); - if (colon) SERIAL_ECHOLNPGM(":"); - } - - void report_M92(const bool echo=true, const int8_t e=-1); + void M92_report(const bool echo=true, const int8_t e=-1); /** * M503 - Report current settings in RAM @@ -2992,213 +3047,73 @@ void MarlinSettings::reset() { * Unless specifically disabled, M503 is available even without EEPROM */ void MarlinSettings::report(const bool forReplay) { - /** - * Announce current units, in case inches are being displayed - */ - CONFIG_ECHO_START(); + // + // Announce current units, in case inches are being displayed + // + CONFIG_ECHO_HEADING("Linear Units"); #if ENABLED(INCH_MODE_SUPPORT) - SERIAL_ECHOPGM(" G2"); - SERIAL_CHAR(parser.linear_unit_factor == 1.0 ? '1' : '0'); - SERIAL_ECHOPGM(" ;"); - say_units(false); + SERIAL_ECHOPGM(" G2", AS_DIGIT(parser.linear_unit_factor == 1.0), " ;"); #else - SERIAL_ECHOPGM(" G21 ; Units in mm"); - say_units(false); + SERIAL_ECHOPGM(" G21 ;"); #endif - SERIAL_EOL(); - - #if HAS_LCD_MENU - - // Temperature units - for Ultipanel temperature options - - CONFIG_ECHO_START(); - #if ENABLED(TEMPERATURE_UNITS_SUPPORT) - SERIAL_ECHOPGM(" M149 "); - SERIAL_CHAR(parser.temp_units_code()); - SERIAL_ECHOPGM(" ; Units in "); - serialprintPGM(parser.temp_units_name()); - #else - SERIAL_ECHOLNPGM(" M149 C ; Units in Celsius"); - #endif + gcode.say_units(); + // + // M149 Temperature units + // + #if ENABLED(TEMPERATURE_UNITS_SUPPORT) + gcode.M149_report(forReplay); + #else + CONFIG_ECHO_HEADING(STR_TEMPERATURE_UNITS); + CONFIG_ECHO_MSG(" M149 C ; Units in Celsius"); #endif - SERIAL_EOL(); - - #if EXTRUDERS && DISABLED(NO_VOLUMETRICS) + // + // M200 Volumetric Extrusion + // + IF_DISABLED(NO_VOLUMETRICS, gcode.M200_report(forReplay)); - /** - * Volumetric extrusion M200 - */ - if (!forReplay) { - config_heading(forReplay, PSTR("Filament settings:"), false); - if (parser.volumetric_enabled) - SERIAL_EOL(); - else - SERIAL_ECHOLNPGM(" Disabled"); - } + // + // M92 Steps per Unit + // + gcode.M92_report(forReplay); - #if EXTRUDERS == 1 - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M200 S", int(parser.volumetric_enabled) - , " D", LINEAR_UNIT(planner.filament_size[0]) - #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) - , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[0]) - #endif - ); - #else - LOOP_L_N(i, EXTRUDERS) { - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M200 T", int(i) - , " D", LINEAR_UNIT(planner.filament_size[i]) - #if ENABLED(VOLUMETRIC_EXTRUDER_LIMIT) - , " L", LINEAR_UNIT(planner.volumetric_extruder_limit[i]) - #endif - ); - } - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M200 S", int(parser.volumetric_enabled)); - #endif - #endif // EXTRUDERS && !NO_VOLUMETRICS - - CONFIG_ECHO_HEADING("Steps per unit:"); - report_M92(!forReplay); - - CONFIG_ECHO_HEADING("Maximum feedrates (units/s):"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M203 X"), LINEAR_UNIT(planner.settings.max_feedrate_mm_s[X_AXIS]) - , SP_Y_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Y_AXIS]) - , SP_Z_STR, LINEAR_UNIT(planner.settings.max_feedrate_mm_s[Z_AXIS]) - #if DISABLED(DISTINCT_E_FACTORS) - , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS]) - #endif - ); - #if ENABLED(DISTINCT_E_FACTORS) - LOOP_L_N(i, E_STEPPERS) { - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M203 T"), (int)i - , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)]) - ); - } - #endif + // + // M203 Maximum feedrates (units/s) + // + gcode.M203_report(forReplay); - CONFIG_ECHO_HEADING("Maximum Acceleration (units/s2):"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M201 X"), LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[X_AXIS]) - , SP_Y_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Y_AXIS]) - , SP_Z_STR, LINEAR_UNIT(planner.settings.max_acceleration_mm_per_s2[Z_AXIS]) - #if DISABLED(DISTINCT_E_FACTORS) - , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS]) - #endif - ); - #if ENABLED(DISTINCT_E_FACTORS) - LOOP_L_N(i, E_STEPPERS) { - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M201 T"), (int)i - , SP_E_STR, VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)]) - ); - } - #endif + // + // M201 Maximum Acceleration (units/s2) + // + gcode.M201_report(forReplay); - CONFIG_ECHO_HEADING("Acceleration (units/s2): P R T"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M204 P"), LINEAR_UNIT(planner.settings.acceleration) - , PSTR(" R"), LINEAR_UNIT(planner.settings.retract_acceleration) - , SP_T_STR, LINEAR_UNIT(planner.settings.travel_acceleration) - ); + // + // M204 Acceleration (units/s2) + // + gcode.M204_report(forReplay); - CONFIG_ECHO_HEADING( - "Advanced: B S T" - #if HAS_JUNCTION_DEVIATION - " J" - #endif - #if HAS_CLASSIC_JERK - " X Y Z" - TERN_(HAS_CLASSIC_E_JERK, " E") - #endif - ); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M205 B"), LINEAR_UNIT(planner.settings.min_segment_time_us) - , PSTR(" S"), LINEAR_UNIT(planner.settings.min_feedrate_mm_s) - , SP_T_STR, LINEAR_UNIT(planner.settings.min_travel_feedrate_mm_s) - #if HAS_JUNCTION_DEVIATION - , PSTR(" J"), LINEAR_UNIT(planner.junction_deviation_mm) - #endif - #if HAS_CLASSIC_JERK - , SP_X_STR, LINEAR_UNIT(planner.max_jerk.x) - , SP_Y_STR, LINEAR_UNIT(planner.max_jerk.y) - , SP_Z_STR, LINEAR_UNIT(planner.max_jerk.z) - #if HAS_CLASSIC_E_JERK - , SP_E_STR, LINEAR_UNIT(planner.max_jerk.e) - #endif - #endif - ); + // + // M205 "Advanced" Settings + // + gcode.M205_report(forReplay); - #if HAS_M206_COMMAND - CONFIG_ECHO_HEADING("Home offset:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - #if IS_CARTESIAN - PSTR(" M206 X"), LINEAR_UNIT(home_offset.x) - , SP_Y_STR, LINEAR_UNIT(home_offset.y) - , SP_Z_STR - #else - PSTR(" M206 Z") - #endif - , LINEAR_UNIT(home_offset.z) - ); - #endif + // + // M206 Home Offset + // + TERN_(HAS_M206_COMMAND, gcode.M206_report(forReplay)); - #if HAS_HOTEND_OFFSET - CONFIG_ECHO_HEADING("Hotend offsets:"); - CONFIG_ECHO_START(); - LOOP_S_L_N(e, 1, HOTENDS) { - SERIAL_ECHOPAIR_P( - PSTR(" M218 T"), (int)e, - SP_X_STR, LINEAR_UNIT(hotend_offset[e].x), - SP_Y_STR, LINEAR_UNIT(hotend_offset[e].y) - ); - SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(hotend_offset[e].z), 3); - } - #endif + // + // M218 Hotend offsets + // + TERN_(HAS_HOTEND_OFFSET, gcode.M218_report(forReplay)); - /** - * Bed Leveling - */ + // + // Bed Leveling + // #if HAS_LEVELING - #if ENABLED(MESH_BED_LEVELING) - - CONFIG_ECHO_HEADING("Mesh Bed Leveling:"); - - #elif ENABLED(AUTO_BED_LEVELING_UBL) - - config_heading(forReplay, NUL_STR, false); - if (!forReplay) { - ubl.echo_name(); - SERIAL_CHAR(':'); - SERIAL_EOL(); - } - - #elif HAS_ABL_OR_UBL - - CONFIG_ECHO_HEADING("Auto Bed Leveling:"); - - #endif - - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M420 S"), planner.leveling_active ? 1 : 0 - #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT) - , SP_Z_STR, LINEAR_UNIT(planner.z_fade_height) - #endif - ); + gcode.M420_report(forReplay); #if ENABLED(MESH_BED_LEVELING) @@ -3206,12 +3121,12 @@ void MarlinSettings::reset() { LOOP_L_N(py, GRID_MAX_POINTS_Y) { LOOP_L_N(px, GRID_MAX_POINTS_X) { CONFIG_ECHO_START(); - SERIAL_ECHOPAIR_P(PSTR(" G29 S3 I"), (int)px, PSTR(" J"), (int)py); + SERIAL_ECHOPGM(" G29 S3 I", px, " J", py); SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(mbl.z_values[px][py]), 5); } } CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_F_P(PSTR(" G29 S4 Z"), LINEAR_UNIT(mbl.z_offset), 5); + SERIAL_ECHOLNPAIR_F(" G29 S4 Z", LINEAR_UNIT(mbl.z_offset), 5); } #elif ENABLED(AUTO_BED_LEVELING_UBL) @@ -3219,12 +3134,8 @@ void MarlinSettings::reset() { if (!forReplay) { SERIAL_EOL(); ubl.report_state(); - SERIAL_EOL(); - config_heading(false, PSTR("Active Mesh Slot: "), false); - SERIAL_ECHOLN(ubl.storage_slot); - config_heading(false, PSTR("EEPROM can hold "), false); - SERIAL_ECHO(calc_num_meshes()); - SERIAL_ECHOLNPGM(" meshes.\n"); + SERIAL_ECHO_MSG("Active Mesh Slot ", ubl.storage_slot); + SERIAL_ECHO_MSG("EEPROM can hold ", calc_num_meshes(), " meshes.\n"); } //ubl.report_current_mesh(); // This is too verbose for large meshes. A better (more terse) @@ -3235,7 +3146,7 @@ void MarlinSettings::reset() { LOOP_L_N(py, GRID_MAX_POINTS_Y) { LOOP_L_N(px, GRID_MAX_POINTS_X) { CONFIG_ECHO_START(); - SERIAL_ECHOPAIR(" G29 W I", (int)px, " J", (int)py); + SERIAL_ECHOPGM(" G29 W I", px, " J", py); SERIAL_ECHOLNPAIR_F_P(SP_Z_STR, LINEAR_UNIT(z_values[px][py]), 5); } } @@ -3245,634 +3156,150 @@ void MarlinSettings::reset() { #endif // HAS_LEVELING - #if ENABLED(EDITABLE_SERVO_ANGLES) - - CONFIG_ECHO_HEADING("Servo Angles:"); - LOOP_L_N(i, NUM_SERVOS) { - switch (i) { - #if ENABLED(SWITCHING_EXTRUDER) - case SWITCHING_EXTRUDER_SERVO_NR: - #if EXTRUDERS > 3 - case SWITCHING_EXTRUDER_E23_SERVO_NR: - #endif - #elif ENABLED(SWITCHING_NOZZLE) - case SWITCHING_NOZZLE_SERVO_NR: - #elif ENABLED(BLTOUCH) || (HAS_Z_SERVO_PROBE && defined(Z_SERVO_ANGLES)) - case Z_PROBE_SERVO_NR: - #endif - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M281 P", int(i), " L", servo_angles[i][0], " U", servo_angles[i][1]); - default: break; - } - } - - #endif // EDITABLE_SERVO_ANGLES - - #if HAS_SCARA_OFFSET - - CONFIG_ECHO_HEADING("SCARA settings: S P T"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M665 S"), delta_segments_per_second - , SP_P_STR, scara_home_offset.a - , SP_T_STR, scara_home_offset.b - , SP_Z_STR, LINEAR_UNIT(scara_home_offset.z) - ); - - #elif ENABLED(DELTA) - - CONFIG_ECHO_HEADING("Endstop adjustment:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M666 X"), LINEAR_UNIT(delta_endstop_adj.a) - , SP_Y_STR, LINEAR_UNIT(delta_endstop_adj.b) - , SP_Z_STR, LINEAR_UNIT(delta_endstop_adj.c) - ); - - CONFIG_ECHO_HEADING("Delta settings: L R H S XYZ ABC"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M665 L"), LINEAR_UNIT(delta_diagonal_rod) - , PSTR(" R"), LINEAR_UNIT(delta_radius) - , PSTR(" H"), LINEAR_UNIT(delta_height) - , PSTR(" S"), delta_segments_per_second - , SP_X_STR, LINEAR_UNIT(delta_tower_angle_trim.a) - , SP_Y_STR, LINEAR_UNIT(delta_tower_angle_trim.b) - , SP_Z_STR, LINEAR_UNIT(delta_tower_angle_trim.c) - , PSTR(" A"), LINEAR_UNIT(delta_diagonal_rod_trim.a) - , PSTR(" B"), LINEAR_UNIT(delta_diagonal_rod_trim.b) - , PSTR(" C"), LINEAR_UNIT(delta_diagonal_rod_trim.c) - ); + // + // Editable Servo Angles + // + TERN_(EDITABLE_SERVO_ANGLES, gcode.M281_report(forReplay)); - #elif HAS_EXTRA_ENDSTOPS + // + // Kinematic Settings + // + TERN_(IS_KINEMATIC, gcode.M665_report(forReplay)); - CONFIG_ECHO_HEADING("Endstop adjustment:"); - CONFIG_ECHO_START(); - SERIAL_ECHOPGM(" M666"); - #if ENABLED(X_DUAL_ENDSTOPS) - SERIAL_ECHOLNPAIR_P(SP_X_STR, LINEAR_UNIT(endstops.x2_endstop_adj)); - #endif - #if ENABLED(Y_DUAL_ENDSTOPS) - SERIAL_ECHOLNPAIR_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj)); - #endif - #if ENABLED(Z_MULTI_ENDSTOPS) - #if NUM_Z_STEPPER_DRIVERS >= 3 - SERIAL_ECHOPAIR(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); - CONFIG_ECHO_START(); - SERIAL_ECHOPAIR(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj)); - #if NUM_Z_STEPPER_DRIVERS >= 4 - CONFIG_ECHO_START(); - SERIAL_ECHOPAIR(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj)); - #endif - #else - SERIAL_ECHOLNPAIR_P(SP_Z_STR, LINEAR_UNIT(endstops.z2_endstop_adj)); - #endif - #endif + // + // M666 Endstops Adjustment + // + #if EITHER(DELTA, HAS_EXTRA_ENDSTOPS) + gcode.M666_report(forReplay); + #endif - #endif // [XYZ]_DUAL_ENDSTOPS + // + // Z Auto-Align + // + TERN_(Z_STEPPER_AUTO_ALIGN, gcode.M422_report(forReplay)); + // + // LCD Preheat Settings + // #if PREHEAT_COUNT - - CONFIG_ECHO_HEADING("Material heatup parameters:"); - LOOP_L_N(i, PREHEAT_COUNT) { - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M145 S"), (int)i - #if HAS_HOTEND - , PSTR(" H"), TEMP_UNIT(ui.material_preset[i].hotend_temp) - #endif - #if HAS_HEATED_BED - , SP_B_STR, TEMP_UNIT(ui.material_preset[i].bed_temp) - #endif - #if HAS_FAN - , PSTR(" F"), ui.material_preset[i].fan_speed - #endif - ); - } - + gcode.M145_report(forReplay); #endif - #if HAS_PID_HEATING - - CONFIG_ECHO_HEADING("PID settings:"); - - #if ENABLED(PIDTEMP) - HOTEND_LOOP() { - CONFIG_ECHO_START(); - SERIAL_ECHOPAIR_P( - #if ENABLED(PID_PARAMS_PER_HOTEND) - PSTR(" M301 E"), e, - SP_P_STR - #else - PSTR(" M301 P") - #endif - , PID_PARAM(Kp, e) - , PSTR(" I"), unscalePID_i(PID_PARAM(Ki, e)) - , PSTR(" D"), unscalePID_d(PID_PARAM(Kd, e)) - ); - #if ENABLED(PID_EXTRUSION_SCALING) - SERIAL_ECHOPAIR_P(SP_C_STR, PID_PARAM(Kc, e)); - if (e == 0) SERIAL_ECHOPAIR(" L", thermalManager.lpq_len); - #endif - #if ENABLED(PID_FAN_SCALING) - SERIAL_ECHOPAIR(" F", PID_PARAM(Kf, e)); - #endif - SERIAL_EOL(); - } - #endif // PIDTEMP - - #if ENABLED(PIDTEMPBED) - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR( - " M304 P", thermalManager.temp_bed.pid.Kp - , " I", unscalePID_i(thermalManager.temp_bed.pid.Ki) - , " D", unscalePID_d(thermalManager.temp_bed.pid.Kd) - ); - #endif - - #endif // PIDTEMP || PIDTEMPBED + // + // PID + // + TERN_(PIDTEMP, gcode.M301_report(forReplay)); + TERN_(PIDTEMPBED, gcode.M304_report(forReplay)); + TERN_(PIDTEMPCHAMBER, gcode.M309_report(forReplay)); #if HAS_USER_THERMISTORS - CONFIG_ECHO_HEADING("User thermistors:"); LOOP_L_N(i, USER_THERMISTORS) - thermalManager.log_user_thermistor(i, true); + thermalManager.M305_report(i, forReplay); #endif - #if HAS_LCD_CONTRAST - CONFIG_ECHO_HEADING("LCD Contrast:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M250 C", ui.contrast); - #endif - - TERN_(CONTROLLER_FAN_EDITABLE, M710_report(forReplay)); - - #if ENABLED(POWER_LOSS_RECOVERY) - CONFIG_ECHO_HEADING("Power-Loss Recovery:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M413 S", int(recovery.enabled)); - #endif - - #if ENABLED(FWRETRACT) - - CONFIG_ECHO_HEADING("Retract: S F Z"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M207 S"), LINEAR_UNIT(fwretract.settings.retract_length) - , PSTR(" W"), LINEAR_UNIT(fwretract.settings.swap_retract_length) - , PSTR(" F"), LINEAR_UNIT(MMS_TO_MMM(fwretract.settings.retract_feedrate_mm_s)) - , SP_Z_STR, LINEAR_UNIT(fwretract.settings.retract_zraise) - ); - - CONFIG_ECHO_HEADING("Recover: S F"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR( - " M208 S", LINEAR_UNIT(fwretract.settings.retract_recover_extra) - , " W", LINEAR_UNIT(fwretract.settings.swap_retract_recover_extra) - , " F", LINEAR_UNIT(MMS_TO_MMM(fwretract.settings.retract_recover_feedrate_mm_s)) - ); - - #if ENABLED(FWRETRACT_AUTORETRACT) - - CONFIG_ECHO_HEADING("Auto-Retract: S=0 to disable, 1 to interpret E-only moves as retract/recover"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M209 S", fwretract.autoretract_enabled ? 1 : 0); + // + // LCD Contrast + // + TERN_(HAS_LCD_CONTRAST, gcode.M250_report(forReplay)); - #endif // FWRETRACT_AUTORETRACT + // + // LCD Brightness + // + TERN_(HAS_LCD_BRIGHTNESS, gcode.M256_report(forReplay)); - #endif // FWRETRACT + // + // Controller Fan + // + TERN_(CONTROLLER_FAN_EDITABLE, gcode.M710_report(forReplay)); - /** - * Probe Offset - */ - #if HAS_BED_PROBE - config_heading(forReplay, PSTR("Z-Probe Offset"), false); - if (!forReplay) say_units(true); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - #if HAS_PROBE_XY_OFFSET - PSTR(" M851 X"), LINEAR_UNIT(probe.offset_xy.x), - SP_Y_STR, LINEAR_UNIT(probe.offset_xy.y), - SP_Z_STR - #else - PSTR(" M851 X0 Y0 Z") - #endif - , LINEAR_UNIT(probe.offset.z) - ); - #endif + // + // Power-Loss Recovery + // + TERN_(POWER_LOSS_RECOVERY, gcode.M413_report(forReplay)); - /** - * Bed Skew Correction - */ - #if ENABLED(SKEW_CORRECTION_GCODE) - CONFIG_ECHO_HEADING("Skew Factor: "); - CONFIG_ECHO_START(); - #if ENABLED(SKEW_CORRECTION_FOR_Z) - SERIAL_ECHOPAIR_F(" M852 I", LINEAR_UNIT(planner.skew_factor.xy), 6); - SERIAL_ECHOPAIR_F(" J", LINEAR_UNIT(planner.skew_factor.xz), 6); - SERIAL_ECHOLNPAIR_F(" K", LINEAR_UNIT(planner.skew_factor.yz), 6); - #else - SERIAL_ECHOLNPAIR_F(" M852 S", LINEAR_UNIT(planner.skew_factor.xy), 6); - #endif + // + // Firmware Retraction + // + #if ENABLED(FWRETRACT) + gcode.M207_report(forReplay); + gcode.M208_report(forReplay); + TERN_(FWRETRACT_AUTORETRACT, gcode.M209_report(forReplay)); #endif - #if HAS_TRINAMIC_CONFIG - - /** - * TMC stepper driver current - */ - CONFIG_ECHO_HEADING("Stepper driver current:"); - - #if AXIS_IS_TMC(X) || AXIS_IS_TMC(Y) || AXIS_IS_TMC(Z) - say_M906(forReplay); - #if AXIS_IS_TMC(X) - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.getMilliamps()); - #endif - #if AXIS_IS_TMC(Y) - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.getMilliamps()); - #endif - #if AXIS_IS_TMC(Z) - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.getMilliamps()); - #endif - SERIAL_EOL(); - #endif - - #if AXIS_IS_TMC(X2) || AXIS_IS_TMC(Y2) || AXIS_IS_TMC(Z2) - say_M906(forReplay); - SERIAL_ECHOPGM(" I1"); - #if AXIS_IS_TMC(X2) - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.getMilliamps()); - #endif - #if AXIS_IS_TMC(Y2) - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.getMilliamps()); - #endif - #if AXIS_IS_TMC(Z2) - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.getMilliamps()); - #endif - SERIAL_EOL(); - #endif - - #if AXIS_IS_TMC(Z3) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.getMilliamps()); - #endif - - #if AXIS_IS_TMC(Z4) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.getMilliamps()); - #endif - - #if AXIS_IS_TMC(E0) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T0 E", stepperE0.getMilliamps()); - #endif - #if AXIS_IS_TMC(E1) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T1 E", stepperE1.getMilliamps()); - #endif - #if AXIS_IS_TMC(E2) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T2 E", stepperE2.getMilliamps()); - #endif - #if AXIS_IS_TMC(E3) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T3 E", stepperE3.getMilliamps()); - #endif - #if AXIS_IS_TMC(E4) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T4 E", stepperE4.getMilliamps()); - #endif - #if AXIS_IS_TMC(E5) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T5 E", stepperE5.getMilliamps()); - #endif - #if AXIS_IS_TMC(E6) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T6 E", stepperE6.getMilliamps()); - #endif - #if AXIS_IS_TMC(E7) - say_M906(forReplay); - SERIAL_ECHOLNPAIR(" T7 E", stepperE7.getMilliamps()); - #endif - SERIAL_EOL(); - - /** - * TMC Hybrid Threshold - */ - #if ENABLED(HYBRID_THRESHOLD) - CONFIG_ECHO_HEADING("Hybrid Threshold:"); - #if AXIS_HAS_STEALTHCHOP(X) || AXIS_HAS_STEALTHCHOP(Y) || AXIS_HAS_STEALTHCHOP(Z) - say_M913(forReplay); - #if AXIS_HAS_STEALTHCHOP(X) - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.get_pwm_thrs()); - #endif - SERIAL_EOL(); - #endif - - #if AXIS_HAS_STEALTHCHOP(X2) || AXIS_HAS_STEALTHCHOP(Y2) || AXIS_HAS_STEALTHCHOP(Z2) - say_M913(forReplay); - SERIAL_ECHOPGM(" I1"); - #if AXIS_HAS_STEALTHCHOP(X2) - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.get_pwm_thrs()); - #endif - SERIAL_EOL(); - #endif - - #if AXIS_HAS_STEALTHCHOP(Z3) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.get_pwm_thrs()); - #endif - - #if AXIS_HAS_STEALTHCHOP(Z4) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.get_pwm_thrs()); - #endif - - #if AXIS_HAS_STEALTHCHOP(E0) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T0 E", stepperE0.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T1 E", stepperE1.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T2 E", stepperE2.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T3 E", stepperE3.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T4 E", stepperE4.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T5 E", stepperE5.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T6 E", stepperE6.get_pwm_thrs()); - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - say_M913(forReplay); - SERIAL_ECHOLNPAIR(" T7 E", stepperE7.get_pwm_thrs()); - #endif - SERIAL_EOL(); - #endif // HYBRID_THRESHOLD - - /** - * TMC Sensorless homing thresholds - */ - #if USE_SENSORLESS - CONFIG_ECHO_HEADING("StallGuard threshold:"); - #if X_SENSORLESS || Y_SENSORLESS || Z_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - #if X_SENSORLESS - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX.homing_threshold()); - #endif - #if Y_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY.homing_threshold()); - #endif - #if Z_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ.homing_threshold()); - #endif - SERIAL_EOL(); - #endif - - #if X2_SENSORLESS || Y2_SENSORLESS || Z2_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - SERIAL_ECHOPGM(" I1"); - #if X2_SENSORLESS - SERIAL_ECHOPAIR_P(SP_X_STR, stepperX2.homing_threshold()); - #endif - #if Y2_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Y_STR, stepperY2.homing_threshold()); - #endif - #if Z2_SENSORLESS - SERIAL_ECHOPAIR_P(SP_Z_STR, stepperZ2.homing_threshold()); - #endif - SERIAL_EOL(); - #endif - - #if Z3_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - SERIAL_ECHOLNPAIR(" I2 Z", stepperZ3.homing_threshold()); - #endif - - #if Z4_SENSORLESS - CONFIG_ECHO_START(); - say_M914(); - SERIAL_ECHOLNPAIR(" I3 Z", stepperZ4.homing_threshold()); - #endif - - #endif // USE_SENSORLESS - - /** - * TMC stepping mode - */ - #if HAS_STEALTHCHOP - CONFIG_ECHO_HEADING("Driver stepping mode:"); - #if AXIS_HAS_STEALTHCHOP(X) - const bool chop_x = stepperX.get_stored_stealthChop(); - #else - constexpr bool chop_x = false; - #endif - #if AXIS_HAS_STEALTHCHOP(Y) - const bool chop_y = stepperY.get_stored_stealthChop(); - #else - constexpr bool chop_y = false; - #endif - #if AXIS_HAS_STEALTHCHOP(Z) - const bool chop_z = stepperZ.get_stored_stealthChop(); - #else - constexpr bool chop_z = false; - #endif - - if (chop_x || chop_y || chop_z) { - say_M569(forReplay); - if (chop_x) SERIAL_ECHOPGM_P(SP_X_STR); - if (chop_y) SERIAL_ECHOPGM_P(SP_Y_STR); - if (chop_z) SERIAL_ECHOPGM_P(SP_Z_STR); - SERIAL_EOL(); - } - - #if AXIS_HAS_STEALTHCHOP(X2) - const bool chop_x2 = stepperX2.get_stored_stealthChop(); - #else - constexpr bool chop_x2 = false; - #endif - #if AXIS_HAS_STEALTHCHOP(Y2) - const bool chop_y2 = stepperY2.get_stored_stealthChop(); - #else - constexpr bool chop_y2 = false; - #endif - #if AXIS_HAS_STEALTHCHOP(Z2) - const bool chop_z2 = stepperZ2.get_stored_stealthChop(); - #else - constexpr bool chop_z2 = false; - #endif - - if (chop_x2 || chop_y2 || chop_z2) { - say_M569(forReplay, PSTR("I1")); - if (chop_x2) SERIAL_ECHOPGM_P(SP_X_STR); - if (chop_y2) SERIAL_ECHOPGM_P(SP_Y_STR); - if (chop_z2) SERIAL_ECHOPGM_P(SP_Z_STR); - SERIAL_EOL(); - } + // + // Probe Offset + // + TERN_(HAS_BED_PROBE, gcode.M851_report(forReplay)); - #if AXIS_HAS_STEALTHCHOP(Z3) - if (stepperZ3.get_stored_stealthChop()) { say_M569(forReplay, PSTR("I2 Z"), true); } - #endif + // + // Bed Skew Correction + // + TERN_(SKEW_CORRECTION_GCODE, gcode.M852_report(forReplay)); - #if AXIS_HAS_STEALTHCHOP(Z4) - if (stepperZ4.get_stored_stealthChop()) { say_M569(forReplay, PSTR("I3 Z"), true); } - #endif + #if HAS_TRINAMIC_CONFIG + // + // TMC Stepper driver current + // + gcode.M906_report(forReplay); - #if AXIS_HAS_STEALTHCHOP(E0) - if (stepperE0.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T0 E"), true); } - #endif - #if AXIS_HAS_STEALTHCHOP(E1) - if (stepperE1.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T1 E"), true); } - #endif - #if AXIS_HAS_STEALTHCHOP(E2) - if (stepperE2.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T2 E"), true); } - #endif - #if AXIS_HAS_STEALTHCHOP(E3) - if (stepperE3.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T3 E"), true); } - #endif - #if AXIS_HAS_STEALTHCHOP(E4) - if (stepperE4.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T4 E"), true); } - #endif - #if AXIS_HAS_STEALTHCHOP(E5) - if (stepperE5.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T5 E"), true); } - #endif - #if AXIS_HAS_STEALTHCHOP(E6) - if (stepperE6.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T6 E"), true); } - #endif - #if AXIS_HAS_STEALTHCHOP(E7) - if (stepperE7.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T7 E"), true); } - #endif + // + // TMC Hybrid Threshold + // + TERN_(HYBRID_THRESHOLD, gcode.M913_report(forReplay)); - #endif // HAS_STEALTHCHOP + // + // TMC Sensorless homing thresholds + // + TERN_(USE_SENSORLESS, gcode.M914_report(forReplay)); + #endif - #endif // HAS_TRINAMIC_CONFIG + // + // TMC stepping mode + // + TERN_(HAS_STEALTHCHOP, gcode.M569_report(forReplay)); - /** - * Linear Advance - */ - #if ENABLED(LIN_ADVANCE) - CONFIG_ECHO_HEADING("Linear Advance:"); - #if EXTRUDERS < 2 - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M900 K", planner.extruder_advance_K[0]); - #else - LOOP_L_N(i, EXTRUDERS) { - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR(" M900 T", int(i), " K", planner.extruder_advance_K[i]); - } - #endif - #endif + // + // Linear Advance + // + TERN_(LIN_ADVANCE, gcode.M900_report(forReplay)); - #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_PWM) - CONFIG_ECHO_HEADING("Stepper motor currents:"); - CONFIG_ECHO_START(); - #if HAS_MOTOR_CURRENT_PWM - SERIAL_ECHOLNPAIR_P( // PWM-based has 3 values: - PSTR(" M907 X"), stepper.motor_current_setting[0] // X and Y - , SP_Z_STR, stepper.motor_current_setting[1] // Z - , SP_E_STR, stepper.motor_current_setting[2] // E - ); - #elif HAS_MOTOR_CURRENT_SPI - SERIAL_ECHOPGM(" M907"); // SPI-based has 5 values: - LOOP_XYZE(q) { // X Y Z E (map to X Y Z E0 by default) - SERIAL_CHAR(' ', axis_codes[q]); - SERIAL_ECHO(stepper.motor_current_setting[q]); - } - SERIAL_CHAR(' ', 'B'); // B (maps to E1 by default) - SERIAL_ECHOLN(stepper.motor_current_setting[4]); - #endif - #elif ENABLED(HAS_MOTOR_CURRENT_I2C) // i2c-based has any number of values - // Values sent over i2c are not stored. - // Indexes map directly to drivers, not axes. - #elif ENABLED(HAS_MOTOR_CURRENT_DAC) // DAC-based has 4 values, for X Y Z E - // Values sent over i2c are not stored. Uses indirect mapping. + // + // Motor Current (SPI or PWM) + // + #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM + gcode.M907_report(forReplay); #endif - /** - * Advanced Pause filament load & unload lengths - */ - #if ENABLED(ADVANCED_PAUSE_FEATURE) - CONFIG_ECHO_HEADING("Filament load/unload lengths:"); - #if EXTRUDERS == 1 - say_M603(forReplay); - SERIAL_ECHOLNPAIR("L", LINEAR_UNIT(fc_settings[0].load_length), " U", LINEAR_UNIT(fc_settings[0].unload_length)); - #else - #define _ECHO_603(N) do{ say_M603(forReplay); SERIAL_ECHOLNPAIR("T" STRINGIFY(N) " L", LINEAR_UNIT(fc_settings[N].load_length), " U", LINEAR_UNIT(fc_settings[N].unload_length)); }while(0); - REPEAT(EXTRUDERS, _ECHO_603) - #endif - #endif + // + // Advanced Pause filament load & unload lengths + // + TERN_(ADVANCED_PAUSE_FEATURE, gcode.M603_report(forReplay)); - #if HAS_MULTI_EXTRUDER - CONFIG_ECHO_HEADING("Tool-changing:"); - CONFIG_ECHO_START(); - M217_report(true); - #endif + // + // Tool-changing Parameters + // + E_TERN_(gcode.M217_report(forReplay)); - #if ENABLED(BACKLASH_GCODE) - CONFIG_ECHO_HEADING("Backlash compensation:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR_P( - PSTR(" M425 F"), backlash.get_correction() - , SP_X_STR, LINEAR_UNIT(backlash.distance_mm.x) - , SP_Y_STR, LINEAR_UNIT(backlash.distance_mm.y) - , SP_Z_STR, LINEAR_UNIT(backlash.distance_mm.z) - #ifdef BACKLASH_SMOOTHING_MM - , PSTR(" S"), LINEAR_UNIT(backlash.smoothing_mm) - #endif - ); - #endif + // + // Backlash Compensation + // + TERN_(BACKLASH_GCODE, gcode.M425_report(forReplay)); - #if HAS_FILAMENT_SENSOR - CONFIG_ECHO_HEADING("Filament runout sensor:"); - CONFIG_ECHO_START(); - SERIAL_ECHOLNPAIR( - " M412 S", int(runout.enabled) - #if HAS_FILAMENT_RUNOUT_DISTANCE - , " D", LINEAR_UNIT(runout.runout_distance()) - #endif - ); - #endif + // + // Filament Runout Sensor + // + TERN_(HAS_FILAMENT_SENSOR, gcode.M412_report(forReplay)); #if HAS_ETHERNET - CONFIG_ECHO_HEADING("Ethernet:"); - if (!forReplay) { CONFIG_ECHO_START(); ETH0_report(); } + CONFIG_ECHO_HEADING("Ethernet"); + if (!forReplay) ETH0_report(); CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); MAC_report(); - CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); M552_report(); - CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); M553_report(); - CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); M554_report(); + CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); gcode.M552_report(); + CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); gcode.M553_report(); + CONFIG_ECHO_START(); SERIAL_ECHO_SP(2); gcode.M554_report(); #endif - #if HAS_MULTI_LANGUAGE - CONFIG_ECHO_HEADING("UI Language:"); - SERIAL_ECHO_MSG(" M414 S", int(ui.language)); - #endif + TERN_(HAS_MULTI_LANGUAGE, gcode.M414_report(forReplay)); } #endif // !DISABLE_M503 diff --git a/Marlin/src/module/settings.h b/Marlin/src/module/settings.h index b213de93a433..967d49c0738e 100644 --- a/Marlin/src/module/settings.h +++ b/Marlin/src/module/settings.h @@ -76,12 +76,15 @@ class MarlinSettings { //static void delete_mesh(); // necessary if we have a MAT //static void defrag_meshes(); // " #endif - #else + + #else // !EEPROM_SETTINGS + FORCE_INLINE static bool load() { reset(); report(); return true; } FORCE_INLINE static void first_load() { (void)load(); } - #endif + + #endif // !EEPROM_SETTINGS #if DISABLED(DISABLE_M503) static void report(const bool forReplay=false); @@ -105,7 +108,42 @@ class MarlinSettings { static bool _load(); static bool size_error(const uint16_t size); - #endif + + static int eeprom_index; + static uint16_t working_crc; + + static bool EEPROM_START(int eeprom_offset) { + if (!persistentStore.access_start()) { SERIAL_ECHO_MSG("No EEPROM."); return false; } + eeprom_index = eeprom_offset; + working_crc = 0; + return true; + } + + static void EEPROM_FINISH(void) { persistentStore.access_finish(); } + + template + static void EEPROM_SKIP(const T &VAR) { eeprom_index += sizeof(VAR); } + + template + static void EEPROM_WRITE(const T &VAR) { + persistentStore.write_data(eeprom_index, (const uint8_t *) &VAR, sizeof(VAR), &working_crc); + } + + template + static void EEPROM_READ(T &VAR) { + persistentStore.read_data(eeprom_index, (uint8_t *) &VAR, sizeof(VAR), &working_crc, !validating); + } + + static void EEPROM_READ(uint8_t *VAR, size_t sizeof_VAR) { + persistentStore.read_data(eeprom_index, VAR, sizeof_VAR, &working_crc, !validating); + } + + template + static void EEPROM_READ_ALWAYS(T &VAR) { + persistentStore.read_data(eeprom_index, (uint8_t *) &VAR, sizeof(VAR), &working_crc); + } + + #endif // EEPROM_SETTINGS }; extern MarlinSettings settings; diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 466f4f333afe..649f0d5d23f3 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -123,6 +123,10 @@ Stepper stepper; // Singleton bool L64XX_OK_to_power_up = false; // flag to keep L64xx steppers powered down after a reset or power up #endif +#if ENABLED(AUTO_POWER_CONTROL) + #include "../feature/power.h" +#endif + #if ENABLED(POWER_LOSS_RECOVERY) #include "../feature/powerloss.h" #endif @@ -131,6 +135,10 @@ Stepper stepper; // Singleton #include "../feature/spindle_laser.h" #endif +#if ENABLED(EXTENSIBLE_UI) + #include "../lcd/extui/ui_api.h" +#endif + // public: #if EITHER(HAS_EXTRA_ENDSTOPS, Z_STEPPER_AUTO_ALIGN) @@ -145,12 +153,14 @@ Stepper stepper; // Singleton #endif #endif +axis_flags_t Stepper::axis_enabled; // {0} + // private: block_t* Stepper::current_block; // (= nullptr) A pointer to the block currently being traced -uint8_t Stepper::last_direction_bits, // = 0 - Stepper::axis_did_move; // = 0 +axis_bits_t Stepper::last_direction_bits, // = 0 + Stepper::axis_did_move; // = 0 bool Stepper::abort_current_block; @@ -179,6 +189,10 @@ bool Stepper::abort_current_block; uint32_t Stepper::acceleration_time, Stepper::deceleration_time; uint8_t Stepper::steps_per_isr; +#if HAS_FREEZE_PIN + bool Stepper::frozen; // = false +#endif + IF_DISABLED(ADAPTIVE_STEP_SMOOTHING, constexpr) uint8_t Stepper::oversampling_factor; xyze_long_t Stepper::delta_error{0}; @@ -253,25 +267,30 @@ xyze_int8_t Stepper::count_direction{0}; }; #endif -#define DUAL_ENDSTOP_APPLY_STEP(A,V) \ - if (separate_multi_axis) { \ - if (A##_HOME_DIR < 0) { \ - if (!(TEST(endstops.state(), A##_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor) A##_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##2_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##2_motor) A##2_STEP_WRITE(V); \ - } \ - else { \ - if (!(TEST(endstops.state(), A##_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##_motor) A##_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##2_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##2_motor) A##2_STEP_WRITE(V); \ - } \ - } \ - else { \ - A##_STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ +#define MINDIR(A) (count_direction[_AXIS(A)] < 0) +#define MAXDIR(A) (count_direction[_AXIS(A)] > 0) + +#define STEPTEST(A,M,I) TERN0(HAS_ ##A## ##I## _ ##M, !(TEST(endstops.state(), A## ##I## _ ##M) && M## DIR(A)) && !locked_ ##A## ##I## _motor) + +#define DUAL_ENDSTOP_APPLY_STEP(A,V) \ + if (separate_multi_axis) { \ + if (ENABLED(A##_HOME_TO_MIN)) { \ + if (STEPTEST(A,MIN, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MIN,2)) A##2_STEP_WRITE(V); \ + } \ + else if (ENABLED(A##_HOME_TO_MAX)) { \ + if (STEPTEST(A,MAX, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MAX,2)) A##2_STEP_WRITE(V); \ + } \ + } \ + else { \ + A##_STEP_WRITE(V); \ + A##2_STEP_WRITE(V); \ } #define DUAL_SEPARATE_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ - if (!locked_##A##_motor) A##_STEP_WRITE(V); \ + if (!locked_##A## _motor) A## _STEP_WRITE(V); \ if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \ } \ else { \ @@ -279,68 +298,68 @@ xyze_int8_t Stepper::count_direction{0}; A##2_STEP_WRITE(V); \ } -#define TRIPLE_ENDSTOP_APPLY_STEP(A,V) \ - if (separate_multi_axis) { \ - if (A##_HOME_DIR < 0) { \ - if (!(TEST(endstops.state(), A##_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor) A##_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##2_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##2_motor) A##2_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##3_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##3_motor) A##3_STEP_WRITE(V); \ - } \ - else { \ - if (!(TEST(endstops.state(), A##_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##_motor) A##_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##2_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##2_motor) A##2_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##3_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##3_motor) A##3_STEP_WRITE(V); \ - } \ - } \ - else { \ - A##_STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ - A##3_STEP_WRITE(V); \ +#define TRIPLE_ENDSTOP_APPLY_STEP(A,V) \ + if (separate_multi_axis) { \ + if (ENABLED(A##_HOME_TO_MIN)) { \ + if (STEPTEST(A,MIN, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MIN,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MIN,3)) A##3_STEP_WRITE(V); \ + } \ + else if (ENABLED(A##_HOME_TO_MAX)) { \ + if (STEPTEST(A,MAX, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MAX,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MAX,3)) A##3_STEP_WRITE(V); \ + } \ + } \ + else { \ + A##_STEP_WRITE(V); \ + A##2_STEP_WRITE(V); \ + A##3_STEP_WRITE(V); \ } #define TRIPLE_SEPARATE_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ - if (!locked_##A##_motor) A##_STEP_WRITE(V); \ + if (!locked_##A## _motor) A## _STEP_WRITE(V); \ if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \ if (!locked_##A##3_motor) A##3_STEP_WRITE(V); \ } \ else { \ - A##_STEP_WRITE(V); \ + A## _STEP_WRITE(V); \ A##2_STEP_WRITE(V); \ A##3_STEP_WRITE(V); \ } -#define QUAD_ENDSTOP_APPLY_STEP(A,V) \ - if (separate_multi_axis) { \ - if (A##_HOME_DIR < 0) { \ - if (!(TEST(endstops.state(), A##_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##_motor) A##_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##2_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##2_motor) A##2_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##3_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##3_motor) A##3_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##4_MIN) && count_direction[_AXIS(A)] < 0) && !locked_##A##4_motor) A##4_STEP_WRITE(V); \ - } \ - else { \ - if (!(TEST(endstops.state(), A##_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##_motor) A##_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##2_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##2_motor) A##2_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##3_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##3_motor) A##3_STEP_WRITE(V); \ - if (!(TEST(endstops.state(), A##4_MAX) && count_direction[_AXIS(A)] > 0) && !locked_##A##4_motor) A##4_STEP_WRITE(V); \ - } \ - } \ - else { \ - A##_STEP_WRITE(V); \ - A##2_STEP_WRITE(V); \ - A##3_STEP_WRITE(V); \ - A##4_STEP_WRITE(V); \ +#define QUAD_ENDSTOP_APPLY_STEP(A,V) \ + if (separate_multi_axis) { \ + if (ENABLED(A##_HOME_TO_MIN)) { \ + if (STEPTEST(A,MIN, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MIN,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MIN,3)) A##3_STEP_WRITE(V); \ + if (STEPTEST(A,MIN,4)) A##4_STEP_WRITE(V); \ + } \ + else if (ENABLED(A##_HOME_TO_MAX)) { \ + if (STEPTEST(A,MAX, )) A## _STEP_WRITE(V); \ + if (STEPTEST(A,MAX,2)) A##2_STEP_WRITE(V); \ + if (STEPTEST(A,MAX,3)) A##3_STEP_WRITE(V); \ + if (STEPTEST(A,MAX,4)) A##4_STEP_WRITE(V); \ + } \ + } \ + else { \ + A## _STEP_WRITE(V); \ + A##2_STEP_WRITE(V); \ + A##3_STEP_WRITE(V); \ + A##4_STEP_WRITE(V); \ } #define QUAD_SEPARATE_APPLY_STEP(A,V) \ if (separate_multi_axis) { \ - if (!locked_##A##_motor) A##_STEP_WRITE(V); \ + if (!locked_##A## _motor) A## _STEP_WRITE(V); \ if (!locked_##A##2_motor) A##2_STEP_WRITE(V); \ if (!locked_##A##3_motor) A##3_STEP_WRITE(V); \ if (!locked_##A##4_motor) A##4_STEP_WRITE(V); \ } \ else { \ - A##_STEP_WRITE(V); \ + A## _STEP_WRITE(V); \ A##2_STEP_WRITE(V); \ A##3_STEP_WRITE(V); \ A##4_STEP_WRITE(V); \ @@ -374,7 +393,7 @@ xyze_int8_t Stepper::count_direction{0}; #else #define Y_APPLY_STEP(v,Q) do{ Y_STEP_WRITE(v); Y2_STEP_WRITE(v); }while(0) #endif -#else +#elif HAS_Y_AXIS #define Y_APPLY_DIR(v,Q) Y_DIR_WRITE(v) #define Y_APPLY_STEP(v,Q) Y_STEP_WRITE(v) #endif @@ -411,11 +430,24 @@ xyze_int8_t Stepper::count_direction{0}; #else #define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); }while(0) #endif -#else +#elif HAS_Z_AXIS #define Z_APPLY_DIR(v,Q) Z_DIR_WRITE(v) #define Z_APPLY_STEP(v,Q) Z_STEP_WRITE(v) #endif +#if LINEAR_AXES >= 4 + #define I_APPLY_DIR(v,Q) I_DIR_WRITE(v) + #define I_APPLY_STEP(v,Q) I_STEP_WRITE(v) +#endif +#if LINEAR_AXES >= 5 + #define J_APPLY_DIR(v,Q) J_DIR_WRITE(v) + #define J_APPLY_STEP(v,Q) J_STEP_WRITE(v) +#endif +#if LINEAR_AXES >= 6 + #define K_APPLY_DIR(v,Q) K_DIR_WRITE(v) + #define K_APPLY_STEP(v,Q) K_STEP_WRITE(v) +#endif + #if DISABLED(MIXING_EXTRUDER) #define E_APPLY_STEP(v,Q) E_STEP_WRITE(stepper_extruder, v) #endif @@ -451,6 +483,89 @@ xyze_int8_t Stepper::count_direction{0}; #define DIR_WAIT_AFTER() #endif +void Stepper::enable_axis(const AxisEnum axis) { + #define _CASE_ENABLE(N) case N##_AXIS: ENABLE_AXIS_##N(); break; + switch (axis) { + LINEAR_AXIS_CODE( + _CASE_ENABLE(X), _CASE_ENABLE(Y), _CASE_ENABLE(Z), + _CASE_ENABLE(I), _CASE_ENABLE(J), _CASE_ENABLE(K) + ); + default: break; + } + mark_axis_enabled(axis); +} + +bool Stepper::disable_axis(const AxisEnum axis) { + mark_axis_disabled(axis); + // If all the axes that share the enabled bit are disabled + const bool can_disable = can_axis_disable(axis); + if (can_disable) { + #define _CASE_DISABLE(N) case N##_AXIS: DISABLE_AXIS_##N(); break; + switch (axis) { + LINEAR_AXIS_CODE( + _CASE_DISABLE(X), _CASE_DISABLE(Y), _CASE_DISABLE(Z), + _CASE_DISABLE(I), _CASE_DISABLE(J), _CASE_DISABLE(K) + ); + default: break; + } + } + return can_disable; +} + +#if HAS_EXTRUDERS + + void Stepper::enable_extruder(E_TERN_(const uint8_t eindex)) { + IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr uint8_t eindex = 0); + #define _CASE_ENA_E(N) case N: ENABLE_AXIS_E##N(); mark_axis_enabled(E_AXIS E_OPTARG(eindex)); break; + switch (eindex) { + REPEAT(E_STEPPERS, _CASE_ENA_E) + } + } + + bool Stepper::disable_extruder(E_TERN_(const uint8_t eindex)) { + IF_DISABLED(HAS_MULTI_EXTRUDER, constexpr uint8_t eindex = 0); + mark_axis_disabled(E_AXIS E_OPTARG(eindex)); + const bool can_disable = can_axis_disable(E_AXIS E_OPTARG(eindex)); + if (can_disable) { + #define _CASE_DIS_E(N) case N: DISABLE_AXIS_E##N(); break; + switch (eindex) { REPEAT(E_STEPPERS, _CASE_DIS_E) } + } + return can_disable; + } + + void Stepper::enable_e_steppers() { + #define _ENA_E(N) ENABLE_EXTRUDER(N); + REPEAT(EXTRUDERS, _ENA_E) + } + + void Stepper::disable_e_steppers() { + #define _DIS_E(N) DISABLE_EXTRUDER(N); + REPEAT(EXTRUDERS, _DIS_E) + } + +#endif + +void Stepper::enable_all_steppers() { + TERN_(AUTO_POWER_CONTROL, powerManager.power_on()); + LINEAR_AXIS_CODE( + enable_axis(X_AXIS), enable_axis(Y_AXIS), enable_axis(Z_AXIS), + enable_axis(I_AXIS), enable_axis(J_AXIS), enable_axis(K_AXIS) + ); + enable_e_steppers(); + + TERN_(EXTENSIBLE_UI, ExtUI::onSteppersEnabled()); +} + +void Stepper::disable_all_steppers() { + LINEAR_AXIS_CODE( + disable_axis(X_AXIS), disable_axis(Y_AXIS), disable_axis(Z_AXIS), + disable_axis(I_AXIS), disable_axis(J_AXIS), disable_axis(K_AXIS) + ); + disable_e_steppers(); + + TERN_(EXTENSIBLE_UI, ExtUI::onSteppersDisabled()); +} + /** * Set the stepper direction of each axis * @@ -472,15 +587,12 @@ void Stepper::set_directions() { count_direction[_AXIS(A)] = 1; \ } - #if HAS_X_DIR - SET_STEP_DIR(X); // A - #endif - #if HAS_Y_DIR - SET_STEP_DIR(Y); // B - #endif - #if HAS_Z_DIR - SET_STEP_DIR(Z); // C - #endif + TERN_(HAS_X_DIR, SET_STEP_DIR(X)); // A + TERN_(HAS_Y_DIR, SET_STEP_DIR(Y)); // B + TERN_(HAS_Z_DIR, SET_STEP_DIR(Z)); // C + TERN_(HAS_I_DIR, SET_STEP_DIR(I)); + TERN_(HAS_J_DIR, SET_STEP_DIR(J)); + TERN_(HAS_K_DIR, SET_STEP_DIR(K)); #if DISABLED(LIN_ADVANCE) #if ENABLED(MIXING_EXTRUDER) @@ -494,7 +606,7 @@ void Stepper::set_directions() { MIXER_STEPPER_LOOP(j) NORM_E_DIR(j); count_direction.e = 1; } - #else + #elif HAS_EXTRUDERS if (motor_direction(E_AXIS)) { REV_E_DIR(stepper_extruder); count_direction.e = -1; @@ -1407,14 +1519,10 @@ void Stepper::isr() { // Get the interval to the next ISR call const uint32_t interval = _MIN( + uint32_t(HAL_TIMER_TYPE_MAX), // Come back in a very long time nextMainISR // Time until the next Pulse / Block phase - #if ENABLED(LIN_ADVANCE) - , nextAdvanceISR // Come back early for Linear Advance? - #endif - #if ENABLED(INTEGRATED_BABYSTEPPING) - , nextBabystepISR // Come back early for Babystepping? - #endif - , uint32_t(HAL_TIMER_TYPE_MAX) // Come back in a very long time + OPTARG(LIN_ADVANCE, nextAdvanceISR) // Come back early for Linear Advance? + OPTARG(INTEGRATED_BABYSTEPPING, nextBabystepISR) // Come back early for Babystepping? ); // @@ -1531,6 +1639,9 @@ void Stepper::pulse_phase_isr() { // If there is no current block, do nothing if (!current_block) return; + // Skipping step processing causes motion to freeze + if (TERN0(HAS_FREEZE_PIN, frozen)) return; + // Count of pending loops and events for this iteration const uint32_t pending_events = step_event_count - step_events_completed; uint8_t events_to_do = _MIN(pending_events, steps_per_isr); @@ -1577,7 +1688,7 @@ void Stepper::pulse_phase_isr() { const bool is_page = IS_PAGE(current_block); #if ENABLED(DIRECT_STEPPING) - + // TODO (DerAndere): Add support for LINEAR_AXES >= 4 if (is_page) { #if STEPPER_PAGE_FORMAT == SP_4x4D_128 @@ -1602,7 +1713,7 @@ void Stepper::pulse_phase_isr() { case 0: { const uint8_t low = page_step_state.page[page_step_state.segment_idx], high = page_step_state.page[page_step_state.segment_idx + 1]; - uint8_t dm = last_direction_bits; + axis_bits_t dm = last_direction_bits; PAGE_SEGMENT_UPDATE(X, low >> 4); PAGE_SEGMENT_UPDATE(Y, low & 0xF); @@ -1620,7 +1731,7 @@ void Stepper::pulse_phase_isr() { PAGE_PULSE_PREP(X); PAGE_PULSE_PREP(Y); PAGE_PULSE_PREP(Z); - PAGE_PULSE_PREP(E); + TERN_(HAS_EXTRUDERS, PAGE_PULSE_PREP(E)); page_step_state.segment_steps++; @@ -1653,7 +1764,7 @@ void Stepper::pulse_phase_isr() { PAGE_PULSE_PREP(X); PAGE_PULSE_PREP(Y); PAGE_PULSE_PREP(Z); - PAGE_PULSE_PREP(E); + TERN_(HAS_EXTRUDERS, PAGE_PULSE_PREP(E)); page_step_state.segment_steps++; @@ -1693,16 +1804,25 @@ void Stepper::pulse_phase_isr() { #if HAS_Z_STEP PULSE_PREP(Z); #endif + #if HAS_I_STEP + PULSE_PREP(I); + #endif + #if HAS_J_STEP + PULSE_PREP(J); + #endif + #if HAS_K_STEP + PULSE_PREP(K); + #endif #if EITHER(LIN_ADVANCE, MIXING_EXTRUDER) delta_error.e += advance_dividend.e; if (delta_error.e >= 0) { - count_position.e += count_direction.e; #if ENABLED(LIN_ADVANCE) delta_error.e -= advance_divisor; // Don't step E here - But remember the number of steps to perform motor_direction(E_AXIS) ? --LA_steps : ++LA_steps; #else + count_position.e += count_direction.e; step_needed.e = true; #endif } @@ -1728,6 +1848,15 @@ void Stepper::pulse_phase_isr() { #if HAS_Z_STEP PULSE_START(Z); #endif + #if HAS_I_STEP + PULSE_START(I); + #endif + #if HAS_J_STEP + PULSE_START(J); + #endif + #if HAS_K_STEP + PULSE_START(K); + #endif #if DISABLED(LIN_ADVANCE) #if ENABLED(MIXING_EXTRUDER) @@ -1757,6 +1886,15 @@ void Stepper::pulse_phase_isr() { #if HAS_Z_STEP PULSE_STOP(Z); #endif + #if HAS_I_STEP + PULSE_STOP(I); + #endif + #if HAS_J_STEP + PULSE_STOP(J); + #endif + #if HAS_K_STEP + PULSE_STOP(K); + #endif #if DISABLED(LIN_ADVANCE) #if ENABLED(MIXING_EXTRUDER) @@ -1791,6 +1929,7 @@ uint32_t Stepper::block_phase_isr() { // If current block is finished, reset pointer and finalize state if (step_events_completed >= step_event_count) { #if ENABLED(DIRECT_STEPPING) + // TODO (DerAndere): Add support for LINEAR_AXES >= 4 #if STEPPER_PAGE_FORMAT == SP_4x4D_128 #define PAGE_SEGMENT_UPDATE_POS(AXIS) \ count_position[_AXIS(AXIS)] += page_step_state.bd[_AXIS(AXIS)] - 128 * 7; @@ -1853,7 +1992,7 @@ uint32_t Stepper::block_phase_isr() { laser_trap.acc_step_count += current_block->laser.entry_per; if (laser_trap.cur_power < current_block->laser.power) laser_trap.cur_power++; } - cutter.set_ocr_power(laser_trap.cur_power); + cutter.ocr_set_power(laser_trap.cur_power); } } #else @@ -1862,7 +2001,7 @@ uint32_t Stepper::block_phase_isr() { else { laser_trap.till_update = LASER_POWER_INLINE_TRAPEZOID_CONT_PER; laser_trap.cur_power = (current_block->laser.power * acc_step_rate) / current_block->nominal_rate; - cutter.set_ocr_power(laser_trap.cur_power); // Cycle efficiency is irrelevant it the last line was many cycles + cutter.ocr_set_power(laser_trap.cur_power); // Cycle efficiency is irrelevant it the last line was many cycles } #endif } @@ -1930,7 +2069,7 @@ uint32_t Stepper::block_phase_isr() { laser_trap.acc_step_count += current_block->laser.exit_per; if (laser_trap.cur_power > current_block->laser.power_exit) laser_trap.cur_power--; } - cutter.set_ocr_power(laser_trap.cur_power); + cutter.ocr_set_power(laser_trap.cur_power); } } #else @@ -1939,7 +2078,7 @@ uint32_t Stepper::block_phase_isr() { else { laser_trap.till_update = LASER_POWER_INLINE_TRAPEZOID_CONT_PER; laser_trap.cur_power = (current_block->laser.power * step_rate) / current_block->nominal_rate; - cutter.set_ocr_power(laser_trap.cur_power); // Cycle efficiency isn't relevant when the last line was many cycles + cutter.ocr_set_power(laser_trap.cur_power); // Cycle efficiency isn't relevant when the last line was many cycles } #endif } @@ -1967,7 +2106,7 @@ uint32_t Stepper::block_phase_isr() { if (laser_trap.enabled) { if (!laser_trap.cruise_set) { laser_trap.cur_power = current_block->laser.power; - cutter.set_ocr_power(laser_trap.cur_power); + cutter.ocr_set_power(laser_trap.cur_power); laser_trap.cruise_set = true; } #if ENABLED(LASER_POWER_INLINE_TRAPEZOID_CONT) @@ -1988,9 +2127,18 @@ uint32_t Stepper::block_phase_isr() { // Anything in the buffer? if ((current_block = planner.get_current_block())) { - // Sync block? Sync the stepper counts and return - while (TEST(current_block->flag, BLOCK_BIT_SYNC_POSITION)) { - _set_position(current_block->position); + // Sync block? Sync the stepper counts or fan speeds and return + while (current_block->flag & BLOCK_MASK_SYNC) { + + #if ENABLED(LASER_SYNCHRONOUS_M106_M107) + const bool is_sync_fans = TEST(current_block->flag, BLOCK_BIT_SYNC_FANS); + if (is_sync_fans) planner.sync_fan_speeds(current_block->fan_speed); + #else + constexpr bool is_sync_fans = false; + #endif + + if (!is_sync_fans) _set_position(current_block->position); + discard_current_block(); // Try to get a new block @@ -2086,14 +2234,19 @@ uint32_t Stepper::block_phase_isr() { #define Z_MOVE_TEST !!current_block->steps.c #endif - uint8_t axis_bits = 0; - if (X_MOVE_TEST) SBI(axis_bits, A_AXIS); - if (Y_MOVE_TEST) SBI(axis_bits, B_AXIS); - if (Z_MOVE_TEST) SBI(axis_bits, C_AXIS); - //if (!!current_block->steps.e) SBI(axis_bits, E_AXIS); - //if (!!current_block->steps.a) SBI(axis_bits, X_HEAD); - //if (!!current_block->steps.b) SBI(axis_bits, Y_HEAD); - //if (!!current_block->steps.c) SBI(axis_bits, Z_HEAD); + axis_bits_t axis_bits = 0; + LINEAR_AXIS_CODE( + if (X_MOVE_TEST) SBI(axis_bits, A_AXIS), + if (Y_MOVE_TEST) SBI(axis_bits, B_AXIS), + if (Z_MOVE_TEST) SBI(axis_bits, C_AXIS), + if (current_block->steps.i) SBI(axis_bits, I_AXIS), + if (current_block->steps.j) SBI(axis_bits, J_AXIS), + if (current_block->steps.k) SBI(axis_bits, K_AXIS) + ); + //if (current_block->steps.e) SBI(axis_bits, E_AXIS); + //if (current_block->steps.a) SBI(axis_bits, X_HEAD); + //if (current_block->steps.b) SBI(axis_bits, Y_HEAD); + //if (current_block->steps.c) SBI(axis_bits, Z_HEAD); axis_did_move = axis_bits; // No acceleration / deceleration time elapsed so far @@ -2130,11 +2283,9 @@ uint32_t Stepper::block_phase_isr() { accelerate_until = current_block->accelerate_until << oversampling; decelerate_after = current_block->decelerate_after << oversampling; - #if ENABLED(MIXING_EXTRUDER) - MIXER_STEPPER_SETUP(); - #endif + TERN_(MIXING_EXTRUDER, mixer.stepper_setup(current_block->b_color)); - TERN_(HAS_MULTI_EXTRUDER, stepper_extruder = current_block->extruder); + E_TERN_(stepper_extruder = current_block->extruder); // Initialize the trapezoid generator from the current block. #if ENABLED(LIN_ADVANCE) @@ -2157,7 +2308,7 @@ uint32_t Stepper::block_phase_isr() { || current_block->direction_bits != last_direction_bits || TERN(MIXING_EXTRUDER, false, stepper_extruder != last_moved_extruder) ) { - TERN_(HAS_MULTI_EXTRUDER, last_moved_extruder = stepper_extruder); + E_TERN_(last_moved_extruder = stepper_extruder); TERN_(HAS_L64XX, L64XX_OK_to_power_up = true); set_directions(current_block->direction_bits); } @@ -2176,14 +2327,14 @@ uint32_t Stepper::block_phase_isr() { #endif // Always have PWM in this case if (stat.isPlanned) { // Planner controls the laser - cutter.set_ocr_power( + cutter.ocr_set_power( stat.isEnabled ? laser_trap.cur_power : 0 // ON with power or OFF ); } #else if (stat.isPlanned) { // Planner controls the laser - #if ENABLED(SPINDLE_LASER_PWM) - cutter.set_ocr_power( + #if ENABLED(SPINDLE_LASER_USE_PWM) + cutter.ocr_set_power( stat.isEnabled ? current_block->laser.power : 0 // ON with power or OFF ); #else @@ -2206,7 +2357,7 @@ uint32_t Stepper::block_phase_isr() { // If delayed Z enable, enable it now. This option will severely interfere with // timing between pulses when chaining motion between blocks, and it could lead // to lost steps in both X and Y axis, so avoid using it unless strictly necessary!! - if (current_block->steps.z) ENABLE_AXIS_Z(); + if (current_block->steps.z) enable_axis(Z_AXIS); #endif // Mark the time_nominal as not calculated yet @@ -2230,8 +2381,8 @@ uint32_t Stepper::block_phase_isr() { // This should mean ending file with 'M5 I' will stop the laser; thus the inline flag isn't needed const power_status_t stat = planner.laser_inline.status; if (stat.isPlanned) { // Planner controls the laser - #if ENABLED(SPINDLE_LASER_PWM) - cutter.set_ocr_power( + #if ENABLED(SPINDLE_LASER_USE_PWM) + cutter.ocr_set_power( stat.isEnabled ? planner.laser_inline.power : 0 // ON with power or OFF ); #else @@ -2276,15 +2427,23 @@ uint32_t Stepper::block_phase_isr() { #if ENABLED(MIXING_EXTRUDER) // We don't know which steppers will be stepped because LA loop follows, // with potentially multiple steps. Set all. - if (LA_steps > 0) + if (LA_steps > 0) { MIXER_STEPPER_LOOP(j) NORM_E_DIR(j); - else if (LA_steps < 0) + count_direction.e = 1; + } + else if (LA_steps < 0) { MIXER_STEPPER_LOOP(j) REV_E_DIR(j); + count_direction.e = -1; + } #else - if (LA_steps > 0) + if (LA_steps > 0) { NORM_E_DIR(stepper_extruder); - else if (LA_steps < 0) + count_direction.e = 1; + } + else if (LA_steps < 0) { REV_E_DIR(stepper_extruder); + count_direction.e = -1; + } #endif DIR_WAIT_AFTER(); @@ -2305,6 +2464,8 @@ uint32_t Stepper::block_phase_isr() { AWAIT_LOW_PULSE(); #endif + count_position.e += count_direction.e; + // Set the STEP pulse ON #if ENABLED(MIXING_EXTRUDER) E_STEP_WRITE(mixer.get_next_stepper(), !INVERT_E_STEP_PIN); @@ -2355,7 +2516,7 @@ uint32_t Stepper::block_phase_isr() { // Check if the given block is busy or not - Must not be called from ISR contexts // The current_block could change in the middle of the read by an Stepper ISR, so // we must explicitly prevent that! -bool Stepper::is_block_busy(const block_t* const block) { +bool Stepper::is_block_busy(const block_t * const block) { #ifdef __AVR__ // A SW memory barrier, to ensure GCC does not overoptimize loops #define sw_barrier() asm volatile("": : :"memory"); @@ -2365,7 +2526,7 @@ bool Stepper::is_block_busy(const block_t* const block) { // This works because stepper ISRs happen at a slower rate than // successive reads of a variable, so 2 consecutive reads with // the same value means no interrupt updated it. - block_t* vold, *vnew = current_block; + block_t *vold, *vnew = current_block; sw_barrier(); do { vold = vnew; @@ -2415,6 +2576,15 @@ void Stepper::init() { Z4_DIR_INIT(); #endif #endif + #if HAS_I_DIR + I_DIR_INIT(); + #endif + #if HAS_J_DIR + J_DIR_INIT(); + #endif + #if HAS_K_DIR + K_DIR_INIT(); + #endif #if HAS_E0_DIR E0_DIR_INIT(); #endif @@ -2473,6 +2643,18 @@ void Stepper::init() { if (!Z_ENABLE_ON) Z4_ENABLE_WRITE(HIGH); #endif #endif + #if HAS_I_ENABLE + I_ENABLE_INIT(); + if (!I_ENABLE_ON) I_ENABLE_WRITE(HIGH); + #endif + #if HAS_J_ENABLE + J_ENABLE_INIT(); + if (!J_ENABLE_ON) J_ENABLE_WRITE(HIGH); + #endif + #if HAS_K_ENABLE + K_ENABLE_INIT(); + if (!K_ENABLE_ON) K_ENABLE_WRITE(HIGH); + #endif #if HAS_E0_ENABLE E0_ENABLE_INIT(); if (!E_ENABLE_ON) E0_ENABLE_WRITE(HIGH); @@ -2549,11 +2731,20 @@ void Stepper::init() { #endif AXIS_INIT(Z, Z); #endif + #if HAS_I_STEP + AXIS_INIT(I, I); + #endif + #if HAS_J_STEP + AXIS_INIT(J, J); + #endif + #if HAS_K_STEP + AXIS_INIT(K, K); + #endif #if E_STEPPERS && HAS_E0_STEP E_AXIS_INIT(0); #endif - #if E_STEPPERS > 1 && HAS_E1_STEP + #if (E_STEPPERS > 1 || ENABLED(E_DUAL_STEPPER_DRIVERS)) && HAS_E1_STEP E_AXIS_INIT(1); #endif #if E_STEPPERS > 2 && HAS_E2_STEP @@ -2582,9 +2773,16 @@ void Stepper::init() { #endif // Init direction bits for first moves - set_directions((INVERT_X_DIR ? _BV(X_AXIS) : 0) - | (INVERT_Y_DIR ? _BV(Y_AXIS) : 0) - | (INVERT_Z_DIR ? _BV(Z_AXIS) : 0)); + set_directions(0 + LINEAR_AXIS_GANG( + | TERN0(INVERT_X_DIR, _BV(X_AXIS)), + | TERN0(INVERT_Y_DIR, _BV(Y_AXIS)), + | TERN0(INVERT_Z_DIR, _BV(Z_AXIS)), + | TERN0(INVERT_I_DIR, _BV(I_AXIS)), + | TERN0(INVERT_J_DIR, _BV(J_AXIS)), + | TERN0(INVERT_K_DIR, _BV(K_AXIS)) + ) + ); #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM initialized = true; @@ -2595,30 +2793,32 @@ void Stepper::init() { /** * Set the stepper positions directly in steps * - * The input is based on the typical per-axis XYZ steps. + * The input is based on the typical per-axis XYZE steps. * For CORE machines XYZ needs to be translated to ABC. * * This allows get_axis_position_mm to correctly - * derive the current XYZ position later on. + * derive the current XYZE position later on. */ -void Stepper::_set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e) { - #if CORE_IS_XY - // corexy positioning - // these equations follow the form of the dA and dB equations on https://www.corexy.com/theory.html - count_position.set(a + b, CORESIGN(a - b), c); - #elif CORE_IS_XZ - // corexz planning - count_position.set(a + c, b, CORESIGN(a - c)); - #elif CORE_IS_YZ - // coreyz planning - count_position.set(a, b + c, CORESIGN(b - c)); - #elif ENABLED(MARKFORGED_XY) - count_position.set(a - b, b, c); +void Stepper::_set_position(const abce_long_t &spos) { + #if EITHER(IS_CORE, MARKFORGED_XY) + #if CORE_IS_XY + // corexy positioning + // these equations follow the form of the dA and dB equations on https://www.corexy.com/theory.html + count_position.set(spos.a + spos.b, CORESIGN(spos.a - spos.b), spos.c); + #elif CORE_IS_XZ + // corexz planning + count_position.set(spos.a + spos.c, spos.b, CORESIGN(spos.a - spos.c)); + #elif CORE_IS_YZ + // coreyz planning + count_position.set(spos.a, spos.b + spos.c, CORESIGN(spos.b - spos.c)); + #elif ENABLED(MARKFORGED_XY) + count_position.set(spos.a - spos.b, spos.b, spos.c); + #endif + TERN_(HAS_EXTRUDERS, count_position.e = spos.e); #else // default non-h-bot planning - count_position.set(a, b, c); + count_position = spos; #endif - count_position.e = e; } /** @@ -2641,10 +2841,10 @@ int32_t Stepper::position(const AxisEnum axis) { } // Set the current position in steps -void Stepper::set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e) { +void Stepper::set_position(const xyze_long_t &spos) { planner.synchronize(); const bool was_enabled = suspend(); - _set_position(a, b, c, e); + _set_position(spos); if (was_enabled) wake_up(); } @@ -2712,17 +2912,27 @@ int32_t Stepper::triggered_position(const AxisEnum axis) { return v; } +#if ANY(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY, IS_SCARA, DELTA) + #define SAYS_A 1 +#endif +#if ANY(CORE_IS_XY, CORE_IS_YZ, MARKFORGED_XY, IS_SCARA, DELTA) + #define SAYS_B 1 +#endif +#if ANY(CORE_IS_XZ, CORE_IS_YZ, DELTA) + #define SAYS_C 1 +#endif + void Stepper::report_a_position(const xyz_long_t &pos) { - #if ANY(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY, DELTA, IS_SCARA) - SERIAL_ECHOPAIR(STR_COUNT_A, pos.x, " B:", pos.y); - #else - SERIAL_ECHOPAIR_P(PSTR(STR_COUNT_X), pos.x, SP_Y_LBL, pos.y); - #endif - #if ANY(CORE_IS_XZ, CORE_IS_YZ, DELTA) - SERIAL_ECHOLNPAIR(" C:", pos.z); - #else - SERIAL_ECHOLNPAIR_P(SP_Z_LBL, pos.z); - #endif + SERIAL_ECHOLNPGM_P( + LIST_N(DOUBLE(LINEAR_AXES), + TERN(SAYS_A, PSTR(STR_COUNT_A), PSTR(STR_COUNT_X)), pos.x, + TERN(SAYS_B, PSTR("B:"), SP_Y_LBL), pos.y, + TERN(SAYS_C, PSTR("C:"), SP_Z_LBL), pos.z, + SP_I_LBL, pos.i, + SP_J_LBL, pos.j, + SP_K_LBL, pos.k + ) + ); } void Stepper::report_positions() { @@ -2743,7 +2953,7 @@ void Stepper::report_positions() { #if ENABLED(BABYSTEPPING) - #define _ENABLE_AXIS(AXIS) ENABLE_AXIS_## AXIS() + #define _ENABLE_AXIS(A) enable_axis(_AXIS(A)) #define _READ_DIR(AXIS) AXIS ##_DIR_READ() #define _INVERT_DIR(AXIS) INVERT_## AXIS ##_DIR #define _APPLY_DIR(AXIS, INVERT) AXIS ##_APPLY_DIR(INVERT, true) @@ -2830,9 +3040,7 @@ void Stepper::report_positions() { // No other ISR should ever interrupt this! void Stepper::do_babystep(const AxisEnum axis, const bool direction) { - #if DISABLED(INTEGRATED_BABYSTEPPING) - cli(); - #endif + IF_DISABLED(INTEGRATED_BABYSTEPPING, cli()); switch (axis) { @@ -2873,38 +3081,94 @@ void Stepper::report_positions() { const bool z_direction = direction ^ BABYSTEP_INVERT_Z; - ENABLE_AXIS_X(); - ENABLE_AXIS_Y(); - ENABLE_AXIS_Z(); + LINEAR_AXIS_CODE( + enable_axis(X_AXIS), enable_axis(Y_AXIS), enable_axis(Z_AXIS), + enable_axis(I_AXIS), enable_axis(J_AXIS), enable_axis(K_AXIS) + ); DIR_WAIT_BEFORE(); - const xyz_byte_t old_dir = { X_DIR_READ(), Y_DIR_READ(), Z_DIR_READ() }; + const xyz_byte_t old_dir = LINEAR_AXIS_ARRAY( + X_DIR_READ(), Y_DIR_READ(), Z_DIR_READ(), + I_DIR_READ(), J_DIR_READ(), K_DIR_READ() + ); X_DIR_WRITE(INVERT_X_DIR ^ z_direction); - Y_DIR_WRITE(INVERT_Y_DIR ^ z_direction); - Z_DIR_WRITE(INVERT_Z_DIR ^ z_direction); + #ifdef Y_DIR_WRITE + Y_DIR_WRITE(INVERT_Y_DIR ^ z_direction); + #endif + #ifdef Z_DIR_WRITE + Z_DIR_WRITE(INVERT_Z_DIR ^ z_direction); + #endif + #ifdef I_DIR_WRITE + I_DIR_WRITE(INVERT_I_DIR ^ z_direction); + #endif + #ifdef J_DIR_WRITE + J_DIR_WRITE(INVERT_J_DIR ^ z_direction); + #endif + #ifdef K_DIR_WRITE + K_DIR_WRITE(INVERT_K_DIR ^ z_direction); + #endif DIR_WAIT_AFTER(); _SAVE_START(); X_STEP_WRITE(!INVERT_X_STEP_PIN); - Y_STEP_WRITE(!INVERT_Y_STEP_PIN); - Z_STEP_WRITE(!INVERT_Z_STEP_PIN); + #ifdef Y_STEP_WRITE + Y_STEP_WRITE(!INVERT_Y_STEP_PIN); + #endif + #ifdef Z_STEP_WRITE + Z_STEP_WRITE(!INVERT_Z_STEP_PIN); + #endif + #ifdef I_STEP_WRITE + I_STEP_WRITE(!INVERT_I_STEP_PIN); + #endif + #ifdef J_STEP_WRITE + J_STEP_WRITE(!INVERT_J_STEP_PIN); + #endif + #ifdef K_STEP_WRITE + K_STEP_WRITE(!INVERT_K_STEP_PIN); + #endif _PULSE_WAIT(); X_STEP_WRITE(INVERT_X_STEP_PIN); - Y_STEP_WRITE(INVERT_Y_STEP_PIN); - Z_STEP_WRITE(INVERT_Z_STEP_PIN); + #ifdef Y_STEP_WRITE + Y_STEP_WRITE(INVERT_Y_STEP_PIN); + #endif + #ifdef Z_STEP_WRITE + Z_STEP_WRITE(INVERT_Z_STEP_PIN); + #endif + #ifdef I_STEP_WRITE + I_STEP_WRITE(INVERT_I_STEP_PIN); + #endif + #ifdef J_STEP_WRITE + J_STEP_WRITE(INVERT_J_STEP_PIN); + #endif + #ifdef K_STEP_WRITE + K_STEP_WRITE(INVERT_K_STEP_PIN); + #endif // Restore direction bits EXTRA_DIR_WAIT_BEFORE(); X_DIR_WRITE(old_dir.x); - Y_DIR_WRITE(old_dir.y); - Z_DIR_WRITE(old_dir.z); + #ifdef Y_DIR_WRITE + Y_DIR_WRITE(old_dir.y); + #endif + #ifdef Z_DIR_WRITE + Z_DIR_WRITE(old_dir.z); + #endif + #ifdef I_DIR_WRITE + I_DIR_WRITE(old_dir.i); + #endif + #ifdef J_DIR_WRITE + J_DIR_WRITE(old_dir.j); + #endif + #ifdef K_DIR_WRITE + K_DIR_WRITE(old_dir.k); + #endif EXTRA_DIR_WAIT_AFTER(); @@ -2912,12 +3176,20 @@ void Stepper::report_positions() { } break; + #if LINEAR_AXES >= 4 + case I_AXIS: BABYSTEP_AXIS(I, 0, direction); break; + #endif + #if LINEAR_AXES >= 5 + case J_AXIS: BABYSTEP_AXIS(J, 0, direction); break; + #endif + #if LINEAR_AXES >= 6 + case K_AXIS: BABYSTEP_AXIS(K, 0, direction); break; + #endif + default: break; } - #if DISABLED(INTEGRATED_BABYSTEPPING) - sei(); - #endif + IF_DISABLED(INTEGRATED_BABYSTEPPING, sei()); } #endif // BABYSTEPPING @@ -2974,7 +3246,7 @@ void Stepper::report_positions() { #if HAS_MOTOR_CURRENT_SPI - //SERIAL_ECHOLNPAIR("Digipotss current ", current); + //SERIAL_ECHOLNPGM("Digipotss current ", current); const uint8_t digipot_ch[] = DIGIPOT_CHANNELS; set_digipot_value_spi(digipot_ch[driver], current); @@ -3252,6 +3524,15 @@ void Stepper::report_positions() { #if HAS_E7_MS_PINS case 10: WRITE(E7_MS1_PIN, ms1); break; #endif + #if HAS_I_MICROSTEPS + case 11: WRITE(I_MS1_PIN, ms1); break + #endif + #if HAS_J_MICROSTEPS + case 12: WRITE(J_MS1_PIN, ms1); break + #endif + #if HAS_K_MICROSTEPS + case 13: WRITE(K_MS1_PIN, ms1); break + #endif } if (ms2 >= 0) switch (driver) { #if HAS_X_MS_PINS || HAS_X2_MS_PINS @@ -3314,6 +3595,15 @@ void Stepper::report_positions() { #if HAS_E7_MS_PINS case 10: WRITE(E7_MS2_PIN, ms2); break; #endif + #if HAS_I_M_PINS + case 11: WRITE(I_MS2_PIN, ms2); break + #endif + #if HAS_J_M_PINS + case 12: WRITE(J_MS2_PIN, ms2); break + #endif + #if HAS_K_M_PINS + case 13: WRITE(K_MS2_PIN, ms2); break + #endif } if (ms3 >= 0) switch (driver) { #if HAS_X_MS_PINS || HAS_X2_MS_PINS @@ -3432,6 +3722,24 @@ void Stepper::report_positions() { PIN_CHAR(Z_MS3); #endif #endif + #if HAS_I_MS_PINS + MS_LINE(I); + #if PIN_EXISTS(I_MS3) + PIN_CHAR(I_MS3); + #endif + #endif + #if HAS_J_MS_PINS + MS_LINE(J); + #if PIN_EXISTS(J_MS3) + PIN_CHAR(J_MS3); + #endif + #endif + #if HAS_K_MS_PINS + MS_LINE(K); + #if PIN_EXISTS(K_MS3) + PIN_CHAR(K_MS3); + #endif + #endif #if HAS_E0_MS_PINS MS_LINE(E0); #if PIN_EXISTS(E0_MS3) diff --git a/Marlin/src/module/stepper.h b/Marlin/src/module/stepper.h index 639a1b2650bd..f170dd410458 100644 --- a/Marlin/src/module/stepper.h +++ b/Marlin/src/module/stepper.h @@ -133,36 +133,38 @@ #endif +// If linear advance is disabled, the loop also handles them +#if DISABLED(LIN_ADVANCE) && ENABLED(MIXING_EXTRUDER) + #define ISR_MIXING_STEPPER_CYCLES ((MIXING_STEPPERS) * (ISR_STEPPER_CYCLES)) +#else + #define ISR_MIXING_STEPPER_CYCLES 0UL +#endif + // Add time for each stepper #if HAS_X_STEP - #define ISR_X_STEPPER_CYCLES ISR_STEPPER_CYCLES -#else - #define ISR_X_STEPPER_CYCLES 0UL + #define ISR_X_STEPPER_CYCLES ISR_STEPPER_CYCLES #endif #if HAS_Y_STEP - #define ISR_Y_STEPPER_CYCLES ISR_STEPPER_CYCLES -#else - #define ISR_START_Y_STEPPER_CYCLES 0UL - #define ISR_Y_STEPPER_CYCLES 0UL + #define ISR_Y_STEPPER_CYCLES ISR_STEPPER_CYCLES #endif #if HAS_Z_STEP - #define ISR_Z_STEPPER_CYCLES ISR_STEPPER_CYCLES -#else - #define ISR_Z_STEPPER_CYCLES 0UL + #define ISR_Z_STEPPER_CYCLES ISR_STEPPER_CYCLES #endif - -// E is always interpolated, even for mixing extruders -#define ISR_E_STEPPER_CYCLES ISR_STEPPER_CYCLES - -// If linear advance is disabled, the loop also handles them -#if DISABLED(LIN_ADVANCE) && ENABLED(MIXING_EXTRUDER) - #define ISR_MIXING_STEPPER_CYCLES ((MIXING_STEPPERS) * (ISR_STEPPER_CYCLES)) -#else - #define ISR_MIXING_STEPPER_CYCLES 0UL +#if HAS_I_STEP + #define ISR_I_STEPPER_CYCLES ISR_STEPPER_CYCLES +#endif +#if HAS_J_STEP + #define ISR_J_STEPPER_CYCLES ISR_STEPPER_CYCLES +#endif +#if HAS_K_STEP + #define ISR_K_STEPPER_CYCLES ISR_STEPPER_CYCLES +#endif +#if HAS_EXTRUDERS + #define ISR_E_STEPPER_CYCLES ISR_STEPPER_CYCLES // E is always interpolated, even for mixing extruders #endif // And the total minimum loop time, not including the base -#define MIN_ISR_LOOP_CYCLES (ISR_X_STEPPER_CYCLES + ISR_Y_STEPPER_CYCLES + ISR_Z_STEPPER_CYCLES + ISR_E_STEPPER_CYCLES + ISR_MIXING_STEPPER_CYCLES) +#define MIN_ISR_LOOP_CYCLES (ISR_MIXING_STEPPER_CYCLES LOGICAL_AXIS_GANG(+ ISR_E_STEPPER_CYCLES, + ISR_X_STEPPER_CYCLES, + ISR_Y_STEPPER_CYCLES, + ISR_Z_STEPPER_CYCLES, + ISR_I_STEPPER_CYCLES, + ISR_J_STEPPER_CYCLES, + ISR_K_STEPPER_CYCLES)) // Calculate the minimum MPU cycles needed per pulse to enforce, limited to the max stepper rate #define _MIN_STEPPER_PULSE_CYCLES(N) _MAX(uint32_t((F_CPU) / (MAXIMUM_STEPPER_RATE)), ((F_CPU) / 500000UL) * (N)) @@ -234,6 +236,71 @@ // Perhaps DISABLE_MULTI_STEPPING should be required with ADAPTIVE_STEP_SMOOTHING. #define MIN_STEP_ISR_FREQUENCY (MAX_STEP_ISR_FREQUENCY_1X / 2) +#define ENABLE_COUNT (LINEAR_AXES + E_STEPPERS) +typedef IF<(ENABLE_COUNT > 8), uint16_t, uint8_t>::type ena_mask_t; + +// Axis flags type, for enabled state or other simple state +typedef struct { + union { + ena_mask_t bits; + struct { + bool LINEAR_AXIS_LIST(X:1, Y:1, Z:1, I:1, J:1, K:1); + #if HAS_EXTRUDERS + bool LIST_N(EXTRUDERS, E0:1, E1:1, E2:1, E3:1, E4:1, E5:1, E6:1, E7:1); + #endif + }; + }; + constexpr ena_mask_t linear_bits() { return _BV(LINEAR_AXES) - 1; } + constexpr ena_mask_t e_bits() { return (_BV(EXTRUDERS) - 1) << LINEAR_AXES; } +} axis_flags_t; + +// All the stepper enable pins +constexpr pin_t ena_pins[] = { + LINEAR_AXIS_LIST(X_ENABLE_PIN, Y_ENABLE_PIN, Z_ENABLE_PIN, I_ENABLE_PIN, J_ENABLE_PIN, K_ENABLE_PIN), + LIST_N(E_STEPPERS, E0_ENABLE_PIN, E1_ENABLE_PIN, E2_ENABLE_PIN, E3_ENABLE_PIN, E4_ENABLE_PIN, E5_ENABLE_PIN, E6_ENABLE_PIN, E7_ENABLE_PIN) +}; + +// Index of the axis or extruder element in a combined array +constexpr uint8_t index_of_axis(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) { + return uint8_t(axis) + (E_TERN0(axis < LINEAR_AXES ? 0 : eindex)); +} +//#define __IAX_N(N,V...) _IAX_##N(V) +//#define _IAX_N(N,V...) __IAX_N(N,V) +//#define _IAX_1(A) index_of_axis(A) +//#define _IAX_2(A,B) index_of_axis(A E_OPTARG(B)) +//#define INDEX_OF_AXIS(V...) _IAX_N(TWO_ARGS(V),V) + +#define INDEX_OF_AXIS(A,V...) index_of_axis(A E_OPTARG(V+0)) + +// Bit mask for a matching enable pin, or 0 +constexpr ena_mask_t ena_same(const uint8_t a, const uint8_t b) { + return ena_pins[a] == ena_pins[b] ? _BV(b) : 0; +} + +// Recursively get the enable overlaps mask for a given linear axis or extruder +constexpr ena_mask_t ena_overlap(const uint8_t a=0, const uint8_t b=0) { + return b >= ENABLE_COUNT ? 0 : (a == b ? 0 : ena_same(a, b)) | ena_overlap(a, b + 1); +} + +// Recursively get whether there's any overlap at all +constexpr bool any_enable_overlap(const uint8_t a=0) { + return a >= ENABLE_COUNT ? false : ena_overlap(a) || any_enable_overlap(a + 1); +} + +// Array of axes that overlap with each +// TODO: Consider cases where >=2 steppers are used by a linear axis or extruder +// (e.g., CoreXY, Dual XYZ, or E with multiple steppers, etc.). +constexpr ena_mask_t enable_overlap[] = { + #define _OVERLAP(N) ena_overlap(INDEX_OF_AXIS(AxisEnum(N))), + REPEAT(LINEAR_AXES, _OVERLAP) + #if HAS_EXTRUDERS + #define _E_OVERLAP(N) ena_overlap(INDEX_OF_AXIS(E_AXIS, N)), + REPEAT(E_STEPPERS, _E_OVERLAP) + #endif +}; + +//static_assert(!any_enable_overlap(), "There is some overlap."); + // // Stepper class definition // @@ -250,7 +317,7 @@ class Stepper { #ifndef PWM_MOTOR_CURRENT #define PWM_MOTOR_CURRENT DEFAULT_PWM_MOTOR_CURRENT #endif - #define MOTOR_CURRENT_COUNT 3 + #define MOTOR_CURRENT_COUNT LINEAR_AXES #elif HAS_MOTOR_CURRENT_SPI static constexpr uint32_t digipot_count[] = DIGIPOT_MOTOR_CURRENT; #define MOTOR_CURRENT_COUNT COUNT(Stepper::digipot_count) @@ -266,12 +333,16 @@ class Stepper { static constexpr uint8_t last_moved_extruder = 0; #endif + #if HAS_FREEZE_PIN + static bool frozen; // Set this flag to instantly freeze motion + #endif + private: static block_t* current_block; // A pointer to the block currently being traced - static uint8_t last_direction_bits, // The next stepping-bits to be output - axis_did_move; // Last Movement in the given direction is not null, as computed when the last movement was fetched from planner + static axis_bits_t last_direction_bits, // The next stepping-bits to be output + axis_did_move; // Last Movement in the given direction is not null, as computed when the last movement was fetched from planner static bool abort_current_block; // Signals to the stepper that current block should be aborted @@ -366,11 +437,11 @@ class Stepper { uint8_t cur_power; // Current laser power bool cruise_set; // Power set up for cruising? - #if DISABLED(LASER_POWER_INLINE_TRAPEZOID_CONT) + #if ENABLED(LASER_POWER_INLINE_TRAPEZOID_CONT) + uint16_t till_update; // Countdown to the next update + #else uint32_t last_step_count, // Step count from the last update acc_step_count; // Bresenham counter for laser accel/decel - #else - uint16_t till_update; // Countdown to the next update #endif } stepper_laser_t; @@ -423,14 +494,13 @@ class Stepper { #endif // Check if the given block is busy or not - Must not be called from ISR contexts - static bool is_block_busy(const block_t* const block); + static bool is_block_busy(const block_t * const block); // Get the position of a stepper, in steps static int32_t position(const AxisEnum axis); // Set the current position in steps - static void set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e); - static inline void set_position(const xyze_long_t &abce) { set_position(abce.a, abce.b, abce.c, abce.e); } + static void set_position(const xyze_long_t &spos); static void set_axis_position(const AxisEnum a, const int32_t &v); // Report the positions of the steppers, in steps @@ -514,11 +584,48 @@ class Stepper { static void refresh_motor_power(); #endif + static axis_flags_t axis_enabled; // Axis stepper(s) ENABLED states + + static inline bool axis_is_enabled(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) { + return TEST(axis_enabled.bits, INDEX_OF_AXIS(axis, eindex)); + } + static inline void mark_axis_enabled(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) { + SBI(axis_enabled.bits, INDEX_OF_AXIS(axis, eindex)); + } + static inline void mark_axis_disabled(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) { + CBI(axis_enabled.bits, INDEX_OF_AXIS(axis, eindex)); + } + static inline bool can_axis_disable(const AxisEnum axis E_OPTARG(const uint8_t eindex=0)) { + return !any_enable_overlap() || !(axis_enabled.bits & enable_overlap[INDEX_OF_AXIS(axis, eindex)]); + } + + static void enable_axis(const AxisEnum axis); + static bool disable_axis(const AxisEnum axis); + + #if HAS_EXTRUDERS + static void enable_extruder(E_TERN_(const uint8_t eindex=0)); + static bool disable_extruder(E_TERN_(const uint8_t eindex=0)); + static void enable_e_steppers(); + static void disable_e_steppers(); + #else + static inline void enable_extruder() {} + static inline bool disable_extruder() { return true; } + static inline void enable_e_steppers() {} + static inline void disable_e_steppers() {} + #endif + + #define ENABLE_EXTRUDER(N) enable_extruder(E_TERN_(N)) + #define DISABLE_EXTRUDER(N) disable_extruder(E_TERN_(N)) + #define AXIS_IS_ENABLED(N,V...) axis_is_enabled(N E_OPTARG(#V)) + + static void enable_all_steppers(); + static void disable_all_steppers(); + // Update direction states for all steppers static void set_directions(); // Set direction bits and update all stepper DIR states - static void set_directions(const uint8_t bits) { + static void set_directions(const axis_bits_t bits) { last_direction_bits = bits; set_directions(); } @@ -526,10 +633,9 @@ class Stepper { private: // Set the current position in steps - static void _set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e); - FORCE_INLINE static void _set_position(const abce_long_t &spos) { _set_position(spos.a, spos.b, spos.c, spos.e); } + static void _set_position(const abce_long_t &spos); - FORCE_INLINE static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t* loops) { + FORCE_INLINE static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t *loops) { uint32_t timer; // Scale the frequency, as requested by the caller diff --git a/Marlin/src/module/stepper/L64xx.cpp b/Marlin/src/module/stepper/L64xx.cpp index 3e2bf0944666..27816fb4f742 100644 --- a/Marlin/src/module/stepper/L64xx.cpp +++ b/Marlin/src/module/stepper/L64xx.cpp @@ -55,6 +55,15 @@ #if AXIS_IS_L64XX(Z4) L64XX_CLASS(Z4) stepperZ4(L6470_CHAIN_SS_PIN); #endif +#if AXIS_IS_L64XX(I) + L64XX_CLASS(I) stepperI(L6470_CHAIN_SS_PIN); +#endif +#if AXIS_IS_L64XX(J) + L64XX_CLASS(J) stepperJ(L6470_CHAIN_SS_PIN); +#endif +#if AXIS_IS_L64XX(K) + L64XX_CLASS(K) stepperK(L6470_CHAIN_SS_PIN); +#endif #if AXIS_IS_L64XX(E0) L64XX_CLASS(E0) stepperE0(L6470_CHAIN_SS_PIN); #endif @@ -196,6 +205,18 @@ void L64XX_Marlin::init_to_defaults() { #if AXIS_IS_L64XX(Z3) L6470_INIT_CHIP(Z3); #endif + #if AXIS_IS_L64XX(Z4) + L6470_INIT_CHIP(Z4); + #endif + #if AXIS_IS_L64XX(I) + L6470_INIT_CHIP(I); + #endif + #if AXIS_IS_L64XX(J) + L6470_INIT_CHIP(J); + #endif + #if AXIS_IS_L64XX(K) + L6470_INIT_CHIP(K); + #endif #if AXIS_IS_L64XX(E0) L6470_INIT_CHIP(E0); #endif diff --git a/Marlin/src/module/stepper/L64xx.h b/Marlin/src/module/stepper/L64xx.h index 9c8b0b1bddee..9f7e6623b140 100644 --- a/Marlin/src/module/stepper/L64xx.h +++ b/Marlin/src/module/stepper/L64xx.h @@ -206,6 +206,66 @@ #define DISABLE_STEPPER_Z4() stepperZ4.free() #endif +// I Stepper +#if AXIS_IS_L64XX(I) + extern L64XX_CLASS(I) stepperI; + #define I_ENABLE_INIT() NOOP + #define I_ENABLE_WRITE(STATE) (STATE ? stepperI.hardStop() : stepperI.free()) + #define I_ENABLE_READ() (stepperI.getStatus() & STATUS_HIZ) + #if AXIS_DRIVER_TYPE_I(L6474) + #define I_DIR_INIT() SET_OUTPUT(I_DIR_PIN) + #define I_DIR_WRITE(STATE) L6474_DIR_WRITE(I, STATE) + #define I_DIR_READ() READ(I_DIR_PIN) + #else + #define I_DIR_INIT() NOOP + #define I_DIR_WRITE(STATE) L64XX_DIR_WRITE(I, STATE) + #define I_DIR_READ() (stepper##I.getStatus() & STATUS_DIR); + #if AXIS_DRIVER_TYPE_I(L6470) + #define DISABLE_STEPPER_I() stepperI.free() + #endif + #endif +#endif + +// J Stepper +#if AXIS_IS_L64XX(J) + extern L64XX_CLASS(J) stepperJ; + #define J_ENABLE_INIT() NOOP + #define J_ENABLE_WRITE(STATE) (STATE ? stepperJ.hardStop() : stepperJ.free()) + #define J_ENABLE_READ() (stepperJ.getStatus() & STATUS_HIZ) + #if AXIS_DRIVER_TYPE_J(L6474) + #define J_DIR_INIT() SET_OUTPUT(J_DIR_PIN) + #define J_DIR_WRITE(STATE) L6474_DIR_WRITE(J, STATE) + #define J_DIR_READ() READ(J_DIR_PIN) + #else + #define J_DIR_INIT() NOOP + #define J_DIR_WRITE(STATE) L64XX_DIR_WRITE(J, STATE) + #define J_DIR_READ() (stepper##J.getStatus() & STATUS_DIR); + #if AXIS_DRIVER_TYPE_J(L6470) + #define DISABLE_STEPPER_J() stepperJ.free() + #endif + #endif +#endif + +// K Stepper +#if AXIS_IS_L64XX(K) + extern L64XX_CLASS(K) stepperK; + #define K_ENABLE_INIT() NOOP + #define K_ENABLE_WRITE(STATE) (STATE ? stepperK.hardStop() : stepperK.free()) + #define K_ENABLE_READ() (stepperK.getStatus() & STATUS_HIZ) + #if AXIS_DRIVER_TYPE_K(L6474) + #define K_DIR_INIT() SET_OUTPUT(K_DIR_PIN) + #define K_DIR_WRITE(STATE) L6474_DIR_WRITE(K, STATE) + #define K_DIR_READ() READ(K_DIR_PIN) + #else + #define K_DIR_INIT() NOOP + #define K_DIR_WRITE(STATE) L64XX_DIR_WRITE(K, STATE) + #define K_DIR_READ() (stepper##K.getStatus() & STATUS_DIR); + #if AXIS_DRIVER_TYPE_K(L6470) + #define DISABLE_STEPPER_K() stepperK.free() + #endif + #endif +#endif + // E0 Stepper #if AXIS_IS_L64XX(E0) extern L64XX_CLASS(E0) stepperE0; diff --git a/Marlin/src/module/stepper/TMC26X.cpp b/Marlin/src/module/stepper/TMC26X.cpp index 926f1a4e089f..26f91bfeb9da 100644 --- a/Marlin/src/module/stepper/TMC26X.cpp +++ b/Marlin/src/module/stepper/TMC26X.cpp @@ -60,6 +60,15 @@ #if AXIS_DRIVER_TYPE_Z4(TMC26X) _TMC26X_DEFINE(Z4); #endif +#if AXIS_DRIVER_TYPE_I(TMC26X) + _TMC26X_DEFINE(I); +#endif +#if AXIS_DRIVER_TYPE_J(TMC26X) + _TMC26X_DEFINE(J); +#endif +#if AXIS_DRIVER_TYPE_K(TMC26X) + _TMC26X_DEFINE(K); +#endif #if AXIS_DRIVER_TYPE_E0(TMC26X) _TMC26X_DEFINE(E0); #endif @@ -115,6 +124,15 @@ void tmc26x_init_to_defaults() { #if AXIS_DRIVER_TYPE_Z4(TMC26X) _TMC26X_INIT(Z4); #endif + #if AXIS_DRIVER_TYPE_I(TMC26X) + _TMC26X_INIT(I); + #endif + #if AXIS_DRIVER_TYPE_J(TMC26X) + _TMC26X_INIT(J); + #endif + #if AXIS_DRIVER_TYPE_K(TMC26X) + _TMC26X_INIT(K); + #endif #if AXIS_DRIVER_TYPE_E0(TMC26X) _TMC26X_INIT(E0); #endif diff --git a/Marlin/src/module/stepper/TMC26X.h b/Marlin/src/module/stepper/TMC26X.h index 547eb6521f19..988bebe0f20f 100644 --- a/Marlin/src/module/stepper/TMC26X.h +++ b/Marlin/src/module/stepper/TMC26X.h @@ -99,6 +99,30 @@ void tmc26x_init_to_defaults(); #define Z4_ENABLE_READ() stepperZ4.isEnabled() #endif +// I Stepper +#if HAS_I_ENABLE && AXIS_DRIVER_TYPE_I(TMC26X) + extern TMC26XStepper stepperI; + #define I_ENABLE_INIT() NOOP + #define I_ENABLE_WRITE(STATE) stepperI.setEnabled(STATE) + #define I_ENABLE_READ() stepperI.isEnabled() +#endif + +// J Stepper +#if HAS_J_ENABLE && AXIS_DRIVER_TYPE_J(TMC26X) + extern TMC26XStepper stepperJ; + #define J_ENABLE_INIT() NOOP + #define J_ENABLE_WRITE(STATE) stepperJ.setEnabled(STATE) + #define J_ENABLE_READ() stepperJ.isEnabled() +#endif + +// K Stepper +#if HAS_K_ENABLE && AXIS_DRIVER_TYPE_K(TMC26X) + extern TMC26XStepper stepperK; + #define K_ENABLE_INIT() NOOP + #define K_ENABLE_WRITE(STATE) stepperK.setEnabled(STATE) + #define K_ENABLE_READ() stepperK.isEnabled() +#endif + // E0 Stepper #if AXIS_DRIVER_TYPE_E0(TMC26X) extern TMC26XStepper stepperE0; diff --git a/Marlin/src/module/stepper/indirection.cpp b/Marlin/src/module/stepper/indirection.cpp index 6297d8336695..e44496d0224c 100644 --- a/Marlin/src/module/stepper/indirection.cpp +++ b/Marlin/src/module/stepper/indirection.cpp @@ -37,9 +37,7 @@ void restore_stepper_drivers() { } void reset_stepper_drivers() { - #if HAS_DRIVER(TMC26X) - tmc26x_init_to_defaults(); - #endif + TERN_(HAS_TMC26X, tmc26x_init_to_defaults()); TERN_(HAS_L64XX, L64xxManager.init_to_defaults()); TERN_(HAS_TRINAMIC_CONFIG, reset_trinamic_drivers()); } diff --git a/Marlin/src/module/stepper/indirection.h b/Marlin/src/module/stepper/indirection.h index 4346e9d6cccf..93b765d7a52e 100644 --- a/Marlin/src/module/stepper/indirection.h +++ b/Marlin/src/module/stepper/indirection.h @@ -36,7 +36,7 @@ #include "L64xx.h" #endif -#if HAS_DRIVER(TMC26X) +#if HAS_TMC26X #include "TMC26X.h" #endif @@ -44,7 +44,7 @@ #include "trinamic.h" #endif -void restore_stepper_drivers(); // Called by PSU_ON +void restore_stepper_drivers(); // Called by powerManager.power_on() void reset_stepper_drivers(); // Called by settings.load / settings.reset // X Stepper @@ -65,38 +65,42 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define X_STEP_READ() bool(READ(X_STEP_PIN)) // Y Stepper -#ifndef Y_ENABLE_INIT - #define Y_ENABLE_INIT() SET_OUTPUT(Y_ENABLE_PIN) - #define Y_ENABLE_WRITE(STATE) WRITE(Y_ENABLE_PIN,STATE) - #define Y_ENABLE_READ() bool(READ(Y_ENABLE_PIN)) -#endif -#ifndef Y_DIR_INIT - #define Y_DIR_INIT() SET_OUTPUT(Y_DIR_PIN) - #define Y_DIR_WRITE(STATE) WRITE(Y_DIR_PIN,STATE) - #define Y_DIR_READ() bool(READ(Y_DIR_PIN)) -#endif -#define Y_STEP_INIT() SET_OUTPUT(Y_STEP_PIN) -#ifndef Y_STEP_WRITE - #define Y_STEP_WRITE(STATE) WRITE(Y_STEP_PIN,STATE) +#if HAS_Y_AXIS + #ifndef Y_ENABLE_INIT + #define Y_ENABLE_INIT() SET_OUTPUT(Y_ENABLE_PIN) + #define Y_ENABLE_WRITE(STATE) WRITE(Y_ENABLE_PIN,STATE) + #define Y_ENABLE_READ() bool(READ(Y_ENABLE_PIN)) + #endif + #ifndef Y_DIR_INIT + #define Y_DIR_INIT() SET_OUTPUT(Y_DIR_PIN) + #define Y_DIR_WRITE(STATE) WRITE(Y_DIR_PIN,STATE) + #define Y_DIR_READ() bool(READ(Y_DIR_PIN)) + #endif + #define Y_STEP_INIT() SET_OUTPUT(Y_STEP_PIN) + #ifndef Y_STEP_WRITE + #define Y_STEP_WRITE(STATE) WRITE(Y_STEP_PIN,STATE) + #endif + #define Y_STEP_READ() bool(READ(Y_STEP_PIN)) #endif -#define Y_STEP_READ() bool(READ(Y_STEP_PIN)) // Z Stepper -#ifndef Z_ENABLE_INIT - #define Z_ENABLE_INIT() SET_OUTPUT(Z_ENABLE_PIN) - #define Z_ENABLE_WRITE(STATE) WRITE(Z_ENABLE_PIN,STATE) - #define Z_ENABLE_READ() bool(READ(Z_ENABLE_PIN)) -#endif -#ifndef Z_DIR_INIT - #define Z_DIR_INIT() SET_OUTPUT(Z_DIR_PIN) - #define Z_DIR_WRITE(STATE) WRITE(Z_DIR_PIN,STATE) - #define Z_DIR_READ() bool(READ(Z_DIR_PIN)) -#endif -#define Z_STEP_INIT() SET_OUTPUT(Z_STEP_PIN) -#ifndef Z_STEP_WRITE - #define Z_STEP_WRITE(STATE) WRITE(Z_STEP_PIN,STATE) +#if HAS_Z_AXIS + #ifndef Z_ENABLE_INIT + #define Z_ENABLE_INIT() SET_OUTPUT(Z_ENABLE_PIN) + #define Z_ENABLE_WRITE(STATE) WRITE(Z_ENABLE_PIN,STATE) + #define Z_ENABLE_READ() bool(READ(Z_ENABLE_PIN)) + #endif + #ifndef Z_DIR_INIT + #define Z_DIR_INIT() SET_OUTPUT(Z_DIR_PIN) + #define Z_DIR_WRITE(STATE) WRITE(Z_DIR_PIN,STATE) + #define Z_DIR_READ() bool(READ(Z_DIR_PIN)) + #endif + #define Z_STEP_INIT() SET_OUTPUT(Z_STEP_PIN) + #ifndef Z_STEP_WRITE + #define Z_STEP_WRITE(STATE) WRITE(Z_STEP_PIN,STATE) + #endif + #define Z_STEP_READ() bool(READ(Z_STEP_PIN)) #endif -#define Z_STEP_READ() bool(READ(Z_STEP_PIN)) // X2 Stepper #if HAS_X2_ENABLE @@ -201,6 +205,63 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define Z4_DIR_WRITE(STATE) NOOP #endif +// I Stepper +#if LINEAR_AXES >= 4 + #ifndef I_ENABLE_INIT + #define I_ENABLE_INIT() SET_OUTPUT(I_ENABLE_PIN) + #define I_ENABLE_WRITE(STATE) WRITE(I_ENABLE_PIN,STATE) + #define I_ENABLE_READ() bool(READ(I_ENABLE_PIN)) + #endif + #ifndef I_DIR_INIT + #define I_DIR_INIT() SET_OUTPUT(I_DIR_PIN) + #define I_DIR_WRITE(STATE) WRITE(I_DIR_PIN,STATE) + #define I_DIR_READ() bool(READ(I_DIR_PIN)) + #endif + #define I_STEP_INIT() SET_OUTPUT(I_STEP_PIN) + #ifndef I_STEP_WRITE + #define I_STEP_WRITE(STATE) WRITE(I_STEP_PIN,STATE) + #endif + #define I_STEP_READ() bool(READ(I_STEP_PIN)) +#endif + +// J Stepper +#if LINEAR_AXES >= 5 + #ifndef J_ENABLE_INIT + #define J_ENABLE_INIT() SET_OUTPUT(J_ENABLE_PIN) + #define J_ENABLE_WRITE(STATE) WRITE(J_ENABLE_PIN,STATE) + #define J_ENABLE_READ() bool(READ(J_ENABLE_PIN)) + #endif + #ifndef J_DIR_INIT + #define J_DIR_INIT() SET_OUTPUT(J_DIR_PIN) + #define J_DIR_WRITE(STATE) WRITE(J_DIR_PIN,STATE) + #define J_DIR_READ() bool(READ(J_DIR_PIN)) + #endif + #define J_STEP_INIT() SET_OUTPUT(J_STEP_PIN) + #ifndef J_STEP_WRITE + #define J_STEP_WRITE(STATE) WRITE(J_STEP_PIN,STATE) + #endif + #define J_STEP_READ() bool(READ(J_STEP_PIN)) +#endif + +// K Stepper +#if LINEAR_AXES >= 6 + #ifndef K_ENABLE_INIT + #define K_ENABLE_INIT() SET_OUTPUT(K_ENABLE_PIN) + #define K_ENABLE_WRITE(STATE) WRITE(K_ENABLE_PIN,STATE) + #define K_ENABLE_READ() bool(READ(K_ENABLE_PIN)) + #endif + #ifndef K_DIR_INIT + #define K_DIR_INIT() SET_OUTPUT(K_DIR_PIN) + #define K_DIR_WRITE(STATE) WRITE(K_DIR_PIN,STATE) + #define K_DIR_READ() bool(READ(K_DIR_PIN)) + #endif + #define K_STEP_INIT() SET_OUTPUT(K_STEP_PIN) + #ifndef K_STEP_WRITE + #define K_STEP_WRITE(STATE) WRITE(K_STEP_PIN,STATE) + #endif + #define K_STEP_READ() bool(READ(K_STEP_PIN)) +#endif + // E0 Stepper #ifndef E0_ENABLE_INIT #define E0_ENABLE_INIT() SET_OUTPUT(E0_ENABLE_PIN) @@ -418,7 +479,7 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define REV_E_DIR(E) do{ E0_DIR_WRITE(E ? !INVERT_E0_DIR : INVERT_E0_DIR); }while(0) #endif -#elif HAS_PRUSA_MMU2 +#elif HAS_PRUSA_MMU2 // One multiplexed stepper driver #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) #define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR) @@ -584,6 +645,11 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #endif +#elif ENABLED(E_DUAL_STEPPER_DRIVERS) + #define E_STEP_WRITE(E,V) do{ E0_STEP_WRITE(V); E1_STEP_WRITE(V); }while(0) + #define NORM_E_DIR(E) do{ E0_DIR_WRITE(!INVERT_E0_DIR); E1_DIR_WRITE(!INVERT_E0_DIR ^ ENABLED(INVERT_E1_VS_E0_DIR)); }while(0) + #define REV_E_DIR(E) do{ E0_DIR_WRITE( INVERT_E0_DIR); E1_DIR_WRITE( INVERT_E0_DIR ^ ENABLED(INVERT_E1_VS_E0_DIR)); }while(0) + #elif E_STEPPERS #define E_STEP_WRITE(E,V) E0_STEP_WRITE(V) #define NORM_E_DIR(E) E0_DIR_WRITE(!INVERT_E0_DIR) @@ -601,149 +667,98 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset // #ifndef ENABLE_STEPPER_X - #if HAS_X_ENABLE - #define ENABLE_STEPPER_X() X_ENABLE_WRITE( X_ENABLE_ON) - #else - #define ENABLE_STEPPER_X() NOOP - #endif + #define ENABLE_STEPPER_X() TERN(HAS_X_ENABLE, X_ENABLE_WRITE( X_ENABLE_ON), NOOP) #endif #ifndef DISABLE_STEPPER_X - #if HAS_X_ENABLE - #define DISABLE_STEPPER_X() X_ENABLE_WRITE(!X_ENABLE_ON) - #else - #define DISABLE_STEPPER_X() NOOP - #endif + #define DISABLE_STEPPER_X() TERN(HAS_X_ENABLE, X_ENABLE_WRITE(!X_ENABLE_ON), NOOP) #endif #ifndef ENABLE_STEPPER_X2 - #if HAS_X2_ENABLE - #define ENABLE_STEPPER_X2() X2_ENABLE_WRITE( X_ENABLE_ON) - #else - #define ENABLE_STEPPER_X2() NOOP - #endif + #define ENABLE_STEPPER_X2() TERN(HAS_X2_ENABLE, X2_ENABLE_WRITE( X_ENABLE_ON), NOOP) #endif #ifndef DISABLE_STEPPER_X2 - #if HAS_X2_ENABLE - #define DISABLE_STEPPER_X2() X2_ENABLE_WRITE(!X_ENABLE_ON) - #else - #define DISABLE_STEPPER_X2() NOOP - #endif + #define DISABLE_STEPPER_X2() TERN(HAS_X2_ENABLE, X2_ENABLE_WRITE(!X_ENABLE_ON), NOOP) #endif #ifndef ENABLE_STEPPER_Y - #if HAS_Y_ENABLE - #define ENABLE_STEPPER_Y() Y_ENABLE_WRITE( Y_ENABLE_ON) - #else - #define ENABLE_STEPPER_Y() NOOP - #endif + #define ENABLE_STEPPER_Y() TERN(HAS_Y_ENABLE, Y_ENABLE_WRITE( Y_ENABLE_ON), NOOP) #endif #ifndef DISABLE_STEPPER_Y - #if HAS_Y_ENABLE - #define DISABLE_STEPPER_Y() Y_ENABLE_WRITE(!Y_ENABLE_ON) - #else - #define DISABLE_STEPPER_Y() NOOP - #endif + #define DISABLE_STEPPER_Y() TERN(HAS_Y_ENABLE, Y_ENABLE_WRITE(!Y_ENABLE_ON), NOOP) #endif #ifndef ENABLE_STEPPER_Y2 - #if HAS_Y2_ENABLE - #define ENABLE_STEPPER_Y2() Y2_ENABLE_WRITE( Y_ENABLE_ON) - #else - #define ENABLE_STEPPER_Y2() NOOP - #endif + #define ENABLE_STEPPER_Y2() TERN(HAS_Y2_ENABLE, Y2_ENABLE_WRITE( Y_ENABLE_ON), NOOP) #endif #ifndef DISABLE_STEPPER_Y2 - #if HAS_Y2_ENABLE - #define DISABLE_STEPPER_Y2() Y2_ENABLE_WRITE(!Y_ENABLE_ON) - #else - #define DISABLE_STEPPER_Y2() NOOP - #endif + #define DISABLE_STEPPER_Y2() TERN(HAS_Y2_ENABLE, Y2_ENABLE_WRITE(!Y_ENABLE_ON), NOOP) #endif #ifndef ENABLE_STEPPER_Z - #if HAS_Z_ENABLE - #define ENABLE_STEPPER_Z() Z_ENABLE_WRITE( Z_ENABLE_ON) - #else - #define ENABLE_STEPPER_Z() NOOP - #endif + #define ENABLE_STEPPER_Z() TERN(HAS_Z_ENABLE, Z_ENABLE_WRITE( Z_ENABLE_ON), NOOP) #endif #ifndef DISABLE_STEPPER_Z - #if HAS_Z_ENABLE - #define DISABLE_STEPPER_Z() Z_ENABLE_WRITE(!Z_ENABLE_ON) - #else - #define DISABLE_STEPPER_Z() NOOP - #endif + #define DISABLE_STEPPER_Z() TERN(HAS_Z_ENABLE, Z_ENABLE_WRITE(!Z_ENABLE_ON), NOOP) #endif #ifndef ENABLE_STEPPER_Z2 - #if HAS_Z2_ENABLE - #define ENABLE_STEPPER_Z2() Z2_ENABLE_WRITE( Z_ENABLE_ON) - #else - #define ENABLE_STEPPER_Z2() NOOP - #endif + #define ENABLE_STEPPER_Z2() TERN(HAS_Z2_ENABLE, Z2_ENABLE_WRITE( Z_ENABLE_ON), NOOP) #endif #ifndef DISABLE_STEPPER_Z2 - #if HAS_Z2_ENABLE - #define DISABLE_STEPPER_Z2() Z2_ENABLE_WRITE(!Z_ENABLE_ON) - #else - #define DISABLE_STEPPER_Z2() NOOP - #endif + #define DISABLE_STEPPER_Z2() TERN(HAS_Z2_ENABLE, Z2_ENABLE_WRITE(!Z_ENABLE_ON), NOOP) #endif #ifndef ENABLE_STEPPER_Z3 - #if HAS_Z3_ENABLE - #define ENABLE_STEPPER_Z3() Z3_ENABLE_WRITE( Z_ENABLE_ON) - #else - #define ENABLE_STEPPER_Z3() NOOP - #endif + #define ENABLE_STEPPER_Z3() TERN(HAS_Z3_ENABLE, Z3_ENABLE_WRITE( Z_ENABLE_ON), NOOP) #endif #ifndef DISABLE_STEPPER_Z3 - #if HAS_Z3_ENABLE - #define DISABLE_STEPPER_Z3() Z3_ENABLE_WRITE(!Z_ENABLE_ON) - #else - #define DISABLE_STEPPER_Z3() NOOP - #endif + #define DISABLE_STEPPER_Z3() TERN(HAS_Z3_ENABLE, Z3_ENABLE_WRITE(!Z_ENABLE_ON), NOOP) #endif #ifndef ENABLE_STEPPER_Z4 - #if HAS_Z4_ENABLE - #define ENABLE_STEPPER_Z4() Z4_ENABLE_WRITE( Z_ENABLE_ON) - #else - #define ENABLE_STEPPER_Z4() NOOP - #endif + #define ENABLE_STEPPER_Z4() TERN(HAS_Z4_ENABLE, Z4_ENABLE_WRITE( Z_ENABLE_ON), NOOP) #endif #ifndef DISABLE_STEPPER_Z4 - #if HAS_Z4_ENABLE - #define DISABLE_STEPPER_Z4() Z4_ENABLE_WRITE(!Z_ENABLE_ON) - #else - #define DISABLE_STEPPER_Z4() NOOP - #endif + #define DISABLE_STEPPER_Z4() TERN(HAS_Z4_ENABLE, Z4_ENABLE_WRITE(!Z_ENABLE_ON), NOOP) +#endif + +#ifndef ENABLE_STEPPER_I + #define ENABLE_STEPPER_I() TERN(HAS_I_ENABLE, I_ENABLE_WRITE( I_ENABLE_ON), NOOP) +#endif +#ifndef DISABLE_STEPPER_I + #define DISABLE_STEPPER_I() TERN(HAS_I_ENABLE, I_ENABLE_WRITE(!I_ENABLE_ON), NOOP) +#endif + +#ifndef ENABLE_STEPPER_J + #define ENABLE_STEPPER_J() TERN(HAS_J_ENABLE, J_ENABLE_WRITE( J_ENABLE_ON), NOOP) +#endif +#ifndef DISABLE_STEPPER_J + #define DISABLE_STEPPER_J() TERN(HAS_J_ENABLE, J_ENABLE_WRITE(!J_ENABLE_ON), NOOP) +#endif + +#ifndef ENABLE_STEPPER_K + #define ENABLE_STEPPER_K() TERN(HAS_K_ENABLE, K_ENABLE_WRITE( K_ENABLE_ON), NOOP) +#endif +#ifndef DISABLE_STEPPER_K + #define DISABLE_STEPPER_K() TERN(HAS_K_ENABLE, K_ENABLE_WRITE(!K_ENABLE_ON), NOOP) #endif #ifndef ENABLE_STEPPER_E0 - #if HAS_E0_ENABLE - #define ENABLE_STEPPER_E0() E0_ENABLE_WRITE( E_ENABLE_ON) - #else - #define ENABLE_STEPPER_E0() NOOP - #endif + #define ENABLE_STEPPER_E0() TERN(HAS_E0_ENABLE, E0_ENABLE_WRITE( E_ENABLE_ON), NOOP) #endif #ifndef DISABLE_STEPPER_E0 - #if HAS_E0_ENABLE - #define DISABLE_STEPPER_E0() E0_ENABLE_WRITE(!E_ENABLE_ON) - #else - #define DISABLE_STEPPER_E0() NOOP - #endif + #define DISABLE_STEPPER_E0() TERN(HAS_E0_ENABLE, E0_ENABLE_WRITE(!E_ENABLE_ON), NOOP) #endif #ifndef ENABLE_STEPPER_E1 - #if E_STEPPERS > 1 && HAS_E1_ENABLE + #if (E_STEPPERS > 1 || ENABLED(E_DUAL_STEPPER_DRIVERS)) && HAS_E1_ENABLE #define ENABLE_STEPPER_E1() E1_ENABLE_WRITE( E_ENABLE_ON) #else #define ENABLE_STEPPER_E1() NOOP #endif #endif #ifndef DISABLE_STEPPER_E1 - #if E_STEPPERS > 1 && HAS_E1_ENABLE + #if (E_STEPPERS > 1 || ENABLED(E_DUAL_STEPPER_DRIVERS)) && HAS_E1_ENABLE #define DISABLE_STEPPER_E1() E1_ENABLE_WRITE(!E_ENABLE_ON) #else #define DISABLE_STEPPER_E1() NOOP @@ -857,22 +872,57 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define ENABLE_AXIS_X() if (SHOULD_ENABLE(x)) { ENABLE_STEPPER_X(); ENABLE_STEPPER_X2(); AFTER_CHANGE(x, true); } #define DISABLE_AXIS_X() if (SHOULD_DISABLE(x)) { DISABLE_STEPPER_X(); DISABLE_STEPPER_X2(); AFTER_CHANGE(x, false); set_axis_untrusted(X_AXIS); } -#define ENABLE_AXIS_Y() if (SHOULD_ENABLE(y)) { ENABLE_STEPPER_Y(); ENABLE_STEPPER_Y2(); AFTER_CHANGE(y, true); } -#define DISABLE_AXIS_Y() if (SHOULD_DISABLE(y)) { DISABLE_STEPPER_Y(); DISABLE_STEPPER_Y2(); AFTER_CHANGE(y, false); set_axis_untrusted(Y_AXIS); } -#define ENABLE_AXIS_Z() if (SHOULD_ENABLE(z)) { ENABLE_STEPPER_Z(); ENABLE_STEPPER_Z2(); ENABLE_STEPPER_Z3(); ENABLE_STEPPER_Z4(); AFTER_CHANGE(z, true); } -#define DISABLE_AXIS_Z() if (SHOULD_DISABLE(z)) { DISABLE_STEPPER_Z(); DISABLE_STEPPER_Z2(); DISABLE_STEPPER_Z3(); DISABLE_STEPPER_Z4(); AFTER_CHANGE(z, false); set_axis_untrusted(Z_AXIS); Z_RESET(); } -#ifdef Z_AFTER_DEACTIVATE - #define Z_RESET() do{ current_position.z = Z_AFTER_DEACTIVATE; sync_plan_position(); }while(0) +#if HAS_Y_AXIS + #define ENABLE_AXIS_Y() if (SHOULD_ENABLE(y)) { ENABLE_STEPPER_Y(); ENABLE_STEPPER_Y2(); AFTER_CHANGE(y, true); } + #define DISABLE_AXIS_Y() if (SHOULD_DISABLE(y)) { DISABLE_STEPPER_Y(); DISABLE_STEPPER_Y2(); AFTER_CHANGE(y, false); set_axis_untrusted(Y_AXIS); } +#else + #define ENABLE_AXIS_Y() NOOP + #define DISABLE_AXIS_Y() NOOP +#endif + +#if HAS_Z_AXIS + #define ENABLE_AXIS_Z() if (SHOULD_ENABLE(z)) { ENABLE_STEPPER_Z(); ENABLE_STEPPER_Z2(); ENABLE_STEPPER_Z3(); ENABLE_STEPPER_Z4(); AFTER_CHANGE(z, true); } + #define DISABLE_AXIS_Z() if (SHOULD_DISABLE(z)) { DISABLE_STEPPER_Z(); DISABLE_STEPPER_Z2(); DISABLE_STEPPER_Z3(); DISABLE_STEPPER_Z4(); AFTER_CHANGE(z, false); set_axis_untrusted(Z_AXIS); Z_RESET(); } +#else + #define ENABLE_AXIS_Z() NOOP + #define DISABLE_AXIS_Z() NOOP +#endif + +#ifdef Z_IDLE_HEIGHT + #define Z_RESET() do{ current_position.z = Z_IDLE_HEIGHT; sync_plan_position(); }while(0) #else #define Z_RESET() #endif +#if LINEAR_AXES >= 4 + #define ENABLE_AXIS_I() if (SHOULD_ENABLE(i)) { ENABLE_STEPPER_I(); AFTER_CHANGE(i, true); } + #define DISABLE_AXIS_I() if (SHOULD_DISABLE(i)) { DISABLE_STEPPER_I(); AFTER_CHANGE(i, false); set_axis_untrusted(I_AXIS); } +#else + #define ENABLE_AXIS_I() NOOP + #define DISABLE_AXIS_I() NOOP +#endif +#if LINEAR_AXES >= 5 + #define ENABLE_AXIS_J() if (SHOULD_ENABLE(j)) { ENABLE_STEPPER_J(); AFTER_CHANGE(j, true); } + #define DISABLE_AXIS_J() if (SHOULD_DISABLE(j)) { DISABLE_STEPPER_J(); AFTER_CHANGE(j, false); set_axis_untrusted(J_AXIS); } +#else + #define ENABLE_AXIS_J() NOOP + #define DISABLE_AXIS_J() NOOP +#endif +#if LINEAR_AXES >= 6 + #define ENABLE_AXIS_K() if (SHOULD_ENABLE(k)) { ENABLE_STEPPER_K(); AFTER_CHANGE(k, true); } + #define DISABLE_AXIS_K() if (SHOULD_DISABLE(k)) { DISABLE_STEPPER_K(); AFTER_CHANGE(k, false); set_axis_untrusted(K_AXIS); } +#else + #define ENABLE_AXIS_K() NOOP + #define DISABLE_AXIS_K() NOOP +#endif + // // Extruder steppers enable / disable macros // #if ENABLED(MIXING_EXTRUDER) + /** * Mixing steppers keep all their enable (and direction) states synchronized */ @@ -880,6 +930,12 @@ void reset_stepper_drivers(); // Called by settings.load / settings.reset #define _CALL_DIS_E(N) DISABLE_STEPPER_E##N () ; #define ENABLE_AXIS_E0() { RREPEAT(MIXING_STEPPERS, _CALL_ENA_E) } #define DISABLE_AXIS_E0() { RREPEAT(MIXING_STEPPERS, _CALL_DIS_E) } + +#elif ENABLED(E_DUAL_STEPPER_DRIVERS) + + #define ENABLE_AXIS_E0() do{ ENABLE_STEPPER_E0(); ENABLE_STEPPER_E1(); }while(0) + #define DISABLE_AXIS_E0() do{ DISABLE_STEPPER_E0(); DISABLE_STEPPER_E1(); }while(0) + #endif #ifndef ENABLE_AXIS_E0 diff --git a/Marlin/src/module/stepper/trinamic.cpp b/Marlin/src/module/stepper/trinamic.cpp index c33581d132fe..e8ecbf1c762a 100644 --- a/Marlin/src/module/stepper/trinamic.cpp +++ b/Marlin/src/module/stepper/trinamic.cpp @@ -35,7 +35,9 @@ #include #include -enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; +enum StealthIndex : uint8_t { + LOGICAL_AXIS_LIST(STEALTH_AXIS_E, STEALTH_AXIS_X, STEALTH_AXIS_Y, STEALTH_AXIS_Z, STEALTH_AXIS_I, STEALTH_AXIS_J, STEALTH_AXIS_K) +}; #define TMC_INIT(ST, STEALTH_INDEX) tmc_init(stepper##ST, ST##_CURRENT, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, stealthchop_by_axis[STEALTH_INDEX], chopper_timing_##ST, ST##_INTERPOLATE) // IC = TMC model number @@ -62,7 +64,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; #define _TMC_UART_DEFINE(SWHW, IC, ST, AI) TMC_UART_##SWHW##_DEFINE(IC, ST, TMC_##ST##_LABEL, AI) #define TMC_UART_DEFINE(SWHW, ST, AI) _TMC_UART_DEFINE(SWHW, ST##_DRIVER_TYPE, ST, AI##_AXIS) -#if DISTINCT_E > 1 +#if ENABLED(DISTINCT_E_FACTORS) #define TMC_SPI_DEFINE_E(AI) TMC_SPI_DEFINE(E##AI, E##AI) #define TMC_UART_DEFINE_E(SWHW, AI) TMC_UART_DEFINE(SWHW, E##AI, E##AI) #else @@ -95,6 +97,15 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; #if AXIS_HAS_SPI(Z4) TMC_SPI_DEFINE(Z4, Z); #endif +#if AXIS_HAS_SPI(I) + TMC_SPI_DEFINE(I, I); +#endif +#if AXIS_HAS_SPI(J) + TMC_SPI_DEFINE(J, J); +#endif +#if AXIS_HAS_SPI(K) + TMC_SPI_DEFINE(K, K); +#endif #if AXIS_HAS_SPI(E0) TMC_SPI_DEFINE_E(0); #endif @@ -129,6 +140,64 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; #define TMC_BAUD_RATE TERN(HAS_TMC_SW_SERIAL, 57600, 115200) #endif +#ifndef TMC_X_BAUD_RATE + #define TMC_X_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_X2_BAUD_RATE + #define TMC_X2_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_Y_BAUD_RATE + #define TMC_Y_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_Y2_BAUD_RATE + #define TMC_Y2_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_Z_BAUD_RATE + #define TMC_Z_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_Z2_BAUD_RATE + #define TMC_Z2_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_Z3_BAUD_RATE + #define TMC_Z3_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_Z4_BAUD_RATE + #define TMC_Z4_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_I_BAUD_RATE + #define TMC_I_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_J_BAUD_RATE + #define TMC_J_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_K_BAUD_RATE + #define TMC_K_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_E0_BAUD_RATE + #define TMC_E0_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_E1_BAUD_RATE + #define TMC_E1_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_E2_BAUD_RATE + #define TMC_E2_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_E3_BAUD_RATE + #define TMC_E3_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_E4_BAUD_RATE + #define TMC_E4_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_E5_BAUD_RATE + #define TMC_E5_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_E6_BAUD_RATE + #define TMC_E6_BAUD_RATE TMC_BAUD_RATE +#endif +#ifndef TMC_E7_BAUD_RATE + #define TMC_E7_BAUD_RATE TMC_BAUD_RATE +#endif + #if HAS_DRIVER(TMC2130) template void tmc_init(TMCMarlin &st, const uint16_t mA, const uint16_t microsteps, const uint32_t hyb_thrs, const bool stealth, const chopper_timing_t &chop_init, const bool interpolate) { @@ -278,6 +347,34 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; #define Z4_HAS_SW_SERIAL 1 #endif #endif + #if AXIS_HAS_UART(I) + #ifdef I_HARDWARE_SERIAL + TMC_UART_DEFINE(HW, I, I); + #define I_HAS_HW_SERIAL 1 + #else + TMC_UART_DEFINE(SW, I, I); + #define I_HAS_SW_SERIAL 1 + #endif + #endif + #if AXIS_HAS_UART(J) + #ifdef J_HARDWARE_SERIAL + TMC_UART_DEFINE(HW, J, J); + #define J_HAS_HW_SERIAL 1 + #else + TMC_UART_DEFINE(SW, J, J); + #define J_HAS_SW_SERIAL 1 + #endif + #endif + #if AXIS_HAS_UART(K) + #ifdef K_HARDWARE_SERIAL + TMC_UART_DEFINE(HW, K, K); + #define K_HAS_HW_SERIAL 1 + #else + TMC_UART_DEFINE(SW, K, K); + #define K_HAS_SW_SERIAL 1 + #endif + #endif + #if AXIS_HAS_UART(E0) #ifdef E0_HARDWARE_SERIAL TMC_UART_DEFINE_E(HW, 0); @@ -351,7 +448,9 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; #endif #endif - enum TMCAxis : uint8_t { X, Y, Z, X2, Y2, Z2, Z3, Z4, E0, E1, E2, E3, E4, E5, E6, E7, TOTAL }; + #define _EN_ITEM(N) , E##N + enum TMCAxis : uint8_t { LINEAR_AXIS_LIST(X, Y, Z, I, J, K), X2, Y2, Z2, Z3, Z4 REPEAT(EXTRUDERS, _EN_ITEM), TOTAL }; + #undef _EN_ITEM void tmc_serial_begin() { #if HAS_TMC_HW_SERIAL @@ -364,7 +463,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; } sp_helper; #define HW_SERIAL_BEGIN(A) do{ if (!sp_helper.began(TMCAxis::A, &A##_HARDWARE_SERIAL)) \ - A##_HARDWARE_SERIAL.begin(TMC_BAUD_RATE); }while(0) + A##_HARDWARE_SERIAL.begin(TMC_##A##_BAUD_RATE); }while(0) #endif #if AXIS_HAS_UART(X) @@ -423,6 +522,27 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; stepperZ4.beginSerial(TMC_BAUD_RATE); #endif #endif + #if AXIS_HAS_UART(I) + #ifdef I_HARDWARE_SERIAL + HW_SERIAL_BEGIN(I); + #else + stepperI.beginSerial(TMC_BAUD_RATE); + #endif + #endif + #if AXIS_HAS_UART(J) + #ifdef J_HARDWARE_SERIAL + HW_SERIAL_BEGIN(J); + #else + stepperJ.beginSerial(TMC_BAUD_RATE); + #endif + #endif + #if AXIS_HAS_UART(K) + #ifdef K_HARDWARE_SERIAL + HW_SERIAL_BEGIN(K); + #else + stepperK.beginSerial(TMC_BAUD_RATE); + #endif + #endif #if AXIS_HAS_UART(E0) #ifdef E0_HARDWARE_SERIAL HW_SERIAL_BEGIN(E0); @@ -655,11 +775,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E }; pwmconf.pwm_ofs = 36; st.PWMCONF(pwmconf.sr); - #if ENABLED(HYBRID_THRESHOLD) - st.set_pwm_thrs(hyb_thrs); - #else - UNUSED(hyb_thrs); - #endif + TERN(HYBRID_THRESHOLD, st.set_pwm_thrs(hyb_thrs), UNUSED(hyb_thrs)); st.GSTAT(); // Clear GSTAT } #endif // TMC5160 @@ -689,6 +805,15 @@ void restore_trinamic_drivers() { #if AXIS_IS_TMC(Z4) stepperZ4.push(); #endif + #if AXIS_IS_TMC(I) + stepperI.push(); + #endif + #if AXIS_IS_TMC(J) + stepperJ.push(); + #endif + #if AXIS_IS_TMC(K) + stepperK.push(); + #endif #if AXIS_IS_TMC(E0) stepperE0.push(); #endif @@ -716,19 +841,23 @@ void restore_trinamic_drivers() { } void reset_trinamic_drivers() { - static constexpr bool stealthchop_by_axis[] = { ENABLED(STEALTHCHOP_XY), ENABLED(STEALTHCHOP_Z), ENABLED(STEALTHCHOP_E) }; + static constexpr bool stealthchop_by_axis[] = LOGICAL_AXIS_ARRAY( + ENABLED(STEALTHCHOP_E), + ENABLED(STEALTHCHOP_XY), ENABLED(STEALTHCHOP_XY), ENABLED(STEALTHCHOP_Z), + ENABLED(STEALTHCHOP_I), ENABLED(STEALTHCHOP_J), ENABLED(STEALTHCHOP_K) + ); #if AXIS_IS_TMC(X) - TMC_INIT(X, STEALTH_AXIS_XY); + TMC_INIT(X, STEALTH_AXIS_X); #endif #if AXIS_IS_TMC(X2) - TMC_INIT(X2, STEALTH_AXIS_XY); + TMC_INIT(X2, STEALTH_AXIS_X); #endif #if AXIS_IS_TMC(Y) - TMC_INIT(Y, STEALTH_AXIS_XY); + TMC_INIT(Y, STEALTH_AXIS_Y); #endif #if AXIS_IS_TMC(Y2) - TMC_INIT(Y2, STEALTH_AXIS_XY); + TMC_INIT(Y2, STEALTH_AXIS_Y); #endif #if AXIS_IS_TMC(Z) TMC_INIT(Z, STEALTH_AXIS_Z); @@ -742,6 +871,15 @@ void reset_trinamic_drivers() { #if AXIS_IS_TMC(Z4) TMC_INIT(Z4, STEALTH_AXIS_Z); #endif + #if AXIS_IS_TMC(I) + TMC_INIT(I, STEALTH_AXIS_I); + #endif + #if AXIS_IS_TMC(J) + TMC_INIT(J, STEALTH_AXIS_J); + #endif + #if AXIS_IS_TMC(K) + TMC_INIT(K, STEALTH_AXIS_K); + #endif #if AXIS_IS_TMC(E0) TMC_INIT(E0, STEALTH_AXIS_E); #endif @@ -792,7 +930,25 @@ void reset_trinamic_drivers() { stepperZ4.homing_threshold(CAT(TERN(Z4_SENSORLESS, Z4, Z), _STALL_SENSITIVITY)); #endif #endif - #endif + #if I_SENSORLESS + stepperI.homing_threshold(I_STALL_SENSITIVITY); + #if AXIS_HAS_STALLGUARD(I) + stepperI.homing_threshold(CAT(TERN(I_SENSORLESS, I, I), _STALL_SENSITIVITY)); + #endif + #endif + #if J_SENSORLESS + stepperJ.homing_threshold(J_STALL_SENSITIVITY); + #if AXIS_HAS_STALLGUARD(J) + stepperJ.homing_threshold(CAT(TERN(J_SENSORLESS, J, J), _STALL_SENSITIVITY)); + #endif + #endif + #if K_SENSORLESS + stepperK.homing_threshold(K_STALL_SENSITIVITY); + #if AXIS_HAS_STALLGUARD(K) + stepperK.homing_threshold(CAT(TERN(K_SENSORLESS, K, K), _STALL_SENSITIVITY)); + #endif + #endif + #endif // USE SENSORLESS #ifdef TMC_ADV TMC_ADV() @@ -804,7 +960,7 @@ void reset_trinamic_drivers() { // TMC Slave Address Conflict Detection // // Conflict detection is performed in the following way. Similar methods are used for -// hardware and software serial, but the implementations are indepenent. +// hardware and software serial, but the implementations are independent. // // 1. Populate a data structure with UART parameters and addresses for all possible axis. // If an axis is not in use, populate it with recognizable placeholder data. @@ -816,11 +972,12 @@ void reset_trinamic_drivers() { // Using a fixed-length character array for the port name allows this to be constexpr compatible. struct SanityHwSerialDetails { const char port[20]; uint32_t address; }; #define TMC_HW_DETAIL_ARGS(A) TERN(A##_HAS_HW_SERIAL, STRINGIFY(A##_HARDWARE_SERIAL), ""), TERN0(A##_HAS_HW_SERIAL, A##_SLAVE_ADDRESS) - #define TMC_HW_DETAIL(A) {TMC_HW_DETAIL_ARGS(A)} + #define TMC_HW_DETAIL(A) { TMC_HW_DETAIL_ARGS(A) } constexpr SanityHwSerialDetails sanity_tmc_hw_details[] = { TMC_HW_DETAIL(X), TMC_HW_DETAIL(X2), TMC_HW_DETAIL(Y), TMC_HW_DETAIL(Y2), TMC_HW_DETAIL(Z), TMC_HW_DETAIL(Z2), TMC_HW_DETAIL(Z3), TMC_HW_DETAIL(Z4), + TMC_HW_DETAIL(I), TMC_HW_DETAIL(J), TMC_HW_DETAIL(K), TMC_HW_DETAIL(E0), TMC_HW_DETAIL(E1), TMC_HW_DETAIL(E2), TMC_HW_DETAIL(E3), TMC_HW_DETAIL(E4), TMC_HW_DETAIL(E5), TMC_HW_DETAIL(E6), TMC_HW_DETAIL(E7) }; @@ -830,20 +987,21 @@ void reset_trinamic_drivers() { } constexpr bool sc_hw_done(size_t start, size_t end) { return start == end; } - constexpr bool sc_hw_skip(const char* port_name) { return !(*port_name); } - constexpr bool sc_hw_match(const char* port_name, uint32_t address, size_t start, size_t end) { + constexpr bool sc_hw_skip(const char *port_name) { return !(*port_name); } + constexpr bool sc_hw_match(const char *port_name, uint32_t address, size_t start, size_t end) { return !sc_hw_done(start, end) && !sc_hw_skip(port_name) && (address == sanity_tmc_hw_details[start].address && str_eq_ce(port_name, sanity_tmc_hw_details[start].port)); } - constexpr int count_tmc_hw_serial_matches(const char* port_name, uint32_t address, size_t start, size_t end) { + constexpr int count_tmc_hw_serial_matches(const char *port_name, uint32_t address, size_t start, size_t end) { return sc_hw_done(start, end) ? 0 : ((sc_hw_skip(port_name) ? 0 : (sc_hw_match(port_name, address, start, end) ? 1 : 0)) + count_tmc_hw_serial_matches(port_name, address, start + 1, end)); } #define TMC_HWSERIAL_CONFLICT_MSG(A) STRINGIFY(A) "_SLAVE_ADDRESS conflicts with another driver using the same " STRINGIFY(A) "_HARDWARE_SERIAL" #define SA_NO_TMC_HW_C(A) static_assert(1 >= count_tmc_hw_serial_matches(TMC_HW_DETAIL_ARGS(A), 0, COUNT(sanity_tmc_hw_details)), TMC_HWSERIAL_CONFLICT_MSG(A)); - SA_NO_TMC_HW_C(X);SA_NO_TMC_HW_C(X2); - SA_NO_TMC_HW_C(Y);SA_NO_TMC_HW_C(Y2); - SA_NO_TMC_HW_C(Z);SA_NO_TMC_HW_C(Z2);SA_NO_TMC_HW_C(Z3);SA_NO_TMC_HW_C(Z4); - SA_NO_TMC_HW_C(E0);SA_NO_TMC_HW_C(E1);SA_NO_TMC_HW_C(E2);SA_NO_TMC_HW_C(E3);SA_NO_TMC_HW_C(E4);SA_NO_TMC_HW_C(E5);SA_NO_TMC_HW_C(E6);SA_NO_TMC_HW_C(E7); + SA_NO_TMC_HW_C(X); SA_NO_TMC_HW_C(X2); + SA_NO_TMC_HW_C(Y); SA_NO_TMC_HW_C(Y2); + SA_NO_TMC_HW_C(Z); SA_NO_TMC_HW_C(Z2); SA_NO_TMC_HW_C(Z3); SA_NO_TMC_HW_C(Z4); + SA_NO_TMC_HW_C(I); SA_NO_TMC_HW_C(J); SA_NO_TMC_HW_C(K); + SA_NO_TMC_HW_C(E0); SA_NO_TMC_HW_C(E1); SA_NO_TMC_HW_C(E2); SA_NO_TMC_HW_C(E3); SA_NO_TMC_HW_C(E4); SA_NO_TMC_HW_C(E5); SA_NO_TMC_HW_C(E6); SA_NO_TMC_HW_C(E7); #endif #if ANY_AXIS_HAS(SW_SERIAL) @@ -854,6 +1012,7 @@ void reset_trinamic_drivers() { TMC_SW_DETAIL(X), TMC_SW_DETAIL(X2), TMC_SW_DETAIL(Y), TMC_SW_DETAIL(Y2), TMC_SW_DETAIL(Z), TMC_SW_DETAIL(Z2), TMC_SW_DETAIL(Z3), TMC_SW_DETAIL(Z4), + TMC_SW_DETAIL(I), TMC_SW_DETAIL(J), TMC_SW_DETAIL(K), TMC_SW_DETAIL(E0), TMC_SW_DETAIL(E1), TMC_SW_DETAIL(E2), TMC_SW_DETAIL(E3), TMC_SW_DETAIL(E4), TMC_SW_DETAIL(E5), TMC_SW_DETAIL(E6), TMC_SW_DETAIL(E7) }; @@ -868,10 +1027,11 @@ void reset_trinamic_drivers() { #define TMC_SWSERIAL_CONFLICT_MSG(A) STRINGIFY(A) "_SLAVE_ADDRESS conflicts with another driver using the same " STRINGIFY(A) "_SERIAL_RX_PIN or " STRINGIFY(A) "_SERIAL_TX_PIN" #define SA_NO_TMC_SW_C(A) static_assert(1 >= count_tmc_sw_serial_matches(TMC_SW_DETAIL_ARGS(A), 0, COUNT(sanity_tmc_sw_details)), TMC_SWSERIAL_CONFLICT_MSG(A)); - SA_NO_TMC_SW_C(X);SA_NO_TMC_SW_C(X2); - SA_NO_TMC_SW_C(Y);SA_NO_TMC_SW_C(Y2); - SA_NO_TMC_SW_C(Z);SA_NO_TMC_SW_C(Z2);SA_NO_TMC_SW_C(Z3);SA_NO_TMC_SW_C(Z4); - SA_NO_TMC_SW_C(E0);SA_NO_TMC_SW_C(E1);SA_NO_TMC_SW_C(E2);SA_NO_TMC_SW_C(E3);SA_NO_TMC_SW_C(E4);SA_NO_TMC_SW_C(E5);SA_NO_TMC_SW_C(E6);SA_NO_TMC_SW_C(E7); + SA_NO_TMC_SW_C(X); SA_NO_TMC_SW_C(X2); + SA_NO_TMC_SW_C(Y); SA_NO_TMC_SW_C(Y2); + SA_NO_TMC_SW_C(Z); SA_NO_TMC_SW_C(Z2); SA_NO_TMC_SW_C(Z3); SA_NO_TMC_SW_C(Z4); + SA_NO_TMC_SW_C(I); SA_NO_TMC_SW_C(J); SA_NO_TMC_SW_C(K); + SA_NO_TMC_SW_C(E0); SA_NO_TMC_SW_C(E1); SA_NO_TMC_SW_C(E2); SA_NO_TMC_SW_C(E3); SA_NO_TMC_SW_C(E4); SA_NO_TMC_SW_C(E5); SA_NO_TMC_SW_C(E6); SA_NO_TMC_SW_C(E7); #endif #endif // HAS_TRINAMIC_CONFIG diff --git a/Marlin/src/module/stepper/trinamic.h b/Marlin/src/module/stepper/trinamic.h index 9f7445e4fda5..0a956a70b360 100644 --- a/Marlin/src/module/stepper/trinamic.h +++ b/Marlin/src/module/stepper/trinamic.h @@ -46,6 +46,10 @@ #define TMC_Y_LABEL 'Y', '0' #define TMC_Z_LABEL 'Z', '0' +#define TMC_I_LABEL 'I', '0' +#define TMC_J_LABEL 'J', '0' +#define TMC_K_LABEL 'K', '0' + #define TMC_X2_LABEL 'X', '2' #define TMC_Y2_LABEL 'Y', '2' #define TMC_Z2_LABEL 'Z', '2' @@ -79,13 +83,22 @@ typedef struct { #ifndef CHOPPER_TIMING_X #define CHOPPER_TIMING_X CHOPPER_TIMING #endif -#ifndef CHOPPER_TIMING_Y +#if HAS_Y_AXIS && !defined(CHOPPER_TIMING_Y) #define CHOPPER_TIMING_Y CHOPPER_TIMING #endif -#ifndef CHOPPER_TIMING_Z +#if HAS_Z_AXIS && !defined(CHOPPER_TIMING_Z) #define CHOPPER_TIMING_Z CHOPPER_TIMING #endif -#ifndef CHOPPER_TIMING_E +#if LINEAR_AXES >= 4 && !defined(CHOPPER_TIMING_I) + #define CHOPPER_TIMING_I CHOPPER_TIMING +#endif +#if LINEAR_AXES >= 5 && !defined(CHOPPER_TIMING_J) + #define CHOPPER_TIMING_J CHOPPER_TIMING +#endif +#if LINEAR_AXES >= 6 && !defined(CHOPPER_TIMING_K) + #define CHOPPER_TIMING_K CHOPPER_TIMING +#endif +#if HAS_EXTRUDERS && !defined(CHOPPER_TIMING_E) #define CHOPPER_TIMING_E CHOPPER_TIMING #endif @@ -108,7 +121,7 @@ void reset_trinamic_drivers(); #define X_ENABLE_READ() stepperX.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(X) - #define X_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(X_STEP_PIN); }while(0) + #define X_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(X_STEP_PIN); }while(0) #endif #endif @@ -136,7 +149,7 @@ void reset_trinamic_drivers(); #define Z_ENABLE_READ() stepperZ.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Z) - #define Z_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z_STEP_PIN); }while(0) + #define Z_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z_STEP_PIN); }while(0) #endif #endif @@ -153,7 +166,7 @@ void reset_trinamic_drivers(); #define X2_ENABLE_READ() stepperX2.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(X2) - #define X2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(X2_STEP_PIN); }while(0) + #define X2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(X2_STEP_PIN); }while(0) #endif #endif @@ -170,7 +183,7 @@ void reset_trinamic_drivers(); #define Y2_ENABLE_READ() stepperY2.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Y2) - #define Y2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Y2_STEP_PIN); }while(0) + #define Y2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Y2_STEP_PIN); }while(0) #endif #endif @@ -181,13 +194,13 @@ void reset_trinamic_drivers(); #define CHOPPER_TIMING_Z2 CHOPPER_TIMING_Z #endif static constexpr chopper_timing_t chopper_timing_Z2 = CHOPPER_TIMING_Z2; - #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2) + #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define Z2_ENABLE_INIT() NOOP #define Z2_ENABLE_WRITE(STATE) stepperZ2.toff((STATE)==Z_ENABLE_ON ? chopper_timing_Z2.toff : 0) #define Z2_ENABLE_READ() stepperZ2.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Z2) - #define Z2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z2_STEP_PIN); }while(0) + #define Z2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z2_STEP_PIN); }while(0) #endif #endif @@ -204,7 +217,7 @@ void reset_trinamic_drivers(); #define Z3_ENABLE_READ() stepperZ3.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Z3) - #define Z3_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z3_STEP_PIN); }while(0) + #define Z3_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z3_STEP_PIN); }while(0) #endif #endif @@ -221,7 +234,49 @@ void reset_trinamic_drivers(); #define Z4_ENABLE_READ() stepperZ4.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(Z4) - #define Z4_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(Z4_STEP_PIN); }while(0) + #define Z4_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(Z4_STEP_PIN); }while(0) + #endif +#endif + +// I Stepper +#if AXIS_IS_TMC(I) + extern TMC_CLASS(I, I) stepperI; + static constexpr chopper_timing_t chopper_timing_I = CHOPPER_TIMING_I; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) + #define I_ENABLE_INIT() NOOP + #define I_ENABLE_WRITE(STATE) stepperI.toff((STATE)==I_ENABLE_ON ? chopper_timing.toff : 0) + #define I_ENABLE_READ() stepperI.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(I) + #define I_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(I_STEP_PIN); }while(0) + #endif +#endif + +// J Stepper +#if AXIS_IS_TMC(J) + extern TMC_CLASS(J, J) stepperJ; + static constexpr chopper_timing_t chopper_timing_J = CHOPPER_TIMING_J; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) + #define J_ENABLE_INIT() NOOP + #define J_ENABLE_WRITE(STATE) stepperJ.toff((STATE)==J_ENABLE_ON ? chopper_timing.toff : 0) + #define J_ENABLE_READ() stepperJ.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(J) + #define J_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(J_STEP_PIN); }while(0) + #endif +#endif + +// K Stepper +#if AXIS_IS_TMC(K) + extern TMC_CLASS(K, K) stepperK; + static constexpr chopper_timing_t chopper_timing_K = CHOPPER_TIMING_K; + #if ENABLED(SOFTWARE_DRIVER_ENABLE) + #define K_ENABLE_INIT() NOOP + #define K_ENABLE_WRITE(STATE) stepperK.toff((STATE)==K_ENABLE_ON ? chopper_timing.toff : 0) + #define K_ENABLE_READ() stepperK.isEnabled() + #endif + #if AXIS_HAS_SQUARE_WAVE(K) + #define K_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(K_STEP_PIN); }while(0) #endif #endif @@ -232,13 +287,13 @@ void reset_trinamic_drivers(); #define CHOPPER_TIMING_E0 CHOPPER_TIMING_E #endif static constexpr chopper_timing_t chopper_timing_E0 = CHOPPER_TIMING_E0; - #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0) + #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define E0_ENABLE_INIT() NOOP #define E0_ENABLE_WRITE(STATE) stepperE0.toff((STATE)==E_ENABLE_ON ? chopper_timing_E0.toff : 0) #define E0_ENABLE_READ() stepperE0.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E0) - #define E0_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E0_STEP_PIN); }while(0) + #define E0_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E0_STEP_PIN); }while(0) #endif #endif @@ -249,13 +304,13 @@ void reset_trinamic_drivers(); #define CHOPPER_TIMING_E1 CHOPPER_TIMING_E #endif static constexpr chopper_timing_t chopper_timing_E1 = CHOPPER_TIMING_E1; - #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1) + #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define E1_ENABLE_INIT() NOOP #define E1_ENABLE_WRITE(STATE) stepperE1.toff((STATE)==E_ENABLE_ON ? chopper_timing_E1.toff : 0) #define E1_ENABLE_READ() stepperE1.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E1) - #define E1_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E1_STEP_PIN); }while(0) + #define E1_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E1_STEP_PIN); }while(0) #endif #endif @@ -266,13 +321,13 @@ void reset_trinamic_drivers(); #define CHOPPER_TIMING_E2 CHOPPER_TIMING_E #endif static constexpr chopper_timing_t chopper_timing_E2 = CHOPPER_TIMING_E2; - #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2) + #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define E2_ENABLE_INIT() NOOP #define E2_ENABLE_WRITE(STATE) stepperE2.toff((STATE)==E_ENABLE_ON ? chopper_timing_E2.toff : 0) #define E2_ENABLE_READ() stepperE2.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E2) - #define E2_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E2_STEP_PIN); }while(0) + #define E2_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E2_STEP_PIN); }while(0) #endif #endif @@ -283,13 +338,13 @@ void reset_trinamic_drivers(); #define CHOPPER_TIMING_E3 CHOPPER_TIMING_E #endif static constexpr chopper_timing_t chopper_timing_E3 = CHOPPER_TIMING_E3; - #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3) + #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define E3_ENABLE_INIT() NOOP #define E3_ENABLE_WRITE(STATE) stepperE3.toff((STATE)==E_ENABLE_ON ? chopper_timing_E3.toff : 0) #define E3_ENABLE_READ() stepperE3.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E3) - #define E3_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E3_STEP_PIN); }while(0) + #define E3_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E3_STEP_PIN); }while(0) #endif #endif @@ -300,13 +355,13 @@ void reset_trinamic_drivers(); #define CHOPPER_TIMING_E4 CHOPPER_TIMING_E #endif static constexpr chopper_timing_t chopper_timing_E4 = CHOPPER_TIMING_E4; - #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4) + #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define E4_ENABLE_INIT() NOOP #define E4_ENABLE_WRITE(STATE) stepperE4.toff((STATE)==E_ENABLE_ON ? chopper_timing_E4.toff : 0) #define E4_ENABLE_READ() stepperE4.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E4) - #define E4_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E4_STEP_PIN); }while(0) + #define E4_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E4_STEP_PIN); }while(0) #endif #endif @@ -317,13 +372,13 @@ void reset_trinamic_drivers(); #define CHOPPER_TIMING_E5 CHOPPER_TIMING_E #endif static constexpr chopper_timing_t chopper_timing_E5 = CHOPPER_TIMING_E5; - #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5) + #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define E5_ENABLE_INIT() NOOP #define E5_ENABLE_WRITE(STATE) stepperE5.toff((STATE)==E_ENABLE_ON ? chopper_timing_E5.toff : 0) #define E5_ENABLE_READ() stepperE5.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E5) - #define E5_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E5_STEP_PIN); }while(0) + #define E5_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E5_STEP_PIN); }while(0) #endif #endif @@ -334,13 +389,13 @@ void reset_trinamic_drivers(); #define CHOPPER_TIMING_E6 CHOPPER_TIMING_E #endif static constexpr chopper_timing_t chopper_timing_E6 = CHOPPER_TIMING_E6; - #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6) + #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define E6_ENABLE_INIT() NOOP #define E6_ENABLE_WRITE(STATE) stepperE6.toff((STATE)==E_ENABLE_ON ? chopper_timing_E6.toff : 0) #define E6_ENABLE_READ() stepperE6.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E6) - #define E6_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E6_STEP_PIN); }while(0) + #define E6_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E6_STEP_PIN); }while(0) #endif #endif @@ -351,12 +406,12 @@ void reset_trinamic_drivers(); #define CHOPPER_TIMING_E7 CHOPPER_TIMING_E #endif static constexpr chopper_timing_t chopper_timing_E7 = CHOPPER_TIMING_E7; - #if ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7) + #if ENABLED(SOFTWARE_DRIVER_ENABLE) #define E7_ENABLE_INIT() NOOP #define E7_ENABLE_WRITE(STATE) stepperE7.toff((STATE)==E_ENABLE_ON ? chopper_timing_E7.toff : 0) #define E7_ENABLE_READ() stepperE7.isEnabled() #endif #if AXIS_HAS_SQUARE_WAVE(E7) - #define E7_STEP_WRITE(STATE) do{ if(STATE) TOGGLE(E7_STEP_PIN); }while(0) + #define E7_STEP_WRITE(STATE) do{ if (STATE) TOGGLE(E7_STEP_PIN); }while(0) #endif #endif diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index b5820e17bfcd..0f6395b12730 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -34,60 +34,103 @@ #include "temperature.h" #include "endstops.h" #include "planner.h" +#include "printcounter.h" + +#if EITHER(HAS_COOLER, LASER_COOLANT_FLOW_METER) + #include "../feature/cooler.h" + #include "../feature/spindle_laser.h" +#endif #if ENABLED(EMERGENCY_PARSER) #include "motion.h" #endif #if ENABLED(DWIN_CREALITY_LCD) - #include "../lcd/dwin/e3v2/dwin.h" + #include "../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif #if ENABLED(EXTENSIBLE_UI) #include "../lcd/extui/ui_api.h" #endif -#if MAX6675_0_IS_MAX31865 || MAX6675_1_IS_MAX31865 - #include - #if MAX6675_0_IS_MAX31865 && !defined(MAX31865_CS_PIN) && PIN_EXISTS(MAX6675_SS) - #define MAX31865_CS_PIN MAX6675_SS_PIN - #endif - #if MAX6675_1_IS_MAX31865 && !defined(MAX31865_CS2_PIN) && PIN_EXISTS(MAX6675_SS2) - #define MAX31865_CS2_PIN MAX6675_SS2_PIN - #endif - #ifndef MAX31865_MOSI_PIN - #define MAX31865_MOSI_PIN SD_MOSI_PIN - #endif - #ifndef MAX31865_MISO_PIN - #define MAX31865_MISO_PIN MAX6675_DO_PIN - #endif - #ifndef MAX31865_SCK_PIN - #define MAX31865_SCK_PIN MAX6675_SCK_PIN - #endif - #if MAX6675_0_IS_MAX31865 && PIN_EXISTS(MAX31865_CS) - #define HAS_MAX31865 1 - Adafruit_MAX31865 max31865_0 = Adafruit_MAX31865(MAX31865_CS_PIN - #if MAX31865_CS_PIN != MAX6675_SS_PIN - , MAX31865_MOSI_PIN, MAX31865_MISO_PIN, MAX31865_SCK_PIN // For software SPI also set MOSI/MISO/SCK - #endif - ); - #endif - #if MAX6675_1_IS_MAX31865 && PIN_EXISTS(MAX31865_CS2) - #define HAS_MAX31865 1 - Adafruit_MAX31865 max31865_1 = Adafruit_MAX31865(MAX31865_CS2_PIN - #if MAX31865_CS2_PIN != MAX6675_SS2_PIN - , MAX31865_MOSI_PIN, MAX31865_MISO_PIN, MAX31865_SCK_PIN // For software SPI also set MOSI/MISO/SCK - #endif - ); +#if ENABLED(HOST_PROMPT_SUPPORT) + #include "../feature/host_actions.h" +#endif + +#if HAS_TEMP_SENSOR + #include "../gcode/gcode.h" +#endif + +// MAX TC related macros +#define TEMP_SENSOR_IS_MAX(n, M) (ENABLED(TEMP_SENSOR_##n##_IS_MAX##M) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX##M) && REDUNDANT_TEMP_MATCH(SOURCE, E##n))) +#define TEMP_SENSOR_IS_ANY_MAX_TC(n) (ENABLED(TEMP_SENSOR_##n##_IS_MAX_TC) || (ENABLED(TEMP_SENSOR_REDUNDANT_IS_MAX_TC) && REDUNDANT_TEMP_MATCH(SOURCE, E##n))) + +// LIB_MAX6675 can be added to the build_flags in platformio.ini to use a user-defined library +// If LIB_MAX6675 is not on the build_flags then raw SPI reads will be used. +#if HAS_MAX6675 && USE_LIB_MAX6675 + #include + #define HAS_MAX6675_LIBRARY 1 +#endif + +// LIB_MAX31855 can be added to the build_flags in platformio.ini to use a user-defined library. +// If LIB_MAX31855 is not on the build_flags then raw SPI reads will be used. +#if HAS_MAX31855 && USE_ADAFRUIT_MAX31855 + #include + #define HAS_MAX31855_LIBRARY 1 + typedef Adafruit_MAX31855 MAX31855; +#endif + +#if HAS_MAX31865 + #if USE_ADAFRUIT_MAX31865 + #include + typedef Adafruit_MAX31865 MAX31865; + #else + #include "../libs/MAX31865.h" #endif #endif -#if EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) && PINS_EXIST(MAX6675_SCK, MAX6675_DO) - #define MAX6675_SEPARATE_SPI 1 +#if HAS_MAX6675_LIBRARY || HAS_MAX31855_LIBRARY || HAS_MAX31865 + #define HAS_MAXTC_LIBRARIES 1 +#endif + +// If we have a MAX TC with SCK and MISO pins defined, it's either on a separate/dedicated Hardware +// SPI bus, or some pins for Software SPI. Alternate Hardware SPI buses are not supported yet, so +// your SPI options are: +// +// 1. Only CS pin(s) defined: Hardware SPI on the default bus (usually the SD card SPI). +// 2. CS, MISO, and SCK pins defined: Software SPI on a separate bus, as defined by MISO, SCK. +// 3. CS, MISO, and SCK pins w/ FORCE_HW_SPI: Hardware SPI on the default bus, ignoring MISO, SCK. +// +#if TEMP_SENSOR_IS_ANY_MAX_TC(0) && TEMP_SENSOR_0_HAS_SPI_PINS && DISABLED(TEMP_SENSOR_FORCE_HW_SPI) + #define TEMP_SENSOR_0_USES_SW_SPI 1 +#endif +#if TEMP_SENSOR_IS_ANY_MAX_TC(1) && TEMP_SENSOR_1_HAS_SPI_PINS && DISABLED(TEMP_SENSOR_FORCE_HW_SPI) + #define TEMP_SENSOR_1_USES_SW_SPI 1 #endif -#if MAX6675_SEPARATE_SPI +#if (TEMP_SENSOR_0_USES_SW_SPI || TEMP_SENSOR_1_USES_SW_SPI) && !HAS_MAXTC_LIBRARIES #include "../libs/private_spi.h" + #define HAS_MAXTC_SW_SPI 1 + + // Define pins for SPI-based sensors + #if TEMP_SENSOR_0_USES_SW_SPI + #define SW_SPI_SCK_PIN TEMP_0_SCK_PIN + #define SW_SPI_MISO_PIN TEMP_0_MISO_PIN + #if PIN_EXISTS(TEMP_0_MOSI) + #define SW_SPI_MOSI_PIN TEMP_0_MOSI_PIN + #endif + #else + #define SW_SPI_SCK_PIN TEMP_1_SCK_PIN + #define SW_SPI_MISO_PIN TEMP_1_MISO_PIN + #if PIN_EXISTS(TEMP_1_MOSI) + #define SW_SPI_MOSI_PIN TEMP_1_MOSI_PIN + #endif + #endif + #ifndef SW_SPI_MOSI_PIN + #define SW_SPI_MOSI_PIN SD_MOSI_PIN + #endif #endif #if ENABLED(PID_EXTRUSION_SCALING) @@ -98,8 +141,6 @@ #include "../feature/babystep.h" #endif -#include "printcounter.h" - #if ENABLED(FILAMENT_WIDTH_SENSOR) #include "../feature/filwidth.h" #endif @@ -129,24 +170,19 @@ #endif #if HAS_SERVOS - #include "./servo.h" + #include "servo.h" #endif -#if ANY(HEATER_0_USES_THERMISTOR, HEATER_1_USES_THERMISTOR, HEATER_2_USES_THERMISTOR, HEATER_3_USES_THERMISTOR, \ - HEATER_4_USES_THERMISTOR, HEATER_5_USES_THERMISTOR, HEATER_6_USES_THERMISTOR, HEATER_7_USES_THERMISTOR ) +#if ANY(TEMP_SENSOR_0_IS_THERMISTOR, TEMP_SENSOR_1_IS_THERMISTOR, TEMP_SENSOR_2_IS_THERMISTOR, TEMP_SENSOR_3_IS_THERMISTOR, \ + TEMP_SENSOR_4_IS_THERMISTOR, TEMP_SENSOR_5_IS_THERMISTOR, TEMP_SENSOR_6_IS_THERMISTOR, TEMP_SENSOR_7_IS_THERMISTOR ) #define HAS_HOTEND_THERMISTOR 1 #endif #if HAS_HOTEND_THERMISTOR - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - static const temp_entry_t* heater_ttbl_map[2] = { HEATER_0_TEMPTABLE, HEATER_1_TEMPTABLE }; - static constexpr uint8_t heater_ttbllen_map[2] = { HEATER_0_TEMPTABLE_LEN, HEATER_1_TEMPTABLE_LEN }; - #else - #define NEXT_TEMPTABLE(N) ,HEATER_##N##_TEMPTABLE - #define NEXT_TEMPTABLE_LEN(N) ,HEATER_##N##_TEMPTABLE_LEN - static const temp_entry_t* heater_ttbl_map[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_TEMPTABLE REPEAT_S(1, HOTENDS, NEXT_TEMPTABLE)); - static constexpr uint8_t heater_ttbllen_map[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_TEMPTABLE_LEN REPEAT_S(1, HOTENDS, NEXT_TEMPTABLE_LEN)); - #endif + #define NEXT_TEMPTABLE(N) ,TEMPTABLE_##N + #define NEXT_TEMPTABLE_LEN(N) ,TEMPTABLE_##N##_LEN + static const temp_entry_t* heater_ttbl_map[HOTENDS] = ARRAY_BY_HOTENDS(TEMPTABLE_0 REPEAT_S(1, HOTENDS, NEXT_TEMPTABLE)); + static constexpr uint8_t heater_ttbllen_map[HOTENDS] = ARRAY_BY_HOTENDS(TEMPTABLE_0_LEN REPEAT_S(1, HOTENDS, NEXT_TEMPTABLE_LEN)); #endif Temperature thermalManager; @@ -169,18 +205,89 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, #else #define _CHAMBER_PSTR(h) #endif +#if HAS_COOLER + #define _COOLER_PSTR(h) (h) == H_COOLER ? GET_TEXT(MSG_COOLER) : +#else + #define _COOLER_PSTR(h) +#endif #define _E_PSTR(h,N) ((HOTENDS) > N && (h) == N) ? PSTR(LCD_STR_E##N) : -#define HEATER_PSTR(h) _BED_PSTR(h) _CHAMBER_PSTR(h) _E_PSTR(h,1) _E_PSTR(h,2) _E_PSTR(h,3) _E_PSTR(h,4) _E_PSTR(h,5) PSTR(LCD_STR_E0) +#define HEATER_PSTR(h) _BED_PSTR(h) _CHAMBER_PSTR(h) _COOLER_PSTR(h) _E_PSTR(h,1) _E_PSTR(h,2) _E_PSTR(h,3) _E_PSTR(h,4) _E_PSTR(h,5) PSTR(LCD_STR_E0) + +// +// Initialize MAX TC objects/SPI +// +#if HAS_MAX_TC + + #if HAS_MAXTC_SW_SPI + // Initialize SoftSPI for non-lib Software SPI; Libraries take care of it themselves. + template + SoftSPI SPIclass::softSPI; + SPIclass max_tc_spi; + + #endif + + #define MAXTC_INIT(n, M) \ + MAX##M max##M##_##n = MAX##M( \ + TEMP_##n##_CS_PIN \ + OPTARG(_MAX31865_##n##_SW, TEMP_##n##_MOSI_PIN) \ + OPTARG(TEMP_SENSOR_##n##_USES_SW_SPI, TEMP_##n##_MISO_PIN, TEMP_##n##_SCK_PIN) \ + OPTARG(LARGE_PINMAP, HIGH) \ + ) + + #if HAS_MAX6675_LIBRARY + #if TEMP_SENSOR_IS_MAX(0, 6675) + MAXTC_INIT(0, 6675); + #endif + #if TEMP_SENSOR_IS_MAX(1, 6675) + MAXTC_INIT(1, 6675); + #endif + #endif + + #if HAS_MAX31855_LIBRARY + #if TEMP_SENSOR_IS_MAX(0, 31855) + MAXTC_INIT(0, 31855); + #endif + #if TEMP_SENSOR_IS_MAX(1, 31855) + MAXTC_INIT(1, 31855); + #endif + #endif + + // MAX31865 always uses a library, unlike '55 & 6675 + #if HAS_MAX31865 + #define _MAX31865_0_SW TEMP_SENSOR_0_USES_SW_SPI + #define _MAX31865_1_SW TEMP_SENSOR_1_USES_SW_SPI + + #if TEMP_SENSOR_IS_MAX(0, 31865) + MAXTC_INIT(0, 31865); + #endif + #if TEMP_SENSOR_IS_MAX(1, 31865) + MAXTC_INIT(1, 31865); + #endif -// public: + #undef _MAX31865_0_SW + #undef _MAX31865_1_SW + #endif + + #undef MAXTC_INIT + +#endif + +/** + * public: + */ #if ENABLED(NO_FAN_SLOWING_IN_PID_TUNING) bool Temperature::adaptive_fan_slowing = true; #endif #if HAS_HOTEND - hotend_info_t Temperature::temp_hotend[HOTEND_TEMPS]; // = { 0 } - const uint16_t Temperature::heater_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP); + hotend_info_t Temperature::temp_hotend[HOTENDS]; + #define _HMT(N) HEATER_##N##_MAXTEMP, + const celsius_t Temperature::hotend_maxtemp[HOTENDS] = ARRAY_BY_HOTENDS(HEATER_0_MAXTEMP, HEATER_1_MAXTEMP, HEATER_2_MAXTEMP, HEATER_3_MAXTEMP, HEATER_4_MAXTEMP, HEATER_5_MAXTEMP, HEATER_6_MAXTEMP, HEATER_7_MAXTEMP); +#endif + +#if HAS_TEMP_REDUNDANT + redundant_info_t Temperature::temp_redundant; #endif #if ENABLED(AUTO_POWER_E_FANS) @@ -191,24 +298,54 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, uint8_t Temperature::chamberfan_speed; // = 0 #endif +#if ENABLED(AUTO_POWER_COOLER_FAN) + uint8_t Temperature::coolerfan_speed; // = 0 +#endif + +// Init fans according to whether they're native PWM or Software PWM +#ifdef BOARD_OPENDRAIN_MOSFETS + #define _INIT_SOFT_FAN(P) OUT_WRITE_OD(P, FAN_INVERTING ? LOW : HIGH) +#else + #define _INIT_SOFT_FAN(P) OUT_WRITE(P, FAN_INVERTING ? LOW : HIGH) +#endif +#if ENABLED(FAN_SOFT_PWM) + #define _INIT_FAN_PIN(P) _INIT_SOFT_FAN(P) +#else + #define _INIT_FAN_PIN(P) do{ if (PWM_PIN(P)) SET_PWM(P); else _INIT_SOFT_FAN(P); }while(0) +#endif +#if ENABLED(FAST_PWM_FAN) + #define SET_FAST_PWM_FREQ(P) set_pwm_frequency(P, FAST_PWM_FAN_FREQUENCY) +#else + #define SET_FAST_PWM_FREQ(P) NOOP +#endif +#define INIT_FAN_PIN(P) do{ _INIT_FAN_PIN(P); SET_FAST_PWM_FREQ(P); }while(0) + +// HAS_FAN does not include CONTROLLER_FAN #if HAS_FAN uint8_t Temperature::fan_speed[FAN_COUNT]; // = { 0 } #if ENABLED(EXTRA_FAN_SPEED) - uint8_t Temperature::old_fan_speed[FAN_COUNT], Temperature::new_fan_speed[FAN_COUNT]; - void Temperature::set_temp_fan_speed(const uint8_t fan, const uint16_t tmp_temp) { - switch (tmp_temp) { + Temperature::extra_fan_t Temperature::extra_fan_speed[FAN_COUNT]; + + /** + * Handle the M106 P T command: + * T1 = Restore fan speed saved on the last T2 + * T2 = Save the fan speed, then set to the last T<3-255> value + * T<3-255> = Set the "extra fan speed" + */ + void Temperature::set_temp_fan_speed(const uint8_t fan, const uint16_t command_or_speed) { + switch (command_or_speed) { case 1: - set_fan_speed(fan, old_fan_speed[fan]); + set_fan_speed(fan, extra_fan_speed[fan].saved); break; case 2: - old_fan_speed[fan] = fan_speed[fan]; - set_fan_speed(fan, new_fan_speed[fan]); + extra_fan_speed[fan].saved = fan_speed[fan]; + set_fan_speed(fan, extra_fan_speed[fan].speed); break; default: - new_fan_speed[fan] = _MIN(tmp_temp, 255U); + extra_fan_speed[fan].speed = _MIN(command_or_speed, 255U); break; } } @@ -221,40 +358,43 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, #endif #if ENABLED(ADAPTIVE_FAN_SLOWING) - uint8_t Temperature::fan_speed_scaler[FAN_COUNT] = ARRAY_N(FAN_COUNT, 128, 128, 128, 128, 128, 128, 128, 128); + uint8_t Temperature::fan_speed_scaler[FAN_COUNT] = ARRAY_N_1(FAN_COUNT, 128); #endif /** * Set the print fan speed for a target extruder */ - void Temperature::set_fan_speed(uint8_t target, uint16_t speed) { + void Temperature::set_fan_speed(uint8_t fan, uint16_t speed) { NOMORE(speed, 255U); #if ENABLED(SINGLENOZZLE_STANDBY_FAN) - if (target != active_extruder) { - if (target < EXTRUDERS) singlenozzle_fan_speed[target] = speed; + if (fan != active_extruder) { + if (fan < EXTRUDERS) singlenozzle_fan_speed[fan] = speed; return; } #endif - TERN_(SINGLENOZZLE, target = 0); // Always use fan index 0 with SINGLENOZZLE + TERN_(SINGLENOZZLE, if (fan < EXTRUDERS) fan = 0); // Always fan 0 for SINGLENOZZLE E fan - if (target >= FAN_COUNT) return; + if (fan >= FAN_COUNT) return; - fan_speed[target] = speed; + fan_speed[fan] = speed; + #if REDUNDANT_PART_COOLING_FAN + if (fan == 0) fan_speed[REDUNDANT_PART_COOLING_FAN] = speed; + #endif - TERN_(REPORT_FAN_CHANGE, report_fan_speed(target)); + TERN_(REPORT_FAN_CHANGE, report_fan_speed(fan)); } #if ENABLED(REPORT_FAN_CHANGE) /** * Report print fan speed for a target extruder */ - void Temperature::report_fan_speed(const uint8_t target) { - if (target >= FAN_COUNT) return; - PORT_REDIRECT(SERIAL_ALL); - SERIAL_ECHOLNPAIR("M106 P", target, " S", fan_speed[target]); + void Temperature::report_fan_speed(const uint8_t fan) { + if (fan >= FAN_COUNT) return; + PORT_REDIRECT(SerialMask::All); + SERIAL_ECHOLNPGM("M106 P", fan, " S", fan_speed[fan]); } #endif @@ -284,62 +424,69 @@ const char str_t_thermal_runaway[] PROGMEM = STR_T_THERMAL_RUNAWAY, #if HAS_HEATED_BED bed_info_t Temperature::temp_bed; // = { 0 } // Init min and max temp with extreme values to prevent false errors during startup - #ifdef BED_MINTEMP - int16_t Temperature::mintemp_raw_BED = HEATER_BED_RAW_LO_TEMP; - #endif - #ifdef BED_MAXTEMP - int16_t Temperature::maxtemp_raw_BED = HEATER_BED_RAW_HI_TEMP; - #endif + int16_t Temperature::mintemp_raw_BED = TEMP_SENSOR_BED_RAW_LO_TEMP, + Temperature::maxtemp_raw_BED = TEMP_SENSOR_BED_RAW_HI_TEMP; TERN_(WATCH_BED, bed_watch_t Temperature::watch_bed); // = { 0 } IF_DISABLED(PIDTEMPBED, millis_t Temperature::next_bed_check_ms); -#endif // HAS_HEATED_BED +#endif #if HAS_TEMP_CHAMBER chamber_info_t Temperature::temp_chamber; // = { 0 } #if HAS_HEATED_CHAMBER - int16_t fan_chamber_pwm; - bool flag_chamber_off; - bool flag_chamber_excess_heat = false; millis_t next_cool_check_ms_2 = 0; - float old_temp = 9999; - #ifdef CHAMBER_MINTEMP - int16_t Temperature::mintemp_raw_CHAMBER = HEATER_CHAMBER_RAW_LO_TEMP; - #endif - #ifdef CHAMBER_MAXTEMP - int16_t Temperature::maxtemp_raw_CHAMBER = HEATER_CHAMBER_RAW_HI_TEMP; - #endif - #if WATCH_CHAMBER - chamber_watch_t Temperature::watch_chamber{0}; + celsius_float_t old_temp = 9999; + int16_t Temperature::mintemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_LO_TEMP, + Temperature::maxtemp_raw_CHAMBER = TEMP_SENSOR_CHAMBER_RAW_HI_TEMP; + TERN_(WATCH_CHAMBER, chamber_watch_t Temperature::watch_chamber{0}); + IF_DISABLED(PIDTEMPCHAMBER, millis_t Temperature::next_chamber_check_ms); + #endif +#endif + +#if HAS_TEMP_COOLER + cooler_info_t Temperature::temp_cooler; // = { 0 } + #if HAS_COOLER + bool flag_cooler_state; + //bool flag_cooler_excess = false; + celsius_float_t previous_temp = 9999; + int16_t Temperature::mintemp_raw_COOLER = TEMP_SENSOR_COOLER_RAW_LO_TEMP, + Temperature::maxtemp_raw_COOLER = TEMP_SENSOR_COOLER_RAW_HI_TEMP; + #if WATCH_COOLER + cooler_watch_t Temperature::watch_cooler{0}; #endif - millis_t Temperature::next_chamber_check_ms; - #endif // HAS_HEATED_CHAMBER -#endif // HAS_TEMP_CHAMBER + millis_t Temperature::next_cooler_check_ms, Temperature::cooler_fan_flush_ms; + #endif +#endif #if HAS_TEMP_PROBE probe_info_t Temperature::temp_probe; // = { 0 } #endif -// Initialized by settings.load() -#if ENABLED(PIDTEMP) - //hotend_pid_t Temperature::pid[HOTENDS]; +#if HAS_TEMP_BOARD + board_info_t Temperature::temp_board; // = { 0 } + #if ENABLED(THERMAL_PROTECTION_BOARD) + int16_t Temperature::mintemp_raw_BOARD = TEMP_SENSOR_BOARD_RAW_LO_TEMP, + Temperature::maxtemp_raw_BOARD = TEMP_SENSOR_BOARD_RAW_HI_TEMP; + #endif #endif #if ENABLED(PREVENT_COLD_EXTRUSION) bool Temperature::allow_cold_extrude = false; - int16_t Temperature::extrude_min_temp = EXTRUDE_MINTEMP; + celsius_t Temperature::extrude_min_temp = EXTRUDE_MINTEMP; #endif -// private: - -#if EARLY_WATCHDOG - bool Temperature::inited = false; +#if HAS_ADC_BUTTONS + uint32_t Temperature::current_ADCKey_raw = HAL_ADC_RANGE; + uint16_t Temperature::ADCKey_count = 0; #endif -#if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - uint16_t Temperature::redundant_temperature_raw = 0; - float Temperature::redundant_temperature = 0.0; +#if ENABLED(PID_EXTRUSION_SCALING) + int16_t Temperature::lpq_len; // Initialized in settings.cpp #endif +/** + * private: + */ + volatile bool Temperature::raw_temps_ready = false; #if ENABLED(PID_EXTRUSION_SCALING) @@ -347,27 +494,27 @@ volatile bool Temperature::raw_temps_ready = false; lpq_ptr_t Temperature::lpq_ptr = 0; #endif -#define TEMPDIR(N) ((HEATER_##N##_RAW_LO_TEMP) < (HEATER_##N##_RAW_HI_TEMP) ? 1 : -1) +#define TEMPDIR(N) ((TEMP_SENSOR_##N##_RAW_LO_TEMP) < (TEMP_SENSOR_##N##_RAW_HI_TEMP) ? 1 : -1) #if HAS_HOTEND // Init mintemp and maxtemp with extreme values to prevent false errors during startup - constexpr temp_range_t sensor_heater_0 { HEATER_0_RAW_LO_TEMP, HEATER_0_RAW_HI_TEMP, 0, 16383 }, - sensor_heater_1 { HEATER_1_RAW_LO_TEMP, HEATER_1_RAW_HI_TEMP, 0, 16383 }, - sensor_heater_2 { HEATER_2_RAW_LO_TEMP, HEATER_2_RAW_HI_TEMP, 0, 16383 }, - sensor_heater_3 { HEATER_3_RAW_LO_TEMP, HEATER_3_RAW_HI_TEMP, 0, 16383 }, - sensor_heater_4 { HEATER_4_RAW_LO_TEMP, HEATER_4_RAW_HI_TEMP, 0, 16383 }, - sensor_heater_5 { HEATER_5_RAW_LO_TEMP, HEATER_5_RAW_HI_TEMP, 0, 16383 }, - sensor_heater_6 { HEATER_6_RAW_LO_TEMP, HEATER_6_RAW_HI_TEMP, 0, 16383 }, - sensor_heater_7 { HEATER_7_RAW_LO_TEMP, HEATER_7_RAW_HI_TEMP, 0, 16383 }; + constexpr temp_range_t sensor_heater_0 { TEMP_SENSOR_0_RAW_LO_TEMP, TEMP_SENSOR_0_RAW_HI_TEMP, 0, 16383 }, + sensor_heater_1 { TEMP_SENSOR_1_RAW_LO_TEMP, TEMP_SENSOR_1_RAW_HI_TEMP, 0, 16383 }, + sensor_heater_2 { TEMP_SENSOR_2_RAW_LO_TEMP, TEMP_SENSOR_2_RAW_HI_TEMP, 0, 16383 }, + sensor_heater_3 { TEMP_SENSOR_3_RAW_LO_TEMP, TEMP_SENSOR_3_RAW_HI_TEMP, 0, 16383 }, + sensor_heater_4 { TEMP_SENSOR_4_RAW_LO_TEMP, TEMP_SENSOR_4_RAW_HI_TEMP, 0, 16383 }, + sensor_heater_5 { TEMP_SENSOR_5_RAW_LO_TEMP, TEMP_SENSOR_5_RAW_HI_TEMP, 0, 16383 }, + sensor_heater_6 { TEMP_SENSOR_6_RAW_LO_TEMP, TEMP_SENSOR_6_RAW_HI_TEMP, 0, 16383 }, + sensor_heater_7 { TEMP_SENSOR_7_RAW_LO_TEMP, TEMP_SENSOR_7_RAW_HI_TEMP, 0, 16383 }; temp_range_t Temperature::temp_range[HOTENDS] = ARRAY_BY_HOTENDS(sensor_heater_0, sensor_heater_1, sensor_heater_2, sensor_heater_3, sensor_heater_4, sensor_heater_5, sensor_heater_6, sensor_heater_7); #endif -#ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED +#if MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED > 1 uint8_t Temperature::consecutive_low_temperature_error[HOTENDS] = { 0 }; #endif -#ifdef MILLISECONDS_PREHEAT_TIME +#if MILLISECONDS_PREHEAT_TIME > 0 millis_t Temperature::preheat_end_time[HOTENDS] = { 0 }; #endif @@ -381,26 +528,20 @@ volatile bool Temperature::raw_temps_ready = false; #endif #if ENABLED(SINGLENOZZLE_STANDBY_TEMP) - uint16_t Temperature::singlenozzle_temp[EXTRUDERS]; - #if HAS_FAN - uint8_t Temperature::singlenozzle_fan_speed[EXTRUDERS]; - #endif + celsius_t Temperature::singlenozzle_temp[EXTRUDERS]; #endif - -#if ENABLED(PROBING_HEATERS_OFF) - bool Temperature::paused; +#if ENABLED(SINGLENOZZLE_STANDBY_FAN) + uint8_t Temperature::singlenozzle_fan_speed[EXTRUDERS]; #endif -// public: - -#if HAS_ADC_BUTTONS - uint32_t Temperature::current_ADCKey_raw = HAL_ADC_RANGE; - uint16_t Temperature::ADCKey_count = 0; +#if ENABLED(PROBING_HEATERS_OFF) + bool Temperature::paused_for_probing; #endif -#if ENABLED(PID_EXTRUSION_SCALING) - int16_t Temperature::lpq_len; // Initialized in settings.cpp -#endif +/** + * public: + * Class and Instance Methods + */ #if HAS_PID_HEATING @@ -414,59 +555,66 @@ volatile bool Temperature::raw_temps_ready = false; * Needs sufficient heater power to make some overshoot at target * temperature to succeed. */ - void Temperature::PID_autotune(const float &target, const heater_id_t heater_id, const int8_t ncycles, const bool set_result/*=false*/) { - float current_temp = 0.0; + void Temperature::PID_autotune(const celsius_t target, const heater_id_t heater_id, const int8_t ncycles, const bool set_result/*=false*/) { + celsius_float_t current_temp = 0.0; int cycles = 0; bool heating = true; millis_t next_temp_ms = millis(), t1 = next_temp_ms, t2 = next_temp_ms; long t_high = 0, t_low = 0; - long bias, d; PID_t tune_pid = { 0, 0, 0 }; - float maxT = 0, minT = 10000; + celsius_float_t maxT = 0, minT = 10000; const bool isbed = (heater_id == H_BED); + const bool ischamber = (heater_id == H_CHAMBER); - #if HAS_PID_FOR_BOTH - #define GHV(B,H) (isbed ? (B) : (H)) - #define SHV(B,H) do{ if (isbed) temp_bed.soft_pwm_amount = B; else temp_hotend[heater_id].soft_pwm_amount = H; }while(0) - #define ONHEATINGSTART() (isbed ? printerEventLEDs.onBedHeatingStart() : printerEventLEDs.onHotendHeatingStart()) - #define ONHEATING(S,C,T) (isbed ? printerEventLEDs.onBedHeating(S,C,T) : printerEventLEDs.onHotendHeating(S,C,T)) - #elif ENABLED(PIDTEMPBED) - #define GHV(B,H) B - #define SHV(B,H) (temp_bed.soft_pwm_amount = B) - #define ONHEATINGSTART() printerEventLEDs.onBedHeatingStart() - #define ONHEATING(S,C,T) printerEventLEDs.onBedHeating(S,C,T) + #if ENABLED(PIDTEMPCHAMBER) + #define C_TERN(T,A,B) ((T) ? (A) : (B)) + #else + #define C_TERN(T,A,B) (B) + #endif + #if ENABLED(PIDTEMPBED) + #define B_TERN(T,A,B) ((T) ? (A) : (B)) #else - #define GHV(B,H) H - #define SHV(B,H) (temp_hotend[heater_id].soft_pwm_amount = H) - #define ONHEATINGSTART() printerEventLEDs.onHotendHeatingStart() - #define ONHEATING(S,C,T) printerEventLEDs.onHotendHeating(S,C,T) + #define B_TERN(T,A,B) (B) #endif - #define WATCH_PID BOTH(WATCH_BED, PIDTEMPBED) || BOTH(WATCH_HOTENDS, PIDTEMP) + #define GHV(C,B,H) C_TERN(ischamber, C, B_TERN(isbed, B, H)) + #define SHV(V) C_TERN(ischamber, temp_chamber.soft_pwm_amount = V, B_TERN(isbed, temp_bed.soft_pwm_amount = V, temp_hotend[heater_id].soft_pwm_amount = V)) + #define ONHEATINGSTART() C_TERN(ischamber, printerEventLEDs.onChamberHeatingStart(), B_TERN(isbed, printerEventLEDs.onBedHeatingStart(), printerEventLEDs.onHotendHeatingStart())) + #define ONHEATING(S,C,T) C_TERN(ischamber, printerEventLEDs.onChamberHeating(S,C,T), B_TERN(isbed, printerEventLEDs.onBedHeating(S,C,T), printerEventLEDs.onHotendHeating(S,C,T))) + + #define WATCH_PID BOTH(WATCH_CHAMBER, PIDTEMPCHAMBER) || BOTH(WATCH_BED, PIDTEMPBED) || BOTH(WATCH_HOTENDS, PIDTEMP) #if WATCH_PID - #if ALL(THERMAL_PROTECTION_HOTENDS, PIDTEMP, THERMAL_PROTECTION_BED, PIDTEMPBED) - #define GTV(B,H) (isbed ? (B) : (H)) - #elif BOTH(THERMAL_PROTECTION_HOTENDS, PIDTEMP) - #define GTV(B,H) (H) + #if BOTH(THERMAL_PROTECTION_CHAMBER, PIDTEMPCHAMBER) + #define C_GTV(T,A,B) ((T) ? (A) : (B)) + #else + #define C_GTV(T,A,B) (B) + #endif + #if BOTH(THERMAL_PROTECTION_BED, PIDTEMPBED) + #define B_GTV(T,A,B) ((T) ? (A) : (B)) #else - #define GTV(B,H) (B) + #define B_GTV(T,A,B) (B) #endif - const uint16_t watch_temp_period = GTV(WATCH_BED_TEMP_PERIOD, WATCH_TEMP_PERIOD); - const uint8_t watch_temp_increase = GTV(WATCH_BED_TEMP_INCREASE, WATCH_TEMP_INCREASE); - const float watch_temp_target = target - float(watch_temp_increase + GTV(TEMP_BED_HYSTERESIS, TEMP_HYSTERESIS) + 1); + #define GTV(C,B,H) C_GTV(ischamber, C, B_GTV(isbed, B, H)) + const uint16_t watch_temp_period = GTV(WATCH_CHAMBER_TEMP_PERIOD, WATCH_BED_TEMP_PERIOD, WATCH_TEMP_PERIOD); + const uint8_t watch_temp_increase = GTV(WATCH_CHAMBER_TEMP_INCREASE, WATCH_BED_TEMP_INCREASE, WATCH_TEMP_INCREASE); + const celsius_float_t watch_temp_target = celsius_float_t(target - (watch_temp_increase + GTV(TEMP_CHAMBER_HYSTERESIS, TEMP_BED_HYSTERESIS, TEMP_HYSTERESIS) + 1)); millis_t temp_change_ms = next_temp_ms + SEC_TO_MS(watch_temp_period); - float next_watch_temp = 0.0; + celsius_float_t next_watch_temp = 0.0; bool heated = false; #endif TERN_(HAS_AUTO_FAN, next_auto_fan_check_ms = next_temp_ms + 2500UL); - if (target > GHV(BED_MAX_TARGET, temp_range[heater_id].maxtemp - HOTEND_OVERSHOOT)) { + TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_STARTED)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(isbed ? PID_BED_START : PID_EXTR_START)); + + if (target > GHV(CHAMBER_MAX_TARGET, BED_MAX_TARGET, temp_range[heater_id].maxtemp - (HOTEND_OVERSHOOT))) { SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_TEMP_TOO_HIGH)); return; } @@ -475,10 +623,11 @@ volatile bool Temperature::raw_temps_ready = false; disable_all_heaters(); TERN_(AUTO_POWER_CONTROL, powerManager.power_on()); - SHV(bias = d = (MAX_BED_POWER) >> 1, bias = d = (PID_MAX) >> 1); + long bias = GHV(MAX_CHAMBER_POWER, MAX_BED_POWER, PID_MAX) >> 1, d = bias; + SHV(bias); #if ENABLED(PRINTER_EVENT_LEDS) - const float start_temp = GHV(temp_bed.celsius, temp_hotend[heater_id].celsius); + const celsius_float_t start_temp = GHV(degChamber(), degBed(), degHotend(heater_id)); LEDColor color = ONHEATINGSTART(); #endif @@ -486,15 +635,15 @@ volatile bool Temperature::raw_temps_ready = false; // PID Tuning loop wait_for_heatup = true; // Can be interrupted with M108 + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT), "Wait for heat up...")); while (wait_for_heatup) { const millis_t ms = millis(); - if (raw_temps_ready) { // temp sample ready - updateTemperaturesFromRawValues(); + if (updateTemperaturesIfReady()) { // temp sample ready // Get the current temperature and constrain it - current_temp = GHV(temp_bed.celsius, temp_hotend[heater_id].celsius); + current_temp = GHV(degChamber(), degBed(), degHotend(heater_id)); NOLESS(maxT, current_temp); NOMORE(minT, current_temp); @@ -509,67 +658,47 @@ volatile bool Temperature::raw_temps_ready = false; } #endif - if (heating && current_temp > target) { - if (ELAPSED(ms, t2 + 5000UL)) { - heating = false; - SHV((bias - d) >> 1, (bias - d) >> 1); - t1 = ms; - t_high = t1 - t2; - maxT = target; - } + if (heating && current_temp > target && ELAPSED(ms, t2 + 5000UL)) { + heating = false; + SHV((bias - d) >> 1); + t1 = ms; + t_high = t1 - t2; + maxT = target; } - if (!heating && current_temp < target) { - if (ELAPSED(ms, t1 + 5000UL)) { - heating = true; - t2 = ms; - t_low = t2 - t1; - if (cycles > 0) { - const long max_pow = GHV(MAX_BED_POWER, PID_MAX); - bias += (d * (t_high - t_low)) / (t_low + t_high); - LIMIT(bias, 20, max_pow - 20); - d = (bias > max_pow >> 1) ? max_pow - 1 - bias : bias; - - SERIAL_ECHOPAIR(STR_BIAS, bias, STR_D_COLON, d, STR_T_MIN, minT, STR_T_MAX, maxT); - if (cycles > 2) { - const float Ku = (4.0f * d) / (float(M_PI) * (maxT - minT) * 0.5f), - Tu = float(t_low + t_high) * 0.001f, - pf = isbed ? 0.2f : 0.6f, - df = isbed ? 1.0f / 3.0f : 1.0f / 8.0f; - - SERIAL_ECHOPAIR(STR_KU, Ku, STR_TU, Tu); - if (isbed) { // Do not remove this otherwise PID autotune won't work right for the bed! - tune_pid.Kp = Ku * 0.2f; - tune_pid.Ki = 2 * tune_pid.Kp / Tu; - tune_pid.Kd = tune_pid.Kp * Tu / 3; - SERIAL_ECHOLNPGM("\n" " No overshoot"); // Works far better for the bed. Classic and some have bad ringing. - SERIAL_ECHOLNPAIR(STR_KP, tune_pid.Kp, STR_KI, tune_pid.Ki, STR_KD, tune_pid.Kd); - } - else { - tune_pid.Kp = Ku * pf; - tune_pid.Kd = tune_pid.Kp * Tu * df; - tune_pid.Ki = 2 * tune_pid.Kp / Tu; - SERIAL_ECHOLNPGM("\n" STR_CLASSIC_PID); - SERIAL_ECHOLNPAIR(STR_KP, tune_pid.Kp, STR_KI, tune_pid.Ki, STR_KD, tune_pid.Kd); - } - - /** - tune_pid.Kp = 0.33 * Ku; - tune_pid.Ki = tune_pid.Kp / Tu; - tune_pid.Kd = tune_pid.Kp * Tu / 3; - SERIAL_ECHOLNPGM(" Some overshoot"); - SERIAL_ECHOLNPAIR(" Kp: ", tune_pid.Kp, " Ki: ", tune_pid.Ki, " Kd: ", tune_pid.Kd, " No overshoot"); - tune_pid.Kp = 0.2 * Ku; - tune_pid.Ki = 2 * tune_pid.Kp / Tu; - tune_pid.Kd = tune_pid.Kp * Tu / 3; - SERIAL_ECHOPAIR(" Kp: ", tune_pid.Kp, " Ki: ", tune_pid.Ki, " Kd: ", tune_pid.Kd); - */ - } + if (!heating && current_temp < target && ELAPSED(ms, t1 + 5000UL)) { + heating = true; + t2 = ms; + t_low = t2 - t1; + if (cycles > 0) { + const long max_pow = GHV(MAX_CHAMBER_POWER, MAX_BED_POWER, PID_MAX); + bias += (d * (t_high - t_low)) / (t_low + t_high); + LIMIT(bias, 20, max_pow - 20); + d = (bias > max_pow >> 1) ? max_pow - 1 - bias : bias; + + SERIAL_ECHOPGM(STR_BIAS, bias, STR_D_COLON, d, STR_T_MIN, minT, STR_T_MAX, maxT); + if (cycles > 2) { + const float Ku = (4.0f * d) / (float(M_PI) * (maxT - minT) * 0.5f), + Tu = float(t_low + t_high) * 0.001f, + pf = ischamber ? 0.2f : (isbed ? 0.2f : 0.6f), + df = ischamber ? 1.0f / 3.0f : (isbed ? 1.0f / 3.0f : 1.0f / 8.0f); + + tune_pid.Kp = Ku * pf; + tune_pid.Ki = tune_pid.Kp * 2.0f / Tu; + tune_pid.Kd = tune_pid.Kp * Tu * df; + + SERIAL_ECHOLNPGM(STR_KU, Ku, STR_TU, Tu); + if (ischamber || isbed) + SERIAL_ECHOLNPGM(" No overshoot"); + else + SERIAL_ECHOLNPGM(STR_CLASSIC_PID); + SERIAL_ECHOLNPGM(STR_KP, tune_pid.Kp, STR_KI, tune_pid.Ki, STR_KD, tune_pid.Kd); } - SHV((bias + d) >> 1, (bias + d) >> 1); - cycles++; - minT = target; } + SHV((bias + d) >> 1); + TERN_(HAS_STATUS_MESSAGE, ui.status_printf_P(0, PSTR(S_FMT " %i/%i"), GET_TEXT(MSG_PID_CYCLE), cycles, ncycles)); + cycles++; + minT = target; } } @@ -580,20 +709,21 @@ volatile bool Temperature::raw_temps_ready = false; if (current_temp > target + MAX_OVERSHOOT_PID_AUTOTUNE) { SERIAL_ECHOLNPGM(STR_PID_TEMP_TOO_HIGH); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TEMP_TOO_HIGH)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_TEMP_TOO_HIGH)); break; } // Report heater states every 2 seconds if (ELAPSED(ms, next_temp_ms)) { #if HAS_TEMP_SENSOR - print_heater_states(isbed ? active_extruder : heater_id); + print_heater_states(ischamber ? active_extruder : (isbed ? active_extruder : heater_id)); SERIAL_EOL(); #endif next_temp_ms = ms + 2000UL; // Make sure heating is actually working #if WATCH_PID - if (BOTH(WATCH_BED, WATCH_HOTENDS) || isbed == DISABLED(WATCH_HOTENDS)) { + if (BOTH(WATCH_BED, WATCH_HOTENDS) || isbed == DISABLED(WATCH_HOTENDS) || ischamber == DISABLED(WATCH_HOTENDS)) { if (!heated) { // If not yet reached target... if (current_temp > next_watch_temp) { // Over the watch temp? next_watch_temp = current_temp + watch_temp_increase; // - set the next temp to watch for @@ -615,6 +745,7 @@ volatile bool Temperature::raw_temps_ready = false; #endif if ((ms - _MIN(t1, t2)) > (MAX_CYCLE_TIME_PID_AUTOTUNE * 60L * 1000L)) { TERN_(DWIN_CREALITY_LCD, DWIN_Popup_Temperature(0)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_TUNING_TIMEOUT)); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_TUNING_TIMEOUT)); SERIAL_ECHOLNPGM(STR_PID_TIMEOUT); break; @@ -623,47 +754,52 @@ volatile bool Temperature::raw_temps_ready = false; if (cycles > ncycles && cycles > 2) { SERIAL_ECHOLNPGM(STR_PID_AUTOTUNE_FINISHED); - #if HAS_PID_FOR_BOTH - const char * const estring = GHV(PSTR("bed"), NUL_STR); - say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp); - say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki); - say_default_(); serialprintPGM(estring); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd); - #elif ENABLED(PIDTEMP) - say_default_(); SERIAL_ECHOLNPAIR("Kp ", tune_pid.Kp); - say_default_(); SERIAL_ECHOLNPAIR("Ki ", tune_pid.Ki); - say_default_(); SERIAL_ECHOLNPAIR("Kd ", tune_pid.Kd); + #if EITHER(PIDTEMPBED, PIDTEMPCHAMBER) + PGM_P const estring = GHV(PSTR("chamber"), PSTR("bed"), NUL_STR); + say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPGM("Kp ", tune_pid.Kp); + say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPGM("Ki ", tune_pid.Ki); + say_default_(); SERIAL_ECHOPGM_P(estring); SERIAL_ECHOLNPGM("Kd ", tune_pid.Kd); #else - say_default_(); SERIAL_ECHOLNPAIR("bedKp ", tune_pid.Kp); - say_default_(); SERIAL_ECHOLNPAIR("bedKi ", tune_pid.Ki); - say_default_(); SERIAL_ECHOLNPAIR("bedKd ", tune_pid.Kd); + say_default_(); SERIAL_ECHOLNPGM("Kp ", tune_pid.Kp); + say_default_(); SERIAL_ECHOLNPGM("Ki ", tune_pid.Ki); + say_default_(); SERIAL_ECHOLNPGM("Kd ", tune_pid.Kd); #endif - #define _SET_BED_PID() do { \ - temp_bed.pid.Kp = tune_pid.Kp; \ - temp_bed.pid.Ki = scalePID_i(tune_pid.Ki); \ - temp_bed.pid.Kd = scalePID_d(tune_pid.Kd); \ - }while(0) + auto _set_hotend_pid = [](const uint8_t e, const PID_t &in_pid) { + #if ENABLED(PIDTEMP) + PID_PARAM(Kp, e) = in_pid.Kp; + PID_PARAM(Ki, e) = scalePID_i(in_pid.Ki); + PID_PARAM(Kd, e) = scalePID_d(in_pid.Kd); + updatePID(); + #else + UNUSED(e); UNUSED(in_pid); + #endif + }; + + #if ENABLED(PIDTEMPBED) + auto _set_bed_pid = [](const PID_t &in_pid) { + temp_bed.pid.Kp = in_pid.Kp; + temp_bed.pid.Ki = scalePID_i(in_pid.Ki); + temp_bed.pid.Kd = scalePID_d(in_pid.Kd); + }; + #endif - #define _SET_EXTRUDER_PID() do { \ - PID_PARAM(Kp, heater_id) = tune_pid.Kp; \ - PID_PARAM(Ki, heater_id) = scalePID_i(tune_pid.Ki); \ - PID_PARAM(Kd, heater_id) = scalePID_d(tune_pid.Kd); \ - updatePID(); }while(0) + #if ENABLED(PIDTEMPCHAMBER) + auto _set_chamber_pid = [](const PID_t &in_pid) { + temp_chamber.pid.Kp = in_pid.Kp; + temp_chamber.pid.Ki = scalePID_i(in_pid.Ki); + temp_chamber.pid.Kd = scalePID_d(in_pid.Kd); + }; + #endif // Use the result? (As with "M303 U1") - if (set_result) { - #if HAS_PID_FOR_BOTH - if (isbed) _SET_BED_PID(); else _SET_EXTRUDER_PID(); - #elif ENABLED(PIDTEMP) - _SET_EXTRUDER_PID(); - #else - _SET_BED_PID(); - #endif - } + if (set_result) + GHV(_set_chamber_pid(tune_pid), _set_bed_pid(tune_pid), _set_hotend_pid(heater_id, tune_pid)); TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color)); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_DONE)); goto EXIT_M303; } @@ -672,7 +808,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(HAL_IDLETASK, HAL_idletask()); // Run UI update - TERN(DWIN_CREALITY_LCD, DWIN_Update(), ui.update()); + TERN(HAS_DWIN_E3V2_BASIC, DWIN_Update(), ui.update()); } wait_for_heatup = false; @@ -681,6 +817,7 @@ volatile bool Temperature::raw_temps_ready = false; TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onPidTuningDone(color)); TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_DONE)); + TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_PidTuning(PID_DONE)); EXIT_M303: TERN_(NO_FAN_SLOWING_IN_PID_TUNING, adaptive_fan_slowing = true); @@ -689,10 +826,6 @@ volatile bool Temperature::raw_temps_ready = false; #endif // HAS_PID_HEATING -/** - * Class and Instance Methods - */ - int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { switch (heater_id) { #if HAS_HEATED_BED @@ -701,6 +834,9 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { #if HAS_HEATED_CHAMBER case H_CHAMBER: return temp_chamber.soft_pwm_amount; #endif + #if HAS_COOLER + case H_COOLER: return temp_cooler.soft_pwm_amount; + #endif default: return TERN0(HAS_HOTEND, temp_hotend[heater_id].soft_pwm_amount); } @@ -709,6 +845,16 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { #define _EFANOVERLAP(A,B) _FANOVERLAP(E##A,B) #if HAS_AUTO_FAN + #if EXTRUDER_AUTO_FAN_SPEED != 255 + #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) + #else + #define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P) + #endif + #if CHAMBER_AUTO_FAN_SPEED != 255 + #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) + #else + #define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P) + #endif #define CHAMBER_FAN_INDEX HOTENDS @@ -736,6 +882,11 @@ int16_t Temperature::getHeaterPower(const heater_id_t heater_id) { SBI(fanState, pgm_read_byte(&fanBit[CHAMBER_FAN_INDEX])); #endif + #if HAS_AUTO_COOLER_FAN + if (temp_cooler.celsius >= COOLER_AUTO_FAN_TEMPERATURE) + SBI(fanState, pgm_read_byte(&fanBit[COOLER_FAN_INDEX])); + #endif + #define _UPDATE_AUTO_FAN(P,D,A) do{ \ if (PWM_PIN(P##_AUTO_FAN_PIN) && A < 255) \ analogWrite(pin_t(P##_AUTO_FAN_PIN), D ? A : 0); \ @@ -825,14 +976,28 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms if (IsRunning() && TERN1(BOGUS_TEMPERATURE_GRACE_PERIOD, killed == 2)) { SERIAL_ERROR_START(); - serialprintPGM(serial_msg); + SERIAL_ECHOPGM_P(serial_msg); SERIAL_ECHOPGM(STR_STOPPED_HEATER); - if (heater_id >= 0) - SERIAL_ECHO((int)heater_id); - else if (TERN0(HAS_HEATED_CHAMBER, heater_id == H_CHAMBER)) - SERIAL_ECHOPGM(STR_HEATER_CHAMBER); - else - SERIAL_ECHOPGM(STR_HEATER_BED); + + heater_id_t real_heater_id = heater_id; + + #if HAS_TEMP_REDUNDANT + if (heater_id == H_REDUNDANT) { + SERIAL_ECHOPGM(STR_REDUNDANT); // print redundant and cascade to print target, too. + real_heater_id = (heater_id_t)HEATER_ID(TEMP_SENSOR_REDUNDANT_TARGET); + } + #endif + + switch (real_heater_id) { + OPTCODE(HAS_TEMP_COOLER, case H_COOLER: SERIAL_ECHOPGM(STR_COOLER); break) + OPTCODE(HAS_TEMP_PROBE, case H_PROBE: SERIAL_ECHOPGM(STR_PROBE); break) + OPTCODE(HAS_TEMP_BOARD, case H_BOARD: SERIAL_ECHOPGM(STR_MOTHERBOARD); break) + OPTCODE(HAS_TEMP_CHAMBER, case H_CHAMBER: SERIAL_ECHOPGM(STR_HEATER_CHAMBER); break) + OPTCODE(HAS_TEMP_BED, case H_BED: SERIAL_ECHOPGM(STR_HEATER_BED); break) + default: + if (real_heater_id >= 0) + SERIAL_ECHOLNPGM("E", real_heater_id); + } SERIAL_EOL(); } @@ -863,23 +1028,24 @@ void Temperature::_temp_error(const heater_id_t heater_id, PGM_P const serial_ms } void Temperature::max_temp_error(const heater_id_t heater_id) { - #if ENABLED(DWIN_CREALITY_LCD) && (HAS_HOTEND || HAS_HEATED_BED) + #if HAS_DWIN_E3V2_BASIC && (HAS_HOTEND || HAS_HEATED_BED) DWIN_Popup_Temperature(1); #endif _temp_error(heater_id, PSTR(STR_T_MAXTEMP), GET_TEXT(MSG_ERR_MAXTEMP)); } void Temperature::min_temp_error(const heater_id_t heater_id) { - #if ENABLED(DWIN_CREALITY_LCD) && (HAS_HOTEND || HAS_HEATED_BED) + #if HAS_DWIN_E3V2_BASIC && (HAS_HOTEND || HAS_HEATED_BED) DWIN_Popup_Temperature(0); #endif _temp_error(heater_id, PSTR(STR_T_MINTEMP), GET_TEXT(MSG_ERR_MINTEMP)); } +#if ANY(PID_DEBUG, PID_BED_DEBUG, PID_CHAMBER_DEBUG) + bool Temperature::pid_debug_flag; // = 0 +#endif + #if HAS_HOTEND - #if ENABLED(PID_DEBUG) - extern bool pid_debug_flag; - #endif float Temperature::get_pid_output_hotend(const uint8_t E_NAME) { const uint8_t ee = HOTEND_INDEX; @@ -936,7 +1102,7 @@ void Temperature::min_temp_error(const heater_id_t heater_id) { lpq[lpq_ptr] = 0; if (++lpq_ptr >= lpq_len) lpq_ptr = 0; - work_pid[ee].Kc = (lpq[lpq_ptr] * planner.steps_to_mm[E_AXIS]) * PID_PARAM(Kc, ee); + work_pid[ee].Kc = (lpq[lpq_ptr] * planner.mm_per_step[E_AXIS]) * PID_PARAM(Kc, ee); pid_output += work_pid[ee].Kc; } #endif // PID_EXTRUSION_SCALING @@ -960,23 +1126,18 @@ void Temperature::min_temp_error(const heater_id_t heater_id) { #if ENABLED(PID_DEBUG) if (ee == active_extruder && pid_debug_flag) { - SERIAL_ECHO_START(); - SERIAL_ECHOPAIR(STR_PID_DEBUG, ee, STR_PID_DEBUG_INPUT, temp_hotend[ee].celsius, STR_PID_DEBUG_OUTPUT, pid_output); - #if DISABLED(PID_OPENLOOP) - { - SERIAL_ECHOPAIR( - STR_PID_DEBUG_PTERM, work_pid[ee].Kp, - STR_PID_DEBUG_ITERM, work_pid[ee].Ki, - STR_PID_DEBUG_DTERM, work_pid[ee].Kd + SERIAL_ECHO_MSG(STR_PID_DEBUG, ee, STR_PID_DEBUG_INPUT, temp_hotend[ee].celsius, STR_PID_DEBUG_OUTPUT, pid_output + #if DISABLED(PID_OPENLOOP) + , STR_PID_DEBUG_PTERM, work_pid[ee].Kp + , STR_PID_DEBUG_ITERM, work_pid[ee].Ki + , STR_PID_DEBUG_DTERM, work_pid[ee].Kd #if ENABLED(PID_EXTRUSION_SCALING) , STR_PID_DEBUG_CTERM, work_pid[ee].Kc #endif - ); - } - #endif - SERIAL_EOL(); + #endif + ); } - #endif // PID_DEBUG + #endif #else // No PID enabled @@ -1036,14 +1197,76 @@ void Temperature::min_temp_error(const heater_id_t heater_id) { #endif // PID_OPENLOOP #if ENABLED(PID_BED_DEBUG) + if (pid_debug_flag) { + SERIAL_ECHO_MSG( + " PID_BED_DEBUG : Input ", temp_bed.celsius, " Output ", pid_output + #if DISABLED(PID_OPENLOOP) + , STR_PID_DEBUG_PTERM, work_pid.Kp + , STR_PID_DEBUG_ITERM, work_pid.Ki + , STR_PID_DEBUG_DTERM, work_pid.Kd + #endif + ); + } + #endif + + return pid_output; + } + +#endif // PIDTEMPBED + +#if ENABLED(PIDTEMPCHAMBER) + + float Temperature::get_pid_output_chamber() { + + #if DISABLED(PID_OPENLOOP) + + static PID_t work_pid{0}; + static float temp_iState = 0, temp_dState = 0; + static bool pid_reset = true; + float pid_output = 0; + const float max_power_over_i_gain = float(MAX_CHAMBER_POWER) / temp_chamber.pid.Ki - float(MIN_CHAMBER_POWER), + pid_error = temp_chamber.target - temp_chamber.celsius; + + if (!temp_chamber.target || pid_error < -(PID_FUNCTIONAL_RANGE)) { + pid_output = 0; + pid_reset = true; + } + else if (pid_error > PID_FUNCTIONAL_RANGE) { + pid_output = MAX_CHAMBER_POWER; + pid_reset = true; + } + else { + if (pid_reset) { + temp_iState = 0.0; + work_pid.Kd = 0.0; + pid_reset = false; + } + + temp_iState = constrain(temp_iState + pid_error, 0, max_power_over_i_gain); + + work_pid.Kp = temp_chamber.pid.Kp * pid_error; + work_pid.Ki = temp_chamber.pid.Ki * temp_iState; + work_pid.Kd = work_pid.Kd + PID_K2 * (temp_chamber.pid.Kd * (temp_dState - temp_chamber.celsius) - work_pid.Kd); + + temp_dState = temp_chamber.celsius; + + pid_output = constrain(work_pid.Kp + work_pid.Ki + work_pid.Kd + float(MIN_CHAMBER_POWER), 0, MAX_CHAMBER_POWER); + } + + #else // PID_OPENLOOP + + const float pid_output = constrain(temp_chamber.target, 0, MAX_CHAMBER_POWER); + + #endif // PID_OPENLOOP + + #if ENABLED(PID_CHAMBER_DEBUG) { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR( - " PID_BED_DEBUG : Input ", temp_bed.celsius, " Output ", pid_output, + SERIAL_ECHO_MSG( + " PID_CHAMBER_DEBUG : Input ", temp_chamber.celsius, " Output ", pid_output #if DISABLED(PID_OPENLOOP) - STR_PID_DEBUG_PTERM, work_pid.Kp, - STR_PID_DEBUG_ITERM, work_pid.Ki, - STR_PID_DEBUG_DTERM, work_pid.Kd, + , STR_PID_DEBUG_PTERM, work_pid.Kp + , STR_PID_DEBUG_ITERM, work_pid.Ki + , STR_PID_DEBUG_DTERM, work_pid.Kd #endif ); } @@ -1052,7 +1275,7 @@ void Temperature::min_temp_error(const heater_id_t heater_id) { return pid_output; } -#endif // PIDTEMPBED +#endif // PIDTEMPCHAMBER /** * Manage heating activities for extruder hot-ends and a heated bed @@ -1064,11 +1287,11 @@ void Temperature::min_temp_error(const heater_id_t heater_id) { * - Update the heated bed PID output value */ void Temperature::manage_heater() { + if (marlin_state == MF_INITIALIZING) return watchdog_refresh(); // If Marlin isn't started, at least reset the watchdog! - #if EARLY_WATCHDOG - // If thermal manager is still not running, make sure to at least reset the watchdog! - if (!inited) return watchdog_refresh(); - #endif + static bool no_reentry = false; // Prevent recursion + if (no_reentry) return; + REMEMBER(mh, no_reentry, true); #if ENABLED(EMERGENCY_PARSER) if (emergency_parser.killed_by_M112) kill(M112_KILL_STR, nullptr, true); @@ -1079,18 +1302,20 @@ void Temperature::manage_heater() { } #endif - if (!raw_temps_ready) return; - - updateTemperaturesFromRawValues(); // also resets the watchdog + if (!updateTemperaturesIfReady()) return; // Will also reset the watchdog if temperatures are ready #if DISABLED(IGNORE_THERMOCOUPLE_ERRORS) - #if HEATER_0_USES_MAX6675 - if (temp_hotend[0].celsius > _MIN(HEATER_0_MAXTEMP, HEATER_0_MAX6675_TMAX - 1.0)) max_temp_error(H_E0); - if (temp_hotend[0].celsius < _MAX(HEATER_0_MINTEMP, HEATER_0_MAX6675_TMIN + .01)) min_temp_error(H_E0); + #if TEMP_SENSOR_0_IS_MAX_TC + if (degHotend(0) > _MIN(HEATER_0_MAXTEMP, TEMP_SENSOR_0_MAX_TC_TMAX - 1.0)) max_temp_error(H_E0); + if (degHotend(0) < _MAX(HEATER_0_MINTEMP, TEMP_SENSOR_0_MAX_TC_TMIN + .01)) min_temp_error(H_E0); #endif - #if HEATER_1_USES_MAX6675 - if (temp_hotend[1].celsius > _MIN(HEATER_1_MAXTEMP, HEATER_1_MAX6675_TMAX - 1.0)) max_temp_error(H_E1); - if (temp_hotend[1].celsius < _MAX(HEATER_1_MINTEMP, HEATER_1_MAX6675_TMIN + .01)) min_temp_error(H_E1); + #if TEMP_SENSOR_1_IS_MAX_TC + if (degHotend(1) > _MIN(HEATER_1_MAXTEMP, TEMP_SENSOR_1_MAX_TC_TMAX - 1.0)) max_temp_error(H_E1); + if (degHotend(1) < _MAX(HEATER_1_MINTEMP, TEMP_SENSOR_1_MAX_TC_TMIN + .01)) min_temp_error(H_E1); + #endif + #if TEMP_SENSOR_REDUNDANT_IS_MAX_TC + if (degRedundant() > TEMP_SENSOR_REDUNDANT_MAX_TC_TMAX - 1.0) max_temp_error(H_REDUNDANT); + if (degRedundant() < TEMP_SENSOR_REDUNDANT_MAX_TC_TMIN + .01) min_temp_error(H_REDUNDANT); #endif #endif @@ -1114,26 +1339,26 @@ void Temperature::manage_heater() { #if WATCH_HOTENDS // Make sure temperature is increasing - if (watch_hotend[e].next_ms && ELAPSED(ms, watch_hotend[e].next_ms)) { // Time to check this extruder? - if (degHotend(e) < watch_hotend[e].target) { // Failed to increase enough? - TERN_(DWIN_CREALITY_LCD, DWIN_Popup_Temperature(0)); + if (watch_hotend[e].elapsed(ms)) { // Enabled and time to check? + if (watch_hotend[e].check(degHotend(e))) // Increased enough? + start_watching_hotend(e); // If temp reached, turn off elapsed check + else { + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_Popup_Temperature(0)); _temp_error((heater_id_t)e, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD)); } - else // Start again if the target is still far off - start_watching_hotend(e); } #endif - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - // Make sure measured temperatures are close together - if (ABS(temp_hotend[0].celsius - redundant_temperature) > MAX_REDUNDANT_TEMP_SENSOR_DIFF) - _temp_error(H_E0, PSTR(STR_REDUNDANCY), GET_TEXT(MSG_ERR_REDUNDANT_TEMP)); - #endif - } // HOTEND_LOOP #endif // HAS_HOTEND + #if HAS_TEMP_REDUNDANT + // Make sure measured temperatures are close together + if (ABS(degRedundantTarget() - degRedundant()) > TEMP_SENSOR_REDUNDANT_MAX_DIFF) + _temp_error((heater_id_t)HEATER_ID(TEMP_SENSOR_REDUNDANT_TARGET), PSTR(STR_REDUNDANCY), GET_TEXT(MSG_ERR_REDUNDANT_TEMP)); + #endif + #if HAS_AUTO_FAN if (ELAPSED(ms, next_auto_fan_check_ms)) { // only need to check fan state very infrequently checkExtruderAutoFans(); @@ -1157,13 +1382,13 @@ void Temperature::manage_heater() { #if WATCH_BED // Make sure temperature is increasing - if (watch_bed.elapsed(ms)) { // Time to check the bed? - if (degBed() < watch_bed.target) { // Failed to increase enough? - TERN_(DWIN_CREALITY_LCD, DWIN_Popup_Temperature(0)); + if (watch_bed.elapsed(ms)) { // Time to check the bed? + if (watch_bed.check(degBed())) // Increased enough? + start_watching_bed(); // If temp reached, turn off elapsed check + else { + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_Popup_Temperature(0)); _temp_error(H_BED, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD)); } - else // Start again if the target is still far off - start_watching_bed(); } #endif // WATCH_BED @@ -1179,10 +1404,10 @@ void Temperature::manage_heater() { #if DISABLED(PIDTEMPBED) if (PENDING(ms, next_bed_check_ms) - && TERN1(PAUSE_CHANGE_REQD, paused == last_pause_state) + && TERN1(PAUSE_CHANGE_REQD, paused_for_probing == last_pause_state) ) break; next_bed_check_ms = ms + BED_CHECK_INTERVAL; - TERN_(PAUSE_CHANGE_REQD, last_pause_state = paused); + TERN_(PAUSE_CHANGE_REQD, last_pause_state = paused_for_probing); #endif TERN_(HEATER_IDLE_HANDLER, heater_idle[IDLE_INDEX_BED].update(ms)); @@ -1238,19 +1463,26 @@ void Temperature::manage_heater() { #if WATCH_CHAMBER // Make sure temperature is increasing - if (watch_chamber.elapsed(ms)) { // Time to check the chamber? - if (degChamber() < watch_chamber.target) // Failed to increase enough? - _temp_error(H_CHAMBER, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD)); + if (watch_chamber.elapsed(ms)) { // Time to check the chamber? + if (watch_chamber.check(degChamber())) // Increased enough? Error below. + start_watching_chamber(); // If temp reached, turn off elapsed check. else - start_watching_chamber(); // Start again if the target is still far off + _temp_error(H_CHAMBER, str_t_heating_failed, GET_TEXT(MSG_HEATING_FAILED_LCD)); } #endif + #if EITHER(CHAMBER_FAN, CHAMBER_VENT) || DISABLED(PIDTEMPCHAMBER) + static bool flag_chamber_excess_heat; // = false; + #endif + #if EITHER(CHAMBER_FAN, CHAMBER_VENT) + static bool flag_chamber_off; // = false + if (temp_chamber.target > CHAMBER_MINTEMP) { flag_chamber_off = false; #if ENABLED(CHAMBER_FAN) + int16_t fan_chamber_pwm; #if CHAMBER_FAN_MODE == 0 fan_chamber_pwm = CHAMBER_FAN_BASE; #elif CHAMBER_FAN_MODE == 1 @@ -1259,9 +1491,11 @@ void Temperature::manage_heater() { fan_chamber_pwm = (CHAMBER_FAN_BASE) + (CHAMBER_FAN_FACTOR) * ABS(temp_chamber.celsius - temp_chamber.target); if (temp_chamber.soft_pwm_amount) fan_chamber_pwm += (CHAMBER_FAN_FACTOR) * 2; + #elif CHAMBER_FAN_MODE == 3 + fan_chamber_pwm = CHAMBER_FAN_BASE + _MAX((CHAMBER_FAN_FACTOR) * (temp_chamber.celsius - temp_chamber.target), 0); #endif NOMORE(fan_chamber_pwm, 225); - set_fan_speed(2, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan + set_fan_speed(CHAMBER_FAN_INDEX, fan_chamber_pwm); // TODO: instead of fan 2, set to chamber fan #endif #if ENABLED(CHAMBER_VENT) @@ -1275,7 +1509,8 @@ void Temperature::manage_heater() { // Open vent after MIN_COOLING_SLOPE_TIME_CHAMBER_VENT seconds if the // temperature didn't drop at least MIN_COOLING_SLOPE_DEG_CHAMBER_VENT if (next_cool_check_ms_2 == 0 || ELAPSED(ms, next_cool_check_ms_2)) { - if (old_temp - temp_chamber.celsius < float(MIN_COOLING_SLOPE_DEG_CHAMBER_VENT)) flag_chamber_excess_heat = true; //the bed is heating the chamber too much + if (temp_chamber.celsius - old_temp > MIN_COOLING_SLOPE_DEG_CHAMBER_VENT) + flag_chamber_excess_heat = true; // the bed is heating the chamber too much next_cool_check_ms_2 = ms + SEC_TO_MS(MIN_COOLING_SLOPE_TIME_CHAMBER_VENT); old_temp = temp_chamber.celsius; } @@ -1284,15 +1519,14 @@ void Temperature::manage_heater() { next_cool_check_ms_2 = 0; old_temp = 9999; } - if (flag_chamber_excess_heat && (temp_chamber.celsius - temp_chamber.target <= -LOW_EXCESS_HEAT_LIMIT) ) { + if (flag_chamber_excess_heat && (temp_chamber.target - temp_chamber.celsius >= LOW_EXCESS_HEAT_LIMIT)) flag_chamber_excess_heat = false; - } #endif } else if (!flag_chamber_off) { #if ENABLED(CHAMBER_FAN) flag_chamber_off = true; - set_fan_speed(2, 0); + set_fan_speed(CHAMBER_FAN_INDEX, 0); #endif #if ENABLED(CHAMBER_VENT) flag_chamber_excess_heat = false; @@ -1301,44 +1535,116 @@ void Temperature::manage_heater() { } #endif - if (ELAPSED(ms, next_chamber_check_ms)) { - next_chamber_check_ms = ms + CHAMBER_CHECK_INTERVAL; - - if (WITHIN(temp_chamber.celsius, CHAMBER_MINTEMP, CHAMBER_MAXTEMP)) { - if (flag_chamber_excess_heat) { + #if ENABLED(PIDTEMPCHAMBER) + // PIDTEMPCHAMBER doesn't support a CHAMBER_VENT yet. + temp_chamber.soft_pwm_amount = WITHIN(temp_chamber.celsius, CHAMBER_MINTEMP, CHAMBER_MAXTEMP) ? (int)get_pid_output_chamber() >> 1 : 0; + #else + if (ELAPSED(ms, next_chamber_check_ms)) { + next_chamber_check_ms = ms + CHAMBER_CHECK_INTERVAL; + + if (WITHIN(temp_chamber.celsius, CHAMBER_MINTEMP, CHAMBER_MAXTEMP)) { + if (flag_chamber_excess_heat) { + temp_chamber.soft_pwm_amount = 0; + #if ENABLED(CHAMBER_VENT) + if (!flag_chamber_off) MOVE_SERVO(CHAMBER_VENT_SERVO_NR, temp_chamber.celsius <= temp_chamber.target ? 0 : 90); + #endif + } + else { + #if ENABLED(CHAMBER_LIMIT_SWITCHING) + if (temp_chamber.celsius >= temp_chamber.target + TEMP_CHAMBER_HYSTERESIS) + temp_chamber.soft_pwm_amount = 0; + else if (temp_chamber.celsius <= temp_chamber.target - (TEMP_CHAMBER_HYSTERESIS)) + temp_chamber.soft_pwm_amount = (MAX_CHAMBER_POWER) >> 1; + #else + temp_chamber.soft_pwm_amount = temp_chamber.celsius < temp_chamber.target ? (MAX_CHAMBER_POWER) >> 1 : 0; + #endif + #if ENABLED(CHAMBER_VENT) + if (!flag_chamber_off) MOVE_SERVO(CHAMBER_VENT_SERVO_NR, 0); + #endif + } + } + else { temp_chamber.soft_pwm_amount = 0; - #if ENABLED(CHAMBER_VENT) - if (!flag_chamber_off) MOVE_SERVO(CHAMBER_VENT_SERVO_NR, temp_chamber.celsius <= temp_chamber.target ? 0 : 90); + WRITE_HEATER_CHAMBER(LOW); + } + } + #if ENABLED(THERMAL_PROTECTION_CHAMBER) + tr_state_machine[RUNAWAY_IND_CHAMBER].run(temp_chamber.celsius, temp_chamber.target, H_CHAMBER, THERMAL_PROTECTION_CHAMBER_PERIOD, THERMAL_PROTECTION_CHAMBER_HYSTERESIS); + #endif + #endif + + #endif // HAS_HEATED_CHAMBER + + #if HAS_COOLER + + #ifndef COOLER_CHECK_INTERVAL + #define COOLER_CHECK_INTERVAL 2000UL + #endif + + #if ENABLED(THERMAL_PROTECTION_COOLER) + if (degCooler() > COOLER_MAXTEMP) max_temp_error(H_COOLER); + #endif + + #if WATCH_COOLER + // Make sure temperature is decreasing + if (watch_cooler.elapsed(ms)) { // Time to check the cooler? + if (degCooler() > watch_cooler.target) // Failed to decrease enough? + _temp_error(H_COOLER, GET_TEXT(MSG_COOLING_FAILED), GET_TEXT(MSG_COOLING_FAILED)); + else + start_watching_cooler(); // Start again if the target is still far off + } + #endif + + static bool flag_cooler_state; // = false + + if (cooler.enabled) { + flag_cooler_state = true; // used to allow M106 fan control when cooler is disabled + if (temp_cooler.target == 0) temp_cooler.target = COOLER_MIN_TARGET; + if (ELAPSED(ms, next_cooler_check_ms)) { + next_cooler_check_ms = ms + COOLER_CHECK_INTERVAL; + if (temp_cooler.celsius > temp_cooler.target) { + temp_cooler.soft_pwm_amount = temp_cooler.celsius > temp_cooler.target ? MAX_COOLER_POWER : 0; + flag_cooler_state = temp_cooler.soft_pwm_amount > 0 ? true : false; // used to allow M106 fan control when cooler is disabled + #if ENABLED(COOLER_FAN) + int16_t fan_cooler_pwm = (COOLER_FAN_BASE) + (COOLER_FAN_FACTOR) * ABS(temp_cooler.celsius - temp_cooler.target); + NOMORE(fan_cooler_pwm, 255); + set_fan_speed(COOLER_FAN_INDEX, fan_cooler_pwm); // Set cooler fan pwm + cooler_fan_flush_ms = ms + 5000; #endif } else { - #if ENABLED(CHAMBER_LIMIT_SWITCHING) - if (temp_chamber.celsius >= temp_chamber.target + TEMP_CHAMBER_HYSTERESIS) - temp_chamber.soft_pwm_amount = 0; - else if (temp_chamber.celsius <= temp_chamber.target - (TEMP_CHAMBER_HYSTERESIS)) - temp_chamber.soft_pwm_amount = (MAX_CHAMBER_POWER) >> 1; - #else - temp_chamber.soft_pwm_amount = temp_chamber.celsius < temp_chamber.target ? (MAX_CHAMBER_POWER) >> 1 : 0; - #endif - #if ENABLED(CHAMBER_VENT) - if (!flag_chamber_off) MOVE_SERVO(CHAMBER_VENT_SERVO_NR, 0); + temp_cooler.soft_pwm_amount = 0; + #if ENABLED(COOLER_FAN) + set_fan_speed(COOLER_FAN_INDEX, temp_cooler.celsius > temp_cooler.target - 2 ? COOLER_FAN_BASE : 0); #endif + WRITE_HEATER_COOLER(LOW); } } - else { - temp_chamber.soft_pwm_amount = 0; - WRITE_HEATER_CHAMBER(LOW); + } + else { + temp_cooler.soft_pwm_amount = 0; + if (flag_cooler_state) { + flag_cooler_state = false; + thermalManager.set_fan_speed(COOLER_FAN_INDEX, 0); } - - #if ENABLED(THERMAL_PROTECTION_CHAMBER) - tr_state_machine[RUNAWAY_IND_CHAMBER].run(temp_chamber.celsius, temp_chamber.target, H_CHAMBER, THERMAL_PROTECTION_CHAMBER_PERIOD, THERMAL_PROTECTION_CHAMBER_HYSTERESIS); - #endif + WRITE_HEATER_COOLER(LOW); } - // TODO: Implement true PID pwm - //temp_bed.soft_pwm_amount = WITHIN(temp_chamber.celsius, CHAMBER_MINTEMP, CHAMBER_MAXTEMP) ? (int)get_pid_output_chamber() >> 1 : 0; + #if ENABLED(THERMAL_PROTECTION_COOLER) + tr_state_machine[RUNAWAY_IND_COOLER].run(temp_cooler.celsius, temp_cooler.target, H_COOLER, THERMAL_PROTECTION_COOLER_PERIOD, THERMAL_PROTECTION_COOLER_HYSTERESIS); + #endif - #endif // HAS_HEATED_CHAMBER + #endif // HAS_COOLER + + #if ENABLED(LASER_COOLANT_FLOW_METER) + cooler.flowmeter_task(ms); + #if ENABLED(FLOWMETER_SAFETY) + if (cutter.enabled() && cooler.check_flow_too_low()) { + cutter.disable(); + TERN_(HAS_DISPLAY, ui.flow_fault()); + } + #endif + #endif UNUSED(ms); } @@ -1350,22 +1656,22 @@ void Temperature::manage_heater() { * Bisect search for the range of the 'raw' value, then interpolate * proportionally between the under and over values. */ -#define SCAN_THERMISTOR_TABLE(TBL,LEN) do{ \ - uint8_t l = 0, r = LEN, m; \ - for (;;) { \ - m = (l + r) >> 1; \ - if (!m) return int16_t(pgm_read_word(&TBL[0].celsius)); \ - if (m == l || m == r) return int16_t(pgm_read_word(&TBL[LEN-1].celsius)); \ - int16_t v00 = pgm_read_word(&TBL[m-1].value), \ - v10 = pgm_read_word(&TBL[m-0].value); \ - if (raw < v00) r = m; \ - else if (raw > v10) l = m; \ - else { \ - const int16_t v01 = int16_t(pgm_read_word(&TBL[m-1].celsius)), \ - v11 = int16_t(pgm_read_word(&TBL[m-0].celsius)); \ - return v01 + (raw - v00) * float(v11 - v01) / float(v10 - v00); \ - } \ - } \ +#define SCAN_THERMISTOR_TABLE(TBL,LEN) do{ \ + uint8_t l = 0, r = LEN, m; \ + for (;;) { \ + m = (l + r) >> 1; \ + if (!m) return celsius_t(pgm_read_word(&TBL[0].celsius)); \ + if (m == l || m == r) return celsius_t(pgm_read_word(&TBL[LEN-1].celsius)); \ + int16_t v00 = pgm_read_word(&TBL[m-1].value), \ + v10 = pgm_read_word(&TBL[m-0].value); \ + if (raw < v00) r = m; \ + else if (raw > v10) l = m; \ + else { \ + const celsius_t v01 = celsius_t(pgm_read_word(&TBL[m-1].celsius)), \ + v11 = celsius_t(pgm_read_word(&TBL[m-0].celsius)); \ + return v01 + (raw - v00) * float(v11 - v01) / float(v10 - v00); \ + } \ + } \ }while(0) #if HAS_USER_THERMISTORS @@ -1374,47 +1680,55 @@ void Temperature::manage_heater() { void Temperature::reset_user_thermistors() { user_thermistor_t default_user_thermistor[USER_THERMISTORS] = { - #if HEATER_0_USER_THERMISTOR + #if TEMP_SENSOR_0_IS_CUSTOM { true, 0, 0, HOTEND0_PULLUP_RESISTOR_OHMS, HOTEND0_RESISTANCE_25C_OHMS, 0, 0, HOTEND0_BETA, 0 }, #endif - #if HEATER_1_USER_THERMISTOR + #if TEMP_SENSOR_1_IS_CUSTOM { true, 0, 0, HOTEND1_PULLUP_RESISTOR_OHMS, HOTEND1_RESISTANCE_25C_OHMS, 0, 0, HOTEND1_BETA, 0 }, #endif - #if HEATER_2_USER_THERMISTOR + #if TEMP_SENSOR_2_IS_CUSTOM { true, 0, 0, HOTEND2_PULLUP_RESISTOR_OHMS, HOTEND2_RESISTANCE_25C_OHMS, 0, 0, HOTEND2_BETA, 0 }, #endif - #if HEATER_3_USER_THERMISTOR + #if TEMP_SENSOR_3_IS_CUSTOM { true, 0, 0, HOTEND3_PULLUP_RESISTOR_OHMS, HOTEND3_RESISTANCE_25C_OHMS, 0, 0, HOTEND3_BETA, 0 }, #endif - #if HEATER_4_USER_THERMISTOR + #if TEMP_SENSOR_4_IS_CUSTOM { true, 0, 0, HOTEND4_PULLUP_RESISTOR_OHMS, HOTEND4_RESISTANCE_25C_OHMS, 0, 0, HOTEND4_BETA, 0 }, #endif - #if HEATER_5_USER_THERMISTOR + #if TEMP_SENSOR_5_IS_CUSTOM { true, 0, 0, HOTEND5_PULLUP_RESISTOR_OHMS, HOTEND5_RESISTANCE_25C_OHMS, 0, 0, HOTEND5_BETA, 0 }, #endif - #if HEATER_6_USER_THERMISTOR + #if TEMP_SENSOR_6_IS_CUSTOM { true, 0, 0, HOTEND6_PULLUP_RESISTOR_OHMS, HOTEND6_RESISTANCE_25C_OHMS, 0, 0, HOTEND6_BETA, 0 }, #endif - #if HEATER_7_USER_THERMISTOR + #if TEMP_SENSOR_7_IS_CUSTOM { true, 0, 0, HOTEND7_PULLUP_RESISTOR_OHMS, HOTEND7_RESISTANCE_25C_OHMS, 0, 0, HOTEND7_BETA, 0 }, #endif - #if HEATER_BED_USER_THERMISTOR + #if TEMP_SENSOR_BED_IS_CUSTOM { true, 0, 0, BED_PULLUP_RESISTOR_OHMS, BED_RESISTANCE_25C_OHMS, 0, 0, BED_BETA, 0 }, #endif - #if HEATER_CHAMBER_USER_THERMISTOR - { true, 0, 0, CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS, 0, 0, CHAMBER_BETA, 0 } + #if TEMP_SENSOR_CHAMBER_IS_CUSTOM + { true, 0, 0, CHAMBER_PULLUP_RESISTOR_OHMS, CHAMBER_RESISTANCE_25C_OHMS, 0, 0, CHAMBER_BETA, 0 }, + #endif + #if TEMP_SENSOR_COOLER_IS_CUSTOM + { true, 0, 0, COOLER_PULLUP_RESISTOR_OHMS, COOLER_RESISTANCE_25C_OHMS, 0, 0, COOLER_BETA, 0 }, + #endif + #if TEMP_SENSOR_PROBE_IS_CUSTOM + { true, 0, 0, PROBE_PULLUP_RESISTOR_OHMS, PROBE_RESISTANCE_25C_OHMS, 0, 0, PROBE_BETA, 0 }, + #endif + #if TEMP_SENSOR_BOARD_IS_CUSTOM + { true, 0, 0, BOARD_PULLUP_RESISTOR_OHMS, BOARD_RESISTANCE_25C_OHMS, 0, 0, BOARD_BETA, 0 }, + #endif + #if TEMP_SENSOR_REDUNDANT_IS_CUSTOM + { true, 0, 0, REDUNDANT_PULLUP_RESISTOR_OHMS, REDUNDANT_RESISTANCE_25C_OHMS, 0, 0, REDUNDANT_BETA, 0 }, #endif }; COPY(user_thermistor, default_user_thermistor); } - void Temperature::log_user_thermistor(const uint8_t t_index, const bool eprom/*=false*/) { - - if (eprom) - SERIAL_ECHOPGM(" M305 "); - else - SERIAL_ECHO_START(); - SERIAL_CHAR('P', '0' + t_index); + void Temperature::M305_report(const uint8_t t_index, const bool forReplay/*=true*/) { + gcode.report_heading_etc(forReplay, PSTR(STR_USER_THERMISTORS)); + SERIAL_ECHOPGM(" M305 P", AS_DIGIT(t_index)); const user_thermistor_t &t = user_thermistor[t_index]; @@ -1423,28 +1737,27 @@ void Temperature::manage_heater() { SERIAL_ECHOPAIR_F_P(SP_B_STR, t.beta, 1); SERIAL_ECHOPAIR_F_P(SP_C_STR, t.sh_c_coeff, 9); SERIAL_ECHOPGM(" ; "); - serialprintPGM( - TERN_(HEATER_0_USER_THERMISTOR, t_index == CTI_HOTEND_0 ? PSTR("HOTEND 0") :) - TERN_(HEATER_1_USER_THERMISTOR, t_index == CTI_HOTEND_1 ? PSTR("HOTEND 1") :) - TERN_(HEATER_2_USER_THERMISTOR, t_index == CTI_HOTEND_2 ? PSTR("HOTEND 2") :) - TERN_(HEATER_3_USER_THERMISTOR, t_index == CTI_HOTEND_3 ? PSTR("HOTEND 3") :) - TERN_(HEATER_4_USER_THERMISTOR, t_index == CTI_HOTEND_4 ? PSTR("HOTEND 4") :) - TERN_(HEATER_5_USER_THERMISTOR, t_index == CTI_HOTEND_5 ? PSTR("HOTEND 5") :) - TERN_(HEATER_6_USER_THERMISTOR, t_index == CTI_HOTEND_6 ? PSTR("HOTEND 6") :) - TERN_(HEATER_7_USER_THERMISTOR, t_index == CTI_HOTEND_7 ? PSTR("HOTEND 7") :) - TERN_(HEATER_BED_USER_THERMISTOR, t_index == CTI_BED ? PSTR("BED") :) - TERN_(HEATER_CHAMBER_USER_THERMISTOR, t_index == CTI_CHAMBER ? PSTR("CHAMBER") :) + SERIAL_ECHOPGM_P( + TERN_(TEMP_SENSOR_0_IS_CUSTOM, t_index == CTI_HOTEND_0 ? PSTR("HOTEND 0") :) + TERN_(TEMP_SENSOR_1_IS_CUSTOM, t_index == CTI_HOTEND_1 ? PSTR("HOTEND 1") :) + TERN_(TEMP_SENSOR_2_IS_CUSTOM, t_index == CTI_HOTEND_2 ? PSTR("HOTEND 2") :) + TERN_(TEMP_SENSOR_3_IS_CUSTOM, t_index == CTI_HOTEND_3 ? PSTR("HOTEND 3") :) + TERN_(TEMP_SENSOR_4_IS_CUSTOM, t_index == CTI_HOTEND_4 ? PSTR("HOTEND 4") :) + TERN_(TEMP_SENSOR_5_IS_CUSTOM, t_index == CTI_HOTEND_5 ? PSTR("HOTEND 5") :) + TERN_(TEMP_SENSOR_6_IS_CUSTOM, t_index == CTI_HOTEND_6 ? PSTR("HOTEND 6") :) + TERN_(TEMP_SENSOR_7_IS_CUSTOM, t_index == CTI_HOTEND_7 ? PSTR("HOTEND 7") :) + TERN_(TEMP_SENSOR_BED_IS_CUSTOM, t_index == CTI_BED ? PSTR("BED") :) + TERN_(TEMP_SENSOR_CHAMBER_IS_CUSTOM, t_index == CTI_CHAMBER ? PSTR("CHAMBER") :) + TERN_(TEMP_SENSOR_COOLER_IS_CUSTOM, t_index == CTI_COOLER ? PSTR("COOLER") :) + TERN_(TEMP_SENSOR_PROBE_IS_CUSTOM, t_index == CTI_PROBE ? PSTR("PROBE") :) + TERN_(TEMP_SENSOR_BOARD_IS_CUSTOM, t_index == CTI_BOARD ? PSTR("BOARD") :) + TERN_(TEMP_SENSOR_REDUNDANT_IS_CUSTOM, t_index == CTI_REDUNDANT ? PSTR("REDUNDANT") :) nullptr ); SERIAL_EOL(); } - float Temperature::user_thermistor_to_deg_c(const uint8_t t_index, const int raw) { - //#if (MOTHERBOARD == BOARD_RAMPS_14_EFB) - // static uint32_t clocks_total = 0; - // static uint32_t calls = 0; - // uint32_t tcnt5 = TCNT5; - //#endif + celsius_float_t Temperature::user_thermistor_to_deg_c(const uint8_t t_index, const int16_t raw) { if (!WITHIN(t_index, 0, COUNT(user_thermistor) - 1)) return 25; @@ -1472,14 +1785,6 @@ void Temperature::manage_heater() { value += t.sh_c_coeff * cu(log_resistance); value = 1.0f / value; - //#if (MOTHERBOARD == BOARD_RAMPS_14_EFB) - // int32_t clocks = TCNT5 - tcnt5; - // if (clocks >= 0) { - // clocks_total += clocks; - // calls++; - // } - //#endif - // Return degrees C (up to 999, as the LCD only displays 3 digits) return _MIN(value + THERMISTOR_ABS_ZERO_C, 999); } @@ -1488,96 +1793,110 @@ void Temperature::manage_heater() { #if HAS_HOTEND // Derived from RepRap FiveD extruder::getTemperature() // For hot end temperature measurement. - float Temperature::analog_to_celsius_hotend(const int raw, const uint8_t e) { - if (e > HOTENDS - DISABLED(TEMP_SENSOR_1_AS_REDUNDANT)) { - SERIAL_ERROR_START(); - SERIAL_ECHO((int)e); - SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER_NUM); - kill(); - return 0; - } + celsius_float_t Temperature::analog_to_celsius_hotend(const int16_t raw, const uint8_t e) { + if (e >= HOTENDS) { + SERIAL_ERROR_START(); + SERIAL_ECHO(e); + SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER_NUM); + kill(); + return 0; + } switch (e) { case 0: - #if HEATER_0_USER_THERMISTOR + #if TEMP_SENSOR_0_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_0, raw); - #elif HEATER_0_USES_MAX6675 - return TERN(MAX6675_0_IS_MAX31865, max31865_0.temperature(MAX31865_SENSOR_OHMS_0, MAX31865_CALIBRATION_OHMS_0), raw * 0.25); - #elif HEATER_0_USES_AD595 + #elif TEMP_SENSOR_0_IS_MAX_TC + #if TEMP_SENSOR_0_IS_MAX31865 + return TERN(LIB_INTERNAL_MAX31865, + max31865_0.temperature((uint16_t)raw), + max31865_0.temperature(MAX31865_SENSOR_OHMS_0, MAX31865_CALIBRATION_OHMS_0) + ); + #else + return raw * 0.25; + #endif + #elif TEMP_SENSOR_0_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_0_USES_AD8495 + #elif TEMP_SENSOR_0_IS_AD8495 return TEMP_AD8495(raw); #else break; #endif case 1: - #if HEATER_1_USER_THERMISTOR + #if TEMP_SENSOR_1_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_1, raw); - #elif HEATER_1_USES_MAX6675 - return TERN(MAX6675_1_IS_MAX31865, max31865_1.temperature(MAX31865_SENSOR_OHMS_1, MAX31865_CALIBRATION_OHMS_1), raw * 0.25); - #elif HEATER_1_USES_AD595 + #elif TEMP_SENSOR_1_IS_MAX_TC + #if TEMP_SENSOR_0_IS_MAX31865 + return TERN(LIB_INTERNAL_MAX31865, + max31865_1.temperature((uint16_t)raw), + max31865_1.temperature(MAX31865_SENSOR_OHMS_1, MAX31865_CALIBRATION_OHMS_1) + ); + #else + return raw * 0.25; + #endif + #elif TEMP_SENSOR_1_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_1_USES_AD8495 + #elif TEMP_SENSOR_1_IS_AD8495 return TEMP_AD8495(raw); #else break; #endif case 2: - #if HEATER_2_USER_THERMISTOR + #if TEMP_SENSOR_2_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_2, raw); - #elif HEATER_2_USES_AD595 + #elif TEMP_SENSOR_2_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_2_USES_AD8495 + #elif TEMP_SENSOR_2_IS_AD8495 return TEMP_AD8495(raw); #else break; #endif case 3: - #if HEATER_3_USER_THERMISTOR + #if TEMP_SENSOR_3_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_3, raw); - #elif HEATER_3_USES_AD595 + #elif TEMP_SENSOR_3_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_3_USES_AD8495 + #elif TEMP_SENSOR_3_IS_AD8495 return TEMP_AD8495(raw); #else break; #endif case 4: - #if HEATER_4_USER_THERMISTOR + #if TEMP_SENSOR_4_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_4, raw); - #elif HEATER_4_USES_AD595 + #elif TEMP_SENSOR_4_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_4_USES_AD8495 + #elif TEMP_SENSOR_4_IS_AD8495 return TEMP_AD8495(raw); #else break; #endif case 5: - #if HEATER_5_USER_THERMISTOR + #if TEMP_SENSOR_5_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_5, raw); - #elif HEATER_5_USES_AD595 + #elif TEMP_SENSOR_5_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_5_USES_AD8495 + #elif TEMP_SENSOR_5_IS_AD8495 return TEMP_AD8495(raw); #else break; #endif case 6: - #if HEATER_6_USER_THERMISTOR + #if TEMP_SENSOR_6_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_6, raw); - #elif HEATER_6_USES_AD595 + #elif TEMP_SENSOR_6_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_6_USES_AD8495 + #elif TEMP_SENSOR_6_IS_AD8495 return TEMP_AD8495(raw); #else break; #endif case 7: - #if HEATER_7_USER_THERMISTOR + #if TEMP_SENSOR_7_IS_CUSTOM return user_thermistor_to_deg_c(CTI_HOTEND_7, raw); - #elif HEATER_7_USES_AD595 + #elif TEMP_SENSOR_7_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_7_USES_AD8495 + #elif TEMP_SENSOR_7_IS_AD8495 return TEMP_AD8495(raw); #else break; @@ -1596,16 +1915,15 @@ void Temperature::manage_heater() { #endif // HAS_HOTEND #if HAS_HEATED_BED - // Derived from RepRap FiveD extruder::getTemperature() // For bed temperature measurement. - float Temperature::analog_to_celsius_bed(const int raw) { - #if HEATER_BED_USER_THERMISTOR + celsius_float_t Temperature::analog_to_celsius_bed(const int16_t raw) { + #if TEMP_SENSOR_BED_IS_CUSTOM return user_thermistor_to_deg_c(CTI_BED, raw); - #elif HEATER_BED_USES_THERMISTOR - SCAN_THERMISTOR_TABLE(BED_TEMPTABLE, BED_TEMPTABLE_LEN); - #elif HEATER_BED_USES_AD595 + #elif TEMP_SENSOR_BED_IS_THERMISTOR + SCAN_THERMISTOR_TABLE(TEMPTABLE_BED, TEMPTABLE_BED_LEN); + #elif TEMP_SENSOR_BED_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_BED_USES_AD8495 + #elif TEMP_SENSOR_BED_IS_AD8495 return TEMP_AD8495(raw); #else UNUSED(raw); @@ -1615,16 +1933,15 @@ void Temperature::manage_heater() { #endif // HAS_HEATED_BED #if HAS_TEMP_CHAMBER - // Derived from RepRap FiveD extruder::getTemperature() // For chamber temperature measurement. - float Temperature::analog_to_celsius_chamber(const int raw) { - #if HEATER_CHAMBER_USER_THERMISTOR + celsius_float_t Temperature::analog_to_celsius_chamber(const int16_t raw) { + #if TEMP_SENSOR_CHAMBER_IS_CUSTOM return user_thermistor_to_deg_c(CTI_CHAMBER, raw); - #elif HEATER_CHAMBER_USES_THERMISTOR - SCAN_THERMISTOR_TABLE(CHAMBER_TEMPTABLE, CHAMBER_TEMPTABLE_LEN); - #elif HEATER_CHAMBER_USES_AD595 + #elif TEMP_SENSOR_CHAMBER_IS_THERMISTOR + SCAN_THERMISTOR_TABLE(TEMPTABLE_CHAMBER, TEMPTABLE_CHAMBER_LEN); + #elif TEMP_SENSOR_CHAMBER_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_CHAMBER_USES_AD8495 + #elif TEMP_SENSOR_CHAMBER_IS_AD8495 return TEMP_AD8495(raw); #else UNUSED(raw); @@ -1633,17 +1950,34 @@ void Temperature::manage_heater() { } #endif // HAS_TEMP_CHAMBER +#if HAS_TEMP_COOLER + // For cooler temperature measurement. + celsius_float_t Temperature::analog_to_celsius_cooler(const int16_t raw) { + #if TEMP_SENSOR_COOLER_IS_CUSTOM + return user_thermistor_to_deg_c(CTI_COOLER, raw); + #elif TEMP_SENSOR_COOLER_IS_THERMISTOR + SCAN_THERMISTOR_TABLE(TEMPTABLE_COOLER, TEMPTABLE_COOLER_LEN); + #elif TEMP_SENSOR_COOLER_IS_AD595 + return TEMP_AD595(raw); + #elif TEMP_SENSOR_COOLER_IS_AD8495 + return TEMP_AD8495(raw); + #else + UNUSED(raw); + return 0; + #endif + } +#endif // HAS_TEMP_COOLER + #if HAS_TEMP_PROBE - // Derived from RepRap FiveD extruder::getTemperature() // For probe temperature measurement. - float Temperature::analog_to_celsius_probe(const int raw) { - #if HEATER_PROBE_USER_THERMISTOR + celsius_float_t Temperature::analog_to_celsius_probe(const int16_t raw) { + #if TEMP_SENSOR_PROBE_IS_CUSTOM return user_thermistor_to_deg_c(CTI_PROBE, raw); - #elif HEATER_PROBE_USES_THERMISTOR - SCAN_THERMISTOR_TABLE(PROBE_TEMPTABLE, PROBE_TEMPTABLE_LEN); - #elif HEATER_PROBE_USES_AD595 + #elif TEMP_SENSOR_PROBE_IS_THERMISTOR + SCAN_THERMISTOR_TABLE(TEMPTABLE_PROBE, TEMPTABLE_PROBE_LEN); + #elif TEMP_SENSOR_PROBE_IS_AD595 return TEMP_AD595(raw); - #elif HEATER_PROBE_USES_AD8495 + #elif TEMP_SENSOR_PROBE_IS_AD8495 return TEMP_AD8495(raw); #else UNUSED(raw); @@ -1652,108 +1986,252 @@ void Temperature::manage_heater() { } #endif // HAS_TEMP_PROBE +#if HAS_TEMP_BOARD + // For motherboard temperature measurement. + celsius_float_t Temperature::analog_to_celsius_board(const int16_t raw) { + #if TEMP_SENSOR_BOARD_IS_CUSTOM + return user_thermistor_to_deg_c(CTI_BOARD, raw); + #elif TEMP_SENSOR_BOARD_IS_THERMISTOR + SCAN_THERMISTOR_TABLE(TEMPTABLE_BOARD, TEMPTABLE_BOARD_LEN); + #elif TEMP_SENSOR_BOARD_IS_AD595 + return TEMP_AD595(raw); + #elif TEMP_SENSOR_BOARD_IS_AD8495 + return TEMP_AD8495(raw); + #else + UNUSED(raw); + return 0; + #endif + } +#endif // HAS_TEMP_BOARD + +#if HAS_TEMP_REDUNDANT + // For redundant temperature measurement. + celsius_float_t Temperature::analog_to_celsius_redundant(const int16_t raw) { + #if TEMP_SENSOR_REDUNDANT_IS_CUSTOM + return user_thermistor_to_deg_c(CTI_REDUNDANT, raw); + #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E0) + return TERN(TEMP_SENSOR_REDUNDANT_IS_MAX31865, max31865_0.temperature((uint16_t)raw), raw * 0.25); + #elif TEMP_SENSOR_REDUNDANT_IS_MAX_TC && REDUNDANT_TEMP_MATCH(SOURCE, E1) + return TERN(TEMP_SENSOR_REDUNDANT_IS_MAX31865, max31865_1.temperature((uint16_t)raw), raw * 0.25); + #elif TEMP_SENSOR_REDUNDANT_IS_THERMISTOR + SCAN_THERMISTOR_TABLE(TEMPTABLE_REDUNDANT, TEMPTABLE_REDUNDANT_LEN); + #elif TEMP_SENSOR_REDUNDANT_IS_AD595 + return TEMP_AD595(raw); + #elif TEMP_SENSOR_REDUNDANT_IS_AD8495 + return TEMP_AD8495(raw); + #else + UNUSED(raw); + return 0; + #endif + } +#endif // HAS_TEMP_REDUNDANT + /** - * Get the raw values into the actual temperatures. - * The raw values are created in interrupt context, - * and this function is called from normal context - * as it would block the stepper routine. + * Convert the raw sensor readings into actual Celsius temperatures and + * validate raw temperatures. Bad readings generate min/maxtemp errors. + * + * The raw values are generated entirely in interrupt context, and this + * method is called from normal context once 'raw_temps_ready' has been + * set by update_raw_temperatures(). + * + * The watchdog is dependent on this method. If 'raw_temps_ready' stops + * being set by the interrupt so that this method is not called for over + * 4 seconds then something has gone afoul and the machine will be reset. */ void Temperature::updateTemperaturesFromRawValues() { - TERN_(HEATER_0_USES_MAX6675, temp_hotend[0].raw = READ_MAX6675(0)); - TERN_(HEATER_1_USES_MAX6675, temp_hotend[1].raw = READ_MAX6675(1)); + + watchdog_refresh(); // Reset because raw_temps_ready was set by the interrupt + + TERN_(TEMP_SENSOR_0_IS_MAX_TC, temp_hotend[0].raw = READ_MAX_TC(0)); + TERN_(TEMP_SENSOR_1_IS_MAX_TC, temp_hotend[1].raw = READ_MAX_TC(1)); + TERN_(TEMP_SENSOR_REDUNDANT_IS_MAX_TC, temp_redundant.raw = READ_MAX_TC(HEATER_ID(TEMP_SENSOR_REDUNDANT_SOURCE))); + #if HAS_HOTEND HOTEND_LOOP() temp_hotend[e].celsius = analog_to_celsius_hotend(temp_hotend[e].raw, e); #endif - TERN_(HAS_HEATED_BED, temp_bed.celsius = analog_to_celsius_bed(temp_bed.raw)); - TERN_(HAS_TEMP_CHAMBER, temp_chamber.celsius = analog_to_celsius_chamber(temp_chamber.raw)); - TERN_(HAS_TEMP_PROBE, temp_probe.celsius = analog_to_celsius_probe(temp_probe.raw)); - TERN_(TEMP_SENSOR_1_AS_REDUNDANT, redundant_temperature = analog_to_celsius_hotend(redundant_temperature_raw, 1)); + + TERN_(HAS_HEATED_BED, temp_bed.celsius = analog_to_celsius_bed(temp_bed.raw)); + TERN_(HAS_TEMP_CHAMBER, temp_chamber.celsius = analog_to_celsius_chamber(temp_chamber.raw)); + TERN_(HAS_TEMP_COOLER, temp_cooler.celsius = analog_to_celsius_cooler(temp_cooler.raw)); + TERN_(HAS_TEMP_PROBE, temp_probe.celsius = analog_to_celsius_probe(temp_probe.raw)); + TERN_(HAS_TEMP_BOARD, temp_board.celsius = analog_to_celsius_board(temp_board.raw)); + TERN_(HAS_TEMP_REDUNDANT, temp_redundant.celsius = analog_to_celsius_redundant(temp_redundant.raw)); + TERN_(FILAMENT_WIDTH_SENSOR, filwidth.update_measured_mm()); - TERN_(HAS_POWER_MONITOR, power_monitor.capture_values()); + TERN_(HAS_POWER_MONITOR, power_monitor.capture_values()); - // Reset the watchdog on good temperature measurement - watchdog_refresh(); + #if HAS_HOTEND + static constexpr int8_t temp_dir[] = { + #if TEMP_SENSOR_IS_ANY_MAX_TC(0) + 0 + #else + TEMPDIR(0) + #endif + #if HAS_MULTI_HOTEND + #if TEMP_SENSOR_IS_ANY_MAX_TC(1) + , 0 + #else + , TEMPDIR(1) + #endif + #if HOTENDS > 2 + #define _TEMPDIR(N) , TEMPDIR(N) + REPEAT_S(2, HOTENDS, _TEMPDIR) + #endif + #endif + }; - raw_temps_ready = false; -} + LOOP_L_N(e, COUNT(temp_dir)) { + const int8_t tdir = temp_dir[e]; + if (tdir) { + const int16_t rawtemp = temp_hotend[e].raw * tdir; // normal direction, +rawtemp, else -rawtemp + if (rawtemp > temp_range[e].raw_max * tdir) max_temp_error((heater_id_t)e); -#if MAX6675_SEPARATE_SPI - template SoftSPI SPIclass::softSPI; - SPIclass max6675_spi; -#endif + const bool heater_on = temp_hotend[e].target > 0; + if (heater_on && rawtemp < temp_range[e].raw_min * tdir && !is_preheating(e)) { + #if MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED > 1 + if (++consecutive_low_temperature_error[e] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED) + #endif + min_temp_error((heater_id_t)e); + } + #if MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED > 1 + else + consecutive_low_temperature_error[e] = 0; + #endif + } + } -// Init fans according to whether they're native PWM or Software PWM -#ifdef ALFAWISE_UX0 - #define _INIT_SOFT_FAN(P) OUT_WRITE_OD(P, FAN_INVERTING ? LOW : HIGH) -#else - #define _INIT_SOFT_FAN(P) OUT_WRITE(P, FAN_INVERTING ? LOW : HIGH) -#endif -#if ENABLED(FAN_SOFT_PWM) - #define _INIT_FAN_PIN(P) _INIT_SOFT_FAN(P) -#else - #define _INIT_FAN_PIN(P) do{ if (PWM_PIN(P)) SET_PWM(P); else _INIT_SOFT_FAN(P); }while(0) -#endif -#if ENABLED(FAST_PWM_FAN) - #define SET_FAST_PWM_FREQ(P) set_pwm_frequency(P, FAST_PWM_FAN_FREQUENCY) -#else - #define SET_FAST_PWM_FREQ(P) NOOP -#endif -#define INIT_FAN_PIN(P) do{ _INIT_FAN_PIN(P); SET_FAST_PWM_FREQ(P); }while(0) -#if EXTRUDER_AUTO_FAN_SPEED != 255 - #define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) -#else - #define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P) -#endif -#if CHAMBER_AUTO_FAN_SPEED != 255 - #define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0) -#else - #define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P) -#endif + #endif // HAS_HOTEND + + #define TP_CMP(S,A,B) (TEMPDIR(S) < 0 ? ((A)<(B)) : ((A)>(B))) + #if ENABLED(THERMAL_PROTECTION_BED) + if (TP_CMP(BED, temp_bed.raw, maxtemp_raw_BED)) max_temp_error(H_BED); + if (temp_bed.target > 0 && TP_CMP(BED, mintemp_raw_BED, temp_bed.raw)) min_temp_error(H_BED); + #endif + + #if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) + if (TP_CMP(CHAMBER, temp_chamber.raw, maxtemp_raw_CHAMBER)) max_temp_error(H_CHAMBER); + if (temp_chamber.target > 0 && TP_CMP(CHAMBER, mintemp_raw_CHAMBER, temp_chamber.raw)) min_temp_error(H_CHAMBER); + #endif + + #if BOTH(HAS_COOLER, THERMAL_PROTECTION_COOLER) + if (cutter.unitPower > 0 && TP_CMP(COOLER, temp_cooler.raw, maxtemp_raw_COOLER)) max_temp_error(H_COOLER); + if (TP_CMP(COOLER, mintemp_raw_COOLER, temp_cooler.raw)) min_temp_error(H_COOLER); + #endif + + #if BOTH(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) + if (TP_CMP(BOARD, temp_board.raw, maxtemp_raw_BOARD)) max_temp_error(H_BOARD); + if (TP_CMP(BOARD, mintemp_raw_BOARD, temp_board.raw)) min_temp_error(H_BOARD); + #endif + #undef TP_CMP + +} // Temperature::updateTemperaturesFromRawValues /** * Initialize the temperature manager + * * The manager is implemented by periodic calls to manage_heater() + * + * - Init (and disable) SPI thermocouples like MAX6675 and MAX31865 + * - Disable RUMBA JTAG to accommodate a thermocouple extension + * - Read-enable thermistors with a read-enable pin + * - Init HEATER and COOLER pins for OUTPUT in OFF state + * - Init the FAN pins as PWM or OUTPUT + * - Init the SPI interface for SPI thermocouples + * - Init ADC according to the HAL + * - Set thermistor pins to analog inputs according to the HAL + * - Start the Temperature ISR timer + * - Init the AUTO FAN pins as PWM or OUTPUT + * - Wait 250ms for temperatures to settle + * - Init temp_range[], used for catching min/maxtemp */ void Temperature::init() { - TERN_(MAX6675_0_IS_MAX31865, max31865_0.begin(MAX31865_2WIRE)); // MAX31865_2WIRE, MAX31865_3WIRE, MAX31865_4WIRE - TERN_(MAX6675_1_IS_MAX31865, max31865_1.begin(MAX31865_2WIRE)); + TERN_(PROBING_HEATERS_OFF, paused_for_probing = false); + + #if BOTH(PIDTEMP, PID_EXTRUSION_SCALING) + last_e_position = 0; + #endif - #if EARLY_WATCHDOG - // Flag that the thermalManager should be running - if (inited) return; - inited = true; + // Init (and disable) SPI thermocouples + #if TEMP_SENSOR_IS_ANY_MAX_TC(0) && PIN_EXISTS(TEMP_0_CS) + OUT_WRITE(TEMP_0_CS_PIN, HIGH); + #endif + #if TEMP_SENSOR_IS_ANY_MAX_TC(1) && PIN_EXISTS(TEMP_1_CS) + OUT_WRITE(TEMP_1_CS_PIN, HIGH); + #endif + + // Setup objects for library-based polling of MAX TCs + #if HAS_MAXTC_LIBRARIES + #define _MAX31865_WIRES(n) MAX31865_##n##WIRE + #define MAX31865_WIRES(n) _MAX31865_WIRES(n) + + #if TEMP_SENSOR_IS_MAX(0, 6675) && HAS_MAX6675_LIBRARY + max6675_0.begin(); + #elif TEMP_SENSOR_IS_MAX(0, 31855) && HAS_MAX31855_LIBRARY + max31855_0.begin(); + #elif TEMP_SENSOR_IS_MAX(0, 31865) + max31865_0.begin( + MAX31865_WIRES(MAX31865_SENSOR_WIRES_0) // MAX31865_2WIRE, MAX31865_3WIRE, MAX31865_4WIRE + OPTARG(LIB_INTERNAL_MAX31865, MAX31865_SENSOR_OHMS_0, MAX31865_CALIBRATION_OHMS_0) + ); + #if defined(LIB_INTERNAL_MAX31865) && ENABLED(MAX31865_50HZ_FILTER) + max31865_0.enable50HzFilter(1); + #endif + #endif + + #if TEMP_SENSOR_IS_MAX(1, 6675) && HAS_MAX6675_LIBRARY + max6675_1.begin(); + #elif TEMP_SENSOR_IS_MAX(1, 31855) && HAS_MAX31855_LIBRARY + max31855_1.begin(); + #elif TEMP_SENSOR_IS_MAX(1, 31865) + max31865_1.begin( + MAX31865_WIRES(MAX31865_SENSOR_WIRES_1) // MAX31865_2WIRE, MAX31865_3WIRE, MAX31865_4WIRE + OPTARG(LIB_INTERNAL_MAX31865, MAX31865_SENSOR_OHMS_1, MAX31865_CALIBRATION_OHMS_1) + ); + #if defined(LIB_INTERNAL_MAX31865) && ENABLED(MAX31865_50HZ_FILTER) + max31865_1.enable50HzFilter(1); + #endif + #endif + #undef MAX31865_WIRES + #undef _MAX31865_WIRES #endif #if MB(RUMBA) // Disable RUMBA JTAG in case the thermocouple extension is plugged on top of JTAG connector - #define _AD(N) (HEATER_##N##_USES_AD595 || HEATER_##N##_USES_AD8495) - #if _AD(0) || _AD(1) || _AD(2) || _AD(BED) || _AD(CHAMBER) + #define _AD(N) (TEMP_SENSOR_##N##_IS_AD595 || TEMP_SENSOR_##N##_IS_AD8495) + #if _AD(0) || _AD(1) || _AD(2) || _AD(BED) || _AD(CHAMBER) || _AD(REDUNDANT) MCUCR = _BV(JTD); MCUCR = _BV(JTD); #endif #endif // Thermistor activation by MCU pin - #if PIN_EXISTS(TEMP_0_TR_ENABLE_PIN) - OUT_WRITE(TEMP_0_TR_ENABLE_PIN, ENABLED(HEATER_0_USES_MAX6675)); - #endif - #if PIN_EXISTS(TEMP_1_TR_ENABLE_PIN) - OUT_WRITE(TEMP_1_TR_ENABLE_PIN, ENABLED(HEATER_1_USES_MAX6675)); + #if PIN_EXISTS(TEMP_0_TR_ENABLE) + OUT_WRITE(TEMP_0_TR_ENABLE_PIN, ( + #if TEMP_SENSOR_IS_ANY_MAX_TC(0) + HIGH + #else + LOW + #endif + )); #endif - - #if BOTH(PIDTEMP, PID_EXTRUSION_SCALING) - last_e_position = 0; + #if PIN_EXISTS(TEMP_1_TR_ENABLE) + OUT_WRITE(TEMP_1_TR_ENABLE_PIN, ( + #if TEMP_SENSOR_IS_ANY_MAX_TC(1) + HIGH + #else + LOW + #endif + )); #endif #if HAS_HEATER_0 - #ifdef ALFAWISE_UX0 + #ifdef BOARD_OPENDRAIN_MOSFETS OUT_WRITE_OD(HEATER_0_PIN, HEATER_0_INVERTING); #else OUT_WRITE(HEATER_0_PIN, HEATER_0_INVERTING); #endif #endif - #if HAS_HEATER_1 OUT_WRITE(HEATER_1_PIN, HEATER_1_INVERTING); #endif @@ -1777,7 +2255,7 @@ void Temperature::init() { #endif #if HAS_HEATED_BED - #ifdef ALFAWISE_UX0 + #ifdef BOARD_OPENDRAIN_MOSFETS OUT_WRITE_OD(HEATER_BED_PIN, HEATER_BED_INVERTING); #else OUT_WRITE(HEATER_BED_PIN, HEATER_BED_INVERTING); @@ -1788,6 +2266,10 @@ void Temperature::init() { OUT_WRITE(HEATER_CHAMBER_PIN, HEATER_CHAMBER_INVERTING); #endif + #if HAS_COOLER + OUT_WRITE(COOLER_PIN, COOLER_INVERTING); + #endif + #if HAS_FAN0 INIT_FAN_PIN(FAN_PIN); #endif @@ -1816,7 +2298,7 @@ void Temperature::init() { INIT_FAN_PIN(CONTROLLER_FAN_PIN); #endif - TERN_(MAX6675_SEPARATE_SPI, max6675_spi.init()); + TERN_(HAS_MAXTC_SW_SPI, max_tc_spi.init()); HAL_adc_init(); @@ -1862,9 +2344,18 @@ void Temperature::init() { #if HAS_TEMP_ADC_CHAMBER HAL_ANALOG_SELECT(TEMP_CHAMBER_PIN); #endif + #if HAS_TEMP_ADC_COOLER + HAL_ANALOG_SELECT(TEMP_COOLER_PIN); + #endif #if HAS_TEMP_ADC_PROBE HAL_ANALOG_SELECT(TEMP_PROBE_PIN); #endif + #if HAS_TEMP_ADC_BOARD + HAL_ANALOG_SELECT(TEMP_BOARD_PIN); + #endif + #if HAS_TEMP_ADC_REDUNDANT + HAL_ANALOG_SELECT(TEMP_REDUNDANT_PIN); + #endif #if ENABLED(FILAMENT_WIDTH_SENSOR) HAL_ANALOG_SELECT(FILWIDTH_PIN); #endif @@ -1909,25 +2400,21 @@ void Temperature::init() { INIT_CHAMBER_AUTO_FAN_PIN(CHAMBER_AUTO_FAN_PIN); #endif - // Wait for temperature measurement to settle - delay(250); - #if HAS_HOTEND - #define _TEMP_MIN_E(NR) do{ \ - const int16_t tmin = _MAX(HEATER_ ##NR## _MINTEMP, TERN(HEATER_##NR##_USER_THERMISTOR, 0, (int16_t)pgm_read_word(&HEATER_ ##NR## _TEMPTABLE[HEATER_ ##NR## _SENSOR_MINTEMP_IND].celsius))); \ + const celsius_t tmin = _MAX(HEATER_##NR##_MINTEMP, TERN(TEMP_SENSOR_##NR##_IS_CUSTOM, 0, (int)pgm_read_word(&TEMPTABLE_##NR [TEMP_SENSOR_##NR##_MINTEMP_IND].celsius))); \ temp_range[NR].mintemp = tmin; \ while (analog_to_celsius_hotend(temp_range[NR].raw_min, NR) < tmin) \ temp_range[NR].raw_min += TEMPDIR(NR) * (OVERSAMPLENR); \ }while(0) #define _TEMP_MAX_E(NR) do{ \ - const int16_t tmax = _MIN(HEATER_ ##NR## _MAXTEMP, TERN(HEATER_##NR##_USER_THERMISTOR, 2000, (int16_t)pgm_read_word(&HEATER_ ##NR## _TEMPTABLE[HEATER_ ##NR## _SENSOR_MAXTEMP_IND].celsius) - 1)); \ + const celsius_t tmax = _MIN(HEATER_##NR##_MAXTEMP, TERN(TEMP_SENSOR_##NR##_IS_CUSTOM, 2000, (int)pgm_read_word(&TEMPTABLE_##NR [TEMP_SENSOR_##NR##_MAXTEMP_IND].celsius) - 1)); \ temp_range[NR].maxtemp = tmax; \ while (analog_to_celsius_hotend(temp_range[NR].raw_max, NR) > tmax) \ temp_range[NR].raw_max -= TEMPDIR(NR) * (OVERSAMPLENR); \ }while(0) - #define _MINMAX_TEST(N,M) (HOTENDS > N && THERMISTOR_HEATER_##N && THERMISTOR_HEATER_##N != 998 && THERMISTOR_HEATER_##N != 999 && defined(HEATER_##N##_##M##TEMP)) + #define _MINMAX_TEST(N,M) (HOTENDS > N && TEMP_SENSOR_##N > 0 && TEMP_SENSOR_##N != 998 && TEMP_SENSOR_##N != 999 && defined(HEATER_##N##_##M##TEMP)) #if _MINMAX_TEST(0, MIN) _TEMP_MIN_E(0); @@ -1977,63 +2464,47 @@ void Temperature::init() { #if _MINMAX_TEST(7, MAX) _TEMP_MAX_E(7); #endif - #endif // HAS_HOTEND + // TODO: combine these into the macros above #if HAS_HEATED_BED - #ifdef BED_MINTEMP - while (analog_to_celsius_bed(mintemp_raw_BED) < BED_MINTEMP) mintemp_raw_BED += TEMPDIR(BED) * (OVERSAMPLENR); - #endif - #ifdef BED_MAXTEMP - while (analog_to_celsius_bed(maxtemp_raw_BED) > BED_MAXTEMP) maxtemp_raw_BED -= TEMPDIR(BED) * (OVERSAMPLENR); - #endif - #endif // HAS_HEATED_BED + while (analog_to_celsius_bed(mintemp_raw_BED) < BED_MINTEMP) mintemp_raw_BED += TEMPDIR(BED) * (OVERSAMPLENR); + while (analog_to_celsius_bed(maxtemp_raw_BED) > BED_MAXTEMP) maxtemp_raw_BED -= TEMPDIR(BED) * (OVERSAMPLENR); + #endif #if HAS_HEATED_CHAMBER - #ifdef CHAMBER_MINTEMP - while (analog_to_celsius_chamber(mintemp_raw_CHAMBER) < CHAMBER_MINTEMP) mintemp_raw_CHAMBER += TEMPDIR(CHAMBER) * (OVERSAMPLENR); - #endif - #ifdef CHAMBER_MAXTEMP - while (analog_to_celsius_chamber(maxtemp_raw_CHAMBER) > CHAMBER_MAXTEMP) maxtemp_raw_CHAMBER -= TEMPDIR(CHAMBER) * (OVERSAMPLENR); - #endif + while (analog_to_celsius_chamber(mintemp_raw_CHAMBER) < CHAMBER_MINTEMP) mintemp_raw_CHAMBER += TEMPDIR(CHAMBER) * (OVERSAMPLENR); + while (analog_to_celsius_chamber(maxtemp_raw_CHAMBER) > CHAMBER_MAXTEMP) maxtemp_raw_CHAMBER -= TEMPDIR(CHAMBER) * (OVERSAMPLENR); #endif - TERN_(PROBING_HEATERS_OFF, paused = false); -} - -#if WATCH_HOTENDS - /** - * Start Heating Sanity Check for hotends that are below - * their target temperature by a configurable margin. - * This is called when the temperature is set. (M104, M109) - */ - void Temperature::start_watching_hotend(const uint8_t E_NAME) { - const uint8_t ee = HOTEND_INDEX; - watch_hotend[ee].restart(degHotend(ee), degTargetHotend(ee)); - } -#endif + #if HAS_COOLER + while (analog_to_celsius_cooler(mintemp_raw_COOLER) > COOLER_MINTEMP) mintemp_raw_COOLER += TEMPDIR(COOLER) * (OVERSAMPLENR); + while (analog_to_celsius_cooler(maxtemp_raw_COOLER) < COOLER_MAXTEMP) maxtemp_raw_COOLER -= TEMPDIR(COOLER) * (OVERSAMPLENR); + #endif -#if WATCH_BED - /** - * Start Heating Sanity Check for hotends that are below - * their target temperature by a configurable margin. - * This is called when the temperature is set. (M140, M190) - */ - void Temperature::start_watching_bed() { - watch_bed.restart(degBed(), degTargetBed()); - } -#endif + #if BOTH(HAS_TEMP_BOARD, THERMAL_PROTECTION_BOARD) + while (analog_to_celsius_board(mintemp_raw_BOARD) < BOARD_MINTEMP) mintemp_raw_BOARD += TEMPDIR(BOARD) * (OVERSAMPLENR); + while (analog_to_celsius_board(maxtemp_raw_BOARD) > BOARD_MAXTEMP) maxtemp_raw_BOARD -= TEMPDIR(BOARD) * (OVERSAMPLENR); + #endif -#if WATCH_CHAMBER - /** - * Start Heating Sanity Check for chamber that is below - * its target temperature by a configurable margin. - * This is called when the temperature is set. (M141, M191) - */ - void Temperature::start_watching_chamber() { - watch_chamber.restart(degChamber(), degTargetChamber()); - } -#endif + #if HAS_TEMP_REDUNDANT + temp_redundant.target = &( + #if REDUNDANT_TEMP_MATCH(TARGET, COOLER) && HAS_TEMP_COOLER + temp_cooler + #elif REDUNDANT_TEMP_MATCH(TARGET, PROBE) && HAS_TEMP_PROBE + temp_probe + #elif REDUNDANT_TEMP_MATCH(TARGET, BOARD) && HAS_TEMP_BOARD + temp_board + #elif REDUNDANT_TEMP_MATCH(TARGET, CHAMBER) && HAS_TEMP_CHAMBER + temp_chamber + #elif REDUNDANT_TEMP_MATCH(TARGET, BED) && HAS_TEMP_BED + temp_bed + #else + temp_hotend[HEATER_ID(TEMP_SENSOR_REDUNDANT_TARGET)] + #endif + ); + #endif +} #if HAS_THERMAL_PROTECTION @@ -2049,7 +2520,7 @@ void Temperature::init() { * * TODO: Embed the last 3 parameters during init, if not less optimal */ - void Temperature::tr_state_machine_t::run(const float ¤t, const float &target, const heater_id_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc) { + void Temperature::tr_state_machine_t::run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_t hysteresis_degc) { #if HEATER_IDLE_HANDLER // Convert the given heater_id_t to an idle array index @@ -2062,16 +2533,16 @@ void Temperature::init() { switch (heater_id) { case H_BED: SERIAL_ECHOPGM("bed"); break; case H_CHAMBER: SERIAL_ECHOPGM("chamber"); break; - default: SERIAL_ECHO((int)heater_id); + default: SERIAL_ECHO(heater_id); } - SERIAL_ECHOLNPAIR( + SERIAL_ECHOLNPGM( " ; sizeof(running_temp):", sizeof(running_temp), " ; State:", state, " ; Timer:", timer, " ; Temperature:", current, " ; Target Temp:", target #if HEATER_IDLE_HANDLER , " ; Idle Timeout:", heater_idle[idle_index].timed_out #endif ); - //*/ + */ #if HEATER_IDLE_HANDLER // If the heater idle timeout expires, restart @@ -2125,7 +2596,7 @@ void Temperature::init() { state = TRRunaway; case TRRunaway: - TERN_(DWIN_CREALITY_LCD, DWIN_Popup_Temperature(0)); + TERN_(HAS_DWIN_E3V2_BASIC, DWIN_Popup_Temperature(0)); _temp_error(heater_id, str_t_thermal_runaway, GET_TEXT(MSG_THERMAL_RUNAWAY)); } } @@ -2134,10 +2605,9 @@ void Temperature::init() { void Temperature::disable_all_heaters() { + // Disable autotemp, unpause and reset everything TERN_(AUTOTEMP, planner.autotemp_enabled = false); - - // Unpause and reset everything - TERN_(PROBING_HEATERS_OFF, pause(false)); + TERN_(PROBING_HEATERS_OFF, pause_heaters(false)); #if HAS_HOTEND HOTEND_LOOP() { @@ -2162,6 +2632,12 @@ void Temperature::disable_all_heaters() { temp_chamber.soft_pwm_amount = 0; WRITE_HEATER_CHAMBER(LOW); #endif + + #if HAS_COOLER + setTargetCooler(0); + temp_cooler.soft_pwm_amount = 0; + WRITE_HEATER_COOLER(LOW); + #endif } #if ENABLED(PRINTJOB_TIMER_AUTOSTART) @@ -2184,13 +2660,13 @@ void Temperature::disable_all_heaters() { } } -#endif +#endif // PRINTJOB_TIMER_AUTOSTART #if ENABLED(PROBING_HEATERS_OFF) - void Temperature::pause(const bool p) { - if (p != paused) { - paused = p; + void Temperature::pause_heaters(const bool p) { + if (p != paused_for_probing) { + paused_for_probing = p; if (p) { HOTEND_LOOP() heater_idle[e].expire(); // Timeout immediately TERN_(HAS_HEATED_BED, heater_idle[IDLE_INDEX_BED].expire()); // Timeout immediately @@ -2204,280 +2680,258 @@ void Temperature::disable_all_heaters() { #endif // PROBING_HEATERS_OFF -#if ENABLED(SINGLENOZZLE_STANDBY_TEMP) +#if EITHER(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) void Temperature::singlenozzle_change(const uint8_t old_tool, const uint8_t new_tool) { - #if HAS_FAN + #if ENABLED(SINGLENOZZLE_STANDBY_FAN) singlenozzle_fan_speed[old_tool] = fan_speed[0]; fan_speed[0] = singlenozzle_fan_speed[new_tool]; #endif - singlenozzle_temp[old_tool] = temp_hotend[0].target; - if (singlenozzle_temp[new_tool] && singlenozzle_temp[new_tool] != singlenozzle_temp[old_tool]) { - setTargetHotend(singlenozzle_temp[new_tool], 0); - TERN_(AUTOTEMP, planner.autotemp_update()); - TERN_(HAS_DISPLAY, set_heating_message(0)); - (void)wait_for_hotend(0, false); // Wait for heating or cooling - } + #if ENABLED(SINGLENOZZLE_STANDBY_TEMP) + singlenozzle_temp[old_tool] = temp_hotend[0].target; + if (singlenozzle_temp[new_tool] && singlenozzle_temp[new_tool] != singlenozzle_temp[old_tool]) { + setTargetHotend(singlenozzle_temp[new_tool], 0); + TERN_(AUTOTEMP, planner.autotemp_update()); + set_heating_message(0); + (void)wait_for_hotend(0, false); // Wait for heating or cooling + } + #endif } -#endif +#endif // SINGLENOZZLE_STANDBY_TEMP || SINGLENOZZLE_STANDBY_FAN -#if HAS_MAX6675 +#if HAS_MAX_TC #ifndef THERMOCOUPLE_MAX_ERRORS #define THERMOCOUPLE_MAX_ERRORS 15 #endif - int Temperature::read_max6675(TERN_(HAS_MULTI_6675, const uint8_t hindex/*=0*/)) { - #define MAX6675_HEAT_INTERVAL 250UL + /** + * @brief Read MAX Thermocouple temperature. + * + * Reads the thermocouple board via HW or SW SPI, using a library (LIB_USR_x) or raw SPI reads. + * Doesn't strictly return a temperature; returns an "ADC Value" (i.e. raw register content). + * + * @param hindex the hotend we're referencing (if MULTI_MAX_TC) + * @return integer representing the board's buffer, to be converted later if needed + */ + int16_t Temperature::read_max_tc(TERN_(HAS_MULTI_MAX_TC, const uint8_t hindex/*=0*/)) { + #define MAXTC_HEAT_INTERVAL 250UL - #if MAX6675_0_IS_MAX31855 || MAX6675_1_IS_MAX31855 - static uint32_t max6675_temp = 2000; - #define MAX6675_ERROR_MASK 7 - #define MAX6675_DISCARD_BITS 18 - #define MAX6675_SPEED_BITS 3 // (_BV(SPR1)) // clock ÷ 64 + #if HAS_MAX31855 + #define MAX_TC_ERROR_MASK 7 // D2-0: SCV, SCG, OC + #define MAX_TC_DISCARD_BITS 18 // Data D31-18; sign bit D31 + #define MAX_TC_SPEED_BITS 3 // ~1MHz #elif HAS_MAX31865 - static uint16_t max6675_temp = 2000; // From datasheet 16 bits D15-D0 - #define MAX6675_ERROR_MASK 1 // D0 Bit not used - #define MAX6675_DISCARD_BITS 1 // Data is in D15-D1 - #define MAX6675_SPEED_BITS 3 // (_BV(SPR1)) // clock ÷ 64 - #else - static uint16_t max6675_temp = 2000; - #define MAX6675_ERROR_MASK 4 - #define MAX6675_DISCARD_BITS 3 - #define MAX6675_SPEED_BITS 2 // (_BV(SPR0)) // clock ÷ 16 + #define MAX_TC_ERROR_MASK 1 // D0 Bit on fault only + #define MAX_TC_DISCARD_BITS 1 // Data is in D15-D1 + #define MAX_TC_SPEED_BITS 3 // ~1MHz + #else // MAX6675 + #define MAX_TC_ERROR_MASK 3 // D2 only; 1 = open circuit + #define MAX_TC_DISCARD_BITS 3 // Data D15-D1 + #define MAX_TC_SPEED_BITS 2 // ~2MHz #endif - #if HAS_MULTI_6675 + #if HAS_MULTI_MAX_TC // Needed to return the correct temp when this is called between readings - static uint16_t max6675_temp_previous[COUNT_6675] = { 0 }; - #define MAX6675_TEMP(I) max6675_temp_previous[I] - #define MAX6675_SEL(A,B) (hindex ? (B) : (A)) - #define MAX6675_WRITE(V) do{ switch (hindex) { case 1: WRITE(MAX6675_SS2_PIN, V); break; default: WRITE(MAX6675_SS_PIN, V); } }while(0) - #define MAX6675_SET_OUTPUT() do{ switch (hindex) { case 1: SET_OUTPUT(MAX6675_SS2_PIN); break; default: SET_OUTPUT(MAX6675_SS_PIN); } }while(0) + static int16_t max_tc_temp_previous[MAX_TC_COUNT] = { 0 }; + #define THERMO_TEMP(I) max_tc_temp_previous[I] + #define THERMO_SEL(A,B) (hindex ? (B) : (A)) + #define MAXTC_CS_WRITE(V) do{ switch (hindex) { case 1: WRITE(TEMP_1_CS_PIN, V); break; default: WRITE(TEMP_0_CS_PIN, V); } }while(0) #else + // When we have only 1 max tc, THERMO_SEL will pick the appropriate sensor + // variable, and MAXTC_*() macros will be hardcoded to the correct CS pin. constexpr uint8_t hindex = 0; - #define MAX6675_TEMP(I) max6675_temp - #if MAX6675_1_IS_MAX31865 - #define MAX6675_SEL(A,B) B - #else - #define MAX6675_SEL(A,B) A - #endif - #if HEATER_0_USES_MAX6675 - #define MAX6675_WRITE(V) WRITE(MAX6675_SS_PIN, V) - #define MAX6675_SET_OUTPUT() SET_OUTPUT(MAX6675_SS_PIN) + #define THERMO_TEMP(I) max_tc_temp + #if TEMP_SENSOR_IS_ANY_MAX_TC(0) + #define THERMO_SEL(A,B) A + #define MAXTC_CS_WRITE(V) WRITE(TEMP_0_CS_PIN, V) #else - #define MAX6675_WRITE(V) WRITE(MAX6675_SS2_PIN, V) - #define MAX6675_SET_OUTPUT() SET_OUTPUT(MAX6675_SS2_PIN) + #define THERMO_SEL(A,B) B + #define MAXTC_CS_WRITE(V) WRITE(TEMP_1_CS_PIN, V) #endif #endif - static uint8_t max6675_errors[COUNT_6675] = { 0 }; + static TERN(HAS_MAX31855, uint32_t, uint16_t) max_tc_temp = THERMO_SEL( + TEMP_SENSOR_0_MAX_TC_TMAX, + TEMP_SENSOR_1_MAX_TC_TMAX + ); + + static uint8_t max_tc_errors[MAX_TC_COUNT] = { 0 }; + static millis_t next_max_tc_ms[MAX_TC_COUNT] = { 0 }; // Return last-read value between readings - static millis_t next_max6675_ms[COUNT_6675] = { 0 }; millis_t ms = millis(); - if (PENDING(ms, next_max6675_ms[hindex])) return int(MAX6675_TEMP(hindex)); - next_max6675_ms[hindex] = ms + MAX6675_HEAT_INTERVAL; + if (PENDING(ms, next_max_tc_ms[hindex])) + return (int16_t)THERMO_TEMP(hindex); - #if HAS_MAX31865 - Adafruit_MAX31865 &maxref = MAX6675_SEL(max31865_0, max31865_1); - const uint16_t max31865_ohms = (uint32_t(maxref.readRTD()) * MAX6675_SEL(MAX31865_CALIBRATION_OHMS_0, MAX31865_CALIBRATION_OHMS_1)) >> 16; - #endif + next_max_tc_ms[hindex] = ms + MAXTC_HEAT_INTERVAL; - // - // TODO: spiBegin, spiRec and spiInit doesn't work when soft spi is used. - // - #if !MAX6675_SEPARATE_SPI - spiBegin(); - spiInit(MAX6675_SPEED_BITS); - #endif + #if !HAS_MAXTC_LIBRARIES + max_tc_temp = 0; + + #if !HAS_MAXTC_SW_SPI + // Initialize SPI using the default Hardware SPI bus. + // FIXME: spiBegin, spiRec and spiInit doesn't work when soft spi is used. + spiBegin(); + spiInit(MAX_TC_SPEED_BITS); + #endif - MAX6675_WRITE(LOW); // enable TT_MAX6675 - DELAY_NS(100); // Ensure 100ns delay + MAXTC_CS_WRITE(LOW); // enable MAXTC + DELAY_NS(100); // Ensure 100ns delay - // Read a big-endian temperature value - max6675_temp = 0; - for (uint8_t i = sizeof(max6675_temp); i--;) { - max6675_temp |= TERN(MAX6675_SEPARATE_SPI, max6675_spi.receive(), spiRec()); - if (i > 0) max6675_temp <<= 8; // shift left if not the last byte - } + // Read a big-endian temperature value without using a library + for (uint8_t i = sizeof(max_tc_temp); i--;) { + max_tc_temp |= TERN(HAS_MAXTC_SW_SPI, max_tc_spi.receive(), spiRec()); + if (i > 0) max_tc_temp <<= 8; // shift left if not the last byte + } + + MAXTC_CS_WRITE(HIGH); // disable MAXTC + #else + #if HAS_MAX6675_LIBRARY + MAX6675 &max6675ref = THERMO_SEL(max6675_0, max6675_1); + max_tc_temp = max6675ref.readRaw16(); + #endif - MAX6675_WRITE(HIGH); // disable TT_MAX6675 + #if HAS_MAX31855_LIBRARY + MAX31855 &max855ref = THERMO_SEL(max31855_0, max31855_1); + max_tc_temp = max855ref.readRaw32(); + #endif + + #if HAS_MAX31865 + MAX31865 &max865ref = THERMO_SEL(max31865_0, max31865_1); + max_tc_temp = TERN(LIB_INTERNAL_MAX31865, max865ref.readRaw(), max865ref.readRTD_with_Fault()); + #endif + #endif - const uint8_t fault_31865 = TERN1(HAS_MAX31865, maxref.readFault()); + // Handle an error. If there have been more than THERMOCOUPLE_MAX_ERRORS, send an error over serial. + // Either way, return the TMAX for the thermocouple to trigger a max_temp_error() + if (max_tc_temp & MAX_TC_ERROR_MASK) { + max_tc_errors[hindex]++; - if (DISABLED(IGNORE_THERMOCOUPLE_ERRORS) && (max6675_temp & MAX6675_ERROR_MASK) && fault_31865) { - max6675_errors[hindex]++; - if (max6675_errors[hindex] > THERMOCOUPLE_MAX_ERRORS) { + if (max_tc_errors[hindex] > THERMOCOUPLE_MAX_ERRORS) { SERIAL_ERROR_START(); SERIAL_ECHOPGM("Temp measurement error! "); - #if MAX6675_ERROR_MASK == 7 - SERIAL_ECHOPGM("MAX31855 "); - if (max6675_temp & 1) + #if HAS_MAX31855 + SERIAL_ECHOPGM("MAX31855 Fault: (", max_tc_temp & 0x7, ") >> "); + if (max_tc_temp & 0x1) SERIAL_ECHOLNPGM("Open Circuit"); - else if (max6675_temp & 2) + else if (max_tc_temp & 0x2) SERIAL_ECHOLNPGM("Short to GND"); - else if (max6675_temp & 4) + else if (max_tc_temp & 0x4) SERIAL_ECHOLNPGM("Short to VCC"); #elif HAS_MAX31865 + const uint8_t fault_31865 = max865ref.readFault(); + max865ref.clearFault(); if (fault_31865) { - maxref.clearFault(); - SERIAL_ECHOPAIR("MAX31865 Fault :(", fault_31865, ") >>"); + SERIAL_EOL(); + SERIAL_ECHOLNPGM("\nMAX31865 Fault: (", fault_31865, ") >>"); if (fault_31865 & MAX31865_FAULT_HIGHTHRESH) SERIAL_ECHOLNPGM("RTD High Threshold"); - else if (fault_31865 & MAX31865_FAULT_LOWTHRESH) + if (fault_31865 & MAX31865_FAULT_LOWTHRESH) SERIAL_ECHOLNPGM("RTD Low Threshold"); - else if (fault_31865 & MAX31865_FAULT_REFINLOW) - SERIAL_ECHOLNPGM("REFIN- > 0.85 x Bias"); - else if (fault_31865 & MAX31865_FAULT_REFINHIGH) - SERIAL_ECHOLNPGM("REFIN- < 0.85 x Bias - FORCE- open"); - else if (fault_31865 & MAX31865_FAULT_RTDINLOW) - SERIAL_ECHOLNPGM("REFIN- < 0.85 x Bias - FORCE- open"); - else if (fault_31865 & MAX31865_FAULT_OVUV) + if (fault_31865 & MAX31865_FAULT_REFINLOW) + SERIAL_ECHOLNPGM("REFIN- > 0.85 x V bias"); + if (fault_31865 & MAX31865_FAULT_REFINHIGH) + SERIAL_ECHOLNPGM("REFIN- < 0.85 x V bias (FORCE- open)"); + if (fault_31865 & MAX31865_FAULT_RTDINLOW) + SERIAL_ECHOLNPGM("REFIN- < 0.85 x V bias (FORCE- open)"); + if (fault_31865 & MAX31865_FAULT_OVUV) SERIAL_ECHOLNPGM("Under/Over voltage"); } - #else - SERIAL_ECHOLNPGM("MAX6675"); + #else // MAX6675 + SERIAL_ECHOLNPGM("MAX6675 Fault: Open Circuit"); #endif - // Thermocouple open - max6675_temp = 4 * MAX6675_SEL(HEATER_0_MAX6675_TMAX, HEATER_1_MAX6675_TMAX); + // Set thermocouple above max temperature (TMAX) + max_tc_temp = THERMO_SEL(TEMP_SENSOR_0_MAX_TC_TMAX, TEMP_SENSOR_1_MAX_TC_TMAX) << (MAX_TC_DISCARD_BITS + 1); } - else - max6675_temp >>= MAX6675_DISCARD_BITS; } else { - max6675_temp >>= MAX6675_DISCARD_BITS; - max6675_errors[hindex] = 0; + max_tc_errors[hindex] = 0; // No error bit, reset error count } - #if MAX6675_0_IS_MAX31855 || MAX6675_1_IS_MAX31855 - if (max6675_temp & 0x00002000) max6675_temp |= 0xFFFFC000; // Support negative temperature - #endif + max_tc_temp >>= MAX_TC_DISCARD_BITS; - // Return the RTD resistance for MAX31865 for display in SHOW_TEMP_ADC_VALUES - TERN_(HAS_MAX31865, max6675_temp = max31865_ohms); + #if HAS_MAX31855 + // Support negative temperature for MAX38155 + if (max_tc_temp & 0x00002000) max_tc_temp |= 0xFFFFC000; + #endif - MAX6675_TEMP(hindex) = max6675_temp; + THERMO_TEMP(hindex) = max_tc_temp; - return int(max6675_temp); + return (int16_t)max_tc_temp; } -#endif // HAS_MAX6675 +#endif // HAS_MAX_TC /** * Update raw temperatures + * + * Called by ISR => readings_ready when new temperatures have been set by updateTemperaturesFromRawValues. + * Applies all the accumulators to the current raw temperatures. */ void Temperature::update_raw_temperatures() { - #if HAS_TEMP_ADC_0 && !HEATER_0_USES_MAX6675 + // TODO: can this be collapsed into a HOTEND_LOOP()? + #if HAS_TEMP_ADC_0 && !TEMP_SENSOR_0_IS_MAX_TC temp_hotend[0].update(); #endif - #if HAS_TEMP_ADC_1 - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - redundant_temperature_raw = temp_hotend[1].acc; - #elif !HEATER_1_USES_MAX6675 - temp_hotend[1].update(); - #endif + #if HAS_TEMP_ADC_1 && !TEMP_SENSOR_1_IS_MAX_TC + temp_hotend[1].update(); + #endif + + #if HAS_TEMP_ADC_REDUNDANT && !TEMP_SENSOR_REDUNDANT_IS_MAX_TC + temp_redundant.update(); #endif - TERN_(HAS_TEMP_ADC_2, temp_hotend[2].update()); - TERN_(HAS_TEMP_ADC_3, temp_hotend[3].update()); - TERN_(HAS_TEMP_ADC_4, temp_hotend[4].update()); - TERN_(HAS_TEMP_ADC_5, temp_hotend[5].update()); - TERN_(HAS_TEMP_ADC_6, temp_hotend[6].update()); - TERN_(HAS_TEMP_ADC_7, temp_hotend[7].update()); - TERN_(HAS_TEMP_ADC_BED, temp_bed.update()); + TERN_(HAS_TEMP_ADC_2, temp_hotend[2].update()); + TERN_(HAS_TEMP_ADC_3, temp_hotend[3].update()); + TERN_(HAS_TEMP_ADC_4, temp_hotend[4].update()); + TERN_(HAS_TEMP_ADC_5, temp_hotend[5].update()); + TERN_(HAS_TEMP_ADC_6, temp_hotend[6].update()); + TERN_(HAS_TEMP_ADC_7, temp_hotend[7].update()); + TERN_(HAS_TEMP_ADC_BED, temp_bed.update()); TERN_(HAS_TEMP_ADC_CHAMBER, temp_chamber.update()); - TERN_(HAS_TEMP_ADC_PROBE, temp_probe.update()); + TERN_(HAS_TEMP_ADC_PROBE, temp_probe.update()); + TERN_(HAS_TEMP_ADC_BOARD, temp_board.update()); + TERN_(HAS_TEMP_ADC_COOLER, temp_cooler.update()); TERN_(HAS_JOY_ADC_X, joystick.x.update()); TERN_(HAS_JOY_ADC_Y, joystick.y.update()); TERN_(HAS_JOY_ADC_Z, joystick.z.update()); - - raw_temps_ready = true; } +/** + * Called by the Temperature ISR when all the ADCs have been processed. + * Reset all the ADC accumulators for another round of updates. + */ void Temperature::readings_ready() { - // Update the raw values if they've been read. Else we could be updating them during reading. - if (!raw_temps_ready) update_raw_temperatures(); + // Update raw values only if they're not already set. + if (!raw_temps_ready) { + update_raw_temperatures(); + raw_temps_ready = true; + } // Filament Sensor - can be read any time since IIR filtering is used TERN_(FILAMENT_WIDTH_SENSOR, filwidth.reading_ready()); #if HAS_HOTEND HOTEND_LOOP() temp_hotend[e].reset(); - TERN_(TEMP_SENSOR_1_AS_REDUNDANT, temp_hotend[1].reset()); #endif - TERN_(HAS_HEATED_BED, temp_bed.reset()); - TERN_(HAS_TEMP_CHAMBER, temp_chamber.reset()); - TERN_(HAS_TEMP_PROBE, temp_probe.reset()); + TERN_(HAS_HEATED_BED, temp_bed.reset()); + TERN_(HAS_TEMP_CHAMBER, temp_chamber.reset()); + TERN_(HAS_TEMP_PROBE, temp_probe.reset()); + TERN_(HAS_TEMP_COOLER, temp_cooler.reset()); + TERN_(HAS_TEMP_BOARD, temp_board.reset()); + TERN_(HAS_TEMP_REDUNDANT, temp_redundant.reset()); TERN_(HAS_JOY_ADC_X, joystick.x.reset()); TERN_(HAS_JOY_ADC_Y, joystick.y.reset()); TERN_(HAS_JOY_ADC_Z, joystick.z.reset()); - - #if HAS_HOTEND - - static constexpr int8_t temp_dir[] = { - TERN(HEATER_0_USES_MAX6675, 0, TEMPDIR(0)) - #if HAS_MULTI_HOTEND - , TERN(HEATER_1_USES_MAX6675, 0, TEMPDIR(1)) - #if HOTENDS > 2 - #define _TEMPDIR(N) , TEMPDIR(N) - REPEAT_S(2, HOTENDS, _TEMPDIR) - #endif - #endif - }; - - LOOP_L_N(e, COUNT(temp_dir)) { - const int8_t tdir = temp_dir[e]; - if (tdir) { - const int16_t rawtemp = temp_hotend[e].raw * tdir; // normal direction, +rawtemp, else -rawtemp - const bool heater_on = (temp_hotend[e].target > 0 - || TERN0(PIDTEMP, temp_hotend[e].soft_pwm_amount) > 0 - ); - if (rawtemp > temp_range[e].raw_max * tdir) max_temp_error((heater_id_t)e); - if (heater_on && rawtemp < temp_range[e].raw_min * tdir && !is_preheating(e)) { - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - if (++consecutive_low_temperature_error[e] >= MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED) - #endif - min_temp_error((heater_id_t)e); - } - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED - else - consecutive_low_temperature_error[e] = 0; - #endif - } - } - - #endif // HAS_HOTEND - - #if ENABLED(THERMAL_PROTECTION_BED) - #if TEMPDIR(BED) < 0 - #define BEDCMP(A,B) ((A)<(B)) - #else - #define BEDCMP(A,B) ((A)>(B)) - #endif - const bool bed_on = (temp_bed.target > 0) || TERN0(PIDTEMPBED, temp_bed.soft_pwm_amount > 0); - if (BEDCMP(temp_bed.raw, maxtemp_raw_BED)) max_temp_error(H_BED); - if (bed_on && BEDCMP(mintemp_raw_BED, temp_bed.raw)) min_temp_error(H_BED); - #endif - - #if BOTH(HAS_HEATED_CHAMBER, THERMAL_PROTECTION_CHAMBER) - #if TEMPDIR(CHAMBER) < 0 - #define CHAMBERCMP(A,B) ((A)<(B)) - #else - #define CHAMBERCMP(A,B) ((A)>(B)) - #endif - const bool chamber_on = (temp_chamber.target > 0); - if (CHAMBERCMP(temp_chamber.raw, maxtemp_raw_CHAMBER)) max_temp_error(H_CHAMBER); - if (chamber_on && CHAMBERCMP(mintemp_raw_CHAMBER, temp_chamber.raw)) min_temp_error(H_CHAMBER); - #endif } /** @@ -2493,12 +2947,12 @@ void Temperature::readings_ready() { * - Step the babysteps value for each axis towards 0 * - For PINS_DEBUGGING, monitor and report endstop pins * - For ENDSTOP_INTERRUPTS_FEATURE check endstops if flagged - * - Call planner.tick to count down its "ignore" time + * - Call planner.isr to count down its "ignore" time */ HAL_TEMP_TIMER_ISR() { HAL_timer_isr_prologue(TEMP_TIMER_NUM); - Temperature::tick(); + Temperature::isr(); HAL_timer_isr_epilogue(TEMP_TIMER_NUM); } @@ -2537,7 +2991,7 @@ class SoftPWM { * - Endstop polling * - Planner clean buffer */ -void Temperature::tick() { +void Temperature::isr() { static int8_t temp_count = -1; static ADCSensorState adc_sensor_state = StartupDelay; @@ -2563,11 +3017,15 @@ void Temperature::tick() { static SoftPWM soft_pwm_chamber; #endif + #if HAS_COOLER + static SoftPWM soft_pwm_cooler; + #endif + #define WRITE_FAN(n, v) WRITE(FAN##n##_PIN, (v) ^ FAN_INVERTING) #if DISABLED(SLOW_PWM_HEATERS) - #if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_HEATED_CHAMBER, FAN_SOFT_PWM) + #if ANY(HAS_HOTEND, HAS_HEATED_BED, HAS_HEATED_CHAMBER, HAS_COOLER, FAN_SOFT_PWM) constexpr uint8_t pwm_mask = TERN0(SOFT_PWM_DITHER, _BV(SOFT_PWM_SCALE) - 1); #define _PWM_MOD(N,S,T) do{ \ const bool on = S.add(pwm_mask, T.soft_pwm_amount); \ @@ -2587,11 +3045,15 @@ void Temperature::tick() { #endif #if HAS_HEATED_BED - _PWM_MOD(BED,soft_pwm_bed,temp_bed); + _PWM_MOD(BED, soft_pwm_bed, temp_bed); #endif #if HAS_HEATED_CHAMBER - _PWM_MOD(CHAMBER,soft_pwm_chamber,temp_chamber); + _PWM_MOD(CHAMBER, soft_pwm_chamber, temp_chamber); + #endif + + #if HAS_COOLER + _PWM_MOD(COOLER, soft_pwm_cooler, temp_cooler); #endif #if ENABLED(FAN_SOFT_PWM) @@ -2641,6 +3103,10 @@ void Temperature::tick() { _PWM_LOW(CHAMBER, soft_pwm_chamber); #endif + #if HAS_COOLER + _PWM_LOW(COOLER, soft_pwm_cooler); + #endif + #if ENABLED(FAN_SOFT_PWM) #if HAS_FAN0 if (soft_pwm_count_fan[0] <= pwm_count_tmp) WRITE_FAN(0, LOW); @@ -2707,6 +3173,10 @@ void Temperature::tick() { _SLOW_PWM(CHAMBER, soft_pwm_chamber, temp_chamber); #endif + #if HAS_COOLER + _SLOW_PWM(COOLER, soft_pwm_cooler, temp_cooler); + #endif + } // slow_pwm_count == 0 #if HAS_HOTEND @@ -2722,6 +3192,10 @@ void Temperature::tick() { _PWM_OFF(CHAMBER, soft_pwm_chamber); #endif + #if HAS_COOLER + _PWM_OFF(COOLER, soft_pwm_cooler, temp_cooler); + #endif + #if ENABLED(FAN_SOFT_PWM) if (pwm_count_tmp >= 127) { pwm_count_tmp = 0; @@ -2801,6 +3275,7 @@ void Temperature::tick() { #endif TERN_(HAS_HEATED_BED, soft_pwm_bed.dec()); TERN_(HAS_HEATED_CHAMBER, soft_pwm_chamber.dec()); + TERN_(HAS_COOLER, soft_pwm_cooler.dec()); } #endif // SLOW_PWM_HEATERS @@ -2868,11 +3343,26 @@ void Temperature::tick() { case MeasureTemp_CHAMBER: ACCUMULATE_ADC(temp_chamber); break; #endif + #if HAS_TEMP_ADC_COOLER + case PrepareTemp_COOLER: HAL_START_ADC(TEMP_COOLER_PIN); break; + case MeasureTemp_COOLER: ACCUMULATE_ADC(temp_cooler); break; + #endif + #if HAS_TEMP_ADC_PROBE case PrepareTemp_PROBE: HAL_START_ADC(TEMP_PROBE_PIN); break; case MeasureTemp_PROBE: ACCUMULATE_ADC(temp_probe); break; #endif + #if HAS_TEMP_ADC_BOARD + case PrepareTemp_BOARD: HAL_START_ADC(TEMP_BOARD_PIN); break; + case MeasureTemp_BOARD: ACCUMULATE_ADC(temp_board); break; + #endif + + #if HAS_TEMP_ADC_REDUNDANT + case PrepareTemp_REDUNDANT: HAL_START_ADC(TEMP_REDUNDANT_PIN); break; + case MeasureTemp_REDUNDANT: ACCUMULATE_ADC(temp_redundant); break; + #endif + #if HAS_TEMP_ADC_1 case PrepareTemp_1: HAL_START_ADC(TEMP_1_PIN); break; case MeasureTemp_1: ACCUMULATE_ADC(temp_hotend[1]); break; @@ -2995,38 +3485,47 @@ void Temperature::tick() { // Poll endstops state, if required endstops.poll(); - // Periodically call the planner timer - planner.tick(); + // Periodically call the planner timer service routine + planner.isr(); } #if HAS_TEMP_SENSOR - - #include "../gcode/gcode.h" - - static void print_heater_state(const float &c, const float &t - #if ENABLED(SHOW_TEMP_ADC_VALUES) - , const float r - #endif - , const heater_id_t e=INDEX_NONE + /** + * Print a single heater state in the form: + * Bed: " B:nnn.nn /nnn.nn" + * Chamber: " C:nnn.nn /nnn.nn" + * Probe: " P:nnn.nn /nnn.nn" + * Cooler: " L:nnn.nn /nnn.nn" + * Redundant: " R:nnn.nn /nnn.nn" + * Extruder: " T0:nnn.nn /nnn.nn" + * With ADC: " T0:nnn.nn /nnn.nn (nnn.nn)" + */ + static void print_heater_state(const heater_id_t e, const_celsius_float_t c, const_celsius_float_t t + OPTARG(SHOW_TEMP_ADC_VALUES, const float r) ) { char k; switch (e) { + default: + #if HAS_TEMP_HOTEND + k = 'T'; break; + #endif + #if HAS_TEMP_BED + case H_BED: k = 'B'; break; + #endif #if HAS_TEMP_CHAMBER case H_CHAMBER: k = 'C'; break; #endif #if HAS_TEMP_PROBE case H_PROBE: k = 'P'; break; #endif - #if HAS_TEMP_HOTEND - default: k = 'T'; break; - #if HAS_HEATED_BED - case H_BED: k = 'B'; break; - #endif - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - case H_REDUNDANT: k = 'R'; break; - #endif - #elif HAS_HEATED_BED - default: k = 'B'; break; + #if HAS_TEMP_COOLER + case H_COOLER: k = 'L'; break; + #endif + #if HAS_TEMP_BOARD + case H_BOARD: k = 'M'; break; + #endif + #if HAS_TEMP_REDUNDANT + case H_REDUNDANT: k = 'R'; break; #endif } SERIAL_CHAR(' ', k); @@ -3043,79 +3542,53 @@ void Temperature::tick() { SERIAL_ECHOPGM(" /"); SERIAL_PRINT(t, SFP); #if ENABLED(SHOW_TEMP_ADC_VALUES) - SERIAL_ECHOPAIR(" (", r * RECIPROCAL(OVERSAMPLENR)); + // Temperature MAX SPI boards do not have an OVERSAMPLENR defined + SERIAL_ECHOPGM(" (", TERN(HAS_MAXTC_LIBRARIES, k == 'T', false) ? r : r * RECIPROCAL(OVERSAMPLENR)); SERIAL_CHAR(')'); #endif delay(2); } void Temperature::print_heater_states(const uint8_t target_extruder - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - , const bool include_r/*=false*/ - #endif + OPTARG(HAS_TEMP_REDUNDANT, const bool include_r/*=false*/) ) { #if HAS_TEMP_HOTEND - print_heater_state(degHotend(target_extruder), degTargetHotend(target_extruder) - #if ENABLED(SHOW_TEMP_ADC_VALUES) - , rawHotendTemp(target_extruder) - #endif - ); - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - if (include_r) print_heater_state(redundant_temperature, degTargetHotend(target_extruder) - #if ENABLED(SHOW_TEMP_ADC_VALUES) - , redundant_temperature_raw - #endif - , H_REDUNDANT - ); - #endif + print_heater_state(H_E0, degHotend(target_extruder), degTargetHotend(target_extruder) OPTARG(SHOW_TEMP_ADC_VALUES, rawHotendTemp(target_extruder))); #endif #if HAS_HEATED_BED - print_heater_state(degBed(), degTargetBed() - #if ENABLED(SHOW_TEMP_ADC_VALUES) - , rawBedTemp() - #endif - , H_BED - ); + print_heater_state(H_BED, degBed(), degTargetBed() OPTARG(SHOW_TEMP_ADC_VALUES, rawBedTemp())); #endif #if HAS_TEMP_CHAMBER - print_heater_state(degChamber() - #if HAS_HEATED_CHAMBER - , degTargetChamber() - #else - , 0 - #endif - #if ENABLED(SHOW_TEMP_ADC_VALUES) - , rawChamberTemp() - #endif - , H_CHAMBER - ); - #endif // HAS_TEMP_CHAMBER + print_heater_state(H_CHAMBER, degChamber(), TERN0(HAS_HEATED_CHAMBER, degTargetChamber()) OPTARG(SHOW_TEMP_ADC_VALUES, rawChamberTemp())); + #endif + #if HAS_TEMP_COOLER + print_heater_state(H_COOLER, degCooler(), TERN0(HAS_COOLER, degTargetCooler()) OPTARG(SHOW_TEMP_ADC_VALUES, rawCoolerTemp())); + #endif #if HAS_TEMP_PROBE - print_heater_state(degProbe(), 0 - #if ENABLED(SHOW_TEMP_ADC_VALUES) - , rawProbeTemp() - #endif - , H_PROBE - ); - #endif // HAS_TEMP_PROBE + print_heater_state(H_PROBE, degProbe(), 0 OPTARG(SHOW_TEMP_ADC_VALUES, rawProbeTemp())); + #endif + #if HAS_TEMP_BOARD + print_heater_state(H_BOARD, degBoard(), 0 OPTARG(SHOW_TEMP_ADC_VALUES, rawBoardTemp())); + #endif + #if HAS_TEMP_REDUNDANT + if (include_r) print_heater_state(H_REDUNDANT, degRedundant(), degRedundantTarget() OPTARG(SHOW_TEMP_ADC_VALUES, rawRedundantTemp())); + #endif #if HAS_MULTI_HOTEND - HOTEND_LOOP() print_heater_state(degHotend(e), degTargetHotend(e) - #if ENABLED(SHOW_TEMP_ADC_VALUES) - , rawHotendTemp(e) - #endif - , (heater_id_t)e - ); + HOTEND_LOOP() print_heater_state((heater_id_t)e, degHotend(e), degTargetHotend(e) OPTARG(SHOW_TEMP_ADC_VALUES, rawHotendTemp(e))); #endif - SERIAL_ECHOPAIR(" @:", getHeaterPower((heater_id_t)target_extruder)); + SERIAL_ECHOPGM(" @:", getHeaterPower((heater_id_t)target_extruder)); #if HAS_HEATED_BED - SERIAL_ECHOPAIR(" B@:", getHeaterPower(H_BED)); + SERIAL_ECHOPGM(" B@:", getHeaterPower(H_BED)); #endif #if HAS_HEATED_CHAMBER - SERIAL_ECHOPAIR(" C@:", getHeaterPower(H_CHAMBER)); + SERIAL_ECHOPGM(" C@:", getHeaterPower(H_CHAMBER)); + #endif + #if HAS_COOLER + SERIAL_ECHOPGM(" C@:", getHeaterPower(H_COOLER)); #endif #if HAS_MULTI_HOTEND HOTEND_LOOP() { - SERIAL_ECHOPAIR(" @", e); + SERIAL_ECHOPGM(" @", e); SERIAL_CHAR(':'); SERIAL_ECHO(getHeaterPower((heater_id_t)e)); } @@ -3124,20 +3597,17 @@ void Temperature::tick() { #if ENABLED(AUTO_REPORT_TEMPERATURES) AutoReporter Temperature::auto_reporter; - void Temperature::AutoReportTemp::report() { - print_heater_states(active_extruder); - SERIAL_EOL(); - } + void Temperature::AutoReportTemp::report() { print_heater_states(active_extruder); SERIAL_EOL(); } #endif - #if HAS_HOTEND && HAS_DISPLAY + #if HAS_HOTEND && HAS_STATUS_MESSAGE void Temperature::set_heating_message(const uint8_t e) { const bool heating = isHeatingHotend(e); ui.status_printf_P(0, #if HAS_MULTI_HOTEND PSTR("E%c " S_FMT), '1' + e #else - PSTR("E " S_FMT) + PSTR("E1 " S_FMT) #endif , heating ? GET_TEXT(MSG_HEATING) : GET_TEXT(MSG_COOLING) ); @@ -3154,11 +3624,8 @@ void Temperature::tick() { #endif bool Temperature::wait_for_hotend(const uint8_t target_extruder, const bool no_wait_for_cooling/*=true*/ - #if G26_CLICK_CAN_CANCEL - , const bool click_to_cancel/*=false*/ - #endif + OPTARG(G26_CLICK_CAN_CANCEL, const bool click_to_cancel/*=false*/) ) { - #if ENABLED(AUTOTEMP) REMEMBER(1, planner.autotemp_enabled, false); #endif @@ -3178,12 +3645,12 @@ void Temperature::tick() { #endif #if ENABLED(PRINTER_EVENT_LEDS) - const float start_temp = degHotend(target_extruder); + const celsius_float_t start_temp = degHotend(target_extruder); printerEventLEDs.onHotendHeatingStart(); #endif bool wants_to_cool = false; - float target_temp = -1.0, old_temp = 9999.0; + celsius_float_t target_temp = -1.0, old_temp = 9999.0; millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; wait_for_heatup = true; do { @@ -3213,7 +3680,7 @@ void Temperature::tick() { idle(); gcode.reset_stepper_timeout(); // Keep steppers powered - const float temp = degHotend(target_extruder); + const celsius_float_t temp = degHotend(target_extruder); #if ENABLED(PRINTER_EVENT_LEDS) // Gradually change LED strip from violet to red as nozzle heats up @@ -3222,7 +3689,7 @@ void Temperature::tick() { #if TEMP_RESIDENCY_TIME > 0 - const float temp_diff = ABS(target_temp - temp); + const celsius_float_t temp_diff = ABS(target_temp - temp); if (!residency_start_ms) { // Start the TEMP_RESIDENCY_TIME timer when we reach target temp for the first time. @@ -3252,7 +3719,7 @@ void Temperature::tick() { #if G26_CLICK_CAN_CANCEL if (click_to_cancel && ui.use_click()) { wait_for_heatup = false; - ui.quick_feedback(); + TERN_(HAS_LCD_MENU, ui.quick_feedback()); } #endif @@ -3260,13 +3727,12 @@ void Temperature::tick() { if (wait_for_heatup) { wait_for_heatup = false; - #if ENABLED(DWIN_CREALITY_LCD) + #if HAS_DWIN_E3V2_BASIC HMI_flag.heat_flag = 0; duration_t elapsed = print_job_timer.duration(); // print timer dwin_heat_time = elapsed.value; - #else - ui.reset_status(); #endif + ui.reset_status(); TERN_(PRINTER_EVENT_LEDS, printerEventLEDs.onHeatingDone()); return true; } @@ -3274,6 +3740,17 @@ void Temperature::tick() { return false; } + #if ENABLED(WAIT_FOR_HOTEND) + void Temperature::wait_for_hotend_heating(const uint8_t target_extruder) { + if (isHeatingHotend(target_extruder)) { + SERIAL_ECHOLNPGM("Wait for hotend heating..."); + LCD_MESSAGEPGM(MSG_HEATING); + wait_for_hotend(target_extruder); + ui.reset_status(); + } + } + #endif + #endif // HAS_TEMP_HOTEND #if HAS_HEATED_BED @@ -3286,9 +3763,7 @@ void Temperature::tick() { #endif bool Temperature::wait_for_bed(const bool no_wait_for_cooling/*=true*/ - #if G26_CLICK_CAN_CANCEL - , const bool click_to_cancel/*=false*/ - #endif + OPTARG(G26_CLICK_CAN_CANCEL, const bool click_to_cancel/*=false*/) ) { #if TEMP_BED_RESIDENCY_TIME > 0 millis_t residency_start_ms = 0; @@ -3305,12 +3780,12 @@ void Temperature::tick() { #endif #if ENABLED(PRINTER_EVENT_LEDS) - const float start_temp = degBed(); + const celsius_float_t start_temp = degBed(); printerEventLEDs.onBedHeatingStart(); #endif bool wants_to_cool = false; - float target_temp = -1, old_temp = 9999; + celsius_float_t target_temp = -1, old_temp = 9999; millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; wait_for_heatup = true; do { @@ -3340,7 +3815,7 @@ void Temperature::tick() { idle(); gcode.reset_stepper_timeout(); // Keep steppers powered - const float temp = degBed(); + const celsius_float_t temp = degBed(); #if ENABLED(PRINTER_EVENT_LEDS) // Gradually change LED strip from blue to violet as bed heats up @@ -3349,7 +3824,7 @@ void Temperature::tick() { #if TEMP_BED_RESIDENCY_TIME > 0 - const float temp_diff = ABS(target_temp - temp); + const celsius_float_t temp_diff = ABS(target_temp - temp); if (!residency_start_ms) { // Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time. @@ -3377,7 +3852,7 @@ void Temperature::tick() { #if G26_CLICK_CAN_CANCEL if (click_to_cancel && ui.use_click()) { wait_for_heatup = false; - ui.quick_feedback(); + TERN_(HAS_LCD_MENU, ui.quick_feedback()); } #endif @@ -3416,12 +3891,12 @@ void Temperature::tick() { #define MIN_DELTA_SLOPE_TIME_PROBE 600 #endif - bool Temperature::wait_for_probe(const float target_temp, bool no_wait_for_cooling/*=true*/) { + bool Temperature::wait_for_probe(const celsius_t target_temp, bool no_wait_for_cooling/*=true*/) { - const bool wants_to_cool = isProbeAboveTemp(target_temp); - const bool will_wait = !(wants_to_cool && no_wait_for_cooling); + const bool wants_to_cool = isProbeAboveTemp(target_temp), + will_wait = !(wants_to_cool && no_wait_for_cooling); if (will_wait) - SERIAL_ECHOLNPAIR("Waiting for probe to ", (wants_to_cool ? PSTR("cool down") : PSTR("heat up")), " to ", target_temp, " degrees."); + SERIAL_ECHOLNPGM("Waiting for probe to ", (wants_to_cool ? PSTR("cool down") : PSTR("heat up")), " to ", target_temp, " degrees."); #if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE) KEEPALIVE_STATE(NOT_BUSY); @@ -3575,4 +4050,103 @@ void Temperature::tick() { #endif // HAS_HEATED_CHAMBER + #if HAS_COOLER + + #ifndef MIN_COOLING_SLOPE_DEG_COOLER + #define MIN_COOLING_SLOPE_DEG_COOLER 1.50 + #endif + #ifndef MIN_COOLING_SLOPE_TIME_COOLER + #define MIN_COOLING_SLOPE_TIME_COOLER 120 + #endif + + bool Temperature::wait_for_cooler(const bool no_wait_for_cooling/*=true*/) { + + #if TEMP_COOLER_RESIDENCY_TIME > 0 + millis_t residency_start_ms = 0; + bool first_loop = true; + // Loop until the temperature has stabilized + #define TEMP_COOLER_CONDITIONS (!residency_start_ms || PENDING(now, residency_start_ms + SEC_TO_MS(TEMP_COOLER_RESIDENCY_TIME))) + #else + // Loop until the temperature is very close target + #define TEMP_COOLER_CONDITIONS (wants_to_cool ? isLaserHeating() : isLaserCooling()) + #endif + + #if DISABLED(BUSY_WHILE_HEATING) && ENABLED(HOST_KEEPALIVE_FEATURE) + KEEPALIVE_STATE(NOT_BUSY); + #endif + + bool wants_to_cool = false; + float target_temp = -1, previous_temp = 9999; + millis_t now, next_temp_ms = 0, next_cooling_check_ms = 0; + wait_for_heatup = true; + do { + // Target temperature might be changed during the loop + if (target_temp != degTargetCooler()) { + wants_to_cool = isLaserHeating(); + target_temp = degTargetCooler(); + + // Exit if S, continue if S, R, or R + if (no_wait_for_cooling && wants_to_cool) break; + } + + now = millis(); + if (ELAPSED(now, next_temp_ms)) { // Print Temp Reading every 1 second while heating up. + next_temp_ms = now + 1000UL; + print_heater_states(active_extruder); + #if TEMP_COOLER_RESIDENCY_TIME > 0 + SERIAL_ECHOPGM(" W:"); + if (residency_start_ms) + SERIAL_ECHO(long((SEC_TO_MS(TEMP_COOLER_RESIDENCY_TIME) - (now - residency_start_ms)) / 1000UL)); + else + SERIAL_CHAR('?'); + #endif + SERIAL_EOL(); + } + + idle(); + gcode.reset_stepper_timeout(); // Keep steppers powered + + const celsius_float_t current_temp = degCooler(); + + #if TEMP_COOLER_RESIDENCY_TIME > 0 + + const celsius_float_t temp_diff = ABS(target_temp - temp); + + if (!residency_start_ms) { + // Start the TEMP_COOLER_RESIDENCY_TIME timer when we reach target temp for the first time. + if (temp_diff < TEMP_COOLER_WINDOW) + residency_start_ms = now + (first_loop ? SEC_TO_MS(TEMP_COOLER_RESIDENCY_TIME) / 3 : 0); + } + else if (temp_diff > TEMP_COOLER_HYSTERESIS) { + // Restart the timer whenever the temperature falls outside the hysteresis. + residency_start_ms = now; + } + + first_loop = false; + #endif // TEMP_COOLER_RESIDENCY_TIME > 0 + + if (wants_to_cool) { + // Break after MIN_COOLING_SLOPE_TIME_CHAMBER seconds + // if the temperature did not drop at least MIN_COOLING_SLOPE_DEG_CHAMBER + if (!next_cooling_check_ms || ELAPSED(now, next_cooling_check_ms)) { + if (previous_temp - current_temp < float(MIN_COOLING_SLOPE_DEG_COOLER)) break; + next_cooling_check_ms = now + SEC_TO_MS(MIN_COOLING_SLOPE_TIME_COOLER); + previous_temp = current_temp; + } + } + + } while (wait_for_heatup && TEMP_COOLER_CONDITIONS); + + // Prevent a wait-forever situation if R is misused i.e. M191 R0 + if (wait_for_heatup) { + wait_for_heatup = false; + ui.reset_status(); + return true; + } + + return false; + } + + #endif // HAS_COOLER + #endif // HAS_TEMP_SENSOR diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 002e1cbf71f5..1675507f8616 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -44,11 +44,15 @@ #define HOTEND_INDEX TERN(HAS_MULTI_HOTEND, e, 0) #define E_NAME TERN_(HAS_MULTI_HOTEND, e) -// Heater identifiers. Positive values are hotends. Negative values are other heaters. +// Element identifiers. Positive values are hotends. Negative values are other heaters or coolers. typedef enum : int8_t { - INDEX_NONE = -5, - H_PROBE, H_REDUNDANT, H_CHAMBER, H_BED, - H_E0, H_E1, H_E2, H_E3, H_E4, H_E5, H_E6, H_E7 + H_REDUNDANT = HID_REDUNDANT, + H_COOLER = HID_COOLER, + H_PROBE = HID_PROBE, + H_BOARD = HID_BOARD, + H_CHAMBER = HID_CHAMBER, + H_BED = HID_BED, + H_E0 = HID_E0, H_E1, H_E2, H_E3, H_E4, H_E5, H_E6, H_E7 } heater_id_t; // PID storage @@ -99,9 +103,18 @@ enum ADCSensorState : char { #if HAS_TEMP_ADC_CHAMBER PrepareTemp_CHAMBER, MeasureTemp_CHAMBER, #endif + #if HAS_TEMP_ADC_COOLER + PrepareTemp_COOLER, MeasureTemp_COOLER, + #endif #if HAS_TEMP_ADC_PROBE PrepareTemp_PROBE, MeasureTemp_PROBE, #endif + #if HAS_TEMP_ADC_BOARD + PrepareTemp_BOARD, MeasureTemp_BOARD, + #endif + #if HAS_TEMP_ADC_REDUNDANT + PrepareTemp_REDUNDANT, MeasureTemp_REDUNDANT, + #endif #if HAS_TEMP_ADC_1 PrepareTemp_1, MeasureTemp_1, #endif @@ -168,7 +181,7 @@ enum ADCSensorState : char { #define unscalePID_d(d) ( float(d) * PID_dT ) #endif -#if BOTH(HAS_LCD_MENU, G26_MESH_VALIDATION) +#if ENABLED(G26_MESH_VALIDATION) && EITHER(HAS_LCD_MENU, EXTENSIBLE_UI) #define G26_CLICK_CAN_CANCEL 1 #endif @@ -176,15 +189,22 @@ enum ADCSensorState : char { typedef struct TempInfo { uint16_t acc; int16_t raw; - float celsius; + celsius_float_t celsius; inline void reset() { acc = 0; } inline void sample(const uint16_t s) { acc += s; } inline void update() { raw = acc; } } temp_info_t; +#if HAS_TEMP_REDUNDANT + // A redundant temperature sensor + typedef struct RedundantTempInfo : public TempInfo { + temp_info_t* target; + } redundant_info_t; +#endif + // A PWM heater with temperature sensor typedef struct HeaterInfo : public TempInfo { - int16_t target; + celsius_t target; uint8_t soft_pwm_amount; } heater_info_t; @@ -210,22 +230,34 @@ struct PIDHeaterInfo : public HeaterInfo { typedef temp_info_t probe_info_t; #endif #if HAS_HEATED_CHAMBER - typedef heater_info_t chamber_info_t; + #if ENABLED(PIDTEMPCHAMBER) + typedef struct PIDHeaterInfo chamber_info_t; + #else + typedef heater_info_t chamber_info_t; + #endif #elif HAS_TEMP_CHAMBER typedef temp_info_t chamber_info_t; #endif +#if HAS_TEMP_BOARD + typedef temp_info_t board_info_t; +#endif +#if EITHER(HAS_COOLER, HAS_TEMP_COOLER) + typedef heater_info_t cooler_info_t; +#endif // Heater watch handling template struct HeaterWatch { - uint16_t target; + celsius_t target; millis_t next_ms; inline bool elapsed(const millis_t &ms) { return next_ms && ELAPSED(ms, next_ms); } inline bool elapsed() { return elapsed(millis()); } - inline void restart(const int16_t curr, const int16_t tgt) { + inline bool check(const celsius_t curr) { return curr >= target; } + + inline void restart(const celsius_t curr, const celsius_t tgt) { if (tgt) { - const int16_t newtarget = curr + INCREASE; + const celsius_t newtarget = curr + INCREASE; if (newtarget < tgt - HYSTERESIS - 1) { target = newtarget; next_ms = millis() + SEC_TO_MS(PERIOD); @@ -245,11 +277,14 @@ struct HeaterWatch { #if WATCH_CHAMBER typedef struct HeaterWatch chamber_watch_t; #endif +#if WATCH_COOLER + typedef struct HeaterWatch cooler_watch_t; +#endif // Temperature sensor read value ranges typedef struct { int16_t raw_min, raw_max; } raw_range_t; -typedef struct { int16_t mintemp, maxtemp; } celsius_range_t; -typedef struct { int16_t raw_min, raw_max, mintemp, maxtemp; } temp_range_t; +typedef struct { celsius_t mintemp, maxtemp; } celsius_range_t; +typedef struct { int16_t raw_min, raw_max; celsius_t mintemp, maxtemp; } temp_range_t; #define THERMISTOR_ABS_ZERO_C -273.15f // bbbbrrrrr cold ! #define THERMISTOR_RESISTANCE_NOMINAL_C 25.0f // mmmmm comfortable @@ -257,33 +292,42 @@ typedef struct { int16_t raw_min, raw_max, mintemp, maxtemp; } temp_range_t; #if HAS_USER_THERMISTORS enum CustomThermistorIndex : uint8_t { - #if HEATER_0_USER_THERMISTOR + #if TEMP_SENSOR_0_IS_CUSTOM CTI_HOTEND_0, #endif - #if HEATER_1_USER_THERMISTOR + #if TEMP_SENSOR_1_IS_CUSTOM CTI_HOTEND_1, #endif - #if HEATER_2_USER_THERMISTOR + #if TEMP_SENSOR_2_IS_CUSTOM CTI_HOTEND_2, #endif - #if HEATER_3_USER_THERMISTOR + #if TEMP_SENSOR_3_IS_CUSTOM CTI_HOTEND_3, #endif - #if HEATER_4_USER_THERMISTOR + #if TEMP_SENSOR_4_IS_CUSTOM CTI_HOTEND_4, #endif - #if HEATER_5_USER_THERMISTOR + #if TEMP_SENSOR_5_IS_CUSTOM CTI_HOTEND_5, #endif - #if HEATER_BED_USER_THERMISTOR + #if TEMP_SENSOR_BED_IS_CUSTOM CTI_BED, #endif - #if HEATER_PROBE_USER_THERMISTOR + #if TEMP_SENSOR_PROBE_IS_CUSTOM CTI_PROBE, #endif - #if HEATER_CHAMBER_USER_THERMISTOR + #if TEMP_SENSOR_CHAMBER_IS_CUSTOM CTI_CHAMBER, #endif + #if TEMP_SENSOR_COOLER_IS_CUSTOM + CTI_COOLER, + #endif + #if TEMP_SENSOR_BOARD_IS_CUSTOM + CTI_BOARD, + #endif + #if TEMP_SENSOR_REDUNDANT_IS_CUSTOM + CTI_REDUNDANT, + #endif USER_THERMISTORS }; @@ -305,16 +349,38 @@ class Temperature { public: #if HAS_HOTEND - #define HOTEND_TEMPS (HOTENDS + ENABLED(TEMP_SENSOR_1_AS_REDUNDANT)) - static hotend_info_t temp_hotend[HOTEND_TEMPS]; - static const uint16_t heater_maxtemp[HOTENDS]; + static hotend_info_t temp_hotend[HOTENDS]; + static const celsius_t hotend_maxtemp[HOTENDS]; + static inline celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); } + #endif + #if HAS_HEATED_BED + static bed_info_t temp_bed; + #endif + #if HAS_TEMP_PROBE + static probe_info_t temp_probe; + #endif + #if HAS_TEMP_CHAMBER + static chamber_info_t temp_chamber; + #endif + #if HAS_TEMP_COOLER + static cooler_info_t temp_cooler; + #endif + #if HAS_TEMP_BOARD + static board_info_t temp_board; + #endif + #if HAS_TEMP_REDUNDANT + static redundant_info_t temp_redundant; #endif - TERN_(HAS_HEATED_BED, static bed_info_t temp_bed); - TERN_(HAS_TEMP_PROBE, static probe_info_t temp_probe); - TERN_(HAS_TEMP_CHAMBER, static chamber_info_t temp_chamber); - TERN_(AUTO_POWER_E_FANS, static uint8_t autofan_speed[HOTENDS]); - TERN_(AUTO_POWER_CHAMBER_FAN, static uint8_t chamberfan_speed); + #if ENABLED(AUTO_POWER_E_FANS) + static uint8_t autofan_speed[HOTENDS]; + #endif + #if ENABLED(AUTO_POWER_CHAMBER_FAN) + static uint8_t chamberfan_speed; + #endif + #if ENABLED(AUTO_POWER_COOLER_FAN) + static uint8_t coolerfan_speed; + #endif #if ENABLED(FAN_SOFT_PWM) static uint8_t soft_pwm_amount_fan[FAN_COUNT], @@ -323,25 +389,23 @@ class Temperature { #if ENABLED(PREVENT_COLD_EXTRUSION) static bool allow_cold_extrude; - static int16_t extrude_min_temp; - FORCE_INLINE static bool tooCold(const int16_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp - (TEMP_WINDOW); } - FORCE_INLINE static bool tooColdToExtrude(const uint8_t E_NAME) { - return tooCold(degHotend(HOTEND_INDEX)); - } - FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t E_NAME) { - return tooCold(degTargetHotend(HOTEND_INDEX)); - } + static celsius_t extrude_min_temp; + static inline bool tooCold(const celsius_t temp) { return allow_cold_extrude ? false : temp < extrude_min_temp - (TEMP_WINDOW); } + static inline bool tooColdToExtrude(const uint8_t E_NAME) { return tooCold(wholeDegHotend(HOTEND_INDEX)); } + static inline bool targetTooColdToExtrude(const uint8_t E_NAME) { return tooCold(degTargetHotend(HOTEND_INDEX)); } #else - FORCE_INLINE static bool tooColdToExtrude(const uint8_t) { return false; } - FORCE_INLINE static bool targetTooColdToExtrude(const uint8_t) { return false; } + static inline bool tooColdToExtrude(const uint8_t) { return false; } + static inline bool targetTooColdToExtrude(const uint8_t) { return false; } #endif - FORCE_INLINE static bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); } - FORCE_INLINE static bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); } + static inline bool hotEnoughToExtrude(const uint8_t e) { return !tooColdToExtrude(e); } + static inline bool targetHotEnoughToExtrude(const uint8_t e) { return !targetTooColdToExtrude(e); } - #if ENABLED(SINGLENOZZLE_STANDBY_FAN) - static uint16_t singlenozzle_temp[EXTRUDERS]; - #if HAS_FAN + #if EITHER(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) + #if ENABLED(SINGLENOZZLE_STANDBY_TEMP) + static celsius_t singlenozzle_temp[EXTRUDERS]; + #endif + #if ENABLED(SINGLENOZZLE_STANDBY_FAN) static uint8_t singlenozzle_fan_speed[EXTRUDERS]; #endif static void singlenozzle_change(const uint8_t old_tool, const uint8_t new_tool); @@ -360,39 +424,41 @@ class Temperature { } heater_idle_t; // Indices and size for the heater_idle array - #define _ENUM_FOR_E(N) IDLE_INDEX_E##N, - enum IdleIndex : uint8_t { - REPEAT(HOTENDS, _ENUM_FOR_E) - #if ENABLED(HAS_HEATED_BED) - IDLE_INDEX_BED, - #endif - NR_HEATER_IDLE + enum IdleIndex : int8_t { + _II = -1 + + #define _IDLE_INDEX_E(N) ,IDLE_INDEX_E##N + REPEAT(HOTENDS, _IDLE_INDEX_E) + #undef _IDLE_INDEX_E + + OPTARG(HAS_HEATED_BED, IDLE_INDEX_BED) + + , NR_HEATER_IDLE }; - #undef _ENUM_FOR_E // Convert the given heater_id_t to idle array index static inline IdleIndex idle_index_for_id(const int8_t heater_id) { - #if HAS_HEATED_BED - if (heater_id == H_BED) return IDLE_INDEX_BED; - #endif + TERN_(HAS_HEATED_BED, if (heater_id == H_BED) return IDLE_INDEX_BED); return (IdleIndex)_MAX(heater_id, 0); } static heater_idle_t heater_idle[NR_HEATER_IDLE]; - #endif - - private: + #endif // HEATER_IDLE_TIMER - TERN_(EARLY_WATCHDOG, static bool inited); // If temperature controller is running + #if HAS_ADC_BUTTONS + static uint32_t current_ADCKey_raw; + static uint16_t ADCKey_count; + #endif - static volatile bool raw_temps_ready; + #if ENABLED(PID_EXTRUSION_SCALING) + static int16_t lpq_len; + #endif - TERN_(WATCH_HOTENDS, static hotend_watch_t watch_hotend[HOTENDS]); + private: - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - static uint16_t redundant_temperature_raw; - static float redundant_temperature; + #if ENABLED(WATCH_HOTENDS) + static hotend_watch_t watch_hotend[HOTENDS]; #endif #if ENABLED(PID_EXTRUSION_SCALING) @@ -400,50 +466,55 @@ class Temperature { static lpq_ptr_t lpq_ptr; #endif - TERN_(HAS_HOTEND, static temp_range_t temp_range[HOTENDS]); + #if HAS_HOTEND + static temp_range_t temp_range[HOTENDS]; + #endif #if HAS_HEATED_BED - TERN_(WATCH_BED, static bed_watch_t watch_bed); - IF_DISABLED(PIDTEMPBED, static millis_t next_bed_check_ms); - #ifdef BED_MINTEMP - static int16_t mintemp_raw_BED; - #endif - #ifdef BED_MAXTEMP - static int16_t maxtemp_raw_BED; + #if ENABLED(WATCH_BED) + static bed_watch_t watch_bed; #endif + IF_DISABLED(PIDTEMPBED, static millis_t next_bed_check_ms); + static int16_t mintemp_raw_BED, maxtemp_raw_BED; #endif #if HAS_HEATED_CHAMBER - TERN_(WATCH_CHAMBER, static chamber_watch_t watch_chamber); - static millis_t next_chamber_check_ms; - #ifdef CHAMBER_MINTEMP - static int16_t mintemp_raw_CHAMBER; + #if ENABLED(WATCH_CHAMBER) + static chamber_watch_t watch_chamber; #endif - #ifdef CHAMBER_MAXTEMP - static int16_t maxtemp_raw_CHAMBER; + TERN(PIDTEMPCHAMBER,,static millis_t next_chamber_check_ms); + static int16_t mintemp_raw_CHAMBER, maxtemp_raw_CHAMBER; + #endif + + #if HAS_COOLER + #if ENABLED(WATCH_COOLER) + static cooler_watch_t watch_cooler; #endif + static millis_t next_cooler_check_ms, cooler_fan_flush_ms; + static int16_t mintemp_raw_COOLER, maxtemp_raw_COOLER; + #endif + + #if HAS_TEMP_BOARD && ENABLED(THERMAL_PROTECTION_BOARD) + static int16_t mintemp_raw_BOARD, maxtemp_raw_BOARD; #endif - #ifdef MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED + #if MAX_CONSECUTIVE_LOW_TEMPERATURE_ERROR_ALLOWED > 1 static uint8_t consecutive_low_temperature_error[HOTENDS]; #endif - #ifdef MILLISECONDS_PREHEAT_TIME + #if MILLISECONDS_PREHEAT_TIME > 0 static millis_t preheat_end_time[HOTENDS]; #endif - TERN_(HAS_AUTO_FAN, static millis_t next_auto_fan_check_ms); - - TERN_(PROBING_HEATERS_OFF, static bool paused); - - public: - #if HAS_ADC_BUTTONS - static uint32_t current_ADCKey_raw; - static uint16_t ADCKey_count; + #if HAS_AUTO_FAN + static millis_t next_auto_fan_check_ms; #endif - TERN_(PID_EXTRUSION_SCALING, static int16_t lpq_len); + #if ENABLED(PROBING_HEATERS_OFF) + static bool paused_for_probing; + #endif + public: /** * Instance Methods */ @@ -456,28 +527,28 @@ class Temperature { #if HAS_USER_THERMISTORS static user_thermistor_t user_thermistor[USER_THERMISTORS]; - static void log_user_thermistor(const uint8_t t_index, const bool eprom=false); + static void M305_report(const uint8_t t_index, const bool forReplay=true); static void reset_user_thermistors(); - static float user_thermistor_to_deg_c(const uint8_t t_index, const int raw); - static bool set_pull_up_res(int8_t t_index, float value) { + static celsius_float_t user_thermistor_to_deg_c(const uint8_t t_index, const int16_t raw); + static inline bool set_pull_up_res(int8_t t_index, float value) { //if (!WITHIN(t_index, 0, USER_THERMISTORS - 1)) return false; if (!WITHIN(value, 1, 1000000)) return false; user_thermistor[t_index].series_res = value; return true; } - static bool set_res25(int8_t t_index, float value) { + static inline bool set_res25(int8_t t_index, float value) { if (!WITHIN(value, 1, 10000000)) return false; user_thermistor[t_index].res_25 = value; user_thermistor[t_index].pre_calc = true; return true; } - static bool set_beta(int8_t t_index, float value) { + static inline bool set_beta(int8_t t_index, float value) { if (!WITHIN(value, 1, 1000000)) return false; user_thermistor[t_index].beta = value; user_thermistor[t_index].pre_calc = true; return true; } - static bool set_sh_coeff(int8_t t_index, float value) { + static inline bool set_sh_coeff(int8_t t_index, float value) { if (!WITHIN(value, -0.01f, 0.01f)) return false; user_thermistor[t_index].sh_c_coeff = value; user_thermistor[t_index].pre_calc = true; @@ -486,17 +557,25 @@ class Temperature { #endif #if HAS_HOTEND - static float analog_to_celsius_hotend(const int raw, const uint8_t e); + static celsius_float_t analog_to_celsius_hotend(const int16_t raw, const uint8_t e); #endif - #if HAS_HEATED_BED - static float analog_to_celsius_bed(const int raw); + static celsius_float_t analog_to_celsius_bed(const int16_t raw); #endif #if HAS_TEMP_PROBE - static float analog_to_celsius_probe(const int raw); + static celsius_float_t analog_to_celsius_probe(const int16_t raw); #endif #if HAS_TEMP_CHAMBER - static float analog_to_celsius_chamber(const int raw); + static celsius_float_t analog_to_celsius_chamber(const int16_t raw); + #endif + #if HAS_TEMP_COOLER + static celsius_float_t analog_to_celsius_cooler(const int16_t raw); + #endif + #if HAS_TEMP_BOARD + static celsius_float_t analog_to_celsius_board(const int16_t raw); + #endif + #if HAS_TEMP_REDUNDANT + static celsius_float_t analog_to_celsius_redundant(const int16_t raw); #endif #if HAS_FAN @@ -504,10 +583,10 @@ class Temperature { static uint8_t fan_speed[FAN_COUNT]; #define FANS_LOOP(I) LOOP_L_N(I, FAN_COUNT) - static void set_fan_speed(const uint8_t target, const uint16_t speed); + static void set_fan_speed(const uint8_t fan, const uint16_t speed); #if ENABLED(REPORT_FAN_CHANGE) - static void report_fan_speed(const uint8_t target); + static void report_fan_speed(const uint8_t fan); #endif #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) @@ -515,22 +594,27 @@ class Temperature { static uint8_t saved_fan_speed[FAN_COUNT]; #endif - static constexpr inline uint8_t fanPercent(const uint8_t speed) { return ui8_to_percent(speed); } - - TERN_(ADAPTIVE_FAN_SLOWING, static uint8_t fan_speed_scaler[FAN_COUNT]); + #if ENABLED(ADAPTIVE_FAN_SLOWING) + static uint8_t fan_speed_scaler[FAN_COUNT]; + #endif - static inline uint8_t scaledFanSpeed(const uint8_t target, const uint8_t fs) { - UNUSED(target); // Potentially unused! - return (fs * uint16_t(TERN(ADAPTIVE_FAN_SLOWING, fan_speed_scaler[target], 128))) >> 7; + static inline uint8_t scaledFanSpeed(const uint8_t fan, const uint8_t fs) { + UNUSED(fan); // Potentially unused! + return (fs * uint16_t(TERN(ADAPTIVE_FAN_SLOWING, fan_speed_scaler[fan], 128))) >> 7; } - static inline uint8_t scaledFanSpeed(const uint8_t target) { - return scaledFanSpeed(target, fan_speed[target]); + static inline uint8_t scaledFanSpeed(const uint8_t fan) { + return scaledFanSpeed(fan, fan_speed[fan]); } + static constexpr inline uint8_t pwmToPercent(const uint8_t speed) { return ui8_to_percent(speed); } + static inline uint8_t fanSpeedPercent(const uint8_t fan) { return ui8_to_percent(fan_speed[fan]); } + static inline uint8_t scaledFanSpeedPercent(const uint8_t fan) { return ui8_to_percent(scaledFanSpeed(fan)); } + #if ENABLED(EXTRA_FAN_SPEED) - static uint8_t old_fan_speed[FAN_COUNT], new_fan_speed[FAN_COUNT]; - static void set_temp_fan_speed(const uint8_t fan, const uint16_t tmp_temp); + typedef struct { uint8_t saved, speed; } extra_fan_t; + static extra_fan_t extra_fan_speed[FAN_COUNT]; + static void set_temp_fan_speed(const uint8_t fan, const uint16_t command_or_speed); #endif #if EITHER(PROBING_FANS_OFF, ADVANCED_PAUSE_FANS_PAUSE) @@ -548,8 +632,8 @@ class Temperature { /** * Called from the Temperature ISR */ + static void isr(); static void readings_ready(); - static void tick(); /** * Call periodically to manage heaters @@ -559,14 +643,14 @@ class Temperature { /** * Preheating hotends */ - #ifdef MILLISECONDS_PREHEAT_TIME - static bool is_preheating(const uint8_t E_NAME) { + #if MILLISECONDS_PREHEAT_TIME > 0 + static inline bool is_preheating(const uint8_t E_NAME) { return preheat_end_time[HOTEND_INDEX] && PENDING(millis(), preheat_end_time[HOTEND_INDEX]); } - static void start_preheat_time(const uint8_t E_NAME) { + static inline void start_preheat_time(const uint8_t E_NAME) { preheat_end_time[HOTEND_INDEX] = millis() + MILLISECONDS_PREHEAT_TIME; } - static void reset_preheat_time(const uint8_t E_NAME) { + static inline void reset_preheat_time(const uint8_t E_NAME) { preheat_end_time[HOTEND_INDEX] = 0; } #else @@ -577,63 +661,71 @@ class Temperature { //inline so that there is no performance decrease. //deg=degreeCelsius - FORCE_INLINE static float degHotend(const uint8_t E_NAME) { + static inline celsius_float_t degHotend(const uint8_t E_NAME) { return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].celsius); } + static inline celsius_t wholeDegHotend(const uint8_t E_NAME) { + return TERN0(HAS_HOTEND, static_cast(temp_hotend[HOTEND_INDEX].celsius + 0.5f)); + } + #if ENABLED(SHOW_TEMP_ADC_VALUES) - FORCE_INLINE static int16_t rawHotendTemp(const uint8_t E_NAME) { + static inline int16_t rawHotendTemp(const uint8_t E_NAME) { return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].raw); } #endif - FORCE_INLINE static int16_t degTargetHotend(const uint8_t E_NAME) { + static inline celsius_t degTargetHotend(const uint8_t E_NAME) { return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].target); } - #if WATCH_HOTENDS - static void start_watching_hotend(const uint8_t e=0); - #else - static inline void start_watching_hotend(const uint8_t=0) {} - #endif - #if HAS_HOTEND - static void setTargetHotend(const int16_t celsius, const uint8_t E_NAME) { + static void setTargetHotend(const celsius_t celsius, const uint8_t E_NAME) { const uint8_t ee = HOTEND_INDEX; - #ifdef MILLISECONDS_PREHEAT_TIME + #if MILLISECONDS_PREHEAT_TIME > 0 if (celsius == 0) reset_preheat_time(ee); else if (temp_hotend[ee].target == 0) start_preheat_time(ee); #endif TERN_(AUTO_POWER_CONTROL, if (celsius) powerManager.power_on()); - temp_hotend[ee].target = _MIN(celsius, temp_range[ee].maxtemp - HOTEND_OVERSHOOT); + temp_hotend[ee].target = _MIN(celsius, hotend_max_target(ee)); start_watching_hotend(ee); } - FORCE_INLINE static bool isHeatingHotend(const uint8_t E_NAME) { + static inline bool isHeatingHotend(const uint8_t E_NAME) { return temp_hotend[HOTEND_INDEX].target > temp_hotend[HOTEND_INDEX].celsius; } - FORCE_INLINE static bool isCoolingHotend(const uint8_t E_NAME) { + static inline bool isCoolingHotend(const uint8_t E_NAME) { return temp_hotend[HOTEND_INDEX].target < temp_hotend[HOTEND_INDEX].celsius; } #if HAS_TEMP_HOTEND static bool wait_for_hotend(const uint8_t target_extruder, const bool no_wait_for_cooling=true - #if G26_CLICK_CAN_CANCEL - , const bool click_to_cancel=false - #endif + OPTARG(G26_CLICK_CAN_CANCEL, const bool click_to_cancel=false) ); + + #if ENABLED(WAIT_FOR_HOTEND) + static void wait_for_hotend_heating(const uint8_t target_extruder); + #endif #endif - FORCE_INLINE static bool still_heating(const uint8_t e) { - return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(degHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS; + static inline bool still_heating(const uint8_t e) { + return degTargetHotend(e) > TEMP_HYSTERESIS && ABS(wholeDegHotend(e) - degTargetHotend(e)) > TEMP_HYSTERESIS; + } + + static inline bool degHotendNear(const uint8_t e, const celsius_t temp) { + return ABS(wholeDegHotend(e) - temp) < (TEMP_HYSTERESIS); } - FORCE_INLINE static bool degHotendNear(const uint8_t e, const float &temp) { - return ABS(degHotend(e) - temp) < (TEMP_HYSTERESIS); + // Start watching a Hotend to make sure it's really heating up + static inline void start_watching_hotend(const uint8_t E_NAME) { + UNUSED(HOTEND_INDEX); + #if WATCH_HOTENDS + watch_hotend[HOTEND_INDEX].restart(degHotend(HOTEND_INDEX), degTargetHotend(HOTEND_INDEX)); + #endif } #endif // HAS_HOTEND @@ -641,92 +733,109 @@ class Temperature { #if HAS_HEATED_BED #if ENABLED(SHOW_TEMP_ADC_VALUES) - FORCE_INLINE static int16_t rawBedTemp() { return temp_bed.raw; } + static inline int16_t rawBedTemp() { return temp_bed.raw; } #endif - FORCE_INLINE static float degBed() { return temp_bed.celsius; } - FORCE_INLINE static int16_t degTargetBed() { return temp_bed.target; } - FORCE_INLINE static bool isHeatingBed() { return temp_bed.target > temp_bed.celsius; } - FORCE_INLINE static bool isCoolingBed() { return temp_bed.target < temp_bed.celsius; } + static inline celsius_float_t degBed() { return temp_bed.celsius; } + static inline celsius_t wholeDegBed() { return static_cast(degBed() + 0.5f); } + static inline celsius_t degTargetBed() { return temp_bed.target; } + static inline bool isHeatingBed() { return temp_bed.target > temp_bed.celsius; } + static inline bool isCoolingBed() { return temp_bed.target < temp_bed.celsius; } - #if WATCH_BED - static void start_watching_bed(); - #else - static inline void start_watching_bed() {} - #endif + // Start watching the Bed to make sure it's really heating up + static inline void start_watching_bed() { TERN_(WATCH_BED, watch_bed.restart(degBed(), degTargetBed())); } - static void setTargetBed(const int16_t celsius) { + static void setTargetBed(const celsius_t celsius) { TERN_(AUTO_POWER_CONTROL, if (celsius) powerManager.power_on()); - temp_bed.target = - #ifdef BED_MAX_TARGET - _MIN(celsius, BED_MAX_TARGET) - #else - celsius - #endif - ; + temp_bed.target = _MIN(celsius, BED_MAX_TARGET); start_watching_bed(); } static bool wait_for_bed(const bool no_wait_for_cooling=true - #if G26_CLICK_CAN_CANCEL - , const bool click_to_cancel=false - #endif + OPTARG(G26_CLICK_CAN_CANCEL, const bool click_to_cancel=false) ); static void wait_for_bed_heating(); - FORCE_INLINE static bool degBedNear(const float &temp) { - return ABS(degBed() - temp) < (TEMP_BED_HYSTERESIS); + static inline bool degBedNear(const celsius_t temp) { + return ABS(wholeDegBed() - temp) < (TEMP_BED_HYSTERESIS); } #endif // HAS_HEATED_BED #if HAS_TEMP_PROBE #if ENABLED(SHOW_TEMP_ADC_VALUES) - FORCE_INLINE static int16_t rawProbeTemp() { return temp_probe.raw; } + static inline int16_t rawProbeTemp() { return temp_probe.raw; } #endif - FORCE_INLINE static float degProbe() { return temp_probe.celsius; } - FORCE_INLINE static bool isProbeBelowTemp(const float target_temp) { return temp_probe.celsius < target_temp; } - FORCE_INLINE static bool isProbeAboveTemp(const float target_temp) { return temp_probe.celsius > target_temp; } - static bool wait_for_probe(const float target_temp, bool no_wait_for_cooling=true); - #endif - - #if WATCH_PROBE - static void start_watching_probe(); - #else - static inline void start_watching_probe() {} + static inline celsius_float_t degProbe() { return temp_probe.celsius; } + static inline celsius_t wholeDegProbe() { return static_cast(degProbe() + 0.5f); } + static inline bool isProbeBelowTemp(const celsius_t target_temp) { return wholeDegProbe() < target_temp; } + static inline bool isProbeAboveTemp(const celsius_t target_temp) { return wholeDegProbe() > target_temp; } + static bool wait_for_probe(const celsius_t target_temp, bool no_wait_for_cooling=true); #endif #if HAS_TEMP_CHAMBER #if ENABLED(SHOW_TEMP_ADC_VALUES) - FORCE_INLINE static int16_t rawChamberTemp() { return temp_chamber.raw; } + static inline int16_t rawChamberTemp() { return temp_chamber.raw; } #endif - FORCE_INLINE static float degChamber() { return temp_chamber.celsius; } + static inline celsius_float_t degChamber() { return temp_chamber.celsius; } + static inline celsius_t wholeDegChamber() { return static_cast(degChamber() + 0.5f); } #if HAS_HEATED_CHAMBER - FORCE_INLINE static int16_t degTargetChamber() { return temp_chamber.target; } - FORCE_INLINE static bool isHeatingChamber() { return temp_chamber.target > temp_chamber.celsius; } - FORCE_INLINE static bool isCoolingChamber() { return temp_chamber.target < temp_chamber.celsius; } - + static inline celsius_t degTargetChamber() { return temp_chamber.target; } + static inline bool isHeatingChamber() { return temp_chamber.target > temp_chamber.celsius; } + static inline bool isCoolingChamber() { return temp_chamber.target < temp_chamber.celsius; } static bool wait_for_chamber(const bool no_wait_for_cooling=true); #endif #endif - #if WATCH_CHAMBER - static void start_watching_chamber(); - #else - static inline void start_watching_chamber() {} - #endif - #if HAS_HEATED_CHAMBER - static void setTargetChamber(const int16_t celsius) { - temp_chamber.target = - #ifdef CHAMBER_MAXTEMP - _MIN(celsius, CHAMBER_MAXTEMP - 10) - #else - celsius - #endif - ; + static void setTargetChamber(const celsius_t celsius) { + temp_chamber.target = _MIN(celsius, CHAMBER_MAX_TARGET); start_watching_chamber(); } + // Start watching the Chamber to make sure it's really heating up + static inline void start_watching_chamber() { TERN_(WATCH_CHAMBER, watch_chamber.restart(degChamber(), degTargetChamber())); } + #endif + + #if HAS_TEMP_COOLER + #if ENABLED(SHOW_TEMP_ADC_VALUES) + static inline int16_t rawCoolerTemp() { return temp_cooler.raw; } + #endif + static inline celsius_float_t degCooler() { return temp_cooler.celsius; } + static inline celsius_t wholeDegCooler() { return static_cast(temp_cooler.celsius + 0.5f); } + #if HAS_COOLER + static inline celsius_t degTargetCooler() { return temp_cooler.target; } + static inline bool isLaserHeating() { return temp_cooler.target > temp_cooler.celsius; } + static inline bool isLaserCooling() { return temp_cooler.target < temp_cooler.celsius; } + static bool wait_for_cooler(const bool no_wait_for_cooling=true); + #endif + #endif + + #if HAS_TEMP_BOARD + #if ENABLED(SHOW_TEMP_ADC_VALUES) + static inline int16_t rawBoardTemp() { return temp_board.raw; } + #endif + static inline celsius_float_t degBoard() { return temp_board.celsius; } + static inline celsius_t wholeDegBoard() { return static_cast(temp_board.celsius + 0.5f); } + #endif + + #if HAS_TEMP_REDUNDANT + #if ENABLED(SHOW_TEMP_ADC_VALUES) + static inline int16_t rawRedundantTemp() { return temp_redundant.raw; } + static inline int16_t rawRedundanTargetTemp() { return (*temp_redundant.target).raw; } + #endif + static inline celsius_float_t degRedundant() { return temp_redundant.celsius; } + static inline celsius_float_t degRedundantTarget() { return (*temp_redundant.target).celsius; } + static inline celsius_t wholeDegRedundant() { return static_cast(temp_redundant.celsius + 0.5f); } + static inline celsius_t wholeDegRedundantTarget() { return static_cast((*temp_redundant.target).celsius + 0.5f); } + #endif + + #if HAS_COOLER + static inline void setTargetCooler(const celsius_t celsius) { + temp_cooler.target = constrain(celsius, COOLER_MIN_TARGET, COOLER_MAX_TARGET); + start_watching_cooler(); + } + // Start watching the Cooler to make sure it's really cooling down + static inline void start_watching_cooler() { TERN_(WATCH_COOLER, watch_cooler.restart(degCooler(), degTargetCooler())); } #endif /** @@ -751,7 +860,12 @@ class Temperature { * Perform auto-tuning for hotend or bed in response to M303 */ #if HAS_PID_HEATING - static void PID_autotune(const float &target, const heater_id_t heater_id, const int8_t ncycles, const bool set_result=false); + + #if ANY(PID_DEBUG, PID_BED_DEBUG, PID_CHAMBER_DEBUG) + static bool pid_debug_flag; + #endif + + static void PID_autotune(const celsius_t target, const heater_id_t heater_id, const int8_t ncycles, const bool set_result=false); #if ENABLED(NO_FAN_SLOWING_IN_PID_TUNING) static bool adaptive_fan_slowing; @@ -763,7 +877,7 @@ class Temperature { * Update the temp manager when PID values change */ #if ENABLED(PIDTEMP) - FORCE_INLINE static void updatePID() { + static inline void updatePID() { TERN_(PID_EXTRUSION_SCALING, last_e_position = 0); } #endif @@ -771,19 +885,18 @@ class Temperature { #endif #if ENABLED(PROBING_HEATERS_OFF) - static void pause(const bool p); - FORCE_INLINE static bool is_paused() { return paused; } + static void pause_heaters(const bool p); #endif #if HEATER_IDLE_HANDLER - static void reset_hotend_idle_timer(const uint8_t E_NAME) { + static inline void reset_hotend_idle_timer(const uint8_t E_NAME) { heater_idle[HOTEND_INDEX].reset(); start_watching_hotend(HOTEND_INDEX); } #if HAS_HEATED_BED - static void reset_bed_idle_timer() { + static inline void reset_bed_idle_timer() { heater_idle[IDLE_INDEX_BED].reset(); start_watching_bed(); } @@ -793,9 +906,7 @@ class Temperature { #if HAS_TEMP_SENSOR static void print_heater_states(const uint8_t target_extruder - #if ENABLED(TEMP_SENSOR_1_AS_REDUNDANT) - , const bool include_r=false - #endif + OPTARG(HAS_TEMP_REDUNDANT, const bool include_r=false) ); #if ENABLED(AUTO_REPORT_TEMPERATURES) struct AutoReportTemp { static void report(); }; @@ -803,68 +914,80 @@ class Temperature { #endif #endif - TERN_(HAS_DISPLAY, static void set_heating_message(const uint8_t e)); + #if HAS_HOTEND && HAS_STATUS_MESSAGE + static void set_heating_message(const uint8_t e); + #else + static inline void set_heating_message(const uint8_t) {} + #endif #if HAS_LCD_MENU && HAS_TEMPERATURE - static void lcd_preheat(const int16_t e, const int8_t indh, const int8_t indb); + static void lcd_preheat(const uint8_t e, const int8_t indh, const int8_t indb); #endif private: + + // Reading raw temperatures and converting to Celsius when ready + static volatile bool raw_temps_ready; static void update_raw_temperatures(); static void updateTemperaturesFromRawValues(); + static inline bool updateTemperaturesIfReady() { + if (!raw_temps_ready) return false; + updateTemperaturesFromRawValues(); + raw_temps_ready = false; + return true; + } - #define HAS_MAX6675 EITHER(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) - #if HAS_MAX6675 - #define COUNT_6675 1 + BOTH(HEATER_0_USES_MAX6675, HEATER_1_USES_MAX6675) - #if COUNT_6675 > 1 - #define HAS_MULTI_6675 1 - #define READ_MAX6675(N) read_max6675(N) + // MAX Thermocouples + #if HAS_MAX_TC + #define MAX_TC_COUNT COUNT_ENABLED(TEMP_SENSOR_0_IS_MAX_TC, TEMP_SENSOR_1_IS_MAX_TC, TEMP_SENSOR_REDUNDANT_IS_MAX_TC) + #if MAX_TC_COUNT > 1 + #define HAS_MULTI_MAX_TC 1 + #define READ_MAX_TC(N) read_max_tc(N) #else - #define READ_MAX6675(N) read_max6675() + #define READ_MAX_TC(N) read_max_tc() #endif - static int read_max6675(TERN_(HAS_MULTI_6675, const uint8_t hindex=0)); + static int16_t read_max_tc(TERN_(HAS_MULTI_MAX_TC, const uint8_t hindex=0)); #endif static void checkExtruderAutoFans(); - static float get_pid_output_hotend(const uint8_t e); - - TERN_(PIDTEMPBED, static float get_pid_output_bed()); - - TERN_(HAS_HEATED_CHAMBER, static float get_pid_output_chamber()); + #if HAS_HOTEND + static float get_pid_output_hotend(const uint8_t e); + #endif + #if ENABLED(PIDTEMPBED) + static float get_pid_output_bed(); + #endif + #if ENABLED(PIDTEMPCHAMBER) + static float get_pid_output_chamber(); + #endif static void _temp_error(const heater_id_t e, PGM_P const serial_msg, PGM_P const lcd_msg); static void min_temp_error(const heater_id_t e); static void max_temp_error(const heater_id_t e); - #define HAS_THERMAL_PROTECTION ANY(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_CHAMBER, HAS_THERMALLY_PROTECTED_BED) + #define HAS_THERMAL_PROTECTION ANY(THERMAL_PROTECTION_HOTENDS, THERMAL_PROTECTION_CHAMBER, HAS_THERMALLY_PROTECTED_BED, THERMAL_PROTECTION_COOLER) #if HAS_THERMAL_PROTECTION // Indices and size for the tr_state_machine array. One for each protected heater. - #define _ENUM_FOR_E(N) RUNAWAY_IND_E##N, - enum RunawayIndex : uint8_t { + enum RunawayIndex : int8_t { + _RI = -1 #if ENABLED(THERMAL_PROTECTION_HOTENDS) - REPEAT(HOTENDS, _ENUM_FOR_E) - #endif - #if ENABLED(HAS_THERMALLY_PROTECTED_BED) - RUNAWAY_IND_BED, + #define _RUNAWAY_IND_E(N) ,RUNAWAY_IND_E##N + REPEAT(HOTENDS, _RUNAWAY_IND_E) + #undef _RUNAWAY_IND_E #endif - #if ENABLED(THERMAL_PROTECTION_CHAMBER) - RUNAWAY_IND_CHAMBER, - #endif - NR_HEATER_RUNAWAY + OPTARG(HAS_THERMALLY_PROTECTED_BED, RUNAWAY_IND_BED) + OPTARG(THERMAL_PROTECTION_CHAMBER, RUNAWAY_IND_CHAMBER) + OPTARG(THERMAL_PROTECTION_COOLER, RUNAWAY_IND_COOLER) + , NR_HEATER_RUNAWAY }; - #undef _ENUM_FOR_E // Convert the given heater_id_t to runaway state array index static inline RunawayIndex runaway_index_for_id(const int8_t heater_id) { - #if HAS_THERMALLY_PROTECTED_CHAMBER - if (heater_id == H_CHAMBER) return RUNAWAY_IND_CHAMBER; - #endif - #if HAS_THERMALLY_PROTECTED_BED - if (heater_id == H_BED) return RUNAWAY_IND_BED; - #endif + TERN_(HAS_THERMALLY_PROTECTED_CHAMBER, if (heater_id == H_CHAMBER) return RUNAWAY_IND_CHAMBER); + TERN_(HAS_THERMALLY_PROTECTED_CHAMBER, if (heater_id == H_COOLER) return RUNAWAY_IND_COOLER); + TERN_(HAS_THERMALLY_PROTECTED_BED, if (heater_id == H_BED) return RUNAWAY_IND_BED); return (RunawayIndex)_MAX(heater_id, 0); } @@ -874,7 +997,7 @@ class Temperature { millis_t timer = 0; TRState state = TRInactive; float running_temp; - void run(const float ¤t, const float &target, const heater_id_t heater_id, const uint16_t period_seconds, const uint16_t hysteresis_degc); + void run(const_celsius_float_t current, const_celsius_float_t target, const heater_id_t heater_id, const uint16_t period_seconds, const celsius_t hysteresis_degc); } tr_state_machine_t; static tr_state_machine_t tr_state_machine[NR_HEATER_RUNAWAY]; diff --git a/Marlin/src/module/thermistor/thermistor_1.h b/Marlin/src/module/thermistor/thermistor_1.h index fad790837571..2ebf8da550a0 100644 --- a/Marlin/src/module/thermistor/thermistor_1.h +++ b/Marlin/src/module/thermistor/thermistor_1.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 4092 K, 4.7 kOhm pull-up, bed thermistor -const temp_entry_t temptable_1[] PROGMEM = { +constexpr temp_entry_t temptable_1[] PROGMEM = { { OV( 23), 300 }, { OV( 25), 295 }, { OV( 27), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_10.h b/Marlin/src/module/thermistor/thermistor_10.h index c24ad40bf483..9f2285c3fd83 100644 --- a/Marlin/src/module/thermistor/thermistor_10.h +++ b/Marlin/src/module/thermistor/thermistor_10.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 3960 K, 4.7 kOhm pull-up, RS thermistor 198-961 -const temp_entry_t temptable_10[] PROGMEM = { +constexpr temp_entry_t temptable_10[] PROGMEM = { { OV( 1), 929 }, { OV( 36), 299 }, { OV( 71), 246 }, diff --git a/Marlin/src/module/thermistor/thermistor_1010.h b/Marlin/src/module/thermistor/thermistor_1010.h index 8ab5e3b364c6..6f2e3ab318f2 100644 --- a/Marlin/src/module/thermistor/thermistor_1010.h +++ b/Marlin/src/module/thermistor/thermistor_1010.h @@ -24,7 +24,7 @@ #define REVERSE_TEMP_SENSOR_RANGE_1010 1 // Pt1000 with 1k0 pullup -const temp_entry_t temptable_1010[] PROGMEM = { +constexpr temp_entry_t temptable_1010[] PROGMEM = { PtLine( 0, 1000, 1000), PtLine( 25, 1000, 1000), PtLine( 50, 1000, 1000), diff --git a/Marlin/src/module/thermistor/thermistor_1047.h b/Marlin/src/module/thermistor/thermistor_1047.h index 6e1b61f9d073..fb901d0a8d02 100644 --- a/Marlin/src/module/thermistor/thermistor_1047.h +++ b/Marlin/src/module/thermistor/thermistor_1047.h @@ -24,7 +24,7 @@ #define REVERSE_TEMP_SENSOR_RANGE_1047 1 // Pt1000 with 4k7 pullup -const temp_entry_t temptable_1047[] PROGMEM = { +constexpr temp_entry_t temptable_1047[] PROGMEM = { // only a few values are needed as the curve is very flat PtLine( 0, 1000, 4700), PtLine( 50, 1000, 4700), diff --git a/Marlin/src/module/thermistor/thermistor_11.h b/Marlin/src/module/thermistor/thermistor_11.h index 345d009a6498..52f89814e732 100644 --- a/Marlin/src/module/thermistor/thermistor_11.h +++ b/Marlin/src/module/thermistor/thermistor_11.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 3950 K, 4.7 kOhm pull-up, QU-BD silicone bed QWG-104F-3950 thermistor -const temp_entry_t temptable_11[] PROGMEM = { +constexpr temp_entry_t temptable_11[] PROGMEM = { { OV( 1), 938 }, { OV( 31), 314 }, { OV( 41), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_110.h b/Marlin/src/module/thermistor/thermistor_110.h index 215495e2c6a1..5d76d1ee1bda 100644 --- a/Marlin/src/module/thermistor/thermistor_110.h +++ b/Marlin/src/module/thermistor/thermistor_110.h @@ -24,7 +24,7 @@ #define REVERSE_TEMP_SENSOR_RANGE_110 1 // Pt100 with 1k0 pullup -const temp_entry_t temptable_110[] PROGMEM = { +constexpr temp_entry_t temptable_110[] PROGMEM = { // only a few values are needed as the curve is very flat PtLine( 0, 100, 1000), PtLine( 50, 100, 1000), diff --git a/Marlin/src/module/thermistor/thermistor_12.h b/Marlin/src/module/thermistor/thermistor_12.h index d1ee23b2b7f7..c0cbd254cffc 100644 --- a/Marlin/src/module/thermistor/thermistor_12.h +++ b/Marlin/src/module/thermistor/thermistor_12.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 4700 K, 4.7 kOhm pull-up, (personal calibration for Makibox hot bed) -const temp_entry_t temptable_12[] PROGMEM = { +constexpr temp_entry_t temptable_12[] PROGMEM = { { OV( 35), 180 }, // top rating 180C { OV( 211), 140 }, { OV( 233), 135 }, diff --git a/Marlin/src/module/thermistor/thermistor_13.h b/Marlin/src/module/thermistor/thermistor_13.h index bb622240c82d..7e87373948a2 100644 --- a/Marlin/src/module/thermistor/thermistor_13.h +++ b/Marlin/src/module/thermistor/thermistor_13.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 4100 K, 4.7 kOhm pull-up, Hisens thermistor -const temp_entry_t temptable_13[] PROGMEM = { +constexpr temp_entry_t temptable_13[] PROGMEM = { { OV( 20.04), 300 }, { OV( 23.19), 290 }, { OV( 26.71), 280 }, diff --git a/Marlin/src/module/thermistor/thermistor_147.h b/Marlin/src/module/thermistor/thermistor_147.h index 6d846ad5bed7..542e4844ec6b 100644 --- a/Marlin/src/module/thermistor/thermistor_147.h +++ b/Marlin/src/module/thermistor/thermistor_147.h @@ -24,7 +24,7 @@ #define REVERSE_TEMP_SENSOR_RANGE_147 1 // Pt100 with 4k7 pullup -const temp_entry_t temptable_147[] PROGMEM = { +constexpr temp_entry_t temptable_147[] PROGMEM = { // only a few values are needed as the curve is very flat PtLine( 0, 100, 4700), PtLine( 50, 100, 4700), diff --git a/Marlin/src/module/thermistor/thermistor_15.h b/Marlin/src/module/thermistor/thermistor_15.h index 46dcce8c1e4f..ce9824879357 100644 --- a/Marlin/src/module/thermistor/thermistor_15.h +++ b/Marlin/src/module/thermistor/thermistor_15.h @@ -22,7 +22,7 @@ #pragma once // 100k bed thermistor in JGAurora A5. Calibrated by Sam Pinches 21st Jan 2018 using cheap k-type thermocouple inserted into heater block, using TM-902C meter. -const temp_entry_t temptable_15[] PROGMEM = { +constexpr temp_entry_t temptable_15[] PROGMEM = { { OV( 31), 275 }, { OV( 33), 270 }, { OV( 35), 260 }, diff --git a/Marlin/src/module/thermistor/thermistor_17.h b/Marlin/src/module/thermistor/thermistor_17.h index 32b5bb77a888..55d3bc39d0af 100644 --- a/Marlin/src/module/thermistor/thermistor_17.h +++ b/Marlin/src/module/thermistor/thermistor_17.h @@ -22,7 +22,7 @@ #pragma once // Dagoma NTC 100k white thermistor -const temp_entry_t temptable_17[] PROGMEM = { +constexpr temp_entry_t temptable_17[] PROGMEM = { { OV( 16), 309 }, { OV( 18), 307 }, { OV( 20), 300 }, diff --git a/Marlin/src/module/thermistor/thermistor_18.h b/Marlin/src/module/thermistor/thermistor_18.h index 9c2d81b3e698..061cf78129e0 100644 --- a/Marlin/src/module/thermistor/thermistor_18.h +++ b/Marlin/src/module/thermistor/thermistor_18.h @@ -22,7 +22,7 @@ #pragma once // ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 - version (measured/tested/approved) -const temp_entry_t temptable_18[] PROGMEM = { +constexpr temp_entry_t temptable_18[] PROGMEM = { { OV( 1), 713 }, { OV( 17), 284 }, { OV( 20), 275 }, diff --git a/Marlin/src/module/thermistor/thermistor_2.h b/Marlin/src/module/thermistor/thermistor_2.h index d0e1e4f3dfca..a899fd17ee0f 100644 --- a/Marlin/src/module/thermistor/thermistor_2.h +++ b/Marlin/src/module/thermistor/thermistor_2.h @@ -26,7 +26,7 @@ // Verified by linagee. Source: https://www.mouser.com/datasheet/2/362/semitec%20usa%20corporation_gtthermistor-1202937.pdf // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance // -const temp_entry_t temptable_2[] PROGMEM = { +constexpr temp_entry_t temptable_2[] PROGMEM = { { OV( 1), 848 }, { OV( 30), 300 }, // top rating 300C { OV( 34), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_20.h b/Marlin/src/module/thermistor/thermistor_20.h index 73094f14604d..a8267e93e4a6 100644 --- a/Marlin/src/module/thermistor/thermistor_20.h +++ b/Marlin/src/module/thermistor/thermistor_20.h @@ -24,7 +24,7 @@ #define REVERSE_TEMP_SENSOR_RANGE_20 1 // Pt100 with INA826 amp on Ultimaker v2.0 electronics -const temp_entry_t temptable_20[] PROGMEM = { +constexpr temp_entry_t temptable_20[] PROGMEM = { { OV( 0), 0 }, { OV(227), 1 }, { OV(236), 10 }, diff --git a/Marlin/src/module/thermistor/thermistor_2000.h b/Marlin/src/module/thermistor/thermistor_2000.h new file mode 100644 index 000000000000..3815a6f2569a --- /dev/null +++ b/Marlin/src/module/thermistor/thermistor_2000.h @@ -0,0 +1,60 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +// R25 = 100 KOhm, beta25 = 4550 K, 4.7 kOhm pull-up, TDK NTCG104LH104KT1 https://product.tdk.com/en/search/sensor/ntc/chip-ntc-thermistor/info?part_no=NTCG104LH104KT1 +constexpr temp_entry_t temptable_2000[] PROGMEM = { +{ OV(313), 125 }, +{ OV(347), 120 }, +{ OV(383), 115 }, +{ OV(422), 110 }, +{ OV(463), 105 }, +{ OV(506), 100 }, +{ OV(549), 95 }, +{ OV(594), 90 }, +{ OV(638), 85 }, +{ OV(681), 80 }, +{ OV(722), 75 }, +{ OV(762), 70 }, +{ OV(799), 65 }, +{ OV(833), 60 }, +{ OV(863), 55 }, +{ OV(890), 50 }, +{ OV(914), 45 }, +{ OV(934), 40 }, +{ OV(951), 35 }, +{ OV(966), 30 }, +{ OV(978), 25 }, +{ OV(988), 20 }, +{ OV(996), 15 }, +{ OV(1002), 10 }, +{ OV(1007), 5 }, +{ OV(1012), 0 }, +{ OV(1015), -5 }, +{ OV(1017), -10 }, +{ OV(1019), -15 }, +{ OV(1020), -20 }, +{ OV(1021), -25 }, +{ OV(1022), -30 }, +{ OV(1023), -35 }, +{ OV(1023), -40 } +}; diff --git a/Marlin/src/module/thermistor/thermistor_201.h b/Marlin/src/module/thermistor/thermistor_201.h index 44d52806813a..9c083a2d1bf0 100644 --- a/Marlin/src/module/thermistor/thermistor_201.h +++ b/Marlin/src/module/thermistor/thermistor_201.h @@ -24,7 +24,7 @@ #define REVERSE_TEMP_SENSOR_RANGE_201 1 // Pt100 with LMV324 amp on Overlord v1.1 electronics -const temp_entry_t temptable_201[] PROGMEM = { +constexpr temp_entry_t temptable_201[] PROGMEM = { { OV( 0), 0 }, { OV( 8), 1 }, { OV( 23), 6 }, diff --git a/Marlin/src/module/thermistor/thermistor_202.h b/Marlin/src/module/thermistor/thermistor_202.h index c5229607ae33..e1b0ee258e79 100644 --- a/Marlin/src/module/thermistor/thermistor_202.h +++ b/Marlin/src/module/thermistor/thermistor_202.h @@ -3,7 +3,7 @@ // Temptable sent from dealer technologyoutlet.co.uk // -const temp_entry_t temptable_202[] PROGMEM = { +constexpr temp_entry_t temptable_202[] PROGMEM = { { OV( 1), 864 }, { OV( 35), 300 }, { OV( 38), 295 }, diff --git a/Marlin/src/module/thermistor/thermistor_21.h b/Marlin/src/module/thermistor/thermistor_21.h index 2ca705b95005..f8a5de2e150d 100644 --- a/Marlin/src/module/thermistor/thermistor_21.h +++ b/Marlin/src/module/thermistor/thermistor_21.h @@ -28,7 +28,7 @@ // Pt100 with INA826 amplifier board with 5v supply based on Thermistor 20, with 3v3 ADC reference on the mainboard. // If the ADC reference and INA826 board supply voltage are identical, Thermistor 20 instead. -const temp_entry_t temptable_21[] PROGMEM = { +constexpr temp_entry_t temptable_21[] PROGMEM = { { OV( 0), 0 }, { OV(227), 1 }, { OV(236), 10 }, diff --git a/Marlin/src/module/thermistor/thermistor_22.h b/Marlin/src/module/thermistor/thermistor_22.h index 6f4a31050add..90e1af8c1a6c 100644 --- a/Marlin/src/module/thermistor/thermistor_22.h +++ b/Marlin/src/module/thermistor/thermistor_22.h @@ -21,7 +21,7 @@ */ // 100k hotend thermistor with 4.7k pull up to 3.3v and 220R to analog input as in GTM32 Pro vB -const temp_entry_t temptable_22[] PROGMEM = { +constexpr temp_entry_t temptable_22[] PROGMEM = { { OV( 1), 352 }, { OV( 6), 341 }, { OV( 11), 330 }, diff --git a/Marlin/src/module/thermistor/thermistor_23.h b/Marlin/src/module/thermistor/thermistor_23.h index 02ff9fb2b6c8..9b806af5b77f 100644 --- a/Marlin/src/module/thermistor/thermistor_23.h +++ b/Marlin/src/module/thermistor/thermistor_23.h @@ -21,7 +21,7 @@ */ // 100k hotbed thermistor with 4.7k pull up to 3.3v and 220R to analog input as in GTM32 Pro vB -const temp_entry_t temptable_23[] PROGMEM = { +constexpr temp_entry_t temptable_23[] PROGMEM = { { OV( 1), 938 }, { OV( 11), 423 }, { OV( 21), 351 }, diff --git a/Marlin/src/module/thermistor/thermistor_3.h b/Marlin/src/module/thermistor/thermistor_3.h index 74e00e2ba4f4..cb6d75738ed2 100644 --- a/Marlin/src/module/thermistor/thermistor_3.h +++ b/Marlin/src/module/thermistor/thermistor_3.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 4120 K, 4.7 kOhm pull-up, mendel-parts -const temp_entry_t temptable_3[] PROGMEM = { +constexpr temp_entry_t temptable_3[] PROGMEM = { { OV( 1), 864 }, { OV( 21), 300 }, { OV( 25), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_30.h b/Marlin/src/module/thermistor/thermistor_30.h index bc1781b1351c..daf4d29aa761 100644 --- a/Marlin/src/module/thermistor/thermistor_30.h +++ b/Marlin/src/module/thermistor/thermistor_30.h @@ -28,7 +28,7 @@ // B Value Tolerance + / - 1% // Kis3d Silicone Heater 24V 200W/300W with 6mm Precision cast plate (EN AW 5083) // Temperature setting time 10 min to determine the 12Bit ADC value on the surface. (le3tspeak) -const temp_entry_t temptable_30[] PROGMEM = { +constexpr temp_entry_t temptable_30[] PROGMEM = { { OV( 1), 938 }, { OV( 298), 125 }, // 1193 - 125° { OV( 321), 121 }, // 1285 - 121° diff --git a/Marlin/src/module/thermistor/thermistor_331.h b/Marlin/src/module/thermistor/thermistor_331.h index ccb0f6b62d2b..847dbc30a03b 100644 --- a/Marlin/src/module/thermistor/thermistor_331.h +++ b/Marlin/src/module/thermistor/thermistor_331.h @@ -24,7 +24,7 @@ #define OVM(V) OV((V)*(0.327/0.5)) // R25 = 100 kOhm, beta25 = 4092 K, 4.7 kOhm pull-up, bed thermistor -const temp_entry_t temptable_331[] PROGMEM = { +constexpr temp_entry_t temptable_331[] PROGMEM = { { OVM( 23), 300 }, { OVM( 25), 295 }, { OVM( 27), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_332.h b/Marlin/src/module/thermistor/thermistor_332.h index 9502f1bdae9e..83a5d39f0fee 100644 --- a/Marlin/src/module/thermistor/thermistor_332.h +++ b/Marlin/src/module/thermistor/thermistor_332.h @@ -24,7 +24,7 @@ #define OVM(V) OV((V)*(0.327/0.327)) // R25 = 100 kOhm, beta25 = 4092 K, 4.7 kOhm pull-up, bed thermistor -const temp_entry_t temptable_332[] PROGMEM = { +constexpr temp_entry_t temptable_332[] PROGMEM = { { OVM( 268), 150 }, { OVM( 293), 145 }, { OVM( 320), 141 }, diff --git a/Marlin/src/module/thermistor/thermistor_4.h b/Marlin/src/module/thermistor/thermistor_4.h index 92d907249be9..98192a112454 100644 --- a/Marlin/src/module/thermistor/thermistor_4.h +++ b/Marlin/src/module/thermistor/thermistor_4.h @@ -22,7 +22,7 @@ #pragma once // R25 = 10 kOhm, beta25 = 3950 K, 4.7 kOhm pull-up, Generic 10k thermistor -const temp_entry_t temptable_4[] PROGMEM = { +constexpr temp_entry_t temptable_4[] PROGMEM = { { OV( 1), 430 }, { OV( 54), 137 }, { OV( 107), 107 }, diff --git a/Marlin/src/module/thermistor/thermistor_5.h b/Marlin/src/module/thermistor/thermistor_5.h index 1d5fa2fec739..69ef99fae1ee 100644 --- a/Marlin/src/module/thermistor/thermistor_5.h +++ b/Marlin/src/module/thermistor/thermistor_5.h @@ -26,7 +26,7 @@ // ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan) // Verified by linagee. Source: https://www.mouser.com/datasheet/2/362/semitec%20usa%20corporation_gtthermistor-1202937.pdf // Calculated using 4.7kohm pullup, voltage divider math, and manufacturer provided temp/resistance -const temp_entry_t temptable_5[] PROGMEM = { +constexpr temp_entry_t temptable_5[] PROGMEM = { { OV( 1), 713 }, { OV( 17), 300 }, // top rating 300C { OV( 20), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_501.h b/Marlin/src/module/thermistor/thermistor_501.h index d40e341f7e31..0e142628ec6b 100644 --- a/Marlin/src/module/thermistor/thermistor_501.h +++ b/Marlin/src/module/thermistor/thermistor_501.h @@ -22,7 +22,7 @@ #pragma once // 100k Zonestar thermistor. Adjusted By Hally -const temp_entry_t temptable_501[] PROGMEM = { +constexpr temp_entry_t temptable_501[] PROGMEM = { { OV( 1), 713 }, { OV( 14), 300 }, // Top rating 300C { OV( 16), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_502.h b/Marlin/src/module/thermistor/thermistor_502.h index 69cee2431c5f..3ddbf30d47ed 100644 --- a/Marlin/src/module/thermistor/thermistor_502.h +++ b/Marlin/src/module/thermistor/thermistor_502.h @@ -23,7 +23,7 @@ // Unknown thermistor for the Zonestar P802M hot bed. Adjusted By Nerseth // These were the shipped settings from Zonestar in original firmware: P802M_8_Repetier_V1.6_Zonestar.zip -const temp_entry_t temptable_502[] PROGMEM = { +constexpr temp_entry_t temptable_502[] PROGMEM = { { OV( 56.0 / 4), 300 }, { OV( 187.0 / 4), 250 }, { OV( 615.0 / 4), 190 }, diff --git a/Marlin/src/module/thermistor/thermistor_503.h b/Marlin/src/module/thermistor/thermistor_503.h index 543600a7aa21..d80ebbb6ba31 100644 --- a/Marlin/src/module/thermistor/thermistor_503.h +++ b/Marlin/src/module/thermistor/thermistor_503.h @@ -23,7 +23,7 @@ // Zonestar (Z8XM2) Heated Bed thermistor. Added By AvanOsch // These are taken from the Zonestar settings in original Repetier firmware: Z8XM2_ZRIB_LCD12864_V51.zip -const temp_entry_t temptable_503[] PROGMEM = { +constexpr temp_entry_t temptable_503[] PROGMEM = { { OV( 12), 300 }, { OV( 27), 270 }, { OV( 47), 250 }, diff --git a/Marlin/src/module/thermistor/thermistor_51.h b/Marlin/src/module/thermistor/thermistor_51.h index d02dd47ba5d1..ee63a0e61bbb 100644 --- a/Marlin/src/module/thermistor/thermistor_51.h +++ b/Marlin/src/module/thermistor/thermistor_51.h @@ -26,7 +26,7 @@ // Verified by linagee. // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance // Advantage: Twice the resolution and better linearity from 150C to 200C -const temp_entry_t temptable_51[] PROGMEM = { +constexpr temp_entry_t temptable_51[] PROGMEM = { { OV( 1), 350 }, { OV( 190), 250 }, // top rating 250C { OV( 203), 245 }, diff --git a/Marlin/src/module/thermistor/thermistor_512.h b/Marlin/src/module/thermistor/thermistor_512.h index e8021e1e48c4..e380b4a16bfd 100644 --- a/Marlin/src/module/thermistor/thermistor_512.h +++ b/Marlin/src/module/thermistor/thermistor_512.h @@ -22,7 +22,7 @@ // 100k thermistor supplied with RPW-Ultra hotend, 4.7k pullup -const temp_entry_t temptable_512[] PROGMEM = { +constexpr temp_entry_t temptable_512[] PROGMEM = { { OV(26), 300 }, { OV(28), 295 }, { OV(30), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_52.h b/Marlin/src/module/thermistor/thermistor_52.h index 5c9cb9dc4df9..f3bb75d4627f 100644 --- a/Marlin/src/module/thermistor/thermistor_52.h +++ b/Marlin/src/module/thermistor/thermistor_52.h @@ -26,7 +26,7 @@ // Verified by linagee. Source: https://www.mouser.com/datasheet/2/362/semitec%20usa%20corporation_gtthermistor-1202937.pdf // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance // Advantage: More resolution and better linearity from 150C to 200C -const temp_entry_t temptable_52[] PROGMEM = { +constexpr temp_entry_t temptable_52[] PROGMEM = { { OV( 1), 500 }, { OV( 125), 300 }, // top rating 300C { OV( 142), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_55.h b/Marlin/src/module/thermistor/thermistor_55.h index 707b7d420a12..41004a97ef23 100644 --- a/Marlin/src/module/thermistor/thermistor_55.h +++ b/Marlin/src/module/thermistor/thermistor_55.h @@ -26,7 +26,7 @@ // Verified by linagee. Source: https://www.mouser.com/datasheet/2/362/semitec%20usa%20corporation_gtthermistor-1202937.pdf // Calculated using 1kohm pullup, voltage divider math, and manufacturer provided temp/resistance // Advantage: More resolution and better linearity from 150C to 200C -const temp_entry_t temptable_55[] PROGMEM = { +constexpr temp_entry_t temptable_55[] PROGMEM = { { OV( 1), 500 }, { OV( 76), 300 }, { OV( 87), 290 }, diff --git a/Marlin/src/module/thermistor/thermistor_6.h b/Marlin/src/module/thermistor/thermistor_6.h index 68113419e583..b5e79a9b0e72 100644 --- a/Marlin/src/module/thermistor/thermistor_6.h +++ b/Marlin/src/module/thermistor/thermistor_6.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 4092 K, 8.2 kOhm pull-up, 100k Epcos (?) thermistor -const temp_entry_t temptable_6[] PROGMEM = { +constexpr temp_entry_t temptable_6[] PROGMEM = { { OV( 1), 350 }, { OV( 28), 250 }, // top rating 250C { OV( 31), 245 }, diff --git a/Marlin/src/module/thermistor/thermistor_60.h b/Marlin/src/module/thermistor/thermistor_60.h index a3fe50559fd0..a057080e45c1 100644 --- a/Marlin/src/module/thermistor/thermistor_60.h +++ b/Marlin/src/module/thermistor/thermistor_60.h @@ -31,7 +31,7 @@ // beta: 3950 // min adc: 1 at 0.0048828125 V // max adc: 1023 at 4.9951171875 V -const temp_entry_t temptable_60[] PROGMEM = { +constexpr temp_entry_t temptable_60[] PROGMEM = { { OV( 51), 272 }, { OV( 61), 258 }, { OV( 71), 247 }, diff --git a/Marlin/src/module/thermistor/thermistor_61.h b/Marlin/src/module/thermistor/thermistor_61.h index ed4c4c885956..2916bffd3bc8 100644 --- a/Marlin/src/module/thermistor/thermistor_61.h +++ b/Marlin/src/module/thermistor/thermistor_61.h @@ -30,8 +30,8 @@ // Resistance Tolerance + / -1% // B Value 3950K at 25/50 deg. C // B Value Tolerance + / - 1% -const temp_entry_t temptable_61[] PROGMEM = { - { OV( 2.00), 420 }, // Guestimate to ensure we dont lose a reading and drop temps to -50 when over +constexpr temp_entry_t temptable_61[] PROGMEM = { + { OV( 2.00), 420 }, // Guestimate to ensure we don't lose a reading and drop temps to -50 when over { OV( 12.07), 350 }, { OV( 12.79), 345 }, { OV( 13.59), 340 }, diff --git a/Marlin/src/module/thermistor/thermistor_66.h b/Marlin/src/module/thermistor/thermistor_66.h index 0ad5994ea811..3b057ac6960e 100644 --- a/Marlin/src/module/thermistor/thermistor_66.h +++ b/Marlin/src/module/thermistor/thermistor_66.h @@ -22,7 +22,7 @@ #pragma once // R25 = 2.5 MOhm, beta25 = 4500 K, 4.7 kOhm pull-up, DyzeDesign 500 °C Thermistor -const temp_entry_t temptable_66[] PROGMEM = { +constexpr temp_entry_t temptable_66[] PROGMEM = { { OV( 17.5), 850 }, { OV( 17.9), 500 }, { OV( 21.7), 480 }, diff --git a/Marlin/src/module/thermistor/thermistor_666.h b/Marlin/src/module/thermistor/thermistor_666.h index 490dbd5f3ee9..bba3e606fc06 100644 --- a/Marlin/src/module/thermistor/thermistor_666.h +++ b/Marlin/src/module/thermistor/thermistor_666.h @@ -33,7 +33,7 @@ * B: 0.00031362 * C: -2.03978e-07 */ -const temp_entry_t temptable_666[] PROGMEM = { +constexpr temp_entry_t temptable_666[] PROGMEM = { { OV( 1), 794 }, { OV( 18), 288 }, { OV( 35), 234 }, diff --git a/Marlin/src/module/thermistor/thermistor_67.h b/Marlin/src/module/thermistor/thermistor_67.h index 7d6d7f697df3..10fa9310b1cf 100644 --- a/Marlin/src/module/thermistor/thermistor_67.h +++ b/Marlin/src/module/thermistor/thermistor_67.h @@ -22,7 +22,7 @@ #pragma once // R25 = 500 KOhm, beta25 = 3800 K, 4.7 kOhm pull-up, SliceEngineering 450 °C Thermistor -const temp_entry_t temptable_67[] PROGMEM = { +constexpr temp_entry_t temptable_67[] PROGMEM = { { OV( 22 ), 500 }, { OV( 23 ), 490 }, { OV( 25 ), 480 }, diff --git a/Marlin/src/module/thermistor/thermistor_7.h b/Marlin/src/module/thermistor/thermistor_7.h index 7a737559841c..964897859e84 100644 --- a/Marlin/src/module/thermistor/thermistor_7.h +++ b/Marlin/src/module/thermistor/thermistor_7.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 3974 K, 4.7 kOhm pull-up, Honeywell 135-104LAG-J01 -const temp_entry_t temptable_7[] PROGMEM = { +constexpr temp_entry_t temptable_7[] PROGMEM = { { OV( 1), 941 }, { OV( 19), 362 }, { OV( 37), 299 }, // top rating 300C diff --git a/Marlin/src/module/thermistor/thermistor_70.h b/Marlin/src/module/thermistor/thermistor_70.h index 466b9255533e..f0163dcabc9f 100644 --- a/Marlin/src/module/thermistor/thermistor_70.h +++ b/Marlin/src/module/thermistor/thermistor_70.h @@ -26,7 +26,7 @@ // ANENG AN8009 DMM with a K-type probe used for measurements. // R25 = 100 kOhm, beta25 = 4100 K, 4.7 kOhm pull-up, bqh2 stock thermistor -const temp_entry_t temptable_70[] PROGMEM = { +constexpr temp_entry_t temptable_70[] PROGMEM = { { OV( 18), 270 }, { OV( 27), 248 }, { OV( 34), 234 }, diff --git a/Marlin/src/module/thermistor/thermistor_71.h b/Marlin/src/module/thermistor/thermistor_71.h index abd7fc5b986e..c94b4d5bbc6f 100644 --- a/Marlin/src/module/thermistor/thermistor_71.h +++ b/Marlin/src/module/thermistor/thermistor_71.h @@ -27,7 +27,7 @@ // Beta = 3974 // R1 = 0 Ohm // R2 = 4700 Ohm -const temp_entry_t temptable_71[] PROGMEM = { +constexpr temp_entry_t temptable_71[] PROGMEM = { { OV( 35), 300 }, { OV( 51), 269 }, { OV( 59), 258 }, diff --git a/Marlin/src/module/thermistor/thermistor_75.h b/Marlin/src/module/thermistor/thermistor_75.h index 79800d2e4048..bb2ecce7dcf8 100644 --- a/Marlin/src/module/thermistor/thermistor_75.h +++ b/Marlin/src/module/thermistor/thermistor_75.h @@ -34,7 +34,7 @@ //#define HIGH_TEMP_RANGE_75 -const temp_entry_t temptable_75[] PROGMEM = { // Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor +constexpr temp_entry_t temptable_75[] PROGMEM = { // Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor { OV(111.06), 200 }, // v=0.542 r=571.747 res=0.501 degC/count #ifdef HIGH_TEMP_RANGE_75 diff --git a/Marlin/src/module/thermistor/thermistor_8.h b/Marlin/src/module/thermistor/thermistor_8.h index 9e19168fed0d..4b0f791f16be 100644 --- a/Marlin/src/module/thermistor/thermistor_8.h +++ b/Marlin/src/module/thermistor/thermistor_8.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 3950 K, 10 kOhm pull-up, NTCS0603E3104FHT -const temp_entry_t temptable_8[] PROGMEM = { +constexpr temp_entry_t temptable_8[] PROGMEM = { { OV( 1), 704 }, { OV( 54), 216 }, { OV( 107), 175 }, diff --git a/Marlin/src/module/thermistor/thermistor_9.h b/Marlin/src/module/thermistor/thermistor_9.h index 29097420ec11..3830a7dfcce7 100644 --- a/Marlin/src/module/thermistor/thermistor_9.h +++ b/Marlin/src/module/thermistor/thermistor_9.h @@ -22,7 +22,7 @@ #pragma once // R25 = 100 kOhm, beta25 = 3960 K, 4.7 kOhm pull-up, GE Sensing AL03006-58.2K-97-G1 -const temp_entry_t temptable_9[] PROGMEM = { +constexpr temp_entry_t temptable_9[] PROGMEM = { { OV( 1), 936 }, { OV( 36), 300 }, { OV( 71), 246 }, diff --git a/Marlin/src/module/thermistor/thermistor_99.h b/Marlin/src/module/thermistor/thermistor_99.h index 839a511c0918..fa3dae93afd5 100644 --- a/Marlin/src/module/thermistor/thermistor_99.h +++ b/Marlin/src/module/thermistor/thermistor_99.h @@ -19,12 +19,11 @@ * along with this program. If not, see . * */ - #pragma once // 100k bed thermistor with a 10K pull-up resistor - made by $ buildroot/share/scripts/createTemperatureLookupMarlin.py --rp=10000 -const temp_entry_t temptable_99[] PROGMEM = { +constexpr temp_entry_t temptable_99[] PROGMEM = { { OV( 5.81), 350 }, // v=0.028 r= 57.081 res=13.433 degC/count { OV( 6.54), 340 }, // v=0.032 r= 64.248 res=11.711 degC/count { OV( 7.38), 330 }, // v=0.036 r= 72.588 res=10.161 degC/count diff --git a/Marlin/src/module/thermistor/thermistor_998.h b/Marlin/src/module/thermistor/thermistor_998.h index e4cfbbaa0d2f..753cdd40bc6a 100644 --- a/Marlin/src/module/thermistor/thermistor_998.h +++ b/Marlin/src/module/thermistor/thermistor_998.h @@ -27,7 +27,7 @@ #define DUMMY_THERMISTOR_998_VALUE 25 #endif -const temp_entry_t temptable_998[] PROGMEM = { +constexpr temp_entry_t temptable_998[] PROGMEM = { { OV( 1), DUMMY_THERMISTOR_998_VALUE }, { OV(1023), DUMMY_THERMISTOR_998_VALUE } }; diff --git a/Marlin/src/module/thermistor/thermistor_999.h b/Marlin/src/module/thermistor/thermistor_999.h index 0271c47f8585..41e44ef63189 100644 --- a/Marlin/src/module/thermistor/thermistor_999.h +++ b/Marlin/src/module/thermistor/thermistor_999.h @@ -27,7 +27,7 @@ #define DUMMY_THERMISTOR_999_VALUE 25 #endif -const temp_entry_t temptable_999[] PROGMEM = { +constexpr temp_entry_t temptable_999[] PROGMEM = { { OV( 1), DUMMY_THERMISTOR_999_VALUE }, { OV(1023), DUMMY_THERMISTOR_999_VALUE } }; diff --git a/Marlin/src/module/thermistor/thermistors.h b/Marlin/src/module/thermistor/thermistors.h index 03ed5c2a57df..85f4449636e8 100644 --- a/Marlin/src/module/thermistor/thermistors.h +++ b/Marlin/src/module/thermistor/thermistors.h @@ -42,9 +42,7 @@ #define OV_SCALE(N) (N) #define OV(N) int16_t(OV_SCALE(N) * (OVERSAMPLENR) * (THERMISTOR_TABLE_SCALE)) -#define ANY_THERMISTOR_IS(n) (THERMISTOR_HEATER_0 == n || THERMISTOR_HEATER_1 == n || THERMISTOR_HEATER_2 == n || THERMISTOR_HEATER_3 == n || THERMISTOR_HEATER_4 == n || THERMISTOR_HEATER_5 == n || THERMISTOR_HEATER_6 == n || THERMISTOR_HEATER_7 == n || THERMISTORBED == n || THERMISTORCHAMBER == n || THERMISTORPROBE == n) - -typedef struct { int16_t value, celsius; } temp_entry_t; +typedef struct { int16_t value; celsius_t celsius; } temp_entry_t; // Pt1000 and Pt100 handling // @@ -191,6 +189,9 @@ typedef struct { int16_t value, celsius; } temp_entry_t; #if ANY_THERMISTOR_IS(1047) // Pt1000 with 4k7 pullup #include "thermistor_1047.h" #endif +#if ANY_THERMISTOR_IS(2000) // "Ultimachine Rambo TDK NTCG104LH104KT1 NTC100K motherboard Thermistor" https://product.tdk.com/en/search/sensor/ntc/chip-ntc-thermistor/info?part_no=NTCG104LH104KT1 + #include "thermistor_2000.h" +#endif #if ANY_THERMISTOR_IS(998) // User-defined table 1 #include "thermistor_998.h" #endif @@ -198,310 +199,341 @@ typedef struct { int16_t value, celsius; } temp_entry_t; #include "thermistor_999.h" #endif #if ANY_THERMISTOR_IS(1000) // Custom - const temp_entry_t temptable_1000[] PROGMEM = { { 0, 0 } }; + constexpr temp_entry_t temptable_1000[] PROGMEM = { { 0, 0 } }; #endif #define _TT_NAME(_N) temptable_ ## _N #define TT_NAME(_N) _TT_NAME(_N) +#if TEMP_SENSOR_0 > 0 + #define TEMPTABLE_0 TT_NAME(TEMP_SENSOR_0) + #define TEMPTABLE_0_LEN COUNT(TEMPTABLE_0) +#else + #define TEMPTABLE_0 nullptr + #define TEMPTABLE_0_LEN 0 +#endif + +#if TEMP_SENSOR_1 > 0 + #define TEMPTABLE_1 TT_NAME(TEMP_SENSOR_1) + #define TEMPTABLE_1_LEN COUNT(TEMPTABLE_1) +#else + #define TEMPTABLE_1 nullptr + #define TEMPTABLE_1_LEN 0 +#endif + +#if TEMP_SENSOR_2 > 0 + #define TEMPTABLE_2 TT_NAME(TEMP_SENSOR_2) + #define TEMPTABLE_2_LEN COUNT(TEMPTABLE_2) +#else + #define TEMPTABLE_2 nullptr + #define TEMPTABLE_2_LEN 0 +#endif -#if THERMISTOR_HEATER_0 - #define HEATER_0_TEMPTABLE TT_NAME(THERMISTOR_HEATER_0) - #define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE) -#elif HEATER_0_USES_THERMISTOR - #error "No heater 0 thermistor table specified" +#if TEMP_SENSOR_3 > 0 + #define TEMPTABLE_3 TT_NAME(TEMP_SENSOR_3) + #define TEMPTABLE_3_LEN COUNT(TEMPTABLE_3) #else - #define HEATER_0_TEMPTABLE nullptr - #define HEATER_0_TEMPTABLE_LEN 0 + #define TEMPTABLE_3 nullptr + #define TEMPTABLE_3_LEN 0 #endif -#if THERMISTOR_HEATER_1 - #define HEATER_1_TEMPTABLE TT_NAME(THERMISTOR_HEATER_1) - #define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE) -#elif HEATER_1_USES_THERMISTOR - #error "No heater 1 thermistor table specified" +#if TEMP_SENSOR_4 > 0 + #define TEMPTABLE_4 TT_NAME(TEMP_SENSOR_4) + #define TEMPTABLE_4_LEN COUNT(TEMPTABLE_4) #else - #define HEATER_1_TEMPTABLE nullptr - #define HEATER_1_TEMPTABLE_LEN 0 + #define TEMPTABLE_4 nullptr + #define TEMPTABLE_4_LEN 0 #endif -#if THERMISTOR_HEATER_2 - #define HEATER_2_TEMPTABLE TT_NAME(THERMISTOR_HEATER_2) - #define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE) -#elif HEATER_2_USES_THERMISTOR - #error "No heater 2 thermistor table specified" +#if TEMP_SENSOR_5 > 0 + #define TEMPTABLE_5 TT_NAME(TEMP_SENSOR_5) + #define TEMPTABLE_5_LEN COUNT(TEMPTABLE_5) #else - #define HEATER_2_TEMPTABLE nullptr - #define HEATER_2_TEMPTABLE_LEN 0 + #define TEMPTABLE_5 nullptr + #define TEMPTABLE_5_LEN 0 #endif -#if THERMISTOR_HEATER_3 - #define HEATER_3_TEMPTABLE TT_NAME(THERMISTOR_HEATER_3) - #define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE) -#elif HEATER_3_USES_THERMISTOR - #error "No heater 3 thermistor table specified" +#if TEMP_SENSOR_6 > 0 + #define TEMPTABLE_6 TT_NAME(TEMP_SENSOR_6) + #define TEMPTABLE_6_LEN COUNT(TEMPTABLE_6) #else - #define HEATER_3_TEMPTABLE nullptr - #define HEATER_3_TEMPTABLE_LEN 0 + #define TEMPTABLE_6 nullptr + #define TEMPTABLE_6_LEN 0 #endif -#if THERMISTOR_HEATER_4 - #define HEATER_4_TEMPTABLE TT_NAME(THERMISTOR_HEATER_4) - #define HEATER_4_TEMPTABLE_LEN COUNT(HEATER_4_TEMPTABLE) -#elif HEATER_4_USES_THERMISTOR - #error "No heater 4 thermistor table specified" +#if TEMP_SENSOR_7 > 0 + #define TEMPTABLE_7 TT_NAME(TEMP_SENSOR_7) + #define TEMPTABLE_7_LEN COUNT(TEMPTABLE_7) #else - #define HEATER_4_TEMPTABLE nullptr - #define HEATER_4_TEMPTABLE_LEN 0 + #define TEMPTABLE_7 nullptr + #define TEMPTABLE_7_LEN 0 #endif -#if THERMISTOR_HEATER_5 - #define HEATER_5_TEMPTABLE TT_NAME(THERMISTOR_HEATER_5) - #define HEATER_5_TEMPTABLE_LEN COUNT(HEATER_5_TEMPTABLE) -#elif HEATER_5_USES_THERMISTOR - #error "No heater 5 thermistor table specified" +#if TEMP_SENSOR_BED > 0 + #define TEMPTABLE_BED TT_NAME(TEMP_SENSOR_BED) + #define TEMPTABLE_BED_LEN COUNT(TEMPTABLE_BED) #else - #define HEATER_5_TEMPTABLE nullptr - #define HEATER_5_TEMPTABLE_LEN 0 + #define TEMPTABLE_BED_LEN 0 #endif -#if THERMISTOR_HEATER_6 - #define HEATER_6_TEMPTABLE TT_NAME(THERMISTOR_HEATER_6) - #define HEATER_6_TEMPTABLE_LEN COUNT(HEATER_6_TEMPTABLE) -#elif HEATER_6_USES_THERMISTOR - #error "No heater 6 thermistor table specified" +#if TEMP_SENSOR_CHAMBER > 0 + #define TEMPTABLE_CHAMBER TT_NAME(TEMP_SENSOR_CHAMBER) + #define TEMPTABLE_CHAMBER_LEN COUNT(TEMPTABLE_CHAMBER) #else - #define HEATER_6_TEMPTABLE nullptr - #define HEATER_6_TEMPTABLE_LEN 0 + #define TEMPTABLE_CHAMBER_LEN 0 #endif -#if THERMISTOR_HEATER_7 - #define HEATER_7_TEMPTABLE TT_NAME(THERMISTOR_HEATER_7) - #define HEATER_7_TEMPTABLE_LEN COUNT(HEATER_7_TEMPTABLE) -#elif HEATER_7_USES_THERMISTOR - #error "No heater 7 thermistor table specified" +#if TEMP_SENSOR_COOLER > 0 + #define TEMPTABLE_COOLER TT_NAME(TEMP_SENSOR_COOLER) + #define TEMPTABLE_COOLER_LEN COUNT(TEMPTABLE_COOLER) #else - #define HEATER_7_TEMPTABLE nullptr - #define HEATER_7_TEMPTABLE_LEN 0 + #define TEMPTABLE_COOLER_LEN 0 #endif -#ifdef THERMISTORBED - #define BED_TEMPTABLE TT_NAME(THERMISTORBED) - #define BED_TEMPTABLE_LEN COUNT(BED_TEMPTABLE) -#elif HEATER_BED_USES_THERMISTOR - #error "No bed thermistor table specified" +#if TEMP_SENSOR_PROBE > 0 + #define TEMPTABLE_PROBE TT_NAME(TEMP_SENSOR_PROBE) + #define TEMPTABLE_PROBE_LEN COUNT(TEMPTABLE_PROBE) #else - #define BED_TEMPTABLE_LEN 0 + #define TEMPTABLE_PROBE_LEN 0 #endif -#ifdef THERMISTORCHAMBER - #define CHAMBER_TEMPTABLE TT_NAME(THERMISTORCHAMBER) - #define CHAMBER_TEMPTABLE_LEN COUNT(CHAMBER_TEMPTABLE) -#elif HEATER_CHAMBER_USES_THERMISTOR - #error "No chamber thermistor table specified" +#if TEMP_SENSOR_BOARD > 0 + #define TEMPTABLE_BOARD TT_NAME(TEMP_SENSOR_BOARD) + #define TEMPTABLE_BOARD_LEN COUNT(TEMPTABLE_BOARD) #else - #define CHAMBER_TEMPTABLE_LEN 0 + #define TEMPTABLE_BOARD_LEN 0 #endif -#ifdef THERMISTORPROBE - #define PROBE_TEMPTABLE TT_NAME(THERMISTORPROBE) - #define PROBE_TEMPTABLE_LEN COUNT(PROBE_TEMPTABLE) -#elif HEATER_PROBE_USES_THERMISTOR - #error "No probe thermistor table specified" +#if TEMP_SENSOR_REDUNDANT > 0 + #define TEMPTABLE_REDUNDANT TT_NAME(TEMP_SENSOR_REDUNDANT) + #define TEMPTABLE_REDUNDANT_LEN COUNT(TEMPTABLE_REDUNDANT) #else - #define PROBE_TEMPTABLE_LEN 0 + #define TEMPTABLE_REDUNDANT_LEN 0 #endif // The SCAN_THERMISTOR_TABLE macro needs alteration? -static_assert( - HEATER_0_TEMPTABLE_LEN < 256 && HEATER_1_TEMPTABLE_LEN < 256 - && HEATER_2_TEMPTABLE_LEN < 256 && HEATER_3_TEMPTABLE_LEN < 256 - && HEATER_4_TEMPTABLE_LEN < 256 && HEATER_5_TEMPTABLE_LEN < 256 - && HEATER_6_TEMPTABLE_LEN < 256 && HEATER_7_TEMPTABLE_LEN < 256 - && BED_TEMPTABLE_LEN < 256 && CHAMBER_TEMPTABLE_LEN < 256 - && PROBE_TEMPTABLE_LEN < 256, - "Temperature conversion tables over 255 entries need special consideration." +static_assert(255 > TEMPTABLE_0_LEN || 255 > TEMPTABLE_1_LEN || 255 > TEMPTABLE_2_LEN || 255 > TEMPTABLE_3_LEN + || 255 > TEMPTABLE_4_LEN || 255 > TEMPTABLE_5_LEN || 255 > TEMPTABLE_6_LEN || 255 > TEMPTABLE_7_LEN + || 255 > TEMPTABLE_BED_LEN + || 255 > TEMPTABLE_CHAMBER_LEN + || 255 > TEMPTABLE_COOLER_LEN + || 255 > TEMPTABLE_PROBE_LEN + || 255 > TEMPTABLE_BOARD_LEN + || 255 > TEMPTABLE_REDUNDANT_LEN + , "Temperature conversion tables over 255 entries need special consideration." ); // Set the high and low raw values for the heaters // For thermistors the highest temperature results in the lowest ADC value // For thermocouples the highest temperature results in the highest ADC value -#define _TT_REV(N) REVERSE_TEMP_SENSOR_RANGE_##N -#define TT_REV(N) _TT_REV(N) +#define _TT_REV(N) REVERSE_TEMP_SENSOR_RANGE_##N +#define TT_REV(N) TERN0(TEMP_SENSOR_##N##_IS_THERMISTOR, DEFER4(_TT_REV)(TEMP_SENSOR_##N)) +#define _TT_REVRAW(N) !TEMP_SENSOR_##N##_IS_THERMISTOR +#define TT_REVRAW(N) (TT_REV(N) || _TT_REVRAW(N)) -#ifdef HEATER_0_TEMPTABLE - #if TT_REV(THERMISTOR_HEATER_0) - #define HEATER_0_SENSOR_MINTEMP_IND 0 - #define HEATER_0_SENSOR_MAXTEMP_IND HEATER_0_TEMPTABLE_LEN - 1 +#ifdef TEMPTABLE_0 + #if TT_REV(0) + #define TEMP_SENSOR_0_MINTEMP_IND 0 + #define TEMP_SENSOR_0_MAXTEMP_IND TEMPTABLE_0_LEN - 1 #else - #define HEATER_0_SENSOR_MINTEMP_IND HEATER_0_TEMPTABLE_LEN - 1 - #define HEATER_0_SENSOR_MAXTEMP_IND 0 + #define TEMP_SENSOR_0_MINTEMP_IND TEMPTABLE_0_LEN - 1 + #define TEMP_SENSOR_0_MAXTEMP_IND 0 #endif #endif -#ifdef HEATER_1_TEMPTABLE - #if TT_REV(THERMISTOR_HEATER_1) - #define HEATER_1_SENSOR_MINTEMP_IND 0 - #define HEATER_1_SENSOR_MAXTEMP_IND HEATER_1_TEMPTABLE_LEN - 1 +#ifdef TEMPTABLE_1 + #if TT_REV(1) + #define TEMP_SENSOR_1_MINTEMP_IND 0 + #define TEMP_SENSOR_1_MAXTEMP_IND TEMPTABLE_1_LEN - 1 #else - #define HEATER_1_SENSOR_MINTEMP_IND HEATER_1_TEMPTABLE_LEN - 1 - #define HEATER_1_SENSOR_MAXTEMP_IND 0 + #define TEMP_SENSOR_1_MINTEMP_IND TEMPTABLE_1_LEN - 1 + #define TEMP_SENSOR_1_MAXTEMP_IND 0 #endif #endif -#ifdef HEATER_2_TEMPTABLE - #if TT_REV(THERMISTOR_HEATER_2) - #define HEATER_2_SENSOR_MINTEMP_IND 0 - #define HEATER_2_SENSOR_MAXTEMP_IND HEATER_2_TEMPTABLE_LEN - 1 +#ifdef TEMPTABLE_2 + #if TT_REV(2) + #define TEMP_SENSOR_2_MINTEMP_IND 0 + #define TEMP_SENSOR_2_MAXTEMP_IND TEMPTABLE_2_LEN - 1 #else - #define HEATER_2_SENSOR_MINTEMP_IND HEATER_2_TEMPTABLE_LEN - 1 - #define HEATER_2_SENSOR_MAXTEMP_IND 0 + #define TEMP_SENSOR_2_MINTEMP_IND TEMPTABLE_2_LEN - 1 + #define TEMP_SENSOR_2_MAXTEMP_IND 0 #endif #endif -#ifdef HEATER_3_TEMPTABLE - #if TT_REV(THERMISTOR_HEATER_3) - #define HEATER_3_SENSOR_MINTEMP_IND 0 - #define HEATER_3_SENSOR_MAXTEMP_IND HEATER_3_TEMPTABLE_LEN - 1 +#ifdef TEMPTABLE_3 + #if TT_REV(3) + #define TEMP_SENSOR_3_MINTEMP_IND 0 + #define TEMP_SENSOR_3_MAXTEMP_IND TEMPTABLE_3_LEN - 1 #else - #define HEATER_3_SENSOR_MINTEMP_IND HEATER_3_TEMPTABLE_LEN - 1 - #define HEATER_3_SENSOR_MAXTEMP_IND 0 + #define TEMP_SENSOR_3_MINTEMP_IND TEMPTABLE_3_LEN - 1 + #define TEMP_SENSOR_3_MAXTEMP_IND 0 #endif #endif -#ifdef HEATER_4_TEMPTABLE - #if TT_REV(THERMISTOR_HEATER_4) - #define HEATER_4_SENSOR_MINTEMP_IND 0 - #define HEATER_4_SENSOR_MAXTEMP_IND HEATER_4_TEMPTABLE_LEN - 1 +#ifdef TEMPTABLE_4 + #if TT_REV(4) + #define TEMP_SENSOR_4_MINTEMP_IND 0 + #define TEMP_SENSOR_4_MAXTEMP_IND TEMPTABLE_4_LEN - 1 #else - #define HEATER_4_SENSOR_MINTEMP_IND HEATER_4_TEMPTABLE_LEN - 1 - #define HEATER_4_SENSOR_MAXTEMP_IND 0 + #define TEMP_SENSOR_4_MINTEMP_IND TEMPTABLE_4_LEN - 1 + #define TEMP_SENSOR_4_MAXTEMP_IND 0 #endif #endif -#ifdef HEATER_5_TEMPTABLE - #if TT_REV(THERMISTOR_HEATER_5) - #define HEATER_5_SENSOR_MINTEMP_IND 0 - #define HEATER_5_SENSOR_MAXTEMP_IND HEATER_5_TEMPTABLE_LEN - 1 +#ifdef TEMPTABLE_5 + #if TT_REV(5) + #define TEMP_SENSOR_5_MINTEMP_IND 0 + #define TEMP_SENSOR_5_MAXTEMP_IND TEMPTABLE_5_LEN - 1 #else - #define HEATER_5_SENSOR_MINTEMP_IND HEATER_5_TEMPTABLE_LEN - 1 - #define HEATER_5_SENSOR_MAXTEMP_IND 0 + #define TEMP_SENSOR_5_MINTEMP_IND TEMPTABLE_5_LEN - 1 + #define TEMP_SENSOR_5_MAXTEMP_IND 0 #endif #endif -#ifdef HEATER_6_TEMPTABLE - #if TT_REV(THERMISTOR_HEATER_6) - #define HEATER_6_SENSOR_MINTEMP_IND 0 - #define HEATER_6_SENSOR_MAXTEMP_IND HEATER_6_TEMPTABLE_LEN - 1 +#ifdef TEMPTABLE_6 + #if TT_REV(6) + #define TEMP_SENSOR_6_MINTEMP_IND 0 + #define TEMP_SENSOR_6_MAXTEMP_IND TEMPTABLE_6_LEN - 1 #else - #define HEATER_6_SENSOR_MINTEMP_IND HEATER_6_TEMPTABLE_LEN - 1 - #define HEATER_6_SENSOR_MAXTEMP_IND 0 + #define TEMP_SENSOR_6_MINTEMP_IND TEMPTABLE_6_LEN - 1 + #define TEMP_SENSOR_6_MAXTEMP_IND 0 #endif #endif -#ifdef HEATER_7_TEMPTABLE - #if TT_REV(THERMISTOR_HEATER_7) - #define HEATER_7_SENSOR_MINTEMP_IND 0 - #define HEATER_7_SENSOR_MAXTEMP_IND HEATER_7_TEMPTABLE_LEN - 1 +#ifdef TEMPTABLE_7 + #if TT_REV(7) + #define TEMP_SENSOR_7_MINTEMP_IND 0 + #define TEMP_SENSOR_7_MAXTEMP_IND TEMPTABLE_7_LEN - 1 #else - #define HEATER_7_SENSOR_MINTEMP_IND HEATER_7_TEMPTABLE_LEN - 1 - #define HEATER_7_SENSOR_MAXTEMP_IND 0 + #define TEMP_SENSOR_7_MINTEMP_IND TEMPTABLE_7_LEN - 1 + #define TEMP_SENSOR_7_MAXTEMP_IND 0 #endif #endif -#ifndef HEATER_0_RAW_HI_TEMP - #if TT_REV(THERMISTOR_HEATER_0) || !HEATER_0_USES_THERMISTOR - #define HEATER_0_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_0_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_0_RAW_HI_TEMP + #if TT_REVRAW(0) + #define TEMP_SENSOR_0_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_0_RAW_LO_TEMP 0 + #else + #define TEMP_SENSOR_0_RAW_HI_TEMP 0 + #define TEMP_SENSOR_0_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #endif +#endif +#ifndef TEMP_SENSOR_1_RAW_HI_TEMP + #if TT_REVRAW(1) + #define TEMP_SENSOR_1_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_1_RAW_LO_TEMP 0 + #else + #define TEMP_SENSOR_1_RAW_HI_TEMP 0 + #define TEMP_SENSOR_1_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #endif +#endif +#ifndef TEMP_SENSOR_2_RAW_HI_TEMP + #if TT_REVRAW(2) + #define TEMP_SENSOR_2_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_2_RAW_LO_TEMP 0 + #else + #define TEMP_SENSOR_2_RAW_HI_TEMP 0 + #define TEMP_SENSOR_2_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #endif +#endif +#ifndef TEMP_SENSOR_3_RAW_HI_TEMP + #if TT_REVRAW(3) + #define TEMP_SENSOR_3_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_3_RAW_LO_TEMP 0 #else - #define HEATER_0_RAW_HI_TEMP 0 - #define HEATER_0_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_3_RAW_HI_TEMP 0 + #define TEMP_SENSOR_3_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_1_RAW_HI_TEMP - #if TT_REV(THERMISTOR_HEATER_1) || !HEATER_1_USES_THERMISTOR - #define HEATER_1_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_1_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_4_RAW_HI_TEMP + #if TT_REVRAW(4) + #define TEMP_SENSOR_4_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_4_RAW_LO_TEMP 0 #else - #define HEATER_1_RAW_HI_TEMP 0 - #define HEATER_1_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_4_RAW_HI_TEMP 0 + #define TEMP_SENSOR_4_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_2_RAW_HI_TEMP - #if TT_REV(THERMISTOR_HEATER_2) || !HEATER_2_USES_THERMISTOR - #define HEATER_2_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_2_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_5_RAW_HI_TEMP + #if TT_REVRAW(5) + #define TEMP_SENSOR_5_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_5_RAW_LO_TEMP 0 #else - #define HEATER_2_RAW_HI_TEMP 0 - #define HEATER_2_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_5_RAW_HI_TEMP 0 + #define TEMP_SENSOR_5_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_3_RAW_HI_TEMP - #if TT_REV(THERMISTOR_HEATER_3) || !HEATER_3_USES_THERMISTOR - #define HEATER_3_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_3_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_6_RAW_HI_TEMP + #if TT_REVRAW(6) + #define TEMP_SENSOR_6_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_6_RAW_LO_TEMP 0 #else - #define HEATER_3_RAW_HI_TEMP 0 - #define HEATER_3_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_6_RAW_HI_TEMP 0 + #define TEMP_SENSOR_6_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_4_RAW_HI_TEMP - #if TT_REV(THERMISTOR_HEATER_4) || !HEATER_4_USES_THERMISTOR - #define HEATER_4_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_4_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_7_RAW_HI_TEMP + #if TT_REVRAW(7) + #define TEMP_SENSOR_7_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_7_RAW_LO_TEMP 0 #else - #define HEATER_4_RAW_HI_TEMP 0 - #define HEATER_4_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_7_RAW_HI_TEMP 0 + #define TEMP_SENSOR_7_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_5_RAW_HI_TEMP - #if TT_REV(THERMISTOR_HEATER_5) || !HEATER_5_USES_THERMISTOR - #define HEATER_5_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_5_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_BED_RAW_HI_TEMP + #if TT_REVRAW(BED) + #define TEMP_SENSOR_BED_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_BED_RAW_LO_TEMP 0 #else - #define HEATER_5_RAW_HI_TEMP 0 - #define HEATER_5_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_BED_RAW_HI_TEMP 0 + #define TEMP_SENSOR_BED_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_6_RAW_HI_TEMP - #if TT_REV(THERMISTOR_HEATER_6) || !HEATER_6_USES_THERMISTOR - #define HEATER_6_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_6_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_CHAMBER_RAW_HI_TEMP + #if TT_REVRAW(CHAMBER) + #define TEMP_SENSOR_CHAMBER_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_CHAMBER_RAW_LO_TEMP 0 #else - #define HEATER_6_RAW_HI_TEMP 0 - #define HEATER_6_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_CHAMBER_RAW_HI_TEMP 0 + #define TEMP_SENSOR_CHAMBER_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_7_RAW_HI_TEMP - #if TT_REV(THERMISTOR_HEATER_7) || !HEATER_7_USES_THERMISTOR - #define HEATER_7_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_7_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_COOLER_RAW_HI_TEMP + #if TT_REVRAW(COOLER) + #define TEMP_SENSOR_COOLER_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_COOLER_RAW_LO_TEMP 0 #else - #define HEATER_7_RAW_HI_TEMP 0 - #define HEATER_7_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_COOLER_RAW_HI_TEMP 0 + #define TEMP_SENSOR_COOLER_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_BED_RAW_HI_TEMP - #if TT_REV(THERMISTORBED) || !HEATER_BED_USES_THERMISTOR - #define HEATER_BED_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_BED_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_PROBE_RAW_HI_TEMP + #if TT_REVRAW(PROBE) + #define TEMP_SENSOR_PROBE_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_PROBE_RAW_LO_TEMP 0 #else - #define HEATER_BED_RAW_HI_TEMP 0 - #define HEATER_BED_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_PROBE_RAW_HI_TEMP 0 + #define TEMP_SENSOR_PROBE_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_CHAMBER_RAW_HI_TEMP - #if TT_REV(THERMISTORCHAMBER) || !HEATER_CHAMBER_USES_THERMISTOR - #define HEATER_CHAMBER_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_CHAMBER_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_BOARD_RAW_HI_TEMP + #if TT_REVRAW(BOARD) + #define TEMP_SENSOR_BOARD_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_BOARD_RAW_LO_TEMP 0 #else - #define HEATER_CHAMBER_RAW_HI_TEMP 0 - #define HEATER_CHAMBER_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_BOARD_RAW_HI_TEMP 0 + #define TEMP_SENSOR_BOARD_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif -#ifndef HEATER_PROBE_RAW_HI_TEMP - #if TT_REV(THERMISTORPROBE) || !HEATER_PROBE_USES_THERMISTOR - #define HEATER_PROBE_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE - #define HEATER_PROBE_RAW_LO_TEMP 0 +#ifndef TEMP_SENSOR_REDUNDANT_RAW_HI_TEMP + #if TT_REVRAW(REDUNDANT) + #define TEMP_SENSOR_REDUNDANT_RAW_HI_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_REDUNDANT_RAW_LO_TEMP 0 #else - #define HEATER_PROBE_RAW_HI_TEMP 0 - #define HEATER_PROBE_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE + #define TEMP_SENSOR_REDUNDANT_RAW_HI_TEMP 0 + #define TEMP_SENSOR_REDUNDANT_RAW_LO_TEMP MAX_RAW_THERMISTOR_VALUE #endif #endif +#undef __TT_REV #undef _TT_REV #undef TT_REV +#undef _TT_REVRAW +#undef TT_REVRAW diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 4278e6be26ee..8f419205f32c 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -49,10 +49,16 @@ bool toolchange_extruder_ready[EXTRUDERS]; #endif -#if ENABLED(MAGNETIC_PARKING_EXTRUDER) || defined(EVENT_GCODE_AFTER_TOOLCHANGE) || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0) +#if EITHER(MAGNETIC_PARKING_EXTRUDER, TOOL_SENSOR) \ + || defined(EVENT_GCODE_TOOLCHANGE_T0) || defined(EVENT_GCODE_TOOLCHANGE_T1) || defined(EVENT_GCODE_AFTER_TOOLCHANGE) \ + || (ENABLED(PARKING_EXTRUDER) && PARKING_EXTRUDER_SOLENOIDS_DELAY > 0) #include "../gcode/gcode.h" #endif +#if ENABLED(TOOL_SENSOR) + #include "../lcd/marlinui.h" +#endif + #if ENABLED(DUAL_X_CARRIAGE) #include "stepper.h" #endif @@ -109,10 +115,7 @@ void move_extruder_servo(const uint8_t e) { planner.synchronize(); - #if EXTRUDERS & 1 - if (e < EXTRUDERS - 1) - #endif - { + if ((EXTRUDERS & 1) && e < EXTRUDERS - 1) { MOVE_SERVO(_SERVO_NR(e), servo_angles[_SERVO_NR(e)][e & 1]); safe_delay(500); } @@ -147,11 +150,11 @@ #endif // SWITCHING_NOZZLE -inline void _line_to_current(const AxisEnum fr_axis, const float fscale=1) { +void _line_to_current(const AxisEnum fr_axis, const float fscale=1) { line_to_current_position(planner.settings.max_feedrate_mm_s[fr_axis] * fscale); } -inline void slow_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.5f); } -inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis); } +void slow_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.2f); } +void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0.5f); } #if ENABLED(MAGNETIC_PARKING_EXTRUDER) @@ -186,7 +189,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation; - DEBUG_ECHOPAIR("(1) Move extruder ", int(new_tool)); + DEBUG_ECHOPGM("(1) Move extruder ", new_tool); DEBUG_POS(" to new extruder ParkPos", current_position); planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool); @@ -196,7 +199,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.x = grabpos + offsetcompensation; - DEBUG_ECHOPAIR("(2) Couple extruder ", int(new_tool)); + DEBUG_ECHOPGM("(2) Couple extruder ", new_tool); DEBUG_POS(" to new extruder GrabPos", current_position); planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool); @@ -209,7 +212,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.x = mpe_settings.parking_xpos[new_tool] + offsetcompensation; - DEBUG_ECHOPAIR("(3) Move extruder ", int(new_tool)); + DEBUG_ECHOPGM("(3) Move extruder ", new_tool); DEBUG_POS(" back to new extruder ParkPos", current_position); planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool); @@ -219,7 +222,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.x = mpe_settings.parking_xpos[active_extruder] + (active_extruder == 0 ? MPE_TRAVEL_DISTANCE : -MPE_TRAVEL_DISTANCE) + offsetcompensation; - DEBUG_ECHOPAIR("(4) Move extruder ", int(new_tool)); + DEBUG_ECHOPGM("(4) Move extruder ", new_tool); DEBUG_POS(" close to old extruder ParkPos", current_position); planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool); @@ -229,7 +232,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.x = mpe_settings.parking_xpos[active_extruder] + offsetcompensation; - DEBUG_ECHOPAIR("(5) Park extruder ", int(new_tool)); + DEBUG_ECHOPGM("(5) Park extruder ", new_tool); DEBUG_POS(" at old extruder ParkPos", current_position); planner.buffer_line(current_position, mpe_settings.slow_feedrate, new_tool); @@ -239,7 +242,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.x = oldx; - DEBUG_ECHOPAIR("(6) Move extruder ", int(new_tool)); + DEBUG_ECHOPGM("(6) Move extruder ", new_tool); DEBUG_POS(" to starting position", current_position); planner.buffer_line(current_position, mpe_settings.fast_feedrate, new_tool); @@ -274,9 +277,9 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a if (homed_towards_final_tool) { pe_solenoid_magnet_off(1 - final_tool); - DEBUG_ECHOLNPAIR("Disengage magnet", (int)(1 - final_tool)); + DEBUG_ECHOLNPGM("Disengage magnet", 1 - final_tool); pe_solenoid_magnet_on(final_tool); - DEBUG_ECHOLNPAIR("Engage magnet", (int)final_tool); + DEBUG_ECHOLNPGM("Engage magnet", final_tool); parking_extruder_set_parked(false); return false; } @@ -315,7 +318,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a if (!extruder_parked) { current_position.x = parkingposx[active_extruder] + x_offset; - DEBUG_ECHOLNPAIR("(1) Park extruder ", int(active_extruder)); + DEBUG_ECHOLNPGM("(1) Park extruder ", active_extruder); DEBUG_POS("Moving ParkPos", current_position); fast_line_to_current(X_AXIS); @@ -359,7 +362,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a // STEP 6 - current_position.x = midpos - TERN0(HAS_HOTEND_OFFSET, hotend_offset[new_tool].x); + current_position.x = DIFF_TERN(HAS_HOTEND_OFFSET, midpos, hotend_offset[new_tool].x); DEBUG_SYNCHRONIZE(); DEBUG_POS("(6) Move midway between hotends", current_position); @@ -370,7 +373,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a DEBUG_POS("PE Tool-Change done.", current_position); parking_extruder_set_parked(false); } - else if (do_solenoid_activation) { // && nomove == true + else if (do_solenoid_activation) { // Deactivate current extruder solenoid pe_solenoid_set_pin_state(active_extruder, !PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE); // Engage new extruder magnetic field @@ -384,12 +387,117 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a #if ENABLED(SWITCHING_TOOLHEAD) - inline void swt_lock(const bool locked=true) { - const uint16_t swt_angles[2] = SWITCHING_TOOLHEAD_SERVO_ANGLES; - MOVE_SERVO(SWITCHING_TOOLHEAD_SERVO_NR, swt_angles[locked ? 0 : 1]); + // Return a bitmask of tool sensor states + inline uint8_t poll_tool_sensor_pins() { + return (0 + #if ENABLED(TOOL_SENSOR) + #if PIN_EXISTS(TOOL_SENSOR1) + | (READ(TOOL_SENSOR1_PIN) << 0) + #endif + #if PIN_EXISTS(TOOL_SENSOR2) + | (READ(TOOL_SENSOR2_PIN) << 1) + #endif + #if PIN_EXISTS(TOOL_SENSOR3) + | (READ(TOOL_SENSOR3_PIN) << 2) + #endif + #if PIN_EXISTS(TOOL_SENSOR4) + | (READ(TOOL_SENSOR4_PIN) << 3) + #endif + #if PIN_EXISTS(TOOL_SENSOR5) + | (READ(TOOL_SENSOR5_PIN) << 4) + #endif + #if PIN_EXISTS(TOOL_SENSOR6) + | (READ(TOOL_SENSOR6_PIN) << 5) + #endif + #if PIN_EXISTS(TOOL_SENSOR7) + | (READ(TOOL_SENSOR7_PIN) << 6) + #endif + #if PIN_EXISTS(TOOL_SENSOR8) + | (READ(TOOL_SENSOR8_PIN) << 7) + #endif + #endif + ); + } + + #if ENABLED(TOOL_SENSOR) + + bool tool_sensor_disabled; // = false + + uint8_t check_tool_sensor_stats(const uint8_t tool_index, const bool kill_on_error/*=false*/, const bool disable/*=false*/) { + static uint8_t sensor_tries; // = 0 + for (;;) { + if (poll_tool_sensor_pins() == _BV(tool_index)) { + sensor_tries = 0; + return tool_index; + } + else if (kill_on_error && (!tool_sensor_disabled || disable)) { + sensor_tries++; + if (sensor_tries > 10) kill(PSTR("Tool Sensor error")); + safe_delay(5); + } + else { + sensor_tries++; + if (sensor_tries > 10) return -1; + safe_delay(5); + } + } + } + + #endif + + inline void switching_toolhead_lock(const bool locked) { + #ifdef SWITCHING_TOOLHEAD_SERVO_ANGLES + const uint16_t swt_angles[2] = SWITCHING_TOOLHEAD_SERVO_ANGLES; + MOVE_SERVO(SWITCHING_TOOLHEAD_SERVO_NR, swt_angles[locked ? 0 : 1]); + #elif PIN_EXISTS(SWT_SOLENOID) + OUT_WRITE(SWT_SOLENOID_PIN, locked); + gcode.dwell(10); + #else + #error "No toolhead locking mechanism configured." + #endif } - void swt_init() { swt_lock(); } + #include + + void swt_init() { + switching_toolhead_lock(true); + + #if ENABLED(TOOL_SENSOR) + // Init tool sensors + #if PIN_EXISTS(TOOL_SENSOR1) + SET_INPUT_PULLUP(TOOL_SENSOR1_PIN); + #endif + #if PIN_EXISTS(TOOL_SENSOR2) + SET_INPUT_PULLUP(TOOL_SENSOR2_PIN); + #endif + #if PIN_EXISTS(TOOL_SENSOR3) + SET_INPUT_PULLUP(TOOL_SENSOR3_PIN); + #endif + #if PIN_EXISTS(TOOL_SENSOR4) + SET_INPUT_PULLUP(TOOL_SENSOR4_PIN); + #endif + #if PIN_EXISTS(TOOL_SENSOR5) + SET_INPUT_PULLUP(TOOL_SENSOR5_PIN); + #endif + #if PIN_EXISTS(TOOL_SENSOR6) + SET_INPUT_PULLUP(TOOL_SENSOR6_PIN); + #endif + #if PIN_EXISTS(TOOL_SENSOR7) + SET_INPUT_PULLUP(TOOL_SENSOR7_PIN); + #endif + #if PIN_EXISTS(TOOL_SENSOR8) + SET_INPUT_PULLUP(TOOL_SENSOR8_PIN); + #endif + + if (check_tool_sensor_stats(0)) { + ui.set_status_P("TC error"); + switching_toolhead_lock(false); + while (check_tool_sensor_stats(0)) { /* nada */ } + switching_toolhead_lock(true); + } + ui.set_status_P("TC Success"); + #endif + } inline void switching_toolhead_tool_change(const uint8_t new_tool, bool no_move/*=false*/) { if (no_move) return; @@ -398,6 +506,8 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a const float placexpos = toolheadposx[active_extruder], grabxpos = toolheadposx[new_tool]; + (void)check_tool_sensor_stats(active_extruder, true); + /** * 1. Move to switch position of current toolhead * 2. Unlock tool and drop it in the dock @@ -411,7 +521,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.x = placexpos; - DEBUG_ECHOLNPAIR("(1) Place old tool ", int(active_extruder)); + DEBUG_ECHOLNPGM("(1) Place old tool ", active_extruder); DEBUG_POS("Move X SwitchPos", current_position); fast_line_to_current(X_AXIS); @@ -421,13 +531,14 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a DEBUG_SYNCHRONIZE(); DEBUG_POS("Move Y SwitchPos + Security", current_position); - fast_line_to_current(Y_AXIS); + slow_line_to_current(Y_AXIS); // 2. Unlock tool and drop it in the dock + TERN_(TOOL_SENSOR, tool_sensor_disabled = true); planner.synchronize(); DEBUG_ECHOLNPGM("(2) Unlock and Place Toolhead"); - swt_lock(false); + switching_toolhead_lock(false); safe_delay(500); current_position.y = SWITCHING_TOOLHEAD_Y_POS; @@ -440,7 +551,9 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.y -= SWITCHING_TOOLHEAD_Y_CLEAR; DEBUG_POS("Move back Y clear", current_position); - fast_line_to_current(Y_AXIS); // move away from docked toolhead + slow_line_to_current(Y_AXIS); // move away from docked toolhead + + (void)check_tool_sensor_stats(active_extruder); // 3. Move to the new toolhead @@ -457,7 +570,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a DEBUG_SYNCHRONIZE(); DEBUG_POS("Move Y SwitchPos + Security", current_position); - fast_line_to_current(Y_AXIS); + slow_line_to_current(Y_AXIS); // 4. Grab and lock the new toolhead @@ -472,14 +585,19 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a // Wait for move to finish, pause 0.2s, move servo, pause 0.5s planner.synchronize(); safe_delay(200); - swt_lock(); + + (void)check_tool_sensor_stats(new_tool, true, true); + + switching_toolhead_lock(true); safe_delay(500); current_position.y -= SWITCHING_TOOLHEAD_Y_CLEAR; DEBUG_POS("Move back Y clear", current_position); - fast_line_to_current(Y_AXIS); // Move away from docked toolhead + slow_line_to_current(Y_AXIS); // Move away from docked toolhead planner.synchronize(); // Always sync the final move + (void)check_tool_sensor_stats(new_tool, true, true); + DEBUG_POS("ST Tool-Change done.", current_position); } @@ -509,7 +627,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.y = SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR; - SERIAL_ECHOLNPAIR("(1) Place old tool ", int(active_extruder)); + SERIAL_ECHOLNPGM("(1) Place old tool ", active_extruder); DEBUG_POS("Move Y SwitchPos + Security", current_position); fast_line_to_current(Y_AXIS); @@ -641,7 +759,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a // 2. Move to position near active extruder parking DEBUG_SYNCHRONIZE(); - DEBUG_ECHOLNPAIR("(2) Move near active extruder parking", active_extruder); + DEBUG_ECHOLNPGM("(2) Move near active extruder parking", active_extruder); DEBUG_POS("Moving ParkPos", current_position); current_position.set(hoffs.x + placexpos, @@ -651,7 +769,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a // 3. Move gently to park position of active extruder DEBUG_SYNCHRONIZE(); - SERIAL_ECHOLNPAIR("(3) Move gently to park position of active extruder", active_extruder); + SERIAL_ECHOLNPGM("(3) Move gently to park position of active extruder", active_extruder); DEBUG_POS("Moving ParkPos", current_position); current_position.y -= SWITCHING_TOOLHEAD_Y_CLEAR; @@ -706,10 +824,10 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a #endif // ELECTROMAGNETIC_SWITCHING_TOOLHEAD -#if EXTRUDERS +#if HAS_EXTRUDERS inline void invalid_extruder_error(const uint8_t e) { SERIAL_ECHO_START(); - SERIAL_CHAR('T'); SERIAL_ECHO((int)e); + SERIAL_CHAR('T'); SERIAL_ECHO(e); SERIAL_CHAR(' '); SERIAL_ECHOLNPGM(STR_INVALID_EXTRUDER); } #endif @@ -740,7 +858,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a && IsRunning() && !no_move // ...and movement is permitted && (delayed_move_time || current_position.x != xhome) // ...and delayed_move_time is set OR not "already parked"... ) { - DEBUG_ECHOLNPAIR("MoveX to ", xhome); + DEBUG_ECHOLNPGM("MoveX to ", xhome); current_position.x = xhome; line_to_current_position(planner.settings.max_feedrate_mm_s[X_AXIS]); // Park the current head planner.synchronize(); @@ -760,7 +878,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a current_position.x = inactive_extruder_x; // Save the inactive extruder's position (from the old current_position) inactive_extruder_x = destination.x; - DEBUG_ECHOLNPAIR("DXC Full Control curr.x=", current_position.x, " dest.x=", destination.x); + DEBUG_ECHOLNPGM("DXC Full Control curr.x=", current_position.x, " dest.x=", destination.x); break; case DXC_AUTO_PARK_MODE: idex_set_parked(); @@ -772,7 +890,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a // Ensure X axis DIR pertains to the correct carriage stepper.set_directions(); - DEBUG_ECHOLNPAIR("Active extruder parked: ", active_extruder_parked ? "yes" : "no"); + DEBUG_ECHOLNPGM("Active extruder parked: ", active_extruder_parked ? "yes" : "no"); DEBUG_POS("New extruder (parked)", current_position); } @@ -800,9 +918,7 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a if (ok) { // Do a small lift to avoid the workpiece in the move back (below) current_position.z += toolchange_settings.z_raise; - #if HAS_SOFTWARE_ENDSTOPS - NOMORE(current_position.z, soft_endstop.max.z); - #endif + TERN_(HAS_SOFTWARE_ENDSTOPS, NOMORE(current_position.z, soft_endstop.max.z)); fast_line_to_current(Z_AXIS); planner.synchronize(); } @@ -836,19 +952,20 @@ inline void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_a #if ENABLED(TOOLCHANGE_PARK) if (ok) { #if ENABLED(TOOLCHANGE_NO_RETURN) - do_blocking_move_to_z(destination.z, planner.settings.max_feedrate_mm_s[Z_AXIS]); - #else - do_blocking_move_to(destination, MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)); + const float temp = destination.z; + destination = current_position; + destination.z = temp; #endif + prepare_internal_move_to_destination(TERN(TOOLCHANGE_NO_RETURN, planner.settings.max_feedrate_mm_s[Z_AXIS], MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE))); } #endif // Cutting recover unscaled_e_move(toolchange_settings.extra_resume + TOOLCHANGE_FS_WIPE_RETRACT, MMM_TO_MMS(toolchange_settings.unretract_speed)); - planner.synchronize(); + // Resume at the old E position current_position.e = destination.e; - sync_plan_position_e(); // Resume at the old E position + sync_plan_position_e(); } } @@ -927,12 +1044,12 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { #endif // First tool priming. To prime again, reboot the machine. - #if BOTH(TOOLCHANGE_FILAMENT_SWAP, TOOLCHANGE_FS_PRIME_FIRST_USED) + #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED) static bool first_tool_is_primed = false; if (new_tool == old_tool && !first_tool_is_primed && enable_first_prime) { tool_change_prime(); first_tool_is_primed = true; - toolchange_extruder_ready[old_tool] = true; // Primed and initialized + TERN_(TOOLCHANGE_FS_INIT_BEFORE_SWAP, toolchange_extruder_ready[old_tool] = true); // Primed and initialized } #endif @@ -949,9 +1066,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { if (can_move_away && TERN1(TOOLCHANGE_PARK, toolchange_settings.enable_park)) { // Do a small lift to avoid the workpiece in the move back (below) current_position.z += toolchange_settings.z_raise; - #if HAS_SOFTWARE_ENDSTOPS - NOMORE(current_position.z, soft_endstop.max.z); - #endif + TERN_(HAS_SOFTWARE_ENDSTOPS, NOMORE(current_position.z, soft_endstop.max.z)); fast_line_to_current(Z_AXIS); planner.synchronize(); } @@ -969,12 +1084,10 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { if (ENABLED(SINGLENOZZLE)) { active_extruder = new_tool; return; } } else { - #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED) - // For first new tool, change without unloading the old. 'Just prime/init the new' - if (first_tool_is_primed) - unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed)); - first_tool_is_primed = true; // The first new tool will be primed by toolchanging - #endif + // For first new tool, change without unloading the old. 'Just prime/init the new' + if (TERN1(TOOLCHANGE_FS_PRIME_FIRST_USED, first_tool_is_primed)) + unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed)); + TERN_(TOOLCHANGE_FS_PRIME_FIRST_USED, first_tool_is_primed = true); // The first new tool will be primed by toolchanging } } #endif @@ -1000,9 +1113,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { if (can_move_away && TERN1(TOOLCHANGE_PARK, toolchange_settings.enable_park)) { // Do a small lift to avoid the workpiece in the move back (below) current_position.z += toolchange_settings.z_raise; - #if HAS_SOFTWARE_ENDSTOPS - NOMORE(current_position.z, soft_endstop.max.z); - #endif + TERN_(HAS_SOFTWARE_ENDSTOPS, NOMORE(current_position.z, soft_endstop.max.z)); fast_line_to_current(Z_AXIS); } #endif @@ -1052,18 +1163,21 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { move_nozzle_servo(new_tool); #endif - // Set the new active extruder - if (DISABLED(DUAL_X_CARRIAGE)) active_extruder = new_tool; + IF_DISABLED(DUAL_X_CARRIAGE, active_extruder = new_tool); // Set the new active extruder + + TERN_(TOOL_SENSOR, tool_sensor_disabled = false); + + (void)check_tool_sensor_stats(active_extruder, true); // The newly-selected extruder XYZ is actually at... - DEBUG_ECHOLNPAIR("Offset Tool XYZ by { ", diff.x, ", ", diff.y, ", ", diff.z, " }"); + DEBUG_ECHOLNPGM("Offset Tool XYZ by { ", diff.x, ", ", diff.y, ", ", diff.z, " }"); current_position += diff; // Tell the planner the new "current position" sync_plan_position(); #if ENABLED(DELTA) - //LOOP_XYZ(i) update_software_endstops(i); // or modify the constrain function + //LOOP_LINEAR_AXES(i) update_software_endstops(i); // or modify the constrain function const bool safe_to_move = current_position.z < delta_clip_start_height - 1; #else constexpr bool safe_to_move = true; @@ -1073,7 +1187,9 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { const bool should_move = safe_to_move && !no_move && IsRunning(); if (should_move) { - TERN_(SINGLENOZZLE_STANDBY_TEMP, thermalManager.singlenozzle_change(old_tool, new_tool)); + #if EITHER(SINGLENOZZLE_STANDBY_TEMP, SINGLENOZZLE_STANDBY_FAN) + thermalManager.singlenozzle_change(old_tool, new_tool); + #endif #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) if (should_swap && !too_cold) { @@ -1112,7 +1228,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { #if ENABLED(MAGNETIC_SWITCHING_TOOLHEAD) // If the original position is within tool store area, go to X origin at once if (destination.y < SWITCHING_TOOLHEAD_Y_POS + SWITCHING_TOOLHEAD_Y_CLEAR) { - current_position.x = 0; + current_position.x = X_MIN_POS; planner.buffer_line(current_position, planner.settings.max_feedrate_mm_s[X_AXIS], new_tool); planner.synchronize(); } @@ -1191,13 +1307,24 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { TERN_(HAS_FANMUX, fanmux_switch(active_extruder)); - #ifdef EVENT_GCODE_AFTER_TOOLCHANGE - if (!no_move && TERN1(DUAL_X_CARRIAGE, dual_x_carriage_mode == DXC_AUTO_PARK_MODE)) - gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_AFTER_TOOLCHANGE)); - #endif + if (ENABLED(EVENT_GCODE_TOOLCHANGE_ALWAYS_RUN) || !no_move) { + #ifdef EVENT_GCODE_TOOLCHANGE_T0 + if (new_tool == 0) + gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_TOOLCHANGE_T0)); + #endif - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(STR_ACTIVE_EXTRUDER, int(active_extruder)); + #ifdef EVENT_GCODE_TOOLCHANGE_T1 + if (new_tool == 1) + gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_TOOLCHANGE_T1)); + #endif + + #ifdef EVENT_GCODE_AFTER_TOOLCHANGE + if (TERN1(DUAL_X_CARRIAGE, dual_x_carriage_mode == DXC_AUTO_PARK_MODE)) + gcode.process_subcommands_now_P(PSTR(EVENT_GCODE_AFTER_TOOLCHANGE)); + #endif + } + + SERIAL_ECHO_MSG(STR_ACTIVE_EXTRUDER, active_extruder); #endif // HAS_MULTI_EXTRUDER } @@ -1261,9 +1388,9 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { // Migrate the temperature to the new hotend #if HAS_MULTI_HOTEND - thermalManager.setTargetHotend(thermalManager.temp_hotend[active_extruder].target, migration_extruder); + thermalManager.setTargetHotend(thermalManager.degTargetHotend(active_extruder), migration_extruder); TERN_(AUTOTEMP, planner.autotemp_update()); - TERN_(HAS_DISPLAY, thermalManager.set_heating_message(0)); + thermalManager.set_heating_message(0); thermalManager.wait_for_hotend(active_extruder); #endif diff --git a/Marlin/src/module/tool_change.h b/Marlin/src/module/tool_change.h index 4f88ca7432b4..bbdc0b686278 100644 --- a/Marlin/src/module/tool_change.h +++ b/Marlin/src/module/tool_change.h @@ -21,8 +21,7 @@ */ #pragma once -#include "../inc/MarlinConfigPre.h" -#include "../core/types.h" +#include "../inc/MarlinConfig.h" //#define DEBUG_TOOLCHANGE_MIGRATION_FEATURE @@ -43,7 +42,7 @@ extern toolchange_settings_t toolchange_settings; #if ENABLED(TOOLCHANGE_FILAMENT_SWAP) - extern void tool_change_prime(); + void tool_change_prime(); #endif #if ENABLED(TOOLCHANGE_FS_PRIME_FIRST_USED) @@ -80,14 +79,9 @@ #if ENABLED(PARKING_EXTRUDER) - #if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT) - #define PE_MAGNET_ON_STATE !PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE - #else - #define PE_MAGNET_ON_STATE PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE - #endif - void pe_solenoid_set_pin_state(const uint8_t extruder_num, const uint8_t state); + #define PE_MAGNET_ON_STATE TERN_(PARKING_EXTRUDER_SOLENOIDS_INVERT, !)PARKING_EXTRUDER_SOLENOIDS_PINS_ACTIVE inline void pe_solenoid_magnet_on(const uint8_t extruder_num) { pe_solenoid_set_pin_state(extruder_num, PE_MAGNET_ON_STATE); } inline void pe_solenoid_magnet_off(const uint8_t extruder_num) { pe_solenoid_set_pin_state(extruder_num, !PE_MAGNET_ON_STATE); } @@ -114,9 +108,17 @@ #endif -TERN_(ELECTROMAGNETIC_SWITCHING_TOOLHEAD, void est_init()); +#if ENABLED(ELECTROMAGNETIC_SWITCHING_TOOLHEAD) + void est_init(); +#elif ENABLED(SWITCHING_TOOLHEAD) + void swt_init(); +#endif -TERN_(SWITCHING_TOOLHEAD, void swt_init()); +#if ENABLED(TOOL_SENSOR) + uint8_t check_tool_sensor_stats(const uint8_t active_tool, const bool kill_on_error=false, const bool disable=false); +#else + inline uint8_t check_tool_sensor_stats(const uint8_t, const bool=false, const bool=false) { return 0; } +#endif /** * Perform a tool-change, which may result in moving the diff --git a/Marlin/src/pins/esp32/env_validate.h b/Marlin/src/pins/esp32/env_validate.h new file mode 100644 index 000000000000..ce14c33414ad --- /dev/null +++ b/Marlin/src/pins/esp32/env_validate.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if NOT_TARGET(ARDUINO_ARCH_ESP32) + #error "Oops! Select an ESP32 board in 'Tools > Board.'" +#endif diff --git a/Marlin/src/pins/esp32/pins_E4D.h b/Marlin/src/pins/esp32/pins_E4D.h index 4a5a2bf9b0a8..54621f36c1e6 100644 --- a/Marlin/src/pins/esp32/pins_E4D.h +++ b/Marlin/src/pins/esp32/pins_E4D.h @@ -22,20 +22,21 @@ #pragma once /** - * E4d@Box pin assignments - * E4d@Box is a small factor 3D printer control board based on the ESP32 microcontroller for Laser, CNC and 3d printers - * for more info check https://atbox.tech/ and join to Facebook page E4d@box. + * E4d@box pin assignments + * + * Small factor 3D printer control board based on the ESP32 microcontroller for Laser, CNC and 3D printers. + * More info at https://atbox.tech/ and the E4d@box Facebook page. */ -#if NOT_TARGET(ARDUINO_ARCH_ESP32) - #error "Oops! Select an ESP32 board in 'Tools > Board.'" -#elif EXTRUDERS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if EXTRUDERS > 1 || E_STEPPERS > 1 #error "E4d@box only supports one E Stepper. Comment out this line to continue." #elif HOTENDS > 1 #error "E4d@box only supports one hotend / E-stepper. Comment out this line to continue." #endif -#define BOARD_INFO_NAME "E4D@BOX" +#define BOARD_INFO_NAME "E4d@box" #define BOARD_WEBSITE_URL "github.com/Exilaus/E4d@box" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME diff --git a/Marlin/src/pins/esp32/pins_ESP32.h b/Marlin/src/pins/esp32/pins_ESP32.h index d54a92b9c4e5..6578770ba0e2 100644 --- a/Marlin/src/pins/esp32/pins_ESP32.h +++ b/Marlin/src/pins/esp32/pins_ESP32.h @@ -25,9 +25,7 @@ * Espressif ESP32 (Tensilica Xtensa LX6) pin assignments */ -#if NOT_TARGET(ARDUINO_ARCH_ESP32) - "Oops! Select an ESP32 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Espressif ESP32" diff --git a/Marlin/src/pins/esp32/pins_FYSETC_E4.h b/Marlin/src/pins/esp32/pins_FYSETC_E4.h index 50a8587b1ecf..2b2fe40c4a41 100644 --- a/Marlin/src/pins/esp32/pins_FYSETC_E4.h +++ b/Marlin/src/pins/esp32/pins_FYSETC_E4.h @@ -23,13 +23,14 @@ /** * FYSETC E4 pin assignments - * FYSETC E4 is a 3D printer control board based on the ESP32 microcontroller. + * + * 3D printer control board based on the ESP32 microcontroller. * Supports 4 stepper drivers, heated bed, single hotend. */ -#ifndef ARDUINO_ARCH_ESP32 - #error "Oops! Select an ESP32 board in 'Tools > Board.'" -#elif EXTRUDERS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if EXTRUDERS > 1 || E_STEPPERS > 1 #error "FYSETC E4 only supports one E Stepper. Comment out this line to continue." #elif HOTENDS > 1 #error "FYSETC E4 only supports one hotend / E-stepper. Comment out this line to continue." diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPA.h b/Marlin/src/pins/esp32/pins_MRR_ESPA.h index fe67f7537204..ab4f401f2671 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPA.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPA.h @@ -23,13 +23,14 @@ /** * MRR ESPA pin assignments - * MRR ESPA is a 3D printer control board based on the ESP32 microcontroller. + * + * 3D printer control board based on the ESP32 microcontroller. * Supports 4 stepper drivers, heated bed, single hotend. */ -#if NOT_TARGET(ARDUINO_ARCH_ESP32) - #error "Oops! Select an ESP32 board in 'Tools > Board.'" -#elif EXTRUDERS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if EXTRUDERS > 1 || E_STEPPERS > 1 #error "MRR ESPA only supports one E Stepper. Comment out this line to continue." #elif HOTENDS > 1 #error "MRR ESPA only supports one hotend / E-stepper. Comment out this line to continue." diff --git a/Marlin/src/pins/esp32/pins_MRR_ESPE.h b/Marlin/src/pins/esp32/pins_MRR_ESPE.h index 3f9a6a0af3a6..1f829b77554c 100644 --- a/Marlin/src/pins/esp32/pins_MRR_ESPE.h +++ b/Marlin/src/pins/esp32/pins_MRR_ESPE.h @@ -23,14 +23,15 @@ /** * MRR ESPE pin assignments - * MRR ESPE is a 3D printer control board based on the ESP32 microcontroller. + * + * 3D printer control board based on the ESP32 microcontroller. * Supports 5 stepper drivers (using I2S stepper stream), heated bed, * single hotend, and LCD controller. */ -#if NOT_TARGET(ARDUINO_ARCH_ESP32) - #error "Oops! Select an ESP32 board in 'Tools > Board.'" -#elif EXTRUDERS > 2 || E_STEPPERS > 2 +#include "env_validate.h" + +#if EXTRUDERS > 2 || E_STEPPERS > 2 #error "MRR ESPE only supports two E Steppers. Comment out this line to continue." #elif HOTENDS > 1 #error "MRR ESPE only supports one hotend / E-stepper. Comment out this line to continue." @@ -122,7 +123,7 @@ // LCDs and Controllers // ////////////////////////// -#if HAS_MARLINUI_U8GLIB +#if HAS_WIRED_LCD #define LCD_PINS_RS 13 #define LCD_PINS_ENABLE 17 diff --git a/Marlin/src/pins/esp32/pins_PANDA_M4.h b/Marlin/src/pins/esp32/pins_PANDA_M4.h new file mode 100644 index 000000000000..5e2e72af05df --- /dev/null +++ b/Marlin/src/pins/esp32/pins_PANDA_M4.h @@ -0,0 +1,38 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Panda M4 pin assignments + */ + +#define BOARD_INFO_NAME "Panda_M4" + +#include "pins_PANDA_common.h" + +// +// Steppers +// +#define X_ENABLE_PIN 115 +#define Y_ENABLE_PIN 114 +#define Z_ENABLE_PIN 113 +#define E0_ENABLE_PIN 112 diff --git a/Marlin/src/pins/esp32/pins_PANDA_ZHU.h b/Marlin/src/pins/esp32/pins_PANDA_ZHU.h new file mode 100644 index 000000000000..47500578976e --- /dev/null +++ b/Marlin/src/pins/esp32/pins_PANDA_ZHU.h @@ -0,0 +1,61 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Panda ZHU pin assignments + */ + +#define BOARD_INFO_NAME "Panda_ZHU" + +#include "pins_PANDA_common.h" + +// +// Steppers +// +#define X_ENABLE_PIN 128 // Shared with all steppers +#define Y_ENABLE_PIN X_ENABLE_PIN +#define Z_ENABLE_PIN X_ENABLE_PIN +#define E0_ENABLE_PIN X_ENABLE_PIN + +//#define X_CS_PIN 0 +//#define Y_CS_PIN 13 +//#define Z_CS_PIN 5 // SS_PIN +//#define E0_CS_PIN 21 + +#define E1_STEP_PIN 115 +#define E1_DIR_PIN 114 +#define E1_ENABLE_PIN X_ENABLE_PIN + +#define E2_STEP_PIN 112 +#define E2_DIR_PIN 113 +#define E2_ENABLE_PIN X_ENABLE_PIN + +#define E3_STEP_PIN 110 +#define E3_DIR_PIN 111 +#define E3_ENABLE_PIN X_ENABLE_PIN + +#define E4_STEP_PIN 121 +#define E4_DIR_PIN 122 +#define E4_ENABLE_PIN X_ENABLE_PIN + +#define HEATER_1_PIN 123 diff --git a/Marlin/src/pins/esp32/pins_PANDA_common.h b/Marlin/src/pins/esp32/pins_PANDA_common.h new file mode 100644 index 000000000000..81862fbd553c --- /dev/null +++ b/Marlin/src/pins/esp32/pins_PANDA_common.h @@ -0,0 +1,98 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Panda common pin assignments + */ + +#include "env_validate.h" + +#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME + +// +// Servos +// +#define SERVO0_PIN 0 + +// +// Limit Switches +// +#define X_STOP_PIN 4 +#define Y_STOP_PIN 35 +#define Z_STOP_PIN 21 + +// +// Steppers +// +#define X_STEP_PIN 101 +#define X_DIR_PIN 100 + +#define Y_STEP_PIN 103 +#define Y_DIR_PIN 102 + +#define Z_STEP_PIN 105 +#define Z_DIR_PIN 104 + +#define E0_STEP_PIN 107 +#define E0_DIR_PIN 106 + +// +// Temperature Sensors +// +#define TEMP_0_PIN 39 // Analog Input +#define TEMP_BED_PIN 36 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 108 +#define HEATER_BED_PIN 109 +#define FAN_PIN 118 // FAN0 +#define FAN1_PIN 119 // FAN1 + +#ifndef E0_AUTO_FAN_PIN + #define E0_AUTO_FAN_PIN 120 // FAN2 +#endif + +// +// SD card +// +#if ENABLED(SDSUPPORT) + #define SD_MOSI_PIN 23 + #define SD_MISO_PIN 19 + #define SD_SCK_PIN 18 + #define SDSS 5 + #define SD_DETECT_PIN 2 +#endif + +#if HAS_WIRED_LCD + #define BEEPER_PIN 129 + #define BTN_ENC 12 + + #define BTN_EN1 33 + #define BTN_EN2 32 + + #define LCD_PINS_RS 27 + #define LCD_PINS_ENABLE 26 + #define LCD_PINS_D4 14 +#endif diff --git a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h index ab1446f07c9f..04f9afaad212 100644 --- a/Marlin/src/pins/linux/pins_RAMPS_LINUX.h +++ b/Marlin/src/pins/linux/pins_RAMPS_LINUX.h @@ -49,6 +49,10 @@ #define BOARD_INFO_NAME "RAMPS 1.4" #endif +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "SimRap 1.4" +#endif + #ifndef MARLIN_EEPROM_SIZE #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif @@ -133,11 +137,11 @@ #define TEMP_1_PIN 1 // Analog Input #define TEMP_BED_PIN 2 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // @@ -192,7 +196,7 @@ #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") #define FAN_PIN RAMPS_D9_PIN #define HEATER_BED_PIN RAMPS_D8_PIN - #if HOTENDS == 1 + #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #define FAN1_PIN MOSFET_D_PIN #else #define HEATER_1_PIN MOSFET_D_PIN @@ -208,6 +212,7 @@ // #define SDSS 53 #define LED_PIN 13 +#define NEOPIXEL_PIN 71 #ifndef FILWIDTH_PIN #define FILWIDTH_PIN 5 // Analog Input on AUX2 @@ -215,7 +220,7 @@ // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector #ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN 4 + #define FIL_RUNOUT_PIN 21 #endif #ifndef PS_ON_PIN @@ -389,7 +394,54 @@ // LCDs and Controllers // ////////////////////////// -#if HAS_WIRED_LCD +#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, TFT_LVGL_UI) + + #define TFT_A0_PIN 43 + #define TFT_CS_PIN 49 + #define TFT_DC_PIN 43 + #define TFT_SCK_PIN SD_SCK_PIN + #define TFT_MOSI_PIN SD_MOSI_PIN + #define TFT_MISO_PIN SD_MISO_PIN + #define LCD_USE_DMA_SPI + + #define BTN_EN1 40 + #define BTN_EN2 63 + #define BTN_ENC 59 + #define BEEPER_PIN 42 + + #define TOUCH_CS_PIN 33 + #define SD_DETECT_PIN 41 + + #define HAS_SPI_FLASH 1 + #if HAS_SPI_FLASH + #define SPI_DEVICE 1 + #define SPI_FLASH_SIZE 0x1000000 // 16MB + #define SPI_FLASH_CS_PIN 31 + #define SPI_FLASH_MOSI_PIN SD_MOSI_PIN + #define SPI_FLASH_MISO_PIN SD_MISO_PIN + #define SPI_FLASH_SCK_PIN SD_SCK_PIN + #endif + + #define TFT_BUFFER_SIZE 0xFFFF + #ifndef TFT_DRIVER + #define TFT_DRIVER ST7796 + #endif + #ifndef XPT2046_X_CALIBRATION + #define XPT2046_X_CALIBRATION 63934 + #endif + #ifndef XPT2046_Y_CALIBRATION + #define XPT2046_Y_CALIBRATION 63598 + #endif + #ifndef XPT2046_X_OFFSET + #define XPT2046_X_OFFSET -1 + #endif + #ifndef XPT2046_Y_OFFSET + #define XPT2046_Y_OFFSET -20 + #endif + + #define BTN_BACK 70 + +#elif HAS_WIRED_LCD // // LCD Display output pins @@ -622,14 +674,18 @@ #define BTN_EN1 37 #define BTN_EN2 35 #define BTN_ENC 31 + #define SD_DETECT_PIN 41 #endif #if ENABLED(G3D_PANEL) #define SD_DETECT_PIN 49 #define KILL_PIN 41 #endif - #endif + + // CUSTOM SIMULATOR INPUTS + #define BTN_BACK 70 + #endif // IS_NEWPANEL #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/lpc1768/env_validate.h b/Marlin/src/pins/lpc1768/env_validate.h new file mode 100644 index 000000000000..adb3ea938dc2 --- /dev/null +++ b/Marlin/src/pins/lpc1768/env_validate.h @@ -0,0 +1,30 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if ENABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#elif DISABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1768) + #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." +#endif + +#undef REQUIRE_LPC1769 diff --git a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h index 70682ad1518b..ff36796207aa 100644 --- a/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h +++ b/Marlin/src/pins/lpc1768/pins_AZSMZ_MINI.h @@ -25,11 +25,9 @@ * AZSMZ MINI pin assignments */ -#if NOT_TARGET(MCU_LPC1768) - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." -#endif +#include "env_validate.h" -#define BOARD_INFO_NAME "AZSMZ MINI" +#define BOARD_INFO_NAME "AZSMZ Mini" // // Servos @@ -39,8 +37,8 @@ // // Limit Switches // -#define X_MIN_PIN P1_24 -#define Y_MIN_PIN P1_26 +#define X_STOP_PIN P1_24 +#define Y_STOP_PIN P1_26 #define Z_MIN_PIN P1_28 #define Z_MAX_PIN P1_29 @@ -78,6 +76,7 @@ // // Heaters / Fans // + // EFB #define HEATER_0_PIN P2_04 #define HEATER_BED_PIN P2_05 @@ -87,7 +86,6 @@ #define FAN1_PIN P0_26 #define LCD_SDSS P0_16 // LCD SD chip select -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #if ENABLED(AZSMZ_12864) #define BEEPER_PIN P1_30 @@ -111,6 +109,7 @@ #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." @@ -119,14 +118,14 @@ // // Ethernet pins // +#define REF_CLK P1_15 #define ENET_MDIO P1_17 -#define ENET_RX_ER P1_14 -#define ENET_RXD1 P1_10 #define ENET_MOC P1_16 -#define REF_CLK P1_15 -#define ENET_RXD0 P1_09 #define ENET_CRS P1_08 +#define ENET_RX_ER P1_14 #define ENET_TX_EN P1_04 +#define ENET_RXD0 P1_09 +#define ENET_RXD1 P1_10 #define ENET_TXD0 P1_00 #define ENET_TXD1 P1_01 diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h index 5ac119f398b1..10a610ff95f7 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_B300_V1.0.h @@ -29,9 +29,7 @@ * BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed) */ -#if NOT_TARGET(MCU_LPC1768) - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." -#endif +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BIQU Thunder B300 V1.0" diff --git a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h index 3b2137b400fd..92152170a013 100644 --- a/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h +++ b/Marlin/src/pins/lpc1768/pins_BIQU_BQ111_A4.h @@ -22,16 +22,10 @@ #pragma once /** - * BIQU BQ111-A4 - * - * Applies to the following boards: - * - * BOARD_BIQU_BQ111_A4 (Hotend, Fan, Bed) + * BIQU BQ111-A4 pin assignments */ -#if NOT_TARGET(MCU_LPC1768) - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "BIQU BQ111-A4" diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h index 8c1396d3fe2f..48b178dab5fe 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h @@ -21,6 +21,10 @@ */ #pragma once +/** + * BigTreeTech SKR 1.1 pin assignments + */ + #define BOARD_INFO_NAME "BTT SKR V1.1" // @@ -52,6 +56,34 @@ #define E0_DIR_PIN P2_13 #define E0_ENABLE_PIN P2_12 + +/** ------ ------ + * 1.30 |10 9 | 2.11 0.17 |10 9 | 0.15 + * 0.18 | 8 7 | 0.16 3.26 | 8 7 | 1.23 + * 0.15 6 5 | NC 3.25 6 5 | 0.18 + * NC | 4 3 | NC 1.31 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN -1 // NC +#define EXP1_04_PIN -1 // NC +#define EXP1_05_PIN -1 // NC +#define EXP1_06_PIN P0_15 +#define EXP1_07_PIN P0_16 +#define EXP1_08_PIN P0_18 +#define EXP1_09_PIN P2_11 +#define EXP1_10_PIN P1_30 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN P1_31 +#define EXP2_05_PIN P0_18 +#define EXP2_06_PIN P3_25 +#define EXP2_07_PIN P1_23 +#define EXP2_08_PIN P3_26 +#define EXP2_09_PIN P0_15 +#define EXP2_10_PIN P0_17 + /** * LCD / Controller * @@ -68,26 +100,23 @@ #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS P3_26 + #define TFTGLCD_CS EXP2_08_PIN #endif - #define SD_DETECT_PIN P1_31 - #elif HAS_WIRED_LCD - #define BTN_EN1 P3_26 - #define BTN_EN2 P3_25 - #define BTN_ENC P2_11 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + #define BTN_ENC EXP1_09_PIN - #define SD_DETECT_PIN P1_31 - #define LCD_SDSS P1_23 - #define LCD_PINS_RS P0_16 - #define LCD_PINS_ENABLE P0_18 - #define LCD_PINS_D4 P0_15 + #define LCD_SDSS EXP2_07_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_ENABLE EXP2_05_PIN + #define LCD_PINS_D4 EXP2_09_PIN #if ENABLED(MKS_MINI_12864) #define DOGLCD_CS P2_06 - #define DOGLCD_A0 P0_16 + #define DOGLCD_A0 EXP1_07_PIN #endif #endif // HAS_WIRED_LCD @@ -106,17 +135,13 @@ #endif #endif -#if SD_CONNECTION_IS(LCD) - #define SD_SS_PIN P1_23 -#endif - // Trinamic driver support #if HAS_TRINAMIC_CONFIG // Using TMC devices in intelligent mode requires extra connections to each device. Unfortunately // the SKR does not have many free pins (especially if a display is in use). The SPI-based devices // will require 3 connections (clock, mosi, miso), plus a chip select line (CS) for each driver. - // The UART-based devices require 2 pis per deriver (one of which must be interrupt capable). + // The UART-based devices require 2 pis per driver (one of which must be interrupt capable). // The same SPI pins can be shared with the display/SD card reader, meaning SPI-based devices are // probably a good choice for this board. // @@ -140,10 +165,10 @@ // When using any TMC SPI-based drivers, software SPI is used // because pins may be shared with the display or SD card. #define TMC_USE_SW_SPI - #define TMC_SW_MOSI P0_18 - #define TMC_SW_MISO P0_17 + #define TMC_SW_MOSI EXP2_05_PIN + #define TMC_SW_MISO EXP2_10_PIN // To minimize pin usage use the same clock pin as the display/SD card reader. (May generate LCD noise.) - #define TMC_SW_SCK P0_15 + #define TMC_SW_SCK EXP2_09_PIN // If pin 2_06 is unused, it can be used for the clock to avoid the LCD noise. //#define TMC_SW_SCK P2_06 @@ -186,14 +211,11 @@ // SDCARD_CONNECTION must not be 'LCD'. Nothing should be connected to EXP1/EXP2. //#define SKR_USE_LCD_PINS_FOR_CS #if ENABLED(SKR_USE_LCD_PINS_FOR_CS) - #if SD_CONNECTION_IS(LCD) - #error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_PINS_FOR_CS." - #endif - #define X_CS_PIN P1_23 - #define Y_CS_PIN P3_26 - #define Z_CS_PIN P2_11 - #define E0_CS_PIN P3_25 - #define E1_CS_PIN P1_31 + #define X_CS_PIN EXP2_07_PIN + #define Y_CS_PIN EXP2_08_PIN + #define Z_CS_PIN EXP1_09_PIN + #define E0_CS_PIN EXP2_06_PIN + #define E1_CS_PIN EXP2_04_PIN #endif // Example 2: A REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER @@ -201,19 +223,16 @@ // the pins will be in use. So SDCARD_CONNECTION must not be 'LCD'. //#define SKR_USE_LCD_SD_CARD_PINS_FOR_CS #if ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS) - #if SD_CONNECTION_IS(LCD) - #error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_SD_CARD_PINS_FOR_CS." - #endif #define X_CS_PIN P0_02 #define Y_CS_PIN P0_03 #define Z_CS_PIN P2_06 // We use SD_DETECT_PIN for E0 #undef SD_DETECT_PIN - #define E0_CS_PIN P1_31 + #define E0_CS_PIN EXP2_04_PIN // We use LCD_SDSS pin for E1 #undef LCD_SDSS #define LCD_SDSS -1 - #define E1_CS_PIN P1_23 + #define E1_CS_PIN EXP2_07_PIN #endif // Example 3: Use the driver enable pins for chip-select. diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h index e5b78024cbf8..dc52a7c36df1 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h @@ -21,7 +21,12 @@ */ #pragma once +/** + * BigTreeTech SKR 1.3 pin assignments + */ + #define BOARD_INFO_NAME "BTT SKR V1.3" +#define LPC1768_IS_SKRV1_3 1 // // Trinamic Stallguard pins @@ -37,7 +42,7 @@ // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN - #if X_HOME_DIR < 0 + #if X_HOME_TO_MIN #define X_MAX_PIN P1_28 // X+ #else #define X_MIN_PIN P1_28 // X+ @@ -49,7 +54,7 @@ #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN - #if Y_HOME_DIR < 0 + #if Y_HOME_TO_MIN #define Y_MAX_PIN P1_26 // Y+ #else #define Y_MIN_PIN P1_26 // Y+ @@ -61,7 +66,7 @@ #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN - #if Z_HOME_DIR < 0 + #if Z_HOME_TO_MIN #define Z_MAX_PIN P1_24 // Z+ #else #define Z_MIN_PIN P1_24 // Z+ @@ -163,9 +168,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN P4_29 #define X_SERIAL_RX_PIN P1_17 @@ -186,33 +188,32 @@ #endif /** - * _____ _____ - * NC | 1 2 | GND 5V | 1 2 | GND - * RESET | 3 4 | 1.31 (SD_DETECT) (LCD_D7) 1.23 | 3 4 | 1.22 (LCD_D6) - * (MOSI) 0.18 | 5 6 3.25 (BTN_EN2) (LCD_D5) 1.21 | 5 6 1.20 (LCD_D4) - * (SD_SS) 0.16 | 7 8 | 3.26 (BTN_EN1) (LCD_RS) 1.19 | 7 8 | 1.18 (LCD_EN) - * (SCK) 0.15 | 9 10| 0.17 (MISO) (BTN_ENC) 0.28 | 9 10| 1.30 (BEEPER) - * ----- ----- - * EXP2 EXP1 + * ------ ------ + * (BEEPER) 1.30 |10 9 | 0.28 (BTN_ENC) (MISO) 0.17 |10 9 | 0.15 (SCK) + * (LCD_EN) 1.18 | 8 7 | 1.19 (LCD_RS) (BTN_EN1) 3.26 | 8 7 | 0.16 (SD_SS) + * (LCD_D4) 1.20 6 5 | 1.21 (LCD_D5) (BTN_EN2) 3.25 6 5 | 0.18 (MOSI) + * (LCD_D6) 1.22 | 4 3 | 1.23 (LCD_D7) (SD_DETECT) 1.31 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - -#define EXPA1_03_PIN P1_23 -#define EXPA1_04_PIN P1_22 -#define EXPA1_05_PIN P1_21 -#define EXPA1_06_PIN P1_20 -#define EXPA1_07_PIN P1_19 -#define EXPA1_08_PIN P1_18 -#define EXPA1_09_PIN P0_28 -#define EXPA1_10_PIN P1_30 - -#define EXPA2_03_PIN -1 -#define EXPA2_04_PIN P1_31 -#define EXPA2_05_PIN P0_18 -#define EXPA2_06_PIN P3_25 -#define EXPA2_07_PIN P0_16 -#define EXPA2_08_PIN P3_26 -#define EXPA2_09_PIN P0_15 -#define EXPA2_10_PIN P0_17 +#define EXP1_03_PIN P1_23 +#define EXP1_04_PIN P1_22 +#define EXP1_05_PIN P1_21 +#define EXP1_06_PIN P1_20 +#define EXP1_07_PIN P1_19 +#define EXP1_08_PIN P1_18 +#define EXP1_09_PIN P0_28 +#define EXP1_10_PIN P1_30 + +#define EXP2_03_PIN -1 +#define EXP2_04_PIN P1_31 +#define EXP2_05_PIN P0_18 +#define EXP2_06_PIN P3_25 +#define EXP2_07_PIN P0_16 +#define EXP2_08_PIN P3_26 +#define EXP2_09_PIN P0_15 +#define EXP2_10_PIN P0_17 #if HAS_WIRED_LCD #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) @@ -232,127 +233,187 @@ * The ANET_FULL_GRAPHICS_LCD connector plug: * * BEFORE AFTER - * _____ _____ - * GND 1 | 1 2 | 2 5V 5V 1 | 1 2 | 2 GND - * CS 3 | 3 4 | 4 BTN_EN2 CS 3 | 3 4 | 4 BTN_EN2 - * SID 5 | 5 6 6 BTN_EN1 SID 5 | 5 6 6 BTN_EN1 - * open 7 | 7 8 | 8 BTN_ENC CLK 7 | 7 8 | 8 BTN_ENC - * CLK 9 | 9 10| 10 Beeper open 9 | 9 10| 10 Beeper - * ----- ----- + * ------ ------ + * GND 1 | 1 2 | 2 5V 5V 1 | 1 2 | 2 GND + * CS 3 | 3 4 | 4 BTN_EN2 CS 3 | 3 4 | 4 BTN_EN2 + * SID 5 | 5 6 6 BTN_EN1 SID 5 | 5 6 6 BTN_EN1 + * open 7 | 7 8 | 8 BTN_ENC CLK 7 | 7 8 | 8 BTN_ENC + * CLK 9 | 9 10 | 10 Beeper open 9 | 9 10 | 10 Beeper + * ------ ------ * LCD LCD */ - #define LCD_PINS_RS EXPA1_03_PIN + #define LCD_PINS_RS EXP1_03_PIN - #define BTN_EN1 EXPA1_06_PIN - #define BTN_EN2 EXPA1_04_PIN - #define BTN_ENC EXPA1_08_PIN + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_04_PIN + #define BTN_ENC EXP1_08_PIN - #define LCD_PINS_ENABLE EXPA1_05_PIN - #define LCD_PINS_D4 EXPA1_07_PIN + #define LCD_PINS_ENABLE EXP1_05_PIN + #define LCD_PINS_D4 EXP1_07_PIN #elif ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXPA1_04_PIN + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 EXPA1_08_PIN - #define BTN_EN2 EXPA1_06_PIN - #define BTN_ENC EXPA1_09_PIN // (58) open-drain + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN // (58) open-drain - #define LCD_PINS_ENABLE EXPA1_03_PIN - #define LCD_PINS_D4 EXPA1_05_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #elif HAS_ADC_BUTTONS - #error "ADC BUTTONS do not work unmodifed on SKR 1.3, The ADC ports cannot take more than 3.3v." + #error "ADC BUTTONS do not work unmodified on SKR 1.3, The ADC ports cannot take more than 3.3v." - #elif IS_TFTGLCD_PANEL + #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI + + #define TFT_A0_PIN EXP1_03_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_RESET_PIN EXP1_07_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN + + #define TFT_RST_PIN EXP2_04_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + + #define BTN_EN2 EXP2_06_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_ENC EXP1_09_PIN + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 + + #define TFT_BUFFER_SIZE 2400 + + #ifndef TFT_WIDTH + #define TFT_WIDTH 480 + #endif + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #define LCD_READ_ID 0xD3 + #define LCD_USE_DMA_SPI + + #if ENABLED(TFT_CLASSIC_UI) + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -11386 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 8684 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 689 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -273 + #endif + #elif ENABLED(TFT_COLOR_UI) + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -16741 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11258 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 1024 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -367 + #endif + #define TFT_BUFFER_SIZE 2400 + #endif + + #elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS EXPA2_08_PIN + #define TFTGLCD_CS EXP2_08_PIN #endif - #define SD_DETECT_PIN EXPA2_04_PIN + #define SD_DETECT_PIN EXP2_04_PIN #else // !CR10_STOCKDISPLAY - #define LCD_PINS_RS EXPA1_07_PIN + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 EXPA2_08_PIN // (31) J3-2 & AUX-4 - #define BTN_EN2 EXPA2_06_PIN // (33) J3-4 & AUX-4 - #define BTN_ENC EXPA1_09_PIN // (58) open-drain + #define BTN_EN1 EXP2_08_PIN // (31) J3-2 & AUX-4 + #define BTN_EN2 EXP2_06_PIN // (33) J3-4 & AUX-4 + #define BTN_ENC EXP1_09_PIN // (58) open-drain - #define LCD_PINS_ENABLE EXPA1_08_PIN - #define LCD_PINS_D4 EXPA1_06_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN - #define LCD_SDSS EXPA2_07_PIN // (16) J3-7 & AUX-4 - #define SD_DETECT_PIN EXPA2_04_PIN // (49) (NOT 5V tolerant) + #define LCD_SDSS EXP2_07_PIN // (16) J3-7 & AUX-4 + #define SD_DETECT_PIN EXP2_04_PIN // (49) (NOT 5V tolerant) #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXPA1_08_PIN - #define DOGLCD_A0 EXPA1_07_PIN - #define DOGLCD_SCK EXPA2_09_PIN - #define DOGLCD_MOSI EXPA2_05_PIN + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #define LCD_BACKLIGHT_PIN -1 #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define LCD_RESET_PIN EXPA1_06_PIN // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXPA1_05_PIN + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXPA1_04_PIN + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXPA1_03_PIN + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXPA1_05_PIN + #define NEOPIXEL_PIN EXP1_05_PIN #endif #else // !FYSETC_MINI_12864 #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS EXPA1_05_PIN - #define DOGLCD_A0 EXPA1_04_PIN - #define DOGLCD_SCK EXPA2_09_PIN - #define DOGLCD_MOSI EXPA2_05_PIN + #define DOGLCD_CS EXP1_05_PIN + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #elif ENABLED(ENDER2_STOCKDISPLAY) /** * Creality Ender-2 display pinout - * _____ + * ----- * 5V | 1 2 | GND * (MOSI) P1_23 | 3 4 | P1_22 (LCD_CS) * (LCD_A0) P1_21 | 5 6 P1_20 (BTN_EN2) - * RESET P1_19 | 7 8 | P1_18 (BTN_EN1) + * (RESET) P1_19 | 7 8 | P1_18 (BTN_EN1) * (BTN_ENC) P0_28 | 9 10| P1_30 (SCK) * ----- * EXP1 */ - #define BTN_EN1 EXPA1_08_PIN - #define BTN_EN2 EXPA1_06_PIN - #define BTN_ENC EXPA1_09_PIN - #define DOGLCD_CS EXPA1_04_PIN - #define DOGLCD_A0 EXPA1_05_PIN - #define DOGLCD_SCK EXPA1_10_PIN - #define DOGLCD_MOSI EXPA1_03_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_A0 EXP1_05_PIN + #define DOGLCD_SCK EXP1_10_PIN + #define DOGLCD_MOSI EXP1_03_PIN #define FORCE_SOFT_SPI #define LCD_BACKLIGHT_PIN -1 #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 EXPA1_05_PIN - #define LCD_PINS_D6 EXPA1_04_PIN - #define LCD_PINS_D7 EXPA1_03_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -366,16 +427,12 @@ #endif // HAS_WIRED_LCD -// -// SD Support -// - -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION LCD -#endif - -#if SD_CONNECTION_IS(LCD) - #define SD_SS_PIN EXPA2_07_PIN +#if NEED_TOUCH_PINS + #define TOUCH_CS_PIN EXP1_06_PIN + #define TOUCH_SCK_PIN EXP2_09_PIN + #define TOUCH_MOSI_PIN EXP2_05_PIN + #define TOUCH_MISO_PIN EXP2_10_PIN + #define TOUCH_INT_PIN EXP1_05_PIN #endif /** diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h index dfe86b12b724..17daf176daf0 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h @@ -21,6 +21,12 @@ */ #pragma once +/** + * BigTreeTech SKR 1.4 pin assignments + */ + +#include "env_validate.h" + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT SKR V1.4" #endif @@ -30,10 +36,17 @@ #endif // -// SD Connection +// EEPROM // -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION LCD +#if NO_EEPROM_SELECTED + //#define I2C_EEPROM // EEPROM on I2C-0 + //#define SDCARD_EEPROM_EMULATION +#endif + +#if ENABLED(I2C_EEPROM) + #define MARLIN_EEPROM_SIZE 0x8000 // 32Kb +#elif ENABLED(SDCARD_EEPROM_EMULATION) + #define MARLIN_EEPROM_SIZE 0x800 // 2Kb #endif // @@ -55,7 +68,7 @@ // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN - #if X_HOME_DIR < 0 + #if X_HOME_TO_MIN #define X_MAX_PIN P1_26 // E0DET #else #define X_MIN_PIN P1_26 // E0DET @@ -73,7 +86,7 @@ #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN - #if Y_HOME_DIR < 0 + #if Y_HOME_TO_MIN #define Y_MAX_PIN P1_25 // E1DET #else #define Y_MIN_PIN P1_25 // E1DET @@ -91,7 +104,7 @@ #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN - #if Z_HOME_DIR < 0 + #if Z_HOME_TO_MIN #define Z_MAX_PIN P1_00 // PWRDET #else #define Z_MIN_PIN P1_00 // PWRDET @@ -211,87 +224,64 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN P1_10 - #define X_SERIAL_RX_PIN P1_10 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN P1_09 - #define Y_SERIAL_RX_PIN P1_09 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN P1_08 - #define Z_SERIAL_RX_PIN P1_08 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN P1_04 - #define E0_SERIAL_RX_PIN P1_04 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN P1_01 - #define E1_SERIAL_RX_PIN P1_01 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 #endif -/* _____ _____ - * NC | 1 2 | GND 5V | 1 2 | GND - * RESET | 3 4 | 1.31 1.23 | 3 4 | 1.22 - * 0.18 | 5 6 3.25 1.21 | 5 6 1.20 - * 0.16 | 7 8 | 3.26 1.19 | 7 8 | 1.18 - * 0.15 | 9 10| 0.17 0.28 | 9 10| 1.30 - * ----- ----- - * EXP2 EXP1 - */ - -#define EXPA1_03_PIN P1_23 -#define EXPA1_04_PIN P1_22 -#define EXPA1_05_PIN P1_21 -#define EXPA1_06_PIN P1_20 -#define EXPA1_07_PIN P1_19 -#define EXPA1_08_PIN P1_18 -#define EXPA1_09_PIN P0_28 -#define EXPA1_10_PIN P1_30 - -#define EXPA2_03_PIN -1 -#define EXPA2_04_PIN P1_31 -#define EXPA2_05_PIN P0_18 -#define EXPA2_06_PIN P3_25 -#define EXPA2_07_PIN P0_16 -#define EXPA2_08_PIN P3_26 -#define EXPA2_09_PIN P0_15 -#define EXPA2_10_PIN P0_17 - -// -// SD Connection -// -#if SD_CONNECTION_IS(LCD) - #define SD_SS_PIN EXPA2_07_PIN -#endif - -/** - * _____ _____ - * NC | · · | GND 5V | · · | GND - * RESET | · · | 1.31 (SD_DETECT) (LCD_D7) 1.23 | · · | 1.22 (LCD_D6) - * (MOSI) 0.18 | · · 3.25 (BTN_EN2) (LCD_D5) 1.21 | · · 1.20 (LCD_D4) - * (SD_SS) 0.16 | · · | 3.26 (BTN_EN1) (LCD_RS) 1.19 | · · | 1.18 (LCD_EN) - * (SCK) 0.15 | · · | 0.17 (MISO) (BTN_ENC) 0.28 | · · | 1.30 (BEEPER) - * ----- ----- - * EXP2 EXP1 +/** ------ ------ + * 1.30 |10 9 | 0.28 0.17 |10 9 | 0.15 + * 1.18 | 8 7 | 1.19 3.26 | 8 7 | 0.16 + * 1.20 6 5 | 1.21 3.25 6 5 | 0.18 + * 1.22 | 4 3 | 1.23 1.31 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - -#if ENABLED(DWIN_CREALITY_LCD) +#define EXP1_03_PIN P1_23 +#define EXP1_04_PIN P1_22 +#define EXP1_05_PIN P1_21 +#define EXP1_06_PIN P1_20 +#define EXP1_07_PIN P1_19 +#define EXP1_08_PIN P1_18 +#define EXP1_09_PIN P0_28 +#define EXP1_10_PIN P1_30 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN P1_31 +#define EXP2_05_PIN P0_18 +#define EXP2_06_PIN P3_25 +#define EXP2_07_PIN P0_16 +#define EXP2_08_PIN P3_26 +#define EXP2_09_PIN P0_15 +#define EXP2_10_PIN P0_17 + +#if EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) // RET6 DWIN ENCODER LCD - #define BTN_ENC P1_20 - #define BTN_EN1 P1_23 - #define BTN_EN2 P1_22 + #define BTN_ENC EXP1_06_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_04_PIN #ifndef BEEPER_PIN - #define BEEPER_PIN P1_21 - #undef SPEAKER + #define BEEPER_PIN EXP1_05_PIN #endif -#elif HAS_WIRED_LCD && !HAS_BTT_EXP_MOT +#elif HAS_WIRED_LCD && !BTT_MOTOR_EXPANSION #if ENABLED(ANET_FULL_GRAPHICS_LCD_ALT_WIRING) #error "CAUTION! ANET_FULL_GRAPHICS_LCD_ALT_WIRING requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. Comment out this line to continue." @@ -305,25 +295,25 @@ * The ANET_FULL_GRAPHICS_LCD_ALT_WIRING connector plug: * * BEFORE AFTER - * _____ _____ - * GND | 1 2 | 5V 5V | 1 2 | GND - * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2 - * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1 - * open | 7 8 | BTN_ENC open | 7 8 | BTN_ENC - * CLK | 9 10| Beeper CLK | 9 10| Beeper - * ----- ----- + * ------ ------ + * GND | 1 2 | 5V 5V | 1 2 | GND + * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2 + * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1 + * open | 7 8 | BTN_ENC open | 7 8 | BTN_ENC + * CLK | 9 10| BEEPER CLK | 9 10| BEEPER + * ------ ------ * LCD LCD */ - #define LCD_PINS_RS EXPA1_07_PIN + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 EXPA1_05_PIN - #define BTN_EN2 EXPA1_04_PIN - #define BTN_ENC EXPA1_10_PIN + #define BTN_EN1 EXP1_05_PIN + #define BTN_EN2 EXP1_04_PIN + #define BTN_ENC EXP1_10_PIN - #define LCD_PINS_ENABLE EXPA1_08_PIN - #define LCD_PINS_D4 EXPA1_06_PIN - #define BEEPER_PIN EXPA1_03_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + #define BEEPER_PIN EXP1_03_PIN #elif ENABLED(ANET_FULL_GRAPHICS_LCD) #error "CAUTION! ANET_FULL_GRAPHICS_LCD requires wiring modifications. See 'pins_BTT_SKR_V1_4.h' for details. Comment out this line to continue." @@ -338,157 +328,149 @@ * * The ANET_FULL_GRAPHICS_LCD connector plug: * - * BEFORE AFTER - * _____ _____ - * GND | 1 2 | 5V 5V | 1 2 | GND - * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2 - * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1 - * open | 7 8 | BTN_ENC CLK | 7 8 | BTN_ENC - * CLK | 9 10| Beeper open | 9 10| Beeper - * ----- ----- - * LCD LCD + * BEFORE AFTER + * ------ ------ + * GND | 1 2 | 5V 5V | 1 2 | GND + * CS | 3 4 | BTN_EN2 CS | 3 4 | BTN_EN2 + * SID | 5 6 BTN_EN1 SID | 5 6 BTN_EN1 + * open | 7 8 | BTN_ENC CLK | 7 8 | BTN_ENC + * CLK | 9 10 | BEEPER open | 9 10 | BEEPER + * ------ ------ + * LCD LCD */ - #define LCD_PINS_RS EXPA1_03_PIN + #define LCD_PINS_RS EXP1_03_PIN - #define BTN_EN1 EXPA1_06_PIN - #define BTN_EN2 EXPA1_04_PIN - #define BTN_ENC EXPA1_08_PIN + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_04_PIN + #define BTN_ENC EXP1_08_PIN - #define LCD_PINS_ENABLE EXPA1_05_PIN - #define LCD_PINS_D4 EXPA1_07_PIN + #define LCD_PINS_ENABLE EXP1_05_PIN + #define LCD_PINS_D4 EXP1_07_PIN - #define BEEPER_PIN EXPA1_10_PIN + #define BEEPER_PIN EXP1_10_PIN #elif ENABLED(CR10_STOCKDISPLAY) - #define BTN_ENC EXPA1_09_PIN // (58) open-drain - #define LCD_PINS_RS EXPA1_04_PIN + #define BTN_ENC EXP1_09_PIN // (58) open-drain + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 EXPA1_08_PIN - #define BTN_EN2 EXPA1_06_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE EXPA1_03_PIN - #define LCD_PINS_D4 EXPA1_05_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #elif ENABLED(ENDER2_STOCKDISPLAY) /** Creality Ender-2 display pinout - * _____ - * 5V | 1 2 | GND - * (MOSI) 1.23 | 3 4 | 1.22 (LCD_RS) - * (LCD_A0) 1.21 | 5 6 1.20 (BTN_EN2) - * RESET 1.19 | 7 8 | 1.18 (BTN_EN1) - * (BTN_ENC) 0.28 | 9 10| 1.30 (SCK) - * ----- + * ------ + * 5V | 1 2 | GND + * (MOSI) 1.23 | 3 4 | 1.22 (LCD_RS) + * (LCD_A0) 1.21 | 5 6 1.20 (BTN_EN2) + * RESET 1.19 | 7 8 | 1.18 (BTN_EN1) + * (BTN_ENC) 0.28 | 9 10 | 1.30 (SCK) + * ------ * EXP1 */ - #define BTN_EN1 EXPA1_08_PIN - #define BTN_EN2 EXPA1_06_PIN - #define BTN_ENC EXPA1_09_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN - #define DOGLCD_CS EXPA1_04_PIN - #define DOGLCD_A0 EXPA1_05_PIN - #define DOGLCD_SCK EXPA1_10_PIN - #define DOGLCD_MOSI EXPA1_03_PIN + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_A0 EXP1_05_PIN + #define DOGLCD_SCK EXP1_10_PIN + #define DOGLCD_MOSI EXP1_03_PIN #define FORCE_SOFT_SPI #define LCD_BACKLIGHT_PIN -1 #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI - #define TFT_CS_PIN EXPA1_04_PIN - #define TFT_A0_PIN EXPA1_03_PIN - #define TFT_DC_PIN EXPA1_03_PIN - #define TFT_MISO_PIN EXPA2_10_PIN - #define TFT_BACKLIGHT_PIN EXPA1_08_PIN - #define TFT_RESET_PIN EXPA1_07_PIN + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_A0_PIN EXP1_03_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN + #define TFT_RESET_PIN EXP1_07_PIN #define LCD_USE_DMA_SPI - #define TOUCH_INT_PIN EXPA1_05_PIN - #define TOUCH_CS_PIN EXPA1_06_PIN + #define TOUCH_INT_PIN EXP1_05_PIN + #define TOUCH_CS_PIN EXP1_06_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 // SPI 1 - #define SD_SCK_PIN EXPA2_09_PIN - #define SD_MISO_PIN EXPA2_10_PIN - #define SD_MOSI_PIN EXPA2_05_PIN - - // Disable any LCD related PINs config - #define LCD_PINS_ENABLE -1 - #define LCD_PINS_RS -1 + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN #define TFT_BUFFER_SIZE 2400 #elif IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS EXPA2_08_PIN + #define TFTGLCD_CS EXP2_08_PIN #endif - #define SD_DETECT_PIN EXPA2_04_PIN + #define SD_DETECT_PIN EXP2_04_PIN #else - #define BTN_ENC EXPA1_09_PIN // (58) open-drain - #define LCD_PINS_RS EXPA1_07_PIN + #define BTN_ENC EXP1_09_PIN // (58) open-drain + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 EXPA2_08_PIN // (31) J3-2 & AUX-4 - #define BTN_EN2 EXPA2_06_PIN // (33) J3-4 & AUX-4 + #define BTN_EN1 EXP2_08_PIN // (31) J3-2 & AUX-4 + #define BTN_EN2 EXP2_06_PIN // (33) J3-4 & AUX-4 - #define LCD_PINS_ENABLE EXPA1_08_PIN - #define LCD_PINS_D4 EXPA1_06_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN - #define LCD_SDSS EXPA2_07_PIN // (16) J3-7 & AUX-4 - - #if SD_CONNECTION_IS(LCD) - #define SD_DETECT_PIN EXPA2_04_PIN // (49) (NOT 5V tolerant) - #endif + #define LCD_SDSS EXP2_07_PIN // (16) J3-7 & AUX-4 #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXPA1_08_PIN - #define DOGLCD_A0 EXPA1_07_PIN - #define DOGLCD_SCK EXPA2_09_PIN - #define DOGLCD_MOSI EXPA2_05_PIN + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #define LCD_BACKLIGHT_PIN -1 #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define LCD_RESET_PIN EXPA1_06_PIN // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXPA1_05_PIN + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXPA1_04_PIN + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXPA1_03_PIN + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXPA1_05_PIN + #define NEOPIXEL_PIN EXP1_05_PIN #endif #else // !FYSETC_MINI_12864 #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS EXPA1_05_PIN - #define DOGLCD_A0 EXPA1_04_PIN - #define DOGLCD_SCK EXPA2_09_PIN - #define DOGLCD_MOSI EXPA2_05_PIN + #define DOGLCD_CS EXP1_05_PIN + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #define FORCE_SOFT_SPI #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 EXPA1_05_PIN - #define LCD_PINS_D6 EXPA1_04_PIN - #define LCD_PINS_D7 EXPA1_03_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN EXPA1_03_PIN // Detect the presence of the encoder + #define BTN_ENC_EN EXP1_03_PIN // Detect the presence of the encoder #endif #endif @@ -500,7 +482,7 @@ #endif // HAS_WIRED_LCD #if HAS_ADC_BUTTONS - #error "ADC BUTTONS do not work unmodifed on SKR 1.4, The ADC ports cannot take more than 3.3v." + #error "ADC BUTTONS do not work unmodified on SKR 1.4, The ADC ports cannot take more than 3.3v." #endif // diff --git a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h index a43940f8f037..52f34ed0f0d5 100644 --- a/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h +++ b/Marlin/src/pins/lpc1768/pins_BTT_SKR_common.h @@ -21,19 +21,13 @@ */ #pragma once -#if ENABLED(SKR_HAS_LPC1769) - #if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." - #endif -#elif NOT_TARGET(MCU_LPC1768) - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." -#endif +#include "env_validate.h" -// If you have the Big tree tech driver expantion module, enable HAS_BTT_EXP_MOT +// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION // https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT -//#define HAS_BTT_EXP_MOT 1 +//#define BTT_MOTOR_EXPANSION -#if BOTH(HAS_WIRED_LCD, HAS_BTT_EXP_MOT) +#if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) #define EXP_MOT_USE_EXP2_ONLY 1 #else @@ -71,7 +65,7 @@ #define TEMP_BED_PIN P0_23_A0 // A0 (T0) - (67) - TEMP_BED_PIN #endif -#if HOTENDS == 1 +#if HOTENDS == 1 && !REDUNDANT_TEMP_MATCH(SOURCE, E1) #if TEMP_SENSOR_PROBE #define TEMP_PROBE_PIN TEMP_1_PIN #elif TEMP_SENSOR_CHAMBER @@ -79,13 +73,26 @@ #endif #endif +// CS, MISO, MOSI, and SCK for MAX Thermocouple SPI +#if HAS_MAX_TC + //#define TEMP_0_CS_PIN P... + //#define TEMP_0_MISO_PIN P... + //#define TEMP_0_MOSI_PIN P... + //#define TEMP_0_SCK_PIN P... + + //#define TEMP_1_CS_PIN P... + //#define TEMP_1_MISO_PIN P... + //#define TEMP_1_MOSI_PIN P... + //#define TEMP_1_SCK_PIN P... +#endif + // // Heaters / Fans // #ifndef HEATER_0_PIN #define HEATER_0_PIN P2_07 #endif -#if HOTENDS == 1 +#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #ifndef FAN1_PIN #define FAN1_PIN P2_04 #endif @@ -111,78 +118,91 @@ // // SD Support // -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card +#ifndef SDCARD_CONNECTION + #if HAS_WIRED_LCD + #define SDCARD_CONNECTION LCD + #else + #define SDCARD_CONNECTION ONBOARD + #endif +#endif + +#if SD_CONNECTION_IS(LCD) && ENABLED(SKR_USE_LCD_SD_CARD_PINS_FOR_CS) + #error "SDCARD_CONNECTION must not be 'LCD' with SKR_USE_LCD_SD_CARD_PINS_FOR_CS." +#endif #if SD_CONNECTION_IS(LCD) #define SD_SCK_PIN P0_15 #define SD_MISO_PIN P0_17 #define SD_MOSI_PIN P0_18 + #define SD_SS_PIN EXP2_07_PIN + #define SD_DETECT_PIN EXP2_04_PIN + #elif SD_CONNECTION_IS(ONBOARD) #undef SD_DETECT_PIN #define SD_DETECT_PIN P0_27 #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." #endif -#if HAS_BTT_EXP_MOT - - /** _____ _____ - * NC | · · | GND NC | · · | GND - * NC | · · | 1.31 (M1EN) (M2EN) 1.23 | · · | 1.22 (M3EN) - * (M1STP) 0.18 | · · 3.25 (M1DIR) (M1RX) 1.21 | · · 1.20 (M1DIAG) - * (M2DIR) 0.16 | · · | 3.26 (M2STP) (M2RX) 1.19 | · · | 1.18 (M2DIAG) - * (M3DIR) 0.15 | · · | 0.17 (M3STP) (M3RX) 0.28 | · · | 1.30 (M3DIAG) - * ----- ----- - * EXP2 EXP1 +#if ENABLED(BTT_MOTOR_EXPANSION) + /** ------ ------ + * NC | 1 2 | GND NC | 1 2 | GND + * NC | 3 4 | M1EN M2EN | 3 4 | M3EN + * M1STP | 5 6 M1DIR M1RX | 5 6 M1DIAG + * M2DIR | 7 8 | M2STP M2RX | 7 8 | M2DIAG + * M3DIR | 9 10 | M3STP M3RX | 9 10 | M3DIAG + * ------ ------ + * EXP2 EXP1 * * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN */ // M1 on Driver Expansion Module - #define E2_STEP_PIN EXPA2_05_PIN - #define E2_DIR_PIN EXPA2_06_PIN - #define E2_ENABLE_PIN EXPA2_04_PIN + #define E2_STEP_PIN EXP2_05_PIN + #define E2_DIR_PIN EXP2_06_PIN + #define E2_ENABLE_PIN EXP2_04_PIN #if !EXP_MOT_USE_EXP2_ONLY - #define E2_DIAG_PIN EXPA1_06_PIN - #define E2_CS_PIN EXPA1_05_PIN + #define E2_DIAG_PIN EXP1_06_PIN + #define E2_CS_PIN EXP1_05_PIN #if HAS_TMC_UART - #define E2_SERIAL_TX_PIN EXPA1_05_PIN - #define E2_SERIAL_RX_PIN EXPA1_05_PIN + #define E2_SERIAL_TX_PIN EXP1_05_PIN + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #endif #endif // M2 on Driver Expansion Module - #define E3_STEP_PIN EXPA2_08_PIN - #define E3_DIR_PIN EXPA2_07_PIN + #define E3_STEP_PIN EXP2_08_PIN + #define E3_DIR_PIN EXP2_07_PIN #if !EXP_MOT_USE_EXP2_ONLY - #define E3_ENABLE_PIN EXPA1_03_PIN - #define E3_DIAG_PIN EXPA1_08_PIN - #define E3_CS_PIN EXPA1_07_PIN + #define E3_ENABLE_PIN EXP1_03_PIN + #define E3_DIAG_PIN EXP1_08_PIN + #define E3_CS_PIN EXP1_07_PIN #if HAS_TMC_UART - #define E3_SERIAL_TX_PIN EXPA1_07_PIN - #define E3_SERIAL_RX_PIN EXPA1_07_PIN + #define E3_SERIAL_TX_PIN EXP1_07_PIN + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #endif #else - #define E3_ENABLE_PIN EXPA2_04_PIN + #define E3_ENABLE_PIN EXP2_04_PIN #endif // M3 on Driver Expansion Module - #define E4_STEP_PIN EXPA2_10_PIN - #define E4_DIR_PIN EXPA2_09_PIN + #define E4_STEP_PIN EXP2_10_PIN + #define E4_DIR_PIN EXP2_09_PIN #if !EXP_MOT_USE_EXP2_ONLY - #define E4_ENABLE_PIN EXPA1_04_PIN - #define E4_DIAG_PIN EXPA1_10_PIN - #define E4_CS_PIN EXPA1_09_PIN + #define E4_ENABLE_PIN EXP1_04_PIN + #define E4_DIAG_PIN EXP1_10_PIN + #define E4_CS_PIN EXP1_09_PIN #if HAS_TMC_UART - #define E4_SERIAL_TX_PIN EXPA1_09_PIN - #define E4_SERIAL_RX_PIN EXPA1_09_PIN + #define E4_SERIAL_TX_PIN EXP1_09_PIN + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #endif #else - #define E4_ENABLE_PIN EXPA2_04_PIN + #define E4_ENABLE_PIN EXP2_04_PIN #endif -#endif // HAS_BTT_EXP_MOT +#endif // BTT_MOTOR_EXPANSION diff --git a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h index 1970c0c479fd..39ab0bbd8968 100644 --- a/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h +++ b/Marlin/src/pins/lpc1768/pins_GMARSH_X6_REV1.h @@ -21,13 +21,15 @@ */ #pragma once -#if NOT_TARGET(MCU_LPC1768) - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." -#endif +/** + * GMARSH X6 Rev.1 pin assignments + */ + +#include "env_validate.h" #define BOARD_INFO_NAME "GMARSH X6 REV1" -// Ignore temp readings during develpment. +// Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 // @@ -84,17 +86,22 @@ // #if HAS_TMC_UART #define X_SERIAL_TX_PIN P1_00 - #define X_SERIAL_RX_PIN P1_00 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN P1_09 - #define Y_SERIAL_RX_PIN P1_09 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN P1_16 - #define Z_SERIAL_RX_PIN P1_16 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN P0_04 - #define E0_SERIAL_RX_PIN P0_04 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #define E1_SERIAL_TX_PIN P2_02 - #define E1_SERIAL_RX_PIN P2_02 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + #define E2_SERIAL_TX_PIN P2_06 - #define E2_SERIAL_RX_PIN P2_06 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -121,6 +128,7 @@ // Misc. Functions // #define LED_PIN P1_31 +#define POWER_MONITOR_VOLTAGE_PIN P0_25_A2 // // LCD @@ -151,18 +159,16 @@ #define SDCARD_CONNECTION LCD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) #define SD_SCK_PIN P0_15 #define SD_MISO_PIN P0_17 #define SD_MOSI_PIN P0_18 #define SD_SS_PIN P0_16 + #define SD_DETECT_PIN P1_22 #elif SD_CONNECTION_IS(ONBOARD) - #undef SD_DETECT_PIN - #define SD_DETECT_PIN P0_27 #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #endif diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h index fbddc66e7ce6..258ecd107beb 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SBASE.h @@ -22,14 +22,10 @@ #pragma once /** - * MKS SBASE pin assignments + * Makerbase MKS SBASE pin assignments */ -#if defined(MKS_HAS_LPC1769) && NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#elif !defined(MKS_HAS_LPC1769) && NOT_TARGET(MCU_LPC1768) - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." -#endif +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "MKS SBASE" @@ -140,9 +136,13 @@ #endif // -// Misc. Functions +// Power Supply Control // -#define PS_ON_PIN P0_25 // TH3 Connector +#if ENABLED(MKS_PWC) + #define PS_ON_PIN P0_25 // SERVO + #define KILL_PIN P1_29 // Z+ + #define KILL_PIN_STATE HIGH +#endif // // Ethernet pins @@ -165,8 +165,6 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(CUSTOM_CABLE) /** @@ -199,6 +197,7 @@ #define SD_SS_PIN P0_28 #else #define SD_DETECT_PIN P0_27 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #endif #endif @@ -216,6 +215,9 @@ * that the garbage/lines are erased immediately after the SD card accesses are completed. */ +// +// LCD / Controller +// #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) @@ -327,10 +329,13 @@ */ #define X_SERIAL_TX_PIN P1_22 // J8-2 #define X_SERIAL_RX_PIN P2_12 // J8-4 Interrupt Capable + #define Y_SERIAL_TX_PIN P1_23 // J8-3 #define Y_SERIAL_RX_PIN P2_11 // J8-5 Interrupt Capable + #define Z_SERIAL_TX_PIN P2_12 // J8-4 #define Z_SERIAL_RX_PIN P0_25 // TH3 + #define E0_SERIAL_TX_PIN P4_28 // J8-6 #define E0_SERIAL_RX_PIN P0_26 // TH4 @@ -339,10 +344,8 @@ #endif // UNUSED -#define PIN_P0_27 P0_27 // EXP2/Onboard SD -#define PIN_P0_28 P0_28 // EXP2 -#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0) -#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0) +//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0) +//#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0) /** * PWMs diff --git a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h index b919ecad85a1..d6b1eeab4670 100644 --- a/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h +++ b/Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h @@ -22,12 +22,10 @@ #pragma once /** - * MKS SGEN-L pin assignments + * Makerbase MKS SGEN-L pin assignments */ -#if NOT_TARGET(MCU_LPC1768) - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "MKS SGen-L" #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN_L" @@ -52,7 +50,7 @@ // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN - #if X_HOME_DIR < 0 + #if X_HOME_TO_MIN #define X_MAX_PIN P1_28 // X+ #else #define X_MIN_PIN P1_28 // X+ @@ -64,7 +62,7 @@ #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN - #if Y_HOME_DIR < 0 + #if Y_HOME_TO_MIN #define Y_MAX_PIN P1_26 // Y+ #else #define Y_MIN_PIN P1_26 // Y+ @@ -76,7 +74,7 @@ #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN - #if Z_HOME_DIR < 0 + #if Z_HOME_TO_MIN #define Z_MAX_PIN P1_24 // Z+ #else #define Z_MIN_PIN P1_24 // Z+ @@ -165,10 +163,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN P1_04 #define X_SERIAL_RX_PIN P1_01 @@ -204,7 +198,7 @@ // #define HEATER_BED_PIN P2_05 #define HEATER_0_PIN P2_07 -#if HOTENDS == 1 +#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #ifndef FAN1_PIN #define FAN1_PIN P2_06 #endif @@ -217,6 +211,15 @@ #define FAN_PIN P2_04 #endif +// +// Power Supply Control +// +#if ENABLED(MKS_PWC) + #define PS_ON_PIN P2_00 // SERVO1 + #define KILL_PIN P1_24 // Z+ + #define KILL_PIN_STATE HIGH +#endif + // // Misc. Functions // @@ -225,42 +228,78 @@ #define LED3_PIN P1_20 #define LED4_PIN P1_21 -/** - * _____ _____ - * (BEEPER) 1.31 | · · | 1.30 (BTN_ENC) (MISO) 0.8 | · · | 0.7 (SD_SCK) - * (LCD_EN) 0.18 | · · | 0.16 (LCD_RS) (BTN_EN1) 3.25 | · · | 0.28 (SD_CS2) - * (LCD_D4) 0.15 | · · 0.17 (LCD_D5) (BTN_EN2) 3.26 | · · 0.9 (SD_MOSI) - * (LCD_D6) 1.0 | · · | 1.22 (LCD_D7) (SD_DETECT) 0.27 | · · | RST - * GND | · · | 5V GND | · · | NC - * ----- ----- - * EXP1 EXP2 +/** ------ ------ + * (BEEPER) 1.31 |10 9 | 1.30 (BTN_ENC) (MISO) 0.8 |10 9 | 0.7 (SD_SCK) + * (LCD_EN) 0.18 | 8 7 | 0.16 (LCD_RS) (BTN_EN1) 3.25 | 8 7 | 0.28 (SD_CS2) + * (LCD_D4) 0.15 | 6 5 0.17 (LCD_D5) (BTN_EN2) 3.26 | 6 5 0.9 (SD_MOSI) + * (LCD_D6) 1.0 | 4 3 | 1.22 (LCD_D7) (SD_DETECT) 0.27 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ +#define EXP1_03_PIN P1_22 +#define EXP1_04_PIN P1_00 +#define EXP1_05_PIN P0_17 +#define EXP1_06_PIN P0_15 +#define EXP1_07_PIN P0_16 +#define EXP1_08_PIN P0_18 +#define EXP1_09_PIN P1_30 +#define EXP1_10_PIN P1_31 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN P0_27 +#define EXP2_05_PIN P0_09 +#define EXP2_06_PIN P3_26 +#define EXP2_07_PIN P0_28 +#define EXP2_08_PIN P3_25 +#define EXP2_09_PIN P0_07 +#define EXP2_10_PIN P0_08 + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) + #define SD_DETECT_PIN EXP2_04_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #if SD_CONNECTION_IS(ONBOARD) + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card + #define SD_SS_PIN ONBOARD_SD_CS_PIN + #else + #define SD_SS_PIN EXP2_07_PIN + #endif +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "No custom SD drive cable defined for this board." +#endif + #if HAS_WIRED_LCD - #define BEEPER_PIN P1_31 - #define BTN_ENC P1_30 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS P1_00 + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 P0_18 - #define BTN_EN2 P0_15 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE P1_22 - #define LCD_PINS_D4 P0_17 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI - #define TFT_CS_PIN P1_00 - #define TFT_A0_PIN P1_22 - #define TFT_DC_PIN P1_22 - #define TFT_MISO_PIN P0_08 - #define TFT_BACKLIGHT_PIN P0_18 - #define TFT_RESET_PIN P0_16 + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_A0_PIN EXP1_03_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN + #define TFT_RESET_PIN EXP1_07_PIN #define LCD_USE_DMA_SPI - #define TOUCH_INT_PIN P0_17 - #define TOUCH_CS_PIN P0_15 + #define TOUCH_INT_PIN EXP1_05_PIN + #define TOUCH_CS_PIN EXP1_06_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 @@ -275,8 +314,8 @@ #define TFT_QUEUE_SIZE 6144 #endif - #define BTN_EN1 P3_25 - #define BTN_EN2 P3_26 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #elif IS_TFTGLCD_PANEL @@ -284,74 +323,74 @@ #undef BTN_ENC #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS P3_25 + #define TFTGLCD_CS EXP2_08_PIN #endif #else - #define BTN_EN1 P3_25 - #define BTN_EN2 P3_26 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_SDSS P0_28 + #define LCD_SDSS EXP2_07_PIN #if ENABLED(MKS_12864OLED_SSD1306) - #define LCD_PINS_DC P0_17 - #define DOGLCD_CS P0_16 + #define LCD_PINS_DC EXP1_05_PIN + #define DOGLCD_CS EXP1_07_PIN #define DOGLCD_A0 LCD_PINS_DC - #define DOGLCD_SCK P0_15 - #define DOGLCD_MOSI P0_18 + #define DOGLCD_SCK EXP1_06_PIN + #define DOGLCD_MOSI EXP1_08_PIN - #define LCD_PINS_RS P1_00 - #define LCD_PINS_D7 P1_22 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #define KILL_PIN -1 // NC #else // !MKS_12864OLED_SSD1306 - #define LCD_PINS_RS P0_16 + #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE P0_18 - #define LCD_PINS_D4 P0_15 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS P0_18 - #define DOGLCD_A0 P0_16 - #define DOGLCD_SCK P0_07 - #define DOGLCD_MOSI P0_09 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #define LCD_BACKLIGHT_PIN -1 #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define LCD_RESET_PIN P0_15 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN P0_17 + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN P1_00 + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN P1_22 + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN P0_17 + #define NEOPIXEL_PIN EXP1_05_PIN #endif #else // !FYSETC_MINI_12864 #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS P0_17 - #define DOGLCD_A0 P1_00 + #define DOGLCD_CS EXP1_05_PIN + #define DOGLCD_A0 EXP1_04_PIN #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 P0_17 - #define LCD_PINS_D6 P1_00 - #define LCD_PINS_D7 P1_22 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -367,29 +406,9 @@ #endif // HAS_WIRED_LCD -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION ONBOARD -#endif - -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - -#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) - #define SD_DETECT_PIN P0_27 - #define SD_SCK_PIN P0_07 - #define SD_MISO_PIN P0_08 - #define SD_MOSI_PIN P0_09 - #if SD_CONNECTION_IS(ONBOARD) - #define SD_SS_PIN ONBOARD_SD_CS_PIN - #else - #define SD_SS_PIN P0_28 - #endif -#elif SD_CONNECTION_IS(CUSTOM_CABLE) - #error "No custom SD drive cable defined for this board." -#endif - // // Other Pins // //#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0) //#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0) -//#define PS_ON_PIN P1_23 // SERVO P1.23 +//#define PS_ON_PIN P1_23 // SERVO0 P1.23 diff --git a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h index 65840308ca90..ce5d5ad7c6de 100644 --- a/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h @@ -35,9 +35,7 @@ // Numbers in parentheses () are the corresponding mega2560 pin numbers -#if NOT_TARGET(MCU_LPC1768) - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Re-ARM RAMPS 1.4" @@ -121,9 +119,6 @@ * If undefined software serial is used according to the pins below */ - // - // Software serial - // // P2_08 E1-Step // P2_13 E1-Dir @@ -132,28 +127,28 @@ #define X_SERIAL_TX_PIN P0_01 #endif #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN P0_01 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN P0_00 #endif #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN P0_00 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN P2_13 #endif #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN P2_13 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN P2_08 #endif #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN P2_08 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability @@ -219,7 +214,7 @@ #define FAN1_PIN RAMPS_D8_PIN #elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") #define HEATER_BED_PIN RAMPS_D8_PIN - #if HOTENDS == 1 + #if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) #define FAN1_PIN MOSFET_D_PIN #else #define HEATER_1_PIN MOSFET_D_PIN @@ -250,8 +245,8 @@ #define PS_ON_PIN P2_12 // (12) -#if !defined(MAX6675_SS_PIN) && DISABLED(USE_ZMAX_PLUG) - #define MAX6675_SS_PIN P1_28 +#if !defined(TEMP_0_CS_PIN) && DISABLED(USE_ZMAX_PLUG) + #define TEMP_0_CS_PIN P1_28 #endif #if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENA_PIN) @@ -460,8 +455,6 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) #define SD_SCK_PIN P0_15 // (52) system defined J3-9 & AUX-3 #define SD_MISO_PIN P0_17 // (50) system defined J3-10 & AUX-3 @@ -472,6 +465,7 @@ #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." diff --git a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h index 700e79de9cce..2972ac756079 100644 --- a/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h +++ b/Marlin/src/pins/lpc1768/pins_SELENA_COMPACT.h @@ -25,9 +25,7 @@ * Selena Compact pin assignments */ -#if NOT_TARGET(MCU_LPC1768) - #error "Oops! Make sure you have the LPC1768 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Selena Compact" #define BOARD_WEBSITE_URL "github.com/Ales2-k/Selena" @@ -42,11 +40,11 @@ // #define X_MIN_PIN P1_28 #define X_MAX_PIN P1_25 -#define Y_MIN_PIN P2_11 -#define Y_MAX_PIN -1 -#define Z_MIN_PIN P1_27 -#define Z_MAX_PIN -1 -#define Z_PROBE P1_22 +#define Y_STOP_PIN P2_11 +#define Z_STOP_PIN P1_27 +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN P1_22 +#endif // // Steppers @@ -97,22 +95,22 @@ // #if IS_RRD_FG_SC - #define LCD_PINS_RS P0_16 - #define LCD_PINS_ENABLE P0_18 - #define LCD_PINS_D4 P0_15 - #define LCD_PINS_D5 P1_00 - #define LCD_PINS_D6 P1_01 - #define LCD_PINS_D7 P1_04 - #define BEEPER_PIN P1_31 - - #define BTN_EN1 P3_25 - #define BTN_EN2 P3_26 - #define BTN_ENC P1_30 - - #define SD_DETECT_PIN -1 - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif + #define LCD_PINS_RS P0_16 + #define LCD_PINS_ENABLE P0_18 + #define LCD_PINS_D4 P0_15 + #define LCD_PINS_D5 P1_00 + #define LCD_PINS_D6 P1_01 + #define LCD_PINS_D7 P1_04 + #define BEEPER_PIN P1_31 + + #define BTN_EN1 P3_25 + #define BTN_EN2 P3_26 + #define BTN_ENC P1_30 + + #define SD_DETECT_PIN -1 + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif #endif // IS_RRD_FG_SC diff --git a/Marlin/src/pins/lpc1769/env_validate.h b/Marlin/src/pins/lpc1769/env_validate.h new file mode 100644 index 000000000000..2e2b63d5203f --- /dev/null +++ b/Marlin/src/pins/lpc1769/env_validate.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if NOT_TARGET(MCU_LPC1769) + #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." +#endif diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h index adf9085262a0..7ce78ad2832d 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_GT.h @@ -25,9 +25,7 @@ * Azteeg X5 GT pin assignments */ -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Azteeg X5 GT" #define BOARD_WEBSITE_URL "tinyurl.com/yx8tdqa3" diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h index fdd64878fbc6..f3ecebde4674 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI.h @@ -24,10 +24,7 @@ /** * Azteeg X5 MINI pin assignments */ - -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Azteeg X5 MINI" @@ -201,8 +198,6 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) #define SD_SCK_PIN P0_15 #define SD_MISO_PIN P0_17 @@ -213,6 +208,7 @@ #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." diff --git a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h index 99ff0fd25a14..086bacbac0f6 100644 --- a/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h +++ b/Marlin/src/pins/lpc1769/pins_AZTEEG_X5_MINI_WIFI.h @@ -22,12 +22,10 @@ #pragma once /** - * Azteeg X5 MINI pin assignments + * Azteeg X5 MINI WIFI pin assignments */ -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Azteeg X5 MINI WIFI" diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h index 6e498ba6aa8b..9c514f8ca318 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_E3_TURBO.h @@ -21,6 +21,12 @@ */ #pragma once +/** + * BigTreeTech SKR E3 Turbo pin assignments + */ + +#include "env_validate.h" + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT SKR E3 Turbo" #endif @@ -127,23 +133,20 @@ * If undefined software serial is used according to the pins below */ - // - // Software serial - // #define X_SERIAL_TX_PIN P1_01 - #define X_SERIAL_RX_PIN P1_01 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN P1_10 - #define Y_SERIAL_RX_PIN P1_10 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN P1_17 - #define Z_SERIAL_RX_PIN P1_17 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN P0_05 - #define E0_SERIAL_RX_PIN P0_05 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN P0_22 - #define E1_SERIAL_RX_PIN P0_22 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -163,8 +166,8 @@ // #define TEMP_0_PIN P0_24 #define TEMP_1_PIN P0_23 -//#define TEMP_2_PIN P1_30 // Onboard thermistor #define TEMP_BED_PIN P0_25 +#define TEMP_BOARD_PIN P1_30 // Onboard thermistor, NTC100K // // Heaters / Fans @@ -180,61 +183,79 @@ #endif /** - * _____ - * 5V | 1 2 | GND - * (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) - * (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) - * RESET | 7 8 | P0_19 (BTN_EN1) - * (BTN_ENC) P0_16 | 9 10| P2_08 (BEEPER) - * ----- + * ------ + * 5V | 1 2 | GND + * (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) + * (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) + * RESET | 7 8 | P0_19 (BTN_EN1) + * (BTN_ENC) P0_16 | 9 10 | P2_08 (BEEPER) + * ------ * EXP */ - -#define EXPA1_03_PIN P0_18 -#define EXPA1_04_PIN P0_17 -#define EXPA1_05_PIN P0_15 -#define EXPA1_06_PIN P0_20 -#define EXPA1_07_PIN -1 -#define EXPA1_08_PIN P0_19 -#define EXPA1_09_PIN P0_16 -#define EXPA1_10_PIN P2_08 - -#if HAS_WIRED_LCD +#define EXP1_03_PIN P0_18 +#define EXP1_04_PIN P0_17 +#define EXP1_05_PIN P0_15 +#define EXP1_06_PIN P0_20 +#define EXP1_07_PIN -1 +#define EXP1_08_PIN P0_19 +#define EXP1_09_PIN P0_16 +#define EXP1_10_PIN P2_08 + +#if EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) + #error "Ender-3 V2 display requires a custom cable with TX = P0_15, RX = P0_16. Comment out this line to continue." + + /** + * Ender 3 V2 display SKR E3 Turbo (EXP1) Ender 3 V2 display --> SKR E3 Turbo + * ------ ------ RX 8 --> 5 P0_15 + * 5V | 1 2 | GND 5V | 1 2 | GND TX 7 --> 9 P0_16 + * (BTN_E1) A | 3 4 | B (BTN_E2) (LCD_EN) P0_18 | 3 4 | P0_17 (LCD_RS) BEEPER 5 --> 10 P2_08 + * BEEPER | 5 6 ENT (BTN_ENC) (LCD_D4) P0_15 | 5 6 P0_20 (BTN_EN2) + * (SKR_RX1) TX | 7 8 | RX (SKR_TX1) Reset | 7 8 | P0_19 (BTN_EN1) + * NC | 9 10 | NC (BTN_ENC) P0_16 | 9 10 | P2_08 (BEEPER) + * ------ ------ + */ + + #define BEEPER_PIN EXP1_10_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_04_PIN + #define BTN_ENC EXP1_06_PIN + +#elif HAS_WIRED_LCD #if ENABLED(CR10_STOCKDISPLAY) - #define BEEPER_PIN EXPA1_10_PIN + #define BEEPER_PIN EXP1_10_PIN - #define BTN_EN1 EXPA1_08_PIN - #define BTN_EN2 EXPA1_06_PIN - #define BTN_ENC EXPA1_09_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN - #define LCD_PINS_RS EXPA1_04_PIN - #define LCD_PINS_ENABLE EXPA1_03_PIN - #define LCD_PINS_D4 EXPA1_05_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_E3_TURBO.h' for details. Comment out this line to continue." - #define LCD_PINS_RS EXPA1_05_PIN - #define LCD_PINS_ENABLE EXPA1_09_PIN - #define LCD_PINS_D4 EXPA1_04_PIN - #define LCD_PINS_D5 EXPA1_06_PIN - #define LCD_PINS_D6 EXPA1_08_PIN - #define LCD_PINS_D7 EXPA1_10_PIN + #define LCD_PINS_RS EXP1_05_PIN + #define LCD_PINS_ENABLE EXP1_09_PIN + #define LCD_PINS_D4 EXP1_04_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_08_PIN + #define LCD_PINS_D7 EXP1_10_PIN #define ADC_KEYPAD_PIN P1_23 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) - #define BTN_EN1 EXPA1_08_PIN - #define BTN_EN2 EXPA1_06_PIN - #define BTN_ENC EXPA1_09_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN - #define DOGLCD_CS EXPA1_04_PIN - #define DOGLCD_A0 EXPA1_05_PIN - #define DOGLCD_SCK EXPA1_10_PIN - #define DOGLCD_MOSI EXPA1_03_PIN + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_A0 EXP1_05_PIN + #define DOGLCD_SCK EXP1_10_PIN + #define DOGLCD_MOSI EXP1_03_PIN #define FORCE_SOFT_SPI #define LCD_BACKLIGHT_PIN -1 @@ -262,5 +283,3 @@ #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "SD CUSTOM_CABLE is not compatible with SKR E3 Turbo." #endif - -#define ON_BOARD_SPI_DEVICE 1 // SPI1 diff --git a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h index a751286e3a81..7f428fc91881 100644 --- a/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h +++ b/Marlin/src/pins/lpc1769/pins_BTT_SKR_V1_4_TURBO.h @@ -21,10 +21,14 @@ */ #pragma once +/** + * BigTreeTech SKR 1.4 Turbo pin assignments + */ + #define BOARD_INFO_NAME "BTT SKR V1.4 TURBO" -#define SKR_HAS_LPC1769 // // Include SKR 1.4 pins // -#include "../lpc1768/pins_BTT_SKR_V1_4.h" +#define REQUIRE_LPC1769 +#include "../lpc1768/pins_BTT_SKR_V1_4.h" // ... BTT_SKR_common diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h index d66ffbe4e5d3..237dfaec36fb 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_MINI.h @@ -25,9 +25,7 @@ * Cohesion3D Mini pin assignments */ -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Cohesion3D Mini" diff --git a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h index edf13cee298d..ea2e0b708251 100644 --- a/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h +++ b/Marlin/src/pins/lpc1769/pins_COHESION3D_REMIX.h @@ -25,9 +25,7 @@ * Cohesion3D ReMix pin assignments */ -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Cohesion3D ReMix" @@ -231,8 +229,6 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) #define SD_SCK_PIN P0_07 // (52) system defined J3-9 & AUX-3 #define SD_MISO_PIN P0_08 // (50) system defined J3-10 & AUX-3 @@ -241,6 +237,7 @@ #define SD_SS_PIN P1_23 // (53) system defined J3-5 & AUX-3 (Sometimes called SDSS) - CS used by Marlin #else #undef SD_DETECT_PIN + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #endif #elif SD_CONNECTION_IS(CUSTOM_CABLE) diff --git a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h index 3982d76a012d..ec0b14af9043 100644 --- a/Marlin/src/pins/lpc1769/pins_FLY_CDY.h +++ b/Marlin/src/pins/lpc1769/pins_FLY_CDY.h @@ -21,9 +21,11 @@ */ #pragma once -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif +/** + * FLYmaker FLY-CDY pin assignments + */ + +#include "env_validate.h" #define BOARD_INFO_NAME "FLY-CDY" #define BOARD_WEBSITE_URL "github.com/FLYmaker/FLY-CDY" @@ -106,22 +108,22 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN P1_04 - #define X_SERIAL_RX_PIN P1_04 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN P1_10 - #define Y_SERIAL_RX_PIN P1_10 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN P1_16 - #define Z_SERIAL_RX_PIN P1_16 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN P4_28 - #define E0_SERIAL_RX_PIN P4_28 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN P2_12 - #define E1_SERIAL_RX_PIN P2_12 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN P0_10 - #define E2_SERIAL_RX_PIN P0_10 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h index d67549997be5..23bcecc78d74 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN.h @@ -24,35 +24,34 @@ /** * MKS SGen pin assignments * - * The pins diagram can be found and the following URL: + * Pins diagram: * https://github.com/makerbase-mks/MKS-SGen/blob/master/Hardware/MKS%20SGEN%20V1.0_001/MKS%20SGEN%20V1.0_001%20PIN.pdf */ -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif - #define BOARD_INFO_NAME "MKS SGen" #define BOARD_WEBSITE_URL "github.com/makerbase-mks/MKS-SGEN" -#define MKS_HAS_LPC1769 +#define REQUIRE_LPC1769 #include "../lpc1768/pins_MKS_SBASE.h" #if HAS_TMC_UART /** * TMC2208/TMC2209 stepper drivers */ - #define X_SERIAL_TX_PIN P1_22 // J8-2 - #define X_SERIAL_RX_PIN P1_22 // J8-2 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN P1_23 // J8-3 - #define Y_SERIAL_RX_PIN P1_23 // J8-3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN P2_12 // J8-4 - #define Z_SERIAL_RX_PIN P2_12 // J8-4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN P2_11 // J8-5 - #define E0_SERIAL_RX_PIN P2_11 // J8-5 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #define E1_SERIAL_TX_PIN P4_28 // J8-6 - #define E1_SERIAL_RX_PIN P4_28 // J8-6 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h index 79c79c591457..bb39009f094f 100644 --- a/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h +++ b/Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h @@ -22,12 +22,10 @@ #pragma once /** - * MKS SGen pin assignments + * MKS SGen-L V2 pin assignments */ -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "MKS SGEN_L V2" #define BOARD_WEBSITE_URL "github.com/makerbase-mks" @@ -62,7 +60,7 @@ // #if X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN - #if X_HOME_DIR < 0 + #if X_HOME_TO_MIN #define X_MAX_PIN P1_28 // X+ #else #define X_MIN_PIN P1_28 // X+ @@ -74,7 +72,7 @@ #if Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN - #if Y_HOME_DIR < 0 + #if Y_HOME_TO_MIN #define Y_MAX_PIN P1_26 // Y+ #else #define Y_MIN_PIN P1_26 // Y+ @@ -86,7 +84,7 @@ #if Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN - #if Z_HOME_DIR < 0 + #if Z_HOME_TO_MIN #define Z_MAX_PIN P1_24 // Z+ #else #define Z_MIN_PIN P1_24 // Z+ @@ -175,19 +173,20 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN P1_01 - #define X_SERIAL_RX_PIN P1_01 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN P1_08 - #define Y_SERIAL_RX_PIN P1_08 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN P1_10 - #define Z_SERIAL_RX_PIN P1_10 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN P1_15 - #define E0_SERIAL_RX_PIN P1_15 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #define E1_SERIAL_TX_PIN P1_17 - #define E1_SERIAL_RX_PIN P1_17 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -228,6 +227,15 @@ // #define LED_PIN P1_18 // Used as a status indicator +// +// Power Supply Control +// +#if ENABLED(MKS_PWC) + #define PS_ON_PIN P2_00 // SERVO1 + #define KILL_PIN P1_24 // Z+ + #define KILL_PIN_STATE HIGH +#endif + // // RGB LED // @@ -247,70 +255,87 @@ #define LED4_PIN P1_21 #endif -/** - * _____ _____ - * (BEEPER) 1.31 | · · | 1.30 (BTN_ENC) (MISO) 0.8 | · · | 0.7 (SD_SCK) - * (LCD_EN) 0.18 | · · | 0.16 (LCD_RS) (BTN_EN1) 3.25 | · · | 0.28 (SD_CS2) - * (LCD_D4) 0.15 | · · | 0.17 (LCD_D5) (BTN_EN2) 3.26 | · · | 0.9 (SD_MOSI) - * (LCD_D6) 1.0 | · · | 1.22 (LCD_D7) (SD_DETECT) 0.27 | · · | RST - * GND | · · | 5V GND | · · | NC - * ----- ----- - * EXP1 EXP2 +/** ------ ------ + * (BEEPER) 1.31 |10 9 | 1.30 (BTN_ENC) (MISO) 0.8 |10 9 | 0.7 (SD_SCK) + * (LCD_EN) 0.18 | 8 7 | 0.16 (LCD_RS) (BTN_EN1) 3.25 | 8 7 | 0.28 (SD_CS2) + * (LCD_D4) 0.15 | 6 5 | 0.17 (LCD_D5) (BTN_EN2) 3.26 | 6 5 | 0.9 (SD_MOSI) + * (LCD_D6) 1.0 | 4 3 | 1.22 (LCD_D7) (SD_DETECT) 0.27 | 4 3 | RST + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ +#define EXP1_03_PIN P1_22 +#define EXP1_04_PIN P1_00 +#define EXP1_05_PIN P0_17 +#define EXP1_06_PIN P0_15 +#define EXP1_07_PIN P0_16 +#define EXP1_08_PIN P0_18 +#define EXP1_09_PIN P1_30 +#define EXP1_10_PIN P1_31 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN P0_27 +#define EXP2_05_PIN P0_09 +#define EXP2_06_PIN P3_26 +#define EXP2_07_PIN P0_28 +#define EXP2_08_PIN P3_25 +#define EXP2_09_PIN P0_07 +#define EXP2_10_PIN P0_08 + #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS P3_25 + #define TFTGLCD_CS EXP2_08_PIN #endif - #define SD_DETECT_PIN P0_27 + #define SD_DETECT_PIN EXP2_04_PIN #elif HAS_WIRED_LCD - #define BEEPER_PIN P1_31 - #define BTN_ENC P1_30 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS P1_00 + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 P0_18 - #define BTN_EN2 P0_15 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE P1_22 - #define LCD_PINS_D4 P0_17 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #else - #define BTN_EN1 P3_25 - #define BTN_EN2 P3_26 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_SDSS P0_28 + #define LCD_SDSS EXP2_07_PIN #if ENABLED(MKS_12864OLED_SSD1306) - #define LCD_PINS_DC P0_17 - #define DOGLCD_CS P0_16 + #define LCD_PINS_DC EXP1_05_PIN + #define DOGLCD_CS EXP1_07_PIN #define DOGLCD_A0 LCD_PINS_DC - #define DOGLCD_SCK P0_15 - #define DOGLCD_MOSI P0_18 + #define DOGLCD_SCK EXP1_06_PIN + #define DOGLCD_MOSI EXP1_08_PIN - #define LCD_PINS_RS P1_00 - #define LCD_PINS_D7 P1_22 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #define KILL_PIN -1 // NC #elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI - #define TFT_CS_PIN P1_00 - #define TFT_A0_PIN P1_22 - #define TFT_DC_PIN P1_22 - #define TFT_MISO_PIN P0_08 - #define TFT_BACKLIGHT_PIN P0_18 - #define TFT_RESET_PIN P0_16 + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_A0_PIN EXP1_03_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN + #define TFT_RESET_PIN EXP1_07_PIN #define LCD_USE_DMA_SPI - #define TOUCH_INT_PIN P0_17 - #define TOUCH_CS_PIN P0_15 + #define TOUCH_INT_PIN EXP1_05_PIN + #define TOUCH_CS_PIN EXP1_06_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 @@ -327,50 +352,50 @@ #else // !MKS_12864OLED_SSD1306 - #define LCD_PINS_RS P0_16 + #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE P0_18 - #define LCD_PINS_D4 P0_15 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS P0_18 - #define DOGLCD_A0 P0_16 - #define DOGLCD_SCK P0_07 - #define DOGLCD_MOSI P1_20 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #define LCD_BACKLIGHT_PIN -1 #define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define LCD_RESET_PIN P0_15 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN P0_17 + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN P1_00 + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN P1_22 + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN P0_17 + #define NEOPIXEL_PIN EXP1_05_PIN #endif #else // !FYSETC_MINI_12864 #if ENABLED(MKS_MINI_12864) - #define DOGLCD_CS P0_17 - #define DOGLCD_A0 P1_00 + #define DOGLCD_CS EXP1_05_PIN + #define DOGLCD_A0 EXP1_04_PIN #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 P0_17 - #define LCD_PINS_D6 P1_00 - #define LCD_PINS_D7 P1_22 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -390,17 +415,16 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card - #if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD) - #define SD_DETECT_PIN P0_27 - #define SD_SCK_PIN P0_07 - #define SD_MISO_PIN P0_08 - #define SD_MOSI_PIN P0_09 + #define SD_DETECT_PIN EXP2_04_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN #if SD_CONNECTION_IS(ONBOARD) + #define ONBOARD_SD_CS_PIN P0_06 // Chip select for "System" SD card #define SD_SS_PIN ONBOARD_SD_CS_PIN #else - #define SD_SS_PIN P0_28 + #define SD_SS_PIN EXP2_07_PIN #endif #elif SD_CONNECTION_IS(CUSTOM_CABLE) #error "No custom SD drive cable defined for this board." @@ -411,4 +435,4 @@ // //#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0) //#define PIN_P0_03 P0_03 // AUX1 (Interrupt Capable/ADC/Serial Port 0) -//#define PS_ON_PIN P1_23 // SERVO P1.23 +//#define PS_ON_PIN P1_23 // SERVO0 P1.23 diff --git a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h index c5ce3f879582..e80116efd036 100644 --- a/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h @@ -22,12 +22,10 @@ #pragma once /** - * Smoothieboard pin assignments + * Smoothieware Smoothieboard pin assignments */ -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Smoothieboard" #define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard" diff --git a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h index d4f3e5bc21b5..dc7dcd6db609 100644 --- a/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h +++ b/Marlin/src/pins/lpc1769/pins_TH3D_EZBOARD.h @@ -25,9 +25,9 @@ * TH3D EZBoard pin assignments */ -#if NOT_TARGET(MCU_LPC1769) - #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." -#endif +#include "env_validate.h" + +//#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config #define BOARD_INFO_NAME "TH3D EZBoard" #define BOARD_WEBSITE_URL "th3dstudio.com" @@ -35,14 +35,22 @@ // // Servos // -#define SERVO0_PIN P2_04 +#if ENABLED(V3_EZABL_ON_SERVO) + #define SERVO0_PIN -1 +#else + #define SERVO0_PIN P2_04 +#endif // // Limit Switches // #define X_STOP_PIN P1_24 #define Y_STOP_PIN P1_25 -#define Z_STOP_PIN P1_26 +#if ENABLED(V3_EZABL_ON_SERVO) + #define Z_STOP_PIN P2_04 +#else + #define Z_STOP_PIN P1_26 +#endif // // Filament Runout Sensor @@ -77,14 +85,16 @@ #if HAS_TMC_UART // // TMC220x stepper drivers - // Software serial // #define X_SERIAL_TX_PIN P0_04 #define X_SERIAL_RX_PIN P0_05 + #define Y_SERIAL_TX_PIN P0_10 #define Y_SERIAL_RX_PIN P0_11 + #define Z_SERIAL_TX_PIN P0_19 #define Z_SERIAL_RX_PIN P0_20 + #define E0_SERIAL_TX_PIN P0_22 #define E0_SERIAL_RX_PIN P0_21 @@ -103,13 +113,6 @@ #endif #define TEMP_BED_PIN P0_24_A1 // Analog Input P0_24 -#define TEMP_1_PIN P0_25_A2 // Analog Input P0_25 - -#if ENABLED(FILAMENT_WIDTH_SENSOR) - #define FILWIDTH_PIN P0_26_A3 // Analog Input P0_26 -#else - #define TEMP_2_PIN P0_26_A3 // Analog Input P0_26 -#endif // // Heaters / Fans @@ -141,6 +144,7 @@ #define SDCARD_CONNECTION ONBOARD +//#define SD_DETECT_PIN P0_25 // SD_CD #define SD_SCK_PIN P0_07 #define SD_MISO_PIN P0_08 #define SD_MOSI_PIN P0_09 @@ -152,14 +156,14 @@ // /** - * _____ - * 5V | · · | GND - * (LCD_EN) P0_18 | · · | P0_16 (LCD_RS) - * (LCD_D4) P0_15 | · · P3_25 (BTN_EN2) - * (RESET) P2_11 | · · | P3_26 (BTN_EN1) - * (BTN_ENC) P1_30 | · · | P1_31 (BEEPER) - * ----- - * EXP1 + * ------ + * 5V | 1 2 | GND + * P0_18 | 3 4 | P0_16 + * P0_15 | 5 6 P3_25 + * P2_11 | 7 8 | P3_26 + * P1_30 | 9 10 | P1_31 + * ------ + * EXP1 * * LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be * defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER. @@ -167,16 +171,57 @@ * A remote SD card is currently not supported because the pins routed to the EXP2 * connector are shared with the onboard SD card. */ +#define EXP1_03_PIN P0_18 +#define EXP1_04_PIN P0_16 +#define EXP1_05_PIN P0_15 +#define EXP1_06_PIN P3_25 +#define EXP1_07_PIN P2_11 +#define EXP1_08_PIN P3_26 +#define EXP1_09_PIN P1_30 +#define EXP1_10_PIN P1_31 #if ENABLED(CR10_STOCKDISPLAY) - #define BEEPER_PIN P1_31 - #define BTN_EN1 P3_26 - #define BTN_EN2 P3_25 - #define BTN_ENC P1_30 - #define LCD_PINS_RS P0_16 - #define LCD_PINS_ENABLE P0_18 - #define LCD_PINS_D4 P0_15 - #define KILL_PIN P2_11 + /** ------ + * 5V | 1 2 | GND + * LCD_EN | 3 4 | LCD_RS + * LCD_D4 | 5 6 EN2 + * KILL | 7 8 | EN1 + * ENC | 9 10 | BEEPER + * ------ + */ + #define BEEPER_PIN EXP1_10_PIN + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define KILL_PIN EXP1_07_PIN + +#elif ENABLED(MKS_MINI_12864) + /** ------ + * 5V | 1 2 | GND + * SPI-MOSI | 3 4 | SPI-CS + * A0 | 5 6 EN2 + * -- | 7 8 | EN1 + * ENC | 9 10 | SPI-SCK + * ------ + */ + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_A0 EXP1_05_PIN + #define DOGLCD_SCK EXP1_10_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define LCD_CONTRAST_INIT 160 + #define LCD_CONTRAST_MIN 120 + #define LCD_CONTRAST_MAX 180 + #define FORCE_SOFT_SPI + #define LCD_BACKLIGHT_PIN -1 + #elif HAS_WIRED_LCD - #error "Only the CR10_STOCKDISPLAY is supported with TH3D EZBoard." + + #error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard." + +#endif + +#if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864) + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN #endif diff --git a/Marlin/src/pins/mega/env_validate.h b/Marlin/src/pins/mega/env_validate.h new file mode 100644 index 000000000000..97c52d4e5e05 --- /dev/null +++ b/Marlin/src/pins/mega/env_validate.h @@ -0,0 +1,32 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if NOT_TARGET(__AVR_ATmega2560__) + #if DISABLED(ALLOW_MEGA1280) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" + #elif NOT_TARGET(__AVR_ATmega1280__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560 or 1280' in 'Tools > Board.'" + #endif +#endif + +#undef ALLOW_MEGA1280 diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONIC.h b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h index 98427d9e592a..8bcb263bc1fd 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONIC.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONIC.h @@ -25,9 +25,7 @@ * Cheaptronic v1.0 pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Cheaptronic v1.0" // diff --git a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h index 3f18bc8bbea0..01438975b979 100644 --- a/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h +++ b/Marlin/src/pins/mega/pins_CHEAPTRONICv2.h @@ -27,9 +27,7 @@ * www.reprapobchod.cz */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Cheaptronic v2.0" diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h index f80e6144ce18..6f9e5e8e6c47 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_11.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_11.h @@ -25,9 +25,8 @@ * CartesioV11 pin assignments */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#define ALLOW_MEGA1280 +#include "env_validate.h" #define BOARD_INFO_NAME "CN Controls V11" diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h index 540f5c29f517..f1200e09018a 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_12.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_12.h @@ -25,9 +25,8 @@ * CartesioV12 pin assignments */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#define ALLOW_MEGA1280 +#include "env_validate.h" #define BOARD_INFO_NAME "CN Controls V12" diff --git a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h index 8bafbdf00058..6de3b7172eb0 100644 --- a/Marlin/src/pins/mega/pins_CNCONTROLS_15.h +++ b/Marlin/src/pins/mega/pins_CNCONTROLS_15.h @@ -25,9 +25,8 @@ * CNControls V15 for HMS434 pin assignments */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#define ALLOW_MEGA1280 +#include "env_validate.h" #define BOARD_INFO_NAME "CN Controls V15" diff --git a/Marlin/src/pins/mega/pins_EINSTART-S.h b/Marlin/src/pins/mega/pins_EINSTART-S.h index 40d65c353e8c..d42efe73617f 100644 --- a/Marlin/src/pins/mega/pins_EINSTART-S.h +++ b/Marlin/src/pins/mega/pins_EINSTART-S.h @@ -26,9 +26,8 @@ * PCB Silkscreen: 3DPrinterCon_v3.5 */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#define ALLOW_MEGA1280 +#include "env_validate.h" #define BOARD_INFO_NAME "Einstart-S" diff --git a/Marlin/src/pins/mega/pins_ELEFU_3.h b/Marlin/src/pins/mega/pins_ELEFU_3.h index af93c408a25a..f5e146cff99c 100644 --- a/Marlin/src/pins/mega/pins_ELEFU_3.h +++ b/Marlin/src/pins/mega/pins_ELEFU_3.h @@ -25,9 +25,7 @@ * Elefu RA Board Pin Assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Elefu Ra v3" diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_A.h b/Marlin/src/pins/mega/pins_GT2560_REV_A.h index dcd829f7a7ae..1adf8d3079f4 100644 --- a/Marlin/src/pins/mega/pins_GT2560_REV_A.h +++ b/Marlin/src/pins/mega/pins_GT2560_REV_A.h @@ -27,9 +27,8 @@ * Richard Smith */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#define ALLOW_MEGA1280 +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "GT2560 Rev.A" @@ -48,10 +47,11 @@ #if ENABLED(BLTOUCH) #if MB(GT2560_REV_A_PLUS) #define SERVO0_PIN 11 + #define Z_MAX_PIN 32 #else #define SERVO0_PIN 32 + #define Z_MAX_PIN -1 #endif - #define Z_MAX_PIN -1 #else #define Z_MAX_PIN 32 #endif diff --git a/Marlin/src/pins/mega/pins_GT2560_REV_B.h b/Marlin/src/pins/mega/pins_GT2560_REV_B.h new file mode 100644 index 000000000000..be71ec4902dc --- /dev/null +++ b/Marlin/src/pins/mega/pins_GT2560_REV_B.h @@ -0,0 +1,30 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Geeetech GT2560 Rev B Pins + */ + +#define BOARD_INFO_NAME "GT2560 Rev B" + +#include "pins_GT2560_V3.h" diff --git a/Marlin/src/pins/mega/pins_GT2560_V3.h b/Marlin/src/pins/mega/pins_GT2560_V3.h index 606debd1b06b..46b4ebf4287e 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3.h @@ -22,21 +22,22 @@ #pragma once /** - * GT2560 RevB + GT2560 V3.0 + GT2560 V3.1 + GT2560 V4.0 pin assignment + * Geeetech GT2560 3.0/3.1 pin assignments + * + * Also GT2560 RevB and GT2560 4.0/4.1 */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#define ALLOW_MEGA1280 +#include "env_validate.h" #ifndef BOARD_INFO_NAME - #define BOARD_INFO_NAME "GT2560 V3.0" + #define BOARD_INFO_NAME "GT2560 3.x" #endif // // Servos // -#define SERVO0_PIN 11 //13 untested 3Dtouch +#define SERVO0_PIN 11 // 13 untested 3Dtouch // // Limit Switches @@ -82,6 +83,9 @@ #ifndef FIL_RUNOUT2_PIN #define FIL_RUNOUT2_PIN 67 #endif +#ifndef FIL_RUNOUT3_PIN + #define FIL_RUNOUT3_PIN 54 +#endif // // Power Recovery @@ -142,7 +146,10 @@ #define SDSS 53 #define LED_PIN 13 // Use 6 (case light) for external LED. 13 is internal (yellow) LED. #define PS_ON_PIN 12 -#define SUICIDE_PIN 54 // This pin must be enabled at boot to keep power flowing + +#if NUM_RUNOUT_SENSORS < 3 + #define SUICIDE_PIN 54 // This pin must be enabled at boot to keep power flowing +#endif #ifndef CASE_LIGHT_PIN #define CASE_LIGHT_PIN 6 // 21 @@ -153,26 +160,51 @@ // #define BEEPER_PIN 18 -#ifndef LCD_PINS_RS - #define LCD_PINS_RS 20 -#endif -#ifndef LCD_PINS_ENABLE - #define LCD_PINS_ENABLE 17 -#endif -#ifndef LCD_PINS_D4 - #define LCD_PINS_D4 16 -#endif -#ifndef LCD_PINS_D5 - #define LCD_PINS_D5 21 -#endif -#ifndef LCD_PINS_D6 - #define LCD_PINS_D6 5 -#endif -#ifndef LCD_PINS_D7 - #define LCD_PINS_D7 36 +#if ENABLED(YHCB2004) + #ifndef YHCB2004_CLK + #define YHCB2004_CLK 5 + #define DIO52 YHCB2004_CLK + #endif + #ifndef YHCB2004_MOSI + #define YHCB2004_MOSI 21 + #define DIO50 YHCB2004_MOSI + #endif + #ifndef YHCB2004_MISO + #define YHCB2004_MISO 36 + #define DIO51 YHCB2004_MISO + #endif +#elif HAS_WIRED_LCD + #ifndef LCD_PINS_RS + #define LCD_PINS_RS 20 + #endif + #ifndef LCD_PINS_ENABLE + #define LCD_PINS_ENABLE 17 + #endif + #ifndef LCD_PINS_D4 + #define LCD_PINS_D4 16 + #endif + #ifndef LCD_PINS_D5 + #define LCD_PINS_D5 21 + #endif + #ifndef LCD_PINS_D6 + #define LCD_PINS_D6 5 + #endif + #ifndef LCD_PINS_D7 + #define LCD_PINS_D7 36 + #endif #endif -#if IS_NEWPANEL +#if ENABLED(YHCB2004) + #ifndef BTN_EN1 + #define BTN_EN1 16 + #endif + #ifndef BTN_EN2 + #define BTN_EN2 17 + #endif + #ifndef BTN_ENC + #define BTN_ENC 19 + #endif +#elif IS_NEWPANEL #ifndef BTN_EN1 #define BTN_EN1 42 #endif diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h index c445f5b24187..986dd1cb04bb 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_A20.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_A20.h @@ -22,7 +22,7 @@ #pragma once /** - * Geeetech A20M pin assignment + * Geeetech A20M board pin assignments */ #define LCD_PINS_RS 5 @@ -30,7 +30,7 @@ #define LCD_PINS_D4 21 #define LCD_PINS_D7 6 -#define SPEAKER // The speaker can produce tones +#define SPEAKER // The speaker can produce tones #if IS_NEWPANEL #define BTN_EN1 16 diff --git a/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h b/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h index 26721df3641e..6b22b4139b6d 100644 --- a/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h +++ b/Marlin/src/pins/mega/pins_GT2560_V3_MC2.h @@ -21,9 +21,9 @@ */ #pragma once -/***************************************************************** - * GT2560 V3.0 pin assignment (for Mecreator 2) - *****************************************************************/ +/** + * Geeetech GT2560 V 3.0 board pin assignments (for Mecreator 2) + */ #define BOARD_INFO_NAME "GT2560 V3.0 (MC2)" diff --git a/Marlin/src/pins/mega/pins_GT2560_V4.h b/Marlin/src/pins/mega/pins_GT2560_V4.h new file mode 100644 index 000000000000..6ac07b70bfce --- /dev/null +++ b/Marlin/src/pins/mega/pins_GT2560_V4.h @@ -0,0 +1,30 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Geeetech GT2560 V4.X Pins + */ + +#define BOARD_INFO_NAME "GT2560 4.x" + +#include "pins_GT2560_V3.h" diff --git a/Marlin/src/pins/mega/pins_GT2560_V4_A20.h b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h new file mode 100644 index 000000000000..83a612e67cdc --- /dev/null +++ b/Marlin/src/pins/mega/pins_GT2560_V4_A20.h @@ -0,0 +1,43 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Geeetech A20 GT2560 V4.x board pin assignments + */ + +#define BOARD_INFO_NAME "GT2560 4.x" + +#define LCD_PINS_RS 5 +#define LCD_PINS_ENABLE 36 +#define LCD_PINS_D4 21 +#define LCD_PINS_D7 6 + +#define SPEAKER // The speaker can produce tones + +#if IS_NEWPANEL + #define BTN_EN1 16 + #define BTN_EN2 17 + #define BTN_ENC 19 +#endif + +#include "pins_GT2560_V3.h" diff --git a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h index d507d20ca7ab..dcf25da070ff 100644 --- a/Marlin/src/pins/mega/pins_HJC2560C_REV2.h +++ b/Marlin/src/pins/mega/pins_HJC2560C_REV2.h @@ -22,12 +22,10 @@ #pragma once /** - * HJC2560-C Rev2.x pin assignments + * Geeetech HJC2560-C Rev 2.x board pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define DEFAULT_MACHINE_NAME "ADIMLab Gantry v2" #define BOARD_INFO_NAME "HJC2560-C" @@ -114,9 +112,9 @@ // // M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(SPINDLE_LASER_ENABLE) +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) #define SPINDLE_DIR_PIN 16 - #define SPINDLE_LASER_ENABLE_PIN 17 // Pin should have a pullup! + #define SPINDLE_LASER_ENA_PIN 17 // Pin should have a pullup! #define SPINDLE_LASER_PWM_PIN 9 // Hardware PWM #endif diff --git a/Marlin/src/pins/mega/pins_INTAMSYS40.h b/Marlin/src/pins/mega/pins_INTAMSYS40.h index be5f461dda38..2e2a9b85db14 100644 --- a/Marlin/src/pins/mega/pins_INTAMSYS40.h +++ b/Marlin/src/pins/mega/pins_INTAMSYS40.h @@ -27,9 +27,7 @@ * 2208 version exists and may or may not work */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Intamsys 4.0" diff --git a/Marlin/src/pins/mega/pins_LEAPFROG.h b/Marlin/src/pins/mega/pins_LEAPFROG.h index 9e6802b24bd7..4700fd6729bd 100644 --- a/Marlin/src/pins/mega/pins_LEAPFROG.h +++ b/Marlin/src/pins/mega/pins_LEAPFROG.h @@ -25,9 +25,8 @@ * Leapfrog Driver board pin assignments */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'" -#endif +#define ALLOW_MEGA1280 +#include "env_validate.h" #define BOARD_INFO_NAME "Leapfrog" diff --git a/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h index 9c316aa75951..af5cfd6a2eef 100644 --- a/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h +++ b/Marlin/src/pins/mega/pins_LEAPFROG_XEED2015.h @@ -29,9 +29,7 @@ * printer models. As such this file is currently specific to the Xeed. */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Leapfrog Xeed 2015" diff --git a/Marlin/src/pins/mega/pins_MALYAN_M180.h b/Marlin/src/pins/mega/pins_MALYAN_M180.h new file mode 100644 index 000000000000..19095a53799f --- /dev/null +++ b/Marlin/src/pins/mega/pins_MALYAN_M180.h @@ -0,0 +1,100 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Malyan M180 pin assignments + * Contributed by Timo Birnschein (timo.birnschein@microforge.de) + */ + +#include "env_validate.h" + +#define BOARD_INFO_NAME "Malyan M180 v.2" +// +// Limit Switches +// +#define X_STOP_PIN 48 +#define Y_STOP_PIN 46 +#define Z_STOP_PIN 42 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN -1 +#endif + +// +// Steppers +// +#define X_STEP_PIN 55 +#define X_DIR_PIN 54 +#define X_ENABLE_PIN 56 + +#define Y_STEP_PIN 59 +#define Y_DIR_PIN 58 +#define Y_ENABLE_PIN 60 + +#define Z_STEP_PIN 63 +#define Z_DIR_PIN 62 +#define Z_ENABLE_PIN 64 + +#define E0_STEP_PIN 25 +#define E0_DIR_PIN 24 +#define E0_ENABLE_PIN 26 + +#define E1_STEP_PIN 29 +#define E1_DIR_PIN 28 +#define E1_ENABLE_PIN 39 + +// +// Temperature Sensors +// +#define TEMP_BED_PIN 15 // Analog Input + +// Extruder thermocouples 0 and 1 are read out by two separate ICs using +// SPI for MAX Thermocouple +// Uses a separate SPI bus +#define TEMP_0_CS_PIN 5 // E3 - CS0 +#define TEMP_0_SCK_PIN 78 // E2 - SCK +#define TEMP_0_MISO_PIN 3 // E5 - MISO +//#define TEMP_0_MOSI_PIN ... // For MAX31865 + +#define TEMP_1_CS_PIN 2 // E4 - CS1 +#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN +#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN +//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN + +// +// Heaters / Fans +// +#define HEATER_0_PIN 6 +#define HEATER_1_PIN 11 +#define HEATER_BED_PIN 45 + +#ifndef FAN_PIN + #define FAN_PIN 7 // M106 Sxxx command supported and tested. M107 as well. +#endif + +#ifndef FAN_PIN1 + #define FAN_PIN1 12 // Currently Unsupported by Marlin +#endif diff --git a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h index 938ad82eff03..69c60b29ec54 100644 --- a/Marlin/src/pins/mega/pins_MEGACONTROLLER.h +++ b/Marlin/src/pins/mega/pins_MEGACONTROLLER.h @@ -25,12 +25,12 @@ * Mega controller pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#if HOTENDS > 2 || E_STEPPERS > 2 #error "Mega Controller supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif +#include "env_validate.h" + #define BOARD_INFO_NAME "Mega Controller" // diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS.h b/Marlin/src/pins/mega/pins_MEGATRONICS.h index f813366a14e0..0308175b2a3f 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS.h @@ -25,9 +25,7 @@ * MegaTronics pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Megatronics" // diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h index ef4605edd437..e52703591063 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_2.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_2.h @@ -25,9 +25,7 @@ * MegaTronics v2.0 pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Megatronics v2.0" // diff --git a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h index 9f85d46a544b..86aff16f920e 100644 --- a/Marlin/src/pins/mega/pins_MEGATRONICS_3.h +++ b/Marlin/src/pins/mega/pins_MEGATRONICS_3.h @@ -25,9 +25,7 @@ * MegaTronics v3.0 / v3.1 / v3.2 pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #if MB(MEGATRONICS_32) #define BOARD_INFO_NAME "Megatronics v3.2" @@ -69,9 +67,19 @@ #define X_DIR_PIN 57 #define X_ENABLE_PIN 59 -#define Y_STEP_PIN 5 -#define Y_DIR_PIN 17 -#define Y_ENABLE_PIN 4 +#if ENABLED(REPRAPWORLD_KEYPAD) && EXTRUDERS <= 2 + #define Y_ENABLE_PIN 23 + #define Y_STEP_PIN 22 + #define Y_DIR_PIN 60 +#else + #define Y_STEP_PIN 5 + #define Y_DIR_PIN 17 + #define Y_ENABLE_PIN 4 + + #define E2_STEP_PIN 22 + #define E2_DIR_PIN 60 + #define E2_ENABLE_PIN 23 +#endif #define Z_STEP_PIN 16 #define Z_DIR_PIN 11 @@ -85,10 +93,6 @@ #define E1_DIR_PIN 24 #define E1_ENABLE_PIN 26 -#define E2_STEP_PIN 22 -#define E2_DIR_PIN 60 -#define E2_ENABLE_PIN 23 - // // Temperature Sensors // @@ -183,15 +187,6 @@ #elif EXTRUDERS <= 2 // Hijack the last extruder so that we can get the PWM signal off the Y breakout // Move Y to the E2 plug. This makes dual Y steppers harder - #undef Y_ENABLE_PIN // 4 - #undef Y_STEP_PIN // 5 - #undef Y_DIR_PIN // 17 - #undef E2_ENABLE_PIN // 23 - #undef E2_STEP_PIN // 22 - #undef E2_DIR_PIN // 60 - #define Y_ENABLE_PIN 23 - #define Y_STEP_PIN 22 - #define Y_DIR_PIN 60 #define SPINDLE_LASER_PWM_PIN 4 // Hardware PWM #define SPINDLE_LASER_ENA_PIN 17 // Pullup! #define SPINDLE_DIR_PIN 5 diff --git a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h index b260a27867da..aea05134a87c 100644 --- a/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h +++ b/Marlin/src/pins/mega/pins_MIGHTYBOARD_REVE.h @@ -37,9 +37,8 @@ * number (B5) agrees with the schematic but B5 is assigned to logical pin 11. */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Mega 1280' or 'Mega 2560' in 'Tools > Board.'" -#endif +#define ALLOW_MEGA1280 +#include "env_validate.h" #define BOARD_INFO_NAME "Mightyboard" #define DEFAULT_MACHINE_NAME "MB Replicator" @@ -126,7 +125,7 @@ // K7 - 69 / ADC15 - 15 #define TEMP_BED_PIN 15 -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple // Uses a separate SPI bus // // 3 E5 DO (SO) @@ -134,15 +133,15 @@ // 2 E4 CS2 // 78 E2 SCK // -#define THERMO_SCK_PIN 78 // E2 -#define THERMO_DO_PIN 3 // E5 -#define THERMO_CS1_PIN 5 // E3 -#define THERMO_CS2_PIN 2 // E4 - -#define MAX6675_SS_PIN THERMO_CS1_PIN -#define MAX6675_SS2_PIN THERMO_CS2_PIN -#define MAX6675_SCK_PIN THERMO_SCK_PIN -#define MAX6675_DO_PIN THERMO_DO_PIN +#define TEMP_0_CS_PIN 5 // E3 +#define TEMP_0_SCK_PIN 78 // E2 +#define TEMP_0_MISO_PIN 3 // E5 +//#define TEMP_0_MOSI_PIN ... // For MAX31865 + +#define TEMP_1_CS_PIN 2 // E4 +#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN +#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN +//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN // // Augmentation for auto-assigning plugs diff --git a/Marlin/src/pins/mega/pins_OVERLORD.h b/Marlin/src/pins/mega/pins_OVERLORD.h index 18bb1f27bf43..0884d8ecb514 100644 --- a/Marlin/src/pins/mega/pins_OVERLORD.h +++ b/Marlin/src/pins/mega/pins_OVERLORD.h @@ -25,12 +25,12 @@ * Dreammaker Overlord v1.1 pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#if HOTENDS > 2 || E_STEPPERS > 2 #error "Overlord Controller supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif +#include "env_validate.h" + #define BOARD_INFO_NAME "OVERLORD" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME @@ -119,7 +119,7 @@ // // LCD / Controller // -#if HAS_MARLINUI_U8GLIB +#if HAS_WIRED_LCD // OVERLORD OLED pins #define LCD_PINS_RS 20 #define LCD_PINS_D5 21 diff --git a/Marlin/src/pins/mega/pins_PICA.h b/Marlin/src/pins/mega/pins_PICA.h index ff4d3e834d05..47c101711c4f 100644 --- a/Marlin/src/pins/mega/pins_PICA.h +++ b/Marlin/src/pins/mega/pins_PICA.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once /** * Arduino Mega with PICA pin assignments @@ -29,6 +30,8 @@ * Applies to PICA, PICA_REVB */ +#include "env_validate.h" + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "PICA" #endif @@ -42,10 +45,6 @@ AD12 = 66; AD13 = 67; AD14 = 68; AD15 = 69; */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Make sure you have 'Arduino Mega' selected from the 'Tools -> Boards' menu." -#endif - // // Servos // @@ -119,11 +118,11 @@ #define SSR_PIN 6 -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/mega/pins_PICAOLD.h b/Marlin/src/pins/mega/pins_PICAOLD.h index f53a4cdcd258..e19ea744e5eb 100644 --- a/Marlin/src/pins/mega/pins_PICAOLD.h +++ b/Marlin/src/pins/mega/pins_PICAOLD.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once #define HEATER_0_PIN 9 // E0 #define HEATER_1_PIN 10 // E1 diff --git a/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h new file mode 100644 index 000000000000..f2e4d3da0266 --- /dev/null +++ b/Marlin/src/pins/mega/pins_PROTONEER_CNC_SHIELD_V3.h @@ -0,0 +1,77 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Protoneer v3.00 pin assignments + * + * This CNC shield has an UNO pinout and fits all Arduino-compatibles. + * + * Referenced docs: + * - https://blog.protoneer.co.nz/arduino-cnc-shield-v3-00-assembly-guide/ + * - https://blog.protoneer.co.nz/arduino-cnc-shield/ + */ + +#include "env_validate.h" + +#define BOARD_INFO_NAME "Protoneer CNC Shield v3.00" + +// +// Limit Switches +// +#define X_STOP_PIN 9 +#define Y_STOP_PIN 10 +#define Z_STOP_PIN 11 + +// +// Steppers +// +#define X_STEP_PIN 2 +#define X_DIR_PIN 5 +#define X_ENABLE_PIN 8 // Shared enable pin + +#define Y_STEP_PIN 3 +#define Y_DIR_PIN 6 +#define Y_ENABLE_PIN X_ENABLE_PIN + +#define Z_STEP_PIN 4 +#define Z_DIR_PIN 7 +#define Z_ENABLE_PIN X_ENABLE_PIN + +// Designated with letter "A" on BOARD +#define E0_STEP_PIN 12 +#define E0_DIR_PIN 13 +#define E0_ENABLE_PIN X_ENABLE_PIN + +// +// Temperature sensors - These could be any analog output not hidden by board +// +#define TEMP_0_PIN 8 // Analog Input +//#define TEMP_1_PIN 9 // Analog Input +//#define TEMP_BED_PIN 10 // Analog Input + +// +// Heaters / Fans - These could be any digital input not hidden by board +// +//#define HEATER_0_PIN 22 // EXTRUDER 1 +//#define HEATER_1_PIN 23 // EXTRUDER 2 +//#define HEATER_BED_PIN 24 diff --git a/Marlin/src/pins/mega/pins_SILVER_GATE.h b/Marlin/src/pins/mega/pins_SILVER_GATE.h index 41cbe5e0e078..7b4f53a764ac 100644 --- a/Marlin/src/pins/mega/pins_SILVER_GATE.h +++ b/Marlin/src/pins/mega/pins_SILVER_GATE.h @@ -72,7 +72,7 @@ #define HEATER_BED_PIN 8 #define TEMP_BED_PIN 6 -#if HAS_MARLINUI_U8GLIB +#if HAS_WIRED_LCD #if ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 #define LCD_PINS_RS 30 #define LCD_PINS_ENABLE 20 @@ -86,6 +86,9 @@ #define KILL_PIN 21 #define HOME_PIN 28 #endif + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 #endif #endif diff --git a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h index 715e823393cf..503dd9ec8148 100644 --- a/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h +++ b/Marlin/src/pins/mega/pins_WANHAO_ONEPLUS.h @@ -25,9 +25,7 @@ * Wanhao 0ne+ pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Wanhao i3 Mini 0ne+" #define DEFAULT_MACHINE_NAME "i3 Mini" diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 737c8869d1fd..49585673bd16 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -35,11 +35,6 @@ * These numbers are the same in any pin mapping. */ -#if HAS_SMUFF - #define MAX_EXTRUDERS 12 -#else - #define MAX_EXTRUDERS 8 -#endif #define MAX_E_STEPPERS 8 #if MB(RAMPS_13_EFB, RAMPS_14_EFB, RAMPS_PLUS_EFB, RAMPS_14_RE_ARM_EFB, RAMPS_SMART_EFB, RAMPS_DUO_EFB, RAMPS4DUE_EFB) @@ -70,32 +65,32 @@ // #if MB(RAMPS_OLD) - #include "ramps/pins_RAMPS_OLD.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_RAMPS_OLD.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(RAMPS_13_EFB, RAMPS_13_EEB, RAMPS_13_EFF, RAMPS_13_EEF, RAMPS_13_SF) - #include "ramps/pins_RAMPS_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_RAMPS_13.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(RAMPS_14_EFB, RAMPS_14_EEB, RAMPS_14_EFF, RAMPS_14_EEF, RAMPS_14_SF) - #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_RAMPS.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(RAMPS_PLUS_EFB, RAMPS_PLUS_EEB, RAMPS_PLUS_EFF, RAMPS_PLUS_EEF, RAMPS_PLUS_SF) - #include "ramps/pins_RAMPS_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_RAMPS_PLUS.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 // // RAMPS Derivatives - ATmega1280, ATmega2560 // #elif MB(3DRAG) - #include "ramps/pins_3DRAG.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_3DRAG.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(K8200) - #include "ramps/pins_K8200.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_K8200.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(K8400) - #include "ramps/pins_K8400.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_K8400.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(K8600) - #include "ramps/pins_K8600.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_K8600.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(K8800) - #include "ramps/pins_K8800.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_K8800.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(BAM_DICE) - #include "ramps/pins_RAMPS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_RAMPS.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(BAM_DICE_DUE) - #include "ramps/pins_BAM_DICE_DUE.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_BAM_DICE_DUE.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(MKS_BASE) #include "ramps/pins_MKS_BASE_10.h" // ATmega2560 env:mega2560 #elif MB(MKS_BASE_14) @@ -107,27 +102,27 @@ #elif MB(MKS_BASE_HEROIC) #include "ramps/pins_MKS_BASE_HEROIC.h" // ATmega2560 env:mega2560 #elif MB(MKS_GEN_13) - #include "ramps/pins_MKS_GEN_13.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_MKS_GEN_13.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(MKS_GEN_L) - #include "ramps/pins_MKS_GEN_L.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_MKS_GEN_L.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(KFB_2) #include "ramps/pins_BIQU_KFB_2.h" // ATmega2560 env:mega2560 #elif MB(ZRIB_V20) - #include "ramps/pins_ZRIB_V20.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_ZRIB_V20.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(ZRIB_V52) - #include "ramps/pins_ZRIB_V52.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_ZRIB_V52.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(FELIX2) - #include "ramps/pins_FELIX2.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_FELIX2.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(RIGIDBOARD) - #include "ramps/pins_RIGIDBOARD.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_RIGIDBOARD.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(RIGIDBOARD_V2) - #include "ramps/pins_RIGIDBOARD_V2.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_RIGIDBOARD_V2.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(SAINSMART_2IN1) - #include "ramps/pins_SAINSMART_2IN1.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_SAINSMART_2IN1.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(ULTIMAKER) - #include "ramps/pins_ULTIMAKER.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_ULTIMAKER.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(ULTIMAKER_OLD) - #include "ramps/pins_ULTIMAKER_OLD.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "ramps/pins_ULTIMAKER_OLD.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(AZTEEG_X3) #include "ramps/pins_AZTEEG_X3.h" // ATmega2560 env:mega2560 #elif MB(AZTEEG_X3_PRO) @@ -207,19 +202,21 @@ #include "rambo/pins_EINSY_RETRO.h" // ATmega2560 env:rambo #elif MB(SCOOVO_X9H) #include "rambo/pins_SCOOVO_X9H.h" // ATmega2560 env:rambo +#elif MB(RAMBO_THINKERV2) + #include "rambo/pins_RAMBO_THINKERV2.h" // ATmega2560 env:rambo // // Other ATmega1280, ATmega2560 // #elif MB(CNCONTROLS_11) - #include "mega/pins_CNCONTROLS_11.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "mega/pins_CNCONTROLS_11.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(CNCONTROLS_12) - #include "mega/pins_CNCONTROLS_12.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "mega/pins_CNCONTROLS_12.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(CNCONTROLS_15) - #include "mega/pins_CNCONTROLS_15.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "mega/pins_CNCONTROLS_15.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(MIGHTYBOARD_REVE) - #include "mega/pins_MIGHTYBOARD_REVE.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560ext + #include "mega/pins_MIGHTYBOARD_REVE.h" // ATmega2560, ATmega1280 env:mega2560ext env:mega1280 env:MightyBoard1280 env:MightyBoard2560 #elif MB(CHEAPTRONIC) #include "mega/pins_CHEAPTRONIC.h" // ATmega2560 env:mega2560 #elif MB(CHEAPTRONIC_V2) @@ -233,25 +230,33 @@ #elif MB(ELEFU_3) #include "mega/pins_ELEFU_3.h" // ATmega2560 env:mega2560 #elif MB(LEAPFROG) - #include "mega/pins_LEAPFROG.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "mega/pins_LEAPFROG.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(MEGACONTROLLER) #include "mega/pins_MEGACONTROLLER.h" // ATmega2560 env:mega2560 #elif MB(GT2560_REV_A) - #include "mega/pins_GT2560_REV_A.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "mega/pins_GT2560_REV_A.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(GT2560_REV_A_PLUS) - #include "mega/pins_GT2560_REV_A_PLUS.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560 + #include "mega/pins_GT2560_REV_A_PLUS.h" // ATmega2560, ATmega1280 env:mega2560 env:mega1280 #elif MB(GT2560_V3) #include "mega/pins_GT2560_V3.h" // ATmega2560 env:mega2560 +#elif MB(GT2560_REV_B) + #include "mega/pins_GT2560_REV_B.h" // ATmega2560 env:mega2560 +#elif MB(GT2560_V4) + #include "mega/pins_GT2560_V4.h" // ATmega2560 env:mega2560 + #elif MB(GT2560_V4_A20) + #include "mega/pins_GT2560_V4_A20.h" // ATmega2560 env:mega2560 #elif MB(GT2560_V3_MC2) #include "mega/pins_GT2560_V3_MC2.h" // ATmega2560 env:mega2560 #elif MB(GT2560_V3_A20) #include "mega/pins_GT2560_V3_A20.h" // ATmega2560 env:mega2560 #elif MB(EINSTART_S) - #include "mega/pins_EINSTART-S.h" // ATmega1280, ATmega2560 env:mega1280 env:mega2560ext + #include "mega/pins_EINSTART-S.h" // ATmega2560, ATmega1280 env:mega2560ext env:mega1280 #elif MB(WANHAO_ONEPLUS) #include "mega/pins_WANHAO_ONEPLUS.h" // ATmega2560 env:mega2560 #elif MB(OVERLORD) #include "mega/pins_OVERLORD.h" // ATmega2560 env:mega2560 +#elif MB(HJC2560C_REV1) + #include "mega/pins_HJC2560C_REV2.h" // ATmega2560 env:mega2560 #elif MB(HJC2560C_REV2) #include "mega/pins_HJC2560C_REV2.h" // ATmega2560 env:mega2560 #elif MB(LEAPFROG_XEED2015) @@ -262,6 +267,10 @@ #include "mega/pins_PICAOLD.h" // ATmega2560 env:mega2560 #elif MB(INTAMSYS40) #include "mega/pins_INTAMSYS40.h" // ATmega2560 env:mega2560 +#elif MB(MALYAN_M180) + #include "mega/pins_MALYAN_M180.h" // ATmega2560 env:mega2560 +#elif MB(PROTONEER_CNC_SHIELD_V3) + #include "mega/pins_PROTONEER_CNC_SHIELD_V3.h"// ATmega2560 env:mega2560 // // ATmega1281, ATmega2561 @@ -277,27 +286,27 @@ // #elif MB(SANGUINOLOLU_11) - #include "sanguino/pins_SANGUINOLOLU_11.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_SANGUINOLOLU_11.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(SANGUINOLOLU_12) - #include "sanguino/pins_SANGUINOLOLU_12.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_SANGUINOLOLU_12.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(MELZI) - #include "sanguino/pins_MELZI.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_MELZI.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(MELZI_V2) - #include "sanguino/pins_MELZI_V2.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_MELZI_V2.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(MELZI_MAKR3D) - #include "sanguino/pins_MELZI_MAKR3D.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_MELZI_MAKR3D.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(MELZI_CREALITY) - #include "sanguino/pins_MELZI_CREALITY.h" // ATmega1284P env:melzi env:melzi_optimized env:melzi_optiboot env:melzi_optiboot_optimized + #include "sanguino/pins_MELZI_CREALITY.h" // ATmega1284P env:melzi_optiboot_optimized env:melzi_optiboot env:melzi_optimized env:melzi #elif MB(MELZI_MALYAN) - #include "sanguino/pins_MELZI_MALYAN.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_MELZI_MALYAN.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(MELZI_TRONXY) - #include "sanguino/pins_MELZI_TRONXY.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_MELZI_TRONXY.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(STB_11) - #include "sanguino/pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_STB_11.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(AZTEEG_X1) - #include "sanguino/pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_AZTEEG_X1.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(ZMIB_V2) - #include "sanguino/pins_ZMIB_V2.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_ZMIB_V2.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p // // Other ATmega644P, ATmega644, ATmega1284P @@ -306,27 +315,27 @@ #elif MB(GEN3_MONOLITHIC) #include "sanguino/pins_GEN3_MONOLITHIC.h" // ATmega644P env:sanguino644p #elif MB(GEN3_PLUS) - #include "sanguino/pins_GEN3_PLUS.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_GEN3_PLUS.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(GEN6) - #include "sanguino/pins_GEN6.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_GEN6.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(GEN6_DELUXE) - #include "sanguino/pins_GEN6_DELUXE.h" // ATmega644P, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_GEN6_DELUXE.h" // ATmega644P, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(GEN7_CUSTOM) - #include "sanguino/pins_GEN7_CUSTOM.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_GEN7_CUSTOM.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(GEN7_12) - #include "sanguino/pins_GEN7_12.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_GEN7_12.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(GEN7_13) - #include "sanguino/pins_GEN7_13.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_GEN7_13.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(GEN7_14) - #include "sanguino/pins_GEN7_14.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_GEN7_14.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p #elif MB(OMCA_A) #include "sanguino/pins_OMCA_A.h" // ATmega644 env:sanguino644p #elif MB(OMCA) #include "sanguino/pins_OMCA.h" // ATmega644P, ATmega644 env:sanguino644p #elif MB(ANET_10) - #include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_ANET_10.h" // ATmega1284P env:sanguino1284p env:sanguino1284p_optimized env:melzi_optiboot #elif MB(SETHI) - #include "sanguino/pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino644p env:sanguino1284p env:sanguino1284p_optimized + #include "sanguino/pins_SETHI.h" // ATmega644P, ATmega644, ATmega1284P env:sanguino1284p_optimized env:sanguino1284p env:sanguino644p // // Teensyduino - AT90USB1286, AT90USB1286P @@ -443,6 +452,8 @@ #include "sam/pins_PRINTRBOARD_G2.h" // SAM3X8C env:DUE_USB #elif MB(CNCONTROLS_15D) #include "sam/pins_CNCONTROLS_15D.h" // SAM3X8E env:DUE env:DUE_USB +#elif MB(KRATOS32) + #include "sam/pins_KRATOS32.h" // SAM3X8E env:DUE env:DUE_USB // // STM32 ARM Cortex-M0 @@ -457,39 +468,41 @@ // #elif MB(STM32F103RE) - #include "stm32f1/pins_STM32F1R.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_STM32F1R.h" // STM32F103RE env:STM32F103RE env:STM32F103RE_maple #elif MB(MALYAN_M200) - #include "stm32f1/pins_MALYAN_M200.h" // STM32F1 env:STM32F103CB_malyan + #include "stm32f1/pins_MALYAN_M200.h" // STM32F103CB env:STM32F103CB_malyan env:STM32F103CB_malyan_maple #elif MB(STM3R_MINI) - #include "stm32f1/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_STM3R_MINI.h" // STM32F103VE? env:STM32F103VE env:STM32F103RE_maple #elif MB(GTM32_PRO_VB) - #include "stm32f1/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_GTM32_PRO_VB.h" // STM32F103VE env:STM32F103VE env:STM32F103RE_maple +#elif MB(GTM32_PRO_VD) + #include "stm32f1/pins_GTM32_PRO_VD.h" // STM32F103VE env:STM32F103VE env:STM32F103RE_maple #elif MB(GTM32_MINI) - #include "stm32f1/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_GTM32_MINI.h" // STM32F103VE env:STM32F103VE env:STM32F103RE_maple #elif MB(GTM32_MINI_A30) - #include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F103VE env:STM32F103VE env:STM32F103RE_maple #elif MB(GTM32_REV_B) - #include "stm32f1/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_GTM32_REV_B.h" // STM32F103VE env:STM32F103VE env:STM32F103RE_maple #elif MB(MORPHEUS) - #include "stm32f1/pins_MORPHEUS.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_MORPHEUS.h" // STM32F103RE env:STM32F103RE env:STM32F103RE_maple #elif MB(CHITU3D) - #include "stm32f1/pins_CHITU3D.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_CHITU3D.h" // STM32F103ZE env:STM32F103ZE env:STM32F103RE_maple #elif MB(MKS_ROBIN) - #include "stm32f1/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin env:mks_robin_stm32 + #include "stm32f1/pins_MKS_ROBIN.h" // STM32F1 env:mks_robin env:mks_robin_maple #elif MB(MKS_ROBIN_MINI) - #include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini + #include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini env:mks_robin_mini_maple #elif MB(MKS_ROBIN_NANO) - #include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano35 + #include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano35 env:mks_robin_nano35_maple #elif MB(MKS_ROBIN_NANO_V2) - #include "stm32f1/pins_MKS_ROBIN_NANO_V2.h" // STM32F1 env:mks_robin_nano35 + #include "stm32f1/pins_MKS_ROBIN_NANO_V2.h" // STM32F1 env:mks_robin_nano35 env:mks_robin_nano35_maple #elif MB(MKS_ROBIN_LITE) - #include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite + #include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite env:mks_robin_lite_maple #elif MB(MKS_ROBIN_LITE3) - #include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3 + #include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3 env:mks_robin_lite3_maple #elif MB(MKS_ROBIN_PRO) - #include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro + #include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro env:mks_robin_pro_maple #elif MB(MKS_ROBIN_E3) - #include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3 + #include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3 env:mks_robin_e3_maple #elif MB(MKS_ROBIN_E3_V1_1) #include "stm32f1/pins_MKS_ROBIN_E3_V1_1.h" // STM32F1 env:mks_robin_e3 #elif MB(MKS_ROBIN_E3D) @@ -497,59 +510,71 @@ #elif MB(MKS_ROBIN_E3D_V1_1) #include "stm32f1/pins_MKS_ROBIN_E3D_V1_1.h" // STM32F1 env:mks_robin_e3 #elif MB(MKS_ROBIN_E3P) - #include "stm32f1/pins_MKS_ROBIN_E3P.h" // STM32F1 env:mks_robin_e3p + #include "stm32f1/pins_MKS_ROBIN_E3P.h" // STM32F1 env:mks_robin_e3p env:mks_robin_e3p_maple #elif MB(BTT_SKR_MINI_V1_1) - #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB + #include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple #elif MB(BTT_SKR_MINI_E3_V1_0) - #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB + #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple #elif MB(BTT_SKR_MINI_E3_V1_2) - #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB + #include "stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple #elif MB(BTT_SKR_MINI_E3_V2_0) - #include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB + #include "stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple #elif MB(BTT_SKR_MINI_MZ_V1_0) - #include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB + #include "stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple #elif MB(BTT_SKR_E3_DIP) - #include "stm32f1/pins_BTT_SKR_E3_DIP.h" // STM32F1 env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB + #include "stm32f1/pins_BTT_SKR_E3_DIP.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_USB env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RC_btt_maple env:STM32F103RC_btt_USB_maple env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple #elif MB(BTT_SKR_CR6) - #include "stm32f1/pins_BTT_SKR_CR6.h" // STM32F1 env:STM32F103RC_btt_512K_USB + #include "stm32f1/pins_BTT_SKR_CR6.h" // STM32F1 env:STM32F103RE_btt env:STM32F103RE_btt_USB env:STM32F103RE_btt_maple env:STM32F103RE_btt_USB_maple #elif MB(JGAURORA_A5S_A1) - #include "stm32f1/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1 + #include "stm32f1/pins_JGAURORA_A5S_A1.h" // STM32F1 env:jgaurora_a5s_a1 env:jgaurora_a5s_a1_maple #elif MB(FYSETC_AIO_II) - #include "stm32f1/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc + #include "stm32f1/pins_FYSETC_AIO_II.h" // STM32F1 env:STM32F103RC_fysetc env:STM32F103RC_fysetc_maple #elif MB(FYSETC_CHEETAH) - #include "stm32f1/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc + #include "stm32f1/pins_FYSETC_CHEETAH.h" // STM32F1 env:STM32F103RC_fysetc env:STM32F103RC_fysetc_maple #elif MB(FYSETC_CHEETAH_V12) - #include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc + #include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc env:STM32F103RC_fysetc_maple #elif MB(LONGER3D_LK) - #include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer + #include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer env:STM32F103VE_longer_maple #elif MB(CCROBOT_MEEB_3DP) #include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_meeb #elif MB(CHITU3D_V5) - #include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_v5_gpio_init + #include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple env:chitu_v5_gpio_init env:chitu_v5_gpio_init_maple #elif MB(CHITU3D_V6) - #include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103 + #include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple +#elif MB(CHITU3D_V9) + #include "stm32f1/pins_CHITU3D_V9.h" // STM32F1 env:chitu_f103 env:chitu_f103_maple #elif MB(CREALITY_V4) - #include "stm32f1/pins_CREALITY_V4.h" // STM32F1 env:STM32F103RET6_creality + #include "stm32f1/pins_CREALITY_V4.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple #elif MB(CREALITY_V4210) - #include "stm32f1/pins_CREALITY_V4210.h" // STM32F1 env:STM32F103RET6_creality + #include "stm32f1/pins_CREALITY_V4210.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple #elif MB(CREALITY_V427) - #include "stm32f1/pins_CREALITY_V427.h" // STM32F1 env:STM32F103RET6_creality -#elif MB(CREALITY_V431) - #include "stm32f1/pins_CREALITY_V431.h" // STM32F1 env:STM32F103RET6_creality + #include "stm32f1/pins_CREALITY_V427.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple +#elif MB(CREALITY_V431, CREALITY_V431_A, CREALITY_V431_B, CREALITY_V431_C, CREALITY_V431_D) + #include "stm32f1/pins_CREALITY_V431.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple #elif MB(CREALITY_V452) - #include "stm32f1/pins_CREALITY_V452.h" // STM32F1 env:STM32F103RET6_creality + #include "stm32f1/pins_CREALITY_V452.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple #elif MB(CREALITY_V453) - #include "stm32f1/pins_CREALITY_V453.h" // STM32F1 env:STM32F103RET6_creality + #include "stm32f1/pins_CREALITY_V453.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple +#elif MB(CREALITY_V24S1) + #include "stm32f1/pins_CREALITY_V24S1.h" // STM32F1 env:STM32F103RET6_creality env:STM32F103RET6_creality_maple #elif MB(TRIGORILLA_PRO) - #include "stm32f1/pins_TRIGORILLA_PRO.h" // STM32F1 env:trigorilla_pro + #include "stm32f1/pins_TRIGORILLA_PRO.h" // STM32F1 env:trigorilla_pro env:trigorilla_pro_maple #elif MB(FLY_MINI) - #include "stm32f1/pins_FLY_MINI.h" // STM32F1 env:FLY_MINI + #include "stm32f1/pins_FLY_MINI.h" // STM32F1 env:FLY_MINI env:FLY_MINI_maple #elif MB(FLSUN_HISPEED) - #include "stm32f1/pins_FLSUN_HISPEED.h" // STM32F1 env:flsun_hispeed + #include "stm32f1/pins_FLSUN_HISPEED.h" // STM32F1 env:flsun_hispeedv1 #elif MB(BEAST) - #include "stm32f1/pins_BEAST.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_BEAST.h" // STM32F103VE? env:STM32F103VE env:STM32F103RE_maple #elif MB(MINGDA_MPX_ARM_MINI) - #include "stm32f1/pins_MINGDA_MPX_ARM_MINI.h" // STM32F1 env:STM32F103RE + #include "stm32f1/pins_MINGDA_MPX_ARM_MINI.h" // STM32F1 env:mingda_mpx_arm_mini +#elif MB(ZONESTAR_ZM3E2) + #include "stm32f1/pins_ZM3E2_V1_0.h" // STM32F1 env:STM32F103RC_ZM3E2_USB env:STM32F103RC_ZM3E2_USB_maple +#elif MB(ZONESTAR_ZM3E4) + #include "stm32f1/pins_ZM3E4_V1_0.h" // STM32F1 env:STM32F103VC_ZM3E4_USB env:STM32F103VC_ZM3E4_USB_maple +#elif MB(ZONESTAR_ZM3E4V2) + #include "stm32f1/pins_ZM3E4_V2_0.h" // STM32F1 env:STM32F103VE_ZM3E4V2_USB env:STM32F103VE_ZM3E4V2_USB_maple +#elif MB(ERYONE_ERY32_MINI) + #include "stm32f1/pins_ERYONE_ERY32_MINI.h" // STM32F103VET6 env:ERYONE_ERY32_MINI_maple // // ARM Cortex-M4F @@ -570,6 +595,8 @@ #include "stm32f4/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32 #elif MB(RUMBA32_MKS) #include "stm32f4/pins_RUMBA32_MKS.h" // STM32F4 env:rumba32 +#elif MB(RUMBA32_BTT) + #include "stm32f4/pins_RUMBA32_BTT.h" // STM32F4 env:rumba32 #elif MB(BLACK_STM32F407VE) #include "stm32f4/pins_BLACK_STM32F407VE.h" // STM32F4 env:STM32F407VE_black #elif MB(STEVAL_3DP001V1) @@ -582,6 +609,18 @@ #include "stm32f4/pins_BTT_GTR_V1_0.h" // STM32F4 env:BIGTREE_GTR_V1_0 env:BIGTREE_GTR_V1_0_usb_flash_drive #elif MB(BTT_BTT002_V1_0) #include "stm32f4/pins_BTT_BTT002_V1_0.h" // STM32F4 env:BIGTREE_BTT002 +#elif MB(BTT_E3_RRF) + #include "stm32f4/pins_BTT_E3_RRF.h" // STM32F4 env:BIGTREE_E3_RRF +#elif MB(BTT_SKR_V2_0_REV_A) + #include "stm32f4/pins_BTT_SKR_V2_0_REV_A.h" // STM32F4 env:BIGTREE_SKR_2 env:BIGTREE_SKR_2_USB +#elif MB(BTT_SKR_V2_0_REV_B) + #include "stm32f4/pins_BTT_SKR_V2_0_REV_B.h" // STM32F4 env:BIGTREE_SKR_2 env:BIGTREE_SKR_2_USB +#elif MB(BTT_OCTOPUS_V1_0) + #include "stm32f4/pins_BTT_OCTOPUS_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB +#elif MB(BTT_OCTOPUS_V1_1) + #include "stm32f4/pins_BTT_OCTOPUS_V1_1.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB +#elif MB(BTT_OCTOPUS_PRO_V1_0) + #include "stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h" // STM32F4 env:BIGTREE_OCTOPUS_V1 env:BIGTREE_OCTOPUS_V1_USB env:BIGTREE_OCTOPUS_PRO_V1_F429 env:BIGTREE_OCTOPUS_PRO_V1_F429_USB #elif MB(LERDGE_K) #include "stm32f4/pins_LERDGE_K.h" // STM32F4 env:LERDGEK env:LERDGEK_usb_flash_drive #elif MB(LERDGE_S) @@ -591,9 +630,11 @@ #elif MB(VAKE403D) #include "stm32f4/pins_VAKE403D.h" // STM32F4 #elif MB(FYSETC_S6) - #include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6 + #include "stm32f4/pins_FYSETC_S6.h" // STM32F4 env:FYSETC_S6 env:FYSETC_S6_8000 #elif MB(FYSETC_S6_V2_0) - #include "stm32f4/pins_FYSETC_S6_V2_0.h" // STM32F4 env:FYSETC_S6 + #include "stm32f4/pins_FYSETC_S6_V2_0.h" // STM32F4 env:FYSETC_S6 env:FYSETC_S6_8000 +#elif MB(FYSETC_SPIDER) + #include "stm32f4/pins_FYSETC_SPIDER.h" // STM32F4 env:FYSETC_S6 env:FYSETC_S6_8000 #elif MB(FLYF407ZG) #include "stm32f4/pins_FLYF407ZG.h" // STM32F4 env:FLYF407ZG #elif MB(MKS_ROBIN2) @@ -601,13 +642,23 @@ #elif MB(MKS_ROBIN_PRO_V2) #include "stm32f4/pins_MKS_ROBIN_PRO_V2.h" // STM32F4 env:mks_robin_pro2 #elif MB(MKS_ROBIN_NANO_V3) - #include "stm32f4/pins_MKS_ROBIN_NANO_V3.h" // STM32F4 env:mks_robin_nano_v3 env:mks_robin_nano_v3_usb_flash_drive + #include "stm32f4/pins_MKS_ROBIN_NANO_V3.h" // STM32F4 env:mks_robin_nano_v3 env:mks_robin_nano_v3_usb_flash_drive env:mks_robin_nano_v3_usb_flash_drive_msc #elif MB(ANET_ET4) #include "stm32f4/pins_ANET_ET4.h" // STM32F4 env:Anet_ET4_OpenBLT #elif MB(ANET_ET4P) #include "stm32f4/pins_ANET_ET4P.h" // STM32F4 env:Anet_ET4_OpenBLT #elif MB(FYSETC_CHEETAH_V20) #include "stm32f4/pins_FYSETC_CHEETAH_V20.h" // STM32F4 env:FYSETC_CHEETAH_V20 +#elif MB(MKS_MONSTER8) + #include "stm32f4/pins_MKS_MONSTER8.h" // STM32F4 env:mks_monster8 env:mks_monster8_usb_flash_drive env:mks_monster8_usb_flash_drive_msc +#elif MB(TH3D_EZBOARD_LITE_V2) + #include "stm32f4/pins_TH3D_EZBOARD_LITE_V2.h" // STM32F4 env:TH3D_EZBoard_Lite_V2 +#elif MB(INDEX_REV03) + #include "stm32f4/pins_INDEX_REV03.h" // STM32F4 env:Index_Mobo_Rev03 +#elif MB(MKS_ROBIN_NANO_V1_3_F4) + #include "stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h" // STM32F4 env:mks_robin_nano_v1_3_f4 +#elif MB(MKS_EAGLE) + #include "stm32f4/pins_MKS_EAGLE.h" // STM32F4 env:mks_eagle // // ARM Cortex M7 @@ -617,6 +668,8 @@ #include "stm32f7/pins_REMRAM_V1.h" // STM32F7 env:REMRAM_V1 #elif MB(NUCLEO_F767ZI) #include "stm32f7/pins_NUCLEO_F767ZI.h" // STM32F7 env:NUCLEO_F767ZI +#elif MB(BTT_SKR_SE_BX) + #include "stm32h7/pins_BTT_SKR_SE_BX.h" // STM32H7 env:BTT_SKR_SE_BX #elif MB(TEENSY41) #include "teensy4/pins_TEENSY41.h" // Teensy-4.x env:teensy41 #elif MB(T41U5XBB) @@ -636,6 +689,10 @@ #include "esp32/pins_E4D.h" // ESP32 env:esp32 #elif MB(FYSETC_E4) #include "esp32/pins_FYSETC_E4.h" // ESP32 env:FYSETC_E4 +#elif MB(PANDA_ZHU) + #include "esp32/pins_PANDA_ZHU.h" // ESP32 env:PANDA +#elif MB(PANDA_M4) + #include "esp32/pins_PANDA_M4.h" // ESP32 env:PANDA // // Adafruit Grand Central M4 (SAMD51 ARM Cortex-M4) @@ -656,7 +713,7 @@ // #elif MB(LINUX_RAMPS) - #include "linux/pins_RAMPS_LINUX.h" // Linux env:linux_native + #include "linux/pins_RAMPS_LINUX.h" // Native or Simulation lin:linux_native mac:simulator_macos_debug mac:simulator_macos_release win:simulator_windows lin:simulator_linux_debug lin:simulator_linux_release #else @@ -686,6 +743,7 @@ #define BOARD_RUMBA32_AUS3D -1019 #define BOARD_RAMPS_DAGOMA -1020 #define BOARD_RAMPS_LONGER3D_LK4PRO -1021 + #define BOARD_BTT_SKR_V2_0 -1022 #if MB(MKS_13) #error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration." @@ -699,7 +757,7 @@ #error "BOARD_BIQU_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration." #elif MB(BIGTREE_SKR_V1_1) #error "BOARD_BIGTREE_SKR_V1_1 has been renamed BOARD_BTT_SKR_V1_1. Please update your configuration." - #elif MB(BIGTREE_SKR_V2_2) + #elif MB(BIGTREE_SKR_V1_2) #error "BOARD_BIGTREE_SKR_V1_2 has been renamed BOARD_BTT_SKR_V1_2. Please update your configuration." #elif MB(BIGTREE_SKR_V1_3) #error "BOARD_BIGTREE_SKR_V1_3 has been renamed BOARD_BTT_SKR_V1_3. Please update your configuration." @@ -733,8 +791,12 @@ #error "BOARD_RAMPS_DAGOMA is now BOARD_DAGOMA_F5. Please update your configuration." #elif MB(RAMPS_LONGER3D_LK4PRO) #error "BOARD_RAMPS_LONGER3D_LK4PRO is now BOARD_LONGER3D_LKx_PRO. Please update your configuration." + #elif MB(BTT_SKR_V2_0) + #error "BTT_SKR_V2_0 is now BTT_SKR_V2_0_REV_A or BTT_SKR_V2_0_REV_B. See https://bit.ly/3t5d9JQ for more information. Please update your configuration." + #elif defined(MOTHERBOARD) + #error "Unknown MOTHERBOARD value set in Configuration.h." #else - #error "Unknown MOTHERBOARD value set in Configuration.h" + #error "MOTHERBOARD not defined! Use '#define MOTHERBOARD BOARD_...' in Configuration.h." #endif #undef BOARD_MKS_13 @@ -759,6 +821,7 @@ #undef BOARD_RUMBA32_AUS3D #undef BOARD_RAMPS_DAGOMA #undef BOARD_RAMPS_LONGER3D_LK4PRO + #undef BOARD_BTT_SKR_V2_0 #endif diff --git a/Marlin/src/pins/pinsDebug.h b/Marlin/src/pins/pinsDebug.h index 5f153cfa2b0f..b384342335bd 100644 --- a/Marlin/src/pins/pinsDebug.h +++ b/Marlin/src/pins/pinsDebug.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -41,38 +44,26 @@ #define REPORT_NAME_ANALOG(COUNTER, NAME) _ADD_PIN(#NAME, COUNTER) #include "pinsDebug_list.h" -#line 46 +#line 48 // manually add pins that have names that are macros which don't play well with these macros #if ANY(AVR_ATmega2560_FAMILY, AVR_ATmega1284_FAMILY, ARDUINO_ARCH_SAM, TARGET_LPC1768) - #if SERIAL_PORT == 0 + #if CONF_SERIAL_IS(0) static const char RXD_NAME_0[] PROGMEM = { "RXD0" }; static const char TXD_NAME_0[] PROGMEM = { "TXD0" }; - #elif SERIAL_PORT == 1 + #endif + #if CONF_SERIAL_IS(1) static const char RXD_NAME_1[] PROGMEM = { "RXD1" }; static const char TXD_NAME_1[] PROGMEM = { "TXD1" }; - #elif SERIAL_PORT == 2 + #endif + #if CONF_SERIAL_IS(2) static const char RXD_NAME_2[] PROGMEM = { "RXD2" }; static const char TXD_NAME_2[] PROGMEM = { "TXD2" }; - #elif SERIAL_PORT == 3 + #endif + #if CONF_SERIAL_IS(3) static const char RXD_NAME_3[] PROGMEM = { "RXD3" }; static const char TXD_NAME_3[] PROGMEM = { "TXD3" }; #endif - #ifdef SERIAL_PORT_2 - #if SERIAL_PORT_2 == 0 - static const char RXD_NAME_0[] PROGMEM = { "RXD0" }; - static const char TXD_NAME_0[] PROGMEM = { "TXD0" }; - #elif SERIAL_PORT_2 == 1 - static const char RXD_NAME_1[] PROGMEM = { "RXD1" }; - static const char TXD_NAME_1[] PROGMEM = { "TXD1" }; - #elif SERIAL_PORT_2 == 2 - static const char RXD_NAME_2[] PROGMEM = { "RXD2" }; - static const char TXD_NAME_2[] PROGMEM = { "TXD2" }; - #elif SERIAL_PORT_2 == 3 - static const char RXD_NAME_3[] PROGMEM = { "RXD3" }; - static const char TXD_NAME_3[] PROGMEM = { "TXD3" }; - #endif - #endif #endif ///////////////////////////////////////////////////////////////////////////// @@ -103,12 +94,11 @@ const PinInfo pin_array[] PROGMEM = { * Each entry takes up 6 bytes in FLASH: * 2 byte pointer to location of the name string * 2 bytes containing the pin number - * analog pin numbers were convereted to digital when the array was created + * analog pin numbers were converted to digital when the array was created * 2 bytes containing the digital/analog bool flag */ - // manually add pins ... - #if SERIAL_PORT == 0 + #if CONF_SERIAL_IS(0) #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) { RXD_NAME_0, 0, true }, { TXD_NAME_0, 1, true }, @@ -119,7 +109,9 @@ const PinInfo pin_array[] PROGMEM = { { RXD_NAME_0, 3, true }, { TXD_NAME_0, 2, true }, #endif - #elif SERIAL_PORT == 1 + #endif + + #if CONF_SERIAL_IS(1) #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) { RXD_NAME_1, 19, true }, { TXD_NAME_1, 18, true }, @@ -135,7 +127,9 @@ const PinInfo pin_array[] PROGMEM = { { TXD_NAME_1, 15, true }, #endif #endif - #elif SERIAL_PORT == 2 + #endif + + #if CONF_SERIAL_IS(2) #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) { RXD_NAME_2, 17, true }, { TXD_NAME_2, 16, true }, @@ -148,7 +142,9 @@ const PinInfo pin_array[] PROGMEM = { { TXD_NAME_2, 10, true }, #endif #endif - #elif SERIAL_PORT == 3 + #endif + + #if CONF_SERIAL_IS(3) #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) { RXD_NAME_3, 15, true }, { TXD_NAME_3, 14, true }, @@ -166,68 +162,8 @@ const PinInfo pin_array[] PROGMEM = { #endif #endif - #ifdef SERIAL_PORT_2 - #if SERIAL_PORT_2 == 0 - #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) - { RXD_NAME_0, 0, true }, - { TXD_NAME_0, 1, true }, - #elif AVR_ATmega1284_FAMILY - { RXD_NAME_0, 8, true }, - { TXD_NAME_0, 9, true }, - #elif defined(TARGET_LPC1768) // TX P0_02 RX P0_03 - { RXD_NAME_0, 3, true }, - { TXD_NAME_0, 2, true }, - #endif - #elif SERIAL_PORT_2 == 1 - #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) - { RXD_NAME_1, 19, true }, - { TXD_NAME_1, 18, true }, - #elif AVR_ATmega1284_FAMILY - { RXD_NAME_1, 10, true }, - { TXD_NAME_1, 11, true }, - #elif defined(TARGET_LPC1768) - #ifdef LPC_PINCFG_UART1_P2_00 // TX P2_00 RX P2_01 - { RXD_NAME_1, 0x41, true }, - { TXD_NAME_1, 0x40, true }, - #else // TX P0_15 RX P0_16 - { RXD_NAME_1, 16, true }, - { TXD_NAME_1, 15, true }, - #endif - #endif - #elif SERIAL_PORT_2 == 2 - #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) - { RXD_NAME_2, 17, true }, - { TXD_NAME_2, 16, true }, - #elif defined(TARGET_LPC1768) - #ifdef LPC_PINCFG_UART2_P2_08 // TX P2_08 RX P2_09 - { RXD_NAME_2, 0x49, true }, - { TXD_NAME_2, 0x48, true }, - #else // TX P0_10 RX P0_11 - { RXD_NAME_2, 11, true }, - { TXD_NAME_2, 10, true }, - #endif - #endif - #elif SERIAL_PORT_2 == 3 - #if EITHER(AVR_ATmega2560_FAMILY, ARDUINO_ARCH_SAM) - { RXD_NAME_3, 15, true }, - { TXD_NAME_3, 14, true }, - #elif defined(TARGET_LPC1768) - #ifdef LPC_PINCFG_UART3_P0_25 // TX P0_25 RX P0_26 - { RXD_NAME_3, 0x1A, true }, - { TXD_NAME_3, 0x19, true }, - #elif defined(LPC_PINCFG_UART3_P4_28) // TX P4_28 RX P4_29 - { RXD_NAME_3, 0x9D, true }, - { TXD_NAME_3, 0x9C, true }, - #else // TX P0_00 RX P0_01 - { RXD_NAME_3, 1, true }, - { TXD_NAME_3, 0, true }, - #endif - #endif - #endif - #endif - #include "pinsDebug_list.h" - #line 172 + #line 167 }; @@ -238,7 +174,7 @@ const PinInfo pin_array[] PROGMEM = { #endif static void print_input_or_output(const bool isout) { - serialprintPGM(isout ? PSTR("Output = ") : PSTR("Input = ")); + SERIAL_ECHOPGM_P(isout ? PSTR("Output = ") : PSTR("Input = ")); } // pretty report with PWM info @@ -266,15 +202,12 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e LOOP_L_N(x, COUNT(pin_array)) { // scan entire array and report all instances of this pin if (GET_ARRAY_PIN(x) == pin) { if (!found) { // report digital and analog pin number only on the first time through - if (start_string) serialprintPGM(start_string); - serialprintPGM(PSTR("PIN: ")); + if (start_string) SERIAL_ECHOPGM_P(start_string); + SERIAL_ECHOPGM("PIN: "); PRINT_PIN(pin); PRINT_PORT(pin); - if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) { - sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number - SERIAL_ECHO(buffer); - } - else SERIAL_ECHO_SP(8); // add padding if not an analog pin + if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) PRINT_PIN_ANALOG(pin); // analog pin number + else SERIAL_ECHO_SP(8); // add padding if not an analog pin } else { SERIAL_CHAR('.'); @@ -317,16 +250,12 @@ inline void report_pin_state_extended(pin_t pin, const bool ignore, const bool e } // end of for loop if (!found) { - if (start_string) serialprintPGM(start_string); - serialprintPGM(PSTR("PIN: ")); + if (start_string) SERIAL_ECHOPGM_P(start_string); + SERIAL_ECHOPGM("PIN: "); PRINT_PIN(pin); PRINT_PORT(pin); - if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) { - sprintf_P(buffer, PSTR(" (A%2d) "), DIGITAL_PIN_TO_ANALOG_PIN(pin)); // analog pin number - SERIAL_ECHO(buffer); - } - else - SERIAL_ECHO_SP(8); // add padding if not an analog pin + if (int8_t(DIGITAL_PIN_TO_ANALOG_PIN(pin)) >= 0) PRINT_PIN_ANALOG(pin); // analog pin number + else SERIAL_ECHO_SP(8); // add padding if not an analog pin SERIAL_ECHOPGM(""); if (extended) { diff --git a/Marlin/src/pins/pinsDebug_list.h b/Marlin/src/pins/pinsDebug_list.h index 79a67c34f870..50304648ab74 100644 --- a/Marlin/src/pins/pinsDebug_list.h +++ b/Marlin/src/pins/pinsDebug_list.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -22,93 +25,162 @@ // Following this pattern is a must. // If the new pin name is over 28 characters long then pinsDebug.h will need to be modified. -// Pin lists 1.1.x and 2.0.x synchronized 2018-02-17 +#if TARGET_LPC1768 + #define ANALOG_OK(PN) (WITHIN(PN, P0_02, P0_03) || WITHIN(PN, P0_23, P0_26) || WITHIN(PN, P1_30, P1_31)) +#else + #define ANALOG_OK(PN) WITHIN(PN, 0, NUM_ANALOG_INPUTS - 1) +#endif -#line 28 // set __LINE__ to a known value for both passes +#line 35 // set __LINE__ to a known value for both passes // // Analog Pin Assignments // -#define ANALOG_OK(PN) ((PN) >= 0 && (PN) < NUM_ANALOG_INPUTS) +#define _EXISTS(PN,V...) (defined(PN##V) && PN##V >= 0) -#if defined(EXT_AUX_A0) && ANALOG_OK(EXT_AUX_A0) +#if _EXISTS(EXT_AUX_A0) + #if ANALOG_OK(EXT_AUX_A0) REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0) #endif -#if defined(EXT_AUX_A1) && ANALOG_OK(EXT_AUX_A0) - REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A1) #endif -#if defined(EXT_AUX_A2) && ANALOG_OK(EXT_AUX_A0) - REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A2) +#if _EXISTS(EXT_AUX_A1) + #if ANALOG_OK(EXT_AUX_A0) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0) + #endif +#endif +#if _EXISTS(EXT_AUX_A2) + #if ANALOG_OK(EXT_AUX_A0) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0) + #endif +#endif +#if _EXISTS(EXT_AUX_A3) + #if ANALOG_OK(EXT_AUX_A0) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0) + #endif +#endif +#if _EXISTS(EXT_AUX_A4) + #if ANALOG_OK(EXT_AUX_A0) + REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0) + #endif #endif -#if defined(EXT_AUX_A3) && ANALOG_OK(EXT_AUX_A0) - REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A3) +#if PIN_EXISTS(FILWIDTH) + #if ANALOG_OK(FILWIDTH_PIN) + REPORT_NAME_ANALOG(__LINE__, FILWIDTH_PIN) + #endif #endif -#if defined(EXT_AUX_A4) && ANALOG_OK(EXT_AUX_A0) - REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A4) +#if PIN_EXISTS(MAIN_VOLTAGE_MEASURE) + #if ANALOG_OK(MAIN_VOLTAGE_MEASURE_PIN) + REPORT_NAME_ANALOG(__LINE__, MAIN_VOLTAGE_MEASURE_PIN) + #endif #endif -#if PIN_EXISTS(FILWIDTH) && ANALOG_OK(FILWIDTH_PIN) - REPORT_NAME_ANALOG(__LINE__, FILWIDTH_PIN) +#if PIN_EXISTS(POWER_MONITOR_CURRENT) + #if ANALOG_OK(POWER_MONITOR_CURRENT_PIN) + REPORT_NAME_ANALOG(__LINE__, POWER_MONITOR_CURRENT_PIN) + #endif #endif -#if PIN_EXISTS(MAIN_VOLTAGE_MEASURE) && ANALOG_OK(MAIN_VOLTAGE_MEASURE_PIN) - REPORT_NAME_ANALOG(__LINE__, MAIN_VOLTAGE_MEASURE_PIN) +#if PIN_EXISTS(POWER_MONITOR_VOLTAGE) + #if ANALOG_OK(POWER_MONITOR_VOLTAGE_PIN) + REPORT_NAME_ANALOG(__LINE__, POWER_MONITOR_VOLTAGE_PIN) + #endif #endif #if !defined(ARDUINO_ARCH_SAM) && !defined(ARDUINO_ARCH_SAMD) // TC1 & TC2 are macros in the SAM/SAMD tool chain - #if defined(TC1) && ANALOG_OK(TC1) + #if _EXISTS(TC1) + #if ANALOG_OK(TC1) REPORT_NAME_ANALOG(__LINE__, TC1) #endif - #if defined(TC2) && ANALOG_OK(TC1) - REPORT_NAME_ANALOG(__LINE__, TC2) + #endif + #if _EXISTS(TC2) + #if ANALOG_OK(TC1) + REPORT_NAME_ANALOG(__LINE__, TC1) + #endif #endif #endif -#if PIN_EXISTS(TEMP_0) && ANALOG_OK(TEMP_0_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_0_PIN) +#if PIN_EXISTS(TEMP_0) + #if ANALOG_OK(TEMP_0_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_0_PIN) + #endif #endif -#if PIN_EXISTS(TEMP_1) && ANALOG_OK(TEMP_1_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_1_PIN) +#if PIN_EXISTS(TEMP_1) + #if ANALOG_OK(TEMP_1_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_1_PIN) + #endif #endif -#if PIN_EXISTS(TEMP_2) && ANALOG_OK(TEMP_2_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_2_PIN) +#if PIN_EXISTS(TEMP_2) + #if ANALOG_OK(TEMP_2_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_2_PIN) + #endif #endif -#if PIN_EXISTS(TEMP_3) && ANALOG_OK(TEMP_3_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_3_PIN) +#if PIN_EXISTS(TEMP_3) + #if ANALOG_OK(TEMP_3_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_3_PIN) + #endif #endif -#if PIN_EXISTS(TEMP_4) && ANALOG_OK(TEMP_4_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN) +#if PIN_EXISTS(TEMP_4) + #if ANALOG_OK(TEMP_4_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_4_PIN) + #endif #endif -#if PIN_EXISTS(TEMP_5) && ANALOG_OK(TEMP_5_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_5_PIN) +#if PIN_EXISTS(TEMP_5) + #if ANALOG_OK(TEMP_5_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_5_PIN) + #endif #endif -#if PIN_EXISTS(TEMP_6) && ANALOG_OK(TEMP_6_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_6_PIN) +#if PIN_EXISTS(TEMP_6) + #if ANALOG_OK(TEMP_6_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_6_PIN) + #endif #endif -#if PIN_EXISTS(TEMP_7) && ANALOG_OK(TEMP_7_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_7_PIN) +#if PIN_EXISTS(TEMP_7) + #if ANALOG_OK(TEMP_7_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_7_PIN) + #endif #endif -#if PIN_EXISTS(TEMP_BED) && ANALOG_OK(TEMP_BED_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN) +#if PIN_EXISTS(TEMP_BED) + #if ANALOG_OK(TEMP_BED_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_BED_PIN) + #endif #endif -#if PIN_EXISTS(TEMP_CHAMBER) && ANALOG_OK(TEMP_CHAMBER_PIN) - REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN) +#if PIN_EXISTS(TEMP_BOARD) + #if ANALOG_OK(TEMP_BOARD_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_BOARD_PIN) + #endif #endif -#if PIN_EXISTS(ADC_KEYPAD) && ANALOG_OK(ADC_KEYPAD_PIN) - REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN) +#if PIN_EXISTS(TEMP_CHAMBER) + #if ANALOG_OK(TEMP_CHAMBER_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_CHAMBER_PIN) + #endif +#endif +#if PIN_EXISTS(TEMP_COOLER) + #if ANALOG_OK(TEMP_COOLER_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_COOLER_PIN) + #endif +#endif +#if PIN_EXISTS(TEMP_PROBE) + #if ANALOG_OK(TEMP_PROBE_PIN) + REPORT_NAME_ANALOG(__LINE__, TEMP_PROBE_PIN) + #endif +#endif +#if PIN_EXISTS(ADC_KEYPAD) + #if ANALOG_OK(ADC_KEYPAD_PIN) + REPORT_NAME_ANALOG(__LINE__, ADC_KEYPAD_PIN) + #endif #endif // // Digital Pin Assignments // -#if defined(__FD) && __FD >= 0 +#if _EXISTS(__FD) REPORT_NAME_DIGITAL(__LINE__, __FD) #endif -#if defined(__FS) && __FS >= 0 +#if _EXISTS(__FS) REPORT_NAME_DIGITAL(__LINE__, __FS) #endif -#if defined(__GD) && __GD >= 0 +#if _EXISTS(__GD) REPORT_NAME_DIGITAL(__LINE__, __GD) #endif -#if defined(__GS) && __GS >= 0 +#if _EXISTS(__GS) REPORT_NAME_DIGITAL(__LINE__, __GS) #endif #if PIN_EXISTS(AVR_MISO) @@ -129,46 +201,46 @@ #if PIN_EXISTS(BEEPER) REPORT_NAME_DIGITAL(__LINE__, BEEPER_PIN) #endif -#if defined(BTN_BACK) && BTN_BACK >= 0 +#if _EXISTS(BTN_BACK) REPORT_NAME_DIGITAL(__LINE__, BTN_BACK) #endif -#if defined(BTN_CENTER) && BTN_CENTER >= 0 +#if _EXISTS(BTN_CENTER) REPORT_NAME_DIGITAL(__LINE__, BTN_CENTER) #endif -#if defined(BTN_DOWN) && BTN_DOWN >= 0 +#if _EXISTS(BTN_DOWN) REPORT_NAME_DIGITAL(__LINE__, BTN_DOWN) #endif -#if defined(BTN_DWN) && BTN_DWN >= 0 +#if _EXISTS(BTN_DWN) REPORT_NAME_DIGITAL(__LINE__, BTN_DWN) #endif -#if defined(BTN_EN1) && BTN_EN1 >= 0 +#if _EXISTS(BTN_EN1) REPORT_NAME_DIGITAL(__LINE__, BTN_EN1) #endif -#if defined(BTN_EN2) && BTN_EN2 >= 0 +#if _EXISTS(BTN_EN2) REPORT_NAME_DIGITAL(__LINE__, BTN_EN2) #endif -#if defined(BTN_ENC_EN) && BTN_ENC_EN >= 0 +#if _EXISTS(BTN_ENC_EN) REPORT_NAME_DIGITAL(__LINE__, BTN_ENC_EN) #endif -#if defined(BTN_ENC) && BTN_ENC >= 0 +#if _EXISTS(BTN_ENC) REPORT_NAME_DIGITAL(__LINE__, BTN_ENC) #endif -#if defined(BTN_HOME) && BTN_HOME >= 0 +#if _EXISTS(BTN_HOME) REPORT_NAME_DIGITAL(__LINE__, BTN_HOME) #endif -#if defined(BTN_LEFT) && BTN_LEFT >= 0 +#if _EXISTS(BTN_LEFT) REPORT_NAME_DIGITAL(__LINE__, BTN_LEFT) #endif -#if defined(BTN_LFT) && BTN_LFT >= 0 +#if _EXISTS(BTN_LFT) REPORT_NAME_DIGITAL(__LINE__, BTN_LFT) #endif -#if defined(BTN_RIGHT) && BTN_RIGHT >= 0 +#if _EXISTS(BTN_RIGHT) REPORT_NAME_DIGITAL(__LINE__, BTN_RIGHT) #endif -#if defined(BTN_RT) && BTN_RT >= 0 +#if _EXISTS(BTN_RT) REPORT_NAME_DIGITAL(__LINE__, BTN_RT) #endif -#if defined(BTN_UP) && BTN_UP >= 0 +#if _EXISTS(BTN_UP) REPORT_NAME_DIGITAL(__LINE__, BTN_UP) #endif #if PIN_EXISTS(JOY_X) @@ -183,6 +255,81 @@ #if PIN_EXISTS(JOY_EN) REPORT_NAME_DIGITAL(__LINE__, JOY_EN_PIN) #endif +#if PIN_EXISTS(BUTTON1) + REPORT_NAME_DIGITAL(__LINE__, BUTTON1_PIN) +#endif +#if PIN_EXISTS(BUTTON2) + REPORT_NAME_DIGITAL(__LINE__, BUTTON2_PIN) +#endif +#if PIN_EXISTS(BUTTON3) + REPORT_NAME_DIGITAL(__LINE__, BUTTON3_PIN) +#endif +#if PIN_EXISTS(BUTTON4) + REPORT_NAME_DIGITAL(__LINE__, BUTTON4_PIN) +#endif +#if PIN_EXISTS(BUTTON5) + REPORT_NAME_DIGITAL(__LINE__, BUTTON5_PIN) +#endif +#if PIN_EXISTS(BUTTON6) + REPORT_NAME_DIGITAL(__LINE__, BUTTON6_PIN) +#endif +#if PIN_EXISTS(BUTTON7) + REPORT_NAME_DIGITAL(__LINE__, BUTTON7_PIN) +#endif +#if PIN_EXISTS(BUTTON8) + REPORT_NAME_DIGITAL(__LINE__, BUTTON8_PIN) +#endif +#if PIN_EXISTS(BUTTON9) + REPORT_NAME_DIGITAL(__LINE__, BUTTON9_PIN) +#endif +#if PIN_EXISTS(BUTTON10) + REPORT_NAME_DIGITAL(__LINE__, BUTTON10_PIN) +#endif +#if PIN_EXISTS(BUTTON11) + REPORT_NAME_DIGITAL(__LINE__, BUTTON11_PIN) +#endif +#if PIN_EXISTS(BUTTON12) + REPORT_NAME_DIGITAL(__LINE__, BUTTON12_PIN) +#endif +#if PIN_EXISTS(BUTTON13) + REPORT_NAME_DIGITAL(__LINE__, BUTTON13_PIN) +#endif +#if PIN_EXISTS(BUTTON14) + REPORT_NAME_DIGITAL(__LINE__, BUTTON14_PIN) +#endif +#if PIN_EXISTS(BUTTON15) + REPORT_NAME_DIGITAL(__LINE__, BUTTON15_PIN) +#endif +#if PIN_EXISTS(BUTTON16) + REPORT_NAME_DIGITAL(__LINE__, BUTTON16_PIN) +#endif +#if PIN_EXISTS(BUTTON17) + REPORT_NAME_DIGITAL(__LINE__, BUTTON17_PIN) +#endif +#if PIN_EXISTS(BUTTON18) + REPORT_NAME_DIGITAL(__LINE__, BUTTON18_PIN) +#endif +#if PIN_EXISTS(BUTTON19) + REPORT_NAME_DIGITAL(__LINE__, BUTTON19_PIN) +#endif +#if PIN_EXISTS(BUTTON20) + REPORT_NAME_DIGITAL(__LINE__, BUTTON20_PIN) +#endif +#if PIN_EXISTS(BUTTON21) + REPORT_NAME_DIGITAL(__LINE__, BUTTON21_PIN) +#endif +#if PIN_EXISTS(BUTTON22) + REPORT_NAME_DIGITAL(__LINE__, BUTTON22_PIN) +#endif +#if PIN_EXISTS(BUTTON23) + REPORT_NAME_DIGITAL(__LINE__, BUTTON23_PIN) +#endif +#if PIN_EXISTS(BUTTON24) + REPORT_NAME_DIGITAL(__LINE__, BUTTON24_PIN) +#endif +#if PIN_EXISTS(BUTTON25) + REPORT_NAME_DIGITAL(__LINE__, BUTTON25_PIN) +#endif #if PIN_EXISTS(CASE_LIGHT) REPORT_NAME_DIGITAL(__LINE__, CASE_LIGHT_PIN) #endif @@ -204,67 +351,70 @@ #if PIN_EXISTS(CUTOFF_TEST) REPORT_NAME_DIGITAL(__LINE__, CUTOFF_TEST_PIN) #endif -#if defined(D57) && D57 >= 0 +#if _EXISTS(D57) REPORT_NAME_DIGITAL(__LINE__, D57) #endif -#if defined(D58) && D58 >= 0 +#if _EXISTS(D58) REPORT_NAME_DIGITAL(__LINE__, D58) #endif #if PIN_EXISTS(DAC_DISABLE) REPORT_NAME_DIGITAL(__LINE__, DAC_DISABLE_PIN) #endif -#if defined(DAC0_SYNC) && DAC0_SYNC >= 0 - REPORT_NAME_DIGITAL(__LINE__, DAC0_SYNC) +#if PIN_EXISTS(DAC0_SYNC) + REPORT_NAME_DIGITAL(__LINE__, DAC0_SYNC_PIN) #endif -#if defined(DAC1_SYNC) && DAC1_SYNC >= 0 - REPORT_NAME_DIGITAL(__LINE__, DAC1_SYNC) +#if PIN_EXISTS(DAC1_SYNC) + REPORT_NAME_DIGITAL(__LINE__, DAC1_SYNC_PIN) #endif #if PIN_EXISTS(DEBUG) REPORT_NAME_DIGITAL(__LINE__, DEBUG_PIN) #endif -#if defined(DIGIPOTS_I2C_SCL) && DIGIPOTS_I2C_SCL >= 0 +#if _EXISTS(DIGIPOTS_I2C_SCL) REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SCL) #endif -#if defined(DIGIPOTS_I2C_SDA_E0) && DIGIPOTS_I2C_SDA_E0 >= 0 +#if _EXISTS(DIGIPOTS_I2C_SDA_E0) REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_E0) #endif -#if defined(DIGIPOTS_I2C_SDA_E1) && DIGIPOTS_I2C_SDA_E1 >= 0 +#if _EXISTS(DIGIPOTS_I2C_SDA_E1) REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_E1) #endif -#if defined(DIGIPOTS_I2C_SDA_X) && DIGIPOTS_I2C_SDA_X >= 0 +#if _EXISTS(DIGIPOTS_I2C_SDA_X) REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_X) #endif -#if defined(DIGIPOTS_I2C_SDA_Y) && DIGIPOTS_I2C_SDA_Y >= 0 +#if _EXISTS(DIGIPOTS_I2C_SDA_Y) REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_Y) #endif -#if defined(DIGIPOTS_I2C_SDA_Z) && DIGIPOTS_I2C_SDA_Z >= 0 +#if _EXISTS(DIGIPOTS_I2C_SDA_Z) REPORT_NAME_DIGITAL(__LINE__, DIGIPOTS_I2C_SDA_Z) #endif #if PIN_EXISTS(DIGIPOTSS) REPORT_NAME_DIGITAL(__LINE__, DIGIPOTSS_PIN) #endif -#if defined(DOGLCD_A0) && DOGLCD_A0 >= 0 +#if PIN_EXISTS(LCD_RESET) + REPORT_NAME_DIGITAL(__LINE__, LCD_RESET_PIN) +#endif +#if _EXISTS(DOGLCD_A0) REPORT_NAME_DIGITAL(__LINE__, DOGLCD_A0) #endif -#if defined(DOGLCD_CS) && DOGLCD_CS >= 0 +#if _EXISTS(DOGLCD_CS) REPORT_NAME_DIGITAL(__LINE__, DOGLCD_CS) #endif -#if defined(DOGLCD_MOSI) && DOGLCD_MOSI >= 0 +#if _EXISTS(DOGLCD_MOSI) REPORT_NAME_DIGITAL(__LINE__, DOGLCD_MOSI) #endif -#if defined(DOGLCD_SCK) && DOGLCD_SCK >= 0 +#if _EXISTS(DOGLCD_SCK) REPORT_NAME_DIGITAL(__LINE__, DOGLCD_SCK) #endif -#if defined(TMC_SW_MISO) && TMC_SW_MISO >= 0 +#if _EXISTS(TMC_SW_MISO) REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MISO) #endif -#if defined(TMC_SW_MOSI) && TMC_SW_MOSI >= 0 +#if _EXISTS(TMC_SW_MOSI) REPORT_NAME_DIGITAL(__LINE__, TMC_SW_MOSI) #endif -#if defined(TMC_SW_SCK) && TMC_SW_SCK >= 0 +#if _EXISTS(TMC_SW_SCK) REPORT_NAME_DIGITAL(__LINE__, TMC_SW_SCK) #endif -#if defined(TFTGLCD_CS) && TFTGLCD_CS >= 0 +#if _EXISTS(TFTGLCD_CS) REPORT_NAME_DIGITAL(__LINE__, TFTGLCD_CS) #endif #if PIN_EXISTS(E_MUX0) @@ -306,6 +456,9 @@ #if PIN_EXISTS(E0_STEP) REPORT_NAME_DIGITAL(__LINE__, E0_STEP_PIN) #endif +#if PIN_EXISTS(E0_STDBY) + REPORT_NAME_DIGITAL(__LINE__, E0_STDBY_PIN) +#endif #if PIN_EXISTS(E1_AUTO_FAN) REPORT_NAME_DIGITAL(__LINE__, E1_AUTO_FAN_PIN) #endif @@ -330,6 +483,9 @@ #if PIN_EXISTS(E1_STEP) REPORT_NAME_DIGITAL(__LINE__, E1_STEP_PIN) #endif +#if PIN_EXISTS(E1_STDBY) + REPORT_NAME_DIGITAL(__LINE__, E1_STDBY_PIN) +#endif #if PIN_EXISTS(E2_AUTO_FAN) REPORT_NAME_DIGITAL(__LINE__, E2_AUTO_FAN_PIN) #endif @@ -354,6 +510,9 @@ #if PIN_EXISTS(E2_STEP) REPORT_NAME_DIGITAL(__LINE__, E2_STEP_PIN) #endif +#if PIN_EXISTS(E2_STDBY) + REPORT_NAME_DIGITAL(__LINE__, E2_STDBY_PIN) +#endif #if PIN_EXISTS(E3_AUTO_FAN) REPORT_NAME_DIGITAL(__LINE__, E3_AUTO_FAN_PIN) #endif @@ -378,6 +537,9 @@ #if PIN_EXISTS(E3_STEP) REPORT_NAME_DIGITAL(__LINE__, E3_STEP_PIN) #endif +#if PIN_EXISTS(E3_STDBY) + REPORT_NAME_DIGITAL(__LINE__, E3_STDBY_PIN) +#endif #if PIN_EXISTS(E4_AUTO_FAN) REPORT_NAME_DIGITAL(__LINE__, E4_AUTO_FAN_PIN) #endif @@ -402,6 +564,9 @@ #if PIN_EXISTS(E4_STEP) REPORT_NAME_DIGITAL(__LINE__, E4_STEP_PIN) #endif +#if PIN_EXISTS(E4_STDBY) + REPORT_NAME_DIGITAL(__LINE__, E4_STDBY_PIN) +#endif #if PIN_EXISTS(E5_AUTO_FAN) REPORT_NAME_DIGITAL(__LINE__, E5_AUTO_FAN_PIN) #endif @@ -426,6 +591,9 @@ #if PIN_EXISTS(E5_STEP) REPORT_NAME_DIGITAL(__LINE__, E5_STEP_PIN) #endif +#if PIN_EXISTS(E5_STDBY) + REPORT_NAME_DIGITAL(__LINE__, E5_STDBY_PIN) +#endif #if PIN_EXISTS(E6_AUTO_FAN) REPORT_NAME_DIGITAL(__LINE__, E6_AUTO_FAN_PIN) #endif @@ -450,6 +618,9 @@ #if PIN_EXISTS(E6_STEP) REPORT_NAME_DIGITAL(__LINE__, E6_STEP_PIN) #endif +#if PIN_EXISTS(E6_STDBY) + REPORT_NAME_DIGITAL(__LINE__, E6_STDBY_PIN) +#endif #if PIN_EXISTS(E7_AUTO_FAN) REPORT_NAME_DIGITAL(__LINE__, E7_AUTO_FAN_PIN) #endif @@ -474,71 +645,74 @@ #if PIN_EXISTS(E7_STEP) REPORT_NAME_DIGITAL(__LINE__, E7_STEP_PIN) #endif -#if defined(ENET_CRS) && ENET_CRS >= 0 +#if PIN_EXISTS(E7_STDBY) + REPORT_NAME_DIGITAL(__LINE__, E7_STDBY_PIN) +#endif +#if _EXISTS(ENET_CRS) REPORT_NAME_DIGITAL(__LINE__, ENET_CRS) #endif -#if defined(ENET_MDIO) && ENET_MDIO >= 0 +#if _EXISTS(ENET_MDIO) REPORT_NAME_DIGITAL(__LINE__, ENET_MDIO) #endif -#if defined(ENET_MOC) && ENET_MOC >= 0 +#if _EXISTS(ENET_MOC) REPORT_NAME_DIGITAL(__LINE__, ENET_MOC) #endif -#if defined(ENET_RX_ER) && ENET_RX_ER >= 0 +#if _EXISTS(ENET_RX_ER) REPORT_NAME_DIGITAL(__LINE__, ENET_RX_ER) #endif -#if defined(ENET_RXD0) && ENET_RXD0 >= 0 +#if _EXISTS(ENET_RXD0) REPORT_NAME_DIGITAL(__LINE__, ENET_RXD0) #endif -#if defined(ENET_RXD1) && ENET_RXD1 >= 0 +#if _EXISTS(ENET_RXD1) REPORT_NAME_DIGITAL(__LINE__, ENET_RXD1) #endif -#if defined(ENET_TX_EN) && ENET_TX_EN >= 0 +#if _EXISTS(ENET_TX_EN) REPORT_NAME_DIGITAL(__LINE__, ENET_TX_EN) #endif -#if defined(ENET_TXD0) && ENET_TXD0 >= 0 +#if _EXISTS(ENET_TXD0) REPORT_NAME_DIGITAL(__LINE__, ENET_TXD0) #endif -#if defined(ENET_TXD1) && ENET_TXD1 >= 0 +#if _EXISTS(ENET_TXD1) REPORT_NAME_DIGITAL(__LINE__, ENET_TXD1) #endif #if PIN_EXISTS(EXP_VOLTAGE_LEVEL) REPORT_NAME_DIGITAL(__LINE__, EXP_VOLTAGE_LEVEL_PIN) #endif -#if defined(EXT_AUX_A0_IO) && EXT_AUX_A0_IO >= 0 +#if _EXISTS(EXT_AUX_A0_IO) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A0_IO) #endif -#if defined(EXT_AUX_A1_IO) && EXT_AUX_A1_IO >= 0 +#if _EXISTS(EXT_AUX_A1_IO) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A1_IO) #endif -#if defined(EXT_AUX_A2_IO) && EXT_AUX_A2_IO >= 0 +#if _EXISTS(EXT_AUX_A2_IO) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A2_IO) #endif -#if defined(EXT_AUX_A3_IO) && EXT_AUX_A3_IO >= 0 +#if _EXISTS(EXT_AUX_A3_IO) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A3_IO) #endif -#if defined(EXT_AUX_A4_IO) && EXT_AUX_A4_IO >= 0 +#if _EXISTS(EXT_AUX_A4_IO) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_A4_IO) #endif -#if defined(EXT_AUX_PWM_D24) && EXT_AUX_PWM_D24 >= 0 +#if _EXISTS(EXT_AUX_PWM_D24) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_PWM_D24) #endif -#if defined(EXT_AUX_RX1_D2) && EXT_AUX_RX1_D2 >= 0 +#if _EXISTS(EXT_AUX_RX1_D2) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_RX1_D2) #endif -#if defined(EXT_AUX_SCL_D0) && EXT_AUX_SCL_D0 >= 0 +#if _EXISTS(EXT_AUX_SCL_D0) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_SCL_D0) #endif -#if defined(EXT_AUX_SDA_D1) && EXT_AUX_SDA_D1 >= 0 +#if _EXISTS(EXT_AUX_SDA_D1) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_SDA_D1) #endif -#if defined(EXT_AUX_TX1_D3) && EXT_AUX_TX1_D3 >= 0 +#if _EXISTS(EXT_AUX_TX1_D3) REPORT_NAME_DIGITAL(__LINE__, EXT_AUX_TX1_D3) #endif -#if defined(EXTRUDER_0_AUTO_FAN) && EXTRUDER_0_AUTO_FAN >= 0 +#if _EXISTS(EXTRUDER_0_AUTO_FAN) REPORT_NAME_DIGITAL(__LINE__, EXTRUDER_0_AUTO_FAN) #endif -#if defined(EXTRUDER_1_AUTO_FAN) && EXTRUDER_1_AUTO_FAN >= 0 +#if _EXISTS(EXTRUDER_1_AUTO_FAN) REPORT_NAME_DIGITAL(__LINE__, EXTRUDER_1_AUTO_FAN) #endif #if PIN_EXISTS(FAN) @@ -577,6 +751,9 @@ #if PIN_EXISTS(POWER_LOSS) REPORT_NAME_DIGITAL(__LINE__, POWER_LOSS_PIN) #endif +#if PIN_EXISTS(SAFE_POWER) + REPORT_NAME_DIGITAL(__LINE__, SAFE_POWER_PIN) +#endif #if PIN_EXISTS(FIL_RUNOUT) REPORT_NAME_DIGITAL(__LINE__, FIL_RUNOUT_PIN) #endif @@ -631,6 +808,9 @@ #if PIN_EXISTS(HEATER_CHAMBER) REPORT_NAME_DIGITAL(__LINE__, HEATER_CHAMBER_PIN) #endif +#if PIN_EXISTS(COOLER) + REPORT_NAME_DIGITAL(__LINE__, COOLER_PIN) +#endif #if PIN_EXISTS(HOME) REPORT_NAME_DIGITAL(__LINE__, HOME_PIN) #endif @@ -640,31 +820,34 @@ #if PIN_EXISTS(I2C_SDA) REPORT_NAME_DIGITAL(__LINE__, I2C_SDA_PIN) #endif -#if PIN_EXISTS(KILL) +#if HAS_KILL REPORT_NAME_DIGITAL(__LINE__, KILL_PIN) #endif +#if HAS_FREEZE_PIN + REPORT_NAME_DIGITAL(__LINE__, FREEZE_PIN) +#endif #if PIN_EXISTS(LCD_BACKLIGHT) REPORT_NAME_DIGITAL(__LINE__, LCD_BACKLIGHT_PIN) #endif -#if defined(LCD_PINS_D4) && LCD_PINS_D4 >= 0 +#if _EXISTS(LCD_PINS_D4) REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D4) #endif -#if defined(LCD_PINS_D5) && LCD_PINS_D5 >= 0 +#if _EXISTS(LCD_PINS_D5) REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D5) #endif -#if defined(LCD_PINS_D6) && LCD_PINS_D6 >= 0 +#if _EXISTS(LCD_PINS_D6) REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D6) #endif -#if defined(LCD_PINS_D7) && LCD_PINS_D7 >= 0 +#if _EXISTS(LCD_PINS_D7) REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_D7) #endif -#if defined(LCD_PINS_ENABLE) && LCD_PINS_ENABLE >= 0 +#if _EXISTS(LCD_PINS_ENABLE) REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_ENABLE) #endif -#if defined(LCD_PINS_RS) && LCD_PINS_RS >= 0 +#if _EXISTS(LCD_PINS_RS) REPORT_NAME_DIGITAL(__LINE__, LCD_PINS_RS) #endif -#if defined(LCD_SDSS) && LCD_SDSS >= 0 +#if _EXISTS(LCD_SDSS) REPORT_NAME_DIGITAL(__LINE__, LCD_SDSS) #endif #if PIN_EXISTS(LED_GREEN) @@ -673,20 +856,41 @@ #if PIN_EXISTS(LED) REPORT_NAME_DIGITAL(__LINE__, LED_PIN) #endif +#if PIN_EXISTS(LED2) + REPORT_NAME_DIGITAL(__LINE__, LED2_PIN) +#endif +#if PIN_EXISTS(LED3) + REPORT_NAME_DIGITAL(__LINE__, LED3_PIN) +#endif +#if PIN_EXISTS(LED4) + REPORT_NAME_DIGITAL(__LINE__, LED4_PIN) +#endif #if PIN_EXISTS(LED_RED) REPORT_NAME_DIGITAL(__LINE__, LED_RED_PIN) #endif -#if PIN_EXISTS(MAX6675_DO) - REPORT_NAME_DIGITAL(__LINE__, MAX6675_DO_PIN) +#if PIN_EXISTS(TEMP_0_CS) + REPORT_NAME_DIGITAL(__LINE__, TEMP_0_CS_PIN) #endif -#if PIN_EXISTS(MAX6675_SCK) - REPORT_NAME_DIGITAL(__LINE__, MAX6675_SCK_PIN) +#if PIN_EXISTS(TEMP_0_SCK) + REPORT_NAME_DIGITAL(__LINE__, TEMP_0_SCK_PIN) #endif -#if PIN_EXISTS(MAX6675_SS) - REPORT_NAME_DIGITAL(__LINE__, MAX6675_SS_PIN) +#if PIN_EXISTS(TEMP_0_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TEMP_0_MOSI_PIN) #endif -#if PIN_EXISTS(MAX6675_SS2) - REPORT_NAME_DIGITAL(__LINE__, MAX6675_SS2_PIN) +#if PIN_EXISTS(TEMP_0_MISO) + REPORT_NAME_DIGITAL(__LINE__, TEMP_0_MISO_PIN) +#endif +#if PIN_EXISTS(TEMP_1_CS) + REPORT_NAME_DIGITAL(__LINE__, TEMP_1_CS_PIN) +#endif +#if PIN_EXISTS(TEMP_1_SCK) + REPORT_NAME_DIGITAL(__LINE__, TEMP_1_SCK_PIN) +#endif +#if PIN_EXISTS(TEMP_1_MOSI) + REPORT_NAME_DIGITAL(__LINE__, TEMP_1_MOSI_PIN) +#endif +#if PIN_EXISTS(TEMP_1_MISO) + REPORT_NAME_DIGITAL(__LINE__, TEMP_1_MISO_PIN) #endif #if PIN_EXISTS(MAX7219_CLK) REPORT_NAME_DIGITAL(__LINE__, MAX7219_CLK_PIN) @@ -698,9 +902,9 @@ REPORT_NAME_DIGITAL(__LINE__, MAX7219_LOAD_PIN) #endif -// #if defined(MISO) && MISO >= 0 -// REPORT_NAME_DIGITAL(__LINE__, MISO) -// #endif +//#if _EXISTS(MISO) +// REPORT_NAME_DIGITAL(__LINE__, MISO) +//#endif #if PIN_EXISTS(MISO) REPORT_NAME_DIGITAL(__LINE__, SD_MISO_PIN) #endif @@ -716,15 +920,21 @@ #if PIN_EXISTS(MOSFET_D) REPORT_NAME_DIGITAL(__LINE__, MOSFET_D_PIN) #endif -// #if defined(MOSI) && MOSI >= 0 -// REPORT_NAME_DIGITAL(__LINE__, MOSI) -// #endif +//#if _EXISTS(MOSI) +// REPORT_NAME_DIGITAL(__LINE__, MOSI) +//#endif #if PIN_EXISTS(MOSI) REPORT_NAME_DIGITAL(__LINE__, SD_MOSI_PIN) #endif #if PIN_EXISTS(MOTOR_CURRENT_PWM_E) REPORT_NAME_DIGITAL(__LINE__, MOTOR_CURRENT_PWM_E_PIN) #endif +#if PIN_EXISTS(MOTOR_CURRENT_PWM_E0) + REPORT_NAME_DIGITAL(__LINE__, MOTOR_CURRENT_PWM_E0_PIN) +#endif +#if PIN_EXISTS(MOTOR_CURRENT_PWM_E1) + REPORT_NAME_DIGITAL(__LINE__, MOTOR_CURRENT_PWM_E1_PIN) +#endif #if PIN_EXISTS(MOTOR_CURRENT_PWM_X) REPORT_NAME_DIGITAL(__LINE__, MOTOR_CURRENT_PWM_X_PIN) #endif @@ -761,7 +971,7 @@ #if PIN_EXISTS(PWM_2) REPORT_NAME_DIGITAL(__LINE__, PWM_2_PIN) #endif -#if defined(REF_CLK) && REF_CLK >= 0 +#if _EXISTS(REF_CLK) REPORT_NAME_DIGITAL(__LINE__, REF_CLK) #endif #if PIN_EXISTS(RAMPS_D10) @@ -797,28 +1007,28 @@ #if PIN_EXISTS(SAFETY_TRIGGERED) REPORT_NAME_DIGITAL(__LINE__, SAFETY_TRIGGERED_PIN) #endif -// #if defined(SCK) && SCK >= 0 -// REPORT_NAME_DIGITAL(__LINE__, SCK) -// #endif +//#if _EXISTS(SCK) +// REPORT_NAME_DIGITAL(__LINE__, SCK) +//#endif #if PIN_EXISTS(SCK) REPORT_NAME_DIGITAL(__LINE__, SD_SCK_PIN) #endif -// #if defined(SCL) && SCL >= 0 -// REPORT_NAME_DIGITAL(__LINE__, SCL) -// #endif +//#if _EXISTS(SCL) +// REPORT_NAME_DIGITAL(__LINE__, SCL) +//#endif #if PIN_EXISTS(SD_DETECT) REPORT_NAME_DIGITAL(__LINE__, SD_DETECT_PIN) #endif -// #if defined(SDA) && SDA >= 0 -// REPORT_NAME_DIGITAL(__LINE__, SDA) -// #endif +//#if _EXISTS(SDA) +// REPORT_NAME_DIGITAL(__LINE__, SDA) +//#endif #if PIN_EXISTS(SDPOWER) REPORT_NAME_DIGITAL(__LINE__, SDPOWER_PIN) #endif -#if defined(SDSS) && SDSS >= 0 +#if _EXISTS(SDSS) REPORT_NAME_DIGITAL(__LINE__, SDSS) #endif -#if defined(SERVO0) && SERVO0 >= 0 +#if _EXISTS(SERVO0) REPORT_NAME_DIGITAL(__LINE__, SERVO0) #endif #if PIN_EXISTS(SERVO0) @@ -875,17 +1085,17 @@ #if PIN_EXISTS(SOL7) REPORT_NAME_DIGITAL(__LINE__, SOL7_PIN) #endif -#if defined(SPARE_IO) && SPARE_IO >= 0 +#if _EXISTS(SPARE_IO) REPORT_NAME_DIGITAL(__LINE__, SPARE_IO) #endif -#if defined(SPI_EEPROM1_CS) && SPI_EEPROM1_CS >= 0 - REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM1_CS) +#if PIN_EXISTS(SPI_EEPROM1_CS) + REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM1_CS_PIN) #endif -#if defined(SPI_EEPROM2_CS) && SPI_EEPROM2_CS >= 0 - REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM2_CS) +#if PIN_EXISTS(SPI_EEPROM2_CS) + REPORT_NAME_DIGITAL(__LINE__, SPI_EEPROM2_CS_PIN) #endif -#if defined(SPI_FLASH_CS) && SPI_FLASH_CS >= 0 - REPORT_NAME_DIGITAL(__LINE__, SPI_FLASH_CS) +#if PIN_EXISTS(SPI_FLASH_CS) + REPORT_NAME_DIGITAL(__LINE__, SPI_FLASH_CS_PIN) #endif #if PIN_EXISTS(SPINDLE_DIR) REPORT_NAME_DIGITAL(__LINE__, SPINDLE_DIR_PIN) @@ -914,7 +1124,7 @@ #if PIN_EXISTS(STAT_LED_BLUE) REPORT_NAME_DIGITAL(__LINE__, STAT_LED_BLUE_PIN) #endif -#if defined(STAT_LED_RED_LED) && STAT_LED_RED_LED >= 0 +#if _EXISTS(STAT_LED_RED_LED) REPORT_NAME_DIGITAL(__LINE__, STAT_LED_RED_LED) #endif #if PIN_EXISTS(STAT_LED_RED) @@ -926,18 +1136,6 @@ #if PIN_EXISTS(SUICIDE) REPORT_NAME_DIGITAL(__LINE__, SUICIDE_PIN) #endif -#if PIN_EXISTS(THERMO_CS1) - REPORT_NAME_DIGITAL(__LINE__, THERMO_CS1_PIN) -#endif -#if PIN_EXISTS(THERMO_CS2) - REPORT_NAME_DIGITAL(__LINE__, THERMO_CS2_PIN) -#endif -#if PIN_EXISTS(THERMO_DO) - REPORT_NAME_DIGITAL(__LINE__, THERMO_DO_PIN) -#endif -#if PIN_EXISTS(THERMO_SCK) - REPORT_NAME_DIGITAL(__LINE__, THERMO_SCK_PIN) -#endif #if PIN_EXISTS(TLC_BLANK) REPORT_NAME_DIGITAL(__LINE__, TLC_BLANK_PIN) #endif @@ -980,13 +1178,13 @@ #if PIN_EXISTS(TX_ENABLE) REPORT_NAME_DIGITAL(__LINE__, TX_ENABLE_PIN) #endif -#if defined(UI1) && UI1 >= 0 +#if _EXISTS(UI1) REPORT_NAME_DIGITAL(__LINE__, UI1) #endif -#if defined(UI2) && UI2 >= 0 +#if _EXISTS(UI2) REPORT_NAME_DIGITAL(__LINE__, UI2) #endif -#if defined(UNUSED_PWM) && UNUSED_PWM >= 0 +#if _EXISTS(UNUSED_PWM) REPORT_NAME_DIGITAL(__LINE__, UNUSED_PWM) #endif #if PIN_EXISTS(X_ATT) @@ -1022,6 +1220,9 @@ #if PIN_EXISTS(X_STEP) REPORT_NAME_DIGITAL(__LINE__, X_STEP_PIN) #endif +#if PIN_EXISTS(X_STDBY) + REPORT_NAME_DIGITAL(__LINE__, X_STDBY_PIN) +#endif #if PIN_EXISTS(X_STOP) REPORT_NAME_DIGITAL(__LINE__, X_STOP_PIN) #endif @@ -1085,6 +1286,9 @@ #if PIN_EXISTS(Y_STEP) REPORT_NAME_DIGITAL(__LINE__, Y_STEP_PIN) #endif +#if PIN_EXISTS(Y_STDBY) + REPORT_NAME_DIGITAL(__LINE__, Y_STDBY_PIN) +#endif #if PIN_EXISTS(Y_STOP) REPORT_NAME_DIGITAL(__LINE__, Y_STOP_PIN) #endif @@ -1148,6 +1352,9 @@ #if PIN_EXISTS(Z_STEP) REPORT_NAME_DIGITAL(__LINE__, Z_STEP_PIN) #endif +#if PIN_EXISTS(Z_STDBY) + REPORT_NAME_DIGITAL(__LINE__, Z_STDBY_PIN) +#endif #if PIN_EXISTS(Z_STOP) REPORT_NAME_DIGITAL(__LINE__, Z_STOP_PIN) #endif @@ -1166,6 +1373,9 @@ #if PIN_EXISTS(Z2_MIN) REPORT_NAME_DIGITAL(__LINE__, Z2_MIN_PIN) #endif +#if PIN_EXISTS(Z2_DIAG) + REPORT_NAME_DIGITAL(__LINE__, Z2_DIAG_PIN) +#endif #if PIN_EXISTS(Z2_MS1) REPORT_NAME_DIGITAL(__LINE__, Z2_MS1_PIN) #endif @@ -1178,6 +1388,9 @@ #if PIN_EXISTS(Z2_STEP) REPORT_NAME_DIGITAL(__LINE__, Z2_STEP_PIN) #endif +#if PIN_EXISTS(Z2_STOP) + REPORT_NAME_DIGITAL(__LINE__, Z2_STOP_PIN) +#endif #if PIN_EXISTS(Z3_CS) REPORT_NAME_DIGITAL(__LINE__, Z3_CS_PIN) #endif @@ -1235,6 +1448,105 @@ #if PIN_EXISTS(Z_MIN_PROBE) REPORT_NAME_DIGITAL(__LINE__, Z_MIN_PROBE_PIN) #endif +#if PIN_EXISTS(I_ATT) + REPORT_NAME_DIGITAL(__LINE__, I_ATT_PIN) +#endif +#if PIN_EXISTS(I_CS) + REPORT_NAME_DIGITAL(__LINE__, I_CS_PIN) +#endif +#if PIN_EXISTS(I_DIR) + REPORT_NAME_DIGITAL(__LINE__, I_DIR_PIN) +#endif +#if PIN_EXISTS(I_ENABLE) + REPORT_NAME_DIGITAL(__LINE__, I_ENABLE_PIN) +#endif +#if PIN_EXISTS(I_MAX) + REPORT_NAME_DIGITAL(__LINE__, I_MAX_PIN) +#endif +#if PIN_EXISTS(I_MIN) + REPORT_NAME_DIGITAL(__LINE__, I_MIN_PIN) +#endif +#if PIN_EXISTS(I_MS1) + REPORT_NAME_DIGITAL(__LINE__, I_MS1_PIN) +#endif +#if PIN_EXISTS(I_MS2) + REPORT_NAME_DIGITAL(__LINE__, I_MS2_PIN) +#endif +#if PIN_EXISTS(I_MS3) + REPORT_NAME_DIGITAL(__LINE__, I_MS3_PIN) +#endif +#if PIN_EXISTS(I_STEP) + REPORT_NAME_DIGITAL(__LINE__, I_STEP_PIN) +#endif +#if PIN_EXISTS(I_STOP) + REPORT_NAME_DIGITAL(__LINE__, I_STOP_PIN) +#endif +#if PIN_EXISTS(J_ATT) + REPORT_NAME_DIGITAL(__LINE__, J_ATT_PIN) +#endif +#if PIN_EXISTS(J_CS) + REPORT_NAME_DIGITAL(__LINE__, J_CS_PIN) +#endif +#if PIN_EXISTS(J_DIR) + REPORT_NAME_DIGITAL(__LINE__, J_DIR_PIN) +#endif +#if PIN_EXISTS(J_ENABLE) + REPORT_NAME_DIGITAL(__LINE__, J_ENABLE_PIN) +#endif +#if PIN_EXISTS(J_MAX) + REPORT_NAME_DIGITAL(__LINE__, J_MAX_PIN) +#endif +#if PIN_EXISTS(J_MIN) + REPORT_NAME_DIGITAL(__LINE__, J_MIN_PIN) +#endif +#if PIN_EXISTS(J_MS1) + REPORT_NAME_DIGITAL(__LINE__, J_MS1_PIN) +#endif +#if PIN_EXISTS(J_MS2) + REPORT_NAME_DIGITAL(__LINE__, J_MS2_PIN) +#endif +#if PIN_EXISTS(J_MS3) + REPORT_NAME_DIGITAL(__LINE__, J_MS3_PIN) +#endif +#if PIN_EXISTS(J_STEP) + REPORT_NAME_DIGITAL(__LINE__, J_STEP_PIN) +#endif +#if PIN_EXISTS(J_STOP) + REPORT_NAME_DIGITAL(__LINE__, J_STOP_PIN) +#endif +#if PIN_EXISTS(K_ATT) + REPORT_NAME_DIGITAL(__LINE__, K_ATT_PIN) +#endif +#if PIN_EXISTS(K_CS) + REPORT_NAME_DIGITAL(__LINE__, K_CS_PIN) +#endif +#if PIN_EXISTS(K_DIR) + REPORT_NAME_DIGITAL(__LINE__, K_DIR_PIN) +#endif +#if PIN_EXISTS(K_ENABLE) + REPORT_NAME_DIGITAL(__LINE__, K_ENABLE_PIN) +#endif +#if PIN_EXISTS(K_MAX) + REPORT_NAME_DIGITAL(__LINE__, K_MAX_PIN) +#endif +#if PIN_EXISTS(K_MIN) + REPORT_NAME_DIGITAL(__LINE__, K_MIN_PIN) +#endif +#if PIN_EXISTS(K_MS1) + REPORT_NAME_DIGITAL(__LINE__, K_MS1_PIN) +#endif +#if PIN_EXISTS(K_MS2) + REPORT_NAME_DIGITAL(__LINE__, K_MS2_PIN) +#endif +#if PIN_EXISTS(K_MS3) + REPORT_NAME_DIGITAL(__LINE__, K_MS3_PIN) +#endif +#if PIN_EXISTS(K_STEP) + REPORT_NAME_DIGITAL(__LINE__, K_STEP_PIN) +#endif +#if PIN_EXISTS(K_STOP) + REPORT_NAME_DIGITAL(__LINE__, K_STOP_PIN) +#endif #if PIN_EXISTS(ZRIB_V20_D6) REPORT_NAME_DIGITAL(__LINE__, ZRIB_V20_D6_PIN) #endif @@ -1361,6 +1673,24 @@ #if PIN_EXISTS(E7_SERIAL_RX) REPORT_NAME_DIGITAL(__LINE__, E7_SERIAL_RX_PIN) #endif +#if PIN_EXISTS(I_SERIAL_TX) + REPORT_NAME_DIGITAL(__LINE__, I_SERIAL_TX_PIN) +#endif +#if PIN_EXISTS(I_SERIAL_RX) + REPORT_NAME_DIGITAL(__LINE__, I_SERIAL_RX_PIN) +#endif +#if PIN_EXISTS(J_SERIAL_TX) + REPORT_NAME_DIGITAL(__LINE__, J_SERIAL_TX_PIN) +#endif +#if PIN_EXISTS(J_SERIAL_RX) + REPORT_NAME_DIGITAL(__LINE__, J_SERIAL_RX_PIN) +#endif +#if PIN_EXISTS(K_SERIAL_TX) + REPORT_NAME_DIGITAL(__LINE__, K_SERIAL_TX_PIN) +#endif +#if PIN_EXISTS(K_SERIAL_RX) + REPORT_NAME_DIGITAL(__LINE__, K_SERIAL_RX_PIN) +#endif #if PIN_EXISTS(L6470_CHAIN_SCK) REPORT_NAME_DIGITAL(__LINE__, L6470_CHAIN_SCK_PIN) #endif diff --git a/Marlin/src/pins/pins_postprocess.h b/Marlin/src/pins/pins_postprocess.h index de70248d4d02..869541e3ba90 100644 --- a/Marlin/src/pins/pins_postprocess.h +++ b/Marlin/src/pins/pins_postprocess.h @@ -212,6 +212,15 @@ #if !AXIS_HAS_SPI(Z) #undef Z_CS_PIN #endif +#if !AXIS_HAS_SPI(I) + #undef I_CS_PIN +#endif +#if !AXIS_HAS_SPI(J) + #undef J_CS_PIN +#endif +#if !AXIS_HAS_SPI(K) + #undef K_CS_PIN +#endif #if E_STEPPERS && !AXIS_HAS_SPI(E0) #undef E0_CS_PIN #endif @@ -246,6 +255,15 @@ #ifndef Z_CS_PIN #define Z_CS_PIN -1 #endif +#ifndef I_CS_PIN + #define I_CS_PIN -1 +#endif +#ifndef J_CS_PIN + #define J_CS_PIN -1 +#endif +#ifndef K_CS_PIN + #define K_CS_PIN -1 +#endif #ifndef E0_CS_PIN #define E0_CS_PIN -1 #endif @@ -373,8 +391,8 @@ #ifndef SUICIDE_PIN #define SUICIDE_PIN -1 #endif -#ifndef SUICIDE_PIN_INVERTING - #define SUICIDE_PIN_INVERTING false +#ifndef SUICIDE_PIN_STATE + #define SUICIDE_PIN_STATE LOW #endif #ifndef NUM_SERVO_PLUGS @@ -385,7 +403,7 @@ // Assign endstop pins for boards with only 3 connectors // #ifdef X_STOP_PIN - #if X_HOME_DIR < 0 + #if X_HOME_TO_MIN #define X_MIN_PIN X_STOP_PIN #ifndef X_MAX_PIN #define X_MAX_PIN -1 @@ -396,86 +414,122 @@ #define X_MIN_PIN -1 #endif #endif -#elif X_HOME_DIR < 0 +#elif X_HOME_TO_MIN #define X_STOP_PIN X_MIN_PIN #else #define X_STOP_PIN X_MAX_PIN #endif -#ifdef Y_STOP_PIN - #if Y_HOME_DIR < 0 - #define Y_MIN_PIN Y_STOP_PIN - #ifndef Y_MAX_PIN - #define Y_MAX_PIN -1 +#if HAS_Y_AXIS + #ifdef Y_STOP_PIN + #if Y_HOME_TO_MIN + #define Y_MIN_PIN Y_STOP_PIN + #ifndef Y_MAX_PIN + #define Y_MAX_PIN -1 + #endif + #else + #define Y_MAX_PIN Y_STOP_PIN + #ifndef Y_MIN_PIN + #define Y_MIN_PIN -1 + #endif #endif + #elif Y_HOME_TO_MIN + #define Y_STOP_PIN Y_MIN_PIN #else - #define Y_MAX_PIN Y_STOP_PIN - #ifndef Y_MIN_PIN - #define Y_MIN_PIN -1 - #endif + #define Y_STOP_PIN Y_MAX_PIN #endif -#elif Y_HOME_DIR < 0 - #define Y_STOP_PIN Y_MIN_PIN -#else - #define Y_STOP_PIN Y_MAX_PIN #endif -#ifdef Z_STOP_PIN - #if Z_HOME_DIR < 0 - #define Z_MIN_PIN Z_STOP_PIN - #ifndef Z_MAX_PIN - #define Z_MAX_PIN -1 +#if HAS_Z_AXIS + #ifdef Z_STOP_PIN + #if Z_HOME_TO_MIN + #define Z_MIN_PIN Z_STOP_PIN + #ifndef Z_MAX_PIN + #define Z_MAX_PIN -1 + #endif + #else + #define Z_MAX_PIN Z_STOP_PIN + #ifndef Z_MIN_PIN + #define Z_MIN_PIN -1 + #endif #endif + #elif Z_HOME_TO_MIN + #define Z_STOP_PIN Z_MIN_PIN #else - #define Z_MAX_PIN Z_STOP_PIN - #ifndef Z_MIN_PIN - #define Z_MIN_PIN -1 - #endif + #define Z_STOP_PIN Z_MAX_PIN #endif -#elif Z_HOME_DIR < 0 - #define Z_STOP_PIN Z_MIN_PIN -#else - #define Z_STOP_PIN Z_MAX_PIN -#endif - -// -// Disable unused endstop / probe pins -// -#if !HAS_CUSTOM_PROBE_PIN - #undef Z_MIN_PROBE_PIN - #define Z_MIN_PROBE_PIN -1 -#endif - -#if DISABLED(USE_XMAX_PLUG) - #undef X_MAX_PIN - #define X_MAX_PIN -1 #endif -#if DISABLED(USE_YMAX_PLUG) - #undef Y_MAX_PIN - #define Y_MAX_PIN -1 -#endif - -#if DISABLED(USE_ZMAX_PLUG) - #undef Z_MAX_PIN - #define Z_MAX_PIN -1 -#endif - -#if DISABLED(USE_XMIN_PLUG) - #undef X_MIN_PIN - #define X_MIN_PIN -1 +#if LINEAR_AXES >= 4 + #ifdef I_STOP_PIN + #if I_HOME_TO_MIN + #define I_MIN_PIN I_STOP_PIN + #ifndef I_MAX_PIN + #define I_MAX_PIN -1 + #endif + #else + #define I_MAX_PIN I_STOP_PIN + #ifndef I_MIN_PIN + #define I_MIN_PIN -1 + #endif + #endif + #elif I_HOME_TO_MIN + #define I_STOP_PIN I_MIN_PIN + #else + #define I_STOP_PIN I_MAX_PIN + #endif +#else + #undef I_MIN_PIN + #undef I_MAX_PIN #endif -#if DISABLED(USE_YMIN_PLUG) - #undef Y_MIN_PIN - #define Y_MIN_PIN -1 +#if LINEAR_AXES >= 5 + #ifdef J_STOP_PIN + #if J_HOME_TO_MIN + #define J_MIN_PIN J_STOP_PIN + #ifndef J_MAX_PIN + #define J_MAX_PIN -1 + #endif + #else + #define J_MAX_PIN J_STOP_PIN + #ifndef J_MIN_PIN + #define J_MIN_PIN -1 + #endif + #endif + #elif J_HOME_TO_MIN + #define J_STOP_PIN J_MIN_PIN + #else + #define J_STOP_PIN J_MAX_PIN + #endif +#else + #undef J_MIN_PIN + #undef J_MAX_PIN #endif -#if DISABLED(USE_ZMIN_PLUG) - #undef Z_MIN_PIN - #define Z_MIN_PIN -1 +#if LINEAR_AXES >= 6 + #ifdef K_STOP_PIN + #if K_HOME_TO_MIN + #define K_MIN_PIN K_STOP_PIN + #ifndef K_MAX_PIN + #define K_MAX_PIN -1 + #endif + #else + #define K_MAX_PIN K_STOP_PIN + #ifndef K_MIN_PIN + #define K_MIN_PIN -1 + #endif + #endif + #elif K_HOME_TO_MIN + #define K_STOP_PIN K_MIN_PIN + #else + #define K_STOP_PIN K_MAX_PIN + #endif +#else + #undef K_MIN_PIN + #undef K_MAX_PIN #endif +// Filament Sensor first pin alias #if HAS_FILAMENT_SENSOR #define FIL_RUNOUT1_PIN FIL_RUNOUT_PIN #else @@ -512,10 +566,24 @@ #define __EPIN(p,q) E##p##_##q##_PIN #define _EPIN(p,q) __EPIN(p,q) #define DIAG_REMAPPED(p,q) (PIN_EXISTS(q) && _EPIN(p##_E_INDEX, DIAG) == q##_PIN) +#define _En_DIAG_(p) _E##p##_DIAG_ -// The X2 axis, if any, should be the next open extruder port -#define X2_E_INDEX E_STEPPERS +// The E0/E1 steppers are always used for Dual E +#if ENABLED(E_DUAL_STEPPER_DRIVERS) + #ifndef E1_STEP_PIN + #error "No E1 stepper available for E_DUAL_STEPPER_DRIVERS!" + #endif + #define X2_E_INDEX INCREMENT(E_STEPPERS) +#else + #define X2_E_INDEX E_STEPPERS +#endif +// The X2 axis, if any, should be the next open extruder port +#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) && !defined(X2_DIAG_PIN) && !defined(X2_STEP_PIN) && !PIN_EXISTS(X2_CS_PIN) + #define Y2_E_INDEX INCREMENT(X2_E_INDEX) +#else + #define Y2_E_INDEX X2_E_INDEX +#endif #if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS) #ifndef X2_STEP_PIN #define X2_STEP_PIN _EPIN(X2_E_INDEX, STEP) @@ -523,19 +591,33 @@ #define X2_ENABLE_PIN _EPIN(X2_E_INDEX, ENABLE) #if X2_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(X2_STEP) #error "No E stepper plug left for X2!" + #else + #define AUTO_ASSIGNED_X2_STEPPER 1 #endif #endif #ifndef X2_MS1_PIN #define X2_MS1_PIN _EPIN(X2_E_INDEX, MS1) + #if PIN_EXISTS(X2_MS1) + #define AUTO_ASSIGNED_X2_MS1 1 + #endif #endif #ifndef X2_MS2_PIN #define X2_MS2_PIN _EPIN(X2_E_INDEX, MS2) + #if PIN_EXISTS(X2_MS2) + #define AUTO_ASSIGNED_X2_MS2 1 + #endif #endif #ifndef X2_MS3_PIN #define X2_MS3_PIN _EPIN(X2_E_INDEX, MS3) + #if PIN_EXISTS(X2_MS3) + #define AUTO_ASSIGNED_X2_MS3 1 + #endif #endif #if AXIS_HAS_SPI(X2) && !defined(X2_CS_PIN) #define X2_CS_PIN _EPIN(X2_E_INDEX, CS) + #if PIN_EXISTS(X2_CS) + #define AUTO_ASSIGNED_X2_CS 1 + #endif #endif #if AXIS_HAS_UART(X2) #ifndef X2_SERIAL_TX_PIN @@ -549,7 +631,7 @@ // // Auto-assign pins for stallGuard sensorless homing // - #if defined(X2_STALL_SENSITIVITY) && ENABLED(X_DUAL_ENDSTOPS) && _PEXI(X2_E_INDEX, DIAG) + #if !defined(X2_DIAG_PIN) && !defined(X2_USE_ENDSTOP) && defined(X2_STALL_SENSITIVITY) && ENABLED(X_DUAL_ENDSTOPS) && _PEXI(X2_E_INDEX, DIAG) #define X2_DIAG_PIN _EPIN(X2_E_INDEX, DIAG) #if DIAG_REMAPPED(X2, X_MIN) // If already remapped in the pins file... #define X2_USE_ENDSTOP _XMIN_ @@ -563,16 +645,12 @@ #define X2_USE_ENDSTOP _YMAX_ #elif DIAG_REMAPPED(X2, Z_MAX) #define X2_USE_ENDSTOP _ZMAX_ - #else // Otherwise use the driver DIAG_PIN directly - #define _X2_USE_ENDSTOP(P) _E##P##_DIAG_ - #define X2_USE_ENDSTOP _X2_USE_ENDSTOP(X2_E_INDEX) + #else // Otherwise pick the next free En_DIAG_PIN directly + #define X2_USE_ENDSTOP _En_DIAG_(X2_E_INDEX) #endif - #undef X2_DIAG_PIN + #define AUTO_ASSIGNED_X2_DIAG 1 + #undef X2_DIAG_PIN // Defined in Conditionals_post.h based on X2_USE_ENDSTOP #endif - - #define Y2_E_INDEX INCREMENT(X2_E_INDEX) -#else - #define Y2_E_INDEX X2_E_INDEX #endif #ifndef X2_CS_PIN @@ -589,6 +667,11 @@ #endif // The Y2 axis, if any, should be the next open extruder port +#if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !defined(Y2_DIAG_PIN) && !defined(Y2_STEP_PIN) && !PIN_EXISTS(Y2_CS_PIN) + #define Z2_E_INDEX INCREMENT(Y2_E_INDEX) +#else + #define Z2_E_INDEX Y2_E_INDEX +#endif #if ENABLED(Y_DUAL_STEPPER_DRIVERS) #ifndef Y2_STEP_PIN #define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP) @@ -596,19 +679,33 @@ #define Y2_ENABLE_PIN _EPIN(Y2_E_INDEX, ENABLE) #if Y2_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(Y2_STEP) #error "No E stepper plug left for Y2!" + #else + #define AUTO_ASSIGNED_Y2_STEPPER 1 #endif #endif #ifndef Y2_MS1_PIN #define Y2_MS1_PIN _EPIN(Y2_E_INDEX, MS1) + #if PIN_EXISTS(Y2_MS1) + #define AUTO_ASSIGNED_Y2_MS1 1 + #endif #endif #ifndef Y2_MS2_PIN #define Y2_MS2_PIN _EPIN(Y2_E_INDEX, MS2) + #if PIN_EXISTS(Y2_MS2) + #define AUTO_ASSIGNED_Y2_MS2 1 + #endif #endif #ifndef Y2_MS3_PIN #define Y2_MS3_PIN _EPIN(Y2_E_INDEX, MS3) + #if PIN_EXISTS(Y2_MS3) + #define AUTO_ASSIGNED_Y2_MS3 1 + #endif #endif #if AXIS_HAS_SPI(Y2) && !defined(Y2_CS_PIN) #define Y2_CS_PIN _EPIN(Y2_E_INDEX, CS) + #if PIN_EXISTS(Y2_CS) + #define AUTO_ASSIGNED_Y2_CS 1 + #endif #endif #if AXIS_HAS_UART(Y2) #ifndef Y2_SERIAL_TX_PIN @@ -618,7 +715,8 @@ #define Y2_SERIAL_RX_PIN _EPIN(Y2_E_INDEX, SERIAL_RX) #endif #endif - #if defined(Y2_STALL_SENSITIVITY) && ENABLED(Y_DUAL_ENDSTOPS) && _PEXI(Y2_E_INDEX, DIAG) + // Auto-assign pins for stallGuard sensorless homing + #if !defined(Y2_DIAG_PIN) && !defined(Y2_USE_ENDSTOP) && defined(Y2_STALL_SENSITIVITY) && ENABLED(Y_DUAL_ENDSTOPS) && _PEXI(Y2_E_INDEX, DIAG) #define Y2_DIAG_PIN _EPIN(Y2_E_INDEX, DIAG) #if DIAG_REMAPPED(Y2, X_MIN) #define Y2_USE_ENDSTOP _XMIN_ @@ -633,14 +731,11 @@ #elif DIAG_REMAPPED(Y2, Z_MAX) #define Y2_USE_ENDSTOP _ZMAX_ #else - #define _Y2_USE_ENDSTOP(P) _E##P##_DIAG_ - #define Y2_USE_ENDSTOP _Y2_USE_ENDSTOP(Y2_E_INDEX) + #define Y2_USE_ENDSTOP _En_DIAG_(Y2_E_INDEX) #endif - #undef Y2_DIAG_PIN + #define AUTO_ASSIGNED_Y2_DIAG 1 + #undef Y2_DIAG_PIN // Defined in Conditionals_post.h based on Y2_USE_ENDSTOP #endif - #define Z2_E_INDEX INCREMENT(Y2_E_INDEX) -#else - #define Z2_E_INDEX Y2_E_INDEX #endif #ifndef Y2_CS_PIN @@ -657,6 +752,11 @@ #endif // The Z2 axis, if any, should be the next open extruder port +#if NUM_Z_STEPPER_DRIVERS >= 2 && !defined(Z2_DIAG_PIN) && !defined(Z2_STEP_PIN) && !PIN_EXISTS(Z2_CS_PIN) + #define Z3_E_INDEX INCREMENT(Z2_E_INDEX) +#else + #define Z3_E_INDEX Z2_E_INDEX +#endif #if NUM_Z_STEPPER_DRIVERS >= 2 #ifndef Z2_STEP_PIN #define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP) @@ -664,19 +764,33 @@ #define Z2_ENABLE_PIN _EPIN(Z2_E_INDEX, ENABLE) #if Z2_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(Z2_STEP) #error "No E stepper plug left for Z2!" + #else + #define AUTO_ASSIGNED_Z2_STEPPER 1 #endif #endif #ifndef Z2_MS1_PIN #define Z2_MS1_PIN _EPIN(Z2_E_INDEX, MS1) + #if PIN_EXISTS(Z2_MS1) + #define AUTO_ASSIGNED_Z2_MS1 1 + #endif #endif #ifndef Z2_MS2_PIN #define Z2_MS2_PIN _EPIN(Z2_E_INDEX, MS2) + #if PIN_EXISTS(Z2_MS2) + #define AUTO_ASSIGNED_Z2_MS2 1 + #endif #endif #ifndef Z2_MS3_PIN #define Z2_MS3_PIN _EPIN(Z2_E_INDEX, MS3) + #if PIN_EXISTS(Z2_MS3) + #define AUTO_ASSIGNED_Z2_MS3 1 + #endif #endif #if AXIS_HAS_SPI(Z2) && !defined(Z2_CS_PIN) #define Z2_CS_PIN _EPIN(Z2_E_INDEX, CS) + #if PIN_EXISTS(Z2_CS) + #define AUTO_ASSIGNED_Z2_CS 1 + #endif #endif #if AXIS_HAS_UART(Z2) #ifndef Z2_SERIAL_TX_PIN @@ -686,7 +800,8 @@ #define Z2_SERIAL_RX_PIN _EPIN(Z2_E_INDEX, SERIAL_RX) #endif #endif - #if defined(Z2_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 2 && _PEXI(Z2_E_INDEX, DIAG) + // Auto-assign pins for stallGuard sensorless homing + #if !defined(Z2_DIAG_PIN) && !defined(Z2_USE_ENDSTOP) && defined(Z2_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 2 && _PEXI(Z2_E_INDEX, DIAG) #define Z2_DIAG_PIN _EPIN(Z2_E_INDEX, DIAG) #if DIAG_REMAPPED(Z2, X_MIN) #define Z2_USE_ENDSTOP _XMIN_ @@ -701,14 +816,11 @@ #elif DIAG_REMAPPED(Z2, Z_MAX) #define Z2_USE_ENDSTOP _ZMAX_ #else - #define _Z2_USE_ENDSTOP(P) _E##P##_DIAG_ - #define Z2_USE_ENDSTOP _Z2_USE_ENDSTOP(Z2_E_INDEX) + #define Z2_USE_ENDSTOP _En_DIAG_(Z2_E_INDEX) #endif - #undef Z2_DIAG_PIN + #define AUTO_ASSIGNED_Z2_DIAG 1 + #undef Z2_DIAG_PIN // Defined in Conditionals_post.h based on Z2_USE_ENDSTOP #endif - #define Z3_E_INDEX INCREMENT(Z2_E_INDEX) -#else - #define Z3_E_INDEX Z2_E_INDEX #endif #ifndef Z2_CS_PIN @@ -724,6 +836,12 @@ #define Z2_MS3_PIN -1 #endif +// The Z3 axis, if any, should be the next open extruder port +#if NUM_Z_STEPPER_DRIVERS >= 3 && !defined(Z3_DIAG_PIN) && !defined(Z3_STEP_PIN) && !PIN_EXISTS(Z3_CS_PIN) + #define Z4_E_INDEX INCREMENT(Z3_E_INDEX) +#else + #define Z4_E_INDEX Z3_E_INDEX +#endif #if NUM_Z_STEPPER_DRIVERS >= 3 #ifndef Z3_STEP_PIN #define Z3_STEP_PIN _EPIN(Z3_E_INDEX, STEP) @@ -731,21 +849,33 @@ #define Z3_ENABLE_PIN _EPIN(Z3_E_INDEX, ENABLE) #if Z3_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(Z3_STEP) #error "No E stepper plug left for Z3!" + #else + #define AUTO_ASSIGNED_Z3_STEPPER 1 #endif #endif - #if AXIS_HAS_SPI(Z3) - #ifndef Z3_CS_PIN - #define Z3_CS_PIN _EPIN(Z3_E_INDEX, CS) + #if AXIS_HAS_SPI(Z3) && !defined(Z3_CS_PIN) + #define Z3_CS_PIN _EPIN(Z3_E_INDEX, CS) + #if PIN_EXISTS(Z3_CS) + #define AUTO_ASSIGNED_Z3_CS 1 #endif #endif #ifndef Z3_MS1_PIN #define Z3_MS1_PIN _EPIN(Z3_E_INDEX, MS1) + #if PIN_EXISTS(Z3_MS1) + #define AUTO_ASSIGNED_Z3_MS1 1 + #endif #endif #ifndef Z3_MS2_PIN #define Z3_MS2_PIN _EPIN(Z3_E_INDEX, MS2) + #if PIN_EXISTS(Z3_MS2) + #define AUTO_ASSIGNED_Z3_MS2 1 + #endif #endif #ifndef Z3_MS3_PIN #define Z3_MS3_PIN _EPIN(Z3_E_INDEX, MS3) + #if PIN_EXISTS(Z3_MS3) + #define AUTO_ASSIGNED_Z3_MS3 1 + #endif #endif #if AXIS_HAS_UART(Z3) #ifndef Z3_SERIAL_TX_PIN @@ -755,7 +885,8 @@ #define Z3_SERIAL_RX_PIN _EPIN(Z3_E_INDEX, SERIAL_RX) #endif #endif - #if defined(Z3_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && _PEXI(Z3_E_INDEX, DIAG) + // Auto-assign pins for stallGuard sensorless homing + #if !defined(Z3_DIAG_PIN) && !defined(Z3_USE_ENDSTOP) && defined(Z3_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && _PEXI(Z3_E_INDEX, DIAG) #define Z3_DIAG_PIN _EPIN(Z3_E_INDEX, DIAG) #if DIAG_REMAPPED(Z3, X_MIN) #define Z3_USE_ENDSTOP _XMIN_ @@ -770,12 +901,11 @@ #elif DIAG_REMAPPED(Z3, Z_MAX) #define Z3_USE_ENDSTOP _ZMAX_ #else - #define _Z3_USE_ENDSTOP(P) _E##P##_DIAG_ - #define Z3_USE_ENDSTOP _Z3_USE_ENDSTOP(Z3_E_INDEX) + #define Z3_USE_ENDSTOP _En_DIAG_(Z3_E_INDEX) #endif - #undef Z3_DIAG_PIN + #define AUTO_ASSIGNED_Z3_DIAG 1 + #undef Z3_DIAG_PIN // Defined in Conditionals_post.h based on Z3_USE_ENDSTOP #endif - #define Z4_E_INDEX INCREMENT(Z3_E_INDEX) #endif #ifndef Z3_CS_PIN @@ -791,6 +921,12 @@ #define Z3_MS3_PIN -1 #endif +// The Z4 axis, if any, should be the next open extruder port +#if NUM_Z_STEPPER_DRIVERS >= 4 && !defined(Z4_DIAG_PIN) && !defined(Z4_STEP_PIN) && !PIN_EXISTS(Z4_CS_PIN) + #define I_E_INDEX INCREMENT(Z4_E_INDEX) +#else + #define I_E_INDEX Z4_E_INDEX +#endif #if NUM_Z_STEPPER_DRIVERS >= 4 #ifndef Z4_STEP_PIN #define Z4_STEP_PIN _EPIN(Z4_E_INDEX, STEP) @@ -798,21 +934,33 @@ #define Z4_ENABLE_PIN _EPIN(Z4_E_INDEX, ENABLE) #if Z4_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(Z4_STEP) #error "No E stepper plug left for Z4!" + #else + #define AUTO_ASSIGNED_Z4_STEPPER 1 #endif #endif - #if AXIS_HAS_SPI(Z4) - #ifndef Z4_CS_PIN - #define Z4_CS_PIN _EPIN(Z4_E_INDEX, CS) + #if AXIS_HAS_SPI(Z4) && !defined(Z4_CS_PIN) + #define Z4_CS_PIN _EPIN(Z4_E_INDEX, CS) + #if PIN_EXISTS(Z4_CS) + #define AUTO_ASSIGNED_Z4_CS 1 #endif #endif #ifndef Z4_MS1_PIN #define Z4_MS1_PIN _EPIN(Z4_E_INDEX, MS1) + #if PIN_EXISTS(Z4_MS1) + #define AUTO_ASSIGNED_Z4_MS1 1 + #endif #endif #ifndef Z4_MS2_PIN #define Z4_MS2_PIN _EPIN(Z4_E_INDEX, MS2) + #if PIN_EXISTS(Z4_MS2) + #define AUTO_ASSIGNED_Z4_MS2 1 + #endif #endif #ifndef Z4_MS3_PIN #define Z4_MS3_PIN _EPIN(Z4_E_INDEX, MS3) + #if PIN_EXISTS(Z4_MS3) + #define AUTO_ASSIGNED_Z4_MS3 1 + #endif #endif #if AXIS_HAS_UART(Z4) #ifndef Z4_SERIAL_TX_PIN @@ -822,7 +970,8 @@ #define Z4_SERIAL_RX_PIN _EPIN(Z4_E_INDEX, SERIAL_RX) #endif #endif - #if defined(Z4_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && _PEXI(Z4_E_INDEX, DIAG) + // Auto-assign pins for stallGuard sensorless homing + #if !defined(Z4_DIAG_PIN) && !defined(Z4_USE_ENDSTOP) && defined(Z4_STALL_SENSITIVITY) && ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && _PEXI(Z4_E_INDEX, DIAG) #define Z4_DIAG_PIN _EPIN(Z4_E_INDEX, DIAG) #if DIAG_REMAPPED(Z4, X_MIN) #define Z4_USE_ENDSTOP _XMIN_ @@ -837,10 +986,10 @@ #elif DIAG_REMAPPED(Z4, Z_MAX) #define Z4_USE_ENDSTOP _ZMAX_ #else - #define _Z4_USE_ENDSTOP(P) _E##P##_DIAG_ - #define Z4_USE_ENDSTOP _Z4_USE_ENDSTOP(Z4_E_INDEX) + #define Z4_USE_ENDSTOP _En_DIAG_(Z4_E_INDEX) #endif - #undef Z4_DIAG_PIN + #define AUTO_ASSIGNED_Z4_DIAG 1 + #undef Z4_DIAG_PIN // Defined in Conditionals_post.h based on Z4_USE_ENDSTOP #endif #endif @@ -857,23 +1006,383 @@ #define Z4_MS3_PIN -1 #endif -#if HAS_MARLINUI_U8GLIB - #if !defined(ST7920_DELAY_1) && defined(BOARD_ST7920_DELAY_1) - #define ST7920_DELAY_1 BOARD_ST7920_DELAY_1 +// The I axis, if any, should be the next open extruder port +#if LINEAR_AXES >= 4 && !defined(I_DIAG_PIN) && !defined(I_STEP_PIN) && !PIN_EXISTS(I_CS_PIN) + #define J_E_INDEX INCREMENT(I_E_INDEX) +#else + #define J_E_INDEX I_E_INDEX +#endif +#if LINEAR_AXES >= 4 + #ifndef I_STEP_PIN + #define I_STEP_PIN _EPIN(I_E_INDEX, STEP) + #define I_DIR_PIN _EPIN(I_E_INDEX, DIR) + #define I_ENABLE_PIN _EPIN(I_E_INDEX, ENABLE) + #if I_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(I_STEP) + #error "No E stepper plug left for I!" + #else + #define AUTO_ASSIGNED_I_STEPPER 1 + #endif #endif - #if !defined(ST7920_DELAY_2) && defined(BOARD_ST7920_DELAY_2) - #define ST7920_DELAY_2 BOARD_ST7920_DELAY_2 + #if AXIS_HAS_SPI(I) && !defined(I_CS_PIN) + #define I_CS_PIN _EPIN(I_E_INDEX, CS) + #if PIN_EXISTS(I_CS) + #define AUTO_ASSIGNED_I_CS 1 + #endif #endif - #if !defined(ST7920_DELAY_3) && defined(BOARD_ST7920_DELAY_3) - #define ST7920_DELAY_3 BOARD_ST7920_DELAY_3 + #ifndef I_MS1_PIN + #define I_MS1_PIN _EPIN(I_E_INDEX, MS1) + #if PIN_EXISTS(I_MS1) + #define AUTO_ASSIGNED_I_MS1 1 + #endif + #endif + #ifndef I_MS2_PIN + #define I_MS2_PIN _EPIN(I_E_INDEX, MS2) + #if PIN_EXISTS(I_MS2) + #define AUTO_ASSIGNED_I_MS2 1 + #endif #endif + #ifndef I_MS3_PIN + #define I_MS3_PIN _EPIN(I_E_INDEX, MS3) + #if PIN_EXISTS(I_MS3) + #define AUTO_ASSIGNED_I_MS3 1 + #endif + #endif + #if AXIS_HAS_UART(I) + #ifndef I_SERIAL_TX_PIN + #define I_SERIAL_TX_PIN _EPIN(I_E_INDEX, SERIAL_TX) + #endif + #ifndef I_SERIAL_RX_PIN + #define I_SERIAL_RX_PIN _EPIN(I_E_INDEX, SERIAL_RX) + #endif + #endif + // Auto-assign pins for stallGuard sensorless homing + #if !defined(I_DIAG_PIN) && !defined(I_USE_ENDSTOP) && defined(I_STALL_SENSITIVITY) && _PEXI(I_E_INDEX, DIAG) + #define I_DIAG_PIN _EPIN(I_E_INDEX, DIAG) + #if DIAG_REMAPPED(I, X_MIN) + #define I_USE_ENDSTOP _XMIN_ + #elif DIAG_REMAPPED(I, Y_MIN) + #define I_USE_ENDSTOP _YMIN_ + #elif DIAG_REMAPPED(I, Z_MIN) + #define I_USE_ENDSTOP _ZMIN_ + #elif DIAG_REMAPPED(I, X_MAX) + #define I_USE_ENDSTOP _XMAX_ + #elif DIAG_REMAPPED(I, Y_MAX) + #define I_USE_ENDSTOP _YMAX_ + #elif DIAG_REMAPPED(I, Z_MAX) + #define I_USE_ENDSTOP _ZMAX_ + #else + #define I_USE_ENDSTOP _En_DIAG_(I_E_INDEX) + #endif + #define AUTO_ASSIGNED_I_DIAG 1 + #undef I_DIAG_PIN // Defined in Conditionals_post.h based on I_USE_ENDSTOP + #endif +#endif + +#ifndef I_CS_PIN + #define I_CS_PIN -1 +#endif +#ifndef I_MS1_PIN + #define I_MS1_PIN -1 +#endif +#ifndef I_MS2_PIN + #define I_MS2_PIN -1 +#endif +#ifndef I_MS3_PIN + #define I_MS3_PIN -1 +#endif + +// The J axis, if any, should be the next open extruder port +#if LINEAR_AXES >= 5 && !defined(J_DIAG_PIN) && !defined(J_STEP_PIN) && !PIN_EXISTS(J_CS_PIN) + #define K_E_INDEX INCREMENT(J_E_INDEX) #else + #define K_E_INDEX J_E_INDEX +#endif +#if LINEAR_AXES >= 5 + #ifndef J_STEP_PIN + #define J_STEP_PIN _EPIN(J_E_INDEX, STEP) + #define J_DIR_PIN _EPIN(J_E_INDEX, DIR) + #define J_ENABLE_PIN _EPIN(J_E_INDEX, ENABLE) + #if I_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(J_STEP) + #error "No E stepper plug left for J!" + #else + #define AUTO_ASSIGNED_J_STEPPER 1 + #endif + #endif + #if AXIS_HAS_SPI(J) && !defined(J_CS_PIN) + #define J_CS_PIN _EPIN(J_E_INDEX, CS) + #if PIN_EXISTS(J_CS) + #define AUTO_ASSIGNED_J_CS 1 + #endif + #endif + #ifndef J_MS1_PIN + #define J_MS1_PIN _EPIN(J_E_INDEX, MS1) + #if PIN_EXISTS(J_MS1) + #define AUTO_ASSIGNED_J_MS1 1 + #endif + #endif + #ifndef J_MS2_PIN + #define J_MS2_PIN _EPIN(J_E_INDEX, MS2) + #if PIN_EXISTS(J_MS2) + #define AUTO_ASSIGNED_J_MS2 1 + #endif + #endif + #ifndef J_MS3_PIN + #define J_MS3_PIN _EPIN(J_E_INDEX, MS3) + #if PIN_EXISTS(J_MS3) + #define AUTO_ASSIGNED_J_MS3 1 + #endif + #endif + #if AXIS_HAS_UART(J) + #ifndef J_SERIAL_TX_PIN + #define J_SERIAL_TX_PIN _EPIN(J_E_INDEX, SERIAL_TX) + #endif + #ifndef J_SERIAL_RX_PIN + #define J_SERIAL_RX_PIN _EPIN(J_E_INDEX, SERIAL_RX) + #endif + #endif + // Auto-assign pins for stallGuard sensorless homing + #if !defined(J_DIAG_PIN) && !defined(J_USE_ENDSTOP) && defined(J_STALL_SENSITIVITY) && _PEXI(J_E_INDEX, DIAG) + #define J_DIAG_PIN _EPIN(J_E_INDEX, DIAG) + #if DIAG_REMAPPED(J, X_MIN) + #define J_USE_ENDSTOP _XMIN_ + #elif DIAG_REMAPPED(J, Y_MIN) + #define J_USE_ENDSTOP _YMIN_ + #elif DIAG_REMAPPED(J, Z_MIN) + #define J_USE_ENDSTOP _ZMIN_ + #elif DIAG_REMAPPED(J, X_MAX) + #define J_USE_ENDSTOP _XMAX_ + #elif DIAG_REMAPPED(J, Y_MAX) + #define J_USE_ENDSTOP _YMAX_ + #elif DIAG_REMAPPED(I, Z_MAX) + #define J_USE_ENDSTOP _ZMAX_ + #else + #define J_USE_ENDSTOP _En_DIAG_(J_E_INDEX) + #endif + #define AUTO_ASSIGNED_J_DIAG 1 + #undef J_DIAG_PIN // Defined in Conditionals_post.h based on J_USE_ENDSTOP + #endif +#endif + +#ifndef J_CS_PIN + #define J_CS_PIN -1 +#endif +#ifndef J_MS1_PIN + #define J_MS1_PIN -1 +#endif +#ifndef J_MS2_PIN + #define J_MS2_PIN -1 +#endif +#ifndef J_MS3_PIN + #define J_MS3_PIN -1 +#endif + +// The K axis, if any, should be the next open extruder port +#if LINEAR_AXES >= 6 + #ifndef K_STEP_PIN + #define K_STEP_PIN _EPIN(K_E_INDEX, STEP) + #define K_DIR_PIN _EPIN(K_E_INDEX, DIR) + #define K_ENABLE_PIN _EPIN(K_E_INDEX, ENABLE) + #if K_E_INDEX >= MAX_E_STEPPERS || !PIN_EXISTS(K_STEP) + #error "No E stepper plug left for K!" + #else + #define AUTO_ASSIGNED_K_STEPPER 1 + #endif + #endif + #if AXIS_HAS_SPI(K) && !defined(K_CS_PIN) + #define K_CS_PIN _EPIN(K_E_INDEX, CS) + #if PIN_EXISTS(K_CS) + #define AUTO_ASSIGNED_K_CS 1 + #endif + #endif + #ifndef K_MS1_PIN + #define K_MS1_PIN _EPIN(K_E_INDEX, MS1) + #if PIN_EXISTS(K_MS1) + #define AUTO_ASSIGNED_K_MS1 1 + #endif + #endif + #ifndef K_MS2_PIN + #define K_MS2_PIN _EPIN(K_E_INDEX, MS2) + #if PIN_EXISTS(K_MS2) + #define AUTO_ASSIGNED_K_MS2 1 + #endif + #endif + #ifndef K_MS3_PIN + #define K_MS3_PIN _EPIN(K_E_INDEX, MS3) + #if PIN_EXISTS(K_MS3) + #define AUTO_ASSIGNED_K_MS3 1 + #endif + #endif + #if AXIS_HAS_UART(K) + #ifndef K_SERIAL_TX_PIN + #define K_SERIAL_TX_PIN _EPIN(K_E_INDEX, SERIAL_TX) + #endif + #ifndef K_SERIAL_RX_PIN + #define K_SERIAL_RX_PIN _EPIN(K_E_INDEX, SERIAL_RX) + #endif + #endif + // Auto-assign pins for stallGuard sensorless homing + #if !defined(K_DIAG_PIN) && !defined(K_USE_ENDSTOP) && defined(K_STALL_SENSITIVITY) && _PEXI(K_E_INDEX, DIAG) + #define K_DIAG_PIN _EPIN(K_E_INDEX, DIAG) + #if DIAG_REMAPPED(K, X_MIN) + #define K_USE_ENDSTOP _XMIN_ + #elif DIAG_REMAPPED(K, Y_MIN) + #define K_USE_ENDSTOP _YMIN_ + #elif DIAG_REMAPPED(K, Z_MIN) + #define K_USE_ENDSTOP _ZMIN_ + #elif DIAG_REMAPPED(K, X_MAX) + #define K_USE_ENDSTOP _XMAX_ + #elif DIAG_REMAPPED(K, Y_MAX) + #define K_USE_ENDSTOP _YMAX_ + #elif DIAG_REMAPPED(K, Z_MAX) + #define K_USE_ENDSTOP _ZMAX_ + #else + #define K_USE_ENDSTOP _En_DIAG_(K_E_INDEX) + #endif + #define AUTO_ASSIGNED_K_DIAG 1 + #undef K_DIAG_PIN // Defined in Conditionals_post.h based on K_USE_ENDSTOP + #endif +#endif + +#ifndef K_CS_PIN + #define K_CS_PIN -1 +#endif +#ifndef K_MS1_PIN + #define K_MS1_PIN -1 +#endif +#ifndef K_MS2_PIN + #define K_MS2_PIN -1 +#endif +#ifndef K_MS3_PIN + #define K_MS3_PIN -1 +#endif + +// +// Disable unused endstop / probe pins +// +#define _STOP_IN_USE(N) (X2_USE_ENDSTOP == N || Y2_USE_ENDSTOP == N || Z2_USE_ENDSTOP == N || Z3_USE_ENDSTOP == N || Z4_USE_ENDSTOP == N) +#if !defined(USE_XMAX_PLUG) && _STOP_IN_USE(_XMAX_) + #define USE_XMAX_PLUG +#endif +#if !defined(USE_YMAX_PLUG) && _STOP_IN_USE(_YMAX_) + #define USE_YMAX_PLUG +#endif +#if !defined(USE_ZMAX_PLUG) && _STOP_IN_USE(_ZMAX_) + #define USE_ZMAX_PLUG +#endif +#if !defined(USE_XMIN_PLUG) && _STOP_IN_USE(_XMIN_) + #define USE_XMIN_PLUG +#endif +#if !defined(USE_YMIN_PLUG) && _STOP_IN_USE(_YMIN_) + #define USE_YMIN_PLUG +#endif +#if !defined(USE_ZMIN_PLUG) && _STOP_IN_USE(_ZMIN_) + #define USE_ZMIN_PLUG +#endif +#undef _STOP_IN_USE +#if !USES_Z_MIN_PROBE_PIN + #undef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN -1 +#endif +#if DISABLED(USE_XMIN_PLUG) + #undef X_MIN_PIN + #define X_MIN_PIN -1 +#endif +#if DISABLED(USE_XMAX_PLUG) + #undef X_MAX_PIN + #define X_MAX_PIN -1 +#endif +#if DISABLED(USE_YMIN_PLUG) + #undef Y_MIN_PIN + #define Y_MIN_PIN -1 +#endif +#if DISABLED(USE_YMAX_PLUG) + #undef Y_MAX_PIN + #define Y_MAX_PIN -1 +#endif +#if DISABLED(USE_ZMIN_PLUG) + #undef Z_MIN_PIN + #define Z_MIN_PIN -1 +#endif +#if DISABLED(USE_ZMAX_PLUG) + #undef Z_MAX_PIN + #define Z_MAX_PIN -1 +#endif +#if DISABLED(USE_IMIN_PLUG) + #undef I_MIN_PIN + #define I_MIN_PIN -1 +#endif +#if DISABLED(USE_IMAX_PLUG) + #undef I_MAX_PIN + #define I_MAX_PIN -1 +#endif +#if DISABLED(USE_JMIN_PLUG) + #undef J_MIN_PIN + #define J_MIN_PIN -1 +#endif +#if DISABLED(USE_JMAX_PLUG) + #undef J_MAX_PIN + #define J_MAX_PIN -1 +#endif +#if DISABLED(USE_KMIN_PLUG) + #undef K_MIN_PIN + #define K_MIN_PIN -1 +#endif +#if DISABLED(USE_KMAX_PLUG) + #undef K_MAX_PIN + #define K_MAX_PIN -1 +#endif + +#if DISABLED(X_DUAL_ENDSTOPS) || X_HOME_TO_MAX + #undef X2_MIN_PIN +#endif +#if DISABLED(X_DUAL_ENDSTOPS) || X_HOME_TO_MIN + #undef X2_MAX_PIN +#endif +#if DISABLED(Y_DUAL_ENDSTOPS) || Y_HOME_TO_MAX + #undef Y2_MIN_PIN +#endif +#if DISABLED(Y_DUAL_ENDSTOPS) || Y_HOME_TO_MIN + #undef Y2_MAX_PIN +#endif +#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MAX + #undef Z2_MIN_PIN +#endif +#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MIN + #undef Z2_MAX_PIN +#endif +#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_TO_MAX + #undef Z3_MIN_PIN +#endif +#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_TO_MIN + #undef Z3_MAX_PIN +#endif +#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_TO_MAX + #undef Z4_MIN_PIN +#endif +#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_TO_MIN + #undef Z4_MAX_PIN +#endif + +// +// Default DOGLCD SPI delays +// +#if DISABLED(U8GLIB_ST7920) #undef ST7920_DELAY_1 #undef ST7920_DELAY_2 #undef ST7920_DELAY_3 + #undef LCD_ST7920_DELAY_1 + #undef LCD_ST7920_DELAY_2 + #undef LCD_ST7920_DELAY_3 #undef BOARD_ST7920_DELAY_1 #undef BOARD_ST7920_DELAY_2 #undef BOARD_ST7920_DELAY_3 + #undef CPU_ST7920_DELAY_1 + #undef CPU_ST7920_DELAY_2 + #undef CPU_ST7920_DELAY_3 +#endif + +#if !NEED_CASE_LIGHT_PIN + #undef CASE_LIGHT_PIN #endif #undef HAS_FREE_AUX2_PINS diff --git a/Marlin/src/pins/rambo/env_validate.h b/Marlin/src/pins/rambo/env_validate.h new file mode 100644 index 000000000000..84cf8392cdfc --- /dev/null +++ b/Marlin/src/pins/rambo/env_validate.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'" +#endif diff --git a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h index 2ca2cc9c8d07..25decbf0354c 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RAMBO.h @@ -25,11 +25,12 @@ * Einsy-Rambo pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'" -#endif +#include "env_validate.h" + +#define BOARD_INFO_NAME "Einsy Rambo" +#define DEFAULT_MACHINE_NAME "Prusa MK3" -#define BOARD_INFO_NAME "Einsy Rambo" +//#define MK3_FAN_PINS // // TMC2130 Configuration_adv defaults for EinsyRambo @@ -113,10 +114,11 @@ // // Temperature Sensors // -#define TEMP_0_PIN 0 // Analog Input -#define TEMP_1_PIN 1 // Analog Input -#define TEMP_BED_PIN 2 // Analog Input -#define TEMP_PROBE_PIN 3 // Analog Input +#define TEMP_0_PIN 0 // Analog Input, Header J2 +#define TEMP_1_PIN 1 // Analog Input, Header J3 +#define TEMP_BOARD_PIN 91 // Onboard thermistor, 100k TDK NTCG104LH104JT1 +#define TEMP_BED_PIN 2 // Analog Input, Header J6 +#define TEMP_PROBE_PIN 3 // Analog Input, Header J15 // // Heaters / Fans @@ -125,11 +127,19 @@ #define HEATER_BED_PIN 4 #ifndef FAN_PIN - #define FAN_PIN 8 + #ifdef MK3_FAN_PINS + #define FAN_PIN 6 + #else + #define FAN_PIN 8 + #endif #endif #ifndef FAN1_PIN - #define FAN1_PIN 6 + #ifdef MK3_FAN_PINS + #define FAN1_PIN -1 + #else + #define FAN1_PIN 6 + #endif #endif // @@ -194,3 +204,11 @@ #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL #endif // HAS_WIRED_LCD + +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 +#endif + +#undef MK3_FAN_PINS diff --git a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h index a6a4b65e05bc..48c68d55f949 100644 --- a/Marlin/src/pins/rambo/pins_EINSY_RETRO.h +++ b/Marlin/src/pins/rambo/pins_EINSY_RETRO.h @@ -25,9 +25,7 @@ * Einsy-Retro pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Einsy Retro" @@ -63,7 +61,7 @@ #else - #if X_HOME_DIR < 0 + #if X_HOME_TO_MIN #define X_MIN_PIN X_DIAG_PIN #define X_MAX_PIN 81 // X+ #else @@ -71,7 +69,7 @@ #define X_MAX_PIN X_DIAG_PIN #endif - #if Y_HOME_DIR < 0 + #if Y_HOME_TO_MIN #define Y_MIN_PIN Y_DIAG_PIN #define Y_MAX_PIN 57 // Y+ #else @@ -201,3 +199,10 @@ #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL || TOUCH_UI_FTDI_EVE + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 +#endif diff --git a/Marlin/src/pins/rambo/pins_MINIRAMBO.h b/Marlin/src/pins/rambo/pins_MINIRAMBO.h index 4dcf35827cba..c49687890839 100644 --- a/Marlin/src/pins/rambo/pins_MINIRAMBO.h +++ b/Marlin/src/pins/rambo/pins_MINIRAMBO.h @@ -25,9 +25,7 @@ * Mini-RAMBo pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'RAMBo' in 'Tools > Board' or the Mega2560 environment in PlatformIO." -#endif +#include "env_validate.h" #if MB(MINIRAMBO_10A) #define BOARD_INFO_NAME "Mini RAMBo 1.0a" @@ -71,7 +69,7 @@ #define E0_DIR_PIN 43 #define E0_ENABLE_PIN 26 -// Microstepping pins - Mapping not from fastio.h (?) +// Microstepping pins #define X_MS1_PIN 40 #define X_MS2_PIN 41 #define Y_MS1_PIN 69 @@ -194,3 +192,9 @@ #endif // IS_ULTIPANEL || TOUCH_UI_ULTIPANEL #endif // HAS_WIRED_LCD || TOUCH_UI_ULTIPANEL + +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 0 +#endif diff --git a/Marlin/src/pins/rambo/pins_RAMBO.h b/Marlin/src/pins/rambo/pins_RAMBO.h index be2317b146bd..8153103a38ac 100644 --- a/Marlin/src/pins/rambo/pins_RAMBO.h +++ b/Marlin/src/pins/rambo/pins_RAMBO.h @@ -41,18 +41,22 @@ * Rambo pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" -#define BOARD_INFO_NAME "Rambo" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Rambo" +#endif // // Servos // -#define SERVO0_PIN 22 // Motor header MX1 +#ifndef SERVO0_PIN + #define SERVO0_PIN 22 // Motor header MX1 +#endif #define SERVO1_PIN 23 // Motor header MX2 -#define SERVO2_PIN 24 // Motor header MX3 +#ifndef SERVO2_PIN + #define SERVO2_PIN 24 // Motor header MX3 +#endif #define SERVO3_PIN 5 // PWM header pin 5 // @@ -62,7 +66,9 @@ #define X_MAX_PIN 24 #define Y_MIN_PIN 11 #define Y_MAX_PIN 23 -#define Z_MIN_PIN 10 +#ifndef Z_MIN_PIN + #define Z_MIN_PIN 10 +#endif #define Z_MAX_PIN 30 // @@ -135,8 +141,12 @@ #ifndef FAN_PIN #define FAN_PIN 8 #endif -#define FAN1_PIN 6 -#define FAN2_PIN 2 +#ifndef FAN1_PIN + #define FAN1_PIN 6 +#endif +#ifndef FAN2_PIN + #define FAN2_PIN 2 +#endif // // Misc. Functions @@ -161,10 +171,10 @@ #define SPINDLE_DIR_PIN 32 // -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple // -#ifndef MAX6675_SS_PIN - #define MAX6675_SS_PIN 32 // SPINDLE_DIR_PIN / STAT_LED_BLUE_PIN +#ifndef TEMP_0_CS_PIN + #define TEMP_0_CS_PIN 32 // SPINDLE_DIR_PIN / STAT_LED_BLUE_PIN #endif // @@ -220,8 +230,12 @@ #define BEEPER_PIN 79 // AUX-4 // AUX-2 - #define BTN_EN1 76 - #define BTN_EN2 77 + #ifndef BTN_EN1 + #define BTN_EN1 76 + #endif + #ifndef BTN_EN2 + #define BTN_EN2 77 + #endif #define BTN_ENC 78 #define SD_DETECT_PIN 81 @@ -254,3 +268,10 @@ #endif // !IS_NEWPANEL #endif // HAS_WIRED_LCD + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 0 + #define BOARD_ST7920_DELAY_3 0 +#endif diff --git a/Marlin/src/pins/rambo/pins_RAMBO_THINKERV2.h b/Marlin/src/pins/rambo/pins_RAMBO_THINKERV2.h new file mode 100755 index 000000000000..278a5bf0b45a --- /dev/null +++ b/Marlin/src/pins/rambo/pins_RAMBO_THINKERV2.h @@ -0,0 +1,60 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Rambo ThinkerV2 pin assignments + */ + +#define BOARD_INFO_NAME "Rambo ThinkerV2" + +#define SERVO0_PIN 4 // Motor header MX1 +#define SERVO2_PIN -1 // Motor header MX3 + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 10 +#endif + +// Support BLTouch and fixed probes +#if ENABLED(BLTOUCH) + #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) + #define Z_MIN_PIN 22 + #elif !defined(Z_MIN_PROBE_PIN) + #define Z_MIN_PROBE_PIN 22 + #endif +#elif ENABLED(FIX_MOUNTED_PROBE) + #if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) + #define Z_MIN_PIN 4 + #elif !defined(Z_MIN_PROBE_PIN) + #define Z_MIN_PROBE_PIN 4 + #endif +#endif + +// Eryone has the fan pins reversed +#define FAN1_PIN 2 +#define FAN2_PIN 6 + +// Encoder +#define BTN_EN1 64 +#define BTN_EN2 63 + +#include "pins_RAMBO.h" diff --git a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h index 5680b00df693..c2a691a3b73b 100644 --- a/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h +++ b/Marlin/src/pins/rambo/pins_SCOOVO_X9H.h @@ -25,9 +25,7 @@ * Rambo pin assignments MODIFIED FOR Scoovo X9H ************************************************/ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_target.h" #define BOARD_INFO_NAME "Scoovo X9H" diff --git a/Marlin/src/pins/ramps/env_validate.h b/Marlin/src/pins/ramps/env_validate.h new file mode 100644 index 000000000000..6006a78f013c --- /dev/null +++ b/Marlin/src/pins/ramps/env_validate.h @@ -0,0 +1,35 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if ENABLED(ALLOW_SAM3X8E) + #if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino Due' or 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" + #endif +#elif ENABLED(REQUIRE_MEGA2560) && NOT_TARGET(__AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" +#elif DISABLED(REQUIRE_MEGA2560) && NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560 or 1280' in 'Tools > Board.'" +#endif + +#undef ALLOW_SAM3X8E +#undef REQUIRE_MEGA2560 diff --git a/Marlin/src/pins/ramps/pins_3DRAG.h b/Marlin/src/pins/ramps/pins_3DRAG.h index 6c7f7f4db63f..5bd1667356db 100644 --- a/Marlin/src/pins/ramps/pins_3DRAG.h +++ b/Marlin/src/pins/ramps/pins_3DRAG.h @@ -37,76 +37,43 @@ #define DEFAULT_SOURCE_CODE_URL "3dprint.elettronicain.it" #endif -// -// Heaters / Fans -// -#define RAMPS_D8_PIN 9 -#define RAMPS_D9_PIN 8 -#define MOSFET_D_PIN 12 - -#ifndef CASE_LIGHT_PIN - #define CASE_LIGHT_PIN -1 // Hardware PWM but one is not available on expansion header -#endif - -#include "pins_RAMPS.h" - // // Limit Switches // -#undef Z_MAX_PIN +#define Z_STOP_PIN 18 // // Steppers // -#undef Z_ENABLE_PIN -#define Z_ENABLE_PIN 63 +#if HAS_CUTTER + #define Z_DIR_PIN 28 + #define Z_ENABLE_PIN 24 + #define Z_STEP_PIN 26 +#else + #define Z_ENABLE_PIN 63 +#endif + +#if HAS_CUTTER && !HAS_EXTRUDERS + #define E0_DIR_PIN -1 + #define E0_ENABLE_PIN -1 + #define E0_STEP_PIN -1 +#endif // // Heaters / Fans // -#define HEATER_2_PIN 6 +#define RAMPS_D8_PIN 9 +#define RAMPS_D9_PIN 8 +#define MOSFET_D_PIN 12 // // Misc. Functions // -#undef SDSS #define SDSS 25 -#undef SD_DETECT_PIN -#define SD_DETECT_PIN 53 - -// -// LCD / Controller -// -#if IS_ULTRA_LCD && IS_NEWPANEL - #undef BEEPER_PIN - - #undef LCD_PINS_RS - #undef LCD_PINS_ENABLE - #undef LCD_PINS_D4 - #undef LCD_PINS_D5 - #undef LCD_PINS_D6 - #undef LCD_PINS_D7 - #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 - #define LCD_PINS_D4 37 - #define LCD_PINS_D5 35 - #define LCD_PINS_D6 33 - #define LCD_PINS_D7 31 - - // Buttons - #undef BTN_EN1 - #undef BTN_EN2 - #undef BTN_ENC - #define BTN_EN1 16 - #define BTN_EN2 17 - #define BTN_ENC 23 - -#else - - #define BEEPER_PIN 33 - -#endif // IS_ULTRA_LCD && IS_NEWPANEL +#ifndef CASE_LIGHT_PIN + #define CASE_LIGHT_PIN -1 // Hardware PWM but one is not available on expansion header +#endif /** * M3/M4/M5 - Spindle/Laser Control @@ -139,26 +106,68 @@ * * Note: Socket names vary from vendor to vendor */ -#undef SPINDLE_LASER_PWM_PIN // Definitions in pins_RAMPS.h are not good with 3DRAG -#undef SPINDLE_LASER_ENA_PIN -#undef SPINDLE_DIR_PIN - #if HAS_CUTTER - #if !EXTRUDERS - #undef E0_DIR_PIN - #undef E0_ENABLE_PIN - #undef E0_STEP_PIN - #undef Z_DIR_PIN - #undef Z_ENABLE_PIN - #undef Z_STEP_PIN - #define Z_DIR_PIN 28 - #define Z_ENABLE_PIN 24 - #define Z_STEP_PIN 26 + #if !HAS_EXTRUDERS #define SPINDLE_LASER_PWM_PIN 46 // Hardware PWM #define SPINDLE_LASER_ENA_PIN 62 // Pullup! #define SPINDLE_DIR_PIN 48 #elif !BOTH(IS_ULTRA_LCD, IS_NEWPANEL) // Use expansion header if no LCD in use #define SPINDLE_LASER_ENA_PIN 16 // Pullup or pulldown! #define SPINDLE_DIR_PIN 17 + #if !NUM_SERVOS // Use servo connector if possible + #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM + #elif HAS_FREE_AUX2_PINS + #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM + #endif #endif #endif + +#include "pins_RAMPS.h" + +// +// Heaters / Fans +// +#define HEATER_2_PIN 6 + +#undef SD_DETECT_PIN +#define SD_DETECT_PIN 53 + +// +// LCD / Controller +// +#if IS_ULTRA_LCD && IS_NEWPANEL + #undef BEEPER_PIN + + // TODO: Remap EXP1/2 based on adapter + #undef LCD_PINS_RS + #undef LCD_PINS_ENABLE + #undef LCD_PINS_D4 + #undef LCD_PINS_D5 + #undef LCD_PINS_D6 + #undef LCD_PINS_D7 + #define LCD_PINS_RS 27 + #define LCD_PINS_ENABLE 29 + #define LCD_PINS_D4 37 + #define LCD_PINS_D5 35 + #define LCD_PINS_D6 33 + #define LCD_PINS_D7 31 + + // Buttons + #undef BTN_EN1 + #undef BTN_EN2 + #undef BTN_ENC + #define BTN_EN1 16 + #define BTN_EN2 17 + #define BTN_ENC 23 + +#else + + #define BEEPER_PIN 33 + +#endif // IS_ULTRA_LCD && IS_NEWPANEL + +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 188 + #define BOARD_ST7920_DELAY_3 0 +#endif diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h index 6ddd2a5165e6..ee8cafa89766 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3.h @@ -25,9 +25,10 @@ * AZTEEG_X3 Arduino Mega with RAMPS v1.4 pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "Azteeg X3 supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif @@ -42,7 +43,7 @@ #define SERVO0_PIN 44 // SERVO1 port #define SERVO1_PIN 55 // SERVO2 port -#include "pins_RAMPS_13.h" +#include "pins_RAMPS_13.h" // ... RAMPS // // LCD / Controller diff --git a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h index 9ba6a0c1ac45..c2896146e64f 100644 --- a/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h +++ b/Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h @@ -25,9 +25,10 @@ * AZTEEG_X3_PRO (Arduino Mega) pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 5 || E_STEPPERS > 5 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 5 || E_STEPPERS > 5 #error "Azteeg X3 Pro supports up to 5 hotends / E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h index 97ef1b4fd869..4d7a79263570 100644 --- a/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h +++ b/Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h @@ -38,12 +38,10 @@ #define SPINDLE_DIR_PIN 67 #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM -#include "pins_RAMPS.h" - // // Temperature Sensors // -#undef TEMP_0_PIN -#undef TEMP_1_PIN #define TEMP_0_PIN 9 // Analog Input #define TEMP_1_PIN 11 // Analog Input + +#include "pins_RAMPS.h" diff --git a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h index f120e9c44f54..4d7c67fc39ba 100644 --- a/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h +++ b/Marlin/src/pins/ramps/pins_BQ_ZUM_MEGA_3D.h @@ -25,12 +25,46 @@ * bq ZUM Mega 3D board definition */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#define REQUIRE_MEGA2560 +#include "env_validate.h" #define BOARD_INFO_NAME "ZUM Mega 3D" +// +// Limit Switches +// +#define X_MAX_PIN 79 + +// This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team +// decided to ship the printer only with the probe and no additional Z-min +// endstop and the instruction manual advises the user to connect the probe to +// IND_S_5V the option Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN will not work. +#if ENABLED(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN) + #define Z_MIN_PIN 19 // IND_S_5V + #define Z_MAX_PIN 18 // Z-MIN Label +#endif + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN 19 // IND_S_5V +#endif + +// +// Steppers +// +#define Z_ENABLE_PIN 77 + +#define DIGIPOTSS_PIN 22 +#define DIGIPOT_CHANNELS { 4, 5, 3, 0, 1 } + +// +// Temperature Sensors +// +#define TEMP_1_PIN 14 // Analog Input +#define TEMP_BED_PIN 15 // Analog Input + // // Heaters / Fans // @@ -62,61 +96,27 @@ #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM #define SPINDLE_DIR_PIN 42 -// -// Limit Switches -// -#define X_MAX_PIN 79 // 2 - -// -// Import RAMPS 1.3 pins -// -#include "pins_RAMPS_13.h" - -// -// Z Probe (when not Z_MIN_PIN) -// -#undef Z_MIN_PROBE_PIN -#define Z_MIN_PROBE_PIN 19 // IND_S_5V - -#undef Z_ENABLE_PIN -#define Z_ENABLE_PIN 77 // 62 - -// -// Steppers -// -#define DIGIPOTSS_PIN 22 -#define DIGIPOT_CHANNELS { 4, 5, 3, 0, 1 } - -// -// Temperature Sensors -// -#undef TEMP_1_PIN -#define TEMP_1_PIN 14 // Analog Input (15) - -#undef TEMP_BED_PIN -#define TEMP_BED_PIN 15 // Analog Input (14) - // // Misc. Functions // -#undef PS_ON_PIN // 12 #define PS_ON_PIN 81 // External Power Supply #ifndef CASE_LIGHT_PIN #define CASE_LIGHT_PIN 44 // Hardware PWM #endif -// This board has headers for Z-min, Z-max and IND_S_5V *but* as the bq team -// decided to ship the printer only with the probe and no additional Z-min -// endstop and the instruction manual advises the user to connect the probe to -// IND_S_5V the option Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN will not work. -#ifdef Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN - #undef Z_MIN_PIN - #undef Z_MAX_PIN - #define Z_MIN_PIN 19 // IND_S_5V - #define Z_MAX_PIN 18 // Z-MIN Label +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 0 + #define BOARD_ST7920_DELAY_3 189 #endif +// +// Import RAMPS 1.3 pins +// +#include "pins_RAMPS_13.h" // ... RAMPS + // // Used by the Hephestos 2 heated bed upgrade kit // diff --git a/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h b/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h index b9eee6bd5329..020941027aaf 100644 --- a/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h +++ b/Marlin/src/pins/ramps/pins_COPYMASTER_3D.h @@ -23,10 +23,10 @@ #define BOARD_INFO_NAME "Copymaster 3D RAMPS" -#define Z_STEP_PIN 47 -#define Y_MAX_PIN 14 -#define FIL_RUNOUT_PIN 15 -#define SD_DETECT_PIN 66 +#define Z_STEP_PIN 47 +#define Y_MAX_PIN 14 +#define FIL_RUNOUT_PIN 15 +#define SD_DETECT_PIN 66 // // Import RAMPS 1.4 pins diff --git a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h index 07e46acfe71b..4bebd6ded6e9 100644 --- a/Marlin/src/pins/ramps/pins_DAGOMA_F5.h +++ b/Marlin/src/pins/ramps/pins_DAGOMA_F5.h @@ -39,19 +39,17 @@ #define FIL_RUNOUT2_PIN 14 #endif -// -// LCD delays -// -#if HAS_MARLINUI_U8GLIB - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS(250) +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 250 #endif // // DAC steppers // -#define HAS_MOTOR_CURRENT_DAC +#define HAS_MOTOR_CURRENT_DAC 1 #define DAC_STEPPER_ORDER { 0, 1, 2, 3 } diff --git a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h index 93ec3d607026..1a4b83f02dce 100644 --- a/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h +++ b/Marlin/src/pins/ramps/pins_DUPLICATOR_I3_PLUS.h @@ -25,9 +25,8 @@ * Wanhao Duplicator i3 Plus pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#define REQUIRE_MEGA2560 +#include "env_validate.h" #define BOARD_INFO_NAME "Duplicator i3 Plus" diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h index 5b724787e941..34a4ceb27d16 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_RAPTOR.h @@ -25,9 +25,10 @@ * Formbot Raptor pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 3 || E_STEPPERS > 3 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 3 || E_STEPPERS > 3 #error "Formbot supports up to 3 hotends / E-steppers. Comment out this line to continue." #endif @@ -113,11 +114,11 @@ #define TEMP_1_PIN 15 // Analog Input #define TEMP_BED_PIN 14 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h index 81b6ea16d7fe..94c4551fc2ed 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX2PLUS.h @@ -25,9 +25,10 @@ * Formbot pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif @@ -110,11 +111,11 @@ #define TEMP_1_PIN 15 // Analog Input #define TEMP_BED_PIN 3 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // @@ -197,14 +198,9 @@ #define LCD_PINS_D7 29 #endif -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(200) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(200) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(200) - #endif +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 200 + #define BOARD_ST7920_DELAY_2 200 + #define BOARD_ST7920_DELAY_3 200 #endif diff --git a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h index a97b0d2d1227..c953cff3d066 100644 --- a/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h +++ b/Marlin/src/pins/ramps/pins_FORMBOT_TREX3.h @@ -25,9 +25,10 @@ * Formbot pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "Formbot supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif @@ -110,11 +111,11 @@ #define TEMP_1_PIN 15 // Analog Input #define TEMP_BED_PIN 14 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h index 6133a6417e01..9c6b74f1269d 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_13.h @@ -34,7 +34,7 @@ #endif #define RESET_PIN 30 -#define SPI_FLASH_CS 83 +#define SPI_FLASH_CS_PIN 83 // // Servos @@ -124,42 +124,42 @@ * Software serial communication pins. * At the moment, F6 rx pins are not pc interrupt pins */ - #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN -1 // 71 - #endif #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN 72 #endif - #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN -1 // 73 + #ifndef X_SERIAL_RX_PIN + #define X_SERIAL_RX_PIN -1 // 71 #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN 75 #endif - #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN -1 // 78 + #ifndef Y_SERIAL_RX_PIN + #define Y_SERIAL_RX_PIN -1 // 73 #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN 79 #endif - #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN -1 // 76 + #ifndef Z_SERIAL_RX_PIN + #define Z_SERIAL_RX_PIN -1 // 78 #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN 77 #endif - #ifndef E1_SERIAL_RX_PIN - #define E1_SERIAL_RX_PIN -1 // 80 + #ifndef E0_SERIAL_RX_PIN + #define E0_SERIAL_RX_PIN -1 // 76 #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN 81 #endif - #ifndef E2_SERIAL_RX_PIN - #define E2_SERIAL_RX_PIN -1 // 22 + #ifndef E1_SERIAL_RX_PIN + #define E1_SERIAL_RX_PIN -1 // 80 #endif #ifndef E2_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN 82 #endif + #ifndef E2_SERIAL_RX_PIN + #define E2_SERIAL_RX_PIN -1 // 22 + #endif #endif // diff --git a/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h b/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h index 4280204b99d9..1fc24154b733 100644 --- a/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h +++ b/Marlin/src/pins/ramps/pins_FYSETC_F6_14.h @@ -33,18 +33,23 @@ /** * TMC2208/TMC2209 stepper drivers */ - #define X_SERIAL_RX_PIN 72 #define X_SERIAL_TX_PIN 71 - #define Y_SERIAL_RX_PIN 73 + #define X_SERIAL_RX_PIN 72 + #define Y_SERIAL_TX_PIN 78 - #define Z_SERIAL_RX_PIN 75 + #define Y_SERIAL_RX_PIN 73 + #define Z_SERIAL_TX_PIN 79 - #define E0_SERIAL_RX_PIN 77 + #define Z_SERIAL_RX_PIN 75 + #define E0_SERIAL_TX_PIN 81 - #define E1_SERIAL_RX_PIN 76 + #define E0_SERIAL_RX_PIN 77 + #define E1_SERIAL_TX_PIN 80 - #define E2_SERIAL_RX_PIN 62 + #define E1_SERIAL_RX_PIN 76 + #define E2_SERIAL_TX_PIN 82 + #define E2_SERIAL_RX_PIN 62 #endif #include "pins_FYSETC_F6_13.h" diff --git a/Marlin/src/pins/ramps/pins_K8200.h b/Marlin/src/pins/ramps/pins_K8200.h index df685e0f0c20..395e1ccca50e 100644 --- a/Marlin/src/pins/ramps/pins_K8200.h +++ b/Marlin/src/pins/ramps/pins_K8200.h @@ -30,4 +30,4 @@ #define DEFAULT_MACHINE_NAME "K8200" #define DEFAULT_SOURCE_CODE_URL "github.com/CONSULitAS/Marlin-K8200" -#include "pins_3DRAG.h" +#include "pins_3DRAG.h" // ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_K8400.h b/Marlin/src/pins/ramps/pins_K8400.h index af687927f420..36c438aca2de 100644 --- a/Marlin/src/pins/ramps/pins_K8400.h +++ b/Marlin/src/pins/ramps/pins_K8400.h @@ -35,7 +35,14 @@ #define BOARD_INFO_NAME "K8400" #define DEFAULT_MACHINE_NAME "Vertex" -#include "pins_3DRAG.h" +// +// Steppers +// +#if HAS_CUTTER + #define Z_STEP_PIN 32 +#endif + +#define E1_STEP_PIN 32 // // Limit Switches @@ -43,16 +50,7 @@ #define X_STOP_PIN 3 #define Y_STOP_PIN 14 -#undef X_MIN_PIN -#undef X_MAX_PIN -#undef Y_MIN_PIN -#undef Y_MAX_PIN - -// -// Steppers -// -#undef E1_STEP_PIN -#define E1_STEP_PIN 32 +#include "pins_3DRAG.h" // ... RAMPS // // Heaters / Fans @@ -66,8 +64,3 @@ #undef PS_ON_PIN #undef KILL_PIN #undef SD_DETECT_PIN - -#if Z_STEP_PIN == 26 - #undef Z_STEP_PIN - #define Z_STEP_PIN 32 -#endif diff --git a/Marlin/src/pins/ramps/pins_K8600.h b/Marlin/src/pins/ramps/pins_K8600.h index 1a396b20f403..d312490dbed2 100644 --- a/Marlin/src/pins/ramps/pins_K8600.h +++ b/Marlin/src/pins/ramps/pins_K8600.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once /** * VERTEX NANO Arduino Mega with RAMPS EFB v1.4 pin assignments. @@ -39,6 +40,11 @@ #define Z_MAX_PIN 18 #define Z_MIN_PIN -1 +// +// Steppers +// +#define Z_ENABLE_PIN 63 + // // Heaters / Fans // @@ -47,6 +53,7 @@ // // Misc. Functions // +#define SDSS 25 #define CASE_LIGHT_PIN 7 // @@ -55,44 +62,11 @@ #define IS_RAMPS_EFB // Override autodetection. Bed will be undefined. #include "pins_RAMPS.h" -// -// Steppers -// -#undef X_STEP_PIN -#undef X_DIR_PIN -#undef X_ENABLE_PIN -#define X_STEP_PIN 54 -#define X_DIR_PIN 55 -#define X_ENABLE_PIN 38 - -#undef Y_STEP_PIN -#undef Y_DIR_PIN -#undef Y_ENABLE_PIN -#define Y_STEP_PIN 60 -#define Y_DIR_PIN 61 -#define Y_ENABLE_PIN 56 - -#undef Z_ENABLE_PIN -#define Z_ENABLE_PIN 63 - -#undef E0_STEP_PIN -#undef E0_DIR_PIN -#undef E0_ENABLE_PIN -#define E0_STEP_PIN 26 -#define E0_DIR_PIN 28 -#define E0_ENABLE_PIN 24 - // // Heaters / Fans // #undef HEATER_BED_PIN -// -// Misc. Functions -// -#undef SDSS -#define SDSS 25 // 53 - // // LCD / Controller // diff --git a/Marlin/src/pins/ramps/pins_K8800.h b/Marlin/src/pins/ramps/pins_K8800.h index 5388c9621da5..9bc74943b47a 100644 --- a/Marlin/src/pins/ramps/pins_K8800.h +++ b/Marlin/src/pins/ramps/pins_K8800.h @@ -25,9 +25,7 @@ * Velleman K8800 (Vertex) */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "K8800" #define DEFAULT_MACHINE_NAME "Vertex Delta" diff --git a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h index 6fcb7b94e0c2..6b48e3cbd678 100644 --- a/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h +++ b/Marlin/src/pins/ramps/pins_LONGER3D_LKx_PRO.h @@ -25,9 +25,10 @@ * Longer3D LK1/LK4/LK5 Pro board pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "Longer3D LGT KIT V1.0 board only supports one hotend / E-stepper. Comment out this line to continue." #endif @@ -81,38 +82,39 @@ #define Z_MAX_PIN 37 #endif +#undef CHANGE_Y_LIMIT_PINS + // -// Z Probe (when not Z_MIN_PIN) +// Steppers - No E1 pins // -#define Z_MIN_PROBE_PIN -1 +#define E1_STEP_PIN -1 +#define E1_DIR_PIN -1 +#define E1_ENABLE_PIN -1 +#define E1_CS_PIN -1 // -// Misc. Functions +// Z Probe (when not Z_MIN_PIN) // -#define SD_DETECT_PIN 49 -#define FIL_RUNOUT_PIN 2 +#define Z_MIN_PROBE_PIN -1 // -// Other RAMPS 1.3 pins +// Temperature Sensors // -#define IS_RAMPS_EFB // Override autodetection. Bed will be undefined. -#include "pins_RAMPS_13.h" +#define TEMP_1_PIN -1 // -// Steppers +// Průša i3 MK2 Multiplexer Support // -#undef E1_STEP_PIN -#undef E1_DIR_PIN -#undef E1_ENABLE_PIN -#undef E1_CS_PIN +#define E_MUX2_PIN -1 // -// Temperature Sensors +// Misc. Functions // -#undef TEMP_1_PIN +#define SD_DETECT_PIN 49 +#define FIL_RUNOUT_PIN 2 // -// Průša i3 MK2 Multiplexer Support +// Other RAMPS 1.3 pins // -#undef E_MUX2_PIN -#undef CHANGE_Y_LIMIT_PINS +#define IS_RAMPS_EFB // Override autodetection. Bed will be undefined. +#include "pins_RAMPS_13.h" // ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_10.h b/Marlin/src/pins/ramps/pins_MKS_BASE_10.h index 0be58653aadf..c40cabe32515 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_10.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_10.h @@ -34,4 +34,4 @@ #define BOARD_INFO_NAME "MKS BASE 1.0" #define MKS_BASE_VERSION 10 -#include "pins_MKS_BASE_common.h" +#include "pins_MKS_BASE_common.h" // ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h index 3612f9b894c6..992ab92ee9c2 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_14.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_14.h @@ -58,7 +58,7 @@ #define CASE_LIGHT_PIN 11 // PB5 ** Pin24 ** PWM11 #endif -#include "pins_MKS_BASE_common.h" +#include "pins_MKS_BASE_common.h" // ... RAMPS /* Available connectors on MKS BASE v1.4 diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_15.h b/Marlin/src/pins/ramps/pins_MKS_BASE_15.h index 9e670d1bbdc8..2b0c2bb88300 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_15.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_15.h @@ -32,4 +32,4 @@ #define BOARD_INFO_NAME "MKS BASE 1.5" #define MKS_BASE_VERSION 15 -#include "pins_MKS_BASE_common.h" +#include "pins_MKS_BASE_common.h" // ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_16.h b/Marlin/src/pins/ramps/pins_MKS_BASE_16.h index a4dfca21b465..31a8fdab8d3a 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_16.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_16.h @@ -56,4 +56,4 @@ #define PS_ON_PIN -1 #endif -#include "pins_MKS_BASE_common.h" +#include "pins_MKS_BASE_common.h" // ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h b/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h index 3ce138b9751e..973f924e7c16 100644 --- a/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h +++ b/Marlin/src/pins/ramps/pins_MKS_BASE_HEROIC.h @@ -25,7 +25,7 @@ * MKS BASE with Heroic HR4982 stepper drivers */ -#include "pins_MKS_BASE_15.h" +#include "pins_MKS_BASE_15.h" // ... MKS_BASE_common ... RAMPS /** * Some new boards use HR4982 (Heroic) instead of the A4982 (Allegro) stepper drivers. diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h index 08dd0f44bdfe..4742ac9b0d25 100644 --- a/Marlin/src/pins/ramps/pins_MKS_GEN_13.h +++ b/Marlin/src/pins/ramps/pins_MKS_GEN_13.h @@ -54,6 +54,9 @@ #include "pins_RAMPS.h" +#undef EXP2_03_PIN +#define EXP2_03_PIN -1 // RESET + // // LCD / Controller // @@ -81,19 +84,21 @@ * * This configuration uses the following arrangement: * - * EXP1 D37 = EN2 D35 = EN1 EXP2 D50 = MISO D52 = SCK - * D17 = BLUE D16 = RED D31 = ENC D53 = SDCS - * D23 = KILL D25 = BUZZ D33 = --- D51 = MOSI - * D27 = A0 D29 = LCS D49 = SDCD RST = --- - * GND = GND 5V = 5V GND = --- D41 = --- + * ------ ------ + * ENCB |10 9 | ENCA MISO |10 9 | SCK + * BLUE_LED | 8 7 | RED_LED ENCBTN | 8 7 | SDCS + * KILL 6 5 | BEEPER 6 5 | MOSI + * A0 | 4 3 | LCD_CS SDCD | 4 3 | + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - + #undef SD_DETECT_PIN #undef BTN_EN1 #undef BTN_EN2 #undef BTN_ENC #undef DOGLCD_A0 #undef DOGLCD_CS - #undef SD_DETECT_PIN #undef BEEPER_PIN #undef KILL_PIN #undef STAT_LED_RED_PIN @@ -102,46 +107,24 @@ // // VIKI2 12-wire lead // + #define SD_DETECT_PIN EXP2_04_PIN // SDCD orange/white + #define BTN_EN1 EXP1_09_PIN // ENCA white + #define BTN_EN2 EXP1_10_PIN // ENCB green + #define BTN_ENC EXP2_08_PIN // ENCBTN purple + #define DOGLCD_A0 EXP1_04_PIN // A0 brown + #define DOGLCD_CS EXP1_03_PIN // LCS green/white - // orange/white SDCD - #define SD_DETECT_PIN 49 - - // white ENCA - #define BTN_EN1 35 - - // green ENCB - #define BTN_EN2 37 - - // purple ENCBTN - #define BTN_ENC 31 - - // brown A0 - #define DOGLCD_A0 27 + // EXP2_10_PIN gray MISO + // EXP2_05_PIN yellow MOSI + // EXP2_09_PIN orange SCK - // green/white LCS - #define DOGLCD_CS 29 - - // 50 gray MISO - // 51 yellow MOSI - // 52 orange SCK - - // blue SDCS - //#define SDSS 53 + //#define SDSS EXP2_07_PIN // SDCS blue // // VIKI2 4-wire lead // - - // blue BTN - #define KILL_PIN 23 - - // green BUZZER - #define BEEPER_PIN 25 - - // yellow RED-LED - #define STAT_LED_RED_PIN 16 - - // white BLUE-LED - #define STAT_LED_BLUE_PIN 17 - + #define KILL_PIN EXP1_06_PIN // BTN blue + #define BEEPER_PIN EXP1_05_PIN // BUZZER green + #define STAT_LED_RED_PIN EXP1_07_PIN // RED-LED yellow + #define STAT_LED_BLUE_PIN EXP1_08_PIN // BLUE-LED white #endif diff --git a/Marlin/src/pins/ramps/pins_ORTUR_4.h b/Marlin/src/pins/ramps/pins_ORTUR_4.h index e79973e06f07..bc86c1a8c66a 100644 --- a/Marlin/src/pins/ramps/pins_ORTUR_4.h +++ b/Marlin/src/pins/ramps/pins_ORTUR_4.h @@ -45,7 +45,14 @@ // // Steppers // +#define E0_STEP_PIN 36 +#define E0_DIR_PIN 34 +#define E0_ENABLE_PIN 30 #define E0_CS_PIN 44 + +#define E1_STEP_PIN 26 +#define E1_DIR_PIN 28 +#define E1_ENABLE_PIN 24 #define E1_CS_PIN 42 // @@ -54,40 +61,22 @@ #define TEMP_0_PIN 15 // Analog Input #define TEMP_1_PIN 13 // Analog Input -// -// Software serial -// -#define X_SERIAL_TX_PIN 59 -#define X_SERIAL_RX_PIN 63 +#if HAS_TMC_UART + #define X_SERIAL_TX_PIN 59 + #define X_SERIAL_RX_PIN 63 -#define Y_SERIAL_TX_PIN 64 -#define Y_SERIAL_RX_PIN 40 + #define Y_SERIAL_TX_PIN 64 + #define Y_SERIAL_RX_PIN 40 -#define Z_SERIAL_TX_PIN 44 -#define Z_SERIAL_RX_PIN 42 + #define Z_SERIAL_TX_PIN 44 + #define Z_SERIAL_RX_PIN 42 -#define E0_SERIAL_TX_PIN 66 -#define E0_SERIAL_RX_PIN 65 + #define E0_SERIAL_TX_PIN 66 + #define E0_SERIAL_RX_PIN 65 +#endif #include "pins_RAMPS.h" -// -// Steppers -// -#undef E0_STEP_PIN -#undef E0_DIR_PIN -#undef E0_ENABLE_PIN -#define E0_STEP_PIN 36 -#define E0_DIR_PIN 34 -#define E0_ENABLE_PIN 30 - -#undef E1_STEP_PIN -#undef E1_DIR_PIN -#undef E1_ENABLE_PIN -#define E1_STEP_PIN 26 -#define E1_DIR_PIN 28 -#define E1_ENABLE_PIN 24 - // // LCD / Controller // diff --git a/Marlin/src/pins/ramps/pins_RAMPS.h b/Marlin/src/pins/ramps/pins_RAMPS.h index 0c09b04566c7..18cc09546000 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS.h @@ -45,15 +45,11 @@ * 7 | 11 */ -#ifdef TARGET_LPC1768 - #error "Oops! Set MOTHERBOARD to an LPC1768-based board when building for LPC1768." -#elif defined(__STM32F1__) - #error "Oops! Set MOTHERBOARD to an STM32F1-based board when building for STM32F1." +#if ENABLED(AZSMZ_12864) && DISABLED(ALLOW_SAM3X8E) + #error "No pins defined for RAMPS with AZSMZ_12864." #endif -#if NOT_TARGET(IS_RAMPS_SMART, IS_RAMPS_DUO, IS_RAMPS4DUE, TARGET_LPC1768, __AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' (or other appropriate target) in 'Tools > Board.'" -#endif +#include "env_validate.h" // Custom flags and defines for the build //#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__ @@ -124,35 +120,51 @@ #define X_DIR_PIN 55 #define X_ENABLE_PIN 38 #ifndef X_CS_PIN - #define X_CS_PIN 53 + #define X_CS_PIN AUX3_03_PIN #endif #define Y_STEP_PIN 60 #define Y_DIR_PIN 61 #define Y_ENABLE_PIN 56 #ifndef Y_CS_PIN - #define Y_CS_PIN 49 + #define Y_CS_PIN AUX3_07_PIN #endif #ifndef Z_STEP_PIN #define Z_STEP_PIN 46 #endif -#define Z_DIR_PIN 48 -#define Z_ENABLE_PIN 62 +#ifndef Z_DIR_PIN + #define Z_DIR_PIN 48 +#endif +#ifndef Z_ENABLE_PIN + #define Z_ENABLE_PIN 62 +#endif #ifndef Z_CS_PIN #define Z_CS_PIN 40 #endif -#define E0_STEP_PIN 26 -#define E0_DIR_PIN 28 -#define E0_ENABLE_PIN 24 +#ifndef E0_STEP_PIN + #define E0_STEP_PIN 26 +#endif +#ifndef E0_DIR_PIN + #define E0_DIR_PIN 28 +#endif +#ifndef E0_ENABLE_PIN + #define E0_ENABLE_PIN 24 +#endif #ifndef E0_CS_PIN #define E0_CS_PIN 42 #endif -#define E1_STEP_PIN 36 -#define E1_DIR_PIN 34 -#define E1_ENABLE_PIN 30 +#ifndef E1_STEP_PIN + #define E1_STEP_PIN 36 +#endif +#ifndef E1_DIR_PIN + #define E1_DIR_PIN 34 +#endif +#ifndef E1_ENABLE_PIN + #define E1_ENABLE_PIN 30 +#endif #ifndef E1_CS_PIN #define E1_CS_PIN 44 #endif @@ -171,10 +183,10 @@ #endif // -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple // -#ifndef MAX6675_SS_PIN - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) +#ifndef TEMP_0_CS_PIN + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card (SDSS) or 49 (SD_DETECT_PIN) #endif // @@ -223,10 +235,10 @@ #define FAN1_PIN RAMPS_D8_PIN #elif DISABLED(IS_RAMPS_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") #define HEATER_BED_PIN RAMPS_D8_PIN - #if HOTENDS == 1 - #define FAN1_PIN MOSFET_D_PIN - #else + #if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) #define HEATER_1_PIN MOSFET_D_PIN + #else + #define FAN1_PIN MOSFET_D_PIN #endif #endif @@ -245,7 +257,9 @@ // // Misc. Functions // -#define SDSS 53 +#ifndef SDSS + #define SDSS AUX3_03_PIN +#endif #define LED_PIN 13 #ifndef FILWIDTH_PIN @@ -307,6 +321,9 @@ * * Hardware serial communication ports. * If undefined software serial is used according to the pins below + * + * Serial2 -- AUX-4 Pin 18 (D16 TX2) and AUX-4 Pin 17 (D17 RX2) + * Serial1 -- Pins D18 and D19 are used for Z-MIN and Z-MAX */ //#define X_HARDWARE_SERIAL Serial1 //#define X2_HARDWARE_SERIAL Serial1 @@ -320,10 +337,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN 40 #endif @@ -426,20 +439,88 @@ #define E_MUX2_PIN 44 // E1_CS_PIN #endif +// +// AUX3 : GND D52 D50 5V +// NC D53 D51 D49 + +#define AUX3_03_PIN 53 +#define AUX3_04_PIN 52 +#define AUX3_05_PIN 51 +#define AUX3_06_PIN 50 +#define AUX3_07_PIN 49 + +// +// AUX4 : D16 D17 D23 D25 D27 D29 D31 D33 D35 D37 D39 D41 D43 D45 D47 D32 GND 5V +// + +#define AUX4_03_PIN 32 +#define AUX4_04_PIN 47 +#define AUX4_05_PIN 45 +#define AUX4_06_PIN 43 +#define AUX4_07_PIN 41 +#define AUX4_08_PIN 39 +#define AUX4_09_PIN 37 +#define AUX4_10_PIN 35 +#define AUX4_11_PIN 33 +#define AUX4_12_PIN 31 +#define AUX4_13_PIN 29 +#define AUX4_14_PIN 27 +#define AUX4_15_PIN 25 +#define AUX4_16_PIN 23 +#define AUX4_17_PIN 17 +#define AUX4_18_PIN 16 + +/** + * LCD adapter. NOTE: These come in two variants. The socket keys can be + * on either side, and may be backwards on some boards / displays. + * ------ ------ + * D37 |10 9 | D35 (MISO) D50 |10 9 | D52 (SCK) + * D17 | 8 7 | D16 D31 | 8 7 | D53 + * D23 6 5 D25 D33 6 5 D51 (MOSI) + * D27 | 4 3 | D29 D49 | 4 3 | D41 + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 + */ +#ifndef EXP1_03_PIN + #define EXP1_03_PIN AUX4_13_PIN + #define EXP1_04_PIN AUX4_14_PIN + #define EXP1_05_PIN AUX4_15_PIN + #define EXP1_06_PIN AUX4_16_PIN + #define EXP1_07_PIN AUX4_18_PIN + #define EXP1_08_PIN AUX4_17_PIN + #define EXP1_09_PIN AUX4_10_PIN + #define EXP1_10_PIN AUX4_09_PIN + + #define EXP2_03_PIN AUX4_07_PIN + #define EXP2_04_PIN AUX3_07_PIN + #define EXP2_05_PIN AUX3_05_PIN + #define EXP2_06_PIN AUX4_11_PIN + #define EXP2_07_PIN AUX3_03_PIN + #define EXP2_08_PIN AUX4_12_PIN + #define EXP2_09_PIN AUX3_04_PIN + #define EXP2_10_PIN AUX3_06_PIN +#endif + ////////////////////////// // LCDs and Controllers // ////////////////////////// #if HAS_WIRED_LCD + // Uncomment screen orientation + //#define LCD_SCREEN_ROT_90 + //#define LCD_SCREEN_ROT_180 + //#define LCD_SCREEN_ROT_270 + // // LCD Display output pins // #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD) - #define LCD_PINS_RS 49 // CS chip select /SS chip slave select - #define LCD_PINS_ENABLE 51 // SID (MOSI) - #define LCD_PINS_D4 52 // SCK (CLK) clock + #define LCD_PINS_RS EXP2_04_PIN // CS chip select /SS chip slave select + #define LCD_PINS_ENABLE EXP2_05_PIN // SID (MOSI) + #define LCD_PINS_D4 EXP2_09_PIN // SCK (CLK) clock #elif BOTH(IS_NEWPANEL, PANEL_ONE) @@ -452,18 +533,18 @@ #elif ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS 33 + #define TFTGLCD_CS EXP2_06_PIN #else #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS 27 - #define LCD_PINS_ENABLE 29 - #define LCD_PINS_D4 25 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #if !IS_NEWPANEL - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_10_PIN #endif #elif ENABLED(ZONESTAR_LCD) @@ -479,25 +560,25 @@ #else #if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306) - #define LCD_PINS_DC 25 // Set as output on init - #define LCD_PINS_RS 27 // Pull low for 1s to init + #define LCD_PINS_DC EXP1_05_PIN // Set as output on init + #define LCD_PINS_RS EXP1_04_PIN // Pull low for 1s to init // DOGM SPI LCD Support #define DOGLCD_A0 LCD_PINS_DC - #define DOGLCD_CS 16 - #define DOGLCD_MOSI 17 - #define DOGLCD_SCK 23 + #define DOGLCD_CS EXP1_07_PIN + #define DOGLCD_MOSI EXP1_08_PIN + #define DOGLCD_SCK EXP1_06_PIN #else - #define LCD_PINS_RS 16 - #define LCD_PINS_ENABLE 17 - #define LCD_PINS_D4 23 - #define LCD_PINS_D5 25 - #define LCD_PINS_D6 27 + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN #endif - #define LCD_PINS_D7 29 + #define LCD_PINS_D7 EXP1_03_PIN #if !IS_NEWPANEL - #define BEEPER_PIN 33 + #define BEEPER_PIN EXP2_06_PIN #endif #endif @@ -508,7 +589,7 @@ //#define SHIFT_CLK_PIN 38 //#define SHIFT_LD_PIN 42 //#define SHIFT_OUT_PIN 40 - //#define SHIFT_EN_PIN 17 + //#define SHIFT_EN_PIN EXP1_08_PIN #endif #endif @@ -524,26 +605,26 @@ #if IS_RRD_SC - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_10_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define BTN_EN1 17 - #define BTN_EN2 23 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN #else - #define BTN_EN1 31 - #define BTN_EN2 33 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #endif - #define BTN_ENC 35 + #define BTN_ENC EXP1_09_PIN #ifndef SD_DETECT_PIN - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_04_PIN #endif #ifndef KILL_PIN - #define KILL_PIN 41 + #define KILL_PIN EXP2_03_PIN #endif #if ENABLED(BQ_LCD_SMART_CONTROLLER) - #define LCD_BACKLIGHT_PIN 39 + #define LCD_BACKLIGHT_PIN AUX4_08_PIN #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) @@ -555,11 +636,11 @@ #elif ENABLED(LCD_I2C_PANELOLU2) - #define BTN_EN1 47 - #define BTN_EN2 43 - #define BTN_ENC 32 + #define BTN_EN1 AUX4_04_PIN + #define BTN_EN2 AUX4_06_PIN + #define BTN_ENC AUX4_03_PIN #define LCD_SDSS SDSS - #define KILL_PIN 41 + #define KILL_PIN EXP2_03_PIN #elif ENABLED(LCD_I2C_VIKI) @@ -568,7 +649,7 @@ #define BTN_ENC -1 #define LCD_SDSS SDSS - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_04_PIN #elif ANY(VIKI2, miniVIKI) @@ -576,87 +657,83 @@ #define DOGLCD_A0 44 #define LCD_SCREEN_ROT_180 - #define BEEPER_PIN 33 + #define BEEPER_PIN EXP2_06_PIN #define STAT_LED_RED_PIN 32 - #define STAT_LED_BLUE_PIN 35 + #define STAT_LED_BLUE_PIN EXP1_09_PIN #define BTN_EN1 22 #define BTN_EN2 7 #define BTN_ENC 39 #define SD_DETECT_PIN -1 // Pin 49 for display SD interface, 72 for easy adapter board - #define KILL_PIN 31 + #define KILL_PIN EXP2_08_PIN #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) - #define DOGLCD_CS 29 - #define DOGLCD_A0 27 + #define DOGLCD_CS EXP1_03_PIN + #define DOGLCD_A0 EXP1_04_PIN - #define BEEPER_PIN 23 - #define LCD_BACKLIGHT_PIN 33 + #define BEEPER_PIN EXP1_06_PIN + #define LCD_BACKLIGHT_PIN EXP2_06_PIN - #define BTN_EN1 35 - #define BTN_EN2 37 - #define BTN_ENC 31 + #define BTN_EN1 EXP1_09_PIN + #define BTN_EN2 EXP1_10_PIN + #define BTN_ENC EXP2_08_PIN #define LCD_SDSS SDSS - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 + #define SD_DETECT_PIN EXP2_04_PIN + #define KILL_PIN EXP2_03_PIN #elif EITHER(MKS_MINI_12864, FYSETC_MINI_12864) - #define BEEPER_PIN 37 - #define BTN_ENC 35 - #define SD_DETECT_PIN 49 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN + #ifndef SD_DETECT_PIN + #define SD_DETECT_PIN EXP2_04_PIN + #endif #ifndef KILL_PIN - #define KILL_PIN 41 + #define KILL_PIN EXP2_03_PIN #endif #if ENABLED(MKS_MINI_12864) - #define DOGLCD_A0 27 - #define DOGLCD_CS 25 - - // GLCD features - // Uncomment screen orientation - //#define LCD_SCREEN_ROT_90 - //#define LCD_SCREEN_ROT_180 - //#define LCD_SCREEN_ROT_270 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN // not connected to a pin #define LCD_BACKLIGHT_PIN -1 // 65 (MKS mini12864 can't adjust backlight by software!) - #define BTN_EN1 31 - #define BTN_EN2 33 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #elif ENABLED(FYSETC_MINI_12864) // From https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 - #define DOGLCD_A0 16 - #define DOGLCD_CS 17 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_08_PIN - #define BTN_EN1 33 - #define BTN_EN2 31 + #define BTN_EN1 EXP2_06_PIN + #define BTN_EN2 EXP2_08_PIN //#define FORCE_SOFT_SPI // Use this if default of hardware SPI causes display problems // results in LCD soft SPI mode 3, SD soft SPI mode 0 - #define LCD_RESET_PIN 23 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN 25 + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN 27 + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN 29 + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN 25 + #define NEOPIXEL_PIN EXP1_05_PIN #endif #endif @@ -670,17 +747,11 @@ #define DOGLCD_A0 44 #define DOGLCD_CS 66 - // GLCD features - // Uncomment screen orientation - //#define LCD_SCREEN_ROT_90 - //#define LCD_SCREEN_ROT_180 - //#define LCD_SCREEN_ROT_270 - #define BTN_EN1 40 #define BTN_EN2 63 #define BTN_ENC 59 - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_04_PIN #define KILL_PIN 64 #elif ENABLED(ZONESTAR_LCD) @@ -690,31 +761,35 @@ #elif ENABLED(AZSMZ_12864) // Pins only defined for RAMPS_SMART currently - #error "No pins defined for RAMPS with AZSMZ_12864." + + #elif ENABLED(G3D_PANEL) + + #define BEEPER_PIN EXP2_06_PIN + + #define SD_DETECT_PIN EXP2_04_PIN + #define KILL_PIN EXP2_03_PIN + + #define BTN_EN1 EXP1_10_PIN + #define BTN_EN2 EXP1_09_PIN + #define BTN_ENC EXP2_08_PIN #elif IS_TFTGLCD_PANEL - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_04_PIN #else - // Beeper on AUX-4 - #define BEEPER_PIN 33 + #define BEEPER_PIN EXP2_06_PIN // Buttons are directly attached to AUX-2 #if ENABLED(PANEL_ONE) #define BTN_EN1 59 // AUX2 PIN 3 #define BTN_EN2 63 // AUX2 PIN 4 - #define BTN_ENC 49 // AUX3 PIN 7 + #define BTN_ENC EXP2_04_PIN #else - #define BTN_EN1 37 - #define BTN_EN2 35 - #define BTN_ENC 31 - #endif - - #if ENABLED(G3D_PANEL) - #define SD_DETECT_PIN 49 - #define KILL_PIN 41 + #define BTN_EN1 EXP1_10_PIN + #define BTN_EN2 EXP1_09_PIN + #define BTN_ENC EXP2_08_PIN #endif #endif @@ -741,10 +816,11 @@ #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_RAMPS.h' for details. Comment out this line to continue." - /** FYSETC TFT TFT81050 display pinout + /** + * FYSETC TFT-81050 display pinout * * Board Display - * _____ _____ + * ----- ----- * (SCK) D52 | 1 2 | D50 (MISO) MISO | 1 2 | SCK * (SD_CS) D53 | 3 4 | D33 (BNT_EN2) (BNT_EN2) MOD_RESET | 3 4 | SD_CS * (MOSI) D51 | 5 6 D31 (BNT_EN1) (BNT_EN1) LCD_CS | 5 6 MOSI @@ -766,16 +842,16 @@ * EXP2-7 ----------- EXP1-4 * EXP2-8 ----------- EXP1-3 * EXP2-1 ----------- EXP1-2 - * EXP1-10 ----------- EXP1-1 + * EXP1-10 ---------- EXP1-1 * * NOTE: The MISO pin should not get a 5V signal. * To fix, insert a 1N4148 diode in the MISO line. */ - #define BEEPER_PIN 37 + #define BEEPER_PIN EXP1_10_PIN - #define SD_DETECT_PIN 49 + #define SD_DETECT_PIN EXP2_04_PIN - #define CLCD_MOD_RESET 31 - #define CLCD_SPI_CS 33 + #define CLCD_MOD_RESET EXP2_08_PIN + #define CLCD_SPI_CS EXP2_06_PIN #endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 diff --git a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h index 1dc898e6ca9a..def71fefc13e 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_CREALITY.h @@ -35,7 +35,7 @@ #define MOSFET_D_PIN 7 #define FIL_RUNOUT_PIN 2 -#if NUM_RUNOUT_SENSORS > 1 +#if NUM_RUNOUT_SENSORS >= 2 #define FIL_RUNOUT2_PIN 15 // Creality CR-X can use dual runout sensors #endif @@ -63,6 +63,6 @@ #define EXP4_PIN 12 // PS_ON_PIN #define SUICIDE_PIN 12 // Used by CR2020 Industrial series -#ifndef SUICIDE_PIN_INVERTING - #define SUICIDE_PIN_INVERTING true +#ifndef SUICIDE_PIN_STATE + #define SUICIDE_PIN_STATE HIGH #endif diff --git a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h index 6d2dad231491..974766623594 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_OLD.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_OLD.h @@ -25,9 +25,7 @@ * Arduino Mega with RAMPS v1.0, v1.1, v1.2 pin assignments */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "RAMPS <1.2" @@ -76,11 +74,11 @@ #define TEMP_0_PIN 2 // Analog Input #define TEMP_BED_PIN 1 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h index 23b1dfa34690..af91f63bdb43 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_PLUS.h @@ -37,41 +37,32 @@ * RAMPS_PLUS_SF (Spindle, Controller Fan) */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "RAMPS 1.4 Plus" #define RAMPS_D8_PIN 10 #define RAMPS_D10_PIN 8 -#include "pins_RAMPS.h" - // -// Steppers - Swap E0 / E1 on 3DYMY +// Steppers // -#undef E0_STEP_PIN -#undef E0_DIR_PIN -#undef E0_ENABLE_PIN - -#undef E1_STEP_PIN -#undef E1_DIR_PIN -#undef E1_ENABLE_PIN +#define X_CS_PIN -1 +#define Y_CS_PIN -1 +#define Z_CS_PIN -1 +// Swap E0 / E1 on 3DYMY #define E0_STEP_PIN 36 #define E0_DIR_PIN 34 #define E0_ENABLE_PIN 30 +#define E0_CS_PIN -1 #define E1_STEP_PIN 26 #define E1_DIR_PIN 28 #define E1_ENABLE_PIN 24 +#define E1_CS_PIN -1 -#undef X_CS_PIN -#undef Y_CS_PIN -#undef Z_CS_PIN -#undef E0_CS_PIN -#undef E1_CS_PIN +#include "pins_RAMPS.h" #if IS_ULTRA_LCD && NONE(REPRAPWORLD_GRAPHICAL_LCD, CR10_STOCKDISPLAY) && !BOTH(IS_NEWPANEL, PANEL_ONE) #if DISABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306) diff --git a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h index 1bcf310bc17c..e1ba91cde8f0 100644 --- a/Marlin/src/pins/ramps/pins_RAMPS_S_12.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_S_12.h @@ -34,9 +34,7 @@ * Other pins_MYBOARD.h files may override these defaults */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" // Custom flags and defines for the build //#define BOARD_CUSTOM_BUILD_FLAGS -D__FOO__ diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h index 345c51d5de59..0263c78b06de 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD.h @@ -29,6 +29,18 @@ #define BOARD_INFO_NAME "RigidBoard" #endif +// +// Steppers +// RigidBot swaps E0 / E1 plugs vs RAMPS 1.3 +// +#define E0_STEP_PIN 36 +#define E0_DIR_PIN 34 +#define E0_ENABLE_PIN 30 + +#define E1_STEP_PIN 26 +#define E1_DIR_PIN 28 +#define E1_ENABLE_PIN 24 + // // Z Probe (when not Z_MIN_PIN) // @@ -45,24 +57,6 @@ #include "pins_RAMPS.h" -// -// Steppers -// -// RigidBot swaps E0 / E1 plugs vs RAMPS 1.3 -#undef E0_STEP_PIN -#undef E0_DIR_PIN -#undef E0_ENABLE_PIN -#define E0_STEP_PIN 36 -#define E0_DIR_PIN 34 -#define E0_ENABLE_PIN 30 - -#undef E1_STEP_PIN -#undef E1_DIR_PIN -#undef E1_ENABLE_PIN -#define E1_STEP_PIN 26 -#define E1_DIR_PIN 28 -#define E1_ENABLE_PIN 24 - #define STEPPER_RESET_PIN 41 // Stepper drivers have a reset on RigidBot // @@ -75,12 +69,12 @@ #define TEMP_1_PIN 13 // Analog Input #define TEMP_BED_PIN 15 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple -#undef MAX6675_SS_PIN +// SPI for MAX Thermocouple +#undef TEMP_0_CS_PIN #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card + #define TEMP_0_CS_PIN 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card #else - #define MAX6675_SS_PIN 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present + #define TEMP_0_CS_PIN 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #endif // diff --git a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h index 1428de31a22b..8242f1a77294 100644 --- a/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h +++ b/Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h @@ -27,14 +27,14 @@ #define BOARD_INFO_NAME "RigidBoard V2" -#include "pins_RIGIDBOARD.h" +#include "pins_RIGIDBOARD.h" // ... RAMPS // // Steppers // // I2C based DAC like on the Printrboard REVF -#define HAS_MOTOR_CURRENT_DAC +#define HAS_MOTOR_CURRENT_DAC 1 // Channels available for DAC, For Rigidboard there are 4 #define DAC_STEPPER_ORDER { 0, 1, 2, 3 } diff --git a/Marlin/src/pins/ramps/pins_RUMBA.h b/Marlin/src/pins/ramps/pins_RUMBA.h index 4af49d9164d4..d8e2dd09715f 100644 --- a/Marlin/src/pins/ramps/pins_RUMBA.h +++ b/Marlin/src/pins/ramps/pins_RUMBA.h @@ -25,9 +25,10 @@ * RUMBA pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 3 || E_STEPPERS > 3 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 3 || E_STEPPERS > 3 #error "RUMBA supports up to 3 hotends / E-steppers. Comment out this line to continue." #endif @@ -46,12 +47,27 @@ // // Limit Switches // -#define X_MIN_PIN 37 -#define X_MAX_PIN 36 -#define Y_MIN_PIN 35 -#define Y_MAX_PIN 34 -#define Z_MIN_PIN 33 -#define Z_MAX_PIN 32 +#ifndef X_MIN_PIN + #define X_MIN_PIN 37 +#endif +#ifndef X_MIN_PIN + #define X_MIN_PIN 37 +#endif +#ifndef X_MAX_PIN + #define X_MAX_PIN 36 +#endif +#ifndef Y_MIN_PIN + #define Y_MIN_PIN 35 +#endif +#ifndef Y_MAX_PIN + #define Y_MAX_PIN 34 +#endif +#ifndef Z_MIN_PIN + #define Z_MIN_PIN 33 +#endif +#ifndef Z_MAX_PIN + #define Z_MAX_PIN 32 +#endif // // Z Probe (when not Z_MIN_PIN) diff --git a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h index 84e7e311264e..b884fcbfc7c1 100644 --- a/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h +++ b/Marlin/src/pins/ramps/pins_TENLOG_D3_HERO.h @@ -25,9 +25,10 @@ * Tenlog pin assignments */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "Tenlog supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif @@ -122,11 +123,11 @@ #define TEMP_1_PIN 15 // Analog Input #define TEMP_BED_PIN 14 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN -1 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN -1 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN -1 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN -1 // Don't use 49 (SD_DETECT_PIN) #endif // @@ -137,7 +138,7 @@ #define HEATER_BED_PIN 8 #define FAN_PIN 9 -#define FAN1_PIN 5 // Normall this would be a servo pin +#define FAN1_PIN 5 // Normally this would be a servo pin // XXX Runout support unknown? //#define NUM_RUNOUT_SENSORS 0 diff --git a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h index 9508be0173d6..eee0dcd3d26f 100644 --- a/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h +++ b/Marlin/src/pins/ramps/pins_TRIGORILLA_13.h @@ -29,15 +29,16 @@ #define IS_RAMPS_EFB #define RAMPS_D9_PIN 44 + +#define E1_STEP_PIN -1 +#define E1_DIR_PIN -1 +#define E1_ENABLE_PIN -1 +#define E1_CS_PIN -1 + #define FAN2_PIN 9 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN 9 #endif -#include "pins_RAMPS_13.h" - -#undef E1_STEP_PIN -#undef E1_DIR_PIN -#undef E1_ENABLE_PIN -#undef E1_CS_PIN +#include "pins_RAMPS_13.h" // ... RAMPS diff --git a/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h b/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h index f342eff8aa6c..ffe6d56eb8b1 100644 --- a/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h +++ b/Marlin/src/pins/ramps/pins_TRONXY_V3_1_0.h @@ -25,9 +25,10 @@ * Arduino Mega for Tronxy X5S-2E, etc. */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "TRONXY-V3-1.0 supports only 2 hotends/E-steppers. Comment out this line to continue." #endif diff --git a/Marlin/src/pins/ramps/pins_TT_OSCAR.h b/Marlin/src/pins/ramps/pins_TT_OSCAR.h index ca402553e112..01769fbff0cd 100644 --- a/Marlin/src/pins/ramps/pins_TT_OSCAR.h +++ b/Marlin/src/pins/ramps/pins_TT_OSCAR.h @@ -19,10 +19,9 @@ * along with this program. If not, see . * */ +#pragma once -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #if HOTENDS > 5 || E_STEPPERS > 5 #error "TTOSCAR supports up to 5 hotends / E-steppers. Comment out this line to continue." @@ -118,10 +117,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E3_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN -1 // 59 #define X_SERIAL_RX_PIN -1 // 63 #define X2_SERIAL_TX_PIN -1 @@ -182,11 +177,11 @@ #define TEMP_4_PIN 12 #endif -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple //#if DISABLED(SDSUPPORT) -// #define MAX6675_SS_PIN 66 // Don't use 53 if using Display/SD card +// #define TEMP_0_CS_PIN 66 // Don't use 53 if using Display/SD card //#else -// #define MAX6675_SS_PIN 66 // Don't use 49 (SD_DETECT_PIN) +// #define TEMP_0_CS_PIN 66 // Don't use 49 (SD_DETECT_PIN) //#endif // @@ -229,28 +224,28 @@ #endif // -// Case Light +// M3/M4/M5 - Spindle/Laser Control // -#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENABLE_PIN) +#if EITHER(SPINDLE_FEATURE, LASER_FEATURE) && !PIN_EXISTS(SPINDLE_LASER_ENA) #if !NUM_SERVOS // Prefer the servo connector - #define CASE_LIGHT_PIN 6 // Hardware PWM + #define SPINDLE_LASER_ENA_PIN 4 // Pullup or pulldown! + #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM + #define SPINDLE_DIR_PIN 5 #elif HAS_FREE_AUX2_PINS // Try to use AUX 2 - #define CASE_LIGHT_PIN 44 // Hardware PWM + #define SPINDLE_LASER_ENA_PIN 40 // Pullup or pulldown! + #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM + #define SPINDLE_DIR_PIN 65 #endif #endif // -// M3/M4/M5 - Spindle/Laser Control +// Case Light // -#if ENABLED(SPINDLE_LASER_ENABLE) && !PIN_EXISTS(SPINDLE_LASER_ENABLE) +#if ENABLED(CASE_LIGHT_ENABLE) && !PIN_EXISTS(CASE_LIGHT) && !defined(SPINDLE_LASER_ENA_PIN) #if !NUM_SERVOS // Prefer the servo connector - #define SPINDLE_LASER_ENABLE_PIN 4 // Pullup or pulldown! - #define SPINDLE_LASER_PWM_PIN 6 // Hardware PWM - #define SPINDLE_DIR_PIN 5 + #define CASE_LIGHT_PIN 6 // Hardware PWM #elif HAS_FREE_AUX2_PINS // Try to use AUX 2 - #define SPINDLE_LASER_ENABLE_PIN 40 // Pullup or pulldown! - #define SPINDLE_LASER_PWM_PIN 44 // Hardware PWM - #define SPINDLE_DIR_PIN 65 + #define CASE_LIGHT_PIN 44 // Hardware PWM #endif #endif diff --git a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h index 211caddba0ef..128f1974e0e6 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAIN_2.h @@ -33,9 +33,8 @@ * case light */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#define REQUIRE_MEGA2560 +#include "env_validate.h" #define BOARD_INFO_NAME "Ultimaker 2.x" #define DEFAULT_MACHINE_NAME "Ultimaker" diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER.h b/Marlin/src/pins/ramps/pins_ULTIMAKER.h index 22c7fd95b47e..0bc04d962aaf 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER.h @@ -33,9 +33,7 @@ * case light */ -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Ultimaker" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME diff --git a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h index 37c28ece4ce4..091356a11f82 100644 --- a/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h +++ b/Marlin/src/pins/ramps/pins_ULTIMAKER_OLD.h @@ -60,9 +60,7 @@ //#define BOARD_REV_1_0 //#define BOARD_REV_1_5 -#if NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif +#include "env_validate.h" #ifdef BOARD_REV_1_1_TO_1_3 #define BOARD_INFO_NAME "Ultimaker 1.1-1.3" diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V20.h b/Marlin/src/pins/ramps/pins_ZRIB_V20.h index 6c4b28d0b874..e9328ca7bae9 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V20.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V20.h @@ -26,7 +26,7 @@ * V2 and V3 Boards only differ in USB controller, nothing affecting the pins. */ -#include "pins_MKS_GEN_13.h" +#include "pins_MKS_GEN_13.h" // ... RAMPS #define ZRIB_V20_D6_PIN 6 // Fan #define ZRIB_V20_D9_PIN 9 // Fan2 diff --git a/Marlin/src/pins/ramps/pins_ZRIB_V52.h b/Marlin/src/pins/ramps/pins_ZRIB_V52.h index 983c840bbc13..a6e9175b621b 100644 --- a/Marlin/src/pins/ramps/pins_ZRIB_V52.h +++ b/Marlin/src/pins/ramps/pins_ZRIB_V52.h @@ -46,8 +46,9 @@ #define E2_STEP_PIN 4 #define E2_DIR_PIN 5 #define E2_ENABLE_PIN 22 +#define HEATER_1_PIN 7 -#include "pins_MKS_BASE_common.h" +#include "pins_MKS_BASE_common.h" // ... RAMPS /* Available connectors on MKS BASE v1.4 (Basically same as ZRIB V5.2) diff --git a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h index 096d970871f2..feaa4ba98b95 100644 --- a/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h +++ b/Marlin/src/pins/ramps/pins_Z_BOLT_X_SERIES.h @@ -25,9 +25,10 @@ * Z-Bolt X Series board – based on Arduino Mega2560 */ -#if NOT_TARGET(__AVR_ATmega2560__) - #error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#elif HOTENDS > 4 || E_STEPPERS > 4 +#define REQUIRE_MEGA2560 +#include "env_validate.h" + +#if HOTENDS > 4 || E_STEPPERS > 4 #error "Z-Bolt X Series board supports up to 4 hotends / E-steppers." #endif @@ -212,10 +213,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN 40 #endif diff --git a/Marlin/src/pins/sam/env_validate.h b/Marlin/src/pins/sam/env_validate.h new file mode 100644 index 000000000000..09bcd1364921 --- /dev/null +++ b/Marlin/src/pins/sam/env_validate.h @@ -0,0 +1,33 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if BOTH(ALLOW_MEGA1280, ALLOW_MEGA2560) && NOT_TARGET(__SAM3X8E__, __AVR_ATmega1280__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'" +#elif ENABLED(ALLOW_MEGA2560) && NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__) + #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'" +#elif ENABLED(ALLOW_MEGA1280) && NOT_TARGET(__SAM3X8E__, __AVR_ATmega1280__) + #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" +#endif + +#undef ALLOW_MEGA1280 +#undef ALLOW_MEGA2560 diff --git a/Marlin/src/pins/sam/pins_ADSK.h b/Marlin/src/pins/sam/pins_ADSK.h index b0e171cf1716..425d6d45afb3 100644 --- a/Marlin/src/pins/sam/pins_ADSK.h +++ b/Marlin/src/pins/sam/pins_ADSK.h @@ -27,9 +27,9 @@ #define BOARD_INFO_NAME "ADSK" -#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega1280__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'" -#endif +#define ALLOW_MEGA1280 +#define ALLOW_MEGA2560 +#include "env_validate.h" /* CNC shield modifications: FROM THE BOTTOM CUT THE 5V PIN THAT GOES TO ARDUINO!!! @@ -47,10 +47,10 @@ A stepper for E0 extruder Vcc (now "5V" on the board but actual 3.3V because of jumper)) (Hold)&(GND) - Bed thermistor (also require pullup resistor 4.7K between "Hold" and Vcc (now "5V" on the board but actual 3.3V because of jumper)) -(CoolEn) - 3.3v signal to controll extruder heater MOSFET +(CoolEn) - 3.3v signal to control extruder heater MOSFET (Resume) - 3.3v signal to control heatbed MOSFET -(SDA) - 3.3v signal to controll extruder fan -(SCL) - 3.3v signal to controll extruder cooling fan +(SDA) - 3.3v signal to control extruder fan +(SCL) - 3.3v signal to control extruder cooling fan */ /* CNC Shield pinout @@ -86,9 +86,9 @@ A stepper for E0 extruder // // Limit Switches // -#define X_MIN_PIN 9 -#define Y_MIN_PIN 10 -#define Z_MIN_PIN 11 +#define X_STOP_PIN 9 +#define Y_STOP_PIN 10 +#define Z_STOP_PIN 11 #define Z_MIN_PROBE_PIN 62 // Analog pin 8, Digital pin 62 @@ -137,7 +137,7 @@ A stepper for E0 extruder * The 2004 LCD should be powered with 5V. * The next LCD pins RS,D4,D5,D6,D7 have internal pull-ups to 5V and as result the 5V will be on these pins. * Luckily these internal pull-ups have really high resistance and adding 33K pull-down resistors will create - * simple voltage divider that will bring the voltage down just slightly bellow 3.3V. + * simple voltage divider that will bring the voltage down just slightly below 3.3V. * * This LCD also has buttons that connected to the same ADC pin with different voltage divider combinations. * On the LCD panel there is internal pull-up resistor of the 4.7K connected to 5V. @@ -175,7 +175,7 @@ A stepper for E0 extruder #define ADC_BUTTONS_VALUE_SCALE (5.0/AREF_VOLTS) // The LCD module pullup voltage is 5.0V but ADC reference voltage is 3.3V - #define ADC_BUTTONS_R_PULLDOWN 4.7 // Moves voltage down to be bellow 3.3V instead of 5V + #define ADC_BUTTONS_R_PULLDOWN 4.7 // Moves voltage down to be below 3.3V instead of 5V // the resistors values will be scaled because of 4.7K pulldown parallel resistor #define _ADC_BUTTONS_R_SCALED(R) ((R) * (ADC_BUTTONS_R_PULLDOWN) / ((R) + ADC_BUTTONS_R_PULLDOWN)) diff --git a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h index b01d1aafdfe0..70c3853dc941 100644 --- a/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h +++ b/Marlin/src/pins/sam/pins_ALLIGATOR_R2.h @@ -26,9 +26,7 @@ * https://reprap.org/wiki/Alligator_Board */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Alligator Board R2" @@ -125,20 +123,20 @@ #define SPI_CHAN_DAC 1 -#define DAC0_SYNC 53 // PB14 -#define DAC1_SYNC 6 // PC24 +#define DAC0_SYNC_PIN 53 // PB14 +#define DAC1_SYNC_PIN 6 // PC24 // 64K SPI EEPROM #define SPI_EEPROM #define SPI_CHAN_EEPROM1 2 -#define SPI_EEPROM1_CS 25 // PD0 +#define SPI_EEPROM1_CS_PIN 25 // PD0 // 2K SPI EEPROM -#define SPI_EEPROM2_CS 26 // PD1 +#define SPI_EEPROM2_CS_PIN 26 // PD1 // FLASH SPI // 32Mb -#define SPI_FLASH_CS 23 // PA14 +#define SPI_FLASH_CS_PIN 23 // PA14 // // LCD / Controller diff --git a/Marlin/src/pins/sam/pins_ARCHIM2.h b/Marlin/src/pins/sam/pins_ARCHIM2.h index 3776cf8bb548..ecff888ff05e 100644 --- a/Marlin/src/pins/sam/pins_ARCHIM2.h +++ b/Marlin/src/pins/sam/pins_ARCHIM2.h @@ -71,7 +71,7 @@ #define E0_DIAG_PIN 78 // PB23 #define E1_DIAG_PIN 25 // PD0 - #if X_HOME_DIR < 0 + #if X_HOME_TO_MIN #define X_MIN_PIN X_DIAG_PIN #define X_MAX_PIN 32 #else @@ -79,7 +79,7 @@ #define X_MAX_PIN X_DIAG_PIN #endif - #if Y_HOME_DIR < 0 + #if Y_HOME_TO_MIN #define Y_MIN_PIN Y_DIAG_PIN #define Y_MAX_PIN 15 #else diff --git a/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h b/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h index 5bf31450b707..d44f6490da63 100644 --- a/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h +++ b/Marlin/src/pins/sam/pins_CNCONTROLS_15D.h @@ -19,14 +19,13 @@ * along with this program. If not, see . * */ +#pragma once /** * CNControls V15 for HMS434 with DUE pin assignments */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "CN Controls V15D" diff --git a/Marlin/src/pins/sam/pins_DUE3DOM.h b/Marlin/src/pins/sam/pins_DUE3DOM.h index 90d6bdc3403d..81eca3e4b14a 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM.h @@ -25,9 +25,7 @@ * DUE3DOM pin assignments */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "DUE3DOM" @@ -84,11 +82,11 @@ #define TEMP_2_PIN 5 // Analog Input (unused) #define TEMP_BED_PIN 1 // Analog Input (BED thermistor) -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN -1 + #define TEMP_0_CS_PIN -1 #else - #define MAX6675_SS_PIN -1 + #define TEMP_0_CS_PIN -1 #endif // @@ -130,7 +128,6 @@ #define BTN_EN2 52 #define BTN_ENC 48 - #define SDSS 4 #define SD_DETECT_PIN 14 #elif ENABLED(RADDS_DISPLAY) @@ -143,8 +140,6 @@ #define BTN_BACK 71 - #undef SDSS - #define SDSS 4 #define SD_DETECT_PIN 14 #elif HAS_U8GLIB_I2C_OLED diff --git a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h index 5a205423ed5b..7754fa9329f9 100644 --- a/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h +++ b/Marlin/src/pins/sam/pins_DUE3DOM_MINI.h @@ -25,9 +25,7 @@ * DUE3DOM MINI pin assignments */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "DUE3DOM MINI" @@ -42,12 +40,9 @@ // // Limit Switches // -#define X_MIN_PIN 38 -#define X_MAX_PIN -1 -#define Y_MIN_PIN 34 -#define Y_MAX_PIN -1 -#define Z_MIN_PIN 30 -#define Z_MAX_PIN -1 +#define X_STOP_PIN 38 +#define Y_STOP_PIN 34 +#define Z_STOP_PIN 30 // // Steppers @@ -73,14 +68,14 @@ // #define TEMP_0_PIN 0 // Analog Input (HOTEND0 thermistor) #define TEMP_1_PIN 2 // Analog Input (unused) -#define TEMP_2_PIN 5 // Analog Input (OnBoard thermistor beta 3950) #define TEMP_BED_PIN 1 // Analog Input (BED thermistor) +#define TEMP_BOARD_PIN 5 // Analog Input (OnBoard thermistor beta 3950) -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #endif // @@ -122,7 +117,10 @@ #define BTN_EN2 52 #define BTN_ENC 48 - #define SDSS 4 + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + #define SD_DETECT_PIN 14 #elif ENABLED(RADDS_DISPLAY) @@ -135,8 +133,6 @@ #define BTN_BACK 71 - #undef SDSS - #define SDSS 4 #define SD_DETECT_PIN 14 #elif HAS_U8GLIB_I2C_OLED @@ -145,7 +141,7 @@ #define BTN_EN2 52 #define BTN_ENC 48 #define BEEPER_PIN 41 - #define LCD_SDSS 4 + #define LCD_SDSS SDSS #define SD_DETECT_PIN 14 #elif ENABLED(SPARK_FULL_GRAPHICS) @@ -160,20 +156,17 @@ #define BEEPER_PIN -1 - #elif ENABLED(MINIPANEL) + #elif ENABLED(MINIPANEL) + #define BTN_EN1 52 #define BTN_EN2 50 #define BTN_ENC 48 - #define LCD_SDSS 4 + #define LCD_SDSS SDSS #define SD_DETECT_PIN 14 #define BEEPER_PIN 41 #define DOGLCD_A0 46 #define DOGLCD_CS 45 - #endif // SPARK_FULL_GRAPHICS - - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/sam/pins_KRATOS32.h b/Marlin/src/pins/sam/pins_KRATOS32.h new file mode 100644 index 000000000000..f429e5634706 --- /dev/null +++ b/Marlin/src/pins/sam/pins_KRATOS32.h @@ -0,0 +1,179 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * KRATOS32 + */ + +#include "env_validate.h" + +#define BOARD_INFO_NAME "K.3D KRATOS32" + +// +// EEPROM +// +#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) + #define I2C_EEPROM + #define MARLIN_EEPROM_SIZE 0x1F400 // 16KB +#endif + +// +// Servos +// +#define SERVO0_PIN 6 +#define SERVO1_PIN 5 +#define SERVO2_PIN 39 +#define SERVO3_PIN 40 // CAMERA_PIN (extended to the top of the LCD module) +#define SERVO4_PIN 45 // FIL_RUNOUT_PIN + +// +// Limit Switches +// +#define X_MIN_PIN 28 +#define X_MAX_PIN 34 +#define Y_MIN_PIN 30 +#define Y_MAX_PIN 36 +#define Z_MIN_PIN 32 +#define Z_MAX_PIN 38 + +// +// Steppers +// +#define X_STEP_PIN 24 +#define X_DIR_PIN 23 +#define X_ENABLE_PIN 26 +#ifndef X_CS_PIN + #define X_CS_PIN 25 +#endif + +#define Y_STEP_PIN 17 +#define Y_DIR_PIN 16 +#define Y_ENABLE_PIN 22 +#ifndef Y_CS_PIN + #define Y_CS_PIN 27 +#endif + +#define Z_STEP_PIN 2 +#define Z_DIR_PIN 3 +#define Z_ENABLE_PIN 15 +#ifndef Z_CS_PIN + #define Z_CS_PIN 29 +#endif + +#define E0_STEP_PIN 61 +#define E0_DIR_PIN 60 +#define E0_ENABLE_PIN 62 +#ifndef E0_CS_PIN + #define E0_CS_PIN 31 +#endif + +#define E1_STEP_PIN 64 +#define E1_DIR_PIN 63 +#define E1_ENABLE_PIN 65 +#ifndef E1_CS_PIN + #define E1_CS_PIN 37 +#endif + +#define E2_STEP_PIN 68 +#define E2_DIR_PIN 67 +#define E2_ENABLE_PIN 69 +#ifndef E2_CS_PIN + #define E2_CS_PIN 35 +#endif + +#define E3_STEP_PIN 51 +#define E3_DIR_PIN 53 +#define E3_ENABLE_PIN 49 +#ifndef E3_CS_PIN + #define E3_CS_PIN 33 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN 0 // Analog Input +#define TEMP_1_PIN 1 // Analog Input +#define TEMP_2_PIN 2 // Analog Input +#define TEMP_3_PIN 3 // Analog Input +#define TEMP_BED_PIN 4 // Analog Input + +// +// Heaters / Fans +// +#define HEATER_0_PIN 13 +#define HEATER_1_PIN 12 +#define HEATER_2_PIN 11 +#define HEATER_3_PIN 10 +#define HEATER_BED_PIN 7 // BED + +#ifndef FAN_PIN + #define FAN_PIN 9 +#endif +#define FAN1_PIN 8 + +// +// Misc. Functions +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN 45 // SERVO4_PIN +#endif + +#ifndef PS_ON_PIN + #define PS_ON_PIN 59 +#endif + +// +// LCD / Controller +// +#if HAS_WIRED_LCD + + #define BTN_EN1 48 + #define BTN_EN2 50 + #define BTN_ENC 46 + + #define SDSS 4 + #define SD_DETECT_PIN 14 + + #define BEEPER_PIN 41 + #define KILL_PIN 66 + + #if IS_RRD_FG_SC + + #define LCD_PINS_RS 42 + #define LCD_PINS_ENABLE 43 + #define LCD_PINS_D4 44 + + #define BTN_BACK 52 + + #elif ENABLED(K3D_242_OLED_CONTROLLER) + + #define LCD_PINS_DC 44 + #define LCD_PINS_RS 42 + #define DOGLCD_CS 52 + #define DOGLCD_MOSI 43 + #define DOGLCD_SCK 47 + #define DOGLCD_A0 LCD_PINS_DC + + #endif + +#endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h index 424d858a8512..aa01a9227fb3 100644 --- a/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h +++ b/Marlin/src/pins/sam/pins_PRINTRBOARD_G2.h @@ -25,9 +25,7 @@ * PRINTRBOARD_G2 */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Printrboard G2" @@ -42,9 +40,9 @@ // // Limit Switches // -#define X_MIN_PIN 22 // PB26 -#define Y_MAX_PIN 18 // PA11 -#define Z_MIN_PIN 19 // PA10 +#define X_STOP_PIN 22 // PB26 +#define Y_STOP_PIN 18 // PA11 +#define Z_STOP_PIN 19 // PA10 // // Z Probe (when not Z_MIN_PIN) diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index 7b9c7f1b2818..7a865b4ad870 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -25,9 +25,7 @@ * RADDS */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "RADDS" @@ -181,11 +179,11 @@ #define TEMP_4_PIN 5 // dummy so will compile when PINS_DEBUGGING is enabled #define TEMP_BED_PIN 4 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 49 + #define TEMP_0_CS_PIN 49 #endif // diff --git a/Marlin/src/pins/sam/pins_RAMPS4DUE.h b/Marlin/src/pins/sam/pins_RAMPS4DUE.h index 54548333b5fd..6d9d06a17561 100644 --- a/Marlin/src/pins/sam/pins_RAMPS4DUE.h +++ b/Marlin/src/pins/sam/pins_RAMPS4DUE.h @@ -39,14 +39,9 @@ * A15 | NC */ -#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino Due' or 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - +#define ALLOW_SAM3X8E #define BOARD_INFO_NAME "RAMPS4DUE" -#define IS_RAMPS4DUE - // // Temperature Sensors // diff --git a/Marlin/src/pins/sam/pins_RAMPS_DUO.h b/Marlin/src/pins/sam/pins_RAMPS_DUO.h index d2ab5c96b22d..5b2b2f0b6615 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_DUO.h +++ b/Marlin/src/pins/sam/pins_RAMPS_DUO.h @@ -43,14 +43,9 @@ * A15 | A11 */ -#if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__) - #error "Oops! Select 'Arduino Due' or 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'" -#endif - #define BOARD_INFO_NAME "RAMPS Duo" -#define IS_RAMPS_DUO - +#define ALLOW_SAM3X8E #include "../ramps/pins_RAMPS.h" // @@ -65,12 +60,12 @@ #undef TEMP_BED_PIN #define TEMP_BED_PIN 10 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple -#undef MAX6675_SS_PIN +// SPI for MAX Thermocouple +#undef TEMP_0_CS_PIN #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 69 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 69 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 69 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 69 // Don't use 49 (SD_DETECT_PIN) #endif // diff --git a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h index 80e8f0dc7e9d..30f209ad3713 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h +++ b/Marlin/src/pins/sam/pins_RAMPS_FD_V1.h @@ -28,9 +28,7 @@ * Use 4k7 thermistor tables */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "RAMPS-FD v1" @@ -111,11 +109,11 @@ #define TEMP_2_PIN 3 // Analog Input #define TEMP_BED_PIN 0 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 49 + #define TEMP_0_CS_PIN 49 #endif // diff --git a/Marlin/src/pins/sam/pins_RAMPS_SMART.h b/Marlin/src/pins/sam/pins_RAMPS_SMART.h index 9b76ee290b96..96d0c9e1cc9a 100644 --- a/Marlin/src/pins/sam/pins_RAMPS_SMART.h +++ b/Marlin/src/pins/sam/pins_RAMPS_SMART.h @@ -60,18 +60,26 @@ * (Search the web for "Arduino DUE Board Pinout" to see the correct header.) */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif - #define BOARD_INFO_NAME "RAMPS-SMART" -#define IS_RAMPS_SMART +#define ALLOW_SAM3X8E #include "../ramps/pins_RAMPS.h" // I2C EEPROM with 4K of space #define I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 +#define SDA_PIN 20 +#define SCL_PIN 21 + +// See EEPROM device datasheet for the following values. These are for 24xx256 +#define EEPROM_SERIAL_ADDR 0x50 // 7 bit i2c address (without R/W bit) +#define EEPROM_PAGE_SIZE 64 // page write buffer size +#define EEPROM_PAGE_WRITE_TIME 7 // page write time in milliseconds (docs say 5ms but that is too short) + +#define TWI_CLOCK_FREQ 400000 +#define EEPROM_ADDRSZ_BYTES TWI_MMR_IADRSZ_2_BYTE // TWI_MMR_IADRSZ_1_BYTE for 1 byte, or TWI_MMR_IADRSZ_2_BYTE for 2 byte +#define EEPROM_AVAILABLE EEPROM_I2C + #define RESET_PIN 42 // Resets the board if the jumper is attached // @@ -86,17 +94,18 @@ #undef TEMP_BED_PIN #define TEMP_BED_PIN 11 // Analog Input -// SPI for Max6675 or Max31855 Thermocouple -#undef MAX6675_SS_PIN +// SPI for MAX Thermocouple +#undef TEMP_0_CS_PIN #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 67 // Don't use 53 if using Display/SD card + #define TEMP_0_CS_PIN 67 // Don't use 53 if using Display/SD card #else - #define MAX6675_SS_PIN 67 // Don't use 49 (SD_DETECT_PIN) + #define TEMP_0_CS_PIN 67 // Don't use 49 (SD_DETECT_PIN) #endif // // LCD / Controller // + // Support for AZSMZ 12864 LCD with SD Card 3D printer smart controller control panel #if ENABLED(AZSMZ_12864) #define BEEPER_PIN 66 // Smart RAMPS 1.42 pinout diagram on RepRap WIKI erroneously says this should be pin 65 diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h index 6a283401f453..5e612d3e8c22 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_11.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_11.h @@ -20,6 +20,7 @@ * * Ported sys0724 & Vynt */ +#pragma once /** * Arduino Mega? or Due with RuRAMPS4DUE pin assignments @@ -32,9 +33,7 @@ * | */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "RuRAMPS4Due v1.1" @@ -118,7 +117,7 @@ //#define E3_MS2_PIN ? //#define E3_MS3_PIN ? -#if HAS_CUSTOM_PROBE_PIN +#if USES_Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN 49 #endif @@ -157,12 +156,12 @@ #define TEMP_5_PIN 6 // A6 (Marlin 2.0 not support) #endif -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple /* #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 49 + #define TEMP_0_CS_PIN 49 #endif */ @@ -191,11 +190,11 @@ //#define EEPROM_SD // EEPROM on SDCARD //#define SPI_EEPROM // EEPROM on SPI-0 //#define SPI_CHAN_EEPROM1 ? -//#define SPI_EEPROM1_CS ? +//#define SPI_EEPROM1_CS_PIN ? // 2K EEPROM -//#define SPI_EEPROM2_CS ? +//#define SPI_EEPROM2_CS_PIN ? // 32Mb FLASH -//#define SPI_FLASH_CS ? +//#define SPI_FLASH_CS_PIN ? // // LCD / Controller diff --git a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h index 6ec10f64af7d..37a76c527821 100644 --- a/Marlin/src/pins/sam/pins_RURAMPS4D_13.h +++ b/Marlin/src/pins/sam/pins_RURAMPS4D_13.h @@ -20,6 +20,7 @@ * * Ported sys0724 & Vynt */ +#pragma once /** * Arduino Mega? or Due with RuRAMPS4DUE pin assignments @@ -32,9 +33,7 @@ * | */ -#if NOT_TARGET(__SAM3X8E__) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "RuRAMPS4Due v1.3" @@ -106,7 +105,7 @@ #define E2_CS_PIN 61 #endif -#if HAS_CUSTOM_PROBE_PIN +#if USES_Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN 49 #endif @@ -143,12 +142,12 @@ #define TEMP_5_PIN 6 // A6 (Marlin 2.0 not support) #endif -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple /* #if DISABLED(SDSUPPORT) - #define MAX6675_SS_PIN 53 + #define TEMP_0_CS_PIN 53 #else - #define MAX6675_SS_PIN 49 + #define TEMP_0_CS_PIN 49 #endif */ @@ -177,11 +176,11 @@ //#define EEPROM_SD // EEPROM on SDCARD //#define SPI_EEPROM // EEPROM on SPI-0 //#define SPI_CHAN_EEPROM1 ? -//#define SPI_EEPROM1_CS ? +//#define SPI_EEPROM1_CS_PIN ? // 2K EEPROM -//#define SPI_EEPROM2_CS ? +//#define SPI_EEPROM2_CS_PIN ? // 32Mb FLASH -//#define SPI_FLASH_CS ? +//#define SPI_FLASH_CS_PIN ? // // LCD / Controller diff --git a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h index ea096187f713..fd30c2b69a86 100644 --- a/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h +++ b/Marlin/src/pins/sam/pins_ULTRATRONICS_PRO.h @@ -26,9 +26,7 @@ * https://reprapworld.com/documentation/datasheet_ultratronics10_05.pdf */ -#if NOT_TARGET(ARDUINO_ARCH_SAM) - #error "Oops! Select 'Arduino Due' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Ultratronics v1.0" @@ -139,24 +137,23 @@ // SPI Buses // -#define DAC0_SYNC 53 // PB14 +#define DAC0_SYNC_PIN 53 // PB14 #define SPI_CHAN_DAC 1 #define SPI_CHAN_EEPROM1 -1 -#define SPI_EEPROM1_CS -1 -#define SPI_EEPROM2_CS -1 -#define SPI_FLASH_CS -1 +#define SPI_EEPROM1_CS_PIN -1 +#define SPI_EEPROM2_CS_PIN -1 +#define SPI_FLASH_CS_PIN -1 #define SD_SCK_PIN 76 #define SD_MISO_PIN 74 #define SD_MOSI_PIN 75 -// SPI for Max6675 or Max31855 Thermocouple -#define MAX6675_SS_PIN 65 -#define MAX31855_SS0 65 -#define MAX31855_SS1 52 -#define MAX31855_SS2 50 -#define MAX31855_SS3 51 +// SPI for MAX Thermocouple +#define TEMP_0_CS_PIN 65 +#define TEMP_1_CS_PIN 52 +#define TEMP_2_CS_PIN 50 +#define TEMP_3_CS_PIN 51 #define ENC424_SS 61 diff --git a/Marlin/src/pins/samd/pins_RAMPS_144.h b/Marlin/src/pins/samd/pins_RAMPS_144.h index 7a72ef651f1d..449ae0273e23 100644 --- a/Marlin/src/pins/samd/pins_RAMPS_144.h +++ b/Marlin/src/pins/samd/pins_RAMPS_144.h @@ -89,13 +89,6 @@ #define Z_CS_PIN 32 #endif -#define Z2_STEP_PIN 36 -#define Z2_DIR_PIN 34 -#define Z2_ENABLE_PIN 30 -#ifndef Z2_CS_PIN - #define Z2_CS_PIN 22 -#endif - #define E0_STEP_PIN 26 #define E0_DIR_PIN 28 #define E0_ENABLE_PIN 24 @@ -103,18 +96,33 @@ #define E0_CS_PIN 43 #endif +#define E1_STEP_PIN 36 +#define E1_DIR_PIN 34 +#define E1_ENABLE_PIN 30 +#ifndef E1_CS_PIN + #define E1_CS_PIN 22 +#endif + // // Temperature Sensors // #define TEMP_0_PIN 13 -#define TEMP_BED_PIN 14 +#if TEMP_SENSOR_BED + #define TEMP_BED_PIN 14 +#else + #define TEMP_1_PIN 14 +#endif #define TEMP_CHAMBER_PIN 15 // // Heaters / Fans // #define HEATER_0_PIN 10 -#define HEATER_BED_PIN 8 +#if TEMP_SENSOR_BED + #define HEATER_BED_PIN 8 +#else + #define HEATER_1_PIN 8 +#endif #define FAN_PIN 9 #define FAN1_PIN 7 #define FAN2_PIN 12 @@ -122,7 +130,6 @@ // // Misc. Functions // -#define SDSS 53 #define LED_PIN 13 #ifndef FILWIDTH_PIN @@ -186,103 +193,75 @@ //#define Z2_HARDWARE_SERIAL Serial1 //#define E0_HARDWARE_SERIAL Serial1 //#define E1_HARDWARE_SERIAL Serial1 - //#define E2_HARDWARE_SERIAL Serial1 - //#define E3_HARDWARE_SERIAL Serial1 - //#define E4_HARDWARE_SERIAL Serial1 - - // - // Software serial - // #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN 47 #endif #ifndef X_SERIAL_RX_PIN - #define X_SERIAL_RX_PIN 47 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #endif #ifndef X2_SERIAL_TX_PIN #define X2_SERIAL_TX_PIN -1 #endif #ifndef X2_SERIAL_RX_PIN - #define X2_SERIAL_RX_PIN -1 + #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN #endif #ifndef Y_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN 45 #endif #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN 45 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #endif #ifndef Y2_SERIAL_TX_PIN #define Y2_SERIAL_TX_PIN -1 #endif #ifndef Y2_SERIAL_RX_PIN - #define Y2_SERIAL_RX_PIN -1 + #define Y2_SERIAL_RX_PIN Y2_SERIAL_TX_PIN #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN 32 #endif #ifndef Z_SERIAL_RX_PIN - #define Z_SERIAL_RX_PIN 32 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #endif #ifndef Z2_SERIAL_TX_PIN #define Z2_SERIAL_TX_PIN 22 #endif #ifndef Z2_SERIAL_RX_PIN - #define Z2_SERIAL_RX_PIN 22 + #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN #endif #ifndef E0_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN 43 #endif #ifndef E0_SERIAL_RX_PIN - #define E0_SERIAL_RX_PIN 43 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif #ifndef E1_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN -1 #endif #ifndef E1_SERIAL_RX_PIN - #define E1_SERIAL_RX_PIN -1 - #endif - #ifndef E2_SERIAL_TX_PIN - #define E2_SERIAL_TX_PIN -1 - #endif - #ifndef E2_SERIAL_RX_PIN - #define E2_SERIAL_RX_PIN -1 - #endif - #ifndef E3_SERIAL_TX_PIN - #define E3_SERIAL_TX_PIN -1 - #endif - #ifndef E3_SERIAL_RX_PIN - #define E3_SERIAL_RX_PIN -1 - #endif - #ifndef E4_SERIAL_TX_PIN - #define E4_SERIAL_TX_PIN -1 - #endif - #ifndef E4_SERIAL_RX_PIN - #define E4_SERIAL_RX_PIN -1 - #endif - #ifndef E5_SERIAL_TX_PIN - #define E5_SERIAL_TX_PIN -1 - #endif - #ifndef E5_SERIAL_RX_PIN - #define E5_SERIAL_RX_PIN -1 - #endif - #ifndef E6_SERIAL_TX_PIN - #define E6_SERIAL_TX_PIN -1 - #endif - #ifndef E6_SERIAL_RX_PIN - #define E6_SERIAL_RX_PIN -1 - #endif - #ifndef E7_SERIAL_TX_PIN - #define E7_SERIAL_TX_PIN -1 - #endif - #ifndef E7_SERIAL_RX_PIN - #define E7_SERIAL_RX_PIN -1 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #endif #endif +// +// SD Support +// +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(ONBOARD) + #define SDSS 83 + #undef SD_DETECT_PIN + #define SD_DETECT_PIN 95 +#else + #define SDSS 53 +#endif + ////////////////////////// // LCDs and Controllers // ////////////////////////// @@ -387,6 +366,9 @@ #else #define BTN_EN1 31 #define BTN_EN2 33 + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif #endif #define BTN_ENC 35 @@ -396,8 +378,7 @@ #define KILL_PIN 41 #if ENABLED(BQ_LCD_SMART_CONTROLLER) - // TO TEST - //#define LCD_BACKLIGHT_PIN 39 + //#define LCD_BACKLIGHT_PIN 39 // TO TEST #endif #elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD) @@ -594,22 +575,4 @@ #endif #endif // IS_NEWPANEL - #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder - #endif - #endif // HAS_WIRED_LCD - -// -// SD Support -// -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION ONBOARD -#endif - -#if SD_CONNECTION_IS(ONBOARD) - #undef SDSS - #define SDSS 83 - #undef SD_DETECT_PIN - #define SD_DETECT_PIN 95 -#endif diff --git a/Marlin/src/pins/sanguino/env_validate.h b/Marlin/src/pins/sanguino/env_validate.h new file mode 100644 index 000000000000..d229b6f102e4 --- /dev/null +++ b/Marlin/src/pins/sanguino/env_validate.h @@ -0,0 +1,42 @@ + /** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if ENABLED(ALLOW_MEGA644) + #if NOT_TARGET(__AVR_ATmega644__, __AVR_ATmega644P__, __AVR_ATmega1284P__) + #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" + #endif +#elif ENABLED(ALLOW_MEGA644P) + #if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) + #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" + #endif +#elif ENABLED(REQUIRE_MEGA644P) + #if NOT_TARGET(__AVR_ATmega644P__) + #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega644P' in 'Tools > Processor.'" + #endif +#elif NOT_TARGET(__AVR_ATmega1284P__) + #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'melzi' or 'melzi_optiboot.')" +#endif + +#undef ALLOW_MEGA644 +#undef ALLOW_MEGA644P +#undef REQUIRE_MEGA644P diff --git a/Marlin/src/pins/sanguino/pins_ANET_10.h b/Marlin/src/pins/sanguino/pins_ANET_10.h index fb1b6dbb3c0c..bd69e167dc05 100644 --- a/Marlin/src/pins/sanguino/pins_ANET_10.h +++ b/Marlin/src/pins/sanguino/pins_ANET_10.h @@ -86,8 +86,24 @@ * Many thanks to Hans Raaf (@oderwat) for developing the Anet-specific software and supporting the Anet community. */ +/** + * OptiBoot Bootloader: + * Optiboot is an alternative bootloader that can be flashed on the board to free up space for a larger firmware build. + * See https://github.com/Optiboot/optiboot for more information. + * + * Install Marlin with Arduino IDE: + * For a board with the stock bootloader, select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' + * For a board with OptiBoot, select 'Sanguino (Optiboot)' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' + * + * Install Marlin with PlatformIO IDE: + * (NOTE: You can set a default build environment by editing the value of 'default_env' in 'platformio.ini'. + * For the best user experience install the "Auto Build Marlin" extension.) + * For a board with the stock bootloader use Build / Upload under the 'sanguino1284p' or 'sanguino1284p_optimized' target. + * For a board with OptiBoot, use Build / Upload under the 'melzi_optiboot' target. + */ + #if NOT_TARGET(__AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'melzi' or 'melzi_optiboot.')" + #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega1284P' in 'Tools > Processor.' (For PlatformIO, use 'sanguino1284p' or 'sanguino1284p_optimized'. With optiboot, use 'melzi_optiboot.')" #endif #define BOARD_INFO_NAME "Anet 1.0" @@ -179,9 +195,9 @@ #define BTN_EN1 28 #define BTN_EN2 10 #define BTN_ENC 17 - #define BOARD_ST7920_DELAY_1 DELAY_NS(250) - #define BOARD_ST7920_DELAY_2 DELAY_NS(250) - #define BOARD_ST7920_DELAY_3 DELAY_NS(250) + #define BOARD_ST7920_DELAY_1 250 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 250 #else #define SERVO0_PIN 29 // free for BLTouch/3D-Touch #define BEEPER_PIN 17 @@ -191,9 +207,9 @@ #define BTN_EN1 11 #define BTN_EN2 10 #define BTN_ENC 16 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #define BOARD_ST7920_DELAY_2 DELAY_NS(63) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 63 + #define BOARD_ST7920_DELAY_3 125 #endif #endif diff --git a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h index c3c38eb6f308..3edb14ec413f 100644 --- a/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h +++ b/Marlin/src/pins/sanguino/pins_AZTEEG_X1.h @@ -27,4 +27,4 @@ #define BOARD_INFO_NAME "Azteeg X1" -#include "pins_SANGUINOLOLU_12.h" +#include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11 diff --git a/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h b/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h index 29905c108954..1343739a119e 100644 --- a/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h +++ b/Marlin/src/pins/sanguino/pins_GEN3_MONOLITHIC.h @@ -48,9 +48,8 @@ * Once installed select the Sanguino board and then select the CPU. */ -#if NOT_TARGET(__AVR_ATmega644P__) - #error "Oops! Select 'Sanguino' in 'Tools > Board.'" -#endif +#define REQUIRE_MEGA644P +#include "env_validate.h" #define BOARD_INFO_NAME "Gen3 Monolithic" #define DEBUG_PIN 0 diff --git a/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h b/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h index 33fc233f7ab1..7cab1bd762c5 100644 --- a/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h +++ b/Marlin/src/pins/sanguino/pins_GEN3_PLUS.h @@ -48,9 +48,8 @@ * Once installed select the SANGUINO board and then select the CPU. */ -#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" -#endif +#define ALLOW_MEGA644P +#include "env_validate.h" #define BOARD_INFO_NAME "Gen3+" diff --git a/Marlin/src/pins/sanguino/pins_GEN6.h b/Marlin/src/pins/sanguino/pins_GEN6.h index bfca8e90d9cc..51e8200b9570 100644 --- a/Marlin/src/pins/sanguino/pins_GEN6.h +++ b/Marlin/src/pins/sanguino/pins_GEN6.h @@ -50,9 +50,8 @@ * Once installed select the Sanguino board and then select the CPU. */ -#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" -#endif +#define ALLOW_MEGA644P +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Gen6" diff --git a/Marlin/src/pins/sanguino/pins_GEN7_12.h b/Marlin/src/pins/sanguino/pins_GEN7_12.h index 9db7d7214a5b..0834da78c45c 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_12.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_12.h @@ -50,9 +50,8 @@ * Once installed select the Sanguino board and then select the CPU. */ -#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__, __AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" -#endif +#define ALLOW_MEGA644 +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Gen7 v1.1 / 1.2" diff --git a/Marlin/src/pins/sanguino/pins_GEN7_14.h b/Marlin/src/pins/sanguino/pins_GEN7_14.h index 66dba533e988..97bfdd28a727 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_14.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_14.h @@ -50,9 +50,8 @@ * Once installed select the Sanguino board and then select the CPU. */ -#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__, __AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" -#endif +#define ALLOW_MEGA644 +#include "env_validate.h" #define BOARD_INFO_NAME "Gen7 v1.4" diff --git a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h index 0c4871fb27d5..6d7678e6e3d2 100644 --- a/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h +++ b/Marlin/src/pins/sanguino/pins_GEN7_CUSTOM.h @@ -53,9 +53,8 @@ * Once installed select the Sanguino board and then select the CPU. */ -#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__, __AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" -#endif +#define ALLOW_MEGA644 +#include "env_validate.h" #define BOARD_INFO_NAME "Gen7 Custom" diff --git a/Marlin/src/pins/sanguino/pins_MELZI.h b/Marlin/src/pins/sanguino/pins_MELZI.h index 887aae18584a..37b28c008965 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI.h +++ b/Marlin/src/pins/sanguino/pins_MELZI.h @@ -29,4 +29,19 @@ #define BOARD_INFO_NAME "Melzi" #endif -#include "pins_SANGUINOLOLU_12.h" +#define IS_MELZI 1 + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 0 + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 188 + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 0 + #endif +#endif + +#include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11 diff --git a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h index 97db36dd5421..cb7ecdbe1ff2 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h @@ -36,19 +36,13 @@ #define BOARD_INFO_NAME "Melzi (Creality)" // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif -#include "pins_MELZI.h" +#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11 // // For the stock CR-10 enable CR10_STOCKDISPLAY in Configuration.h @@ -68,8 +62,12 @@ #define LCD_PINS_D4 30 // ST9720 CLK #if ENABLED(BLTOUCH) - #define SERVO0_PIN 27 - #undef BEEPER_PIN + #ifndef SERVO0_PIN + #define SERVO0_PIN 27 + #endif + #if SERVO0_PIN == BEEPER_PIN + #undef BEEPER_PIN + #endif #elif ENABLED(FILAMENT_RUNOUT_SENSOR) #ifndef FIL_RUNOUT_PIN #define FIL_RUNOUT_PIN 27 @@ -133,11 +131,11 @@ /** * EXP1 Connector EXP1 as CR10 STOCKDISPLAY - * _____ _____ - * PA4 | 6 5 | PC0 BEEPER_PIN | 6 5 | BTN_ENC - * PD3 | 7 4 | RESET BTN_EN1 | 7 4 | RESET - * PD2 8 3 | PA1 BTN_EN2 8 3 | LCD_PINS_D4 (ST9720 CLK) - * PA3 | 9 2 | PC1 (ST9720 CS) LCD_PINS_RS | 9 2 | LCD_PINS_ENABLE (ST9720 DAT) - * GND |10 1 | 5V GND |10 1 | 5V - * ----- ----- + * ------ ------ + * PA4 |10 9 | PC0 BEEPER_PIN |10 9 | BTN_ENC + * PD3 | 8 7 | RESET BTN_EN1 | 8 7 | RESET + * PD2 6 5 | PA1 BTN_EN2 6 5 | LCD_PINS_D4 (ST9720 CLK) + * PA3 | 4 3 | PC1 (ST9720 CS) LCD_PINS_RS | 4 3 | LCD_PINS_ENABLE (ST9720 DAT) + * GND | 2 1 | 5V GND | 2 1 | 5V + * ------ ------ */ diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h b/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h index 0e09c1f00558..447eca7e3cec 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_MAKR3D.h @@ -26,4 +26,4 @@ */ #define BOARD_INFO_NAME "Melzi (ATmega1284)" -#include "pins_MELZI.h" +#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11 diff --git a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h index 8b4faeeaf909..a0421dcf5cc6 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_MALYAN.h @@ -27,20 +27,7 @@ #define BOARD_INFO_NAME "Melzi (Malyan)" -// Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif -#endif - -#include "pins_MELZI.h" +#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11 #undef LCD_SDSS #undef LCD_PINS_RS diff --git a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h index f87894103771..19a75c2b321e 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_TRONXY.h @@ -27,19 +27,14 @@ #define BOARD_INFO_NAME "Melzi (Tronxy)" -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) - #endif +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 0 #endif -#include "pins_MELZI.h" +#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11 #undef Z_ENABLE_PIN #undef LCD_PINS_RS diff --git a/Marlin/src/pins/sanguino/pins_MELZI_V2.h b/Marlin/src/pins/sanguino/pins_MELZI_V2.h index 275498d55813..48b3c5f913c1 100644 --- a/Marlin/src/pins/sanguino/pins_MELZI_V2.h +++ b/Marlin/src/pins/sanguino/pins_MELZI_V2.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -24,16 +27,11 @@ #define BOARD_INFO_NAME "Melzi V2" -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(188) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) - #endif +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 0 + #define BOARD_ST7920_DELAY_2 400 + #define BOARD_ST7920_DELAY_3 0 #endif -#include "pins_MELZI.h" +#include "pins_MELZI.h" // ... SANGUINOLOLU_12 ... SANGUINOLOLU_11 diff --git a/Marlin/src/pins/sanguino/pins_OMCA_A.h b/Marlin/src/pins/sanguino/pins_OMCA_A.h index 770732051900..a3ceb76a0de9 100644 --- a/Marlin/src/pins/sanguino/pins_OMCA_A.h +++ b/Marlin/src/pins/sanguino/pins_OMCA_A.h @@ -74,7 +74,7 @@ */ #if NOT_TARGET(__AVR_ATmega644__) - #error "Oops! Select 'Sanguino' in 'Tools > Board' and ATmega644 in 'Tools > Processor.'" + #error "Oops! Select 'Sanguino' in 'Tools > Board' and 'ATmega644' in 'Tools > Processor.'" #endif #define BOARD_INFO_NAME "Alpha OMCA" diff --git a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h index af27159936f7..8dd6171b9255 100644 --- a/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h +++ b/Marlin/src/pins/sanguino/pins_SANGUINOLOLU_11.h @@ -50,9 +50,8 @@ * Once installed select the Sanguino board and then select the CPU. */ -#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" -#endif +#define ALLOW_MEGA644P +#include "env_validate.h" #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "Sanguinololu <1.2" @@ -166,16 +165,6 @@ #define KILL_PIN 10 #define BEEPER_PIN 27 - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(188) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) - #endif - #elif ENABLED(U8GLIB_ST7920) // SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 #if IS_MELZI @@ -186,19 +175,6 @@ // Marlin so this can be used for BEEPER_PIN. You can use this pin // with M42 instead of BEEPER_PIN. #define BEEPER_PIN 27 - - #if IS_RRD_FG_SC - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(0) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(188) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(0) - #endif - #endif - #else // Sanguinololu >=1.3 #define LCD_PINS_RS 4 #define LCD_PINS_ENABLE 17 diff --git a/Marlin/src/pins/sanguino/pins_SETHI.h b/Marlin/src/pins/sanguino/pins_SETHI.h index dc2133e441dc..a2240b385b2b 100644 --- a/Marlin/src/pins/sanguino/pins_SETHI.h +++ b/Marlin/src/pins/sanguino/pins_SETHI.h @@ -49,9 +49,8 @@ * Once installed select the Sanguino board and then select the CPU. */ -#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega644__, __AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644', 'ATmega644P', or 'ATmega1284P' in 'Tools > Processor.'" -#endif +#define ALLOW_MEGA644 +#include "env_validate.h" #define BOARD_INFO_NAME "Sethi 3D_1" diff --git a/Marlin/src/pins/sanguino/pins_STB_11.h b/Marlin/src/pins/sanguino/pins_STB_11.h index b10a09840aaa..ea36211f3bc9 100644 --- a/Marlin/src/pins/sanguino/pins_STB_11.h +++ b/Marlin/src/pins/sanguino/pins_STB_11.h @@ -27,4 +27,4 @@ #define BOARD_INFO_NAME "STB V1.1" -#include "pins_SANGUINOLOLU_12.h" +#include "pins_SANGUINOLOLU_12.h" // ... SANGUINOLOLU_11 diff --git a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h index d064d801329d..cb2dec160029 100644 --- a/Marlin/src/pins/sanguino/pins_ZMIB_V2.h +++ b/Marlin/src/pins/sanguino/pins_ZMIB_V2.h @@ -21,9 +21,8 @@ */ #pragma once -#if NOT_TARGET(__AVR_ATmega644P__, __AVR_ATmega1284P__) - #error "Oops! Select 'Sanguino' in 'Tools > Boards' and 'ATmega644P' or 'ATmega1284P' in 'Tools > Processor.'" -#endif +#define ALLOW_MEGA644P +#include "env_validate.h" #define BOARD_INFO_NAME "Zonestar ZMIB_V2" #define BOARD_WEBSITE_URL "www.aliexpress.com/item/32957490744.html" @@ -190,10 +189,9 @@ #endif #define LCD_PINS_D4 10 // ST7920_CLK_PIN LCD_PIN_ENABLE (PIN6 of LCD module) - // Alter timing for graphical display - #define ST7920_DELAY_1 DELAY_2_NOP - #define ST7920_DELAY_2 DELAY_2_NOP - #define ST7920_DELAY_3 DELAY_2_NOP + #define BOARD_ST7920_DELAY_1 DELAY_2_NOP + #define BOARD_ST7920_DELAY_2 DELAY_2_NOP + #define BOARD_ST7920_DELAY_3 DELAY_2_NOP #elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) // diff --git a/Marlin/src/pins/sensitive_pins.h b/Marlin/src/pins/sensitive_pins.h index d7eb1872458f..7ccb0339b27e 100644 --- a/Marlin/src/pins/sensitive_pins.h +++ b/Marlin/src/pins/sensitive_pins.h @@ -55,74 +55,243 @@ #else #define _X_MS3 #endif - -#define _X_PINS X_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, _X_MIN _X_MAX _X_MS1 _X_MS2 _X_MS3 _X_CS - -#if PIN_EXISTS(Y_MIN) - #define _Y_MIN Y_MIN_PIN, -#else - #define _Y_MIN -#endif -#if PIN_EXISTS(Y_MAX) - #define _Y_MAX Y_MAX_PIN, -#else - #define _Y_MAX -#endif -#if PIN_EXISTS(Y_CS) && AXIS_HAS_SPI(Y) - #define _Y_CS Y_CS_PIN, -#else - #define _Y_CS -#endif -#if PIN_EXISTS(Y_MS1) - #define _Y_MS1 Y_MS1_PIN, +#if PIN_EXISTS(X_ENABLE) + #define _X_ENABLE_PIN X_ENABLE_PIN, #else - #define _Y_MS1 -#endif -#if PIN_EXISTS(Y_MS2) - #define _Y_MS2 Y_MS2_PIN, -#else - #define _Y_MS2 -#endif -#if PIN_EXISTS(Y_MS3) - #define _Y_MS3 Y_MS3_PIN, -#else - #define _Y_MS3 + #define _X_ENABLE_PIN #endif -#define _Y_PINS Y_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, _Y_MIN _Y_MAX _Y_MS1 _Y_MS2 _Y_MS3 _Y_CS +#define _X_PINS X_STEP_PIN, X_DIR_PIN, _X_ENABLE_PIN _X_MIN _X_MAX _X_MS1 _X_MS2 _X_MS3 _X_CS + +#if HAS_Y_AXIS + + #if PIN_EXISTS(Y_MIN) + #define _Y_MIN Y_MIN_PIN, + #else + #define _Y_MIN + #endif + #if PIN_EXISTS(Y_MAX) + #define _Y_MAX Y_MAX_PIN, + #else + #define _Y_MAX + #endif + #if PIN_EXISTS(Y_CS) && AXIS_HAS_SPI(Y) + #define _Y_CS Y_CS_PIN, + #else + #define _Y_CS + #endif + #if PIN_EXISTS(Y_MS1) + #define _Y_MS1 Y_MS1_PIN, + #else + #define _Y_MS1 + #endif + #if PIN_EXISTS(Y_MS2) + #define _Y_MS2 Y_MS2_PIN, + #else + #define _Y_MS2 + #endif + #if PIN_EXISTS(Y_MS3) + #define _Y_MS3 Y_MS3_PIN, + #else + #define _Y_MS3 + #endif + #if PIN_EXISTS(Y_ENABLE) + #define _Y_ENABLE_PIN Y_ENABLE_PIN, + #else + #define _Y_ENABLE_PIN + #endif + + #define _Y_PINS Y_STEP_PIN, Y_DIR_PIN, _Y_ENABLE_PIN _Y_MIN _Y_MAX _Y_MS1 _Y_MS2 _Y_MS3 _Y_CS -#if PIN_EXISTS(Z_MIN) - #define _Z_MIN Z_MIN_PIN, -#else - #define _Z_MIN -#endif -#if PIN_EXISTS(Z_MAX) - #define _Z_MAX Z_MAX_PIN, #else - #define _Z_MAX + + #define _Y_PINS + #endif -#if PIN_EXISTS(Z_CS) && AXIS_HAS_SPI(Z) - #define _Z_CS Z_CS_PIN, + +#if HAS_Z_AXIS + + #if PIN_EXISTS(Z_MIN) + #define _Z_MIN Z_MIN_PIN, + #else + #define _Z_MIN + #endif + #if PIN_EXISTS(Z_MAX) + #define _Z_MAX Z_MAX_PIN, + #else + #define _Z_MAX + #endif + #if PIN_EXISTS(Z_CS) && AXIS_HAS_SPI(Z) + #define _Z_CS Z_CS_PIN, + #else + #define _Z_CS + #endif + #if PIN_EXISTS(Z_MS1) + #define _Z_MS1 Z_MS1_PIN, + #else + #define _Z_MS1 + #endif + #if PIN_EXISTS(Z_MS2) + #define _Z_MS2 Z_MS2_PIN, + #else + #define _Z_MS2 + #endif + #if PIN_EXISTS(Z_MS3) + #define _Z_MS3 Z_MS3_PIN, + #else + #define _Z_MS3 + #endif + #if PIN_EXISTS(Z_ENABLE) + #define _Z_ENABLE_PIN Z_ENABLE_PIN, + #else + #define _Z_ENABLE_PIN + #endif + + #define _Z_PINS Z_STEP_PIN, Z_DIR_PIN, _Z_ENABLE_PIN _Z_MIN _Z_MAX _Z_MS1 _Z_MS2 _Z_MS3 _Z_CS + #else - #define _Z_CS + + #define _Z_PINS + #endif -#if PIN_EXISTS(Z_MS1) - #define _Z_MS1 Z_MS1_PIN, + +#if LINEAR_AXES >= 4 + + #if PIN_EXISTS(I_MIN) + #define _I_MIN I_MIN_PIN, + #else + #define _I_MIN + #endif + #if PIN_EXISTS(I_MAX) + #define _I_MAX I_MAX_PIN, + #else + #define _I_MAX + #endif + #if PIN_EXISTS(I_CS) && AXIS_HAS_SPI(I) + #define _I_CS I_CS_PIN, + #else + #define _I_CS + #endif + #if PIN_EXISTS(I_MS1) + #define _I_MS1 I_MS1_PIN, + #else + #define _I_MS1 + #endif + #if PIN_EXISTS(I_MS2) + #define _I_MS2 I_MS2_PIN, + #else + #define _I_MS2 + #endif + #if PIN_EXISTS(I_MS3) + #define _I_MS3 I_MS3_PIN, + #else + #define _I_MS3 + #endif + #if PIN_EXISTS(I_ENABLE) + #define _I_ENABLE_PIN I_ENABLE_PIN, + #else + #define _I_ENABLE_PIN + #endif + + #define _I_PINS I_STEP_PIN, I_DIR_PIN, _I_ENABLE_PIN _I_MIN _I_MAX _I_MS1 _I_MS2 _I_MS3 _I_CS + #else - #define _Z_MS1 + + #define _I_PINS + #endif -#if PIN_EXISTS(Z_MS2) - #define _Z_MS2 Z_MS2_PIN, + +#if LINEAR_AXES >= 5 + + #if PIN_EXISTS(J_MIN) + #define _J_MIN J_MIN_PIN, + #else + #define _J_MIN + #endif + #if PIN_EXISTS(J_MAX) + #define _J_MAX J_MAX_PIN, + #else + #define _J_MAX + #endif + #if PIN_EXISTS(J_CS) && AXIS_HAS_SPI(J) + #define _J_CS J_CS_PIN, + #else + #define _J_CS + #endif + #if PIN_EXISTS(J_MS1) + #define _J_MS1 J_MS1_PIN, + #else + #define _J_MS1 + #endif + #if PIN_EXISTS(J_MS2) + #define _J_MS2 J_MS2_PIN, + #else + #define _J_MS2 + #endif + #if PIN_EXISTS(J_MS3) + #define _J_MS3 J_MS3_PIN, + #else + #define _J_MS3 + #endif + #if PIN_EXISTS(J_ENABLE) + #define _J_ENABLE_PIN J_ENABLE_PIN, + #else + #define _J_ENABLE_PIN + #endif + + #define _J_PINS J_STEP_PIN, J_DIR_PIN, _J_ENABLE_PIN _J_MIN _J_MAX _J_MS1 _J_MS2 _J_MS3 _J_CS + #else - #define _Z_MS2 + + #define _J_PINS + #endif -#if PIN_EXISTS(Z_MS3) - #define _Z_MS3 Z_MS3_PIN, + +#if LINEAR_AXES >= 6 + + #if PIN_EXISTS(K_MIN) + #define _K_MIN K_MIN_PIN, + #else + #define _K_MIN + #endif + #if PIN_EXISTS(K_MAX) + #define _K_MAX K_MAX_PIN, + #else + #define _K_MAX + #endif + #if PIN_EXISTS(K_CS) && AXIS_HAS_SPI(K) + #define _K_CS K_CS_PIN, + #else + #define _K_CS + #endif + #if PIN_EXISTS(K_MS1) + #define _K_MS1 K_MS1_PIN, + #else + #define _K_MS1 + #endif + #if PIN_EXISTS(K_MS2) + #define _K_MS2 K_MS2_PIN, + #else + #define _K_MS2 + #endif + #if PIN_EXISTS(K_MS3) + #define _K_MS3 K_MS3_PIN, + #else + #define _K_MS3 + #endif + #if PIN_EXISTS(K_ENABLE) + #define _K_ENABLE_PIN K_ENABLE_PIN, + #else + #define _K_ENABLE_PIN + #endif + + #define _K_PINS K_STEP_PIN, K_DIR_PIN, _K_ENABLE_PIN _K_MIN _K_MAX _K_MS1 _K_MS2 _K_MS3 _K_CS + #else - #define _Z_MS3 -#endif -#define _Z_PINS Z_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, _Z_MIN _Z_MAX _Z_MS1 _Z_MS2 _Z_MS3 _Z_CS + #define _K_PINS + +#endif // // Extruder Chip Select, Digital Micro-steps @@ -338,7 +507,7 @@ #define _E6_PINS #define _E7_PINS -#if EXTRUDERS +#if HAS_EXTRUDERS #undef _E0_PINS #define _E0_PINS E0_STEP_PIN, E0_DIR_PIN, E0_ENABLE_PIN, _E0_CS _E0_MS1 _E0_MS2 _E0_MS3 #endif @@ -423,30 +592,32 @@ #define _H6_PINS #define _H7_PINS +#define DIO_PIN(P) TERN(TARGET_LPC1768, P, analogInputToDigitalPin(P)) + #if HAS_HOTEND #undef _H0_PINS - #define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_0_PIN), + #define _H0_PINS HEATER_0_PIN, E0_AUTO_FAN_PIN, DIO_PIN(TEMP_0_PIN), #if HAS_MULTI_HOTEND #undef _H1_PINS - #define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_1_PIN), + #define _H1_PINS HEATER_1_PIN, E1_AUTO_FAN_PIN, DIO_PIN(TEMP_1_PIN), #if HOTENDS > 2 #undef _H2_PINS - #define _H2_PINS HEATER_2_PIN, E2_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_2_PIN), + #define _H2_PINS HEATER_2_PIN, E2_AUTO_FAN_PIN, DIO_PIN(TEMP_2_PIN), #if HOTENDS > 3 #undef _H3_PINS - #define _H3_PINS HEATER_3_PIN, E3_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_3_PIN), + #define _H3_PINS HEATER_3_PIN, E3_AUTO_FAN_PIN, DIO_PIN(TEMP_3_PIN), #if HOTENDS > 4 #undef _H4_PINS - #define _H4_PINS HEATER_4_PIN, E4_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_4_PIN), + #define _H4_PINS HEATER_4_PIN, E4_AUTO_FAN_PIN, DIO_PIN(TEMP_4_PIN), #if HOTENDS > 5 #undef _H5_PINS - #define _H5_PINS HEATER_5_PIN, E5_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_5_PIN), + #define _H5_PINS HEATER_5_PIN, E5_AUTO_FAN_PIN, DIO_PIN(TEMP_5_PIN), #if HOTENDS > 6 #undef _H6_PINS - #define _H6_PINS HEATER_6_PIN, E6_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_6_PIN), + #define _H6_PINS HEATER_6_PIN, E6_AUTO_FAN_PIN, DIO_PIN(TEMP_6_PIN), #if HOTENDS > 7 #undef _H7_PINS - #define _H7_PINS HEATER_7_PIN, E7_AUTO_FAN_PIN, analogInputToDigitalPin(TEMP_7_PIN), + #define _H7_PINS HEATER_7_PIN, E7_AUTO_FAN_PIN, DIO_PIN(TEMP_7_PIN), #endif // HOTENDS > 7 #endif // HOTENDS > 6 #endif // HOTENDS > 5 @@ -655,13 +826,13 @@ #endif #if TEMP_SENSOR_BED && PINS_EXIST(TEMP_BED, HEATER_BED) - #define _BED_PINS HEATER_BED_PIN, analogInputToDigitalPin(TEMP_BED_PIN), + #define _BED_PINS HEATER_BED_PIN, DIO_PIN(TEMP_BED_PIN), #else #define _BED_PINS #endif #if TEMP_SENSOR_CHAMBER && PIN_EXISTS(TEMP_CHAMBER) - #define _CHAMBER_TEMP analogInputToDigitalPin(TEMP_CHAMBER_PIN), + #define _CHAMBER_TEMP DIO_PIN(TEMP_CHAMBER_PIN), #else #define _CHAMBER_TEMP #endif @@ -676,14 +847,50 @@ #define _CHAMBER_FAN #endif +#if TEMP_SENSOR_COOLER && PIN_EXISTS(TEMP_COOLER) + #define _COOLER_TEMP DIO_PIN(TEMP_COOLER_PIN), +#else + #define _COOLER_TEMP +#endif +#if TEMP_SENSOR_COOLER && PIN_EXISTS(COOLER) + #define _COOLER COOLER_PIN, +#else + #define _COOLER +#endif +#if TEMP_SENSOR_COOLER && PINS_EXIST(TEMP_COOLER, COOLER_AUTO_FAN) + #define _COOLER_FAN COOLER_AUTO_FAN_PIN, +#else + #define _COOLER_FAN +#endif + #ifndef HAL_SENSITIVE_PINS #define HAL_SENSITIVE_PINS #endif -#define SENSITIVE_PINS { \ - _X_PINS _Y_PINS _Z_PINS _X2_PINS _Y2_PINS _Z2_PINS _Z3_PINS _Z4_PINS _Z_PROBE \ +#ifdef RUNTIME_ONLY_ANALOG_TO_DIGITAL + #define _SP_END +#else + #define _SP_END -2 + + // Move a regular pin in front to the end + template + struct OnlyPins : OnlyPins { }; + + // Remove a -1 from the front + template + struct OnlyPins<-1, D...> : OnlyPins { }; + + // Remove -2 from the front, emit the rest, cease propagation + template + struct OnlyPins<_SP_END, D...> { static constexpr size_t size = sizeof...(D); static constexpr pin_t table[sizeof...(D)] PROGMEM = { D... }; }; +#endif + +#define SENSITIVE_PINS \ + _X_PINS _Y_PINS _Z_PINS _I_PINS _J_PINS _K_PINS \ + _X2_PINS _Y2_PINS _Z2_PINS _Z3_PINS _Z4_PINS _Z_PROBE \ _E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS _E5_PINS _E6_PINS _E7_PINS \ _H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS _H5_PINS _H6_PINS _H7_PINS \ _PS_ON _FAN0 _FAN1 _FAN2 _FAN3 _FAN4 _FAN5 _FAN6 _FAN7 _FANC \ - _BED_PINS _CHAMBER_TEMP _CHAMBER_HEATER _CHAMBER_FAN HAL_SENSITIVE_PINS \ -} + _BED_PINS _CHAMBER_TEMP _CHAMBER_HEATER _CHAMBER_FAN \ + _COOLER_TEMP _COOLER _COOLER_FAN HAL_SENSITIVE_PINS \ + _SP_END diff --git a/Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h b/Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h index abdd088f9bd3..178c873af7ac 100644 --- a/Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h +++ b/Marlin/src/pins/stm32f0/pins_MALYAN_M200_V2.h @@ -19,7 +19,6 @@ * along with this program. If not, see . * */ - #pragma once #if NOT_TARGET(STM32F0xx) diff --git a/Marlin/src/pins/stm32f0/pins_MALYAN_M300.h b/Marlin/src/pins/stm32f0/pins_MALYAN_M300.h index 2717439f24f4..299b9ff49cee 100644 --- a/Marlin/src/pins/stm32f0/pins_MALYAN_M300.h +++ b/Marlin/src/pins/stm32f0/pins_MALYAN_M300.h @@ -19,7 +19,6 @@ * along with this program. If not, see . * */ - #pragma once #if NOT_TARGET(__STM32F1__, STM32F1xx, STM32F0xx) diff --git a/Marlin/src/pins/stm32f1/env_validate.h b/Marlin/src/pins/stm32f1/env_validate.h new file mode 100644 index 000000000000..2e7b78517215 --- /dev/null +++ b/Marlin/src/pins/stm32f1/env_validate.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if NOT_TARGET(__STM32F1__, STM32F1) + #error "Oops! Select an STM32F1 board in 'Tools > Board.'" +#endif diff --git a/Marlin/src/pins/stm32f1/pins_BEAST.h b/Marlin/src/pins/stm32f1/pins_BEAST.h index bf2cf6463a26..2ace47822e16 100644 --- a/Marlin/src/pins/stm32f1/pins_BEAST.h +++ b/Marlin/src/pins/stm32f1/pins_BEAST.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" /** * 21017 Victor Perez Marlin for stm32f1 test @@ -38,34 +36,27 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 +// +// Limit Switches +// +#define X_STOP_PIN PD5 +#define Y_STOP_PIN PD6 +#define Z_STOP_PIN PD7 + // // Steppers // #define X_STEP_PIN PE0 #define X_DIR_PIN PE1 #define X_ENABLE_PIN PC0 -#define X_MIN_PIN PD5 -#define X_MAX_PIN -1 #define Y_STEP_PIN PE2 #define Y_DIR_PIN PE3 #define Y_ENABLE_PIN PC1 -#define Y_MIN_PIN PD6 -#define Y_MAX_PIN #define Z_STEP_PIN PE4 #define Z_DIR_PIN PE5 #define Z_ENABLE_PIN PC2 -#define Z_MIN_PIN PD7 -#define Z_MAX_PIN -1 - -#define Y2_STEP_PIN -1 -#define Y2_DIR_PIN -1 -#define Y2_ENABLE_PIN -1 - -#define Z2_STEP_PIN -1 -#define Z2_DIR_PIN -1 -#define Z2_ENABLE_PIN -1 #define E0_STEP_PIN PE6 #define E0_DIR_PIN PE7 @@ -89,9 +80,6 @@ #define SDSS PA15 #define LED_PIN PB2 -#define PS_ON_PIN -1 -#define KILL_PIN -1 - // // Heaters / Fans // @@ -100,8 +88,6 @@ #define HEATER_2_PIN PD14 #define HEATER_BED_PIN PB9 // BED -#define HEATER_BED2_PIN -1 // BED2 -#define HEATER_BED3_PIN -1 // BED3 #ifndef FAN_PIN #define FAN_PIN PB10 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h index 73a18faf05b2..8bae916a463c 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_CR6.h @@ -28,9 +28,7 @@ #define DEFAULT_MACHINE_NAME "Creality3D" #define BOARD_INFO_NAME "BTT SKR CR-6" -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" // // Release PB4 (Z_STEP_PIN) from JTAG NRST role @@ -51,25 +49,21 @@ #define I2C_EEPROM #endif -/* I2C */ #if ENABLED(I2C_EEPROM) #define IIC_EEPROM_SDA PB7 #define IIC_EEPROM_SCL PB6 - #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #elif ENABLED(SDCARD_EEPROM_EMULATION) #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif -#define E2END (MARLIN_EEPROM_SIZE - 1) // 2KB - // // Limit Switches // #define X_STOP_PIN PC0 #define Y_STOP_PIN PC1 -#define Z_STOP_PIN PC14 // Endtop or Probe +#define Z_STOP_PIN PC14 // Endstop or Probe #define FIL_RUNOUT_PIN PC15 @@ -160,24 +154,26 @@ // SD Card // -#define HAS_ONBOARD_SD - #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD #endif #if SD_CONNECTION_IS(ONBOARD) #define SD_DETECT_PIN PC4 - - #define ON_BOARD_SPI_DEVICE 1 // SPI1 #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card + #define SDSS ONBOARD_SD_CS_PIN #endif // // Misc. Functions // -#define LED_CONTROL_PIN PA13 +#define CASE_LIGHT_PIN PA13 #ifndef NEOPIXEL_PIN #define NEOPIXEL_PIN PA8 #endif + +#define SUICIDE_PIN PC13 +#ifndef SUICIDE_PIN_STATE + #define SUICIDE_PIN_STATE LOW +#endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h index 0426e80fd2db..dae43d3c13ed 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_E3_DIP.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(TARGET_STM32F1) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "BTT SKR E3 DIP V1.x" @@ -122,20 +120,17 @@ //#define Z_HARDWARE_SERIAL MSerial1 //#define E0_HARDWARE_SERIAL MSerial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PC10 - #define X_SERIAL_RX_PIN PC10 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PC11 - #define Y_SERIAL_RX_PIN PC11 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC12 - #define Z_SERIAL_RX_PIN PC12 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD2 - #define E0_SERIAL_RX_PIN PD2 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -161,7 +156,7 @@ #define USB_CONNECT_INVERTING false /** - * _____ + * ----- * 5V | 1 2 | GND * (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS) * (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) @@ -200,7 +195,7 @@ #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) /** Creality Ender-2 display pinout - * _____ + * ----- * 5V | 1 2 | GND * (MOSI) PB7 | 3 4 | PB8 (LCD_RS) * (LCD_A0) PB9 | 5 6 PA10 (BTN_EN2) @@ -222,7 +217,7 @@ #define LCD_BACKLIGHT_PIN -1 #else - #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and MKS_LCD12864 are currently supported on the BIGTREE_SKR_E3_DIP." + #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and MKS_LCD12864A/B are currently supported on the BIGTREE_SKR_E3_DIP." #endif #endif // HAS_WIRED_LCD @@ -234,7 +229,7 @@ /** FYSETC TFT TFT81050 display pinout * * Board Display - * _____ _____ + * ----- ----- * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) MOD_RESET | 3 4 | SD_CS (PA10) * (FREE) PB9 | 5 6 PA10 (SD_CS) (PB8) LCD_CS | 5 6 MOSI (SPI1-MOSI) @@ -278,6 +273,9 @@ #if SD_CONNECTION_IS(ONBOARD) #define SD_DETECT_PIN PC4 + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 #elif SD_CONNECTION_IS(LCD) && BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) #define SD_DETECT_PIN PA15 #define SD_SS_PIN PA10 @@ -287,3 +285,4 @@ #define ONBOARD_SPI_DEVICE 1 // SPI1 #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card +#define SDSS ONBOARD_SD_CS_PIN diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h index 4951d697a72f..44d4f2343546 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V1_2.h @@ -33,20 +33,17 @@ * TMC2208/TMC2209 stepper drivers */ #if HAS_TMC_UART - // - // Software serial - // #define X_SERIAL_TX_PIN PB15 - #define X_SERIAL_RX_PIN PB15 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PC6 - #define Y_SERIAL_RX_PIN PC6 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC10 - #define Z_SERIAL_RX_PIN PC10 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC11 - #define E0_SERIAL_RX_PIN PC11 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h index af2821f8098b..c22409923b8f 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_V2_0.h @@ -23,10 +23,15 @@ #define SKR_MINI_E3_V2 +#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4 + // Onboard I2C EEPROM #if NO_EEPROM_SELECTED #define I2C_EEPROM + #define SOFT_I2C_EEPROM #define MARLIN_EEPROM_SIZE 0x1000 // 4KB + #define I2C_SDA_PIN SDA + #define I2C_SCL_PIN SCL #undef NO_EEPROM_SELECTED #endif diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h index bab662d1be63..48d38e22136d 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_E3_common.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(TARGET_STM32F1) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" // Release PB3/PB4 (E0 STP/DIR) from JTAG pins #define DISABLE_JTAG @@ -119,14 +117,14 @@ /** * SKR Mini E3 V1.0, V1.2 SKR Mini E3 V2.0 - * _____ _____ - * 5V | 1 2 | GND 5V | 1 2 | GND - * (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS) (LCD_EN) PB15 | 3 4 | PB8 (LCD_RS) - * (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) - * RESET | 7 8 | PA9 (BTN_EN1) RESET | 7 8 | PA9 (BTN_EN1) - * (BTN_ENC) PB6 | 9 10| PB5 (BEEPER) (BTN_ENC) PA15 | 9 10| PB5 (BEEPER) - * ----- ----- - * EXP1 EXP1 + * ------ ------ + * 5V | 1 2 | GND 5V | 1 2 | GND + * (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS) (LCD_EN) PB15 | 3 4 | PB8 (LCD_RS) + * (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2) + * RESET | 7 8 | PA9 (BTN_EN1) RESET | 7 8 | PA9 (BTN_EN1) + * (BTN_ENC) PB6 | 9 10 | PB5 (BEEPER) (BTN_ENC) PA15 | 9 10 | PB5 (BEEPER) + * ------ ------ + * EXP1 EXP1 */ #ifdef SKR_MINI_E3_V2 #define EXP1_9 PA15 @@ -136,7 +134,28 @@ #define EXP1_3 PB7 #endif -#if HAS_WIRED_LCD +#if EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) + /** + * ------ ------ ------ + * VCC | 1 2 | GND VCC | 1 2 | GND GND | 2 1 | VCC + * A | 3 4 | B A | 3 4 | B B | 4 3 | A + * | 5 6 TX BEEP | 5 6 ENT ENT | 6 5 | BEEP + * | 7 8 | RX TX | 7 8 | RX RX | 8 7 | TX + * BEEP | 9 10 | ENT | 9 10 | | 10 9 | + * ------ ------ ------ + * EXP1 DWIN DWIN (plug) + * + * All pins are labeled as printed on DWIN PCB. Connect TX-TX, A-A and so on. + */ + + #error "Ender-3 V2 display requires a custom cable, see diagram above this line. Comment out this line to continue." + + #define BEEPER_PIN EXP1_9 + #define BTN_EN1 EXP1_3 + #define BTN_EN2 PB8 + #define BTN_ENC PB5 + +#elif HAS_WIRED_LCD #if ENABLED(CR10_STOCKDISPLAY) @@ -186,19 +205,19 @@ * TFTGLCD_PANEL_SPI display pinout * * Board Display - * _____ _____ - * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) - * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) LCD_CS | 3 4 | SD_CS (PA10) - * (FREE) PB9 | 5 6 | PA10 (SD_CS) (FREE) | 5 6 | MOSI (SPI1-MOSI) - * RESET | 7 8 | PA9 (MOD_RESET) (PB5) SD_DET | 7 8 | (FREE) - * (BEEPER) PB6 | 9 10| PB5 (SD_DET) GND | 9 10| 5V - * ----- ----- - * EXP1 EXP1 + * ------ ------ + * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) + * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) LCD_CS | 3 4 | SD_CS (PA10) + * (FREE) PB9 | 5 6 | PA10 (SD_CS) (FREE) | 5 6 | MOSI (SPI1-MOSI) + * RESET | 7 8 | PA9 (MOD_RESET) (PB5) SD_DET | 7 8 | (FREE) + * (BEEPER) PB6 | 9 10 | PB5 (SD_DET) GND | 9 10 | 5V + * ------ ------ + * EXP1 EXP1 * * Needs custom cable: * - * Board Adapter Display - * _________ + * Board Display + * * EXP1-1 ----------- EXP1-10 * EXP1-2 ----------- EXP1-9 * SPI1-4 ----------- EXP1-6 @@ -225,17 +244,18 @@ #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_SKR_MINI_E3_common.h' for details. Comment out this line to continue." - /** FYSETC TFT TFT81050 display pinout + /** + * FYSETC TFT TFT81050 display pinout * * Board Display - * _____ _____ - * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) - * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) MOD_RESET | 3 4 | SD_CS (PA10) - * (FREE) PB9 | 5 6 | PA10 (SD_CS) (PB8) LCD_CS | 5 6 | MOSI (SPI1-MOSI) - * RESET | 7 8 | PA9 (MOD_RESET) (PB5) SD_DET | 7 8 | RESET - * (BEEPER) PB6 | 9 10| PB5 (SD_DET) GND | 9 10| 5V - * ----- ----- - * EXP1 EXP1 + * ------ ------ + * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) + * (FREE) PB7 | 3 4 | PB8 (LCD_CS) (PA9) MOD_RESET | 3 4 | SD_CS (PA10) + * (FREE) PB9 | 5 6 | PA10 (SD_CS) (PB8) LCD_CS | 5 6 | MOSI (SPI1-MOSI) + * RESET | 7 8 | PA9 (MOD_RESET) (PB5) SD_DET | 7 8 | RESET + * (BEEPER) PB6 | 9 10 | PB5 (SD_DET) GND | 9 10 | 5V + * ------ ------ + * EXP1 EXP1 * * Needs custom cable: * @@ -279,5 +299,11 @@ #error "SD CUSTOM_CABLE is not compatible with SKR Mini E3." #endif -#define ONBOARD_SPI_DEVICE 1 // SPI1 +#define ONBOARD_SPI_DEVICE 1 // SPI1 -> used only by HAL/STM32F1... #define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card + +#define ENABLE_SPI1 +#define SDSS ONBOARD_SD_CS_PIN +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h index 96420cf32263..81339552247d 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_MZ_V1_0.h @@ -23,4 +23,4 @@ #define BOARD_INFO_NAME "BTT SKR Mini MZ V1.0" -#include "pins_BTT_SKR_MINI_E3_V2_0.h" +#include "pins_BTT_SKR_MINI_E3_V2_0.h" // ... BTT_SKR_MINI_E3_common diff --git a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h index 8668e1defd2d..650357ee9e5a 100644 --- a/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_BTT_SKR_MINI_V1_1.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(TARGET_STM32F1) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "BTT SKR Mini V1.1" @@ -70,7 +68,7 @@ #define E0_DIR_PIN PB0 #define E0_ENABLE_PIN PC4 -#if ENABLED(TMC_USE_SW_SPI) +#if ENABLED(TMC_USE_SW_SPI) // Shared with EXP2 #ifndef TMC_SW_SCK #define TMC_SW_SCK PB3 #endif @@ -95,33 +93,48 @@ #define TEMP_BED_PIN PB1 // Analog Input #define TEMP_0_PIN PA0 // Analog Input -// -// LCD Pins -// - -/** - * _____ _____ - * NC | · · | GND 5V | · · | GND - * RESET | · · | PB9 (SD_DETECT) (LCD_D7) PC14 | · · | PC15 (LCD_D6) - * (MOSI) PB5 | · · | PB8 (BTN_EN2) (LCD_D5) PB7 | · · | PC13 (LCD_D4) - * (SD_SS) PA15 | · · | PD2 (BTN_EN1) (LCD_RS) PC12 | · · | PB6 (LCD_EN) - * (SCK) PB3 | · · | PB4 (MISO) (BTN_ENC) PC11 | · · | PC10 (BEEPER) - * ----- ----- - * EXP2 EXP1 +/** ------ ------ + * (BEEPER) PC10 |10 9 | PC11 (BTN_ENC) (MISO) PB4 |10 9 | PB3 (SCK) + * (LCD_EN) PB6 | 8 7 | PC12 (LCD_RS) (BTN_EN1) PD2 | 8 7 | PA15 (SD_SS) + * (LCD_D4) PC13 6 5 | PB7 (LCD_D5) (BTN_EN2) PB8 6 5 | PB5 (MOSI) + * (LCD_D6) PC15 | 4 3 | PC14 (LCD_D7) (SD_DETECT) PB9 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ +#define EXP1_03_PIN PC14 +#define EXP1_04_PIN PC15 +#define EXP1_05_PIN PB7 +#define EXP1_06_PIN PC13 +#define EXP1_07_PIN PC12 +#define EXP1_08_PIN PB6 +#define EXP1_09_PIN PC11 +#define EXP1_10_PIN PC10 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB9 +#define EXP2_05_PIN PB5 +#define EXP2_06_PIN PB8 +#define EXP2_07_PIN PA15 +#define EXP2_08_PIN PD2 +#define EXP2_09_PIN PB3 +#define EXP2_10_PIN PB4 +// +// LCD / Controller +// #if HAS_WIRED_LCD - #define BEEPER_PIN PC10 - #define BTN_ENC PC11 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS PC15 + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 PB6 - #define BTN_EN2 PC13 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE PC14 - #define LCD_PINS_D4 PB7 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #elif IS_TFTGLCD_PANEL @@ -129,56 +142,56 @@ #undef BTN_ENC #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS PD2 + #define TFTGLCD_CS EXP2_08_PIN #endif - #define SD_DETECT_PIN PB9 + #define SD_DETECT_PIN EXP2_04_PIN #else - #define LCD_PINS_RS PC12 + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 PD2 - #define BTN_EN2 PB8 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_PINS_ENABLE PB6 + #define LCD_PINS_ENABLE EXP1_08_PIN #if ENABLED(FYSETC_MINI_12864) #define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN PC13 - #define DOGLCD_A0 PC12 - #define DOGLCD_CS PB6 - #define DOGLCD_SCK PB3 - #define DOGLCD_MOSI PB5 + #define LCD_RESET_PIN EXP1_06_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN #define FORCE_SOFT_SPI // SPI MODE3 - #define LED_PIN PB7 // red pwm - //#define LED_PIN PC15 // green - //#define LED_PIN PC14 // blue + #define LED_PIN EXP1_05_PIN // red pwm + //#define LED_PIN EXP1_04_PIN // green + //#define LED_PIN EXP1_03_PIN // blue //#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) // #ifndef RGB_LED_R_PIN - // #define RGB_LED_R_PIN PB7 + // #define RGB_LED_R_PIN EXP1_05_PIN // #endif // #ifndef RGB_LED_G_PIN - // #define RGB_LED_G_PIN PC15 + // #define RGB_LED_G_PIN EXP1_04_PIN // #endif // #ifndef RGB_LED_B_PIN - // #define RGB_LED_B_PIN PC14 + // #define RGB_LED_B_PIN EXP1_03_PIN // #endif //#elif ENABLED(FYSETC_MINI_12864_2_1) - // #define NEOPIXEL_PIN PB7 + // #define NEOPIXEL_PIN EXP1_05_PIN //#endif #else // !FYSETC_MINI_12864 - #define LCD_PINS_D4 PC13 + #define LCD_PINS_D4 EXP1_06_PIN #if IS_ULTIPANEL - #define LCD_PINS_D5 PB7 - #define LCD_PINS_D6 PC15 - #define LCD_PINS_D7 PC14 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -188,16 +201,11 @@ #endif // !FYSETC_MINI_12864 - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #endif @@ -216,11 +224,11 @@ #if SD_CONNECTION_IS(LCD) #define SPI_DEVICE 3 - #define SD_DETECT_PIN PB9 - #define SD_SCK_PIN PB3 - #define SD_MISO_PIN PB4 - #define SD_MOSI_PIN PB5 - #define SD_SS_PIN PA15 + #define SD_DETECT_PIN EXP2_04_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SD_SS_PIN EXP2_07_PIN #elif SD_CONNECTION_IS(ONBOARD) #define SD_DETECT_PIN PA3 #define SD_SCK_PIN PA5 diff --git a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h index 43dfdece44ae..77eb6aaf14bb 100644 --- a/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h +++ b/Marlin/src/pins/stm32f1/pins_CCROBOT_MEEB_3DP.h @@ -21,9 +21,9 @@ */ #pragma once -#if NOT_TARGET(TARGET_STM32F1) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "CCROBOT-ONLINE MEEB_3DP only supports one hotend / E-stepper. Comment out this line to continue." #endif @@ -84,15 +84,20 @@ #define E0_STEP_PIN PA6 #define E0_DIR_PIN PA5 -// Stepper drivers Serial UART -#define X_SERIAL_TX_PIN PB3 -#define X_SERIAL_RX_PIN PD2 -#define Y_SERIAL_TX_PIN PA15 -#define Y_SERIAL_RX_PIN PC6 -#define Z_SERIAL_TX_PIN PB11 -#define Z_SERIAL_RX_PIN PB10 -#define E0_SERIAL_TX_PIN PC5 -#define E0_SERIAL_RX_PIN PC4 +#if HAS_TMC_UART + // Stepper drivers Serial UART + #define X_SERIAL_TX_PIN PB3 + #define X_SERIAL_RX_PIN PD2 + + #define Y_SERIAL_TX_PIN PA15 + #define Y_SERIAL_RX_PIN PC6 + + #define Z_SERIAL_TX_PIN PB11 + #define Z_SERIAL_RX_PIN PB10 + + #define E0_SERIAL_TX_PIN PC5 + #define E0_SERIAL_RX_PIN PC4 +#endif // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -117,41 +122,43 @@ #define NEOPIXEL_PIN PC7 // The NEOPIXEL LED driving pin /** - * 1 _____ 2 - * PB5 | · · | PB6 - * PA2 | · · | RESET - * PA3 | · · | PB8 - * PB7 | · · | PA4 - * GND | · · | VCC5 - * 9 ----- 10 - * LCD EXP + * ------ + * PB5 |10 9 | PB6 + * PA2 | 8 7 | RESET + * PA3 6 5 | PB8 + * PB7 | 4 3 | PA4 + * GND | 2 1 | VCC5 + * ------ + * EXP1 */ +#define EXP1_03_PIN PA4 +#define EXP1_04_PIN PB7 +#define EXP1_05_PIN PB8 +#define EXP1_06_PIN PA3 +#define EXP1_07_PIN -1 // RESET +#define EXP1_08_PIN PA2 +#define EXP1_09_PIN PB6 +#define EXP1_10_PIN PB5 // // LCD / Controller // #if ENABLED(CR10_STOCKDISPLAY) - #define BEEPER_PIN PB5 - #define BTN_EN1 PA2 - #define BTN_EN2 PA3 - #define BTN_ENC PB6 - - #define LCD_PINS_RS PB7 // CS -- SOFT SPI for ENDER3 LCD - #define LCD_PINS_D4 PB8 // SCLK - #define LCD_PINS_ENABLE PA4 // DATA MOSI + #define BEEPER_PIN EXP1_10_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN + + #define LCD_PINS_RS EXP1_04_PIN // CS -- SOFT SPI for ENDER3 LCD + #define LCD_PINS_D4 EXP1_05_PIN // SCLK + #define LCD_PINS_ENABLE EXP1_03_PIN // DATA MOSI #endif // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif // diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D.h b/Marlin/src/pins/stm32f1/pins_CHITU3D.h index bb6f5719246e..2d33fb9f2cc2 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" /** * 2017 Victor Perez Marlin for stm32f1 test @@ -40,47 +38,32 @@ // Ignore temp readings during development. //#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000 +// +// Limit Switches +// +#define X_STOP_PIN PG10 +#define Y_STOP_PIN PA12 +#define Z_STOP_PIN PA14 + // // Steppers // #define X_STEP_PIN PE5 #define X_DIR_PIN PE6 #define X_ENABLE_PIN PC13 -#define X_MIN_PIN PG10 -#define X_MAX_PIN -1 #define Y_STEP_PIN PE2 #define Y_DIR_PIN PE3 #define Y_ENABLE_PIN PE4 -#define Y_MIN_PIN PA12 -#define Y_MAX_PIN #define Z_STEP_PIN PB9 #define Z_DIR_PIN PE0 #define Z_ENABLE_PIN PE1 -#define Z_MIN_PIN PA14 -#define Z_MAX_PIN -1 - -#define Y2_STEP_PIN -1 -#define Y2_DIR_PIN -1 -#define Y2_ENABLE_PIN -1 - -#define Z2_STEP_PIN -1 -#define Z2_DIR_PIN -1 -#define Z2_ENABLE_PIN -1 #define E0_STEP_PIN PB4 #define E0_DIR_PIN PB5 #define E0_ENABLE_PIN PB8 -#define E1_STEP_PIN -1 -#define E1_DIR_PIN -1 -#define E1_ENABLE_PIN -1 - -#define E2_STEP_PIN -1 -#define E2_DIR_PIN -1 -#define E2_ENABLE_PIN -1 - // // Misc. Functions // @@ -98,12 +81,7 @@ // Heaters / Fans // #define HEATER_0_PIN PD12 // HOT-END -#define HEATER_1_PIN -1 -#define HEATER_2_PIN -1 - #define HEATER_BED_PIN PG11 // HOT-BED -#define HEATER_BED2_PIN -1 // BED2 -#define HEATER_BED3_PIN -1 // BED3 #ifndef FAN_PIN #define FAN_PIN PG14 // MAIN BOARD FAN @@ -114,10 +92,8 @@ // // Temperature Sensors // -#define TEMP_BED_PIN PA0 // Analog Input #define TEMP_0_PIN PA1 // Analog Input -#define TEMP_1_PIN -1 // Analog Input -#define TEMP_2_PIN -1 // Analog Input +#define TEMP_BED_PIN PA0 // Analog Input // // LCD Pins diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h index c90ae84acbb9..afe58df803d6 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h @@ -21,169 +21,8 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#define BOARD_INFO_NAME "Chitu3D V5" -/** - * 2017 Victor Perez Marlin for stm32f1 test - */ - -#define BOARD_INFO_NAME "Chitu3D V5" -#define DEFAULT_MACHINE_NAME "STM32F103ZET6" - -#define BOARD_NO_NATIVE_USB - -#define DISABLE_JTAG - -// -// EEPROM -// -#define FLASH_EEPROM_EMULATION -#if ENABLED(FLASH_EEPROM_EMULATION) - // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) - #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) - #define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB) - #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE -#else - #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM -#endif - -// -// Limit Switches -// -#define X_STOP_PIN PG10 -#define Y_STOP_PIN PA12 -#define Z_STOP_PIN PA14 - -// -// Steppers -// -#define X_ENABLE_PIN PC13 -#define X_STEP_PIN PE5 -#define X_DIR_PIN PE6 - -#define Y_ENABLE_PIN PE4 -#define Y_STEP_PIN PE2 -#define Y_DIR_PIN PE3 - -#define Z_ENABLE_PIN PE1 -#define Z_STEP_PIN PB9 -#define Z_DIR_PIN PE0 - -#define E0_ENABLE_PIN PB8 -#define E0_STEP_PIN PB4 -#define E0_DIR_PIN PB5 - -#define E1_ENABLE_PIN PG8 -#define E1_STEP_PIN PC7 -#define E1_DIR_PIN PC6 - -// -// Temperature Sensors -// -#define TEMP_0_PIN PA1 // TH1 -#define TEMP_BED_PIN PA0 // TB1 - -// -// Heaters -// -#define HEATER_0_PIN PG12 // HEATER1 -#define HEATER_BED_PIN PG11 // HOT BED - -// -// Fans -// -#define CONTROLLER_FAN_PIN PD6 // BOARD FAN -#define FAN_PIN PG13 // FAN -#define FAN2_PIN PG14 - -// -// Misc -// -#define BEEPER_PIN PB0 -//#define LED_PIN -1 -//#define POWER_LOSS_PIN -1 -#define FIL_RUNOUT_PIN PA15 - -// SPI Flash -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH - #define SPI_FLASH_SIZE 0x200000 // 2MB -#endif - -// SPI 2 -#define W25QXX_CS_PIN PB12 -#define W25QXX_MOSI_PIN PB15 -#define W25QXX_MISO_PIN PB14 -#define W25QXX_SCK_PIN PB13 - -// -// TronXY TFT Support -// - -#if HAS_FSMC_TFT - - // Shared FSMC - - #define TOUCH_CS_PIN PB7 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI - - #define TFT_RESET_PIN PF11 - #define TFT_BACKLIGHT_PIN PD13 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_CS_PIN PD7 - #define FSMC_RS_PIN PD11 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 - -#endif - -#if ENABLED(TFT_LVGL_UI) - // LVGL - #define HAS_SPI_FLASH_FONT 1 - #define HAS_GCODE_PREVIEW 1 - #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 - #define HAS_LANG_SELECT_SCREEN 1 - #define HAS_BAK_VIEW_IN_FLASH 0 - #define HAS_LOGO_IN_FLASH 0 -#elif ENABLED(TFT_COLOR_UI) - // Color UI - #define TFT_DRIVER ILI9488 - #define TFT_BUFFER_SIZE 14400 -#endif - -// XPT2046 Touch Screen calibration -#if ANY(TFT_LVGL_UI, TFT_COLOR_UI, TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -17181 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11434 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 501 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -9 - #endif -#endif - -// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available -// Needs to use SPI2 -#define SPI_DEVICE 2 -#define SD_SCK_PIN PB13 -#define SD_MISO_PIN PB14 -#define SD_MOSI_PIN PB15 -#define SD_SS_PIN PB12 +#define Z_STOP_PIN PG9 -// -// SD Card -// -#define SDIO_SUPPORT -#define SD_DETECT_PIN -1 // PF0, but it isn't connected -#define SDIO_CLOCK 4500000 -#define SDIO_READ_RETRIES 16 +#include "pins_CHITU3D_common.h" diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h index 96cf36629a5b..b76ef52c420a 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h @@ -21,184 +21,14 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif - -/** - * 2017 Victor Perez Marlin for stm32f1 test - */ - -#define BOARD_INFO_NAME "Chitu3D" -#define DEFAULT_MACHINE_NAME "STM32F103ZET6" - -#define BOARD_NO_NATIVE_USB - -#define DISABLE_JTAG - -// -// EEPROM -// - -#if NO_EEPROM_SELECTED - #define FLASH_EEPROM_EMULATION -#endif - -#if ENABLED(FLASH_EEPROM_EMULATION) - // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) - #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) - #define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB) - #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE -#else - #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM -#endif - -// -// Limit Switches -// -#define X_STOP_PIN PG10 -#define Y_STOP_PIN PA12 -#define Z_STOP_PIN PG9 - -// -// Steppers -// -#define X_ENABLE_PIN PC13 -#define X_STEP_PIN PE5 -#define X_DIR_PIN PE6 - -#define Y_ENABLE_PIN PE4 -#define Y_STEP_PIN PE2 -#define Y_DIR_PIN PE3 - -#define Z_ENABLE_PIN PE1 -#define Z_STEP_PIN PB9 -#define Z_DIR_PIN PE0 +#define BOARD_INFO_NAME "Chitu3D V6" #define Z2_ENABLE_PIN PF3 #define Z2_STEP_PIN PF5 #define Z2_DIR_PIN PF1 -#define E0_ENABLE_PIN PB8 -#define E0_STEP_PIN PB4 -#define E0_DIR_PIN PB5 - -#define E1_ENABLE_PIN PG8 -#define E1_STEP_PIN PC7 -#define E1_DIR_PIN PC6 - -// -// Temperature Sensors -// -#define TEMP_0_PIN PA1 // TH1 -#define TEMP_BED_PIN PA0 // TB1 - -// -// Heaters -// -#define HEATER_0_PIN PG12 // HEATER1 -#define HEATER_BED_PIN PG11 // HOT BED -//#define HEATER_BED_INVERTING true - -// -// Fans -// -#define CONTROLLER_FAN_PIN PD6 // BOARD FAN -#define FAN_PIN PG13 // FAN -#define FAN2_PIN PG14 - -// -// Misc -// -#define BEEPER_PIN PB0 -//#define LED_PIN PD3 -//#define POWER_LOSS_PIN PG2 // PG4 PW_DET - -#ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN PA15 // MT_DET -#endif #ifndef FIL_RUNOUT2_PIN #define FIL_RUNOUT2_PIN PF13 #endif -// SPI Flash -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH - #define SPI_FLASH_SIZE 0x200000 // 2MB -#endif - -// SPI 2 -#define W25QXX_CS_PIN PB12 -#define W25QXX_MOSI_PIN PB15 -#define W25QXX_MISO_PIN PB14 -#define W25QXX_SCK_PIN PB13 - -// -// TronXY TFT Support -// - -#if HAS_FSMC_TFT - - // Shared FSMC - - #define TOUCH_CS_PIN PB7 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI - - #define TFT_RESET_PIN PF11 - #define TFT_BACKLIGHT_PIN PD13 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_CS_PIN PD7 - #define FSMC_RS_PIN PD11 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 - -#endif - -#if ENABLED(TFT_LVGL_UI) - // LVGL - #define HAS_SPI_FLASH_FONT 1 - #define HAS_GCODE_PREVIEW 1 - #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 - #define HAS_LANG_SELECT_SCREEN 1 - #define HAS_BAK_VIEW_IN_FLASH 0 - #define HAS_LOGO_IN_FLASH 0 -#elif ENABLED(TFT_COLOR_UI) - // Color UI - #define TFT_DRIVER ILI9488 - #define TFT_BUFFER_SIZE 14400 -#endif - -// XPT2046 Touch Screen calibration -#if ANY(TFT_LVGL_UI, TFT_COLOR_UI, TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -17181 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11434 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 501 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -9 - #endif -#endif - -// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available -// so SPI2 is required. -#define SPI_DEVICE 2 -#define SD_SCK_PIN PB13 -#define SD_MISO_PIN PB14 -#define SD_MOSI_PIN PB15 -#define SD_SS_PIN PB12 - -// -// SD Card -// -#define SDIO_SUPPORT -#define SD_DETECT_PIN -1 // PF0, but it isn't connected -#define SDIO_CLOCK 4500000 -#define SDIO_READ_RETRIES 16 +#include "pins_CHITU3D_common.h" diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h new file mode 100755 index 000000000000..eb7f91deab96 --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V9.h @@ -0,0 +1,36 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define BOARD_INFO_NAME "Chitu3D V9" + +#define Z_STOP_PIN PA14 + +#define Z2_ENABLE_PIN PF3 +#define Z2_STEP_PIN PF5 +#define Z2_DIR_PIN PF1 + +#ifndef FIL_RUNOUT2_PIN + #define FIL_RUNOUT2_PIN PF13 +#endif + +#include "pins_CHITU3D_common.h" diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h new file mode 100644 index 000000000000..989b7eec6f65 --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_common.h @@ -0,0 +1,177 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "Chitu3D" +#endif +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME "STM32F103ZET6" +#endif + +#define BOARD_NO_NATIVE_USB +#define DISABLE_JTAG + +// +// EEPROM +// + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION +#endif + +#if ENABLED(FLASH_EEPROM_EMULATION) + // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) + #define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE) + #define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE +#else + #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM +#endif + +// +// Limit Switches +// +#define X_STOP_PIN PG10 +#define Y_STOP_PIN PA12 +#ifndef Z_STOP_PIN + #define Z_STOP_PIN PG9 +#endif + +// +// Steppers +// +#define X_ENABLE_PIN PC13 +#define X_STEP_PIN PE5 +#define X_DIR_PIN PE6 + +#define Y_ENABLE_PIN PE4 +#define Y_STEP_PIN PE2 +#define Y_DIR_PIN PE3 + +#define Z_ENABLE_PIN PE1 +#define Z_STEP_PIN PB9 +#define Z_DIR_PIN PE0 + +#define E0_ENABLE_PIN PB8 +#define E0_STEP_PIN PB4 +#define E0_DIR_PIN PB5 + +#define E1_ENABLE_PIN PG8 +#define E1_STEP_PIN PC7 +#define E1_DIR_PIN PC6 + +// +// Temperature Sensors +// +#define TEMP_0_PIN PA1 // TH1 Analog Input +#define TEMP_BED_PIN PA0 // TB1 Analog Input + +// +// Heaters +// +#define HEATER_0_PIN PG12 // HEATER1 +#define HEATER_BED_PIN PG11 // HOT BED +//#define HEATER_BED_INVERTING true + +// +// Fans +// +#define CONTROLLER_FAN_PIN PD6 // BOARD FAN +#define FAN_PIN PG13 // FAN +#define FAN2_PIN PG14 + +// +// Misc +// +#define BEEPER_PIN PB0 +//#define LED_PIN PD3 +//#define POWER_LOSS_PIN PG2 // PG4 PW_DET + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PA15 // MT_DET +#endif + +// SPI Flash +#define HAS_SPI_FLASH 1 +#if HAS_SPI_FLASH + #define SPI_FLASH_SIZE 0x200000 // 2MB +#endif + +// SPI 2 +#define SPI_FLASH_CS_PIN PB12 +#define SPI_FLASH_MOSI_PIN PB15 +#define SPI_FLASH_MISO_PIN PB14 +#define SPI_FLASH_SCK_PIN PB13 + +// +// TFT with FSMC interface +// +#if HAS_FSMC_TFT + #define TOUCH_CS_PIN PB7 // SPI1_NSS + #define TOUCH_SCK_PIN PA5 // SPI1_SCK + #define TOUCH_MISO_PIN PA6 // SPI1_MISO + #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI + + #define TFT_RESET_PIN PF11 + #define TFT_BACKLIGHT_PIN PD13 + + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 + #define FSMC_DMA_DEV DMA2 + #define FSMC_DMA_CHANNEL DMA_CH5 + + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN +#endif + +#if HAS_TFT_LVGL_UI + // LVGL + #define HAS_SPI_FLASH_FONT 1 + #define HAS_GCODE_PREVIEW 1 + #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 + #define HAS_LANG_SELECT_SCREEN 1 + #define HAS_BAK_VIEW_IN_FLASH 0 + #define HAS_LOGO_IN_FLASH 0 +#elif ENABLED(TFT_COLOR_UI) + // Color UI + #define TFT_BUFFER_SIZE 14400 +#endif + +// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available +// so SPI2 is required. +#define SPI_DEVICE 2 +#define SD_SCK_PIN PB13 +#define SD_MISO_PIN PB14 +#define SD_MOSI_PIN PB15 +#define SD_SS_PIN PB12 + +// +// SD Card +// +#define SDIO_SUPPORT +#define SD_DETECT_PIN -1 // PF0, but it isn't connected +#define SDIO_CLOCK 4500000 +#define SDIO_READ_RETRIES 16 diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h new file mode 100644 index 000000000000..ffd7baa00c4d --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V24S1.h @@ -0,0 +1,36 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Creality v2.4.S1 (STM32F103RE) v101 as found in the Ender 7 board pin assignments + */ + +#define BOARD_INFO_NAME "Creality v2.4.S1 V101" +#define DEFAULT_MACHINE_NAME "Creality3D" + +// +// Heaters +// +#define HEATER_BED_PIN PA15 // HOT BED + +#include "pins_CREALITY_V4.h" diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h index 8b5b8562a2bb..ea58b5b3a99c 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4.h @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ +#pragma once /** * Creality 4.2.x (STM32F103RET6) board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "Creality V4 only supports one hotend / E-stepper. Comment out this line to continue." #endif @@ -58,10 +59,12 @@ // // Servos // -#ifndef HAS_PIN_27_BOARD - #define SERVO0_PIN PB0 // BLTouch OUT -#else - #define SERVO0_PIN PC6 +#ifndef SERVO0_PIN + #ifndef HAS_PIN_27_BOARD + #define SERVO0_PIN PB0 // BLTouch OUT + #else + #define SERVO0_PIN PC6 + #endif #endif // @@ -71,7 +74,9 @@ #define Y_STOP_PIN PA6 #define Z_STOP_PIN PA7 -#define Z_MIN_PROBE_PIN PB1 // BLTouch IN +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PB1 // BLTouch IN +#endif // // Filament Runout Sensor @@ -83,37 +88,37 @@ // // Steppers // -#define X_ENABLE_PIN PC3 #ifndef X_STEP_PIN #define X_STEP_PIN PC2 #endif #ifndef X_DIR_PIN #define X_DIR_PIN PB9 #endif +#define X_ENABLE_PIN PC3 // Shared -#define Y_ENABLE_PIN PC3 #ifndef Y_STEP_PIN #define Y_STEP_PIN PB8 #endif #ifndef Y_DIR_PIN #define Y_DIR_PIN PB7 #endif +#define Y_ENABLE_PIN X_ENABLE_PIN -#define Z_ENABLE_PIN PC3 #ifndef Z_STEP_PIN #define Z_STEP_PIN PB6 #endif #ifndef Z_DIR_PIN #define Z_DIR_PIN PB5 #endif +#define Z_ENABLE_PIN X_ENABLE_PIN -#define E0_ENABLE_PIN PC3 #ifndef E0_STEP_PIN #define E0_STEP_PIN PB4 #endif #ifndef E0_DIR_PIN #define E0_DIR_PIN PB3 #endif +#define E0_ENABLE_PIN X_ENABLE_PIN // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role @@ -129,11 +134,18 @@ // // Heaters / Fans // -#define HEATER_0_PIN PA1 // HEATER1 -#define HEATER_BED_PIN PA2 // HOT BED - -#define FAN_PIN PA0 // FAN -#define FAN_SOFT_PWM +#ifndef HEATER_0_PIN + #define HEATER_0_PIN PA1 // HEATER1 +#endif +#ifndef HEATER_BED_PIN + #define HEATER_BED_PIN PA2 // HOT BED +#endif +#ifndef FAN_PIN + #define FAN_PIN PA0 // FAN +#endif +#if PIN_EXISTS(FAN) + #define FAN_SOFT_PWM +#endif // // SD Card @@ -145,37 +157,39 @@ #define SDIO_SUPPORT #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer -#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD) - #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." -#endif +#if ENABLED(CR10_STOCKDISPLAY) -#if ENABLED(RET6_12864_LCD) + #if ENABLED(RET6_12864_LCD) - // RET6 12864 LCD - #define LCD_PINS_RS PB12 - #define LCD_PINS_ENABLE PB15 - #define LCD_PINS_D4 PB13 + // RET6 12864 LCD + #define LCD_PINS_RS PB12 + #define LCD_PINS_ENABLE PB15 + #define LCD_PINS_D4 PB13 - #define BTN_ENC PB2 - #define BTN_EN1 PB10 - #define BTN_EN2 PB14 + #define BTN_ENC PB2 + #define BTN_EN1 PB10 + #define BTN_EN2 PB14 - #ifndef HAS_PIN_27_BOARD - #define BEEPER_PIN PC6 - #endif + #ifndef HAS_PIN_27_BOARD + #define BEEPER_PIN PC6 + #endif + + #elif ENABLED(VET6_12864_LCD) -#elif ENABLED(VET6_12864_LCD) + // VET6 12864 LCD + #define LCD_PINS_RS PA4 + #define LCD_PINS_ENABLE PA7 + #define LCD_PINS_D4 PA5 - // VET6 12864 LCD - #define LCD_PINS_RS PA4 - #define LCD_PINS_ENABLE PA7 - #define LCD_PINS_D4 PA5 + #define BTN_ENC PC5 + #define BTN_EN1 PB10 + #define BTN_EN2 PA6 - #define BTN_ENC PC5 - #define BTN_EN1 PB10 - #define BTN_EN2 PA6 + #else + #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." + #endif -#elif ENABLED(DWIN_CREALITY_LCD) +#elif EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) // RET6 DWIN ENCODER LCD #define BTN_ENC PB14 @@ -185,7 +199,6 @@ //#define LCD_LED_PIN PB2 #ifndef BEEPER_PIN #define BEEPER_PIN PB13 - #undef SPEAKER #endif #elif ENABLED(DWIN_VET6_CREALITY_LCD) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h index 025e68d4da05..52ebdecc3576 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V4210.h @@ -19,14 +19,15 @@ * along with this program. If not, see . * */ +#pragma once /** * CREALITY 4.2.10 (STM32F103) board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "CREALITY supports up to 1 hotends / E-steppers. Comment out this line to continue." #endif @@ -60,13 +61,13 @@ // SPI //#define SPI_EEPROM // EEPROM on SPI-0 //#define SPI_CHAN_EEPROM1 ? - //#define SPI_EEPROM1_CS ? + //#define SPI_EEPROM1_CS_PIN ? // 2K EEPROM - //#define SPI_EEPROM2_CS ? + //#define SPI_EEPROM2_CS_PIN ? // 32Mb FLASH - //#define SPI_FLASH_CS ? + //#define SPI_FLASH_CS_PIN ? #endif // @@ -155,35 +156,67 @@ #define SDIO_SUPPORT #define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer -#if ENABLED(CR10_STOCKDISPLAY) && NONE(RET6_12864_LCD, VET6_12864_LCD) - #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." -#endif - -#if ENABLED(RET6_12864_LCD) - - // RET6 12864 LCD - #define LCD_PINS_RS PB12 - #define LCD_PINS_ENABLE PB15 - #define LCD_PINS_D4 PB13 +#if ENABLED(CR10_STOCKDISPLAY) + + #if ENABLED(RET6_12864_LCD) + + /** + * RET6 12864 LCD + * ------ + * PC6 |10 9 | PB2 + * PB10 | 8 7 | PE8 + * PB14 6 5 | PB13 + * PB12 | 4 3 | PB15 + * GND | 2 1 | 5V + * ------ + * EXP1 + */ + #define EXP1_03_PIN PB15 + #define EXP1_04_PIN PB12 + #define EXP1_05_PIN PB13 + #define EXP1_06_PIN PB14 + #define EXP1_07_PIN PE8 + #define EXP1_08_PIN PB10 + #define EXP1_09_PIN PB2 + #define EXP1_10_PIN PC6 + + #define BEEPER_PIN EXP1_10_PIN + + #elif ENABLED(VET6_12864_LCD) + + /** + * VET6 12864 LCD + * ------ + * ? |10 9 | PC5 + * PB10 | 8 7 | ? + * PA6 6 5 | PA5 + * PA4 | 4 3 | PA7 + * GND | 2 1 | 5V + * ------ + * EXP1 + */ + #define EXP1_03_PIN PA7 + #define EXP1_04_PIN PA4 + #define EXP1_05_PIN PA5 + #define EXP1_06_PIN PA6 + #define EXP1_07_PIN -1 + #define EXP1_08_PIN PB10 + #define EXP1_09_PIN PC5 + #define EXP1_10_PIN -1 - #define BTN_ENC PB2 - #define BTN_EN1 PB10 - #define BTN_EN2 PB14 - - #define BEEPER_PIN PC6 - -#elif ENABLED(VET6_12864_LCD) + #else + #error "Define RET6_12864_LCD or VET6_12864_LCD to select pins for CR10_STOCKDISPLAY with the Creality V4 controller." + #endif - // VET6 12864 LCD - #define LCD_PINS_RS PA4 - #define LCD_PINS_ENABLE PA7 - #define LCD_PINS_D4 PA5 + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN - #define BTN_ENC PC5 - #define BTN_EN1 PB10 - #define BTN_EN2 PA6 + #define BTN_ENC EXP1_09_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN -#elif ENABLED(DWIN_CREALITY_LCD) +#elif EITHER(HAS_DWIN_E3V2, IS_DWIN_MARLINUI) // RET6 DWIN ENCODER LCD #define BTN_ENC PB14 @@ -193,7 +226,6 @@ //#define LCD_LED_PIN PB2 #ifndef BEEPER_PIN #define BEEPER_PIN PB13 - #undef SPEAKER #endif #elif ENABLED(DWIN_VET6_CREALITY_LCD) diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V427.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V427.h index 64ef046bd3ad..c327abee7796 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V427.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V427.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once /** * CREALITY v4.2.7 (STM32F103) board pin assignments diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V431.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V431.h index ff9f76054e6e..2f1f2ffb4113 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V431.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V431.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once /** * CREALITY v4.3.1 (STM32F103) board pin assignments @@ -30,10 +31,21 @@ // // Steppers // -#define X_STEP_PIN PB8 -#define X_DIR_PIN PB7 +#if MB(CREALITY_V431, CREALITY_V431_A, CREALITY_V431_B) -#define Y_STEP_PIN PC2 -#define Y_DIR_PIN PB9 + #define X_STEP_PIN PB8 + #define X_DIR_PIN PB7 + + #define Y_STEP_PIN PC2 + #define Y_DIR_PIN PB9 + +#endif + +#if MB(CREALITY_V431_B, CREALITY_V431_C) + + #define E0_STEP_PIN PB3 + #define E0_DIR_PIN PB4 + +#endif #include "pins_CREALITY_V4.h" diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h index 9acbb42a88f4..64e07a0bc832 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V452.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once /** * Creality v4.5.2 (STM32F103RET6) board pin assignments @@ -28,7 +29,7 @@ #error "Creality v4.5.2 only supports one hotend / E-stepper. Comment out this line to continue." #endif -#define BOARD_NAME "Creality v4.5.2" +#define BOARD_INFO_NAME "Creality v4.5.2" #define HEATER_0_PIN PA1 // HEATER1 #define HEATER_BED_PIN PA2 // HOT BED diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h index f990b2f7b474..ca437312c8e1 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V453.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once /** * Creality v4.5.3 (STM32F103RET6) board pin assignments @@ -28,7 +29,7 @@ #error "Creality v4.5.3 only supports one hotend / E-stepper. Comment out this line to continue." #endif -#define BOARD_NAME "Creality v4.5.3" +#define BOARD_INFO_NAME "Creality v4.5.3" #define HEATER_0_PIN PB14 // HEATER1 #define HEATER_BED_PIN PB13 // HOT BED diff --git a/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h b/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h index f2be2895305f..39dccf1271af 100644 --- a/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h +++ b/Marlin/src/pins/stm32f1/pins_CREALITY_V45x.h @@ -19,14 +19,13 @@ * along with this program. If not, see . * */ +#pragma once /** * Creality v4.5.2 and v4.5.3 (STM32F103RET6) board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define DEFAULT_MACHINE_NAME "Creality3D" diff --git a/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h new file mode 100644 index 000000000000..7ce21a20afbd --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_ERYONE_ERY32_MINI.h @@ -0,0 +1,195 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Eryone Ery32 mini (STM32F103VET6) board pin assignments + */ + +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 + #error "Eryone Ery32 mini supports up to 2 hotends / E-steppers. Comment out this line to continue." +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "ERYONE Ery32 mini" +#endif + +//#define DISABLE_DEBUG +#define DISABLE_JTAG +//#define ENABLE_SPI3 +#define FLASH_EEPROM_EMULATION +#define FAN_SOFT_PWM + +#if ENABLED(FLASH_EEPROM_EMULATION) + #define EEPROM_PAGE_SIZE (0x800U) // 2KB + #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) + #define MARLIN_EEPROM_SIZE (EEPROM_PAGE_SIZE) +#endif + +// +// Servos +// +#define SERVO0_PIN PA12 + +// +// Limit Switches +// +#define X_STOP_PIN PD8 +#define Y_STOP_PIN PD15 +#define Z_MIN_PIN PA11 +//#define Z_MAX_PIN PB1 + +// +// Steppers +// +#define X_STEP_PIN PB15 +#define X_DIR_PIN PB14 +#define X_ENABLE_PIN PD10 + +#define Y_STEP_PIN PD14 +#define Y_DIR_PIN PD13 +#define Y_ENABLE_PIN PC6 + +#define Z_STEP_PIN PC8 +#define Z_DIR_PIN PC7 +#define Z_ENABLE_PIN PA8 + +#define E0_STEP_PIN PE13 +#define E0_DIR_PIN PE14 +#define E0_ENABLE_PIN PB13 + +//#define E1_STEP_PIN PD13 +//#define E1_DIR_PIN PD12 +//#define E1_ENABLE_PIN PC6 + +// +// Heaters 0,1 / Fans / Bed +// +#define HEATER_0_PIN PD11 + +#if ENABLED(FET_ORDER_EFB) // Hotend, Fan, Bed + #define HEATER_BED_PIN PD12 +#elif ENABLED(FET_ORDER_EEF) // Hotend, Hotend, Fan + #define HEATER_1_PIN PD4 +#elif ENABLED(FET_ORDER_EEB) // Hotend, Hotend, Bed + #define HEATER_1_PIN PD4 + #define HEATER_BED_PIN PD12 +#elif ENABLED(FET_ORDER_EFF) // Hotend, Fan, Fan + #define FAN1_PIN PD12 +#elif DISABLED(FET_ORDER_SF) // Not Spindle, Fan (i.e., "EFBF" or "EFBE") + #define HEATER_BED_PIN PD12 + #if EITHER(HAS_MULTI_HOTEND, HEATERS_PARALLEL) + #define HEATER_1_PIN PB9 + #else + #define FAN1_PIN PB9 + #endif +#endif + +#ifndef FAN_PIN + #if EITHER(FET_ORDER_EFB, FET_ORDER_EFF) // Hotend, Fan, Bed or Hotend, Fan, Fan + #define FAN_PIN PB5 + #elif EITHER(FET_ORDER_EEF, FET_ORDER_SF) // Hotend, Hotend, Fan or Spindle, Fan + #define FAN_PIN PD12 + #elif ENABLED(FET_ORDER_EEB) // Hotend, Hotend, Bed + #define FAN_PIN -1 // IO pin. Buffer needed + #else // Non-specific are "EFB" (i.e., "EFBF" or "EFBE") + #define FAN_PIN PB5 + #endif +#endif + +// +// Misc. Functions +// +//#define PS_ON_PIN PB9 + +#if HAS_TMC_UART + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + #define X_HARDWARE_SERIAL MSerial4 + #define Y_HARDWARE_SERIAL MSerial4 + #define Z_HARDWARE_SERIAL MSerial4 + #define E0_HARDWARE_SERIAL MSerial4 + #ifndef X_SLAVE_ADDRESS + #define X_SLAVE_ADDRESS 2 + #endif + #ifndef Y_SLAVE_ADDRESS + #define Y_SLAVE_ADDRESS 3 + #endif + #ifndef Z_SLAVE_ADDRESS + #define Z_SLAVE_ADDRESS 1 + #endif + #ifndef E0_SLAVE_ADDRESS + #define E0_SLAVE_ADDRESS 0 + #endif +#endif +// +// Temperature Sensors +// +#define TEMP_BED_PIN PC2 //TB +#define TEMP_0_PIN PC1 //TH1 +//#define TEMP_1_PIN PC3 //TH2 +#define TEMP_BOARD_PIN PC3 +#ifndef TEMP_SENSOR_BOARD + #define TEMP_SENSOR_BOARD 13 +#endif +#define FIL_RUNOUT_PIN PA10 // MT_DET + +// +// LCD Pins +// +#if HAS_WIRED_LCD + #define BEEPER_PIN PE12 + #define BTN_ENC PE11 + #define LCD_PINS_ENABLE PE10 + #define LCD_PINS_RS PE9 + #define BTN_EN1 PE4 + #define BTN_EN2 PE3 + #define LCD_PINS_D4 PE8 + #define LCD_PINS_D5 PE7 + #define LCD_PINS_D6 PB2 + #define LCD_PINS_D7 PB1 + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + + #define BOARD_ST7920_DELAY_1 50 + #define BOARD_ST7920_DELAY_2 50 + #define BOARD_ST7920_DELAY_3 50 + +#endif // HAS_WIRED_LCD + +// +// SD Card +// +#define ENABLE_SPI1 +#define SD_DETECT_PIN PA4 +#define SCK_PIN PA5 +#define MISO_PIN PA6 +#define MOSI_PIN PA7 +#define SS_PIN PC4 diff --git a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h index c49c31e741c1..67174556926b 100644 --- a/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h +++ b/Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h @@ -41,7 +41,7 @@ #define BOARD_NO_NATIVE_USB // Avoid conflict with TIMER_SERVO when using the STM32 HAL -#define TEMP_TIMER 5 +#define TEMP_TIMER 5 // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role @@ -65,7 +65,7 @@ #define SD_SCK_PIN PB13 // SPI2 #define SD_MISO_PIN PB14 // SPI2 #define SD_MOSI_PIN PB15 // SPI2 -#define SPI_DEVICE 2 +#define SPI_DEVICE 2 // SPI Flash #define HAS_SPI_FLASH 1 @@ -73,10 +73,10 @@ #if HAS_SPI_FLASH // SPI 2 - #define W25QXX_CS_PIN PB12 // SPI2_NSS / Flash chip-select - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 // SPI2_NSS / Flash chip-select + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif // @@ -124,11 +124,11 @@ // SoftwareSerial with one pin per driver // Compatible with TMC2208 and TMC2209 drivers #define X_SERIAL_TX_PIN PA10 // RXD1 - #define X_SERIAL_RX_PIN PA10 // RXD1 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PA9 // TXD1 - #define Y_SERIAL_RX_PIN PA9 // TXD1 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PC7 // IO1 - #define Z_SERIAL_RX_PIN PC7 // IO1 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define TMC_BAUD_RATE 19200 #else // Motor current PWM pins @@ -195,9 +195,10 @@ // // Misc. Functions // -//#define POWER_LOSS_PIN PA1 // PW_SO #if ENABLED(BACKUP_POWER_SUPPLY) #define POWER_LOSS_PIN PA2 // PW_DET (UPS) MKSPWC +#else + //#define POWER_LOSS_PIN PA1 // PW_SO #endif /** @@ -217,13 +218,15 @@ // #if ENABLED(PSU_CONTROL) #define KILL_PIN PA2 // PW_DET - #define KILL_PIN_INVERTING true + #define KILL_PIN_STATE HIGH //#define PS_ON_PIN PA3 // PW_CN /PW_OFF #endif -#define MT_DET_1_PIN PA4 // MT_DET -#define MT_DET_2_PIN PE6 // FALA_CRTL -#define MT_DET_PIN_INVERTING false +#if HAS_TFT_LVGL_UI + #define MT_DET_1_PIN PA4 // MT_DET + #define MT_DET_2_PIN PE6 + #define MT_DET_PIN_STATE LOW +#endif // // LED / NEOPixel @@ -271,11 +274,9 @@ #error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER." #endif -#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT - #define TFT_CS_PIN PD7 // NE4 - #define TFT_RS_PIN PD11 // A0 -#endif - +// +// TFT with FSMC interface +// #if HAS_FSMC_TFT /** * Note: MKS Robin TFT screens use various TFT controllers @@ -291,12 +292,17 @@ */ //#define TFT_RESET_PIN PC6 // FSMC_RST #define TFT_BACKLIGHT_PIN PD13 - #define FSMC_CS_PIN TFT_CS_PIN // NE4 - #define FSMC_RS_PIN TFT_RS_PIN // A0 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 + + #define FSMC_CS_PIN PD7 // NE4 + #define FSMC_RS_PIN PD11 // A0 + + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN + #ifdef TFT_CLASSIC_UI #define TFT_MARLINBG_COLOR 0x3186 // Grey #define TFT_MARLINUI_COLOR 0xC7B6 // Green @@ -304,9 +310,14 @@ #define TFT_BTOKMENU_COLOR 0x145F // Cyan #endif #define TFT_BUFFER_SIZE 14400 + #elif HAS_GRAPHICAL_TFT + #define TFT_RESET_PIN PC6 #define TFT_BACKLIGHT_PIN PD13 + #define TFT_CS_PIN PD7 // NE4 + #define TFT_RS_PIN PD11 // A0 + #endif #if NEED_TOUCH_PINS diff --git a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h index 2278d558702e..3f02d7082f80 100644 --- a/Marlin/src/pins/stm32f1/pins_FLY_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_FLY_MINI.h @@ -21,12 +21,10 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "FLY_MINI" -#define BOARD_WEBSITE_URL "github.com/FLYmaker" +#define BOARD_WEBSITE_URL "github.com/FLYmaker/FLY-MINI" #define DISABLE_JTAG // @@ -85,28 +83,25 @@ #if ENABLED(TMC_USE_SW_SPI) #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 + #define TMC_SW_MOSI EXP2_05_PIN #endif #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 + #define TMC_SW_MISO EXP2_10_PIN #endif #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 + #define TMC_SW_SCK EXP2_09_PIN #endif #endif #if HAS_TMC_UART - // - // Software serial - // #define X_SERIAL_TX_PIN PB0 - #define X_SERIAL_RX_PIN PB0 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PA7 - #define Y_SERIAL_RX_PIN PA7 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PA4 - #define Z_SERIAL_RX_PIN PA4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PC2 - #define E0_SERIAL_RX_PIN PC2 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // @@ -125,52 +120,69 @@ #define TEMP_BED_PIN PC0 // Analog Input #define TEMP_0_PIN PC1 // Analog Input -// -// LCD Pins -// +/** ------ ------ + * (BEEPER) PC14 |10 9 | PC13 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SD_SCK) + * (LCD_EN) PB9 | 8 7 | PB8 (LCD_RS) (BTN_EN1) PB3 | 8 7 | PB12 (SD_CS2) + * (LCD_D4) PB7 | 6 5 PB6 (LCD_D5) (BTN_EN2) PD2 | 6 5 PB15 (SD_MOSI) + * (LCD_D6) PB5 | 4 3 | PB4 (LCD_D7) (SD_DETECT) PB11 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PB4 +#define EXP1_04_PIN PB5 +#define EXP1_05_PIN PB6 +#define EXP1_06_PIN PB7 +#define EXP1_07_PIN PB8 +#define EXP1_08_PIN PB9 +#define EXP1_09_PIN PC13 +#define EXP1_10_PIN PC14 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB11 +#define EXP2_05_PIN PB15 +#define EXP2_06_PIN PD2 +#define EXP2_07_PIN PB12 +#define EXP2_08_PIN PB3 +#define EXP2_09_PIN PB13 +#define EXP2_10_PIN PB14 // // LCD / Controller // -#define SPI_DEVICE 2 -#define SD_SS_PIN PB12 -#define SD_SCK_PIN PB13 -#define SD_MISO_PIN PB14 -#define SD_MOSI_PIN PB15 - -#define SDSS SD_SS_PIN -#define SD_DETECT_PIN PB11 - -#define BEEPER_PIN PC14 - -#define LCD_PINS_RS PB8 -#define LCD_PINS_ENABLE PB9 -#define LCD_PINS_D4 PB7 -#define LCD_PINS_D5 PB6 -#define LCD_PINS_D6 PB5 -#define LCD_PINS_D7 PB4 - -#define BTN_EN1 PD2 -#define BTN_EN2 PB3 -#define BTN_ENC PC13 - -#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) - #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder -#endif +#if HAS_WIRED_LCD -// -// Filament runout -// + #define SPI_DEVICE 2 + #define SD_SS_PIN EXP2_07_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN -// -// ST7920 Delays -// -#ifndef ST7920_DELAY_1 - #define ST7920_DELAY_1 DELAY_NS(96) -#endif -#ifndef ST7920_DELAY_2 - #define ST7920_DELAY_2 DELAY_NS(48) -#endif -#ifndef ST7920_DELAY_3 - #define ST7920_DELAY_3 DELAY_NS(715) -#endif + #define SDSS SD_SS_PIN + #define SD_DETECT_PIN EXP2_04_PIN + + #define BEEPER_PIN EXP1_10_PIN + + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN + + #define BTN_EN1 EXP2_06_PIN + #define BTN_EN2 EXP2_08_PIN + #define BTN_ENC EXP1_09_PIN + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 + #endif + +#endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h index 3919723f3788..7ffe67c4f86b 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_AIO_II.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "FYSETC AIO II" #define BOARD_WEBSITE_URL "fysetc.com" diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h index c978092ab22c..0c2f2fc5db31 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define DEFAULT_MACHINE_NAME "3D Printer" @@ -132,29 +130,39 @@ #define RGB_LED_B_PIN PB6 #endif -/* -* EXP1 pinout for the LCD according to Fysetcs schematic for the Cheetah board -* _____ -* (Beeper) PC9 | 1 2 | PC12 (BTN_ENC) -* (BTN_EN2) PC11 | 3 4 | PB14 (LCD_RS / MISO) -* (BTN_EN1) PC10 5 6 | PB13 (SCK) -* (LCD_EN) PB12 | 7 8 | PB15 (MOSI) -* GND | 9 10| 5V -* ----- -* EXP1 -* Note: The pin-numbers match the connector correctly and are not in reverse order like on the Ender-3 board. -* Note: Functionally the pins are assigned in the same order as on the Ender-3 board. -* Note: Pin 4 on the Cheetah board is assigned to an I/O, it is assigned to RESET on the Ender-3 board. -*/ +/** + * EXP1 pinout for the LCD according to FYSETC's Cheetah board schematic + * ------ + * (BEEPER) PC9 |10 9 | PC12 (BTN_ENC) + * (BTN_EN2) PC11 | 8 7 | PB14 (LCD_RS / MISO) + * (BTN_EN1) PC10 6 5 | PB13 (SCK) + * (LCD_EN) PB12 | 4 3 | PB15 (MOSI) + * GND | 2 1 | 5V + * ------ + * EXP1 + * + * Notes: + * - The pin-numbers match the connector correctly and are not in reverse order like on the Ender-3 board. + * - Functionally the pins are assigned in the same order as on the Ender-3 board. + * - Pin 4 on the Cheetah board is assigned to an I/O, it is assigned to RESET on the Ender-3 board. + */ +#define EXP1_03_PIN PB15 +#define EXP1_04_PIN PB12 +#define EXP1_05_PIN PB13 +#define EXP1_06_PIN PC10 +#define EXP1_07_PIN PB14 +#define EXP1_08_PIN PC11 +#define EXP1_09_PIN PC12 +#define EXP1_10_PIN PC9 #if HAS_WIRED_LCD - #define BEEPER_PIN PC9 + #define BEEPER_PIN EXP1_10_PIN #if HAS_MARLINUI_U8GLIB - #define DOGLCD_A0 PB14 - #define DOGLCD_CS PB12 - #define DOGLCD_SCK PB13 - #define DOGLCD_MOSI PB15 + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_SCK EXP1_05_PIN + #define DOGLCD_MOSI EXP1_03_PIN //#define LCD_SCREEN_ROT_90 //#define LCD_SCREEN_ROT_180 //#define LCD_SCREEN_ROT_270 @@ -164,30 +172,30 @@ #endif #endif - #define LCD_PINS_RS PB12 // CS -- SOFT SPI for ENDER3 LCD - #define LCD_PINS_D4 PB13 // SCLK - #define LCD_PINS_ENABLE PB15 // DATA MOSI + #define LCD_PINS_RS EXP1_04_PIN // CS -- SOFT SPI for ENDER3 LCD + #define LCD_PINS_D4 EXP1_05_PIN // SCLK + #define LCD_PINS_ENABLE EXP1_03_PIN // DATA MOSI //#define LCD_CONTRAST_INIT 190 #if IS_NEWPANEL - #define BTN_EN1 PC10 - #define BTN_EN2 PC11 - #define BTN_ENC PC12 + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_08_PIN + #define BTN_ENC EXP1_09_PIN #endif #endif #if ENABLED(TOUCH_UI_FTDI_EVE) - #define BEEPER_PIN PC9 - #define CLCD_MOD_RESET PC11 - #define CLCD_SPI_CS PB12 + #define BEEPER_PIN EXP1_10_PIN + #define CLCD_MOD_RESET EXP1_08_PIN + #define CLCD_SPI_CS EXP1_04_PIN //#define CLCD_USE_SOFT_SPI // the Cheetah can use hardware-SPI so we do not really need this #if ENABLED(CLCD_USE_SOFT_SPI) - #define CLCD_SOFT_SPI_MOSI PB15 - #define CLCD_SOFT_SPI_MISO PB14 - #define CLCD_SOFT_SPI_SCLK PB13 + #define CLCD_SOFT_SPI_MOSI EXP1_03_PIN + #define CLCD_SOFT_SPI_MISO EXP1_07_PIN + #define CLCD_SOFT_SPI_SCLK EXP1_05_PIN #else #define CLCD_SPI_BUS 2 #endif diff --git a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h index 65b16755ca30..120d6d6f0a7b 100644 --- a/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h +++ b/Marlin/src/pins/stm32f1/pins_FYSETC_CHEETAH_V12.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #include "pins_FYSETC_CHEETAH.h" @@ -44,9 +42,6 @@ * TMC2208/TMC2209 stepper drivers */ - // - // Software serial - // #define X_SERIAL_TX_PIN PA11 #define X_SERIAL_RX_PIN PA12 diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h index 5b97e7f202de..b3da8d884e1f 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI.h @@ -22,13 +22,10 @@ #pragma once /** - * 24 May 2018 - @chepo for STM32F103VET6 - * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf + * Geeetech GTM32 Mini board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "GTM32 Pro VB" #define DEFAULT_MACHINE_NAME "STM32F103VET6" @@ -160,16 +157,11 @@ //#define LCD_UART_RX PD9 #endif - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h index 173eb67f0d09..3650ffde5c84 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_MINI_A30.h @@ -22,13 +22,10 @@ #pragma once /** - * 24 May 2018 - @chepo for STM32F103VET6 - * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf + * Geeetech GTM32 Mini A30 board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "GTM32 Pro VB" #define DEFAULT_MACHINE_NAME "STM32F103VET6" @@ -168,16 +165,11 @@ //#define LCD_UART_RX PD9 #endif - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h index 5b97e7f202de..56dda2b143cc 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VB.h @@ -22,15 +22,17 @@ #pragma once /** - * 24 May 2018 - @chepo for STM32F103VET6 - * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf + * Geeetech GTM32 Pro VB board pin assignments + * http://www.geeetech.com/wiki/index.php/File:Hardware_GTM32_PRO_VB.pdf + * + * Also applies to GTM32 Pro VD */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" -#define BOARD_INFO_NAME "GTM32 Pro VB" +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "GTM32 Pro VB" +#endif #define DEFAULT_MACHINE_NAME "STM32F103VET6" #define BOARD_NO_NATIVE_USB @@ -160,16 +162,11 @@ //#define LCD_UART_RX PD9 #endif - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VD.h b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VD.h new file mode 100644 index 000000000000..fb8c73c45f24 --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_GTM32_PRO_VD.h @@ -0,0 +1,30 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * Geeetech GTM32 Pro VD board pin assignments + */ + +#define BOARD_INFO_NAME "GTM32 Pro VD" + +#include "pins_GTM32_PRO_VB.h" diff --git a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h index b4a34a4b1e4b..c9a20fd66ea7 100644 --- a/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h +++ b/Marlin/src/pins/stm32f1/pins_GTM32_REV_B.h @@ -22,15 +22,12 @@ #pragma once /** - * 24 May 2018 - @chepo for STM32F103VET6 - * Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf + * Geeetech GTM32 Rev. B board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" -#define BOARD_INFO_NAME "GTM32 Pro VB" +#define BOARD_INFO_NAME "GTM32 Rev B" #define DEFAULT_MACHINE_NAME "M201" #define BOARD_NO_NATIVE_USB @@ -170,16 +167,11 @@ //#define LCD_UART_RX PD9 #endif - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h index 4f02b0e23cde..98465a86073e 100644 --- a/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h +++ b/Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h @@ -26,11 +26,13 @@ * ║║ ╦╠═╣│ │├┬┘│ │├┬┘├─┤╠╣ │ │├┬┘│ ││││ │ │ ││││ * ╚╝╚═╝╩ ╩└─┘┴└─└─┘┴└─┴ ┴╚ └─┘┴└─└─┘┴ ┴o└─┘└─┘┴ ┴ * Pin assignments for 32-bit JGAurora A5S & A1 + * + * https://jgaurorawiki.com/_media/jgaurora_a5s_a1_pinout.png */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "JGAurora A5S A1 only supports one hotend / E-stepper. Comment out this line to continue." #endif @@ -43,14 +45,19 @@ #endif //#define MCU_STM32F103ZE // not yet required -// Enable EEPROM Emulation for this board, so that we don't overwrite factory data -//#define I2C_EEPROM // AT24C64 -//#define MARLIN_EEPROM_SIZE 0x8000UL // 64KB +// Enable EEPROM Emulation for this board, so that we don't overwrite factory data +#if NO_EEPROM_SELECTED + //#define I2C_EEPROM // AT24C64 + //#define FLASH_EEPROM_EMULATION +#endif -//#define FLASH_EEPROM_EMULATION -//#define MARLIN_EEPROM_SIZE 0x1000UL // 4KB -//#define MARLIN_EEPROM_SIZE (EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE) * 2UL) +#if ENABLED(I2C_EEPROM) + //#define MARLIN_EEPROM_SIZE 0x8000UL // 32KB +#elif ENABLED(FLASH_EEPROM_EMULATION) + //#define MARLIN_EEPROM_SIZE 0x1000UL // 4KB + //#define MARLIN_EEPROM_SIZE (EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE) * 2UL) +#endif // // Limit Switches @@ -102,15 +109,20 @@ #define FIL_RUNOUT_PIN PC7 // -// LCD +// TFT with FSMC interface // -#define LCD_BACKLIGHT_PIN PF11 -#define FSMC_CS_PIN PD7 -#define FSMC_RS_PIN PG0 +#if HAS_FSMC_TFT + #define LCD_BACKLIGHT_PIN PF11 + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PG0 + + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_DMA_DEV DMA2 + #define FSMC_DMA_CHANNEL DMA_CH5 -#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT -#define FSMC_DMA_DEV DMA2 -#define FSMC_DMA_CHANNEL DMA_CH5 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN +#endif // // SD Card @@ -129,4 +141,7 @@ #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PA4 #define TOUCH_INT_PIN PC4 + #define TOUCH_MISO_PIN PA6 + #define TOUCH_MOSI_PIN PA7 + #define TOUCH_SCK_PIN PA5 #endif diff --git a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h index 33f995dcaef0..34fbdaf02fbd 100644 --- a/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h +++ b/Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -29,7 +32,6 @@ #endif #define BOARD_INFO_NAME "Longer3D" -#define ALFAWISE_UX0 // Common to all Longer3D STM32F1 boards (used for Open drain mosfets) #define BOARD_NO_NATIVE_USB @@ -92,10 +94,20 @@ #define FAN_MAX_PWM 255 //#define BEEPER_PIN PD13 // pin 60 (Servo PWM output 5V/GND on Board V0G+) made for BL-Touch sensor - // Can drive a PC Buzzer, if connected between PWM and 5V pins + // Can drive a PC Buzzer, if connected between PWM and 5V pins #define LED_PIN PC2 // pin 17 +// Longer3D board mosfets are passing by default +// Avoid nozzle heat and fan start before serial init +#define BOARD_OPENDRAIN_MOSFETS + +#define BOARD_PREINIT() { \ + OUT_WRITE_OD(HEATER_0_PIN, 0); \ + OUT_WRITE_OD(HEATER_BED_PIN, 0); \ + OUT_WRITE_OD(FAN_PIN, 0); \ +} + // // PWM for a servo probe // Other servo devices are not supported on this board! @@ -108,20 +120,38 @@ //#undef Z_MAX_PIN // Uncomment if using ZMAX connector (PE5) #endif -#define TFT_RESET_PIN PC4 // pin 33 -#define TFT_BACKLIGHT_PIN PD12 // pin 59 -#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1 -#define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed +// +// TFT with FSMC interface +// +#if HAS_FSMC_TFT + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1 + #define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed + #define FSMC_DMA_DEV DMA2 + #define FSMC_DMA_CHANNEL DMA_CH5 + + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN -#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT -#define FSMC_DMA_DEV DMA2 -#define FSMC_DMA_CHANNEL DMA_CH5 + #define TFT_RESET_PIN PC4 // pin 33 + #define TFT_BACKLIGHT_PIN PD12 // pin 59 + #define TFT_BACKLIGHT_PWM 150 // Brightness with alt. TIM4 chan 1 (1-255) -#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h -#define DOGLCD_SCK -1 + #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h + #define DOGLCD_SCK -1 -// Buffer for Color UI -#define TFT_BUFFER_SIZE 3200 + // Buffer for Color UI + #define TFT_BUFFER_SIZE 3200 +#endif + +#if defined(TFT_BACKLIGHT_PWM) && !defined(MAPLE_STM32F1) + #define HAS_LCD_BRIGHTNESS 1 + #define DEFAULT_LCD_BRIGHTNESS TFT_BACKLIGHT_PWM +#endif + +#if ENABLED(SDIO_SUPPORT) + #define SD_SS_PIN -1 // else SDSS set to PA4 in M43 (spi_pins.h) +#endif /** * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer @@ -131,7 +161,7 @@ #if NEED_TOUCH_PINS #define TOUCH_CS_PIN PB12 // pin 51 SPI2_NSS #define TOUCH_SCK_PIN PB13 // pin 52 - #define TOUCH_MOSI_PIN PB14 // pin 53 + #define TOUCH_MOSI_PIN PB14 // pin 53 (Inverted MOSI/MISO = No HW SPI2) #define TOUCH_MISO_PIN PB15 // pin 54 #define TOUCH_INT_PIN PC6 // pin 63 (PenIRQ coming from ADS7843) #endif @@ -142,18 +172,25 @@ // #if NO_EEPROM_SELECTED //#define SPI_EEPROM + //#define HAS_SPI_FLASH 1 // need MARLIN_DEV_MODE for M993/M994 eeprom backup tests #define FLASH_EEPROM_EMULATION #endif #if ENABLED(SPI_EEPROM) // SPI1 EEPROM Winbond W25Q64 (8MB/64Mbits) #define SPI_CHAN_EEPROM1 1 - #define SPI_EEPROM1_CS PC5 // pin 34 - #define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30 - #define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31 - #define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32 + #define SPI_EEPROM1_CS_PIN PC5 // pin 34 + #define EEPROM_SCK_PIN BOARD_SPI1_SCK_PIN // PA5 pin 30 + #define EEPROM_MISO_PIN BOARD_SPI1_MISO_PIN // PA6 pin 31 + #define EEPROM_MOSI_PIN BOARD_SPI1_MOSI_PIN // PA7 pin 32 #define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet) #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now... +#elif HAS_SPI_FLASH + #define SPI_FLASH_SIZE 0x40000U // limit to 256KB (M993 will reboot with 512) + #define SPI_FLASH_CS_PIN PC5 + #define SPI_FLASH_MOSI_PIN PA7 + #define SPI_FLASH_MISO_PIN PA6 + #define SPI_FLASH_SCK_PIN PA5 #elif ENABLED(FLASH_EEPROM_EMULATION) // SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h) #define EEPROM_PAGE_SIZE (0x800U) // 2KB diff --git a/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h b/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h index e33e029deb96..32d1937653d7 100644 --- a/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h +++ b/Marlin/src/pins/stm32f1/pins_MALYAN_M200.h @@ -41,7 +41,7 @@ #define FLASH_EEPROM_EMULATION #endif -#define SDSS SD_SS_PIN +#define SDSS SD_SS_PIN // Also in HAL/STM32F1/spi_pins.h // Based on PWM timer usage, we have to use these timers and soft PWM for the fans // On STM32F103: @@ -53,9 +53,9 @@ // // Limit Switches // -#define X_MIN_PIN PB4 -#define Y_MIN_PIN PA15 -#define Z_MIN_PIN PB5 +#define X_STOP_PIN PB4 +#define Y_STOP_PIN PA15 +#define Z_STOP_PIN PB5 // // Steppers diff --git a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h index 429cf14ac5b8..3fed0adac336 100644 --- a/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h @@ -22,7 +22,7 @@ #pragma once /** - * MKS Robin mini (STM32F130VET6) board pin assignments + * MKS Robin mini (STM32F103VET6) board pin assignments */ #if NOT_TARGET(STM32F1, STM32F1xx) @@ -100,10 +100,10 @@ //#define TEMP_0_PIN PB3 // E0 K+ #define TEMP_BED_PIN PF7 // THERM_BED -#define MAX6675_SS_PIN PB5 -#define MAX6675_SCK_PIN PB3 -#define MAX6675_DO_PIN PB4 -#define MAX6675_MOSI_PIN PA14 +#define TEMP_0_CS_PIN PB5 +#define TEMP_0_SCK_PIN PB3 +#define TEMP_0_MISO_PIN PB4 +#define TEMP_0_MOSI_PIN PA14 // // Heaters / Fans @@ -133,11 +133,9 @@ // #define BEEPER_PIN PE4 -/** - * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. - */ +// +// TFT with FSMC interface +// #if HAS_FSMC_TFT /** * Note: MKS Robin TFT screens use various TFT controllers @@ -151,18 +149,17 @@ * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ - #define TFT_CS_PIN PD7 // NE4 - #define TFT_RS_PIN PG0 // A0 - - #define FSMC_CS_PIN TFT_CS_PIN - #define FSMC_RS_PIN TFT_RS_PIN + #define TFT_RESET_PIN PF15 + #define TFT_BACKLIGHT_PIN PF11 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PD7 // NE4 + #define FSMC_RS_PIN PG0 // A0 #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 - #define TFT_RESET_PIN PF15 - #define TFT_BACKLIGHT_PIN PF11 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h index 99e0f0be2abd..29baeba934f1 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h @@ -22,7 +22,7 @@ #pragma once /** - * MKS Robin (STM32F130ZET6) board pin assignments + * MKS Robin (STM32F103ZET6) board pin assignments * https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware */ @@ -121,8 +121,8 @@ // // Thermocouples // -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PE6 // TC2 - CS2 +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PE6 // TC2 - CS2 // // Filament runout sensor @@ -155,7 +155,7 @@ #define WIFI_IO0_PIN PG1 // -// LCD screen +// TFT with FSMC interface // #if HAS_FSMC_TFT /** @@ -170,18 +170,17 @@ * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu * because Marlin uses the reset as a failsafe to revive a glitchy LCD. */ - #define TFT_CS_PIN PG12 // NE4 - #define TFT_RS_PIN PF0 // A0 - - #define FSMC_CS_PIN TFT_CS_PIN - #define FSMC_RS_PIN TFT_RS_PIN + #define TFT_RESET_PIN PF6 + #define TFT_BACKLIGHT_PIN PG11 #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PG12 // NE4 + #define FSMC_RS_PIN PF0 // A0 #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 - #define TFT_RESET_PIN PF6 - #define TFT_BACKLIGHT_PIN PG11 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 @@ -237,7 +236,7 @@ * This board does not have dedicated TMC UART pins. Custom wiring is needed. * You may uncomment one of the options below, or add it to your Configuration.h. * - * When using up to four TMC2209 drivers, hardware serial is recommented on + * When using up to four TMC2209 drivers, hardware serial is recommended on * MSerial0 or MSerial1. * * When using TMC2208 or more than four drivers, SoftwareSerial will be needed, @@ -246,25 +245,25 @@ //#define TMC_HARDWARE_SERIAL #if ENABLED(TMC_HARDWARE_SERIAL) - #define X_HARDWARE_SERIAL MSerial0 - #define X2_HARDWARE_SERIAL MSerial0 - #define Y_HARDWARE_SERIAL MSerial0 - #define Y2_HARDWARE_SERIAL MSerial0 - #define Z_HARDWARE_SERIAL MSerial0 - #define Z2_HARDWARE_SERIAL MSerial0 - #define E0_HARDWARE_SERIAL MSerial0 - #define E1_HARDWARE_SERIAL MSerial0 + #define X_HARDWARE_SERIAL MSerial0 + #define X2_HARDWARE_SERIAL MSerial0 + #define Y_HARDWARE_SERIAL MSerial0 + #define Y2_HARDWARE_SERIAL MSerial0 + #define Z_HARDWARE_SERIAL MSerial0 + #define Z2_HARDWARE_SERIAL MSerial0 + #define E0_HARDWARE_SERIAL MSerial0 + #define E1_HARDWARE_SERIAL MSerial0 #endif //#define TMC_SOFTWARE_SERIAL #if ENABLED(TMC_SOFTWARE_SERIAL) #define X_SERIAL_TX_PIN PF8 // SERVO3_PIN -- XS2 - 6 - #define Y_SERIAL_TX_PIN PF9 // SERVO2_PIN -- XS2 - 5 - #define Z_SERIAL_TX_PIN PA1 // SERVO1_PIN -- XS1 - 6 - #define E0_SERIAL_TX_PIN PC3 // SERVO0_PIN -- XS1 - 5 #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN PF9 // SERVO2_PIN -- XS2 - 5 #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN PA1 // SERVO1_PIN -- XS1 - 6 #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN PC3 // SERVO0_PIN -- XS1 - 5 #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define TMC_BAUD_RATE 19200 #endif @@ -276,8 +275,8 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x800000 // 8MB - #define W25QXX_CS_PIN PG9 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PG9 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h index 0d927cf7cb6a..718f9dc27a1a 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3D_V1_1.h @@ -64,4 +64,4 @@ #endif #endif -#include "pins_MKS_ROBIN_E3_V1_1_common.h" +#include "pins_MKS_ROBIN_E3_V1_1_common.h" // ... MKS_ROBIN_E3_common diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h index 3118a521bbeb..c5080b5227cd 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h @@ -22,12 +22,12 @@ #pragma once /** - * MKS Robin nano (STM32F130VET6) board pin assignments + * MKS Robin nano (STM32F103VET6) board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "MKS Robin E3P only supports one hotend / E-stepper. Comment out this line to continue." #elif HAS_FSMC_TFT #error "MKS Robin E3P doesn't support FSMC-based TFT displays." @@ -36,6 +36,10 @@ #define BOARD_INFO_NAME "MKS Robin E3P" #define BOARD_NO_NATIVE_USB +#define MKS_HARDWARE_TEST_ONLY_E0 + +// Avoid conflict with TIMER_SERVO when using the STM32 HAL +#define TEMP_TIMER 5 // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role @@ -141,10 +145,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN PD5 #define X_SERIAL_RX_PIN PD5 @@ -179,20 +179,19 @@ // Misc. Functions // #if HAS_TFT_LVGL_UI - //#define MKSPWC - #ifdef MKSPWC - #define SUICIDE_PIN PB2 // Enable MKSPWC SUICIDE PIN - #define SUICIDE_PIN_INVERTING false // Enable MKSPWC PIN STATE - #define KILL_PIN PA2 // Enable MKSPWC DET PIN - #define KILL_PIN_STATE true // Enable MKSPWC PIN STATE + #if ENABLED(MKS_PWC) + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_STATE LOW + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH #endif - #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN - #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE + #define MT_DET_1_PIN PA4 + #define MT_DET_PIN_STATE LOW - #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN - #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN - #define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN + #define WIFI_IO0_PIN PC13 + #define WIFI_IO1_PIN PC7 + #define WIFI_RESET_PIN PE9 #if ENABLED(MKS_TEST) #define MKS_TEST_POWER_LOSS_PIN PA2 // PW_DET @@ -213,17 +212,23 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define SDIO_SUPPORT -#define SDIO_CLOCK 4500000 // 4.5 MHz -#define SD_DETECT_PIN PD12 -#define ONBOARD_SD_CS_PIN PC11 +#if SD_CONNECTION_IS(ONBOARD) + #define SDIO_SUPPORT + #define SDIO_CLOCK 4500000 // 4.5 MHz + #define SD_DETECT_PIN PD12 + #define ONBOARD_SD_CS_PIN PC11 +#elif SD_CONNECTION_IS(LCD) + #define ENABLE_SPI1 + #define SDSS PE10 + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 + #define SD_DETECT_PIN PE12 +#endif // // LCD / Controller // -#ifndef BEEPER_PIN - #define BEEPER_PIN PC5 -#endif /** * Note: MKS Robin TFT screens use various TFT controllers. @@ -260,33 +265,29 @@ #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 - #ifndef TFT_WIDTH - #define TFT_WIDTH 480 - #endif - #ifndef TFT_HEIGHT - #define TFT_HEIGHT 320 - #endif - - #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI #endif -#if HAS_SPI_GRAPHICAL_TFT +#if ENABLED(TFT_CLASSIC_UI) // Emulated DOGM SPI #define LCD_PINS_ENABLE PD13 #define LCD_PINS_RS PC6 #define BTN_ENC PE13 #define BTN_EN1 PE8 #define BTN_EN2 PE11 -#elif ENABLED(TFT_480x320_SPI) - #define TFT_DRIVER ST7796 +#elif ENABLED(TFT_COLOR_UI) #define TFT_BUFFER_SIZE 14400 #endif #if HAS_WIRED_LCD && !HAS_SPI_TFT - - // NON TFT Displays + #define BEEPER_PIN PC5 + #define BTN_ENC PE13 + #define LCD_PINS_ENABLE PD13 + #define LCD_PINS_RS PC6 + #define BTN_EN1 PE8 + #define BTN_EN2 PE11 + #define LCD_BACKLIGHT_PIN -1 #if ENABLED(MKS_MINI_12864) @@ -300,9 +301,32 @@ #define DOGLCD_SCK PA5 #define DOGLCD_MOSI PA7 - // Required for MKS_MINI_12864 with this board - #define MKS_LCD12864B - #undef SHOW_BOOTSCREEN + #elif IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define PIN_SPI_SCK PA5 + #define PIN_TFT_MISO PA6 + #define PIN_TFT_MOSI PA7 + #define TFTGLCD_CS PE8 + #endif + + #ifndef BEEPER_PIN + #define BEEPER_PIN -1 + #endif + + #elif ENABLED(MKS_MINI_12864_V3) + #define DOGLCD_CS PD13 + #define DOGLCD_A0 PC6 + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN PE14 + #define NEOPIXEL_PIN PE15 + #define DOGLCD_MOSI PA7 + #define DOGLCD_SCK PA5 + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif + //#define LCD_SCREEN_ROT_180 #else // !MKS_MINI_12864 @@ -318,15 +342,9 @@ #endif - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif // !MKS_MINI_12864 @@ -335,10 +353,14 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 +#endif + +#ifndef BEEPER_PIN + #define BEEPER_PIN PC5 #endif #if ENABLED(SPEAKER) && BEEPER_PIN == PC5 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h index 002c35fe54c1..30720e0c7f0e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_V1_1.h @@ -33,4 +33,4 @@ #define BOARD_INFO_NAME "MKS Robin E3 V1.1" #endif -#include "pins_MKS_ROBIN_E3_V1_1_common.h" +#include "pins_MKS_ROBIN_E3_V1_1_common.h" // ... MKS_ROBIN_E3_common diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h index c4a7e9f40861..489da083939e 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h @@ -25,9 +25,7 @@ * MKS Robin E3 & E3D (STM32F103RCT6) common board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_NO_NATIVE_USB @@ -94,9 +92,6 @@ //#define Z_HARDWARE_SERIAL MSerial1 //#define E0_HARDWARE_SERIAL MSerial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PC7 #define X_SERIAL_RX_PIN PC7 @@ -128,42 +123,92 @@ #define FIL_RUNOUT_PIN PB10 // MT_DET +// +// Power Supply Control +// +#if ENABLED(MKS_PWC) + #define PS_ON_PIN PA14 // PW_OFF + #define KILL_PIN PB10 // PW_DET + #define KILL_PIN_STATE HIGH +#endif + /** - * _____ _____ _____ - * (BEEPER) PC1 | 1 2 | PC3 (BTN_ENC) (MISO) PB14 | 1 2 | PB13 (SD_SCK) 5V | 1 2 | GND - * (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS) (BTN_EN1) PB11 | 3 4 | PA15 (SD_SS) (LCD_EN) PA4 | 3 4 | PA5 (LCD_RS) - * (LCD_D4) PA6 | 5 6 PA7 (LCD_D5) (BTN_EN2) PB0 | 5 6 PB15 (SD_MOSI) (LCD_D4) PA6 | 5 6 PB0 (BTN_EN2) - * (LCD_D6) PC4 | 7 8 | PC5 (LCD_D7) (SD_DETECT) PC10 | 7 8 | RESET RESET | 7 8 | PB11 (BTN_EN1) - * GND | 9 10| 5V GND | 9 10| NC (BTN_ENC) PC3 | 9 10| PC1 (BEEPER) - * ----- ----- ----- - * EXP1 EXP2 EXP3 + * ------ ------ ------ + * (BEEPER) PC1 |10 9 | PC3 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SD_SCK) (BEEPER) PC1 |10 9 | PC3 (BTN_ENC) + * (LCD_EN) PA4 | 8 7 | PA5 (LCD_RS) (BTN_EN1) PB11 | 8 7 | PA15 (SD_SS) (BTN_EN1) PB11 | 8 7 | RESET + * (LCD_D4) PA6 6 5 | PA7 (LCD_D5) (BTN_EN2) PB0 6 5 | PB15 (SD_MOSI) (BTN_EN2) PB0 6 5 | PA6 (LCD_D4) + * (LCD_D6) PC4 | 4 3 | PC5 (LCD_D7) (SD_DETECT) PC10 | 4 3 | RESET (LCD_RS) PA5 | 4 3 | PA4 (LCD_EN) + * GND | 2 1 | 5V GND | 2 1 | NC GND | 2 1 | 5V + * ------ ------ ------ + * EXP1 EXP2 "Ender-3 EXP1" */ +#define EXP1_03_PIN PC5 +#define EXP1_04_PIN PC4 +#define EXP1_05_PIN PA7 +#define EXP1_06_PIN PA6 +#define EXP1_07_PIN PA5 +#define EXP1_08_PIN PA4 +#define EXP1_09_PIN PC3 +#define EXP1_10_PIN PC1 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PC10 +#define EXP2_05_PIN PB15 +#define EXP2_06_PIN PB0 +#define EXP2_07_PIN PA15 +#define EXP2_08_PIN PB11 +#define EXP2_09_PIN PB13 +#define EXP2_10_PIN PB14 + +// "Ender-3 EXP1" +#define E3_EXP1_03_PIN PA4 +#define E3_EXP1_04_PIN PA5 +#define E3_EXP1_05_PIN PA6 +#define E3_EXP1_06_PIN PB0 +#define E3_EXP1_07_PIN -1 // RESET +#define E3_EXP1_08_PIN PB11 +#define E3_EXP1_09_PIN PC3 +#define E3_EXP1_10_PIN PC1 + #if HAS_WIRED_LCD - #define BEEPER_PIN PC1 - #define BTN_ENC PC3 - #define LCD_PINS_ENABLE PA4 - #define LCD_PINS_RS PA5 - #define BTN_EN1 PB11 - #define BTN_EN2 PB0 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) #if ENABLED(MKS_MINI_12864) #define LCD_BACKLIGHT_PIN -1 #define LCD_RESET_PIN -1 - #define DOGLCD_A0 PC4 - #define DOGLCD_CS PA7 - #define DOGLCD_SCK PB13 - #define DOGLCD_MOSI PB15 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define DOGLCD_MOSI EXP2_05_PIN + + #elif ENABLED(MKS_MINI_12864_V3) + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_06_PIN + #define NEOPIXEL_PIN EXP1_05_PIN + #define DOGLCD_MOSI EXP2_05_PIN + #define DOGLCD_SCK EXP2_09_PIN + #define FORCE_SOFT_SPI + #define SOFTWARE_SPI + //#define LCD_SCREEN_ROT_180 #else - #define LCD_PINS_D4 PA6 + #define LCD_PINS_D4 EXP1_06_PIN #if IS_ULTIPANEL - #define LCD_PINS_D5 PA7 - #define LCD_PINS_D6 PC4 - #define LCD_PINS_D7 PC5 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if !defined(BTN_ENC_EN) && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -175,22 +220,33 @@ #endif // HAS_WIRED_LCD +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 125 + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 125 + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 125 + #endif +#endif + // // SD Card // +#define SDCARD_CONNECTION ONBOARD #define SPI_DEVICE 2 -#define SD_DETECT_PIN PC10 -#define SD_SCK_PIN PB13 -#define SD_MISO_PIN PB14 -#define SD_MOSI_PIN PB15 -#define SD_SS_PIN PA15 - -#ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) -#endif -#ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) -#endif -#ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) -#endif +#define ONBOARD_SPI_DEVICE 2 +#define SDSS SD_SS_PIN +#define ONBOARD_SD_CS_PIN SD_SS_PIN +#define SD_DETECT_PIN PC10 // EXP2_04_PIN +#define NO_SD_HOST_DRIVE + +// TODO: This is the only way to set SPI for SD on STM32 (for now) +#define ENABLE_SPI2 +#define SD_SCK_PIN EXP2_09_PIN +#define SD_MISO_PIN EXP2_10_PIN +#define SD_MOSI_PIN EXP2_05_PIN +#define SD_SS_PIN EXP2_07_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h index 13c2d41d577b..6388e1723c05 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE.h @@ -21,9 +21,9 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "MKS Robin Lite only supports one hotend / E-stepper. Comment out this line to continue." #endif @@ -112,16 +112,11 @@ #endif // !MKS_MINI_12864 - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) - #endif + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #endif // HAS_WIRED_LCD @@ -143,6 +138,6 @@ // #define SPI_DEVICE 2 #define SD_SCK_PIN PB13 -#define SD_MISO_PIN P1B4 -#define SD_MOSI_PIN P1B5 +#define SD_MISO_PIN PB14 +#define SD_MOSI_PIN PB15 #define SD_SS_PIN PA15 diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h index f814052fa800..416a061412e1 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_LITE3.h @@ -25,9 +25,9 @@ * MKS Robin Lite 3 (STM32F103RCT6) board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin Lite3 supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif @@ -138,9 +138,9 @@ #endif // !MKS_MINI_12864 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h index b3cfe5b6baa7..ae45d8b6d150 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_MINI.h @@ -22,12 +22,12 @@ #pragma once /** - * MKS Robin mini (STM32F130VET6) board pin assignments + * MKS Robin mini (STM32F103VET6) board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "MKS Robin mini only supports one hotend / E-stepper. Comment out this line to continue." #endif @@ -119,8 +119,10 @@ #define POWER_LOSS_PIN PA2 // PW_DET #define PS_ON_PIN PA3 // PW_OFF -#define MT_DET_1_PIN PA4 -#define MT_DET_PIN_INVERTING false +#if HAS_TFT_LVGL_UI + #define MT_DET_1_PIN PA4 // MT_DET + #define MT_DET_PIN_STATE LOW +#endif #define WIFI_IO0_PIN PC13 @@ -194,8 +196,8 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN PB12 // Flash chip-select - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 // Flash chip-select + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h index ea3a7a1eea8e..c729274c54cf 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h @@ -22,194 +22,26 @@ #pragma once /** - * MKS Robin nano (STM32F130VET6) board pin assignments + * MKS Robin nano (STM32F103VET6) board pin assignments * https://github.com/makerbase-mks/MKS-Robin-Nano-V1.X/tree/master/hardware */ -#if NOT_TARGET(STM32F1, STM32F1xx) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 - #error "MKS Robin nano supports up to 2 hotends / E-steppers. Comment out this line to continue." -#endif +#define ALLOW_STM32DUINO +#include "env_validate.h" #define BOARD_INFO_NAME "MKS Robin Nano" -#define BOARD_NO_NATIVE_USB - -// Avoid conflict with TIMER_SERVO when using the STM32 HAL -#define TEMP_TIMER 5 - // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role // #define DISABLE_JTAG -// -// EEPROM -// -#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) - #define FLASH_EEPROM_EMULATION - #define EEPROM_PAGE_SIZE (0x800U) // 2KB - #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) - #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB -#endif - -#define SPI_DEVICE 2 - -// -// Servos -// -#define SERVO0_PIN PA8 // Enable BLTOUCH - -// -// Limit Switches -// -#define X_STOP_PIN PA15 -#define Y_STOP_PIN PA12 -#define Z_MIN_PIN PA11 -#define Z_MAX_PIN PC4 - -// -// Steppers -// -#define X_ENABLE_PIN PE4 -#define X_STEP_PIN PE3 -#define X_DIR_PIN PE2 - -#define Y_ENABLE_PIN PE1 -#define Y_STEP_PIN PE0 -#define Y_DIR_PIN PB9 - -#define Z_ENABLE_PIN PB8 -#define Z_STEP_PIN PB5 -#define Z_DIR_PIN PB4 - -#define E0_ENABLE_PIN PB3 -#define E0_STEP_PIN PD6 -#define E0_DIR_PIN PD3 - -#define E1_ENABLE_PIN PA3 -#define E1_STEP_PIN PA6 -#define E1_DIR_PIN PA1 - -// -// Temperature Sensors -// -#define TEMP_0_PIN PC1 // TH1 -#define TEMP_1_PIN PC2 // TH2 -#define TEMP_BED_PIN PC0 // TB1 - -// -// Heaters / Fans -// -#ifndef HEATER_0_PIN - #define HEATER_0_PIN PC3 -#endif -#if HOTENDS == 1 - #ifndef FAN1_PIN - #define FAN1_PIN PB0 - #endif -#else - #ifndef HEATER_1_PIN - #define HEATER_1_PIN PB0 - #endif -#endif -#ifndef FAN_PIN - #define FAN_PIN PB1 // FAN -#endif -#ifndef HEATER_BED_PIN - #define HEATER_BED_PIN PA0 -#endif - // // Thermocouples // -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PE6 // TC2 - CS2 - -// -// Misc. Functions -// -#if HAS_TFT_LVGL_UI - //#define MKSPWC - #ifdef MKSPWC - #define SUICIDE_PIN PB2 // Enable MKSPWC SUICIDE PIN - #define SUICIDE_PIN_INVERTING false // Enable MKSPWC PIN STATE - #define KILL_PIN PA2 // Enable MKSPWC DET PIN - #define KILL_PIN_STATE true // Enable MKSPWC PIN STATE - #endif - - #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN - #define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN - #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE - - #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN - #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN - #define WIFI_RESET_PIN PA5 // MKS ESP WIFI RESET PIN -#else - //#define POWER_LOSS_PIN PA2 // PW_DET - //#define PS_ON_PIN PB2 // PW_OFF - #define FIL_RUNOUT_PIN PA4 - #define FIL_RUNOUT2_PIN PE6 -#endif +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PE6 // TC2 - CS2 //#define LED_PIN PB2 -// -// SD Card -// -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION ONBOARD -#endif - -#define SDIO_SUPPORT -#define SDIO_CLOCK 4500000 // 4.5 MHz -#define SD_DETECT_PIN PD12 -#define ONBOARD_SD_CS_PIN PC11 - -// -// LCD / Controller -// -#define BEEPER_PIN PC5 - -/** - * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'TFT_RESET_PIN' - * to let the bootloader init the screen. - */ -// Shared FSMC Configs -#if HAS_FSMC_TFT - #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h - #define DOGLCD_SCK -1 - - #define TOUCH_CS_PIN PA7 // SPI2_NSS - #define TOUCH_SCK_PIN PB13 // SPI2_SCK - #define TOUCH_MISO_PIN PB14 // SPI2_MISO - #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI - - #define TFT_RESET_PIN PC6 // FSMC_RST - #define TFT_BACKLIGHT_PIN PD13 - - #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT - #define FSMC_CS_PIN PD7 - #define FSMC_RS_PIN PD11 - #define FSMC_DMA_DEV DMA2 - #define FSMC_DMA_CHANNEL DMA_CH5 - - #define TFT_CS_PIN FSMC_CS_PIN - #define TFT_RS_PIN FSMC_RS_PIN - - #define TOUCH_BUTTONS_HW_SPI - #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 - - #define TFT_BUFFER_SIZE 14400 -#endif - -#define HAS_SPI_FLASH 1 -#if HAS_SPI_FLASH - #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 -#endif +#include "pins_MKS_ROBIN_NANO_common.h" diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h index 6ef3a0804384..d19343386e23 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h @@ -22,7 +22,7 @@ #pragma once /** - * MKS Robin nano (STM32F130VET6) board pin assignments + * MKS Robin nano (STM32F103VET6) board pin assignments */ #if NOT_TARGET(__STM32F1__, STM32F1) @@ -38,7 +38,7 @@ #define BOARD_NO_NATIVE_USB // Avoid conflict with TIMER_SERVO when using the STM32 HAL -#define TEMP_TIMER 5 +#define TEMP_TIMER 5 // // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role @@ -146,10 +146,6 @@ //#define E0_HARDWARE_SERIAL MSerial1 //#define E1_HARDWARE_SERIAL MSerial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN PD5 #define X_SERIAL_RX_PIN PD5 @@ -188,28 +184,36 @@ // // Thermocouples // -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PE6 // TC2 - CS2 +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PE6 // TC2 - CS2 // -// Misc. Functions +// Power Supply Control // -#if HAS_TFT_LVGL_UI - //#define MKSPWC - #ifdef MKSPWC - #define SUICIDE_PIN PB2 // Enable MKSPWC SUICIDE PIN - #define SUICIDE_PIN_INVERTING false // Enable MKSPWC PIN STATE - #define KILL_PIN PA2 // Enable MKSPWC DET PIN - #define KILL_PIN_STATE true // Enable MKSPWC PIN STATE +#if ENABLED(MKS_PWC) + #if ENABLED(TFT_LVGL_UI) + #undef PSU_CONTROL + #undef MKS_PWC + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_STATE LOW + #else + #define PS_ON_PIN PB2 // PW_OFF #endif + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH +#endif - #define MT_DET_1_PIN PA4 // LVGL UI FILAMENT RUNOUT1 PIN - #define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN - #define MT_DET_PIN_INVERTING false // LVGL UI filament RUNOUT PIN STATE +// +// Misc. Functions +// +#if HAS_TFT_LVGL_UI + #define MT_DET_1_PIN PA4 + #define MT_DET_2_PIN PE6 + #define MT_DET_PIN_STATE LOW - #define WIFI_IO0_PIN PC13 // MKS ESP WIFI IO0 PIN - #define WIFI_IO1_PIN PC7 // MKS ESP WIFI IO1 PIN - #define WIFI_RESET_PIN PE9 // MKS ESP WIFI RESET PIN + #define WIFI_IO0_PIN PC13 + #define WIFI_IO1_PIN PC7 + #define WIFI_RESET_PIN PE9 #if ENABLED(MKS_TEST) #define MKS_TEST_POWER_LOSS_PIN PA2 // PW_DET @@ -231,10 +235,19 @@ #define SDCARD_CONNECTION ONBOARD #endif -#define SDIO_SUPPORT -#define SDIO_CLOCK 4500000 // 4.5 MHz -#define SD_DETECT_PIN PD12 -#define ONBOARD_SD_CS_PIN PC11 +#if SD_CONNECTION_IS(ONBOARD) + #define SDIO_SUPPORT + #define SDIO_CLOCK 4500000 // 4.5 MHz + #define SD_DETECT_PIN PD12 + #define ONBOARD_SD_CS_PIN PC11 +#elif SD_CONNECTION_IS(LCD) + #define ENABLE_SPI1 + #define SDSS PE10 + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 + #define SD_DETECT_PIN PE12 +#endif // // LCD / Controller @@ -291,8 +304,13 @@ #endif #if HAS_WIRED_LCD && !HAS_SPI_TFT - - // NON TFT Displays + #define BEEPER_PIN PC5 + #define BTN_ENC PE13 + #define LCD_PINS_ENABLE PD13 + #define LCD_PINS_RS PC6 + #define BTN_EN1 PE8 + #define BTN_EN2 PE11 + #define LCD_BACKLIGHT_PIN -1 #if ENABLED(MKS_MINI_12864) @@ -319,6 +337,20 @@ #define BEEPER_PIN -1 #endif + #elif ENABLED(MKS_MINI_12864_V3) + #define DOGLCD_CS PD13 + #define DOGLCD_A0 PC6 + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN PE14 + #define NEOPIXEL_PIN PE15 + #define DOGLCD_MOSI PA7 + #define DOGLCD_SCK PA5 + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif + //#define LCD_SCREEN_ROT_180 + #else // !MKS_MINI_12864 #define LCD_PINS_D4 PE14 @@ -333,14 +365,10 @@ #endif - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif #endif // !MKS_MINI_12864 @@ -350,10 +378,10 @@ #define HAS_SPI_FLASH 1 #if HAS_SPI_FLASH #define SPI_FLASH_SIZE 0x1000000 // 16MB - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif #ifndef BEEPER_PIN diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h new file mode 100644 index 000000000000..c76175a35c1b --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h @@ -0,0 +1,210 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * MKS Robin Nano board common pin assignments + */ + +#if HOTENDS > 2 || E_STEPPERS > 2 + #error "MKS Robin nano supports up to 2 hotends / E-steppers. Comment out this line to continue." +#endif + +#define BOARD_NO_NATIVE_USB + +// Avoid conflict with TIMER_SERVO when using the STM32 HAL +#define TEMP_TIMER 5 + +// +// EEPROM +// +#if ENABLED(SRAM_EEPROM_EMULATION) + #undef NO_EEPROM_SELECTED +#endif +#if EITHER(NO_EEPROM_SELECTED, FLASH_EEPROM_EMULATION) + #define FLASH_EEPROM_EMULATION + #define EEPROM_PAGE_SIZE (0x800U) // 2KB + #define EEPROM_START_ADDRESS (0x8000000UL + (STM32_FLASH_SIZE) * 1024UL - (EEPROM_PAGE_SIZE) * 2UL) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB +#endif + +#define SPI_DEVICE 2 + +// +// Servos +// +#define SERVO0_PIN PA8 // Enable BLTOUCH + +// +// Limit Switches +// +#define X_STOP_PIN PA15 +#define Y_STOP_PIN PA12 +#define Z_MIN_PIN PA11 +#define Z_MAX_PIN PC4 + +// +// Steppers +// +#define X_ENABLE_PIN PE4 +#define X_STEP_PIN PE3 +#define X_DIR_PIN PE2 + +#define Y_ENABLE_PIN PE1 +#define Y_STEP_PIN PE0 +#define Y_DIR_PIN PB9 + +#define Z_ENABLE_PIN PB8 +#define Z_STEP_PIN PB5 +#define Z_DIR_PIN PB4 + +#define E0_ENABLE_PIN PB3 +#define E0_STEP_PIN PD6 +#define E0_DIR_PIN PD3 + +#define E1_ENABLE_PIN PA3 +#define E1_STEP_PIN PA6 +#define E1_DIR_PIN PA1 + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC1 // TH1 +#define TEMP_1_PIN PC2 // TH2 +#define TEMP_BED_PIN PC0 // TB1 + +// +// Heaters / Fans +// +#ifndef HEATER_0_PIN + #define HEATER_0_PIN PC3 +#endif +#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) + #ifndef FAN1_PIN + #define FAN1_PIN PB0 + #endif +#else + #ifndef HEATER_1_PIN + #define HEATER_1_PIN PB0 + #endif +#endif +#ifndef FAN_PIN + #define FAN_PIN PB1 // FAN +#endif +#ifndef HEATER_BED_PIN + #define HEATER_BED_PIN PA0 +#endif + +// +// Power Supply Control +// +#if ENABLED(MKS_PWC) + #if ENABLED(TFT_LVGL_UI) + #undef PSU_CONTROL + #undef MKS_PWC + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_STATE LOW + #else + #define PS_ON_PIN PB2 // PW_OFF + #endif + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH +#endif + +// +// Misc. Functions +// +#if HAS_TFT_LVGL_UI + #define MT_DET_1_PIN PA4 + #define MT_DET_2_PIN PE6 + #define MT_DET_PIN_STATE LOW + + #define WIFI_IO0_PIN PC13 + #define WIFI_IO1_PIN PC7 + #define WIFI_RESET_PIN PA5 +#else + //#define POWER_LOSS_PIN PA2 // PW_DET + //#define PS_ON_PIN PB2 // PW_OFF + #define FIL_RUNOUT_PIN PA4 + #define FIL_RUNOUT2_PIN PE6 +#endif + +// +// SD Card +// +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#define SDIO_SUPPORT +#define SDIO_CLOCK 4500000 // 4.5 MHz +#define SD_DETECT_PIN PD12 +#define ONBOARD_SD_CS_PIN PC11 + +// +// LCD / Controller +// +#define BEEPER_PIN PC5 + +// +// TFT with FSMC interface +// +#if HAS_FSMC_TFT + /** + * Note: MKS Robin TFT screens use various TFT controllers. + * If the screen stays white, disable 'TFT_RESET_PIN' + * to let the bootloader init the screen. + */ + #define TFT_RESET_PIN PC6 // FSMC_RST + #define TFT_BACKLIGHT_PIN PD13 + + #define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h + #define DOGLCD_SCK -1 + + #define TOUCH_CS_PIN PA7 // SPI2_NSS + #define TOUCH_SCK_PIN PB13 // SPI2_SCK + #define TOUCH_MISO_PIN PB14 // SPI2_MISO + #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI + + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 + #define FSMC_DMA_DEV DMA2 + #define FSMC_DMA_CHANNEL DMA_CH5 + + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN + + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 + + #define TFT_BUFFER_SIZE 14400 +#endif + +#define HAS_SPI_FLASH 1 +#if HAS_SPI_FLASH + #define SPI_FLASH_SIZE 0x1000000 // 16MB + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 +#endif diff --git a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h index 39676bf9d789..8b67781b6047 100644 --- a/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h @@ -25,9 +25,9 @@ * MKS Robin pro (STM32F103ZET6) board pin assignments */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 3 || E_STEPPERS > 3 +#include "env_validate.h" + +#if HOTENDS > 3 || E_STEPPERS > 3 #error "MKS Robin pro supports up to 3 hotends / E-steppers. Comment out this line to continue." #endif @@ -133,9 +133,6 @@ //#define E1_HARDWARE_SERIAL MSerial1 //#define E2_HARDWARE_SERIAL MSerial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PF7 #define X_SERIAL_RX_PIN PF8 @@ -175,14 +172,29 @@ /** * Note: MKS Robin Pro board is using SPI2 interface. Make sure your stm32duino library is configured accordingly */ -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PF11 // TC2 - CS2 +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PF11 // TC2 - CS2 #define POWER_LOSS_PIN PA2 // PW_DET -#define PS_ON_PIN PG11 // PW_OFF #define FIL_RUNOUT_PIN PA4 // MT_DET1 -//#define FIL_RUNOUT_PIN PE6 // MT_DET2 -//#define FIL_RUNOUT_PIN PG14 // MT_DET3 +#define FIL_RUNOUT2_PIN PE6 // MT_DET2 +#define FIL_RUNOUT3_PIN PG14 // MT_DET3 + +// +// Power Supply Control +// +#if ENABLED(MKS_PWC) + #if ENABLED(TFT_LVGL_UI) + #undef PSU_CONTROL + #undef MKS_PWC + #define SUICIDE_PIN PG11 + #define SUICIDE_PIN_STATE LOW + #else + #define PS_ON_PIN PG11 // PW_OFF + #endif + #define KILL_PIN PA2 + #define KILL_PIN_STATE HIGH +#endif // // SD Card @@ -205,20 +217,38 @@ #error "No custom SD drive cable defined for this board." #endif -/** - * Note: MKS Robin TFT screens use various TFT controllers. - * If the screen stays white, disable 'LCD_RESET_PIN' - * to let the bootloader init the screen. - */ -#if HAS_FSMC_GRAPHICAL_TFT +// +// TFT with FSMC interface +// +#if HAS_FSMC_TFT + /** + * Note: MKS Robin TFT screens use various TFT controllers. + * If the screen stays white, disable 'LCD_RESET_PIN' + * to let the bootloader init the screen. + */ + #define TFT_RESET_PIN LCD_RESET_PIN + #define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN + #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 + #define FSMC_DMA_DEV DMA2 + #define FSMC_DMA_CHANNEL DMA_CH5 + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN - #define LCD_RESET_PIN PF6 + #define LCD_RESET_PIN PC6 #define LCD_BACKLIGHT_PIN PD13 + #define TFT_BUFFER_SIZE 14400 + #if NEED_TOUCH_PINS - #define TOUCH_CS_PIN PA7 + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 2 + #define TOUCH_CS_PIN PA7 // SPI2_NSS + #define TOUCH_SCK_PIN PB13 // SPI2_SCK + #define TOUCH_MISO_PIN PB14 // SPI2_MISO + #define TOUCH_MOSI_PIN PB15 // SPI2_MOSI #else #define BEEPER_PIN PC5 #define BTN_ENC PG2 @@ -269,12 +299,18 @@ #endif -#ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 125 + #define BOARD_ST7920_DELAY_3 125 #endif -#ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(125) -#endif -#ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(125) + +#define HAS_SPI_FLASH 1 +#if HAS_SPI_FLASH + #define SPI_FLASH_SIZE 0x1000000 // 16MB + #define SPI_FLASH_CS_PIN PB12 // Flash chip-select + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MORPHEUS.h b/Marlin/src/pins/stm32f1/pins_MORPHEUS.h index 05e02c9e4df6..87919c12f488 100644 --- a/Marlin/src/pins/stm32f1/pins_MORPHEUS.h +++ b/Marlin/src/pins/stm32f1/pins_MORPHEUS.h @@ -39,9 +39,9 @@ // // Limit Switches // -#define X_MIN_PIN PB14 -#define Y_MIN_PIN PB13 -#define Z_MIN_PIN PB12 +#define X_STOP_PIN PB14 +#define Y_STOP_PIN PB13 +#define Z_STOP_PIN PB12 // // Z Probe (when not Z_MIN_PIN) diff --git a/Marlin/src/pins/stm32f1/pins_STM32F1R.h b/Marlin/src/pins/stm32f1/pins_STM32F1R.h index d666755c6ffa..c08b707d7e99 100644 --- a/Marlin/src/pins/stm32f1/pins_STM32F1R.h +++ b/Marlin/src/pins/stm32f1/pins_STM32F1R.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" /** * 21017 Victor Perez Marlin for stm32f1 test diff --git a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h index 4f8183caf4c1..7171de919d03 100644 --- a/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h +++ b/Marlin/src/pins/stm32f1/pins_STM3R_MINI.h @@ -21,12 +21,10 @@ */ #pragma once -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#endif +#include "env_validate.h" /** - * 21017 Victor Perez Marlin for stm32f1 test + * 10 Dec 2017 Victor Perez Marlin for stm32f1 test */ #define BOARD_INFO_NAME "STM3R Mini" diff --git a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h index e09bbff324f3..bf38955127e4 100644 --- a/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h +++ b/Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h @@ -22,15 +22,15 @@ #pragma once /** - * ANYCUBIC Trigorilla Pro (STM32F130ZET6) board pin assignments. + * ANYCUBIC Trigorilla Pro (STM32F103ZET6) board pin assignments. * It is the same used by the Tronxy X5SA thanks to ftoz1 for sharing it * https://github.com/MarlinFirmware/Marlin/issues/14655 * https://github.com/MarlinFirmware/Marlin/files/3401484/x5sa-main_board-2.pdf */ -#if NOT_TARGET(__STM32F1__) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "Trigorilla Pro supports up to 2 hotends / E-steppers. Comment out this line to continue." #endif @@ -40,6 +40,8 @@ #define DISABLE_JTAG +//#define SWAPPED_Z_PLUGS + // // EEPROM // @@ -58,8 +60,20 @@ // #define X_STOP_PIN PG10 #define Y_STOP_PIN PA12 -#define Z_MAX_PIN PA14 -#define Z_MIN_PIN PA13 +#ifndef Z_MIN_PIN + #ifdef SWAPPED_Z_PLUGS + #define Z_MIN_PIN PA14 + #else + #define Z_MIN_PIN PA13 + #endif +#endif +#ifndef Z_MAX_PIN + #ifdef SWAPPED_Z_PLUGS + #define Z_MAX_PIN PA13 + #else + #define Z_MAX_PIN PA14 + #endif +#endif // // Steppers @@ -112,23 +126,30 @@ //#define POWER_LOSS_PIN PG2 // PG4 PW_DET #define FIL_RUNOUT_PIN PA15 // MT_DET -/** - * Note: MKS Robin TFT screens use various TFT controllers - * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) - * ILI9488 is not supported. - * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp - * - * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen. - * - * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu - * because Marlin uses the reset as a failsafe to revive a glitchy LCD. - */ +// +// TFT with FSMC interface +// #if HAS_FSMC_TFT + /** + * Note: MKS Robin TFT screens use various TFT controllers + * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240) + * ILI9488 is not supported. + * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp + * + * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen. + * + * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu + * because Marlin uses the reset as a failsafe to revive a glitchy LCD. + */ #define TFT_RESET_PIN PF11 #define TFT_BACKLIGHT_PIN PD13 + #define FSMC_CS_PIN PD7 // NE4 #define FSMC_RS_PIN PD11 // A0 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT #define FSMC_DMA_DEV DMA2 #define FSMC_DMA_CHANNEL DMA_CH5 @@ -181,3 +202,5 @@ #define SDSS PD2 #define SD_DETECT_PIN -1 #endif + +#undef SWAPPED_Z_PLUGS diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h new file mode 100644 index 000000000000..ba948bc479fe --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_ZM3E2_V1_0.h @@ -0,0 +1,235 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +#define BOARD_INFO_NAME "ZONESTAR ZM3E2 V1.0" + +#define DISABLE_DEBUG +//#define DISABLE_JTAG + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION + #define EEPROM_PAGE_SIZE (0x800) // 2KB + #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB +#endif + +//============================================================================= +// Zonestar ZM3E2 V1.0 (STM32F103RCT6) board pin assignments +//============================================================================= +// PA0 PWR_HOLD | PB0 BEEP | PC0 HEATER_0 +// PA1 FAN_PIN | PB1 KILL | PC1 HEATER_BED +// PA2 TX2 | PB2 LCD_SDA | PC2 TEMP_BED +// PA3 RX2 | PB3 E1_EN | PC3 TEMP_E0 +// PA4 SD_CS | PB4 Z_STOP | PC4 SD_DETECT +// PA5 SD_SCK | PB5 Z_DIR | PC5 BTN_EN2 +// PA6 SD_MISO | PB6 Z_STEP | PC6 FAN1 +// PA7 SD_MOSI | PB7 Z_EN | PC7 FIL_RUNOUT +// PA8 X_DIR | PB8 Y_STEP | PC8 X_EN +// PA9 LCD_RS | PB9 Y_DIR | PC9 X_STEP +// PA10 LCD_SCK | PB10 BTN_ENC | PC10 Z_MIN_PROBE_PIN +// PA11 USB_D- | PB11 BTN_EN1 | PC11 FIL_RUNOUT2 +// PA12 USB_D+ | PB12 LED | PC12 E1_DIR +// PA13 MS1 | PB13 E0_EN | PC13 Y_STOP +// PA14 MS2 | PB14 E0_STEP | PC14 Y_EN +// PA15 PWM | PB15 E0_DIR | PC15 X_STOP +// PD0 NC +// PD1 NC +// PD2 E1_STEP + +//============================================================================= +// EXP1 connector +// MARK I/O ZONESTAR_12864LCD ZONESTAR_12864OLED +// 10 MOSI PB1 KILL SDA +// 9 SCK PB0 BEEP SCK +// 8 TX1 PA9 DOGLCD_CS CS +// 7 RX1 PA10 DOGLCD_SCK DC +// 6 ENA PC5 BTN_EN2 KNOB_ENB +// 5 DAT PB2 DOGLCD_MOSI RESET +// 4 TX3 PB10 BTN_ENC KNOB_ENC +// 3 RX3 PB11 BTN_EN1 KNOB_ENA +// 2 +5V +// 1 GND + +#define EXP1_03_PIN PB11 +#define EXP1_04_PIN PB10 +#define EXP1_05_PIN PB2 +#define EXP1_06_PIN PC5 +#define EXP1_07_PIN PA10 +#define EXP1_08_PIN PA9 +#define EXP1_09_PIN PB0 +#define EXP1_10_PIN PB1 + +// AUX1 connector +// 1 +5V +// 2 TX2 PA2 UART2_TX +// 3 RX2 PA3 UART2_RX +// 4 GND + +// AUX2 connector to BLTouch +// 1 +5V +// 2 SEN PC10 +// 3 PWM PA15 +// 4 GND +//============================================================================= + +// +// Servos +// +#define SERVO0_PIN PA15 + +// +// Limit Switches +// +#define X_STOP_PIN PC15 +#define Y_STOP_PIN PC13 +#define Z_STOP_PIN PB4 + +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PC10 // BLTouch (3DTouch) +#endif + +// +// Filament Runout Sensor +// +#define FIL_RUNOUT_PIN PC7 // E0_SW +//#define FIL_RUNOUT2_PIN PC11 // E1_SW + +// +// Steppers +// +#define MS1_PIN PA13 +#define MS2_PIN PA14 + +#define X_STEP_PIN PC9 +#define X_DIR_PIN PA8 +#define X_ENABLE_PIN PC8 + +#define Y_STEP_PIN PB8 +#define Y_DIR_PIN PB9 +#define Y_ENABLE_PIN PC14 + +#define Z_STEP_PIN PB6 +#define Z_DIR_PIN PB5 +#define Z_ENABLE_PIN PB7 + +#define E0_STEP_PIN PB14 +#define E0_DIR_PIN PB15 +#define E0_ENABLE_PIN PB13 + +#define E1_STEP_PIN PD2 +#define E1_DIR_PIN PC12 +#define E1_ENABLE_PIN PB3 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PC0 // EXTRUDER 1 +#define HEATER_BED_PIN PC1 // BED + +#define FAN1_PIN PC6 +#define FAN_PIN PA1 + +// +// Temperature Sensors +// +#define TEMP_BED_PIN PC2 // Analog Input +#define TEMP_0_PIN PC3 // Analog Input + +#define LED_PIN PB12 +//#define KILL_PIN PB1 // @EXP1 +#define SUICIDE_PIN PA0 + +// +// SD card +// +#define ENABLE_SPI1 +#define SD_DETECT_PIN PC4 +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 +#define SD_SS_PIN PA4 + +// +// LCD Pins +// +#if ENABLED(ZONESTAR_12864LCD) + + //================================================================================ + // LCD 128x64 + //================================================================================ + // EXP1 connector + // MARK I/O ZONESTAR_12864LCD + // 10 MOSI PB1 KILL + // 9 SCK PB0 BEEP + // 8 TX1 PA9 LCD_PINS_RS + // 7 RX1 PA10 LCD_PINS_D4 + // 6 ENA PC5 BTN_EN2 + // 5 DAT PB2 LCD_PINS_ENABLE + // 4 TX3 PB10 BTN_ENC + // 3 RX3 PB11 BTN_EN1 + // 2 +5V + // 1 GND + + #define LCDSCREEN_NAME "ZONESTAR LCD12864" + #define LCD_PINS_RS EXP1_08_PIN + #define LCD_PINS_ENABLE EXP1_05_PIN + #define LCD_PINS_D4 EXP1_07_PIN + //#define KILL_PIN EXP1_10_PIN + #define BEEPER_PIN EXP1_09_PIN + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_04_PIN + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 200 + #define BOARD_ST7920_DELAY_3 125 + +#elif EITHER(ZONESTAR_12864OLED, ZONESTAR_12864OLED_SSD1306) + + //================================================================================ + // OLED 128x64 + //================================================================================ + // 10 MOSI PB1 OLED_SDA + // 9 SCK PB0 OLED_SCK + // 8 TX1 PA9 OLED_CS + // 7 RX1 PA10 OLED_DC + // 6 ENA PC5 KNOB_ENA + // 5 DAT PB2 OLED_RESET + // 4 TX3 PB10 KNOB_ENC + // 3 RX3 PB11 KNOB_ENB + + #define FORCE_SOFT_SPI + #define LCDSCREEN_NAME "ZONESTAR 12864OLED" + #define LCD_PINS_RS EXP1_05_PIN // = LCD_RESET_PIN + #define LCD_PINS_DC EXP1_07_PIN // DC + #define DOGLCD_CS EXP1_08_PIN // CS + #define DOGLCD_A0 LCD_PINS_DC // A0 = DC + #define DOGLCD_MOSI EXP1_10_PIN // SDA + #define DOGLCD_SCK EXP1_09_PIN // SCK + // Encoder + #define BTN_EN1 EXP1_03_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_04_PIN + +#endif diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h new file mode 100644 index 000000000000..093821bbd26b --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V1_0.h @@ -0,0 +1,356 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +#define BOARD_INFO_NAME "ZONESTAR ZM3E4 V1.0" + +//#define DISABLE_DEBUG +#define DISABLE_JTAG + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION + #define EEPROM_PAGE_SIZE (0x800) // 2KB + #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB +#endif + +//#define OPTION_DUALZ_DRIVE +//#define OPTION_Z2_ENDSTOP +//#define SWITCH_EXTRUDER_SEQUENCE + +//============================================================================= +// Zonestar ZM3E4 V1.0 (STM32F103VCT6) board pin assignments +//============================================================================= +// PA0 | PB0 HEAT_1 | PC0 AXU_SDA +// PA1 | PB1 FAN1 | PC1 TEMP_E1 +// PA2 HEAT_BED | PB2 BOOT1 | PC2 TEMP_E0 +// PA3 PWR_HOLD | PB3 SPI3_SCK | PC3 TEMP_BED +// PA4 SD_CS | PB4 SPI3_MISO | PC4 SD_DETECT +// PA5 SD_SCK | PB5 SPI3_MOSI | PC5 HEAT_0 +// PA6 SD_MISO | PB6 SERVO3 | PC6 E1_STEP +// PA7 SD_MOSI | PB7 SERVO2 | PC7 E1_EN +// PA8 X_DIR | PB8 FAN2/SERVO1 | PC8 FIL_RUNOUT_PIN +// PA9 UART1_RX | PB9 SERVO0 | PC9 E0_DIR +// PA10 UART1_TX | PB10 TX3 | PC10 E0_EN +// PA11 USB_D- | PB11 RX3 | PC11 Z2_EN +// PA12 USB_D+ | PB12 LED | PC12 Z2_STEP +// PA13 SWD_SDO | PB13 Z1_MAX | PC13 X_MIN +// PA14 SWD_SCK | PB14 Y_MAX | PC14 WIFI_RST +// PA15 SPI3_CS | PB15 PWR_DET | PC15 WIFI_CS +// PD0 Z2_DIR | PE0 Y_EN +// PD1 Z2_MIN | PE1 Y_STEP +// PD2 Z1_EN | PE2 Y_DIR +// PD3 Z1_STEP | PE3 Y_MIN +// PD4 Z1_DIR | PE4 X_DIR +// PD5 WIFI_RXD | PE5 X_STEP +// PD6 WIFI_TXD | PE6 X_EN +// PD7 Z1_MIN | PE7 AXU_SCL +// PD8 X_MAX | PE8 BTN_EN1 +// PD9 E3_DIR | PE9 LCD_SCK +// PD10 E3_STEP | PE10 LCD_MOSI +// PD11 E3_EN | PE11 BEEPER +// PD12 E2_DIR | PE12 LCD_EN +// PD13 E2_STEP | PE13 KILL +// PD14 E2_EN | PE14 BTN_EN2 +// PD15 E1_DIR | PE15 BTN_ENC +//============================================================================= + +// EXP1 connector +// MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 +// 10 RS PE13 KILL BTN_ENC +// 9 BP PE11 BEEP BEEP +// 8 EN PE12 DOGLCD_CS LCDRS +// 7 MOSI PE10 DOGLCD_SCK LCDE +// 6 EN1 PE8 BTN_EN1 NC +// 5 SCK PE9 DOGLCD_MOSI LCD4 +// 4 ENC PE15 BTN_ENC NC +// 3 EN2 PE14 BTN_EN2 NC +// 2 +5V +5V +// 1 GND GND + +#define EXP1_03_PIN PE14 +#define EXP1_04_PIN PE15 +#define EXP1_05_PIN PE9 +#define EXP1_06_PIN PE8 +#define EXP1_07_PIN PE10 +#define EXP1_08_PIN PE12 +#define EXP1_09_PIN PE11 +#define EXP1_10_PIN PE13 + +// EXP2 connector +// MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 +// 10 +// 9 +// 8 RX0 PA9 UART1_RX +// 7 TX0 PA10 UART1_TX BTN_EN2 +// 6 CS3 PA15 +// 5 MISO3 PB4 BTN_EN1 +// 4 MOSI3 PB5 KILL +// 3 SCK3 PB3 +// 2 +5V +5V +// 1 GND GND + +#define EXP2_03_PIN PB3 +#define EXP2_04_PIN PB5 +#define EXP2_05_PIN PB4 +#define EXP2_06_PIN PA15 +#define EXP2_07_PIN PA10 +#define EXP2_08_PIN PA9 + +// AUX1 connector +// 1 +5V +// 2 GND +// 3 RX3 PB11 UART3_RX +// 4 TX3 PB10 UART3_TX +// 5 SCL PE7 +// 6 SDA PC0 + +// WiFi +// 1 +5V +// 2 GND +// 3 WIFI_TXD PD5 UART2_RX +// 4 WIFI_RXD PD6 UART2_TX +// 5 WIFI_RST PC14 +// 6 WIFI_CS PC15 +//============================================================================= + +// +// Servos +// +#define SERVO0_PIN PB9 +#define SERVO2_PIN PB7 +#define SERVO3_PIN PB6 + +// +// Limit Switches +// +#define X_MIN_PIN PC13 +#define X_MAX_PIN PD8 +#define Y_MIN_PIN PE3 +#define Y_MAX_PIN PB14 +#define Z_MIN_PIN PD7 +#define Z_MAX_PIN PB13 + +// +// Filament Runout Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PC8 +#endif + +// +// Steppers +// +#if ENABLED(COREXY) + #define X_ENABLE_PIN PE0 + #define X_STEP_PIN PE1 + #define X_DIR_PIN PE2 + + #define Y_ENABLE_PIN PE6 + #define Y_STEP_PIN PE5 + #define Y_DIR_PIN PE4 +#else + #define X_ENABLE_PIN PE6 + #define X_STEP_PIN PE5 + #define X_DIR_PIN PE4 + + #define Y_ENABLE_PIN PE0 + #define Y_STEP_PIN PE1 + #define Y_DIR_PIN PE2 +#endif + +#define Z_ENABLE_PIN PD2 +#define Z_STEP_PIN PD3 +#define Z_DIR_PIN PD4 + +#ifdef OPTION_DUALZ_DRIVE + #define Z2_ENABLE_PIN PC11 + #define Z2_STEP_PIN PC12 + #define Z2_DIR_PIN PD0 +#endif + +#ifdef OPTION_Z2_ENDSTOP + #define Z2_MIN_PIN PD1 + #define Z2_MAX_PIN PB12 +#endif + +#ifdef SWITCH_EXTRUDER_SEQUENCE + #define E3_ENABLE_PIN PC10 + #define E3_STEP_PIN PA8 + #define E3_DIR_PIN PC9 + + #define E2_STEP_PIN PC6 + #define E2_DIR_PIN PD15 + #define E2_ENABLE_PIN PC7 + + #define E1_STEP_PIN PD13 + #define E1_DIR_PIN PD12 + #define E1_ENABLE_PIN PD14 + + #define E0_STEP_PIN PD10 + #define E0_DIR_PIN PD9 + #define E0_ENABLE_PIN PD11 +#else + #define E0_ENABLE_PIN PC10 + #define E0_STEP_PIN PA8 + #define E0_DIR_PIN PC9 + + #define E1_STEP_PIN PC6 + #define E1_DIR_PIN PD15 + #define E1_ENABLE_PIN PC7 + + #define E2_STEP_PIN PD13 + #define E2_DIR_PIN PD12 + #define E2_ENABLE_PIN PD14 + + #define E3_STEP_PIN PD10 + #define E3_DIR_PIN PD9 + #define E3_ENABLE_PIN PD11 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC2 // TH0 +#define TEMP_BED_PIN PC3 // TB1 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PC5 // HEATER0 +#define HEATER_BED_PIN PA2 // HOT BED + +#if ENABLED(OPTION_CHAMBER) + #define TEMP_CHAMBER_PIN PC1 + #define HEATER_CHAMBER_PIN PB0 +#else + #define TEMP_1_PIN PC1 // TH1 + #define HEATER_1_PIN PB0 // HEATER1 +#endif + +#define FAN_PIN PB1 // FAN1 +#define FAN1_PIN PB8 // FAN2 + +// +// Misc. Functions +// + +//#define POWER_LOSS_PIN PB15 +#define LED_PIN PA0 +#define SUICIDE_PIN PA3 + +// +// SD card +// +#define ENABLE_SPI1 +#define SD_DETECT_PIN PC4 +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 +#define SD_SS_PIN PA4 + +// WiFi Functions +#define WIFI_RST PC15 +#define WIFI_EN PC14 + +// +// LCD / Controller +// +#if ENABLED(ZONESTAR_12864LCD) + #define LCDSCREEN_NAME "ZONESTAR LCD12864" + #define LCD_PINS_RS EXP1_08_PIN // 7 CS make sure for zonestar zm3e4! + #define LCD_PINS_ENABLE EXP1_05_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_D4 EXP1_07_PIN // 8 SCK make sure for zonestar zm3e4! + #define BEEPER_PIN EXP1_09_PIN + #define KILL_PIN -1 // EXP1_10_PIN + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_03_PIN + #define BTN_ENC EXP1_04_PIN +#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864" + #define LCD_PINS_RS EXP1_08_PIN // 7 CS make sure for zonestar zm3e4! + #define LCD_PINS_ENABLE EXP1_07_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_D4 EXP1_05_PIN // 8 SCK make sure for zonestar zm3e4! + #define BEEPER_PIN EXP1_09_PIN + #define KILL_PIN EXP2_04_PIN + #define BTN_EN1 EXP2_05_PIN + #define BTN_EN2 EXP2_07_PIN + #define BTN_ENC EXP1_10_PIN +#elif ENABLED(ZONESTAR_DWIN_LCD) + // Connect to EXP2 connector + #define LCDSCREEN_NAME "ZONESTAR DWIN LCD" + #define BEEPER_PIN EXP2_06_PIN + #define KILL_PIN PC0 + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_04_PIN + #define BTN_ENC EXP2_05_PIN +#endif + +#if ENABLED(ZONESTAR_LCD2004_KNOB) + #define LCDSCREEN_NAME "LCD2004 KNOB" + #define LCD_PINS_RS EXP1_08_PIN + #define LCD_PINS_ENABLE EXP1_07_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_03_PIN + #define LCD_PINS_D7 EXP1_04_PIN + #define BTN_EN1 EXP2_07_PIN + #define BTN_EN2 EXP2_05_PIN + #define BTN_ENC EXP1_10_PIN + #define BEEPER_PIN EXP1_09_PIN + #define KILL_PIN EXP2_04_PIN +#elif ENABLED(ZONESTAR_LCD2004_ADCKEY) + #define LCDSCREEN_NAME "LCD2004 5KEY" + #define LCD_PINS_RS EXP1_08_PIN + #define LCD_PINS_ENABLE EXP1_07_PIN + #define LCD_PINS_D4 EXP1_05_PIN + #define LCD_PINS_D5 EXP1_06_PIN + #define LCD_PINS_D6 EXP1_03_PIN + #define LCD_PINS_D7 EXP1_04_PIN + #define ADC_KEYPAD_PIN PC0 // PIN6 of AUX1 +#endif + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 250 + #define BOARD_ST7920_DELAY_3 125 +#endif + +// Remap SERVO0 PIN for BLTouch +#if ENABLED(BLTOUCH_ON_EXP1) + // BLTouch connected to EXP1 + #define BLTOUCH_PROBE_PIN EXP1_06_PIN + #define BLTOUCH_GND_PIN EXP1_04_PIN + #undef SERVO0_PIN + #define SERVO0_PIN EXP1_03_PIN +#elif ENABLED(BLTOUCH_ON_EXP2) + // BLTouch connected to EXP2 + #define BLTOUCH_PROBE_PIN EXP2_03_PIN + #define BLTOUCH_GND_PIN EXP2_04_PIN + #undef SERVO0_PIN + #define SERVO0_PIN EXP2_06_PIN +#else + #define BLTOUCH_PROBE_PIN PB13 +#endif diff --git a/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h new file mode 100644 index 000000000000..e19413aa5e2b --- /dev/null +++ b/Marlin/src/pins/stm32f1/pins_ZM3E4_V2_0.h @@ -0,0 +1,329 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +#define BOARD_INFO_NAME "ZONESTAR ZM3E4 V2.0" + +//#define DISABLE_DEBUG +#define DISABLE_JTAG + +#if NO_EEPROM_SELECTED + #define FLASH_EEPROM_EMULATION + #define EEPROM_PAGE_SIZE (0x800) // 2KB + #define EEPROM_START_ADDRESS (0x08000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE) + #define MARLIN_EEPROM_SIZE EEPROM_PAGE_SIZE // 2KB +#endif + +//#define OPTION_DUALZ_DRIVE +//#define OPTION_Z2_ENDSTOP +//#define OPTION_REPEAT_PRINTING +//#define SWITCH_EXTRUDER_SEQUENCE + +//============================================================================= +// Zonestar ZM3E4 V2.0 (STM32F103VET6) board pin assignments +//============================================================================= +// PA0 | PB0 HEAT_1 | PC0 AUX_SDA +// PA1 | PB1 FAN1 | PC1 TEMP_E1 +// PA2 HEAT_BED | PB2 BOOT1 | PC2 TEMP_E0 +// PA3 PWR_HOLD | PB3 SPI3_SCK | PC3 TEMP_BED +// PA4 SD_CS | PB4 SPI3_MISO | PC4 SD_DETECT +// PA5 SD_SCK | PB5 SPI3_MOSI | PC5 HEAT_0 +// PA6 SD_MISO | PB6 SERVO3 | PC6 E1_STEP +// PA7 SD_MOSI | PB7 SERVO2 | PC7 E1_EN +// PA8 X_DIR | PB8 FAN2/SERVO1 | PC8 FIL_RUNOUT_PIN +// PA9 UART1_RX | PB9 SERVO0 | PC9 E0_DIR +// PA10 UART1_TX | PB10 TX3 | PC10 E0_EN +// PA11 USB_D- | PB11 RX3 | PC11 Z2_EN +// PA12 USB_D+ | PB12 LED | PC12 Z2_STEP +// PA13 SWD_SDO | PB13 Z1_MAX | PC13 X_MIN +// PA14 SWD_SCK | PB14 Y_MAX | PC14 WIFI_RST +// PA15 SPI3_CS | PB15 PWR_DET | PC15 WIFI_CS +// PD0 Z2_DIR | PE0 Y_EN +// PD1 Z2_MIN | PE1 Y_STEP +// PD2 Z1_EN | PE2 Y_DIR +// PD3 Z1_STEP | PE3 Y_MIN +// PD4 Z1_DIR | PE4 X_DIR +// PD5 WIFI_RXD | PE5 X_STEP +// PD6 WIFI_TXD | PE6 X_EN +// PD7 Z1_MIN | PE7 AUX_SCL +// PD8 X_MAX | PE8 BTN_EN1 +// PD9 E3_DIR | PE9 LCD_SCK +// PD10 E3_STEP | PE10 LCD_MOSI +// PD11 E3_EN | PE11 BEEPER +// PD12 E2_DIR | PE12 LCD_EN +// PD13 E2_STEP | PE13 KILL +// PD14 E2_EN | PE14 BTN_EN2 +// PD15 E1_DIR | PE15 BTN_ENC + +//============================================================================= +// EXP1 connector +// MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 +// 10 RS PE13 KILL BTN_ENC +// 9 BP PE11 BEEP BEEP +// 8 EN PE12 DOGLCD_CS LCDRS +// 7 MOSI PE10 DOGLCD_SCK LCDE +// 6 EN1 PE8 BTN_EN1 NC +// 5 SCK PE9 DOGLCD_MOSI LCD4 +// 4 ENC PE15 BTN_ENC NC +// 3 EN2 PE14 BTN_EN2 NC +// 2 +5V +// 1 GND + +#define EXP1_03_PIN PE14 +#define EXP1_04_PIN PE15 +#define EXP1_05_PIN PE9 +#define EXP1_06_PIN PE8 +#define EXP1_07_PIN PE10 +#define EXP1_08_PIN PE12 +#define EXP1_09_PIN PE11 +#define EXP1_10_PIN PE13 + +// EXP2 connector +// MARK I/O ZONESTAR_LCD12864 REPRAPDISCOUNT_LCD12864 +// 10 SDA PC0 +// 9 SCL PE7 +// 8 RX1 PA9 UART1_RX +// 7 TX1 PA10 UART1_TX BTN_EN2 +// 6 CS3 PA15 +// 5 MISO3 PB4 BTN_EN1 +// 4 MOSI3 PB5 KILL +// 3 SCK3 PB3 +// 2 +5V +// 1 GND + +#define EXP2_03_PIN PB3 +#define EXP2_04_PIN PB5 +#define EXP2_05_PIN PB4 +#define EXP2_06_PIN PA15 +#define EXP2_07_PIN PA10 +#define EXP2_08_PIN PA9 +#define EXP2_09_PIN PE7 +#define EXP2_10_PIN PC0 + +// AUX1 connector +// 1 +5V +// 2 GND +// 3 RX3 PB11 UART3_RX +// 4 TX3 PB10 UART3_TX +// 5 SCL PE7 +// 6 SDA PC0 + +// WiFi +// 1 +5V +// 2 GND +// 3 WIFI_TXD PD5 UART2_RX +// 4 WIFI_RXD PD6 UART2_TX +// 5 WIFI_RST PC14 +// 6 WIFI_CS PC15 +//============================================================================= + +// +// Servos +// +#define SERVO0_PIN PB9 +//#define SERVO1_PIN PB8 +#define SERVO2_PIN PB7 +#define SERVO3_PIN PB6 + +// +// Limit Switches +// +#define X_MIN_PIN PC13 +#define Y_MIN_PIN PE3 +#define Z_MIN_PIN PD7 +#define X_MAX_PIN PD8 +#define Y_MAX_PIN PB14 +#define Z_MAX_PIN PB13 + +#ifdef OPTION_Z2_ENDSTOP + #define Z2_MIN_PIN PD1 + #define Z2_MAX_PIN PB12 +#endif + +// +// Steppers +// +#if ENABLED(COREXY) + #define X_ENABLE_PIN PE0 + #define X_STEP_PIN PE1 + #define X_DIR_PIN PE2 + + #define Y_ENABLE_PIN PE6 + #define Y_STEP_PIN PE5 + #define Y_DIR_PIN PE4 +#else + #define X_ENABLE_PIN PE6 + #define X_STEP_PIN PE5 + #define X_DIR_PIN PE4 + + #define Y_ENABLE_PIN PE0 + #define Y_STEP_PIN PE1 + #define Y_DIR_PIN PE2 +#endif + +#define Z_ENABLE_PIN PD2 +#define Z_STEP_PIN PD3 +#define Z_DIR_PIN PD4 + +#ifdef OPTION_DUALZ_DRIVE + #define Z2_ENABLE_PIN PC11 + #define Z2_STEP_PIN PC12 + #define Z2_DIR_PIN PD0 +#endif + +#ifdef OPTION_REPEAT_PRINTING + #define REPRINT_STOP_PIN PD8 // X_MAX_PIN + #define FORWARD_PIN PA13 + #define BACK_PIN PA14 +#endif + +#ifdef SWITCH_EXTRUDER_SEQUENCE + #define E3_ENABLE_PIN PC10 + #define E3_STEP_PIN PA8 + #define E3_DIR_PIN PC9 + + #define E2_STEP_PIN PC6 + #define E2_DIR_PIN PD15 + #define E2_ENABLE_PIN PC7 + + #define E1_STEP_PIN PD13 + #define E1_DIR_PIN PD12 + #define E1_ENABLE_PIN PD14 + + #define E0_STEP_PIN PD10 + #define E0_DIR_PIN PD9 + #define E0_ENABLE_PIN PD11 +#else + #define E0_ENABLE_PIN PC10 + #define E0_STEP_PIN PA8 + #define E0_DIR_PIN PC9 + + #define E1_STEP_PIN PC6 + #define E1_DIR_PIN PD15 + #define E1_ENABLE_PIN PC7 + + #define E2_STEP_PIN PD13 + #define E2_DIR_PIN PD12 + #define E2_ENABLE_PIN PD14 + + #define E3_STEP_PIN PD10 + #define E3_DIR_PIN PD9 + #define E3_ENABLE_PIN PD11 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC2 // TH0 +//#define TEMP_1_PIN PC1 // TH1 +#define TEMP_BED_PIN PC3 // TB1 + +// +// Heaters +// +#define HEATER_0_PIN PC5 // HEATER0 +//#define HEATER_1_PIN PB0 // HEATER1 +#define HEATER_BED_PIN PA2 // HOT BED + +// +// Fans +// +#define FAN_PIN PB1 // FAN1 +#define FAN1_PIN PB8 // FAN2 + +// +// Misc. Functions +// +//#define POWER_LOSS_PIN PB15 +#define LED_PIN PA0 +#define SUICIDE_PIN PA3 +#define FIL_RUNOUT_PIN PC8 + +// +// SD card +// +#define ENABLE_SPI1 +#define SD_DETECT_PIN PC4 +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 +#define SD_SS_PIN PA4 + +// WiFi Functions +#define WIFI_RST PC15 +#define WIFI_EN PC14 + +#if ENABLED(ZONESTAR_12864LCD) + #define LCDSCREEN_NAME "ZONESTAR LCD12864" + #define LCD_PINS_RS EXP1_08_PIN // 7 CS make sure for zonestar zm3e4! + #define LCD_PINS_ENABLE EXP1_05_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_D4 EXP1_07_PIN // 8 SCK make sure for zonestar zm3e4! + #define BEEPER_PIN EXP1_09_PIN + #define KILL_PIN -1 // EXP1_10_PIN + #define BTN_EN1 EXP1_06_PIN + #define BTN_EN2 EXP1_03_PIN + #define BTN_ENC EXP1_04_PIN +#elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define LCDSCREEN_NAME "REPRAPDISCOUNT LCD12864" + #define LCD_PINS_RS EXP2_08_PIN // 7 CS make sure for zonestar zm3e4! + #define LCD_PINS_ENABLE EXP2_05_PIN // 6 DATA make sure for zonestar zm3e4! + #define LCD_PINS_D4 EXP2_07_PIN // 8 SCK make sure for zonestar zm3e4! + #define BEEPER_PIN EXP2_10_PIN + #define KILL_PIN EXP2_09_PIN + #define BTN_EN1 EXP2_03_PIN + #define BTN_EN2 EXP2_06_PIN + #define BTN_ENC EXP2_04_PIN +#elif ENABLED(ZONESTAR_DWIN_LCD) + // Connect to EXP2 connector + #define LCDSCREEN_NAME "ZONESTAR DWIN LCD" + #define BEEPER_PIN EXP2_06_PIN // PE11 + #define KILL_PIN -1 // EXP1_10_PIN + #define BTN_EN2 EXP2_04_PIN // PE8 + #define BTN_EN1 EXP2_03_PIN // PE14 + #define BTN_ENC EXP2_05_PIN // PE15 +#endif + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 200 // Tclk_fall <200ns + #define BOARD_ST7920_DELAY_2 250 // Tdata_width >200ns + #define BOARD_ST7920_DELAY_3 200 // Tclk_rise <200ns +#endif + +// Remap SERVO0 PIN for BLTouch +#if ENABLED(BLTOUCH_ON_EXP1) + // BLTouch connected to EXP1 + #define BLTOUCH_PROBE_PIN EXP1_06_PIN + #define BLTOUCH_GND_PIN EXP1_04_PIN + #undef SERVO0_PIN + #define SERVO0_PIN EXP1_03_PIN +#elif ENABLED(BLTOUCH_ON_EXP2) + // BLTouch connected to EXP2 + #define BLTOUCH_PROBE_PIN EXP2_03_PIN + #define BLTOUCH_GND_PIN EXP2_04_PIN + #undef SERVO0_PIN + #define SERVO0_PIN EXP2_06_PIN +#else + #define BLTOUCH_PROBE_PIN PB13 // Z1_MAX +#endif diff --git a/Marlin/src/pins/stm32f4/env_validate.h b/Marlin/src/pins/stm32f4/env_validate.h new file mode 100644 index 000000000000..c01401f06c9a --- /dev/null +++ b/Marlin/src/pins/stm32f4/env_validate.h @@ -0,0 +1,28 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if NOT_TARGET(STM32F4) && (DISABLED(ALLOW_STM32DUINO) || NOT_TARGET(STM32F4xx)) + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#endif + +#undef ALLOW_STM32DUINO diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h index 487080f46b67..834301043288 100644 --- a/Marlin/src/pins/stm32f4/pins_ANET_ET4.h +++ b/Marlin/src/pins/stm32f4/pins_ANET_ET4.h @@ -19,12 +19,11 @@ * along with this program. If not, see . * */ - #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "Anet ET4 only supports one hotend / E-stepper. Comment out this line to continue." #endif @@ -134,14 +133,18 @@ // // LCD / Controller // -#define TFT_RESET_PIN PE6 -#define TFT_CS_PIN PD7 -#define TFT_RS_PIN PD13 -#define TFT_INTERFACE_FSMC_8BIT +#if HAS_SPI_TFT || HAS_FSMC_TFT + #define TFT_RESET_PIN PE6 + #define TFT_CS_PIN PD7 + #define TFT_RS_PIN PD13 -#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT -#define FSMC_CS_PIN TFT_CS_PIN -#define FSMC_RS_PIN TFT_RS_PIN + #if HAS_FSMC_TFT + #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT + #define FSMC_CS_PIN TFT_CS_PIN + #define FSMC_RS_PIN TFT_RS_PIN + #define TFT_INTERFACE_FSMC_8BIT + #endif +#endif // // Touch Screen diff --git a/Marlin/src/pins/stm32f4/pins_ANET_ET4P.h b/Marlin/src/pins/stm32f4/pins_ANET_ET4P.h index f5ebf82a4858..bad5b8f7184d 100644 --- a/Marlin/src/pins/stm32f4/pins_ANET_ET4P.h +++ b/Marlin/src/pins/stm32f4/pins_ANET_ET4P.h @@ -19,7 +19,6 @@ * along with this program. If not, see . * */ - #pragma once #define BOARD_INFO_NAME "Anet ET4P 1.x" diff --git a/Marlin/src/pins/stm32f4/pins_ARMED.h b/Marlin/src/pins/stm32f4/pins_ARMED.h index db57db14d549..7cccac7caa3a 100644 --- a/Marlin/src/pins/stm32f4/pins_ARMED.h +++ b/Marlin/src/pins/stm32f4/pins_ARMED.h @@ -24,9 +24,9 @@ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "Arm'ed supports up to 2 hotends / E-steppers." #endif @@ -38,8 +38,10 @@ #define BOARD_INFO_NAME "Arm'ed" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME -#define I2C_EEPROM -#define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#if NO_EEPROM_SELECTED + #define I2C_EEPROM + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#endif // // Limit Switches @@ -204,9 +206,6 @@ #if HAS_TMC_UART // TMC2208/TMC2209 stepper drivers - // - // Software serial - // #define X_SERIAL_TX_PIN EXT0_PIN #define X_SERIAL_RX_PIN EXT0_PIN diff --git a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h index c2ad907e0470..d8a83bef3a89 100644 --- a/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h +++ b/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h @@ -27,9 +27,10 @@ * Shield - https://github.com/jmz52/Hardware */ -#if NOT_TARGET(STM32F4, STM32F4xx) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "Black STM32F4VET6 supports up to 2 hotends / E-steppers." #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h index 939bc1eccd08..86851a7840a5 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h @@ -21,9 +21,9 @@ */ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "BIGTREE BTT002 V1.0 only supports one hotend / E-stepper. Comment out this line to continue." #endif @@ -137,20 +137,17 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial ## - // #define X_SERIAL_TX_PIN PE2 - #define X_SERIAL_RX_PIN PE2 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN PE3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE4 - #define Z_SERIAL_RX_PIN PE4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD7 - #define E0_SERIAL_RX_PIN PD7 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -161,6 +158,7 @@ // #define TEMP_0_PIN PA2 // T0 <-> E0 #define TEMP_1_PIN PA0 // T1 <-> E1 +#define TEMP_BOARD_PIN PC2 // Onboard thermistor, NTC100K #define TEMP_BED_PIN PA1 // T2 <-> Bed #define TEMP_PROBE_PIN PC3 // Shares J4 connector with PD1 @@ -172,86 +170,125 @@ #define FAN_PIN PB8 // Fan1 #define FAN1_PIN PB9 // Fan0 -// HAL SPI1 pins -#define CUSTOM_SPI_PINS -#if ENABLED(CUSTOM_SPI_PINS) - #define SD_SCK_PIN PA5 // SPI1 SCLK - #define SD_SS_PIN PA4 // SPI1 SSEL - #define SD_MISO_PIN PA6 // SPI1 MISO - #define SD_MOSI_PIN PA7 // SPI1 MOSI -#endif - -// -// Misc. Functions -// -#define SDSS PA4 - /** - * -------------------------------------BTT002 V1.0-------------------------------------------- - * ----- ----- | - * PA3 | · · | GND 5V | · · | GND | - * NRESET | · · | PC4(SD_DET) (LCD_D7) PE13 | · · | PE12 (LCD_D6) | - * (MOSI)PA7 | · · | PB0(BTN_EN2) (LCD_D5) PE11 | · · | PE10 (LCD_D4) | - * (SD_SS)PA4 | · · | PC5(BTN_EN1) (LCD_RS) PE8 | · · | PE9 (LCD_EN) | - * (SCK)PA5 | · · | PA6(MISO) (BTN_ENC) PB1 | · · | PE7 (BEEPER) | - * ----- ----- | - * EXP2 EXP1 | - * -------------------------------------------------------------------------------------------- + * -----------------------------------BTT002 V1.0---------------------------------------- + * ------ ------ | + * PA3 | 1 2 | GND 5V | 1 2 | GND | + * NRESET | 3 4 | PC4 (SD_DET) (LCD_D7) PE13 | 3 4 | PE12 (LCD_D6) | + * (MOSI) PA7 | 5 6 | PB0 (BTN_EN2) (LCD_D5) PE11 | 5 6 | PE10 (LCD_D4) | + * (SD_SS) PA4 | 7 8 | PC5 (BTN_EN1) (LCD_RS) PE8 | 7 8 | PE9 (LCD_EN) | + * (SCK) PA5 | 9 10 | PA6 (MISO) (BTN_ENC) PB1 | 9 10 | PE7 (BEEPER) | + * ------ ------ | + * EXP2 EXP1 | + * -------------------------------------------------------------------------------------- */ +#define EXP1_03_PIN PE13 +#define EXP1_04_PIN PE12 +#define EXP1_05_PIN PE11 +#define EXP1_06_PIN PE10 +#define EXP1_07_PIN PE8 +#define EXP1_08_PIN PE9 +#define EXP1_09_PIN PB1 +#define EXP1_10_PIN PE7 + +#define EXP2_01_PIN PA3 +#define EXP2_03_PIN -1 +#define EXP2_04_PIN PC4 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PB0 +#define EXP2_07_PIN PA4 +#define EXP2_08_PIN PC5 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + +// HAL SPI1 pins +#define SD_SCK_PIN EXP2_09_PIN // SPI1 SCLK +#define SD_SS_PIN EXP2_07_PIN // SPI1 SSEL +#define SD_MISO_PIN EXP2_10_PIN // SPI1 MISO +#define SD_MOSI_PIN EXP2_05_PIN // SPI1 MOSI + +#define SDSS EXP2_07_PIN // // LCDs and Controllers // #if HAS_WIRED_LCD - #define BEEPER_PIN PE7 - #define BTN_ENC PB1 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN + + #define SD_DETECT_PIN EXP2_04_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS PE12 + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 PE9 - #define BTN_EN2 PE10 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE PE13 - #define LCD_PINS_D4 PE11 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + + #elif ENABLED(MKS_MINI_12864) + + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #else - #define LCD_PINS_RS PE8 + #define LCD_PINS_RS EXP1_07_PIN + + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define BTN_EN1 PC5 - #define BTN_EN2 PB0 - #define SD_DETECT_PIN PC4 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN - #define LCD_SDSS PA4 + #if ENABLED(FYSETC_MINI_12864) + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define DOGLCD_MOSI EXP2_05_PIN + #define DOGLCD_MISO EXP2_10_PIN + #define DOGLCD_SCK EXP2_09_PIN - #define LCD_PINS_ENABLE PE9 - #define LCD_PINS_D4 PE10 + #define LCD_BACKLIGHT_PIN -1 + + #define FORCE_SOFT_SPI + + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. + + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN EXP1_05_PIN + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN EXP1_04_PIN + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN EXP1_03_PIN + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN EXP1_05_PIN + #endif + #endif // !FYSETC_MINI_12864 #if IS_ULTIPANEL - #define LCD_PINS_D5 PE11 - #define LCD_PINS_D6 PE12 - #define LCD_PINS_D7 PE13 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif #endif - #endif // Alter timing for graphical display - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) - #endif + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h new file mode 100644 index 000000000000..eb0c3bdbb92a --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_BTT_E3_RRF.h @@ -0,0 +1,379 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if NOT_TARGET(STM32F4) + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "BTT E3 RRF" +#endif + +// Add-on board for IDEX conversion +//#define BTT_E3_RRF_IDEX_BOARD + +// Onboard I2C EEPROM +#define I2C_EEPROM +#define MARLIN_EEPROM_SIZE 0x1000 // 4KB + +// +// Servos +// +#define SERVO0_PIN PB0 // SERVOS + +// +// Limit Switches +// +#define X_STOP_PIN PC0 // X-STOP +#define Y_STOP_PIN PC1 // Y-STOP +#define Z_STOP_PIN PC2 // Z-STOP + +#if ENABLED(BTT_E3_RRF_IDEX_BOARD) + #if X2_USE_ENDSTOP == _XMAX_ + #define X_MAX_PIN FPC2_PIN // X2-STOP + #elif X2_USE_ENDSTOP == _XMIN_ + #define X_MIN_PIN FPC2_PIN // X2-STOP + #endif +#endif + +// +// Z Probe must be this pin +// +#define Z_MIN_PROBE_PIN PC5 // PROBE + +// +// Filament Runout Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PC3 // E0-STOP +#endif + +#if !defined(FIL1_RUNOUT2_PIN) && ENABLED(BTT_E3_RRF_IDEX_BOARD) + #define FIL_RUNOUT2_PIN FPC3_PIN // E1-STOP +#endif + +// +// Power-loss Detection +// +#ifndef POWER_LOSS_PIN + #define POWER_LOSS_PIN PE0 // Power Loss Detection: PWR-DET +#endif + +// +// Steppers +// +#define X_ENABLE_PIN PD7 +#define X_STEP_PIN PD5 +#define X_DIR_PIN PD4 + +#define Y_ENABLE_PIN PD3 +#define Y_STEP_PIN PD0 +#define Y_DIR_PIN PA15 + +#define Z_ENABLE_PIN PD14 +#define Z_STEP_PIN PC6 +#define Z_DIR_PIN PC7 + +#define E0_ENABLE_PIN PD10 +#define E0_STEP_PIN PD12 +#define E0_DIR_PIN PD13 + +#if ENABLED(BTT_E3_RRF_IDEX_BOARD) + #define E1_ENABLE_PIN FPC7_PIN // E1EN + #define E1_STEP_PIN FPC5_PIN // E1STP + #define E1_DIR_PIN FPC4_PIN // E1DIR + + #define X2_ENABLE_PIN FPC13_PIN // X2EN + #define X2_STEP_PIN FPC11_PIN // X2STP + #define X2_DIR_PIN FPC10_PIN // X2DIR +#endif + +/** + * TMC2208/TMC2209 stepper drivers + */ +#if HAS_TMC_UART + #define X_SERIAL_TX_PIN PD6 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PD1 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PD15 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PD11 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #if ENABLED(BTT_E3_RRF_IDEX_BOARD) + #define X2_SERIAL_TX_PIN FPC12_PIN // X2UART + #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN FPC6_PIN // E1UART + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + #endif + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// Temperature Sensors +// +#define TEMP_BED_PIN PA1 // Analog Input "TB" +#define TEMP_0_PIN PA0 // Analog Input "TH0" + +#if ENABLED(BTT_E3_RRF_IDEX_BOARD) + #define TEMP_1_PIN FPC9_PIN // Analog Input "TH1" + #define PT100_PIN FPC8_PIN // Analog Input "PT100" (INA826) +#endif + +// +// Heaters / Fans +// +#define HEATER_BED_PIN PB4 // "HB" +#define HEATER_0_PIN PB3 // "HE0" + +#if ENABLED(BTT_E3_RRF_IDEX_BOARD) + #define HEATER_1_PIN FPC16_PIN // "HE1" +#endif + +#define FAN_PIN PB5 // "FAN0" + +#ifndef CONTROLLER_FAN_PIN + #define CONTROLLER_FAN_PIN PB6 // "FAN1" +#endif + +#if ENABLED(BTT_E3_RRF_IDEX_BOARD) + #define FAN1_PIN FPC15_PIN // "FAN0" in IDEX board + #define FAN2_PIN FPC14_PIN // "FAN1" in IDEX board +#else + //#define FAN1_PIN PB6 // "FAN1" +#endif + +// +// Misc. Functions +// +#ifndef NEOPIXEL_PIN + #define NEOPIXEL_PIN PB7 // LED driving pin +#endif + +#ifndef PS_ON_PIN + #define PS_ON_PIN PE1 // Power Supply Control +#endif + +/** + * BTT E3 RRF + * ----- + * 5V | 1 2 | GND + * (LCD_EN) PE11 | 3 4 | PB1 (LCD_RS) + * (LCD_D4) PE10 | 5 6 PB2 (BTN_EN2) + * RESET | 7 8 | PE7 (BTN_EN1) + * (BTN_ENC) PE9 | 9 10| PE8 (BEEPER) + * ----- + * EXP1 + */ + +#if HAS_WIRED_LCD + + #if ENABLED(CR10_STOCKDISPLAY) + + #define BEEPER_PIN PE8 + #define BTN_ENC PE9 + + #define BTN_EN1 PE7 + #define BTN_EN2 PB2 + + #define LCD_PINS_RS PB1 + #define LCD_PINS_ENABLE PE11 + #define LCD_PINS_D4 PE10 + + #elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD! + + #error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue." + + #define LCD_PINS_RS PE10 + #define LCD_PINS_ENABLE PE9 + #define LCD_PINS_D4 PB1 + #define LCD_PINS_D5 PB2 + #define LCD_PINS_D6 PE7 + #define LCD_PINS_D7 PE8 + #define ADC_KEYPAD_PIN PB0 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD! + + #elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY) + + #define BTN_ENC PE9 + #define BTN_EN1 PE7 + #define BTN_EN2 PB2 + + #define DOGLCD_CS PB1 + #define DOGLCD_A0 PE10 + #define DOGLCD_SCK PE8 + #define DOGLCD_MOSI PE11 + + #define FORCE_SOFT_SPI + #define LCD_BACKLIGHT_PIN -1 + + #elif IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + + #error "CAUTION! TFTGLCD_PANEL_SPI requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue." + + /** + * TFTGLCD_PANEL_SPI display pinout + * + * Board Display + * ----- ----- + * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) + * (FREE) PE11 | 3 4 | PB1 (LCD_CS) (PE7) LCD_CS | 3 4 | SD_CS (PB2) + * (FREE) PE10 | 5 6 | PB2 (SD_CS) (FREE) | 5 6 | MOSI (SPI1-MOSI) + * RESET | 7 8 | PE7 (MOD_RESET) (PE8) SD_DET | 7 8 | (FREE) + * (BEEPER) PE9 | 9 10| PE8 (SD_DET) GND | 9 10| 5V + * ----- ----- + * EXP1 EXP1 + * + * Needs custom cable: + * + * Board Adapter Display + * _________ + * EXP1-1 ----------- EXP1-10 + * EXP1-2 ----------- EXP1-9 + * SPI1-4 ----------- EXP1-6 + * EXP1-4 ----------- FREE + * SPI1-3 ----------- EXP1-2 + * EXP1-6 ----------- EXP1-4 + * EXP1-7 ----------- FREE + * EXP1-8 ----------- EXP1-3 + * SPI1-1 ----------- EXP1-1 + * EXP1-10 ----------- EXP1-7 + */ + + #define TFTGLCD_CS PE7 + + #endif + + #else + #error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, ENDER2_STOCKDISPLAY, MKS_MINI_12864, and TFTGLCD_PANEL_(SPI|I2C) are currently supported on the BTT_E3_RRF." + #endif + + // Alter timing for graphical display + #if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 + #endif + +#endif // HAS_WIRED_LCD + +#if BOTH(TOUCH_UI_FTDI_EVE, LCD_FYSETC_TFT81050) + + #error "CAUTION! LCD_FYSETC_TFT81050 requires wiring modifications. See 'pins_BTT_E3_RRF.h' for details. Comment out this line to continue." + + /** FYSETC TFT TFT81050 display pinout + * + * Board Display + * ----- ----- + * 5V | 1 2 | GND (SPI1-MISO) MISO | 1 2 | SCK (SPI1-SCK) + * (FREE) PE11 | 3 4 | PB1 (LCD_CS) (PE7) MOD_RESET | 3 4 | SD_CS (PB2) + * (FREE) PE10 | 5 6 | PB2 (SD_CS) (PB1) LCD_CS | 5 6 | MOSI (SPI1-MOSI) + * RESET | 7 8 | PE7 (MOD_RESET) (PE8) SD_DET | 7 8 | RESET + * (BEEPER) PE9 | 9 10| PE8 (SD_DET) GND | 9 10| 5V + * ----- ----- + * EXP1 EXP1 + * + * Needs custom cable: + * + * Board Adapter Display + * _________ + * EXP1-1 ----------- EXP1-10 + * EXP1-2 ----------- EXP1-9 + * SPI1-4 ----------- EXP1-6 + * EXP1-4 ----------- EXP1-5 + * SPI1-3 ----------- EXP1-2 + * EXP1-6 ----------- EXP1-4 + * EXP1-7 ----------- EXP1-8 + * EXP1-8 ----------- EXP1-3 + * SPI1-1 ----------- EXP1-1 + * EXP1-10 ----------- EXP1-7 + */ + + #define CLCD_SPI_BUS 1 // SPI1 connector + + #define BEEPER_PIN PE9 + + #define CLCD_MOD_RESET PE7 + #define CLCD_SPI_CS PB1 + +#endif // TOUCH_UI_FTDI_EVE && LCD_FYSETC_TFT81050 + +// +// SD Support +// + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(ONBOARD) + #define SDIO_SUPPORT // Use SDIO for onboard SD + #define SDIO_D0_PIN PC8 + #define SDIO_D1_PIN PC9 + #define SDIO_D2_PIN PC10 + #define SDIO_D3_PIN PC11 + #define SDIO_CK_PIN PC12 + #define SDIO_CMD_PIN PD2 + + //#define SDIO_CLOCK 48000000 + #define SD_DETECT_PIN PC4 +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "SD CUSTOM_CABLE is not compatible with BTT E3 RRF." +#endif + +// +// WIFI +// + +#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this +#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 +#define ESP_WIFI_MODULE_RESET_PIN PA4 +#define ESP_WIFI_MODULE_ENABLE_PIN PA5 +#define ESP_WIFI_MODULE_GPIO0_PIN PA6 + +#if ENABLED(BTT_E3_RRF_IDEX_BOARD) + #define FPC2_PIN PB11 + #define FPC3_PIN PB10 + #define FPC4_PIN PE12 + #define FPC5_PIN PE13 + #define FPC6_PIN PE14 + #define FPC7_PIN PE15 + #define FPC8_PIN PA3 + #define FPC9_PIN PA2 + #define FPC10_PIN PA8 + #define FPC11_PIN PC15 + #define FPC12_PIN PC14 + #define FPC13_PIN PC13 + #define FPC14_PIN PE6 + #define FPC15_PIN PE5 + #define FPC16_PIN PE4 + #define FPC17_PIN PE3 +#endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h index cd9d60d2f016..95f74efe8498 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_GTR_V1_0.h @@ -21,12 +21,12 @@ */ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#include "env_validate.h" + +#if E_STEPPERS > MAX_E_STEPPERS + #error "Marlin extruder/hotends limit! Increase MAX_E_STEPPERS to continue." #elif HOTENDS > 8 || E_STEPPERS > 8 #error "BIGTREE GTR V1.0 supports up to 8 hotends / E-steppers." -#elif HOTENDS > MAX_E_STEPPERS || E_STEPPERS > MAX_E_STEPPERS - #error "Marlin extruder/hotends limit! Increase MAX_E_STEPPERS to continue." #endif #define BOARD_INFO_NAME "BTT GTR V1.0" @@ -38,17 +38,21 @@ // USB Flash Drive support #define HAS_OTG_USB_HOST_SUPPORT -#define TP // Enable to define servo and probe pins #define M5_EXTENDER // The M5 extender is attached // // Servos // -#if ENABLED(TP) - #define SERVO0_PIN PB11 -#endif +#define SERVO0_PIN PB11 // BLTOUCH +#define SOL0_PIN PC7 // Toolchanger -#define PS_ON_PIN PH6 +#if ENABLED(TOOL_SENSOR) + #define TOOL_SENSOR1_PIN PH6 + #define TOOL_SENSOR2_PIN PI4 + //#define TOOL_SENSOR3_PIN PF4 +#else + #define PS_ON_PIN PH6 +#endif // // Trinamic Stallguard pins @@ -65,7 +69,7 @@ // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN - #if X_HOME_DIR < 0 + #if X_HOME_TO_MIN #define X_MAX_PIN E0_DIAG_PIN // X+ #else #define X_MIN_PIN E0_DIAG_PIN // X+ @@ -77,7 +81,7 @@ #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN - #if Y_HOME_DIR < 0 + #if Y_HOME_TO_MIN #define Y_MAX_PIN E1_DIAG_PIN // Y+ #else #define Y_MIN_PIN E1_DIAG_PIN // Y+ @@ -89,7 +93,7 @@ #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN - #if Z_HOME_DIR < 0 + #if Z_HOME_TO_MIN #define Z_MAX_PIN E2_DIAG_PIN // Z+ #else #define Z_MIN_PIN E2_DIAG_PIN // Z+ @@ -110,7 +114,7 @@ #define Z4_STOP_PIN PF6 // M5 M3_STOP #endif -#if ENABLED(TP) && !defined(Z_MIN_PROBE_PIN) +#ifndef Z_MIN_PROBE_PIN #define Z_MIN_PROBE_PIN PH11 // Z Probe must be PH11 #endif @@ -235,42 +239,39 @@ //#define E6_HARDWARE_SERIAL Serial1 // M5 MOTOR 4 //#define E7_HARDWARE_SERIAL Serial1 // M5 MOTOR 5 - // - // Software serial - // #define X_SERIAL_TX_PIN PC14 - #define X_SERIAL_RX_PIN PC14 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE1 - #define Y_SERIAL_RX_PIN PE1 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PB5 - #define Z_SERIAL_RX_PIN PB5 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PG10 - #define E0_SERIAL_RX_PIN PG10 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD4 - #define E1_SERIAL_RX_PIN PD4 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PC12 - #define E2_SERIAL_RX_PIN PC12 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #if ENABLED(M5_EXTENDER) #define E3_SERIAL_TX_PIN PG4 - #define E3_SERIAL_RX_PIN PG4 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E4_SERIAL_TX_PIN PE15 - #define E4_SERIAL_RX_PIN PE15 + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #define E5_SERIAL_TX_PIN PE7 - #define E5_SERIAL_RX_PIN PE7 + #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #define E6_SERIAL_TX_PIN PF15 - #define E6_SERIAL_RX_PIN PF15 + #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN #define E7_SERIAL_TX_PIN PH14 - #define E7_SERIAL_RX_PIN PH14 + #define E7_SERIAL_RX_PIN E7_SERIAL_TX_PIN #endif // Reduce baud rate to improve software serial reliability @@ -294,19 +295,19 @@ #define TEMP_BED_PIN PC0 // T0 <-> Bed -// SPI for Max6675 or Max31855 Thermocouple +// SPI for MAX Thermocouple // Uses a separate SPI bus -// If you have a two-way thermocouple, you can customize two THERMO_CSx_PIN pins (x:1~2) +// If you have a two-way thermocouple, you can customize two TEMP_x_CS_PIN pins (x:0~1) -#define THERMO_SCK_PIN PI1 // SCK -#define THERMO_DO_PIN PI2 // MISO -#define THERMO_CS1_PIN PH9 // GTR K-TEMP -#define THERMO_CS2_PIN PH2 // M5 K-TEMP +#define TEMP_0_CS_PIN PH9 // GTR K-TEMP +#define TEMP_0_SCK_PIN PI1 // SCK +#define TEMP_0_MISO_PIN PI2 // MISO +//#define TEMP_0_MOSI_PIN ... // For MAX31865 -#define MAX6675_SS_PIN THERMO_CS1_PIN -#define MAX6675_SS2_PIN THERMO_CS2_PIN -#define MAX6675_SCK_PIN THERMO_SCK_PIN -#define MAX6675_DO_PIN THERMO_DO_PIN +#define TEMP_1_CS_PIN PH2 // M5 K-TEMP +#define TEMP_1_SCK_PIN TEMP_0_SCK_PIN +#define TEMP_1_MISO_PIN TEMP_0_MISO_PIN +//#define TEMP_1_MOSI_PIN TEMP_0_MOSI_PIN // // Heaters / Fans @@ -338,7 +339,7 @@ #endif #ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION ONBOARD + #define SDCARD_CONNECTION ONBOARD #endif // @@ -348,13 +349,11 @@ // #if SD_CONNECTION_IS(LCD) - #define SD_DETECT_PIN PB10 - #define SDSS PB12 + #define SD_DETECT_PIN EXP2_04_PIN + #define SDSS EXP2_07_PIN #elif SD_CONNECTION_IS(ONBOARD) - // Instruct the STM32 HAL to override the default SPI pins from the variant.h file - #define CUSTOM_SPI_PINS #define SDSS PA4 #define SD_SS_PIN SDSS #define SD_SCK_PIN PA5 @@ -367,85 +366,113 @@ #endif /** - * ----- ----- - * NC | · · | GND 5V | · · | GND - * RESET | · · | PB10(SD_DETECT) (LCD_D7) PG5 | · · | PG6 (LCD_D6) - * (MOSI)PB15 | · · | PH10(BTN_EN2) (LCD_D5) PG7 | · · | PG8 (LCD_D4) - * (SD_SS)PB12 | · · | PD10(BTN_EN1) (LCD_RS) PA8 | · · | PC10 (LCD_EN) - * (SCK)PB13 | · · | PB14(MISO) (BTN_ENC) PA15 | · · | PC11 (BEEPER) - * ----- ----- - * EXP2 EXP1 + * ------ ------ + * NC | 1 2 | GND 5V | 1 2 | GND + * RESET | 3 4 | PB10 (SD_DETECT) (LCD_D7) PG5 | 3 4 | PG6 (LCD_D6) + * (MOSI) PB15 | 5 6 | PH10 (BTN_EN2) (LCD_D5) PG7 | 5 6 | PG8 (LCD_D4) + * (SD_SS) PB12 | 7 8 | PD10 (BTN_EN1) (LCD_RS) PA8 | 7 8 | PC10 (LCD_EN) + * (SCK) PB13 | 9 10 | PB14 (MISO) (BTN_ENC) PA15 | 9 10 | PC11 (BEEPER) + * ------ ------ + * EXP2 EXP1 */ +#define EXP1_03_PIN PG5 +#define EXP1_04_PIN PG6 +#define EXP1_05_PIN PG7 +#define EXP1_06_PIN PG8 +#define EXP1_07_PIN PA8 +#define EXP1_08_PIN PC10 +#define EXP1_09_PIN PA15 +#define EXP1_10_PIN PC11 + +#define EXP2_04_PIN PB10 +#define EXP2_05_PIN PB15 +#define EXP2_06_PIN PH10 +#define EXP2_07_PIN PB12 +#define EXP2_08_PIN PD10 +#define EXP2_09_PIN PB13 +#define EXP2_10_PIN PB14 // // LCDs and Controllers // -#if HAS_WIRED_LCD - #define BEEPER_PIN PC11 - #define BTN_ENC PA15 +#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) + + #define TFT_CS_PIN EXP2_07_PIN + #define TFT_A0_PIN EXP2_04_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + + #define TOUCH_INT_PIN EXP1_04_PIN + #define TOUCH_MISO_PIN EXP1_05_PIN + #define TOUCH_MOSI_PIN EXP1_08_PIN + #define TOUCH_SCK_PIN EXP1_06_PIN + #define TOUCH_CS_PIN EXP1_07_PIN + #define BTN_ENC EXP1_09_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + +#elif HAS_WIRED_LCD + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS PG6 - - #define BTN_EN1 PC10 - #define BTN_EN2 PG8 + #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE PG5 - #define LCD_PINS_D4 PG7 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #elif ENABLED(MKS_MINI_12864) - #define DOGLCD_A0 PG6 - #define DOGLCD_CS PG7 - #define BTN_EN1 PD10 - #define BTN_EN2 PH10 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #if SD_CONNECTION_IS(ONBOARD) #define SOFTWARE_SPI #endif #else - #define LCD_PINS_RS PA8 + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 PD10 - #define BTN_EN2 PH10 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_PINS_ENABLE PC10 - #define LCD_PINS_D4 PG8 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS PC10 - #define DOGLCD_A0 PA8 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN #if SD_CONNECTION_IS(ONBOARD) #define SOFTWARE_SPI #endif //#define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN PG8 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN PG7 + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN PG6 + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN PG5 + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN PG7 + #define NEOPIXEL_PIN EXP1_05_PIN #endif #endif // !FYSETC_MINI_12864 #if IS_ULTIPANEL - #define LCD_PINS_D5 PG7 - #define LCD_PINS_D6 PG6 - #define LCD_PINS_D7 PG5 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -456,16 +483,10 @@ #endif // Alter timing for graphical display - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) - #endif + #if IS_U8GLIB_ST7920 + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 90 + #define BOARD_ST7920_DELAY_3 600 #endif #endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h new file mode 100644 index 000000000000..a93ed68201b0 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_PRO_V1_0.h @@ -0,0 +1,39 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define BOARD_INFO_NAME "BTT OCTOPUS PRO V1.0" + +// +// Temperature Sensors +// +#if TEMP_SENSOR_0 == -5 + #define TEMP_0_CS_PIN PF8 // Max31865 CS + #define TEMP_0_SCK_PIN PA5 + #define TEMP_0_MISO_PIN PA6 + #define TEMP_0_MOSI_PIN PA7 + #define SOFTWARE_SPI // Max31865 and LCD SD share a set of SPIs, Set SD to softwareSPI for Max31865 +#else + #define TEMP_0_PIN PF4 // TH0 +#endif + +#include "pins_BTT_OCTOPUS_V1_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h new file mode 100644 index 000000000000..c2f02d0d8ef9 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_0.h @@ -0,0 +1,35 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define BOARD_INFO_NAME "BTT OCTOPUS V1.0" + +// +// Temperature Sensors +// +#if TEMP_SENSOR_0 == 20 + #define TEMP_0_PIN PF8 // PT100 Connector +#else + #define TEMP_0_PIN PF4 // TH0 +#endif + +#include "pins_BTT_OCTOPUS_V1_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h new file mode 100644 index 000000000000..daa0e8fbfde6 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_1.h @@ -0,0 +1,35 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define BOARD_INFO_NAME "BTT OCTOPUS V1.1" + +// +// Temperature Sensors +// +#if TEMP_SENSOR_0 == 20 + #define TEMP_0_PIN PF8 // PT100 Connector +#else + #define TEMP_0_PIN PF4 // TH0 +#endif + +#include "pins_BTT_OCTOPUS_V1_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h new file mode 100644 index 000000000000..943dda734524 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -0,0 +1,549 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +// Onboard I2C EEPROM +#define I2C_EEPROM +#define MARLIN_EEPROM_SIZE 0x8000 // 32KB (24C32A) +#define I2C_SCL_PIN PB8 +#define I2C_SDA_PIN PB9 + +// USB Flash Drive support +#define HAS_OTG_USB_HOST_SUPPORT + +// Avoid conflict with TIMER_TONE +#define STEP_TIMER 10 + +// +// Servos +// +#define SERVO0_PIN PB6 + +// +// Misc. Functions +// +#define LED_PIN PA13 + +// +// Trinamic Stallguard pins +// +#define X_DIAG_PIN PG6 // X-STOP +#define Y_DIAG_PIN PG9 // Y-STOP +#define Z_DIAG_PIN PG10 // Z-STOP +#define Z2_DIAG_PIN PG11 // Z2-STOP +#define E0_DIAG_PIN PG12 // E0DET +#define E1_DIAG_PIN PG13 // E1DET +#define E2_DIAG_PIN PG14 // E2DET +#define E3_DIAG_PIN PG15 // E3DET + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #if ENABLED(BLTOUCH) + #define Z_MIN_PROBE_PIN PB7 + #else + #define Z_MIN_PROBE_PIN PC5 // Probe (Proximity switch) port + #endif +#endif + +// +// Check for additional used endstop pins +// +#if HAS_EXTRA_ENDSTOPS + #define _ENDSTOP_IS_ANY(ES) X2_USE_ENDSTOP == ES || Y2_USE_ENDSTOP == ES || Z2_USE_ENDSTOP == ES || Z3_USE_ENDSTOP == ES || Z4_USE_ENDSTOP == ES + #if _ENDSTOP_IS_ANY(_XMIN_) || _ENDSTOP_IS_ANY(_XMAX_) + #define NEEDS_X_MINMAX 1 + #endif + #if _ENDSTOP_IS_ANY(_YMIN_) || _ENDSTOP_IS_ANY(_YMAX_) + #define NEEDS_Y_MINMAX 1 + #endif + #if _ENDSTOP_IS_ANY(_ZMIN_) || _ENDSTOP_IS_ANY(_ZMAX_) + #define NEEDS_Z_MINMAX 1 + #endif + #undef _ENDSTOP_IS_ANY +#endif + +// +// Limit Switches +// +#ifdef X_STALL_SENSITIVITY + #define X_STOP_PIN X_DIAG_PIN + #if X_HOME_TO_MIN + #define X_MAX_PIN E0_DIAG_PIN // E0DET + #else + #define X_MIN_PIN E0_DIAG_PIN // E0DET + #endif +#elif EITHER(DUAL_X_CARRIAGE, NEEDS_X_MINMAX) + #ifndef X_MIN_PIN + #define X_MIN_PIN X_DIAG_PIN // X-STOP + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN E0_DIAG_PIN // E0DET + #endif +#else + #define X_STOP_PIN X_DIAG_PIN // X-STOP +#endif + +#ifdef Y_STALL_SENSITIVITY + #define Y_STOP_PIN Y_DIAG_PIN + #if Y_HOME_TO_MIN + #define Y_MAX_PIN E1_DIAG_PIN // E1DET + #else + #define Y_MIN_PIN E1_DIAG_PIN // E1DET + #endif +#elif NEEDS_Y_MINMAX + #ifndef Y_MIN_PIN + #define Y_MIN_PIN Y_DIAG_PIN // Y-STOP + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN E1_DIAG_PIN // E1DET + #endif +#else + #define Y_STOP_PIN Y_DIAG_PIN // Y-STOP +#endif + +#ifdef Z_STALL_SENSITIVITY + #define Z_STOP_PIN Z_DIAG_PIN + #if Z_HOME_TO_MIN + #define Z_MAX_PIN E2_DIAG_PIN // PWRDET + #else + #define Z_MIN_PIN E2_DIAG_PIN // PWRDET + #endif +#elif NEEDS_Z_MINMAX + #ifndef Z_MIN_PIN + #define Z_MIN_PIN Z_DIAG_PIN // Z-STOP + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN E2_DIAG_PIN // PWRDET + #endif +#else + #define Z_STOP_PIN Z_DIAG_PIN // Z-STOP +#endif + +#undef NEEDS_X_MINMAX +#undef NEEDS_Y_MINMAX +#undef NEEDS_Z_MINMAX + +// +// Filament Runout Sensor +// +#define FIL_RUNOUT_PIN PG12 // E0DET +#define FIL_RUNOUT2_PIN PG13 // E1DET +#define FIL_RUNOUT3_PIN PG14 // E2DET +#define FIL_RUNOUT4_PIN PG15 // E3DET + +// +// Power Supply Control +// +#ifndef PS_ON_PIN + #define PS_ON_PIN PE11 // PS-ON +#endif + +// +// Power Loss Detection +// +#ifndef POWER_LOSS_PIN + #define POWER_LOSS_PIN PC0 // PWRDET +#endif + +// +// NeoPixel LED +// +#ifndef NEOPIXEL_PIN + #define NEOPIXEL_PIN PB0 +#endif + +// +// Steppers +// +#define X_STEP_PIN PF13 // MOTOR 0 +#define X_DIR_PIN PF12 +#define X_ENABLE_PIN PF14 +#ifndef X_CS_PIN + #define X_CS_PIN PC4 +#endif + +#define Y_STEP_PIN PG0 // MOTOR 1 +#define Y_DIR_PIN PG1 +#define Y_ENABLE_PIN PF15 +#ifndef Y_CS_PIN + #define Y_CS_PIN PD11 +#endif + +#define Z_STEP_PIN PF11 // MOTOR 2 +#define Z_DIR_PIN PG3 +#define Z_ENABLE_PIN PG5 +#ifndef Z_CS_PIN + #define Z_CS_PIN PC6 +#endif + +#define Z2_STEP_PIN PG4 // MOTOR 3 +#define Z2_DIR_PIN PC1 +#define Z2_ENABLE_PIN PA0 +#ifndef Z2_CS_PIN + #define Z2_CS_PIN PC7 +#endif + +#define E0_STEP_PIN PF9 // MOTOR 4 +#define E0_DIR_PIN PF10 +#define E0_ENABLE_PIN PG2 +#ifndef E0_CS_PIN + #define E0_CS_PIN PF2 +#endif + +#define E1_STEP_PIN PC13 // MOTOR 5 +#define E1_DIR_PIN PF0 +#define E1_ENABLE_PIN PF1 +#ifndef E1_CS_PIN + #define E1_CS_PIN PE4 +#endif + +#define E2_STEP_PIN PE2 // MOTOR 6 +#define E2_DIR_PIN PE3 +#define E2_ENABLE_PIN PD4 +#ifndef E2_CS_PIN + + #define E2_CS_PIN PE1 +#endif + +#define E3_STEP_PIN PE6 // MOTOR 7 +#define E3_DIR_PIN PA14 +#define E3_ENABLE_PIN PE0 +#ifndef E3_CS_PIN + #define E3_CS_PIN PD3 +#endif + +// +// Temperature Sensors +// +#define TEMP_BED_PIN PF3 // TB +#define TEMP_1_PIN PF5 // TH1 +#define TEMP_2_PIN PF6 // TH2 +#define TEMP_3_PIN PF7 // TH3 + +// +// Heaters / Fans +// +#define HEATER_BED_PIN PA1 // Hotbed +#define HEATER_0_PIN PA2 // Heater0 +#define HEATER_1_PIN PA3 // Heater1 +#define HEATER_2_PIN PB10 // Heater2 +#define HEATER_3_PIN PB11 // Heater3 + +#define FAN_PIN PA8 // Fan0 +#define FAN1_PIN PE5 // Fan1 +#define FAN2_PIN PD12 // Fan2 +#define FAN3_PIN PD13 // Fan3 +#define FAN4_PIN PD14 // Fan4 +#define FAN5_PIN PD15 // Fan5 + +// +// SD Support +// +#ifndef SDCARD_CONNECTION + #if HAS_WIRED_LCD + #define SDCARD_CONNECTION LCD + #else + #define SDCARD_CONNECTION ONBOARD + #endif +#endif + +// +// Software SPI pins for TMC2130 stepper drivers +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI PA7 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO PA6 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK PA5 + #endif +#endif + +#if HAS_TMC_UART + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + //#define X_HARDWARE_SERIAL Serial1 + //#define X2_HARDWARE_SERIAL Serial1 + //#define Y_HARDWARE_SERIAL Serial1 + //#define Y2_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define Z2_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + //#define E1_HARDWARE_SERIAL Serial1 + //#define E2_HARDWARE_SERIAL Serial1 + //#define E3_HARDWARE_SERIAL Serial1 + //#define E4_HARDWARE_SERIAL Serial1 + + #define X_SERIAL_TX_PIN PC4 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PD11 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PC6 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define Z2_SERIAL_TX_PIN PC7 + #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PF2 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PE4 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + #define E2_SERIAL_TX_PIN PE1 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN + + #define E3_SERIAL_TX_PIN PD3 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +/** ------ ------ + * (BEEPER) PE8 |10 9 | PE7 (BTN_ENC) (MISO) PA6 |10 9 | PA5 (SCK) + * (LCD_EN) PE9 | 8 7 | PE10 (LCD_RS) (BTN_EN1) PB2 | 8 7 | PA4 (SD_SS) + * (LCD_D4) PE12 6 5 | PE13 (LCD_D5) (BTN_EN2) PB1 6 5 | PA7 (MOSI) + * (LCD_D6) PE14 | 4 3 | PE15 (LCD_D7) (SD_DETECT) PC15 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PE15 +#define EXP1_04_PIN PE14 +#define EXP1_05_PIN PE13 +#define EXP1_06_PIN PE12 +#define EXP1_07_PIN PE10 +#define EXP1_08_PIN PE9 +#define EXP1_09_PIN PE7 +#define EXP1_10_PIN PE8 + +#define EXP2_03_PIN -1 +#define EXP2_04_PIN PC15 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PB2 +#define EXP2_07_PIN PA4 +#define EXP2_08_PIN PB1 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + +// +// Onboard SD card +// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 +// +#if SD_CONNECTION_IS(ONBOARD) + #define SDIO_SUPPORT // Use SDIO for onboard SD + #ifndef SD_DETECT_STATE + #define SD_DETECT_STATE HIGH + #elif SD_DETECT_STATE == LOW + #error "BOARD_BTT_OCTOPUS_V1_0 onboard SD requires SD_DETECT_STATE set to HIGH." + #endif + #define SD_DETECT_PIN PC14 +#elif SD_CONNECTION_IS(LCD) + + #define SDSS PA4 + #define SD_SS_PIN SDSS + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 + #define SD_DETECT_PIN PC15 + +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" +#endif + +#if ENABLED(BTT_MOTOR_EXPANSION) + /** + * ------ ------ + * NC | 1 2 | GND NC | 1 2 | GND + * NC | 3 4 | M1EN M2EN | 3 4 | M3EN + * M1STP | 5 6 M1DIR M1RX | 5 6 M1DIAG + * M2DIR | 7 8 | M2STP M2RX | 7 8 | M2DIAG + * M3DIR | 9 10 | M3STP M3RX | 9 10 | M3DIAG + * ------ ------ + * EXP2 EXP1 + */ + + // M1 on Driver Expansion Module + #define E4_STEP_PIN EXP2_05_PIN + #define E4_DIR_PIN EXP2_06_PIN + #define E4_ENABLE_PIN EXP2_04_PIN + #define E4_DIAG_PIN EXP1_06_PIN + #define E4_CS_PIN EXP1_05_PIN + #if HAS_TMC_UART + #define E4_SERIAL_TX_PIN EXP1_05_PIN + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN + #endif + + // M2 on Driver Expansion Module + #define E5_STEP_PIN EXP2_08_PIN + #define E5_DIR_PIN EXP2_07_PIN + #define E5_ENABLE_PIN EXP1_03_PIN + #define E5_DIAG_PIN EXP1_08_PIN + #define E5_CS_PIN EXP1_07_PIN + #if HAS_TMC_UART + #define E5_SERIAL_TX_PIN EXP1_07_PIN + #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN + #endif + + // M3 on Driver Expansion Module + #define E6_STEP_PIN EXP2_10_PIN + #define E6_DIR_PIN EXP2_09_PIN + #define E6_ENABLE_PIN EXP1_04_PIN + #define E6_DIAG_PIN EXP1_10_PIN + #define E6_CS_PIN EXP1_09_PIN + #if HAS_TMC_UART + #define E6_SERIAL_TX_PIN EXP1_09_PIN + #define E6_SERIAL_RX_PIN E6_SERIAL_TX_PIN + #endif + +#endif // BTT_MOTOR_EXPANSION + +// +// LCDs and Controllers +// +#if IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define TFTGLCD_CS EXP2_08_PIN + #endif + +#elif HAS_WIRED_LCD + + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN + + #if ENABLED(CR10_STOCKDISPLAY) + + #define LCD_PINS_RS EXP1_04_PIN + + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + + #else + + #define LCD_PINS_RS EXP1_07_PIN + + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + + #if ENABLED(FYSETC_MINI_12864) + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + //#define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN EXP1_05_PIN + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN EXP1_04_PIN + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN EXP1_03_PIN + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN EXP1_05_PIN + #endif + #endif // !FYSETC_MINI_12864 + + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + + #endif + + #endif +#endif // HAS_WIRED_LCD + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 120 + #define BOARD_ST7920_DELAY_2 80 + #define BOARD_ST7920_DELAY_3 580 +#endif + +#if HAS_SPI_TFT + #define TFT_CS_PIN EXP2_07_PIN + #define TFT_A0_PIN EXP2_04_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + + #define TOUCH_INT_PIN EXP1_04_PIN + #define TOUCH_MISO_PIN EXP1_05_PIN + #define TOUCH_MOSI_PIN EXP1_08_PIN + #define TOUCH_SCK_PIN EXP1_06_PIN + #define TOUCH_CS_PIN EXP1_07_PIN + + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + #define BTN_ENC EXP1_09_PIN +#endif + +// +// WIFI +// + +/** + * ------- + * GND | 9 | | 8 | 3.3V + * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) + * 3.3V | 11 | | 6 | PB14 (ESP-MISO) + * (ESP-IO0) PD7 | 12 | | 5 | PB13 (ESP-CLK) + * (ESP-IO4) PD10 | 13 | | 4 | NC + * NC | 14 | | 3 | PE15 (ESP-EN) + * (ESP-RX) PD8 | 15 | | 2 | NC + * (ESP-TX) PD9 | 16 | | 1 | PE14 (ESP-RST) + * ------- + * WIFI + */ +#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this +#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 +#define ESP_WIFI_MODULE_RESET_PIN PG7 +#define ESP_WIFI_MODULE_ENABLE_PIN PG8 +#define ESP_WIFI_MODULE_GPIO0_PIN PD7 +#define ESP_WIFI_MODULE_GPIO4_PIN PD10 diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h index 54153beb1e79..72154be2ee0a 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_PRO_common.h @@ -21,15 +21,18 @@ */ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#endif +#include "env_validate.h" -// BigTreeTech driver expansion module https://bit.ly/3ptRRoj +// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION +// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT //#define BTT_MOTOR_EXPANSION #if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) - #error "It's not possible to have both LCD and motor expansion module on EXP1/EXP2." + #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) + #define EXP_MOT_USE_EXP2_ONLY 1 + #else + #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." + #endif #endif // Use one of these or SDCard-based Emulation will be used @@ -68,7 +71,7 @@ // #ifdef X_STALL_SENSITIVITY #define X_STOP_PIN X_DIAG_PIN - #if X_HOME_DIR < 0 + #if X_HOME_TO_MIN #define X_MAX_PIN PE15 // E0 #else #define X_MIN_PIN PE15 // E0 @@ -80,7 +83,7 @@ #ifdef Y_STALL_SENSITIVITY #define Y_STOP_PIN Y_DIAG_PIN - #if Y_HOME_DIR < 0 + #if Y_HOME_TO_MIN #define Y_MAX_PIN PE10 // E1 #else #define Y_MIN_PIN PE10 // E1 @@ -92,7 +95,7 @@ #ifdef Z_STALL_SENSITIVITY #define Z_STOP_PIN Z_DIAG_PIN - #if Z_HOME_DIR < 0 + #if Z_HOME_TO_MIN #define Z_MAX_PIN PG5 // E2 #else #define Z_MIN_PIN PG5 // E2 @@ -135,7 +138,7 @@ #define Y_STEP_PIN PE11 #define Y_DIR_PIN PE8 #define Y_ENABLE_PIN PD7 - #ifndef Y_CS_PIN +#ifndef Y_CS_PIN #define Y_CS_PIN PB8 #endif @@ -201,26 +204,23 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PC13 - #define X_SERIAL_RX_PIN PC13 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN PE3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE1 - #define Z_SERIAL_RX_PIN PE1 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD4 - #define E0_SERIAL_RX_PIN PD4 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD1 - #define E1_SERIAL_RX_PIN PD1 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PD6 - #define E2_SERIAL_RX_PIN PD6 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -228,27 +228,81 @@ // // Temperature Sensors +// Use ADC pins without pullup for sensors that don't need a pullup. // -#define TEMP_0_PIN PF4 // T1 <-> E0 -#define TEMP_1_PIN PF5 // T2 <-> E1 -#define TEMP_2_PIN PF6 // T3 <-> E2 -#define TEMP_BED_PIN PF3 // T0 <-> Bed +#if TEMP_SENSOR_0_IS_AD8495 || TEMP_SENSOR_0 == 20 + #define TEMP_0_PIN PF8 +#else + #define TEMP_0_PIN PF4 // T1 <-> E0 +#endif +#if TEMP_SENSOR_1_IS_AD8495 || TEMP_SENSOR_1 == 20 + #define TEMP_1_PIN PF9 +#else + #define TEMP_1_PIN PF5 // T2 <-> E1 +#endif +#if TEMP_SENSOR_2_IS_AD8495 || TEMP_SENSOR_2 == 20 + #define TEMP_2_PIN PF10 +#else + #define TEMP_2_PIN PF6 // T3 <-> E2 +#endif +#if TEMP_SENSOR_BED_IS_AD8495 || TEMP_SENSOR_BED == 20 + #define TEMP_BED_PIN PF7 +#else + #define TEMP_BED_PIN PF3 // T0 <-> Bed +#endif + +#if TEMP_SENSOR_PROBE && !defined(TEMP_PROBE_PIN) + #if TEMP_SENSOR_PROBE_IS_AD8495 || TEMP_SENSOR_PROBE == 20 + #if HOTENDS == 2 + #define TEMP_PROBE_PIN PF10 + #elif HOTENDS < 2 + #define TEMP_PROBE_PIN PF9 + #endif + #else + #if HOTENDS == 2 + #define TEMP_PROBE_PIN TEMP_2_PIN + #elif HOTENDS < 2 + #define TEMP_PROBE_PIN TEMP_1_PIN + #endif + #endif +#endif + +#if TEMP_SENSOR_CHAMBER && !defined(TEMP_CHAMBER_PIN) + #if TEMP_SENSOR_CHAMBER_IS_AD8495 || TEMP_SENSOR_CHAMBER == 20 + #define TEMP_CHAMBER_PIN PF10 + #else + #define TEMP_CHAMBER_PIN TEMP_2_PIN + #endif +#endif // -// Heaters / Fans +// Heaters // #define HEATER_0_PIN PB1 // Heater0 #define HEATER_1_PIN PD14 // Heater1 -#define HEATER_2_PIN PB0 // Heater1 +#if TEMP_SENSOR_CHAMBER && HOTENDS < 3 + #define HEATER_CHAMBER_PIN PB0 // Heater2 +#else + #define HEATER_2_PIN PB0 // Heater2 +#endif #define HEATER_BED_PIN PD12 // Hotbed + +// +// Fans +// #define FAN_PIN PC8 // Fan0 #define FAN1_PIN PE5 // Fan1 -#define FAN2_PIN PE6 #ifndef E0_AUTO_FAN_PIN #define E0_AUTO_FAN_PIN FAN1_PIN #endif +#if !defined(CONTROLLER_FAN_PIN) && ENABLED(USE_CONTROLLER_FAN) && HOTENDS < 2 + #define CONTROLLER_FAN_PIN PE6 // Fan2 +#else + #define FAN2_PIN PE6 // Fan2 +#endif + // // Misc. Functions // @@ -257,34 +311,32 @@ #define SDCARD_CONNECTION LCD #endif -/** - * ----- ----- - * NC | 1 2 | GND 5V | 1 2 | GND - * RESET | 3 4 | PF12(SD_DETECT) (LCD_D7) PG7 | 3 4 | PG6 (LCD_D6) - * (MOSI)PB15 | 5 6 PF11(BTN_EN2) (LCD_D5) PG3 | 5 6 PG2 (LCD_D4) - * (SD_SS)PB12 | 7 8 | PG10(BTN_EN1) (LCD_RS) PD10 | 7 8 | PD11 (LCD_EN) - * (SCK)PB13 | 9 10| PB14(MISO) (BTN_ENC) PA8 | 9 10| PG4 (BEEPER) - * ----- ----- - * EXP2 EXP1 +/** ------ ------ + * (BEEPER) PG4 |10 9 | PA8 (BTN_ENC) (MISO) PB14 |10 9 | PB13 (SCK) + * (LCD_EN) PD11 | 8 7 | PD10 (LCD_RS) (BTN_EN1) PG10 | 8 7 | PB12 (SD_SS) + * (LCD_D4) PG2 6 5 | PG3 (LCD_D5) (BTN_EN2) PF11 6 5 | PB15 (MOSI) + * (LCD_D6) PG6 | 4 3 | PG7 (LCD_D7) (SD_DETECT) PF12 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 */ - -#define EXPA1_03_PIN PG7 -#define EXPA1_04_PIN PG6 -#define EXPA1_05_PIN PG3 -#define EXPA1_06_PIN PG2 -#define EXPA1_07_PIN PD10 -#define EXPA1_08_PIN PD11 -#define EXPA1_09_PIN PA8 -#define EXPA1_10_PIN PG4 - -#define EXPA2_03_PIN -1 -#define EXPA2_04_PIN PF12 -#define EXPA2_05_PIN PB15 -#define EXPA2_06_PIN PF11 -#define EXPA2_07_PIN PB12 -#define EXPA2_08_PIN PG10 -#define EXPA2_09_PIN PB13 -#define EXPA2_10_PIN PB14 +#define EXP1_03_PIN PG7 +#define EXP1_04_PIN PG6 +#define EXP1_05_PIN PG3 +#define EXP1_06_PIN PG2 +#define EXP1_07_PIN PD10 +#define EXP1_08_PIN PD11 +#define EXP1_09_PIN PA8 +#define EXP1_10_PIN PG4 + +#define EXP2_03_PIN -1 +#define EXP2_04_PIN PF12 +#define EXP2_05_PIN PB15 +#define EXP2_06_PIN PF11 +#define EXP2_07_PIN PB12 +#define EXP2_08_PIN PG10 +#define EXP2_09_PIN PB13 +#define EXP2_10_PIN PB14 // // Onboard SD card @@ -292,8 +344,8 @@ // #if SD_CONNECTION_IS(LCD) - #define SD_DETECT_PIN EXPA2_04_PIN - #define SDSS EXPA2_07_PIN + #define SD_DETECT_PIN EXP2_04_PIN + #define SDSS EXP2_07_PIN #elif SD_CONNECTION_IS(ONBOARD) @@ -313,48 +365,59 @@ #endif #if ENABLED(BTT_MOTOR_EXPANSION) - /** - * _____ _____ - * NC | · · | GND NC | · · | GND - * NC | · · | PF12 (M1EN) (M2EN) PG7 | · · | PG6 (M3EN) - * (M1STP) PB15 | · · PF11 (M1DIR) (M1RX) PG3 | · · PG2 (M1DIAG) - * (M2DIR) PB12 | · · | PG10 (M2STP) (M2RX) PD10 | · · | PD11 (M2DIAG) - * (M3DIR) PB13 | · · | PB14 (M3STP) (M3RX) PA8 | · · | PG4 (M3DIAG) - * ----- ----- - * EXP2 EXP1 + /** ----- ----- + * NC | . . | GND NC | . . | GND + * NC | . . | M1EN M2EN | . . | M3EN + * M1STP | . . M1DIR M1RX | . . M1DIAG + * M2DIR | . . | M2STP M2RX | . . | M2DIAG + * M3DIR | . . | M3STP M3RX | . . | M3DIAG + * ----- ----- + * EXP2 EXP1 + * + * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN */ // M1 on Driver Expansion Module - #define E3_STEP_PIN EXPA2_05_PIN - #define E3_DIR_PIN EXPA2_06_PIN - #define E3_ENABLE_PIN EXPA2_04_PIN - #define E3_DIAG_PIN EXPA1_06_PIN - #define E3_CS_PIN EXPA1_05_PIN - #if HAS_TMC_UART - #define E3_SERIAL_TX_PIN EXPA1_05_PIN - #define E3_SERIAL_RX_PIN EXPA1_05_PIN + #define E3_STEP_PIN EXP2_05_PIN + #define E3_DIR_PIN EXP2_06_PIN + #define E3_ENABLE_PIN EXP2_04_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E3_DIAG_PIN EXP1_06_PIN + #define E3_CS_PIN EXP1_05_PIN + #if HAS_TMC_UART + #define E3_SERIAL_TX_PIN EXP1_05_PIN + #define E3_SERIAL_RX_PIN EXP1_05_PIN + #endif #endif // M2 on Driver Expansion Module - #define E4_STEP_PIN EXPA2_08_PIN - #define E4_DIR_PIN EXPA2_07_PIN - #define E4_ENABLE_PIN EXPA1_03_PIN - #define E4_DIAG_PIN EXPA1_08_PIN - #define E4_CS_PIN EXPA1_07_PIN - #if HAS_TMC_UART - #define E4_SERIAL_TX_PIN EXPA1_07_PIN - #define E4_SERIAL_RX_PIN EXPA1_07_PIN + #define E4_STEP_PIN EXP2_08_PIN + #define E4_DIR_PIN EXP2_07_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E4_ENABLE_PIN EXP1_03_PIN + #define E4_DIAG_PIN EXP1_08_PIN + #define E4_CS_PIN EXP1_07_PIN + #if HAS_TMC_UART + #define E4_SERIAL_TX_PIN EXP1_07_PIN + #define E4_SERIAL_RX_PIN EXP1_07_PIN + #endif + #else + #define E4_ENABLE_PIN EXP2_04_PIN #endif // M3 on Driver Expansion Module - #define E5_STEP_PIN EXPA2_10_PIN - #define E5_DIR_PIN EXPA2_09_PIN - #define E5_ENABLE_PIN EXPA1_04_PIN - #define E5_DIAG_PIN EXPA1_10_PIN - #define E5_CS_PIN EXPA1_09_PIN - #if HAS_TMC_UART - #define E5_SERIAL_TX_PIN EXPA1_09_PIN - #define E5_SERIAL_RX_PIN EXPA1_09_PIN + #define E5_STEP_PIN EXP2_10_PIN + #define E5_DIR_PIN EXP2_09_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E5_ENABLE_PIN EXP1_04_PIN + #define E5_DIAG_PIN EXP1_10_PIN + #define E5_CS_PIN EXP1_09_PIN + #if HAS_TMC_UART + #define E5_SERIAL_TX_PIN EXP1_09_PIN + #define E5_SERIAL_RX_PIN EXP1_09_PIN + #endif + #else + #define E5_ENABLE_PIN EXP2_04_PIN #endif #endif // BTT_MOTOR_EXPANSION @@ -365,70 +428,65 @@ #if IS_TFTGLCD_PANEL #if ENABLED(TFTGLCD_PANEL_SPI) - #define TFTGLCD_CS EXPA2_08_PIN + #define TFTGLCD_CS EXP2_08_PIN #endif #elif HAS_WIRED_LCD - #define BEEPER_PIN EXPA1_10_PIN - #define BTN_ENC EXPA1_09_PIN + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXPA1_04_PIN - - #define BTN_EN1 EXPA1_08_PIN - #define BTN_EN2 EXPA1_06_PIN + #define LCD_PINS_RS EXP1_04_PIN - #define LCD_PINS_ENABLE EXPA1_03_PIN - #define LCD_PINS_D4 EXPA1_05_PIN + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #elif ENABLED(MKS_MINI_12864) - #define DOGLCD_A0 EXPA1_04_PIN - #define DOGLCD_CS EXPA1_05_PIN - #define BTN_EN1 EXPA2_08_PIN - #define BTN_EN2 EXPA2_06_PIN + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #else - #define LCD_PINS_RS EXPA1_07_PIN + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 EXPA2_08_PIN - #define BTN_EN2 EXPA2_06_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_PINS_ENABLE EXPA1_08_PIN - #define LCD_PINS_D4 EXPA1_06_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXPA1_08_PIN - #define DOGLCD_A0 EXPA1_07_PIN + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN //#define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXPA1_06_PIN // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXPA1_05_PIN + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXPA1_04_PIN + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXPA1_03_PIN + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXPA1_05_PIN + #define NEOPIXEL_PIN EXP1_05_PIN #endif #endif // !FYSETC_MINI_12864 #if IS_ULTIPANEL - #define LCD_PINS_D5 EXPA1_05_PIN - #define LCD_PINS_D6 EXPA1_04_PIN - #define LCD_PINS_D7 EXPA1_03_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -441,15 +499,15 @@ #endif // HAS_WIRED_LCD // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB +#if ENABLED(U8GLIB_ST7920) #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) + #define BOARD_ST7920_DELAY_1 125 #endif #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) + #define BOARD_ST7920_DELAY_2 90 #endif #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) + #define BOARD_ST7920_DELAY_3 600 #endif #endif diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_A.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_A.h new file mode 100644 index 000000000000..be9580ee6695 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_A.h @@ -0,0 +1,29 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define BOARD_INFO_NAME "BTT SKR V2 Rev.A" + +#error "SKR V2 Rev.A requires modification or drivers may be damaged. See https://bit.ly/3t5d9JQ for more information. Comment out this line to continue." +#define DISABLE_DRIVER_SAFE_POWER_PROTECT + +#include "pins_BTT_SKR_V2_0_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_B.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_B.h new file mode 100644 index 000000000000..b83f41b26ad0 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_REV_B.h @@ -0,0 +1,26 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define BOARD_INFO_NAME "BTT SKR V2 Rev.B" + +#include "pins_BTT_SKR_V2_0_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h new file mode 100644 index 000000000000..a05f4fb5b9ce --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h @@ -0,0 +1,526 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include "env_validate.h" + +// If you have the BigTreeTech driver expansion module, enable BTT_MOTOR_EXPANSION +// https://github.com/bigtreetech/BTT-Expansion-module/tree/master/BTT%20EXP-MOT +//#define BTT_MOTOR_EXPANSION + +#if BOTH(HAS_WIRED_LCD, BTT_MOTOR_EXPANSION) + #if EITHER(CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY) + #define EXP_MOT_USE_EXP2_ONLY 1 + #else + #error "You can't use both an LCD and a Motor Expansion Module on EXP1/EXP2 at the same time." + #endif +#endif + +// Use one of these or SDCard-based Emulation will be used +#if NO_EEPROM_SELECTED + //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation + #define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation +#endif + +#if ENABLED(FLASH_EEPROM_EMULATION) + // Decrease delays and flash wear by spreading writes across the + // 128 kB sector allocated for EEPROM emulation. + #define FLASH_EEPROM_LEVELING +#endif + +// USB Flash Drive support +#define HAS_OTG_USB_HOST_SUPPORT + +// Avoid conflict with TIMER_TONE +#define STEP_TIMER 10 + +// +// Servos +// +#define SERVO0_PIN PE5 + +// +// Trinamic Stallguard pins +// +#define X_DIAG_PIN PC1 // X-STOP +#define Y_DIAG_PIN PC3 // Y-STOP +#define Z_DIAG_PIN PC0 // Z-STOP +#define E0_DIAG_PIN PC2 // E0DET +#define E1_DIAG_PIN PA0 // E1DET + +// +// Limit Switches +// +#ifdef X_STALL_SENSITIVITY + #define X_STOP_PIN X_DIAG_PIN + #if X_HOME_TO_MIN + #define X_MAX_PIN PC2 // E0DET + #else + #define X_MIN_PIN PC2 // E0DET + #endif +#elif ENABLED(X_DUAL_ENDSTOPS) + #ifndef X_MIN_PIN + #define X_MIN_PIN PC1 // X-STOP + #endif + #ifndef X_MAX_PIN + #define X_MAX_PIN PC2 // E0DET + #endif +#else + #define X_STOP_PIN PC1 // X-STOP +#endif + +#ifdef Y_STALL_SENSITIVITY + #define Y_STOP_PIN Y_DIAG_PIN + #if Y_HOME_TO_MIN + #define Y_MAX_PIN PA0 // E1DET + #else + #define Y_MIN_PIN PA0 // E1DET + #endif +#elif ENABLED(Y_DUAL_ENDSTOPS) + #ifndef Y_MIN_PIN + #define Y_MIN_PIN PC3 // Y-STOP + #endif + #ifndef Y_MAX_PIN + #define Y_MAX_PIN PA0 // E1DET + #endif +#else + #define Y_STOP_PIN PC3 // Y-STOP +#endif + +#ifdef Z_STALL_SENSITIVITY + #define Z_STOP_PIN Z_DIAG_PIN + #if Z_HOME_TO_MIN + #define Z_MAX_PIN PC15 // PWRDET + #else + #define Z_MIN_PIN PC15 // PWRDET + #endif +#elif ENABLED(Z_MULTI_ENDSTOPS) + #ifndef Z_MIN_PIN + #define Z_MIN_PIN PC0 // Z-STOP + #endif + #ifndef Z_MAX_PIN + #define Z_MAX_PIN PC15 // PWRDET + #endif +#else + #ifndef Z_STOP_PIN + #define Z_STOP_PIN PC0 // Z-STOP + #endif +#endif + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PE4 +#endif + +// +// Filament Runout Sensor +// +#define FIL_RUNOUT_PIN PC2 // E0DET +#define FIL_RUNOUT2_PIN PA0 // E1DET + +// +// Power Supply Control +// +#ifndef PS_ON_PIN + #define PS_ON_PIN PE8 // PS-ON +#endif + +// +// Power Loss Detection +// +#ifndef POWER_LOSS_PIN + #define POWER_LOSS_PIN PC15 // PWRDET +#endif + +// +// Control pin of driver/heater/fan power supply +// +#define SAFE_POWER_PIN PC13 + +// +// Steppers +// +#define X_STEP_PIN PE2 +#define X_DIR_PIN PE1 +#define X_ENABLE_PIN PE3 +#ifndef X_CS_PIN + #define X_CS_PIN PE0 +#endif + +#define Y_STEP_PIN PD5 +#define Y_DIR_PIN PD4 +#define Y_ENABLE_PIN PD6 +#ifndef Y_CS_PIN + #define Y_CS_PIN PD3 +#endif + +#define Z_STEP_PIN PA15 +#define Z_DIR_PIN PA8 +#define Z_ENABLE_PIN PD1 +#ifndef Z_CS_PIN + #define Z_CS_PIN PD0 +#endif + +#define E0_STEP_PIN PD15 +#define E0_DIR_PIN PD14 +#define E0_ENABLE_PIN PC7 +#ifndef E0_CS_PIN + #define E0_CS_PIN PC6 +#endif + +#define E1_STEP_PIN PD11 +#define E1_DIR_PIN PD10 +#define E1_ENABLE_PIN PD13 +#ifndef E1_CS_PIN + #define E1_CS_PIN PD12 +#endif + +// +// Temperature Sensors +// +#define TEMP_BED_PIN PA1 // TB +#define TEMP_0_PIN PA2 // TH0 +#define TEMP_1_PIN PA3 // TH1 + +#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL) + #if TEMP_SENSOR_PROBE + #define TEMP_PROBE_PIN TEMP_1_PIN + #elif TEMP_SENSOR_CHAMBER + #define TEMP_CHAMBER_PIN TEMP_1_PIN + #endif +#endif + +// +// Heaters / Fans +// +#ifndef HEATER_0_PIN + #define HEATER_0_PIN PB3 // Heater0 +#endif +#ifndef HEATER_1_PIN + #define HEATER_1_PIN PB4 // Heater1 +#endif +#ifndef HEATER_BED_PIN + #define HEATER_BED_PIN PD7 // Hotbed +#endif +#ifndef FAN_PIN + #define FAN_PIN PB7 // Fan0 +#endif +#ifndef FAN1_PIN + #define FAN1_PIN PB6 // Fan1 +#endif +#ifndef FAN2_PIN + #define FAN2_PIN PB5 // Fan2 +#endif + +// +// Software SPI pins for TMC2130 stepper drivers +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI PE14 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO PA14 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK PE15 + #endif +#endif + +#if HAS_TMC_UART + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + //#define X_HARDWARE_SERIAL Serial1 + //#define X2_HARDWARE_SERIAL Serial1 + //#define Y_HARDWARE_SERIAL Serial1 + //#define Y2_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define Z2_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + //#define E1_HARDWARE_SERIAL Serial1 + //#define E2_HARDWARE_SERIAL Serial1 + //#define E3_HARDWARE_SERIAL Serial1 + //#define E4_HARDWARE_SERIAL Serial1 + + #define X_SERIAL_TX_PIN PE0 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PD3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PD0 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PC6 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PD12 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// SD Connection +// +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION LCD +#endif + +/** + * ----- ----- + * NC | 1 2 | GND 5V | 1 2 | GND + * RESET | 3 4 | PC4 (SD_DETECT) (LCD_D7) PE13 | 3 4 | PE12 (LCD_D6) + * (MOSI) PA7 | 5 6 PB2 (BTN_EN2) (LCD_D5) PE11 | 5 6 PE10 (LCD_D4) + * (SD_SS) PA4 | 7 8 | PE7 (BTN_EN1) (LCD_RS) PE9 | 7 8 | PB1 (LCD_EN) + * (SCK) PA5 | 9 10| PA6 (MISO) (BTN_ENC) PB0 | 9 10| PC5 (BEEPER) + * ----- ----- + * EXP2 EXP1 + */ +#define EXP1_03_PIN PE13 +#define EXP1_04_PIN PE12 +#define EXP1_05_PIN PE11 +#define EXP1_06_PIN PE10 +#define EXP1_07_PIN PE9 +#define EXP1_08_PIN PB1 +#define EXP1_09_PIN PB0 +#define EXP1_10_PIN PC5 + +#define EXP2_03_PIN -1 +#define EXP2_04_PIN PC4 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PB2 +#define EXP2_07_PIN PA4 +#define EXP2_08_PIN PE7 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + +// +// Onboard SD card +// Must use soft SPI because Marlin's default hardware SPI is tied to LCD's EXP2 +// +#if SD_CONNECTION_IS(ONBOARD) + + #define SDIO_SUPPORT // Use SDIO for onboard SD + #define SDIO_D0_PIN PC8 + #define SDIO_D1_PIN PC9 + #define SDIO_D2_PIN PC10 + #define SDIO_D3_PIN PC11 + #define SDIO_CK_PIN PC12 + #define SDIO_CMD_PIN PD2 + +#elif SD_CONNECTION_IS(LCD) + + #define SDSS PA4 + #define SD_SS_PIN SDSS + #define SD_SCK_PIN PA5 + #define SD_MISO_PIN PA6 + #define SD_MOSI_PIN PA7 + #define SD_DETECT_PIN PC4 + +#elif SD_CONNECTION_IS(CUSTOM_CABLE) + #error "CUSTOM_CABLE is not a supported SDCARD_CONNECTION for this board" +#endif + +#if ENABLED(BTT_MOTOR_EXPANSION) + /** ----- ----- + * NC | . . | GND NC | . . | GND + * NC | . . | M1EN M2EN | . . | M3EN + * M1STP | . . M1DIR M1RX | . . M1DIAG + * M2DIR | . . | M2STP M2RX | . . | M2DIAG + * M3DIR | . . | M3STP M3RX | . . | M3DIAG + * ----- ----- + * EXP2 EXP1 + * + * NB In EXP_MOT_USE_EXP2_ONLY mode EXP1 is not used and M2EN and M3EN need to be jumpered to M1EN + */ + + // M1 on Driver Expansion Module + #define E2_STEP_PIN EXP2_05_PIN + #define E2_DIR_PIN EXP2_06_PIN + #define E2_ENABLE_PIN EXP2_04_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E2_DIAG_PIN EXP1_06_PIN + #define E2_CS_PIN EXP1_05_PIN + #if HAS_TMC_UART + #define E2_SERIAL_TX_PIN EXP1_05_PIN + #define E2_SERIAL_RX_PIN EXP1_05_PIN + #endif + #endif + + // M2 on Driver Expansion Module + #define E3_STEP_PIN EXP2_08_PIN + #define E3_DIR_PIN EXP2_07_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E3_ENABLE_PIN EXP1_03_PIN + #define E3_DIAG_PIN EXP1_08_PIN + #define E3_CS_PIN EXP1_07_PIN + #if HAS_TMC_UART + #define E3_SERIAL_TX_PIN EXP1_07_PIN + #define E3_SERIAL_RX_PIN EXP1_07_PIN + #endif + #else + #define E3_ENABLE_PIN EXP2_04_PIN + #endif + + // M3 on Driver Expansion Module + #define E4_STEP_PIN EXP2_10_PIN + #define E4_DIR_PIN EXP2_09_PIN + #if !EXP_MOT_USE_EXP2_ONLY + #define E4_ENABLE_PIN EXP1_04_PIN + #define E4_DIAG_PIN EXP1_10_PIN + #define E4_CS_PIN EXP1_09_PIN + #if HAS_TMC_UART + #define E4_SERIAL_TX_PIN EXP1_09_PIN + #define E4_SERIAL_RX_PIN EXP1_09_PIN + #endif + #else + #define E4_ENABLE_PIN EXP2_04_PIN + #endif + +#endif // BTT_MOTOR_EXPANSION + +// +// LCDs and Controllers +// +#if IS_TFTGLCD_PANEL + + #if ENABLED(TFTGLCD_PANEL_SPI) + #define TFTGLCD_CS EXP2_08_PIN + #endif + +#elif HAS_WIRED_LCD + + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN + + #if ENABLED(CR10_STOCKDISPLAY) + + #define LCD_PINS_RS EXP1_04_PIN + + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + + #elif ENABLED(MKS_MINI_12864) + + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + + #else + + #define LCD_PINS_RS EXP1_07_PIN + + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + + #if ENABLED(FYSETC_MINI_12864) + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + //#define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. + #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) + #ifndef RGB_LED_R_PIN + #define RGB_LED_R_PIN EXP1_05_PIN + #endif + #ifndef RGB_LED_G_PIN + #define RGB_LED_G_PIN EXP1_04_PIN + #endif + #ifndef RGB_LED_B_PIN + #define RGB_LED_B_PIN EXP1_03_PIN + #endif + #elif ENABLED(FYSETC_MINI_12864_2_1) + #define NEOPIXEL_PIN EXP1_05_PIN + #endif + #endif // !FYSETC_MINI_12864 + + #if IS_ULTIPANEL + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN + + #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) + #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder + #endif + + #endif + + #endif + +#endif // HAS_WIRED_LCD + +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #ifndef BOARD_ST7920_DELAY_1 + #define BOARD_ST7920_DELAY_1 120 + #endif + #ifndef BOARD_ST7920_DELAY_2 + #define BOARD_ST7920_DELAY_2 80 + #endif + #ifndef BOARD_ST7920_DELAY_3 + #define BOARD_ST7920_DELAY_3 580 + #endif +#endif + +// +// NeoPixel LED +// +#ifndef NEOPIXEL_PIN + #define NEOPIXEL_PIN PE6 +#endif + +// +// WIFI +// + +/** + * ------- + * GND | 9 | | 8 | 3.3V + * (ESP-CS) PB12 | 10 | | 7 | PB15 (ESP-MOSI) + * 3.3V | 11 | | 6 | PB14 (ESP-MISO) + * (ESP-IO0) PB10 | 12 | | 5 | PB13 (ESP-CLK) + * (ESP-IO4) PB11 | 13 | | 4 | NC + * NC | 14 | | 3 | 3.3V (ESP-EN) + * (ESP-RX) PD8 | 15 | | 2 | NC + * (ESP-TX) PD9 | 16 | | 1 | PC14 (ESP-RST) + * ------- + * WIFI + */ +#define ESP_WIFI_MODULE_COM 3 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this +#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 +#define ESP_WIFI_MODULE_RESET_PIN PC14 +#define ESP_WIFI_MODULE_GPIO0_PIN PB10 +#define ESP_WIFI_MODULE_GPIO4_PIN PB11 diff --git a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h index 7965d262c3dc..8a9ac56e9e87 100644 --- a/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h +++ b/Marlin/src/pins/stm32f4/pins_FLYF407ZG.h @@ -21,9 +21,10 @@ */ #pragma once -#if NOT_TARGET(STM32F4, STM32F4xx) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 6 || E_STEPPERS > 6 +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 6 || E_STEPPERS > 6 #error "FLYF407ZG supports up to 6 hotends / E-steppers." #endif @@ -32,8 +33,8 @@ #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME // Avoid conflict with fans and TIMER_TONE -#define TEMP_TIMER 3 -#define STEP_TIMER 5 +#define TEMP_TIMER 3 +#define STEP_TIMER 5 // // EEPROM Emulation @@ -174,17 +175,38 @@ #define FAN4_PIN PE13 #define FAN5_PIN PB11 +/** + * ------ ------ + * PB10 |10 9 | PE15 PB14 |10 9 | PB13 + * PE14 | 8 7 | PE12 PC5 | 8 7 | PF11 + * PE10 6 5 | PE9 PC4 6 5 | PB15 + * PE8 | 4 3 | PE7 PB2 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | NC + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PE7 +#define EXP1_04_PIN PE8 +#define EXP1_05_PIN PE9 +#define EXP1_06_PIN PE10 +#define EXP1_07_PIN PE12 +#define EXP1_08_PIN PE14 +#define EXP1_09_PIN PE15 +#define EXP1_10_PIN PB10 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB2 +#define EXP2_05_PIN PB15 +#define EXP2_06_PIN PC4 +#define EXP2_07_PIN PF11 +#define EXP2_08_PIN PC5 +#define EXP2_09_PIN PB13 +#define EXP2_10_PIN PB14 + // // Onboard SD support // - -#define SDIO_D0_PIN PC8 -#define SDIO_D1_PIN PC9 //#define SD_CARD_DETECT_PIN PC13 -#define SDIO_D2_PIN PC10 -#define SDIO_D3_PIN PC11 -#define SDIO_CK_PIN PC12 -#define SDIO_CMD_PIN PD2 #ifndef SDCARD_CONNECTION #define SDCARD_CONNECTION ONBOARD @@ -193,37 +215,37 @@ #if SD_CONNECTION_IS(ONBOARD) #define SDIO_SUPPORT // Use SDIO for onboard SD - #ifndef SDIO_SUPPORT + + #if DISABLED(SDIO_SUPPORT) #define SOFTWARE_SPI // Use soft SPI for onboard SD - #define SDSS SDIO_D3_PIN - #define SD_SCK_PIN SDIO_CK_PIN - #define SD_MISO_PIN SDIO_D0_PIN - #define SD_MOSI_PIN SDIO_CMD_PIN + #define SDSS PC11 + #define SD_SCK_PIN PC12 + #define SD_MISO_PIN PC8 + #define SD_MOSI_PIN PD2 #endif #elif SD_CONNECTION_IS(LCD) - #define SD_SCK_PIN PB13 - #define SD_MISO_PIN PB14 - #define SD_MOSI_PIN PB15 - #define SDSS PF11 - #define SD_DETECT_PIN PB2 + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SDSS EXP2_07_PIN + #define SD_DETECT_PIN EXP2_04_PIN #endif // // Trinamic Software SPI // - #if ENABLED(TMC_USE_SW_SPI) - #ifndef TMC_SW_MOSI - #define TMC_SW_MOSI PB15 + #ifndef TMC_SW_SCK + #define TMC_SW_SCK EXP2_09_PIN #endif #ifndef TMC_SW_MISO - #define TMC_SW_MISO PB14 + #define TMC_SW_MISO EXP2_10_PIN #endif - #ifndef TMC_SW_SCK - #define TMC_SW_SCK PB13 + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI EXP2_05_PIN #endif #endif @@ -233,48 +255,48 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PG13 - #define X_SERIAL_RX_PIN PG13 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PG10 - #define Y_SERIAL_RX_PIN PG10 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD5 - #define Z_SERIAL_RX_PIN PD5 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD1 - #define E0_SERIAL_RX_PIN PD1 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PA14 - #define E1_SERIAL_RX_PIN PA14 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN #define E2_SERIAL_TX_PIN PG6 - #define E2_SERIAL_RX_PIN PG6 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN #define E3_SERIAL_TX_PIN PG3 - #define E3_SERIAL_RX_PIN PG3 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN #define E4_SERIAL_TX_PIN PD10 - #define E4_SERIAL_RX_PIN PD10 + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN #define E5_SERIAL_TX_PIN PB12 - #define E5_SERIAL_RX_PIN PB12 - + #define E5_SERIAL_RX_PIN E5_SERIAL_TX_PIN #endif // // LCD / Controller // - -#define BEEPER_PIN PB10 -#define LCD_PINS_RS PE12 -#define LCD_PINS_ENABLE PE14 -#define LCD_PINS_D4 PE10 -#define LCD_PINS_D5 PE9 -#define LCD_PINS_D6 PE8 -#define LCD_PINS_D7 PE7 -#define BTN_EN1 PC4 -#define BTN_EN2 PC5 -#define BTN_ENC PE15 +#if IS_RRD_SC + #define BEEPER_PIN EXP1_10_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN + #define BTN_EN1 EXP2_06_PIN + #define BTN_EN2 EXP2_08_PIN + #define BTN_ENC EXP1_09_PIN +#endif // // Filament runout @@ -282,15 +304,9 @@ #define FIL_RUNOUT_PIN PA3 -// -// ST7920 Delays -// -#ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) -#endif -#ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) -#endif -#ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h index 18e689d1d93a..3fe744933080 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_CHEETAH_V20.h @@ -21,9 +21,7 @@ */ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #define DEFAULT_MACHINE_NAME "3D Printer" @@ -140,7 +138,7 @@ #endif /** - * _____ _____ + * ----- ----- * 5V | 1 2 | GND 5V | 1 2 | GND * RESET | 3 4 | PC3 (SD_DETECT) (LCD_D7) PB7 | 3 4 | PB6 (LCD_D6) * (SD_MOSI) PA7 5 6 | PC11 (BTN_EN2) (LCD_D5) PB14 5 6 | PB13 (LCD_D4) @@ -151,7 +149,7 @@ */ /** -* _____ +* ----- * (BEEPER) PC9 | 1 2 | PC12 (BTN_ENC) * (BTN_EN1) PC10 | 3 4 | PB14 (LCD_D5/MISO) * (BTN_EN2) PC11 5 6 | PB13 (LCD_D4/SCK) @@ -161,85 +159,80 @@ * EXP3 */ -#define EXPA1_03_PIN PB7 -#define EXPA1_04_PIN PB6 -#define EXPA1_05_PIN PB14 -#define EXPA1_06_PIN PB13 -#define EXPA1_07_PIN PB12 -#define EXPA1_08_PIN PB15 -#define EXPA1_09_PIN PC12 -#define EXPA1_10_PIN PC9 - -#define EXPA2_03_PIN -1 -#define EXPA2_04_PIN PC3 -#define EXPA2_05_PIN PA7 -#define EXPA2_06_PIN PC11 -#define EXPA2_07_PIN PA4 -#define EXPA2_08_PIN PC10 -#define EXPA2_09_PIN PA5 -#define EXPA2_10_PIN PA6 +#define EXP1_03_PIN PB7 +#define EXP1_04_PIN PB6 +#define EXP1_05_PIN PB14 +#define EXP1_06_PIN PB13 +#define EXP1_07_PIN PB12 +#define EXP1_08_PIN PB15 +#define EXP1_09_PIN PC12 +#define EXP1_10_PIN PC9 + +#define EXP2_03_PIN -1 +#define EXP2_04_PIN PC3 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PC11 +#define EXP2_07_PIN PA4 +#define EXP2_08_PIN PC10 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 #if HAS_WIRED_LCD - #define BEEPER_PIN EXPA1_10_PIN - #define BTN_ENC EXPA1_09_PIN + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS EXPA1_07_PIN - - #define BTN_EN1 EXPA2_08_PIN - #define BTN_EN2 EXPA2_06_PIN + #define LCD_PINS_RS EXP1_07_PIN - #define LCD_PINS_ENABLE EXPA1_08_PIN - #define LCD_PINS_D4 EXPA1_06_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - // CR10_STOCKDISPLAY default timing is too fast - #undef BOARD_ST7920_DELAY_1 - #undef BOARD_ST7920_DELAY_2 - #undef BOARD_ST7920_DELAY_3 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #elif ENABLED(MKS_MINI_12864) - #define DOGLCD_A0 EXPA1_04_PIN - #define DOGLCD_CS EXPA1_05_PIN - #define BTN_EN1 EXPA2_08_PIN - #define BTN_EN2 EXPA2_06_PIN + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #else - #define LCD_PINS_RS EXPA1_07_PIN + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 EXPA2_06_PIN - #define BTN_EN2 EXPA2_08_PIN + #define BTN_EN1 EXP2_06_PIN + #define BTN_EN2 EXP2_08_PIN - #define LCD_PINS_ENABLE EXPA1_08_PIN - #define LCD_PINS_D4 EXPA1_06_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) - #define DOGLCD_CS EXPA1_08_PIN - #define DOGLCD_A0 EXPA1_07_PIN + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN //#define LCD_BACKLIGHT_PIN -1 - #define LCD_RESET_PIN EXPA1_06_PIN // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN EXPA1_05_PIN + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN EXPA1_04_PIN + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN EXPA1_03_PIN + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN EXPA1_05_PIN + #define NEOPIXEL_PIN EXP1_05_PIN #endif #endif // !FYSETC_MINI_12864 #if IS_ULTIPANEL - #define LCD_PINS_D5 EXPA1_05_PIN - #define LCD_PINS_D6 EXPA1_04_PIN - #define LCD_PINS_D7 EXPA1_03_PIN + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder @@ -252,20 +245,14 @@ #endif // HAS_WIRED_LCD // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) - #endif +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif #if ENABLED(TOUCH_UI_FTDI_EVE) - #define BEEPER_PIN EXPA1_10_PIN - #define CLCD_MOD_RESET EXPA2_08_PIN - #define CLCD_SPI_CS EXPA2_06_PIN + #define BEEPER_PIN EXP1_10_PIN + #define CLCD_MOD_RESET EXP2_08_PIN + #define CLCD_SPI_CS EXP2_06_PIN #endif diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h index a28077564634..12261c3a7bd5 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6.h @@ -21,10 +21,10 @@ */ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 3 || E_STEPPERS > 3 - #error "RUMBA32 supports up to 3 hotends / E-steppers." +#include "env_validate.h" + +#if HOTENDS > 3 || E_STEPPERS > 3 + #error "FYSETC S6 supports up to 3 hotends / E-steppers." #endif #ifndef BOARD_INFO_NAME @@ -50,13 +50,15 @@ // 128 kB sector allocated for EEPROM emulation. #define FLASH_EEPROM_LEVELING #elif ENABLED(I2C_EEPROM) - #define MARLIN_EEPROM_SIZE 0x0800 // 2KB + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB #endif // // Servos // -#define SERVO0_PIN PA3 +#ifndef SERVO0_PIN + #define SERVO0_PIN PA3 +#endif // // Limit Switches @@ -116,9 +118,6 @@ // TMC2208/TMC2209 stepper drivers // - // - // Software serial - // #ifndef X_SERIAL_TX_PIN #define X_SERIAL_TX_PIN PE9 #endif @@ -129,7 +128,7 @@ #define Y_SERIAL_TX_PIN PE14 #endif #ifndef Y_SERIAL_RX_PIN - #define Y_SERIAL_RX_PIN PE13 + #define Y_SERIAL_RX_PIN PC4 #endif #ifndef Z_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD11 @@ -168,108 +167,143 @@ // // Heaters / Fans // -#define HEATER_0_PIN PB3 -#define HEATER_1_PIN PB4 -#define HEATER_2_PIN PB15 -#define HEATER_BED_PIN PC8 +#ifndef HEATER_0_PIN + #define HEATER_0_PIN PB3 +#endif +#ifndef HEATER_1_PIN + #define HEATER_1_PIN PB4 +#endif +#ifndef HEATER_2_PIN + #define HEATER_2_PIN PB15 +#endif +#ifndef HEATER_BED_PIN + #define HEATER_BED_PIN PC8 +#endif #define FAN_PIN PB0 #define FAN1_PIN PB1 #define FAN2_PIN PB2 -// -// SPI -// -#define SD_SCK_PIN PA5 -#define SD_MISO_PIN PA6 -#define SD_MOSI_PIN PA7 - // // Misc. Functions // //#define LED_PIN PB14 -//#define BTN_PIN PC10 //#define PS_ON_PIN PE11 //#define KILL_PIN PC5 -#define SDSS PA4 -#define SD_DETECT_PIN PB10 +/** + * ------ ------ + * PC9 |10 9 | PA8 PA6 |10 9 | PA5 + * PC11 | 8 7 | PD2 PC6 | 8 7 | PA4 + * PC10 6 5 | PC12 PC7 6 5 | PA7 + * PD0 | 4 3 | PD1 PB10 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | 5V + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PD1 +#define EXP1_04_PIN PD0 +#define EXP1_05_PIN PC12 +#define EXP1_06_PIN PC10 +#define EXP1_07_PIN PD2 +#define EXP1_08_PIN PC11 +#define EXP1_09_PIN PA8 +#define EXP1_10_PIN PC9 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB10 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PC7 +#define EXP2_07_PIN PA4 +#define EXP2_08_PIN PC6 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + +// +// SPI / SD Card +// +#define SD_SCK_PIN EXP2_09_PIN +#define SD_MISO_PIN EXP2_10_PIN +#define SD_MOSI_PIN EXP2_05_PIN + +#define SDSS EXP2_07_PIN +#define SD_DETECT_PIN EXP2_04_PIN // // LCD / Controller // #if ENABLED(FYSETC_242_OLED_12864) - #define BTN_EN1 PC9 - #define BTN_EN2 PD1 - #define BTN_ENC PA8 + #define BTN_EN1 EXP1_10_PIN + #define BTN_EN2 EXP1_03_PIN + #define BTN_ENC EXP1_09_PIN - #define BEEPER_PIN PC6 + #define BEEPER_PIN EXP2_08_PIN - #define LCD_PINS_DC PC12 - #define LCD_PINS_RS PC7 // LCD_RST - #define DOGLCD_CS PD2 - #define DOGLCD_MOSI PC10 - #define DOGLCD_SCK PC11 + #define LCD_PINS_DC EXP1_05_PIN + #define LCD_PINS_RS EXP2_06_PIN // LCD_RST + #define DOGLCD_CS EXP1_07_PIN + #define DOGLCD_MOSI EXP1_06_PIN + #define DOGLCD_SCK EXP1_08_PIN #define DOGLCD_A0 LCD_PINS_DC #define FORCE_SOFT_SPI #define KILL_PIN -1 // NC - #define NEOPIXEL_PIN PD0 + #define NEOPIXEL_PIN EXP1_04_PIN #elif HAS_WIRED_LCD - #define BEEPER_PIN PC9 - #define BTN_ENC PA8 + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #if ENABLED(CR10_STOCKDISPLAY) - #define LCD_PINS_RS PD0 + #define LCD_PINS_RS EXP1_04_PIN - #define BTN_EN1 PC11 - #define BTN_EN2 PC10 + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN - #define LCD_PINS_ENABLE PD1 - #define LCD_PINS_D4 PC12 + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN #else - #define LCD_PINS_RS PD2 + #define LCD_PINS_RS EXP1_07_PIN - #define BTN_EN1 PC6 - #define BTN_EN2 PC7 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN - #define LCD_SDSS PA4 + #define LCD_SDSS EXP2_07_PIN - #define LCD_PINS_ENABLE PC11 - #define LCD_PINS_D4 PC10 + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(FYSETC_MINI_12864) // See https://wiki.fysetc.com/Mini12864_Panel - #define DOGLCD_CS PC11 - #define DOGLCD_A0 PD2 + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN #if ENABLED(FYSETC_GENERIC_12864_1_1) - #define LCD_BACKLIGHT_PIN PD0 + #define LCD_BACKLIGHT_PIN EXP1_04_PIN #endif - #define LCD_RESET_PIN PC10 // Must be high or open for LCD to operate normally. + #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally. #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0) #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN PC12 + #define RGB_LED_R_PIN EXP1_05_PIN #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN PD0 + #define RGB_LED_G_PIN EXP1_04_PIN #endif #ifndef RGB_LED_B_PIN - #define RGB_LED_B_PIN PD1 + #define RGB_LED_B_PIN EXP1_03_PIN #endif #elif ENABLED(FYSETC_MINI_12864_2_1) - #define NEOPIXEL_PIN PC12 + #define NEOPIXEL_PIN EXP1_05_PIN #endif #endif #if IS_ULTIPANEL - #define LCD_PINS_D5 PC12 - #define LCD_PINS_D6 PD0 - #define LCD_PINS_D7 PD1 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif @@ -280,16 +314,10 @@ #endif // HAS_WIRED_LCD // Alter timing for graphical display -#if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) - #endif +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 640 #endif #ifndef RGB_LED_R_PIN diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h index 641805d855a6..6f1c9be8f5b0 100644 --- a/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_S6_V2_0.h @@ -40,7 +40,6 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PE8 #define Y_SERIAL_TX_PIN PC4 - #define Y_SERIAL_RX_PIN PC4 #define Z_SERIAL_TX_PIN PD12 #define E0_SERIAL_TX_PIN PA15 #define E1_SERIAL_TX_PIN PC5 diff --git a/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h new file mode 100644 index 000000000000..e05811552e2b --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_FYSETC_SPIDER.h @@ -0,0 +1,123 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "FYSETC SPIDER" +#endif +#ifndef DEFAULT_MACHINE_NAME + #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME +#endif + +// +// EEPROM Emulation +// +#if NO_EEPROM_SELECTED + #undef NO_EEPROM_SELECTED + //#define FLASH_EEPROM_EMULATION + //#define SRAM_EEPROM_EMULATION + #define I2C_EEPROM +#endif + +#if ENABLED(I2C_EEPROM) + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#endif + +// +// Steppers +// +#define X2_STEP_PIN PD12 +#define X2_DIR_PIN PC4 +#define X2_ENABLE_PIN PE8 +#define X2_CS_PIN PA15 + +#define Z2_STEP_PIN PE1 +#define Z2_DIR_PIN PE0 +#define Z2_ENABLE_PIN PC5 +#define Z2_CS_PIN PD11 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PB15 +#define HEATER_1_PIN PC8 +#define HEATER_2_PIN PB3 +#define HEATER_BED_PIN PB4 + +// +// Steppers +// +#define X_ENABLE_PIN PE9 + +// +// Servos +// Z_MAX_PIN only works in input mode +// +#define SERVO0_PIN PA2 + +#if HAS_TMC_UART + #define X_SERIAL_TX_PIN PE7 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define X2_SERIAL_TX_PIN PA15 + #define X2_SERIAL_RX_PIN X2_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PE15 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PD10 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define Z2_SERIAL_TX_PIN PD11 + #define Z2_SERIAL_RX_PIN Z2_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PD7 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PC14 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + #define E2_SERIAL_TX_PIN PC15 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN +#endif + +// +// Software SPI pins for TMC2130 stepper drivers +// +#define TMC_USE_SW_SPI +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI PE14 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO PE13 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK PE12 + #endif +#endif + +#if HOTENDS > 3 || E_STEPPERS > 3 + #error "FYSETC SPIDER supports up to 3 hotends / E-steppers." +#else + #include "pins_FYSETC_S6.h" +#endif diff --git a/Marlin/src/pins/stm32f4/pins_INDEX_REV03.h b/Marlin/src/pins/stm32f4/pins_INDEX_REV03.h new file mode 100644 index 000000000000..8761ca955a8f --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_INDEX_REV03.h @@ -0,0 +1,157 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * STM32F407VET6 on Index PnP Mobo Rev03 + * Website - https://indexmachines.io/ + */ + +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#define BOARD_INFO_NAME "Index Mobo Rev03" +#define DEFAULT_MACHINE_NAME "Index Pick and Place" + +/** + * By default, the extra stepper motor configuration is: + * I = Left Head + * J = Right Head + * K = Auxiliary (Conveyor belt) + */ + +#define SRAM_EEPROM_EMULATION +#define MARLIN_EEPROM_SIZE 0x2000 // 8KB + +// +// Servos +// +#define SERVO0_PIN PB10 +#define SERVO1_PIN PB11 + +// +// Limit Switches +// +#define X_STOP_PIN PC6 +#define Y_STOP_PIN PD15 +#define Z_STOP_PIN PD14 + +// None of these require limit switches by default, so we leave these commented +// here for your reference. +// #define I_MIN_PIN PA8 +// #define I_MAX_PIN PA8 +// #define J_MIN_PIN PD13 +// #define J_MAX_PIN PD13 +// #define K_MIN_PIN PC9 +// #define K_MAX_PIN PC9 + +// +// Steppers +// +#define X_STEP_PIN PB15 +#define X_DIR_PIN PB14 +#define X_ENABLE_PIN PD9 +#define X_SERIAL_TX_PIN PD8 +#define X_SERIAL_RX_PIN PD8 + +#define Y_STEP_PIN PE15 +#define Y_DIR_PIN PE14 +#define Y_ENABLE_PIN PB13 +#define Y_SERIAL_TX_PIN PB12 +#define Y_SERIAL_RX_PIN PB12 + +#define Z_STEP_PIN PE7 +#define Z_DIR_PIN PB1 +#define Z_ENABLE_PIN PE9 +#define Z_SERIAL_TX_PIN PE8 +#define Z_SERIAL_RX_PIN PE8 + +#define I_STEP_PIN PC4 +#define I_DIR_PIN PA4 +#define I_ENABLE_PIN PB0 +#define I_SERIAL_TX_PIN PC5 +#define I_SERIAL_RX_PIN PC5 + +#define J_STEP_PIN PE11 +#define J_DIR_PIN PE10 +#define J_ENABLE_PIN PE13 +#define J_SERIAL_TX_PIN PE12 +#define J_SERIAL_RX_PIN PE12 +#define K_SERIAL_TX_PIN PA2 +#define K_SERIAL_RX_PIN PA2 + +#define K_STEP_PIN PD6 +#define K_DIR_PIN PD7 +#define K_ENABLE_PIN PA3 + +// Reduce baud rate to improve software serial reliability +#define TMC_BAUD_RATE 19200 + +// Not required for this board. Fails to compile otherwise. +// PD0 is not connected on this board. +#define TEMP_0_PIN PD0 + +// General use mosfets, useful for things like pumps and solenoids +#define FAN_PIN PE2 +#define FAN1_PIN PE3 +#define FAN2_PIN PE4 +#define FAN3_PIN PE5 + +// Neopixel Rings +#define NEOPIXEL_PIN PC7 +#define NEOPIXEL2_PIN PC8 + +// SPI +#define MISO_PIN PB4 +#define MOSI_PIN PB5 +#define SCK_PIN PB3 + +// I2C +#define I2C_SDA_PIN PB7 +#define I2C_SCL_PIN PB6 + +/** + * The index mobo rev03 has 3 aux ports. We define them here so they may be used + * in other places and to make sure someone doesn't have to go look up the pinout + * in the board files. Each 12 pin aux port has this pinout: + * + * VDC 1 2 GND + * 3.3V 3 4 SCL (I2C_SCL_PIN) + * PWM1 5 6 SDA (I2C_SDA_PIN) + * PWM2 7 8 CIPO (MISO_PIN) + * A1 9 10 COPI (MOSI_PIN) + * A2 11 12 SCK (SCK_PIN) + */ +#define INDEX_AUX1_PWM1 PA15 +#define INDEX_AUX1_PWM2 PA5 +#define INDEX_AUX1_A1 PC0 +#define INDEX_AUX1_A2 PC1 + +#define INDEX_AUX2_PWM1 PA6 +#define INDEX_AUX2_PWM2 PA7 +#define INDEX_AUX2_A1 PC2 +#define INDEX_AUX2_A2 PC3 + +#define INDEX_AUX3_PWM1 PB8 +#define INDEX_AUX3_PWM2 PB9 +#define INDEX_AUX3_A1 PA0 +#define INDEX_AUX3_A2 PA1 diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h index bf6df0356237..6ad3849d11bd 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_K.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_K.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -18,16 +21,24 @@ */ #pragma once -#if NOT_TARGET(STM32F4, STM32F4xx) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "LERDGE K supports up to 2 hotends / E-steppers." #endif #define BOARD_INFO_NAME "Lerdge K" #define DEFAULT_MACHINE_NAME "LERDGE" -#define I2C_EEPROM +// EEPROM +#if NO_EEPROM_SELECTED + #define I2C_EEPROM + #define SOFT_I2C_EEPROM // Force the use of Software I2C + #define I2C_SCL_PIN PG14 + #define I2C_SDA_PIN PG13 + #define MARLIN_EEPROM_SIZE 0x10000 +#endif // USB Flash Drive support #define HAS_OTG_USB_HOST_SUPPORT @@ -35,7 +46,7 @@ // // Servos // -//#define SERVO0_PIN PB11 +#define SERVO0_PIN PB11 // // Limit Switches @@ -64,37 +75,94 @@ #define X_DIR_PIN PB10 #define X_ENABLE_PIN PG0 //#ifndef X_CS_PIN -// #define X_CS_PIN PE0 +// #define X_CS_PIN PB2 //#endif #define Y_STEP_PIN PF14 #define Y_DIR_PIN PF15 #define Y_ENABLE_PIN PF13 //#ifndef Y_CS_PIN -// #define Y_CS_PIN PE1 +// #define Y_CS_PIN PE2 //#endif #define Z_STEP_PIN PF11 #define Z_DIR_PIN PF12 #define Z_ENABLE_PIN PC5 //#ifndef Z_CS_PIN -// #define Z_CS_PIN PE2 +// #define Z_CS_PIN PE3 //#endif #define E0_STEP_PIN PC14 #define E0_DIR_PIN PC13 #define E0_ENABLE_PIN PC15 //#ifndef E0_CS_PIN -// #define E0_CS_PIN PE3 +// #define E0_CS_PIN PE4 //#endif #define E1_STEP_PIN PF1 #define E1_DIR_PIN PF0 #define E1_ENABLE_PIN PF2 //#ifndef E1_CS_PIN -// #define E1_CS_PIN PE4 +// #define E1_CS_PIN PE1 +//#endif + +//#define Z2_STEP_PIN PF4 +//#define Z2_DIR_PIN PF3 +//#define Z2_ENABLE_PIN PF5 +//#define Z2_STOP_PIN PG2 +//#ifndef Z2_CS_PIN +// #define Z2_CS_PIN PE0 //#endif +#if HAS_TMC_UART + /** + * TMC2208/TMC2209 stepper drivers + */ + #ifndef X_SERIAL_TX_PIN + #define X_SERIAL_TX_PIN PB2 + #endif + #ifndef X_SERIAL_RX_PIN + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + #endif + #ifndef Y_SERIAL_TX_PIN + #define Y_SERIAL_TX_PIN PE2 + #endif + #ifndef Y_SERIAL_RX_PIN + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + #endif + #ifndef Z_SERIAL_TX_PIN + #define Z_SERIAL_TX_PIN PE3 + #endif + #ifndef Z_SERIAL_RX_PIN + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + #endif + #ifndef E0_SERIAL_TX_PIN + #define E0_SERIAL_TX_PIN PE4 + #endif + #ifndef E0_SERIAL_RX_PIN + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + #endif + #ifndef E1_SERIAL_TX_PIN + #define E1_SERIAL_TX_PIN PE1 + #endif + #ifndef E1_SERIAL_RX_PIN + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + #endif + // Ex-motor can be any... X2/Y2/Z2 or E2 + #ifndef EX_SERIAL_TX_PIN + #define EX_SERIAL_TX_PIN PE0 + #endif + #ifndef EX_SERIAL_RX_PIN + #define EX_SERIAL_RX_PIN EX_SERIAL_TX_PIN + #endif + //#define Z2_SERIAL_RX_PIN EX_SERIAL_RX_PIN + //#define Z2_SERIAL_TX_PIN EX_SERIAL_TX_PIN + //#define E2_SERIAL_RX_PIN EX_SERIAL_RX_PIN + //#define E2_SERIAL_TX_PIN EX_SERIAL_TX_PIN + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + // // Temperature Sensors // @@ -118,24 +186,30 @@ #ifndef FAN_PIN #define FAN_PIN PF7 #endif + #define FAN1_PIN PF6 -#define FAN2_PIN PF8 #ifndef E0_AUTO_FAN_PIN - #define E0_AUTO_FAN_PIN PF6 + #define E0_AUTO_FAN_PIN PB1 +#endif + +#ifndef E1_AUTO_FAN_PIN + #define E1_AUTO_FAN_PIN PB0 #endif +#define CONTROLLER_FAN_PIN PF8 + // // LED / Lighting // -//#define CASE_LIGHT_PIN_CI -1 -//#define CASE_LIGHT_PIN_DO -1 +#define LED_PIN PA15 // Status LED +//#define CASE_LIGHT_PIN PB6 // LED Ribbon Connector (PWM TIM4_CH1) //#define NEOPIXEL_PIN -1 #ifndef RGB_LED_R_PIN - #define RGB_LED_R_PIN PB7 + #define RGB_LED_R_PIN PB8 // swap R and G pin for compatibility with real wires #endif #ifndef RGB_LED_G_PIN - #define RGB_LED_G_PIN PB8 + #define RGB_LED_G_PIN PB7 #endif #ifndef RGB_LED_B_PIN #define RGB_LED_B_PIN PB9 @@ -146,39 +220,54 @@ // #define SDIO_SUPPORT #define SDIO_CLOCK 4800000 +#define SD_DETECT_PIN PA8 +#if DISABLED(SDIO_SUPPORT) + #define SOFTWARE_SPI + #define SD_SCK_PIN PC12 + #define SD_MISO_PIN PC8 + #define SD_MOSI_PIN PD2 + #define SD_SS_PIN PC11 + #define SDSS PC11 +#endif // // Misc. Functions // -#define SDSS PC11 -#define LED_PIN PA15 // Alive -#define PS_ON_PIN -1 +#define PS_ON_PIN PA4 #define KILL_PIN -1 #define POWER_LOSS_PIN PA4 // Power-loss / nAC_FAULT -#define SD_SCK_PIN PC12 -#define SD_MISO_PIN PC8 -#define SD_MOSI_PIN PD2 -#define SD_SS_PIN PC11 - -#define SD_DETECT_PIN PA8 -#define BEEPER_PIN PC7 - // -// LCD / Controller +// TFT with FSMC interface // +#if HAS_FSMC_TFT + #ifndef TFT_DRIVER + #define TFT_DRIVER ST7796 + #endif + #define ST7796S_INVERTED + + #define TFT_RESET_PIN PD6 + #define TFT_BACKLIGHT_PIN PD3 -#define TFT_RESET_PIN PD6 -#define TFT_BACKLIGHT_PIN PD3 + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 -#define TFT_CS_PIN PD7 -#define TFT_RS_PIN PD11 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN -#define TOUCH_CS_PIN PG15 -#define TOUCH_SCK_PIN PB3 -#define TOUCH_MOSI_PIN PB5 -#define TOUCH_MISO_PIN PB4 + #define TOUCH_CS_PIN PG15 + #define TOUCH_SCK_PIN PB3 + #define TOUCH_MOSI_PIN PB5 + #define TOUCH_MISO_PIN PB4 + #define TOUCH_INT_PIN PG12 +#endif -#define BTN_EN1 PG10 -#define BTN_EN2 PG11 -#define BTN_ENC PG9 +#if IS_NEWPANEL + #define BEEPER_PIN PC7 + #define BTN_EN1 PG11 + #define BTN_EN2 PG10 + #define BTN_ENC PG9 + #ifndef ENCODER_STEPS_PER_MENU_ITEM + #define ENCODER_STEPS_PER_MENU_ITEM 2 + #endif +#endif diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h index c6cfa98831e2..68e563695503 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_S.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_S.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -18,9 +21,10 @@ */ #pragma once -#if NOT_TARGET(STM32F4, STM32F4xx) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "LERDGE S supports up to 2 hotends / E-steppers." #endif @@ -30,8 +34,6 @@ #define STEP_TIMER 4 #define TEMP_TIMER 2 -//#define I2C_EEPROM - // USB Flash Drive support #define HAS_OTG_USB_HOST_SUPPORT @@ -103,16 +105,16 @@ // MAX6675 Cold-Junction-Compensated K-Thermocouple to Digital Converter (0°C to +1024°C) // https://datasheets.maximintegrated.com/en/ds/MAX6675.pdf -#define MAX6675_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested -#define MAX6675_DO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested -#define MAX6675_SS_PIN PC4 // max6675 datasheet: /CS pin, found with multimeter, not tested and likely wrong +#define TEMP_0_CS_PIN PC4 // max6675 datasheet: /CS pin, found with multimeter, not tested and likely wrong +#define TEMP_0_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested +#define TEMP_0_MISO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested // Expansion board with second max6675 // Warning: Some boards leave the slot unpopulated. -//#define MAX6675_SCK2_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested -//#define MAX6675_DO2_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested -//#define MAX6675_SS2_PIN PF1 // max6675 datasheet: /CS pin, found with multimeter, not tested +//#define TEMP_1_CS_PIN PF1 // max6675 datasheet: /CS pin, found with multimeter, not tested +//#define TEMP_1_SCK_PIN PB3 // max6675 datasheet: SCK pin, found with multimeter, not tested +//#define TEMP_1_MISO_PIN PB4 // max6675 datasheet: SO pin, found with multimeter, not tested // // Heaters / Fans @@ -149,7 +151,6 @@ // // Misc. Functions // -#define SDSS PC11 // SD is working using SDIO, not sure if this definition is needed? #define LED_PIN PC6 // Mainboard soldered green LED #define PS_ON_PIN PB2 // Board has a power module connector #define KILL_PIN -1 // There is no reset button on the LCD @@ -160,53 +161,71 @@ // #define SDIO_SUPPORT #define SDIO_CLOCK 4800000 - -#define SD_SCK_PIN PC12 -#define SD_MISO_PIN PC8 -#define SD_MOSI_PIN PD2 -#define SD_SS_PIN PC11 - #define SD_DETECT_PIN PG15 +#if DISABLED(SDIO_SUPPORT) + #define SOFTWARE_SPI + #define SD_SCK_PIN PC12 + #define SD_MISO_PIN PC8 + #define SD_MOSI_PIN PD2 + #define SD_SS_PIN PC11 + #define SDSS PC11 +#endif // // Persistent Storage // If no option is selected below the SD Card will be used -// (this section modelled after pins_LONGER3D_LK.h) -// Warning: Not tested yet! Pins traced with multimeter, mistakes are possible +// Prefer the I2C option (F-RAM) to store Marlin settings, SPI option is not working yet + //#define SPI_EEPROM +//#define I2C_EEPROM -#if ENABLED(SPI_EEPROM) - // Lerdge has an SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf +#if ENABLED(SPI_EEPROM) // SPI EEPROM Winbond W25Q128 (128Mbits) https://www.pjrc.com/teensy/W25Q128FV.pdf #define SPI_CHAN_EEPROM1 1 - #define SPI_EEPROM1_CS PB12 // datasheet: /CS pin, found with multimeter, not tested - #define EEPROM_SCK PB13 // datasheet: CLK pin, found with multimeter, not tested - #define EEPROM_MISO PB14 // datasheet: DO pin, found with multimeter, not tested - #define EEPROM_MOSI PB15 // datasheet: DI pin, found with multimeter, not tested + #define SPI_EEPROM1_CS_PIN PB12 // datasheet: /CS pin, found with multimeter, not tested + #define EEPROM_SCK_PIN PB13 // datasheet: CLK pin, found with multimeter, not tested + #define EEPROM_MISO_PIN PB14 // datasheet: DO pin, found with multimeter, not tested + #define EEPROM_MOSI_PIN PB15 // datasheet: DI pin, found with multimeter, not tested #define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet) #define MARLIN_EEPROM_SIZE 16UL * (EEPROM_PAGE_SIZE) // Limit to 64KB for now... +#elif ENABLED(I2C_EEPROM) // FM24CL64BG (CYP1813) 64Kbit F-RAM + #define SOFT_I2C_EEPROM // Force the use of Software I2C + #define I2C_SDA_PIN PG13 + #define I2C_SCL_PIN PG14 // To be confirmed on the Lerdge S, but probably same as the K + #define MARLIN_EEPROM_SIZE 0x10000 #else #define MARLIN_EEPROM_SIZE 0x800U // On SD, Limit to 2KB, require this amount of RAM #endif // -// LCD / Controller +// TFT with FSMC interface // +#if HAS_FSMC_TFT + #ifndef TFT_DRIVER + #define TFT_DRIVER ST7796 + #endif + #define ST7796S_INVERTED -// The LCD is initialized in FSMC mode -#define BEEPER_PIN PD13 + #define TFT_RESET_PIN PD6 + #define TFT_BACKLIGHT_PIN PD3 -#define BTN_EN1 PC14 -#define BTN_EN2 PC15 -#define BTN_ENC PC13 + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 -#define TFT_RESET_PIN PD6 -#define TFT_BACKLIGHT_PIN PD3 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN -#define TFT_CS_PIN PD7 // TFT works -#define TFT_RS_PIN PD11 // TFT works + #define TOUCH_CS_PIN PB6 + #define TOUCH_SCK_PIN PB3 + #define TOUCH_MOSI_PIN PB5 + #define TOUCH_MISO_PIN PB4 +#endif -// There is touch, but calibration is off -#define TOUCH_CS_PIN PB6 -#define TOUCH_SCK_PIN PB3 -#define TOUCH_MOSI_PIN PB5 -#define TOUCH_MISO_PIN PB4 +#if IS_NEWPANEL + #define BEEPER_PIN PD13 + #define BTN_EN1 PC15 + #define BTN_EN2 PC14 + #define BTN_ENC PC13 + #ifndef ENCODER_STEPS_PER_MENU_ITEM + #define ENCODER_STEPS_PER_MENU_ITEM 2 + #endif +#endif diff --git a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h index 606d932c5739..12e47e35cc42 100644 --- a/Marlin/src/pins/stm32f4/pins_LERDGE_X.h +++ b/Marlin/src/pins/stm32f4/pins_LERDGE_X.h @@ -2,6 +2,9 @@ * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -18,9 +21,10 @@ */ #pragma once -#if NOT_TARGET(STM32F4, STM32F4xx) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 1 || E_STEPPERS > 1 +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 1 || E_STEPPERS > 1 #error "LERDGE X only supports one hotend / E-stepper. Comment out this line to continue." #endif @@ -31,6 +35,9 @@ #define TEMP_TIMER 2 #define I2C_EEPROM +#define I2C_SCL_PIN PB8 +#define I2C_SDA_PIN PB9 +#define MARLIN_EEPROM_SIZE 0x10000 // FM24CL64 F-RAM 64K (8Kx8) // USB Flash Drive support #define HAS_OTG_USB_HOST_SUPPORT @@ -109,10 +116,24 @@ //#define CASE_LIGHT_PIN_DO -1 //#define NEOPIXEL_PIN -1 +// +// SD support (On board) +// +#define SDIO_SUPPORT +#define SD_DETECT_PIN PA8 +#define SDIO_CLOCK 4800000 +#if DISABLED(SDIO_SUPPORT) + #define SOFTWARE_SPI + #define SD_SCK_PIN PC12 + #define SD_MISO_PIN PC8 + #define SD_MOSI_PIN PD2 + #define SD_SS_PIN PC11 + #define SDSS PC11 +#endif + // // Misc. Functions // -#define SDSS PC11 #define LED_PIN PC7 // Alive #define PS_ON_PIN -1 #define KILL_PIN -1 @@ -120,36 +141,36 @@ // Lerdge supports auto-power off and power loss sense through a single pin. #define POWER_LOSS_PIN PC14 // Power-loss / nAC_FAULT -#define SD_SCK_PIN PC12 -#define SD_MISO_PIN PC8 -#define SD_MOSI_PIN PD2 -#define SD_SS_PIN PC11 - // -// SD support +// TFT with FSMC interface // -#define SDIO_SUPPORT -#define SD_DETECT_PIN PA8 -#define SDIO_CLOCK 4800000 +#if HAS_FSMC_TFT + #ifndef TFT_DRIVER + #define TFT_DRIVER ST7796 + #endif + #define ST7796S_INVERTED -// -// LCD / Controller -// - -// The LCD is initialized in FSMC mode -#define BEEPER_PIN PD12 + #define FSMC_CS_PIN PD7 + #define FSMC_RS_PIN PD11 -#define BTN_EN1 PE3 -#define BTN_EN2 PE4 -#define BTN_ENC PE2 + #define TFT_RESET_PIN PD6 + #define TFT_BACKLIGHT_PIN PD3 -#define TFT_RESET_PIN PD6 -#define TFT_BACKLIGHT_PIN PD3 + #define TFT_CS_PIN FSMC_CS_PIN + #define TFT_RS_PIN FSMC_RS_PIN -#define TFT_CS_PIN PD7 -#define TFT_RS_PIN PD11 + #define TOUCH_CS_PIN PB6 + #define TOUCH_SCK_PIN PB3 + #define TOUCH_MOSI_PIN PB5 + #define TOUCH_MISO_PIN PB4 +#endif -#define TOUCH_CS_PIN PB6 -#define TOUCH_SCK_PIN PB3 -#define TOUCH_MOSI_PIN PB5 -#define TOUCH_MISO_PIN PB4 +#if IS_NEWPANEL + #define BEEPER_PIN PD12 + #define BTN_EN1 PE4 + #define BTN_EN2 PE3 + #define BTN_ENC PE2 + #ifndef ENCODER_STEPS_PER_MENU_ITEM + #define ENCODER_STEPS_PER_MENU_ITEM 2 + #endif +#endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_EAGLE.h b/Marlin/src/pins/stm32f4/pins_MKS_EAGLE.h new file mode 100644 index 000000000000..50f06b7e8119 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_MKS_EAGLE.h @@ -0,0 +1,35 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 + #error "MKS Eagle supports up to 2 hotends / E-steppers." +#elif HAS_FSMC_TFT + #error "MKS Eagle doesn't support FSMC-based TFT displays." +#endif + +#define BOARD_INFO_NAME "MKS Eagle" + +#include "pins_MKS_ROBIN_NANO_V3_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h new file mode 100644 index 000000000000..8fa211dc9502 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h @@ -0,0 +1,385 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 3 || E_STEPPERS > 5 + #error "MKS Monster supports up to 3 hotends and 5 E-steppers." +#elif HAS_FSMC_TFT + #error "MKS Monster doesn't support FSMC-based TFT displays." +#endif + +#define BOARD_INFO_NAME "MKS Monster8 V1.x" + +// USB Flash Drive support +#define HAS_OTG_USB_HOST_SUPPORT + +//#define DISABLE_DEBUG + +// Avoid conflict with TIMER_TONE +#define STEP_TIMER 10 + +// Use one of these or SDCard-based Emulation will be used +//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation +//#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation +#define I2C_EEPROM // Need use jumpers set i2c for EEPROM +#define MARLIN_EEPROM_SIZE 0x1000 // 4KB +#define I2C_SCL_PIN PB8 // I2C_SCL and CAN_RX +#define I2C_SDA_PIN PB9 // I2C_SDA and CAN_TX + +// +// Servos +// +#define SERVO0_PIN PA8 // Enable BLTOUCH + +// +// Limit Switches for diag signal +// +#define X_DIAG_PIN PA14 // Driver0 diag signal is connect to X- +#define Y_DIAG_PIN PA15 // Driver1 diag signal is connect to Y- +#define Z_DIAG_PIN PB13 // Driver2 diag signal is connect to Z- +#define E0_DIAG_PIN PA13 // Driver3 diag signal is connect to X+ +#define E1_DIAG_PIN PC5 // Driver4 diag signal is connect to Y+ +#define E2_DIAG_PIN PB12 // Driver5 diag signal is connect to Z+ +#define E3_DIAG_PIN -1 // Driver6 diag signal is not connect +#define E4_DIAG_PIN -1 // Driver7 diag signal is not connect + +// Limit Switches for endstop +#define X_MIN_PIN PA14 +#define X_MAX_PIN PA13 +#define Y_MIN_PIN PA15 +#define Y_MAX_PIN PC5 +#define Z_MIN_PIN PB13 +#define Z_MAX_PIN PB12 + +// +// Steppers +// Driver 0 1 2 3 4 5 6 7 +// For X Y Z E0 E1 E2 E3 E4(default pin settings) +// +//Driver0 +#define X_ENABLE_PIN PC15 +#define X_STEP_PIN PC14 +#define X_DIR_PIN PC13 +#ifndef X_CS_PIN + #define X_CS_PIN PE6 +#endif +//Driver1 +#define Y_ENABLE_PIN PC15 +#define Y_STEP_PIN PE5 +#define Y_DIR_PIN PE4 +#ifndef Y_CS_PIN + #define Y_CS_PIN PE3 +#endif +//Driver2 +#define Z_ENABLE_PIN PE2 +#define Z_STEP_PIN PE1 +#define Z_DIR_PIN PE0 +#ifndef Z_CS_PIN + #define Z_CS_PIN PB7 +#endif +//Driver3 +#define E0_ENABLE_PIN PB6 +#define E0_STEP_PIN PB5 +#define E0_DIR_PIN PB4 +#ifndef E0_CS_PIN + #define E0_CS_PIN PB3 +#endif +//Driver4 +#define E1_ENABLE_PIN PD7 +#define E1_STEP_PIN PD6 +#define E1_DIR_PIN PD5 +#ifndef E1_CS_PIN + #define E1_CS_PIN PD4 +#endif +//Driver5 +#define E2_ENABLE_PIN PD3 +#define E2_STEP_PIN PD2 +#define E2_DIR_PIN PD1 +#ifndef E2_CS_PIN + #define E2_CS_PIN PD0 +#endif +//Driver6 +#define E3_ENABLE_PIN PC8 +#define E3_STEP_PIN PC7 +#define E3_DIR_PIN PC6 +#ifndef E3_CS_PIN + #define E3_CS_PIN PD15 +#endif +//Driver7 +#define E4_ENABLE_PIN PD14 +#define E4_STEP_PIN PD13 +#define E4_DIR_PIN PD12 +#ifndef E4_CS_PIN + #define E4_CS_PIN PD11 +#endif + +// +// Software SPI pins for TMC2130 stepper drivers +// This board only supports SW SPI for stepper drivers +// +#if HAS_TMC_SPI + #define TMC_USE_SW_SPI +#endif +#if ENABLED(TMC_USE_SW_SPI) + #if !defined(TMC_SW_MOSI) || TMC_SW_MOSI == -1 + #define TMC_SW_MOSI PE14 + #endif + #if !defined(TMC_SW_MISO) || TMC_SW_MISO == -1 + #define TMC_SW_MISO PE13 + #endif + #if !defined(TMC_SW_SCK) || TMC_SW_SCK == -1 + #define TMC_SW_SCK PE12 + #endif +#endif + +#if HAS_TMC_UART + // + // Software serial + // No Hardware serial for steppers + // + #define X_SERIAL_TX_PIN PE6 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PE3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PB7 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PB3 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PD4 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + #define E2_SERIAL_TX_PIN PD0 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN + + #define E3_SERIAL_TX_PIN PD15 + #define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN + + #define E4_SERIAL_TX_PIN PD11 + #define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC1 // TH0 +#define TEMP_1_PIN PC2 // TH1 +#define TEMP_2_PIN PC3 // TH2 +#define TEMP_BED_PIN PC0 // TB + +// +// Heaters / Fans +// +#define HEATER_0_PIN PB1 // HE0 +#define HEATER_1_PIN PB0 // HE1 +#define HEATER_2_PIN PA3 // HE2 +#define HEATER_BED_PIN PB10 // H-BED + +#define FAN_PIN PA2 // FAN0 +#define FAN1_PIN PA1 // FAN1 +#define FAN2_PIN PA0 // FAN2 + +// +// Misc. Functions +// +#define PW_DET PC5 // Y+ +#define PW_OFF PB12 // Z+ +#define MT_DET_1_PIN PW_DET +#define MT_DET_2_PIN PW_OFF +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN MT_DET_1_PIN +#endif +#ifndef FIL_RUNOUT2_PIN + #define FIL_RUNOUT2_PIN MT_DET_2_PIN +#endif + +// +// Power Supply Control +// +#if ENABLED(MKS_PWC) + #define PS_ON_PIN PW_OFF + #define KILL_PIN PW_DET + #define KILL_PIN_STATE HIGH +#endif + +// Random Info +#define USB_SERIAL -1 // USB Serial + +/** + * ------ ------ + * (BEEPER) PB2 |10 9 | PE10 (BTN_ENC) (SPI1 MISO) PA6 |10 9 | PA5 (SPI1 SCK) + * (LCD_EN) PE11 | 8 7 | PD10 (LCD_RS) (BTN_EN1) PE9 | 8 7 | PA4 (SPI1 CS) + * (LCD_D4) PD9 6 5 | PD8 (LCD_D5) (BTN_EN2) PE8 6 5 | PA7 (SPI1 MOSI) + * (LCD_D6) PE15 | 4 3 | PE7 (LCD_D7) (SPI1_RS) PB11 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | 3.3V + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PE7 +#define EXP1_04_PIN PE15 +#define EXP1_05_PIN PD8 +#define EXP1_06_PIN PD9 +#define EXP1_07_PIN PD10 +#define EXP1_08_PIN PE11 +#define EXP1_09_PIN PE10 +#define EXP1_10_PIN PB2 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PB11 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PE8 +#define EXP2_07_PIN PA4 +#define EXP2_08_PIN PE9 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(ONBOARD) + #define ENABLE_SPI3 + #define SD_SS_PIN -1 + #define SDSS PC9 + #define SD_SCK_PIN PC10 + #define SD_MISO_PIN PC11 + #define SD_MOSI_PIN PC12 + #define SD_DETECT_PIN PC4 // SD_DETECT_PIN doesn't work with NO_SD_HOST_DRIVE disabled +#elif SD_CONNECTION_IS(LCD) + #define ENABLE_SPI1 + #define SDSS EXP2_07_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SD_DETECT_PIN EXP2_04_PIN +#endif + +#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI) + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_RST_PIN EXP1_07_PIN + #define TFT_A0_PIN TFT_DC_PIN + + #define TFT_RESET_PIN EXP1_07_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN + + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 + + #define LCD_BACKLIGHT_PIN EXP1_08_PIN + #ifndef TFT_WIDTH + #define TFT_WIDTH 480 + #endif + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #define TOUCH_CS_PIN EXP1_06_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_09_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_10_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_05_PIN // SPI1_MOSI + + #define LCD_READ_ID 0xD3 + #define LCD_USE_DMA_SPI + + #define TFT_BUFFER_SIZE 14400 + + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -17253 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11579 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 514 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -24 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + +#elif HAS_WIRED_LCD + + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_BACKLIGHT_PIN -1 + + // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) + #if ENABLED(MKS_MINI_12864) + //#define LCD_BACKLIGHT_PIN -1 + //#define LCD_RESET_PIN -1 + #define DOGLCD_A0 PD11 + #define DOGLCD_CS EXP1_04_PIN + //#define DOGLCD_SCK EXP2_09_PIN + //#define DOGLCD_MOSI EXP2_05_PIN + + #elif ENABLED(MKS_MINI_12864_V3) + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_06_PIN + #define NEOPIXEL_PIN EXP1_05_PIN + #define DOGLCD_MOSI EXP2_05_PIN + #define DOGLCD_SCK EXP2_09_PIN + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif + //#define LCD_SCREEN_ROT_180 + + #else + + #define LCD_PINS_D4 EXP1_06_PIN + #if ENABLED(ULTIPANEL) + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN + #endif + + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 + + #endif // !MKS_MINI_12864 + +#endif // HAS_WIRED_LCD + +#if ANY(TFT_COLOR_UI, TFT_CLASSIC_UI, HAS_WIRED_LCD) + #define BEEPER_PIN EXP1_10_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + #define BTN_ENC EXP1_09_PIN +#endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h index c2f5f324ba28..589300f34175 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN2.h @@ -21,9 +21,9 @@ */ #pragma once -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "MKS_ROBIN2 supports up to 2 hotends / E-steppers." #endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h new file mode 100644 index 000000000000..3cba69a7b30a --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V1_3_F4.h @@ -0,0 +1,45 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * MKS Robin nano V1.3 (STM32F407VET6) board pin assignments + * https://github.com/makerbase-mks/MKS-Robin-Nano-V1.X/tree/master/hardware + */ + +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#define BOARD_INFO_NAME "MKS Robin Nano V1.3" + +// +// EEPROM +// Use one of these or SDCard-based Emulation will be used +// +#if NO_EEPROM_SELECTED + //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation + //#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation +#endif + +#define LED_PIN PB1 + +#include "../stm32f1/pins_MKS_ROBIN_NANO_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h index 8e22a68b9852..4dc73e031270 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h @@ -21,9 +21,10 @@ */ #pragma once -#if NOT_TARGET(STM32F4, STM32F4xx) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin Nano V3 supports up to 2 hotends / E-steppers." #elif HAS_FSMC_TFT #error "MKS Robin Nano V3 doesn't support FSMC-based TFT displays." @@ -31,77 +32,22 @@ #define BOARD_INFO_NAME "MKS Robin Nano V3" -// USB Flash Drive support -#define HAS_OTG_USB_HOST_SUPPORT - -// Avoid conflict with TIMER_TONE -#define STEP_TIMER 10 - -// Use one of these or SDCard-based Emulation will be used -//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation -//#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation -#define I2C_EEPROM -#define MARLIN_EEPROM_SIZE 0x1000 // 4KB - -// -// Release PB4 (Z_DIR_PIN) from JTAG NRST role -// -//#define DISABLE_DEBUG - -// -// Servos -// -#define SERVO0_PIN PA8 // Enable BLTOUCH - -// -// Limit Switches -// -#define X_DIAG_PIN PD15 -#define Y_DIAG_PIN PD2 -#define Z_DIAG_PIN PC8 -#define E0_DIAG_PIN PC4 -#define E1_DIAG_PIN PE7 - -// -#define X_STOP_PIN PA15 -#define Y_STOP_PIN PD2 -#define Z_MIN_PIN PC8 -#define Z_MAX_PIN PC4 - -// -// Steppers -// -#define X_ENABLE_PIN PE4 -#define X_STEP_PIN PE3 -#define X_DIR_PIN PE2 #ifndef X_CS_PIN #define X_CS_PIN PD5 #endif -#define Y_ENABLE_PIN PE1 -#define Y_STEP_PIN PE0 -#define Y_DIR_PIN PB9 #ifndef Y_CS_PIN #define Y_CS_PIN PD7 #endif -#define Z_ENABLE_PIN PB8 -#define Z_STEP_PIN PB5 -#define Z_DIR_PIN PB4 #ifndef Z_CS_PIN #define Z_CS_PIN PD4 #endif -#define E0_ENABLE_PIN PB3 -#define E0_STEP_PIN PD6 -#define E0_DIR_PIN PD3 #ifndef E0_CS_PIN #define E0_CS_PIN PD9 #endif -#define E1_ENABLE_PIN PA3 -#define E1_STEP_PIN PD15 -#define E1_DIR_PIN PA1 #ifndef E1_CS_PIN #define E1_CS_PIN PD8 #endif @@ -125,233 +71,4 @@ #endif #endif -#if HAS_TMC_UART - // - // Software serial - // No Hardware serial for steppers - // - #define X_SERIAL_TX_PIN PD5 - #define X_SERIAL_RX_PIN PD5 - - #define Y_SERIAL_TX_PIN PD7 - #define Y_SERIAL_RX_PIN PD7 - - #define Z_SERIAL_TX_PIN PD4 - #define Z_SERIAL_RX_PIN PD4 - - #define E0_SERIAL_TX_PIN PD9 - #define E0_SERIAL_RX_PIN PD9 - - #define E1_SERIAL_TX_PIN PD8 - #define E1_SERIAL_RX_PIN PD8 - - // Reduce baud rate to improve software serial reliability - #define TMC_BAUD_RATE 19200 -#endif - -// -// Temperature Sensors -// -#define TEMP_0_PIN PC1 // TH1 -#define TEMP_1_PIN PA2 // TH2 -#define TEMP_BED_PIN PC0 // TB1 - -// -// Heaters / Fans -// -#define HEATER_0_PIN PE5 // HEATER1 -#define HEATER_1_PIN PB0 // HEATER2 -#define HEATER_BED_PIN PA0 // HOT BED - -#define FAN_PIN PB1 // FAN -#define FAN1_PIN PC14 // FAN1 - -// -// Thermocouples -// -//#define MAX6675_SS_PIN HEATER_0_PIN // TC1 - CS1 -//#define MAX6675_SS_PIN HEATER_1_PIN // TC2 - CS2 - -// -// Misc. Functions -// -#define MT_DET_1 PA4 -#define MT_DET_2 PE6 -#define PW_DET PA13 -#define PW_OFF PB2 - -#ifndef FIL_RUNOUT_PIN - #define FIL_RUNOUT_PIN MT_DET_1 -#endif -#ifndef FIL_RUNOUT2_PIN - #define FIL_RUNOUT2_PIN MT_DET_2 -#endif - -#define POWER_LOSS_PIN PW_DET -#define PS_ON_PIN PW_OFF -// -// Enable MKSPWC support -// -//#define SUICIDE_PIN PB2 -//#define KILL_PIN PA2 -//#define KILL_PIN_INVERTING true - -//#define LED_PIN PB2 - -// Random Info -#define USB_SERIAL -1 // USB Serial -#define WIFI_SERIAL 3 // USART3 -#define MKS_WIFI_MODULE_SERIAL 1 // USART1 -#define MKS_WIFI_MODULE_SPI 2 // SPI2 - -#ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION ONBOARD -#endif - -// -// Onboard SD card -// -// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled -#if SD_CONNECTION_IS(ONBOARD) - #define CUSTOM_SPI_PINS // TODO: needed because is the only way to set SPI3 for SD on STM32 (by now) - #if ENABLED(CUSTOM_SPI_PINS) - #define ENABLE_SPI3 - #define SD_SS_PIN -1 - #define SDSS PC9 - #define SD_SCK_PIN PC10 - #define SD_MISO_PIN PC11 - #define SD_MOSI_PIN PC12 - #define SD_DETECT_PIN PD12 - #endif -#endif - -// -// LCD SD -// -#if SD_CONNECTION_IS(LCD) - #define CUSTOM_SPI_PINS - #if ENABLED(CUSTOM_SPI_PINS) - #define ENABLE_SPI1 - #define SDSS PE10 - #define SD_SCK_PIN PA5 - #define SD_MISO_PIN PA6 - #define SD_MOSI_PIN PA7 - #define SD_DETECT_PIN PE12 - #endif -#endif - -// -// LCD / Controller -#define SPI_FLASH -#define HAS_SPI_FLASH 1 -#define SPI_DEVICE 2 -#define SPI_FLASH_SIZE 0x1000000 -#if ENABLED(SPI_FLASH) - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PC3 - #define W25QXX_MISO_PIN PC2 - #define W25QXX_SCK_PIN PB13 -#endif - -/** - * _____ _____ - * (BEEPER)PC5 | · · | PE13(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK) - * (LCD_EN)PD13 | · · | PC6(LCD_RS) (BTN_EN1) PE8 | · · | PE10 (SPI1 CS) - * (LCD_D4)PE14 | · · PE15(LCD_D5) (BTN_EN2) PE11 | · · PA7 (SPI1 MOSI) - * (LCD_D6)PD11 | · · | PD10(LCD_D7) (SPI1_RS) PE12 | · · | RESET - * GND | · · | 5V GND | · · | 3.3V - *  ̄ ̄ ̄  ̄ ̄ ̄ - * EXP1 EXP2 - */ - -#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) - #ifndef TOUCH_CALIBRATION_X - #define TOUCH_CALIBRATION_X -17253 - #endif - #ifndef TOUCH_CALIBRATION_Y - #define TOUCH_CALIBRATION_Y 11579 - #endif - #ifndef TOUCH_OFFSET_X - #define TOUCH_OFFSET_X 514 - #endif - #ifndef TOUCH_OFFSET_Y - #define TOUCH_OFFSET_Y -24 - #endif - #ifndef TOUCH_ORIENTATION - #define TOUCH_ORIENTATION TOUCH_LANDSCAPE - #endif - - #define TFT_CS_PIN PD11 - #define TFT_SCK_PIN PA5 - #define TFT_MISO_PIN PA6 - #define TFT_MOSI_PIN PA7 - #define TFT_DC_PIN PD10 - #define TFT_RST_PIN PC6 - #define TFT_A0_PIN TFT_DC_PIN - - #define TFT_RESET_PIN PC6 - #define TFT_BACKLIGHT_PIN PD13 - - #define TOUCH_BUTTONS_HW_SPI - #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 - - #define LCD_BACKLIGHT_PIN PD13 - #ifndef TFT_WIDTH - #define TFT_WIDTH 480 - #endif - #ifndef TFT_HEIGHT - #define TFT_HEIGHT 320 - #endif - - #define TOUCH_CS_PIN PE14 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI - - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 - - #define LCD_READ_ID 0xD3 - #define LCD_USE_DMA_SPI - - #define TFT_BUFFER_SIZE 14400 - -#elif HAS_SPI_LCD - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 - #define LCD_PINS_ENABLE PD13 - #define LCD_PINS_RS PC6 - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 - #define LCD_BACKLIGHT_PIN -1 - - // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) - #if ENABLED(MKS_MINI_12864) - //#define LCD_BACKLIGHT_PIN -1 - //#define LCD_RESET_PIN -1 - #define DOGLCD_A0 PD11 - #define DOGLCD_CS PE15 - //#define DOGLCD_SCK PA5 - //#define DOGLCD_MOSI PA7 - - // Required for MKS_MINI_12864 with this board - //#define MKS_LCD12864B - //#undef SHOW_BOOTSCREEN - - #else // !MKS_MINI_12864 - - #define LCD_PINS_D4 PE14 - #if ENABLED(ULTIPANEL) - #define LCD_PINS_D5 PE15 - #define LCD_PINS_D6 PD11 - #define LCD_PINS_D7 PD10 - #endif - - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #define BOARD_ST7920_DELAY_3 DELAY_NS(600) - - #endif // !MKS_MINI_12864 -#endif // HAS_SPI_LCD +#include "pins_MKS_ROBIN_NANO_V3_common.h" diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h new file mode 100644 index 000000000000..c3e3963b551f --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h @@ -0,0 +1,375 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#pragma once + +// +// MKS Robin Nano V3, MKS Eagle pinmap +// + +// USB Flash Drive support +#define HAS_OTG_USB_HOST_SUPPORT + +// Avoid conflict with TIMER_TONE +#define STEP_TIMER 10 + +// Use one of these or SDCard-based Emulation will be used +//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation +//#define FLASH_EEPROM_EMULATION // Use Flash-based EEPROM emulation +#if EITHER(NO_EEPROM_SELECTED, I2C_EEPROM) + #define I2C_EEPROM + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB + #define I2C_SCL_PIN PB6 + #define I2C_SDA_PIN PB7 +#endif + +// +// Release PB4 (Z_DIR_PIN) from JTAG NRST role +// +//#define DISABLE_DEBUG + +// +// Servos +// +#define SERVO0_PIN PA8 // Enable BLTOUCH + +// +// Limit Switches +// +#define X_DIAG_PIN PA15 +#define Y_DIAG_PIN PD2 +#define Z_DIAG_PIN PC8 +#define E0_DIAG_PIN PC4 +#define E1_DIAG_PIN PE7 + +#define X_STOP_PIN X_DIAG_PIN +#define Y_STOP_PIN Y_DIAG_PIN +#define Z_MIN_PIN Z_DIAG_PIN +#define Z_MAX_PIN E0_DIAG_PIN + +// +// Steppers +// +#define X_ENABLE_PIN PE4 +#define X_STEP_PIN PE3 +#define X_DIR_PIN PE2 + +#define Y_ENABLE_PIN PE1 +#define Y_STEP_PIN PE0 +#define Y_DIR_PIN PB9 + +#define Z_ENABLE_PIN PB8 +#define Z_STEP_PIN PB5 +#define Z_DIR_PIN PB4 + +#define E0_ENABLE_PIN PB3 +#define E0_STEP_PIN PD6 +#define E0_DIR_PIN PD3 + +#define E1_ENABLE_PIN PA3 +#define E1_STEP_PIN PD15 +#define E1_DIR_PIN PA1 + +#if HAS_TMC_UART + // + // Software serial + // No Hardware serial for steppers + // + #define X_SERIAL_TX_PIN PD5 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PD7 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PD4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PD9 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PD8 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC1 // TH1 +#define TEMP_1_PIN PA2 // TH2 +#define TEMP_BED_PIN PC0 // TB1 + +// +// Heaters / Fans +// +#define HEATER_0_PIN PE5 // HEATER1 +#define HEATER_1_PIN PB0 // HEATER2 +#define HEATER_BED_PIN PA0 // HOT BED + +#define FAN_PIN PC14 // FAN +#define FAN1_PIN PB1 // FAN1 + +// +// Thermocouples +// +//#define TEMP_0_CS_PIN HEATER_0_PIN // TC1 - CS1 +//#define TEMP_0_CS_PIN HEATER_1_PIN // TC2 - CS2 + +// +// Misc. Functions +// +#if HAS_TFT_LVGL_UI + #define MT_DET_1_PIN PA4 // MT_DET + #define MT_DET_2_PIN PE6 + #define MT_DET_PIN_STATE LOW +#endif + +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN MT_DET_1_PIN +#endif +#ifndef FIL_RUNOUT2_PIN + #define FIL_RUNOUT2_PIN MT_DET_2_PIN +#endif + +#ifndef POWER_LOSS_PIN + #define POWER_LOSS_PIN PA13 // PW_DET +#endif + +//#define SUICIDE_PIN PB2 +//#define LED_PIN PB2 +//#define KILL_PIN PA2 +//#define KILL_PIN_STATE LOW + +// +// Power Supply Control +// +#if ENABLED(MKS_PWC) + #if ENABLED(TFT_LVGL_UI) + #undef PSU_CONTROL + #undef MKS_PWC + #define SUICIDE_PIN PB2 + #define SUICIDE_PIN_STATE LOW + #else + #define PS_ON_PIN PB2 // PW_OFF + #endif + #define KILL_PIN PA13 // PW_DET + #define KILL_PIN_STATE HIGH +#endif + +// Random Info +#define USB_SERIAL -1 // USB Serial +#define WIFI_SERIAL 3 // USART3 +#define MKS_WIFI_MODULE_SERIAL 1 // USART1 +#define MKS_WIFI_MODULE_SPI 2 // SPI2 + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +// MKS WIFI MODULE +#if ENABLED(MKS_WIFI_MODULE) + #define WIFI_IO0_PIN PC13 + #define WIFI_IO1_PIN PC7 + #define WIFI_RESET_PIN PE9 +#endif + +// MKS TEST +#if ENABLED(MKS_TEST) + #define MKS_TEST_POWER_LOSS_PIN PA13 // PW_DET + #define MKS_TEST_PS_ON_PIN PB2 // PW_OFF +#endif + +// +// Onboard SD card +// +// detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled +#if SD_CONNECTION_IS(ONBOARD) + #define ENABLE_SPI3 + #define SD_SS_PIN -1 + #define SDSS PC9 + #define SD_SCK_PIN PC10 + #define SD_MISO_PIN PC11 + #define SD_MOSI_PIN PC12 + #define SD_DETECT_PIN PD12 +#endif + +#define SPI_FLASH +#if ENABLED(SPI_FLASH) + #define HAS_SPI_FLASH 1 + #define SPI_DEVICE 2 + #define SPI_FLASH_SIZE 0x1000000 + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PC3 + #define SPI_FLASH_MISO_PIN PC2 + #define SPI_FLASH_SCK_PIN PB13 +#endif + +/** + * ------ ------ + * (BEEPER) PC5 |10 9 | PE13 (BTN_ENC) (SPI1 MISO) PA6 |10 9 | PA5 (SPI1 SCK) + * (LCD_EN) PD13 | 8 7 | PC6 (LCD_RS) (BTN_EN1) PE8 | 8 7 | PE10 (SPI1 CS) + * (LCD_D4) PE14 6 5 | PE15 (LCD_D5) (BTN_EN2) PE11 6 5 | PA7 (SPI1 MOSI) + * (LCD_D6) PD11 | 4 3 | PD10 (LCD_D7) (SPI1_RS) PE12 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | 3.3V + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PD10 +#define EXP1_04_PIN PD11 +#define EXP1_05_PIN PE15 +#define EXP1_06_PIN PE14 +#define EXP1_07_PIN PC6 +#define EXP1_08_PIN PD13 +#define EXP1_09_PIN PE13 +#define EXP1_10_PIN PC5 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PE12 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PE11 +#define EXP2_07_PIN PE10 +#define EXP2_08_PIN PE8 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + +// +// SPI SD Card +// +#if SD_CONNECTION_IS(LCD) + #define ENABLE_SPI1 + #define SDSS EXP2_07_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SD_DETECT_PIN EXP2_04_PIN +#endif + +// +// LCD / Controller +// +#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_RST_PIN EXP1_07_PIN + #define TFT_A0_PIN TFT_DC_PIN + + #define TFT_RESET_PIN EXP1_07_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN + + #define TOUCH_BUTTONS_HW_SPI + #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 + + #define LCD_BACKLIGHT_PIN EXP1_08_PIN + #ifndef TFT_WIDTH + #define TFT_WIDTH 480 + #endif + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #define TOUCH_CS_PIN EXP1_06_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_09_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_10_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_05_PIN // SPI1_MOSI + + #define LCD_READ_ID 0xD3 + #define LCD_USE_DMA_SPI + + #define TFT_BUFFER_SIZE 14400 + + #ifndef TOUCH_CALIBRATION_X + #define TOUCH_CALIBRATION_X -17253 + #endif + #ifndef TOUCH_CALIBRATION_Y + #define TOUCH_CALIBRATION_Y 11579 + #endif + #ifndef TOUCH_OFFSET_X + #define TOUCH_OFFSET_X 514 + #endif + #ifndef TOUCH_OFFSET_Y + #define TOUCH_OFFSET_Y -24 + #endif + #ifndef TOUCH_ORIENTATION + #define TOUCH_ORIENTATION TOUCH_LANDSCAPE + #endif + +#elif HAS_WIRED_LCD + + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define LCD_BACKLIGHT_PIN -1 + + // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) + #if ENABLED(MKS_MINI_12864) + //#define LCD_BACKLIGHT_PIN -1 + //#define LCD_RESET_PIN -1 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + //#define DOGLCD_SCK EXP2_09_PIN + //#define DOGLCD_MOSI EXP2_05_PIN + + // Required for MKS_MINI_12864 with this board + //#define MKS_LCD12864B + //#undef SHOW_BOOTSCREEN + + #elif ENABLED(MKS_MINI_12864_V3) + #define DOGLCD_CS EXP1_08_PIN + #define DOGLCD_A0 EXP1_07_PIN + #define LCD_PINS_DC DOGLCD_A0 + #define LCD_BACKLIGHT_PIN -1 + #define LCD_RESET_PIN EXP1_06_PIN + #define NEOPIXEL_PIN EXP1_05_PIN + #define DOGLCD_MOSI EXP2_05_PIN + #define DOGLCD_SCK EXP2_09_PIN + #if SD_CONNECTION_IS(ONBOARD) + #define FORCE_SOFT_SPI + #endif + //#define LCD_SCREEN_ROT_180 + + #else // !MKS_MINI_12864 + + #define LCD_PINS_D4 EXP1_06_PIN + #if ENABLED(ULTIPANEL) + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN + #endif + + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 + + #endif // !MKS_MINI_12864 + +#endif // HAS_WIRED_LCD + +#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI, HAS_WIRED_LCD) + #define BEEPER_PIN EXP1_10_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + #define BTN_ENC EXP1_09_PIN +#endif diff --git a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h index 5533e35f07cf..46dec71c11c1 100644 --- a/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h +++ b/Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h @@ -21,16 +21,17 @@ */ #pragma once -#if NOT_TARGET(STM32F4, STM32F4xx) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "MKS Robin Nano V3 supports up to 1 hotends / E-steppers." #endif #define BOARD_INFO_NAME "MKS Robin PRO V2" // Avoid conflict with TIMER_TONE -#define STEP_TIMER 10 +#define STEP_TIMER 10 // Use one of these or SDCard-based Emulation will be used //#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation @@ -49,7 +50,7 @@ // // Note: MKS Robin board is using SPI2 interface. // -//#define SPI_MODULE 2 +//#define SPI_MODULE 2 // // Servos @@ -146,24 +147,20 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // - #define X_SERIAL_TX_PIN PD5 - #define X_SERIAL_RX_PIN PD5 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PD7 - #define Y_SERIAL_RX_PIN PD7 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PD4 - #define Z_SERIAL_RX_PIN PD4 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN #define E0_SERIAL_TX_PIN PD9 - #define E0_SERIAL_RX_PIN PD9 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #define E1_SERIAL_TX_PIN PD8 - #define E1_SERIAL_RX_PIN PD8 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN // Reduce baud rate to improve software serial reliability #define TMC_BAUD_RATE 19200 @@ -188,21 +185,28 @@ // // Thermocouples // -//#define MAX6675_SS_PIN PE5 // TC1 - CS1 -//#define MAX6675_SS_PIN PE6 // TC2 - CS2 +//#define TEMP_0_CS_PIN PE5 // TC1 - CS1 +//#define TEMP_0_CS_PIN PE6 // TC2 - CS2 // // Misc. Functions // //#define POWER_LOSS_PIN PA2 // PW_DET //#define PS_ON_PIN PA3 // PW_OFF -//#define SUICIDE_PIN PB2 // Enable MKSPWC support -//#define KILL_PIN PA2 // Enable MKSPWC support -//#define KILL_PIN_INVERTING true // Enable MKSPWC support -//#define LED_PIN PB2 + +// +// Power Supply Control +// +#if ENABLED(MKS_PWC) + #define SUICIDE_PIN PB2 + #define KILL_PIN PA2 + #define KILL_PIN_STATE LOW +#else + #define LED_PIN PB2 +#endif #ifndef SDCARD_CONNECTION - #define SDCARD_CONNECTION ONBOARD + #define SDCARD_CONNECTION ONBOARD #endif //#define USE_NEW_SPI_API 1 @@ -211,39 +215,59 @@ // Onboard SD card // NOT compatible with LCD // -// detect pin dont work when ONBOARD and NO_SD_HOST_DRIVE disabled -#if !defined(SDCARD_CONNECTION) || SDCARD_CONNECTION == ONBOARD - #define CUSTOM_SPI_PINS - #if ENABLED(CUSTOM_SPI_PINS) - - #if USE_NEW_SPI_API - #define SD_SPI MARLIN_SPI(HardwareSPI3, PC9) - #else - #define ENABLE_SPI3 - #define SD_SS_PIN -1 - #define SDSS PC9 - #define SD_SCK_PIN PC10 - #define SD_MISO_PIN PC11 - #define SD_MOSI_PIN PC12 - #endif - #define SD_DETECT_PIN PD12 +// Detect pin doesn't work when ONBOARD and NO_SD_HOST_DRIVE disabled +#if SD_CONNECTION_IS(ONBOARD) + #if USE_NEW_SPI_API + #define SD_SPI MARLIN_SPI(HardwareSPI3, PC9) + #else + #define ENABLE_SPI3 + #define SD_SS_PIN -1 + #define SDSS PC9 + #define SD_SCK_PIN PC10 + #define SD_MISO_PIN PC11 + #define SD_MOSI_PIN PC12 #endif + #define SD_DETECT_PIN PD12 #endif -/* +/** ------ ------ + * (BEEPER) PC5 |10 9 | PE13 (BTN_ENC) (SPI1 MISO) PA6 |10 9 | PA5 (SPI1 SCK) + * (LCD_EN) PD13 | 8 7 | PC6 (LCD_RS) (BTN_EN1) PE8 | 8 7 | PE10 (SPI1 CS) + * (LCD_D4) PE14 6 5 | PE15 (LCD_D5) (BTN_EN2) PE11 6 5 | PA7 (SPI1 MOSI) + * (LCD_D6) PD11 | 4 3 | PD10 (LCD_D7) (SPI DET) PE12 | 4 3 | RESET + * GND | 2 1 | 5V GND | 2 1 | 3.3V + * ------ ------ + * EXP1 EXP2 + */ +#define EXP1_03_PIN PD10 +#define EXP1_04_PIN PD11 +#define EXP1_05_PIN PE15 +#define EXP1_06_PIN PE14 +#define EXP1_07_PIN PC6 +#define EXP1_08_PIN PD13 +#define EXP1_09_PIN PE13 +#define EXP1_10_PIN PC5 + +#define EXP2_03_PIN -1 // RESET +#define EXP2_04_PIN PE12 +#define EXP2_05_PIN PA7 +#define EXP2_06_PIN PE11 +#define EXP2_07_PIN PE10 +#define EXP2_08_PIN PE8 +#define EXP2_09_PIN PA5 +#define EXP2_10_PIN PA6 + // // LCD SD // -#if SDCARD_CONNECTION == LCD - #define CUSTOM_SPI_PINS - #if ENABLED(CUSTOM_SPI_PINS) - #define ENABLE_SPI1 - #define SDSS PE10 - #define SD_SCK_PIN PA5 - #define SD_MISO_PIN PA6 - #define SD_MOSI_PIN PA7 - #define SD_DETECT_PIN PE12 - #endif +/* +#if SD_CONNECTION_IS(LCD) + #define ENABLE_SPI1 + #define SDSS EXP2_07_PIN + #define SD_SCK_PIN EXP2_09_PIN + #define SD_MISO_PIN EXP2_10_PIN + #define SD_MOSI_PIN EXP2_05_PIN + #define SD_DETECT_PIN EXP2_04_PIN #endif */ @@ -254,23 +278,12 @@ #define SPI_DEVICE 2 #define SPI_FLASH_SIZE 0x1000000 #if ENABLED(SPI_FLASH) - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define SPI_FLASH_CS_PIN PB12 + #define SPI_FLASH_MOSI_PIN PB15 + #define SPI_FLASH_MISO_PIN PB14 + #define SPI_FLASH_SCK_PIN PB13 #endif -/** - * _____ _____ - * (BEEPER)PC5 | · · | PE13(BTN_ENC) (SPI1 MISO) PA6 | · · | PA5 (SPI1 SCK) - * (LCD_EN)PD13 | · · | PC6(LCD_RS) (BTN_EN1) PE8 | · · | PE10 (SPI1 CS) - * (LCD_D4)PE14 | · · | PE15(LCD_D5) (BTN_EN2) PE11 | · · | PA7 (SPI1 MOSI) - * (LCD_D6)PD11 | · · | PD10(LCD_D7) (SPI DET) PE12 | · · | RESET - * GND | · · | 5V GND | · · | 3.3V - *  ̄ ̄ ̄  ̄ ̄ ̄ - * EXP1 EXP2 - */ - #if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI) #ifndef TOUCH_CALIBRATION_X #define TOUCH_CALIBRATION_X -17253 @@ -288,21 +301,21 @@ #define TOUCH_ORIENTATION TOUCH_LANDSCAPE #endif - #define TFT_CS_PIN PD11 - #define TFT_SCK_PIN PA5 - #define TFT_MISO_PIN PA6 - #define TFT_MOSI_PIN PA7 - #define TFT_DC_PIN PD10 - #define TFT_RST_PIN PC6 + #define TFT_CS_PIN EXP1_04_PIN + #define TFT_SCK_PIN EXP2_09_PIN + #define TFT_MISO_PIN EXP2_10_PIN + #define TFT_MOSI_PIN EXP2_05_PIN + #define TFT_DC_PIN EXP1_03_PIN + #define TFT_RST_PIN EXP1_07_PIN #define TFT_A0_PIN TFT_DC_PIN - #define TFT_RESET_PIN PC6 - #define TFT_BACKLIGHT_PIN PD13 + #define TFT_RESET_PIN EXP1_07_PIN + #define TFT_BACKLIGHT_PIN EXP1_08_PIN #define TOUCH_BUTTONS_HW_SPI #define TOUCH_BUTTONS_HW_SPI_DEVICE 1 - #define LCD_BACKLIGHT_PIN PD13 + #define LCD_BACKLIGHT_PIN EXP1_08_PIN #ifndef TFT_WIDTH #define TFT_WIDTH 480 #endif @@ -310,15 +323,15 @@ #define TFT_HEIGHT 320 #endif - #define TOUCH_CS_PIN PE14 // SPI1_NSS - #define TOUCH_SCK_PIN PA5 // SPI1_SCK - #define TOUCH_MISO_PIN PA6 // SPI1_MISO - #define TOUCH_MOSI_PIN PA7 // SPI1_MOSI + #define TOUCH_CS_PIN EXP1_06_PIN // SPI1_NSS + #define TOUCH_SCK_PIN EXP2_09_PIN // SPI1_SCK + #define TOUCH_MISO_PIN EXP2_10_PIN // SPI1_MISO + #define TOUCH_MOSI_PIN EXP2_05_PIN // SPI1_MOSI - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN #define LCD_READ_ID 0xD3 #define LCD_USE_DMA_SPI @@ -326,23 +339,24 @@ //#define TFT_DRIVER ST7796 #define TFT_BUFFER_SIZE 14400 -#elif HAS_SPI_LCD - #define BEEPER_PIN PC5 - #define BTN_ENC PE13 - #define LCD_PINS_ENABLE PD13 - #define LCD_PINS_RS PC6 - #define BTN_EN1 PE8 - #define BTN_EN2 PE11 +#elif HAS_WIRED_LCD + + #define BEEPER_PIN EXP1_10_PIN + #define BTN_ENC EXP1_09_PIN + #define LCD_PINS_ENABLE EXP1_08_PIN + #define LCD_PINS_RS EXP1_07_PIN + #define BTN_EN1 EXP2_08_PIN + #define BTN_EN2 EXP2_06_PIN #define LCD_BACKLIGHT_PIN -1 // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor) #if ENABLED(MKS_MINI_12864) //#define LCD_BACKLIGHT_PIN -1 //#define LCD_RESET_PIN -1 - #define DOGLCD_A0 PD11 - #define DOGLCD_CS PE15 - //#define DOGLCD_SCK PA5 - //#define DOGLCD_MOSI PA7 + #define DOGLCD_A0 EXP1_04_PIN + #define DOGLCD_CS EXP1_05_PIN + //#define DOGLCD_SCK EXP2_09_PIN + //#define DOGLCD_MOSI EXP2_05_PIN // Required for MKS_MINI_12864 with this board //#define MKS_LCD12864B @@ -350,22 +364,17 @@ #else // !MKS_MINI_12864 - #define LCD_PINS_D4 PE14 + #define LCD_PINS_D4 EXP1_06_PIN #if ENABLED(ULTIPANEL) - #define LCD_PINS_D5 PE15 - #define LCD_PINS_D6 PD11 - #define LCD_PINS_D7 PD10 + #define LCD_PINS_D5 EXP1_05_PIN + #define LCD_PINS_D6 EXP1_04_PIN + #define LCD_PINS_D7 EXP1_03_PIN #endif - #ifndef ST7920_DELAY_1 - #define ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef ST7920_DELAY_2 - #define ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef ST7920_DELAY_3 - #define ST7920_DELAY_3 DELAY_NS(600) - #endif + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 600 #endif // !MKS_MINI_12864 -#endif // HAS_SPI_LCD + +#endif // HAS_WIRED_LCD diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h index a60a2781495c..f2073457b13b 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h @@ -51,7 +51,6 @@ #if MB(RUMBA32_V1_1) #define SERVO0_PIN PA15 - #undef BTN_PIN #if HAS_TMC_UART // diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h new file mode 100644 index 000000000000..04dcc432cae1 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_BTT.h @@ -0,0 +1,67 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +/** + * No offical schematics have been found. + * But these differences where noted in https://github.com/bigtreetech/Rumba32/issues/1 + */ + +#define BOARD_INFO_NAME "RUMBA32 (BTT)" + +#if NO_EEPROM_SELECTED + #define I2C_EEPROM + #define MARLIN_EEPROM_SIZE 0x2000 // 8KB (24LC64T-I/OT) +#endif + +#if ENABLED(FLASH_EEPROM_EMULATION) + // Decrease delays and flash wear by spreading writes across the + // 128 kB sector allocated for EEPROM emulation. + #define FLASH_EEPROM_LEVELING +#endif + +#include "pins_RUMBA32_common.h" + +#define SERVO0_PIN PA15 // Pin is not broken out, is a test point only. + +#if HAS_TMC_UART + // + // TMC2208/TMC2209 Software Serial + // + #define X_SERIAL_TX_PIN PC14 // BTT Rumba32 only uses 1 pin for UART + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PE4 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PE0 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PC13 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PD5 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + #define E2_SERIAL_TX_PIN PD1 + #define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN +#endif diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h index 4dce7b79c019..0b539417d6d0 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h @@ -67,9 +67,6 @@ //#define E3_HARDWARE_SERIAL Serial1 //#define E4_HARDWARE_SERIAL Serial1 - // - // Software serial - // #define X_SERIAL_TX_PIN PA3 #define X_SERIAL_RX_PIN PC14 diff --git a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h index 2a0cfa897cf4..4c0e3515f6c7 100644 --- a/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h +++ b/Marlin/src/pins/stm32f4/pins_RUMBA32_common.h @@ -25,9 +25,9 @@ * Common pin assignments for all RUMBA32 boards */ -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 3 || E_STEPPERS > 3 +#include "env_validate.h" + +#if HOTENDS > 3 || E_STEPPERS > 3 #error "RUMBA32 boards support up to 3 hotends / E-steppers." #endif @@ -45,8 +45,8 @@ // This will be difficult to solve from the Arduino IDE, without modifying the RUMBA32 variant // included with the STM32 framework. -#define STEP_TIMER 10 -#define TEMP_TIMER 14 +#define STEP_TIMER 10 +#define TEMP_TIMER 14 // // Limit Switches @@ -134,7 +134,6 @@ // Misc. Functions // #define LED_PIN PB14 -#define BTN_PIN PC10 #define PS_ON_PIN PE11 #define KILL_PIN PC5 @@ -168,20 +167,13 @@ #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) #define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder #endif - #endif - // Alter timing for graphical display - #if HAS_MARLINUI_U8GLIB - #ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) - #endif - #ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) - #endif - #ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(640) - #endif - #endif +#endif // HAS_WIRED_LCD +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 640 #endif diff --git a/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h b/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h index 25679517c269..7ccb57e2387b 100644 --- a/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h +++ b/Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h @@ -19,6 +19,7 @@ * along with this program. If not, see . * */ +#pragma once // Source: https://github.com/stm32duino/Arduino_Core_STM32/blob/master/variants/ST3DP001_EVAL/variant.cpp @@ -38,11 +39,7 @@ * C Runtime Library: "newlib Nano (default)" */ -#pragma once - -#if NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#endif +#include "env_validate.h" #ifndef MACHINE_NAME #define MACHINE_NAME "STEVAL-3DP001V1" @@ -175,7 +172,6 @@ // // Misc functions // -#define SDSS 16 // PA4 SPI_CS #define LED_PIN -1 // 9 // PE1 green LED Heart beat #define PS_ON_PIN -1 #define KILL_PIN -1 @@ -247,7 +243,6 @@ #ifndef SDIO_SUPPORT #define SOFTWARE_SPI // Use soft SPI for onboard SD - #undef SDSS #define SDSS SDIO_D3_PIN #define SD_SCK_PIN SDIO_CK_PIN #define SD_MISO_PIN SDIO_D0_PIN @@ -255,6 +250,10 @@ #endif #endif +#ifndef SDSS + #define SDSS 16 // PA4 SPI_CS +#endif + // OTG // 30 // PA11 OTG_DM // 31 // PA12 OTG_DP diff --git a/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h new file mode 100644 index 000000000000..bff3f5b6ee4c --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_TH3D_EZBOARD_LITE_V2.h @@ -0,0 +1,261 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#define BOARD_INFO_NAME "TH3D EZBoard Lite V2" +#define BOARD_WEBSITE_URL "th3dstudio.com" + +//#define V3_EZABL_ON_SERVO // As in TH3D Firmware Config + +#define DISABLE_JTAGSWD // Disabling J-tag and Debug via SWD + +// Onboard I2C EEPROM +#if NO_EEPROM_SELECTED + #define I2C_EEPROM + #define MARLIN_EEPROM_SIZE 0x1000 // 4KB + #define I2C_SCL_PIN PB6 + #define I2C_SDA_PIN PB7 + #undef NO_EEPROM_SELECTED +#endif + +// +// Neopixels +// +#define NEOPIXEL_PIN PA8 + +// +// Servos +// +#if ENABLED(V3_EZABL_ON_SERVO) + #define SERVO0_PIN -1 +#else + #define SERVO0_PIN PA2 +#endif + +// +// Limit Switches +// +#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING) + // Sensorless homing pins + #if ENABLED(X_AXIS_SENSORLESS_HOMING) + #define X_STOP_PIN PB4 + #else + #define X_STOP_PIN PC1 + #endif + + #if ENABLED(Y_AXIS_SENSORLESS_HOMING) + #define Y_STOP_PIN PB9 + #else + #define Y_STOP_PIN PC2 + #endif + + //#define Z_STOP_PIN PC15 // Don't use sensorless homing on Z! + + #define E_STOP_PIN PB10 +#else + // Standard Endstop Pins + #define X_STOP_PIN PC1 + #define Y_STOP_PIN PC2 +#endif + +#if ENABLED(V3_EZABL_ON_SERVO) + #define Z_STOP_PIN PA2 +#else + #define Z_STOP_PIN PC3 +#endif + +// +// Filament Runout Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PC0 +#endif + +// +// Steppers +// +#define X_STEP_PIN PB3 +#define X_DIR_PIN PD2 +#define X_ENABLE_PIN PB5 + +#define Y_STEP_PIN PB8 +#define Y_DIR_PIN PC13 +#define Y_ENABLE_PIN PC12 + +#define Z_STEP_PIN PA3 +#define Z_DIR_PIN PB1 +#define Z_ENABLE_PIN PC14 + +#define E0_STEP_PIN PA15 +#define E0_DIR_PIN PB11 +#define E0_ENABLE_PIN PB2 + +#if HAS_TMC_UART + // + // Hardware Serial on UART4, Single Wire, 0-3 addresses + // + #define X_SERIAL_TX_PIN PC10 + #define X_SERIAL_RX_PIN PC11 + + #define Y_SERIAL_TX_PIN PC10 + #define Y_SERIAL_RX_PIN PC11 + + #define Z_SERIAL_TX_PIN PC10 + #define Z_SERIAL_RX_PIN PC11 + + #define E0_SERIAL_TX_PIN PC10 + #define E0_SERIAL_RX_PIN PC11 + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// Temp Sensors +// 3.3V max when defined as an Analog Input! +// +#define TEMP_0_PIN PA1 // Analog Input PA1 +#define TEMP_BED_PIN PA0 // Analog Input PA0 + +// +// Heaters / Fans +// +#define HEATER_BED_PIN PC9 +#define HEATER_0_PIN PC8 +#ifndef FAN_PIN + #define FAN_PIN PC6 +#endif +#define FAN1_PIN PC7 + +// +// Auto fans +// +#define AUTO_FAN_PIN PC7 +#ifndef E0_AUTO_FAN_PIN + #define E0_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E1_AUTO_FAN_PIN + #define E1_AUTO_FAN_PIN AUTO_FAN_PIN +#endif +#ifndef E2_AUTO_FAN_PIN + #define E2_AUTO_FAN_PIN AUTO_FAN_PIN +#endif + +// +// SD Card +// + +#define SDCARD_CONNECTION ONBOARD + +//#define SOFTWARE_SPI +#define CUSTOM_SPI_PINS +#define SDSS PA4 +#define SD_SCK_PIN PA5 +#define SD_MISO_PIN PA6 +#define SD_MOSI_PIN PA7 +#define SD_SS_PIN SDSS +//#define SD_DETECT_PIN -1 +//#define ONBOARD_SD_CS_PIN SDSS + +// +// LCD / Controller +// + +/** + * ______ + * 5V | 1 2 | GND + * PB15 | 3 4 | PB12 + * PB13 | 5 6 PC5 + * ---- | 7 8 | PC4 + * PB0 | 9 10 | PA14 + * ------ + * EXP1 + * + * LCD_PINS_D5, D6, and D7 are not present in the EXP1 connector, and will need to be + * defined to use the REPRAP_DISCOUNT_SMART_CONTROLLER. + * + * A remote SD card is currently not supported because the pins routed to the EXP2 + * connector are shared with the onboard SD card. + */ +#define EXP1_03_PIN PB15 +#define EXP1_04_PIN PB12 +#define EXP1_05_PIN PB13 +#define EXP1_06_PIN PC5 +//#define EXP1_07_PIN -1 +#define EXP1_08_PIN PC4 +#define EXP1_09_PIN PB0 +#define EXP1_10_PIN PA14 + +#if ENABLED(CR10_STOCKDISPLAY) + /** ______ + * 5V | 1 2 | GND + * LCD_EN | 3 4 | LCD_RS + * LCD_D4 | 5 6 EN2 + * RESET | 7 8 | EN1 + * ENC | 9 10 | BEEPER + * ------ + */ + #ifdef DISABLE_JTAGSWD + #define BEEPER_PIN EXP1_10_PIN // Not connected in dev board + #endif + #define LCD_PINS_RS EXP1_04_PIN + #define LCD_PINS_ENABLE EXP1_03_PIN + #define LCD_PINS_D4 EXP1_05_PIN + //#define KILL_PIN -1 + + #define BOARD_ST7920_DELAY_1 600 + #define BOARD_ST7920_DELAY_2 750 + #define BOARD_ST7920_DELAY_3 750 + +#elif ENABLED(MKS_MINI_12864) + /** ______ + * 5V | 1 2 | GND + * SPI-MOSI | 3 4 | SPI-CS + * A0 | 5 6 EN2 + * -- | 7 8 | EN1 + * ENC | 9 10 | SPI-SCK + * ------ + */ + #define DOGLCD_CS EXP1_04_PIN + #define DOGLCD_A0 EXP1_05_PIN + #define DOGLCD_SCK EXP1_10_PIN + #define DOGLCD_MOSI EXP1_03_PIN + #define LCD_CONTRAST_INIT 160 + #define LCD_CONTRAST_MIN 120 + #define LCD_CONTRAST_MAX 180 + #define FORCE_SOFT_SPI + #define LCD_BACKLIGHT_PIN -1 + +#elif HAS_WIRED_LCD + + #error "Only CR10_STOCKDISPLAY or MKS_MINI_12864 are supported with TH3D EZBoard V2." + +#endif + +#if EITHER(CR10_STOCKDISPLAY, MKS_MINI_12864) + #define BTN_EN1 EXP1_08_PIN + #define BTN_EN2 EXP1_06_PIN + #define BTN_ENC EXP1_09_PIN +#endif diff --git a/Marlin/src/pins/stm32f4/pins_VAKE403D.h b/Marlin/src/pins/stm32f4/pins_VAKE403D.h index 1135af847fa0..f936df2c2c3a 100644 --- a/Marlin/src/pins/stm32f4/pins_VAKE403D.h +++ b/Marlin/src/pins/stm32f4/pins_VAKE403D.h @@ -21,9 +21,10 @@ */ #pragma once -#if NOT_TARGET(STM32F4, STM32F4xx) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" -#elif HOTENDS > 2 || E_STEPPERS > 2 +#define ALLOW_STM32DUINO +#include "env_validate.h" + +#if HOTENDS > 2 || E_STEPPERS > 2 #error "STM32F4 supports up to 2 hotends / E-steppers." #endif @@ -181,15 +182,9 @@ #define BTN_ENC PB12 #endif -// -// ST7920 Delays -// -#ifndef BOARD_ST7920_DELAY_1 - #define BOARD_ST7920_DELAY_1 DELAY_NS(96) -#endif -#ifndef BOARD_ST7920_DELAY_2 - #define BOARD_ST7920_DELAY_2 DELAY_NS(48) -#endif -#ifndef BOARD_ST7920_DELAY_3 - #define BOARD_ST7920_DELAY_3 DELAY_NS(715) +// Alter timing for graphical display +#if ENABLED(U8GLIB_ST7920) + #define BOARD_ST7920_DELAY_1 96 + #define BOARD_ST7920_DELAY_2 48 + #define BOARD_ST7920_DELAY_3 715 #endif diff --git a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h index 5e50548c9b5c..c41b5ab1dec2 100644 --- a/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h +++ b/Marlin/src/pins/stm32f7/pins_NUCLEO_F767ZI.h @@ -130,16 +130,16 @@ #if HAS_TMC_UART #define X_SERIAL_TX_PIN PB9 - #define X_SERIAL_RX_PIN PB9 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN #define Y_SERIAL_TX_PIN PE3 - #define Y_SERIAL_RX_PIN PE3 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN #define Z_SERIAL_TX_PIN PE12 - #define Z_SERIAL_RX_PIN PE12 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN - #define E_SERIAL_TX_PIN PG9 - #define E_SERIAL_RX_PIN PG9 + #define E0_SERIAL_TX_PIN PG9 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN #endif // @@ -191,7 +191,7 @@ #define BTN_EN1 PF13 // BTN_EN1 #define BTN_EN2 PE9 // BTN_EN2 - #define BOARD_ST7920_DELAY_1 DELAY_NS(125) - #define BOARD_ST7920_DELAY_2 DELAY_NS(63) - #define BOARD_ST7920_DELAY_3 DELAY_NS(780) + #define BOARD_ST7920_DELAY_1 125 + #define BOARD_ST7920_DELAY_2 63 + #define BOARD_ST7920_DELAY_3 780 #endif diff --git a/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h new file mode 100644 index 000000000000..991c611a89f6 --- /dev/null +++ b/Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h @@ -0,0 +1,236 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if NOT_TARGET(STM32H7) + #error "Oops! Select an STM32H7 board in 'Tools > Board.'" +#endif + +#define BOARD_INFO_NAME "BTT SKR SE BX" +#define DEFAULT_MACHINE_NAME "BIQU-BX" + +// Onboard I2C EEPROM +#define I2C_EEPROM +#define MARLIN_EEPROM_SIZE 0x1000 // 4KB (24C32 ... 32Kb = 4KB) + +// USB Flash Drive support +#define HAS_OTG_USB_HOST_SUPPORT + +// +// Limit Switches +// +#define X_MIN_PIN PB11 +#define X_MAX_PIN PD13 +#define Y_MIN_PIN PB12 +#define Y_MAX_PIN PB13 +#define Z_MIN_PIN PD12 +#define Z_MAX_PIN PD11 + +#define FIL_RUNOUT_PIN PD13 +#define FIL_RUNOUT2_PIN PB13 + +#define LED_PIN PA13 +#define BEEPER_PIN PA14 + +#define TFT_BACKLIGHT_PIN PB5 + +#define POWER_MONITOR_PIN PB0 +#define RPI_POWER_PIN PE5 + +#define SAFE_POWER_PIN PI11 +#define SERVO0_PIN PA2 + +// +// Z Probe (when not Z_MIN_PIN) +// +#ifndef Z_MIN_PROBE_PIN + #define Z_MIN_PROBE_PIN PH2 // Probe +#endif + +// +// Steppers +// +#define X_STEP_PIN PG13 +#define X_DIR_PIN PG12 +#define X_ENABLE_PIN PG14 +#define X_CS_PIN PG10 + +#define Y_STEP_PIN PB3 +#define Y_DIR_PIN PD3 +#define Y_ENABLE_PIN PB4 +#define Y_CS_PIN PD4 + +#define Z_STEP_PIN PD7 +#define Z_DIR_PIN PD6 +#define Z_ENABLE_PIN PG9 +#define Z_CS_PIN PD5 + +#define E0_STEP_PIN PC14 +#define E0_DIR_PIN PC13 +#define E0_ENABLE_PIN PC15 +#define E0_CS_PIN PI8 + +#define E1_STEP_PIN PA8 +#define E1_DIR_PIN PC9 +#define E1_ENABLE_PIN PD2 +#define E1_CS_PIN PC8 + +// +// Software SPI pins for TMC2130 stepper drivers +// +#if ENABLED(TMC_USE_SW_SPI) + #ifndef TMC_SW_MOSI + #define TMC_SW_MOSI PC6 + #endif + #ifndef TMC_SW_MISO + #define TMC_SW_MISO PG3 + #endif + #ifndef TMC_SW_SCK + #define TMC_SW_SCK PC7 + #endif +#endif + +#if HAS_TMC_UART + /** + * TMC2208/TMC2209 stepper drivers + * + * Hardware serial communication ports. + * If undefined software serial is used according to the pins below + */ + //#define X_HARDWARE_SERIAL Serial + //#define X2_HARDWARE_SERIAL Serial1 + //#define Y_HARDWARE_SERIAL Serial1 + //#define Y2_HARDWARE_SERIAL Serial1 + //#define Z_HARDWARE_SERIAL Serial1 + //#define Z2_HARDWARE_SERIAL Serial1 + //#define E0_HARDWARE_SERIAL Serial1 + //#define E1_HARDWARE_SERIAL Serial1 + //#define E2_HARDWARE_SERIAL Serial1 + //#define E3_HARDWARE_SERIAL Serial1 + //#define E4_HARDWARE_SERIAL Serial1 + //#define E5_HARDWARE_SERIAL Serial1 + //#define E6_HARDWARE_SERIAL Serial1 + //#define E7_HARDWARE_SERIAL Serial1 + + #define X_SERIAL_TX_PIN PG10 + #define X_SERIAL_RX_PIN X_SERIAL_TX_PIN + + #define Y_SERIAL_TX_PIN PD4 + #define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN + + #define Z_SERIAL_TX_PIN PD5 + #define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN + + #define E0_SERIAL_TX_PIN PI8 + #define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN + + #define E1_SERIAL_TX_PIN PC8 + #define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN + + // Reduce baud rate to improve software serial reliability + #define TMC_BAUD_RATE 19200 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PH4 // TH0 +#define TEMP_1_PIN PA3 // TH1 +#define TEMP_BED_PIN PH5 // TB + +// +// Heaters / Fans +// +#define HEATER_0_PIN PC4 +#define HEATER_1_PIN PC5 +#define HEATER_BED_PIN PA4 + +#define FAN_PIN PA5 // "FAN0" +#define FAN1_PIN PA6 // "FAN1" +#define FAN2_PIN PA7 // "FAN2" + +#define NEOPIXEL_PIN PH3 +#define NEOPIXEL2_PIN PB1 + +#if HAS_LTDC_TFT + + // LTDC_LCD Timing + #define LTDC_LCD_CLK 50 // LTDC clock frequency = 50Mhz + #define LTDC_LCD_HSYNC 30 // Horizontal synchronization + #define LTDC_LCD_HBP 114 // Horizontal back porch + #define LTDC_LCD_HFP 16 // Horizontal front porch + #define LTDC_LCD_VSYNC 3 // Vertical synchronization + #define LTDC_LCD_VBP 32 // Vertical back porch + #define LTDC_LCD_VFP 10 // Vertical front porch + + #define TFT_BACKLIGHT_PIN PB5 + #define LCD_DE_PIN PF10 + #define LCD_CLK_PIN PG7 + #define LCD_VSYNC_PIN PI9 + #define LCD_HSYNC_PIN PI10 + #define LCD_R7_PIN PG6 // R5 + #define LCD_R6_PIN PH12 + #define LCD_R5_PIN PH11 + #define LCD_R4_PIN PH10 + #define LCD_R3_PIN PH9 + #define LCD_G7_PIN PI2 // G6 + #define LCD_G6_PIN PI1 + #define LCD_G5_PIN PI0 + #define LCD_G4_PIN PH15 + #define LCD_G3_PIN PH14 + #define LCD_G2_PIN PH13 + #define LCD_B7_PIN PI7 // B5 + #define LCD_B6_PIN PI6 + #define LCD_B5_PIN PI5 + #define LCD_B4_PIN PI4 + #define LCD_B3_PIN PG11 + + // GT911 Capacitive Touch Sensor + #if ENABLED(TFT_TOUCH_DEVICE_GT911) + #define GT911_RST_PIN PE4 + #define GT911_INT_PIN PE3 + #define GT911_SW_I2C_SCL_PIN PE2 + #define GT911_SW_I2C_SDA_PIN PE6 + #endif + +#endif + +#if IS_NEWPANEL + #define BTN_EN1 PH6 + #define BTN_EN2 PH7 + #define BTN_ENC PH8 +#endif + +// +// SD card +// +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#define SOFTWARE_SPI +#define SDSS PA15 +#define SD_SS_PIN SDSS +#define SD_SCK_PIN PC10 +#define SD_MISO_PIN PC11 +#define SD_MOSI_PIN PC12 +#define SD_DETECT_PIN PI3 diff --git a/Marlin/src/pins/teensy2/env_validate.h b/Marlin/src/pins/teensy2/env_validate.h new file mode 100644 index 000000000000..5f0ea4f3b672 --- /dev/null +++ b/Marlin/src/pins/teensy2/env_validate.h @@ -0,0 +1,28 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#if NOT_TARGET(__AVR_AT90USB1286__) && (DISABLED(ALLOW_AT90USB1286P) || NOT_TARGET(__AVR_AT90USB1286P__)) + #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" +#endif + +#undef ALLOW_AT90USB1286P diff --git a/Marlin/src/pins/teensy2/pins_5DPRINT.h b/Marlin/src/pins/teensy2/pins_5DPRINT.h index 908e12e0bae2..6e1f9c021746 100644 --- a/Marlin/src/pins/teensy2/pins_5DPRINT.h +++ b/Marlin/src/pins/teensy2/pins_5DPRINT.h @@ -68,9 +68,7 @@ * https://bitbucket.org/makible/5dprint-d8-controller-board */ -#if NOT_TARGET(__AVR_AT90USB1286__) - #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define DEFAULT_MACHINE_NAME "Makibox" #define BOARD_INFO_NAME "5DPrint D8" diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h index 97d210a0f852..cdcc249c00d2 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE.h @@ -69,7 +69,7 @@ */ #if NOT_TARGET(__AVR_AT90USB646__) - #error "Oops! Select 'AT90USB646_TEENSYPP' in 'Tools > Board.'" + #error "Oops! Select 'Brainwave' in 'Tools > Board.'" #endif #define BOARD_INFO_NAME "Brainwave" diff --git a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h index e41fcaab9442..319130ef968d 100644 --- a/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h +++ b/Marlin/src/pins/teensy2/pins_BRAINWAVE_PRO.h @@ -75,9 +75,7 @@ * 4. The programmer is no longer needed. Remove it. */ -#if NOT_TARGET(__AVR_AT90USB1286__) - #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Brainwave Pro" diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index 2401c976f157..cb038fe73702 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -62,9 +62,7 @@ * 4. The programmer is no longer needed. Remove it. */ -#if NOT_TARGET(__AVR_AT90USB1286__) - #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Printrboard" @@ -118,7 +116,6 @@ // // Misc. Functions // -#define SDSS 26 // B6 SDCS #define FILWIDTH_PIN 2 // Analog Input // @@ -144,7 +141,6 @@ #define BTN_EN2 3 // D3 RX1 JP2-7 #define BTN_ENC 45 // F7 TDI JP2-12 - #undef SDSS #define SDSS 43 // F5 TMS JP2-8 #define STAT_LED_RED_PIN 12 // C2 JP11-14 @@ -155,7 +151,7 @@ #define BTN_EN1 3 // D3 RX1 JP2-7 #define BTN_EN2 2 // D2 TX1 JP2-5 #define BTN_ENC 41 // F3 JP2-4 - #undef SDSS + #define SDSS 38 // F0 B-THERM connector - use SD card on Panelolu2 #else @@ -167,3 +163,7 @@ #endif #endif // IS_ULTRA_LCD && IS_NEWPANEL + +#ifndef SDSS + #define SDSS 26 // B6 SDCS +#endif diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index d4f9fc76415d..76b98ccbeb33 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -63,9 +63,7 @@ * 4. The programmer is no longer needed. Remove it. */ -#if NOT_TARGET(__AVR_AT90USB1286__) - #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" -#endif +#include "env_validate.h" #if !defined(__MARLIN_DEPS__) && !defined(USBCON) #error "USBCON should be defined by the platform for this board." @@ -143,7 +141,7 @@ #endif // NO_EXTRUDRBOARD // Enable control of stepper motor currents with the I2C based MCP4728 DAC used on Printrboard REVF -#define HAS_MOTOR_CURRENT_DAC +#define HAS_MOTOR_CURRENT_DAC 1 // Set default drive strength percents if not already defined - X, Y, Z, E axis #ifndef DAC_MOTOR_CURRENT_DEFAULT @@ -247,9 +245,9 @@ //#define MISO 23 // 13 B3 ICSP-06 EXP2-05 // Alter timing for graphical display - #define BOARD_ST7920_DELAY_1 DELAY_NS(313) - #define BOARD_ST7920_DELAY_2 DELAY_NS(313) - #define BOARD_ST7920_DELAY_3 DELAY_NS(313) + #define BOARD_ST7920_DELAY_1 313 + #define BOARD_ST7920_DELAY_2 313 + #define BOARD_ST7920_DELAY_3 313 #else diff --git a/Marlin/src/pins/teensy2/pins_SAV_MKI.h b/Marlin/src/pins/teensy2/pins_SAV_MKI.h index bcc456c16e8a..cdba535090e4 100644 --- a/Marlin/src/pins/teensy2/pins_SAV_MKI.h +++ b/Marlin/src/pins/teensy2/pins_SAV_MKI.h @@ -62,9 +62,7 @@ * 4. The programmer is no longer needed. Remove it. */ -#if NOT_TARGET(__AVR_AT90USB1286__) - #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "SAV MkI" #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME diff --git a/Marlin/src/pins/teensy2/pins_TEENSY2.h b/Marlin/src/pins/teensy2/pins_TEENSY2.h index d43e39b09aac..efb409bf3259 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSY2.h +++ b/Marlin/src/pins/teensy2/pins_TEENSY2.h @@ -107,9 +107,7 @@ * E DIR 35 a7 a3 31 Y DIR */ -#if NOT_TARGET(__AVR_AT90USB1286__) - #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" -#endif +#include "env_validate.h" #define BOARD_INFO_NAME "Teensy++2.0" diff --git a/Marlin/src/pins/teensy2/pins_TEENSYLU.h b/Marlin/src/pins/teensy2/pins_TEENSYLU.h index 54cee137ad24..535ce534d437 100644 --- a/Marlin/src/pins/teensy2/pins_TEENSYLU.h +++ b/Marlin/src/pins/teensy2/pins_TEENSYLU.h @@ -18,6 +18,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#pragma once /** * Rev C 2 JUN 2017 @@ -72,6 +73,9 @@ * The pin assignments in this file match the silkscreen. */ +#define ALLOW_AT90USB1286P +#include "env_validate.h" + #if NOT_TARGET(__AVR_AT90USB1286__, __AVR_AT90USB1286P__) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif diff --git a/Marlin/src/sd/Sd2Card.cpp b/Marlin/src/sd/Sd2Card.cpp index 491c0692c72f..a81932d49485 100644 --- a/Marlin/src/sd/Sd2Card.cpp +++ b/Marlin/src/sd/Sd2Card.cpp @@ -30,7 +30,7 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(SDSUPPORT) && NONE(USB_FLASH_DRIVE_SUPPORT, SDIO_SUPPORT) +#if NEED_SD2CARD_SPI /* Enable FAST CRC computations - You can trade speed for FLASH space if * needed by disabling the following define */ @@ -63,7 +63,7 @@ 0x0E,0x07,0x1C,0x15,0x2A,0x23,0x38,0x31,0x46,0x4F,0x54,0x5D,0x62,0x6B,0x70,0x79 }; - static uint8_t CRC7(const uint8_t* data, uint8_t n) { + static uint8_t CRC7(const uint8_t *data, uint8_t n) { uint8_t crc = 0; while (n > 0) { crc = pgm_read_byte(&crctab7[ (crc << 1) ^ *data++ ]); @@ -72,7 +72,7 @@ return (crc << 1) | 1; } #else - static uint8_t CRC7(const uint8_t* data, uint8_t n) { + static uint8_t CRC7(const uint8_t *data, uint8_t n) { uint8_t crc = 0; LOOP_L_N(i, n) { uint8_t d = data[i]; @@ -88,7 +88,12 @@ #endif // Send command and return error code. Return zero for OK -uint8_t Sd2Card::cardCommand(const uint8_t cmd, const uint32_t arg) { +uint8_t DiskIODriver_SPI_SD::cardCommand(const uint8_t cmd, const uint32_t arg) { + + #if ENABLED(SDCARD_COMMANDS_SPLIT) + if (cmd != CMD12) chipDeselect(); + #endif + // Select card chipSelect(); @@ -133,7 +138,7 @@ uint8_t Sd2Card::cardCommand(const uint8_t cmd, const uint32_t arg) { * \return The number of 512 byte data blocks in the card * or zero if an error occurs. */ -uint32_t Sd2Card::cardSize() { +uint32_t DiskIODriver_SPI_SD::cardSize() { csd_t csd; if (!readCSD(&csd)) return 0; if (csd.v1.csd_ver == 0) { @@ -155,12 +160,12 @@ uint32_t Sd2Card::cardSize() { } } -void Sd2Card::chipDeselect() { +void DiskIODriver_SPI_SD::chipDeselect() { extDigitalWrite(chipSelectPin_, HIGH); spiSend(0xFF); // Ensure MISO goes high impedance } -void Sd2Card::chipSelect() { +void DiskIODriver_SPI_SD::chipSelect() { spiInit(spiRate_); extDigitalWrite(chipSelectPin_, LOW); } @@ -178,7 +183,7 @@ void Sd2Card::chipSelect() { * * \return true for success, false for failure. */ -bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) { +bool DiskIODriver_SPI_SD::erase(uint32_t firstBlock, uint32_t lastBlock) { if (ENABLED(SDCARD_READONLY)) return false; csd_t csd; @@ -216,7 +221,7 @@ bool Sd2Card::erase(uint32_t firstBlock, uint32_t lastBlock) { * \return true if single block erase is supported. * false if single block erase is not supported. */ -bool Sd2Card::eraseSingleBlockEnable() { +bool DiskIODriver_SPI_SD::eraseSingleBlockEnable() { csd_t csd; return readCSD(&csd) ? csd.v1.erase_blk_en : false; } @@ -230,7 +235,7 @@ bool Sd2Card::eraseSingleBlockEnable() { * \return true for success, false for failure. * The reason for failure can be determined by calling errorCode() and errorData(). */ -bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) { +bool DiskIODriver_SPI_SD::init(const uint8_t sckRateID, const pin_t chipSelectPin) { #if IS_TEENSY_35_36 || IS_TEENSY_40_41 chipSelectPin_ = BUILTIN_SDCARD; const uint8_t ret = SDHC_CardInit(); @@ -324,10 +329,12 @@ bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) { } chipDeselect(); + ready = true; return setSckRate(sckRateID); FAIL: chipDeselect(); + ready = false; return false; } @@ -338,7 +345,7 @@ bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) { * \param[out] dst Pointer to the location that will receive the data. * \return true for success, false for failure. */ -bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) { +bool DiskIODriver_SPI_SD::readBlock(uint32_t blockNumber, uint8_t *dst) { #if IS_TEENSY_35_36 || IS_TEENSY_40_41 return 0 == SDHC_CardReadBlock(dst, blockNumber); #endif @@ -378,7 +385,7 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) { * * \return true for success, false for failure. */ -bool Sd2Card::readData(uint8_t* dst) { +bool DiskIODriver_SPI_SD::readData(uint8_t *dst) { chipSelect(); return readData(dst, 512); } @@ -421,7 +428,7 @@ bool Sd2Card::readData(uint8_t* dst) { }; // faster CRC-CCITT // uses the x^16,x^12,x^5,x^1 polynomial. - static uint16_t CRC_CCITT(const uint8_t* data, size_t n) { + static uint16_t CRC_CCITT(const uint8_t *data, size_t n) { uint16_t crc = 0; for (size_t i = 0; i < n; i++) { crc = pgm_read_word(&crctab16[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8); @@ -431,7 +438,7 @@ bool Sd2Card::readData(uint8_t* dst) { #else // slower CRC-CCITT // uses the x^16,x^12,x^5,x^1 polynomial. - static uint16_t CRC_CCITT(const uint8_t* data, size_t n) { + static uint16_t CRC_CCITT(const uint8_t *data, size_t n) { uint16_t crc = 0; for (size_t i = 0; i < n; i++) { crc = (uint8_t)(crc >> 8) | (crc << 8); @@ -445,7 +452,7 @@ bool Sd2Card::readData(uint8_t* dst) { #endif #endif // SD_CHECK_AND_RETRY -bool Sd2Card::readData(uint8_t* dst, const uint16_t count) { +bool DiskIODriver_SPI_SD::readData(uint8_t *dst, const uint16_t count) { bool success = false; const millis_t read_timeout = millis() + SD_READ_TIMEOUT; @@ -477,8 +484,8 @@ bool Sd2Card::readData(uint8_t* dst, const uint16_t count) { } /** read CID or CSR register */ -bool Sd2Card::readRegister(const uint8_t cmd, void* buf) { - uint8_t* dst = reinterpret_cast(buf); +bool DiskIODriver_SPI_SD::readRegister(const uint8_t cmd, void *buf) { + uint8_t *dst = reinterpret_cast(buf); if (cardCommand(cmd, 0)) { error(SD_CARD_ERROR_READ_REG); chipDeselect(); @@ -497,7 +504,7 @@ bool Sd2Card::readRegister(const uint8_t cmd, void* buf) { * * \return true for success, false for failure. */ -bool Sd2Card::readStart(uint32_t blockNumber) { +bool DiskIODriver_SPI_SD::readStart(uint32_t blockNumber) { if (type() != SD_CARD_TYPE_SDHC) blockNumber <<= 9; const bool success = !cardCommand(CMD18, blockNumber); @@ -511,7 +518,7 @@ bool Sd2Card::readStart(uint32_t blockNumber) { * * \return true for success, false for failure. */ -bool Sd2Card::readStop() { +bool DiskIODriver_SPI_SD::readStop() { chipSelect(); const bool success = !cardCommand(CMD12, 0); if (!success) error(SD_CARD_ERROR_CMD12); @@ -531,7 +538,7 @@ bool Sd2Card::readStop() { * \return The value one, true, is returned for success and the value zero, * false, is returned for an invalid value of \a sckRateID. */ -bool Sd2Card::setSckRate(const uint8_t sckRateID) { +bool DiskIODriver_SPI_SD::setSckRate(const uint8_t sckRateID) { const bool success = (sckRateID <= 6); if (success) spiRate_ = sckRateID; else error(SD_CARD_ERROR_SCK_RATE); return success; @@ -542,12 +549,14 @@ bool Sd2Card::setSckRate(const uint8_t sckRateID) { * \param[in] timeout_ms Timeout to abort. * \return true for success, false for timeout. */ -bool Sd2Card::waitNotBusy(const millis_t timeout_ms) { +bool DiskIODriver_SPI_SD::waitNotBusy(const millis_t timeout_ms) { const millis_t wait_timeout = millis() + timeout_ms; while (spiRec() != 0xFF) if (ELAPSED(millis(), wait_timeout)) return false; return true; } +void DiskIODriver_SPI_SD::error(const uint8_t code) { errorCode_ = code; } + /** * Write a 512 byte block to an SD card. * @@ -555,7 +564,7 @@ bool Sd2Card::waitNotBusy(const millis_t timeout_ms) { * \param[in] src Pointer to the location of the data to be written. * \return true for success, false for failure. */ -bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) { +bool DiskIODriver_SPI_SD::writeBlock(uint32_t blockNumber, const uint8_t *src) { if (ENABLED(SDCARD_READONLY)) return false; #if IS_TEENSY_35_36 || IS_TEENSY_40_41 @@ -586,7 +595,7 @@ bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) { * \param[in] src Pointer to the location of the data to be written. * \return true for success, false for failure. */ -bool Sd2Card::writeData(const uint8_t* src) { +bool DiskIODriver_SPI_SD::writeData(const uint8_t *src) { if (ENABLED(SDCARD_READONLY)) return false; bool success = true; @@ -601,7 +610,7 @@ bool Sd2Card::writeData(const uint8_t* src) { } // Send one block of data for write block or write multiple blocks -bool Sd2Card::writeData(const uint8_t token, const uint8_t* src) { +bool DiskIODriver_SPI_SD::writeData(const uint8_t token, const uint8_t *src) { if (ENABLED(SDCARD_READONLY)) return false; const uint16_t crc = TERN(SD_CHECK_AND_RETRY, CRC_CCITT(src, 512), 0xFFFF); @@ -629,7 +638,7 @@ bool Sd2Card::writeData(const uint8_t token, const uint8_t* src) { * * \return true for success, false for failure. */ -bool Sd2Card::writeStart(uint32_t blockNumber, const uint32_t eraseCount) { +bool DiskIODriver_SPI_SD::writeStart(uint32_t blockNumber, const uint32_t eraseCount) { if (ENABLED(SDCARD_READONLY)) return false; bool success = false; @@ -650,7 +659,7 @@ bool Sd2Card::writeStart(uint32_t blockNumber, const uint32_t eraseCount) { * * \return true for success, false for failure. */ -bool Sd2Card::writeStop() { +bool DiskIODriver_SPI_SD::writeStop() { if (ENABLED(SDCARD_READONLY)) return false; bool success = false; @@ -666,4 +675,4 @@ bool Sd2Card::writeStop() { return success; } -#endif // SDSUPPORT +#endif // NEED_SD2CARD_SPI diff --git a/Marlin/src/sd/Sd2Card.h b/Marlin/src/sd/Sd2Card.h index 6900502e03e9..e0dce02a0236 100644 --- a/Marlin/src/sd/Sd2Card.h +++ b/Marlin/src/sd/Sd2Card.h @@ -35,47 +35,50 @@ #include "SdFatConfig.h" #include "SdInfo.h" +#include "disk_io_driver.h" #include -uint16_t const SD_INIT_TIMEOUT = 2000, // init timeout ms - SD_ERASE_TIMEOUT = 10000, // erase timeout ms - SD_READ_TIMEOUT = 300, // read timeout ms - SD_WRITE_TIMEOUT = 600; // write time out ms +uint16_t const SD_INIT_TIMEOUT = 2000, // (ms) Init timeout + SD_ERASE_TIMEOUT = 10000, // (ms) Erase timeout + SD_READ_TIMEOUT = 300, // (ms) Read timeout + SD_WRITE_TIMEOUT = 600; // (ms) Write timeout // SD card errors -uint8_t const SD_CARD_ERROR_CMD0 = 0x01, // timeout error for command CMD0 (initialize card in SPI mode) - SD_CARD_ERROR_CMD8 = 0x02, // CMD8 was not accepted - not a valid SD card - SD_CARD_ERROR_CMD12 = 0x03, // card returned an error response for CMD12 (write stop) - SD_CARD_ERROR_CMD17 = 0x04, // card returned an error response for CMD17 (read block) - SD_CARD_ERROR_CMD18 = 0x05, // card returned an error response for CMD18 (read multiple block) - SD_CARD_ERROR_CMD24 = 0x06, // card returned an error response for CMD24 (write block) - SD_CARD_ERROR_CMD25 = 0x07, // WRITE_MULTIPLE_BLOCKS command failed - SD_CARD_ERROR_CMD58 = 0x08, // card returned an error response for CMD58 (read OCR) - SD_CARD_ERROR_ACMD23 = 0x09, // SET_WR_BLK_ERASE_COUNT failed - SD_CARD_ERROR_ACMD41 = 0x0A, // ACMD41 initialization process timeout - SD_CARD_ERROR_BAD_CSD = 0x0B, // card returned a bad CSR version field - SD_CARD_ERROR_ERASE = 0x0C, // erase block group command failed - SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0x0D, // card not capable of single block erase - SD_CARD_ERROR_ERASE_TIMEOUT = 0x0E, // Erase sequence timed out - SD_CARD_ERROR_READ = 0x0F, // card returned an error token instead of read data - SD_CARD_ERROR_READ_REG = 0x10, // read CID or CSD failed - SD_CARD_ERROR_READ_TIMEOUT = 0x11, // timeout while waiting for start of read data - SD_CARD_ERROR_STOP_TRAN = 0x12, // card did not accept STOP_TRAN_TOKEN - SD_CARD_ERROR_WRITE = 0x13, // card returned an error token as a response to a write operation - SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0x14, // REMOVE - not used ... attempt to write protected block zero - SD_CARD_ERROR_WRITE_MULTIPLE = 0x15, // card did not go ready for a multiple block write - SD_CARD_ERROR_WRITE_PROGRAMMING = 0x16, // card returned an error to a CMD13 status check after a write - SD_CARD_ERROR_WRITE_TIMEOUT = 0x17, // timeout occurred during write programming - SD_CARD_ERROR_SCK_RATE = 0x18, // incorrect rate selected - SD_CARD_ERROR_INIT_NOT_CALLED = 0x19, // init() not called - // 0x1A is unused now, it was: card returned an error for CMD59 (CRC_ON_OFF) - SD_CARD_ERROR_READ_CRC = 0x1B; // invalid read CRC +typedef enum : uint8_t { + SD_CARD_ERROR_CMD0 = 0x01, // Timeout error for command CMD0 (initialize card in SPI mode) + SD_CARD_ERROR_CMD8 = 0x02, // CMD8 was not accepted - not a valid SD card + SD_CARD_ERROR_CMD12 = 0x03, // Card returned an error response for CMD12 (write stop) + SD_CARD_ERROR_CMD17 = 0x04, // Card returned an error response for CMD17 (read block) + SD_CARD_ERROR_CMD18 = 0x05, // Card returned an error response for CMD18 (read multiple block) + SD_CARD_ERROR_CMD24 = 0x06, // Card returned an error response for CMD24 (write block) + SD_CARD_ERROR_CMD25 = 0x07, // WRITE_MULTIPLE_BLOCKS command failed + SD_CARD_ERROR_CMD58 = 0x08, // Card returned an error response for CMD58 (read OCR) + SD_CARD_ERROR_ACMD23 = 0x09, // SET_WR_BLK_ERASE_COUNT failed + SD_CARD_ERROR_ACMD41 = 0x0A, // ACMD41 initialization process timeout + SD_CARD_ERROR_BAD_CSD = 0x0B, // Card returned a bad CSR version field + SD_CARD_ERROR_ERASE = 0x0C, // Erase block group command failed + SD_CARD_ERROR_ERASE_SINGLE_BLOCK = 0x0D, // Card not capable of single block erase + SD_CARD_ERROR_ERASE_TIMEOUT = 0x0E, // Erase sequence timed out + SD_CARD_ERROR_READ = 0x0F, // Card returned an error token instead of read data + SD_CARD_ERROR_READ_REG = 0x10, // Read CID or CSD failed + SD_CARD_ERROR_READ_TIMEOUT = 0x11, // Timeout while waiting for start of read data + SD_CARD_ERROR_STOP_TRAN = 0x12, // Card did not accept STOP_TRAN_TOKEN + SD_CARD_ERROR_WRITE = 0x13, // Card returned an error token as a response to a write operation + SD_CARD_ERROR_WRITE_BLOCK_ZERO = 0x14, // REMOVE - not used ... attempt to write protected block zero + SD_CARD_ERROR_WRITE_MULTIPLE = 0x15, // Card did not go ready for a multiple block write + SD_CARD_ERROR_WRITE_PROGRAMMING = 0x16, // Card returned an error to a CMD13 status check after a write + SD_CARD_ERROR_WRITE_TIMEOUT = 0x17, // Timeout occurred during write programming + SD_CARD_ERROR_SCK_RATE = 0x18, // Incorrect rate selected + SD_CARD_ERROR_INIT_NOT_CALLED = 0x19, // Init() not called + // 0x1A is unused now, it was: card returned an error for CMD59 (CRC_ON_OFF) + SD_CARD_ERROR_READ_CRC = 0x1B // Invalid read CRC +} sd_error_code_t; // card types -uint8_t const SD_CARD_TYPE_SD1 = 1, // Standard capacity V1 SD card - SD_CARD_TYPE_SD2 = 2, // Standard capacity V2 SD card - SD_CARD_TYPE_SDHC = 3; // High Capacity SD card +uint8_t const SD_CARD_TYPE_SD1 = 1, // Standard capacity V1 SD card + SD_CARD_TYPE_SD2 = 2, // Standard capacity V2 SD card + SD_CARD_TYPE_SDHC = 3; // High Capacity SD card /** * Define SOFTWARE_SPI to use bit-bang SPI @@ -93,12 +96,11 @@ uint8_t const SD_CARD_TYPE_SD1 = 1, // Standard capacity V1 * \class Sd2Card * \brief Raw access to SD and SDHC flash memory cards. */ -class Sd2Card { +class DiskIODriver_SPI_SD : public DiskIODriver { public: - Sd2Card() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {} + DiskIODriver_SPI_SD() : errorCode_(SD_CARD_ERROR_INIT_NOT_CALLED), type_(0) {} - uint32_t cardSize(); bool erase(uint32_t firstBlock, uint32_t lastBlock); bool eraseSingleBlockEnable(); @@ -106,7 +108,7 @@ class Sd2Card { * Set SD error code. * \param[in] code value for error code. */ - inline void error(const uint8_t code) { errorCode_ = code; } + void error(const uint8_t code); /** * \return error code for last error. See Sd2Card.h for a list of error codes. @@ -122,9 +124,15 @@ class Sd2Card { * * \return true for success or false for failure. */ - bool init(const uint8_t sckRateID, const pin_t chipSelectPin); + bool init(const uint8_t sckRateID, const pin_t chipSelectPin) override; - bool readBlock(uint32_t block, uint8_t* dst); + bool setSckRate(const uint8_t sckRateID); + + /** + * Return the card type: SD V1, SD V2 or SDHC + * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC. + */ + int type() const { return type_; } /** * Read a card's CID register. The CID contains card identification @@ -135,7 +143,7 @@ class Sd2Card { * * \return true for success or false for failure. */ - bool readCID(cid_t* cid) { return readRegister(CMD10, cid); } + bool readCID(cid_t *cid) { return readRegister(CMD10, cid); } /** * Read a card's CSD register. The CSD contains Card-Specific Data that @@ -145,24 +153,27 @@ class Sd2Card { * * \return true for success or false for failure. */ - inline bool readCSD(csd_t* csd) { return readRegister(CMD9, csd); } + inline bool readCSD(csd_t *csd) override { return readRegister(CMD9, csd); } - bool readData(uint8_t* dst); - bool readStart(uint32_t blockNumber); - bool readStop(); - bool setSckRate(const uint8_t sckRateID); + bool readData(uint8_t *dst) override; + bool readStart(uint32_t blockNumber) override; + bool readStop() override; - /** - * Return the card type: SD V1, SD V2 or SDHC - * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC. - */ - int type() const {return type_;} - bool writeBlock(uint32_t blockNumber, const uint8_t* src); - bool writeData(const uint8_t* src); - bool writeStart(uint32_t blockNumber, const uint32_t eraseCount); - bool writeStop(); + bool writeData(const uint8_t *src) override; + bool writeStart(const uint32_t blockNumber, const uint32_t eraseCount) override; + bool writeStop() override; + + bool readBlock(uint32_t block, uint8_t *dst) override; + bool writeBlock(uint32_t blockNumber, const uint8_t *src) override; + + uint32_t cardSize() override; + + bool isReady() override { return ready; }; + + void idle() override {} private: + bool ready = false; uint8_t chipSelectPin_, errorCode_, spiRate_, @@ -176,11 +187,11 @@ class Sd2Card { } uint8_t cardCommand(const uint8_t cmd, const uint32_t arg); - bool readData(uint8_t* dst, const uint16_t count); - bool readRegister(const uint8_t cmd, void* buf); + bool readData(uint8_t *dst, const uint16_t count); + bool readRegister(const uint8_t cmd, void *buf); void chipDeselect(); void chipSelect(); inline void type(const uint8_t value) { type_ = value; } bool waitNotBusy(const millis_t timeout_ms); - bool writeData(const uint8_t token, const uint8_t* src); + bool writeData(const uint8_t token, const uint8_t *src); }; diff --git a/Marlin/src/sd/Sd2Card_sdio.h b/Marlin/src/sd/Sd2Card_sdio.h index 10fb757359f4..cc29f5d46d3c 100644 --- a/Marlin/src/sd/Sd2Card_sdio.h +++ b/Marlin/src/sd/Sd2Card_sdio.h @@ -23,17 +23,37 @@ #include "../inc/MarlinConfig.h" -#if ENABLED(SDIO_SUPPORT) +#include "SdInfo.h" +#include "disk_io_driver.h" bool SDIO_Init(); bool SDIO_ReadBlock(uint32_t block, uint8_t *dst); bool SDIO_WriteBlock(uint32_t block, const uint8_t *src); +bool SDIO_IsReady(); +uint32_t SDIO_GetCardSize(); -class Sd2Card { +class DiskIODriver_SDIO : public DiskIODriver { public: - bool init(uint8_t sckRateID = 0, uint8_t chipSelectPin = 0) { return SDIO_Init(); } - bool readBlock(uint32_t block, uint8_t *dst) { return SDIO_ReadBlock(block, dst); } - bool writeBlock(uint32_t block, const uint8_t *src) { return SDIO_WriteBlock(block, src); } -}; + bool init(const uint8_t sckRateID=0, const pin_t chipSelectPin=0) override { return SDIO_Init(); } + + bool readCSD(csd_t *csd) override { return false; } + + bool readStart(const uint32_t block) override { curBlock = block; return true; } + bool readData(uint8_t *dst) override { return readBlock(curBlock++, dst); } + bool readStop() override { curBlock = -1; return true; } + + bool writeStart(const uint32_t block, const uint32_t) override { curBlock = block; return true; } + bool writeData(const uint8_t *src) override { return writeBlock(curBlock++, src); } + bool writeStop() override { curBlock = -1; return true; } -#endif // SDIO_SUPPORT + bool readBlock(uint32_t block, uint8_t *dst) override { return SDIO_ReadBlock(block, dst); } + bool writeBlock(uint32_t block, const uint8_t *src) override { return SDIO_WriteBlock(block, src); } + + uint32_t cardSize() override { return SDIO_GetCardSize(); } + + bool isReady() override { return SDIO_IsReady(); } + + void idle() override {} + private: + uint32_t curBlock; +}; diff --git a/Marlin/src/sd/SdBaseFile.cpp b/Marlin/src/sd/SdBaseFile.cpp index 7693c523308c..b357495a3edb 100644 --- a/Marlin/src/sd/SdBaseFile.cpp +++ b/Marlin/src/sd/SdBaseFile.cpp @@ -40,10 +40,10 @@ #include "SdBaseFile.h" #include "../MarlinCore.h" -SdBaseFile* SdBaseFile::cwd_ = 0; // Pointer to Current Working Directory +SdBaseFile *SdBaseFile::cwd_ = 0; // Pointer to Current Working Directory // callback function for date/time -void (*SdBaseFile::dateTime_)(uint16_t* date, uint16_t* time) = 0; +void (*SdBaseFile::dateTime_)(uint16_t *date, uint16_t *time) = 0; // add a cluster to a file bool SdBaseFile::addCluster() { @@ -118,7 +118,7 @@ bool SdBaseFile::close() { * Reasons for failure include file is not contiguous, file has zero length * or an I/O error occurred. */ -bool SdBaseFile::contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock) { +bool SdBaseFile::contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock) { // error if no blocks if (firstCluster_ == 0) return false; @@ -155,7 +155,7 @@ bool SdBaseFile::contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock) { * a file is already open, the file already exists, the root * directory is full or an I/O error. */ -bool SdBaseFile::createContiguous(SdBaseFile* dirFile, const char* path, uint32_t size) { +bool SdBaseFile::createContiguous(SdBaseFile *dirFile, const char *path, uint32_t size) { if (ENABLED(SDCARD_READONLY)) return false; uint32_t count; @@ -186,13 +186,12 @@ bool SdBaseFile::createContiguous(SdBaseFile* dirFile, const char* path, uint32_ * * \return true for success, false for failure. */ -bool SdBaseFile::dirEntry(dir_t* dir) { - dir_t* p; +bool SdBaseFile::dirEntry(dir_t *dir) { // make sure fields on SD are correct if (!sync()) return false; // read entry - p = cacheDirEntry(SdVolume::CACHE_FOR_READ); + dir_t *p = cacheDirEntry(SdVolume::CACHE_FOR_READ); if (!p) return false; // copy to caller's struct @@ -207,7 +206,7 @@ bool SdBaseFile::dirEntry(dir_t* dir) { * \param[in] dir The directory structure containing the name. * \param[out] name A 13 byte char array for the formatted name. */ -void SdBaseFile::dirName(const dir_t& dir, char* name) { +void SdBaseFile::dirName(const dir_t &dir, char *name) { uint8_t j = 0; LOOP_L_N(i, 11) { if (dir.name[i] == ' ')continue; @@ -229,7 +228,7 @@ void SdBaseFile::dirName(const dir_t& dir, char* name) { * * \return true if the file exists else false. */ -bool SdBaseFile::exists(const char* name) { +bool SdBaseFile::exists(const char *name) { SdBaseFile file; return file.open(this, name, O_READ); } @@ -254,7 +253,7 @@ bool SdBaseFile::exists(const char* name) { * \return For success fgets() returns the length of the string in \a str. * If no data is read, fgets() returns zero for EOF or -1 if an error occurred. **/ -int16_t SdBaseFile::fgets(char* str, int16_t num, char* delim) { +int16_t SdBaseFile::fgets(char *str, int16_t num, char *delim) { char ch; int16_t n = 0; int16_t r = -1; @@ -293,7 +292,7 @@ bool SdBaseFile::getDosName(char * const name) { return true; } // cache entry - dir_t* p = cacheDirEntry(SdVolume::CACHE_FOR_READ); + dir_t *p = cacheDirEntry(SdVolume::CACHE_FOR_READ); if (!p) return false; // format name @@ -301,7 +300,7 @@ bool SdBaseFile::getDosName(char * const name) { return true; } -void SdBaseFile::getpos(filepos_t* pos) { +void SdBaseFile::getpos(filepos_t *pos) { pos->position = curPosition_; pos->cluster = curCluster_; } @@ -386,7 +385,7 @@ int8_t SdBaseFile::lsPrintNext(uint8_t flags, uint8_t indent) { } // Format directory name field from a 8.3 name string -bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) { +bool SdBaseFile::make83Name(const char *str, uint8_t *name, const char **ptr) { uint8_t n = 7, // Max index until a dot is found i = 11; while (i) name[--i] = ' '; // Set whole FILENAME.EXT to spaces @@ -423,13 +422,13 @@ bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) { * Reasons for failure include this file is already open, \a parent is not a * directory, \a path is invalid or already exists in \a parent. */ -bool SdBaseFile::mkdir(SdBaseFile* parent, const char* path, bool pFlag) { +bool SdBaseFile::mkdir(SdBaseFile *parent, const char *path, bool pFlag) { if (ENABLED(SDCARD_READONLY)) return false; uint8_t dname[11]; SdBaseFile dir1, dir2; - SdBaseFile* sub = &dir1; - SdBaseFile* start = parent; + SdBaseFile *sub = &dir1; + SdBaseFile *start = parent; if (!parent || isOpen()) return false; @@ -455,13 +454,9 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const char* path, bool pFlag) { return mkdir(parent, dname); } -bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) { +bool SdBaseFile::mkdir(SdBaseFile *parent, const uint8_t dname[11]) { if (ENABLED(SDCARD_READONLY)) return false; - uint32_t block; - dir_t d; - dir_t* p; - if (!parent->isDir()) return false; // create a normal file @@ -478,19 +473,20 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) { if (!sync()) return false; // cache entry - should already be in cache due to sync() call - p = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); + dir_t *p = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); if (!p) return false; // change directory entry attribute p->attributes = DIR_ATT_DIRECTORY; // make entry for '.' + dir_t d; memcpy(&d, p, sizeof(d)); d.name[0] = '.'; LOOP_S_L_N(i, 1, 11) d.name[i] = ' '; // cache block for '.' and '..' - block = vol_->clusterStartBlock(firstCluster_); + uint32_t block = vol_->clusterStartBlock(firstCluster_); if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_WRITE)) return false; // copy '.' to block @@ -523,7 +519,7 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) { * * \return true for success, false for failure. */ -bool SdBaseFile::open(const char* path, uint8_t oflag) { +bool SdBaseFile::open(const char *path, uint8_t oflag) { return open(cwd_, path, oflag); } @@ -577,7 +573,7 @@ bool SdBaseFile::open(const char* path, uint8_t oflag) { * a directory, \a path is invalid, the file does not exist * or can't be opened in the access mode specified by oflag. */ -bool SdBaseFile::open(SdBaseFile* dirFile, const char* path, uint8_t oflag) { +bool SdBaseFile::open(SdBaseFile *dirFile, const char *path, uint8_t oflag) { uint8_t dname[11]; SdBaseFile dir1, dir2; SdBaseFile *parent = dirFile, *sub = &dir1; @@ -605,10 +601,10 @@ bool SdBaseFile::open(SdBaseFile* dirFile, const char* path, uint8_t oflag) { } // open with filename in dname -bool SdBaseFile::open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag) { +bool SdBaseFile::open(SdBaseFile *dirFile, const uint8_t dname[11], uint8_t oflag) { bool emptyFound = false, fileFound = false; uint8_t index; - dir_t* p; + dir_t *p; vol_ = dirFile->vol_; @@ -696,9 +692,7 @@ bool SdBaseFile::open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t ofla * See open() by path for definition of flags. * \return true for success or false for failure. */ -bool SdBaseFile::open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag) { - dir_t* p; - +bool SdBaseFile::open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag) { vol_ = dirFile->vol_; // error if already open @@ -711,7 +705,7 @@ bool SdBaseFile::open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag) { if (!dirFile->seekSet(32 * index)) return false; // read entry into cache - p = dirFile->readDirCache(); + dir_t *p = dirFile->readDirCache(); if (!p) return false; // error if empty slot or '.' or '..' @@ -725,7 +719,7 @@ bool SdBaseFile::open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag) { // open a cached directory entry. Assumes vol_ is initialized bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) { - dir_t* p; + dir_t *p; #if ENABLED(SDCARD_READONLY) if (oflag & (O_WRITE | O_CREAT | O_TRUNC)) goto FAIL; @@ -784,10 +778,7 @@ bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) { * See open() by path for definition of flags. * \return true for success or false for failure. */ -bool SdBaseFile::openNext(SdBaseFile* dirFile, uint8_t oflag) { - dir_t* p; - uint8_t index; - +bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) { if (!dirFile) return false; // error if already open @@ -796,10 +787,10 @@ bool SdBaseFile::openNext(SdBaseFile* dirFile, uint8_t oflag) { vol_ = dirFile->vol_; while (1) { - index = 0xF & (dirFile->curPosition_ >> 5); + uint8_t index = 0xF & (dirFile->curPosition_ >> 5); // read entry into cache - p = dirFile->readDirCache(); + dir_t *p = dirFile->readDirCache(); if (!p) return false; // done if last entry @@ -825,9 +816,8 @@ bool SdBaseFile::openNext(SdBaseFile* dirFile, uint8_t oflag) { * * \return true for success, false for failure. */ -bool SdBaseFile::openParent(SdBaseFile* dir) { +bool SdBaseFile::openParent(SdBaseFile *dir) { dir_t entry; - dir_t* p; SdBaseFile file; uint32_t c; uint32_t cluster; @@ -850,7 +840,7 @@ bool SdBaseFile::openParent(SdBaseFile* dir) { // first block of parent dir if (!vol_->cacheRawBlock(lbn, SdVolume::CACHE_FOR_READ)) return false; - p = &vol_->cacheBuffer_.dir[1]; + dir_t *p = &vol_->cacheBuffer_.dir[1]; // verify name for '../..' if (p->name[0] != '.' || p->name[1] != '.') return false; // '..' is pointer to first cluster of parent. open '../..' to find parent @@ -881,7 +871,7 @@ bool SdBaseFile::openParent(SdBaseFile* dir) { * Reasons for failure include the file is already open, the FAT volume has * not been initialized or it a FAT12 volume. */ -bool SdBaseFile::openRoot(SdVolume* vol) { +bool SdBaseFile::openRoot(SdVolume *vol) { // error if file is already open if (isOpen()) return false; @@ -926,7 +916,7 @@ int SdBaseFile::peek() { // print uint8_t with width 2 static void print2u(const uint8_t v) { if (v < 10) SERIAL_CHAR('0'); - SERIAL_ECHO((int)v); + SERIAL_ECHO(v); } /** @@ -1008,8 +998,8 @@ int16_t SdBaseFile::read() { * read() called before a file has been opened, corrupt file system * or an I/O error occurred. */ -int16_t SdBaseFile::read(void* buf, uint16_t nbyte) { - uint8_t* dst = reinterpret_cast(buf); +int16_t SdBaseFile::read(void *buf, uint16_t nbyte) { + uint8_t *dst = reinterpret_cast(buf); uint16_t offset, toRead; uint32_t block; // raw device block number @@ -1049,7 +1039,7 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) { else { // read block to cache and copy data to caller if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_READ)) return -1; - uint8_t* src = vol_->cache()->data + offset; + uint8_t *src = vol_->cache()->data + offset; memcpy(dst, src, n); } dst += n; @@ -1059,6 +1049,20 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) { return nbyte; } +/** + * Calculate a checksum for an 8.3 filename + * + * \param name The 8.3 file name to calculate + * + * \return The checksum byte + */ +uint8_t lfn_checksum(const uint8_t *name) { + uint8_t sum = 0; + for (uint8_t i = 11; i; i--) + sum = ((sum & 1) << 7) + (sum >> 1) + *name++; + return sum; +} + /** * Read the next entry in a directory. * @@ -1070,56 +1074,73 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) { * readDir() called before a directory has been opened, this is not * a directory file or an I/O error occurred. */ -int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) { +int8_t SdBaseFile::readDir(dir_t *dir, char *longFilename) { int16_t n; // if not a directory file or miss-positioned return an error if (!isDir() || (0x1F & curPosition_)) return -1; + #define INVALIDATE_LONGNAME() (longFilename[0] = longFilename[1] = '\0') + // If we have a longFilename buffer, mark it as invalid. // If a long filename is found it will be filled automatically. - if (longFilename) { longFilename[0] = '\0'; longFilename[1] = '\0'; } + if (longFilename) INVALIDATE_LONGNAME(); + + uint8_t checksum_error = 0xFF, checksum = 0; while (1) { n = read(dir, sizeof(dir_t)); if (n != sizeof(dir_t)) return n ? -1 : 0; - // last entry if DIR_NAME_FREE + // Last entry if DIR_NAME_FREE if (dir->name[0] == DIR_NAME_FREE) return 0; - // skip deleted entry and entry for . and .. + // Skip deleted entry and entry for . and .. if (dir->name[0] == DIR_NAME_DELETED || dir->name[0] == '.') { - if (longFilename) { longFilename[0] = '\0'; longFilename[1] = '\0'; } // Invalidate erased file long name, if any + if (longFilename) INVALIDATE_LONGNAME(); // Invalidate erased file long name, if any continue; } - // Fill the long filename if we have a long filename entry. - // Long filename entries are stored before the short filename. - if (longFilename && DIR_IS_LONG_NAME(dir)) { - vfat_t* VFAT = (vfat_t*)dir; - // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0 - if (VFAT->firstClusterLow == 0) { - const uint8_t seq = VFAT->sequenceNumber & 0x1F; - if (WITHIN(seq, 1, MAX_VFAT_ENTRIES)) { - // TODO: Store the filename checksum to verify if a long-filename-unaware system modified the file table. - n = (seq - 1) * (FILENAME_LENGTH); - LOOP_L_N(i, FILENAME_LENGTH) { - uint16_t utf16_ch = (i < 5) ? VFAT->name1[i] : (i < 11) ? VFAT->name2[i - 5] : VFAT->name3[i - 11]; - #if ENABLED(UTF_FILENAME_SUPPORT) - // We can't reconvert to UTF-8 here as UTF-8 is variable-size encoding, but joining LFN blocks - // needs static bytes addressing. So here just store full UTF-16LE words to re-convert later. - uint16_t idx = (n + i) * 2; // This is fixed as FAT LFN always contain UTF-16LE encoding - longFilename[idx] = utf16_ch & 0xFF; - longFilename[idx + 1] = (utf16_ch >> 8) & 0xFF; - #else - // Replace all multibyte characters to '_' - longFilename[n + i] = (utf16_ch > 0xFF) ? '_' : (utf16_ch & 0xFF); - #endif + if (longFilename) { + // Fill the long filename if we have a long filename entry. + // Long filename entries are stored before the short filename. + if (DIR_IS_LONG_NAME(dir)) { + vfat_t *VFAT = (vfat_t*)dir; + // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0 + if (VFAT->firstClusterLow == 0) { + const uint8_t seq = VFAT->sequenceNumber & 0x1F; + if (WITHIN(seq, 1, MAX_VFAT_ENTRIES)) { + n = (seq - 1) * (FILENAME_LENGTH); + if (n == 0) { + checksum = VFAT->checksum; + checksum_error = 0; + } + else if (checksum != VFAT->checksum) // orphan detected + checksum_error = 1; + + LOOP_L_N(i, FILENAME_LENGTH) { + const uint16_t utf16_ch = (i >= 11) ? VFAT->name3[i - 11] : (i >= 5) ? VFAT->name2[i - 5] : VFAT->name1[i]; + #if ENABLED(UTF_FILENAME_SUPPORT) + // We can't reconvert to UTF-8 here as UTF-8 is variable-size encoding, but joining LFN blocks + // needs static bytes addressing. So here just store full UTF-16LE words to re-convert later. + uint16_t idx = (n + i) * 2; // This is fixed as FAT LFN always contain UTF-16LE encoding + longFilename[idx] = utf16_ch & 0xFF; + longFilename[idx + 1] = (utf16_ch >> 8) & 0xFF; + #else + // Replace all multibyte characters to '_' + longFilename[n + i] = (utf16_ch > 0xFF) ? '_' : (utf16_ch & 0xFF); + #endif + } + // If this VFAT entry is the last one, add a NUL terminator at the end of the string + if (VFAT->sequenceNumber & 0x40) + longFilename[(n + FILENAME_LENGTH) * LONG_FILENAME_CHARSIZE] = '\0'; } - // If this VFAT entry is the last one, add a NUL terminator at the end of the string - if (VFAT->sequenceNumber & 0x40) longFilename[(n + FILENAME_LENGTH) * LONG_FILENAME_CHARSIZE] = '\0'; } } + else { + if (!checksum_error && lfn_checksum(dir->name) != checksum) checksum_error = 1; // orphan detected + if (checksum_error) INVALIDATE_LONGNAME(); + } } // Post-process normal file or subdirectory longname, if any @@ -1136,7 +1157,7 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) { // Reset n to the start of the long name n = 0; for (uint16_t idx = 0; idx < (LONG_FILENAME_LENGTH) / 2; idx += 2) { // idx is fixed since FAT LFN always contains UTF-16LE encoding - uint16_t utf16_ch = longFilename[idx] | (longFilename[idx + 1] << 8); + const uint16_t utf16_ch = longFilename[idx] | (longFilename[idx + 1] << 8); if (0xD800 == (utf16_ch & 0xF800)) // Surrogate pair - encode as '_' longFilename[n++] = '_'; else if (0 == (utf16_ch & 0xFF80)) // Encode as 1-byte UTF-8 char @@ -1199,12 +1220,11 @@ dir_t* SdBaseFile::readDirCache() { bool SdBaseFile::remove() { if (ENABLED(SDCARD_READONLY)) return false; - dir_t* d; // free any clusters - will fail if read-only or directory if (!truncate(0)) return false; // cache directory entry - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); + dir_t *d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); if (!d) return false; // mark entry deleted @@ -1235,7 +1255,7 @@ bool SdBaseFile::remove() { * \a dirFile is not a directory, \a path is not found * or an I/O error occurred. */ -bool SdBaseFile::remove(SdBaseFile* dirFile, const char* path) { +bool SdBaseFile::remove(SdBaseFile *dirFile, const char *path) { if (ENABLED(SDCARD_READONLY)) return false; SdBaseFile file; @@ -1252,13 +1272,10 @@ bool SdBaseFile::remove(SdBaseFile* dirFile, const char* path) { * Reasons for failure include \a dirFile is not open or is not a directory * file, newPath is invalid or already exists, or an I/O error occurs. */ -bool SdBaseFile::rename(SdBaseFile* dirFile, const char* newPath) { +bool SdBaseFile::rename(SdBaseFile *dirFile, const char *newPath) { if (ENABLED(SDCARD_READONLY)) return false; - dir_t entry; uint32_t dirCluster = 0; - SdBaseFile file; - dir_t* d; // must be an open file or subdirectory if (!(isFile() || isSubDir())) return false; @@ -1268,16 +1285,18 @@ bool SdBaseFile::rename(SdBaseFile* dirFile, const char* newPath) { // sync() and cache directory entry sync(); - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); + dir_t *d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); if (!d) return false; // save directory entry + dir_t entry; memcpy(&entry, d, sizeof(entry)); // mark entry deleted d->name[0] = DIR_NAME_DELETED; // make directory entry for new path + SdBaseFile file; if (isFile()) { if (!file.open(dirFile, newPath, O_CREAT | O_EXCL | O_WRITE)) { goto restore; @@ -1356,7 +1375,7 @@ bool SdBaseFile::rmdir() { // make sure directory is empty while (curPosition_ < fileSize_) { - dir_t* p = readDirCache(); + dir_t *p = readDirCache(); if (!p) return false; // done if past last used entry if (p->name[0] == DIR_NAME_FREE) break; @@ -1396,7 +1415,7 @@ bool SdBaseFile::rmRfStar() { // remember position index = curPosition_ / 32; - dir_t* p = readDirCache(); + dir_t *p = readDirCache(); if (!p) return false; // done if past last entry @@ -1438,7 +1457,7 @@ bool SdBaseFile::rmRfStar() { * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t). */ -SdBaseFile::SdBaseFile(const char* path, uint8_t oflag) { +SdBaseFile::SdBaseFile(const char *path, uint8_t oflag) { type_ = FAT_FILE_TYPE_CLOSED; writeError = false; open(path, oflag); @@ -1481,7 +1500,7 @@ bool SdBaseFile::seekSet(const uint32_t pos) { return true; } -void SdBaseFile::setpos(filepos_t* pos) { +void SdBaseFile::setpos(filepos_t *pos) { curPosition_ = pos->position; curCluster_ = pos->cluster; } @@ -1499,7 +1518,7 @@ bool SdBaseFile::sync() { if (ENABLED(SDCARD_READONLY) || !isOpen()) goto FAIL; if (flags_ & F_FILE_DIR_DIRTY) { - dir_t* d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); + dir_t *d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); // check for deleted by another open file object if (!d || d->name[0] == DIR_NAME_DELETED) goto FAIL; @@ -1536,8 +1555,7 @@ bool SdBaseFile::sync() { * * \return true for success, false for failure. */ -bool SdBaseFile::timestamp(SdBaseFile* file) { - dir_t* d; +bool SdBaseFile::timestamp(SdBaseFile *file) { dir_t dir; // get timestamps @@ -1546,7 +1564,7 @@ bool SdBaseFile::timestamp(SdBaseFile* file) { // update directory fields if (!sync()) return false; - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); + dir_t *d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); if (!d) return false; // copy timestamps @@ -1599,7 +1617,6 @@ bool SdBaseFile::timestamp(uint8_t flags, uint16_t year, uint8_t month, if (ENABLED(SDCARD_READONLY)) return false; uint16_t dirDate, dirTime; - dir_t* d; if (!isOpen() || year < 1980 @@ -1616,7 +1633,7 @@ bool SdBaseFile::timestamp(uint8_t flags, uint16_t year, uint8_t month, // update directory entry if (!sync()) return false; - d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); + dir_t *d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE); if (!d) return false; dirDate = FAT_DATE(year, month, day); @@ -1710,13 +1727,13 @@ bool SdBaseFile::truncate(uint32_t length) { * include write() is called before a file has been opened, write is called * for a read-only file, device is full, a corrupt file system or an I/O error. */ -int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) { +int16_t SdBaseFile::write(const void *buf, uint16_t nbyte) { #if ENABLED(SDCARD_READONLY) writeError = true; return -1; #endif // convert void* to uint8_t* - must be before goto statements - const uint8_t* src = reinterpret_cast(buf); + const uint8_t *src = reinterpret_cast(buf); // number of bytes left to write - must be before goto statements uint16_t nToWrite = nbyte; @@ -1782,7 +1799,7 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) { // rewrite part of block if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_WRITE)) goto FAIL; } - uint8_t* dst = vol_->cache()->data + blockOffset; + uint8_t *dst = vol_->cache()->data + blockOffset; memcpy(dst, src, n); } curPosition_ += n; diff --git a/Marlin/src/sd/SdBaseFile.h b/Marlin/src/sd/SdBaseFile.h index 2f7dfb9f3b13..342edefb7079 100644 --- a/Marlin/src/sd/SdBaseFile.h +++ b/Marlin/src/sd/SdBaseFile.h @@ -163,7 +163,7 @@ uint16_t const FAT_DEFAULT_TIME = (1 << 11); class SdBaseFile { public: SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {} - SdBaseFile(const char* path, uint8_t oflag); + SdBaseFile(const char *path, uint8_t oflag); ~SdBaseFile() { if (isOpen()) close(); } /** @@ -179,18 +179,18 @@ class SdBaseFile { * get position for streams * \param[out] pos struct to receive position */ - void getpos(filepos_t* pos); + void getpos(filepos_t *pos); /** * set position for streams * \param[out] pos struct with value for new position */ - void setpos(filepos_t* pos); + void setpos(filepos_t *pos); bool close(); - bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock); - bool createContiguous(SdBaseFile* dirFile, - const char* path, uint32_t size); + bool contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock); + bool createContiguous(SdBaseFile *dirFile, + const char *path, uint32_t size); /** * \return The current cluster number for a file or directory. */ @@ -204,7 +204,7 @@ class SdBaseFile { /** * \return Current working directory */ - static SdBaseFile* cwd() { return cwd_; } + static SdBaseFile *cwd() { return cwd_; } /** * Set the date/time callback function @@ -213,7 +213,7 @@ class SdBaseFile { * function is of the form: * * \code - * void dateTime(uint16_t* date, uint16_t* time) { + * void dateTime(uint16_t *date, uint16_t *time) { * uint16_t year; * uint8_t month, day, hour, minute, second; * @@ -235,7 +235,7 @@ class SdBaseFile { * See the timestamp() function. */ static void dateTimeCallback( - void (*dateTime)(uint16_t* date, uint16_t* time)) { + void (*dateTime)(uint16_t *date, uint16_t *time)) { dateTime_ = dateTime; } @@ -243,10 +243,10 @@ class SdBaseFile { * Cancel the date/time callback function. */ static void dateTimeCallbackCancel() { dateTime_ = 0; } - bool dirEntry(dir_t* dir); - static void dirName(const dir_t& dir, char* name); - bool exists(const char* name); - int16_t fgets(char* str, int16_t num, char* delim = 0); + bool dirEntry(dir_t *dir); + static void dirName(const dir_t& dir, char *name); + bool exists(const char *name); + int16_t fgets(char *str, int16_t num, char *delim = 0); /** * \return The total number of bytes in a file or directory. @@ -286,27 +286,27 @@ class SdBaseFile { bool getDosName(char * const name); void ls(uint8_t flags = 0, uint8_t indent = 0); - bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true); - bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag); - bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag); - bool open(const char* path, uint8_t oflag = O_READ); - bool openNext(SdBaseFile* dirFile, uint8_t oflag); - bool openRoot(SdVolume* vol); + bool mkdir(SdBaseFile *dir, const char *path, bool pFlag = true); + bool open(SdBaseFile *dirFile, uint16_t index, uint8_t oflag); + bool open(SdBaseFile *dirFile, const char *path, uint8_t oflag); + bool open(const char *path, uint8_t oflag = O_READ); + bool openNext(SdBaseFile *dirFile, uint8_t oflag); + bool openRoot(SdVolume *vol); int peek(); static void printFatDate(uint16_t fatDate); static void printFatTime(uint16_t fatTime); bool printName(); int16_t read(); - int16_t read(void* buf, uint16_t nbyte); - int8_t readDir(dir_t* dir, char* longFilename); - static bool remove(SdBaseFile* dirFile, const char* path); + int16_t read(void *buf, uint16_t nbyte); + int8_t readDir(dir_t *dir, char *longFilename); + static bool remove(SdBaseFile *dirFile, const char *path); bool remove(); /** * Set the file's current position to zero. */ void rewind() { seekSet(0); } - bool rename(SdBaseFile* dirFile, const char* newPath); + bool rename(SdBaseFile *dirFile, const char *newPath); bool rmdir(); bool rmRfStar(); @@ -325,7 +325,7 @@ class SdBaseFile { bool seekEnd(const int32_t offset = 0) { return seekSet(fileSize_ + offset); } bool seekSet(const uint32_t pos); bool sync(); - bool timestamp(SdBaseFile* file); + bool timestamp(SdBaseFile *file); bool timestamp(uint8_t flag, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second); @@ -341,14 +341,14 @@ class SdBaseFile { * \return SdVolume that contains this file. */ SdVolume* volume() const { return vol_; } - int16_t write(const void* buf, uint16_t nbyte); + int16_t write(const void *buf, uint16_t nbyte); private: friend class SdFat; // allow SdFat to set cwd_ - static SdBaseFile* cwd_; // global pointer to cwd dir + static SdBaseFile *cwd_; // global pointer to cwd dir // data time callback function - static void (*dateTime_)(uint16_t* date, uint16_t* time); + static void (*dateTime_)(uint16_t *date, uint16_t *time); // bits defined in flags_ static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC), // should be 0x0F @@ -364,21 +364,21 @@ class SdBaseFile { uint8_t dirIndex_; // index of directory entry in dirBlock uint32_t fileSize_; // file size in bytes uint32_t firstCluster_; // first cluster of file - SdVolume* vol_; // volume where file is located + SdVolume *vol_; // volume where file is located /** * EXPERIMENTAL - Don't use! */ - //bool openParent(SdBaseFile* dir); + //bool openParent(SdBaseFile *dir); // private functions bool addCluster(); bool addDirCluster(); dir_t* cacheDirEntry(uint8_t action); int8_t lsPrintNext(uint8_t flags, uint8_t indent); - static bool make83Name(const char* str, uint8_t* name, const char** ptr); - bool mkdir(SdBaseFile* parent, const uint8_t dname[11]); - bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag); + static bool make83Name(const char *str, uint8_t *name, const char **ptr); + bool mkdir(SdBaseFile *parent, const uint8_t dname[11]); + bool open(SdBaseFile *dirFile, const uint8_t dname[11], uint8_t oflag); bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags); dir_t* readDirCache(); }; diff --git a/Marlin/src/sd/SdFatConfig.h b/Marlin/src/sd/SdFatConfig.h index 13ac3a748785..dfba64129526 100644 --- a/Marlin/src/sd/SdFatConfig.h +++ b/Marlin/src/sd/SdFatConfig.h @@ -39,7 +39,7 @@ * * Each card requires about 550 bytes of SRAM so use of a Mega is recommended. */ -#define USE_MULTIPLE_CARDS 0 +#define USE_MULTIPLE_CARDS 0 //TODO? ENABLED(MULTI_VOLUME) /** * Call flush for endl if ENDL_CALLS_FLUSH is nonzero diff --git a/Marlin/src/sd/SdFatStructs.h b/Marlin/src/sd/SdFatStructs.h index ac81f1d64e5e..03bbc1c194c9 100644 --- a/Marlin/src/sd/SdFatStructs.h +++ b/Marlin/src/sd/SdFatStructs.h @@ -571,7 +571,7 @@ uint8_t const DIR_NAME_0xE5 = 0x05, // escape for name[0] = 0xE5 * * \return true if the entry is for part of a long name else false. */ -static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) { +static inline uint8_t DIR_IS_LONG_NAME(const dir_t *dir) { return (dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME; } @@ -584,7 +584,7 @@ uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY); * * \return true if the entry is for a normal file else false. */ -static inline uint8_t DIR_IS_FILE(const dir_t* dir) { +static inline uint8_t DIR_IS_FILE(const dir_t *dir) { return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0; } @@ -594,7 +594,7 @@ static inline uint8_t DIR_IS_FILE(const dir_t* dir) { * * \return true if the entry is for a subdirectory else false. */ -static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) { +static inline uint8_t DIR_IS_SUBDIR(const dir_t *dir) { return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY; } @@ -604,6 +604,6 @@ static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) { * * \return true if the entry is for a normal file or subdirectory else false. */ -static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) { +static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t *dir) { return (dir->attributes & DIR_ATT_VOLUME_ID) == 0; } diff --git a/Marlin/src/sd/SdFatUtil.cpp b/Marlin/src/sd/SdFatUtil.cpp index 7d9f33dc5050..e6f7a9a01305 100644 --- a/Marlin/src/sd/SdFatUtil.cpp +++ b/Marlin/src/sd/SdFatUtil.cpp @@ -48,7 +48,7 @@ return &top - reinterpret_cast(sbrk(0)); } -#else +#elif defined(__AVR__) extern char* __brkval; extern char __bss_end; diff --git a/Marlin/src/sd/SdFile.cpp b/Marlin/src/sd/SdFile.cpp index cba67e2bba81..bce96ef02db5 100644 --- a/Marlin/src/sd/SdFile.cpp +++ b/Marlin/src/sd/SdFile.cpp @@ -43,7 +43,7 @@ * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t). */ -SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { } +SdFile::SdFile(const char *path, uint8_t oflag) : SdBaseFile(path, oflag) { } /** * Write data to an open file. @@ -60,7 +60,7 @@ SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { } * include write() is called before a file has been opened, write is called * for a read-only file, device is full, a corrupt file system or an I/O error. */ -int16_t SdFile::write(const void* buf, uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); } +int16_t SdFile::write(const void *buf, uint16_t nbyte) { return SdBaseFile::write(buf, nbyte); } /** * Write a byte to a file. Required by the Arduino Print class. @@ -78,7 +78,7 @@ int16_t SdFile::write(const void* buf, uint16_t nbyte) { return SdBaseFile::writ * \param[in] str Pointer to the string. * Use writeError to check for errors. */ -void SdFile::write(const char* str) { SdBaseFile::write(str, strlen(str)); } +void SdFile::write(const char *str) { SdBaseFile::write(str, strlen(str)); } /** * Write a PROGMEM string to a file. diff --git a/Marlin/src/sd/SdFile.h b/Marlin/src/sd/SdFile.h index 17256b47c8f1..1ff05828d272 100644 --- a/Marlin/src/sd/SdFile.h +++ b/Marlin/src/sd/SdFile.h @@ -33,7 +33,6 @@ #include "SdBaseFile.h" #include -#include /** * \class SdFile @@ -42,15 +41,15 @@ class SdFile : public SdBaseFile { public: SdFile() {} - SdFile(const char* name, uint8_t oflag); + SdFile(const char *name, uint8_t oflag); #if ARDUINO >= 100 size_t write(uint8_t b); #else - void write(uint8_t b); + void write(uint8_t b); #endif - int16_t write(const void* buf, uint16_t nbyte); - void write(const char* str); + int16_t write(const void *buf, uint16_t nbyte); + void write(const char *str); void write_P(PGM_P str); void writeln_P(PGM_P str); }; diff --git a/Marlin/src/sd/SdVolume.cpp b/Marlin/src/sd/SdVolume.cpp index e262c8867ab4..1b1fdc5a7c1e 100644 --- a/Marlin/src/sd/SdVolume.cpp +++ b/Marlin/src/sd/SdVolume.cpp @@ -41,13 +41,13 @@ // raw block cache uint32_t SdVolume::cacheBlockNumber_; // current block number cache_t SdVolume::cacheBuffer_; // 512 byte cache for Sd2Card - Sd2Card* SdVolume::sdCard_; // pointer to SD card object + DiskIODriver *SdVolume::sdCard_; // pointer to SD card object bool SdVolume::cacheDirty_; // cacheFlush() will write block if true uint32_t SdVolume::cacheMirrorBlock_; // mirror block for second FAT -#endif // USE_MULTIPLE_CARDS +#endif // find a contiguous group of clusters -bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) { +bool SdVolume::allocContiguous(uint32_t count, uint32_t *curCluster) { if (ENABLED(SDCARD_READONLY)) return false; // start of group @@ -149,7 +149,7 @@ bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) { } // return the size in bytes of a cluster chain -bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) { +bool SdVolume::chainSize(uint32_t cluster, uint32_t *size) { uint32_t s = 0; do { if (!fatGet(cluster, &cluster)) return false; @@ -160,7 +160,7 @@ bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) { } // Fetch a FAT entry -bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) { +bool SdVolume::fatGet(uint32_t cluster, uint32_t *value) { uint32_t lba; if (cluster > (clusterCount_ + 1)) return false; if (FAT12_SUPPORT && fatType_ == 12) { @@ -326,9 +326,9 @@ int32_t SdVolume::freeClusterCount() { * Reasons for failure include not finding a valid partition, not finding a valid * FAT file system in the specified partition or an I/O error. */ -bool SdVolume::init(Sd2Card* dev, uint8_t part) { +bool SdVolume::init(DiskIODriver* dev, uint8_t part) { uint32_t totalBlocks, volumeStartBlock = 0; - fat32_boot_t* fbs; + fat32_boot_t *fbs; sdCard_ = dev; fatType_ = 0; @@ -342,7 +342,7 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) { if (part) { if (part > 4) return false; if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false; - part_t* p = &cacheBuffer_.mbr.part[part - 1]; + part_t *p = &cacheBuffer_.mbr.part[part - 1]; if ((p->boot & 0x7F) != 0 || p->totalSectors < 100 || p->firstSector == 0) return false; // not a valid partition volumeStartBlock = p->firstSector; diff --git a/Marlin/src/sd/SdVolume.h b/Marlin/src/sd/SdVolume.h index 2d57c681c494..b8e70ca9d7f5 100644 --- a/Marlin/src/sd/SdVolume.h +++ b/Marlin/src/sd/SdVolume.h @@ -36,9 +36,11 @@ #if ENABLED(USB_FLASH_DRIVE_SUPPORT) #include "usb_flashdrive/Sd2Card_FlashDrive.h" -#elif ENABLED(SDIO_SUPPORT) +#endif + +#if NEED_SD2CARD_SDIO #include "Sd2Card_sdio.h" -#else +#elif NEED_SD2CARD_SPI #include "Sd2Card.h" #endif @@ -47,6 +49,7 @@ //============================================================================== // SdVolume class + /** * \brief Cache for an SD data block */ @@ -84,14 +87,14 @@ class SdVolume { * Initialize a FAT volume. Try partition one first then try super * floppy format. * - * \param[in] dev The Sd2Card where the volume is located. + * \param[in] dev The DiskIODriver where the volume is located. * * \return true for success, false for failure. * Reasons for failure include not finding a valid partition, not finding * a valid FAT file system or an I/O error. */ - bool init(Sd2Card* dev) { return init(dev, 1) ? true : init(dev, 0); } - bool init(Sd2Card* dev, uint8_t part); + bool init(DiskIODriver *dev) { return init(dev, 1) || init(dev, 0); } + bool init(DiskIODriver *dev, uint8_t part); // inline functions that return volume info uint8_t blocksPerCluster() const { return blocksPerCluster_; } //> \return The volume's cluster size in blocks. @@ -112,10 +115,10 @@ class SdVolume { uint32_t rootDirStart() const { return rootDirStart_; } /** - * Sd2Card object for this volume - * \return pointer to Sd2Card object. + * DiskIODriver object for this volume + * \return pointer to DiskIODriver object. */ - Sd2Card* sdCard() { return sdCard_; } + DiskIODriver* sdCard() { return sdCard_; } /** * Debug access to FAT table @@ -124,7 +127,7 @@ class SdVolume { * \param[out] v value of entry * \return true for success or false for failure */ - bool dbgFat(uint32_t n, uint32_t* v) { return fatGet(n, v); } + bool dbgFat(uint32_t n, uint32_t *v) { return fatGet(n, v); } private: // Allow SdBaseFile access to SdVolume private data. @@ -138,13 +141,13 @@ class SdVolume { #if USE_MULTIPLE_CARDS cache_t cacheBuffer_; // 512 byte cache for device blocks uint32_t cacheBlockNumber_; // Logical number of block in the cache - Sd2Card* sdCard_; // Sd2Card object for cache + DiskIODriver *sdCard_; // DiskIODriver object for cache bool cacheDirty_; // cacheFlush() will write block if true uint32_t cacheMirrorBlock_; // block number for mirror FAT #else static cache_t cacheBuffer_; // 512 byte cache for device blocks static uint32_t cacheBlockNumber_; // Logical number of block in the cache - static Sd2Card* sdCard_; // Sd2Card object for cache + static DiskIODriver *sdCard_; // DiskIODriver object for cache static bool cacheDirty_; // cacheFlush() will write block if true static uint32_t cacheMirrorBlock_; // block number for mirror FAT #endif @@ -161,7 +164,7 @@ class SdVolume { uint16_t rootDirEntryCount_; // number of entries in FAT16 root dir uint32_t rootDirStart_; // root start block for FAT16, cluster for FAT32 - bool allocContiguous(uint32_t count, uint32_t* curCluster); + bool allocContiguous(uint32_t count, uint32_t *curCluster); uint8_t blockOfCluster(uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); } uint32_t clusterStartBlock(uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); } uint32_t blockNumber(uint32_t cluster, uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); } @@ -183,8 +186,8 @@ class SdVolume { cacheBlockNumber_ = blockNumber; } void cacheSetDirty() { cacheDirty_ |= CACHE_FOR_WRITE; } - bool chainSize(uint32_t beginCluster, uint32_t* size); - bool fatGet(uint32_t cluster, uint32_t* value); + bool chainSize(uint32_t beginCluster, uint32_t *size); + bool fatGet(uint32_t cluster, uint32_t *value); bool fatPut(uint32_t cluster, uint32_t value); bool fatPutEOC(uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); } bool freeChain(uint32_t cluster); @@ -193,6 +196,6 @@ class SdVolume { if (fatType_ == 16) return cluster >= FAT16EOC_MIN; return cluster >= FAT32EOC_MIN; } - bool readBlock(uint32_t block, uint8_t* dst) { return sdCard_->readBlock(block, dst); } - bool writeBlock(uint32_t block, const uint8_t* dst) { return sdCard_->writeBlock(block, dst); } + bool readBlock(uint32_t block, uint8_t *dst) { return sdCard_->readBlock(block, dst); } + bool writeBlock(uint32_t block, const uint8_t *dst) { return sdCard_->writeBlock(block, dst); } }; diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 647e3f3e219b..9f8aac634b4a 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -32,7 +32,9 @@ #include "../lcd/marlinui.h" #if ENABLED(DWIN_CREALITY_LCD) - #include "../lcd/dwin/e3v2/dwin.h" + #include "../lcd/e3v2/creality/dwin.h" +#elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) + #include "../lcd/e3v2/enhanced/dwin.h" #endif #include "../module/planner.h" // for synchronize @@ -59,6 +61,7 @@ // extern +PGMSTR(M21_STR, "M21"); PGMSTR(M23_STR, "M23 %s"); PGMSTR(M24_STR, "M24"); @@ -70,7 +73,7 @@ char CardReader::filename[FILENAME_LENGTH], CardReader::longFilename[LONG_FILENA IF_DISABLED(NO_SD_AUTOSTART, uint8_t CardReader::autofile_index); // = 0 #if BOTH(HAS_MULTI_SERIAL, BINARY_FILE_TRANSFER) - int8_t CardReader::transfer_port_index; + serial_index_t CardReader::transfer_port_index; #endif // private: @@ -120,7 +123,15 @@ uint8_t CardReader::workDirDepth; #endif // SDCARD_SORT_ALPHA -Sd2Card CardReader::sd2card; +#if HAS_USB_FLASH_DRIVE + DiskIODriver_USBFlash CardReader::media_driver_usbFlash; +#endif + +#if NEED_SD2CARD_SDIO || NEED_SD2CARD_SPI + CardReader::sdcard_driver_t CardReader::media_driver_sdcard; +#endif + +DiskIODriver* CardReader::driver = nullptr; SdVolume CardReader::volume; SdFile CardReader::file; @@ -133,6 +144,14 @@ SdFile CardReader::file; uint32_t CardReader::filesize, CardReader::sdpos; CardReader::CardReader() { + changeMedia(& + #if HAS_USB_FLASH_DRIVE && !SHARED_VOLUME_IS(SD_ONBOARD) + media_driver_usbFlash + #else + media_driver_sdcard + #endif + ); + #if ENABLED(SDCARD_SORT_ALPHA) sort_count = 0; #if ENABLED(SDSORT_GCODE) @@ -142,7 +161,7 @@ CardReader::CardReader() { #endif #endif - flag.sdprinting = flag.mounted = flag.saving = flag.logging = false; + flag.sdprinting = flag.sdprintdone = flag.mounted = flag.saving = flag.logging = false; filesize = sdpos = 0; TERN_(HAS_MEDIA_SUBCALLS, file_subcall_ctr = 0); @@ -241,48 +260,84 @@ void CardReader::selectByName(SdFile dir, const char * const match) { } } -// -// Recursive method to list all files within a folder -// -void CardReader::printListing(SdFile parent, const char * const prepend/*=nullptr*/) { +/** + * Recursive method to print all files within a folder in flat + * DOS 8.3 format. This style of listing is the most compatible + * with legacy hosts. + * + * This method recurses to unlimited depth and lists all G-code + * files within the given parent. If the hierarchy is very deep + * this can blow up the stack, so a 'depth' parameter would be a + * good addition. + */ +void CardReader::printListing( + SdFile parent + OPTARG(LONG_FILENAME_HOST_SUPPORT, const bool includeLongNames/*=false*/) + , const char * const prepend/*=nullptr*/ + OPTARG(LONG_FILENAME_HOST_SUPPORT, const char * const prependLong/*=nullptr*/) +) { dir_t p; while (parent.readDir(&p, longFilename) > 0) { if (DIR_IS_SUBDIR(&p)) { - // Get the short name for the item, which we know is a folder - char dosFilename[FILENAME_LENGTH]; + size_t lenPrepend = prepend ? strlen(prepend) + 1 : 0; + // Allocate enough stack space for the full path including / separator + char path[lenPrepend + FILENAME_LENGTH]; + if (prepend) { + strcpy(path, prepend); + path[lenPrepend - 1] = '/'; + } + char* dosFilename = path + lenPrepend; createFilename(dosFilename, p); - // Allocate enough stack space for the full path to a folder, trailing slash, and nul - const bool prepend_is_empty = (!prepend || prepend[0] == '\0'); - const int len = (prepend_is_empty ? 1 : strlen(prepend)) + strlen(dosFilename) + 1 + 1; - char path[len]; - - // Append the FOLDERNAME12/ to the passed string. - // It contains the full path to the "parent" argument. - // We now have the full path to the item in this folder. - strcpy(path, prepend_is_empty ? "/" : prepend); // root slash if prepend is empty - strcat(path, dosFilename); // FILENAME_LENGTH characters maximum - strcat(path, "/"); // 1 character - - // Serial.print(path); - // Get a new directory object using the full path // and dive recursively into it. - SdFile child; - if (!child.open(&parent, dosFilename, O_READ)) { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(STR_SD_CANT_OPEN_SUBDIR, dosFilename); + SdFile child; // child.close() in destructor + if (child.open(&parent, dosFilename, O_READ)) + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + if (includeLongNames) { + size_t lenPrependLong = prependLong ? strlen(prependLong) + 1 : 0; + // Allocate enough stack space for the full long path including / separator + char pathLong[lenPrependLong + strlen(longFilename) + 1]; + if (prependLong) { + strcpy(pathLong, prependLong); + pathLong[lenPrependLong - 1] = '/'; + } + strcpy(pathLong + lenPrependLong, longFilename); + printListing(child, true, path, pathLong); + } + else + printListing(child, false, path); + #else + printListing(child, path); + #endif + else { + SERIAL_ECHO_MSG(STR_SD_CANT_OPEN_SUBDIR, dosFilename); + return; } - printListing(child, path); - // close() is done automatically by destructor of SdFile } else if (is_dir_or_gcode(p)) { - createFilename(filename, p); - if (prepend) SERIAL_ECHO(prepend); - SERIAL_ECHO(filename); + if (prepend) { + SERIAL_ECHO(prepend); + SERIAL_CHAR('/'); + } + SERIAL_ECHO(createFilename(filename, p)); SERIAL_CHAR(' '); - SERIAL_ECHOLN(p.fileSize); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + if (!includeLongNames) + #endif + SERIAL_ECHOLN(p.fileSize); + #if ENABLED(LONG_FILENAME_HOST_SUPPORT) + else { + SERIAL_ECHO(p.fileSize); + SERIAL_CHAR(' '); + if (prependLong) { + SERIAL_ECHO(prependLong); + SERIAL_CHAR('/'); + } + SERIAL_ECHOLN(longFilename[0] ? longFilename : "???"); + } + #endif } } } @@ -290,10 +345,10 @@ void CardReader::printListing(SdFile parent, const char * const prepend/*=nullpt // // List all files on the SD card // -void CardReader::ls() { +void CardReader::ls(TERN_(LONG_FILENAME_HOST_SUPPORT, bool includeLongNames/*=false*/)) { if (flag.mounted) { root.rewind(); - printListing(root); + printListing(root OPTARG(LONG_FILENAME_HOST_SUPPORT, includeLongNames)); } } @@ -324,7 +379,7 @@ void CardReader::ls() { // Go to the next segment while (path[++i]) { } - // SERIAL_ECHOPGM("Looking for segment: "); SERIAL_ECHOLN(segment); + //SERIAL_ECHOLNPGM("Looking for segment: ", segment); // Find the item, setting the long filename diveDir.rewind(); @@ -344,7 +399,7 @@ void CardReader::ls() { if (!dir.open(&diveDir, segment, O_READ)) { SERIAL_EOL(); SERIAL_ECHO_START(); - SERIAL_ECHOPAIR(STR_SD_CANT_OPEN_SUBDIR, segment); + SERIAL_ECHOPGM(STR_SD_CANT_OPEN_SUBDIR, segment); break; } @@ -361,7 +416,7 @@ void CardReader::ls() { // // Echo the DOS 8.3 filename (and long filename, if any) // -void CardReader::printFilename() { +void CardReader::printSelectedFilename() { if (file.isOpen()) { char dosFilename[FILENAME_LENGTH]; file.getDosName(dosFilename); @@ -369,7 +424,7 @@ void CardReader::printFilename() { #if ENABLED(LONG_FILENAME_HOST_SUPPORT) selectFileByName(dosFilename); if (longFilename[0]) { - SERIAL_ECHO(' '); + SERIAL_CHAR(' '); SERIAL_ECHO(longFilename); } #endif @@ -384,12 +439,12 @@ void CardReader::mount() { flag.mounted = false; if (root.isOpen()) root.close(); - if (!sd2card.init(SD_SPI_SPEED, SDSS) + if (!driver->init(SD_SPI_SPEED, SDSS) #if defined(LCD_SDSS) && (LCD_SDSS != SDSS) - && !sd2card.init(SD_SPI_SPEED, LCD_SDSS) + && !driver->init(SD_SPI_SPEED, LCD_SDSS) #endif ) SERIAL_ECHO_MSG(STR_SD_INIT_FAIL); - else if (!volume.init(&sd2card)) + else if (!volume.init(driver)) SERIAL_ERROR_MSG(STR_SD_VOL_INIT_FAIL); else if (!root.openRoot(&volume)) SERIAL_ERROR_MSG(STR_SD_OPENROOT_FAIL); @@ -420,7 +475,7 @@ void CardReader::manage_media() { uint8_t stat = uint8_t(IS_SD_INSERTED()); if (stat == prev_stat) return; - DEBUG_ECHOLNPAIR("SD: Status changed from ", prev_stat, " to ", stat); + DEBUG_ECHOLNPGM("SD: Status changed from ", prev_stat, " to ", stat); flag.workDirIsRoot = true; // Return to root on mount/release @@ -469,9 +524,9 @@ void CardReader::manage_media() { void CardReader::release() { // Card removed while printing? Abort! if (IS_SD_PRINTING()) - card.flag.abort_sd_printing = true; + abortFilePrintSoon(); else - endFilePrint(); + endFilePrintNow(); flag.mounted = false; flag.workDirIsRoot = true; @@ -498,9 +553,10 @@ void CardReader::openAndPrintFile(const char *name) { * since you cannot browse files during active printing. * Used by M24 and anywhere Start / Resume applies. */ -void CardReader::startFileprint() { +void CardReader::startOrResumeFilePrinting() { if (isMounted()) { flag.sdprinting = true; + flag.sdprintdone = false; TERN_(SD_RESORT, flush_presort()); } } @@ -508,15 +564,20 @@ void CardReader::startFileprint() { // // Run tasks upon finishing or aborting a file print. // -void CardReader::endFilePrint(TERN_(SD_RESORT, const bool re_sort/*=false*/)) { +void CardReader::endFilePrintNow(TERN_(SD_RESORT, const bool re_sort/*=false*/)) { TERN_(ADVANCED_PAUSE_FEATURE, did_pause_print = 0); - TERN_(DWIN_CREALITY_LCD, HMI_flag.print_finish = flag.sdprinting); - flag.sdprinting = flag.abort_sd_printing = false; + TERN_(HAS_DWIN_E3V2_BASIC, HMI_flag.print_finish = flag.sdprinting); + flag.abort_sd_printing = false; if (isFileOpen()) file.close(); TERN_(SD_RESORT, if (re_sort) presort()); } -void CardReader::openLogFile(char * const path) { +void CardReader::abortFilePrintNow(TERN_(SD_RESORT, const bool re_sort/*=false*/)) { + flag.sdprinting = flag.sdprintdone = false; + endFilePrintNow(TERN_(SD_RESORT, re_sort)); +} + +void CardReader::openLogFile(const char * const path) { flag.logging = DISABLED(SDCARD_READONLY); IF_DISABLED(SDCARD_READONLY, openFileWrite(path)); } @@ -524,7 +585,7 @@ void CardReader::openLogFile(char * const path) { // // Get the root-relative DOS path of the selected file // -void CardReader::getAbsFilename(char *dst) { +void CardReader::getAbsFilenameInCWD(char *dst) { *dst++ = '/'; uint8_t cnt = 1; @@ -545,16 +606,16 @@ void CardReader::getAbsFilename(char *dst) { } void openFailed(const char * const fname) { - SERIAL_ECHOLNPAIR(STR_SD_OPEN_FILE_FAIL, fname, "."); + SERIAL_ECHOLNPGM(STR_SD_OPEN_FILE_FAIL, fname, "."); } void announceOpen(const uint8_t doing, const char * const path) { if (doing) { - PORT_REDIRECT(SERIAL_ALL); + PORT_REDIRECT(SerialMask::All); SERIAL_ECHO_START(); SERIAL_ECHOPGM("Now "); - serialprintPGM(doing == 1 ? PSTR("doing") : PSTR("fresh")); - SERIAL_ECHOLNPAIR(" file: ", path); + SERIAL_ECHOPGM_P(doing == 1 ? PSTR("doing") : PSTR("fresh")); + SERIAL_ECHOLNPGM(" file: ", path); } } @@ -566,7 +627,7 @@ void announceOpen(const uint8_t doing, const char * const path) { // - 1 : (no file open) Opening a macro (M98). // - 2 : Resuming from a sub-procedure // -void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0*/) { +void CardReader::openFileRead(const char * const path, const uint8_t subcall_type/*=0*/) { if (!isMounted()) return; switch (subcall_type) { @@ -584,18 +645,17 @@ void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0* // Too deep? The firmware has to bail. if (file_subcall_ctr > SD_PROCEDURE_DEPTH - 1) { - SERIAL_ERROR_MSG("Exceeded max SUBROUTINE depth:", int(SD_PROCEDURE_DEPTH)); + SERIAL_ERROR_MSG("Exceeded max SUBROUTINE depth:", SD_PROCEDURE_DEPTH); kill(GET_TEXT(MSG_KILL_SUBCALL_OVERFLOW)); return; } // Store current filename (based on workDirParents) and position - getAbsFilename(proc_filenames[file_subcall_ctr]); + getAbsFilenameInCWD(proc_filenames[file_subcall_ctr]); filespos[file_subcall_ctr] = sdpos; // For sub-procedures say 'SUBROUTINE CALL target: "..." parent: "..." pos12345' - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR("SUBROUTINE CALL target:\"", path, "\" parent:\"", proc_filenames[file_subcall_ctr], "\" pos", sdpos); + SERIAL_ECHO_MSG("SUBROUTINE CALL target:\"", path, "\" parent:\"", proc_filenames[file_subcall_ctr], "\" pos", sdpos); file_subcall_ctr++; break; @@ -606,7 +666,7 @@ void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0* #endif } - endFilePrint(); + abortFilePrintNow(); SdFile *diveDir; const char * const fname = diveToFile(true, diveDir, path); @@ -617,8 +677,8 @@ void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0* sdpos = 0; { // Don't remove this block, as the PORT_REDIRECT is a RAII - PORT_REDIRECT(SERIAL_ALL); - SERIAL_ECHOLNPAIR(STR_SD_FILE_OPENED, fname, STR_SD_SIZE, filesize); + PORT_REDIRECT(SerialMask::All); + SERIAL_ECHOLNPGM(STR_SD_FILE_OPENED, fname, STR_SD_SIZE, filesize); SERIAL_ECHOLNPGM(STR_SD_FILE_SELECTED); } @@ -630,19 +690,19 @@ void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0* } inline void echo_write_to_file(const char * const fname) { - SERIAL_ECHOLNPAIR(STR_SD_WRITE_TO_FILE, fname); + SERIAL_ECHOLNPGM(STR_SD_WRITE_TO_FILE, fname); } // // Open a file by DOS path for write // -void CardReader::openFileWrite(char * const path) { +void CardReader::openFileWrite(const char * const path) { if (!isMounted()) return; announceOpen(2, path); TERN_(HAS_MEDIA_SUBCALLS, file_subcall_ctr = 0); - endFilePrint(); + abortFilePrintNow(); SdFile *diveDir; const char * const fname = diveToFile(false, diveDir, path); @@ -670,7 +730,7 @@ void CardReader::openFileWrite(char * const path) { bool CardReader::fileExists(const char * const path) { if (!isMounted()) return false; - DEBUG_ECHOLNPAIR("fileExists: ", path); + DEBUG_ECHOLNPGM("fileExists: ", path); // Dive to the file's directory and get the base name SdFile *diveDir = nullptr; @@ -695,28 +755,28 @@ bool CardReader::fileExists(const char * const path) { void CardReader::removeFile(const char * const name) { if (!isMounted()) return; - //endFilePrint(); + //abortFilePrintNow(); - SdFile *curDir; - const char * const fname = diveToFile(false, curDir, name); + SdFile *itsDirPtr; + const char * const fname = diveToFile(false, itsDirPtr, name); if (!fname) return; #if ENABLED(SDCARD_READONLY) - SERIAL_ECHOLNPAIR("Deletion failed (read-only), File: ", fname, "."); + SERIAL_ECHOLNPGM("Deletion failed (read-only), File: ", fname, "."); #else - if (file.remove(curDir, fname)) { - SERIAL_ECHOLNPAIR("File deleted:", fname); + if (file.remove(itsDirPtr, fname)) { + SERIAL_ECHOLNPGM("File deleted:", fname); sdpos = 0; TERN_(SDCARD_SORT_ALPHA, presort()); } else - SERIAL_ECHOLNPAIR("Deletion failed, File: ", fname, "."); + SERIAL_ECHOLNPGM("Deletion failed, File: ", fname, "."); #endif } void CardReader::report_status() { if (isPrinting()) { - SERIAL_ECHOPAIR(STR_SD_PRINTING_BYTE, sdpos); + SERIAL_ECHOPGM(STR_SD_PRINTING_BYTE, sdpos); SERIAL_CHAR('/'); SERIAL_ECHOLN(filesize); } @@ -725,9 +785,9 @@ void CardReader::report_status() { } void CardReader::write_command(char * const buf) { - char* begin = buf; - char* npos = nullptr; - char* end = buf + strlen(buf) - 1; + char *begin = buf, + *npos = nullptr, + *end = buf + strlen(buf) - 1; file.writeError = false; if ((npos = strchr(buf, 'N'))) { @@ -839,100 +899,109 @@ uint16_t CardReader::countFilesInWorkDir() { /** * Dive to the given DOS 8.3 file path, with optional echo of the dive paths. * + * On entry: + * - The workDir points to the last-set navigation target by cd, cdup, cdroot, or diveToFile(true, ...) + * * On exit: * - Your curDir pointer contains an SdFile reference to the file's directory. * - If update_cwd was 'true' the workDir now points to the file's directory. * * Returns a pointer to the last segment (filename) of the given DOS 8.3 path. + * On exit, inDirPtr contains an SdFile reference to the file's directory. * * A nullptr result indicates an unrecoverable error. + * + * NOTE: End the path with a slash to dive to a folder. In this case the + * returned filename will be blank (points to the end of the path). */ -const char* CardReader::diveToFile(const bool update_cwd, SdFile*& diveDir, const char * const path, const bool echo/*=false*/) { +const char* CardReader::diveToFile(const bool update_cwd, SdFile* &inDirPtr, const char * const path, const bool echo/*=false*/) { + DEBUG_SECTION(est, "diveToFile", true); + // Track both parent and subfolder static SdFile newDir1, newDir2; - SdFile *sub = &newDir1, *startDir; + SdFile *sub = &newDir1, *startDirPtr; // Parsing the path string - const char *item_name_adr = path; + const char *atom_ptr = path; - DEBUG_ECHOLNPAIR("diveToFile: path = '", path, "'"); + DEBUG_ECHOLNPGM(" path = '", path, "'"); if (path[0] == '/') { // Starting at the root directory? - diveDir = &root; - item_name_adr++; - DEBUG_ECHOLNPAIR("diveToFile: CWD to root: ", hex_address((void*)diveDir)); + inDirPtr = &root; + atom_ptr++; + DEBUG_ECHOLNPGM(" CWD to root: ", hex_address((void*)inDirPtr)); if (update_cwd) workDirDepth = 0; // The cwd can be updated for the benefit of sub-programs } else - diveDir = &workDir; // Dive from workDir (as set by the UI) + inDirPtr = &workDir; // Dive from workDir (as set by the UI) - startDir = diveDir; + startDirPtr = inDirPtr; - DEBUG_ECHOLNPAIR("diveToFile: startDir = ", hex_address((void*)startDir)); + DEBUG_ECHOLNPGM(" startDirPtr = ", hex_address((void*)startDirPtr)); - while (item_name_adr) { + while (atom_ptr) { // Find next subdirectory delimiter - char * const name_end = strchr(item_name_adr, '/'); + const char * const name_end = strchr(atom_ptr, '/'); // Last atom in the path? Item found. - if (name_end <= item_name_adr) break; + if (name_end <= atom_ptr) break; - // Set subDirName - const uint8_t len = name_end - item_name_adr; + // Isolate the next subitem name + const uint8_t len = name_end - atom_ptr; char dosSubdirname[len + 1]; - strncpy(dosSubdirname, item_name_adr, len); + strncpy(dosSubdirname, atom_ptr, len); dosSubdirname[len] = 0; if (echo) SERIAL_ECHOLN(dosSubdirname); - DEBUG_ECHOLNPAIR("diveToFile: sub = ", hex_address((void*)sub)); + DEBUG_ECHOLNPGM(" sub = ", hex_address((void*)sub)); - // Open diveDir (closing first) + // Open inDirPtr (closing first) sub->close(); - if (!sub->open(diveDir, dosSubdirname, O_READ)) { + if (!sub->open(inDirPtr, dosSubdirname, O_READ)) { openFailed(dosSubdirname); - item_name_adr = nullptr; + atom_ptr = nullptr; break; } - // Close diveDir if not at starting-point - if (diveDir != startDir) { - DEBUG_ECHOLNPAIR("diveToFile: closing diveDir: ", hex_address((void*)diveDir)); - diveDir->close(); + // Close inDirPtr if not at starting-point + if (inDirPtr != startDirPtr) { + DEBUG_ECHOLNPGM(" closing inDirPtr: ", hex_address((void*)inDirPtr)); + inDirPtr->close(); } - // diveDir now subDir - diveDir = sub; - DEBUG_ECHOLNPAIR("diveToFile: diveDir = sub: ", hex_address((void*)diveDir)); + // inDirPtr now subDir + inDirPtr = sub; + DEBUG_ECHOLNPGM(" inDirPtr = sub: ", hex_address((void*)inDirPtr)); // Update workDirParents and workDirDepth if (update_cwd) { - DEBUG_ECHOLNPAIR("diveToFile: update_cwd"); + DEBUG_ECHOLNPGM(" update_cwd"); if (workDirDepth < MAX_DIR_DEPTH) - workDirParents[workDirDepth++] = *diveDir; + workDirParents[workDirDepth++] = *inDirPtr; } // Point sub at the other scratch object - sub = (diveDir != &newDir1) ? &newDir1 : &newDir2; - DEBUG_ECHOLNPAIR("diveToFile: swapping sub = ", hex_address((void*)sub)); + sub = (inDirPtr != &newDir1) ? &newDir1 : &newDir2; + DEBUG_ECHOLNPGM(" swapping sub = ", hex_address((void*)sub)); // Next path atom address - item_name_adr = name_end + 1; + atom_ptr = name_end + 1; } if (update_cwd) { - workDir = *diveDir; - DEBUG_ECHOLNPAIR("diveToFile: final workDir = ", hex_address((void*)diveDir)); + workDir = *inDirPtr; + DEBUG_ECHOLNPGM(" final workDir = ", hex_address((void*)inDirPtr)); flag.workDirIsRoot = (workDirDepth == 0); TERN_(SDCARD_SORT_ALPHA, presort()); } - return item_name_adr; + DEBUG_ECHOLNPGM(" returning string ", atom_ptr ?: "nullptr"); + return atom_ptr; } void CardReader::cd(const char * relpath) { - SdFile newDir; - SdFile *parent = workDir.isOpen() ? &workDir : &root; + SdFile newDir, *parent = &getWorkDir(); if (newDir.open(parent, relpath, O_READ)) { workDir = newDir; @@ -941,10 +1010,8 @@ void CardReader::cd(const char * relpath) { workDirParents[workDirDepth++] = workDir; TERN_(SDCARD_SORT_ALPHA, presort()); } - else { - SERIAL_ECHO_START(); - SERIAL_ECHOLNPAIR(STR_SD_CANT_ENTER_SUBDIR, relpath); - } + else + SERIAL_ECHO_MSG(STR_SD_CANT_ENTER_SUBDIR, relpath); } int8_t CardReader::cdup() { @@ -959,6 +1026,7 @@ int8_t CardReader::cdup() { void CardReader::cdroot() { workDir = root; flag.workDirIsRoot = true; + workDirDepth = 0; TERN_(SDCARD_SORT_ALPHA, presort()); } @@ -1070,9 +1138,9 @@ void CardReader::cdroot() { selectFileByIndex(i); SET_SORTNAME(i); SET_SORTSHORT(i); - // char out[30]; - // sprintf_P(out, PSTR("---- %i %s %s"), i, flag.filenameIsDir ? "D" : " ", sortnames[i]); - // SERIAL_ECHOLN(out); + //char out[30]; + //sprintf_P(out, PSTR("---- %i %s %s"), i, flag.filenameIsDir ? "D" : " ", sortnames[i]); + //SERIAL_ECHOLN(out); #if HAS_FOLDER_SORTING const uint16_t bit = i & 0x07, ind = i >> 3; if (bit == 0) isDir[ind] = 0x00; @@ -1088,7 +1156,9 @@ void CardReader::cdroot() { #if DISABLED(SDSORT_USES_RAM) selectFileByIndex(o1); // Pre-fetch the first entry and save it strcpy(name1, longest_filename()); // so the loop only needs one fetch - TERN_(HAS_FOLDER_SORTING, bool dir1 = flag.filenameIsDir); + #if HAS_FOLDER_SORTING + bool dir1 = flag.filenameIsDir; + #endif #endif for (uint16_t j = 0; j < i; ++j) { @@ -1151,7 +1221,7 @@ void CardReader::cdroot() { #if ENABLED(SDSORT_USES_RAM) && DISABLED(SDSORT_CACHE_NAMES) #if ENABLED(SDSORT_DYNAMIC_RAM) for (uint16_t i = 0; i < fileCnt; ++i) free(sortnames[i]); - TERN_(HAS_FOLDER_SORTING, free(isDir)); + TERN_(HAS_FOLDER_SORTING, delete [] isDir); #endif #endif } @@ -1177,14 +1247,14 @@ void CardReader::cdroot() { void CardReader::flush_presort() { if (sort_count > 0) { #if ENABLED(SDSORT_DYNAMIC_RAM) - delete sort_order; + delete [] sort_order; #if ENABLED(SDSORT_CACHE_NAMES) LOOP_L_N(i, sort_count) { free(sortshort[i]); // strdup free(sortnames[i]); // strdup } - delete sortshort; - delete sortnames; + delete [] sortshort; + delete [] sortnames; #endif #endif sort_count = 0; @@ -1208,21 +1278,21 @@ uint16_t CardReader::get_num_Files() { // Return from procedure or close out the Print Job // void CardReader::fileHasFinished() { - planner.synchronize(); file.close(); - #if HAS_MEDIA_SUBCALLS if (file_subcall_ctr > 0) { // Resume calling file after closing procedure file_subcall_ctr--; openFileRead(proc_filenames[file_subcall_ctr], 2); // 2 = Returning from sub-procedure setIndex(filespos[file_subcall_ctr]); - startFileprint(); + startOrResumeFilePrinting(); return; } #endif - endFilePrint(TERN_(SD_RESORT, true)); - marlin_state = MF_SD_COMPLETE; + endFilePrintNow(TERN_(SD_RESORT, true)); + + flag.sdprintdone = true; // Stop getting bytes from the SD card + marlin_state = MF_SD_COMPLETE; // Tell Marlin to enqueue M1001 soon } #if ENABLED(AUTO_REPORT_SD_STATUS) @@ -1255,7 +1325,7 @@ void CardReader::fileHasFinished() { removeFile(recovery.filename); #if ENABLED(DEBUG_POWER_LOSS_RECOVERY) SERIAL_ECHOPGM("Power-loss file delete"); - serialprintPGM(jobRecoverFileExists() ? PSTR(" failed.\n") : PSTR("d.\n")); + SERIAL_ECHOPGM_P(jobRecoverFileExists() ? PSTR(" failed.\n") : PSTR("d.\n")); #endif } } diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 0a89bbba789b..97003e1d1376 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -23,14 +23,17 @@ #include "../inc/MarlinConfig.h" -#define IFSD(A,B) TERN(SDSUPPORT,A,B) - #if ENABLED(SDSUPPORT) extern const char M23_STR[], M24_STR[]; -#if BOTH(SDCARD_SORT_ALPHA, SDSORT_DYNAMIC_RAM) - #define SD_RESORT 1 +#if ENABLED(SDCARD_SORT_ALPHA) + #if ENABLED(SDSORT_DYNAMIC_RAM) + #define SD_RESORT 1 + #endif + #if FOLDER_SORTING || ENABLED(SDSORT_GCODE) + #define HAS_FOLDER_SORTING 1 + #endif #endif #if ENABLED(SDCARD_RATHERRECENTFIRST) && DISABLED(SDCARD_SORT_ALPHA) @@ -44,11 +47,35 @@ extern const char M23_STR[], M24_STR[]; #define MAXPATHNAMELENGTH (1 + (MAXDIRNAMELENGTH + 1) * (MAX_DIR_DEPTH) + 1 + FILENAME_LENGTH) // "/" + N * ("ADIRNAME/") + "filename.ext" #include "SdFile.h" +#include "disk_io_driver.h" + +#if ENABLED(USB_FLASH_DRIVE_SUPPORT) + #include "usb_flashdrive/Sd2Card_FlashDrive.h" +#endif + +#if NEED_SD2CARD_SDIO + #include "Sd2Card_sdio.h" +#elif NEED_SD2CARD_SPI + #include "Sd2Card.h" +#endif + +#if ENABLED(MULTI_VOLUME) + #define SV_SD_ONBOARD 1 + #define SV_USB_FLASH_DRIVE 2 + #define _VOLUME_ID(N) _CAT(SV_, N) + #define SHARED_VOLUME_IS(N) (DEFAULT_SHARED_VOLUME == _VOLUME_ID(N)) + #if !SHARED_VOLUME_IS(SD_ONBOARD) && !SHARED_VOLUME_IS(USB_FLASH_DRIVE) + #error "DEFAULT_SHARED_VOLUME must be either SD_ONBOARD or USB_FLASH_DRIVE." + #endif +#else + #define SHARED_VOLUME_IS(...) 0 +#endif typedef struct { bool saving:1, logging:1, sdprinting:1, + sdprintdone:1, mounted:1, filenameIsDir:1, workDirIsRoot:1, @@ -72,9 +99,9 @@ class CardReader { // Fast! binary file transfer #if ENABLED(BINARY_FILE_TRANSFER) #if HAS_MULTI_SERIAL - static int8_t transfer_port_index; + static serial_index_t transfer_port_index; #else - static constexpr int8_t transfer_port_index = 0; + static constexpr serial_index_t transfer_port_index = 0; #endif #endif @@ -82,18 +109,19 @@ class CardReader { CardReader(); + static void changeMedia(DiskIODriver *_driver) { driver = _driver; } + static SdFile getroot() { return root; } static void mount(); static void release(); static inline bool isMounted() { return flag.mounted; } - static void ls(); // Handle media insert/remove static void manage_media(); // SD Card Logging - static void openLogFile(char * const path); + static void openLogFile(const char * const path); static void write_command(char * const buf); #if DISABLED(NO_SD_AUTOSTART) // Auto-Start auto#.g file handling @@ -104,8 +132,8 @@ class CardReader { #endif // Basic file ops - static void openFileRead(char * const path, const uint8_t subcall=0); - static void openFileWrite(char * const path); + static void openFileRead(const char * const path, const uint8_t subcall=0); + static void openFileWrite(const char * const path); static void closefile(const bool store_location=false); static bool fileExists(const char * const name); static void removeFile(const char * const name); @@ -124,56 +152,84 @@ class CardReader { // Select a file static void selectFileByIndex(const uint16_t nr); - static void selectFileByName(const char* const match); + static void selectFileByName(const char * const match); // (working directory only) // Print job - static void openAndPrintFile(const char *name); // (working directory) - static void fileHasFinished(); - static void getAbsFilename(char *dst); - static void printFilename(); - static void startFileprint(); - static void endFilePrint(TERN_(SD_RESORT, const bool re_sort=false)); static void report_status(); - static inline void pauseSDPrint() { flag.sdprinting = false; } - static inline bool isPaused() { return isFileOpen() && !flag.sdprinting; } - static inline bool isPrinting() { return flag.sdprinting; } + static void getAbsFilenameInCWD(char *dst); + static void printSelectedFilename(); + static void openAndPrintFile(const char *name); // (working directory or full path) + static void startOrResumeFilePrinting(); + static void endFilePrintNow(TERN_(SD_RESORT, const bool re_sort=false)); + static void abortFilePrintNow(TERN_(SD_RESORT, const bool re_sort=false)); + static void fileHasFinished(); + static inline void abortFilePrintSoon() { flag.abort_sd_printing = true; } + static inline void pauseSDPrint() { flag.sdprinting = false; } + static inline bool isPrinting() { return flag.sdprinting; } + static inline bool isPaused() { return isFileOpen() && !isPrinting(); } #if HAS_PRINT_PROGRESS_PERMYRIAD - static inline uint16_t permyriadDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 9999) / 10000) : 0; } + static inline uint16_t permyriadDone() { + if (flag.sdprintdone) return 10000; + if (isFileOpen() && filesize) return sdpos / ((filesize + 9999) / 10000); + return 0; + } #endif - static inline uint8_t percentDone() { return (isFileOpen() && filesize) ? sdpos / ((filesize + 99) / 100) : 0; } - - // Helper for open and remove - static const char* diveToFile(const bool update_cwd, SdFile*& curDir, const char * const path, const bool echo=false); + static inline uint8_t percentDone() { + if (flag.sdprintdone) return 100; + if (isFileOpen() && filesize) return sdpos / ((filesize + 99) / 100); + return 0; + } + + /** + * Dive down to a relative or absolute path. + * Relative paths apply to the workDir. + * + * update_cwd: Pass 'true' to update the workDir on success. + * inDirPtr: On exit your pointer points to the target SdFile. + * A nullptr indicates failure. + * path: Start with '/' for abs path. End with '/' to get a folder ref. + * echo: Set 'true' to print the path throughout the loop. + */ + static const char* diveToFile(const bool update_cwd, SdFile* &inDirPtr, const char * const path, const bool echo=false); #if ENABLED(SDCARD_SORT_ALPHA) static void presort(); static void getfilename_sorted(const uint16_t nr); #if ENABLED(SDSORT_GCODE) - FORCE_INLINE static void setSortOn(bool b) { sort_alpha = b; presort(); } - FORCE_INLINE static void setSortFolders(int i) { sort_folders = i; presort(); } + FORCE_INLINE static void setSortOn(bool b) { sort_alpha = b; presort(); } + FORCE_INLINE static void setSortFolders(int i) { sort_folders = i; presort(); } //FORCE_INLINE static void setSortReverse(bool b) { sort_reverse = b; } #endif #else FORCE_INLINE static void getfilename_sorted(const uint16_t nr) { selectFileByIndex(nr); } #endif + static void ls(TERN_(LONG_FILENAME_HOST_SUPPORT, bool includeLongNames=false)); + #if ENABLED(POWER_LOSS_RECOVERY) static bool jobRecoverFileExists(); static void openJobRecoveryFile(const bool read); static void removeJobRecoveryFile(); #endif - static inline bool isFileOpen() { return isMounted() && file.isOpen(); } - static inline uint32_t getIndex() { return sdpos; } - static inline uint32_t getFileSize() { return filesize; } - static inline bool eof() { return sdpos >= filesize; } - static inline void setIndex(const uint32_t index) { file.seekSet((sdpos = index)); } - static inline char* getWorkDirName() { workDir.getDosName(filename); return filename; } - static inline int16_t get() { int16_t out = (int16_t)file.read(); sdpos = file.curPosition(); return out; } - static inline int16_t read(void* buf, uint16_t nbyte) { return file.isOpen() ? file.read(buf, nbyte) : -1; } - static inline int16_t write(void* buf, uint16_t nbyte) { return file.isOpen() ? file.write(buf, nbyte) : -1; } + // Current Working Dir - Set by cd, cdup, cdroot, and diveToFile(true, ...) + static inline char* getWorkDirName() { workDir.getDosName(filename); return filename; } + static inline SdFile& getWorkDir() { return workDir.isOpen() ? workDir : root; } + + // Print File stats + static inline uint32_t getFileSize() { return filesize; } + static inline uint32_t getIndex() { return sdpos; } + static inline bool isFileOpen() { return isMounted() && file.isOpen(); } + static inline bool eof() { return getIndex() >= getFileSize(); } - static Sd2Card& getSd2Card() { return sd2card; } + // File data operations + static inline int16_t get() { int16_t out = (int16_t)file.read(); sdpos = file.curPosition(); return out; } + static inline int16_t read(void *buf, uint16_t nbyte) { return file.isOpen() ? file.read(buf, nbyte) : -1; } + static inline int16_t write(void *buf, uint16_t nbyte) { return file.isOpen() ? file.write(buf, nbyte) : -1; } + static inline void setIndex(const uint32_t index) { file.seekSet((sdpos = index)); } + + // TODO: rename to diskIODriver() + static DiskIODriver* diskIODriver() { return driver; } #if ENABLED(AUTO_REPORT_SD_STATUS) // @@ -183,6 +239,16 @@ class CardReader { static AutoReporter auto_reporter; #endif + #if SHARED_VOLUME_IS(USB_FLASH_DRIVE) || ENABLED(USB_FLASH_DRIVE_SUPPORT) + #define HAS_USB_FLASH_DRIVE 1 + static DiskIODriver_USBFlash media_driver_usbFlash; + #endif + + #if NEED_SD2CARD_SDIO || NEED_SD2CARD_SPI + typedef TERN(NEED_SD2CARD_SDIO, DiskIODriver_SDIO, DiskIODriver_SPI_SD) sdcard_driver_t; + static sdcard_driver_t media_driver_sdcard; + #endif + private: // // Working directory and parents @@ -238,7 +304,7 @@ class CardReader { #if ENABLED(SDSORT_DYNAMIC_RAM) static uint8_t *isDir; #elif ENABLED(SDSORT_CACHE_NAMES) || DISABLED(SDSORT_USES_STACK) - static uint8_t isDir[(SDSORT_LIMIT+7)>>3]; + static uint8_t isDir[(SDSORT_LIMIT + 7) >> 3]; #endif #endif @@ -246,7 +312,7 @@ class CardReader { #endif // SDCARD_SORT_ALPHA - static Sd2Card sd2card; + static DiskIODriver *driver; static SdVolume volume; static SdFile file; @@ -269,7 +335,12 @@ class CardReader { static int countItems(SdFile dir); static void selectByIndex(SdFile dir, const uint8_t index); static void selectByName(SdFile dir, const char * const match); - static void printListing(SdFile parent, const char * const prepend=nullptr); + static void printListing( + SdFile parent + OPTARG(LONG_FILENAME_HOST_SUPPORT, const bool includeLongNames=false) + , const char * const prepend=nullptr + OPTARG(LONG_FILENAME_HOST_SUPPORT, const char * const prependLong=nullptr) + ); #if ENABLED(SDCARD_SORT_ALPHA) static void flush_presort(); @@ -277,7 +348,7 @@ class CardReader { }; #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define IS_SD_INSERTED() Sd2Card::isInserted() + #define IS_SD_INSERTED() DiskIODriver_USBFlash::isInserted() #elif PIN_EXISTS(SD_DETECT) #define IS_SD_INSERTED() (READ(SD_DETECT_PIN) == SD_DETECT_STATE) #else @@ -285,7 +356,8 @@ class CardReader { #define IS_SD_INSERTED() true #endif -#define IS_SD_PRINTING() card.flag.sdprinting +#define IS_SD_PRINTING() (card.flag.sdprinting && !card.flag.abort_sd_printing) +#define IS_SD_FETCHING() (!card.flag.sdprintdone && IS_SD_PRINTING()) #define IS_SD_PAUSED() card.isPaused() #define IS_SD_FILE_OPEN() card.isFileOpen() @@ -294,6 +366,7 @@ extern CardReader card; #else // !SDSUPPORT #define IS_SD_PRINTING() false +#define IS_SD_FETCHING() false #define IS_SD_PAUSED() false #define IS_SD_FILE_OPEN() false diff --git a/Marlin/src/sd/disk_io_driver.h b/Marlin/src/sd/disk_io_driver.h new file mode 100644 index 000000000000..02e2b3c73991 --- /dev/null +++ b/Marlin/src/sd/disk_io_driver.h @@ -0,0 +1,67 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +#pragma once + +#include + +/** + * DiskIO Interface + * + * Interface for low level disk io + */ +class DiskIODriver { +public: + /** + * Initialize an SD flash memory card with default clock rate and chip + * select pin. See sd2Card::init(uint8_t sckRateID, uint8_t chipSelectPin). + * + * \return true for success or false for failure. + */ + virtual bool init(const uint8_t sckRateID, const pin_t chipSelectPin) = 0; //TODO: only for SPI + + /** + * Read a card's CSD register. The CSD contains Card-Specific Data that + * provides information regarding access to the card's contents. + * + * \param[out] csd pointer to area for returned data. + * + * \return true for success or false for failure. + */ + virtual bool readCSD(csd_t* csd) = 0; + + virtual bool readStart(const uint32_t block) = 0; + virtual bool readData(uint8_t* dst) = 0; + virtual bool readStop() = 0; + + virtual bool writeStart(const uint32_t block, const uint32_t) = 0; + virtual bool writeData(const uint8_t* src) = 0; + virtual bool writeStop() = 0; + + virtual bool readBlock(uint32_t block, uint8_t* dst) = 0; + virtual bool writeBlock(uint32_t blockNumber, const uint8_t* src) = 0; + + virtual uint32_t cardSize() = 0; + + virtual bool isReady() = 0; + + virtual void idle() = 0; +}; diff --git a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp index c6e3c73f5287..5991a9fb83e4 100644 --- a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp +++ b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp @@ -34,9 +34,9 @@ #define USB_STARTUP_DELAY 0 // uncomment to get 'printf' console debugging. NOT FOR UNO! -//#define HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPAIR("UHS:",s);} -//#define BS_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPAIR("UHS:",s);} -//#define MAX_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPAIR("UHS:",s);} +//#define HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPGM("UHS:",s);} +//#define BS_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPGM("UHS:",s);} +//#define MAX_HOST_DEBUG(...) {char s[255]; sprintf(s,__VA_ARGS__); SERIAL_ECHOLNPGM("UHS:",s);} #if ENABLED(USB_FLASH_DRIVE_SUPPORT) @@ -54,7 +54,7 @@ #define UHS_DEVICE_WINDOWS_USB_SPEC_VIOLATION_DESCRIPTOR_DEVICE 1 #define UHS_HOST_MAX_INTERFACE_DRIVERS 2 #define MASS_MAX_SUPPORTED_LUN 1 - #define USB_HOST_SERIAL MYSERIAL0 + #define USB_HOST_SERIAL MYSERIAL1 // Workaround for certain issues with UHS3 #define SKIP_PAGE3F // Required for IOGEAR media adapter @@ -121,7 +121,7 @@ static enum { uint32_t lun0_capacity; #endif -bool Sd2Card::usbStartup() { +bool DiskIODriver_USBFlash::usbStartup() { if (state <= DO_STARTUP) { SERIAL_ECHOPGM("Starting USB host..."); if (!UHS_START) { @@ -147,7 +147,7 @@ bool Sd2Card::usbStartup() { // the USB library to monitor for such events. This function also takes care // of initializing the USB library for the first time. -void Sd2Card::idle() { +void DiskIODriver_USBFlash::idle() { usb.Task(); const uint8_t task_state = usb.getUsbTaskState(); @@ -170,7 +170,7 @@ void Sd2Card::idle() { UHS_USB_DEBUG(CONFIGURING_DONE); UHS_USB_DEBUG(RUNNING); default: - SERIAL_ECHOLNPAIR("UHS_USB_HOST_STATE: ", task_state); + SERIAL_ECHOLNPGM("UHS_USB_HOST_STATE: ", task_state); break; } } @@ -258,35 +258,35 @@ void Sd2Card::idle() { // Marlin calls this function to check whether an USB drive is inserted. // This is equivalent to polling the SD_DETECT when using SD cards. -bool Sd2Card::isInserted() { +bool DiskIODriver_USBFlash::isInserted() { return state == MEDIA_READY; } -bool Sd2Card::isReady() { - return state > DO_STARTUP; +bool DiskIODriver_USBFlash::isReady() { + return state > DO_STARTUP && usb.getUsbTaskState() == UHS_STATE(RUNNING); } // Marlin calls this to initialize an SD card once it is inserted. -bool Sd2Card::init(const uint8_t, const pin_t) { +bool DiskIODriver_USBFlash::init(const uint8_t, const pin_t) { if (!isInserted()) return false; #if USB_DEBUG >= 1 const uint32_t sectorSize = bulk.GetSectorSize(0); if (sectorSize != 512) { - SERIAL_ECHOLNPAIR("Expecting sector size of 512. Got: ", sectorSize); + SERIAL_ECHOLNPGM("Expecting sector size of 512. Got: ", sectorSize); return false; } #endif #if USB_DEBUG >= 3 lun0_capacity = bulk.GetCapacity(0); - SERIAL_ECHOLNPAIR("LUN Capacity (in blocks): ", lun0_capacity); + SERIAL_ECHOLNPGM("LUN Capacity (in blocks): ", lun0_capacity); #endif return true; } // Returns the capacity of the card in blocks. -uint32_t Sd2Card::cardSize() { +uint32_t DiskIODriver_USBFlash::cardSize() { if (!isInserted()) return false; #if USB_DEBUG < 3 const uint32_t @@ -295,29 +295,29 @@ uint32_t Sd2Card::cardSize() { return lun0_capacity; } -bool Sd2Card::readBlock(uint32_t block, uint8_t* dst) { +bool DiskIODriver_USBFlash::readBlock(uint32_t block, uint8_t *dst) { if (!isInserted()) return false; #if USB_DEBUG >= 3 if (block >= lun0_capacity) { - SERIAL_ECHOLNPAIR("Attempt to read past end of LUN: ", block); + SERIAL_ECHOLNPGM("Attempt to read past end of LUN: ", block); return false; } #if USB_DEBUG >= 4 - SERIAL_ECHOLNPAIR("Read block ", block); + SERIAL_ECHOLNPGM("Read block ", block); #endif #endif return bulk.Read(0, block, 512, 1, dst) == 0; } -bool Sd2Card::writeBlock(uint32_t block, const uint8_t* src) { +bool DiskIODriver_USBFlash::writeBlock(uint32_t block, const uint8_t *src) { if (!isInserted()) return false; #if USB_DEBUG >= 3 if (block >= lun0_capacity) { - SERIAL_ECHOLNPAIR("Attempt to write past end of LUN: ", block); + SERIAL_ECHOLNPGM("Attempt to write past end of LUN: ", block); return false; } #if USB_DEBUG >= 4 - SERIAL_ECHOLNPAIR("Write block ", block); + SERIAL_ECHOLNPGM("Write block ", block); #endif #endif return bulk.Write(0, block, 512, 1, src) == 0; diff --git a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h index 5789121367ad..3390bc51becc 100644 --- a/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h +++ b/Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h @@ -27,6 +27,7 @@ */ #include "../SdFatConfig.h" #include "../SdInfo.h" +#include "../disk_io_driver.h" #if DISABLED(USE_OTG_USB_HOST) /** @@ -46,7 +47,7 @@ #endif #endif -class Sd2Card { +class DiskIODriver_USBFlash : public DiskIODriver { private: uint32_t pos; @@ -54,25 +55,26 @@ class Sd2Card { public: static bool usbStartup(); + static bool isInserted(); - bool init(const uint8_t sckRateID=0, const pin_t chipSelectPin=TERN(USE_OTG_USB_HOST, 0, SD_CHIP_SELECT_PIN)); + bool init(const uint8_t sckRateID=0, const pin_t chipSelectPin=TERN(USE_OTG_USB_HOST, 0, SD_CHIP_SELECT_PIN)) override; - static void idle(); + inline bool readCSD(csd_t*) override { return true; } - inline bool readStart(const uint32_t block) { pos = block; return isReady(); } - inline bool readData(uint8_t* dst) { return readBlock(pos++, dst); } - inline bool readStop() const { return true; } + inline bool readStart(const uint32_t block) override { pos = block; return isReady(); } + inline bool readData(uint8_t *dst) override { return readBlock(pos++, dst); } + inline bool readStop() override { return true; } - inline bool writeStart(const uint32_t block, const uint32_t) { pos = block; return isReady(); } - inline bool writeData(uint8_t* src) { return writeBlock(pos++, src); } - inline bool writeStop() const { return true; } + inline bool writeStart(const uint32_t block, const uint32_t) override { pos = block; return isReady(); } + inline bool writeData(const uint8_t *src) override { return writeBlock(pos++, src); } + inline bool writeStop() override { return true; } - bool readBlock(uint32_t block, uint8_t* dst); - bool writeBlock(uint32_t blockNumber, const uint8_t* src); + bool readBlock(uint32_t block, uint8_t *dst) override; + bool writeBlock(uint32_t blockNumber, const uint8_t *src) override; - bool readCSD(csd_t*) { return true; } + uint32_t cardSize() override; - uint32_t cardSize(); - static bool isInserted(); - bool isReady(); + bool isReady() override; + + void idle() override; }; diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt b/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt index 5abcc8f2adfb..4e9bd84b9c71 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/README.txt @@ -40,7 +40,4 @@ under the "MIT" license, as documented here: ==== MARLIN INTEGRATION WORK ==== -All additional work done to integrate USB into Marlin was performed by AlephObjects, Inc. -and is licensed under the GPLv3. - --- marcio@alephobjects.com +All additional work done to integrate USB into Marlin was performed by LulzBot and is licensed under the GPLv3. diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp index f26e82b9c77b..75421f4482a8 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp @@ -133,7 +133,7 @@ uint8_t USB::SetAddress(uint8_t addr, uint8_t ep, EpInfo **ppep, uint16_t *nak_l /* 00 = success */ /* 01-0f = non-zero HRSLT */ uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi, - uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t* dataptr, USBReadParser *p) { + uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p) { bool direction = false; // Request direction, IN or OUT uint8_t rcode; SETUP_PKT setup_pkt; @@ -201,7 +201,7 @@ uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bReque * Keep sending INs and writes data to memory area pointed by 'data' * rcode 0 if no errors. rcode 01-0f is relayed from dispatchPkt(). Rcode f0 means RCVDAVIRQ error, fe = USB xfer timeout */ -uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval /*= 0*/) { +uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval /*= 0*/) { EpInfo *pep = nullptr; uint16_t nak_limit = 0; @@ -215,7 +215,7 @@ uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* return InTransfer(pep, nak_limit, nbytesptr, data, bInterval); } -uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval /*= 0*/) { +uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval /*= 0*/) { uint8_t rcode = 0; uint8_t pktsize; @@ -286,7 +286,7 @@ uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, ui * Handles NAK bug per Maxim Application Note 4000 for single buffer transfer * rcode 0 if no errors. rcode 01-0f is relayed from HRSL */ -uint8_t USB::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data) { +uint8_t USB::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data) { EpInfo *pep = nullptr; uint16_t nak_limit = 0; @@ -743,12 +743,12 @@ uint8_t USB::ReleaseDevice(uint8_t addr) { } // Get device descriptor -uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr) { +uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr) { return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, nbytes, dataptr, nullptr); } // Get configuration descriptor -uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) { +uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr) { return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, nbytes, dataptr, nullptr); } @@ -774,7 +774,7 @@ uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint8_t conf, USBReadParser } // Get string descriptor -uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) { +uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t ns, uint8_t index, uint16_t langid, uint8_t *dataptr) { return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, ns, ns, dataptr, nullptr); } diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h index d94958dd5492..2b6e1be52274 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h @@ -114,7 +114,7 @@ typedef MAX3421e MAX3421E; // Official Arduinos (UNO, Duemilanove, Mega #define USB_NUMDEVICES 16 //number of USB devices //#define HUB_MAX_HUBS 7 // maximum number of hubs that can be attached to the host controller -#define HUB_PORT_RESET_DELAY 20 // hub port reset delay 10 ms recomended, can be up to 20 ms +#define HUB_PORT_RESET_DELAY 20 // hub port reset delay 10 ms recommended, can be up to 20 ms /* USB state machine states */ #define USB_STATE_MASK 0xF0 @@ -250,19 +250,19 @@ class USB : public MAX3421E { uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo* eprecord_ptr); /* Control requests */ - uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr); - uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr); + uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr); + uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr); uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint8_t conf, USBReadParser *p); - uint8_t getStrDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t* dataptr); + uint8_t getStrDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t *dataptr); uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr); uint8_t setConf(uint8_t addr, uint8_t ep, uint8_t conf_value); /**/ - uint8_t ctrlData(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr, bool direction); + uint8_t ctrlData(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr, bool direction); uint8_t ctrlStatus(uint8_t ep, bool direction, uint16_t nak_limit); - uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval = 0); - uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data); + uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval = 0); + uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data); uint8_t dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit); void Task(); @@ -272,7 +272,7 @@ class USB : public MAX3421E { uint8_t ReleaseDevice(uint8_t addr); uint8_t ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi, - uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t* dataptr, USBReadParser *p); + uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p); private: void init(); @@ -285,17 +285,17 @@ class USB : public MAX3421E { #if 0 //defined(USB_METHODS_INLINE) //get device descriptor -inline uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr) { +inline uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr) { return ( ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, dataptr)); } //get configuration descriptor -inline uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) { +inline uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr) { return ( ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, dataptr)); } //get string descriptor -inline uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t nuint8_ts, uint8_t index, uint16_t langid, uint8_t* dataptr) { +inline uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t nuint8_ts, uint8_t index, uint16_t langid, uint8_t *dataptr) { return ( ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, nuint8_ts, dataptr)); } //set address diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h index 9ed35fff65c8..19d3756535f9 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/confdescparser.h @@ -57,7 +57,7 @@ class ConfigDescParser : public USBReadParser { uint8_t dscrLen; // Descriptor length uint8_t dscrType; // Descriptor type - bool isGoodInterface; // Apropriate interface flag + bool isGoodInterface; // Appropriate interface flag uint8_t confValue; // Configuration value uint8_t protoValue; // Protocol value uint8_t ifaceNumber; // Interface number diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp index a84a68320413..1aeef1703fec 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.cpp @@ -956,12 +956,6 @@ uint8_t BulkOnly::HandleUsbError(uint8_t error, uint8_t index) { return ((error && !count) ? MASS_ERR_GENERAL_USB_ERROR : MASS_ERR_SUCCESS); } -#if MS_WANT_PARSER - uint8_t BulkOnly::Transaction(CommandBlockWrapper *pcbw, uint16_t buf_size, void *buf) { - return Transaction(CommandBlockWrapper *pcbw, uint16_t buf_size, void *buf, 0); - } -#endif - /** * For driver use only. * @@ -972,9 +966,7 @@ uint8_t BulkOnly::HandleUsbError(uint8_t error, uint8_t index) { * @return */ uint8_t BulkOnly::Transaction(CommandBlockWrapper *pcbw, uint16_t buf_size, void *buf - #if MS_WANT_PARSER - , uint8_t flags - #endif + OPTARG(MS_WANT_PARSER, uint8_t flags/*=0*/) ) { #if MS_WANT_PARSER uint16_t bytes = (pcbw->dCBWDataTransferLength > buf_size) ? buf_size : pcbw->dCBWDataTransferLength; diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.h index 25df006e513d..aafb91624b00 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/masstorage.h @@ -553,10 +553,7 @@ class BulkOnly : public USBDeviceConfig, public UsbConfigXtracter { bool IsValidCSW(CommandStatusWrapper *pcsw, CommandBlockWrapperBase *pcbw); uint8_t ClearEpHalt(uint8_t index); - #if MS_WANT_PARSER - uint8_t Transaction(CommandBlockWrapper *cbw, uint16_t bsize, void *buf, uint8_t flags); - #endif - uint8_t Transaction(CommandBlockWrapper *cbw, uint16_t bsize, void *buf); + uint8_t Transaction(CommandBlockWrapper *cbw, uint16_t bsize, void *buf OPTARG(MS_WANT_PARSER, uint8_t flags=0)); uint8_t HandleUsbError(uint8_t error, uint8_t index); uint8_t HandleSCSIError(uint8_t status); }; diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h index 6cad39d0df59..f7eb9adf06d1 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/max3421e.h @@ -67,7 +67,7 @@ #define rCPUCTL 0x80 //16<<3 /* CPUCTL Bits */ -#define bmPUSLEWID1 0x80 //b7 +#define bmPULSEWID1 0x80 //b7 #define bmPULSEWID0 0x40 //b6 #define bmIE 0x01 //b0 diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/printhex.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/printhex.h index 319cd9c4c87d..6ded4fa9cc8f 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/printhex.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/printhex.h @@ -32,12 +32,12 @@ void E_Notifyc(char c, int lvl); template void PrintHex(T val, int lvl) { - int num_nibbles = sizeof (T) * 2; + int num_nybbles = sizeof (T) * 2; do { - char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0F); + char v = 48 + (((val >> (num_nybbles - 1) * 4)) & 0x0F); if (v > 57) v += 7; E_Notifyc(v, lvl); - } while (--num_nibbles); + } while (--num_nybbles); } template @@ -48,12 +48,12 @@ void PrintBin(T val, int lvl) { template void SerialPrintHex(T val) { - int num_nibbles = sizeof (T) * 2; + int num_nybbles = sizeof (T) * 2; do { - char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0F); + char v = 48 + (((val >> (num_nybbles - 1) * 4)) & 0x0F); if (v > 57) v += 7; USB_HOST_SERIAL.print(v); - } while (--num_nibbles); + } while (--num_nybbles); } template diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h index 2de0d465e8f3..7ce7b5e6ba85 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/settings.h @@ -66,7 +66,7 @@ * For example Serial3. */ #if ENABLED(USB_FLASH_DRIVE_SUPPORT) - #define USB_HOST_SERIAL MYSERIAL0 + #define USB_HOST_SERIAL MYSERIAL1 #endif #ifndef USB_HOST_SERIAL diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp index 190a0f1a9e01..a1a3b7d50ead 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp @@ -51,7 +51,7 @@ void MAX3421e::regWr(uint8_t reg, uint8_t data) { // multiple-byte write // return a pointer to memory position after last written -uint8_t* MAX3421e::bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* data_p) { +uint8_t* MAX3421e::bytesWr(uint8_t reg, uint8_t nbytes, uint8_t *data_p) { cs(); spiSend(reg | 0x02); while (nbytes--) spiSend(*data_p++); @@ -79,7 +79,7 @@ uint8_t MAX3421e::regRd(uint8_t reg) { // multiple-byte register read // return a pointer to a memory position after last read -uint8_t* MAX3421e::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* data_p) { +uint8_t* MAX3421e::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t *data_p) { cs(); spiSend(reg); while (nbytes--) *data_p++ = spiRec(); @@ -121,7 +121,7 @@ bool MAX3421e::start() { const uint8_t revision = regRd(rREVISION); if (revision == 0x00 || revision == 0xFF) { - SERIAL_ECHOLNPAIR("Revision register appears incorrect on MAX3421e initialization. Got ", revision); + SERIAL_ECHOLNPGM("Revision register appears incorrect on MAX3421e initialization. Got ", revision); return false; } diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.h b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.h index 5c3b852d5506..cbdd28185863 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.h @@ -37,10 +37,10 @@ class MAX3421e { bool start(); void regWr(uint8_t reg, uint8_t data); - uint8_t* bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* data_p); + uint8_t* bytesWr(uint8_t reg, uint8_t nbytes, uint8_t *data_p); void gpioWr(uint8_t data); uint8_t regRd(uint8_t reg); - uint8_t* bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* data_p); + uint8_t* bytesRd(uint8_t reg, uint8_t nbytes, uint8_t *data_p); uint8_t gpioRd(); bool reset(); diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt b/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt index 710b3f20b584..378786f940f3 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/README.txt @@ -16,7 +16,7 @@ usb_flashdrive/lib github.com/felis/UHS30 GPLv2 or later ==== MARLIN INTEGRATION WORK ==== All additional work done to integrate USB into Marlin was performed by -AlephObjects, Inc. and is licensed under the GPLv3. +LulzBot and is licensed under the GPLv3. This version of UHS3 has been modified for better compatibility with Marlin. The upstream version of UHS 3.0 runs a frame timer interrupt every 1 ms to @@ -27,5 +27,3 @@ IRQ. SKIP_PAGE3F and USB_NO_TEST_UNIT_READY were added to work around bugs with certain devices. - --- marcio@alephobjects.com diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h index 1591f3b74b8a..58d7ba200cb5 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_UsbCore.h @@ -248,7 +248,7 @@ e-mail : support@circuitsathome.com #define UHS_HOST_TRANSFER_MAX_MS 10000 // USB transfer timeout in ms, per section 9.2.6.1 of USB 2.0 spec #define UHS_HOST_TRANSFER_RETRY_MAXIMUM 3 // 3 retry limit for a transfer #define UHS_HOST_DEBOUNCE_DELAY_MS 500 // settle delay in milliseconds -#define UHS_HUB_RESET_DELAY_MS 20 // hub port reset delay, 10ms recomended, but can be up to 20ms +#define UHS_HUB_RESET_DELAY_MS 20 // hub port reset delay, 10ms recommended, but can be up to 20ms // // We only provide the minimum needed information for enumeration. diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h index 9c7b5001c090..f78a3bb8f0fa 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h @@ -90,7 +90,7 @@ uint8_t UHS_USB_HOST_BASE::setEpInfoEntry(uint8_t addr, uint8_t iface, uint8_t e } /** - * sets all enpoint addresses to zero. + * sets all endpoint addresses to zero. * Sets all max packet sizes to defaults * Clears all endpoint attributes * Sets bmNakPower to USB_NAK_DEFAULT @@ -594,7 +594,7 @@ void UHS_USB_HOST_BASE::ReleaseDevice(uint8_t addr) { * @param dataptr pointer to the data to return * @return status of the request, zero is success. */ -uint8_t UHS_USB_HOST_BASE::getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t* dataptr) { +uint8_t UHS_USB_HOST_BASE::getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t *dataptr) { return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes), nbytes, dataptr)); } @@ -607,7 +607,7 @@ uint8_t UHS_USB_HOST_BASE::getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t* d * @param dataptr ointer to the data to return * @return status of the request, zero is success. */ -uint8_t UHS_USB_HOST_BASE::getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) { +uint8_t UHS_USB_HOST_BASE::getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t *dataptr) { return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes), nbytes, dataptr)); } @@ -621,7 +621,7 @@ uint8_t UHS_USB_HOST_BASE::getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t c * @param dataptr pointer to the data to return * @return status of the request, zero is success. */ -uint8_t UHS_USB_HOST_BASE::getStrDescr(uint8_t addr, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) { +uint8_t UHS_USB_HOST_BASE::getStrDescr(uint8_t addr, uint16_t ns, uint8_t index, uint16_t langid, uint8_t *dataptr) { return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, ns), ns, dataptr)); } @@ -668,7 +668,7 @@ uint8_t UHS_USB_HOST_BASE::setConf(uint8_t addr, uint8_t conf_value) { * @param data pointer to buffer to hold transfer * @return zero for success or error code */ -uint8_t UHS_USB_HOST_BASE::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data) { +uint8_t UHS_USB_HOST_BASE::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data) { UHS_EpInfo *pep = NULL; uint16_t nak_limit = 0; HOST_DEBUG("outTransfer: addr: 0x%2.2x ep: 0x%2.2x nbytes: 0x%4.4x data: 0x%p\r\n", addr, ep, nbytes, data); @@ -689,7 +689,7 @@ uint8_t UHS_USB_HOST_BASE::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes * @param data pointer to buffer to hold transfer * @return zero for success or error code */ -uint8_t UHS_USB_HOST_BASE::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data) { +uint8_t UHS_USB_HOST_BASE::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data) { UHS_EpInfo *pep = NULL; uint16_t nak_limit = 0; @@ -980,11 +980,11 @@ uint8_t UHS_USB_HOST_BASE::eat(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, return rcode; } -uint8_t UHS_USB_HOST_BASE::ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t* dataptr) { +uint8_t UHS_USB_HOST_BASE::ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t *dataptr) { //bool direction = bmReqType & 0x80; //request direction, IN or OUT uint8_t rcode = 0; - // Serial.println(""); + //Serial.println(); UHS_EpInfo *pep = ctrlReqOpen(addr, Request, dataptr); if(!pep) { HOST_DEBUG("ctrlReq1: ERROR_NULL_EPINFO addr: %d\r\n", addr); diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h index fb2e8b38718c..bb2a87cf0382 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_macros.h @@ -150,7 +150,7 @@ e-mail : support@circuitsathome.com // HANDY MACROS //////////////////////////////////////////////////////////////////////////////// -// Atmoically set/clear single bits using bitbands. +// Atomically set/clear single bits using bitbands. // Believe it or not, this boils down to a constant, // and is less code than using |= &= operators. // Bonus, it makes code easier to read too. diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h index bfa052b8f7e3..edf673a4fbe7 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_printhex.h @@ -33,13 +33,13 @@ void E_Notifyc(char c, int lvl); template void PrintHex(T val, int lvl) { - int num_nibbles = sizeof (T) * 2; + int num_nybbles = sizeof (T) * 2; do { - char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0F); + char v = 48 + (((val >> (num_nybbles - 1) * 4)) & 0x0F); if(v > 57) v += 7; E_Notifyc(v, lvl); - } while(--num_nibbles); + } while(--num_nybbles); } template @@ -53,13 +53,13 @@ void PrintBin(T val, int lvl) { template void SerialPrintHex(T val) { - int num_nibbles = sizeof (T) * 2; + int num_nybbles = sizeof (T) * 2; do { - char v = 48 + (((val >> (num_nibbles - 1) * 4)) & 0x0F); + char v = 48 + (((val >> (num_nybbles - 1) * 4)) & 0x0F); if(v > 57) v += 7; USB_HOST_SERIAL.print(v); - } while(--num_nibbles); + } while(--num_nybbles); } template diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usbhost.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usbhost.h index b289a896efea..b81dbf2a28f0 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usbhost.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usbhost.h @@ -103,7 +103,7 @@ class UHS_USB_HOST_BASE { return (current_state == usb_task_state); }; - virtual UHS_EpInfo * UHS_NI ctrlReqOpen(NOTUSED(uint8_t addr), NOTUSED(uint64_t Request), NOTUSED(uint8_t* dataptr)) { + virtual UHS_EpInfo * UHS_NI ctrlReqOpen(NOTUSED(uint8_t addr), NOTUSED(uint64_t Request), NOTUSED(uint8_t *dataptr)) { return NULL; }; @@ -213,17 +213,17 @@ class UHS_USB_HOST_BASE { uint8_t UHS_NI EPClearHalt(uint8_t addr, uint8_t ep); - uint8_t UHS_NI ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t* dataptr); + uint8_t UHS_NI ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t *dataptr); - uint8_t UHS_NI getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t* dataptr); + uint8_t UHS_NI getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t *dataptr); - uint8_t UHS_NI getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t* dataptr); + uint8_t UHS_NI getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t *dataptr); uint8_t UHS_NI setAddr(uint8_t oldaddr, uint8_t newaddr); uint8_t UHS_NI setConf(uint8_t addr, uint8_t conf_value); - uint8_t UHS_NI getStrDescr(uint8_t addr, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t* dataptr); + uint8_t UHS_NI getStrDescr(uint8_t addr, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t *dataptr); void UHS_NI ReleaseDevice(uint8_t addr); @@ -262,8 +262,8 @@ class UHS_USB_HOST_BASE { uint8_t enumerateInterface(ENUMERATION_INFO *ei); uint8_t getNextInterface(ENUMERATION_INFO *ei, UHS_EpInfo *pep, uint8_t data[], uint16_t *left, uint16_t *read, uint8_t *offset); uint8_t initDescrStream(ENUMERATION_INFO *ei, USB_FD_CONFIGURATION_DESCRIPTOR *ucd, UHS_EpInfo *pep, uint8_t *data, uint16_t *left, uint16_t *read, uint8_t *offset); - uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data); - uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data); + uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data); + uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data); uint8_t doSoftReset(uint8_t parent, uint8_t port, uint8_t address); uint8_t getone(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint8_t *dataptr, uint8_t *offset); uint8_t eat(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint8_t *dataptr, uint8_t *offset, uint16_t *yum); diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h index 8ecafd4ad895..841cc8fe75c5 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/UHS_max3421e.h @@ -59,19 +59,19 @@ e-mail : support@circuitsathome.com // (CPUCTL) #define rCPUCTL 0x80 //16<<3 -#define bmPUSLEWID1 0x80 //b7 +#define bmPULSEWID1 0x80 //b7 #define bmPULSEWID0 0x40 //b6 #define bmIE 0x01 //b0 -// bmPUSLEWID1 bmPULSEWID0 Pulse width +// bmPULSEWID1 bmPULSEWID0 Pulse width // 0 0 10.6uS // 0 1 5.3uS // 1 0 2.6uS // 1 1 1.3uS -#define PUSLEWIDTH10_6 (0) -#define PUSLEWIDTH5_3 (bmPULSEWID0) -#define PUSLEWIDTH2_6 (bmPUSLEWID1) -#define PUSLEWIDTH1_3 (bmPULSEWID0 | bmPUSLEWID1) +#define PULSEWIDTH10_6 (0) +#define PULSEWIDTH5_3 (bmPULSEWID0) +#define PULSEWIDTH2_6 (bmPULSEWID1) +#define PULSEWIDTH1_3 (bmPULSEWID0 | bmPULSEWID1) // (PINCTL) #define rPINCTL 0x88 //17<<3 diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h index 56d6400979f9..79c06a492b97 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h @@ -272,11 +272,11 @@ e-mail : support@circuitsathome.com // #define IRQ_SENSE FALLING #ifdef ARDUINO_ARCH_PIC32 -//#define bmPULSEWIDTH PUSLEWIDTH10_6 +//#define bmPULSEWIDTH PULSEWIDTH10_6 #define bmPULSEWIDTH 0 #define bmIRQ_SENSE 0 #else -#define bmPULSEWIDTH PUSLEWIDTH1_3 +#define bmPULSEWIDTH PULSEWIDTH1_3 #define bmIRQ_SENSE 0 #endif #else @@ -388,7 +388,7 @@ public UHS_USB_HOST_BASE return (!condet); }; - virtual UHS_EpInfo *ctrlReqOpen(uint8_t addr, uint64_t Request, uint8_t* dataptr); + virtual UHS_EpInfo *ctrlReqOpen(uint8_t addr, uint64_t Request, uint8_t *dataptr); virtual void UHS_NI vbusPower(VBUS_t state) { regWr(rPINCTL, (bmFDUPSPI | bmIRQ_SENSE) | (uint8_t)(state)); @@ -483,8 +483,8 @@ public UHS_USB_HOST_BASE void gpioWr(uint8_t data); uint8_t regRd(uint8_t reg); uint8_t gpioRd(); - uint8_t* bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* data_p); - uint8_t* bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* data_p); + uint8_t* bytesWr(uint8_t reg, uint8_t nbytes, uint8_t *data_p); + uint8_t* bytesRd(uint8_t reg, uint8_t nbytes, uint8_t *data_p); // ARM/NVIC specific, used to emulate reentrant ISR. #ifdef SWI_IRQ_NUM diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h index f7dd315a0490..6cfc0152d058 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h @@ -76,7 +76,7 @@ void UHS_NI MAX3421E_HOST::regWr(uint8_t reg, uint8_t data) { /* multiple-byte write */ /* returns a pointer to memory position after last written */ -uint8_t* UHS_NI MAX3421E_HOST::bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* data_p) { +uint8_t* UHS_NI MAX3421E_HOST::bytesWr(uint8_t reg, uint8_t nbytes, uint8_t *data_p) { SPIclass.beginTransaction(MAX3421E_SPI_Settings); MARLIN_UHS_WRITE_SS(LOW); SPIclass.transfer(reg | 0x02); @@ -96,7 +96,7 @@ uint8_t* UHS_NI MAX3421E_HOST::bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* dat /* GPIO write */ /*GPIO byte is split between 2 registers, so two writes are needed to write one byte */ -/* GPOUT bits are in the low nibble. 0-3 in IOPINS1, 4-7 in IOPINS2 */ +/* GPOUT bits are in the low nybble. 0-3 in IOPINS1, 4-7 in IOPINS2 */ void UHS_NI MAX3421E_HOST::gpioWr(uint8_t data) { regWr(rIOPINS1, data); data >>= 4; @@ -117,7 +117,7 @@ uint8_t UHS_NI MAX3421E_HOST::regRd(uint8_t reg) { /* multiple-byte register read */ /* returns a pointer to a memory position after last read */ -uint8_t* UHS_NI MAX3421E_HOST::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* data_p) { +uint8_t* UHS_NI MAX3421E_HOST::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t *data_p) { SPIclass.beginTransaction(MAX3421E_SPI_Settings); MARLIN_UHS_WRITE_SS(LOW); SPIclass.transfer(reg); @@ -132,11 +132,11 @@ uint8_t* UHS_NI MAX3421E_HOST::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* dat /* GPIO read. See gpioWr for explanation */ -/* GPIN pins are in high nibbles of IOPINS1, IOPINS2 */ +/* GPIN pins are in high nybbles of IOPINS1, IOPINS2 */ uint8_t UHS_NI MAX3421E_HOST::gpioRd() { uint8_t gpin = 0; gpin = regRd(rIOPINS2); //pins 4-7 - gpin &= 0xF0; //clean lower nibble + gpin &= 0xF0; //clean lower nybble gpin |= (regRd(rIOPINS1) >> 4); //shift low bits and OR with upper from previous operation. return ( gpin); } @@ -472,7 +472,7 @@ uint8_t UHS_NI MAX3421E_HOST::SetAddress(uint8_t addr, uint8_t ep, UHS_EpInfo ** * @param data pointer to data buffer * @return 0 on success */ -uint8_t UHS_NI MAX3421E_HOST::InTransfer(UHS_EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t* data) { +uint8_t UHS_NI MAX3421E_HOST::InTransfer(UHS_EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t *data) { uint8_t rcode = 0; uint8_t pktsize; diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h index 0ac90f0df3a6..eeaa4f81d9fe 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/macro_logic.h @@ -140,7 +140,7 @@ AJK_IIF(AJK_BITAND(AJK_IS_COMPARABLE(x))(AJK_IS_COMPARABLE(y)) ) \ #define AJK_MAKE_FUNS(AJK_v, AJK_args, AJK_count, AJK_body) AJK_EVAL(AJK_REPEAT(AJK_count, AJK_FUN, AJK_v, AJK_args, AJK_body)) #ifdef AJK_TEST_MACRO_LOGIC -#define BODY(AJKindex) some(C, statement); contaning(a, test[AJKindex]); +#define BODY(AJKindex) some(C, statement); containing(a, test[AJKindex]); #define ZERO_TIMES_TEST 0 #define THREE_TIMES_TEST 3 blank > AJK_MAKE_LIST(VARIABLE_, ZERO_TIMES_TEST) < because zero repeats diff --git a/README.md b/README.md index 8b623b382e78..72b354d4feb6 100644 --- a/README.md +++ b/README.md @@ -10,123 +10,76 @@ Additional documentation can be found at the [Marlin Home Page](https://marlinfw.org/). Please test this firmware and let us know if it misbehaves in any way. Volunteers are standing by! -## Marlin 2.0 Bugfix Branch - -__Not for production use. Use with caution!__ +## Marlin 2.0 Marlin 2.0 takes this popular RepRap firmware to the next level by adding support for much faster 32-bit and ARM-based boards while improving support for 8-bit AVR boards. Read about Marlin's decision to use a "Hardware Abstraction Layer" below. -This branch is for patches to the latest 2.0.x release version. Periodically this branch will form the basis for the next minor 2.0.x release. - Download earlier versions of Marlin on the [Releases page](https://github.com/MarlinFirmware/Marlin/releases). -## Building Marlin 2.0 - -To build Marlin 2.0 you'll need [Arduino IDE 1.8.8 or newer](https://www.arduino.cc/en/main/software) or [PlatformIO](https://docs.platformio.org/en/latest/ide.html#platformio-ide). We've posted detailed instructions on [Building Marlin with Arduino](https://marlinfw.org/docs/basics/install_arduino.html) and [Building Marlin with PlatformIO for ReArm](https://marlinfw.org/docs/basics/install_rearm.html) (which applies well to other 32-bit boards). - -## Hardware Abstraction Layer (HAL) - -Marlin 2.0 introduces a layer of abstraction so that all the existing high-level code can be built for 32-bit platforms while still retaining full 8-bit AVR compatibility. Retaining AVR compatibility and a single code-base is important to us, because we want to make sure that features and patches get as much testing and attention as possible, and that all platforms always benefit from the latest improvements. - -### Current HALs - - #### AVR (8-bit) - - board|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [Arduino AVR](https://www.arduino.cc/)|ATmega, ATTiny, etc.|16-20MHz|64-256k|2-16k|5V|no - - #### DUE - - boards|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [Arduino Due](https://www.arduino.cc/en/Guide/ArduinoDue), [RAMPS-FD](https://www.reprap.org/wiki/RAMPS-FD), etc.|[SAM3X8E ARM-Cortex M3](https://www.microchip.com/wwwproducts/en/ATsam3x8e)|84MHz|512k|64+32k|3.3V|no +## Example Configurations - #### ESP32 +Before building Marlin you'll need to configure it for your specific hardware. Your vendor should have already provided source code with configurations for the installed firmware, but if you ever decide to upgrade you'll need updated configuration files. Marlin users have contributed dozens of tested example configurations to get you started. Visit the [MarlinFirmware/Configurations](https://github.com/MarlinFirmware/Configurations) repository to find the right configuration for your hardware. - board|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [ESP32](https://www.espressif.com/en/products/hardware/esp32/overview)|Tensilica Xtensa LX6|160-240MHz variants|---|---|3.3V|--- - - #### LPC1768 / LPC1769 - - boards|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [Re-ARM](https://www.kickstarter.com/projects/1245051645/re-arm-for-ramps-simple-32-bit-upgrade)|[LPC1768 ARM-Cortex M3](https://www.nxp.com/products/microcontrollers-and-processors/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc1700-cortex-m3/512kb-flash-64kb-sram-ethernet-usb-lqfp100-package:LPC1768FBD100)|100MHz|512k|32+16+16k|3.3-5V|no - [MKS SBASE](https://reprap.org/forum/read.php?13,499322)|LPC1768 ARM-Cortex M3|100MHz|512k|32+16+16k|3.3-5V|no - [Selena Compact](https://github.com/Ales2-k/Selena)|LPC1768 ARM-Cortex M3|100MHz|512k|32+16+16k|3.3-5V|no - [Azteeg X5 GT](https://www.panucatt.com/azteeg_X5_GT_reprap_3d_printer_controller_p/ax5gt.htm)|LPC1769 ARM-Cortex M3|120MHz|512k|32+16+16k|3.3-5V|no - [Smoothieboard](https://reprap.org/wiki/Smoothieboard)|LPC1769 ARM-Cortex M3|120MHz|512k|64k|3.3-5V|no - - #### SAMD51 - - boards|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [Adafruit Grand Central M4](https://www.adafruit.com/product/4064)|[SAMD51P20A ARM-Cortex M4](https://www.microchip.com/wwwproducts/en/ATSAMD51P20A)|120MHz|1M|256k|3.3V|yes - - #### STM32F1 - - boards|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [Arduino STM32](https://github.com/rogerclarkmelbourne/Arduino_STM32)|[STM32F1](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) ARM-Cortex M3|72MHz|256-512k|48-64k|3.3V|no - [Geeetech3D GTM32](https://github.com/Geeetech3D/Diagram/blob/master/Rostock301/Hardware_GTM32_PRO_VB.pdf)|[STM32F1](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) ARM-Cortex M3|72MHz|256-512k|48-64k|3.3V|no - - #### STM32F4 - - boards|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [STEVAL-3DP001V1](https://www.st.com/en/evaluation-tools/steval-3dp001v1.html)|[STM32F401VE Arm-Cortex M4](https://www.st.com/en/microcontrollers-microprocessors/stm32f401ve.html)|84MHz|512k|64+32k|3.3-5V|yes - - #### Teensy++ 2.0 +## Building Marlin 2.0 - boards|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [Teensy++ 2.0](https://www.microchip.com/wwwproducts/en/AT90USB1286)|[AT90USB1286](https://www.microchip.com/wwwproducts/en/AT90USB1286)|16MHz|128k|8k|5V|no +To build Marlin 2.0 you'll need [Arduino IDE 1.8.8 or newer](https://www.arduino.cc/en/main/software) or [PlatformIO](http://docs.platformio.org/en/latest/ide.html#platformio-ide). Detailed build and install instructions are posted at: - #### Teensy 3.1 / 3.2 + - [Installing Marlin (Arduino)](http://marlinfw.org/docs/basics/install_arduino.html) + - [Installing Marlin (VSCode)](http://marlinfw.org/docs/basics/install_platformio_vscode.html). - boards|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [Teensy 3.2](https://www.pjrc.com/store/teensy32.html)|[MK20DX256VLH7](https://www.mouser.com/ProductDetail/NXP-Freescale/MK20DX256VLH7) ARM-Cortex M4|72MHz|256k|32k|3.3V-5V|yes +### Supported Platforms - #### Teensy 3.5 / 3.6 + Platform|MCU|Example Boards + --------|---|------- + [Arduino AVR](https://www.arduino.cc/)|ATmega|RAMPS, Melzi, RAMBo + [Teensy++ 2.0](http://www.microchip.com/wwwproducts/en/AT90USB1286)|AT90USB1286|Printrboard + [Arduino Due](https://www.arduino.cc/en/Guide/ArduinoDue)|SAM3X8E|RAMPS-FD, RADDS, RAMPS4DUE + [ESP32](https://github.com/espressif/arduino-esp32)|ESP32|FYSETC E4, E4d@BOX, MRR + [LPC1768](http://www.nxp.com/products/microcontrollers-and-processors/arm-based-processors-and-mcus/lpc-cortex-m-mcus/lpc1700-cortex-m3/512kb-flash-64kb-sram-ethernet-usb-lqfp100-package:LPC1768FBD100)|ARM® Cortex-M3|MKS SBASE, Re-ARM, Selena Compact + [LPC1769](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/lpc1700-cortex-m3/512kb-flash-64kb-sram-ethernet-usb-lqfp100-package:LPC1769FBD100)|ARM® Cortex-M3|Smoothieboard, Azteeg X5 mini, TH3D EZBoard + [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html)|ARM® Cortex-M3|Malyan M200, GTM32 Pro, MKS Robin, BTT SKR Mini + [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html)|ARM® Cortex-M4|ARMED, Rumba32, SKR Pro, Lerdge, FYSETC S6 + [STM32F7x6](https://www.st.com/en/microcontrollers-microprocessors/stm32f7x6.html)|ARM® Cortex-M7|The Borg, RemRam V1 + [SAMD51P20A](https://www.adafruit.com/product/4064)|ARM® Cortex-M4|Adafruit Grand Central M4 + [Teensy 3.5](https://www.pjrc.com/store/teensy35.html)|ARM® Cortex-M4| + [Teensy 3.6](https://www.pjrc.com/store/teensy36.html)|ARM® Cortex-M4| + [Teensy 4.0](https://www.pjrc.com/store/teensy40.html)|ARM® Cortex-M7| + [Teensy 4.1](https://www.pjrc.com/store/teensy41.html)|ARM® Cortex-M7| + Linux Native|x86/ARM/etc.|Raspberry Pi - boards|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [Teensy 3.5](https://www.pjrc.com/store/teensy35.html)|[MK64FX512VMD12](https://www.mouser.com/ProductDetail/NXP-Freescale/MK64FX512VMD12) ARM-Cortex M4|120MHz|512k|192k|3.3-5V|yes - [Teensy 3.6](https://www.pjrc.com/store/teensy36.html)|[MK66FX1M0VMD18](https://www.mouser.com/ProductDetail/NXP-Freescale/MK66FX1M0VMD18) ARM-Cortex M4|180MHz|1M|256k|3.3V|yes +## Submitting Changes - #### Teensy 4.0 / 4.1 +- Submit **Bug Fixes** as Pull Requests to the ([bugfix-2.0.x](https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x)) branch. +- Follow the [Coding Standards](http://marlinfw.org/docs/development/coding_standards.html) to gain points with the maintainers. +- Please submit your questions and concerns to the [Issue Queue](https://github.com/MarlinFirmware/Marlin/issues). - boards|processor|speed|flash|sram|logic|fpu - ----|---------|-----|-----|----|-----|--- - [Teensy 4.0](https://www.pjrc.com/store/teensy40.html)|[IMXRT1062DVL6A](https://www.mouser.com/new/nxp-semiconductors/nxp-imx-rt1060-crossover-processor/) ARM-Cortex M7|600MHz|1M|2M|3.3V|yes - [Teensy 4.1](https://www.pjrc.com/store/teensy41.html)|[IMXRT1062DVJ6A](https://www.mouser.com/new/nxp-semiconductors/nxp-imx-rt1060-crossover-processor/) ARM-Cortex M7|600MHz|1M|2M|3.3V|yes +## Marlin Support -## Submitting Patches +The Issue Queue is reserved for Bug Reports and Feature Requests. To get help with configuration and troubleshooting, please use the following resources: -Proposed patches should be submitted as a Pull Request against the ([bugfix-2.0.x](https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x)) branch. +- [Marlin Documentation](http://marlinfw.org) - Official Marlin documentation +- [Marlin Discord](https://discord.gg/n5NJ59y) - Discuss issues with Marlin users and developers +- Facebook Group ["Marlin Firmware"](https://www.facebook.com/groups/1049718498464482/) +- RepRap.org [Marlin Forum](http://forums.reprap.org/list.php?415) +- Facebook Group ["Marlin Firmware for 3D Printers"](https://www.facebook.com/groups/3Dtechtalk/) +- [Marlin Configuration](https://www.youtube.com/results?search_query=marlin+configuration) on YouTube -- This branch is for fixing bugs and integrating any new features for the duration of the Marlin 2.0.x life-cycle. -- Follow the [Coding Standards](https://marlinfw.org/docs/development/coding_standards.html) to gain points with the maintainers. -- Please submit Feature Requests and Bug Reports to the [Issue Queue](https://github.com/MarlinFirmware/Marlin/issues/new/choose). Support resources are also listed there. -- Whenever you add new features, be sure to add tests to `buildroot/tests` and then run your tests locally, if possible. - - It's optional: Running all the tests on Windows might take a long time, and they will run anyway on GitHub. - - If you're running the tests on Linux (or on WSL with the code on a Linux volume) the speed is much faster. - - You can use `make tests-all-local` or `make tests-single-local TEST_TARGET=...`. - - If you prefer Docker you can use `make tests-all-local-docker` or `make tests-all-local-docker TEST_TARGET=...`. +## Contributors -### [RepRap.org Wiki Page](https://reprap.org/wiki/Marlin) +Marlin is constantly improving thanks to a huge number of contributors from all over the world bringing their specialties and talents. Huge thanks are due to [all the contributors](https://github.com/MarlinFirmware/Marlin/graphs/contributors) who regularly patch up bugs, help direct traffic, and basically keep Marlin from falling apart. Marlin's continued existence would not be possible without them. -## Credits +## Administration -The current Marlin dev team consists of: +Regular users can open and close their own issues, but only the administrators can do project-related things like add labels, merge changes, set milestones, and kick trolls. The current Marlin admin team consists of: - - Scott Lahteine [[@thinkyhead](https://github.com/thinkyhead)] - USA   [Donate](https://www.thinkyhead.com/donate-to-marlin) / Flattr: [![Flattr Scott](https://api.flattr.com/button/flattr-badge-small.png)](https://flattr.com/submit/auto?user_id=thinkyhead&url=https://github.com/MarlinFirmware/Marlin&title=Marlin&language=&tags=github&category=software) + - Scott Lahteine [[@thinkyhead](https://github.com/thinkyhead)] - USA - Project Maintainer   [![Donate](https://api.flattr.com/button/flattr-badge-large.png)](http://www.thinkyhead.com/donate-to-marlin) - Roxanne Neufeld [[@Roxy-3D](https://github.com/Roxy-3D)] - USA + - Keith Bennett [[@thisiskeithb](https://github.com/thisiskeithb)] - USA + - Victor Oliveira [[@rhapsodyv](https://github.com/rhapsodyv)] - Brazil - Chris Pepper [[@p3p](https://github.com/p3p)] - UK + - Jason Smith [[@sjasonsmith](https://github.com/sjasonsmith)] - USA + - Luu Lac [[@shitcreek](https://github.com/shitcreek)] - USA - Bob Kuhn [[@Bob-the-Kuhn](https://github.com/Bob-the-Kuhn)] - USA - - João Brazio [[@jbrazio](https://github.com/jbrazio)] - Portugal - Erik van der Zalm [[@ErikZalm](https://github.com/ErikZalm)] - Netherlands   [![Flattr Erik](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=ErikZalm&url=https://github.com/MarlinFirmware/Marlin&title=Marlin&language=&tags=github&category=software) ## License diff --git a/buildroot/bin/build_all_examples b/buildroot/bin/build_all_examples new file mode 100755 index 000000000000..bce95dce8861 --- /dev/null +++ b/buildroot/bin/build_all_examples @@ -0,0 +1,101 @@ +#!/usr/bin/env bash +# +# build_all_examples base_branch [resume_point] +# + +GITREPO=https://github.com/MarlinFirmware/Configurations.git +STAT_FILE=./.pio/.buildall + +# Check dependencies +which curl 1>/dev/null 2>&1 || { echo "curl not found! Please install it."; exit ; } +which git 1>/dev/null 2>&1 || { echo "git not found! Please install it."; exit ; } + +SED=$(command -v gsed 2>/dev/null || command -v sed 2>/dev/null) +[[ -z "$SED" ]] && { echo "No sed found, please install sed" ; exit 1 ; } + +SELF=`basename "$0"` +HERE=`dirname "$0"` + +# Check if called in the right location +[[ -e "Marlin/src" ]] || { echo -e "This script must be called from a Marlin working copy with:\n ./buildroot/bin/$SELF $1" ; exit ; } + +if [[ $# -lt 1 || $# -gt 2 ]]; then + echo "Usage: $SELF base_branch [resume_point] + base_branch - Configuration branch to download and build + resume_point - Configuration path to start from" + exit +fi + +echo "This script downloads all Configurations and builds Marlin with each one." +echo "On failure the last-built configs will be left in your working copy." +echo "Restore your configs with 'git checkout -f' or 'git reset --hard HEAD'." + +unset BRANCH +unset FIRST_CONF +if [[ -f "$STAT_FILE" ]]; then + IFS='*' read BRANCH FIRST_CONF <"$STAT_FILE" +fi + +# If -c is given start from the last attempted build +if [[ $1 == '-c' ]]; then + if [[ -z $BRANCH || -z $FIRST_CONF ]]; then + echo "Nothing to continue" + exit + fi +elif [[ $1 == '-s' ]]; then + if [[ -n $BRANCH && -n $FIRST_CONF ]]; then + SKIP_CONF=1 + else + echo "Nothing to skip" + exit + fi +else + BRANCH=${1:-"import-2.0.x"} + FIRST_CONF=$2 +fi + +# Check if the current repository has unmerged changes +if [[ $SKIP_CONF ]]; then + echo "Skipping $FIRST_CONF" +elif [[ $FIRST_CONF ]]; then + echo "Resuming from $FIRST_CONF" +else + git diff --quiet || { echo "The working copy is modified. Commit or stash changes before proceeding."; exit ; } +fi + +# Create a temporary folder inside .pio +TMP=./.pio/build-$BRANCH +[[ -d "$TMP" ]] || mkdir -p $TMP + +# Download Configurations into the temporary folder +if [[ ! -e "$TMP/README.md" ]]; then + echo "Downloading Configurations from GitHub into $TMP" + git clone --depth=1 --single-branch --branch "$BRANCH" $GITREPO "$TMP" || { echo "Failed to clone the configuration repository"; exit ; } +else + echo "Using previously downloaded Configurations at $TMP" +fi + +echo -e "Start building now...\n=====================" +shopt -s nullglob +IFS=' +' +CONF_TREE=$( ls -d "$TMP"/config/examples/*/ "$TMP"/config/examples/*/*/ "$TMP"/config/examples/*/*/*/ "$TMP"/config/examples/*/*/*/*/ | grep -vE ".+\.(\w+)$" ) +DOSKIP=0 +for CONF in $CONF_TREE ; do + # Get a config's directory name + DIR=$( echo $CONF | sed "s|$TMP/config/examples/||" ) + # If looking for a config, skip others + [[ $FIRST_CONF ]] && [[ $FIRST_CONF != $DIR && "$FIRST_CONF/" != $DIR ]] && continue + # Once found, stop looking + unset FIRST_CONF + # If skipping, don't build the found one + [[ $SKIP_CONF ]] && { unset SKIP_CONF ; continue ; } + # ...if skipping, don't build this one + compgen -G "${CONF}Con*.h" > /dev/null || continue + echo "${BRANCH}*${DIR}" >"$STAT_FILE" + "$HERE/build_example" "internal" "$TMP" "$DIR" || { echo "Failed to build $DIR"; exit ; } +done + +# Delete the temp folder and build state +[[ -e "$TMP/config/examples" ]] && rm -rf "$TMP" +rm "$STAT_FILE" diff --git a/buildroot/bin/build_example b/buildroot/bin/build_example new file mode 100755 index 000000000000..8ebb58f972e1 --- /dev/null +++ b/buildroot/bin/build_example @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# +# build_example +# +# Usage: build_example internal config-home config-folder +# + +# Require 'internal' as the first argument +[[ "$1" == "internal" ]] || { echo "Don't call this script directly, use build_all_examples instead." ; exit 1 ; } + +echo "Testing $3:" + +SUB=$2/config/examples/$3 +[[ -d "$SUB" ]] || { echo "$SUB is not a good path" ; exit 1 ; } + +compgen -G "${SUB}Con*.h" > /dev/null || { echo "No configuration files found in $SUB" ; exit 1 ; } + +echo "Getting configuration files from $SUB" +cp "$2/config/default"/*.h Marlin/ +cp "$SUB"/Configuration.h Marlin/ 2>/dev/null +cp "$SUB"/Configuration_adv.h Marlin/ 2>/dev/null +cp "$SUB"/_Bootscreen.h Marlin/ 2>/dev/null +cp "$SUB"/_Statusscreen.h Marlin/ 2>/dev/null + +echo "Building the firmware now..." +HERE=`dirname "$0"` +$HERE/mftest -a -n1 || { echo "Failed"; exit 1; } + +echo "Success" diff --git a/buildroot/bin/generate_version b/buildroot/bin/generate_version index b88e3de918b7..70a108b1fedb 100755 --- a/buildroot/bin/generate_version +++ b/buildroot/bin/generate_version @@ -4,47 +4,35 @@ # # Make a Version.h file to accompany CUSTOM_VERSION_FILE # +# Authors: jbrazio, thinkyhead, InsanityAutomation, rfinnie +# -DIR=${1:-"Marlin"} - -# MRCC3=$( git merge-base HEAD upstream/bugfix-2.0.x 2>/dev/null ) -# MRCC2=$( git merge-base HEAD upstream/bugfix-1.1.x 2>/dev/null ) -# MRCC1=$( git merge-base HEAD upstream/1.1.x 2>/dev/null ) - -# BASE='?' -# if [[ -n $MRCC3 && $MRCC3 != $MRCC2 ]]; then -# BASE=bugfix-2.0.x -# elif [[ -n $MRCC2 ]]; then -# BASE=bugfix-1.1.x -# elif [[ -n $MRCC1 ]]; then -# BASE=1.1.x -# fi - -BUILDATE=$(date '+%s') -DISTDATE=$(date '+%Y-%m-%d %H:%M') +set -e -BRANCH=$(git -C "${DIR}" symbolic-ref -q --short HEAD) -VERSION=$(git -C "${DIR}" describe --tags --first-parent 2>/dev/null) +DIR="${1:-Marlin}" +READ_FILE="${READ_FILE:-${DIR}/Version.h}" +WRITE_FILE="${WRITE_FILE:-${READ_FILE}}" -[ -z "${BRANCH}" ] && BRANCH=$(echo "${TRAVIS_BRANCH}") -[ -z "${VERSION}" ] && VERSION=$(git -C "${DIR}" describe --tags --first-parent --always 2>/dev/null) +BRANCH="$(git -C "${DIR}" symbolic-ref -q --short HEAD 2>/dev/null || true)" +VERSION="$(git -C "${DIR}" describe --tags --first-parent 2>/dev/null || true)" -SHORT_BUILD_VERSION=$(echo "${BRANCH}") -DETAILED_BUILD_VERSION=$(echo "${BRANCH}-${VERSION}") +STRING_DISTRIBUTION_DATE="${STRING_DISTRIBUTION_DATE:-$(date '+%Y-%m-%d %H:%M')}" +SHORT_BUILD_VERSION="${SHORT_BUILD_VERSION:-${BRANCH}}" +DETAILED_BUILD_VERSION="${DETAILED_BUILD_VERSION:-${BRANCH}-${VERSION}}" # Gets some misc options from their defaults -DEFAULT_MACHINE_UUID=$(awk -F'"' \ - '/#define DEFAULT_MACHINE_UUID/{ print $2 }' < "${DIR}/Version.h") -MACHINE_NAME=$(awk -F'"' \ - '/#define MACHINE_NAME/{ print $2 }' < "${DIR}/Version.h") -PROTOCOL_VERSION=$(awk -F'"' \ - '/#define PROTOCOL_VERSION/{ print $2 }' < "${DIR}/Version.h") -SOURCE_CODE_URL=$(awk -F'"' \ - '/#define SOURCE_CODE_URL/{ print $2 }' < "${DIR}/Version.h") -WEBSITE_URL=$(awk -F'"' \ - '/#define WEBSITE_URL/{ print $2 }' < "${DIR}/Version.h") - -cat > "${DIR}/Version.h" < "${WRITE_FILE}" < "${DIR}/Version.h" <] [-n|--num=] [-m|--make] [-y|--build=] +Usage: mftest [-t|--env=] [-n|--num=] [-m|--make] [-y|--build=] mftest [-a|--autobuild] mftest [-r|--rebuild] mftest [-u|--autoupload] [-n|--num=] OPTIONS - -t --env The environment of the test to apply / run. (As named in platformio.ini.) - -n --num The index of the test to run. (In *-tests file order.) + -t --env The environment to apply / run, or the menu index number. + -n --num The index of the test to run. (In file order.) -m --make Use the make / Docker method for the build. -y --build Skip 'Do you want to build this test?' and assume YES. -h --help Print this help. -a --autobuild PIO Build using the MOTHERBOARD environment. -u --autoupload PIO Upload using the MOTHERBOARD environment. -v --verbose Extra output for debugging. + -s --silent Silence build output from PlatformIO. env shortcuts: tree due esp lin lpc|lpc8 lpc9 m128 m256|mega stm|f1 f4 f7 s6 teensy|t31|t32 t35|t36 t40|t41 - " } TESTPATH=buildroot/tests -STATE_FILE=$( echo ./.pio/.mftestrc ) -SED=$(which gsed || which sed) +STATE_FILE="./.pio/.mftestrc" +SED=$(which gsed sed | head -n1) shopt -s extglob nocasematch @@ -59,79 +58,82 @@ while getopts 'abhmruvyn:t:-:' OFLAG; do h) EXIT_USAGE=1 ;; m) USE_MAKE=1 ; bugout "Using make with Docker..." ;; n) case "$OPTARG" in - *[!0-9]*) perror "option requires a number" $OFLAG ; EXIT_USAGE=1 ;; + *[!0-9]*) perror "option requires a number" $OFLAG ; EXIT_USAGE=2 ;; *) CHOICE="$OPTARG" ; bugout "Got a number: $CHOICE" ;; esac ;; - r) REBUILD=1 ; bugout "Rebuilding previous..." ;; + r) REBUILD=1 ; bugout "Rebuilding previous..." ;; + s) SILENT_FLAG="-s" ;; t) TESTENV="$OPTARG" ; bugout "Got a target: $TESTENV" ;; - u) AUTO_BUILD=2 ; bugout "Auto-Upload target..." ;; + u) AUTO_BUILD=2 ; bugout "Auto-Upload target..." ;; v) DEBUG=1 ; bugout "Debug ON" ;; - y) BUILD_YES='Y' ; bugout "Build will initiate..." ;; + y) BUILD_YES='Y' ; bugout "Build will initiate..." ;; -) IFS="=" read -r ONAM OVAL <<< "$OPTARG" case "$ONAM" in help) [[ -z "$OVAL" ]] || perror "option can't take value $OVAL" $ONAM ; EXIT_USAGE=1 ;; autobuild) AUTO_BUILD=1 ; bugout "Auto-Build target..." ;; autoupload) AUTO_BUILD=2 ; bugout "Auto-Upload target..." ;; env) case "$OVAL" in - '') perror "option requires a value" $ONAM ; EXIT_USAGE=1 ;; + '') perror "option requires a value" $ONAM ; EXIT_USAGE=2 ;; *) TESTENV="$OVAL" ; bugout "Got a target: $TESTENV" ;; esac ;; num) case "$OVAL" in [0-9]+) CHOICE="$OVAL" ; bugout "Got a number: $CHOICE" ;; - *) perror "option requires a value" $ONAM ; EXIT_USAGE=1 ;; + *) perror "option requires a value" $ONAM ; EXIT_USAGE=2 ;; esac ;; - rebuild) REBUILD=1 ; bugout "Rebuilding previous..." ;; - make) USE_MAKE=1 ; bugout "Using make with Docker..." ;; -debug|verbose) DEBUG=1 ; bugout "Debug ON" ;; + rebuild) REBUILD=1 ; bugout "Rebuilding previous..." ;; + make) USE_MAKE=1 ; bugout "Using make with Docker..." ;; +debug|verbose) DEBUG=1 ; bugout "Debug ON" ;; build) case "$OVAL" in ''|y|yes) BUILD_YES='Y' ;; n|no) BUILD_YES='N' ;; - *) perror "option value must be y, n, yes, or no" $ONAM ; EXIT_USAGE=1 ;; + *) perror "option value must be y, n, yes, or no" $ONAM ; EXIT_USAGE=2 ;; esac bugout "Build will initiate? ($BUILD_YES)" ;; - *) perror "Unknown flag" "$OPTARG" ; EXIT_USAGE=1 ;; + *) perror "Unknown flag" "$OPTARG" ; EXIT_USAGE=2 ;; esac ;; + *) EXIT_USAGE=2 ;; esac done -((EXIT_USAGE)) && { usage ; exit 1 ; } +((EXIT_USAGE)) && { usage ; let EXIT_USAGE-- ; exit $EXIT_USAGE ; } if ((REBUILD)); then bugout "Rebuilding previous..." # Build with the last-built env [[ -f "$STATE_FILE" ]] || { errout "No previous (-r) build state found." ; exit 1 ; } read TESTENV <"$STATE_FILE" - pio run -d . -e $TESTENV - exit + pio run $SILENT_FLAG -d . -e $TESTENV + exit 0 fi case $TESTENV in - tree) pio run -d . -e include_tree ; exit 1 ;; - due) TESTENV='DUE' ;; - esp) TESTENV='esp32' ;; - lin*) TESTENV='linux_native' ;; -lpc?(8)) TESTENV='LPC1768' ;; - lpc9) TESTENV='LPC1769' ;; - m128) TESTENV='mega1280' ;; - m256) TESTENV='mega2560' ;; - mega) TESTENV='mega2560' ;; - stm) TESTENV='STM32F103RE' ;; - f1) TESTENV='STM32F103RE' ;; - f4) TESTENV='STM32F4' ;; - f7) TESTENV='STM32F7' ;; - s6) TESTENV='FYSETC_S6' ;; - teensy) TESTENV='teensy31' ;; - t31) TESTENV='teensy31' ;; - t32) TESTENV='teensy31' ;; - t35) TESTENV='teensy35' ;; - t36) TESTENV='teensy35' ;; - t40) TESTENV='teensy41' ;; - t41) TESTENV='teensy41' ;; + tree) pio run -d . -e include_tree ; exit 1 ;; + due) TESTENV='DUE' ;; + esp) TESTENV='esp32' ;; + lin*) TESTENV='linux_native' ;; +lp8|lpc8) TESTENV='LPC1768' ;; +lp9|lpc9) TESTENV='LPC1769' ;; + m128) TESTENV='mega1280' ;; + m256) TESTENV='mega2560' ;; + mega) TESTENV='mega2560' ;; + stm) TESTENV='STM32F103RE' ;; + f1) TESTENV='STM32F103RE' ;; + f4) TESTENV='STM32F4' ;; + f7) TESTENV='STM32F7' ;; + s6) TESTENV='FYSETC_S6' ;; + teensy) TESTENV='teensy31' ;; + t31) TESTENV='teensy31' ;; + t32) TESTENV='teensy31' ;; + t35) TESTENV='teensy35' ;; + t36) TESTENV='teensy35' ;; + t40) TESTENV='teensy41' ;; + t41) TESTENV='teensy41' ;; +[1-9]|[1-9][0-9]) TESTNUM=$TESTENV ; TESTENV=- ;; esac if ((AUTO_BUILD)); then @@ -153,7 +155,7 @@ if ((AUTO_BUILD)); then BLINE=$( grep -E "define\s+BOARD_$MB\b" Marlin/src/core/boards.h ) BNUM=$( $SED -E 's/^.+BOARD_[^ ]+ +([0-9]+).+$/\1/' <<<"$BLINE" ) BDESC=$( $SED -E 's/^.+\/\/ *(.+)$/\1/' <<<"$BLINE" ) - [[ -z $BNUM ]] && { echo "Error - Can't find $MB in boards list." ; exit 1 ; } + [[ -z $BNUM ]] && { echo "Error - Can't find BOARD_$MB in core/boards.h." ; exit 1 ; } ENVS=( $( grep -EA1 "MB\(.*\b$MB\b.*\)" Marlin/src/pins/pins.h | grep -E "#include.+//.+(env|$SYS):[^ ]+" | grep -oE "(env|$SYS):[^ ]+" | $SED -E "s/(env|$SYS)://" ) ) [[ -z $ENVS ]] && { errout "Error - Can't find target(s) for $MB ($BNUM)." ; exit 1 ; } ECOUNT=${#ENVS[*]} @@ -189,12 +191,12 @@ if ((AUTO_BUILD)); then if ((AUTO_BUILD == 2)); then echo "Uploading environment $TARGET for board $MB ($BNUM)..." ; echo - pio run -t upload -e $TARGET + pio run $SILENT_FLAG -t upload -e $TARGET else echo "Building environment $TARGET for board $MB ($BNUM)..." ; echo - pio run -e $TARGET + pio run $SILENT_FLAG -e $TARGET fi - exit + exit 0 fi # @@ -204,28 +206,46 @@ fi if [[ $TESTENV == '-' ]]; then IND=0 NAMES=() - for FILE in $( ls -1 $TESTPATH/*-tests ) + MENU=() + BIGLEN=0 + for FILE in $( ls -1 $TESTPATH/* | sort -f ) do let IND++ - TNAME=${FILE/-tests/} - TNAME=${TNAME/$TESTPATH\//} + TNAME=${FILE/$TESTPATH\//} NAMES+=($TNAME) - (( IND < 10 )) && echo -n " " - echo " $IND) $TNAME" + IFS="" + ITEM=$( printf "%2i) %s" $IND $TNAME ) + MENU+=($ITEM) + [[ ${#ITEM} -gt $BIGLEN ]] && BIGLEN=${#ITEM} + done + + (( BIGLEN += 2 )) + THIRD=$(( (${#MENU[@]} + 2) / 3 )) + for ((i = 0; i < $THIRD; i++)) + do + COL1=$i ; COL2=$(( $i + $THIRD )) ; COL3=$(( $i + 2 * $THIRD )) + FMT="%-${BIGLEN}s" + printf "${FMT}${FMT}${FMT}\n" ${MENU[$COL1]} ${MENU[$COL2]} ${MENU[$COL3]} done echo for (( ; ; )) do - read -p "Select a test to apply (1-$IND) : " NAMEIND - [[ -z "$NAMEIND" ]] && { errout "(canceled)" ; exit 1 ; } + if [[ $TESTNUM -gt 0 ]]; then + NAMEIND=$TESTNUM + else + read -p "Select a test to apply (1-$IND) : " NAMEIND + fi + [[ -z $NAMEIND ]] && { errout "(canceled)" ; exit 1 ; } + TESTENV=${NAMES[$NAMEIND-1]} + [[ $TESTNUM -gt 0 ]] && { echo "Preselected test $TESTNUM ... ($TESTENV)" ; TESTNUM='' ; } [[ $NAMEIND =~ $ISNUM ]] && ((NAMEIND >= 1 && NAMEIND <= IND)) && { TESTENV=${NAMES[$NAMEIND-1]} ; echo ; break ; } errout "Invalid selection." done fi # Get the contents of the test file -OUT=$( cat $TESTPATH/$TESTENV-tests 2>/dev/null ) || { errout "Can't find test '$TESTENV'." ; exit 1 ; } +OUT=$( cat $TESTPATH/$TESTENV 2>/dev/null ) || { errout "Can't find test '$TESTENV'." ; exit 1 ; } # Count up the number of tests TESTCOUNT=$( awk "/$ISEXEC/{a++}END{print a}" <<<"$OUT" ) @@ -291,7 +311,7 @@ echo "$OUT" | { echo -ne "\033[0m" # Make clear it's a TEST -opt_set CUSTOM_MACHINE_NAME "\"$TESTENV-tests ($CHOICE)\"" +opt_set CUSTOM_MACHINE_NAME "\"Test $TESTENV ($CHOICE)\"" # Build the test too? if [[ -z "$BUILD_YES" ]]; then @@ -301,6 +321,6 @@ fi [[ $BUILD_YES == 'Y' || $BUILD_YES == 'Yes' ]] && { ((USE_MAKE)) && make tests-single-local TEST_TARGET=$TESTENV ONLY_TEST=$CHOICE - ((USE_MAKE)) || pio run -d . -e $TESTENV + ((USE_MAKE)) || pio run $SILENT_FLAG -d . -e $TESTENV echo "$TESTENV" >"$STATE_FILE" } diff --git a/buildroot/bin/opt_disable b/buildroot/bin/opt_disable index 11526132ef05..0444e1b773e0 100755 --- a/buildroot/bin/opt_disable +++ b/buildroot/bin/opt_disable @@ -3,11 +3,13 @@ # exit on first failure set -e -SED=$(which gsed || which sed) +SED=$(which gsed sed | head -n1) for opt in "$@" ; do - # Logic for returning nonzero based on answer here: https://stackoverflow.com/a/15966279/104648 - eval "${SED} -i '/\([[:blank:]]*\)\(\/\/\)*\([[:blank:]]*\)\(#define \b${opt}\b\)/{s//\1\3\/\/\4/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration.h" || - eval "${SED} -i '/\([[:blank:]]*\)\(\/\/\)*\([[:blank:]]*\)\(#define \b${opt}\b\)/{s//\1\3\/\/\4/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration_adv.h" || - (echo "ERROR: opt_disable Can't find ${opt}" >&2 && exit 9) + DID=0 ; FOUND=0 + for FN in Configuration Configuration_adv; do + "${SED}" -i "/^\(\s*\)\(#define\s\+${opt}\b\s\?\)\(\s\s\)\?/{s//\1\/\/\2/;h};\${x;/./{x;q0};x;q9}" Marlin/$FN.h && DID=1 + ((DID||FOUND)) || { grep -E "^\s*//\s*#define\s+${opt}\b" Marlin/$FN.h >/dev/null && FOUND=1 ; } + done + ((DID||FOUND)) || (echo "ERROR: $(basename $0) Can't find ${opt}" >&2 && exit 9) done diff --git a/buildroot/bin/opt_enable b/buildroot/bin/opt_enable index 96686d6c6845..f9be82cbd1f9 100755 --- a/buildroot/bin/opt_enable +++ b/buildroot/bin/opt_enable @@ -3,11 +3,13 @@ # exit on first failure set -e -SED=$(which gsed || which sed) +SED=$(which gsed sed | head -n1) for opt in "$@" ; do - # Logic for returning nonzero based on answer here: https://stackoverflow.com/a/15966279/104648 - eval "${SED} -i '/\(\/\/\)*[[:blank:]]*\(#define \b${opt}\b\)/{s//\2/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration.h" || - eval "${SED} -i '/\(\/\/\)*[[:blank:]]*\(#define \b${opt}\b\)/{s//\2/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration_adv.h" || - (echo "ERROR: opt_enable Can't find ${opt}" >&2 && exit 9) + DID=0 ; FOUND=0 + for FN in Configuration Configuration_adv; do + "${SED}" -i "/^\(\s*\)\/\/\(\s*\)\(#define\s\+${opt}\b\)\( \?\)/{s//\1\2\3\4\4\4/;h};\${x;/./{x;q0};x;q9}" Marlin/$FN.h && DID=1 + ((DID||FOUND)) || { grep -E "^\s*#define\s+${opt}\b" Marlin/$FN.h >/dev/null && FOUND=1 ; } + done + ((DID||FOUND)) || (echo "ERROR: $(basename $0) Can't find ${opt}" >&2 && exit 9) done diff --git a/buildroot/bin/opt_find b/buildroot/bin/opt_find new file mode 100755 index 000000000000..a7c8fd9d71a5 --- /dev/null +++ b/buildroot/bin/opt_find @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# +# opt_find +# Find one or more Marlin options - Configuration lines starting with #define +# + +MYNAME=$(basename $0) + +[[ $# == 0 ]] && ONE="-h" || ONE=$1 + +COMM="(//\\s*)?" ; TYPE="" +case "$ONE" in + -d|--disabled ) + shift ; COMM="(//\\s*)" ; TYPE="disabled " ;; + -e|--enabled ) + shift ; COMM="" ; TYPE="enabled " ;; + -h|--help ) + echo "$MYNAME [-d|--disabled|-e|--enabled] STRING ... Find matching Marlin configuration options." + echo ; shift ;; + -* ) + echo "Unknown option $ONE" ; shift ;; +esac + +while [[ $# > 0 ]]; do + DID=0 + for FN in Configuration Configuration_adv; do + FOUND=$( grep -HEn "^\s*${COMM}#define\s+[A-Z0-9_]*${1}" "Marlin/$FN.h" 2>/dev/null ) + [[ -n "$FOUND" ]] && { echo "$FOUND" ; DID=1 ; } + done + ((DID)) || { echo "ERROR: ${MYNAME} - No ${TYPE}match for ${1}" ; exit 9; } + shift + echo +done diff --git a/buildroot/bin/opt_set b/buildroot/bin/opt_set index a646e09ae789..b9935512a4b8 100755 --- a/buildroot/bin/opt_set +++ b/buildroot/bin/opt_set @@ -3,10 +3,15 @@ # exit on first failure set -e -SED=$(which gsed || which sed) +SED=$(which gsed sed | head -n1) -# Logic for returning nonzero based on answer here: https://stackoverflow.com/a/15966279/104648 -eval "${SED} -i '/\(\/\/\)*\([[:blank:]]*\)\(#define\s\+\b${1}\b\).*$/{s//\2\3 ${2}/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration.h" || -eval "${SED} -i '/\(\/\/\)*\([[:blank:]]*\)\(#define\s\+\b${1}\b\).*$/{s//\2\3 ${2}/;h};\${x;/./{x;q0};x;q9}' Marlin/Configuration_adv.h" || -eval "echo '#define ${@}' >>Marlin/Configuration_adv.h" || -(echo "ERROR: opt_set Can't set or add ${1}" >&2 && exit 9) +while [[ $# > 1 ]]; do + DID=0 + for FN in Configuration Configuration_adv; do + "${SED}" -i "/^\(\s*\)\/*\s*\(#define\s\+${1}\b\) *\(.*\)$/{s//\1\2 ${2} \/\/ \3/;h};\${x;/./{x;q0};x;q9}" Marlin/$FN.h && DID=1 + done + ((DID)) || + eval "echo '#define ${1} ${2}' >>Marlin/Configuration.h" || + (echo "ERROR: opt_set Can't set or add ${1}" >&2 && exit 9) + shift 2 +done diff --git a/buildroot/bin/pins_set b/buildroot/bin/pins_set index 87a8692aa25d..31b4480449a5 100755 --- a/buildroot/bin/pins_set +++ b/buildroot/bin/pins_set @@ -3,9 +3,13 @@ IFS='/' read -r -a PINPATH <<< "$1" DIR=${PINPATH[0]} NAM=${PINPATH[1]} -PIN=$2 -VAL=$3 -SED=$(which gsed || which sed) -eval "${SED} -i '/\(\/\/\)*\(#define \+${PIN}\b\).*$/{s//\2 ${VAL}/;h};\${x;/./{x;q0};x;q9}' Marlin/src/pins/$DIR/pins_${NAM}.h" || -(echo "ERROR: pins_set Can't find ${PIN}" >&2 && exit 9) +SED=$(which gsed sed | head -n1) + +shift +while [[ $# > 1 ]]; do + PIN=$1 ; VAL=$2 + eval "${SED} -i '/^[[:blank:]]*\(\/\/\)*[[:blank:]]*\(#define \+${PIN}\b\).*$/{s//\2 ${VAL}/;h};\${x;/./{x;q0};x;q9}' Marlin/src/pins/$DIR/pins_${NAM}.h" || + (echo "ERROR: pins_set Can't find ${PIN}" >&2 && exit 9) + shift 2 +done diff --git a/buildroot/tests/run_tests b/buildroot/bin/run_tests similarity index 79% rename from buildroot/tests/run_tests rename to buildroot/bin/run_tests index c4286f4695a1..26284fa69330 100755 --- a/buildroot/tests/run_tests +++ b/buildroot/bin/run_tests @@ -2,8 +2,9 @@ # # run_tests # -export PATH="$PATH:$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )" -export PATH="$PATH:./buildroot/bin" +HERE="$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )" +TESTS="$HERE/../tests" +export PATH="$HERE:$TESTS:$PATH" # exit on first failure set -e @@ -40,10 +41,9 @@ export -f exec_test printf "Running \033[0;32m$2\033[0m Tests\n" if [[ $2 = "ALL" ]]; then - dir_list=("$(dirname "${BASH_SOURCE[0]}")"/*) - declare -a tests=(${dir_list[@]/*run_tests/}) + tests=("$TESTS"/*) for f in "${tests[@]}"; do - testenv=$(basename $f | cut -d"-" -f1) + testenv=$(basename $f) printf "Running \033[0;32m$f\033[0m Tests\n" exec_test $1 "$testenv --target clean" "Setup Build Environment" if [[ $GIT_RESET_HARD == "true" ]]; then @@ -58,16 +58,16 @@ else # If the test name is 1 or 2 digits, treat it as an index if [[ "$test_name" =~ ^[0-9][0-9]?$ ]] ; then # Find the test name that corresponds to that index - test_name="$(cat buildroot/tests/$2-tests | grep -e '^exec_test' | sed -n "$3p" | sed "s/.*\$1 \$2 \"\([^\"]*\).*/\1/g")" + test_name="$(cat $TESTS/$2 | grep -e '^exec_test' | sed -n "$3p" | sed "s/.*\$1 \$2 \"\([^\"]*\).*/\1/g")" if [[ -z "$test_name" ]] ; then # Fail if none matches - printf "\033[0;31mCould not find test \033[0m#$3\033[0;31m in \033[0mbuildroot/tests/$2-tests\n" + printf "\033[0;31mCould not find test \033[0m#$3\033[0;31m in \033[0mbuildroot/tests/$2\n" exit 1 else printf "\033[0;32mMatching test \033[0m#$3\033[0;32m: '\033[0m$test_name\033[0;32m'\n" fi fi - $2-tests $1 $2 "$test_name" + $TESTS/$2 $1 $2 "$test_name" if [[ $GIT_RESET_HARD == "true" ]]; then git reset --hard HEAD else diff --git a/buildroot/bin/uncrust b/buildroot/bin/uncrust index 9893b5c380e6..7898f73c8c77 100755 --- a/buildroot/bin/uncrust +++ b/buildroot/bin/uncrust @@ -6,11 +6,12 @@ TMPDIR=`mktemp -d` # Reformat a single file to tmp/ -uncrustify -l CPP -c ./buildroot/share/extras/uncrustify.cfg -f "$1" >$TMPDIR/uncrustify.out - -# Replace the original file -cp "$TMPDIR/uncrustify.out" "$1" +if uncrustify -l CPP -c ./buildroot/share/extras/uncrustify.cfg -f "$1" >$TMPDIR/uncrustify.out ; then + cp "$TMPDIR/uncrustify.out" "$1" ; # Replace the original file +else + echo "Something went wrong with uncrustify." +fi # Clean up, deliberately -rm "$TMPDIR/uncrustify.out" +[[ -f "$TMPDIR/uncrustify.out" ]] && rm "$TMPDIR/uncrustify.out" rmdir "$TMPDIR" diff --git a/buildroot/share/PlatformIO/boards/fysetc_f6.json b/buildroot/share/PlatformIO/boards/fysetc_f6.json deleted file mode 100644 index 2772f73a6539..000000000000 --- a/buildroot/share/PlatformIO/boards/fysetc_f6.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "build": { - "core": "arduino", - "extra_flags": "-DARDUINO_AVR_MEGA2560", - "f_cpu": "16000000L", - "hwids": [ - [ - "0x27b2", - "0x0002" - ] - ], - "mcu": "atmega2560", - "variant": "fysetcf6" - }, - "debug": { - "simavr_target": "atmega2560", - "avr-stub": { - "speed": 115200 - } - }, - "frameworks": [ - "arduino" - ], - "name": "FYSETC F6", - "upload": { - "maximum_ram_size": 8192, - "maximum_size": 258048, - "protocol": "wiring", - "require_upload_port": true, - "speed": 115200 - }, - "url": "https://www.fysetc.com/", - "vendor": "FYSETC" -} diff --git a/buildroot/share/PlatformIO/boards/LERDGE.json b/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json similarity index 58% rename from buildroot/share/PlatformIO/boards/LERDGE.json rename to buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json index 011814a13361..65735d433b17 100644 --- a/buildroot/share/PlatformIO/boards/LERDGE.json +++ b/buildroot/share/PlatformIO/boards/marlin_BTT_SKR_SE_BX.json @@ -1,27 +1,16 @@ { "build": { "core": "stm32", - "cpu": "cortex-m4", - "extra_flags": "-DSTM32F407xx", - "f_cpu": "168000000L", - "hwids": [ - [ - "0x1EAF", - "0x0003" - ], - [ - "0x0483", - "0x3748" - ] - ], - "mcu": "stm32f407zgt6", - "variant": "LERDGE", - "ldscript": "LERDGE.ld" + "cpu": "cortex-m7", + "extra_flags": "-DSTM32H743xx", + "f_cpu": "400000000L", + "mcu": "stm32h743iit6", + "variant": "MARLIN_BTT_SKR_SE_BX" }, "debug": { - "jlink_device": "STM32F407ZG", - "openocd_target": "stm32f4x", - "svd_path": "STM32F40x.svd", + "jlink_device": "STM32H743II", + "openocd_target": "stm32h7x", + "svd_path": "STM32H7x3.svd", "tools": { "stlink": { "server": { @@ -31,7 +20,7 @@ "-c", "transport select hla_swd", "-f", - "scripts/target/stm32f4x.cfg", + "scripts/target/stm32h7x.cfg", "-c", "reset_config none" ], @@ -45,21 +34,23 @@ "arduino", "stm32cube" ], - "name": "STM32F407ZGT6(192k RAM. 1024k Flash)", + "name": "STM32H743II (1024k RAM. 2048k Flash)", "upload": { "disable_flushing": false, - "maximum_ram_size": 196608, - "maximum_size": 1048576, + "maximum_ram_size": 1048576, + "maximum_size": 2097152, "protocol": "stlink", "protocols": [ "stlink", "dfu", - "jlink" + "jlink", + "cmsis-dap" ], + "offset_address": "0x8020000", "require_upload_port": true, "use_1200bps_touch": false, "wait_for_upload_port": false }, - "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f407ZG.html", + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32h743ii.html", "vendor": "Generic" } diff --git a/buildroot/share/PlatformIO/boards/BigTree_Btt002.json b/buildroot/share/PlatformIO/boards/marlin_BigTree_BTT002.json similarity index 96% rename from buildroot/share/PlatformIO/boards/BigTree_Btt002.json rename to buildroot/share/PlatformIO/boards/marlin_BigTree_BTT002.json index d0d092f1eaba..28a79271b89c 100644 --- a/buildroot/share/PlatformIO/boards/BigTree_Btt002.json +++ b/buildroot/share/PlatformIO/boards/marlin_BigTree_BTT002.json @@ -15,7 +15,7 @@ ] ], "mcu": "stm32f407vgt6", - "variant": "BIGTREE_BTT002" + "variant": "MARLIN_BIGTREE_BTT002" }, "debug": { "jlink_device": "STM32F407VG", diff --git a/buildroot/share/PlatformIO/boards/BigTree_GTR_v1.json b/buildroot/share/PlatformIO/boards/marlin_BigTree_GTR_v1.json similarity index 96% rename from buildroot/share/PlatformIO/boards/BigTree_GTR_v1.json rename to buildroot/share/PlatformIO/boards/marlin_BigTree_GTR_v1.json index 32236301c347..e311ce3b5278 100644 --- a/buildroot/share/PlatformIO/boards/BigTree_GTR_v1.json +++ b/buildroot/share/PlatformIO/boards/marlin_BigTree_GTR_v1.json @@ -15,7 +15,7 @@ ] ], "mcu": "stm32f407zgt6", - "variant": "BIGTREE_GTR_V1" + "variant": "MARLIN_BIGTREE_GTR_V1" }, "debug": { "jlink_device": "STM32F407ZG", diff --git a/buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_Pro_v1_F429.json b/buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_Pro_v1_F429.json new file mode 100644 index 000000000000..66ee1c842e52 --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_Pro_v1_F429.json @@ -0,0 +1,50 @@ +{ + "build": { + "cpu": "cortex-m4", + "extra_flags": "-DSTM32F4 -DSTM32F429xx", + "f_cpu": "168000000L", + "mcu": "stm32f429zgt6", + "product_line": "STM32F429xx", + "variant": "MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429" + }, + "connectivity": [ + "can" + ], + "debug": { + "default_tools": [ + "stlink" + ], + "jlink_device": "STM32F429ZG", + "onboard_tools": [ + "stlink" + ], + "openocd_board": "stm32f429", + "openocd_target": "stm32f4x", + "svd_path": "STM32F429x.svd" + }, + "frameworks": [ + "arduino", + "cmsis", + "mbed", + "stm32cube", + "libopencm3", + "zephyr" + ], + "name": "STM32F429ZG (128k RAM, 64k CCM RAM, 1024k Flash", + "upload": { + "disable_flushing": false, + "maximum_ram_size": 131072, + "maximum_size": 1048576, + "protocol": "stlink", + "protocols": [ + "stlink", + "dfu", + "jlink" + ], + "require_upload_port": true, + "use_1200bps_touch": false, + "wait_for_upload_port": false + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f429-439.html", + "vendor": "ST" +} diff --git a/buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_v1.json b/buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_v1.json new file mode 100644 index 000000000000..ea2515407900 --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_BigTree_Octopus_v1.json @@ -0,0 +1,35 @@ +{ + "build": { + "cpu": "cortex-m4", + "extra_flags": "-DSTM32F446xx", + "f_cpu": "180000000L", + "mcu": "stm32f446zet6", + "variant": "MARLIN_BIGTREE_OCTOPUS_V1" + }, + "connectivity": [ + "can" + ], + "debug": { + "jlink_device": "STM32F446ZE", + "openocd_target": "stm32f4x", + "svd_path": "STM32F446x.svd" + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "STM32F446ZE (128k RAM. 512k Flash)", + "upload": { + "maximum_ram_size": 131072, + "maximum_size": 524288, + "protocol": "stlink", + "protocols": [ + "jlink", + "stlink", + "blackmagic", + "serial" + ] + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html", + "vendor": "Generic" +} diff --git a/buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json b/buildroot/share/PlatformIO/boards/marlin_BigTree_SKR_Pro.json similarity index 95% rename from buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json rename to buildroot/share/PlatformIO/boards/marlin_BigTree_SKR_Pro.json index 211ceacdca0b..5e76c2c9e205 100644 --- a/buildroot/share/PlatformIO/boards/BigTree_SKR_Pro.json +++ b/buildroot/share/PlatformIO/boards/marlin_BigTree_SKR_Pro.json @@ -15,7 +15,7 @@ ] ], "mcu": "stm32f407zgt6", - "variant": "BIGTREE_SKR_PRO_1v1" + "variant": "MARLIN_BIGTREE_SKR_PRO_11" }, "debug": { "jlink_device": "STM32F407ZG", diff --git a/buildroot/share/PlatformIO/boards/CHITU_F103.json b/buildroot/share/PlatformIO/boards/marlin_CHITU_F103.json similarity index 93% rename from buildroot/share/PlatformIO/boards/CHITU_F103.json rename to buildroot/share/PlatformIO/boards/marlin_CHITU_F103.json index ecf7bff66c87..dbfbc21cb275 100644 --- a/buildroot/share/PlatformIO/boards/CHITU_F103.json +++ b/buildroot/share/PlatformIO/boards/marlin_CHITU_F103.json @@ -15,8 +15,7 @@ ] ], "mcu": "stm32f103zet6", - "variant": "CHITU_F103", - "ldscript": "chitu_f103.ld" + "variant": "marlin_CHITU_F103" }, "debug": { "jlink_device": "STM32F103ZE", diff --git a/buildroot/share/PlatformIO/boards/FYSETC_CHEETAH_V20.json b/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json similarity index 92% rename from buildroot/share/PlatformIO/boards/FYSETC_CHEETAH_V20.json rename to buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json index ff082fdc1f2a..6c2e093c3bad 100644 --- a/buildroot/share/PlatformIO/boards/FYSETC_CHEETAH_V20.json +++ b/buildroot/share/PlatformIO/boards/marlin_FYSETC_CHEETAH_V20.json @@ -14,9 +14,8 @@ "0x3748" ] ], - "ldscript": "stm32f401rc.ld", "mcu": "stm32f401rct6", - "variant": "FYSETC_CHEETAH_V20" + "variant": "MARLIN_FYSETC_CHEETAH_V20" }, "debug": { "jlink_device": "STM32F401RC", @@ -56,7 +55,7 @@ "dfu", "jlink" ], - "offset_address": "0x800C000", + "offset_address": "0x8008000", "require_upload_port": true, "use_1200bps_touch": false, "wait_for_upload_port": false diff --git a/buildroot/share/PlatformIO/boards/MEEB_3DP.json b/buildroot/share/PlatformIO/boards/marlin_MEEB_3DP.json similarity index 97% rename from buildroot/share/PlatformIO/boards/MEEB_3DP.json rename to buildroot/share/PlatformIO/boards/marlin_MEEB_3DP.json index 870648b32572..73ec9aaf48e2 100644 --- a/buildroot/share/PlatformIO/boards/MEEB_3DP.json +++ b/buildroot/share/PlatformIO/boards/marlin_MEEB_3DP.json @@ -18,7 +18,7 @@ "ldscript": "stm32f103xc.ld" }, "mcu": "stm32f103rct6", - "variant": "MEEB_3DP" + "variant": "marlin_MEEB_3DP" }, "debug": { "jlink_device": "STM32F103RC", diff --git a/buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json b/buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json similarity index 92% rename from buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json rename to buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json index bbfb3fdfa508..e260950f25d5 100644 --- a/buildroot/share/PlatformIO/boards/STEVAL_STM32F401VE.json +++ b/buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json @@ -2,7 +2,7 @@ "build": { "core": "stm32", "cpu": "cortex-m4", - "extra_flags": "-DSTM32F401xx", + "extra_flags": "-DSTM32F401xx -DARDUINO_STEVAL", "f_cpu": "84000000L", "hwids": [ [ @@ -14,9 +14,8 @@ "0x3748" ] ], - "ldscript": "stm32f401xe.ld", "mcu": "stm32f401vet6", - "variant": "STEVAL_F401VE" + "variant": "MARLIN_STEVAL_F401VE" }, "debug": { "jlink_device": "STM32F401VE", diff --git a/buildroot/share/PlatformIO/boards/genericSTM32F407VGT6.json b/buildroot/share/PlatformIO/boards/marlin_STM32F407VGT6_CCM.json similarity index 100% rename from buildroot/share/PlatformIO/boards/genericSTM32F407VGT6.json rename to buildroot/share/PlatformIO/boards/marlin_STM32F407VGT6_CCM.json diff --git a/buildroot/share/PlatformIO/boards/FLYF407ZG.json b/buildroot/share/PlatformIO/boards/marlin_STM32F407ZGT6.json similarity index 94% rename from buildroot/share/PlatformIO/boards/FLYF407ZG.json rename to buildroot/share/PlatformIO/boards/marlin_STM32F407ZGT6.json index 7e585c5057ca..f6c78f8ab33b 100644 --- a/buildroot/share/PlatformIO/boards/FLYF407ZG.json +++ b/buildroot/share/PlatformIO/boards/marlin_STM32F407ZGT6.json @@ -14,8 +14,7 @@ "0x3748" ] ], - "mcu": "stm32f407zgt6", - "variant": "FLY_F407ZG" + "mcu": "stm32f407zgt6" }, "debug": { "jlink_device": "STM32F407ZG", @@ -49,7 +48,7 @@ "disable_flushing": false, "maximum_ram_size": 196608, "maximum_size": 1048576, - "protocol": "dfu", + "protocol": "stlink", "protocols": [ "stlink", "dfu", diff --git a/buildroot/share/PlatformIO/boards/archim.json b/buildroot/share/PlatformIO/boards/marlin_archim.json similarity index 97% rename from buildroot/share/PlatformIO/boards/archim.json rename to buildroot/share/PlatformIO/boards/marlin_archim.json index 60035197f2f3..6d78c1f19576 100644 --- a/buildroot/share/PlatformIO/boards/archim.json +++ b/buildroot/share/PlatformIO/boards/marlin_archim.json @@ -21,7 +21,7 @@ "ldscript": "linker_scripts/gcc/flash.ld", "mcu": "at91sam3x8e", "usb_product": "Archim", - "variant": "archim" + "variant": "MARLIN_ARCHIM" }, "connectivity": [ "can" diff --git a/buildroot/share/PlatformIO/boards/at90usb1286.json b/buildroot/share/PlatformIO/boards/marlin_at90usb1286.json similarity index 100% rename from buildroot/share/PlatformIO/boards/at90usb1286.json rename to buildroot/share/PlatformIO/boards/marlin_at90usb1286.json diff --git a/buildroot/share/PlatformIO/boards/blackSTM32F407VET6.json b/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json similarity index 93% rename from buildroot/share/PlatformIO/boards/blackSTM32F407VET6.json rename to buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json index 176563408602..b0fd9db9392a 100644 --- a/buildroot/share/PlatformIO/boards/blackSTM32F407VET6.json +++ b/buildroot/share/PlatformIO/boards/marlin_blackSTM32F407VET6.json @@ -2,7 +2,7 @@ "build": { "core": "stm32", "cpu": "cortex-m4", - "extra_flags": "-DSTM32F407xx", + "extra_flags": "-DSTM32F407xx -DARDUINO_BLACK_F407VE", "f_cpu": "168000000L", "hwids": [ [ @@ -48,7 +48,7 @@ "upload": { "disable_flushing": false, "maximum_ram_size": 131072, - "maximum_size": 514288, + "maximum_size": 524288, "protocol": "stlink", "protocols": [ "stlink", diff --git a/buildroot/share/PlatformIO/boards/marlin_index_mobo_rev03.json b/buildroot/share/PlatformIO/boards/marlin_index_mobo_rev03.json new file mode 100644 index 000000000000..c65f1dd70356 --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_index_mobo_rev03.json @@ -0,0 +1,51 @@ +{ + "build": { + "core": "stm32", + "cpu": "cortex-m4", + "extra_flags": "-DSTM32F407xx", + "f_cpu": "168000000L", + "hwids": [ + [ + "0x1EAF", + "0x0003" + ], + [ + "0x0483", + "0x3748" + ], + [ + "0x0483", + "0xdf11" + ] + ], + "mcu": "stm32f407vet6", + "variant": "MARLIN_F407VE" + }, + "debug": { + "jlink_device": "STM32F407VE", + "openocd_target": "stm32f4x", + "svd_path": "STM32F40x.svd" + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "STM32F407VE (192k RAM. 512k Flash)", + "upload": { + "disable_flushing": false, + "maximum_ram_size": 131072, + "maximum_size": 524288, + "protocol": "stlink", + "protocols": [ + "stlink", + "dfu", + "jlink", + "blackmagic" + ], + "require_upload_port": true, + "use_1200bps_touch": false, + "wait_for_upload_port": false + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f407ve.html", + "vendor": "Generic" +} diff --git a/buildroot/share/PlatformIO/boards/malyanM200.json b/buildroot/share/PlatformIO/boards/marlin_malyanM200.json similarity index 100% rename from buildroot/share/PlatformIO/boards/malyanM200.json rename to buildroot/share/PlatformIO/boards/marlin_malyanM200.json diff --git a/buildroot/share/PlatformIO/boards/malyanM200v2.json b/buildroot/share/PlatformIO/boards/marlin_malyanM200v2.json similarity index 100% rename from buildroot/share/PlatformIO/boards/malyanM200v2.json rename to buildroot/share/PlatformIO/boards/marlin_malyanM200v2.json diff --git a/buildroot/share/PlatformIO/ldscripts/STM32F103RC_SKR_MINI_512K.ld b/buildroot/share/PlatformIO/ldscripts/STM32F103RE_SKR_MINI_512K.ld similarity index 100% rename from buildroot/share/PlatformIO/ldscripts/STM32F103RC_SKR_MINI_512K.ld rename to buildroot/share/PlatformIO/ldscripts/STM32F103RE_SKR_MINI_512K.ld diff --git a/buildroot/share/PlatformIO/ldscripts/STM32F103RE_SKR_E3_DIP.ld b/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_256K.ld similarity index 84% rename from buildroot/share/PlatformIO/ldscripts/STM32F103RE_SKR_E3_DIP.ld rename to buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_256K.ld index 248b7781cf78..2404e7cac9bc 100644 --- a/buildroot/share/PlatformIO/ldscripts/STM32F103RE_SKR_E3_DIP.ld +++ b/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_256K.ld @@ -1,7 +1,7 @@ MEMORY { ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40 - rom (rx) : ORIGIN = 0x08007000, LENGTH = 512K - 28K - 4K + rom (rx) : ORIGIN = 0x08005000, LENGTH = 256K - 20K - 4K } /* Provide memory region aliases for common.inc */ diff --git a/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld b/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld new file mode 100644 index 000000000000..821c8ebbfe38 --- /dev/null +++ b/buildroot/share/PlatformIO/ldscripts/ZONESTAR_ZM3E_512K.ld @@ -0,0 +1,14 @@ +MEMORY +{ + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40 + rom (rx) : ORIGIN = 0x08005000, LENGTH = 512K - 20K - 4K +} + +/* Provide memory region aliases for common.inc */ +REGION_ALIAS("REGION_TEXT", rom); +REGION_ALIAS("REGION_DATA", ram); +REGION_ALIAS("REGION_BSS", ram); +REGION_ALIAS("REGION_RODATA", rom); + +/* Let common.inc handle the real work. */ +INCLUDE common.inc diff --git a/buildroot/share/PlatformIO/ldscripts/eryone_ery32_mini.ld b/buildroot/share/PlatformIO/ldscripts/eryone_ery32_mini.ld new file mode 100644 index 000000000000..04585742569e --- /dev/null +++ b/buildroot/share/PlatformIO/ldscripts/eryone_ery32_mini.ld @@ -0,0 +1,14 @@ +MEMORY +{ + ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - 4K + rom (rx) : ORIGIN = 0x08004000, LENGTH = 512K - 16K +} + +/* Provide memory region aliases for common.inc */ +REGION_ALIAS("REGION_TEXT", rom); +REGION_ALIAS("REGION_DATA", ram); +REGION_ALIAS("REGION_BSS", ram); +REGION_ALIAS("REGION_RODATA", rom); + +/* Let common.inc handle the real work. */ +INCLUDE common.inc diff --git a/buildroot/share/PlatformIO/scripts/SAMD51_grandcentral_m4.py b/buildroot/share/PlatformIO/scripts/SAMD51_grandcentral_m4.py new file mode 100644 index 000000000000..9e37024d118f --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/SAMD51_grandcentral_m4.py @@ -0,0 +1,19 @@ +# +# SAMD51_grandcentral_m4.py +# Customizations for env:SAMD51_grandcentral_m4 +# +from os.path import join, isfile +import shutil +from pprint import pprint + +Import("env") + +mf = env["MARLIN_FEATURES"] +rxBuf = mf["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in mf else "0" +txBuf = mf["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in mf else "0" + +serialBuf = str(max(int(rxBuf), int(txBuf), 350)) + +build_flags = env.get('BUILD_FLAGS') +build_flags.append("-DSERIAL_BUFFER_SIZE=" + serialBuf) +env.Replace(BUILD_FLAGS=build_flags) diff --git a/buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py b/buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py deleted file mode 100644 index 580529c9c1a8..000000000000 --- a/buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py +++ /dev/null @@ -1,9 +0,0 @@ -import os -Import("env") - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/variants/STEVAL_F401VE/ldscript.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py index 547d80ace51c..03e121c435d3 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py +++ b/buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py @@ -1,3 +1,6 @@ +# +# buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py +# try: import configparser except ImportError: @@ -51,9 +54,5 @@ def after_upload(source, target, env): print('Use the {0:s} address as the marlin app entry point.'.format(vect_tab_addr)) print('Use the {0:d}KB flash version of stm32f103rct6 chip.'.format(flash_size)) -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103RC_MEEB_3DP.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script +import marlin +marlin.custom_ld_script("STM32F103RC_MEEB_3DP.ld") diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py deleted file mode 100644 index 497a035fdf4b..000000000000 --- a/buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py +++ /dev/null @@ -1,20 +0,0 @@ -import os -Import("env") - -STM32_FLASH_SIZE = 256 - -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) - if define[0] == "STM32_FLASH_SIZE": - STM32_FLASH_SIZE = define[1] - -# Relocate firmware from 0x08000000 to 0x08007000 -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103RC_SKR_MINI_" + str(STM32_FLASH_SIZE) + "K.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py b/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py index b69f62578bd4..668475dc010a 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py +++ b/buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py @@ -1,27 +1,17 @@ +# +# buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py +# import os from os.path import join from os.path import expandvars Import("env") -# Relocate firmware from 0x08000000 to 0x08008000 -#for define in env['CPPDEFINES']: -# if define[0] == "VECT_TAB_ADDR": -# env['CPPDEFINES'].remove(define) -#env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08008000")) - -#custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/fysetc_stm32f103rc.ld") -#for i, flag in enumerate(env["LINKFLAGS"]): -# if "-Wl,-T" in flag: -# env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script -# elif flag == "-T": -# env["LINKFLAGS"][i + 1] = custom_ld_script - # Custom HEX from ELF env.AddPostAction( - join("$BUILD_DIR","${PROGNAME}.elf"), + join("$BUILD_DIR", "${PROGNAME}.elf"), env.VerboseAction(" ".join([ - "$OBJCOPY", "-O ihex", "$TARGET", # TARGET=.pio/build/fysetc_STM32F1/firmware.elf - "\"" + join("$BUILD_DIR","${PROGNAME}.hex") + "\"", # Note: $BUILD_DIR is a full path + "$OBJCOPY", "-O ihex", "$TARGET", + "\"" + join("$BUILD_DIR", "${PROGNAME}.hex") + "\"", # Note: $BUILD_DIR is a full path ]), "Building $TARGET")) # In-line command with arguments diff --git a/buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py b/buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py deleted file mode 100644 index ecdd57f594e8..000000000000 --- a/buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py +++ /dev/null @@ -1,16 +0,0 @@ -import os -Import("env") - -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) - -# Relocate firmware from 0x08000000 to 0x08007000 -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103RE_SKR_E3_DIP.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script diff --git a/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py b/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py deleted file mode 100644 index ece47ed09601..000000000000 --- a/buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py +++ /dev/null @@ -1,33 +0,0 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08010000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/STM32F103VE_longer.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - - -# Rename ${PROGNAME}.bin and save it as 'project.bin' (No encryption on the Longer3D) -def encrypt(source, target, env): - firmware = open(target[0].path, "rb") - marlin_alfa = open(target[0].dir.path +'/project.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - marlin_alfa.write(byte) - position += 1 - finally: - firmware.close() - marlin_alfa.close() - -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); diff --git a/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py b/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py index 4849f59ceb03..0a38e1ceee9d 100644 --- a/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py +++ b/buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py @@ -1,28 +1,24 @@ -import os,shutil +# +# STM32F1_create_variant.py +# +import os,shutil,marlin from SCons.Script import DefaultEnvironment from platformio import util -def copytree(src, dst, symlinks=False, ignore=None): - for item in os.listdir(src): - s = os.path.join(src, item) - d = os.path.join(dst, item) - if os.path.isdir(s): - shutil.copytree(s, d, symlinks, ignore) - else: - shutil.copy2(s, d) - env = DefaultEnvironment() platform = env.PioPlatform() board = env.BoardConfig() FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoststm32-maple") assert os.path.isdir(FRAMEWORK_DIR) -assert os.path.isdir("buildroot/share/PlatformIO/variants") + +source_root = os.path.join("buildroot", "share", "PlatformIO", "variants") +assert os.path.isdir(source_root) variant = board.get("build.variant") variant_dir = os.path.join(FRAMEWORK_DIR, "STM32F1", "variants", variant) -source_dir = os.path.join("buildroot/share/PlatformIO/variants", variant) +source_dir = os.path.join(source_root, variant) assert os.path.isdir(source_dir) if os.path.isdir(variant_dir): @@ -31,4 +27,4 @@ def copytree(src, dst, symlinks=False, ignore=None): if not os.path.isdir(variant_dir): os.mkdir(variant_dir) -copytree(source_dir, variant_dir) +marlin.copytree(source_dir, variant_dir) diff --git a/buildroot/share/PlatformIO/scripts/add_nanolib.py b/buildroot/share/PlatformIO/scripts/add_nanolib.py index 102b4b9bb0e1..3b74b0d2714d 100644 --- a/buildroot/share/PlatformIO/scripts/add_nanolib.py +++ b/buildroot/share/PlatformIO/scripts/add_nanolib.py @@ -1,2 +1,5 @@ +# +# add_nanolib.py +# Import("env") env.Append(LINKFLAGS=["--specs=nano.specs"]) diff --git a/buildroot/share/PlatformIO/scripts/anet_et4_openblt.py b/buildroot/share/PlatformIO/scripts/anet_et4_openblt.py deleted file mode 100644 index 2911a28e789d..000000000000 --- a/buildroot/share/PlatformIO/scripts/anet_et4_openblt.py +++ /dev/null @@ -1,14 +0,0 @@ -# Generate the firmware as OpenBLT needs - -import os,sys -from os.path import join - -Import("env") - -env.AddPostAction( - "$BUILD_DIR/${PROGNAME}.elf", - env.VerboseAction(" ".join([ - "$OBJCOPY", "-O", "srec", - "\"$BUILD_DIR/${PROGNAME}.elf\"", "\"$BUILD_DIR/${PROGNAME}.srec\"" - ]), "Building " + join("$BUILD_DIR","${PROGNAME}.srec")) -) diff --git a/buildroot/share/PlatformIO/scripts/chitu_crypt.py b/buildroot/share/PlatformIO/scripts/chitu_crypt.py index aa675878e70e..23d81c1721f9 100644 --- a/buildroot/share/PlatformIO/scripts/chitu_crypt.py +++ b/buildroot/share/PlatformIO/scripts/chitu_crypt.py @@ -1,20 +1,11 @@ -Import("env") -import os -import random -import struct -import uuid +# +# buildroot/share/PlatformIO/scripts/chitu_crypt.py +# Customizations for Chitu boards +# +import os,random,struct,uuid,marlin # Relocate firmware from 0x08000000 to 0x08008800 -env['CPPDEFINES'].remove(("VECT_TAB_ADDR", "0x8000000")) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08008800")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/chitu_f103.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - +marlin.relocate_firmware("0x08008800") def calculate_crc(contents, seed): accumulating_xor_value = seed; @@ -42,7 +33,7 @@ def xor_block(r0, r1, block_number, block_size, file_key): for loop_counter in range(0, block_size): # meant to make sure different bits of the key are used. - xor_seed = int(loop_counter/key_length) + xor_seed = int(loop_counter / key_length) # IP is a scratch register / R12 ip = loop_counter - (key_length * xor_seed) @@ -68,7 +59,6 @@ def xor_block(r0, r1, block_number, block_size, file_key): #increment the loop_counter loop_counter = loop_counter + 1 - def encrypt_file(input, output_file, file_length): input_file = bytearray(input.read()) block_size = 0x800 @@ -112,11 +102,10 @@ def encrypt_file(input, output_file, file_length): output_file.write(input_file) return - # Encrypt ${PROGNAME}.bin and save it as 'update.cbd' def encrypt(source, target, env): firmware = open(target[0].path, "rb") - update = open(target[0].dir.path +'/update.cbd', "wb") + update = open(target[0].dir.path + '/update.cbd', "wb") length = os.path.getsize(target[0].path) encrypt_file(firmware, update, length) @@ -124,4 +113,4 @@ def encrypt(source, target, env): firmware.close() update.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +marlin.add_post_action(encrypt); diff --git a/buildroot/share/PlatformIO/scripts/common-cxxflags.py b/buildroot/share/PlatformIO/scripts/common-cxxflags.py index a0a3b45043f2..26bff515a6d2 100644 --- a/buildroot/share/PlatformIO/scripts/common-cxxflags.py +++ b/buildroot/share/PlatformIO/scripts/common-cxxflags.py @@ -3,20 +3,35 @@ # Convenience script to apply customizations to CPP flags # Import("env") -env.Append(CXXFLAGS=[ - "-Wno-register" + +cxxflags = [ #"-Wno-incompatible-pointer-types", #"-Wno-unused-const-variable", #"-Wno-maybe-uninitialized", #"-Wno-sign-compare" -]) +] +if "teensy" not in env['PIOENV']: + cxxflags += ["-Wno-register"] +env.Append(CXXFLAGS=cxxflags) -# Useful for JTAG debugging # -# It will separe release and debug build folders. -# It useful when we need keep two live versions: one debug, for debugging, -# other release, for flashing. -# Without this, PIO will recompile everything twice for any small change. +# Add CPU frequency as a compile time constant instead of a runtime variable +# +def add_cpu_freq(): + if 'BOARD_F_CPU' in env: + env['BUILD_FLAGS'].append('-DBOARD_F_CPU=' + env['BOARD_F_CPU']) + +# Useful for JTAG debugging # -if env.GetBuildType() == "debug": +# It will separate release and debug build folders. +# It useful to keep two live versions: a debug version for debugging and another for +# release, for flashing when upload is not done automatically by jlink/stlink. +# Without this, PIO needs to recompile everything twice for any small change. +if env.GetBuildType() == "debug" and env.get('UPLOAD_PROTOCOL') not in ['jlink', 'stlink']: env['BUILD_DIR'] = '$PROJECT_BUILD_DIR/$PIOENV/debug' + +# On some platform, F_CPU is a runtime variable. Since it's used to convert from ns +# to CPU cycles, this adds overhead preventing small delay (in the order of less than +# 30 cycles) to be generated correctly. By using a compile time constant instead +# the compiler will perform the computation and this overhead will be avoided +add_cpu_freq() diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.h b/buildroot/share/PlatformIO/scripts/common-dependencies.h index ed2f46abaee1..a88e7084670b 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.h +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.h @@ -26,8 +26,6 @@ * Used by common-dependencies.py */ -#define NUM_SERIAL 1 // Normally provided by HAL/HAL.h - #include "../../../../Marlin/src/inc/MarlinConfig.h" // @@ -39,7 +37,7 @@ #define USES_LIQUIDTWI2 #elif ENABLED(LCD_I2C_TYPE_PCA8574) #define USES_LIQUIDCRYSTAL_I2C -#elif ANY(HAS_MARLINUI_HD44780, LCD_I2C_TYPE_PCF8575, SR_LCD_2W_NL , LCM1602) +#elif ANY(HAS_MARLINUI_HD44780, LCD_I2C_TYPE_PCF8575, SR_LCD_2W_NL, LCM1602) #define USES_LIQUIDCRYSTAL #endif @@ -51,10 +49,6 @@ #define HAS_GCODE_M876 #endif -#if EXTRUDERS - #define HAS_EXTRUDERS -#endif - #if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD) #define HAS_SMART_EFF_MOD #endif @@ -69,9 +63,6 @@ #if ENABLED(CANCEL_OBJECTS) #define HAS_MENU_CANCELOBJECT #endif - #if ENABLED(CUSTOM_USER_MENUS) - #define HAS_MENU_CUSTOM - #endif #if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) #define HAS_MENU_DELTA_CALIBRATE #endif diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.py b/buildroot/share/PlatformIO/scripts/common-dependencies.py index 4500f529a66b..f523b1206985 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.py +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.py @@ -2,19 +2,12 @@ # common-dependencies.py # Convenience script to check dependencies and add libs and sources for Marlin Enabled Features # -import subprocess -import os -import re -try: - import configparser -except ImportError: - import ConfigParser as configparser -try: - # PIO < 4.4 - from platformio.managers.package import PackageManager -except ImportError: - # PIO >= 4.4 - from platformio.package.meta import PackageSpec as PackageManager +import subprocess,os,re,pioutil +Import("env") + +# Detect that 'vscode init' is running +if pioutil.is_vscode_init(): + env.Exit(0) PIO_VERSION_MIN = (5, 0, 3) try: @@ -40,7 +33,8 @@ except: print("Can't detect PlatformIO Version") -Import("env") +from platformio.package.meta import PackageSpec +from platformio.project.config import ProjectConfig #print(env.Dump()) @@ -49,16 +43,9 @@ except: verbose = 0 -def blab(str): - if verbose: - print(str) - -def parse_pkg_uri(spec): - if PackageManager.__name__ == 'PackageSpec': - return PackageManager(spec).name - else: - name, _, _ = PackageManager.parse_pkg_uri(spec) - return name +def blab(str,level=1): + if verbose >= level: + print("[deps] %s" % str) FEATURE_CONFIG = {} @@ -81,16 +68,17 @@ def add_to_feat_cnf(feature, flines): name = parts.pop(0) if name in ['build_flags', 'extra_scripts', 'src_filter', 'lib_ignore']: feat[name] = '='.join(parts) + blab("[%s] %s=%s" % (feature, name, feat[name]), 3) else: - for dep in line.split(','): + for dep in re.split(r",\s*", line): lib_name = re.sub(r'@([~^]|[<>]=?)?[\d.]+', '', dep.strip()).split('=').pop(0) lib_re = re.compile('(?!^' + lib_name + '\\b)') feat['lib_deps'] = list(filter(lib_re.match, feat['lib_deps'])) + [dep] + blab("[%s] lib_deps = %s" % (feature, dep), 3) def load_config(): - config = configparser.ConfigParser() - config.read("platformio.ini") - items = config.items('features') + blab("========== Gather [features] entries...") + items = ProjectConfig().items('features') for key in items: feature = key[0].upper() if not feature in FEATURE_CONFIG: @@ -98,16 +86,20 @@ def load_config(): add_to_feat_cnf(feature, key[1]) # Add options matching custom_marlin.MY_OPTION to the pile + blab("========== Gather custom_marlin entries...") all_opts = env.GetProjectOptions() for n in all_opts: - mat = re.match(r'custom_marlin\.(.+)', n[0]) + key = n[0] + mat = re.match(r'custom_marlin\.(.+)', key) if mat: try: - val = env.GetProjectOption(n[0]) + val = env.GetProjectOption(key) except: val = None if val: - add_to_feat_cnf(mat.group(1).upper(), val) + opt = mat.group(1).upper() + blab("%s.custom_marlin.%s = '%s'" % ( env['PIOENV'], opt, val )) + add_to_feat_cnf(opt, val) def get_all_known_libs(): known_libs = [] @@ -116,16 +108,14 @@ def get_all_known_libs(): if not 'lib_deps' in feat: continue for dep in feat['lib_deps']: - name = parse_pkg_uri(dep) - known_libs.append(name) + known_libs.append(PackageSpec(dep).name) return known_libs def get_all_env_libs(): env_libs = [] lib_deps = env.GetProjectOption('lib_deps') for dep in lib_deps: - name = parse_pkg_uri(dep) - env_libs.append(name) + env_libs.append(PackageSpec(dep).name) return env_libs def set_env_field(field, value): @@ -144,6 +134,7 @@ def force_ignore_unused_libs(): def apply_features_config(): load_config() + blab("========== Apply enabled features...") for feature in FEATURE_CONFIG: if not env.MarlinFeatureIsEnabled(feature): continue @@ -151,25 +142,25 @@ def apply_features_config(): feat = FEATURE_CONFIG[feature] if 'lib_deps' in feat and len(feat['lib_deps']): - blab("Adding lib_deps for %s... " % feature) + blab("========== Adding lib_deps for %s... " % feature, 2) # feat to add deps_to_add = {} for dep in feat['lib_deps']: - name = parse_pkg_uri(dep) - deps_to_add[name] = dep + deps_to_add[PackageSpec(dep).name] = dep + blab("==================== %s... " % dep, 2) # Does the env already have the dependency? deps = env.GetProjectOption('lib_deps') for dep in deps: - name = parse_pkg_uri(dep) + name = PackageSpec(dep).name if name in deps_to_add: del deps_to_add[name] # Are there any libraries that should be ignored? lib_ignore = env.GetProjectOption('lib_ignore') for dep in deps: - name = parse_pkg_uri(dep) + name = PackageSpec(dep).name if name in deps_to_add: del deps_to_add[name] @@ -180,16 +171,16 @@ def apply_features_config(): if 'build_flags' in feat: f = feat['build_flags'] - blab("Adding build_flags for %s: %s" % (feature, f)) + blab("========== Adding build_flags for %s: %s" % (feature, f), 2) new_flags = env.GetProjectOption('build_flags') + [ f ] env.Replace(BUILD_FLAGS=new_flags) if 'extra_scripts' in feat: - blab("Running extra_scripts for %s... " % feature) + blab("Running extra_scripts for %s... " % feature, 2) env.SConscript(feat['extra_scripts'], exports="env") if 'src_filter' in feat: - blab("Adding src_filter for %s... " % feature) + blab("========== Adding src_filter for %s... " % feature, 2) src_filter = ' '.join(env.GetProjectOption('src_filter')) # first we need to remove the references to the same folder my_srcs = re.findall(r'[+-](<.*?>)', feat['src_filter']) @@ -203,7 +194,7 @@ def apply_features_config(): env.Replace(SRC_FILTER=src_filter) if 'lib_ignore' in feat: - blab("Adding lib_ignore for %s... " % feature) + blab("========== Adding lib_ignore for %s... " % feature, 2) lib_ignore = env.GetProjectOption('lib_ignore') + [feat['lib_ignore']] set_env_field('lib_ignore', lib_ignore) @@ -221,14 +212,19 @@ def search_compiler(): pass if os.path.exists(GCC_PATH_CACHE): - blab("Getting g++ path from cache") with open(GCC_PATH_CACHE, 'r') as f: return f.read() # Find the current platform compiler by searching the $PATH # which will be in a platformio toolchain bin folder path_regex = re.escape(env['PROJECT_PACKAGES_DIR']) - gcc = "g++" + + # See if the environment provides a default compiler + try: + gcc = env.GetProjectOption('custom_deps_gcc') + except: + gcc = "g++" + if env['PLATFORM'] == 'win32': path_separator = ';' path_regex += r'.*\\bin' @@ -248,13 +244,14 @@ def search_compiler(): filepath = os.path.sep.join([pathdir, filepath]) # Cache the g++ path to no search always if os.path.exists(ENV_BUILD_PATH): - blab("Caching g++ for current env") with open(GCC_PATH_CACHE, 'w+') as f: f.write(filepath) return filepath filepath = env.get('CXX') + if filepath == 'CC': + filepath = gcc blab("Couldn't find a compiler! Fallback to %s" % filepath) return filepath @@ -283,7 +280,7 @@ def load_marlin_features(): cmd += ['-D__MARLIN_DEPS__ -w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h'] cmd = ' '.join(cmd) - blab(cmd) + blab(cmd, 4) define_list = subprocess.check_output(cmd, shell=True).splitlines() marlin_features = {} for define in define_list: @@ -312,16 +309,6 @@ def MarlinFeatureIsEnabled(env, feature): return some_on -# -# Check for Configfiles in two common incorrect places -# -def check_configfile_locations(): - for p in [ env['PROJECT_DIR'], os.path.join(env['PROJECT_DIR'], "config") ]: - for f in [ "Configuration.h", "Configuration_adv.h" ]: - if os.path.isfile(os.path.join(p, f)): - err = 'ERROR: Config files found in directory ' + str(p) + '. Please move them into the Marlin subdirectory.' - raise SystemExit(err) - # # Add a method for other PIO scripts to query enabled features # @@ -330,6 +317,5 @@ def check_configfile_locations(): # # Add dependencies for enabled Marlin features # -check_configfile_locations() apply_features_config() force_ignore_unused_libs() diff --git a/buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py b/buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py deleted file mode 100644 index f7d3f0d03ab7..000000000000 --- a/buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py +++ /dev/null @@ -1,58 +0,0 @@ -import os,shutil -from SCons.Script import DefaultEnvironment -from platformio import util -try: - # PIO < 4.4 - from platformio.managers.package import PackageManager -except ImportError: - # PIO >= 4.4 - from platformio.package.meta import PackageSpec as PackageManager - -def parse_pkg_uri(spec): - if PackageManager.__name__ == 'PackageSpec': - return PackageManager(spec).name - else: - name, _, _ = PackageManager.parse_pkg_uri(spec) - return name - -def copytree(src, dst, symlinks=False, ignore=None): - for item in os.listdir(src): - s = os.path.join(src, item) - d = os.path.join(dst, item) - if os.path.isdir(s): - shutil.copytree(s, d, symlinks, ignore) - else: - shutil.copy2(s, d) - -env = DefaultEnvironment() -platform = env.PioPlatform() -board = env.BoardConfig() -variant = board.get("build.variant") - -platform_packages = env.GetProjectOption('platform_packages') -# if there's no framework defined, take it from the class name of platform -framewords = { - "Ststm32Platform": "framework-arduinoststm32", - "AtmelavrPlatform": "framework-arduino-avr" -} -if len(platform_packages) == 0: - platform_name = framewords[platform.__class__.__name__] -else: - platform_name = parse_pkg_uri(platform_packages[0]) - -FRAMEWORK_DIR = platform.get_package_dir(platform_name) -assert os.path.isdir(FRAMEWORK_DIR) -assert os.path.isdir("buildroot/share/PlatformIO/variants") - -variant_dir = os.path.join(FRAMEWORK_DIR, "variants", variant) - -source_dir = os.path.join("buildroot/share/PlatformIO/variants", variant) -assert os.path.isdir(source_dir) - -if os.path.isdir(variant_dir): - shutil.rmtree(variant_dir) - -if not os.path.isdir(variant_dir): - os.mkdir(variant_dir) - -copytree(source_dir, variant_dir) diff --git a/buildroot/share/PlatformIO/scripts/creality.py b/buildroot/share/PlatformIO/scripts/creality.py deleted file mode 100644 index b9d7d7039bb4..000000000000 --- a/buildroot/share/PlatformIO/scripts/creality.py +++ /dev/null @@ -1,17 +0,0 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) - -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/creality.ld") - -for i, flag in enumerate(env['LINKFLAGS']): - if "-Wl,-T" in flag: - env['LINKFLAGS'][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env['LINKFLAGS'][i + 1] = custom_ld_script diff --git a/buildroot/share/PlatformIO/scripts/custom_board.py b/buildroot/share/PlatformIO/scripts/custom_board.py new file mode 100644 index 000000000000..e462738190dd --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/custom_board.py @@ -0,0 +1,16 @@ +# +# buildroot/share/PlatformIO/scripts/custom_board.py +# +# - For build.address replace VECT_TAB_ADDR to relocate the firmware +# - For build.ldscript use one of the linker scripts in buildroot/share/PlatformIO/ldscripts +# +import marlin +board = marlin.env.BoardConfig() + +address = board.get("build.address", "") +if address: + marlin.relocate_firmware(address) + +ldscript = board.get("build.ldscript", "") +if ldscript: + marlin.custom_ld_script(ldscript) diff --git a/buildroot/share/PlatformIO/scripts/download_mks_assets.py b/buildroot/share/PlatformIO/scripts/download_mks_assets.py index ae2ce467e84a..251a74a4ccb5 100644 --- a/buildroot/share/PlatformIO/scripts/download_mks_assets.py +++ b/buildroot/share/PlatformIO/scripts/download_mks_assets.py @@ -1,12 +1,17 @@ +# +# buildroot/share/PlatformIO/scripts/download_mks_assets.py +# Added by HAS_TFT_LVGL_UI to download assets from Makerbase repo +# Import("env") -import os -import requests -import zipfile -import tempfile -import shutil +import os,requests,zipfile,tempfile,shutil,pioutil -url = "https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/archive/master.zip" -zip_path = os.path.join(env.Dictionary("PROJECT_LIBDEPS_DIR"), "mks-assets.zip") +# Detect that 'vscode init' is running +if pioutil.is_vscode_init(): + env.Exit(0) + +url = "https://github.com/makerbase-mks/Mks-Robin-Nano-Marlin2.0-Firmware/archive/0263cdaccf.zip" +deps_path = env.Dictionary("PROJECT_LIBDEPS_DIR") +zip_path = os.path.join(deps_path, "mks-assets.zip") assets_path = os.path.join(env.Dictionary("PROJECT_BUILD_DIR"), env.Dictionary("PIOENV"), "assets") def download_mks_assets(): @@ -14,8 +19,8 @@ def download_mks_assets(): r = requests.get(url, stream=True) # the user may have a very clean workspace, # so create the PROJECT_LIBDEPS_DIR directory if not exits - if os.path.exists(env.Dictionary("PROJECT_LIBDEPS_DIR")) == False: - os.mkdir(env.Dictionary("PROJECT_LIBDEPS_DIR")) + if os.path.exists(deps_path) == False: + os.mkdir(deps_path) with open(zip_path, 'wb') as fd: for chunk in r.iter_content(chunk_size=128): fd.write(chunk) diff --git a/buildroot/share/PlatformIO/scripts/exc.S b/buildroot/share/PlatformIO/scripts/exc.S new file mode 100644 index 000000000000..1db462bb2379 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/exc.S @@ -0,0 +1,104 @@ +/* ***************************************************************************** + * The MIT License + * + * Copyright (c) 2010 Perry Hung. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * ****************************************************************************/ + +# On an exception, push a fake stack thread mode stack frame and redirect +# thread execution to a thread mode error handler + +# From RM008: +# The SP is decremented by eight words by the completion of the stack push. +# Figure 5-1 shows the contents of the stack after an exception pre-empts the +# current program flow. +# +# Old SP--> +# xPSR +# PC +# LR +# r12 +# r3 +# r2 +# r1 +# SP--> r0 + +.text +.globl __exc_nmi +.weak __exc_nmi +.globl __exc_hardfault +.weak __exc_hardfault +.globl __exc_memmanage +.weak __exc_memmanage +.globl __exc_busfault +.weak __exc_busfault +.globl __exc_usagefault +.weak __exc_usagefault + +.code 16 +.thumb_func +__exc_nmi: + mov r0, #1 + b __default_exc + +.thumb_func +__exc_hardfault: + mov r0, #2 + b __default_exc + +.thumb_func +__exc_memmanage: + mov r0, #3 + b __default_exc + +.thumb_func +__exc_busfault: + mov r0, #4 + b __default_exc + +.thumb_func +__exc_usagefault: + mov r0, #5 + b __default_exc + +.thumb_func +__default_exc: + ldr r2, NVIC_CCR @ Enable returning to thread mode even if there are + mov r1 ,#1 @ pending exceptions. See flag NONEBASETHRDENA. + str r1, [r2] + cpsid i @ Disable global interrupts + ldr r2, SYSTICK_CSR @ Disable systick handler + mov r1, #0 + str r1, [r2] + ldr r1, CPSR_MASK @ Set default CPSR + push {r1} + ldr r1, TARGET_PC @ Set target pc + push {r1} + sub sp, sp, #24 @ Don't care + ldr r1, EXC_RETURN @ Return to thread mode + mov lr, r1 + bx lr @ Exception exit + +.align 4 +CPSR_MASK: .word 0x61000000 +EXC_RETURN: .word 0xFFFFFFF9 +TARGET_PC: .word __error +NVIC_CCR: .word 0xE000ED14 @ NVIC configuration control register +SYSTICK_CSR: .word 0xE000E010 @ Systick control register diff --git a/buildroot/share/PlatformIO/scripts/fix_framework_weakness.py b/buildroot/share/PlatformIO/scripts/fix_framework_weakness.py new file mode 100644 index 000000000000..fa91b7bb7041 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/fix_framework_weakness.py @@ -0,0 +1,32 @@ +# +# fix_framework_weakness.py +# +from os.path import join, isfile +import shutil +from pprint import pprint + +Import("env") + +if env.MarlinFeatureIsEnabled("POSTMORTEM_DEBUGGING"): + FRAMEWORK_DIR = env.PioPlatform().get_package_dir("framework-arduinoststm32-maple") + patchflag_path = join(FRAMEWORK_DIR, ".exc-patching-done") + + # patch file only if we didn't do it before + if not isfile(patchflag_path): + print("Patching libmaple exception handlers") + original_file = join(FRAMEWORK_DIR, "STM32F1", "cores", "maple", "libmaple", "exc.S") + backup_file = join(FRAMEWORK_DIR, "STM32F1", "cores", "maple", "libmaple", "exc.S.bak") + src_file = join("buildroot", "share", "PlatformIO", "scripts", "exc.S") + + assert isfile(original_file) and isfile(src_file) + shutil.copyfile(original_file, backup_file) + shutil.copyfile(src_file, original_file); + + def _touch(path): + with open(path, "w") as fp: + fp.write("") + + env.Execute(lambda *args, **kwargs: _touch(patchflag_path)) + print("Done patching exception handler") + + print("Libmaple modified and ready for post mortem debugging") diff --git a/buildroot/share/PlatformIO/scripts/fly_mini.py b/buildroot/share/PlatformIO/scripts/fly_mini.py deleted file mode 100644 index 34d132958d6a..000000000000 --- a/buildroot/share/PlatformIO/scripts/fly_mini.py +++ /dev/null @@ -1,16 +0,0 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08005000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08005000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/fly_mini.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - diff --git a/buildroot/share/PlatformIO/scripts/fysetc_cheetah_v20.py b/buildroot/share/PlatformIO/scripts/fysetc_cheetah_v20.py deleted file mode 100644 index 10471d375346..000000000000 --- a/buildroot/share/PlatformIO/scripts/fysetc_cheetah_v20.py +++ /dev/null @@ -1,9 +0,0 @@ -import os -Import("env") - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/ldscript.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script diff --git a/buildroot/share/PlatformIO/scripts/generic_create_variant.py b/buildroot/share/PlatformIO/scripts/generic_create_variant.py index 0b82c69f5a3f..7f76ef94262c 100644 --- a/buildroot/share/PlatformIO/scripts/generic_create_variant.py +++ b/buildroot/share/PlatformIO/scripts/generic_create_variant.py @@ -1,27 +1,54 @@ -import os,shutil +# +# generic_create_variant.py +# +# Copy one of the variants from buildroot/platformio/variants into +# the appropriate framework variants folder, so that its contents +# will be picked up by PlatformIO just like any other variant. +# +import os,shutil,marlin from SCons.Script import DefaultEnvironment from platformio import util env = DefaultEnvironment() + +# +# Get the platform name from the 'platform_packages' option, +# or look it up by the platform.class.name. +# platform = env.PioPlatform() -board = env.BoardConfig() -FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoststm32") +from platformio.package.meta import PackageSpec +platform_packages = env.GetProjectOption('platform_packages') +if len(platform_packages) == 0: + framewords = { + "Ststm32Platform": "framework-arduinoststm32", + "AtmelavrPlatform": "framework-arduino-avr" + } + platform_name = framewords[platform.__class__.__name__] +else: + platform_name = PackageSpec(platform_packages[0]).name + +if platform_name in [ "usb-host-msc", "usb-host-msc-cdc-msc", "usb-host-msc-cdc-msc-2", "usb-host-msc-cdc-msc-3", "tool-stm32duino" ]: + platform_name = "framework-arduinoststm32" + +FRAMEWORK_DIR = platform.get_package_dir(platform_name) assert os.path.isdir(FRAMEWORK_DIR) -assert os.path.isdir("buildroot/share/PlatformIO/variants") -mcu_type = board.get("build.mcu")[:-2] +board = env.BoardConfig() + +#mcu_type = board.get("build.mcu")[:-2] variant = board.get("build.variant") -series = mcu_type[:7].upper() + "xx" +#series = mcu_type[:7].upper() + "xx" + +# Prepare a new empty folder at the destination variant_dir = os.path.join(FRAMEWORK_DIR, "variants", variant) +if os.path.isdir(variant_dir): + shutil.rmtree(variant_dir) +if not os.path.isdir(variant_dir): + os.mkdir(variant_dir) +# Source dir is a local variant sub-folder source_dir = os.path.join("buildroot/share/PlatformIO/variants", variant) assert os.path.isdir(source_dir) -if not os.path.isdir(variant_dir): - os.mkdir(variant_dir) - -for file_name in os.listdir(source_dir): - full_file_name = os.path.join(source_dir, file_name) - if os.path.isfile(full_file_name): - shutil.copy(full_file_name, variant_dir) +marlin.copytree(source_dir, variant_dir) diff --git a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py index 6c8a4f6034c2..a4001a240ca1 100644 --- a/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py +++ b/buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py @@ -1,30 +1,21 @@ -import os -Import("env") +# +# buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py +# Customizations for env:jgaurora_a5s_a1 +# +import os,marlin -# Relocate firmware from 0x08000000 to 0x0800A000 -env['CPPDEFINES'].remove(("VECT_TAB_ADDR", "0x8000000")) -#alternatively, for STSTM <=5.1.0 use line below -#env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728)) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x0800A000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/jgaurora_a5s_a1.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - -#append ${PROGNAME}.bin firmware after bootloader and save it as 'jgaurora_firmware.bin' -def addboot(source,target,env): +# Append ${PROGNAME}.bin firmware after bootloader and save it as 'jgaurora_firmware.bin' +def addboot(source, target, env): firmware = open(target[0].path, "rb") lengthfirmware = os.path.getsize(target[0].path) - bootloader_dir = "buildroot/share/PlatformIO/scripts/jgaurora_bootloader.bin" - bootloader = open(bootloader_dir, "rb") - lengthbootloader = os.path.getsize(bootloader_dir) - firmware_with_boothloader_dir = target[0].dir.path +'/firmware_with_bootloader.bin' - if os.path.exists(firmware_with_boothloader_dir): - os.remove(firmware_with_boothloader_dir) - firmwareimage = open(firmware_with_boothloader_dir, "wb") + bootloader_bin = "buildroot/share/PlatformIO/scripts/" + "jgaurora_bootloader.bin" + bootloader = open(bootloader_bin, "rb") + lengthbootloader = os.path.getsize(bootloader_bin) + + firmware_with_boothloader_bin = target[0].dir.path + '/firmware_with_bootloader.bin' + if os.path.exists(firmware_with_boothloader_bin): + os.remove(firmware_with_boothloader_bin) + firmwareimage = open(firmware_with_boothloader_bin, "wb") position = 0 while position < lengthbootloader: byte = bootloader.read(1) @@ -38,11 +29,11 @@ def addboot(source,target,env): bootloader.close() firmware.close() firmwareimage.close() - firmware_without_bootloader_dir = target[0].dir.path+'/firmware_for_sd_upload.bin' - if os.path.exists(firmware_without_bootloader_dir): - os.remove(firmware_without_bootloader_dir) - os.rename(target[0].path, firmware_without_bootloader_dir) - #os.rename(target[0].dir.path+'/firmware_with_bootloader.bin', target[0].dir.path+'/firmware.bin') -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", addboot); + firmware_without_bootloader_bin = target[0].dir.path + '/firmware_for_sd_upload.bin' + if os.path.exists(firmware_without_bootloader_bin): + os.remove(firmware_without_bootloader_bin) + os.rename(target[0].path, firmware_without_bootloader_bin) + #os.rename(target[0].dir.path+'/firmware_with_bootloader.bin', target[0].dir.path+'/firmware.bin') +marlin.add_post_action(addboot); diff --git a/buildroot/share/PlatformIO/scripts/lerdge.py b/buildroot/share/PlatformIO/scripts/lerdge.py index fd934a127866..144ab64a9a23 100644 --- a/buildroot/share/PlatformIO/scripts/lerdge.py +++ b/buildroot/share/PlatformIO/scripts/lerdge.py @@ -1,46 +1,47 @@ -import os,sys +# +# buildroot/share/PlatformIO/scripts/lerdge.py +# Customizations for Lerdge build environments: +# env:LERDGEX env:LERDGEX_usb_flash_drive +# env:LERDGES env:LERDGES_usb_flash_drive +# env:LERDGEK env:LERDGEK_usb_flash_drive +# +import os,marlin Import("env") from SCons.Script import DefaultEnvironment board = DefaultEnvironment().BoardConfig() -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/lerdge.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - def encryptByte(byte): - byte = 0xFF & ((byte << 6) | (byte >> 2)) - i = 0x58 + byte - j = 0x05 + byte + (i >> 8) - byte = (0xF8 & i) | (0x07 & j) - return byte + byte = 0xFF & ((byte << 6) | (byte >> 2)) + i = 0x58 + byte + j = 0x05 + byte + (i >> 8) + byte = (0xF8 & i) | (0x07 & j) + return byte def encrypt_file(input, output_file, file_length): - input_file = bytearray(input.read()) - for i in range(len(input_file)): - result = encryptByte(input_file[i]) - input_file[i] = result - - output_file.write(input_file) - return + input_file = bytearray(input.read()) + for i in range(len(input_file)): + input_file[i] = encryptByte(input_file[i]) + output_file.write(input_file) -# Encrypt ${PROGNAME}.bin and save it as build.firmware +# Encrypt ${PROGNAME}.bin and save it with the name given in build.encrypt def encrypt(source, target, env): - print("Encrypting to:", board.get("build.firmware")) - firmware = open(target[0].path, "rb") - result = open(target[0].dir.path + "/" + board.get("build.firmware"), "wb") - length = os.path.getsize(target[0].path) - - encrypt_file(firmware, result, length) - - firmware.close() - result.close() - -if 'firmware' in board.get("build").keys(): - env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); + fwpath = target[0].path + enname = board.get("build.encrypt") + print("Encrypting %s to %s" % (fwpath, enname)) + fwfile = open(fwpath, "rb") + enfile = open(target[0].dir.path + "/" + enname, "wb") + length = os.path.getsize(fwpath) + + encrypt_file(fwfile, enfile, length) + + fwfile.close() + enfile.close() + os.remove(fwpath) + +if 'encrypt' in board.get("build").keys(): + if board.get("build.encrypt") != "": + marlin.add_post_action(encrypt) else: - print("You need to define output file via board_build.firmware = 'filename' parameter") - exit(1); + print("LERDGE builds require output file via board_build.encrypt = 'filename' parameter") + exit(1) diff --git a/buildroot/share/PlatformIO/scripts/marlin.py b/buildroot/share/PlatformIO/scripts/marlin.py new file mode 100644 index 000000000000..caa0c89749c1 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/marlin.py @@ -0,0 +1,71 @@ +# +# buildroot/share/PlatformIO/scripts/marlin.py +# Helper module with some commonly-used functions +# +import os,shutil + +from SCons.Script import DefaultEnvironment +env = DefaultEnvironment() + +from os.path import join + +def copytree(src, dst, symlinks=False, ignore=None): + for item in os.listdir(src): + s = join(src, item) + d = join(dst, item) + if os.path.isdir(s): + shutil.copytree(s, d, symlinks, ignore) + else: + shutil.copy2(s, d) + +def replace_define(field, value): + for define in env['CPPDEFINES']: + if define[0] == field: + env['CPPDEFINES'].remove(define) + env['CPPDEFINES'].append((field, value)) + +# Relocate the firmware to a new address, such as "0x08005000" +def relocate_firmware(address): + replace_define("VECT_TAB_ADDR", address) + +# Relocate the vector table with a new offset +def relocate_vtab(address): + replace_define("VECT_TAB_OFFSET", address) + +# Replace the existing -Wl,-T with the given ldscript path +def custom_ld_script(ldname): + apath = os.path.abspath("buildroot/share/PlatformIO/ldscripts/" + ldname) + for i, flag in enumerate(env["LINKFLAGS"]): + if "-Wl,-T" in flag: + env["LINKFLAGS"][i] = "-Wl,-T" + apath + elif flag == "-T": + env["LINKFLAGS"][i + 1] = apath + +# Encrypt ${PROGNAME}.bin and save it with a new name +# Called by specific encrypt() functions, mostly for MKS boards +def encrypt_mks(source, target, env, new_name): + import sys + + key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] + + fwpath = target[0].path + fwfile = open(fwpath, "rb") + enfile = open(target[0].dir.path + "/" + new_name, "wb") + length = os.path.getsize(fwpath) + position = 0 + try: + while position < length: + byte = fwfile.read(1) + if position >= 320 and position < 31040: + byte = chr(ord(byte) ^ key[position & 31]) + if sys.version_info[0] > 2: + byte = bytes(byte, 'latin1') + enfile.write(byte) + position += 1 + finally: + fwfile.close() + enfile.close() + os.remove(fwpath) + +def add_post_action(action): + env.AddPostAction(join("$BUILD_DIR", "${PROGNAME}.bin"), action); diff --git a/buildroot/share/PlatformIO/scripts/mks_encrypt.py b/buildroot/share/PlatformIO/scripts/mks_encrypt.py deleted file mode 100644 index 0d53cdfbe934..000000000000 --- a/buildroot/share/PlatformIO/scripts/mks_encrypt.py +++ /dev/null @@ -1,32 +0,0 @@ -import os,sys -Import("env") - -from SCons.Script import DefaultEnvironment -board = DefaultEnvironment().BoardConfig() - -# Encrypt ${PROGNAME}.bin and save it as build.firmware ('Robin.bin') -def encrypt(source, target, env): - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/'+ board.get("build.firmware"), "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() - -if 'firmware' in board.get("build").keys(): - env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); -else: - print("You need to define output file via board_build.firmware = 'filename' parameter", file=sys.stderr) - exit(1); diff --git a/buildroot/share/PlatformIO/scripts/mks_robin.py b/buildroot/share/PlatformIO/scripts/mks_robin.py index dd2342bf0df2..2dea7c615f79 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin.py @@ -1,39 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - -# Encrypt ${PROGNAME}.bin and save it as 'Robin.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin.py +# +import robin +robin.prepare("0x08007000", "mks_robin.ld", "Robin.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_e3.py b/buildroot/share/PlatformIO/scripts/mks_robin_e3.py index 3af623cce0d7..6ddeccbf80f4 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_e3.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_e3.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08005000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08005000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_e3.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - - -# Encrypt ${PROGNAME}.bin and save it as 'mksLite.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_e3.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_e3.py +# +import robin +robin.prepare("0x08005000", "mks_robin_e3.ld", "Robin_e3.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py b/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py index 2aab14bab788..5eeb93c09663 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_e3p.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_e3p.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - - -# Encrypt ${PROGNAME}.bin and save it as 'mks_robin_e3p.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_e3p.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_e3p.py +# +import robin +robin.prepare("0x08007000", "mks_robin_e3p.ld", "Robin_e3p.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py index 2f3ae1fa9a17..c2018336fd1f 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_lite.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_lite.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08005000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08005000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_lite.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - - -# Encrypt ${PROGNAME}.bin and save it as 'mksLite.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/mksLite.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_lite.py +# +import robin +robin.prepare("0x08005000", "mks_robin_lite.ld", "mksLite.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py b/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py index 67ad442d8212..42c8fb18b691 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_lite3.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08005000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08005000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_lite.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - - -# Encrypt ${PROGNAME}.bin and save it as 'mksLite.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/mksLite3.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_lite3.py +# +import robin +robin.prepare("0x08005000", "mks_robin_lite.ld", "mksLite3.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py old mode 100755 new mode 100644 index d38669830158..b0d83886533a --- a/buildroot/share/PlatformIO/scripts/mks_robin_mini.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_mini.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_mini.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - - -# Encrypt ${PROGNAME}.bin and save it as 'Robin_mini.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_mini.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_mini.py +# +import robin +robin.prepare("0x08007000", "mks_robin_mini.ld", "Robin_mini.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py old mode 100755 new mode 100644 index a68fd308d443..35e99830c4df --- a/buildroot/share/PlatformIO/scripts/mks_robin_nano.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_nano.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_nano.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - - -# Encrypt ${PROGNAME}.bin and save it as 'Robin_nano.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_nano.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_nano.py +# +import robin +robin.prepare("0x08007000", "mks_robin_nano.ld", "Robin_nano.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py b/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py index 0047289adfd0..4a5726ad5b98 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_nano35.py @@ -1,40 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_nano.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - - -# Encrypt ${PROGNAME}.bin and save it as 'Robin_nano35.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_nano35.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_nano35.py +# +import robin +robin.prepare("0x08007000", "mks_robin_nano.ld", "Robin_nano35.bin") diff --git a/buildroot/share/PlatformIO/scripts/mks_robin_pro.py b/buildroot/share/PlatformIO/scripts/mks_robin_pro.py index 2ebf1ffb9d74..60e2482bb030 100644 --- a/buildroot/share/PlatformIO/scripts/mks_robin_pro.py +++ b/buildroot/share/PlatformIO/scripts/mks_robin_pro.py @@ -1,39 +1,5 @@ -import os -Import("env") - -# Relocate firmware from 0x08000000 to 0x08007000 -for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_ADDR": - env['CPPDEFINES'].remove(define) -env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08007000")) - -custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/mks_robin_pro.ld") -for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,-T" in flag: - env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script - elif flag == "-T": - env["LINKFLAGS"][i + 1] = custom_ld_script - -# Encrypt ${PROGNAME}.bin and save it as 'Robin.bin' -def encrypt(source, target, env): - import sys - - key = [0xA3, 0xBD, 0xAD, 0x0D, 0x41, 0x11, 0xBB, 0x8D, 0xDC, 0x80, 0x2D, 0xD0, 0xD2, 0xC4, 0x9B, 0x1E, 0x26, 0xEB, 0xE3, 0x33, 0x4A, 0x15, 0xE4, 0x0A, 0xB3, 0xB1, 0x3C, 0x93, 0xBB, 0xAF, 0xF7, 0x3E] - - firmware = open(target[0].path, "rb") - robin = open(target[0].dir.path +'/Robin_pro.bin', "wb") - length = os.path.getsize(target[0].path) - position = 0 - try: - while position < length: - byte = firmware.read(1) - if position >= 320 and position < 31040: - byte = chr(ord(byte) ^ key[position & 31]) - if sys.version_info[0] > 2: - byte = bytes(byte, 'latin1') - robin.write(byte) - position += 1 - finally: - firmware.close() - robin.close() -env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); +# +# buildroot/share/PlatformIO/scripts/mks_robin_pro.py +# +import robin +robin.prepare("0x08007000", "mks_robin_pro.ld", "Robin_pro.bin") diff --git a/buildroot/share/PlatformIO/scripts/offset_and_rename.py b/buildroot/share/PlatformIO/scripts/offset_and_rename.py new file mode 100644 index 000000000000..9caed298e434 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/offset_and_rename.py @@ -0,0 +1,61 @@ +# +# offset_and_rename.py +# +# - If 'build.offset' is provided, either by JSON or by the environment... +# - Set linker flag LD_FLASH_OFFSET and relocate the VTAB based on 'build.offset'. +# - Set linker flag LD_MAX_DATA_SIZE based on 'build.maximum_ram_size'. +# - Define STM32_FLASH_SIZE from 'upload.maximum_size' for use by Flash-based EEPROM emulation. +# +# - For 'board_build.rename' add a post-action to rename the firmware file. +# +import os,sys,marlin +Import("env") + +from SCons.Script import DefaultEnvironment +board = DefaultEnvironment().BoardConfig() + +board_keys = board.get("build").keys() + +# +# For build.offset define LD_FLASH_OFFSET, used by ldscript.ld +# +if 'offset' in board_keys: + LD_FLASH_OFFSET = board.get("build.offset") + marlin.relocate_vtab(LD_FLASH_OFFSET) + + # Flash size + maximum_flash_size = int(board.get("upload.maximum_size") / 1024) + marlin.replace_define('STM32_FLASH_SIZE', maximum_flash_size) + + # Get upload.maximum_ram_size (defined by /buildroot/share/PlatformIO/boards/VARIOUS.json) + maximum_ram_size = board.get("upload.maximum_ram_size") + + for i, flag in enumerate(env["LINKFLAGS"]): + if "-Wl,--defsym=LD_FLASH_OFFSET" in flag: + env["LINKFLAGS"][i] = "-Wl,--defsym=LD_FLASH_OFFSET=" + LD_FLASH_OFFSET + if "-Wl,--defsym=LD_MAX_DATA_SIZE" in flag: + env["LINKFLAGS"][i] = "-Wl,--defsym=LD_MAX_DATA_SIZE=" + str(maximum_ram_size - 40) + +# +# For build.encrypt rename and encode the firmware file. +# +if 'encrypt' in board_keys: + + # Encrypt ${PROGNAME}.bin and save it with the name given in build.encrypt + def encrypt(source, target, env): + marlin.encrypt_mks(source, target, env, board.get("build.encrypt")) + + if board.get("build.encrypt") != "": + marlin.add_post_action(encrypt) + +# +# For build.rename simply rename the firmware file. +# +if 'rename' in board_keys: + + def rename_target(source, target, env): + firmware = os.path.join(target[0].dir.path, board.get("build.rename")) + import shutil + shutil.copy(target[0].path, firmware) + + marlin.add_post_action(rename_target) diff --git a/buildroot/share/PlatformIO/scripts/openblt.py b/buildroot/share/PlatformIO/scripts/openblt.py new file mode 100644 index 000000000000..6e71ca9eb812 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/openblt.py @@ -0,0 +1,18 @@ +# +# Convert the ELF to an SREC file suitable for some bootloaders +# +import os,sys +from os.path import join + +Import("env") + +board = env.BoardConfig() +board_keys = board.get("build").keys() +if 'encrypt' in board_keys: + env.AddPostAction( + join("$BUILD_DIR", "${PROGNAME}.bin"), + env.VerboseAction(" ".join([ + "$OBJCOPY", "-O", "srec", + "\"$BUILD_DIR/${PROGNAME}.elf\"", "\"" + join("$BUILD_DIR", board.get("build.encrypt")) + "\"" + ]), "Building $TARGET") + ) diff --git a/buildroot/share/PlatformIO/scripts/pioutil.py b/buildroot/share/PlatformIO/scripts/pioutil.py new file mode 100644 index 000000000000..f0c021fca73e --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/pioutil.py @@ -0,0 +1,8 @@ +# +# buildroot/share/PlatformIO/scripts/pioutil.py +# + +# Detect that 'vscode init' is running +def is_vscode_init(): + from SCons.Script import COMMAND_LINE_TARGETS + return "idedata" in COMMAND_LINE_TARGETS or "_idedata" in COMMAND_LINE_TARGETS diff --git a/buildroot/share/PlatformIO/scripts/preflight-checks.py b/buildroot/share/PlatformIO/scripts/preflight-checks.py new file mode 100644 index 000000000000..0dab3e4b1fbd --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/preflight-checks.py @@ -0,0 +1,101 @@ +# +# preflight-checks.py +# Check for common issues prior to compiling +# +import os,re,sys,pioutil +Import("env") + +# Detect that 'vscode init' is running +if pioutil.is_vscode_init(): + env.Exit(0) + +def get_envs_for_board(board): + with open(os.path.join("Marlin", "src", "pins", "pins.h"), "r") as file: + + if sys.platform == 'win32': + envregex = r"(?:env|win):" + elif sys.platform == 'darwin': + envregex = r"(?:env|mac|uni):" + elif sys.platform == 'linux': + envregex = r"(?:env|lin|uni):" + else: + envregex = r"(?:env):" + + r = re.compile(r"if\s+MB\((.+)\)") + if board.startswith("BOARD_"): + board = board[6:] + + for line in file: + mbs = r.findall(line) + if mbs and board in re.split(r",\s*", mbs[0]): + line = file.readline() + found_envs = re.match(r"\s*#include .+" + envregex, line) + if found_envs: + envlist = re.findall(envregex + r"(\w+)", line) + return [ "env:"+s for s in envlist ] + return [] + +def check_envs(build_env, board_envs, config): + if build_env in board_envs: + return True + ext = config.get(build_env, 'extends', default=None) + if ext: + if isinstance(ext, str): + return check_envs(ext, board_envs, config) + elif isinstance(ext, list): + for ext_env in ext: + if check_envs(ext_env, board_envs, config): + return True + return False + +def sanity_check_target(): + # Sanity checks: + if 'PIOENV' not in env: + raise SystemExit("Error: PIOENV is not defined. This script is intended to be used with PlatformIO") + + if 'MARLIN_FEATURES' not in env: + raise SystemExit("Error: this script should be used after common Marlin scripts") + + if 'MOTHERBOARD' not in env['MARLIN_FEATURES']: + raise SystemExit("Error: MOTHERBOARD is not defined in Configuration.h") + + build_env = env['PIOENV'] + motherboard = env['MARLIN_FEATURES']['MOTHERBOARD'] + board_envs = get_envs_for_board(motherboard) + config = env.GetProjectConfig() + result = check_envs("env:"+build_env, board_envs, config) + + if not result: + err = "Error: Build environment '%s' is incompatible with %s. Use one of these: %s" % \ + ( build_env, motherboard, ", ".join([ e[4:] for e in board_envs if e.startswith("env:") ]) ) + raise SystemExit(err) + + # + # Check for Config files in two common incorrect places + # + for p in [ env['PROJECT_DIR'], os.path.join(env['PROJECT_DIR'], "config") ]: + for f in [ "Configuration.h", "Configuration_adv.h" ]: + if os.path.isfile(os.path.join(p, f)): + err = "ERROR: Config files found in directory %s. Please move them into the Marlin subfolder." % p + raise SystemExit(err) + + # + # Give warnings on every build + # + warnfile = os.path.join(env['PROJECT_BUILD_DIR'], build_env, "src", "src", "inc", "Warnings.cpp.o") + if os.path.exists(warnfile): + os.remove(warnfile) + + # + # Check for old files indicating an entangled Marlin (mixing old and new code) + # + mixedin = [] + p = os.path.join(env['PROJECT_DIR'], "Marlin", "src", "lcd", "dogm") + for f in [ "ultralcd_DOGM.cpp", "ultralcd_DOGM.h" ]: + if os.path.isfile(os.path.join(p, f)): + mixedin += [ f ] + if mixedin: + err = "ERROR: Old files fell into your Marlin folder. Remove %s and try again" % ", ".join(mixedin) + raise SystemExit(err) + +sanity_check_target() diff --git a/buildroot/share/PlatformIO/scripts/random-bin.py b/buildroot/share/PlatformIO/scripts/random-bin.py index 4d7ca5dc09b7..c03b8634487a 100644 --- a/buildroot/share/PlatformIO/scripts/random-bin.py +++ b/buildroot/share/PlatformIO/scripts/random-bin.py @@ -1,3 +1,7 @@ +# +# random-bin.py +# Set a unique firmware name based on current date and time +# Import("env") from datetime import datetime diff --git a/buildroot/share/PlatformIO/scripts/robin.py b/buildroot/share/PlatformIO/scripts/robin.py new file mode 100644 index 000000000000..50d0d92d2ff7 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/robin.py @@ -0,0 +1,12 @@ +# +# buildroot/share/PlatformIO/scripts/robin.py +# +import marlin + +# Apply customizations for a MKS Robin +def prepare(address, ldname, fwname): + def encrypt(source, target, env): + marlin.encrypt_mks(source, target, env, fwname) + marlin.relocate_firmware(address) + marlin.custom_ld_script(ldname) + marlin.add_post_action(encrypt); diff --git a/buildroot/share/PlatformIO/scripts/simulator.py b/buildroot/share/PlatformIO/scripts/simulator.py new file mode 100644 index 000000000000..fb9d93ccebcc --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/simulator.py @@ -0,0 +1,52 @@ +# +# PlatformIO pre: script for simulator builds +# + +# Get the environment thus far for the build +Import("env") + +#print(env.Dump()) + +# +# Give the binary a distinctive name +# + +env['PROGNAME'] = "MarlinSimulator" + +# +# If Xcode is installed add the path to its Frameworks folder, +# or if Mesa is installed try to use its GL/gl.h. +# + +import sys +if sys.platform == 'darwin': + + # + # Silence half of the ranlib warnings. (No equivalent for 'ARFLAGS') + # + env['RANLIBFLAGS'] += [ "-no_warning_for_no_symbols" ] + + # Default paths for Xcode and a lucky GL/gl.h dropped by Mesa + xcode_path = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks" + mesa_path = "/opt/local/include/GL/gl.h" + + import os.path + + if os.path.exists(xcode_path): + + env['BUILD_FLAGS'] += [ "-F" + xcode_path ] + print("Using OpenGL framework headers from Xcode.app") + + elif os.path.exists(mesa_path): + + env['BUILD_FLAGS'] += [ '-D__MESA__' ] + print("Using OpenGL header from", mesa_path) + + else: + + print("\n\nNo OpenGL headers found. Install Xcode for matching headers, or use 'sudo port install mesa' to get a GL/gl.h.\n\n") + + # Break out of the PIO build immediately + sys.exit(1) + +env.AddCustomTarget("upload", "$BUILD_DIR/${PROGNAME}", "$BUILD_DIR/${PROGNAME}") diff --git a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py b/buildroot/share/PlatformIO/scripts/stm32_bootloader.py deleted file mode 100644 index 7f49ea0e66f4..000000000000 --- a/buildroot/share/PlatformIO/scripts/stm32_bootloader.py +++ /dev/null @@ -1,30 +0,0 @@ -import os,sys,shutil -Import("env") - -from SCons.Script import DefaultEnvironment -board = DefaultEnvironment().BoardConfig() - -def noencrypt(source, target, env): - firmware = os.path.join(target[0].dir.path, board.get("build.firmware")) - shutil.copy(target[0].path, firmware) - -if 'offset' in board.get("build").keys(): - LD_FLASH_OFFSET = board.get("build.offset") - - for define in env['CPPDEFINES']: - if define[0] == "VECT_TAB_OFFSET": - env['CPPDEFINES'].remove(define) - env['CPPDEFINES'].append(("VECT_TAB_OFFSET", LD_FLASH_OFFSET)) - - maximum_ram_size = board.get("upload.maximum_ram_size") - - for i, flag in enumerate(env["LINKFLAGS"]): - if "-Wl,--defsym=LD_FLASH_OFFSET" in flag: - env["LINKFLAGS"][i] = "-Wl,--defsym=LD_FLASH_OFFSET=" + LD_FLASH_OFFSET - if "-Wl,--defsym=LD_MAX_DATA_SIZE" in flag: - env["LINKFLAGS"][i] = "-Wl,--defsym=LD_MAX_DATA_SIZE=" + str(maximum_ram_size - 40) - -board_keys = board.get("build").keys() -# Only copy file if there's no encryptation -if 'firmware' in board_keys and not 'encrypt' in board_keys: - env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", noencrypt) diff --git a/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py b/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py new file mode 100644 index 000000000000..c3779289e0f3 --- /dev/null +++ b/buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py @@ -0,0 +1,59 @@ +# +# stm32_serialbuffer.py +# +Import("env") + +# Marlin uses the `RX_BUFFER_SIZE` \ `TX_BUFFER_SIZE` options to +# configure buffer sizes for receiving \ transmitting serial data. +# Stm32duino uses another set of defines for the same purpose, so this +# script gets the values from the configuration and uses them to define +# `SERIAL_RX_BUFFER_SIZE` and `SERIAL_TX_BUFFER_SIZE` as global build +# flags so they are available for use by the platform. +# +# The script will set the value as the default one (64 bytes) +# or the user-configured one, whichever is higher. +# +# Marlin's default buffer sizes are 128 for RX and 32 for TX. +# The highest value is taken (128/64). +# +# If MF_*_BUFFER_SIZE, SERIAL_*_BUFFER_SIZE, USART_*_BUF_SIZE, are +# defined, the first of these values will be used as the minimum. +build_flags = env.ParseFlags(env.get('BUILD_FLAGS'))["CPPDEFINES"] +mf = env["MARLIN_FEATURES"] + +# Get a build flag's value or None +def getBuildFlagValue(name): + for flag in build_flags: + if isinstance(flag, list) and flag[0] == name: + return flag[1] + + return None + +# Get an overriding buffer size for RX or TX from the build flags +def getInternalSize(side): + return getBuildFlagValue(f"MF_{side}_BUFFER_SIZE") or \ + getBuildFlagValue(f"SERIAL_{side}_BUFFER_SIZE") or \ + getBuildFlagValue(f"USART_{side}_BUF_SIZE") + +# Get the largest defined buffer size for RX or TX +def getBufferSize(side, default): + # Get a build flag value or fall back to the given default + internal = int(getInternalSize(side) or default) + flag = side + "_BUFFER_SIZE" + # Return the largest value + return max(int(mf[flag]), internal) if flag in mf else internal + +# Add a build flag if it's not already defined +def tryAddFlag(name, value): + if getBuildFlagValue(name) is None: + env.Append(BUILD_FLAGS=[f"-D{name}={value}"]) + +# Get the largest defined buffer sizes for RX or TX, using defaults for undefined +rxBuf = getBufferSize("RX", 128) +txBuf = getBufferSize("TX", 64) + +# Provide serial buffer sizes to the stm32duino platform +tryAddFlag("SERIAL_RX_BUFFER_SIZE", rxBuf) +tryAddFlag("SERIAL_TX_BUFFER_SIZE", txBuf) +tryAddFlag("USART_RX_BUF_SIZE", rxBuf) +tryAddFlag("USART_TX_BUF_SIZE", txBuf) diff --git a/buildroot/share/PlatformIO/variants/archim/.gitignore b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/.gitignore similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/.gitignore rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/.gitignore diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/Makefile b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/Makefile similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/Makefile rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/Makefile diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/debug.mk b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/debug.mk similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/debug.mk rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/debug.mk diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/gcc.mk b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/gcc.mk similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/gcc.mk rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/gcc.mk diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/libvariant_arduino_due_x.mk b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/libvariant_arduino_due_x.mk similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/libvariant_arduino_due_x.mk rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/libvariant_arduino_due_x.mk diff --git a/buildroot/share/PlatformIO/variants/archim/build_gcc/release.mk b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/release.mk similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/build_gcc/release.mk rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/build_gcc/release.mk diff --git a/buildroot/share/PlatformIO/variants/archim/debug_scripts/gcc/arduino_due_x_flash.gdb b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/gcc/arduino_due_x_flash.gdb similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/debug_scripts/gcc/arduino_due_x_flash.gdb rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/gcc/arduino_due_x_flash.gdb diff --git a/buildroot/share/PlatformIO/variants/archim/debug_scripts/gcc/arduino_due_x_sram.gdb b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/gcc/arduino_due_x_sram.gdb similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/debug_scripts/gcc/arduino_due_x_sram.gdb rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/gcc/arduino_due_x_sram.gdb diff --git a/buildroot/share/PlatformIO/variants/archim/debug_scripts/iar/arduino_due_flash.mac b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/iar/arduino_due_flash.mac similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/debug_scripts/iar/arduino_due_flash.mac rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/iar/arduino_due_flash.mac diff --git a/buildroot/share/PlatformIO/variants/archim/debug_scripts/iar/arduino_due_sram.mac b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/iar/arduino_due_sram.mac similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/debug_scripts/iar/arduino_due_sram.mac rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/debug_scripts/iar/arduino_due_sram.mac diff --git a/buildroot/share/PlatformIO/variants/archim/libsam_sam3x8e_gcc_rel.a b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/libsam_sam3x8e_gcc_rel.a similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/libsam_sam3x8e_gcc_rel.a rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/libsam_sam3x8e_gcc_rel.a diff --git a/buildroot/share/PlatformIO/variants/archim/libsam_sam3x8e_gcc_rel.a.txt b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/libsam_sam3x8e_gcc_rel.a.txt similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/libsam_sam3x8e_gcc_rel.a.txt rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/libsam_sam3x8e_gcc_rel.a.txt diff --git a/buildroot/share/PlatformIO/variants/archim/linker_scripts/gcc/flash.ld b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/gcc/flash.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/linker_scripts/gcc/flash.ld rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/gcc/flash.ld diff --git a/buildroot/share/PlatformIO/variants/archim/linker_scripts/gcc/sram.ld b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/gcc/sram.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/linker_scripts/gcc/sram.ld rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/gcc/sram.ld diff --git a/buildroot/share/PlatformIO/variants/archim/linker_scripts/iar/flash.icf b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/iar/flash.icf similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/linker_scripts/iar/flash.icf rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/iar/flash.icf diff --git a/buildroot/share/PlatformIO/variants/archim/linker_scripts/iar/sram.icf b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/iar/sram.icf similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/linker_scripts/iar/sram.icf rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/linker_scripts/iar/sram.icf diff --git a/buildroot/share/PlatformIO/variants/archim/pins_arduino.h b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/pins_arduino.h similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/pins_arduino.h rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/pins_arduino.h diff --git a/buildroot/share/PlatformIO/variants/archim/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/archim/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/archim/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_ARCHIM/variant.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/PeripheralPins.c similarity index 95% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/PeripheralPins.c index bee09b15b156..933b62ae9be2 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/PeripheralPins.c @@ -41,32 +41,32 @@ #ifdef HAL_ADC_MODULE_ENABLED const PinMap PinMap_ADC[] = { - {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 E0_DIR - {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 BLTOUCH_2 - {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 BLTOUCH_4 - {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 E1_EN - {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 TF_SS - {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 TF_SCLK - {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 TF_MISO - {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 LED - {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 HEATER2 - {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 HEATER0 - {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 Z_EN - {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 EXP_14 - {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 Z_DIR - {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 E0_EN - {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 EXP_8 - {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 EXP_7 + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 TEMP_1 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 TEMP_BED + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 TEMP_0 + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 EXP2-1 + {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 TF_SS SD_SS (CUSTOM_SPI_PINS) + {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 TF_SCLK SD_SCK + {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 TF_MISO SD_MISO + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 LED SD_MOSI + {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 BTN_EN2 + {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 BTN_ENC + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 --- + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 --- + {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 --- + {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 TEMP_PROBE + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 SD_DETECT + {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 BTN_EN1 - #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio, 24 ADC - {PF_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_IN9 TH_0 + #if STM32F4X_PIN_NUM >= 144 // 144 pins mcu, 114 gpio, 24 ADC + {PF_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_IN9 TH_0 {PF_4, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC3_IN14 TH_1 {PF_5, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC3_IN15 TH_2 - {PF_6, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_IN4 TH_3 - {PF_7, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_IN5 EXP_13 - {PF_8, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_IN6 EXP_3 - {PF_9, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC3_IN7 EXP_6 - {PF_10, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC3_IN8 EXP_5 + {PF_6, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_IN4 TH_3 + {PF_7, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_IN5 EXP_13 + {PF_8, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_IN6 EXP_3 + {PF_9, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC3_IN7 EXP_6 + {PF_10, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC3_IN8 EXP_5 #endif {NC, NP, 0} }; @@ -95,9 +95,7 @@ const PinMap PinMap_I2C_SDA[] = { #endif {NC, NP, 0} }; -#endif -#ifdef HAL_I2C_MODULE_ENABLED const PinMap PinMap_I2C_SCL[] = { {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, @@ -114,8 +112,8 @@ const PinMap PinMap_I2C_SCL[] = { #ifdef HAL_TIM_MODULE_ENABLED const PinMap PinMap_PWM[] = { - {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 BED - {PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 HEATER0 + {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 BED + {PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 HEATER0 {PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 FAN0 {PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 FAN1 diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h new file mode 100644 index 000000000000..ef621d57bf29 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/hal_conf_extra.h @@ -0,0 +1,52 @@ +#pragma once + +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#define HAL_GPIO_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED // by default +//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) + +//#define HAL_SD_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_FLASH_MODULE_ENABLED +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_IWDG_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/ldscript.ld similarity index 99% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/ldscript.ld index 0c060d175180..6af296a521ff 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h similarity index 98% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h index ecc319f47ce0..56574501002d 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_BTT002/variant.h @@ -244,7 +244,7 @@ extern "C" { #define PIN_WIRE_SCL PB6 // Timer Definitions -//Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c +// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c #define TIMER_TONE TIM7 #define TIMER_SERVO TIM5 #define TIMER_SERIAL TIM2 @@ -264,6 +264,11 @@ extern "C" { #define PIN_SERIAL_RX PA10 #define PIN_SERIAL_TX PA9 +// Serial Pins for the MMU2 +#define ENABLE_HWSERIAL4 +#define PIN_SERIAL4_RX PC11 +#define PIN_SERIAL4_TX PC10 + #ifdef __cplusplus } // extern "C" #endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PeripheralPins.c new file mode 100644 index 000000000000..9e42baf210bf --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PeripheralPins.c @@ -0,0 +1,363 @@ +/* + ******************************************************************************* + * Copyright (c) 2019, STMicroelectronics + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + * Automatically generated from STM32F407Z(E-G)Tx.xml + */ +#include +#include + +/* ===== + * Note: Commented lines are alternative possibilities which are not used by default. + * If you change them, you should know what you're doing first. + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 TH0 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 TB + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 IDEX TH1 + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 IDEX INA826 PT100 + {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 + {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 + {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 + {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 + {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 + {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 + {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 + + #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio, 24 ADC + {PF_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_IN9 + {PF_4, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC3_IN14 + {PF_5, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC3_IN15 + {PF_6, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_IN4 + {PF_7, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_IN5 + {PF_8, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_IN6 + {PF_9, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC3_IN7 + {PF_10, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC3_IN8 + #endif + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#ifdef HAL_DAC_MODULE_ENABLED +const PinMap PinMap_DAC[] = { + {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 + {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 + {NC, NP, 0} +}; +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +const PinMap PinMap_I2C_SDA[] = { + {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio + {PF_0, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + #endif + {NC, NP, 0} +}; +#endif + +#ifdef HAL_I2C_MODULE_ENABLED +const PinMap PinMap_I2C_SCL[] = { + {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio + {PF_1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + #endif + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +const PinMap PinMap_PWM[] = { + {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 HE0 + {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 BED + {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 FAN0 + {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 FAN1 + {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 IDEX FAN0 + {PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 IDEX FAN1 + + /** + * Unused by specifications on BTT E3 RRF. (PLEASE CONFIRM) + * Uncomment the corresponding line if you want to have HardwarePWM on some pins. + * WARNING: check timers' usage first to avoid conflicts. + * If you don't know what you're doing leave things as they are or you WILL break something (including hardware) + * If you alter this section DO NOT report bugs to Marlin team since they are most likely caused by you. Thank you. + */ + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)},// TIM13_CH1 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)},// TIM14_CH1 + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + //{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)},// TIM10_CH1 + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)},// TIM11_CH1 + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)},// TIM12_CH1 + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)},// TIM12_CH2 + //{PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + //{PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + //{PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 + //{PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 + //{PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + //{PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + //{PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio + //{PF_6, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PF_7, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + //{PF_8, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + //{PF_9, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + #endif + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +const PinMap PinMap_UART_TX[] = { + {PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio + {PG_14, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + #endif + {NC, NP, 0} +}; + +const PinMap PinMap_UART_RX[] = { + {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio + {PG_9, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + #endif + {NC, NP, 0} +}; + +const PinMap PinMap_UART_RTS[] = { + {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio + {PG_8, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {PG_12, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + #endif + {NC, NP, 0} +}; + +const PinMap PinMap_UART_CTS[] = { + {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + #if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio + {PG_13, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {PG_15, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + #endif + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, + {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; + +const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, + {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; + +const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, + {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; + +const PinMap PinMap_SPI_SSEL[] = { + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI1)}, + {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; +#endif + +//*** CAN *** + +#ifdef HAL_CAN_MODULE_ENABLED +#error "CAN bus isn't available on this board. Driver should be disabled." +#endif + +//*** ETHERNET *** +#ifdef HAL_ETH_MODULE_ENABLED +#error "Ethernet port isn't available on this board. Driver should be disabled." +#endif + +//*** No QUADSPI *** + +//*** USB *** +#ifdef HAL_PCD_MODULE_ENABLED +const PinMap PinMap_USB_OTG_FS[] = { + //{PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF + //{PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS + //{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID + {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM + {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP + {NC, NP, 0} +}; + +const PinMap PinMap_USB_OTG_HS[] = { /* + #ifdef USE_USB_HS_IN_FS + {PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID + {PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS + {PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM + {PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP + #else + #error "USB in HS mode isn't supported by the board" + {PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0 + {PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D1 + {PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D2 + {PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D7 + {PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D3 + {PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D5 + {PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D6 + {PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_STP + {PC_2, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR + {PC_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT + #endif // USE_USB_HS_IN_FS + */ + {NC, NP, 0} +}; + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { + // {PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4 + // {PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5 + // {PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6 + // {PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif +#endif diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h similarity index 89% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/hal_conf_extra.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h index e0e8239aac08..b4eb0f9b5f79 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/hal_conf_extra.h @@ -4,19 +4,20 @@ #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED Real Time Clock...do we use it? +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED #define HAL_USART_MODULE_ENABLED #define HAL_CORTEX_MODULE_ENABLED //#define HAL_UART_MODULE_ENABLED // by default //#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#define HAL_SD_MODULE_ENABLED -#undef HAL_SD_MODULE_ENABLED #undef HAL_DAC_MODULE_ENABLED #undef HAL_FLASH_MODULE_ENABLED #undef HAL_CAN_MODULE_ENABLED @@ -32,7 +33,6 @@ #undef HAL_SRAM_MODULE_ENABLED #undef HAL_SDRAM_MODULE_ENABLED #undef HAL_HASH_MODULE_ENABLED -#undef HAL_EXTI_MODULE_ENABLED #undef HAL_SMBUS_MODULE_ENABLED #undef HAL_I2S_MODULE_ENABLED #undef HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/ldscript.ld similarity index 99% rename from buildroot/share/PlatformIO/variants/BIGTREE_BTT002/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/ldscript.ld index 0c060d175180..6af296a521ff 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_BTT002/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h new file mode 100644 index 000000000000..646d635679f6 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_E3_RRF/variant.h @@ -0,0 +1,292 @@ +/* + ******************************************************************************* + * Copyright (c) 2017, STMicroelectronics + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + */ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#ifdef STM32F405RX + #define STM32F4X_PIN_NUM 64 //64 pins mcu, 51 gpio + #define STM32F4X_GPIO_NUM 51 + #define STM32F4X_ADC_NUM 16 +#elif defined(STM32F407_5VX) + #define STM32F4X_PIN_NUM 100 //100 pins mcu, 82 gpio + #define STM32F4X_GPIO_NUM 82 + #define STM32F4X_ADC_NUM 16 +#elif defined(STM32F407_5ZX) + #define STM32F4X_PIN_NUM 144 //144 pins mcu, 114 gpio + #define STM32F4X_GPIO_NUM 114 + #define STM32F4X_ADC_NUM 24 +#elif defined(STM32F407IX) + #define STM32F4X_PIN_NUM 176 //176 pins mcu, 140 gpio + #define STM32F4X_GPIO_NUM 140 + #define STM32F4X_ADC_NUM 24 +#else + #error "no match MCU defined" +#endif + +#if STM32F4X_PIN_NUM >= 64 //64 pins mcu, 51 gpio + #define PC13 0 + #define PC14 1 //OSC32_IN + #define PC15 2 //OSC32_OUT + #define PH0 3 //OSC_IN + #define PH1 4 //OSC_OUT + #define PB2 5 //BOOT1 + #define PB10 6 //1:SPI2_SCK / I2C2_SCL / USART3_TX / TIM2_CH3 + #define PB11 7 //1:I2C2_SDA / USART3_RX / TIM2_CH4 + #define PB12 8 //1:SPI2_NSS / OTG_HS_ID + #define PB13 9 //1:SPI2_SCK 2:OTG_HS_VBUS + #define PB14 10 //1:SPI2_MISO / TIM12_CH1 / OTG_HS_DM + #define PB15 11 //SPI2_MOSI / TIM12_CH2 / OTG_HS_DP + #define PC6 12 //1:TIM8_CH1 / SDIO_D6 / USART6_TX / TIM3_CH1 + #define PC7 13 //1:TIM8_CH2 / SDIO_D7 / USART6_RX / TIM3_CH2 + #define PC8 14 //1:TIM8_CH3 / SDIO_D0 / TIM3_CH3 + #define PC9 15 //1:TIM8_CH4 / SDIO_D1 / TIM3_CH4 + #define PA8 16 //1:TIM1_CH1 / I2C3_SCL / OTG_FS_SOF + #define PA9 17 //1:USART1_TX / TIM1_CH2 2:OTG_FS_VBUS + #define PA10 18 //1:USART1_RX / TIM1_CH3 / OTG_FS_ID + #define PA11 19 //1:TIM1_CH4 / OTG_FS_DM + #define PA12 20 //1:OTG_FS_DP + #define PA13 21 //0:JTMS-SWDIO + #define PA14 22 //0:JTCK-SWCLK + #define PA15 23 //0:JTDI 1:SPI3_NSS / SPI1_NSS + #define PC10 24 //1:UART4_TX / SPI3_SCK / SDIO_D2 / USART3_TX + #define PC11 25 //1:UART4_RX / SPI3_MISO / SDIO_D3 / USART3_RX + #define PC12 26 //1:UART5_TX / SPI3_MOSI / SDIO_CK + #define PD2 27 //1:UART5_RX / SDIO_CMD + #define PB3 28 //0:JTDO 1:SPI3_SCK / TIM2_CH2 / SPI1_SCK + #define PB4 29 //0:NJTRST 1:SPI3_MISO / TIM3_CH1 / SPI1_MISO + #define PB5 30 //1:TIM3_CH2 / SPI1_MOSI / SPI3_MOSI + #define PB6 31 //1:I2C1_SCL / TIM4_CH1 / USART1_TX + #define PB7 32 //1:I2C1_SDA / TIM4_CH2 / USART1_RX + #define PB8 33 //1:I2C1_SCL / TIM4_CH3 / SDIO_D4 / TIM10_CH1 + #define PB9 34 //1:I2C1_SDA / TIM4_CH4 / SDIO_D5 / TIM11_CH1 / SPI2_NSS + #define PA0 35 //1:UART4_TX / TIM5_CH1 2:ADC123_IN0 + #define PA1 36 //1:UART4_RX / TIM5_CH2 / TIM2_CH2 2:ADC123_IN1 + #define PA2 37 //1:USART2_TX /TIM5_CH3 / TIM9_CH1 / TIM2_CH3 2:ADC123_IN2 + #define PA3 38 //1:USART2_RX /TIM5_CH4 / TIM9_CH2 / TIM2_CH4 2:ADC123_IN3 + #define PA4 39 //NOT FT 1:SPI1_NSS / SPI3_NSS / USART2_CK 2:ADC12_IN4 / DAC_OUT1 + #define PA5 40 //NOT FT 1:SPI1_SCK 2:ADC12_IN5 / DAC_OUT2 + #define PA6 41 //1:SPI1_MISO / TIM13_CH1 / TIM3_CH1 2:ADC12_IN6 + #define PA7 42 //1:SPI1_MOSI / TIM14_CH1 / TIM3_CH2 2:ADC12_IN7 + #define PB0 43 //1:TIM3_CH3 2:ADC12_IN8 + #define PB1 44 //1:TIM3_CH4 2:ADC12_IN9 + #define PC0 45 //1: 2:ADC123_IN10 + #define PC1 46 //1: 2:ADC123_IN11 + #define PC2 47 //1:SPI2_MISO 2:ADC123_IN12 + #define PC3 48 //1:SPI2_MOSI 2:ADC123_IN13 + #define PC4 49 //1: 2:ADC12_IN14 + #define PC5 50 //1: 2:ADC12_IN15 + #if STM32F4X_PIN_NUM >= 144 + #define PF3 51 //1:FSMC_A3 2:ADC3_IN9 + #define PF4 52 //1:FSMC_A4 2:ADC3_IN14 + #define PF5 53 //1:FSMC_A5 2:ADC3_IN15 + #define PF6 54 //1:TIM10_CH1 2:ADC3_IN4 + #define PF7 55 //1:TIM11_CH1 2:ADC3_IN5 + #define PF8 56 //1:TIM13_CH1 2:ADC3_IN6 + #define PF9 57 //1;TIM14_CH1 2:ADC3_IN7 + #define PF10 58 //2:ADC3_IN8 + #endif +#endif +#if STM32F4X_PIN_NUM >= 100 //100 pins mcu, 82 gpio + #define PE2 (35+STM32F4X_ADC_NUM) //1:FSMC_A23 + #define PE3 (36+STM32F4X_ADC_NUM) //1:FSMC_A19 + #define PE4 (37+STM32F4X_ADC_NUM) //1:FSMC_A20 + #define PE5 (38+STM32F4X_ADC_NUM) //1:FSMC_A21 + #define PE6 (39+STM32F4X_ADC_NUM) //1:FSMC_A22 + #define PE7 (40+STM32F4X_ADC_NUM) //1:FSMC_D4 + #define PE8 (41+STM32F4X_ADC_NUM) //1:FSMC_D5 + #define PE9 (42+STM32F4X_ADC_NUM) //1:FSMC_D6 / TIM1_CH1 + #define PE10 (43+STM32F4X_ADC_NUM) //1:FSMC_D7 + #define PE11 (44+STM32F4X_ADC_NUM) //1:FSMC_D8 / TIM1_CH2 + #define PE12 (45+STM32F4X_ADC_NUM) //1:FSMC_D9 + #define PE13 (46+STM32F4X_ADC_NUM) //1:FSMC_D10 / TIM1_CH3 + #define PE14 (47+STM32F4X_ADC_NUM) //1:FSMC_D11 / TIM1_CH4 + #define PE15 (48+STM32F4X_ADC_NUM) //1:FSMC_D12 + #define PD8 (49+STM32F4X_ADC_NUM) //1:FSMC_D13 / USART3_TX + #define PD9 (50+STM32F4X_ADC_NUM) //1:FSMC_D14 / USART3_RX + #define PD10 (51+STM32F4X_ADC_NUM) //1:FSMC_D15 + #define PD11 (52+STM32F4X_ADC_NUM) //1:FSMC_A16 + #define PD12 (53+STM32F4X_ADC_NUM) //1:FSMC_A17 / TIM4_CH1 + #define PD13 (54+STM32F4X_ADC_NUM) //1:FSMC_A18 / TIM4_CH2 + #define PD14 (55+STM32F4X_ADC_NUM) //1:FSMC_D0 / TIM4_CH3 + #define PD15 (56+STM32F4X_ADC_NUM) //1:FSMC_D1 / TIM4_CH4 + #define PD0 (57+STM32F4X_ADC_NUM) //1:FSMC_D2 + #define PD1 (58+STM32F4X_ADC_NUM) //1:FSMC_D3 + #define PD3 (59+STM32F4X_ADC_NUM) //1:FSMC_CLK + #define PD4 (60+STM32F4X_ADC_NUM) //1:FSMC_NOE + #define PD5 (61+STM32F4X_ADC_NUM) //1:USART2_TX + #define PD6 (62+STM32F4X_ADC_NUM) //1:USART2_RX + #define PD7 (63+STM32F4X_ADC_NUM) + #define PE0 (64+STM32F4X_ADC_NUM) + #define PE1 (65+STM32F4X_ADC_NUM) +#endif +#if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio + #define PF0 (66+STM32F4X_ADC_NUM) //1:FSMC_A0 / I2C2_SDA + #define PF1 (67+STM32F4X_ADC_NUM) //1:FSMC_A1 / I2C2_SCL + #define PF2 (68+STM32F4X_ADC_NUM) //1:FSMC_A2 + #define PF11 (69+STM32F4X_ADC_NUM) + #define PF12 (70+STM32F4X_ADC_NUM) //1:FSMC_A6 + #define PF13 (71+STM32F4X_ADC_NUM) //1:FSMC_A7 + #define PF14 (72+STM32F4X_ADC_NUM) //1:FSMC_A8 + #define PF15 (73+STM32F4X_ADC_NUM) //1:FSMC_A9 + #define PG0 (74+STM32F4X_ADC_NUM) //1:FSMC_A10 + #define PG1 (75+STM32F4X_ADC_NUM) //1:FSMC_A11 + #define PG2 (76+STM32F4X_ADC_NUM) //1:FSMC_A12 + #define PG3 (77+STM32F4X_ADC_NUM) //1:FSMC_A13 + #define PG4 (78+STM32F4X_ADC_NUM) //1:FSMC_A14 + #define PG5 (79+STM32F4X_ADC_NUM) //1:FSMC_A15 + #define PG6 (80+STM32F4X_ADC_NUM) + #define PG7 (81+STM32F4X_ADC_NUM) + #define PG8 (82+STM32F4X_ADC_NUM) + #define PG9 (83+STM32F4X_ADC_NUM) //1:USART6_RX + #define PG10 (84+STM32F4X_ADC_NUM) //1:FSMC_NE3 + #define PG11 (85+STM32F4X_ADC_NUM) + #define PG12 (86+STM32F4X_ADC_NUM) //1:FSMC_NE4 + #define PG13 (87+STM32F4X_ADC_NUM) //1:FSMC_A24 + #define PG14 (88+STM32F4X_ADC_NUM) //1:FSMC_A25 / USART6_TX + #define PG15 (89+STM32F4X_ADC_NUM) +#endif +#if STM32F4X_PIN_NUM >= 176 //176 pins mcu, 140 gpio + #define PI8 (90+STM32F4X_ADC_NUM) + #define PI9 (91+STM32F4X_ADC_NUM) + #define PI10 (92+STM32F4X_ADC_NUM) + #define PI11 (93+STM32F4X_ADC_NUM) + #define PH2 (94+STM32F4X_ADC_NUM) + #define PH3 (95+STM32F4X_ADC_NUM) + #define PH4 (96+STM32F4X_ADC_NUM) //1:I2C2_SCL + #define PH5 (97+STM32F4X_ADC_NUM) //1:I2C2_SDA + #define PH6 (98+STM32F4X_ADC_NUM) //1:TIM12_CH1 + #define PH7 (99+STM32F4X_ADC_NUM) //1:I2C3_SCL + #define PH8 (100+STM32F4X_ADC_NUM) //1:I2C3_SDA + #define PH9 (101+STM32F4X_ADC_NUM) //1:TIM12_CH2 + #define PH10 (102+STM32F4X_ADC_NUM) //1:TIM5_CH1 + #define PH11 (103+STM32F4X_ADC_NUM) //1:TIM5_CH2 + #define PH12 (104+STM32F4X_ADC_NUM) //1:TIM5_CH3 + #define PH13 (105+STM32F4X_ADC_NUM) + #define PH14 (106+STM32F4X_ADC_NUM) + #define PH15 (107+STM32F4X_ADC_NUM) + #define PI0 (108+STM32F4X_ADC_NUM) //1:TIM5_CH4 / SPI2_NSS + #define PI1 (109+STM32F4X_ADC_NUM) //1:SPI2_SCK + #define PI2 (110+STM32F4X_ADC_NUM) //1:TIM8_CH4 /SPI2_MISO + #define PI3 (111+STM32F4X_ADC_NUM) //1:SPI2_MOS + #define PI4 (112+STM32F4X_ADC_NUM) + #define PI5 (113+STM32F4X_ADC_NUM) //1:TIM8_CH1 + #define PI6 (114+STM32F4X_ADC_NUM) //1:TIM8_CH2 + #define PI7 (115+STM32F4X_ADC_NUM) //1:TIM8_CH3 +#endif + +// This must be a literal +#define NUM_DIGITAL_PINS (STM32F4X_GPIO_NUM) +// This must be a literal with a value less than or equal to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS (STM32F4X_ADC_NUM) +#define NUM_ANALOG_FIRST 35 + +// Below ADC, DAC and PWM definitions already done in the core +// Could be redefined here if needed +// ADC resolution is 12bits +//#define ADC_RESOLUTION 12 +//#define DACC_RESOLUTION 12 + +// PWM resolution +/* + * BEWARE: + * Changing this value from the default (1000) will affect the PWM output value of analogWrite (to a PWM pin) + * Since the pin is toggled on capture, if you change the frequency of the timer you have to adapt the compare value (analogWrite thinks you did) + */ +//#define PWM_FREQUENCY 20000 +//The bottom values are the default and don't need to be redefined +//#define PWM_RESOLUTION 8 +//#define PWM_MAX_DUTY_CYCLE 255 + +// Below SPI and I2C definitions already done in the core +// Could be redefined here if differs from the default one +// SPI Definitions +#define PIN_SPI_MOSI PA7 +#define PIN_SPI_MISO PA6 +#define PIN_SPI_SCK PA5 +#define PIN_SPI_SS PA4 + +// I2C Definitions +#define PIN_WIRE_SDA PB9 +#define PIN_WIRE_SCL PB8 + +// Timer Definitions +// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c +#define TIMER_TONE TIM7 +#define TIMER_SERVO TIM5 +#define TIMER_SERIAL TIM8 + +// UART Definitions +// Define here Serial instance number to map on Serial generic name +#define SERIAL_UART_INSTANCE 1 //ex: 2 for Serial2 (USART2) +// DEBUG_UART could be redefined to print on another instance than 'Serial' +//#define DEBUG_UART ((USART_TypeDef *) U(S)ARTX) // ex: USART3 +// DEBUG_UART baudrate, default: 9600 if not defined +//#define DEBUG_UART_BAUDRATE x +// DEBUG_UART Tx pin name, default: the first one found in PinMap_UART_TX for DEBUG_UART +//#define DEBUG_PINNAME_TX PX_n // PinName used for TX + +// Default pin used for 'Serial' instance (ex: ST-Link) +// Mandatory for Firmata +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_HARDWARE Serial1 +#endif diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/PeripheralPins.c similarity index 93% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/PeripheralPins.c index db0a439562a6..48e05e45ad0c 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/PeripheralPins.c @@ -48,7 +48,7 @@ const PinMap PinMap_ADC[] = { {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 TF_SS {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 TF_SCLK {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 TF_MISO - {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 LED + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 LED (MOSI) {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 HEATER2 {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 HEATER0 {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 Z_EN @@ -100,9 +100,7 @@ const PinMap PinMap_I2C_SDA[] = { #endif {NC, NP, 0} }; -#endif -#ifdef HAL_I2C_MODULE_ENABLED const PinMap PinMap_I2C_SCL[] = { {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, @@ -154,7 +152,6 @@ const PinMap PinMap_PWM[] = { {PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 FAN6 {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 FAN7 - // Alternate timer assignments for pins commonly using PWM //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N HEATER0 //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N HEATER0 @@ -179,55 +176,55 @@ const PinMap PinMap_PWM[] = { * WARNING: check timers' usage first to avoid conflicts. * If you don't know what you're doing leave things as they are or you WILL break something (including hardware) */ - //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 - //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 - //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 - //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N - //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 - //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 - //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 - //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 - //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 - //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 - //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - //{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - //{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - //{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 - //{PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 - //{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + //{PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + //{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 - //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 - //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 - //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 - //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 - //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 - //{PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 - //{PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 - //{PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - //{PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - //{PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + //{PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + //{PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N //{PF_6, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 //{PF_7, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 //{PF_8, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 //{PF_9, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 - //{PH_10, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PH_10, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 //{PH_6, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 - //{PH_11, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PH_11, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 {NC, NP, 0} }; #endif diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h new file mode 100644 index 000000000000..ef621d57bf29 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/hal_conf_extra.h @@ -0,0 +1,52 @@ +#pragma once + +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#define HAL_GPIO_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED // by default +//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) + +//#define HAL_SD_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_FLASH_MODULE_ENABLED +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_IWDG_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/ldscript.ld similarity index 99% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/ldscript.ld index 0c060d175180..6af296a521ff 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h similarity index 98% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h index 2da195c6cff0..41e46411022c 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_GTR_V1/variant.h @@ -254,7 +254,7 @@ extern "C" { #endif // Timer Definitions -//Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c +// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c #define TIMER_TONE TIM10 #define TIMER_SERVO TIM5 #define TIMER_SERIAL TIM7 @@ -280,7 +280,7 @@ extern "C" { #define PIN_SERIAL_TX PA9 // Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number -// Used when user instanciate a hardware Serial using its peripheral name. +// Used when user instantiate a hardware Serial using its peripheral name. // Example: HardwareSerial mySerial(USART3); // will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined. #define PIN_SERIAL1_RX PA10 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PeripheralPins.c new file mode 100644 index 000000000000..d0905853a9a9 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PeripheralPins.c @@ -0,0 +1,433 @@ +/* + ******************************************************************************* + * Copyright (c) 2016, STMicroelectronics + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +// ===== +// Note: Commented lines are alternative possibilities which are not used per default. +// If you change them, you will have to know what you do +// ===== + + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +const PinMap PinMap_ADC[] = { + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 + {PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 + {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 + {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 + {PF_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_IN9 TH_0 + {PF_4, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC3_IN14 TH_1 + {PF_5, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC3_IN15 TH_2 + {PF_6, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_IN4 TH_3 + {PF_7, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_IN5 EXP_13 + {PF_8, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_IN6 PT100 + {NC, NP, 0} + + // {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 + // {PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 + // {PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 + // {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 + // {PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 + // {PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + // {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 + // {PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 + // {PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 + // {PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 + // {PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 + //{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 + // {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 + // {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + // {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + // {PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 + // {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 + // {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + // {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 + // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 + // {PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + // {PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 + // {PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 + // {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 + // {PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 + // {PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 + // {PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 + // {PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 + // {PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 + // {PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 + // {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 + // {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + +}; +#endif + +//*** DAC *** + +#ifdef HAL_DAC_MODULE_ENABLED +const PinMap PinMap_DAC[] = { + // {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 + // {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 - LD2 + {NC, NP, 0} +}; +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +const PinMap PinMap_I2C_SDA[] = { + // {PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + // {PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + // {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + // {PC_7, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, + // {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + // {PC_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_I2C_MODULE_ENABLED +const PinMap PinMap_I2C_SCL[] = { + // {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + // {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + // {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + // {PC_6, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +const PinMap PinMap_PWM[] = { + {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 BED + {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 HEATER0 + {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 HEATER1 + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 HEATER2 + {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 HEATER3 + {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 FAN0 + {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 FAN1 + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 FAN2 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 FAN3 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 FAN4 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 FAN5 + + /** + * Unused by specifications on Octopus. + * Uncomment the corresponding line if you want to have HardwarePWM on some pins. + * WARNING: check timers' usage first to avoid conflicts. + * If you don't know what you're doing leave things as they are or you WILL break something (including hardware) + * If you alter this section DO NOT report bugs to Marlin team since they are most likely caused by you. Thank you. + */ + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 BLTOUCH is a "servo" + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 BLTOUCH is a "servo" + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + //{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + //{PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + //{PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + //{PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + //144 pins mcu, 114 gpio + //{PF_6, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PF_7, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + //{PF_8, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + //{PF_9, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + + //176 pins mcu, 140 gpio + //{PH_10, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PH_6, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 + //{PH_11, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PI_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + //{PI_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +const PinMap PinMap_UART_TX[] = { + // {PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + // {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + // {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + // {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +const PinMap PinMap_UART_RX[] = { + // {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + // {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + // {PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + // {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +const PinMap PinMap_UART_RTS[] = { + // {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + // {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + // {PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + // {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +const PinMap PinMap_UART_CTS[] = { + // {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + // {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + // {PB_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + // {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_9, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_0, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + // {PB_2, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + // {PC_1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)}, + // {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_7, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +const PinMap PinMap_SPI_SSEL[] = { + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PB_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + // {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {NC, NP, 0} +}; +#endif + +//*** CAN *** + +#ifdef HAL_CAN_MODULE_ENABLED +const PinMap PinMap_CAN_RD[] = { + // {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + // {PB_5, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + // {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + // {PB_12, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_CAN_MODULE_ENABLED +const PinMap PinMap_CAN_TD[] = { + // {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + // {PB_6, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + // {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + // {PB_13, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + {NC, NP, 0} +}; +#endif + +//*** ETHERNET *** + +//*** No Ethernet *** + +//*** QUADSPI *** + +#ifdef HAL_QSPI_MODULE_ENABLED +const PinMap PinMap_QUADSPI[] = { + // {PA_1, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO3 + // {PB_2, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_CLK + // {PB_6, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK1_NCS + // {PC_9, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO0 + // {PC_10, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO1 + // {PC_11, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK2_NCS + {NC, NP, 0} +}; +#endif + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +const PinMap PinMap_USB_OTG_FS[] = { + // {PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF + // {PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)}, // USB_OTG_FS_VBUS + // {PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID + {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM + {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP + {NC, NP, 0} +}; + +const PinMap PinMap_USB_OTG_HS[] = { + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS + {PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM + {PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP + + /*#error "USB in HS mode isn't supported by the board" + {PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0 + {PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D1 + {PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D2 + {PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D7 + {PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D3 + {PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D5 + {PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D6 + {PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_STP + {PC_2, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR + {PC_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT + */ + {NC, NP, 0} +}; + + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { + // {PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4 + // {PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5 + // {PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6 + // {PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PinNamesVar.h new file mode 100644 index 000000000000..bff3f2134987 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/PinNamesVar.h @@ -0,0 +1,30 @@ +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, /* SYS_WKUP0 */ +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + USB_OTG_FS_DM = PA_11, + USB_OTG_FS_DP = PA_12, +#endif diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/hal_conf_extra.h similarity index 87% rename from buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/hal_conf_extra.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/hal_conf_extra.h index f7f9e23e99e7..d62c510095c9 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_GTR_V1/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/hal_conf_extra.h @@ -4,19 +4,21 @@ #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED Real Time Clock...do we use it? +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED #define HAL_USART_MODULE_ENABLED #define HAL_CORTEX_MODULE_ENABLED //#define HAL_UART_MODULE_ENABLED // by default //#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#define HAL_SD_MODULE_ENABLED -#undef HAL_SD_MODULE_ENABLED +//#undef HAL_SD_MODULE_ENABLED #undef HAL_DAC_MODULE_ENABLED #undef HAL_FLASH_MODULE_ENABLED #undef HAL_CAN_MODULE_ENABLED @@ -32,7 +34,6 @@ #undef HAL_SRAM_MODULE_ENABLED #undef HAL_SDRAM_MODULE_ENABLED #undef HAL_HASH_MODULE_ENABLED -#undef HAL_EXTI_MODULE_ENABLED #undef HAL_SMBUS_MODULE_ENABLED #undef HAL_I2S_MODULE_ENABLED #undef HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/ldscript.ld new file mode 100644 index 000000000000..4cac4ac6e2a7 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/ldscript.ld @@ -0,0 +1,209 @@ +/* +***************************************************************************** +** + +** File : LinkerScript.ld +** +** Abstract : Linker script for STM32F429VGTx Device with +** 2048KByte FLASH, 192KByte RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2014 Ac6

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of Ac6 nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K +MEMORY_ARRAY (rw) : ORIGIN = 0x10000000, LENGTH = 0x144 +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text ALIGN(4): + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata ALIGN(4) : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + + _siccmram = LOADADDR(.ccmram); + + /* CCM-RAM section + * + * IMPORTANT NOTE! + * If initialized variables will be placed in this section, + * the startup code needs to be modified to copy the init-values. + */ + .ccmram : + { + . = ALIGN(4); + _sccmram = .; /* create a global symbol at ccmram start */ + *(.ccmram) + *(.ccmram*) + + . = ALIGN(4); + _eccmram = .; /* create a global symbol at ccmram end */ + } >CCMRAM AT> FLASH + + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } + ExtRAMData : {*(.ExtRAMData)} >MEMORY_ARRAY +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.cpp new file mode 100644 index 000000000000..c8ed0d1e52ec --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.cpp @@ -0,0 +1,233 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Pin number +const PinName digitalPin[] = { + PA_0, //D0 + PA_1, //D1 + PA_2, //D2 + PA_3, //D3 + PA_4, //D4 + PA_5, //D5 + PA_6, //D6 + PA_7, //D7 + PA_8, //D8 + PA_9, //D9 + PA_10, //D10 + PA_11, //D11 + PA_12, //D12 + PA_13, //D13 + PA_14, //D14 + PA_15, //D15 + PB_0, //D16 + PB_1, //D17 + PB_2, //D18 + PB_3, //D19 + PB_4, //D20 + PB_5, //D21 + PB_6, //D22 + PB_7, //D23 + PB_8, //D24 + PB_9, //D25 + PB_10, //D26 + PB_11, //D27 + PB_12, //D28 + PB_13, //D29 + PB_14, //D30 + PB_15, //D31 + PC_0, //D32 + PC_1, //D33 + PC_2, //D34 + PC_3, //D35 + PC_4, //D36 + PC_5, //D37 + PC_6, //D38 + PC_7, //D39 + PC_8, //D40 + PC_9, //D41 + PC_10, //D42 + PC_11, //D43 + PC_12, //D44 + PC_13, //D45 + PC_14, //D46 + PC_15, //D47 + PD_0, //D48 + PD_1, //D49 + PD_2, //D50 + PD_3, //D51 + PD_4, //D52 + PD_5, //D53 + PD_6, //D54 + PD_7, //D55 + PD_8, //D56 + PD_9, //D57 + PD_10, //D58 + PD_11, //D59 + PD_12, //D60 + PD_13, //D61 + PD_14, //D62 + PD_15, //D63 + PE_0, //D64 + PE_1, //D65 + PE_2, //D66 + PE_3, //D67 + PE_4, //D68 + PE_5, //D69 + PE_6, //D70 + PE_7, //D71 + PE_8, //D72 + PE_9, //D73 + PE_10, //D74 + PE_11, //D75 + PE_12, //D76 + PE_13, //D77 + PE_14, //D78 + PE_15, //D79 + PF_0, //D80 + PF_1, //D81 + PF_2, //D82 + PF_3, //D83 + PF_4, //D84 + PF_5, //D85 + PF_6, //D86 + PF_7, //D87 + PF_8, //D88 + PF_9, //D89 + PF_10, //D90 + PF_11, //D91 + PF_12, //D92 + PF_13, //D93 + PF_14, //D94 + PF_15, //D95 + PG_0, //D96 + PG_1, //D97 + PG_2, //D98 + PG_3, //D99 + PG_4, //D100 + PG_5, //D101 + PG_6, //D102 + PG_7, //D103 + PG_8, //D104 + PG_9, //D105 + PG_10, //D106 + PG_11, //D107 + PG_12, //D108 + PG_13, //D109 + PG_14, //D110 + PG_15, //D111 + + //Duplicated ADC Pins + PA_3, //D112/A0 + PA_4, //D113/A1 + PC_0, //D114/A2 + PC_1, //D115/A3 + PC_2, //D116/A4 + PC_3, //D117/A5 + PC_4, //D118/A6 + PF_3, //D119/A16 - 1:FSMC_A3 2:ADC3_IN9 + PF_4, //D120/A17 - 1:FSMC_A4 2:ADC3_IN14 + PF_5, //D121/A18 - 1:FSMC_A5 2:ADC3_IN15 + PF_6, //D122/A19 - 1:TIM10_CH1 2:ADC3_IN4 + PF_7, //D123/A20 - 1:TIM11_CH1 2:ADC3_IN5 + PF_8, //D124/A20 - 1:TIM11_CH1 2:ADC3_IN6 +}; + +#ifdef __cplusplus +} +#endif + +// ---------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief System Clock Configuration + * The system Clock is configured as follow : + * System Clock source = PLL (HSE) + * SYSCLK(Hz) = 168000000 + * HCLK(Hz) = 168000000 + * AHB Prescaler = 1 + * APB1 Prescaler = 4 + * APB2 Prescaler = 2 + * HSE Frequency(Hz) = 8000000 + * PLL_M = 8 + * PLL_N = 336 + * PLL_P = 2 + * PLL_Q = 7 + * VDD(V) = 3.3 + * Main regulator output voltage = Scale1 mode + * Flash Latency(WS) = 5 + * @param None + * @retval None + */ +WEAK void SystemClock_Config(void) +{ + RCC_ClkInitTypeDef RCC_ClkInitStruct; + RCC_OscInitTypeDef RCC_OscInitStruct; + + /* Enable Power Control clock */ + __HAL_RCC_PWR_CLK_ENABLE(); + + /* The voltage scaling allows optimizing the power consumption when the device is + clocked below the maximum system frequency, to update the voltage scaling value + regarding system frequency refer to product datasheet. */ + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); + + /* Enable HSE Oscillator and activate PLL with HSE as source */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = 8; + RCC_OscInitStruct.PLL.PLLN = 336; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + RCC_OscInitStruct.PLL.PLLQ = 7; + if(HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + { + /* Initialization Error */ + } + + if(HAL_PWREx_EnableOverDrive() != HAL_OK) + { + /* Initialization Error */ + } + + /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 + clocks dividers */ + RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; + if(HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) + { + /* Initialization Error */ + } +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h new file mode 100644 index 000000000000..0147ece0ab20 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_PRO_V1_F429/variant.h @@ -0,0 +1,216 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#define PA0 0 //D0 +#define PA1 1 //D1 +#define PA2 2 //D2 +#define PA3 3 //D3 +#define PA4 4 //D4 +#define PA5 5 //D5 +#define PA6 6 //D6 +#define PA7 7 //D7 +#define PA8 8 //D8 +#define PA9 9 //D9 +#define PA10 10 //D10 +#define PA11 11 //D11 +#define PA12 12 //D12 +#define PA13 13 //D13 +#define PA14 14 //D14 +#define PA15 15 //D15 +#define PB0 16 //D16 +#define PB1 17 //D17 +#define PB2 18 //D18 +#define PB3 19 //D19 +#define PB4 20 //D20 +#define PB5 21 //D21 +#define PB6 22 //D22 +#define PB7 23 //D23 +#define PB8 24 //D24 +#define PB9 25 //D25 +#define PB10 26 //D26 +#define PB11 27 //D27 +#define PB12 28 //D28 +#define PB13 29 //D29 +#define PB14 30 //D30 +#define PB15 31 //D31 +#define PC0 32 //D32 +#define PC1 33 //D33 +#define PC2 34 //D34 +#define PC3 35 //D35 +#define PC4 36 //D36 +#define PC5 37 //D37 +#define PC6 38 //D38 +#define PC7 39 //D39 +#define PC8 40 //D40 +#define PC9 41 //D41 +#define PC10 42 //D42 +#define PC11 43 //D43 +#define PC12 44 //D44 +#define PC13 45 //D45 +#define PC14 46 //D46 +#define PC15 47 //D47 +#define PD0 48 //D48 +#define PD1 49 //D49 +#define PD2 50 //D50 +#define PD3 51 //D51 +#define PD4 52 //D52 +#define PD5 53 //D53 +#define PD6 54 //D54 +#define PD7 55 //D55 +#define PD8 56 //D56 +#define PD9 57 //D57 +#define PD10 58 //D58 +#define PD11 59 //D59 +#define PD12 60 //D60 +#define PD13 61 //D61 +#define PD14 62 //D62 +#define PD15 63 //D63 +#define PE0 64 //D64 +#define PE1 65 //D65 +#define PE2 66 //D66 +#define PE3 67 //D67 +#define PE4 68 //D68 +#define PE5 69 //D69 +#define PE6 70 //D70 +#define PE7 71 //D71 +#define PE8 72 //D72 +#define PE9 73 //D73 +#define PE10 74 //D74 +#define PE11 75 //D75 +#define PE12 76 //D76 +#define PE13 77 //D77 +#define PE14 78 //D78 +#define PE15 79 //D79 +#define PF0 80 //D64 +#define PF1 81 //D65 +#define PF2 82 //D66 +#define PF3 83 //D67 +#define PF4 84 //D68 +#define PF5 85 //D69 +#define PF6 86 //D70 +#define PF7 87 //D71 +#define PF8 88 //D72 +#define PF9 89 //D73 +#define PF10 90 //D74 +#define PF11 91 //D75 +#define PF12 92 //D76 +#define PF13 93 //D77 +#define PF14 94 //D78 +#define PF15 95 //D79 +#define PG0 96 //D64 +#define PG1 97 //D65 +#define PG2 98 //D66 +#define PG3 99 //D67 +#define PG4 100 //D68 +#define PG5 101 //D69 +#define PG6 102 //D70 +#define PG7 103 //D71 +#define PG8 104 //D72 +#define PG9 105 //D73 +#define PG10 106 //D74 +#define PG11 107 //D75 +#define PG12 108 //D76 +#define PG13 109 //D77 +#define PG14 110 //D78 +#define PG15 111 //D79 + +// This must be a literal with the same value as PEND +#define NUM_DIGITAL_PINS 125 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 13 +#define NUM_ANALOG_FIRST 112 + +//#define ADC_RESOLUTION 12 + +// PWM resolution +//#define PWM_RESOLUTION 12 +#define PWM_FREQUENCY 1000 // >= 20 Khz => inaudible noise for fans +#define PWM_MAX_DUTY_CYCLE 255 + +// SPI Definitions +#define PIN_SPI_SS PA4 +#define PIN_SPI_MOSI PA7 +#define PIN_SPI_MISO PA6 +#define PIN_SPI_SCK PA5 + +// I2C Definitions +#define PIN_WIRE_SDA PB9 +#define PIN_WIRE_SCL PB8 + +// Timer Definitions +// Do not use timer used by PWM pin. See PinMap_PWM. +#define TIMER_TONE TIM6 +#define TIMER_SERVO TIM5 +#define TIMER_SERIAL TIM7 + +// UART Definitions +//#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header +/* Enable Serial 3 */ +#define HAVE_HWSERIAL1 +#define HAVE_HWSERIAL3 + +// Default pin used for 'Serial' instance (ex: ST-Link) +// Mandatory for Firmata +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 + +/* HAL configuration */ +#define HSE_VALUE 8000000U + +#define FLASH_PAGE_SIZE (4U * 1024U) + +#ifdef __cplusplus +} // extern "C" +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_HARDWARE_OPEN Serial +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c new file mode 100644 index 000000000000..9df61baf9b1d --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PeripheralPins.c @@ -0,0 +1,435 @@ +/* + ******************************************************************************* + * Copyright (c) 2016, STMicroelectronics + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +// ===== +// Note: Commented lines are alternative possibilities which are not used per default. +// If you change them, you will have to know what you do +// ===== + + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +const PinMap PinMap_ADC[] = { + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 + {PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 + {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 + {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 + {PF_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_IN9 TH_0 + {PF_4, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC3_IN14 TH_1 + {PF_5, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC3_IN15 TH_2 + {PF_6, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_IN4 TH_3 + {PF_7, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_IN5 EXP_13 + {PF_8, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_IN6 PT100 + {NC, NP, 0} + + // {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 + // {PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 + // {PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 + // {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 + // {PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 + // {PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + // {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 + // {PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 + // {PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 + // {PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 + // {PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 + //{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 + // {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 + // {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + // {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + // {PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 + // {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 + // {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + // {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 + // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 + // {PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + // {PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 + // {PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 + // {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 + // {PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 + // {PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 + // {PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 + // {PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 + // {PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 + // {PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 + // {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 + // {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + +}; +#endif + +//*** DAC *** + +#ifdef HAL_DAC_MODULE_ENABLED +const PinMap PinMap_DAC[] = { + // {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 + // {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 - LD2 + {NC, NP, 0} +}; +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +const PinMap PinMap_I2C_SDA[] = { + // {PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + // {PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + // {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + // {PC_7, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, + // {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + // {PC_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_I2C_MODULE_ENABLED +const PinMap PinMap_I2C_SCL[] = { + // {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + // {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + // {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + // {PC_6, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +const PinMap PinMap_PWM[] = { + {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 BED + {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 HEATER0 + {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 HEATER1 + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 HEATER2 + {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 HEATER3 + {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 FAN0 + {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 FAN1 + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 FAN2 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 FAN3 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 FAN4 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 FAN5 + + /** + * Unused by specifications on Octopus. + * Uncomment the corresponding line if you want to have HardwarePWM on some pins. + * WARNING: check timers' usage first to avoid conflicts. + * If you don't know what you're doing leave things as they are or you WILL break something (including hardware) + * If you alter this section DO NOT report bugs to Marlin team since they are most likely caused by you. Thank you. + */ + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 BLTOUCH is a "servo" + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 BLTOUCH is a "servo" + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + //{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + //{PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + //{PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + //{PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + //144 pins mcu, 114 gpio + //{PF_6, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PF_7, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + //{PF_8, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + //{PF_9, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + + //176 pins mcu, 140 gpio + //{PH_10, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PH_6, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 + //{PH_11, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PI_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + //{PI_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +const PinMap PinMap_UART_TX[] = { + // {PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + // {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + // {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + // {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +const PinMap PinMap_UART_RX[] = { + // {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + // {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + // {PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + // {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +const PinMap PinMap_UART_RTS[] = { + // {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + // {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + // {PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + // {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +const PinMap PinMap_UART_CTS[] = { + // {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + // {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + // {PB_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + // {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + // {PC_9, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_0, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + // {PB_2, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + // {PC_1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)}, + // {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_7, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +const PinMap PinMap_SPI_SSEL[] = { + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + // {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + // {PB_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + // {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + // {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {NC, NP, 0} +}; +#endif + +//*** CAN *** + +#ifdef HAL_CAN_MODULE_ENABLED +const PinMap PinMap_CAN_RD[] = { + // {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + // {PB_5, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + // {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + // {PB_12, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_CAN_MODULE_ENABLED +const PinMap PinMap_CAN_TD[] = { + // {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + // {PB_6, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + // {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + // {PB_13, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + {NC, NP, 0} +}; +#endif + +//*** ETHERNET *** + +//*** No Ethernet *** + +//*** QUADSPI *** + +#ifdef HAL_QSPI_MODULE_ENABLED +const PinMap PinMap_QUADSPI[] = { + // {PA_1, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO3 + // {PB_2, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_CLK + // {PB_6, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK1_NCS + // {PC_9, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO0 + // {PC_10, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO1 + // {PC_11, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK2_NCS + {NC, NP, 0} +}; +#endif + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +const PinMap PinMap_USB_OTG_FS[] = { + // {PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF + // {PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)}, // USB_OTG_FS_VBUS + // {PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID + {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM + {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP + {NC, NP, 0} +}; + +const PinMap PinMap_USB_OTG_HS[] = { + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS + {PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM + {PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP + + /*#error "USB in HS mode isn't supported by the board" + {PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0 + {PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D1 + {PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D2 + {PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D7 + {PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D3 + {PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D5 + {PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D6 + {PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_STP + {PC_2, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR + {PC_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT + */ + {NC, NP, 0} +}; + + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { + // {PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4 + // {PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5 + // {PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6 + // {PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif +#endif + + diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PinNamesVar.h new file mode 100644 index 000000000000..bff3f2134987 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/PinNamesVar.h @@ -0,0 +1,30 @@ +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, /* SYS_WKUP0 */ +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + USB_OTG_FS_DM = PA_11, + USB_OTG_FS_DP = PA_12, +#endif diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h similarity index 87% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/hal_conf_extra.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h index f7f9e23e99e7..d62c510095c9 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/hal_conf_extra.h @@ -4,19 +4,21 @@ #define HAL_ADC_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED -//#define HAL_RTC_MODULE_ENABLED Real Time Clock...do we use it? +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED #define HAL_USART_MODULE_ENABLED #define HAL_CORTEX_MODULE_ENABLED //#define HAL_UART_MODULE_ENABLED // by default //#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#define HAL_SD_MODULE_ENABLED -#undef HAL_SD_MODULE_ENABLED +//#undef HAL_SD_MODULE_ENABLED #undef HAL_DAC_MODULE_ENABLED #undef HAL_FLASH_MODULE_ENABLED #undef HAL_CAN_MODULE_ENABLED @@ -32,7 +34,6 @@ #undef HAL_SRAM_MODULE_ENABLED #undef HAL_SDRAM_MODULE_ENABLED #undef HAL_HASH_MODULE_ENABLED -#undef HAL_EXTI_MODULE_ENABLED #undef HAL_SMBUS_MODULE_ENABLED #undef HAL_I2S_MODULE_ENABLED #undef HAL_IWDG_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld new file mode 100644 index 000000000000..ca21498cd2d9 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/ldscript.ld @@ -0,0 +1,187 @@ +/* +***************************************************************************** +** + +** File : LinkerScript.ld +** +** Abstract : Linker script for STM32F407VETx Device with +** 512KByte FLASH, 128KByte RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2014 Ac6

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of Ac6 nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20020000; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200;; /* required amount of heap */ +_Min_Stack_Size = 0x400;; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +FLASH (rx) : ORIGIN = 0x8008000, LENGTH = 512K +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text ALIGN(4): + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata ALIGN(4): + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + /*_siccmram = LOADADDR(.ccmram);*/ + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(4); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(4); + } >RAM + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} + + diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.cpp new file mode 100644 index 000000000000..5ed098aab962 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.cpp @@ -0,0 +1,239 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Pin number +const PinName digitalPin[] = { + PA_0, //D0 + PA_1, //D1 + PA_2, //D2 + PA_3, //D3 + PA_4, //D4 + PA_5, //D5 + PA_6, //D6 + PA_7, //D7 + PA_8, //D8 + PA_9, //D9 + PA_10, //D10 + PA_11, //D11 + PA_12, //D12 + PA_13, //D13 + PA_14, //D14 + PA_15, //D15 + PB_0, //D16 + PB_1, //D17 + PB_2, //D18 + PB_3, //D19 + PB_4, //D20 + PB_5, //D21 + PB_6, //D22 + PB_7, //D23 + PB_8, //D24 + PB_9, //D25 + PB_10, //D26 + PB_11, //D27 + PB_12, //D28 + PB_13, //D29 + PB_14, //D30 + PB_15, //D31 + PC_0, //D32 + PC_1, //D33 + PC_2, //D34 + PC_3, //D35 + PC_4, //D36 + PC_5, //D37 + PC_6, //D38 + PC_7, //D39 + PC_8, //D40 + PC_9, //D41 + PC_10, //D42 + PC_11, //D43 + PC_12, //D44 + PC_13, //D45 + PC_14, //D46 + PC_15, //D47 + PD_0, //D48 + PD_1, //D49 + PD_2, //D50 + PD_3, //D51 + PD_4, //D52 + PD_5, //D53 + PD_6, //D54 + PD_7, //D55 + PD_8, //D56 + PD_9, //D57 + PD_10, //D58 + PD_11, //D59 + PD_12, //D60 + PD_13, //D61 + PD_14, //D62 + PD_15, //D63 + PE_0, //D64 + PE_1, //D65 + PE_2, //D66 + PE_3, //D67 + PE_4, //D68 + PE_5, //D69 + PE_6, //D70 + PE_7, //D71 + PE_8, //D72 + PE_9, //D73 + PE_10, //D74 + PE_11, //D75 + PE_12, //D76 + PE_13, //D77 + PE_14, //D78 + PE_15, //D79 + PF_0, //D80 + PF_1, //D81 + PF_2, //D82 + PF_3, //D83 + PF_4, //D84 + PF_5, //D85 + PF_6, //D86 + PF_7, //D87 + PF_8, //D88 + PF_9, //D89 + PF_10, //D90 + PF_11, //D91 + PF_12, //D92 + PF_13, //D93 + PF_14, //D94 + PF_15, //D95 + PG_0, //D96 + PG_1, //D97 + PG_2, //D98 + PG_3, //D99 + PG_4, //D100 + PG_5, //D101 + PG_6, //D102 + PG_7, //D103 + PG_8, //D104 + PG_9, //D105 + PG_10, //D106 + PG_11, //D107 + PG_12, //D108 + PG_13, //D109 + PG_14, //D110 + PG_15, //D111 + + //Duplicated ADC Pins + PA_3, //D112/A0 + PA_4, //D113/A1 + PC_0, //D114/A2 + PC_1, //D115/A3 + PC_2, //D116/A4 + PC_3, //D117/A5 + PC_4, //D118/A6 + PF_3, //D119/A16 - 1:FSMC_A3 2:ADC3_IN9 + PF_4, //D120/A17 - 1:FSMC_A4 2:ADC3_IN14 + PF_5, //D121/A18 - 1:FSMC_A5 2:ADC3_IN15 + PF_6, //D122/A19 - 1:TIM10_CH1 2:ADC3_IN4 + PF_7, //D123/A20 - 1:TIM11_CH1 2:ADC3_IN5 + PF_8, //D124/A20 - 1:TIM11_CH1 2:ADC3_IN6 +}; + +#ifdef __cplusplus +} +#endif + +// ---------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief System Clock Configuration + * The system Clock is configured as follow : + * System Clock source = PLL (HSE) + * SYSCLK(Hz) = 180000000 + * HCLK(Hz) = 180000000 + * AHB Prescaler = 1 + * APB1 Prescaler = 4 + * APB2 Prescaler = 2 + * HSE Frequency(Hz) = 12000000 + * PLL_M = 6 + * PLL_N = 180 + * PLL_P = 2 + * PLL_Q = 7 + * VDD(V) = 3.3 + * Main regulator output voltage = Scale1 mode + * Flash Latency(WS) = 5 + * @param None + * @retval None + */ +WEAK void SystemClock_Config(void) +{ + RCC_ClkInitTypeDef RCC_ClkInitStruct; + RCC_OscInitTypeDef RCC_OscInitStruct; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct; + + + /* Enable Power Control clock */ + __HAL_RCC_PWR_CLK_ENABLE(); + +#ifdef HAL_PWR_MODULE_ENABLED + /* The voltage scaling allows optimizing the power consumption when the device is + clocked below the maximum system frequency, to update the voltage scaling value + regarding system frequency refer to product datasheet. */ + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); +#endif + + /* Enable HSE Oscillator and activate PLL with HSE as source */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = 6; + RCC_OscInitStruct.PLL.PLLN = 180; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + RCC_OscInitStruct.PLL.PLLQ = 7; + RCC_OscInitStruct.PLL.PLLR = 2; + HAL_RCC_OscConfig(&RCC_OscInitStruct); + + HAL_PWREx_EnableOverDrive(); + + /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 + clocks dividers */ + RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | + RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLRCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; + HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5); + + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48; + PeriphClkInitStruct.PLLSAI.PLLSAIM = 6; + PeriphClkInitStruct.PLLSAI.PLLSAIN = 96; + PeriphClkInitStruct.PLLSAI.PLLSAIQ = 2; + PeriphClkInitStruct.PLLSAI.PLLSAIP = RCC_PLLSAIP_DIV4; + PeriphClkInitStruct.PLLSAIDivQ = 1; + PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48CLKSOURCE_PLLSAIP; + HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct); +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h new file mode 100644 index 000000000000..f512a311e32c --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_OCTOPUS_V1/variant.h @@ -0,0 +1,216 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#define PA0 0 //D0 +#define PA1 1 //D1 +#define PA2 2 //D2 +#define PA3 3 //D3 +#define PA4 4 //D4 +#define PA5 5 //D5 +#define PA6 6 //D6 +#define PA7 7 //D7 +#define PA8 8 //D8 +#define PA9 9 //D9 +#define PA10 10 //D10 +#define PA11 11 //D11 +#define PA12 12 //D12 +#define PA13 13 //D13 +#define PA14 14 //D14 +#define PA15 15 //D15 +#define PB0 16 //D16 +#define PB1 17 //D17 +#define PB2 18 //D18 +#define PB3 19 //D19 +#define PB4 20 //D20 +#define PB5 21 //D21 +#define PB6 22 //D22 +#define PB7 23 //D23 +#define PB8 24 //D24 +#define PB9 25 //D25 +#define PB10 26 //D26 +#define PB11 27 //D27 +#define PB12 28 //D28 +#define PB13 29 //D29 +#define PB14 30 //D30 +#define PB15 31 //D31 +#define PC0 32 //D32 +#define PC1 33 //D33 +#define PC2 34 //D34 +#define PC3 35 //D35 +#define PC4 36 //D36 +#define PC5 37 //D37 +#define PC6 38 //D38 +#define PC7 39 //D39 +#define PC8 40 //D40 +#define PC9 41 //D41 +#define PC10 42 //D42 +#define PC11 43 //D43 +#define PC12 44 //D44 +#define PC13 45 //D45 +#define PC14 46 //D46 +#define PC15 47 //D47 +#define PD0 48 //D48 +#define PD1 49 //D49 +#define PD2 50 //D50 +#define PD3 51 //D51 +#define PD4 52 //D52 +#define PD5 53 //D53 +#define PD6 54 //D54 +#define PD7 55 //D55 +#define PD8 56 //D56 +#define PD9 57 //D57 +#define PD10 58 //D58 +#define PD11 59 //D59 +#define PD12 60 //D60 +#define PD13 61 //D61 +#define PD14 62 //D62 +#define PD15 63 //D63 +#define PE0 64 //D64 +#define PE1 65 //D65 +#define PE2 66 //D66 +#define PE3 67 //D67 +#define PE4 68 //D68 +#define PE5 69 //D69 +#define PE6 70 //D70 +#define PE7 71 //D71 +#define PE8 72 //D72 +#define PE9 73 //D73 +#define PE10 74 //D74 +#define PE11 75 //D75 +#define PE12 76 //D76 +#define PE13 77 //D77 +#define PE14 78 //D78 +#define PE15 79 //D79 +#define PF0 80 //D64 +#define PF1 81 //D65 +#define PF2 82 //D66 +#define PF3 83 //D67 +#define PF4 84 //D68 +#define PF5 85 //D69 +#define PF6 86 //D70 +#define PF7 87 //D71 +#define PF8 88 //D72 +#define PF9 89 //D73 +#define PF10 90 //D74 +#define PF11 91 //D75 +#define PF12 92 //D76 +#define PF13 93 //D77 +#define PF14 94 //D78 +#define PF15 95 //D79 +#define PG0 96 //D64 +#define PG1 97 //D65 +#define PG2 98 //D66 +#define PG3 99 //D67 +#define PG4 100 //D68 +#define PG5 101 //D69 +#define PG6 102 //D70 +#define PG7 103 //D71 +#define PG8 104 //D72 +#define PG9 105 //D73 +#define PG10 106 //D74 +#define PG11 107 //D75 +#define PG12 108 //D76 +#define PG13 109 //D77 +#define PG14 110 //D78 +#define PG15 111 //D79 + +// This must be a literal with the same value as PEND +#define NUM_DIGITAL_PINS 125 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 13 +#define NUM_ANALOG_FIRST 112 + +//#define ADC_RESOLUTION 12 + +// PWM resolution +//#define PWM_RESOLUTION 12 +#define PWM_FREQUENCY 1000 // >= 20 Khz => inaudible noise for fans +#define PWM_MAX_DUTY_CYCLE 255 + +// SPI Definitions +#define PIN_SPI_SS PA4 +#define PIN_SPI_MOSI PA7 +#define PIN_SPI_MISO PA6 +#define PIN_SPI_SCK PA5 + +// I2C Definitions +#define PIN_WIRE_SDA PB9 +#define PIN_WIRE_SCL PB8 + +// Timer Definitions +// Do not use timer used by PWM pin. See PinMap_PWM. +#define TIMER_TONE TIM6 +#define TIMER_SERVO TIM5 +#define TIMER_SERIAL TIM7 + +// UART Definitions +//#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header +/* Enable Serial 3 */ +#define HAVE_HWSERIAL1 +#define HAVE_HWSERIAL3 + +// Default pin used for 'Serial' instance (ex: ST-Link) +// Mandatory for Firmata +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 + +/* HAL configuration */ +#define HSE_VALUE 12000000U + +#define FLASH_PAGE_SIZE (4U * 1024U) + +#ifdef __cplusplus +} // extern "C" +#endif + +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_HARDWARE_OPEN Serial +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/PeripheralPins.c similarity index 99% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/PeripheralPins.c index 6dc8b05158b3..4ea275d4cf7e 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/PeripheralPins.c @@ -100,9 +100,7 @@ const PinMap PinMap_I2C_SDA[] = { #endif {NC, NP, 0} }; -#endif -#ifdef HAL_I2C_MODULE_ENABLED const PinMap PinMap_I2C_SCL[] = { {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h new file mode 100644 index 000000000000..ef621d57bf29 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/hal_conf_extra.h @@ -0,0 +1,52 @@ +#pragma once + +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#define HAL_GPIO_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +//#define HAL_RTC_MODULE_ENABLED // Real Time Clock...do we use it? +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED // by default +//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) + +//#define HAL_SD_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_FLASH_MODULE_ENABLED +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_IWDG_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld new file mode 100644 index 000000000000..6af296a521ff --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/ldscript.ld @@ -0,0 +1,204 @@ +/* +***************************************************************************** +** + +** File : LinkerScript.ld +** +** Abstract : Linker script for STM32F407ZGTx Device with +** 1024KByte FLASH, 128KByte RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2014 Ac6

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of Ac6 nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20020000; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200;; /* required amount of heap */ +_Min_Stack_Size = 0x400;; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +FLASH (rx) : ORIGIN = 0x8008000, LENGTH = 1024K +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K +CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text ALIGN(4): + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata ALIGN(4): + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + _siccmram = LOADADDR(.ccmram); + + /* CCM-RAM section + * + * IMPORTANT NOTE! + * If initialized variables will be placed in this section, + * the startup code needs to be modified to copy the init-values. + */ + .ccmram : + { + . = ALIGN(4); + _sccmram = .; /* create a global symbol at ccmram start */ + *(.ccmram) + *(.ccmram*) + + . = ALIGN(4); + _eccmram = .; /* create a global symbol at ccmram end */ + } >CCMRAM AT> FLASH + + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(4); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(4); + } >RAM + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.cpp new file mode 100644 index 000000000000..1486b21830a1 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.cpp @@ -0,0 +1,260 @@ +/* + ******************************************************************************* + * Copyright (c) 2017, STMicroelectronics + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + */ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Pin number +// This array allows to wrap Arduino pin number(Dx or x) +// to STM32 PinName (PX_n) +const PinName digitalPin[] = { +#if STM32F4X_PIN_NUM >= 64 //64 pins mcu, 51 gpio + PC_13, //D0 + PC_14, //D1 - OSC32_IN + PC_15, //D2 - OSC32_OUT + PH_0, //D3 - OSC_IN + PH_1, //D4 - OSC_OUT + PB_2, //D5 - BOOT1 + PB_10, //D6 - 1:SPI2_SCK / I2C2_SCL / USART3_TX / TIM2_CH3 + PB_11, //D7 - 1:I2C2_SDA / USART3_RX / TIM2_CH4 + PB_12, //D8 - 1:SPI2_NSS / OTG_HS_ID + PB_13, //D9 - 1:SPI2_SCK 2:OTG_HS_VBUS + PB_14, //D10 - 1:SPI2_MISO / TIM12_CH1 / OTG_HS_DM + PB_15, //D11 - SPI2_MOSI / TIM12_CH2 / OTG_HS_DP + PC_6, //D12 - 1:TIM8_CH1 / SDIO_D6 / USART6_TX / TIM3_CH1 + PC_7, //D13 - 1:TIM8_CH2 / SDIO_D7 / USART6_RX / TIM3_CH2 + PC_8, //D14 - 1:TIM8_CH3 / SDIO_D0 / TIM3_CH3 + PC_9, //D15 - 1:TIM8_CH4 / SDIO_D1 / TIM3_CH4 + PA_8, //D16 - 1:TIM1_CH1 / I2C3_SCL / OTG_FS_SOF + PA_9, //D17 - 1:USART1_TX / TIM1_CH2 2:OTG_FS_VBUS + PA_10, //D18 - 1:USART1_RX / TIM1_CH3 / OTG_FS_ID + PA_11, //D19 - 1:TIM1_CH4 / OTG_FS_DM + PA_12, //D20 - 1:OTG_FS_DP + PA_13, //D21 - 0:JTMS-SWDIO + PA_14, //D22 - 0:JTCK-SWCLK + PA_15, //D23 - 0:JTDI 1:SPI3_NSS / SPI1_NSS + PC_10, //D24 - 1:UART4_TX / SPI3_SCK / SDIO_D2 / USART3_TX + PC_11, //D25 - 1:UART4_RX / SPI3_MISO / SDIO_D3 / USART3_RX + PC_12, //D26 - 1:UART5_TX / SPI3_MOSI / SDIO_CK + PD_2, //D27 - 1:UART5_RX / SDIO_CMD + PB_3, //D28 - 0:JTDO 1:SPI3_SCK / TIM2_CH2 / SPI1_SCK + PB_4, //D29 - 0:NJTRST 1:SPI3_MISO / TIM3_CH1 / SPI1_MISO + PB_5, //D30 - 1:TIM3_CH2 / SPI1_MOSI / SPI3_MOSI + PB_6, //D31 - 1:I2C1_SCL / TIM4_CH1 / USART1_TX + PB_7, //D32 - 1:I2C1_SDA / TIM4_CH2 / USART1_RX + PB_8, //D33 - 1:I2C1_SCL / TIM4_CH3 / SDIO_D4 / TIM10_CH1 + PB_9, //D34 - 1:I2C1_SDA / TIM4_CH4 / SDIO_D5 / TIM11_CH1 / SPI2_NSS + PA_0, //D35/A0 - 1:UART4_TX / TIM5_CH1 2:ADC123_IN0 + PA_1, //D36/A1 - 1:UART4_RX / TIM5_CH2 / TIM2_CH2 2:ADC123_IN1 + PA_2, //D37/A2 - 1:USART2_TX /TIM5_CH3 / TIM9_CH1 / TIM2_CH3 2:ADC123_IN2 + PA_3, //D38/A3 - 1:USART2_RX /TIM5_CH4 / TIM9_CH2 / TIM2_CH4 2:ADC123_IN3 + PA_4, //D39/A4 - NOT FT 1:SPI1_NSS / SPI3_NSS / USART2_CK 2:ADC12_IN4 / DAC_OUT1 + PA_5, //D40/A5 - NOT FT 1:SPI1_SCK 2:ADC12_IN5 / DAC_OUT2 + PA_6, //D41/A6 - 1:SPI1_MISO / TIM13_CH1 / TIM3_CH1 2:ADC12_IN6 + PA_7, //D42/A7 - 1:SPI1_MOSI / TIM14_CH1 / TIM3_CH2 2:ADC12_IN7 + PB_0, //D43/A8 - 1:TIM3_CH3 2:ADC12_IN8 + PB_1, //D44/A9 - 1:TIM3_CH4 2:ADC12_IN9 + PC_0, //D45/A10 - 1: 2:ADC123_IN10 + PC_1, //D46/A11 - 1: 2:ADC123_IN11 + PC_2, //D47/A12 - 1:SPI2_MISO 2:ADC123_IN12 + PC_3, //D48/A13 - 1:SPI2_MOSI 2:ADC123_IN13 + PC_4, //D49/A14 - 1: 2:ADC12_IN14 + PC_5, //D50/A15 - 1: 2:ADC12_IN15 + #if STM32F4X_PIN_NUM >= 144 + PF_3, //D51/A16 - 1:FSMC_A3 2:ADC3_IN9 + PF_4, //D52/A17 - 1:FSMC_A4 2:ADC3_IN14 + PF_5, //D53/A18 - 1:FSMC_A5 2:ADC3_IN15 + PF_6, //D54/A19 - 1:TIM10_CH1 2:ADC3_IN4 + PF_7, //D55/A20 - 1:TIM11_CH1 2:ADC3_IN5 + PF_8, //D56/A21 - 1:TIM13_CH1 2:ADC3_IN6 + PF_9, //D57/A22 - 1;TIM14_CH1 2:ADC3_IN7 + PF_10, //D58/A23 - 2:ADC3_IN8 + #endif +#endif +#if STM32F4X_PIN_NUM >= 100 //100 pins mcu, 82 gpio + PE_2, //D59 - 1:FSMC_A23 + PE_3, //D60 - 1:FSMC_A19 + PE_4, //D61 - 1:FSMC_A20 + PE_5, //D62 - 1:FSMC_A21 + PE_6, //D63 - 1:FSMC_A22 + PE_7, //D64 - 1:FSMC_D4 + PE_8, //D65 - 1:FSMC_D5 + PE_9, //D66 - 1:FSMC_D6 / TIM1_CH1 + PE_10, //D67 - 1:FSMC_D7 + PE_11, //D68 - 1:FSMC_D8 / TIM1_CH2 + PE_12, //D69 - 1:FSMC_D9 + PE_13, //D70 - 1:FSMC_D10 / TIM1_CH3 + PE_14, //D71 - 1:FSMC_D11 / TIM1_CH4 + PE_15, //D72 - 1:FSMC_D12 + PD_8, //D73 - 1:FSMC_D13 / USART3_TX + PD_9, //D74 - 1:FSMC_D14 / USART3_RX + PD_10, //D75 - 1:FSMC_D15 + PD_11, //D76 - 1:FSMC_A16 + PD_12, //D77 - 1:FSMC_A17 / TIM4_CH1 + PD_13, //D78 - 1:FSMC_A18 / TIM4_CH2 + PD_14, //D79 - 1:FSMC_D0 / TIM4_CH3 + PD_15, //D80 - 1:FSMC_D1 / TIM4_CH4 + PD_0, //D81 - 1:FSMC_D2 + PD_1, //D82 - 1:FSMC_D3 + PD_3, //D83 - 1:FSMC_CLK + PD_4, //D84 - 1:FSMC_NOE + PD_5, //D85 - 1:USART2_TX + PD_6, //D86 - 1:USART2_RX + PD_7, //D87 + PE_0, //D88 + PE_1, //D89 +#endif +#if STM32F4X_PIN_NUM >= 144 //144 pins mcu, 114 gpio + PF_0, //D90 - 1:FSMC_A0 / I2C2_SDA + PF_1, //D91 - 1:FSMC_A1 / I2C2_SCL + PF_2, //D92 - 1:FSMC_A2 + PF_11, //D93 + PF_12, //D94 - 1:FSMC_A6 + PF_13, //D95 - 1:FSMC_A7 + PF_14, //D96 - 1:FSMC_A8 + PF_15, //D97 - 1:FSMC_A9 + PG_0, //D98 - 1:FSMC_A10 + PG_1, //D99 - 1:FSMC_A11 + PG_2, //D100 - 1:FSMC_A12 + PG_3, //D101 - 1:FSMC_A13 + PG_4, //D102 - 1:FSMC_A14 + PG_5, //D103 - 1:FSMC_A15 + PG_6, //D104 + PG_7, //D105 + PG_8, //D106 + PG_9, //D107 - 1:USART6_RX + PG_10, //D108 - 1:FSMC_NE3 + PG_11, //D109 + PG_12, //D110 - 1:FSMC_NE4 + PG_13, //D111 - 1:FSMC_A24 + PG_14, //D112 - 1:FSMC_A25 / USART6_TX + PG_15, //D113 +#endif +#if STM32F4X_PIN_NUM >= 176 //176 pins mcu, 140 gpio + PI_8, //D114 + PI_9, //D115 + PI_10, //D116 + PI_11, //D117 + PH_2, //D118 + PH_3, //D119 + PH_4, //D120 - 1:I2C2_SCL + PH_5, //D121 - 1:I2C2_SDA + PH_6, //D122 - 1:TIM12_CH1 + PH_7, //D123 - 1:I2C3_SCL + PH_8, //D124 - 1:I2C3_SDA + PH_9, //D125 - 1:TIM12_CH2 + PH_10, //D126 - 1:TIM5_CH1 + PH_11, //D127 - 1:TIM5_CH2 + PH_12, //D128 - 1:TIM5_CH3 + PH_13, //D129 + PH_14, //D130 + PH_15, //D131 + PI_0, //D132 - 1:TIM5_CH4 / SPI2_NSS + PI_1, //D133 - 1:SPI2_SCK + PI_2, //D134 - 1:TIM8_CH4 /SPI2_MISO + PI_3, //D135 - 1:SPI2_MOS + PI_4, //D136 + PI_5, //D137 - 1:TIM8_CH1 + PI_6, //D138 - 1:TIM8_CH2 + PI_7, //D139 - 1:TIM8_CH3 +#endif +}; + +#ifdef __cplusplus +} +#endif + +// ------------------------ + +#ifdef __cplusplus +extern "C" { +#endif + + /** + * @brief System Clock Configuration + * @param None + * @retval None + */ +WEAK void SystemClock_Config() { + + RCC_OscInitTypeDef RCC_OscInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct; + + /**Configure the main internal regulator output voltage + */ + __HAL_RCC_PWR_CLK_ENABLE(); + + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); + + /**Initializes the CPU, AHB and APB busses clocks + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = 8; + RCC_OscInitStruct.PLL.PLLN = 336; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + RCC_OscInitStruct.PLL.PLLQ = 7; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { + _Error_Handler(__FILE__, __LINE__); + } + + /**Initializes the CPU, AHB and APB busses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) { + _Error_Handler(__FILE__, __LINE__); + } + + /**Configure the Systick interrupt time + */ + HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq() / 1000); + + /**Configure the Systick + */ + HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK); + + /* SysTick_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h similarity index 98% rename from buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h index 1ba0a18d6af6..11ebf561f36c 100644 --- a/buildroot/share/PlatformIO/variants/BIGTREE_SKR_PRO_1v1/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_BIGTREE_SKR_PRO_11/variant.h @@ -254,7 +254,7 @@ extern "C" { #endif // Timer Definitions -//Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c +// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c #define TIMER_TONE TIM2 #define TIMER_SERVO TIM5 // Only 1 Servo PIN on SKR-PRO, so use the same timer as defined in PeripheralPins #define TIMER_SERIAL TIM7 @@ -280,7 +280,7 @@ extern "C" { #define PIN_SERIAL_TX PA9 // Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number -// Used when user instanciate a hardware Serial using its peripheral name. +// Used when user instantiate a hardware Serial using its peripheral name. // Example: HardwareSerial mySerial(USART3); // will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined. #define PIN_SERIAL1_RX PA10 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PeripheralPins.c new file mode 100644 index 000000000000..c9194cc29349 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PeripheralPins.c @@ -0,0 +1,473 @@ +/* + ******************************************************************************* + * Copyright (c) 2019, STMicroelectronics + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ******************************************************************************* + * Automatically generated from STM32H743ZITx.xml + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Note: Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_INP15 + {PH_4, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC3_INP15 + {PH_5, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC3_INP16 + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 16, 0)}, // ADC1_INP16 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 17, 0)}, // ADC1_INP17 + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_INP14 + {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 18, 0)}, // ADC1_INP18 + {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 19, 0)}, // ADC1_INP19 + {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_INP3 + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_INP7 + {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_INP9 + {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_INP5 + {PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_INP10 + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_INN10 + {PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_INN0 + {PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_INP1 + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_INP4 + {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_INP8 + {PF_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_INP5 + {PF_4, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC3_INP9 + {PF_5, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_INP4 + {PF_6, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC3_INP8 + {PF_7, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_INP3 + {PF_8, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC3_INP7 + {PF_9, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_INP2 + {PF_10, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_INP6 + {PF_11, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_INP2 + {PF_12, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_INP6 + {PF_13, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_INP2 + {PF_14, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_INP6 + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#ifdef HAL_DAC_MODULE_ENABLED +WEAK const PinMap PinMap_DAC[] = { + {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC1_OUT1 + {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC1_OUT2 + {NC, NP, 0} +}; +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + //{PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // LD2 LED_BLUE (ZI) + {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_7, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, // LD2 LED_BLUE (ZI) + //{PB_9, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + //{PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {PD_13, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {PF_0, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PF_15, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_I2C_SCL[] = { + //{PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // USB SOF + //{PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // QSPI_CS + {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_6, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, // QSPI_CS + //{PB_8, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF6_I2C4)}, + {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PD_12, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {PF_1, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {PF_14, I2C4, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C4)}, + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_PWM[] = { + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - ETH RMII Ref Clk + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 - ETH RMII Ref Clk + //{PA_1, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 1)}, // TIM15_CH1N - ETH RMII Ref Clk + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 - ETH RMII MDIO + {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 - ETH RMII MDIO + //{PA_2, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 0)}, // TIM15_CH1 - ETH RMII MDIO + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + {PA_3, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 2, 0)}, // TIM15_CH2 + //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - Used by ETH when JP6(ZI)/SB31(ZI2) ON + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - Used by ETH when JP6(ZI)/SB31(ZI2) ON + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N - Used by ETH when JP6(ZI)/SB31(ZI2) ON + {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 - Used by ETH when JP6(ZI)/SB31(ZI2) ON + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 - USB SOF + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 - USB VBUS + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 - USB ID + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 - USB DM + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - LD1 LED_GREEN + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 - LD1 LED_GREEN + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N - LD1 LED_GREEN + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - SWO + {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PB_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 1)}, // TIM16_CH1N + //{PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 - LD2 LED_BLUE (ZI) + {PB_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 1)}, // TIM17_CH1N - LD2 LED_BLUE (ZI) + {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PB_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 0)}, // TIM16_CH1 + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + {PB_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 0)}, // TIM17_CH1 + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - Used by ETH when JP7(ZI)/JP6(ZI2) ON + {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - LD3 LED_RED + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N - LD3 LED_RED + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM12, 1, 0)}, // TIM12_CH1 - LD3 LED_RED + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM12, 2, 0)}, // TIM12_CH2 + //{PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + //{PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + {PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + {PE_4, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 1)}, // TIM15_CH1N + {PE_5, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 1, 0)}, // TIM15_CH1 + {PE_6, TIM15, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM15, 2, 0)}, // TIM15_CH2 + {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {PF_6, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 0)}, // TIM16_CH1 + {PF_7, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 0)}, // TIM17_CH1 + {PF_8, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + //{PF_8, TIM16, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM16, 1, 1)}, // TIM16_CH1N + {PF_9, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + //{PF_9, TIM17, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM17, 1, 1)}, // TIM17_CH1N + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + {PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // ETH RMII MDIO + //{PA_9, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, // USB VBUS + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // USB VBUS + //{PA_12, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, // USB DP + //{PA_15, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + //{PB_4, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, + //{PB_6, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART)}, + //{PB_6, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + //{PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PB_9, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PB_13, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, // Used by ETH when JP7(ZI)/JP6(ZI2) ON + //{PB_14, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, // LD3 LED_RED + //{PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + //{PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + //{PD_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // STLink TX + //{PE_1, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, //LD2 LED_YELLOW (ZI2) + //{PE_8, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + //{PF_7, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + //{PG_14, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RX[] = { + {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // ETH RMII Ref Clk + //{PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_8, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, // USB SOF + //{PA_10, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, // USB ID + {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // USB ID + //{PA_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_UART4)}, // USB DM + //{PB_3, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_UART7)}, // SWO + //{PB_5, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + //{PB_7, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_LPUART)}, // LD2 LED_BLUE (ZI) + //{PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // LD2 LED_BLUE (ZI) + //{PB_8, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PB_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF14_UART5)}, + //{PB_15, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_USART1)}, + //{PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + //{PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PD_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + //{PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // STLink RX + //{PE_0, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + //{PE_7, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + //{PF_6, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + //{PG_9, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RTS[] = { + //{PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // ETH RMII Ref Clk + //{PA_12, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, // USB DP + //{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // USB DP + {PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PB_14, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // LD3 LED_RED + //{PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // LD3 LED_RED + {PC_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_15, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_9, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PF_8, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PG_8, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PG_12, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_CTS[] = { + {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_11, LPUART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_LPUART)}, // USB DM + //{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // USB DM + //{PB_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // LD1 LED_GREEN + //{PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // Used by ETH when JP7(ZI)/JP6(ZI2) ON + {PB_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + {PC_9, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PD_14, UART8, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART8)}, + {PE_10, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + {PF_9, UART7, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART7)}, + //{PG_13, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {PG_15, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART6)}, + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // Used by ETH when JP6(ZI)/SB31(ZI2) ON + //{PA_7, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, // Used by ETH when JP6(ZI)/SB31(ZI2) ON + //{PB_2, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + //{PB_5, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + //{PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // ETH RMII MDC + //{PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PD_6, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)}, + //{PD_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PE_6, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_14, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PF_9, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + //{PF_11, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + //{PG_14, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_MISO[] = { + {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_6, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_4, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + //{PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // LD3 LED_RED + //{PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PE_5, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_13, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PF_8, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + //{PG_9, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PG_12, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_5, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + //{PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // USB VBUS + //{PA_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // USB DP + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // SWO + //{PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // SWO + //{PB_3, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, // SWO + //{PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // Used by ETH when JP7(ZI)/JP6(ZI2) ON + //{PD_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PE_2, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_12, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PF_7, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + //{PG_11, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // ETH RMII TX Enable + //{PG_13, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, // ETH RXII TXD0 + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SSEL[] = { + {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_4, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_SPI6)}, + //{PA_11, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // USB DM + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_15, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI6)}, + //{PB_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + //{PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PE_4, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_11, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PF_6, SPI5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI5)}, + //{PG_8, SPI6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI6)}, + //{PG_10, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + {NC, NP, 0} +}; +#endif + +//*** CAN *** + +#ifdef HAL_CAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_RD[] = { + //{PA_11, CANFD1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, // USB DM + {PB_5, CANFD2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PB_8, CANFD1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {PB_12, CANFD2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, + {PD_0, CANFD1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_CAN_TD[] = { + //{PA_12, CANFD1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, // USB DP + {PB_6, CANFD2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, // QSPI_CS + {PB_7, CANFD2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, // LD2 LED_BLUE (ZI) + {PB_9, CANFD1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + //{PB_13, CANFD2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN2)}, // Used by ETH when JP7(ZI)/JP6(ZI2) ON + {PD_1, CANFD1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_FDCAN1)}, + {NC, NP, 0} +}; +#endif + +//*** ETHERNET *** + +#ifdef HAL_ETH_MODULE_ENABLED +WEAK const PinMap PinMap_Ethernet[] = { + //{PA_0, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_CRS + {PA_1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_REF_CLK|ETH_RX_CLK + {PA_2, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_MDIO + //{PA_3, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_COL + {PA_7, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_CRS_DV|ETH_RX_DV + //{PB_0, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD2 + //{PB_1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD3 + //{PB_5, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_PPS_OUT + //{PB_8, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD3 + //{PB_10, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RX_ER + //{PB_11, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_EN + //{PB_12, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD0 + {PB_13, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD1 + {PC_1, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_MDC + //{PC_2, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD2 + //{PC_3, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_CLK + {PC_4, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD0 + {PC_5, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_RXD1 + //{PE_2, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD3 + //{PG_8, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_PPS_OUT + {PG_11, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TX_EN + //{PG_12, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD1 + {PG_13, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD0 + //{PG_14, ETH, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF11_ETH)}, // ETH_TXD1 + {NC, NP, 0} +}; +#endif + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +WEAK const PinMap PinMap_USB_OTG_FS[] = { + //{PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_FS)}, // USB_OTG_FS_SOF + //{PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS + //{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG1_FS)}, // USB_OTG_FS_ID + {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_FS)}, // USB_OTG_FS_DM + {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG1_FS)}, // USB_OTG_FS_DP + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_USB_OTG_HS[] = { +#ifdef USE_USB_HS_IN_FS + //{PA_4, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG2_FS)}, // USB_OTG_HS_SOF + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG2_FS)}, // USB_OTG_HS_ID + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS - Used by ETH when JP7(ZI)/JP6(ZI2) ON + {PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG2_FS)}, // USB_OTG_HS_DM + {PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG2_FS)}, // USB_OTG_HS_DP +#else + {PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_D0 + {PA_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_CK + {PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_D1 + {PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_D2 + {PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_D7 + {PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_D3 + {PB_11, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_D4 + {PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_D5 + {PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_D6 - Used by ETH when JP7(ZI)/JP6(ZI2) ON + {PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_STP + {PC_2, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_DIR + {PC_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG2_HS)}, // USB_OTG_HS_ULPI_NXT +#endif /* USE_USB_HS_IN_FS */ + {NC, NP, 0} +}; +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PinNamesVar.h new file mode 100644 index 000000000000..118bc92f7ea1 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/PinNamesVar.h @@ -0,0 +1,50 @@ +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 +SYS_WKUP1 = PA_0, /* SYS_WKUP0 */ +#endif +#ifdef PWR_WAKEUP_PIN2 +SYS_WKUP2 = PA_2, /* SYS_WKUP1 */ +#endif +#ifdef PWR_WAKEUP_PIN3 +SYS_WKUP3 = PC_13, /* SYS_WKUP2 */ +#endif +#ifdef PWR_WAKEUP_PIN4 +SYS_WKUP4 = PI_8, /* SYS_WKUP3 - Manually added */ +#endif +#ifdef PWR_WAKEUP_PIN5 +SYS_WKUP5 = PI_11, /* SYS_WKUP4 - Manually added */ +#endif +#ifdef PWR_WAKEUP_PIN6 +SYS_WKUP6 = PC_1, /* SYS_WKUP5 */ +#endif +#ifdef PWR_WAKEUP_PIN7 +SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 +SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON +USB_OTG_FS_SOF = PA_8, +USB_OTG_FS_VBUS = PA_9, +USB_OTG_FS_ID = PA_10, +USB_OTG_FS_DM = PA_11, +USB_OTG_FS_DP = PA_12, +USB_OTG_HS_ULPI_D0 = PA_3, +USB_OTG_HS_SOF = PA_4, +USB_OTG_HS_ULPI_CK = PA_5, +USB_OTG_HS_ULPI_D1 = PB_0, +USB_OTG_HS_ULPI_D2 = PB_1, +USB_OTG_HS_ULPI_D7 = PB_5, +USB_OTG_HS_ULPI_D3 = PB_10, +USB_OTG_HS_ULPI_D4 = PB_11, +USB_OTG_HS_ID = PB_12, +USB_OTG_HS_ULPI_D5 = PB_12, +USB_OTG_HS_ULPI_D6 = PB_13, +USB_OTG_HS_VBUS = PB_13, +USB_OTG_HS_DM = PB_14, +USB_OTG_HS_DP = PB_15, +USB_OTG_HS_ULPI_STP = PC_0, +USB_OTG_HS_ULPI_DIR = PC_2, +USB_OTG_HS_ULPI_NXT = PC_3, +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h new file mode 100644 index 000000000000..99f3a30443b6 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/hal_conf_extra.h @@ -0,0 +1,479 @@ +/** + ****************************************************************************** + * @file stm32h7xx_hal_conf_default.h + * @brief HAL default configuration file. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32H7xx_HAL_CONF_DEFAULT_H +#define __STM32H7xx_HAL_CONF_DEFAULT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" +#if 0 +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_CEC_MODULE_ENABLED +#define HAL_COMP_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_CRC_MODULE_ENABLED +#define HAL_CRYP_MODULE_ENABLED +#define HAL_DAC_MODULE_ENABLED +#define HAL_DCMI_MODULE_ENABLED +#define HAL_DFSDM_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_DMA2D_MODULE_ENABLED +#define HAL_DSI_MODULE_ENABLED +#define HAL_ETH_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#define HAL_FDCAN_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_HASH_MODULE_ENABLED +#define HAL_HCD_MODULE_ENABLED +#define HAL_HRTIM_MODULE_ENABLED +#define HAL_HSEM_MODULE_ENABLED +#define HAL_I2C_MODULE_ENABLED +#define HAL_I2S_MODULE_ENABLED +#define HAL_IRDA_MODULE_ENABLED +#define HAL_IWDG_MODULE_ENABLED +#define HAL_JPEG_MODULE_ENABLED +#define HAL_LPTIM_MODULE_ENABLED +#define HAL_LTDC_MODULE_ENABLED +#define HAL_MDIOS_MODULE_ENABLED +#define HAL_MDMA_MODULE_ENABLED +#define HAL_MMC_MODULE_ENABLED +#define HAL_NAND_MODULE_ENABLED +#define HAL_NOR_MODULE_ENABLED +#define HAL_OPAMP_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +#define HAL_PWR_MODULE_ENABLED +#define HAL_QSPI_MODULE_ENABLED +#define HAL_RAMECC_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_RNG_MODULE_ENABLED +#define HAL_RTC_MODULE_ENABLED +#define HAL_SAI_MODULE_ENABLED +#define HAL_SD_MODULE_ENABLED +#define HAL_SDRAM_MODULE_ENABLED +#define HAL_SMARTCARD_MODULE_ENABLED +#define HAL_SMBUS_MODULE_ENABLED +#define HAL_SPDIFRX_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_SWPMI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_UART_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_WWDG_MODULE_ENABLED +#endif + +/* ########################## Oscillator Values adaptation ####################*/ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) +#define HSE_VALUE ((uint32_t)25000000) /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) +#define HSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal oscillator (CSI) default value. + * This value is the default CSI value after Reset. + */ +#if !defined (CSI_VALUE) +#define CSI_VALUE ((uint32_t)4000000) /*!< Value of the Internal oscillator in Hz*/ +#endif /* CSI_VALUE */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) +#define HSI_VALUE ((uint32_t)64000000) /*!< Value of the Internal oscillator in Hz*/ +#endif /* HSI_VALUE */ + +/** + * @brief External Low Speed oscillator (LSE) value. + * This value is used by the UART, RTC HAL module to compute the system frequency + */ +#if !defined (LSE_VALUE) +#define LSE_VALUE ((uint32_t)32768) /*!< Value of the External oscillator in Hz*/ +#endif /* LSE_VALUE */ + + +#if !defined (LSE_STARTUP_TIMEOUT) +#define LSE_STARTUP_TIMEOUT ((uint32_t)5000) /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +#if !defined (LSI_VALUE) +#define LSI_VALUE ((uint32_t)32000) /*!< LSI Typical Value in Hz*/ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz +The real value may vary depending on the variations +in voltage and temperature.*/ +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) +#define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External clock in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#if !defined (VDD_VALUE) +#define VDD_VALUE ((uint32_t)3300) /*!< Value of VDD in mv */ +#endif +#if !defined (TICK_INT_PRIORITY) +#define TICK_INT_PRIORITY ((uint32_t)0x00) /*!< tick interrupt priority */ +#endif +#if !defined (USE_RTOS) +#define USE_RTOS 0 +#endif +#if !defined (USE_SD_TRANSCEIVER) +#define USE_SD_TRANSCEIVER 1U /*!< use uSD Transceiver */ +#endif +#if !defined (USE_SPI_CRC) +#define USE_SPI_CRC 0U /*!< use CRC in SPI */ +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_COMP_REGISTER_CALLBACKS 0U /* COMP register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_FDCAN_REGISTER_CALLBACKS 0U /* FDCAN register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 1U /* HCD register callback disabled */ +#define USE_HAL_HRTIM_REGISTER_CALLBACKS 0U /* HRTIM register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_JPEG_REGISTER_CALLBACKS 0U /* JPEG register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MDIOS_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */ +#define USE_HAL_OPAMP_REGISTER_CALLBACKS 0U /* MDIO register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_SWPMI_REGISTER_CALLBACKS 0U /* SWPMI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################### Ethernet Configuration ######################### */ +#define ETH_TX_DESC_CNT 4 /* number of Ethernet Tx DMA descriptors */ +#define ETH_RX_DESC_CNT 4 /* number of Ethernet Rx DMA descriptors */ + +#define ETH_MAC_ADDR0 ((uint8_t)0x02) +#define ETH_MAC_ADDR1 ((uint8_t)0x00) +#define ETH_MAC_ADDR2 ((uint8_t)0x00) +#define ETH_MAC_ADDR3 ((uint8_t)0x00) +#define ETH_MAC_ADDR4 ((uint8_t)0x00) +#define ETH_MAC_ADDR5 ((uint8_t)0x00) + + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +/* #define USE_FULL_ASSERT 1 */ + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED +#include "stm32h7xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED +#include "stm32h7xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED +#include "stm32h7xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_MDMA_MODULE_ENABLED +#include "stm32h7xx_hal_mdma.h" +#endif /* HAL_MDMA_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED +#include "stm32h7xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED +#include "stm32h7xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED +#include "stm32h7xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED +#include "stm32h7xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED +#include "stm32h7xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED +#include "stm32h7xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED +#include "stm32h7xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED +#include "stm32h7xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED +#include "stm32h7xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_FDCAN_MODULE_ENABLED +#include "stm32h7xx_hal_fdcan.h" +#endif /* HAL_FDCAN_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED +#include "stm32h7xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_COMP_MODULE_ENABLED +#include "stm32h7xx_hal_comp.h" +#endif /* HAL_COMP_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED +#include "stm32h7xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED +#include "stm32h7xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED +#include "stm32h7xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED +#include "stm32h7xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_HRTIM_MODULE_ENABLED +#include "stm32h7xx_hal_hrtim.h" +#endif /* HAL_HRTIM_MODULE_ENABLED */ + +#ifdef HAL_HSEM_MODULE_ENABLED +#include "stm32h7xx_hal_hsem.h" +#endif /* HAL_HSEM_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED +#include "stm32h7xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED +#include "stm32h7xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED +#include "stm32h7xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED +#include "stm32h7xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED +#include "stm32h7xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED +#include "stm32h7xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_JPEG_MODULE_ENABLED +#include "stm32h7xx_hal_jpeg.h" +#endif /* HAL_JPEG_MODULE_ENABLED */ + +#ifdef HAL_MDIOS_MODULE_ENABLED +#include "stm32h7xx_hal_mdios.h" +#endif /* HAL_MDIOS_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED +#include "stm32h7xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED +#include "stm32h7xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED +#include "stm32h7xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_OPAMP_MODULE_ENABLED +#include "stm32h7xx_hal_opamp.h" +#endif /* HAL_OPAMP_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED +#include "stm32h7xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED +#include "stm32h7xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_RAMECC_MODULE_ENABLED +#include "stm32h7xx_hal_ramecc.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED +#include "stm32h7xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED +#include "stm32h7xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED +#include "stm32h7xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED +#include "stm32h7xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED +#include "stm32h7xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED +#include "stm32h7xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED +#include "stm32h7xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_SWPMI_MODULE_ENABLED +#include "stm32h7xx_hal_swpmi.h" +#endif /* HAL_SWPMI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED +#include "stm32h7xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED +#include "stm32h7xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED +#include "stm32h7xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED +#include "stm32h7xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED +#include "stm32h7xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED +#include "stm32h7xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED +#include "stm32h7xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED +#include "stm32h7xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED +#include "stm32h7xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr: If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ +#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ +void assert_failed(uint8_t *file, uint32_t line); +#else +#define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32H7xx_HAL_CONF_DEFAULT_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld new file mode 100644 index 000000000000..006c87a17a18 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/ldscript.ld @@ -0,0 +1,208 @@ +/* +****************************************************************************** +** +** File : LinkerScript.ld +** +** Author : Auto-generated by STM32CubeIDE +** +** Abstract : Linker script for NUCLEO-H743II(2) Board embedding STM32H743IITx Device from STM32H7 series +** 2048Kbytes FLASH +** 128Kbytes DTCMRAM +** 64Kbytes ITCMRAM +** 512Kbytes RAM_D1 +** 288Kbytes RAM_D2 +** 64Kbytes RAM_D3 +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2019 STMicroelectronics

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of STMicroelectronics nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x24080000; /* end of "RAM_D1" Ram type memory */ + +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Memories definition */ +MEMORY +{ + DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K + ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K + RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K + RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K + RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K + FLASH (rx) : ORIGIN = 0x8020000, LENGTH = 2048K - 128K +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data into "FLASH" Rom type memory */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data into "FLASH" Rom type memory */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { + . = ALIGN(4); + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); + } >FLASH + + .ARM : { + . = ALIGN(4); + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + . = ALIGN(4); + } >FLASH + + .preinit_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + . = ALIGN(4); + } >FLASH + + .init_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + . = ALIGN(4); + } >FLASH + + .fini_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + . = ALIGN(4); + } >FLASH + + /* Used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections into "RAM_D1" Ram type memory */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + + } >RAM_D1 AT> FLASH + + /* Uninitialized data section into "RAM_D1" Ram type memory */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM_D1 + + /* User_heap_stack section, used to check that there is enough "RAM_D1" Ram type memory left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM_D1 + + /* Remove information from the compiler libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.cpp new file mode 100644 index 000000000000..203e9fc9b8f8 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.cpp @@ -0,0 +1,332 @@ +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Pin number +const PinName digitalPin[] = { + PE_2, // D0 + PE_3, // D1 + PE_4, // D2 + PE_5, // D3 + PE_6, // D4 + PI_8, // D5 + PC_13, // D6 + PC_14, // D7 + PC_15, // D8 + PI_9, // D9 + PI_10, // D10 + PI_11, // D11 + PF_0, // D12 + PF_1, // D13 + PF_2, // D14 + PH_0, // D15 + PH_1, // D16 + PB_2, // D17 + PF_15, // D18 + PG_0, // D19 + PG_1, // D20 + PE_7, // D21 + PE_8, // D22 + PE_9, // D23 + PE_10, // D24 + PE_11, // D25 + PE_12, // D26 + PE_13, // D27 + PE_14, // D28 + PE_15, // D29 + PB_10, // D30 + PB_11, // D31 + PH_6, // D32 + PH_7, // D33 + PH_8, // D34 + PH_9, // D35 + PH_10, // D36 + PH_11, // D37 + PH_12, // D38 + PB_12, // D39 + PB_13, // D40 + PB_14, // D41 + PB_15, // D42 + PD_8, // D43 + PD_9, // D44 + PD_10, // D45 + PD_11, // D46 + PD_12, // D47 + PD_13, // D48 + PD_14, // D49 + PD_15, // D50 + PG_2, // D51 + PG_3, // D52 + PG_4, // D53 + PG_5, // D54 + PG_6, // D55 + PG_7, // D56 + PG_8, // D57 + PC_6, // D58 + PC_7, // D59 + PC_8, // D60 + PC_9, // D61 + PA_8, // D62 + PA_9, // D63 + PA_10, // D64 + PA_11, // D65 + PA_12, // D66 + PA_13, // D67 + PH_13, // D68 + PH_14, // D69 + PH_15, // D70 + PI_0, // D71 + PI_1, // D72 + PI_2, // D73 + PI_3, // D74 + PA_14, // D75 + PA_15, // D76 + PC_10, // D77 + PC_11, // D78 + PC_12, // D79 + PD_0, // D80 + PD_1, // D81 + PD_2, // D82 + PD_3, // D83 + PD_4, // D84 + PD_5, // D85 + PD_6, // D86 + PD_7, // D87 + PG_9, // D88 + PG_10, // D89 + PG_11, // D90 + PG_12, // D91 + PG_13, // D92 + PG_14, // D93 + PG_15, // D94 + PB_3, // D95 + PB_4, // D96 + PB_5, // D97 + PB_6, // D98 + PB_7, // D99 + PB_8, // D100 + PB_9, // D101 + PE_0, // D102 + PE_1, // D103 + PI_4, // D104 + PI_5, // D105 + PI_6, // D106 + PI_7, // D107 + PA_0, // D108 / A0 + PA_1, // D109 / A1 + PA_2, // D110 / A2 + PA_3, // D111 / A3 + PA_4, // D112 / A4 + PA_5, // D113 / A5 + PA_6, // D114 / A6 + PA_7, // D115 / A7 + PB_0, // D116 / A8 + PB_1, // D117 / A9 + PH_2, // D118 / A10 + PH_3, // D119 / A11 + PH_4, // D120 / A12 + PH_5, // D121 / A13 + PC_0, // D122 / A14 + PC_1, // D123 / A15 + PC_2, // D124 / A16 + PC_3, // D125 / A17 + PC_4, // D126 / A18 + PC_5, // D127 / A19 + PF_3, // D128 / A20 + PF_4, // D129 / A21 + PF_5, // D130 / A22 + PF_6, // D131 / A23 + PF_7, // D132 / A24 + PF_8, // D133 / A25 + PF_9, // D134 / A26 + PF_10, // D135 / A27 + PF_11, // D136 / A28 + PF_12, // D137 / A29 + PF_13, // D138 / A30 + PF_14, // D139 / A31 +}; + +#ifdef __cplusplus +} +#endif + +// ---------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +void SystemClockStartupInit() { + // Confirm is called only once time to avoid hang up caused by repeated calls in USB wakeup interrupt + static bool first_call = true; + if (!first_call) return; + first_call = false; + + // Clear all clock setting register + RCC->CR = 0x00000001; + RCC->CFGR = 0x00000000; + RCC->D1CFGR = 0x00000000; + RCC->D2CFGR = 0x00000000; + RCC->D3CFGR = 0x00000000; + RCC->PLLCKSELR = 0x00000000; + RCC->PLLCFGR = 0x00000000; + RCC->CIER = 0x00000000; + + // AXI_TARG7_FN_MOD for SRAM + *((volatile uint32_t*)0x51008108)=0x00000001; + + // Enable L1-Cache + SCB_EnableICache(); + SCB_EnableDCache(); + SCB->CACR |= 1<<2; + + PWR->CR3 &= ~(1 << 2); // SCUEN=0 + PWR->D3CR |= 3 << 14; // VOS=3,Scale1,1.15~1.26V core voltage + while((PWR->D3CR & (1 << 13)) == 0); // Wait for the voltage to stabilize + RCC->CR |= 1<<16; // Enable HSE + + uint16_t timeout = 0; + while(((RCC->CR & (1 << 17)) == 0) && (timeout < 0X7FFF)) { + timeout++; // Wait for HSE RDY + } + + if(timeout == 0X7FFF) { + Error_Handler(); + } else { + RCC->PLLCKSELR |= 2 << 0; // PLLSRC[1:0] = 2, HSE for PLL clock source + RCC->PLLCKSELR |= 5 << 4; // DIVM1[5:0] = pllm, Prescaler for PLL1 + RCC->PLL1DIVR |= (160 - 1) << 0; // DIVN1[8:0] = plln - 1, Multiplication factor for PLL1 VCO + RCC->PLL1DIVR |= (2 - 1) << 9; // DIVP1[6:0] = pllp - 1, PLL1 DIVP division factor + RCC->PLL1DIVR |= (4 - 1) << 16; // DIVQ1[6:0] = pllq - 1, PLL1 DIVQ division factor + RCC->PLL1DIVR |= 1 << 24; // DIVR1[6:0] = pllr - 1, PLL1 DIVR division factor + RCC->PLLCFGR |= 2 << 2; // PLL1 input (ref1_ck) clock range frequency is between 4 and 8 MHz + RCC->PLLCFGR |= 0 << 1; // PLL1 VCO selection, 0: 192 to 836 MHz, 1 : 150 to 420 MHz + RCC->PLLCFGR |= 3 << 16; // pll1_q_ck and pll1_p_ck output is enabled + RCC->CR |= 1 << 24; // PLL1 enable + while((RCC->CR & (1 << 25)) == 0); // PLL1 clock ready flag + + // PLL2 DIVR clock frequency = 220MHz, so that SDRAM clock can be set to 110MHz + RCC->PLLCKSELR |= 25 << 12; // DIVM2[5:0] = 25, Prescaler for PLL2 + RCC->PLL2DIVR |= (440 - 1) << 0; // DIVN2[8:0] = 440 - 1, Multiplication factor for PLL2 VCO + RCC->PLL2DIVR |= (2 - 1) << 9; // DIVP2[6:0] = 2-1, PLL2 DIVP division factor + RCC->PLL2DIVR |= (2 - 1) << 24; // DIVR2[6:0] = 2-1, PLL2 DIVR division factor + RCC->PLLCFGR |= 0 << 6; // PLL2RGE[1:0]=0, PLL2 input (ref2_ck) clock range frequency is between 1 and 2 MHz + RCC->PLLCFGR |= 0 << 5; // PLL2 VCO selection, 0: 192 to 836 MHz, 1: 150 to 420 MHz + RCC->PLLCFGR |= 1 << 19; // pll2_p_ck output is enabled + RCC->PLLCFGR |= 1 << 21; // pll2_r_ck output is enabled + RCC->D1CCIPR &= ~(3 << 0); // clear FMC kernel clock source selection + RCC->D1CCIPR |= 2 << 0; // pll2_r_ck clock selected as kernel peripheral clock + RCC->CR |= 1 << 26; // PLL2 enable + while((RCC->CR&(1<<27)) == 0); // PLL2 clock ready flag + + RCC->D1CFGR |= 8 << 0; // rcc_hclk3 = sys_d1cpre_ck / 2 = 400 / 2 = 200MHz. AHB1/2/3/4 + RCC->D1CFGR |= 0 << 8; // sys_ck not divided, sys_d1cpre_ck = sys_clk / 1 = 400 / 1 = 400MHz, System Clock = 400MHz + RCC->CFGR |= 3 << 0; // PLL1 selected as system clock (pll1_p_ck). 400MHz + while(1) { + timeout = (RCC->CFGR & (7 << 3)) >> 3; // System clock switch status + if(timeout == 3) break; // Wait for SW[2:0] = 3 (011: PLL1 selected as system clock (pll1_p_ck)) + } + + FLASH->ACR |= 2 << 0; // LATENCY[2:0] = 2 (@VOS1 Level,maxclock=210MHz) + FLASH->ACR |= 2 << 4; // WRHIGHFREQ[1:0] = 2, flash access frequency < 285MHz + + RCC->D1CFGR |= 4 << 4; // D1PPRE[2:0] = 4, rcc_pclk3 = rcc_hclk3 / 2 = 100MHz, APB3. + RCC->D2CFGR |= 4 << 4; // D2PPRE1[2:0] = 4, rcc_pclk1 = rcc_hclk1 / 2 = 100MHz, APB1. + RCC->D2CFGR |= 4 << 8; // D2PPRE2[2:0] = 4, rcc_pclk2 = rcc_hclk1 / 2 = 100MHz, APB2. + RCC->D3CFGR |= 4 << 4; // D3PPRE[2:0] = 4, rcc_pclk4 = rcc_hclk4 / 2 = 100MHz, APB4. + + RCC->CR |= 1 << 7; // CSI clock enable + RCC->APB4ENR |= 1 << 1; // SYSCFG peripheral clock enable + SYSCFG->CCCSR |= 1 << 0; + } + + // USB clock, (use HSI48 clock) + RCC->CR |= 1 << 12; // HSI48 clock enabl + while((RCC->CR & (1 << 13)) == 0);// 1: HSI48 clock is ready + RCC->APB1HENR |= 1 << 1; // CRS peripheral clock enabled + RCC->APB1HRSTR |= 1 << 1; // Resets CRS + RCC->APB1HRSTR &= ~(1 << 1); // Does not reset CRS + CRS->CFGR &= ~(3 << 28); // USB2 SOF selected as SYNC signal source + CRS->CR |= 3 << 5; // Automatic trimming and Frequency error counter enabled + RCC->D2CCIP2R &= ~(3 << 20); // Clear USBOTG 1 and 2 kernel clock source selection + RCC->D2CCIP2R |= 3 << 20; // HSI48_ck clock is selected as kernel clock +} + +uint8_t MPU_Convert_Bytes_To_POT(uint32_t nbytes) +{ + uint8_t count = 0; + while(nbytes != 1) + { + nbytes >>= 1; + count++; + } + return count; +} + +uint8_t MPU_Set_Protection(uint32_t baseaddr, uint32_t size, uint32_t rnum, uint8_t ap, uint8_t sen, uint8_t cen, uint8_t ben) +{ + uint32_t tempreg = 0; + uint8_t rnr = 0; + if ((size % 32) || size == 0) return 1; + rnr = MPU_Convert_Bytes_To_POT(size) - 1; + SCB->SHCSR &= ~(1 << 16); //disable MemManage + MPU->CTRL &= ~(1 << 0); //disable MPU + MPU->RNR = rnum; + MPU->RBAR = baseaddr; + tempreg |= 0 << 28; + tempreg |= ((uint32_t)ap) << 24; + tempreg |= 0 << 19; + tempreg |= ((uint32_t)sen) << 18; + tempreg |= ((uint32_t)cen) << 17; + tempreg |= ((uint32_t)ben) << 16; + tempreg |= 0 << 8; + tempreg |= rnr << 1; + tempreg |= 1 << 0; + MPU->RASR = tempreg; + MPU->CTRL = (1 << 2) | (1 << 0); //enable PRIVDEFENA + SCB->SHCSR |= 1 << 16; //enable MemManage + return 0; +} + +void MPU_Memory_Protection(void) +{ + MPU_Set_Protection(0x20000000, 128 * 1024, 1, MPU_REGION_FULL_ACCESS, 0, 1, 1); // protect DTCM 128k, Sharing is prohibited, cache is allowed, and buffering is allowed + + MPU_Set_Protection(0x24000000, 512 * 1024, 2, MPU_REGION_FULL_ACCESS, 0, 1, 1); // protect AXI SRAM, Sharing is prohibited, cache is allowed, and buffering is allowed + MPU_Set_Protection(0x30000000, 512 * 1024, 3, MPU_REGION_FULL_ACCESS, 0, 1, 1); // protect SRAM1~SRAM3, Sharing is prohibited, cache is allowed, and buffering is allowed + MPU_Set_Protection(0x38000000, 64 * 1024, 4, MPU_REGION_FULL_ACCESS, 0, 1, 1); // protect SRAM4, Sharing is prohibited, cache is allowed, and buffering is allowed + + MPU_Set_Protection(0x60000000, 64 * 1024 * 1024, 5, MPU_REGION_FULL_ACCESS, 0, 0, 0); // protect LCD FMC 64M, No sharing, no cache, no buffering + MPU_Set_Protection(0XC0000000, 32 * 1024 * 1024, 6, MPU_REGION_FULL_ACCESS, 0, 1, 1); // protect SDRAM 32M, Sharing is prohibited, cache is allowed, and buffering is allowed + MPU_Set_Protection(0X80000000, 256 * 1024 * 1024, 7, MPU_REGION_FULL_ACCESS, 0, 0, 0); // protect NAND FLASH 256M, No sharing, no cache, no buffering +} + +/** + * @brief System Clock Configuration + * @param None + * @retval None + */ +WEAK void SystemClock_Config(void) +{ + SystemClockStartupInit(); + + MPU_Memory_Protection(); + + /* Update current SystemCoreClock value */ + SystemCoreClockUpdate(); + + /* Configure the Systick interrupt time */ + HAL_SYSTICK_Config(SystemCoreClock/1000); + + /* Configure the Systick */ + HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK); + + /* SysTick_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(SysTick_IRQn, 0, 0); +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h new file mode 100644 index 000000000000..74f29514a885 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_BTT_SKR_SE_BX/variant.h @@ -0,0 +1,222 @@ +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ +#ifdef __cplusplus + +extern "C" { +#endif // __cplusplus +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ +#define PE2 0 +#define PE3 1 +#define PE4 2 +#define PE5 3 +#define PE6 4 +#define PI8 5 +#define PC13 6 +#define PC14 7 +#define PC15 8 +#define PI9 9 +#define PI10 10 +#define PI11 11 +#define PF0 12 +#define PF1 13 +#define PF2 14 +#define PH0 15 +#define PH1 16 +#define PB2 17 +#define PF15 18 +#define PG0 19 +#define PG1 20 +#define PE7 21 +#define PE8 22 +#define PE9 23 +#define PE10 24 +#define PE11 25 +#define PE12 26 +#define PE13 27 +#define PE14 28 +#define PE15 29 +#define PB10 30 +#define PB11 31 +#define PH6 32 +#define PH7 33 +#define PH8 34 +#define PH9 35 +#define PH10 36 +#define PH11 37 +#define PH12 38 +#define PB12 39 +#define PB13 40 +#define PB14 41 +#define PB15 42 +#define PD8 43 +#define PD9 44 +#define PD10 45 +#define PD11 46 +#define PD12 47 +#define PD13 48 +#define PD14 49 +#define PD15 50 +#define PG2 51 +#define PG3 52 +#define PG4 53 +#define PG5 54 +#define PG6 55 +#define PG7 56 +#define PG8 57 +#define PC6 58 +#define PC7 59 +#define PC8 60 +#define PC9 61 +#define PA8 62 +#define PA9 63 +#define PA10 64 +#define PA11 65 +#define PA12 66 +#define PA13 67 +#define PH13 68 +#define PH14 69 +#define PH15 70 +#define PI0 71 +#define PI1 72 +#define PI2 73 +#define PI3 74 +#define PA14 75 +#define PA15 76 +#define PC10 77 +#define PC11 78 +#define PC12 79 +#define PD0 80 +#define PD1 81 +#define PD2 82 +#define PD3 83 +#define PD4 84 +#define PD5 85 +#define PD6 86 +#define PD7 87 +#define PG9 88 +#define PG10 89 +#define PG11 90 +#define PG12 91 +#define PG13 92 +#define PG14 93 +#define PG15 94 +#define PB3 95 +#define PB4 96 +#define PB5 97 +#define PB6 98 +#define PB7 99 +#define PB8 100 +#define PB9 101 +#define PE0 102 +#define PE1 103 +#define PI4 104 +#define PI5 105 +#define PI6 106 +#define PI7 107 +#define PA0 108 +#define PA1 109 +#define PA2 110 +#define PA3 111 +#define PA4 112 +#define PA5 113 +#define PA6 114 +#define PA7 115 +#define PB0 116 +#define PB1 117 +#define PH2 118 +#define PH3 119 +#define PH4 120 +#define PH5 121 +#define PC0 122 +#define PC1 123 +#define PC2 124 +#define PC3 125 +#define PC4 126 +#define PC5 127 +#define PF3 128 +#define PF4 129 +#define PF5 130 +#define PF6 131 +#define PF7 132 +#define PF8 133 +#define PF9 134 +#define PF10 135 +#define PF11 136 +#define PF12 137 +#define PF13 138 +#define PF14 139 + +// This must be a literal with the same value as PEND +#define NUM_DIGITAL_PINS 140 + +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 24 +#define NUM_ANALOG_FIRST 108 + +// Timer Definitions +// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c +#define TIMER_TONE TIM2 +#define TIMER_SERVO TIM5 +#define TIMER_SERIAL TIM7 + +// UART1 for TFT port +#define ENABLE_HWSERIAL1 +#define PIN_SERIAL1_RX PA10 +#define PIN_SERIAL1_TX PA9 + +// UART4 for ESP-01 port +#define ENABLE_HWSERIAL4 +#define PIN_SERIAL4_RX PA1 +#define PIN_SERIAL4_TX PA0 + +// IIC1 for onboard 24C32 EEPROM +#define PIN_WIRE_SDA PB9 +#define PIN_WIRE_SCL PB8 + +// SPI3 for onboard SD card +// #define PIN_SPI_MOSI PC12 +// #define PIN_SPI_MISO PC11 +// #define PIN_SPI_SCK PC10 + +// HSE default value is 25MHz in HAL +// HSE_BYPASS is 25MHz +#ifndef HSE_BYPASS_NOT_USED + #define HSE_VALUE 25000000 +#endif + +// #define USE_USB_FS +/* Extra HAL modules */ +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_HARDWARE Serial +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/PeripheralPins.c new file mode 100755 index 000000000000..56ae00b41b59 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/PeripheralPins.c @@ -0,0 +1,423 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + * Automatically generated from STM32F103R(F-G)Tx.xml + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Note: Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 + // {PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 +#endif + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 + // {PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 +#endif + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 + // {PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 +#endif + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 + // {PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 +#endif + {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 + // {PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 + {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 + // {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + // {PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 + // {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + // {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 + {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 + // {PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 + // {PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 +#endif + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 + // {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 +#endif + {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 + // {PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 +#endif + {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 + // {PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 +#endif + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 + // {PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 + {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 + // {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#if defined(STM32F103xE) || defined(STM32F103xG) +#ifdef HAL_DAC_MODULE_ENABLED +WEAK const PinMap PinMap_DAC[] = { + {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 + {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 + {NC, NP, 0} +}; +#endif +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, + {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_I2C1_ENABLE)}, +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, +#endif + {NC, NP, 0} +}; +#endif + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SCL[] = { + {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, + {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_I2C1_ENABLE)}, +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, +#endif + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_PWM[] = { + {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM2_CH1 + // {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 1, 0)}, // TIM2_CH1 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM5_CH1 +#endif + {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM2_CH2 + // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 2, 0)}, // TIM2_CH2 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM5_CH2 +#endif + {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM2_CH3 + // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 3, 0)}, // TIM2_CH3 +#if defined(STM32F103xG) + // {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM5_CH3 +#endif +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM9_CH1 +#endif + // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 4, 0)}, // TIM2_CH4 +#if defined(STM32F103xE) || defined(STM32F103xG) + {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM5_CH4 +#else + {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 +#endif +#if defined(STM32F103xG) + // {PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM9_CH2 +#endif + {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM3_CH1 +#if defined(STM32F103xG) + // {PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM13_CH1 +#endif + // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM3_CH2 +#if defined(STM32F103xE) || defined(STM32F103xG) + {PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM8_CH1N +#else + {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 1)}, // TIM1_CH1N +#endif +#if defined(STM32F103xG) + // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM14_CH1 +#endif + {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM1_CH1 + // {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 0)}, // TIM1_CH1 + {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM1_CH2 + // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 0)}, // TIM1_CH2 + {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM1_CH3 + // {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 0)}, // TIM1_CH3 + {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM1_CH4 + // {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 4, 0)}, // TIM1_CH4 + {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 1, 0)}, // TIM2_CH1 + // {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 1, 0)}, // TIM2_CH1 + // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 1)}, // TIM1_CH2N + {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM3_CH3 + // {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 3, 0)}, // TIM3_CH3 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM8_CH2N +#endif + {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 1)}, // TIM1_CH3N + // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM3_CH4 + // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 4, 0)}, // TIM3_CH4 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM8_CH3N +#endif + {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 2, 0)}, // TIM2_CH2 + // {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 2, 0)}, // TIM2_CH2 + {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 1, 0)}, // TIM3_CH1 + {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 2, 0)}, // TIM3_CH2 +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM4_CH1 + {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM4_CH2 + {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM4_CH3 + {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM4_CH4 +#endif +#if defined(STM32F103xG) + // {PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM10_CH1 +#endif +#if defined(STM32F103xG) + // {PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM11_CH1 +#endif + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 3, 0)}, // TIM2_CH3 + // {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 3, 0)}, // TIM2_CH3 + {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 4, 0)}, // TIM2_CH4 + // {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 4, 0)}, // TIM2_CH4 + {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM1_CH1N + {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM1_CH2N +#if defined(STM32F103xG) + // {PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM12_CH1 +#endif + {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM1_CH3N +#if defined(STM32F103xG) + // {PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM12_CH2 +#endif + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 1, 0)}, // TIM3_CH1 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM8_CH1 +#endif + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 2, 0)}, // TIM3_CH2 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM8_CH2 +#endif +#if defined(STM32F103xE) || defined(STM32F103xG) + {PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM8_CH3 +#else + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 3, 0)}, // TIM3_CH3 +#endif + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 4, 0)}, // TIM3_CH4 +#if defined(STM32F103xE) || defined(STM32F103xG) + // {PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM8_CH4 +#endif + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART1_ENABLE)}, +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#endif +#if defined(STM32F103xE) || defined(STM32F103xG) + {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#endif +#if defined(STM32F103xB) + {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, +#endif +#if defined(STM32F103xE) || defined(STM32F103xG) + {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#endif + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_RX[] = { + {PA_3, USART2, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, + {PA_10, USART1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, + {PB_7, USART1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART1_ENABLE)}, +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, +#endif +#if defined(STM32F103xE) || defined(STM32F103xG) + {PC_11, UART4, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, +#endif +#if defined(STM32F103xB) + {PC_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, +#endif +#if defined(STM32F103xE) || defined(STM32F103xG) + {PD_2, UART5, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, +#endif + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_RTS[] = { + {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, +#endif + {NC, NP, 0} +}; +#endif + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_CTS[] = { + {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, +#endif + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#if defined(STM32F103xE) || defined(STM32F103xG) + {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#else + {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, +#endif +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#endif + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#if defined(STM32F103xE) || defined(STM32F103xG) + {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#else + {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, +#endif +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#endif + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#if defined(STM32F103xE) || defined(STM32F103xG) + {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#else + {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, +#endif +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#endif + {NC, NP, 0} +}; +#endif + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_SSEL[] = { + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#if defined(STM32F103xE) || defined(STM32F103xG) + {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#else + {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, +#endif +#if defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) + {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +#endif + {NC, NP, 0} +}; +#endif + +//*** CAN *** + +#ifdef HAL_CAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_RD[] = { + {PA_11, CAN1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_NONE)}, + {PB_8, CAN1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_CAN1_2)}, + {NC, NP, 0} +}; +#endif + +#ifdef HAL_CAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_TD[] = { + {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, + {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_CAN1_2)}, + {NC, NP, 0} +}; +#endif + +//*** No ETHERNET *** + +//*** No QUADSPI *** + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +WEAK const PinMap PinMap_USB[] = { + {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_NONE)}, // USB_DM + {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_NONE)}, // USB_DP + {NC, NP, 0} +}; +#endif + +//*** No USB_OTG_FS *** + +//*** No USB_OTG_HS *** + +//*** SD *** + +#if defined(STM32F103xE) || defined(STM32F103xG) +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { + {PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D4 + {PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D5 + {PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D6 + {PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/PinNamesVar.h new file mode 100644 index 000000000000..d9e759f5d0cd --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/PinNamesVar.h @@ -0,0 +1,30 @@ +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + USB_DM = PA_11, + USB_DP = PA_12, +#endif \ No newline at end of file diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/ldscript.ld new file mode 100644 index 000000000000..cd7503b3a51d --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/ldscript.ld @@ -0,0 +1,200 @@ +/* +****************************************************************************** +** + +** File : LinkerScript.ld +** +** Author : Auto-generated by STM32CubeIDE +** +** Abstract : Linker script for STM32F103R(8/B/C/ETx Device from STM32F1 series +** 64/128/256/512Kbytes FLASH +** 20/20/48/64Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2019 STMicroelectronics

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of STMicroelectronics nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Memories definition */ +MEMORY +{ + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE + FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data into "FLASH" Rom type memory */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data into "FLASH" Rom type memory */ + .rodata : + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { + . = ALIGN(4); + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); + } >FLASH + .ARM : { + . = ALIGN(4); + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + . = ALIGN(4); + } >FLASH + + .preinit_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + . = ALIGN(4); + } >FLASH + .init_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + . = ALIGN(4); + } >FLASH + .fini_array : + { + . = ALIGN(4); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + . = ALIGN(4); + } >FLASH + + /* Used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections into "RAM" Ram type memory */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + + /* Uninitialized data section into "RAM" Ram type memory */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + + + /* Remove information from the compiler libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} + diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.cpp new file mode 100644 index 000000000000..4d815a34d7f2 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.cpp @@ -0,0 +1,152 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +const PinName digitalPin[] = { + PA_0, + PA_1, + PA_2, + PA_3, + PA_4, + PA_5, + PA_6, + PA_7, + PA_8, + PA_9, // RXD + PA_10, // TXD + PA_11, // USB D- + PA_12, // USB D+ + PA_13, // JTDI + PA_14, // JTCK + PA_15, + PB_0, + PB_1, + PB_2, + PB_3, // JTDO + PB_4, // JTRST + PB_5, + PB_6, + PB_7, + PB_8, + PB_9, + PB_10, + PB_11, // LED + PB_12, + PB_13, + PB_14, + PB_15, + PC_0, + PC_1, + PC_2, + PC_3, + PC_4, + PC_5, + PC_6, + PC_7, + PC_8, + PC_9, + PC_10, + PC_11, + PC_12, + PC_13, + PC_14, // OSC32_1 + PC_15, // OSC32_2 + PD_0, // OSCIN + PD_1, // OSCOUT + PD_2 +}; + +// Analog (Ax) pin number array +const uint32_t analogInputPin[] = { + 0, // A0, PA0 + 1, // A1, PA1 + 2, // A2, PA2 + 3, // A3, PA3 + 4, // A4, PA4 + 5, // A5, PA5 + 6, // A6, PA6 + 7, // A7, PA7 + 16, // A8, PB0 + 17, // A9, PB1 + 32, // A10, PC0 + 33, // A11, PC1 + 34, // A12, PC2 + 35, // A13, PC3 + 36, // A14, PC4 + 37 // A15, PC5 +}; + +#ifdef __cplusplus +} +#endif + +// ---------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief System Clock Configuration + * @param None + * @retval None + */ +WEAK void SystemClock_Config(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {}; + RCC_PeriphCLKInitTypeDef PeriphClkInit = {}; + + /* Initializes the CPU, AHB and APB busses clocks */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9; + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { + Error_Handler(); + } + /* Initializes the CPU, AHB and APB busses clocks */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) { + Error_Handler(); + } + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC | RCC_PERIPHCLK_USB; + PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6; + PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL_DIV1_5; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) { + Error_Handler(); + } +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h new file mode 100644 index 000000000000..41b194abe031 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h @@ -0,0 +1,175 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + + +// * = F103R8-B-C-D-E-F-G +// ** = F103RC-D-E-F-G +// | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| +#define PA0 PIN_A0 // | 0 | A0 | | | | | +#define PA1 PIN_A1 // | 1 | A1 | | | | | +#define PA2 PIN_A2 // | 2 | A2 | USART2_TX | | | | +#define PA3 PIN_A3 // | 2 | A2, DAC_OUT1** | USART2_RX | | | | +#define PA4 PIN_A4 // | 4 | A4, DAC_OUT2** | | | SPI1_SS | | +#define PA5 PIN_A5 // | 5 | A5 | | | SPI1_SCK | | +#define PA6 PIN_A6 // | 6 | A6 | | | SPI1_MISO | | +#define PA7 PIN_A7 // | 7 | A7 | | | SPI1_MOSI | | +#define PA8 8 // | 8 | | | | | | +#define PA9 9 // | 9 | | USART1_TX | | | | +#define PA10 10 // | 10 | | USART1_RX | | | | +#define PA11 11 // | 11 | | | | | USB_DM | +#define PA12 12 // | 12 | | | | | USB_DP | +#define PA13 13 // | 13 | | | | | SWD_SWDIO | +#define PA14 14 // | 14 | | | | | SWD_SWCLK | +#define PA15 15 // | 15 | | | | SPI1_SS/SPI3_SS** | | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| +#define PB0 PIN_A8 // | 16 | A8 | | | | | +#define PB1 PIN_A9 // | 17 | A9 | | | | | +#define PB2 18 // | 18 | | | | | BOOT1 | +#define PB3 19 // | 19 | | | | SPI1_SCK/SPI3_SCK** | | +#define PB4 20 // | 20 | | | | SPI1_MISO/SPI3_MISO** | | +#define PB5 21 // | 21 | | | | SPI1_MOSI/SPI3_MOSI** | | +#define PB6 22 // | 22 | | USART1_TX | TWI1_SCL | | | +#define PB7 23 // | 23 | | USART1_RX | TWI1_SDA | | | +#define PB8 24 // | 24 | | | TWI1_SCL | | | +#define PB9 25 // | 25 | | | TWI1_SDA | | | +#define PB10 26 // | 26 | | USART3_TX* | TWI2_SCL* | | | +#define PB11 27 // | 27 | | USART3_RX* | TWI2_SDA* | | | +#define PB12 28 // | 28 | | | | SPI2_SS* | | +#define PB13 29 // | 29 | | | | SPI2_SCK* | | +#define PB14 30 // | 30 | | | | SPI2_MISO* | | +#define PB15 31 // | 31 | | | | SPI2_MOSI* | | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| +#define PC0 PIN_A10 // | 32 | A10 | | | | | +#define PC1 PIN_A11 // | 33 | A11 | | | | | +#define PC2 PIN_A12 // | 34 | A12 | | | | | +#define PC3 PIN_A13 // | 35 | A13 | | | | | +#define PC4 PIN_A14 // | 36 | A14 | | | | | +#define PC5 PIN_A15 // | 37 | A15 | | | | | +#define PC6 38 // | 38 | | | | | | +#define PC7 39 // | 39 | | | | | | +#define PC8 40 // | 40 | | | | | | +#define PC9 41 // | 41 | | | | | | +#define PC10 42 // | 42 | | USART3_TX*/UART4_TX** | | | | +#define PC11 43 // | 43 | | USART3_RX*/UART4_RX** | | | | +#define PC12 44 // | 44 | | UART5_TX** | | | | +#define PC13 45 // | 45 | | | | | | +#define PC14 46 // | 46 | | | | | OSC32_IN | +#define PC15 47 // | 47 | | | | | OSC32_OUT | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| +#define PD0 48 // | 48 | | | | | OSC_IN | +#define PD1 49 // | 48 | | | | | OSC_OUT | +#define PD2 50 // | 50 | | UART5_RX** | | | | +// |---------|----------------|--------------------------|-----------|-----------------------|-----------| + +// This must be a literal +#define NUM_DIGITAL_PINS 51 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 16 + +// On-board LED pin number +#ifndef LED_BUILTIN +#define LED_BUILTIN PB11 +#endif +#define LED_GREEN LED_BUILTIN + +// On-board user button +#ifndef USER_BTN +#define USER_BTN PC13 +#endif + +// Override default Arduino configuration + +// SPI Definitions +#if DEFAULT_SPI == 3 + #define PIN_SPI_SS PA15 + #define PIN_SPI_MOSI PB3 + #define PIN_SPI_MISO PB4 + #define PIN_SPI_SCK PB5 +#elif DEFAULT_SPI == 2 + #define PIN_SPI_SS PB12 + #define PIN_SPI_MOSI PB13 + #define PIN_SPI_MISO PB14 + #define PIN_SPI_SCK PB15 +#else + #define PIN_SPI_SS PA4 + #define PIN_SPI_MOSI PA7 + #define PIN_SPI_MISO PA6 + #define PIN_SPI_SCK PA5 +#endif + +// I2C Definitions +#define PIN_WIRE_SDA PB7 +#define PIN_WIRE_SCL PB6 + +// Timer Definitions +#ifndef TIMER_TONE + #define TIMER_TONE TIM3 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM2 +#endif + +// UART Definitions +// Define here Serial instance number to map on Serial generic name +#define SERIAL_UART_INSTANCE 1 + +// Default pin used for 'Serial1' instance +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 + +// Extra HAL modules +#if defined(STM32F103xE) || defined(STM32F103xG) +#define HAL_DAC_MODULE_ENABLED +#endif + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #define SERIAL_PORT_MONITOR Serial + #define SERIAL_PORT_HARDWARE Serial1 +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c new file mode 100644 index 000000000000..23c1344fe9bd --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PeripheralPins.c @@ -0,0 +1,264 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + * Automatically generated from STM32F103V(F-G)Tx.xml + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Note: Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 +//{PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 +//{PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 +//{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 +//{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#if defined(STM32F103xE) || defined(STM32F103xG) +#ifdef HAL_DAC_MODULE_ENABLED +WEAK const PinMap PinMap_DAC[] = { +//{PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 +//{PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 + {NC, NP, 0} +}; +#endif +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_I2C_SCL[] = { + {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_PWM[] = { +#if 0 + {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 1, 0)}, // TIM2_CH1 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM5_CH1 +#endif + {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM2_CH2 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 2, 0)}, // TIM2_CH2 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM5_CH2 +#endif + {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM2_CH3 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 3, 0)}, // TIM2_CH3 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM5_CH3 +#endif + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 4, 0)}, // TIM2_CH4 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 + {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM5_CH4 +#else + {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 +#endif + {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM3_CH1 + {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM8_CH1N + {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM1_CH1 + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 0)}, // TIM1_CH1 + {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM1_CH2 + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 0)}, // TIM1_CH2 + {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM1_CH3 + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 0)}, // TIM1_CH3 + {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM1_CH4 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 4, 0)}, // TIM1_CH4 + {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 1, 0)}, // TIM2_CH1 + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 1)}, // TIM1_CH2N + {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM3_CH3 + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 3, 0)}, // TIM3_CH3 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM8_CH2N +#endif + {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 1)}, // TIM1_CH3N + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 4, 0)}, // TIM3_CH4 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM8_CH3N +#endif + {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 2, 0)}, // TIM2_CH2 + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 2, 0)}, // TIM2_CH2 + {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 1, 0)}, // TIM3_CH1 + {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 2, 0)}, // TIM3_CH2 + {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM4_CH1 + {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM4_CH2 + {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM4_CH3 + {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM4_CH4 + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 3, 0)}, // TIM2_CH3 + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 3, 0)}, // TIM2_CH3 + {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 4, 0)}, // TIM2_CH4 + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 4, 0)}, // TIM2_CH4 + {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM1_CH1N + {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM1_CH2N + {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM1_CH3N + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 1, 0)}, // TIM3_CH1 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM8_CH1 +#endif + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 2, 0)}, // TIM3_CH2 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM8_CH2 +#endif + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 3, 0)}, // TIM3_CH3 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM8_CH3 + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 4, 0)}, // TIM3_CH4 +#if defined(STM32F103xE) || defined(STM32F103xG) + //{PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM8_CH4 +#endif + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 1, 0)}, // TIM4_CH1 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 2, 0)}, // TIM4_CH2 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 3, 0)}, // TIM4_CH3 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 4, 0)}, // TIM4_CH4 + {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 1, 1)}, // TIM1_CH1N + {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 1, 0)}, // TIM1_CH1 + {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 2, 1)}, // TIM1_CH2N + {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 2, 0)}, // TIM1_CH2 + {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 3, 1)}, // TIM1_CH3N + {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 3, 0)}, // TIM1_CH3 + {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_ENABLE, 4, 0)}, // TIM1_CH4 +#endif // if 0 + {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 1, 0)}, // TIM2_CH1 Part Fan + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 1, 0)}, // TIM4_CH1 TFT Backlight + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 2, 0)}, // TIM4_CH2 Servo connector + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RX[] = { + {PA_3, USART2, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, + {PA_10, USART1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, +//{PB_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RTS[] = { + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_CTS[] = { + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SSEL[] = { +//{PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, +//{PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + {NC, NP, 0} +}; + +//*** No CAN *** + +#ifdef HAL_CAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_RD[] = { + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_CAN_TD[] = { + {NC, NP, 0} +}; +#endif + +//*** No ETHERNET *** + +//*** No QUADSPI *** + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +WEAK const PinMap PinMap_USB[] = { + {PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_NONE)}, // USB_DM + {PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_NONE)}, // USB_DP + {NC, NP, 0} +}; +#endif + +//*** No USB_OTG_FS *** + +//*** No USB_OTG_HS *** + +//*** SD *** + +#if defined(STM32F103xE) || defined(STM32F103xG) +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { +//{PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D4 +//{PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D5 +//{PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D6 +//{PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PinNamesVar.h new file mode 100644 index 000000000000..9c07918364a5 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/PinNamesVar.h @@ -0,0 +1,32 @@ +/* SYS_WKUP */ +#if defined(PWR_WAKEUP_PIN1) && defined(HAL_PWR_MODULE_ENABLED) && !defined(HAL_PWR_MODULE_ONLY) + #error PA0 is used by thermal sensor, disable low power wake with -DHAL_PWR_MODULE_ONLY + SYS_WKUP1 = PA_0, +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + #warning USB feature is not required with a CH340 chip + USB_DM = PA_11, + USB_DP = PA_12, +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h new file mode 100644 index 000000000000..3a6b7037adf0 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/hal_conf_custom.h @@ -0,0 +1,320 @@ +/** + ****************************************************************************** + * @file hal_conf_custom.h for Longer3D STM32F103VE board + * @brief Overrides HAL default configuration file. + ****************************************************************************** + */ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief Include the default list of modules to be used in the HAL driver + * and manage module deactivation + */ +#include "stm32yyxx_hal_conf.h" + +#ifdef HAL_PCD_MODULE_ENABLED + #warning "No direct STM32 USB pins on Longer3D board" + #undef HAL_PCD_MODULE_ENABLED // USB Device +#endif + +#ifdef HAL_HCD_MODULE_ENABLED + #warning "No direct STM32 USB pins on Longer3D board" + #undef HAL_HCD_MODULE_ENABLED // USB Host +#endif + +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#define HAL_IWDG_MODULE_ENABLED // USE_WATCHDOG + +#undef HAL_PWR_MODULE_ENABLED +#define HAL_PWR_MODULE_ONLY // disable low power & PA0 wakeup pin (its T°c pin) + +#undef HAL_CAN_LEGACY_MODULE_ENABLED +#undef HAL_CAN_MODULE_ENABLED +#undef HAL_DAC_MODULE_ENABLED +#undef HAL_RTC_MODULE_ENABLED + +/** + * @brief List of modules in the framework (first ones enabled by default) + */ +//#define HAL_MODULE_ENABLED +//#define HAL_ADC_MODULE_ENABLED +//#define HAL_CORTEX_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_DMA_MODULE_ENABLED +//#define HAL_FLASH_MODULE_ENABLED +//#define HAL_GPIO_MODULE_ENABLED +//#define HAL_I2C_MODULE_ENABLED +//#define HAL_PCD_MODULE_ENABLED +//#define HAL_PWR_MODULE_ENABLED +//#define HAL_RCC_MODULE_ENABLED +//#define HAL_RTC_MODULE_ENABLED +//#define HAL_SD_MODULE_ENABLED +//#define HAL_SPI_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_TIM_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRC_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_IWDG_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_USART_MODULE_ENABLED // Useless.... UART_MODULE does it +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED + +/* ########################## Oscillator Values adaptation ####################*/ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#ifndef HSE_VALUE + #define HSE_VALUE 8000000U // Value of the External oscillator in Hz (8 MHz) +#endif + +#ifndef HSE_STARTUP_TIMEOUT + #define HSE_STARTUP_TIMEOUT 100U // Time out for HSE start up, in ms +#endif + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#ifndef HSI_VALUE + #define HSI_VALUE 8000000U // Value of the Internal oscillator in Hz +#endif + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#ifndef LSI_VALUE + #define LSI_VALUE 40000U // LSI Typical Value in Hz +#endif /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + * This value is used by the UART, RTC HAL module to compute the system frequency + */ +#ifndef LSE_VALUE + #define LSE_VALUE 32768U // Value of the External Low Speed oscillator in Hz +#endif + +#ifndef LSE_STARTUP_TIMEOUT + #define LSE_STARTUP_TIMEOUT 50U // No 32.7KHz LSE on this board, reduced to avoid delays +#endif + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#ifndef VDD_VALUE + #define VDD_VALUE 3300U // Value of VDD in mv +#endif +#ifndef TICK_INT_PRIORITY + #define TICK_INT_PRIORITY 0x00U // tick interrupt priority +#endif +#ifndef USE_RTOS + #define USE_RTOS 0U +#endif +#ifndef PREFETCH_ENABLE + #define PREFETCH_ENABLE 1U +#endif + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ +#if !defined(USE_SPI_CRC) +#define USE_SPI_CRC 0 +#endif + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED + #include "stm32f1xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED + #include "stm32f1xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED + #include "stm32f1xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED + #include "stm32f1xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED + #include "stm32f1xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED + #include "stm32f1xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED + #include "Legacy/stm32f1xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED + #include "stm32f1xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + #include "stm32f1xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED + #include "stm32f1xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED + #include "stm32f1xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED + #include "stm32f1xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED + #include "stm32f1xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED + #include "stm32f1xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED + #include "stm32f1xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED + #include "stm32f1xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED + #include "stm32f1xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED + #include "stm32f1xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED + #include "stm32f1xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED + #include "stm32f1xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED + #include "stm32f1xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED + #include "stm32f1xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED + #include "stm32f1xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED + #include "stm32f1xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED + #include "stm32f1xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED + #include "stm32f1xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED + #include "stm32f1xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED + #include "stm32f1xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED + #include "stm32f1xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED + #include "stm32f1xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED + #include "stm32f1xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED + #include "stm32f1xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED + #include "stm32f1xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + + +#define assert_param(expr) ((void)0U) + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/ldscript.ld new file mode 100644 index 000000000000..6bc577236a9c --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/ldscript.ld @@ -0,0 +1,189 @@ +/* +****************************************************************************** +** +** File : LinkerScript.ld +** +** Author : Auto-generated by STM32CubeIDE +** +** Abstract : Linker script for STM32F103V(8/B/C/E/F/GTx Device from STM32F1 series +** 64/128/256/512/768/1024Kbytes FLASH +** 20/20/48/64/64/96/96Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed as is without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2019 STMicroelectronics

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of STMicroelectronics nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of "RAM" Ram type memory */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Memories definition */ +MEMORY +{ + RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE + FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +} + +/* Sections */ +SECTIONS +{ + /* The startup code into "FLASH" Rom type memory */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data into "FLASH" Rom type memory */ + .text : + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data into "FLASH" Rom type memory */ + .rodata : { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { + . = ALIGN(4); + *(.ARM.extab* .gnu.linkonce.armextab.*) + . = ALIGN(4); + } >FLASH + + .ARM : { + . = ALIGN(4); + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + . = ALIGN(4); + } >FLASH + + .preinit_array : { + . = ALIGN(4); + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + . = ALIGN(4); + } >FLASH + + .init_array : { + . = ALIGN(4); + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + . = ALIGN(4); + } >FLASH + + .fini_array : { + . = ALIGN(4); + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + . = ALIGN(4); + } >FLASH + + /* Used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections into "RAM" Ram type memory */ + .data : { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + /* Uninitialized data section into "RAM" Ram type memory */ + . = ALIGN(4); + .bss : { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */ + ._user_heap_stack : { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + /* Remove information from the compiler libraries */ + /DISCARD/ : { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.cpp new file mode 100644 index 000000000000..007ef81065bf --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.cpp @@ -0,0 +1,249 @@ +/* + ******************************************************************************* + * Copyright (c) 2019, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + */ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Digital PinName array +const PinName digitalPin[] = { + PA_0, //D0 + PA_1, //D1 + PA_2, //D2 + PA_3, //D3 + PA_4, //D4 + PA_5, //D5 + PA_6, //D6 + PA_7, //D7 + PA_8, //D8 + PA_9, //D9 + PA_10, //D10 + PA_11, //D11 + PA_12, //D12 + PA_13, //D13 + PA_14, //D14 + PA_15, //D15 + + PB_0, //D16 + PB_1, //D17 + PB_2, //D18 + PB_3, //D19 + PB_4, //D20 + PB_5, //D21 + PB_6, //D22 + PB_7, //D23 + PB_8, //D24 + PB_9, //D25 + PB_10, //D26 + PB_11, //D27 + PB_12, //D28 + PB_13, //D29 + PB_14, //D30 + PB_15, //D31 + + PC_0, //D32 + PC_1, //D33 + PC_2, //D34 + PC_3, //D35 + PC_4, //D36 + PC_5, //D37 + PC_6, //D38 + PC_7, //D39 + PC_8, //D40 + PC_9, //D41 + PC_10, //D42 + PC_11, //D43 + PC_12, //D44 + PC_13, //D45 + PC_14, //D46 + PC_15, //D47 + + PD_0, //D48 + PD_1, //D49 + PD_2, //D50 + PD_3, //D51 + PD_4, //D52 + PD_5, //D53 + PD_6, //D54 + PD_7, //D55 + PD_8, //D56 + PD_9, //D57 + PD_10, //D58 + PD_11, //D59 + PD_12, //D60 + PD_13, //D61 + PD_14, //D62 + PD_15, //D63 + + PE_0, //D64 + PE_1, //D65 + PE_2, //D66 + PE_3, //D67 + PE_4, //D68 + PE_5, //D69 + PE_6, //D70 + PE_7, //D71 + PE_8, //D72 + PE_9, //D73 + PE_10, //D74 + PE_11, //D75 + PE_12, //D76 + PE_13, //D77 + PE_14, //D78 + PE_15, //D79 +}; + +// Analog (Ax) pin number array +const uint32_t analogInputPin[] = { + 0, // A0, PA0 + 1, // A1, PA1 + 2, // A2, PA2 + 3, // A3, PA3 + 4, // A4, PA4 + 5, // A5, PA5 + 6, // A6, PA6 + 7, // A7, PA7 + 16, // A8, PB0 + 17, // A9, PB1 + 32, // A10, PC0 + 33, // A11, PC1 + 34, // A12, PC2 + 35, // A13, PC3 + 36, // A14, PC4 + 37, // A15, PC5 +}; + +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ +static bool SetSysClock_PLL_HSE(bool bypass) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {}; + RCC_PeriphCLKInitTypeDef PeriphClkInit = {}; + bool ret = false; + + // Initializes the CPU, AHB and APB busses clocks + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + if (bypass == false) { + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + } else { + RCC_OscInitStruct.HSEState = RCC_HSE_BYPASS; + } + RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9; // 8Mhz x 9 = 72MHz + + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) == HAL_OK) { + // Initializes the CPU, AHB and APB busses clocks + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) == HAL_OK) { + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC | RCC_PERIPHCLK_USB; + PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6; + PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL_DIV1_5; // 72/1.5 = 48MHz + #ifndef USBCON + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC; + #endif + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) == HAL_OK) { + ret = true; + } + } + } + return ret; +} + +/******************************************************************************/ +/* PLL (clocked by HSI) used as System clock source (64MHz max) */ +/******************************************************************************/ +bool SetSysClock_PLL_HSI(void) +{ + RCC_OscInitTypeDef RCC_OscInitStruct = {}; + RCC_ClkInitTypeDef RCC_ClkInitStruct = {}; + RCC_PeriphCLKInitTypeDef PeriphClkInit = {}; + bool ret = false; + + // Initializes the CPU, AHB and APB busses clocks + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSIState = RCC_HSI_ON; + RCC_OscInitStruct.HSEState = RCC_HSE_OFF; + RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI_DIV2; // 4 MHz + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL12; // 48 MHz + #ifndef USBCON + // When the HSI is used as a PLL clock input, the maximum + // system clock frequency that can be achieved is 64 MHz. + RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL16; // 64 MHz, stay close to 72 for delay() + #endif + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) == HAL_OK) { + // Initializes the CPU, AHB and APB busses clocks + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; + + // FLASH_LATENCY_1 may cause boot loops + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) == HAL_OK) { + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC | RCC_PERIPHCLK_USB; + PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV4; + PeriphClkInit.UsbClockSelection = RCC_USBCLKSOURCE_PLL; // requires 48 MHz + #ifndef USBCON + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC;// No USB, RTC nor I2S + PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6; // 2 4 6 8 + #endif + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) == HAL_OK) { + ret = true; + } + } + } + return ret; +} + +void SystemClock_Config(void) +{ + /* + * If HSE_VALUE is not 8MHz and you want use it, then: + * - Redefine HSE_VALUE to the correct HSE_VALUE + * - Redefine SystemClock_Config() with the correct settings + */ +#if HSE_VALUE == 8000000U + // 1- Try to start with HSE and external 8MHz xtal + if (SetSysClock_PLL_HSE(false) == false) { + // 2- If fail try to start with HSE and external clock + if (SetSysClock_PLL_HSE(true) == false) { +#endif + // 3- If fail start with HSI clock + if (SetSysClock_PLL_HSI() == false) { + Error_Handler(); + } +#if HSE_VALUE == 8000000U + } + } +#endif +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h new file mode 100644 index 000000000000..56ae719077ce --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103VE_LONGER/variant.h @@ -0,0 +1,175 @@ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// STM32F103VET6 | DIGITAL | ANALOG | USART | TWI | SPI | SPECIAL | +//------------------|-------------|---------------|------------|-----------|----------------------|------------| +#define PA0 0 // | | A0 Nozzle T°c | | | | | +#define PA1 1 // | | A1 Bed T°c | | | | | +#define PA2 2 // | | | USART2_TX | | | | +#define PA3 3 // | | DAC_OUT1** | USART2_RX | | | | +#define PA4 4 // | | DAC_OUT2** | | | SPI1_SS*(wired?) | | +#define PA5 5 // | O | | | | SPI1_SCK EEPROM | | +#define PA6 6 // | I | | | | SPI1_MISO EEPROM | | +#define PA7 7 // | O | | | | SPI1_MOSI EEPROM | | +#define PA8 8 // | Od BED | | | | | | +#define PA9 9 // | | | USART1_TX | | | | +#define PA10 10 // | | | USART1_RX | | | | +#define PA11 11 // | I | | | | | USB_DM | +#define PA12 12 // | I | | | | | USB_DP | +#define PA13 13 // | I | | | | | SWD_SWDIO | +#define PA14 14 // | I | | | | | SWD_SWCLK | +#define PA15 15 // | Od FAN | | | | | | +// |-------------|---------------|------------|-----------|----------------------|------------| +#define PB0 16 // | | | | | | | +#define PB1 17 // | | | | | | | +#define PB2 18 // | I+ | | | | | BOOT1 | +#define PB3 19 // | O X_DIR | | | | | | +#define PB4 20 // | O X_STEP | | | | | | +#define PB5 21 // | O X_EN | | | | | | +#define PB6 22 // | O Y_DIR | | | | | | +#define PB7 23 // | O Y_STEP | | | | | | +#define PB8 24 // | O Y_EN | | | | | | +#define PB9 25 // | O Z_DIR | | | | | | +#define PB10 26 // | I+ | | USART3_TX* | TWI2_SCL* | | | +#define PB11 27 // | I+ | | USART3_RX* | TWI2_SDA* | | | +#define PB12 28 // | O TFT | | | | SPI2_SS | TOUCH_CS | +#define PB13 29 // | O TFT | | | | SPI2_SCK | TOUCH_SCK | +#define PB14 30 // | O TFT | | | | SPI2_MISO (bad>MOSI) | TOUCH_MOSI | +#define PB15 31 // | I TFT | | | | SPI2_MOSI (bad>MISO) | TOUCH_MISO | +// |-------------|---------------|------------|-----------|----------------------|------------| +#define PC0 32 // | I E_OUT | | | | | | +#define PC1 33 // | I+ X_MIN | | | | | | +#define PC2 34 // | O LED | | | | | | +#define PC3 35 // | I+ | | | | | | +#define PC4 36 // | O TFT | | | | | TFT RESET | +#define PC5 37 // | O CS1 | | | | for SPI1 EEPROM CS | | +#define PC6 38 // | I TFT | | | | | TOUCH_INT | +#define PC7 39 // | | | | | | | +#define PC8 40 // | x SDIO | | | | | SD_D0 | +#define PC9 41 // | x SDIO | | | | | SD_D1 | +#define PC10 42 // | x SDIO | | | | | SD_D2 | +#define PC11 43 // | x SDIO | | | | | SD_D3 | +#define PC12 44 // | O SDIO | | | | | SD_CLK | +#define PC13 45 // | I | | | | | | +#define PC14 46 // | I+ Y_MAX | | | | | | +#define PC15 47 // | I+ Y_MIN | | | | | | +// |-------------|---------------|------------|-----------|----------------------|------------| +#define PD0 48 // | O TFT | | | | | OSC_IN D2 | +#define PD1 49 // | O TFT | | | | | OSC_OUT D3 | +#define PD2 50 // | O SDIO | | | | | SD_CMD | +#define PD3 51 // | Od NOZZLE | | | | | | +#define PD4 52 // | O TFT | | | | | FSMC_NOE | +#define PD5 53 // | O TFT | | | | | FSMC_NWE | +#define PD6 54 // | I wired?* | | | | | FSMC_NWAIT*| +#define PD7 55 // | O TFT | | | | | FSMC_NE1/CS| +#define PD8 56 // | O TFT | | | | | FSMC_D13 | +#define PD9 57 // | O TFT | | | | | FSMC_D14 | +#define PD10 58 // | O TFT | | | | | FSMC_D15 | +#define PD11 59 // | O TFT | | | | | FSMC_A16 | +#define PD12 60 // | O TFT | | | | | TFT BL | +#define PD13 61 // | Od PWM* | | | | | SERVO0 | +#define PD14 62 // | O TFT | | | | | FSMC_D00 | +#define PD15 63 // | O TFT | | | | | FSMC_D01 | +// |-------------|---------------|------------|-----------|----------------------|------------| +#define PE0 64 // | O Z_STEP | | | | | | +#define PE1 65 // | O Z_EN | | | | | | +#define PE2 66 // | O E0_DIR | | | | | | +#define PE3 67 // | O E0_STEP | | | | | | +#define PE4 68 // | O E0_EN | | | | | | +#define PE5 69 // | I+ Z_MAX | | | | | | +#define PE6 70 // | I+ Z_MIN | | | | | | +#define PE7 71 // | O TFT | | | | | FSMC_D04 | +#define PE8 72 // | O TFT | | | | | FSMC_D05 | +#define PE9 73 // | O TFT | | | | | FSMC_D06 | +#define PE10 74 // | O TFT | | | | | FSMC_D07 | +#define PE11 75 // | O TFT | | | | | FSMC_D08 | +#define PE12 76 // | O TFT | | | | | FSMC_D09 | +#define PE13 77 // | O TFT | | | | | FSMC_D10 | +#define PE14 78 // | O TFT | | | | | FSMC_D11 | +#define PE15 79 // | O TFT | | | | | FSMC_D12 | +//------------------|-------------|---------------|------------|-----------|----------------------|------------| + +// This must be a literal +#define NUM_DIGITAL_PINS 80 +#define NUM_ANALOG_INPUTS 16 // 2 first are used, but cant be reduced to 2... + +// On-board LED pin number +#ifndef LED_BUILTIN +#define LED_BUILTIN PC2 +#endif + +// On-board user button (not wired) +#ifndef USER_BTN +#define USER_BTN PC13 +#endif + +// SPI Definition (SPI1 EEPROM) +#define PIN_SPI_SS PC5 +#define PIN_SPI_MOSI PA7 +#define PIN_SPI_MISO PA6 +#define PIN_SPI_SCK PA5 + +// I2C Definition (Unused) +#define PIN_WIRE_SDA PB11 +#define PIN_WIRE_SCL PB10 + +// Timer Definitions +// Leave TIMER 2 for optional Fan PWM +#define TEMP_TIMER 3 +// Leave TIMER 4 for TFT backlight PWM or Servo freq... +#define STEP_TIMER 5 +#define TIMER_TONE TIM6 +#define TIMER_SERVO TIM7 +#define TIMER_SERIAL TIM8 + +// UART Definitions +// Define here Serial instance number to map on Serial generic name +#define SERIAL_UART_INSTANCE 1 + +// Default pin used for 'Serial' instance (linked to CH340 USB port) +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 +#define PIN_SERIAL1_RX PA10 +#define PIN_SERIAL1_TX PA9 +// Default pin used for 'Serial2' instance (connector exists but unsoldered) +#define PIN_SERIAL2_RX PA3 +#define PIN_SERIAL2_TX PA2 + +// Extra HAL modules +#if defined(STM32F103xE) +//#define HAL_DAC_MODULE_ENABLED (unused or maybe for the eeprom write?) +#define HAL_SD_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#endif + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #define SERIAL_PORT_MONITOR Serial1 + #define SERIAL_PORT_HARDWARE Serial1 + #define SERIAL_PORT_HARDWARE_OPEN Serial2 +#endif + diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/PeripheralPins.c index c9d2bb88b87a..339a55916c14 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/PeripheralPins.c @@ -25,61 +25,61 @@ #ifdef HAL_ADC_MODULE_ENABLED WEAK const PinMap PinMap_ADC[] = { {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 - // {PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 + //{PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 + //{PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 #endif {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 - // {PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 + //{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + //{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 #endif {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 - // {PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 + //{PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 + //{PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 #endif {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 - // {PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 + //{PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 + //{PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 #endif {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 - // {PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 + //{PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 - // {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + //{PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 - // {PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 + //{PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 - // {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + //{PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 - // {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 + //{PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 - // {PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + //{PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 - // {PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 + //{PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 + //{PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 #endif {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 - // {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 + //{PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 + //{PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 #endif {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 - // {PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 + //{PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 + //{PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 #endif {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 - // {PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 + //{PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 + //{PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 #endif {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 - // {PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 + //{PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 - // {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + //{PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 {NC, NP, 0} }; #endif @@ -105,9 +105,7 @@ WEAK const PinMap PinMap_I2C_SDA[] = { {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_I2C_MODULE_ENABLED WEAK const PinMap PinMap_I2C_SCL[] = { {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_I2C1_ENABLE)}, @@ -121,105 +119,105 @@ WEAK const PinMap PinMap_I2C_SCL[] = { #ifdef HAL_TIM_MODULE_ENABLED WEAK const PinMap PinMap_PWM[] = { {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM2_CH1 - // {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 1, 0)}, // TIM2_CH1 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM5_CH1 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM5_CH1 #endif {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM2_CH2 - // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 2, 0)}, // TIM2_CH2 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 2, 0)}, // TIM2_CH2 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM5_CH2 + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM5_CH2 #endif {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM2_CH3 - // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 3, 0)}, // TIM2_CH3 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 3, 0)}, // TIM2_CH3 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM5_CH3 #endif #ifdef STM32F103xG - // {PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM9_CH1 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM9_CH1 #endif - // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 4, 0)}, // TIM2_CH4 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM5_CH4 #else {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 #endif #if defined(STM32F103xG) - // {PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM9_CH2 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM9_CH2 #endif {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM3_CH1 #if defined(STM32F103xG) - // {PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM13_CH1 + //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM13_CH1 #endif {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 1)}, // TIM1_CH1N - // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM3_CH2 - // {PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM8_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM8_CH1N #if defined(STM32F103xG) - // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM14_CH1 + //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM14_CH1 #endif {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM1_CH1 - // {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 0)}, // TIM1_CH1 + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 0)}, // TIM1_CH1 {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM1_CH2 - // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 0)}, // TIM1_CH2 + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 0)}, // TIM1_CH2 {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM1_CH3 - // {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 0)}, // TIM1_CH3 + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 0)}, // TIM1_CH3 {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM1_CH4 - // {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 4, 0)}, // TIM1_CH4 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 4, 0)}, // TIM1_CH4 {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 1, 0)}, // TIM2_CH1 - // {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 1, 0)}, // TIM2_CH1 - // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 1)}, // TIM1_CH2N + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 1)}, // TIM1_CH2N {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM3_CH3 - // {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 3, 0)}, // TIM3_CH3 + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 3, 0)}, // TIM3_CH3 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM8_CH2N + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM8_CH2N #endif {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 1)}, // TIM1_CH3N - // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM3_CH4 - // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 4, 0)}, // TIM3_CH4 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM8_CH3N + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM8_CH3N #endif {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 2, 0)}, // TIM2_CH2 - // {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 2, 0)}, // TIM2_CH2 + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 2, 0)}, // TIM2_CH2 {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 1, 0)}, // TIM3_CH1 {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 2, 0)}, // TIM3_CH2 {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM4_CH1 {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM4_CH2 {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM4_CH3 #if defined(STM32F103xG) - // {PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM10_CH1 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM10_CH1 #endif {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM4_CH4 #if defined(STM32F103xG) - // {PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM11_CH1 + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM11_CH1 #endif {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 3, 0)}, // TIM2_CH3 - // {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 3, 0)}, // TIM2_CH3 + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 3, 0)}, // TIM2_CH3 {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 4, 0)}, // TIM2_CH4 - // {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 4, 0)}, // TIM2_CH4 + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 4, 0)}, // TIM2_CH4 {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM1_CH1N {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM1_CH2N #if defined(STM32F103xG) - // {PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM12_CH1 + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM12_CH1 #endif {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM1_CH3N #if defined(STM32F103xG) - // {PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM12_CH2 + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM12_CH2 #endif {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 1, 0)}, // TIM3_CH1 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM8_CH1 + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM8_CH1 #endif {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 2, 0)}, // TIM3_CH2 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM8_CH2 + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM8_CH2 #endif {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 3, 0)}, // TIM3_CH3 - // {PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM8_CH3 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM8_CH3 {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 4, 0)}, // TIM3_CH4 #if defined(STM32F103xE) || defined(STM32F103xG) - // {PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM8_CH4 + //{PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM8_CH4 #endif {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 1, 0)}, // TIM4_CH1 {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 2, 0)}, // TIM4_CH2 @@ -248,29 +246,27 @@ WEAK const PinMap PinMap_UART_TX[] = { {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART1_ENABLE)}, {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, -#if defined(STM32F103xE) || defined(STM32F103xG) - // {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, - {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, -#else - {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, -#endif -#if defined(STM32F103xE) || defined(STM32F103xG) - {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, -#endif + #if defined(STM32F103xE) || defined(STM32F103xG) + //{PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, + {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + #else + {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, + #endif + #if defined(STM32F103xE) || defined(STM32F103xG) + {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, + #endif {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART2_ENABLE)}, {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_ENABLE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_RX[] = { {PA_3, USART2, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, {PA_10, USART1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, {PB_7, USART1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART1_ENABLE)}, {PB_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, #if defined(STM32F103xE) || defined(STM32F103xG) - // {PC_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, + //{PC_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, {PC_11, UART4, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, #else {PC_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, @@ -282,26 +278,22 @@ WEAK const PinMap PinMap_UART_RX[] = { {PD_9, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART3_ENABLE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_RTS[] = { {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, - // {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, + //{PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART2_ENABLE)}, {PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_ENABLE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_CTS[] = { {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, - // {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, + //{PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART2_ENABLE)}, {PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_ENABLE)}, {NC, NP, 0} @@ -314,7 +306,7 @@ WEAK const PinMap PinMap_UART_CTS[] = { WEAK const PinMap PinMap_SPI_MOSI[] = { {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, #if defined(STM32F103xE) || defined(STM32F103xG) - // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, #else {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, @@ -322,13 +314,11 @@ WEAK const PinMap PinMap_SPI_MOSI[] = { {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_MISO[] = { {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, #if defined(STM32F103xE) || defined(STM32F103xG) - // {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, #else {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, @@ -336,13 +326,11 @@ WEAK const PinMap PinMap_SPI_MISO[] = { {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_SCLK[] = { {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, #if defined(STM32F103xE) || defined(STM32F103xG) - // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, #else {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, @@ -350,13 +338,11 @@ WEAK const PinMap PinMap_SPI_SCLK[] = { {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_SSEL[] = { {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, #if defined(STM32F103xE) || defined(STM32F103xG) - // {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, #else {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, @@ -375,9 +361,7 @@ WEAK const PinMap PinMap_CAN_RD[] = { {PD_0, CAN1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_CAN1_3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_CAN_MODULE_ENABLED WEAK const PinMap PinMap_CAN_TD[] = { {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_CAN1_2)}, diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld index c9197c8b451a..a65b07d61c5f 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/ldscript.ld @@ -162,7 +162,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h index b622b39376b9..496d8817a181 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Vx/variant.h @@ -132,8 +132,12 @@ extern "C" { // Timer Definitions (optional) // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin -#define TIMER_TONE TIM3 -#define TIMER_SERVO TIM2 +#ifndef TIMER_TONE + #define TIMER_TONE TIM6 +#endif +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM7 +#endif // UART Definitions // Define here Serial instance number to map on Serial generic name diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PeripheralPins.c index 5736e5206e09..0d7365c9c5ab 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PeripheralPins.c @@ -25,45 +25,45 @@ #ifdef HAL_ADC_MODULE_ENABLED WEAK const PinMap PinMap_ADC[] = { {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 - // {PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 - // {PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 + //{PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 + //{PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 - // {PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 - // {PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 - // {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 + //{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 + //{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + //{PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 {PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 - // {PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 + //{PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 - // {PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 - // {PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 - // {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 + //{PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 + //{PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 + //{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 {PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 - // {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 - // {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + //{PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + //{PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 {PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 - // {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 - // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + //{PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + //{PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 - // {PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 - // {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 + //{PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + //{PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 {PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 - // {PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 + //{PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 - // {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 - // {PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 - // {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 + //{PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 + //{PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 + //{PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 {PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 - // {PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 + //{PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 - // {PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 - // {PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 - // {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 + //{PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 + //{PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 + //{PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 {PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 - // {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + //{PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 {PF_6, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC3_IN4 {PF_7, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC3_IN5 {PF_8, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC3_IN6 @@ -92,9 +92,7 @@ WEAK const PinMap PinMap_I2C_SDA[] = { {PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_I2C_MODULE_ENABLED WEAK const PinMap PinMap_I2C_SCL[] = { {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_NONE)}, {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, AFIO_I2C1_ENABLE)}, @@ -108,86 +106,86 @@ WEAK const PinMap PinMap_I2C_SCL[] = { #ifdef HAL_TIM_MODULE_ENABLED WEAK const PinMap PinMap_PWM[] = { {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM2_CH1 - // {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 1, 0)}, // TIM2_CH1 - // {PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM5_CH1 - // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM2_CH2 - // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 2, 0)}, // TIM2_CH2 + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM5_CH1 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM2_CH2 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 2, 0)}, // TIM2_CH2 {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM5_CH2 {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM2_CH3 - // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 3, 0)}, // TIM2_CH3 - // {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 3, 0)}, // TIM2_CH3 + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM5_CH3 #ifdef STM32F103xG - // {PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM9_CH1 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM9_CH1 #endif - // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 - // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 4, 0)}, // TIM2_CH4 {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM5_CH4 #ifdef STM32F103xG - // {PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM9_CH2 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM9_CH2 #endif {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM3_CH1 #ifdef STM32F103xG - // {PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM13_CH1 + //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM13_CH1 #endif - // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 1)}, // TIM1_CH1N - // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM3_CH2 {PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM8_CH1N #ifdef STM32F103xG - // {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM14_CH1 + //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM14_CH1 #endif {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM1_CH1 - // {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 0)}, // TIM1_CH1 + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 1, 0)}, // TIM1_CH1 {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM1_CH2 - // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 0)}, // TIM1_CH2 + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 0)}, // TIM1_CH2 {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM1_CH3 - // {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 0)}, // TIM1_CH3 + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 0)}, // TIM1_CH3 {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM1_CH4 - // {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 4, 0)}, // TIM1_CH4 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 4, 0)}, // TIM1_CH4 {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 1, 0)}, // TIM2_CH1 - // {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 1, 0)}, // TIM2_CH1 - // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 1)}, // TIM1_CH2N + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 2, 1)}, // TIM1_CH2N {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM3_CH3 - // {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 3, 0)}, // TIM3_CH3 + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 3, 0)}, // TIM3_CH3 {PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM8_CH2N {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM1_PARTIAL, 3, 1)}, // TIM1_CH3N - // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM3_CH4 - // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 4, 0)}, // TIM3_CH4 - // {PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM8_CH3N + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM8_CH3N {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_1, 2, 0)}, // TIM2_CH2 - // {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 2, 0)}, // TIM2_CH2 + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 2, 0)}, // TIM2_CH2 {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 1, 0)}, // TIM3_CH1 {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_PARTIAL, 2, 0)}, // TIM3_CH2 {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM4_CH1 {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM4_CH2 {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM4_CH3 #ifdef STM32F103xG - // {PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM10_CH1 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM10_CH1 #endif {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM4_CH4 #ifdef STM32F103xG - // {PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM11_CH1 + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM11_CH1 #endif - // {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 3, 0)}, // TIM2_CH3 + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 3, 0)}, // TIM2_CH3 {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 3, 0)}, // TIM2_CH3 - // {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 4, 0)}, // TIM2_CH4 + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_PARTIAL_2, 4, 0)}, // TIM2_CH4 {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM2_ENABLE, 4, 0)}, // TIM2_CH4 {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 1)}, // TIM1_CH1N {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 1)}, // TIM1_CH2N #ifdef STM32F103xG - // {PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM12_CH1 + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM12_CH1 #endif {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 1)}, // TIM1_CH3N #ifdef STM32F103xG - // {PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM12_CH2 + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM12_CH2 #endif - // {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 1, 0)}, // TIM3_CH1 + //{PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 1, 0)}, // TIM3_CH1 {PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 1, 0)}, // TIM8_CH1 - // {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 2, 0)}, // TIM3_CH2 + //{PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 2, 0)}, // TIM3_CH2 {PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 2, 0)}, // TIM8_CH2 {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 3, 0)}, // TIM3_CH3 - // {PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM8_CH3 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 3, 0)}, // TIM8_CH3 {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM3_ENABLE, 4, 0)}, // TIM3_CH4 - // {PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM8_CH4 + //{PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE, 4, 0)}, // TIM8_CH4 {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 1, 0)}, // TIM4_CH1 {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 2, 0)}, // TIM4_CH2 {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_TIM4_ENABLE, 3, 0)}, // TIM4_CH3 @@ -222,47 +220,41 @@ WEAK const PinMap PinMap_UART_TX[] = { {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART1_ENABLE)}, {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, - // {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, + //{PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART2_ENABLE)}, {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_ENABLE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_RX[] = { {PA_3, USART2, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, {PA_10, USART1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, {PB_7, USART1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART1_ENABLE)}, {PB_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, {PC_11, UART4, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, - // {PC_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, + //{PC_11, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, {PD_2, UART5, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_NONE)}, {PD_6, USART2, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART2_ENABLE)}, {PD_9, USART3, STM_PIN_DATA(STM_MODE_INPUT, GPIO_PULLUP, AFIO_USART3_ENABLE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_RTS[] = { {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, - // {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, + //{PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART2_ENABLE)}, {PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_ENABLE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_CTS[] = { {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, - // {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, + //{PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_PARTIAL)}, {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART2_ENABLE)}, {PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_USART3_ENABLE)}, {NC, NP, 0} @@ -274,37 +266,31 @@ WEAK const PinMap PinMap_UART_CTS[] = { #ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_MOSI[] = { {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, - // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_MISO[] = { {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, - // {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_SCLK[] = { {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, - // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_SSEL[] = { {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, - // {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_SPI1_ENABLE)}, {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, {NC, NP, 0} @@ -320,9 +306,7 @@ WEAK const PinMap PinMap_CAN_RD[] = { {PD_0, CAN1, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, AFIO_CAN1_3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_CAN_MODULE_ENABLED WEAK const PinMap PinMap_CAN_TD[] = { {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_NONE)}, {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, AFIO_CAN1_2)}, @@ -353,10 +337,10 @@ WEAK const PinMap PinMap_USB[] = { #ifdef HAL_SD_MODULE_ENABLED WEAK const PinMap PinMap_SD[] = { - // {PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D4 - // {PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D5 - // {PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D6 - // {PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D7 + //{PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D4 + //{PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D5 + //{PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D6 + //{PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D7 {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D0 {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D1 {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, AFIO_NONE)}, // SDIO_D2 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PinNamesVar.h index d9076b4dfb59..b0259ab3355a 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PinNamesVar.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/PinNamesVar.h @@ -1,5 +1,6 @@ /* SYS_WKUP */ -#ifdef PWR_WAKEUP_PIN1 +#if defined(PWR_WAKEUP_PIN1) && defined(HAL_PWR_MODULE_ENABLED) && !defined(HAL_PWR_MODULE_ONLY) + #error "PA0 is used by thermal sensor. Disable low power wake with -DHAL_PWR_MODULE_ONLY." SYS_WKUP1 = PA_0, #endif #ifdef PWR_WAKEUP_PIN2 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h index 014943f311ed..a41247b9b1f6 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/hal_conf_custom.h @@ -33,45 +33,47 @@ extern "C" { * and manage module deactivation */ #include "stm32yyxx_hal_conf.h" -#if 0 + /** * @brief This is the list of modules to be used in the HAL driver */ #define HAL_MODULE_ENABLED #define HAL_ADC_MODULE_ENABLED -#define HAL_CAN_MODULE_ENABLED -/*#define HAL_CAN_LEGACY_MODULE_ENABLED*/ -#define HAL_CEC_MODULE_ENABLED -#define HAL_CORTEX_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED -#define HAL_DAC_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED -#define HAL_ETH_MODULE_ENABLED -#define HAL_EXTI_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_FLASH_MODULE_ENABLED #define HAL_GPIO_MODULE_ENABLED -#define HAL_HCD_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED -#define HAL_I2S_MODULE_ENABLED -#define HAL_IRDA_MODULE_ENABLED #define HAL_IWDG_MODULE_ENABLED -#define HAL_NAND_MODULE_ENABLED -#define HAL_NOR_MODULE_ENABLED -#define HAL_PCCARD_MODULE_ENABLED -#define HAL_PCD_MODULE_ENABLED -#define HAL_PWR_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED -#define HAL_RTC_MODULE_ENABLED -#define HAL_SD_MODULE_ENABLED -#define HAL_SMARTCARD_MODULE_ENABLED #define HAL_SPI_MODULE_ENABLED #define HAL_SRAM_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED -#define HAL_UART_MODULE_ENABLED #define HAL_USART_MODULE_ENABLED -#define HAL_WWDG_MODULE_ENABLED -#define HAL_MMC_MODULE_ENABLED -#endif +#define HAL_CORTEX_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED // by default +//#define HAL_PCD_MODULE_ENABLED // Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) +#define HAL_SD_MODULE_ENABLED + +#undef HAL_CAN_MODULE_ENABLED +#undef HAL_CAN_LEGACY_MODULE_ENABLED +#undef HAL_CEC_MODULE_ENABLED +#undef HAL_DAC_MODULE_ENABLED +#undef HAL_ETH_MODULE_ENABLED +#undef HAL_HCD_MODULE_ENABLED // USB Host +#undef HAL_I2S_MODULE_ENABLED +#undef HAL_IRDA_MODULE_ENABLED +#undef HAL_NAND_MODULE_ENABLED +#undef HAL_NOR_MODULE_ENABLED +#undef HAL_PCCARD_MODULE_ENABLED +#undef HAL_PWR_MODULE_ENABLED +#undef HAL_RTC_MODULE_ENABLED +#undef HAL_SMARTCARD_MODULE_ENABLED +#undef HAL_WWDG_MODULE_ENABLED +#undef HAL_MMC_MODULE_ENABLED + +#define HAL_PWR_MODULE_ONLY /* ########################## Oscillator Values adaptation ####################*/ /** diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld index 09088b622c87..cc4b323f763a 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Zx/ldscript.ld @@ -162,7 +162,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h index 92e9fecb4d63..58e9646b57f5 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/hal_conf_custom.h @@ -33,55 +33,54 @@ extern "C" { */ #define HAL_MODULE_ENABLED #define HAL_ADC_MODULE_ENABLED -/* #define HAL_CAN_MODULE_ENABLED */ -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ #define HAL_CRC_MODULE_ENABLED -/* #define HAL_CEC_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ #define HAL_DAC_MODULE_ENABLED -/* #define HAL_DCMI_MODULE_ENABLED */ #define HAL_DMA_MODULE_ENABLED -/* #define HAL_DMA2D_MODULE_ENABLED */ -/* #define HAL_ETH_MODULE_ENABLED */ +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_FLASH_MODULE_ENABLED -/* #define HAL_NAND_MODULE_ENABLED */ -/* #define HAL_NOR_MODULE_ENABLED */ -/* #define HAL_PCCARD_MODULE_ENABLED */ -/* #define HAL_SRAM_MODULE_ENABLED */ -/* #define HAL_SDRAM_MODULE_ENABLED */ -/* #define HAL_HASH_MODULE_ENABLED */ #define HAL_GPIO_MODULE_ENABLED -/* #define HAL_EXTI_MODULE_ENABLED */ #define HAL_I2C_MODULE_ENABLED -/* #define HAL_SMBUS_MODULE_ENABLED */ -/* #define HAL_I2S_MODULE_ENABLED */ -/* #define HAL_IWDG_MODULE_ENABLED */ -/* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_DSI_MODULE_ENABLED */ #define HAL_PWR_MODULE_ENABLED -/* #define HAL_QSPI_MODULE_ENABLED */ #define HAL_RCC_MODULE_ENABLED -/* #define HAL_RNG_MODULE_ENABLED */ #define HAL_RTC_MODULE_ENABLED -/* #define HAL_SAI_MODULE_ENABLED */ #define HAL_SD_MODULE_ENABLED #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED -/* #define HAL_UART_MODULE_ENABLED */ -/* #define HAL_USART_MODULE_ENABLED */ -/* #define HAL_IRDA_MODULE_ENABLED */ -/* #define HAL_SMARTCARD_MODULE_ENABLED */ -/* #define HAL_WWDG_MODULE_ENABLED */ #define HAL_CORTEX_MODULE_ENABLED -#ifndef HAL_PCD_MODULE_ENABLED - #define HAL_PCD_MODULE_ENABLED //Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) -#endif -/* #define HAL_HCD_MODULE_ENABLED */ -/* #define HAL_FMPI2C_MODULE_ENABLED */ -/* #define HAL_SPDIFRX_MODULE_ENABLED */ -/* #define HAL_DFSDM_MODULE_ENABLED */ -/* #define HAL_LPTIM_MODULE_ENABLED */ -/* #define HAL_MMC_MODULE_ENABLED */ +//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) + +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_IWDG_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED +//#define HAL_USART_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED /* ########################## HSE/HSI Values adaptation ##################### */ /** @@ -204,7 +203,7 @@ in voltage and temperature. */ * @brief Uncomment the line below to expanse the "assert_param" macro in the * HAL drivers code */ -/* #define USE_FULL_ASSERT 1U */ +//#define USE_FULL_ASSERT 1U /* ################## Ethernet peripheral configuration ##################### */ @@ -492,5 +491,4 @@ void assert_failed(uint8_t *file, uint32_t line); #endif /* __STM32F4xx_HAL_CONF_CUSTOM_H */ - /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/ldscript.ld index efe2db5cd472..68b65973226f 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h index 4e7e299f1c86..3eed1473093c 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F407VE/variant.h @@ -298,7 +298,7 @@ extern "C" { #define PIN_WIRE_SCL PB6 // Timer Definitions -//Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c +// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c #define TIMER_TONE TIM6 // Do not use basic timer: OC is required diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/PeripheralPins.c new file mode 100644 index 000000000000..54439083d4c7 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/PeripheralPins.c @@ -0,0 +1,426 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + * Automatically generated from STM32F446V(C-E)Tx.xml + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Note: Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 + //{PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 + //{PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 + //{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 + //{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 + //{PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 + //{PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 + //{PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 + //{PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 + {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 + //{PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 + {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 + //{PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + //{PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 + //{PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + //{PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 + {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 + //{PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 + //{PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 + //{PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 + //{PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 + //{PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 + {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 + //{PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 + //{PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 + {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 + //{PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 + //{PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 + //{PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 + {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 + //{PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#ifdef HAL_DAC_MODULE_ENABLED +WEAK const PinMap PinMap_DAC[] = { + //{PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 + //{PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 - LD2 + {NC, NP, 0} +}; +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + //{PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + //{PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + //{PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + //{PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + //{PC_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_I2C_SCL[] = { + //{PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + //{PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + //{PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_PWM[] = { + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + {PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + {PB_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + //{PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + //{PB_8, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PB_9, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + {PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + {PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + //{PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + //{PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + //{PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + //{PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PE_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RX[] = { + //{PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + //{PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + //{PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {PE_7, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RTS[] = { + //{PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, + //{PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_CTS[] = { + //{PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PB_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_9, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, + //{PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_0, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + //{PB_2, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + //{PC_1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)}, + //{PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PD_0, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PD_6, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)}, + //{PE_6, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_14, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PD_0, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_5, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_13, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_7, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PD_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PE_2, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_12, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SSEL[] = { + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + //{PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PD_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + //{PE_4, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_11, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; +#endif + +//*** CAN *** + +#ifdef HAL_CAN_MODULE_ENABLED +WEAK const PinMap PinMap_CAN_RD[] = { + //{PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + //{PB_5, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + //{PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + //{PB_12, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + //{PD_0, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_CAN_TD[] = { + //{PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + //{PB_6, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + //{PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + //{PB_13, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + //{PD_1, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + {NC, NP, 0} +}; +#endif + +//*** No ETHERNET *** + +//*** QUADSPI *** + +#ifdef HAL_QSPI_MODULE_ENABLED +WEAK const PinMap PinMap_QUADSPI_DATA0[] = { + //{PC_9, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO0 + //{PD_11, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO0 + //{PE_7, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK2_IO0 + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_QUADSPI_DATA1[] = { + //{PC_10, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO1 + //{PD_12, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO1 + //{PE_8, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK2_IO1 + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_QUADSPI_DATA2[] = { + //{PE_2, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO2 + //{PE_9, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK2_IO2 + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_QUADSPI_DATA3[] = { + {PA_1, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO3 + //{PD_13, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO3 + //{PE_10, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK2_IO3 + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_QUADSPI_SCLK[] = { + //{PB_2, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_CLK + //{PD_3, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_CLK + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_QUADSPI_SSEL[] = { + //{PB_6, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK1_NCS + //{PC_11, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK2_NCS + {NC, NP, 0} +}; +#endif + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +WEAK const PinMap PinMap_USB_OTG_FS[] = { + //{PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF + //{PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS + //{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID + {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM + {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_USB_OTG_HS[] = { +#ifdef USE_USB_HS_IN_FS + //{PA_4, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_SOF + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS + //{PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM + //{PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP +#else + //{PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0 + //{PA_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_CK + //{PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D1 + //{PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D2 + //{PB_2, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D4 + //{PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D7 + //{PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D3 + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D5 + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D6 + //{PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_STP + //{PC_2, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR + //{PC_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT +#endif /* USE_USB_HS_IN_FS */ + {NC, NP, 0} +}; +#endif + +//*** SD *** + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { + //{PB_0, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 + //{PB_1, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 + //{PB_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK + //{PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4 + //{PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5 + //{PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6 + //{PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7 + //{PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0 + //{PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 + //{PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 + //{PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3 + //{PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK + //{PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/PinNamesVar.h new file mode 100644 index 000000000000..bff3f2134987 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/PinNamesVar.h @@ -0,0 +1,30 @@ +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, /* SYS_WKUP0 */ +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + USB_OTG_FS_DM = PA_11, + USB_OTG_FS_DP = PA_12, +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/ldscript.ld new file mode 100644 index 000000000000..a375232d5981 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/ldscript.ld @@ -0,0 +1,184 @@ +/* +***************************************************************************** +** +** File : lscript.ld +** +** Abstract : Linker script for STM32F446VE Device with +** 512KByte FLASH, 128KByte RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** +** Distribution: The file is distributed as is, without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2014 Ac6

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of Ac6 nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text ALIGN(4): + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata ALIGN(4): + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + /*_siccmram = LOADADDR(.ccmram);*/ + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss section */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(4); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(4); + } >RAM + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.cpp new file mode 100644 index 000000000000..16e11f0a91ee --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.cpp @@ -0,0 +1,212 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Pin number +const PinName digitalPin[] = { + PA_0, //D0 //A7 + PA_1, //D1 //A8 + PA_2, //D2 //A9 + PA_3, //D3 //A0 + PA_4, //D4 //A1 + PA_5, //D5 //A10 + PA_6, //D6 //A11 + PA_7, //D7 //A12 + PA_8, //D8 + PA_9, //D9 + PA_10, //D10 + PA_11, //D11 + PA_12, //D12 + PA_13, //D13 + PA_14, //D14 + PA_15, //D15 + PB_0, //D16 //A13 + PB_1, //D17 //A14 + PB_2, //D18 + PB_3, //D19 + PB_4, //D20 + PB_5, //D21 + PB_6, //D22 + PB_7, //D23 + PB_8, //D24 + PB_9, //D25 + PB_10, //D26 + PB_11, //D27 + PB_12, //D28 + PB_13, //D29 + PB_14, //D30 + PB_15, //D31 + PC_0, //D32 //A2 + PC_1, //D33 //A3 + PC_2, //D34 //A4 + PC_3, //D35 //A5 + PC_4, //D36 //A6 + PC_5, //D37 //A15 + PC_6, //D38 + PC_7, //D39 + PC_8, //D40 + PC_9, //D41 + PC_10, //D42 + PC_11, //D43 + PC_12, //D44 + PC_13, //D45 + PC_14, //D46 + PC_15, //D47 + PD_0, //D48 + PD_1, //D49 + PD_2, //D50 + PD_3, //D51 + PD_4, //D52 + PD_5, //D53 + PD_6, //D54 + PD_7, //D55 + PD_8, //D56 + PD_9, //D57 + PD_10, //D58 + PD_11, //D59 + PD_12, //D60 + PD_13, //D61 + PD_14, //D62 + PD_15, //D63 + PE_0, //D64 + PE_1, //D65 + PE_2, //D66 + PE_3, //D67 + PE_4, //D68 + PE_5, //D69 + PE_6, //D70 + PE_7, //D71 + PE_8, //D72 + PE_9, //D73 + PE_10, //D74 + PE_11, //D75 + PE_12, //D76 + PE_13, //D77 + PE_14, //D78 + PE_15 //D79 +}; + +// Analog (Ax) pin number array +const uint32_t analogInputPin[] = { + 3, //D3 //A0 + 4, //D4 //A1 + 32, //D32 //A2 + 33, //D33 //A3 + 34, //D34 //A4 + 35, //D35 //A5 + 36, //D36 //A6 + 0, //D0 //A7 + 1, //D1 //A8 + 2, //D2 //A9 + 5, //D5 //A10 + 6, //D6 //A11 + 7, //D7 //A12 + 16, //D16 //A13 + 17, //D17 //A14 + 37 //D37 //A15 +}; + +#ifdef __cplusplus +} +#endif + +// ---------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief System Clock Configuration + * The system Clock is configured as follow : + * System Clock source = PLL (HSE) + * SYSCLK(Hz) = 168000000 + * HCLK(Hz) = 168000000 + * AHB Prescaler = 1 + * APB1 Prescaler = 4 + * APB2 Prescaler = 2 + * HSE Frequency(Hz) = 8000000 + * PLL_M = 8 + * PLL_N = 336 + * PLL_P = 2 + * PLL_Q = 7 + * VDD(V) = 3.3 + * Main regulator output voltage = Scale1 mode + * Flash Latency(WS) = 5 + * @param None + * @retval None + */ +WEAK void SystemClock_Config(void) +{ + RCC_ClkInitTypeDef RCC_ClkInitStruct; + RCC_OscInitTypeDef RCC_OscInitStruct; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct; + + + /* Enable Power Control clock */ + __HAL_RCC_PWR_CLK_ENABLE(); + +#ifdef HAL_PWR_MODULE_ENABLED + /* The voltage scaling allows optimizing the power consumption when the device is + clocked below the maximum system frequency, to update the voltage scaling value + regarding system frequency refer to product datasheet. */ + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); +#endif + + /* Enable HSE Oscillator and activate PLL with HSE as source */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = 6; + RCC_OscInitStruct.PLL.PLLN = 180; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + RCC_OscInitStruct.PLL.PLLQ = 7; + RCC_OscInitStruct.PLL.PLLR = 2; + HAL_RCC_OscConfig(&RCC_OscInitStruct); + + HAL_PWREx_EnableOverDrive(); + + /* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2 + clocks dividers */ + RCC_ClkInitStruct.ClockType = (RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK | + RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2); + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLRCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; + HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5); + + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_CLK48; + PeriphClkInitStruct.PLLSAI.PLLSAIM = 6; + PeriphClkInitStruct.PLLSAI.PLLSAIN = 96; + PeriphClkInitStruct.PLLSAI.PLLSAIQ = 2; + PeriphClkInitStruct.PLLSAI.PLLSAIP = RCC_PLLSAIP_DIV4; + PeriphClkInitStruct.PLLSAIDivQ = 1; + PeriphClkInitStruct.Clk48ClockSelection = RCC_CLK48CLKSOURCE_PLLSAIP; + HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct); +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h new file mode 100644 index 000000000000..f00cc5f61235 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_F446VE/variant.h @@ -0,0 +1,186 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins + *----------------------------------------------------------------------------*/ + +#define PA0 PIN_A7 //D0 +#define PA1 PIN_A8 //D1 +#define PA2 PIN_A9 //D2 +#define PA3 PIN_A0 //D3 +#define PA4 PIN_A1 //D4 +#define PA5 PIN_A10 //D5 +#define PA6 PIN_A11 //D6 +#define PA7 PIN_A12 //D7 +#define PA8 8 //D8 +#define PA9 9 //D9 +#define PA10 10 //D10 +#define PA11 11 //D11 +#define PA12 12 //D12 +#define PA13 13 //D13 +#define PA14 14 //D14 +#define PA15 15 //D15 +#define PB0 PIN_A13 //D16 +#define PB1 PIN_A14 //D17 +#define PB2 18 //D18 +#define PB3 19 //D19 +#define PB4 20 //D20 +#define PB5 21 //D21 +#define PB6 22 //D22 +#define PB7 23 //D23 +#define PB8 24 //D24 +#define PB9 25 //D25 +#define PB10 26 //D26 +#define PB11 27 //D27 +#define PB12 28 //D28 +#define PB13 29 //D29 +#define PB14 30 //D30 +#define PB15 31 //D31 +#define PC0 PIN_A2 //D32 +#define PC1 PIN_A3 //D33 +#define PC2 PIN_A4 //D34 +#define PC3 PIN_A5 //D35 +#define PC4 PIN_A6 //D36 +#define PC5 PIN_A15 //D37 +#define PC6 38 //D38 +#define PC7 39 //D39 +#define PC8 40 //D40 +#define PC9 41 //D41 +#define PC10 42 //D42 +#define PC11 43 //D43 +#define PC12 44 //D44 +#define PC13 45 //D45 +#define PC14 46 //D46 +#define PC15 47 //D47 +#define PD0 48 //D48 +#define PD1 49 //D49 +#define PD2 50 //D50 +#define PD3 51 //D51 +#define PD4 52 //D52 +#define PD5 53 //D53 +#define PD6 54 //D54 +#define PD7 55 //D55 +#define PD8 56 //D56 +#define PD9 57 //D57 +#define PD10 58 //D58 +#define PD11 59 //D59 +#define PD12 60 //D60 +#define PD13 61 //D61 +#define PD14 62 //D62 +#define PD15 63 //D63 +#define PE0 64 //D64 +#define PE1 65 //D65 +#define PE2 66 //D66 +#define PE3 67 //D67 +#define PE4 68 //D68 +#define PE5 69 //D69 +#define PE6 70 //D70 +#define PE7 71 //D71 +#define PE8 72 //D72 +#define PE9 73 //D73 +#define PE10 74 //D74 +#define PE11 75 //D75 +#define PE12 76 //D76 +#define PE13 77 //D77 +#define PE14 78 //D78 +#define PE15 79 //D79 + +// This must be a literal +#define NUM_DIGITAL_PINS 80 +// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS +#define NUM_ANALOG_INPUTS 16 + +// PWM resolution +#define PWM_FREQUENCY 20000 // >= 20 Khz => inaudible noise for fans +#define PWM_MAX_DUTY_CYCLE 255 + +// On-board LED pin number +#define LED_BUILTIN PB14 +#define LED_HEARTBEAT LED_BUILTIN + +// SPI Definitions +#define PIN_SPI_SS PA4 +#define PIN_SPI_MOSI PA7 +#define PIN_SPI_MISO PA6 +#define PIN_SPI_SCK PA5 + +// I2C Definitions +#define PIN_WIRE_SDA PB9 +#define PIN_WIRE_SCL PB8 + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#ifndef TIMER_TONE +#define TIMER_TONE TIM6 +#endif + +#ifndef TIMER_SERVO +#define TIMER_SERVO TIM7 +#endif + +#ifndef TIMER_SERIAL +#define TIMER_SERIAL TIM9 +#endif + +// UART Definitions +#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header + +// Default pin used for 'Serial' instance (ex: ST-Link) +// Mandatory for Firmata +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 + +/* HAL configuration */ +#define HSE_VALUE 12000000U + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #define SERIAL_PORT_MONITOR Serial + #define SERIAL_PORT_HARDWARE_OPEN Serial +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/PeripheralPins.c index 51ebf605811b..83e71035fad5 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/PeripheralPins.c @@ -14,6 +14,10 @@ #include "Arduino.h" #include "PeripheralPins.h" +/** + * Variant for: mks_robin_pro2, mks_robin_nano_v3, Anet_ET4_OpenBLT + */ + /* ===== * Note: Commented lines are alternative possibilities which are not used per default. * If you change them, you will have to know what you do @@ -24,46 +28,46 @@ #ifdef HAL_ADC_MODULE_ENABLED WEAK const PinMap PinMap_ADC[] = { - {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 - // {PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 - // {PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 - {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 - // {PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 - // {PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 - {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 - // {PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 - // {PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 - {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 - // {PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 - // {PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 - {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 - // {PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 - {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 - // {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 - {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 - // {PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 - {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 - // {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 - {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 - // {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 - {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 - // {PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 - {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 - // {PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 - // {PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 - {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 - // {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 - // {PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 - {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 - // {PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 - // {PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 - {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 - // {PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 - // {PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 - {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 - // {PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 - {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 - // {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 + //{PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 + //{PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 + //{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 + //{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 + //{PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 + //{PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 + //{PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 + //{PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 + {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 + //{PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 + {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 + //{PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + //{PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 + {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 + //{PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + //{PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 + {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 + //{PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 + //{PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 + //{PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 + {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 + //{PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 + //{PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 + {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 + //{PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 + //{PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 + {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 + //{PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 + //{PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 + {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 + //{PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 + {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 + //{PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 {NC, NP, 0} }; #endif @@ -88,9 +92,7 @@ WEAK const PinMap PinMap_I2C_SDA[] = { {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_I2C_MODULE_ENABLED WEAK const PinMap PinMap_I2C_SCL[] = { {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, @@ -116,75 +118,75 @@ WEAK const PinMap PinMap_I2C_SCL[] = { // No timer = [FAN1 ] WEAK const PinMap PinMap_PWM[] = { - {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 - // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 - // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 - {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 - // {PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 - // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 - {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 - // {PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N - // {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - {PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 - // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - // {PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N - {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 - {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 - {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 - {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 - // {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 - {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - // {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 - {PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N - // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 - {PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N - {PB_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 - {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 - {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 - {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 - // {PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 - // {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 - {PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 - {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 - {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 - {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - // {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - // {PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N - // {PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 - // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - // {PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N - // {PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 - {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - // {PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 - // {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - {PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 - {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 - // {PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 - // {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 - {PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 - {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 - {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 - {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 - {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 - {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 - {PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 - {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 - {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 - {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + {PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + {PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + {PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + {PB_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + {PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + {PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + //{PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + {PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 + //{PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + {PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + {PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 {NC, NP, 0} }; #endif @@ -206,9 +208,7 @@ WEAK const PinMap PinMap_UART_TX[] = { {PD_8, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_RX[] = { {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, @@ -216,30 +216,26 @@ WEAK const PinMap PinMap_UART_RX[] = { {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, {PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, - // {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, {PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, {PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PD_9, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_RTS[] = { {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - // {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PD_12, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_CTS[] = { {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - // {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PD_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, @@ -252,44 +248,38 @@ WEAK const PinMap PinMap_UART_CTS[] = { #ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_MOSI[] = { {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_MISO[] = { {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_SCLK[] = { {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_SSEL[] = { {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, @@ -308,9 +298,7 @@ WEAK const PinMap PinMap_CAN_RD[] = { {PD_0, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, {NC, NP, 0} }; -#endif -#ifdef HAL_CAN_MODULE_ENABLED WEAK const PinMap PinMap_CAN_TD[] = { {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, {PB_6, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, @@ -354,21 +342,19 @@ WEAK const PinMap PinMap_Ethernet[] = { #ifdef HAL_PCD_MODULE_ENABLED WEAK const PinMap PinMap_USB_OTG_FS[] = { - // {PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF - // {PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS - // {PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID + //{PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF + //{PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS + //{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP {NC, NP, 0} }; -#endif -#ifdef HAL_PCD_MODULE_ENABLED WEAK const PinMap PinMap_USB_OTG_HS[] = { #ifdef USE_USB_HS_IN_FS - // {PA_4, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_SOF - // {PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID - // {PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS + //{PA_4, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_SOF + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS {PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM {PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP #else diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h index d3c2f6bd026b..952fe3c5b881 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/hal_conf_extra.h @@ -36,53 +36,54 @@ */ #define HAL_MODULE_ENABLED #define HAL_ADC_MODULE_ENABLED -// #define HAL_CAN_MODULE_ENABLED -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ +#define HAL_CAN_LEGACY_MODULE_ENABLED #define HAL_CRC_MODULE_ENABLED -// #define HAL_CEC_MODULE_ENABLED -// #define HAL_CRYP_MODULE_ENABLED #define HAL_DAC_MODULE_ENABLED -// #define HAL_DCMI_MODULE_ENABLED #define HAL_DMA_MODULE_ENABLED -// #define HAL_DMA2D_MODULE_ENABLED -// #define HAL_ETH_MODULE_ENABLED -// #define HAL_FLASH_MODULE_ENABLED -// #define HAL_NAND_MODULE_ENABLED -// #define HAL_NOR_MODULE_ENABLED -// #define HAL_PCCARD_MODULE_ENABLED -// #define HAL_SRAM_MODULE_ENABLED -// #define HAL_SDRAM_MODULE_ENABLED -// #define HAL_HASH_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_GPIO_MODULE_ENABLED -// #define HAL_EXTI_MODULE_ENABLED #define HAL_I2C_MODULE_ENABLED -// #define HAL_SMBUS_MODULE_ENABLED -// #define HAL_I2S_MODULE_ENABLED -// #define HAL_IWDG_MODULE_ENABLED -// #define HAL_LTDC_MODULE_ENABLED -// #define HAL_DSI_MODULE_ENABLED #define HAL_PWR_MODULE_ENABLED -// #define HAL_QSPI_MODULE_ENABLED #define HAL_RCC_MODULE_ENABLED -// #define HAL_RNG_MODULE_ENABLED -// #define HAL_RTC_MODULE_ENABLED -// #define HAL_SAI_MODULE_ENABLED -// #define HAL_SD_MODULE_ENABLED #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED -// #define HAL_UART_MODULE_ENABLED #define HAL_USART_MODULE_ENABLED -// #define HAL_IRDA_MODULE_ENABLED -// #define HAL_SMARTCARD_MODULE_ENABLED -// #define HAL_WWDG_MODULE_ENABLED #define HAL_CORTEX_MODULE_ENABLED -// #define HAL_PCD_MODULE_ENABLED -// #define HAL_HCD_MODULE_ENABLED -// #define HAL_FMPI2C_MODULE_ENABLED -// #define HAL_SPDIFRX_MODULE_ENABLED -// #define HAL_DFSDM_MODULE_ENABLED -// #define HAL_LPTIM_MODULE_ENABLED -// #define HAL_MMC_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED +//#define HAL_PCD_MODULE_ENABLED + +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_FLASH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_IWDG_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_RTC_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +//#define HAL_SD_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED /* ########################## HSE/HSI Values adaptation ##################### */ /** @@ -479,7 +480,7 @@ */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ - void assert_failed(uint8_t* file, uint32_t line); + void assert_failed(uint8_t *file, uint32_t line); #else #define assert_param(expr) ((void)0U) #endif /* USE_FULL_ASSERT */ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/ldscript.ld index 19eec62fba27..8b38135a2a51 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/ldscript.ld @@ -58,9 +58,9 @@ _Min_Stack_Size = 0x400; /* required amount of stack */ /* Specify the memory areas */ MEMORY { -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE -CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K -FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K +FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET } /* Define output sections */ @@ -167,7 +167,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h index b53ad32d0f29..94fa79c065d8 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F4x7Vx/variant.h @@ -143,8 +143,12 @@ extern "C" { #define PIN_SPI_SCK PA5 // I2C definitions -#define PIN_WIRE_SDA PB9 -#define PIN_WIRE_SCL PB8 +#ifndef PIN_WIRE_SDA + #define PIN_WIRE_SDA PB9 +#endif +#ifndef PIN_WIRE_SCL + #define PIN_WIRE_SCL PB8 +#endif // Timer Definitions // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/PeripheralPins.c similarity index 100% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/PeripheralPins.c diff --git a/buildroot/share/PlatformIO/variants/LERDGE/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/LERDGE/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/ldscript.ld similarity index 99% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/ldscript.ld index 40abfe19b574..d644d49beb1d 100644 --- a/buildroot/share/PlatformIO/variants/FLY_F407ZG/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/ldscript.ld @@ -169,7 +169,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/FLY_F407ZG/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h similarity index 98% rename from buildroot/share/PlatformIO/variants/FLY_F407ZG/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h index ae973c89c527..fd9a5c7741b4 100644 --- a/buildroot/share/PlatformIO/variants/FLY_F407ZG/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FLY_F407ZG/variant.h @@ -27,7 +27,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************* */ - #pragma once #ifdef __cplusplus @@ -185,7 +184,7 @@ extern "C" { #define PIN_WIRE_SCL PB6 // Timer Definitions -//Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c +// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c #define TIMER_TONE TIM6 // Do not use basic timer: OC is required diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/PeripheralPins.c similarity index 87% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/PeripheralPins.c index 3957069f28bc..418ef5aa7abc 100644 --- a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/PeripheralPins.c @@ -74,9 +74,7 @@ WEAK const PinMap PinMap_I2C_SDA[] = { {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_I2C_MODULE_ENABLED WEAK const PinMap PinMap_I2C_SCL[] = { {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, @@ -90,28 +88,28 @@ WEAK const PinMap PinMap_I2C_SCL[] = { #ifdef HAL_TIM_MODULE_ENABLED WEAK const PinMap PinMap_PWM[] = { - // {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 {PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 - // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 - // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 - // {PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 - // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 - // {PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 - // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 @@ -119,9 +117,9 @@ WEAK const PinMap PinMap_PWM[] = { {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 - // {PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 - // {PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N @@ -145,9 +143,7 @@ WEAK const PinMap PinMap_UART_TX[] = { {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_RX[] = { {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, @@ -156,17 +152,13 @@ WEAK const PinMap PinMap_UART_RX[] = { {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_RTS[] = { {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED WEAK const PinMap PinMap_UART_CTS[] = { {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, @@ -179,44 +171,38 @@ WEAK const PinMap PinMap_UART_CTS[] = { #ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_MOSI[] = { {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_MISO[] = { {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_SCLK[] = { {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED WEAK const PinMap PinMap_SPI_SSEL[] = { {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h similarity index 92% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/hal_conf_custom.h rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h index 1b9df2b47a79..2ff2fd686ea4 100644 --- a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/hal_conf_custom.h @@ -33,55 +33,54 @@ extern "C" { */ #define HAL_MODULE_ENABLED #define HAL_ADC_MODULE_ENABLED -/* #define HAL_CAN_MODULE_ENABLED */ -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ #define HAL_CRC_MODULE_ENABLED -/* #define HAL_CEC_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -//#define HAL_DAC_MODULE_ENABLED -/* #define HAL_DCMI_MODULE_ENABLED */ #define HAL_DMA_MODULE_ENABLED -/* #define HAL_DMA2D_MODULE_ENABLED */ -/* #define HAL_ETH_MODULE_ENABLED */ +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_FLASH_MODULE_ENABLED -/* #define HAL_NAND_MODULE_ENABLED */ -/* #define HAL_NOR_MODULE_ENABLED */ -/* #define HAL_PCCARD_MODULE_ENABLED */ -/* #define HAL_SRAM_MODULE_ENABLED */ -/* #define HAL_SDRAM_MODULE_ENABLED */ -/* #define HAL_HASH_MODULE_ENABLED */ #define HAL_GPIO_MODULE_ENABLED -/* #define HAL_EXTI_MODULE_ENABLED */ #define HAL_I2C_MODULE_ENABLED -/* #define HAL_SMBUS_MODULE_ENABLED */ -/* #define HAL_I2S_MODULE_ENABLED */ #define HAL_IWDG_MODULE_ENABLED -/* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_DSI_MODULE_ENABLED */ #define HAL_PWR_MODULE_ENABLED -/* #define HAL_QSPI_MODULE_ENABLED */ #define HAL_RCC_MODULE_ENABLED -/* #define HAL_RNG_MODULE_ENABLED */ #define HAL_RTC_MODULE_ENABLED -/* #define HAL_SAI_MODULE_ENABLED */ -//#define HAL_SD_MODULE_ENABLED #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED -/* #define HAL_UART_MODULE_ENABLED */ -/* #define HAL_USART_MODULE_ENABLED */ -/* #define HAL_IRDA_MODULE_ENABLED */ -/* #define HAL_SMARTCARD_MODULE_ENABLED */ -/* #define HAL_WWDG_MODULE_ENABLED */ #define HAL_CORTEX_MODULE_ENABLED -#ifndef HAL_PCD_MODULE_ENABLED - #define HAL_PCD_MODULE_ENABLED //Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) -#endif -/* #define HAL_HCD_MODULE_ENABLED */ -/* #define HAL_FMPI2C_MODULE_ENABLED */ -/* #define HAL_SPDIFRX_MODULE_ENABLED */ -/* #define HAL_DFSDM_MODULE_ENABLED */ -/* #define HAL_LPTIM_MODULE_ENABLED */ -/* #define HAL_MMC_MODULE_ENABLED */ +//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) + +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +//#define HAL_SD_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED +//#define HAL_USART_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/ldscript.ld similarity index 98% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/ldscript.ld index 2dbc5177aca0..eaaff196cd0d 100644 --- a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/ldscript.ld @@ -61,7 +61,7 @@ _Min_Stack_Size = 0x400;; /* required amount of stack */ /* Specify the memory areas */ MEMORY { -FLASH (rx) : ORIGIN = 0x800C000, LENGTH = 256K +FLASH (rx) : ORIGIN = 0x8008000, LENGTH = 256K - 32K RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K } @@ -150,7 +150,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h similarity index 99% rename from buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h index d0fb0d9db05c..bcd5aa378edf 100644 --- a/buildroot/share/PlatformIO/variants/FYSETC_CHEETAH_V20/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_CHEETAH_V20/variant.h @@ -112,7 +112,7 @@ extern "C" { #define PIN_SERIAL_RX PA10 #define PIN_SERIAL_TX PA9 -// Used when user instanciate a hardware Serial using its peripheral name. +// Used when user instantiate a hardware Serial using its peripheral name. // Example: HardwareSerial mySerial(USART3); // will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined. #define PIN_SERIAL1_RX PA10 diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/PeripheralPins.c index cc700201aaea..ec28776ebe66 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/PeripheralPins.c @@ -40,46 +40,46 @@ #ifdef HAL_ADC_MODULE_ENABLED const PinMap PinMap_ADC[] = { - // {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 - // {PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 - // {PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 - // {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 - // {PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 - // {PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 - // {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 - // {PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 - // {PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 + //{PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 + //{PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 + //{PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 + //{PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 + //{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 + //{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + //{PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 + //{PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 + //{PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 - // {PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 - // {PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 + //{PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 + //{PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 - // {PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 - // {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 - // {PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 - // {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 - // {PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 - // {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 - // {PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 - // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 - // {PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 - // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 - // {PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + //{PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 + //{PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 + //{PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + //{PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + //{PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 + //{PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 + //{PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + //{PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + //{PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 + //{PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 + //{PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 - // {PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 - // {PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 + //{PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 + //{PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 - // {PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 - // {PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 + //{PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 + //{PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 - // {PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 - // {PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 + //{PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 + //{PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 - // {PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 - // {PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 + //{PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 + //{PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 - // {PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 - // {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 - // {PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + //{PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 + //{PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 + //{PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 {NC, NP, 0} }; #endif @@ -88,8 +88,8 @@ const PinMap PinMap_ADC[] = { #ifdef HAL_DAC_MODULE_ENABLED const PinMap PinMap_DAC[] = { - // {PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 - // {PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 - LD2 + //{PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 + //{PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 - LD2 {NC, NP, 0} }; #endif @@ -98,24 +98,22 @@ const PinMap PinMap_DAC[] = { #ifdef HAL_I2C_MODULE_ENABLED const PinMap PinMap_I2C_SDA[] = { - // {PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, - // {PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, - // {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + //{PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + //{PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + //{PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, - // {PC_7, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, - // {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, - // {PC_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + //{PC_7, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, + //{PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + //{PC_12, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, {NC, NP, 0} }; -#endif -#ifdef HAL_I2C_MODULE_ENABLED const PinMap PinMap_I2C_SCL[] = { - // {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, - // {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + //{PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + //{PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, - // {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, - // {PC_6, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, + //{PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + //{PC_6, FMPI2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_FMPI2C1)}, {NC, NP, 0} }; #endif @@ -125,33 +123,33 @@ const PinMap PinMap_I2C_SCL[] = { #ifdef HAL_TIM_MODULE_ENABLED const PinMap PinMap_PWM[] = { {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 - // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 - // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 - STLink Tx - // {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 - STLink Tx - // {PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 - STLink Tx - // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 - STLink Rx - // {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 - STLink Rx - // {PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - STLink Rx + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 - STLink Tx + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 - STLink Tx + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 - STLink Tx + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 - STLink Rx + //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 - STLink Rx + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - STLink Rx {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N {PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 - // {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 - // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - // {PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N - // {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - // {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 {PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // Fan0, TIM8_CH2N - // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - // {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 {PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // Fan1, TIM8_CH3N {PB_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // Fan2, TIM2_CH4 {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // E0 Heater, TIM2_CH2 @@ -159,27 +157,27 @@ const PinMap PinMap_PWM[] = { {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // LED G, TIM3_CH2 {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // LED R, TIM4_CH1 {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // LED B, TIM4_CH2 - // {PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 - // {PB_8, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PB_8, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 {PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 - // {PB_9, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - // {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PB_9, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N {PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 - // {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - // {PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N {PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 - // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - // {PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - // {PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 - // {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + //{PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 {PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 - // {PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 - // {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 + //{PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 {PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 @@ -192,52 +190,46 @@ const PinMap PinMap_PWM[] = { #ifdef HAL_UART_MODULE_ENABLED const PinMap PinMap_UART_TX[] = { - // {PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, - // {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - // {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, - // {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + //{PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, {PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - // {PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + //{PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED const PinMap PinMap_UART_RX[] = { - // {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, - // {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - // {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, - // {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PC_5, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + //{PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, {PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - // {PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, + //{PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED const PinMap PinMap_UART_RTS[] = { - // {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - // {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, - // {PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - // {PC_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, + //{PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PA_15, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_8, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED const PinMap PinMap_UART_CTS[] = { - // {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - // {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PB_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, - // {PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, - // {PC_9, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, + //{PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PB_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, + //{PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, + //{PC_9, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_UART5)}, {NC, NP, 0} }; #endif @@ -247,54 +239,48 @@ const PinMap PinMap_UART_CTS[] = { #ifdef HAL_SPI_MODULE_ENABLED const PinMap PinMap_SPI_MOSI[] = { {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_0, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, - // {PB_2, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, - // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, - // {PC_1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)}, - // {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_0, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + //{PB_2, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI3)}, + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + //{PC_1, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI3)}, + //{PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED const PinMap PinMap_SPI_MISO[] = { {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED const PinMap PinMap_SPI_SCLK[] = { {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_7, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_7, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED const PinMap PinMap_SPI_SSEL[] = { {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PB_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, - // {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_4, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_SPI2)}, + //{PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, {NC, NP, 0} }; #endif @@ -303,20 +289,18 @@ const PinMap PinMap_SPI_SSEL[] = { #ifdef HAL_CAN_MODULE_ENABLED const PinMap PinMap_CAN_RD[] = { - // {PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, - // {PB_5, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, - // {PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, - // {PB_12, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + //{PA_11, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + //{PB_5, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + //{PB_8, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + //{PB_12, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, {NC, NP, 0} }; -#endif -#ifdef HAL_CAN_MODULE_ENABLED const PinMap PinMap_CAN_TD[] = { - // {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, - // {PB_6, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, - // {PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, - // {PB_13, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + //{PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + //{PB_6, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, + //{PB_9, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, + //{PB_13, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, {NC, NP, 0} }; #endif @@ -329,12 +313,12 @@ const PinMap PinMap_CAN_TD[] = { #ifdef HAL_QSPI_MODULE_ENABLED const PinMap PinMap_QUADSPI[] = { - // {PA_1, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO3 - // {PB_2, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_CLK - // {PB_6, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK1_NCS - // {PC_9, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO0 - // {PC_10, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO1 - // {PC_11, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK2_NCS + //{PA_1, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO3 + //{PB_2, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_CLK + //{PB_6, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QSPI)}, // QUADSPI_BK1_NCS + //{PC_9, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO0 + //{PC_10, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK1_IO1 + //{PC_11, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_QSPI)}, // QUADSPI_BK2_NCS {NC, NP, 0} }; #endif @@ -343,19 +327,15 @@ const PinMap PinMap_QUADSPI[] = { #ifdef HAL_PCD_MODULE_ENABLED const PinMap PinMap_USB_OTG_FS[] = { - // {PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF - // {PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)}, // USB_OTG_FS_VBUS - // {PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID + //{PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF + //{PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)}, // USB_OTG_FS_VBUS + //{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP {NC, NP, 0} }; -#endif -#ifdef HAL_PCD_MODULE_ENABLED const PinMap PinMap_USB_OTG_HS[] = { {NC, NP, 0} }; #endif - - diff --git a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld index 2a61072cb17e..900ef0639101 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_FYSETC_S6/ldscript.ld @@ -60,8 +60,8 @@ _Min_Stack_Size = 0x400;; /* required amount of stack */ /* Specify the memory areas */ MEMORY { -FLASH (rx) : ORIGIN = 0x8010000, LENGTH = 512K -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET } /* Define output sections */ @@ -150,7 +150,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/LERDGE/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PeripheralPins.c similarity index 96% rename from buildroot/share/PlatformIO/variants/LERDGE/PeripheralPins.c rename to buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PeripheralPins.c index 8cb0776ffad1..7f6b32c22800 100644 --- a/buildroot/share/PlatformIO/variants/LERDGE/PeripheralPins.c +++ b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PeripheralPins.c @@ -114,9 +114,7 @@ const PinMap PinMap_I2C_SDA[] = { {PF_0, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, {NC, NP, 0} }; -#endif -#ifdef HAL_I2C_MODULE_ENABLED const PinMap PinMap_I2C_SCL[] = { {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, @@ -225,9 +223,7 @@ const PinMap PinMap_UART_TX[] = { {PG_14, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED const PinMap PinMap_UART_RX[] = { {PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, @@ -243,9 +239,7 @@ const PinMap PinMap_UART_RX[] = { {PG_9, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED const PinMap PinMap_UART_RTS[] = { {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, @@ -256,9 +250,7 @@ const PinMap PinMap_UART_RTS[] = { {PG_12, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, {NC, NP, 0} }; -#endif -#ifdef HAL_UART_MODULE_ENABLED const PinMap PinMap_UART_CTS[] = { {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, @@ -283,9 +275,7 @@ const PinMap PinMap_SPI_MOSI[] = { {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED const PinMap PinMap_SPI_MISO[] = { {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, @@ -295,9 +285,7 @@ const PinMap PinMap_SPI_MISO[] = { {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED const PinMap PinMap_SPI_SCLK[] = { {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, @@ -307,9 +295,7 @@ const PinMap PinMap_SPI_SCLK[] = { {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, {NC, NP, 0} }; -#endif -#ifdef HAL_SPI_MODULE_ENABLED const PinMap PinMap_SPI_SSEL[] = { {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, {PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, @@ -332,9 +318,7 @@ const PinMap PinMap_CAN_RD[] = { {PD_0, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, {NC, NP, 0} }; -#endif -#ifdef HAL_CAN_MODULE_ENABLED const PinMap PinMap_CAN_TD[] = { {PA_12, CAN1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN1)}, {PB_6, CAN2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF9_CAN2)}, @@ -389,9 +373,7 @@ const PinMap PinMap_USB_OTG_FS[] = { {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP {NC, NP, 0} }; -#endif -#ifdef HAL_PCD_MODULE_ENABLED const PinMap PinMap_USB_OTG_HS[] = { #ifdef USE_USB_HS_IN_FS {PA_4, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_SOF @@ -416,3 +398,21 @@ const PinMap PinMap_USB_OTG_HS[] = { {NC, NP, 0} }; #endif + +//*** SD *** + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { +//{PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4 +//{PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5 +//{PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6 +//{PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PinNamesVar.h new file mode 100644 index 000000000000..b4bb9d45f8ac --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/PinNamesVar.h @@ -0,0 +1,50 @@ +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + USB_OTG_FS_SOF = PA_8, + USB_OTG_FS_VBUS = PA_9, + USB_OTG_FS_ID = PA_10, + USB_OTG_FS_DM = PA_11, + USB_OTG_FS_DP = PA_12, + USB_OTG_HS_ULPI_D0 = PA_3, + USB_OTG_HS_SOF = PA_4, + USB_OTG_HS_ULPI_CK = PA_5, + USB_OTG_HS_ULPI_D1 = PB_0, + USB_OTG_HS_ULPI_D2 = PB_1, + USB_OTG_HS_ULPI_D7 = PB_5, + USB_OTG_HS_ULPI_D3 = PB_10, + USB_OTG_HS_ULPI_D4 = PB_11, + USB_OTG_HS_ID = PB_12, + USB_OTG_HS_ULPI_D5 = PB_12, + USB_OTG_HS_ULPI_D6 = PB_13, + USB_OTG_HS_VBUS = PB_13, + USB_OTG_HS_DM = PB_14, + USB_OTG_HS_DP = PB_15, + USB_OTG_HS_ULPI_STP = PC_0, + USB_OTG_HS_ULPI_DIR = PC_2, + USB_OTG_HS_ULPI_NXT = PC_3, +#endif diff --git a/buildroot/share/PlatformIO/ldscripts/lerdge.ld b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/ldscript.ld similarity index 95% rename from buildroot/share/PlatformIO/ldscripts/lerdge.ld rename to buildroot/share/PlatformIO/variants/MARLIN_LERDGE/ldscript.ld index aa0b1dd9cb36..ef151075b779 100644 --- a/buildroot/share/PlatformIO/ldscripts/lerdge.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/ldscript.ld @@ -40,9 +40,9 @@ _Min_Stack_Size = 0x400;; /* required amount of stack */ /* Specify the memory areas */ MEMORY { -FLASH (rx) : ORIGIN = 0x8000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET -RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE -CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K +FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K } /* Define output sections */ @@ -149,7 +149,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/LERDGE/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/LERDGE/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/LERDGE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h similarity index 83% rename from buildroot/share/PlatformIO/variants/LERDGE/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h index 87033a68e5f6..d82f0006553f 100644 --- a/buildroot/share/PlatformIO/variants/LERDGE/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_LERDGE/variant.h @@ -27,7 +27,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ******************************************************************************* */ - #pragma once #ifdef __cplusplus @@ -163,32 +162,37 @@ extern "C" { // Below SPI and I2C definitions already done in the core // Could be redefined here if differs from the default one // SPI Definitions -#define PIN_SPI_SS PF11 -#define PIN_SPI_MOSI PB15 -#define PIN_SPI_MISO PB14 -#define PIN_SPI_SCK PB13 - - - -//max6675 -//#define PIN_SPI_SS PA4 -//#define PIN_SPI_SCK PA5 -//#define PIN_SPI_MISO PA6 -//#define PIN_SPI_MOSI PA7 +// SPI1 (Winbond on the Lerdge-K) +//#define PIN_SPI_SS PC4 +//#define PIN_SPI_SCK PA5 +//#define PIN_SPI_MISO PA6 +//#define PIN_SPI_MOSI PA7 +// SPI2 (Winbond on the Lerdge-S) +//#define PIN_SPI_SS PB12 +//#define PIN_SPI_SCK PB13 +//#define PIN_SPI_MISO PB14 +//#define PIN_SPI_MOSI PB15 - -// I2C Definitions -#define PIN_WIRE_SDA PB7 -#define PIN_WIRE_SCL PB6 +// I2C Definitions (Software I2C) +//#define PIN_WIRE_SDA PG13 +//#define PIN_WIRE_SCL PG14 // Timer Definitions -//Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c -#define TIMER_TONE TIM6 - -// Do not use basic timer: OC is required -#define TIMER_SERVO TIM1 //TODO: advanced-control timers don't work +// Do not use timer used by PWM pins when possible. See PinMap_PWM in PeripheralPins.c +// FANs may require PWM timers 3 10 11 13 +// The LED/RGB connectors timer 4 +// Beware: STEP_TIMER default is 6 and TEMP_TIMER 14 for the F407 +#ifndef TIMER_TONE + #define TIMER_TONE TIM8 // TIM3 or TIM8 for SPEAKER compat on the lerdge K (PC6) +#endif // TIM4 for that on the Lerdge S (PD11) +#ifndef TIMER_SERVO + #define TIMER_SERVO TIM1 // Ideally TIM2 for Hardware PWM (PB11) +#endif // TIM4 on the S (PD12) +#ifndef TIMER_SERIAL + #define TIMER_SERIAL TIM7 // Default used in SoftwareSerial lib +#endif // UART Definitions // Define here Serial instance number to map on Serial generic name @@ -208,6 +212,8 @@ extern "C" { /* Extra HAL modules */ //#define HAL_DAC_MODULE_ENABLED #define HAL_SD_MODULE_ENABLED +#define HAL_SRAM_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #ifdef __cplusplus } // extern "C" diff --git a/buildroot/share/PlatformIO/variants/megaextendedpins/pins_arduino.h b/buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h old mode 100755 new mode 100644 similarity index 95% rename from buildroot/share/PlatformIO/variants/megaextendedpins/pins_arduino.h rename to buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h index 81f2ae3e19a1..1129f8edae10 --- a/buildroot/share/PlatformIO/variants/megaextendedpins/pins_arduino.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h @@ -85,19 +85,23 @@ static const uint8_t A15 = PIN_A15; // A majority of the pins are NOT PCINTs, SO BE WARNED (i.e. you cannot use them as receive pins) // Only pins available for RECEIVE (TRANSMIT can be on any pin): // (I've deliberately left out pin mapping to the Hardware USARTs - seems senseless to me) -// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69 +// Pins: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, 75, 76, 77 #define digitalPinToPCICR(p) ( (((p) >= 10) && ((p) <= 13)) || \ (((p) >= 50) && ((p) <= 53)) || \ - (((p) >= 62) && ((p) <= 69)) ? (&PCICR) : ((uint8_t *)0) ) + (((p) >= 62) && ((p) <= 69)) || \ + (((p) >= 72) && ((p) <= 73)) || \ + (((p) >= 75) && ((p) <= 77)) ? (&PCICR) : nullptr ) #define digitalPinToPCICRbit(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? 0 : \ ( (((p) >= 62) && ((p) <= 69)) ? 2 : \ - 0 ) ) + ( (((p) >= 72) && ((p) <= 73)) || (((p) >= 75) && ((p) <= 77)) ? 1 : \ + 0 ) ) ) #define digitalPinToPCMSK(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? (&PCMSK0) : \ ( (((p) >= 62) && ((p) <= 69)) ? (&PCMSK2) : \ - ((uint8_t *)0) ) ) + ( (((p) >= 72) && ((p) <= 73)) || (((p) >= 75) && ((p) <= 77)) ? (&PCMSK1) : \ + nullptr ) ) ) #define digitalPinToPCMSKbit(p) ( (((p) >= 10) && ((p) <= 13)) ? ((p) - 6) : \ ( ((p) == 50) ? 3 : \ @@ -105,7 +109,9 @@ static const uint8_t A15 = PIN_A15; ( ((p) == 52) ? 1 : \ ( ((p) == 53) ? 0 : \ ( (((p) >= 62) && ((p) <= 69)) ? ((p) - 62) : \ - 0 ) ) ) ) ) ) + ( (((p) >= 72) && ((p) <= 73)) ? ((p) - 69) : \ + ( (((p) >= 75) && ((p) <= 77)) ? ((p) - 70) : \ + 0 ) ) ) ) ) ) ) ) #define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : ((p) >= 18 && (p) <= 21 ? 23 - (p) : NOT_AN_INTERRUPT))) diff --git a/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PeripheralPins.c new file mode 100644 index 000000000000..d3d754b689ee --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PeripheralPins.c @@ -0,0 +1,260 @@ + +/* + ******************************************************************************* + * Copyright (c) 2019, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + * Automatically generated from STM32F401V(D-E)Tx.xml + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Note: Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 + {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 + //{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 + //{PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 + //{PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 + //{PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 + //{PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 + //{PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 + //{PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 + //{PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 + {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 + {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 + //{PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 + //{PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 + {NC, NP, 0} +}; +#endif + +//*** No DAC *** + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + //{PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C2)}, + //{PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C3)}, + {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + //{PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + //{PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_I2C_SCL[] = { + //{PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, + {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + //{PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, + //{PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_PWM[] = { + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 + //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 + //{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + //{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + //{PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + //{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 + //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 + {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 + {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 + {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 + {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + //{PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + //{PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N + //{PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 + //{PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N + //{PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 + //{PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N + //{PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 + {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + //{PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PA_11, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + //{PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RX[] = { + //{PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PA_12, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + //{PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + //{PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, + {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RTS[] = { + //{PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_CTS[] = { + //{PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + //{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, + {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PD_6, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PE_6, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_14, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PE_5, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_13, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PD_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PE_2, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_12, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SSEL[] = { + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, + //{PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, + //{PE_4, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + //{PE_11, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, + {NC, NP, 0} +}; +#endif + +//*** No CAN *** + +//*** No ETHERNET *** + +//*** No QUADSPI *** + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +WEAK const PinMap PinMap_USB_OTG_FS[] = { + //{PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF + //{PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS + //{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID + {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM + {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP + {NC, NP, 0} +}; +#endif + +//*** No USB_OTG_HS *** +//*** SD *** + +#ifdef HAL_SD_MODULE_ENABLED +WEAK const PinMap PinMap_SD[] = { + //{PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4 + //{PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5 + //{PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6 + //{PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7 + {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0 + {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 + {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 + {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3 + {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK + {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD + {NC, NP, 0} +}; +#endif diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PinNamesVar.h similarity index 100% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/PinNamesVar.h rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PinNamesVar.h diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/hal_conf_custom.h b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h similarity index 92% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/hal_conf_custom.h rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h index 0c7781997fef..7d013d2b27f4 100644 --- a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/hal_conf_custom.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h @@ -33,55 +33,54 @@ extern "C" { */ #define HAL_MODULE_ENABLED #define HAL_ADC_MODULE_ENABLED -/* #define HAL_CAN_MODULE_ENABLED */ -/* #define HAL_CAN_LEGACY_MODULE_ENABLED */ #define HAL_CRC_MODULE_ENABLED -/* #define HAL_CEC_MODULE_ENABLED */ -/* #define HAL_CRYP_MODULE_ENABLED */ -//#define HAL_DAC_MODULE_ENABLED -/* #define HAL_DCMI_MODULE_ENABLED */ #define HAL_DMA_MODULE_ENABLED -/* #define HAL_DMA2D_MODULE_ENABLED */ -/* #define HAL_ETH_MODULE_ENABLED */ +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts #define HAL_FLASH_MODULE_ENABLED -/* #define HAL_NAND_MODULE_ENABLED */ -/* #define HAL_NOR_MODULE_ENABLED */ -/* #define HAL_PCCARD_MODULE_ENABLED */ -/* #define HAL_SRAM_MODULE_ENABLED */ -/* #define HAL_SDRAM_MODULE_ENABLED */ -/* #define HAL_HASH_MODULE_ENABLED */ #define HAL_GPIO_MODULE_ENABLED -/* #define HAL_EXTI_MODULE_ENABLED */ #define HAL_I2C_MODULE_ENABLED -/* #define HAL_SMBUS_MODULE_ENABLED */ -/* #define HAL_I2S_MODULE_ENABLED */ #define HAL_IWDG_MODULE_ENABLED -/* #define HAL_LTDC_MODULE_ENABLED */ -/* #define HAL_DSI_MODULE_ENABLED */ #define HAL_PWR_MODULE_ENABLED -/* #define HAL_QSPI_MODULE_ENABLED */ #define HAL_RCC_MODULE_ENABLED -/* #define HAL_RNG_MODULE_ENABLED */ #define HAL_RTC_MODULE_ENABLED -/* #define HAL_SAI_MODULE_ENABLED */ #define HAL_SD_MODULE_ENABLED #define HAL_SPI_MODULE_ENABLED #define HAL_TIM_MODULE_ENABLED -/* #define HAL_UART_MODULE_ENABLED */ -/* #define HAL_USART_MODULE_ENABLED */ -/* #define HAL_IRDA_MODULE_ENABLED */ -/* #define HAL_SMARTCARD_MODULE_ENABLED */ -/* #define HAL_WWDG_MODULE_ENABLED */ #define HAL_CORTEX_MODULE_ENABLED -#ifndef HAL_PCD_MODULE_ENABLED - #define HAL_PCD_MODULE_ENABLED //Since STM32 v3.10700.191028 this is automatically added if any type of USB is enabled (as in Arduino IDE) -#endif -/* #define HAL_HCD_MODULE_ENABLED */ -/* #define HAL_FMPI2C_MODULE_ENABLED */ -/* #define HAL_SPDIFRX_MODULE_ENABLED */ -/* #define HAL_DFSDM_MODULE_ENABLED */ -/* #define HAL_LPTIM_MODULE_ENABLED */ -/* #define HAL_MMC_MODULE_ENABLED */ +//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028) + +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED // by default +//#define HAL_USART_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED /* ########################## HSE/HSI Values adaptation ##################### */ /** diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld similarity index 99% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/ldscript.ld rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld index f20a047c6574..c5788dbebe6c 100644 --- a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/ldscript.ld +++ b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld @@ -148,7 +148,7 @@ SECTIONS . = ALIGN(4); .bss : { - /* This is used by the startup in order to initialize the .bss secion */ + /* This is used by the startup in order to initialize the .bss section */ _sbss = .; /* define a global symbol at bss start */ __bss_start__ = _sbss; *(.bss) diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.cpp rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.cpp diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/STEVAL_F401VE/variant.h rename to buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.h diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PeripheralPins.c b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PeripheralPins.c new file mode 100644 index 000000000000..03d75bbfa823 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PeripheralPins.c @@ -0,0 +1,314 @@ +/* + ******************************************************************************* + * Copyright (c) 2020, STMicroelectronics + * All rights reserved. + * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ******************************************************************************* + * Automatically generated from STM32F405RGTx.xml + */ +#include "Arduino.h" +#include "PeripheralPins.h" + +/* ===== + * Note: Commented lines are alternative possibilities which are not used per default. + * If you change them, you will have to know what you do + * ===== + */ + +//*** ADC *** + +#ifdef HAL_ADC_MODULE_ENABLED +WEAK const PinMap PinMap_ADC[] = { + {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 TEMP_BED + //{PA_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC2_IN0 TEMP_BED + //{PA_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC3_IN0 TEMP_BED + {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 TEMP_0 + //{PA_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC2_IN1 + //{PA_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC3_IN1 + {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 SERVO0 + //{PA_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC2_IN2 + //{PA_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC3_IN2 + //{PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 Z_STEP + //{PA_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC2_IN3 + //{PA_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC3_IN3 + //{PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 SPI-SEL ONBOARD SD + //{PA_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC2_IN4 + //{PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 SPI-SCK + //{PA_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC2_IN5 + //{PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 SPI-MISO + //{PA_6, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC2_IN6 + //{PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 SPI-MOSI + //{PA_7, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC2_IN7 + //{PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 BTN_ENC + //{PB_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC2_IN8 + //{PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 I2C1 EEPROM + //{PB_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC2_IN9 + //{PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 FIL_RUNOUT + //{PC_0, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC2_IN10 + //{PC_0, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC3_IN10 + //{PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 X_STOP + //{PC_1, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC2_IN11 + //{PC_1, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC3_IN11 + //{PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 Y_STOP + //{PC_2, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC2_IN12 + //{PC_2, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC3_IN12 + //{PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 Z_STOP + //{PC_3, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC2_IN13 + //{PC_3, ADC3, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC3_IN13 + //{PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 BTN_EN1 + //{PC_4, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC2_IN14 + //{PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 BTN_EN2 + //{PC_5, ADC2, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC2_IN15 + {NC, NP, 0} +}; +#endif + +//*** DAC *** + +#ifdef HAL_DAC_MODULE_ENABLED +WEAK const PinMap PinMap_DAC[] = { + //{PA_4, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // DAC_OUT1 + //{PA_5, DAC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // DAC_OUT2 + {NC, NP, 0} +}; +#endif + +//*** I2C *** + +#ifdef HAL_I2C_MODULE_ENABLED +WEAK const PinMap PinMap_I2C_SDA[] = { + {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // I2C1 SDA (EEPROM) + //{PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // YDIAG + //{PB_11, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // E0_DIR + //{PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // BED / HEATER1 + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_I2C_SCL[] = { + //{PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, // NEOPIXEL + {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // I2C1 SCL (EEPROM) + //{PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, // Y_STEP + //{PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, // EDIAG + {NC, NP, 0} +}; +#endif + +//*** PWM *** + +#ifdef HAL_TIM_MODULE_ENABLED +WEAK const PinMap PinMap_PWM[] = { + //{PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 TEMP_BED + //{PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 + + //{PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 TEMP_0 + //{PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 + + //{PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 SERVO0 + //{PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 + //{PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 + + //{PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 Z_STEP + //{PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 + //{PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 + + //{PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 SPI-SCK + //{PA_5, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + + //{PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 SPI-MISO + //{PA_6, TIM13, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 + + //{PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N SPI-MOSI + //{PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 + //{PA_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 1)}, // TIM8_CH1N + //{PA_7, TIM14, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM14, 1, 0)}, // TIM14_CH1 + + //{PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 NEOPIXEL + //{PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 SERIAL_TX (HEADER) + //{PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 SERIAL_RX (HEADER) + //{PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 USB H + //{PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 E0_STEP + + //{PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N BTN_ENC + //{PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 + //{PB_0, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + + //{PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N Z_DIR + //{PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 + //{PB_1, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + + //{PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 X_STEP + //{PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 XDIAG + //{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 X_ENABLE + //{PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 I2C1_SCL (EEPROM) + //{PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 I2C1_SDA (EEPROM) + + //{PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 Y_STEP + //{PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 + + //{PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 YDIAG + //{PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 + + //{PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 EDIAG + //{PB_11, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 E0_DIR + //{PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N LCD_PINS_D4 + + //{PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N LCD-MISO + //{PB_14, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 1)}, // TIM8_CH2N + //{PB_14, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 1, 0)}, // TIM12_CH1 + + //{PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N LCD_PINS_ENABLE + //{PB_15, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 1)}, // TIM8_CH3N + //{PB_15, TIM12, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM12, 2, 0)}, // TIM12_CH2 + + {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 FAN + //{PC_6, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 1, 0)}, // TIM8_CH1 + + {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 FAN1 / AUTO_FAN + //{PC_7, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 2, 0)}, // TIM8_CH2 + + {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 HEATER0 + //{PC_8, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 3, 0)}, // TIM8_CH3 + + {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 BED / HEATER1 + //{PC_9, TIM8, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM8, 4, 0)}, // TIM8_CH4 + {NC, NP, 0} +}; +#endif + +//*** SERIAL *** + +#ifdef HAL_UART_MODULE_ENABLED +WEAK const PinMap PinMap_UART_TX[] = { + //{PA_0, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // TEMP_BED + //{PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // SERVO0 + {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // SERIAL_TX (HEADER) + //{PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // I2C1_SCL (EEPROM) + //{PB_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // EDIAG + //{PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // FAN + {PC_10, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // SERIAL_TX (TMC) + //{PC_10, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // SERIAL_TX (TMC) + //{PC_12, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // Y_ENABLE + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RX[] = { + //{PA_1, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // TEMP_0 + //{PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // Z_STEP + {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // SERIAL_RX (HEADER) + //{PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // I2C1 SDA (EEPROM) + //{PB_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // E_DIR + //{PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, // FAN1 / AUTO_FAN + {PC_11, UART4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART4)}, // SERIAL_RX (TMC) + //{PC_11, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // SERIAL_RX (TMC) + //{PD_2, UART5, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_UART5)}, // X_DIR + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_RTS[] = { + //{PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // TEMP_0 + //{PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // USB D + //{PB_14, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // LCD-MISO + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_UART_CTS[] = { + //{PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, // TEMP_BED / WKUP + //{PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, // USB H + //{PB_13, USART3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART3)}, // LCD-SCK + {NC, NP, 0} +}; +#endif + +//*** SPI *** + +#ifdef HAL_SPI_MODULE_ENABLED +WEAK const PinMap PinMap_SPI_MOSI[] = { + {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // SPI1 MOSI (SD) + //{PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // X_ENABLE + //{PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // SPI2 MOSI (LCD) + //{PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // Z_STOP + //{PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // Y_ENABLE + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_MISO[] = { + {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // SPI1 MOSI (SD) + //{PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // XDIAG + //{PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // SPI2 MISO (LCD) + //{PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // Y_STOP + //{PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // SERIAL_RX (TMC) + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SCLK[] = { + {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // SPI1 CLK (SD) + //{PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // X_STEP + //{PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // EDIAG + {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // SPI2 SCK (LCD) + //{PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, // SERIAL_TX (TMC) + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_SPI_SSEL[] = { + {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // SPI1 CS (SD) + //{PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, // E0_STEP + //{PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, + //{PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // YDIAG + {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, // SPI2 CS (LCD) + {NC, NP, 0} +}; +#endif + +//*** No CAN *** + +//*** No ETHERNET *** + +//*** No QUADSPI *** + +//*** USB *** + +#ifdef HAL_PCD_MODULE_ENABLED +WEAK const PinMap PinMap_USB_OTG_FS[] = { + //{PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF NEOPIXEL + //{PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS SERIAL_TX (HEADER) + //{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID SERIAL_RX (HEADER) + {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM USB H + {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP USB D + {NC, NP, 0} +}; + +WEAK const PinMap PinMap_USB_OTG_HS[] = { +#ifdef USE_USB_HS_IN_FS + //{PA_4, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_SOF CS (SD) + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_ID CS (LCD) + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_HS_VBUS LCD_PINS_D4 + //{PB_14, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DM MISO (LCD) + //{PB_15, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_OTG_HS_FS)}, // USB_OTG_HS_DP LCD_PINS_ENABLE +#else + //{PA_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D0 Z_STEP + //{PA_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_CK SPI-SCK + //{PB_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D1 BTN_ENC + //{PB_1, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D2 I2C1 (EEPROM) + //{PB_5, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D7 X_ENABLE + //{PB_10, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D3 EDIAG + //{PB_11, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D4 FAN + //{PB_12, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D5 CS (LCD) + //{PB_13, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_D6 LCD_PINS_D4 + //{PC_0, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_STP FIL_RUNOUT + //{PC_2, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_DIR Y_STOP + //{PC_3, USB_OTG_HS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_HS)}, // USB_OTG_HS_ULPI_NXT Z_STOP +#endif /* USE_USB_HS_IN_FS */ + {NC, NP, 0} +}; +#endif + +//*** No SDIO *** diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h new file mode 100644 index 000000000000..24248859373b --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/PinNamesVar.h @@ -0,0 +1,50 @@ +/* SYS_WKUP */ +#ifdef PWR_WAKEUP_PIN1 + SYS_WKUP1 = PA_0, +#endif +#ifdef PWR_WAKEUP_PIN2 + SYS_WKUP2 = NC, +#endif +#ifdef PWR_WAKEUP_PIN3 + SYS_WKUP3 = NC, +#endif +#ifdef PWR_WAKEUP_PIN4 + SYS_WKUP4 = NC, +#endif +#ifdef PWR_WAKEUP_PIN5 + SYS_WKUP5 = NC, +#endif +#ifdef PWR_WAKEUP_PIN6 + SYS_WKUP6 = NC, +#endif +#ifdef PWR_WAKEUP_PIN7 + SYS_WKUP7 = NC, +#endif +#ifdef PWR_WAKEUP_PIN8 + SYS_WKUP8 = NC, +#endif +/* USB */ +#ifdef USBCON + USB_OTG_FS_SOF = PA_8, + USB_OTG_FS_VBUS = PA_9, + USB_OTG_FS_ID = PA_10, + USB_OTG_FS_DM = PA_11, + USB_OTG_FS_DP = PA_12, + USB_OTG_HS_ULPI_D0 = PA_3, + USB_OTG_HS_SOF = PA_4, + USB_OTG_HS_ULPI_CK = PA_5, + USB_OTG_HS_ULPI_D1 = PB_0, + USB_OTG_HS_ULPI_D2 = PB_1, + USB_OTG_HS_ULPI_D7 = PB_5, + USB_OTG_HS_ULPI_D3 = PB_10, + USB_OTG_HS_ULPI_D4 = PB_11, + USB_OTG_HS_ID = PB_12, + USB_OTG_HS_ULPI_D5 = PB_12, + USB_OTG_HS_ULPI_D6 = PB_13, + USB_OTG_HS_VBUS = PB_13, + USB_OTG_HS_DM = PB_14, + USB_OTG_HS_DP = PB_15, + USB_OTG_HS_ULPI_STP = PC_0, + USB_OTG_HS_ULPI_DIR = PC_2, + USB_OTG_HS_ULPI_NXT = PC_3, +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h new file mode 100755 index 000000000000..2ad290502338 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/hal_conf_extra.h @@ -0,0 +1,496 @@ +/** + ****************************************************************************** + * @file stm32f4xx_hal_conf_template.h + * @author MCD Application Team + * @brief HAL configuration template file. + * This file should be copied to the application folder and renamed + * to stm32f4xx_hal_conf.h. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2017 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __STM32F4xx_HAL_CONF_H +#define __STM32F4xx_HAL_CONF_H + +#ifdef __cplusplus + extern "C" { +#endif + +/* Exported types ------------------------------------------------------------*/ +/* Exported constants --------------------------------------------------------*/ + +/* ########################## Module Selection ############################## */ +/** + * @brief This is the list of modules to be used in the HAL driver + */ +#define HAL_MODULE_ENABLED +#define HAL_ADC_MODULE_ENABLED +#define HAL_DMA_MODULE_ENABLED +#define HAL_FLASH_MODULE_ENABLED +#define HAL_GPIO_MODULE_ENABLED +#define HAL_EXTI_MODULE_ENABLED // Needed for Endstop (and other external) Interrupts +#define HAL_PWR_MODULE_ENABLED +#define HAL_RCC_MODULE_ENABLED +#define HAL_SPI_MODULE_ENABLED +#define HAL_TIM_MODULE_ENABLED +#define HAL_USART_MODULE_ENABLED +#define HAL_CORTEX_MODULE_ENABLED +#define HAL_PCD_MODULE_ENABLED +//#define HAL_UART_MODULE_ENABLED // by default + +//#define HAL_CAN_MODULE_ENABLED +//#define HAL_CAN_LEGACY_MODULE_ENABLED +//#define HAL_CRC_MODULE_ENABLED +//#define HAL_CEC_MODULE_ENABLED +//#define HAL_CRYP_MODULE_ENABLED +//#define HAL_DAC_MODULE_ENABLED +//#define HAL_DCMI_MODULE_ENABLED +//#define HAL_DMA2D_MODULE_ENABLED +//#define HAL_ETH_MODULE_ENABLED +//#define HAL_NAND_MODULE_ENABLED +//#define HAL_NOR_MODULE_ENABLED +//#define HAL_PCCARD_MODULE_ENABLED +//#define HAL_SRAM_MODULE_ENABLED +//#define HAL_SDRAM_MODULE_ENABLED +//#define HAL_HASH_MODULE_ENABLED +//#define HAL_I2C_MODULE_ENABLED +//#define HAL_SMBUS_MODULE_ENABLED +//#define HAL_I2S_MODULE_ENABLED +//#define HAL_IWDG_MODULE_ENABLED +//#define HAL_LTDC_MODULE_ENABLED +//#define HAL_DSI_MODULE_ENABLED +//#define HAL_QSPI_MODULE_ENABLED +//#define HAL_RNG_MODULE_ENABLED +//#define HAL_RTC_MODULE_ENABLED +//#define HAL_SAI_MODULE_ENABLED +//#define HAL_SD_MODULE_ENABLED +//#define HAL_IRDA_MODULE_ENABLED +//#define HAL_SMARTCARD_MODULE_ENABLED +//#define HAL_WWDG_MODULE_ENABLED +//#define HAL_HCD_MODULE_ENABLED +//#define HAL_FMPI2C_MODULE_ENABLED +//#define HAL_SPDIFRX_MODULE_ENABLED +//#define HAL_DFSDM_MODULE_ENABLED +//#define HAL_LPTIM_MODULE_ENABLED +//#define HAL_MMC_MODULE_ENABLED + +/* ########################## HSE/HSI Values adaptation ##################### */ +/** + * @brief Adjust the value of External High Speed oscillator (HSE) used in your application. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSE is used as system clock source, directly or through the PLL). + */ +#if !defined (HSE_VALUE) + #define HSE_VALUE 25000000U /*!< Value of the External oscillator in Hz */ +#endif /* HSE_VALUE */ + +#if !defined (HSE_STARTUP_TIMEOUT) + #define HSE_STARTUP_TIMEOUT 100U /*!< Time out for HSE start up, in ms */ +#endif /* HSE_STARTUP_TIMEOUT */ + +/** + * @brief Internal High Speed oscillator (HSI) value. + * This value is used by the RCC HAL module to compute the system frequency + * (when HSI is used as system clock source, directly or through the PLL). + */ +#if !defined (HSI_VALUE) + #define HSI_VALUE 16000000U /*!< Value of the Internal oscillator in Hz */ +#endif /* HSI_VALUE */ + +/** + * @brief Internal Low Speed oscillator (LSI) value. + */ +#if !defined (LSI_VALUE) + #define LSI_VALUE 32000U /*!< LSI Typical Value in Hz */ +#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz + The real value may vary depending on the variations + in voltage and temperature. */ +/** + * @brief External Low Speed oscillator (LSE) value. + */ +#if !defined (LSE_VALUE) + #define LSE_VALUE 32768U /*!< Value of the External Low Speed oscillator in Hz */ +#endif /* LSE_VALUE */ + +#if !defined (LSE_STARTUP_TIMEOUT) + #define LSE_STARTUP_TIMEOUT 5000U /*!< Time out for LSE start up, in ms */ +#endif /* LSE_STARTUP_TIMEOUT */ + +/** + * @brief External clock source for I2S peripheral + * This value is used by the I2S HAL module to compute the I2S clock source + * frequency, this source is inserted directly through I2S_CKIN pad. + */ +#if !defined (EXTERNAL_CLOCK_VALUE) + #define EXTERNAL_CLOCK_VALUE 12288000U /*!< Value of the External oscillator in Hz*/ +#endif /* EXTERNAL_CLOCK_VALUE */ + +/* Tip: To avoid modifying this file each time you need to use different HSE, + === you can define the HSE value in your toolchain compiler preprocessor. */ + +/* ########################### System Configuration ######################### */ +/** + * @brief This is the HAL system configuration section + */ +#define VDD_VALUE 3300U /*!< Value of VDD in mv */ +#define TICK_INT_PRIORITY 0x00U /*!< tick interrupt priority */ +#define USE_RTOS 0U +#define PREFETCH_ENABLE 1U +#define INSTRUCTION_CACHE_ENABLE 1U +#define DATA_CACHE_ENABLE 1U + +#define USE_HAL_ADC_REGISTER_CALLBACKS 0U /* ADC register callback disabled */ +#define USE_HAL_CAN_REGISTER_CALLBACKS 0U /* CAN register callback disabled */ +#define USE_HAL_CEC_REGISTER_CALLBACKS 0U /* CEC register callback disabled */ +#define USE_HAL_CRYP_REGISTER_CALLBACKS 0U /* CRYP register callback disabled */ +#define USE_HAL_DAC_REGISTER_CALLBACKS 0U /* DAC register callback disabled */ +#define USE_HAL_DCMI_REGISTER_CALLBACKS 0U /* DCMI register callback disabled */ +#define USE_HAL_DFSDM_REGISTER_CALLBACKS 0U /* DFSDM register callback disabled */ +#define USE_HAL_DMA2D_REGISTER_CALLBACKS 0U /* DMA2D register callback disabled */ +#define USE_HAL_DSI_REGISTER_CALLBACKS 0U /* DSI register callback disabled */ +#define USE_HAL_ETH_REGISTER_CALLBACKS 0U /* ETH register callback disabled */ +#define USE_HAL_HASH_REGISTER_CALLBACKS 0U /* HASH register callback disabled */ +#define USE_HAL_HCD_REGISTER_CALLBACKS 0U /* HCD register callback disabled */ +#define USE_HAL_I2C_REGISTER_CALLBACKS 0U /* I2C register callback disabled */ +#define USE_HAL_FMPI2C_REGISTER_CALLBACKS 0U /* FMPI2C register callback disabled */ +#define USE_HAL_I2S_REGISTER_CALLBACKS 0U /* I2S register callback disabled */ +#define USE_HAL_IRDA_REGISTER_CALLBACKS 0U /* IRDA register callback disabled */ +#define USE_HAL_LPTIM_REGISTER_CALLBACKS 0U /* LPTIM register callback disabled */ +#define USE_HAL_LTDC_REGISTER_CALLBACKS 0U /* LTDC register callback disabled */ +#define USE_HAL_MMC_REGISTER_CALLBACKS 0U /* MMC register callback disabled */ +#define USE_HAL_NAND_REGISTER_CALLBACKS 0U /* NAND register callback disabled */ +#define USE_HAL_NOR_REGISTER_CALLBACKS 0U /* NOR register callback disabled */ +#define USE_HAL_PCCARD_REGISTER_CALLBACKS 0U /* PCCARD register callback disabled */ +#define USE_HAL_PCD_REGISTER_CALLBACKS 0U /* PCD register callback disabled */ +#define USE_HAL_QSPI_REGISTER_CALLBACKS 0U /* QSPI register callback disabled */ +#define USE_HAL_RNG_REGISTER_CALLBACKS 0U /* RNG register callback disabled */ +#define USE_HAL_RTC_REGISTER_CALLBACKS 0U /* RTC register callback disabled */ +#define USE_HAL_SAI_REGISTER_CALLBACKS 0U /* SAI register callback disabled */ +#define USE_HAL_SD_REGISTER_CALLBACKS 0U /* SD register callback disabled */ +#define USE_HAL_SMARTCARD_REGISTER_CALLBACKS 0U /* SMARTCARD register callback disabled */ +#define USE_HAL_SDRAM_REGISTER_CALLBACKS 0U /* SDRAM register callback disabled */ +#define USE_HAL_SRAM_REGISTER_CALLBACKS 0U /* SRAM register callback disabled */ +#define USE_HAL_SPDIFRX_REGISTER_CALLBACKS 0U /* SPDIFRX register callback disabled */ +#define USE_HAL_SMBUS_REGISTER_CALLBACKS 0U /* SMBUS register callback disabled */ +#define USE_HAL_SPI_REGISTER_CALLBACKS 0U /* SPI register callback disabled */ +#define USE_HAL_TIM_REGISTER_CALLBACKS 0U /* TIM register callback disabled */ +#define USE_HAL_UART_REGISTER_CALLBACKS 0U /* UART register callback disabled */ +#define USE_HAL_USART_REGISTER_CALLBACKS 0U /* USART register callback disabled */ +#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */ + +/* ########################## Assert Selection ############################## */ +/** + * @brief Uncomment the line below to expanse the "assert_param" macro in the + * HAL drivers code + */ +//#define USE_FULL_ASSERT 1U + +/* ################## Ethernet peripheral configuration ##################### */ + +/* Section 1 : Ethernet peripheral configuration */ + +/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */ +#define MAC_ADDR0 2U +#define MAC_ADDR1 0U +#define MAC_ADDR2 0U +#define MAC_ADDR3 0U +#define MAC_ADDR4 0U +#define MAC_ADDR5 0U + +/* Definition of the Ethernet driver buffers size and count */ +#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */ +#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */ +#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */ +#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */ + +/* Section 2: PHY configuration section */ + +/* DP83848 PHY Address*/ +#define DP83848_PHY_ADDRESS 0x01U +/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/ +#define PHY_RESET_DELAY 0x000000FFU +/* PHY Configuration delay */ +#define PHY_CONFIG_DELAY 0x00000FFFU + +#define PHY_READ_TO 0x0000FFFFU +#define PHY_WRITE_TO 0x0000FFFFU + +/* Section 3: Common PHY Registers */ + +#define PHY_BCR ((uint16_t)0x0000) /*!< Transceiver Basic Control Register */ +#define PHY_BSR ((uint16_t)0x0001) /*!< Transceiver Basic Status Register */ + +#define PHY_RESET ((uint16_t)0x8000) /*!< PHY Reset */ +#define PHY_LOOPBACK ((uint16_t)0x4000) /*!< Select loop-back mode */ +#define PHY_FULLDUPLEX_100M ((uint16_t)0x2100) /*!< Set the full-duplex mode at 100 Mb/s */ +#define PHY_HALFDUPLEX_100M ((uint16_t)0x2000) /*!< Set the half-duplex mode at 100 Mb/s */ +#define PHY_FULLDUPLEX_10M ((uint16_t)0x0100) /*!< Set the full-duplex mode at 10 Mb/s */ +#define PHY_HALFDUPLEX_10M ((uint16_t)0x0000) /*!< Set the half-duplex mode at 10 Mb/s */ +#define PHY_AUTONEGOTIATION ((uint16_t)0x1000) /*!< Enable auto-negotiation function */ +#define PHY_RESTART_AUTONEGOTIATION ((uint16_t)0x0200) /*!< Restart auto-negotiation function */ +#define PHY_POWERDOWN ((uint16_t)0x0800) /*!< Select the power down mode */ +#define PHY_ISOLATE ((uint16_t)0x0400) /*!< Isolate PHY from MII */ + +#define PHY_AUTONEGO_COMPLETE ((uint16_t)0x0020) /*!< Auto-Negotiation process completed */ +#define PHY_LINKED_STATUS ((uint16_t)0x0004) /*!< Valid link established */ +#define PHY_JABBER_DETECTION ((uint16_t)0x0002) /*!< Jabber condition detected */ + +/* Section 4: Extended PHY Registers */ + +#define PHY_SR ((uint16_t)0x0010) /*!< PHY status register Offset */ +#define PHY_MICR ((uint16_t)0x0011) /*!< MII Interrupt Control Register */ +#define PHY_MISR ((uint16_t)0x0012) /*!< MII Interrupt Status and Misc. Control Register */ + +#define PHY_LINK_STATUS ((uint16_t)0x0001) /*!< PHY Link mask */ +#define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< PHY Speed mask */ +#define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< PHY Duplex mask */ + +#define PHY_MICR_INT_EN ((uint16_t)0x0002) /*!< PHY Enable interrupts */ +#define PHY_MICR_INT_OE ((uint16_t)0x0001) /*!< PHY Enable output interrupt events */ + +#define PHY_MISR_LINK_INT_EN ((uint16_t)0x0020) /*!< Enable Interrupt on change of link status */ +#define PHY_LINK_INTERRUPT ((uint16_t)0x2000) /*!< PHY link status interrupt mask */ + +/* ################## SPI peripheral configuration ########################## */ + +/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver +* Activated: CRC code is present inside driver +* Deactivated: CRC code cleaned from driver +*/ + +#define USE_SPI_CRC 0U + +/* Includes ------------------------------------------------------------------*/ +/** + * @brief Include module's header file + */ + +#ifdef HAL_RCC_MODULE_ENABLED + #include "stm32f4xx_hal_rcc.h" +#endif /* HAL_RCC_MODULE_ENABLED */ + +#ifdef HAL_GPIO_MODULE_ENABLED + #include "stm32f4xx_hal_gpio.h" +#endif /* HAL_GPIO_MODULE_ENABLED */ + +#ifdef HAL_EXTI_MODULE_ENABLED + #include "stm32f4xx_hal_exti.h" +#endif /* HAL_EXTI_MODULE_ENABLED */ + +#ifdef HAL_DMA_MODULE_ENABLED + #include "stm32f4xx_hal_dma.h" +#endif /* HAL_DMA_MODULE_ENABLED */ + +#ifdef HAL_CORTEX_MODULE_ENABLED + #include "stm32f4xx_hal_cortex.h" +#endif /* HAL_CORTEX_MODULE_ENABLED */ + +#ifdef HAL_ADC_MODULE_ENABLED + #include "stm32f4xx_hal_adc.h" +#endif /* HAL_ADC_MODULE_ENABLED */ + +#ifdef HAL_CAN_MODULE_ENABLED + #include "stm32f4xx_hal_can.h" +#endif /* HAL_CAN_MODULE_ENABLED */ + +#ifdef HAL_CAN_LEGACY_MODULE_ENABLED + #include "stm32f4xx_hal_can_legacy.h" +#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */ + +#ifdef HAL_CRC_MODULE_ENABLED + #include "stm32f4xx_hal_crc.h" +#endif /* HAL_CRC_MODULE_ENABLED */ + +#ifdef HAL_CRYP_MODULE_ENABLED + #include "stm32f4xx_hal_cryp.h" +#endif /* HAL_CRYP_MODULE_ENABLED */ + +#ifdef HAL_DMA2D_MODULE_ENABLED + #include "stm32f4xx_hal_dma2d.h" +#endif /* HAL_DMA2D_MODULE_ENABLED */ + +#ifdef HAL_DAC_MODULE_ENABLED + #include "stm32f4xx_hal_dac.h" +#endif /* HAL_DAC_MODULE_ENABLED */ + +#ifdef HAL_DCMI_MODULE_ENABLED + #include "stm32f4xx_hal_dcmi.h" +#endif /* HAL_DCMI_MODULE_ENABLED */ + +#ifdef HAL_ETH_MODULE_ENABLED + #include "stm32f4xx_hal_eth.h" +#endif /* HAL_ETH_MODULE_ENABLED */ + +#ifdef HAL_FLASH_MODULE_ENABLED + #include "stm32f4xx_hal_flash.h" +#endif /* HAL_FLASH_MODULE_ENABLED */ + +#ifdef HAL_SRAM_MODULE_ENABLED + #include "stm32f4xx_hal_sram.h" +#endif /* HAL_SRAM_MODULE_ENABLED */ + +#ifdef HAL_NOR_MODULE_ENABLED + #include "stm32f4xx_hal_nor.h" +#endif /* HAL_NOR_MODULE_ENABLED */ + +#ifdef HAL_NAND_MODULE_ENABLED + #include "stm32f4xx_hal_nand.h" +#endif /* HAL_NAND_MODULE_ENABLED */ + +#ifdef HAL_PCCARD_MODULE_ENABLED + #include "stm32f4xx_hal_pccard.h" +#endif /* HAL_PCCARD_MODULE_ENABLED */ + +#ifdef HAL_SDRAM_MODULE_ENABLED + #include "stm32f4xx_hal_sdram.h" +#endif /* HAL_SDRAM_MODULE_ENABLED */ + +#ifdef HAL_HASH_MODULE_ENABLED + #include "stm32f4xx_hal_hash.h" +#endif /* HAL_HASH_MODULE_ENABLED */ + +#ifdef HAL_I2C_MODULE_ENABLED + #include "stm32f4xx_hal_i2c.h" +#endif /* HAL_I2C_MODULE_ENABLED */ + +#ifdef HAL_SMBUS_MODULE_ENABLED + #include "stm32f4xx_hal_smbus.h" +#endif /* HAL_SMBUS_MODULE_ENABLED */ + +#ifdef HAL_I2S_MODULE_ENABLED + #include "stm32f4xx_hal_i2s.h" +#endif /* HAL_I2S_MODULE_ENABLED */ + +#ifdef HAL_IWDG_MODULE_ENABLED + #include "stm32f4xx_hal_iwdg.h" +#endif /* HAL_IWDG_MODULE_ENABLED */ + +#ifdef HAL_LTDC_MODULE_ENABLED + #include "stm32f4xx_hal_ltdc.h" +#endif /* HAL_LTDC_MODULE_ENABLED */ + +#ifdef HAL_PWR_MODULE_ENABLED + #include "stm32f4xx_hal_pwr.h" +#endif /* HAL_PWR_MODULE_ENABLED */ + +#ifdef HAL_RNG_MODULE_ENABLED + #include "stm32f4xx_hal_rng.h" +#endif /* HAL_RNG_MODULE_ENABLED */ + +#ifdef HAL_RTC_MODULE_ENABLED + #include "stm32f4xx_hal_rtc.h" +#endif /* HAL_RTC_MODULE_ENABLED */ + +#ifdef HAL_SAI_MODULE_ENABLED + #include "stm32f4xx_hal_sai.h" +#endif /* HAL_SAI_MODULE_ENABLED */ + +#ifdef HAL_SD_MODULE_ENABLED + #include "stm32f4xx_hal_sd.h" +#endif /* HAL_SD_MODULE_ENABLED */ + +#ifdef HAL_SPI_MODULE_ENABLED + #include "stm32f4xx_hal_spi.h" +#endif /* HAL_SPI_MODULE_ENABLED */ + +#ifdef HAL_TIM_MODULE_ENABLED + #include "stm32f4xx_hal_tim.h" +#endif /* HAL_TIM_MODULE_ENABLED */ + +#ifdef HAL_UART_MODULE_ENABLED + #include "stm32f4xx_hal_uart.h" +#endif /* HAL_UART_MODULE_ENABLED */ + +#ifdef HAL_USART_MODULE_ENABLED + #include "stm32f4xx_hal_usart.h" +#endif /* HAL_USART_MODULE_ENABLED */ + +#ifdef HAL_IRDA_MODULE_ENABLED + #include "stm32f4xx_hal_irda.h" +#endif /* HAL_IRDA_MODULE_ENABLED */ + +#ifdef HAL_SMARTCARD_MODULE_ENABLED + #include "stm32f4xx_hal_smartcard.h" +#endif /* HAL_SMARTCARD_MODULE_ENABLED */ + +#ifdef HAL_WWDG_MODULE_ENABLED + #include "stm32f4xx_hal_wwdg.h" +#endif /* HAL_WWDG_MODULE_ENABLED */ + +#ifdef HAL_PCD_MODULE_ENABLED + #include "stm32f4xx_hal_pcd.h" +#endif /* HAL_PCD_MODULE_ENABLED */ + +#ifdef HAL_HCD_MODULE_ENABLED + #include "stm32f4xx_hal_hcd.h" +#endif /* HAL_HCD_MODULE_ENABLED */ + +#ifdef HAL_DSI_MODULE_ENABLED + #include "stm32f4xx_hal_dsi.h" +#endif /* HAL_DSI_MODULE_ENABLED */ + +#ifdef HAL_QSPI_MODULE_ENABLED + #include "stm32f4xx_hal_qspi.h" +#endif /* HAL_QSPI_MODULE_ENABLED */ + +#ifdef HAL_CEC_MODULE_ENABLED + #include "stm32f4xx_hal_cec.h" +#endif /* HAL_CEC_MODULE_ENABLED */ + +#ifdef HAL_FMPI2C_MODULE_ENABLED + #include "stm32f4xx_hal_fmpi2c.h" +#endif /* HAL_FMPI2C_MODULE_ENABLED */ + +#ifdef HAL_SPDIFRX_MODULE_ENABLED + #include "stm32f4xx_hal_spdifrx.h" +#endif /* HAL_SPDIFRX_MODULE_ENABLED */ + +#ifdef HAL_DFSDM_MODULE_ENABLED + #include "stm32f4xx_hal_dfsdm.h" +#endif /* HAL_DFSDM_MODULE_ENABLED */ + +#ifdef HAL_LPTIM_MODULE_ENABLED + #include "stm32f4xx_hal_lptim.h" +#endif /* HAL_LPTIM_MODULE_ENABLED */ + +#ifdef HAL_MMC_MODULE_ENABLED + #include "stm32f4xx_hal_mmc.h" +#endif /* HAL_MMC_MODULE_ENABLED */ + +/* Exported macro ------------------------------------------------------------*/ +#ifdef USE_FULL_ASSERT +/** + * @brief The assert_param macro is used for function's parameters check. + * @param expr If expr is false, it calls assert_failed function + * which reports the name of the source file and the source + * line number of the call that failed. + * If expr is true, it returns no value. + * @retval None + */ + #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) +/* Exported functions ------------------------------------------------------- */ + void assert_failed(uint8_t* file, uint32_t line); +#else + #define assert_param(expr) ((void)0U) +#endif /* USE_FULL_ASSERT */ + + +#ifdef __cplusplus +} +#endif + +#endif /* __STM32F4xx_HAL_CONF_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld new file mode 100644 index 000000000000..e07c5e4acef9 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/ldscript.ld @@ -0,0 +1,203 @@ +/* +***************************************************************************** +** +** File : LinkerScript.ld +** +** +** Abstract : Linker script for STM32F4x5RGTx series +** 1024Kbytes FLASH and 192Kbytes RAM +** +** Set heap size, stack size and stack location according +** to application requirements. +** +** Set memory bank area and size if external memory is used. +** +** Target : STMicroelectronics STM32 +** +** Distribution: The file is distributed “as is,” without any warranty +** of any kind. +** +***************************************************************************** +** @attention +** +**

© COPYRIGHT(c) 2019 STMicroelectronics

+** +** Redistribution and use in source and binary forms, with or without modification, +** are permitted provided that the following conditions are met: +** 1. Redistributions of source code must retain the above copyright notice, +** this list of conditions and the following disclaimer. +** 2. Redistributions in binary form must reproduce the above copyright notice, +** this list of conditions and the following disclaimer in the documentation +** and/or other materials provided with the distribution. +** 3. Neither the name of STMicroelectronics nor the names of its contributors +** may be used to endorse or promote products derived from this software +** without specific prior written permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +** +***************************************************************************** +*/ + +/* Entry Point */ +ENTRY(Reset_Handler) + +/* Highest address of the user mode stack */ +_estack = 0x20000000 + LD_MAX_DATA_SIZE; /* end of RAM */ +/* Generate a link error if heap and stack don't fit into RAM */ +_Min_Heap_Size = 0x200; /* required amount of heap */ +_Min_Stack_Size = 0x400; /* required amount of stack */ + +/* Specify the memory areas */ +MEMORY +{ +RAM (xrw) : ORIGIN = 0x20000000, LENGTH = LD_MAX_DATA_SIZE +CCMRAM (rw) : ORIGIN = 0x10000000, LENGTH = 64K +FLASH (rx) : ORIGIN = 0x08000000 + LD_FLASH_OFFSET, LENGTH = LD_MAX_SIZE - LD_FLASH_OFFSET +} + +/* Define output sections */ +SECTIONS +{ + /* The startup code goes first into FLASH */ + .isr_vector : + { + . = ALIGN(4); + KEEP(*(.isr_vector)) /* Startup code */ + . = ALIGN(4); + } >FLASH + + /* The program code and other data goes into FLASH */ + .text ALIGN(8): + { + . = ALIGN(4); + *(.text) /* .text sections (code) */ + *(.text*) /* .text* sections (code) */ + *(.glue_7) /* glue arm to thumb code */ + *(.glue_7t) /* glue thumb to arm code */ + *(.eh_frame) + + KEEP (*(.init)) + KEEP (*(.fini)) + + . = ALIGN(4); + _etext = .; /* define a global symbols at end of code */ + } >FLASH + + /* Constant data goes into FLASH */ + .rodata ALIGN(4): + { + . = ALIGN(4); + *(.rodata) /* .rodata sections (constants, strings, etc.) */ + *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ + . = ALIGN(4); + } >FLASH + + .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH + .ARM : { + __exidx_start = .; + *(.ARM.exidx*) + __exidx_end = .; + } >FLASH + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array*)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >FLASH + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT(.init_array.*))) + KEEP (*(.init_array*)) + PROVIDE_HIDDEN (__init_array_end = .); + } >FLASH + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT(.fini_array.*))) + KEEP (*(.fini_array*)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >FLASH + + /* used by the startup to initialize data */ + _sidata = LOADADDR(.data); + + /* Initialized data sections goes into RAM, load LMA copy after code */ + .data : + { + . = ALIGN(4); + _sdata = .; /* create a global symbol at data start */ + *(.data) /* .data sections */ + *(.data*) /* .data* sections */ + + . = ALIGN(4); + _edata = .; /* define a global symbol at data end */ + } >RAM AT> FLASH + + _siccmram = LOADADDR(.ccmram); + + /* CCM-RAM section + * + * IMPORTANT NOTE! + * If initialized variables will be placed in this section, + * the startup code needs to be modified to copy the init-values. + */ + .ccmram : + { + . = ALIGN(4); + _sccmram = .; /* create a global symbol at ccmram start */ + *(.ccmram) + *(.ccmram*) + + . = ALIGN(4); + _eccmram = .; /* create a global symbol at ccmram end */ + } >CCMRAM AT> FLASH + + + /* Uninitialized data section */ + . = ALIGN(4); + .bss : + { + /* This is used by the startup in order to initialize the .bss secion */ + _sbss = .; /* define a global symbol at bss start */ + __bss_start__ = _sbss; + *(.bss) + *(.bss*) + *(COMMON) + + . = ALIGN(4); + _ebss = .; /* define a global symbol at bss end */ + __bss_end__ = _ebss; + } >RAM + + /* User_heap_stack section, used to check that there is enough RAM left */ + ._user_heap_stack : + { + . = ALIGN(8); + PROVIDE ( end = . ); + PROVIDE ( _end = . ); + . = . + _Min_Heap_Size; + . = . + _Min_Stack_Size; + . = ALIGN(8); + } >RAM + + /* Remove information from the standard libraries */ + /DISCARD/ : + { + libc.a ( * ) + libm.a ( * ) + libgcc.a ( * ) + } + + .ARM.attributes 0 : { *(.ARM.attributes) } +} diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp new file mode 100644 index 000000000000..034f685dcecd --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.cpp @@ -0,0 +1,177 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "pins_arduino.h" + +#ifdef __cplusplus +extern "C" { +#endif + +// Digital PinName array +const PinName digitalPin[] = { + PA_0, // Digital pin 0 + PA_1, // Digital pin 1 + PA_2, // Digital pin 2 + PA_3, // Digital pin 3 + PA_4, // Digital pin 4 + PA_5, // Digital pin 5 + PA_6, // Digital pin 6 + PA_7, // Digital pin 7 + PA_8, // Digital pin 8 + PA_9, // Digital pin 9 + PA_10, // Digital pin 10 + PA_11, // Digital pin 11 + PA_12, // Digital pin 12 + PA_13, // Digital pin 13 + PA_14, // Digital pin 14 + PA_15, // Digital pin 15 + + PB_0, // Digital pin 16 + PB_1, // Digital pin 17 + PB_2, // Digital pin 18 + PB_3, // Digital pin 19 + PB_4, // Digital pin 20 + PB_5, // Digital pin 21 + PB_6, // Digital pin 22 + PB_7, // Digital pin 23 + PB_8, // Digital pin 24 + PB_9, // Digital pin 25 + PB_10, // Digital pin 26 + PB_11, // Digital pin 27 + PB_12, // Digital pin 28 + PB_13, // Digital pin 29 + PB_14, // Digital pin 30 + PB_15, // Digital pin 31 + + PC_0, // Digital pin 32 + PC_1, // Digital pin 33 + PC_2, // Digital pin 34 + PC_3, // Digital pin 35 + PC_4, // Digital pin 36 + PC_5, // Digital pin 37 + PC_6, // Digital pin 38 + PC_7, // Digital pin 39 + PC_8, // Digital pin 40 + PC_9, // Digital pin 41 + PC_10, // Digital pin 42 + PC_11, // Digital pin 43 + PC_12, // Digital pin 44 + PC_13, // Digital pin 45 + PC_14, // Digital pin 46 + PC_15, // Digital pin 47 + + PD_2, // Digital pin 48 + + PH_0, // Digital pin 49, used by the external oscillator + PH_1 // Digital pin 40, used by the external oscillator +}; + +// Analog (Ax) pin number array +const uint32_t analogInputPin[] = { + 0, // A0, PA0 + 1, // A1, PA1 + 2, // A2, PA2 + 3, // A3, PA3 + 4, // A4, PA4 + 5, // A5, PA5 + 6, // A6, PA6 + 7, // A7, PA7 + 16, // A8, PB0 + 17, // A9, PB1 + 32, // A10, PC0 + 33, // A11, PC1 + 34, // A12, PC2 + 35, // A13, PC3 + 36, // A14, PC4 + 37 // A15, PC5 +}; + +#ifdef __cplusplus +} +#endif + +// ---------------------------------------------------------------------------- + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * @brief Configures the System clock source, PLL Multiplier and Divider factors, + * AHB/APBx prescalers and Flash settings + * @note This function should be called only once the RCC clock configuration + * is reset to the default reset state (done in SystemInit() function). + * @param None + * @retval None + */ + +/******************************************************************************/ +/* PLL (clocked by HSE) used as System clock source */ +/******************************************************************************/ + +WEAK void SetSysClock_PLL_HSE(void) { + + RCC_OscInitTypeDef RCC_OscInitStruct; + RCC_ClkInitTypeDef RCC_ClkInitStruct; + + /**Configure the main internal regulator output voltage + */ + __HAL_RCC_PWR_CLK_ENABLE(); + + __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1); + + /**Initializes the CPU, AHB and APB busses clocks + */ + RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; + RCC_OscInitStruct.HSEState = RCC_HSE_ON; + RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; + RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; + RCC_OscInitStruct.PLL.PLLM = (HSE_VALUE / 1000000); + RCC_OscInitStruct.PLL.PLLN = 336; + RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; + RCC_OscInitStruct.PLL.PLLQ = 7; + + if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) + _Error_Handler(__FILE__, __LINE__); + + /**Initializes the CPU, AHB and APB busses clocks + */ + RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK + | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2; + RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; + RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; + RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4; + RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2; + + if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK) + _Error_Handler(__FILE__, __LINE__); +} + +WEAK void SystemClock_Config(void) { + SetSysClock_PLL_HSE(); + + /* Ensure CCM RAM clock is enabled */ + __HAL_RCC_CCMDATARAMEN_CLK_ENABLE(); + + /* Output clock on MCO2 pin(PC9) for debugging purpose */ + //HAL_RCC_MCOConfig(RCC_MCO2, RCC_MCO2SOURCE_SYSCLK, RCC_MCODIV_4); +} + +#ifdef __cplusplus +} +#endif diff --git a/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.h new file mode 100644 index 000000000000..ec6e498b2179 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/MARLIN_TH3D_EZBOARD_LITE_V2/variant.h @@ -0,0 +1,148 @@ +/* + Copyright (c) 2011 Arduino. All right reserved. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _VARIANT_ARDUINO_STM32_ +#define _VARIANT_ARDUINO_STM32_ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +/*---------------------------------------------------------------------------- + * Pins (STM32F405RG and STM32F415RG) + *----------------------------------------------------------------------------*/ + +// | DIGITAL | ANALOG IN | ANALOG OUT | UART/USART | TWI | SPI | SPECIAL | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PA0 PIN_A0 // | 0 | A0 (ADC1) | | UART4_TX | | | | +#define PA1 PIN_A1 // | 1 | A1 (ADC1) | | UART4_RX | | | | +#define PA2 PIN_A2 // | 2 | A2 (ADC1) | | USART2_TX | | | | +#define PA3 PIN_A3 // | 3 | A3 (ADC1) | | USART2_RX | | | | +#define PA4 PIN_A4 // | 4 | A4 (ADC1) | DAC_OUT1 | | | SPI1_SS, (SPI3_SS) | | +#define PA5 PIN_A5 // | 5 | A5 (ADC1) | DAC_OUT2 | | | SPI1_SCK | | +#define PA6 PIN_A6 // | 6 | A6 (ADC1) | | | | SPI1_MISO | | +#define PA7 PIN_A7 // | 7 | A7 (ADC1) | | | | SPI1_MOSI | | +#define PA8 8 // | 8 | | | | TWI3_SCL | | | +#define PA9 9 // | 9 | | | USART1_TX | | SPI2_SCK | | +#define PA10 10 // | 10 | | | USART1_RX | | | | +#define PA11 11 // | 11 | | | | | | | +#define PA12 12 // | 12 | | | | | | | +#define PA13 13 // | 13 | | | | | | SWD_SWDIO | +#define PA14 14 // | 14 | | | | | | SWD_SWCLK | +#define PA15 15 // | 15 | | | | | SPI3_SS, (SPI1_SS) | | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PB0 PIN_A8 // | 16 | A8 (ADC1) | | | | | | +#define PB1 PIN_A9 // | 17 | A9 (ADC1) | | | | | | +#define PB2 18 // | 18 | | | | | | BOOT1 | +#define PB3 19 // | 19 | | | | | SPI3_SCK, (SPI1_SCK) | | +#define PB4 20 // | 20 | | | | | SPI3_MISO, (SPI1_MISO) | | +#define PB5 21 // | 21 | | | | | SPI3_MOSI, (SPI1_MOSI) | | +#define PB6 22 // | 22 | | | USART1_TX | TWI1_SCL | | | +#define PB7 23 // | 23 | | | USART1_RX | TWI1_SDA | | | +#define PB8 24 // | 24 | | | | TWI1_SCL | | | +#define PB9 25 // | 25 | | | | TWI1_SDA | SPI2_SS | | +#define PB10 26 // | 26 | | | USART3_TX | TWI2_SCL | SPI2_SCK | | +#define PB11 27 // | 27 | | | USART3_RX | TWI2_SDA | | | +#define PB12 28 // | 28 | | | | | SPI2_SS | | +#define PB13 29 // | 29 | | | | | SPI2_SCK | | +#define PB14 30 // | 30 | | | | | SPI2_MISO | | +#define PB15 31 // | 31 | | | | | SPI2_MOSI | | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PC0 PIN_A10 // | 32 | A10 (ADC1) | | | | | | +#define PC1 PIN_A11 // | 33 | A11 (ADC1) | | | | | | +#define PC2 PIN_A12 // | 34 | A12 (ADC1) | | | | SPI2_MISO | | +#define PC3 PIN_A13 // | 35 | A13 (ADC1) | | | | SPI2_MOSI | | +#define PC4 PIN_A14 // | 36 | A14 (ADC1) | | | | | | +#define PC5 PIN_A15 // | 37 | A15 (ADC1) | | | | | | +#define PC6 38 // | 38 | | | USART6_TX | | | | +#define PC7 39 // | 39 | | | USART3_RX | | SPI2_SCK | | +#define PC8 40 // | 40 | | | | | | | +#define PC9 41 // | 41 | | | | TWI3_SDA | | | +#define PC10 42 // | 42 | | | USART3_TX, (UART4_TX) | | SPI3_SCK | | +#define PC11 43 // | 43 | | | USART3_RX, (UART4_RX) | | SPI3_MISO | | +#define PC12 44 // | 44 | | | UART5_TX | | SPI3_MOSI | | +#define PC13 45 // | 45 | | | | | | | +#define PC14 46 // | 46 | | | | | | OSC32_IN | +#define PC15 47 // | 47 | | | | | | OSC32_OUT | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PD2 48 // | 48 | | | UART5_RX | | | | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| +#define PH0 49 // | 49 | | | | | | OSC_IN | +#define PH1 50 // | 50 | | | | | | OSC_OUT | +// |---------|------------|------------|-----------------------|----------------------|-----------------------------------|-----------| + +/// This must be a literal +#define NUM_DIGITAL_PINS 51 +#define NUM_ANALOG_INPUTS 16 + +// On-board LED pin number +#ifndef LED_BUILTIN +#define LED_BUILTIN PA5 +#endif +#define LED_GREEN LED_BUILTIN + +// On-board user button +#ifndef USER_BTN +#define USER_BTN PC13 +#endif + +// Timer Definitions +// Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin +#define TIMER_TONE TIM5 +#define TIMER_SERVO TIM7 + +// UART Definitions +// Define here Serial instance number to map on Serial generic name +#define SERIAL_UART_INSTANCE 1 + +// Default pin used for 'Serial' instance +// Mandatory for Firmata +#define PIN_SERIAL_RX PA10 +#define PIN_SERIAL_TX PA9 + +/* Extra HAL modules */ +#define HAL_DAC_MODULE_ENABLED + +#ifdef __cplusplus +} // extern "C" +#endif +/*---------------------------------------------------------------------------- + * Arduino objects - C++ only + *----------------------------------------------------------------------------*/ + +#ifdef __cplusplus + // These serial port names are intended to allow libraries and architecture-neutral + // sketches to automatically default to the correct port name for a particular type + // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, + // the first hardware serial port whose RX/TX pins are not dedicated to another use. + // + // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor + // + // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial + // + // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library + // + // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. + // + // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX + // pins are NOT connected to anything by default. + #define SERIAL_PORT_MONITOR Serial + #define SERIAL_PORT_HARDWARE Serial +#endif + +#endif /* _VARIANT_ARDUINO_STM32_ */ diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-flash.inc b/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-flash.inc deleted file mode 100644 index ddb8876fa5d2..000000000000 --- a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-flash.inc +++ /dev/null @@ -1,5 +0,0 @@ -MEMORY -{ - ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 61K - rom (rx) : ORIGIN = 0x08005000, LENGTH = 492K -} diff --git a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/PeripheralPins.c b/buildroot/share/PlatformIO/variants/STEVAL_F401VE/PeripheralPins.c deleted file mode 100644 index 5335361a6aef..000000000000 --- a/buildroot/share/PlatformIO/variants/STEVAL_F401VE/PeripheralPins.c +++ /dev/null @@ -1,274 +0,0 @@ - -/* - ******************************************************************************* - * Copyright (c) 2019, STMicroelectronics - * All rights reserved. - * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause - * - ******************************************************************************* - * Automatically generated from STM32F401V(D-E)Tx.xml - */ -#include "Arduino.h" -#include "PeripheralPins.h" - -/* ===== - * Note: Commented lines are alternative possibilities which are not used per default. - * If you change them, you will have to know what you do - * ===== - */ - -//*** ADC *** - -#ifdef HAL_ADC_MODULE_ENABLED -WEAK const PinMap PinMap_ADC[] = { - {PA_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 - {PA_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1 - {PA_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2 - {PA_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3 - // {PA_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4 - // {PA_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5 - // {PA_6, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6 - // {PA_7, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7 - // {PB_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8 - // {PB_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9 - // {PC_0, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10 - // {PC_1, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11 - {PC_2, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12 - {PC_3, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13 - // {PC_4, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14 - // {PC_5, ADC1, STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15 - {NC, NP, 0} -}; -#endif - -//*** No DAC *** - -//*** I2C *** - -#ifdef HAL_I2C_MODULE_ENABLED -WEAK const PinMap PinMap_I2C_SDA[] = { - // {PB_3, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C2)}, - // {PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C3)}, - {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, - // {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, - // {PC_9, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, - {NC, NP, 0} -}; -#endif - -#ifdef HAL_I2C_MODULE_ENABLED -WEAK const PinMap PinMap_I2C_SCL[] = { - // {PA_8, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)}, - {PB_6, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, - // {PB_8, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)}, - // {PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)}, - {NC, NP, 0} -}; -#endif - -//*** PWM *** - -#ifdef HAL_TIM_MODULE_ENABLED -WEAK const PinMap PinMap_PWM[] = { - // {PA_0, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PA_0, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1 - // {PA_1, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - // {PA_1, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2 - // {PA_2, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 - // {PA_2, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3 - // {PA_2, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 - // {PA_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4 - // {PA_3, TIM5, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4 - // {PA_3, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - // {PA_5, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PA_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - // {PA_7, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - // {PA_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - // {PA_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 - // {PA_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 - // {PA_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 - // {PA_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 - // {PA_15, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1 - // {PB_0, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - {PB_0, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 - // {PB_1, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - {PB_1, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 - // {PB_3, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2 - // {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - // {PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - // {PB_6, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 - // {PB_7, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 - // {PB_8, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 - // {PB_8, TIM10, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 - // {PB_9, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 - // {PB_9, TIM11, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 - {PB_10, TIM2, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3 - // {PB_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - // {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - // {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - {PC_6, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - {PC_7, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2 - // {PC_8, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3 - // {PC_9, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4 - {PD_12, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1 - {PD_13, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2 - {PD_14, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3 - {PD_15, TIM4, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4 - {PE_5, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 - // {PE_6, TIM9, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 - // {PE_8, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N - // {PE_9, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1 - // {PE_10, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N - // {PE_11, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 - // {PE_12, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N - // {PE_13, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 - {PE_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4 - {NC, NP, 0} -}; -#endif - -//*** SERIAL *** - -#ifdef HAL_UART_MODULE_ENABLED -WEAK const PinMap PinMap_UART_TX[] = { - // {PA_2, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - {PA_9, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PA_11, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, - // {PB_6, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PC_6, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, - {PD_5, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - {NC, NP, 0} -}; -#endif - -#ifdef HAL_UART_MODULE_ENABLED -WEAK const PinMap PinMap_UART_RX[] = { - // {PA_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - {PA_10, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PA_12, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, - // {PB_7, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - // {PC_7, USART6, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)}, - {PD_6, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - {NC, NP, 0} -}; -#endif - -#ifdef HAL_UART_MODULE_ENABLED -WEAK const PinMap PinMap_UART_RTS[] = { - // {PA_1, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - // {PA_12, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - {PD_4, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - {NC, NP, 0} -}; -#endif - -#ifdef HAL_UART_MODULE_ENABLED -WEAK const PinMap PinMap_UART_CTS[] = { - // {PA_0, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - // {PA_11, USART1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)}, - {PD_3, USART2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)}, - {NC, NP, 0} -}; -#endif - -//*** SPI *** - -#ifdef HAL_SPI_MODULE_ENABLED -WEAK const PinMap PinMap_SPI_MOSI[] = { - {PA_7, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_5, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PD_6, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PE_6, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, - // {PE_14, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, - {NC, NP, 0} -}; -#endif - -#ifdef HAL_SPI_MODULE_ENABLED -WEAK const PinMap PinMap_SPI_MISO[] = { - {PA_6, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_2, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PE_5, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, - // {PE_13, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, - {NC, NP, 0} -}; -#endif - -#ifdef HAL_SPI_MODULE_ENABLED -WEAK const PinMap PinMap_SPI_SCLK[] = { - {PA_5, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_3, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PB_3, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PD_3, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PE_2, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, - // {PE_12, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, - {NC, NP, 0} -}; -#endif - -#ifdef HAL_SPI_MODULE_ENABLED -WEAK const PinMap PinMap_SPI_SSEL[] = { - {PA_4, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PA_4, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)}, - // {PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)}, - // {PB_9, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)}, - // {PE_4, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, - // {PE_11, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)}, - {NC, NP, 0} -}; -#endif - -//*** No CAN *** - -//*** No ETHERNET *** - -//*** No QUADSPI *** - -//*** USB *** - -#ifdef HAL_PCD_MODULE_ENABLED -WEAK const PinMap PinMap_USB_OTG_FS[] = { - // {PA_8, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF - // {PA_9, USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS - // {PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID - {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM - {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP - {NC, NP, 0} -}; -#endif - -//*** No USB_OTG_HS *** -//*** SD *** - -#ifdef HAL_SD_MODULE_ENABLED -WEAK const PinMap PinMap_SD[] = { - // {PB_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4 - // {PB_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5 - // {PC_6, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6 - // {PC_7, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7 - {PC_8, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0 - {PC_9, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1 - {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2 - {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3 - {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK - {PD_2, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD - {NC, NP, 0} -}; -#endif diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/board.cpp b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/board.cpp old mode 100755 new mode 100644 similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/board.cpp rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/board.cpp diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/board/board.h b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/board/board.h old mode 100755 new mode 100644 similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/board/board.h rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/board/board.h diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/common.inc b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/common.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/common.inc rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/common.inc diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/extra_libs.inc b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/extra_libs.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/extra_libs.inc rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/extra_libs.inc diff --git a/buildroot/share/PlatformIO/ldscripts/chitu_f103.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/flash.ld similarity index 100% rename from buildroot/share/PlatformIO/ldscripts/chitu_f103.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/flash.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103z_dfu.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103z_dfu.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103z_dfu.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103z_dfu.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103zc.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103zc.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103zc.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103zc.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103zd.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103zd.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103zd.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103zd.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103ze.ld b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103ze.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/stm32f103ze.ld rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/stm32f103ze.ld diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/ld/vector_symbols.inc b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/vector_symbols.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/ld/vector_symbols.inc rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/ld/vector_symbols.inc diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/pins_arduino.h b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/pins_arduino.h old mode 100755 new mode 100644 similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/pins_arduino.h rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/pins_arduino.h diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/variant.h b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/variant.h old mode 100755 new mode 100644 similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/variant.h rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/variant.h diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/boards.cpp b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards.cpp old mode 100755 new mode 100644 similarity index 99% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/boards.cpp rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards.cpp index 2210e9844c53..f22cf354e208 --- a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/boards.cpp +++ b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards.cpp @@ -156,7 +156,7 @@ static void setup_nvic(void) { nvic_init((uint32)VECT_TAB_ADDR, 0); -/* Roger Clark. We now control nvic vector table in boards.txt using the build.vect paramater +/* Roger Clark. We now control nvic vector table in boards.txt using the build.vect parameter #ifdef VECT_TAB_FLASH nvic_init(USER_ADDR_ROM, 0); #elif defined VECT_TAB_RAM diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/boards_setup.cpp b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards_setup.cpp old mode 100755 new mode 100644 similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/boards_setup.cpp rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/boards_setup.cpp diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/start.S b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/start.S similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/start.S rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/start.S diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/start_c.c b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/start_c.c similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/start_c.c rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/start_c.c diff --git a/buildroot/share/PlatformIO/variants/CHITU_F103/wirish/syscalls.c b/buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/syscalls.c similarity index 100% rename from buildroot/share/PlatformIO/variants/CHITU_F103/wirish/syscalls.c rename to buildroot/share/PlatformIO/variants/marlin_CHITU_F103/wirish/syscalls.c diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/board.cpp b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/board.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/board.cpp rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/board.cpp diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/board/board.h b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/board/board.h similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/board/board.h rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/board/board.h diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/bootloader.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/bootloader.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/bootloader.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/bootloader.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/common.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/common.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/common.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/common.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/extra_libs.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/extra_libs.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/extra_libs.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/extra_libs.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/flash.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/flash.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/flash.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/flash.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/jtag.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/jtag.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/jtag.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/jtag.ld diff --git a/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-flash.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-flash.inc new file mode 100644 index 000000000000..75030ec01a89 --- /dev/null +++ b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-flash.inc @@ -0,0 +1,5 @@ +MEMORY +{ + ram (rwx) : ORIGIN = 0x20000C00, LENGTH = 64K - 3K + rom (rx) : ORIGIN = 0x08005000, LENGTH = 512K - 20K +} diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-jtag.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-jtag.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-jtag.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-jtag.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-ram.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-ram.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/mem-ram.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/mem-ram.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/ram.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/ram.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/ram.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/ram.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rb.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rb.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb_bootloader.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rb_bootloader.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rb_bootloader.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rb_bootloader.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rc.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rc.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc_bootloader.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rc_bootloader.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103rc_bootloader.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103rc_bootloader.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103re.ld b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103re.ld similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/stm32f103re.ld rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/stm32f103re.ld diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/ld/vector_symbols.inc b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/vector_symbols.inc similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/ld/vector_symbols.inc rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/ld/vector_symbols.inc diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/pins_arduino.h b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/pins_arduino.h similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/pins_arduino.h rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/pins_arduino.h diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/variant.h b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/variant.h similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/variant.h rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/variant.h diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards.cpp b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards.cpp similarity index 99% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards.cpp rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards.cpp index 12321229defb..77dcbcf848d3 100644 --- a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards.cpp +++ b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards.cpp @@ -156,7 +156,7 @@ static void setup_nvic(void) { nvic_init((uint32)VECT_TAB_ADDR, 0); -/* Roger Clark. We now control nvic vector table in boards.txt using the build.vect paramater +/* Roger Clark. We now control nvic vector table in boards.txt using the build.vect parameter #ifdef VECT_TAB_FLASH nvic_init(USER_ADDR_ROM, 0); #elif defined VECT_TAB_RAM diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards_setup.cpp b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards_setup.cpp similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/boards_setup.cpp rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/boards_setup.cpp diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/start.S b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/start.S similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/start.S rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/start.S diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/start_c.c b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/start_c.c similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/start_c.c rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/start_c.c diff --git a/buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/syscalls.c b/buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/syscalls.c similarity index 100% rename from buildroot/share/PlatformIO/variants/MEEB_3DP/wirish/syscalls.c rename to buildroot/share/PlatformIO/variants/marlin_MEEB_3DP/wirish/syscalls.c diff --git a/buildroot/share/extras/header.h b/buildroot/share/extras/header.h index 5d2c73dfbeef..e40471dface9 100644 --- a/buildroot/share/extras/header.h +++ b/buildroot/share/extras/header.h @@ -1,6 +1,6 @@ /** * Marlin 3D Printer Firmware - * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] + * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * * Based on Sprinter and grbl. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm diff --git a/buildroot/share/fonts/buildhzk.py b/buildroot/share/fonts/buildhzk.py new file mode 100644 index 000000000000..185cc14e973c --- /dev/null +++ b/buildroot/share/fonts/buildhzk.py @@ -0,0 +1,64 @@ +# Generate a 'HZK' font file for the T5UIC1 DWIN LCD +# from multiple bdf font files. +# Note: the 16x16 glyphs are not produced +# Author: Taylor Talkington +# License: GPL + +import bdflib.reader +import math + +def glyph_bits(size_x, size_y, font, glyph_ord): + asc = font[b'FONT_ASCENT'] + desc = font[b'FONT_DESCENT'] + bits = [0 for y in range(size_y)] + + glyph_bytes = math.ceil(size_x / 8) + try: + glyph = font[glyph_ord] + for y, row in enumerate(glyph.data): + v = row + rpad = size_x - glyph.bbW + if rpad < 0: rpad = 0 + if glyph.bbW > size_x: v = v >> (glyph.bbW - size_x) # some glyphs are actually too wide to fit! + v = v << (glyph_bytes * 8) - size_x + rpad + v = v >> glyph.bbX + bits[y + desc + glyph.bbY] |= v + except KeyError: + pass + + bits.reverse() + return bits + +def marlin_font_hzk(): + fonts = [ + [6,12,'marlin-6x12-3.bdf'], + [8,16,'marlin-8x16.bdf'], + [10,20,'marlin-10x20.bdf'], + [12,24,'marlin-12x24.bdf'], + [14,28,'marlin-14x28.bdf'], + [16,32,'marlin-16x32.bdf'], + [20,40,'marlin-20x40.bdf'], + [24,48,'marlin-24x48.bdf'], + [28,56,'marlin-28x56.bdf'], + [32,64,'marlin-32x64.bdf'] + ] + + with open('marlin_fixed.hzk','wb') as output: + for f in fonts: + with open(f[2], 'rb') as file: + print(f'{f[0]}x{f[1]}') + font = bdflib.reader.read_bdf(file) + for glyph in range(128): + bits = glyph_bits(f[0], f[1], font, glyph) + glyph_bytes = math.ceil(f[0]/8) + + for b in bits: + try: + z = b.to_bytes(glyph_bytes, 'big') + output.write(z) + except OverflowError: + print('Overflow') + print(f'{glyph}') + print(font[glyph]) + for b in bits: print(f'{b:0{f[0]}b}') + return diff --git a/buildroot/share/fonts/genallfont.sh b/buildroot/share/fonts/genallfont.sh index 0a66990212d7..ebb99b273fdc 100755 --- a/buildroot/share/fonts/genallfont.sh +++ b/buildroot/share/fonts/genallfont.sh @@ -62,7 +62,7 @@ OLDWD=`pwd` # # By default loop through all languages # -LANGS_DEFAULT="an bg ca cz da de el el_gr en es eu fi fr gl hr hu it jp_kana ko_KR nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test" +LANGS_DEFAULT="an bg ca cz da de el el_CY en es eu fi fr gl hr hu it jp_kana ko_KR nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test" # # Generate data for language list MARLIN_LANGS or all if not provided @@ -105,6 +105,9 @@ if [ 1 = 1 ]; then * Marlin 3D Printer Firmware * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] * + * Based on Sprinter and grbl. + * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -119,7 +122,8 @@ if [ 1 = 1 ]; then * along with this program. If not, see . * */ -#include + +#include #if defined(__AVR__) && ENABLED(NOT_EXTENDED_ISO10646_1_5X7) // reduced font (only symbols 1 - 127) - saves about 1278 bytes of FLASH diff --git a/buildroot/share/fonts/genpages.c b/buildroot/share/fonts/genpages.c index c855ceac509c..dea5b05c5c80 100644 --- a/buildroot/share/fonts/genpages.c +++ b/buildroot/share/fonts/genpages.c @@ -142,12 +142,12 @@ uint8_t* get_utf8_value(uint8_t *pstart, wchar_t *pval) { return p; } -void usage(char* progname) { +void usage(char *progname) { fprintf(stderr, "usage: %s\n", progname); fprintf(stderr, " read data from stdin\n"); } -void utf8_parse(const char* msg, unsigned int len) { +void utf8_parse(const char *msg, unsigned int len) { uint8_t *pend = NULL; uint8_t *p; uint8_t *pre; diff --git a/buildroot/share/fonts/marlin-10x20.bdf b/buildroot/share/fonts/marlin-10x20.bdf new file mode 100644 index 000000000000..e6716d9b12a4 --- /dev/null +++ b/buildroot/share/fonts/marlin-10x20.bdf @@ -0,0 +1,4104 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 20 100 100 +FONTBOUNDINGBOX 12 19 0 -3 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 17 +FONT_DESCENT 3 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +FE00 +FE00 +F180 +F180 +C180 +C180 +C180 +C780 +C780 +3F80 +0600 +0600 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +F000 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +FF80 +FF80 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 0 2 +BITMAP +08 +0C +0E +FF +FF +0E +0C +08 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 14 0 0 +BITMAP +0800 +1C00 +3E00 +7F00 +FF80 +FF80 +0800 +0800 +0800 +0800 +0800 +0800 +F800 +F800 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -2 +BITMAP +0800 +3E00 +3E00 +C980 +C980 +C980 +CF80 +CF80 +C180 +C180 +C180 +3E00 +3E00 +0800 +0800 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 11 8 0 2 +BITMAP +E700 +7380 +39C0 +1CE0 +1CE0 +39C0 +7380 +E700 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 15 1 -2 +BITMAP +FE +92 +92 +82 +82 +82 +82 +82 +82 +82 +82 +92 +92 +92 +FE +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 16 1 -3 +BITMAP +10 +28 +28 +28 +28 +28 +28 +28 +C6 +82 +92 +92 +92 +82 +82 +7C +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 4 1 5 +BITMAP +60 +90 +90 +60 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 12 4 0 +BITMAP +80 +80 +80 +80 +80 +80 +80 +80 +80 +00 +80 +80 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 5 2 8 +BITMAP +90 +90 +90 +90 +90 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 10 0 0 +BITMAP +2200 +2200 +FF80 +2200 +2200 +2200 +2200 +FF80 +2200 +2200 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 16 0 -2 +BITMAP +0800 +0800 +3E00 +4900 +8880 +8880 +4800 +3E00 +0900 +0880 +0880 +8880 +4900 +3E00 +0800 +0800 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +E080 +E080 +E100 +0200 +0400 +0800 +0800 +1000 +2000 +4380 +8380 +8380 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 0 +BITMAP +3000 +4800 +8800 +4800 +3000 +3000 +4880 +8900 +4600 +2900 +1080 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 5 4 8 +BITMAP +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 -2 +BITMAP +18 +20 +20 +40 +40 +40 +80 +80 +80 +40 +40 +40 +20 +20 +18 +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 -2 +BITMAP +C0 +20 +20 +10 +10 +10 +08 +08 +08 +10 +10 +10 +20 +20 +C0 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0800 +0800 +8880 +4900 +3E00 +0800 +0800 +3E00 +4900 +8880 +0800 +0800 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 9 0 1 +BITMAP +0800 +0800 +0800 +0800 +FF80 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 3 5 2 -2 +BITMAP +E0 +20 +20 +40 +80 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 1 0 5 +BITMAP +FF80 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 2 2 3 0 +BITMAP +C0 +C0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0080 +0100 +0200 +0200 +0400 +0800 +0800 +1000 +1000 +2000 +4000 +8000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8380 +8480 +9880 +E080 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +20 +20 +E0 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +0100 +0200 +0400 +0800 +1000 +2000 +4000 +FF80 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF00 +0180 +0080 +0100 +0200 +0400 +0E00 +0100 +0080 +C100 +2200 +1C00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0200 +0600 +0A00 +1200 +2200 +4200 +8200 +8200 +FF80 +0200 +0200 +0200 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +8000 +8000 +8000 +FE00 +0100 +0080 +0080 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 0 0 +BITMAP +06 +08 +10 +20 +40 +FC +82 +81 +81 +41 +22 +1C +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +0080 +0080 +0100 +0200 +0400 +0800 +0800 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3E00 +4100 +8080 +8080 +4100 +3E00 +4100 +8080 +8080 +8080 +4100 +3E00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +3C +42 +81 +81 +81 +41 +3F +01 +02 +04 +08 +70 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 2 7 2 0 +BITMAP +C0 +C0 +00 +00 +00 +C0 +C0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 3 9 2 -2 +BITMAP +C0 +C0 +00 +00 +E0 +20 +20 +40 +80 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 8 2 2 +BITMAP +10 +20 +40 +80 +80 +40 +20 +10 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 5 0 3 +BITMAP +FF80 +0000 +0000 +0000 +FF80 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 8 2 2 +BITMAP +80 +40 +20 +10 +10 +20 +40 +80 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 0 0 +BITMAP +1C +22 +41 +81 +02 +04 +08 +08 +08 +00 +00 +08 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8780 +8880 +8880 +8880 +8700 +4000 +2000 +1E00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8080 +8080 +FF80 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +FC +42 +41 +41 +42 +7C +42 +41 +41 +41 +42 +FC +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8000 +8000 +8000 +8000 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +F8 +44 +42 +41 +41 +41 +41 +41 +41 +42 +44 +F8 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +8000 +8000 +8000 +8000 +FE00 +8000 +8000 +8000 +8000 +8000 +FF80 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +8000 +8000 +8000 +8000 +FE00 +8000 +8000 +8000 +8000 +8000 +8000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8000 +8000 +8000 +8780 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +8080 +8080 +FF80 +8080 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +F8 +20 +20 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0F80 +0200 +0200 +0200 +0200 +0200 +0200 +0200 +0200 +8200 +4400 +3800 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +81 +82 +84 +88 +90 +E0 +A0 +90 +88 +84 +82 +81 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +8000 +8000 +8000 +8000 +8000 +8000 +8000 +8000 +8000 +8000 +FF80 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +C180 +A280 +9480 +8880 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +C080 +A080 +9080 +8880 +8480 +8280 +8180 +8080 +8080 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8080 +8080 +8080 +8080 +8080 +4100 +2200 +1C00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 0 0 +BITMAP +FC +82 +81 +81 +81 +82 +FC +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +1C00 +2200 +4100 +8080 +8080 +8080 +8080 +8080 +8480 +4200 +2100 +1C80 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 0 0 +BITMAP +FC +82 +81 +81 +81 +FE +90 +90 +88 +84 +82 +81 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 12 1 0 +BITMAP +3C +42 +81 +80 +80 +7C +02 +01 +01 +81 +42 +3C +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +4100 +3E00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8080 +4100 +2200 +1400 +0800 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +8080 +8080 +8080 +8080 +8880 +8880 +8880 +5500 +2200 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +4100 +2200 +1400 +0800 +0800 +1400 +2200 +4100 +8080 +8080 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8080 +8080 +8080 +4100 +2200 +1400 +0800 +0800 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +FF80 +0080 +0080 +0100 +0200 +0400 +0800 +1000 +2000 +4000 +8000 +FF80 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 -2 +BITMAP +F8 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +F8 +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +4000 +2000 +1000 +1000 +0800 +0800 +0400 +0400 +0200 +0100 +0080 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 -2 +BITMAP +F8 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +F8 +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 5 0 8 +BITMAP +0800 +1400 +2200 +4100 +8080 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 1 0 -3 +BITMAP +FF80 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 5 2 8 +BITMAP +80 +40 +20 +10 +08 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 1 0 +BITMAP +7C +02 +01 +7F +81 +81 +81 +7F +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +8000 +8000 +8000 +FE00 +8100 +8080 +8080 +8080 +8080 +8100 +FE00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 0 0 +BITMAP +3E +40 +80 +80 +80 +41 +22 +1C +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0080 +0080 +0080 +0080 +3F80 +4080 +8080 +8080 +8080 +8080 +4080 +3F80 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 0 0 +BITMAP +7E +81 +81 +81 +FE +80 +40 +3E +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 0 +BITMAP +0E00 +1100 +2080 +2000 +2000 +F800 +2000 +2000 +2000 +2000 +2000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +3E00 +4100 +8080 +8080 +8080 +8080 +4080 +3F80 +0080 +0100 +3E00 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +8000 +8000 +8000 +FE00 +8100 +8080 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +20 +00 +00 +00 +E0 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 15 2 -3 +BITMAP +02 +00 +00 +00 +1E +02 +02 +02 +02 +02 +02 +02 +82 +44 +38 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +8000 +8000 +8000 +8080 +8100 +8200 +8400 +F800 +8400 +8200 +8100 +8080 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +E0 +20 +20 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +F600 +8900 +8880 +8880 +8880 +8880 +8880 +8880 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +9E00 +A100 +C080 +8080 +8080 +8080 +8080 +8080 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +3E00 +4100 +8080 +8080 +8080 +8080 +4100 +3E00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +FE00 +8100 +8080 +8080 +8080 +8080 +8100 +FE00 +8000 +8000 +8000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +3F00 +4080 +8080 +8080 +8080 +8080 +4080 +3F80 +0080 +0080 +0080 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +9E00 +A100 +C080 +8000 +8000 +8000 +8000 +8000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +3F80 +4000 +4000 +3E00 +0100 +0080 +0100 +FE00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0800 +0800 +0800 +0800 +FF80 +0800 +0800 +0800 +0800 +0800 +0400 +0380 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +8080 +8080 +8080 +8080 +8180 +8280 +4480 +3880 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +8080 +8080 +8080 +8080 +4100 +2200 +1400 +0800 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +8080 +8080 +8080 +8880 +8880 +8880 +5500 +2200 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 9 0 0 +BITMAP +8080 +4100 +2200 +1400 +0800 +1400 +2200 +4100 +8080 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +8080 +8080 +8080 +8080 +4100 +2200 +1400 +0800 +1000 +2000 +4000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 8 8 0 0 +BITMAP +FF +02 +04 +08 +10 +20 +40 +FF +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 16 3 -2 +BITMAP +10 +20 +40 +40 +40 +40 +40 +80 +80 +40 +40 +40 +40 +40 +20 +10 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 15 4 -2 +BITMAP +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 4 16 2 -2 +BITMAP +80 +40 +20 +20 +20 +20 +20 +10 +10 +20 +20 +20 +20 +20 +40 +80 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 10 5 0 3 +BITMAP +3040 +4840 +8880 +8500 +8200 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 360 0 +DWIDTH 5 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 12 4 0 +BITMAP +80 +80 +00 +00 +80 +80 +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 -2 +BITMAP +0800 +0800 +3E00 +C980 +C980 +C800 +C800 +C980 +3E00 +3E00 +0800 +0800 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0E00 +0E00 +3180 +3180 +3000 +F800 +F800 +3000 +3000 +3180 +CE00 +CE00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +C980 +3600 +3600 +C180 +C180 +3600 +C980 +C980 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +C180 +C180 +3600 +3600 +FF80 +0800 +0800 +FF80 +FF80 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 1 12 4 0 +BITMAP +80 +80 +80 +80 +80 +00 +00 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 13 2 0 +BITMAP +3E +C0 +C0 +38 +38 +C6 +C6 +C6 +38 +38 +06 +F8 +F8 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 1 2 12 +BITMAP +D8 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 10 12 0 0 +BITMAP +3F80 +3F80 +C040 +C040 +CE40 +C840 +C840 +CE40 +CE40 +C040 +3F80 +3F80 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 8 2 7 +BITMAP +38 +38 +D8 +38 +38 +00 +00 +F8 +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +0980 +3600 +3600 +C800 +C800 +3600 +0980 +0980 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 5 0 2 +BITMAP +FF80 +FF80 +0180 +0180 +0180 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 2 2 5 +BITMAP +F8 +F8 +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 10 12 0 0 +BITMAP +3F80 +3F80 +C040 +C040 +CE40 +C840 +C840 +C840 +C840 +C040 +3F80 +3F80 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 1 0 12 +BITMAP +FF80 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 7 2 8 +BITMAP +38 +38 +C6 +C6 +C6 +38 +38 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0800 +0800 +0800 +0800 +FF80 +0800 +0800 +0800 +0800 +0000 +FF80 +FF80 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 8 2 7 +BITMAP +20 +20 +D8 +18 +18 +20 +20 +F8 +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 8 2 7 +BITMAP +E0 +E0 +18 +20 +20 +18 +18 +E0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 5 2 8 +BITMAP +18 +20 +20 +C0 +C0 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +C180 +C180 +C180 +C180 +C180 +C780 +F980 +F980 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3F80 +F980 +F980 +F980 +F980 +F980 +3980 +3980 +0980 +0980 +0980 +0980 +0980 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 3 3 4 5 +BITMAP +E0 +E0 +E0 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 3 2 -3 +BITMAP +18 +18 +E0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 8 2 7 +BITMAP +20 +20 +E0 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 9 2 8 +BITMAP +20 +20 +D8 +D8 +20 +00 +00 +F8 +F8 +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +C800 +3600 +3600 +0980 +0980 +3600 +C800 +C800 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +F000 +F000 +3180 +3600 +3600 +3800 +3800 +3600 +CE00 +CE00 +3600 +3600 +3F80 +0600 +0600 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +F000 +F000 +3180 +3600 +3600 +3800 +3800 +3600 +C980 +C980 +0180 +0180 +0600 +0F80 +0F80 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +F000 +F000 +0800 +0800 +3180 +0E00 +0E00 +F800 +F800 +3600 +CE00 +CE00 +3600 +3600 +3F80 +0600 +0600 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +0800 +0800 +0000 +0000 +0800 +0800 +0800 +3000 +3000 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +0800 +0800 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3980 +3980 +CE00 +CE00 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0000 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0800 +3E00 +3E00 +C180 +C180 +C180 +FF80 +FF80 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3F80 +3F80 +C800 +C800 +C800 +FE00 +FE00 +C800 +C800 +C800 +CF80 +CF80 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -3 +BITMAP +3E00 +3E00 +C180 +C180 +C000 +C000 +C000 +C000 +C000 +C180 +3E00 +3E00 +0600 +0600 +3800 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +0800 +0800 +0000 +FF80 +FF80 +C000 +C000 +C000 +FE00 +FE00 +C000 +C000 +C000 +FF80 +FF80 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +FF80 +FF80 +C000 +C000 +C000 +FE00 +FE00 +C000 +C000 +C000 +FF80 +FF80 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0000 +FF80 +FF80 +C000 +C000 +C000 +FE00 +FE00 +C000 +C000 +C000 +FF80 +FF80 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0000 +FF80 +FF80 +C000 +C000 +C000 +FE00 +FE00 +C000 +C000 +C000 +FF80 +FF80 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 17 2 0 +BITMAP +C0 +C0 +20 +20 +00 +F8 +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 17 2 0 +BITMAP +18 +18 +20 +20 +00 +F8 +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 17 2 0 +BITMAP +20 +20 +D8 +D8 +00 +F8 +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 15 2 0 +BITMAP +D8 +D8 +00 +F8 +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3E00 +3E00 +3180 +3180 +3180 +F980 +F980 +3180 +3180 +3180 +3E00 +3E00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3980 +3980 +CE00 +CE00 +0000 +C180 +C180 +C180 +C180 +F180 +C980 +C980 +C780 +C780 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +0800 +0800 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3980 +3980 +CE00 +CE00 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 2 +BITMAP +C180 +C180 +3600 +0800 +0800 +3600 +3600 +C180 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -2 +BITMAP +0180 +3E00 +3E00 +C780 +C780 +C980 +C980 +C980 +C980 +C980 +F180 +3E00 +3E00 +C000 +C000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +3000 +3000 +0800 +0800 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0800 +0800 +3600 +3600 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 17 0 0 +BITMAP +0600 +0600 +0800 +0800 +0000 +C180 +C180 +C180 +C180 +3600 +0800 +0800 +0800 +0800 +0800 +0800 +0800 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 7 12 2 0 +BITMAP +C0 +C0 +F8 +F8 +C6 +C6 +C6 +C6 +C6 +F8 +C0 +C0 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3E00 +3E00 +C180 +C180 +C600 +C800 +C800 +C600 +C600 +C180 +CE00 +CE00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +0800 +0800 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0600 +0800 +0800 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3980 +CE00 +CE00 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3600 +3600 +0000 +0000 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0800 +0800 +3E00 +0180 +0180 +3F80 +3F80 +C180 +3F80 +3F80 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +3E00 +0980 +0980 +3E00 +3E00 +C800 +3F80 +3F80 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 11 0 -3 +BITMAP +3E00 +C180 +C180 +C000 +C000 +C180 +3E00 +3E00 +0600 +0600 +3800 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +0800 +0800 +0000 +0000 +3E00 +C180 +C180 +FE00 +FE00 +C000 +3E00 +3E00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0600 +0800 +0800 +0000 +0000 +3E00 +C180 +C180 +FE00 +FE00 +C000 +3E00 +3E00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0000 +0000 +3E00 +C180 +C180 +FE00 +FE00 +C000 +3E00 +3E00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3600 +3600 +0000 +0000 +3E00 +C180 +C180 +FE00 +FE00 +C000 +3E00 +3E00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 13 2 0 +BITMAP +C0 +20 +20 +00 +00 +E0 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 13 2 0 +BITMAP +18 +20 +20 +00 +00 +E0 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 13 2 0 +BITMAP +20 +D8 +D8 +00 +00 +E0 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 5 12 2 0 +BITMAP +D8 +D8 +00 +00 +E0 +20 +20 +20 +20 +20 +F8 +F8 +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 0 +BITMAP +3600 +3600 +0800 +3600 +3600 +0180 +0180 +3F80 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3980 +CE00 +CE00 +0000 +0000 +CE00 +F180 +F180 +C180 +C180 +C180 +C180 +C180 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +0800 +0800 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0600 +0800 +0800 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3980 +CE00 +CE00 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3600 +3600 +0000 +0000 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 2 +BITMAP +0800 +0800 +0000 +FF80 +FF80 +0000 +0000 +0800 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 8 0 0 +BITMAP +3F80 +C780 +C780 +C980 +C980 +F180 +FE00 +FE00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +3000 +0800 +0800 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0600 +0800 +0800 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 13 0 0 +BITMAP +0800 +3600 +3600 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 12 0 0 +BITMAP +3600 +3600 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 16 0 -3 +BITMAP +0600 +0800 +0800 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +3600 +0800 +0800 +3000 +3000 +C000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -3 +BITMAP +C000 +C000 +C000 +C000 +FE00 +C180 +C180 +C180 +C180 +C180 +FE00 +FE00 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 15 0 -3 +BITMAP +3600 +3600 +0000 +0000 +C180 +C180 +C180 +C180 +C180 +3600 +0800 +0800 +3000 +3000 +C000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-12x24.bdf b/buildroot/share/fonts/marlin-12x24.bdf new file mode 100644 index 000000000000..b8b85e328696 --- /dev/null +++ b/buildroot/share/fonts/marlin-12x24.bdf @@ -0,0 +1,4558 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 24 100 100 +FONTBOUNDINGBOX 14 23 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 22 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +FF00 +FF00 +F0C0 +F0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C3C0 +C3C0 +3FC0 +3FC0 +0300 +0300 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +F000 +F000 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 4 +BITMAP +0C00 +0E00 +0F00 +0F80 +FFC0 +FFC0 +0F80 +0F00 +0E00 +0C00 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +1E00 +3F00 +7F80 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +FC00 +FC00 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 0 +BITMAP +0C00 +0C00 +3F00 +3F00 +CCC0 +CCC0 +CCC0 +CCC0 +CFC0 +CFC0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +0C00 +0C00 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 13 10 0 4 +BITMAP +F380 +F380 +3DE0 +3DE0 +0E78 +0E78 +3DE0 +3DE0 +F380 +F380 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 0 +BITMAP +FFC0 +FFC0 +CCC0 +CCC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CCC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 -2 +BITMAP +0C00 +1E00 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +7380 +E1C0 +C0C0 +CCC0 +CCC0 +CCC0 +CCC0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 6 0 8 +BITMAP +30 +78 +CC +CC +78 +30 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 14 4 2 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +C0 +C0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 6 2 12 +BITMAP +CC +CC +CC +CC +CC +CC +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 12 0 2 +BITMAP +3300 +3300 +FFC0 +FFC0 +3300 +3300 +3300 +3300 +FFC0 +FFC0 +3300 +3300 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 19 0 0 +BITMAP +0C00 +0C00 +1E00 +3F00 +6F80 +CDC0 +CCC0 +CC00 +EC00 +7F00 +3F80 +0DC0 +0CC0 +CCC0 +EDC0 +7F80 +3F00 +0C00 +0C00 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +E0C0 +E0C0 +E0C0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +E000 +C1C0 +C1C0 +C1C0 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3000 +7800 +CC00 +CC00 +CC00 +CC00 +7800 +7800 +DCC0 +CFC0 +C780 +C780 +7FC0 +3CC0 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 6 4 12 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +0C +1C +38 +30 +60 +60 +C0 +C0 +C0 +C0 +C0 +C0 +E0 +60 +70 +38 +1C +0C +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +C0 +E0 +70 +30 +18 +18 +0C +0C +0C +0C +0C +0C +18 +18 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0C00 +0C00 +CCC0 +EDC0 +7F80 +3F00 +0C00 +0C00 +3F00 +7F80 +EDC0 +CCC0 +0C00 +0C00 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 4 +BITMAP +0C00 +0C00 +0C00 +0C00 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 6 2 0 +BITMAP +F0 +F0 +30 +30 +E0 +C0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 2 0 8 +BITMAP +FFC0 +FFC0 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 4 2 2 +BITMAP +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +00C0 +01C0 +0380 +0300 +0300 +0700 +0E00 +1C00 +3800 +3000 +3000 +7000 +E000 +C000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C1C0 +C3C0 +C7C0 +CEC0 +DCC0 +F8C0 +F0C0 +E0C0 +C0C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +30 +30 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +00C0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +00C0 +01C0 +0380 +0700 +0F00 +0F80 +01C0 +00C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0300 +0700 +0F00 +1F00 +3B00 +7300 +E300 +C300 +FFC0 +FFC0 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +C000 +C000 +FF00 +FF80 +01C0 +00C0 +00C0 +00C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0F00 +1F00 +3800 +7000 +E000 +C000 +FF00 +FF80 +C1C0 +C0C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +00C0 +00C0 +0180 +0300 +0600 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +C0C0 +C0C0 +7F80 +7F80 +C0C0 +C0C0 +C0C0 +C0C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +C0C0 +C0C0 +7FC0 +3FC0 +00C0 +01C0 +0380 +0700 +3E00 +3C00 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 10 2 2 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 12 2 0 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +F0 +F0 +30 +30 +E0 +C0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 4 +BITMAP +0C +1C +38 +70 +E0 +E0 +70 +38 +1C +0C +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 6 0 6 +BITMAP +FFC0 +FFC0 +0000 +0000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 4 +BITMAP +C0 +E0 +70 +38 +1C +1C +38 +70 +E0 +C0 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C1C0 +0380 +0700 +0E00 +0C00 +0C00 +0C00 +0000 +0000 +0C00 +0C00 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +C7C0 +CFC0 +CCC0 +CCC0 +CFC0 +C780 +C000 +C000 +7F00 +3F00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FF00 +FF80 +30C0 +30C0 +30C0 +30C0 +3F80 +3F80 +30C0 +30C0 +30C0 +30C0 +FF80 +FF00 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C000 +C000 +C000 +C000 +C000 +C000 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FF00 +FF80 +31C0 +30C0 +30C0 +30C0 +30C0 +30C0 +30C0 +30C0 +30C0 +31C0 +FF80 +FF00 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C000 +C000 +C000 +C000 +C3C0 +C3C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0FC0 +0FC0 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +C300 +E700 +7E00 +3C00 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C1C0 +C380 +C700 +CE00 +DC00 +F800 +F800 +DC00 +CE00 +C700 +C380 +C1C0 +C0C0 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +E1C0 +F3C0 +FFC0 +DEC0 +CCC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +E0C0 +F0C0 +F8C0 +DCC0 +CEC0 +C7C0 +C3C0 +C1C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C1C0 +FF80 +FF00 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CEC0 +C700 +E380 +7DC0 +3CC0 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C1C0 +FF80 +FF00 +DC00 +CE00 +C700 +C380 +C1C0 +C0C0 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C000 +E000 +7F00 +3F80 +01C0 +00C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CCC0 +CCC0 +FFC0 +7F80 +3300 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +1E00 +3F00 +7380 +E1C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +FFC0 +FFC0 +00C0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +E000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +FC +FC +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +FC +FC +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +E000 +7000 +3000 +3000 +3800 +1C00 +0E00 +0700 +0300 +0300 +0380 +01C0 +00C0 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +FC +FC +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +FC +FC +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 6 0 12 +BITMAP +0C00 +1E00 +3F00 +7380 +E1C0 +C0C0 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 2 0 -2 +BITMAP +FFC0 +FFC0 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 6 2 12 +BITMAP +C0 +E0 +70 +38 +1C +0C +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +3F80 +01C0 +00C0 +3FC0 +7FC0 +C0C0 +C0C0 +7FC0 +3FC0 +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +C000 +C000 +C000 +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C1C0 +FF80 +FF00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +7F00 +E000 +C000 +C000 +C000 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +00C0 +00C0 +00C0 +00C0 +3FC0 +7FC0 +E0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E0C0 +7FC0 +3FC0 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +FF80 +FF00 +C000 +E000 +7F00 +3F00 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0F00 +1F80 +39C0 +30C0 +3000 +3000 +FC00 +FC00 +3000 +3000 +3000 +3000 +3000 +3000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +E0C0 +7FC0 +3FC0 +00C0 +01C0 +3F80 +3F00 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +C000 +C000 +C000 +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 8 18 2 -2 +BITMAP +03 +03 +00 +00 +0F +0F +03 +03 +03 +03 +03 +03 +03 +03 +C3 +E7 +7E +3C +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C000 +C000 +C000 +C000 +C0C0 +C1C0 +C380 +C700 +FE00 +FE00 +C700 +C380 +C1C0 +C0C0 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +F300 +FF80 +DFC0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +CF00 +DF80 +F9C0 +F0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +7F80 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +FF00 +FF80 +C1C0 +C0C0 +C0C0 +C0C0 +C0C0 +C1C0 +FF80 +FF00 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +3FC0 +7FC0 +E0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E0C0 +7FC0 +3FC0 +00C0 +00C0 +00C0 +00C0 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +CF00 +DF80 +F9C0 +F0C0 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3FC0 +7FC0 +C000 +C000 +7F00 +3F80 +00C0 +00C0 +FF80 +FF00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0C00 +0C00 +0C00 +0C00 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +0C00 +0E00 +07C0 +03C0 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C3C0 +E7C0 +7EC0 +3CC0 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CCC0 +CCC0 +FFC0 +7F80 +3300 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +C0C0 +E1C0 +7380 +3F00 +1E00 +1E00 +3F00 +7380 +E1C0 +C0C0 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +1C00 +3800 +7000 +E000 +C000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +FFC0 +FFC0 +0380 +0700 +0E00 +1C00 +3800 +7000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +0C +1C +38 +30 +30 +30 +30 +70 +C0 +C0 +70 +30 +30 +30 +30 +38 +1C +0C +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 18 4 0 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 0 +BITMAP +C0 +E0 +70 +30 +30 +30 +30 +38 +0C +0C +38 +30 +30 +30 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 6 0 6 +BITMAP +30C0 +78C0 +DCC0 +CEC0 +C780 +C300 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 504 0 +DWIDTH 7 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 14 4 2 +BITMAP +C0 +C0 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 0 +BITMAP +0C00 +0C00 +3F00 +3F00 +CCC0 +CCC0 +CC00 +CC00 +CCC0 +CCC0 +3F00 +3F00 +0C00 +0C00 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0F00 +0F00 +30C0 +30C0 +3000 +3000 +FC00 +FC00 +3000 +3000 +30C0 +30C0 +CF00 +CF00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +CCC0 +CCC0 +3300 +3300 +C0C0 +C0C0 +3300 +3300 +CCC0 +CCC0 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +C0C0 +C0C0 +3300 +3300 +FFC0 +FFC0 +0C00 +0C00 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 2 14 4 2 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 8 16 2 2 +BITMAP +3F +3F +C0 +C0 +3C +3C +C3 +C3 +C3 +C3 +3C +3C +03 +03 +FC +FC +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 2 2 16 +BITMAP +CC +CC +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 12 14 0 2 +BITMAP +3FC0 +3FC0 +C030 +C030 +CF30 +CF30 +CC30 +CC30 +CF30 +CF30 +C030 +C030 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 10 +BITMAP +3C +3C +CC +CC +3C +3C +00 +00 +FC +FC +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +0CC0 +0CC0 +3300 +3300 +CC00 +CC00 +3300 +3300 +0CC0 +0CC0 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 6 0 4 +BITMAP +FFC0 +FFC0 +00C0 +00C0 +00C0 +00C0 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 2 2 8 +BITMAP +FC +FC +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 12 14 0 2 +BITMAP +3FC0 +3FC0 +C030 +C030 +CF30 +CF30 +CC30 +CC30 +CC30 +CC30 +C030 +C030 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 2 0 16 +BITMAP +FFC0 +FFC0 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 8 8 2 12 +BITMAP +3C +3C +C3 +C3 +C3 +C3 +3C +3C +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0C00 +0C00 +0C00 +0C00 +FFC0 +FFC0 +0C00 +0C00 +0C00 +0C00 +0000 +0000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 10 +BITMAP +30 +30 +CC +CC +0C +0C +30 +30 +FC +FC +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 10 +BITMAP +F0 +F0 +0C +0C +30 +30 +0C +0C +F0 +F0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 6 2 12 +BITMAP +0C +0C +30 +30 +C0 +C0 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C3C0 +C3C0 +FCC0 +FCC0 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3FC0 +3FC0 +FCC0 +FCC0 +FCC0 +FCC0 +FCC0 +FCC0 +3CC0 +3CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +0CC0 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 4 4 4 8 +BITMAP +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 4 2 -2 +BITMAP +0C +0C +F0 +F0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 10 +BITMAP +30 +30 +F0 +F0 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 10 2 12 +BITMAP +30 +30 +CC +CC +30 +30 +00 +00 +FC +FC +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +CC00 +CC00 +3300 +3300 +0CC0 +0CC0 +3300 +3300 +CC00 +CC00 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +F000 +F000 +30C0 +30C0 +3300 +3300 +3C00 +3C00 +3300 +3300 +CF00 +CF00 +3300 +3300 +3FC0 +3FC0 +0300 +0300 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +F000 +F000 +30C0 +30C0 +3300 +3300 +3C00 +3C00 +3300 +3300 +CCC0 +CCC0 +00C0 +00C0 +0300 +0300 +0FC0 +0FC0 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +F000 +F000 +0C00 +0C00 +30C0 +30C0 +0F00 +0F00 +FC00 +FC00 +3300 +3300 +CF00 +CF00 +3300 +3300 +3FC0 +3FC0 +0300 +0300 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +0C00 +0C00 +0000 +0000 +0C00 +0C00 +0C00 +0C00 +3000 +3000 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0C00 +0C00 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +FFC0 +FFC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3FC0 +3FC0 +CC00 +CC00 +CC00 +CC00 +FF00 +FF00 +CC00 +CC00 +CC00 +CC00 +CFC0 +CFC0 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 -2 +BITMAP +3F00 +3F00 +C0C0 +C0C0 +C000 +C000 +C000 +C000 +C000 +C000 +C0C0 +C0C0 +3F00 +3F00 +0300 +0300 +3C00 +3C00 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0000 +0000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +FF00 +FF00 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 20 2 2 +BITMAP +C0 +C0 +30 +30 +00 +00 +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 20 2 2 +BITMAP +0C +0C +30 +30 +00 +00 +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 20 2 2 +BITMAP +30 +30 +CC +CC +00 +00 +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 18 2 2 +BITMAP +CC +CC +00 +00 +FC +FC +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +3F00 +30C0 +30C0 +30C0 +30C0 +FCC0 +FCC0 +30C0 +30C0 +30C0 +30C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +F0C0 +F0C0 +CCC0 +CCC0 +C3C0 +C3C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 4 +BITMAP +C0C0 +C0C0 +3300 +3300 +0C00 +0C00 +3300 +3300 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 0 +BITMAP +00C0 +00C0 +3F00 +3F00 +C3C0 +C3C0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +F0C0 +F0C0 +3F00 +3F00 +C000 +C000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +3300 +3300 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 8 14 2 2 +BITMAP +C0 +C0 +FC +FC +C3 +C3 +C3 +C3 +C3 +C3 +FC +FC +C0 +C0 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3F00 +3F00 +C0C0 +C0C0 +C300 +C300 +CC00 +CC00 +C300 +C300 +C0C0 +C0C0 +CF00 +CF00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0C00 +0C00 +3F00 +3F00 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3F00 +3F00 +0CC0 +0CC0 +3F00 +3F00 +CC00 +CC00 +3FC0 +3FC0 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 -2 +BITMAP +3F00 +3F00 +C0C0 +C0C0 +C000 +C000 +C0C0 +C0C0 +3F00 +3F00 +0300 +0300 +3C00 +3C00 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +3F00 +3F00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +3F00 +3F00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +3F00 +3F00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +3F00 +3F00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 16 2 2 +BITMAP +C0 +C0 +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 16 2 2 +BITMAP +0C +0C +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 16 2 2 +BITMAP +30 +30 +CC +CC +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 6 14 2 2 +BITMAP +CC +CC +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +FC +FC +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 2 +BITMAP +3300 +3300 +0C00 +0C00 +3300 +3300 +00C0 +00C0 +3FC0 +3FC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +CF00 +CF00 +F0C0 +F0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3CC0 +3CC0 +CF00 +CF00 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3300 +3300 +0000 +0000 +3F00 +3F00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 4 +BITMAP +0C00 +0C00 +0000 +0000 +FFC0 +FFC0 +0000 +0000 +0C00 +0C00 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 10 0 2 +BITMAP +3FC0 +3FC0 +C3C0 +C3C0 +CCC0 +CCC0 +F0C0 +F0C0 +FF00 +FF00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +3000 +3000 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 16 0 2 +BITMAP +0C00 +0C00 +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 14 0 2 +BITMAP +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 20 0 -2 +BITMAP +0300 +0300 +0C00 +0C00 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3300 +3300 +0C00 +0C00 +3000 +3000 +C000 +C000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 -2 +BITMAP +C000 +C000 +C000 +C000 +FF00 +FF00 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +FF00 +FF00 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 864 0 +DWIDTH 12 0 +BBX 10 18 0 -2 +BITMAP +3300 +3300 +0000 +0000 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +3300 +3300 +0C00 +0C00 +3000 +3000 +C000 +C000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-14x28.bdf b/buildroot/share/fonts/marlin-14x28.bdf new file mode 100644 index 000000000000..8a91ff060551 --- /dev/null +++ b/buildroot/share/fonts/marlin-14x28.bdf @@ -0,0 +1,5078 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 28 100 100 +FONTBOUNDINGBOX 16 27 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. orig" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 26 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +FFC0 +FFC0 +FFC0 +F830 +F830 +E030 +E030 +E030 +E030 +E030 +E1F0 +E1F0 +1FF0 +1FF0 +01C0 +01C0 +01C0 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +F800 +F800 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 11 0 5 +BITMAP +0600 +0700 +0780 +07C0 +FFE0 +FFF0 +FFE0 +07C0 +0780 +0700 +0600 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0F00 +1F80 +3FC0 +7FE0 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +FE00 +FE00 +FE00 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 0 +BITMAP +0600 +0600 +1FC0 +1FC0 +1FC0 +E630 +E630 +E630 +E630 +E7F0 +E7F0 +E7F0 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +0600 +0600 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 13 11 1 5 +BITMAP +E380 +F3C0 +79E0 +3CF0 +1E78 +1E78 +1E78 +3CF0 +79E0 +F3C0 +E380 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 0 +BITMAP +FFF0 +FFF0 +E630 +E630 +E630 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E630 +E630 +E630 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 23 1 -2 +BITMAP +0C00 +0C00 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +3300 +C0C0 +C0C0 +CCC0 +CCC0 +CCC0 +CCC0 +CCC0 +C0C0 +C0C0 +3F00 +3F00 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 6 6 1 10 +BITMAP +30 +78 +CC +CC +78 +30 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 17 5 2 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 6 7 3 14 +BITMAP +CC +CC +CC +CC +CC +CC +CC +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 14 0 2 +BITMAP +1980 +1980 +FFF0 +FFF0 +1980 +1980 +1980 +1980 +1980 +FFF0 +FFF0 +1980 +1980 +1980 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 0 +BITMAP +0600 +0600 +1F80 +3FC0 +76E0 +E670 +C630 +C600 +E600 +7600 +3F80 +1FC0 +06E0 +0670 +C630 +E670 +76E0 +3FC0 +1F80 +0600 +0600 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +F060 +F060 +F060 +F060 +00E0 +03C0 +0780 +0E00 +0C00 +1C00 +3800 +7000 +E000 +C1E0 +C1E0 +C1E0 +C1E0 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1800 +3C00 +7E00 +E600 +C600 +C600 +EE00 +7C00 +3800 +7C00 +EE30 +C770 +C3E0 +E3E0 +7F70 +3E30 +1C30 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 7 5 14 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 0 +BITMAP +0E +1E +38 +70 +60 +E0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +E0 +60 +70 +38 +1E +0E +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 0 +BITMAP +E0 +F0 +38 +1C +0C +0E +06 +06 +06 +06 +06 +06 +06 +06 +06 +0E +0C +1C +38 +F0 +E0 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0600 +0600 +0600 +E670 +F6F0 +3FC0 +1F80 +0600 +0600 +0600 +1F80 +3FC0 +F6F0 +E670 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 4 +BITMAP +0600 +0600 +0600 +0600 +0600 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 4 7 3 0 +BITMAP +F0 +F0 +30 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 3 0 9 +BITMAP +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 4 5 3 2 +BITMAP +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0030 +0030 +0070 +00E0 +01C0 +0180 +0380 +0300 +0700 +0E00 +1C00 +1800 +3800 +7000 +E000 +C000 +C000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1F80 +3FC0 +6060 +C030 +C070 +C0F0 +C1B0 +C330 +C630 +CC30 +D830 +F030 +E030 +C030 +6060 +3FC0 +1F80 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 17 3 2 +BITMAP +30 +30 +30 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1FC0 +3FE0 +7060 +E030 +C030 +0030 +0070 +00E0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +0030 +0030 +0070 +00E0 +01C0 +0380 +07C0 +03E0 +0070 +0030 +E030 +7070 +38E0 +1FC0 +0F80 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 0 2 +BITMAP +0180 +0180 +0380 +0780 +0F80 +1D80 +3980 +7180 +E180 +C180 +FFE0 +FFE0 +0180 +0180 +0180 +0180 +0180 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +C000 +C000 +C000 +FFC0 +FFE0 +0070 +0030 +0030 +0030 +0030 +E030 +7070 +38E0 +1FC0 +0F80 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +03C0 +07C0 +0E00 +1C00 +3800 +7000 +E000 +C000 +FFC0 +FFE0 +C070 +C030 +C030 +E030 +7070 +3FE0 +1FC0 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +0030 +0030 +0030 +0070 +00E0 +01C0 +0380 +0700 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +E0E0 +7FC0 +7FC0 +E0E0 +C060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F80 +7FC0 +E0C0 +C060 +C060 +C060 +C060 +E060 +7FE0 +3FE0 +0060 +00E0 +01C0 +0380 +0700 +1E00 +1C00 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 4 11 3 2 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +00 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 4 13 3 0 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +F0 +F0 +30 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 13 3 4 +BITMAP +06 +0E +1C +38 +70 +E0 +C0 +E0 +70 +38 +1C +0E +06 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 7 0 7 +BITMAP +FFF0 +FFF0 +0000 +0000 +0000 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 13 2 4 +BITMAP +C0 +E0 +70 +38 +1C +0E +06 +0E +1C +38 +70 +E0 +C0 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 0 2 +BITMAP +1F80 +3FC0 +70E0 +E060 +C060 +00E0 +01C0 +0380 +0700 +0600 +0600 +0600 +0000 +0000 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +1F00 +3F80 +71C0 +E0E0 +C060 +C7E0 +CFE0 +CE60 +CC60 +CEE0 +CFE0 +C7C0 +C000 +E000 +7000 +3F80 +1F80 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +1F00 +3F80 +71C0 +E0E0 +C060 +C060 +C060 +C060 +FFE0 +FFE0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +FF80 +FFC0 +30E0 +3060 +3060 +3060 +30E0 +3FE0 +3FC0 +30C0 +3060 +3060 +3060 +3060 +30E0 +FFE0 +FFC0 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F00 +7F80 +E1C0 +C0E0 +C060 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C060 +C0E0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +FF80 +FFC0 +30E0 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +3060 +30E0 +FFC0 +FF80 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +C000 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +C000 +C000 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +C000 +C000 +C000 +C000 +C000 +FFC0 +FFC0 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +1F00 +3F80 +71C0 +E0E0 +C060 +C000 +C000 +C000 +C000 +C000 +C3E0 +C3E0 +C060 +C0E0 +E1C0 +7F80 +3F00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C060 +FFE0 +FFE0 +FFE0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 8 16 2 2 +BITMAP +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 0 2 +BITMAP +07E0 +07E0 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +C180 +E380 +7700 +3E00 +1C00 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C0E0 +C1C0 +C380 +C700 +CE00 +DC00 +F800 +F000 +F800 +DC00 +CE00 +C700 +C380 +C1C0 +C0E0 +C060 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 17 1 2 +BITMAP +C0C0 +C0C0 +E1C0 +F3C0 +FFC0 +DEC0 +CCC0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +E060 +F060 +F860 +DC60 +CE60 +C760 +C3E0 +C1E0 +C0E0 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C0E0 +FFC0 +FF80 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +CC60 +CE60 +C760 +C3A0 +E1C0 +7EE0 +3E70 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C0E0 +FFC0 +FF80 +DC00 +CE00 +C700 +C380 +C1C0 +C0E0 +C060 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C000 +C000 +E000 +7F80 +3FC0 +00E0 +0060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +FFF0 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +60C0 +60C0 +3180 +3180 +1B00 +0E00 +0E00 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +CE60 +CE60 +CE60 +FFE0 +FBE0 +7BC0 +3180 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 17 1 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +1E00 +3F00 +7380 +E1C0 +C0C0 +C0C0 +C0C0 +C0C0 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 17 1 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +0C00 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 1 2 +BITMAP +FFE0 +FFE0 +0060 +0060 +00E0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +E000 +C000 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 0 +BITMAP +FE +FE +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +E000 +6000 +7000 +3000 +3800 +1C00 +0C00 +0E00 +0600 +0700 +0380 +0180 +01C0 +00C0 +00E0 +0060 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 6 21 3 0 +BITMAP +FC +FC +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +0C +FC +FC +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 7 0 14 +BITMAP +0600 +0F00 +1F80 +39C0 +70E0 +E070 +C030 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 2 0 -2 +BITMAP +FFF0 +FFF0 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 7 3 14 +BITMAP +C0 +E0 +70 +38 +1C +0E +06 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3F80 +3FC0 +00E0 +0060 +0060 +3FE0 +7FE0 +E060 +C060 +E0E0 +7FE0 +3FC0 +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C0E0 +FFC0 +FF80 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3F80 +7F80 +E000 +C000 +C000 +C000 +C000 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0030 +0030 +0030 +0030 +0030 +3FF0 +7FF0 +E030 +C030 +C030 +C030 +C030 +C030 +C030 +E030 +7FF0 +3FF0 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C0E0 +FFC0 +FF80 +C000 +C000 +E000 +7F80 +3F80 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +0F00 +1F80 +39C0 +30E0 +3060 +3000 +3000 +3000 +FC00 +FC00 +3000 +3000 +3000 +3000 +3000 +3000 +3000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 1 -2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +C060 +C060 +E060 +7FE0 +3FE0 +0060 +00E0 +3FC0 +3F80 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 16 3 2 +BITMAP +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 9 20 3 -2 +BITMAP +0180 +0180 +0000 +0000 +0F80 +0F80 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +0180 +C180 +E380 +7F00 +3E00 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 17 1 2 +BITMAP +C000 +C000 +C000 +C000 +C000 +C060 +C0E0 +C1C0 +C380 +C700 +FE00 +FE00 +C700 +C380 +C1C0 +C0E0 +C060 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 17 3 2 +BITMAP +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +F380 +FFC0 +DEE0 +CC60 +CC60 +CC60 +CC60 +CC60 +CC60 +CC60 +CC60 +CC60 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +CF80 +DFC0 +F8E0 +F060 +E060 +C060 +C060 +C060 +C060 +C060 +C060 +C060 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3F80 +7FC0 +E0E0 +C060 +C060 +C060 +C060 +C060 +C060 +E0E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 1 -2 +BITMAP +FF80 +FFC0 +C0E0 +C060 +C060 +C060 +C060 +C060 +C060 +C0E0 +FFC0 +FF80 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 16 1 -2 +BITMAP +3FE0 +7FE0 +E060 +C060 +C060 +C060 +C060 +C060 +C060 +E060 +7FE0 +3FE0 +0060 +0060 +0060 +0060 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +CF80 +DFC0 +F8E0 +F060 +E060 +C000 +C000 +C000 +C000 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +3FE0 +7FE0 +E000 +C000 +E000 +7F80 +3FC0 +00E0 +0060 +00E0 +FFC0 +FF80 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0600 +0600 +0600 +0600 +0600 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0700 +03F0 +01F0 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 12 1 2 +BITMAP +C060 +C060 +C060 +C060 +C060 +C060 +C0E0 +C1E0 +C3E0 +E760 +7E60 +3C60 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 12 1 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E1C0 +7380 +3F00 +1E00 +0C00 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 12 1 2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +CCC0 +CCC0 +CCC0 +DEC0 +FFC0 +7380 +3300 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +C030 +E070 +70E0 +39C0 +1F80 +0F00 +0F00 +1F80 +39C0 +70E0 +E070 +C030 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 10 16 1 -2 +BITMAP +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +C0C0 +E0C0 +71C0 +3B80 +1F00 +0E00 +1C00 +3800 +7000 +E000 +C000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +FFF0 +FFF0 +00E0 +01C0 +0380 +0700 +0E00 +1C00 +3800 +7000 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 0 +BITMAP +0E +1E +38 +30 +30 +30 +30 +30 +70 +E0 +C0 +E0 +70 +30 +30 +30 +30 +30 +38 +1E +0E +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 21 5 0 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 6 21 3 0 +BITMAP +C0 +E0 +70 +30 +30 +30 +30 +30 +38 +1C +0C +1C +38 +30 +30 +30 +30 +30 +70 +E0 +C0 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 11 7 1 7 +BITMAP +3060 +7860 +FC60 +CC60 +CEE0 +C7C0 +C380 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 648 0 +DWIDTH 9 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 17 5 2 +BITMAP +C0 +C0 +C0 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 16 0 0 +BITMAP +0600 +0600 +1FC0 +1FC0 +E630 +E630 +E630 +E600 +E600 +E630 +E630 +1FC0 +1FC0 +1FC0 +0600 +0600 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +07C0 +07C0 +07C0 +1830 +1830 +1800 +1800 +FE00 +FE00 +FE00 +1800 +1800 +1830 +1830 +E7C0 +E7C0 +E7C0 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +E630 +E630 +19C0 +19C0 +19C0 +E030 +E030 +19C0 +19C0 +E630 +E630 +E630 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +E030 +E030 +E030 +19C0 +19C0 +FFF0 +FFF0 +0600 +0600 +0600 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 2 17 5 2 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 9 19 3 2 +BITMAP +3F80 +3F80 +C000 +C000 +C000 +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +0180 +0180 +FE00 +FE00 +FE00 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 2 3 19 +BITMAP +CE +CE +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 14 17 0 2 +BITMAP +1FF0 +1FF0 +1FF0 +E00C +E00C +E7CC +E7CC +E60C +E60C +E60C +E7CC +E7CC +E00C +E00C +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 11 3 12 +BITMAP +3E +3E +CE +CE +3E +3E +3E +00 +00 +FE +FE +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +0630 +0630 +19C0 +19C0 +19C0 +E600 +E600 +19C0 +19C0 +0630 +0630 +0630 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 7 0 5 +BITMAP +FFF0 +FFF0 +FFF0 +0030 +0030 +0030 +0030 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 3 3 9 +BITMAP +FE +FE +FE +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 14 17 0 2 +BITMAP +1FF0 +1FF0 +1FF0 +E00C +E00C +E7CC +E7CC +E60C +E60C +E60C +E60C +E60C +E00C +E00C +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 2 0 19 +BITMAP +FFF0 +FFF0 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 9 9 3 14 +BITMAP +3E00 +3E00 +C180 +C180 +C180 +C180 +C180 +3E00 +3E00 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0600 +0600 +0600 +0600 +0600 +FFF0 +FFF0 +0600 +0600 +0600 +0600 +0600 +0000 +0000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 11 3 12 +BITMAP +30 +30 +CE +CE +0E +0E +0E +30 +30 +FE +FE +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 11 3 12 +BITMAP +F0 +F0 +0E +0E +30 +30 +30 +0E +0E +F0 +F0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 7 3 14 +BITMAP +0E +0E +30 +30 +30 +C0 +C0 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 16 0 -2 +BITMAP +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E1F0 +E1F0 +FE30 +FE30 +FE30 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1FF0 +1FF0 +FE30 +FE30 +FE30 +FE30 +FE30 +FE30 +FE30 +1E30 +1E30 +1E30 +0630 +0630 +0630 +0630 +0630 +0630 +0630 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 5 5 5 9 +BITMAP +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 4 3 -2 +BITMAP +0E +0E +F0 +F0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 11 3 12 +BITMAP +30 +30 +F0 +F0 +30 +30 +30 +30 +30 +FE +FE +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 12 3 14 +BITMAP +30 +30 +30 +CE +CE +30 +30 +00 +00 +00 +FE +FE +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +E600 +E600 +19C0 +19C0 +19C0 +0630 +0630 +19C0 +19C0 +E600 +E600 +E600 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +F800 +F800 +1830 +1830 +19C0 +19C0 +19C0 +1E00 +1E00 +19C0 +19C0 +E7C0 +E7C0 +E7C0 +19C0 +19C0 +1FF0 +1FF0 +01C0 +01C0 +01C0 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +F800 +F800 +1830 +1830 +19C0 +19C0 +19C0 +1E00 +1E00 +19C0 +19C0 +E630 +E630 +E630 +0030 +0030 +01C0 +01C0 +07F0 +07F0 +07F0 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +F800 +F800 +F800 +0600 +0600 +1830 +1830 +07C0 +07C0 +07C0 +FE00 +FE00 +19C0 +19C0 +E7C0 +E7C0 +E7C0 +19C0 +19C0 +1FF0 +1FF0 +01C0 +01C0 +01C0 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +0600 +0600 +0600 +0000 +0000 +0600 +0600 +0600 +0600 +0600 +1800 +1800 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1E30 +1E30 +1E30 +E7C0 +E7C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0600 +0600 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +FFF0 +FFF0 +FFF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1FF0 +1FF0 +1FF0 +E600 +E600 +E600 +E600 +FFC0 +FFC0 +FFC0 +E600 +E600 +E600 +E600 +E7F0 +E7F0 +E7F0 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 -2 +BITMAP +1FC0 +1FC0 +1FC0 +E030 +E030 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E030 +E030 +1FC0 +1FC0 +1FC0 +01C0 +01C0 +1E00 +1E00 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +0600 +0600 +0000 +0000 +FFF0 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +FFF0 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0000 +0000 +FFF0 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0000 +0000 +FFF0 +FFF0 +FFF0 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 24 3 2 +BITMAP +C0 +C0 +C0 +30 +30 +00 +00 +FE +FE +FE +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 24 3 2 +BITMAP +0E +0E +0E +30 +30 +00 +00 +FE +FE +FE +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 24 3 2 +BITMAP +30 +30 +30 +CE +CE +00 +00 +FE +FE +FE +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 21 3 2 +BITMAP +CE +CE +00 +00 +FE +FE +FE +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1FC0 +1FC0 +1FC0 +1830 +1830 +1830 +1830 +FE30 +FE30 +FE30 +1830 +1830 +1830 +1830 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1E30 +1E30 +1E30 +E7C0 +E7C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +F830 +F830 +E630 +E630 +E630 +E1F0 +E1F0 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1E30 +1E30 +1E30 +E7C0 +E7C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 11 0 5 +BITMAP +E030 +E030 +19C0 +19C0 +0600 +0600 +0600 +19C0 +19C0 +E030 +E030 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 0 +BITMAP +0030 +0030 +1FC0 +1FC0 +1FC0 +E1F0 +E1F0 +E630 +E630 +E630 +E630 +E630 +E630 +E630 +F830 +F830 +1FC0 +1FC0 +1FC0 +E000 +E000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +1800 +1800 +1800 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +0600 +0600 +0600 +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 24 0 2 +BITMAP +01C0 +01C0 +01C0 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +19C0 +19C0 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +0600 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 9 17 3 2 +BITMAP +C000 +C000 +C000 +FE00 +FE00 +C180 +C180 +C180 +C180 +C180 +C180 +C180 +FE00 +FE00 +C000 +C000 +C000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +1FC0 +1FC0 +1FC0 +E030 +E030 +E1C0 +E1C0 +E600 +E600 +E600 +E1C0 +E1C0 +E030 +E030 +E7C0 +E7C0 +E7C0 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1E30 +1E30 +E7C0 +E7C0 +E7C0 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0600 +0600 +1FC0 +1FC0 +0030 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +1FC0 +1FC0 +0630 +0630 +0630 +1FC0 +1FC0 +E600 +E600 +1FF0 +1FF0 +1FF0 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 16 0 -2 +BITMAP +1FC0 +1FC0 +E030 +E030 +E030 +E000 +E000 +E030 +E030 +1FC0 +1FC0 +1FC0 +01C0 +01C0 +1E00 +1E00 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +FFC0 +FFC0 +E000 +E000 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +FFC0 +FFC0 +E000 +E000 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +FFC0 +FFC0 +E000 +E000 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +FFC0 +FFC0 +E000 +E000 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 19 3 2 +BITMAP +C0 +C0 +30 +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 19 3 2 +BITMAP +0E +0E +30 +30 +30 +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 19 3 2 +BITMAP +30 +30 +CE +CE +CE +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 7 17 3 2 +BITMAP +CE +CE +CE +00 +00 +F0 +F0 +30 +30 +30 +30 +30 +30 +30 +FE +FE +FE +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 2 +BITMAP +19C0 +19C0 +0600 +0600 +19C0 +19C0 +19C0 +0030 +0030 +1FF0 +1FF0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1E30 +1E30 +E7C0 +E7C0 +E7C0 +0000 +0000 +E7C0 +E7C0 +F830 +F830 +F830 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1E30 +1E30 +E7C0 +E7C0 +E7C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +1FC0 +1FC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 11 0 5 +BITMAP +0600 +0600 +0000 +0000 +FFF0 +FFF0 +FFF0 +0000 +0000 +0600 +0600 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 12 0 2 +BITMAP +1FF0 +1FF0 +E1F0 +E1F0 +E1F0 +E630 +E630 +F830 +F830 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +1800 +1800 +0600 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 19 0 2 +BITMAP +0600 +0600 +19C0 +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 17 0 2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 23 0 -2 +BITMAP +01C0 +01C0 +0600 +0600 +0600 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +19C0 +19C0 +0600 +0600 +0600 +1800 +1800 +E000 +E000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 -2 +BITMAP +E000 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 1008 0 +DWIDTH 14 0 +BBX 12 21 0 -2 +BITMAP +19C0 +19C0 +19C0 +0000 +0000 +E030 +E030 +E030 +E030 +E030 +E030 +E030 +19C0 +19C0 +0600 +0600 +0600 +1800 +1800 +E000 +E000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-16x32.bdf b/buildroot/share/fonts/marlin-16x32.bdf new file mode 100644 index 000000000000..0cbcbb6879bb --- /dev/null +++ b/buildroot/share/fonts/marlin-16x32.bdf @@ -0,0 +1,5492 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 32 100 100 +FONTBOUNDINGBOX 18 31 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 30 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +FFE0 +FFE0 +FFE0 +FC1C +FC1C +FC1C +E01C +E01C +E01C +E01C +E01C +E0FC +E0FC +E0FC +1FFC +1FFC +00E0 +00E0 +00E0 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +FC00 +FC00 +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 15 0 5 +BITMAP +0200 +0300 +0380 +03C0 +03E0 +03F0 +FFF8 +FFFC +FFF8 +03F0 +03E0 +03C0 +0380 +0300 +0200 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 22 0 3 +BITMAP +0300 +0780 +0FC0 +1FE0 +3FF0 +7FF8 +FFFC +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +FF00 +FF00 +FF00 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 0 +BITMAP +0300 +0300 +1FE0 +1FE0 +1FE0 +E31C +E31C +E31C +E31C +E31C +E3FC +E3FC +E3FC +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1296 0 +DWIDTH 18 0 +BBX 16 13 0 6 +BITMAP +F9E0 +F9F0 +7CF8 +3E7C +1F3E +0F9F +078F +0F9F +1F3E +3E7C +7EF8 +FDF0 +F9E0 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 0 +BITMAP +FFFC +FFFC +E31C +E31C +E31C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E31C +E31C +E31C +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 26 0 -2 +BITMAP +0780 +0FC0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +3CF0 +7CF8 +F03C +E01C +E01C +E31C +E31C +E31C +E31C +E31C +E01C +E01C +F03C +7FF8 +3FF0 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 7 7 1 12 +BITMAP +38 +7C +EE +C6 +EE +7C +38 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 2 19 6 3 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 8 3 16 +BITMAP +E7 +E7 +E7 +E7 +E7 +E7 +E7 +E7 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 16 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +FFFC +FFFC +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +1CE0 +FFFC +FFFC +1CE0 +1CE0 +1CE0 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 25 0 0 +BITMAP +0300 +0300 +0300 +1FE0 +3FF0 +7FF8 +F33C +E31C +E31C +E300 +F300 +7FE0 +3FF0 +1FF8 +033C +031C +031C +E31C +F33C +7FF8 +3FF0 +1FE0 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +F81C +F81C +F81C +F81C +F83C +0078 +00F0 +01E0 +03C0 +0780 +0F00 +1E00 +3C00 +7800 +F07C +E07C +E07C +E07C +E07C +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1C00 +3E00 +7E00 +F700 +E300 +E300 +E300 +F700 +7E00 +3E00 +3E00 +771C +E3BC +E1FC +E0F0 +F1F0 +7FFC +3FBC +1F1C +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 2 8 6 16 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 7 24 4 0 +BITMAP +0E +1E +38 +30 +60 +60 +60 +60 +E0 +C0 +C0 +C0 +C0 +C0 +C0 +E0 +60 +60 +60 +30 +38 +18 +0E +0E +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 7 24 5 0 +BITMAP +E0 +F0 +38 +18 +0C +0C +0C +0C +0E +06 +06 +06 +06 +06 +06 +0E +0C +0C +0C +18 +38 +30 +E0 +E0 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +0300 +0300 +0300 +E31C +E31C +F33C +3FF0 +1FE0 +0300 +0300 +0300 +1FE0 +1FE0 +3FF0 +F33C +E31C +0300 +0300 +0300 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 6 +BITMAP +0300 +0300 +0300 +0300 +0300 +FFFC +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 8 3 0 +BITMAP +F8 +F8 +18 +18 +38 +F0 +E0 +C0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 3 0 11 +BITMAP +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 5 3 3 +BITMAP +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +001C +001C +0038 +0070 +00F0 +00E0 +01C0 +03C0 +0380 +0700 +0F00 +0E00 +1C00 +1C00 +3800 +7000 +F000 +E000 +C000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E0FC +E1FC +E3DC +E79C +EF1C +FE1C +FC1C +F81C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 19 3 3 +BITMAP +18 +38 +78 +F8 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +001C +003C +0078 +00F0 +01E0 +03C0 +0780 +0F00 +1E00 +3C00 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +001C +001C +003C +0078 +00F0 +01E0 +03F0 +03F8 +003C +001C +001C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +00E0 +01E0 +03E0 +07E0 +0FE0 +1EE0 +3CE0 +78E0 +F0E0 +E0E0 +E0E0 +FFFC +FFFC +FFFC +00E0 +00E0 +00E0 +00E0 +00E0 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +E000 +E000 +E000 +FFF0 +FFF8 +003C +001C +001C +001C +001C +001C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +03E0 +07E0 +0FE0 +1E00 +3C00 +7800 +F000 +E000 +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +001C +001C +003C +0078 +00F0 +01E0 +03C0 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +F01C +7FFC +3FFC +1FFC +001C +001C +003C +0078 +00F0 +1FE0 +1FC0 +1F80 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 13 3 3 +BITMAP +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 16 3 0 +BITMAP +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +F8 +F8 +F8 +18 +18 +F8 +F0 +E0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 14 3 5 +BITMAP +07 +0F +1F +3C +78 +F0 +E0 +E0 +F0 +78 +3C +1F +0F +07 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 9 0 8 +BITMAP +FFFC +FFFC +FFFC +0000 +0000 +0000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 14 3 5 +BITMAP +E0 +F0 +F8 +7C +3E +1F +0F +0F +1F +3E +7C +F8 +F0 +E0 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E03C +0078 +00F0 +01E0 +03C0 +0380 +0380 +0380 +0380 +0000 +0000 +0380 +0380 +0380 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E1FC +E3FC +E31C +E31C +E31C +E3FC +E3FC +E1F8 +E000 +F000 +7FE0 +3FE0 +1FE0 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFE0 +FFF0 +FFF8 +1C3C +1C1C +1C1C +1C1C +1C3C +1FF8 +1FF0 +1FF8 +1C3C +1C1C +1C1C +1C1C +1C3C +FFF8 +FFF0 +FFE0 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFE0 +FFF0 +FFF8 +1C3C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C1C +1C3C +FFF8 +FFF0 +FFE0 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E000 +E000 +E000 +E000 +E000 +E0FC +E0FC +E0FC +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 19 3 3 +BITMAP +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +07FC +07FC +07FC +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +E0E0 +F1E0 +7FC0 +3F80 +1F00 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E03C +E078 +E0F0 +E1E0 +E3C0 +E780 +EF00 +FE00 +FC00 +FE00 +EF00 +E780 +E3C0 +E1E0 +E0F0 +E078 +E03C +E01C +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +F03C +F87C +FCFC +FFFC +EFDC +E79C +E31C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +F01C +F81C +FC1C +FE1C +EF1C +E79C +E3DC +E1FC +E0FC +E07C +E03C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E03C +FFF8 +FFF0 +FFE0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E19C +E1DC +E1EC +F0F0 +7F78 +3FBC +1F9C +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E03C +FFF8 +FFF0 +FFE0 +E700 +E780 +E3C0 +E1E0 +E0F0 +E078 +E03C +E01C +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E000 +F000 +7FE0 +3FF0 +1FF8 +003C +001C +001C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F03C +7038 +3878 +3870 +1CE0 +1FE0 +0FC0 +0780 +0300 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E79C +E79C +E79C +E79C +F7BC +7FF8 +3FF0 +1CE0 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +E01C +F03C +7878 +3CF0 +1FE0 +0FC0 +07C0 +0FC0 +1FE0 +3FF0 +7CF8 +F87C +F03C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 15 19 0 3 +BITMAP +E00E +E00E +E00E +E00E +E00E +E00E +701C +3838 +1FF0 +0FE0 +07C0 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +FFFC +FFFC +FFFC +001C +003C +0078 +00F0 +01E0 +03C0 +0780 +0F00 +1E00 +3C00 +7800 +F000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 24 3 0 +BITMAP +FF +FF +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +FF +FF +FF +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +F000 +F000 +7800 +3C00 +1C00 +1E00 +0F00 +0780 +0380 +03C0 +01C0 +01E0 +00E0 +00F0 +0078 +003C +001C +001C +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 25 3 0 +BITMAP +FF +FF +FF +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +07 +FF +FF +FF +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 8 0 16 +BITMAP +0780 +0FC0 +1FE0 +3FF0 +7CF8 +F87C +F03C +E01C +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 3 0 -2 +BITMAP +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 8 3 16 +BITMAP +E0 +F0 +78 +3C +1E +0F +07 +03 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 14 0 3 +BITMAP +1FE0 +1FF0 +1FF8 +003C +001C +001C +1FFC +3FFC +7FFC +E01C +E01C +7FFC +3FFC +1FFC +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +E000 +E000 +E000 +E000 +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E01C +E01C +E01C +E03C +FFF8 +FFF0 +FFE0 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 14 0 3 +BITMAP +1FE0 +3FE0 +7FE0 +F000 +E000 +E000 +E000 +E000 +E000 +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +001C +001C +001C +001C +001C +1FFC +3FFC +7FFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F01C +7FFC +3FFC +1FFC +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 14 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E03C +FFF8 +FFF0 +FFE0 +E000 +F000 +7FE0 +3FE0 +1FE0 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +03E0 +07F0 +0FF8 +1E3C +1C1C +1C1C +1C00 +1C00 +FF80 +FF80 +FF80 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 -2 +BITMAP +1FE0 +3FF0 +7FF8 +F01C +E01C +E01C +E01C +E01C +E01C +E01C +F01C +7FFC +3FFC +1FFC +001C +001C +003C +1FF8 +1FF0 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +E000 +E000 +E000 +E000 +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 9 19 3 3 +BITMAP +1C00 +1C00 +1C00 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 11 24 3 -2 +BITMAP +00E0 +00E0 +00E0 +0000 +0000 +07E0 +07E0 +07E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +00E0 +E0E0 +E0E0 +F1E0 +7FC0 +3F80 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E000 +E000 +E000 +E000 +E000 +E01C +E03C +E078 +E0F0 +E1E0 +E3C0 +FF80 +FF80 +FFC0 +E1E0 +E0F0 +E078 +E03C +E01C +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 9 19 3 3 +BITMAP +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +FEF0 +FFF8 +E7BC +E31C +E31C +E31C +E31C +E31C +E31C +E31C +E31C +E31C +E31C +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E7F0 +EFF8 +FFFC +FC3C +F81C +F01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +1FE0 +3FF0 +7FF8 +F03C +E01C +E01C +E01C +E01C +E01C +F03C +7FF8 +3FF0 +1FE0 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 18 0 -2 +BITMAP +FFE0 +FFF0 +FFF8 +E03C +E01C +E01C +E01C +E01C +E01C +E03C +FFF8 +FFF0 +FFE0 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 18 0 -2 +BITMAP +1FFC +3FFC +7FFC +F01C +E01C +E01C +E01C +E01C +E01C +F01C +7FFC +3FFC +1FFC +001C +001C +001C +001C +001C +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E7F0 +EFF8 +FFFC +FC1C +F81C +F000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +1FFC +3FFC +7FFC +E000 +F000 +7FE0 +3FF0 +1FF8 +003C +001C +FFF8 +FFF0 +FFE0 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +0700 +0700 +0700 +0700 +0700 +FFFC +FFFC +FFFC +0700 +0700 +0700 +0700 +0700 +0700 +0700 +0780 +03FC +01FC +00FC +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E03C +E07C +E0FC +F1FC +7FDC +3F9C +1F1C +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +F03C +7878 +3CF0 +1FE0 +0FC0 +0780 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E01C +E01C +E01C +E01C +E01C +E31C +E31C +E31C +E31C +F7BC +7FF8 +3FF0 +1CE0 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E01C +F03C +7878 +3CF0 +1FE0 +0FC0 +0780 +0FC0 +1FE0 +3CF0 +7878 +F03C +E01C +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 13 18 0 -2 +BITMAP +E038 +E038 +E038 +E038 +E038 +E038 +E038 +F078 +78F0 +3DE0 +1FC0 +0F80 +0F00 +1E00 +3C00 +7800 +F000 +E000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +FFFC +FFFC +FFFC +00F0 +01E0 +03C0 +0780 +0F00 +1E00 +3C00 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 24 3 0 +BITMAP +07 +0F +1C +18 +18 +18 +18 +18 +38 +38 +E0 +E0 +E0 +38 +38 +18 +18 +18 +18 +18 +1C +0F +0F +07 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 3 24 6 0 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 24 3 0 +BITMAP +E0 +F0 +38 +18 +18 +18 +18 +18 +18 +1C +07 +07 +07 +1C +18 +18 +18 +18 +18 +18 +38 +F0 +E0 +E0 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 8 0 8 +BITMAP +3C1C +7E1C +F71C +E31C +E3BC +E1F0 +E0E0 +E0E0 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 792 0 +DWIDTH 11 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 2 19 6 3 +BITMAP +C0 +C0 +C0 +00 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 0 +BITMAP +0300 +0300 +0300 +1FE0 +1FE0 +E31C +E31C +E31C +E300 +E300 +E300 +E31C +E31C +1FE0 +1FE0 +1FE0 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +03E0 +03E0 +03E0 +1C1C +1C1C +1C1C +1C00 +1C00 +FF00 +FF00 +FF00 +1C00 +1C00 +1C00 +1C1C +1C1C +E3E0 +E3E0 +E3E0 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E31C +E31C +1CE0 +1CE0 +1CE0 +E01C +E01C +E01C +1CE0 +1CE0 +E31C +E31C +E31C +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +E01C +E01C +E01C +1CE0 +1CE0 +1CE0 +FFFC +FFFC +0300 +0300 +0300 +FFFC +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 2 19 6 3 +BITMAP +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +00 +00 +00 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +C0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 11 21 3 3 +BITMAP +1FE0 +1FE0 +E000 +E000 +E000 +1F00 +1F00 +1F00 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +1F00 +1F00 +1F00 +00E0 +00E0 +FF00 +FF00 +FF00 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 2 3 22 +BITMAP +E7 +E7 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 16 19 0 3 +BITMAP +1FFC +1FFC +1FFC +E003 +E003 +E003 +E3E3 +E3E3 +E303 +E303 +E303 +E3E3 +E3E3 +E3E3 +E003 +E003 +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 13 3 14 +BITMAP +1F +1F +1F +E7 +E7 +1F +1F +1F +00 +00 +00 +FF +FF +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +031C +031C +1CE0 +1CE0 +1CE0 +E300 +E300 +E300 +1CE0 +1CE0 +031C +031C +031C +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 8 0 6 +BITMAP +FFFC +FFFC +FFFC +001C +001C +001C +001C +001C +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 3 3 11 +BITMAP +FF +FF +FF +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 16 19 0 3 +BITMAP +1FFC +1FFC +1FFC +E003 +E003 +E003 +E3E3 +E3E3 +E303 +E303 +E303 +E303 +E303 +E303 +E003 +E003 +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 2 0 22 +BITMAP +FFFC +FFFC +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 11 11 3 16 +BITMAP +1F00 +1F00 +1F00 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +1F00 +1F00 +1F00 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +0300 +0300 +0300 +0300 +0300 +0300 +FFFC +FFFC +0300 +0300 +0300 +0300 +0300 +0300 +0000 +0000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 13 3 14 +BITMAP +18 +18 +18 +E7 +E7 +07 +07 +07 +18 +18 +18 +FF +FF +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 13 3 14 +BITMAP +F8 +F8 +F8 +07 +07 +18 +18 +18 +07 +07 +07 +F8 +F8 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 8 3 16 +BITMAP +07 +07 +18 +18 +18 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 18 0 -2 +BITMAP +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E0FC +E0FC +FF1C +FF1C +FF1C +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1FFC +1FFC +FF1C +FF1C +FF1C +FF1C +FF1C +FF1C +FF1C +FF1C +1F1C +1F1C +1F1C +031C +031C +031C +031C +031C +031C +031C +031C +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 5 5 6 11 +BITMAP +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 5 3 -2 +BITMAP +07 +07 +07 +F8 +F8 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 13 3 14 +BITMAP +18 +18 +18 +F8 +F8 +18 +18 +18 +18 +18 +18 +FF +FF +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 14 3 16 +BITMAP +18 +18 +18 +E7 +E7 +E7 +18 +18 +00 +00 +00 +FF +FF +FF +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +E300 +E300 +1CE0 +1CE0 +1CE0 +031C +031C +031C +1CE0 +1CE0 +E300 +E300 +E300 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +FC00 +FC00 +FC00 +1C1C +1C1C +1CE0 +1CE0 +1CE0 +1F00 +1F00 +1F00 +1CE0 +1CE0 +E3E0 +E3E0 +E3E0 +1CE0 +1CE0 +1CE0 +1FFC +1FFC +00E0 +00E0 +00E0 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +FC00 +FC00 +FC00 +1C1C +1C1C +1CE0 +1CE0 +1CE0 +1F00 +1F00 +1F00 +1CE0 +1CE0 +E31C +E31C +E31C +001C +001C +001C +00E0 +00E0 +03FC +03FC +03FC +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +FC00 +FC00 +FC00 +0300 +0300 +0300 +1C1C +1C1C +03E0 +03E0 +03E0 +FF00 +FF00 +FF00 +1CE0 +1CE0 +E3E0 +E3E0 +E3E0 +1CE0 +1CE0 +1CE0 +1FFC +1FFC +00E0 +00E0 +00E0 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +0300 +0300 +0300 +0000 +0000 +0000 +0300 +0300 +0300 +0300 +0300 +1C00 +1C00 +1C00 +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1F1C +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0300 +0300 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +FFFC +FFFC +FFFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FFC +1FFC +1FFC +E300 +E300 +E300 +E300 +E300 +FFE0 +FFE0 +FFE0 +E300 +E300 +E300 +E300 +E300 +E3FC +E3FC +E3FC +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 -2 +BITMAP +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E01C +E01C +1FE0 +1FE0 +1FE0 +00E0 +00E0 +00E0 +1F00 +1F00 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +FFFC +FFFC +FFFC +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 27 3 3 +BITMAP +E0 +E0 +E0 +18 +18 +18 +00 +00 +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 27 3 3 +BITMAP +07 +07 +07 +18 +18 +18 +00 +00 +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 27 3 3 +BITMAP +18 +18 +18 +E7 +E7 +E7 +00 +00 +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 24 3 3 +BITMAP +E7 +E7 +E7 +00 +00 +FF +FF +FF +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +1FE0 +1FE0 +1C1C +1C1C +1C1C +1C1C +1C1C +FF1C +FF1C +FF1C +1C1C +1C1C +1C1C +1C1C +1C1C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1F1C +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +FC1C +FC1C +E31C +E31C +E31C +E0FC +E0FC +E0FC +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1F1C +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 6 +BITMAP +E01C +E01C +E01C +1CE0 +1CE0 +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +E01C +E01C +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 0 +BITMAP +001C +001C +1FE0 +1FE0 +1FE0 +E0FC +E0FC +E0FC +E31C +E31C +E31C +E31C +E31C +E31C +E31C +E31C +FC1C +FC1C +1FE0 +1FE0 +1FE0 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +1C00 +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +0300 +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 27 0 3 +BITMAP +00E0 +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +1CE0 +1CE0 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +0300 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 11 19 3 3 +BITMAP +E000 +E000 +E000 +FF00 +FF00 +FF00 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +E0E0 +FF00 +FF00 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1FE0 +1FE0 +1FE0 +E01C +E01C +E01C +E0E0 +E0E0 +E300 +E300 +E300 +E0E0 +E0E0 +E0E0 +E01C +E01C +E3E0 +E3E0 +E3E0 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0300 +0300 +0300 +1FE0 +1FE0 +001C +001C +001C +1FFC +1FFC +1FFC +E01C +E01C +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +1FE0 +1FE0 +031C +031C +031C +1FE0 +1FE0 +1FE0 +E300 +E300 +1FFC +1FFC +1FFC +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 18 0 -2 +BITMAP +1FE0 +1FE0 +E01C +E01C +E01C +E000 +E000 +E000 +E01C +E01C +1FE0 +1FE0 +1FE0 +00E0 +00E0 +00E0 +1F00 +1F00 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 21 3 3 +BITMAP +E0 +E0 +18 +18 +18 +00 +00 +00 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 21 3 3 +BITMAP +07 +07 +18 +18 +18 +00 +00 +00 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 21 3 3 +BITMAP +18 +18 +E7 +E7 +E7 +00 +00 +00 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 8 19 3 3 +BITMAP +E7 +E7 +E7 +00 +00 +00 +F8 +F8 +18 +18 +18 +18 +18 +18 +18 +18 +FF +FF +FF +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0300 +0300 +1CE0 +1CE0 +1CE0 +001C +001C +001C +1FFC +1FFC +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +0000 +E3E0 +E3E0 +FC1C +FC1C +FC1C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1F1C +1F1C +E3E0 +E3E0 +E3E0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +1FE0 +1FE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 6 +BITMAP +0300 +0300 +0300 +0000 +0000 +FFFC +FFFC +FFFC +0000 +0000 +0000 +0300 +0300 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 13 0 3 +BITMAP +1FFC +1FFC +E0FC +E0FC +E0FC +E31C +E31C +E31C +FC1C +FC1C +FFE0 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +1C00 +1C00 +0300 +0300 +0300 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 21 0 3 +BITMAP +0300 +0300 +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 19 0 3 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1FE0 +1FE0 +1FE0 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 26 0 -2 +BITMAP +00E0 +00E0 +0300 +0300 +0300 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1CE0 +1CE0 +0300 +0300 +0300 +1C00 +1C00 +1C00 +E000 +E000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 -2 +BITMAP +E000 +E000 +E000 +E000 +E000 +E000 +FFE0 +FFE0 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +FFE0 +FFE0 +FFE0 +E000 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 1152 0 +DWIDTH 16 0 +BBX 14 24 0 -2 +BITMAP +1CE0 +1CE0 +1CE0 +0000 +0000 +0000 +E01C +E01C +E01C +E01C +E01C +E01C +E01C +E01C +1CE0 +1CE0 +0300 +0300 +0300 +1C00 +1C00 +1C00 +E000 +E000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-20x40.bdf b/buildroot/share/fonts/marlin-20x40.bdf new file mode 100644 index 000000000000..e44e0b7f7023 --- /dev/null +++ b/buildroot/share/fonts/marlin-20x40.bdf @@ -0,0 +1,6458 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 40 100 100 +FONTBOUNDINGBOX 22 39 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. orig" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 38 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +FE0380 +FE0380 +FE0380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F03F80 +F03F80 +F03F80 +0FFF80 +0FFF80 +0FFF80 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +FE0000 +FE0000 +FE0000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 16 0 8 +BITMAP +01C000 +01E000 +01F000 +01F800 +01FC00 +01FE00 +FFFF00 +FFFF80 +FFFF80 +FFFF00 +01FE00 +01FC00 +01F800 +01F000 +01E000 +01C000 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 28 0 4 +BITMAP +008000 +01C000 +03E000 +07F000 +0FF800 +1FFC00 +3FFE00 +7FFF00 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +FFC000 +FFC000 +FFC000 +FFC000 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 1 +BITMAP +01C000 +01C000 +01C000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1FF80 +F1FF80 +F1FF80 +F1FF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1584 0 +DWIDTH 22 0 +BBX 19 16 1 8 +BITMAP +F8F800 +FCFC00 +FEFE00 +7F7F00 +3FBF80 +1FDFC0 +0FEFE0 +07EFE0 +07EFE0 +07EFE0 +0FDFC0 +1FBF80 +3F7F00 +FEFE00 +FCFC00 +F8F800 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 1 +BITMAP +FFFF80 +FFFF80 +FFFF80 +F1C380 +F1C380 +F1C380 +F1C380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F1C380 +F1C380 +F1C380 +F1C380 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 33 0 -2 +BITMAP +01C000 +03E000 +07F000 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +1E3C00 +3E3E00 +7C1F00 +F80F80 +F00780 +F00780 +F08780 +F1C780 +F1C780 +F1C780 +F1C780 +F1C780 +F08780 +F00780 +F00780 +F80F80 +7FFF80 +3FFF00 +1FFE00 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 9 1 15 +BITMAP +1C00 +3E00 +7F00 +E380 +E380 +E380 +7F00 +3E00 +1C00 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 24 7 4 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +00 +00 +00 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 10 4 21 +BITMAP +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +E380 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 20 0 4 +BITMAP +0E3800 +0E3800 +0E3800 +FFFF80 +FFFF80 +FFFF80 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +0E3800 +FFFF80 +FFFF80 +FFFF80 +0E3800 +0E3800 +0E3800 +0E3800 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 16 30 1 1 +BITMAP +0380 +0380 +0380 +0380 +1FFC +3FFE +7FFF +E38F +E387 +E387 +E380 +E380 +E380 +F380 +7FFC +3FFE +1FFF +038F +0387 +0387 +E387 +E387 +E387 +F38F +7FFE +3FFC +1FF8 +0380 +0380 +0380 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FE0380 +FE0380 +FE0380 +FE0380 +FE0780 +FE0F80 +FE1F80 +003F00 +007E00 +00FC00 +01F800 +01F000 +03E000 +07C000 +0F8000 +1F0000 +3E0000 +FC3F80 +F83F80 +F03F80 +F03F80 +F03F80 +F03F80 +F03F80 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 16 24 1 4 +BITMAP +1C00 +1C00 +3E00 +7F00 +F780 +E380 +E380 +E380 +E380 +F780 +7F00 +3E00 +3C00 +7E00 +F787 +E38F +E3DF +E1FC +E0FC +F1FE +7FFF +3FCF +1F87 +1F87 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 10 7 21 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 30 4 1 +BITMAP +0380 +0780 +0F00 +1E00 +1C00 +3800 +3800 +3800 +7000 +7000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +7000 +7000 +3800 +3800 +3C00 +1C00 +1E00 +0F00 +0780 +0380 +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 30 7 1 +BITMAP +E000 +F000 +7800 +3C00 +1C00 +0E00 +0E00 +0E00 +0700 +0700 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0380 +0700 +0700 +0E00 +0E00 +1E00 +1C00 +3C00 +7800 +F000 +E000 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +01E000 +01E000 +01E000 +E1E1C0 +F1E3C0 +F9E7C0 +7DEF80 +3FFF00 +1FFE00 +0FFC00 +01E000 +01E000 +01E000 +01E000 +0FFC00 +1FFE00 +3FFF00 +7DEF80 +F9E7C0 +F1E3C0 +C1E1C0 +01E000 +01E000 +01E000 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 7 +BITMAP +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 6 10 4 1 +BITMAP +F8 +FC +FC +1C +1C +1C +3C +F8 +F0 +E0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 4 0 14 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 6 7 4 4 +BITMAP +FC +FC +FC +FC +FC +FC +FC +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +000180 +000380 +000780 +000F80 +000F00 +001E00 +003C00 +003C00 +007800 +00F800 +00F000 +01E000 +03C000 +07C000 +078000 +0F0000 +0F0000 +1E0000 +3C0000 +780000 +F00000 +F00000 +E00000 +C00000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F00FC0 +F01FC0 +F03FC0 +F07FC0 +F0FFC0 +F1FBC0 +F3F3C0 +F7E3C0 +FFC3C0 +FF83C0 +FF03C0 +FE03C0 +FC03C0 +F803C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 24 4 4 +BITMAP +1E00 +1E00 +3E00 +7E00 +FE00 +FE00 +FE00 +FE00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +0003C0 +0007C0 +000FC0 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +FFFFC0 +FFFFC0 +FFFFC0 +FFFFC0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000380 +000780 +000F00 +001E00 +003C00 +007800 +00F000 +01FC00 +01FE00 +00FF00 +000F80 +000780 +000380 +E00380 +F00380 +F80780 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +003C00 +007C00 +00FC00 +01FC00 +03FC00 +07FC00 +0FBC00 +1F3C00 +3E3C00 +7C3C00 +F83C00 +F03C00 +F03C00 +F03C00 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +FFFC00 +FFFE00 +FFFF00 +FFFF80 +0007C0 +0003C0 +0003C0 +0003C0 +0003C0 +0003C0 +E003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +00FC00 +01FC00 +03FC00 +07FC00 +0FC000 +1F8000 +3F0000 +7E0000 +FC0000 +F80000 +FFFC00 +FFFE00 +FFFF00 +FFFF80 +F007C0 +F003C0 +F003C0 +F003C0 +F003C0 +F80780 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000780 +000780 +000780 +000F80 +001F00 +003E00 +007C00 +00F800 +01F000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +01E000 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F007C0 +7FFF80 +3FFF00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F803C0 +7FFFC0 +3FFFC0 +1FFFC0 +0FFFC0 +0003C0 +0007C0 +000F80 +001F00 +003E00 +007C00 +0FF800 +0FF000 +0FE000 +0FC000 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 6 17 4 4 +BITMAP +FC +FC +FC +FC +FC +FC +FC +00 +00 +00 +FC +FC +FC +FC +FC +FC +FC +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 6 20 4 1 +BITMAP +FC +FC +FC +FC +FC +FC +FC +00 +00 +00 +F8 +FC +FC +1C +1C +1C +3C +F8 +F0 +E0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 16 4 8 +BITMAP +0380 +0780 +0F80 +1F00 +3E00 +7C00 +F800 +F000 +F000 +F800 +7C00 +3E00 +1F00 +0F80 +0780 +0380 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 10 0 11 +BITMAP +FFFF80 +FFFF80 +FFFF80 +000000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 16 4 8 +BITMAP +E000 +F000 +F800 +7C00 +3E00 +1F00 +0F80 +0780 +0780 +0F80 +1F00 +7E00 +7C00 +F800 +F000 +E000 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F80F80 +F00780 +E00780 +000F80 +001F00 +003E00 +007C00 +00F800 +01F000 +01E000 +01E000 +01E000 +01E000 +000000 +000000 +000000 +01E000 +01E000 +01E000 +01E000 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F0FFC0 +F1FFC0 +F1FFC0 +F1E3C0 +F1C3C0 +F1C3C0 +F1E7C0 +F1FFC0 +F1FFC0 +F0FF80 +F00000 +F00000 +F80000 +7FFC00 +3FFC00 +1FFC00 +0FFC00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +FFFFC0 +FFFFC0 +FFFFC0 +FFFFC0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFC00 +FFFE00 +FFFF00 +FFFF80 +1E07C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E07C0 +1FFF80 +1FFF00 +1FFF00 +1FFF80 +1E07C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E07C0 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F003C0 +F003C0 +F807C0 +FFFF80 +7FFF00 +3FFE00 +1FFC00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFC00 +FFFE00 +FFFF00 +FFFF80 +1E07C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E03C0 +1E07C0 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F03FC0 +F03FC0 +F03FC0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 11 24 3 4 +BITMAP +FFE0 +FFE0 +FFE0 +FFE0 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +0E00 +FFE0 +FFE0 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01FF80 +01FF80 +01FF80 +01FF80 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +F03C00 +F03C00 +F87C00 +7FF800 +3FF000 +1FE000 +0FC000 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00380 +F00780 +F00F80 +F01F00 +F03E00 +F07C00 +F0F800 +F1F000 +F3E000 +F7C000 +FF8000 +FF0000 +FF0000 +FF8000 +F7C000 +F3E000 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F00780 +F00380 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +F007C0 +F007C0 +F80FC0 +FC1FC0 +FE3FC0 +FF7FC0 +FFFFC0 +F7F3C0 +F3E3C0 +F1C3C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F803C0 +FC03C0 +FE03C0 +FF03C0 +FF83C0 +F7C3C0 +F3E3C0 +F1F3C0 +F0FBC0 +F07FC0 +F03FC0 +F01FC0 +F00FC0 +F007C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFC00 +FFFE00 +FFFF00 +FFFF80 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F007C0 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F1C3C0 +F1E3C0 +F1F3C0 +F0F9C0 +F07DC0 +F83EC0 +7FDF40 +3FEF80 +1FF7C0 +0FF3C0 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +FFFC00 +FFFE00 +FFFF00 +FFFF80 +F007C0 +F003C0 +F003C0 +F003C0 +F003C0 +F007C0 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +F7C000 +F3E000 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F00780 +F00380 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F003C0 +F003C0 +F001C0 +F00000 +F00000 +F80000 +7FFC00 +3FFE00 +1FFF00 +0FFF80 +0007C0 +0003C0 +0003C0 +E003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +780F00 +3C1E00 +3C1E00 +1E3C00 +0E3800 +0F7800 +07F000 +03E000 +03E000 +01C000 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F1C780 +F1C780 +F1C780 +F1C780 +F1C780 +FBEF80 +7FFF00 +3FFE00 +1F7C00 +0E3800 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +03E000 +07F000 +0FF800 +1F7C00 +3E3E00 +7C1F00 +F80F80 +F00780 +F00780 +F00780 +F00780 +F00780 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +03E000 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000780 +000F80 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +7E0000 +FC0000 +F80000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 30 4 1 +BITMAP +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +E00000 +F00000 +F80000 +F80000 +7C0000 +3E0000 +3E0000 +1F0000 +0F0000 +0F8000 +07C000 +03C000 +01E000 +01F000 +00F800 +007800 +003C00 +003E00 +001F00 +001F00 +000F80 +000F80 +000780 +000380 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 30 4 1 +BITMAP +FFC0 +FFC0 +FFC0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +03C0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 10 0 21 +BITMAP +01C000 +03E000 +07F000 +0FF800 +1FFC00 +3F7E00 +7E3F00 +FC1F80 +F80F80 +F00780 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 3 0 -2 +BITMAP +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 10 4 21 +BITMAP +E000 +F000 +F800 +7C00 +3E00 +1F00 +0F80 +07C0 +03C0 +01C0 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 16 17 1 4 +BITMAP +1FF8 +1FFC +1FFE +000F +0007 +0007 +0FFF +1FFF +3FFF +7FFF +F007 +E007 +F007 +FFFF +7FFF +3FFF +1FFF +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFE00 +FFFF00 +F00780 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00780 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +1FFC00 +3FFC00 +7FFC00 +F80000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00380 +F00380 +F80780 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +000380 +000380 +000380 +000380 +000380 +000380 +000380 +1FFF80 +3FFF80 +7FFF80 +F80380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F80380 +7FFF80 +3FFF80 +1FFF80 +0FFF80 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +1FFC00 +3FFE00 +7FFF00 +F80780 +F00380 +F00380 +F00780 +FFFF00 +FFFE00 +FFFC00 +F00000 +F00000 +F80000 +7FFC00 +3FFC00 +1FFC00 +0FFC00 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 24 0 4 +BITMAP +01FC00 +03FE00 +07FF00 +0FFF80 +0F07C0 +0F03C0 +0F03C0 +0F0000 +0F0000 +0F0000 +FFF000 +FFF000 +FFF000 +FFF000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +1FFE00 +3FFF00 +7FFF80 +F80780 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F80380 +7FFF80 +3FFF80 +1FFF80 +0FFF80 +000380 +000380 +000780 +0FFF80 +0FFF00 +0FFE00 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFE00 +FFFF00 +FFFF80 +F00780 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 24 4 4 +BITMAP +1E00 +1E00 +1E00 +1E00 +0000 +0000 +0000 +FE00 +FE00 +FE00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +1E00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 13 30 4 -2 +BITMAP +0038 +0038 +0038 +0038 +0000 +0000 +0000 +03F8 +03F8 +03F8 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +0038 +E038 +E038 +F078 +FFF8 +7FF0 +3FE0 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00780 +F00F80 +F01F80 +F03F00 +F07E00 +F0FC00 +F1F800 +FFF000 +FFE000 +FFE000 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F00780 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 24 4 4 +BITMAP +FC00 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +FE3C00 +FF7E00 +FFFF00 +F3E780 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F1FC00 +F3FE00 +F7FF00 +FF8780 +FF0380 +FE0380 +FC0380 +F80380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 18 0 4 +BITMAP +0FFC00 +1FFE00 +3FFF00 +7FFF80 +F807C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F003C0 +F807C0 +7FFF80 +3FFF00 +1FFE00 +0FFC00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +FFFE00 +FFFF00 +FFFF80 +F00780 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00780 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +1FFF80 +3FFF80 +7FFF80 +F80380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F80380 +7FFF80 +3FFF80 +1FFF80 +0FFF80 +000380 +000380 +000380 +000380 +000380 +000380 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F1FC00 +F3FE00 +F7FF00 +FFC780 +FF8380 +FF0380 +FE0380 +FC0000 +F80000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +1FFF80 +3FFF80 +7FFF80 +F80000 +F00000 +F00000 +F80000 +7FFE00 +3FFF00 +1FFF80 +000780 +000380 +000780 +FFFF80 +FFFF00 +FFFE00 +FFFC00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01E000 +01FF80 +00FF80 +007F80 +003F80 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00780 +F00F80 +F01F80 +F03F80 +F87F80 +7FFB80 +3FF380 +1FE380 +0FC380 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +01C000 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F1C780 +F1C780 +F1C780 +F1C780 +F1C780 +FBEF80 +7FFF00 +3F7E00 +1F7C00 +0E3800 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +E00380 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +07F000 +0FF800 +1F7C00 +3E3E00 +7C1F00 +F80F80 +F00780 +E00380 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F00780 +F80F80 +7C1F00 +3E3E00 +1F7C00 +0FF800 +07F000 +03E000 +07C000 +0F8000 +1F0000 +3E0000 +FC0000 +F80000 +F00000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +FFFF80 +FFFF80 +FFFF80 +001F00 +003E00 +007C00 +00F800 +01F000 +03E000 +07C000 +0F8000 +1F0000 +3E0000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 30 4 1 +BITMAP +03C0 +07C0 +0FC0 +1E00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +3C00 +7800 +E000 +E000 +E000 +E000 +7800 +3C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1E00 +0FC0 +07C0 +03C0 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 30 7 1 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 9 30 4 1 +BITMAP +E000 +F000 +F800 +3C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1E00 +0F00 +0380 +0380 +0380 +0380 +0F00 +1E00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +3C00 +F800 +F000 +E000 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 18 10 0 11 +BITMAP +0E03C0 +1F03C0 +3F83C0 +7BC3C0 +F1C3C0 +F1C3C0 +F1E7C0 +F0FF80 +F07F00 +F03E00 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 1080 0 +DWIDTH 15 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 24 7 4 +BITMAP +E0 +E0 +E0 +E0 +00 +00 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 1 +BITMAP +01C000 +01C000 +01C000 +0FFC00 +0FFC00 +0FFC00 +F1C380 +F1C380 +F1C380 +F1C380 +F1C000 +F1C000 +F1C000 +F1C380 +F1C380 +F1C380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01FC00 +01FC00 +01FC00 +01FC00 +0E0380 +0E0380 +0E0380 +0E0000 +0E0000 +0E0000 +FFC000 +FFC000 +FFC000 +FFC000 +0E0000 +0E0000 +0E0000 +0E0380 +0E0380 +0E0380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F1C380 +F1C380 +F1C380 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +F1C380 +F1C380 +F1C380 +F1C380 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +F00380 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 3 24 7 4 +BITMAP +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +00 +00 +00 +00 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +E0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 13 27 4 4 +BITMAP +1FF8 +1FF8 +1FF8 +E000 +E000 +E000 +E000 +1FC0 +1FC0 +1FC0 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +1FC0 +1FC0 +1FC0 +0038 +0038 +0038 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 3 4 28 +BITMAP +E3C0 +E3C0 +E3C0 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 20 24 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +0FFF80 +F00070 +F00070 +F00070 +F1FC70 +F1FC70 +F1FC70 +F1C070 +F1C070 +F1C070 +F1C070 +F1FC70 +F1FC70 +F1FC70 +F00070 +F00070 +F00070 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 16 4 18 +BITMAP +1FC0 +1FC0 +1FC0 +E3C0 +E3C0 +E3C0 +1FC0 +1FC0 +1FC0 +1FC0 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +01C380 +01C380 +01C380 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +F1C000 +F1C000 +F1C000 +0E3C00 +0E3C00 +0E3C00 +01C380 +01C380 +01C380 +01C380 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 10 0 8 +BITMAP +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000380 +000380 +000380 +000380 +000380 +000380 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 4 4 14 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 20 24 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +0FFF80 +F00070 +F00070 +F00070 +F1FC70 +F1FC70 +F1FC70 +F1C070 +F1C070 +F1C070 +F1C070 +F1C070 +F1C070 +F1C070 +F00070 +F00070 +F00070 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 3 0 28 +BITMAP +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 13 13 4 21 +BITMAP +1FC0 +1FC0 +1FC0 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +1FC0 +1FC0 +1FC0 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +FFFF80 +FFFF80 +FFFF80 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 16 4 18 +BITMAP +1C00 +1C00 +1C00 +E3C0 +E3C0 +E3C0 +03C0 +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 16 4 18 +BITMAP +FC00 +FC00 +FC00 +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +1C00 +03C0 +03C0 +03C0 +FC00 +FC00 +FC00 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 10 4 21 +BITMAP +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +1C00 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F03F80 +F03F80 +F03F80 +FFC380 +FFC380 +FFC380 +FFC380 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +FFC380 +0FC380 +0FC380 +0FC380 +0FC380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +01C380 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 7 7 7 14 +BITMAP +FE +FE +FE +FE +FE +FE +FE +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 6 4 -2 +BITMAP +03C0 +03C0 +03C0 +FC00 +FC00 +FC00 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 16 4 18 +BITMAP +1C00 +1C00 +1C00 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 17 4 21 +BITMAP +1C00 +1C00 +1C00 +1C00 +E3C0 +E3C0 +E3C0 +1C00 +1C00 +1C00 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +F1C000 +F1C000 +F1C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +01C380 +01C380 +01C380 +0E3C00 +0E3C00 +0E3C00 +F1C000 +F1C000 +F1C000 +F1C000 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +FE0000 +FE0000 +FE0000 +0E0380 +0E0380 +0E0380 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +0FC000 +0FC000 +0FC000 +0E3C00 +0E3C00 +0E3C00 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +0E3C00 +0E3C00 +0E3C00 +0FFF80 +0FFF80 +0FFF80 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +FE0000 +FE0000 +FE0000 +0E0380 +0E0380 +0E0380 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +0FC000 +0FC000 +0FC000 +0E3C00 +0E3C00 +0E3C00 +F1C380 +F1C380 +F1C380 +F1C380 +000380 +000380 +000380 +003C00 +003C00 +003C00 +01FF80 +01FF80 +01FF80 +01FF80 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +FE0000 +FE0000 +FE0000 +FE0000 +01C000 +01C000 +01C000 +0E0380 +0E0380 +0E0380 +01FC00 +01FC00 +01FC00 +01FC00 +FFC000 +FFC000 +FFC000 +0E3C00 +0E3C00 +0E3C00 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +0E3C00 +0E3C00 +0E3C00 +0FFF80 +0FFF80 +0FFF80 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +0E0000 +0E0000 +0E0000 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +0FFF80 +F1C000 +F1C000 +F1C000 +F1C000 +F1C000 +F1C000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F1C000 +F1C000 +F1C000 +F1C000 +F1C000 +F1C000 +F1FF80 +F1FF80 +F1FF80 +F1FF80 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 -2 +BITMAP +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +003C00 +003C00 +003C00 +0FC000 +0FC000 +0FC000 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 34 4 4 +BITMAP +E000 +E000 +E000 +E000 +1C00 +1C00 +1C00 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 34 4 4 +BITMAP +03C0 +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 34 4 4 +BITMAP +1C00 +1C00 +1C00 +1C00 +E3C0 +E3C0 +E3C0 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 30 4 4 +BITMAP +E3C0 +E3C0 +E3C0 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0FFC00 +0FFC00 +0FFC00 +0FFC00 +0E0380 +0E0380 +0E0380 +0E0380 +0E0380 +0E0380 +FFC380 +FFC380 +FFC380 +FFC380 +0E0380 +0E0380 +0E0380 +0E0380 +0E0380 +0E0380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FE0380 +FE0380 +FE0380 +F1C380 +F1C380 +F1C380 +F1C380 +F03F80 +F03F80 +F03F80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 16 0 8 +BITMAP +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 1 +BITMAP +000380 +000380 +000380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F03F80 +F03F80 +F03F80 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +F1C380 +FE0380 +FE0380 +FE0380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +01C000 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 34 0 4 +BITMAP +003C00 +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 13 24 4 4 +BITMAP +E000 +E000 +E000 +E000 +FFC0 +FFC0 +FFC0 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +E038 +FFC0 +FFC0 +FFC0 +E000 +E000 +E000 +E000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0FFC00 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F03C00 +F03C00 +F03C00 +F1C000 +F1C000 +F1C000 +F1C000 +F03C00 +F03C00 +F03C00 +F00380 +F00380 +F00380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +0FFC00 +0FFC00 +0FFC00 +000380 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +0FFC00 +0FFC00 +0FFC00 +01C380 +01C380 +01C380 +01C380 +0FFC00 +0FFC00 +0FFC00 +F1C000 +F1C000 +F1C000 +0FFF80 +0FFF80 +0FFF80 +0FFF80 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 23 0 -2 +BITMAP +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00000 +F00000 +F00000 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +003C00 +003C00 +003C00 +0FC000 +0FC000 +0FC000 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 27 4 4 +BITMAP +E000 +E000 +E000 +1C00 +1C00 +1C00 +1C00 +0000 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 27 4 4 +BITMAP +03C0 +03C0 +03C0 +1C00 +1C00 +1C00 +1C00 +0000 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 27 4 4 +BITMAP +1C00 +1C00 +1C00 +E3C0 +E3C0 +E3C0 +E3C0 +0000 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 10 24 4 4 +BITMAP +E3C0 +E3C0 +E3C0 +E3C0 +0000 +0000 +0000 +FC00 +FC00 +FC00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +1C00 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000380 +000380 +000380 +0FFF80 +0FFF80 +0FFF80 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +F1FC00 +F1FC00 +F1FC00 +FE0380 +FE0380 +FE0380 +FE0380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0FC380 +0FC380 +0FC380 +F1FC00 +F1FC00 +F1FC00 +F1FC00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +0FFC00 +0FFC00 +0FFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 16 0 8 +BITMAP +01C000 +01C000 +01C000 +000000 +000000 +000000 +FFFF80 +FFFF80 +FFFF80 +FFFF80 +000000 +000000 +000000 +01C000 +01C000 +01C000 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 17 0 4 +BITMAP +0FFF80 +0FFF80 +0FFF80 +F03F80 +F03F80 +F03F80 +F03F80 +F1C380 +F1C380 +F1C380 +FE0380 +FE0380 +FE0380 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +0E0000 +0E0000 +0E0000 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 27 0 4 +BITMAP +01C000 +01C000 +01C000 +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 24 0 4 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0FFC00 +0FFC00 +0FFC00 +0FFC00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 33 0 -2 +BITMAP +003C00 +003C00 +003C00 +01C000 +01C000 +01C000 +01C000 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +01C000 +0E0000 +0E0000 +0E0000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 -2 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFC00 +FFFC00 +FFFC00 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 1440 0 +DWIDTH 20 0 +BBX 17 30 0 -2 +BITMAP +0E3C00 +0E3C00 +0E3C00 +0E3C00 +000000 +000000 +000000 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +F00380 +0E3C00 +0E3C00 +0E3C00 +01C000 +01C000 +01C000 +01C000 +0E0000 +0E0000 +0E0000 +F00000 +F00000 +F00000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-24x48.bdf b/buildroot/share/fonts/marlin-24x48.bdf new file mode 100644 index 000000000000..dba6e07e7f18 --- /dev/null +++ b/buildroot/share/fonts/marlin-24x48.bdf @@ -0,0 +1,6462 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 40 100 100 +FONTBOUNDINGBOX 26 39 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 38 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +FF00F0 +FF00F0 +FF00F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F00FF0 +F00FF0 +F00FF0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +000F00 +000F00 +000F00 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +FF0000 +FF0000 +FF0000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 19 18 0 7 +BITMAP +00E000 +00F000 +00F800 +00FC00 +00FE00 +00FF00 +00FF80 +FFFFC0 +FFFFE0 +FFFFE0 +FFFFC0 +00FF80 +00FF00 +00FE00 +00FC00 +00F800 +00F000 +00E000 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 19 29 0 4 +BITMAP +004000 +00E000 +01F000 +03F800 +07FC00 +0FFE00 +1FFF00 +3FFF80 +7FFFC0 +FFFFE0 +FFFFE0 +FFFFE0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +FFF000 +FFF000 +FFF000 +FFF000 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 1 +BITMAP +00F000 +00F000 +00F000 +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +FCF3F0 +F8F1F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0FFF0 +F0FFF0 +F0FFF0 +F0FFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +FC03F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 1872 0 +DWIDTH 26 0 +BBX 24 16 0 8 +BITMAP +FE3F80 +7F1FC0 +3F8FE0 +1FC7F0 +0FE3F8 +07F1FC +03F8FE +01FC7F +01FC7F +03F8FE +07F1FC +0FE3F8 +1FC7F0 +3F8FE0 +7F1FC0 +FE3F80 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 1 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 33 0 -2 +BITMAP +01F800 +03FC00 +07FE00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +1F0F80 +3F0FC0 +7F0FE0 +F801F0 +F000F0 +F000F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 10 9 1 15 +BITMAP +1E00 +3F00 +7F80 +F3C0 +E1C0 +F3C0 +7F80 +3F00 +1E00 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 24 8 4 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +00 +00 +00 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 10 4 21 +BITMAP +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +F0F0 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 20 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +FFFFF0 +FFFFF0 +FFFFF0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +FFFFF0 +FFFFF0 +FFFFF0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 1 +BITMAP +00F000 +00F000 +00F000 +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F8F1F0 +F0F0F0 +F0F0F0 +F0F000 +F0F000 +F8F000 +7FFF00 +3FFF80 +1FFFC0 +0FFFE0 +00F1F0 +00F0F0 +00F0F0 +F0F0F0 +F0F0F0 +F8F1F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FF00F0 +FF00F0 +FF00F0 +FF01F0 +FF03F0 +FF07E0 +FF0FC0 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +7E0FF0 +FC0FF0 +F80FF0 +F00FF0 +F00FF0 +F00FF0 +F00FF0 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0000 +1F8000 +3FC000 +7FE000 +F9F000 +F0F000 +F0F000 +F0F000 +F0F000 +F9F000 +7FE000 +3FC000 +3FC000 +7FE000 +F9F0F0 +F0F9F0 +F07FF0 +F03F80 +F01F00 +F83F80 +7FFFF0 +3FFFF0 +1FF9F0 +0FF0F0 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 10 8 21 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +01F0 +03F0 +07F0 +0F80 +1F00 +1E00 +3E00 +3C00 +7C00 +7800 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +7800 +7C00 +3C00 +3E00 +1E00 +1F00 +0F80 +07F0 +03F0 +01F0 +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +F800 +FC00 +FE00 +1F00 +0F80 +0780 +03C0 +03C0 +01E0 +01E0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +01E0 +01E0 +03C0 +03C0 +0780 +0F80 +1F00 +FE00 +FC00 +F000 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +F0F0F0 +F8F1F0 +7CF3E0 +3EF7C0 +1FFF80 +0FFF00 +07FE00 +03FC00 +03FC00 +07FE00 +0FFF00 +1FFF80 +3EF7C0 +7CF3E0 +F8F1F0 +F0F0F0 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 16 0 8 +BITMAP +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 10 4 1 +BITMAP +FF +FF +FF +0F +0F +0F +1E +FC +F8 +F0 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 4 0 14 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 7 4 4 +BITMAP +FF +FF +FF +FF +FF +FF +FF +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +000070 +0000F0 +0001F0 +0003F0 +0007E0 +000FC0 +001F80 +001F80 +003F00 +007E00 +00FC00 +01FC00 +03F800 +03F000 +07E000 +07C000 +0F8000 +1F8000 +3F0000 +7E0000 +FC0000 +F80000 +F00000 +E00000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F003F0 +F007F0 +F00FF0 +F01FF0 +F03EF0 +F07CF0 +F0F8F0 +F1F0F0 +F3E0F0 +F7C0F0 +FF80F0 +FF00F0 +FE00F0 +FC00F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +0F00 +1F00 +3F00 +7F00 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +0001F0 +0003E0 +0007C0 +000F80 +001F00 +003E00 +007C00 +00F800 +01F000 +03E000 +07C000 +0F8000 +1F0000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +0000F0 +0001F0 +0003F0 +0007E0 +000FC0 +001F80 +003F00 +007F80 +007FC0 +003FE0 +0001F0 +0000F0 +0000F0 +E000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 25 0 4 +BITMAP +001F00 +003F00 +007F00 +00FF00 +01FF00 +03EF00 +07CF00 +0F8F00 +1F0F00 +3E0F00 +7C0F00 +F80F00 +F00F00 +F00F00 +F00F00 +FFFFF0 +FFFFF0 +FFFFF0 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +FFFF80 +FFFFC0 +FFFFE0 +0001F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +E000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +01FF00 +03FF00 +07FF00 +0FFF00 +1F8000 +3F0000 +7E0000 +FC0000 +F80000 +F00000 +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +0000F0 +0000F0 +0000F0 +0001F0 +0003E0 +0007C0 +000F80 +001F00 +003E00 +007C00 +00F800 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +0000F0 +0001F0 +0003F0 +0007E0 +000FC0 +001F80 +0FFF00 +0FFE00 +0FFC00 +0FF800 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 17 4 4 +BITMAP +FF +FF +FF +FF +FF +FF +FF +00 +00 +00 +FF +FF +FF +FF +FF +FF +FF +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 20 4 1 +BITMAP +FF +FF +FF +FF +FF +FF +FF +00 +00 +00 +FF +FF +FF +0F +0F +0F +1E +FC +F8 +F0 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 13 16 3 8 +BITMAP +0078 +00F8 +03F8 +07E0 +1F80 +3F00 +7C00 +F800 +F800 +7C00 +3F00 +1F80 +07E0 +03F8 +00F8 +0078 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 10 0 11 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +000000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 13 16 4 8 +BITMAP +F000 +F800 +FE00 +3F00 +0FC0 +07E0 +01F0 +00F8 +00F8 +01F0 +07E0 +0FC0 +3F00 +FE00 +F800 +F000 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +0001F0 +0003E0 +0007C0 +000F80 +001F00 +003E00 +007C00 +00F800 +00F000 +00F000 +000000 +000000 +000000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F07FF0 +F0FFF0 +F0FFF0 +F0F9F0 +F0F0F0 +F0F0F0 +F0F9F0 +F0FFF0 +F0FFF0 +F07FE0 +F00000 +F00000 +F80000 +7FFF00 +3FFF00 +1FFF00 +0FFF00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +0F01F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F01F0 +0FFFE0 +0FFFC0 +0FFFC0 +0FFFE0 +0F01F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F01F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +0F01F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F01F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00FF0 +F00FF0 +F00FF0 +F00FF0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00FFF0 +00FFF0 +00FFF0 +00FFF0 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +000F00 +F00F00 +F00F00 +F81F00 +7FFE00 +3FFC00 +1FF800 +0FF000 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 19 24 0 4 +BITMAP +F001E0 +F003E0 +F007C0 +F00F80 +F01F00 +F03E00 +F07C00 +F0F800 +F1F000 +F3E000 +FFC000 +FF8000 +FF8000 +FFC000 +F3E000 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F007C0 +F003E0 +F001E0 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F801F0 +FC03F0 +FE07F0 +FF0FF0 +FF9FF0 +F7FEF0 +F3FCF0 +F1F8F0 +F0F0F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +FC00F0 +FE00F0 +FF00F0 +FF80F0 +F7C0F0 +F3E0F0 +F1F0F0 +F0F8F0 +F07CF0 +F03EF0 +F01FF0 +F00FF0 +F007F0 +F003F0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F0F8F0 +F0FCF0 +F07EF0 +F03F70 +F01FB0 +F80FC0 +7FF7E0 +3FFBF0 +1FFDF0 +0FFCF0 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFF00 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +F1F000 +F0F800 +F07C00 +F03E00 +F01F00 +F00F80 +F007C0 +F003E0 +F001F0 +F000F0 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +7FFF00 +3FFF80 +1FFFC0 +0FFFE0 +0001F0 +0000F0 +0000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0F9F00 +07FE00 +03FC00 +01F800 +00F000 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F9F9F0 +7FFFE0 +3FFFC0 +1F9F80 +0F0F00 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0F9F00 +07FE00 +03FC00 +03FC00 +07FE00 +0F9F00 +1F0F80 +3E07C0 +7C03E0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0FFF00 +07FE00 +03FC00 +01F800 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +0000F0 +0001F0 +0003F0 +0007E0 +000FC0 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +7E0000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +FFF0 +FFF0 +FFF0 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +F000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +E00000 +F00000 +F80000 +FC0000 +7E0000 +3F0000 +1F8000 +0F8000 +0FC000 +07E000 +03F000 +01F800 +00F800 +007C00 +003E00 +001F00 +001F80 +000FC0 +0007C0 +0007E0 +0003F0 +0001F0 +0000F0 +000070 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +FFF0 +FFF0 +FFF0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +00F0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 11 0 21 +BITMAP +00F000 +01F800 +03FC00 +07FE00 +0F9F00 +1F0F80 +3E07C0 +7C03E0 +F801F0 +F000F0 +E00070 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 3 0 -2 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 11 4 20 +BITMAP +F000 +F800 +FC00 +7E00 +3F00 +1F80 +0FC0 +07E0 +03F0 +01F0 +00F0 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +0FFF80 +0FFFC0 +0FFFE0 +0001F0 +0000F0 +0000F0 +0FFFF0 +1FFFF0 +3FFFF0 +7FFFF0 +F800F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +1FFF00 +3FFF00 +7FFF00 +F80000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +1FFFF0 +3FFFF0 +7FFFF0 +F800F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +F00000 +F00000 +F80000 +7FFF00 +3FFF00 +1FFF00 +0FFF00 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00FF00 +01FF80 +03FFC0 +07FFE0 +0F81F0 +0F00F0 +0F0070 +0F0000 +0F0000 +0F0000 +FFF000 +FFF000 +FFF000 +FFF000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +0F0000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +0000F0 +0000F0 +0001F0 +0FFFE0 +0FFFC0 +0FFF80 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +0F00 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 16 30 4 -2 +BITMAP +000F +000F +000F +000F +0000 +0000 +0000 +00FF +00FF +00FF +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +000F +E00F +F00F +F81F +7FFE +3FFC +1FF8 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F000F0 +F001F0 +F003E0 +F007C0 +F00F80 +F01F00 +F03E00 +FFFC00 +FFF800 +FFFC00 +F03E00 +F01F00 +F00F80 +F007C0 +F003E0 +F001F0 +F000F0 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +FF00 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +FF0F80 +FF9FC0 +FFFFE0 +F1F9F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F1FF80 +F3FFC0 +F7FFE0 +FF81F0 +FF00F0 +FE00F0 +FC00F0 +F800F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 18 0 4 +BITMAP +0FFF00 +1FFF80 +3FFFC0 +7FFFE0 +F801F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7FFFE0 +3FFFC0 +1FFF80 +0FFF00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +FFFF80 +FFFFC0 +FFFFE0 +F001F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +1FFFF0 +3FFFF0 +7FFFF0 +F800F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F800F0 +7FFFF0 +3FFFF0 +1FFFF0 +0FFFF0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F1FF80 +F3FFC0 +F7FFE0 +FF81F0 +FF00F0 +FE0070 +FC0030 +F80000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +1FFFF0 +3FFFF0 +7FFFF0 +F80000 +F00000 +F00000 +F80000 +7FFF80 +3FFFC0 +1FFFE0 +0001F0 +0000F0 +0001F0 +FFFFE0 +FFFFC0 +FFFF80 +FFFF00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F800 +007FF0 +003FF0 +001FF0 +000FF0 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F001F0 +F003F0 +F007F0 +F00FF0 +F81FF0 +7FFEF0 +3FFCF0 +1FF8F0 +0FF0F0 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0F9F00 +07FE00 +03FC00 +01F800 +00F000 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F9F9F0 +7FFFE0 +3FFFC0 +1F9F80 +0F0F00 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 19 16 0 4 +BITMAP +F803E0 +7C07C0 +3E0F80 +1F1F00 +0FBE00 +07FC00 +03F800 +01F000 +01F000 +03F800 +07BC00 +0F1E00 +1E0F00 +3C0780 +7803C0 +F001E0 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F801F0 +7C03E0 +3E07C0 +1F0F80 +0F9F00 +07FE00 +03FC00 +00F800 +01F000 +03E000 +07C000 +0F8000 +FF0000 +FE0000 +FC0000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +001F80 +003F00 +007E00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +3F0000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +00F0 +01F0 +03E0 +0780 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +1F00 +3F00 +7E00 +F800 +F000 +F000 +F800 +7E00 +3F00 +1F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0780 +03E0 +01F0 +00F0 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 30 8 1 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 1 +BITMAP +F000 +F800 +7C00 +3E00 +1F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F80 +0FC0 +07E0 +01F0 +00F0 +00F0 +01F0 +07E0 +0FC0 +0F80 +0F00 +0F00 +0F00 +0F00 +0F00 +1F00 +3E00 +7C00 +F800 +F000 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 10 0 11 +BITMAP +1F00F0 +3F80F0 +7FC0F0 +F3E0F0 +F1F0F0 +F0F8F0 +F07DF0 +F03FE0 +F01FC0 +F00F80 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 1368 0 +DWIDTH 19 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 24 8 4 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +00 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 1 +BITMAP +00F000 +00F000 +00F000 +0FFF00 +0FFF00 +0FFF00 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F000 +F0F000 +F0F000 +F0F0F0 +F0F0F0 +F0F0F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00FF00 +00FF00 +00FF00 +00FF00 +0F00F0 +0F00F0 +0F00F0 +0F0000 +0F0000 +0F0000 +FFF000 +FFF000 +FFF000 +FFF000 +0F0000 +0F0000 +0F0000 +0F00F0 +0F00F0 +0F00F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F0F0F0 +F0F0F0 +F0F0F0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 4 24 8 4 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +00 +00 +00 +00 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 16 27 4 4 +BITMAP +0FFF +0FFF +0FFF +F000 +F000 +F000 +F000 +0FF0 +0FF0 +0FF0 +F00F +F00F +F00F +F00F +F00F +F00F +F00F +0FF0 +0FF0 +0FF0 +000F +000F +000F +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 3 4 28 +BITMAP +F0F0 +F0F0 +F0F0 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 24 24 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +F0000F +F0000F +F0000F +F0FF0F +F0FF0F +F0FF0F +F0F00F +F0F00F +F0F00F +F0F00F +F0FF0F +F0FF0F +F0FF0F +F0000F +F0000F +F0000F +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 16 4 18 +BITMAP +0FF0 +0FF0 +0FF0 +F0F0 +F0F0 +F0F0 +0FF0 +0FF0 +0FF0 +0FF0 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +00F0F0 +00F0F0 +00F0F0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +F0F000 +F0F000 +F0F000 +0F0F00 +0F0F00 +0F0F00 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 10 0 8 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +0000F0 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 4 4 14 +BITMAP +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 24 24 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +F0000F +F0000F +F0000F +F0FF0F +F0FF0F +F0FF0F +F0F00F +F0F00F +F0F00F +F0F00F +F0F00F +F0F00F +F0F00F +F0000F +F0000F +F0000F +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 3 0 28 +BITMAP +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 16 13 4 21 +BITMAP +0FF0 +0FF0 +0FF0 +F00F +F00F +F00F +F00F +F00F +F00F +F00F +0FF0 +0FF0 +0FF0 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +FFFFF0 +FFFFF0 +FFFFF0 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 16 4 18 +BITMAP +0F00 +0F00 +0F00 +F0F0 +F0F0 +F0F0 +00F0 +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 16 4 18 +BITMAP +FF00 +FF00 +FF00 +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +0F00 +00F0 +00F0 +00F0 +FF00 +FF00 +FF00 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 10 4 21 +BITMAP +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +0F00 +F000 +F000 +F000 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F00FF0 +F00FF0 +F00FF0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 8 7 8 14 +BITMAP +FF +FF +FF +FF +FF +FF +FF +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 6 4 -2 +BITMAP +00F0 +00F0 +00F0 +FF00 +FF00 +FF00 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 16 4 18 +BITMAP +0F00 +0F00 +0F00 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 17 4 21 +BITMAP +0F00 +0F00 +0F00 +0F00 +F0F0 +F0F0 +F0F0 +0F00 +0F00 +0F00 +0000 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +F0F000 +F0F000 +F0F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +00F0F0 +00F0F0 +00F0F0 +0F0F00 +0F0F00 +0F0F00 +F0F000 +F0F000 +F0F000 +F0F000 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +FF0000 +FF0000 +FF0000 +0F00F0 +0F00F0 +0F00F0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0FF000 +0FF000 +0FF000 +0F0F00 +0F0F00 +0F0F00 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +0F0F00 +0F0F00 +0F0F00 +0FFFF0 +0FFFF0 +0FFFF0 +000F00 +000F00 +000F00 +000F00 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +FF0000 +FF0000 +FF0000 +0F00F0 +0F00F0 +0F00F0 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0FF000 +0FF000 +0FF000 +0F0F00 +0F0F00 +0F0F00 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +0000F0 +0000F0 +0000F0 +000F00 +000F00 +000F00 +00FFF0 +00FFF0 +00FFF0 +00FFF0 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +FF0000 +FF0000 +FF0000 +FF0000 +00F000 +00F000 +00F000 +0F00F0 +0F00F0 +0F00F0 +00FF00 +00FF00 +00FF00 +00FF00 +FFF000 +FFF000 +FFF000 +0F0F00 +0F0F00 +0F0F00 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +0F0F00 +0F0F00 +0F0F00 +0FFFF0 +0FFFF0 +0FFFF0 +000F00 +000F00 +000F00 +000F00 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +0F0000 +0F0000 +0F0000 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +F0F000 +F0F000 +F0F000 +F0F000 +F0F000 +F0F000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F0F000 +F0F000 +F0F000 +F0F000 +F0F000 +F0F000 +F0FFF0 +F0FFF0 +F0FFF0 +F0FFF0 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 -2 +BITMAP +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +000F00 +000F00 +000F00 +0FF000 +0FF000 +0FF000 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 34 4 4 +BITMAP +F000 +F000 +F000 +F000 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 34 4 4 +BITMAP +00F0 +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 34 4 4 +BITMAP +0F00 +0F00 +0F00 +0F00 +F0F0 +F0F0 +F0F0 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 30 4 4 +BITMAP +F0F0 +F0F0 +F0F0 +0000 +0000 +0000 +FFF0 +FFF0 +FFF0 +FFF0 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +0FFF00 +0FFF00 +0FFF00 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +FFF0F0 +FFF0F0 +FFF0F0 +FFF0F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0F00F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FF00F0 +FF00F0 +FF00F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F00FF0 +F00FF0 +F00FF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 16 0 8 +BITMAP +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 1 +BITMAP +0000F0 +0000F0 +0000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F00FF0 +F00FF0 +F00FF0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +F0F0F0 +FF00F0 +FF00F0 +FF00F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +00F000 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 34 0 4 +BITMAP +000F00 +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 16 24 4 4 +BITMAP +F000 +F000 +F000 +F000 +FFF0 +FFF0 +FFF0 +F00F +F00F +F00F +F00F +F00F +F00F +F00F +F00F +F00F +F00F +FFF0 +FFF0 +FFF0 +F000 +F000 +F000 +F000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0FFF00 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F00F00 +F00F00 +F00F00 +F0F000 +F0F000 +F0F000 +F0F000 +F00F00 +F00F00 +F00F00 +F000F0 +F000F0 +F000F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +0FFF00 +0FFF00 +0FFF00 +0000F0 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +0FFF00 +0FFF00 +0FFF00 +00F0F0 +00F0F0 +00F0F0 +00F0F0 +0FFF00 +0FFF00 +0FFF00 +F0F000 +F0F000 +F0F000 +0FFFF0 +0FFFF0 +0FFFF0 +0FFFF0 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 23 0 -2 +BITMAP +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F00000 +F00000 +F00000 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +000F00 +000F00 +000F00 +0FF000 +0FF000 +0FF000 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 27 4 4 +BITMAP +F000 +F000 +F000 +0F00 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 27 4 4 +BITMAP +00F0 +00F0 +00F0 +0F00 +0F00 +0F00 +0F00 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 27 4 4 +BITMAP +0F00 +0F00 +0F00 +F0F0 +F0F0 +F0F0 +F0F0 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 12 24 4 4 +BITMAP +F0F0 +F0F0 +F0F0 +F0F0 +0000 +0000 +0000 +FF00 +FF00 +FF00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +0F00 +FFF0 +FFF0 +FFF0 +FFF0 +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +0000F0 +0000F0 +0000F0 +0FFFF0 +0FFFF0 +0FFFF0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +F0FF00 +F0FF00 +F0FF00 +FF00F0 +FF00F0 +FF00F0 +FF00F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0FF0F0 +0FF0F0 +0FF0F0 +F0FF00 +F0FF00 +F0FF00 +F0FF00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +0FFF00 +0FFF00 +0FFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 16 0 8 +BITMAP +00F000 +00F000 +00F000 +000000 +000000 +000000 +FFFFF0 +FFFFF0 +FFFFF0 +FFFFF0 +000000 +000000 +000000 +00F000 +00F000 +00F000 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 17 0 4 +BITMAP +0FFFF0 +0FFFF0 +0FFFF0 +F00FF0 +F00FF0 +F00FF0 +F00FF0 +F0F0F0 +F0F0F0 +F0F0F0 +FF00F0 +FF00F0 +FF00F0 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +0F0000 +0F0000 +0F0000 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 27 0 4 +BITMAP +00F000 +00F000 +00F000 +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 24 0 4 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0FFF00 +0FFF00 +0FFF00 +0FFF00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 33 0 -2 +BITMAP +000F00 +000F00 +000F00 +00F000 +00F000 +00F000 +00F000 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +00F000 +0F0000 +0F0000 +0F0000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 -2 +BITMAP +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +FFFF00 +FFFF00 +FFFF00 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F00000 +F00000 +F00000 +F00000 +F00000 +F00000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 1728 0 +DWIDTH 24 0 +BBX 20 30 0 -2 +BITMAP +0F0F00 +0F0F00 +0F0F00 +0F0F00 +000000 +000000 +000000 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +F000F0 +0F0F00 +0F0F00 +0F0F00 +00F000 +00F000 +00F000 +00F000 +0F0000 +0F0000 +0F0000 +F00000 +F00000 +F00000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-28x56.bdf b/buildroot/share/fonts/marlin-28x56.bdf new file mode 100644 index 000000000000..1b6a3f523306 --- /dev/null +++ b/buildroot/share/fonts/marlin-28x56.bdf @@ -0,0 +1,7311 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 48 100 100 +FONTBOUNDINGBOX 30 47 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 46 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +FFC03F +FFC01F +FFC01F +FFC01F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F803FF +F803FF +F803FF +FC03FF +7FFFFF +3FFFFF +1FFFFF +0FFFFF +0003E0 +0003E0 +0003E0 +0003E0 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +FFC000 +FFC000 +FFC000 +FFC000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 23 20 0 10 +BITMAP +003C00 +003E00 +003F00 +003F80 +003FC0 +003FE0 +003FF0 +003FF8 +FFFFFC +FFFFFE +FFFFFE +FFFFFC +003FF8 +003FF0 +003FE0 +003FC0 +003F80 +003F00 +003E00 +003C00 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 23 34 0 6 +BITMAP +001000 +003800 +007C00 +00FE00 +01FF00 +03FF80 +07FFC0 +0FFFE0 +1FFFF0 +3FFFF8 +7FFFFC +FFFFFE +FFFFFE +FFFFFE +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 2 +BITMAP +003C00 +003C00 +003C00 +003C00 +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC3C3F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83FFF +F83FFF +F83FFF +F83FFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 2160 0 +DWIDTH 30 0 +BBX 28 20 0 10 +BITMAP +FE1FE000 +FF1FF000 +FF9FF800 +7FCFFC00 +3FE7FE00 +1FF3FF00 +0FF9FF80 +07FCFFC0 +03FE7FE0 +01FF3FF0 +01FF3FF0 +03FE7FE0 +07FCFFC0 +0FF9FF80 +1FF3FF00 +3FE7FE00 +7FCFFC00 +FF9FF800 +FF1FF000 +FE1FE000 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 2 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F83C1F +F83C1F +F83C1F +F83C1F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F83C1F +F83C1F +F83C1F +F83C1F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 -2 +BITMAP +007E00 +00FF00 +01FF80 +03FFC0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +0FC3F0 +1FC3F8 +3FC3FC +7FC3FE +FC003F +F8001F +F8001F +F8001F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 13 12 1 18 +BITMAP +0F80 +1FC0 +3FE0 +7FF0 +F8F8 +F078 +F078 +F8F8 +7FF0 +3FE0 +1FC0 +0F80 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 28 10 6 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +00 +00 +00 +00 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 12 5 26 +BITMAP +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +F87C +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 24 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +07C3E0 +07C3E0 +07C3E0 +07C3E0 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 2 +BITMAP +003C00 +003C00 +003C00 +003C00 +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC3C3F +F83C1F +F83C1F +F83C1F +F83C00 +F83C00 +F83C00 +FC3C00 +7FFFF0 +3FFFF8 +1FFFFC +0FFFFE +003C3F +003C1F +003C1F +003C1F +F83C1F +F83C1F +F83C1F +FC3C3F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFC01F +FFC01F +FFC01F +FFC01F +FFC01F +FFC03F +FFC07F +FFC0FF +0003F8 +0007F0 +000FE0 +001FC0 +003F00 +007E00 +00FC00 +01F800 +07F000 +0FE000 +1FC000 +3F8000 +FE03FF +FC03FF +F803FF +F803FF +F803FF +F803FF +F803FF +F803FF +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FC000 +1FE000 +3FF000 +7FF800 +FC7C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +7C7800 +3FF000 +1FE000 +1FF000 +3FF800 +7C7C0F +F83E1F +F81F3F +F80FFE +F807FC +F803F8 +F803F8 +FC07FC +7FFFFE +3FFF3F +1FFE1F +0FFC0F +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 12 10 26 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +007C +00FC +01FC +03FC +07C0 +0780 +0F80 +0F00 +1F00 +3E00 +3E00 +7C00 +FC00 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +7C00 +3C00 +3E00 +1F00 +1F00 +0F80 +0FC0 +07E0 +03FC +01FC +00FC +007C +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +F800 +FC00 +FE00 +FF00 +1F80 +0FC0 +07E0 +07E0 +03F0 +03F0 +01F8 +01F8 +00FC +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +00FC +00F8 +01F8 +01F0 +03F0 +03E0 +07E0 +07C0 +0F80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +F83C1F +FC3C3F +7E3C7E +3F3CFC +1FBDF8 +0FFFF0 +07FFE0 +03FFC0 +01FF80 +00FF00 +00FF00 +01FF80 +03FFC0 +07FFE0 +0FFFF0 +1FBDF8 +3F3CFC +7E3C7E +FC3C3F +F83C1F +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 10 +BITMAP +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 12 5 2 +BITMAP +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0F80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 4 0 18 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 8 5 6 +BITMAP +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +00001F +00003F +00007F +0000FE +0001FC +0003FC +0003F8 +0007F0 +000FE0 +001FE0 +003FC0 +003F80 +007F80 +00FF00 +01FE00 +01FC00 +03FC00 +07F800 +0FF800 +0FF000 +1FE000 +3FC000 +7F8000 +FF0000 +FE0000 +FC0000 +F80000 +F00000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8007F +F800FF +F801FF +F803FF +F807FF +F80FFF +F81FDF +F83F9F +F87F1F +F8FE1F +F9FC1F +FBF81F +FFF01F +FFE01F +FFC01F +FF801F +FF001F +FE001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +0F80 +1F80 +3F80 +7F80 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +00003F +00007F +0000FE +0001FC +0003F8 +0007F0 +000FE0 +001FC0 +003F80 +007F00 +00FE00 +01FC00 +03F800 +07F000 +0FE000 +1FC000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +00001F +00001F +00003F +00007F +0000FE +0001FC +0003F8 +0007F0 +003FF0 +003FF8 +003FFC +003FFE +00003F +00001F +00001F +00001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 29 0 6 +BITMAP +0007E0 +000FE0 +001FE0 +003FE0 +007FE0 +00FFE0 +01FBE0 +03F3E0 +07E3E0 +0FC3E0 +1F83E0 +3F03E0 +7E03E0 +FC03E0 +F803E0 +F803E0 +F803E0 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +00003F +00001F +00001F +00001F +00001F +00001F +00001F +00001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +00FFE0 +01FFE0 +03FFE0 +07FFE0 +0FE000 +1FC000 +3F8000 +7F0000 +FE0000 +FC0000 +F80000 +F80000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +00001F +00001F +00003F +00007E +0000FC +0001F8 +0003F0 +0007E0 +000FC0 +001F80 +003F00 +003E00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +00001F +00001F +00003F +00007E +0000FC +0001F8 +0003F0 +0007E0 +07FFC0 +07FF80 +07FF00 +07FE00 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 20 5 6 +BITMAP +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 24 5 2 +BITMAP +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0F80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 21 5 9 +BITMAP +007C +00FC +01F8 +03F0 +07E0 +0FC0 +1F80 +3F00 +7E00 +FC00 +F800 +FC00 +7E00 +3F00 +1F80 +0FC0 +07E0 +03F0 +01F8 +00FC +007C +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 12 0 14 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 10 +BITMAP +FC00 +FE00 +3F00 +1F80 +0FC0 +07E0 +03F0 +01F8 +00FC +007C +007C +00FC +01F8 +03F0 +07E0 +0FC0 +1F80 +3F00 +FE00 +FC00 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8003F +00007E +0000FC +0001F8 +0003F0 +0007E0 +000FC0 +001F80 +003F00 +003E00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +F8003F +F8001F +F8001F +F8001F +F81FFF +F83FFF +F83FFF +F83FFF +F83E1F +F83C1F +F83C1F +F83E3F +F83FFF +F83FFF +F83FFF +F81FFE +F80000 +F80000 +F80000 +FC0000 +7FFFE0 +3FFFE0 +1FFFE0 +0FFFE0 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +07C03F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07FFFE +07FFFC +07FFFC +07FFFE +07C03F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C03F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +07C03F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C03F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F803FF +F803FF +F803FF +F803FF +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003FFF +003FFF +003FFF +003FFF +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +F803E0 +F803E0 +F803E0 +FC07E0 +7FFFC0 +3FFF80 +1FFF00 +0FFE00 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8003F +F8007E +F800FC +F801F8 +F803F0 +F807E0 +F80FC0 +F81F80 +F83F00 +F87E00 +F8FC00 +F9F800 +FFF000 +FFE000 +FFE000 +FFF000 +F9F800 +F8FC00 +F87E00 +F83F00 +F81F80 +F80FC0 +F807E0 +F803F0 +F801F8 +F800FC +F8007E +F8003F +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +FC003F +FE007F +FF00FF +FF81FF +FFC3FF +FFE7FF +FFFFFF +F9FF9F +F8FF1F +F87E1F +F83C1F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +FC001F +FE001F +FF001F +FF801F +FFC01F +FFE01F +FBF01F +F9F81F +F8FC1F +F87E1F +F83F1F +F81F9F +F80FDF +F807FF +F803FF +F801FF +F800FF +F8007F +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F83C1F +F83E1F +F83F1F +F83F9F +F81FDF +F80FEF +F807F7 +FC03FB +7FFDFC +3FFEFE +1FFF7F +0FFFBF +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +F8FC00 +F87E00 +F83F00 +F81F80 +F80FC0 +F807E0 +F803F0 +F801F8 +F800FC +F8007E +F8003F +F8001F +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +FC0000 +7FFFF0 +3FFFF8 +1FFFFC +0FFFFE +00003F +00001F +00001F +00001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +FE007E +7F00FC +3F81F8 +1FC3F0 +0FE7E0 +07FFC0 +03FF80 +01FF00 +00FE00 +007C00 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F87E3F +7FFFFE +3FFFFC +1FE7F8 +0FC3F0 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 23 28 0 6 +BITMAP +F8003E +F8003E +F8003E +F8003E +FC007E +7E00FC +3F01F8 +1F83F0 +0FC7E0 +07EFC0 +03FF80 +01FF00 +00FE00 +007C00 +007C00 +00FE00 +01FF00 +03FF80 +07EFC0 +0FC7E0 +1F83F0 +3F01F8 +7E00FC +FC007E +F8003E +F8003E +F8003E +F8003E +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7E007E +3F00FC +1F81F8 +0FC3F0 +07FFE0 +03FFC0 +01FF80 +00FF00 +007E00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +00001F +00003F +00007F +0000FE +0001FC +0003F8 +0007F0 +000FE0 +001FC0 +003F80 +007F00 +00FE00 +01FC00 +03F800 +07F000 +0FE000 +1FC000 +3F8000 +7F0000 +FE0000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +FFFC +FFFC +FFFC +FFFC +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F80000 +FC0000 +FE0000 +FF0000 +7F8000 +3F8000 +1FC000 +1FE000 +0FE000 +07F000 +03F800 +03FC00 +01FE00 +00FE00 +007F00 +003F80 +003FC0 +001FC0 +000FE0 +0007F0 +0007F8 +0003F8 +0001FC +0001FE +0000FF +00007F +00003F +00001F +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +FFFC +FFFC +FFFC +FFFC +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +007C +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 12 0 26 +BITMAP +003C00 +00FF00 +01FF80 +03FFC0 +07E7E0 +0FC3F0 +1F81F8 +3F00FC +7E007E +FC003F +F8001F +F0000F +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 4 0 -2 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 12 5 26 +BITMAP +F800 +FC00 +FE00 +FF00 +7FC0 +3FE0 +1FF0 +0FF8 +03FC +01FC +00FC +007C +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +07FFF0 +07FFF8 +07FFFC +07FFFE +00003F +00001F +00001F +00001F +0FFFFF +1FFFFF +3FFFFF +7FFFFF +FC001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +0FFFE0 +1FFFE0 +3FFFE0 +7FFFE0 +FC0000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +00001F +00001F +00001F +00001F +00001F +00001F +00001F +00001F +0FFFFF +1FFFFF +3FFFFF +7FFFFF +FC001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +F80000 +F80000 +F80000 +FC0000 +7FFFE0 +3FFFE0 +1FFFE0 +0FFFE0 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +007FF0 +00FFF8 +01FFFC +03FFFE +07E03F +07C01F +07C01F +07C00F +07C000 +07C000 +07C000 +07C000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +07C000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +00001F +00001F +00001F +00003F +07FFFE +07FFFC +07FFF8 +07FFF0 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 19 36 5 -2 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +000000 +000000 +000000 +000000 +007FE0 +007FE0 +007FE0 +007FE0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +0003E0 +F803E0 +F803E0 +F803E0 +FC07E0 +7FFFC0 +3FFF80 +1FFF00 +0FFE00 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 23 28 0 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F8003E +F8007E +F800FC +F801F8 +F803F0 +F807E0 +F80FC0 +F81F80 +FFFF00 +FFFE00 +FFFE00 +FFFF00 +F81F80 +F80FC0 +F807E0 +F803F0 +F801F8 +F800FC +F8007E +F8003E +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +FFC3F0 +FFE7F8 +FFFFFC +FFFFFE +F87E3F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F87FF0 +F8FFF8 +F9FFFC +FBFFFE +FFE03F +FFC01F +FF801F +FF001F +FE001F +FC001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +0FFFF0 +1FFFF8 +3FFFFC +7FFFFE +FC003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7FFFFE +3FFFFC +1FFFF8 +0FFFF0 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +FFFFF0 +FFFFF8 +FFFFFC +FFFFFE +F8003F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +0FFFFF +1FFFFF +3FFFFF +7FFFFF +FC001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC001F +7FFFFF +3FFFFF +1FFFFF +0FFFFF +00001F +00001F +00001F +00001F +00001F +00001F +00001F +00001F +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F87FF0 +F8FFF8 +F9FFFC +FBFFFE +FFE03F +FFC01F +FF801F +FF000F +FE0000 +FC0000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +0FFFFF +1FFFFF +3FFFFF +7FFFFF +FC0000 +F80000 +F80000 +FC0000 +7FFFF0 +3FFFF8 +1FFFFC +0FFFFE +00003F +00001F +00001F +00003F +FFFFFE +FFFFFC +FFFFF8 +FFFFF0 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003E00 +003FFF +001FFF +000FFF +0007FF +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +F8007F +F800FF +F801FF +F803FF +FC07FF +7FFFDF +3FFF9F +1FFF1F +0FFE1F +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FC003F +7E007E +3F00FC +1F81F8 +0FC3F0 +07E7E0 +03FFC0 +01FF80 +00FF00 +007E00 +003C00 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +FC7E3F +7FFFFE +3FFFFC +1FFFF8 +0FE7F0 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F0000F +F8001F +FC003F +7E007E +3F00FC +1F81F8 +0FC3F0 +07E7E0 +03FFC0 +01FF80 +01FF80 +03FFC0 +07FFE0 +0FE7F0 +1FC3F8 +3F81FC +7F00FE +FE007F +FC003F +F8001F +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8003F +FC007E +FE00FC +7F01F8 +3F83F0 +1FC7E0 +0FFFC0 +07FF80 +03FF00 +01FE00 +00FC00 +01F800 +03F000 +07E000 +0FC000 +1F8000 +FF0000 +FE0000 +FC0000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +0003F8 +0007F0 +000FE0 +001FC0 +003F80 +007F00 +00FE00 +01FC00 +03F800 +07F000 +0FE000 +1FC000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +007C +00FC +01FC +03FC +07C0 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0F80 +1F80 +3F00 +FC00 +F800 +F800 +FC00 +3F00 +1F80 +0F80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +07C0 +03FC +01FC +00FC +007C +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 36 10 2 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 2 +BITMAP +F800 +FC00 +FE00 +FF00 +0F80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +07C0 +07E0 +03F0 +00FC +007C +007C +00FC +03F0 +07E0 +07C0 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0F80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 12 0 14 +BITMAP +0FE01F +1FF01F +3FF81F +7FFC1F +FC7C1F +F83C1F +F83C1F +F83E3F +F83FFE +F81FFC +F80FF8 +F807F0 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 1656 0 +DWIDTH 23 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 28 10 6 +BITMAP +F0 +F0 +F0 +F0 +00 +00 +00 +00 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 2 +BITMAP +003C00 +003C00 +003C00 +003C00 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F83C1F +F83C1F +F83C1F +F83C1F +F83C00 +F83C00 +F83C00 +F83C00 +F83C1F +F83C1F +F83C1F +F83C1F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003FE0 +003FE0 +003FE0 +003FE0 +07C01F +07C01F +07C01F +07C01F +07C000 +07C000 +07C000 +07C000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +07C000 +07C000 +07C000 +07C000 +07C01F +07C01F +07C01F +07C01F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F83C1F +F83C1F +F83C1F +F83C1F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83C1F +F83C1F +F83C1F +F83C1F +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 4 28 10 6 +BITMAP +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +00 +00 +00 +00 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +F0 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 19 32 5 6 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F80000 +F80000 +F80000 +F80000 +07FC00 +07FC00 +07FC00 +07FC00 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +07FC00 +07FC00 +07FC00 +07FC00 +0003E0 +0003E0 +0003E0 +0003E0 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 4 5 34 +BITMAP +F87C +F87C +F87C +F87C +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 28 28 0 6 +BITMAP +07FFFF00 +07FFFF00 +07FFFF00 +07FFFF00 +F80000F0 +F80000F0 +F80000F0 +F80000F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F80000F0 +F80000F0 +F80000F0 +F80000F0 +07FFFF00 +07FFFF00 +07FFFF00 +07FFFF00 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 22 +BITMAP +07FC +07FC +07FC +07FC +F87C +F87C +F87C +F87C +07FC +07FC +07FC +07FC +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +003C1F +003C1F +003C1F +003C1F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83C00 +F83C00 +F83C00 +F83C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C1F +003C1F +003C1F +003C1F +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 12 0 10 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +00001F +00001F +00001F +00001F +00001F +00001F +00001F +00001F +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 4 5 18 +BITMAP +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 28 28 0 6 +BITMAP +07FFFF00 +07FFFF00 +07FFFF00 +07FFFF00 +F80000F0 +F80000F0 +F80000F0 +F80000F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83FE0F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F83C00F0 +F80000F0 +F80000F0 +F80000F0 +F80000F0 +07FFFF00 +07FFFF00 +07FFFF00 +07FFFF00 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 4 0 34 +BITMAP +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 19 16 5 26 +BITMAP +07FC00 +07FC00 +07FC00 +07FC00 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +07FC00 +07FC00 +07FC00 +07FC00 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 22 +BITMAP +0780 +0780 +0780 +0780 +F87C +F87C +F87C +F87C +007C +007C +007C +007C +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 22 +BITMAP +FF80 +FF80 +FF80 +FF80 +007C +007C +007C +007C +0780 +0780 +0780 +0780 +007C +007C +007C +007C +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 12 5 26 +BITMAP +007C +007C +007C +007C +0780 +0780 +0780 +0780 +F800 +F800 +F800 +F800 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F803FF +F803FF +F803FF +F803FF +FFFC1F +FFFC1F +FFFC1F +FFFC1F +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07FFFF +07FFFF +07FFFF +07FFFF +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +07FC1F +07FC1F +07FC1F +07FC1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +003C1F +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 9 8 10 18 +BITMAP +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 8 5 -2 +BITMAP +007C +007C +007C +007C +FF80 +FF80 +FF80 +FF80 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 22 +BITMAP +0780 +0780 +0780 +0780 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 20 5 26 +BITMAP +0780 +0780 +0780 +0780 +F87C +F87C +F87C +F87C +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +F83C00 +F83C00 +F83C00 +F83C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C1F +003C1F +003C1F +003C1F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83C00 +F83C00 +F83C00 +F83C00 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +FFC000 +FFC000 +FFC000 +FFC000 +07C01F +07C01F +07C01F +07C01F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07FC00 +07FC00 +07FC00 +07FC00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83FE0 +F83FE0 +F83FE0 +F83FE0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07FFFF +07FFFF +07FFFF +07FFFF +0003E0 +0003E0 +0003E0 +0003E0 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +FFC000 +FFC000 +FFC000 +FFC000 +07C01F +07C01F +07C01F +07C01F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07FC00 +07FC00 +07FC00 +07FC00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83C1F +F83C1F +F83C1F +F83C1F +00001F +00001F +00001F +00001F +0003E0 +0003E0 +0003E0 +0003E0 +003FFF +003FFF +003FFF +003FFF +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +FFC000 +FFC000 +FFC000 +FFC000 +003C00 +003C00 +003C00 +003C00 +07C01F +07C01F +07C01F +07C01F +003FE0 +003FE0 +003FE0 +003FE0 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F83FE0 +F83FE0 +F83FE0 +F83FE0 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +07FFFF +07FFFF +07FFFF +07FFFF +0003E0 +0003E0 +0003E0 +0003E0 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +07C000 +07C000 +07C000 +07C000 +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07FFFF +07FFFF +07FFFF +07FFFF +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83C00 +F83FFF +F83FFF +F83FFF +F83FFF +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 -2 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +0003E0 +0003E0 +0003E0 +0003E0 +07FC00 +07FC00 +07FC00 +07FC00 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 40 5 6 +BITMAP +F800 +F800 +F800 +F800 +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 40 5 6 +BITMAP +007C +007C +007C +007C +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 40 5 6 +BITMAP +0780 +0780 +0780 +0780 +F87C +F87C +F87C +F87C +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 36 5 6 +BITMAP +F87C +F87C +F87C +F87C +0000 +0000 +0000 +0000 +FFFC +FFFC +FFFC +FFFC +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +FFFC1F +FFFC1F +FFFC1F +FFFC1F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07C01F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFC01F +FFC01F +FFC01F +FFC01F +F83C1F +F83C1F +F83C1F +F83C1F +F803FF +F803FF +F803FF +F803FF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 10 +BITMAP +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 2 +BITMAP +00001F +00001F +00001F +00001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F803FF +F803FF +F803FF +F803FF +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +F83C1F +FFC01F +FFC01F +FFC01F +FFC01F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 19 28 5 6 +BITMAP +F80000 +F80000 +F80000 +F80000 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +F803E0 +FFFC00 +FFFC00 +FFFC00 +FFFC00 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F803E0 +F803E0 +F803E0 +F803E0 +F83C00 +F83C00 +F83C00 +F83C00 +F803E0 +F803E0 +F803E0 +F803E0 +F8001F +F8001F +F8001F +F8001F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +003C1F +003C1F +003C1F +003C1F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F83C00 +F83C00 +F83C00 +F83C00 +07FFFF +07FFFF +07FFFF +07FFFF +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 -2 +BITMAP +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F80000 +F80000 +F80000 +F80000 +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +0003E0 +0003E0 +0003E0 +0003E0 +07FC00 +07FC00 +07FC00 +07FC00 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 32 5 6 +BITMAP +F800 +F800 +F800 +F800 +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 32 5 6 +BITMAP +007C +007C +007C +007C +0780 +0780 +0780 +0780 +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 32 5 6 +BITMAP +0780 +0780 +0780 +0780 +F87C +F87C +F87C +F87C +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 14 28 5 6 +BITMAP +F87C +F87C +F87C +F87C +0000 +0000 +0000 +0000 +FF80 +FF80 +FF80 +FF80 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +0780 +FFFC +FFFC +FFFC +FFFC +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +00001F +00001F +00001F +00001F +07FFFF +07FFFF +07FFFF +07FFFF +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +F83FE0 +F83FE0 +F83FE0 +F83FE0 +FFC01F +FFC01F +FFC01F +FFC01F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07FC1F +07FC1F +07FC1F +07FC1F +F83FE0 +F83FE0 +F83FE0 +F83FE0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +07FFE0 +07FFE0 +07FFE0 +07FFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 10 +BITMAP +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +FFFFFF +FFFFFF +FFFFFF +FFFFFF +000000 +000000 +000000 +000000 +003C00 +003C00 +003C00 +003C00 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 20 0 6 +BITMAP +07FFFF +07FFFF +07FFFF +07FFFF +F803FF +F803FF +F803FF +F803FF +F83C1F +F83C1F +F83C1F +F83C1F +FFC01F +FFC01F +FFC01F +FFC01F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +07C000 +07C000 +07C000 +07C000 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 32 0 6 +BITMAP +003C00 +003C00 +003C00 +003C00 +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 28 0 6 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07FFE0 +07FFE0 +07FFE0 +07FFE0 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 40 0 -2 +BITMAP +0003E0 +0003E0 +0003E0 +0003E0 +003C00 +003C00 +003C00 +003C00 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07C000 +07C000 +07C000 +07C000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 -2 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +FFFFE0 +FFFFE0 +FFFFE0 +FFFFE0 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 2016 0 +DWIDTH 28 0 +BBX 24 36 0 -2 +BITMAP +07C3E0 +07C3E0 +07C3E0 +07C3E0 +000000 +000000 +000000 +000000 +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +F8001F +07C3E0 +07C3E0 +07C3E0 +07C3E0 +003C00 +003C00 +003C00 +003C00 +07C000 +07C000 +07C000 +07C000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-32x64.bdf b/buildroot/share/fonts/marlin-32x64.bdf new file mode 100644 index 000000000000..987f9c974f2e --- /dev/null +++ b/buildroot/share/fonts/marlin-32x64.bdf @@ -0,0 +1,9870 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 70 100 100 +FONTBOUNDINGBOX 34 69 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 68 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +FFE01FE0 +FFE00FE0 +FFE007E0 +FFE003E0 +FFE003E0 +FFE003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FE00FFE0 +FF00FFE0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 30 37 0 11 +BITMAP +00100000 +00180000 +001C0000 +001E0000 +001F0000 +001F8000 +001FC000 +001FE000 +001FF000 +001FF800 +001FFC00 +001FFE00 +001FFF00 +001FFF80 +001FFFC0 +FFFFFFE0 +FFFFFFF0 +FFFFFFF8 +FFFFFFFC +FFFFFFF8 +FFFFFFF0 +001FFFE0 +001FFFC0 +001FFF80 +001FFF00 +001FFE00 +001FFC00 +001FF800 +001FF000 +001FE000 +001FC000 +001F8000 +001F0000 +001E0000 +001C0000 +00180000 +00100000 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 28 48 0 9 +BITMAP +00060000 +000F0000 +001F8000 +003FC000 +007FE000 +00FFF000 +01FFF800 +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FFFFFFF0 +FFFFFFF0 +FFFFFFF0 +FFFFFFF0 +FFFFFFF0 +FFFFFFF0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 3 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FE1F07E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 2448 0 +DWIDTH 34 0 +BBX 32 29 0 15 +BITMAP +FC07E000 +FE07F000 +FF07F800 +FF87FC00 +FFC7FE00 +7FE3FF00 +3FF1FF80 +1FF8FFC0 +0FFC7FE0 +07FE3FF0 +03FF1FF8 +01FF8FFC +00FFC7FE +007FE3FF +007FE3FF +00FFC7FE +01FF8FFC +03FF1FF8 +07FE3FF0 +0FFC7FE0 +1FF8FFC0 +3FF1FF80 +7FE3FF00 +FFC7FE00 +FF87FC00 +FF07F800 +FE07F000 +FC07E000 +F807C000 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 3 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 58 0 -2 +BITMAP +001F0000 +003F8000 +007FC000 +00FFE000 +01FFF000 +03FFF800 +03F1FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +07E0FC00 +0FE0FE00 +1FE0FF00 +3FE0FF80 +7FE0FFC0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +7FFFFFC0 +3FFFFF80 +1FFFFF00 +0FFFFE00 +07FFFC00 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 17 17 0 27 +BITMAP +03E000 +07F000 +0FF800 +1FFC00 +3FFE00 +7FFF00 +FE3F80 +FC1F80 +FC1F80 +FC1F80 +FE3F80 +7FFF00 +3FFE00 +1FFC00 +0FF800 +07F000 +03E000 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 41 11 9 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +00 +00 +00 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 18 6 38 +BITMAP +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +F83F +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 35 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 3 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFE00 +07FFFF00 +0FFFFF80 +1FFFFFC0 +3FFFFFE0 +7FFFFFE0 +FE1F07E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FE1F0000 +FFFFFC00 +7FFFFE00 +3FFFFF00 +1FFFFF80 +0FFFFFC0 +07FFFFE0 +001F07E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FE1F07E0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE007E0 +FFE00FE0 +FFE01FE0 +FFE03FC0 +00007F80 +0000FF00 +0001FE00 +0003FC00 +0007F800 +000FF000 +001FE000 +003FC000 +007F8000 +00FF0000 +01FE0000 +03FC0000 +07F80000 +0FF00000 +1FE00000 +3FC00000 +7F800000 +FF00FFE0 +FE00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E00000 +07F00000 +0FF80000 +1FFC0000 +3FFE0000 +7FFF0000 +FE3F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FE3F0000 +7FFE0000 +3FFC0000 +1FF80000 +1FF00000 +3FF80000 +7FFC0000 +FEFE01E0 +FC7F03E0 +FC3F87E0 +FC1FC7E0 +FC0FFFC0 +FC07FF80 +FC03FF00 +FC01FE00 +FC00FC00 +FC00FC00 +FC00FE00 +FE01FF00 +7FFFFF80 +3FFFFFC0 +1FFFFFE0 +0FFFCFE0 +07FF87E0 +03FF03E0 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 18 11 38 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +003F +007F +00FF +01FE +03FC +07F8 +07F0 +0FE0 +1FC0 +1FC0 +1F80 +1F80 +1F00 +3F00 +3F00 +3F00 +7E00 +7E00 +FE00 +FE00 +FC00 +FC00 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +FC00 +FC00 +FC00 +7E00 +7E00 +3E00 +3F00 +3F00 +1F00 +1F00 +1F80 +1F80 +0FC0 +0FE0 +07F0 +03F8 +01FC +00FE +007F +003F +001F +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +F800 +FC00 +FE00 +FF00 +7F80 +3FC0 +1FC0 +0FE0 +07E0 +07F0 +03F0 +03F8 +01F8 +01F8 +00FC +00FC +007E +007E +007F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +007F +007E +007E +00FC +00FC +01F8 +01F8 +01F8 +03F0 +07F0 +07E0 +07E0 +0FC0 +1FC0 +3F80 +7F00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +F01F01E0 +F81F03E0 +FC1F07E0 +FE1F0FE0 +FF1F1FE0 +7F9F3FC0 +3FDF7F80 +1FFFFF00 +0FFFFE00 +07FFFC00 +03FFF800 +01FFF000 +00FFE000 +007FC000 +007FC000 +007FC000 +00FFE000 +01FFF000 +03FFF800 +07FFFC00 +0FFFFE00 +1FFFFF00 +3FDF7F80 +7F9F3FC0 +FF1F1FE0 +FE1F0FE0 +FC1F07E0 +F81F03E0 +F01F01E0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 15 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 10 18 6 3 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +0FC0 +FFC0 +FF80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 6 0 27 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 10 12 6 9 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +000003E0 +000007E0 +000007E0 +00000FE0 +00000FE0 +00001FE0 +00003FC0 +00003F80 +00007F80 +0000FF00 +0000FF00 +0001FE00 +0001FC00 +0003FC00 +0007F800 +0007F800 +000FF000 +000FF000 +001FE000 +003FC000 +003FC000 +007F8000 +00FF8000 +00FF0000 +01FE0000 +01FE0000 +03FC0000 +07FC0000 +07F80000 +0FF00000 +1FF00000 +1FE00000 +3FE00000 +3FC00000 +7FC00000 +FF800000 +FF000000 +FF000000 +FE000000 +FE000000 +FC000000 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FE0007E0 +FC0007E0 +FC000FE0 +FC001FE0 +FC003FE0 +FC007FE0 +FC00FFE0 +FC01FFE0 +FC03FFE0 +FC07FFE0 +FC0FFFE0 +FC1FFFE0 +FC3FFBE0 +FC7FF3E0 +FCFFE3E0 +FDFFC3E0 +FFFF83E0 +FFFF03E0 +FFFE03E0 +FFFC03E0 +FFF803E0 +FFF003E0 +FFE003E0 +FFC003E0 +FF8003E0 +FF0003E0 +FE0003E0 +FC0003E0 +FE0007E0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +07C0 +07C0 +0FC0 +1FC0 +3FC0 +7FC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FE0 +00001FE0 +00003FC0 +00007F80 +0000FF00 +0001FE00 +0003FC00 +0007F800 +000FF000 +001FE000 +003FC000 +007F8000 +00FF0000 +01FE0000 +03FC0000 +07F80000 +0FF00000 +1FE00000 +3FC00000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FE0 +00001FC0 +00003F80 +00007F00 +0000FE00 +0001FC00 +000FFC00 +001FFE00 +001FFF00 +001FFF80 +001FFFC0 +000007E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +0000FC00 +0000FC00 +0001FC00 +0003FC00 +0007FC00 +000FFC00 +001FFC00 +003FFC00 +007FFC00 +00FFFC00 +01FEFC00 +03FCFC00 +07F8FC00 +0FF0FC00 +1FE0FC00 +3FC0FC00 +7F80FC00 +FF00FC00 +FE00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +00000FE0 +000007E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001FFC00 +003FFC00 +007FFC00 +00FFFC00 +01FFFC00 +03FFFC00 +07F80000 +0FF00000 +1FE00000 +3FC00000 +7F800000 +FF000000 +FE000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FC0 +00001F80 +00003F00 +00007E00 +0000FC00 +0001F800 +0003F000 +0007E000 +000FC000 +001F8000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFC0 +3FFFFF80 +1FFFFF00 +1FFFFF00 +3FFFFF80 +7FFFFFC0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FE0 +00001FE0 +00003FC0 +00007F80 +0000FF00 +0001FE00 +0003FC00 +03FFF800 +03FFF000 +03FFE000 +03FFC000 +03FF8000 +03FF0000 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 10 29 6 9 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 10 35 6 3 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +0FC0 +1FC0 +FFC0 +FF80 +FF00 +FE00 +FC00 +F800 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 18 28 4 16 +BITMAP +0007C0 +000FC0 +001FC0 +003F80 +007F00 +00FE00 +01FC00 +03F800 +07F000 +0FE000 +1FC000 +3F8000 +7F0000 +FE0000 +FE0000 +7F0000 +3F8000 +1FC000 +0FE000 +07F000 +03F800 +01FC00 +00FE00 +007F00 +003F80 +001FC0 +000FC0 +0007C0 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 17 0 21 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 18 29 6 15 +BITMAP +F80000 +FC0000 +FE0000 +FF0000 +7F8000 +3FC000 +1FE000 +0FF000 +07F800 +03FC00 +01FE00 +00FF00 +007F80 +003FC0 +003FC0 +007F80 +00FF00 +01FE00 +03FC00 +07F800 +0FF000 +1FE000 +3FC000 +7F8000 +FF0000 +FE0000 +FC0000 +F80000 +F00000 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +00001FC0 +00003F80 +00007F00 +0000FE00 +0001FC00 +0003F800 +0007F000 +000FE000 +001FC000 +001F8000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1F83E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F83E0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC0FFFC0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FE000000 +7FFFFC00 +3FFFFC00 +1FFFFC00 +0FFFFC00 +07FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +03E00FE0 +03E007E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E007E0 +03E00FE0 +03FFFFE0 +03FFFFC0 +03FFFF80 +03FFFF00 +03FFFF80 +03FFFFC0 +03E00FE0 +03E007E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E007E0 +03E00FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +03E00FE0 +03E007E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E007E0 +03E00FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FE01FC00 +FF03FC00 +7FFFF800 +3FFFF000 +1FFFE000 +0FFFC000 +07FF8000 +03FF0000 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0001E0 +FC0003E0 +FC0007E0 +FC000FE0 +FC001FC0 +FC003F80 +FC007F00 +FC00FE00 +FC01FC00 +FC03F800 +FC07F000 +FC0FE000 +FC1FC000 +FC3F8000 +FC7F0000 +FCFE0000 +FDFC0000 +FFF80000 +FFF00000 +FFE00000 +FFE00000 +FFF00000 +FFF80000 +FDFC0000 +FCFE0000 +FC7F0000 +FC3F8000 +FC1FC000 +FC0FE000 +FC07F000 +FC03F800 +FC01FC00 +FC00FE00 +FC007F00 +FC003F80 +FC001FC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0001E0 +FC0000E0 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +FF801FE0 +FFC03FE0 +FFE07FE0 +FFF0FFE0 +FFF9FFE0 +FFFFFFE0 +FDFFFBE0 +FCFFF3E0 +FC7FE3E0 +FC3FC3E0 +FC1F83E0 +FC0F03E0 +FC0603E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +FF8003E0 +FFC003E0 +FFE003E0 +FFF003E0 +FFF803E0 +FFFC03E0 +FFFE03E0 +FDFF03E0 +FCFF83E0 +FC7FC3E0 +FC3FE3E0 +FC1FF3E0 +FC0FFBE0 +FC07FFE0 +FC03FFE0 +FC01FFE0 +FC00FFE0 +FC007FE0 +FC003FE0 +FC001FE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1E03E0 +FC1F03E0 +FC1F83E0 +FC1FC3E0 +FC1FE3E0 +FC1FF3E0 +FC0FFBE0 +FC07FDE0 +FC03FEE0 +FC01FF60 +FC00FF80 +FC007FC0 +7FFFBFE0 +3FFFDFE0 +1FFFEFE0 +0FFFF7E0 +07FFFBE0 +03FFF9E0 +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FFFFFFE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +FFFE0000 +FDFF0000 +FCFF8000 +FC7FC000 +FC3FE000 +FC1FF000 +FC0FF800 +FC07FC00 +FC03FE00 +FC01FF00 +FC00FF80 +FC007FC0 +FC003FE0 +FC001FE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0001E0 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FE000000 +FF000000 +7FFFFC00 +3FFFFE00 +1FFFFF00 +0FFFFF80 +07FFFFC0 +03FFFFE0 +00000FE0 +000007E0 +000003E0 +000003E0 +000003E0 +000003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FE0007E0 +FE000FE0 +7E000FC0 +7F001FC0 +3F001F80 +3F803F80 +1F803F00 +1FC07F00 +0FC07E00 +07E0FE00 +07F1FC00 +03F1F800 +03FFF800 +01FFF000 +01FFF000 +00FFE000 +00FFE000 +007FC000 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FE3F87E0 +FF7FCFE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFBFF00 +07F1FE00 +03E0FC00 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FE000FE0 +FF001FE0 +FF803FE0 +7FC07FE0 +3FE0FFC0 +1FF1FF80 +0FFBFF00 +07FFFE00 +03FFFC00 +01FFF800 +00FFF000 +007FE000 +007FE000 +00FFF000 +01FFF800 +03FFFC00 +07FFFE00 +0FFFFF00 +1FFBFF80 +3FF1FFC0 +7FE0FFE0 +FFC07FE0 +FF803FE0 +FF001FE0 +FE000FE0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FE000FE0 +FF001FE0 +7F803FC0 +3FC07F80 +1FE0FF00 +0FF1FE00 +07FBFC00 +03FFF800 +01FFF000 +00FFE000 +007FC000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +003F8000 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +000003E0 +000003E0 +000007E0 +00000FE0 +00001FE0 +00003FE0 +00007FE0 +0000FFC0 +0001FF80 +0003FF00 +0007FE00 +000FFC00 +001FF800 +003FF000 +007FE000 +00FFC000 +01FF8000 +03FF0000 +07FE0000 +0FFC0000 +1FF80000 +3FF00000 +7FE00000 +FFC00000 +FF800000 +FF000000 +FE000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +F800 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FE000000 +FE000000 +FF000000 +FF000000 +FF800000 +7FC00000 +3FC00000 +3FE00000 +1FE00000 +0FF00000 +0FF00000 +07F80000 +07FC0000 +03FC0000 +01FE0000 +01FE0000 +00FF0000 +007F8000 +007F8000 +003FC000 +003FC000 +001FE000 +000FF000 +000FF000 +0007F800 +0003F800 +0003FC00 +0001FC00 +0001FE00 +0000FF00 +0000FF00 +00007F80 +00003F80 +00003FC0 +00001FE0 +00000FE0 +00000FE0 +000007E0 +000007E0 +000003E0 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +003F +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 28 19 0 38 +BITMAP +00040000 +000E0000 +001F0000 +003F8000 +007FC000 +00FFE000 +01FFF000 +03FBF800 +07F1FC00 +0FE0FE00 +1FC07F00 +3F803F80 +7F001FC0 +FE000FE0 +FC0007F0 +F80003F0 +F00001F0 +E00000F0 +C0000070 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 5 0 -2 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 18 6 38 +BITMAP +F000 +F800 +FC00 +FE00 +FF00 +FF80 +FFC0 +7FE0 +3FF0 +1FF8 +0FFC +07FE +03FF +01FF +00FF +007F +003F +001F +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +03FFFC00 +03FFFE00 +03FFFF00 +03FFFF80 +03FFFFC0 +00000FE0 +000007E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +07FFFFE0 +0FFFFFE0 +1FFFFFE0 +3FFFFFE0 +7FFFFFE0 +FF0003E0 +FE0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +07FFFC00 +0FFFFC00 +1FFFFC00 +3FFFFC00 +7FFFFC00 +FF000000 +FE000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +07FFFFE0 +0FFFFFE0 +1FFFFFE0 +3FFFFFE0 +7FFFFFE0 +FF0003E0 +FE0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +07FFFC00 +0FFFFE00 +1FFFFF00 +3FFFFF80 +7FFFFFC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FE000000 +FF000000 +7FFFFC00 +3FFFFC00 +1FFFFC00 +0FFFFC00 +07FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001FFC00 +003FFE00 +007FFF00 +00FFFF80 +01FFFFC0 +03FFFFE0 +03F80FE0 +03F007E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +07FFFE00 +0FFFFF00 +1FFFFF80 +3FFFFFC0 +7FFFFFE0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000007E0 +00000FE0 +03FFFFC0 +03FFFF80 +03FFFF00 +03FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 21 52 6 -2 +BITMAP +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +000000 +000000 +000000 +000000 +000000 +000000 +003FF8 +003FF8 +003FF8 +003FF8 +003FF8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +F800F8 +F800F8 +F800F8 +F800F8 +FC01F8 +FE03F8 +7FFFF0 +3FFFE0 +1FFFC0 +0FFF80 +07FF00 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0007E0 +FC000FE0 +FC001FC0 +FC003F80 +FC007F00 +FC00FE00 +FC01FC00 +FC03F800 +FC07F000 +FC0FE000 +FFFFC000 +FFFF8000 +FFFF0000 +FFFF8000 +FFFFC000 +FFFFE000 +FC0FF000 +FC07F800 +FC03FC00 +FC01FE00 +FC00FF00 +FC007F80 +FC003FC0 +FC001FE0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0001E0 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FFE0FC00 +FFF1FE00 +FFFBFF00 +FFFFFF80 +FFFFFFC0 +FC7FCFE0 +FC3F87E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC1FFC00 +FC3FFE00 +FC7FFF00 +FCFFFF80 +FDFFFFC0 +FFFC0FE0 +FFF807E0 +FFF003E0 +FFE003E0 +FFC003E0 +FF8003E0 +FF0003E0 +FE0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +07FFFC00 +0FFFFE00 +1FFFFF00 +3FFFFF80 +7FFFFFC0 +FF000FE0 +FE0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFFFF00 +07FFFE00 +03FFFC00 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +FFFFFC00 +FFFFFE00 +FFFFFF00 +FFFFFF80 +FFFFFFC0 +FC000FE0 +FC0007E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +07FFFFE0 +0FFFFFE0 +1FFFFFE0 +3FFFFFE0 +7FFFFFE0 +FF0003E0 +FE0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0003E0 +FF0003E0 +7FFFFFE0 +3FFFFFE0 +1FFFFFE0 +0FFFFFE0 +07FFFFE0 +03FFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC1FFC00 +FC3FFE00 +FC7FFF00 +FCFFFF80 +FDFFFFC0 +FFFC0FE0 +FFF807E0 +FFF003E0 +FFE003E0 +FFC003E0 +FF8003E0 +FF000000 +FE000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +07FFFFE0 +0FFFFFE0 +1FFFFFE0 +3FFFFFE0 +7FFFFFE0 +FF000000 +FE000000 +FC000000 +FC000000 +FE000000 +FF000000 +7FFFFC00 +3FFFFE00 +1FFFFF00 +0FFFFF80 +07FFFFC0 +03FFFFE0 +00000FE0 +000007E0 +000003E0 +000003E0 +000007E0 +00000FE0 +FFFFFFE0 +FFFFFFC0 +FFFFFF80 +FFFFFF00 +FFFFFE00 +FFFFFC00 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F8000 +001FC000 +001FFFE0 +000FFFE0 +0007FFE0 +0003FFE0 +0001FFE0 +0000FFE0 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0007E0 +FC000FE0 +FC001FE0 +FC003FE0 +FC007FE0 +FC00FFE0 +FE01FFE0 +FF03FFE0 +7FFFFBE0 +3FFFF3E0 +1FFFE3E0 +0FFFC3E0 +07FF83E0 +03FF03E0 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FE000FE0 +7F001FC0 +3F803F80 +1FC07F00 +0FE0FE00 +07F1FC00 +03FFF800 +01FFF000 +00FFE000 +007FC000 +003F8000 +001F0000 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC0007E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FC1F07E0 +FE3F8FE0 +FF7FDFE0 +7FFFFFE0 +3FFFFFC0 +1FFFFF80 +0FFBFF00 +07F1FE00 +03E0FC00 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +F00003E0 +F80007E0 +FC000FE0 +FE001FE0 +FF003FC0 +7F807F80 +3FC0FF00 +1FE1FE00 +0FF3FC00 +07FFF800 +03FFF000 +01FFE000 +00FFC000 +007F8000 +007F8000 +00FFC000 +01FFE000 +03FFF000 +07FFF800 +0FF3FC00 +1FE1FE00 +3FC0FF00 +7F807F80 +FF003FC0 +FE001FE0 +FC000FE0 +F80007E0 +F00003E0 +E00001E0 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FE0007E0 +FF000FE0 +7F801FE0 +3FC03FC0 +1FE07F80 +0FF0FF00 +07F9FE00 +03FFFC00 +01FFF800 +00FFF000 +007FE000 +003FC000 +003F8000 +007F0000 +00FE0000 +01FC0000 +03F80000 +07F00000 +0FE00000 +1FC00000 +3F800000 +7F000000 +FE000000 +FC000000 +F8000000 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +00007FC0 +0000FF80 +0001FF00 +0003FE00 +0007FC00 +000FF800 +001FF000 +003FE000 +007FC000 +00FF8000 +01FF0000 +03FE0000 +07FC0000 +0FF80000 +1FF00000 +3FE00000 +7FC00000 +FF800000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +001F +003F +007F +00FF +01FF +03FE +07F0 +07E0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0FC0 +1FC0 +3FC0 +7FC0 +FE00 +FC00 +F800 +F800 +FC00 +FE00 +7FC0 +3FC0 +1FC0 +0FC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07E0 +07F0 +03FE +01FF +00FF +007F +003F +001F +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 53 11 3 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 3 +BITMAP +F000 +F800 +FC00 +FE00 +FF00 +7F80 +1FC0 +0FC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07E0 +07F0 +07F8 +07FC +07FE +00FF +007F +003F +003F +007F +00FF +07FE +07FC +07F8 +07F0 +07E0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0FC0 +1FC0 +7F80 +FF00 +FE00 +FC00 +F800 +F000 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 17 0 21 +BITMAP +07E003E0 +0FF003E0 +1FF803E0 +3FFC03E0 +7FFE03E0 +FFFF03E0 +FE7F83E0 +FC3FC3E0 +FC1FE3E0 +FC0FF7E0 +FC07FFE0 +FC03FFE0 +FC01FFC0 +FC00FF80 +FC007F00 +FC003E00 +FC001C00 +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 1944 0 +DWIDTH 27 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 41 11 9 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +00 +00 +00 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 3 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001FFC00 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 5 41 11 9 +BITMAP +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +00 +00 +00 +00 +00 +00 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +F8 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 21 47 6 9 +BITMAP +07FFF8 +07FFF8 +07FFF8 +07FFF8 +07FFF8 +07FFF8 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +0000F8 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 6 6 50 +BITMAP +F83F +F83F +F83F +F83F +F83F +F83F +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 32 41 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 29 6 33 +BITMAP +07FF +07FF +07FF +07FF +07FF +07FF +F83F +F83F +F83F +F83F +F83F +F83F +07FF +07FF +07FF +07FF +07FF +07FF +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 18 0 15 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 6 6 27 +BITMAP +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 32 41 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1FFC1F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC1F001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +FC00001F +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 6 0 50 +BITMAP +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 21 24 6 38 +BITMAP +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +07FF00 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 29 6 33 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F83F +F83F +F83F +F83F +F83F +F83F +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 29 6 33 +BITMAP +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +003F +003F +003F +003F +003F +003F +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 18 6 38 +BITMAP +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F800 +F800 +F800 +F800 +F800 +F800 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 11 11 11 27 +BITMAP +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +FFE0 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 11 6 -2 +BITMAP +003F +003F +003F +003F +003F +003F +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 29 6 33 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 30 6 38 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F83F +F83F +F83F +F83F +F83F +F83F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +001FFFE0 +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +FFE00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +001FFC00 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +FFFF0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +FC1FFFE0 +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 52 0 -2 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 59 6 9 +BITMAP +F800 +F800 +F800 +F800 +F800 +F800 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 59 6 9 +BITMAP +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 59 6 9 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F83F +F83F +F83F +F83F +F83F +F83F +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 53 6 9 +BITMAP +F83F +F83F +F83F +F83F +F83F +F83F +0000 +0000 +0000 +0000 +0000 +0000 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +FFFF03E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03E003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 15 +BITMAP +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 3 +BITMAP +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 59 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 21 41 6 9 +BITMAP +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +F800F8 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +FFFF00 +F80000 +F80000 +F80000 +F80000 +F80000 +F80000 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC00FC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +001F03E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +FC1F0000 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 40 0 -2 +BITMAP +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +03FF0000 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 47 6 9 +BITMAP +F800 +F800 +F800 +F800 +F800 +F800 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 47 6 9 +BITMAP +003F +003F +003F +003F +003F +003F +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 47 6 9 +BITMAP +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +F83F +F83F +F83F +F83F +F83F +F83F +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 16 41 6 9 +BITMAP +F83F +F83F +F83F +F83F +F83F +F83F +0000 +0000 +0000 +0000 +0000 +0000 +FFC0 +FFC0 +FFC0 +FFC0 +FFC0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +07C0 +FFFF +FFFF +FFFF +FFFF +FFFF +FFFF +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 53 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +000003E0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +03FF03E0 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +FC1FFC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 15 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +FFFFFFE0 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 29 0 9 +BITMAP +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +03FFFFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC00FFE0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FC1F03E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFE003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 47 0 9 +BITMAP +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 41 0 9 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +03FFFC00 +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 58 0 -2 +BITMAP +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +0000FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 52 0 -2 +BITMAP +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FFFFFC00 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 2304 0 +DWIDTH 32 0 +BBX 27 52 0 -2 +BITMAP +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +FC0003E0 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +03E0FC00 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +001F0000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +03E00000 +FC000000 +FC000000 +FC000000 +FC000000 +FC000000 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/marlin-8x16.bdf b/buildroot/share/fonts/marlin-8x16.bdf new file mode 100644 index 000000000000..92e73951b5ba --- /dev/null +++ b/buildroot/share/fonts/marlin-8x16.bdf @@ -0,0 +1,3701 @@ +STARTFONT 2.1 +COMMENT Exported by Fony v1.4.6 +FONT Fixed +SIZE 16 100 100 +FONTBOUNDINGBOX 10 15 0 -2 +STARTPROPERTIES 6 +COPYRIGHT "Public domain terminal emulator font. Share and enjoy. original font -Misc-Fixed-Medium-R-SemiCondensed--12-110-75-75-C-60-ISO10646-1" +RESOLUTION_X 100 +RESOLUTION_Y 100 +FONT_ASCENT 14 +FONT_DESCENT 2 +DEFAULT_CHAR 0 +ENDPROPERTIES +CHARS 256 +STARTCHAR 000 +ENCODING 0 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 001 +ENCODING 1 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 10 1 1 +BITMAP +40 +78 +E4 +C4 +84 +84 +84 +9C +78 +08 +ENDCHAR +STARTCHAR 002 +ENCODING 2 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +C0 +FE +FE +C2 +C2 +C2 +C2 +C2 +C2 +FE +FE +ENDCHAR +STARTCHAR 003 +ENCODING 3 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 8 0 1 +BITMAP +10 +18 +1C +FE +FE +1C +18 +10 +ENDCHAR +STARTCHAR 004 +ENCODING 4 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +38 +7C +FE +10 +10 +10 +10 +10 +F0 +F0 +ENDCHAR +STARTCHAR 005 +ENCODING 5 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 11 1 -1 +BITMAP +20 +78 +A4 +A4 +A4 +BC +84 +84 +84 +78 +20 +ENDCHAR +STARTCHAR 006 +ENCODING 6 +SWIDTH 720 0 +DWIDTH 10 0 +BBX 9 6 0 2 +BITMAP +EE00 +7700 +1980 +1980 +7700 +EE00 +ENDCHAR +STARTCHAR 007 +ENCODING 7 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -1 +BITMAP +FE +92 +92 +82 +82 +82 +82 +82 +82 +92 +92 +FE +ENDCHAR +STARTCHAR 008 +ENCODING 8 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 13 1 -2 +BITMAP +20 +50 +50 +50 +50 +50 +50 +88 +A8 +A8 +A8 +88 +70 +ENDCHAR +STARTCHAR 009 +ENCODING 9 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 3 1 5 +BITMAP +40 +A0 +40 +ENDCHAR +STARTCHAR 010 +ENCODING 10 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 011 +ENCODING 11 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 012 +ENCODING 12 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 013 +ENCODING 13 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 014 +ENCODING 14 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 015 +ENCODING 15 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 016 +ENCODING 16 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 017 +ENCODING 17 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 018 +ENCODING 18 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 019 +ENCODING 19 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 020 +ENCODING 20 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 021 +ENCODING 21 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 022 +ENCODING 22 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 023 +ENCODING 23 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 024 +ENCODING 24 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 025 +ENCODING 25 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 026 +ENCODING 26 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 027 +ENCODING 27 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 028 +ENCODING 28 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 029 +ENCODING 29 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 030 +ENCODING 30 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 031 +ENCODING 31 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 032 +ENCODING 32 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 033 +ENCODING 33 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 10 3 0 +BITMAP +80 +80 +80 +80 +80 +80 +80 +00 +80 +80 +ENDCHAR +STARTCHAR 034 +ENCODING 34 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 4 2 7 +BITMAP +A0 +A0 +A0 +A0 +ENDCHAR +STARTCHAR 035 +ENCODING 35 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 0 +BITMAP +28 +28 +FE +28 +28 +28 +FE +28 +28 +ENDCHAR +STARTCHAR 036 +ENCODING 36 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -1 +BITMAP +10 +3C +52 +92 +90 +70 +1C +12 +92 +54 +3C +10 +ENDCHAR +STARTCHAR 037 +ENCODING 37 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 10 1 0 +BITMAP +C4 +C4 +04 +08 +10 +20 +40 +80 +8C +8C +ENDCHAR +STARTCHAR 038 +ENCODING 38 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +20 +60 +90 +90 +60 +60 +92 +8C +52 +32 +ENDCHAR +STARTCHAR 039 +ENCODING 39 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 4 3 7 +BITMAP +80 +80 +80 +80 +ENDCHAR +STARTCHAR 040 +ENCODING 40 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 -1 +BITMAP +30 +40 +40 +40 +80 +80 +80 +80 +40 +40 +40 +30 +ENDCHAR +STARTCHAR 041 +ENCODING 41 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 12 2 -1 +BITMAP +80 +40 +40 +40 +20 +20 +20 +20 +40 +40 +40 +80 +ENDCHAR +STARTCHAR 042 +ENCODING 42 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +10 +10 +D6 +38 +10 +10 +38 +D6 +10 +10 +ENDCHAR +STARTCHAR 043 +ENCODING 43 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 2 +BITMAP +10 +10 +10 +FE +10 +10 +10 +ENDCHAR +STARTCHAR 044 +ENCODING 44 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 2 4 2 -1 +BITMAP +C0 +40 +40 +80 +ENDCHAR +STARTCHAR 045 +ENCODING 45 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 2 0 4 +BITMAP +FE +FE +ENDCHAR +STARTCHAR 046 +ENCODING 46 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 2 2 2 0 +BITMAP +C0 +C0 +ENDCHAR +STARTCHAR 047 +ENCODING 47 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 10 1 0 +BITMAP +04 +04 +08 +10 +10 +20 +40 +40 +80 +80 +ENDCHAR +STARTCHAR 048 +ENCODING 48 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 6 10 1 0 +BITMAP +30 +48 +84 +8C +94 +A4 +C4 +84 +48 +30 +ENDCHAR +STARTCHAR 049 +ENCODING 49 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 10 1 0 +BITMAP +20 +60 +E0 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 050 +ENCODING 50 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +02 +04 +08 +10 +20 +40 +FE +ENDCHAR +STARTCHAR 051 +ENCODING 51 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +02 +02 +04 +08 +1C +02 +82 +44 +38 +ENDCHAR +STARTCHAR 052 +ENCODING 52 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +04 +0C +14 +24 +44 +84 +FE +04 +04 +04 +ENDCHAR +STARTCHAR 053 +ENCODING 53 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +80 +80 +FC +02 +02 +02 +82 +44 +38 +ENDCHAR +STARTCHAR 054 +ENCODING 54 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +1C +20 +40 +80 +F8 +84 +82 +82 +44 +38 +ENDCHAR +STARTCHAR 055 +ENCODING 55 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +02 +02 +04 +0C +08 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 056 +ENCODING 56 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +82 +44 +38 +44 +82 +44 +38 +ENDCHAR +STARTCHAR 057 +ENCODING 57 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +82 +42 +3E +02 +04 +08 +30 +ENDCHAR +STARTCHAR 058 +ENCODING 58 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 2 5 2 1 +BITMAP +C0 +C0 +00 +C0 +C0 +ENDCHAR +STARTCHAR 059 +ENCODING 59 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 2 7 2 -1 +BITMAP +C0 +C0 +00 +C0 +40 +40 +80 +ENDCHAR +STARTCHAR 060 +ENCODING 60 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 7 2 1 +BITMAP +10 +20 +40 +80 +40 +20 +10 +ENDCHAR +STARTCHAR 061 +ENCODING 61 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 4 0 3 +BITMAP +FE +00 +00 +FE +ENDCHAR +STARTCHAR 062 +ENCODING 62 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 7 2 1 +BITMAP +80 +40 +20 +10 +20 +40 +80 +ENDCHAR +STARTCHAR 063 +ENCODING 63 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +04 +08 +10 +10 +00 +10 +10 +ENDCHAR +STARTCHAR 064 +ENCODING 64 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +9E +92 +92 +9E +80 +40 +3C +ENDCHAR +STARTCHAR 065 +ENCODING 65 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +7C +82 +82 +82 +82 +FE +82 +82 +82 +82 +ENDCHAR +STARTCHAR 066 +ENCODING 66 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +F8 +44 +42 +42 +7C +42 +42 +42 +44 +FC +ENDCHAR +STARTCHAR 067 +ENCODING 67 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +18 +24 +42 +80 +80 +80 +80 +42 +24 +18 +ENDCHAR +STARTCHAR 068 +ENCODING 68 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +F8 +44 +42 +42 +42 +42 +42 +42 +44 +F8 +ENDCHAR +STARTCHAR 069 +ENCODING 69 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +80 +80 +80 +FC +80 +80 +80 +80 +FE +ENDCHAR +STARTCHAR 070 +ENCODING 70 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +80 +80 +80 +FC +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 071 +ENCODING 71 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +80 +80 +80 +8E +42 +24 +18 +ENDCHAR +STARTCHAR 072 +ENCODING 72 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +82 +82 +FE +82 +82 +82 +82 +82 +ENDCHAR +STARTCHAR 073 +ENCODING 73 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 10 1 0 +BITMAP +F8 +20 +20 +20 +20 +20 +20 +20 +20 +F8 +ENDCHAR +STARTCHAR 074 +ENCODING 74 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 0 +BITMAP +3E +08 +08 +08 +08 +08 +88 +48 +30 +ENDCHAR +STARTCHAR 075 +ENCODING 75 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +84 +88 +90 +E0 +E0 +90 +88 +84 +82 +ENDCHAR +STARTCHAR 076 +ENCODING 76 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +80 +80 +80 +80 +80 +80 +80 +FE +ENDCHAR +STARTCHAR 077 +ENCODING 77 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +C6 +AA +92 +82 +82 +82 +82 +82 +82 +ENDCHAR +STARTCHAR 078 +ENCODING 78 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +C2 +A2 +92 +8A +86 +82 +82 +82 +ENDCHAR +STARTCHAR 079 +ENCODING 79 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +82 +82 +82 +82 +82 +44 +38 +ENDCHAR +STARTCHAR 080 +ENCODING 80 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +F8 +84 +82 +82 +84 +F8 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 081 +ENCODING 81 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +38 +44 +82 +82 +82 +82 +82 +8C +46 +3A +ENDCHAR +STARTCHAR 082 +ENCODING 82 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +F8 +84 +82 +82 +84 +F8 +90 +88 +84 +82 +ENDCHAR +STARTCHAR 083 +ENCODING 83 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +18 +24 +42 +80 +40 +3C +02 +82 +44 +38 +ENDCHAR +STARTCHAR 084 +ENCODING 84 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +10 +10 +10 +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 085 +ENCODING 85 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +82 +82 +82 +82 +82 +82 +44 +38 +ENDCHAR +STARTCHAR 086 +ENCODING 86 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +82 +82 +82 +82 +44 +44 +28 +10 +ENDCHAR +STARTCHAR 087 +ENCODING 87 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +82 +82 +82 +82 +92 +92 +54 +28 +ENDCHAR +STARTCHAR 088 +ENCODING 88 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +44 +28 +10 +10 +28 +44 +82 +82 +ENDCHAR +STARTCHAR 089 +ENCODING 89 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +82 +82 +44 +28 +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 090 +ENCODING 90 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +FE +02 +02 +04 +08 +10 +20 +40 +80 +FE +ENDCHAR +STARTCHAR 091 +ENCODING 91 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 -1 +BITMAP +F0 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +F0 +ENDCHAR +STARTCHAR 092 +ENCODING 92 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +40 +20 +10 +10 +08 +08 +04 +02 +ENDCHAR +STARTCHAR 093 +ENCODING 93 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 -1 +BITMAP +F0 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +F0 +ENDCHAR +STARTCHAR 094 +ENCODING 94 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 4 0 7 +BITMAP +10 +28 +44 +82 +ENDCHAR +STARTCHAR 095 +ENCODING 95 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 1 0 -2 +BITMAP +FE +ENDCHAR +STARTCHAR 096 +ENCODING 96 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 4 2 7 +BITMAP +80 +40 +20 +10 +ENDCHAR +STARTCHAR 097 +ENCODING 97 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3C +02 +02 +3E +C2 +46 +3E +ENDCHAR +STARTCHAR 098 +ENCODING 98 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +80 +FC +82 +82 +82 +82 +84 +F8 +ENDCHAR +STARTCHAR 099 +ENCODING 99 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +7C +80 +80 +80 +82 +44 +38 +ENDCHAR +STARTCHAR 100 +ENCODING 100 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +02 +02 +02 +3E +42 +82 +82 +82 +42 +3E +ENDCHAR +STARTCHAR 101 +ENCODING 101 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3C +42 +82 +FC +80 +40 +3C +ENDCHAR +STARTCHAR 102 +ENCODING 102 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +08 +14 +22 +20 +20 +F8 +20 +20 +20 +20 +ENDCHAR +STARTCHAR 103 +ENCODING 103 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +3C +42 +82 +82 +82 +42 +3E +02 +3C +ENDCHAR +STARTCHAR 104 +ENCODING 104 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +80 +FC +82 +82 +82 +82 +82 +82 +ENDCHAR +STARTCHAR 105 +ENCODING 105 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 9 2 0 +BITMAP +40 +00 +C0 +40 +40 +40 +40 +40 +F0 +ENDCHAR +STARTCHAR 106 +ENCODING 106 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 11 2 -2 +BITMAP +08 +00 +38 +08 +08 +08 +08 +08 +08 +88 +70 +ENDCHAR +STARTCHAR 107 +ENCODING 107 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +80 +80 +80 +82 +84 +88 +F0 +88 +84 +82 +ENDCHAR +STARTCHAR 108 +ENCODING 108 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 9 2 0 +BITMAP +C0 +40 +40 +40 +40 +40 +40 +40 +F0 +ENDCHAR +STARTCHAR 109 +ENCODING 109 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +EC +92 +92 +92 +92 +92 +92 +ENDCHAR +STARTCHAR 110 +ENCODING 110 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +9C +A2 +C2 +82 +82 +82 +82 +ENDCHAR +STARTCHAR 111 +ENCODING 111 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +38 +44 +82 +82 +82 +44 +38 +ENDCHAR +STARTCHAR 112 +ENCODING 112 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +FC +82 +82 +82 +82 +82 +FC +80 +80 +ENDCHAR +STARTCHAR 113 +ENCODING 113 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +7E +82 +82 +82 +82 +82 +7E +02 +02 +ENDCHAR +STARTCHAR 114 +ENCODING 114 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +9C +A2 +C2 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 115 +ENCODING 115 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3E +40 +80 +7C +02 +04 +F8 +ENDCHAR +STARTCHAR 116 +ENCODING 116 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +10 +10 +10 +FE +10 +10 +10 +10 +08 +06 +ENDCHAR +STARTCHAR 117 +ENCODING 117 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +82 +82 +82 +82 +86 +8A +72 +ENDCHAR +STARTCHAR 118 +ENCODING 118 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +82 +82 +82 +82 +44 +28 +10 +ENDCHAR +STARTCHAR 119 +ENCODING 119 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +82 +82 +82 +82 +92 +54 +28 +ENDCHAR +STARTCHAR 120 +ENCODING 120 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +82 +44 +28 +10 +28 +44 +82 +ENDCHAR +STARTCHAR 121 +ENCODING 121 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +82 +82 +82 +44 +28 +10 +10 +20 +C0 +ENDCHAR +STARTCHAR 122 +ENCODING 122 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +FE +04 +08 +10 +20 +40 +FE +ENDCHAR +STARTCHAR 123 +ENCODING 123 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 -1 +BITMAP +30 +40 +40 +40 +40 +80 +80 +40 +40 +40 +40 +30 +ENDCHAR +STARTCHAR 124 +ENCODING 124 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 12 3 -1 +BITMAP +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 125 +ENCODING 125 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 12 2 -1 +BITMAP +80 +40 +40 +40 +40 +20 +20 +40 +40 +40 +40 +80 +ENDCHAR +STARTCHAR 126 +ENCODING 126 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 4 0 3 +BITMAP +22 +52 +92 +8C +ENDCHAR +STARTCHAR 127 +ENCODING 127 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 128 +ENCODING 128 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 129 +ENCODING 129 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 130 +ENCODING 130 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 131 +ENCODING 131 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 132 +ENCODING 132 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 133 +ENCODING 133 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 134 +ENCODING 134 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 135 +ENCODING 135 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 136 +ENCODING 136 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 137 +ENCODING 137 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 138 +ENCODING 138 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 139 +ENCODING 139 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 140 +ENCODING 140 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 141 +ENCODING 141 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 142 +ENCODING 142 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 143 +ENCODING 143 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 144 +ENCODING 144 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 145 +ENCODING 145 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 146 +ENCODING 146 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 147 +ENCODING 147 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 148 +ENCODING 148 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 149 +ENCODING 149 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 150 +ENCODING 150 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 151 +ENCODING 151 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 152 +ENCODING 152 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 153 +ENCODING 153 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 154 +ENCODING 154 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 155 +ENCODING 155 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 156 +ENCODING 156 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 157 +ENCODING 157 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 158 +ENCODING 158 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 159 +ENCODING 159 +SWIDTH 216 0 +DWIDTH 3 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 160 +ENCODING 160 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 0 0 0 0 +BITMAP +ENDCHAR +STARTCHAR 161 +ENCODING 161 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 10 3 0 +BITMAP +80 +80 +00 +80 +80 +80 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 162 +ENCODING 162 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -1 +BITMAP +10 +3C +D2 +D2 +D0 +D2 +3C +3C +10 +ENDCHAR +STARTCHAR 163 +ENCODING 163 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +1C +1C +22 +20 +F0 +F0 +20 +22 +DC +DC +ENDCHAR +STARTCHAR 164 +ENCODING 164 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +D2 +2C +2C +C2 +2C +D2 +D2 +ENDCHAR +STARTCHAR 165 +ENCODING 165 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +C2 +C2 +2C +FE +10 +10 +FE +10 +10 +10 +ENDCHAR +STARTCHAR 166 +ENCODING 166 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 1 10 3 0 +BITMAP +80 +80 +80 +80 +00 +00 +80 +80 +80 +80 +ENDCHAR +STARTCHAR 167 +ENCODING 167 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 11 2 0 +BITMAP +78 +80 +80 +70 +88 +88 +88 +70 +08 +F0 +F0 +ENDCHAR +STARTCHAR 168 +ENCODING 168 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 1 2 10 +BITMAP +B0 +ENDCHAR +STARTCHAR 169 +ENCODING 169 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 8 10 0 0 +BITMAP +3E +3E +C1 +DD +D1 +D1 +DD +C1 +3E +3E +ENDCHAR +STARTCHAR 170 +ENCODING 170 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 6 2 6 +BITMAP +70 +B0 +70 +70 +00 +F0 +ENDCHAR +STARTCHAR 171 +ENCODING 171 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +12 +2C +2C +D0 +2C +12 +12 +ENDCHAR +STARTCHAR 172 +ENCODING 172 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 4 0 2 +BITMAP +FE +FE +02 +02 +ENDCHAR +STARTCHAR 173 +ENCODING 173 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 2 2 4 +BITMAP +F0 +F0 +ENDCHAR +STARTCHAR 174 +ENCODING 174 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 8 10 0 0 +BITMAP +3E +3E +C1 +DD +D1 +D1 +D1 +C1 +3E +3E +ENDCHAR +STARTCHAR 175 +ENCODING 175 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 1 0 10 +BITMAP +FE +ENDCHAR +STARTCHAR 176 +ENCODING 176 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 5 2 7 +BITMAP +70 +88 +88 +88 +70 +ENDCHAR +STARTCHAR 177 +ENCODING 177 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +10 +10 +10 +FE +10 +10 +10 +00 +FE +FE +ENDCHAR +STARTCHAR 178 +ENCODING 178 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 6 2 6 +BITMAP +40 +B0 +30 +30 +40 +F0 +ENDCHAR +STARTCHAR 179 +ENCODING 179 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 6 2 6 +BITMAP +C0 +30 +40 +40 +30 +C0 +ENDCHAR +STARTCHAR 180 +ENCODING 180 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 4 2 7 +BITMAP +30 +40 +40 +80 +ENDCHAR +STARTCHAR 181 +ENCODING 181 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +C2 +C2 +C2 +C2 +CE +F2 +F2 +C0 +C0 +ENDCHAR +STARTCHAR 182 +ENCODING 182 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +3E +F2 +F2 +F2 +F2 +32 +32 +12 +12 +12 +12 +ENDCHAR +STARTCHAR 183 +ENCODING 183 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 3 3 3 4 +BITMAP +E0 +E0 +E0 +ENDCHAR +STARTCHAR 184 +ENCODING 184 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 2 2 -2 +BITMAP +30 +C0 +ENDCHAR +STARTCHAR 185 +ENCODING 185 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 6 2 6 +BITMAP +40 +C0 +40 +40 +40 +F0 +ENDCHAR +STARTCHAR 186 +ENCODING 186 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 7 2 7 +BITMAP +40 +40 +B0 +40 +00 +00 +F0 +ENDCHAR +STARTCHAR 187 +ENCODING 187 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +D0 +2C +2C +12 +2C +D0 +D0 +ENDCHAR +STARTCHAR 188 +ENCODING 188 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +E0 +22 +2C +2C +30 +2C +DC +DC +2C +3E +0C +0C +ENDCHAR +STARTCHAR 189 +ENCODING 189 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +E0 +22 +2C +2C +30 +2C +D2 +D2 +02 +0C +1E +1E +ENDCHAR +STARTCHAR 190 +ENCODING 190 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +E0 +E0 +10 +22 +1C +1C +F0 +2C +DC +DC +2C +3E +0C +0C +ENDCHAR +STARTCHAR 191 +ENCODING 191 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +10 +10 +00 +10 +10 +10 +20 +C2 +3C +3C +ENDCHAR +STARTCHAR 192 +ENCODING 192 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +10 +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 193 +ENCODING 193 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 194 +ENCODING 194 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 195 +ENCODING 195 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +32 +32 +DC +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 196 +ENCODING 196 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +00 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 197 +ENCODING 197 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +10 +3C +3C +C2 +C2 +FE +FE +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 198 +ENCODING 198 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +3E +3E +D0 +D0 +FC +FC +D0 +D0 +DE +DE +ENDCHAR +STARTCHAR 199 +ENCODING 199 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -2 +BITMAP +3C +3C +C2 +C0 +C0 +C0 +C0 +C2 +3C +3C +0C +30 +ENDCHAR +STARTCHAR 200 +ENCODING 200 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +10 +00 +FE +FE +C0 +C0 +FC +FC +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 201 +ENCODING 201 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +FE +FE +C0 +C0 +FC +FC +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 202 +ENCODING 202 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +00 +FE +FE +C0 +C0 +FC +FC +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 203 +ENCODING 203 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +00 +FE +FE +C0 +C0 +FC +FC +C0 +C0 +FE +FE +ENDCHAR +STARTCHAR 204 +ENCODING 204 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 14 2 0 +BITMAP +80 +80 +40 +00 +F0 +F0 +40 +40 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 205 +ENCODING 205 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 14 2 0 +BITMAP +30 +30 +40 +00 +F0 +F0 +40 +40 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 206 +ENCODING 206 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 14 2 0 +BITMAP +40 +40 +B0 +00 +F0 +F0 +40 +40 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 207 +ENCODING 207 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 12 2 0 +BITMAP +B0 +00 +F0 +F0 +40 +40 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 208 +ENCODING 208 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +3C +3C +22 +22 +F2 +F2 +22 +22 +3C +3C +ENDCHAR +STARTCHAR 209 +ENCODING 209 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +32 +32 +DC +00 +C2 +C2 +C2 +E2 +D2 +D2 +CE +C2 +C2 +C2 +ENDCHAR +STARTCHAR 210 +ENCODING 210 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +10 +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 211 +ENCODING 211 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 212 +ENCODING 212 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 213 +ENCODING 213 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +32 +32 +DC +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 214 +ENCODING 214 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +00 +3C +3C +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 215 +ENCODING 215 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 6 0 2 +BITMAP +C2 +2C +10 +10 +2C +C2 +ENDCHAR +STARTCHAR 216 +ENCODING 216 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -1 +BITMAP +02 +3C +3C +CE +D2 +D2 +D2 +D2 +E2 +3C +3C +C0 +ENDCHAR +STARTCHAR 217 +ENCODING 217 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +20 +20 +10 +00 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 218 +ENCODING 218 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 219 +ENCODING 219 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +10 +10 +2C +00 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 220 +ENCODING 220 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +00 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 221 +ENCODING 221 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 14 0 0 +BITMAP +0C +0C +10 +00 +C2 +C2 +C2 +2C +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 222 +ENCODING 222 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 5 10 2 0 +BITMAP +80 +80 +F0 +88 +88 +88 +88 +F0 +80 +80 +ENDCHAR +STARTCHAR 223 +ENCODING 223 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +3C +3C +C2 +CC +D0 +D0 +CC +C2 +DC +DC +ENDCHAR +STARTCHAR 224 +ENCODING 224 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +20 +10 +10 +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 225 +ENCODING 225 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +0C +10 +10 +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 226 +ENCODING 226 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 227 +ENCODING 227 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +32 +DC +DC +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 228 +ENCODING 228 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +2C +2C +00 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 229 +ENCODING 229 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +10 +3C +02 +02 +3E +C2 +3E +3E +ENDCHAR +STARTCHAR 230 +ENCODING 230 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3C +12 +12 +3C +D0 +3E +3E +ENDCHAR +STARTCHAR 231 +ENCODING 231 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 9 0 -2 +BITMAP +3C +C2 +C2 +C0 +C2 +3C +3C +0C +30 +ENDCHAR +STARTCHAR 232 +ENCODING 232 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +20 +10 +10 +00 +3C +C2 +C2 +FC +C0 +3C +3C +ENDCHAR +STARTCHAR 233 +ENCODING 233 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +0C +10 +10 +00 +3C +C2 +C2 +FC +C0 +3C +3C +ENDCHAR +STARTCHAR 234 +ENCODING 234 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +00 +3C +C2 +C2 +FC +C0 +3C +3C +ENDCHAR +STARTCHAR 235 +ENCODING 235 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +2C +2C +00 +3C +C2 +C2 +FC +C0 +3C +3C +ENDCHAR +STARTCHAR 236 +ENCODING 236 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 11 2 0 +BITMAP +80 +40 +40 +00 +C0 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 237 +ENCODING 237 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 11 2 0 +BITMAP +30 +40 +40 +00 +C0 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 238 +ENCODING 238 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 11 2 0 +BITMAP +40 +B0 +B0 +00 +C0 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 239 +ENCODING 239 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 4 10 2 0 +BITMAP +B0 +B0 +00 +C0 +40 +40 +40 +40 +F0 +F0 +ENDCHAR +STARTCHAR 240 +ENCODING 240 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 0 +BITMAP +2C +10 +2C +2C +02 +3E +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 241 +ENCODING 241 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +32 +DC +DC +00 +DC +E2 +E2 +C2 +C2 +C2 +C2 +ENDCHAR +STARTCHAR 242 +ENCODING 242 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +20 +10 +10 +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 243 +ENCODING 243 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +0C +10 +10 +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 244 +ENCODING 244 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 245 +ENCODING 245 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +32 +DC +DC +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 246 +ENCODING 246 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +2C +2C +00 +3C +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 247 +ENCODING 247 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 6 0 2 +BITMAP +10 +00 +FE +FE +00 +10 +ENDCHAR +STARTCHAR 248 +ENCODING 248 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 7 0 0 +BITMAP +3E +CE +CE +D2 +E2 +FC +FC +ENDCHAR +STARTCHAR 249 +ENCODING 249 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +20 +10 +10 +00 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 250 +ENCODING 250 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +0C +10 +10 +00 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 251 +ENCODING 251 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 11 0 0 +BITMAP +10 +2C +2C +00 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 252 +ENCODING 252 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 10 0 0 +BITMAP +2C +2C +00 +C2 +C2 +C2 +C2 +C2 +3C +3C +ENDCHAR +STARTCHAR 253 +ENCODING 253 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 13 0 -2 +BITMAP +0C +10 +10 +00 +C2 +C2 +C2 +C2 +2C +10 +10 +20 +C0 +ENDCHAR +STARTCHAR 254 +ENCODING 254 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -2 +BITMAP +C0 +C0 +C0 +FC +C2 +C2 +C2 +C2 +FC +FC +C0 +C0 +ENDCHAR +STARTCHAR 255 +ENCODING 255 +SWIDTH 576 0 +DWIDTH 8 0 +BBX 7 12 0 -2 +BITMAP +2C +2C +00 +C2 +C2 +C2 +C2 +2C +10 +10 +20 +C0 +ENDCHAR +ENDFONT diff --git a/buildroot/share/fonts/uxggenpages.sh b/buildroot/share/fonts/uxggenpages.sh index a99fd9902463..047d3ae661b9 100755 --- a/buildroot/share/fonts/uxggenpages.sh +++ b/buildroot/share/fonts/uxggenpages.sh @@ -169,7 +169,7 @@ cat <fontutf8-data.h * Contents will be REPLACED by future processing! * Use genallfont.sh to generate font data for updated languages. */ -#include +#include $TMPA #define FONTDATA_ITEM(page, begin, end, data) { page, begin, end, COUNT(data), data } static const uxg_fontinfo_t g_fontinfo[] PROGMEM = {$TMPB}; diff --git a/buildroot/share/git/mfconfig b/buildroot/share/git/mfconfig index 3fd5e399cc56..70642a5d39cb 100755 --- a/buildroot/share/git/mfconfig +++ b/buildroot/share/git/mfconfig @@ -52,7 +52,7 @@ if [[ $ACTION == "manual" ]]; then git checkout $IMPORT || exit # Reset from the latest complete state - #git reset --hard master + #git reset --hard bugfix-2.0.x cp "$MARLINREPO/Marlin/"Configuration*.h "$CDEF/" #git add . && git commit -m "Changes from Marlin ($(date '+%Y-%m-%d %H:%M'))." @@ -83,14 +83,14 @@ if [[ $ACTION == "init" ]]; then TEMP=$( mktemp -d ) ; cp -R config $TEMP # Make sure we're not on the 'BASE' branch... - git checkout master >/dev/null 2>&1 || exit + git checkout init-repo >/dev/null 2>&1 || exit # Create 'BASE' as a copy of 'init-repo' (README, LICENSE, etc.) git branch -D BASE 2>/dev/null git checkout init-repo -b BASE || exit # Copy all config files into place - echo "- Copying configs from Marlin..." + echo "- Copying all configs from fresh $IMPORT..." cp -R "$TEMP/config" . # Delete anything that's not a Configuration file @@ -99,8 +99,8 @@ if [[ $ACTION == "init" ]]; then # DEBUG: Commit the original config files for comparison ((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Commit for comparison" >/dev/null - # Init Cartesian configurations to default - echo "- Initializing configs to default state..." + # Init Cartesian/SCARA/TPARA configurations to default + echo "- Initializing Cartesian/SCARA/TPARA configs to default state..." find "$CEXA" -name $BC ! -path */delta/* -print0 \ | while read -d $'\0' F ; do cp "$CDEF/$BC" "$F" ; done @@ -108,7 +108,7 @@ if [[ $ACTION == "init" ]]; then | while read -d $'\0' F ; do cp "$CDEF/$AC" "$F" ; done # DEBUG: Commit the reset for review - ((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset Cartesian/SCARA configs..." >/dev/null + ((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset Cartesian/SCARA/TPARA configs..." >/dev/null # Create base Delta configurations cp "$CDEF"/* "$CEXA/delta/generic" @@ -121,25 +121,35 @@ if [[ $ACTION == "init" ]]; then # DEBUG: Commit Generic Delta changes for review ((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Apply Generic Delta..." >/dev/null + # Reset all Delta configs to the generic version find "$CEXA/delta" -name $BC ! -path */generic/* -print0 \ | while read -d $'\0' F ; do cp "$CEXA/delta/generic/$BC" "$F" ; done find "$CEXA/delta" -name $AC ! -path */generic/* -print0 \ | while read -d $'\0' F ; do cp "$CEXA/delta/generic/$AC" "$F" ; done - # DEBUG: Commit the reset for review + # DEBUG: Commit the Delta reset for review ((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset Delta configs..." >/dev/null - # SCARA configurations + # Reset all SCARA configs to the default cartesian find "$CEXA/SCARA" -name $BC \ | while read -d $'\0' F ; do cp "$CDEF/$BC" "$F" ; done find "$CEXA/SCARA" -name $AC \ | while read -d $'\0' F ; do cp "$CDEF/$AC" "$F" ; done - # DEBUG: Commit the reset for review or... + # DEBUG: Commit the SCARA reset for review ((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset SCARA..." >/dev/null + # Reset all TPARA configs to the default cartesian + find "$CEXA/TPARA" -name $BC \ + | while read -d $'\0' F ; do cp "$CDEF/$BC" "$F" ; done + find "$CEXA/TPARA" -name $AC \ + | while read -d $'\0' F ; do cp "$CDEF/$AC" "$F" ; done + + # DEBUG: Commit the TPARA reset for review + ((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset TPARA..." >/dev/null + # Update the %VERSION% in the README.md file - SED=$(which gsed || which sed) + SED=$(which gsed sed | head -n1) VERS=$( echo $EXPORT | $SED 's/release-//' ) eval "${SED} -E -i~ -e 's/%VERSION%/$VERS/g' README.md" rm -f README.md~ diff --git a/buildroot/share/git/mfqp b/buildroot/share/git/mfqp index 5650d08252a2..f0c4446a211e 100755 --- a/buildroot/share/git/mfqp +++ b/buildroot/share/git/mfqp @@ -4,7 +4,7 @@ # # - git add . # - git commit --amend -# - ghpc +# - git push -f # MFINFO=$(mfinfo "$@") || exit 1 @@ -17,6 +17,7 @@ IND=6 while [ $IND -lt ${#INFO[@]} ]; do ARG=${INFO[$IND]} case "$ARG" in + -f|--force ) FORCE=1 ;; -h|--help ) USAGE=1 ;; * ) USAGE=1 ; echo "unknown option: $ARG" ;; esac @@ -25,6 +26,6 @@ done [[ $USAGE == 1 ]] && { echo "usage: `basename $0` [1|2|3]" 1>&2 ; exit 1 ; } -[[ $CURR == $TARG && $REPO != "MarlinDocumentation" ]] && { echo "Don't alter the PR Target branch."; exit 1 ; } +[[ $FORCE != 1 && $CURR == $TARG && $REPO != "MarlinDocumentation" ]] && { echo "Don't alter the PR Target branch."; exit 1 ; } git add . && git commit --amend && git push -f diff --git a/buildroot/share/scripts/config-labels.py b/buildroot/share/scripts/config-labels.py index 267aa2d27353..700604e45284 100755 --- a/buildroot/share/scripts/config-labels.py +++ b/buildroot/share/scripts/config-labels.py @@ -22,8 +22,7 @@ # 2020-06-05 SRL style tweaks #----------------------------------- # -import sys -import os +import sys,os from pathlib import Path from distutils.dir_util import copy_tree # for copy_tree, because shutil.copytree can't handle existing files, dirs diff --git a/buildroot/share/scripts/createTemperatureLookupMarlin.py b/buildroot/share/scripts/createTemperatureLookupMarlin.py index b2d8964f556c..02981f1015aa 100755 --- a/buildroot/share/scripts/createTemperatureLookupMarlin.py +++ b/buildroot/share/scripts/createTemperatureLookupMarlin.py @@ -22,8 +22,7 @@ from __future__ import division from math import * -import sys -import getopt +import sys,getopt "Constants" ZERO = 273.15 # zero point of Kelvin scale @@ -74,7 +73,7 @@ def resist(self, adc): return r def temp(self, adc): - "Convert ADC reading into a temperature in Celcius" + "Convert ADC reading into a temperature in Celsius" l = log(self.resist(adc)) Tinv = self.c1 + self.c2*l + self.c3* l**3 # inverse temperature return (1/Tinv) - ZERO # temperature diff --git a/buildroot/share/scripts/findMissingTranslations.sh b/buildroot/share/scripts/findMissingTranslations.sh index 0cf77366d2c0..24a2a910a21c 100755 --- a/buildroot/share/scripts/findMissingTranslations.sh +++ b/buildroot/share/scripts/findMissingTranslations.sh @@ -13,37 +13,35 @@ LANGHOME="Marlin/src/lcd/language" [ -d $LANGHOME ] && cd $LANGHOME -FILES=$(ls language_*.h | grep -v -E "(_en|_test)\.h" | sed -E 's/language_([^\.]+)\.h/\1/') -declare -A STRING_MAP +FILES=$(ls language_*.h | grep -v -E "(_en|_test)\.h" | sed -E 's/language_([^\.]+)\.h/\1/' | tr '\n' ' ') # Get files matching the given arguments -TEST_LANGS=$FILES +TEST_LANGS="" if [[ -n $@ ]]; then - TEST_LANGS="" for K in "$@"; do for F in $FILES; do - [[ "$F" != "${F%$K*}" ]] && TEST_LANGS="$TEST_LANGS $F" + [[ "$F" != "${F%$K*}" ]] && TEST_LANGS+="$F " done done + [[ -z $TEST_LANGS ]] && { echo "No languages matching $@." ; exit 0 ; } +else + TEST_LANGS=$FILES fi -echo -n "Building list of missing strings..." +echo "Missing strings for $TEST_LANGS..." -for i in $(awk '/Language_Str/{print $3}' language_en.h); do - [[ $i == "MSG_CUBED" ]] && continue +for WORD in $(awk '/LSTR/{print $2}' language_en.h); do + [[ $WORD == "MSG_MARLIN" ]] && break LANG_LIST="" - for j in $TEST_LANGS; do - [[ $(grep -c " ${i} " language_${j}.h) -eq 0 ]] && LANG_LIST="$LANG_LIST $j" + for LANG in $TEST_LANGS; do + if [[ $(grep -c -E "^ *LSTR +$WORD\b" language_${LANG}.h) -eq 0 ]]; then + INHERIT=$(awk '/using namespace/{print $3}' language_${LANG}.h | sed -E 's/Language_([a-zA-Z_]+)\s*;/\1/') + if [[ -z $INHERIT || $INHERIT == "en" ]]; then + LANG_LIST+=" $LANG" + elif [[ $(grep -c -E "^ *LSTR +$WORD\b" language_${INHERIT}.h) -eq 0 ]]; then + LANG_LIST+=" $LANG" + fi + fi done - [[ -z $LANG_LIST ]] && continue - STRING_MAP[$i]=$LANG_LIST -done - -echo - -for K in $( printf "%s\n" "${!STRING_MAP[@]}" | sort ); do - case "$#" in - 1 ) echo $K ;; - * ) printf "%-35s :%s\n" "$K" "${STRING_MAP[$K]}" ;; - esac + [[ -n $LANG_LIST ]] && printf "%-38s :%s\n" "$WORD" "$LANG_LIST" done diff --git a/buildroot/share/scripts/g29_auto.py b/buildroot/share/scripts/g29_auto.py index ffcb0d9f316c..ca36346dd9dd 100755 --- a/buildroot/share/scripts/g29_auto.py +++ b/buildroot/share/scripts/g29_auto.py @@ -119,7 +119,7 @@ def z_parse(gcode, start_at_line=0, end_at_line=0): # last_z = z last_i = i if 0 < end_at_line <= i or temp_line >= min_g1: - # print('break at line {} at heigth {}'.format(i, z)) + # print('break at line {} at height {}'.format(i, z)) break line_between_z = line_between_z[1:] diff --git a/buildroot/share/scripts/gen-tft-image.py b/buildroot/share/scripts/gen-tft-image.py new file mode 100644 index 000000000000..d89245fea41d --- /dev/null +++ b/buildroot/share/scripts/gen-tft-image.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +# +# Marlin 3D Printer Firmware +# Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] +# +# Based on Sprinter and grbl. +# Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +# Generate Marlin TFT Images from bitmaps/PNG/JPG + +import sys,re,struct +from PIL import Image,ImageDraw + +def image2bin(image, output_file): + if output_file.endswith(('.c', '.cpp')): + f = open(output_file, 'wt') + is_cpp = True + f.write("const uint16_t image[%d] = {\n" % (image.size[1] * image.size[0])) + else: + f = open(output_file, 'wb') + is_cpp = False + pixs = image.load() + for y in range(image.size[1]): + for x in range(image.size[0]): + R = pixs[x, y][0] >> 3 + G = pixs[x, y][1] >> 2 + B = pixs[x, y][2] >> 3 + rgb = (R << 11) | (G << 5) | B + if is_cpp: + strHex = '0x{0:04X}, '.format(rgb) + f.write(strHex) + else: + f.write(struct.pack("B", (rgb & 0xFF))) + f.write(struct.pack("B", (rgb >> 8) & 0xFF)) + if is_cpp: + f.write("\n") + if is_cpp: + f.write("};\n") + f.close() + +if len(sys.argv) <= 2: + print("Utility to export a image in Marlin TFT friendly format.") + print("It will dump a raw bin RGB565 image or create a CPP file with an array of 16 bit image pixels.") + print("Usage: gen-tft-image.py INPUT_IMAGE.(png|bmp|jpg) OUTPUT_FILE.(cpp|bin)") + print("Author: rhapsodyv") + exit(1) + +output_img = sys.argv[2] +img = Image.open(sys.argv[1]) +image2bin(img, output_img) diff --git a/buildroot/share/vscode/auto_build.py b/buildroot/share/vscode/auto_build.py index 5dd2d0d8a3fc..ac8432729f0a 100644 --- a/buildroot/share/vscode/auto_build.py +++ b/buildroot/share/vscode/auto_build.py @@ -72,13 +72,12 @@ from __future__ import print_function from __future__ import division -import sys -import os +import sys,os pwd = os.getcwd() # make sure we're executing from the correct directory level pwd = pwd.replace('\\', '/') -if 0 <= pwd.find('buildroot/share/atom'): - pwd = pwd[:pwd.find('buildroot/share/atom')] +if 0 <= pwd.find('buildroot/share/vscode'): + pwd = pwd[:pwd.find('buildroot/share/vscode')] os.chdir(pwd) print('pwd: ', pwd) diff --git a/buildroot/share/vscode/create_custom_upload_command_CDC.py b/buildroot/share/vscode/create_custom_upload_command_CDC.py index acfd1787fb24..4662dd26cb49 100644 --- a/buildroot/share/vscode/create_custom_upload_command_CDC.py +++ b/buildroot/share/vscode/create_custom_upload_command_CDC.py @@ -13,11 +13,9 @@ from __future__ import print_function from __future__ import division -import subprocess -import os -import sys +import subprocess,os,sys,platform from SCons.Script import DefaultEnvironment -import platform + current_OS = platform.system() env = DefaultEnvironment() @@ -92,9 +90,9 @@ def get_com_port(com_search_text, descr_search_text, start): get_com_port('COM', 'Hardware ID:', 13) # avrdude_conf_path = env.get("PIOHOME_DIR") + '\\packages\\toolchain-atmelavr\\etc\\avrdude.conf' - avrdude_conf_path = 'buildroot\\share\\atom\\avrdude.conf' + avrdude_conf_path = 'buildroot\\share\\vscode\\avrdude.conf' - avrdude_exe_path = 'buildroot\\share\\atom\\avrdude_5.10.exe' + avrdude_exe_path = 'buildroot\\share\\vscode\\avrdude_5.10.exe' # source_path = env.get("PROJECTBUILD_DIR") + '\\' + env.get("PIOENV") + '\\firmware.hex' source_path = '.pio\\build\\' + env.get("PIOENV") + '\\firmware.hex' diff --git a/buildroot/share/vscode/create_custom_upload_command_DFU.py b/buildroot/share/vscode/create_custom_upload_command_DFU.py index 9082699bf459..562e284e63c2 100644 --- a/buildroot/share/vscode/create_custom_upload_command_DFU.py +++ b/buildroot/share/vscode/create_custom_upload_command_DFU.py @@ -9,8 +9,7 @@ # Will continue on if a COM port isn't found so that the compilation can be done. # -import os -import sys +import os,sys from SCons.Script import DefaultEnvironment import platform current_OS = platform.system() diff --git a/buildroot/tests/ARMED-tests b/buildroot/tests/ARMED similarity index 75% rename from buildroot/tests/ARMED-tests rename to buildroot/tests/ARMED index 6aa1308ca41c..7b9fef1eeb49 100755 --- a/buildroot/tests/ARMED-tests +++ b/buildroot/tests/ARMED @@ -11,8 +11,8 @@ set -e # restore_configs use_example_configs ArmEd -opt_set X_DRIVER_TYPE TMC2130 -opt_set Y_DRIVER_TYPE TMC2208 +opt_set X_DRIVER_TYPE TMC2130 Y_DRIVER_TYPE TMC2208 +opt_enable LASER_SYNCHRONOUS_M106_M107 exec_test $1 $2 "ArmEd Example Configuration with mixed TMC Drivers" "$3" # clean up diff --git a/buildroot/tests/BIGTREE_BTT002 b/buildroot/tests/BIGTREE_BTT002 new file mode 100755 index 000000000000..7288c5ef5260 --- /dev/null +++ b/buildroot/tests/BIGTREE_BTT002 @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F407VGT6 BigTreeTech BTT002 V1.0 +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BTT_BTT002_V1_0 \ + SERIAL_PORT 1 \ + X_DRIVER_TYPE TMC2209 \ + Y_DRIVER_TYPE TMC2130 +exec_test $1 $2 "BigTreeTech BTT002 Default Configuration plus TMC steppers" "$3" + +# +# A test with Probe Temperature Compensation enabled +# +use_example_configs Prusa/MK3S-BigTreeTech-BTT002 +exec_test $1 $2 "BigTreeTech BTT002 with Prusa MK3S and related options" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/BIGTREE_BTT002-tests b/buildroot/tests/BIGTREE_BTT002-tests deleted file mode 100755 index 90e033e96958..000000000000 --- a/buildroot/tests/BIGTREE_BTT002-tests +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -# -# Build tests for STM32F407VGT6 BigTreeTech BTT002 V1.0 -# - -# exit on first failure -set -e - -# -# Build with the default configurations -# -restore_configs -opt_set MOTHERBOARD BOARD_BTT_BTT002_V1_0 -opt_set SERIAL_PORT 1 -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2130 -exec_test $1 $2 "BigTreeTech BTT002 Default Configuration plus TMC steppers" "$3" - -# clean up -restore_configs diff --git a/buildroot/tests/BIGTREE_GTR_V1_0 b/buildroot/tests/BIGTREE_GTR_V1_0 new file mode 100755 index 000000000000..0a80a6b78c70 --- /dev/null +++ b/buildroot/tests/BIGTREE_GTR_V1_0 @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# +# Build tests for BigTreeTech GTR 1.0 +# + +# exit on first failure +set -e + +restore_configs +opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \ + EXTRUDERS 8 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 TEMP_SENSOR_5 1 TEMP_SENSOR_6 1 TEMP_SENSOR_7 1 +# Not necessary to enable auto-fan for all extruders to hit problematic code paths +opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_PIN PF13 \ + X_DRIVER_TYPE TMC2208 Y_DRIVER_TYPE TMC2130 \ + NUM_RUNOUT_SENSORS 8 FIL_RUNOUT_PIN 3 FIL_RUNOUT2_PIN 4 FIL_RUNOUT3_PIN 5 FIL_RUNOUT4_PIN 6 FIL_RUNOUT5_PIN 7 \ + FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH \ + FILAMENT_RUNOUT_SCRIPT '"M600 T%c"' +opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH NEOPIXEL_LED Z_SAFE_HOMING NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE \ + FILAMENT_RUNOUT_SENSOR FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP FILAMENT_CHANGE_RESUME_ON_INSERT PAUSE_REHEAT_FAST_RESUME +exec_test $1 $2 "BigTreeTech GTR | 8 Extruders | Auto-Fan | Mixed TMC Drivers | Runout Sensors w/ distinct states" "$3" + +restore_configs +opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \ + EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \ + NUM_Z_STEPPER_DRIVERS 4 \ + DEFAULT_Kp_LIST '{ 22.2, 20.0, 21.0, 19.0, 18.0 }' DEFAULT_Ki_LIST '{ 1.08 }' DEFAULT_Kd_LIST '{ 114.0, 112.0, 110.0, 108.0 }' +opt_enable TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_MIGRATION_FEATURE TOOLCHANGE_FS_INIT_BEFORE_SWAP TOOLCHANGE_FS_PRIME_FIRST_USED \ + PID_PARAMS_PER_HOTEND Z_MULTI_ENDSTOPS +exec_test $1 $2 "BigTreeTech GTR | 6 Extruders | Quad Z + Endstops" "$3" + +restore_configs +opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \ + EXTRUDERS 3 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 \ + SERVO_DELAY '{ 300, 300, 300 }' +opt_enable SWITCHING_TOOLHEAD TOOL_SENSOR +exec_test $1 $2 "BigTreeTech GTR | Switching Toolhead | Tool Sensors" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/BIGTREE_GTR_V1_0-tests b/buildroot/tests/BIGTREE_GTR_V1_0-tests deleted file mode 100755 index adc850db03b3..000000000000 --- a/buildroot/tests/BIGTREE_GTR_V1_0-tests +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash -# -# Build tests for BigTreeTech GTR 1.0 -# - -# exit on first failure -set -e - -restore_configs -opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 -opt_set SERIAL_PORT -1 -opt_set EXTRUDERS 8 -opt_set TEMP_SENSOR_1 1 -opt_set TEMP_SENSOR_2 1 -opt_set TEMP_SENSOR_3 1 -opt_set TEMP_SENSOR_4 1 -opt_set TEMP_SENSOR_5 1 -opt_set TEMP_SENSOR_6 1 -opt_set TEMP_SENSOR_7 1 -# Not necessary to enable auto-fan for all extruders to hit problematic code paths -opt_set E0_AUTO_FAN_PIN PC10 -opt_set E1_AUTO_FAN_PIN PC11 -opt_set E2_AUTO_FAN_PIN PC12 -opt_set X_DRIVER_TYPE TMC2208 -opt_set Y_DRIVER_TYPE TMC2130 -opt_set NEOPIXEL_PIN PF13 -opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH NEOPIXEL_LED Z_SAFE_HOMING -opt_enable FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE -opt_set FIL_RUNOUT_PIN 3 -opt_set FIL_RUNOUT2_PIN 4 -opt_set FIL_RUNOUT3_PIN 5 -opt_set FIL_RUNOUT4_PIN 6 -opt_set FIL_RUNOUT5_PIN 7 -opt_set FIL_RUNOUT6_PIN 8 -opt_set FIL_RUNOUT7_PIN 9 -opt_set FIL_RUNOUT8_PIN 10 -opt_set FIL_RUNOUT4_STATE HIGH -opt_enable FIL_RUNOUT4_PULLUP -opt_set FIL_RUNOUT8_STATE HIGH -opt_enable FIL_RUNOUT8_PULLUP -exec_test $1 $2 "BigTreeTech GTR 8 Extruders with Auto-Fan, Mixed TMC Drivers, and Runout Sensors with distinct states" "$3" - -restore_configs -opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 -opt_set SERIAL_PORT -1 -opt_set EXTRUDERS 6 -opt_set TEMP_SENSOR_1 1 -opt_set TEMP_SENSOR_2 1 -opt_set TEMP_SENSOR_3 1 -opt_set TEMP_SENSOR_4 1 -opt_set TEMP_SENSOR_5 1 -opt_set NUM_Z_STEPPER_DRIVERS 3 -opt_set DEFAULT_Kp_LIST "{ 22.2, 20.0, 21.0, 19.0, 18.0, 17.0 }" -opt_set DEFAULT_Ki_LIST "{ 1.08 }" -opt_set DEFAULT_Kd_LIST "{ 114.0, 112.0, 110.0, 108.0 }" -opt_enable TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_MIGRATION_FEATURE TOOLCHANGE_FS_INIT_BEFORE_SWAP TOOLCHANGE_FS_PRIME_FIRST_USED PID_PARAMS_PER_HOTEND -exec_test $1 $2 "BigTreeTech GTR 6 Extruders Triple Z" "$3" - -# clean up -restore_configs diff --git a/buildroot/tests/BIGTREE_GTR_V1_0_usb_flash_drive b/buildroot/tests/BIGTREE_GTR_V1_0_usb_flash_drive new file mode 100755 index 000000000000..197ece5dfd66 --- /dev/null +++ b/buildroot/tests/BIGTREE_GTR_V1_0_usb_flash_drive @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# +# Build tests for BigTreeTech GTR 1.0 +# + +# exit on first failure +set -e + +restore_configs +opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT 3 \ + EXTRUDERS 8 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 TEMP_SENSOR_5 1 TEMP_SENSOR_6 1 TEMP_SENSOR_7 1 +opt_enable SDSUPPORT USB_FLASH_DRIVE_SUPPORT USE_OTG_USB_HOST \ + REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER BLTOUCH NEOPIXEL_LED Z_SAFE_HOMING \ + FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE +# Not necessary to enable auto-fan for all extruders to hit problematic code paths +opt_set E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 NEOPIXEL_PIN PF13 \ + X_DRIVER_TYPE TMC2208 Y_DRIVER_TYPE TMC2130 \ + FIL_RUNOUT_PIN 3 FIL_RUNOUT2_PIN 4 FIL_RUNOUT3_PIN 5 FIL_RUNOUT4_PIN 6 FIL_RUNOUT5_PIN 7 FIL_RUNOUT6_PIN 8 FIL_RUNOUT7_PIN 9 FIL_RUNOUT8_PIN 10 \ + FIL_RUNOUT4_STATE HIGH FIL_RUNOUT8_STATE HIGH +opt_enable FIL_RUNOUT4_PULLUP FIL_RUNOUT8_PULLUP +exec_test $1 $2 "GTT GTR | OTG USB Flash Drive | 8 Extruders | Auto-Fan | Mixed TMC Drivers | Runout Sensors (distinct)" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/BIGTREE_SKR_PRO b/buildroot/tests/BIGTREE_SKR_PRO new file mode 100755 index 000000000000..2503b28544ad --- /dev/null +++ b/buildroot/tests/BIGTREE_SKR_PRO @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F407ZG BigTreeTech SKR Pro +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 SERIAL_PORT 1 +exec_test $1 $2 "BigTreeTech SKR Pro | Default Configuration" "$3" + +restore_configs +opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 SERIAL_PORT -1 \ + EXTRUDERS 3 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 \ + E0_AUTO_FAN_PIN PC10 E1_AUTO_FAN_PIN PC11 E2_AUTO_FAN_PIN PC12 \ + X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2130 +opt_enable BLTOUCH EEPROM_SETTINGS AUTO_BED_LEVELING_3POINT Z_SAFE_HOMING PINS_DEBUGGING +exec_test $1 $2 "BigTreeTech SKR Pro | 3 Extruders | Auto-Fan | BLTOUCH | Mixed TMC" "$3" + +restore_configs +opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 SERIAL_PORT -1 \ + CUTTER_POWER_UNIT PERCENT \ + SPINDLE_LASER_PWM_PIN HEATER_1_PIN SPINDLE_LASER_ENA_PIN HEATER_2_PIN \ + TEMP_SENSOR_COOLER 1000 TEMP_COOLER_PIN PD13 +opt_enable LASER_FEATURE REPRAP_DISCOUNT_SMART_CONTROLLER +exec_test $1 $2 "BigTreeTech SKR Pro | Laser (Percent) | Cooling | LCD" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/BIGTREE_SKR_PRO-tests b/buildroot/tests/BIGTREE_SKR_PRO-tests deleted file mode 100755 index 8dc433deb27b..000000000000 --- a/buildroot/tests/BIGTREE_SKR_PRO-tests +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# -# Build tests for STM32F407ZG BigTreeTech SKR Pro -# - -# exit on first failure -set -e - -# -# Build with the default configurations -# -restore_configs -opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 -opt_set SERIAL_PORT 1 -exec_test $1 $2 "BigTreeTech SKR Pro Default Configuration" "$3" - -restore_configs -opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 -opt_set SERIAL_PORT -1 -opt_set EXTRUDERS 3 -opt_set TEMP_SENSOR_1 1 -opt_set TEMP_SENSOR_2 1 -opt_set E0_AUTO_FAN_PIN PC10 -opt_set E1_AUTO_FAN_PIN PC11 -opt_set E2_AUTO_FAN_PIN PC12 -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2130 -opt_enable BLTOUCH EEPROM_SETTINGS AUTO_BED_LEVELING_3POINT Z_SAFE_HOMING PINS_DEBUGGING -exec_test $1 $2 "BigTreeTech SKR Pro 3 Extruders, Auto-Fan, BLTOUCH, mixed TMC drivers" "$3" - -restore_configs -opt_set MOTHERBOARD BOARD_BTT_SKR_PRO_V1_1 -opt_set SERIAL_PORT -1 -opt_enable LASER_FEATURE REPRAP_DISCOUNT_SMART_CONTROLLER -opt_set CUTTER_POWER_UNIT PERCENT -opt_add SPINDLE_LASER_PWM_PIN HEATER_1_PIN -opt_add SPINDLE_LASER_ENA_PIN HEATER_2_PIN -exec_test $1 $2 "Laser, LCD, PERCENT power unit" "$3" - -# clean up -restore_configs diff --git a/buildroot/tests/BTT_SKR_SE_BX b/buildroot/tests/BTT_SKR_SE_BX new file mode 100755 index 000000000000..b5d6f6de8398 --- /dev/null +++ b/buildroot/tests/BTT_SKR_SE_BX @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Build tests for BTT_SKR_SE_BX +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BTT_SKR_SE_BX +opt_set SERIAL_PORT 1 +exec_test $1 $2 "Default Configuration" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/DUE-tests b/buildroot/tests/DUE similarity index 67% rename from buildroot/tests/DUE-tests rename to buildroot/tests/DUE index d4c49a3185bc..37678501e431 100755 --- a/buildroot/tests/DUE-tests +++ b/buildroot/tests/DUE @@ -7,55 +7,45 @@ set -e restore_configs -opt_set LCD_LANGUAGE bg -opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB -opt_set TEMP_SENSOR_0 -2 -opt_set TEMP_SENSOR_BED 2 -opt_set GRID_MAX_POINTS_X 16 -opt_set FANMUX0_PIN 53 +opt_set MOTHERBOARD BOARD_RAMPS4DUE_EFB \ + LCD_LANGUAGE bg \ + TEMP_SENSOR_0 -2 TEMP_SENSOR_BED 2 \ + GRID_MAX_POINTS_X 16 \ + E0_AUTO_FAN_PIN 8 FANMUX0_PIN 53 EXTRUDER_AUTO_FAN_SPEED 100 \ + TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 6 HEATER_CHAMBER_PIN 45 opt_enable S_CURVE_ACCELERATION EEPROM_SETTINGS GCODE_MACROS \ FIX_MOUNTED_PROBE Z_SAFE_HOMING CODEPENDENT_XY_HOMING \ - ASSISTED_TRAMMING ASSISTED_TRAMMING_WIZARD REPORT_TRAMMING_MM ASSISTED_TRAMMING_WAIT_POSITION \ + ASSISTED_TRAMMING REPORT_TRAMMING_MM ASSISTED_TRAMMING_WAIT_POSITION \ EEPROM_SETTINGS SDSUPPORT BINARY_FILE_TRANSFER \ BLINKM PCA9533 PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \ - NEOPIXEL_LED CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \ + NEOPIXEL_LED NEOPIXEL_PIN CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_USE_RGB_LED CASE_LIGHT_MENU \ NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE FILAMENT_RUNOUT_DISTANCE_MM FILAMENT_RUNOUT_SENSOR \ AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE CALIBRATION_GCODE \ BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \ FWRETRACT ARC_SUPPORT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \ - PSU_CONTROL AUTO_POWER_CONTROL \ + PSU_CONTROL AUTO_POWER_CONTROL E_DUAL_STEPPER_DRIVERS \ PIDTEMPBED SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER \ PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL \ EXTENSIBLE_UI -opt_add EXTUI_EXAMPLE -opt_set E0_AUTO_FAN_PIN 8 -opt_set EXTRUDER_AUTO_FAN_SPEED 100 -opt_set TEMP_SENSOR_CHAMBER 3 -opt_add TEMP_CHAMBER_PIN 6 -opt_set HEATER_CHAMBER_PIN 45 +opt_add EXTUI_EXAMPLE exec_test $1 $2 "RAMPS4DUE_EFB with ABL (Bilinear), ExtUI, S-Curve, many options." "$3" # # RADDS with BLTouch, ABL(B), 3 x Z auto-align # restore_configs -opt_set MOTHERBOARD BOARD_RADDS +opt_set MOTHERBOARD BOARD_RADDS NUM_Z_STEPPER_DRIVERS 3 opt_enable USE_XMAX_PLUG USE_YMAX_PLUG ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \ Z_STEPPER_AUTO_ALIGN Z_STEPPER_ALIGN_KNOWN_STEPPER_POSITIONS Z_SAFE_HOMING - #TOUCH_UI_FTDI_EVE LCD_ALEPHOBJECTS_CLCD_UI OTHER_PIN_LAYOUT -opt_set NUM_Z_STEPPER_DRIVERS 3 pins_set ramps/RAMPS X_MAX_PIN -1 pins_set ramps/RAMPS Y_MAX_PIN -1 -exec_test $1 $2 "RADDS with ABL (Bilinear), Triple Z Axis, Z_STEPPER_AUTO_ALIGN" "$3" +exec_test $1 $2 "RADDS with ABL (Bilinear), Triple Z Axis, Z_STEPPER_AUTO_ALIGN, E_DUAL_STEPPER_DRIVERS" "$3" # # Test SWITCHING_EXTRUDER # restore_configs -opt_set LCD_LANGUAGE fi -opt_set MOTHERBOARD BOARD_RAMPS4DUE_EEF -opt_set EXTRUDERS 2 -opt_set NUM_SERVOS 1 +opt_set MOTHERBOARD BOARD_RAMPS4DUE_EEF LCD_LANGUAGE fi EXTRUDERS 2 NUM_SERVOS 1 opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER BEEP_ON_FEEDRATE_CHANGE POWER_LOSS_RECOVERY exec_test $1 $2 "RAMPS4DUE_EEF with SWITCHING_EXTRUDER, POWER_LOSS_RECOVERY" "$3" diff --git a/buildroot/tests/DUE_archim-tests b/buildroot/tests/DUE_archim similarity index 100% rename from buildroot/tests/DUE_archim-tests rename to buildroot/tests/DUE_archim diff --git a/buildroot/tests/FLYF407ZG-tests b/buildroot/tests/FLYF407ZG similarity index 64% rename from buildroot/tests/FLYF407ZG-tests rename to buildroot/tests/FLYF407ZG index 2c915eb48b39..22dd3488c8e1 100755 --- a/buildroot/tests/FLYF407ZG-tests +++ b/buildroot/tests/FLYF407ZG @@ -8,10 +8,7 @@ set -e # Build examples restore_configs -opt_set MOTHERBOARD BOARD_FLYF407ZG -opt_set SERIAL_PORT -1 -opt_set X_DRIVER_TYPE TMC2208 -opt_set Y_DRIVER_TYPE TMC2130 +opt_set MOTHERBOARD BOARD_FLYF407ZG SERIAL_PORT -1 X_DRIVER_TYPE TMC2208 Y_DRIVER_TYPE TMC2130 exec_test $1 $2 "FLYF407ZG Default Config with mixed TMC Drivers" "$3" # cleanup diff --git a/buildroot/tests/FYSETC_F6-tests b/buildroot/tests/FYSETC_F6 similarity index 64% rename from buildroot/tests/FYSETC_F6-tests rename to buildroot/tests/FYSETC_F6 index e1eb6684a539..9306686af5ce 100755 --- a/buildroot/tests/FYSETC_F6-tests +++ b/buildroot/tests/FYSETC_F6 @@ -18,34 +18,24 @@ exec_test $1 $2 "FYSETC F6 1.3 with DGUS" "$3" # Delta Config (generic) + UBL + ALLEN_KEY + EEPROM_SETTINGS + OLED_PANEL_TINYBOY2 # use_example_configs delta/generic -opt_set MOTHERBOARD BOARD_FYSETC_F6_13 +opt_set MOTHERBOARD BOARD_FYSETC_F6_13 \ + LCD_LANGUAGE ko_KR \ + X_DRIVER_TYPE L6470 Y_DRIVER_TYPE L6470 Z_DRIVER_TYPE L6470 \ + L6470_CHAIN_SCK_PIN 53 L6470_CHAIN_MISO_PIN 49 L6470_CHAIN_MOSI_PIN 40 L6470_CHAIN_SS_PIN 42 \ + 'ENABLE_RESET_L64XX_CHIPS(V)' NOOP opt_enable RESTORE_LEVELING_AFTER_G28 EEPROM_SETTINGS EEPROM_CHITCHAT \ - Z_PROBE_ALLEN_KEY AUTO_BED_LEVELING_UBL \ + Z_PROBE_ALLEN_KEY AUTO_BED_LEVELING_UBL UBL_MESH_WIZARD \ OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY DELTA_CALIBRATION_MENU -opt_set LCD_LANGUAGE ko_KR -opt_set X_DRIVER_TYPE L6470 -opt_set Y_DRIVER_TYPE L6470 -opt_set Z_DRIVER_TYPE L6470 -opt_add L6470_CHAIN_SCK_PIN 53 -opt_add L6470_CHAIN_MISO_PIN 49 -opt_add L6470_CHAIN_MOSI_PIN 40 -opt_add L6470_CHAIN_SS_PIN 42 -opt_add "ENABLE_RESET_L64XX_CHIPS(V) NOOP" exec_test $1 $2 "DELTA, RAMPS, L6470, UBL, Allen Key, EEPROM, OLED_PANEL_TINYBOY2..." "$3" # # Test mixed TMC config # restore_configs -opt_set MOTHERBOARD BOARD_FYSETC_F6_13 -opt_set LCD_LANGUAGE vi -opt_set LCD_LANGUAGE_2 fr -opt_set X_DRIVER_TYPE TMC2160 -opt_set Y_DRIVER_TYPE TMC5160 -opt_set Z_DRIVER_TYPE TMC2208_STANDALONE -opt_set E0_DRIVER_TYPE TMC2130 -opt_set X_MIN_ENDSTOP_INVERTING true -opt_set Y_MIN_ENDSTOP_INVERTING true +opt_set MOTHERBOARD BOARD_FYSETC_F6_13 \ + LCD_LANGUAGE vi LCD_LANGUAGE_2 fr \ + X_DRIVER_TYPE TMC2160 Y_DRIVER_TYPE TMC5160 Z_DRIVER_TYPE TMC2208_STANDALONE E0_DRIVER_TYPE TMC2130 \ + X_MIN_ENDSTOP_INVERTING true Y_MIN_ENDSTOP_INVERTING true opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER \ MARLIN_BRICKOUT MARLIN_INVADERS MARLIN_SNAKE \ MONITOR_DRIVER_STATUS STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD \ @@ -63,17 +53,14 @@ exec_test $1 $2 "RAMPS 1.3 | DELTA | FLSUN AC Config" "$3" # SCARA with Mixed TMC # use_example_configs SCARA/Morgan -opt_set MOTHERBOARD BOARD_FYSETC_F6_13 -opt_set LCD_LANGUAGE es +opt_set MOTHERBOARD BOARD_FYSETC_F6_13 \ + LCD_LANGUAGE es \ + X_MAX_ENDSTOP_INVERTING false \ + X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2130 Z_DRIVER_TYPE TMC2130_STANDALONE E0_DRIVER_TYPE TMC2660 \ + X_HARDWARE_SERIAL Serial2 opt_enable USE_ZMIN_PLUG FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR PAUSE_BEFORE_DEPLOY_STOW \ FYSETC_242_OLED_12864 EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL Z_SAFE_HOMING \ STEALTHCHOP_XY STEALTHCHOP_Z STEALTHCHOP_E HYBRID_THRESHOLD SENSORLESS_HOMING SQUARE_WAVE_STEPPING -opt_set X_MAX_ENDSTOP_INVERTING false -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2130 -opt_set Z_DRIVER_TYPE TMC2130_STANDALONE -opt_set E0_DRIVER_TYPE TMC2660 -opt_add X_HARDWARE_SERIAL Serial2 exec_test $1 $2 "FYSETC_F6 | SCARA | Mixed TMC | EEPROM" "$3" # clean up diff --git a/buildroot/tests/FYSETC_S6-tests b/buildroot/tests/FYSETC_S6 similarity index 70% rename from buildroot/tests/FYSETC_S6-tests rename to buildroot/tests/FYSETC_S6 index c7f7a16bbdbf..4794e11354d4 100755 --- a/buildroot/tests/FYSETC_S6-tests +++ b/buildroot/tests/FYSETC_S6 @@ -9,9 +9,8 @@ set -e # Build examples restore_configs use_example_configs FYSETC/S6 -opt_enable MEATPACK -opt_set Y_DRIVER_TYPE TMC2209 -opt_set Z_DRIVER_TYPE TMC2130 +opt_enable MEATPACK_ON_SERIAL_PORT_1 +opt_set Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2130 exec_test $1 $2 "FYSETC S6 Example" "$3" # cleanup diff --git a/buildroot/tests/Index_Mobo_Rev03 b/buildroot/tests/Index_Mobo_Rev03 new file mode 100755 index 000000000000..501386489df0 --- /dev/null +++ b/buildroot/tests/Index_Mobo_Rev03 @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# +# Build tests for Index_Mobo_Rev03 +# + +# exit on first failure +set -e + +use_example_configs Index/REV_03 +exec_test $1 $2 "Index REV03 Pick and Place" "$3" + +# cleanup +restore_configs diff --git a/buildroot/tests/LERDGEK b/buildroot/tests/LERDGEK new file mode 100755 index 000000000000..1aca42c18aba --- /dev/null +++ b/buildroot/tests/LERDGEK @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# +# Build tests for LERDGEK environment +# + +# exit on first failure +set -e + +# +# Build with the typical configuration +# +restore_configs +opt_set MOTHERBOARD BOARD_LERDGE_K SERIAL_PORT 1 +opt_enable TFT_GENERIC TFT_INTERFACE_FSMC TFT_COLOR_UI +exec_test $1 $2 "LERDGE K with Generic FSMC TFT with ColorUI" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/LERDGEX-tests b/buildroot/tests/LERDGEX similarity index 80% rename from buildroot/tests/LERDGEX-tests rename to buildroot/tests/LERDGEX index 7fcdb2684f98..cf7dfebfeabb 100755 --- a/buildroot/tests/LERDGEX-tests +++ b/buildroot/tests/LERDGEX @@ -10,8 +10,7 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_LERDGE_X -opt_set SERIAL_PORT 1 +opt_set MOTHERBOARD BOARD_LERDGE_X SERIAL_PORT 1 exec_test $1 $2 "LERDGE X with Default Configuration" "$3" # clean up diff --git a/buildroot/tests/LPC1768-tests b/buildroot/tests/LPC1768 similarity index 52% rename from buildroot/tests/LPC1768-tests rename to buildroot/tests/LPC1768 index 27d2fbf3ff6f..92ba286693e8 100755 --- a/buildroot/tests/LPC1768-tests +++ b/buildroot/tests/LPC1768 @@ -14,9 +14,10 @@ set -e #exec_test $1 $2 "Default Configuration" "$3" restore_configs -opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB -opt_enable VIKI2 SDSUPPORT SDCARD_READONLY SERIAL_PORT_2 NEOPIXEL_LED -opt_set NEOPIXEL_PIN P1_16 +opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EFB SERIAL_PORT_3 3 \ + NEOPIXEL_TYPE NEO_GRB RGB_LED_R_PIN P2_12 RGB_LED_G_PIN P1_23 RGB_LED_B_PIN P1_22 RGB_LED_W_PIN P1_24 +opt_enable FYSETC_MINI_12864_2_1 SDSUPPORT SDCARD_READONLY SERIAL_PORT_2 RGBW_LED E_DUAL_STEPPER_DRIVERS \ + NEOPIXEL_LED NEOPIXEL_IS_SEQUENTIAL NEOPIXEL_STARTUP_TEST NEOPIXEL_BKGD_INDEX_FIRST NEOPIXEL_BKGD_INDEX_LAST NEOPIXEL_BKGD_COLOR NEOPIXEL_BKGD_ALWAYS_ON exec_test $1 $2 "ReARM EFB VIKI2, SDSUPPORT, 2 Serial ports (USB CDC + UART0), NeoPixel" "$3" #restore_configs @@ -24,31 +25,31 @@ exec_test $1 $2 "ReARM EFB VIKI2, SDSUPPORT, 2 Serial ports (USB CDC + UART0), N #exec_test $1 $2 "MKS SBASE Example Config" "$3" restore_configs -opt_set MOTHERBOARD BOARD_MKS_SBASE -opt_set EXTRUDERS 2 -opt_set TEMP_SENSOR_1 1 -opt_set NUM_SERVOS 2 -opt_set SERVO_DELAY "{ 300, 300 }" -opt_enable SWITCHING_NOZZLE SWITCHING_NOZZLE_E1_SERVO_NR ULTIMAKERCONTROLLER -exec_test $1 $2 "MKS SBASE with SWITCHING_NOZZLE" "$3" +opt_set MOTHERBOARD BOARD_MKS_SBASE \ + EXTRUDERS 2 TEMP_SENSOR_1 1 \ + NUM_SERVOS 2 SERVO_DELAY '{ 300, 300 }' +opt_enable SWITCHING_NOZZLE SWITCHING_NOZZLE_E1_SERVO_NR EDITABLE_SERVO_ANGLES SERVO_DETACH_GCODE \ + ULTIMAKERCONTROLLER REALTIME_REPORTING_COMMANDS FULL_REPORT_TO_HOST_FEATURE +exec_test $1 $2 "MKS SBASE with SWITCHING_NOZZLE, Grbl Realtime Report" "$3" restore_configs -opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EEB -opt_set EXTRUDERS 2 -opt_set TEMP_SENSOR_1 -1 -opt_set TEMP_SENSOR_BED 5 +opt_set MOTHERBOARD BOARD_RAMPS_14_RE_ARM_EEB \ + EXTRUDERS 2 TEMP_SENSOR_1 -1 TEMP_SENSOR_BED 5 \ + GRID_MAX_POINTS_X 16 \ + NOZZLE_TO_PROBE_OFFSET '{ 0, 0, 0 }' \ + NOZZLE_CLEAN_MIN_TEMP 170 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \ FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY PID_EXTRUSION_SCALING SOUND_MENU_ITEM \ NOZZLE_AS_PROBE AUTO_BED_LEVELING_BILINEAR PREHEAT_BEFORE_LEVELING G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ + ASSISTED_TRAMMING ASSISTED_TRAMMING_WIZARD REPORT_TRAMMING_MM ASSISTED_TRAMMING_WAIT_POSITION \ BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET BABYSTEP_ZPROBE_GFX_OVERLAY \ PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \ Z_SAFE_HOMING ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE \ HOST_KEEPALIVE_FEATURE HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT \ LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES \ - SDSUPPORT SDCARD_SORT_ALPHA AUTO_REPORT_SD_STATUS EMERGENCY_PARSER -opt_set GRID_MAX_POINTS_X 16 -opt_set NOZZLE_TO_PROBE_OFFSET "{ 0, 0, 0 }" -opt_set NOZZLE_CLEAN_MIN_TEMP 170 + SDSUPPORT SDCARD_SORT_ALPHA AUTO_REPORT_SD_STATUS EMERGENCY_PARSER SOFT_RESET_ON_KILL SOFT_RESET_VIA_SERIAL exec_test $1 $2 "Re-ARM with NOZZLE_AS_PROBE and many features." "$3" # clean up diff --git a/buildroot/tests/LPC1769-tests b/buildroot/tests/LPC1769 similarity index 83% rename from buildroot/tests/LPC1769-tests rename to buildroot/tests/LPC1769 index 0a61d4280002..f0dab630e5e5 100755 --- a/buildroot/tests/LPC1769-tests +++ b/buildroot/tests/LPC1769 @@ -13,17 +13,17 @@ use_example_configs Azteeg/X5GT exec_test $1 $2 "Azteeg X5GT Example Configuration" "$3" restore_configs -opt_set MOTHERBOARD BOARD_SMOOTHIEBOARD -opt_set EXTRUDERS 2 -opt_set TEMP_SENSOR_1 -1 -opt_set TEMP_SENSOR_BED 5 +opt_set MOTHERBOARD BOARD_SMOOTHIEBOARD \ + EXTRUDERS 2 TEMP_SENSOR_1 -1 TEMP_SENSOR_BED 5 \ + GRID_MAX_POINTS_X 16 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable TFTGLCD_PANEL_SPI SDSUPPORT ADAPTIVE_FAN_SLOWING NO_FAN_SLOWING_IN_PID_TUNING \ FIX_MOUNTED_PROBE AUTO_BED_LEVELING_BILINEAR G29_RETRY_AND_RECOVER Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET LEVEL_CORNERS_USE_PROBE LEVEL_CORNERS_VERIFY_RAISED \ PRINTCOUNTER NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE SLOW_PWM_HEATERS PIDTEMPBED EEPROM_SETTINGS INCH_MODE_SUPPORT TEMPERATURE_UNITS_SUPPORT \ Z_SAFE_HOMING ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE \ LCD_INFO_MENU ARC_SUPPORT BEZIER_CURVE_SUPPORT EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES SDCARD_SORT_ALPHA EMERGENCY_PARSER -opt_set GRID_MAX_POINTS_X 16 exec_test $1 $2 "Smoothieboard with TFTGLCD_PANEL_SPI and many features" "$3" #restore_configs @@ -36,17 +36,13 @@ exec_test $1 $2 "Smoothieboard with TFTGLCD_PANEL_SPI and many features" "$3" # SD_ABORT_ON_ENDSTOP_HIT ADVANCED_OK GCODE_MACROS \ # VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS \ # EXTRA_FAN_SPEED FWRETRACT MENU_ADDAUTOSTART SDCARD_SORT_ALPHA -#opt_set FAN_MIN_PWM 50 -#opt_set FAN_KICKSTART_TIME 100 -#opt_set XY_FREQUENCY_LIMIT 15 +#opt_set FAN_MIN_PWM 50 FAN_KICKSTART_TIME 100 XY_FREQUENCY_LIMIT 15 #exec_test $1 $2 "Azteeg X5 MINI WIFI Many less common options" "$3" restore_configs use_example_configs delta/generic -opt_set MOTHERBOARD BOARD_COHESION3D_REMIX -opt_set X_DRIVER_TYPE TMC2130 -opt_set Y_DRIVER_TYPE TMC2130 -opt_set Z_DRIVER_TYPE TMC2130 +opt_set MOTHERBOARD BOARD_COHESION3D_REMIX \ + X_DRIVER_TYPE TMC2130 Y_DRIVER_TYPE TMC2130 Z_DRIVER_TYPE TMC2130 opt_enable AUTO_BED_LEVELING_BILINEAR EEPROM_SETTINGS EEPROM_CHITCHAT MECHANICAL_GANTRY_CALIBRATION \ TMC_USE_SW_SPI MONITOR_DRIVER_STATUS STEALTHCHOP_XY STEALTHCHOP_Z HYBRID_THRESHOLD \ SENSORLESS_PROBING Z_SAFE_HOMING X_STALL_SENSITIVITY Y_STALL_SENSITIVITY Z_STALL_SENSITIVITY TMC_DEBUG \ diff --git a/buildroot/tests/NUCLEO_F767ZI-tests b/buildroot/tests/NUCLEO_F767ZI similarity index 69% rename from buildroot/tests/NUCLEO_F767ZI-tests rename to buildroot/tests/NUCLEO_F767ZI index bd5ca8697095..9e2324660695 100755 --- a/buildroot/tests/NUCLEO_F767ZI-tests +++ b/buildroot/tests/NUCLEO_F767ZI @@ -10,11 +10,8 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_NUCLEO_F767ZI -opt_set SERIAL_PORT -1 +opt_set MOTHERBOARD BOARD_NUCLEO_F767ZI SERIAL_PORT -1 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2208 opt_enable BLTOUCH Z_SAFE_HOMING SPEAKER SOFTWARE_DRIVER_ENABLE -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2208 exec_test $1 $2 "Mixed timer usage" "$3" # clean up diff --git a/buildroot/tests/REMRAM_V1-tests b/buildroot/tests/REMRAM_V1 similarity index 100% rename from buildroot/tests/REMRAM_V1-tests rename to buildroot/tests/REMRAM_V1 diff --git a/buildroot/tests/SAMD51_grandcentral_m4-tests b/buildroot/tests/SAMD51_grandcentral_m4 similarity index 72% rename from buildroot/tests/SAMD51_grandcentral_m4-tests rename to buildroot/tests/SAMD51_grandcentral_m4 index a98929520ec1..92a62c9d37a4 100755 --- a/buildroot/tests/SAMD51_grandcentral_m4-tests +++ b/buildroot/tests/SAMD51_grandcentral_m4 @@ -10,20 +10,14 @@ set -e # Build with the default configurations # restore_configs -opt_set SERIAL_PORT -1 -opt_set MOTHERBOARD BOARD_AGCM4_RAMPS_144 -opt_set TEMP_SENSOR_0 11 -opt_set TEMP_SENSOR_BED 11 -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2209 -opt_set Z_DRIVER_TYPE TMC2209 -opt_set Z2_DRIVER_TYPE TMC2209 -opt_set E0_DRIVER_TYPE TMC2209 -opt_set RESTORE_LEVELING_AFTER_G28 false -opt_set LCD_LANGUAGE it -opt_set NUM_Z_STEPPER_DRIVERS 2 -opt_set HOMING_BUMP_MM "{ 0, 0, 0 }" -opt_set SDCARD_CONNECTION LCD +opt_set MOTHERBOARD BOARD_AGCM4_RAMPS_144 SERIAL_PORT -1 \ + TEMP_SENSOR_0 11 TEMP_SENSOR_BED 11 \ + X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2209 Z2_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209 \ + RESTORE_LEVELING_AFTER_G28 false \ + LCD_LANGUAGE it \ + SDCARD_CONNECTION LCD \ + NUM_Z_STEPPER_DRIVERS 2 \ + HOMING_BUMP_MM '{ 0, 0, 0 }' opt_enable ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION BLTOUCH Z_MIN_PROBE_REPEATABILITY_TEST \ FILAMENT_RUNOUT_SENSOR G26_MESH_VALIDATION MESH_EDIT_GFX_OVERLAY Z_SAFE_HOMING \ EEPROM_SETTINGS NOZZLE_PARK_FEATURE SDSUPPORT SD_CHECK_AND_RETRY \ diff --git a/buildroot/tests/STM32F070CB_malyan-tests b/buildroot/tests/STM32F070CB_malyan similarity index 75% rename from buildroot/tests/STM32F070CB_malyan-tests rename to buildroot/tests/STM32F070CB_malyan index eeec7e9b1f12..060d707b04e5 100755 --- a/buildroot/tests/STM32F070CB_malyan-tests +++ b/buildroot/tests/STM32F070CB_malyan @@ -7,8 +7,7 @@ set -e restore_configs -opt_set MOTHERBOARD BOARD_MALYAN_M200_V2 -opt_set SERIAL_PORT -1 +opt_set MOTHERBOARD BOARD_MALYAN_M200_V2 SERIAL_PORT -1 exec_test $1 $2 "Malyan M200 v2 Default Config" "$3" # cleanup diff --git a/buildroot/tests/STM32F070RB_malyan-tests b/buildroot/tests/STM32F070RB_malyan similarity index 100% rename from buildroot/tests/STM32F070RB_malyan-tests rename to buildroot/tests/STM32F070RB_malyan diff --git a/buildroot/tests/STM32F103CB_malyan-tests b/buildroot/tests/STM32F103CB_malyan similarity index 100% rename from buildroot/tests/STM32F103CB_malyan-tests rename to buildroot/tests/STM32F103CB_malyan diff --git a/buildroot/tests/STM32F103RC_btt-tests b/buildroot/tests/STM32F103RC_btt similarity index 54% rename from buildroot/tests/STM32F103RC_btt-tests rename to buildroot/tests/STM32F103RC_btt index 0084f59a0ce8..e76060aee82f 100755 --- a/buildroot/tests/STM32F103RC_btt-tests +++ b/buildroot/tests/STM32F103RC_btt @@ -10,14 +10,9 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V1_0 -opt_set SERIAL_PORT 1 -opt_set SERIAL_PORT_2 -1 -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2209 -opt_set Z_DRIVER_TYPE TMC2209 -opt_set E0_DRIVER_TYPE TMC2209 -opt_enable PINS_DEBUGGING +opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V1_0 SERIAL_PORT 1 SERIAL_PORT_2 -1 \ + X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209 +opt_enable PINS_DEBUGGING Z_IDLE_HEIGHT exec_test $1 $2 "BigTreeTech SKR Mini E3 1.0 - Basic Config with TMC2209 HW Serial" "$3" diff --git a/buildroot/tests/STM32F103RC_btt_USB-tests b/buildroot/tests/STM32F103RC_btt_USB similarity index 75% rename from buildroot/tests/STM32F103RC_btt_USB-tests rename to buildroot/tests/STM32F103RC_btt_USB index d752c87d1820..8381de0ea6e4 100755 --- a/buildroot/tests/STM32F103RC_btt_USB-tests +++ b/buildroot/tests/STM32F103RC_btt_USB @@ -10,9 +10,7 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 -opt_set SERIAL_PORT 1 -opt_set SERIAL_PORT_2 -1 +opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 SERIAL_PORT 1 SERIAL_PORT_2 -1 exec_test $1 $2 "BigTreeTech SKR Mini v1.1 - Basic Configuration" "$3" # clean up diff --git a/buildroot/tests/STM32F103RC_btt_USB_maple b/buildroot/tests/STM32F103RC_btt_USB_maple new file mode 100755 index 000000000000..eeb460911acb --- /dev/null +++ b/buildroot/tests/STM32F103RC_btt_USB_maple @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F103RC BigTreeTech (SKR Mini v1.1) with LibMaple STM32F1 HAL +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_V1_1 SERIAL_PORT 1 SERIAL_PORT_2 -1 BAUDRATE_2 115200 +exec_test $1 $2 "BigTreeTech SKR Mini v1.1 - Basic Configuration" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/STM32F103RC_btt_maple b/buildroot/tests/STM32F103RC_btt_maple new file mode 100755 index 000000000000..e74e5902132c --- /dev/null +++ b/buildroot/tests/STM32F103RC_btt_maple @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F103RC BigTreeTech (SKR Mini E3) with LibMaple STM32F1 HAL +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BTT_SKR_MINI_E3_V1_0 SERIAL_PORT 1 SERIAL_PORT_2 -1 \ + X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 Z_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209 +opt_enable PINS_DEBUGGING Z_IDLE_HEIGHT + +exec_test $1 $2 "BigTreeTech SKR Mini E3 1.0 - Basic Config with TMC2209 HW Serial" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/STM32F103RC_fysetc-tests b/buildroot/tests/STM32F103RC_fysetc_maple similarity index 100% rename from buildroot/tests/STM32F103RC_fysetc-tests rename to buildroot/tests/STM32F103RC_fysetc_maple diff --git a/buildroot/tests/STM32F103RC_meeb-tests b/buildroot/tests/STM32F103RC_meeb similarity index 56% rename from buildroot/tests/STM32F103RC_meeb-tests rename to buildroot/tests/STM32F103RC_meeb index 4fcb6e8118d3..3a191b4e7e2d 100755 --- a/buildroot/tests/STM32F103RC_meeb-tests +++ b/buildroot/tests/STM32F103RC_meeb @@ -10,13 +10,8 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_CCROBOT_MEEB_3DP -opt_set SERIAL_PORT 1 -opt_set SERIAL_PORT_2 -1 -opt_set X_DRIVER_TYPE TMC2208 -opt_set Y_DRIVER_TYPE TMC2208 -opt_set Z_DRIVER_TYPE TMC2208 -opt_set E0_DRIVER_TYPE TMC2208 +opt_set MOTHERBOARD BOARD_CCROBOT_MEEB_3DP SERIAL_PORT 1 SERIAL_PORT_2 -1 \ + X_DRIVER_TYPE TMC2208 Y_DRIVER_TYPE TMC2208 Z_DRIVER_TYPE TMC2208 E0_DRIVER_TYPE TMC2208 exec_test $1 $2 "MEEB_3DP - Basic Config with TMC2208 SW Serial" "$3" # clean up diff --git a/buildroot/tests/STM32F103RE-tests b/buildroot/tests/STM32F103RE similarity index 73% rename from buildroot/tests/STM32F103RE-tests rename to buildroot/tests/STM32F103RE index 909c362d066d..641f1fa56c80 100755 --- a/buildroot/tests/STM32F103RE-tests +++ b/buildroot/tests/STM32F103RE @@ -10,9 +10,9 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_STM32F103RE -opt_set EXTRUDERS 2 -opt_set SERIAL_PORT -1 +opt_set MOTHERBOARD BOARD_STM32F103RE SERIAL_PORT -1 EXTRUDERS 2 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT \ PAREN_COMMENTS GCODE_MOTION_MODES SINGLENOZZLE TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_PARK \ BAUD_RATE_GCODE GCODE_MACROS NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE diff --git a/buildroot/tests/STM32F103RET6_creality b/buildroot/tests/STM32F103RET6_creality new file mode 100755 index 000000000000..d530f7b85186 --- /dev/null +++ b/buildroot/tests/STM32F103RET6_creality @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F103RET6_creality +# + +# exit on first failure +set -e + +# +# Build with configs included in the PR +# +use_example_configs "Creality/Ender-3 V2/CrealityUI" +opt_enable MARLIN_DEV_MODE BUFFER_MONITORING BLTOUCH AUTO_BED_LEVELING_BILINEAR Z_SAFE_HOMING +exec_test $1 $2 "Ender 3 v2 with CrealityUI" "$3" + +use_example_configs "Creality/Ender-3 V2/CrealityUI" +opt_disable DWIN_CREALITY_LCD +opt_enable DWIN_CREALITY_LCD_ENHANCED BLTOUCH AUTO_BED_LEVELING_UBL Z_SAFE_HOMING +exec_test $1 $2 "Ender 3 v2 with Enhanced UI" "$3" + +use_example_configs "Creality/Ender-3 V2/CrealityUI" +opt_disable DWIN_CREALITY_LCD +opt_enable DWIN_CREALITY_LCD_JYERSUI AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY +exec_test $1 $2 "Ender 3 v2 with JyersUI" "$3" + +use_example_configs "Creality/Ender-3 V2/MarlinUI" +opt_add SDCARD_EEPROM_EMULATION AUTO_BED_LEVELING_BILINEAR Z_SAFE_HOMING +exec_test $1 $2 "Ender 3 v2 with MarlinUI" "$3" + +restore_configs +opt_set MOTHERBOARD BOARD_CREALITY_V452 SERIAL_PORT 1 +opt_disable NOZZLE_TO_PROBE_OFFSET +opt_enable NOZZLE_AS_PROBE Z_SAFE_HOMING Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN \ + PROBE_ACTIVATION_SWITCH PROBE_TARE PROBE_TARE_ONLY_WHILE_INACTIVE +exec_test $1 $2 "Creality V4.5.2 PROBE_ACTIVATION_SWITCH, Probe Tare" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/STM32F103RET6_creality-tests b/buildroot/tests/STM32F103RET6_creality-tests deleted file mode 100755 index 199bd6a9c2d8..000000000000 --- a/buildroot/tests/STM32F103RET6_creality-tests +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env bash -# -# Build tests for STM32F103RET6_creality -# - -# exit on first failure -set -e - -# -# Build with configs included in the PR -# -use_example_configs "Creality/Ender-3 V2" -opt_enable MARLIN_DEV_MODE -exec_test $1 $2 "Ender 3 v2" "$3" - -use_example_configs "Creality/Ender-3 V2" -opt_disable CLASSIC_JERK -opt_add SDCARD_EEPROM_EMULATION -exec_test $1 $2 "Ender 3 v2, SD EEPROM, w/o CLASSIC_JERK" "$3" - -restore_configs -opt_set SERIAL_PORT 1 -opt_set MOTHERBOARD BOARD_CREALITY_V452 -opt_disable NOZZLE_TO_PROBE_OFFSET -opt_enable NOZZLE_AS_PROBE Z_SAFE_HOMING Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN -opt_enable PROBE_ACTIVATION_SWITCH PROBE_TARE PROBE_TARE_ONLY_WHILE_INACTIVE -exec_test $1 $2 "Creality V4.5.2 PROBE_ACTIVATION_SWITCH, Probe Tare" "$3" - -# clean up -restore_configs diff --git a/buildroot/tests/STM32F103RE_btt b/buildroot/tests/STM32F103RE_btt new file mode 100755 index 000000000000..97d7ffec4bdd --- /dev/null +++ b/buildroot/tests/STM32F103RE_btt @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F103RE BigTreeTech (SKR E3 DIP v1.0) +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP \ + SERIAL_PORT 1 SERIAL_PORT_2 -1 \ + X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2130 +exec_test $1 $2 "BTT SKR E3 DIP 1.0 | Mixed TMC Drivers" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/STM32F103RE_btt-tests b/buildroot/tests/STM32F103RE_btt-tests deleted file mode 100755 index ab8681c7f527..000000000000 --- a/buildroot/tests/STM32F103RE_btt-tests +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# -# Build tests for STM32F103RE BigTreeTech (SKR E3 DIP v1.0) -# - -# exit on first failure -set -e - -# -# Build with the default configurations -# -restore_configs -opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP -opt_set SERIAL_PORT 1 -opt_set SERIAL_PORT_2 -1 -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2130 -exec_test $1 $2 "BigTreeTech SKR E3 DIP v1.0 - Basic Config with mixed TMC Drivers" "$3" - -# clean up -restore_configs diff --git a/buildroot/tests/STM32F103RE_btt_USB-tests b/buildroot/tests/STM32F103RE_btt_USB similarity index 76% rename from buildroot/tests/STM32F103RE_btt_USB-tests rename to buildroot/tests/STM32F103RE_btt_USB index 43162b68a4b3..c63a90e43681 100755 --- a/buildroot/tests/STM32F103RE_btt_USB-tests +++ b/buildroot/tests/STM32F103RE_btt_USB @@ -10,16 +10,11 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP -opt_set SERIAL_PORT 1 -opt_set SERIAL_PORT_2 -1 +opt_set MOTHERBOARD BOARD_BTT_SKR_E3_DIP SERIAL_PORT 1 SERIAL_PORT_2 -1 exec_test $1 $2 "BigTreeTech SKR E3 DIP v1.0 - Basic Configuration" "$3" restore_configs -opt_set MOTHERBOARD BOARD_BTT_SKR_CR6 -opt_set SERIAL_PORT -1 -opt_set SERIAL_PORT_2 2 -opt_set TEMP_SENSOR_BED 1 +opt_set MOTHERBOARD BOARD_BTT_SKR_CR6 SERIAL_PORT -1 SERIAL_PORT_2 2 TEMP_SENSOR_BED 1 opt_enable CR10_STOCKDISPLAY \ NOZZLE_AS_PROBE Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN Z_SAFE_HOMING \ PROBE_ACTIVATION_SWITCH PROBE_TARE PROBE_TARE_ONLY_WHILE_INACTIVE \ diff --git a/buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple b/buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple new file mode 100755 index 000000000000..8cbb84fb807d --- /dev/null +++ b/buildroot/tests/STM32F103VE_ZM3E4V2_USB_maple @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F103VE_ZM3E4V2_USB +# + +# exit on first failure +set -e + +restore_configs +opt_set MOTHERBOARD BOARD_ZONESTAR_ZM3E4V2 SERIAL_PORT 1 +exec_test $1 $2 "Zonestar ZM3E4 V2.0" "$3" + +# cleanup +restore_configs diff --git a/buildroot/tests/STM32F103VE_longer-tests b/buildroot/tests/STM32F103VE_longer similarity index 100% rename from buildroot/tests/STM32F103VE_longer-tests rename to buildroot/tests/STM32F103VE_longer diff --git a/buildroot/tests/STM32F103VE_longer_maple b/buildroot/tests/STM32F103VE_longer_maple new file mode 100755 index 000000000000..4570a3214d17 --- /dev/null +++ b/buildroot/tests/STM32F103VE_longer_maple @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Build tests for STM32F103VET6 (using maple STM32F1 framework) +# + +# exit on first failure +set -e + +use_example_configs Alfawise/U20 +opt_enable BAUD_RATE_GCODE +exec_test $1 $2 "maple CLASSIC_UI U20 config" "$3" + +use_example_configs Alfawise/U20 +opt_enable BAUD_RATE_GCODE TFT_COLOR_UI +opt_disable TFT_CLASSIC_UI CUSTOM_STATUS_SCREEN_IMAGE +exec_test $1 $2 "maple COLOR_UI U20 config" "$3" + +use_example_configs Alfawise/U20-bltouch +opt_enable BAUD_RATE_GCODE +exec_test $1 $2 "maple BLTouch U20 config" + +# cleanup +restore_configs diff --git a/buildroot/tests/STM32F401VE_STEVAL-tests b/buildroot/tests/STM32F401VE_STEVAL similarity index 76% rename from buildroot/tests/STM32F401VE_STEVAL-tests rename to buildroot/tests/STM32F401VE_STEVAL index d7c90e7907f9..1704f3d2f004 100755 --- a/buildroot/tests/STM32F401VE_STEVAL-tests +++ b/buildroot/tests/STM32F401VE_STEVAL @@ -8,8 +8,7 @@ set -e # Build examples restore_configs -opt_set MOTHERBOARD BOARD_STEVAL_3DP001V1 -opt_set SERIAL_PORT -1 +opt_set MOTHERBOARD BOARD_STEVAL_3DP001V1 SERIAL_PORT -1 exec_test $1 $2 "STM32F401VE_STEVAL Default Config" "$3" # cleanup diff --git a/buildroot/tests/STM32F407VE_black-tests b/buildroot/tests/STM32F407VE_black similarity index 100% rename from buildroot/tests/STM32F407VE_black-tests rename to buildroot/tests/STM32F407VE_black diff --git a/buildroot/tests/at90usb1286_cdc-tests b/buildroot/tests/at90usb1286_cdc similarity index 100% rename from buildroot/tests/at90usb1286_cdc-tests rename to buildroot/tests/at90usb1286_cdc diff --git a/buildroot/tests/at90usb1286_dfu-tests b/buildroot/tests/at90usb1286_dfu similarity index 100% rename from buildroot/tests/at90usb1286_dfu-tests rename to buildroot/tests/at90usb1286_dfu diff --git a/buildroot/tests/chitu_f103 b/buildroot/tests/chitu_f103 new file mode 100755 index 000000000000..139c480e3e85 --- /dev/null +++ b/buildroot/tests/chitu_f103 @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# +# Build tests for chitu_f103 (STM32F103ZE) +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +use_example_configs Tronxy/X5SA +exec_test $1 $2 "Tronxy/X5SA" "$3" + +# clean up +restore_configs diff --git a/buildroot/tests/esp32 b/buildroot/tests/esp32 new file mode 100755 index 000000000000..a0f79107cf2f --- /dev/null +++ b/buildroot/tests/esp32 @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# +# Build tests for ESP32 +# + +# exit on first failure +set -e + +# +# Build with the default configurations +# +restore_configs +opt_set MOTHERBOARD BOARD_ESPRESSIF_ESP32 TX_BUFFER_SIZE 64 \ + WIFI_SSID '"ssid"' WIFI_PWD '"password"' +opt_enable WIFISUPPORT WEBSUPPORT GCODE_MACROS BAUD_RATE_GCODE M115_GEOMETRY_REPORT REPETIER_GCODE_M360 +exec_test $1 $2 "ESP32 with WIFISUPPORT and WEBSUPPORT" "$3" + +# +# Build with TMC drivers using hardware serial +# +restore_configs +opt_set MOTHERBOARD BOARD_ESPRESSIF_ESP32 \ + X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2208 Z_DRIVER_TYPE TMC2209 E0_DRIVER_TYPE TMC2209 \ + X_HARDWARE_SERIAL Serial1 Y_HARDWARE_SERIAL Serial1 Z_HARDWARE_SERIAL Serial1 E0_HARDWARE_SERIAL Serial1 \ + X_SLAVE_ADDRESS 0 Y_SLAVE_ADDRESS 1 Z_SLAVE_ADDRESS 2 E0_SLAVE_ADDRESS 3 +opt_enable HOTEND_IDLE_TIMEOUT SOFTWARE_DRIVER_ENABLE +exec_test $1 $2 "ESP32, TMC HW Serial, Hotend Idle" "$3" + +# cleanup +restore_configs diff --git a/buildroot/tests/esp32-tests b/buildroot/tests/esp32-tests deleted file mode 100755 index 310eea298e11..000000000000 --- a/buildroot/tests/esp32-tests +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# -# Build tests for ESP32 -# - -# exit on first failure -set -e - -# -# Build with the default configurations -# -restore_configs -opt_set MOTHERBOARD BOARD_ESPRESSIF_ESP32 -opt_enable WIFISUPPORT WEBSUPPORT GCODE_MACROS BAUD_RATE_GCODE M115_GEOMETRY_REPORT REPETIER_GCODE_M360 -opt_add WIFI_SSID "\"ssid\"" -opt_add WIFI_PWD "\"password\"" -opt_set TX_BUFFER_SIZE 64 -exec_test $1 $2 "ESP32 with WIFISUPPORT and WEBSUPPORT" "$3" - -# -# Build with TMC drivers using hardware serial -# -restore_configs -opt_set MOTHERBOARD BOARD_ESPRESSIF_ESP32 -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2208 -opt_set Z_DRIVER_TYPE TMC2209 -opt_set E0_DRIVER_TYPE TMC2209 -opt_set X_HARDWARE_SERIAL Serial1 -opt_set Y_HARDWARE_SERIAL Serial1 -opt_set Z_HARDWARE_SERIAL Serial1 -opt_set E0_HARDWARE_SERIAL Serial1 -opt_set X_SLAVE_ADDRESS 0 -opt_set Y_SLAVE_ADDRESS 1 -opt_set Z_SLAVE_ADDRESS 2 -opt_set E0_SLAVE_ADDRESS 3 -opt_enable HOTEND_IDLE_TIMEOUT SOFTWARE_DRIVER_ENABLE -exec_test $1 $2 "ESP32, TMC HW Serial, Hotend Idle" "$3" - -# cleanup -restore_configs diff --git a/buildroot/tests/jgaurora_a5s_a1-tests b/buildroot/tests/jgaurora_a5s_a1_maple similarity index 100% rename from buildroot/tests/jgaurora_a5s_a1-tests rename to buildroot/tests/jgaurora_a5s_a1_maple diff --git a/buildroot/tests/linux_native-tests b/buildroot/tests/linux_native similarity index 80% rename from buildroot/tests/linux_native-tests rename to buildroot/tests/linux_native index 711691fb9d83..0153687eacb7 100755 --- a/buildroot/tests/linux_native-tests +++ b/buildroot/tests/linux_native @@ -10,8 +10,7 @@ set -e # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_LINUX_RAMPS -opt_set TEMP_SENSOR_BED 1 +opt_set MOTHERBOARD BOARD_LINUX_RAMPS TEMP_SENSOR_BED 1 opt_enable PIDTEMPBED EEPROM_SETTINGS BAUD_RATE_GCODE exec_test $1 $2 "Linux with EEPROM" "$3" diff --git a/buildroot/tests/malyan_M300-tests b/buildroot/tests/malyan_M300 similarity index 100% rename from buildroot/tests/malyan_M300-tests rename to buildroot/tests/malyan_M300 diff --git a/buildroot/tests/mega1280-tests b/buildroot/tests/mega1280 similarity index 76% rename from buildroot/tests/mega1280-tests rename to buildroot/tests/mega1280 index ac1b5f692d89..cae747017f1c 100755 --- a/buildroot/tests/mega1280-tests +++ b/buildroot/tests/mega1280 @@ -16,30 +16,26 @@ set -e # Test MESH_BED_LEVELING feature, with LCD # restore_configs -opt_set LCD_LANGUAGE an +opt_set LCD_LANGUAGE an \ + POWER_MONITOR_CURRENT_PIN 14 POWER_MONITOR_VOLTAGE_PIN 15 \ + CLOSED_LOOP_ENABLE_PIN 44 CLOSED_LOOP_MOVE_COMPLETE_PIN 45 opt_enable SPINDLE_FEATURE ULTIMAKERCONTROLLER LCD_BED_LEVELING \ EEPROM_SETTINGS EEPROM_BOOT_SILENT EEPROM_AUTO_INIT \ SENSORLESS_BACKOFF_MM HOMING_BACKOFF_POST_MM HOME_Y_BEFORE_X CODEPENDENT_XY_HOMING \ MESH_BED_LEVELING ENABLE_LEVELING_FADE_HEIGHT MESH_G28_REST_ORIGIN \ G26_MESH_VALIDATION MESH_EDIT_MENU GCODE_QUOTED_STRINGS \ EXTERNAL_CLOSED_LOOP_CONTROLLER POWER_MONITOR_CURRENT POWER_MONITOR_VOLTAGE -opt_set POWER_MONITOR_CURRENT_PIN 14 -opt_set POWER_MONITOR_VOLTAGE_PIN 15 -opt_set CLOSED_LOOP_ENABLE_PIN 44 -opt_set CLOSED_LOOP_MOVE_COMPLETE_PIN 45 exec_test $1 $2 "Spindle, MESH_BED_LEVELING, closed loop, Power Monitor, and LCD" "$3" # # Test DUAL_X_CARRIAGE # restore_configs -opt_set MOTHERBOARD BOARD_TT_OSCAR -opt_set LCD_LANGUAGE pt -opt_set EXTRUDERS 2 -opt_set TEMP_SENSOR_1 1 +opt_set MOTHERBOARD BOARD_ZRIB_V52 \ + LCD_LANGUAGE pt REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 \ + EXTRUDERS 2 TEMP_SENSOR_1 1 opt_enable USE_XMAX_PLUG DUAL_X_CARRIAGE REPRAPWORLD_KEYPAD -opt_set REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 -exec_test $1 $2 "TT Oscar | DUAL_X_CARRIAGE" "$3" +exec_test $1 $2 "ZRIB_V52 | DUAL_X_CARRIAGE" "$3" # # Delta Config (generic) + Probeless @@ -50,8 +46,11 @@ exec_test $1 $2 "RAMPS | DELTA | RRD LCD | DELTA_AUTO_CALIBRATION | DELTA_CALIBR # # Delta Config (generic) + ABL bilinear + BLTOUCH +# use_example_configs delta/generic -opt_set LCD_LANGUAGE cz +opt_set LCD_LANGUAGE cz \ + Z_MIN_PROBE_ENDSTOP_INVERTING false \ + Z_MIN_ENDSTOP_INVERTING false opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER DELTA_CALIBRATION_MENU AUTO_BED_LEVELING_BILINEAR BLTOUCH exec_test $1 $2 "DELTA | RRD LCD | ABL Bilinear | BLTOUCH" "$3" diff --git a/buildroot/tests/mega2560-tests b/buildroot/tests/mega2560 similarity index 53% rename from buildroot/tests/mega2560-tests rename to buildroot/tests/mega2560 index aef2b8756ac1..bf3290b9d02c 100755 --- a/buildroot/tests/mega2560-tests +++ b/buildroot/tests/mega2560 @@ -16,19 +16,12 @@ set -e # Test a probeless build of AUTO_BED_LEVELING_UBL, with lots of extruders # use_example_configs AnimationExample -opt_set SHOW_CUSTOM_BOOTSCREEN -opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO -opt_set LCD_LANGUAGE fr -opt_set EXTRUDERS 5 -opt_set TEMP_SENSOR_1 1 -opt_set TEMP_SENSOR_2 5 -opt_set TEMP_SENSOR_3 20 -opt_set TEMP_SENSOR_4 1000 -opt_set TEMP_SENSOR_BED 1 +opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE fr SAVED_POSITIONS 4 DEFAULT_EJERK 10 \ + EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 5 TEMP_SENSOR_3 20 TEMP_SENSOR_4 1000 TEMP_SENSOR_BED 1 opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION \ - REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI STATUS_MESSAGE_SCROLLING BOOT_MARLIN_LOGO_SMALL \ - SDSUPPORT SDCARD_SORT_ALPHA USB_FLASH_DRIVE_SUPPORT AUTO_REPORT_SD_STATUS SCROLL_LONG_FILENAMES CANCEL_OBJECTS SOUND_MENU_ITEM \ - EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_USER_MENUS \ + REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI STATUS_MESSAGE_SCROLLING SHOW_CUSTOM_BOOTSCREEN BOOT_MARLIN_LOGO_SMALL \ + SDSUPPORT SDCARD_SORT_ALPHA USB_FLASH_DRIVE_SUPPORT AUTO_REPORT_SD_STATUS SCROLL_LONG_FILENAMES MEDIA_MENU_AT_TOP \ + EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_MENU_MAIN FREEZE_FEATURE CANCEL_OBJECTS SOUND_MENU_ITEM \ MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE EXTRA_LIN_ADVANCE_K QUICK_HOME \ LCD_SET_PROGRESS_MANUALLY PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME \ BABYSTEPPING BABYSTEP_XY NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL @@ -38,26 +31,18 @@ exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 5 | RRDFGSC | UBL | LIN_ADVANCE ..." # Add a Sled Z Probe, use UBL Cartesian moves, use Japanese language # use_example_configs AnimationExample -opt_set SHOW_CUSTOM_BOOTSCREEN -opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO -opt_set LCD_LANGUAGE fr -opt_set EXTRUDERS 5 -opt_set TEMP_SENSOR_1 1 -opt_set TEMP_SENSOR_2 5 -opt_set TEMP_SENSOR_3 20 -opt_set TEMP_SENSOR_4 1000 -opt_set TEMP_SENSOR_BED 1 -opt_enable AUTO_BED_LEVELING_UBL RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT SKEW_CORRECTION \ - REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI STATUS_MESSAGE_SCROLLING BOOT_MARLIN_LOGO_SMALL \ - SDSUPPORT SDCARD_SORT_ALPHA USB_FLASH_DRIVE_SUPPORT SCROLL_LONG_FILENAMES CANCEL_OBJECTS NO_SD_AUTOSTART \ - EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_USER_MENUS \ +opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO LCD_LANGUAGE jp_kana DEFAULT_EJERK 10 \ + EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 5 TEMP_SENSOR_3 20 TEMP_SENSOR_4 1000 TEMP_SENSOR_BED 1 +opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LIGHTWEIGHT_UI SHOW_CUSTOM_BOOTSCREEN BOOT_MARLIN_LOGO_SMALL \ + LCD_SET_PROGRESS_MANUALLY PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES \ + SDSUPPORT SDCARD_SORT_ALPHA NO_SD_AUTOSTART USB_FLASH_DRIVE_SUPPORT CANCEL_OBJECTS \ + Z_PROBE_SLED AUTO_BED_LEVELING_UBL UBL_HILBERT_CURVE RESTORE_LEVELING_AFTER_G28 DEBUG_LEVELING_FEATURE G26_MESH_VALIDATION ENABLE_LEVELING_FADE_HEIGHT \ + EEPROM_SETTINGS EEPROM_CHITCHAT GCODE_MACROS CUSTOM_MENU_MAIN \ MULTI_NOZZLE_DUPLICATION CLASSIC_JERK LIN_ADVANCE QUICK_HOME \ - LCD_SET_PROGRESS_MANUALLY PRINT_PROGRESS_SHOW_DECIMALS SHOW_REMAINING_TIME \ - BABYSTEPPING BABYSTEP_XY NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL \ - Z_PROBE_SLED SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE -opt_set LCD_LANGUAGE jp_kana + NANODLP_Z_SYNC I2C_POSITION_ENCODERS M114_DETAIL \ + SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \ + BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING BABYSTEP_HOTEND_Z_OFFSET BABYSTEP_DISPLAY_TOTAL opt_disable SEGMENT_LEVELED_MOVES -opt_enable BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET DOUBLECLICK_FOR_Z_BABYSTEPPING BABYSTEP_HOTEND_Z_OFFSET BABYSTEP_DISPLAY_TOTAL M114_DETAIL exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 5 | RRDFGSC | UBL | LIN_ADVANCE | Sled Probe | Skew | JP-Kana | Babystep offsets ..." "$3" @@ -65,25 +50,16 @@ exec_test $1 $2 "Azteeg X3 Pro | EXTRUDERS 5 | RRDFGSC | UBL | LIN_ADVANCE | Sle # 5 runout sensors with distinct states # restore_configs -opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO -opt_set EXTRUDERS 5 -opt_set NUM_SERVOS 1 -opt_set TEMP_SENSOR_1 1 -opt_set TEMP_SENSOR_2 1 -opt_set TEMP_SENSOR_3 1 -opt_set TEMP_SENSOR_4 1 +opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO NUM_SERVOS 1 \ + EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \ + NUM_RUNOUT_SENSORS 5 FIL_RUNOUT2_PIN 44 FIL_RUNOUT3_PIN 45 FIL_RUNOUT4_PIN 46 FIL_RUNOUT5_PIN 47 \ + FIL_RUNOUT3_STATE HIGH opt_enable VIKI2 BOOT_MARLIN_LOGO_ANIMATED SDSUPPORT AUTO_REPORT_SD_STATUS \ Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE \ - EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL \ + EEPROM_SETTINGS EEPROM_CHITCHAT M114_DETAIL AUTO_REPORT_POSITION \ NO_VOLUMETRICS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES AUTOTEMP G38_PROBE_TARGET JOYSTICK \ DIRECT_STEPPING DETECT_BROKEN_ENDSTOP \ FILAMENT_RUNOUT_SENSOR NOZZLE_PARK_FEATURE ADVANCED_PAUSE_FEATURE Z_SAFE_HOMING FIL_RUNOUT3_PULLUP -opt_set NUM_RUNOUT_SENSORS 5 -opt_set FIL_RUNOUT2_PIN 44 -opt_set FIL_RUNOUT3_PIN 45 -opt_set FIL_RUNOUT3_STATE HIGH -opt_set FIL_RUNOUT4_PIN 46 -opt_set FIL_RUNOUT5_PIN 47 exec_test $1 $2 "Multiple runout sensors (x5) | Distinct runout states" "$3" @@ -91,21 +67,21 @@ exec_test $1 $2 "Multiple runout sensors (x5) | Distinct runout states" "$3" # Mixing Extruder with 5 steppers, Greek # restore_configs -opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO -opt_set LCD_LANGUAGE el_gr +opt_set MOTHERBOARD BOARD_AZTEEG_X3_PRO MIXING_STEPPERS 5 LCD_LANGUAGE ru \ + NUM_RUNOUT_SENSORS E_STEPPERS REDUNDANT_PART_COOLING_FAN 1 \ + FIL_RUNOUT2_PIN 16 FIL_RUNOUT3_PIN 17 FIL_RUNOUT4_PIN 4 FIL_RUNOUT5_PIN 5 opt_enable MIXING_EXTRUDER GRADIENT_MIX GRADIENT_VTOOL CR10_STOCKDISPLAY \ - USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_IGNORE_Z -opt_set MIXING_STEPPERS 5 -opt_set LCD_LANGUAGE ru + USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_IGNORE_Z \ + FILAMENT_RUNOUT_SENSOR ADVANCED_PAUSE_FEATURE NOZZLE_PARK_FEATURE +opt_disable DISABLE_INACTIVE_EXTRUDER exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek" "$3" # # Test SPEAKER with BOARD_BQ_ZUM_MEGA_3D and BQ_LCD_SMART_CONTROLLER # #restore_configs -#opt_set MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D -#opt_set LCD_FEEDBACK_FREQUENCY_DURATION_MS 10 -#opt_set LCD_FEEDBACK_FREQUENCY_HZ 100 +#opt_set MOTHERBOARD BOARD_BQ_ZUM_MEGA_3D \ +# LCD_FEEDBACK_FREQUENCY_DURATION_MS 10 LCD_FEEDBACK_FREQUENCY_HZ 100 #opt_enable BQ_LCD_SMART_CONTROLLER SPEAKER # @@ -147,15 +123,12 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek" "$3" # #restore_configs #opt_enable G3D_PANEL SDSUPPORT SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES -#opt_set SDSORT_GCODE true -#opt_set SDSORT_USES_RAM true -#opt_set SDSORT_USES_STACK true -#opt_set SDSORT_CACHE_NAMES true +#opt_set SDSORT_GCODE true SDSORT_USES_RAM true SDSORT_USES_STACK true SDSORT_CACHE_NAMES true #exec_test $1 $2 "Stuff" "$3" # # REPRAPWORLD_KEYPAD # -# Cant find configuration details to get it to compile +# Can't find configuration details to get it to compile #restore_configs #opt_enable ULTRA_LCD REPRAPWORLD_KEYPAD REPRAPWORLD_KEYPAD_MOVE_STEP #exec_test $1 $2 "Stuff" "$3" @@ -196,16 +169,63 @@ exec_test $1 $2 "Azteeg X3 | Mixing Extruder (x5) | Gradient Mix | Greek" "$3" #opt_enable LCM1602 #exec_test $1 $2 "Stuff" "$3" +# +# Test Laser features with 12864 LCD +# +restore_configs +opt_set MOTHERBOARD BOARD_RAMPS_14_EFB EXTRUDERS 0 LCD_LANGUAGE en TEMP_SENSOR_COOLER 1 TEMP_SENSOR_1 0 SERIAL_PORT_2 2 \ + DEFAULT_AXIS_STEPS_PER_UNIT '{ 80, 80, 400 }' \ + DEFAULT_MAX_FEEDRATE '{ 300, 300, 5 }' \ + DEFAULT_MAX_ACCELERATION '{ 3000, 3000, 100 }' \ + MANUAL_FEEDRATE '{ 50*60, 50*60, 4*60 }' \ + AXIS_RELATIVE_MODES '{ false, false, false }' +opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS EEPROM_BOOT_SILENT EEPROM_AUTO_INIT \ + LASER_FEATURE AIR_EVACUATION AIR_EVACUATION_PIN AIR_ASSIST AIR_ASSIST_PIN LASER_COOLANT_FLOW_METER MEATPACK_ON_SERIAL_PORT_1 + +exec_test $1 $2 "MEGA2560 RAMPS | Laser Feature | Air Evacuation | Air Assist | Cooler | Flowmeter | 12864 LCD | meatpack | SERIAL_PORT_2 " "$3" + +# +# Test Laser features with 44780 LCD +# +restore_configs +opt_set MOTHERBOARD BOARD_RAMPS_14_EFB EXTRUDERS 0 LCD_LANGUAGE en TEMP_SENSOR_COOLER 1 TEMP_SENSOR_1 0 \ + DEFAULT_AXIS_STEPS_PER_UNIT '{ 80, 80, 400 }' \ + DEFAULT_MAX_FEEDRATE '{ 300, 300, 5 }' \ + DEFAULT_MAX_ACCELERATION '{ 3000, 3000, 100 }' \ + MANUAL_FEEDRATE '{ 50*60, 50*60, 4*60 }' \ + AXIS_RELATIVE_MODES '{ false, false, false }' +opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT EEPROM_SETTINGS EEPROM_BOOT_SILENT EEPROM_AUTO_INIT \ + LASER_FEATURE AIR_EVACUATION AIR_EVACUATION_PIN AIR_ASSIST AIR_ASSIST_PIN LASER_COOLANT_FLOW_METER I2C_AMMETER + +exec_test $1 $2 "MEGA2560 RAMPS | Laser Feature | Air Evacuation | Air Assist | Cooler | Flowmeter | 44780 LCD " "$3" + +# +# Test redundant temperature sensors + MAX TC +# +restore_configs +opt_set MOTHERBOARD BOARD_RAMPS_14_EFB EXTRUDERS 1 \ + TEMP_SENSOR_0 -2 TEMP_SENSOR_REDUNDANT -2 \ + TEMP_SENSOR_REDUNDANT_SOURCE E1 TEMP_SENSOR_REDUNDANT_TARGET E0 \ + TEMP_0_CS_PIN 11 TEMP_1_CS_PIN 12 + +exec_test $1 $2 "MEGA2560 RAMPS | Redundant temperature sensor | 2x MAX6675" "$3" + +# +# Polargraph Config +# +use_example_configs Polargraph +exec_test $1 $2 "RUMBA | POLARGRAPH | RRD LCD" "$3" + # # Language files test with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER # #restore_configs #opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT -#for lang in an bg ca cz da de el el_gr en es eu fi fr gl hr hu it jp_kana nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff" "$3"; done +#for lang in an bg ca cz da de el el_CY en es eu fi fr gl hr hu it jp_kana nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff" "$3"; done # #restore_configs #opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT -#for lang in an bg ca cz da de el el_gr en es eu fi fr gl hr hu it jp_kana nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff" "$3"; done +#for lang in an bg ca cz da de el el_CY en es eu fi fr gl hr hu it jp_kana nl pl pt pt_br ro ru sk sv tr uk vi zh_CN zh_TW test; do opt_set LCD_LANGUAGE $lang; echo "compile with language $lang ..."; exec_test $1 $2 "Stuff" "$3"; done ######## Example Configurations ############## # diff --git a/buildroot/tests/mks_robin_stm32-tests b/buildroot/tests/mks_robin similarity index 100% rename from buildroot/tests/mks_robin_stm32-tests rename to buildroot/tests/mks_robin diff --git a/buildroot/tests/mks_robin_lite-tests b/buildroot/tests/mks_robin_lite_maple similarity index 65% rename from buildroot/tests/mks_robin_lite-tests rename to buildroot/tests/mks_robin_lite_maple index c4be4f206d2a..49ef0048716b 100755 --- a/buildroot/tests/mks_robin_lite-tests +++ b/buildroot/tests/mks_robin_lite_maple @@ -7,10 +7,8 @@ set -e restore_configs -opt_set MOTHERBOARD BOARD_MKS_ROBIN_LITE -opt_set SERIAL_PORT 1 -opt_enable EEPROM_SETTINGS -opt_enable SDSUPPORT +opt_set MOTHERBOARD BOARD_MKS_ROBIN_LITE SERIAL_PORT 1 +opt_enable EEPROM_SETTINGS SDSUPPORT exec_test $1 $2 "Default Configuration with Fallback SD EEPROM" "$3" # cleanup diff --git a/buildroot/tests/mks_robin-tests b/buildroot/tests/mks_robin_maple similarity index 82% rename from buildroot/tests/mks_robin-tests rename to buildroot/tests/mks_robin_maple index 652147f86707..ab4e6d71188b 100755 --- a/buildroot/tests/mks_robin-tests +++ b/buildroot/tests/mks_robin_maple @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Build tests for MKS Robin +# Build tests for MKS Robin with LibMaple STM32F1 HAL # (STM32F1 genericSTM32F103ZE) # @@ -16,6 +16,7 @@ exec_test $1 $2 "MKS Robin config (FSMC Color UI)" "$3" use_example_configs Mks/Robin opt_disable TFT_CLASSIC_UI TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 opt_enable TFT_LVGL_UI TFT_RES_480x320 +opt_set TFT_ROTATION TFT_ROTATE_180 exec_test $1 $2 "MKS Robin nano v1.2 LVGL FSMC" "$3" # cleanup diff --git a/buildroot/tests/mks_robin_mini-tests b/buildroot/tests/mks_robin_mini similarity index 71% rename from buildroot/tests/mks_robin_mini-tests rename to buildroot/tests/mks_robin_mini index 6675634f3068..29baee8818d6 100755 --- a/buildroot/tests/mks_robin_mini-tests +++ b/buildroot/tests/mks_robin_mini @@ -8,9 +8,7 @@ set -e use_example_configs Mks/Robin -opt_set MOTHERBOARD BOARD_MKS_ROBIN_MINI -opt_set EXTRUDERS 1 -opt_set TEMP_SENSOR_1 0 +opt_set MOTHERBOARD BOARD_MKS_ROBIN_MINI EXTRUDERS 1 TEMP_SENSOR_1 0 exec_test $1 $2 "MKS Robin mini" "$3" # cleanup diff --git a/buildroot/tests/mks_robin_nano35_stm32-tests b/buildroot/tests/mks_robin_nano35 similarity index 55% rename from buildroot/tests/mks_robin_nano35_stm32-tests rename to buildroot/tests/mks_robin_nano35 index 696fb9406952..f892d42d9ecb 100755 --- a/buildroot/tests/mks_robin_nano35_stm32-tests +++ b/buildroot/tests/mks_robin_nano35 @@ -15,14 +15,15 @@ opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO exec_test $1 $2 "MKS Robin nano v1.2 Emulated DOGM FSMC" "$3" # -# MKS Robin v2 nano Emulated DOGM SPI -# (Robin v2 nano has no FSMC interface) +# MKS Robin nano v2 Emulated DOGM SPI +# (Robin nano v2 has no FSMC interface) # use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_disable TFT_INTERFACE_FSMC -opt_enable TFT_INTERFACE_SPI -exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI" "$3" +opt_enable TFT_INTERFACE_SPI MKS_WIFI_MODULE +opt_add MKS_TEST +exec_test $1 $2 "MKS Robin nano v2 Emulated DOGM SPI, MKS_WIFI_MODULE" "$3" # # MKS Robin nano v1.2 LVGL FSMC @@ -34,36 +35,34 @@ exec_test $1 $2 "MKS Robin v2 nano Emulated DOGM SPI" "$3" # exec_test $1 $2 "MKS Robin nano v1.2 LVGL FSMC" "$3" # -# MKS Robin v2 nano LVGL SPI -# (Robin v2 nano has no FSMC interface) +# MKS Robin nano v2 LVGL SPI +# (Robin nano v2 has no FSMC interface) # # use_example_configs Mks/Robin # opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 # opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 # opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 -# exec_test $1 $2 "MKS Robin v2 nano LVGL SPI" "$3" +# exec_test $1 $2 "MKS Robin nano v2 LVGL SPI" "$3" # -# MKS Robin v2 nano New Color UI 480x320 SPI -# (Robin v2 nano has no FSMC interface) +# MKS Robin nano v2 New Color UI 480x320 SPI +# (Robin nano v2 has no FSMC interface) # use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_disable TFT_INTERFACE_FSMC TFT_RES_320x240 opt_enable TFT_INTERFACE_SPI TFT_RES_480x320 -exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI" "$3" +exec_test $1 $2 "MKS Robin nano v2 with New Color UI 480x320 SPI" "$3" # -# MKS Robin v2 nano LVGL SPI + TMC -# (Robin v2 nano has no FSMC interface) +# MKS Robin nano v2 LVGL SPI + TMC +# (Robin nano v2 has no FSMC interface) # -# use_example_configs Mks/Robin -# opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 -# opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 -# opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 -# opt_set X_DRIVER_TYPE TMC2209 -# opt_set Y_DRIVER_TYPE TMC2209 -# exec_test $1 $2 "MKS Robin v2 nano LVGL SPI + TMC" "$3" +use_example_configs Mks/Robin +opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 +opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 +opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 +exec_test $1 $2 "MKS Robin nano v2 LVGL SPI + TMC" "$3" # cleanup restore_configs diff --git a/buildroot/tests/mks_robin_nano35-tests b/buildroot/tests/mks_robin_nano35_maple similarity index 86% rename from buildroot/tests/mks_robin_nano35-tests rename to buildroot/tests/mks_robin_nano35_maple index 6e2f9f1b0c32..ebd5466ce61c 100755 --- a/buildroot/tests/mks_robin_nano35-tests +++ b/buildroot/tests/mks_robin_nano35_maple @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Build tests for MKS Robin nano +# Build tests for MKS Robin nano with LibMaple STM32F1 HAL # (STM32F1 genericSTM32F103VE) # @@ -32,6 +32,7 @@ use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 SERIAL_PORT_2 opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 MKS_WIFI_MODULE +opt_add MKS_TEST exec_test $1 $2 "MKS Robin v2 nano LVGL SPI w/ WiFi" "$3" # @@ -42,18 +43,17 @@ use_example_configs Mks/Robin opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 opt_disable TFT_INTERFACE_FSMC TFT_RES_320x240 opt_enable TFT_INTERFACE_SPI TFT_RES_480x320 -exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI" "$3" +opt_enable BINARY_FILE_TRANSFER +exec_test $1 $2 "MKS Robin v2 nano New Color UI 480x320 SPI + BINARY_FILE_TRANSFER" "$3" # # MKS Robin v2 nano LVGL SPI + TMC # (Robin v2 nano has no FSMC interface) # use_example_configs Mks/Robin -opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 +opt_set MOTHERBOARD BOARD_MKS_ROBIN_NANO_V2 X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2209 opt_disable TFT_INTERFACE_FSMC TFT_COLOR_UI TOUCH_SCREEN TFT_RES_320x240 opt_enable TFT_INTERFACE_SPI TFT_LVGL_UI TFT_RES_480x320 -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2209 exec_test $1 $2 "MKS Robin v2 nano LVGL SPI + TMC" "$3" # diff --git a/buildroot/tests/mks_robin_pro-tests b/buildroot/tests/mks_robin_pro_maple similarity index 55% rename from buildroot/tests/mks_robin_pro-tests rename to buildroot/tests/mks_robin_pro_maple index 3503d0ce1f7d..4b38ab97b6bf 100755 --- a/buildroot/tests/mks_robin_pro-tests +++ b/buildroot/tests/mks_robin_pro_maple @@ -8,13 +8,11 @@ set -e use_example_configs Mks/Robin_Pro opt_enable EMERGENCY_PARSER -opt_set SERIAL_PORT 3 -opt_disable SERIAL_PORT_2 -opt_set SDCARD_CONNECTION LCD -opt_set X_DRIVER_TYPE TMC2209 -opt_set Y_DRIVER_TYPE TMC2130 -opt_set TEMP_SENSOR_BED 1 -opt_disable THERMAL_PROTECTION_HOTENDS +opt_set SERIAL_PORT 3 \ + SDCARD_CONNECTION LCD \ + X_DRIVER_TYPE TMC2209 Y_DRIVER_TYPE TMC2130 \ + TEMP_SENSOR_BED 1 +opt_disable SERIAL_PORT_2 THERMAL_PROTECTION_HOTENDS exec_test $1 $2 "MKS Robin Pro, TMC Drivers, no thermal protection" "$3" # cleanup diff --git a/buildroot/tests/rambo-tests b/buildroot/tests/rambo similarity index 60% rename from buildroot/tests/rambo-tests rename to buildroot/tests/rambo index d471f4201c80..a563bd4ed375 100755 --- a/buildroot/tests/rambo-tests +++ b/buildroot/tests/rambo @@ -10,25 +10,19 @@ set -e # Lots of options - Formerly the first Mega2560 test # restore_configs -opt_set MOTHERBOARD BOARD_RAMBO -opt_set EXTRUDERS 2 -opt_set TEMP_SENSOR_0 -2 -opt_set TEMP_SENSOR_1 1 -opt_set TEMP_SENSOR_BED 2 -opt_set TEMP_SENSOR_PROBE 1 -opt_add TEMP_PROBE_PIN 12 -opt_set TEMP_SENSOR_CHAMBER 3 -opt_add TEMP_CHAMBER_PIN 3 -opt_add HEATER_CHAMBER_PIN 45 -opt_set GRID_MAX_POINTS_X 16 -opt_set FANMUX0_PIN 53 -opt_disable USE_WATCHDOG -opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST \ - FIX_MOUNTED_PROBE Z_SAFE_HOMING CODEPENDENT_XY_HOMING PIDTEMPBED PROBE_TEMP_COMPENSATION \ +opt_set MOTHERBOARD BOARD_RAMBO \ + EXTRUDERS 2 TEMP_SENSOR_0 -2 TEMP_SENSOR_1 1 TEMP_SENSOR_BED 2 \ + TEMP_SENSOR_PROBE 1 TEMP_PROBE_PIN 12 \ + TEMP_SENSOR_CHAMBER 3 TEMP_CHAMBER_PIN 3 HEATER_CHAMBER_PIN 45 \ + GRID_MAX_POINTS_X 16 \ + FANMUX0_PIN 53 +opt_disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN USE_WATCHDOG +opt_enable USE_ZMAX_PLUG REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TEST \ + FIX_MOUNTED_PROBE CODEPENDENT_XY_HOMING PIDTEMPBED PROBE_TEMP_COMPENSATION \ PREHEAT_BEFORE_PROBING PROBING_HEATERS_OFF PROBING_FANS_OFF PROBING_STEPPERS_OFF WAIT_FOR_BED_HEATER \ EEPROM_SETTINGS SDSUPPORT SD_REPRINT_LAST_SELECTED_FILE BINARY_FILE_TRANSFER \ BLINKM PCA9533 PCA9632 RGB_LED RGB_LED_R_PIN RGB_LED_G_PIN RGB_LED_B_PIN LED_CONTROL_MENU \ - NEOPIXEL_LED CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \ + NEOPIXEL_LED NEOPIXEL_PIN CASE_LIGHT_ENABLE CASE_LIGHT_USE_NEOPIXEL CASE_LIGHT_MENU \ PID_PARAMS_PER_HOTEND PID_AUTOTUNE_MENU PID_EDIT_MENU LCD_SHOW_E_TOTAL \ PRINTCOUNTER SERVICE_NAME_1 SERVICE_INTERVAL_1 LEVEL_BED_CORNERS LEVEL_CENTER_TOO \ NOZZLE_PARK_FEATURE FILAMENT_RUNOUT_SENSOR FILAMENT_RUNOUT_DISTANCE_MM \ @@ -38,7 +32,8 @@ opt_enable REPRAP_DISCOUNT_SMART_CONTROLLER LCD_PROGRESS_BAR LCD_PROGRESS_BAR_TE SKEW_CORRECTION SKEW_CORRECTION_FOR_Z SKEW_CORRECTION_GCODE \ BACKLASH_COMPENSATION BACKLASH_GCODE BAUD_RATE_GCODE BEZIER_CURVE_SUPPORT \ FWRETRACT ARC_P_CIRCLES CNC_WORKSPACE_PLANES CNC_COORDINATE_SYSTEMS \ - PSU_CONTROL AUTO_POWER_CONTROL POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE \ + PSU_CONTROL PS_OFF_CONFIRM PS_OFF_SOUND AUTO_POWER_CONTROL \ + POWER_LOSS_RECOVERY POWER_LOSS_PIN POWER_LOSS_STATE POWER_LOSS_RECOVER_ZHOME POWER_LOSS_ZHOME_POS \ SLOW_PWM_HEATERS THERMAL_PROTECTION_CHAMBER LIN_ADVANCE EXTRA_LIN_ADVANCE_K \ HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT PINS_DEBUGGING MAX7219_DEBUG M114_DETAIL opt_add DEBUG_POWER_LOSS_RECOVERY @@ -48,12 +43,15 @@ exec_test $1 $2 "RAMBO | EXTRUDERS 2 | CHAR LCD + SD | FIX Probe | ABL-Linear | # Full size Rambo Dual Endstop CNC # restore_configs -opt_set MOTHERBOARD BOARD_RAMBO -opt_set EXTRUDERS 0 -opt_set TEMP_SENSOR_0 999 -opt_set DUMMY_THERMISTOR_999_VALUE 170 -opt_set DIGIPOT_MOTOR_CURRENT '{ 120, 120, 120, 120, 120 }' -opt_set LEVEL_CORNERS_LEVELING_ORDER '{ LF, RF }' +opt_set MOTHERBOARD BOARD_RAMBO \ + EXTRUDERS 0 TEMP_SENSOR_0 999 DUMMY_THERMISTOR_999_VALUE 170 Z_HOME_DIR 1 \ + DIGIPOT_MOTOR_CURRENT '{ 120, 120, 120, 120, 120 }' \ + DEFAULT_AXIS_STEPS_PER_UNIT '{ 80, 80, 4000 }' \ + DEFAULT_MAX_FEEDRATE '{ 300, 300, 5 }' \ + DEFAULT_MAX_ACCELERATION '{ 3000, 3000, 100 }' \ + MANUAL_FEEDRATE '{ 50*60, 50*60, 4*60 }' \ + AXIS_RELATIVE_MODES '{ false, false, false }' \ + LEVEL_CORNERS_LEVELING_ORDER '{ LF, RF }' opt_enable USE_XMAX_PLUG USE_YMAX_PLUG USE_ZMAX_PLUG \ REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER REVERSE_ENCODER_DIRECTION SDSUPPORT EEPROM_SETTINGS \ S_CURVE_ACCELERATION X_DUAL_STEPPER_DRIVERS X_DUAL_ENDSTOPS Y_DUAL_STEPPER_DRIVERS Y_DUAL_ENDSTOPS \ @@ -66,9 +64,12 @@ exec_test $1 $2 "Rambo CNC Configuration" "$3" # Rambo heated bed only # restore_configs -opt_set MOTHERBOARD BOARD_RAMBO -opt_set EXTRUDERS 0 -opt_set TEMP_SENSOR_BED 1 +opt_set MOTHERBOARD BOARD_RAMBO EXTRUDERS 0 TEMP_SENSOR_BED 1 \ + DEFAULT_AXIS_STEPS_PER_UNIT '{ 80, 80, 4000 }' \ + DEFAULT_MAX_FEEDRATE '{ 300, 300, 5 }' \ + DEFAULT_MAX_ACCELERATION '{ 3000, 3000, 100 }' \ + MANUAL_FEEDRATE '{ 50*60, 50*60, 4*60 }' \ + AXIS_RELATIVE_MODES '{ false, false, false }' opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER exec_test $1 $2 "Rambo heated bed only" "$3" @@ -76,18 +77,18 @@ exec_test $1 $2 "Rambo heated bed only" "$3" # Build with the default configurations # restore_configs -opt_set MOTHERBOARD BOARD_EINSY_RAMBO -opt_set X_DRIVER_TYPE TMC2130 -opt_set Y_DRIVER_TYPE TMC2130 -opt_set Z_DRIVER_TYPE TMC2130 -opt_set E0_DRIVER_TYPE TMC2130 +opt_set MOTHERBOARD BOARD_EINSY_RAMBO \ + X_DRIVER_TYPE TMC2130 Y_DRIVER_TYPE TMC2130 Z_DRIVER_TYPE TMC2130 E0_DRIVER_TYPE TMC2130 exec_test $1 $2 "Einsy RAMBo with TMC2130" "$3" # # Test MINIRAMBO with PWM_MOTOR_CURRENT and many features # restore_configs -opt_set MOTHERBOARD BOARD_MINIRAMBO +opt_set MOTHERBOARD BOARD_MINIRAMBO \ + CONTROLLERFAN_SPEED_IDLE 128 \ + PWM_MOTOR_CURRENT '{ 1300, 1300, 1250 }' \ + I2C_SLAVE_ADDRESS 63 opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER \ SDSUPPORT PCA9632 SOUND_MENU_ITEM GCODE_REPEAT_MARKERS \ AUTO_BED_LEVELING_BILINEAR PROBE_MANUALLY LCD_BED_LEVELING G26_MESH_VALIDATION MESH_EDIT_MENU \ @@ -96,37 +97,33 @@ opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CO NOZZLE_PARK_FEATURE NOZZLE_CLEAN_FEATURE \ ADVANCED_PAUSE_FEATURE PARK_HEAD_ON_PAUSE ADVANCED_PAUSE_CONTINUOUS_PURGE FILAMENT_LOAD_UNLOAD_GCODES \ PRINTCOUNTER SERVICE_NAME_1 SERVICE_INTERVAL_1 M114_DETAIL -opt_set CONTROLLERFAN_SPEED_IDLE 128 opt_add M100_FREE_MEMORY_DUMPER opt_add M100_FREE_MEMORY_CORRUPTOR -opt_set PWM_MOTOR_CURRENT "{ 1300, 1300, 1250 }" -opt_set I2C_SLAVE_ADDRESS 63 -exec_test $1 $2 "MINIRAMBO | RRDGFSC | M100 | PWM_MOTOR_CURRENT | PRINTCOUNTER | Advanced Pause ..." "$3" +exec_test $1 $2 "MINIRAMBO | RRDGFSC | ABL Bilinear Manual | M100 | PWM_MOTOR_CURRENT | M600..." "$3" # # Test many less common options # restore_configs -opt_set MOTHERBOARD BOARD_RAMBO -opt_set TEMP_SENSOR_0 -2 -opt_set DIGIPOT_I2C_NUM_CHANNELS 5 -opt_set LCD_LANGUAGE it -opt_set MIXING_STEPPERS 2 -opt_set SERVO_DELAY "{ 300, 300, 300 }" +opt_set MOTHERBOARD BOARD_RAMBO \ + TEMP_SENSOR_0 -2 \ + DIGIPOT_I2C_NUM_CHANNELS 5 \ + LCD_LANGUAGE it \ + MIXING_STEPPERS 2 \ + SERVO_DELAY '{ 300, 300, 300 }' \ + CONTROLLER_FAN_PIN X_MAX_PIN FILWIDTH_PIN 5 \ + FAN_MIN_PWM 50 FAN_KICKSTART_TIME 100 \ + XY_FREQUENCY_LIMIT 15 opt_enable COREYX USE_XMAX_PLUG MIXING_EXTRUDER GRADIENT_MIX \ - BABYSTEPPING BABYSTEP_DISPLAY_TOTAL FILAMENT_LCD_DISPLAY \ + BABYSTEPPING BABYSTEP_DISPLAY_TOTAL FILAMENT_LCD_DISPLAY FILAMENT_WIDTH_SENSOR \ REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER MENU_ADDAUTOSTART SDSUPPORT SDCARD_SORT_ALPHA \ ENDSTOP_NOISE_THRESHOLD FAN_SOFT_PWM \ - FIX_MOUNTED_PROBE AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE FILAMENT_WIDTH_SENSOR PROBE_OFFSET_WIZARD \ + FIX_MOUNTED_PROBE PROBING_ESTEPPERS_OFF AUTO_BED_LEVELING_LINEAR DEBUG_LEVELING_FEATURE PROBE_OFFSET_WIZARD \ Z_SAFE_HOMING SHOW_TEMP_ADC_VALUES HOME_Y_BEFORE_X EMERGENCY_PARSER \ - SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT ADVANCED_OK M114_DETAIL \ + SD_ABORT_ON_ENDSTOP_HIT HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT HOST_PAUSE_M76 ADVANCED_OK M114_DETAIL \ VOLUMETRIC_DEFAULT_ON NO_WORKSPACE_OFFSETS EXTRA_FAN_SPEED FWRETRACT \ USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE CONTROLLER_FAN_USE_Z_ONLY -opt_set CONTROLLER_FAN_PIN X_MAX_PIN -opt_set FAN_MIN_PWM 50 -opt_set FAN_KICKSTART_TIME 100 -opt_set XY_FREQUENCY_LIMIT 15 -opt_add FILWIDTH_PIN 5 +opt_disable DISABLE_INACTIVE_EXTRUDER exec_test $1 $2 "Rambo | CoreXY, Gradient Mix | Endstop Int. | Home Y > X | FW Retract ..." "$3" # clean up diff --git a/buildroot/tests/rumba32-tests b/buildroot/tests/rumba32 similarity index 63% rename from buildroot/tests/rumba32-tests rename to buildroot/tests/rumba32 index 20a640efed46..f26af33610c6 100755 --- a/buildroot/tests/rumba32-tests +++ b/buildroot/tests/rumba32 @@ -8,31 +8,23 @@ set -e # Build examples restore_configs -opt_set MOTHERBOARD BOARD_RUMBA32_V1_0 -opt_set SERIAL_PORT -1 +opt_set MOTHERBOARD BOARD_RUMBA32_V1_0 SERIAL_PORT -1 \ + TEMP_SENSOR_BED 1 X_DRIVER_TYPE TMC2130 opt_disable PIDTEMP opt_enable PIDTEMPBED -opt_set TEMP_SENSOR_BED 1 opt_disable THERMAL_PROTECTION_BED -opt_set X_DRIVER_TYPE TMC2130 exec_test $1 $2 "RUMBA32 V1.0 with TMC2130, PID Bed, and bed thermal protection disabled" "$3" # Build examples restore_configs -opt_set MOTHERBOARD BOARD_RUMBA32_V1_1 -opt_set SERIAL_PORT -1 +opt_set MOTHERBOARD BOARD_RUMBA32_V1_1 SERIAL_PORT -1 \ + TEMP_SENSOR_BED 1 X_DRIVER_TYPE TMC2130 Y_DRIVER_TYPE TMC2208 opt_enable PIDTEMPBED EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -opt_set TEMP_SENSOR_BED 1 -opt_set X_DRIVER_TYPE TMC2130 -opt_set Y_DRIVER_TYPE TMC2208 exec_test $1 $2 "RUMBA32 V1.1 with TMC2130, TMC2208, PID Bed, EEPROM settings, and graphic LCD controller" "$3" # Build examples restore_configs -opt_set MOTHERBOARD BOARD_RUMBA32_MKS -opt_set SERIAL_PORT -1 -opt_set X_DRIVER_TYPE TMC2130 -opt_set Y_DRIVER_TYPE TMC2208 +opt_set MOTHERBOARD BOARD_RUMBA32_MKS SERIAL_PORT -1 X_DRIVER_TYPE TMC2130 Y_DRIVER_TYPE TMC2208 exec_test $1 $2 "RUMBA32 MKS Default Config with Mixed TMC Drivers" "$3" # cleanup diff --git a/buildroot/tests/sanguino1284p-tests b/buildroot/tests/sanguino1284p similarity index 83% rename from buildroot/tests/sanguino1284p-tests rename to buildroot/tests/sanguino1284p index 55cdf418da98..7c2aa61f69be 100755 --- a/buildroot/tests/sanguino1284p-tests +++ b/buildroot/tests/sanguino1284p @@ -10,10 +10,10 @@ set -e # Start with default configurations... # restore_configs -opt_set MOTHERBOARD BOARD_SANGUINOLOLU_12 -opt_set LCD_LANGUAGE de +opt_set MOTHERBOARD BOARD_SANGUINOLOLU_12 \ + LCD_LANGUAGE de \ + CONTROLLER_FAN_PIN 27 opt_enable MINIPANEL USE_CONTROLLER_FAN CONTROLLER_FAN_EDITABLE -opt_set CONTROLLER_FAN_PIN 27 exec_test $1 $2 "Default Configuration | MINIPANAL | CONTROLLER_FAN" "$3" # diff --git a/buildroot/tests/sanguino644p-tests b/buildroot/tests/sanguino644p similarity index 100% rename from buildroot/tests/sanguino644p-tests rename to buildroot/tests/sanguino644p diff --git a/buildroot/tests/teensy31-tests b/buildroot/tests/teensy31 similarity index 78% rename from buildroot/tests/teensy31-tests rename to buildroot/tests/teensy31 index 448a8860c7a0..10dde2be99ad 100755 --- a/buildroot/tests/teensy31-tests +++ b/buildroot/tests/teensy31 @@ -11,12 +11,21 @@ opt_set MOTHERBOARD BOARD_TEENSY31_32 exec_test $1 $2 "Teensy3.1 with default config" "$3" # -# Test many features together +# Zero endstops, as with a CNC # restore_configs opt_set MOTHERBOARD BOARD_TEENSY31_32 -opt_set TEMP_SENSOR_0 1 -opt_set TEMP_SENSOR_BED 1 +opt_disable USE_XMIN_PLUG USE_YMIN_PLUG USE_ZMIN_PLUG +exec_test $1 $2 "Teensy3.1 with Zero Endstops" "$3" + +# +# Test many features together +# +restore_configs +opt_set MOTHERBOARD BOARD_TEENSY31_32 \ + TEMP_SENSOR_0 1 TEMP_SENSOR_BED 1 \ + I2C_SLAVE_ADDRESS 63 \ + GRID_MAX_POINTS_X 16 opt_enable EEPROM_SETTINGS FILAMENT_WIDTH_SENSOR CALIBRATION_GCODE BAUD_RATE_GCODE \ FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR DEBUG_LEVELING_FEATURE Z_MIN_PROBE_REPEATABILITY_TEST \ BABYSTEPPING BABYSTEP_XY BABYSTEP_ZPROBE_OFFSET PRINTCOUNTER SLOW_PWM_HEATERS PIDTEMPBED \ @@ -25,6 +34,4 @@ opt_enable EEPROM_SETTINGS FILAMENT_WIDTH_SENSOR CALIBRATION_GCODE BAUD_RATE_GCO ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES \ PHOTO_GCODE PHOTO_POSITION PHOTO_SWITCH_POSITION PHOTO_SWITCH_MS PHOTO_DELAY_MS PHOTO_RETRACT_MM \ HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT -opt_set I2C_SLAVE_ADDRESS 63 -opt_set GRID_MAX_POINTS_X 16 exec_test $1 $2 "Teensy3.1 with many features" "$3" diff --git a/buildroot/tests/teensy35-tests b/buildroot/tests/teensy35 similarity index 71% rename from buildroot/tests/teensy35-tests rename to buildroot/tests/teensy35 index 79998a26d33e..09e8cee58ef3 100755 --- a/buildroot/tests/teensy35-tests +++ b/buildroot/tests/teensy35 @@ -14,11 +14,12 @@ exec_test $1 $2 "Teensy3.5 with default config" "$3" # Test as many features together as possible # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY35_36 -opt_set EXTRUDERS 2 -opt_set TEMP_SENSOR_0 1 -opt_set TEMP_SENSOR_1 5 -opt_set TEMP_SENSOR_BED 1 +opt_set MOTHERBOARD BOARD_TEENSY35_36 \ + EXTRUDERS 2 TEMP_SENSOR_0 1 TEMP_SENSOR_1 5 TEMP_SENSOR_BED 1 \ + I2C_SLAVE_ADDRESS 63 \ + GRID_MAX_POINTS_X 16 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LCD_INFO_MENU SDSUPPORT SDCARD_SORT_ALPHA \ FILAMENT_WIDTH_SENSOR FILAMENT_LCD_DISPLAY CALIBRATION_GCODE BAUD_RATE_GCODE SOUND_MENU_ITEM \ FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ @@ -27,8 +28,6 @@ opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER LCD_INFO_MENU SDSUPPORT ADVANCED_PAUSE_FEATURE ARC_SUPPORT BEZIER_CURVE_SUPPORT EXPERIMENTAL_I2CBUS EXTENDED_CAPABILITIES_REPORT AUTO_REPORT_TEMPERATURES PARK_HEAD_ON_PAUSE \ PHOTO_GCODE PHOTO_POSITION PHOTO_SWITCH_POSITION PHOTO_SWITCH_MS PHOTO_DELAY_MS PHOTO_RETRACT_MM \ HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT -opt_set I2C_SLAVE_ADDRESS 63 -opt_set GRID_MAX_POINTS_X 16 exec_test $1 $2 "Teensy3.5 with many features" "$3" # @@ -43,10 +42,9 @@ exec_test $1 $2 "Sled Z Probe with Linear leveling" "$3" # Test a Servo Probe # # restore_configs -# opt_set MOTHERBOARD BOARD_TEENSY35_36 +# opt_set MOTHERBOARD BOARD_TEENSY35_36 NUM_SERVOS 1 # opt_enable Z_PROBE_SERVO_NR Z_SERVO_ANGLES DEACTIVATE_SERVOS_AFTER_MOVE \ # AUTO_BED_LEVELING_3POINT DEBUG_LEVELING_FEATURE EEPROM_SETTINGS -# opt_set NUM_SERVOS 1 # exec_test $1 $2 "Servo Probe" # # ...with AUTO_BED_LEVELING_3POINT, DEBUG_LEVELING_FEATURE, EEPROM_SETTINGS, EEPROM_CHITCHAT, EXTENDED_CAPABILITIES_REPORT, and AUTO_REPORT_TEMPERATURES @@ -59,28 +57,24 @@ exec_test $1 $2 "Sled Z Probe with Linear leveling" "$3" # Test MAGNETIC_PARKING_EXTRUDER with LCD # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY35_36 -opt_set EXTRUDERS 2 -opt_set TEMP_SENSOR_1 1 -opt_enable MAGNETIC_PARKING_EXTRUDER ULTIMAKERCONTROLLER -exec_test $1 $2 "MAGNETIC_PARKING_EXTRUDER with LCD" "$3" +opt_set MOTHERBOARD BOARD_TEENSY35_36 EXTRUDERS 2 TEMP_SENSOR_1 1 SOL0_PIN 29 EXTRUDERS 2 +opt_enable PARKING_EXTRUDER ULTIMAKERCONTROLLER +exec_test $1 $2 "PARKING_EXTRUDER with LCD" "$3" # # Mixing Extruder # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY35_36 +opt_set MOTHERBOARD BOARD_TEENSY35_36 MIXING_STEPPERS 2 opt_enable MIXING_EXTRUDER DIRECT_MIXING_IN_G1 GRADIENT_MIX GRADIENT_VTOOL REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER -opt_set MIXING_STEPPERS 2 +opt_disable DISABLE_INACTIVE_EXTRUDER exec_test $1 $2 "Mixing Extruder" "$3" # # Test SWITCHING_EXTRUDER # # restore_configs -# opt_set MOTHERBOARD BOARD_TEENSY35_36 -# opt_set EXTRUDERS 2 -# opt_set NUM_SERVOS 1 +# opt_set MOTHERBOARD BOARD_TEENSY35_36 EXTRUDERS 2 NUM_SERVOS 1 # opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER # exec_test $1 $2 "SWITCHING_EXTRUDER" @@ -88,15 +82,11 @@ exec_test $1 $2 "Mixing Extruder" "$3" # Enable COREXY # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY35_36 -opt_enable COREXY -opt_set X_DRIVER_TYPE TMC5160 -opt_set Y_DRIVER_TYPE TMC5160 -opt_set X_MIN_ENDSTOP_INVERTING true -opt_set Y_MIN_ENDSTOP_INVERTING true -opt_add X_CS_PIN 46 -opt_add Y_CS_PIN 47 -opt_enable USE_ZMIN_PLUG MONITOR_DRIVER_STATUS SENSORLESS_HOMING +opt_set MOTHERBOARD BOARD_TEENSY35_36 \ + X_DRIVER_TYPE TMC5160 Y_DRIVER_TYPE TMC5160 \ + X_MIN_ENDSTOP_INVERTING true Y_MIN_ENDSTOP_INVERTING true \ + X_CS_PIN 46 Y_CS_PIN 47 +opt_enable COREXY USE_ZMIN_PLUG MONITOR_DRIVER_STATUS SENSORLESS_HOMING exec_test $1 $2 "Teensy 3.5/3.6 COREXY" "$3" # @@ -104,18 +94,16 @@ exec_test $1 $2 "Teensy 3.5/3.6 COREXY" "$3" # restore_configs opt_set MOTHERBOARD BOARD_TEENSY35_36 -opt_enable COREXZ -exec_test $1 $2 "Teensy 3.5/3.6 COREXZ" "$3" +opt_enable COREXZ BACKLASH_COMPENSATION BACKLASH_GCODE CORE_BACKLASH +exec_test $1 $2 "Teensy 3.5/3.6 COREXZ | BACKLASH" "$3" # # Enable Dual Z with Dual Z endstops # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY35_36 -opt_set NUM_Z_STEPPER_DRIVERS 2 +opt_set MOTHERBOARD BOARD_TEENSY35_36 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2 opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG pins_set ramps/RAMPS X_MAX_PIN -1 -opt_add Z2_MAX_PIN 2 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3" # Clean up diff --git a/buildroot/tests/teensy41-tests b/buildroot/tests/teensy41 similarity index 77% rename from buildroot/tests/teensy41-tests rename to buildroot/tests/teensy41 index 6829045496c0..fd89512ea57b 100755 --- a/buildroot/tests/teensy41-tests +++ b/buildroot/tests/teensy41 @@ -14,11 +14,12 @@ exec_test $1 $2 "Teensy4.1 with default config" "$3" # Test as many features together as possible # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY41 -opt_set EXTRUDERS 2 -opt_set TEMP_SENSOR_0 1 -opt_set TEMP_SENSOR_1 5 -opt_set TEMP_SENSOR_BED 1 +opt_set MOTHERBOARD BOARD_TEENSY41 \ + EXTRUDERS 2 TEMP_SENSOR_0 1 TEMP_SENSOR_1 5 TEMP_SENSOR_BED 1 \ + I2C_SLAVE_ADDRESS 63 \ + GRID_MAX_POINTS_X 16 \ + NOZZLE_CLEAN_START_POINT "{ { 10, 10, 3 }, { 10, 10, 3 } }" \ + NOZZLE_CLEAN_END_POINT "{ { 10, 20, 3 }, { 10, 20, 3 } }" opt_enable EXTENSIBLE_UI LCD_INFO_MENU SDSUPPORT SDCARD_SORT_ALPHA \ FILAMENT_LCD_DISPLAY CALIBRATION_GCODE BAUD_RATE_GCODE \ FIX_MOUNTED_PROBE Z_SAFE_HOMING AUTO_BED_LEVELING_BILINEAR Z_MIN_PROBE_REPEATABILITY_TEST DEBUG_LEVELING_FEATURE \ @@ -28,8 +29,6 @@ opt_enable EXTENSIBLE_UI LCD_INFO_MENU SDSUPPORT SDCARD_SORT_ALPHA \ PHOTO_GCODE PHOTO_POSITION PHOTO_SWITCH_POSITION PHOTO_SWITCH_MS PHOTO_DELAY_MS PHOTO_RETRACT_MM \ HOST_ACTION_COMMANDS HOST_PROMPT_SUPPORT opt_add EXTUI_EXAMPLE -opt_set I2C_SLAVE_ADDRESS 63 -opt_set GRID_MAX_POINTS_X 16 exec_test $1 $2 "Teensy4.1 with many features" "$3" # @@ -60,10 +59,8 @@ exec_test $1 $2 "Sled Z Probe with Linear leveling" "$3" # Test MAGNETIC_PARKING_EXTRUDER with no LCD # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY41 -opt_set EXTRUDERS 2 -opt_set TEMP_SENSOR_1 1 -opt_set SERIAL_PORT_2 -2 +opt_set MOTHERBOARD BOARD_TEENSY41 SERIAL_PORT_2 -2 \ + EXTRUDERS 2 TEMP_SENSOR_1 1 opt_enable EEPROM_SETTINGS MAGNETIC_PARKING_EXTRUDER exec_test $1 $2 "Ethernet, EEPROM, Magnetic Parking Extruder, No LCD" "$3" @@ -71,18 +68,16 @@ exec_test $1 $2 "Ethernet, EEPROM, Magnetic Parking Extruder, No LCD" "$3" # Mixing Extruder # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY41 +opt_set MOTHERBOARD BOARD_TEENSY41 MIXING_STEPPERS 2 opt_enable MIXING_EXTRUDER DIRECT_MIXING_IN_G1 GRADIENT_MIX GRADIENT_VTOOL -opt_set MIXING_STEPPERS 2 +opt_disable DISABLE_INACTIVE_EXTRUDER exec_test $1 $2 "Mixing Extruder" "$3" # # Test SWITCHING_EXTRUDER # # restore_configs -# opt_set MOTHERBOARD BOARD_TEENSY41 -# opt_set EXTRUDERS 2 -# opt_set NUM_SERVOS 1 +# opt_set MOTHERBOARD BOARD_TEENSY41 EXTRUDERS 2 NUM_SERVOS 1 # opt_enable SWITCHING_EXTRUDER ULTIMAKERCONTROLLER # exec_test $1 $2 "SWITCHING_EXTRUDER" "$3" @@ -90,15 +85,11 @@ exec_test $1 $2 "Mixing Extruder" "$3" # Enable COREXY # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY41 -opt_enable COREXY -opt_set X_DRIVER_TYPE TMC5160 -opt_set Y_DRIVER_TYPE TMC5160 -opt_set X_MIN_ENDSTOP_INVERTING true -opt_set Y_MIN_ENDSTOP_INVERTING true -opt_add X_CS_PIN 46 -opt_add Y_CS_PIN 47 -opt_enable USE_ZMIN_PLUG MONITOR_DRIVER_STATUS SENSORLESS_HOMING +opt_set MOTHERBOARD BOARD_TEENSY41 \ + X_DRIVER_TYPE TMC5160 Y_DRIVER_TYPE TMC5160 \ + X_MIN_ENDSTOP_INVERTING true Y_MIN_ENDSTOP_INVERTING true \ + X_CS_PIN 46 Y_CS_PIN 47 +opt_enable COREXY USE_ZMIN_PLUG MONITOR_DRIVER_STATUS SENSORLESS_HOMING exec_test $1 $2 "Teensy 4.0/4.1 COREXY" "$3" # @@ -113,11 +104,9 @@ exec_test $1 $2 "Teensy 4.0/4.1 COREXZ" "$3" # Enable Dual Z with Dual Z endstops # restore_configs -opt_set MOTHERBOARD BOARD_TEENSY41 +opt_set MOTHERBOARD BOARD_TEENSY41 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2 opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG -opt_set NUM_Z_STEPPER_DRIVERS 2 pins_set ramps/RAMPS X_MAX_PIN -1 -opt_add Z2_MAX_PIN 2 exec_test $1 $2 "Dual Z with Dual Z endstops" "$3" # Clean up diff --git a/data/www/bootstrap.min.css b/buildroot/web-ui/data/www/bootstrap.min.css similarity index 100% rename from data/www/bootstrap.min.css rename to buildroot/web-ui/data/www/bootstrap.min.css diff --git a/data/www/bootstrap.min.js b/buildroot/web-ui/data/www/bootstrap.min.js similarity index 100% rename from data/www/bootstrap.min.js rename to buildroot/web-ui/data/www/bootstrap.min.js diff --git a/data/www/bootstrap4-toggle.min.js b/buildroot/web-ui/data/www/bootstrap4-toggle.min.js similarity index 100% rename from data/www/bootstrap4-toggle.min.js rename to buildroot/web-ui/data/www/bootstrap4-toggle.min.js diff --git a/data/www/chart.lineargauge.js b/buildroot/web-ui/data/www/chart.lineargauge.js similarity index 100% rename from data/www/chart.lineargauge.js rename to buildroot/web-ui/data/www/chart.lineargauge.js diff --git a/buildroot/web-ui/data/www/chart.min.js b/buildroot/web-ui/data/www/chart.min.js new file mode 100755 index 000000000000..a87f61443e1b --- /dev/null +++ b/buildroot/web-ui/data/www/chart.min.js @@ -0,0 +1,7 @@ +/*! + * Chart.js v2.9.4 + * https://www.chartjs.org + * (c) 2020 Chart.js Contributors + * Released under the MIT License + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=e[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function i(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:d,getHsla:h,getRgb:function(t){var e=d(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:c,getAlpha:function(t){var e=d(t);if(e)return e[3];if(e=h(t))return e[3];if(e=c(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return f(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function d(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i=0;a--)e.call(n,t[a],a);else for(a=0;a=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-C.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*C.easeInBounce(2*t):.5*C.easeOutBounce(2*t-1)+.5}},P={effects:C};S.easingEffects=C;var A=Math.PI,D=A/180,T=2*A,I=A/2,F=A/4,O=2*A/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),se.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r=n?(H.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},Q=H.options.resolve,tt=["push","pop","shift","splice","unshift"];function et(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(tt.forEach((function(e){delete t[e]})),delete t._chartjs)}}var nt=function(t,e){this.initialize(t,e)};H.extend(nt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&et(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;tn&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;na?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function ot(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+at,rt(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=at,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+at,n.startAngle,!0),a=0;as;)a-=at;for(;a=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/at)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+at,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;tt.x&&(e=bt(e,"left","right")):t.basen?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function yt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&vt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}N._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var _t=K.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=vt(t),n=e.right-e.left,i=e.bottom-e.top,a=xt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return yt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return mt(n)?yt(n,t,null):yt(n,null,e)},inXRange:function(t){return yt(this._view,t,null)},inYRange:function(t){return yt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return mt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return mt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),kt={},wt=st,Mt=dt,St=gt,Ct=_t;kt.Arc=wt,kt.Line=Mt,kt.Point=St,kt.Rectangle=Ct;var Pt=H._deprecated,At=H.valueOrDefault;function Dt(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=H.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return H.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}N._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),N._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Tt=it.extend({dataElementType:kt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;it.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Pt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Pt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Pt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Pt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Pt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t=Rt?-zt:b<-Rt?zt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=zt,S=b<=Nt&&x>=Nt||x>=zt+Nt,C=b<=-Nt&&x>=-Nt||x>=Rt+Nt,P=b===-Rt||x>=Rt?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i0&&!isNaN(t)?zt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n0&&Ht(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ae(t,e,{intersect:!1})},point:function(t,e){return ee(t,Qt(e,t))},nearest:function(t,e,n){var i=Qt(e,t);n.axis=n.axis||"xy";var a=ie(n.axis);return ne(t,i,n.intersect,a)},x:function(t,e,n){var i=Qt(e,t),a=[],r=!1;return te(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Qt(e,t),a=[],r=!1;return te(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},oe=H.extend;function se(t,e){return H.where(t,(function(t){return t.pos===e}))}function le(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function ue(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function de(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-ue(o,t,"left","right"),a=e.outerHeight-ue(o,t,"top","bottom"),i!==t.w||a!==t.h){t.w=i,t.h=a;var l=n.horizontal?[i,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function he(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function ce(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;idiv{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&ge.default||ge,ve="$chartjs",be="chartjs-size-monitor",xe="chartjs-render-monitor",ye="chartjs-render-animation",_e=["animationstart","webkitAnimationStart"],ke={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function we(t,e){var n=H.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Me=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Se(t,e,n){t.addEventListener(e,n,Me)}function Ce(t,e,n){t.removeEventListener(e,n,Me)}function Pe(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Ae(t){var e=document.createElement("div");return e.className=t||"",e}function De(t,e,n){var i,a,r,o,s=t[ve]||(t[ve]={}),l=s.resizer=function(t){var e=Ae(be),n=Ae(be+"-expand"),i=Ae(be+"-shrink");n.appendChild(Ae()),i.appendChild(Ae()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Se(n,"scroll",a.bind(n,"expand")),Se(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Pe("resize",n)),i&&i.clientWidth0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index-1?t.split("\n"):t}function Ve(t){var e=N.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:ze(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:ze(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:ze(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:ze(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:ze(t.titleFontStyle,e.defaultFontStyle),titleFontSize:ze(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:ze(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:ze(t.footerFontStyle,e.defaultFontStyle),footerFontSize:ze(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function He(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function je(t){return Ee([],We(t))}var qe=K.extend({initialize:function(){this._model=Ve(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Ee(o,We(i)),o=Ee(o,We(a)),o=Ee(o,We(r))},getBeforeBody:function(){return je(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return H.each(t,(function(t){var r={before:[],lines:[],after:[]};Ee(r.before,We(i.beforeLabel.call(n,t,e))),Ee(r.lines,i.label.call(n,t,e)),Ee(r.after,We(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return je(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Ee(r,We(n)),r=Ee(r,We(i)),r=Ee(r,We(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=Ve(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],k=[];y=Be[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;ei.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.yl.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=Ne(e.rtl,e.x,e.width);for(t.x=He(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=H.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,H.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),H.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!H.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),Ue=Be,Ye=qe;Ye.positioners=Ue;var Ge=H.valueOrDefault;function Xe(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?H.merge(e[t][a],[Re.getScaleDefaults(r),o]):H.merge(e[t][a],o)}else H._merger(t,e,n,i)}})}function Ke(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||Object.create(null),r=n[t];"scales"===t?e[t]=Xe(a,r):"scale"===t?e[t]=H.merge(a,[Re.getScaleDefaults(r.type),r]):H._merger(t,e,n,i)}})}function Ze(t){var e=t.options;H.each(t.scales,(function(e){pe.removeBox(t,e)})),e=Ke(N.global,N[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function $e(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(H.findIndex(t,a)>=0);return i}function Je(t){return"top"===t||"bottom"===t}function Qe(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}N._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var tn=function(t,e){return this.construct(t,e),this};H.extend(tn.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Ke(N.global,N[t.type],t.options||{}),t}(e);var i=Oe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=H.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,tn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Le.notify(t,"beforeInit"),H.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Le.notify(t,"afterInit"),t},clear:function(){return H.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(H.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:H.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",H.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Le.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;H.each(e.xAxes,(function(t,n){t.id||(t.id=$e(e.xAxes,"x-axis-",n))})),H.each(e.yAxes,(function(t,n){t.id||(t.id=$e(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),H.each(i,(function(e){var i=e.options,r=i.id,o=Ge(i.type,e.dtype);Je(i.position)!==Je(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Re.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),H.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Re.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t=0;--n)this.drawDataset(e[n],t);Le.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Le.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Le.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Le.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Le.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return re.modes.single(this,t)},getElementsAtEvent:function(t){return re.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return re.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=re.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return re.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=H.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=H.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(H.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},sn=H.isArray,ln=H.isNullOrUndef,un=H.valueOrDefault,dn=H.valueAtIndexOrDefault;function hn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=rl+1e-6)))return o}function cn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[],_=0,k=0;for(a=0;ae){for(n=0;n=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-fn(l.gridLines)-u.padding-gn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=H.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){H.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){H.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=fn(o)+gn(r)),u?s&&(e.height=fn(o)+gn(r)):e.height=t.maxHeight,a.display&&s){var d=mn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=H.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){H.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ln(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;nn-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;es)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;iu)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e1?(h-d)/(u-1):null,bn(t,i,H.isNullOrUndef(a)?0:d-a,d),bn(t,i,h,H.isNullOrUndef(a)?t.length:h+a),vn(t)}return bn(t,i),vn(t)},_tickSize:function(){var t=this.options.ticks,e=H.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;yn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return _n(e)||_n(n)||(t=o.chart.data.datasets[n].data[e]),_n(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=H.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),wn={position:"bottom"};kn._defaults=wn;var Mn=H.noop,Sn=H.isNullOrUndef;var Cn=yn.extend({getRightValue:function(t){return"string"==typeof t?+t:yn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=H.sign(t.min),i=H.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Mn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:H.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=H.niceNum((g-f)/u/l)*l;if(p<1e-14&&Sn(d)&&Sn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=H.niceNum(r*p/u/l)*l),s||Sn(c)?n=Math.pow(10,H._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!Sn(d)&&H.almostWhole(d/p,p/1e3)&&(i=d),!Sn(h)&&H.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=H.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Sn(d)?i:d);for(var m=1;me.length-1?null:this.getPixelForValue(e[t])}}),In=Pn;Tn._defaults=In;var Fn=H.valueOrDefault,On=H.math.log10;var Ln={position:"left",ticks:{callback:on.formatters.logarithmic}};function Rn(t,e){return H.isFinite(t)&&t>=0?t:e}var zn=yn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t0){var e=H.min(t),n=H.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(On(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Rn(e.min),max:Rn(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=Fn(t.min,Math.pow(10,Math.floor(On(e.min)))),o=Math.floor(On(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(On(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(On(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10===++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(ne.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(On(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;yn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Fn(t.options.ticks.fontSize,N.global.defaultFontSize)/t._length),t._startValue=On(e),t._valueOffset=n,t._valueRange=(On(t.max)-On(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(On(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Nn=Ln;zn._defaults=Nn;var Bn=H.valueOrDefault,En=H.valueAtIndexOrDefault,Wn=H.options.resolve,Vn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:on.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Hn(t){var e=t.ticks;return e.display&&t.display?Bn(e.fontSize,N.global.defaultFontSize)+2*e.backdropPaddingY:0}function jn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:ta?{start:e-n,end:e}:{start:e,end:e+n}}function qn(t){return 0===t||180===t?"center":t<180?"left":"right"}function Un(t,e,n,i){var a,r,o=n.y+i/2;if(H.isArray(e))for(a=0,r=e.length;a270||t<90)&&(n.y-=e.h)}function Gn(t){return H.isNumber(t)?t:0}var Xn=Cn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Hn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;H.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);H.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Hn(this.options))},convertTicksToLabels:function(){var t=this;Cn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=H.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=H.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;er.r&&(r.r=f.end,o.r=h),g.startr.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Gn(a),r=Gn(r),o=Gn(o),s=Gn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(H.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Bn(s.lineWidth,o.lineWidth),u=Bn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Hn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=H.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=En(i.fontColor,s,N.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=H.toDegrees(h);e.textAlign=qn(c),Yn(c,t._pointLabelSizes[s],u),Un(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&H.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=En(e.color,i-1),u=En(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=H.options._parseFont(n),s=Bn(n.fontColor,N.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",H.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:H.noop}),Kn=Vn;Xn._defaults=Kn;var Zn=H._deprecated,$n=H.options.resolve,Jn=H.valueOrDefault,Qn=Number.MIN_SAFE_INTEGER||-9007199254740991,ti=Number.MAX_SAFE_INTEGER||9007199254740991,ei={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ni=Object.keys(ei);function ii(t,e){return t-e}function ai(t){return H.valueOrDefault(t.time.min,t.ticks.min)}function ri(t){return H.valueOrDefault(t.time.max,t.ticks.max)}function oi(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function si(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),H.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),H.isFinite(o)||(o=n.parse(o))),o)}function li(t,e){if(H.isNullOrUndef(e))return null;var n=t.options.time,i=si(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function ui(t,e,n,i){var a,r,o,s=ni.length;for(a=ni.indexOf(t);a=0&&(e[r].major=!0);return e}(t,r,o,n):r}var hi=yn.extend({initialize:function(){this.mergeTicksOptions(),yn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new rn._date(e.adapters.date);return Zn("time scale",n.format,"time.format","time.parser"),Zn("time scale",n.min,"time.min","ticks.min"),Zn("time scale",n.max,"time.max","ticks.max"),H.mergeIf(n.displayFormats,i.formats()),yn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),yn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=ti,f=Qn,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?ui(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ni.length-1;r>=ni.indexOf(n);r--)if(o=ni[r],ei[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ni[n?ni.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ni.indexOf(t)+1,n=ni.length;ee&&s=0&&t0?s:1}}),ci={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};hi._defaults=ci;var fi={category:kn,linear:Tn,logarithmic:zn,radialLinear:Xn,time:hi},gi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};rn._date.override("function"==typeof t?{_id:"moment",formats:function(){return gi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),N._set("global",{plugins:{filler:{propagate:!0}}});var pi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function vi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a0;--r)H.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function ki(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||N.global.defaultColor,o&&s&&r.length&&(H.canvas.clipArea(u,t.chartArea),ki(u,r,o,a,s,i._loop),H.canvas.unclipArea(u)))}},Mi=H.rtl.getRtlAdapter,Si=H.noop,Ci=H.valueOrDefault;function Pi(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}N._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;el.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;H.each(t.legendItems,(function(t,e){var i=Pi(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Si,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=N.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=Mi(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Ci(n.fontColor,i.defaultFontColor),g=H.options._parseFont(n),p=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Pi(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},H.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;H.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Ci(i.lineWidth,r.borderWidth);if(c.fillStyle=Ci(i.fillStyle,a),c.lineCap=Ci(i.lineCap,r.borderCapStyle),c.lineDashOffset=Ci(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Ci(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Ci(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Ci(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;H.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y})),H.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Di(t,e){var n=new Ai({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.legend=n}var Ti={id:"legend",_element:Ai,beforeInit:function(t){var e=t.options.legend;e&&Di(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(H.mergeIf(e,N.global.legend),n?(pe.configure(t,n,e),n.options=e):Di(t,e)):n&&(pe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Ii=H.noop;N._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Fi=K.extend({initialize:function(t){H.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Ii,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Ii,beforeSetDimensions:Ii,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Ii,beforeBuildLabels:Ii,buildLabels:Ii,afterBuildLabels:Ii,beforeFit:Ii,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(H.isArray(n.text)?n.text.length:1)*H.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Ii,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=H.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=H.valueOrDefault(n.fontColor,N.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(H.isArray(g))for(var p=0,m=0;m=0;i--){var a=t[i];if(e(a))return a}},H.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},H.almostEquals=function(t,e,n){return Math.abs(t-e)=t},H.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},H.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},H.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},H.toRadians=function(t){return t*(Math.PI/180)},H.toDegrees=function(t){return t*(180/Math.PI)},H._decimalPlaces=function(t){if(H.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},H.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},H.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},H.aliasPixel=function(t){return t%2==0?0:.5},H._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},H.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},H.EPSILON=Number.EPSILON||1e-14,H.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(a=e0?d[e-1]:null,a=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},H.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},H.niceNum=function(t,e){var n=Math.floor(H.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},H.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},H.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(H.getStyle(r,"padding-left")),u=parseFloat(H.getStyle(r,"padding-top")),d=parseFloat(H.getStyle(r,"padding-right")),h=parseFloat(H.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},H.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},H.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},H._calculatePadding=function(t,e,n){return(e=H.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},H._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},H.getMaximumWidth=function(t){var e=H._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-H._calculatePadding(e,"padding-left",n)-H._calculatePadding(e,"padding-right",n),a=H.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},H.getMaximumHeight=function(t){var e=H._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-H._calculatePadding(e,"padding-top",n)-H._calculatePadding(e,"padding-bottom",n),a=H.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},H.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},H.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},H.fontString=function(t,e,n){return e+" "+t+"px "+n},H.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;on.length){for(o=0;oi&&(i=r),i},H.numberOfLabelLines=function(t){var e=1;return H.each(t,(function(t){H.isArray(t)&&t.length>e&&(e=t.length)})),e},H.color=_?function(t){return t instanceof CanvasGradient&&(t=N.global.defaultColor),_(t)}:function(t){return console.error("Color.js not found!"),t},H.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:H.color(t).saturate(.5).darken(.1).rgbString()}}(),en._adapters=rn,en.Animation=$,en.animationService=J,en.controllers=Jt,en.DatasetController=it,en.defaults=N,en.Element=K,en.elements=kt,en.Interaction=re,en.layouts=pe,en.platform=Oe,en.plugins=Le,en.Scale=yn,en.scaleService=Re,en.Ticks=on,en.Tooltip=Ye,en.helpers.each(fi,(function(t,e){en.scaleService.registerScaleType(e,t,t._defaults)})),Li)Li.hasOwnProperty(Bi)&&en.plugins.register(Li[Bi]);en.platform.initialize();var Ei=en;return"undefined"!=typeof window&&(window.Chart=en),en.Chart=en,en.Legend=Li.legend._element,en.Title=Li.title._element,en.pluginService=en.plugins,en.PluginBase=en.Element.extend({}),en.canvasHelpers=en.helpers.canvas,en.layoutService=en.layouts,en.LinearScaleBase=Cn,en.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){en[t]=function(e,n){return new en(e,en.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Ei})); diff --git a/data/www/filesaver.min.js b/buildroot/web-ui/data/www/filesaver.min.js similarity index 100% rename from data/www/filesaver.min.js rename to buildroot/web-ui/data/www/filesaver.min.js diff --git a/data/www/index-ie.html b/buildroot/web-ui/data/www/index-ie.html similarity index 100% rename from data/www/index-ie.html rename to buildroot/web-ui/data/www/index-ie.html diff --git a/data/www/index.html b/buildroot/web-ui/data/www/index.html similarity index 100% rename from data/www/index.html rename to buildroot/web-ui/data/www/index.html diff --git a/data/www/jquery-3.5.1.slim.min.js b/buildroot/web-ui/data/www/jquery-3.5.1.slim.min.js similarity index 100% rename from data/www/jquery-3.5.1.slim.min.js rename to buildroot/web-ui/data/www/jquery-3.5.1.slim.min.js diff --git a/data/www/jquery.browser.min.js b/buildroot/web-ui/data/www/jquery.browser.min.js similarity index 100% rename from data/www/jquery.browser.min.js rename to buildroot/web-ui/data/www/jquery.browser.min.js diff --git a/data/www/marlin-logo-dark.png b/buildroot/web-ui/data/www/marlin-logo-dark.png similarity index 100% rename from data/www/marlin-logo-dark.png rename to buildroot/web-ui/data/www/marlin-logo-dark.png diff --git a/data/www/marlinui.eot b/buildroot/web-ui/data/www/marlinui.eot similarity index 100% rename from data/www/marlinui.eot rename to buildroot/web-ui/data/www/marlinui.eot diff --git a/data/www/marlinui.svg b/buildroot/web-ui/data/www/marlinui.svg similarity index 100% rename from data/www/marlinui.svg rename to buildroot/web-ui/data/www/marlinui.svg diff --git a/data/www/marlinui.ttf b/buildroot/web-ui/data/www/marlinui.ttf similarity index 100% rename from data/www/marlinui.ttf rename to buildroot/web-ui/data/www/marlinui.ttf diff --git a/data/www/marlinui.woff b/buildroot/web-ui/data/www/marlinui.woff similarity index 100% rename from data/www/marlinui.woff rename to buildroot/web-ui/data/www/marlinui.woff diff --git a/data/www/moment.min.js b/buildroot/web-ui/data/www/moment.min.js similarity index 100% rename from data/www/moment.min.js rename to buildroot/web-ui/data/www/moment.min.js diff --git a/data/www/webmarlin-class.js b/buildroot/web-ui/data/www/webmarlin-class.js similarity index 100% rename from data/www/webmarlin-class.js rename to buildroot/web-ui/data/www/webmarlin-class.js diff --git a/data/www/webmarlin-font.css b/buildroot/web-ui/data/www/webmarlin-font.css similarity index 100% rename from data/www/webmarlin-font.css rename to buildroot/web-ui/data/www/webmarlin-font.css diff --git a/data/www/webmarlin.css b/buildroot/web-ui/data/www/webmarlin.css similarity index 100% rename from data/www/webmarlin.css rename to buildroot/web-ui/data/www/webmarlin.css diff --git a/data/www/webmarlin.js b/buildroot/web-ui/data/www/webmarlin.js similarity index 100% rename from data/www/webmarlin.js rename to buildroot/web-ui/data/www/webmarlin.js diff --git a/config/README.md b/config/README.md index b5013627eace..413b10c99dd6 100644 --- a/config/README.md +++ b/config/README.md @@ -1,9 +1,3 @@ # Where have all the configurations gone? -Marlin configurations for specific machines are now maintained in their own repository at: - -## https://github.com/MarlinFirmware/Configurations - -Configuration files for use with the nightly `bugfix-2.0.x` branch can be downloaded from: - -## https://github.com/MarlinFirmware/Configurations/archive/bugfix-2.0.x.zip +## https://github.com/MarlinFirmware/Configurations/archive/release-2.0.9.2.zip diff --git a/data/www/chart.min.js b/data/www/chart.min.js deleted file mode 100644 index 7c16b0d1287d..000000000000 --- a/data/www/chart.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Chart.js v2.9.3 - * https://www.chartjs.org - * (c) 2019 Chart.js Contributors - * Released under the MIT License - */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=e[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function i(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var s=o,l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},u={getRgba:d,getHsla:h,getRgb:function(t){var e=d(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:c,getAlpha:function(t){var e=d(t);if(e)return e[3];if(e=h(t))return e[3];if(e=c(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return f(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function d(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;rn?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i=0;a--)e.call(n,t[a],a);else for(a=0;a=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},C={effects:S};M.easingEffects=S;var P=Math.PI,A=P/180,D=2*P,T=P/2,I=P/4,F=2*P/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),se.left-1e-6&&t.xe.top-1e-6&&t.y0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r=n?(V.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},J=V.options.resolve,Q=["push","pop","shift","splice","unshift"];function tt(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(Q.forEach((function(e){delete t[e]})),delete t._chartjs)}}var et=function(t,e){this.initialize(t,e)};V.extend(et.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&tt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;tn&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;na?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function rt(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+it,at(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=it,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+it,n.startAngle,!0),a=0;as;)a-=it;for(;a=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/it)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+it,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;tt.x&&(e=vt(e,"left","right")):t.basen?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function xt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&mt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}z._set("global",{elements:{rectangle:{backgroundColor:gt,borderColor:gt,borderSkipped:"bottom",borderWidth:0}}});var yt=X.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=mt(t),n=e.right-e.left,i=e.bottom-e.top,a=bt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return pt(n)?xt(n,t,null):xt(n,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return pt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return pt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),_t={},kt=ot,wt=ut,Mt=ft,St=yt;_t.Arc=kt,_t.Line=wt,_t.Point=Mt,_t.Rectangle=St;var Ct=V._deprecated,Pt=V.valueOrDefault;function At(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=V.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return V.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}z._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),z._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Dt=nt.extend({dataElementType:_t.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;nt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Ct("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ct("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ct("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ct("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ct("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t=Ot?-Rt:b<-Ot?Rt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=Rt,S=b<=zt&&x>=zt||x>=Rt+zt,C=b<=-zt&&x>=-zt||x>=Ot+zt,P=b===-Ot||x>=Ot?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i0&&!isNaN(t)?Rt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n0&&Vt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ie(t,e,{intersect:!1})},point:function(t,e){return te(t,Jt(e,t))},nearest:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis);return ee(t,i,n.intersect,a)},x:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},re=V.extend;function oe(t,e){return V.where(t,(function(t){return t.pos===e}))}function se(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function le(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ue(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-le(o,t,"left","right"),a=e.outerHeight-le(o,t,"top","bottom"),i!==t.w||a!==t.h)return t.w=i,t.h=a,n.horizontal?i!==t.w:a!==t.h}function de(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function he(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;idiv{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&fe.default||fe,me="$chartjs",ve="chartjs-size-monitor",be="chartjs-render-monitor",xe="chartjs-render-animation",ye=["animationstart","webkitAnimationStart"],_e={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ke(t,e){var n=V.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var we=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Me(t,e,n){t.addEventListener(e,n,we)}function Se(t,e,n){t.removeEventListener(e,n,we)}function Ce(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Pe(t){var e=document.createElement("div");return e.className=t||"",e}function Ae(t,e,n){var i,a,r,o,s=t[me]||(t[me]={}),l=s.resizer=function(t){var e=Pe(ve),n=Pe(ve+"-expand"),i=Pe(ve+"-shrink");n.appendChild(Pe()),i.appendChild(Pe()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Me(n,"scroll",a.bind(n,"expand")),Me(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Ce("resize",n)),i&&i.clientWidth0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index-1?t.split("\n"):t}function We(t){var e=z.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Re(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Re(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Re(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Re(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Re(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Re(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Re(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Re(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Re(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ve(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function He(t){return Be([],Ee(t))}var je=X.extend({initialize:function(){this._model=We(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Be(o,Ee(i)),o=Be(o,Ee(a)),o=Be(o,Ee(r))},getBeforeBody:function(){return He(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return V.each(t,(function(t){var r={before:[],lines:[],after:[]};Be(r.before,Ee(i.beforeLabel.call(n,t,e))),Be(r.lines,i.label.call(n,t,e)),Be(r.after,Ee(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return He(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Be(r,Ee(n)),r=Be(r,Ee(i)),r=Be(r,Ee(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=We(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],k=[];y=Ne[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;ei.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.yl.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=V.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,V.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),V.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!V.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),qe=Ne,Ue=je;Ue.positioners=qe;var Ye=V.valueOrDefault;function Ge(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?V.merge(e[t][a],[Oe.getScaleDefaults(r),o]):V.merge(e[t][a],o)}else V._merger(t,e,n,i)}})}function Xe(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||{},r=n[t];"scales"===t?e[t]=Ge(a,r):"scale"===t?e[t]=V.merge(a,[Oe.getScaleDefaults(r.type),r]):V._merger(t,e,n,i)}})}function Ke(t){var e=t.options;V.each(t.scales,(function(e){ge.removeBox(t,e)})),e=Xe(z.global,z[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ze(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(V.findIndex(t,a)>=0);return i}function $e(t){return"top"===t||"bottom"===t}function Je(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}z._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Qe=function(t,e){return this.construct(t,e),this};V.extend(Qe.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Xe(z.global,z[t.type],t.options||{}),t}(e);var i=Fe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=V.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Qe.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Le.notify(t,"beforeInit"),V.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Le.notify(t,"afterInit"),t},clear:function(){return V.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(V.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:V.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",V.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Le.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;V.each(e.xAxes,(function(t,n){t.id||(t.id=Ze(e.xAxes,"x-axis-",n))})),V.each(e.yAxes,(function(t,n){t.id||(t.id=Ze(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),V.each(i,(function(e){var i=e.options,r=i.id,o=Ye(i.type,e.dtype);$e(i.position)!==$e(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Oe.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),V.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Oe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t=0;--n)this.drawDataset(e[n],t);Le.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Le.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Le.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Le.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Le.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ae.modes.single(this,t)},getElementsAtEvent:function(t){return ae.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ae.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=ae.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return ae.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=V.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=V.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(V.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},on=V.isArray,sn=V.isNullOrUndef,ln=V.valueOrDefault,un=V.valueAtIndexOrDefault;function dn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=rl+1e-6)))return o}function hn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[];for(a=0;ae){for(n=0;n=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-cn(l.gridLines)-u.padding-fn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=V.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){V.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){V.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=cn(o)+fn(r)),u?s&&(e.height=cn(o)+fn(r)):e.height=t.maxHeight,a.display&&s){var d=pn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=V.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){V.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(sn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;nn-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;es)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;iu)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e1?(h-d)/(u-1):null,vn(t,i,V.isNullOrUndef(a)?0:d-a,d),vn(t,i,h,V.isNullOrUndef(a)?t.length:h+a),mn(t)}return vn(t,i),mn(t)},_tickSize:function(){var t=this.options.ticks,e=V.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;xn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return yn(e)||yn(n)||(t=o.chart.data.datasets[n].data[e]),yn(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=V.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),kn={position:"bottom"};_n._defaults=kn;var wn=V.noop,Mn=V.isNullOrUndef;var Sn=xn.extend({getRightValue:function(t){return"string"==typeof t?+t:xn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=V.sign(t.min),i=V.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:wn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:V.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=V.niceNum((g-f)/u/l)*l;if(p<1e-14&&Mn(d)&&Mn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=V.niceNum(r*p/u/l)*l),s||Mn(c)?n=Math.pow(10,V._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!Mn(d)&&V.almostWhole(d/p,p/1e3)&&(i=d),!Mn(h)&&V.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=V.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Mn(d)?i:d);for(var m=1;me.length-1?null:this.getPixelForValue(e[t])}}),Tn=Cn;Dn._defaults=Tn;var In=V.valueOrDefault,Fn=V.math.log10;var Ln={position:"left",ticks:{callback:rn.formatters.logarithmic}};function On(t,e){return V.isFinite(t)&&t>=0?t:e}var Rn=xn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t0){var e=V.min(t),n=V.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Fn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:On(e.min),max:On(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=In(t.min,Math.pow(10,Math.floor(Fn(e.min)))),o=Math.floor(Fn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(Fn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(Fn(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10===++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(ne.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Fn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;xn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=In(t.options.ticks.fontSize,z.global.defaultFontSize)/t._length),t._startValue=Fn(e),t._valueOffset=n,t._valueRange=(Fn(t.max)-Fn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Fn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),zn=Ln;Rn._defaults=zn;var Nn=V.valueOrDefault,Bn=V.valueAtIndexOrDefault,En=V.options.resolve,Wn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:rn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Vn(t){var e=t.ticks;return e.display&&t.display?Nn(e.fontSize,z.global.defaultFontSize)+2*e.backdropPaddingY:0}function Hn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:ta?{start:e-n,end:e}:{start:e,end:e+n}}function jn(t){return 0===t||180===t?"center":t<180?"left":"right"}function qn(t,e,n,i){var a,r,o=n.y+i/2;if(V.isArray(e))for(a=0,r=e.length;a270||t<90)&&(n.y-=e.h)}function Yn(t){return V.isNumber(t)?t:0}var Gn=Sn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Vn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;V.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);V.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Vn(this.options))},convertTicksToLabels:function(){var t=this;Sn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=V.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=V.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;er.r&&(r.r=f.end,o.r=h),g.startr.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Yn(a),r=Yn(r),o=Yn(o),s=Yn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(V.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Nn(s.lineWidth,o.lineWidth),u=Nn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Vn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=V.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=Bn(i.fontColor,s,z.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=V.toDegrees(h);e.textAlign=jn(c),Un(c,t._pointLabelSizes[s],u),qn(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&V.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=Bn(e.color,i-1),u=Bn(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=V.options._parseFont(n),s=Nn(n.fontColor,z.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",V.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:V.noop}),Xn=Wn;Gn._defaults=Xn;var Kn=V._deprecated,Zn=V.options.resolve,$n=V.valueOrDefault,Jn=Number.MIN_SAFE_INTEGER||-9007199254740991,Qn=Number.MAX_SAFE_INTEGER||9007199254740991,ti={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},ei=Object.keys(ti);function ni(t,e){return t-e}function ii(t){return V.valueOrDefault(t.time.min,t.ticks.min)}function ai(t){return V.valueOrDefault(t.time.max,t.ticks.max)}function ri(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function oi(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),V.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),V.isFinite(o)||(o=n.parse(o))),o)}function si(t,e){if(V.isNullOrUndef(e))return null;var n=t.options.time,i=oi(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function li(t,e,n,i){var a,r,o,s=ei.length;for(a=ei.indexOf(t);a=0&&(e[r].major=!0);return e}(t,r,o,n):r}var di=xn.extend({initialize:function(){this.mergeTicksOptions(),xn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new an._date(e.adapters.date);return Kn("time scale",n.format,"time.format","time.parser"),Kn("time scale",n.min,"time.min","ticks.min"),Kn("time scale",n.max,"time.max","ticks.max"),V.mergeIf(n.displayFormats,i.formats()),xn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),xn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=Qn,f=Jn,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?li(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ei.length-1;r>=ei.indexOf(n);r--)if(o=ei[r],ti[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ei[n?ei.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ei.indexOf(t)+1,n=ei.length;ee&&s=0&&t0?s:1}}),hi={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};di._defaults=hi;var ci={category:_n,linear:Dn,logarithmic:Rn,radialLinear:Gn,time:di},fi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};an._date.override("function"==typeof t?{_id:"moment",formats:function(){return fi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),z._set("global",{plugins:{filler:{propagate:!0}}});var gi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function mi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a0;--r)V.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function _i(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||z.global.defaultColor,o&&s&&r.length&&(V.canvas.clipArea(u,t.chartArea),_i(u,r,o,a,s,i._loop),V.canvas.unclipArea(u)))}},wi=V.rtl.getRtlAdapter,Mi=V.noop,Si=V.valueOrDefault;function Ci(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}z._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;el.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;V.each(t.legendItems,(function(t,e){var i=Ci(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Mi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=z.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=wi(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Si(n.fontColor,i.defaultFontColor),g=V.options._parseFont(n),p=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Ci(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},V.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;V.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Si(i.lineWidth,r.borderWidth);if(c.fillStyle=Si(i.fillStyle,a),c.lineCap=Si(i.lineCap,r.borderCapStyle),c.lineDashOffset=Si(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Si(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Si(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Si(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;V.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y})),V.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Ai(t,e){var n=new Pi({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.legend=n}var Di={id:"legend",_element:Pi,beforeInit:function(t){var e=t.options.legend;e&&Ai(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(V.mergeIf(e,z.global.legend),n?(ge.configure(t,n,e),n.options=e):Ai(t,e)):n&&(ge.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Ti=V.noop;z._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ii=X.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Ti,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Ti,beforeSetDimensions:Ti,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Ti,beforeBuildLabels:Ti,buildLabels:Ti,afterBuildLabels:Ti,beforeFit:Ti,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(V.isArray(n.text)?n.text.length:1)*V.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Ti,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=V.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=V.valueOrDefault(n.fontColor,z.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(V.isArray(g))for(var p=0,m=0;m=0;i--){var a=t[i];if(e(a))return a}},V.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},V.almostEquals=function(t,e,n){return Math.abs(t-e)=t},V.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},V.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},V.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},V.toRadians=function(t){return t*(Math.PI/180)},V.toDegrees=function(t){return t*(180/Math.PI)},V._decimalPlaces=function(t){if(V.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},V.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},V.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},V.aliasPixel=function(t){return t%2==0?0:.5},V._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},V.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},V.EPSILON=Number.EPSILON||1e-14,V.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e0?d[e-1]:null,(a=e0?d[e-1]:null,a=e=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},V.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},V.niceNum=function(t,e){var n=Math.floor(V.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},V.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},V.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(V.getStyle(r,"padding-left")),u=parseFloat(V.getStyle(r,"padding-top")),d=parseFloat(V.getStyle(r,"padding-right")),h=parseFloat(V.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},V.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},V.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},V._calculatePadding=function(t,e,n){return(e=V.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},V._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},V.getMaximumWidth=function(t){var e=V._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-V._calculatePadding(e,"padding-left",n)-V._calculatePadding(e,"padding-right",n),a=V.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},V.getMaximumHeight=function(t){var e=V._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-V._calculatePadding(e,"padding-top",n)-V._calculatePadding(e,"padding-bottom",n),a=V.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},V.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},V.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},V.fontString=function(t,e,n){return e+" "+t+"px "+n},V.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;on.length){for(o=0;oi&&(i=r),i},V.numberOfLabelLines=function(t){var e=1;return V.each(t,(function(t){V.isArray(t)&&t.length>e&&(e=t.length)})),e},V.color=k?function(t){return t instanceof CanvasGradient&&(t=z.global.defaultColor),k(t)}:function(t){return console.error("Color.js not found!"),t},V.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:V.color(t).saturate(.5).darken(.1).rgbString()}}(),tn._adapters=an,tn.Animation=Z,tn.animationService=$,tn.controllers=$t,tn.DatasetController=nt,tn.defaults=z,tn.Element=X,tn.elements=_t,tn.Interaction=ae,tn.layouts=ge,tn.platform=Fe,tn.plugins=Le,tn.Scale=xn,tn.scaleService=Oe,tn.Ticks=rn,tn.Tooltip=Ue,tn.helpers.each(ci,(function(t,e){tn.scaleService.registerScaleType(e,t,t._defaults)})),Li)Li.hasOwnProperty(Ni)&&tn.plugins.register(Li[Ni]);tn.platform.initialize();var Bi=tn;return"undefined"!=typeof window&&(window.Chart=tn),tn.Chart=tn,tn.Legend=Li.legend._element,tn.Title=Li.title._element,tn.pluginService=tn.plugins,tn.PluginBase=tn.Element.extend({}),tn.canvasHelpers=tn.helpers.canvas,tn.layoutService=tn.layouts,tn.LinearScaleBase=Sn,tn.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){tn[t]=function(e,n){return new tn(e,tn.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Bi})); diff --git a/docs/Queue.md b/docs/Queue.md new file mode 100644 index 000000000000..bce68b0551a7 --- /dev/null +++ b/docs/Queue.md @@ -0,0 +1,59 @@ +# Marlin's command queue concept + +Marlin Firmware processes G-code commands as they arrive from multiple sources, including the SD card and one or more serial ports such as USB-connected hosts, WiFi, Bluetooth, and so on. + +Marlin is also continuously processing the commands at the front of the queue, converting them into signals for many physical actuators such as motors, heaters, lasers, and RGB LEDs. + +The firmware needs to maintain continuity and timing so the command senders remain unblocked, while still performing physical movements and other actions in real-time, respecting the physical limits of stepper motors and other peripherals. + +To keep things flowing Marlin feeds a single queue of G-code commands from all inputs, inserting them in the order received. Movement commands immediately go into the Planner Buffer, if there is room. The buffering of a move is considered the completion of the command, so if a non-movement command has to occur after a move is done, and not just after a move is buffered, then there has to be an `M400` to wait for the Planner Buffer to finish. + +Whenever the command queue gets full the sender needs to wait for space to open up, and the host may need to re-send the last command again. Marlin does some handshaking to keep the host informed during a print job, described below. + +An opposite problem called "planner starvation" occurs when Marlin receives many short and fast moves in a row so the Planner Buffer gets completed very quickly. In this case the host can't send commands fast enough to prevent the Planner Buffer from emptying out. Planner starvation causes obvious stuttering and is commonly seen on overloaded deltabots during small curves. Marlin has strategies to mitigate this issue, but sometimes a model has to be re-sliced (or the G-code has to be post-processed with Arc Welder) just to stay within the machine's inherent limits. + +Here's a basic flowchart of Marlin command processing: +``` ++------+ Marlin's GCodeQueue +| | +--------------------------------------+ +-----------+ +| Host | | SerialState RingBuffer | | | +| | Marlin | NUM_SERIAL BUF_SIZE | | Marlin | ++--+---+ R/TX_BUFFER_SIZE | +---+ +------------------+ | | | + | +------------+ | | | | | | | GCode | + | | | | | | | MAX_CMD_SIZE +-+-----> processor | + | | Platform | | | | On EOL | +--------------+ | r_pos | | + +-------------> serial's +-----------> +--------> | G-code | | | +-----------+ + | buffer | | | | w_pos | | command | | | + | | | | | | | line | | | + +------------+ | +---+ | +--------------+ | | + | Line buffer | x BUF_SIZE | | + | | | | + | | | | + | | | | + | | | | + | +------------------+ | + | | + | | + | | + +--------------------------------------+ +``` + +Marlin is a single-threaded application with a main `loop()` that manages the command queue and an `idle()` routine that manages the hardware. The command queue is handled in two stages: +1. The `idle()` routine reads all inputs and attempts to enqueue any completed command lines. +2. The main `loop()` gets the command at the front the G-code queue (if any) and runs it. Each G-code command blocks the main loop, preventing the queue from advancing until it returns. To keep essential tasks and the UI running, any commands that run a long process need to call `idle()` frequently. + +## Synchronization + +To maintain synchronization Marlin replies "`ok`" to the host as soon as the command has been enqueued. This lets the host know that it can send another command, and well-behaved hosts will wait for this message. With `ADVANCED_OK` enabled the `ok` message includes extra information (such as the number of slots left in the queue). + +If no data is available on the serial buffer, Marlin can be configured to periodically send a "`wait`" message to the host. This was the only method of "host keepalive" provided in Marlin 1.0, but today the better options are `HOST_KEEPALIVE` and `ADVANCED_OK`. + +## Limitation of the design + +Some limitations to the design are evident: +1. Whenever the G-code processor is busy processing a command, the G-code queue cannot advance. +2. A long command like `G29` causes commands to pile up and to fill the queue, making the host wait. +3. Each serial input requires a buffer large enough for a complete G-code line. This is set by `MAX_CMD_SIZE` with a default value of 96. +4. Since serial buffer sizes are likely used as ring buffers themselves, as an optimization their sizes must be a power of 2 (64 or 128 bytes recommended). +5. If a host sends too much G-code at once it can saturate the `GCodeQueue`. This doesn't do anything to improve the processing rate of Marlin since only one command can be dispatched per loop iteration. +6. With the previous point in mind, it's clear that the longstanding wisdom that you don't need a large `BUF_SIZE` is not just apocryphal. The default value of 4 is typically just fine for a single serial port. (And, if you decide to send a `G25` to pause the machine, the wait will be much shorter!) diff --git a/docs/Serial.md b/docs/Serial.md index 69fa94fc154e..ff8f84ef9908 100644 --- a/docs/Serial.md +++ b/docs/Serial.md @@ -1,12 +1,11 @@ # Serial port architecture in Marlin -Marlin is targeting a pletora of different CPU architecture and platforms. Each of these platforms has its own serial interface. +Marlin is targeting a plethora of different CPU architectures and platforms. Each of these platforms has its own serial interface. While many provide a Arduino-like Serial class, it's not all of them, and the differences in the existing API create a very complex brain teaser for writing code that works more or less on each platform. Moreover, many platform have intrinsic needs about serial port (like forwarding the output on multiple serial port, providing a *serial-like* telnet server, mixing USB-based serial port with SD card emulation) that are difficult to handle cleanly in the other platform serial logic. - -Starting with version `2.0.9`, Marlin provides a common interface for its serial needs. +Starting with version 2.0.8, Marlin provides a common interface for its serial needs. ## Common interface @@ -16,7 +15,7 @@ Any implementation will need to follow this interface for being used transparent The implementation was written to prioritize performance over abstraction, so the base interface is not using virtual inheritance to avoid the cost of virtual dispatching while calling methods. Instead, the Curiously Recurring Template Pattern (**CRTP**) is used so that, upon compilation, the interface abstraction does not incur a performance cost. -Because some platform do not follow the same interface, the missing method in the actual low-level implementation are detected via SFINAE and a wrapper is generated when such method are missing. See `CALL_IF_EXISTS` macro in `Marlin/src/core/macros.h` for the documentation of this technic. +Because some platform do not follow the same interface, the missing method in the actual low-level implementation are detected via SFINAE and a wrapper is generated when such method are missing. See the `CALL_IF_EXISTS` macro in `Marlin/src/core/macros.h` for documentation of this technique. ## Composing the desired feature The different specificities for each architecture are provided by composing the serial type based on desired functionality. @@ -31,14 +30,45 @@ In the `Marlin/src/core/serial_hook.h` file, the different serial feature are de Since all the types above are using CRTP, it's possible to combine them to get the appropriate functionality. This is easily done via type definition of the feature. -For example, to present a serial interface that's outputting to 2 serial port, the first one being hooked at runtime and the second one connected to a runtime switchable telnet client, you'll declare the type to use as: +For example, to create a single serial interface with 2 serial outputs (one enabled at runtime and the other switchable): +```cpp +typedef MultiSerial< RuntimeSerial, ConditionalSerial > Serial1Class; +``` + +To send the same output to 4 serial ports you could nest `MultiSerial` like this: +```cpp +typedef MultiSerial< MultiSerial< BaseSerial, BaseSerial >, MultiSerial< BaseSerial, BaseSerial, 2, 1>, 0, 2> Serial1Class; ``` -typedef MultiSerial< RuntimeSerial, ConditionalSerial > Serial0Type; +The magical numbers here are the step and offset for computing the serial port. Simplifying the above monster a bit: +```cpp +MS< A = MS, B=MS, offset=0, step=2> ``` +This means that the underlying multiserial A (with output to `a,b`) is available from offset = 0 to offset + step = 1 (default value). +The multiserial B (with output to `c,d`) is available from offset = 2 (the next step from the root multiserial) to offset + step = 3. +In practice, the root multiserial will redirect any index/mask `offset` to `offset + step - 1` to its first leaf, and any index/mask `offset + step` to `offset + 2*step - 1` to its second leaf. ## Emergency parser -By default, the serial base interface provide an emergency parser that's only enable for serial classes that support it. -Because of this condition, all underlying type takes a first `bool emergencyParserEnabled` argument to their constructor. You must take into account this parameter when defining the actual type used. +By default, the serial base interface provide an emergency parser that's only enable for serial classes that support it. Because of this condition, all underlying types take a first `bool emergencyParserEnabled` argument to their constructor. You must take into account this parameter when defining the actual type used. + +## SERIAL macros +The following macros are defined (in `serial.h`) to output data to the serial ports: +| MACRO | Parameters | Usage | Example | Expected output | +|-------|------------|-------|---------|-----------------| +| `SERIAL_ECHO` | Any basic type is supported (`char`, `uint8_t`, `int16_t`, `int32_t`, `float`, `long`, `const char*`, ...). | For a numeric type it prints the number in decimal. A string is output as a string. | `uint8_t a = 123; SERIAL_ECHO(a); SERIAL_CHAR(' '); SERIAL_ECHO(' '); ` | `123 32` | +| `SERIAL_ECHOLN` | Same as `SERIAL_ECHO` | Do `SERIAL_ECHO`, adding a newline | `int a = 456; SERIAL_ECHOLN(a);` | `456\n` | +| `SERIAL_ECHO_F` | `float` or `double` | Print a decimal value with a given precision (default 2) | `float a = 3.1415; SERIAL_ECHO_F(a); SERIAL_CHAR(' '); SERIAL_ECHO_F(a, 4);` | `3.14 3.1415`| +| `SERIAL_ECHOPGM` | String / Value pairs | Print a series of string literals and values alternately | `SERIAL_ECHOPGM("Bob", 34);` | `Bob34` | +| `SERIAL_ECHOLNPGM` | Same as `SERIAL_ECHOPGM` | Do `SERIAL_ECHOPGM`, adding a newline | `SERIAL_ECHOPGM("Alice", 56);` | `alice56` | +| `SERIAL_ECHOPGM_P` | Like `SERIAL_ECHOPGM` but takes PGM strings | Print a series of PGM strings and values alternately | `SERIAL_ECHOPGM_P(GET_TEXT(MSG_HELLO), 123);` | `Hello123` | +| `SERIAL_ECHOLNPGM_P` | Same as `SERIAL_ECHOPGM_P` | Do `SERIAL_ECHOPGM_P`, adding a newline | `SERIAL_ECHOLNPGM_P(PSTR("Alice"), 78);` | `alice78\n` | +| `SERIAL_ECHOLIST` | String literal, values | Print a string literal and a list of values | `SERIAL_ECHOLIST("Key ", 1, 2, 3);` | `Key 1, 2, 3` | +| `SERIAL_ECHO_START` | None | Prefix an echo line | `SERIAL_ECHO_START();` | `echo:` | +| `SERIAL_ECHO_MSG` | Same as `SERIAL_ECHOLN_PAIR` | Print a full echo line | `SERIAL_ECHO_MSG("Count is ", count);` | `echo:Count is 3` | +| `SERIAL_ERROR_START`| None | Prefix an error line | `SERIAL_ERROR_START();` | `Error:` | +| `SERIAL_ERROR_MSG` | Same as `SERIAL_ECHOLN_PAIR` | Print a full error line | `SERIAL_ERROR_MSG("Not found");` | `Error:Not found` | +| `SERIAL_ECHO_SP` | Number of spaces | Print one or more spaces | `SERIAL_ECHO_SP(3)` | ` ` | +| `SERIAL_EOL` | None | Print an end of line | `SERIAL_EOL();` | `\n` | +| `SERIAL_OUT` | `SERIAL_OUT(myMethod)` | Call a custom serial method | `SERIAL_OUT(msgDone);` | ... | *This document was written by [X-Ryl669](https://blog.cyril.by) and is under [CC-SA license](https://creativecommons.org/licenses/by-sa)* diff --git a/ini/avr.ini b/ini/avr.ini new file mode 100644 index 000000000000..e4d64de712a1 --- /dev/null +++ b/ini/avr.ini @@ -0,0 +1,175 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# # +# AVR Architecture # +# # +################################# + +# +# AVR (8-bit) Common Environment values +# +[common_avr8] +build_flags = ${common.build_flags} -Wl,--relax +board_build.f_cpu = 16000000L +src_filter = ${common.default_src_filter} + + +# +# ATmega2560 +# +[env:mega2560] +platform = atmelavr +extends = common_avr8 +board = megaatmega2560 + +# +# ATmega2560 with extended pins 70-85 defined +# BOARD_BQ_ZUM_MEGA_3D +# BOARD_ULTIMAIN_2 +# BOARD_MIGHTYBOARD_REVE +# BOARD_EINSTART_S +# +[env:mega2560ext] +platform = atmelavr +extends = env:mega2560 +board_build.variant = MARLIN_MEGA_EXTENDED +extra_scripts = ${common.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py + +# +# ATmega1280 +# +[env:mega1280] +platform = atmelavr +extends = common_avr8 +board = megaatmega1280 + +# +# MightyBoard AVR with extended pins +# +[mega_extended_optimized] +extends = common_avr8 +board_build.variant = MARLIN_MEGA_EXTENDED +extra_scripts = ${env:mega2560ext.extra_scripts} +upload_speed = 57600 +build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues + +# +# MightyBoard ATmega1280 +# +[env:MightyBoard1280] +platform = atmelavr +extends = mega_extended_optimized +board = megaatmega1280 + +# +# MightyBoard ATmega2560 +# +[env:MightyBoard2560] +platform = atmelavr +extends = mega_extended_optimized +board = megaatmega2560 + +# +# RAMBo +# +[env:rambo] +platform = atmelavr +extends = common_avr8 +board = reprap_rambo + +# +# FYSETC F6 V1.3 / V1.4 +# +[env:FYSETC_F6] +platform = atmelavr +extends = common_avr8 +board = fysetc_f6_13 + +# +# Sanguinololu (ATmega644p) +# +[env:sanguino644p] +platform = atmelavr +extends = common_avr8 +board = sanguino_atmega644p + +# +# Sanguinololu (ATmega1284p) +# +[env:sanguino1284p] +platform = atmelavr +extends = common_avr8 +board = sanguino_atmega1284p +board_upload.maximum_size = 126976 + +# +# Melzi and clones (ATmega1284p) +# +[env:melzi] +platform = atmelavr +extends = env:sanguino1284p +upload_speed = 57600 + +# +# Sanguinololu (ATmega1284p stock bootloader with tuned flags) +# + +[tuned_1284p] +build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues + +[env:sanguino1284p_optimized] +platform = atmelavr +extends = env:melzi +build_flags = ${tuned_1284p.build_flags} + +# +# Melzi and clones (alias for sanguino1284p_optimized) +# +[env:melzi_optimized] +platform = atmelavr +extends = env:sanguino1284p_optimized + +# +# Melzi and clones (Optiboot bootloader) +# +[env:melzi_optiboot] +platform = atmelavr +extends = common_avr8 +board = sanguino_atmega1284p +upload_speed = 115200 +board_upload.maximum_size = 130048 + +# +# Melzi and clones (Zonestar Melzi2 with tuned flags) +# +[env:melzi_optiboot_optimized] +platform = atmelavr +extends = env:melzi_optiboot +build_flags = ${tuned_1284p.build_flags} + +# +# AT90USB1286 boards using CDC bootloader +# - BRAINWAVE +# - BRAINWAVE_PRO +# - SAV_MKI +# - TEENSYLU +# +[env:at90usb1286_cdc] +platform = teensy +extends = common_avr8 +board = marlin_at90usb1286 +lib_ignore = ${env:common_avr8.lib_ignore}, Teensy_ADC, NativeEthernet + +# +# AT90USB1286 boards using DFU bootloader +# - Printrboard +# - Printrboard Rev.F +# - ? 5DPRINT ? +# +[env:at90usb1286_dfu] +platform = teensy +extends = env:at90usb1286_cdc diff --git a/ini/due.ini b/ini/due.ini new file mode 100644 index 000000000000..9123af8cdc88 --- /dev/null +++ b/ini/due.ini @@ -0,0 +1,43 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# # +# DUE Architecture # +# # +################################# + +# +# Due (Atmel SAM3X8E ARM Cortex-M3) +# +# - RAMPS4DUE +# - RADDS +# +[env:DUE] +platform = atmelsam +board = due +src_filter = ${common.default_src_filter} + + + +[env:DUE_USB] +platform = atmelsam +extends = env:DUE +board = dueUSB + +# +# Archim SAM +# +[common_DUE_archim] +platform = atmelsam +extends = env:DUE +board = marlin_archim +build_flags = ${common.build_flags} + -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON +board_build.variants_dir = buildroot/share/PlatformIO/variants/ +extra_scripts = ${common.extra_scripts} + Marlin/src/HAL/DUE/upload_extra_script.py + +[env:DUE_archim] +platform = ${common_DUE_archim.platform} +extends = common_DUE_archim diff --git a/ini/esp32.ini b/ini/esp32.ini new file mode 100644 index 000000000000..9c0c44db67b9 --- /dev/null +++ b/ini/esp32.ini @@ -0,0 +1,39 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# # +# ESP32 Architecture # +# # +################################# + +# +# Espressif ESP32 +# +[env:esp32] +platform = espressif32@2.1.0 +board = esp32dev +build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0 +src_filter = ${common.default_src_filter} + +lib_ignore = NativeEthernet +upload_speed = 500000 +monitor_speed = 250000 +#upload_port = marlinesp.local +#board_build.flash_mode = qio + +[env:FYSETC_E4] +platform = espressif32@2.1.0 +extends = env:esp32 +board_build.partitions = default_16MB.csv + +[env:PANDA] +platform = espressif32@2.1.0 +extends = env:esp32 +build_flags = ${env:esp32.build_flags} -DUSE_ESP32_EXIO -DUSE_ESP32_TASK_WDT +lib_deps = ${common.lib_deps} + SoftwareSerialEsp32 +board_build.partitions = Marlin/src/HAL/ESP32/esp32.csv +upload_speed = 115200 +monitor_speed = 115200 diff --git a/ini/features.ini b/ini/features.ini new file mode 100644 index 000000000000..f54b645f85bb --- /dev/null +++ b/ini/features.ini @@ -0,0 +1,234 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# # +# Features Dependencies # +# # +################################# + +[features] +YHCB2004 = red-scorp/LiquidCrystal_AIP31068@^1.0.4, red-scorp/SoftSPIB@^1.1.1 +HAS_TFT_LVGL_UI = lvgl=https://github.com/makerbase-mks/LVGL-6.1.1-MKS/archive/master.zip + src_filter=+ + extra_scripts=download_mks_assets.py +POSTMORTEM_DEBUGGING = src_filter=+ + + build_flags=-funwind-tables +MKS_WIFI_MODULE = QRCode=https://github.com/makerbase-mks/QRCode/archive/master.zip +HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.3 + src_filter=+ + + + + +HAS_STEALTHCHOP = src_filter=+ +SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip +HAS_MOTOR_CURRENT_I2C = SlowSoftI2CMaster + src_filter=+ +HAS_TMC26X = TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip + src_filter=+ +HAS_L64XX = Arduino-L6470@0.8.0 + src_filter=+ + + + +LIB_INTERNAL_MAX31865 = src_filter=+ +NEOPIXEL_LED = adafruit/Adafruit NeoPixel@~1.8.0 + src_filter=+ +I2C_AMMETER = peterus/INA226Lib@1.1.2 +USES_LIQUIDCRYSTAL = LiquidCrystal=https://github.com/MarlinFirmware/New-LiquidCrystal/archive/1.5.1.zip +USES_LIQUIDCRYSTAL_I2C = marcoschwartz/LiquidCrystal_I2C@1.1.4 +USES_LIQUIDTWI2 = LiquidTWI2@1.2.7 +HAS_WIRED_LCD = src_filter=+ +HAS_MARLINUI_HD44780 = src_filter=+ +HAS_MARLINUI_U8GLIB = U8glib-HAL@~0.5.0 + src_filter=+ +HAS_(FSMC|SPI|LTDC)_TFT = src_filter=+ + + +HAS_FSMC_TFT = src_filter=+ + +HAS_SPI_TFT = src_filter=+ + +I2C_EEPROM = src_filter=+ +SOFT_I2C_EEPROM = SlowSoftI2CMaster, SlowSoftWire=https://github.com/felias-fogg/SlowSoftWire/archive/master.zip +SPI_EEPROM = src_filter=+ +HAS_DWIN_E3V2|IS_DWIN_MARLINUI = src_filter=+ +DWIN_CREALITY_LCD = src_filter=+ +DWIN_CREALITY_LCD_ENHANCED = src_filter=+ +DWIN_CREALITY_LCD_JYERSUI = src_filter=+ +IS_DWIN_MARLINUI = src_filter=+ +HAS_GRAPHICAL_TFT = src_filter=+ +IS_TFTGLCD_PANEL = src_filter=+ +HAS_TOUCH_BUTTONS = src_filter=+ +HAS_LCD_MENU = src_filter=+ +HAS_GAMES = src_filter=+ +MARLIN_BRICKOUT = src_filter=+ +MARLIN_INVADERS = src_filter=+ +MARLIN_MAZE = src_filter=+ +MARLIN_SNAKE = src_filter=+ +HAS_MENU_BACKLASH = src_filter=+ +HAS_MENU_BED_CORNERS = src_filter=+ +LCD_BED_LEVELING = src_filter=+ +HAS_MENU_CANCELOBJECT = src_filter=+ +HAS_MENU_DELTA_CALIBRATE = src_filter=+ +HAS_MENU_FILAMENT = src_filter=+ +LCD_INFO_MENU = src_filter=+ +HAS_MENU_JOB_RECOVERY = src_filter=+ +HAS_MULTI_LANGUAGE = src_filter=+ + +HAS_MENU_LED = src_filter=+ +HAS_MENU_MEDIA = src_filter=+ +HAS_MENU_MIXER = src_filter=+ +HAS_MENU_MMU2 = src_filter=+ +HAS_MENU_PASSWORD = src_filter=+ +HAS_MENU_POWER_MONITOR = src_filter=+ +HAS_MENU_CUTTER = src_filter=+ +HAS_MENU_TEMPERATURE = src_filter=+ +HAS_MENU_TMC = src_filter=+ +HAS_MENU_TOUCH_SCREEN = src_filter=+ +HAS_MENU_TRAMMING = src_filter=+ +HAS_MENU_UBL = src_filter=+ +ANYCUBIC_LCD_CHIRON = src_filter=+ +ANYCUBIC_LCD_I3MEGA = src_filter=+ +HAS_DGUS_LCD_CLASSIC = src_filter=+ +DGUS_LCD_UI_RELOADED = src_filter=+ +DGUS_LCD_UI_FYSETC = src_filter=+ +DGUS_LCD_UI_HIPRECY = src_filter=+ +DGUS_LCD_UI_MKS = src_filter=+ +DGUS_LCD_UI_ORIGIN = src_filter=+ +EXTUI_EXAMPLE = src_filter=+ +TOUCH_UI_FTDI_EVE = src_filter=+ +MALYAN_LCD = src_filter=+ +NEXTION_TFT = src_filter=+ +USE_UHS2_USB = src_filter=+ +USE_UHS3_USB = src_filter=+ +USB_FLASH_DRIVE_SUPPORT = src_filter=+ +AUTO_BED_LEVELING_BILINEAR = src_filter=+ +AUTO_BED_LEVELING_(3POINT|(BI)?LINEAR) = src_filter=+ +MESH_BED_LEVELING = src_filter=+ + +AUTO_BED_LEVELING_UBL = src_filter=+ + +UBL_HILBERT_CURVE = src_filter=+ +BACKLASH_COMPENSATION = src_filter=+ +BARICUDA = src_filter=+ + +BINARY_FILE_TRANSFER = src_filter=+ + +BLTOUCH = src_filter=+ +CANCEL_OBJECTS = src_filter=+ + +CASE_LIGHT_ENABLE = src_filter=+ + +EXTERNAL_CLOSED_LOOP_CONTROLLER = src_filter=+ + +USE_CONTROLLER_FAN = src_filter=+ +HAS_MOTOR_CURRENT_DAC = src_filter=+ +DIRECT_STEPPING = src_filter=+ + +EMERGENCY_PARSER = src_filter=+ - +I2C_POSITION_ENCODERS = src_filter=+ +IIC_BL24CXX_EEPROM = src_filter=+ +HAS_SPI_FLASH = src_filter=+ +HAS_ETHERNET = src_filter=+ + +HAS_FANMUX = src_filter=+ +FILAMENT_WIDTH_SENSOR = src_filter=+ + +FWRETRACT = src_filter=+ + +HOST_ACTION_COMMANDS = src_filter=+ +HOTEND_IDLE_TIMEOUT = src_filter=+ +JOYSTICK = src_filter=+ +BLINKM = src_filter=+ +HAS_COLOR_LEDS = src_filter=+ + +PCA9533 = src_filter=+ +PCA9632 = src_filter=+ +PRINTER_EVENT_LEDS = src_filter=+ +TEMP_STAT_LEDS = src_filter=+ +MAX7219_DEBUG = src_filter=+ + +HAS_MEATPACK = src_filter=+ +MIXING_EXTRUDER = src_filter=+ + +HAS_PRUSA_MMU1 = src_filter=+ +HAS_PRUSA_MMU2 = src_filter=+ + +PASSWORD_FEATURE = src_filter=+ + +ADVANCED_PAUSE_FEATURE = src_filter=+ + + +PSU_CONTROL = src_filter=+ +HAS_POWER_MONITOR = src_filter=+ + +POWER_LOSS_RECOVERY = src_filter=+ + +PROBE_TEMP_COMPENSATION = src_filter=+ + +HAS_FILAMENT_SENSOR = src_filter=+ + +(EXT|MANUAL)_SOLENOID.* = src_filter=+ + +MK2_MULTIPLEXER = src_filter=+ +HAS_CUTTER = src_filter=+ + +HAS_DRIVER_SAFE_POWER_PROTECT = src_filter=+ +EXPERIMENTAL_I2CBUS = src_filter=+ + +MECHANICAL_GANTRY_CAL.+ = src_filter=+ +Z_MULTI_ENDSTOPS = src_filter=+ +Z_STEPPER_AUTO_ALIGN = src_filter=+ + +G26_MESH_VALIDATION = src_filter=+ +ASSISTED_TRAMMING = src_filter=+ + +HAS_MESH = src_filter=+ +HAS_LEVELING = src_filter=+ + +DELTA_AUTO_CALIBRATION = src_filter=+ +CALIBRATION_GCODE = src_filter=+ +Z_MIN_PROBE_REPEATABILITY_TEST = src_filter=+ +M100_FREE_MEMORY_WATCHER = src_filter=+ +BACKLASH_GCODE = src_filter=+ +IS_KINEMATIC = src_filter=+ +HAS_EXTRA_ENDSTOPS = src_filter=+ +SKEW_CORRECTION_GCODE = src_filter=+ +DIRECT_PIN_CONTROL = src_filter=+ + +PINS_DEBUGGING = src_filter=+ +NO_VOLUMETRICS = src_filter=- +HAS_MULTI_EXTRUDER = src_filter=+ +HAS_HOTEND_OFFSET = src_filter=+ +EDITABLE_SERVO_ANGLES = src_filter=+ +PIDTEMP = src_filter=+ +PREVENT_COLD_EXTRUSION = src_filter=+ +PIDTEMPBED = src_filter=+ +HAS_USER_THERMISTORS = src_filter=+ +SD_ABORT_ON_ENDSTOP_HIT = src_filter=+ +BAUD_RATE_GCODE = src_filter=+ +HAS_SMART_EFF_MOD = src_filter=+ +COOLANT_CONTROL|AIR_ASSIST = src_filter=+ +AIR_EVACUATION = src_filter=+ +HAS_SOFTWARE_ENDSTOPS = src_filter=+ +SERVO_DETACH_GCODE = src_filter=+ +HAS_DUPLICATION_MODE = src_filter=+ +LIN_ADVANCE = src_filter=+ +PHOTO_GCODE = src_filter=+ +CONTROLLER_FAN_EDITABLE = src_filter=+ +GCODE_MACROS = src_filter=+ +GRADIENT_MIX = src_filter=+ +HAS_SAVED_POSITIONS = src_filter=+ + +PARK_HEAD_ON_PAUSE = src_filter=+ +FILAMENT_LOAD_UNLOAD_GCODES = src_filter=+ +CNC_WORKSPACE_PLANES = src_filter=+ +CNC_COORDINATE_SYSTEMS = src_filter=+ +HAS_M206_COMMAND = src_filter=+ +EXPECTED_PRINTER_CHECK = src_filter=+ +HOST_KEEPALIVE_FEATURE = src_filter=+ +AUTO_REPORT_POSITION = src_filter=+ +REPETIER_GCODE_M360 = src_filter=+ +HAS_GCODE_M876 = src_filter=+ +HAS_RESUME_CONTINUE = src_filter=+ +HAS_STATUS_MESSAGE = src_filter=+ +HAS_LCD_CONTRAST = src_filter=+ +HAS_LCD_BRIGHTNESS = src_filter=+ +HAS_BUZZER = src_filter=+ +LCD_SET_PROGRESS_MANUALLY = src_filter=+ +TOUCH_SCREEN_CALIBRATION = src_filter=+ +ARC_SUPPORT = src_filter=+ +GCODE_MOTION_MODES = src_filter=+ +BABYSTEPPING = src_filter=+ + +Z_PROBE_SLED = src_filter=+ +G38_PROBE_TARGET = src_filter=+ +MAGNETIC_PARKING_EXTRUDER = src_filter=+ +SDSUPPORT = src_filter=+ + + + + + + +HAS_MEDIA_SUBCALLS = src_filter=+ +GCODE_REPEAT_MARKERS = src_filter=+ + +HAS_EXTRUDERS = src_filter=+ + + +HAS_COOLER = src_filter=+ +HAS_COOLER|LASER_COOLANT_FLOW_METER = src_filter=+ +AUTO_REPORT_TEMPERATURES = src_filter=+ +INCH_MODE_SUPPORT = src_filter=+ +TEMPERATURE_UNITS_SUPPORT = src_filter=+ +NEED_HEX_PRINT = src_filter=+ +NEED_LSF = src_filter=+ +NOZZLE_PARK_FEATURE = src_filter=+ + +NOZZLE_CLEAN_FEATURE = src_filter=+ + +DELTA = src_filter=+ + +POLARGRAPH = src_filter=+ +BEZIER_CURVE_SUPPORT = src_filter=+ + +PRINTCOUNTER = src_filter=+ +HAS_BED_PROBE = src_filter=+ + + + +IS_SCARA = src_filter=+ +HAS_SERVOS = src_filter=+ + +MORGAN_SCARA = src_filter=+ +HAS_MICROSTEPS = src_filter=+ +(ESP3D_)?WIFISUPPORT = AsyncTCP, ESP Async WebServer + ESP3DLib=https://github.com/luc-github/ESP3DLib/archive/master.zip + arduinoWebSockets=links2004/WebSockets@2.3.4 + luc-github/ESP32SSDP@^1.1.1 + lib_ignore=ESPAsyncTCP diff --git a/ini/lpc176x.ini b/ini/lpc176x.ini new file mode 100644 index 000000000000..3c5f43764ba6 --- /dev/null +++ b/ini/lpc176x.ini @@ -0,0 +1,44 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# # +# LPC176x Architecture # +# # +################################# + +# +# NXP LPC176x ARM Cortex-M3 +# +[common_LPC] +platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip +platform_packages = framework-arduino-lpc176x@^0.2.8 +board = nxp_lpc1768 +lib_ldf_mode = off +lib_compat_mode = strict +extra_scripts = ${common.extra_scripts} + Marlin/src/HAL/LPC1768/upload_extra_script.py +src_filter = ${common.default_src_filter} + + +lib_deps = ${common.lib_deps} + Servo +custom_marlin.USES_LIQUIDCRYSTAL = arduino-libraries/LiquidCrystal@~1.0.7 +custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip +build_flags = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g + # debug options for backtrace + #-funwind-tables + #-mpoke-function-name + +# +# NXP LPC176x ARM Cortex-M3 +# +[env:LPC1768] +platform = ${common_LPC.platform} +extends = common_LPC +board = nxp_lpc1768 + +[env:LPC1769] +platform = ${common_LPC.platform} +extends = common_LPC +board = nxp_lpc1769 diff --git a/ini/native.ini b/ini/native.ini new file mode 100644 index 000000000000..981e93f996cf --- /dev/null +++ b/ini/native.ini @@ -0,0 +1,133 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# # +# Native / Simulation # +# # +################################# + +# +# No supported Arduino libraries, base Marlin only +# +[env:linux_native] +platform = native +framework = +build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined +src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include +build_unflags = -Wall +lib_ldf_mode = off +lib_deps = +src_filter = ${common.default_src_filter} + + +# +# Native Simulation +# Builds with a small subset of available features +# Required system libraries: SDL2, SDL2-net, OpenGL, GLM +# +# Tested with Linux (Mint 20) : gcc [9.3.0, 10.2.0]: libsdl2-dev[2.0.10], libsdl2-net-dev[2.0.1], libglm-dev[0.9.9.7, 0.9.9.8] +# +# Debugging with gdb in vscode is as easy as adding the launch task as usual, but platformio +# will randomly remove your task when it recreates its tasks from a template. Add your gdb +# launch task to '~/.platformio/penv/lib/python{PYTHON_VERSION}/site-packages/platformio/ide/tpls/vscode/.vscode' +# to avoid this until platformio updates. +# +[simulator_common] +platform = native +framework = +build_flags = ${common.build_flags} -std=gnu++17 -D__PLAT_NATIVE_SIM__ -DU8G_HAL_LINKS -I/usr/include/SDL2 -IMarlin -IMarlin/src/HAL/NATIVE_SIM/include -IMarlin/src/HAL/NATIVE_SIM/u8g +src_build_flags = -Wall -Wno-expansion-to-defined -Wcast-align +release_flags = -g0 -O3 -flto +debug_build_flags = -fstack-protector-strong -g -g3 -ggdb +lib_compat_mode = off +src_filter = ${common.default_src_filter} + + +lib_deps = ${common.lib_deps} + MarlinSimUI=https://github.com/p3p/MarlinSimUI/archive/master.zip + Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/marlin_sim_native.zip + LiquidCrystal=https://github.com/p3p/LiquidCrystal/archive/master.zip +extra_scripts = ${common.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/simulator.py + + +[simulator_linux] +extends = simulator_common +build_flags = ${simulator_common.build_flags} -ldl -lpthread -lSDL2 -lSDL2_net -lGL + +[env:simulator_linux_debug] +platform = ${simulator_linux.platform} +extends = simulator_linux +build_type = debug + +[env:simulator_linux_release] +platform = ${simulator_linux.platform} +extends = simulator_linux +build_type = release +build_flags = ${simulator_linux.build_flags} ${simulator_linux.release_flags} + +# +# Simulator for macOS (MacPorts) +# +# sudo port install gcc10 gdb glm libsdl2 libsdl2_net freetype +# sudo port install ld64 @3_3 +ld64_xcode +# +# cd /opt/local/bin +# sudo rm -f gcc g++ cc +# sudo ln -s gcc-mp-10 gcc ; sudo ln -s g++-mp-10 g++ ; sudo ln -s g++ cc +# This step may be obsolete: +# sudo port uninstall ld64 ld64-latest +# +# cd - +# +# Use 'sudo port install mesa' to get a if no Xcode is installed. +# If Xcode is installed be sure to run `xcode-select --install` first. +# +# For VSCode debugging paste the block below near the top of launch.json. +# NOTE: The PlatformIO VSCode extension will remove it when regenerating launch.json. +# +# { "name": "Debug Sim", +# "type": "cppdbg", +# "request": "launch", +# "program": "${workspaceFolder}/.pio/build/simulator_macos/MarlinSimulator", +# "miDebuggerPath": "/opt/local/bin/ggdb", +# "MIMode": "gdb", +# "cwd": "${workspaceFolder}/.pio/build/simulator_macos" }, +# +[simulator_macos] +build_unflags = -lGL +custom_verbose = 0 +build_flags = + -I/opt/local/include + -I/opt/local/include/freetype2 + -I/opt/local/include/SDL2/ + -L/opt/local/lib + -Wl,-framework,OpenGl + -Wl,-framework,CoreFoundation + -lSDL2 + +[env:simulator_macos_debug] +platform = ${env:simulator_linux_release.platform} +extends = env:simulator_linux_debug +build_flags = ${env:simulator_linux_debug.build_flags} ${simulator_macos.build_flags} -ggdb -Og -D_THREAD_SAFE +build_unflags = ${simulator_macos.build_unflags} + +[env:simulator_macos_release] +platform = ${env:simulator_linux_release.platform} +extends = env:simulator_linux_release +build_flags = ${env:simulator_linux_release.build_flags} ${simulator_macos.build_flags} +build_unflags = ${simulator_macos.build_unflags} + +# +# Simulator for Windows 10 +# +# MSYS2 mingw-w64-x86_64 with these packages: +# pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw64/mingw-w64-x86_64-glm mingw64/mingw-w64-x86_64-SDL2 mingw64/mingw-w64-x86_64-SDL2_net mingw-w64-x86_64-dlfcn +# +[env:simulator_windows] +platform = ${simulator_common.platform} +extends = simulator_common +src_build_flags = ${simulator_common.src_build_flags} -fpermissive +build_flags = ${simulator_common.build_flags} ${simulator_common.debug_build_flags} -IC:\\msys64\\mingw64\\include\\SDL2 -fno-stack-protector -Wl,-subsystem,windows -ldl -lmingw32 -lSDL2main -lSDL2 -lSDL2_net -lopengl32 -lssp +build_type = debug diff --git a/ini/samd51.ini b/ini/samd51.ini new file mode 100644 index 000000000000..34fcc84371c8 --- /dev/null +++ b/ini/samd51.ini @@ -0,0 +1,26 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# # +# SAMD51 Architecture # +# # +################################# + +# +# Adafruit Grand Central M4 (Atmel SAMD51P20A ARM Cortex-M4) +# +[env:SAMD51_grandcentral_m4] +platform = atmelsam +board = adafruit_grandcentral_m4 +build_flags = ${common.build_flags} -std=gnu++17 +build_unflags = -std=gnu++11 +src_filter = ${common.default_src_filter} + +lib_deps = ${common.lib_deps} + SoftwareSerialM +extra_scripts = ${common.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/SAMD51_grandcentral_m4.py +custom_marlin.SDSUPPORT = SdFat - Adafruit Fork, Adafruit SPIFlash +debug_tool = jlink diff --git a/ini/stm32-common.ini b/ini/stm32-common.ini new file mode 100644 index 000000000000..54bc746ff4ff --- /dev/null +++ b/ini/stm32-common.ini @@ -0,0 +1,40 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +#################################### +# +# HAL/STM32 Common Environments +# +#################################### + +[common_stm32] +platform = ststm32@~12.1 +board_build.core = stm32 +build_flags = ${common.build_flags} + -std=gnu++14 -DHAL_STM32 + -DUSBCON -DUSBD_USE_CDC + -DTIM_IRQ_PRIO=13 +build_unflags = -std=gnu++11 +src_filter = ${common.default_src_filter} + + +extra_scripts = ${common.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py + +# +# STM32 board based on a variant. +# +[stm32_variant] +extends = common_stm32 +extra_scripts = ${common_stm32.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py + buildroot/share/PlatformIO/scripts/offset_and_rename.py + +# +# USB Flash Drive mix-ins for STM32 +# +[stm_flash_drive] +platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc-3.zip +build_flags = ${common_stm32.build_flags} + -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED + -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4 diff --git a/ini/stm32f0.ini b/ini/stm32f0.ini new file mode 100644 index 000000000000..4559f115bd8e --- /dev/null +++ b/ini/stm32f0.ini @@ -0,0 +1,54 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# +# STM32F0 Architecture +# +# Naming Example: STM32F070CBT6 +# +# F : Foundation +# 0 : Cortex M0 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) +# 70 : Line/Features +# C : 48 pins (R:64 or 66, F:20) +# B : 128KB Flash-memory (C:256KB, D:384KB, E:512KB, G:1024KB) +# T : LQFP package +# 6 : -40...85°C (7: ...105°C) +# +################################# + +# +# Malyan M200 v2 (STM32F070RB) +# +[env:STM32F070RB_malyan] +platform = ${common_stm32.platform} +extends = common_stm32 +board = marlin_malyanM200v2 +build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED + -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants + -fno-strict-aliasing -DCUSTOM_STARTUP_FILE + +# +# Malyan M200 v2 (STM32F070CB) +# +[env:STM32F070CB_malyan] +platform = ${common_stm32.platform} +extends = common_stm32 +board = malyanm200_f070cb +build_flags = ${common_stm32.build_flags} + -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB + -DHAL_UART_MODULE_ENABLED -DCUSTOM_STARTUP_FILE + +# +# Malyan M300 (STM32F070CB) +# +[env:malyan_M300] +platform = ${common_stm32.platform} +extends = common_stm32 +board = malyanm300_f070cb +build_flags = ${common_stm32.build_flags} + -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB + -DHAL_UART_MODULE_ENABLED +src_filter = ${common.default_src_filter} + diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini new file mode 100644 index 000000000000..f86bf98ebdc5 --- /dev/null +++ b/ini/stm32f1-maple.ini @@ -0,0 +1,421 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# +# STM32F1 Architecture with LibMaple STM32F1 HAL +# +# Naming Example: STM32F103RCT6 +# +# F : Foundation (sometimes High Performance F2/F4) +# 1 : Cortex M3 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) +# 03 : Line/Features +# R : 64 or 66 pins (V:100, Z:144, I:176) +# C : 256KB Flash-memory (D:384KB, E:512KB, G:1024KB) +# T : LQFP package +# 6 : -40...85°C (7: ...105°C) +# +################################# + +# +# HAL/STM32F1 Common Environment values +# +[common_stm32f1] +platform = ststm32@~12.1 +board_build.core = maple +build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py + ${common.build_flags} -DARDUINO_ARCH_STM32 -DMAPLE_STM32F1 +build_unflags = -std=gnu11 -std=gnu++11 +src_filter = ${common.default_src_filter} + +lib_ignore = SPI, FreeRTOS701, FreeRTOS821 +lib_deps = ${common.lib_deps} + SoftwareSerialM +platform_packages = tool-stm32duino +extra_scripts = ${common.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/fix_framework_weakness.py + pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py + buildroot/share/PlatformIO/scripts/offset_and_rename.py + +# +# STM32F103RC +# +[common_STM32F103RC_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103RC +monitor_speed = 115200 + +# +# MEEB_3DP (STM32F103RCT6 with 512K) +# +[env:STM32F103RC_meeb] +platform = ${common_stm32f1.platform} +extends = common_STM32F103RC_maple +board = marlin_MEEB_3DP +build_flags = ${common_stm32f1.build_flags} + -DDEBUG_LEVEL=0 + -DSS_TIMER=4 + -DSTM32_FLASH_SIZE=512 + -DHSE_VALUE=12000000U + -DUSE_USB_COMPOSITE + -DVECT_TAB_OFFSET=0x2000 + -DGENERIC_BOOTLOADER +extra_scripts = ${common_stm32f1.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py + buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py +lib_deps = ${common_stm32f1.lib_deps} + USBComposite for STM32F1@0.91 +custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use +debug_tool = stlink +upload_protocol = dfu + +# +# FYSETC STM32F103RC +# +[env:STM32F103RC_fysetc_maple] +platform = ${common_stm32f1.platform} +extends = common_STM32F103RC_maple +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py +build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 +lib_ldf_mode = chain +debug_tool = stlink +upload_protocol = serial + +# +# BigTree SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3) +# +# STM32F103RC_btt_maple ............. RCT6 with 256K +# STM32F103RC_btt_USB_maple ......... RCT6 with 256K (USB mass storage) +# +[env:STM32F103RC_btt_maple] +platform = ${common_stm32f1.platform} +extends = common_STM32F103RC_maple +board_build.address = 0x08007000 +board_build.ldscript = STM32F103RC_SKR_MINI_256K.ld +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py +build_flags = ${common_stm32f1.build_flags} + -DDEBUG_LEVEL=0 -DSS_TIMER=4 +monitor_speed = 115200 + +[env:STM32F103RC_btt_USB_maple] +platform = ${common_stm32f1.platform} +extends = env:STM32F103RC_btt_maple +build_flags = ${env:STM32F103RC_btt_maple.build_flags} -DUSE_USB_COMPOSITE +lib_deps = ${env:STM32F103RC_btt_maple.lib_deps} + USBComposite for STM32F1@0.91 + +# +# Generic STM32F103RE environment +# +[env:STM32F103RE_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103RE +monitor_speed = 115200 + +# +# Creality (STM32F103RET6) +# +[env:STM32F103RET6_creality_maple] +platform = ${common_stm32f1.platform} +extends = env:STM32F103RE_maple +build_flags = ${common_stm32f1.build_flags} -DTEMP_TIMER_CHAN=4 +board_build.address = 0x08007000 +board_build.ldscript = creality.ld +extra_scripts = ${common_stm32f1.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/random-bin.py + buildroot/share/PlatformIO/scripts/custom_board.py +debug_tool = jlink +upload_protocol = jlink + +# +# BigTree SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3) +# +# STM32F103RE_btt_maple ............. RET6 +# STM32F103RE_btt_USB_maple ......... RET6 (USB mass storage) +# +[env:STM32F103RE_btt_maple] +platform = ${common_stm32f1.platform} +extends = env:STM32F103RE_maple +board_build.address = 0x08007000 +board_build.ldscript = STM32F103RE_SKR_MINI_512K.ld +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py +build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 +debug_tool = stlink +upload_protocol = stlink + +[env:STM32F103RE_btt_USB_maple] +platform = ${common_stm32f1.platform} +extends = env:STM32F103RE_btt_maple +build_flags = ${env:STM32F103RE_btt_maple.build_flags} -DUSE_USB_COMPOSITE +lib_deps = ${common_stm32f1.lib_deps} + USBComposite for STM32F1@0.91 + +# +# Geeetech GTM32 (STM32F103VET6) +# +[env:STM32F103VE_GTM32] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103VE +build_flags = ${common_stm32f1.build_flags} + -ffunction-sections -fdata-sections -nostdlib -MMD + -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v + -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000 + -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 +upload_protocol = serial + +# +# Longer 3D board in Alfawise U20 (STM32F103VET6) +# +[env:STM32F103VE_longer_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103VE +board_build.address = 0x08010000 +board_build.rename = project.bin +board_build.ldscript = STM32F103VE_longer.ld +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py +build_flags = ${common_stm32f1.build_flags} + -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12 +build_unflags = ${common_stm32f1.build_unflags} + -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 + +# +# MKS Robin Mini (STM32F103VET6) +# +[env:mks_robin_mini_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103VE +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/mks_robin_mini.py +build_flags = ${common_stm32f1.build_flags} + -DMCU_STM32F103VE + +# +# MKS Robin Nano (STM32F103VET6) +# +[env:mks_robin_nano35_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103VE +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/mks_robin_nano35.py +build_flags = ${common_stm32f1.build_flags} + -DMCU_STM32F103VE -DSS_TIMER=4 +debug_tool = jlink +upload_protocol = jlink + +# +# MKS Robin (STM32F103ZET6) +# +[env:mks_robin_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103ZE +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/mks_robin.py +build_flags = ${common_stm32f1.build_flags} + -DSS_TIMER=4 -DSTM32_XL_DENSITY + +# +# MKS Robin Pro (STM32F103ZET6) +# +[env:mks_robin_pro_maple] +platform = ${common_stm32f1.platform} +extends = env:mks_robin_maple +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/mks_robin_pro.py + +# +# TRIGORILLA PRO (STM32F103ZET6) +# +[env:trigorilla_pro_maple] +platform = ${common_stm32f1.platform} +extends = env:mks_robin_maple +extra_scripts = ${common_stm32f1.extra_scripts} + +# +# MKS Robin E3D (STM32F103RCT6) and +# MKS Robin E3 with TMC2209 +# +[env:mks_robin_e3_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103RC +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/mks_robin_e3.py +build_flags = ${common_stm32f1.build_flags} + -DDEBUG_LEVEL=0 -DSS_TIMER=4 + +# +# MKS Robin E3p (STM32F103VET6) +# - LVGL UI +# +[env:mks_robin_e3p_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103VE +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/mks_robin_e3p.py +build_flags = ${common_stm32f1.build_flags} + -DMCU_STM32F103VE -DSS_TIMER=4 +debug_tool = jlink +upload_protocol = jlink + +# +# MKS Robin Lite/Lite2 (STM32F103RCT6) +# +[env:mks_robin_lite_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103RC +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/mks_robin_lite.py + +# +# MKS ROBIN LITE3 (STM32F103RCT6) +# +[env:mks_robin_lite3_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103RC +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/mks_robin_lite3.py + +# +# JGAurora A5S A1 (STM32F103ZET6) +# +[env:jgaurora_a5s_a1_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103ZE +board_build.address = 0x0800A000 +board_build.ldscript = jgaurora_a5s_a1.ld +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py + buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py +build_flags = ${common_stm32f1.build_flags} + -DSTM32F1xx -DSTM32_XL_DENSITY + +# +# Malyan M200 (STM32F103CB) +# +[env:STM32F103CB_malyan_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = marlin_malyanM200 +build_flags = ${common_stm32f1.build_flags} + -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections + -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__ +lib_ignore = ${common_stm32f1.lib_ignore} + SoftwareSerialM + +# +# Chitu boards like Tronxy X5s (STM32F103ZET6) +# +[env:chitu_f103_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = marlin_CHITU_F103 +extra_scripts = ${common_stm32f1.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/common-dependencies.py + pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py + buildroot/share/PlatformIO/scripts/chitu_crypt.py +build_flags = ${common_stm32f1.build_flags} + -DSTM32F1xx -DSTM32_XL_DENSITY +build_unflags = ${common_stm32f1.build_unflags} + -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 + +# +# Some Chitu V5 boards have a problem with GPIO init. +# Use this target if G28 or G29 are always failing. +# +[env:chitu_v5_gpio_init_maple] +platform = ${common_stm32f1.platform} +extends = env:chitu_f103_maple +build_flags = ${env:chitu_f103_maple.build_flags} -DCHITU_V5_Z_MIN_BUGFIX + +# +# FLYmaker FLY Mini (STM32F103RCT6) +# +[env:FLY_MINI_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103RC +board_build.address = 0x08005000 +board_build.ldscript = fly_mini.ld +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py +build_flags = ${common_stm32f1.build_flags} + -DDEBUG_LEVEL=0 -DSS_TIMER=4 + +# +# Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0 +# +# STM32F103RC_ZM3E2_USB_maple ........... RCT6 with 256K +# STM32F103VC_ZM3E4_USB_maple ........... VCT6 with 256K +# STM32F103VE_ZM3E4V2_USB_maple ......... VET6 with 512K +# +[ZONESTAR_ZM3E_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +platform_packages = tool-stm32duino +board_build.address = 0x08005000 +board_build.offset = 0x5000 +board_upload.maximum_size = 237568 +extra_scripts = ${common.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py + buildroot/share/PlatformIO/scripts/offset_and_rename.py +build_flags = ${common_stm32f1.build_flags} + -D__STM32F1__=1 -DDEBUG_LEVEL=0 -DSS_TIMER=4 -DSERIAL_USB +lib_deps = ${common_stm32f1.lib_deps} + USBComposite for STM32F1@0.91 +lib_ignore = Adafruit NeoPixel, SPI, SailfishLCD, SailfishRGB_LED, SlowSoftI2CMaster, TMCStepper + +[env:STM32F103RC_ZM3E2_USB_maple] +platform = ${ZONESTAR_ZM3E_maple.platform} +extends = ZONESTAR_ZM3E_maple +board = genericSTM32F103RC +board_build.ldscript = ZONESTAR_ZM3E_256K.ld + +[env:STM32F103VC_ZM3E4_USB_maple] +platform = ${ZONESTAR_ZM3E_maple.platform} +extends = ZONESTAR_ZM3E_maple +board = genericSTM32F103VC +board_build.ldscript = ZONESTAR_ZM3E_256K.ld +build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2 + +[env:STM32F103VE_ZM3E4V2_USB_maple] +platform = ${ZONESTAR_ZM3E_maple.platform} +extends = ZONESTAR_ZM3E_maple +board = genericSTM32F103VE +board_build.ldscript = ZONESTAR_ZM3E_512K.ld +build_flags = ${ZONESTAR_ZM3E_maple.build_flags} -DTONE_TIMER=1 -DTONE_CHANNEL=2 +board_upload.maximum_size = 499712 + +# +# ERYONE ERY32 Mini (STM32F103VET6) +# +[env:ERYONE_ERY32_MINI_maple] +platform = ${common_stm32f1.platform} +extends = common_stm32f1 +board = genericSTM32F103VE +build_flags = ${common_stm32f1.build_flags} + -ffunction-sections -fdata-sections -nostdlib -MMD + -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -O0 + -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 + -DSS_TIMER=4 +board_build.variant = MARLIN_F103Vx +board_build.ldscript = eryone_ery32_mini.ld +board_build.address = 0x08004000 +build_unflags = ${common_stm32f1.build_unflags} +extra_scripts = ${common_stm32f1.extra_scripts} + buildroot/share/PlatformIO/scripts/custom_board.py diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini new file mode 100644 index 000000000000..da7cedd3a3db --- /dev/null +++ b/ini/stm32f1.ini @@ -0,0 +1,421 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# +# STM32F1 Architecture with unified STM32 HAL +# +# Naming Example: STM32F103RCT6 +# +# F : Foundation (sometimes High Performance F2/F4) +# 1 : Cortex M3 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) +# 03 : Line/Features +# R : 64 or 66 pins (T:36, C:48, V:100, Z:144, I:176) +# C : 256KB Flash-memory (B: 128KB, D:384KB, E:512KB, G:1024KB) +# T : LQFP package +# 6 : -40...85°C (7: ...105°C) +# +################################# + +[common_STM32F103RC_variant] +extends = stm32_variant +board = genericSTM32F103RC +board_build.variant = MARLIN_F103Rx +build_flags = ${stm32_variant.build_flags} -DDEBUG_LEVEL=0 +monitor_speed = 115200 + +# +# STM32F103RE +# +[env:STM32F103RE] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103RE +monitor_speed = 115200 + +# +# STM32F103VE +# +[env:STM32F103VE] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103VE +monitor_speed = 115200 + +# +# STM32F103ZE +# +[env:STM32F103ZE] +platform = ${common_stm32.platform} +extends = common_stm32 +board = genericSTM32F103ZE +monitor_speed = 115200 + +# +# BigTree SKR Mini V1.1 / SKR Mini E3 & MZ (STM32F103RCT6 ARM Cortex-M3) +# +# STM32F103RC_btt ............. RCT6 with 256K +# STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage) +# +[env:STM32F103RC_btt] +platform = ${common_stm32.platform} +extends = common_STM32F103RC_variant +build_flags = ${common_STM32F103RC_variant.build_flags} + -DTIMER_SERVO=TIM5 +board_build.offset = 0x7000 +board_upload.offset_address = 0x08007000 + +[env:STM32F103RC_btt_USB] +platform = ${common_stm32.platform} +extends = env:STM32F103RC_btt +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${env:STM32F103RC_btt.build_flags} + -DUSE_USB_FS + -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSBD_USE_CDC_MSC +build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC + +# +# MKS Robin (STM32F103ZET6) +# Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel +# +[env:mks_robin] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103ZE +board_build.variant = MARLIN_F103Zx +board_build.encrypt = Robin.bin +board_build.offset = 0x7000 +build_flags = ${stm32_variant.build_flags} + -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC + +# +# MKS Robin E3/E3D (STM32F103RCT6) with TMC2209 +# +[env:mks_robin_e3] +platform = ${common_stm32.platform} +extends = common_STM32F103RC_variant +board_build.encrypt = Robin_e3.bin +board_build.offset = 0x5000 +board_upload.offset_address = 0x08005000 +build_flags = ${common_STM32F103RC_variant.build_flags} + -DTIMER_SERVO=TIM5 -DDEFAULT_SPI=3 +build_unflags = ${common_STM32F103RC_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC +monitor_speed = 115200 +debug_tool = stlink + +# +# Creality (STM32F103RET6) +# +[env:STM32F103RET6_creality] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103RE +board_build.variant = MARLIN_F103Rx +board_build.offset = 0x7000 +board_upload.offset_address = 0x08007000 +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED + -DSS_TIMER=4 -DTIMER_SERVO=TIM5 + -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC +extra_scripts = ${stm32_variant.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/random-bin.py +monitor_speed = 115200 +debug_tool = jlink +upload_protocol = jlink + +# +# BigTree SKR Mini E3 V2.0 & DIP / SKR CR6 (STM32F103RET6 ARM Cortex-M3) +# +# STM32F103RE_btt ............. RET6 +# STM32F103RE_btt_USB ......... RET6 (USB mass storage) +# +[env:STM32F103RE_btt] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103RE +board_build.variant = MARLIN_F103Rx +board_build.offset = 0x7000 +board_upload.offset_address = 0x08007000 +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103RE -DHAL_SD_MODULE_ENABLED + -DSS_TIMER=4 -DTIMER_SERVO=TIM5 + -DENABLE_HWSERIAL3 -DTRANSFER_CLOCK_DIV=8 +monitor_speed = 115200 +debug_tool = jlink +upload_protocol = jlink + +[env:STM32F103RE_btt_USB] +platform = ${common_stm32.platform} +extends = env:STM32F103RE_btt +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${env:STM32F103RE_btt.build_flags} + -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC +build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC + +# +# FLSUN QQS Pro (STM32F103VET6) +# board Hispeedv1 +# +[env:flsun_hispeedv1] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +board_build.encrypt = Robin_mini.bin +board_build.offset = 0x7000 +board_upload.offset_address = 0x08007000 +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 + -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC + +# +# MKS Robin Nano V1.2 and V2 +# +[env:mks_robin_nano35] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +board_build.encrypt = Robin_nano35.bin +board_build.offset = 0x7000 +board_upload.offset_address = 0x08007000 +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 + -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC +debug_tool = jlink +upload_protocol = jlink + +# +# Mingda MPX_ARM_MINI +# +[env:mingda_mpx_arm_mini] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103ZE +board_build.variant = MARLIN_F103Zx +board_build.offset = 0x10000 +build_flags = ${stm32_variant.build_flags} + -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC + +# +# Malyan M200 (STM32F103CB) +# +[env:STM32F103CB_malyan] +platform = ${common_stm32.platform} +extends = common_stm32 +board = malyanm200_f103cb +build_flags = ${common_stm32.build_flags} + -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB + -DHAL_UART_MODULE_ENABLED +src_filter = ${common.default_src_filter} + + +# +# FLYmaker FLY Mini (STM32F103RCT6) +# +[env:FLY_MINI] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103RC +board_build.variant = MARLIN_F103Rx +board_build.offset = 0x5000 +board_upload.offset_address = 0x08005000 +build_flags = ${stm32_variant.build_flags} -DSS_TIMER=4 + +# +# MKS Robin Mini (STM32F103VET6) +# +[env:mks_robin_mini] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +board_build.encrypt = Robin_mini.bin +board_build.offset = 0x7000 +board_upload.offset_address = 0x08007000 +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103VE -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 + +# +# MKS Robin Lite/Lite2 (STM32F103RCT6) +# +[env:mks_robin_lite] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103RC +board_build.variant = MARLIN_F103Rx +board_build.encrypt = mksLite.bin +board_build.offset = 0x5000 +board_upload.offset_address = 0x08005000 + +# +# MKS ROBIN LITE3 (STM32F103RCT6) +# +[env:mks_robin_lite3] +platform = ${common_stm32.platform} +extends = env:mks_robin_lite +board_build.encrypt = mksLite3.bin + +# +# MKS Robin Pro (STM32F103ZET6) +# +[env:mks_robin_pro] +platform = ${common_stm32.platform} +extends = env:mks_robin +board_build.encrypt = Robin_pro.bin + +# +# MKS Robin E3p (STM32F103VET6) +# - LVGL UI +# +[env:mks_robin_e3p] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +board_build.encrypt = Robin_e3p.bin +board_build.offset = 0x7000 +board_upload.offset_address = 0x08007000 +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F103VE -DSS_TIMER=4 + -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 +debug_tool = jlink +upload_protocol = jlink + +# +# JGAurora A5S A1 (STM32F103ZET6) +# +[env:jgaurora_a5s_a1] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103ZE +board_build.variant = MARLIN_F103Zx +board_build.offset = 0xA000 +board_build.rename = firmware_for_sd_upload.bin +board_upload.offset_address = 0x0800A000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F1xx -DSTM32_XL_DENSITY +extra_scripts = ${stm32_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py + +# +# FYSETC STM32F103RC +# +[env:STM32F103RC_fysetc] +platform = ${common_stm32.platform} +extends = common_STM32F103RC_variant +extra_scripts = ${common_STM32F103RC_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py +lib_ldf_mode = chain +debug_tool = stlink +upload_protocol = serial + +# +# Longer 3D board in Alfawise U20 (STM32F103VET6) +# +[env:STM32F103VE_longer] +platform = ${common_stm32.platform} +lib_deps = ${common.lib_deps} + https://github.com/tpruvot/STM32_Servo_OpenDrain/archive/2.0.zip +extends = stm32_variant +board = genericSTM32F103VE +board_build.variant = MARLIN_F103VE_LONGER +board_build.rename = project.bin +board_build.offset = 0x10000 +board_upload.offset_address = 0x08010000 +build_flags = ${stm32_variant.build_flags} -DMCU_STM32F103VE -DU20 -DTS_V12 +build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DHAL_PCD_MODULE_ENABLED +extra_scripts = ${stm32_variant.extra_scripts} +monitor_speed = 250000 +debug_tool = stlink + +# +# TRIGORILLA PRO (STM32F103ZET6) +# +[env:trigorilla_pro] +platform = ${stm32_variant.platform} +extends = stm32_variant +board = genericSTM32F103ZE +board_build.variant = MARLIN_F103Zx +build_flags = ${stm32_variant.build_flags} + -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC + +# +# Chitu boards like Tronxy X5s (STM32F103ZET6) +# +[env:chitu_f103] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F103ZE +board_build.variant = MARLIN_F103Zx +build_flags = ${stm32_variant.build_flags} + -DSTM32F1xx -DSTM32_XL_DENSITY +build_unflags = ${stm32_variant.build_unflags} +extra_scripts = ${stm32_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/chitu_crypt.py + +# +# Some Chitu V5 boards have a problem with GPIO init. +# Use this target if G28 or G29 are always failing. +# +[env:chitu_v5_gpio_init] +platform = ${common_stm32.platform} +extends = env:chitu_f103 +build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX + +# +# Zonestar ZM3E2 V1.0 / ZM3E4 V1.0 / ZM3E4 V2.0 +# +# STM32F103RC_ZM3E2_USB ........... RCT6 with 256K +# STM32F103VC_ZM3E4_USB ........... VCT6 with 256K +# STM32F103VE_ZM3E4V2_USB ......... VET6 with 512K +# +[ZONESTAR_ZM3E] +platform = ${common_stm32.platform} +extends = stm32_variant +platform_packages = ${stm_flash_drive.platform_packages} +board_upload.offset_address = 0x08005000 +board_build.offset = 0x5000 +board_upload.maximum_size = 237568 +extra_scripts = ${stm32_variant.extra_scripts} +build_flags = ${common_stm32.build_flags} + -DSS_TIMER=4 -DTIMER_SERVO=TIM5 -DUSE_USB_FS -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 -DUSBD_USE_CDC_MSC +build_unflags = ${stm32_variant.build_unflags} -DUSBD_USE_CDC + +[env:STM32F103RC_ZM3E2_USB] +platform = ${ZONESTAR_ZM3E.platform} +extends = ZONESTAR_ZM3E +board = genericSTM32F103RC +board_build.variant = MARLIN_F103Rx + +[env:STM32F103VC_ZM3E4_USB] +platform = ${ZONESTAR_ZM3E.platform} +extends = ZONESTAR_ZM3E +board = genericSTM32F103VC +board_build.variant = MARLIN_F103Vx +build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=1 + +[env:STM32F103VE_ZM3E4V2_USB] +platform = ${ZONESTAR_ZM3E.platform} +extends = ZONESTAR_ZM3E +board = genericSTM32F103VE +board_build.variant = MARLIN_F103Vx +build_flags = ${ZONESTAR_ZM3E.build_flags} -DTIMER_TONE=1 +board_upload.maximum_size = 499712 diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini new file mode 100644 index 000000000000..3e0c400a6b2b --- /dev/null +++ b/ini/stm32f4.ini @@ -0,0 +1,559 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# +# STM32F4 Architecture +# +# Naming Example: STM32F401RGT6 +# +# F : Foundation (sometimes High Performance F2/F4) +# 4 : Cortex M4 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) +# 01 : Line/Features +# R : 64 or 66 pins (T:36, C:48 or 49, M:81, V:100, Z:144, I:176) +# G : 1024KB Flash-memory (B:128KB, C:256KB, D:384KB, E:512KB) +# T : LQFP package +# 6 : -40...85°C (7: ...105°C) +# +################################# + +# +# ARMED (STM32) +# +[env:ARMED] +platform = ${common_stm32.platform} +extends = common_stm32 +board = armed_v1 +build_flags = ${common_stm32.build_flags} + -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing + +# +# STM32F401VE +# 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html +# +[env:STM32F401VE_STEVAL] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STEVAL_STM32F401VE +build_flags = ${stm32_variant.build_flags} + -DSTM32F401xE -DDISABLE_GENERIC_SERIALUSB + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS + +# +# STM32F401RC +# +[env:FYSETC_CHEETAH_V20] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_FYSETC_CHEETAH_V20 +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} -DSTM32F401xC + +# +# FLYF407ZG +# +[env:FLYF407ZG] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407ZGT6 +board_build.variant = MARLIN_FLY_F407ZG +board_build.offset = 0x8000 +upload_protocol = dfu + +# +# FYSETC S6 (STM32F446RET6 ARM Cortex-M4) +# +[env:FYSETC_S6] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_fysetc_s6 +board_build.offset = 0x10000 +board_upload.offset_address = 0x08010000 +build_flags = ${stm32_variant.build_flags} -DHAL_PCD_MODULE_ENABLED +debug_tool = stlink +upload_protocol = dfu +upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" + +# +# FYSETC S6 new bootloader +# +[env:FYSETC_S6_8000] +platform = ${common_stm32.platform} +extends = env:FYSETC_S6 +board = marlin_fysetc_s6 +board_build.offset = 0x8000 +board_upload.offset_address = 0x08008000 +upload_command = dfu-util -a 0 -s 0x08008000:leave -D "$SOURCE" + +# +# STM32F407VET6 with RAMPS-like shield +# 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407 +# Shield - https://github.com/jmz52/Hardware +# +[env:STM32F407VE_black] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_blackSTM32F407VET6 +build_flags = ${stm32_variant.build_flags} + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS + +# +# STM32F407VET6 Index Mobo Rev 03 +# +[env:Index_Mobo_Rev03] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_index_mobo_rev03 +build_flags = ${stm32_variant.build_flags} + -DARDUINO_BLACK_F407VE + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS +extra_scripts = ${stm32_variant.extra_scripts} + +# +# Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4) +# For use with with davidtgbe's OpenBLT bootloader https://github.com/davidtgbe/openblt/releases +# Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000. +# +[env:Anet_ET4_OpenBLT] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.encrypt = firmware.srec +board_build.offset = 0x10000 +board_upload.offset_address = 0x08010000 +build_flags = ${stm32_variant.build_flags} + -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 +extra_scripts = ${stm32_variant.extra_scripts} + buildroot/share/PlatformIO/scripts/openblt.py +debug_tool = jlink +upload_protocol = jlink + +# +# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) +# +[env:BIGTREE_SKR_PRO] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_BigTree_SKR_Pro +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX +debug_tool = stlink +upload_protocol = stlink + +# +# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support +# +[env:BIGTREE_SKR_PRO_usb_flash_drive] +platform = ${common_stm32.platform} +extends = env:BIGTREE_SKR_PRO +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${stm_flash_drive.build_flags} -DSTM32F407_5ZX +build_unflags = ${env:BIGTREE_SKR_PRO.build_unflags} -DUSBCON -DUSBD_USE_CDC + +# +# BigTreeTech E3 RRF (STM32F407VGT6 ARM Cortex-M4) +# +[env:BIGTREE_E3_RRF] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_BIGTREE_E3_RRF +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F407_5VX + -DMF_RX_BUFFER_SIZE=255 + -DMF_TX_BUFFER_SIZE=255 + +# +# Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) +# +[env:BIGTREE_GTR_V1_0] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_BigTree_GTR_v1 +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} -DSTM32F407IX + +# +# Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support +# +[env:BIGTREE_GTR_V1_0_usb_flash_drive] +platform = ${common_stm32.platform} +extends = env:BIGTREE_GTR_V1_0 +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${stm_flash_drive.build_flags} -DSTM32F407IX +build_unflags = ${env:BIGTREE_GTR_V1_0.build_unflags} -DUSBCON -DUSBD_USE_CDC + +# +# BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4) +# +[env:BIGTREE_BTT002] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_BigTree_BTT002 +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F407_5VX + -DHAVE_HWSERIAL2 + -DHAVE_HWSERIAL3 + -DPIN_SERIAL2_RX=PD_6 + -DPIN_SERIAL2_TX=PD_5 + +# +# BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Flash Drive Support +# +[env:BIGTREE_SKR_2] +platform = ${common_stm32.platform} +extends = stm32_variant +platform_packages = ${stm_flash_drive.platform_packages} +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0x8000 +board_upload.offset_address = 0x08008000 +build_flags = ${stm_flash_drive.build_flags} + -DUSE_USBHOST_HS -DUSE_USB_HS_IN_FS + -DUSBD_IRQ_PRIO=5 -DUSBD_IRQ_SUBPRIO=6 + -DHSE_VALUE=8000000U -DHAL_SD_MODULE_ENABLED + -DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8 + +# +# BigTreeTech SKR V2.0 (STM32F407VGT6 ARM Cortex-M4) with USB Media Share Support +# +[env:BIGTREE_SKR_2_USB] +platform = ${common_stm32.platform} +extends = env:BIGTREE_SKR_2 +build_flags = ${env:BIGTREE_SKR_2.build_flags} -DUSBD_USE_CDC_MSC +build_unflags = ${env:BIGTREE_SKR_2.build_unflags} -DUSBD_USE_CDC + +# +# BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4) +# +[env:BIGTREE_OCTOPUS_V1] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_BigTree_Octopus_v1 +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F446_5VX -DUSE_USB_HS_IN_FS + +# +# BigTreeTech Octopus V1.0/1.1 / Octopus Pro V1.0 (STM32F446ZET6 ARM Cortex-M4) with USB Flash Drive Support +# +[env:BIGTREE_OCTOPUS_V1_USB] +platform = ${common_stm32.platform} +extends = env:BIGTREE_OCTOPUS_V1 +platform_packages = ${stm_flash_drive.platform_packages} +build_unflags = -DUSBD_USE_CDC +build_flags = ${stm_flash_drive.build_flags} + -DSTM32F446_5VX -DUSE_USB_HS_IN_FS + -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSBD_USE_CDC_MSC + +# +# BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) +# +[env:BIGTREE_OCTOPUS_PRO_V1_F429] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_BigTree_Octopus_Pro_v1_F429 +board_build.offset = 0x8000 +build_flags = ${stm32_variant.build_flags} + -DUSE_USB_HS_IN_FS + +# +# BigTreeTech Octopus Pro V1.0 (STM32F429ZGT6 ARM Cortex-M4) with USB Flash Drive Support +# +[env:BIGTREE_OCTOPUS_PRO_V1_F429_USB] +platform = ${common_stm32.platform} +extends = env:BIGTREE_OCTOPUS_PRO_V1_F429 +platform_packages = ${stm_flash_drive.platform_packages} +build_unflags = -DUSBD_USE_CDC +build_flags = ${stm_flash_drive.build_flags} + -DSTM32F446_5VX -DUSE_USB_HS_IN_FS + -DUSE_USBHOST_HS -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSBD_USE_CDC_MSC + +# +# Lerdge base +# +[lerdge_common] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407ZGT6 +board_build.variant = MARLIN_LERDGE +board_build.offset = 0x10000 +build_flags = ${stm32_variant.build_flags} + -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4 + -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DLERDGE_TFT35 +build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 +extra_scripts = ${common_stm32.extra_scripts} + pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py + buildroot/share/PlatformIO/scripts/lerdge.py + +# +# Lerdge X (STM32F407VE) +# +[env:LERDGEX] +platform = ${lerdge_common.platform} +extends = lerdge_common +board_build.encrypt = Lerdge_X_firmware_force.bin + +# +# Lerdge X with USB Flash Drive Support +# +[env:LERDGEX_usb_flash_drive] +platform = ${env:LERDGEX.platform} +extends = env:LERDGEX +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags} + +# +# Lerdge S (STM32F407ZG) +# +[env:LERDGES] +platform = ${lerdge_common.platform} +extends = lerdge_common +board_build.encrypt = Lerdge_firmware_force.bin + +# +# Lerdge S with USB Flash Drive Support +# +[env:LERDGES_usb_flash_drive] +platform = ${env:LERDGES.platform} +extends = env:LERDGES +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags} + +# +# Lerdge K (STM32F407ZG) +# +[env:LERDGEK] +platform = ${lerdge_common.platform} +extends = lerdge_common +board_build.encrypt = Lerdge_K_firmware_force.bin +build_flags = ${lerdge_common.build_flags} -DLERDGEK + +# +# Lerdge K with USB Flash Drive Support +# +[env:LERDGEK_usb_flash_drive] +platform = ${env:LERDGEK.platform} +extends = env:LERDGEK +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${stm_flash_drive.build_flags} ${lerdge_common.build_flags} + +# +# RUMBA32 +# +[env:rumba32] +platform = ${common_stm32.platform} +extends = stm32_variant +board = rumba32_f446ve +board_build.variant = MARLIN_F446VE +board_build.offset = 0x0000 +build_flags = ${stm32_variant.build_flags} + -Os -DHAL_PCD_MODULE_ENABLED + -DDISABLE_GENERIC_SERIALUSB + -DHAL_UART_MODULE_ENABLED + -DTIMER_SERIAL=TIM9 +monitor_speed = 500000 +upload_protocol = dfu + +# +# MKS Robin Pro V2 +# +[env:mks_robin_pro2] +platform = ${common_stm32.platform} +extends = stm32_variant +platform_packages = ${stm_flash_drive.platform_packages} +board = genericSTM32F407VET6 +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0x0000 +board_upload.offset_address = 0x08000000 +build_flags = ${stm_flash_drive.build_flags} +build_unflags = ${stm32_variant.build_unflags} -DUSBCON -DUSBD_USE_CDC +debug_tool = jlink +upload_protocol = jlink + +# +# This I2C1(PB6:I2C1_SCL PB7:I2C1_SDA) is used by Robin Nano V3 +# +[stm32f4_I2C1] +build_flags = -DPIN_WIRE_SCL=PB6 -DPIN_WIRE_SDA=PB7 + +# +# MKS Robin Nano V3 +# +[env:mks_robin_nano_v3] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0xC000 +board_upload.offset_address = 0x0800C000 +board_build.rename = Robin_nano_v3.bin +build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags} + -DHAL_PCD_MODULE_ENABLED +debug_tool = jlink +upload_protocol = jlink + +# +# MKS Robin Nano V3 with USB Flash Drive Support +# Currently, using a STM32duino fork, until USB Host get merged +# +[env:mks_robin_nano_v3_usb_flash_drive] +platform = ${common_stm32.platform} +extends = env:mks_robin_nano_v3 +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} + -DUSE_USBHOST_HS + -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSE_USB_HS_IN_FS + +# +# MKS Robin Nano V3 with USB Flash Drive Support and Shared Media +# Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged +# +[env:mks_robin_nano_v3_usb_flash_drive_msc] +platform = ${common_stm32.platform} +extends = env:mks_robin_nano_v3_usb_flash_drive +build_flags = ${env:mks_robin_nano_v3_usb_flash_drive.build_flags} + -DUSBD_USE_CDC_MSC +build_unflags = -DUSBD_USE_CDC + +# +# MKS Eagle +# 5 TMC2209 uart mode on board +# +[env:mks_eagle] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0xC000 +board_upload.offset_address = 0x0800C000 +board_build.rename = mks_eagle.bin +build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1.build_flags} + -DHAL_PCD_MODULE_ENABLED + -DSTM32_FLASH_SIZE=512 +debug_tool = jlink +upload_protocol = jlink + +# +# MKS Eagle with USB Flash Drive Support +# Currently, using a STM32duino fork, until USB Host get merged +# +[env:mks_eagle_usb_flash_drive] +platform = ${common_stm32.platform} +extends = env:mks_eagle +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1.build_flags} + -DUSE_USBHOST_HS + -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSE_USB_HS_IN_FS + +# +# MKS Eagle with USB Flash Drive Support and Shared Media +# Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged +# +[env:mks_eagle_usb_flash_drive_msc] +platform = ${common_stm32.platform} +extends = env:mks_eagle_usb_flash_drive +build_flags = ${env:mks_eagle_usb_flash_drive.build_flags} + -DUSBD_USE_CDC_MSC +build_unflags = -DUSBD_USE_CDC + +# +# This I2C1(PB8:I2C1_SCL PB9:I2C1_SDA) is used by MKS Monster8 +# +[stm32f4_I2C1_CAN] +build_flags = -DPIN_WIRE_SCL=PB8 -DPIN_WIRE_SDA=PB9 + +# +# MKS Monster8 +# +[env:mks_monster8] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0xC000 +board_upload.offset_address = 0x0800C000 +board_build.rename = mks_monster8.bin +build_flags = ${stm32_variant.build_flags} ${stm32f4_I2C1_CAN.build_flags} + -DHAL_PCD_MODULE_ENABLED -DTIMER_SERIAL=TIM4 + -DSTM32_FLASH_SIZE=512 +debug_tool = jlink +upload_protocol = jlink + +# +# MKS Monster8 with USB Flash Drive Support +# Currently, using a STM32duino fork, until USB Host get merged +# +[env:mks_monster8_usb_flash_drive] +platform = ${common_stm32.platform} +extends = env:mks_monster8 +platform_packages = ${stm_flash_drive.platform_packages} +build_flags = ${stm_flash_drive.build_flags} ${stm32f4_I2C1_CAN.build_flags} + -DUSE_USBHOST_HS + -DUSBD_IRQ_PRIO=5 + -DUSBD_IRQ_SUBPRIO=6 + -DUSE_USB_HS_IN_FS + +# +# MKS Monster8 with USB Flash Drive Support and Shared Media +# Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged +# +[env:mks_monster8_usb_flash_drive_msc] +platform = ${common_stm32.platform} +extends = env:mks_monster8_usb_flash_drive +build_flags = ${env:mks_monster8_usb_flash_drive.build_flags} + -DUSBD_USE_CDC_MSC +build_unflags = -DUSBD_USE_CDC + +# +# TH3D EZBoard Lite v2.0 (STM32F405RGT6 ARM Cortex-M4) +# +[env:TH3D_EZBoard_Lite_V2] +platform = ${common_stm32.platform} +extends = stm32_variant +board = genericSTM32F405RG +board_build.variant = MARLIN_TH3D_EZBOARD_LITE_V2 +board_build.offset = 0xC000 +board_upload.offset_address = 0x0800C000 +build_flags = ${stm32_variant.build_flags} -DHSE_VALUE=12000000U -O0 +debug_tool = stlink +upload_protocol = stlink + +# +# BOARD_MKS_ROBIN_NANO_V1_3_F4 +# - MKS Robin Nano V1.3 (STM32F407VET6) 5 Pololu Plug +# - MKS Robin Nano-S V1.3 (STM32F407VET6) 4 TMC2225 + 1 Pololu Plug +# +[env:mks_robin_nano_v1_3_f4] +platform = ${common_stm32.platform} +extends = stm32_variant +board = marlin_STM32F407VGT6_CCM +board_build.variant = MARLIN_F4x7Vx +board_build.offset = 0x8000 +board_upload.offset_address = 0x08008000 +board_build.rename = Robin_nano35.bin +build_flags = ${stm32_variant.build_flags} + -DMCU_STM32F407VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 + -DSTM32_FLASH_SIZE=512 + -DTIMER_TONE=TIM3 -DTIMER_SERVO=TIM2 + -DHAL_SD_MODULE_ENABLED + -DHAL_SRAM_MODULE_ENABLED +build_unflags = ${stm32_variant.build_unflags} + -DUSBCON -DUSBD_USE_CDC +debug_tool = jlink +upload_protocol = jlink diff --git a/ini/stm32f7.ini b/ini/stm32f7.ini new file mode 100644 index 000000000000..200740589b1a --- /dev/null +++ b/ini/stm32f7.ini @@ -0,0 +1,39 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# +# STM32F7 Architecture +# +# Naming Example: STM32F767ZIT6 +# +# F : Foundation (sometimes High Performance F2/F4) +# 7 : Cortex M7 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) +# 67 : Line/Features +# Z : 144 pins +# I : 4096KB Flash-memory +# T : LQFP package +# 6 : -40...85°C (7: ...105°C) +# +################################# + +# +# ST NUCLEO-F767ZI Development Board +# This environment is for testing purposes prior to control boards +# being readily available based on STM32F7 MCUs +# +[env:NUCLEO_F767ZI] +platform = ${common_stm32.platform} +extends = common_stm32 +board = nucleo_f767zi +build_flags = ${common_stm32.build_flags} -DTIMER_SERIAL=TIM9 + +# +# REMRAM_V1 +# +[env:REMRAM_V1] +platform = ${common_stm32.platform} +extends = common_stm32 +board = remram_v1 diff --git a/ini/stm32h7.ini b/ini/stm32h7.ini new file mode 100644 index 000000000000..fb39d4cc6b73 --- /dev/null +++ b/ini/stm32h7.ini @@ -0,0 +1,41 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# +# STM32H7 Architecture +# +# Naming Example: STM32H743IIT6 +# +# H : High Performance +# 7 : Cortex M7 core (0:M0, 1-2:M3, 3-4:M4, 7:M7) +# 43 : Line/Features +# I : 176 pins +# I : 2048KB Flash-memory +# T : LQFP package +# 6 : -40...85°C (7: ...105°C) +# +################################# + +# +# BigTreeTech SKR SE BX (STM32H743IIT6 ARM Cortex-M7) +# +[env:BTT_SKR_SE_BX] +platform = ${common_stm32.platform} +extends = stm32_variant +platform_packages = ${stm_flash_drive.platform_packages} +board = marlin_BTT_SKR_SE_BX +board_build.offset = 0x20000 +build_flags = ${stm32_variant.build_flags} ${stm_flash_drive.build_flags} + -DUSE_USBHOST_HS + -DUSE_USB_HS_IN_FS + -DHAL_DMA2D_MODULE_ENABLED + -DHAL_LTDC_MODULE_ENABLED + -DHAL_SDRAM_MODULE_ENABLED + -DHAL_QSPI_MODULE_ENABLED + -DHAL_MDMA_MODULE_ENABLED + -DHAL_SD_MODULE_ENABLED +upload_protocol = cmsis-dap +debug_tool = cmsis-dap diff --git a/ini/teensy.ini b/ini/teensy.ini new file mode 100644 index 000000000000..ef1ad766bcbb --- /dev/null +++ b/ini/teensy.ini @@ -0,0 +1,51 @@ +# +# Marlin Firmware +# PlatformIO Configuration File +# + +################################# +# # +# Teensy Architectures # +# # +################################# + +# +# Teensy++ 2.0 +# +[env:teensy20] +platform = teensy +extends = common_avr8 +board = teensy2pp +lib_ignore = ${env:common_avr8.lib_ignore}, NativeEthernet + +# +# Teensy 3.1 / 3.2 (ARM Cortex-M4) +# +[env:teensy31] +platform = teensy@~4.12.0 +board = teensy31 +src_filter = ${common.default_src_filter} + +lib_ignore = NativeEthernet + +# +# Teensy 3.5 / 3.6 (ARM Cortex-M4) +# +[env:teensy35] +platform = teensy@~4.12.0 +board = teensy35 +src_filter = ${common.default_src_filter} + +lib_ignore = NativeEthernet + +[env:teensy36] +platform = teensy@~4.12.0 +board = teensy36 +src_filter = ${common.default_src_filter} + +lib_ignore = NativeEthernet + +# +# Teensy 4.0 / 4.1 (ARM Cortex-M7) +# +[env:teensy41] +platform = teensy@~4.12.0 +board = teensy41 +src_filter = ${common.default_src_filter} + diff --git a/platformio.ini b/platformio.ini index 6008b943ecb0..106e454d105f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,24 +10,47 @@ # Automatic targets - enable auto-uploading #targets = upload -# -# By default platformio build will abort after 5 errors. -# Remove '-fmax-errors=5' from build_flags below to see all. -# - [platformio] src_dir = Marlin boards_dir = buildroot/share/PlatformIO/boards default_envs = mega2560 include_dir = Marlin - +extra_configs = + ini/avr.ini + ini/due.ini + ini/esp32.ini + ini/features.ini + ini/lpc176x.ini + ini/native.ini + ini/samd51.ini + ini/stm32-common.ini + ini/stm32f0.ini + ini/stm32f1-maple.ini + ini/stm32f1.ini + ini/stm32f4.ini + ini/stm32f7.ini + ini/stm32h7.ini + ini/teensy.ini + +# +# The 'common' section applies to most Marlin builds. # -# The 'common' values are used for most Marlin builds +# By default platformio build will abort after 5 errors. +# Remove '-fmax-errors=5' from build_flags below to see all. # [common] +build_flags = -g3 -D__MARLIN_FIRMWARE__ -DNDEBUG + -fmax-errors=5 +extra_scripts = + pre:buildroot/share/PlatformIO/scripts/common-dependencies.py + pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py + pre:buildroot/share/PlatformIO/scripts/preflight-checks.py + post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py +lib_deps = default_src_filter = + - - + - - - - - - - + - - - - - - - + - - - - - - - - - - - @@ -51,19 +74,22 @@ default_src_filter = + - - + - - - - - - - - - - - - - - - - - - - - + - + - + - - - - - + - + - + - + - + - + - - - - - - - - - - - - - - + - - - - - - - + - - - - @@ -72,12 +98,14 @@ default_src_filter = + - - + - - - - - - + - - - - - - - - - - - + - - - - - - - @@ -109,8 +137,10 @@ default_src_filter = + - - + - - - - + - - - - - + - - - - - @@ -128,14 +158,15 @@ default_src_filter = + - - + - - - + - - - + - - - - - - - - - - - - @@ -172,10 +203,14 @@ default_src_filter = + - - + - - - + - - - - - - + - + - - + - + - - - - @@ -195,225 +230,22 @@ default_src_filter = + - - + - - - + - - - - - - - + - - - - - - - + - - - - - - - - - + - + - - - - - -extra_scripts = - pre:buildroot/share/PlatformIO/scripts/common-dependencies.py - pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py - post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py -build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-constants -lib_deps = - -# -# Feature Dependencies -# -[features] -HAS_TFT_LVGL_UI = lvgl=https://github.com/makerbase-mks/LVGL-6.1.1-MKS/archive/master.zip - src_filter=+ - extra_scripts=download_mks_assets.py -MKS_WIFI_MODULE = QRCode=https://github.com/makerbase-mks/QRCode/archive/master.zip -HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.1 - src_filter=+ + + + + -HAS_STEALTHCHOP = src_filter=+ -SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip -HAS_MOTOR_CURRENT_I2C = SlowSoftI2CMaster - src_filter=+ -HAS_TMC26X = TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip - src_filter=+ -HAS_L64XX = Arduino-L6470@0.8.0 - src_filter=+ + + + -NEOPIXEL_LED = Adafruit NeoPixel@1.5.0 - src_filter=+ -MAX6675_._IS_MAX31865 = Adafruit MAX31865 library@~1.1.0 -USES_LIQUIDCRYSTAL = bitbucket-fmalpartida/LiquidCrystal@1.5.0 -USES_LIQUIDCRYSTAL_I2C = marcoschwartz/LiquidCrystal_I2C@1.1.4 -USES_LIQUIDTWI2 = LiquidTWI2@1.2.7 -HAS_WIRED_LCD = src_filter=+ -HAS_MARLINUI_HD44780 = src_filter=+ -HAS_MARLINUI_U8GLIB = U8glib-HAL@~0.4.1 - src_filter=+ -HAS_(FSMC|SPI)_TFT = src_filter=+ + + -HAS_FSMC_TFT = src_filter=+ + -HAS_SPI_TFT = src_filter=+ + -I2C_EEPROM = src_filter=+ -SPI_EEPROM = src_filter=+ -HAS_GRAPHICAL_TFT = src_filter=+ -DWIN_CREALITY_LCD = src_filter=+ -IS_TFTGLCD_PANEL = src_filter=+ -HAS_TOUCH_BUTTONS = src_filter=+ -HAS_LCD_MENU = src_filter=+ -HAS_GAMES = src_filter=+ -MARLIN_BRICKOUT = src_filter=+ -MARLIN_INVADERS = src_filter=+ -MARLIN_MAZE = src_filter=+ -MARLIN_SNAKE = src_filter=+ -HAS_MENU_BACKLASH = src_filter=+ -HAS_MENU_BED_CORNERS = src_filter=+ -LCD_BED_LEVELING = src_filter=+ -HAS_MENU_CANCELOBJECT = src_filter=+ -HAS_MENU_DELTA_CALIBRATE = src_filter=+ -HAS_MENU_FILAMENT = src_filter=+ -LCD_INFO_MENU = src_filter=+ -HAS_MENU_JOB_RECOVERY = src_filter=+ -HAS_MULTI_LANGUAGE = src_filter=+ -HAS_MENU_LED = src_filter=+ -HAS_MENU_MEDIA = src_filter=+ -HAS_MENU_MIXER = src_filter=+ -HAS_MENU_MMU2 = src_filter=+ -HAS_MENU_PASSWORD = src_filter=+ -HAS_MENU_POWER_MONITOR = src_filter=+ -HAS_MENU_CUTTER = src_filter=+ -HAS_MENU_TEMPERATURE = src_filter=+ -HAS_MENU_TMC = src_filter=+ -HAS_MENU_TOUCH_SCREEN = src_filter=+ -HAS_MENU_TRAMMING = src_filter=+ -HAS_MENU_UBL = src_filter=+ -ANYCUBIC_LCD_CHIRON = src_filter=+ + -ANYCUBIC_LCD_I3MEGA = src_filter=+ + -HAS_DGUS_LCD = src_filter=+ + -TOUCH_UI_FTDI_EVE = src_filter=+ -EXTUI_EXAMPLE = src_filter=+ -MALYAN_LCD = src_filter=+ -USE_UHS2_USB = src_filter=+ -USE_UHS3_USB = src_filter=+ -USB_FLASH_DRIVE_SUPPORT = src_filter=+ -AUTO_BED_LEVELING_BILINEAR = src_filter=+ -AUTO_BED_LEVELING_(3POINT|(BI)?LINEAR) = src_filter=+ -MESH_BED_LEVELING = src_filter=+ + -AUTO_BED_LEVELING_UBL = src_filter=+ + -BACKLASH_COMPENSATION = src_filter=+ -BARICUDA = src_filter=+ + -BINARY_FILE_TRANSFER = src_filter=+ + -BLTOUCH = src_filter=+ -CANCEL_OBJECTS = src_filter=+ + -CASE_LIGHT_ENABLE = src_filter=+ + -EXTERNAL_CLOSED_LOOP_CONTROLLER = src_filter=+ + -USE_CONTROLLER_FAN = src_filter=+ -HAS_MOTOR_CURRENT_DAC = src_filter=+ -DIRECT_STEPPING = src_filter=+ + -EMERGENCY_PARSER = src_filter=+ - -I2C_POSITION_ENCODERS = src_filter=+ -IIC_BL24CXX_EEPROM = src_filter=+ -HAS_SPI_FLASH = src_filter=+ -HAS_ETHERNET = src_filter=+ + -HAS_FANMUX = src_filter=+ -FILAMENT_WIDTH_SENSOR = src_filter=+ + -FWRETRACT = src_filter=+ + -HOST_ACTION_COMMANDS = src_filter=+ -HOTEND_IDLE_TIMEOUT = src_filter=+ -JOYSTICK = src_filter=+ -BLINKM = src_filter=+ -HAS_COLOR_LEDS = src_filter=+ + -PCA9533 = src_filter=+ -PCA9632 = src_filter=+ -PRINTER_EVENT_LEDS = src_filter=+ -TEMP_STAT_LEDS = src_filter=+ -MAX7219_DEBUG = src_filter=+ + -MEATPACK = src_filter=+ -MIXING_EXTRUDER = src_filter=+ + -HAS_PRUSA_MMU1 = src_filter=+ -HAS_PRUSA_MMU2 = src_filter=+ + -PASSWORD_FEATURE = src_filter=+ + -ADVANCED_PAUSE_FEATURE = src_filter=+ + + -AUTO_POWER_CONTROL = src_filter=+ -HAS_POWER_MONITOR = src_filter=+ + -POWER_LOSS_RECOVERY = src_filter=+ + -PROBE_TEMP_COMPENSATION = src_filter=+ + -HAS_FILAMENT_SENSOR = src_filter=+ + -(EXT|MANUAL)_SOLENOID.* = src_filter=+ + -HAS_CUTTER = src_filter=+ + -EXPERIMENTAL_I2CBUS = src_filter=+ + -MECHANICAL_GANTRY_CAL.+ = src_filter=+ -Z_MULTI_ENDSTOPS = src_filter=+ -Z_STEPPER_AUTO_ALIGN = src_filter=+ + -G26_MESH_VALIDATION = src_filter=+ -ASSISTED_TRAMMING = src_filter=+ + -HAS_MESH = src_filter=+ -HAS_LEVELING = src_filter=+ + -DELTA_AUTO_CALIBRATION = src_filter=+ -CALIBRATION_GCODE = src_filter=+ -Z_MIN_PROBE_REPEATABILITY_TEST = src_filter=+ -M100_FREE_MEMORY_WATCHER = src_filter=+ -BACKLASH_GCODE = src_filter=+ -IS_KINEMATIC = src_filter=+ -HAS_EXTRA_ENDSTOPS = src_filter=+ -SKEW_CORRECTION_GCODE = src_filter=+ -DIRECT_PIN_CONTROL = src_filter=+ + -PINS_DEBUGGING = src_filter=+ -NO_VOLUMETRICS = src_filter=- -HAS_MULTI_EXTRUDER = src_filter=+ -HAS_HOTEND_OFFSET = src_filter=+ -EDITABLE_SERVO_ANGLES = src_filter=+ -PIDTEMP = src_filter=+ -PREVENT_COLD_EXTRUSION = src_filter=+ -PIDTEMPBED = src_filter=+ -HAS_USER_THERMISTORS = src_filter=+ -SD_ABORT_ON_ENDSTOP_HIT = src_filter=+ -BAUD_RATE_GCODE = src_filter=+ -HAS_SMART_EFF_MOD = src_filter=+ -COOLANT_CONTROL = src_filter=+ -HAS_SOFTWARE_ENDSTOPS = src_filter=+ -HAS_DUPLICATION_MODE = src_filter=+ -LIN_ADVANCE = src_filter=+ -PHOTO_GCODE = src_filter=+ -CONTROLLER_FAN_EDITABLE = src_filter=+ -GCODE_MACROS = src_filter=+ -GRADIENT_MIX = src_filter=+ -HAS_SAVED_POSITIONS = src_filter=+ + -PARK_HEAD_ON_PAUSE = src_filter=+ -FILAMENT_LOAD_UNLOAD_GCODES = src_filter=+ -CNC_WORKSPACE_PLANES = src_filter=+ -CNC_COORDINATE_SYSTEMS = src_filter=+ -HAS_M206_COMMAND = src_filter=+ -EXPECTED_PRINTER_CHECK = src_filter=+ -HOST_KEEPALIVE_FEATURE = src_filter=+ -REPETIER_GCODE_M360 = src_filter=+ -HAS_GCODE_M876 = src_filter=+ -HAS_RESUME_CONTINUE = src_filter=+ -HAS_LCD_CONTRAST = src_filter=+ -LCD_SET_PROGRESS_MANUALLY = src_filter=+ -TOUCH_SCREEN_CALIBRATION = src_filter=+ -ARC_SUPPORT = src_filter=+ -GCODE_MOTION_MODES = src_filter=+ -BABYSTEPPING = src_filter=+ + -Z_PROBE_SLED = src_filter=+ -G38_PROBE_TARGET = src_filter=+ -MAGNETIC_PARKING_EXTRUDER = src_filter=+ -SDSUPPORT = src_filter=+ + + + + + + -HAS_MEDIA_SUBCALLS = src_filter=+ -GCODE_REPEAT_MARKERS = src_filter=+ + -HAS_EXTRUDERS = src_filter=+ + -AUTO_REPORT_TEMPERATURES = src_filter=+ -INCH_MODE_SUPPORT = src_filter=+ -TEMPERATURE_UNITS_SUPPORT = src_filter=+ -NEED_HEX_PRINT = src_filter=+ -NEED_LSF = src_filter=+ -NOZZLE_PARK_FEATURE = src_filter=+ + -NOZZLE_CLEAN_FEATURE = src_filter=+ + -DELTA = src_filter=+ + -BEZIER_CURVE_SUPPORT = src_filter=+ + -PRINTCOUNTER = src_filter=+ -HAS_BED_PROBE = src_filter=+ + + + -IS_SCARA = src_filter=+ -HAS_SERVOS = src_filter=+ + -MORGAN_SCARA = src_filter=+ -HAS_MICROSTEPS = src_filter=+ -(ESP3D_)?WIFISUPPORT = AsyncTCP, ESP Async WebServer - ESP3DLib=https://github.com/luc-github/ESP3DLib.git - arduinoWebSockets=https://github.com/Links2004/arduinoWebSockets.git - ESP32SSDP=https://github.com/luc-github/ESP32SSDP.git - lib_ignore=ESPAsyncTCP # # Default values apply to all 'env:' prefixed environments @@ -434,1200 +266,6 @@ monitor_flags = --filter time -################################# -# # -# Unique Core Architectures # -# # -# Add a new "env" below if no # -# entry has values suitable to # -# build for a given board. # -# # -################################# - -################################# -# # -# AVR Architecture # -# # -################################# - -# -# AVR (8-bit) Common Environment values -# -[common_avr8] -board_build.f_cpu = 16000000L -src_filter = ${common.default_src_filter} + - -# -# ATmega2560 -# -[env:mega2560] -platform = atmelavr -extends = common_avr8 -board = megaatmega2560 - -# -# ATmega2560 with extended pins 70-85 defined -# BOARD_BQ_ZUM_MEGA_3D -# BOARD_ULTIMAIN_2 -# BOARD_MIGHTYBOARD_REVE -# BOARD_EINSTART_S -# -[env:mega2560ext] -platform = atmelavr -extends = env:mega2560 -board_build.variant = megaextendedpins -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py - -# -# ATmega1280 -# -[env:mega1280] -platform = atmelavr -extends = common_avr8 -board = megaatmega1280 - -# -# MightyBoard AVR with extended pins -# -[mega_extended_optimized] -extends = common_avr8 -board_build.variant = megaextendedpins -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py -upload_speed = 57600 -build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues - -# -# MightyBoard ATmega1280 -# -[env:MightyBoard1280] -platform = atmelavr -extends = mega_extended_optimized -board = megaatmega1280 - -# -# MightyBoard ATmega2560 -# -[env:MightyBoard2560] -platform = atmelavr -extends = mega_extended_optimized -board = megaatmega2560 - -# -# RAMBo -# -[env:rambo] -platform = atmelavr -extends = common_avr8 -board = reprap_rambo - -# -# FYSETC F6 V1.3 / V1.4 -# -[env:FYSETC_F6] -platform = atmelavr -extends = common_avr8 -board = fysetc_f6 - -# -# Sanguinololu (ATmega644p) -# -[env:sanguino644p] -platform = atmelavr -extends = common_avr8 -board = sanguino_atmega644p - -# -# Sanguinololu (ATmega1284p) -# -[env:sanguino1284p] -platform = atmelavr -extends = common_avr8 -board = sanguino_atmega1284p -board_upload.maximum_size = 126976 - -# -# Melzi and clones (ATmega1284p) -# -[env:melzi] -platform = atmelavr -extends = env:sanguino1284p -upload_speed = 57600 - -# -# Sanguinololu (ATmega1284p stock bootloader with tuned flags) -# - -[tuned_1284p] -build_flags = ${common.build_flags} -fno-tree-scev-cprop -fno-split-wide-types -Wl,--relax -mcall-prologues - -[env:sanguino1284p_optimized] -platform = atmelavr -extends = env:melzi -build_flags = ${tuned_1284p.build_flags} - -# -# Melzi and clones (alias for sanguino1284p_optimized) -# -[env:melzi_optimized] -platform = atmelavr -extends = env:sanguino1284p_optimized - -# -# Melzi and clones (Optiboot bootloader) -# -[env:melzi_optiboot] -platform = atmelavr -extends = common_avr8 -board = sanguino_atmega1284p -upload_speed = 115200 - -# -# Melzi and clones (Zonestar Melzi2 with tuned flags) -# -[env:melzi_optiboot_optimized] -platform = atmelavr -extends = env:melzi_optiboot -build_flags = ${tuned_1284p.build_flags} - -# -# AT90USB1286 boards using CDC bootloader -# - BRAINWAVE -# - BRAINWAVE_PRO -# - SAV_MKI -# - TEENSYLU -# -[env:at90usb1286_cdc] -platform = teensy -extends = common_avr8 -board = at90usb1286 -lib_ignore = ${env:common_avr8.lib_ignore}, Teensy_ADC, NativeEthernet - -# -# AT90USB1286 boards using DFU bootloader -# - Printrboard -# - Printrboard Rev.F -# - ? 5DPRINT ? -# -[env:at90usb1286_dfu] -platform = teensy -extends = env:at90usb1286_cdc - -################################# -# # -# DUE Architecture # -# # -################################# - -# -# Due (Atmel SAM3X8E ARM Cortex-M3) -# -# - RAMPS4DUE -# - RADDS -# -[env:DUE] -platform = atmelsam -board = due -src_filter = ${common.default_src_filter} + + - -[env:DUE_USB] -platform = atmelsam -extends = env:DUE -board = dueUSB - -[env:DUE_debug] -# Used when WATCHDOG_RESET_MANUAL is enabled -platform = atmelsam -extends = env:DUE -build_flags = ${common.build_flags} - -funwind-tables - -mpoke-function-name - -# -# Archim SAM -# -[common_DUE_archim] -platform = atmelsam -extends = env:DUE -board = archim -build_flags = ${common.build_flags} - -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON -board_build.variants_dir = buildroot/share/PlatformIO/variants/ -extra_scripts = ${common.extra_scripts} - Marlin/src/HAL/DUE/upload_extra_script.py - -[env:DUE_archim] -platform = ${common_DUE_archim.platform} -extends = common_DUE_archim - -# Used when WATCHDOG_RESET_MANUAL is enabled -[env:DUE_archim_debug] -platform = ${common_DUE_archim.platform} -extends = common_DUE_archim -build_flags = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function-name - -################################# -# # -# SAMD51 Architecture # -# # -################################# - -# -# Adafruit Grand Central M4 (Atmel SAMD51P20A ARM Cortex-M4) -# -[env:SAMD51_grandcentral_m4] -platform = atmelsam -board = adafruit_grandcentral_m4 -build_flags = ${common.build_flags} -std=gnu++17 -build_unflags = -std=gnu++11 -src_filter = ${common.default_src_filter} + -lib_deps = ${common.lib_deps} - SoftwareSerialM - Adafruit SPIFlash -custom_marlin.SDSUPPORT = SdFat - Adafruit Fork -debug_tool = jlink - -################################# -# # -# LPC176x Architecture # -# # -################################# - -# -# NXP LPC176x ARM Cortex-M3 -# -[common_LPC] -platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip -platform_packages = framework-arduino-lpc176x@^0.2.6 -board = nxp_lpc1768 -lib_ldf_mode = off -lib_compat_mode = strict -extra_scripts = ${common.extra_scripts} - Marlin/src/HAL/LPC1768/upload_extra_script.py -src_filter = ${common.default_src_filter} + + -lib_deps = ${common.lib_deps} - Servo -custom_marlin.USES_LIQUIDCRYSTAL = arduino-libraries/LiquidCrystal@~1.0.7 -custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip -build_flags = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g - # debug options for backtrace - #-funwind-tables - #-mpoke-function-name - -# -# NXP LPC176x ARM Cortex-M3 -# -[env:LPC1768] -platform = ${common_LPC.platform} -extends = common_LPC -board = nxp_lpc1768 - -[env:LPC1769] -platform = ${common_LPC.platform} -extends = common_LPC -board = nxp_lpc1769 - -################################# -# # -# STM32 Architecture # -# # -################################# - -# -# HAL/STM32 Base Environment values -# -[common_stm32] -platform = ststm32@~10.0 -build_flags = ${common.build_flags} - -std=gnu++14 - -DUSBCON -DUSBD_USE_CDC - -DTIM_IRQ_PRIO=13 - -DADC_RESOLUTION=12 -build_unflags = -std=gnu++11 -src_filter = ${common.default_src_filter} + + - -# -# HAL/STM32F1 Common Environment values -# -[common_stm32f1] -platform = ststm32@~10.0 -board_build.core = maple -build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py - ${common.build_flags} - -DARDUINO_ARCH_STM32 -build_unflags = -std=gnu11 -std=gnu++11 -src_filter = ${common.default_src_filter} + -lib_ignore = SPI, FreeRTOS701, FreeRTOS821 -lib_deps = ${common.lib_deps} - SoftwareSerialM -platform_packages = tool-stm32duino - -# -# STM32F103RC -# -[env:STM32F103RC] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -monitor_speed = 115200 - -# -# MEEB_3DP (STM32F103RCT6 with 512K) -# -[env:STM32F103RC_meeb] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = MEEB_3DP -build_flags = ${common_stm32f1.build_flags} - -DDEBUG_LEVEL=0 - -DSS_TIMER=4 - -DSTM32_FLASH_SIZE=512 - -DHSE_VALUE=12000000U - -DUSE_USB_COMPOSITE - -DVECT_TAB_OFFSET=0x2000 - -DGENERIC_BOOTLOADER -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py - buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py -lib_deps = ${common.lib_deps} - SoftwareSerialM - USBComposite for STM32F1@0.91 -custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/ccccmagicboy/Adafruit_NeoPixel#meeb_3dp_use -debug_tool = stlink -upload_protocol = dfu - -# -# STM32F103RC_fysetc -# -[env:STM32F103RC_fysetc] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py -build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -lib_ldf_mode = chain -debug_tool = stlink -upload_protocol = serial - -# -# BigTree SKR Mini V1.1 / SKR mini E3 / SKR E3 DIP (STM32F103RCT6 ARM Cortex-M3) -# -# STM32F103RC_btt ............. RCT6 with 256K -# STM32F103RC_btt_USB ......... RCT6 with 256K (USB mass storage) -# STM32F103RC_btt_512K ........ RCT6 with 512K -# STM32F103RC_btt_512K_USB .... RCT6 with 512K (USB mass storage) -# -# WARNING! If you have an SKR Mini v1.1 or an SKR Mini E3 1.0 / 1.2 / 2.0 / DIP -# and experience a printer freeze, re-flash Marlin using the regular (non-512K) -# build option. 256K chips may be re-branded 512K chips, but this means the -# upper 256K is sketchy, and failure is very likely. -# - -[env:STM32F103RC_btt] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py -build_flags = ${common_stm32f1.build_flags} - -DDEBUG_LEVEL=0 -DSS_TIMER=4 -monitor_speed = 115200 - -[env:STM32F103RC_btt_USB] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC_btt -build_flags = ${env:STM32F103RC_btt.build_flags} -DUSE_USB_COMPOSITE -lib_deps = ${env:STM32F103RC_btt.lib_deps} - USBComposite for STM32F1@0.91 - -[env:STM32F103RC_btt_512K] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC_btt -board_upload.maximum_size=524288 -build_flags = ${env:STM32F103RC_btt.build_flags} -DSTM32_FLASH_SIZE=512 - -[env:STM32F103RC_btt_512K_USB] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RC_btt_512K -build_flags = ${env:STM32F103RC_btt_512K.build_flags} -DUSE_USB_COMPOSITE -lib_deps = ${env:STM32F103RC_btt_512K.lib_deps} - USBComposite for STM32F1@0.91 - -# -# STM32F103RE -# -[env:STM32F103RE] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RE -monitor_speed = 115200 - -# -# STM32F103RE_btt ............. RET6 -# STM32F103RE_btt_USB ......... RET6 (USB mass storage) -# -[env:STM32F103RE_btt] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py -build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4 -debug_tool = stlink -upload_protocol = stlink - -[env:STM32F103RE_btt_USB] -platform = ${common_stm32f1.platform} -extends = env:STM32F103RE_btt -build_flags = ${env:STM32F103RE_btt.build_flags} -DUSE_USB_COMPOSITE -lib_deps = ${common_stm32f1.lib_deps} - USBComposite for STM32F1@0.91 - -# -# REMRAM_V1 -# -[env:REMRAM_V1] -platform = ${common_stm32.platform} -extends = common_stm32 -board = remram_v1 -build_flags = ${common_stm32.build_flags} - -# -# ST NUCLEO-F767ZI Development Board -# This environment is for testing purposes prior to control boards -# being readily available based on STM32F7 MCUs -# -[env:NUCLEO_F767ZI] -platform = ${common_stm32.platform} -extends = common_stm32 -board = nucleo_f767zi -build_flags = ${common_stm32.build_flags} -DTIMER_SERIAL=TIM9 - -# -# ARMED (STM32) -# -[env:ARMED] -platform = ${common_stm32.platform} -extends = common_stm32 -board = armed_v1 -build_flags = ${common_stm32.build_flags} - -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing - -# -# Geeetech GTM32 (STM32F103VET6) -# -[env:STM32F103VE_GTM32] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103VE -build_flags = ${common_stm32f1.build_flags} - -ffunction-sections -fdata-sections -nostdlib -MMD - -DMCU_STM32F103VE -DARDUINO_GENERIC_STM32F103V -DARDUINO_ARCH_STM32F1 -DBOARD_generic_stm32f103v - -DDEBUG_LEVEL=DEBUG_NONE -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DVECT_TAB_ADDR=0x8000000 - -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 -upload_protocol = serial - -# -# Longer 3D board in Alfawise U20 (STM32F103VET6) -# -[env:STM32F103VE_longer] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103VE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py -build_flags = ${common_stm32f1.build_flags} - -DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12 -build_unflags = ${common_stm32f1.build_unflags} - -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 - -# -# MKS Robin Mini (STM32F103VET6) -# -[env:mks_robin_mini] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103VE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_mini.py -build_flags = ${common_stm32f1.build_flags} - -DMCU_STM32F103VE - -# -# MKS Robin Nano (STM32F103VET6) -# -[env:mks_robin_nano35] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103VE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_nano35.py -build_flags = ${common_stm32f1.build_flags} - -DMCU_STM32F103VE -DSS_TIMER=4 -debug_tool = jlink -upload_protocol = jlink - -# -# MKS Robin (STM32F103ZET6) -# -[env:mks_robin] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103ZE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin.py -build_flags = ${common_stm32f1.build_flags} - -DSS_TIMER=4 -DSTM32_XL_DENSITY - -# MKS Robin (STM32F103ZET6) -# Uses HAL STM32 to support Marlin UI for TFT screen with optional touch panel -# -[env:mks_robin_stm32] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103ZE -board_build.core = stm32 -board_build.variant = MARLIN_F103Zx -board_build.ldscript = ldscript.ld -board_build.offset = 0x7000 -board_build.encrypt = Yes -board_build.firmware = Robin.bin -build_flags = ${common_stm32.build_flags} - -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 -build_unflags = ${common_stm32.build_unflags} - -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/stm32_bootloader.py - buildroot/share/PlatformIO/scripts/mks_encrypt.py -lib_deps = - -# -# MKS Robin Pro (STM32F103ZET6) -# -[env:mks_robin_pro] -platform = ${common_stm32f1.platform} -extends = env:mks_robin -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_pro.py - -# -# TRIGORILLA PRO (STM32F103ZET6) -# -[env:trigorilla_pro] -platform = ${common_stm32f1.platform} -extends = env:mks_robin -extra_scripts = ${common.extra_scripts} - -# -# MKS Robin E3D (STM32F103RCT6) and -# MKS Robin E3 with TMC2209 -# -[env:mks_robin_e3] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -platform_packages = tool-stm32duino -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_e3.py -build_flags = ${common_stm32f1.build_flags} - -DDEBUG_LEVEL=0 -DSS_TIMER=4 - -# -# MKS Robin E3p (STM32F103VET6) -# - LVGL UI -# -[env:mks_robin_e3p] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103VE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_e3p.py -build_flags = ${common_stm32f1.build_flags} - -DMCU_STM32F103VE -DSS_TIMER=4 -debug_tool = jlink -upload_protocol = jlink - -# -# MKS Robin Lite/Lite2 (STM32F103RCT6) -# -[env:mks_robin_lite] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_lite.py - -# -# MKS ROBIN LITE3 (STM32F103RCT6) -# -[env:mks_robin_lite3] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/mks_robin_lite3.py - -# -# JGAurora A5S A1 (STM32F103ZET6) -# -[env:jgaurora_a5s_a1] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103ZE -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py -build_flags = ${common_stm32f1.build_flags} - -DSTM32F1xx -DSTM32_XL_DENSITY - -# -# Malyan M200 (STM32F103CB) -# -[env:STM32F103CB_malyan] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = malyanM200 -build_flags = ${common_stm32f1.build_flags} - -DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections - -Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__ -lib_ignore = ${common_stm32f1.lib_ignore} - SoftwareSerialM - -# -# Malyan M200 v2 (STM32F070RB) -# -[env:STM32F070RB_malyan] -platform = ${common_stm32.platform} -extends = common_stm32 -board = malyanM200v2 -build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED - -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing - -DCUSTOM_STARTUP_FILE - -# -# Malyan M200 v2 (STM32F070CB) -# -[env:STM32F070CB_malyan] -platform = ${common_stm32.platform} -extends = common_stm32 -board = malyanm200_f070cb -build_flags = ${common_stm32.build_flags} - -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED -DCUSTOM_STARTUP_FILE - -# -# Malyan M300 (STM32F070CB) -# -[env:malyan_M300] -platform = ${common_stm32.platform} -extends = common_stm32 -board = malyanm300_f070cb -build_flags = ${common_stm32.build_flags} - -DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED -src_filter = ${common.default_src_filter} + - -# -# Chitu boards like Tronxy X5s (STM32F103ZET6) -# -[env:chitu_f103] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = CHITU_F103 -extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-dependencies.py - pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py - buildroot/share/PlatformIO/scripts/chitu_crypt.py -build_flags = ${common_stm32f1.build_flags} - -DSTM32F1xx -DSTM32_XL_DENSITY -build_unflags = ${common_stm32f1.build_unflags} - -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6 - -# -# Some Chitu V5 boards have a problem with GPIO init. -# Use this target if G28 or G29 are always failing. -# -[env:chitu_v5_gpio_init] -platform = ${common_stm32f1.platform} -extends = env:chitu_f103 -build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX - -# -# Creality (STM32F103RET6) -# -[env:STM32F103RET6_creality] -platform = ${env:STM32F103RE.platform} -extends = env:STM32F103RE -build_flags = ${env:STM32F103RE.build_flags} -DTEMP_TIMER_CHAN=4 -extra_scripts = ${env:STM32F103RE.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/random-bin.py - buildroot/share/PlatformIO/scripts/creality.py -debug_tool = jlink -upload_protocol = jlink - -# -# FLSUN QQS Pro (STM32F103VET6) using hal STM32 -# board Hispeedv1 -# -[env:flsun_hispeedv1] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -board = genericSTM32F103VE -board_build.core = stm32 -board_build.variant = MARLIN_F103Vx -board_build.ldscript = ldscript.ld -board_build.offset = 0x7000 -board_build.firmware = Robin_mini.bin -board_build.encrypt = Yes -board_upload.offset_address = 0x08007000 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/stm32_bootloader.py - buildroot/share/PlatformIO/scripts/mks_encrypt.py - -# -# STM32F401VE -# 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html -# -[env:STM32F401VE_STEVAL] -platform = ${common_stm32.platform} -extends = common_stm32 -board = STEVAL_STM32F401VE -build_flags = ${common_stm32.build_flags} - -DARDUINO_STEVAL -DSTM32F401xE - -DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py - -# -# STM32F401RC -# -[env:FYSETC_CHEETAH_V20] -platform = ${common_stm32.platform} -extends = common_stm32 -board = FYSETC_CHEETAH_V20 -build_flags = ${common_stm32.build_flags} -DSTM32F401xC -DVECT_TAB_OFFSET=0xC000 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/FYSETC_CHEETAH_V20.py - -# -# FLYF407ZG -# -[env:FLYF407ZG] -platform = ${common_stm32.platform} -extends = common_stm32 -board = FLYF407ZG -build_flags = ${common_stm32.build_flags} - -DVECT_TAB_OFFSET=0x8000 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - -# -# FLY MINI(stm32f103rct6) -# -[env:FLY_MINI] -platform = ${common_stm32f1.platform} -extends = common_stm32f1 -board = genericSTM32F103RC -extra_scripts = ${common.extra_scripts} - buildroot/share/PlatformIO/scripts/fly_mini.py -build_flags = ${common_stm32f1.build_flags} - -DDEBUG_LEVEL=0 -DSS_TIMER=4 - -# -# FYSETC S6 (STM32F446VET6 ARM Cortex-M4) -# -[env:FYSETC_S6] -platform = ${common_stm32.platform} -extends = common_stm32 -platform_packages = tool-stm32duino -board = marlin_fysetc_s6 -build_flags = ${common_stm32.build_flags} - -DVECT_TAB_OFFSET=0x10000 - -DHAL_PCD_MODULE_ENABLED -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py -debug_tool = stlink -upload_protocol = dfu -upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE" - -# -# STM32F407VET6 with RAMPS-like shield -# 'Black' STM32F407VET6 board - https://wiki.stm32duino.com/index.php?title=STM32F407 -# Shield - https://github.com/jmz52/Hardware -# -[env:STM32F407VE_black] -platform = ${common_stm32.platform} -extends = common_stm32 -board = blackSTM32F407VET6 -build_flags = ${common_stm32.build_flags} - -DARDUINO_BLACK_F407VE - -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - -# -# Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4) -# For use with with davidtgbe's OpenBLT bootloader https://github.com/davidtgbe/openblt/releases -# Comment out board_build.offset = 0x10000 if you don't plan to use OpenBLT/flashing directly to 0x08000000. -# -[env:Anet_ET4_OpenBLT] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DHAL_SD_MODULE_ENABLED -DHAL_SRAM_MODULE_ENABLED -board = genericSTM32F407VGT6 -board_build.core = stm32 -board_build.variant = MARLIN_F4x7Vx -board_build.ldscript = ldscript.ld -board_build.firmware = firmware.srec -# Just anet_et4_openblt.py generates the file, not stm32_bootloader.py -board_build.encrypt = Yes -board_build.offset = 0x10000 -board_upload.offset_address = 0x08010000 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 -debug_tool = jlink -upload_protocol = jlink -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/stm32_bootloader.py - buildroot/share/PlatformIO/scripts/anet_et4_openblt.py - -# -# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) -# -[env:BIGTREE_SKR_PRO] -platform = ${common_stm32.platform} -extends = common_stm32 -board = BigTree_SKR_Pro -build_flags = ${common_stm32.build_flags} - -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py -#upload_protocol = stlink -#upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run -debug_tool = stlink -debug_init_break = - -# -# USB Flash Drive mix-ins for STM32 -# -[stm32_flash_drive] -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc.zip -build_flags = ${common_stm32.build_flags} - -DHAL_PCD_MODULE_ENABLED -DHAL_HCD_MODULE_ENABLED - -DUSBHOST -DUSBH_IRQ_PRIO=3 -DUSBH_IRQ_SUBPRIO=4 - -# -# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4) with USB Flash Drive Support -# -[env:BIGTREE_SKR_PRO_usb_flash_drive] -extends = env:BIGTREE_SKR_PRO -platform_packages = ${stm32_flash_drive.platform_packages} -build_flags = ${stm32_flash_drive.build_flags} - -# -# Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) -# -[env:BIGTREE_GTR_V1_0] -platform = ${common_stm32.platform} -extends = common_stm32 -board = BigTree_GTR_v1 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py -build_flags = ${common_stm32.build_flags} - -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000 - -# -# Bigtreetech GTR V1.0 (STM32F407IGT6 ARM Cortex-M4) with USB Flash Drive Support -# -[env:BIGTREE_GTR_V1_0_usb_flash_drive] -extends = env:BIGTREE_GTR_V1_0 -platform_packages = ${stm32_flash_drive.platform_packages} -build_flags = ${stm32_flash_drive.build_flags} - -# -# BigTreeTech BTT002 V1.0 (STM32F407VGT6 ARM Cortex-M4) -# -[env:BIGTREE_BTT002] -platform = ${common_stm32.platform} -extends = common_stm32 -board = BigTree_Btt002 -build_flags = ${common_stm32.build_flags} - -DSTM32F407_5VX -DVECT_TAB_OFFSET=0x8000 - -DHAVE_HWSERIAL2 - -DHAVE_HWSERIAL3 - -DPIN_SERIAL2_RX=PD_6 - -DPIN_SERIAL2_TX=PD_5 -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - -# -# Lerdge base -# -[lerdge_common] -platform = ${common_stm32.platform} -extends = common_stm32 -board = LERDGE -board_build.offset = 0x10000 -board_build.encrypt = Yes -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py - buildroot/share/PlatformIO/scripts/stm32_bootloader.py - buildroot/share/PlatformIO/scripts/lerdge.py -build_flags = ${common_stm32.build_flags} - -DSTM32F4 -DSTM32F4xx -DTARGET_STM32F4 - -DDISABLE_GENERIC_SERIALUSB -DARDUINO_ARCH_STM32 -DARDUINO_LERDGE - -DHAL_SRAM_MODULE_ENABLED -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -DUSBD_VID=0x0483 - -# -# Lerdge X -# -[env:LERDGEX] -extends = lerdge_common -board_build.firmware = Lerdge_X_firmware_force.bin - -# -# Lerdge X with USB Flash Drive Support -# -[env:LERDGEX_usb_flash_drive] -extends = LERDGEX -platform_packages = ${stm32_flash_drive.platform_packages} -build_flags = ${stm32_flash_drive.build_flags} - -# -# Lerdge S -# -[env:LERDGES] -extends = lerdge_common -board_build.firmware = Lerdge_firmware_force.bin - -# -# Lerdge S with USB Flash Drive Support -# -[env:LERDGES_usb_flash_drive] -extends = LERDGES -platform_packages = ${stm32_flash_drive.platform_packages} -build_flags = ${stm32_flash_drive.build_flags} - -# -# Lerdge K -# -[env:LERDGEK] -extends = lerdge_common -board_build.firmware = Lerdge_K_firmware_force.bin -build_flags = ${lerdge_common.build_flags} - -DLERDGEK - -# -# Lerdge K with USB Flash Drive Support -# -[env:LERDGEK_usb_flash_drive] -extends = LERDGEK -platform_packages = ${stm32_flash_drive.platform_packages} -build_flags = ${stm32_flash_drive.build_flags} - -# -# RUMBA32 -# -[env:rumba32] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} - -Os - -DHAL_PCD_MODULE_ENABLED - -DDISABLE_GENERIC_SERIALUSB - -DHAL_UART_MODULE_ENABLED - -DTIMER_SERIAL=TIM9 -board = rumba32_f446ve -upload_protocol = dfu -monitor_speed = 500000 - -# -# MKS Robin Nano V1.2 and V2 using hal STM32 -# -[env:mks_robin_nano35_stm32] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DMCU_STM32F103VE -DSS_TIMER=4 -DENABLE_HWSERIAL3 -board = genericSTM32F103VE -board_build.core = stm32 -board_build.variant = MARLIN_F103Vx -board_build.ldscript = ldscript.ld -board_build.offset = 0x7000 -board_build.encrypt = Yes -board_build.firmware = Robin_nano35.bin -board_upload.offset_address = 0x08007000 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -debug_tool = jlink -upload_protocol = jlink -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/stm32_bootloader.py - buildroot/share/PlatformIO/scripts/mks_encrypt.py - -# -# MKS Robin Pro V2 -# -[env:mks_robin_pro2] -platform = ${common_stm32.platform} -platform_packages = ${stm32_flash_drive.platform_packages} -extends = common_stm32 -build_flags = ${stm32_flash_drive.build_flags} -board = genericSTM32F407VET6 -board_build.core = stm32 -board_build.variant = MARLIN_F4x7Vx -board_build.ldscript = ldscript.ld -board_build.firmware = firmware.bin -board_build.offset = 0x0000 -board_upload.offset_address = 0x08000000 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -debug_tool = jlink -upload_protocol = jlink -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/stm32_bootloader.py - -# -# MKS Robin Nano V3 -# -[env:mks_robin_nano_v3] -platform = ${common_stm32.platform} -extends = common_stm32 -build_flags = ${common_stm32.build_flags} -DHAL_PCD_MODULE_ENABLED -DUSBCON -DUSBD_USE_CDC -board = genericSTM32F407VGT6 -board_build.core = stm32 -board_build.variant = MARLIN_F4x7Vx -board_build.ldscript = ldscript.ld -board_build.firmware = Robin_nano_v3.bin -board_build.offset = 0xC000 -board_upload.offset_address = 0x0800C000 -build_unflags = ${common_stm32.build_unflags} -debug_tool = jlink -upload_protocol = jlink -extra_scripts = ${common.extra_scripts} - pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py - buildroot/share/PlatformIO/scripts/stm32_bootloader.py - -# -# MKS Robin Nano V3 with USB Flash Drive Support -# Currently, using a STM32duino fork, until USB Host get merged -# -[env:mks_robin_nano_v3_usb_flash_drive] -extends = env:mks_robin_nano_v3 -platform_packages = ${stm32_flash_drive.platform_packages} -build_flags = ${stm32_flash_drive.build_flags} - -DUSBCON - -DUSE_USBHOST_HS - -DUSBD_IRQ_PRIO=5 - -DUSBD_IRQ_SUBPRIO=6 - -DUSE_USB_HS_IN_FS - -DUSBD_USE_CDC - -# -# MKS Robin Nano V3 with USB Flash Drive Support and Shared Media -# Currently, using a STM32duino fork, until USB Host and USB Device MSC get merged -# -[env:mks_robin_nano_v3_usb_flash_drive_msc] -extends = env:mks_robin_nano_v3 -platform_packages = framework-arduinoststm32@https://github.com/rhapsodyv/Arduino_Core_STM32/archive/usb-host-msc-cdc-msc.zip -build_unflags = ${common_stm32.build_unflags} -DUSBD_USE_CDC -build_flags = ${stm32_flash_drive.build_flags} - -DUSBCON - -DUSE_USBHOST_HS - -DUSBD_IRQ_PRIO=5 - -DUSBD_IRQ_SUBPRIO=6 - -DUSE_USB_HS_IN_FS - -DUSBD_USE_CDC_MSC - -# -# Mingda MPX_ARM_MINI -# - -[env:mingda_mpx_arm_mini] -platform = ${common_stm32.platform} -extends = common_stm32 -board = genericSTM32F103ZE -board_build.core = stm32 -board_build.variant = MARLIN_F103Zx -board_build.ldscript = ldscript.ld -board_build.offset = 0x10000 -build_flags = ${common_stm32.build_flags} -DENABLE_HWSERIAL3 -DTIMER_SERIAL=TIM5 -build_unflags = ${common_stm32.build_unflags} -DUSBCON -DUSBD_USE_CDC -extra_scripts = ${common.extra_scripts} pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py buildroot/share/PlatformIO/scripts/stm32_bootloader.py - - -################################# -# # -# Other Architectures # -# # -################################# - -# -# Espressif ESP32 -# -[env:esp32] -platform = espressif32@2.1.0 -board = esp32dev -build_flags = ${common.build_flags} -DCORE_DEBUG_LEVEL=0 -src_filter = ${common.default_src_filter} + -lib_ignore = NativeEthernet -upload_speed = 500000 -monitor_speed = 250000 -#upload_port = marlinesp.local -#board_build.flash_mode = qio - -[env:FYSETC_E4] -platform = espressif32@1.11.2 -extends = env:esp32 -board_build.partitions = default_16MB.csv - -# -# Teensy 3.1 / 3.2 (ARM Cortex-M4) -# -[env:teensy31] -platform = teensy -board = teensy31 -src_filter = ${common.default_src_filter} + -lib_ignore = NativeEthernet - -# -# Teensy 3.5 / 3.6 (ARM Cortex-M4) -# -[env:teensy35] -platform = teensy -board = teensy35 -src_filter = ${common.default_src_filter} + -lib_ignore = NativeEthernet - -[env:teensy36] -platform = teensy -board = teensy36 -src_filter = ${common.default_src_filter} + -lib_ignore = NativeEthernet - -# -# Teensy 4.0 / 4.1 (ARM Cortex-M7) -# -[env:teensy41] -platform = teensy -board = teensy41 -src_filter = ${common.default_src_filter} + - -# -# Native -# No supported Arduino libraries, base Marlin only -# -[env:linux_native] -platform = native -framework = -build_flags = -D__PLAT_LINUX__ -std=gnu++17 -ggdb -g -lrt -lpthread -D__MARLIN_FIRMWARE__ -Wno-expansion-to-defined -src_build_flags = -Wall -IMarlin/src/HAL/LINUX/include -build_unflags = -Wall -lib_ldf_mode = off -lib_deps = -src_filter = ${common.default_src_filter} + - # # Just print the dependency tree #